diff --git a/ABOUT-NLS b/ABOUT-NLS index 47d5e39..3cc8286 100644 --- a/ABOUT-NLS +++ b/ABOUT-NLS @@ -1,592 +1,1348 @@ -Notes on the Free Translation Project -************************************* +1 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. +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 free software 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, + 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 +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. +work on translations can 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. +1.1 INSTALL Matters +=================== -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'. +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 +provides the GNU 'gettext' functions. Installers may use special +options at configuration time for changing the default behaviour. The +command: - ./configure --with-included-gettext + ./configure --disable-nls -to prevent auto-detection. +will _totally_ disable translation of messages. - 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. + 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' library and +will decide to use it. If not, you may have to to use the +'--with-libintl-prefix' option to tell 'configure' where to look for it. - Internationalized packages have usually many `po/LL.po' files, where + Internationalized packages usually have 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' +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 +'LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. -Using This Package -================== +1.2 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. +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. If you happen to have the 'LC_ALL' or some other +'LC_xxx' environment variables set, you should unset them before setting +'LANG', otherwise the setting of 'LANG' will not have the desired +effect. 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 +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''. + 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 language 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' +'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'. +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'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from 'no' to 'nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under 'nb' and some older ones under 'no', it's recommended +for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and +older translations are used. - 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. + 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 -================= +1.3 Translating Teams +===================== - For the Free Translation Project to be a success, we need interested +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. +'http://translationproject.org/', in the "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: +'-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 + 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 'coordinator@translationproject.org' 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. +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. -Available Packages -================== +1.4 Available Packages +====================== - Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of May 2003. +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of Jun 2014. 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 + Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs + +---------------------------------------------------+ + a2ps | [] [] [] | + aegis | | + anubis | | + aspell | [] [] [] | + bash | [] [] [] | + bfd | | + binutils | [] | + bison | | + bison-runtime | [] | + buzztrax | [] | + ccd2cue | | + ccide | | + cflow | | + clisp | | + coreutils | [] [] | + cpio | | + cppi | | + cpplib | [] | + cryptsetup | [] | + datamash | | + denemo | [] [] | + dfarc | [] | + dialog | [] [] [] | + dico | | + diffutils | [] | + dink | [] | + direvent | | + doodle | [] | + dos2unix | | + dos2unix-man | | + e2fsprogs | [] [] | + enscript | [] | + exif | [] | + fetchmail | [] [] | + findutils | [] | + flex | [] | + freedink | [] [] | + fusionforge | | + gas | | + gawk | [] | + gcal | [] | + gcc | | + gdbm | | + gettext-examples | [] [] [] [] [] | + gettext-runtime | [] [] [] | + gettext-tools | [] [] | + gjay | | + glunarclock | [] [] [] | + gnubiff | [] | + gnubik | [] | + gnucash | () () [] | + gnuchess | | + gnulib | [] | + gnunet | | + gnunet-gtk | | + gold | | + gphoto2 | [] | + gprof | [] | + gramadoir | | + grep | [] [] [] | + grub | [] | + gsasl | | + gss | | + gst-plugins-bad | [] [] | + gst-plugins-base | [] [] [] | + gst-plugins-good | [] [] [] | + gst-plugins-ugly | [] [] [] | + gstreamer | [] [] [] [] | + gtick | [] | + gtkam | [] [] | + gtkspell | [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] | + hello | [] | + help2man | | + help2man-texi | | + hylafax | | + idutils | | + iso_15924 | [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | [] | + iso_639 | [] [] [] [] [] [] [] [] [] | + iso_639_3 | [] [] | + iso_639_5 | | + jwhois | | + kbd | [] | + klavaro | [] [] [] [] [] | + ld | [] | + leafpad | [] [] [] [] | + libc | [] [] [] | + libexif | () | + libextractor | | + libgnutls | [] | + libgphoto2 | [] | + libgphoto2_port | [] | + libgsasl | | + libiconv | [] [] | + libidn | [] | + liferea | [] [] [] [] | + lilypond | [] [] | + lordsawar | [] | + lprng | | + lynx | [] [] | + m4 | [] | + mailfromd | | + mailutils | | + make | [] | + man-db | [] [] | + man-db-manpages | | + midi-instruments | [] [] [] | + minicom | [] | + mkisofs | [] | + myserver | [] | + nano | [] [] [] | + opcodes | | + parted | [] | + pies | | + pnmixer | | + popt | [] | + procps-ng | | + procps-ng-man | | + psmisc | [] | + pspp | [] | + pushover | [] | + pwdutils | | + pyspread | | + radius | [] | + recode | [] [] [] | + recutils | | + rpm | | + rush | | + sarg | | + sed | [] [] [] [] | + sharutils | [] | + shishi | | + skribilo | | + solfege | [] [] | + solfege-manual | | + spotmachine | | + sudo | [] [] | + sudoers | [] [] | + sysstat | [] | + tar | [] [] [] | + texinfo | [] [] | + texinfo_document | [] [] | + tigervnc | [] | + tin | | + tin-man | | + tracgoogleappsa... | | + trader | | + util-linux | [] | + ve | | + vice | | + vmm | | + vorbis-tools | [] | + wastesedge | | + wcd | | + wcd-man | | + wdiff | [] [] | + wget | [] | + wyslij-po | | + xboard | | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +---------------------------------------------------+ + af am an ar as ast az be bg bn bn_IN bs ca crh cs + 4 0 2 5 3 11 0 8 25 3 3 1 55 4 74 + + da de el en en_GB en_ZA eo es et eu fa fi fr + +--------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] [] [] | + aegis | [] [] [] [] | + anubis | [] [] [] [] [] | + aspell | [] [] [] [] [] [] [] | + bash | [] [] [] | + bfd | [] [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] [] [] [] [] | + bison-runtime | [] [] [] [] [] [] [] [] | + buzztrax | [] [] [] [] | + ccd2cue | [] [] [] [] | + ccide | [] [] [] [] [] [] | + cflow | [] [] [] [] [] | + clisp | [] [] [] [] [] | + coreutils | [] [] [] [] [] | + cpio | [] [] [] [] [] | + cppi | [] [] [] [] [] | + cpplib | [] [] [] [] [] [] | + cryptsetup | [] [] [] [] [] | + datamash | [] [] [] [] | + denemo | [] | + dfarc | [] [] [] [] [] [] | + dialog | [] [] [] [] [] [] [] [] [] | + dico | [] [] [] [] | + diffutils | [] [] [] [] [] [] | + dink | [] [] [] [] [] [] | + direvent | [] [] [] [] | + doodle | [] [] [] [] | + dos2unix | [] [] [] [] [] | + dos2unix-man | [] [] [] | + e2fsprogs | [] [] [] [] [] | + enscript | [] [] [] [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] () [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] | + flex | [] [] [] [] [] [] | + freedink | [] [] [] [] [] [] [] [] | + fusionforge | [] [] [] | + gas | [] [] [] | + gawk | [] [] [] [] [] | + gcal | [] [] [] [] | + gcc | [] | + gdbm | [] [] [] [] [] | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] | + gjay | [] [] [] [] | + glunarclock | [] [] [] [] [] | + gnubiff | () [] [] () | + gnubik | [] [] [] [] [] | + gnucash | [] () () () () () () | + gnuchess | [] [] [] [] | + gnulib | [] [] [] [] [] [] [] | + gnunet | [] | + gnunet-gtk | [] | + gold | [] [] [] | + gphoto2 | [] () [] [] | + gprof | [] [] [] [] [] [] | + gramadoir | [] [] [] [] [] | + grep | [] [] [] [] [] [] [] | + grub | [] [] [] [] [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] [] [] | + gst-plugins-bad | [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] [] [] | + gtick | [] () [] [] [] | + gtkam | [] () [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] | + guix | [] [] | + guix-packages | | + gutenprint | [] [] [] [] | + hello | [] [] [] [] [] [] [] [] | + help2man | [] [] [] [] [] [] [] | + help2man-texi | [] [] [] | + hylafax | [] [] | + idutils | [] [] [] [] [] | + iso_15924 | [] () [] [] () [] () | + iso_3166 | [] () [] [] [] [] () [] () | + iso_3166_2 | [] () () () | + iso_4217 | [] () [] [] [] () [] () | + iso_639 | [] () [] [] () [] () | + iso_639_3 | () () () | + iso_639_5 | () () () | + jwhois | [] [] [] [] [] | + kbd | [] [] [] [] [] [] | + klavaro | [] [] [] [] [] [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] [] () [] [] | + libextractor | [] | + libgnutls | [] [] [] [] | + libgphoto2 | [] () [] | + libgphoto2_port | [] () [] [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] [] [] | + libidn | [] [] [] [] [] | + liferea | [] () [] [] [] [] [] | + lilypond | [] [] [] [] [] [] | + lordsawar | [] [] | + lprng | | + lynx | [] [] [] [] [] [] | + m4 | [] [] [] [] [] [] | + mailfromd | [] | + mailutils | [] [] [] [] | + make | [] [] [] [] [] | + man-db | [] [] [] [] | + man-db-manpages | [] [] | + midi-instruments | [] [] [] [] [] [] [] [] [] | + minicom | [] [] [] [] [] | + mkisofs | [] [] [] | + myserver | [] [] [] [] | + nano | [] [] [] [] [] [] [] | + opcodes | [] [] [] [] [] | + parted | [] [] [] | + pies | [] | + pnmixer | [] [] | + popt | [] [] [] [] [] [] | + procps-ng | [] [] | + procps-ng-man | [] [] | + psmisc | [] [] [] [] [] [] [] | + pspp | [] [] [] | + pushover | () [] [] [] | + pwdutils | [] [] [] | + pyspread | [] [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] | + recutils | [] [] [] [] | + rpm | [] [] [] [] [] | + rush | [] [] [] | + sarg | [] [] | + sed | [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] [] [] | + skribilo | [] [] [] | + solfege | [] [] [] [] [] [] [] [] | + solfege-manual | [] [] [] [] [] | + spotmachine | [] [] [] [] [] | + sudo | [] [] [] [] [] [] | + sudoers | [] [] [] [] [] [] | + sysstat | [] [] [] [] [] [] | + tar | [] [] [] [] [] [] [] | + texinfo | [] [] [] [] [] | + texinfo_document | [] [] [] [] | + tigervnc | [] [] [] [] [] [] | + tin | [] [] [] [] | + tin-man | [] | + tracgoogleappsa... | [] [] [] [] [] | + trader | [] [] [] [] [] [] | + util-linux | [] [] [] [] | + ve | [] [] [] [] [] | + vice | () () () | + vmm | [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | [] | + wcd | [] [] [] [] | + wcd-man | [] | + wdiff | [] [] [] [] [] [] [] | + wget | [] [] [] [] [] [] | + wyslij-po | [] [] [] [] | + xboard | [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] [] | + +--------------------------------------------------+ + da de el en en_GB en_ZA eo es et eu fa fi fr + 119 131 32 1 6 0 94 95 22 13 4 102 139 + + ga gd gl gu he hi hr hu hy ia id is it ja ka kk + +-------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | [] | + anubis | [] [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] | + binutils | [] [] [] | + bison | [] | + bison-runtime | [] [] [] [] [] [] [] [] | + buzztrax | | + ccd2cue | [] | + ccide | [] [] | + cflow | [] [] [] | + clisp | | + coreutils | [] [] | + cpio | [] [] [] [] [] [] | + cppi | [] [] [] [] [] | + cpplib | [] [] | + cryptsetup | [] | + datamash | | + denemo | [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] | + dink | [] | + direvent | [] | + doodle | [] [] | + dos2unix | [] [] | + dos2unix-man | | + e2fsprogs | [] [] | + enscript | [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] [] [] | + findutils | [] [] [] [] [] [] [] | + flex | [] | + freedink | [] [] [] [] | + fusionforge | | + gas | [] | + gawk | [] () [] | + gcal | | + gcc | | + gdbm | | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] | + gettext-tools | [] [] [] | + gjay | [] | + glunarclock | [] [] [] [] [] [] | + gnubiff | [] [] () | + gnubik | [] [] [] | + gnucash | () () () () () | + gnuchess | | + gnulib | [] [] [] [] [] | + gnunet | | + gnunet-gtk | | + gold | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] [] | + gramadoir | [] [] [] | + grep | [] [] [] [] [] [] [] | + grub | [] [] [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] [] [] | + gst-plugins-bad | [] [] [] | + gst-plugins-base | [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] [] [] | + gtkam | [] [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] [] [] | + hello | [] [] [] [] [] | + help2man | [] [] [] | + help2man-texi | | + hylafax | [] | + idutils | [] [] | + iso_15924 | [] [] [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | [] [] | + iso_4217 | [] [] [] [] [] [] | + iso_639 | [] [] [] [] [] [] [] [] [] | + iso_639_3 | [] [] | + iso_639_5 | | + jwhois | [] [] [] [] | + kbd | [] [] [] | + klavaro | [] [] [] [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] [] () | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | | + libgnutls | [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] | + libgsasl | [] [] [] [] | + libiconv | [] [] [] [] [] [] [] | + libidn | [] [] [] [] | + liferea | [] [] [] [] [] | + lilypond | [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] [] | + m4 | [] [] [] [] [] | + mailfromd | | + mailutils | | + make | [] [] [] [] | + man-db | [] [] | + man-db-manpages | [] [] | + midi-instruments | [] [] [] [] [] [] [] [] [] | + minicom | [] [] [] | + mkisofs | [] [] | + myserver | [] | + nano | [] [] [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] [] [] | + pies | | + pnmixer | [] [] | + popt | [] [] [] [] [] [] [] [] [] [] | + procps-ng | | + procps-ng-man | | + psmisc | [] [] [] [] | + pspp | [] [] | + pushover | [] | + pwdutils | [] | + pyspread | | + radius | [] | + recode | [] [] [] [] [] [] [] | + recutils | | + rpm | [] | + rush | [] | + sarg | | + sed | [] [] [] [] [] [] [] | + sharutils | | + shishi | | + skribilo | [] | + solfege | [] [] | + solfege-manual | | + spotmachine | | + sudo | [] [] [] [] | + sudoers | [] [] [] | + sysstat | [] [] [] [] | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] | + texinfo_document | [] [] [] | + tigervnc | | + tin | | + tin-man | | + tracgoogleappsa... | [] [] [] [] | + trader | [] [] | + util-linux | [] | + ve | [] | + vice | () () | + vmm | | + vorbis-tools | [] [] | + wastesedge | [] | + wcd | | + wcd-man | | + wdiff | [] [] [] | + wget | [] [] [] [] | + wyslij-po | [] [] [] | + xboard | | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] | + +-------------------------------------------------+ + ga gd gl gu he hi hr hu hy ia id is it ja ka kk + 35 2 47 4 8 2 60 71 2 6 81 11 87 57 0 3 + + kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl + +--------------------------------------------------+ + a2ps | [] [] | + aegis | [] | + anubis | [] [] [] | + aspell | [] [] | + bash | [] [] | + bfd | | + binutils | | + bison | [] | + bison-runtime | [] [] [] [] [] [] | + buzztrax | | + ccd2cue | | + ccide | [] [] | + cflow | [] | + clisp | [] | + coreutils | [] [] | + cpio | [] | + cppi | | + cpplib | [] | + cryptsetup | [] | + datamash | [] [] | + denemo | | + dfarc | [] [] | + dialog | [] [] [] [] [] [] | + dico | | + diffutils | [] [] [] | + dink | [] | + direvent | [] | + doodle | [] | + dos2unix | [] [] | + dos2unix-man | [] | + e2fsprogs | [] | + enscript | [] | + exif | [] [] [] | + fetchmail | [] | + findutils | [] [] | + flex | [] | + freedink | [] [] | + fusionforge | | + gas | | + gawk | [] | + gcal | | + gcc | | + gdbm | | + gettext-examples | [] [] [] [] [] [] | + gettext-runtime | [] [] [] | + gettext-tools | [] | + gjay | | + glunarclock | [] [] | + gnubiff | [] | + gnubik | [] [] | + gnucash | () () () () () () () [] | + gnuchess | [] [] | + gnulib | [] | + gnunet | | + gnunet-gtk | | + gold | | + gphoto2 | [] | + gprof | [] [] | + gramadoir | [] | + grep | [] [] | + grub | [] [] [] | + gsasl | [] | + gss | | + gst-plugins-bad | [] [] [] | + gst-plugins-base | [] [] [] | + gst-plugins-good | [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] | + gstreamer | [] [] [] | + gtick | [] | + gtkam | [] [] | + gtkspell | [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] | + hello | [] [] [] | + help2man | [] | + help2man-texi | | + hylafax | [] | + idutils | [] | + iso_15924 | () [] [] | + iso_3166 | [] [] [] () [] [] [] [] [] [] | + iso_3166_2 | () [] | + iso_4217 | () [] [] [] | + iso_639 | [] [] () [] [] [] [] | + iso_639_3 | [] () [] | + iso_639_5 | () | + jwhois | [] [] | + kbd | [] | + klavaro | [] [] | + ld | | + leafpad | [] [] [] [] [] | + libc | [] [] | + libexif | [] | + libextractor | [] | + libgnutls | [] [] | + libgphoto2 | [] | + libgphoto2_port | [] | + libgsasl | [] | + libiconv | [] [] | + libidn | [] | + liferea | [] [] [] | + lilypond | [] | + lordsawar | | + lprng | | + lynx | [] | + m4 | [] | + mailfromd | | + mailutils | | + make | [] [] | + man-db | [] | + man-db-manpages | [] | + midi-instruments | [] [] [] [] [] [] [] | + minicom | [] | + mkisofs | [] | + myserver | | + nano | [] [] [] | + opcodes | [] | + parted | [] [] | + pies | | + pnmixer | [] | + popt | [] [] [] [] [] | + procps-ng | | + procps-ng-man | | + psmisc | [] | + pspp | [] [] | + pushover | | + pwdutils | [] | + pyspread | | + radius | [] | + recode | [] [] | + recutils | [] | + rpm | [] | + rush | [] | + sarg | | + sed | [] [] | + sharutils | [] | + shishi | | + skribilo | | + solfege | [] [] | + solfege-manual | [] | + spotmachine | [] | + sudo | [] [] [] | + sudoers | [] [] [] | + sysstat | [] [] | + tar | [] [] [] | + texinfo | [] | + texinfo_document | [] | + tigervnc | [] | + tin | | + tin-man | | + tracgoogleappsa... | [] [] [] | + trader | [] | + util-linux | [] | + ve | [] | + vice | [] | + vmm | [] | + vorbis-tools | [] | + wastesedge | [] | + wcd | [] | + wcd-man | [] | + wdiff | [] | + wget | [] [] | + wyslij-po | [] | + xboard | [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +--------------------------------------------------+ + kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl + 5 15 4 6 0 13 23 3 3 3 4 11 2 42 1 125 + + nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + +------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] | + aegis | [] [] | + anubis | [] [] [] | + aspell | [] [] [] [] [] [] [] | + bash | [] [] [] [] [] [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bison-runtime | [] [] [] [] [] [] [] [] | + buzztrax | [] | + ccd2cue | [] [] | + ccide | [] [] [] | + cflow | [] [] [] | + clisp | [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + cppi | [] [] [] | + cpplib | [] [] [] | + cryptsetup | [] [] [] | + datamash | [] [] | + denemo | | + dfarc | [] [] [] | + dialog | [] [] [] [] [] [] [] | + dico | [] | + diffutils | [] [] [] | + dink | | + direvent | [] [] [] | + doodle | [] [] | + dos2unix | [] [] [] [] | + dos2unix-man | [] [] | + e2fsprogs | [] | + enscript | [] [] [] [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] [] | + freedink | [] [] [] [] [] | + fusionforge | | + gas | | + gawk | [] | + gcal | | + gcc | | + gdbm | [] [] [] | + gettext-examples | [] [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] [] [] | + gjay | [] | + glunarclock | [] [] [] [] [] [] | + gnubiff | [] | + gnubik | [] [] [] [] | + gnucash | () () () () () [] | + gnuchess | [] [] | + gnulib | [] [] [] [] [] | + gnunet | | + gnunet-gtk | | + gold | | + gphoto2 | [] [] [] [] [] | + gprof | [] [] [] [] | + gramadoir | [] [] | + grep | [] [] [] [] [] [] | + grub | [] [] [] [] [] | + gsasl | [] [] [] | + gss | [] [] [] [] | + gst-plugins-bad | [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] [] [] | + gtick | [] [] [] [] [] | + gtkam | [] [] [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] [] | + hello | [] [] [] [] [] [] | + help2man | [] [] [] [] | + help2man-texi | [] | + hylafax | | + idutils | [] [] [] | + iso_15924 | [] () [] [] [] [] | + iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] | + iso_3166_2 | [] () [] | + iso_4217 | [] [] () [] [] [] [] [] | + iso_639 | [] [] [] () [] [] [] [] [] [] | + iso_639_3 | [] () | + iso_639_5 | () [] | + jwhois | [] [] [] [] | + kbd | [] [] | + klavaro | [] [] [] [] [] | + ld | | + leafpad | [] [] [] [] [] [] [] [] | + libc | [] [] [] | + libexif | [] () [] | + libextractor | [] | + libgnutls | [] | + libgphoto2 | [] | + libgphoto2_port | [] [] [] [] [] | + libgsasl | [] [] [] [] | + libiconv | [] [] [] [] [] | + libidn | [] [] [] | + liferea | [] [] [] [] () [] [] | + lilypond | | + lordsawar | | + lprng | [] | + lynx | [] [] | + m4 | [] [] [] [] [] | + mailfromd | [] | + mailutils | [] | + make | [] [] [] | + man-db | [] [] [] | + man-db-manpages | [] [] [] | + midi-instruments | [] [] [] [] [] [] [] [] | + minicom | [] [] [] [] | + mkisofs | [] [] [] | + myserver | [] [] | + nano | [] [] [] [] [] [] | + opcodes | | + parted | [] [] [] [] [] [] | + pies | [] | + pnmixer | [] | + popt | [] [] [] [] [] [] | + procps-ng | [] | + procps-ng-man | [] | + psmisc | [] [] [] [] | + pspp | [] [] | + pushover | | + pwdutils | [] | + pyspread | [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] [] | + recutils | [] [] | + rpm | [] | + rush | [] [] [] | + sarg | [] [] | + sed | [] [] [] [] [] [] [] [] | + sharutils | [] [] [] | + shishi | [] [] | + skribilo | [] | + solfege | [] [] [] | + solfege-manual | [] [] | + spotmachine | [] [] | + sudo | [] [] [] [] [] [] | + sudoers | [] [] [] [] | + sysstat | [] [] [] [] [] | + tar | [] [] [] [] [] | + texinfo | [] [] [] | + texinfo_document | [] [] | + tigervnc | [] [] [] | + tin | [] | + tin-man | | + tracgoogleappsa... | [] [] [] [] | + trader | [] [] | + util-linux | [] [] | + ve | [] [] [] | + vice | | + vmm | | + vorbis-tools | [] [] [] | + wastesedge | | + wcd | | + wcd-man | | + wdiff | [] [] [] [] [] | + wget | [] [] [] [] [] | + wyslij-po | [] [] [] [] | + xboard | [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] | + +------------------------------------------------+ + nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + 7 3 6 114 1 12 88 32 82 3 40 45 7 101 + + sv sw ta te tg th tr uk ur vi wa wo zh_CN + +----------------------------------------------+ + a2ps | [] [] [] [] [] | + aegis | [] | + anubis | [] [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] | + bison-runtime | [] [] [] [] [] [] | + buzztrax | [] [] [] | + ccd2cue | [] [] [] | + ccide | [] [] [] [] | + cflow | [] [] [] [] | + clisp | | + coreutils | [] [] [] | + cpio | [] [] [] [] [] | + cppi | [] [] [] [] | + cpplib | [] [] [] [] [] | + cryptsetup | [] [] [] | + datamash | [] [] [] | + denemo | [] | + dfarc | [] [] | + dialog | [] [] [] [] [] [] | + dico | [] | + diffutils | [] [] [] [] [] | + dink | [] | + direvent | [] [] | + doodle | [] [] | + dos2unix | [] [] [] [] | + dos2unix-man | [] [] [] | + e2fsprogs | [] [] [] [] | + enscript | [] [] [] [] | + exif | [] [] [] [] [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] | + freedink | [] [] [] | + fusionforge | | + gas | [] | + gawk | [] [] [] | + gcal | [] [] [] | + gcc | [] | + gdbm | [] [] | + gettext-examples | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] [] [] | + gjay | [] [] [] | + glunarclock | [] [] [] [] | + gnubiff | [] [] | + gnubik | [] [] [] [] | + gnucash | () () () () [] | + gnuchess | [] [] [] | + gnulib | [] [] [] [] | + gnunet | | + gnunet-gtk | | + gold | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] [] | + gramadoir | [] [] [] | + grep | [] [] [] [] [] | + grub | [] [] [] [] | + gsasl | [] [] [] [] | + gss | [] [] [] | + gst-plugins-bad | [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] | + gtkam | [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] | + guix | | + guix-packages | | + gutenprint | [] [] [] [] | + hello | [] [] [] [] [] [] | + help2man | [] [] [] | + help2man-texi | [] | + hylafax | [] | + idutils | [] [] [] | + iso_15924 | [] () [] [] () [] | + iso_3166 | [] [] () [] [] () [] [] | + iso_3166_2 | () [] [] () [] | + iso_4217 | [] () [] [] () [] | + iso_639 | [] [] [] () [] [] () [] [] | + iso_639_3 | [] () [] [] () | + iso_639_5 | () [] () | + jwhois | [] [] [] [] | + kbd | [] [] [] [] | + klavaro | [] [] [] [] [] [] | + ld | [] [] [] [] [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] [] () | + libextractor | [] [] | + libgnutls | [] [] [] [] | + libgphoto2 | [] [] [] | + libgphoto2_port | [] [] [] [] | + libgsasl | [] [] [] [] | + libiconv | [] [] [] [] [] | + libidn | () [] [] [] | + liferea | [] [] [] [] [] | + lilypond | [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] [] | + m4 | [] [] [] | + mailfromd | [] [] | + mailutils | [] | + make | [] [] [] [] | + man-db | [] [] [] | + man-db-manpages | [] [] | + midi-instruments | [] [] [] [] [] [] | + minicom | [] [] | + mkisofs | [] [] [] | + myserver | [] | + nano | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] [] [] | + pies | [] [] | + pnmixer | [] [] [] | + popt | [] [] [] [] [] [] [] | + procps-ng | [] [] | + procps-ng-man | [] | + psmisc | [] [] [] [] | + pspp | [] [] [] | + pushover | [] | + pwdutils | [] [] | + pyspread | [] | + radius | [] [] | + recode | [] [] [] [] | + recutils | [] [] [] | + rpm | [] [] [] [] | + rush | [] [] | + sarg | | + sed | [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] [] | + skribilo | [] [] | + solfege | [] [] [] [] | + solfege-manual | [] | + spotmachine | [] [] [] | + sudo | [] [] [] [] [] | + sudoers | [] [] [] [] | + sysstat | [] [] [] [] [] | + tar | [] [] [] [] [] | + texinfo | [] [] [] | + texinfo_document | [] | + tigervnc | [] [] [] | + tin | [] | + tin-man | | + tracgoogleappsa... | [] [] [] [] [] | + trader | [] | + util-linux | [] [] [] [] | + ve | [] [] [] [] | + vice | () () | + vmm | | + vorbis-tools | [] [] | + wastesedge | | + wcd | [] [] [] | + wcd-man | [] | + wdiff | [] [] [] [] | + wget | [] [] [] | + wyslij-po | [] [] | + xboard | [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] | + +----------------------------------------------+ + sv sw ta te tg th tr uk ur vi wa wo zh_CN + 106 1 4 3 0 13 51 115 1 125 7 1 100 + + zh_HK zh_TW + +-------------+ + a2ps | | 30 + aegis | | 9 + anubis | | 19 + aspell | | 29 + bash | [] | 23 + bfd | | 11 + binutils | | 12 + bison | [] | 18 + bison-runtime | [] | 38 + buzztrax | | 9 + ccd2cue | | 10 + ccide | | 17 + cflow | | 16 + clisp | | 10 + coreutils | | 18 + cpio | | 20 + cppi | | 17 + cpplib | [] | 19 + cryptsetup | | 14 + datamash | | 11 + denemo | | 5 + dfarc | | 17 + dialog | [] | 42 + dico | | 6 + diffutils | | 22 + dink | | 10 + direvent | | 11 + doodle | | 12 + dos2unix | [] | 18 + dos2unix-man | | 9 + e2fsprogs | | 15 + enscript | | 21 + exif | | 27 + fetchmail | | 19 + findutils | | 29 + flex | [] | 19 + freedink | | 24 + fusionforge | | 3 + gas | | 5 + gawk | | 13 + gcal | | 8 + gcc | | 2 + gdbm | | 10 + gettext-examples | [] [] | 40 + gettext-runtime | [] [] | 35 + gettext-tools | [] | 24 + gjay | | 9 + glunarclock | [] | 27 + gnubiff | | 9 + gnubik | | 19 + gnucash | () | 6 + gnuchess | | 11 + gnulib | | 23 + gnunet | | 1 + gnunet-gtk | | 1 + gold | | 7 + gphoto2 | [] | 19 + gprof | | 21 + gramadoir | | 14 + grep | [] | 31 + grub | | 21 + gsasl | [] | 19 + gss | | 17 + gst-plugins-bad | | 21 + gst-plugins-base | | 27 + gst-plugins-good | | 32 + gst-plugins-ugly | | 34 + gstreamer | [] | 32 + gtick | | 19 + gtkam | | 24 + gtkspell | [] [] | 48 + guix | | 2 + guix-packages | | 0 + gutenprint | | 15 + hello | [] | 30 + help2man | | 18 + help2man-texi | | 5 + hylafax | | 5 + idutils | | 14 + iso_15924 | [] | 23 + iso_3166 | [] [] | 58 + iso_3166_2 | | 9 + iso_4217 | [] [] | 28 + iso_639 | [] [] | 46 + iso_639_3 | | 10 + iso_639_5 | | 2 + jwhois | [] | 20 + kbd | | 17 + klavaro | | 30 + ld | [] | 15 + leafpad | [] | 39 + libc | [] | 24 + libexif | | 10 + libextractor | | 5 + libgnutls | | 13 + libgphoto2 | | 10 + libgphoto2_port | [] | 19 + libgsasl | | 18 + libiconv | [] | 29 + libidn | | 17 + liferea | | 29 + lilypond | | 11 + lordsawar | | 3 + lprng | | 3 + lynx | | 19 + m4 | [] | 22 + mailfromd | | 4 + mailutils | | 6 + make | | 19 + man-db | | 15 + man-db-manpages | | 10 + midi-instruments | [] | 43 + minicom | [] | 17 + mkisofs | | 13 + myserver | | 9 + nano | [] | 30 + opcodes | | 12 + parted | [] | 23 + pies | | 4 + pnmixer | | 9 + popt | [] | 36 + procps-ng | | 5 + procps-ng-man | | 4 + psmisc | [] | 22 + pspp | | 13 + pushover | | 6 + pwdutils | | 8 + pyspread | | 6 + radius | | 9 + recode | | 31 + recutils | | 10 + rpm | [] | 13 + rush | | 10 + sarg | | 4 + sed | [] | 35 + sharutils | | 13 + shishi | | 7 + skribilo | | 7 + solfege | | 21 + solfege-manual | | 9 + spotmachine | | 11 + sudo | | 26 + sudoers | | 22 + sysstat | | 23 + tar | [] | 30 + texinfo | | 17 + texinfo_document | | 13 + tigervnc | | 14 + tin | [] | 7 + tin-man | | 1 + tracgoogleappsa... | [] | 22 + trader | | 12 + util-linux | | 13 + ve | | 14 + vice | | 1 + vmm | | 3 + vorbis-tools | | 13 + wastesedge | | 3 + wcd | | 8 + wcd-man | | 3 + wdiff | [] | 23 + wget | | 21 + wyslij-po | | 14 + xboard | | 10 + xdg-user-dirs | [] [] | 68 + xkeyboard-config | [] | 28 + +-------------+ + 89 teams zh_HK zh_TW + 166 domains 7 42 2809 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 @@ -594,32 +1350,30 @@ 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'. +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 Jun 2014 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://translationproject.org/extra/matrix.html'. + +1.5 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 Lesser 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 +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. - +'coordinator@translationproject.org' to make the '.pot' files available +to the translation teams. diff --git a/AUTHORS b/AUTHORS index bd6d89b..9ad0ba2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -390,6 +390,7 @@ tests/strip.tests Chet Ramey tests/strip.right Chet Ramey tests/tilde-tests Chet Ramey tests/tilde.right Chet Ramey +tests/unicode1.sub Chet Ramey, John Kearney tests/varenv.right Chet Ramey tests/varenv.sh Chet Ramey tests/misc/chld-trap.sh Chet Ramey @@ -460,3 +461,6 @@ lib/sh/zwrite.c Chet Ramey tests/posix-ifs.sh Glenn Fowler support/checkbashisms Julian Gilbey, Debian Linux team + +lib/readline/colors.c Richard Stallman, David MacKenzie +lib/readline/parse-colors.c Richard Stallman, David MacKenzie diff --git a/CHANGES b/CHANGES index 359e10d..e4e0124 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,4264 @@ +This document details the changes between this version, bash-5.2-release, and +the previous version, bash-5.2-rc4. + +1. Changes to Bash + +2. Changes to Readline + +a. When replacing a history entry, make sure the existing entry has a non-NULL + timestamp before copying it; it may have been added by the application, not + the history library. + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.2-rc4, and +the previous version, bash-5.2-rc3. + +1. Changes to Bash + +a. Changed how the compatibility mode enabling of extglob works in conjunction + with parsing conditional commands. + +b. Fixed a problem with aliases containing command substitutions. + +2. Changes to Readline + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.2-rc3, and +the previous version, bash-5.2-rc2. + +1. Changes to Bash + +a. Added a compatibility mode feature that causes the parser to parse command + substitutions as if extglob were enabled. If it is enabled before execution, + parse at execution will succeed. If not, the subsequent execution parse will + fail. + +b. Fixed an issue with handling a `return' executed in a trap action if the + trap is executed while running in a shell function. + +2. Changes to Readline + +3. New Features in Bash + +4. New Features in Readline + +a. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG) + each time it is called, and modifies the appropriate locale-specific display + and key binding variables when the locale changes. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.2-rc2, and +the previous version, bash-5.2-rc1. + +1. Changes to Bash + +a. Fixed a bug that could disable history saving after a compound array + assignment in an interactive shell. + +b. Fixed a bug that could cause incorrect error messages when running a DEBUG + trap during a conditional or arithmetic command. + +c. Fixed a bug that caused test to print an error message when given ! ! arg + as arguments. + +d. Fixed a bug that resulted in incorrect error messages when completing a + backquoted command substitution. + +e. Changed command substitution parsing to reproduce the original text more + closely when reconsituting the command string from the parsed command. + +f. Fixed a bug that could cause an EXIT trap to use the wrong variable context + when the errexit option is set. + +g. Fixed a bug that could cause the parser to incorrectly delimit a token when + an alias expansion ended with a multibyte character. + +2. Changes to Readline + +3. New Features in Bash + +a. Since there is no `declare -' equivalent of `local -', make sure to use + `local -' in the output of `local -p'. + +b. Null anchored matches in pattern substitution now process `&' in the + replacement string, like sed. + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.2-rc1, and +the previous version, bash-5.2-beta. + +1. Changes to Bash + +a. Changes to `wait -p' and how it sets the variable name in the presence of + valid and invalid PID arguments. + +b. Fixed a bug that caused compgen to dump core if the completion engine was + not initialized. + +c. Fixed a memory leak in the variable name programmable completion code. + +d. Here-documents and here-strings use tempfiles if the shell compatibility + level is 50 or lower. + +e. Non-interactive shells exit on a syntax error encountered while parsing a + command substitution. + +f. Fixed a bug with inherited parser state while parsing a command substitution. + +g. Fixed a bug that caused the shell not to check for terminating signals + after executing the command_string supplied with `-c' and before executing + the exit trap. + +h. Changes to avoid a make race condition while generating builtins.c. + +i. Make it explicit that BASH_REMATCH is always a global variable, and that + local copies are (currently) ignored. + +j. Fixed a bug that caused an ambiguous redirection (>&word) to be printed + incorrectly (>&word) if no file descriptor was supplied. + +2. Changes to Readline + +a. Fixed a bug that caused rl_eof_found to be set prematurely while reading a + multi-character key sequence in callback mode. + +3. New Features in Bash + +a. In posix mode, the `printf' builtin checks for the `L' length modifier and + uses long double for floating point conversion specifiers if it's present, + double otherwise. + +b. The `globbing' completion code now takes the `globstar' option into account. + +c. `suspend -f' now forces the shell to suspend even if job control is not + currently enabled. + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.2-beta, and +the previous version, bash-5.2-alpha. + +1. Changes to Bash + +a. Fixed a problem with command-oriented history and multi-line commands that + caused embedded blank lines to be run together. + +b. Changed the way `&' is quoted when performing pattern substitution and + `patsub_replacement' is enabled. + +c. Fixed some integer overflows when expanding strings or reading the output + of command substitution larger than 2GB. + +d. `wait -p' without the `-n' option now does something useful if there are no + jobs. + +e. Fixed an issue with read timeouts in posix mode. + +f. Changed here-document processing to process $'...' and $"..." only when they + appear in the WORD portion of ${PARAM OP WORD} in the here-document body + and the body is being expanded. + +g. Changed alias expansion in command substitution to be posix-conformant + (performed while initially parsing the command substitution) when in posix + mode. + +h. Bash optimizes away more forks in subshells. + +i. Here-document construction now performs quote removal on the here-document + delimiter only if it's marked as quoted, which prevents quote characters in + command substitutions from being removed. + +j. Prompt string expansion now gives invisible characters in the expansion of + the \w, \W, and \s escape sequences a visible representation to avoid + problems with redisplay. + +k. Fixed a problem with SIGINT during the execution of a command bound with + `bind -x' affecting the saved terminal settings. + +l. Fixed an inconsistency with how $@ expands in a construct like ${@:+set} + or ${array[@]:+set} in the presence of null positional parameters or + array elements. + +2. Changes to Readline + +a. Prevent some display problems when running a command as the result of a + trap or one bound using `bind -x' and the command generates output. + +b. Fixed an issue with multi-line prompt strings that have one or more + invisible characters at the end of a physical line. + +c. Fixed an issue that caused a history line's undo list to be cleared when + it should not have been. + +3. New Features in Bash + +a. There is a new bindable readline command name: `vi-edit-and-execute-command'. + +4. New Features in Readline + +a. Two new bindable string variables: active-region-start-color and + active-region-end-color. The first sets the color used to display the + active region; the second turns it off. If set, these are used in place + of terminal standout mode. + +b. New readline state (RL_STATE_EOF) and application-visible variable + (rl_eof_found) to allow applications to detect when readline reads EOF + before calling the deprep-terminal hook. + +c. There is a new configuration option: --with-shared-termcap-library, which + forces linking the shared readline library with the shared termcap (or + curses/ncurses/termlib) library so applications don't have to do it. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.2-alpha, and +the previous version, bash-5.1-release. + +1. Changes to Bash + +a. Fixed a bug that assigned a value to the variable name supplied as an + argument to `wait -p' when there were no jobs. + +b. Fixed a bug that resulted in performing incorrect word expansion on the + key/value pairs in a compound array assignment. + +c. Fixed a bug that could put the child forked to run a command substitution + into the wrong process group. + +d. Fixed a problem that could cause the lastpipe option to work incorrectly if + file descriptor 0 was closed. + +e. Bash tries to suppress traps if a forked child receives a trapped signal + before it has a chance to reset its signal handlers. + +f. Fixed several memory leaks in compound array assignments. + +g. Fixed a problem with performing an assignment with `+=' to an array element + that was the value of a nameref. + +h. Fixed a bug that could cause a nameref containing an array reference using + `@' or `*' not to expand to multiple words. + +i. Fixed a bug where extended glob functions could match `.' or `..' when it + wasn't explicitly specified, even if dotglob was set. + +j. Fixed a bug that caused non-interactive posix-mode shells not to exit on a + variable assignment error while assigning into the temporary environment. + +k. Fixed a bug that caused parsing errors if an alias contained a compound + array assignment. + +l. Fixed a couple of instances where bash checked syntax too aggressively when + trying to determine how to add a partial command to command-oriented + history. + +m. Fixed a parser problem that caused it not to allow reserved words to follow + the `((' and `[[' commands. + +n. Fixed a bad offset calculation when using negative offsets to `history -d'. + +o. Fixed an off-by-one error that caused a read past the end of a buffer when + reading a multibyte character from the output of a command substitution. + +p. Fixed a problem with a failed `exec' command not setting $? to the right + value for an exit trap. + +q. Fixed a problem that caused bash not to unlink FIFOs created as part of + expanding redirections for an external command. + +r. Fixed a bug that could cause aliases not to be expanded in case statements. + +s. Fixed a bug that could cause word completion to attempt programmable + completion for the target of a redirection, instead of filename completion. + +t. Fixed a bug that could result in errors after rebinding a key sequence with + `bind -x' multiple times. + +u. Fixed a problem that could result in not quoting the result when performing + command name completion with a glob pattern in the command name. + +v. `mapfile' now uses fully-buffered reads in more cases, which should improve + bulk read performance. + +w. Fixed a bug that caused `wait -n' to not reset its internal state when + interrupted by a signal, resulting in subsequent calls failing. + +x. Fixed a bug with parsing numeric arguments to readline key sequences + installed with `bind -x'. + +y. Bash suppresses forking in several additional cases, including most uses + of $( 128 in the current encoding. + +hh. Fixed a problem that could cause the shell to attempt to free unallocated + memory if an expansion error occurred. + +ii. Fixed a bug in the bash malloc implementation of malloc_usable_size. Bash + did not use it, but it could cause problems with library functions that + did. + +jj. If the `exec' builtin fails, and the shell does not exit, it restores + trapped signals to their trapped state. + +kk. Fixed a bug that could cause variable assignment arguments to `declare' to + expand variables using attributes that the call to declare was turning off. + +ll. Fixed a bug with LINENO and arithmetic for commands. + +mm. Fixed a posix-mode bug that caused tildes not to be expanded after an + unquoted colon on the right side of an assignment statement. + +nn. Fixed a problem with `caller' and line numbers when executing an ERR trap. + +oo. Fixed a problem that could make the value returned by ${a:=b} not be the + final value assigned to a (e.g., if `a' has an attribute that modifies + the value on assignment). + +pp. Fixed a problem with saving multi-line here-documents to the history list + where the here-document delimiter does not appear on the first line. + +qq. Fixed a bug with using += to assign to dynamic variables like RANDOM. + +rr. Fixed a bug that caused `set -n' to modify $? if set after execution had + started. + +ss. Builtins like printf/read/wait now behave more consistently when assigning + arbitrary keys to associative arrays (like `]'. when appropriately quoted). + +tt. Fixed a problem with here-document collection printing the wrong prompt + when parsing a compound list in an interactive shell. + +uu. Fixed a problem with quoting shell expansion characters (like `$') when + they appear in a tab-completed word along with characters that do need + quoting (e.g.. $HOME/VirtualBox VMs). + +2. Changes to Readline + +a. Fixed a problem with cleaning up active marks when using callback mode. + +b. Fixed a problem with arithmetic comparison operators checking the version. + +c. Fixed a problem that could cause readline not to build on systems without + POSIX signal functions. + +d. Fixed a bug that could cause readline to crash if the application removed + the callback line handler before readline read all typeahead. + +e. Added additional checks for read errors in the middle of readline commands. + +f. Fixed a redisplay problem that occurred when switching from the digit- + argument prompt `(arg: N)' back to the regular prompt and the regular + prompt contained invisible characters. + +g. Fixed a problem with restoring the prompt when aborting an incremental + search. + +h. Fix a problem with characters > 128 not being displayed correctly in certain + single-byte encodings. + +i. Fixed a problem with unix-filename-rubout that caused it to delete too much + when applied to a pathname consisting only of one or more slashes. + +j. Fixed a display problem that caused the prompt to be wrapped incorrectly if + the screen changed dimensions during a call to readline() and the prompt + became longer than the screen width. + +k. Fixed a problem that caused the \r output by turning off bracketed paste + to overwrite the line if terminal echo was disabled. + +l. Fixed a bug that could cause colored-completion-prefix to not display if + completion-prefix-display-length was set. + +m. Fixed a problem with line wrapping prompts when a group of invisible + characters runs to the right edge of the screen and the prompt extends + longer then the screen width. + +n. Fixed a couple problems that could cause rl_end to be set incorrectly by + transpose-words. + +3. New Features in Bash + +a. The bash malloc returns memory that is aligned on 16-byte boundaries. + +b. There is a new internal timer framework used for read builtin timeouts. + +c. Rewrote the command substitution parsing code to call the parser recursively + and rebuild the command string from the parsed command. This allows better + syntax checking and catches errors much earlier. Along with this, if + command substitution parsing completes with here-documents remaining to be + read, the shell prints a warning message and reads the here-document bodies + from the current input stream. + +d. The `ulimit' builtin now treats an operand remaining after all of the options + and arguments are parsed as an argument to the last command specified by + an option. This is for POSIX compatibility. + +e. Here-document parsing now handles $'...' and $"..." quoting when reading the + here-document body. + +f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline + commands now understand $'...' and $"..." quoting. + +g. There is a new `spell-correct-word' bindable readline command to perform + spelling correction on the current word. + +h. The `unset' builtin now attempts to treat arguments as array subscripts + without parsing or expanding the subscript, even when `assoc_expand_once' + is not set. + +i. There is a default value for $BASH_LOADABLES_PATH in config-top.h. + +j. Associative array assignment and certain instances of referencing (e.g., + `test -v') now allow `@' and `*' to be used as keys. + +k. Bash attempts to expand indexed and associative array subscripts only + once when executing shell constructs and word expansions. + +l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with + that value for associative arrays instead of unsetting the entire array + (which you can still do with `unset arrayname'). For indexed arrays, it + removes all elements of the array without unsetting it (like `A=()'). + +m. Additional builtins (printf/test/read/wait) do a better job of not + parsing array subscripts if array_expand_once is set. + +n. New READLINE_ARGUMENT variable set to numeric argument for readline commands + defined using `bind -x'. + +o. The new `varredir_close' shell option causes bash to automatically close + file descriptors opened with {var}&WORD- redirection has WORD expand to the empty + string, treat the redirection as [N]<&- or [N]>&- and close file descriptor + N (default 0). + +w. Invalid parameter transformation operators are now invalid word expansions, + and so cause fatal errors in non-interactive shells. + +x. New shell option: patsub_replacement. When enabled, a `&' in the replacement + string of the pattern substitution expansion is replaced by the portion of + the string that matched the pattern. Backslash will escape the `&' and + insert a literal `&'. + +y. `command -p' no longer looks in the hash table for the specified command. + +z. The new `--enable-translatable-strings' option to `configure' allows $"..." + support to be compiled in or out. + +aa. The new `globskipdots' shell option forces pathname expansion never to + return `.' or `..' unless explicitly matched. It is enabled by default. + +bb. Array references using `@' and `*' that are the value of nameref variables + (declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if + set -u is enabled and the array (v) is unset. + +4. New Features in Readline + +a. There is now an HS_HISTORY_VERSION containing the version number of the + history library for applications to use. + +b. History expansion better understands multiple history expansions that may + contain strings that would ordinarily inhibit history expansion (e.g., + `abc!$!$'). + +c. There is a new framework for readline timeouts, including new public + functions to set timeouts and query how much time is remaining before a + timeout hits, and a hook function that can trigger when readline times + out. There is a new state value to indicate a timeout. + +d. Automatically bind termcap key sequences for page-up and page-down to + history-search-backward and history-search-forward, respectively. + +e. There is a new `fetch-history' bindable command that retrieves the history + entry corresponding to its numeric argument. Negative arguments count back + from the end of the history. + +f. `vi-undo' is now a bindable command. + +g. There is a new option: `enable-active-region'. This separates control of + the active region and bracketed-paste. It has the same default value as + bracketed-paste, and enabling bracketed paste enables the active region. + Users can now turn off the active region while leaving bracketed paste + enabled. + +h. rl_completer_word_break_characters is now `const char *' like + rl_basic_word_break_characters. + +i. Readline looks in $LS_COLORS for a custom filename extension + (*.readline-colored-completion-prefix) and uses that as the default color + for the common prefix displayed when `colored-completion-prefix' is set. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-rc3, and +the previous version, bash-5.1-rc2. + +1. Changes to Bash + +a. The `assoc_expand_once' option now affects the evaluation of the -v primary + to test and the [[ compound command. + +2. Changes to Readline + +a. Fixed a bug that could cause point to be set beyond the end of the line + buffer when aborting an incremental search. + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-rc2, and +the previous version, bash-5.1-rc1. + +1. Changes to Bash + +a. Process substitutions started from an interactive shell no longer have their + standard input implicitly redirected from /dev/null. + +b. Fixed an issue with setting the SIGINT trap handler in an interactive shell + when temporarily running $PROMPT_COMMAND non-interactively. + +2. Changes to Readline + +a. Terminals that are named "dumb" or unknown do not enable bracketed paste + by default. + +b. Ensure that disabling bracketed paste turns off highlighting the incremental + search string when the search is successful. + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-rc1, and +the previous version, bash-5.1-beta. + +1. Changes to Bash + +a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded + during a multi-line command. + +b. Modified the change to here-document expansion containing backslash-quoted + double quotes. + +c. Fixed a case where the shells's exit status could be greater than 255. + +d. Modified changed to process substitution so the executed command has its + stdin redirected from /dev/null if it was previously interactive and + reading commands from the terminal. + +2. New Features in Bash + +a. There is a new contributed loadable builtin: asort. + +3. Changes to Readline + +a. Fixed a bug that could cause an application with an application-specific + redisplay function to crash if the line data structures had not been + initialized. + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-beta, and +the previous version, bash-5.1-alpha. + +1. Changes to Bash + +a. Fixed a bug that caused name references to variables to not update the + referenced variable's assignment side effects. + +b. Tightened up the parameter transformation error checking for invalid + transformation operators. + +c. System-specific changes for: FreeBSD + +d. A few minor changes to move potential uses of stdio functions out of signal + handling paths. + +e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called + from a signal handler. + +f. Changed `command' builtin processing so it no longer starts an extra process + when run asynchronously (command x &). + +g. Avoid performing tilde expansion after `:' in words that look like assignment + statements when in posix mode. + +h. Slight changes to how the `complete' builtin prints out options and actions + for completion specifications. + +i. Several changes to how `local -' restores the values of options and + $SHELLOPTS. + +j. Don't treat a word in a compound assignment as an assignment statement + unless it has a valid subscript before the `='. + +k. Fixed a bug with the DEBUG trap and process substitution that caused the + terminal's process group to be set incorrectly. + +l. Fixed a bug that left readline's signal handlers installed while running a + shell command from a bindable readline command. + +m. Fixed the `fc' builtin to clamp out of range history specifications at the + boundaries of the history list for POSIX conformance. + +n. Fixed a bug that caused ${foo@a} to treat foo as an unset variable if it + was an array without a value for subscript 0/"0" but had other set + elements. + +o. Fixed a bug that caused the history code to attempt to parse command + substitutions looking for shell comments before adding them to the history, + even while parsing here-documents. + +p. Fixed a bug that could cause a syntax error in a command read by `eval' to + exit an interactive shell. + +2. New Features in Bash + +a. If the hash builtin is listing hashed filenames portably, don't print + anything if the table is empty. + +b. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component. + +c. Bash attempts to optimize away forks in the last command in a function body + under appropriate circumstances. + +d. The globbing code now uses fnmatch(3) to check collation elements (if + available) even in cases without multibyte characters. + +e. The `fg' and `bg' builtins now return an error in a command substitution + when asked to restart a job inherited from the parent shell. + +f. The shell now attempts to unlink all FIFOs on exit, whether a consuming + process has finished with them or not. + +3. Changes to Readline + +a. Make sure that all undo groups are closed when leaving vi insertion mode. + +b. Make sure that the vi-mode `C' and `c' commands enter insert mode even if + the motion command doesn't have any effect. + +c. Fixed several potential memory leaks in the callback mode context handling. + +d. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while + executing the terminal cleanup code, since it's no longer run in a signal + handling context. + +4. New Features in Readline + +a. The signal cleanup code now blocks SIGINT while processing after a SIGINT. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.1-alpha, and +the previous version, bash-5.0-release. + +1. Changes to Bash + +a. Fixed a bug that caused a posix-mode shell to not exit if the return builtin + was executed outside a function or dot script. + +b. Fixed a bug where `declare +f' could potentially turn off the function + attribute. + +c. Restored bash-4.4 pathname expansion behavior when a word to be expanded had + only backslashes, not any of the other globbing characters. This came after + an extensive POSIX group discussion (interp #1234). + +d. There are more changes to avoid performing word expansions multiple times on + arithmetic expressions. + +e. Fixed a bug with alias expansion when the alias ends with a TAB. + +f. Fixed a bug that caused programmable completion to return an error if the + shell function name supplied as an argument to `complete -F' was invalid. + +g. There are several fixes to buffer overflows found as the result of fuzzing + with random input. + +h. Fixed a bug that caused the edit-and-execute-command editing command to + start with the previous history line if invoked on an empty line. + +i. Fixed a bug that potentially caused `bind --help' to change readline's + output stream. + +j. Turning off posix mode now restores the vi-insertion mode binding for TAB + that was in effect when posix mode was enabled. + +k. Restore the previous state of job control being enabled if `exec' fails in + an interactive shell. + +l. Fixed a bug that caused the terminal's process group to be set incorrectly + if job control was turned off before starting an interactive shell. + +m. Fixed a bug that caused a crash when HISTSIZE=0. + +n. Fixed a word expansion bug that caused null strings on the rhs of expansions + to be discarded incorrectly. + +o. History list management does a better job of handling the situation where + the number of history entries from the current shell session is greater than + the number of entries in the history list. + +p. Fixed a bug that caused the `fc' builtin to attempt to dereference a newly- + freed history entry. + +q. Fixed a bug that made the `Q' variable transformation not work well with + `set -u'. + +r. There are several word expansion fixes for expanding $* and $@ in contexts + where word splitting is not going to be performed, since each positional + parameter must expand to a separate word. + +s. Fixed a bug that could cause ^D to exit bash immediately even if there were + stopped jobs. + +t. Fixed a bug with double-quoting and backslash-quoting strings containing + multibyte characters for reuse. + +u. Fixed a bug that caused the line number to be reported incorrectly if the + shell executed a (command) subshell. + +v. Fixed a bug that caused the shell to fail to reap process substitutions + when they went out of scope, which had unpredictable results. + +w. Fixed a bug that caused null strings in arguments to [[ conditional command + operators to compare incorrectly. + +x. Changed the behavior of `wait' without arguments to only wait for background + processes the current shell instance started, not background children it may + have inherited. + +y. Fixed a bug that could cause command substitution to leave file descriptors + open if the shell received many SIGINTs. + +z. Bash now behaves better if the `**' filename expansion operator encounters a + symbolic link to a directory, avoiding more cases where it might return + duplicate pathnames. + +aa. Programmable completion now canonicalizes directory names in the same way + as bash word completion, so `..' is handled consistently. + +bb. Fixed a bug when using RETURN as the delimiter to the read builtin; it + caused readline to set the binding for RETURN incorrectly. + +cc. Fixed a bug that caused `history -d' to delay printing an out-of-range + error message. + +dd. Fixed a bug with `bash -c command' where `command' ends with an expanded + alias. + +ee. Fixed a bug that could result in `history -n' adding spurious line feeds to + commands in the history list. + +ff. The $RANDOM random number generator now XORs the top and bottom halves of + the internal 32-bit value to introduce more randomness. Setting the shell + compatibility level to 50 or lower undoes this. + +gg. Fixed several problems caused by running the DEBUG trap on simple commands + executed as part of a pipeline. + +ii. Fixed a bug that didn't allow `bind -r' to remove the binding for \C-@. + +jj. Several fixes to the bash-backward-shellword bindable readline command to + behave better when at the last character on the line. + +kk. If `set -x' is enabled, bash doesn't print a command twice if it's run by + the `command' builtin. + +ll. Fixed a bug with printing function definitions containing here documents. + +mm. Fixed a bug that could cause the `bind' builtin to set $? to -1. + +nn. Fixed a bug that didn't reset the timezone information correctly when the + TZ variable was unset. + +oo. Fixed several issues with assigning an associative array variable using a + compound assignment that expands the value of the same variable. + +pp. Fixed several places where the shell set $? without setting PIPESTATUS. + +qq. Fixed a problem with glob bracket expressions containing invalid character + classes, collating symbols, or equivalence classes -- they should not + require a closing right bracket. + +rr. Fixed a bug where running a builtin in a subshell did not run the EXIT trap. + +ss. Fixed several problems with posix-mode variable assignments preceding + shell function calls and posix special builtins, so that they create and + modify variables at the current scope. + +tt. Fix history initialization so `bash +o history' works as expected. + +uu. Fixed a bug in the bindable edit-and-execute-command command that could + interfere with the shell's parsing state. + +vv. Fixed an issue with nested traps running command substitutions in command + lines with command substitutions. + +ww. Fixed a bug with globbing pathnames that contain invalid multibyte + characters (sequences that don't correspond to a character in the current + locale). + +xx. Fixed a bug that caused the shell not to exit if a function definition + failed while errexit was enabled. + +yy. Process substitution processes now get their input from /dev/null, since + they are asynchronous, not interactive, and not jobs. + +zz. Setting nocaseglob no longer turns on case-insensitive regexp matching. + +aaa. Fixed a bug that resulted in extra blank lines being added to some history + entries containing here-documents. + +bbb. Fixed a bug that resulted in incorrect matching of some patterns in word + expansion if they expanded to the empty string. + +ccc. Fixed here-string expansion so it behaves the same as expansion of the + rhs of an assignment statement. + +ddd. Changed here-document parsing to no longer allow the end of the here + document to delimit a command substitution. + +eee. Several fixes to history expansion: multiple :p modifiers work, a ^ word + designator works as part of a range, and a `-' is treated as part of a + search string if it immediately follows a `!'. + +fff. Fixed a bug in pattern substitution with null matches in a string + containing multibyte characters. + +ggg. Unbinding a key sequence bound with `bind -x' now removes the key sequence + from the additional keymap `bind -x' uses. + +hhh. Fixed a bug with command start detection for completion so that it doesn't + mistake brace expansion for the start of a command. + +iii. Fixed a bug that caused local variables with the same name as variables + appearing in a function's temporary environment to not be marked as local. + +jjj. Fixed a bug that could cause SIGCHLD to be blocked when executing return + or exec in the rightmost pipeline element with lastpipe enabled. + +kkk. Fixed a bug that could result in commands without the execute bit set + being added to the command hash table. + +lll. Fixed a bug that allowed non-digits to follow the `#' in a `base#number' + integer constant. + +mmm. Fixed a bug that made `time -- command' attempt to execute `--'. + +nnn. Fixed a couple of bugs with variable transformation using arrays + subscripted with `*' or `@'. + +ooo. A failure to create a variable using `declare' in a function no longer + causes the function to return immediately. + +ppp. Fixed a bug that could cause the := word expansion to add a non-null + value if attempting to assign a null string when double-quoted. + +qqq. Fixed a bug that could cause backslashes quoting double quotes in here + document bodies to not be removed when expanding the body. + +rrr. Fixed a bug that caused commands following a subshell while the shell is + reading input from stdin but not interactive, while job control is + enabled, to be executed twice. + +sss. Fixed a bug where receiving SIGTERM from a different process while + readline was active could cause the shell to terminate. + +ttt. In posix mode, running a trap after the read builtin now sees the exit + status of the read builtin (e.g., 130 after a SIGINT) in $?. + +uuu. Fixed a bug with nameref variables referencing array subscripts used in + arithmetic expressions. + +vvv. Fixed a bug that caused the pipeline process group id to be reset in the + middle of a command list run by a shell started to run a command + substitution. + +www. Restricted shells can no longer read and write history files with pathnames + containing slashes. + +xxx. Fixed a couple of problems with 0 and -0 used as arguments to `fc' when + not listing commands from the history. + +yyy. When `test' is supplied four or more arguments, treat an argument that + looks like an operator (e.g., -e), but is in a place where only a string + is valid, as a string, as it would be when using the POSIX rules, instead + of an operator with a missing argument. + +zzz. There is no `compat50' shopt option. Changes to the shell compatibility + level should use the BASH_COMPAT variable. + +aaaa. Redirection failures with compound commands are now treated as errors + that cause the shell to exit if `errexit' is enabled. + +bbbb. Redirection failure error messages no longer expand the word in the + redirection again. + +cccc. History expansion is no longer performed while parsing a here-document + inside a command substitution. + +2. Changes to Readline + +a. There are a number of fixes that were found as the result of fuzzing with + random input. + +b. Changed the revert-all-at-newline behavior to make sure to start at the end + of the history list when doing it, instead of the line where the user hit + return. + +c. When parsing `set' commands from the inputrc file or an application, readline + now allows trailing whitespace. + +d. Fixed a bug that left a file descriptor open to the history file if the + file size was 0. + +e. Fixed a problem with binding key sequences containing meta characters. + +f. Fixed a bug that caused the wrong line to be displayed if the user tried to + move back beyond the beginning of the history list, or forward past the end + of the history list. + +g. If readline catches SIGTSTP, it now sets a hook that allows the calling + application to handle it if it desires. + +h. Fixed a redisplay problem with a prompt string containing embedded newlines. + +i. Fixed a problem with completing filenames containing invalid multibyte + sequences when case-insensitive comparisons are enabled. + +j. Fixed a redisplay problem with prompt strings containing invisible multibyte + characters. + +k. Fixed a problem with multibyte characters mapped to editing commands that + modify the search string in incremental search. + +l. Fixed a bug with maintaining the key sequence while resolving a bound + command in the presence of ambiguous sequences (sequences with a common + prefix), in most cases while attempting to unbind it. + +m. Fixed several buffer overflows found as the result of fuzzing. + +n. Reworked backslash handling when translating key sequences for key binding + to be more uniform and consistent, which introduces a slight backwards + incompatibility. + +o. Fixed a bug with saving the history that resulted in errors not being + propagated to the calling application when the history file is not writable. + +p. Readline only calls chown(2) on a newly-written history file if it really + needs to, instead of having it be a no-op. + +q. Readline now behaves better when operate-and-get-next is used when the + history list is `full': when there are already $HISTSIZE entries. + +r. Fixed a bug that could cause vi redo (`.') of a replace command not to work + correctly in the C or POSIX locale. + +s. Fixed a bug with vi-mode digit arguments that caused the last command to be + set incorrectly. This prevents yank-last-arg from working as intended, for + example. + +3. New Features in Bash + +a. `bind -x' now supports different bindings for different editing modes and + keymaps. + +b. Bash attempts to optimize the number of times it forks when executing + commands in subshells and from `bash -c'. + +c. Here documents and here strings now use pipes for the expanded document if + it's smaller than the pipe buffer size, reverting to temporary files if it's + larger. + +d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut + +e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL + and those that were SIG_IGN when the shell starts. + +f. The shell now expands the history number (e.g., in PS1) even if it is not + currently saving commands to the history list. + +g. `read -e' may now be used with arbitrary file descriptors (`read -u N'). + +h. The `select' builtin now runs traps if its internal call to the read builtin + is interrupted by a signal. + +i. SRANDOM: a new variable that expands to a 32-bit random number that is not + produced by an LCRNG, and uses getrandom/getentropy, falling back to + /dev/urandom or arc4random if available. There is a fallback generator if + none of these are available. + +j. shell-transpose-words: a new bindable readline command that uses the same + definition of word as shell-forward-word, etc. + +k. The shell now adds default bindings for shell-forward-word, + shell-backward-word, shell-transpose-words, and shell-kill-word. + +l. Bash now allows ARGV0 appearing in the initial shell environment to set $0. + +m. If `unset' is executed without option arguments, bash tries to unset a shell + function if a name argument cannot be a shell variable name because it's not + an identifier. + +n. The `test -N' operator uses nanosecond timestamp granularity if it's + available. + +o. Bash posix mode now treats assignment statements preceding shell function + definitions the same as in its default mode, since POSIX has changed and + no longer requires those assignments to persist after the function returns + (POSIX interp 654). + +p. BASH_REMATCH is no longer readonly. + +q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n' + or `wait' without arguments. + +r. Sorting the results of pathname expansion now uses byte-by-byte comparisons + if two strings collate equally to impose a total order; the result of a + POSIX interpretation (#963 and #1070). + +s. Bash now allows SIGINT trap handlers to execute recursively. + +t. Bash now saves and restores state around setting and unsetting posix mode, + instead of having unsetting posix mode set a known state. + +u. Process substitution is now available in posix mode. + +v. READLINE_MARK: a new variable available while executing commands bound with + `bind -x', contains the value of the mark. + +w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell + startup. + +x. `test -v N' can now test whether or not positional parameter N is set. + +y. `local' now honors the `-p' option to display all local variables at the + current context. + +z. The `@a' variable transformation now prints attributes for unset array + variables. + +aa. The `@A' variable transformation now prints a declare command that sets a + variable's attributes if the variable has attributes but is unset. + +bb. `declare' and `local' now have a -I option that inherits attributes and + value from a variable with the same name at a previous scope. + +cc. When run from a -c command, `jobs' now reports the status of completed jobs. + +dd. New `U', `u', and `L' parameter transformations to convert to uppercase, + convert first character to uppercase, and convert to lowercase, + respectively. + +ee. PROMPT_COMMAND: can now be an array variable, each element of which can + contain a command to be executed like a string PROMPT_COMMAND variable. + +ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource. + +gg. Associative arrays may be assigned using a list of key-value pairs within + a compound assignment. Compound assignments where the words are not of + the form [key]=value are assumed to be key-value assignments. A missing or + empty key is an error; a missing value is treated as NULL. Assignments may + not mix the two forms. + +hh. New `K' parameter transformation to display associative arrays as key- + value pairs. + +ii. Writing history to syslog now handles messages longer than the syslog max + length by writing multiple messages with a sequence number. + +jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since + they are nominally integer variables. LINENO is not an integer variable. + +kk. Bash temporarily suppresses the verbose option when running the DEBUG trap + while running a command from the `fc' builtin. + +ll. `wait -n' now accepts a list of job specifications as arguments and will + wait for the first one in the list to change state. + +mm. The associative array implementation can now dynamically increase the + size of the hash table based on insertion patterns. + +nn. HISTFILE is now readonly in a restricted shell. + +oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit + systems. + +4. New Features in Readline + +a. If a second consecutive completion attempt produces matches where the first + did not, treat it as a new completion attempt and insert a match as + appropriate. + +b. Bracketed paste mode works in more places: incremental search strings, vi + overstrike mode, character search, and reading numeric arguments. + +c. Readline automatically switches to horizontal scrolling if the terminal has + only one line. + +d. Unbinding all key sequences bound to a particular readline function now + descends into keymaps for multi-key sequences. + +e. rl-clear-display: new bindable command that clears the screen and, if + possible, the scrollback buffer (bound to emacs mode M-C-l by default). + +f. New active mark and face feature: when enabled, it will highlight the text + inserted by a bracketed paste (the `active region') and the text found by + incremental and non-incremental history searches. This is tied to bracketed + paste and can be disabled by turning off bracketed paste. + +g. Readline sets the mark in several additional commands. + +h. Bracketed paste mode is enabled by default. + +i. Readline tries to take advantage of the more regular structure of UTF-8 + characters to identify the beginning and end of characters when moving + through the line buffer. + +j. The bindable operate-and-get-next command (and its default bindings) are + now part of readline instead of a bash-specific addition. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-release, and +the previous version, bash-5.0-rc1. + +1. Changes to Bash + +a. Tilde expansion isn't performed on indexed array subscripts, even for + backwards compatibility. + +b. The shell doesn't exit in posix mode if the eval builtin gets a parse + error when run by the command builtin. + +c. Fixed a bug that caused a shell comment in an alias to not find the end + of the alias properly. + +d. Reverted a change from April, 2018 that caused strings containing + backslashes to be flagged as glob patterns. + +2. Changes to Readline + +3. New Features in Bash + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-rc1, and +the previous version, bash-5.0-beta2. + +1. Changes to Bash + +a. Fix to initial word completion detection code. + +b. Fixed a bug that caused issues with assignment statements containing ^A in + the value assigned when IFS contains ^A. + +c. Added a fallback to fnmatch() when strcoll can't correctly deal with + bracket expression character equivalence classes. + +d. Fixed a bug that caused $BASH_COMMAND to contain the trap handler command + when running a trap handler containing [[ or (( commands. + +e. Fixed a bug that caused nameref assignments in the temporary environment + to potentially create variables with invalid names. + +f. Fixed a bug that caused `local -' to turn off alias expansion in scripts. + +g. Fixed a parser issue with a command string containing EOF after an invalid + command as an argument to a special builtin not causing a posix-mode shell + to exit. + +h. Made a slight change to the FNV-1 string hash algorithm used for associative + arrays (corrected the initial seed). + +2. Changes to Readline + +3. New Features in Bash + +a. The `select' command now supports command forms without a word list + following `in'. + +4. New Features in Readline + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-beta2, and +the previous version, bash-5.0-beta. + +1. Changes to Bash + +a. Fixed a bug that could cause a seg fault while parsing a subshell command + inside a command substitution. + +b. Fixed several small memory leaks uncovered by coverity. + +c. Fixed a problem with command substitution inside an interactive shell that + could cause the parent to receive a SIGHUP. + +d. Fixed a problem with using `*' and `@' as subscripts when assigning values + to an associative array with assoc_expand_once enabled. + +e. Fixed a bug that could cause a huge memory allocation when completing a + word beginning with an invalid tilde expansion. + +f. Cleaned up some incompatibilities with bash-4.4 when expanding indexed array + subscripts used in arithmetic expansions when assoc_expand_once is enabled. + +g. The ${parameter@a} expansion will display attributes even if `parameter' is + unset. + +h. Fixed a bug that caused the output of `set' to cut off some variables before + printing the value. + +i. Treat a failure to assign a variable when using the ${x:=value} expansion + as an expansion error, so non-interactive posix-mode shells exit + +j. Fixed a problem when expanding $* in a context where word splitting is not + performed when IFS is NULL. + +k. Temp files used to store here documents are forced readable, no matter what + the user's umask says. + +l. Fixed a problem where an interrupted brace expansion could cause the shell + to attempt to free an invalid memory location. + +m. Make sure to check for any terminating signals after running a trap + handler; don't wait until the next time we process traps. + +n. Fixed a bug that caused "return" to act like a special builtin with respect + to variable assignments even when preceded by "command". + +o. POSIX-mode shells now return failure if the cd builtin fails due to the + absolute directory name being longer than PATH_MAX, instead of trying + again with a relative pathname. + +p. Fixed a problem with FUNCNAME occasionally being visible when not executing + a shell function. + +q. Fixed a problem with the expansions performed on the WORD in the case + command. + +r. Fixed a slight POSIX compatibility when removing "IFS whitespace" during + word splitting and the read builtin. + +s. Fixed a problem with expanding an array with subscript `*' when all the + elements expand to the empty string, and making sure the expansion honors + the `:' specifier. + +2. Changes to Readline + +a. Fixed a bug with adding multibyte characters to an incremental search string. + +b. Fixed a bug with redoing text insertions in vi mode. + +c. Fixed a bug with pasting text into an incremental search string if bracketed + paste mode is enabled. ESC cannot be one of the incremental search + terminator characters for this to work. + +d. Fixed a bug with anchored search patterns when performing searches in vi + mode. + +3. New Features in Bash + +a. Associative and indexed arrays now allow subscripts consisting solely of + whitespace. + +b. `checkwinsize' is now enabled by default. + +c. The `localvar_unset' shopt option is now visible and documented. + +d. The `progcomp_alias' shopt option is now visible and documented. + +e. The signal name processing code now understands `SIGRTMIN+n' all the way + up to SIGRTMAX. + +f. There is a new `seq' loadable builtin. + +g. Trap execution now honors the (internal) max invocations of `eval', since + traps are supposed to be executed as if using `eval'. + +h. The $_ variable doesn't change when the shell executes a command that forks. + +i. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though + conforming applications aren't supposed to use them. + +j. POSIX mode now enables the `shift_verbose' option. + +4. New Features in Readline + +a. Readline now allows application-defined keymap names; there is a new public + function, rl_set_keymap_name(), to do that. + +b. The "Insert" keypad key, if available, now puts readline into overwrite + mode. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-beta, and +the previous version, bash-5.0-alpha. + +1. Changes to Bash + +a. Fixed a bug that allowed subshells to "inherit" enclosing loops -- this + is where POSIX says the subshell is not "enclosed" by the loop. + +b. Added more UTF-8-specific versions of multibyte functions, and optimized + existing functions if the current locale uses UTF-8 encoding. + +c. In POSIX mode, assignments preceding regular builtins should not persist + when the builtin completes. + +d. Added additional checks to special array assignment (e.g., BASH_ALIASES) + so it can't be used to bypass validity checks performed in other places. + +e. The `!!' history expansion now refers to the previous history entry as + expected, even if used on the second or subsequent line of a multi-line + history entry. + +f. Fixed a bug that could cause the shell to dereference a NULL pointer if + the environment (`environ') is set to NULL. + +g. Bash uses slightly better integer overflow handling for brace sequence + expansion on systems where ints are 32 bits and intmax_t is 64 bits. + +h. Fixed a bug setting attributes for a variable named as an argument to + `declare' that also appears as a nameref in the temporary environment. + +i. Fixed several bugs that could cause assignments to namerefs to create + variables with invalid names. + +j. Fixed a bug that could result in the SIGINT handler being set incorrectly + in asynchronous subshells. + +k. Fixed a bug that could cause `bash -t' to not execute the specified command. + +l. Fixed several bugs that caused the shell to operate on the wrong variable + when using namerefs with the same name as a global variable in shell + functions. + +m. Internal changes to how the shell handles variables with invalid names in + the initial environment and to prevent variables with invalid names from + being added to the environment instead of passing them on to children. + +n. Changes to make sure that an expansion that results in a quoted null string + is reflected in the expansion, even if the word expands to nothing. + +o. Changes to make sure that $* and ${array[*]} (and $@/${array[@]}) expand + the same way after the recent changes for POSIX interpretation 888. + +p. Saving and restoring the positional parameters at function entry and exit + is considerably more efficient; noticeably so when there are large numbers + of positional parameters. + +q. Fixed a bug that caused `lastpipe' and `pipefail' to return an incorrect + status for the pipeline if there was more than one external command in a + loop body appearing in the last pipeline element. + +r. Fixed a bug that caused value conversion errors with the printf builtin's + %u and %f conversion specifications and invalid constants. + +2. Changes to Readline + +a. Added more UTF-8-specific versions of multibyte functions, and optimized + existing functions if the current locale uses UTF-8 encoding. + +b. Fixed a problem with bracketed-paste inserting more than one character and + interacting with other readline functions. + +c. Fixed a bug that caused the history library to attempt to append a history + line to a non-existent history entry. + +d. If using bracketed paste mode, output a newline after the \r that is the + last character of the mode disable string to avoid overwriting output. + +e. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better + handle multibyte characters. + +f. Fixed a redisplay problem that caused an extra newline to be generated on + accept-line when the line length is exactly the screenwidth. + +3. New Features in Bash + +a. Bash no longer allows variable assignments preceding a special builtin that + changes variable attributes to propagate back to the calling environment + unless the compatibility level is 44 or lower. + +b. You can set the default value for $HISTSIZE at build time in config-top.h. + +c. The `complete' builtin now accepts a -I option that applies the completion + to the initial word on the line. + +d. The internal bash malloc now uses mmap (if available) to satisfy requests + greater than 128K bytes, so free can use mfree to return the pages to the + kernel. + +e. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup + unless it's in debugging mode, as the documentation has always said, but + will dynamically create them if a script references them at the top level + without having enabled debugging mode. + +f. The localvar_inherit option will not attempt to inherit a value from a + variable of an incompatible type (indexed vs. associative arrays, for + example). + +g. The `globasciiranges' option is now enabled by default; it can be set to + off by default at configuration time. + +4. New Features in Readline + +a. The history expansion library now understands command and process + substitution and extended globbing and allows them to appear anywhere in a + word. + +b. The history library has a new variable that allows applications to set the + initial quoting state, so quoting state can be inherited from a previous + line. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-5.0-alpha, and +the previous version, bash-4.4-release. + +1. Changes to Bash + +a. Fixed a bug that could cause traps in background jobs to give the terminal + to the wrong process group. + +b. Fixed a bug that caused `kill -l 0' to print an out-of-range error. + +c. Fixed a problem that could result in here-documents being displayed in + the wrong order. + +d. Fixed a number of out-of-bounds and free memory read errors found via + fuzzing. + +e. Fixed a subshell inheritance problem that could cause a subshell to wait for + the wrong process. + +f. Fixed a bug that caused SHLVL to be incremented one too many times when + creating subshells. + +g. A job dying due to SIGINT can now interrupt sourcing a file in a shell with + job control enabled. + +h. Fixed a spurious warning about unterminated ${ or $( constructs during + word completion. + +i. The shell no longer runs traps if a signal arrives while reading command + substitution output. + +j. Fixed an arithmetic expansion error that could allow ++var++ as valid + syntax. + +k. Fixed an error that allowed out-of-bounds references to the directory stack. + +l. The shell does a better job of saving multi-line history entries with + embedded comments. + +m. Fixed a bug that could cause quoted bracket expressions in regular expression + arguments to `[[' to not match correctly. + +n. Fixed a bug that could cause an IFS character in a word to result in an + extra '\001' character in the expansion. + +o. A trailing backslash in a glob pattern can match a trailing backslash in the + string. + +p. Fixed a memory leak in the process creation code path when job control is + enabled. + +q. Fixed a bug that caused `printf' to output broken surrogate pairs for + Japanese locales. + +r. Fixed a bug that caused a SIGINT generated from `kill' in a dot script to + kill an interactive shell. + +s. Fixed a bug that could cause the `read' builtin to not fully read a + multibyte character. + +t. Fixed a bug that could cause identifiers to be evaluated in conditional + arithmetic expressions even when evaluation is suppressed. + +u. Fixed a bug that could result in command substitution, when executed in a + context where word splitting is not performed, to leave a stray '\001' + character in the string. + +v. Fixed a bug that could cause history expansion to be disabled in a non- + interactive shell even if `-o histexpand' is supplied at startup. + +w. Fixed a bug that caused `read -N' to strip leading whitespace IFS characters. + +x. Fixed a bug that caused spurious tilde expansion in arithmetic expressions. + +y. If indirect expansion attempts to indirectly reference through an unset + variable, report an error. + +z. Added a guard to prevent the shell from looping while receiving an endless + stream of SIGTTIN at shell startup. + +aa. Fixed a bug with parsing here documents inside a command substitution when + looking for the closing delimiter. + +bb. Fixed a bug that caused printf to not quote all characters in the + current locale when using the `%q' format specifier. + +cc. Fixed a bug with bash's internal buffered I/O system that caused the input + pointer to not be reset when read(2) returned an EOF. + +dd. Bash now installs its SIGWINCH signal handler with SA_RESTART, so it will + not interrupt open/read/write system calls. + +ee. The ERR trap now reports line numbers more reliably. + +ff. The shell no longer tries to manipulate the terminal process group if a + command or process substitution is killed by SIGTERM when job control is + enabled. + +gg. Fixed a bug that caused extglob patterns to match filenames beginning with + a period. + +hh. File descriptors open for writing to here documents are no longer available + to subshells. + +ii. Make sure word completion doesn't perform command or process substitution. + +jj. Fixed a bug with parsing $$'...' inside a command substitution. + +kk. Fixed a bug that caused bash to remove backslash-newline pairs from the + body of a here-document with a quoted delimiter inside a command + substitution. + +ll. Fixed a bug that could cause the shell to hang when adding a pid to the + table of background process exit statuses. + +mm. Fixed a bug that could cause 0x01 characters to be doubled in the output + of process substitution. + +nn. Restricted shells now clear the hash table before making the PATH variable + read-only. + +oo. There are a number of changes to the expansion of $* and $@ in contexts + where word splitting does not occur (quoted and unquoted), with IFS set + to NULL or a non-standard value, mostly to deal with the consequences of + the behavior defined in Posix interpretation 888. + +pp. There are a number of changes to nameref variable handling to avoid + creating variables with invalid names. + +qq. A non-interactive posix mode shell no longer exits when an assignment + statement fails if the assignment is utimately being performed by the + `command' builtin. + +rr. When using character class names for globbing, don't allow case + insensitivity, even if nocaseglob is enabled. + +ss. Fixed a bug that allowed some redirections to stay in place if a later + redirection failed. + +tt. Fixed a bug in how command and process substitutions are recognized within + other parameter expansions. + +uu. Fixed a bug that caused bash to loop under certain circumstances when + performing arithmetic expansion on a variable whose value is an invalid + expression. + +vv. Fixed a bug that could cause bash to expand aliases inappropriately while + parsing compound commands like `case'. + +ww. Fixed a bug that could cause `read -N' to fail to read complete multibyte + characters, even when the sequences are incomplete or invalid, with or + without readline. + +xx. Fixed a bug that could cause `case' to fail to match patterns containing + 0x01 characters. + +yy. Fixed a bug that caused exported functions to contain stray 0x01 characters. + +zz. Fixed some inconsistencies with how the history number is handled in the + various prompt strings. + +aaa. Fixed a bug that could cause a core dump if READLINE_LINE was unset + inside a shell function bound to a key sequence with `bind -x'. + +bbb. Fixed a bug that could cause bash to not read a token terminator correctly + if a command substitution was used inside an arithmetic `for' command. + +ccc. Fixed problems that could occur with a fatal arithmetic expansion error + in a context (like prompt expansion) where you can't jump back to the + top level. + +ddd. Expression errors in arithmetic `for' commands are treated more like + shell syntax errors. + +eee. Fixed a parser synchronization error resulting from a syntax error + followed immediately by an EOF. + +fff. When executing a shell function, the first line in the function ($LINENO) + is line 1 instead of line 0, as Posix requires. + +ggg. In Posix mode, bash will canonicalize the value of PWD it inherits from + the environment and use that to set its idea of the current directory. + +hhh. If LINENO is exported, bash needs to regenerate its value each time it + constructs the environment. + +iii. Fixed a bug with restoring the SIGINT handler when using `wait -n'. + +jjj. Make sure the `coproc' command returns an appropriate status if the NAME + argument is invalid. + +kkk. Fixed a problem with arithmetic expressions containing array references + that contain arithmetic expressions with syntax errors. + +lll. The `select' command and help builtin will use $COLUMNS before the window + size returned from the kernel as the terminal width. + +mmm. `read -n 0' and `read -N 0' now try a zero-length read in an attempt to + detect file descriptor errors. + +nnn. The `read' builtin now does a better job of acting on signals that don't + interrupt read(2). + +ooo. Fixed some cases where `printf -v' did not return failure status on a + variable assignment error. + +ppp. Fixed temporary environment propagation back to the current environment + so that it doesn't happen for special builtins run by the `command' + builtin. + +qqq. Fixed a bug when searching for the end of a here-document delimiter in a + command substitution. + +rrr. Fixed a bug that could cause `cd ${DIRSTACK[0]}' to fail. + +sss. Fixed a bug that could cause reserved words to not be recognized in a + for statement without the `in' inside a command substitution. + +ttt. Fixed a bug that could cause a double-free in a timed command with an + expansion error. + +uuu. Fixed a bug that could cause a core dump if a script switches from a UTF-8 + locale to a different locale after displaying a lone surrogate character. + +vvv. Fixed cases where bash prematurely removed FIFOs attached to process + substitutions. + +www. Fixed a problem with calculating the size of the table that stores exit + statuses from background processes when the child process resource limit + is very large. + +xxx. Fixed a memory leak with functions using `return' when using FIFOs for + standard input. + +yyy. `wait' without arguments attempts to wait for all active process + substitution processes. + +zzz. Fixed a bug where an indirect parameter was subjected to word splitting + when trying to find the indirected variable name. + +aaaa. Fixed a bug that could allow restricted shell users to add commands to + the hash table. + +bbbb. When using the `!(patlist)' extended globbing operator, a filename + beginning with a `.' that doesn't match any of the patterns is not + returned as a match if leading dots must be matched explicitly. + +cccc. Fixed a bug that could cause line number and source file information for + a function definition to be incorrect if there are multiple definitions. + +dddd. Fixed a bug that could cause builtins like `readonly' to behave + differently when applied to arrays and scalar variables within functions. + +eeee. Fixed a bug that could cause alias expansion to add an extra space to + a quoted string that begins outside the alias expansion. + +ffff. Fixed a bug that could result in unwanted alias expansion after timing + the null command. + +gggg. Fixed a bug that could cause a core dump if a timestamp in a history + file overflowed a time_t. + +hhhh. Restricted shells can no longer redirect from /dev/tcp or /dev/udp, since + the kernel calls make those file descriptors read-write. + +iiii. Fixed a problem with splitting double-quoted words for programmable + completion when the double quote immediately follows another word + delimiter. + +jjjj. Fixed a bug resulting in a use-after-free if two file descriptors share + the same input buffer. + +kkkk. The error message resulting from ${x:?} and ${x?} now differs depending + on whether the variable is null or unset. + +llll. In Posix mode, the shell exits if a variable assignment fails and precedes + an empty simple command (after expansion). + +mmmm. Fixed a timing problem with SIGALRM that could cause the read builtin to + drop characters. + +nnnn. Added code to deal with kill(2) failing to send the shell a fatal signal + due to Linux pid namespace peculiarities. + +oooo. Fixed a bug that made \C-@ (NUL) unusable in key sequences used for + `bind -x' commands. + +pppp. Fixed a bug that could cause SIGINT recursion when running an external + command in a trap the shell takes after a command exits due to SIGINT. + +qqqq. Make sure the shell turns off job control before running the command- + not-found handle, so the command doesn't try to manipulate process + groups. + +rrrr. Fixed a problem with timing process substitutions that caused the shell + to print timing information for the calling command. + +ssss. Fixed a bug that caused backquotes in a here-document delimiter to mark + the delimiter as quoted (inhibiting expansion of the here-document + contents). + +tttt. Fixed several problems with 0x01 and 0x177 in case pattern lists and + conditional command pattern matches. + +uuuu. Fixed a bug that could cause the pattern matching engine to not recognize + locale-specific character classes. + +vvvv. The auto-configuration now tests for /dev/stdin and /dev/fd independently. + +wwww. The `globstar' code now skips over symbolic links to directories, + preventing them from being scanned twice. + +xxxx. When running `bind -x' commands, bash now sets READLINE_POINT based on + the number of characters in the readline line buffer, not the number of + bytes. + +yyyy. Fixed a problem that could cause recursive trap evaluation of the RETURN + trap when using `eval return'. + +zzzz. Fixed a bug with expanding 0x01 in an unquoted here-document. + +aaaaa. The process substitution code now closes and unlinks FIFOs when the + process on the other side exits, in order to prevent SIGPIPE or + waiting until a FIFO opened for read has a writer. + +bbbbb. Fixed a bug with recursive calls to the parser overwriting the token in + an {id}>foo construct. + +ccccc. After a Posix discussion, the pattern matching engine just skips over + invalid character classes in bracket expressions, instead of matching + them like individual characters in the expression. + +ddddd. Fixed a posix-mode problem with variable scoping when creating variables + from assignment statements preceding special builtins. + +eeeee. Fixed a bug that could cause patterns containing backslashes to not be + run through the pattern matching engine. + +fffff. Fixed a bug that could cause redirections to compound commands to not + be `undone' if the file descriptor in the redirection was closed when + the redirection was initially processed. + +ggggg. Fixed a bug that could cause buffer corruption when using `bind -x' in + a command execute as a result of a key binding installed by `bind -x'. + +2. Changes to Readline + +a. Added a guard to prevent nested macros from causing an infinite expansion + loop. + +b. Instead of allocating enough history list entries to hold the maximum list + size, cap the number allocated initially. + +c. Added a strategy to avoid allocating huge amounts of memory if a block of + history entries without timestamps occurs after a block with timestamps. + +d. Added support for keyboard timeouts when an ESC character is the last + character in a macro. + +e. There are several performance improvements when in a UTF-8 locale. + +f. Readline does a better job of preserving the original set of blocked + signals when using pselect() to wait for input. + +g. Fixed a bug that caused multibyte characters in macros to be mishandled. + +h. Fixed several bugs in the code that calculates line breaks when expanding + prompts that span several lines, contain multibyte characters, and contain + invisible character seqeuences. + +i. Fixed several bugs in cursor positioning when displaying lines with prompts + containing invisible characters and multibyte characters. + +j. When performing case-insensitive completion, Readline no longer sorts the + list of matches unless directed to do so. + +k. Fixed a problem with key sequences ending with a backslash. + +l. Fixed out-of-bounds and free memory read errors found via fuzzing. + +m. Fixed several cases where the mark was set to an invalid value. + +n. Fixed a problem with the case-changing operators in the case where the + lower and upper case versions of a character do not have the same number + of bytes. + +o. Handle incremental and non-incremental search character reads returning EOF. + +p. Handle the case where a failing readline command at the end of a multi-key + sequence could be misinterpreted. + +q. The history library now prints a meaningful error message if the history + file isn't a regular file. + +r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace + a multibyte character. + +s. The key binding code now attempts to remove a keymap if a key unbinding + leaves it empty. + +t. Fixed a line-wrapping issue that caused problems for some terminal + emulators. + +u. If there is a key bound to the tty's VDISCARD special character, readline + disables VDISCARD while it is active. + +v. Fixed a problem with exiting bracketed paste mode on terminals that assume + the bracketed paste mode character sequence contains visible characters. + +w. Fixed a bug that could cause a key binding command to refer to an + uninitialized variable. + +3. New Features in Bash + +a. The `wait' builtin can now wait for the last process substitution created. + +b. There is an EPOCHSECONDS variable, which expands to the time in seconds + since the Unix epoch. + +c. There is an EPOCHREALTIME variable, which expands to the time in seconds + since the Unix epoch with microsecond granularity. + +d. New loadable builtins: rm, stat, fdflags. + +e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment. + +f. When supplied a numeric argument, the shell-expand-line bindable readline + command does not perform quote removal and suppresses command and process + substitution. + +g. `history -d' understands negative arguments: negative arguments offset from + the end of the history list. + +h. The `name' argument to the `coproc' reserved word now undergoes word + expansion, so unique coprocs can be created in loops. + +i. A nameref name resolution loop in a function now resolves to a variable by + that name in the global scope. + +j. The `wait' builtin now has a `-f' option, which signifies to wait until the + specified job or process terminates, instead of waiting until it changes + state. + +k. There is a define in config-top.h that allows the shell to use a static + value for $PATH, overriding whatever is in the environment at startup, for + use by the restricted shell. + +l. Process substitution does not inherit the `v' option, like command + substitution. + +m. If a non-interactive shell with job control enabled detects that a foreground + job died due to SIGINT, it acts as if it received the SIGINT. + +n. The SIGCHLD trap is run once for each exiting child process even if job + control is not enabled when the shell is in Posix mode. + +o. A new shopt option: localvar_inherit; if set, a local variable inherits the + value of a variable with the same name at the nearest preceding scope. + +p. `bind -r' now checks whether a key sequence is bound before binding it to + NULL, to avoid creating keymaps for a multi-key sequence. + +q. A numeric argument to the line editing `operate-and-get-next' command + specifies which history entry to use. + +r. The positional parameters are now assigned before running the shell startup + files, so startup files can use $@. + +s. There is a compile-time option that forces the shell to disable the check + for an inherited OLDPWD being a directory. + +t. The `history' builtin can now delete ranges of history entries using + `-d start-end'. + +u. The `vi-edit-and-execute-command' bindable readline command now puts readline + back in vi insertion mode after executing commands from the edited file. + +v. The command completion code now matches aliases and shell function names + case-insensitively if the readline completion-ignore-case variable is set. + +w. There is a new `assoc_expand_once' shell option that attempts to expand + associative array subscripts only once. + +x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended + debugging mode is active. The old behavior of unconditionally setting them + is available as part of the shell compatibility options. + +y. The `umask' builtin now allows modes and masks greater than octal 777. + +z. The `times' builtin now honors the current locale when printing a decimal + point. + +aa. There is a new (disabled by default, undocumented) shell option to enable + and disable sending history to syslog at runtime. + +4. New Features in Readline + +a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as + Posix specifies (uses fnmatch(3) if available). + +b. There are new `next-screen-line' and `previous-screen-line' bindable + commands, which move the cursor to the same column in the next, or previous, + physical line, respectively. + +c. There are default key bindings for control-arrow-key key combinations. + +d. A negative argument (-N) to `quoted-insert' means to insert the next N + characters using quoted-insert. + +e. New public function: rl_check_signals(), which allows applications to + respond to signals that readline catches while waiting for input using + a custom read function. + +f. There is new support for conditionally testing the readline version in an + inputrc file, with a full set of arithmetic comparison operators available. + +g. There is a simple variable comparison facility available for use within an + inputrc file. Allowable operators are equality and inequality; string + variables may be compared to a value; boolean variables must be compared to + either `on' or `off'; variable names are separated from the operator by + whitespace. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-release, and +the previous version, bash-4.4-rc2. + +1. Changes to Bash + +a. Fixed a bug that could potentially result in a crash due to an integer + overflow. + +b. Fixed a bug in where commands printed due to `set -x' could be incorrectly + quoted if being printed in contexts where they haven't yet been expanded. + +c. Fixed several memory leaks. + +d. Fixed a bug that could potentially cause the terminal attributes to be + set incorrectly by a command run from a programmable completion. + +e. Fixed several potential buffer overflow issues in the word expansion code. + +2. Changes to Readline + +3. New Features in Bash + +4. New Features in Readline +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-rc2, and +the previous version, bash-4.4-beta2. + +1. Changes to Bash + +a. Fixed an out-of-bounds read in the redirection operator completion code. + +b. Fixed execution context so `until continue' doesn't disable execution for + subsequent commands. + +c. Fixed trap handling code so traps don't inherit a command's temporary + environment. + +d. Fixed a bug that resulted in incorrect line numbers when a function is + defined as part of another function's execution. + +e. Fixed a bug in the expansion of ${a[@]} in contexts where word splitting + is not performed and $IFS is not the default. + +f. Fixed a bug that caused ''"$@" to not expand to an empty argument when + there are no positional parameters. + +g. Fixed a bug that caused a shell compiled without job control to use the + incorrect exit status for builtin commands preceded by a command executed + from the file system that causes the shell to call waitpid(). + +h. Improved word completion for quoted strings containing unterminated command + substitutions with embedded double quotes. + +2. Changes to Readline + +a. Fixed a bug that caused mode strings to be displayed incorrectly if the + prompt was shorter than the mode string. + +3. New Features in Bash + +a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when + the nounset option is enabled no longer throws an unbound variable error. + +4. New Features in Readline + +a. New application-callable function: rl_pending_signal(): returns the signal + number of any signal readline has caught but not yet handled. + +b. New application-settable variable: rl_persistent_signal_handlers: if set + to a non-zero value, readline will enable the readline-6.2 signal handler + behavior in callback mode: handlers are installed when + rl_callback_handler_install is called and removed removed when a complete + line has been read. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-beta2, and +the previous version, bash-4.4-rc1. + +1. Changes to Bash + +a. Fixed a memory leak when processing ${!var[@]}. + +b. Fixed a bug that caused subshells to free trap strings associated with + inherited signals. + +c. Inheriting BASHOPTS from the environment now works to force actions + associated with enabling an option, instead of just marking the option + as enabled. + +d. Fixed a bug that allowed assignments to BASH_CMDS when the shell was in + restricted mode. + +e. Fixed a bug caused by an accidental omission of part of the original patch + for EXECIGNORE. + +e. Prompt expansion now quotes the results of the \s, \h, and \H expansions. + +f. Fixed a bug that caused parsing errors in command substitutions with + consecutive case statements separated by newlines. + +g. Updated logic used to decide whether bash is running inside an emacs + terminal emulator to work with future emacs versions. + +h. Fixed two extended pattern matching bugs caused by premature short- + circuiting. + +i. Fixed a memory leak in the code that removes duplicate history entries. + +j. There are a number of bug fixes to coproc, mapfile, declare, unset, + and assignment statements that prevent nameref variables from creating + and unsetting variables with invalid names. + +k. Fixed a bug that caused variables to be inadvertently marked as both an + associative and an indexed array. + +l. Fixed a bug that caused `bash -c' to not run a trap specified in the + command string. + +j. There are a number of bug fixes to coproc, mapfile, declare, and assignment + statements that prevent nameref variables from overwriting or modifying + attributes of readonly variables. + +k. Fixed a bug that caused command substitution to attempt to set the + terminal's process group incorrectly. + +l. Fixed a bug that could cause prompt string expansion to display error + messages when the `nounset' shell option is set. + +m. Fixed a bug that caused "$@" to not expand to an empty string under the + circumstances when Posix says it should ("${@-${@-$@}}"). + +n. Fixed several bugs caused by referencing nameref variables whose values + are names of unset variables (or names that are valid for referencing + but not assignment), including creating variables in the temporary + environment. + +o. Function tracing and error tracing are disabled if --debugger is supplied + at startup but the shell can't find the debugger start file. + +p. Fixed a bug when IFS is used as the control variable in a for statement. + +q. Fixed a bug with SIGINT received by a command substitution in an interactive + shell. + +r. The checks for nameref variable self-references are more thorough. + +s. Fixed several bugs with multi-line aliases. + +t. Fixed `test' to handle the four-argument case where $1 == '(' and + $4 == ')'. + +u. Fixed a bug in the expansion of $* in the cases where word splitting is + not performed. + +v. Fixed a bug in execution of case statements where IFS includes the + pattern matching characters. + +2. Changes to Readline + +a. When refreshing the line as the result of a key sequence, Readline attempts + to redraw only the last line of a multiline prompt. + +b. Fixed an issue that caused completion of git commands to display + incorrectly when using colored-completion-prefix. + +c. Fixed several redisplay bugs having to do with multibyte characters and + invisible characters in prompt strings. + +3. New Features in Bash + +a. Value conversions (arithmetic expansions, case modification, etc.) now + happen when assigning elements of an array using compound assignment. + +b. There is a new option settable in config-top.h that makes multiple + directory arguments to `cd' a fatal error. + +c. Bash now uses mktemp() when creating internal temporary files; it produces + a warning at build time on many Linux systems. + +4. New Features in Readline + +a. The default binding for ^W in vi mode now uses word boundaries specified + by Posix (vi-unix-word-rubout is bindable command name). + +b. rl_clear_visible_line: new application-callable function; clears all + screen lines occupied by the current visible readline line. + +c. rl_tty_set_echoing: application-callable function that controls whether + or not readline thinks it is echoing terminal output. + +d. Handle >| and strings of digits preceding and following redirection + specifications as single tokens when tokenizing the line for history + expansion. + +e. Fixed a bug with displaying completions when the prefix display length + is greater than the length of the completions to be displayed. + +f. The :p history modifier now applies to the entire line, so any expansion + specifying :p causes the line to be printed instead of expanded. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-rc1, and +the previous version, bash-4.4-beta. + +1. Changes to Bash + +a. Fixed several problems with bash completion not special-casing bash syntax + constructs. + +b. Fixed a bug that caused the mapfile builtin to not create array variables + when a variable of the same name appears in the temporary environment. + +c. Fixed a bug that caused prompt expansion to loop when PS1 contained a + syntax error. + +d. Fixed a bug that caused the ${array[@]@A} expansion to split the results + even when double-quoted. + +e. There is a new implementation of the code that saves the last CHILD_MAX + exited background pids so their status can be queried later. + +f. Bash-4.4 can now be configured and built on very old versions of Solaris 2. + +g. Fixed problems with --help support for several builtins. + +h. Fixed values added to BASH_SOURCE and BASH_LINENO for functions inherited + from the environment. + +i. Fixed a bug that caused background processes run from non-interactive shells + with job control enabled to place the terminal in the wrong process group + under certain circumstances. + +j. Fixed a bug that caused `fc' to return an incorrect exit status when + executing commands from the history list. + +k. Fixed a bug that caused the shell to exit when a process substitution + received a SIGINT when run in certain terminal emulators. + +l. EXECIGNORE now honors the setting of `extglob' when attempting to match + executable names. + +m. Fixed a bug where `return' used the wrong exit status when executed in a + DEBUG trap. + +n. Fixed a bug that caused a command containing a here-document and an escaped + newline to be stored in the history list incorrectly. + +o. Fixed a bug that caused set -e to be honored in cases of builtins invoking + other builtins when it should be ignored. + +p. Fixed a bug that caused `readonly' and `export' to create local array + variables when used within shell functions. + +q. Fixed a bug that allowed subshells begun to execute process substitutions + to have access to the command's temporary environment. + +r. Fixed a bug that could cause the shell to dump core when receiving a + SIGCHLD for which a trap has been set while running in posix mode. + +s. Fixed a bug that caused bash to not restore BASH_ARGC, BASH_ARGV, + BASH_SOURCE, BASH_LINENO, and FUNCNAME if the shell received a SIGINT + while reading commands from a file while executing `.'. + +t. Fixed a bug that caused the `-o history' option to have no effect when + supplied on the command line when starting a new shell. + +u. Fixed a bug that caused history expansions occurring in command + substitutions to not be performed. + +v. Fixed a bug that caused `eval' run in a non-interactive shell to disable + history expansion for the remainder of the shell script, even if the script + had previously enabled it. + +w. Fixed a bug that caused "$@" to not expand to multiple words when IFS is set + to the empty string. + +x. Fixed a bug that caused process and command substitution to inherit output + buffered in the stdio library but not written. + +y. Fixed a bug that caused a terminating signal received during `echo' to run + an exit trap in a signal handler context. + +z. Fixed a bug that caused a builtin command containing a process substitution + to return the wrong exit status. + +aa. Fixed a bug that caused `()' subshells with piped input to incorrectly + redirect the standard input of some of the commands in the subshell from + /dev/null. + +bb. The history builtin now uses more descriptive error messages for missing or + invalid timestamps. + +2. Changes to Readline + +a. The history file writing functions only attempt to create and use a backup + history file if the history file exists and is a regular file. + +b. Fixed an out-of-bounds read in readline's internal tilde expansion + interface. + +c. Fixed several redisplay bugs with prompt strings containing multibyte + and non-visible characters whose physical length is longer than the screen + width. + +d. Fixed a redisplay bug with prompt strings containing invisible characters + whose physical length exceeds the screen width and using incremental search. + +e. Readline prints more descriptive error messages when it encounters errors + while reading an inputrc file. + +f. Fixed a bug in the character insertion code that attempts to optimize + typeahead when it reads a character that is not bound to self-insert and + resets the key sequence state. + +3. New Features in Bash + +a. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial + environment. + +b. inherit_errexit: a new `shopt' option that, when set, causes command + substitutions to inherit the -e option. By default, those subshells disable + -e. It's enabled as part of turning on posix mode. + +c. New prompt string: PS0. Expanded and displayed by interactive shells after + reading a complete command but before executing it. + +d. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to + SIG_DFL when the shell is started, so they are set to SIG_DFL in child + processes. + +e. Posix-mode shells now allow double quotes to quote the history expansion + character. + +f. OLDPWD can be inherited from the environment if it names a directory. + +g. Shells running as root no longer inherit PS4 from the environment, closing + a security hole involving PS4 expansion performing command substitution. + +h. If executing an implicit `cd' when the `autocd' option is set, bash will + now invoke a function named `cd' if one exists before executing the `cd' + builtin. + +4. New Features in Readline + +a. If an incremental search string has its last character removed with DEL, + the resulting empty search string no longer matches the previous line. + +b. If readline reads a history file that begins with `#' (or the value of + the history comment character) and has enabled history timestamps, the + history entries are assumed to be delimited by timestamps. This allows + multi-line history entries. + +c. Readline now throws an error if it parses a key binding without a + terminating `:' or whitespace. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-beta, and +the previous version, bash-4.4-alpha. + +1. Changes to Bash + +a. Fixed two bugs that caused out-of-bounds reads when skipping over assignment + statements while finding the word on which to perform programmable + completion. + +b. Fixed a memory leak in programmable completion. + +c. Fixed a bug that could cause the shell to crash when interrupting the + wait builtin. + +d. Fixed a bug that caused ${!vvv@} to be interpreted as introducing the new + `@' operator. + +e. Fixed a bug that caused the && and || operators to be incorrectly optimized. + +f. The shell now undoes redirections before exiting the shell when the `-e' + option is enabled, and a shell function fails. + +g. History expansion now skips over the history expansion character in command + and process substitution. + +h. Fixed a bug that caused stray '\001' characters to be added to the output + of `declare -p'. + +i. Fixed a memory leak when processing declare commands that perform compound + array assignments. + +j. Fixed a bug that could cause the shell to crash when reading input from a + file and the limit on open file descriptors is high. + +k. Fixed a bug that caused the ERR and RETURN traps to be unset if they were + set in a shell function but unset previously. + +l. Fixed a bug that caused several signals to be ignored if `exec' failed in + an interactive shell. + +m. A posix-mode non-interactive shell now considers a parameter expansion error + to be a fatal error. + +n. The `time' command now prints timing statistics for failed commands when + the -e option is enabled. + +o. Fixed a bug that caused the shell to crash when attempting to indirectly + expand a shell variable with an invalid name. + +p. Fixed a bug that caused the shell to crash when running a trap containing + a process substitution. + +q. Bash now prints the keyword `function' before a function with the same name + as a reserved word when using `declare -f' to avoid parse errors when + reusing the output as input. + +r. Fixed a bug that caused the shell to crash when using declare -g to attempt + to redefine an existing global indexed array variable as an associative + array. + +s. Fixed a memory leak that occurred when interrupting brace expansions + generating a sequence. + +t. Fixed a bug that resulted in alias expansion in redirections. + +u. The `declare -a' and `declare -A' commands now print fewer warnings when + attempting to create and initialize an array at the same time, but + relying on word expansions to construct the compound assignment. + +v. The `help' builtin now behaves better in locales where each wide + character occupies more than one display column. + +w. The `read' builtin no longer has a possible race condition when a timeout + occurs. + +x. Fixed several expansion problems encountered when IFS="'". + +y. Fixed a problem with the expansion of $'\c?'. + +z. Bash no longer splits the expansion of here-strings, as the documentation + has always said. + +aa. Bash now puts `s' in the value of $- if the shell is reading from standard + input, as Posix requires. + +bb. Fixed a bug that caused the shell to crash if invoked with a NULL + environment. + +cc. The shell now only trusts an inherited value for $PWD if it begins with a + `/'. + +dd. Fixed a memory leak when creating local array variables and assigning to + them using compound assignment with the `declare' builtin. + +ee. Fixed a bug that could cause the shell to crash when processing nested here + documents inside a command substitution. + +ff. Array keys and values are now displayed using $'...' quoting where + appropriate. + +gg. Fixed a bug that could cause the shell to crash if the replacement string + in pattern substitution was NULL. + +hh. Fixed a bug that could cause the shell to crash if a command substitution + contained a non-fatal syntax error. + +ii. Fixed a bug that could cause the shell to crash if variable indirection + resulted in a NULL variable. + +jj. Fixed a bug that could cause the shell to crash if a long string contained + multiple unterminated parameter expansion constructs. + +kk. Improved the code that acts on SIGINT received while waiting for a child + process only if the child exits due to SIGINT. + +ll. $BASH_SUBSHELL now has more consistent values in asynchronous simple + commands. + +2. Changes to Readline + +a. Colored completion prefixes are now displayed using a different color, less + likely to collide with files. + +b. Fixed a bug that caused vi-mode character search to misbehave when + running in callback mode. + +c. Fixed a bug that caused output to be delayed when input is coming from a + macro in vi-mode. + +d. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing + a multi-key key sequence via a macro. + +e. Fixed a bug that caused problems with applications that supply their own + input function when performing completion. + +f. When read returns -1/EIO when attempting to read a key, return an error + instead of line termination back to the caller. + +g. Updated tty auditing feature based on patch from Red Hat. + +h. Fixed a bug that could cause the history library to crash on overflows + introduced by malicious editing of timestamps in the history file. + +3. New Features in Bash + +a. `make install' now installs the example loadable builtins and a set of + bash headers to use when developing new loadable builtins. + +b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when + loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows + loadable builtins to run initialization and cleanup code. + +c. There is a new BASH_LOADABLES_PATH variable containing a list of directories + where the `enable -f' command looks for shared objects containing loadable + builtins. + +d. The `complete_fullquote' option to `shopt' changes filename completion to + quote all shell metacharacters in filenames and directory names. + +e. The `kill' builtin now has a `-L' option, equivalent to `-l', for + compatibility with Linux standalone versions of kill. + +4. New Features in Readline +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.4-alpha, and +the previous version, bash-4.3-release. + +1. Changes to Bash + +a. A bug that caused pipelines to be corrupted while running the DEBUG trap + was fixed. + +b. A bug that accidentally omitted the `-R' unary operator from `test' was + fixed. + +c. A bug that could cause the shell to not restore the terminal's process + group on shell exit was fixed. + +d. Several changes were made to programmable completion to accommodate + assumptions made by the bash-completion package. + +e. Bash no longer inhibits C-style escape processing ($'...') while performing + pattern substitution word expansions. + +f. Fixed a bug that caused `return' executed from a trap handler to use the + wrong return status when one was not supplied as an argument. + +g. In Posix mode, defining a function with the same name as a special + builtin is now an error, fatal only when the shell is not interactive. + +h. Fixed a bug that caused compound array assignments to discard unset or null + variables used as subscripts, thereby making it appear as if the index was + not present. + +i. Fixed a bug that caused extended glob patterns to incorrectly match + filenames with a leading `.'. + +j. Fixed a bug involving sign extension when reallocating the input line + after a history expansion, causing segmentation faults. + +k. Bash now does a better job at identifying syntax errors during word + completion and tailoring completion appropriately. + +l. Bash now uses the current locale's decimal point in command timing output. + +m. Fixed a bug that caused segmentation faults while reading here documents if + PS2 contains a command substitution. + +n. There are several changes to how $@ is expanded when unquoted but in a + context where word splitting is not performed (e.g., on the rhs of an + assignment or in a conditional command). + +o. Bash now quotes command hash table entries that contain shell metacharacters + when displaying hash table contents. + +p. Fixed a potential file descriptor leak when dup2() fails while performing a + redirection. + +q. Fixed a bug that caused directory names evaluated during word completion to + be dequoted twice. + +r. Fixed several bugs which could result in indirect variable expansion and + namerefs creating variables with invalid names or referencing variables + set to the empty string. + +s. Fixed a bug that caused bash to not expand $0 in word expansions where it + should. + +t. Fixed a bug that caused bash to perform process substitution if <( + appeared inside an arithmetic context. + +u. Fixed a bug in extglob pattern parsing that caused slashes in the pattern + to be confused as directory names. + +v. Fixed several bugs with treatment of invisible variables (variables with + attributes that are unset because they have never been assigned values). + +w. Fixed a bug that caused the `read' builtin to not clean up readline's + state when using the -e and -t options together and the read timed out. + +x. Fixed a bug that caused the shell to exit with the wrong (but non-zero) + value if a command was not found or was not executable. + +y. Fixed a bug that caused the `time' reserved word to not be recognized as + such in all contexts where it should have been. + +z. Fixed a bug that caused the shell to close process substitution file + descriptors when executing a script without the `#!' leading line. + +aa. Fixed a typo that caused the `compat42' shell option to set the wrong + compatibility level. + +bb. The shell now handles process substitution commands with embedded + parentheses the same way as it does when parsing command substitution. + +cc. Fixed a bug that caused nested pipelines and the `lastpipe' shell option + to produce core dumps. + +dd. Fixed a bug that caused patterns containing `*' to match pathnames in cases + where slashes must be matched explicitly. + +ee. Fixed a problem with patterns containing `:' in colon-separated variables + like GLOBIGNORE. + +ff. Fixed a bug that caused indirect variable expansion using indexed arrays to + always use index 0. + +gg. Fixed a parsing problem that caused quoted newlines immediately following a + command substitution to be mishandled in certain cases. + +hh. Fixed a potential buffer overflow on systems without locale_charset or the + bash replacement. + +ii. Fixed a bug that caused background processes to modify the terminal's + process group under certain circumstances. + +jj. Asynchronous commands now always set $? to 0 and are not affected by + whether or not the command's exit status is being inverted. + +kk. Fixed a problem that caused a line ending with an escaped newline and + containingh a prior `eval' to be incorrectly parsed. + +ll. Fixed an issue with programmable completion and `!' in extglob patterns + used as arguments to `compgen -X'. + +mm. Word completion now treats the two-character token `>|' as requiring + filename expansion. + +nn. Bash no longer expands tildes in $PATH elements while in Posix mode. + +oo. Fixed a bug that caused bash to not clean up readline's state, including + the terminal settings, if it received a fatal signal while in a readline() + call (including `read -e' and `read -s'). + +pp. Fixed bug that caused importing shell functions from the environment to + execute additional commands following the function. + +qq. Fixed a bug that caused the parser to return a lookahead character pushed + back by a previous call, even when on another line. + +rr. Fixed a bug that caused many here-documents or many nested case statements + to overflow an internal stack. + +ss. Changed the way bash encodes exported functions for inclusion in the + environment to avoid name collisions with valid variable names and to + indicate that they are exported functions. + +tt. Fixed a bug that could result in an invalid memory access when processing + a here document delimited by end of file or end of string. + +uu. Fixed a bug that could cause an invalid memory access if a command was run + before initializing the job control framework. + +vv. When in Posix mode, bash prints shell function definitions as Posix + specifies them, without the leading `function' keyword. + +ww. The variable attribute display builtins no longer display variables with + invalid names that were imported from the environment. + +xx. Fixed a bug that could allow `break' or `continue' executed from shell + functions to affect loops running outside of the function. + +yy. Fixed a bug that could cause a restricted shell to attempt to import shell + functions from the environment. + +zz. The shell now allows double-quoted identifiers in arithmetic expressions. + +aaa. Fixed a bug that could allow scalar variables subscripted using [@] in + word expansions to be incorrectly quoted. + +bbb. The shell now makes sure to ignore SIGTSTP/SIGTTIN/SIGTTOU in child + processes if they were ignored at shell startup, even if job control is + in effect. + +ccc. Fixed a bug that could cause $* to be split on spaces when IFS is set to + the empty string. + +ddd. Posix says that expanding $* in a pattern context where the expansion is + double-quoted should not treat $* as if it were double quoted. + +eee. Bash now restores getopts' internal state between calls to getopts even if + a shell function declares a local copy of OPTIND. + +fff. Fixed a bug that could cause `history -r' or `history -n' to read identical + lines from the history file more than once. + +ggg. The commands executed by `bind -x' now redisplay at most the final line + of a multi-line prompt, and those commands may return 124 to indicate that + the entire prompt should be redrawn. + +hhh. Fixed a bug that could cause `mapfile' to create variables with invalid + names. + +iii. The shell only goes into debugging mode when --debugger is supplied if + the debugger initialization file is present. + +jjj. Fixed a bug that disallowed an assignment to (implicit) subscript 0 of an + existing array in a declare command that set the readonly attribute. + +kkk. Fixed a bug that inadvertently allowed assignments to FUNCNAME to disable + its special status. + +lll. Appending to an existing array variable using the compound assignment + syntax (var+=(aaa)) should not affect assignments to existing subscripts + appearing in the compound assignment. + +mmm. Fixed a bug that could cause the shell to crash when a variable with a + null value was passed in the temporary environment and the variable's + attributes are modified using `declare' while performing a redirection. + +nnn. Fixed a bug in printf so that a missing precision specifier after a `.' + is treated as 0. + +ooo. Fixed a bug that attempted to use the internal command timing to time + pipeline components if the pipeline elements are separated by newlines. + +ppp. Fixed a bug that caused `declare -al foo=(ONE TWO THREE)' to not lowercase + the values on assignment. + +qqq. Bash does a better job of determining whether or not files are executable + when running on Windows, since the X_OK flag to access(2) is not supported. + +rrr. Fixed a bug that caused some of the shell's internal traps (e.g., ERR) to + be interrupted (and leave incorrect state) by pending SIGINTs. + +sss. Fixed a bug in the bash interface to history expansion to avoid attempting + expansion if the history expansion character occurs in a command + substitution. + +ttt. Fixed a bug that caused the select command to crash if the REPLY variable + ends up empty (e.g., if it's made readonly) + +uuu. Bash handles backslash-quoting of multibyte characters better when quoting + output that is intended to be reused. + +vvv. System-specific changes for: Windows, Cygwin. + +www. Fixes for upper and lower-casing multibyte characters, some locales have + characters whose upper and lowercase versions have different numbers of + bytes. + +xxx. Fixed a bug that caused the ERR trap in a shell function to have the + wrong value for $LINENO. + +yyy. Fixed a bug that resulted in incorrect quoting of regexps for the =~ + operator when an open brace appears without a close brace. + +zzz. Fixed a bug in the array unset operation that caused it to attempt to + parse embedded single and double quotes. + +aaaa. Fixed a bug that caused $* to not expand with the first character of + $IFS as a separator in a context where word splitting will not take + place. + +bbbb. Fixed two bugs that could cause the shell to dereference a null pointer + while attempting to print an error message from arithmetic expansion. + +cccc. Fixed a bug that resulted in short-circuited evaluation when reading + commands from a string ending in an unquoted backslash, or when sourcing + a file that ends with an unquoted backslash. + +dddd. Fixed a bug that resulted in the no-fork optimization not cleaning up + any FIFOs created by process substitution. + +eeee. If the -T option is not set, allow the source builtin and shell functions + to set a DEBUG trap that persists after the sourced file or function + returns, instead of restoring the old (unset) value unconditionally. + +ffff. Fixed a bug that caused redirections to not be undone on some syntax + errors, e.g., when parsing a command substitution. + +gggg. Bash only adds asynchronous commands to the table of background pids + whose status it remembers, to avoid it growing too large during scripts + that create and reap large numbers of child processes. This means that + `wait' no longer works on synchronous jobs, but $? can be used to get + the exit status in those cases. + +hhhh. Bash now checks whether or not a shell script argument is a directory + before trying to open it; Posix says implementations may allow open(2) + on a directory. + +iiii. Fixed a bug that could cause the shell to set the terminal's process + group to a background process group when running as part of a pipeline. + +jjjj. Made a few changes to strings to avoid possible potential negative effects + caused by malicious translations. + +kkkk. Fixed a bug that caused the `unset' builtin to continue to treat its + arguments as functions after unsetting a function when invoked with no + options. + +llll. Fixed a bug that would not replace empty strings using pattern + substitution even if the pattern matched the empty string. + +mmmm. Fixed a bug with word completion that prevented some characters from + being backslash-quoted (backquote, dollar sign). + +nnnn. Fixed a bug that prevented a command from the history re-executed by the + `fc' builtin from setting verbose mode. + +oooo. Fixed a bug that caused the shell to not enable and disable function + tracing with changes to the `extdebug' shell option. + +pppp. Fixed a bug that caused assignments to nameref variables pointing to + unset variables with attributes but no values to create variables with + incorrect names. + +qqqq. Fixed a bug that caused `unset' on nameref variables (without -n) to + unset the wrong variable under certain circumstances. + +rrrr. Fixed a bug that caused close braces occurring in brace expansions within + command substitutions to incorrectly terminate parameter expansions. + +ssss. Fixed a bug that caused `command -p' to temporarily alter $PATH. + +tttt. Fixed a bug that caused interactive shells compiled without job control + to return incorrect status values for child processes when running a + single command that creates enough children to use the entire PID space. + +uuuu. `esac' should not be recognized as a reserved word when it appears as the + second or later pattern in a case statement pattern list. + +vvvv. Fixed a bug that caused the completion code to read past the end of the + readline line buffer while skipping assignment statements to find the + command name. + +wwww. Fixed a bug that caused case statements within loops contained in a + command substitution to be parsed incorrectly. + +xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after + running `wait' with no arguments and interrupting it with ^C without + a trap handler installed. + +2. Changes to Readline + +a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y' + commands with modifiers was fixed. + +b. Fixed a bug that caused callback mode to dump core when reading a + multiple-key sequence (e.g., arrow keys). + +c. Fixed a bug that caused the redisplay code to erase some of the line when + using horizontal scrolling with incremental search. + +d. Readline's input handler now performs signal processing if read(2) is + interrupted by SIGALRM or SIGVTALRM. + +e. Fixed a problem with revert-all-at-newline freeing freed memory. + +f. Clarified the documentation for the history_quotes_inhibit_expansion + variable to note that it inhibits scanning for the history comment + character and that it only affects double-quoted strings. + +g. Fixed an off-by-one error in the prompt printed when performing searches. + +h. Use pselect(2), if available, to wait for input before calling read(2), so + a SIGWINCH can interrupt it, since it doesn't interrupt read(2). + +i. Some memory leaks caused by signals interrupting filename completion have + been fixed. + +j. Reading EOF twice on a non-empty line causes EOF to be returned, rather + than the partial line. This can cause partial lines to be executed on + SIGHUP, for example. + +k. Fixed a bug concerning deleting multibyte characters from the search + string while performing an incremental search. + +l. Fixed a bug with tilde expanding directory names in filename completion. + +m. Fixed a bug that did not allow binding sequences beginning with a `\'. + +n. Fixed a redisplay bug involving incorrect line wrapping when the prompt + contains a multibyte character in the last screen column. + +o. Fixed a bug that caused history expansion to disregard characters that are + documented to delimit a history event specifier without requiring `:'. + +p. Fixed a bug that could cause reading past the end of a string when reading + the value when binding the set of isearch terminators. + +q. Fixed a bug that caused readline commands that depend on knowing which + key invoked them to misbehave when dispatching key sequences that are + prefixes of other key bindings. + +r. Paren matching now works in vi insert mode. + +3. New Features in Bash + +a. There is now a settable configuration #define that will cause the shell + to exit if the shell is running setuid without the -p option and setuid + to the real uid fails. + +b. Command and process substitutions now turn off the `-v' option when + executing, as other shells seem to do. + +c. The default value for the `checkhash' shell option may now be set at + compile time with a #define. + +d. The `mapfile' builtin now has a -d option to use an arbitrary character + as the record delimiter, and a -t option to strip the delimiter as + supplied with -d. + +e. The maximum number of nested recursive calls to `eval' is now settable in + config-top.h; the default is no limit. + +f. The `-p' option to declare and similar builtins will display attributes for + named variables even when those variables have not been assigned values + (which are technically unset). + +g. The maximum number of nested recursive calls to `source' is now settable + in config-top.h; the default is no limit. + +h. All builtin commands recognize the `--help' option and print a usage + summary. + +i. Bash does not allow function names containing `/' and `=' to be exported. + +j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options. + +k. The shell now allows `time ; othercommand' to time null commands. + +l. There is a new `--enable-function-import' configuration option to allow + importing shell functions from the environment; import is enabled by + default. + +m. `printf -v var ""' will now set `var' to the empty string, as if `var=""' + had been executed. + +n. GLOBIGNORE, the pattern substitution word expansion, and programmable + completion match filtering now honor the value of the `nocasematch' option. + +o. There is a new ${parameter@spec} family of operators to transform the + value of `parameter'. + +p. Bash no longer attempts to perform compound assignment if a variable on the + rhs of an assignment statement argument to `declare' has the form of a + compound assignment (e.g., w='(word)' ; declare foo=$w); compound + assignments are accepted if the variable was already declared as an array, + but with a warning. + +q. The declare builtin no longer displays array variables using the compound + assignment syntax with quotes; that will generate warnings when re-used as + input, and isn't necessary. + +r. Executing the rhs of && and || will no longer cause the shell to fork if + it's not necessary. + +s. The `local' builtin takes a new argument: `-', which will cause it to save + the single-letter shell options and restore their previous values at + function return. + +t. `complete' and `compgen' have a new `-o nosort' option, which forces + readline to not sort the completion matches. + +u. Bash now allows waiting for the most recent process substitution, since it + appears as $!. + +v. The `unset' builtin now unsets a scalar variable if it is subscripted with + a `0', analogous to the ${var[0]} expansion. + +w. `set -i' is no longer valid, as in other shells. + +x. BASH_SUBSHELL is now updated for process substitution and group commands + in pipelines, and is available with the same value when running any exit + trap. + +y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or + not bash is being run in a GNU Emacs shell window. + +z. Bash now treats SIGINT received when running a non-builtin command in a + loop the way it has traditionally treated running a builtin command: + running any trap handler and breaking out of the loop. + +aa. New variable: EXECIGNORE; a colon-separate list of patterns that will + cause matching filenames to be ignored when searching for commands. + +bb. Aliases whose value ends in a shell metacharacter now expand in a way to + allow them to be `pasted' to the next token, which can potentially change + the meaning of a command (e.g., turning `&' into `&&'). + +4. New Features in Readline + +a. The history truncation code now uses the same error recovery mechanism as + the history writing code, and restores the old version of the history file + on error. The error recovery mechanism handles symlinked history files. + +b. There is a new bindable variable, `enable-bracketed-paste', which enables + support for a terminal's bracketed paste mode. + +c. The editing mode indicators can now be strings and are user-settable + (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' + variables). Mode strings can contain invisible character sequences. + Setting mode strings to null strings restores the defaults. + +d. Prompt expansion adds the mode string to the last line of a multi-line + prompt (one with embedded newlines). + +e. There is a new bindable variable, `colored-completion-prefix', which, if + set, causes the common prefix of a set of possible completions to be + displayed in color. + +f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- + mode yank-pop. + +g. The redisplay code underwent several efficiency improvements for multibyte + locales. + +h. The insert-char function attempts to batch-insert all pending typeahead + that maps to self-insert, as long as it is coming from the terminal. + +i. rl_callback_sigcleanup: a new application function that can clean up and + unset any state set by readline's callback mode. Intended to be used + after a signal. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-release, and +the previous version, bash-4.3-rc2. + +1. Changes to Bash + +a. Only Posix-mode shells should exit on an assignment failure in the + temporary environment preceding a special builtin. This is how it's been + documented. + +b. Fixed a bug that caused a failed special builtin to not exit a posix-mode + shell if the failing builtin was on the LHS of a && or ||. + +c. Changed the handling of unquoted backslashes in regular expressions to be + closer to bash-4.2. + +d. globstar (**) no longer traverses symbolic links that resolve to + directories. This eliminates some duplicate entries. + +e. Fixed a bug that caused a SIGCHLD trap handler to not be able to change the + SIGCHLD disposition. + +f. Fixed a bug that caused a crash when -x was enabled and a command + contained a printable multibyte (wide) character. + +g. Fixed a bug that caused an interactive shell without line editing enabled + to read invalid data after receiving a SIGINT. + +h. Fixed a bug that caused command word completion to fail if the directory in + $PATH where the completion would be found contained single or double quotes. + +i. Fixed a bug that caused a shell with -v enabled to print commands in $() + multiple times. + +2. Changes to Readline + +a. Fixed a bug that caused `undo' to reference freed memory or null pointers. + +3. New Features in Bash + +a. The [[ -v ]] option now understands array references (foo[1]) and returns + success if the referenced element has a value. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-rc2, and the +previous version, bash-4.3-rc1. + +1. Changes to Bash + +a. Fixed a bug that left variables set by printf -v marked as invisible. + +b. Fixed an off-by-one error in a job control warning message. + +c. Fixed a bug that caused the shell to crash after declaring a nameref variable + without a value. + +d. Fixed a bug that caused asynchronous commands to not set $? correctly. + +e. Fixed a bug that caused out-of-order execution when executing aliases with + embedded newlines containing `.' commands. + +f. Fixed a bug that caused error messages generated by expansion errors in + `for' commands to have the wrong line number. + +g. Fixed a bug that caused the `wait' builtin to not be interruptible in an + interactive shell with job control enabled. + +h. Fixed a bug that caused SIGINT and SIGQUIT to not be trappable in + asynchronous subshell commands. + +i. Bash now requires that the value assigned to a nameref variable be a valid + shell identifier (variable name or array reference). + +j. Converting an existing variable to a nameref variable now turns off the + -i/-l/-u/-c attributes. + +k. Displaying a nameref variable with `declare -p' now displays the nameref + variable and its value rather than following the nameref chain. + +l. Fixed a problem with interrupt handling that caused a second and subsequent + SIGINT to be ignored by interactive shells. + +m. Fixed a bug that caused certain positional parameter and array expansions + to mishandle (discard) null positional parameters and array elements. + +n. The shell no longer blocks receipt of signals while running trap handlers + for those signals, and allows most trap handlers to be run recursively + (running trap handlers while a trap handler is executing). + +o. The shell now handles backslashes in regular expression arguments to the + [[ command's =~ operator slightly differently, resulting in more + consistent behavior. + +2. Changes to Readline + +a. Fixed a bug that could cause readline to crash and seg fault attempting to + expand an empty history entry. + +b. Fixed a bug that caused a bad entry in the $LS_COLORS variable to abort all + color processing but leave color enabled. + +c. Fixed a bug that caused display problems with multi-line prompts containing + invisible characters on multiple lines. + +d. Fixed a bug that caused effects made by undoing changes to a history line to + be discarded. + +3. New Features in Bash + +4. New Features in Readline + +a. When creating shared libraries on Mac OS X, the pathname written into the + library (install_name) no longer includes the minor version number. +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-rc1, and the +previous version, bash-4.3-beta2. + +1. Changes to Bash + +a. Fixed a bug in bash completion that caused a tilde to be expanded even if + the `direxpand' option was not enabled. + +b. Fixed a potential bug that could cause corrupted input in interactive shells + running without line editing and with `ignoreeof' enabled. + +c. Fixed a bug that could cause failures when opening pipes back to shells + created to run process substitutions. + +d. Fixed a bug that caused an assignment to TEXTDOMAIN to require TEXTDOMAINDIR + to be set in order to actually change the current text domain. + +e. Changed the way redirections are printed to avoid confusion when the target + of an output redirection is a process substitution beginning with `>'. + +2. Changes to Readline + +a. Shared library building is now supported on Mac OS X 10.9 (Darwin 13). + +3. New Features in Bash + +a. `cd' has a new `-@' option to browse a file's extended attributes on + systems that support O_XATTR. + +4. New Features in Readline + +a. There are additional default key bindings for MinGW32 + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-beta2, and the +previous version, bash-4.3-beta. + +1. Changes to Bash + +a. Fixed a bug that caused assignment to an unset variable using a negative + subscript to result in a segmentation fault. + +b. Fixed a bug that caused assignment to a string variable using a negative + subscript to use the incorrect index. + +c. Fixed a bug that caused some strings to be interpreted as invalid + extended globbing expressions when used with the help builtin. + +d. Fixed a bug that caused an attempt to trap a signal whose disposition + cannot be changed to reference uninitialized memory. + +e. Command completion now skips assignment statements preceding a command + name and completes the command. + +f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump + core under certain circumstances. + +g. Fixed a bug that caused the `read -N' to misbehave when the input stream + contains 0xff. + +2. Changes to Readline + +a. Changed message when an incremental search fails to include "failed" in + the prompt and display the entire search string instead of just the last + matching portion. + +b. Fixed a bug that caused an arrow key typed to an incremental search prompt + to process the key sequence incorrectly. + +c. Additional key bindings for arrow keys on MinGW. + +3. New Features in Bash + +a. The help builtin now attempts substring matching (as it did through + bash-4.2) if exact string matching fails. + +b. The fc builtin now interprets -0 as the current command line. + +c. Completing directory names containing shell variables now adds a trailing + slash if the expanded result is a directory. + +4. New Features in Readline + +a. rl_change_environment: new application-settable variable that controls + whether or not Readline modifies the environment (currently readline + modifies only LINES and COLUMNS). + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-beta, and the +previous version, bash-4.3-alpha. + +1. Changes to Bash + +a. Fixed a bug in the prompt directory name "trimming" code that caused + memory corruption and garbled the results. + +b. Fixed a bug that caused single quotes that resulted from $'...' quoting + in the replacement portion of a double-quoted ${word/pat/rep} expansion + to be treated as quote characters. + +c. Fixed a bug that caused assignment statements preceding a command word to + result in assignment statements following a declaration command to not be + expanded like assignment statements. + +d. Fixed a bug with variable search order in the presence of local variables + with the same name as variables in the temporary environment supplied to + a shell function. + +e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process + substitutions even in an arithmetic context. + +f. Fixed several cases where `invisible' variables (variables with attributes + but no values, which are technically unset) were treated incorrectly. + +g. Fixed a bug that caused group commands in pipelines that were not the + last element to not run the EXIT trap. + +h. Fixed a bug that caused `unset -n' to not unset a nameref variable in + certain cases. + +i. Fixed the nameref circular reference checking to be less strict and only + disallow a nameref variable with the same value as its name at the global + scope. + +j. Fixed a bug that caused trap handlers to be executed recursively, + corrupting internal data structures. + +k. Fixed a bug that could result in bash not compiling if certain options were + not enabled. + +l. Fixed a bug that caused the arithmetic expansion code to attempt variable + assignments when operator precedence prohibited them. + +m. Word expansions like ${foo##bar} now understand indirect variable references. + +n. Fixed a bug that caused `declare -fp name' to not display a function + definition. + +o. Fixed a bug that caused asynchronous child processes to modify the stdin + file pointer when bash was using it to read a script, which modified the + parent's value as well. + +2. Changes to Readline + +a. Fixed a bug in vi mode that caused the arrow keys to set the saved last + vi-mode command to the wrong value. + +b. Fixed a bug that caused double-quoted strings to be scanned incorrectly + when being used as the value of a readline variable assignment. + +c. Fixed a bug with vi mode that prevented `.' from repeating a command + entered on a previous line (command). + +d. Fixed a bug that could cause completion to core dump if it was interrupted + by a signal. + +e. Readline now sends the meta-key enable string to the terminal if the + terminal has been successfully initialized. + +f. Readline now calls the signal hook after resizing the terminal when it + receives a SIGWINCH. + +g. Fixed a bug that could cause the history list code to perform an out-of- + bounds array reference if the history list is empty. + +3. New Features in Bash + +a. Shells started to run process substitutions now run any trap set on EXIT. + +b. There is now a configure-time option to enable the globasciiranges option + by default. + +c. The read builtin now checks its first variable argument for validity before + trying to read any input. + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-4.3-alpha, +and the previous version, bash-4.2-release. + +1. Changes to Bash + +a. Fixed several bugs concerning incomplete bracket expressions in filename + generation (globbing) patterns. + +b. Fixed a bug with single quotes and WORD in ${param op WORD} when running + in Posix mode. + +c. Fixed a bug that caused the pattern removal and pattern substitution word + expansions and case statement word expansion to not match the empty string. + +d. Fixed a bug that caused the tzset() function to not work after changing + the TZ environment variable. + +e. Fixed a bug that caused the RHS of an assignment statement to undergo + word splitting when it contained an unquoted $@. + +f. Fixed bugs that caused the shell to not react to a SIGINT sent while + waiting for a child process to exit. + +g. Bash doesn't try to run things in a signal handler context when it gets a + signal (SIGINT/SIGHUP/etc) while reading input using readline but still + be responsive to terminating signals. + +h. Fixed a bug that caused bash to go into an infinite loop if a filename + to be matched contained an invalid multibyte character. + +i. Fixed a bug that caused PS4 to end up being truncated if it is longer + than 128 bytes. + +j. Fixed a bug that caused brace expansion to not skip over double-quoted + command substitution. + +k. System-specific updates for: DJGPP, HP/UX, Mac OS X + +l. Fixed a bug in displaying commands that caused redirections to be associated + with the wrong part of the command. + +m. Fixed the coproc cleanup to unset the appropriate shell variables when a + coproc terminates. + +n. Fixed a bug that caused `fc' to dump core due to incorrect calculation of + the last history entry. + +o. Added workarounds for FreeBSD's implementation of faccessat/eaccess and + `test -x'. + +p. Fixed a bug that caused the shell to not match patterns containing + control-A. + +q. Fixed a bug that could result in doubled error messages when the `printf' + builtin got a write error. + +r. Fixed a bug that caused the shell to not correctly expand words containing + multiple consecutive quoted empty strings (""""""aa). + +s. Fixed a bug that caused the shell to not correctly parse multi-line + process substitutions containing comments and quoted strings. + +t. Fixed a problem with the bash malloc's internal idea of the top of the + memory heap that resulted in incorrect decisions to try to reduce the + break and give memory back to the kernel. + +u. There are changes to the expansions performed on compound array assignments, + in an effort to make foo=( [ind1]=bar [ind2]=baz ) identical to + foo[ind1]=bar foo[ind2]=baz. + +v. Bash now reports an error if `read -a name' is used when `name' is an + existing associative array. + +w. Fixed a bug that allowed an attempted assignment to a readonly variable + in an arithmetic expression to not return failure. + +x. Fixed several bugs that caused completion functions to be invoked even when + the cursor was before the first word in the command. + +y. Fixed a bug that caused parsing a command substitution to overwrite the + parsing state associated with the complete input line. + +z. Fixed several bugs with the built-in snprintf replacement and field widths + and floating point. + +aa. Fixed a bug that caused incorrect offset calculations and input buffer + corruption when reading files longer than 2^31 bytes. + +bb. Fixed several bugs where bash performed arithmetic evaluation in contexts + where evaluation is suppressed. + +cc. Fixed a bug that caused bash to close FIFOs used for process substitution + too early when a shell function was executing, but protect against using + all file descriptors when the shell functions are invoked inside loops. + +dd. Added checks for printable (and non-printable) multibyte characters for + use in error messages. + +ee. Fixed a bug that caused ^O (operate-and-get-next) to not work correctly + at the end of the history list. + +ff. Fixed a bug that caused command-oriented history to incorrectly combine + here documents into one line. + +gg. Fixed a bug that caused importing SHELLOPTS from the environment into a + Posix-mode shell to print an error message and refuse to parse it. + +hh. Fixed a bug that caused the shell to delete an extra history entry when + using `history -s'. + +ii. Fixed a bug that caused floating-point exceptions and overflow errors + for the / and % arithmetic operators when using INTMAX_MIN and -1. + +jj. Fixed a bug that caused parsing errors when reading an arithmetic for + loop inside a command substitution. + +kk. Fixed a bug that caused a readonly function to be unset when unset was + called without the -f or -v option. + +ll. Fixed several bugs in the code that quotes characters special to regular + expressions when used in a quoted string on the RHS of the =~ operator + to the [[ command. + +mm. Fixed a bug that caused redirections to fail because the file descriptor + limit was set to a value less than 10. + +nn. Fixed a bug that caused the `read' builtin to execute code in a signal + handler context if read timed out. + +oo. Fixed a bug that caused extended globbing patterns to not match files + beginning with `.' correctly when a `.' was explicitly supplied in the + pattern. + +pp. Fixed a bug that caused key sequences longer than two characters to not + work when used with `bind -x'. + +qq. Fixed a bug that resulted in redefined functions having the wrong source + file names in BASH_SOURCE. + +rr. Fixed a bug that caused the read builtin to assign null strings to variables + when using `read -N', which caused core dumps when referenced + +ss. Fixed a bug that caused `bash -m script' to not enable job control while + running the script. + +tt. Fixed a bug that caused `printf -v var' to dump core when used with the + %b format code. + +uu. Fixed a bug that caused the shell to exit with the wrong status if -e was + active and the shell exited on a substitution error. + +vv. Fixed a bug that caused the shell to seg fault if an array variable with + the same name as an existing associative array was implicitly created by + an assignment (declare a[n]=b). + +ww. Fixed a bug that caused a redirection to misbehave if the number specified + for a file descriptor overflows an intmax_t. + +xx. Fixed several bugs with the handling of valid and invalid unicode character + values when used with the \u and \U escape sequences to printf and $'...'. + +yy. Fixed a bug that caused tildes to not be escaped in expanded filenames, + making them subject to later expansion. + +zz. When using the pattern substitution word expansion, bash now runs the + replacement string through quote removal, since it allows quotes in that + string to act as escape characters. This is not backwards compatible, so + it can be disabled by setting the bash compatibility mode to 4.2. + +aaa. Fixed the rest of the cases where the shell runs non-allowed code in a + signal handler context. + +bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in + double-quoted expansion where the RHS is evaluated to the empty string. + +ccc. Fixed a bug that caused the use of the shell's internal random number + generator for temporary file names to perturb the random number + sequence. + +ddd. Fixed several bugs that caused `declare -g' to not set the right global + variables or to misbehave when declaring global indexed arrays. + +eee. Fixed a logic bug that caused extended globbing in a multibyte locale to + cause failures when using the pattern substititution word expansions. + +fff. Fixed a bug that caused the `lastpipe' option to corrupt the file + descriptor used to read the script. + +ggg. Fixed a bug that causes the shell to delete DEL characters in the + expanded value of variables used in the same quoted string as variables + that expand to nothing. + +hhh. Fixed a bug that caused the shell to assign the wrong value from an + assignment like (( x=7 )) when `x' was an existing array variable. + +iii. Fixed a bug that caused the shell to misbehave when generating sequences + and the boundary values overflow an intmax_t. + +jjj. Fixed a bug caused expansion errors if an expansion of "$@" appeared + next to another expansion (e.g.. "${@}${x}"). + +kkk. Fixed a potential buffer overflow bug when performing /dev/fd expansion. + +lll. Fixed a bug that resulted in an extra semicolon being added to compound + assignments when they were added to the history list. + +mmm. Fixed a bug that caused mapfile to read one extra line from the input. + +nnn. Fixed a bug that caused the mail checking code to use uninitialized + values. + +ooo. Fixed a bug that prevented history timestamps from being saved if the + history comment character is unset. + +ppp. Fixed a bug that caused the case-modifying expansions to not work with + multibyte characters. + +qqq. Fixed a bug that caused the edit-and-execute bindable readline command + to see the wrong data if invoked in the middle of a multi-line quoted + string. + +rrr. Fixed a bug that resulted in the shell returning the wrong exit status + for a background command on systems that recycle PIDs very quickly. + +sss. Fixed a bug that caused asynchronous group commands to not run any EXIT + trap defined in the body of the command. + +ttt. Fixed a bug that caused `eval "... ; return"' to not clean up properly. + +uuu. Fixed a bug that caused the shell to dump core if `read' reads an escaped + IFS whitespace character. + +vvv. Fixed a bug that caused BASH_COMMAND to be set to an incorrect value when + executing a (...) subshell. + +www. Fixed a couple of pointer aliasing bugs with the token string in arithmetic + evaluation. + +xxx. Fixed a bug with parsing multi-line command substitutions when reading + the `do' keyword followed by whitespace. + +yyy. Fixed a bug that caused the shell to seg fault if the time given to the + printf %(...)T format overflowed the value accepted by localtime(3). + +zzz. Fixed a problem with displaying help topics in two columns when the + translated text contained multibyte characters. + +aaaa. Fixed a bug with the extended globbing pattern matcher where a `*' was + followed by a negated extended glob pattern. + +bbbb. Fixed a race condition with short-lived coproc creation and reaping that + caused the child process to be reaped before the various coproc shell + variables were initialized. + +cccc. Fixed a bug where turning off `errexit' in command substitution subshells + was not reflected in $SHELLOPTS. + +dddd. Partially fixed an inconsistency in how the shell treated shell + functions run from an EXIT trap. + +eeee. Fixed a bug in how the shell invalidated FIFOs used for process + substitution when executing a pipeline (once rather than in every child). + +ffff. Fixed a bug that occurred when expanding a special variable ($@, $*) + within double quotes and the expansion resulted in an empty string. + +gggg. Fixed bugs with executing a SIGCHLD trap handler to make sure that it's + executed once per exited child. + +hhhh. Fixed a bug that caused `declare' and `test' to find variables that + had been given attributes but not assigned values. Such variables are + not set. + +iiii. Fixed a bug that caused commands in process substitutions to not look in + the local temporary environment when performing word expansions. + +jjjj. Fixed several problems with globstar expansions (**/**) returning null + filenames and multiple instances of the same pathname. + +kkkk. Fixed an oversight that did not allow the exit status of `coproc' to + be inverted using `!'. + +llll. Fixed a bug that caused the -e option to be re-enabled using `set -e' + even when executing in a context where -e is ignored. + +mmmm. Fixed a (mostly theoretical) bug with input lines longer than SIZE_MAX. + +nnnn. Fixed a bug that could result in double evaluation of command + substitutions when they appear in failed redirections. + +oooo. Fixed a bug that could cause seg faults during `mapfile' callbacks if + the callback unsets the array variable mapfile is using. + +pppp. Fixed several problems with variable assignments using ${var:=value} + when the variable assignment is supposed to have side effects. + +qqqq. Fixed a bug that caused a failure of an assignment statement preceding a + builtin caused the next invocation of a special builtin to exit the shell. + +rrrr. Fixed several problems with IFS when it appears in the temporary environment + and is used in redirections. + +ssss. Fixed a problem that caused IFS changes using ${IFS:=value} to modify + how preceding expansions were split. + +tttt. Fixed a problem that caused subshells to not run an EXIT trap they set. + +uuuu. Fixed a problem that caused shells started in posix mode to attempt to + import shell functions with invalid names from the environment. We now + print a warning. + +vvvv. Worked around a kernel problem that caused SIGCHLD to interrupt open(2) + on a FIFO used for process substitution, even if the SIGCHLD handler was + installed with the SA_RESTART flag. + +wwww. Fixed a problem that resulted in inconsistent expansion of $* and ${a[*]}. + +xxxx. Fixed a problem that caused `read -t' to crash when interrupted by + SIGINT. + +yyyy. Fixed a problem that caused pattern removal to fail randomly because the + pattern matcher read beyond the end of a string. + +zzzz. Fixed a bug that caused core dumps when shell functions tried to create + local shadow copies of special variables like GROUPS. + +aaaaa. Fixed a bug that caused SIGTERM to be occasionally lost by children of + interactive shells when it arrived before the child process reset the + handler from SIG_DFL. + +bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor + n closed if executed with a builtin command. + +ccccc. Fixed a bug that caused incorrect completion quoting when completing a + word containing a globbing character with `show-all-if-ambiguous' set. + +ddddd. Fixed a bug that caused printf's %q format specifier not to quote a + tilde even if it appeared in a location where it would be subject to + tilde expansion. + +2. Changes to Readline + +a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode + commands to work on the entire line. + +b. Fixed a bug that caused redisplay problems with prompts longer than 128 + characters and history searches. + +c. Fixed a bug that caused readline to try and run code to modify its idea + of the screen size in a signal handler context upon receiving a SIGWINCH. + +d. Fixed a bug that caused the `meta' key to be enabled beyond the duration + of an individual call top readline(). + +e. Added a workaround for a wcwidth bug in Mac OS X that caused readline's + redisplay to mishandle zero-width combining characters. + +f. Fixed a bug that caused readline to `forget' part of a key sequence when + a multiple-key sequence caused it to break out of an incremental search. + +g. Fixed bugs that caused readline to execute code in a signal handler + context if interrupted while reading from the file system during completion. + +h. Fixed a bug that caused readline to `forget' part of a key sequence when + reading an unbound multi-character key sequence. + +i. Fixed a bug that caused Readline's signal handlers to be installed beyond + the bounds of a single call to readline(). + +j. Fixed a bug that caused the `.' command to not redo the most recent `R' + command in vi mode. + +k. Fixed a bug that caused ignoring case in completion matches to result in + readline using the wrong match. + +l. Paren matching now works in vi insert mode. + +m. Fix menu-completion to make show-all-if-ambiguous and menu-complete-display-prefix + work together. + +n. Fixed a bug that didn't allow the `cc', `dd', or `yy' commands to be redone + in vi editing mode. + +o. Fixed a bug that caused the filename comparison code to not compare + multibyte characters correctly when using case-sensitive or case-mapping + comparisons. + +p. Fixed the input reading loop to call the input hook function only when there + is no terminal input available. + +q. Fixed a bug that caused binding a macro to a multi-character key sequence + where the sequence and macro value share a common prefix to not perform + the macro replacement. + +r. Fixed several redisplay errors with multibyte characters and prompts + containing invisible characters when using horizontal scrolling. + +s. Fixed a bug that caused redisplay errors when trying to overwrite + existing characters using multibyte characters. + +3. New Features in Bash + +a. The `helptopic' completion action now maps to all the help topics, not just + the shell builtins. + +b. The `help' builtin no longer does prefix substring matching, so `help read' + does not match `readonly'. + +c. The shell can be compiled to not display a message about processes that + terminate due to SIGTERM. + +d. Non-interactive shells now react to the setting of checkwinsize and set + LINES and COLUMNS after a foreground job exits. + +e. There is a new shell option, `globasciiranges', which, when set to on, + forces globbing range comparisons to use character ordering as if they + were run in the C locale. + +f. There is a new shell option, `direxpand', which makes filename completion + expand variables in directory names in the way bash-4.1 did. + +g. In Posix mode, the `command' builtin does not change whether or not a + builtin it shadows is treated as an assignment builtin. + +h. The `return' and `exit' builtins accept negative exit status arguments. + +i. The word completion code checks whether or not a filename containing a + shell variable expands to a directory name and appends `/' to the word + as appropriate. The same code expands shell variables in command names + when performing command completion. + +j. In Posix mode, it is now an error to attempt to define a shell function + with the same name as a Posix special builtin. + +k. When compiled for strict Posix conformance, history expansion is disabled + by default. + +l. The history expansion character (!) does not cause history expansion when + followed by the closing quote in a double-quoted string. + +m. `complete' and its siblings compgen/compopt now takes a new `-o noquote' + option to inhibit quoting of the completions. + +n. Setting HISTSIZE to a value less than zero causes the history list to be + unlimited (setting it 0 zero disables the history list). + +o. Setting HISTFILESIZE to a value less than zero causes the history file size + to be unlimited (setting it to 0 causes the history file to be truncated + to zero size). + +p. The `read' builtin now skips NUL bytes in the input. + +q. There is a new `bind -X' option to print all key sequences bound to Unix + commands. + +r. When in Posix mode, `read' is interruptible by a trapped signal. After + running the trap handler, read returns 128+signal and throws away any + partially-read input. + +s. The command completion code skips whitespace and assignment statements + before looking for the command name word to be completed. + +t. The build process has a new mechanism for constructing separate help files + that better reflects the current set of compilation options. + +u. The -nt and -ot options to test now work with files with nanosecond + timestamp resolution. + +v. The shell saves the command history in any shell for which history is + enabled and HISTFILE is set, not just interactive shells. + +w. The shell has `nameref' variables and new -n(/+n) options to declare and + unset to use them, and a `test -R' option to test for them. + +x. The shell now allows assigning, referencing, and unsetting elements of + indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which + count back from the last element of the array. + +y. The {x} operators to the `[[' command. This can be reverted to the previous - behavior by setting one of the `compatNN' shopt options. + behavior (ASCII collating and strcmp(3)) by setting one of the + `compatNN' shopt options, where NN is less than 41. + +45. Bash-4.1 conforms to the current Posix specification for `set -u': + expansions of $@ and $* when there are no positional parameters do not + cause the shell to exit. + +46. Bash-4.1 implements the current Posix specification for `set -e' and + exits when any command fails, not just a simple command or pipeline. + +47. Command substitutions now remove the caller's trap strings when trap is + run to set a new trap in the subshell. Previous to bash-4.2, the old + trap strings persisted even though the actual signal handlers were reset. + +48. When in Posix mode, a single quote is not treated specially in a + double-quoted ${...} expansion, unless the expansion operator is + # or % or the new `//', `^', or `,' expansions. In particular, it + does not define a new quoting context. This is from Posix interpretation + 221. + +49. Posix mode shells no longer exit if a variable assignment error occurs + with an assignment preceding a command that is not a special builtin. + +50. Bash-4.2 attempts to preserve what the user typed when performing word + completion, instead of, for instance, expanding shell variable + references to their value. + +51. When in Posix mode, bash-4.2 exits if the filename supplied as an argument + to `.' is not found and the shell is not interactive. + +52. When compiled for strict Posix compatibility, bash-4.3 does not enable + history expansion by default in interactive shells, since it results in + a non-conforming environment. + +53. Bash-4.3 runs the replacement string in the pattern substitution word + expansion through quote removal. The code already treats quote + characters in the replacement string as special; if it treats them as + special, then quote removal should remove them. + +54. Bash-4.4 no longer considers a reference to ${a[@]} or ${a[*]}, where `a' + is an array without any elements set, to be a reference to an unset + variable. This means that such a reference will not cause the shell to + exit when the `-u' option is enabled. + +55. Bash-4.4 allows double quotes to quote the history expansion character (!) + when in Posix mode, since Posix specifies the effects of double quotes. + +56. Bash-4.4 does not inherit $PS4 from the environment if running as root. + +57. Bash-4.4 doesn't allow a `break' or `continue' in a function to affect + loop execution in the calling context. + +58. Bash-4.4 no longer expands tildes in $PATH elements when in Posix mode. + +59. Bash-4.4 does not attempt to perform a compound array assignment if an + argument to `declare' or a similar builtin expands to a word that looks + like a compound array assignment (e.g. declare w=$x where x='(foo)'). + +60. Bash-5.0 only sets up BASH_ARGV and BASH_ARGC at startup if extended + debugging mode is active. The old behavior of unconditionally setting + BASH_ARGC and BASH_ARGV is available at compatibility levels less than + or equal to 44. + +61. Bash-5.0 doesn't allow a `break' or `continue' in a subshell to attempt + to break or continue loop execution inherited from the calling context. + +62. Bash-5.0 doesn't allow variable assignments preceding builtins like + export and readonly to modify variables with the same name in preceding + contexts (including the global context) unless the shell is in posix + mode, since export and readonly are special builtins. + +63. Bash-5.1 changes the way posix-mode shells handle assignment statements + preceding shell function calls. Previous versions of POSIX specified that + such assignments would persist after the function returned; subsequent + versions of the standard removed that requirement (interpretation #654). + Bash-5.1 posix mode assignment statements preceding shell function calls + do not persist after the function returns. + +64. Bash-5.1 reverts to the bash-4.4 treatment of pathname expansion of words + containing backslashes but no other special globbing characters. This comes + after a protracted discussion and a POSIX interpretation (#1234). + +65. In bash-5.1, disabling posix mode attempts to restore the state of several + options that posix mode modifies to the state they had before enabling + posix mode. Previous versions restored these options to default values. + +66. Bash-5.2 attempts to prevent double-expansion of array subscripts under + certain circumstances, especially arithmetic evaluation, by acting as if + the `assoc_expand_once' shell option were set. + +67. The `unset' builtin in bash-5.2 treats array subscripts `@' and `*' + differently than previous versions, and differently depending on whether + the array is indexed or associative. + 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 +as a set of options to the shopt builtin (compat31, compat32, compat40, +compat41, and so on). There is only one current compatibility level -- +each option is mutually exclusive. The compatibility level is intended to +allow users to select behavior from previous versions that is incompatible +with newer versions while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. + +This section 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). + +If a user enables, say, compat32, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed in +that version of bash, but that behavior may have been present in earlier +versions. For instance, the change to use locale-based comparisons with +the `[[' command came in bash-4.1, and earlier versions used ASCII-based +comparisons, so enabling compat32 will enable ASCII-based comparisons as +well. That granularity may not be sufficient for all uses, and as a result +users should employ compatibility levels carefully. Read the documentation +for a particular feature to find out the current behavior. + +Bash-4.3 introduced a new shell variable: BASH_COMPAT. The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the compatNN option, like 42) determines the compatibility +level. + +Starting with bash-4.4, bash has begun deprecating older compatibility +levels. Eventually, the options will be removed in favor of the +BASH_COMPAT variable. + +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use the BASH_COMPAT variable +on bash-5.0 and later versions. + +The following table describes the behavior changes controlled by each +compatibility level setting. The `compatNN' tag is used as shorthand for +setting the compatibility level to NN using one of the following +mechanisms. For versions prior to bash-5.0, the compatibility level may be +set using the corresponding compatNN shopt option. For bash-4.3 and later +versions, the BASH_COMPAT variable is preferred, and it is required for +bash-5.1 and later versions. + +compat31 - 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 + locale when comparing strings; they use ASCII ordering + - quoting the rhs of the [[ command's regexp matching operator (=~) + has no special effect -compat32 set +compat32 - the < and > operators to the [[ command do not consider the current - locale when comparing strings + locale when comparing strings; they use ASCII ordering + - interrupting a command list such as "a ; b ; c" causes the execution + of the next command in the list (in bash-4.0 and later versions, + the shell acts as if it received the interrupt, so interrupting + one command in a list aborts the execution of the entire list) -compat40 set +compat40 - 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 + locale when comparing strings; they use ASCII ordering. + Bash versions prior to bash-4.1 use ASCII collation and strcmp(3); + bash-4.1 and later use the current locale's collation sequence and + strcoll(3). + +compat41 + - in posix mode, `time' may be followed by options and still be + recognized as a reserved word (this is POSIX interpretation 267) + - in posix mode, the parser requires that an even number of single + quotes occur in the `word' portion of a double-quoted ${...} + parameter expansion and treats them specially, so that characters + within the single quotes are considered quoted (this is POSIX + interpretation 221) + +compat42 + - the replacement string in double-quoted pattern substitution is not + run through quote removal, as it is in versions after bash-4.2 + - in posix mode, single quotes are considered special when expanding + the `word' portion of a double-quoted ${...} parameter expansion + and can be used to quote a closing brace or other special character + (this is part of POSIX interpretation 221); in later versions, + single quotes are not special within double-quoted word expansions + +compat43 + - the shell does not print a warning message if an attempt is made to + use a quoted compound assignment as an argument to declare + (declare -a foo='(1 2)'). Later versions warn that this usage is + deprecated. + - word expansion errors are considered non-fatal errors that cause the + current command to fail, even in posix mode (the default behavior is + to make them fatal errors that cause the shell to exit) + - when executing a shell function, the loop state (while/until/etc.) + is not reset, so `break' or `continue' in that function will break + or continue loops in the calling context. Bash-4.4 and later reset + the loop state to prevent this + +compat44 + - the shell sets up the values used by BASH_ARGV and BASH_ARGC so + they can expand to the shell's positional parameters even if extended + debug mode is not enabled + - a subshell inherits loops from its parent context, so `break' + or `continue' will cause the subshell to exit. Bash-5.0 and later + reset the loop state to prevent the exit + - variable assignments preceding builtins like export and readonly + that set attributes continue to affect variables with the same + name in the calling environment even if the shell is not in posix + mode + +compat50 (set using BASH_COMPAT) + - Bash-5.1 changed the way $RANDOM is generated to introduce slightly + more randomness. If the shell compatibility level is set to 50 or + lower, it reverts to the method from bash-5.0 and previous versions, + so seeding the random number generator by assigning a value to + RANDOM will produce the same sequence as in bash-5.0 + - If the command hash table is empty, bash versions prior to bash-5.1 + printed an informational message to that effect even when writing + output in a format that can be reused as input (-l). Bash-5.1 + suppresses that message if -l is supplied + - Bash-5.1 and later use pipes for here-documents and here-strings if + they are smaller than the pipe capacity. If the shell compatibility + level is set to 50 or lower, it reverts to using temporary files. + +compat51 (set using BASH_COMPAT) + - The `unset' builtin will unset the array a given an argument like + `a[@]'. Bash-5.2 will unset an element with key `@' (associative + arrays) or remove all the elements without unsetting the array + (indexed arrays) + - arithmetic commands ( ((...)) ) and the expressions in an arithmetic + for statement can be expanded more than once + - expressions used as arguments to arithmetic operators in the [[ + conditional command can be expanded more than once + - indexed and associative array subscripts used as arguments to the + operators in the [[ conditional command (e.g., `[[ -v') can be + expanded more than once. Bash-5.2 behaves as if the + `assoc_expand_once' option were enabled. + - the expressions in substring parameter brace expansion can be + expanded more than once + - the expressions in the $(( ... )) word expansion can be expanded + more than once + - arithmetic expressions used as indexed array subscripts can be + expanded more than once; + - `test -v', when given an argument of A[@], where A is an existing + associative array, will return true if the array has any set + elements. Bash-5.2 will look for a key named `@'; + - the ${param[:]=value} word expansion will return VALUE, before any + variable-specific transformations have been performed (e.g., + converting to lowercase). Bash-5.2 will return the final value + assigned to the variable, as POSIX specifies; + - Parsing command substitutions will act as if extended glob is + enabled, so that parsing a command substitution containing an extglob + pattern (say, as part of a shell function) will not fail. This + assumes the intent is to enable extglob before the command is + executed and word expansions are performed. It will fail at word + expansion time if extglob hasn't been enabled by the time the + command is executed. ------------------------------------------------------------------------------- diff --git a/CWRU/changelog b/CWRU/changelog index 085fdbd..da6d4aa 100644 --- a/CWRU/changelog +++ b/CWRU/changelog @@ -1,9326 +1,3952 @@ - 7/27/2004 + + 12/6/2020 --------- -[bash-3.0 released] +[bash-5.1 released] - 7/28 + 12/7 ---- -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" - -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 +Makefile.in + - bashline.o: add dependency on ${DEFDIR}/builtext.h. Report from + Fazal Majid -tests/{history,histexp}.tests - - unset HISTFILESIZE to avoid problems if a value of 0 is inherited - from the environment + 12/11 + ----- +builtins/wait.def + - wait_builtin: don't assign the variable given with -p if there are no + jobs to wait for. Report and fix from O�uz - 7/30 - ---- -bashline.c - - small changes to glob_expand_word to perform tilde expansion before - attempting globbing +arrayfunc.c + - kvpair_assignment_p: return non-zero if argument L appears to be a + key-value pair associative array compound assignment + - expand_and_quote_kvpair_word: run a single word in a key-value pair + associative array compound assignment through the appropriate + expansions and single-quote the result -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 +arrayfunc.h + - kvpair_assignment_p, expand_and_quote_kvpair_word: extern declarations - 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 + - expand_oneword: detect whether VALUE appears to be a key-value + pair compound assignment and call the appropriate function to expand + each word in the resulting list. Fixes inconsistency reported by + oguzismailuysal@gmail.com + 12/12 + ----- 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 + - command_substitute: don't reset pipeline_pgrp to shell_pgrp if we + are already forked to run a command (SUBSHELL_FORK). Fixes SIGINT + in command substitution in here-document in forked child issue + reported by oguzismailuysal@gmail.com -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) + 12/18 + ----- +execute_cmd.c + - execute_pipeline: execute the lastpipe code even if prev == 0. It + can only be 0 here if stdin was closed when this function was + executed + - execute_pipeline: if prev == 0, set lstdin to a sentinel (-1) that + means to close fd 0 after executing the command, and call close(prev) + before restoring stdin. restore_stdin now understands -1, and closes + fd 0. Fixes issue reported by Tomas Janousek + 12/21 + ----- 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 + - PROMPT_COMMANDS: clean up a couple of remaining instances of this + name. Report from Eli Schwartz -builtins/hash.def - - `hash' should print its `hash table empty' message to stderr + 12/26 + ----- +subst.c + - command_substitute: make sure that the child process always has + pipeline_pgrp == shell_pgrp: if pipeline_pgrp is non-zero when we + get to the child, meaning that we're part of an already-forked + child that is, for instance, running redirections, we need to reset + shell_pgrp to it to preserve the invariant. Fixes bug with terminal + being set to the incorrect pgrp reported by oguzismailuysal@gmail.com -lib/readline/misc.c - - back out 7/7 change to _rl_maybe_save_line; it breaks emacs-mode ^P + 12/29 + ----- +configure.ac,builtins/shobj-conf,m4/threadlib.m4 + - midnightbsd: update auto-configuration to treat MidnightBSD like + FreeBSD. From https://savannah.gnu.org/patch/?10006 -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 + 12/30 + ----- +examples/loadables/stat.c + - stattime: use strftime with a default format or the format supplied + with the -F option to format the file time information + - stat_builtin: now takes a -F fmt option for a strftime format string; + change to function calling sequences to pass the format down to + stattime -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 +examples/loadables/Makefile.in + - stat: now built and installed by default -{locale,variables}.c - - support LC_TIME as a special locale variable so HISTTIMEFORMAT tracks - the current locale + 12/31 + ----- +command.h + - SUBSHELL_IGNTRAP: new flag value - 8/2 - --- -variables.c - - fixed small memory leak in makunbound() when a local array variable - is unset. Fix from William Park +jobs.c + - make_child: set SUBSHELL_IGNTRAP in subshell_environment in the + child process, meaning that we should not execute trap handlers for + trapped signals -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 +execute_cmd.c + - execute_in_subshell, execute_simple_command, execute_disk_command: + make sure to unset SUBSHELL_IGNTRAP after a child process restores + the original signal dispositions + - execute_simple_command: make sure to set SUBSHELL_IGNTRAP after + make_child returns and we're setting subshell_environment directly -builtins/command.def - - `command -V' passes a new flag, CDESC_ABSPATH, which means to convert - to an absolute path +subst.c + - command_substitute,process_substitute: unset SUBSHELL_IGNTRAP after + the child process has reset the trapped signal dispositions -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 +trap.c + - trap_handler: if we get a signal for which we have set a trap, but + SUBSHELL_IGNTRAP is set in subshell_environmnent, make sure we + restore the original signal disposition and resend the signal to + ourselves. Fixes issue reported by Nikolay Borisov + (or at least makes the race window much smaller) -doc/bashref.texi - - add note to POSIX Mode section describing behavior of type and command - when finding a non-executable file +sig.c + - initialize_terminating_signal: set the original signal handler from + the return value from sigaction; a minor optimization that saves a + system call or two -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 + 1/5/2021 + -------- +builtins/declare.def + - declare_internal: make some option combinations that don't make + sense errors (e.g., -f and -a/-A/-i/-n) + - declare_internal: if we build a new variable name by expanding the + value of a nameref variable, make sure to chop the `+' in a `+=' + off before going on - 8/3 + 1/7 --- -braces.c - - make sure lhs[0] and rhs[0] are cast to `unsigned char' so chars - with values > 128 are handled correctly +doc/{bash.1,bashref.texi} + - bind: add an example to the synopsis making it clear that you can + use any readline command line as a non-option argument, as it says + in the text. From a report from Dan Jacobson -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 + 1/12 + ---- +locale.c + - local_shiftstates -> locale_shiftsates in the non-multibyte code + branch. Reported by Henry Bent subst.c - - fix a couple of instances of find_variable that didn't check the - result for an invisible variable + - expand_compound_assignment_word: make sure to call dispose_words on + the WORD_LIST * returned from expand_oneword after turning it back + into a string. Fixes memory leak reported by Alexander Mescheryakov + + 1/13 + ---- variables.c - - BASH_ARGC, BASH_ARGV, BASH_SOURCE, BASH_LINENO no longer created as - invisible vars + - bind_variable_internal: when performing an assignment to a subscripted + array variable that was the value of a nameref (used in the original + assignment), don't call make_variable_value on the value, since that + messes up +=. Just call assign_array_element and let that take care + of calling make_variable_value appropriately. Fixes bug reported by + Oguz -pcomplete.c - - make sure COMP_WORDS is not invisible when bind_comp_words returns - - ditto for COMPREPLY in gen_shell_function_matches + 1/14 + ---- +findcmd.c + - search_for_command: if `checkhash' is set, don't add non-executable + files to the command hash table, since we will just remove them + later - 8/4 - --- -braces.c - - fix problem where ${ was ignored but did not increment the open - brace count. Bug reported by Tim Waugh +lib/sh/winsize.c + - get_new_window_size: set *rp and *cp even if READLINE is not defined -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 + 1/15 + ---- +lib/sh/winsize.c + - get_new_window_size: call rl_set_window_size only if we can determine + we're using readline: an interactive shell without no-line-editing, + or if we've already initialized readline, presumably in a non- + interactive shell - 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) +support/Makefile.in + - man2html: add LDFLAGS_FOR_BUILD to the recipe. Report from + Jeffrey Walton - 8/7 - --- -configure.in - - kfreebsd-gnu has had its sbrk() problems fixed, and no longer needs - to be configured --without-gnu-malloc + 1/17 + ---- +lib/readline/misc.c + - rl_operate_and_get_next: fix old K&R function declaration. Report + from Tom Tromey -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 +lib/readline/readline.c + - _rl_internal_char_cleanup: move code that cleans up the active region + and deactivates the mark inside this function so callback mode + applications get the intended functionality. Report and fix from + sparrowhawk996@gmail.com - 8/9 - --- -support/Makefile.in - - renamed `mostly-clean' target to `mostlyclean' +lib/readline/bind.c + - rl_parse_and_bind: when using the arithmetic comparison operators on + the version, make sure to invert the tests so that we stop parsing + if the test fails. Report and fix from Tom Tromey - 8/11 + 1/19 ---- -lib/readline/vi_mode.c - - make same change for EOL in multibyte character case of - rl_vi_change_char +Makefile.in + - pipesize.h: add dependency on ${BUILTINS_LIBRARY} to avoid parallel + makes trying to create it twice. Report and fix from + Richard Purdie - 8/12 + 1/21 ---- 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) + - param_expand: if a nameref expands to array[@] or array[*], make sure + to call chk_atstar so the right variables are set to split the + result. Report from Oguz - 8/16 + 1/22 ---- -aclocal.m4 - - change BASH_CHECK_DEV_FD to make sure that file descriptors > 2 are - accessible via /dev/fd, unlike FreeBSD 5.x +builtins/declare.def + - Rewrote to reduce complexity. Still needs some work. -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/readline/*.h, lib/tilde/tilde.h + - PARAMS: remove, rely on compilers understanding function prototypes -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/readline/{undo.c,histlib.h} + - _hs_replace_history_data: move extern declaration to histlib.h -lib/malloc/{malloc.c,shmalloc.h} - - change sh_memalign to take a `size_t' as its first argument +lib/readline/readline.c + - _rl_parse_colors: instead of an extern declaration for this, include + "parse-colors.h" for it -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) +lib/readline/{histfile.c,histlib.h} + - _hs_append_history_line: move extern declaration to histlib.h -doc/bashref.texi - - amend description of bash posix mode to include new echo behavior +lib/readline/history.h + - HS_HISTORY_VERSION: define to 0x0801 (current library version) if + it's not already defined. We conditionally define it in case an + application has (unwisely) chosen to use it, since the history + library doesn't do anything with it yet -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/readine/{rlprivate.h,{search,misc,readline}.c} + - _rl_free_history_entry: add extern declaration to rlprivate.h, remove + extern declaration from c source files. Use HS_HISTORY_VERSION as a + sentinel that it's ok to use HIST_ENTRY in rlprivate.h -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 +lib/readline/{rlprivate.h,{isearch,search,undo}.c} + - _rl_saved_line_for_history: add extern declaration to rlprivate.h, + remove extern declaration from c source files, using HS_HISTORY_VERSION + in the same way - 8/18 + 1/24 ---- -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 +lib/readline/signals.c + - _rl_handle_signal: make sure that all sigprocmask calls are protected + by HAVE_POSIX_SIGNALS. Report and fix from Tom Tromey - 8/19 + 1/26 ---- -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) +lib/readline/callback.c + - rl_callback_read_char: make sure rl_linefunc is non-NULL before + calling through the pointer. The line function could have been + removed by the application before readline processes any typeahead + input. Bug reported by Matthias Klose , pointer + to root cause from Koichi Murase - 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 +lib/glob/glob.c + - skipname,wskipname: put in some additional checks for `.' to ensure + that we don't get false positives (or incomplete tests) that can + affect the results of extglob patterns. Reported by + gregrwm - 8/30 + 1/27 ---- -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 +lib/glob/glob.c + - extglob_skipname,wextglob_skipname: fixed an off-by-one error (SE + was being set to one character before the end of the pattern string, + not the null character at the end of the pattern string like other + callers of glob_patscan) that caused the last character of the last + subpattern to be cut off when calling skipname + - extglob_skipname,wextglob_skipname: some cleanups so the code is + closer to identical for the single-byte and wide character versions - 9/6 + 2/1 --- +execute_cmd.c + - execute_simple_command: in posix mode, if we have a variable + assignment error while assigning into the temporary environment (e.g., + assigning to a readonly variable), a non-interactive shell running a + special builtin exits; a non-interactive shell running anything else + jumps back to the top level. A shell compiled with -DSTRICT_POSIX + exits unconditionally. + - execute_simple_command: make sure posix mode sets $? to non-zero + if a variable assignment error occurs preceding a non-special builtin + 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 + - do_assignment_statements: take the code from expand_word_list_internal + that performs assignment statements, either standalone or preceding + simple command names, and factor it out into this function + - expand_word_list_internal: call do_assignment_statements where + appropriate - 9/8 + 2/2 --- -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) +lib/glob/glob.c + - dequote_pathname: fix function definition for non-multibyte systems. + Report and fix from Marc Aurèle La France -builtins/common.c - - new error function, sh_wrerror(), for builtins to call when a write - error occurs +Makefile.in,doc/Makefile.in + - for certain targets, remove files before creating them to deal with + symlinked build trees. + Report and fix from Marc Aurèle La France -builtins/common.h - - extern declaration for sh_wrerror() +examples/loadables/accept.c + - include limits.h before typemax.h + Report and fix from Marc Aurèle La France -builtins/cd.def - - change builtin_error call to use sh_wrerror() +builtins/gen-helpfiles.c + - if USING_BASH_MALLOC is defined, make sure to undefine malloc as well + as free. Fixes bug reported by George R Goffe -builtins/echo.def - - report write errors with sh_wrerror() instead of just returning - failure +builtins/Makefile.in + - install-help: now depends on $(HELPFILES_TARGET) so we make sure the + separate helpfiles are created before we try to install them if we + don't go through the `all' makefile target -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 +configure.ac + - HELPDIR: now ${datadir}/bash/helpfiles -execute_cmd.c - - change execute_in_subshell so the subshell command inherits the - command timing flags from the enclosing COMMAND * + 2/3 + --- +parse.y + - parse_string_to_word_list: before expanding a compound assignment + statement body, make sure to save any alias that's currently being + expanded. Restore the alias after the compound assignment is parsed. + Reported back in 11/2020 by Alex fxmbsw7 Ratchev - 9/11 - ---- -[prayers for the victims of 9/11/2001] + 2/4 + --- +lib/readline/histexpand.c + - history_expand_internal: when calling the history_inhibit_expansion + function, make sure to call it using the string as we've expanded it + to that point (RESULT), adding the expansion and next characters + temporarily, since we make expansion decisions based on what we've + accumulated, not what we started with. This makes things like + echo abc!$!$ work, where before the second `!' inhibited expansion + because bash_history_inhibit_expansion mistakenly took it as the + second character in a `$!' word expansion. Fixes bug reported back + in 10/2020 by Paul Fox -lib/sh/strnlen.c - - new file, implementation of GNU libc extension function strnlen +array.h + - array_pop: instead of calling array_dispose_element from this macro, + just call array_shift with the AS_DISPOSE flag -lib/sh/Makefile.in, {config.h,configure,Makefile}.in, MANIFEST - - changes for strnlen + 2/5 + --- +bashhist.c + - shell_comment: move condition to return 0 if the delimiter stack is + not empty or the shell is parsing a here document into the function + itself, don't have the callers check so the check is in one place. + Fixes bug reported by Oguz -configure.in - - version changed to 3.1-devel +array.h,variables.c + - ARRAY_ELEMENT_REPLACE: convenience define for modifying an array + element's value -doc/bash.1, lib/readline/doc/rluser.texi - - added description of `-o plusdirs' to complete/compgen (thanks, - Arnold) +variables.c + - pop_args: a couple of code simplifications -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 + 2/7 + --- +lib/malloc/malloc.c + - pagesz: at least MALLOC_PAGESIZE_MIN (4096) bytes + - union mhead: now 16-byte aligned on all systems, 32-bit and 64-bit + pointers + - binsizes: since the smallest allocation overhead is now 16 bytes, + redo the buckets so binsizes[0] == 32; adjust the thresholds for + split/coalesce/prepopulate/mmap (NBUCKETS = 28; STARTBUCK = 0). + Sizes stay pretty much the same; indices change + - consistently use MALLOC_SIZE_T instead of long/unsigned int/int + - use MAGIC8_NUMBYTES as the length of the mh_magic8 buffer, in case + it changes later for alignment + - internal_remap: new function, calls mremap to reallocate a chunk of + memory allocated using mmap(); called from internal_realloc if the + old size and new size are both bigger than the mmap threshold + - internal_realloc: call internal_remap if the old size and new size + are both above the threshold where we use mmap for allocation - 9/13 + 2/10 ---- -variables.c - - make BASH_ARGC, BASH_ARGV, BASH_LINENO, and BASH_SOURCE - non-unsettable, since the shell uses those values internally +include/timer.h + - new file, declaration for a timer struct to be used by a set of + functions to implement timers using SIGALRM or select/pselect -expr.c - - make exponentiation right-associative, as is apparently correct +lib/sh/timers.c + - new file, set of functions to manipulate timer objects and timeouts + using SIGALRM or select/pselect. Inspired by a patch from + Koichi Murase . Not used yet - 9/16 + 2/11 ---- -arrayfunc.c - - make sure convert_var_to_array marks the environment as needing - recreation if the converted variable was exported +builtins/read.def + - read_builtin: if there is a timeout set, block SIGCHLD around calls + to zread and its siblings, or calls to readline for `read -e', so + SIGCHLD (and the consequent waitpid) doesn't interrupt the read. + Fixes bug reported by Koichi Murase , but + there may be a different fix coming - 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 +Makefile.in,builtins/Makefile.in + - fix up dependencies, especially on builtins.h and builtext.h -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 + 2/12 + ---- +lib/readline/input.c + - rl_read_key: if we set rl_done == 1, set RL_STATE_DONE as well + Reported by Koichi Murase -lib/readline/display.c - - in compute_lcd_of_matches, explicitly cast `text' to `char *' before - passing it to rl_filename_dequoting_function +lib/readline/isearch.c + - _rl_search_getchar: only call _rl_read_mbstring if rl_read_key returns + >= 0, avoid some work -lib/readline/terminal.c - - bind the key sequence sent by the keypad `delete' key to delete-char - (same as ^D in emacs mode) +lib/readline/vi_mode.c + - _rl_vi_callback_change_char,_rl_vi_change_char: don't overwrite the + last replacement string if _rl_vi_callback_getchar returns -1. + It will likely make no difference, since the next read will return + an error or EOF, but being careful + - rl_vi_overstrike: if _rl_overwrite_char doesn't return 0, break out + of the loop -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 +lib/readline/text.c + - _rl_overwrite_char: return 1 if _rl_read_mbstring returns < 0 so + we don't try to insert garbage -doc/{bash.1,bashref.texi} - - fix description of correspondence between FUNCNAME, BASH_LINENO, - and BASH_SOURCE indices in description of BASH_LINENO +bashline.c + - posix_edit_macros: handle rl_read_key() returning <= 0 - 9/18 + 2/15 ---- -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 +parse.y + - read_comsub: make sure to turn on the LEX_RESWDOK flag if we are in + a case statement and read a `)', since we can get a valid `esac'. + Fixes bug reported by Oguz + - read_comsub: if we're in a case statement, recognize `}' as a + reserved word and set the LEX_RESWDOK flag for the next word, since + we can get an esac (or another reserved word) after it - 9/19 + 2/16 ---- -mailcheck.c - - change file_mod_date_changed to reset the cached mail file data if - the file size drops to zero +parse.y + - reserved_word_acceptable: add ARITH_CMD and COND_END to the list of + tokens that can precede a reserved word, so you can use reserved + words after ((...)) and [[...]]. + Reported by Koichi Murase -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 + 2/17 + ---- +parse.y + - parse_comsub: use new LEX_CASEWD flag to track when we are reading + the WORD in `case WORD in' and turn on the LEX_RESWDOK flag when + that word ends. This allows $(case x in esac), which no one uses. + - parse_comsub: use LEX_PATLIST flag to track when we are reading a + case pattern list so `|' doesn't turn on the LES_RESWDOK flag + - parse_comsub: case_level: simple counter to count the number of esacs + we need to see before we're no longer in a case statement; analog of + esacs_needed_count from the lexer -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 + 2/19 + ---- +parse.y + - CHECK_FOR_RESERVED_WORD: don't return ESAC if we read `esac' after a + left paren in a case pattern list. From an austingroup-bugs discussion + about https://www.austingroupbugs.net/view.php?id=1454 + - parse_comsub: if we read a `(' while looking for a case pattern list + and LEX_CKESAC is set, we have a leading left paren in the pattern + list and should turn off LEX_CKESAC so (esac) doesn't prematurely + terminate the case command. From an austingroup-bugs discussion + about https://www.austingroupbugs.net/view.php?id=1454 - 9/24 + 2/26 ---- -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 +builtins/history.def + - history_builtin: when checking negative offsets to -d, which are + supposed to count back from the end of the history list, check the + range against 0 instead of history_base, because the calculation is + done against history_length, which is independent of history_base. + Report and fix from Christopher Gurnee -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 + 2/28 + ---- +doc/bashref.texi + - replaced a number of uses of @var with a mixture of @env and @dfn + to better match up with the texinfo standards -general.[ch] - - new function bash_tilde_find_word, drop-in replacement for - tilde_find_word +doc/{bash.1,bashref.texi} + - clarify some aspects of the coproc description, especially the + use of NAME and when it's optional + 3/1 + --- 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 + - read_comsub: fix off-by-one error in mbrtowc that causes a read one + character past the end of buf. Report and fix from + Platon Pronko in + https://savannah.gnu.org/patch/?10035 -execute_cmd.c - - take out calls to bash_tilde_expand before calling word expansion - functions + 3/3 + --- +builtins/ulimit.def + - ulimit_builtin: Posix compatibility: if the last command specified + by an option does not have an option argument, but there is an + operand remaining after all the options are parsed, treat the + operand as an argument to that last command. From an austin-group + discussion and a Geoff Clare suggestion back in November, 2020. + Austin Group interpretation 1418 + +examples/shellmath + - a package of shell functions to perform floating-point math entirely + in bash. Contributed by Michael Wood . Available + at https://github.com/clarity20/shellmath - 9/26 - ---- -execute_cmd.c - - make sure to call UNBLOCK_CHILD before returning on a pipe creation - failure in execute_pipeline + 3/4 + --- +support/shobj-conf + - darwin: take out the -arch-only option in SHOBJ_XLDFLAGS and + SHOBJ_ARCHFLAGS; no longer needed - 9/27 - ---- -variables.c - - change get_bash_command to deal with the_printed_command_except_trap - being NULL +doc/{bash.1,bashref.texi} + - coprocesses: suggested changes from rms@gnu.org; recommend the + `coproc NAME { commands; }' form as the simplest and most flexible -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() + 3/5 + --- +builtins/exec.def + - exec_builtin: set last_command_exit_value before calling exit_shell + so any exit trap gets the right value for $?. From Matthew Bauer + via https://savannah.gnu.org/patch/?10039 -parse.y - - change the parser so that the closing `)' in a compound variable - assignment delimits a token -- ksh93 does it this way + 3/8 + --- +include/timer.h + - SHTIMER_ALRMSET: new flag, indicates that there is an active alarm + associated with this timer (falarm() was called) -doc/{bash.1,bashref.texi} - - change description of tilde expansion to note that expansion is - attempted only after the first =~ in an assignment statement +lib/sh/timers.c + - shtimer_set: set the SHTIMER_ALRMSET flag after calling falarm + - shtimer_unset: don't call falarm(0,0) unless the SHTIMER_ALRMSET flag + is set -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 + 3/9 + --- +include/posixtime.h + - added some BSD convenience defines if they are not present - 9/28 +parse.y,shell.h + - {save,restore}_parser_state: save and restore shell_eof_token and + pushed_string_list; change callers (e.g., xparse_dolparen) so they + don't have to manage them + + 3/10 ---- -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 +builtins/common.h + - extern declarations for moving to timers (sh_timer) for read builtin + timeouts -parse.y - - set W_COMPASSIGN on words that appear to be compound assignments +quit.h + - CHECK_ALRM: remove, no longer used -subst.c - - pass W_NOXPAND and W_COMPASSIGN through end of expand_word_internal +trap.c + - check_signals: call check_read_timeout instead of CHECK_ALRM -subst.[ch] - - new function, expand_assignment_string_to_string, calls - expand_string_assignment and then string_list on the result +bashline.c + - bash_event_hook: use read_timeout instead of checking `sigalrm_seen'; + that no longer exists + - bash_event_hook: accommodate readline timing out (not used yet) -variables.c - - assign_in_env now calls expand_assignment_string_to_string +lib/sh/zread.c + - zread: call read_builtin_timeout() to check for a timeout before + calling a blocking read() + +builtins/read.def + - sigalrm,reset_timeout,check_read_timeout,read_builtin_timeout: new + and modified functions to use sh_timers for timeouts instead of + SIGALRM. Based on work contributed by Koichi Murase + + - read_builtin: use sh_timers for read timeouts (-t N) instead of + using SIGALRM + - edit_line: simulate receiving SIGALRM if readline times out (not + used yet) - 9/30 + 3/11 ---- -builtins/common.c - - change get_job_spec so the null job `%' once again means the current - job +lib/readline/readline.c + - rl_initialize: call _rl_timeout_init to set things up for any timeout + that was set with rl_set_timeout + - readline_internal_charloop: if we longjmped because of a timeout, + make sure to set rl_done/RL_STATE_DONE and return; we are + abandoning this call to readline(). The readline timeout changes + were based on work contributed by Koichi Murase + - 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 +lib/readline/readline.h + - extern declarations for new timeout functions and hook + - rl_clear_timeout: new define -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 +lib/readline/callback.c + - rl_callback_read_char: if we longjmped because of a timeout, + make sure to set rl_done/RL_STATE_DONE and return; we are + abandoning this call to readline() -general.h - - new typedef, sh_wassign_func_t, like sh_assign_func_t but takes a - WORD_DESC * as its first argument +lib/readline/util.c + - _rl_abort_internal: if we time out, don't ring the bell; let the + caller handle it -variables.[ch] - - assign_in_env now takes a WORD_DESC * as its first argument +lib/readline/input.c + - extern declarations for public and readline-library-private functions + and hooks to implement timeouts + - rl_set_timeout,rl_timeout_remaining: new public functions + - _rl_timeout_select: new function, uses select/pselect to implement + read timeouts that take timeouts set with rl_set_timeout into account; + calling hook function if a timeout occurs + - rl_gather_tyi, _rl_input_available: use _rl_timeout_select, taking + any existing timeout into consideration if it expires before the + timeout passed as an argument + - rl_getc: use _rl_timeout_select and handle any timeouts by calling + _rl_timehout_handle + - set_alarm,reset_alarm: new functions to implement timeouts using + SIGALRM for systems that lack a working select/pselect + - _rl_timeout_init: new function, sets things up for reading input + with a specified timeout + - _rl_timeout_handle: a timeout handler; calls any event hook and + sets up to abort the current readline() call + - _rl_timeout_handle_sigalrm: a timeout handler for systems using + SIGALRM to implement timeouts + +lib/readline/parens.c + - rl_insert_close: use _rl_timeout_select to take timeouts into account - 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 +lib/readline/rlprivate.h + - extern declarations for readline-library-private timeout functions -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 +lib/readline/rltty.c + - rl_deprep_terminal: don't print a newline after the bracketed paste + disable sequence if we timed out +lib/readline/signals.c + - _rl_handle_signal: if sig is SIGALRM, call _rl_timeout_handle_sigalrm() + +lib/readline/doc/rltech.texi + - rl_set_timeout,rl_timeout_remaining: document new public functions + - RL_STATE_TIMEOUT: document new possible state value for rl_readline_state + - rl_timeout_event_hook: document new hook function, called when + readline times out + +builtins/read.def + - read_builtin: changes to use the readline timeout functions to + implement timeouts with `read -e'; these use rl_set_timeout and + sh_timer structs together + + 3/12 + ---- 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 + - expand_string_dollar_quote: new function, expands $'...' and $"..." + in a string for those code paths that don't expand it themselves -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 +subst.h + - expand_string_dollar_quote: extern declaration -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 +parse.y + - read_secondary_line: if $'...' or $"..." appears in the line, call + expand_string_dollar_quote to expand them. This now returns new + memory, need to change callers -lib/readline/complete.c - - fixed rl_menu_complete so that a negative argument cycles backwards - through the list +make_cmd.c + - make_here_document: account for read_secondary_line returning newly + allocated memory, free `full_line' appropriately + +bashline.c + - shell_expand_line,history_and_alias_expand_line: expand $'...' and + $"..." in the line by calling expand_string_dollar_quote, since + that happens after history expansion and before alias expansion in + normal processing - 10/3 + 3/15 ---- subst.c - - use W_COMPASSIGN flag in do_assignment_internal instead of deciding - lexically which assignments are compound array assignments + - expand_string_dollar_quote: fix out-of-order initialization - 10/6 - ---- -support/shobj-conf - - additions for System V.5 from Boyd Gerber +Makefile.in + - {TAGS,tags}: add ETAGS/ETAGSFLAGS/CTAGS/CTAGS flags; make sure to + cd to the source directory before running them to get source files + that don't have absolute paths. Fix from Mike Jonkmans + -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 +parse.y + - xparse_dolparen: don't longjmp if FLAGS includes SX_NOLONGJMP. From + a report by Xu Lu - 10/7 + 3/16 ---- -config.h.in - - add a placeholder definition for WCONTINUED_BROKEN +subst.c + - process_substitute: set startup_state and parse_and_execute_level + to see if we can avoid a fork() - 10/9 - ---- -aclocal.m4 - - add BASH_CHECK_WCONTINUED, checks for glibc bug where WCONTINUED is - defined but rejected as invalid by waitpid(2) +bashline.c + - bash_spell_correct_word: bindable command (spell-correct-word) to + perform spelling correction on the current `shellword', using the + same code as the `cdspell' option and directory spelling correction + during completion. Feature suggested by in 10/2020 by + Karl Kleinpaste + - bash_spell_correct_word: bound to "C-x s" by default in emacs mode -configure.in - - add call to BASH_CHECK_WCONTINUED, defines WCONTINUED_BROKEN +lib/readline/display.c + - rl_redisplay: fix redisplay problem that occurs when switching from + the rl-digit-argument prompt "(arg: N)" back to the regular prompt, + and the regular prompt contains invisible characters -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,lib/readline/doc/rluser.texi + - spell-correct-word: document new function and its default binding + 3/17 + ---- 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 + - cd: slight changes to specify that it sets PWD and OLDPWD + - {pushd,popd}: make it clear that these builtins use cd to change + the current working directory; change wording to simplify the + description and clarify the exit status - 10/11 - ----- + 3/18 + ---- +execute_cmd.c + - execute_disk_command: after performing redirections, call + unlink_all_fifos() to remove the FIFOs created as part of + expanding redirections. They should have been opened by then, and + we're going to call shell_execve right away anyway, so we won't be + around to remove the FIFOs. From a report from + Michael Felt + + 3/22 + ---- 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) + - alias_expand_token: slight tweak to check for alias expansion: perform + expansion unconditionally if PST_ALEXPNEXT is set, and disable it + in case statement pattern lists if the previous token indicates a + command name is acceptable. + From a report by Oguz - 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 +config-bot.h + - HAVE_MKDTEMP: fix typo -lib/readline/rlprivate.h - - new extern declaration for _rl_bind_stty_chars + 3/25 + ---- +lib/readline/terminal.c + - look in terminfo for key sequences for page up (kP) and page down + (kN) and bind them to history-search-{backward,forward}, + respectively. From a patch from Xose Vazquez Perez + -lib/readline/rltty.c - - change rl_prep_terminal to add support for _rl_bind_stty_chars + 3/30 + ---- +doc/bashref.texi + - expand the node describing $"..." string translation with additional + details and examples - 10/15 - ----- -lib/readline/bind.c - - new bindable variable, `bind-tty-special-chars', bound to value of - _rl_bind_stty_chars + 3/31 + ---- +misc.c + - rl_fetch_history: moved here from vi_mode.c + - rl_fetch_history: negative arguments count back from the end of + the history, instead of taking you to the beginning of the history + list + - rl_fetch_history: in vi mode, an out-of-range argument rings the + bell and doesn't change the line + +vi_mode.c + - rl_vi_fetch_history: call rl_fetch_history + +readline.h + - rl_fetch_history: new extern declaration doc/bash.1,lib/readline/doc/{readline.3,rluser.texi} - - documented new readline variable `bind-tty-special-chars' + - rl_fetch_history: add description -builtins/pushd.def - - make the first check for option `--' skip the rest of option - checking +builtins/setattr.def + - show_var_attributes: if a variable's value indicates that it should + be ANSI-C quoted, use ansic_quote instead of sh_double_quote to + format the value string. From proposal by Greg Wooledge + - 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 + 4/5 + --- +arrayfunc.c + - unbind_array_element: if FLAGS includes VA_ONEWORD, don't use + skipsubscript to parse the subscript, just assume the entire SUB is + the subcript and that it contains the closing `]', so we just want + everything in SUB except the last character. - 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 +parse.y: + - select_command: use compound_list instead of list, like for_command. + Report by Greywolf + - list: move this into compound_list (replacing the instance of `list' + in the compound_list production), remove from the grammar -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 + 4/6 + --- +arrayfunc.c + - unbind_array_element: use VA_NOEXPAND instead of literal 1 -externs.h - - new extern declaration for sh_mkdoublequoted + 4/7 + --- +lib/readline/funmap.c + - default_funmap: add missing `vi-undo' to the list of vi-mode bindable + functions. Reported by Xirui Zhao -parse.y - - use sh_mkdoublequoted after calling localeexpand() + 4/8 + --- -lib/sh/strtrans.c - - change ansicstr to understand that (flags & 4) != 0 means to remove - backslash from unrecognized escape sequences +config-top.h + - DEFAULT_LOADABLE_BUILTINS_PATH: default value for BASH_LOADABLES_PATH -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 +doc/{bash.1,bashref.texi} + - enable: note that it uses $BASH_LOADABLES_PATH, and that the default + is system-dependent - 10/21 - ----- -bashline.c - - don't call programmable_completions with an assignment statement - argument +variables.c + - initialize_shell_variables: initialize BASH_LOADABLES_PATH to the + default given in DEFAULT_LOADABLE_BUILTINS_PATH - 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 + 4/12 + ---- +doc/{bash.1,bashref.texi} + - add link to git master tar file as a place to get the current version - 10/24 - ----- -lib/readline/util.c - - include rlmbutil.h for multibyte definitions - - new function, _rl_walphabetic, wide char version of rl_alphabetic + 4/14 + ---- +bashline.c + - attempt_shell_completion: use -1 as a sentinel value for + in_command_position indicating that we cannot be in a command position + (e.g., because we're the target of a redirection) and should not + check for a programmable command completion or tell the programmable + completion code to use command completion. Report and fix from + Marc Aurèle La France -lib/readline/mbutil.c - - new function, _rl_char_value(buf, ind), returns value of (possibly - multibyte) character at buf[ind] + 4/16 + ---- +builtins/bind.def + - bind_builtin: reverse sense of strvec_search return value when + deciding whether or not to remove a unix-command binding from the + cmd keymap. Bug report by Dale Sedivec -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/doc/rltech.texi + - RL_PROMPT_{START,END}_IGNORE: document current values of \001 and + \002. Report from Mingye Wang -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 + 4/19 + ---- +arrayfunc.c + - assign_assoc_from_kvlist: fix memory leak reported by konsolebox + - 10/26 - ----- -parse.y - - fix parse_matched_pair so that it doesn't swallow \ when - parsing a $'...' construct (call shell_getc with different arg) + 4/20 + ---- +command.h,subst.c + - W_ITILDE: remove, replace with a variable since it's only used inside + a single call to expand_word_internal - 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 + 4/21 + ---- +{subst.c,make_cmd.c,parse.y} + - W_DQUOTE: no longer used, use W_NOPROCSUB and W_NOTILDE directly + (for arithmetic commands and words in arithmetic for commands) -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 + 4/24 + ---- +bashline.c + - executable_completion: since this function gets an unquoted filename + from rl_filename_completion_function, we need to quote special + characters before passing it to bash_directory_completion_hook. + Report from Alex fxmbsw7 Ratchev - 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) + 4/26 + ---- +lib/readline/search.c + - _rl_nsearch_abort: move function calls around so _rl_restore_prompt + happens before rl_clear_message, like when aborting an incremental + search. Suggested by sparrowhawk996@gmail.com -shell.c - - make sure shell_is_restricted skips over a single leading `-' in - the shell name (from SUSE, but not sent in) +subst.h + - ASS_ALLOWALLSUB: new assignment flag value, means to allow @ and * as + valid array subscripts when assigning to existing associative arrays -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) +arrayfunc.c + - assign_array_element: allow assignment of key `@' to an existing + associative array if the caller passes ASS_ALLOWALLSUB + - assign_compound_array_list: allow ( [@]=value ) to an existing + associative array -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) +builtins/declare.def + - declare_internal: allow assignment of key `@' to an existing + associative array by passing ASS_ALLOWALLSUB to assign_array_element + as part of local_aflags. This affects declare, local, and typeset - 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 +subst.c + - do_assignment_internal: allow a[@]=value to an existing associative + array by passing ASS_ALLOWALLSUB to assign_array_element - 11/5 + 4/27 ---- -general.c - - change `assignment()' to accept `+=' assignment operator +builtins/common.[ch] + - builtin_bind_var_to_int: wrapper for bind_var_to_int to be used by + builtin commands; placeholder for future work -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 +builtins/wait.def + - builtin_bind_var_to_int: use instead of bind_var_to_int -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 +builtins/common.c + - builtin_bind_variable: allow assignment of key `@' to an existing + associative array by passing ASS_ALLOWALLSUB to assign_array_element. + This affects printf and read -arrayfunc.c - - change callers of make_variable_value to add flags arg +builtins/variables.[ch] + - bind_var_to_int: add third `flags' argument to pass to bind_variable + instead of always passing 0 -builtins/declare.def - - change callers of bind_variable_value to add flags arg +redir.c,builtins/common.c,builtins/printf.def + - bind_var_to_int: change callers, add third flags argument -{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 +builtins/common.c + - builtin_bind_var_to_int: pass ASS_ALLOWALLSUB to bind_var_to_int so + builtins like wait can assign to assoc[@] and assoc[*] -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' + 4/28 + ---- +bashline.c + - command_word_completion_function: make sure to initialize + old_glob_ignore_case before trying to restore from it + - command_word_completion_function: if we are completing a glob + pattern, make sure to set rl_filename_completion_desired, so we get + quoting and appending -- we are completing a filename, after all. + From a report from Manuel Boni -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 +lib/readline/bind.c + - enable-active-region: separate control of the active region and + bracketed paste. Still set to the same default value as bracketed + paste, and enabling bracketed paste enables the active region. + Now you can enable bracketed paste and then turn off the active + region. - 11/7 +doc/bash.1,lib/readline/doc/{readline.3,rltech.texi} + - enable-active-region: document new bindable readline variable and + its effects + + 4/30 ---- -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 +command.h + - W_ARRAYREF: new flag, meaning the word is a valid array reference + with subscript, replaces W_DOLLARSTAR, which was unused -builtins/setattr.def - - add support for `+=' assignment for rest of `assignment builtins': - export, readonly +subst.c + - expand_subscript_string,expand_array_subscript: new functions to + parse and expand-and-quote array subscripts. For future use - 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 + 5/3 + --- +builtins/mapfile.def + - mapfile: if the delimiter is a newline, set unbuffered_read = 1 + for any file descriptor that isn't seekable and lseek sets errno + to ESPIPE (pipes, FIFOs, maybe terminal devices). If it's not a + newline, only allow buffered reads if the file descriptor is a + regular file. Report from Koichi Murase - 11/14 - ----- -{configure,config.h}.in - - check for `raise', define HAVE_RAISE if available +builtins/read.def + - read_builtin: only set unbuffered_read = 1 if the input is coming + from a pipe (which we can't seek on) or the input is a terminal and + we want to read a specified number of characters or we're using a + non-standard delimiter -lib/intl/dcigettext.c - - make sure `raise' is defined if HAVE_RAISE is not before - eval-plurah.h is included + 5/4 + --- -lib/malloc/trace.c - - put extern declaration for imalloc_fopen inside the MALLOC_TRACE - #ifdef +builtins/mapfile.def + - mapfile: call zsyncfd before calling the callback. Suggested by + Koichi Murase ; we'll see how it goes - 11/16 - ----- -lib/intl/Makefile.in - - make sure SHELL is defined to cpp + 5/5 + --- +subst.h + - expand_subscript_string: extern declaration -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 +{arrayfunc,subst}.c + - expand_subscript_string: replace expand_assignment_string_to_string + with calls to this when expanding array subscripts - 11/18 - ----- -trap.[ch] - - new function, int signal_in_progress(int sig), returns TRUE if the - trap handler for signal SIG is currently executing +subst.c + - cond_expand_word: call expand_word_internal with Q_ARITH if `special' + says we should quote for an arithmetic expression context + - expand_word_internal: call expand_array_subscript when we see `[' in + arithmetic or array subscript contexts, make conditional on the + compatibility level later + - expand_word_internal: make sure W_ARRAYREF makes it through this + function and into the returned word - 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 + 5/6 + --- - 11/20 - ----- -doc/{bash.1,bashref.texi} - - correct some minor typos, forwarded from doko@debian.org +arrayfunc.c + - array_expand_index: call evalexp with a flag of 0 since we call + expand_arith_string with Q_ARITH and we want evalexp to remove + the quotes + +execute_cmd.c + - eval_arith_for_expr,execute_arith_command: now that Q_ARITH has an + effect on array subscripts (it quotes the special expansion + characters), call evalexp with 0 as the flags arg so quote removal + is performed on this quoted argument. Make this conditional on the + shell compatibility level later + - execute_cond_command: make sure to expand the argument to -v by + calling cond_expand_node with Q_ARITH, and correspondingly turn off + assoc_expand_once when calling unary_test with that argument, since + we want it to be expanded again to remove the quotes + - execute_cond_command: expand the arguments to the arithmetic operators + with Q_ARITH and pass TEST_ARITHEXP to binary_test to ensure that + it lets evalexp expand the arguments to remove the quoting - 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) +test.c + - arithcomp: if TEST_ARITHEXP is in FLAGS, call evalexp with a flag + if 0 to force evalexp to expand the arguments to remove the quoting + +subst.c + - param_expand: since we call expand_arith_string with Q_ARITH, we need + to call evalexp with 0 instead of EXP_EXPANDED for $((...)) expansion + - expand_word_internal: if we recursively call expand_word_internal to + expand the contents of a double-quoted string, make sure we pass + through Q_ARITH if it appears in QUOTED + - verify_substring_values: call expand_arith_string with Q_ARITH and + correspondingly call evalexp with 0 instead of EXP_EXPANDED - 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 + - execute_cond_node: if -v is the operator, and the operand is a valid + array reference, pass TEST_ARRAYEXP flag to unary_test - 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' + 5/7 + --- +builtins/common.[ch] + - set_expand_once: set array_expand_once to the value passed as the + first argument, returning the original value -lib/sh/strftime.c - - don't try to redefine `inline' if it's already defined +builtins.h + - ARRAYREF_BUILTIN: new flag for shell builtins, means that the builtin + can take array references, with subscripts, as arguments + +builtins/mkbuiltins.c + - set ARRAYREF_BUILTIN flag on builtins given in the arrayvar_builtins + array - 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 + - execute_cond_node: use set_expand_once to set array_expand_once to 0 + before calling unary_test with -v (see change from 5/6) - 11/27 - ----- -builtins/evalfile.c - - make same changes as 11/26, this time to _evalfile +arrayfunc.c + - unbind_array_element: allow the caller to choose whether or not a + subscript of `*' or `@' unsets the entire array by passing + VA_ALLOWALL in FLAGS. Right now, since the unset builtin doesn't + pass VA_ALLOWALL, those subscripts unset individual elements for + associative arrays. We preserve the old behavior of unsetting + indexed arrays for the time being with new indexed-array-specific + code -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 + 5/9 + --- -trap.c - - change reset_or_restore_signal_handlers so that the RETURN trap is - not inherited by command substitution when DEBUGGER is not defined +builtins/shopt.def + - expand_once_flag: "assoc_expand_once" option now sets this flag, + calls set_assoc_expand on change + - set_assoc_expand: sets assoc_expand_once to mirror expand_once_flag; + placeholder for future changes - 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 +builtins/common.h + - expand_once_flag: extern declaration - 12/1 + 5/10 ---- -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 + - note that case patterns undergo quote removal. Reported by + AlvinSeville7cf - 12/2 + 5/11 ---- -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 +builtins/bashgetopt.c + - list_optflags: flags associated with the word corresponding to + list_optarg, assuming list_optarg is a separate argument - 12/10 - ----- -lib/readline/bind.c - - make new-style "\M-x" keybindings obey `convert-meta' settings - (bug reported by twaugh@redhat.com) +builtins/bashgetopt.h + - list_optflags: extern declaration - 12/14 - ----- builtins/set.def - - added description of `-' option to help text + - unset_builtin: set VFLAGS each time through the loop, since we take + whether or not the word has W_ARRAYREF set into account + - unset_builtin: don't pass VA_ALLOWALL to unbind_array_element for + now -builtins/shopt.def - - fix bug that caused `gnu_errfmt' to not be compiled in unless - READLINE is defined +test.c + - unary_test: in the -v case, use assoc_expand_once in the first call + to valid_array_reference () - 12/16 - ----- -subst.c - - fixed a typo in string_extract_verbatim in first call to MBLEN - (used `slen - 1' instead of `slen - i') +builtins/printf.def + - printf_builtin: only set VA_ONEWORD if the option argument to -v has + W_ARRAYREF set (look at list_optflags) - 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) + 5/12 + ---- - 12/18 - ----- subst.c - - in string_list_dollar_star, make sure to null-terminate the - separator if the character is longer than one byte + - expand_array_subscript: don't quote @ or * in the expanded subscript + at all, even when they are the only character in the subscript. See + how this works out -- it might uncover places where we need to allow + `*' and `@' as subscripts where they are not allowed now - 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 +expr.c + - expr_bind_variable: pass ASS_ALLOWALLSUB to bind_int_variable so we + can allow (( A[@]=value )) when A is an existing associative array - 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 +arrayfunc.h + - AV_ATSTARKEYS: new flag value, means to accept a[@] and a[*] but + treat them as keys/expressions and not special values -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 +arrayfunc.c + - array_value_internal: check AV_ATSTARKEYS and don't treat them as + ALL_ELEMENT_SUB values; they fall through to use as keys/indices - 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) +test.c + - unary_test: if -v is passed an array reference, add AV_ATSTARKEYS to + the flags passed to array_value so we treat @ and * as keys for an + existing associative array -builtins/Makefile.in - - pass `-S' to mkbuiltins if single-help-strings is turned off + 5/13 + ---- -doc/bashref.texi - - documented new `single-help-strings' configure option +subst.c + - expand_cond_word: if SPECIAL == 3 (arithmetic expression), dequote the + resulting WORD_LIST * as if special == 0, because we don't want to + quote the list for pattern matching. Report from + Adjudicator Darren - 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 + 5/14 + ---- +subst.c + - expand_array_subscript: add double quote (") to the list of characters + that are backslash-quoted in subscripts after word expansion. + skipsubscript treats them specially, so you have to quote them to + do things like `key='"' ; array[$key]=1 ; [[ -v array[$key] ]]' - 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 + 5/16 + ---- - 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 +builtins/wait.def + - wait_builtin: if we longjmp to wait_intr_buf, call unset_waitlist if + we have called set_waitlist (wflags & JWAIT_WAITING). Fixes bug with + wait -n interrupted by a trapped signal (not SIGINT) reported by + Jonas Alfredsson -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) +jobs.c + - wait_sigint_cleanup: restore the old sigint handler before we longjmp + out by calling restore_sigint_handler() -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 + 5/17 + ---- +builtins/read.def + - bind_read_variable: now takes an additional argument, flags to pass + to builtin_bind_variable; change callers + - SET_VFLAGS: set vflags and bindflags + - read_builtin: call SET_VFLAGS to set vflags and bindflags from each + word before calling valid_array_reference and bind_read_variable -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) +builtins/common.c + - builtin_bind_variable: set vflags (for valid_array_reference) and + bindflags (for bind_variable/assign_array_element) separately for + clarity -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) +arrayfunc.c + - assign_array_element: sanity check: make sure that the subscript + returned by array_variable_name consumes the entire NAME, otherwise + flag it as a subscript error. This keeps things like + `KEY=' ]'; read assoc[$KEY] <<< hello' from assigning to incomplete + subscripts - 1/13 +builtins/printf.def + - printf_builtin: if LIST_OPTFLAGS includes W_ARRAYREF, set VA_NOEXPAND + in VFLAGS + + 5/17 ---- -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 +lib/readline/complete.c + - compute_lcd_of_matches: move a couple of strlen calls out of a loop + in calls to mbrtowc; performance improvement only. Report and fix + from sparrowhawk996@gmail.com -make_cmd.h - - extern declaration for alloc_word_desc +lib/readline/bind.c + - rl_trim_arg_from_keyseq: take a key sequence and its length and + return the index into the key sequence following any initial numeric + argument. Return -1 if there is no numeric argument (the caller is + expected to make sure) or if the key sequence consists *only* of + the numeric argument. The caller should use the remainder of the + key sequence to look up the desired key binding. -dispose_cmd.c - - new function to just free a WORD_DESC * without freeing the contained - string: dispose_word_desc +lib/readline/readline.h + - rl_trim_arg_from_keyseq: extern declaration -dispose_cmd.h - - extern declaration for dispose_word_desc +bashline.c + - bash_execute_unix_command: if the argument count is > 1 or we have + an explicit argument, call rl_trim_arg_from_keyseq to get past the + numeric argument and deal with the rest of the key sequence. We still + need a way to pass it to the invoked program or function. From + a report from Jesper Nygards -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' + 5/18 + ---- -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 +bashline.c + - bash_execute_unix_command: if the user supplied a numeric argument + when invoking bash_execute_unix_command, pass it to the command in + the READLINE_ARGUMENT variable - 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 +lib/readline/readline.[ch] + - _rl_del_executing_keyseq: convenience function to `delete' the last + character added to the executing key sequence. Intended to be used + before calling rl_execute_next or similar functions that push input + back to be re-read - 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 +doc/{bash.1,bashref.texi} + - READLINE_ARGUMENT: documented new variable available for commands + defined using `bind -x' keybindings -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 +lib/readline/doc/rltech.texi + - rl_trim_arg_from_keyseq: documented new function - 1/20 + 5/19 ---- -lib/readline/history.c - - fix replace_history_entry, remove_history to return NULL if - passed index is < 0 - 1/22 +builtins/evalstring.c + - should_suppress_fork: suppress the fork if we're in a process + substitution subshell, in addition to being a simple command + without redirections. From a report back in 10/2020 from + Hyunho Cho + +bashline.c + - command_word_completion_function: if we're trying to complete an + absolute program (one containing a slash), don't run strcmp or + strcasecmp on the return value from rl_filename_completion_function, + since that duplicates work the filename completion function already + does. From a report back in 1/2021 by awa54@cdak.net + + 5/22 ---- -lib/sh/netconn.c - - fix isnetconn() to understand that getpeername can return ENOTCONN - to indicate that an fd is not a socket +parse.y + - CHECK_FOR_RESERVED_WORD: if we are returning an ESAC and unsetting + PST_CASESTMT, decrement esacs_needed_count -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) +parse.y,shell.h + - sh_parser_state_t: save and restore esacs_needed_count and + expecting_in_token in the shell parser state struct and + save_parser_state/restore_parser_state -Makefile.in - - use $(SIZE) instead of size; set SIZE from configure +print_cmd.c + - print_simple_command: don't bother to call command_print_word_list + with an empty list + - print_simple_command: don't print a space before a redirection list + if there weren't any command words to print - 1/31 + 5/24 ---- -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) +lib/sh/input_avail.c + - nchars_avail: make sure SET and OSET are declared on systems with + select(2). Reported by Larkin Nickle - 2/2 - --- +parse.y + - cond_term: if we read a `!' toggle CMD_INVERT_RETURN instead of + setting it unconditionally. Report and patch from + Vincent Menegaux via + https://savannah.gnu.org/patch/?10070 -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 + 5/25 + ---- +doc/{bash.1,bashref.texi} + - test: add the ( $2 $3 ) case to the description of the four-argument + behavior. Inspired by a discussion with Christoph Anton Mitterer + -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 + 5/27 + ---- +doc/bashref.texi + - replace most of the GNU parallel section with a reference to the + tutorial on gnu.org - 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 +lib/glob/glob.h + - GX_NEGATE: new flag; indicates whether the pattern is being negated + as part of an extglob pattern. Not used yet -parse.y - - move test for backslash-newline after pop_string in shell_getc so - that things like +lib/glob/glob.c + - extglob_skipname,wextglob_skipname: pass GX_NEGATE to the skipname + functions if the pattern is being negated. Not checked yet - ((echo 5) \ - (echo 6)) + 5/28 + ---- +doc/{bash.1,bashref.texi} + - dotglob: add text to clarify that `.' and `..' have to be matched by + a pattern beginning with `.' or -- and this is the sketchy part -- + that a pattern beginning with `.' has to be one of the patterns in + an extended glob expression - work right +lib/glob/glob.c + - skipname,wskipname: perform the special checks for `.' only if the + pattern is not being negated - 2/8 + 6/3 --- -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 +parse.y,shell.h + - eol_ungetc_lookahead: save and restore as part of the parser state + included in {save,restore}_parser_state - 2/9 + 6/7 --- -jobs.c - - change wait_for_single_pid to look for pid in bgpids.list (using - bgp_search()) if find_pipeline returns NULL +lib/readline/display.c + - puts_face: make sure to cast each member of STR to unsigned char, so + it's not misinterpreted as EOF, which putc_face does not display. + Report and fix from Volodymyr Prodan in + https://savannah.gnu.org/patch/?10076 - 2/10 +examples/shobj-conf + - aix*gcc: change SHOBJ_LD to ${CC}, prefix the SHOBJ_LDFLAGS flags + with -Wl, so gcc will pass them to the linker. Report from + lehel@maxer.hu in https://savannah.gnu.org/support/?110505 + + 6/11 ---- -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 +doc/{bash.1,bashref.texi} + - cd: additional arguments are not ignored; they raise an error. + Report from Douglas McIlroy + +lib/glob/strmatch.h + - FNM_DOTDOT: enable special handling for `.' and `..': if FNM_PERIOD + is not set, `.' and `..' at the start of a string or as a pathname + component need to be matched by a `.' in the pattern and cannot be + matched by `?', `*', or a bracket expression + +lib/glob/glob.c + - glob_vector: pass FNM_DOTDOT to strmatch() if noglob_dot_filenames + is not set to enable special handling of `.' and `..'. Prompted by a + discussion with Nora Platiel + - skipname,wskipname: remove special checks for `.' and (disabled) + checks for `..' - 2/11 +lib/glob/sm_loop.c + - GMATCH: implement special handling for FNM_DOTDOT and `.' and `..': + make sure they can't be matched by any special glob characters at + the start of the string or as a pathname component (if FNM_PATHNAME + is set). This also means that !(pattern) won't return `.' or `..' + if dotglob is set + - GMATCH,EXTMATCH: don't pass FNM_DOTDOT down to recursive calls, like + FNM_PERIOD, once we process the first character in the string or + pathname component + +lib/glob/smatch.c + - ISDIRSEP,PATHSEP,SDOT_OR_DOTDOT,PDOT_OR_DOTDOT: provide definitions + for single-byte or wide character strings for sm_loop.c to use + + 6/16 ---- -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 +doc/{bash.1,bashref.texi},lib/readline/doc/{rluser,rltech}.texi + - slight wording changes to rewrite gender-specific language. From a + report by Vipul Kumar , suggested + language from G. Branden Robinson , + Lawrence Velázquez , + and Andrew Church -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 - to fix pid aliasing and reuse problems on - cygwin +builtins/fc.def + - fc_builtin: make sure an entry in the history list is non-null + before trying to write it to stdout or the temporary file. From a + report from Sibo Dong -variables.c - - set $_ from the environment if we get it there, set to $0 by - default if not in env +builtins/common.[ch] + - builtin_arrayref_flags: given a WORD_DESC * (which includes flags) + and a base set of flags, return a set of flags to pass to + valid_array_reference and similar functions -doc/{bashref.texi,bash.1} - - a couple of clarifying changes to the description of $_ based on - comments from Glenn Morris +builtins/set.def + - unset_builtin: call builtin_arrayref_flags to set vflags - 2/15 + 6/19 ---- -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 +parse.y + - parse_comsub: rewrite to recursively call the parser (yyparse()) and + return a string constructed from the resulting parse tree. Probably + will only work with bison. Error reporting is more accurate about + line numbers and invalid tokens, and command substitution errors + are caught earlier, before expansion + - DOLPAREN: new token, never created by yylex; only ever set by + parse_comsub and xparse_dolparen to indicate we're recursively + calling the parser for a command substitution + - comsub: new grammar production that's triggered by DOLPAREN and + parses a command substitution, returning a . It's one of + the possible end states for the top-level parser + - grammar: only call rewind_input_string if the shell's input is + coming from a string + - shell_ungets: push a string back onto the shell input; only used by + make_here_document for backwards compatibility -- allowing a here- + document to be terminated by a token at the end of a command + substitution + - yylex: don't need any more special handling when returning + shell_eof_token, but we keep the clause for future work + - read_token_word: don't handle backslashes (leave them in the input + stream) if we are reading a command substitution (PST_NOEXPAND) + - reserved_word_acceptable: allow reserved words after DOLPAREN + - report_syntax_error: better error handling if we hit EOF while + looking for the ending right paren in a command substitution + - parse_string_to_word_list,parse_compound_assignment: make sure to + turn off parse_comsub sentinel temporarily -doc/bashref.texi - - add note to posix mode section about pwd -P setting $PWD +make_cmd.c + - make_here_document: backwards compatibility: if we end a here + document on the same line as the end of a command substitution, + allow the token to terminate the here document (without requiring + a newline) and push the remainder of the line back for the parser + to consume and terminate the command substitution -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 +builtins/evalstring.c + - parse_string: if we read shell_eof_token and use it to terminate a + command, rewind the input string here before returning, instead of + guessing where to rewind it in the caller - 2/19 + 6/22 ---- -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 +redir.c + - do_redirection_internal: if VARASSIGN_REDIR_AUTOCLOSE is non-zero, + add a redirect to automatically close {var} -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 +parser.h + - PST_NOERROR: don't print error messages in yyerror(), just reset + the parser and return - 2/24 - ---- -builtins/reserved.def - - minor cleanups to the description of `if' +parse.y + - yyerror: if parser_state & PST_NOERROR, don't print an error message + - xparse_dolparen: if the flags includes SX_COMPLETE, add PST_NOERROR + to parser_state, to inhibit error messages. Fixes bug with adding + lines with incomplete command substitutions to the history list + reported by Koichi Murase - 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 + - skip_matched_pair: make sure to pass the SX_COMPLETE flag to + extract_delimited_string -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 + 6/28 + ---- - 3/8 - --- -bashline.c - - make bash_directory_expansion a void function, since it doesn't have - any return value +lib/readline/bind.c + - rl_trim_arg_from_keyseq: handle rl_vi_arg_digit if VI_MODE is + defined. Report and fix from Koichi Murase + - rl_trim_arg_from_keyseq: rework to handle case where the digit + argument is given as a discrete sequence of multiple rl_digit_argument + commands (e.g, "M-1 M-2" instead of "M-1 2"). Report and fix from + Koichi Murase - 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 +subst.c + - pat_subst: avoid calling RESIZE_MALLOCED_BUFFER with STRLEN(s) as an + argument, since it ends up going into a loop. Report and fix from + Koichi Murase -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 +lib/sh/casemod.c + - cval: take the string length as an argument, to avoid having to call + strlen every time (in HANDLE_MULTIBYTE mode). The caller already has + this info. Report and fix from Koichi Murase - 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 +builtins/complete.def + - print_cmd_name: single-quote the command name if it contains any + shell metacharacters + - print_one_completion: call print_arg with a second arg of 1 if the + function name contains shell metacharacters. Report and fix from + Koichi Murase - 3/15 + 6/30 ---- -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 +configure.ac + - substitute BASE_CFLAGS_FOR_BUILD and STYLE_CFLAGS into Makefile + targets + - take STYLE_CFLAGS out of the CFLAGS_FOR_BUILD variable that gets + substituted + - remove STYLE_CFLAGS from CFLAGS + - use `:+' expansion to set variables based on whether $GCC is set + or null, since configure can do GCC= + +support/Makefile.in + - man2html: remove CCFLAGS_FOR_BUILD from the recipe, leaving only + LDFLAGS_FOR_BUILD. Report from Jay K + - gen-helpfiles: remove CCFLAGS_FOR_BUILD from the recipe, leaving + only LDFLAGS_FOR_BUILD + - man2html: use $(STYLE_CFLAGS) in BASE_CCFLAGS variable for C file + compilation options + +{,builtins}/Makefile.in, lib/{sh,readline,malloc,glob}/Makefile.in + - use STYLE_CFLAGS so specifying CFLAGS=-g to make doesn't clutter the + output with warnings about parens and format strings + + 7/9 + --- +lib/readline/search.c + - make_history_line_current: call _rl_free_saved_history_line to clean + up _rl_saved_line_from_history and get all the code that frees it + into one place + +lib/readline/misc.c + - _rl_free_saved_history_line: if rl_undo_list points to the data + member of _rl_saved_line_from_history, set it to NULL to avoid having + it point to freed memory, since the next thing we do now is to free + the undo list the data member points to + - _rl_start_using_history: call _rl_free_saved_history_line instead of + calling _rl_free_history_entry directly. Fixes memory leak reported + by Trung Dam + + 7/12 ---- -parse.y - - fix bug in prompt string decoding that caused a core dump when PS1 - contained \W and PWD was unset (null pointer deref) +lib/readline/search.c + - make_history_line_current: free rl_undo_list before replacing the + current line with the line from history, since it is a private + undo list from reading the search string -builtins/printf.def - - changed -v var behavior so it stores partial output into the named - variable upon an error +lib/readline/rlmbutil.h + - Since wchar_t/mbrtowc/wcrtomb are limited to 16 bits on Windows + with MSVC, start abstracting the differences using WCHAR_T/ + MBRTOWC/WCRTOMB - 3/24 + 7/13 ---- -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 +lib/readline/{complete,display,input,text,util,vi_mode}.c + - use WCHAR_T/MBRTOWC/WCRTOMB. Part of a set of Windows MSVC fixes + from sparrowhawk996@gmail.com -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 +builtins/{enable,hash,help}.def + - enable_builtin: use sh_chkwrite after output to check for write errors -lib/glob/{glob,sm_loop,smatch}.c - - make sure to cast arguments to (char *) or (unsigned char *) as - appropriate to avoid gcc4 warnings + 7/16 + ---- +arrayfunc.c + - quote_compound_array_word: free SUB and VALUE after assigning from + sh_single_quote(). From a coverity report from + Siteshwar Vashisht -lib/glob/smatch.c - - collsym (single-byte version) now takes a (CHAR *) first argument to - match callers; cast argument to strncmp appropriately +bashhist.c + - bash_remove_history_range: free DISCARD_LIST after freeing its + elements -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 +bashline.c + - bash_directory_expansion: add code to free D as a separate branch, + though it's never hit in practice - 3/25 +builtins/trap.def + - showtrap: free T even if show_default == 1 if it's a non-default + trap string + + 7/17 ---- -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) +execute_cmd.c + - execute_coproc: free NAME on invalid identifier error -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/glob/glob.c + - glob_vector: make sure NEXTLINK is allocated using malloc before + passing it to free() + - glob_filename: free RESULT before returning glob_error_return when + there is only a filename -lib/readline/vi_keymap.c - - bind `X' in vi command mode to rl_vi_rubout +print_cmd.c + - indirection_level_string: make sure we free PS4 after calling + decode_prompt_string if *ps4 == 0 -lib/readline/funmap.c - - add a bindable `vi-rubout' command, runs rl_vi_rubout +subst.c + - parameter_brace_transform: if vtype == VT_VARIABLE, we need to free + a non-null VAL -lib/readline/text.c - - rewrote internals of _rl_rubout_char to make structure cleaner +variables.c + - assign_in_env: if NAME is not a valid shell identifier, free it + after printing the error message and before returning. These are + the rest of the fixes from Siteshwar Vashisht + + 7/22 + ---- +shell.c + - main: set dollar_vars[0] to shell_script_filename before calling + run_startup_files() in the non-interactive case. Restore it after + run_startup_files returns so we can get better error messages if + we can't open a script file. Suggested by several people, originally + by Marc Aurèle La France back in 2/2021 (in a + different form) and most recently by Tapani Tarvainen + -lib/readline/{complete,text}.c - - changed code to remove #ifdef HANDLE_MULTIBYTE where possible + 7/28 + ---- +trap.c + - any_signals_trapped: return that a signal is trapped only if it's + not ignored. This is an additional opportunity for optimization, + reported in https://bugzilla.redhat.com/show_bug.cgi?id=1981926 - 3/28 + 7/30 ---- -lib/readline/examples/rl.c - - include instead of posixstat.h if READLINE_LIBRARY not - defined +examples/loadables/sleep.c + - main: if the uconvert conversion fails, but the argument appears to + contain a GNU-like interval specifier like "1m30s", return + EX_DISKFALLBACK so the execute_builtin code tries to run the + external version + +builtins/enable.def + - enable_shell_builtin: if the builtin isn't found, return EX_NOTFOUND + to allow the caller (enable_builtin) to react differently if it + wants to + - dyn_load_builtin: if the shared object isn't found, return EX_NOTFOUND, + change enable_builtin to deal with it + - enable_builtin: if there are no supplied options, and we attempt to + enable a non-existent builtin, try modifying `enable name' to the + equivalent of `enable -f name name' and return success if we + successfully load a builtin from a shared object. Proposed several + times, most recently by Robert Elz -subst.c - - fix mbstrlen to treat invalid multibyte sequences as sequences of - single-byte characters +doc/{bash.1,bashref.texi} + - enable: document new behavior of `enable NAME' when NAME is not a + current shell builtin - 4/8 + 8/3 --- -configure.in - - default SIZE to `:' if cross-compiling and an appropriate size for - the target is not found +lib/glob/sm_loop.c + - GMATCH: check for interrupts or terminating signals each time through + the loop and return FNM_NOMATCH immediately if received. Let the + higher layers deal with interrupting the match and jumping out. + Inspired by a report from andrej@podzimek.org - 4/11 - ---- + 8/6 + --- 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) + - {parameter_brace_remove_pattern,parameter_brace_transform, + parameter_brace_substring,parameter_brace_casemod, + parameter_brace_patsub}: make sure the IND argument is of type + arrayind_t to handle the full range of subscripts. Reported by + felix@f-hauri.ch - 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 +builtins/printf.def + - printf_builtin: take new format specifier: %Q. This acts like %q + but applies any supplied precision to the original unquoted + argument, then quotes that result and outputs the entire quoted + string, preserving the original field width. Originally suggested + back in 4/2020 by Sam Liddicott -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) +subst.c + - char_is_quoted: check whether or not we are on the second or later + line of a command with an unclosed quoted string from a previous + line. If we are, see if it's closed before the character we're + checking, so we don't interpret a closing quote as starting a new + quoted string. Reported several times, most recently by + Phi Debian in 6/2021. -builtins/mkbuiltins.c - - don't bother with the special HAVE_BCOPY code; just use straight - assignments + 8/9 + --- +parse.y,subst.c + - locale_expand: if the variable SINGLEQUOTE_TRANSLATIONS is non-zero, + single-quote the translated result of $"..." (if it's different from + the untranslated string) -builtins/ulimit.def - - use _POSIX_PIPE_BUF in pipesize() if it's defined and PIPE_BUF is - not +builtins/shopt.def + - noexpand_translation: new option to expose the value of + SINGLEQUOTE_TRANSLATIONS - 4/13 + 8/10 ---- -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 +doc/{bash.1,bashref.texi} + - noexpand_translation: add description of new option - 4/14 + 8/16 ---- -builtins/read.def - - make sure the ^As added for internal quoting are not counted as - characters read when -n is supplied +builtins/printf.def + - printf_builtin: initialize retval after parsing arguments, since we + use it for the `v' option. Bug report from Keith Thompson + - 4/20 +lib/sh/unicode.c + - u32tocesc: fix typo that returned \uXXXXXXXX instead of \UXXXXXXXX. + From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992257 by + + + 8/17 ---- -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 +siglist.c + - include command.h before general.h for PARAMS and prototypes. Report + from Osipov, Michael (LDA IT PLM) - 4/26 + 8/18 ---- +lib/readline/colors.c + - S_ISBLK: make sure it's defined before we use it, like in complete.c -Makefile.in - - make sure mksignames and mksyntax are invoked with the $(EXEEXT) - extension +lib/readline/complete.c,{bashline,variables}.c + - minor changes to prep for making rl_completer_word_break_characters + `const' - 4/28 - ---- -lib/readline/readline.h - - new state variable: RL_STATE_CALLBACK, means readline is using the - callback interface +subst.[ch],pcomplete.c + - split_at_delims: the DELIMS argument is now `const'; change callers -lib/readline/callback.c - - set RL_STATE_CALLBACK in rl_callback_handler_install, unset in - rl_callback_handler_remove +lib/readline/rlmbutil.h + - _rl_wcwidth: add function prototype for inline function declaration - 4/29 - ---- -config-top.h - - DONT_REPORT_SIGPIPE is now on by default, since it apparently - interferes with scripts +lib/readline/bind.c + - _rl_get_keyname: print keys greater than 160 (which are valid UTF-8) + as octal escape sequences -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) +lib/readline/text.c + - do_lowercase_version: return 99999 to prevent the linker from + combining it with _rl_null_function and optimizing away the separate + copy. That messes with function pointer comparisons. Part of this + batch of fixes from sparrowhawk996@gmail.com - 4/30 + 8/19 ---- -builtins/caller.def - - add call to no_options, so it can handle `--' option +complete.c,readline.c,readline.h + - rl_completer_word_break_characters: now const char * like + rl_basic_word_break_characters; element of readline state struct + used to save it also const. THIS IS AN API CHANGE -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 - - add HAVE_FCNTL, HAVE_KILL for respective system calls - - add HAVE_GETPW{ENT,NAM,UID} for passwd functions - -configure.in - - add check for - - 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 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 with HAVE_PWD_H - - guard inclusion of 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 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 - -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 - - -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 - - - 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 - - -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 - - 6/30 - ---- -lib/malloc/trace.c - - include 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 - - 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 - - -{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 - - 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 - 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 , 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 to get right value of NSIG from - (usually) - - 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 - -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 - - -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 - -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 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 - - 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 - - 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 - -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 - -{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 - - 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 - - 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 - - -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 - -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 (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 - - 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 prompted the discovery - -aclocal.m4 - - slight change to test for /dev/fd to compensate for a linux - failing; suggested by Mike Frysinger - - 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 - - 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 - -[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 - - -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 - - 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 - - 6/29 - ---- -lib/glob/xmbsrtowcs.c - - make sure destp is non-null before assigning a 0 to *destp in - xdupmbstowcs. Fix from Louiwa Salem - -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 - - -lib/readline/bind.c - - in rl_generic_bind(), make sure that the keys array is freed before - an error return. Fix from Louiwa Salem - - 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 for prototypes for memset, strlen - -lib/termcap/{termcap,tparam}.c - - include 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 - - 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 - -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 - - 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 - -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 - - 9/12 - ---- -builtins/printf.def - - make sure `%q' format specifier outputs '' for empty string arguments - Bug reported by Egmont Koblinger - -make_cmd.c - - change make_here_document to echo lines in here-doc if set -v has - been executed. Reported by Eduardo Ochs - -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 - -configure.in - - change DEBUGGER_START_FILE to start with ${ac_default_prefix}/share, - like bashdb installs itself. Reported by Nick Brown - - - 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 - - - 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 - - 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 - - -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 and Stuart Shelton - - - -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 - and Stuart Shelton - - 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 - - - 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 - - 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 - - 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 - - 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 - - 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 - -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 - -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 - - - 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 - - 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 - - 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 - -doc/{bash.1,bashref.texi} - - add `E' and `T' to the synopsis of the set builtin. - From Benno Schulenberg - -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 - - 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 - -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 - -{redir,subst}.c - - add MT_USETMPDIR flag to calls to sh_mktmpfd and sh_mktmpname. Bug - reported by Eric Blake - -{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 - -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 - -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 - - - 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) - - -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 - - - 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 - - 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 - - - 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 - - 2/19 - ---- -CWRU/audit-patch - - patch from Steve Grubb of RedHat 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 - - 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 - - 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 - - - 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 - -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 . - - 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 - - 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 - -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 - - - 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 - - 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 - - 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 - - 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 - -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 - - 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 - -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 - - -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 - - 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 - -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 - -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 - - 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 - - - 6/13 - ---- -support/shobj-conf - - changes to support shared object and shared library creation on AIX - 5.x and later versions. From Niklas Edmundsson - - 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 - - - 7/11 - ---- - -lib/readline/rltty.c - - enable flush-output code for systems other than AIX 4.1. Problem - reported by Jan Kratochvil - - 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 - - - 7/13 - ---- -variables.c - - use native __QNX__ and __QNXNTO__ cpp defines instead of qnx and - qnx6, respectively. Patch from Sean Boudreau - -lib/sh/getcwd.c - - #undef HAVE_LSTAT on qnx, so it uses stat instead. Patch from - Sean Boudreau - - 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 - - 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 - - -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 - - - 8/1 - --- -lib/readline/{util,histexpand}.c - - fixes for small memory leaks from Michael Snyder - - 8/18 - ---- -Makefile.in - - add dependency on builtins/builtext.h to nojobs.o list. Fixes - `make -j 5' issue reported by Chris MacGregor - -examples/loadables/Makefile.in - - add @LDFLAGS@ to SHOBJ_LDFLAGS assignment -- experimental. Suggested - by Mike Frysinger - -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 - - 8/21 - ---- -histexpand.c - - fix another memory leak in history_find_word. Bug report originally - from Michael Snyder ; test case suggested by Jim - Blandy - - 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 - - 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 - - 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 - - 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 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 - - - 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 - - - 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 - -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 - -braces.c - - pass process substitution through unchanged the same as command - substitution. Prompted by suggestion from Stephane Chazelas - - -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 - -builtins/type.def - - change exit status of `type' to not successful if any of the - requested commands are not found. Reported by Stephane Chazleas - - -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 - - 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 - - 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 - - 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 - and Paul Eggert - - 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 - - - 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 - -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 - - 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 (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 - - 11/15 - ----- -variables.c - - add new function `seedrand' to seed the bash random number - generator from more random data. Suggestion from Steve Grubb - - - replace the rng in brand() with a slightly better one from FreeBSD - (filtered through Mac OS X 10.5). Replacement suggested by - Steve Grubb - - 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 - -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 - - 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 - - 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 - - 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 - - - 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 - - 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 - -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 - - 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 - - - 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 - - add support for redoing inserts made with the `I' command. Fix - from Thomas Janousek - - 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 - - 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 and Eric Blake - - 2/9 - --- -builtins/*.def - - changes to text and formatting suggested by Jan Schampera - - - 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 - . - - 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 - - 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 - -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 - - -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 - - - 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 - -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 - -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 - -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 - - -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 - - 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 - -builtins/read.def - - added `-i text' option, inserts `text' into line if using readline. - Suggested by many, used some ideas from Kevin Pulo - -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 - - 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 - -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 - - 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 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 . - - 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 - - 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 - - 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 - - - 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 - - - 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 - - - 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 - - -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 - -{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 - - 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 - - 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 - - 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 - - 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 - -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 - - 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 - , 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 - - - - 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 - - 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 - - - 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 - - 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 - - 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 - - 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 - -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 - - 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 - - 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 - - - 9/16 - ---- -execute_cmd.c - - add call to CHECK_TERMSIG in shell_execve after the call to execve - returns. Recommended by Roman Rakus - - 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" , 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 - - 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 - - - 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 - - 10/4 - ---- - -redir.c - - in redirection_error(), use `error' instead of errno when comparing - against EBADF. From mingw32 patches submitted by Hector Chu - - -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 - -builtins/cd.def - - ignore CDPATH when in privileged mode. Suggested by Paul Jarc - - -variables.c - - change sv_globignore to only act if privileged mode is not enabled. - Suggested by Paul Jarc - -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 - - -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 - - 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 - - - 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 - - - 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 - - - 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 - - 10/26 - ----- -doc/bash.1 - - add single-sentence descriptions to rest of parameter expansions. - Suggested by Ken Irving - - 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 - - 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 - -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 - - 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 + - orig_rl_completer_word_break_characters: now const char * like + rl_completer_word_break_characters -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 + 8/20 ---- -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 - - 11/20 - ----- -general.c - - new 'file_exists(fn)' primitive; just calls stat(2) - -general.h - - new extern declaration for file_exists + - bash_directory_completion_hook: if direxpand and dirspell are both + set while trying to complete an absolute pathname as a command, don't + take a spell-corrected directory name that is shorter than the + original hint. https://bugzilla.redhat.com/show_bug.cgi?id=1782809 -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 +builtins/common.[ch] + - sh_noassign: convenience function to print an error message when a + user attempts an assignment to a "noassign" variable. Not used yet -execute_cmd.c - - call file_isdir from shell_execve instead of stat(2) directly +assoc.[ch] + - assoc_to_kvpair_list: new function, returns a WORD_LIST containing + key-value pairs as separate words -bashhist.c - - use file_exists and file_isdir primitives instead of calling stat +array.[ch] + - array_to_kvpair_list: new function, returns a WORD_LIST containing + index-value pairs as separate words - 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 - - 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 - - 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 - - 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 - - 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 - - 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" 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 + - string_transform: handle '@k' transform like '@K' + - valid_parameter_transform: 'k' is a valid transform operator + - array_transform: handle '@k' transformation by calling one of + array_to_kvpair_list or assoc_to_kvpair_list and treating the + result as if expanding the array depending on whether the index is + `@' or `*' with the usual meanings -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 +doc/{bash.1,bashref.texi} + - document new '@k' parameter transformation operator -[bash-4.0-beta2 frozen] + 8/27 + ---- +lib/readline/kill.c + - rl_unix_filename_rubout: handle pathnames that consist only of one + or more slashes. The old code went too far and deleted the previous + word as well. From dabe@dabe.com - 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 - -{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 - - make sure to reset comsub_ignore_return every time we throw to the - top level, like executing_list flag - - 1/2/2009 - -------- + 8/31 + ---- 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 + - STRING_SAVER: now save and restore shell_input_line_len; not sure + why it wasn't done before; fix push_string and pop_string accordingly + - prompt_again: now takes a parameter FORCE; not used yet (every + caller passes 0), needs more thought - 1/7 - --- +builtins/evalstring.h + - open_redir_file: broke code that expands the redirection and opens + the resultant filename into a new function, called from cat_file -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. +redir.h + - open_redir_file: extern declaration here for now -[bash-4.0-rc1 frozen] +builtins/evalstring.c + - parse_string: takes a new argument: COMMAND **cmdp; if non-null, saves + the parsed command to *cmdp and lets the caller manage it itself. + global_command is still not modified. Changed callers in parse.y - 1/9 + 9/1 --- -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 - - 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 - -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 - +parse.y + - parse_string_to_command: stripped-down version of xparse_dolparen + that takes a string, runs it through the parser, and returns the + resultant COMMAND *; uses parse_string with the new argument externs.h - - new defines for CASE_UPFIRST and CASE_LOWFIRST - -subst.c - - use CASE_UPFIRST for ^ and CASE_LOWFIRST for , casemod operators + - parse_string_to_command: extern declaration -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 +builtins/evalstring.c + - can_optimize_cat_file: new function, takes a COMMAND * argument and + returns true if the command can be optimized like $(&", see if we can optimize the command and call + optimize_cat_file to do it if we can. -lib/sh/zgetline.c - - in zgetline, when zread/zreadc return <= 0, make sure line is - non-null before assigning to line[nr] + 9/2 + --- +configure.ac,config.h.in,lib/sh/setlinebuf.c + - SETVBUF_REVERSED: remove all references -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 - - - if interactive, pass the SEVAL_INTERACT and SEVAL_NOHIST flags - to parse_and_execute when calling callbacks. Fixes bug reported - by Pierre Gaston - - add `readarray' as a synonym for mapfile +configure.ac,aclocal.m4 + - AC_OUTPUT: move created files and commands to AC_CONFIG_FILES and + AC_CONFIG_COMMANDS; call AC_OUTPUT without any arguments + - require autoconf version 2.63 + - AC_HELP_STRING -> AS_HELP_STRING + - replace references to $ac_cv_prog_gcc with $GCC + - AC_C_LONG_DOUBLE -> AC_TYPE_LONG_DOUBLE + - enable-alt-array-implementation: new configure option, placeholder + for later -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 - - document readarray as synonym for mapfile +unwind_prot.c + - stddef.h: include if HAVE_STDDEF_H is defined, not STDC_HEADERS -builtins/common.c - - new error function, sh_ttyerror(set), prints an error message having - to do with setting or getting terminal attributes +bashansi.h + - memory.h: don't include any more; assume has all the + necessary defines -builtins/read.def - - print error message if read fails to set terminal attributes +aclocal.m4 + - AC_HEADER_STDC: remove AC_REQUIRE calls to this; change tests to use + appropriate checks instead of STDC_HEADERS - 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 - - -execute_cmd.h - - new extern declaration for coproc_reap + 9/3 + --- +configure.ac,config.h.in + - AC_TYPE_SIGNAL,BASH_TYPE_SIGHANDLER: remove calls, remove mention of + RETSIGTYPE and VOID_SIGHANDLER + - AC_USE_SYSTEM_EXTENSIONS: use this instead of AC_ISC_POSIX (which is + well and truly obsolete) and AC_MINIX (which just calls it anyway). + All the right defines are already present + - AC_HEADER_TIME: removed + - AC_HEADER_STDC: removed + - AC_DECL_SYS_SIGLIST: replaced with BASH_DECL_SYS_SIGLIST + - BASH_FUNC_CTYPE_NONASCII: removed + +sig.h,lib/readline/signals.c + - RETSIGTYPE -> void, SIGHANDLER_RETURN -> return + +include/posixtime.h + - don't bother with TIME_WITH_SYS_TIME, just include if + we have it and include unconditionally + +include/chartypes.h,lib/readline/chardefs.h + - IN_CTYPE_DOMAIN: no longer uses STDC_HEADERS define, checks against + CHAR_MAX for non-C89 systems, still a no-op on C89 systems + +lib/readline/chardefs.h + - memory.h: don't include, no need for STDC_HEADERS; assume the mem* + functions are defined in as in C89 + - now that we assume IN_CTYPE_DOMAIN bounds its argument to unsigned + chars, we don't need NON_NEGATIVE checks at all + +lib/readline/chardefs.h,util.c + - ALPHABETIC -> _rl_alphabetic_p -command.h - - new flags for c_flags member of a struct coproc + 9/8 + --- -{jobs,nojobs}.c - - add call to coproc_reap in cleanup_dead_jobs, which will do the - right queueing or blocking of SIGCHLD +lib/sh/strftime.c + - include after reworking above; include + unconditionally in case it defines time_t. From a report by + Ori Sky Farrell -trap.c - - modify change from 1/12 to not reset the line number when running - the DEBUG and RETURN traps + 9/9 + --- +lib/readline/search.c + - rl_history_search_internal: set rl_undo_list to NULL after calling + rl_maybe_save_line, since it will be restored one way or another + after the search completes, and we don't want it to be freed twice + - rl_history_search_internal: leave the current history offset at the + position of the last matching history entry. This means that things + like ^P will start back from that history entry, ^N will move + forward from there, and operate-and-get-next will work like it does + with incremental searches. Reported by Vandrus Zoltán + - 1/18 + 9/10 ---- -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 - -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 +aclocal.m4 + - BASH_C_LONG_LONG: removed + - BASH_TYPE_LONG_DOUBLE: removed + - BASH_TYPE_LONG_LONG,BASH_TYPE_UNSIGNED_LONG_LONG: removed + - BASH_FUNC_CTYPE_NONASCII: removed + - BASH_SYS_SIGNAL_VINTAGE,BASH_SYS_REINSTALL_SIGHANDLERS: don't + require AC_TYPE_SIGNAL, use void instead of RETSIGTYPE + - BASH_TYPE_SIGHANDLER: removed + +configure.ac,aclocal.m4,config.h.in + - BASH_TYPE_LONG_LONG: removed, call AC_TYPE_LONG_LONG_INT directly, + change #define to HAVE_LONG_LONG_INT + - BASH_TYPE_UNSIGNED_LONG_LONG: removed, call AC_TYPE_UNSIGNED_LONG_LONG_INT + directly, change #define to HAVE_UNSIGNED_LONG_LONG_INT + +externs.h,include/typemax.h,lib/sh/{fmtullong,snprintf,strtoimax,strtoll, +strtoull,strtoumax}.c + - HAVE_LONG_LONG -> HAVE_LONG_LONG_INT + - HAVE_UNSIGNED_LONG_LONG -> HAVE_UNSIGNED_LONG_LONG_INT + +configure.ac + - AC_TRY_COMPILE -> AC_COMPILE_IFELSE + - BASH_CHECK_TYPE (intmax_t) -> AC_TYPE_INTMAX_T + - BASH_CHECK_TYPE (uintmax_t) -> AC_TYPE_UINTMAX_T + - BASH_CHECK_TYPE (sig_atomic_t): removed -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 +aclocal.m4 + - BASH_FUNC_STRSIGNAL: changed to use AC_LINK_IFELSE + - BASH_FUNC_LSTAT: changed to use AC_LINK_IFELSE + - BASH_FUNC_SBRK: changed to use AC_LINK_IFELSE and AC_RUN_IFELSE, + fixed typo + - BASH_CHECK_SPEED_T: changed to use AC_COMPILE_IFELSE + - BASH_TYPE_SIG_ATOMIC_T: use BASH_CHECK_TYPE instead of AC_CHECK_TYPE + - BASH_STRUCT_DIRENT: new macro, like _AC_STRUCT_DIRENT but public and + sets a different bash-specific shell variable + - BASH_STRUCT_DIRENT_D_{INO,FILENO,NAMLEN}: call BASH_STRUCT_DIRENT + with a different first argument instead of using inline code and + AC_TRY_COMPILE - 1/22 + 9/11 ---- -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 +[prayers for the victims of 9/11/2001] aclocal.m4 - - new macro, BASH_TYPE_SIG_ATOMIC_T, tests for sig_atomic_t in - , 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 + - BASH_CHECK_DECL: just call AC_CHECK_DECLS and use the default + includes, which includes the files we used to specify + - BASH_FUNC_INET_ATON: changed to use AC_LINK_IFELSE + - BASH_STRUCT_WEXITSTATUS_OFFSET: changed to use AC_RUN_IFELSE + - BASH_FUNC_OPENDIR_CHECK: changed to use AC_RUN_IFELSE + - BASH_FUNC_ULIMIT_MAXFDS: changed to use AC_RUN_IFELSE + - BASH_UNDER_SYS_SIGLIST: changed to use AC_RUN_IFELSE + - BASH_SYS_SIGLIST: changed to use AC_RUN_IFELSE + - BASH_FUNC_DUP2_CLOEXEC_CHECK: changed to use AC_RUN_IFELSE + - BASH_FUNC_GETENV: changed to use AC_RUN_IFELSE + - BASH_FUNC_GETCWD: changed to use AC_RUN_IFELSE + - BASH_FUNC_FNMATCH_EXTMATCH: changed to use AC_RUN_IFELSE + - BASH_FUNC_POSIX_SETJMP: changed to use AC_RUN_IFELSE + - BASH_FUNC_STRCOLL: changed to use AC_RUN_IFELSE + - BASH_FUNC_PRINTF_A_FORMAT: changed to use AC_RUN_IFELSE + - BASH_SYS_PGRP_SYNC: changed to use AC_RUN_IFELSE + - BASH_SYS_SIGNAL_VINTAGE: changed to use AC_RUN_IFELSE + - BASH_SYS_NAMED_PIPES: changed to use AC_RUN_IFELSE + - BASH_CHECK_RTSIGS: changed to use AC_RUN_IFELSE + - BASH_CHECK_MULTIBYTE: changed to use AC_RUN_IFELSE + - RL_LIB_READLINE_VERSION: changed to use AC_RUN_IFELSE + - BASH_CHECK_WCONTINUED: changed to use AC_RUN_IFELSE + - BASH_FUNC_SNPRINTF: changed to use AC_RUN_IFELSE + - BASH_FUNC_VSNPRINTF: changed to use AC_RUN_IFELSE + - BASH_FUNC_FNMATCH_EQUIV_FALLBACK: changed to use AC_RUN_IFELSE + - BASH_DECL_PRINTF: changed to use AC_RUN_IFELSE + - BASH_TYPE_RLIMIT: rewrote to avoid quad_t, now uses AC_COMPILE_IFELSE + to determine whether rlim_t is available, otherwise determines the + value of RLIMTYPE based on sizeof(rlim.rlim_cur): int, long, or + long long + - BASH_SIZEOF_RLIMIT,BASH_SIZEOF_QUAD_T: helper macros for + BASH_TYPE_RLIMIT in the case that rlim_t is not present + +configure.ac + - BASH_CHECK_DECL -> AC_CHECK_DECLS + - quad_t: use AC_CHECK_TYPE (new style) instead of BASH_CHECK_TYPE + + + 9/14 ---- -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 ; fix - suggested by Stephane Chazelas - - 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 - - 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 + - time_command: if we longjmp back to the top_level we saved, make sure + we're in the same subshell environment before printing the timing + stats. We could have longjmped back from a child process of the + command or pipeline we want to time. From a report by + Sergej Alikov + - time_command: restore command->flags even if we longjmp back - 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 +general.c + - check_binary_file: if the first line of the ENOEXEC file starts with + a `#!', check the rest of the buffer for NULs to determine whether + this is a binary file. Since we only check the first line, a #! line + followed by binary data could be confused for a shell script - 2/12 + 9/16 ---- -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 +bashjmp.h + - EXITBLTIN: new longjmp `code' value: used by the exit builtin - 2/13 - ---- -doc/{bash.1,bashref.texi} - - clarified description of set -e option to accurately reflect current - implementation +{execute_cmd,shell,subst,trap}.c,builtins/evalstring.c + - treat EXITBLTIN exactly the same as EXITPROG (for now) - 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 +builtins/exit.def + - exit_builtin: jump_to_top_level with value EXITBLTIN -[bash-4.0 frozen] +builtins/evalstring.c + - parse_and_execute: EXITBLTIN has its own case, with the same contents + as EXITPROG - 2/20 + 9/17 ---- +builtins/evalstring.c + - parse_and_execute: change EXITBLTIN case to avoid running the + unwind-protect stack to the `pe_dispose' tag (which has the effect + of running all the unwind-protects installed by the commands in + the string) if we're executing in a function and EXIT is trapped. + This has the effect of running the EXIT trap in the function context, + which is what we do when we're not in parse_and_execute (eval, + bash -c, command substitution, etc.) -[bash-4.0 released] - - 2/22 + 9/18 ---- +arrayfunc.c + - expand_and_quote_kvpair_word,quote_compound_array_word, + expand_and_quote_assoc_word,quote_compound_array_list: make sure + the value has CTLESC characters doubled even when being single- + quoted, since that's what the parser does with standalone assignment + statements. From https://savannah.gnu.org/support/?110538 -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 - -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 - -builtins/mapfile.def - - make sure the callback quantum (-c option argument) is > 0. Fixes - bug reported by Stephane Chazleas - - 2/23 + 9/19 ---- -parse.y - - fix save_token_state and restore_token_state to save and restore - current_token. Fixes bug reported by Bernd Eggink - - -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 - - 2/24 +aclocal.m4 + - AC_TRY_COMPILE -> AC_COMPILE_IFELSE (AC_TRY_LINK calls left to + modify to avoid obsolete warnings) + - BASH_STRUCT_WINSIZE: broke out checks for separate headers into new + macros, call them and work with the results; needed to avoid two + calls to AC_TRY_COMPILE + - BASH_CHECK_KERNEL_RLIMIT: avoid multiple calls to AC_TRY_COMPILE by + breaking basic test for RLIMIT_ defines into a separate test and + calling the HPUX-specific _KERNEL test only if that fails + +m4/gettext.m4,configure.ac + - AM_GNU_GETTEXT -> BASH_GNU_GETTEXT: remove deprecation warning, since + [no-libtool] is how we use this; rename to avoid someone's local + copy from overriding ours + + 9/20 ---- -siglist.c - - include bashintl.h for definition of _. Fixes bug reported by - Greg Wooledge +aclocal.m4 + - BASH_CHECK_MULTIBYTE: take out code that checks for nl_langinfo(CODESET) + since that's already provided by AM_LANGINFO_CODESET, which is + called by BASH_GNU_GETTEXT. We AC_REQUIRE it here, though, to avoid + problems from future changes + - BASH_SYS_SIGNAL_VINTAGE: broke the code that checks for the different + signal vintages into different AC_DEFUNed macros, changed + BASH_SYS_SIGNAL_VINTAGE to stitch them together with shell code + testing the cached variables + - AC_TRY_LINK -> AC_LINK_IFELSE: there are no more autoconf warnings - 2/25 + 9/21 ---- -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 +array.[ch] + - array_from_argv: new convenience function -arrayfunc.c - - remove skipsubscript; moved to subst.c +array.h + - num_elements: now an arrayind_t, since that's the type of indices, it + makes sense to allow that many elements -parse.y - - change reset_parser to set current_token to '\n'. Rest of fix for - bug reported by Bernd Eggink ; earlier fix on - 2/23 + 9/22 + ---- +lib/readline/terminal.c + - rl_term_kP: fix typo. Fix from Koichi Murase - 2/26 + 9/25 ---- -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 - - - 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 - -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 +lib/readline/display.c + - rl_clear_visible_line: call _rl_clear_to_eol with _rl_screenwidth as + the argument so we clear out the entire line even if the terminal + doesn't have a clear-to-eol sequence; make sure to add a call to + rl_cr after that so we know we're always in column 0 + - _rl_redisplay_after_sigwinch: just call rl_clear_visible_line instead + of erasing the last line of the display + - _rl_redisplay_after_sigwinch: if the prompt is longer than the screen + width, make sure to call _rl_reset_prompt to recalculate the + local_prompt_newlines array. Should fix issue from + https://savannah.gnu.org/support/index.php?110543 -parse.y - - fix parse_comsub to not set LEX_HEREDELIM when it sees "<<<". Fixes - bug reported by Mike Frysinger +redir.c + - do_redirection_internal: if given [N]<&WORD- or [N]>&WORD- and WORD + expands to null, make it identical to <&- or >&- and close file + descriptor N (default 0). From a discussion back in 5/2021 - 2/27 + 9/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 - +arrayfunc.c + - expand_compound_array_assignment: since we run the string through + the parser to turn it into a list (so we can make sure all shell + metacharacters are properly quoted), we need to remove the CTLESC + the parser uses to quote CTLESC and CTLNUL in *unquoted* words. + The rest of the code assumes this has been done, and assumes that + any CTLESC characters passed to expansion are part of the original + word and should themselves be quoted, doubling the number of CTLESCs -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 + 9/28 + ---- +arrayfunc.c + - expand_and_quote_kvpair_word,quote_compound_array_word, + expand_and_quote_assoc_word,quote_compound_array_list: if we are + single-quoting associative array subscripts and associative and + indexed array values, we need to quote CTLESC characters, because + that's how they come out of the parser and how the assignment + statement code expects to see them. + Fixes https://savannah.gnu.org/support/index.php?110538 -jobs.c - - if fork() fails, set last_command_exit_value to 126 before calling - throw_to_top_level + 9/29 + ---- +subst.c + - parameter_brace_transform: invalid transformation operators are now + fatal errors in non-interactive shells, as with the other word + expansions. Reported by Martin Schulte in + https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00026.html 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 + - execute_disk_command: if we're optimizing out the fork (nofork) and + not directly in a pipeline (pipe_in == pipe_out == NO_PIPE), only + modify shell_level if subshell_environment says we're not already in + a pipeline. Reported by Paul Smith 10/11/2020 + against GNU make - 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 - -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 +evalstring.c + - should_suppress_fork: remove #if 1 for code that tries to suppress + the fork in a process substitution subshell - 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 + 9/30 + ---- +builtins/mapfile.def + - do_chop: make sure we're comparing unsigned chars when checking + whether the delim is the last character on the line. Reported by + Greg Wooledge - 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 + 10/1 + ---- +lib/readline/rltty.c + - rl_deprep_terminal: if we're not echoing to the terminal + (_rl_echoing_p == 0), and we just output the bracketed paste end + sequence, output a newline to compensate for the \r at the end of + BRACK_PASTE_FINI, since redisplay didn't do it for us. Reported by + Siteshwar Vashisht -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 '#' +shell.h + - MATCH_EXPREP: new matching flag, understood only by pattern + substitution; means to expand unquoted `&' in the replacement + STRING to the match of PATTERN - 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 (rest of fix - on 3/3) +subst.c + - shouldexp_replacement: uncommented + - pat_subst: we expand & in the replacement string if MATCH_EXPREP + appears in MFLAGS + - parameter_brace_patsub: push call to shouldexp_replacement out here, + after the replacement string is expanded; set MATCH_EXPREP if there + is an unquoted `&' (by backslash) in the expanded replacement + string - 3/10 - ---- -{.,lib/readline}/doc/fdl.texi - - updated to FDL version 1.3 +doc/{bash.1,bashref.texi} + - pattern substitution: overhauled the description, moved each of the + possible forms to be tags in the tagged paragraph. The description + now specifies the expansions that the replacement string undergoes + - pattern substitution: documented new behavior of unquoted & in the + replacement string - 3/11 + 10/4 ---- -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 +shell.c + - include if we're debugging malloc (MALLOC_DEBUG) + so we can get an extern declaration of trace_malloc_stats - 3/14 + 10/5 ---- -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 +subst.c + - expand_subscript_string: allocate new memory for td.word, copying + STRING, in case it gets freed on error by expand_word_internal. + Report and fix from Koichi Murase -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 (2/24/2009) +lib/malloc/malloc.c + - malloc_usable_size: return the allocated size instead of the chunk + size, since writing over the bounds checking will cause fatal errors. + Reported by Julien Moutinho , fix from + Dominique Martinet -parser.h - - add PST_REDIRLIST flag, notes that parser is currently parsing a - redirection list preceding a simple command +arrayfunc.c + - unbind_array_elememnt: pass (flags&VA_NOEXPAND) to skipsubscript(), + instead of unconditionally passing 1 if we're operating on an + associative array. This is consistent with how valid_array_reference + determines the length of the subscript. + Report and fix from Koichi Murase -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 + 10/6 + ---- 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 + - skip_to_delim: add a new value for FLAGS. If FLAGS&2, we assume that + START is one character after the opening OPEN. If not, we assume that + START is at OPEN, and needs to be incremented past it. Part of fix + from Koichi Murase -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 +arrayfunc.c + - unbind_array_element: make sure to pass FLAGS to skipsubscript with + bit 2 set, since we are passed a SUB index that's one past the + opening bracket. Rest of fix from + Koichi Murase + - array_variable_name: make sure we pass (FLAGS&1) to skipsubscript, so + we don't inadvertently pass a value with bit 2 set, which would + cause an off-by-one error in subscript parsing - 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 - - - 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 - - 3/20 + 10/8 ---- 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) + - restore_traps: inverse of reset_signal_handlers. This understands + how reset_signal_handlers changes the signal disposition while + leaving the trap string in place, and knows how to restore flags + and state based on that preserved trap string and whether or not + the signal is "special" to the shell. -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 - - 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 +builtins/exec.def + - exec_builtin: instead of using restore_original_signals to completely + cancel the traps, call reset_signal_handlers so the trap strings are + preserved. Then if the exec fails (and we're not exiting) we can + look at the trap strings and see how to restore the trap state. + This calls restore_traps after reinitializing the shell signal + handlers, using the trap strings saved by reset_signal_handlers. + Fixes issue with not exiting after a failed exec clearing the EXIT + trap reported by Mark March , using the + approach suggested by Robert Elz + +subst.c + - expand_declaration_argument: when parsing options that modify + attributes that affect how the value is handled (i, c, u, etc.), + make sure to create an option string and call make_internal_declare + with options that start with a `+' so the attribute is off when + the assignment is performed and changes how the value is expanded. + From a report by Léa Gris -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. +lib/readline/complete.c + - rl_display_match_list: even if _rl_completion_prefix_display_length + is set to a non-zero value, pass the common prefix length to + fnprint if we've turned on colored completion prefixes; passes + through to fnprint via print_filename + - fnprint: add the ellipsis if prefix_bytes exceeds the + _rl_completion_prefix_display_length, add explicit check for + prefix_bytes being longer since print_filename passes it through + if colored-completion-prefix is set. This means that while + completion-prefix-display-length still has precedence over + colored-completion-prefix, it doesn't override it if both are set + and the common prefix length is shorter than + completion-prefix-display-length. From a report by + Christoph Anton Mitterer + 10/10 + ----- parse.y - - in read_secondary_line, don't try to add NULL lines to the history - list. Report and patch from Lubomir Rintel - - 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 - - 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 + - parse_dparen: if the last token is FOR, increment word_top and assign + word_lineno like for other for loops. Fixes bug with LINENO after + arithmetic for commands reported by + Tom Coleman - 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 + 10/11 + ----- +execute_cmd.c + - shell_execve: if execve fails with ENOENT, but executable_file() + succeeds, display a slightly more descriptive error message. Prompted + by a report from Andrea Monaco - 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 - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522160 +stringlib.c + - strcreplace: allow backslash to escape a backslash, since we allow it + to escape a `&' -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 + 10/14 + ----- +pcomplib.c + - COMPLETE_HASH_BUCKETS: double to 512 - 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 +stringlib.c + - strcreplace: the last argument is now a flags argument. 1 has its + previous meaning (glob); 2 means to allow backslash to escape a + backslash (as added on 10/11) -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 - +subst.c + - pat_subst: call strcreplace with 2 as the flags value - 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 + 10/15 + ----- +doc/bashref.texi + - updates to Installation section - 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 and Piotr Zielinski - +doc/{mkposix,mkinst,mkrbash},doc/Makefile.in + - changes to allow scripts to be run outside the source directory - 4/11 - ---- -jobs.c - - in restore_pipeline, don't call discard_pipeline with a NULL - argument + 10/18 + ----- +subst.c + - patsub_replacement: controls whether pattern substitution expands `&' + in the replacement string. Initialized to 1 by default -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 + 10/19 + ----- +doc/{bash.1,bashref.texi} + - document bash's WCE SIGINT behavior when job control is not enabled + and the shell receives a SIGINT while waiting for the foreground + command to complete. Added at Red Hat's request. A complete + discussion is at https://www.cons.org/cracauer/sigint.html - 4/12 - ---- -lib/readline/signals.c - - new functions to block and release SIGWINCH like the SIGINT blocking - and releasing functions + 10/25 + ----- +builtins/shopt.def + - patsub_replacement: new shell option, exposes patsub_replacement + variable controlling whether pattern substitution expands `&' in + the replacement string. Still enabled by default. -lib/readline/rlprivate.h - - new extern declarations for _rl_block_sigwinch and _rl_release_sigwinch +doc/{bash.1,bashref.texi} + - patsub_replacement: document new shopt option + 10/26 + ----- lib/readline/display.c - - block SIGWINCH during redisplay like SIGINT. Should fix bug reported - by Nicolai Lissner + - expand_prompt: group runs of invisible characters at the right edge + of the screen with the previous physical characters when setting + local_prompt_newlines, since that's how update_line() expects to + get it. Fix from sparrowhawk996@gmail.com. - 4/13 - ---- -lib/readline/readline.h - - new readline state variable: RL_STATE_REDISPLAYING +lib/readline/macro.c + - rl_end_kbd_macro: make sure current_macro_index is > 0 after + subtracting the key sequence length, clamp it to 0 before writing + the ending NULL. From a fuzzing report by + Tillmann Osswald -lib/readline/display.c - - in rl_redisplay, don't block SIGWINCH during redisplay; just set - the REDISPLAYING state +lib/readline/isearch.c + - _rl_isearch_dispatch: in the bracketed paste case, don't assume the + pasted text is null-terminated, so use memcpy instead of strcpy for + the length of the pasted text, then make sure the search string is + null-terminated. From a fuzzing report by + Tillmann Osswald -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 +lib/readline/text.c + - rl_transpose_words: make sure to preserve the value of rl_end from + the beginning to the end of the function. From a fuzzing report by + Tillmann Osswald - 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 . +lib/readline/vi_mode.c + - rl_vi_delete_to,rl_vi_change_to,rl_vi_yank_to: if we are redoing a + command (_rl_vi_redoing == 1), save the old _rl_vimvcxt, allocate a + new one, and restore the old one before returning. Prevents some + pointer aliasing problems. From a fuzzing report by + Tillmann Osswald - 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 + 10/29 + ----- +arrayfunc.c + - tokenize_array_reference: take valid_array_reference and add a third + argument (char **SUBP), which, if non-NULL, gets the null-terminated + subscript parsed from the NAME argument. If it's NULL, the caller + gets the old valid_array_reference behavior. Fix from + Koichi Murase + - valid_array_reference: just call tokenize_array_reference with a + NULL third argument + - unbind_array_element: assume the caller (unset_builtin) passes a + null-terminated SUB that's already been validated by a call to + tokenize_array_reference so we don't need to call skipsubscript() or + check VA_ONEWORD. Fix from Koichi Murase -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 (lex@upc.ca) +arrayfunc.h + - tokenize_array_reference: extern declaration - 4/19 - ---- -include/posixselect.h - - new include file, encapsulates select(2) includes and defines for - bash and readline. Inspired by patch from Mike Frysinger - +builtins/set.def + - unset_builtin: use tokenize_array_reference to figure out T and pass + that to unbind_array_element. Fix from + Koichi Murase + - unset_builtin: pass non-null argument to array_variable_part to get + the length of the subscript (T), then cut off any final `]' before + passing it to unbind_array_element, since that's what it now + expects -lib/sh/input_avail.c - - include "posixselect.h" +subst.c + - expand_string_for_rhs,expand_string_for_pat: assign td.word from + newly-allocated memory in case it gets freed on error during the + call to call_expand_word_internal(); free it manually when that + call returns -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 + 11/1 + ---- +findcmd.c + - search_for_command: if FLAGS includes CMDSRCH_STDPATH, don't look in + the hash table for the command name. Prompted by a report from + Roger Morris -lib/sh/fpurge.c - - updated implementation, taken from gnulib +aclocal.m4 + - BASH_FUNC_POSIX_SETJMP: add a check by fetching the signal mask + after the siglongjmp and making sure that SIGINT is not blocked, + indicating we restored the original signal mask - 4/21 + 11/2 ---- -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 +subst.c + - expand_string_assignment: make sure to add W_TILDEEXP to the flags so + expand_word_internal performs the right tilde expansion on tildes + following an unquoted colon. Report from Anders Kaseorg + -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 - - 4/24 + 11/3 ---- aclocal.m4 - - add conditional inclusion of to BASH_CHECK_TYPE - -bashtypes.h,lib/sh/strto[iu]max.c - - include if present for any existing declaration of - intmax_t and uintmax_t. Fixes Interix problem reported by - Markus Duft + - BASH_FUNC_POSIX_SETJMP: if cross-compiling, default to `present' if + we've determined we have posix signal functions + + 11/4 + ---- +execute_cmd.c + - SET_LINE_NUMBER: set line_number, but don't set line_number_for_err_trap + if we're already running the ERR trap + - GET_LINE_NUMBER: evaluates to line_number_for_err_trap if we're + running the ERR trap and executing_line_number() otherwise + - execute_function: use GET_LINE_NUMBER to push the value for the line + number into the BASH_LINENO array + - execute_command_internal,execute_arith_command,execute_cond_command: + use SET_LINE_NUMBER to avoid overwriting line_number_for_err trap + while executing the ERR trap. Tentative fix for `caller' problem + reported by Quinn Grier + +configure.ac,patchlevel.h + - set bash version to 5.2-devel, meaning shell_compatibility_level = 52, + which required updating tests (array.tests, array21.sub, + quotearray3.sub, new-exp10.sub, history2.sub). The first three are + because bash-5.2 flushes an indexed array but does not unset the + variable when given `unset a[@]' or `unset[*]' (that is, it acts + like `a=()' instead of `unset a'); the other two are because the + version number changed + + 11/8 + ---- +doc/Makefile.in + - bash.info: use `makeinfo -o' instead of calling infopost.sh to edit + the filename, since the tags table includes absolute byte offsets to + nodes. From https://savannah.gnu.org/support/?110557 -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 + 11/15 + ----- +examples/loadables/realpath.c + - add -a NAME argument to put canonicalized pathnames into an indexed + array instead of displaying them on stdout. Suggested by + felix@f-hauri.ch + +lib/readline/colors.c + - _rl_custom_readline_prefix: new function, looks in $LS_COLORS for a + custom extension (*.readline-colored-completion-prefix) and uses that, + if found, as the default color for the common prefix displayed when + `colored-completion-prefix' is set. Suggested by + Christoph Anton Mitterer + - _rl_print_prefix_color: try the return value from _rl_custom_readline_prefix + before defaulting to the C_PREFIX (C_SOCK) color. Suggested by + Christoph Anton Mitterer -lib/sh/{strindex.c,Makefile.in},Makefile.in - - renamed strindex.c to strcasestr.c +lib/readline/doc/{readline.3,rluser.texi},doc/bash.1 + - readline-colored-completion-prefix: document new custom suffix for + readline's colored-completion-prefix color -configure.in - - add strcasestr to call to AC_REPLACE_FUNCS, take advantage of - existing libc implementations + 11/16 + ----- +doc/{bash.1,bashref.texi},builtins/set.def + - set: modify usage synopsis slightly, based on + https://bugzilla.redhat.com/show_bug.cgi?id=2022324 -config.h.in - - add define for HAVE_STRCASESTR +builtins/set.def + - unset_builtin: add shell compatibility level check <= bash-5.1 to + force `unset a[@]' to unset array variable `a', like in previous + versions, instead of unsetting associative array element `@' or + removing all elements of an indexed array without unsetting the + variable itself -lib/sh/mbscmp.c - - fix mbscmp to return correct values when the strings do not contain - valid multibyte characters. Ideas from gnulib +builtins/common.c + - set_expand_once: now a no-op if the shell compatibility level is + <= bash-5.1, preserving the previous versions' behavior for [[ -v + (dependent on assoc_expand_once instead of forcing it) -xstrchr.c - - only compare current character against C if mblength == 1 +subst.c + - parameter_brace_expand_rhs: make sure that the final value assigned + is always returned from ${a:=b}, even when `a' has a variable + attribute that modifies the value on assignment. Reported back on + 1/20/2021 by oguzismailuysal@gmail.com; bash-5.2 tag removed -{shell,variables}.c - - changed some xstrchr calls back to strchr when the arguments cannot - contain multibyte characters + 11/22 + ----- +doc/{bashref.texi,bash.1} + - unset: change the description of `unset name[@]' (unset name[*]) + to reflect the new behavior (unset associative array subscripts or + remove all elements from an indexed array) and the difference from + previous versions + - set: document -r for restricted shell mode + - restricted shell: change occurrences of `set +o restricted' to + `shopt -u restricted_shell'. From a report from + Jin Xiang + - read: note that read -t0 may return 0 if a subsequent read will + return EOF. From a suggestion by Dale R. Worley + + +execute_cmd.c + - execute_arith_command,eval_arith_for_expr: don't pass EXP_EXPANDED + to evalexp if shell_compatibility_level > 5.1, assuming that the + expression has been quoted by Q_ARITH handling -lib/sh/{xstrchr.c,Makefile.in},Makefile.in - - renamed xstrchr to mbschr; renamed file to mbschr.c +test.c + - test_arithcomp: if we're being called by the conditional command + code and treating the arguments to the arithmetic operators as + expressions, don't pass EXP_EXPANDED to evalexp if the shell + compatibility level is > 5.1, assuming that the expression has been + quoted by Q_ARITH handling -aclocal.m4 - - change BASH_CHECK_MULTIBYTE to use AC_REPLACE_FUNCS(mbschr) + 11/29 + ----- +examples/loadables/getconf.[ch] + - getconf: new implementation of loadable builtin, based on glibc + getconf -externs.h - - extern declarations for mbscmp and mbschr, conditional on the usual - HAVE_MBSCMP and HAVE_MBSCHR defines +examples/loadables/sleep.c + - parse_gnutimefmt: parse GNU interval format (2m30s), returning + seconds and microseconds like uconvert + - sleep: use parse_gnutimefmt if uconvert can't parse the format right + away and "dhms" appears in the format string. Don't return + EX_DISKFALLBACK under any circumstances -general.h,{alias,arrayfunc,bashline,general,execute_cmd,subst}.c - - changed calls to xstrchr to mbschr + 11/30 + ----- -doc/bash.1 - - use `pathname expansion' consistently, not `filename expansion' or - `filename generation' +builtins/wait.def + - wait_builtin: refer to unset_waitlist only if JOB_CONTROL is enabled. + Report from Joel Ebel -doc/bashref.texi - - use the phrase `filename expansion' consistently (since this is - what the Gnu people prefer) instead of `pathname expansion' or - `filename generation' +parse.y,builtins/set.def + - changes for minimal config restrictions -aclocal.m4,config.h.in - - check for mbscasecmp in BASH_CHECK_MULTIBYTE, define HAVE_MBSCASECMP - if found +configure.ac,config.h.in + - --enable-translatable-strings: new configuration option to allow + $"..." support to be compiled in or out; not included in the minimal + shell configuration -lib/sh/{mbscasecmp.c,Makefile.in} - - new file, case-insensitive multibyte string comparison +shell.c + - main: don't include any of the dump-strings options if + TRANSLATABLE_STRINGS is not defined -externs.h - - extern declaration for mbscasecmp +lib/sh/shquote.c + - sh_backslash_quote_for_double_quotes: needed for translatable strings - 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 +parse.y + - support for translating $"..." strings now conditional on + TRANSLATABLE_STRINGS - 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 +locale.c + - locale_expand: now conditional on TRANSLATABLE_STRINGS - 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 + - expand_string_dollar_quote: support for $"..." now conditional on + TRANSLATABLE_STRINGS +doc/bashref.texi + - --enable-translatable-strings: document new configuration option - 5/20 + 12/2 ---- -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 - +subst.c + - verify_substring_values: now that the default compatibility level is + 52, and the Q_ARITH code is enabled, make the EXP_EXPANDED flag for + evalexp() dependent on the compatibility level + - param_expand: arithmetic substitution: make EXP_EXPANDED flag + for evalexp() dependent on the compatibility level + - expand_word_internal: don't call expand_array_subscript if the + shell compatibility level is 51 or below (Q_ARITH) - 5/22 - ---- +test.c + - test_unop: if the shell compatibility level is > 51, using [@] with + an existing associative array will report on a key of `@' -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 +arrayfunc.c + - array_expand_index: if the compatibility level is > 51, Q_ARITH is + used and we don't pass EXP_EXPANDED to evalexp() -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 +COMPAT,doc/bashref.texi + - shell compatibility mode: document effects of setting the + compatibility mode to 51 - 5/25 + 12/3 ---- -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 +lib/malloc/malloc.c + - mremap: only use if MREMAP_MAYMOVE is defined, since we use the Linux + version of the function signature - 5/26 + 12/6 ---- -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 +bashhist.c + - bash_add_history: if we're parsing a here-document (PST_HEREDOC), only + suppress adding the newline between lines if we're not at the first + line of the here-document (here_doc_first_line != 0). From a report + by S0AndS0 - 5/29 + 12/8 ---- -lib/readline/text.c - - fix rl_change_case to handle case where mbrtowc doesn't find a - valid multibyte character +lib/readline/colors.c + - _rl_custom_readline_prefix: use STREQN to check for the extension + string in $LS_COLORS, since it's not necessarily null-terminated. + From https://savannah.gnu.org/patch/?10158 -lib/readline/vi_mode.c - - fix _rl_vi_change_mbchar_case to handle case where mbrtowc doesn't - find a valid multibyte character + 12/10 + ----- +variables.c + - set_int_value,set_string_value: broke common code for setting int + and string dynamic variable values out into separate functions; + changed all callers to use them where appropriate. set_int_value + takes a flags argument saying whether or not to force the integer + attribute on + - assign_random: store the value assigned as the variable value so + things like RANDOM=42; RANDOM+=7 generate consistent sequences + like in ksh93 + - assign_seconds: store the value assigned as the variable value so + things like SECONDS=42 ; SECONDS+=7 generate what's expected -lib/sh/casemod.c - - fix sh_modcase to handle case where mbrtowc doesn't find a valid - multibyte character +doc/Makefile.in + - changes to allow man pages that include others (.so FN) to be built + outside the source tree -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 + 12/13 + ----- +arrayfunc.c + - assign_array_element_internal: take an additional argument: char **NVALP. + If non-null, it gets the value eventually assigned to the array + element + - assign_array_element: take an additional NVALP argument; pass it to + assign_array_element_internal -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 +arrayfunc.h + - assign_array_element: new extern function declaration - 6/5 - --- -doc/{bash.1,bashref.texi} - - added some more explanation of the inheritance of the ERR trap at - the suggestion of Thomas Pospisek +{subst,variables}.c,builtins/{common.c,declare.def} + - assign_array_element: change callers -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 +subst.c + - parameter_brace_expand_rhs: for the ${param:=value}, use the value + returned by assign_array_element in NVALP as the return value, since + it's the value ultimately assigned to the variable after possible + modification (e.g., arithmetic evaluation). Reported by + oguzismailuysal@gmail.com after flawed fix applied 11/16 - 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 + 12/14 + ----- +arrayfunc.h + - array_eltstate_t: an object that encapsulates an array element's + state (type, index, key, value) whether it's an indexed or + associative array - 6/16 - ---- -variables.c - - changes to allow variables.c to be compiled if ALIAS is not defined. - Bug and fix from John Gatewood Ham +arrayfunc.c + - {init,flush}_eltstate: new functions to initialize and flush any + allocated memory from array_eltstate_t objects. No allocation/ + deallocation functions yet; the only use is with a static instance + - assign_array_element_internal: take an array_eltstate_t * instead of + a char ** as the final argument, so we can return keys/indices and + values depending on the type of array; populates it with the + appropriate values + - assign_array_element: take array_eltstate_t * as final argument + instead of a char **; pass it to assign_array_element_internal + +{subst,variables}.c,builtins/{common.c,declare.def} + - assign_array_element: change callers to modify final argument + + 12/15 + ----- +arrayfunc.c + - array_value_internal: now takes an array_eltstate_t * as the final + argument; there is no more `rtype' argument in favor of the + `subtype' member; returns the appropriate values in its members + - array_value: changed to pass array_eltstate_t to array_value_internal, + saves and fetches its `ind' member into *indp; saves `subtype' + member into *rtype + - get_arrary_value: changed to take array_eltstate_t as third argument, + passes it to array_value_internal + +{redir,expr}.c + - get_array_value: changed callers; initializing the array_eltstate_t + argument as necessary -lib/sh/getcwd.c - - fix so systems defining BROKEN_DIRENT_D_INO have the necessary - defines. Fix from Jay Krell +test.c + - test_builtin: changed to use get_array_value, adding AV_ALLOWALL to + the flags, since it didn't use any QUOTED argument. Pass + array_eltstate_t * as final argument and get subtype from it (the + only thing we're interested in, to deallocate memory) -configure.in - - add -D_ALL_SOURCE to interix CFLAGS for struct timezone definition. - Bug and fix from John Gatewood Ham + 12/16 + ----- +arrayfunc.c + - array_value: now takes a final argument of array_eltstate_t *, which + it passes to array_value_internal; no more rtype and indp args. + Callers are responsible for marshalling values into estatep + +arrayfunc.h + - array_value: changed function signature + +subst.c + - get_var_and_type,parameter_brace_expand_word: changed calls to + array_value to use array_eltstate_t argument and initialize it + appropriately. Copy values back from it to the parameters we need + to modify - 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 + - assign_lineno: call set_int_value to store the value, like with + RANDOM and SECONDS (from 12/10) + + 12/17 + ----- +{eval,execute_cmd}.c + - when bypassing a parsed command because read_but_dont_execute is + set, don't modify last_command_exit_value. From a report by + Robert Elz -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 +parse.y + - parse_comsub: make sure the first call to shell_getc to check whether + or not it's an arithmetic expansion skips a quoted newline. From a + report by Robert Elz - 7/9 - --- + 12/21 + ----- 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 + - parameter_brace_remove_pattern,parameter_brace_patsub,parameter_brace_casemod, + parameter_brace_transform,parameter_brace_substring: now take an + array_eltstate_t * argument in place of the arrayind_t argument, pass + it to get_var_and_type; this generalizes the indexed array behavior + of expanding array subscripts once to associative arrays via an + eventual call to array_value_internal with a non-null KEY member + - get_var_and_type: now takes an array_eltstate_t * argument in place + of the arrayind_t argument; use it in calls to array_value so we + can only expand array subscripts once whether they are indexed or + associative arrays + - parameter_brace_expand_word: take an array_eltstate_t * argument in + place of the arrayind_t * argument; pass it to array_value; use a + static version (which we init and flush) if the argument passed is + NULL so we can get the right state passed back and forth + - parameter_brace_expand: pass a pointer to a static array_eltstate_t + to parameter_brace_expand_word, and use that in the various calls to + parameter_brace_XXX functions that perform specific expansions in + place of the old arrayind_t argument; make sure to flush it before + returning, even on errors + + 12/22 + ----- +{trap,variables}.c + - internal_warning: calls changed to use translatable strings + consistently - 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 +error.[ch] + - internal_debug: new function, prints a message like internal_warning, + no-op if DEBUG is not defined + - INTERNAL_DEBUG: macro that expands to internal_debug when DEBUG is + defined, and nothing otherwise -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 +{jobs,trap}.c + - changed some internal_warning and internal_inform calls to use + internal_debug, since they were active only when DEBUG is defined - 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 - +parse.y + - parse_comsub: add internal_debug call when a command substitution + ends with unterminated here-documents - 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 - +builtins/common.c + - number_of_args: unconditionally return posparam_count -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 +{jobs,execute_cmd,subst}.c,parse.y,builtins/{command.def,evalstring.c} + - INTERNAL_DEBUG: use instead of calls to itrace protected by #ifdef + DEBUG -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 + 12/26 + ----- +lib/glob/glob.c + - glob_always_skip_dot_and_dotdot: initialize to 1 (enabled) -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 - +builtins/shopt.def + - globskipdots: new shell option, exposes glob_always_skip_dot_and_dotdot -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 - +doc/{bash.1,bashref.texi} + - globskipdots: document new shell option - 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 - - 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) + - fix_arrayref_words: call valid_array_reference with 0 for third arg + because the words have not undergone any word expansions yet and + the quotes are still present. This makes things like + A=[\[]=set + unset A[\[] + work - 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 +subst.c + - word_list_split: if a word undergoes word splitting but is not + changed, preserve any W_ARRAYREF flag into the new word. This makes + things like + rkey=']' + unset A[$rkey] + work because the unset builtin sees the W_ARRAYREF flag on its + argument -lib/readline/doc/{readline.3,rluser.texi},doc/bash.1 - - document new "menu-complete-backward" bindable readline function. - Suggested by Jason Spiro + 12/29 + ----- +builtins/common.h + - SET_VFLAGS: take a set of word flags, and set flags for use with + valid_array_reference (vflags) and assign_array_element/bind_int_variable + (bindflags) based on those flags and the setting of assoc_expand_once + (moved from read.def and generalized) -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 - +arrayfunc.c + - array_variable_name: now exclusively takes AV_xxx flags; understands + how to translate AV_NOEXPAND to the right flag for skipsubscript; + understands AV_ONEWORD and AV_NOEXPAND + - array_variable_part: just passes the FLAGS arg to array_variable_name + - assign_array_element: translates ASS_ flags to AV_ flags for + array_variable_name + - array_value_internal: now just passes flags straight through to + array_variable_part (which sends them to array_variable_name) -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 +builtins/common.[ch] + - builtin_bind_var_to_int: now takes a new FLAGS third argument; passes + it to bind_var_to_int - 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 +builtins/printf.def + - printf_builtin: use SET_VFLAGS to set flags for builtin_bind_variable + (bindflags); makes things like + declare -A A; key=']' ; printf -v A[$key] "foo" + work without a subscript error as long as assoc_expand_once is defined -lib/readline/util.c - - new bindable keymap function, _rl_null_function, to be used internally +builtins/read.def + - read_builtin: use new common version of SET_VFLAGS instead of + private version; changed to use new calling sequence; makes things like + declare -A A; key=']' ; read A[$key] <<<"foo" + work without a subscript error as long as assoc_expand_once is defined + +builtins/wait.def + - wait_builtin: use SET_VFLAGS for variable name with -p option + - wait_builtin: call builtin_bind_var_to_int with new bindflags third + argument -lib/readline/rlprivate.h - - extern declaration for _rl_null_function +expr.c + - expr_streval: just pass TFLAG (AV_xxx flags) straight through to + array_variable_part -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 - +variables.c + - bind_int_variable: translate the assignment flags (ASS_xxx) to + VA_xxx flags for valid_array_reference calls (ASS_ONEWORD); translate + assignment flags to AV_xxx flags for array_variable_part -builtins/bind.def - - call rl_bind_keyseq instead of rl_set_key for -r option + 12/30 + ----- +subst.c + - parameter_brace_expand: when expanding an indirect variable, extend + the special case for array[@] and array[*] (set -u/no positional + parameters, obeying the baroque quoting rules) to the value of the + indirection. Report and fix from konsolebox -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 + 12/31 + ----- +parse.y + - compound_list: when parsing a compound_list production, collect any + pending here-documents after reading a newline, not after reading + any command terminator. Fixes interactive-only prompting bug + reported back in 8/2021 by Hyunho Cho - 8/2 - --- + 1/1/2022 + -------- bashline.c - - fix clear_hostname_list by setting hostname_list_initialized to 0 - after freeing all list members. Fixes bug reported by Freddy - Vulto - -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 - + - set_filename_quote_chars: break code that modifies + rl_filename_quote_characters based on whether DIRNAME needs to be + expanded from bash_directory_completion_hook into its own function + - bash_check_expchar: break code that checks whether DIRNAME will be + word expanded from bash_directory_completion_hook into its own + function + - bashline_reset,attempt_shell_completion: make sure complete_fullquote + is set to 1 (as it is by default) in case a completion modifies it + - bash_quote_filename: if we are completing (but not expanding -- + direxpand is unset) and backslash-quoting a filename with expansion + characters as determined by bash_check_expchar, make sure + filename_bstab is set not to include the expansion char (and any + following char and closer) and set complete_fullquote to 0 so + sh_backslash_quote uses filename_bstab. Fixes the longstanding issue + of quoting a `$', for instance, if the rest of the filename contains + any characters that need quoting in filenames. This assumes that the + filename is unquoted (*QCP == 0) so the word will be expanded and is + not part of the filename (if needed, we can use file_exists to check + whether the expansion characters are actually part of the filename) - 8/3 + 1/7 --- -pcomplete.h - - defines for EMPTYCMD ("_EmptycmD_") and DEFAULTCMD ("_DefaultCmD_") +examples/loadables/accept.c + - new -b bindaddr option to bind to a specific IP address + - move setsockopt calls before bind() to avoid TIME_WAIT issues. Fixes + from Dzogovic Vehbo -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 + 1/10 + ---- +configure.ac + - bumped version to 5.2-alpha. -doc/bash.1,lib/readline/doc/rluser.texi - - document new -D, -E options to compopt - - document new -D option to complete/compgen + 1/16 + ---- -shell.h - - new define, EX_WEXPCOMSUB, value of 125 - - new define, EX_RETRYFAIL, value of 124 (for programmable completion) +tests/{unicode1,glob2,intl2}.sub, tests/run-intl + - minor changes to add warnings for missing locales that cause test + failures + + 1/17 + ---- +parse.y + - history_delimiting_chars: if we have a blank line by the time we + hit the end of the tests, return a semicolon for the first blank + line to avoid running lines of a multi-line command together. + Fixes bug reported by Joakim Lindblad + +subst.c + - expand_string_for_patsub: expand the replacement string for pattern + substitution assuming that it will eventually be passed to + strcreplace to replace `&' with the matched portion of the string. + This calls expand_string_for_pat(), which leaves the string quoted + and does not perform word splitting, then calls + quote_string_for_repl to post-process the expanded string. + - quote_string_for_repl: perform quote removal on passed string while + replacing CTLESC escaping a `&' or a backslash with a backslash. The + result must be passed to strcreplace + - parameter_brace_patsub: call expand_string_for_patsub if + patsub_replacement is set to quote + 1/18 + ---- 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 + - read_comsub: make istring_index a size_t to avoid overflow with very + large values of istring_size. + From https://savannah.gnu.org/support/index.php?110596 + - expand_word_internal: make istring_index a size_t -pcomplete.c - - new define, PCOMP_RETRYFAIL, used to indicate a "failure, retry with - next completion" status to the programmable completion code + 1/20 + ---- +buitins/cd.def + - add a description of `cd -' to the help text. Suggested by + Rob Landley - 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) + 1/21 + ---- +lib/glob/glob.c + - glob_vector: if we allocate NEXTLINK using malloc, and free it due to + some allocation failure, reset FIRSTMALLOC to avoid duplicate frees + later on -doc/bash.1,lib/readline/doc/rluser.texi - - documented new dynamic programmable completion functionality +subst.[ch] + - sub_append_string: the INDX parameter is now a size_t to avoid + overflow - 8/5 - --- -stringlib.c - - first argument to substring() is now `const char *' +parse.y + - decode_prompt_string: RESULT_INDEX is now a size_t to pass to + sub_append_string -externs.h - - changed extern declaration for substring() +jobs.[ch],nojobs.c + - wait_for_background_pids: now returns the number of jobs/processes + reaped -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 +builtins/wait.def + - wait_builtin: if -p pid supplied without -n, make sure we do something + useful if no job/pid arguments are supplied and there are no jobs. + Reported by Oguz -{subst,general,expr}.c - - changed skipsubscript() callers +builtins/read.def + - read_builtin: if we have a timeout, use SIGALRM instead of select + when in posix mode, since we use read instead of zread. Fixes bug + reported by Andreas Schwab -assoc.c - - changed assoc_to_assign to double-quote the key if it contains any - shell metacharacters +subst.c + - expand_string_dollar_quote: handle single-quoted and double-quoted + strings that might include $' and $" without attempting translation; + do more error checking for unterminated $' and $" that leaves those + characters unmodified. This is for use by readline's various line + expansion functions (shell_expand_line) -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 + 1/23 + ---- +parse.y,make_cmd.c + - revert change that unconditionally processes $'...' and $"..." in + here-document bodies; there are only a couple of cases where they + should be processed in a double-quote environment -redir.c - - set expanding_redir before expanding body of here documents and - here strings to avoid looking for variables in temporary env + 1/24 + ---- - 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 +subst.c + - extract_dollar_brace_string: if we see another `${' on the rhs of + the operator, reset the dolbrace_state to DOLBRACE_PARAM while we + read this new ${...} string + - extract_heredoc_dolbrace_string: new function, variant of + extract_dollar_brace_string, to process the WORD in ${PARAM OP WORD} + while expanding lines of here-document data. It's complicated by the + requirement to add to the result string as we go along, since we + need to change the contents of the input string with ansi expansion + or locale translation. + - string_extract_single_quoted: take a new third argument: ALLOWESC. + This allows backslash to escape an embedded single quote, needed by + extract_heredoc_dolbrace_string to process $'...'; changed callers -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 - - - suppress completion match sorting in bash_dabbrev_expand by - setting rl_sort_completion_matches = 0. Suggestion from Dan - Nicolaescu - - 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 + 1/25 ---- -execute_cmd.c - - change to execute_command_internal to make [[ ... ]] conditional - command subject to settings of `set -e' and the ERR trap +parse.y + - parse_matched_pair: ansi-expand $'...' in WORD for ${PARAM OP WORD} + and single-quote the result if dolbrace_state == DOLBRACE_QUOTE + (posix pattern removal operators) even if extended_quote == 0 + +subst.c + - extract_heredoc_dolbrace_string: add logic to align with parse.y: + parse_matched_pair and its $'...' expansion, including handling + extended_quote - 8/14 + 1/27 ---- -execute_cmd.c - - change to execute_command_internal to make (( ... )) arithmetic - command subject to settings of `set -e' and the ERR trap +builtins/evalstring.c + - should_optimize_fork: broke conditions for optimizing away the fork + for a simple command out of optimize_fork into new function, call + from should_suppress_fork and optimize_subshell_command. Call from + optimize_fork if (subshell_environment & SUBSHELL_PAREN), relying + on fact that CMD_TRY_OPTIMIZING is only set in a couple of specific + conditions + - optimize_fork: call should_suppress_fork only if startup_state == 2; + it does the extra checks for that specific case + - optimize_fork: call should_optimize_fork if we're in a (list) + subshell (subshell_environment & SUBSHELL_PAREN) + - optimize_subshell_command: set CMD_TRY_OPTIMIZING on the right side + of a `&&', `||', or `;' list as long as it's a simple command so + we can check with optimize_fork() when it's time to execute it + +execute_cmd.c + - execute_in_subshell: call optimize_subshell_command for (list) + subshells to either set CMD_NO_FORK for simple commands or set + CMD_TRY_OPTIMIZING for likely candidates for later optimization + +builtins/common.h,builtins/evalstring.c + - optimize_fork: renamed to optimize_connection_fork; changed callers -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 - + 1/31 + ---- +include/shmbutil.h + - COPY_CHAR_I,SCOPY_CHAR_I: add check for locale_utf8locale and + (c & 0x80) as in other macros -lib/readline/readline.h - - extern declaration for rl_skip_csi_sequence +lib/sh/shquote.c + - sh_backslash_quote_for_double_quotes: rewrote to use array indexing + and COPY_CHAR_I to make it easier to drop in future calls to + charvis() to make `unsafe' characters visible if FLAGS == 1 -lib/readline/funmap.c - - new bindable command "skip-csi-sequence", runs rl_skip_csi_sequence + 2/1 + --- +parse.y + - parse_comsub: if we are currently expanding aliases, temporarily + turn off alias expansion if we are not in posix mode so we defer + alias expansion until command_substitute(). Fixes double-expansion + bug reported by Martijn Dekker and aligns with + https://www.austingroupbugs.net/view.php?id=1342 + - xparse_dolparen: turn off alias expansion entirely while running the + parser: either we do it in parse_comsub (posix mode) or in + command_substitute (default mode) + - parse_string_to_command: ditto + +subst.c + - command_substitute: if we are expanding aliases, temporarily turn + off alias expansion if we are in posix mode, since we already + performed it in parse_comsub() and are using the command string + reconstituted from the parse result -doc/bash.1,lib/readline/doc/{readline.3,rluser.texi} - - documented new bindable command "skip-csi-sequence", unbound by - default +doc/bashref.texi + - bash posix mode: add description of alias expansion and command + substitution parsing and execution -builtins/evalfile.c - - fix _evalfile to remove embedded null bytes from the file read - into the string. Report and proposed fix from Roman Rakus - + 2/4 + --- +lib/readline/rltty.c + - rl_deprep_terminal: set _rl_last_c_pos to 0 after outputting + BRACK_PASTE_FINI, since the last character in that is \r. Partially + address issue raised by Markus Schwarzenberg + in https://lists.gnu.org/archive/html/bug-bash/2022-02/msg00056.html -{configure,config.h}.in - - check for syslog(3), define HAVE_SYSLOG - - check for syslog.h, define HAVE_SYSLOG_H + 2/5 + --- +doc/{bash.1,bashref.texi} + - minor typo fixes from Helge Kreutzmann -config-top.h - - new define SYSLOG_HISTORY, disabled by default + 2/7 + --- +{arrayfunc,variables}.c + - ARRAY_EXPORT: changes to encode array and assoc variables using a + scheme similar to shell functions so we can export arrays and + differentiate them from scalar variables and differentiate array + and assoc variables. Still not enabled by default. -config-bot.h - - if HAVE_SYSLOG or HAVE_SYSLOG_H are not defined, undef SYSLOG_HISTORY +variables.c + - mk_env_string: third argument is now the variable's attributes or 0, + with all the attributes we can export arrays -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 +lib/readline/bind.c + - active-region-start-color,active-region-end-color: new bindable + string variables, one to set the active region color (instead of + standout mode) and one to turn it off (instead of the "se" terminal + capability). They set _rl_active_region_start_color and + _rl_active_region_end_color variables via functions -sig.c - - in termsig_handler, resend SIGHUP to children if subshell_environment - indicates we're a shell performing command or process substitution +lib/readline/display.c + - putc_face: if setting standout mode, check for both the start color + and end color variables and output the start color string. If turning + off standout mode (normal face), output the end color string. Both + variables must be set -jobs.c - - add CHECK_TERMSIG calls to wait_for in addition to the ones in - waitchld() +lib/readline/{readline.c,rlprivate.h} + - declarations for _rl_active_region_start_color and + _rl_active_region_end_color -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 + 2/8 + --- +bashline.c + - initialize_readline: add bindable name `vi-edit-and-execute-command' shell.c - - call initialize_bashopts after calling initialize_shell_options at - shell startup + - subshell_exit: make sure to set last_command_exit_value before + calling the exit trap. Fixes bug reported by Greg Edwards + -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 + 2/9 + --- +lib/readline/{terminal.c,rlprivate.h} + - _rl_region_color_on,_rl_region_color_off: functions to output the + _rl_active_region_start_color and _rl_active_region_end_color + - _rl_reset_region_color: function to encapsulate setting the region + color to an arbitrary string, including doing memory management -pathexp.c - - initialize extended_glob variable to EXTGLOB_DEFAULT +lib/readline/display.c + - putc_face: call _rl_region_color_on and _rl_region_color_off instead + of _rl_standout_on and _rl_standout_off -doc/{bash.1,bashref.texi} - - document new $BASHOPTS variable and its behavior +lib/readline/terminal.c + - _rl_init_terminal_io: initialize _rl_active_region_start_color and + _rl_active_region_end_color from _rl_term_so and _rl_term_se, + respectively; reset every time the terminal is changed + - _rl_init_terminal_io: turn off the active region for a dumb terminal -doc/bashref.texi - - document new --enable-extended-glob-default configure option +lib/readline/bind.c + - sv_region_{start,end}_color: call _rl_reset_region_color with the + appropriate value for WHICH - 8/16 + 2/10 ---- -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 - - -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()) +lib/readline/doc/{rluser.texi,readline.3},doc/bash.1 + - active-region-start-color,active-region-end-color: documented new + bindable readline variables + - enable-active-region: document using active-region-start-color to + highlight the text in the region - 8/18 + 2/11 ---- -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 +parse.y + - read_token,read_token_word: make sure characters read by shell_getc + are protected by appropriate calls to MBTEST when testing for shell + metacharacters and operators -config.h.in - - add define for HAVE_ICONV, already found by intl autoconf macros - - add define for HAVE_LOCALE_CHARSET + 2/14 + ---- +builtins/shopt.def + - set_compatibility_level: if the current compatibility level is outside + the range of the compatNN options, just leave it alone when + unsetting one of the options (which by definition was already + unset). Fixes issue reported by Mihai Moldovan -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 + 2/16 + ---- +lib/readline/search.c + - rl_history_search_{pos,len,flags}: rename to have a leading `_' + - _rl_history_search_pos: no longer static so other parts of readline + can see it -Makefile.in - - make sure LIBICONV is set by autoconf (@LIBICONV@) and added to - list of link libraries +lib/readline/rlprivate.h + - _rl_history_search_pos: extern declaration -externs.h - - new extern declarations for fnx_fromfs and fnx_tofs +lib/readline/readline.c + - readline_internal_teardown: don't run the undo list against the + current history entry if the non-incremental search functions have + set _rl_history_search_pos to it, since it doesn't reflect the + current contents of the line buffer. Fixes issue reported by + Andreas Schwab -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 ; fix inspired by - Guillaume Outters +lib/readline/misc.c + - _rl_start_using_history: initialize _rl_history_search_pos to + something invalid so it doesn't match where_history() - 8/19 + 2/17 ---- -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/callback.c + - rl_callback_read_char: make sure _rl_eof_found is set to the value + of eof before calling the deprep terminal function, so it can do + different things based on whether the input code read EOF (or the + user entered the EOF character). From a gdb discussion started by + Andrew Burgess (still more to do, since this + is not part of the public API) + 2/18 + ---- lib/readline/readline.h - - extern declaration for rl_filename_rewrite_hook + - RL_STATE_EOF: new readline state value; set when readline reads an + EOF character on an empty line or a read returns an error + - rl_eof_found: new public variable -lib/readline/doc/rltech.texi - - document rl_filename_rewrite_hook +lib/readline/rprivate.h + - _rl_eof_found: renamed to rl_eof_found, so not declared here -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 +lib/readline/{callback,readline}.c + - RL_STATE_EOF: set appropriately when readline gets an EOF. Suggested + by Andrew Burgess + - RL_STATE_EOF: make sure it's not set when readline starts + - rl_eof_found: set appropriately when readline gets an EOF - 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 from back in 2004 +lib/readline/{callback,readline,rltty}.c + - rl_eof_found: new name for _rl_eof_found -lib/readline/rlprivate.h - - extern declaration for _rl_skip_completed_text +lib/readline/doc/rltech.texi + - RL_STATE_EOF: document -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 + 2/19 + ---- +parse.y + - parse_comsub: turn off parser state flags we don't want to inherit + into this call to the parser (PST_REGEXP, PST_EXTPAT, PST_CONDCMD, + PST_CONDEXPR for now). Fixes bug reported by konsolebox + - 8/21 + 2/23 ---- -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 +findcmd.c,builtins/hash.def + - replace calls to is_directory with file_isdir, which only performs a + stat and doesn't do the eaccess call to check for an executable file -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 - +findcmd.c + - find_in_path_element: takes a new RFLAGSP argument, an int * where + the status flags for the returned pathname are returned; saves + additional calls to stat/eaccess + - search_for_command: get the returned flags from + find_user_command_in_path so we don't need any additional calls to + file_status after we find the command in $PATH - 8/24 + 2/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 +doc/{bash.1,bashref.texi} + - FUNCTIONS: some small changes to the description of local variables + and dynamic scoping, with emphasis on how that affects `unset' + behavior. Inspired by a discussion with + Christoph Anton Mitterer - 8/26 + 2/25 ---- -lib/readline/funmap.c - - add "old-menu-complete" binding for rl_old_menu_complete +examples/loadables/realpath.c + - renamed -s option to -q to align with other versions + - perform array assignment for `-a varname' even if -q option supplied + - renamed -S option to -s for Linux compatibility -lib/readline/readline.h - - add extern declaration for rl_old_menu_complete + 2/28 + ---- +lib/readline/misc.c + - _rl_free_saved_history_line: call rl_free_undo_list, saving and + setting rl_undo_list to the saved history line's data, so the right + call to _hs_replace_history_data happens and we don't end up with + a pointer aliasing problem. Fixes core dump reported by + Andreas Schwab , but does not make his + scenario equivalent to incremental search -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. + 3/1 + --- +lib/readline/search.c + - make_history_line_current: save the current line before replacing it + with the found history entry using rl_maybe_save_line + - noninc_dosearch: we don't want the saved history line, so free it + after calling make_history_line_current + - _rl_history_search_internal: call rl_maybe_replace_line after making + changes to the line buffer with make_history_line_current so we can + save the undo list we constructed before we set the history position - 8/29 - ---- -execute_cmd.c - - add fflush(stdout) and fflush(stderr) to child coproc code before - calling exit after execute_in_subshell + 3/2 + --- +lib/readline/display.c + - expand_prompt: add missing piece to patch from 10/26/2021: if we are + recalculating the number of invisible characters on the first line + of the prompt, we need to update INVFL, even if we already set it + when we hit the number of physical characters. This ends up being + assigned to prompt_invis_chars_first_line, and is used in several + subsequent calculations. Reported by + Andreas Schwab - 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/doc/{readline.3,rluser.texi},doc/bash.1 + - enable-bracketed-paste: add some language making it clearer that + bracketed paste prevents the pasted text from being interpreted as + editing commands. Suggested by Karl O. Pinc -lib/readline/signals.c - - if _rl_echo_control_chars == 0, don't go through _rl_echo_signal_char + 3/4 + --- +make_cmd.c + - make_here_document: perform quote removal on the here-doc delimiter + only if it's marked as quoted, which prevents quotes from inside a + command substitution from being removed (they're supposed to begin a + new quoting context) when the word itself isn't flagged as quoted + (which means the body of the here-document gets expanded). You can't + perform quote removal *and* expand the here-document lines. From an + austin-group discussion back in early February + +lib/sh/strvis.c + - charvis -> sh_charvis; change caller + - sh_charvis: now take an additional SLEN argument to avoid having to + compute the string length every time; change callers + - sh_charvis: add a utf-8 locale-specific check before calling + COPY_CHAR_I (in practice, doesn't make any real difference) + + 3/10 + ---- +arrayfunc.c + - convert_var_to_array: if we're being asked to create an associative + array (flags & 2), and we have an existing variable that is not an + assoc array (and not an existing indexed array), call + convert_var_to_assoc to make it one + 3/11 + ---- +jobs.c + - wait_for: don't call get_tty_state() if readline is dispatching + (RL_STATE_DISPATCHING) with the terminal settings changed + (RL_STATE_TERMPREPPED), the same way we don't if we are running a + command for programmable completion. Fixes bug with SIGINT reverting + to the saved readline terminal settings reported by + Markus Napierkowski -lib/readline/doc/{readline.3,rluser.texi} - - document "echo-control-characters" bindable variable +parse.y + - decode_prompt_string: make sure the expansion of \w, \W, and \s + are all run through sh_strvis before calling + sh_backslash_quote_for_double_quotes or just through sh_strvis if + we're not running the prompt string through word expansions. + Fixes issue reported by Josh Harcome back + in mid-January - 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 + 3/16 + ---- +bashline.c + - bash_quote_filename: if we have a word to complete that contains + characters that introduce a word expansion, make sure the passed + string does *not* exist as a filename before removing those + characters from the set that must be backslash-quoted. See change + from 1/1/2022 - 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 - + 3/18 + ---- +lib/readline/search.c + - make_history_line_current: don't free rl_undo_list or + _rl_saved_line_for_history; don't unconditionally save the history + line. This reverts some of the changes to support setting the + history position in history-search-backward + - rl_history_search_internal: only free the saved history line if we + were the ones who created it - 9/7 - --- -arrayfunc.c - - some fixes to assign_compound_array_list to avoid null pointer - dereferences pointed out by clang/scan-build + 3/21 + ---- +lib/readline/nls.c + - xmalloc.h: include for systems without setlocale(), so xfree has a + prototype. Report and fix from András Kucsma -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/search.c + - _rl_history_search_internal: use previous-history/next-history to + move to the found history line instead of directly calling + history_set_pos. This makes the behavior more similar to incremental + search + - rl_history_search_internal: make sure to set rl_undo_list to the + current history undo list around the calls to rl_get_previous_history + or rl_get_next_history, in order to fool the call to + maybe_replace_line they make -lib/readline/undo.c - - fix to _rl_copy_undo_list (function unused) to avoid deref of - uninitialized pointer pointed out by clang/scan-build +lib/readline/readline.c + - _rl_executing_func: the currently-executing readline command function -general.c - - fix string_to_rlimtype so it works if passed a null pointer (though - it never is) +lib/readline/rlprivate.h + - _rl_executing_func: extern declaration -builtins/mapfile.def - - fix to mapfile() to avoid possible null pointer dereference pointed - out by clang/scan-build +lib/readline/search.c + - _rl_history_search_internal: removed (commented out) code that sets + the current history entry to the found history entry, too much + assumes that the current undo list should be applied to the current + history entry (where_history()) -variables.c - - fix to valid_exportstr to avoid possible null pointer dereferences - pointed out by clang/scan-build + 3/23 + ---- +subst.c + - parameter_brace_expand_word: if we have double-quoted ${*} or ${@}, + make sure we are setting W_HASQUOTEDNULL in the flags we return to + the caller if we are returning QUOTED_NULL(word) + - parameter_brace_expand_word: if we have a double-quoted associative + array reference using `*' or `@', make sure we are setting + W_HASQUOTEDNULL in the flags we return to the caller if we are + returning QUOTED_NULL(word) + - parameter_brace_expand: if we're using the `[:]+' word expansion + operator, we need to note a quoted null string and pass the + W_QUOTEDNULL flag back to the caller + - expand_word_internal: make sure to return a QUOTED_NULL + (word[0] == CTLNUL) back to the caller if HAD_QUOTED_NULL is set, + regardless of whether or not we see a quoted dollar at. Fix for bug + reported by Andreas Luik -bashline.c - - fix to bash_execute_unix_command to avoid possible null pointer - dereference if READLINE_LINE or READLINE_POINT is not bound +arrayfunc.c + - array_value_internal: fix typo and set estatep->type to ARRAY_INDEXED + for indexed arrays - 9/11 + 3/31 ---- -[Prayers for the victimes of 9/11/2001] +lib/readline/{history.c,histlib.h} + - _hs_at_end_of_history: convenience function to tell whether or not + the current history position is at the end of the history list -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 + 4/1 + --- +lib/readline/search.c + - make_history_line_current: don't free rl_undo_list if it is equal to + _rl_saved_line_for_history->data, since we will need to restore it + later if we got it from a history entry. Fixes issue dating back to + 7/2021 and changes to _rl_free_saved_line_for_history, current issue + reported by Andreas Schwab -{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 + 4/5 + --- +lib/readline/{complete,histfile,histsearch,isearch,terminal}.c + - xfree: use instead of free -make_cmd.h - - change extern declaration for make_redirection + 4/7 + --- +configure.ac + - bumped version to bash-5.2-beta -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 +[bash-5.2-beta frozen] -{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 + 4/8 + --- +lib/readline/input.c + - _rl_orig_sigset: need extern declaration if HAVE_SELECT is defined. + From https://savannah.gnu.org/support/?110634 -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 +examples/loadables/seq.c + - PRIdMAX: redefine if PRI_MACROS_BROKEN is defined. + From https://savannah.gnu.org/support/index.php?110635 - 9/15 + 4/11 ---- -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 +configure.ac + - BASH_FUNC_STRTOIMAX: replace strtoimax if the system doesn't provide + a declaration in a standard header file. Uses new m4/strtoimax.m4. + From https://savannah.gnu.org/support/index.php?110633 -redir.c - - implement REDIR_VARASSIGN semantics for file input and output - redirections and here documents +builtins/printf.def + - getdouble: new function, parses string into `double' using strtod + - printf_builtin: check for the `L' length modifier and use long + doubles for the floating point conversion specifiers. If it's not + supplied, use `double' when in posix mode (as posix specifies) and + long double (if it's available, double if not) in default mode. + From a report from Paul Eggert - 9/16 + 4/12 ---- -parse.y - - added REDIR_WORD versions of remaining redirection constructs except - for err_and_out ones +lib/sh/oslib.c + - bzero: update function signature to modern BSD version -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) + 4/14 + ---- +lib/sh/oslib.c + - bcopy, gethostname, mkfifo: update function signatures to modern + versions -print_cmd.c - - fix rest of cases to print {varname} when REDIR_VARASSIGN is set in - redirect->rflags + 4/15 + ---- +jobs.c,nojobs.c + - wait_for_single_pid: if the pid or job argument is invalid -- isn't + a child of this shell -- return 257, which is out of the range of + valid 8-bit status values -doc/{bash.1,bashref.texi} - - document new {varname} REDIR_VARASSIGN form of redirections +execute_cmd.c + - execute_pipeline: if wait_for_single_pid returns > 256, set it to + 127 (invalid process) -tests/vredir.{right,tests},vredir[1-5].sub - - tests for new {varname} REDIR_VARASSIGN form of redirections +jobs.c + - wait_for_background_pids: if wait_for_single_pid returns > 256, set + the status we return in PS to 127 (what it was before) + +builtins/wait.def + - wait_builtin: if wait_for_single_pid returns > 256, treat it as an + error and set pstat.pid to NO_PID + - wait_builtin: if -p supplied, and we get to the end of the argument + list with PSTAT.PID != NO_PID (which we assume means that the return + value is set from PSTAT.STATUS), set the variable name to PSTAT.PID. + From a report by Robert Elz + - wait_builtin: for compatibility with the netbsd sh, leave the variable + name specified with `-p' unset if there are no PID arguments. + From a report by Robert Elz - 9/18 + 4/17 ---- -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. +parse.y + - xparse_dolparen: if (flags & SX_NOLONGJMP), don't call + jump_to_top_level() on errors -subst.h - - change extern declaration for split_at_delims - - new define for SD_NOQUOTEDELIM flag +bashline.c + - bash_quote_filename: don't call quote_word_break_chars() unless we + have word break chars initialized. Fixes bug reported by + Sam James + 4/18 + ---- 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 + - gen_globpat_matches: call glob_filename with the GX_GLOBSTAR flag if + the `globstar' shell option is enabled. From a report by + Steve -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 +lib/malloc/malloc.c + - internal_free: remove the GLIBC21 code (!) + - internal_free: make the code that tests against memtop and calls + lesscore depend on USE_LESSCORE being defined, which it is by + default -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 +lib/malloc/imalloc.h + - USE_LESSCORE: define -test.c - - < and > binary operators will obey the locale by using strcoll if - the TEST_LOCALE flag is passed to binary_test +parse.y,shell.h + - token_buffer_size and its corresponding saved value in the shell's + parser state are now size_t instead of int -test.h - - new define for TEST_LOCALE +stringlib.c + - strsub,strcreplace: use size_t instead of int for local length and + indexing variables -execute_cmd.c - - execute_cond_node sets TEST_LOCALE so [[ str1 < str2 ]] (and >) - obey the locale. Fixes bug/incompatibility reported by Greg - Wooledge +lib/sh/zmapfd.c + - zmapfd: use size_t instead of int for local length and indexing + variables -doc/{bash.1,bashref.texi} - - documented [[ command new locale-sensitive treatment of < and > +lib/sh/zgetline.c + - zgetline: use size_t instead of int for local length and indexing + variables - 9/24 + 4/20 ---- -configure.in - - add "darwin10" cases like darwin8 and darwin9 to handle linking with - included readline and history libraries +pcomplete.c + - init_itemlist_from_varlist: free VLIST after assigning it from + *SVFUNC and after we get the variable names and values out of it. + Report from Robert E. Griffith - 9/26 + 4/25 ---- -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 - - 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 +redir.c + - here_document_to_fd: if the shell compatibility level is bash-5.0 or + earlier, use tempfiles for all here-documents and here-strings. From + a bug-bash discussion started by Sam Liddicott - 9/29 + 4/26 ---- -subst.c - - make skip_to_delim understand how to skip over process substitution - constructs the way it skips $(...) command substitution +parse.y + - parse_comsub: non-interactive shells exit on a syntax error while + parsing the command substitution + - parse_comsub: unset additional PARSER_STATE flags before calling + yyparse(). Inspired by https://bugs.gentoo.org/837203; unsetting + PST_COMPASSIGN is the fix for that bug + - parse_string_to_word_list: use save_parser_state/restore_parser_state + instead of saving pieces of the shell state in individual variables + - parse_compound_assignment: use save_parser_state/restore_parser_state + instead of saving pieces of the shell state in individual variables + - parse_compound_assignment: unset additional PARSER_STATE flags before + calling read_token(); set esacs_needed_count and expecting_in_token + to 0 like in parse_comsub() since read_token can use them - 9/30 + 4/27 ---- -lib/readline/terminal.c - - don't set the `terminal has meta key' flag if the `MT' capability is - available; that means something completely different +lib/sh/strvis.c + - sh_charvis: changes to handle being compiled without multibyte support - 10/1 + 4/29 ---- -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 - -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 - -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() +lib/readline/callback.c + - rl_callback_read_char: don't set rl_eof_found unless eof is > 0, + since it can be -3 if we need to read more input in a multi-key + sequence. Report from Andrew Burgess - 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 - +examples/loadables/Makefile.sample.in + - new file, containing the rules to build the example shared object + - includes Makefile.inc from wherever it's installed. Suggested by + Robert E. Griffith -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 +examples/loadables/Makefile.inc.in + - remove rules that create the example shared object - 10/6 + 4/30 ---- -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 - +builtins/evalstring.c + - parse_and_execute: check for terminating signals before returning, + after any longjmp, to improve responsiveness and fix the -c code + path before running any exit trap. Report from + Emanuele Torre - 10/8 + 5/17 ---- -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 +builtins/suspend.def + - suspend_builtin: the -f option now forces a suspend even if job + control is not enabled. Inspired by a discussion with + Robert Elz doc/{bash.1,bashref.texi} - - document new `read -N' option + - suspend: updated description to include expanded -f behavior - 10/9 + 5/25 ---- -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 +builtins/mkbuiltins.c + - -includefile: new argument, specifies extern filename to insert + into the #include statement in the structfile (builtins.c) and + the filename in the comment in the extern file (builtext.h). + From Alexander Kanavin via + https://savannah.gnu.org/patch/?10210 -lib/readline/doc/{readline.3,rluser.texi},doc/bash.1 - - document new readline "enable-meta-key" bindable variable +builtins/Makefile.in + - builtins.c: change call to mkbuiltins to add -includefile option + - builtins.c: change recipe to run all the commands in the same shell + invocation + - builtins.c: change recipe to specify new filenames in the call to + mkbuiltins and move them onto builtins.c/builtext.h if the new ones + are different; make the new filenames use the current make recipe + shell pid in the filename ($$RECPID). + Inspired by Alexander Kanavin via + https://savannah.gnu.org/patch/?10210 - 10/10 - ----- -trap.c - - new function, free_trap_string(), does what it says and turns off - SIG_TRAPPED flag without changing signal disposition + 6/2 + --- +builtins/common.c + - builtin_find_indexed_array: new function, factored common code out + of mapfile and read builtins to find an in-scope indexed array or + create one -[bash-4.1-alpha frozen] +builtins/common.h + - builtin_find_indexed_array: extern declaration - 10/16 - ----- -builtins/mapfile.def - - return an error if the variable passed is not an indexed array. - Fixes bug reported by Nick Hobson - - change help text to make it clear that an indexed array is required +builtins/{mapfile,read}.def + - change callers to use builtin_find_indexed_array -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 +variables.c + - unbind_global_variable, unbind_global_variable_noref: new functions + that remove variables from the global_variables table -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 - - change cond_expand_word similarly. Fixes rest of bug reported by - Enrique Perez-Terron +lib/sh/shmatch.c + - sh_regmatch: use unbind_global_variable_noref to make sure we act on + the copy of BASH_REMATCH in the global scope all the time, ignoring + any local variables that might exist. Tentative fix for memory leak + report from Emanuele Torre -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 +doc/{bash.1,bashref.texi} + - BASH_REMATCH: add caveat about making it a local variable - 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 - + 6/6 + --- +print_cmd.c + - print_redirection: if the redirectee for r_duplicating_output_word + (r_duplicating_input_word) is 1 (0), don't print it; only print a + non-default file descriptor number + - print_redirection_list: remove the code that tries to temporarily + translate a >&word redirection to >&word now that we won't print a + non-default file descriptor number. Fixes issue with `declare -f' and + function export reported by Namikaze Minato -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 + 6/13 + ---- +configure.ac + - bumped version to bash-5.2-rc1 -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. +[bash-5.2-rc1 released] -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) + 6/15 + ---- +parse.y + - parse_string_to_word_list: save the parser state before any state- + changing functions like bash_history_disable(). Reported by + Clark Wang - 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] + 6/16 + ---- +doc/bash.1 + - play tricks with the value of the zZ number register to refer to + `bash(1)' instead of `above' or `below' when creating the builtins + man page - 10/24 - ----- -[bash-4.1-alpha released] + 6/17 + ---- +doc/{bash.1,bashref.texi} + - wait: note that wait will return > 128 if interrupted by a signal. + Reported by AA -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 +execute_cmd.c + - {execute_cond_node,execute_arith_command,eval_arith_for_expr}: make + sure to reset this_command_name after running any DEBUG trap so the + DEBUG trap doesn't overwrite it. + Reported by Emanuele Torre . + - execute_select_command: set this_command_name to NULL after running + any DEBUG trap like execute_for_command does -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 + 6/23 + ---- +test.c + - three_arguments: when given [ ! ! arg ], make sure to advance POS + after calling two_arguments to avoid a `too many arguments' error. + Report from Steffen Nurpmeso - 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 + 6/27 + ---- +subst.c + - expand_word_internal: when expanding backquoted command substitution, + call string_extract with the SX_REQMATCH flag (closing backquote + required) only if the word flags don't contain W_COMPLETE, + indicating that we're doing this for completion, probably to + determine whether or not to append something to the word. Fixes bug + reported by Emanuele Torre . -builtins/mapfile.def - - don't save callback commands in shell history. Suggested by - Jan Schampera + 7/5 + --- +execute_cmd.c + - execute_connection: treat a connector of '\n' the same as ';' -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 - - in file_access_date_changed, make sure the access time is later - than the saved access time, not just that it's not equal +print_cmd.c + - print_comsub: new function, sets flag noting we are printing a + command substitution and calls make_command_string + - make_command_string_internal: add '\n' to the ';' case; print command + list with newline connector appropriately - 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 +parse.y + - parse_comsub: call print_comsub instead of make_command_string + - list1 production (part of compound_list): if a list is separated by + newlines, and the parser is parsing a command substitution, make + the connection command with a '\n' connector. Makes the text + output of parse_comsub closer to the original source text. From a + report from Martijn Dekker -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) + 7/6 + --- +doc/bash.1,lib/readline/doc/rluser.texi + - complete: add note about arguments passed to command specified by + `complete -C'; suggested by Mark Chandler - 10/28 - ----- -support/shobj-conf - - decrease the default version of FreeBSD that creates shared libraries - to 4.x. Advice from Peter Jeremy +builtins/setattr.def + - show_local_var_attributes: special-case `local -', since there is + no `declare -' equivalent. + Reported by Emanuele Torre . + - show_all_var_attributes: use `local -' when printing a variable named + `-' at the current non-zero variable context - 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 + - shell_getc: if we are at the end of an alias, returning a space, + make sure we mark the previous character as single-byte by modifying + shell_input_line_property so the space we return is properly + recognized. This would fail before if the last character of the + alias was a multi-byte character. Reported by + Vangelis Natsios - 11/3 + 7/12 ---- -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 - -[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] +lib/readline/isearch.c + - rl_display_search: don't call rl_redisplay_function before returning; + rl_message already calls it. Reported by + Frédéric Moulins - 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 +configure.ac + - bumped version to bash-5.2-rc2 -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 + 7/18 + ---- +jobs.c + - set_job_control: don't bother calling tcgetpgrp if shell_tty < 0, + since it will just fail - 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 - +variables.c + - reset_local_contexts: new function, delete all context tables + associated with shell functions and set variable_context to 0. + Called when we want to stop executing in a shell function without + going through the pop_context chain with its side effects -config-top.h - - new WORDEXP_OPTION define (off by default) +variables.h + - reset_local_contexts: extern declaration -shell.c - - don't include the --wordexp option or the supporting function - (run_wordexp) if WORDEXP_OPTION is not defined. Suggested by - Aharon Robbins +builtins/evalstring.c + - parse_and_execute: call reset_local_contexts instead of setting + variable_context to 0 -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 - +eval.c + - reader_loop: call reset_local_contexts in cases where the shell has + longjmped for a fatal error and errexit is enabled (ERREXIT), but + not for other cases, and especially not for the exit builtin, + instead of just setting variable_context to 0. Fixes issue originally + reported by Robert Stoll - 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 - - 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 + - pat_subst: implement sed-like behavior when presented with a null + pattern that's anchored at the start or end of the string, or when + presented with a null string: process the replacement string for `&' + and `\&' and substitute in the result as before. Patch from + Koichi Murase -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 + 7/20 + ---- -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 . +[bash-5.2-rc2 frozen] - 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 + 7/27 + ---- +parse.y + - reset_parser: set need_here_doc, esacs_needed_count, expecting_in_token + all to 0, since jumping back to a top-level parse needs that + - parse_comsub: make sure to reset expand_aliases and shell_eof_token + if we're not going to exit immediately out of this function - 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 + 7/28 + ---- +parse.y + - parse_comsub: if the compatibility level is <= 51, set extglob while + parsing the command substitution, so bad pattern errors can still be + caught but valid patterns are let through and can be evaluated at + runtime, when extglob may have been set. If it isn't set, it will + still be a parser error when the command substitution is executed. + Fixes report from Sam James about gentoo scripts. + - reset_parser: set extended_glob from global_extglob if the parser + state includes PST_CMDSUBST + - xparse_dolparen: set global_extglob but don't modify extended_glob, + so parse errors can be caught before forking a child for command + substitution, as part of word expansion, but after extglob may have + been set by command execution (e.g., in a shell function) -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 + 8/5 + --- +[bump version to bash-5.2-rc3] - 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 + 8/6 + --- +trap.c + - run_pending_traps: move code from evalstring() so we call + parse_and_execute() directly and handle any `return' invocations so + we can restore the value of running_trap. Otherwise, if we longjmp + past this function, we will think we're running a trap after we + finish. Prompted by post from Koichi Murase -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 - + 8/9 + --- -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 - - - 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 - +lib/readline/nls.c + - _rl_current_locale: private variable, stores the value of the + LC_CTYPE locale category, as determined by _rl_init_locale; set + to allocated memory in _rl_init_locale() + - _rl_set_localevars: new function, code from _rl_init_eightbit that + checks the current locale (passed as an argument) and sets the + various locale-aware variables based on it. It accepts a second + argument: FORCE. If non-zero, it means to restore the default "C" + locale values if the locale is "C" or "POSIX", now that this + function can be called multiple times + - _rl_init_eightbit: now just calls _rl_init_locale and + _rl_set_localevars + - _rl_reset_locale: new function, checks whether our the locale has + changed since we last called _rl_init_locale to set our internal + idea of its value. If it has changed, call _rl_set_localevars with + the new locale and a FORCE argument of 1 to change the + locale-dependent variables. - 12/18 - ----- -[bash-4.1-rc1 released] +lib/readline/rlprivate.h + - _rl_reset_locale: extern declaration - 12/22 - ----- -config-top.h - - don't have SYSLOG_HISTORY enabled by default +lib/readline/readline.c + - rl_initialize: call _rl_reset_locale instead of _rl_init_locale so + the internal readline variables get set when we move from a non- + multibyte locale ("C") to a multibyte one ("en_US.UTF-8"). Report + from Alan Coopersmith -lib/sh/Makefile.in - - add explicit dependency on pathnames.h for parallel make support + 8/16 + ---- +lib/sh/setlinebuf.c + - sh_setlinebuf: allocate buffers for line-buffering stdout and stderr + only once, the first time it is requested. Only allocate memory if + we're using setvbuf (we usually are). Double the buffer size to 2016 + if we're using the bash malloc. Otherwise, let stdio handle it. -externs.h - - add extern declaration for xtrace_fdchk + 8/17 + ---- +builtins/exec.def + - exec_builtin: make sure to initialize orig_job_control in case the + command is not found by search_for_command. Report and fix from + Xiami -lib/sh/snprintf.c - - add local prototype declarations for isinf, isnan if we are providing - local definitions +[bash-5.2-rc3 frozen] -lib/sh/fnxform.c - - add extern declaration for get_locale_var if HAVE_LOCALE_CHARSET not - defined + 8/27 + ---- +parse.y + - parse_comsub: restore extended_glob to a local copy (local_extglob) + only if we changed it; a safer way to do it. Fixes extglob change + issue reported by Kerin Millar + - cond_term: restore extended_glob to a local copy; safer than using + global_extglob, which we will reserve for error recovery -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) + 8/30 + ---- +parse.y + - parse_comsub: don't clear the pushed string list; we might need it to + consume additional input to satisfy this command substitution. When + we restore the parser state, don't restore the pushed string list in + case we used it. From + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018727 + - parse_comsub: don't modify extended_glob if parser_state includes + PST_EXTPAT, in which case we've already set extended_glob and + global_extglob appropriately. Only matters in compatibility mode. -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 + 8/31 + ---- +subst.c + - parameter_brace_transform: make sure we return an error if *xform + is '\0'. Report from Ivan Kapranov - 12/26 - ----- -doc/{bash.1,bashref.texi} - - add \E and \" escape sequences to ANSI-C quoting description. - Suggested by Aharon Robbins + 9/7 + --- +[bump version to bash-5.2-rc4] - 12/29 - ----- -doc/bash.1 - - make sure shell and environment variable names are always in - `small caps' bold. Suggested by Aharon Robbins + 9/8 + --- +[bash-5.2-rc4 frozen] - 12/30 - ----- -{execute_cmd.c,parse.y,Makefile} - - changes for building minimal configuration from Matthias Klose - + 9/20 + ---- +lib/readline/history.c + - replace_history_entry: check for a NULL timestamp before trying to + copy it. Report from nov.ondrej@gmail.com -[bash-4.1 frozen] + 9/23 + ---- +[bash-5.2 frozen] diff --git a/CWRU/mh-folder-comp b/CWRU/mh-folder-comp deleted file mode 100644 index 905000c..0000000 --- a/CWRU/mh-folder-comp +++ /dev/null @@ -1,449 +0,0 @@ -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 ) -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 ) -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 - -Gregory F. March 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 -+ #include - #include - #include - #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 old mode 100755 new mode 100644 diff --git a/CWRU/misc/sigs.c b/CWRU/misc/sigs.c index 097ab31..bae93f8 100644 --- a/CWRU/misc/sigs.c +++ b/CWRU/misc/sigs.c @@ -1,6 +1,6 @@ /* sigs - print signal dispositions for a process */ -/* Copyright (C) 1990-2009 Free Software Foundation, Inc. +/* Copyright (C) 1990-2010 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,7 +21,7 @@ #include #include -extern char *sys_siglist[]; +extern const char * const sys_siglist[]; typedef void sighandler(); diff --git a/ChangeLog b/ChangeLog deleted file mode 120000 index 12c9a28..0000000 --- a/ChangeLog +++ /dev/null @@ -1 +0,0 @@ -CWRU/changelog \ No newline at end of file diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..da6d4aa --- /dev/null +++ b/ChangeLog @@ -0,0 +1,3952 @@ + + 12/6/2020 + --------- + +[bash-5.1 released] + + 12/7 + ---- +Makefile.in + - bashline.o: add dependency on ${DEFDIR}/builtext.h. Report from + Fazal Majid + + 12/11 + ----- +builtins/wait.def + - wait_builtin: don't assign the variable given with -p if there are no + jobs to wait for. Report and fix from O�uz + +arrayfunc.c + - kvpair_assignment_p: return non-zero if argument L appears to be a + key-value pair associative array compound assignment + - expand_and_quote_kvpair_word: run a single word in a key-value pair + associative array compound assignment through the appropriate + expansions and single-quote the result + +arrayfunc.h + - kvpair_assignment_p, expand_and_quote_kvpair_word: extern declarations + +subst.c + - expand_oneword: detect whether VALUE appears to be a key-value + pair compound assignment and call the appropriate function to expand + each word in the resulting list. Fixes inconsistency reported by + oguzismailuysal@gmail.com + + 12/12 + ----- +subst.c + - command_substitute: don't reset pipeline_pgrp to shell_pgrp if we + are already forked to run a command (SUBSHELL_FORK). Fixes SIGINT + in command substitution in here-document in forked child issue + reported by oguzismailuysal@gmail.com + + 12/18 + ----- +execute_cmd.c + - execute_pipeline: execute the lastpipe code even if prev == 0. It + can only be 0 here if stdin was closed when this function was + executed + - execute_pipeline: if prev == 0, set lstdin to a sentinel (-1) that + means to close fd 0 after executing the command, and call close(prev) + before restoring stdin. restore_stdin now understands -1, and closes + fd 0. Fixes issue reported by Tomas Janousek + + 12/21 + ----- +doc/bashref.texi + - PROMPT_COMMANDS: clean up a couple of remaining instances of this + name. Report from Eli Schwartz + + 12/26 + ----- +subst.c + - command_substitute: make sure that the child process always has + pipeline_pgrp == shell_pgrp: if pipeline_pgrp is non-zero when we + get to the child, meaning that we're part of an already-forked + child that is, for instance, running redirections, we need to reset + shell_pgrp to it to preserve the invariant. Fixes bug with terminal + being set to the incorrect pgrp reported by oguzismailuysal@gmail.com + + 12/29 + ----- +configure.ac,builtins/shobj-conf,m4/threadlib.m4 + - midnightbsd: update auto-configuration to treat MidnightBSD like + FreeBSD. From https://savannah.gnu.org/patch/?10006 + + 12/30 + ----- +examples/loadables/stat.c + - stattime: use strftime with a default format or the format supplied + with the -F option to format the file time information + - stat_builtin: now takes a -F fmt option for a strftime format string; + change to function calling sequences to pass the format down to + stattime + +examples/loadables/Makefile.in + - stat: now built and installed by default + + 12/31 + ----- +command.h + - SUBSHELL_IGNTRAP: new flag value + +jobs.c + - make_child: set SUBSHELL_IGNTRAP in subshell_environment in the + child process, meaning that we should not execute trap handlers for + trapped signals + +execute_cmd.c + - execute_in_subshell, execute_simple_command, execute_disk_command: + make sure to unset SUBSHELL_IGNTRAP after a child process restores + the original signal dispositions + - execute_simple_command: make sure to set SUBSHELL_IGNTRAP after + make_child returns and we're setting subshell_environment directly + +subst.c + - command_substitute,process_substitute: unset SUBSHELL_IGNTRAP after + the child process has reset the trapped signal dispositions + +trap.c + - trap_handler: if we get a signal for which we have set a trap, but + SUBSHELL_IGNTRAP is set in subshell_environmnent, make sure we + restore the original signal disposition and resend the signal to + ourselves. Fixes issue reported by Nikolay Borisov + (or at least makes the race window much smaller) + +sig.c + - initialize_terminating_signal: set the original signal handler from + the return value from sigaction; a minor optimization that saves a + system call or two + + 1/5/2021 + -------- +builtins/declare.def + - declare_internal: make some option combinations that don't make + sense errors (e.g., -f and -a/-A/-i/-n) + - declare_internal: if we build a new variable name by expanding the + value of a nameref variable, make sure to chop the `+' in a `+=' + off before going on + + 1/7 + --- +doc/{bash.1,bashref.texi} + - bind: add an example to the synopsis making it clear that you can + use any readline command line as a non-option argument, as it says + in the text. From a report from Dan Jacobson + + 1/12 + ---- +locale.c + - local_shiftstates -> locale_shiftsates in the non-multibyte code + branch. Reported by Henry Bent + +subst.c + - expand_compound_assignment_word: make sure to call dispose_words on + the WORD_LIST * returned from expand_oneword after turning it back + into a string. Fixes memory leak reported by Alexander Mescheryakov + + + 1/13 + ---- +variables.c + - bind_variable_internal: when performing an assignment to a subscripted + array variable that was the value of a nameref (used in the original + assignment), don't call make_variable_value on the value, since that + messes up +=. Just call assign_array_element and let that take care + of calling make_variable_value appropriately. Fixes bug reported by + Oguz + + 1/14 + ---- +findcmd.c + - search_for_command: if `checkhash' is set, don't add non-executable + files to the command hash table, since we will just remove them + later + +lib/sh/winsize.c + - get_new_window_size: set *rp and *cp even if READLINE is not defined + + 1/15 + ---- +lib/sh/winsize.c + - get_new_window_size: call rl_set_window_size only if we can determine + we're using readline: an interactive shell without no-line-editing, + or if we've already initialized readline, presumably in a non- + interactive shell + +support/Makefile.in + - man2html: add LDFLAGS_FOR_BUILD to the recipe. Report from + Jeffrey Walton + + 1/17 + ---- +lib/readline/misc.c + - rl_operate_and_get_next: fix old K&R function declaration. Report + from Tom Tromey + +lib/readline/readline.c + - _rl_internal_char_cleanup: move code that cleans up the active region + and deactivates the mark inside this function so callback mode + applications get the intended functionality. Report and fix from + sparrowhawk996@gmail.com + +lib/readline/bind.c + - rl_parse_and_bind: when using the arithmetic comparison operators on + the version, make sure to invert the tests so that we stop parsing + if the test fails. Report and fix from Tom Tromey + + 1/19 + ---- +Makefile.in + - pipesize.h: add dependency on ${BUILTINS_LIBRARY} to avoid parallel + makes trying to create it twice. Report and fix from + Richard Purdie + + 1/21 + ---- +subst.c + - param_expand: if a nameref expands to array[@] or array[*], make sure + to call chk_atstar so the right variables are set to split the + result. Report from Oguz + + 1/22 + ---- +builtins/declare.def + - Rewrote to reduce complexity. Still needs some work. + +lib/readline/*.h, lib/tilde/tilde.h + - PARAMS: remove, rely on compilers understanding function prototypes + +lib/readline/{undo.c,histlib.h} + - _hs_replace_history_data: move extern declaration to histlib.h + +lib/readline/readline.c + - _rl_parse_colors: instead of an extern declaration for this, include + "parse-colors.h" for it + +lib/readline/{histfile.c,histlib.h} + - _hs_append_history_line: move extern declaration to histlib.h + +lib/readline/history.h + - HS_HISTORY_VERSION: define to 0x0801 (current library version) if + it's not already defined. We conditionally define it in case an + application has (unwisely) chosen to use it, since the history + library doesn't do anything with it yet + +lib/readine/{rlprivate.h,{search,misc,readline}.c} + - _rl_free_history_entry: add extern declaration to rlprivate.h, remove + extern declaration from c source files. Use HS_HISTORY_VERSION as a + sentinel that it's ok to use HIST_ENTRY in rlprivate.h + +lib/readline/{rlprivate.h,{isearch,search,undo}.c} + - _rl_saved_line_for_history: add extern declaration to rlprivate.h, + remove extern declaration from c source files, using HS_HISTORY_VERSION + in the same way + + 1/24 + ---- +lib/readline/signals.c + - _rl_handle_signal: make sure that all sigprocmask calls are protected + by HAVE_POSIX_SIGNALS. Report and fix from Tom Tromey + + 1/26 + ---- +lib/readline/callback.c + - rl_callback_read_char: make sure rl_linefunc is non-NULL before + calling through the pointer. The line function could have been + removed by the application before readline processes any typeahead + input. Bug reported by Matthias Klose , pointer + to root cause from Koichi Murase + +lib/glob/glob.c + - skipname,wskipname: put in some additional checks for `.' to ensure + that we don't get false positives (or incomplete tests) that can + affect the results of extglob patterns. Reported by + gregrwm + + 1/27 + ---- +lib/glob/glob.c + - extglob_skipname,wextglob_skipname: fixed an off-by-one error (SE + was being set to one character before the end of the pattern string, + not the null character at the end of the pattern string like other + callers of glob_patscan) that caused the last character of the last + subpattern to be cut off when calling skipname + - extglob_skipname,wextglob_skipname: some cleanups so the code is + closer to identical for the single-byte and wide character versions + + 2/1 + --- +execute_cmd.c + - execute_simple_command: in posix mode, if we have a variable + assignment error while assigning into the temporary environment (e.g., + assigning to a readonly variable), a non-interactive shell running a + special builtin exits; a non-interactive shell running anything else + jumps back to the top level. A shell compiled with -DSTRICT_POSIX + exits unconditionally. + - execute_simple_command: make sure posix mode sets $? to non-zero + if a variable assignment error occurs preceding a non-special builtin + +subst.c + - do_assignment_statements: take the code from expand_word_list_internal + that performs assignment statements, either standalone or preceding + simple command names, and factor it out into this function + - expand_word_list_internal: call do_assignment_statements where + appropriate + + 2/2 + --- +lib/glob/glob.c + - dequote_pathname: fix function definition for non-multibyte systems. + Report and fix from Marc Aurèle La France + +Makefile.in,doc/Makefile.in + - for certain targets, remove files before creating them to deal with + symlinked build trees. + Report and fix from Marc Aurèle La France + +examples/loadables/accept.c + - include limits.h before typemax.h + Report and fix from Marc Aurèle La France + +builtins/gen-helpfiles.c + - if USING_BASH_MALLOC is defined, make sure to undefine malloc as well + as free. Fixes bug reported by George R Goffe + +builtins/Makefile.in + - install-help: now depends on $(HELPFILES_TARGET) so we make sure the + separate helpfiles are created before we try to install them if we + don't go through the `all' makefile target + +configure.ac + - HELPDIR: now ${datadir}/bash/helpfiles + + 2/3 + --- +parse.y + - parse_string_to_word_list: before expanding a compound assignment + statement body, make sure to save any alias that's currently being + expanded. Restore the alias after the compound assignment is parsed. + Reported back in 11/2020 by Alex fxmbsw7 Ratchev + + 2/4 + --- +lib/readline/histexpand.c + - history_expand_internal: when calling the history_inhibit_expansion + function, make sure to call it using the string as we've expanded it + to that point (RESULT), adding the expansion and next characters + temporarily, since we make expansion decisions based on what we've + accumulated, not what we started with. This makes things like + echo abc!$!$ work, where before the second `!' inhibited expansion + because bash_history_inhibit_expansion mistakenly took it as the + second character in a `$!' word expansion. Fixes bug reported back + in 10/2020 by Paul Fox + +array.h + - array_pop: instead of calling array_dispose_element from this macro, + just call array_shift with the AS_DISPOSE flag + + 2/5 + --- +bashhist.c + - shell_comment: move condition to return 0 if the delimiter stack is + not empty or the shell is parsing a here document into the function + itself, don't have the callers check so the check is in one place. + Fixes bug reported by Oguz + +array.h,variables.c + - ARRAY_ELEMENT_REPLACE: convenience define for modifying an array + element's value + +variables.c + - pop_args: a couple of code simplifications + + 2/7 + --- +lib/malloc/malloc.c + - pagesz: at least MALLOC_PAGESIZE_MIN (4096) bytes + - union mhead: now 16-byte aligned on all systems, 32-bit and 64-bit + pointers + - binsizes: since the smallest allocation overhead is now 16 bytes, + redo the buckets so binsizes[0] == 32; adjust the thresholds for + split/coalesce/prepopulate/mmap (NBUCKETS = 28; STARTBUCK = 0). + Sizes stay pretty much the same; indices change + - consistently use MALLOC_SIZE_T instead of long/unsigned int/int + - use MAGIC8_NUMBYTES as the length of the mh_magic8 buffer, in case + it changes later for alignment + - internal_remap: new function, calls mremap to reallocate a chunk of + memory allocated using mmap(); called from internal_realloc if the + old size and new size are both bigger than the mmap threshold + - internal_realloc: call internal_remap if the old size and new size + are both above the threshold where we use mmap for allocation + + 2/10 + ---- +include/timer.h + - new file, declaration for a timer struct to be used by a set of + functions to implement timers using SIGALRM or select/pselect + +lib/sh/timers.c + - new file, set of functions to manipulate timer objects and timeouts + using SIGALRM or select/pselect. Inspired by a patch from + Koichi Murase . Not used yet + + 2/11 + ---- +builtins/read.def + - read_builtin: if there is a timeout set, block SIGCHLD around calls + to zread and its siblings, or calls to readline for `read -e', so + SIGCHLD (and the consequent waitpid) doesn't interrupt the read. + Fixes bug reported by Koichi Murase , but + there may be a different fix coming + +Makefile.in,builtins/Makefile.in + - fix up dependencies, especially on builtins.h and builtext.h + + + 2/12 + ---- +lib/readline/input.c + - rl_read_key: if we set rl_done == 1, set RL_STATE_DONE as well + Reported by Koichi Murase + +lib/readline/isearch.c + - _rl_search_getchar: only call _rl_read_mbstring if rl_read_key returns + >= 0, avoid some work + +lib/readline/vi_mode.c + - _rl_vi_callback_change_char,_rl_vi_change_char: don't overwrite the + last replacement string if _rl_vi_callback_getchar returns -1. + It will likely make no difference, since the next read will return + an error or EOF, but being careful + - rl_vi_overstrike: if _rl_overwrite_char doesn't return 0, break out + of the loop + +lib/readline/text.c + - _rl_overwrite_char: return 1 if _rl_read_mbstring returns < 0 so + we don't try to insert garbage + +bashline.c + - posix_edit_macros: handle rl_read_key() returning <= 0 + + 2/15 + ---- +parse.y + - read_comsub: make sure to turn on the LEX_RESWDOK flag if we are in + a case statement and read a `)', since we can get a valid `esac'. + Fixes bug reported by Oguz + - read_comsub: if we're in a case statement, recognize `}' as a + reserved word and set the LEX_RESWDOK flag for the next word, since + we can get an esac (or another reserved word) after it + + 2/16 + ---- +parse.y + - reserved_word_acceptable: add ARITH_CMD and COND_END to the list of + tokens that can precede a reserved word, so you can use reserved + words after ((...)) and [[...]]. + Reported by Koichi Murase + + 2/17 + ---- +parse.y + - parse_comsub: use new LEX_CASEWD flag to track when we are reading + the WORD in `case WORD in' and turn on the LEX_RESWDOK flag when + that word ends. This allows $(case x in esac), which no one uses. + - parse_comsub: use LEX_PATLIST flag to track when we are reading a + case pattern list so `|' doesn't turn on the LES_RESWDOK flag + - parse_comsub: case_level: simple counter to count the number of esacs + we need to see before we're no longer in a case statement; analog of + esacs_needed_count from the lexer + + 2/19 + ---- +parse.y + - CHECK_FOR_RESERVED_WORD: don't return ESAC if we read `esac' after a + left paren in a case pattern list. From an austingroup-bugs discussion + about https://www.austingroupbugs.net/view.php?id=1454 + - parse_comsub: if we read a `(' while looking for a case pattern list + and LEX_CKESAC is set, we have a leading left paren in the pattern + list and should turn off LEX_CKESAC so (esac) doesn't prematurely + terminate the case command. From an austingroup-bugs discussion + about https://www.austingroupbugs.net/view.php?id=1454 + + 2/26 + ---- +builtins/history.def + - history_builtin: when checking negative offsets to -d, which are + supposed to count back from the end of the history list, check the + range against 0 instead of history_base, because the calculation is + done against history_length, which is independent of history_base. + Report and fix from Christopher Gurnee + + 2/28 + ---- +doc/bashref.texi + - replaced a number of uses of @var with a mixture of @env and @dfn + to better match up with the texinfo standards + +doc/{bash.1,bashref.texi} + - clarify some aspects of the coproc description, especially the + use of NAME and when it's optional + + 3/1 + --- +subst.c + - read_comsub: fix off-by-one error in mbrtowc that causes a read one + character past the end of buf. Report and fix from + Platon Pronko in + https://savannah.gnu.org/patch/?10035 + + 3/3 + --- +builtins/ulimit.def + - ulimit_builtin: Posix compatibility: if the last command specified + by an option does not have an option argument, but there is an + operand remaining after all the options are parsed, treat the + operand as an argument to that last command. From an austin-group + discussion and a Geoff Clare suggestion back in November, 2020. + Austin Group interpretation 1418 + +examples/shellmath + - a package of shell functions to perform floating-point math entirely + in bash. Contributed by Michael Wood . Available + at https://github.com/clarity20/shellmath + + 3/4 + --- +support/shobj-conf + - darwin: take out the -arch-only option in SHOBJ_XLDFLAGS and + SHOBJ_ARCHFLAGS; no longer needed + +doc/{bash.1,bashref.texi} + - coprocesses: suggested changes from rms@gnu.org; recommend the + `coproc NAME { commands; }' form as the simplest and most flexible + + 3/5 + --- +builtins/exec.def + - exec_builtin: set last_command_exit_value before calling exit_shell + so any exit trap gets the right value for $?. From Matthew Bauer + via https://savannah.gnu.org/patch/?10039 + + 3/8 + --- +include/timer.h + - SHTIMER_ALRMSET: new flag, indicates that there is an active alarm + associated with this timer (falarm() was called) + +lib/sh/timers.c + - shtimer_set: set the SHTIMER_ALRMSET flag after calling falarm + - shtimer_unset: don't call falarm(0,0) unless the SHTIMER_ALRMSET flag + is set + + 3/9 + --- +include/posixtime.h + - added some BSD convenience defines if they are not present + +parse.y,shell.h + - {save,restore}_parser_state: save and restore shell_eof_token and + pushed_string_list; change callers (e.g., xparse_dolparen) so they + don't have to manage them + + 3/10 + ---- +builtins/common.h + - extern declarations for moving to timers (sh_timer) for read builtin + timeouts + +quit.h + - CHECK_ALRM: remove, no longer used + +trap.c + - check_signals: call check_read_timeout instead of CHECK_ALRM + +bashline.c + - bash_event_hook: use read_timeout instead of checking `sigalrm_seen'; + that no longer exists + - bash_event_hook: accommodate readline timing out (not used yet) + +lib/sh/zread.c + - zread: call read_builtin_timeout() to check for a timeout before + calling a blocking read() + +builtins/read.def + - sigalrm,reset_timeout,check_read_timeout,read_builtin_timeout: new + and modified functions to use sh_timers for timeouts instead of + SIGALRM. Based on work contributed by Koichi Murase + + - read_builtin: use sh_timers for read timeouts (-t N) instead of + using SIGALRM + - edit_line: simulate receiving SIGALRM if readline times out (not + used yet) + + 3/11 + ---- +lib/readline/readline.c + - rl_initialize: call _rl_timeout_init to set things up for any timeout + that was set with rl_set_timeout + - readline_internal_charloop: if we longjmped because of a timeout, + make sure to set rl_done/RL_STATE_DONE and return; we are + abandoning this call to readline(). The readline timeout changes + were based on work contributed by Koichi Murase + + +lib/readline/readline.h + - extern declarations for new timeout functions and hook + - rl_clear_timeout: new define + +lib/readline/callback.c + - rl_callback_read_char: if we longjmped because of a timeout, + make sure to set rl_done/RL_STATE_DONE and return; we are + abandoning this call to readline() + +lib/readline/util.c + - _rl_abort_internal: if we time out, don't ring the bell; let the + caller handle it + +lib/readline/input.c + - extern declarations for public and readline-library-private functions + and hooks to implement timeouts + - rl_set_timeout,rl_timeout_remaining: new public functions + - _rl_timeout_select: new function, uses select/pselect to implement + read timeouts that take timeouts set with rl_set_timeout into account; + calling hook function if a timeout occurs + - rl_gather_tyi, _rl_input_available: use _rl_timeout_select, taking + any existing timeout into consideration if it expires before the + timeout passed as an argument + - rl_getc: use _rl_timeout_select and handle any timeouts by calling + _rl_timehout_handle + - set_alarm,reset_alarm: new functions to implement timeouts using + SIGALRM for systems that lack a working select/pselect + - _rl_timeout_init: new function, sets things up for reading input + with a specified timeout + - _rl_timeout_handle: a timeout handler; calls any event hook and + sets up to abort the current readline() call + - _rl_timeout_handle_sigalrm: a timeout handler for systems using + SIGALRM to implement timeouts + +lib/readline/parens.c + - rl_insert_close: use _rl_timeout_select to take timeouts into account + +lib/readline/rlprivate.h + - extern declarations for readline-library-private timeout functions + +lib/readline/rltty.c + - rl_deprep_terminal: don't print a newline after the bracketed paste + disable sequence if we timed out + +lib/readline/signals.c + - _rl_handle_signal: if sig is SIGALRM, call _rl_timeout_handle_sigalrm() + +lib/readline/doc/rltech.texi + - rl_set_timeout,rl_timeout_remaining: document new public functions + - RL_STATE_TIMEOUT: document new possible state value for rl_readline_state + - rl_timeout_event_hook: document new hook function, called when + readline times out + +builtins/read.def + - read_builtin: changes to use the readline timeout functions to + implement timeouts with `read -e'; these use rl_set_timeout and + sh_timer structs together + + 3/12 + ---- +subst.c + - expand_string_dollar_quote: new function, expands $'...' and $"..." + in a string for those code paths that don't expand it themselves + +subst.h + - expand_string_dollar_quote: extern declaration + +parse.y + - read_secondary_line: if $'...' or $"..." appears in the line, call + expand_string_dollar_quote to expand them. This now returns new + memory, need to change callers + +make_cmd.c + - make_here_document: account for read_secondary_line returning newly + allocated memory, free `full_line' appropriately + +bashline.c + - shell_expand_line,history_and_alias_expand_line: expand $'...' and + $"..." in the line by calling expand_string_dollar_quote, since + that happens after history expansion and before alias expansion in + normal processing + + 3/15 + ---- +subst.c + - expand_string_dollar_quote: fix out-of-order initialization + +Makefile.in + - {TAGS,tags}: add ETAGS/ETAGSFLAGS/CTAGS/CTAGS flags; make sure to + cd to the source directory before running them to get source files + that don't have absolute paths. Fix from Mike Jonkmans + + +parse.y + - xparse_dolparen: don't longjmp if FLAGS includes SX_NOLONGJMP. From + a report by Xu Lu + + 3/16 + ---- +subst.c + - process_substitute: set startup_state and parse_and_execute_level + to see if we can avoid a fork() + +bashline.c + - bash_spell_correct_word: bindable command (spell-correct-word) to + perform spelling correction on the current `shellword', using the + same code as the `cdspell' option and directory spelling correction + during completion. Feature suggested by in 10/2020 by + Karl Kleinpaste + - bash_spell_correct_word: bound to "C-x s" by default in emacs mode + +lib/readline/display.c + - rl_redisplay: fix redisplay problem that occurs when switching from + the rl-digit-argument prompt "(arg: N)" back to the regular prompt, + and the regular prompt contains invisible characters + +doc/bash.1,lib/readline/doc/rluser.texi + - spell-correct-word: document new function and its default binding + + 3/17 + ---- +doc/{bash.1,bashref.texi} + - cd: slight changes to specify that it sets PWD and OLDPWD + - {pushd,popd}: make it clear that these builtins use cd to change + the current working directory; change wording to simplify the + description and clarify the exit status + + 3/18 + ---- +execute_cmd.c + - execute_disk_command: after performing redirections, call + unlink_all_fifos() to remove the FIFOs created as part of + expanding redirections. They should have been opened by then, and + we're going to call shell_execve right away anyway, so we won't be + around to remove the FIFOs. From a report from + Michael Felt + + 3/22 + ---- +parse.y + - alias_expand_token: slight tweak to check for alias expansion: perform + expansion unconditionally if PST_ALEXPNEXT is set, and disable it + in case statement pattern lists if the previous token indicates a + command name is acceptable. + From a report by Oguz + +config-bot.h + - HAVE_MKDTEMP: fix typo + + 3/25 + ---- +lib/readline/terminal.c + - look in terminfo for key sequences for page up (kP) and page down + (kN) and bind them to history-search-{backward,forward}, + respectively. From a patch from Xose Vazquez Perez + + + 3/30 + ---- +doc/bashref.texi + - expand the node describing $"..." string translation with additional + details and examples + + 3/31 + ---- +misc.c + - rl_fetch_history: moved here from vi_mode.c + - rl_fetch_history: negative arguments count back from the end of + the history, instead of taking you to the beginning of the history + list + - rl_fetch_history: in vi mode, an out-of-range argument rings the + bell and doesn't change the line + +vi_mode.c + - rl_vi_fetch_history: call rl_fetch_history + +readline.h + - rl_fetch_history: new extern declaration + +doc/bash.1,lib/readline/doc/{readline.3,rluser.texi} + - rl_fetch_history: add description + +builtins/setattr.def + - show_var_attributes: if a variable's value indicates that it should + be ANSI-C quoted, use ansic_quote instead of sh_double_quote to + format the value string. From proposal by Greg Wooledge + + + 4/5 + --- +arrayfunc.c + - unbind_array_element: if FLAGS includes VA_ONEWORD, don't use + skipsubscript to parse the subscript, just assume the entire SUB is + the subcript and that it contains the closing `]', so we just want + everything in SUB except the last character. + +parse.y: + - select_command: use compound_list instead of list, like for_command. + Report by Greywolf + - list: move this into compound_list (replacing the instance of `list' + in the compound_list production), remove from the grammar + + 4/6 + --- +arrayfunc.c + - unbind_array_element: use VA_NOEXPAND instead of literal 1 + + 4/7 + --- +lib/readline/funmap.c + - default_funmap: add missing `vi-undo' to the list of vi-mode bindable + functions. Reported by Xirui Zhao + + 4/8 + --- + +config-top.h + - DEFAULT_LOADABLE_BUILTINS_PATH: default value for BASH_LOADABLES_PATH + +doc/{bash.1,bashref.texi} + - enable: note that it uses $BASH_LOADABLES_PATH, and that the default + is system-dependent + +variables.c + - initialize_shell_variables: initialize BASH_LOADABLES_PATH to the + default given in DEFAULT_LOADABLE_BUILTINS_PATH + + 4/12 + ---- +doc/{bash.1,bashref.texi} + - add link to git master tar file as a place to get the current version + + 4/14 + ---- +bashline.c + - attempt_shell_completion: use -1 as a sentinel value for + in_command_position indicating that we cannot be in a command position + (e.g., because we're the target of a redirection) and should not + check for a programmable command completion or tell the programmable + completion code to use command completion. Report and fix from + Marc Aurèle La France + + 4/16 + ---- +builtins/bind.def + - bind_builtin: reverse sense of strvec_search return value when + deciding whether or not to remove a unix-command binding from the + cmd keymap. Bug report by Dale Sedivec + +lib/readline/doc/rltech.texi + - RL_PROMPT_{START,END}_IGNORE: document current values of \001 and + \002. Report from Mingye Wang + + 4/19 + ---- +arrayfunc.c + - assign_assoc_from_kvlist: fix memory leak reported by konsolebox + + + 4/20 + ---- +command.h,subst.c + - W_ITILDE: remove, replace with a variable since it's only used inside + a single call to expand_word_internal + + 4/21 + ---- +{subst.c,make_cmd.c,parse.y} + - W_DQUOTE: no longer used, use W_NOPROCSUB and W_NOTILDE directly + (for arithmetic commands and words in arithmetic for commands) + + 4/24 + ---- +bashline.c + - executable_completion: since this function gets an unquoted filename + from rl_filename_completion_function, we need to quote special + characters before passing it to bash_directory_completion_hook. + Report from Alex fxmbsw7 Ratchev + + 4/26 + ---- +lib/readline/search.c + - _rl_nsearch_abort: move function calls around so _rl_restore_prompt + happens before rl_clear_message, like when aborting an incremental + search. Suggested by sparrowhawk996@gmail.com + +subst.h + - ASS_ALLOWALLSUB: new assignment flag value, means to allow @ and * as + valid array subscripts when assigning to existing associative arrays + +arrayfunc.c + - assign_array_element: allow assignment of key `@' to an existing + associative array if the caller passes ASS_ALLOWALLSUB + - assign_compound_array_list: allow ( [@]=value ) to an existing + associative array + +builtins/declare.def + - declare_internal: allow assignment of key `@' to an existing + associative array by passing ASS_ALLOWALLSUB to assign_array_element + as part of local_aflags. This affects declare, local, and typeset + +subst.c + - do_assignment_internal: allow a[@]=value to an existing associative + array by passing ASS_ALLOWALLSUB to assign_array_element + + 4/27 + ---- +builtins/common.[ch] + - builtin_bind_var_to_int: wrapper for bind_var_to_int to be used by + builtin commands; placeholder for future work + +builtins/wait.def + - builtin_bind_var_to_int: use instead of bind_var_to_int + +builtins/common.c + - builtin_bind_variable: allow assignment of key `@' to an existing + associative array by passing ASS_ALLOWALLSUB to assign_array_element. + This affects printf and read + +builtins/variables.[ch] + - bind_var_to_int: add third `flags' argument to pass to bind_variable + instead of always passing 0 + +redir.c,builtins/common.c,builtins/printf.def + - bind_var_to_int: change callers, add third flags argument + +builtins/common.c + - builtin_bind_var_to_int: pass ASS_ALLOWALLSUB to bind_var_to_int so + builtins like wait can assign to assoc[@] and assoc[*] + + 4/28 + ---- +bashline.c + - command_word_completion_function: make sure to initialize + old_glob_ignore_case before trying to restore from it + - command_word_completion_function: if we are completing a glob + pattern, make sure to set rl_filename_completion_desired, so we get + quoting and appending -- we are completing a filename, after all. + From a report from Manuel Boni + +lib/readline/bind.c + - enable-active-region: separate control of the active region and + bracketed paste. Still set to the same default value as bracketed + paste, and enabling bracketed paste enables the active region. + Now you can enable bracketed paste and then turn off the active + region. + +doc/bash.1,lib/readline/doc/{readline.3,rltech.texi} + - enable-active-region: document new bindable readline variable and + its effects + + 4/30 + ---- +command.h + - W_ARRAYREF: new flag, meaning the word is a valid array reference + with subscript, replaces W_DOLLARSTAR, which was unused + +subst.c + - expand_subscript_string,expand_array_subscript: new functions to + parse and expand-and-quote array subscripts. For future use + + 5/3 + --- +builtins/mapfile.def + - mapfile: if the delimiter is a newline, set unbuffered_read = 1 + for any file descriptor that isn't seekable and lseek sets errno + to ESPIPE (pipes, FIFOs, maybe terminal devices). If it's not a + newline, only allow buffered reads if the file descriptor is a + regular file. Report from Koichi Murase + +builtins/read.def + - read_builtin: only set unbuffered_read = 1 if the input is coming + from a pipe (which we can't seek on) or the input is a terminal and + we want to read a specified number of characters or we're using a + non-standard delimiter + + 5/4 + --- + +builtins/mapfile.def + - mapfile: call zsyncfd before calling the callback. Suggested by + Koichi Murase ; we'll see how it goes + + 5/5 + --- +subst.h + - expand_subscript_string: extern declaration + +{arrayfunc,subst}.c + - expand_subscript_string: replace expand_assignment_string_to_string + with calls to this when expanding array subscripts + +subst.c + - cond_expand_word: call expand_word_internal with Q_ARITH if `special' + says we should quote for an arithmetic expression context + - expand_word_internal: call expand_array_subscript when we see `[' in + arithmetic or array subscript contexts, make conditional on the + compatibility level later + - expand_word_internal: make sure W_ARRAYREF makes it through this + function and into the returned word + + 5/6 + --- + +arrayfunc.c + - array_expand_index: call evalexp with a flag of 0 since we call + expand_arith_string with Q_ARITH and we want evalexp to remove + the quotes + +execute_cmd.c + - eval_arith_for_expr,execute_arith_command: now that Q_ARITH has an + effect on array subscripts (it quotes the special expansion + characters), call evalexp with 0 as the flags arg so quote removal + is performed on this quoted argument. Make this conditional on the + shell compatibility level later + - execute_cond_command: make sure to expand the argument to -v by + calling cond_expand_node with Q_ARITH, and correspondingly turn off + assoc_expand_once when calling unary_test with that argument, since + we want it to be expanded again to remove the quotes + - execute_cond_command: expand the arguments to the arithmetic operators + with Q_ARITH and pass TEST_ARITHEXP to binary_test to ensure that + it lets evalexp expand the arguments to remove the quoting + +test.c + - arithcomp: if TEST_ARITHEXP is in FLAGS, call evalexp with a flag + if 0 to force evalexp to expand the arguments to remove the quoting + +subst.c + - param_expand: since we call expand_arith_string with Q_ARITH, we need + to call evalexp with 0 instead of EXP_EXPANDED for $((...)) expansion + - expand_word_internal: if we recursively call expand_word_internal to + expand the contents of a double-quoted string, make sure we pass + through Q_ARITH if it appears in QUOTED + - verify_substring_values: call expand_arith_string with Q_ARITH and + correspondingly call evalexp with 0 instead of EXP_EXPANDED + +execute_cmd.c + - execute_cond_node: if -v is the operator, and the operand is a valid + array reference, pass TEST_ARRAYEXP flag to unary_test + + 5/7 + --- +builtins/common.[ch] + - set_expand_once: set array_expand_once to the value passed as the + first argument, returning the original value + +builtins.h + - ARRAYREF_BUILTIN: new flag for shell builtins, means that the builtin + can take array references, with subscripts, as arguments + +builtins/mkbuiltins.c + - set ARRAYREF_BUILTIN flag on builtins given in the arrayvar_builtins + array + +execute_cmd.c + - execute_cond_node: use set_expand_once to set array_expand_once to 0 + before calling unary_test with -v (see change from 5/6) + +arrayfunc.c + - unbind_array_element: allow the caller to choose whether or not a + subscript of `*' or `@' unsets the entire array by passing + VA_ALLOWALL in FLAGS. Right now, since the unset builtin doesn't + pass VA_ALLOWALL, those subscripts unset individual elements for + associative arrays. We preserve the old behavior of unsetting + indexed arrays for the time being with new indexed-array-specific + code + + 5/9 + --- + +builtins/shopt.def + - expand_once_flag: "assoc_expand_once" option now sets this flag, + calls set_assoc_expand on change + - set_assoc_expand: sets assoc_expand_once to mirror expand_once_flag; + placeholder for future changes + +builtins/common.h + - expand_once_flag: extern declaration + + 5/10 + ---- +doc/{bash.1,bashref.texi} + - note that case patterns undergo quote removal. Reported by + AlvinSeville7cf + + 5/11 + ---- + +builtins/bashgetopt.c + - list_optflags: flags associated with the word corresponding to + list_optarg, assuming list_optarg is a separate argument + +builtins/bashgetopt.h + - list_optflags: extern declaration + +builtins/set.def + - unset_builtin: set VFLAGS each time through the loop, since we take + whether or not the word has W_ARRAYREF set into account + - unset_builtin: don't pass VA_ALLOWALL to unbind_array_element for + now + +test.c + - unary_test: in the -v case, use assoc_expand_once in the first call + to valid_array_reference () + +builtins/printf.def + - printf_builtin: only set VA_ONEWORD if the option argument to -v has + W_ARRAYREF set (look at list_optflags) + + 5/12 + ---- + +subst.c + - expand_array_subscript: don't quote @ or * in the expanded subscript + at all, even when they are the only character in the subscript. See + how this works out -- it might uncover places where we need to allow + `*' and `@' as subscripts where they are not allowed now + +expr.c + - expr_bind_variable: pass ASS_ALLOWALLSUB to bind_int_variable so we + can allow (( A[@]=value )) when A is an existing associative array + +arrayfunc.h + - AV_ATSTARKEYS: new flag value, means to accept a[@] and a[*] but + treat them as keys/expressions and not special values + +arrayfunc.c + - array_value_internal: check AV_ATSTARKEYS and don't treat them as + ALL_ELEMENT_SUB values; they fall through to use as keys/indices + +test.c + - unary_test: if -v is passed an array reference, add AV_ATSTARKEYS to + the flags passed to array_value so we treat @ and * as keys for an + existing associative array + + 5/13 + ---- + +subst.c + - expand_cond_word: if SPECIAL == 3 (arithmetic expression), dequote the + resulting WORD_LIST * as if special == 0, because we don't want to + quote the list for pattern matching. Report from + Adjudicator Darren + + 5/14 + ---- +subst.c + - expand_array_subscript: add double quote (") to the list of characters + that are backslash-quoted in subscripts after word expansion. + skipsubscript treats them specially, so you have to quote them to + do things like `key='"' ; array[$key]=1 ; [[ -v array[$key] ]]' + + 5/16 + ---- + +builtins/wait.def + - wait_builtin: if we longjmp to wait_intr_buf, call unset_waitlist if + we have called set_waitlist (wflags & JWAIT_WAITING). Fixes bug with + wait -n interrupted by a trapped signal (not SIGINT) reported by + Jonas Alfredsson + +jobs.c + - wait_sigint_cleanup: restore the old sigint handler before we longjmp + out by calling restore_sigint_handler() + + 5/17 + ---- +builtins/read.def + - bind_read_variable: now takes an additional argument, flags to pass + to builtin_bind_variable; change callers + - SET_VFLAGS: set vflags and bindflags + - read_builtin: call SET_VFLAGS to set vflags and bindflags from each + word before calling valid_array_reference and bind_read_variable + +builtins/common.c + - builtin_bind_variable: set vflags (for valid_array_reference) and + bindflags (for bind_variable/assign_array_element) separately for + clarity + +arrayfunc.c + - assign_array_element: sanity check: make sure that the subscript + returned by array_variable_name consumes the entire NAME, otherwise + flag it as a subscript error. This keeps things like + `KEY=' ]'; read assoc[$KEY] <<< hello' from assigning to incomplete + subscripts + +builtins/printf.def + - printf_builtin: if LIST_OPTFLAGS includes W_ARRAYREF, set VA_NOEXPAND + in VFLAGS + + 5/17 + ---- + +lib/readline/complete.c + - compute_lcd_of_matches: move a couple of strlen calls out of a loop + in calls to mbrtowc; performance improvement only. Report and fix + from sparrowhawk996@gmail.com + +lib/readline/bind.c + - rl_trim_arg_from_keyseq: take a key sequence and its length and + return the index into the key sequence following any initial numeric + argument. Return -1 if there is no numeric argument (the caller is + expected to make sure) or if the key sequence consists *only* of + the numeric argument. The caller should use the remainder of the + key sequence to look up the desired key binding. + +lib/readline/readline.h + - rl_trim_arg_from_keyseq: extern declaration + +bashline.c + - bash_execute_unix_command: if the argument count is > 1 or we have + an explicit argument, call rl_trim_arg_from_keyseq to get past the + numeric argument and deal with the rest of the key sequence. We still + need a way to pass it to the invoked program or function. From + a report from Jesper Nygards + + 5/18 + ---- + +bashline.c + - bash_execute_unix_command: if the user supplied a numeric argument + when invoking bash_execute_unix_command, pass it to the command in + the READLINE_ARGUMENT variable + +lib/readline/readline.[ch] + - _rl_del_executing_keyseq: convenience function to `delete' the last + character added to the executing key sequence. Intended to be used + before calling rl_execute_next or similar functions that push input + back to be re-read + +doc/{bash.1,bashref.texi} + - READLINE_ARGUMENT: documented new variable available for commands + defined using `bind -x' keybindings + +lib/readline/doc/rltech.texi + - rl_trim_arg_from_keyseq: documented new function + + 5/19 + ---- + +builtins/evalstring.c + - should_suppress_fork: suppress the fork if we're in a process + substitution subshell, in addition to being a simple command + without redirections. From a report back in 10/2020 from + Hyunho Cho + +bashline.c + - command_word_completion_function: if we're trying to complete an + absolute program (one containing a slash), don't run strcmp or + strcasecmp on the return value from rl_filename_completion_function, + since that duplicates work the filename completion function already + does. From a report back in 1/2021 by awa54@cdak.net + + 5/22 + ---- +parse.y + - CHECK_FOR_RESERVED_WORD: if we are returning an ESAC and unsetting + PST_CASESTMT, decrement esacs_needed_count + +parse.y,shell.h + - sh_parser_state_t: save and restore esacs_needed_count and + expecting_in_token in the shell parser state struct and + save_parser_state/restore_parser_state + +print_cmd.c + - print_simple_command: don't bother to call command_print_word_list + with an empty list + - print_simple_command: don't print a space before a redirection list + if there weren't any command words to print + + 5/24 + ---- + +lib/sh/input_avail.c + - nchars_avail: make sure SET and OSET are declared on systems with + select(2). Reported by Larkin Nickle + +parse.y + - cond_term: if we read a `!' toggle CMD_INVERT_RETURN instead of + setting it unconditionally. Report and patch from + Vincent Menegaux via + https://savannah.gnu.org/patch/?10070 + + 5/25 + ---- +doc/{bash.1,bashref.texi} + - test: add the ( $2 $3 ) case to the description of the four-argument + behavior. Inspired by a discussion with Christoph Anton Mitterer + + + 5/27 + ---- +doc/bashref.texi + - replace most of the GNU parallel section with a reference to the + tutorial on gnu.org + +lib/glob/glob.h + - GX_NEGATE: new flag; indicates whether the pattern is being negated + as part of an extglob pattern. Not used yet + +lib/glob/glob.c + - extglob_skipname,wextglob_skipname: pass GX_NEGATE to the skipname + functions if the pattern is being negated. Not checked yet + + 5/28 + ---- +doc/{bash.1,bashref.texi} + - dotglob: add text to clarify that `.' and `..' have to be matched by + a pattern beginning with `.' or -- and this is the sketchy part -- + that a pattern beginning with `.' has to be one of the patterns in + an extended glob expression + +lib/glob/glob.c + - skipname,wskipname: perform the special checks for `.' only if the + pattern is not being negated + + 6/3 + --- +parse.y,shell.h + - eol_ungetc_lookahead: save and restore as part of the parser state + included in {save,restore}_parser_state + + 6/7 + --- +lib/readline/display.c + - puts_face: make sure to cast each member of STR to unsigned char, so + it's not misinterpreted as EOF, which putc_face does not display. + Report and fix from Volodymyr Prodan in + https://savannah.gnu.org/patch/?10076 + +examples/shobj-conf + - aix*gcc: change SHOBJ_LD to ${CC}, prefix the SHOBJ_LDFLAGS flags + with -Wl, so gcc will pass them to the linker. Report from + lehel@maxer.hu in https://savannah.gnu.org/support/?110505 + + 6/11 + ---- +doc/{bash.1,bashref.texi} + - cd: additional arguments are not ignored; they raise an error. + Report from Douglas McIlroy + +lib/glob/strmatch.h + - FNM_DOTDOT: enable special handling for `.' and `..': if FNM_PERIOD + is not set, `.' and `..' at the start of a string or as a pathname + component need to be matched by a `.' in the pattern and cannot be + matched by `?', `*', or a bracket expression + +lib/glob/glob.c + - glob_vector: pass FNM_DOTDOT to strmatch() if noglob_dot_filenames + is not set to enable special handling of `.' and `..'. Prompted by a + discussion with Nora Platiel + - skipname,wskipname: remove special checks for `.' and (disabled) + checks for `..' + +lib/glob/sm_loop.c + - GMATCH: implement special handling for FNM_DOTDOT and `.' and `..': + make sure they can't be matched by any special glob characters at + the start of the string or as a pathname component (if FNM_PATHNAME + is set). This also means that !(pattern) won't return `.' or `..' + if dotglob is set + - GMATCH,EXTMATCH: don't pass FNM_DOTDOT down to recursive calls, like + FNM_PERIOD, once we process the first character in the string or + pathname component + +lib/glob/smatch.c + - ISDIRSEP,PATHSEP,SDOT_OR_DOTDOT,PDOT_OR_DOTDOT: provide definitions + for single-byte or wide character strings for sm_loop.c to use + + 6/16 + ---- + +doc/{bash.1,bashref.texi},lib/readline/doc/{rluser,rltech}.texi + - slight wording changes to rewrite gender-specific language. From a + report by Vipul Kumar , suggested + language from G. Branden Robinson , + Lawrence Velázquez , + and Andrew Church + +builtins/fc.def + - fc_builtin: make sure an entry in the history list is non-null + before trying to write it to stdout or the temporary file. From a + report from Sibo Dong + +builtins/common.[ch] + - builtin_arrayref_flags: given a WORD_DESC * (which includes flags) + and a base set of flags, return a set of flags to pass to + valid_array_reference and similar functions + +builtins/set.def + - unset_builtin: call builtin_arrayref_flags to set vflags + + 6/19 + ---- + +parse.y + - parse_comsub: rewrite to recursively call the parser (yyparse()) and + return a string constructed from the resulting parse tree. Probably + will only work with bison. Error reporting is more accurate about + line numbers and invalid tokens, and command substitution errors + are caught earlier, before expansion + - DOLPAREN: new token, never created by yylex; only ever set by + parse_comsub and xparse_dolparen to indicate we're recursively + calling the parser for a command substitution + - comsub: new grammar production that's triggered by DOLPAREN and + parses a command substitution, returning a . It's one of + the possible end states for the top-level parser + - grammar: only call rewind_input_string if the shell's input is + coming from a string + - shell_ungets: push a string back onto the shell input; only used by + make_here_document for backwards compatibility -- allowing a here- + document to be terminated by a token at the end of a command + substitution + - yylex: don't need any more special handling when returning + shell_eof_token, but we keep the clause for future work + - read_token_word: don't handle backslashes (leave them in the input + stream) if we are reading a command substitution (PST_NOEXPAND) + - reserved_word_acceptable: allow reserved words after DOLPAREN + - report_syntax_error: better error handling if we hit EOF while + looking for the ending right paren in a command substitution + - parse_string_to_word_list,parse_compound_assignment: make sure to + turn off parse_comsub sentinel temporarily + +make_cmd.c + - make_here_document: backwards compatibility: if we end a here + document on the same line as the end of a command substitution, + allow the token to terminate the here document (without requiring + a newline) and push the remainder of the line back for the parser + to consume and terminate the command substitution + +builtins/evalstring.c + - parse_string: if we read shell_eof_token and use it to terminate a + command, rewind the input string here before returning, instead of + guessing where to rewind it in the caller + + 6/22 + ---- + +redir.c + - do_redirection_internal: if VARASSIGN_REDIR_AUTOCLOSE is non-zero, + add a redirect to automatically close {var} + +parser.h + - PST_NOERROR: don't print error messages in yyerror(), just reset + the parser and return + +parse.y + - yyerror: if parser_state & PST_NOERROR, don't print an error message + - xparse_dolparen: if the flags includes SX_COMPLETE, add PST_NOERROR + to parser_state, to inhibit error messages. Fixes bug with adding + lines with incomplete command substitutions to the history list + reported by Koichi Murase + +subst.c + - skip_matched_pair: make sure to pass the SX_COMPLETE flag to + extract_delimited_string + + 6/28 + ---- + +lib/readline/bind.c + - rl_trim_arg_from_keyseq: handle rl_vi_arg_digit if VI_MODE is + defined. Report and fix from Koichi Murase + - rl_trim_arg_from_keyseq: rework to handle case where the digit + argument is given as a discrete sequence of multiple rl_digit_argument + commands (e.g, "M-1 M-2" instead of "M-1 2"). Report and fix from + Koichi Murase + +subst.c + - pat_subst: avoid calling RESIZE_MALLOCED_BUFFER with STRLEN(s) as an + argument, since it ends up going into a loop. Report and fix from + Koichi Murase + +lib/sh/casemod.c + - cval: take the string length as an argument, to avoid having to call + strlen every time (in HANDLE_MULTIBYTE mode). The caller already has + this info. Report and fix from Koichi Murase + +builtins/complete.def + - print_cmd_name: single-quote the command name if it contains any + shell metacharacters + - print_one_completion: call print_arg with a second arg of 1 if the + function name contains shell metacharacters. Report and fix from + Koichi Murase + + 6/30 + ---- + +configure.ac + - substitute BASE_CFLAGS_FOR_BUILD and STYLE_CFLAGS into Makefile + targets + - take STYLE_CFLAGS out of the CFLAGS_FOR_BUILD variable that gets + substituted + - remove STYLE_CFLAGS from CFLAGS + - use `:+' expansion to set variables based on whether $GCC is set + or null, since configure can do GCC= + +support/Makefile.in + - man2html: remove CCFLAGS_FOR_BUILD from the recipe, leaving only + LDFLAGS_FOR_BUILD. Report from Jay K + - gen-helpfiles: remove CCFLAGS_FOR_BUILD from the recipe, leaving + only LDFLAGS_FOR_BUILD + - man2html: use $(STYLE_CFLAGS) in BASE_CCFLAGS variable for C file + compilation options + +{,builtins}/Makefile.in, lib/{sh,readline,malloc,glob}/Makefile.in + - use STYLE_CFLAGS so specifying CFLAGS=-g to make doesn't clutter the + output with warnings about parens and format strings + + 7/9 + --- +lib/readline/search.c + - make_history_line_current: call _rl_free_saved_history_line to clean + up _rl_saved_line_from_history and get all the code that frees it + into one place + +lib/readline/misc.c + - _rl_free_saved_history_line: if rl_undo_list points to the data + member of _rl_saved_line_from_history, set it to NULL to avoid having + it point to freed memory, since the next thing we do now is to free + the undo list the data member points to + - _rl_start_using_history: call _rl_free_saved_history_line instead of + calling _rl_free_history_entry directly. Fixes memory leak reported + by Trung Dam + + 7/12 + ---- +lib/readline/search.c + - make_history_line_current: free rl_undo_list before replacing the + current line with the line from history, since it is a private + undo list from reading the search string + +lib/readline/rlmbutil.h + - Since wchar_t/mbrtowc/wcrtomb are limited to 16 bits on Windows + with MSVC, start abstracting the differences using WCHAR_T/ + MBRTOWC/WCRTOMB + + 7/13 + ---- + +lib/readline/{complete,display,input,text,util,vi_mode}.c + - use WCHAR_T/MBRTOWC/WCRTOMB. Part of a set of Windows MSVC fixes + from sparrowhawk996@gmail.com + +builtins/{enable,hash,help}.def + - enable_builtin: use sh_chkwrite after output to check for write errors + + 7/16 + ---- +arrayfunc.c + - quote_compound_array_word: free SUB and VALUE after assigning from + sh_single_quote(). From a coverity report from + Siteshwar Vashisht + +bashhist.c + - bash_remove_history_range: free DISCARD_LIST after freeing its + elements + +bashline.c + - bash_directory_expansion: add code to free D as a separate branch, + though it's never hit in practice + +builtins/trap.def + - showtrap: free T even if show_default == 1 if it's a non-default + trap string + + 7/17 + ---- +execute_cmd.c + - execute_coproc: free NAME on invalid identifier error + +lib/glob/glob.c + - glob_vector: make sure NEXTLINK is allocated using malloc before + passing it to free() + - glob_filename: free RESULT before returning glob_error_return when + there is only a filename + +print_cmd.c + - indirection_level_string: make sure we free PS4 after calling + decode_prompt_string if *ps4 == 0 + +subst.c + - parameter_brace_transform: if vtype == VT_VARIABLE, we need to free + a non-null VAL + +variables.c + - assign_in_env: if NAME is not a valid shell identifier, free it + after printing the error message and before returning. These are + the rest of the fixes from Siteshwar Vashisht + + 7/22 + ---- +shell.c + - main: set dollar_vars[0] to shell_script_filename before calling + run_startup_files() in the non-interactive case. Restore it after + run_startup_files returns so we can get better error messages if + we can't open a script file. Suggested by several people, originally + by Marc Aurèle La France back in 2/2021 (in a + different form) and most recently by Tapani Tarvainen + + + 7/28 + ---- +trap.c + - any_signals_trapped: return that a signal is trapped only if it's + not ignored. This is an additional opportunity for optimization, + reported in https://bugzilla.redhat.com/show_bug.cgi?id=1981926 + + 7/30 + ---- +examples/loadables/sleep.c + - main: if the uconvert conversion fails, but the argument appears to + contain a GNU-like interval specifier like "1m30s", return + EX_DISKFALLBACK so the execute_builtin code tries to run the + external version + +builtins/enable.def + - enable_shell_builtin: if the builtin isn't found, return EX_NOTFOUND + to allow the caller (enable_builtin) to react differently if it + wants to + - dyn_load_builtin: if the shared object isn't found, return EX_NOTFOUND, + change enable_builtin to deal with it + - enable_builtin: if there are no supplied options, and we attempt to + enable a non-existent builtin, try modifying `enable name' to the + equivalent of `enable -f name name' and return success if we + successfully load a builtin from a shared object. Proposed several + times, most recently by Robert Elz + +doc/{bash.1,bashref.texi} + - enable: document new behavior of `enable NAME' when NAME is not a + current shell builtin + + 8/3 + --- +lib/glob/sm_loop.c + - GMATCH: check for interrupts or terminating signals each time through + the loop and return FNM_NOMATCH immediately if received. Let the + higher layers deal with interrupting the match and jumping out. + Inspired by a report from andrej@podzimek.org + + 8/6 + --- +subst.c + - {parameter_brace_remove_pattern,parameter_brace_transform, + parameter_brace_substring,parameter_brace_casemod, + parameter_brace_patsub}: make sure the IND argument is of type + arrayind_t to handle the full range of subscripts. Reported by + felix@f-hauri.ch + +builtins/printf.def + - printf_builtin: take new format specifier: %Q. This acts like %q + but applies any supplied precision to the original unquoted + argument, then quotes that result and outputs the entire quoted + string, preserving the original field width. Originally suggested + back in 4/2020 by Sam Liddicott + +subst.c + - char_is_quoted: check whether or not we are on the second or later + line of a command with an unclosed quoted string from a previous + line. If we are, see if it's closed before the character we're + checking, so we don't interpret a closing quote as starting a new + quoted string. Reported several times, most recently by + Phi Debian in 6/2021. + + 8/9 + --- +parse.y,subst.c + - locale_expand: if the variable SINGLEQUOTE_TRANSLATIONS is non-zero, + single-quote the translated result of $"..." (if it's different from + the untranslated string) + +builtins/shopt.def + - noexpand_translation: new option to expose the value of + SINGLEQUOTE_TRANSLATIONS + + 8/10 + ---- +doc/{bash.1,bashref.texi} + - noexpand_translation: add description of new option + + 8/16 + ---- +builtins/printf.def + - printf_builtin: initialize retval after parsing arguments, since we + use it for the `v' option. Bug report from Keith Thompson + + +lib/sh/unicode.c + - u32tocesc: fix typo that returned \uXXXXXXXX instead of \UXXXXXXXX. + From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992257 by + + + 8/17 + ---- +siglist.c + - include command.h before general.h for PARAMS and prototypes. Report + from Osipov, Michael (LDA IT PLM) + + 8/18 + ---- +lib/readline/colors.c + - S_ISBLK: make sure it's defined before we use it, like in complete.c + +lib/readline/complete.c,{bashline,variables}.c + - minor changes to prep for making rl_completer_word_break_characters + `const' + +subst.[ch],pcomplete.c + - split_at_delims: the DELIMS argument is now `const'; change callers + +lib/readline/rlmbutil.h + - _rl_wcwidth: add function prototype for inline function declaration + +lib/readline/bind.c + - _rl_get_keyname: print keys greater than 160 (which are valid UTF-8) + as octal escape sequences + +lib/readline/text.c + - do_lowercase_version: return 99999 to prevent the linker from + combining it with _rl_null_function and optimizing away the separate + copy. That messes with function pointer comparisons. Part of this + batch of fixes from sparrowhawk996@gmail.com + + 8/19 + ---- +complete.c,readline.c,readline.h + - rl_completer_word_break_characters: now const char * like + rl_basic_word_break_characters; element of readline state struct + used to save it also const. THIS IS AN API CHANGE + +bashline.c + - orig_rl_completer_word_break_characters: now const char * like + rl_completer_word_break_characters + + 8/20 + ---- +bashline.c + - bash_directory_completion_hook: if direxpand and dirspell are both + set while trying to complete an absolute pathname as a command, don't + take a spell-corrected directory name that is shorter than the + original hint. https://bugzilla.redhat.com/show_bug.cgi?id=1782809 + +builtins/common.[ch] + - sh_noassign: convenience function to print an error message when a + user attempts an assignment to a "noassign" variable. Not used yet + +assoc.[ch] + - assoc_to_kvpair_list: new function, returns a WORD_LIST containing + key-value pairs as separate words + +array.[ch] + - array_to_kvpair_list: new function, returns a WORD_LIST containing + index-value pairs as separate words + +subst.c + - string_transform: handle '@k' transform like '@K' + - valid_parameter_transform: 'k' is a valid transform operator + - array_transform: handle '@k' transformation by calling one of + array_to_kvpair_list or assoc_to_kvpair_list and treating the + result as if expanding the array depending on whether the index is + `@' or `*' with the usual meanings + +doc/{bash.1,bashref.texi} + - document new '@k' parameter transformation operator + + 8/27 + ---- +lib/readline/kill.c + - rl_unix_filename_rubout: handle pathnames that consist only of one + or more slashes. The old code went too far and deleted the previous + word as well. From dabe@dabe.com + + 8/31 + ---- +parse.y + - STRING_SAVER: now save and restore shell_input_line_len; not sure + why it wasn't done before; fix push_string and pop_string accordingly + - prompt_again: now takes a parameter FORCE; not used yet (every + caller passes 0), needs more thought + +builtins/evalstring.h + - open_redir_file: broke code that expands the redirection and opens + the resultant filename into a new function, called from cat_file + +redir.h + - open_redir_file: extern declaration here for now + +builtins/evalstring.c + - parse_string: takes a new argument: COMMAND **cmdp; if non-null, saves + the parsed command to *cmdp and lets the caller manage it itself. + global_command is still not modified. Changed callers in parse.y + + 9/1 + --- +parse.y + - parse_string_to_command: stripped-down version of xparse_dolparen + that takes a string, runs it through the parser, and returns the + resultant COMMAND *; uses parse_string with the new argument + +externs.h + - parse_string_to_command: extern declaration + +builtins/evalstring.c + - can_optimize_cat_file: new function, takes a COMMAND * argument and + returns true if the command can be optimized like $(&", see if we can optimize the command and call + optimize_cat_file to do it if we can. + + 9/2 + --- +configure.ac,config.h.in,lib/sh/setlinebuf.c + - SETVBUF_REVERSED: remove all references + +configure.ac,aclocal.m4 + - AC_OUTPUT: move created files and commands to AC_CONFIG_FILES and + AC_CONFIG_COMMANDS; call AC_OUTPUT without any arguments + - require autoconf version 2.63 + - AC_HELP_STRING -> AS_HELP_STRING + - replace references to $ac_cv_prog_gcc with $GCC + - AC_C_LONG_DOUBLE -> AC_TYPE_LONG_DOUBLE + - enable-alt-array-implementation: new configure option, placeholder + for later + +unwind_prot.c + - stddef.h: include if HAVE_STDDEF_H is defined, not STDC_HEADERS + +bashansi.h + - memory.h: don't include any more; assume has all the + necessary defines + +aclocal.m4 + - AC_HEADER_STDC: remove AC_REQUIRE calls to this; change tests to use + appropriate checks instead of STDC_HEADERS + + 9/3 + --- +configure.ac,config.h.in + - AC_TYPE_SIGNAL,BASH_TYPE_SIGHANDLER: remove calls, remove mention of + RETSIGTYPE and VOID_SIGHANDLER + - AC_USE_SYSTEM_EXTENSIONS: use this instead of AC_ISC_POSIX (which is + well and truly obsolete) and AC_MINIX (which just calls it anyway). + All the right defines are already present + - AC_HEADER_TIME: removed + - AC_HEADER_STDC: removed + - AC_DECL_SYS_SIGLIST: replaced with BASH_DECL_SYS_SIGLIST + - BASH_FUNC_CTYPE_NONASCII: removed + +sig.h,lib/readline/signals.c + - RETSIGTYPE -> void, SIGHANDLER_RETURN -> return + +include/posixtime.h + - don't bother with TIME_WITH_SYS_TIME, just include if + we have it and include unconditionally + +include/chartypes.h,lib/readline/chardefs.h + - IN_CTYPE_DOMAIN: no longer uses STDC_HEADERS define, checks against + CHAR_MAX for non-C89 systems, still a no-op on C89 systems + +lib/readline/chardefs.h + - memory.h: don't include, no need for STDC_HEADERS; assume the mem* + functions are defined in as in C89 + - now that we assume IN_CTYPE_DOMAIN bounds its argument to unsigned + chars, we don't need NON_NEGATIVE checks at all + +lib/readline/chardefs.h,util.c + - ALPHABETIC -> _rl_alphabetic_p + + 9/8 + --- + +lib/sh/strftime.c + - include after reworking above; include + unconditionally in case it defines time_t. From a report by + Ori Sky Farrell + + 9/9 + --- +lib/readline/search.c + - rl_history_search_internal: set rl_undo_list to NULL after calling + rl_maybe_save_line, since it will be restored one way or another + after the search completes, and we don't want it to be freed twice + - rl_history_search_internal: leave the current history offset at the + position of the last matching history entry. This means that things + like ^P will start back from that history entry, ^N will move + forward from there, and operate-and-get-next will work like it does + with incremental searches. Reported by Vandrus Zoltán + + + 9/10 + ---- +aclocal.m4 + - BASH_C_LONG_LONG: removed + - BASH_TYPE_LONG_DOUBLE: removed + - BASH_TYPE_LONG_LONG,BASH_TYPE_UNSIGNED_LONG_LONG: removed + - BASH_FUNC_CTYPE_NONASCII: removed + - BASH_SYS_SIGNAL_VINTAGE,BASH_SYS_REINSTALL_SIGHANDLERS: don't + require AC_TYPE_SIGNAL, use void instead of RETSIGTYPE + - BASH_TYPE_SIGHANDLER: removed + +configure.ac,aclocal.m4,config.h.in + - BASH_TYPE_LONG_LONG: removed, call AC_TYPE_LONG_LONG_INT directly, + change #define to HAVE_LONG_LONG_INT + - BASH_TYPE_UNSIGNED_LONG_LONG: removed, call AC_TYPE_UNSIGNED_LONG_LONG_INT + directly, change #define to HAVE_UNSIGNED_LONG_LONG_INT + +externs.h,include/typemax.h,lib/sh/{fmtullong,snprintf,strtoimax,strtoll, +strtoull,strtoumax}.c + - HAVE_LONG_LONG -> HAVE_LONG_LONG_INT + - HAVE_UNSIGNED_LONG_LONG -> HAVE_UNSIGNED_LONG_LONG_INT + +configure.ac + - AC_TRY_COMPILE -> AC_COMPILE_IFELSE + - BASH_CHECK_TYPE (intmax_t) -> AC_TYPE_INTMAX_T + - BASH_CHECK_TYPE (uintmax_t) -> AC_TYPE_UINTMAX_T + - BASH_CHECK_TYPE (sig_atomic_t): removed + +aclocal.m4 + - BASH_FUNC_STRSIGNAL: changed to use AC_LINK_IFELSE + - BASH_FUNC_LSTAT: changed to use AC_LINK_IFELSE + - BASH_FUNC_SBRK: changed to use AC_LINK_IFELSE and AC_RUN_IFELSE, + fixed typo + - BASH_CHECK_SPEED_T: changed to use AC_COMPILE_IFELSE + - BASH_TYPE_SIG_ATOMIC_T: use BASH_CHECK_TYPE instead of AC_CHECK_TYPE + - BASH_STRUCT_DIRENT: new macro, like _AC_STRUCT_DIRENT but public and + sets a different bash-specific shell variable + - BASH_STRUCT_DIRENT_D_{INO,FILENO,NAMLEN}: call BASH_STRUCT_DIRENT + with a different first argument instead of using inline code and + AC_TRY_COMPILE + + 9/11 + ---- +[prayers for the victims of 9/11/2001] + +aclocal.m4 + - BASH_CHECK_DECL: just call AC_CHECK_DECLS and use the default + includes, which includes the files we used to specify + - BASH_FUNC_INET_ATON: changed to use AC_LINK_IFELSE + - BASH_STRUCT_WEXITSTATUS_OFFSET: changed to use AC_RUN_IFELSE + - BASH_FUNC_OPENDIR_CHECK: changed to use AC_RUN_IFELSE + - BASH_FUNC_ULIMIT_MAXFDS: changed to use AC_RUN_IFELSE + - BASH_UNDER_SYS_SIGLIST: changed to use AC_RUN_IFELSE + - BASH_SYS_SIGLIST: changed to use AC_RUN_IFELSE + - BASH_FUNC_DUP2_CLOEXEC_CHECK: changed to use AC_RUN_IFELSE + - BASH_FUNC_GETENV: changed to use AC_RUN_IFELSE + - BASH_FUNC_GETCWD: changed to use AC_RUN_IFELSE + - BASH_FUNC_FNMATCH_EXTMATCH: changed to use AC_RUN_IFELSE + - BASH_FUNC_POSIX_SETJMP: changed to use AC_RUN_IFELSE + - BASH_FUNC_STRCOLL: changed to use AC_RUN_IFELSE + - BASH_FUNC_PRINTF_A_FORMAT: changed to use AC_RUN_IFELSE + - BASH_SYS_PGRP_SYNC: changed to use AC_RUN_IFELSE + - BASH_SYS_SIGNAL_VINTAGE: changed to use AC_RUN_IFELSE + - BASH_SYS_NAMED_PIPES: changed to use AC_RUN_IFELSE + - BASH_CHECK_RTSIGS: changed to use AC_RUN_IFELSE + - BASH_CHECK_MULTIBYTE: changed to use AC_RUN_IFELSE + - RL_LIB_READLINE_VERSION: changed to use AC_RUN_IFELSE + - BASH_CHECK_WCONTINUED: changed to use AC_RUN_IFELSE + - BASH_FUNC_SNPRINTF: changed to use AC_RUN_IFELSE + - BASH_FUNC_VSNPRINTF: changed to use AC_RUN_IFELSE + - BASH_FUNC_FNMATCH_EQUIV_FALLBACK: changed to use AC_RUN_IFELSE + - BASH_DECL_PRINTF: changed to use AC_RUN_IFELSE + - BASH_TYPE_RLIMIT: rewrote to avoid quad_t, now uses AC_COMPILE_IFELSE + to determine whether rlim_t is available, otherwise determines the + value of RLIMTYPE based on sizeof(rlim.rlim_cur): int, long, or + long long + - BASH_SIZEOF_RLIMIT,BASH_SIZEOF_QUAD_T: helper macros for + BASH_TYPE_RLIMIT in the case that rlim_t is not present + +configure.ac + - BASH_CHECK_DECL -> AC_CHECK_DECLS + - quad_t: use AC_CHECK_TYPE (new style) instead of BASH_CHECK_TYPE + + + 9/14 + ---- +execute_cmd.c + - time_command: if we longjmp back to the top_level we saved, make sure + we're in the same subshell environment before printing the timing + stats. We could have longjmped back from a child process of the + command or pipeline we want to time. From a report by + Sergej Alikov + - time_command: restore command->flags even if we longjmp back + +general.c + - check_binary_file: if the first line of the ENOEXEC file starts with + a `#!', check the rest of the buffer for NULs to determine whether + this is a binary file. Since we only check the first line, a #! line + followed by binary data could be confused for a shell script + + 9/16 + ---- +bashjmp.h + - EXITBLTIN: new longjmp `code' value: used by the exit builtin + +{execute_cmd,shell,subst,trap}.c,builtins/evalstring.c + - treat EXITBLTIN exactly the same as EXITPROG (for now) + +builtins/exit.def + - exit_builtin: jump_to_top_level with value EXITBLTIN + +builtins/evalstring.c + - parse_and_execute: EXITBLTIN has its own case, with the same contents + as EXITPROG + + 9/17 + ---- +builtins/evalstring.c + - parse_and_execute: change EXITBLTIN case to avoid running the + unwind-protect stack to the `pe_dispose' tag (which has the effect + of running all the unwind-protects installed by the commands in + the string) if we're executing in a function and EXIT is trapped. + This has the effect of running the EXIT trap in the function context, + which is what we do when we're not in parse_and_execute (eval, + bash -c, command substitution, etc.) + + 9/18 + ---- +arrayfunc.c + - expand_and_quote_kvpair_word,quote_compound_array_word, + expand_and_quote_assoc_word,quote_compound_array_list: make sure + the value has CTLESC characters doubled even when being single- + quoted, since that's what the parser does with standalone assignment + statements. From https://savannah.gnu.org/support/?110538 + + 9/19 + ---- +aclocal.m4 + - AC_TRY_COMPILE -> AC_COMPILE_IFELSE (AC_TRY_LINK calls left to + modify to avoid obsolete warnings) + - BASH_STRUCT_WINSIZE: broke out checks for separate headers into new + macros, call them and work with the results; needed to avoid two + calls to AC_TRY_COMPILE + - BASH_CHECK_KERNEL_RLIMIT: avoid multiple calls to AC_TRY_COMPILE by + breaking basic test for RLIMIT_ defines into a separate test and + calling the HPUX-specific _KERNEL test only if that fails + +m4/gettext.m4,configure.ac + - AM_GNU_GETTEXT -> BASH_GNU_GETTEXT: remove deprecation warning, since + [no-libtool] is how we use this; rename to avoid someone's local + copy from overriding ours + + 9/20 + ---- +aclocal.m4 + - BASH_CHECK_MULTIBYTE: take out code that checks for nl_langinfo(CODESET) + since that's already provided by AM_LANGINFO_CODESET, which is + called by BASH_GNU_GETTEXT. We AC_REQUIRE it here, though, to avoid + problems from future changes + - BASH_SYS_SIGNAL_VINTAGE: broke the code that checks for the different + signal vintages into different AC_DEFUNed macros, changed + BASH_SYS_SIGNAL_VINTAGE to stitch them together with shell code + testing the cached variables + - AC_TRY_LINK -> AC_LINK_IFELSE: there are no more autoconf warnings + + 9/21 + ---- +array.[ch] + - array_from_argv: new convenience function + +array.h + - num_elements: now an arrayind_t, since that's the type of indices, it + makes sense to allow that many elements + + 9/22 + ---- +lib/readline/terminal.c + - rl_term_kP: fix typo. Fix from Koichi Murase + + 9/25 + ---- +lib/readline/display.c + - rl_clear_visible_line: call _rl_clear_to_eol with _rl_screenwidth as + the argument so we clear out the entire line even if the terminal + doesn't have a clear-to-eol sequence; make sure to add a call to + rl_cr after that so we know we're always in column 0 + - _rl_redisplay_after_sigwinch: just call rl_clear_visible_line instead + of erasing the last line of the display + - _rl_redisplay_after_sigwinch: if the prompt is longer than the screen + width, make sure to call _rl_reset_prompt to recalculate the + local_prompt_newlines array. Should fix issue from + https://savannah.gnu.org/support/index.php?110543 + +redir.c + - do_redirection_internal: if given [N]<&WORD- or [N]>&WORD- and WORD + expands to null, make it identical to <&- or >&- and close file + descriptor N (default 0). From a discussion back in 5/2021 + + 9/27 + ---- +arrayfunc.c + - expand_compound_array_assignment: since we run the string through + the parser to turn it into a list (so we can make sure all shell + metacharacters are properly quoted), we need to remove the CTLESC + the parser uses to quote CTLESC and CTLNUL in *unquoted* words. + The rest of the code assumes this has been done, and assumes that + any CTLESC characters passed to expansion are part of the original + word and should themselves be quoted, doubling the number of CTLESCs + + 9/28 + ---- +arrayfunc.c + - expand_and_quote_kvpair_word,quote_compound_array_word, + expand_and_quote_assoc_word,quote_compound_array_list: if we are + single-quoting associative array subscripts and associative and + indexed array values, we need to quote CTLESC characters, because + that's how they come out of the parser and how the assignment + statement code expects to see them. + Fixes https://savannah.gnu.org/support/index.php?110538 + + 9/29 + ---- +subst.c + - parameter_brace_transform: invalid transformation operators are now + fatal errors in non-interactive shells, as with the other word + expansions. Reported by Martin Schulte in + https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00026.html + +execute_cmd.c + - execute_disk_command: if we're optimizing out the fork (nofork) and + not directly in a pipeline (pipe_in == pipe_out == NO_PIPE), only + modify shell_level if subshell_environment says we're not already in + a pipeline. Reported by Paul Smith 10/11/2020 + against GNU make + +evalstring.c + - should_suppress_fork: remove #if 1 for code that tries to suppress + the fork in a process substitution subshell + + 9/30 + ---- +builtins/mapfile.def + - do_chop: make sure we're comparing unsigned chars when checking + whether the delim is the last character on the line. Reported by + Greg Wooledge + + 10/1 + ---- +lib/readline/rltty.c + - rl_deprep_terminal: if we're not echoing to the terminal + (_rl_echoing_p == 0), and we just output the bracketed paste end + sequence, output a newline to compensate for the \r at the end of + BRACK_PASTE_FINI, since redisplay didn't do it for us. Reported by + Siteshwar Vashisht + +shell.h + - MATCH_EXPREP: new matching flag, understood only by pattern + substitution; means to expand unquoted `&' in the replacement + STRING to the match of PATTERN + +subst.c + - shouldexp_replacement: uncommented + - pat_subst: we expand & in the replacement string if MATCH_EXPREP + appears in MFLAGS + - parameter_brace_patsub: push call to shouldexp_replacement out here, + after the replacement string is expanded; set MATCH_EXPREP if there + is an unquoted `&' (by backslash) in the expanded replacement + string + +doc/{bash.1,bashref.texi} + - pattern substitution: overhauled the description, moved each of the + possible forms to be tags in the tagged paragraph. The description + now specifies the expansions that the replacement string undergoes + - pattern substitution: documented new behavior of unquoted & in the + replacement string + + 10/4 + ---- +shell.c + - include if we're debugging malloc (MALLOC_DEBUG) + so we can get an extern declaration of trace_malloc_stats + + 10/5 + ---- +subst.c + - expand_subscript_string: allocate new memory for td.word, copying + STRING, in case it gets freed on error by expand_word_internal. + Report and fix from Koichi Murase + +lib/malloc/malloc.c + - malloc_usable_size: return the allocated size instead of the chunk + size, since writing over the bounds checking will cause fatal errors. + Reported by Julien Moutinho , fix from + Dominique Martinet + +arrayfunc.c + - unbind_array_elememnt: pass (flags&VA_NOEXPAND) to skipsubscript(), + instead of unconditionally passing 1 if we're operating on an + associative array. This is consistent with how valid_array_reference + determines the length of the subscript. + Report and fix from Koichi Murase + + 10/6 + ---- + +subst.c + - skip_to_delim: add a new value for FLAGS. If FLAGS&2, we assume that + START is one character after the opening OPEN. If not, we assume that + START is at OPEN, and needs to be incremented past it. Part of fix + from Koichi Murase + +arrayfunc.c + - unbind_array_element: make sure to pass FLAGS to skipsubscript with + bit 2 set, since we are passed a SUB index that's one past the + opening bracket. Rest of fix from + Koichi Murase + - array_variable_name: make sure we pass (FLAGS&1) to skipsubscript, so + we don't inadvertently pass a value with bit 2 set, which would + cause an off-by-one error in subscript parsing + + 10/8 + ---- +trap.c + - restore_traps: inverse of reset_signal_handlers. This understands + how reset_signal_handlers changes the signal disposition while + leaving the trap string in place, and knows how to restore flags + and state based on that preserved trap string and whether or not + the signal is "special" to the shell. + +builtins/exec.def + - exec_builtin: instead of using restore_original_signals to completely + cancel the traps, call reset_signal_handlers so the trap strings are + preserved. Then if the exec fails (and we're not exiting) we can + look at the trap strings and see how to restore the trap state. + This calls restore_traps after reinitializing the shell signal + handlers, using the trap strings saved by reset_signal_handlers. + Fixes issue with not exiting after a failed exec clearing the EXIT + trap reported by Mark March , using the + approach suggested by Robert Elz + +subst.c + - expand_declaration_argument: when parsing options that modify + attributes that affect how the value is handled (i, c, u, etc.), + make sure to create an option string and call make_internal_declare + with options that start with a `+' so the attribute is off when + the assignment is performed and changes how the value is expanded. + From a report by Léa Gris + +lib/readline/complete.c + - rl_display_match_list: even if _rl_completion_prefix_display_length + is set to a non-zero value, pass the common prefix length to + fnprint if we've turned on colored completion prefixes; passes + through to fnprint via print_filename + - fnprint: add the ellipsis if prefix_bytes exceeds the + _rl_completion_prefix_display_length, add explicit check for + prefix_bytes being longer since print_filename passes it through + if colored-completion-prefix is set. This means that while + completion-prefix-display-length still has precedence over + colored-completion-prefix, it doesn't override it if both are set + and the common prefix length is shorter than + completion-prefix-display-length. From a report by + Christoph Anton Mitterer + + 10/10 + ----- +parse.y + - parse_dparen: if the last token is FOR, increment word_top and assign + word_lineno like for other for loops. Fixes bug with LINENO after + arithmetic for commands reported by + Tom Coleman + + 10/11 + ----- +execute_cmd.c + - shell_execve: if execve fails with ENOENT, but executable_file() + succeeds, display a slightly more descriptive error message. Prompted + by a report from Andrea Monaco + +stringlib.c + - strcreplace: allow backslash to escape a backslash, since we allow it + to escape a `&' + + 10/14 + ----- +pcomplib.c + - COMPLETE_HASH_BUCKETS: double to 512 + +stringlib.c + - strcreplace: the last argument is now a flags argument. 1 has its + previous meaning (glob); 2 means to allow backslash to escape a + backslash (as added on 10/11) + +subst.c + - pat_subst: call strcreplace with 2 as the flags value + + 10/15 + ----- +doc/bashref.texi + - updates to Installation section + +doc/{mkposix,mkinst,mkrbash},doc/Makefile.in + - changes to allow scripts to be run outside the source directory + + 10/18 + ----- +subst.c + - patsub_replacement: controls whether pattern substitution expands `&' + in the replacement string. Initialized to 1 by default + + 10/19 + ----- +doc/{bash.1,bashref.texi} + - document bash's WCE SIGINT behavior when job control is not enabled + and the shell receives a SIGINT while waiting for the foreground + command to complete. Added at Red Hat's request. A complete + discussion is at https://www.cons.org/cracauer/sigint.html + + 10/25 + ----- +builtins/shopt.def + - patsub_replacement: new shell option, exposes patsub_replacement + variable controlling whether pattern substitution expands `&' in + the replacement string. Still enabled by default. + +doc/{bash.1,bashref.texi} + - patsub_replacement: document new shopt option + + 10/26 + ----- +lib/readline/display.c + - expand_prompt: group runs of invisible characters at the right edge + of the screen with the previous physical characters when setting + local_prompt_newlines, since that's how update_line() expects to + get it. Fix from sparrowhawk996@gmail.com. + +lib/readline/macro.c + - rl_end_kbd_macro: make sure current_macro_index is > 0 after + subtracting the key sequence length, clamp it to 0 before writing + the ending NULL. From a fuzzing report by + Tillmann Osswald + +lib/readline/isearch.c + - _rl_isearch_dispatch: in the bracketed paste case, don't assume the + pasted text is null-terminated, so use memcpy instead of strcpy for + the length of the pasted text, then make sure the search string is + null-terminated. From a fuzzing report by + Tillmann Osswald + +lib/readline/text.c + - rl_transpose_words: make sure to preserve the value of rl_end from + the beginning to the end of the function. From a fuzzing report by + Tillmann Osswald + +lib/readline/vi_mode.c + - rl_vi_delete_to,rl_vi_change_to,rl_vi_yank_to: if we are redoing a + command (_rl_vi_redoing == 1), save the old _rl_vimvcxt, allocate a + new one, and restore the old one before returning. Prevents some + pointer aliasing problems. From a fuzzing report by + Tillmann Osswald + + 10/29 + ----- +arrayfunc.c + - tokenize_array_reference: take valid_array_reference and add a third + argument (char **SUBP), which, if non-NULL, gets the null-terminated + subscript parsed from the NAME argument. If it's NULL, the caller + gets the old valid_array_reference behavior. Fix from + Koichi Murase + - valid_array_reference: just call tokenize_array_reference with a + NULL third argument + - unbind_array_element: assume the caller (unset_builtin) passes a + null-terminated SUB that's already been validated by a call to + tokenize_array_reference so we don't need to call skipsubscript() or + check VA_ONEWORD. Fix from Koichi Murase + +arrayfunc.h + - tokenize_array_reference: extern declaration + +builtins/set.def + - unset_builtin: use tokenize_array_reference to figure out T and pass + that to unbind_array_element. Fix from + Koichi Murase + - unset_builtin: pass non-null argument to array_variable_part to get + the length of the subscript (T), then cut off any final `]' before + passing it to unbind_array_element, since that's what it now + expects + +subst.c + - expand_string_for_rhs,expand_string_for_pat: assign td.word from + newly-allocated memory in case it gets freed on error during the + call to call_expand_word_internal(); free it manually when that + call returns + + 11/1 + ---- +findcmd.c + - search_for_command: if FLAGS includes CMDSRCH_STDPATH, don't look in + the hash table for the command name. Prompted by a report from + Roger Morris + +aclocal.m4 + - BASH_FUNC_POSIX_SETJMP: add a check by fetching the signal mask + after the siglongjmp and making sure that SIGINT is not blocked, + indicating we restored the original signal mask + + 11/2 + ---- +subst.c + - expand_string_assignment: make sure to add W_TILDEEXP to the flags so + expand_word_internal performs the right tilde expansion on tildes + following an unquoted colon. Report from Anders Kaseorg + + + + 11/3 + ---- +aclocal.m4 + - BASH_FUNC_POSIX_SETJMP: if cross-compiling, default to `present' if + we've determined we have posix signal functions + + 11/4 + ---- +execute_cmd.c + - SET_LINE_NUMBER: set line_number, but don't set line_number_for_err_trap + if we're already running the ERR trap + - GET_LINE_NUMBER: evaluates to line_number_for_err_trap if we're + running the ERR trap and executing_line_number() otherwise + - execute_function: use GET_LINE_NUMBER to push the value for the line + number into the BASH_LINENO array + - execute_command_internal,execute_arith_command,execute_cond_command: + use SET_LINE_NUMBER to avoid overwriting line_number_for_err trap + while executing the ERR trap. Tentative fix for `caller' problem + reported by Quinn Grier + +configure.ac,patchlevel.h + - set bash version to 5.2-devel, meaning shell_compatibility_level = 52, + which required updating tests (array.tests, array21.sub, + quotearray3.sub, new-exp10.sub, history2.sub). The first three are + because bash-5.2 flushes an indexed array but does not unset the + variable when given `unset a[@]' or `unset[*]' (that is, it acts + like `a=()' instead of `unset a'); the other two are because the + version number changed + + 11/8 + ---- +doc/Makefile.in + - bash.info: use `makeinfo -o' instead of calling infopost.sh to edit + the filename, since the tags table includes absolute byte offsets to + nodes. From https://savannah.gnu.org/support/?110557 + + 11/15 + ----- +examples/loadables/realpath.c + - add -a NAME argument to put canonicalized pathnames into an indexed + array instead of displaying them on stdout. Suggested by + felix@f-hauri.ch + +lib/readline/colors.c + - _rl_custom_readline_prefix: new function, looks in $LS_COLORS for a + custom extension (*.readline-colored-completion-prefix) and uses that, + if found, as the default color for the common prefix displayed when + `colored-completion-prefix' is set. Suggested by + Christoph Anton Mitterer + - _rl_print_prefix_color: try the return value from _rl_custom_readline_prefix + before defaulting to the C_PREFIX (C_SOCK) color. Suggested by + Christoph Anton Mitterer + +lib/readline/doc/{readline.3,rluser.texi},doc/bash.1 + - readline-colored-completion-prefix: document new custom suffix for + readline's colored-completion-prefix color + + 11/16 + ----- +doc/{bash.1,bashref.texi},builtins/set.def + - set: modify usage synopsis slightly, based on + https://bugzilla.redhat.com/show_bug.cgi?id=2022324 + +builtins/set.def + - unset_builtin: add shell compatibility level check <= bash-5.1 to + force `unset a[@]' to unset array variable `a', like in previous + versions, instead of unsetting associative array element `@' or + removing all elements of an indexed array without unsetting the + variable itself + +builtins/common.c + - set_expand_once: now a no-op if the shell compatibility level is + <= bash-5.1, preserving the previous versions' behavior for [[ -v + (dependent on assoc_expand_once instead of forcing it) + +subst.c + - parameter_brace_expand_rhs: make sure that the final value assigned + is always returned from ${a:=b}, even when `a' has a variable + attribute that modifies the value on assignment. Reported back on + 1/20/2021 by oguzismailuysal@gmail.com; bash-5.2 tag removed + + 11/22 + ----- +doc/{bashref.texi,bash.1} + - unset: change the description of `unset name[@]' (unset name[*]) + to reflect the new behavior (unset associative array subscripts or + remove all elements from an indexed array) and the difference from + previous versions + - set: document -r for restricted shell mode + - restricted shell: change occurrences of `set +o restricted' to + `shopt -u restricted_shell'. From a report from + Jin Xiang + - read: note that read -t0 may return 0 if a subsequent read will + return EOF. From a suggestion by Dale R. Worley + + +execute_cmd.c + - execute_arith_command,eval_arith_for_expr: don't pass EXP_EXPANDED + to evalexp if shell_compatibility_level > 5.1, assuming that the + expression has been quoted by Q_ARITH handling + +test.c + - test_arithcomp: if we're being called by the conditional command + code and treating the arguments to the arithmetic operators as + expressions, don't pass EXP_EXPANDED to evalexp if the shell + compatibility level is > 5.1, assuming that the expression has been + quoted by Q_ARITH handling + + 11/29 + ----- +examples/loadables/getconf.[ch] + - getconf: new implementation of loadable builtin, based on glibc + getconf + +examples/loadables/sleep.c + - parse_gnutimefmt: parse GNU interval format (2m30s), returning + seconds and microseconds like uconvert + - sleep: use parse_gnutimefmt if uconvert can't parse the format right + away and "dhms" appears in the format string. Don't return + EX_DISKFALLBACK under any circumstances + + 11/30 + ----- + +builtins/wait.def + - wait_builtin: refer to unset_waitlist only if JOB_CONTROL is enabled. + Report from Joel Ebel + +parse.y,builtins/set.def + - changes for minimal config restrictions + +configure.ac,config.h.in + - --enable-translatable-strings: new configuration option to allow + $"..." support to be compiled in or out; not included in the minimal + shell configuration + +shell.c + - main: don't include any of the dump-strings options if + TRANSLATABLE_STRINGS is not defined + +lib/sh/shquote.c + - sh_backslash_quote_for_double_quotes: needed for translatable strings + +parse.y + - support for translating $"..." strings now conditional on + TRANSLATABLE_STRINGS + +locale.c + - locale_expand: now conditional on TRANSLATABLE_STRINGS + +subst.c + - expand_string_dollar_quote: support for $"..." now conditional on + TRANSLATABLE_STRINGS + +doc/bashref.texi + - --enable-translatable-strings: document new configuration option + + 12/2 + ---- +subst.c + - verify_substring_values: now that the default compatibility level is + 52, and the Q_ARITH code is enabled, make the EXP_EXPANDED flag for + evalexp() dependent on the compatibility level + - param_expand: arithmetic substitution: make EXP_EXPANDED flag + for evalexp() dependent on the compatibility level + - expand_word_internal: don't call expand_array_subscript if the + shell compatibility level is 51 or below (Q_ARITH) + +test.c + - test_unop: if the shell compatibility level is > 51, using [@] with + an existing associative array will report on a key of `@' + +arrayfunc.c + - array_expand_index: if the compatibility level is > 51, Q_ARITH is + used and we don't pass EXP_EXPANDED to evalexp() + +COMPAT,doc/bashref.texi + - shell compatibility mode: document effects of setting the + compatibility mode to 51 + + 12/3 + ---- +lib/malloc/malloc.c + - mremap: only use if MREMAP_MAYMOVE is defined, since we use the Linux + version of the function signature + + 12/6 + ---- +bashhist.c + - bash_add_history: if we're parsing a here-document (PST_HEREDOC), only + suppress adding the newline between lines if we're not at the first + line of the here-document (here_doc_first_line != 0). From a report + by S0AndS0 + + 12/8 + ---- +lib/readline/colors.c + - _rl_custom_readline_prefix: use STREQN to check for the extension + string in $LS_COLORS, since it's not necessarily null-terminated. + From https://savannah.gnu.org/patch/?10158 + + 12/10 + ----- +variables.c + - set_int_value,set_string_value: broke common code for setting int + and string dynamic variable values out into separate functions; + changed all callers to use them where appropriate. set_int_value + takes a flags argument saying whether or not to force the integer + attribute on + - assign_random: store the value assigned as the variable value so + things like RANDOM=42; RANDOM+=7 generate consistent sequences + like in ksh93 + - assign_seconds: store the value assigned as the variable value so + things like SECONDS=42 ; SECONDS+=7 generate what's expected + +doc/Makefile.in + - changes to allow man pages that include others (.so FN) to be built + outside the source tree + + 12/13 + ----- +arrayfunc.c + - assign_array_element_internal: take an additional argument: char **NVALP. + If non-null, it gets the value eventually assigned to the array + element + - assign_array_element: take an additional NVALP argument; pass it to + assign_array_element_internal + +arrayfunc.h + - assign_array_element: new extern function declaration + +{subst,variables}.c,builtins/{common.c,declare.def} + - assign_array_element: change callers + +subst.c + - parameter_brace_expand_rhs: for the ${param:=value}, use the value + returned by assign_array_element in NVALP as the return value, since + it's the value ultimately assigned to the variable after possible + modification (e.g., arithmetic evaluation). Reported by + oguzismailuysal@gmail.com after flawed fix applied 11/16 + + 12/14 + ----- +arrayfunc.h + - array_eltstate_t: an object that encapsulates an array element's + state (type, index, key, value) whether it's an indexed or + associative array + +arrayfunc.c + - {init,flush}_eltstate: new functions to initialize and flush any + allocated memory from array_eltstate_t objects. No allocation/ + deallocation functions yet; the only use is with a static instance + - assign_array_element_internal: take an array_eltstate_t * instead of + a char ** as the final argument, so we can return keys/indices and + values depending on the type of array; populates it with the + appropriate values + - assign_array_element: take array_eltstate_t * as final argument + instead of a char **; pass it to assign_array_element_internal + +{subst,variables}.c,builtins/{common.c,declare.def} + - assign_array_element: change callers to modify final argument + + 12/15 + ----- +arrayfunc.c + - array_value_internal: now takes an array_eltstate_t * as the final + argument; there is no more `rtype' argument in favor of the + `subtype' member; returns the appropriate values in its members + - array_value: changed to pass array_eltstate_t to array_value_internal, + saves and fetches its `ind' member into *indp; saves `subtype' + member into *rtype + - get_arrary_value: changed to take array_eltstate_t as third argument, + passes it to array_value_internal + +{redir,expr}.c + - get_array_value: changed callers; initializing the array_eltstate_t + argument as necessary + +test.c + - test_builtin: changed to use get_array_value, adding AV_ALLOWALL to + the flags, since it didn't use any QUOTED argument. Pass + array_eltstate_t * as final argument and get subtype from it (the + only thing we're interested in, to deallocate memory) + + 12/16 + ----- +arrayfunc.c + - array_value: now takes a final argument of array_eltstate_t *, which + it passes to array_value_internal; no more rtype and indp args. + Callers are responsible for marshalling values into estatep + +arrayfunc.h + - array_value: changed function signature + +subst.c + - get_var_and_type,parameter_brace_expand_word: changed calls to + array_value to use array_eltstate_t argument and initialize it + appropriately. Copy values back from it to the parameters we need + to modify + +variables.c + - assign_lineno: call set_int_value to store the value, like with + RANDOM and SECONDS (from 12/10) + + 12/17 + ----- +{eval,execute_cmd}.c + - when bypassing a parsed command because read_but_dont_execute is + set, don't modify last_command_exit_value. From a report by + Robert Elz + +parse.y + - parse_comsub: make sure the first call to shell_getc to check whether + or not it's an arithmetic expansion skips a quoted newline. From a + report by Robert Elz + + 12/21 + ----- +subst.c + - parameter_brace_remove_pattern,parameter_brace_patsub,parameter_brace_casemod, + parameter_brace_transform,parameter_brace_substring: now take an + array_eltstate_t * argument in place of the arrayind_t argument, pass + it to get_var_and_type; this generalizes the indexed array behavior + of expanding array subscripts once to associative arrays via an + eventual call to array_value_internal with a non-null KEY member + - get_var_and_type: now takes an array_eltstate_t * argument in place + of the arrayind_t argument; use it in calls to array_value so we + can only expand array subscripts once whether they are indexed or + associative arrays + - parameter_brace_expand_word: take an array_eltstate_t * argument in + place of the arrayind_t * argument; pass it to array_value; use a + static version (which we init and flush) if the argument passed is + NULL so we can get the right state passed back and forth + - parameter_brace_expand: pass a pointer to a static array_eltstate_t + to parameter_brace_expand_word, and use that in the various calls to + parameter_brace_XXX functions that perform specific expansions in + place of the old arrayind_t argument; make sure to flush it before + returning, even on errors + + 12/22 + ----- +{trap,variables}.c + - internal_warning: calls changed to use translatable strings + consistently + +error.[ch] + - internal_debug: new function, prints a message like internal_warning, + no-op if DEBUG is not defined + - INTERNAL_DEBUG: macro that expands to internal_debug when DEBUG is + defined, and nothing otherwise + +{jobs,trap}.c + - changed some internal_warning and internal_inform calls to use + internal_debug, since they were active only when DEBUG is defined + +parse.y + - parse_comsub: add internal_debug call when a command substitution + ends with unterminated here-documents + +builtins/common.c + - number_of_args: unconditionally return posparam_count + +{jobs,execute_cmd,subst}.c,parse.y,builtins/{command.def,evalstring.c} + - INTERNAL_DEBUG: use instead of calls to itrace protected by #ifdef + DEBUG + + 12/26 + ----- +lib/glob/glob.c + - glob_always_skip_dot_and_dotdot: initialize to 1 (enabled) + +builtins/shopt.def + - globskipdots: new shell option, exposes glob_always_skip_dot_and_dotdot + +doc/{bash.1,bashref.texi} + - globskipdots: document new shell option + +execute_cmd.c + - fix_arrayref_words: call valid_array_reference with 0 for third arg + because the words have not undergone any word expansions yet and + the quotes are still present. This makes things like + A=[\[]=set + unset A[\[] + work + +subst.c + - word_list_split: if a word undergoes word splitting but is not + changed, preserve any W_ARRAYREF flag into the new word. This makes + things like + rkey=']' + unset A[$rkey] + work because the unset builtin sees the W_ARRAYREF flag on its + argument + + 12/29 + ----- +builtins/common.h + - SET_VFLAGS: take a set of word flags, and set flags for use with + valid_array_reference (vflags) and assign_array_element/bind_int_variable + (bindflags) based on those flags and the setting of assoc_expand_once + (moved from read.def and generalized) + +arrayfunc.c + - array_variable_name: now exclusively takes AV_xxx flags; understands + how to translate AV_NOEXPAND to the right flag for skipsubscript; + understands AV_ONEWORD and AV_NOEXPAND + - array_variable_part: just passes the FLAGS arg to array_variable_name + - assign_array_element: translates ASS_ flags to AV_ flags for + array_variable_name + - array_value_internal: now just passes flags straight through to + array_variable_part (which sends them to array_variable_name) + +builtins/common.[ch] + - builtin_bind_var_to_int: now takes a new FLAGS third argument; passes + it to bind_var_to_int + +builtins/printf.def + - printf_builtin: use SET_VFLAGS to set flags for builtin_bind_variable + (bindflags); makes things like + declare -A A; key=']' ; printf -v A[$key] "foo" + work without a subscript error as long as assoc_expand_once is defined + +builtins/read.def + - read_builtin: use new common version of SET_VFLAGS instead of + private version; changed to use new calling sequence; makes things like + declare -A A; key=']' ; read A[$key] <<<"foo" + work without a subscript error as long as assoc_expand_once is defined + +builtins/wait.def + - wait_builtin: use SET_VFLAGS for variable name with -p option + - wait_builtin: call builtin_bind_var_to_int with new bindflags third + argument + +expr.c + - expr_streval: just pass TFLAG (AV_xxx flags) straight through to + array_variable_part + +variables.c + - bind_int_variable: translate the assignment flags (ASS_xxx) to + VA_xxx flags for valid_array_reference calls (ASS_ONEWORD); translate + assignment flags to AV_xxx flags for array_variable_part + + 12/30 + ----- +subst.c + - parameter_brace_expand: when expanding an indirect variable, extend + the special case for array[@] and array[*] (set -u/no positional + parameters, obeying the baroque quoting rules) to the value of the + indirection. Report and fix from konsolebox + + 12/31 + ----- +parse.y + - compound_list: when parsing a compound_list production, collect any + pending here-documents after reading a newline, not after reading + any command terminator. Fixes interactive-only prompting bug + reported back in 8/2021 by Hyunho Cho + + 1/1/2022 + -------- +bashline.c + - set_filename_quote_chars: break code that modifies + rl_filename_quote_characters based on whether DIRNAME needs to be + expanded from bash_directory_completion_hook into its own function + - bash_check_expchar: break code that checks whether DIRNAME will be + word expanded from bash_directory_completion_hook into its own + function + - bashline_reset,attempt_shell_completion: make sure complete_fullquote + is set to 1 (as it is by default) in case a completion modifies it + - bash_quote_filename: if we are completing (but not expanding -- + direxpand is unset) and backslash-quoting a filename with expansion + characters as determined by bash_check_expchar, make sure + filename_bstab is set not to include the expansion char (and any + following char and closer) and set complete_fullquote to 0 so + sh_backslash_quote uses filename_bstab. Fixes the longstanding issue + of quoting a `$', for instance, if the rest of the filename contains + any characters that need quoting in filenames. This assumes that the + filename is unquoted (*QCP == 0) so the word will be expanded and is + not part of the filename (if needed, we can use file_exists to check + whether the expansion characters are actually part of the filename) + + 1/7 + --- +examples/loadables/accept.c + - new -b bindaddr option to bind to a specific IP address + - move setsockopt calls before bind() to avoid TIME_WAIT issues. Fixes + from Dzogovic Vehbo + + 1/10 + ---- +configure.ac + - bumped version to 5.2-alpha. + + 1/16 + ---- + +tests/{unicode1,glob2,intl2}.sub, tests/run-intl + - minor changes to add warnings for missing locales that cause test + failures + + 1/17 + ---- +parse.y + - history_delimiting_chars: if we have a blank line by the time we + hit the end of the tests, return a semicolon for the first blank + line to avoid running lines of a multi-line command together. + Fixes bug reported by Joakim Lindblad + +subst.c + - expand_string_for_patsub: expand the replacement string for pattern + substitution assuming that it will eventually be passed to + strcreplace to replace `&' with the matched portion of the string. + This calls expand_string_for_pat(), which leaves the string quoted + and does not perform word splitting, then calls + quote_string_for_repl to post-process the expanded string. + - quote_string_for_repl: perform quote removal on passed string while + replacing CTLESC escaping a `&' or a backslash with a backslash. The + result must be passed to strcreplace + - parameter_brace_patsub: call expand_string_for_patsub if + patsub_replacement is set to quote + + 1/18 + ---- +subst.c + - read_comsub: make istring_index a size_t to avoid overflow with very + large values of istring_size. + From https://savannah.gnu.org/support/index.php?110596 + - expand_word_internal: make istring_index a size_t + + 1/20 + ---- +buitins/cd.def + - add a description of `cd -' to the help text. Suggested by + Rob Landley + + 1/21 + ---- +lib/glob/glob.c + - glob_vector: if we allocate NEXTLINK using malloc, and free it due to + some allocation failure, reset FIRSTMALLOC to avoid duplicate frees + later on + +subst.[ch] + - sub_append_string: the INDX parameter is now a size_t to avoid + overflow + +parse.y + - decode_prompt_string: RESULT_INDEX is now a size_t to pass to + sub_append_string + +jobs.[ch],nojobs.c + - wait_for_background_pids: now returns the number of jobs/processes + reaped + +builtins/wait.def + - wait_builtin: if -p pid supplied without -n, make sure we do something + useful if no job/pid arguments are supplied and there are no jobs. + Reported by Oguz + +builtins/read.def + - read_builtin: if we have a timeout, use SIGALRM instead of select + when in posix mode, since we use read instead of zread. Fixes bug + reported by Andreas Schwab + +subst.c + - expand_string_dollar_quote: handle single-quoted and double-quoted + strings that might include $' and $" without attempting translation; + do more error checking for unterminated $' and $" that leaves those + characters unmodified. This is for use by readline's various line + expansion functions (shell_expand_line) + + 1/23 + ---- +parse.y,make_cmd.c + - revert change that unconditionally processes $'...' and $"..." in + here-document bodies; there are only a couple of cases where they + should be processed in a double-quote environment + + 1/24 + ---- + +subst.c + - extract_dollar_brace_string: if we see another `${' on the rhs of + the operator, reset the dolbrace_state to DOLBRACE_PARAM while we + read this new ${...} string + - extract_heredoc_dolbrace_string: new function, variant of + extract_dollar_brace_string, to process the WORD in ${PARAM OP WORD} + while expanding lines of here-document data. It's complicated by the + requirement to add to the result string as we go along, since we + need to change the contents of the input string with ansi expansion + or locale translation. + - string_extract_single_quoted: take a new third argument: ALLOWESC. + This allows backslash to escape an embedded single quote, needed by + extract_heredoc_dolbrace_string to process $'...'; changed callers + + 1/25 + ---- +parse.y + - parse_matched_pair: ansi-expand $'...' in WORD for ${PARAM OP WORD} + and single-quote the result if dolbrace_state == DOLBRACE_QUOTE + (posix pattern removal operators) even if extended_quote == 0 + +subst.c + - extract_heredoc_dolbrace_string: add logic to align with parse.y: + parse_matched_pair and its $'...' expansion, including handling + extended_quote + + 1/27 + ---- +builtins/evalstring.c + - should_optimize_fork: broke conditions for optimizing away the fork + for a simple command out of optimize_fork into new function, call + from should_suppress_fork and optimize_subshell_command. Call from + optimize_fork if (subshell_environment & SUBSHELL_PAREN), relying + on fact that CMD_TRY_OPTIMIZING is only set in a couple of specific + conditions + - optimize_fork: call should_suppress_fork only if startup_state == 2; + it does the extra checks for that specific case + - optimize_fork: call should_optimize_fork if we're in a (list) + subshell (subshell_environment & SUBSHELL_PAREN) + - optimize_subshell_command: set CMD_TRY_OPTIMIZING on the right side + of a `&&', `||', or `;' list as long as it's a simple command so + we can check with optimize_fork() when it's time to execute it + +execute_cmd.c + - execute_in_subshell: call optimize_subshell_command for (list) + subshells to either set CMD_NO_FORK for simple commands or set + CMD_TRY_OPTIMIZING for likely candidates for later optimization + +builtins/common.h,builtins/evalstring.c + - optimize_fork: renamed to optimize_connection_fork; changed callers + + 1/31 + ---- +include/shmbutil.h + - COPY_CHAR_I,SCOPY_CHAR_I: add check for locale_utf8locale and + (c & 0x80) as in other macros + +lib/sh/shquote.c + - sh_backslash_quote_for_double_quotes: rewrote to use array indexing + and COPY_CHAR_I to make it easier to drop in future calls to + charvis() to make `unsafe' characters visible if FLAGS == 1 + + 2/1 + --- +parse.y + - parse_comsub: if we are currently expanding aliases, temporarily + turn off alias expansion if we are not in posix mode so we defer + alias expansion until command_substitute(). Fixes double-expansion + bug reported by Martijn Dekker and aligns with + https://www.austingroupbugs.net/view.php?id=1342 + - xparse_dolparen: turn off alias expansion entirely while running the + parser: either we do it in parse_comsub (posix mode) or in + command_substitute (default mode) + - parse_string_to_command: ditto + +subst.c + - command_substitute: if we are expanding aliases, temporarily turn + off alias expansion if we are in posix mode, since we already + performed it in parse_comsub() and are using the command string + reconstituted from the parse result + +doc/bashref.texi + - bash posix mode: add description of alias expansion and command + substitution parsing and execution + + 2/4 + --- +lib/readline/rltty.c + - rl_deprep_terminal: set _rl_last_c_pos to 0 after outputting + BRACK_PASTE_FINI, since the last character in that is \r. Partially + address issue raised by Markus Schwarzenberg + in https://lists.gnu.org/archive/html/bug-bash/2022-02/msg00056.html + + 2/5 + --- +doc/{bash.1,bashref.texi} + - minor typo fixes from Helge Kreutzmann + + 2/7 + --- +{arrayfunc,variables}.c + - ARRAY_EXPORT: changes to encode array and assoc variables using a + scheme similar to shell functions so we can export arrays and + differentiate them from scalar variables and differentiate array + and assoc variables. Still not enabled by default. + +variables.c + - mk_env_string: third argument is now the variable's attributes or 0, + with all the attributes we can export arrays + +lib/readline/bind.c + - active-region-start-color,active-region-end-color: new bindable + string variables, one to set the active region color (instead of + standout mode) and one to turn it off (instead of the "se" terminal + capability). They set _rl_active_region_start_color and + _rl_active_region_end_color variables via functions + +lib/readline/display.c + - putc_face: if setting standout mode, check for both the start color + and end color variables and output the start color string. If turning + off standout mode (normal face), output the end color string. Both + variables must be set + +lib/readline/{readline.c,rlprivate.h} + - declarations for _rl_active_region_start_color and + _rl_active_region_end_color + + 2/8 + --- +bashline.c + - initialize_readline: add bindable name `vi-edit-and-execute-command' + +shell.c + - subshell_exit: make sure to set last_command_exit_value before + calling the exit trap. Fixes bug reported by Greg Edwards + + + 2/9 + --- +lib/readline/{terminal.c,rlprivate.h} + - _rl_region_color_on,_rl_region_color_off: functions to output the + _rl_active_region_start_color and _rl_active_region_end_color + - _rl_reset_region_color: function to encapsulate setting the region + color to an arbitrary string, including doing memory management + +lib/readline/display.c + - putc_face: call _rl_region_color_on and _rl_region_color_off instead + of _rl_standout_on and _rl_standout_off + +lib/readline/terminal.c + - _rl_init_terminal_io: initialize _rl_active_region_start_color and + _rl_active_region_end_color from _rl_term_so and _rl_term_se, + respectively; reset every time the terminal is changed + - _rl_init_terminal_io: turn off the active region for a dumb terminal + +lib/readline/bind.c + - sv_region_{start,end}_color: call _rl_reset_region_color with the + appropriate value for WHICH + + 2/10 + ---- +lib/readline/doc/{rluser.texi,readline.3},doc/bash.1 + - active-region-start-color,active-region-end-color: documented new + bindable readline variables + - enable-active-region: document using active-region-start-color to + highlight the text in the region + + 2/11 + ---- +parse.y + - read_token,read_token_word: make sure characters read by shell_getc + are protected by appropriate calls to MBTEST when testing for shell + metacharacters and operators + + 2/14 + ---- +builtins/shopt.def + - set_compatibility_level: if the current compatibility level is outside + the range of the compatNN options, just leave it alone when + unsetting one of the options (which by definition was already + unset). Fixes issue reported by Mihai Moldovan + + 2/16 + ---- +lib/readline/search.c + - rl_history_search_{pos,len,flags}: rename to have a leading `_' + - _rl_history_search_pos: no longer static so other parts of readline + can see it + +lib/readline/rlprivate.h + - _rl_history_search_pos: extern declaration + +lib/readline/readline.c + - readline_internal_teardown: don't run the undo list against the + current history entry if the non-incremental search functions have + set _rl_history_search_pos to it, since it doesn't reflect the + current contents of the line buffer. Fixes issue reported by + Andreas Schwab + +lib/readline/misc.c + - _rl_start_using_history: initialize _rl_history_search_pos to + something invalid so it doesn't match where_history() + + 2/17 + ---- +lib/readline/callback.c + - rl_callback_read_char: make sure _rl_eof_found is set to the value + of eof before calling the deprep terminal function, so it can do + different things based on whether the input code read EOF (or the + user entered the EOF character). From a gdb discussion started by + Andrew Burgess (still more to do, since this + is not part of the public API) + + 2/18 + ---- +lib/readline/readline.h + - RL_STATE_EOF: new readline state value; set when readline reads an + EOF character on an empty line or a read returns an error + - rl_eof_found: new public variable + +lib/readline/rprivate.h + - _rl_eof_found: renamed to rl_eof_found, so not declared here + +lib/readline/{callback,readline}.c + - RL_STATE_EOF: set appropriately when readline gets an EOF. Suggested + by Andrew Burgess + - RL_STATE_EOF: make sure it's not set when readline starts + - rl_eof_found: set appropriately when readline gets an EOF + +lib/readline/{callback,readline,rltty}.c + - rl_eof_found: new name for _rl_eof_found + +lib/readline/doc/rltech.texi + - RL_STATE_EOF: document + + 2/19 + ---- +parse.y + - parse_comsub: turn off parser state flags we don't want to inherit + into this call to the parser (PST_REGEXP, PST_EXTPAT, PST_CONDCMD, + PST_CONDEXPR for now). Fixes bug reported by konsolebox + + + 2/23 + ---- +findcmd.c,builtins/hash.def + - replace calls to is_directory with file_isdir, which only performs a + stat and doesn't do the eaccess call to check for an executable file + +findcmd.c + - find_in_path_element: takes a new RFLAGSP argument, an int * where + the status flags for the returned pathname are returned; saves + additional calls to stat/eaccess + - search_for_command: get the returned flags from + find_user_command_in_path so we don't need any additional calls to + file_status after we find the command in $PATH + + 2/24 + ---- +doc/{bash.1,bashref.texi} + - FUNCTIONS: some small changes to the description of local variables + and dynamic scoping, with emphasis on how that affects `unset' + behavior. Inspired by a discussion with + Christoph Anton Mitterer + + 2/25 + ---- +examples/loadables/realpath.c + - renamed -s option to -q to align with other versions + - perform array assignment for `-a varname' even if -q option supplied + - renamed -S option to -s for Linux compatibility + + 2/28 + ---- +lib/readline/misc.c + - _rl_free_saved_history_line: call rl_free_undo_list, saving and + setting rl_undo_list to the saved history line's data, so the right + call to _hs_replace_history_data happens and we don't end up with + a pointer aliasing problem. Fixes core dump reported by + Andreas Schwab , but does not make his + scenario equivalent to incremental search + + 3/1 + --- +lib/readline/search.c + - make_history_line_current: save the current line before replacing it + with the found history entry using rl_maybe_save_line + - noninc_dosearch: we don't want the saved history line, so free it + after calling make_history_line_current + - _rl_history_search_internal: call rl_maybe_replace_line after making + changes to the line buffer with make_history_line_current so we can + save the undo list we constructed before we set the history position + + 3/2 + --- +lib/readline/display.c + - expand_prompt: add missing piece to patch from 10/26/2021: if we are + recalculating the number of invisible characters on the first line + of the prompt, we need to update INVFL, even if we already set it + when we hit the number of physical characters. This ends up being + assigned to prompt_invis_chars_first_line, and is used in several + subsequent calculations. Reported by + Andreas Schwab + +lib/readline/doc/{readline.3,rluser.texi},doc/bash.1 + - enable-bracketed-paste: add some language making it clearer that + bracketed paste prevents the pasted text from being interpreted as + editing commands. Suggested by Karl O. Pinc + + 3/4 + --- +make_cmd.c + - make_here_document: perform quote removal on the here-doc delimiter + only if it's marked as quoted, which prevents quotes from inside a + command substitution from being removed (they're supposed to begin a + new quoting context) when the word itself isn't flagged as quoted + (which means the body of the here-document gets expanded). You can't + perform quote removal *and* expand the here-document lines. From an + austin-group discussion back in early February + +lib/sh/strvis.c + - charvis -> sh_charvis; change caller + - sh_charvis: now take an additional SLEN argument to avoid having to + compute the string length every time; change callers + - sh_charvis: add a utf-8 locale-specific check before calling + COPY_CHAR_I (in practice, doesn't make any real difference) + + 3/10 + ---- +arrayfunc.c + - convert_var_to_array: if we're being asked to create an associative + array (flags & 2), and we have an existing variable that is not an + assoc array (and not an existing indexed array), call + convert_var_to_assoc to make it one + + 3/11 + ---- +jobs.c + - wait_for: don't call get_tty_state() if readline is dispatching + (RL_STATE_DISPATCHING) with the terminal settings changed + (RL_STATE_TERMPREPPED), the same way we don't if we are running a + command for programmable completion. Fixes bug with SIGINT reverting + to the saved readline terminal settings reported by + Markus Napierkowski + +parse.y + - decode_prompt_string: make sure the expansion of \w, \W, and \s + are all run through sh_strvis before calling + sh_backslash_quote_for_double_quotes or just through sh_strvis if + we're not running the prompt string through word expansions. + Fixes issue reported by Josh Harcome back + in mid-January + + 3/16 + ---- +bashline.c + - bash_quote_filename: if we have a word to complete that contains + characters that introduce a word expansion, make sure the passed + string does *not* exist as a filename before removing those + characters from the set that must be backslash-quoted. See change + from 1/1/2022 + + 3/18 + ---- +lib/readline/search.c + - make_history_line_current: don't free rl_undo_list or + _rl_saved_line_for_history; don't unconditionally save the history + line. This reverts some of the changes to support setting the + history position in history-search-backward + - rl_history_search_internal: only free the saved history line if we + were the ones who created it + + 3/21 + ---- +lib/readline/nls.c + - xmalloc.h: include for systems without setlocale(), so xfree has a + prototype. Report and fix from András Kucsma + +lib/readline/search.c + - _rl_history_search_internal: use previous-history/next-history to + move to the found history line instead of directly calling + history_set_pos. This makes the behavior more similar to incremental + search + - rl_history_search_internal: make sure to set rl_undo_list to the + current history undo list around the calls to rl_get_previous_history + or rl_get_next_history, in order to fool the call to + maybe_replace_line they make + +lib/readline/readline.c + - _rl_executing_func: the currently-executing readline command function + +lib/readline/rlprivate.h + - _rl_executing_func: extern declaration + +lib/readline/search.c + - _rl_history_search_internal: removed (commented out) code that sets + the current history entry to the found history entry, too much + assumes that the current undo list should be applied to the current + history entry (where_history()) + + 3/23 + ---- +subst.c + - parameter_brace_expand_word: if we have double-quoted ${*} or ${@}, + make sure we are setting W_HASQUOTEDNULL in the flags we return to + the caller if we are returning QUOTED_NULL(word) + - parameter_brace_expand_word: if we have a double-quoted associative + array reference using `*' or `@', make sure we are setting + W_HASQUOTEDNULL in the flags we return to the caller if we are + returning QUOTED_NULL(word) + - parameter_brace_expand: if we're using the `[:]+' word expansion + operator, we need to note a quoted null string and pass the + W_QUOTEDNULL flag back to the caller + - expand_word_internal: make sure to return a QUOTED_NULL + (word[0] == CTLNUL) back to the caller if HAD_QUOTED_NULL is set, + regardless of whether or not we see a quoted dollar at. Fix for bug + reported by Andreas Luik + +arrayfunc.c + - array_value_internal: fix typo and set estatep->type to ARRAY_INDEXED + for indexed arrays + + 3/31 + ---- +lib/readline/{history.c,histlib.h} + - _hs_at_end_of_history: convenience function to tell whether or not + the current history position is at the end of the history list + + 4/1 + --- +lib/readline/search.c + - make_history_line_current: don't free rl_undo_list if it is equal to + _rl_saved_line_for_history->data, since we will need to restore it + later if we got it from a history entry. Fixes issue dating back to + 7/2021 and changes to _rl_free_saved_line_for_history, current issue + reported by Andreas Schwab + + 4/5 + --- +lib/readline/{complete,histfile,histsearch,isearch,terminal}.c + - xfree: use instead of free + + 4/7 + --- +configure.ac + - bumped version to bash-5.2-beta + +[bash-5.2-beta frozen] + + 4/8 + --- +lib/readline/input.c + - _rl_orig_sigset: need extern declaration if HAVE_SELECT is defined. + From https://savannah.gnu.org/support/?110634 + +examples/loadables/seq.c + - PRIdMAX: redefine if PRI_MACROS_BROKEN is defined. + From https://savannah.gnu.org/support/index.php?110635 + + 4/11 + ---- +configure.ac + - BASH_FUNC_STRTOIMAX: replace strtoimax if the system doesn't provide + a declaration in a standard header file. Uses new m4/strtoimax.m4. + From https://savannah.gnu.org/support/index.php?110633 + +builtins/printf.def + - getdouble: new function, parses string into `double' using strtod + - printf_builtin: check for the `L' length modifier and use long + doubles for the floating point conversion specifiers. If it's not + supplied, use `double' when in posix mode (as posix specifies) and + long double (if it's available, double if not) in default mode. + From a report from Paul Eggert + + 4/12 + ---- +lib/sh/oslib.c + - bzero: update function signature to modern BSD version + + 4/14 + ---- +lib/sh/oslib.c + - bcopy, gethostname, mkfifo: update function signatures to modern + versions + + 4/15 + ---- +jobs.c,nojobs.c + - wait_for_single_pid: if the pid or job argument is invalid -- isn't + a child of this shell -- return 257, which is out of the range of + valid 8-bit status values + +execute_cmd.c + - execute_pipeline: if wait_for_single_pid returns > 256, set it to + 127 (invalid process) + +jobs.c + - wait_for_background_pids: if wait_for_single_pid returns > 256, set + the status we return in PS to 127 (what it was before) + +builtins/wait.def + - wait_builtin: if wait_for_single_pid returns > 256, treat it as an + error and set pstat.pid to NO_PID + - wait_builtin: if -p supplied, and we get to the end of the argument + list with PSTAT.PID != NO_PID (which we assume means that the return + value is set from PSTAT.STATUS), set the variable name to PSTAT.PID. + From a report by Robert Elz + - wait_builtin: for compatibility with the netbsd sh, leave the variable + name specified with `-p' unset if there are no PID arguments. + From a report by Robert Elz + + 4/17 + ---- +parse.y + - xparse_dolparen: if (flags & SX_NOLONGJMP), don't call + jump_to_top_level() on errors + +bashline.c + - bash_quote_filename: don't call quote_word_break_chars() unless we + have word break chars initialized. Fixes bug reported by + Sam James + + 4/18 + ---- +pcomplete.c + - gen_globpat_matches: call glob_filename with the GX_GLOBSTAR flag if + the `globstar' shell option is enabled. From a report by + Steve + +lib/malloc/malloc.c + - internal_free: remove the GLIBC21 code (!) + - internal_free: make the code that tests against memtop and calls + lesscore depend on USE_LESSCORE being defined, which it is by + default + +lib/malloc/imalloc.h + - USE_LESSCORE: define + +parse.y,shell.h + - token_buffer_size and its corresponding saved value in the shell's + parser state are now size_t instead of int + +stringlib.c + - strsub,strcreplace: use size_t instead of int for local length and + indexing variables + +lib/sh/zmapfd.c + - zmapfd: use size_t instead of int for local length and indexing + variables + +lib/sh/zgetline.c + - zgetline: use size_t instead of int for local length and indexing + variables + + 4/20 + ---- +pcomplete.c + - init_itemlist_from_varlist: free VLIST after assigning it from + *SVFUNC and after we get the variable names and values out of it. + Report from Robert E. Griffith + + 4/25 + ---- +redir.c + - here_document_to_fd: if the shell compatibility level is bash-5.0 or + earlier, use tempfiles for all here-documents and here-strings. From + a bug-bash discussion started by Sam Liddicott + + 4/26 + ---- +parse.y + - parse_comsub: non-interactive shells exit on a syntax error while + parsing the command substitution + - parse_comsub: unset additional PARSER_STATE flags before calling + yyparse(). Inspired by https://bugs.gentoo.org/837203; unsetting + PST_COMPASSIGN is the fix for that bug + - parse_string_to_word_list: use save_parser_state/restore_parser_state + instead of saving pieces of the shell state in individual variables + - parse_compound_assignment: use save_parser_state/restore_parser_state + instead of saving pieces of the shell state in individual variables + - parse_compound_assignment: unset additional PARSER_STATE flags before + calling read_token(); set esacs_needed_count and expecting_in_token + to 0 like in parse_comsub() since read_token can use them + + 4/27 + ---- +lib/sh/strvis.c + - sh_charvis: changes to handle being compiled without multibyte support + + 4/29 + ---- +lib/readline/callback.c + - rl_callback_read_char: don't set rl_eof_found unless eof is > 0, + since it can be -3 if we need to read more input in a multi-key + sequence. Report from Andrew Burgess + +examples/loadables/Makefile.sample.in + - new file, containing the rules to build the example shared object + - includes Makefile.inc from wherever it's installed. Suggested by + Robert E. Griffith + +examples/loadables/Makefile.inc.in + - remove rules that create the example shared object + + 4/30 + ---- +builtins/evalstring.c + - parse_and_execute: check for terminating signals before returning, + after any longjmp, to improve responsiveness and fix the -c code + path before running any exit trap. Report from + Emanuele Torre + + 5/17 + ---- +builtins/suspend.def + - suspend_builtin: the -f option now forces a suspend even if job + control is not enabled. Inspired by a discussion with + Robert Elz + +doc/{bash.1,bashref.texi} + - suspend: updated description to include expanded -f behavior + + 5/25 + ---- +builtins/mkbuiltins.c + - -includefile: new argument, specifies extern filename to insert + into the #include statement in the structfile (builtins.c) and + the filename in the comment in the extern file (builtext.h). + From Alexander Kanavin via + https://savannah.gnu.org/patch/?10210 + +builtins/Makefile.in + - builtins.c: change call to mkbuiltins to add -includefile option + - builtins.c: change recipe to run all the commands in the same shell + invocation + - builtins.c: change recipe to specify new filenames in the call to + mkbuiltins and move them onto builtins.c/builtext.h if the new ones + are different; make the new filenames use the current make recipe + shell pid in the filename ($$RECPID). + Inspired by Alexander Kanavin via + https://savannah.gnu.org/patch/?10210 + + 6/2 + --- +builtins/common.c + - builtin_find_indexed_array: new function, factored common code out + of mapfile and read builtins to find an in-scope indexed array or + create one + +builtins/common.h + - builtin_find_indexed_array: extern declaration + +builtins/{mapfile,read}.def + - change callers to use builtin_find_indexed_array + +variables.c + - unbind_global_variable, unbind_global_variable_noref: new functions + that remove variables from the global_variables table + +lib/sh/shmatch.c + - sh_regmatch: use unbind_global_variable_noref to make sure we act on + the copy of BASH_REMATCH in the global scope all the time, ignoring + any local variables that might exist. Tentative fix for memory leak + report from Emanuele Torre + +doc/{bash.1,bashref.texi} + - BASH_REMATCH: add caveat about making it a local variable + + 6/6 + --- +print_cmd.c + - print_redirection: if the redirectee for r_duplicating_output_word + (r_duplicating_input_word) is 1 (0), don't print it; only print a + non-default file descriptor number + - print_redirection_list: remove the code that tries to temporarily + translate a >&word redirection to >&word now that we won't print a + non-default file descriptor number. Fixes issue with `declare -f' and + function export reported by Namikaze Minato + + 6/13 + ---- +configure.ac + - bumped version to bash-5.2-rc1 + +[bash-5.2-rc1 released] + + 6/15 + ---- +parse.y + - parse_string_to_word_list: save the parser state before any state- + changing functions like bash_history_disable(). Reported by + Clark Wang + + 6/16 + ---- +doc/bash.1 + - play tricks with the value of the zZ number register to refer to + `bash(1)' instead of `above' or `below' when creating the builtins + man page + + 6/17 + ---- +doc/{bash.1,bashref.texi} + - wait: note that wait will return > 128 if interrupted by a signal. + Reported by AA + +execute_cmd.c + - {execute_cond_node,execute_arith_command,eval_arith_for_expr}: make + sure to reset this_command_name after running any DEBUG trap so the + DEBUG trap doesn't overwrite it. + Reported by Emanuele Torre . + - execute_select_command: set this_command_name to NULL after running + any DEBUG trap like execute_for_command does + + 6/23 + ---- +test.c + - three_arguments: when given [ ! ! arg ], make sure to advance POS + after calling two_arguments to avoid a `too many arguments' error. + Report from Steffen Nurpmeso + + 6/27 + ---- +subst.c + - expand_word_internal: when expanding backquoted command substitution, + call string_extract with the SX_REQMATCH flag (closing backquote + required) only if the word flags don't contain W_COMPLETE, + indicating that we're doing this for completion, probably to + determine whether or not to append something to the word. Fixes bug + reported by Emanuele Torre . + + 7/5 + --- +execute_cmd.c + - execute_connection: treat a connector of '\n' the same as ';' + +print_cmd.c + - print_comsub: new function, sets flag noting we are printing a + command substitution and calls make_command_string + - make_command_string_internal: add '\n' to the ';' case; print command + list with newline connector appropriately + +parse.y + - parse_comsub: call print_comsub instead of make_command_string + - list1 production (part of compound_list): if a list is separated by + newlines, and the parser is parsing a command substitution, make + the connection command with a '\n' connector. Makes the text + output of parse_comsub closer to the original source text. From a + report from Martijn Dekker + + 7/6 + --- +doc/bash.1,lib/readline/doc/rluser.texi + - complete: add note about arguments passed to command specified by + `complete -C'; suggested by Mark Chandler + +builtins/setattr.def + - show_local_var_attributes: special-case `local -', since there is + no `declare -' equivalent. + Reported by Emanuele Torre . + - show_all_var_attributes: use `local -' when printing a variable named + `-' at the current non-zero variable context + +parse.y + - shell_getc: if we are at the end of an alias, returning a space, + make sure we mark the previous character as single-byte by modifying + shell_input_line_property so the space we return is properly + recognized. This would fail before if the last character of the + alias was a multi-byte character. Reported by + Vangelis Natsios + + 7/12 + ---- +lib/readline/isearch.c + - rl_display_search: don't call rl_redisplay_function before returning; + rl_message already calls it. Reported by + Frédéric Moulins + +configure.ac + - bumped version to bash-5.2-rc2 + + 7/18 + ---- +jobs.c + - set_job_control: don't bother calling tcgetpgrp if shell_tty < 0, + since it will just fail + +variables.c + - reset_local_contexts: new function, delete all context tables + associated with shell functions and set variable_context to 0. + Called when we want to stop executing in a shell function without + going through the pop_context chain with its side effects + +variables.h + - reset_local_contexts: extern declaration + +builtins/evalstring.c + - parse_and_execute: call reset_local_contexts instead of setting + variable_context to 0 + +eval.c + - reader_loop: call reset_local_contexts in cases where the shell has + longjmped for a fatal error and errexit is enabled (ERREXIT), but + not for other cases, and especially not for the exit builtin, + instead of just setting variable_context to 0. Fixes issue originally + reported by Robert Stoll + +subst.c + - pat_subst: implement sed-like behavior when presented with a null + pattern that's anchored at the start or end of the string, or when + presented with a null string: process the replacement string for `&' + and `\&' and substitute in the result as before. Patch from + Koichi Murase + + 7/20 + ---- + +[bash-5.2-rc2 frozen] + + 7/27 + ---- +parse.y + - reset_parser: set need_here_doc, esacs_needed_count, expecting_in_token + all to 0, since jumping back to a top-level parse needs that + - parse_comsub: make sure to reset expand_aliases and shell_eof_token + if we're not going to exit immediately out of this function + + 7/28 + ---- +parse.y + - parse_comsub: if the compatibility level is <= 51, set extglob while + parsing the command substitution, so bad pattern errors can still be + caught but valid patterns are let through and can be evaluated at + runtime, when extglob may have been set. If it isn't set, it will + still be a parser error when the command substitution is executed. + Fixes report from Sam James about gentoo scripts. + - reset_parser: set extended_glob from global_extglob if the parser + state includes PST_CMDSUBST + - xparse_dolparen: set global_extglob but don't modify extended_glob, + so parse errors can be caught before forking a child for command + substitution, as part of word expansion, but after extglob may have + been set by command execution (e.g., in a shell function) + + 8/5 + --- +[bump version to bash-5.2-rc3] + + 8/6 + --- +trap.c + - run_pending_traps: move code from evalstring() so we call + parse_and_execute() directly and handle any `return' invocations so + we can restore the value of running_trap. Otherwise, if we longjmp + past this function, we will think we're running a trap after we + finish. Prompted by post from Koichi Murase + + 8/9 + --- + +lib/readline/nls.c + - _rl_current_locale: private variable, stores the value of the + LC_CTYPE locale category, as determined by _rl_init_locale; set + to allocated memory in _rl_init_locale() + - _rl_set_localevars: new function, code from _rl_init_eightbit that + checks the current locale (passed as an argument) and sets the + various locale-aware variables based on it. It accepts a second + argument: FORCE. If non-zero, it means to restore the default "C" + locale values if the locale is "C" or "POSIX", now that this + function can be called multiple times + - _rl_init_eightbit: now just calls _rl_init_locale and + _rl_set_localevars + - _rl_reset_locale: new function, checks whether our the locale has + changed since we last called _rl_init_locale to set our internal + idea of its value. If it has changed, call _rl_set_localevars with + the new locale and a FORCE argument of 1 to change the + locale-dependent variables. + +lib/readline/rlprivate.h + - _rl_reset_locale: extern declaration + +lib/readline/readline.c + - rl_initialize: call _rl_reset_locale instead of _rl_init_locale so + the internal readline variables get set when we move from a non- + multibyte locale ("C") to a multibyte one ("en_US.UTF-8"). Report + from Alan Coopersmith + + 8/16 + ---- +lib/sh/setlinebuf.c + - sh_setlinebuf: allocate buffers for line-buffering stdout and stderr + only once, the first time it is requested. Only allocate memory if + we're using setvbuf (we usually are). Double the buffer size to 2016 + if we're using the bash malloc. Otherwise, let stdio handle it. + + 8/17 + ---- +builtins/exec.def + - exec_builtin: make sure to initialize orig_job_control in case the + command is not found by search_for_command. Report and fix from + Xiami + +[bash-5.2-rc3 frozen] + + 8/27 + ---- +parse.y + - parse_comsub: restore extended_glob to a local copy (local_extglob) + only if we changed it; a safer way to do it. Fixes extglob change + issue reported by Kerin Millar + - cond_term: restore extended_glob to a local copy; safer than using + global_extglob, which we will reserve for error recovery + + 8/30 + ---- +parse.y + - parse_comsub: don't clear the pushed string list; we might need it to + consume additional input to satisfy this command substitution. When + we restore the parser state, don't restore the pushed string list in + case we used it. From + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018727 + - parse_comsub: don't modify extended_glob if parser_state includes + PST_EXTPAT, in which case we've already set extended_glob and + global_extglob appropriately. Only matters in compatibility mode. + + 8/31 + ---- +subst.c + - parameter_brace_transform: make sure we return an error if *xform + is '\0'. Report from Ivan Kapranov + + 9/7 + --- +[bump version to bash-5.2-rc4] + + 9/8 + --- +[bash-5.2-rc4 frozen] + + 9/20 + ---- +lib/readline/history.c + - replace_history_entry: check for a NULL timestamp before trying to + copy it. Report from nov.ondrej@gmail.com + + 9/23 + ---- +[bash-5.2 frozen] diff --git a/INSTALL b/INSTALL index b6293fc..2033143 100644 --- a/INSTALL +++ b/INSTALL @@ -5,70 +5,92 @@ 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. + 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 + 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 + 2. Type 'make' to compile Bash and build the 'bashbug' bug reporting script. - 3. Optionally, type `make tests' to run the Bash test suite. + 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. + 4. Type 'make install' to install 'bash' and 'bashbug'. This will + also install the manual pages and Info file, message translation + files, some supplemental documentation, a number of example + loadable builtin commands, and a set of header files for developing + loadable builtins. You may need additional privileges to install + 'bash' to your desired destination, so 'sudo make install' might be + required. More information about controlling the locations where + 'bash' and other files are installed is below (*note Installation + Names::). -The `configure' shell script attempts to guess correct values for +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' +those values to create a 'Makefile' in each directory of the package +(the top directory, the 'builtins', 'doc', 'po', 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 + bash-4.2$ ./configure --help at the Bash prompt in your Bash source directory. +If you want to build Bash in a directory separate from the source +directory - to build for multiple architectures, for example - just use +the full path to the configure script. The following commands will +build bash in a directory under '/usr/local/build' from the source code +in '/usr/local/src/bash-4.4': + + mkdir /usr/local/build/bash-4.4 + cd /usr/local/build/bash-4.4 + bash /usr/local/src/bash-4.4/configure + make + +See *note Compiling For Multiple Architectures:: for more information +about building in a directory separate from the source. + 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 +out how 'configure' could check whether or not to do them, and mail diffs or instructions to 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. +The file 'configure.ac' is used to create 'configure' by a program +called Autoconf. You only need 'configure.ac' 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.69 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'. +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' +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: +On systems that have the 'env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure @@ -79,332 +101,395 @@ 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. +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 (*note Basic Installation::). 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 support 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': +'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 +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. +By default, 'make install' will install into '/usr/local/bin', +'/usr/local/man', etc.; that is, the "installation prefix" defaults to +'/usr/local'. You can specify an installation prefix other than +'/usr/local' by giving 'configure' the option '--prefix=PATH', or by +specifying a value for the 'prefix' 'make' variable when running 'make +install' (e.g., 'make install prefix=PATH'). The 'prefix' variable +provides a default for 'exec_prefix' and other variables used when +installing bash. + +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. + +If you would like to change the installation locations for a single run, +you can specify these variables as arguments to 'make': 'make install +exec_prefix=/' will install 'bash' and 'bashbug' into '/bin' instead of +the default '/usr/local/bin'. + +If you want to see the files bash will install and where it will install +them without changing anything on your system, specify the variable +'DESTDIR' as an argument to 'make'. Its value should be the absolute +directory path you'd like to use as the root of your sample installation +tree. For example, + + mkdir /fs1/bash-install + make install DESTDIR=/fs1/bash-install + +will install 'bash' into '/fs1/bash-install/usr/local/bin/bash', the +documentation into directories within +'/fs1/bash-install/usr/local/share', the example loadable builtins into +'/fs1/bash-install/usr/local/lib/bash', and so on. You can use the +usual 'exec_prefix' and 'prefix' variables to alter the directory paths +beneath the value of 'DESTDIR'. + +The GNU Makefile standards provide a more complete description of these +variables and their effects. 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'). +There may be some features 'configure' can not figure out automatically, +but needs 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. +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. +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. +'configure' recognizes the following options to control how it operates. -`--cache-file=FILE' +'--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'. + './config.cache'. Set FILE to '/dev/null' to disable caching, for + debugging 'configure'. -`--help' - Print a summary of the options to `configure', and exit. +'--help' + Print a summary of the options to 'configure', and exit. -`--quiet' -`--silent' -`-q' +'--quiet' +'--silent' +'-q' Do not print messages saying which checks are being made. -`--srcdir=DIR' +'--srcdir=DIR' Look for the Bash source code in directory DIR. Usually - `configure' can determine that directory automatically. + 'configure' can determine that directory automatically. -`--version' - Print the version of Autoconf used to generate the `configure' +'--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. +'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 +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'. +'--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. +Here is a complete list of the '--enable-' and '--with-' options that +the Bash 'configure' recognizes. -`--with-afs' +'--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 +'--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 + 'configure' disables this option automatically for a number of systems. -`--with-curses' +'--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-gnu-malloc' + A synonym for '--with-bash-malloc'. -`--with-installed-readline[=PREFIX]' +'--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 + 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 + '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'). + 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. +'--with-libintl-prefix[=PREFIX]' + Define this to make Bash link with a locally-installed version of + the libintl library instead of the version in 'lib/intl'. + +'--with-libiconv-prefix[=PREFIX]' + Define this to make Bash look for libiconv in PREFIX instead of the + standard system locations. There is no version included with Bash. -`--enable-minimal-config' +'--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. +There are several '--enable-' options that alter how Bash is compiled, +linked, and installed, rather than changing run-time features. -`--enable-largefile' +'--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. + (http://www.unix.org/version2/whatsnew/lfs20mar.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' +'--enable-profiling' This builds a Bash binary that produces profiling information to be - processed by `gprof' each time it is executed. + processed by 'gprof' each time it is executed. + +'--enable-separate-helpfiles' + Use external files for the documentation displayed by the 'help' + builtin instead of storing the text internally. -`--enable-static-link' - This causes Bash to be linked statically, if `gcc' is being used. +'--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'. +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 +All of the following options except for 'alt-array-implementation', +'disabled-builtins', 'direxpand-default', 'strict-posix-default', 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' +'--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 +'--enable-alt-array-implementation' + This builds bash using an alternate implementation of arrays (*note + Arrays::) that provides faster access at the expense of using more + memory (sometimes many times more, depending on how sparse an array + is). + +'--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' +'--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 +'--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' ). +'--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 +'--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' +'--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' +'--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 +'--enable-cond-command' + Include support for the '[[' conditional command. (*note Conditional Constructs::). -`--enable-cond-regexp' +'--enable-cond-regexp' Include support for matching POSIX regular expressions using the - `=~' binary operator in the `[[' conditional command. (*note + '=~' binary operator in the '[[' conditional command. (*note Conditional Constructs::). -`--enable-coprocesses' - Include support for coprocesses and the `coproc' reserved word +'--enable-coprocesses' + Include support for coprocesses and the 'coproc' reserved word (*note Pipelines::). -`--enable-debugger' +'--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 +'--enable-dev-fd-stat-broken' + If calling 'stat' on /dev/fd/N returns different results than + calling 'fstat' on file descriptor N, supply this option to enable + a workaround. This has implications for conditional commands that + test file attributes. + +'--enable-direxpand-default' + Cause the 'direxpand' shell option (*note The Shopt Builtin::) to + be enabled by default when the shell starts. It is normally + disabled by default. + +'--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 +'--enable-dparen-arithmetic' + Include support for the '((...))' command (*note Conditional Constructs::). -`--enable-extended-glob' +'--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 +'--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 +'--enable-function-import' + Include support for importing function definitions exported by + another instance of the shell from the environment. This option is + enabled by default. + +'--enable-glob-asciirange-default' + Set the default value of the 'globasciiranges' shell option + described above under *note The Shopt Builtin:: to be enabled. + This controls the behavior of character ranges when used in pattern + matching bracket expressions. + +'--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-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-job-control' + This enables the job control features (*note Job Control::), if the + operating system supports them. -`--enable-multibyte' +'--enable-multibyte' This enables support for multibyte characters if the operating system provides the necessary support. -`--enable-net-redirections' +'--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 + '/dev/tcp/HOST/PORT' and '/dev/udp/HOST/PORT' when used in redirections (*note Redirections::). -`--enable-process-substitution' +'--enable-process-substitution' This enables process substitution (*note Process Substitution::) if the operating system provides the necessary support. -`--enable-progcomp' +'--enable-progcomp' Enable the programmable completion facilities (*note Programmable Completion::). If Readline is not enabled, this option has no effect. -`--enable-prompt-string-decoding' +'--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. + characters in the '$PS0', '$PS1', '$PS2', and '$PS4' prompt + strings. See *note Controlling the Prompt::, for a complete list + of prompt string escape sequences. -`--enable-readline' +'--enable-readline' Include support for command-line editing and history with the Bash version of the Readline library (*note Command Line Editing::). -`--enable-restricted' +'--enable-restricted' Include support for a "restricted shell". If this is enabled, - Bash, when called as `rbash', enters a restricted mode. See *note + 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-select' + Include the 'select' compound command, which allows the generation + of simple menus (*note Conditional Constructs::). -`--enable-single-help-strings' - Store the text displayed by the `help' builtin as a single string +'--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. + different languages. You may need to disable this if your compiler + cannot handle very long string literals. -`--enable-strict-posix-default' +'--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. +'--enable-translatable-strings' + Enable support for '$"STRING"' translatable strings (*note Locale + Translation::). + +'--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 index e42d7d7..a45b3cf 100644 --- a/MANIFEST +++ b/MANIFEST @@ -10,17 +10,19 @@ builtins d cross-build d doc d examples d -examples/obashdb d +#examples/obashdb d +examples/bash-completion d examples/complete d examples/functions d examples/scripts d -examples/scripts.v2 d -examples/scripts.noah d +#examples/scripts.v2 d +#examples/scripts.noah d examples/startup-files d -examples/startup-files/apple d +#examples/startup-files/apple d examples/misc d examples/loadables d examples/loadables/perl d +examples/shellmath d include d lib d lib/glob d @@ -33,12 +35,13 @@ lib/readline/examples d lib/sh d lib/termcap d lib/tilde d +m4 d po d support d tests d tests/misc d ABOUT-NLS f -ChangeLog s CWRU/changelog +ChangeLog c CWRU/changelog CHANGES f COMPAT f COPYING f @@ -51,7 +54,7 @@ README f RBASH f AUTHORS f Y2K f -configure.in f +configure.ac f configure f 755 Makefile.in f config-top.h f @@ -59,6 +62,7 @@ config-bot.h f config.h.in f aclocal.m4 f array.c f +array2.c f arrayfunc.c f assoc.c f eval.c f @@ -144,10 +148,11 @@ 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 +# order is important here +y.tab.c F +y.tab.h F +parser-built F builtins/Makefile.in f builtins/alias.def f builtins/bind.def f @@ -169,6 +174,7 @@ builtins/exec.def f builtins/exit.def f builtins/fc.def f builtins/fg_bg.def f +builtins/gen-helpfiles.c f builtins/getopt.c f builtins/getopt.h f builtins/getopts.def f @@ -200,13 +206,14 @@ builtins/umask.def f builtins/wait.def f builtins/psize.c f builtins/psize.sh f -builtins/inlib.def f +#builtins/inlib.def f builtins/bashgetopt.c f builtins/common.h f builtins/bashgetopt.h f -cross-build/cygwin32.cache f +#cross-build/cygwin32.cache f cross-build/x86-beos.cache f cross-build/opennt.cache f +cross-build/qnx.cache f include/ansi_stdlib.h f include/chartypes.h f include/filecntl.h f @@ -220,10 +227,13 @@ include/posixselect.h f include/posixstat.h f include/posixtime.h f include/posixwait.h f +include/shmbchar.h f include/shmbutil.h f include/shtty.h f +include/stat-time.h f include/stdc.h f include/systimes.h f +include/timer.h f include/typemax.h f include/unionwait.h f lib/glob/Makefile.in f @@ -234,6 +244,8 @@ lib/glob/strmatch.h f lib/glob/glob.c f lib/glob/glob.h f lib/glob/glob_loop.c f +lib/glob/gmisc.c f +lib/glob/gm_loop.c f lib/glob/xmbsrtowcs.c f lib/glob/collsyms.h f lib/glob/doc/Makefile f @@ -315,6 +327,7 @@ lib/readline/funmap.c f lib/readline/keymaps.c f lib/readline/util.c f lib/readline/terminal.c f +lib/readline/xfree.c f lib/readline/xmalloc.c f lib/readline/search.c f lib/readline/isearch.c f @@ -335,6 +348,8 @@ lib/readline/mbutil.c f lib/readline/misc.c f lib/readline/nls.c f lib/readline/shell.c f +lib/readline/colors.c f +lib/readline/parse-colors.c f lib/readline/savestring.c f lib/readline/tilde.c f lib/readline/tilde.h f @@ -355,9 +370,12 @@ lib/readline/posixdir.h f lib/readline/posixjmp.h f lib/readline/posixselect.h f lib/readline/posixstat.h f +lib/readline/posixtime.h f lib/readline/ansi_stdlib.h f lib/readline/rlstdc.h f lib/readline/rlprivate.h f +lib/readline/colors.h f +lib/readline/parse-colors.h f lib/readline/xmalloc.h f lib/readline/doc/Makefile f lib/readline/doc/version.texi f @@ -375,6 +393,7 @@ 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-callbacktest.c f lib/readline/examples/rl.c f lib/readline/examples/rlcat.c f lib/readline/examples/Inputrc f @@ -382,8 +401,8 @@ lib/sh/Makefile.in f lib/sh/casemod.c f lib/sh/clktck.c f lib/sh/clock.c f +lib/sh/dprintf.c f lib/sh/eaccess.c f -lib/sh/fdprintf.c f lib/sh/fmtullong.c f lib/sh/fmtulong.c f lib/sh/fmtumax.c f @@ -391,6 +410,7 @@ lib/sh/fnxform.c f lib/sh/fpurge.c f lib/sh/getcwd.c f lib/sh/getenv.c f +lib/sh/gettimeofday.c f lib/sh/inet_aton.c f lib/sh/input_avail.c f lib/sh/itos.c f @@ -406,15 +426,19 @@ lib/sh/netopen.c f lib/sh/oslib.c f lib/sh/pathcanon.c f lib/sh/pathphys.c f +lib/sh/random.c f lib/sh/rename.c f lib/sh/setlinebuf.c f lib/sh/shmatch.c f +lib/sh/shmbchar.c f lib/sh/shquote.c f lib/sh/shtty.c f lib/sh/snprintf.c f lib/sh/spell.c f lib/sh/strcasecmp.c f lib/sh/strcasestr.c f +lib/sh/strchrnul.c f +lib/sh/strdup.c f lib/sh/strerror.c f lib/sh/strftime.c f lib/sh/stringlist.c f @@ -430,13 +454,19 @@ lib/sh/strtoul.c f lib/sh/strtoull.c f lib/sh/strtoumax.c f lib/sh/strtrans.c f +lib/sh/strvis.c f +lib/sh/timers.c f lib/sh/times.c f lib/sh/timeval.c f lib/sh/tmpfile.c f lib/sh/uconvert.c f lib/sh/ufuncs.c f +lib/sh/unicode.c f +lib/sh/utf8.c f lib/sh/vprint.c f lib/sh/wcsdup.c f +lib/sh/wcsnwidth.c f +lib/sh/wcswidth.c f lib/sh/winsize.c f lib/sh/zcatfd.c f lib/sh/zgetline.c f @@ -454,6 +484,44 @@ lib/tilde/Makefile.in f lib/tilde/tilde.c f lib/tilde/tilde.h f lib/tilde/shell.c f +m4/strtoimax.m4 f +m4/stat-time.m4 f +m4/timespec.m4 f +m4/codeset.m4 f +m4/extern-inline.m4 f +m4/fcntl-o.m4 f +m4/gettext.m4 f +m4/glibc2.m4 f +m4/glibc21.m4 f +m4/host-cpu-c-abi.m4 f +m4/iconv.m4 f +m4/intdiv0.m4 f +m4/intl-thread-locale.m4 f +m4/intl.m4 f +m4/intlmacosx.m4 f +m4/intmax.m4 f +m4/inttypes-pri.m4 f +m4/inttypes.m4 f +m4/inttypes_h.m4 f +m4/lcmessage.m4 f +m4/lib-ld.m4 f +m4/lib-link.m4 f +m4/lib-prefix.m4 f +m4/lock.m4 f +m4/nls.m4 f +m4/po.m4 f +m4/printf-posix.m4 f +m4/progtest.m4 f +m4/pthread_rwlock_rdlock.m4 f +m4/size_max.m4 f +m4/stdint_h.m4 f +m4/threadlib.m4 f +m4/uintmax_t.m4 f +m4/ulonglong.m4 f +m4/visibility.m4 f +m4/wchar_t.m4 f +m4/wint_t.m4 f +m4/xsize.m4 f po/LINGUAS f po/Makefile.in.in f po/Makevars f @@ -477,8 +545,12 @@ po/ca.gmo f po/ca.po f po/cs.gmo f po/cs.po f +po/da.gmo f +po/da.po f po/de.gmo f po/de.po f +po/el.gmo f +po/el.po f po/eo.gmo f po/eo.po f po/es.gmo f @@ -491,18 +563,30 @@ po/fr.gmo f po/fr.po f po/ga.gmo f po/ga.po f +po/gl.gmo f +po/gl.po f +po/hr.gmo f +po/hr.po f po/hu.gmo f po/hu.po f po/id.gmo f po/id.po f +po/it.gmo f +po/it.po f po/ja.gmo f po/ja.po f +po/ko.gmo f +po/ko.po f po/lt.gmo f po/lt.po f po/nl.gmo f +po/nb.po f +po/nb.gmo f po/nl.po f po/pl.gmo f po/pl.po f +po/pt.gmo f +po/pt.po f po/pt_BR.gmo f po/pt_BR.po f po/ro.gmo f @@ -511,12 +595,20 @@ po/ru.gmo f po/ru.po f po/sk.gmo f po/sk.po f +po/sl.gmo f +po/sr.po f +po/sr.gmo f +po/sl.po f po/sv.gmo f po/sv.po f po/tr.gmo f po/tr.po f +po/uk.gmo f +po/uk.po f po/vi.gmo f po/vi.po f +po/zh_CN.gmo f +po/zh_CN.po f po/zh_TW.gmo f po/zh_TW.po f po/insert-header.sin f @@ -532,7 +624,6 @@ 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 @@ -545,12 +636,36 @@ doc/texinfo.tex f doc/bashref.texi f doc/version.texi f doc/bashref.info f +doc/bash.info f doc/article.ms f doc/htmlpost.sh f 755 -doc/infopost.sh f 755 doc/fdl.texi f doc/fdl.txt 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 +doc/aosa-bash.pdf f +doc/aosa-bash-full.pdf f +# support/Makefile.in f +support/bash.pc.in f support/bashversion.c f support/checkbashisms f 755 support/config.guess f @@ -568,6 +683,7 @@ support/mkversion.sh f 755 support/mksignames.c f support/signames.c f support/bashbug.sh f +support/bashbug.sh.in f support/man2html.c f support/recho.c f support/zecho.c f @@ -582,31 +698,44 @@ 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/obashdb/PERMISSION f +#examples/obashdb/README f +#examples/obashdb/bashdb f +#examples/obashdb/bashdb.el f +examples/bash-completion/README f +examples/bash-completion/bash-completion-2.5.tar.xz f examples/complete/bash_completion f +examples/complete/cdfunc 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/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/loadables.h f examples/loadables/Makefile.in f +examples/loadables/Makefile.inc.in f +examples/loadables/Makefile.sample.in f examples/loadables/necho.c f examples/loadables/hello.c f +examples/loadables/asort.c f +examples/loadables/accept.c f examples/loadables/print.c f examples/loadables/realpath.c f +examples/loadables/seq.c f +examples/loadables/setpgid.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/fdflags.c f examples/loadables/finfo.c f examples/loadables/cat.c f +examples/loadables/csv.c f +examples/loadables/dsv.c f examples/loadables/cut.c f examples/loadables/logname.c f examples/loadables/basename.c f @@ -614,6 +743,7 @@ examples/loadables/dirname.c f examples/loadables/tty.c f examples/loadables/pathchk.c f examples/loadables/tee.c f +examples/loadables/rm.c f examples/loadables/rmdir.c f examples/loadables/head.c f examples/loadables/printenv.c f @@ -623,93 +753,106 @@ examples/loadables/whoami.c f examples/loadables/uname.c f examples/loadables/sync.c f examples/loadables/mkdir.c f +examples/loadables/mkfifo.c f +examples/loadables/mktemp.c f examples/loadables/ln.c f examples/loadables/mypid.c f examples/loadables/unlink.c f +examples/loadables/stat.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/loadables/sprintf.c f +#examples/loadables/xtitle.c f examples/functions/array-stuff f examples/functions/array-to-string f +examples/functions/arrayops.bash f examples/functions/autoload f examples/functions/autoload.v2 f examples/functions/autoload.v3 f +examples/functions/autoload.v4 f +examples/functions/autoload.v4.t 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/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/dirfuncs f examples/functions/dirname f -examples/functions/emptydir f +examples/functions/dirstack 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/gethtml f +#examples/functions/getoptx.bash f examples/functions/inetaddr f examples/functions/inpath f -examples/functions/isnum.bash 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/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/lowercase f +#examples/functions/manpage f +#examples/functions/mhfold f +#examples/functions/newdirstack.bsh f examples/functions/notify.bash f -examples/functions/pathfuncs f -examples/functions/recurse f -examples/functions/repeat2 f -examples/functions/repeat3 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/sqroot f examples/functions/substr f examples/functions/substr2 f -examples/functions/term 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/functions/xalias.bash f +#examples/functions/xfind.bash f +#examples/scripts/adventure.sh f +#examples/scripts/bash-hexdump.sh f +#examples/scripts/bcsh.sh f +examples/scripts/bcalc 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/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/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/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 @@ -718,23 +861,41 @@ 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/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 +examples/shellmath/LICENSE f +examples/shellmath/README.md f +examples/shellmath/assert.sh f +examples/shellmath/faster_e_demo.sh f +examples/shellmath/image.png f +examples/shellmath/runTests.sh f +examples/shellmath/shellmath.sh f +examples/shellmath/slower_e_demo.sh f +examples/shellmath/testCases.in f +examples/shellmath/timingData.txt f tests/README f tests/COPYRIGHT f +tests/test-glue-functions f tests/alias.tests f tests/alias1.sub f +tests/alias2.sub f +tests/alias3.sub f +tests/alias4.sub f +tests/alias5.sub f +tests/alias6.sub f tests/alias.right f tests/appendop.tests f +tests/appendop1.sub f +tests/appendop2.sub f tests/appendop.right f tests/arith-for.tests f tests/arith-for.right f @@ -742,6 +903,12 @@ tests/arith.tests f tests/arith.right f tests/arith1.sub f tests/arith2.sub f +tests/arith3.sub f +tests/arith4.sub f +tests/arith5.sub f +tests/arith6.sub f +tests/arith7.sub f +tests/arith8.sub f tests/array.tests f tests/array.right f tests/array1.sub f @@ -753,6 +920,27 @@ tests/array6.sub f tests/array7.sub f tests/array8.sub f tests/array9.sub f +tests/array10.sub f +tests/array11.sub f +tests/array12.sub f +tests/array13.sub f +tests/array14.sub f +tests/array15.sub f +tests/array16.sub f +tests/array17.sub f +tests/array18.sub f +tests/array19.sub f +tests/array20.sub f +tests/array21.sub f +tests/array22.sub f +tests/array23.sub f +tests/array24.sub f +tests/array25.sub f +tests/array26.sub f +tests/array27.sub f +tests/array28.sub f +tests/array29.sub f +tests/array30.sub f tests/array-at-star f tests/array2.right f tests/assoc.tests f @@ -763,25 +951,58 @@ tests/assoc3.sub f tests/assoc4.sub f tests/assoc5.sub f tests/assoc6.sub f +tests/assoc7.sub f +tests/assoc8.sub f +tests/assoc9.sub f +tests/assoc10.sub f +tests/assoc11.sub f +tests/assoc12.sub f +tests/assoc13.sub f +tests/assoc14.sub f +tests/assoc15.sub f +tests/assoc16.sub f +tests/assoc17.sub f +tests/assoc18.sub f +tests/attr.tests f +tests/attr.right f +tests/attr1.sub f +tests/attr2.sub f tests/braces.tests f tests/braces.right f tests/builtins.tests f tests/builtins.right f tests/builtins1.sub f tests/builtins2.sub f +tests/builtins3.sub f +tests/builtins4.sub f +tests/builtins5.sub f +tests/builtins6.sub f +tests/builtins7.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/source7.sub f tests/case.tests f tests/case.right f +tests/case1.sub f +tests/case2.sub f +tests/case3.sub f +tests/case4.sub f tests/casemod.tests f tests/casemod.right f +tests/complete.tests f +tests/complete.right f tests/comsub.tests f tests/comsub.right f tests/comsub1.sub f +tests/comsub2.sub f +tests/comsub3.sub f +tests/comsub4.sub f +tests/comsub5.sub f +tests/comsub6.sub f tests/comsub-eof.tests f tests/comsub-eof0.sub f tests/comsub-eof1.sub f @@ -789,13 +1010,20 @@ tests/comsub-eof2.sub f tests/comsub-eof3.sub f tests/comsub-eof4.sub f tests/comsub-eof5.sub f +tests/comsub-eof6.sub f tests/comsub-eof.right f tests/comsub-posix.tests f tests/comsub-posix.right f tests/comsub-posix1.sub f +tests/comsub-posix2.sub f +tests/comsub-posix3.sub f +tests/comsub-posix5.sub f +tests/comsub-posix6.sub f tests/cond.tests f tests/cond.right f -tests/cond-regexp.sub f +tests/cond-regexp1.sub f +tests/cond-regexp2.sub f +tests/cond-regexp3.sub f tests/coproc.tests f tests/coproc.right f tests/cprint.tests f @@ -807,21 +1035,52 @@ tests/dbg-support2.right f tests/dbg-support2.tests f tests/dbg-support3.sub f tests/dollar-at-star f +tests/dollar-at-star1.sub f +tests/dollar-at-star2.sub f +tests/dollar-at-star3.sub f +tests/dollar-at-star4.sub f +tests/dollar-at-star5.sub f +tests/dollar-at-star6.sub f +tests/dollar-at-star7.sub f +tests/dollar-at-star8.sub f +tests/dollar-at-star9.sub f +tests/dollar-at-star10.sub f +tests/dollar-at-star11.sub f tests/dollar-at1.sub f tests/dollar-at2.sub f tests/dollar-at3.sub f +tests/dollar-at4.sub f +tests/dollar-at5.sub f +tests/dollar-at6.sub f +tests/dollar-at7.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-star6.sub f +tests/dollar-star7.sub f +tests/dollar-star8.sub f +tests/dollar-star9.sub f +tests/dollar-star10.sub f tests/dollar.right f tests/dstack.tests f tests/dstack.right f tests/dstack2.tests f tests/dstack2.right f +tests/dynvar.tests f +tests/dynvar.right f tests/errors.tests f tests/errors.right f +tests/errors1.sub f +tests/errors2.sub f +tests/errors3.sub f +tests/errors4.sub f +tests/errors5.sub f +tests/errors6.sub f +tests/errors7.sub f +tests/errors8.sub f +tests/errors9.sub f tests/execscript f tests/exec.right f tests/exec1.sub f 755 @@ -832,23 +1091,52 @@ tests/exec5.sub f tests/exec6.sub f tests/exec7.sub f tests/exec8.sub f +tests/exec9.sub f +tests/exec10.sub f +tests/exec11.sub f +tests/exec12.sub f +tests/exec13.sub f +tests/exec14.sub f tests/exp.tests f tests/exp.right f tests/exp1.sub f tests/exp2.sub f tests/exp3.sub f +tests/exp4.sub f +tests/exp5.sub f +tests/exp6.sub f +tests/exp7.sub f +tests/exp8.sub f +tests/exp9.sub f +tests/exp10.sub f +tests/exp11.sub f +tests/exp12.sub f +tests/exp13.sub f +tests/exportfunc.tests f +tests/exportfunc.right f +tests/exportfunc1.sub f +tests/exportfunc2.sub f +tests/exportfunc3.sub f tests/extglob.tests f tests/extglob.right f tests/extglob1.sub f +tests/extglob1a.sub f +tests/extglob2.sub f tests/extglob2.tests f tests/extglob2.right f +tests/extglob3.sub f tests/extglob3.tests f tests/extglob3.right f +tests/extglob4.sub f +tests/extglob5.sub f +tests/extglob6.sub f +tests/extglob7.sub f tests/func.tests f tests/func.right f tests/func1.sub f tests/func2.sub f tests/func3.sub f +tests/func4.sub f tests/getopts.tests f tests/getopts.right f tests/getopts1.sub f @@ -858,26 +1146,59 @@ tests/getopts4.sub f tests/getopts5.sub f tests/getopts6.sub f tests/getopts7.sub f +tests/getopts8.sub f +tests/getopts9.sub f +tests/getopts10.sub f tests/glob.tests f tests/glob1.sub f +tests/glob2.sub f +tests/glob3.sub f +tests/glob4.sub f +tests/glob5.sub f +tests/glob6.sub f +tests/glob7.sub f +tests/glob8.sub f +tests/glob9.sub f +tests/glob10.sub f tests/glob.right f tests/globstar.tests f tests/globstar.right f tests/globstar1.sub f +tests/globstar2.sub f +tests/globstar3.sub f tests/heredoc.tests f tests/heredoc.right f tests/heredoc1.sub f +tests/heredoc2.sub f +tests/heredoc3.sub f +tests/heredoc4.sub f +tests/heredoc5.sub f +tests/heredoc6.sub f +tests/heredoc7.sub f tests/herestr.tests f tests/herestr.right f +tests/herestr1.sub f tests/histexp.tests f +tests/histexp1.sub f +tests/histexp2.sub f +tests/histexp3.sub f +tests/histexp4.sub f +tests/histexp5.sub f +tests/histexp6.sub f +tests/histexp7.sub 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/history3.sub f +tests/history4.sub f +tests/history5.sub f +tests/history6.sub f tests/ifs.tests f tests/ifs.right f +tests/ifs1.sub f tests/ifs-posix.tests f tests/ifs-posix.right f tests/input-line.sh f @@ -885,9 +1206,12 @@ tests/input-line.sub f tests/input.right f tests/intl.tests f tests/intl1.sub f +tests/intl2.sub f +tests/intl3.sub f tests/intl.right f tests/iquote.tests f tests/iquote.right f +tests/iquote1.sub f tests/invert.tests f tests/invert.right f tests/jobs.tests f @@ -895,13 +1219,47 @@ tests/jobs1.sub f tests/jobs2.sub f tests/jobs3.sub f tests/jobs4.sub f +tests/jobs5.sub f +tests/jobs6.sub f +tests/jobs7.sub f tests/jobs.right f +tests/lastpipe.right f +tests/lastpipe.tests f +tests/lastpipe1.sub f +tests/lastpipe2.sub f +tests/lastpipe3.sub f tests/mapfile.data f tests/mapfile.right f tests/mapfile.tests f tests/mapfile1.sub f +tests/mapfile2.sub f tests/more-exp.tests f tests/more-exp.right f +tests/nameref.tests f +tests/nameref1.sub f +tests/nameref2.sub f +tests/nameref3.sub f +tests/nameref4.sub f +tests/nameref5.sub f +tests/nameref6.sub f +tests/nameref7.sub f +tests/nameref8.sub f +tests/nameref9.sub f +tests/nameref10.sub f +tests/nameref11.sub f +tests/nameref12.sub f +tests/nameref13.sub f +tests/nameref14.sub f +tests/nameref15.sub f +tests/nameref16.sub f +tests/nameref17.sub f +tests/nameref18.sub f +tests/nameref19.sub f +tests/nameref20.sub f +tests/nameref21.sub f +tests/nameref22.sub f +tests/nameref23.sub f +tests/nameref.right f tests/new-exp.tests f tests/new-exp1.sub f tests/new-exp2.sub f @@ -910,10 +1268,23 @@ tests/new-exp4.sub f tests/new-exp5.sub f tests/new-exp6.sub f tests/new-exp7.sub f +tests/new-exp8.sub f +tests/new-exp9.sub f +tests/new-exp10.sub f +tests/new-exp11.sub f +tests/new-exp12.sub f +tests/new-exp13.sub f +tests/new-exp14.sub f +tests/new-exp15.sub f +tests/new-exp16.sub f tests/new-exp.right f tests/nquote.tests f tests/nquote.right f tests/nquote1.sub f +tests/nquote2.sub f +tests/nquote3.sub f +tests/nquote4.sub f +tests/nquote5.sub f tests/nquote1.tests f tests/nquote1.right f tests/nquote2.tests f @@ -924,17 +1295,53 @@ tests/nquote4.tests f tests/nquote4.right f tests/nquote5.tests f tests/nquote5.right f +tests/parser.tests f +tests/parser.right f +tests/parser1.sub f tests/posix2.tests f tests/posix2.right f +tests/posix2syntax.sub f +tests/posixexp.tests f +tests/posixexp.right f +tests/posixexp1.sub f +tests/posixexp2.sub f +tests/posixexp3.sub f +tests/posixexp4.sub f +tests/posixexp5.sub f +tests/posixexp6.sub f +tests/posixexp7.sub f +tests/posixexp8.sub f +tests/posixexp2.tests f +tests/posixexp2.right f tests/posixpat.tests f tests/posixpat.right f +tests/posixpipe.tests f +tests/posixpipe.right f tests/prec.right f -tests/precedence f +tests/precedence.tests f tests/printf.tests f tests/printf.right f +tests/printf1.sub f tests/printf2.sub f +tests/printf3.sub f +tests/printf4.sub f +tests/procsub.tests f +tests/procsub.right f +tests/procsub1.sub f +tests/procsub2.sub f tests/quote.tests f tests/quote.right f +tests/quote1.sub f +tests/quote2.sub f +tests/quote3.sub f +tests/quote4.sub f +tests/quotearray.right f +tests/quotearray.tests f +tests/quotearray1.sub f +tests/quotearray2.sub f +tests/quotearray3.sub f +tests/quotearray4.sub f +tests/quotearray5.sub f tests/read.tests f tests/read.right f tests/read1.sub f @@ -943,6 +1350,8 @@ tests/read3.sub f tests/read4.sub f tests/read5.sub f tests/read6.sub f +tests/read7.sub f +tests/read8.sub f tests/redir.tests f tests/redir.right f tests/redir1.sub f @@ -957,10 +1366,15 @@ tests/redir6.sub f tests/redir7.sub f tests/redir8.sub f tests/redir9.sub f +tests/redir10.sub f +tests/redir11.sub f tests/rhs-exp.tests f tests/rhs-exp.right f +tests/rhs-exp1.sub f tests/rsh.tests f tests/rsh.right f +tests/rsh1.sub f +tests/rsh2.sub f tests/run-all f tests/run-minimal f tests/run-alias f @@ -970,10 +1384,12 @@ tests/run-arith f tests/run-array f tests/run-array2 f tests/run-assoc f +tests/run-attr f tests/run-braces f tests/run-builtins f tests/run-case f tests/run-casemod f +tests/run-complete f tests/run-comsub f tests/run-comsub-eof f tests/run-comsub-posix f @@ -984,9 +1400,11 @@ tests/run-dbg-support f tests/run-dbg-support2 f tests/run-dirstack f tests/run-dollars f +tests/run-dynvar f tests/run-errors f tests/run-execscript f tests/run-exp-tests f +tests/run-exportfunc f tests/run-extglob f tests/run-extglob2 f tests/run-extglob3 f @@ -1005,8 +1423,10 @@ tests/run-intl f tests/run-iquote f tests/run-invert f tests/run-jobs f +tests/run-lastpipe f tests/run-mapfile f tests/run-more-exp f +tests/run-nameref f tests/run-new-exp f tests/run-nquote f tests/run-nquote1 f @@ -1014,11 +1434,17 @@ tests/run-nquote2 f tests/run-nquote3 f tests/run-nquote4 f tests/run-nquote5 f +tests/run-parser f tests/run-posix2 f +tests/run-posixexp f +tests/run-posixexp2 f tests/run-posixpat f +tests/run-posixpipe f tests/run-precedence f tests/run-printf f +tests/run-procsub f tests/run-quote f +tests/run-quotearray f tests/run-read f tests/run-redir f tests/run-rhs-exp f @@ -1037,34 +1463,68 @@ tests/run-vredir f tests/set-e.tests f tests/set-e1.sub f tests/set-e2.sub f +tests/set-e3.sub f +tests/set-e3a.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.tests f +tests/shopt1.sub f tests/shopt.right f tests/strip.tests f tests/strip.right f tests/test.tests f +tests/test1.sub f tests/test.right f tests/tilde.tests f tests/tilde.right f tests/tilde2.tests f tests/tilde2.right f +tests/tilde3.sub 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/trap4.sub f +tests/trap5.sub f +tests/trap6.sub f tests/type.tests f tests/type.right f tests/type1.sub f tests/type2.sub f +tests/type3.sub f +tests/type4.sub f +tests/unicode1.sub f +tests/unicode2.sub f +tests/unicode3.sub f tests/varenv.right f -tests/varenv.sh f +tests/varenv.tests f tests/varenv1.sub f tests/varenv2.sub f +tests/varenv3.sub f +tests/varenv4.sub f +tests/varenv5.sub f +tests/varenv6.sub f +tests/varenv7.sub f +tests/varenv8.sub f +tests/varenv9.sub f +tests/varenv10.sub f +tests/varenv11.sub f +tests/varenv12.sub f +tests/varenv13.sub f +tests/varenv14.sub f +tests/varenv15.sub f +tests/varenv15.in f +tests/varenv16.sub f +tests/varenv17.sub f +tests/varenv18.sub f +tests/varenv19.sub f +tests/varenv20.sub f +tests/varenv21.sub f +tests/varenv22.sub f tests/version f tests/version.mini f tests/vredir.tests f @@ -1074,6 +1534,9 @@ tests/vredir2.sub f tests/vredir3.sub f tests/vredir4.sub f tests/vredir5.sub f +tests/vredir6.sub f +tests/vredir7.sub f +tests/vredir8.sub f tests/misc/dev-tcp.tests f tests/misc/perf-script f tests/misc/perftest f @@ -1087,45 +1550,45 @@ 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 +#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 deleted file mode 100644 index 736ad5b..0000000 --- a/MANIFEST.doc +++ /dev/null @@ -1,24 +0,0 @@ -# -# 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 index e6b9fad..6e8457a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ -# Makefile for bash-4.0, version 3.5 +# Makefile for bash-5.2, version 5.1 # -# Copyright (C) 1996-2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 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 @@ -26,6 +26,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ + # Include some boilerplate Gnu makefile definitions. prefix = @prefix@ @@ -39,6 +41,12 @@ infodir = @infodir@ includedir = @includedir@ datadir = @datadir@ localedir = @localedir@ +pkgconfigdir = ${libdir}/pkgconfig + +loadablesdir = @loadablesdir@ +headersdir = @headersdir@ + +docdir = @docdir@ mandir = @mandir@ manpfx = man @@ -57,7 +65,7 @@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ top_builddir = @BUILD_DIR@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ @SET_MAKE@ CC = @CC@ @@ -70,6 +78,7 @@ AR = @AR@ ARFLAGS = @ARFLAGS@ RANLIB = @RANLIB@ SIZE = @SIZE@ +STRIP = strip INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -78,14 +87,17 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALLMODE= -m 0755 INSTALLMODE2 = -m 0555 +CTAGS = ctags +CTAGSFLAGS = -x +ETAGS = etags +ETAGSFLAGS = + 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@ +#If you have purify, and want to use it, run the make as `make PURIFY=purify' +#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. @@ -125,6 +137,7 @@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} ${MALLOC_DEBUG} +STYLE_CFLAGS = @STYLE_CFLAGS@ DEFS = @DEFS@ LOCAL_DEFS = @LOCAL_DEFS@ @@ -139,16 +152,23 @@ 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) +BASE_CCFLAGS = $(SYSTEM_FLAGS) $(LOCAL_DEFS) \ + $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) $(STYLE_CFLAGS) -CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) +CCFLAGS = $(ADDON_CFLAGS) $(BASE_CCFLAGS) ${PROFILE_FLAGS} $(CPPFLAGS) $(CFLAGS) CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -LDFLAGS = @LDFLAGS@ $(STATIC_LD) $(LOCAL_LDFLAGS) $(PROFILE_FLAGS) $(CFLAGS) +BASE_LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) +LDFLAGS = ${ADDON_LDFLAGS} ${BASE_LDFLAGS} ${PROFILE_FLAGS} ${STATIC_LD} LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) +ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer +ASAN_XLDFLAGS = -fsanitize=address + +GCOV_XCFLAGS = -fprofile-arcs -ftest-coverage +GCOV_XLDFLAGS = -fprofile-arcs -ftest-coverage + INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC) # Maybe add: -Wextra @@ -156,7 +176,8 @@ 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 + -Wmissing-prototypes -Wtraditional -Wredundant-decls \ + -Wformat-security -pedantic GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS) @@ -185,8 +206,9 @@ 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}/setlinebuf.c ${SH_LIBSRC}/strchrnul.c \ + ${SH_LIBSRC}/strcasecmp.c ${SH_LIBSRC}/strdup.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 \ @@ -212,9 +234,13 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.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}/ufuncs.c ${SH_LIBSRC}/dprintf.c \ ${SH_LIBSRC}/input_avail.c ${SH_LIBSRC}/mbscasecmp.c \ - ${SH_LIBSRC}/fnxform.c + ${SH_LIBSRC}/fnxform.c ${SH_LIBSRC}/unicode.c \ + ${SH_LIBSRC}/wcswidth.c ${SH_LIBSRC}/wcsnwidth.c \ + ${SH_LIBSRC}/shmbchar.c ${SH_LIBSRC}/utf8.c \ + ${SH_LIBSRC}/random.c ${SH_LIBSRC}/gettimeofday.c \ + ${SH_LIBSRC}/timers.c ${SH_LIBSRC}/strvis.c SHLIB_LIB = -lsh SHLIB_LIBNAME = libsh.a @@ -243,6 +269,7 @@ READLINE_SOURCE = $(RL_LIBSRC)/rldefs.h $(RL_LIBSRC)/rlconf.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)/colors.h $(RL_LIBSRC)/parse-colors.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 \ @@ -256,6 +283,7 @@ READLINE_SOURCE = $(RL_LIBSRC)/rldefs.h $(RL_LIBSRC)/rlconf.h \ $(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)/colors.c $(RL_LIBSRC)/parse-colors.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 @@ -273,7 +301,8 @@ READLINE_OBJ = $(RL_LIBDIR)/readline.o $(RL_LIBDIR)/funmap.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 + $(RL_LIBDIR)/histsearch.o $(RL_LIBDIR)/histfile.o \ + $(RL_LIBDIR)/colors.o $(RL_LIBDIR)/parse-colors.o HIST_LIBSRC = $(LIBSRC)/readline HIST_LIBDIR = @HIST_LIBDIR@ @@ -318,9 +347,11 @@ 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)/gmisc.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 + $(GLOB_LIBDIR)/smatch.o $(GLOB_LIBDIR)/xmbsrtowcs.o \ + $(GLOB_LIBDIR)/gmisc.o # The source, object and documentation for the GNU Tilde library. TILDE_LIBSRC = $(LIBSRC)/tilde @@ -397,11 +428,12 @@ BASHINCFILES = $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/ansi_stdlib.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) -lrt +LIBRARIES = $(GLOB_LIB) $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) \ + $(TERMCAP_LIB) $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LIBICONV) \ + $(LOCAL_LIBS) -lrt -LIBDEP = $(GLOB_DEP) $(SHLIB_DEP) $(INTL_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) \ - $(TILDE_DEP) $(MALLOC_DEP) +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) @@ -428,11 +460,25 @@ HSOURCES = shell.h flags.h trap.h hashcmd.h hashlib.h jobs.h builtins.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 \ - vyatta-restricted.h \ + logging.h vyatta-restricted.h \ $(BASHINCFILES) SOURCES = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS) +# headers in top-level source directory that get installed by install-headers +INSTALLED_HEADERS = shell.h bashjmp.h command.h syntax.h general.h error.h \ + variables.h array.h assoc.h arrayfunc.h quit.h dispose_cmd.h \ + make_cmd.h subst.h sig.h externs.h builtins.h \ + bashtypes.h xmalloc.h config-top.h config-bot.h \ + bashintl.h bashansi.h bashjmp.h alias.h hashlib.h \ + conftypes.h unwind_prot.h jobs.h siglist.h \ + execute_cmd.h +INSTALLED_BUILTINS_HEADERS = bashgetopt.h common.h getopt.h +INSTALLED_INCFILES = posixstat.h ansi_stdlib.h filecntl.h posixdir.h \ + memalloc.h stdc.h posixjmp.h posixwait.h posixtime.h systimes.h \ + unionwait.h maxpath.h shtty.h typemax.h ocache.h chartypes.h gettext.h \ + posixstat.h shmbchar.h shmbutil.h stat-time.h + # header files chosen based on running of configure SIGNAMES_H = @SIGNAMES_H@ @@ -441,12 +487,14 @@ JOBS_O = @JOBS_O@ SIGLIST_O = @SIGLIST_O@ SIGNAMES_O = @SIGNAMES_O@ +ARRAY_O = @ARRAY_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 \ + 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) \ logging.o vyatta-restricted.o @@ -508,7 +556,7 @@ PO_DIR = $(dot)/po/ SIGNAMES_SUPPORT = $(SUPPORT_SRC)mksignames.c SUPPORT_SRC = $(srcdir)/support/ -SDIR = $(dot)/support/ +SDIR = $(dot)/support TESTS_SUPPORT = recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) xcase$(EXEEXT) CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \ @@ -518,27 +566,36 @@ CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \ 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 + stamp-h po/POTFILES config.status.lineno CREATED_MAKEFILES = Makefile builtins/Makefile \ lib/readline/Makefile lib/glob/Makefile \ lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \ lib/termcap/Makefile examples/loadables/Makefile \ + examples/loadables/Makefile.inc examples/loadables/Makefile.sample \ examples/loadables/perl/Makefile support/Makefile \ lib/intl/Makefile po/Makefile po/Makefile.in +CREATED_HEADERS = signames.h config.h pathnames.h version.h y.tab.h \ + ${DEFDIR}/builtext.h + +OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/COMPAT $(srcdir)/NEWS $(srcdir)/POSIX \ + $(srcdir)/RBASH $(srcdir)/README +OTHER_INSTALLED_DOCS = CHANGES COMPAT NEWS POSIX RBASH README + +LOADABLES_DIR = ${top_builddir}/examples/loadables # Keep GNU Make from exporting the entire environment for small machines. .NOEXPORT: -.made: $(Program) +.made: $(Program) $(SDIR)/man2html$(EXEEXT) @echo "$(Program) last made for a $(Machine) running $(OS)" >.made -$(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP) +$(Program): $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP) .build $(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) +.build: $(SOURCES) config.h Makefile $(DEFDIR)/builtext.h version.h $(VERSPROG) @echo @echo " ***********************************************************" @echo " * *" @@ -548,52 +605,81 @@ $(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP) @echo strip: $(Program) .made - strip $(Program) + $(STRIP) $(Program) ls -l $(Program) -$(SIZE) $(Program) lint: - ${MAKE} ${MFLAGS} CFLAGS='${GCC_LINT_FLAGS}' .made + ${MAKE} ${MFLAGS} ADDON_CFLAGS='${GCC_LINT_FLAGS}' .made + +asan: + ${MAKE} ${MFLAGS} ADDON_CFLAGS='${ASAN_XCFLAGS}' ADDON_LDFLAGS='${ASAN_XLDFLAGS}' .made + +valgrind: + ${MAKE} ${MFLAGS} ADDON_CFLAGS='-DDISABLE_MALLOC_WRAPPERS' ADDON_LDFLAGS= .made + +# cheating +gcov: + ${MAKE} ${MFLAGS} CFLAGS=-g ADDON_CFLAGS='${GCOV_XCFLAGS}' ADDON_LDFLAGS='${GCOV_XLDFLAGS}' .made + +# have to make this separate because making tests depend on $(PROGRAM) +asan-tests: asan $(TESTS_SUPPORT) + @-test -d tests || mkdir tests + @cp $(TESTS_SUPPORT) tests + @( cd $(srcdir)/tests && \ + BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) -version.h: $(SOURCES) config.h Makefile +profiling-tests: ${PROGRAM} + @test "X$$PROFILE_FLAGS" == "X" && { echo "profiling-tests: must be built with profiling enabled" >&2; exit 1; } + @${MAKE} ${MFLAGS} tests TESTSCRIPT=run-gprof + +version.h: $(SOURCES) config.h Makefile patchlevel.h $(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} +bashversion$(EXEEXT): buildversion.o $(SUPPORT_SRC)bashversion.c + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)bashversion.c buildversion.o ${LIBS_FOR_BUILD} -buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c +buildversion.o: $(srcdir)/version.c $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c +buildversion.o: bashintl.h $(BASHINCDIR)/gettext.h +buildversion.o: version.h patchlevel.h conftypes.h + # old rules GRAM_H = parser-built -y.tab.o: y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h +y.tab.o: y.tab.h 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 + +y.tab.c: parse.y # -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi $(YACC) -d $(srcdir)/parse.y + $(RM) parser-built 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 +y.tab.h: y.tab.c + @true + + +# Subdirs will often times want version.h, so they'll change back up to +# the top level and try to create it. This causes parallel build issues +# so just force top level sanity before we descend. +$(LIBDEP): .build +#$(LIBDEP): version.h $(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 + cd ${RL_LIBDIR} && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} 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 + cd ${HIST_LIBDIR} && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libhistory.a) || exit 1 $(GLOB_LIBRARY): config.h $(GLOB_SOURCE) @echo making $@ in ${GLOB_LIBDIR} @@ -618,7 +704,7 @@ $(SHLIB_LIBRARY): config.h ${SHLIB_SOURCE} ${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile @echo making $@ in ${INTL_LIBDIR} @(cd ${INTL_LIBDIR} && \ - $(MAKE) $(MFLAGS) all) || exit 1 + $(MAKE) $(MFLAGS) XCFLAGS="${LOCAL_CFLAGS}" all) || exit 1 ${LIBINTL_H}: ${INTL_DEP} @@ -636,11 +722,11 @@ mksignames.o: $(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} + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ mksignames.o buildsignames.o ${LIBS_FOR_BUILD} -mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h +mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h bashansi.h $(RM) $@ - ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c ${LIBS_FOR_BUILD} + ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} ${LDFLAGS_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 @@ -656,8 +742,8 @@ 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 +$(BUILTINS_LIBRARY): $(DEFDIR)/builtext.h $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} targets ) || exit 1 # these require special rules to circumvent make builtin rules ${DEFDIR}/common.o: $(BUILTIN_SRCDIR)/common.c @@ -669,6 +755,12 @@ ${DEFDIR}/bashgetopt.o: $(BUILTIN_SRCDIR)/bashgetopt.c ${DEFDIR}/builtext.h: $(BUILTIN_DEFS) @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) builtext.h ) || exit 1 +${DEFDIR}/pipesize.h: ${BUILTINS_LIBRARY} + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) pipesize.h ) || exit 1 + +$(SDIR)/man2html$(EXEEXT): ${SUPPORT_SRC}/man2html.c + @(cd $(SDIR) && $(MAKE) $(MFLAGS) all ) || exit 1 + # For the justification of the following Makefile rules, see node # `Automatic Remaking' in GNU Autoconf documentation. @@ -677,7 +769,7 @@ Makefile makefile: config.status $(srcdir)/Makefile.in Makefiles makefiles: config.status $(srcdir)/Makefile.in @for mf in $(CREATED_MAKEFILES); do \ - CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \ + CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status || exit 1; \ done config.h: stamp-h @@ -698,13 +790,16 @@ pathnames.h: Makefile $(srcdir)/pathnames.h.in @${RM} pathnames.tmp # comment out for distribution -$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in +$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4 $(srcdir)/config.h.in cd $(srcdir) && autoconf # for chet reconfig: force sh $(srcdir)/configure -C +loadables: + cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) all + #newversion: mkversion # $(RM) .build # ./mkversion -dir $(srcdir) -dist @@ -717,11 +812,12 @@ info dvi ps: force force: +# unused TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) - etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) + ( cd $(topdir) && $(ETAGS) $(ETAGSFLAGS) $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) ) tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) - ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@ + ( cd $(topdir) && $(CTAGS) $(CTAGSFLAGS) $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@ ) # Targets that actually do things not part of the build @@ -730,13 +826,47 @@ installdirs: install: .made installdirs $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) install-strip: $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ prefix=${prefix} exec_prefix=${exec_prefix} \ DESTDIR=$(DESTDIR) install +install-headers-dirs: + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir) + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir)/builtins + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir)/include + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(pkgconfigdir) + +install-headers: install-headers-dirs + @for hf in $(INSTALLED_HEADERS) ; do \ + ${INSTALL_DATA} $(srcdir)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ + done + @for hf in $(INSTALLED_INCFILES) ; do \ + ${INSTALL_DATA} $(BASHINCDIR)/"$$hf" $(DESTDIR)$(headersdir)/include/$$hf || exit 1; \ + done + @for hf in $(INSTALLED_BUILTINS_HEADERS) ; do \ + ${INSTALL_DATA} $(BUILTIN_SRCDIR)/"$$hf" $(DESTDIR)$(headersdir)/builtins/$$hf || exit 1; \ + done + @for hf in $(CREATED_HEADERS) ; do \ + if test -f $(BUILD_DIR)/"$$hf" ; then \ + ${INSTALL_DATA} $(BUILD_DIR)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ + else \ + ${INSTALL_DATA} $(srcdir)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ + fi ; \ + done + -$(INSTALL_DATA) $(SDIR)/bash.pc $(DESTDIR)$(pkgconfigdir)/bash.pc + +uninstall-headers: + -( cd $(DESTDIR)$(headersdir) && $(RM) $(INSTALLED_HEADERS) ) + -( cd $(DESTDIR)$(headersdir)/include && $(RM) $(INSTALLED_INCFILES) ) + -( cd $(DESTDIR)$(headersdir)/builtins && $(RM) $(INSTALLED_BUILTINS_HEADERS) ) + -( cd $(DESTDIR)$(headersdir) && $(RM) $(CREATED_HEADERS) ) + -( $(RM) $(DESTDIR)$(pkgconfigdir)/bash.pc ) + uninstall: .made + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) .PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean @@ -754,6 +884,7 @@ clean: basic-clean (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ done -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) $(RM) $(CREATED_SUPPORT) mostlyclean: basic-clean @@ -763,6 +894,7 @@ mostlyclean: basic-clean (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ done -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) distclean: basic-clean maybe-clean ( cd builtins && $(MAKE) $(MFLAGS) $@ ) @@ -771,6 +903,7 @@ distclean: basic-clean maybe-clean (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ done -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) $(RM) $(CREATED_CONFIGURE) tags TAGS $(RM) $(CREATED_SUPPORT) Makefile $(CREATED_MAKEFILES) pathnames.h @@ -784,31 +917,32 @@ maintainer-clean: basic-clean (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ done -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(LOADABLES_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 \ + -if test X"`cd $(topdir) && pwd -P`" != X"`cd $(BUILD_DIR) && pwd -P`" ; 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} + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_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} + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_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} + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_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} + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_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} ) + BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) symlinks: $(SHELL) $(SUPPORT_SRC)fixlinks -s $(srcdir) @@ -816,9 +950,11 @@ symlinks: 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 + @echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${PACKAGE} -t $(PACKAGE_VERSION) + +xdist: force + ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) + ( cd po && $(MAKE) $(MFLAGS) $@ ) depend: depends @@ -827,108 +963,134 @@ depends: force #### PRIVATE TARGETS #### hashtest: hashlib.c - $(CC) -DTEST_HASHING $(CCFLAGS) -o $@ $(srcdir)/hashlib.c + $(CC) -DTEST_HASHING $(CCFLAGS) $(TEST_NBUCKETS) -o $@ $(srcdir)/hashlib.c xmalloc.o $(INTL_LIB) $(MALLOC_LIBRARY) ############################ 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 +array.o: $(srcdir)/config-top.h +array2.o: $(srcdir)/config-top.h +bashhist.o: $(srcdir)/config-top.h +shell.o: $(srcdir)/config-top.h +input.o: $(srcdir)/config-top.h +y.tab.o: $(srcdir)/config-top.h +jobs.o: $(srcdir)/config-top.h +nojobs.o: $(srcdir)/config-top.h +execute_cmd.o: $(srcdir)/config-top.h +variables.o: $(srcdir)/config-top.h +findcmd.o: $(srcdir)/config-top.h +subst.o: $(srcdir)/config-top.h +builtins/cd.o: $(srcdir)/config-top.h +builtins/command.o: $(srcdir)/config-top.h +builtins/common.o: $(srcdir)/config-top.h +builtins/declare.o: $(srcdir)/config-top.h +builtins/break.o: $(srcdir)/config-top.h +builtins/echo.o: $(srcdir)/config-top.h +builtins/evalstring.o: $(srcdir)/config-top.h +builtins/exit.o: $(srcdir)/config-top.h +builtins/kill.o: $(srcdir)/config-top.h +builtins/shopt.o: $(srcdir)/config-top.h + +# XXX +${SH_LIBDIR}/tmpfile.o: $(srcdir)/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 +copy_cmd.o: bashansi.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.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 +dispose_cmd.o: assoc.h ${BASHINCDIR}/chartypes.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: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h error.o: input.h execute_cmd.h +error.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h assoc.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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h eval.o: input.h execute_cmd.h +eval.o: bashhist.h assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h eval.o: vyatta-restricted.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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.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 +execute_cmd.o: $(DEFSRC)/getopt.h +execute_cmd.o: bashhist.h input.h ${GRAM_H} assoc.h hashcmd.h alias.h +execute_cmd.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/posixwait.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: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h execute_cmd.h expr.o: ${BASHINCDIR}/chartypes.h +expr.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/typemax.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: flags.h hashlib.h pathexp.h hashcmd.h execute_cmd.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: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h execute_cmd.h flags.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashhist.h +flags.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.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: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h parser.h +general.o: pathexp.h general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h general.o: ${BASHINCDIR}/chartypes.h +general.o: trap.h input.h assoc.h test.h findcmd.h +general.o: ${BASHINCDIR}/ocache.h $(DEFSRC)/common.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 +hashcmd.o: quit.h sig.h flags.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 +hashlib.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.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 +input.o: quit.h shell.h pathnames.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 +list.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.h +locale.o: config.h bashtypes.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 +locale.o: input.h assoc.h ${BASHINCDIR}/ocache.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 @@ -936,18 +1098,24 @@ mailcheck.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.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 +mailcheck.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.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 +make_cmd.o: jobs.h quit.h sig.h siglist.h syntax.h dispose_cmd.h parser.h +make_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/ocache.h +make_cmd.o: shell.h execute_cmd.h pathnames.h +make_cmd.o: $(BASHINCDIR)/maxpath.h make_cmd.c assoc.h $(BASHINCDIR)/chartypes.h +make_cmd.o: unwind_prot.h $(BASHINCDIR)/posixjmp.h bashjmp.h $(BASHINCDIR)/posixwait.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: make_cmd.h subst.h sig.h pathnames.h externs.h test.h execute_cmd.o 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 +y.tab.o: ${BASHINCDIR}/typemax.h assoc.h ${BASHINCDIR}/ocache.h +y.tab.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/posixwait.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 @@ -955,94 +1123,111 @@ 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 +pathexp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +pathexp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.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: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h +print_cmd.o: flags.h input.h assoc.h +print_cmd.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.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 +redir.o: ${DEFDIR}/pipesize.h +redir.o: trap.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.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 +shell.o: ${GLOB_LIBSRC}/strmatch.h ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/posixwait.h +shell.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h alias.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: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h sig.o: jobs.h siglist.h trap.h $(DEFSRC)/common.h bashline.h bashhist.h +sig.o: ${DEFDIR}/builtext.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: bashansi.h pathexp.h assoc.h $(BASHINCDIR)/ocache.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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.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: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.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: ${BASHINCDIR}/stat-time.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h +test.o: $(GLOB_LIBSRC)/strmatch.h bashansi.h pathexp.h assoc.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: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h parser.h +trap.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h trap.o: signames.h $(DEFSRC)/common.h -trap.o: ${DEFDIR}/builtext.h jobs.h +trap.o: ${DEFDIR}/builtext.h builtins.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 +unwind_prot.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h error.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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.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 +variables.o: ${BASHINCDIR}/posixtime.h assoc.h ${DEFSRC}/getopt.h +variables.o: version.h $(DEFDIR)/builtext.h +version.o: conftypes.h patchlevel.h version.h xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h +xmalloc.o: ${BASHINCDIR}/stdc.h $(ALLOC_LIBSRC)/shmalloc.h vyatta-restricted.o: shell.h command.h vyatta-restricted.h -logging.o: shell.h ${BASHINCDIR}/filecntl.h jobs.h +logging.o: shell.h ${BASHINCDIR}/filecntl.h jobs.h logging.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: bashansi.h ${BASHINCDIR}/ansi_stdlib.h assoc.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: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h parser.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 +jobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h $(BASHINCDIR)/typemax.h +jobs.o: logging.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: sig.h error.h ${BASHINCDIR}/shtty.h input.h parser.h nojobs.o: $(DEFDIR)/builtext.h +nojobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h $(BASHINCDIR)/typemax.h # shell features that may be compiled in @@ -1051,14 +1236,24 @@ array.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.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: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h array.o: $(DEFSRC)/common.h +array2.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h +array2.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h +array2.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h +array2.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h +array2.o: make_cmd.h subst.h sig.h pathnames.h externs.h +array2.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h +array2.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: execute_cmd.h +arrayfunc.o: assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h arrayfunc.o: $(DEFSRC)/common.h -arrayfunc.o: ${BASHINCDIR}/shmbutil.h +arrayfunc.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.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 @@ -1066,29 +1261,40 @@ 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: array.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.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 +braces.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +braces.o: ${BASHINCDIR}/typemax.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.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: pcomplete.h hashlib.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: bashjmp.h command.h general.h xmalloc.h error.h variables.h +pcomplib.o: 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 +pcomplib.o: externs.h ${BASHINCDIR}/maxpath.h assoc.h array.h +pcomplib.o: ${BASHINCDIR}/posixjmp.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.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: bashjmp.h command.h general.h xmalloc.h error.h variables.h +pcomplete.o: execute_cmd.h pathexp.h arrayfunc.h conftypes.h quit.h trap.h +pcomplete.o: jobs.h siglist.h bashline.h alias.h +pcomplete.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h +pcomplete.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/posixstat.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 +pcomplete.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +pcomplete.o: builtins.h ${DEFDIR}/builtext.h ${DEFSRC}/common.h +pcomplete.o: ${GLOB_LIBSRC}/glob.h ${GLOB_LIBSRC}/strmatch.h pcomplete.o: vyatta-restricted.h # library support files @@ -1098,17 +1304,21 @@ 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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h bashhist.o: flags.h input.h parser.h pathexp.h $(DEFSRC)/common.h bashline.h -bashhist.o: $(GLOB_LIBSRC)/strmatch.h +bashhist.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h +bashhist.o: $(GLOB_LIBSRC)/strmatch.h ${GLOB_LIBSRC}/glob.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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h bashline.o: builtins.h bashhist.h bashline.h execute_cmd.h findcmd.h pathexp.h +bashline.o: trap.h flags.h assoc.h $(BASHINCDIR)/ocache.h bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h +bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +bashline.o: ${DEFDIR}/builtext.h bashline.o: vyatta-restricted.h bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h @@ -1117,31 +1327,57 @@ 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 +bracecomp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h +bracecomp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h # library dependencies +bashhist.o: $(RL_LIBSRC)/rltypedefs.h 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 +bashline.o: $(RL_LIBSRC)/rltypedefs.h ${RL_LIBSRC}/rlmbutil.h bracecomp.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h bracecomp.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +bracecomp.o: $(RL_LIBSRC)/rltypedefs.h y.tab.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h y.tab.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +y.tab.o: $(RL_LIBSRC)/rltypedefs.h subst.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h subst.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +shell.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +shell.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +shell.o: $(RL_LIBSRC)/rltypedefs.h +variables.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +variables.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +variables.o: $(RL_LIBSRC)/rltypedefs.h +jobs.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h +jobs.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h +jobs.o: $(RL_LIBSRC)/rltypedefs.h +pcomplete.o: $(RL_LIBSRC)/rlconf.h +pcomplete.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h +pcomplete.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h +pcomplete.o: $(RL_LIBSRC)/rltypedefs.h ${RL_LIBSRC}/rlmbutil.h shell.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h +variables.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 +pcomplete.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h +bashline.o: $(TILDE_LIBSRC)/tilde.h +bracecomp.o: $(TILDE_LIBSRC)/tilde.h execute_cmd.o: $(TILDE_LIBSRC)/tilde.h general.o: $(TILDE_LIBSRC)/tilde.h mailcheck.o: $(TILDE_LIBSRC)/tilde.h +pcomplete.o: $(TILDE_LIBSRC)/tilde.h shell.o: $(TILDE_LIBSRC)/tilde.h subst.o: $(TILDE_LIBSRC)/tilde.h variables.o: $(TILDE_LIBSRC)/tilde.h +jobs.o: $(TILDE_LIBSRC)/tilde.h +y.tab.o: $(TILDE_LIBSRC)/tilde.h # libintl dependencies arrayfunc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h @@ -1155,10 +1391,12 @@ 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 +locale.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 +y.tab.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +pathexp.o: 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 @@ -1173,6 +1411,9 @@ 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 +# XXX +$(MALLOC_SOURCE): bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + signames.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h # XXX - dependencies checked through here @@ -1190,12 +1431,12 @@ builtins/common.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.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: ${DEFDIR}/builtext.h parser.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: make_cmd.h subst.h sig.h pathnames.h externs.h parser.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 @@ -1204,7 +1445,8 @@ builtins/evalstring.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftype 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/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h redir.h +builtins/evalstring.o: ${DEFDIR}/builtext.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 @@ -1212,6 +1454,7 @@ 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 +builtins/mkbuiltins.o: $(BASHINCDIR)/stdc.h # builtin def files builtins/alias.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h @@ -1225,12 +1468,12 @@ 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/break.o: pathnames.h execute_cmd.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/builtin.o: pathnames.h execute_cmd.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 @@ -1241,6 +1484,10 @@ builtins/cd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xma 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/colon.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h +builtins/colon.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h +builtins/colon.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h +builtins/colon.o: 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 @@ -1248,11 +1495,13 @@ builtins/command.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/std 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/declare.o: $(DEFSRC)/bashgetopt.h pathnames.h flags.h +builtins/declare.o: ${DEFDIR}/builtext.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/echo.o: $(DEFSRC)/common.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 @@ -1271,33 +1520,35 @@ 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/exit.o: pathnames.h execute_cmd.h +builtins/exit.o: ${DEFDIR}/builtext.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: $(DEFSRC)/bashgetopt.h bashhist.h pathnames.h parser.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/fg_bg.o: pathnames.h execute_cmd.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/getopts.o: pathnames.h execute_cmd.h +builtins/hash.o: bashtypes.h execute_cmd.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: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h +builtins/help.o: conftypes.h quit.h execute_cmd.h builtins/help.o: $(GLOB_LIBSRC)/glob.h pathnames.h -builtins/history.o: bashtypes.h pathnames.h +builtins/history.o: bashtypes.h pathnames.h parser.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 @@ -1323,28 +1574,31 @@ 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}/shmbutil.h ${BASHINCDIR}/shmbchar.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/pushd.o: ${DEFDIR}/builtext.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: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.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/return.o: pathnames.h execute_cmd.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/set.o: pathnames.h parser.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/setattr.o: pathnames.h flags.h execute_cmd.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 @@ -1354,12 +1608,12 @@ builtins/shopt.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.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/shopt.o: bashhist.h bashline.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/source.o: pathnames.h execute_cmd.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 @@ -1367,7 +1621,7 @@ 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/test.o: execute_cmd.h 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 @@ -1381,7 +1635,7 @@ builtins/type.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h x 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/type.o: pathnames.h execute_cmd.h parser.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 @@ -1393,12 +1647,14 @@ 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: execute_cmd.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: builtins.h pathnames.h general.h +builtins/complete.o: bashtypes.h ${BASHINCDIR}/chartypes.h xmalloc.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 diff --git a/NEWS b/NEWS index 8b1b7bc..62d2212 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,1042 @@ +This is a terse description of the new features added to bash-5.2 since +the release of bash-5.1. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. The bash malloc returns memory that is aligned on 16-byte boundaries. + +b. There is a new internal timer framework used for read builtin timeouts. + +c. Rewrote the command substitution parsing code to call the parser recursively + and rebuild the command string from the parsed command. This allows better + syntax checking and catches errors much earlier. Along with this, if + command substitution parsing completes with here-documents remaining to be + read, the shell prints a warning message and reads the here-document bodies + from the current input stream. + +d. The `ulimit' builtin now treats an operand remaining after all of the options + and arguments are parsed as an argument to the last command specified by + an option. This is for POSIX compatibility. + +e. Here-document parsing now handles $'...' and $"..." quoting when reading the + here-document body. + +f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline + commands now understand $'...' and $"..." quoting. + +g. There is a new `spell-correct-word' bindable readline command to perform + spelling correction on the current word. + +h. The `unset' builtin now attempts to treat arguments as array subscripts + without parsing or expanding the subscript, even when `assoc_expand_once' + is not set. + +i. There is a default value for $BASH_LOADABLES_PATH in config-top.h. + +j. Associative array assignment and certain instances of referencing (e.g., + `test -v' now allow `@' and `*' to be used as keys. + +k. Bash attempts to expand indexed array subscripts only once when executing + shell constructs and word expansions. + +l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with + that value for associative arrays instead of unsetting the entire array + (which you can still do with `unset arrayname'). For indexed arrays, it + removes all elements of the array without unsetting it (like `A=()'). + +m. Additional builtins (printf/test/read/wait) do a better job of not + parsing array subscripts if array_expand_once is set. + +n. New READLINE_ARGUMENT variable set to numeric argument for readline commands + defined using `bind -x'. + +o. The new `varredir_close' shell option causes bash to automatically close + file descriptors opened with {var}&WORD- redirection has WORD expand to the empty + string, treat the redirection as [N]<&- or [N]>&- and close file descriptor + N (default 0). + +w. Invalid parameter transformation operators are now invalid word expansions, + and so cause fatal errors in non-interactive shells. + +x. New shell option: patsub_replacement. When enabled, a `&' in the replacement + string of the pattern substitution expansion is replaced by the portion of + the string that matched the pattern. Backslash will escape the `&' and + insert a literal `&'. + +y. `command -p' no longer looks in the hash table for the specified command. + +z. The new `--enable-translatable-strings' option to `configure' allows $"..." + support to be compiled in or out. + +aa. The new `globskipdots' shell option forces pathname expansion never to + return `.' or `..' unless explicitly matched. It is enabled by default. + +bb. Array references using `@' and `*' that are the value of nameref variables + (declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if + set -u is enabled and the array (v) is unset. + +cc. There is a new bindable readline command name: + `vi-edit-and-execute-command'. + +dd. In posix mode, the `printf' builtin checks for the `L' length modifier and + uses long double for floating point conversion specifiers if it's present, + double otherwise. + +ee. The `globbing' completion code now takes the `globstar' option into account. + +ff. `suspend -f' now forces the shell to suspend even if job control is not + currently enabled. + +gg. Since there is no `declare -' equivalent of `local -', make sure to use + `local -' in the output of `local -p'. + +2. New Features in Readline + +a. There is now an HS_HISTORY_VERSION containing the version number of the + history library for applications to use. + +b. History expansion better understands multiple history expansions that may + contain strings that would ordinarily inhibit history expansion (e.g., + `abc!$!$'). + +c. There is a new framework for readline timeouts, including new public + functions to set timeouts and query how much time is remaining before a + timeout hits, and a hook function that can trigger when readline times + out. There is a new state value to indicate a timeout. + +d. Automatically bind termcap key sequences for page-up and page-down to + history-search-backward and history-search-forward, respectively. + +e. There is a new `fetch-history' bindable command that retrieves the history + entry corresponding to its numeric argument. Negative arguments count back + from the end of the history. + +f. `vi-undo' is now a bindable command. + +g. There is a new option: `enable-active-region'. This separates control of + the active region and bracketed-paste. It has the same default value as + bracketed-paste, and enabling bracketed paste enables the active region. + Users can now turn off the active region while leaving bracketed paste + enabled. + +h. rl_completer_word_break_characters is now `const char *' like + rl_basic_word_break_characters. + +i. Readline looks in $LS_COLORS for a custom filename extension + (*.readline-colored-completion-prefix) and uses that as the default color + for the common prefix displayed when `colored-completion-prefix' is set. + +j. Two new bindable string variables: active-region-start-color and + active-region-end-color. The first sets the color used to display the + active region; the second turns it off. If set, these are used in place + of terminal standout mode. + +k. New readline state (RL_STATE_EOF) and application-visible variable + (rl_eof_found) to allow applications to detect when readline reads EOF + before calling the deprep-terminal hook. + +l. There is a new configuration option: --with-shared-termcap-library, which + forces linking the shared readline library with the shared termcap (or + curses/ncurses/termlib) library so applications don't have to do it. + +m. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG) + each time it is called, and modifies the appropriate locale-specific display + and key binding variables when the locale changes. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-5.1 since +the release of bash-5.0. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. `bind -x' now supports different bindings for different editing modes and + keymaps. + +b. Bash attempts to optimize the number of times it forks when executing + commands in subshells and from `bash -c'. + +c. Here documents and here strings now use pipes for the expanded document if + it's smaller than the pipe buffer size, reverting to temporary files if it's + larger. + +d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut + +e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL + and those that were SIG_IGN when the shell starts. + +f. The shell now expands the history number (e.g., in PS1) even if it is not + currently saving commands to the history list. + +g. `read -e' may now be used with arbitrary file descriptors (`read -u N'). + +h. The `select' builtin now runs traps if its internal call to the read builtin + is interrupted by a signal. + +i. SRANDOM: a new variable that expands to a 32-bit random number that is not + produced by an LCRNG, and uses getrandom/getentropy, falling back to + /dev/urandom or arc4random if available. There is a fallback generator if + none of these are available. + +j. shell-transpose-words: a new bindable readline command that uses the same + definition of word as shell-forward-word, etc. + +k. The shell now adds default bindings for shell-forward-word, + shell-backward-word, shell-transpose-words, and shell-kill-word. + +l. Bash now allows ARGV0 appearing in the initial shell environment to set $0. + +m. If `unset' is executed without option arguments, bash tries to unset a shell + function if a name argument cannot be a shell variable name because it's not + an identifier. + +n. The `test -N' operator uses nanosecond timestamp granularity if it's + available. + +o. Bash posix mode now treats assignment statements preceding shell function + definitions the same as in its default mode, since POSIX has changed and + no longer requires those assignments to persist after the function returns + (POSIX interp 654). + +p. BASH_REMATCH is no longer readonly. + +q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n' + or `wait' without arguments. + +r. Sorting the results of pathname expansion now uses byte-by-byte comparisons + if two strings collate equally to impose a total order; the result of a + POSIX interpretation. + +s. Bash now allows SIGINT trap handlers to execute recursively. + +t. Bash now saves and restores state around setting and unsetting posix mode, + instead of having unsetting posix mode set a known state. + +u. Process substitution is now available in posix mode. + +v. READLINE_MARK: a new variable available while executing commands bound with + `bind -x', contains the value of the mark. + +w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell + startup. + +x. `test -v N' can now test whether or not positional parameter N is set. + +y. `local' now honors the `-p' option to display all local variables at the + current context. + +z. The `@a' variable transformation now prints attributes for unset array + variables. + +aa. The `@A' variable transformation now prints a declare command that sets a + variable's attributes if the variable has attributes but is unset. + +bb. `declare' and `local' now have a -I option that inherits attributes and + value from a variable with the same name at a previous scope. + +cc. When run from a -c command, `jobs' now reports the status of completed jobs. + +dd. New `U', `u', and `L' parameter transformations to convert to uppercase, + convert first character to uppercase, and convert to lowercase, + respectively. + +ee. PROMPT_COMMAND: can now be an array variable, each element of which can + contain a command to be executed like a string PROMPT_COMMAND variable. + +ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource. + +gg. Associative arrays may be assigned using a list of key-value pairs within + a compound assignment. Compound assignments where the words are not of + the form [key]=value are assumed to be key-value assignments. A missing or + empty key is an error; a missing value is treated as NULL. Assignments may + not mix the two forms. + +hh. New `K' parameter transformation to display associative arrays as key- + value pairs. + +ii. Writing history to syslog now handles messages longer than the syslog max + length by writing multiple messages with a sequence number. + +jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since + they are nominally integer variables. LINENO is not an integer variable. + +kk. Bash temporarily suppresses the verbose option when running the DEBUG trap + while running a command from the `fc' builtin. + +ll. `wait -n' now accepts a list of job specifications as arguments and will + wait for the first one in the list to change state. + +mm. The associative array implementation can now dynamically increase the + size of the hash table based on insertion patterns. + +nn. HISTFILE is now readonly in a restricted shell. + +oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit + systems. + +pp. If the hash builtin is listing hashed filenames portably, don't print + anything if the table is empty. + +qq. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component. + +rr. Bash attempts to optimize away forks in the last command in a function body + under appropriate circumstances. + +ss. The globbing code now uses fnmatch(3) to check collation elements (if + available) even in cases without multibyte characters. + +tt. The `fg' and `bg' builtins now return an error in a command substitution + when asked to restart a job inherited from the parent shell. + +uu. The shell now attempts to unlink all FIFOs on exit, whether a consuming + process has finished with them or not. + +vv. There is a new contributed loadable builtin: asort. + +2. New Features in Readline + +a. If a second consecutive completion attempt produces matches where the first + did not, treat it as a new completion attempt and insert a match as + appropriate. + +b. Bracketed paste mode works in more places: incremental search strings, vi + overstrike mode, character search, and reading numeric arguments. + +c. Readline automatically switches to horizontal scrolling if the terminal has + only one line. + +d. Unbinding all key sequences bound to a particular readline function now + descends into keymaps for multi-key sequences. + +e. rl-clear-display: new bindable command that clears the screen and, if + possible, the scrollback buffer (bound to emacs mode M-C-l by default). + +f. New active mark and face feature: when enabled, it will highlight the text + inserted by a bracketed paste (the `active region') and the text found by + incremental and non-incremental history searches. This is tied to bracketed + paste and can be disabled by turning off bracketed paste. + +g. Readline sets the mark in several additional commands. + +h. Bracketed paste mode is enabled by default. + +i. Readline tries to take advantage of the more regular structure of UTF-8 + characters to identify the beginning and end of characters when moving + through the line buffer. + +j. The bindable operate-and-get-next command (and its default bindings) are + now part of readline instead of a bash-specific addition. + +k. The signal cleanup code now blocks SIGINT while processing after a SIGINT. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-5.0 since +the release of bash-4.4. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. The `wait' builtin can now wait for the last process substitution created. + +b. There is an EPOCHSECONDS variable, which expands to the time in seconds + since the Unix epoch. + +c. There is an EPOCHREALTIME variable, which expands to the time in seconds + since the Unix epoch with microsecond granularity. + +d. New loadable builtins: rm, stat, fdflags. + +e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment. + +f. When supplied a numeric argument, the shell-expand-line bindable readline + command does not perform quote removal and suppresses command and process + substitution. + +g. `history -d' understands negative arguments: negative arguments offset from + the end of the history list. + +h. The `name' argument to the `coproc' reserved word now undergoes word + expansion, so unique coprocs can be created in loops. + +i. A nameref name resolution loop in a function now resolves to a variable by + that name in the global scope. + +j. The `wait' builtin now has a `-f' option, which signifies to wait until the + specified job or process terminates, instead of waiting until it changes + state. + +k. There is a define in config-top.h that allows the shell to use a static + value for $PATH, overriding whatever is in the environment at startup, for + use by the restricted shell. + +l. Process substitution does not inherit the `v' option, like command + substitution. + +m. If a non-interactive shell with job control enabled detects that a foreground + job died due to SIGINT, it acts as if it received the SIGINT. + +n. The SIGCHLD trap is run once for each exiting child process even if job + control is not enabled when the shell is in Posix mode. + +o. A new shopt option: localvar_inherit; if set, a local variable inherits the + value of a variable with the same name at the nearest preceding scope. + +p. `bind -r' now checks whether a key sequence is bound before binding it to + NULL, to avoid creating keymaps for a multi-key sequence. + +q. A numeric argument to the line editing `operate-and-get-next' command + specifies which history entry to use. + +r. The positional parameters are now assigned before running the shell startup + files, so startup files can use $@. + +s. There is a compile-time option that forces the shell to disable the check + for an inherited OLDPWD being a directory. + +t. The `history' builtin can now delete ranges of history entries using + `-d start-end'. + +u. The `vi-edit-and-execute-command' bindable readline command now puts readline + back in vi insertion mode after executing commands from the edited file. + +v. The command completion code now matches aliases and shell function names + case-insensitively if the readline completion-ignore-case variable is set. + +w. There is a new `assoc_expand_once' shell option that attempts to expand + associative array subscripts only once. + +x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended + debugging mode is active. The old behavior of unconditionally setting them + is available as part of the shell compatibility options. + +y. The `umask' builtin now allows modes and masks greater than octal 777. + +z. The `times' builtin now honors the current locale when printing a decimal + point. + +aa. There is a new (disabled by default, undocumented) shell option to enable + and disable sending history to syslog at runtime. + +bb. Bash no longer allows variable assignments preceding a special builtin that + changes variable attributes to propagate back to the calling environment + unless the compatibility level is 44 or lower. + +cc. You can set the default value for $HISTSIZE at build time in config-top.h. + +dd. The `complete' builtin now accepts a -I option that applies the completion + to the initial word on the line. + +ee. The internal bash malloc now uses mmap (if available) to satisfy requests + greater than 128K bytes, so free can use mfree to return the pages to the + kernel. + +ff. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup + unless it's in debugging mode, as the documentation has always said, but + will dynamically create them if a script references them at the top level + without having enabled debugging mode. + +gg. The localvar_inherit option will not attempt to inherit a value from a + variable of an incompatible type (indexed vs. associative arrays, for + example). + +hh. The `globasciiranges' option is now enabled by default; it can be set to + off by default at configuration time. + +ii. Associative and indexed arrays now allow subscripts consisting solely of + whitespace. + +jj. `checkwinsize' is now enabled by default. + +kk. The `localvar_unset' shopt option is now visible and documented. + +ll. The `progcomp_alias' shopt option is now visible and documented. + +mm. The signal name processing code now understands `SIGRTMIN+n' all the way + up to SIGRTMAX. + +nn. There is a new `seq' loadable builtin. + +oo. Trap execution now honors the (internal) max invocations of `eval', since + traps are supposed to be executed as if using `eval'. + +pp. The $_ variable doesn't change when the shell executes a command that forks. + +qq. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though + conforming applications aren't supposed to use them. + +rr. POSIX mode now enables the `shift_verbose' option. + +2. New Features in Readline + +a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as + Posix specifies (uses fnmatch(3) if available). + +b. There are new `next-screen-line' and `previous-screen-line' bindable + commands, which move the cursor to the same column in the next, or previous, + physical line, respectively. + +c. There are default key bindings for control-arrow-key key combinations. + +d. A negative argument (-N) to `quoted-insert' means to insert the next N + characters using quoted-insert. + +e. New public function: rl_check_signals(), which allows applications to + respond to signals that readline catches while waiting for input using + a custom read function. + +f. There is new support for conditionally testing the readline version in an + inputrc file, with a full set of arithmetic comparison operators available. + +g. There is a simple variable comparison facility available for use within an + inputrc file. Allowable operators are equality and inequality; string + variables may be compared to a value; boolean variables must be compared to + either `on' or `off'; variable names are separated from the operator by + whitespace. + +h. The history expansion library now understands command and process + substitution and extended globbing and allows them to appear anywhere in a + word. + +i. The history library has a new variable that allows applications to set the + initial quoting state, so quoting state can be inherited from a previous + line. + +j. Readline now allows application-defined keymap names; there is a new public + function, rl_set_keymap_name(), to do that. + +k. The "Insert" keypad key, if available, now puts readline into overwrite + mode. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-4.4 since +the release of bash-4.3. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. There is now a settable configuration #define that will cause the shell + to exit if the shell is running setuid without the -p option and setuid + to the real uid fails. + +b. Command and process substitutions now turn off the `-v' option when + executing, as other shells seem to do. + +c. The default value for the `checkhash' shell option may now be set at + compile time with a #define. + +d. The `mapfile' builtin now has a -d option to use an arbitrary character + as the record delimiter, and a -t option to strip the delimiter as + supplied with -d. + +e. The maximum number of nested recursive calls to `eval' is now settable in + config-top.h; the default is no limit. + +f. The `-p' option to declare and similar builtins will display attributes for + named variables even when those variables have not been assigned values + (which are technically unset). + +g. The maximum number of nested recursive calls to `source' is now settable + in config-top.h; the default is no limit. + +h. All builtin commands recognize the `--help' option and print a usage + summary. + +i. Bash does not allow function names containing `/' and `=' to be exported. + +j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options. + +k. The shell now allows `time ; othercommand' to time null commands. + +l. There is a new `--enable-function-import' configuration option to allow + importing shell functions from the environment; import is enabled by + default. + +m. `printf -v var ""' will now set `var' to the empty string, as if `var=""' + had been executed. + +n. GLOBIGNORE, the pattern substitution word expansion, and programmable + completion match filtering now honor the value of the `nocasematch' option. + +o. There is a new ${parameter@spec} family of operators to transform the + value of `parameter'. + +p. Bash no longer attempts to perform compound assignment if a variable on the + rhs of an assignment statement argument to `declare' has the form of a + compound assignment (e.g., w='(word)' ; declare foo=$w); compound + assignments are accepted if the variable was already declared as an array, + but with a warning. + +q. The declare builtin no longer displays array variables using the compound + assignment syntax with quotes; that will generate warnings when re-used as + input, and isn't necessary. + +r. Executing the rhs of && and || will no longer cause the shell to fork if + it's not necessary. + +s. The `local' builtin takes a new argument: `-', which will cause it to save + and the single-letter shell options and restore their previous values at + function return. + +t. `complete' and `compgen' have a new `-o nosort' option, which forces + readline to not sort the completion matches. + +u. Bash now allows waiting for the most recent process substitution, since it + appears as $!. + +v. The `unset' builtin now unsets a scalar variable if it is subscripted with + a `0', analogous to the ${var[0]} expansion. + +w. `set -i' is no longer valid, as in other shells. + +x. BASH_SUBSHELL is now updated for process substitution and group commands + in pipelines, and is available with the same value when running any exit + trap. + +y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or + not bash is being run in a GNU Emacs shell window. + +z. Bash now treats SIGINT received when running a non-builtin command in a + loop the way it has traditionally treated running a builtin command: + running any trap handler and breaking out of the loop. + +aa. New variable: EXECIGNORE; a colon-separate list of patterns that will + cause matching filenames to be ignored when searching for commands. + +bb. Aliases whose value ends in a shell metacharacter now expand in a way to + allow them to be `pasted' to the next token, which can potentially change + the meaning of a command (e.g., turning `&' into `&&'). + +cc. `make install' now installs the example loadable builtins and a set of + bash headers to use when developing new loadable builtins. + +dd. `enable -f' now attempts to call functions named BUILTIN_builtin_load when + loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows + loadable builtins to run initialization and cleanup code. + +ee. There is a new BASH_LOADABLES_PATH variable containing a list of directories + where the `enable -f' command looks for shared objects containing loadable + builtins. + +ff. The `complete_fullquote' option to `shopt' changes filename completion to + quote all shell metacharacters in filenames and directory names. + +gg. The `kill' builtin now has a `-L' option, equivalent to `-l', for + compatibility with Linux standalone versions of kill. + +hh. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial + environment. + +ii. inherit_errexit: a new `shopt' option that, when set, causes command + substitutions to inherit the -e option. By default, those subshells disable + -e. It's enabled as part of turning on posix mode. + +jj. New prompt string: PS0. Expanded and displayed by interactive shells after + reading a complete command but before executing it. + +kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to + SIG_DFL when the shell is started, so they are set to SIG_DFL in child + processes. + +ll. Posix-mode shells now allow double quotes to quote the history expansion + character. + +mm. OLDPWD can be inherited from the environment if it names a directory. + +nn. Shells running as root no longer inherit PS4 from the environment, closing + a security hole involving PS4 expansion performing command substitution. + +oo. If executing an implicit `cd' when the `autocd' option is set, bash will + now invoke a function named `cd' if one exists before executing the `cd' + builtin. + +pp. Value conversions (arithmetic expansions, case modification, etc.) now + happen when assigning elements of an array using compound assignment. + +qq. There is a new option settable in config-top.h that makes multiple + directory arguments to `cd' a fatal error. + +rr. Bash now uses mktemp() when creating internal temporary files; it produces + a warning at build time on many Linux systems. + +2. New Features in Readline + +a. The history truncation code now uses the same error recovery mechanism as + the history writing code, and restores the old version of the history file + on error. The error recovery mechanism handles symlinked history files. + +b. There is a new bindable variable, `enable-bracketed-paste', which enables + support for a terminal's bracketed paste mode. + +c. The editing mode indicators can now be strings and are user-settable + (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' + variables). Mode strings can contain invisible character sequences. + Setting mode strings to null strings restores the defaults. + +d. Prompt expansion adds the mode string to the last line of a multi-line + prompt (one with embedded newlines). + +e. There is a new bindable variable, `colored-completion-prefix', which, if + set, causes the common prefix of a set of possible completions to be + displayed in color. + +f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- + mode yank-pop. + +g. The redisplay code underwent several efficiency improvements for multibyte + locales. + +h. The insert-char function attempts to batch-insert all pending typeahead + that maps to self-insert, as long as it is coming from the terminal. + +i. rl_callback_sigcleanup: a new application function that can clean up and + unset any state set by readline's callback mode. Intended to be used + after a signal. + +j. If an incremental search string has its last character removed with DEL, the + resulting empty search string no longer matches the previous line. + +k. If readline reads a history file that begins with `#' (or the value of + the history comment character) and has enabled history timestamps, the + history entries are assumed to be delimited by timestamps. This allows + multi-line history entries. + +l. Readline now throws an error if it parses a key binding without a + terminating `:' or whitespace. + +m. The default binding for ^W in vi mode now uses word boundaries specified + by Posix (vi-unix-word-rubout is bindable command name). + +n. rl_clear_visible_line: new application-callable function; clears all + screen lines occupied by the current visible readline line. + +o. rl_tty_set_echoing: application-callable function that controls whether + or not readline thinks it is echoing terminal output. + +p. Handle >| and strings of digits preceding and following redirection + specifications as single tokens when tokenizing the line for history + expansion. + +q. Fixed a bug with displaying completions when the prefix display length + is greater than the length of the completions to be displayed. + +r. The :p history modifier now applies to the entire line, so any expansion + specifying :p causes the line to be printed instead of expanded. + +s. New application-callable function: rl_pending_signal(): returns the signal + number of any signal readline has caught but not yet handled. + +t. New application-settable variable: rl_persistent_signal_handlers: if set + to a non-zero value, readline will enable the readline-6.2 signal handler + behavior in callback mode: handlers are installed when + rl_callback_handler_install is called and removed removed when a complete + line has been read. + +------------------------------------------------------------------------------- +This is a terse description of the new features added to bash-4.3 since +the release of bash-4.2. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. The `helptopic' completion action now maps to all the help topics, not just + the shell builtins. + +b. The `help' builtin no longer does prefix substring matching first, so + `help read' does not match `readonly', but will do it if exact string + matching fails. + +c. The shell can be compiled to not display a message about processes that + terminate due to SIGTERM. + +d. Non-interactive shells now react to the setting of checkwinsize and set + LINES and COLUMNS after a foreground job exits. + +e. There is a new shell option, `globasciiranges', which, when set to on, + forces globbing range comparisons to use character ordering as if they + were run in the C locale. + +f. There is a new shell option, `direxpand', which makes filename completion + expand variables in directory names in the way bash-4.1 did. + +g. In Posix mode, the `command' builtin does not change whether or not a + builtin it shadows is treated as an assignment builtin. + +h. The `return' and `exit' builtins accept negative exit status arguments. + +i. The word completion code checks whether or not a filename containing a + shell variable expands to a directory name and appends `/' to the word + as appropriate. The same code expands shell variables in command names + when performing command completion. + +j. In Posix mode, it is now an error to attempt to define a shell function + with the same name as a Posix special builtin. + +k. When compiled for strict Posix conformance, history expansion is disabled + by default. + +l. The history expansion character (!) does not cause history expansion when + followed by the closing quote in a double-quoted string. + +m. `complete' and its siblings compgen/compopt now takes a new `-o noquote' + option to inhibit quoting of the completions. + +n. Setting HISTSIZE to a value less than zero causes the history list to be + unlimited (setting it 0 zero disables the history list). + +o. Setting HISTFILESIZE to a value less than zero causes the history file size + to be unlimited (setting it to 0 causes the history file to be truncated + to zero size). + +p. The `read' builtin now skips NUL bytes in the input. + +q. There is a new `bind -X' option to print all key sequences bound to Unix + commands. + +r. When in Posix mode, `read' is interruptible by a trapped signal. After + running the trap handler, read returns 128+signal and throws away any + partially-read input. + +s. The command completion code skips whitespace and assignment statements + before looking for the command name word to be completed. + +t. The build process has a new mechanism for constructing separate help files + that better reflects the current set of compilation options. + +u. The -nt and -ot options to test now work with files with nanosecond + timestamp resolution. + +v. The shell saves the command history in any shell for which history is + enabled and HISTFILE is set, not just interactive shells. + +w. The shell has `nameref' variables and new -n(/+n) options to declare and + unset to use them, and a `test -R' option to test for them. + +x. The shell now allows assigning, referencing, and unsetting elements of + indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which + count back from the last element of the array. + +y. The {x}' redirection operator now opens a file for both stdin and diff --git a/NOTES b/NOTES index 4fe9e6c..6fa019a 100644 --- a/NOTES +++ b/NOTES @@ -1,12 +1,12 @@ -Platform-Specific Configuration and Operation Notes -=================================================== +Platform-Specific Configuration and Operation Notes [very dated] +==================================================================== 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 + next running NeXT/OS; machines running Openstep all machines running SunOS YP code: SunOS4, SunOS5, HP/UX, if you have problems with username completion or tilde expansion for @@ -20,6 +20,7 @@ Platform-Specific Configuration and Operation Notes sparc SVR4, SVR4.2 (ICL reference port) DG/UX Cray + Haiku OS NetBSD/sparc (malloc needs 8-byte alignment; bash malloc has 8-byte alignment now, but I have no NetBSD machines to test on) diff --git a/POSIX b/POSIX index 6c57b87..4e78dbb 100644 --- a/POSIX +++ b/POSIX @@ -1,186 +1,264 @@ 6.11 Bash POSIX Mode ==================== -Starting Bash with the `--posix' command-line option or executing `set +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 +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: +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'. + 1. Bash ensures that the 'POSIXLY_CORRECT' variable is set. - 2. The message printed by the job control code and builtins when a job - exits with a non-zero status is `Done(status)'. + 2. 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'. - 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'. + 3. Bash will not insert a command without the execute bit set into the + command hash table, even if it returns it as a (last-ditch) result + from a '$PATH' search. - 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. + 4. The message printed by the job control code and builtins when a job + exits with a non-zero status is 'Done(status)'. - 5. Reserved words appearing in a context where reserved words are - recognized do not undergo alias expansion. + 5. The message printed by the job control code and builtins when a job + is stopped is 'Stopped(SIGNAME)', where SIGNAME is, for example, + 'SIGTSTP'. - 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. + 6. Alias expansion is always enabled, even in non-interactive shells. - 8. Tilde expansion is only performed on assignments preceding a - command name, rather than on all assignment statements on the line. + 7. Reserved words appearing in a context where reserved words are + recognized do not undergo alias expansion. - 9. The default history file is `~/.sh_history' (this is the default - value of `$HISTFILE'). + 8. Alias expansion is performed when initially parsing a command + substitution. The default mode generally defers it, when enabled, + until the command substitution is executed. This means that + command substitution will not expand aliases that are defined after + the command substitution is initially parsed (e.g., as part of a + function definition). - 10. The output of `kill -l' prints all the signal names on a single - line, separated by spaces, without the `SIG' prefix. + 9. 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. - 11. The `kill' builtin does not accept signal names with a `SIG' - prefix. + 10. The POSIX startup files are executed ('$ENV') rather than the + normal Bash files. - 12. Non-interactive shells exit if FILENAME in `.' FILENAME is not - found. + 11. Tilde expansion is only performed on assignments preceding a + command name, rather than on all assignment statements on the line. - 13. Non-interactive shells exit if a syntax error in an arithmetic - expansion results in an invalid expression. + 12. The default history file is '~/.sh_history' (this is the default + value of '$HISTFILE'). - 14. Redirection operators do not perform filename expansion on the word - in the redirection unless the shell is interactive. + 13. 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 + 14. 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 + 15. 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 + 16. Function names may not be the same as one of the POSIX special + builtins. + + 17. POSIX special builtins are found before shell functions during command lookup. - 18. If a POSIX special builtin returns an error status, a + 18. When printing shell function definitions (e.g., by 'type'), Bash + does not print the 'function' keyword. + + 19. Literal tildes that appear as the first character in elements of + the 'PATH' variable are not expanded as described above under *note + Tilde Expansion::. + + 20. The 'time' reserved word may be used by itself as a command. When + used in this way, it displays timing statistics for the shell and + its completed children. The 'TIMEFORMAT' variable controls the + format of the timing information. + + 21. When parsing and expanding a ${...} expansion that appears within + double quotes, single quotes are no longer special and cannot be + used to quote a closing brace or other special character, unless + the operator is one of those defined to perform pattern removal. + In this case, they do not have to appear as matched pairs. + + 22. The parser does not recognize 'time' as a reserved word if the + next token begins with a '-'. + + 23. The '!' character does not introduce history expansion within a + double-quoted string, even if the 'histexpand' option is enabled. + + 24. 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 + 25. 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. + 26. A non-interactive shell exits with an error status if a variable + assignment error occurs in an assignment statement preceding a + special builtin, but not with any other simple command. For any + other simple command, the shell aborts execution of that command, + and execution continues at the top level ("the shell shall not + perform any further processing of the command in which the error + occurred"). + + 27. 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. + + 28. Non-interactive shells exit if FILENAME in '.' FILENAME is not + found. + + 29. Non-interactive shells exit if a syntax error in an arithmetic + expansion results in an invalid expression. + + 30. Non-interactive shells exit if a parameter expansion error occurs. + + 31. Non-interactive shells exit if there is a syntax error in a script + read with the '.' or 'source' builtins, or in a string processed by + the 'eval' builtin. - 22. Process substitution is not available. + 32. While variable indirection is available, it may not be applied to + the '#' and '?' special parameters. - 23. Assignment statements preceding POSIX special builtins persist in + 33. Expanding the '*' special parameter in a pattern context where the + expansion is double-quoted does not treat the '$*' as if it were + double-quoted. + + 34. 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. + 35. The 'command' builtin does not prevent builtins that take + assignment statements as arguments from expanding them as + assignment statements; when not in POSIX mode, assignment builtins + lose their assignment statement expansion properties when preceded + by 'command'. - 25. The `export' and `readonly' builtin commands display their output + 36. 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. + + 37. The output of 'kill -l' prints all the signal names on a single + line, separated by spaces, without the 'SIG' prefix. + + 38. The 'kill' builtin does not accept signal names with a 'SIG' + prefix. + + 39. 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'. + 40. The 'trap' builtin displays signal names without the leading + 'SIG'. - 27. The `trap' builtin doesn't check the first argument for a possible + 41. 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. + 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'. + 42. 'trap -p' displays signals whose dispositions are set to SIG_DFL + and those that were ignored when the shell started. - 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. + 43. The '.' and 'source' builtins do not search the current directory + for the filename argument if it is not found by searching 'PATH'. - 30. Alias expansion is always enabled, even in non-interactive shells. + 44. Enabling POSIX mode has the effect of setting the + 'inherit_errexit' option, so subshells spawned to execute command + substitutions inherit the value of the '-e' option from the parent + shell. When the 'inherit_errexit' option is not enabled, Bash + clears the '-e' option in such subshells. - 31. When the `alias' builtin displays alias definitions, it does not - display them with a leading `alias ' unless the `-p' option is + 45. Enabling POSIX mode has the effect of setting the 'shift_verbose' + option, so numeric arguments to 'shift' that exceed the number of + positional parameters will result in an error message. + + 46. 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 + 47. 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 + 48. 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. + 49. 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. + 50. When the 'cd' builtin cannot change a directory because the length + of the pathname constructed from '$PWD' and the directory name + supplied as an argument exceeds 'PATH_MAX' when all symbolic links + are expanded, 'cd' will fail instead of attempting to use only the + supplied directory name. - 36. The `pwd' builtin verifies that the value it prints is the same as + 51. 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. + system with the '-P' option. - 37. When listing the history, the `fc' builtin does not include an + 52. 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'. + 53. 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'. + 54. 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'. + 55. 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 + 56. 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. + 57. 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. + 58. 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. + 59. The 'read' builtin may be interrupted by a signal for which a trap + has been set. If Bash receives a trapped signal while executing + 'read', the trap handler executes and 'read' returns an exit status + greater than 128. + + 60. The 'printf' builtin uses 'double' (via 'strtod') to convert + arguments corresponding to floating point conversion specifiers, + instead of 'long double' if it's available. The 'L' length + modifier forces 'printf' to use 'long double' if it's available. + + 61. Bash removes an exited background process's status from the list + of such statuses after the 'wait' builtin is used to obtain it. 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. + 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 +the '--enable-strict-posix-default' to 'configure' when building (*note Optional Features::). diff --git a/RBASH b/RBASH index 0e5c10b..7d0a5e8 100644 --- a/RBASH +++ b/RBASH @@ -1,49 +1,52 @@ 6.10 The Restricted Shell ========================= -If Bash is started with the name `rbash', or the `--restricted' or `-r' +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' +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. - + * Changing directories with the 'cd' builtin. + * Setting or unsetting the values of the 'SHELL', 'PATH', 'HISTFILE', + 'ENV', or 'BASH_ENV' variables. * Specifying command names containing slashes. - - * Specifying a filename containing a slash as an argument to the `.' + * 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. - + * Specifying a filename containing a slash as an argument to the + 'history' 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 + * Parsing the value of 'SHELLOPTS' from the shell environment at startup. - - * Redirecting output using the `>', `>|', `<>', `>&', `&>', and `>>' + * 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 + * 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'. + * Specifying the '-p' option to the 'command' builtin. + * Turning off restricted mode with 'set +r' or 'shopt -u + restricted_shell'. 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 +Shell Scripts::), 'rbash' turns off any restrictions in the shell spawned to execute the script. +The restricted shell mode is only one component of a useful restricted +environment. It should be accompanied by setting 'PATH' to a value that +allows execution of only a few verified commands (commands that allow +shell escapes are particularly vulnerable), changing the current +directory to a non-writable directory other than '$HOME' after login, +not allowing the restricted shell to execute shell scripts, and cleaning +the environment of variables that cause some commands to modify their +behavior (e.g., 'VISUAL' or 'PAGER'). + +Modern systems provide more secure ways to implement a restricted +environment, such as 'jails', 'zones', or 'containers'. + diff --git a/README b/README index c5c7159..90d0be5 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ 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, +This is GNU Bash, version 5.2. Bash is the GNU Project's Bourne +Again SHell, a complete implementation of the POSIX 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. @@ -12,11 +12,11 @@ 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'. +from the POSIX 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 +of Bash and previous widely-distributed versions, bash-4.4, bash-5.0, +and bash-5.1. 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 @@ -25,12 +25,12 @@ 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'. +`doc/FAQ'. (That file is no longer updated.) -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 +To compile Bash, type `./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 @@ -79,12 +79,28 @@ please send mail to bug-bash@gnu.org with the following information: The `bashbug' program includes much of this automatically. +Questions and requests for help with bash and bash programming may be +sent to the help-bash@gnu.org mailing list. + 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. +Other Packages +============== + +This distribution includes, in examples/bash-completion, a recent version +of the `bash-completion' package, which provides programmable completions +for a number of commands. It's available as a package in many distributions, +and that is the first place from which to obtain it. + +The latest version of bash-completion is always available from +https://github.com/scop/bash-completion. + +If it's not a package from your vendor, you may install the included version. + Enjoy! Chet Ramey diff --git a/aclocal.m4 b/aclocal.m4 index 10a4741..cc97bd4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -3,53 +3,8 @@ 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 Copyright (C) 1987-2021 Free Software Foundation, Inc. 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 . This is separated out so that it can be @@ -64,17 +19,20 @@ AC_DEFUN(BASH_HEADER_INTTYPES, 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 This could be changed to use AC_COMPILE_IFELSE instead of AC_EGREP_CPP 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 -#if STDC_HEADERS +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #if HAVE_INTTYPES_H @@ -102,45 +60,29 @@ 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 -#endif -#if HAVE_INTTYPES_H -# include -#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_CHECK_DECLS([$1]) ]) AC_DEFUN(BASH_DECL_PRINTF, [AC_MSG_CHECKING(for declaration of printf in ) AC_CACHE_VAL(bash_cv_printf_declared, -[AC_TRY_RUN([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #ifdef __STDC__ typedef int (*_bashfunc)(const char *, ...); #else typedef int (*_bashfunc)(); #endif +#include +int main() { _bashfunc pf; pf = (_bashfunc) printf; exit(pf == 0); } -], bash_cv_printf_declared=yes, bash_cv_printf_declared=no, +]])], [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] )]) @@ -167,13 +109,13 @@ 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([ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include #ifdef HAVE_UNISTD_H #include -#endif], [ char *msg = _sys_siglist[2]; ], - bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no, +#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 @@ -185,50 +127,68 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #ifdef HAVE_UNISTD_H #include #endif +#include #ifndef UNDER_SYS_SIGLIST_DECLARED extern char *_sys_siglist[]; #endif +int main() { char *msg = (char *)_sys_siglist[2]; exit(msg == 0); -}], - bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no, +} +]])], + [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])]) + 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 ]) +dnl this defines HAVE_DECL_SYS_SIGLIST +AC_DEFUN([BASH_DECL_SYS_SIGLIST], +[AC_CHECK_DECLS([sys_siglist],,, +[#include +/* NetBSD declares sys_siglist in unistd.h. */ +#ifdef HAVE_UNISTD_H +# include +#endif +]) +]) + AC_DEFUN(BASH_SYS_SIGLIST, -[AC_REQUIRE([AC_DECL_SYS_SIGLIST]) +[AC_REQUIRE([BASH_DECL_SYS_SIGLIST]) AC_MSG_CHECKING([for sys_siglist in system C library]) AC_CACHE_VAL(bash_cv_sys_siglist, -[AC_TRY_RUN([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #ifdef HAVE_UNISTD_H #include #endif +#include #if !HAVE_DECL_SYS_SIGLIST extern char *sys_siglist[]; #endif +int main() { char *msg = sys_siglist[2]; exit(msg == 0); -}], - bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no, +} +]])], [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])]) + 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) @@ -253,11 +213,15 @@ 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 ], -[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_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +]],[[ +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] +)]) AC_MSG_RESULT($bash_cv_sys_errlist) if test $bash_cv_sys_errlist = yes; then AC_DEFINE(HAVE_SYS_ERRLIST) @@ -270,9 +234,11 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include +#include +int main() { int fd1, fd2, fl; @@ -286,10 +252,10 @@ main() /* 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, +]])], [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]) -]) + bash_cv_dup2_broken=no] +)]) AC_MSG_RESULT($bash_cv_dup2_broken) if test $bash_cv_dup2_broken = yes; then AC_DEFINE(DUP2_BROKEN) @@ -299,10 +265,12 @@ 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 -#include ], -[char *s = (char *)strsignal(2);], - bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)]) +[AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include +#include +#include ]], +[[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) @@ -314,13 +282,16 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ +#ifdef HAVE_SYS_STAT_H +#include +#endif #if defined(HAVE_DIRENT_H) # include #else @@ -335,6 +306,8 @@ AC_CACHE_VAL(bash_cv_opendir_not_robust, # include # endif #endif /* HAVE_DIRENT_H */ +#include +int main() { DIR *dir; @@ -352,7 +325,8 @@ 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, +} +]])], [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] )]) @@ -362,26 +336,6 @@ 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 -#include -#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 @@ -469,80 +423,98 @@ else 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_SIZEOF_RLIMIT, +[AC_MSG_CHECKING(for size of struct rlimit fields) +AC_CACHE_VAL(bash_cv_sizeof_rlim_cur, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#ifdef HAVE_SYS_TIME_H +#include +#endif +#include +#include +main() +{ +struct rlimit r; +exit(sizeof (r.rlim_cur)); +} +]])], [bash_cv_sizeof_rlim_cur=$?], [bash_cv_sizeof_rlim_cur=$?], + [AC_MSG_WARN(cannot check size of rlimit fields if cross compiling -- defaulting to long) + bash_cv_sizeof_rlim_cur=$ac_cv_sizeof_long] +)]) +AC_MSG_RESULT($bash_cv_sizeof_rlim_cur) ]) -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 +AC_DEFUN(BASH_SIZEOF_QUAD_T, +[AC_MSG_CHECKING(for size of quad_t) +AC_CACHE_VAL(bash_cv_sizeof_quad_t, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif + +main() +{ +#if HAVE_QUAD_T +quad_t x; +exit(sizeof (x)); +#else +exit (0); +#endif +} +]])], [bash_cv_sizeof_quad_t=$?], [bash_cv_sizeof_quad_t=$?], + [AC_MSG_WARN(cannot check size of quad_t if cross compiling -- defaulting to 0) + bash_cv_sizeof_quad_t=0] +)]) +AC_MSG_RESULT($bash_cv_sizeof_quad_t) ]) 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 Type of struct rlimit fields: updated to check POSIX rlim_t and +dnl if it doesn't exist determine the best guess based on sizeof(r.rlim_cur) dnl AC_DEFUN(BASH_TYPE_RLIMIT, -[AC_MSG_CHECKING(for size and type of struct rlimit fields) +[AC_MSG_CHECKING(for type of struct rlimit fields) AC_CACHE_VAL(bash_cv_type_rlimit, -[AC_TRY_COMPILE([#include -#include ], -[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[ -AC_TRY_RUN([ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -#include -#include -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) +#include ]], +[[rlim_t xxx;]] +)], + [bash_cv_type_rlimit=rlim_t], [ +BASH_SIZEOF_RLIMIT +BASH_SIZEOF_QUAD_T +if test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long; then + bash_cv_type_rlimit='unsigned long' +elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long_long; then + bash_cv_type_rlimit='unsigned long long' +elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_int; then + bash_cv_type_rlimit='unsigned int' +elif test $bash_cv_sizeof_rlim_cur = $bash_cv_sizeof_quad_t; then + bash_cv_type_rlimit='quad_t' +else + bash_cv_type_rlimit='unsigned long' fi +] +)]) +AC_MSG_RESULT($bash_cv_type_rlimit) +AC_DEFINE_UNQUOTED([RLIMTYPE], [$bash_cv_type_rlimit]) ]) 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 -],[ sig_atomic_t x; ], -ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)]) +[AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ #include ]], + [[ 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) + BASH_CHECK_TYPE(sig_atomic_t, [#include ], int) fi ]) @@ -550,11 +522,13 @@ AC_DEFUN(BASH_FUNC_LSTAT, [dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an dnl inline function in . AC_CACHE_CHECK([for lstat], bash_cv_func_lstat, -[AC_TRY_LINK([ -#include -#include -],[ lstat(".",(struct stat *)0); ], -bash_cv_func_lstat=yes, bash_cv_func_lstat=no)]) +[AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ + #include + #include + ]], + [[ 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 @@ -563,12 +537,12 @@ fi AC_DEFUN(BASH_FUNC_INET_ATON, [ AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton, -[AC_TRY_LINK([ +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include -struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ], -bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)]) +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 @@ -579,10 +553,11 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_UNISTD_H # include #endif +#include #ifndef __STDC__ # ifndef const # define const @@ -598,6 +573,7 @@ getenv (name) { return "42"; } +int main() { char *s; @@ -610,7 +586,7 @@ exit(1); s = getenv("ABCDE"); exit(s == 0); /* force optimizer to leave getenv in */ } -], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no, +]])], [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] )]) @@ -623,12 +599,13 @@ 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 +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #ifndef __STDC__ @@ -641,9 +618,8 @@ extern int putenv (char *); #else extern int putenv (); #endif -], -[return (putenv == 0);], -bash_cv_std_putenv=yes, bash_cv_std_putenv=no +]], [[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) @@ -653,12 +629,13 @@ 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 +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #ifndef __STDC__ @@ -671,9 +648,8 @@ extern int unsetenv (const char *); #else extern int unsetenv (); #endif -], -[return (unsetenv == 0);], -bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no +]], [[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) @@ -683,13 +659,18 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#ifdef HAVE_ULIMIT_H +#include +#endif +int main() { long maxfds = ulimit(4, 0L); exit (maxfds == -1L); } -], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no, +]])], [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] )]) @@ -702,19 +683,21 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #ifdef HAVE_UNISTD_H #include #endif +#include +int main() { char *xpwd; xpwd = getcwd(0, 0); exit (xpwd == 0); } -], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no, +]])], [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] )]) @@ -727,7 +710,7 @@ 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 system, we can't use AC_PREREQ. Only called if we need the socket library dnl AC_DEFUN(BASH_FUNC_GETHOSTBYNAME, [if test "X$bash_cv_have_gethostbyname" = "X"; then @@ -737,11 +720,14 @@ AC_MSG_CHECKING(for gethostbyname in socket library) _bash_needmsg= fi AC_CACHE_VAL(bash_cv_have_gethostbyname, -[AC_TRY_LINK([#include ], -[ struct hostent *hp; - hp = gethostbyname("localhost"); -], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)] -) +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +]], [[ +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 @@ -754,21 +740,22 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include +int main() { #ifdef FNM_EXTMATCH - exit (0); + return (0); #else - exit (1); + return (1); #endif } -], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no, +]])], [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]) -]) + 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) @@ -779,14 +766,16 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_UNISTD_H #include #endif #include #include #include +#include +int main() { #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) @@ -794,21 +783,30 @@ exit (1); #else int code; -sigset_t set, oset; +sigset_t set, oset, nset; sigjmp_buf xx; /* get the mask */ sigemptyset(&set); sigemptyset(&oset); -sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); +/* paranoia -- make sure SIGINT is not blocked */ +sigdelset (&oset, SIGINT); +sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); /* save it */ code = sigsetjmp(xx, 1); if (code) - exit(0); /* could get sigmask and compare to oset here. */ +{ + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &nset); + /* could compare nset to oset here, but we just look for SIGINT */ + if (sigismember (&nset, SIGINT)) + exit(1); + exit(0); +} -/* change it */ +/* change it so that SIGINT is blocked */ sigaddset(&set, SIGINT); sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); @@ -816,9 +814,14 @@ sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); 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] +} +]])], [bash_cv_func_sigsetjmp=present], [bash_cv_func_sigsetjmp=missing], + [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals) + if test "$bash_cv_posix_signals" = "yes" ; then + bash_cv_func_sigsetjmp=present + else + bash_cv_func_sigsetjmp=missing + fi] )]) AC_MSG_RESULT($bash_cv_func_sigsetjmp) if test $bash_cv_func_sigsetjmp = present; then @@ -827,15 +830,17 @@ fi ]) AC_DEFUN(BASH_FUNC_STRCOLL, -[ -AC_MSG_CHECKING(whether or not strcoll and strcmp differ) +[AC_MSG_CHECKING(whether or not strcoll and strcmp differ) AC_CACHE_VAL(bash_cv_func_strcoll_broken, -[AC_TRY_RUN([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #if defined (HAVE_LOCALE_H) #include #endif +#include +#include +int main(c, v) int c; char *v[]; @@ -865,7 +870,7 @@ char *v[]; in the default locale. */ exit (r1 > 0 && r2 > 0); } -], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no, +]])], [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] )]) @@ -878,9 +883,10 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include +#include int main() @@ -891,7 +897,7 @@ main() sprintf(abuf, "%A", y); exit(strchr(abuf, 'P') == (char *)0); } -], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no, +]])], [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] )]) @@ -928,19 +934,18 @@ 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( -[ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include -], -[ +]], [[ +int 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) +]])], [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 @@ -962,7 +967,8 @@ AC_CACHE_VAL(bash_cv_termcap_lib, [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)])])])])]) + [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw, + bash_cv_termcap_lib=gnutermcap)])])])])])]) if test "X$_bash_needmsg" = "Xyes"; then AC_MSG_CHECKING(which library has the termcap functions) fi @@ -984,7 +990,8 @@ elif test $bash_cv_termcap_lib = libc; then TERMCAP_LIB= TERMCAP_DEP= else -TERMCAP_LIB=-lcurses +# we assume ncurses is installed somewhere the linker can find it +TERMCAP_LIB=-lncurses TERMCAP_DEP= fi ]) @@ -1039,11 +1046,12 @@ if test $bash_cv_have_socklib = yes; then 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([ +dnl like _AC_STRUCT_DIRENT(MEMBER) but public +AC_DEFUN(BASH_STRUCT_DIRENT, +[ +AC_REQUIRE([AC_HEADER_DIRENT]) +AC_CHECK_MEMBERS(struct dirent.$1, bash_cv_dirent_has_$1=yes, bash_cv_dirent_has_$1=no, +[[ #include #include #ifdef HAVE_UNISTD_H @@ -1063,11 +1071,15 @@ AC_CACHE_VAL(bash_cv_dirent_has_dino, # include # 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_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_d_ino, [BASH_STRUCT_DIRENT([d_ino])]) +AC_MSG_RESULT($bash_cv_dirent_has_d_ino) +if test $bash_cv_dirent_has_d_ino = yes; then AC_DEFINE(HAVE_STRUCT_DIRENT_D_INO) fi ]) @@ -1075,30 +1087,7 @@ 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 -#include -#ifdef HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ -#if defined(HAVE_DIRENT_H) -# include -#else -# define dirent direct -# ifdef HAVE_SYS_NDIR_H -# include -# endif /* SYSNDIR */ -# ifdef HAVE_SYS_DIR_H -# include -# endif /* SYSDIR */ -# ifdef HAVE_NDIR_H -# include -# 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_CACHE_VAL(bash_cv_dirent_has_d_fileno, [BASH_STRUCT_DIRENT([d_fileno])]) 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) @@ -1108,30 +1097,7 @@ 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 -#include -#ifdef HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ -#if defined(HAVE_DIRENT_H) -# include -#else -# define dirent direct -# ifdef HAVE_SYS_NDIR_H -# include -# endif /* SYSNDIR */ -# ifdef HAVE_SYS_DIR_H -# include -# endif /* SYSDIR */ -# ifdef HAVE_NDIR_H -# include -# 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_CACHE_VAL(bash_cv_dirent_has_d_namlen, [BASH_STRUCT_DIRENT([d_namlen])]) 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) @@ -1141,12 +1107,17 @@ 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_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + ]], + [[static struct timeval x; x.tv_sec = x.tv_usec;]] + )], + 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 @@ -1170,16 +1141,47 @@ if test $bash_cv_struct_timezone = yes; then fi ]) +AC_DEFUN(BASH_CHECK_WINSIZE_IOCTL, +[AC_CACHE_VAL(bash_cv_struct_winsize_ioctl, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], +[[ +struct winsize x; +if (sizeof (x) > 0) return (0); +]] )], [bash_cv_struct_winsize_ioctl=yes], [bash_cv_struct_winsize_ioctl=no]) +]) +]) + +AC_DEFUN(BASH_CHECK_WINSIZE_TERMIOS, +[AC_CACHE_VAL(bash_cv_struct_winsize_termios, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], +[[ +struct winsize x; +if (sizeof (x) > 0) return (0); +]] )], [bash_cv_struct_winsize_termios=yes], [bash_cv_struct_winsize_termios=no]) +]) +]) + 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 -#include ], [struct winsize x;], - bash_cv_struct_winsize_header=ioctl_h, - [AC_TRY_COMPILE([#include -#include ], [struct winsize x;], - bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other) -])]) +[ +BASH_CHECK_WINSIZE_IOCTL +BASH_CHECK_WINSIZE_TERMIOS + +if test $bash_cv_struct_winsize_ioctl = yes; then + bash_cv_struct_winsize_header=ioctl_h +elif test $bash_cv_struct_winsize_termios = yes; then + bash_cv_struct_winsize_header=termios_h +else + bash_cv_struct_winsize_header=other +fi +]) if test $bash_cv_struct_winsize_header = ioctl_h; then AC_MSG_RESULT(sys/ioctl.h) AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL) @@ -1191,35 +1193,68 @@ else 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 ],[ +AC_DEFUN(BASH_HAVE_POSIX_SIGNALS, +[AC_CACHE_VAL(bash_cv_posix_signals, +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +]], [[ 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 ], [ - int mask = sigmask(SIGINT); - sigsetmask(mask); sigblock(mask); sigpause(mask); - ], bash_cv_signal_vintage=4.2bsd, - [ - AC_TRY_LINK([ - #include - 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 - )] - )] -) +]] )], +[bash_cv_posix_signals=yes], [bash_cv_posix_signals=no] +)]) +]) + +AC_DEFUN(BASH_HAVE_BSD_SIGNALS, +[AC_CACHE_VAL(bash_cv_bsd_signals, +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +]], [[ +int mask = sigmask(SIGINT); +sigsetmask(mask); sigblock(mask); sigpause(mask); +]] )], +[bash_cv_bsd_signals=yes], [bash_cv_bsd_signals=no] +)]) +]) + +AC_DEFUN(BASH_HAVE_SYSV_SIGNALS, +[AC_CACHE_VAL(bash_cv_sysv_signals, +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +void foo() { } +]], [[ +int mask = sigmask(SIGINT); +sigset(SIGINT, foo); sigrelse(SIGINT); +sighold(SIGINT); sigpause(SIGINT); +]] )], +[bash_cv_sysv_signals=yes], [bash_cv_sysv_signals=no] +)]) +]) + +dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) +AC_DEFUN(BASH_SYS_SIGNAL_VINTAGE, +[AC_MSG_CHECKING(for type of signal functions) +AC_CACHE_VAL(bash_cv_signal_vintage, +[ +BASH_HAVE_POSIX_SIGNALS +if test $bash_cv_posix_signals = yes; then + bash_cv_signal_vintage=posix +else + BASH_HAVE_BSD_SIGNALS + if test $bash_cv_bsd_signals = yes; then + bash_cv_signal_vintage=4.2bsd + else + BASH_HAVE_SYSV_SIGNALS + if test $bash_cv_sysv_signals = yes; then + bash_cv_signal_vintage=svr3 + else + bash_cv_signal_vintage=v7 + fi + fi +fi ]) AC_MSG_RESULT($bash_cv_signal_vintage) if test "$bash_cv_signal_vintage" = posix; then @@ -1236,10 +1271,15 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_UNISTD_H # include #endif +#ifdef HAVE_SYS_WAIT_H +# include +#endif +#include +int main() { # ifdef GETPGRP_VOID @@ -1284,10 +1324,10 @@ main() wait(&status); exit(ok ? 0 : 5); } -], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes, +]])], [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]) -]) + bash_cv_pgrp_pipe=no] +)]) AC_MSG_RESULT($bash_cv_pgrp_pipe) if test $bash_cv_pgrp_pipe = yes; then AC_DEFINE(PGRP_PIPE) @@ -1295,19 +1335,19 @@ fi ]) AC_DEFUN(BASH_SYS_REINSTALL_SIGHANDLERS, -[AC_REQUIRE([AC_TYPE_SIGNAL]) -AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE]) +[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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #ifdef HAVE_UNISTD_H #include #endif +#include -typedef RETSIGTYPE sigfunc(); +typedef void sigfunc(); -int nsigint; +volatile int nsigint; #ifdef HAVE_POSIX_SIGNALS sigfunc * @@ -1327,13 +1367,14 @@ set_signal_handler(sig, handler) #define set_signal_handler(s, h) signal(s, h) #endif -RETSIGTYPE +void sigint(s) int s; { nsigint++; } +int main() { nsigint = 0; @@ -1342,7 +1383,7 @@ main() kill((int)getpid(), SIGINT); exit(nsigint != 2); } -], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes, +]])], [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] )]) @@ -1357,7 +1398,7 @@ 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([ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifdef HAVE_SYS_WAIT_H #include @@ -1367,42 +1408,39 @@ AC_CACHE_VAL(bash_cv_job_control_missing, #endif #include -/* Add more tests in here as appropriate. */ -main() -{ +/* add more tests in here as appropriate */ + /* signal type */ #if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) -exit(1); +#error #endif /* signals and tty control. */ #if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) -exit (1); +#error #endif /* process control */ #if !defined (WNOHANG) || !defined (WUNTRACED) -exit(1); +#error #endif /* Posix systems have tcgetpgrp and waitpid. */ #if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) -exit(1); +#error #endif #if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) -exit(1); +#error #endif /* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ #if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) -exit(1); +#error #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] +]], [[ int x; ]] )], +[bash_cv_job_control_missing=present], [bash_cv_job_control_missing=missing] )]) AC_MSG_RESULT($bash_cv_job_control_missing) if test $bash_cv_job_control_missing = missing; then @@ -1415,14 +1453,17 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #ifdef HAVE_UNISTD_H #include #endif +#include +#include /* Add more tests in here as appropriate. */ +int main() { int fd, err; @@ -1452,7 +1493,8 @@ 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, +} +]])], [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] )]) @@ -1484,9 +1526,11 @@ 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 -#include ], [int x = TIOCGWINSZ;], - bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)]) +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include ]], [[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) @@ -1496,10 +1540,12 @@ 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 -#include ], [int x = TIOCSTAT;], - bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)]) -AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl) +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include ]], [[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 @@ -1508,9 +1554,11 @@ 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 -#include ], [int x = FIONREAD;], - bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)]) +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include ]], [[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) @@ -1526,8 +1574,11 @@ 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 ], [speed_t x;], - bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)]) +[AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[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) @@ -1585,9 +1636,7 @@ 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 +[if (exec test -r /dev/stdin < /dev/null) ; then bash_cv_dev_stdin=present else bash_cv_dev_stdin=absent @@ -1599,31 +1648,41 @@ if test $bash_cv_dev_stdin = "present"; then fi ]) + +AC_DEFUN(BASH_CHECK_RLIMIT, +[AC_CACHE_VAL(bash_cv_rlimit, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], +[[ + int f; + f = RLIMIT_DATA; +]] )], +[bash_cv_rlimit=yes], [bash_cv_rlimit=no] +)]) +]) + 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 -#include -], -[ - int f; - f = RLIMIT_DATA; -], bash_cv_kernel_rlimit=no, -[AC_TRY_COMPILE([ +[BASH_CHECK_RLIMIT +if test $bash_cv_rlimit = no; then +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #define _KERNEL #include #undef _KERNEL -], -[ - int f; - f = RLIMIT_DATA; -], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)] -)]) +]], +[[ + int f; + f = RLIMIT_DATA; +]] )], [bash_cv_kernel_rlimit=yes], [bash_cv_kernel_rlimit=no] ) +fi +]) AC_MSG_RESULT($bash_cv_kernel_rlimit) if test $bash_cv_kernel_rlimit = yes; then AC_DEFINE(RLIMIT_NEEDS_KERNEL) @@ -1638,14 +1697,15 @@ 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([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_UNISTD_H #include #endif #include -],[ +]],[[ switch (0) case 0: case (sizeof (off_t) <= 4):; -], bash_cv_off_t_64=no, bash_cv_off_t_64=yes)) +]] )], [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]) @@ -1653,14 +1713,16 @@ 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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include +#include #ifndef NSIG # define NSIG 64 #endif +int main () { int n_sigs = 2 * NSIG; @@ -1671,7 +1733,8 @@ main () #endif exit(rtmin < n_sigs); -}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no, +} +]])], [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] )]) @@ -1692,9 +1755,12 @@ AC_CHECK_HEADERS(wctype.h) AC_CHECK_HEADERS(wchar.h) AC_CHECK_HEADERS(langinfo.h) +AC_CHECK_HEADERS(mbstr.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(mbsnrtowcs, AC_DEFINE(HAVE_MBSNRTOWCS)) AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) AC_REPLACE_FUNCS(mbschr) @@ -1705,6 +1771,8 @@ AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP)) AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE)) +AC_REPLACE_FUNCS(wcswidth) + dnl checks for both mbrtowc and mbstate_t AC_FUNC_MBRTOWC if test $ac_cv_func_mbrtowc = yes; then @@ -1713,59 +1781,85 @@ 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 ], -[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 +AC_REQUIRE([AM_LANGINFO_CODESET]) dnl check for wchar_t in AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t, -[AC_TRY_COMPILE( -[#include -], -[ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +[#include ]], +[[ wchar_t foo; foo = 0; -], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)]) +]] )], [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 AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t, -[AC_TRY_COMPILE( -[#include ], -[ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +[#include ]], +[[ wctype_t foo; foo = 0; -], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)]) +]] )], [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 AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t, -[AC_TRY_COMPILE( -[#include ], -[ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +[#include ]], +[[ wint_t foo; foo = 0; -], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)]) +]] )], [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 +dnl check for broken wcwidth +AC_CACHE_CHECK([for wcwidth broken with unicode combining characters], +bash_cv_wcwidth_broken, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include + +#include +#include + +int +main(c, v) +int c; +char **v; +{ + int w; + + setlocale(LC_ALL, "en_US.UTF-8"); + w = wcwidth (0x0301); + exit (w == 0); /* exit 0 if wcwidth broken */ +} +]])], [bash_cv_wcwidth_broken=yes], [bash_cv_wcwidth_broken=no], + [bash_cv_wcwidth_broken=no] +)]) +if test "$bash_cv_wcwidth_broken" = yes; then + AC_DEFINE(WCWIDTH_BROKEN, 1, [wcwidth is usually not broken]) +fi + if test "$am_cv_func_iconv" = yes; then OLDLIBS="$LIBS" - LIBS="$LIBS $LIBICONV" + LIBS="$LIBS $LIBINTL $LIBICONV" AC_CHECK_FUNCS(locale_charset) LIBS="$OLDLIBS" fi +AC_CHECK_SIZEOF(wchar_t, 4) + ]) dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB @@ -1802,12 +1896,14 @@ CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}" LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" AC_CACHE_VAL(ac_cv_rl_version, -[AC_TRY_RUN([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include +#include extern int rl_gnu_readline_p; +int main() { FILE *fp; @@ -1821,10 +1917,11 @@ main() fclose(fp); exit(0); } -], -ac_cv_rl_version=`cat conftest.rlv`, -ac_cv_rl_version='0.0', -ac_cv_rl_version='4.2')]) +]])], +[ac_cv_rl_version=`cat conftest.rlv`], +[ac_cv_rl_version='0.0'], +[ac_cv_rl_version='8.0'] +)]) CFLAGS="$_save_CFLAGS" LDFLAGS="$_save_LDFLAGS" @@ -1887,63 +1984,21 @@ 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 -#endif -#include -#include - -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([ +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include +#include #ifndef errno extern int errno; #endif +int main() { int x; @@ -1954,7 +2009,7 @@ main() else exit (0); } -], bash_cv_wcontinued_broken=no,bash_cv_wcontinued_broken=yes, +]])], [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] )]) @@ -1970,7 +2025,7 @@ dnl AC_DEFUN([AM_PATH_LISPDIR], - [AC_ARG_WITH(lispdir, AC_HELP_STRING([--with-lispdir], [override the default lisp directory]), + [AC_ARG_WITH(lispdir, AS_HELP_STRING([--with-lispdir], [override the default lisp directory]), [ lispdir="$withval" AC_MSG_CHECKING([where .elc files should go]) AC_MSG_RESULT([$lispdir])], @@ -1994,2036 +2049,6 @@ AC_DEFUN([AM_PATH_LISPDIR], 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 ], - [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 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 , 1995-2000. -dnl Bruno Haible , 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 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 -]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 -]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 -]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 -#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 -#include ], - [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 -#include ], - [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 -#include -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 -#include - -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 exists and doesn't clash with -# . - -AC_DEFUN([gt_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, - [ - AC_TRY_COMPILE( - [#include -#include ], - [], 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 exists and doesn't clash with .]) - 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 exists, -# doesn't clash with , 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 -#include ], - [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 exists, doesn't clash with , - 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 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 -#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 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 , 1995. - -# Check whether LC_MESSAGES is available in . - -AC_DEFUN([AM_LC_MESSAGES], -[ - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [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 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 &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 , 1995-2000. -dnl Bruno Haible , 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 , 1995-2000. -dnl Bruno Haible , 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 , 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 exists, -# doesn't clash with , 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 -#include ], - [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 exists, doesn't clash with , - 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 or . - -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 and don't define.]) - else - AC_DEFINE(HAVE_UINTMAX_T, 1, - [Define if you have the 'uintmax_t' type in or .]) - 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], [ @@ -4037,16 +2062,18 @@ 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([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include +#include +int main() { int n; n = snprintf (0, 0, "%s", "0123456"); exit(n != 7); } -], bash_cv_func_snprintf=yes, bash_cv_func_snprintf=no, +]])], [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] )]) @@ -4065,7 +2092,7 @@ 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([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #if HAVE_STDARG_H #include #else @@ -4096,13 +2123,14 @@ foo(format, va_alist) return n; } +int main() { int n; n = foo("%s", "0123456"); exit(n != 7); } -], bash_cv_func_vsnprintf=yes, bash_cv_func_vsnprintf=no, +]])], [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] )]) @@ -4115,3 +2143,125 @@ main() [Define if you have a standard-conformant vsnprintf function.]) fi ]) + +AC_DEFUN(BASH_STRUCT_WEXITSTATUS_OFFSET, +[AC_MSG_CHECKING(for offset of exit status in return status from wait) +AC_CACHE_VAL(bash_cv_wexitstatus_offset, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include + +#include + +int +main(c, v) + int c; + char **v; +{ + pid_t pid, p; + int s, i, n; + + s = 0; + pid = fork(); + if (pid == 0) + exit (42); + + /* wait for the process */ + p = wait(&s); + if (p != pid) + exit (255); + + /* crack s */ + for (i = 0; i < (sizeof(s) * 8); i++) + { + n = (s >> i) & 0xff; + if (n == 42) + exit (i); + } + + exit (254); +} +]])], [bash_cv_wexitstatus_offset=0], [bash_cv_wexitstatus_offset=$?], + [AC_MSG_WARN(cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0) + bash_cv_wexitstatus_offset=0] +)]) +if test "$bash_cv_wexitstatus_offset" -gt 32 ; then + AC_MSG_WARN(bad exit status from test program -- defaulting to 0) + bash_cv_wexitstatus_offset=0 +fi +AC_MSG_RESULT($bash_cv_wexitstatus_offset) +AC_DEFINE_UNQUOTED([WEXITSTATUS_OFFSET], [$bash_cv_wexitstatus_offset], [Offset of exit status in wait status word]) +]) + +AC_DEFUN([BASH_FUNC_SBRK], +[ + AC_MSG_CHECKING([for sbrk]) + AC_CACHE_VAL(ac_cv_func_sbrk, + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[ void *x = sbrk (4096); ]])], + [ac_cv_func_sbrk=yes],[ac_cv_func_sbrk=no])]) + AC_MSG_RESULT($ac_cv_func_sbrk) + if test X$ac_cv_func_sbrk = Xyes; then + AC_CACHE_CHECK([for working sbrk], [bash_cv_func_sbrk], + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include + +int +main(int c, char **v) +{ + void *x; + + x = sbrk (4096); + exit ((x == (void *)-1) ? 1 : 0); +} +]])],[bash_cv_func_sbrk=yes],[bash_cv_func_sbrk=no],[AC_MSG_WARN([cannot check working sbrk if cross-compiling]) + bash_cv_func_sbrk=yes +])]) + if test $bash_cv_func_sbrk = no; then + ac_cv_func_sbrk=no + fi + fi + if test $ac_cv_func_sbrk = yes; then + AC_DEFINE(HAVE_SBRK, 1, + [Define if you have a working sbrk function.]) + fi +]) + +AC_DEFUN(BASH_FUNC_FNMATCH_EQUIV_FALLBACK, +[AC_MSG_CHECKING(whether fnmatch can be used to check bracket equivalence classes) +AC_CACHE_VAL(bash_cv_fnmatch_equiv_fallback, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include +#include +#include + +char *pattern = "[[=a=]]"; + +/* char *string = "ä"; */ +unsigned char string[4] = { '\xc3', '\xa4', '\0' }; + +int +main (int c, char **v) +{ + setlocale (LC_ALL, "en_US.UTF-8"); + if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH) + exit (0); + exit (1); +} +]])], [bash_cv_fnmatch_equiv_fallback=yes], [bash_cv_fnmatch_equiv_fallback=no], + [AC_MSG_WARN(cannot check fnmatch if cross compiling -- defaulting to no) + bash_cv_fnmatch_equiv_fallback=no] +)]) +AC_MSG_RESULT($bash_cv_fnmatch_equiv_fallback) +if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then + bash_cv_fnmatch_equiv_value=1 +else + bash_cv_fnmatch_equiv_value=0 +fi +AC_DEFINE_UNQUOTED([FNMATCH_EQUIV_FALLBACK], [$bash_cv_fnmatch_equiv_value], [Whether fnmatch can be used for bracket equivalence classes]) +]) diff --git a/alias.c b/alias.c index 558665e..23f967f 100644 --- a/alias.c +++ b/alias.c @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -42,19 +42,23 @@ # include "pcomplete.h" #endif -#define ALIAS_HASH_BUCKETS 16 /* must be power of two */ +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif + +#define ALIAS_HASH_BUCKETS 64 /* must be power of two */ -typedef int sh_alias_map_func_t __P((alias_t *)); +typedef int sh_alias_map_func_t PARAMS((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 **)); +static void free_alias_data PARAMS((PTR_T)); +static alias_t **map_over_aliases PARAMS((sh_alias_map_func_t *)); +static void sort_aliases PARAMS((alias_t **)); +static int qsort_alias_compare PARAMS((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)); +static int skipquotes PARAMS((char *, int)); +static int skipws PARAMS((char *, int)); +static int rd_token PARAMS((char *, int)); #endif /* Non-zero means expand all words on the line. Otherwise, expand @@ -110,7 +114,7 @@ add_alias (name, value) alias_t *temp; int n; - if (!aliases) + if (aliases == 0) { initialize_aliases (); temp = (alias_t *)NULL; @@ -123,9 +127,12 @@ add_alias (name, value) free (temp->value); temp->value = savestring (value); temp->flags &= ~AL_EXPANDNEXT; - n = value[strlen (value) - 1]; - if (n == ' ' || n == '\t') - temp->flags |= AL_EXPANDNEXT; + if (value[0]) + { + n = value[strlen (value) - 1]; + if (n == ' ' || n == '\t') + temp->flags |= AL_EXPANDNEXT; + } } else { @@ -134,9 +141,12 @@ add_alias (name, value) temp->value = savestring (value); temp->flags = 0; - n = value[strlen (value) - 1]; - if (n == ' ' || n == '\t') - temp->flags |= AL_EXPANDNEXT; + if (value[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; @@ -154,6 +164,10 @@ free_alias_data (data) register alias_t *a; a = (alias_t *)data; + + if (a->flags & AL_BEINGEXPANDED) + clear_string_list_expander (a); /* call back to the parser */ + free (a->value); free (a->name); free (data); @@ -319,6 +333,8 @@ skipquotes (string, start) if (string[i] == '\\') { i++; /* skip backslash-quoted quote characters, too */ + if (string[i] == 0) + break; continue; } @@ -364,6 +380,8 @@ skipws (string, start) if (string[i] == '\\') { peekc = string[i+1]; + if (peekc == 0) + break; if (ISLETTER (peekc)) backslash_quoted_word++; /* this is a backslash-quoted word */ else @@ -429,6 +447,8 @@ rd_token (string, start) if (string[i] == '\\') { i++; /* skip backslash-escaped character */ + if (string[i] == 0) + break; continue; } diff --git a/alias.h b/alias.h index 4d0075f..4e2d67c 100644 --- a/alias.h +++ b/alias.h @@ -1,6 +1,6 @@ /* alias.h -- structure definitions. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,33 +38,36 @@ typedef struct alias { /* The list of known aliases. */ extern HASH_TABLE *aliases; -extern void initialize_aliases __P((void)); +extern void initialize_aliases PARAMS((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 *)); +extern alias_t *find_alias PARAMS((char *)); /* Return the value of the alias for NAME, or NULL if there is none. */ -extern char *get_alias_value __P((char *)); +extern char *get_alias_value PARAMS((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 *)); +extern void add_alias PARAMS((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 *)); +extern int remove_alias PARAMS((char *)); /* Remove all aliases. */ -extern void delete_all_aliases __P((void)); +extern void delete_all_aliases PARAMS((void)); /* Return an array of all defined aliases. */ -extern alias_t **all_aliases __P((void)); +extern alias_t **all_aliases PARAMS((void)); /* Expand a single word for aliases. */ -extern char *alias_expand_word __P((char *)); +extern char *alias_expand_word PARAMS((char *)); /* Return a new line, with any aliases expanded. */ -extern char *alias_expand __P((char *)); +extern char *alias_expand PARAMS((char *)); + +/* Helper definition for the parser */ +extern void clear_string_list_expander PARAMS((alias_t *)); #endif /* _ALIAS_H_ */ diff --git a/array.c b/array.c index 27fe170..910bbaa 100644 --- a/array.c +++ b/array.c @@ -9,7 +9,7 @@ * chet@ins.cwru.edu */ -/* Copyright (C) 1997-2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,33 +52,30 @@ ae->prev = new; \ new->next = ae; \ } while(0) + +#define ADD_AFTER(ae, new) \ + do { \ + ae->next->prev = new; \ + new->next = ae->next; \ + new->prev = ae; \ + ae->next = new; \ + } while (0) -static char *array_to_string_internal __P((ARRAY_ELEMENT *, ARRAY_ELEMENT *, char *, int)); +static char *array_to_string_internal PARAMS((ARRAY_ELEMENT *, ARRAY_ELEMENT *, char *, int)); -static ARRAY *lastarray = 0; -static ARRAY_ELEMENT *lastref = 0; +static char *spacesep = " "; -#define IS_LASTREF(a) ((a) == lastarray) +#define IS_LASTREF(a) (a->lastref) -#define INVALIDATE_LASTREF(a) \ -do { \ - if ((a) == lastarray) { \ - lastarray = 0; \ - lastref = 0; \ - } \ -} while (0) +#define LASTREF_START(a, i) \ + (IS_LASTREF(a) && i >= element_index(a->lastref)) ? a->lastref \ + : element_forw(a->head) -#define SET_LASTREF(a, e) \ -do { \ - lastarray = (a); \ - lastref = (e); \ -} while (0) +#define LASTREF(a) (a->lastref ? a->lastref : element_forw(a->head)) -#define UNSET_LASTREF() \ -do { \ - lastarray = 0; \ - lastref = 0; \ -} while (0) +#define INVALIDATE_LASTREF(a) a->lastref = 0 +#define SET_LASTREF(a, e) a->lastref = (e) +#define UNSET_LASTREF(a) a->lastref = 0; ARRAY * array_create() @@ -86,10 +83,10 @@ array_create() ARRAY *r; ARRAY_ELEMENT *head; - r =(ARRAY *)xmalloc(sizeof(ARRAY)); - r->type = array_indexed; + r = (ARRAY *)xmalloc(sizeof(ARRAY)); r->max_index = -1; r->num_elements = 0; + r->lastref = (ARRAY_ELEMENT *)0; head = array_create_element(-1, (char *)NULL); /* dummy head */ head->prev = head->next = head; r->head = head; @@ -136,12 +133,13 @@ ARRAY *a; 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); + if (ae == LASTREF(a)) + SET_LASTREF(a1, new); } return(a1); } @@ -161,7 +159,6 @@ ARRAY_ELEMENT *s, *e; 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)); @@ -384,7 +381,6 @@ 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; @@ -399,16 +395,16 @@ ARRAY *array; * Since arrays are sparse, unset array elements are not counted. */ char * -array_subrange (a, start, nelem, starsub, quoted) +array_subrange (a, start, nelem, starsub, quoted, pflags) ARRAY *a; arrayind_t start, nelem; -int starsub, quoted; +int starsub, quoted, pflags; { ARRAY *a2; ARRAY_ELEMENT *h, *p; arrayind_t i; - char *ifs, *sifs, *t; - int slen; + char *t; + WORD_LIST *wl; p = a ? array_head (a) : 0; if (p == 0 || array_empty (a) || start > array_max_index(a)) @@ -433,32 +429,12 @@ int starsub, quoted; 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); + wl = array_to_word_list(a2); array_dispose(a2); + if (wl == 0) + return (char *)NULL; + t = string_list_pos_params(starsub ? '*' : '@', wl, quoted, pflags); /* XXX */ + dispose_words(wl); return t; } @@ -469,46 +445,29 @@ ARRAY *a; char *pat, *rep; int mflags; { - ARRAY *a2; - ARRAY_ELEMENT *e; - char *t, *sifs, *ifs; - int slen; + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; 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; + wl = array_to_word_list(a); + if (wl == 0) + return (char *)NULL; + + for (save = wl; wl; wl = wl->next) { + t = pat_subst (wl->word->word, pat, rep, mflags); + FREE (wl->word->word); + wl->word->word = 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); + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words(save); return t; } @@ -520,49 +479,33 @@ char *pat; int modop; int mflags; { - ARRAY *a2; - ARRAY_ELEMENT *e; - char *t, *sifs, *ifs; - int slen; + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; 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; + wl = array_to_word_list(a); + if (wl == 0) + return ((char *)NULL); + + for (save = wl; wl; wl = wl->next) { + t = sh_modcase(wl->word->word, pat, modop); + FREE(wl->word->word); + wl->word->word = 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); + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words(save); return t; } + /* * Allocate and return a new array element with index INDEX and value * VALUE. @@ -610,7 +553,9 @@ ARRAY *a; arrayind_t i; char *v; { - register ARRAY_ELEMENT *new, *ae; + register ARRAY_ELEMENT *new, *ae, *start; + arrayind_t startind; + int direction; if (a == 0) return(-1); @@ -626,27 +571,63 @@ char *v; a->num_elements++; SET_LASTREF(a, new); return(0); + } else if (i < array_first_index(a)) { + /* Hook at the beginning */ + ADD_AFTER(a->head, new); + a->num_elements++; + SET_LASTREF(a, new); + return(0); } +#if OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT /* - * Otherwise we search for the spot to insert it. + * Otherwise we search for the spot to insert it. The lastref + * handle optimizes the case of sequential or almost-sequential + * assignments that are not at the end of the array. */ - for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + start = LASTREF(a); + /* Use same strategy as array_reference to avoid paying large penalty + for semi-random assignment pattern. */ + startind = element_index(start); + if (i < startind/2) { + start = element_forw(a->head); + startind = element_index(start); + direction = 1; + } else if (i >= startind) { + direction = 1; + } else { + direction = -1; + } +#else + start = element_forw(ae->head); + startind = element_index(start); + direction = 1; +#endif + for (ae = start; ae != a->head; ) { if (element_index(ae) == i) { /* * Replacing an existing element. */ - array_dispose_element(new); free(element_value(ae)); - ae->value = v ? savestring(v) : (char *)NULL; + /* Just swap in the new value */ + ae->value = new->value; + new->value = 0; + array_dispose_element(new); SET_LASTREF(a, ae); return(0); - } else if (element_index(ae) > i) { + } else if (direction == 1 && element_index(ae) > i) { ADD_BEFORE(ae, new); a->num_elements++; SET_LASTREF(a, new); return(0); + } else if (direction == -1 && element_index(ae) < i) { + ADD_AFTER(ae, new); + a->num_elements++; + SET_LASTREF(a, new); + return(0); } + ae = direction == 1 ? element_forw(ae) : element_back(ae); } + array_dispose_element(new); INVALIDATE_LASTREF(a); return (-1); /* problem */ } @@ -660,20 +641,52 @@ array_remove(a, i) ARRAY *a; arrayind_t i; { - register ARRAY_ELEMENT *ae; + register ARRAY_ELEMENT *ae, *start; + arrayind_t startind; + int direction; if (a == 0 || array_empty(a)) return((ARRAY_ELEMENT *) NULL); - for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) + if (i > array_max_index(a) || i < array_first_index(a)) + return((ARRAY_ELEMENT *)NULL); /* Keep roving pointer into array to optimize sequential access */ + start = LASTREF(a); + /* Use same strategy as array_reference to avoid paying large penalty + for semi-random assignment pattern. */ + startind = element_index(start); + if (i < startind/2) { + start = element_forw(a->head); + startind = element_index(start); + direction = 1; + } else if (i >= startind) { + direction = 1; + } else { + direction = -1; + } + for (ae = start; ae != a->head; ) { 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); +#if 0 INVALIDATE_LASTREF(a); +#else + if (ae->next != a->head) + SET_LASTREF(a, ae->next); + else if (ae->prev != a->head) + SET_LASTREF(a, ae->prev); + else + INVALIDATE_LASTREF(a); +#endif return(ae); } + ae = (direction == 1) ? element_forw(ae) : element_back(ae); + if (direction == 1 && element_index(ae) > i) + break; + else if (direction == -1 && element_index(ae) < i) + break; + } return((ARRAY_ELEMENT *) NULL); } @@ -685,23 +698,49 @@ array_reference(a, i) ARRAY *a; arrayind_t i; { - register ARRAY_ELEMENT *ae; + register ARRAY_ELEMENT *ae, *start; + arrayind_t startind; + int direction; 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 (i > array_max_index(a) || i < array_first_index(a)) + return((char *)NULL); /* Keep roving pointer into array to optimize sequential access */ + start = LASTREF(a); /* lastref pointer */ + startind = element_index(start); + if (i < startind/2) { /* XXX - guess */ + start = element_forw(a->head); + startind = element_index(start); + direction = 1; + } else if (i >= startind) { + direction = 1; + } else { + direction = -1; + } + for (ae = start; ae != a->head; ) { if (element_index(ae) == i) { SET_LASTREF(a, ae); return(element_value(ae)); } - UNSET_LASTREF(); + ae = (direction == 1) ? element_forw(ae) : element_back(ae); + /* Take advantage of index ordering to short-circuit */ + /* If we don't find it, set the lastref pointer to the element + that's `closest', assuming that the unsuccessful reference + will quickly be followed by an assignment. No worse than + not changing it from the previous value or resetting it. */ + if (direction == 1 && element_index(ae) > i) { + start = ae; /* use for SET_LASTREF below */ + break; + } else if (direction == -1 && element_index(ae) < i) { + start = ae; /* use for SET_LASTREF below */ + break; + } + } +#if 0 + UNSET_LASTREF(a); +#else + SET_LASTREF(a, start); +#endif return((char *) NULL); } @@ -754,6 +793,27 @@ ARRAY *a; return (REVERSE_LIST(list, WORD_LIST *)); } +WORD_LIST * +array_to_kvpair_list(a) +ARRAY *a; +{ + WORD_LIST *list; + ARRAY_ELEMENT *ae; + char *k, *v; + + 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)) { + k = itos(element_index(ae)); + v = element_value(ae); + list = make_word_list (make_bare_word(k), list); + list = make_word_list (make_bare_word(v), list); + free(k); + } + return (REVERSE_LIST(list, WORD_LIST *)); +} + ARRAY * array_assign_list (array, list) ARRAY *array; @@ -768,24 +828,80 @@ WORD_LIST *list; } char ** -array_to_argv (a) +array_to_argv (a, countp) ARRAY *a; +int *countp; { char **ret, *t; int i; ARRAY_ELEMENT *ae; - if (a == 0 || array_empty(a)) + if (a == 0 || array_empty(a)) { + if (countp) + *countp = 0; 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; + if (t) + ret[i++] = savestring (t); } ret[i] = (char *)NULL; + if (countp) + *countp = i; return (ret); } + +ARRAY * +array_from_argv(a, vec, count) +ARRAY *a; +char **vec; +int count; +{ + arrayind_t i; + ARRAY_ELEMENT *ae; + char *t; + + if (a == 0 || array_num_elements (a) == 0) + { + for (i = 0; i < count; i++) + array_insert (a, i, t); + return a; + } + + /* Fast case */ + if (array_num_elements (a) == count && count == 1) + { + ae = element_forw (a->head); + t = vec[0] ? savestring (vec[0]) : 0; + ARRAY_ELEMENT_REPLACE (ae, t); + } + else if (array_num_elements (a) <= count) + { + /* 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); + t = vec[0] ? savestring (vec[0]) : 0; + ARRAY_ELEMENT_REPLACE (ae, t); + } + /* add any more */ + for ( ; i < count; i++) + array_insert (a, i, vec[i]); + } + else + { + /* deleting elements. it's faster to rebuild the array. */ + array_flush (a); + for (i = 0; i < count; i++) + array_insert (a, i, vec[i]); + } + + return a; +} /* * Return a string that is the concatenation of the elements in A from START @@ -816,7 +932,7 @@ int quoted; rsize, rsize); strcpy(result + rlen, t); rlen += reg; - if (quoted && t) + if (quoted) free(t); /* * Add a separator only after non-null elements. @@ -832,6 +948,60 @@ int quoted; return(result); } +char * +array_to_kvpair (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[rlen = 0] = '\0'; + + 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) ? + (ansic_shouldquote (element_value (ae)) ? + ansic_quote (element_value(ae), 0, (int *)0) : + sh_double_quote (element_value (ae))) + : (char *)NULL; + elen = STRLEN (is) + 8 + STRLEN (valstr); + RESIZE_MALLOCED_BUFFER (result, rlen, (elen + 1), rsize, rsize); + + strcpy (result + rlen, is); + rlen += STRLEN (is); + result[rlen++] = ' '; + if (valstr) { + strcpy (result + rlen, valstr); + rlen += STRLEN (valstr); + } else { + strcpy (result + rlen, "\"\""); + rlen += 2; + } + + if (element_forw(ae) != a->head) + result[rlen++] = ' '; + + FREE (valstr); + } + RESIZE_MALLOCED_BUFFER (result, rlen, 1, rsize, 8); + 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_assign (a, quoted) ARRAY *a; @@ -851,7 +1021,10 @@ int quoted; 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)) + valstr = element_value (ae) ? + (ansic_shouldquote (element_value (ae)) ? + ansic_quote (element_value(ae), 0, (int *)0) : + sh_double_quote (element_value (ae))) : (char *)NULL; elen = STRLEN (is) + 8 + STRLEN (valstr); RESIZE_MALLOCED_BUFFER (result, rlen, (elen + 1), rsize, rsize); diff --git a/array.h b/array.h index fb4f789..4214e8b 100644 --- a/array.h +++ b/array.h @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1997-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,86 +27,135 @@ typedef intmax_t arrayind_t; -enum atype {array_indexed, array_assoc}; - typedef struct array { - enum atype type; arrayind_t max_index; - int num_elements; + arrayind_t num_elements; +#ifdef ALT_ARRAY_IMPLEMENTATION + arrayind_t first_index; + arrayind_t alloc_size; + struct array_element **elements; +#else struct array_element *head; + struct array_element *lastref; +#endif } ARRAY; typedef struct array_element { arrayind_t ind; char *value; +#ifndef ALT_ARRAY_IMPLEMENTATION struct array_element *next, *prev; +#endif } ARRAY_ELEMENT; -typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *, void *)); +#define ARRAY_DEFAULT_SIZE 1024 + +typedef int sh_ae_map_func_t PARAMS((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)); +#ifdef ALT_ARRAY_IMPLEMENTATION +extern void array_alloc PARAMS((ARRAY *, arrayind_t)); +extern void array_resize PARAMS((ARRAY *, arrayind_t)); +extern void array_expand PARAMS((ARRAY *, arrayind_t)); +extern void array_dispose_elements PARAMS((ARRAY_ELEMENT **)); +#endif +extern ARRAY *array_create PARAMS((void)); +extern void array_flush PARAMS((ARRAY *)); +extern void array_dispose PARAMS((ARRAY *)); +extern ARRAY *array_copy PARAMS((ARRAY *)); +#ifndef ALT_ARRAY_IMPLEMENTATION +extern ARRAY *array_slice PARAMS((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *)); +#else +extern ARRAY *array_slice PARAMS((ARRAY *, arrayind_t, arrayind_t)); +#endif + +extern void array_walk PARAMS((ARRAY *, sh_ae_map_func_t *, void *)); + +#ifndef ALT_ARRAY_IMPLEMENTATION +extern ARRAY_ELEMENT *array_shift PARAMS((ARRAY *, int, int)); +#else +extern ARRAY_ELEMENT **array_shift PARAMS((ARRAY *, int, int)); +#endif +extern int array_rshift PARAMS((ARRAY *, int, char *)); +extern ARRAY_ELEMENT *array_unshift_element PARAMS((ARRAY *)); +extern int array_shift_element PARAMS((ARRAY *, char *)); + +extern ARRAY *array_quote PARAMS((ARRAY *)); +extern ARRAY *array_quote_escapes PARAMS((ARRAY *)); +extern ARRAY *array_dequote PARAMS((ARRAY *)); +extern ARRAY *array_dequote_escapes PARAMS((ARRAY *)); +extern ARRAY *array_remove_quoted_nulls PARAMS((ARRAY *)); + +extern char *array_subrange PARAMS((ARRAY *, arrayind_t, arrayind_t, int, int, int)); +extern char *array_patsub PARAMS((ARRAY *, char *, char *, int)); +extern char *array_modcase PARAMS((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 ARRAY_ELEMENT *array_create_element PARAMS((arrayind_t, char *)); +extern ARRAY_ELEMENT *array_copy_element PARAMS((ARRAY_ELEMENT *)); +extern void array_dispose_element PARAMS((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)); +extern int array_insert PARAMS((ARRAY *, arrayind_t, char *)); +extern ARRAY_ELEMENT *array_remove PARAMS((ARRAY *, arrayind_t)); +extern char *array_reference PARAMS((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 WORD_LIST *array_to_word_list PARAMS((ARRAY *)); +extern ARRAY *array_from_word_list PARAMS((WORD_LIST *)); +extern WORD_LIST *array_keys_to_word_list PARAMS((ARRAY *)); +extern WORD_LIST *array_to_kvpair_list PARAMS((ARRAY *)); -extern ARRAY *array_assign_list __P((ARRAY *, WORD_LIST *)); +extern ARRAY *array_assign_list PARAMS((ARRAY *, WORD_LIST *)); -extern char **array_to_argv __P((ARRAY *)); +extern char **array_to_argv PARAMS((ARRAY *, int *)); +extern ARRAY *array_from_argv PARAMS((ARRAY *, char **, int)); -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 *)); +extern char *array_to_kvpair PARAMS((ARRAY *, int)); +extern char *array_to_assign PARAMS((ARRAY *, int)); +extern char *array_to_string PARAMS((ARRAY *, char *, int)); +extern ARRAY *array_from_string PARAMS((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) +#ifndef ALT_ARRAY_IMPLEMENTATION +#define array_first_index(a) ((a)->head->next->ind) #define array_head(a) ((a)->head) +#define array_alloc_size(a) ((a)->alloc_size) +#else +#define array_first_index(a) ((a)->first_index) +#define array_head(a) ((a)->elements) +#endif #define array_empty(a) ((a)->num_elements == 0) #define element_value(ae) ((ae)->value) #define element_index(ae) ((ae)->ind) + +#ifndef ALT_ARRAY_IMPLEMENTATION #define element_forw(ae) ((ae)->next) #define element_back(ae) ((ae)->prev) +#else +extern arrayind_t element_forw PARAMS((ARRAY *, arrayind_t)); +extern arrayind_t element_back PARAMS((ARRAY *, arrayind_t)); +#endif + + +#define set_element_value(ae, val) ((ae)->value = (val)) + +#ifdef ALT_ARRAY_IMPLEMENTATION +#define set_first_index(a, i) ((a)->first_index = (i)) +#endif + +#define set_max_index(a, i) ((a)->max_index = (i)) +#define set_num_elements(a, n) ((a)->num_elements = (n)) /* 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) + do { array_shift ((a), 1, AS_DISPOSE); } while (0) #define GET_ARRAY_FROM_VAR(n, v, a) \ do { \ @@ -114,6 +163,20 @@ extern ARRAY *array_from_string __P((char *, char *)); (a) = ((v) && array_p ((v))) ? array_cell (v) : (ARRAY *)0; \ } while (0) +#define ARRAY_ELEMENT_REPLACE(ae, v) \ + do { \ + free ((ae)->value); \ + (ae)->value = (v); \ + } while (0) + +#ifdef ALT_ARRAY_IMPLEMENTATION +#define ARRAY_VALUE_REPLACE(a, i, v) \ + ARRAY_ELEMENT_REPLACE((a)->elements[(i)], (v)) +#endif + #define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*') +/* In eval.c, but uses ARRAY * */ +extern int execute_array_command PARAMS((ARRAY *, void *)); + #endif /* _ARRAY_H_ */ diff --git a/array2.c b/array2.c new file mode 100644 index 0000000..fa8be00 --- /dev/null +++ b/array2.c @@ -0,0 +1,1374 @@ +/* + * array.c - functions to create, destroy, access, and manipulate arrays + * of strings. + * + * Arrays are structs containing an array of elements and bookkeeping information. + * An element's index is stored with it. + * + * Chet Ramey + * chet@ins.cwru.edu + */ + +/* Copyright (C) 1997-2021 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include "config.h" + +#if defined (ARRAY_VARS) + +#if defined (HAVE_UNISTD_H) +# ifdef _MINIX +# include +# endif +# include +#endif + +#include +#include "bashansi.h" + +#include "shell.h" +#include "array.h" +#include "builtins/common.h" + +#define ARRAY_MAX_DOUBLE 16777216 + +static ARRAY_ELEMENT **array_copy_elements PARAMS((ARRAY *)); +static char *array_to_string_internal PARAMS((ARRAY *, arrayind_t, arrayind_t, char *, int)); + +static char *spacesep = " "; + +void +array_alloc (a, n) +ARRAY *a; +arrayind_t n; +{ + arrayind_t i; + + if (a == 0) + return; /* for now */ + a->elements = (ARRAY_ELEMENT **)xmalloc (n * sizeof (ARRAY_ELEMENT *)); + for (i = 0; i < n; i++) + a->elements[i] = 0; + a->alloc_size = n; +} + +void +array_resize (a, n) +ARRAY *a; +arrayind_t n; +{ + ARRAY_ELEMENT **e, *ae; + arrayind_t i, nsize; + + if (a == 0) + return; + if (a->alloc_size > 0 && n >= a->max_index && n <= a->alloc_size) + return; + + e = (ARRAY_ELEMENT **)xrealloc (a->elements, n * sizeof (ARRAY_ELEMENT *)); + a->elements = e; + + for (i = a->alloc_size; i < n; i++) + a->elements[i] = (ARRAY_ELEMENT *)NULL; + + a->alloc_size = n; +} + +void +array_expand (a, n) +ARRAY *a; +arrayind_t n; +{ + arrayind_t nsize; + + if (n >= a->alloc_size) { + nsize = a->alloc_size ? a->alloc_size : ARRAY_DEFAULT_SIZE; + while (n >= nsize) + nsize <<= 1; + if (nsize > ARRAY_MAX_DOUBLE) + nsize = n + ARRAY_DEFAULT_SIZE; + array_resize (a, nsize); + } +} + +ARRAY * +array_create() +{ + ARRAY *r; + + r = (ARRAY *)xmalloc(sizeof(ARRAY)); + r->max_index = r->first_index = -1; + r->num_elements = 0; + r->alloc_size = 0; + r->elements = (ARRAY_ELEMENT **)NULL; + return(r); +} + +void +array_flush (a) +ARRAY *a; +{ + int r; + + if (a == 0) + return; + if (array_empty(a)) { + a->max_index = a->first_index = -1; /* paranoia */ + return; + } + for (r = a->first_index; r <= a->max_index; r++) + if (a->elements[r]) { + array_dispose_element(a->elements[r]); + a->elements[r] = 0; + } + a->max_index = a->first_index = -1; + a->num_elements = 0; +} + +void +array_dispose_elements(elist) +ARRAY_ELEMENT **elist; +{ + arrayind_t i; + + if (elist == 0) + return; + for (i = 0; elist[i]; i++) + array_dispose_element(elist[i]); + free(elist); +} + +void +array_dispose(a) +ARRAY *a; +{ + if (a == 0) + return; + array_dispose_elements (a->elements); + a->alloc_size = 0; + free(a); +} + +static ARRAY_ELEMENT ** +array_copy_elements (a) +ARRAY *a; +{ + ARRAY_ELEMENT **ret; + arrayind_t i; + + if (a == 0 || a->num_elements == 0) + return (ARRAY_ELEMENT **)NULL; + ret = (ARRAY_ELEMENT **)xmalloc (a->alloc_size * sizeof (ARRAY_ELEMENT *)); + for (i = 0; i < a->alloc_size; i++) + ret[i] = a->elements[i] ? array_copy_element (a->elements[i]) : 0; + return ret; +} + +ARRAY * +array_copy(a) +ARRAY *a; +{ + ARRAY *a1; + + if (a == 0) + return((ARRAY *) NULL); + a1 = array_create(); + a1->max_index = a->max_index; + a1->first_index = a->first_index; + a1->num_elements = a->num_elements; + + a1->alloc_size = a->alloc_size; + a1->elements = array_copy_elements (a); + + return(a1); +} + +/* + * Make and return a new array composed of the elements in array A from + * S to E, inclusive. The callers do the bounds checking. + */ +ARRAY * +array_slice(array, s, e) +ARRAY *array; +arrayind_t s, e; +{ + ARRAY *a; + ARRAY_ELEMENT *p, *n; + arrayind_t i, ni; + arrayind_t mi, nsize; + + a = array_create (); + + nsize = ARRAY_DEFAULT_SIZE; + while (nsize < array->alloc_size) + nsize <<= 1; + if (nsize > ARRAY_MAX_DOUBLE) + nsize = array->alloc_size + ARRAY_DEFAULT_SIZE; + + array_resize (a, nsize); + + for (i = s; i < e; i++) { + p = array->elements[i]; + n = p ? array_create_element (element_index(p), element_value(p)) : (ARRAY_ELEMENT *)NULL; + a->elements[i] = n; + } + a->num_elements = e - s; + a->max_index = e; + a->first_index = s; + + 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; +{ + arrayind_t i; + register ARRAY_ELEMENT *ae; + + if (a == 0 || array_empty(a)) + return; + for (i = array_first_index (a); i <= array_max_index(a); i++) { + if ((ae = a->elements[i]) == 0) + continue; + 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 null-terminated array 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; +{ + ARRAY_ELEMENT **r, *ae; + register arrayind_t ni, ri; + int i, j; + + if (a == 0 || array_empty(a) || n <= 0) + return ((ARRAY_ELEMENT **)NULL); + + r = (ARRAY_ELEMENT **)xmalloc ((n + 1) * sizeof (ARRAY_ELEMENT *)); + + /* Easy case; shifting out all of the elements */ + if (n >= a->num_elements) { + if (flags & AS_DISPOSE) { + array_flush (a); + return ((ARRAY_ELEMENT **)NULL); + } + for (ri = 0, i = a->first_index; i <= a->max_index; i++) + if (a->elements[i]) { + r[ri++] = a->elements[i]; + a->elements[i] = 0; + } + + a->first_index = a->max_index = -1; + a->num_elements = 0; + r[ri] = (ARRAY_ELEMENT *)NULL; + return r; + } + + /* Shift out the first N elements, return them in R. Handle sparse + arrays by skipping over NULL array elements. */ + for (i = a->first_index, ri = 0, j = 0; j < n; i++) { + if ((ae = a->elements[i]) == 0) + continue; + if (i > a->max_index) + break; + ni = i + n; + j++; + if (ae) + r[ri++] = a->elements[i]; + a->elements[i] = a->elements[ni]; + if (a->elements[i]) + element_index(a->elements[i]) = i; + } + r[ri]= (ARRAY_ELEMENT *)NULL; + +#ifdef DEBUG +if (j < n) + itrace("array_shift: short count: j = %d n = %d", j, n); +#endif + + /* Now shift everything else, modifying the index in each element */ + for (; i <= a->max_index; i++) { + ni = i + n; + a->elements[i] = (ni <= a->max_index) ? a->elements[ni] : (ARRAY_ELEMENT *)NULL; + if (a->elements[i]) + element_index(a->elements[i]) = i; + } + + a->num_elements -= n; /* modify bookkeeping information */ + if (a->num_elements == 0) + a->first_index = a->max_index == -1; + else { + a->max_index -= n; + for (i = 0; i <= a->max_index; i++) + if (a->elements[i]) + break; + a->first_index = i; + } + + if (flags & AS_DISPOSE) { + for (i = 0; i < ri; i++) + array_dispose_element(r[i]); + free (r); + return ((ARRAY_ELEMENT **)NULL); + } + + return r; +} + +/* + * 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; + arrayind_t ni, nsize; + + if (a == 0 || (array_empty(a) && s == 0)) + return 0; + else if (n <= 0) + return (a->num_elements); + + if (n >= a->alloc_size) + array_expand(a, n); + + /* Shift right, adjusting the element indexes as we go */ + for (ni = a->max_index; ni >= 0; ni--) { + a->elements[ni+n] = a->elements[ni]; + if (a->elements[ni+n]) + element_index(a->elements[ni+n]) = ni + n; + a->elements[ni] = (ARRAY_ELEMENT *)NULL; + } + a->max_index += n; + +#if 0 + /* Null out all the old indexes we just copied from */ + for (ni = a->first_index; ni >= 0 && ni < n; ni++) + a->elements[ni] = (ARRAY_ELEMENT *)NULL; +#endif + a->first_index += n; + + if (s) { + new = array_create_element(0, s); + a->elements[0] = new; + a->num_elements++; + a->first_index = 0; + if (array_num_elements(a) == 1) /* array was empty */ + a->max_index = 0; + } + + return (a->num_elements); +} + +ARRAY_ELEMENT * +array_unshift_element(a) +ARRAY *a; +{ + ARRAY_ELEMENT **r, *ret; + + r = array_shift (a, 1, 0); + ret = r[0]; + free (r); + return ret; +} + +int +array_shift_element(a, v) +ARRAY *a; +char *v; +{ + return (array_rshift (a, 1, v)); +} + +ARRAY * +array_quote(array) +ARRAY *array; +{ + register arrayind_t i; + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (i = array_first_index(array); i <= array_max_index(array); i++) { + if ((a = array->elements[i]) == 0) + continue; + t = quote_string (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_quote_escapes(array) +ARRAY *array; +{ + register arrayind_t i; + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (i = array_first_index(array); i <= array_max_index(array); i++) { + if ((a = array->elements[i]) == 0) + continue; + t = quote_escapes (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_dequote(array) +ARRAY *array; +{ + register arrayind_t i; + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + + for (i = array->first_index; i <= array->max_index; i++) { + if ((a = array->elements[i]) == 0) + continue; + t = dequote_string (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_dequote_escapes(array) +ARRAY *array; +{ + register arrayind_t i; + ARRAY_ELEMENT *a; + char *t; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (i = array->first_index; i <= array->max_index; i++) { + if ((a = array->elements[i]) == 0) + continue; + t = dequote_escapes (a->value); + FREE(a->value); + a->value = t; + } + return array; +} + +ARRAY * +array_remove_quoted_nulls(array) +ARRAY *array; +{ + register arrayind_t i; + ARRAY_ELEMENT *a; + + if (array == 0 || array_head(array) == 0 || array_empty(array)) + return (ARRAY *)NULL; + for (i = array->first_index; i <= array->max_index; i++) { + if ((a = array->elements[i]) == 0) + continue; + 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, pflags) +ARRAY *a; +arrayind_t start, nelem; +int starsub, quoted, pflags; +{ + ARRAY *a2; + arrayind_t s, e; + int i; + char *t; + WORD_LIST *wl; + + if (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 (s = start; a->elements[s] == 0 && s <= a->max_index; s++) + ; + + if (s > a->max_index) + return ((char *)NULL); + + /* Starting at S, take NELEM elements, inclusive. */ + for (i = 0, e = s; e <= a->max_index && i < nelem; e++) { + if (a->elements[e]) /* arrays are sparse */ + i++; + } + + a2 = array_slice(a, s, e); + + wl = array_to_word_list(a2); + array_dispose(a2); + if (wl == 0) + return (char *)NULL; + t = string_list_pos_params(starsub ? '*' : '@', wl, quoted, pflags); /* XXX */ + dispose_words(wl); + + return t; +} + +char * +array_patsub (a, pat, rep, mflags) +ARRAY *a; +char *pat, *rep; +int mflags; +{ + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; + + if (a == 0 || array_head(a) == 0 || array_empty(a)) + return ((char *)NULL); + + wl = array_to_word_list(a); + if (wl == 0) + return (char *)NULL; + + for (save = wl; wl; wl = wl->next) { + t = pat_subst (wl->word->word, pat, rep, mflags); + FREE (wl->word->word); + wl->word->word = t; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words(save); + + return t; +} + +char * +array_modcase (a, pat, modop, mflags) +ARRAY *a; +char *pat; +int modop; +int mflags; +{ + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; + + if (a == 0 || array_head(a) == 0 || array_empty(a)) + return ((char *)NULL); + + wl = array_to_word_list(a); + if (wl == 0) + return ((char *)NULL); + + for (save = wl; wl; wl = wl->next) { + t = sh_modcase(wl->word->word, pat, modop); + FREE(wl->word->word); + wl->word->word = t; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words(save); + + 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; + return(r); +} + +ARRAY_ELEMENT * +array_copy_element(ae) +ARRAY_ELEMENT *ae; +{ + return(ae ? array_create_element(element_index(ae), element_value(ae)) + : (ARRAY_ELEMENT *) NULL); +} + +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, *old; + arrayind_t nsize; + + if (a == 0) + return(-1); + if (i >= a->alloc_size) + array_expand(a, i); + old = a->elements[i]; + if (i > array_max_index(a)) + a->max_index = i; + if (array_first_index(a) < 0 || i < array_first_index(a)) + a->first_index = i; + + if (old) { /* Replacing an existing element. */ + free(element_value(old)); + old->value = v ? savestring (v) : (char *)NULL; + old->ind = i; + return(0); + } else { + a->elements[i] = array_create_element(i, v); + a->num_elements++; + } + + 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; + arrayind_t ind; + + if (a == 0 || array_empty(a)) + return((ARRAY_ELEMENT *) NULL); + if (i > array_max_index(a) || i < array_first_index(a)) + return((ARRAY_ELEMENT *)NULL); + ae = a->elements[i]; + a->elements[i] = 0; + if (ae) { + a->num_elements--; + if (a->num_elements == 0) + a->first_index = a->max_index == -1; + if (i == array_max_index(a)) { + for (ind = i; ind >= array_first_index(a); ind--) + if (a->elements[ind]) + break; + a->max_index = ind; + } + if (i == array_first_index(a)) { + for (ind = i; ind <= array_max_index(a); ind++) + if (a->elements[ind]) + break; + a->first_index = ind; + } + } + return (ae); +} + +/* + * 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) || i < array_first_index(a)) + return((char *)NULL); + ae = a->elements[i]; + + return(ae ? element_value(ae) : (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; +{ + register arrayind_t i; + WORD_LIST *list; + ARRAY_ELEMENT *ae; + + if (a == 0 || array_empty(a)) + return((WORD_LIST *)NULL); + list = (WORD_LIST *)NULL; + + for (i = array_first_index(a); i <= array_max_index(a); i++) { + if ((ae = a->elements[i]) == 0) + continue; + 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; +{ + arrayind_t ind; + WORD_LIST *list; + ARRAY_ELEMENT *ae; + char *t; + + if (a == 0 || array_empty(a)) + return((WORD_LIST *)NULL); + list = (WORD_LIST *)NULL; + for (ind = array_first_index(a); ind <= array_max_index(a); ind++) { + if ((ae = a->elements[ind]) == 0) + continue; + t = itos(element_index(ae)); + list = make_word_list (make_bare_word(t), list); + free(t); + } + return (REVERSE_LIST(list, WORD_LIST *)); +} + +WORD_LIST * +array_to_kvpair_list(a) +ARRAY *a; +{ + arrayind_t ind; + WORD_LIST *list; + ARRAY_ELEMENT *ae; + char *k, *v; + + if (a == 0 || array_empty(a)) + return((WORD_LIST *)NULL); + list = (WORD_LIST *)NULL; + for (ind = array_first_index(a); ind <= array_max_index(a); ind++) { + if ((ae = a->elements[ind]) == 0) + continue; + k = itos(element_index(ae)); + v = element_value (ae); + list = make_word_list (make_bare_word(k), list); + list = make_word_list (make_bare_word(v), list); + free(k); + } + 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, countp) +ARRAY *a; +int *countp; +{ + char **ret, *t; + int i; + arrayind_t ind; + ARRAY_ELEMENT *ae; + + if (a == 0 || array_empty(a)) { + if (countp) + *countp = 0; + return ((char **)NULL); + } + ret = strvec_create (array_num_elements (a) + 1); + i = 0; + for (ind = array_first_index(a); ind <= array_max_index(a); ind++) { + if (a->elements[ind]) + ret[i++] = savestring (element_value(a->elements[ind])); + } + ret[i] = (char *)NULL; + if (countp) + *countp = i; + return (ret); +} + +ARRAY * +array_from_argv(a, vec, count) +ARRAY *a; +char **vec; +int count; +{ + arrayind_t i; + char *t; + + if (a == 0 || array_num_elements (a) == 0) { + for (i = 0; i < count; i++) + array_insert(a, i, vec[i]); + return a; + } + + /* Fast case */ + if (array_num_elements (a) == count && count == 1) { + t = vec[0] ? savestring (vec[0]) : 0; + ARRAY_VALUE_REPLACE(a, 0, t); + } else if (array_num_elements (a) <= count) { + /* modify in array_num_elements members in place, then add */ + for (i = 0; i < array_num_elements (a); i++) { + t = vec[i] ? savestring (vec[i]) : 0; + ARRAY_VALUE_REPLACE(a, i, t); + } + + /* add any more */ + for ( ; i < count; i++) + array_insert(a, i, vec[i]); + } else { + /* deleting elements. replace the first COUNT, free the rest */ + for (i = 0; i < count; i++) { + t = vec[i] ? savestring (vec[i]) : 0; + ARRAY_VALUE_REPLACE(a, i, t); + } + + for ( ; i <= array_max_index (a); i++) { + array_dispose_element(a->elements[i]); + a->elements[i] = (ARRAY_ELEMENT *)NULL; + } + + /* bookkeeping usually taken care of by array_insert */ + set_max_index(a, count - 1); + set_first_index(a, 0); + set_num_elements(a, count); + } + return a; +} + +/* + * Return the next non-null array element after A[IND] + */ +arrayind_t +element_forw(a, ind) +ARRAY *a; +arrayind_t ind; +{ + register arrayind_t i; + + for (i = ind + 1; i <= array_max_index(a); i++) + if (a->elements[i]) + break; + if (a->elements[i]) + return i; + return (array_max_index(a)); +} + +/* + * Return the previous non-null array element before A[IND] + */ +arrayind_t +element_back (a, ind) +ARRAY *a; +arrayind_t ind; +{ + register arrayind_t i; + + for (i = ind - 1; i >= array_first_index(a); i--) + if (a->elements[i]) + break; + if (a->elements[i] && i >= array_first_index(a)) + return i; + return (array_first_index(a)); +} + +/* + * 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 (a, start, end, sep, quoted) +ARRAY *a; +arrayind_t start, end; +char *sep; +int quoted; +{ + arrayind_t i; + char *result, *t; + ARRAY_ELEMENT *ae; + int slen, rsize, rlen, reg; + + slen = strlen(sep); + result = NULL; + for (rsize = rlen = 0, i = start; i <= end; i++) { + if ((ae = a->elements[i]) == 0) + continue; + 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) + free(t); + /* + * Add a separator only after non-null elements. + */ + if (element_forw(a, i) <= end) { + strcpy(result + rlen, sep); + rlen += slen; + } + } + } + if (result) + result[rlen] = '\0'; /* XXX */ + return(result); +} + +char * +array_to_kvpair (a, quoted) +ARRAY *a; +int quoted; +{ + arrayind_t ind; + 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[rlen = 0] = '\0'; + + for (ind = array_first_index(a); ind <= array_max_index(a); ind++) { + if ((ae = a->elements[ind]) == 0) + continue; + is = inttostr (element_index(ae), indstr, sizeof(indstr)); + valstr = element_value (ae) ? + (ansic_shouldquote (element_value (ae)) ? + ansic_quote (element_value(ae), 0, (int *)0) : + sh_double_quote (element_value (ae))) + : (char *)NULL; + elen = STRLEN (is) + 8 + STRLEN (valstr); + RESIZE_MALLOCED_BUFFER (result, rlen, (elen + 1), rsize, rsize); + + strcpy (result + rlen, is); + rlen += STRLEN (is); + result[rlen++] = ' '; + if (valstr) { + strcpy (result + rlen, valstr); + rlen += STRLEN (valstr); + } else { + strcpy (result + rlen, "\"\""); + rlen += 2; + } + + if (ind < array_max_index (a)) + result[rlen++] = ' '; + + FREE (valstr); + } + RESIZE_MALLOCED_BUFFER (result, rlen, 1, rsize, 8); + 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_assign (a, quoted) +ARRAY *a; +int quoted; +{ + arrayind_t ind; + 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 (ind = array_first_index(a); ind <= array_max_index(a); ind++) { + if ((ae = a->elements[ind]) == 0) + continue; + is = inttostr (element_index(ae), indstr, sizeof(indstr)); + valstr = element_value (ae) ? + (ansic_shouldquote (element_value (ae)) ? + ansic_quote (element_value(ae), 0, (int *)0) : + 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 (ind < array_max_index(a)) + 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 (a, array_first_index(a), array_max_index(a), 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/arrayfunc.c b/arrayfunc.c index 218faf3..4125622 100644 --- a/arrayfunc.c +++ b/arrayfunc.c @@ -1,6 +1,6 @@ /* arrayfunc.c -- High-level array functions used by other parts of the shell. */ -/* Copyright (C) 2001-2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,21 +30,37 @@ #include "bashintl.h" #include "shell.h" +#include "execute_cmd.h" #include "pathexp.h" #include "shmbutil.h" +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif #include "builtins/common.h" -extern char *this_command_name; -extern int last_command_exit_value; -extern int array_needs_making; +#ifndef LBRACK +# define LBRACK '[' +# define RBRACK ']' +#endif + +/* This variable means to not expand associative array subscripts more than + once, when performing variable expansion. */ +int assoc_expand_once = 0; + +/* Ditto for indexed array subscripts -- currently unused */ +int array_expand_once = 0; + +static SHELL_VAR *bind_array_var_internal PARAMS((SHELL_VAR *, arrayind_t, char *, char *, int)); +static SHELL_VAR *assign_array_element_internal PARAMS((SHELL_VAR *, char *, char *, char *, int, char *, int, array_eltstate_t *)); -static SHELL_VAR *bind_array_var_internal __P((SHELL_VAR *, arrayind_t, char *, char *, int)); +static void assign_assoc_from_kvlist PARAMS((SHELL_VAR *, WORD_LIST *, HASH_TABLE *, 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 *)); +static char *quote_assign PARAMS((const char *)); +static void quote_array_assignment_chars PARAMS((WORD_LIST *)); +static char *quote_compound_array_word PARAMS((char *, int)); +static char *array_value_internal PARAMS((const char *, int, int, array_eltstate_t *)); /* Standard error message to use when encountering an invalid array subscript */ const char * const bash_badsub_errmsg = N_("bad array subscript"); @@ -81,7 +97,14 @@ convert_var_to_array (var) array_needs_making++; VSETATTR (var, att_array); - VUNSETATTR (var, att_invisible); + if (oldval) + VUNSETATTR (var, att_invisible); + + /* Make sure it's not marked as an associative array any more */ + VUNSETATTR (var, att_assoc); + + /* Since namerefs can't be array variables, turn off nameref attribute */ + VUNSETATTR (var, att_nameref); return var; } @@ -112,13 +135,20 @@ convert_var_to_assoc (var) array_needs_making++; VSETATTR (var, att_assoc); - VUNSETATTR (var, att_invisible); + if (oldval) + VUNSETATTR (var, att_invisible); + + /* Make sure it's not marked as an indexed array any more */ + VUNSETATTR (var, att_array); + + /* Since namerefs can't be array variables, turn off nameref attribute */ + VUNSETATTR (var, att_nameref); return var; } -static SHELL_VAR * -bind_array_var_internal (entry, ind, key, value, flags) +char * +make_array_variable_value (entry, ind, key, value, flags) SHELL_VAR *entry; arrayind_t ind; char *key; @@ -155,6 +185,55 @@ bind_array_var_internal (entry, ind, key, value, flags) else newval = make_variable_value (entry, value, flags); + return newval; +} + +/* Assign HASH[KEY]=VALUE according to FLAGS. ENTRY is an associative array + variable; HASH is the hash table to assign into. HASH may or may not be + the hash table associated with ENTRY; if it's not, the caller takes care + of it. + XXX - make sure that any dynamic associative array variables recreate the + hash table on each assignment. BASH_CMDS and BASH_ALIASES already do this */ +static SHELL_VAR * +bind_assoc_var_internal (entry, hash, key, value, flags) + SHELL_VAR *entry; + HASH_TABLE *hash; + char *key; + char *value; + int flags; +{ + char *newval; + + /* Use the existing array contents to expand the value */ + newval = make_array_variable_value (entry, 0, key, value, flags); + + if (entry->assign_func) + (*entry->assign_func) (entry, newval, 0, key); + else + assoc_insert (hash, key, newval); + + FREE (newval); + + VUNSETATTR (entry, att_invisible); /* no longer invisible */ + + /* check mark_modified_variables if we ever want to export array vars */ + return (entry); +} + +/* Perform ENTRY[IND]=VALUE or ENTRY[KEY]=VALUE. This is not called for every + assignment to an associative array; see assign_compound_array_list below. */ +static SHELL_VAR * +bind_array_var_internal (entry, ind, key, value, flags) + SHELL_VAR *entry; + arrayind_t ind; + char *key; + char *value; + int flags; +{ + char *newval; + + newval = make_array_variable_value (entry, ind, key, value, flags); + if (entry->assign_func) (*entry->assign_func) (entry, newval, ind, key); else if (assoc_p (entry)) @@ -163,6 +242,9 @@ bind_array_var_internal (entry, ind, key, value, flags) array_insert (array_cell (entry), ind, newval); FREE (newval); + VUNSETATTR (entry, att_invisible); /* no longer invisible */ + + /* check mark_modified_variables if we ever want to export array vars */ return (entry); } @@ -182,11 +264,20 @@ bind_array_variable (name, ind, value, flags) { SHELL_VAR *entry; - entry = var_lookup (name, shell_variables); + entry = find_shell_variable (name); + if (entry == (SHELL_VAR *) 0) + { + /* Is NAME a nameref variable that points to an unset variable? */ + entry = find_variable_nameref_for_create (name, 0); + if (entry == INVALID_NAMEREF_VALUE) + return ((SHELL_VAR *)0); + if (entry && nameref_p (entry)) + entry = make_new_array_variable (nameref_cell (entry)); + } if (entry == (SHELL_VAR *) 0) entry = make_new_array_variable (name); - else if (readonly_p (entry) || noassign_p (entry)) + else if ((readonly_p (entry) && (flags&ASS_FORCE) == 0) || noassign_p (entry)) { if (readonly_p (entry)) err_readonly (name); @@ -217,71 +308,150 @@ bind_assoc_variable (entry, name, key, value, flags) char *value; int flags; { - SHELL_VAR *dentry; - char *newval; - - if (readonly_p (entry) || noassign_p (entry)) + if ((readonly_p (entry) && (flags&ASS_FORCE) == 0) || noassign_p (entry)) { if (readonly_p (entry)) err_readonly (name); return (entry); } - return (bind_array_var_internal (entry, 0, key, value, flags)); + return (bind_assoc_var_internal (entry, assoc_cell (entry), key, value, flags)); +} + +inline void +init_eltstate (array_eltstate_t *estatep) +{ + if (estatep) + { + estatep->type = ARRAY_INVALID; + estatep->subtype = 0; + estatep->key = estatep->value = 0; + estatep->ind = INTMAX_MIN; + } +} + +inline void +flush_eltstate (array_eltstate_t *estatep) +{ + if (estatep) + FREE (estatep->key); } /* 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(). */ + assign VALUE to that array element by calling bind_array_variable(). + Flags are ASS_ assignment flags */ SHELL_VAR * -assign_array_element (name, value, flags) +assign_array_element (name, value, flags, estatep) char *name, *value; int flags; + array_eltstate_t *estatep; { - char *sub, *vname, *akey; - arrayind_t ind; - int sublen; + char *sub, *vname; + int sublen, isassoc, avflags; SHELL_VAR *entry; - vname = array_variable_name (name, &sub, &sublen); + avflags = 0; + if (flags & ASS_NOEXPAND) + avflags |= AV_NOEXPAND; + if (flags & ASS_ONEWORD) + avflags |= AV_ONEWORD; + vname = array_variable_name (name, avflags, &sub, &sublen); if (vname == 0) return ((SHELL_VAR *)NULL); - if ((ALL_ELEMENT_SUB (sub[0]) && sub[1] == ']') || (sublen <= 1)) + entry = find_variable (vname); + isassoc = entry && assoc_p (entry); + + /* We don't allow assignment to `*' or `@' associative array keys if the + caller hasn't told us the subscript has already been expanded + (ASS_NOEXPAND). If the caller has explicitly told us it's ok + (ASS_ALLOWALLSUB) we allow it. */ + if (((isassoc == 0 || (flags & (ASS_NOEXPAND|ASS_ALLOWALLSUB)) == 0) && + (ALL_ELEMENT_SUB (sub[0]) && sub[1] == ']')) || + (sublen <= 1) || + (sub[sublen] != '\0')) /* sanity check */ { free (vname); err_badarraysub (name); return ((SHELL_VAR *)NULL); } - entry = find_variable (vname); + entry = assign_array_element_internal (entry, name, vname, sub, sublen, value, flags, estatep); + +#if ARRAY_EXPORT + if (entry && exported_p (entry)) + { + INVALIDATE_EXPORTSTR (entry); + array_needs_making = 1; + } +#endif + + free (vname); + return entry; +} + +static SHELL_VAR * +assign_array_element_internal (entry, name, vname, sub, sublen, value, flags, estatep) + SHELL_VAR *entry; + char *name; /* only used for error messages */ + char *vname; + char *sub; + int sublen; + char *value; + int flags; + array_eltstate_t *estatep; +{ + char *akey, *nkey; + arrayind_t ind; + char *newval; + + /* rely on the caller to initialize estatep */ if (entry && assoc_p (entry)) { sub[sublen-1] = '\0'; - akey = expand_assignment_string_to_string (sub, 0); /* [ */ + if ((flags & ASS_NOEXPAND) == 0) + akey = expand_subscript_string (sub, 0); /* [ */ + else + akey = savestring (sub); sub[sublen-1] = ']'; if (akey == 0 || *akey == 0) { - free (vname); err_badarraysub (name); + FREE (akey); return ((SHELL_VAR *)NULL); } + if (estatep) + nkey = savestring (akey); /* assoc_insert/assoc_replace frees akey */ entry = bind_assoc_variable (entry, vname, akey, value, flags); + if (estatep) + { + estatep->type = ARRAY_ASSOC; + estatep->key = nkey; + estatep->value = entry ? assoc_reference (assoc_cell (entry), nkey) : 0; + } } else { - ind = array_expand_index (sub, sublen); + ind = array_expand_index (entry, sub, sublen, 0); + /* negative subscripts to indexed arrays count back from end */ + if (entry && ind < 0) + ind = (array_p (entry) ? array_max_index (array_cell (entry)) : 0) + 1 + ind; if (ind < 0) { - free (vname); err_badarraysub (name); return ((SHELL_VAR *)NULL); } entry = bind_array_variable (vname, ind, value, flags); + if (estatep) + { + estatep->type = ARRAY_INDEXED; + estatep->ind = ind; + estatep->value = entry ? array_reference (array_cell (entry), ind) : 0; + } } - free (vname); return (entry); } @@ -299,6 +469,26 @@ find_or_make_array_variable (name, flags) SHELL_VAR *var; var = find_variable (name); + if (var == 0) + { + /* See if we have a nameref pointing to a variable that hasn't been + created yet. */ + var = find_variable_last_nameref (name, 1); + if (var && nameref_p (var) && invisible_p (var)) + { + internal_warning (_("%s: removing nameref attribute"), name); + VUNSETATTR (var, att_nameref); + } + if (var && nameref_p (var)) + { + if (valid_nameref_value (nameref_cell (var), 2) == 0) + { + sh_invalidid (nameref_cell (var)); + return ((SHELL_VAR *)NULL); + } + var = (flags & 2) ? make_new_assoc_variable (nameref_cell (var)) : make_new_array_variable (nameref_cell (var)); + } + } if (var == 0) var = (flags & 2) ? make_new_assoc_variable (name) : make_new_array_variable (name); @@ -310,9 +500,12 @@ find_or_make_array_variable (name, flags) } else if ((flags & 2) && array_p (var)) { + set_exit_status (EXECUTION_FAILURE); report_error (_("%s: cannot convert indexed to associative array"), name); return ((SHELL_VAR *)NULL); } + else if (flags & 2) + var = assoc_p (var) ? var : convert_var_to_assoc (var); else if (array_p (var) == 0 && assoc_p (var) == 0) var = convert_var_to_array (var); @@ -356,10 +549,10 @@ assign_array_var_from_word_list (var, list, flags) 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); + bind_array_var_internal (var, i, 0, l->word->word, flags & ~ASS_APPEND); + + VUNSETATTR (var, att_invisible); /* no longer invisible */ + return var; } @@ -373,7 +566,9 @@ expand_compound_array_assignment (var, value, flags) char *val; int ni; - /* I don't believe this condition is ever true any more. */ + /* This condition is true when invoked from the declare builtin with a + command like + declare -a d='([1]="" [2]="bdef" [5]="hello world" "test")' */ if (*value == '(') /*)*/ { ni = 1; @@ -388,10 +583,31 @@ expand_compound_array_assignment (var, value, flags) shell expansions including pathname generation and word splitting. */ /* First we split the string on whitespace, using the shell parser (ksh93 seems to do this). */ + /* XXX - this needs a rethink, maybe use split_at_delims */ list = parse_string_to_word_list (val, 1, "array assign"); + /* If the parser has quoted CTLESC and CTNLNUL with CTLESC in unquoted + words, we need to remove those here because the code below assumes + they are there because they exist in the original word. */ + /* XXX - if we rethink parse_string_to_word_list above, change this. */ + for (nlist = list; nlist; nlist = nlist->next) + if ((nlist->word->flags & W_QUOTED) == 0) + remove_quoted_escapes (nlist->word->word); + + /* Note that we defer expansion of the assignment statements for associative + arrays here, so we don't have to scan the subscript and find the ending + bracket twice. See the caller below. */ + if (var && assoc_p (var)) + { + if (val != value) + free (val); + return list; + } + /* If we're using [subscript]=value, we need to quote each [ and ] to - prevent unwanted filename expansion. */ + prevent unwanted filename expansion. This doesn't need to be done + for associative array expansion, since that uses a different expansion + function (see assign_compound_array_list below). */ if (list) quote_array_assignment_chars (list); @@ -407,7 +623,78 @@ expand_compound_array_assignment (var, value, flags) return nlist; } -/* Callers ensure that VAR is not NULL */ +#if ASSOC_KVPAIR_ASSIGNMENT +static void +assign_assoc_from_kvlist (var, nlist, h, flags) + SHELL_VAR *var; + WORD_LIST *nlist; + HASH_TABLE *h; + int flags; +{ + WORD_LIST *list; + char *akey, *aval, *k, *v; + + for (list = nlist; list; list = list->next) + { + k = list->word->word; + v = list->next ? list->next->word->word : 0; + + if (list->next) + list = list->next; + + akey = expand_subscript_string (k, 0); + if (akey == 0 || *akey == 0) + { + err_badarraysub (k); + FREE (akey); + continue; + } + + aval = expand_assignment_string_to_string (v, 0); + if (aval == 0) + { + aval = (char *)xmalloc (1); + aval[0] = '\0'; /* like do_assignment_internal */ + } + + bind_assoc_var_internal (var, h, akey, aval, flags); + free (aval); + } +} + +/* Return non-zero if L appears to be a key-value pair associative array + compound assignment. */ +int +kvpair_assignment_p (l) + WORD_LIST *l; +{ + return (l && (l->word->flags & W_ASSIGNMENT) == 0 && l->word->word[0] != '['); /*]*/ +} + +char * +expand_and_quote_kvpair_word (w) + char *w; +{ + char *r, *s, *t; + + t = w ? expand_subscript_string (w, 0) : 0; + s = (t && strchr (t, CTLESC)) ? quote_escapes (t) : t; + r = sh_single_quote (s ? s : ""); + if (s != t) + free (s); + free (t); + return r; +} +#endif + +/* Callers ensure that VAR is not NULL. Associative array assignments have not + been expanded when this is called, or have been expanded once and single- + quoted, so we don't have to scan through an unquoted expanded subscript to + find the ending bracket; indexed array assignments have been expanded and + possibly single-quoted to prevent further expansion. + + If this is an associative array, we perform the assignments into NHASH and + set NHASH to be the value of VAR after processing the assignments in NLIST */ void assign_compound_array_list (var, nlist, flags) SHELL_VAR *var; @@ -415,15 +702,15 @@ assign_compound_array_list (var, nlist, flags) int flags; { ARRAY *a; - HASH_TABLE *h; + HASH_TABLE *h, *nhash; WORD_LIST *list; - char *w, *val, *nval; - int len, iflags; + char *w, *val, *nval, *savecmd; + int len, iflags, free_val; 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; + nhash = h = (var && assoc_p (var)) ? assoc_cell (var) : (HASH_TABLE *)0; akey = (char *)0; ind = 0; @@ -435,20 +722,40 @@ assign_compound_array_list (var, nlist, flags) if (a && array_p (var)) array_flush (a); else if (h && assoc_p (var)) - assoc_flush (h); + nhash = assoc_create (h->nbuckets); } last_ind = (a && (flags & ASS_APPEND)) ? array_max_index (a) + 1 : 0; +#if ASSOC_KVPAIR_ASSIGNMENT + if (assoc_p (var) && kvpair_assignment_p (nlist)) + { + iflags = flags & ~ASS_APPEND; + assign_assoc_from_kvlist (var, nlist, nhash, iflags); + if (nhash && nhash != h) + { + h = assoc_cell (var); + var_setassoc (var, nhash); + assoc_dispose (h); + } + return; + } +#endif + for (list = nlist; list; list = list->next) { - iflags = flags; + /* Don't allow var+=(values) to make assignments in VALUES append to + existing values by default. */ + iflags = flags & ~ASS_APPEND; 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)); + /* Don't have to handle embedded quotes specially any more, since + associative array subscripts have not been expanded yet (see + above). */ + len = skipsubscript (w, 0, 0); /* XXX - changes for `+=' */ if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '='))) @@ -474,18 +781,19 @@ assign_compound_array_list (var, nlist, flags) continue; } - if (ALL_ELEMENT_SUB (w[1]) && len == 2) + if (ALL_ELEMENT_SUB (w[1]) && len == 2 && array_p (var)) { - if (assoc_p (var)) - report_error (_("%s: invalid associative array key"), w); - else - report_error (_("%s: cannot assign to non-numeric index"), w); + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: cannot assign to non-numeric index"), w); continue; } if (array_p (var)) { - ind = array_expand_index (w + 1, len); + ind = array_expand_index (var, w + 1, len, 0); + /* negative subscripts to indexed arrays count back from end */ + if (ind < 0) + ind = array_max_index (array_cell (var)) + 1 + ind; if (ind < 0) { err_badarraysub (w); @@ -496,10 +804,15 @@ assign_compound_array_list (var, nlist, flags) } else if (assoc_p (var)) { - akey = substring (w, 1, len); + /* This is not performed above, see expand_compound_array_assignment */ + w[len] = '\0'; /*[*/ + akey = expand_subscript_string (w+1, 0); + w[len] = ']'; + /* And we need to expand the value also, see below */ if (akey == 0 || *akey == 0) { err_badarraysub (w); + FREE (akey); continue; } } @@ -511,10 +824,11 @@ assign_compound_array_list (var, nlist, flags) val = w + len + 3; } else - val = w + len + 2; + val = w + len + 2; } else if (assoc_p (var)) { + set_exit_status (EXECUTION_FAILURE); report_error (_("%s: %s: must use subscript when assigning associative array"), var->name, w); continue; } @@ -524,10 +838,38 @@ assign_compound_array_list (var, nlist, flags) val = w; } + free_val = 0; + /* See above; we need to expand the value here */ + if (assoc_p (var)) + { + val = expand_assignment_string_to_string (val, 0); + if (val == 0) + { + val = (char *)xmalloc (1); + val[0] = '\0'; /* like do_assignment_internal */ + } + free_val = 1; + } + + savecmd = this_command_name; if (integer_p (var)) this_command_name = (char *)NULL; /* no command name for errors */ - bind_array_var_internal (var, ind, akey, val, iflags); + if (assoc_p (var)) + bind_assoc_var_internal (var, nhash, akey, val, iflags); + else + bind_array_var_internal (var, ind, akey, val, iflags); last_ind++; + this_command_name = savecmd; + + if (free_val) + free (val); + } + + if (assoc_p (var) && nhash && nhash != h) + { + h = assoc_cell (var); + var_setassoc (var, nhash); + assoc_dispose (h); } } @@ -549,6 +891,10 @@ assign_array_var_from_string (var, value, flags) if (nlist) dispose_words (nlist); + + if (var) + VUNSETATTR (var, att_invisible); /* no longer invisible */ + return (var); } @@ -598,6 +944,137 @@ quote_assign (string) return temp; } +/* Take a word W of the form [IND]=VALUE and transform it to ['IND']='VALUE' + to prevent further expansion. This is called for compound assignments to + indexed arrays. W has already undergone word expansions. If W has no [IND]=, + just single-quote and return it. */ +static char * +quote_compound_array_word (w, type) + char *w; + int type; +{ + char *nword, *sub, *value, *t; + int ind, wlen, i; + + if (w[0] != LBRACK) + return (sh_single_quote (w)); /* XXX - quote CTLESC */ + ind = skipsubscript (w, 0, 0); + if (w[ind] != RBRACK) + return (sh_single_quote (w)); /* XXX - quote CTLESC */ + + wlen = strlen (w); + w[ind] = '\0'; + t = (strchr (w+1, CTLESC)) ? quote_escapes (w+1) : w+1; + sub = sh_single_quote (t); + if (t != w+1) + free (t); + w[ind] = RBRACK; + + nword = xmalloc (wlen * 4 + 5); /* wlen*4 is max single quoted length */ + nword[0] = LBRACK; + i = STRLEN (sub); + memcpy (nword+1, sub, i); + free (sub); + i++; /* accommodate the opening LBRACK */ + nword[i++] = w[ind++]; /* RBRACK */ + if (w[ind] == '+') + nword[i++] = w[ind++]; + nword[i++] = w[ind++]; + t = (strchr (w+ind, CTLESC)) ? quote_escapes (w+ind) : w+ind; + value = sh_single_quote (t); + if (t != w+ind) + free (t); + strcpy (nword + i, value); + + return nword; +} + +/* Expand the key and value in W, which is of the form [KEY]=VALUE, and + reconstruct W with the expanded and single-quoted version: + ['expanded-key']='expanded-value'. If there is no [KEY]=, single-quote the + word and return it. Very similar to previous function, but does not assume + W has already been expanded, and expands the KEY and VALUE separately. + Used for compound assignments to associative arrays that are arguments to + declaration builtins (declare -A a=( list )). */ +char * +expand_and_quote_assoc_word (w, type) + char *w; + int type; +{ + char *nword, *key, *value, *s, *t; + int ind, wlen, i; + + if (w[0] != LBRACK) + return (sh_single_quote (w)); /* XXX - quote_escapes */ + ind = skipsubscript (w, 0, 0); + if (w[ind] != RBRACK) + return (sh_single_quote (w)); /* XXX - quote_escapes */ + + w[ind] = '\0'; + t = expand_subscript_string (w+1, 0); + s = (t && strchr (t, CTLESC)) ? quote_escapes (t) : t; + key = sh_single_quote (s ? s : ""); + if (s != t) + free (s); + w[ind] = RBRACK; + free (t); + + wlen = STRLEN (key); + nword = xmalloc (wlen + 5); + nword[0] = LBRACK; + memcpy (nword+1, key, wlen); + i = wlen + 1; /* accommodate the opening LBRACK */ + + nword[i++] = w[ind++]; /* RBRACK */ + if (w[ind] == '+') + nword[i++] = w[ind++]; + nword[i++] = w[ind++]; + + t = expand_assignment_string_to_string (w+ind, 0); + s = (t && strchr (t, CTLESC)) ? quote_escapes (t) : t; + value = sh_single_quote (s ? s : ""); + if (s != t) + free (s); + free (t); + nword = xrealloc (nword, wlen + 5 + STRLEN (value)); + strcpy (nword + i, value); + + free (key); + free (value); + + return nword; +} + +/* For each word in a compound array assignment, if the word looks like + [ind]=value, single-quote ind and value, but leave the brackets and + the = sign (and any `+') alone. If it's not an assignment, just single- + quote the word. This is used for indexed arrays. */ +void +quote_compound_array_list (list, type) + WORD_LIST *list; + int type; +{ + char *s, *t; + WORD_LIST *l; + + for (l = list; l; l = l->next) + { + if (l->word == 0 || l->word->word == 0) + continue; /* should not happen, but just in case... */ + if ((l->word->flags & W_ASSIGNMENT) == 0) + { + s = (strchr (l->word->word, CTLESC)) ? quote_escapes (l->word->word) : l->word->word; + t = sh_single_quote (s); + if (s != l->word->word) + free (s); + } + else + t = quote_compound_array_word (l->word->word, type); + free (l->word->word); + l->word->word = t; + } +} + /* 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 @@ -611,12 +1088,17 @@ quote_array_assignment_chars (list) { 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 */ + /* Don't bother if it hasn't been recognized as an assignment or + doesn't look like [ind]=value */ + if ((l->word->flags & W_ASSIGNMENT) == 0) + continue; 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; + l->word->flags |= W_NOGLOB; /* XXX - W_NOSPLIT also? */ } } @@ -625,43 +1107,79 @@ quote_array_assignment_chars (list) /* 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. */ +/* If FLAGS&1 (VA_NOEXPAND) we don't expand the subscript; we just use it + as-is. If FLAGS&VA_ONEWORD, we don't try to use skipsubscript to parse + the subscript, we just assume the subscript ends with a close bracket, + if one is present, and use what's inside the brackets. */ int -unbind_array_element (var, sub) +unbind_array_element (var, sub, flags) SHELL_VAR *var; char *sub; + int flags; { - 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'; + /* Assume that the caller (unset_builtin) passes us a null-terminated SUB, + so we don't have to use VA_ONEWORD or parse the subscript again with + skipsubscript(). */ if (ALL_ELEMENT_SUB (sub[0]) && sub[1] == 0) { - unbind_variable (var->name); - return (0); + if (array_p (var) || assoc_p (var)) + { + if (flags & VA_ALLOWALL) + { + unbind_variable (var->name); /* XXX -- {array,assoc}_flush ? */ + return (0); + } + /* otherwise we fall through and try to unset element `@' or `*' */ + } + else + return -2; /* don't allow this to unset scalar variables */ } if (assoc_p (var)) { - akey = expand_assignment_string_to_string (sub, 0); /* [ */ + akey = (flags & VA_NOEXPAND) ? sub : expand_subscript_string (sub, 0); if (akey == 0 || *akey == 0) { builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg)); + FREE (akey); return -1; } assoc_remove (assoc_cell (var), akey); + if (akey != sub) + free (akey); } - else + else if (array_p (var)) { - ind = array_expand_index (sub, len+1); + if (ALL_ELEMENT_SUB (sub[0]) && sub[1] == 0) + { + /* We can go several ways here: + 1) remove the array (backwards compatible) + 2) empty the array (new behavior) + 3) do nothing; treat the `@' or `*' as an expression and throw + an error + */ + /* Behavior 1 */ + if (shell_compatibility_level <= 51) + { + unbind_variable (name_cell (var)); + return 0; + } + else /* Behavior 2 */ + { + array_flush (array_cell (var)); + return 0; + } + /* Fall through for behavior 3 */ + } + ind = array_expand_index (var, sub, strlen (sub) + 1, 0); + /* negative subscripts to indexed arrays count back from end */ + if (ind < 0) + ind = array_max_index (array_cell (var)) + 1 + ind; if (ind < 0) { builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg)); @@ -671,6 +1189,19 @@ unbind_array_element (var, sub) if (ae) array_dispose_element (ae); } + else /* array_p (var) == 0 && assoc_p (var) == 0 */ + { + akey = this_command_name; + ind = array_expand_index (var, sub, strlen (sub) + 1, 0); + this_command_name = akey; + if (ind == 0) + { + unbind_variable (var->name); + return (0); + } + else + return -2; /* any subscript other than 0 is invalid with scalar variables */ + } return 0; } @@ -722,55 +1253,124 @@ print_assoc_assignment (var, quoted) /***********************************************************************/ /* Return 1 if NAME is a properly-formed array reference v[sub]. */ + +/* Return 1 if NAME is a properly-formed array reference v[sub]. */ + +/* When NAME is a properly-formed array reference and a non-null argument SUBP + is supplied, '[' and ']' that enclose the subscript are replaced by '\0', + and the pointer to the subscript in NAME is assigned to *SUBP, so that NAME + and SUBP can be later used as the array name and the subscript, + respectively. When SUBP is the null pointer, the original string NAME will + not be modified. */ +/* We need to reserve 1 for FLAGS, which we pass to skipsubscript. */ int -valid_array_reference (name) +tokenize_array_reference (name, flags, subp) char *name; + int flags; + char **subp; { char *t; - int r, len; + int r, len, isassoc, ssflags; + SHELL_VAR *entry; t = mbschr (name, '['); /* ] */ + isassoc = 0; if (t) { *t = '\0'; r = legal_identifier (name); + if (flags & VA_NOEXPAND) /* Don't waste a lookup if we don't need one */ + isassoc = (entry = find_variable (name)) && assoc_p (entry); *t = '['; if (r == 0) return 0; - /* Check for a properly-terminated non-blank subscript. */ - len = skipsubscript (t, 0, 0); - if (t[len] != ']' || len == 1) + + ssflags = 0; + if (isassoc && ((flags & (VA_NOEXPAND|VA_ONEWORD)) == (VA_NOEXPAND|VA_ONEWORD))) + len = strlen (t) - 1; + else if (isassoc) + { + if (flags & VA_NOEXPAND) + ssflags |= 1; + len = skipsubscript (t, 0, ssflags); + } + else + /* Check for a properly-terminated non-null subscript. */ + len = skipsubscript (t, 0, 0); /* arithmetic expression */ + + if (t[len] != ']' || len == 1 || t[len+1] != '\0') return 0; + +#if 0 + /* Could check and allow subscripts consisting only of whitespace for + existing associative arrays, using isassoc */ for (r = 1; r < len; r++) if (whitespace (t[r]) == 0) - return 1; - return 0; + break; + if (r == len) + return 0; /* Fail if the subscript contains only whitespaces. */ +#endif + + if (subp) + { + t[0] = t[len] = '\0'; + *subp = t + 1; + } + + /* This allows blank subscripts */ + return 1; } return 0; } +/* Return 1 if NAME is a properly-formed array reference v[sub]. */ + +/* We need to reserve 1 for FLAGS, which we pass to skipsubscript. */ +int +valid_array_reference (name, flags) + const char *name; + int flags; +{ + return tokenize_array_reference ((char *)name, flags, (char **)NULL); +} + /* Expand the array index beginning at S and extending LEN characters. */ arrayind_t -array_expand_index (s, len) +array_expand_index (var, s, len, flags) + SHELL_VAR *var; char *s; int len; + int flags; { - char *exp, *t; - int expok; + char *exp, *t, *savecmd; + int expok, eflag; arrayind_t val; exp = (char *)xmalloc (len); strncpy (exp, s, len - 1); exp[len - 1] = '\0'; - t = expand_arith_string (exp, 0); +#if 0 /* TAG: maybe bash-5.2 */ + if ((flags & AV_NOEXPAND) == 0) + t = expand_arith_string (exp, Q_DOUBLE_QUOTES|Q_ARITH|Q_ARRAYSUB); /* XXX - Q_ARRAYSUB for future use */ + else + t = exp; +#else + t = expand_arith_string (exp, Q_DOUBLE_QUOTES|Q_ARITH|Q_ARRAYSUB); /* XXX - Q_ARRAYSUB for future use */ +#endif + savecmd = this_command_name; this_command_name = (char *)NULL; - val = evalexp (t, &expok); - free (t); + eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED; + val = evalexp (t, eflag, &expok); /* XXX - was 0 but we expanded exp already */ + this_command_name = savecmd; + if (t != exp) + free (t); free (exp); if (expok == 0) { - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); + if (no_longjmp_on_fatal_error) + return 0; top_level_cleanup (); jump_to_top_level (DISCARD); } @@ -782,12 +1382,14 @@ array_expand_index (s, len) 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; +array_variable_name (s, flags, subp, lenp) + const char *s; + int flags; + char **subp; int *lenp; { char *t, *ret; - int ind, ni; + int ind, ni, ssflags; t = mbschr (s, '['); if (t == 0) @@ -799,7 +1401,15 @@ array_variable_name (s, subp, lenp) return ((char *)NULL); } ind = t - s; - ni = skipsubscript (s, ind, 0); + if ((flags & (AV_NOEXPAND|AV_ONEWORD)) == (AV_NOEXPAND|AV_ONEWORD)) + ni = strlen (s) - 1; + else + { + ssflags = 0; + if (flags & AV_NOEXPAND) + ssflags |= 1; + ni = skipsubscript (s, ind, ssflags); + } if (ni <= ind + 1 || s[ni] != ']') { err_badarraysub (s); @@ -826,40 +1436,58 @@ array_variable_name (s, subp, lenp) 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; +array_variable_part (s, flags, subp, lenp) + const char *s; + int flags; + char **subp; int *lenp; { char *t; SHELL_VAR *var; - t = array_variable_name (s, subp, lenp); + t = array_variable_name (s, flags, subp, lenp); if (t == 0) return ((SHELL_VAR *)NULL); - var = find_variable (t); + var = find_variable (t); /* XXX - handle namerefs here? */ free (t); - return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var; + return var; /* now return invisible variables; caller must handle */ } +#define INDEX_ERROR() \ + do \ + { \ + if (var) \ + err_badarraysub (var->name); \ + else \ + { \ + t[-1] = '\0'; \ + err_badarraysub (s); \ + t[-1] = '['; /* ] */\ + } \ + return ((char *)NULL); \ + } \ + while (0) + /* 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; +array_value_internal (s, quoted, flags, estatep) + const char *s; + int quoted, flags; + array_eltstate_t *estatep; { - int len; + int len, isassoc, subtype; arrayind_t ind; char *akey; char *retval, *t, *temp; WORD_LIST *l; SHELL_VAR *var; - var = array_variable_part (s, &t, &len); + var = array_variable_part (s, flags, &t, &len); /* XXX */ /* Expand the index, even if the variable doesn't exist, in case side effects are needed, like ${w[i++]} where w is unset. */ @@ -871,82 +1499,135 @@ array_value_internal (s, quoted, allow_all, rtype) if (len == 0) return ((char *)NULL); /* error message already printed */ + isassoc = var && assoc_p (var); /* [ */ - if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']') + akey = 0; + subtype = 0; + if (estatep) + estatep->value = (char *)NULL; + + /* Backwards compatibility: we only change the behavior of A[@] and A[*] + for associative arrays, and the caller has to request it. */ + if ((isassoc == 0 || (flags & AV_ATSTARKEYS) == 0) && ALL_ELEMENT_SUB (t[0]) && t[1] == ']') { - if (rtype) - *rtype = (t[0] == '*') ? 1 : 2; - if (allow_all == 0) + if (estatep) + estatep->subtype = (t[0] == '*') ? 1 : 2; + if ((flags & AV_ALLOWALL) == 0) { err_badarraysub (s); return ((char *)NULL); } else if (var == 0 || value_cell (var) == 0) return ((char *)NULL); + else if (invisible_p (var)) + return ((char *)NULL); else if (array_p (var) == 0 && assoc_p (var) == 0) - l = add_string_to_list (value_cell (var), (WORD_LIST *)NULL); + { + if (estatep) + estatep->type = ARRAY_SCALAR; + l = add_string_to_list (value_cell (var), (WORD_LIST *)NULL); + } else if (assoc_p (var)) { + if (estatep) + estatep->type = ARRAY_ASSOC; l = assoc_to_word_list (assoc_cell (var)); if (l == (WORD_LIST *)NULL) return ((char *)NULL); } else { + if (estatep) + estatep->type = ARRAY_INDEXED; l = array_to_word_list (array_cell (var)); if (l == (WORD_LIST *)NULL) return ((char *) NULL); } + /* Caller of array_value takes care of inspecting estatep->subtype and + duplicating retval if subtype == 0, so this is not a memory leak */ if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) { - temp = string_list_dollar_star (l); + temp = string_list_dollar_star (l, quoted, (flags & AV_ASSIGNRHS) ? PF_ASSIGNRHS : 0); retval = quote_string (temp); free (temp); } else /* ${name[@]} or unquoted ${name[*]} */ - retval = string_list_dollar_at (l, quoted); + retval = string_list_dollar_at (l, quoted, (flags & AV_ASSIGNRHS) ? PF_ASSIGNRHS : 0); dispose_words (l); } else { - if (rtype) - *rtype = 0; + if (estatep) + estatep->subtype = 0; if (var == 0 || array_p (var) || assoc_p (var) == 0) { - ind = array_expand_index (t, len); - if (ind < 0) + if ((flags & AV_USEIND) == 0 || estatep == 0) { -index_error: - if (var) - err_badarraysub (var->name); - else + ind = array_expand_index (var, t, len, flags); + if (ind < 0) { - t[-1] = '\0'; - err_badarraysub (s); - t[-1] = '['; /* ] */ + /* negative subscripts to indexed arrays count back from end */ + if (var && array_p (var)) + ind = array_max_index (array_cell (var)) + 1 + ind; + if (ind < 0) + INDEX_ERROR(); } - return ((char *)NULL); + if (estatep) + estatep->ind = ind; } + else if (estatep && (flags & AV_USEIND)) + ind = estatep->ind; + if (estatep && var) + estatep->type = array_p (var) ? ARRAY_INDEXED : ARRAY_SCALAR; } else if (assoc_p (var)) { t[len - 1] = '\0'; - akey = expand_assignment_string_to_string (t, 0); /* [ */ + if (estatep) + estatep->type = ARRAY_ASSOC; + if ((flags & AV_USEIND) && estatep && estatep->key) + akey = savestring (estatep->key); + else if ((flags & AV_NOEXPAND) == 0) + akey = expand_subscript_string (t, 0); /* [ */ + else + akey = savestring (t); t[len - 1] = ']'; if (akey == 0 || *akey == 0) - goto index_error; + { + FREE (akey); + INDEX_ERROR(); + } + } + + if (var == 0 || value_cell (var) == 0) + { + FREE (akey); + return ((char *)NULL); + } + else if (invisible_p (var)) + { + FREE (akey); + return ((char *)NULL); } - - if (var == 0) - return ((char *)NULL); if (array_p (var) == 0 && assoc_p (var) == 0) - return (ind == 0 ? value_cell (var) : (char *)NULL); + retval = (ind == 0) ? value_cell (var) : (char *)NULL; else if (assoc_p (var)) - retval = assoc_reference (assoc_cell (var), akey); + { + retval = assoc_reference (assoc_cell (var), akey); + if (estatep && estatep->key && (flags & AV_USEIND)) + free (akey); /* duplicated estatep->key */ + else if (estatep) + estatep->key = akey; /* XXX - caller must manage */ + else /* not saving it anywhere */ + free (akey); + } else retval = array_reference (array_cell (var), ind); + + if (estatep) + estatep->value = retval; } return retval; @@ -955,41 +1636,52 @@ array_value_internal (s, quoted, allow_all, rtype) /* 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; +array_value (s, quoted, flags, estatep) + const char *s; + int quoted, flags; + array_eltstate_t *estatep; { - return (array_value_internal (s, quoted, 1, rtype)); + char *retval; + + retval = array_value_internal (s, quoted, flags|AV_ALLOWALL, estatep); + return retval; } /* 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. */ + If (FLAGS & AV_ALLOWALL) 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; +get_array_value (s, flags, estatep) + const char *s; + int flags; + array_eltstate_t *estatep; { - return (array_value_internal (s, 0, allow_all, rtype)); + char *retval; + + retval = array_value_internal (s, 0, flags, estatep); + return retval; } char * -array_keys (s, quoted) +array_keys (s, quoted, pflags) char *s; - int quoted; + int quoted, pflags; { int len; char *retval, *t, *temp; WORD_LIST *l; SHELL_VAR *var; - var = array_variable_part (s, &t, &len); + var = array_variable_part (s, 0, &t, &len); /* [ */ if (var == 0 || ALL_ELEMENT_SUB (t[0]) == 0 || t[1] != ']') return (char *)NULL; + if (var_isset (var) == 0 || invisible_p (var)) + 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)) @@ -999,14 +1691,7 @@ array_keys (s, quoted) 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); + retval = string_list_pos_params (t[0], l, quoted, pflags); dispose_words (l); return retval; diff --git a/arrayfunc.h b/arrayfunc.h index c12fc99..69112b5 100644 --- a/arrayfunc.h +++ b/arrayfunc.h @@ -1,6 +1,6 @@ /* arrayfunc.h -- declarations for miscellaneous array functions in arrayfunc.c */ -/* Copyright (C) 2001-2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,41 +23,117 @@ /* Must include variables.h before including this file. */ +/* An object to encapsulate the state of an array element. It can describe + an array assignment A[KEY]=VALUE or a[IND]=VALUE depending on TYPE, or + for passing array subscript references around, where VALUE would be + ${a[IND]} or ${A[KEY]}. This is not dependent on ARRAY_VARS so we can + use it in function parameters. */ + +/* values for `type' field */ +#define ARRAY_INVALID -1 +#define ARRAY_SCALAR 0 +#define ARRAY_INDEXED 1 +#define ARRAY_ASSOC 2 + +/* KEY will contain allocated memory if called through the assign_array_element + code path because of how assoc_insert works. */ +typedef struct element_state +{ + short type; /* assoc or indexed, says which fields are valid */ + short subtype; /* `*', `@', or something else */ + arrayind_t ind; + char *key; /* can be allocated memory */ + char *value; +} array_eltstate_t; + #if defined (ARRAY_VARS) -extern SHELL_VAR *convert_var_to_array __P((SHELL_VAR *)); -extern SHELL_VAR *convert_var_to_assoc __P((SHELL_VAR *)); +/* This variable means to not expand associative array subscripts more than + once, when performing variable expansion. */ +extern int assoc_expand_once; + +/* The analog for indexed array subscripts */ +extern int array_expand_once; + +/* Flags for array_value_internal and callers array_value/get_array_value; also + used by array_variable_name and array_variable_part. */ +#define AV_ALLOWALL 0x001 /* treat a[@] like $@ and a[*] like $* */ +#define AV_QUOTED 0x002 +#define AV_USEIND 0x004 +#define AV_USEVAL 0x008 /* XXX - should move this */ +#define AV_ASSIGNRHS 0x010 /* no splitting, special case ${a[@]} */ +#define AV_NOEXPAND 0x020 /* don't run assoc subscripts through word expansion */ +#define AV_ONEWORD 0x040 /* not used yet */ +#define AV_ATSTARKEYS 0x080 /* accept a[@] and a[*] but use them as keys, not special values */ + +/* Flags for valid_array_reference. Value 1 is reserved for skipsubscript(). + Also used by unbind_array_element, which is currently the only function + that uses VA_ALLOWALL. */ +#define VA_NOEXPAND 0x001 +#define VA_ONEWORD 0x002 +#define VA_ALLOWALL 0x004 /* allow @ to mean all elements of the array */ + +extern SHELL_VAR *convert_var_to_array PARAMS((SHELL_VAR *)); +extern SHELL_VAR *convert_var_to_assoc PARAMS((SHELL_VAR *)); + +extern char *make_array_variable_value PARAMS((SHELL_VAR *, arrayind_t, char *, char *, int)); + +extern SHELL_VAR *bind_array_variable PARAMS((char *, arrayind_t, char *, int)); +extern SHELL_VAR *bind_array_element PARAMS((SHELL_VAR *, arrayind_t, char *, int)); +extern SHELL_VAR *assign_array_element PARAMS((char *, char *, int, array_eltstate_t *)); + +extern SHELL_VAR *bind_assoc_variable PARAMS((SHELL_VAR *, char *, char *, char *, int)); + +extern SHELL_VAR *find_or_make_array_variable PARAMS((char *, int)); + +extern SHELL_VAR *assign_array_from_string PARAMS((char *, char *, int)); +extern SHELL_VAR *assign_array_var_from_word_list PARAMS((SHELL_VAR *, WORD_LIST *, int)); + +extern WORD_LIST *expand_compound_array_assignment PARAMS((SHELL_VAR *, char *, int)); +extern void assign_compound_array_list PARAMS((SHELL_VAR *, WORD_LIST *, int)); +extern SHELL_VAR *assign_array_var_from_string PARAMS((SHELL_VAR *, char *, int)); + +extern char *expand_and_quote_assoc_word PARAMS((char *, int)); +extern void quote_compound_array_list PARAMS((WORD_LIST *, int)); + +extern int kvpair_assignment_p PARAMS((WORD_LIST *)); +extern char *expand_and_quote_kvpair_word PARAMS((char *)); -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 int unbind_array_element PARAMS((SHELL_VAR *, char *, int)); +extern int skipsubscript PARAMS((const char *, int, int)); -extern SHELL_VAR *bind_assoc_variable __P((SHELL_VAR *, char *, char *, char *, int)); +extern void print_array_assignment PARAMS((SHELL_VAR *, int)); +extern void print_assoc_assignment PARAMS((SHELL_VAR *, int)); -extern SHELL_VAR *find_or_make_array_variable __P((char *, int)); +extern arrayind_t array_expand_index PARAMS((SHELL_VAR *, char *, int, int)); +extern int valid_array_reference PARAMS((const char *, int)); +extern int tokenize_array_reference PARAMS((char *, int, char **)); -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 char *array_value PARAMS((const char *, int, int, array_eltstate_t *)); +extern char *get_array_value PARAMS((const char *, int, array_eltstate_t *)); -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 char *array_keys PARAMS((char *, int, int)); -extern int unbind_array_element __P((SHELL_VAR *, char *)); -extern int skipsubscript __P((const char *, int, int)); +extern char *array_variable_name PARAMS((const char *, int, char **, int *)); +extern SHELL_VAR *array_variable_part PARAMS((const char *, int, char **, int *)); -extern void print_array_assignment __P((SHELL_VAR *, int)); -extern void print_assoc_assignment __P((SHELL_VAR *, int)); +extern void init_eltstate (array_eltstate_t *); +extern void flush_eltstate (array_eltstate_t *); -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 *)); +#else -extern char *array_keys __P((char *, int)); +#define AV_ALLOWALL 0 +#define AV_QUOTED 0 +#define AV_USEIND 0 +#define AV_USEVAL 0 +#define AV_ASSIGNRHS 0 +#define AV_NOEXPAND 0 +#define AV_ONEWORD 0 +#define AV_ATSTARKEYS 0 -extern char *array_variable_name __P((char *, char **, int *)); -extern SHELL_VAR *array_variable_part __P((char *, char **, int *)); +#define VA_NOEXPAND 0 +#define VA_ONEWORD 0 +#define VA_ALLOWALL 0 #endif diff --git a/assoc.c b/assoc.c index bbc7b17..cbb5c7e 100644 --- a/assoc.c +++ b/assoc.c @@ -7,7 +7,7 @@ * chet@ins.cwru.edu */ -/* Copyright (C) 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 2008,2009,2011-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -44,7 +44,7 @@ #include "assoc.h" #include "builtins/common.h" -static WORD_LIST *assoc_to_word_list_internal __P((HASH_TABLE *, int)); +static WORD_LIST *assoc_to_word_list_internal PARAMS((HASH_TABLE *, int)); /* assoc_create == hash_create */ @@ -65,7 +65,7 @@ assoc_flush (hash) { hash_flush (hash, 0); } - + int assoc_insert (hash, key, value) HASH_TABLE *hash; @@ -77,11 +77,39 @@ assoc_insert (hash, key, value) b = hash_search (key, hash, HASH_CREATE); if (b == 0) return -1; + /* If we are overwriting an existing element's value, we're not going to + use the key. Nothing in the array assignment code path frees the key + string, so we can free it here to avoid a memory leak. */ + if (b->key != key) + free (key); FREE (b->data); b->data = value ? savestring (value) : (char *)0; return (0); } +/* Like assoc_insert, but returns b->data instead of freeing it */ +PTR_T +assoc_replace (hash, key, value) + HASH_TABLE *hash; + char *key; + char *value; +{ + BUCKET_CONTENTS *b; + PTR_T t; + + b = hash_search (key, hash, HASH_CREATE); + if (b == 0) + return (PTR_T)0; + /* If we are overwriting an existing element's value, we're not going to + use the key. Nothing in the array assignment code path frees the key + string, so we can free it here to avoid a memory leak. */ + if (b->key != key) + free (key); + t = b->data; + b->data = value ? savestring (value) : (char *)0; + return t; +} + void assoc_remove (hash, string) HASH_TABLE *hash; @@ -230,10 +258,10 @@ assoc_remove_quoted_nulls (h) * 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; +assoc_subrange (hash, start, nelem, starsub, quoted, pflags) + HASH_TABLE *hash; + arrayind_t start, nelem; + int starsub, quoted, pflags; { WORD_LIST *l, *save, *h, *t; int i, j; @@ -249,7 +277,10 @@ int starsub, quoted; for (i = 1; l && i < start; i++) l = l->next; if (l == 0) - return ((char *)NULL); + { + dispose_words (save); + return ((char *)NULL); + } for (j = 0,h = t = l; l && j < nelem; j++) { t = l; @@ -258,7 +289,7 @@ int starsub, quoted; t->next = (WORD_LIST *)NULL; - ret = string_list_pos_params (starsub ? '*' : '@', h, quoted); + ret = string_list_pos_params (starsub ? '*' : '@', h, quoted, pflags); if (t != l) t->next = l; @@ -274,54 +305,30 @@ assoc_patsub (h, pat, rep, mflags) char *pat, *rep; int mflags; { - BUCKET_CONTENTS *tlist; - int i, slen; - HASH_TABLE *h2; - char *t, *sifs, *ifs; + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; 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); + wl = assoc_to_word_list (h); + if (wl == 0) + return (char *)NULL; - 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) + for (save = wl; wl; wl = wl->next) { - /* ${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); + t = pat_subst (wl->word->word, pat, rep, mflags); + FREE (wl->word->word); + wl->word->word = t; } - else - t = assoc_to_string (h2, " ", 0); - assoc_dispose (h2); + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words (save); return t; } @@ -333,56 +340,102 @@ assoc_modcase (h, pat, modop, mflags) int modop; int mflags; { - BUCKET_CONTENTS *tlist; - int i, slen; - HASH_TABLE *h2; - char *t, *sifs, *ifs; + char *t; + int pchar, qflags, pflags; + WORD_LIST *wl, *save; 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) + wl = assoc_to_word_list (h); + if (wl == 0) + return ((char *)NULL); + + for (save = wl; wl; wl = wl->next) + { + t = sh_modcase (wl->word->word, pat, modop); + FREE (wl->word->word); + wl->word->word = t; + } + + pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; + qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 0; + + t = string_list_pos_params (pchar, save, qflags, pflags); + dispose_words (save); + + return t; +} + +char * +assoc_to_kvpair (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[rlen = 0] = '\0'; + + for (i = 0; i < hash->nbuckets; i++) + for (tlist = hash_items (i, hash); tlist; tlist = tlist->next) { - t = sh_modcase ((char *)tlist->data, pat, modop); - FREE (tlist->data); - tlist->data = t; - } + if (ansic_shouldquote (tlist->key)) + istr = ansic_quote (tlist->key, 0, (int *)0); + else if (sh_contains_shell_metas (tlist->key)) + istr = sh_double_quote (tlist->key); + else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0') + istr = sh_double_quote (tlist->key); + else + istr = tlist->key; - if (mflags & MATCH_QUOTED) - assoc_quote (h2); - else - assoc_quote_escapes (h2); + vstr = tlist->data ? (ansic_shouldquote ((char *)tlist->data) ? + ansic_quote ((char *)tlist->data, 0, (int *)0) : + sh_double_quote ((char *)tlist->data)) + : (char *)0; - if (mflags & MATCH_STARSUB) - { - assoc_remove_quoted_nulls (h2); - sifs = ifs_firstchar ((int *)NULL); - t = assoc_to_string (h2, sifs, 0); - free (sifs); + elen = STRLEN (istr) + 4 + STRLEN (vstr); + RESIZE_MALLOCED_BUFFER (ret, rlen, (elen+1), rsize, rsize); + + strcpy (ret+rlen, istr); + rlen += STRLEN (istr); + ret[rlen++] = ' '; + if (vstr) + { + strcpy (ret + rlen, vstr); + rlen += STRLEN (vstr); + } + else + { + strcpy (ret + rlen, "\"\""); + rlen += 2; + } + ret[rlen++] = ' '; + + if (istr != tlist->key) + FREE (istr); + + FREE (vstr); } - else if (mflags & MATCH_QUOTED) + + RESIZE_MALLOCED_BUFFER (ret, rlen, 1, rsize, 8); + ret[rlen] = '\0'; + + if (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); + vstr = sh_single_quote (ret); + free (ret); + ret = vstr; } - else - t = assoc_to_string (h2, " ", 0); - - assoc_dispose (h2); - return t; + return ret; } char * @@ -405,15 +458,19 @@ assoc_to_assign (hash, quoted) 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)) + if (ansic_shouldquote (tlist->key)) + istr = ansic_quote (tlist->key, 0, (int *)0); + else if (sh_contains_shell_metas (tlist->key)) istr = sh_double_quote (tlist->key); + else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0') + 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; + + vstr = tlist->data ? (ansic_shouldquote ((char *)tlist->data) ? + ansic_quote ((char *)tlist->data, 0, (int *)0) : + sh_double_quote ((char *)tlist->data)) + : (char *)0; elen = STRLEN (istr) + 8 + STRLEN (vstr); RESIZE_MALLOCED_BUFFER (ret, rlen, (elen+1), rsize, rsize); @@ -430,7 +487,6 @@ assoc_to_assign (hash, quoted) } ret[rlen++] = ' '; - if (istr != tlist->key) FREE (istr); @@ -488,6 +544,30 @@ assoc_keys_to_word_list (h) return (assoc_to_word_list_internal (h, 1)); } +WORD_LIST * +assoc_to_kvpair_list (h) + HASH_TABLE *h; +{ + WORD_LIST *list; + int i; + BUCKET_CONTENTS *tlist; + char *k, *v; + + 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) + { + k = (char *)tlist->key; + v = (char *)tlist->data; + list = make_word_list (make_bare_word (k), list); + list = make_word_list (make_bare_word (v), list); + } + return (REVERSE_LIST(list, WORD_LIST *)); +} + char * assoc_to_string (h, sep, quoted) HASH_TABLE *h; @@ -505,7 +585,7 @@ assoc_to_string (h, sep, quoted) return (savestring ("")); result = NULL; - list = NULL; + l = 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 */ @@ -523,6 +603,8 @@ assoc_to_string (h, sep, quoted) l = REVERSE_LIST(list, WORD_LIST *); result = l ? string_list_internal (l, sep) : savestring (""); + dispose_words (l); + return result; } diff --git a/assoc.h b/assoc.h index 1ec1f6b..664d137 100644 --- a/assoc.h +++ b/assoc.h @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 2008,2009-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,6 +25,8 @@ #include "stdc.h" #include "hashlib.h" +#define ASSOC_HASH_BUCKETS 1024 + #define assoc_empty(h) ((h)->nentries == 0) #define assoc_num_elements(h) ((h)->nentries) @@ -34,28 +36,31 @@ #define assoc_walk(h, f) (hash_walk((h), (f)) -extern void assoc_dispose __P((HASH_TABLE *)); -extern void assoc_flush __P((HASH_TABLE *)); +extern void assoc_dispose PARAMS((HASH_TABLE *)); +extern void assoc_flush PARAMS((HASH_TABLE *)); -extern int assoc_insert __P((HASH_TABLE *, char *, char *)); -extern void assoc_remove __P((HASH_TABLE *, char *)); +extern int assoc_insert PARAMS((HASH_TABLE *, char *, char *)); +extern PTR_T assoc_replace PARAMS((HASH_TABLE *, char *, char *)); +extern void assoc_remove PARAMS((HASH_TABLE *, char *)); -extern char *assoc_reference __P((HASH_TABLE *, char *)); +extern char *assoc_reference PARAMS((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 char *assoc_subrange PARAMS((HASH_TABLE *, arrayind_t, arrayind_t, int, int, int)); +extern char *assoc_patsub PARAMS((HASH_TABLE *, char *, char *, int)); +extern char *assoc_modcase PARAMS((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 HASH_TABLE *assoc_quote PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_quote_escapes PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_dequote PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_dequote_escapes PARAMS((HASH_TABLE *)); +extern HASH_TABLE *assoc_remove_quoted_nulls PARAMS((HASH_TABLE *)); -extern char *assoc_to_assign __P((HASH_TABLE *, int)); +extern char *assoc_to_kvpair PARAMS((HASH_TABLE *, int)); +extern char *assoc_to_assign PARAMS((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 WORD_LIST *assoc_to_word_list PARAMS((HASH_TABLE *)); +extern WORD_LIST *assoc_keys_to_word_list PARAMS((HASH_TABLE *)); +extern WORD_LIST *assoc_to_kvpair_list PARAMS((HASH_TABLE *)); -extern char *assoc_to_string __P((HASH_TABLE *, char *, int)); +extern char *assoc_to_string PARAMS((HASH_TABLE *, char *, int)); #endif /* _ASSOC_H_ */ diff --git a/bashansi.h b/bashansi.h index 2c33937..dd2a544 100644 --- a/bashansi.h +++ b/bashansi.h @@ -1,6 +1,6 @@ /* bashansi.h -- Typically included information required by picky compilers. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,9 +22,6 @@ #define _BASHANSI_H_ #if defined (HAVE_STRING_H) -# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) -# include -# endif # include #endif /* !HAVE_STRING_H */ diff --git a/bashhist.c b/bashhist.c index a80968f..90cd8c3 100644 --- a/bashhist.c +++ b/bashhist.c @@ -1,6 +1,6 @@ /* bashhist.c -- bash interface to the GNU history library. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -24,7 +24,7 @@ #if defined (HAVE_UNISTD_H) # ifdef _MINIX -# include + # include # endif # include #endif @@ -44,6 +44,7 @@ #include "shell.h" #include "flags.h" +#include "parser.h" #include "input.h" #include "parser.h" /* for the struct dstack stuff. */ #include "pathexp.h" /* for the struct ignorevar stuff */ @@ -59,14 +60,18 @@ extern int rl_done, rl_dispatching; /* should really include readline.h */ #endif +#ifndef HISTSIZE_DEFAULT +# define HISTSIZE_DEFAULT "500" +#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 int histignore_item_func PARAMS((struct ign *)); +static int check_history_control PARAMS((char *)); +static void hc_erasedups PARAMS((char *)); +static void really_add_history PARAMS((char *)); static struct ignorevar histignore = { @@ -83,8 +88,8 @@ static struct ignorevar histignore = /* 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' */ +int remember_on_history = 0; +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 @@ -99,6 +104,8 @@ int history_lines_in_file; /* Non-zero means do no history expansion on this line, regardless of what history_expansion says. */ int history_expansion_inhibited; +/* If non-zero, double quotes can quote the history expansion character. */ +int double_quotes_inhibit_history_expansion = 0; #endif /* With the old default, every line was saved in the history individually. @@ -138,6 +145,11 @@ int command_oriented_history = 1; the history-manipluating builtins can see it. */ int current_command_first_line_saved = 0; +/* Set to the number of the most recent line of a possibly-multi-line command + that contains a shell comment. Used by bash_add_history() to determine + whether to add a newline or a semicolon. */ +int current_command_line_comment = 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; @@ -180,22 +192,20 @@ int hist_verify; /* 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 (BANG_HISTORY) +static int bash_history_inhibit_expansion PARAMS((char *, int)); +#endif #if defined (READLINE) -static void re_edit __P((char *)); +static void re_edit PARAMS((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 *)); +static int history_expansion_p PARAMS((char *)); +static int shell_comment PARAMS((char *)); +static int should_expand PARAMS((char *)); +static HIST_ENTRY *last_history_entry PARAMS((void)); +static char *expand_histignore_pattern PARAMS((char *)); +static int history_should_ignore PARAMS((char *)); +#if defined (BANG_HISTORY) /* Is the history expansion starting at string[i] one that should not be expanded? */ static int @@ -203,6 +213,12 @@ bash_history_inhibit_expansion (string, i) char *string; int i; { + int t, si; + char hx[2]; + + hx[0] = history_expansion_char; + hx[1] = '\0'; + /* 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)) @@ -212,21 +228,51 @@ bash_history_inhibit_expansion (string, i) else if (i > 1 && string[i - 1] == '{' && string[i - 2] == '$' && member ('}', string + i + 1)) return (1); + /* The shell uses $! as a defined parameter expansion. */ + else if (i > 1 && string[i - 1] == '$' && string[i] == '!') + return (1); #if defined (EXTENDED_GLOB) else if (extended_glob && i > 1 && string[i+1] == '(' && member (')', string + i + 2)) return (1); #endif + + si = 0; + /* If we're supposed to be in single-quoted string, skip over the + single-quoted part and then look at what's left. */ + if (history_quoting_state == '\'') + { + si = skip_to_delim (string, 0, "'", SD_NOJMP|SD_HISTEXP); + if (string[si] == 0 || si >= i) + return (1); + si++; + } + + /* Make sure the history expansion should not be skipped by quoting or + command/process substitution. */ + if ((t = skip_to_histexp (string, si, hx, SD_NOJMP|SD_HISTEXP)) > 0) + { + /* Skip instances of history expansion appearing on the line before + this one. */ + while (t < i) + { + t = skip_to_histexp (string, t+1, hx, SD_NOJMP|SD_HISTEXP); + if (t <= 0) + return 0; + } + return (t > i); + } else return (0); } +#endif 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) + history_inhibit_expansion_function = bash_history_inhibit_expansion; sv_histchars ("histchars"); #endif } @@ -236,11 +282,11 @@ 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_expansion = (interact == 0) ? histexp_flag : HISTEXPAND_DEFAULT; + history_expansion_inhibited = (interact == 0) ? 1 - histexp_flag : 0; /* changed in bash_history_enable() */ history_inhibit_expansion_function = bash_history_inhibit_expansion; +#endif + remember_on_history = enable_history_list; } void @@ -255,11 +301,11 @@ bash_history_disable () void bash_history_enable () { - remember_on_history = 1; + remember_on_history = enable_history_list = 1; #if defined (BANG_HISTORY) history_expansion_inhibited = 0; -#endif history_inhibit_expansion_function = bash_history_inhibit_expansion; +#endif sv_history_control ("HISTCONTROL"); sv_histignore ("HISTIGNORE"); } @@ -274,7 +320,7 @@ load_history () 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"); + set_if_not ("HISTSIZE", HISTSIZE_DEFAULT); sv_histsize ("HISTSIZE"); set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE")); @@ -286,8 +332,13 @@ load_history () if (hf && *hf && file_exists (hf)) { read_history (hf); + /* We have read all of the lines from the history file, even if we + read more lines than $HISTSIZE. Remember the total number of lines + we read so we don't count the last N lines as new over and over + again. */ + history_lines_in_file = history_lines_read_from_file; using_history (); - history_lines_in_file = where_history (); + /* history_lines_in_file = where_history () + history_base - 1; */ } } @@ -296,6 +347,7 @@ bash_clear_history () { clear_history (); history_lines_this_session = 0; + /* XXX - reset history_lines_read_from_file? */ } /* Delete and free the history list entry at offset I. */ @@ -307,8 +359,27 @@ bash_delete_histent (i) discard = remove_history (i); if (discard) - free_history_entry (discard); - history_lines_this_session--; + { + free_history_entry (discard); + history_lines_this_session--; + } + return discard != 0; +} + +int +bash_delete_history_range (first, last) + int first, last; +{ + register int i; + HIST_ENTRY **discard_list; + + discard_list = remove_history_range (first, last); + if (discard_list == 0) + return 0; + for (i = 0; discard_list[i]; i++) + free_history_entry (discard_list[i]); + free (discard_list); + history_lines_this_session -= i; return 1; } @@ -347,6 +418,7 @@ void save_history () { char *hf; + int r; hf = get_string_value ("HISTFILE"); if (hf && *hf && file_exists (hf)) @@ -355,10 +427,10 @@ save_history () the history file. */ using_history (); - if (history_lines_this_session < where_history () || force_append_history) - append_history (history_lines_this_session, hf); + if (history_lines_this_session <= where_history () || force_append_history) + r = append_history (history_lines_this_session, hf); else - write_history (hf); + r = write_history (hf); sv_histsize ("HISTFILESIZE"); } } @@ -368,11 +440,11 @@ int maybe_append_history (filename) char *filename; { - int fd, result; + int fd, result, histlen; struct stat buf; result = EXECUTION_SUCCESS; - if (history_lines_this_session && (history_lines_this_session < where_history ())) + if (history_lines_this_session > 0) { /* If the filename was supplied, then create it if necessary. */ if (stat (filename, &buf) == -1 && errno == ENOENT) @@ -385,10 +457,19 @@ maybe_append_history (filename) } close (fd); } + /* cap the number of lines we write at the length of the history list */ + histlen = where_history (); + if (histlen > 0 && history_lines_this_session > histlen) + history_lines_this_session = histlen; /* reset below anyway */ result = append_history (history_lines_this_session, filename); + /* Pretend we already read these lines from the file because we just + added them */ history_lines_in_file += history_lines_this_session; history_lines_this_session = 0; } + else + history_lines_this_session = 0; /* reset if > where_history() */ + return (result); } @@ -401,7 +482,7 @@ maybe_save_shell_history () char *hf; result = 0; - if (history_lines_this_session) + if (history_lines_this_session > 0) { hf = get_string_value ("HISTFILE"); @@ -428,7 +509,8 @@ maybe_save_shell_history () else { result = write_history (hf); - history_lines_in_file = history_lines_this_session; + history_lines_in_file = history_lines_written_to_file; + /* history_lines_in_file = where_history () + history_base - 1; */ } history_lines_this_session = 0; @@ -486,7 +568,18 @@ pre_process_line (line, print_changes, addit) add that line to the history if ADDIT is non-zero. */ if (!history_expansion_inhibited && history_expansion && history_expansion_p (line)) { + int old_len; + + /* If we are expanding the second or later line of a multi-line + command, decrease history_length so references to history expansions + in these lines refer to the previous history entry and not the + current command. */ + old_len = history_length; + if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1) + history_length--; expanded = history_expand (line, &history_value); + if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1) + history_length = old_len; if (expanded) { @@ -527,6 +620,7 @@ pre_process_line (line, print_changes, addit) if (hist_verify && expanded == 1) { re_edit (history_value); + free (history_value); return ((char *)NULL); } # endif @@ -552,16 +646,26 @@ pre_process_line (line, print_changes, addit) } /* Return 1 if the first non-whitespace character in LINE is a `#', indicating - * that the line is a shell comment. */ + that the line is a shell comment. Return 2 if there is a comment after the + first non-whitespace character. Return 0 if the line does not contain a + comment. */ static int shell_comment (line) char *line; { char *p; + int n; + if (dstack.delimiter_depth != 0 || (parser_state & PST_HEREDOC)) + return 0; + if (line == 0) + return 0; for (p = line; p && *p && whitespace (*p); p++) ; - return (p && *p == '#'); + if (p && *p == '#') + return 1; + n = skip_to_delim (line, p - line, "#", SD_NOJMP|SD_GLOB|SD_EXTGLOB|SD_COMPLETE); + return (line[n] == '#') ? 2 : 0; } #ifdef INCLUDE_UNUSED @@ -629,7 +733,9 @@ hc_erasedups (line) if (STREQ (temp->line, line)) { r = where_history (); - remove_history (r); + temp = remove_history (r); + if (temp) + free_history_entry (temp); } } using_history (); @@ -644,13 +750,19 @@ hc_erasedups (line) 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. */ + newlines, so it's OK to save comment lines. If we're collecting the body + of a here-document, we should act as if literal_history is enabled, because + we want to save the entire contents of the here-document as it was + entered. We also make sure to save multiple-line quoted strings or other + constructs. */ void maybe_add_history (line) char *line; { + int is_comment; + hist_last_line_added = 0; + is_comment = shell_comment (line); /* Don't use the value of history_control to affect the second and subsequent lines of a multi-line command (old code did @@ -658,13 +770,15 @@ maybe_add_history (line) if (current_command_line_count > 1) { if (current_command_first_line_saved && - (literal_history || dstack.delimiter_depth != 0 || shell_comment (line) == 0)) + ((parser_state & PST_HEREDOC) || literal_history || dstack.delimiter_depth != 0 || is_comment != 1)) bash_add_history (line); + current_command_line_comment = is_comment ? current_command_line_count : -2; 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_line_comment = is_comment ? current_command_line_count : -2; current_command_first_line_saved = check_add_history (line, 0); } @@ -696,21 +810,55 @@ check_add_history (line, force) } #if defined (SYSLOG_HISTORY) -#define SYSLOG_MAXLEN 600 +#define SYSLOG_MAXMSG 1024 +#define SYSLOG_MAXLEN SYSLOG_MAXMSG +#define SYSLOG_MAXHDR 256 + +#ifndef OPENLOG_OPTS +#define OPENLOG_OPTS 0 +#endif + +#if defined (SYSLOG_SHOPT) +int syslog_history = SYSLOG_SHOPT; +#else +int syslog_history = 1; +#endif void bash_syslog_history (line) const char *line; { - char trunc[SYSLOG_MAXLEN]; + char trunc[SYSLOG_MAXLEN], *msg; + char loghdr[SYSLOG_MAXHDR]; + char seqbuf[32], *seqnum; + int hdrlen, msglen, seqlen, chunks, i; + static int first = 1; + + if (first) + { + openlog (shell_name, OPENLOG_OPTS, SYSLOG_FACILITY); + first = 0; + } - if (strlen(line) < SYSLOG_MAXLEN) - syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY: PID=%d UID=%d %s", getpid(), current_user.uid, line); + hdrlen = snprintf (loghdr, sizeof(loghdr), "HISTORY: PID=%d UID=%d", getpid(), current_user.uid); + msglen = strlen (line); + + if ((msglen + hdrlen + 1) < SYSLOG_MAXLEN) + syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "%s %s", loghdr, 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); + chunks = ((msglen + hdrlen) / SYSLOG_MAXLEN) + 1; + for (msg = line, i = 0; i < chunks; i++) + { + seqnum = inttostr (i + 1, seqbuf, sizeof (seqbuf)); + seqlen = STRLEN (seqnum); + + /* 7 == "(seq=) " */ + strncpy (trunc, msg, SYSLOG_MAXLEN - hdrlen - seqlen - 7 - 1); + trunc[SYSLOG_MAXLEN - 1] = '\0'; + syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "%s (seq=%s) %s", loghdr, seqnum, trunc); + msg += SYSLOG_MAXLEN - hdrlen - seqlen - 8; + } } } #endif @@ -724,18 +872,40 @@ void bash_add_history (line) char *line; { - int add_it, offset, curlen; + int add_it, offset, curlen, is_comment; 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 (); + is_comment = shell_comment (line); + + /* The second and subsequent lines of a here document have the trailing + newline preserved. We don't want to add extra newlines here, but we + do want to add one after the first line (which is the command that + contains the here-doc specifier). parse.y:history_delimiting_chars() + does the right thing to take care of this for us. We don't want to + add extra newlines if the user chooses to enable literal_history, + so we have to duplicate some of what that function does here. */ + /* If we're in a here document and past the first line, + (current_command_line_count > 2) + don't add a newline here. This will also take care of the literal_history + case if the other conditions are met. */ + if ((parser_state & PST_HEREDOC) && here_doc_first_line == 0 && line[strlen (line) - 1] == '\n') + chars_to_add = ""; + else if (current_command_line_count == current_command_line_comment+1) + chars_to_add = "\n"; + else if (literal_history) + chars_to_add = "\n"; + else + chars_to_add = history_delimiting_chars (line); using_history (); current = previous_history (); + current_command_line_comment = is_comment ? current_command_line_count : -2; + if (current) { /* If the previous line ended with an escaped newline (escaped @@ -751,6 +921,13 @@ bash_add_history (line) chars_to_add = ""; } + /* If we're not in some kind of quoted construct, the current history + entry ends with a newline, and we're going to add a semicolon, + don't. In some cases, it results in a syntax error (e.g., before + a close brace), and it should not be needed. */ + if (dstack.delimiter_depth == 0 && current->line[curlen - 1] == '\n' && *chars_to_add == ';') + chars_to_add++; + new_line = (char *)xmalloc (1 + curlen + strlen (line) @@ -767,11 +944,15 @@ bash_add_history (line) } } + if (add_it && history_is_stifled() && history_length == 0 && history_length == history_max_entries) + add_it = 0; + if (add_it) really_add_history (line); #if defined (SYSLOG_HISTORY) - bash_syslog_history (line); + if (syslog_history) + bash_syslog_history (line); #endif using_history (); @@ -791,7 +972,7 @@ int history_number () { using_history (); - return (remember_on_history ? history_base + where_history () : 1); + return ((remember_on_history || enable_history_list) ? history_base + where_history () : 1); } static int diff --git a/bashhist.h b/bashhist.h index c44e7c6..615f5d2 100644 --- a/bashhist.h +++ b/bashhist.h @@ -1,6 +1,6 @@ /* bashhist.h -- interface to the bash history functions in bashhist.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,6 +30,15 @@ #define HC_IGNBOTH (HC_IGNSPACE|HC_IGNDUPS) +#if defined (STRICT_POSIX) +# undef HISTEXPAND_DEFAULT +# define HISTEXPAND_DEFAULT 0 +#else +# if !defined (HISTEXPAND_DEFAULT) +# define HISTEXPAND_DEFAULT 1 +# endif /* !HISTEXPAND_DEFAULT */ +#endif + extern int remember_on_history; extern int enable_history_list; /* value for `set -o history' */ extern int literal_history; /* controlled by `shopt lithist' */ @@ -40,32 +49,41 @@ extern int history_expansion; extern int history_control; extern int command_oriented_history; extern int current_command_first_line_saved; +extern int current_command_first_line_comment; extern int hist_last_line_added; extern int hist_last_line_pushed; +extern int dont_save_function_defs; + +# if defined (READLINE) +extern int hist_verify; +# endif + # if defined (BANG_HISTORY) extern int history_expansion_inhibited; +extern int double_quotes_inhibit_history_expansion; # 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)); +extern void bash_initialize_history PARAMS((void)); +extern void bash_history_reinit PARAMS((int)); +extern void bash_history_disable PARAMS((void)); +extern void bash_history_enable PARAMS((void)); +extern void bash_clear_history PARAMS((void)); +extern int bash_delete_histent PARAMS((int)); +extern int bash_delete_history_range PARAMS((int, int)); +extern int bash_delete_last_history PARAMS((void)); +extern void load_history PARAMS((void)); +extern void save_history PARAMS((void)); +extern int maybe_append_history PARAMS((char *)); +extern int maybe_save_shell_history PARAMS((void)); +extern char *pre_process_line PARAMS((char *, int, int)); +extern void maybe_add_history PARAMS((char *)); +extern void bash_add_history PARAMS((char *)); +extern int check_add_history PARAMS((char *, int)); +extern int history_number PARAMS((void)); + +extern void setup_history_ignore PARAMS((char *)); + +extern char *last_history_line PARAMS((void)); #endif /* _BASHHIST_H_ */ diff --git a/bashintl.h b/bashintl.h index 7e6b83f..dd32683 100644 --- a/bashintl.h +++ b/bashintl.h @@ -47,4 +47,8 @@ # define setlocale(cat, loc) #endif +#if !defined (HAVE_LOCALE_H) || !defined (HAVE_LOCALECONV) +# define locale_decpoint() '.' +#endif + #endif /* !_BASHINTL_H_ */ diff --git a/bashjmp.h b/bashjmp.h index c26053d..1a4721b 100644 --- a/bashjmp.h +++ b/bashjmp.h @@ -1,6 +1,6 @@ /* bashjmp.h -- wrapper for setjmp.h with necessary bash definitions. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,8 +26,11 @@ extern procenv_t top_level; extern procenv_t subshell_top_level; extern procenv_t return_catch; /* used by `return' builtin */ +extern procenv_t wait_intr_buf; -#define SHFUNC_RETURN() longjmp (return_catch, 1) +extern int no_longjmp_on_fatal_error; + +#define SHFUNC_RETURN() sh_longjmp (return_catch, 1) #define COPY_PROCENV(old, save) \ xbcopy ((char *)old, (char *)save, sizeof (procenv_t)); @@ -39,5 +42,6 @@ extern procenv_t return_catch; /* used by `return' builtin */ #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 */ +#define EXITBLTIN 6 /* Exit due to the exit builtin. */ #endif /* _BASHJMP_H_ */ diff --git a/bashline.c b/bashline.c index e8f4240..febdbf4 100644 --- a/bashline.c +++ b/bashline.c @@ -1,6 +1,6 @@ /* bashline.c -- Bash's interface to the readline library. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -37,6 +37,8 @@ # include #endif +#include + #include #include "chartypes.h" #include "bashansi.h" @@ -44,6 +46,7 @@ #include "shell.h" #include "input.h" +#include "parser.h" #include "builtins.h" #include "bashhist.h" #include "bashline.h" @@ -51,12 +54,21 @@ #include "findcmd.h" #include "pathexp.h" #include "shmbutil.h" +#include "trap.h" +#include "flags.h" +#include "timer.h" + +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif #include "builtins/common.h" +#include "builtins/builtext.h" /* for read_builtin */ #include #include #include +#include #include @@ -76,111 +88,149 @@ # define VI_EDITING_MODE 0 #endif +/* Copied from rldefs.h, since that's not a public readline header file. */ +#ifndef FUNCTION_TO_KEYMAP + +#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 + +#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)); +extern int bash_brace_completion PARAMS((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))); +#ifdef _MINIX +extern int tputs PARAMS((const char *string, int nlines, void (*outx)(int))); +#else +extern int tputs PARAMS((const char *string, int nlines, int (*outx)(int))); +#endif /* 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 shell_expand_line PARAMS((int, int)); +static int display_shell_version PARAMS((int, int)); -static int bash_ignore_filenames __P((char **)); -static int bash_ignore_everything __P((char **)); +static int bash_ignore_filenames PARAMS((char **)); +static int bash_ignore_everything PARAMS((char **)); +static int bash_progcomp_ignore_filenames PARAMS((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)); +static char *history_expand_line_internal PARAMS((char *)); +static int history_expand_line PARAMS((int, int)); +static int tcsh_magic_space PARAMS((int, int)); #endif /* BANG_HISTORY */ #ifdef ALIAS -static int alias_expand_line __P((int, int)); +static int alias_expand_line PARAMS((int, int)); #endif #if defined (BANG_HISTORY) && defined (ALIAS) -static int history_and_alias_expand_line __P((int, int)); +static int history_and_alias_expand_line PARAMS((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)); +static int bash_forward_shellword PARAMS((int, int)); +static int bash_backward_shellword PARAMS((int, int)); +static int bash_kill_shellword PARAMS((int, int)); +static int bash_backward_kill_shellword PARAMS((int, int)); +static int bash_transpose_shellwords PARAMS((int, int)); + +static int bash_spell_correct_shellword PARAMS((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)); +static char *restore_tilde PARAMS((char *, char *)); +static char *maybe_restore_tilde PARAMS((char *, char *)); + +static char *bash_filename_rewrite_hook PARAMS((char *, int)); + +static void bash_directory_expansion PARAMS((char **)); +static int bash_filename_stat_hook PARAMS((char **)); +static int bash_command_name_stat_hook PARAMS((char **)); +static int bash_directory_completion_hook PARAMS((char **)); +static int filename_completion_ignore PARAMS((char **)); +static int bash_push_line PARAMS((void)); + +static int executable_completion PARAMS((const char *, int)); + +static rl_icppfunc_t *save_directory_hook PARAMS((void)); +static void restore_directory_hook PARAMS((rl_icppfunc_t)); + +static int directory_exists PARAMS((const char *, int)); + +static void cleanup_expansion_error PARAMS((void)); +static void maybe_make_readline_line PARAMS((char *)); +static void set_up_new_line PARAMS((char *)); + +static int check_redir PARAMS((int)); +static char **attempt_shell_completion PARAMS((const char *, int, int)); +static char *variable_completion_function PARAMS((const char *, int)); +static char *hostname_completion_function PARAMS((const char *, int)); +static char *command_subst_completion_function PARAMS((const char *, int)); + +static void build_history_completion_array PARAMS((void)); +static char *history_completion_generator PARAMS((const char *, int)); +static int dynamic_complete_history PARAMS((int, int)); +static int bash_dabbrev_expand PARAMS((int, int)); + +static void initialize_hostname_list PARAMS((void)); +static void add_host_name PARAMS((char *)); +static void snarf_hosts_from_file PARAMS((char *)); +static char **hostnames_matching PARAMS((char *)); + +static void _ignore_completion_names PARAMS((char **, sh_ignore_func_t *)); +static int name_is_acceptable PARAMS((const char *)); +static int test_for_directory PARAMS((const char *)); +static int test_for_canon_directory PARAMS((const char *)); +static int return_zero PARAMS((const char *)); + +static char *bash_dequote_filename PARAMS((char *, int)); +static char *quote_word_break_chars PARAMS((char *)); +static int bash_check_expchar PARAMS((char *, int, int *, int *)); +static void set_filename_quote_chars PARAMS((int, int, int)); +static void set_filename_bstab PARAMS((const char *)); +static char *bash_quote_filename PARAMS((char *, int, char *)); + +#ifdef _MINIX +static void putx PARAMS((int)); +#else +static int putx PARAMS((int)); +#endif +static int readline_get_char_offset PARAMS((int)); +static void readline_set_char_offset PARAMS((int, int *)); + +static Keymap get_cmd_xmap_from_edit_mode PARAMS((void)); +static Keymap get_cmd_xmap_from_keymap PARAMS((Keymap)); + +static void init_unix_command_map PARAMS((void)); +static int isolate_sequence PARAMS((char *, int, int, int *)); + +static int set_saved_history PARAMS((void)); #if defined (ALIAS) -static int posix_edit_macros __P((int, int)); +static int posix_edit_macros PARAMS((int, int)); #endif +static int bash_event_hook PARAMS((void)); + #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 int find_cmd_start PARAMS((int)); +static int find_cmd_end PARAMS((int)); +static char *find_cmd_name PARAMS((int, int *, int *)); +static char *prog_complete_return PARAMS((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 int no_symbolic_links; extern STRING_INT_ALIST word_token_alist[]; -extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin; +extern sh_timer *read_timeout; /* SPECIFIC_COMPLETION_FUNCTIONS specifies that we have individual completion functions which indicate what type of completion should be @@ -189,41 +239,42 @@ extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin; #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)); +static int bash_specific_completion PARAMS((int, rl_compentry_func_t *)); + +static int bash_complete_filename_internal PARAMS((int)); +static int bash_complete_username_internal PARAMS((int)); +static int bash_complete_hostname_internal PARAMS((int)); +static int bash_complete_variable_internal PARAMS((int)); +static int bash_complete_command_internal PARAMS((int)); + +static int bash_complete_filename PARAMS((int, int)); +static int bash_possible_filename_completions PARAMS((int, int)); +static int bash_complete_username PARAMS((int, int)); +static int bash_possible_username_completions PARAMS((int, int)); +static int bash_complete_hostname PARAMS((int, int)); +static int bash_possible_hostname_completions PARAMS((int, int)); +static int bash_complete_variable PARAMS((int, int)); +static int bash_possible_variable_completions PARAMS((int, int)); +static int bash_complete_command PARAMS((int, int)); +static int bash_possible_command_completions PARAMS((int, int)); + +static int completion_glob_pattern PARAMS((char *)); +static char *glob_complete_word PARAMS((const char *, int)); +static int bash_glob_completion_internal PARAMS((int)); +static int bash_glob_complete_word PARAMS((int, int)); +static int bash_glob_expand_word PARAMS((int, int)); +static int bash_glob_list_expansions PARAMS((int, int)); #endif /* SPECIFIC_COMPLETION_FUNCTIONS */ -static int edit_and_execute_command __P((int, int, int, char *)); +static int edit_and_execute_command PARAMS((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)); +static int vi_edit_and_execute_command PARAMS((int, int)); +static int bash_vi_complete PARAMS((int, int)); #endif -static int emacs_edit_and_execute_command __P((int, int)); +static int emacs_edit_and_execute_command PARAMS((int, int)); -/* Non-zero once initalize_readline () has been called. */ +/* Non-zero once initialize_readline () has been called. */ int bash_readline_initialized = 0; /* If non-zero, we do hostname completion, breaking words at `@' and @@ -242,10 +293,30 @@ int force_fignore = 1; /* Perform spelling correction on directory names during word completion */ int dircomplete_spelling = 0; +/* Expand directory names during word/filename completion. */ +#if DIRCOMPLETE_EXPAND_DEFAULT +int dircomplete_expand = 1; +int dircomplete_expand_relpath = 1; +#else +int dircomplete_expand = 0; +int dircomplete_expand_relpath = 0; +#endif + +/* When non-zero, perform `normal' shell quoting on completed filenames + even when the completed name contains a directory name with a shell + variable reference, so dollar signs in a filename get quoted appropriately. + Set to zero to remove dollar sign (and braces or parens as needed) from + the set of characters that will be quoted. */ +int complete_fullquote = 1; + static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:"; static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:"; /* )) */ +static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/ +static char *custom_filename_quote_characters = 0; +static char filename_bstab[256]; + static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL; static int dot_in_path = 0; @@ -266,16 +337,29 @@ static int completion_quoting_style = COMPLETE_BSQUOTE; /* Flag values for the final argument to bash_default_completion */ #define DEFCOMP_CMDPOS 1 +static rl_command_func_t *vi_tab_binding = rl_complete; + /* 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; { + static char kseq[2] = { CTRL ('I'), 0 }; /* TAB */ + 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); + if (on_or_off) + { + vi_tab_binding = rl_function_of_keyseq (kseq, vi_insertion_keymap, (int *)NULL); + rl_bind_key_in_map (CTRL ('I'), rl_insert, vi_insertion_keymap); + } + else + { + if (rl_function_of_keyseq (kseq, vi_insertion_keymap, (int *)NULL) == rl_insert) + rl_bind_key_in_map (CTRL ('I'), vi_tab_binding, vi_insertion_keymap); + } #endif } @@ -292,7 +376,8 @@ enable_hostname_completion (on_or_off) int on_or_off; { int old_value; - char *at, *nv, *nval; + char *nv, *nval; + const char *at; old_value = perform_hostname_completion; @@ -352,7 +437,7 @@ enable_hostname_completion (on_or_off) strcpy (nval + 1, rl_completer_word_break_characters); } - free (rl_completer_word_break_characters); + free ((void *)rl_completer_word_break_characters); rl_completer_word_break_characters = nval; } @@ -388,6 +473,10 @@ initialize_readline () 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); + rl_add_defun ("shell-transpose-words", bash_transpose_shellwords, -1); + + rl_add_defun ("spell-correct-word", bash_spell_correct_shellword, -1); + rl_bind_key_if_unbound_in_map ('s', bash_spell_correct_shellword, emacs_ctlx_keymap); #ifdef ALIAS rl_add_defun ("alias-expand-line", alias_expand_line, -1); @@ -399,9 +488,11 @@ initialize_readline () /* 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 (VI_MODE) + rl_add_defun ("vi-edit-and-execute-command", vi_edit_and_execute_command, -1); +#endif #if defined (BRACE_COMPLETION) rl_add_defun ("complete-into-braces", bash_brace_completion, -1); @@ -437,7 +528,6 @@ initialize_readline () 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]", @@ -453,7 +543,10 @@ initialize_readline () 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); + kseq[0] = CTRL('E'); + func = rl_function_of_keyseq (kseq, vi_movement_keymap, (int *)NULL); + if (func == rl_emacs_editing_mode) + rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap); #endif #if defined (BRACE_COMPLETION) @@ -500,10 +593,12 @@ initialize_readline () /* 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; + set_directory_hook (); rl_filename_rewrite_hook = bash_filename_rewrite_hook; + rl_filename_stat_hook = bash_filename_stat_hook; + /* Tell the filename completer we want a chance to ignore some names. */ rl_ignore_some_completions_function = filename_completion_ignore; @@ -528,15 +623,20 @@ initialize_readline () 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_quote_characters = default_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + rl_filename_quoting_function = bash_quote_filename; rl_filename_dequoting_function = bash_dequote_filename; rl_char_is_quoted_p = char_is_quoted; + /* Add some default bindings for the "shellwords" functions, roughly + parallelling the default word bindings in emacs mode. */ + rl_bind_key_if_unbound_in_map (CTRL('B'), bash_backward_shellword, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map (CTRL('D'), bash_kill_shellword, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map (CTRL('F'), bash_forward_shellword, emacs_meta_keymap); + rl_bind_key_if_unbound_in_map (CTRL('T'), bash_transpose_shellwords, emacs_meta_keymap); + #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() @@ -555,6 +655,18 @@ bashline_reinitialize () bash_readline_initialized = 0; } +void +bashline_set_event_hook () +{ + rl_signal_event_hook = bash_event_hook; +} + +void +bashline_reset_event_hook () +{ + rl_signal_event_hook = 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 @@ -566,8 +678,18 @@ 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; + + complete_fullquote = 1; + rl_filename_quote_characters = default_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + + set_directory_hook (); + rl_filename_stat_hook = bash_filename_stat_hook; + + bashline_reset_event_hook (); + + rl_sort_completion_matches = 1; } /* Contains the line to push into readline. */ @@ -762,7 +884,7 @@ clear_hostname_list () } /* Return a NULL terminated list of hostnames which begin with TEXT. - Initialize the hostname list the first time if neccessary. + Initialize the hostname list the first time if necessary. The array is malloc ()'ed, but not the individual strings. */ static char ** hostnames_matching (text) @@ -810,44 +932,6 @@ hostnames_matching (text) 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. */ @@ -862,10 +946,11 @@ edit_and_execute_command (count, c, editing_mode, edit_command) char *edit_command; { char *command, *metaval; - int r, cclc, rrs, metaflag; + int r, rrs, metaflag; + sh_parser_state_t ps; rrs = rl_readline_state; - cclc = current_command_line_count; + saved_command_line_count = current_command_line_count; /* Accept the current line. */ rl_newline (1, c); @@ -881,8 +966,12 @@ edit_and_execute_command (count, c, editing_mode, edit_command) 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'). */ + /* This breaks down when using command-oriented history and are not + finished with the command, so we should not ignore the last command */ using_history (); + current_command_line_count++; /* for rl_newline above */ bash_add_history (rl_line_buffer); + current_command_line_count = 0; /* for dummy history entry */ bash_add_history (""); history_lines_this_session++; using_history (); @@ -892,16 +981,21 @@ edit_and_execute_command (count, c, editing_mode, 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) (); + rl_clear_signals (); + save_parser_state (&ps); r = parse_and_execute (command, (editing_mode == VI_EDITING_MODE) ? "v" : "C-xC-e", SEVAL_NOHIST); + restore_parser_state (&ps); + + /* if some kind of reset_parser was called, undo it. */ + reset_readahead_token (); + if (rl_prep_term_function) (*rl_prep_term_function) (metaflag); + rl_set_signals (); - current_command_line_count = cclc; + current_command_line_count = saved_command_line_count; /* 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 @@ -911,6 +1005,11 @@ edit_and_execute_command (count, c, editing_mode, edit_command) rl_done = 0; rl_readline_state = rrs; +#if defined (VI_MODE) + if (editing_mode == VI_EDITING_MODE) + rl_vi_insertion_mode (1, c); +#endif + rl_forced_update_display (); return r; @@ -944,6 +1043,8 @@ posix_edit_macros (count, key) char alias_name[3], *alias_value, *macro; c = rl_read_key (); + if (c <= 0) + return 0; alias_name[0] = '_'; alias_name[1] = c; alias_name[2] = '\0'; @@ -968,7 +1069,7 @@ bash_forward_shellword (count, key) int count, key; { size_t slen; - int sindex, c, p; + int c, p; DECLARE_MBSTATE; if (count < 0) @@ -990,6 +1091,20 @@ bash_forward_shellword (count, key) return 0; } + /* Are we in a quoted string? If we are, move to the end of the quoted + string and continue the outer loop. We only want quoted strings, not + backslash-escaped characters, but char_is_quoted doesn't + differentiate. */ + if (char_is_quoted (rl_line_buffer, p) && p > 0 && rl_line_buffer[p-1] != '\\') + { + do + ADVANCE_CHAR (rl_line_buffer, slen, p); + while (p < rl_end && char_is_quoted (rl_line_buffer, p)); + count--; + continue; + } + + /* Rest of code assumes we are not in a quoted string. */ /* Move forward until we hit a non-metacharacter. */ while (p < rl_end && (c = rl_line_buffer[p]) && WORDDELIM (c)) { @@ -1063,15 +1178,15 @@ bash_backward_shellword (count, key) int count, key; { size_t slen; - int sindex, c, p; + int c, p, prev_p; DECLARE_MBSTATE; - + if (count < 0) return (bash_forward_shellword (-count, key)); p = rl_point; slen = rl_end; - + while (count) { if (p == 0) @@ -1080,13 +1195,16 @@ bash_backward_shellword (count, key) return 0; } - /* Move backward until we hit a non-metacharacter. */ + /* Move backward until we hit a non-metacharacter. We want to deal + with the characters before point, so we move off a word if we're + at its first character. */ + BACKUP_CHAR (rl_line_buffer, slen, p); 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 (WORDDELIM (c) == 0 || char_is_quoted (rl_line_buffer, p)) + break; + BACKUP_CHAR (rl_line_buffer, slen, p); } if (p == 0) @@ -1095,12 +1213,18 @@ bash_backward_shellword (count, key) return 0; } - /* Now move backward until we hit a metacharacter or BOL. */ + /* Now move backward until we hit a metacharacter or BOL. Leave point + at the start of the shellword or at BOL. */ + prev_p = p; while (p > 0) { c = rl_line_buffer[p]; if (WORDDELIM (c) && char_is_quoted (rl_line_buffer, p) == 0) - break; + { + p = prev_p; + break; + } + prev_p = p; BACKUP_CHAR (rl_line_buffer, slen, p); } @@ -1127,7 +1251,7 @@ bash_kill_shellword (count, key) rl_kill_text (p, rl_point); rl_point = p; - if (rl_editing_mode == 1) /* 1 == emacs_mode */ + if (rl_editing_mode == EMACS_EDITING_MODE) /* 1 == emacs_mode */ rl_mark = rl_point; return 0; @@ -1148,12 +1272,119 @@ bash_backward_kill_shellword (count, key) if (rl_point != p) rl_kill_text (p, rl_point); - if (rl_editing_mode == 1) /* 1 == emacs_mode */ + if (rl_editing_mode == EMACS_EDITING_MODE) /* 1 == emacs_mode */ rl_mark = rl_point; return 0; } +static int +bash_transpose_shellwords (count, key) + int count, key; +{ + char *word1, *word2; + int w1_beg, w1_end, w2_beg, w2_end; + int orig_point = rl_point; + + if (count == 0) + return 0; + + /* Find the two shell words. */ + bash_forward_shellword (count, key); + w2_end = rl_point; + bash_backward_shellword (1, key); + w2_beg = rl_point; + bash_backward_shellword (count, key); + w1_beg = rl_point; + bash_forward_shellword (1, key); + w1_end = rl_point; + + /* check 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 (); + xfree (word1); + xfree (word2); + + return 0; +} + +/* Directory name spelling correction on the current word (not shellword). + COUNT > 1 is not exactly correct yet. */ +static int +bash_spell_correct_shellword (count, key) + int count, key; +{ + int opoint, wbeg, wend; + char *text, *newdir; + + opoint = rl_point; + while (count) + { + bash_backward_shellword (1, key); + wbeg = rl_point; + bash_forward_shellword (1, key); + wend = rl_point; + + if (wbeg > wend) + break; + + text = rl_copy_text (wbeg, wend); + + newdir = dirspell (text); + if (newdir) + { + rl_begin_undo_group (); + rl_delete_text (wbeg, wend); + rl_point = wbeg; + if (*newdir) + rl_insert_text (newdir); + rl_mark = wbeg; + rl_end_undo_group (); + } + + free (text); + free (newdir); + + if (rl_point >= rl_end) + break; + + count--; + + if (count) + bash_forward_shellword (1, key); /* XXX */ + } + + return 0; +} /* **************************************************************** */ /* */ @@ -1163,7 +1394,11 @@ bash_backward_kill_shellword (count, key) #define COMMAND_SEPARATORS ";|&{(`" /* )} */ +#define COMMAND_SEPARATORS_PLUS_WS ";|&{(` \t" +/* )} */ +/* check for redirections and other character combinations that are not + command separators */ static int check_redir (ti) int ti; @@ -1173,13 +1408,24 @@ check_redir (ti) /* 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]; + prev_char = (ti > 0) ? rl_line_buffer[ti - 1] : 0; 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))) + else if (this_char == '{' && prev_char == '$') /*}*/ + return (1); +#if 0 /* Not yet */ + else if (this_char == '(' && prev_char == '$') /*)*/ + return (1); + else if (this_char == '(' && prev_char == '<') /*)*/ + return (1); +#if defined (EXTENDED_GLOB) + else if (extended_glob && this_char == '(' && prev_char == '!') /*)*/ + return (1); +#endif +#endif + else if (char_is_quoted (rl_line_buffer, ti)) return (1); return (0); } @@ -1194,13 +1440,49 @@ static int find_cmd_start (start) int start; { - register int s, os; + register int s, os, ns; os = 0; + /* Flags == SD_NOJMP only because we want to skip over command substitutions + in assignment statements. Have to test whether this affects `standalone' + command substitutions as individual words. */ if (!in_vyatta_restricted_mode(OUTPUT)) { - while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP|SD_NOSKIPCMD)) <= start) && - rl_line_buffer[s]) - os = s+1; + while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE/*|SD_NOSKIPCMD*/)) <= start) && + rl_line_buffer[s]) + { + /* Handle >| token crudely; treat as > not | */ + if (s > 0 && rl_line_buffer[s] == '|' && rl_line_buffer[s-1] == '>') + { + ns = skip_to_delim (rl_line_buffer, s+1, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE/*|SD_NOSKIPCMD*/); + if (ns > start || rl_line_buffer[ns] == 0) + return os; + os = ns+1; + continue; + } + /* The only reserved word in COMMAND_SEPARATORS is `{', so handle that + specially, making sure it's in a spot acceptable for reserved words */ + if (s >= os && rl_line_buffer[s] == '{') + { + int pc, nc; /* index of previous non-whitespace, next char */ + for (pc = (s > os) ? s - 1 : os; pc > os && whitespace(rl_line_buffer[pc]); pc--) + ; + nc = rl_line_buffer[s+1]; + /* must be preceded by a command separator or be the first non- + whitespace character since the last command separator, and + followed by a shell break character (not another `{') to be a reserved word. */ + if ((pc > os && (rl_line_buffer[s-1] == '{' || strchr (COMMAND_SEPARATORS, rl_line_buffer[pc]) == 0)) || + (shellbreak(nc) == 0)) /* }} */ + { + /* Not a reserved word, look for another delim */ + ns = skip_to_delim (rl_line_buffer, s+1, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE/*|SD_NOSKIPCMD*/); + if (ns > start || rl_line_buffer[ns] == 0) + return os; + os = ns+1; + continue; + } + } + os = s+1; + } } return os; } @@ -1212,7 +1494,7 @@ find_cmd_end (end) register int e; if (!in_vyatta_restricted_mode(OUTPUT)) { - e = skip_to_delim (rl_line_buffer, end, COMMAND_SEPARATORS, SD_NOJMP); + e = skip_to_delim (rl_line_buffer, end, COMMAND_SEPARATORS, SD_NOJMP|SD_COMPLETE); } else { e = strlen(rl_line_buffer); } @@ -1220,8 +1502,9 @@ find_cmd_end (end) } static char * -find_cmd_name (start) +find_cmd_name (start, sp, ep) int start; + int *sp, *ep; { char *name; register int s, e; @@ -1230,10 +1513,15 @@ find_cmd_name (start) ; /* skip until a shell break character */ - e = skip_to_delim (rl_line_buffer, s, "()<>;&| \t\n", SD_NOJMP); + e = skip_to_delim (rl_line_buffer, s, "()<>;&| \t\n", SD_NOJMP|SD_COMPLETE); name = substring (rl_line_buffer, s, e); + if (sp) + *sp = s; + if (ep) + *ep = e; + return (name); } @@ -1254,6 +1542,34 @@ prog_complete_return (text, matchnum) #endif /* PROGRAMMABLE_COMPLETION */ +/* Try and catch completion attempts that are syntax errors or otherwise + invalid. */ +static int +invalid_completion (text, ind) + const char *text; + int ind; +{ + int pind; + + /* If we don't catch these here, the next clause will */ + if (ind > 0 && rl_line_buffer[ind] == '(' && /*)*/ + member (rl_line_buffer[ind-1], "$<>")) + return 0; + + pind = ind - 1; + while (pind > 0 && whitespace (rl_line_buffer[pind])) + pind--; + /* If we have only whitespace preceding a paren, it's valid */ + if (ind >= 0 && pind <= 0 && rl_line_buffer[ind] == '(') /*)*/ + return 0; + /* Flag the invalid completions, which are mostly syntax errors */ + if (ind > 0 && rl_line_buffer[ind] == '(' && /*)*/ + member (rl_line_buffer[pind], COMMAND_SEPARATORS) == 0) + return 1; + + return 0; +} + /* 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 ** @@ -1261,19 +1577,31 @@ attempt_shell_completion (text, start, end) const char *text; int start, end; { - int in_command_position, ti, saveti, qc, dflags; + int in_command_position, ti, qc, dflags; char **matches, *command_separator_chars; +#if defined (PROGRAMMABLE_COMPLETION) + int have_progcomps, was_assignment; + COMPSPEC *iw_compspec; +#endif command_separator_chars = COMMAND_SEPARATORS; matches = (char **)NULL; rl_ignore_some_completions_function = filename_completion_ignore; + complete_fullquote = 1; /* full filename quoting by default */ + rl_filename_quote_characters = default_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + set_directory_hook (); + rl_filename_stat_hook = bash_filename_stat_hook; + + rl_sort_completion_matches = 1; /* sort by default */ + /* 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; + qc = -1; while ((ti > -1) && (whitespace (rl_line_buffer[ti]))) ti--; @@ -1284,7 +1612,7 @@ attempt_shell_completion (text, start, end) if (ti >= 0 && (rl_line_buffer[ti] == '"' || rl_line_buffer[ti] == '\'')) { qc = rl_line_buffer[ti]; - saveti = ti--; + ti--; while (ti > -1 && (whitespace (rl_line_buffer[ti]))) ti--; } @@ -1297,6 +1625,8 @@ attempt_shell_completion (text, start, end) are prompting at the top level. */ if (current_prompt_string == ps1_prompt) in_command_position++; + else if (parser_in_command_position ()) + in_command_position++; } else if (member (rl_line_buffer[ti], command_separator_chars)) { @@ -1305,7 +1635,7 @@ attempt_shell_completion (text, start, end) } if (check_redir (ti) == 1) - in_command_position = 0; + in_command_position = -1; /* sentinel that we're not the first word on the line */ } else { @@ -1314,11 +1644,17 @@ attempt_shell_completion (text, start, end) assignments. */ } + if (in_command_position > 0 && invalid_completion (text, ti)) + { + rl_attempted_completion_over = 1; + return ((char **)NULL); + } + /* 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] == '`' && + if (in_command_position > 0 && ti >= 0 && rl_line_buffer[ti] == '`' && *text != '`' && unclosed_pair (rl_line_buffer, end, "`") == 0) - in_command_position = 0; + in_command_position = -1; /* not following a command separator */ /* Special handling for command substitution. If *TEXT is a backquote, it can be the start or end of an old-style command substitution, or @@ -1326,19 +1662,20 @@ attempt_shell_completion (text, start, end) succeed. Don't bother if readline found a single quote and we are completing on the substring. */ if (*text == '`' && rl_completion_quote_character != '\'' && - !in_vyatta_restricted_mode(OUTPUT) && - (in_command_position || (unclosed_pair (rl_line_buffer, start, "`") && - unclosed_pair (rl_line_buffer, end, "`")))) + !in_vyatta_restricted_mode(OUTPUT) && + (in_command_position > 0 || (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 && prog_completion_enabled && - (in_vyatta_restricted_mode(OUTPUT) || in_command_position == 0 || text[0] == '\0') && - (progcomp_size () > 0) && + have_progcomps = prog_completion_enabled && (progcomp_size () > 0); + iw_compspec = progcomp_search (INITIALWORD); + if (matches == 0 && + (in_vyatta_restricted_mode(OUTPUT) || in_command_position == 0 || text[0] == '\0' || (in_command_position > 0 && iw_compspec)) && current_prompt_string == ps1_prompt) { - int s, e, foundcs; + int s, e, s1, e1, os, foundcs; char *n; /* XXX - don't free the members */ @@ -1346,16 +1683,93 @@ attempt_shell_completion (text, start, end) free (prog_complete_matches); prog_complete_matches = (char **)NULL; - s = find_cmd_start (start); + os = start; + n = 0; + was_assignment = 0; + s = find_cmd_start (os); 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 || (in_vyatta_restricted_mode(OUTPUT) && strcmp(n, text) == 0)) && - assignment (n, 0) == 0) - prog_complete_matches = programmable_completions (n, text, s, e, &foundcs); + do + { + /* Don't read past the end of rl_line_buffer */ + if (s > rl_end) + { + s1 = s = e1; + break; + } + /* Or past point if point is within an assignment statement */ + else if (was_assignment && s > rl_point) + { + s1 = s = e1; + break; + } + /* Skip over assignment statements preceding a command name. If we + don't find a command name at all, we can perform command name + completion. If we find a partial command name, we should perform + command name completion on it. */ + FREE (n); + n = find_cmd_name (s, &s1, &e1); + s = e1 + 1; + } + while (was_assignment = assignment (n, 0)); + s = s1; /* reset to index where name begins */ + + /* s == index of where command name begins (reset above) + e == end of current command, may be end of line + s1 = index of where command name begins + e1 == index of where command name ends + start == index of where word to be completed begins + end == index of where word to be completed ends + if (s == start) we are doing command word completion for sure + if (e1 == end) we are at the end of the command name and completing it */ + if (start == 0 && end == 0 && e != 0 && text[0] == '\0') /* beginning of non-empty line */ + foundcs = 0; + else if (start == end && start == s1 && e != 0 && e1 > end) /* beginning of command name, leading whitespace */ + foundcs = 0; + else if (e == 0 && e == s && text[0] == '\0' && have_progcomps) /* beginning of empty line */ + prog_complete_matches = programmable_completions (EMPTYCMD, text, s, e, &foundcs); + else if (start == end && text[0] == '\0' && s1 > start && whitespace (rl_line_buffer[start])) + foundcs = 0; /* whitespace before command name */ + else if (e > s && was_assignment == 0 && e1 == end && rl_line_buffer[e] == 0 && whitespace (rl_line_buffer[e-1]) == 0) + { + /* not assignment statement, but still want to perform command + completion if we are composing command word. */ + foundcs = 0; + in_command_position = s == start && STREQ (n, text); /* XXX */ + } + else if ((e > s || (in_vyatta_restricted_mode(OUTPUT) && strcmp(n, text) == 0)) && was_assignment == 0 && have_progcomps) + { + prog_complete_matches = programmable_completions (n, text, s, e, &foundcs); + /* command completion if programmable completion fails */ + /* If we have a completion for the initial word, we can prefer that */ + in_command_position = s == start && (iw_compspec || STREQ (n, text)); /* XXX */ + if (iw_compspec && in_command_position) + foundcs = 0; + } + /* empty command name following command separator */ + else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0 && + was_assignment == 0 && member (rl_line_buffer[start-1], COMMAND_SEPARATORS)) + { + foundcs = 0; + in_command_position = 1; + } + else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0) + { + foundcs = 0; /* empty command name following optional assignments */ + in_command_position += was_assignment; + } + else if (s == start && e == end && STREQ (n, text) && start > 0) + { + foundcs = 0; /* partial command name following assignments */ + in_command_position = 1; + } else foundcs = 0; + + /* If we have defined a compspec for the initial (command) word, call + it and process the results like any other programmable completion. */ + if (in_command_position && have_progcomps && foundcs == 0 && iw_compspec) + prog_complete_matches = programmable_completions (INITIALWORD, text, s, e, &foundcs); + FREE (n); /* XXX - if we found a COMPSPEC for the command, just return whatever the programmable completion code returns, and disable the default @@ -1380,7 +1794,7 @@ attempt_shell_completion (text, start, end) if (matches == 0) { dflags = 0; - if (in_command_position) + if (in_command_position > 0) dflags |= DEFCOMP_CMDPOS; matches = bash_default_completion (text, start, end, qc, dflags); } @@ -1393,7 +1807,7 @@ bash_default_completion (text, start, end, qc, compflags) const char *text; int start, end, qc, compflags; { - char **matches; + char **matches, *t; matches = (char **)NULL; @@ -1403,22 +1817,39 @@ bash_default_completion (text, start, end, qc, compflags) } /* New posix-style command substitution or variable name? */ - if (!matches && *text == '$') + if (*text == '$') { if (qc != '\'' && text[1] == '(') /* ) */ matches = rl_completion_matches (text, command_subst_completion_function); else - matches = rl_completion_matches (text, variable_completion_function); + { + matches = rl_completion_matches (text, variable_completion_function); + /* If a single match, see if it expands to a directory name and append + a slash if it does. This requires us to expand the variable name, + so we don't want to display errors if the variable is unset. This + can happen with dynamic variables whose value has never been + requested. */ + if (matches && matches[0] && matches[1] == 0) + { + t = savestring (matches[0]); + bash_filename_stat_hook (&t); + /* doesn't use test_for_directory because that performs tilde + expansion */ + if (file_isdir (t)) + rl_completion_append_character = '/'; + free (t); + } + } } /* 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) + 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 == '@') + if (matches == 0 && 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 @@ -1474,7 +1905,7 @@ bash_default_completion (text, start, end, qc, compflags) /* This could be a globbing pattern, so try to expand it using pathname expansion. */ - if (!matches && glob_pattern_p (text)) + if (!matches && completion_glob_pattern ((char *)text)) { matches = rl_completion_matches (text, glob_complete_word); /* A glob expression that matches more than one filename is problematic. @@ -1484,11 +1915,62 @@ bash_default_completion (text, start, end, qc, compflags) strvec_dispose (matches); matches = (char **)0; } + else if (matches && matches[1] && rl_completion_type == '!') + { + rl_completion_suppress_append = 1; + rl_filename_completion_desired = 0; + } } return (matches); } +static int +bash_command_name_stat_hook (name) + char **name; +{ + char *cname, *result; + + /* If it's not something we're going to look up in $PATH, just call the + normal filename stat hook. */ + if (absolute_program (*name)) + return (bash_filename_stat_hook (name)); + + cname = *name; + /* XXX - we could do something here with converting aliases, builtins, + and functions into something that came out as executable, but we don't. */ + result = search_for_command (cname, 0); + if (result) + { + *name = result; + return 1; + } + return 0; +} + +static int +executable_completion (filename, searching_path) + const char *filename; + int searching_path; +{ + char *f, c; + int r; + + /* This gets an unquoted filename, so we need to quote special characters + in the filename before the completion hook gets it. */ +#if 0 + f = savestring (filename); +#else + c = 0; + f = bash_quote_filename ((char *)filename, SINGLE_MATCH, &c); +#endif + bash_directory_completion_hook (&f); + + r = searching_path ? executable_file (f) : executable_or_directory (f); + free (f); + return r; +} + /* 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 @@ -1502,22 +1984,25 @@ command_word_completion_function (hint_text, state) static char *path = (char *)NULL; static char *val = (char *)NULL; static char *filename_hint = (char *)NULL; + static char *fnhint = (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 path_index, hint_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; + char *temp, *cval; /* 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) { + rl_filename_stat_hook = bash_command_name_stat_hook; + if (dequoted_hint && dequoted_hint != hint) free (dequoted_hint); if (hint) @@ -1530,13 +2015,15 @@ command_word_completion_function (hint_text, state) temp = rl_variable_value ("completion-ignore-case"); igncase = RL_BOOLEAN_VARIABLE_VALUE (temp); + old_glob_ignore_case = glob_ignore_case; + if (glob_matches) { free (glob_matches); glob_matches = (char **)NULL; } - globpat = glob_pattern_p (hint_text); + globpat = completion_glob_pattern ((char *)hint_text); /* If this is an absolute program name, do not check it against aliases, reserved words, functions or builtins. We must check @@ -1545,7 +2032,9 @@ command_word_completion_function (hint_text, state) 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(). */ + passing filenames with tildes directly to stat(). The rest of + the shell doesn't do variable expansion on the word following + the tilde, so we don't do it here even if direxpand is set. */ if (*hint_text == '~') { hint = bash_tilde_expand (hint_text, 0); @@ -1559,6 +2048,11 @@ command_word_completion_function (hint_text, state) directory_part = (char *)NULL; } } + else if (dircomplete_expand) + { + hint = savestring (hint_text); + bash_directory_completion_hook (&hint); + } else hint = savestring (hint_text); @@ -1574,12 +2068,12 @@ command_word_completion_function (hint_text, state) free (hint); hint = dequoted_hint; } - dequoted_len = hint_len = strlen (hint); + hint_len = strlen (hint); if (filename_hint) free (filename_hint); - filename_hint = savestring (hint); + fnhint = filename_hint = savestring (hint); istate = 0; @@ -1590,19 +2084,22 @@ command_word_completion_function (hint_text, state) } else { + if (dircomplete_expand && path_dot_or_dotdot (filename_hint)) + { + dircomplete_expand = 0; + set_directory_hook (); + dircomplete_expand = 1; + } mapping_over = 4; goto inner; } } dequoted_hint = hint = savestring (hint_text); - dequoted_len = hint_len = strlen (hint); + 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); - } + dequoted_hint = bash_dequote_filename (hint, 0); path = get_string_value ("PATH"); path_index = dot_in_path = 0; @@ -1636,7 +2133,9 @@ command_word_completion_function (hint_text, state) alias = alias_list[local_index++]->name; - if (STREQN (alias, hint, hint_len)) + if (igncase == 0 && (STREQN (alias, hint, hint_len))) + return (savestring (alias)); + else if (igncase && strncasecmp (alias, hint, hint_len) == 0) return (savestring (alias)); } #endif /* ALIAS */ @@ -1665,7 +2164,10 @@ command_word_completion_function (hint_text, state) varname = varlist[local_index++]->name; - if (STREQN (varname, hint, hint_len)) + /* Honor completion-ignore-case for shell function names. */ + if (igncase == 0 && (STREQN (varname, hint, hint_len))) + return (savestring (varname)); + else if (igncase && strncasecmp (varname, hint, hint_len) == 0) return (savestring (varname)); } local_index = 0; @@ -1696,12 +2198,14 @@ command_word_completion_function (hint_text, state) 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 (glob_pattern_p (hint)) + if (globpat) { if (state == 0) { + rl_filename_completion_desired = 1; + glob_ignore_case = igncase; - glob_matches = shell_glob_filename (hint); + glob_matches = shell_glob_filename (hint, 0); glob_ignore_case = old_glob_ignore_case; if (GLOB_FAILED (glob_matches) || glob_matches == 0) @@ -1720,9 +2224,9 @@ command_word_completion_function (hint_text, state) { if (executable_or_directory (val)) { - if (*hint_text == '~') + if (*hint_text == '~' && directory_part) { - temp = restore_tilde (val, directory_part); + temp = maybe_restore_tilde (val, directory_part); free (val); val = temp; } @@ -1781,15 +2285,28 @@ command_word_completion_function (hint_text, state) if (current_path[0] == '.' && current_path[1] == '\0') dot_in_path = 1; + if (fnhint && fnhint != filename_hint) + free (fnhint); if (filename_hint) free (filename_hint); filename_hint = sh_makepath (current_path, hint, 0); + /* Need a quoted version (though it doesn't matter much in most + cases) because rl_filename_completion_function dequotes the + filename it gets, assuming that it's been quoted as part of + the input line buffer. */ + if (strpbrk (filename_hint, "\"'\\")) + fnhint = sh_backslash_quote (filename_hint, filename_bstab, 0); + else + fnhint = filename_hint; free (current_path); /* XXX */ } inner: - val = rl_filename_completion_function (filename_hint, istate); + val = rl_filename_completion_function (fnhint, istate); + if (mapping_over == 4 && dircomplete_expand) + set_directory_hook (); + istate = 1; if (val == 0) @@ -1807,15 +2324,21 @@ command_word_completion_function (hint_text, state) if (absolute_program (hint)) { +#if 0 if (igncase == 0) match = strncmp (val, hint, hint_len) == 0; else match = strncasecmp (val, hint, hint_len) == 0; +#else + /* Why duplicate the comparison rl_filename_completion_function + already performs? */ + match = 1; +#endif /* If we performed tilde expansion, restore the original filename. */ if (*hint_text == '~') - temp = restore_tilde (val, directory_part); + temp = maybe_restore_tilde (val, directory_part); else temp = savestring (val); freetemp = 1; @@ -1838,19 +2361,38 @@ command_word_completion_function (hint_text, state) 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))) + relative pathnames. */ +#if 0 + /* If we're not searching $PATH and we have a relative pathname, we + need to re-canonicalize it before testing whether or not it's an + executable or a directory so the shell treats .. relative to $PWD + according to the physical/logical option. The shell already + canonicalizes the directory name in order to tell readline where + to look, so not doing it here will be inconsistent. */ + /* XXX -- currently not used -- will introduce more inconsistency, + since shell does not canonicalize ../foo before passing it to + shell_execve(). */ + if (match && searching_path == 0 && *val == '.') + { + char *t, *t1; + + t = get_working_directory ("command-word-completion"); + t1 = make_absolute (val, t); + free (t); + cval = sh_canonpath (t1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + } + else #endif + cval = val; + + if (match && executable_completion ((searching_path ? val : cval), searching_path)) { + if (cval != val) + free (cval); free (val); val = ""; /* So it won't be NULL. */ return (temp); @@ -1859,6 +2401,8 @@ command_word_completion_function (hint_text, state) { if (freetemp) free (temp); + if (cval != val) + free (cval); free (val); goto inner; } @@ -1927,7 +2471,7 @@ command_subst_completion_function (text, state) rl_completion_suppress_append = 1; } - if (!matches || !matches[cmd_index]) + if (matches == 0 || matches[cmd_index] == 0) { rl_filename_quoting_desired = 0; /* disable quoting */ return ((char *)NULL); @@ -1957,7 +2501,6 @@ variable_completion_function (text, 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) @@ -1976,7 +2519,6 @@ variable_completion_function (text, state) varname = savestring (text + first_char_loc); - namelen = strlen (varname); if (varlist) strvec_dispose (varlist); @@ -2064,7 +2606,7 @@ bash_servicename_completion_function (text, state) #else static char *sname = (char *)NULL; static struct servent *srvent; - static int snamelen, firstc; + static int snamelen; char *value; char **alist, *aentry; int afound; @@ -2072,7 +2614,6 @@ bash_servicename_completion_function (text, state) if (state == 0) { FREE (sname); - firstc = *text; sname = savestring (text); snamelen = strlen (sname); @@ -2205,7 +2746,7 @@ static void maybe_make_readline_line (new_line) char *new_line; { - if (strcmp (new_line, rl_line_buffer) != 0) + if (new_line && strcmp (new_line, rl_line_buffer) != 0) { rl_point = rl_end; @@ -2317,7 +2858,7 @@ static int history_and_alias_expand_line (count, ignore) int count, ignore; { - char *new_line; + char *new_line, *t; new_line = 0; #if defined (BANG_HISTORY) @@ -2355,14 +2896,19 @@ static int shell_expand_line (count, ignore) int count, ignore; { - char *new_line; + char *new_line, *t; WORD_LIST *expanded_string; + WORD_DESC *w; new_line = 0; #if defined (BANG_HISTORY) new_line = history_expand_line_internal (rl_line_buffer); #endif + t = expand_string_dollar_quote (new_line ? new_line : rl_line_buffer, 0); + FREE (new_line); + new_line = t; + #if defined (ALIAS) if (new_line) { @@ -2386,9 +2932,19 @@ shell_expand_line (count, ignore) /* 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); + +#if 1 + w = alloc_word_desc (); + w->word = savestring (rl_line_buffer); + w->flags = rl_explicit_arg ? (W_NOPROCSUB|W_NOCOMSUB) : 0; + expanded_string = expand_word (w, rl_explicit_arg ? Q_HERE_DOCUMENT : 0); + dispose_word (w); +#else + new_line = savestring (rl_line_buffer); + expanded_string = expand_string (new_line, 0); FREE (new_line); +#endif + if (expanded_string == 0) { new_line = (char *)xmalloc (1); @@ -2588,6 +3144,21 @@ test_for_directory (name) return (r); } +static int +test_for_canon_directory (name) + const char *name; +{ + char *fn; + int r; + + fn = (*name == '~') ? bash_tilde_expand (name, 0) : savestring (name); + bash_filename_stat_hook (&fn); + r = file_isdir (fn); + free (fn); + + return (r); +} + /* Remove files from NAMES, leaving directories. */ static int bash_ignore_filenames (names) @@ -2597,6 +3168,14 @@ bash_ignore_filenames (names) return 0; } +static int +bash_progcomp_ignore_filenames (names) + char **names; +{ + _ignore_completion_names (names, test_for_canon_directory); + return 0; +} + static int return_zero (name) const char *name; @@ -2620,7 +3199,7 @@ restore_tilde (val, directory_part) char *val, *directory_part; { int l, vl, dl2, xl; - char *dh2, *expdir, *ret; + char *dh2, *expdir, *ret, *v; vl = strlen (val); @@ -2632,6 +3211,22 @@ restore_tilde (val, directory_part) expdir = bash_tilde_expand (directory_part, 0); xl = strlen (expdir); + if (*directory_part == '~' && STREQ (directory_part, expdir)) + { + /* tilde expansion failed, so what should we return? we use what the + user typed. */ + v = mbschr (val, '/'); + vl = STRLEN (v); + ret = (char *)xmalloc (xl + vl + 2); + strcpy (ret, directory_part); + if (v && *v) + strcpy (ret + xl, v); + + free (dh2); + free (expdir); + + return ret; + } free (expdir); /* @@ -2642,6 +3237,11 @@ restore_tilde (val, directory_part) l = length of remainder after tilde-prefix */ l = (vl - xl) + 1; + if (l <= 0) + { + free (dh2); + return (savestring (val)); /* XXX - just punt */ + } ret = (char *)xmalloc (dl2 + 2 + l); strcpy (ret, dh2); @@ -2651,6 +3251,20 @@ restore_tilde (val, directory_part) return (ret); } +static char * +maybe_restore_tilde (val, directory_part) + char *val, *directory_part; +{ + rl_icppfunc_t *save; + char *ret; + + save = (dircomplete_expand == 0) ? save_directory_hook () : (rl_icppfunc_t *)0; + ret = restore_tilde (val, directory_part); + if (save) + restore_directory_hook (save); + 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. */ @@ -2662,10 +3276,12 @@ bash_directory_expansion (dirname) d = savestring (*dirname); - if (rl_directory_rewrite_hook) - (*rl_directory_rewrite_hook) (&d); - - if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d)) + if ((rl_directory_rewrite_hook) && (*rl_directory_rewrite_hook) (&d)) + { + free (*dirname); + *dirname = d; + } + else if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d)) { free (*dirname); *dirname = d; @@ -2677,6 +3293,8 @@ bash_directory_expansion (dirname) free (d); *dirname = nd; } + else + free (d); } /* If necessary, rewrite directory entry */ @@ -2693,40 +3311,180 @@ bash_filename_rewrite_hook (fname, fnlen) return conv; } -/* Handle symbolic link references and other directory name - expansions while hacking completion. */ +/* Functions to save and restore the appropriate directory hook */ +/* This is not static so the shopt code can call it */ +void +set_directory_hook () +{ + if (dircomplete_expand) + { + rl_directory_completion_hook = bash_directory_completion_hook; + rl_directory_rewrite_hook = (rl_icppfunc_t *)0; + } + else + { + rl_directory_rewrite_hook = bash_directory_completion_hook; + rl_directory_completion_hook = (rl_icppfunc_t *)0; + } +} + +static rl_icppfunc_t * +save_directory_hook () +{ + rl_icppfunc_t *ret; + + if (dircomplete_expand) + { + ret = rl_directory_completion_hook; + rl_directory_completion_hook = (rl_icppfunc_t *)NULL; + } + else + { + ret = rl_directory_rewrite_hook; + rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; + } + + return ret; +} + +static void +restore_directory_hook (hookf) + rl_icppfunc_t *hookf; +{ + if (dircomplete_expand) + rl_directory_completion_hook = hookf; + else + rl_directory_rewrite_hook = hookf; +} + +/* Check whether not DIRNAME, with any trailing slash removed, exists. If + SHOULD_DEQUOTE is non-zero, we dequote the directory name first. */ static int -bash_directory_completion_hook (dirname) +directory_exists (dirname, should_dequote) + const char *dirname; + int should_dequote; +{ + char *new_dirname; + int dirlen, r; + struct stat sb; + + /* We save the string and chop the trailing slash because stat/lstat behave + inconsistently if one is present. */ + new_dirname = should_dequote ? bash_dequote_filename ((char *)dirname, rl_completion_quote_character) : savestring (dirname); + dirlen = STRLEN (new_dirname); + if (new_dirname[dirlen - 1] == '/') + new_dirname[dirlen - 1] = '\0'; +#if defined (HAVE_LSTAT) + r = lstat (new_dirname, &sb) == 0; +#else + r = stat (new_dirname, &sb) == 0; +#endif + free (new_dirname); + return (r); +} + +/* Expand a filename before the readline completion code passes it to stat(2). + The filename will already have had tilde expansion performed. */ +static int +bash_filename_stat_hook (dirname) char **dirname; { char *local_dirname, *new_dirname, *t; - int return_value, should_expand_dirname; + int should_expand_dirname, return_value; + int global_nounset; WORD_LIST *wl; - struct stat sb; - return_value = should_expand_dirname = 0; local_dirname = *dirname; + should_expand_dirname = return_value = 0; + if (t = mbschr (local_dirname, '$')) + should_expand_dirname = '$'; + else if (t = mbschr (local_dirname, '`')) /* XXX */ + should_expand_dirname = '`'; - if (mbschr (local_dirname, '$')) - should_expand_dirname = 1; - else + if (should_expand_dirname && directory_exists (local_dirname, 0)) + should_expand_dirname = 0; + + if (should_expand_dirname) + { + new_dirname = savestring (local_dirname); + /* no error messages, and expand_prompt_string doesn't longjmp so we don't + have to worry about restoring this setting. */ + global_nounset = unbound_vars_is_error; + unbound_vars_is_error = 0; + wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */ + unbound_vars_is_error = global_nounset; + if (wl) + { + free (new_dirname); + new_dirname = string_list (wl); + /* Tell the completer we actually expanded something and change + *dirname only if we expanded to something non-null -- stat + behaves unpredictably when passed null or empty strings */ + if (new_dirname && *new_dirname) + { + free (local_dirname); /* XXX */ + local_dirname = *dirname = new_dirname; + return_value = STREQ (local_dirname, *dirname) == 0; + } + else + free (new_dirname); + dispose_words (wl); + } + else + free (new_dirname); + } + + /* This is very similar to the code in bash_directory_completion_hook below, + but without spelling correction and not worrying about whether or not + we change relative pathnames. */ + if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1])) { - t = mbschr (local_dirname, '`'); - if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0) - should_expand_dirname = 1; + char *temp1, *temp2; + + t = get_working_directory ("symlink-hook"); + temp1 = make_absolute (local_dirname, t); + free (t); + temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + + /* If we can't canonicalize, bail. */ + if (temp2 == 0) + { + free (temp1); + return return_value; + } + + free (local_dirname); + *dirname = temp2; + free (temp1); } -#if defined (HAVE_LSTAT) - if (should_expand_dirname && lstat (local_dirname, &sb) == 0) -#else - if (should_expand_dirname && stat (local_dirname, &sb) == 0) -#endif + return (return_value); +} + +/* Handle symbolic link references and other directory name + expansions while hacking completion. This should return 1 if it modifies + the DIRNAME argument, 0 otherwise. It should make sure not to modify + DIRNAME if it returns 0. */ +static int +bash_directory_completion_hook (dirname) + char **dirname; +{ + char *local_dirname, *new_dirname, *t; + int return_value, should_expand_dirname, nextch, closer; + WORD_LIST *wl; + + return_value = should_expand_dirname = nextch = closer = 0; + local_dirname = *dirname; + + should_expand_dirname = bash_check_expchar (local_dirname, 1, &nextch, &closer); + + if (should_expand_dirname && directory_exists (local_dirname, 1)) 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 */ + wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */ if (wl) { *dirname = string_list (wl); @@ -2737,6 +3495,8 @@ bash_directory_completion_hook (dirname) free (new_dirname); dispose_words (wl); local_dirname = *dirname; + + set_filename_quote_chars (should_expand_dirname, nextch, closer); } else { @@ -2751,37 +3511,69 @@ bash_directory_completion_hook (dirname) { /* Dequote the filename even if we don't expand it. */ new_dirname = bash_dequote_filename (local_dirname, rl_completion_quote_character); + return_value = STREQ (local_dirname, new_dirname) == 0; free (local_dirname); local_dirname = *dirname = new_dirname; } + /* no_symbolic_links == 0 -> use (default) logical view of the file system. + local_dirname[0] == '.' && local_dirname[1] == '/' means files in the + current directory (./). + local_dirname[0] == '.' && local_dirname[1] == 0 means relative pathnames + in the current directory (e.g., lib/sh). + XXX - should we do spelling correction on these? */ + + /* This is test as it was in bash-4.2: skip relative pathnames in current + directory. Change test to + (local_dirname[0] != '.' || (local_dirname[1] && local_dirname[1] != '/')) + if we want to skip paths beginning with ./ also. */ if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1])) { char *temp1, *temp2; int len1, len2; + /* If we have a relative path + (local_dirname[0] != '/' && local_dirname[0] != '.') + that is canonical after appending it to the current directory, then + temp1 = temp2+'/' + That is, + strcmp (temp1, temp2) == 0 + after adding a slash to temp2 below. It should be safe to not + change those. + */ 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) + /* Try spelling correction if initial canonicalization fails. Make + sure we are set to replace the directory name with the results so + subsequent directory checks don't fail. */ + if (temp2 == 0 && dircomplete_spelling && dircomplete_expand) { + size_t l1, l2; + temp2 = dirspell (temp1); + l2 = STRLEN (temp2); + /* Don't take matches if they are shorter than the original path */ + if (temp2 && l2 < strlen (temp1) && STREQN (temp1, temp2, l2)) + { + free (temp2); + temp2 = 0; + } if (temp2) { free (temp1); temp1 = temp2; temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); - return_value = temp2 != 0; + return_value |= temp2 != 0; } } /* If we can't canonicalize, bail. */ if (temp2 == 0) { free (temp1); - return 1; + return return_value; } len1 = strlen (temp1); if (temp1[len1 - 1] == '/') @@ -2794,10 +3586,20 @@ bash_directory_completion_hook (dirname) temp2[len2 + 1] = '\0'; } } + + /* dircomplete_expand_relpath == 0 means we want to leave relative + pathnames that are unchanged by canonicalization alone. + *local_dirname != '/' && *local_dirname != '.' == relative pathname + (consistent with general.c:absolute_pathname()) + temp1 == temp2 (after appending a slash to temp2) means the pathname + is not changed by canonicalization as described above. */ + if (dircomplete_expand_relpath || ((local_dirname[0] != '/' && local_dirname[0] != '.') && STREQ (temp1, temp2) == 0)) + return_value |= STREQ (local_dirname, temp2) == 0; free (local_dirname); *dirname = temp2; free (temp1); } + return (return_value); } @@ -2873,6 +3675,7 @@ history_completion_generator (hint_text, state) while (history_completion_array && history_completion_array[local_index]) { + /* XXX - should this use completion-ignore-case? */ if (strncmp (text, history_completion_array[local_index++], len) == 0) return (savestring (history_completion_array[local_index - 1])); } @@ -2886,12 +3689,15 @@ dynamic_complete_history (count, key) int r; rl_compentry_func_t *orig_func; rl_completion_func_t *orig_attempt_func; + rl_compignore_func_t *orig_ignore_func; orig_func = rl_completion_entry_function; orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_function; rl_completion_entry_function = history_completion_generator; rl_attempted_completion_function = (rl_completion_func_t *)NULL; + rl_ignore_some_completions_function = filename_completion_ignore; /* XXX - use rl_completion_mode here? */ if (rl_last_func == dynamic_complete_history) @@ -2901,6 +3707,8 @@ dynamic_complete_history (count, key) rl_completion_entry_function = orig_func; rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; + return r; } @@ -2911,14 +3719,17 @@ bash_dabbrev_expand (count, key) int r, orig_suppress, orig_sort; rl_compentry_func_t *orig_func; rl_completion_func_t *orig_attempt_func; + rl_compignore_func_t *orig_ignore_func; orig_func = rl_menu_completion_entry_function; orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_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_ignore_some_completions_function = filename_completion_ignore; rl_filename_completion_desired = 0; rl_completion_suppress_append = 1; rl_sort_completion_matches = 0; @@ -2933,6 +3744,7 @@ bash_dabbrev_expand (count, key) rl_last_func = bash_dabbrev_expand; rl_menu_completion_entry_function = orig_func; rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; rl_completion_suppress_append = orig_suppress; rl_sort_completion_matches = orig_sort; @@ -2982,25 +3794,31 @@ bash_complete_filename_internal (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; + rl_compignore_func_t *orig_ignore_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_ignore_func = rl_ignore_some_completions_function; orig_rl_completer_word_break_characters = rl_completer_word_break_characters; + + orig_dir_func = save_directory_hook (); + 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_ignore_some_completions_function = filename_completion_ignore; 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_ignore_some_completions_function = orig_ignore_func; rl_completer_word_break_characters = orig_rl_completer_word_break_characters; + restore_directory_hook (orig_dir_func); + return r; } @@ -3067,6 +3885,13 @@ bash_complete_command_internal (what_to_do) return bash_specific_completion (what_to_do, command_word_completion_function); } +static int +completion_glob_pattern (string) + char *string; +{ + return (glob_pattern_p (string) == 1); +} + static char *globtext; static char *globorig; @@ -3105,7 +3930,7 @@ glob_complete_word (text, state) if (ttext != text) free (ttext); - matches = shell_glob_filename (globtext); + matches = shell_glob_filename (globtext, 0); if (GLOB_FAILED (matches)) matches = (char **)NULL; ind = 0; @@ -3176,17 +4001,21 @@ bash_specific_completion (what_to_do, generator) { rl_compentry_func_t *orig_func; rl_completion_func_t *orig_attempt_func; + rl_compignore_func_t *orig_ignore_func; int r; orig_func = rl_completion_entry_function; orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_function; rl_completion_entry_function = generator; rl_attempted_completion_function = NULL; + rl_ignore_some_completions_function = orig_ignore_func; r = rl_complete_internal (what_to_do); rl_completion_entry_function = orig_func; rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; return r; } @@ -3227,7 +4056,7 @@ bash_vi_complete (count, key) t = substring (rl_line_buffer, p, rl_point); } - if (t && glob_pattern_p (t) == 0) + if (t && completion_glob_pattern (t) == 0) rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' */ FREE (t); @@ -3274,7 +4103,7 @@ bash_dequote_filename (text, quote_char) *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)) + else if (quoted == '"' && ((sh_syntaxtab[(unsigned char)p[1]] & CBSDQUOTE) == 0)) *r++ = *p; *r++ = *++p; @@ -3336,6 +4165,109 @@ quote_word_break_chars (text) return ret; } +/* Return a character in DIRNAME that will cause shell expansion to be + performed. If NEXTP is non-null, *NEXTP gets the expansion character that + follows RET (e.g., '{' or `(' for `$'). If CLOSERP is non-null, *CLOSERP + gets the character that should close . If NEED_CLOSER is non- + zero, any expansion pair that isn't closed causes this function to + return 0, which indicates that we didn't find an expansion character. It's + used in case DIRNAME is going to be expanded. If DIRNAME is just going to + be quoted, NEED_CLOSER will be 0. */ +static int +bash_check_expchar (dirname, need_closer, nextp, closerp) + char *dirname; + int need_closer; + int *nextp, *closerp; +{ + char *t; + int ret, n, c; + + ret = n = c = 0; + if (t = mbschr (dirname, '$')) + { + ret = '$'; + n = t[1]; + /* Deliberately does not handle the deprecated $[...] arithmetic + expansion syntax */ + if (n == '(') + c = ')'; + else if (n == '{') + c = '}'; + else + n = 0; + + if (c && need_closer) /* XXX */ + { + int p; + char delims[2]; + + delims[0] = c; delims[1] = 0; + p = skip_to_delim (t, 1, delims, SD_NOJMP|SD_COMPLETE); + if (t[p] != c) + ret = 0; + } + } + else if (dirname[0] == '~') + ret = '~'; + else + { + t = mbschr (dirname, '`'); + if (t) + { + if (need_closer == 0) + ret = '`'; + else if (unclosed_pair (dirname, strlen (dirname), "`") == 0) + ret = '`'; + } + } + + if (nextp) + *nextp = n; + if (closerp) + *closerp = c; + + return ret; +} + +/* Make sure EXPCHAR and, if non-zero, NEXTCH and CLOSER are not in the set + of characters to be backslash-escaped. This is the only place + custom_filename_quote_characters is modified. */ +static void +set_filename_quote_chars (expchar, nextch, closer) + int expchar, nextch, closer; +{ + int i, j, c; + + if (rl_filename_quote_characters && *rl_filename_quote_characters) + { + i = strlen (default_filename_quote_characters); + custom_filename_quote_characters = xrealloc (custom_filename_quote_characters, i+1); + for (i = j = 0; c = default_filename_quote_characters[i]; i++) + { + if (c == expchar || c == nextch || c == closer) + continue; + custom_filename_quote_characters[j++] = c; + } + custom_filename_quote_characters[j] = '\0'; + rl_filename_quote_characters = custom_filename_quote_characters; + set_filename_bstab (rl_filename_quote_characters); + } +} + +/* Use characters in STRING to populate the table of characters that should + be backslash-quoted. The table will be used for sh_backslash_quote from + this file. */ +static void +set_filename_bstab (string) + const char *string; +{ + const char *s; + + memset (filename_bstab, 0, sizeof (filename_bstab)); + for (s = string; s && *s; s++) + filename_bstab[(unsigned char)*s] = 1; +} + /* 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 @@ -3350,6 +4282,7 @@ bash_quote_filename (s, rtype, qcp) { char *rtext, *mtext, *ret; int rlen, cs; + int expchar, nextch, closer; rtext = (char *)NULL; @@ -3367,7 +4300,18 @@ bash_quote_filename (s, rtype, qcp) 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')) + expchar = nextch = closer = 0; + if (*qcp == '\0' && cs == COMPLETE_BSQUOTE && dircomplete_expand == 0 && + (expchar = bash_check_expchar (s, 0, &nextch, &closer)) && + file_exists (s) == 0) + { + /* Usually this will have been set by bash_directory_completion_hook, + but there are cases where it will not be. */ + if (rl_filename_quote_characters != custom_filename_quote_characters) + set_filename_quote_chars (expchar, nextch, closer); + complete_fullquote = 0; + } + else if (*qcp == '\0' && cs == COMPLETE_BSQUOTE && mbschr (s, '\n')) cs = COMPLETE_SQUOTE; else if (*qcp == '"') cs = COMPLETE_DQUOTE; @@ -3401,7 +4345,7 @@ bash_quote_filename (s, rtype, qcp) rtext = sh_single_quote (mtext); break; case COMPLETE_BSQUOTE: - rtext = sh_backslash_quote (mtext); + rtext = sh_backslash_quote (mtext, complete_fullquote ? 0 : filename_bstab, 0); break; } @@ -3410,7 +4354,8 @@ bash_quote_filename (s, rtype, qcp) /* 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) + /* XXX - test complete_fullquote here? */ + if (rtext && cs == COMPLETE_BSQUOTE && rl_completer_word_break_characters) { mtext = quote_word_break_chars (rtext); free (rtext); @@ -3419,9 +4364,17 @@ bash_quote_filename (s, rtype, qcp) /* 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 (rtext) + { + rlen = strlen (rtext); + ret = (char *)xmalloc (rlen + 1); + strcpy (ret, rtext); + } + else + { + ret = (char *)xmalloc (rlen = 1); + ret[0] = '\0'; + } /* If there are multiple matches, cut off the closing quote. */ if (rtype == MULT_MATCH && cs != COMPLETE_BSQUOTE) @@ -3430,67 +4383,123 @@ bash_quote_filename (s, rtype, qcp) return ret; } -/* Support for binding readline key sequences to Unix commands. */ -static Keymap cmd_xmap; +/* Support for binding readline key sequences to Unix commands. Each editing + mode has a separate Unix command keymap. */ + +static Keymap emacs_std_cmd_xmap; +#if defined (VI_MODE) +static Keymap vi_insert_cmd_xmap; +static Keymap vi_movement_cmd_xmap; +#endif +#ifdef _MINIX +static void +#else static int +#endif putx(c) int c; { - putc (c, rl_outstream); + int x; + x = putc (c, rl_outstream); +#ifndef _MINIX + return x; +#endif } - + static int +readline_get_char_offset (ind) + int ind; +{ + int r, old_ch; + + r = ind; +#if defined (HANDLE_MULTIBYTE) + if (locale_mb_cur_max > 1) + { + old_ch = rl_line_buffer[ind]; + rl_line_buffer[ind] = '\0'; + r = MB_STRLEN (rl_line_buffer); + rl_line_buffer[ind] = old_ch; + } +#endif + return r; +} + +static void +readline_set_char_offset (ind, varp) + int ind; + int *varp; +{ + int i; + + i = ind; + +#if defined (HANDLE_MULTIBYTE) + if (i > 0 && locale_mb_cur_max > 1) + i = _rl_find_next_mbchar (rl_line_buffer, 0, i, 0); /* XXX */ +#endif + if (i != *varp) + { + if (i > rl_end) + i = rl_end; + else if (i < 0) + i = 0; + *varp = i; + } +} + +int bash_execute_unix_command (count, key) int count; /* ignored */ int key; { - Keymap ckmap; /* current keymap */ - Keymap xkmap; /* unix command executing keymap */ + int type; register int i, r; intmax_t mi; sh_parser_state_t ps; - char *cmd, *value, *l, *l1, *ce; + char *cmd, *value, *ce, old_ch; SHELL_VAR *v; char ibuf[INT_STRLEN_BOUND(int) + 1]; + Keymap cmd_xmap; + const char *kseq; + size_t kslen; - /* 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) + kseq = rl_executing_keyseq; + kslen = rl_key_sequence_length; + + /* If we have a numeric argument, chop it off the front of the key sequence */ + if (count > 1 || rl_explicit_arg) { - /* bogus. we have to search. only handle one level of indirection. */ - for (i = 0; i < KEYMAP_SIZE; i++) + i = rl_trim_arg_from_keyseq (rl_executing_keyseq, rl_key_sequence_length, rl_get_keymap ()); + if (i > 0) { - 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; + kseq = rl_executing_keyseq + i; + kslen = rl_key_sequence_length - i; } } - else - xkmap = cmd_xmap; - cmd = (char *)xkmap[key].function; + /* First, we need to find the right command to execute. This is tricky, + because we might have already indirected into another keymap, so we + have to walk cmd_xmap using the entire key sequence. */ + cmd_xmap = get_cmd_xmap_from_keymap (rl_get_keymap ()); + cmd = (char *)rl_function_of_keyseq_len (kseq, kslen, cmd_xmap, &type); + + if (type == ISKMAP && (type = ((Keymap) cmd)[ANYOTHERKEY].type) == ISMACR) + cmd = (char*)((Keymap) cmd)[ANYOTHERKEY].function; - if (cmd == 0) + if (cmd == 0 || type != ISMACR) { - rl_ding (); + rl_crlf (); + internal_error (_("bash_execute_unix_command: cannot find keymap for command")); + rl_forced_update_display (); return 1; } ce = rl_get_termcap ("ce"); if (ce) /* clear current line */ { - fprintf (rl_outstream, "\r"); - tputs (ce, 1, putx); + rl_clear_visible_line (); fflush (rl_outstream); } else @@ -3499,48 +4508,132 @@ bash_execute_unix_command (count, key) 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); + + i = readline_get_char_offset (rl_point); + value = inttostr (i, ibuf, sizeof (ibuf)); + v = bind_int_variable ("READLINE_POINT", value, 0); if (v) VSETATTR (v, att_exported); + + i = readline_get_char_offset (rl_mark); + value = inttostr (i, ibuf, sizeof (ibuf)); + v = bind_int_variable ("READLINE_MARK", value, 0); + if (v) + VSETATTR (v, att_exported); + + if (count > 1 || rl_explicit_arg) + { + value = inttostr (count, ibuf, sizeof (ibuf)); + v = bind_int_variable ("READLINE_ARGUMENT", value, 0); + 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); + rl_clear_signals (); + r = parse_and_execute (savestring (cmd), "bash_execute_unix_command", SEVAL_NOHIST); + rl_set_signals (); 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)); + maybe_make_readline_line (v ? value_cell (v) : 0); + 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; - } - } + readline_set_char_offset (mi, &rl_point); + + v = find_variable ("READLINE_MARK"); + if (v && legal_number (value_cell (v), &mi)) + readline_set_char_offset (mi, &rl_mark); - unbind_variable ("READLINE_LINE"); - unbind_variable ("READLINE_POINT"); + check_unbind_variable ("READLINE_LINE"); + check_unbind_variable ("READLINE_POINT"); + check_unbind_variable ("READLINE_MARK"); + check_unbind_variable ("READLINE_ARGUMENT"); array_needs_making = 1; /* and restore the readline buffer and display after command execution. */ - rl_forced_update_display (); + /* If we clear the last line of the prompt above, redraw only that last + line. If the command returns 124, we redraw unconditionally as in + previous versions. */ + if (ce && r != 124) + rl_redraw_prompt_last_line (); + else + rl_forced_update_display (); + + return 0; +} + +int +print_unix_command_map () +{ + Keymap save, cmd_xmap; + + save = rl_get_keymap (); + cmd_xmap = get_cmd_xmap_from_keymap (save); + rl_set_keymap (cmd_xmap); + rl_macro_dumper (1); + rl_set_keymap (save); return 0; } static void init_unix_command_map () { - cmd_xmap = rl_make_bare_keymap (); + emacs_std_cmd_xmap = rl_make_bare_keymap (); + + emacs_std_cmd_xmap[CTRL('X')].type = ISKMAP; + emacs_std_cmd_xmap[CTRL('X')].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap ()); + emacs_std_cmd_xmap[ESC].type = ISKMAP; + emacs_std_cmd_xmap[ESC].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap ()); + +#if defined (VI_MODE) + vi_insert_cmd_xmap = rl_make_bare_keymap (); + vi_movement_cmd_xmap = rl_make_bare_keymap (); +#endif +} + +static Keymap +get_cmd_xmap_from_edit_mode () +{ + if (emacs_std_cmd_xmap == 0) + init_unix_command_map (); + + switch (rl_editing_mode) + { + case EMACS_EDITING_MODE: + return emacs_std_cmd_xmap; +#if defined (VI_MODE) + case VI_EDITING_MODE: + return (get_cmd_xmap_from_keymap (rl_get_keymap ())); +#endif + default: + return (Keymap)NULL; + } +} + +static Keymap +get_cmd_xmap_from_keymap (kmap) + Keymap kmap; +{ + if (emacs_std_cmd_xmap == 0) + init_unix_command_map (); + + if (kmap == emacs_standard_keymap) + return emacs_std_cmd_xmap; + else if (kmap == emacs_meta_keymap) + return (FUNCTION_TO_KEYMAP (emacs_std_cmd_xmap, ESC)); + else if (kmap == emacs_ctlx_keymap) + return (FUNCTION_TO_KEYMAP (emacs_std_cmd_xmap, CTRL('X'))); +#if defined (VI_MODE) + else if (kmap == vi_insertion_keymap) + return vi_insert_cmd_xmap; + else if (kmap == vi_movement_keymap) + return vi_movement_cmd_xmap; +#endif + else + return (Keymap)NULL; } static int @@ -3596,13 +4689,10 @@ int bind_keyseq_to_unix_command (line) char *line; { - Keymap kmap; + Keymap kmap, cmd_xmap; 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 @@ -3620,26 +4710,47 @@ bind_keyseq_to_unix_command (line) if (line[i] != ':') { builtin_error (_("%s: missing colon separator"), line); + FREE (kseq); return -1; } i = isolate_sequence (line, i + 1, 0, &kstart); if (i < 0) - return -1; + { + FREE (kseq); + 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 */ + cmd_xmap = get_cmd_xmap_from_keymap (kmap); 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); - + + free (kseq); return 0; } +int +unbind_unix_command (kseq) + char *kseq; +{ + Keymap cmd_xmap; + + cmd_xmap = get_cmd_xmap_from_keymap (rl_get_keymap ()); + if (rl_bind_keyseq_in_map (kseq, (rl_command_func_t *)NULL, cmd_xmap) != 0) + { + builtin_error (_("`%s': cannot unbind in command keymap"), kseq); + return 0; + } + return 1; +} + /* 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. */ @@ -3652,16 +4763,23 @@ bash_directory_completion_matches (text) int qc; qc = rl_dispatching ? rl_completion_quote_character : 0; - dfn = bash_dequote_filename ((char *)text, qc); + /* If rl_completion_found_quote != 0, rl_completion_matches will call the + filename dequoting function, causing the directory name to be dequoted + twice. */ + if (rl_dispatching && rl_completion_found_quote == 0) + dfn = bash_dequote_filename ((char *)text, qc); + else + dfn = (char *)text; m1 = rl_completion_matches (dfn, rl_filename_completion_function); - free (dfn); + if (dfn != text) + 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); + (void)bash_progcomp_ignore_filenames (m1); return m1; } @@ -3676,4 +4794,60 @@ bash_dequote_text (text) dtxt = bash_dequote_filename ((char *)text, qc); return (dtxt); } + +/* This event hook is designed to be called after readline receives a signal + that interrupts read(2). It gives reasonable responsiveness to interrupts + and fatal signals without executing too much code in a signal handler + context. */ +static int +bash_event_hook () +{ + int sig; + + /* XXX - see if we need to do anything here if sigterm_received == 1, + we probably don't want to reset the event hook since we will not be + jumping to the top level */ + if (sigterm_received) + { + /* RESET_SIGTERM; */ + return 0; + } + + sig = 0; + if (terminating_signal) + sig = terminating_signal; + else if (interrupt_state) + sig = SIGINT; + else if (read_timeout && read_timeout->alrmflag) + sig = SIGALRM; + else if (RL_ISSTATE (RL_STATE_TIMEOUT)) /* just in case */ + { + sig = SIGALRM; + if (read_timeout) + read_timeout->alrmflag = 1; + } + else + sig = first_pending_trap (); + + /* If we're going to longjmp to top_level, make sure we clean up readline. + check_signals will call QUIT, which will eventually longjmp to top_level, + calling run_interrupt_trap along the way. The check against read_timeout + is so we can clean up the read builtin's state. */ + if (terminating_signal || interrupt_state || (read_timeout && read_timeout->alrmflag)) + rl_cleanup_after_signal (); + bashline_reset_event_hook (); + + RL_UNSETSTATE (RL_STATE_TIMEOUT); /* XXX */ + + /* posix mode SIGINT during read -e. We only get here if SIGINT is trapped. */ + if (posixly_correct && this_shell_builtin == read_builtin && sig == SIGINT) + { + last_command_exit_value = 128|SIGINT; + throw_to_top_level (); + } + + check_signals_and_traps (); /* XXX */ + return 0; +} + #endif /* READLINE */ diff --git a/bashline.h b/bashline.h index 9daa8f9..d40228e 100644 --- a/bashline.h +++ b/bashline.h @@ -1,6 +1,6 @@ /* bashline.h -- interface to the bash readline functions in bashline.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -24,28 +24,46 @@ #include "stdc.h" extern int bash_readline_initialized; +extern int hostname_list_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 *)); +/* these are controlled via shopt */ +extern int perform_hostname_completion; +extern int no_empty_command_completion; +extern int force_fignore; +extern int dircomplete_spelling; +extern int dircomplete_expand; +extern int dircomplete_expand_relpath; +extern int complete_fullquote; -extern int bind_keyseq_to_unix_command __P((char *)); +extern void posix_readline_initialize PARAMS((int)); +extern void reset_completer_word_break_chars PARAMS((void)); +extern int enable_hostname_completion PARAMS((int)); +extern void initialize_readline PARAMS((void)); +extern void bashline_reset PARAMS((void)); +extern void bashline_reinitialize PARAMS((void)); +extern int bash_re_edit PARAMS((char *)); -extern char **bash_default_completion __P((const char *, int, int, int, int)); +extern void bashline_set_event_hook PARAMS((void)); +extern void bashline_reset_event_hook PARAMS((void)); + +extern int bind_keyseq_to_unix_command PARAMS((char *)); +extern int bash_execute_unix_command PARAMS((int, int)); +extern int print_unix_command_map PARAMS((void)); +extern int unbind_unix_command PARAMS((char *)); + +extern char **bash_default_completion PARAMS((const char *, int, int, int, int)); + +extern void set_directory_hook PARAMS((void)); /* 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 *command_word_completion_function PARAMS((const char *, int)); +extern char *bash_groupname_completion_function PARAMS((const char *, int)); +extern char *bash_servicename_completion_function PARAMS((const char *, int)); -extern char **get_hostname_list __P((void)); -extern void clear_hostname_list __P((void)); +extern char **get_hostname_list PARAMS((void)); +extern void clear_hostname_list PARAMS((void)); -extern char **bash_directory_completion_matches __P((const char *)); -extern char *bash_dequote_text __P((const char *)); +extern char **bash_directory_completion_matches PARAMS((const char *)); +extern char *bash_dequote_text PARAMS((const char *)); #endif /* _BASHLINE_H_ */ diff --git a/bracecomp.c b/bracecomp.c index cb218a2..2ea8ba9 100644 --- a/bracecomp.c +++ b/bracecomp.c @@ -4,7 +4,7 @@ /* Original version by tromey@cns.caltech.edu, Fri Feb 7 1992. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -41,7 +41,7 @@ #include "shell.h" #include -static int _strcompare __P((char **, char **)); +static int _strcompare PARAMS((char **, char **)); /* Find greatest common prefix of two strings. */ static int @@ -75,8 +75,8 @@ really_munge_braces (array, real_start, real_end, gcd_zero) if (real_start == real_end) { - x = array[real_start] ? sh_backslash_quote (array[real_start] + gcd_zero) - : sh_backslash_quote (array[0]); + x = array[real_start] ? sh_backslash_quote (array[real_start] + gcd_zero, 0, 0) + : sh_backslash_quote (array[0], 0, 0); return x; } @@ -115,7 +115,7 @@ really_munge_braces (array, real_start, real_end, gcd_zero) if (start == end) { x = savestring (array[start] + gcd_zero); - subterm = sh_backslash_quote (x); + subterm = sh_backslash_quote (x, 0, 0); free (x); } else @@ -126,7 +126,7 @@ really_munge_braces (array, real_start, real_end, gcd_zero) x = (char *)xmalloc (tlen + 1); strncpy (x, array[start] + gcd_zero, tlen); x[tlen] = '\0'; - subterm = sh_backslash_quote (x); + subterm = sh_backslash_quote (x, 0, 0); free (x); result_size += strlen (subterm) + 1; result = (char *)xrealloc (result, result_size); diff --git a/braces.c b/braces.c index 45abe45..e91d326 100644 --- a/braces.c +++ b/braces.c @@ -1,6 +1,6 @@ /* braces.c -- code for doing word expansion in curly braces. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,21 +31,35 @@ # include #endif +#include + #include "bashansi.h" +#include "bashintl.h" #if defined (SHELL) # include "shell.h" +#else +# if defined (TEST) +typedef char *WORD_DESC; +typedef char **WORD_LIST; +#define _(X) X +# endif /* TEST */ #endif /* SHELL */ +#include "typemax.h" /* INTMAX_MIN, INTMAX_MAX */ #include "general.h" #include "shmbutil.h" #include "chartypes.h" +#ifndef errno +extern int errno; +#endif + #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))); +extern int asprintf PARAMS((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); /* Basic idea: @@ -59,12 +73,12 @@ extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ /* 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 **)); +#if defined (PARAMS) +static int brace_gobbler PARAMS((char *, size_t, int *, int)); +static char **expand_amble PARAMS((char *, size_t, int)); +static char **expand_seqterm PARAMS((char *, size_t)); +static char **mkseq PARAMS((intmax_t, intmax_t, intmax_t, int, int)); +static char **array_concat PARAMS((char **, char **)); #else static int brace_gobbler (); static char **expand_amble (); @@ -136,7 +150,8 @@ brace_expand (text) #endif /* !CSH_BRACE_COMPAT */ preamble = (char *)xmalloc (i + 1); - strncpy (preamble, text, i); + if (i > 0) + strncpy (preamble, text, i); preamble[i] = '\0'; result = (char **)xmalloc (2 * sizeof (char *)); @@ -171,6 +186,7 @@ brace_expand (text) if (text[j] == brace_arg_separator) { /* { */ strvec_dispose (result); + set_exit_status (EXECUTION_FAILURE); report_error ("no closing `%c' in %s", '}', text); throw_to_top_level (); } @@ -218,6 +234,19 @@ brace_expand (text) tack = expand_seqterm (amble, alen); if (tack) goto add_tack; + else if (text[i + 1]) + { + /* If the sequence expansion fails (e.g., because the integers + overflow), but there is more in the string, try and process + the rest of the string, which may contain additional brace + expansions. Treat the unexpanded sequence term as a simple + string (including the braces). */ + tack = strvec_create (2); + tack[0] = savestring (text+start-1); + tack[0][i-start+2] = '\0'; + tack[1] = (char *)0; + goto add_tack; + } else { free (amble); @@ -232,13 +261,18 @@ brace_expand (text) add_tack: result = array_concat (result, tack); free (amble); - strvec_dispose (tack); + if (tack != result) + strvec_dispose (tack); postamble = text + i + 1; - tack = brace_expand (postamble); - result = array_concat (result, tack); - strvec_dispose (tack); + if (postamble && *postamble) + { + tack = brace_expand (postamble); + result = array_concat (result, tack); + if (tack != result) + strvec_dispose (tack); + } return (result); } @@ -253,11 +287,13 @@ expand_amble (text, tlen, flags) size_t tlen; int flags; { - char **result, **partial; + char **result, **partial, **tresult; char *tem; int start, i, c; +#if defined (SHELL) DECLARE_MBSTATE; +#endif result = (char **)NULL; @@ -271,7 +307,7 @@ expand_amble (text, tlen, flags) #else tem = (char *)xmalloc (1 + (i - start)); strncpy (tem, &text[start], (i - start)); - tem[i- start] = '\0'; + tem[i - start] = '\0'; #endif partial = brace_expand (tem); @@ -285,7 +321,18 @@ expand_amble (text, tlen, flags) lr = strvec_len (result); lp = strvec_len (partial); - result = strvec_resize (result, lp + lr + 1); + tresult = strvec_mresize (result, lp + lr + 1); + if (tresult == 0) + { + internal_error (_("brace expansion: cannot allocate memory for %s"), tem); + free (tem); + strvec_dispose (partial); + strvec_dispose (result); + result = (char **)NULL; + return result; + } + else + result = tresult; for (j = 0; j < lp; j++) result[lr + j] = partial[j]; @@ -294,7 +341,11 @@ expand_amble (text, tlen, flags) free (partial); } free (tem); +#if defined (SHELL) ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif start = i; } return (result); @@ -307,21 +358,54 @@ expand_amble (text, tlen, flags) static char ** mkseq (start, end, incr, type, width) - int start, end, incr, type, width; + intmax_t start, end, incr; + int type, width; { - int n, i; + intmax_t n, prevn; + int i, nelem; 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; + { + if (incr == INTMAX_MIN) /* Don't use -INTMAX_MIN */ + return ((char **)NULL); + incr = -incr; + } + + /* Check that end-start will not overflow INTMAX_MIN, INTMAX_MAX. The +3 + and -2, not strictly necessary, are there because of the way the number + of elements and value passed to strvec_create() are calculated below. */ + if (SUBOVERFLOW (end, start, INTMAX_MIN+3, INTMAX_MAX-2)) + return ((char **)NULL); + + prevn = sh_imaxabs (end - start); + /* Need to check this way in case INT_MAX == INTMAX_MAX */ + if (INT_MAX == INTMAX_MAX && (ADDOVERFLOW (prevn, 2, INT_MIN, INT_MAX))) + return ((char **)NULL); + /* Make sure the assignment to nelem below doesn't end up <= 0 due to + intmax_t overflow */ + else if (ADDOVERFLOW ((prevn/sh_imaxabs(incr)), 1, INTMAX_MIN, INTMAX_MAX)) + return ((char **)NULL); + + /* XXX - TOFIX: potentially allocating a lot of extra memory if + imaxabs(incr) != 1 */ + /* Instead of a simple nelem = prevn + 1, something like: + nelem = (prevn / imaxabs(incr)) + 1; + would work */ + if ((prevn / sh_imaxabs (incr)) > INT_MAX - 3) /* check int overflow */ + return ((char **)NULL); + nelem = (prevn / sh_imaxabs(incr)) + 1; + result = strvec_mcreate (nelem + 1); + if (result == 0) + { + internal_error (_("brace expansion: failed to allocate memory for %u elements"), (unsigned int)nelem); + return ((char **)NULL); + } /* Make sure we go through the loop at least once, so {3..3} prints `3' */ i = 0; @@ -329,24 +413,52 @@ mkseq (start, end, incr, type, width) do { #if defined (SHELL) - QUIT; /* XXX - memory leak here */ + if (ISINTERRUPT) + { + result[i] = (char *)NULL; + strvec_dispose (result); + result = (char **)NULL; + } + QUIT; #endif if (type == ST_INT) - result[i++] = itos (n); + result[i++] = t = itos (n); else if (type == ST_ZINT) { - int len; - len = asprintf (&t, "%0*d", width, n); + int len, arg; + arg = n; + len = asprintf (&t, "%0*d", width, arg); result[i++] = t; } else { - t = (char *)xmalloc (2); - t[0] = n; - t[1] = '\0'; + if (t = (char *)malloc (2)) + { + t[0] = n; + t[1] = '\0'; + } result[i++] = t; } + + /* We failed to allocate memory for this number, so we bail. */ + if (t == 0) + { + char *p, lbuf[INT_STRLEN_BOUND(intmax_t) + 1]; + + /* Easier to do this than mess around with various intmax_t printf + formats (%ld? %lld? %jd?) and PRIdMAX. */ + p = inttostr (n, lbuf, sizeof (lbuf)); + internal_error (_("brace expansion: failed to allocate memory for `%s'"), p); + strvec_dispose (result); + return ((char **)NULL); + } + + /* Handle overflow and underflow of n+incr */ + if (ADDOVERFLOW (n, incr, INTMAX_MIN, INTMAX_MAX)) + break; + n += incr; + if ((incr < 0 && n < end) || (incr > 0 && n > end)) break; } @@ -362,7 +474,8 @@ expand_seqterm (text, tlen) size_t tlen; { char *t, *lhs, *rhs; - int i, lhs_t, rhs_t, lhs_v, rhs_v, incr, lhs_l, rhs_l, width; + int lhs_t, rhs_t, lhs_l, rhs_l, width; + intmax_t lhs_v, rhs_v, incr; intmax_t tl, tr; char **result, *ep, *oep; @@ -392,8 +505,9 @@ expand_seqterm (text, tlen) if (ISDIGIT (rhs[0]) || ((rhs[0] == '+' || rhs[0] == '-') && ISDIGIT (rhs[1]))) { rhs_t = ST_INT; + errno = 0; tr = strtoimax (rhs, &ep, 10); - if (ep && *ep != 0 && *ep != '.') + if (errno == ERANGE || (ep && *ep != 0 && *ep != '.')) rhs_t = ST_BAD; /* invalid */ } else if (ISALPHA (rhs[0]) && (rhs[1] == 0 || rhs[1] == '.')) @@ -411,10 +525,11 @@ expand_seqterm (text, tlen) if (rhs_t != ST_BAD) { oep = ep; + errno = 0; if (ep && *ep == '.' && ep[1] == '.' && ep[2]) incr = strtoimax (ep + 2, &ep, 10); - if (*ep != 0) - rhs_t = ST_BAD; /* invalid incr */ + if (*ep != 0 || errno == ERANGE) + rhs_t = ST_BAD; /* invalid incr or overflow */ tlen -= ep - oep; } @@ -502,7 +617,11 @@ brace_gobbler (text, tlen, indx, satisfy) if (pass_next) { pass_next = 0; +#if defined (SHELL) ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif continue; } @@ -531,7 +650,16 @@ brace_gobbler (text, tlen, indx, satisfy) { if (c == quoted) quoted = 0; +#if defined (SHELL) + /* The shell allows quoted command substitutions */ + if (quoted == '"' && c == '$' && text[i+1] == '(') /*)*/ + goto comsub; +#endif +#if defined (SHELL) ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif continue; } @@ -546,6 +674,7 @@ brace_gobbler (text, tlen, indx, satisfy) /* Pass new-style command and process substitutions through unchanged. */ if ((c == '$' || c == '<' || c == '>') && text[i+1] == '(') /* ) */ { +comsub: si = i + 2; t = extract_command_subst (text, &si, 0); i = si; @@ -583,7 +712,11 @@ brace_gobbler (text, tlen, indx, satisfy) commas++; #endif +#if defined (SHELL) ADVANCE_CHAR (text, tlen, i); +#else + i++; +#endif } *indx = i; @@ -603,15 +736,29 @@ array_concat (arr1, arr2) register char **result; if (arr1 == 0) - return (strvec_copy (arr2)); + return (arr2); /* XXX - see if we can get away without copying? */ if (arr2 == 0) - return (strvec_copy (arr1)); + return (arr1); /* XXX - caller expects us to free arr1 */ + + /* We can only short-circuit if the array consists of a single null element; + otherwise we need to replicate the contents of the other array and + prefix (or append, below) an empty element to each one. */ + if (arr1[0] && arr1[0][0] == 0 && arr1[1] == 0) + { + strvec_dispose (arr1); + return (arr2); /* XXX - use flags to see if we can avoid copying here */ + } + + if (arr2[0] && arr2[0][0] == 0 && arr2[1] == 0) + return (arr1); /* XXX - rather than copying and freeing it */ len1 = strvec_len (arr1); len2 = strvec_len (arr2); - result = (char **)xmalloc ((1 + (len1 * len2)) * sizeof (char *)); + result = (char **)malloc ((1 + (len1 * len2)) * sizeof (char *)); + if (result == 0) + return (result); len = 0; for (i = 0; i < len1; i++) @@ -636,20 +783,29 @@ array_concat (arr1, arr2) #if defined (TEST) #include -fatal_error (format, arg1, arg2) - char *format, *arg1, *arg2; +void * +xmalloc(n) + size_t n; { - report_error (format, arg1, arg2); - exit (1); + return (malloc (n)); } -report_error (format, arg1, arg2) +void * +xrealloc(p, n) + void *p; + size_t n; +{ + return (realloc (p, n)); +} + +int +internal_error (format, arg1, arg2) char *format, *arg1, *arg2; { fprintf (stderr, format, arg1, arg2); fprintf (stderr, "\n"); } - + main () { char example[256]; @@ -673,7 +829,7 @@ main () for (i = 0; result[i]; i++) printf ("%s\n", result[i]); - free_array (result); + strvec_dispose (result); } } diff --git a/builtins.h b/builtins.h index 8f7b461..0156593 100644 --- a/builtins.h +++ b/builtins.h @@ -1,6 +1,6 @@ /* builtins.h -- What a builtin looks like, and where to find them. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -18,6 +18,9 @@ along with Bash. If not, see . */ +#ifndef BUILTINS_H +#define BUILTINS_H + #include "config.h" #if defined (HAVE_UNISTD_H) @@ -41,6 +44,8 @@ #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 LOCALVAR_BUILTIN 0x40 /* This builtin creates local variables */ +#define ARRAYREF_BUILTIN 0x80 /* This builtin takes array references as arguments */ #define BASE_INDENT 4 @@ -50,7 +55,7 @@ struct builtin { 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. */ + const char *short_doc; /* Short version of documentation. */ char *handle; /* for future use */ }; @@ -59,3 +64,5 @@ 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; + +#endif /* BUILTINS_H */ diff --git a/builtins/Makefile.in b/builtins/Makefile.in index 42f8cb8..642878c 100644 --- a/builtins/Makefile.in +++ b/builtins/Makefile.in @@ -1,6 +1,6 @@ # This Makefile for building libbuiltins.a is in -*- text -*- for Emacs. # -# Copyright (C) 1996-2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2022 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 @@ -36,7 +36,7 @@ EXEEXT = @EXEEXT@ prefix = @prefix@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ topdir = @top_srcdir@ datarootdir = @datarootdir@ @@ -45,6 +45,8 @@ includedir = @includedir@ datadir = @datadir@ localedir = @localedir@ +loadablesdir = @loadablesdir@ + # Support an alternate destination root directory for package building DESTDIR = @@ -57,6 +59,7 @@ LIBBUILD = ${BUILD_DIR}/lib PROFILE_FLAGS = @PROFILE_FLAGS@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@ +STYLE_CFLAGS = @STYLE_CFLAGS@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} @@ -67,8 +70,8 @@ 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) +LIBS_FOR_BUILD = @LIBS_FOR_BUILD@ +#LIBS_FOR_BUILD = $(LIBS) BASHINCDIR = ${topdir}/include @@ -85,12 +88,14 @@ LIBINTL_H = @LIBINTL_H@ HELPDIR = @HELPDIR@ MKDIRS = ${topdir}/support/mkdirs +HELPFILES_TARGET = @HELPFILES_TARGET@ + 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) + ${INCLUDES} $(STYLE_CFLAGS) $(LOCAL_CFLAGS) -CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) +CCFLAGS = ${ADDON_CFLAGS} $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) @@ -153,35 +158,55 @@ OFILES = builtins.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 +CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h tmpbuiltins.c \ + tmpbuiltins.h +CREATED_OBJECTS = tmpbuiltins.o gen-helpfiles.o mkbuiltins.o -all: $(MKBUILTINS) libbuiltins.a +all: $(MKBUILTINS) libbuiltins.a $(HELPFILES_TARGET) +targets: libbuiltins.a $(HELPFILES_TARGET) libbuiltins.a: $(MKBUILTINS) $(OFILES) builtins.o $(RM) $@ $(AR) $(ARFLAGS) $@ $(OFILES) -$(RANLIB) $@ +tmpbuiltins.c: $(MKBUILTINS) $(DEFSRC) + ./$(MKBUILTINS) -externfile tmpbuiltins.h -structfile $@ \ + -noproduction -nofunctions \ + $(DIRECTDEFINE) $(HELPSTRINGS) $(DEFSRC) + +tmpbuiltins.h: tmpbuiltins.c + +gen-helpfiles.o: ../config.h +gen-helpfiles.o: gen-helpfiles.c + $(RM) $@ + $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $< + +gen-helpfiles: tmpbuiltins.o gen-helpfiles.o + $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ gen-helpfiles.o tmpbuiltins.o $(LIBS_FOR_BUILD) + 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: + @RECPID=$$$$ ; \ + NEW_BUILTEXT=builtext-$$RECPID.h NEW_BUILTINS=builtins-$$RECPID.c ; \ + ./$(MKBUILTINS) -externfile $$NEW_BUILTEXT \ + -includefile builtext.h \ + -structfile $$NEW_BUILTINS \ + -noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(HELPSTRINGS) $(DEFSRC) ; \ + if cmp -s $$NEW_BUILTEXT builtext.h 2>/dev/null; then \ + $(RM) $$NEW_BUILTEXT; \ + else \ + mv $$NEW_BUILTEXT builtext.h; \ + fi ; \ + if cmp -s $$NEW_BUILTINS builtins.c 2>/dev/null; then \ + $(RM) $$NEW_BUILTINS ; \ + else \ + mv $$NEW_BUILTINS builtins.c; \ + fi + +helpdoc: gen-helpfiles + ./gen-helpfiles ${HELPDIRDEFINE} + +install-help: $(HELPFILES_TARGET) @-if test -n "${HELPDIR}" && test -d helpfiles ; then \ test -d $(DESTDIR)${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\ ( for f in helpfiles/*; do \ @@ -207,15 +232,20 @@ common.o: common.c bashgetopt.o: bashgetopt.c getopt.o: getopt.c evalstring.o: evalstring.c -evalfile.o: evalfile.c +evalfile.o: evalfile.c + +tmpbuiltins.o: tmpbuiltins.c +gen-helpfiles.o: gen-helpfiles.c ulimit.o: pipesize.h pipesize.h: psize.aux $(SHELL) $(srcdir)/psize.sh > $@ +# Technically this is wrong; the pipe size should be for the target system, +# not the build host. psize.aux: psize.c - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(srcdir)/psize.c + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(srcdir)/psize.c documentation: builtins.texi @@ -223,7 +253,8 @@ builtins.texi: $(MKBUILTINS) ./$(MKBUILTINS) -documentonly $(DEFSRC) clean: - $(RM) $(OFILES) $(CREATED_FILES) $(MKBUILTINS) mkbuiltins.o libbuiltins.a + $(RM) $(OFILES) $(CREATED_FILES) libbuiltins.a + $(RM) $(MKBUILTINS) gen-helpfiles $(CREATED_OBJECTS) -test -d helpfiles && $(RM) -r helpfiles mostlyclean: @@ -303,7 +334,7 @@ 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)/sig.h $(topdir)/command.h $(topdir)/parser.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 @@ -319,7 +350,7 @@ evalfile.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir 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: ../pathnames.h $(topdir)/externs.h $(topdir)/parser.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 @@ -333,7 +364,8 @@ 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 +evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h ./builtext.h +#evalstring.o: $(topdir)/y.tab.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 @@ -348,31 +380,30 @@ 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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 +break.o: ../pathnames.h $(topdir)/execute_cmd.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)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.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 +builtin.o: $(srcdir)/bashgetopt.h ../pathnames.h $(topdir)/execute_cmd.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)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.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 @@ -381,41 +412,50 @@ cd.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose 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 +cd.o: $(topdir)/sig.h +colon.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h +colon.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h +colon.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h +colon.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h +colon.o: $(BASHINCDIR)/maxpath.h ../pathnames.h +colon.o: $(srcdir)/common.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)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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: $(topdir)/arrayfunc.h $(srcdir)/bashgetopt.h $(topdir)/flags.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 +echo.o: $(srcdir)/common.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)/subst.h $(topdir)/externs.h $(topdir)/sig.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)/subst.h $(topdir)/externs.h $(topdir)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 @@ -423,16 +463,17 @@ 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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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: $(topdir)/execute_cmd.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)/bashhist.h $(topdir)/parser.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 @@ -440,33 +481,37 @@ 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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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)/execute_cmd.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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: $(topdir)/execute_cmd.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)/findcmd.h $(topdir)/hashlib.h $(topdir)/sig.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: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +hash.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.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 +help.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +help.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h +help.o: ${srcdir}/common.h $(topdir)/sig.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: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h $(topdir)/parser.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 @@ -480,16 +525,16 @@ jobs.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(srcdir)/bashg 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 +jobs.o: $(topdir)/sig.h ../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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 @@ -500,11 +545,12 @@ 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: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.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)/subst.h $(topdir)/externs.h $(topdir)/sig.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 @@ -513,30 +559,33 @@ 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: $(BASHINCDIR)/shtty.h $(topdir)/sig.h +read.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +return.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.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 +set.o: $(BASHINCDIR)/maxpath.h $(topdir)/error.h $(topdir)/sig.h +set.o: $(topdir)/arrayfunc.h ../pathnames.h $(topdir)/parser.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)/externs.h $(topdir)/flags.h $(topdir)/sig.h +setattr.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h +setattr.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 @@ -546,53 +595,55 @@ 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 +shopt.o: $(topdir)/bashhist.h $(topdir)/bashline.h $(topdir)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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: $(topdir)/execute_cmd.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 +test.o: $(topdir)/execute_cmd.h $(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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.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)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.h type.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h +type.o: $(topdir)/execute_cmd.h $(topdir)/parser.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 @@ -601,19 +652,21 @@ 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: $(topdir)/jobs.h $(topdir)/sig.h $(topdir)/execute_cmd.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h complete.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -complete.o: ${topdir}/builtins.h +complete.o: ${topdir}/builtins.h ${topdir}/general.h +complete.o: ${topdir}/bashtypes.h ${BASHINCDIR}/chartypes.h ${topdir}/xmalloc.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)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.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 @@ -657,3 +710,14 @@ 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 + +cd.o: $(topdir)/config-top.h +command.o: $(topdir)/config-top.h +common.o: $(topdir)/config-top.h +declare.o: $(topdir)/config-top.h +break.o: $(topdir)/config-top.h +echo.o: $(topdir)/config-top.h +evalstring.o: $(topdir)/config-top.h +exit.o: $(topdir)/config-top.h +kill.o: $(topdir)/config-top.h +shopt.o: $(topdir)/config-top.h diff --git a/builtins/alias.def b/builtins/alias.def index d760ceb..0ab9069 100644 --- a/builtins/alias.def +++ b/builtins/alias.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -33,7 +33,7 @@ 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 + -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 @@ -63,9 +63,7 @@ $END /* Flags for print_alias */ #define AL_REUSABLE 0x01 -static void print_alias __P((alias_t *, int)); - -extern int posixly_correct; +static void print_alias PARAMS((alias_t *, int)); /* Hack the alias command in a Korn shell way. */ int @@ -87,6 +85,7 @@ alias_builtin (list) pflag = 1; dflags |= AL_REUSABLE; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -160,7 +159,7 @@ $SHORT_DOC unalias [-a] name [name ...] Remove each NAME from the list of defined aliases. Options: - -a remove all alias definitions. + -a remove all alias definitions Return success unless a NAME is not an existing alias. $END @@ -183,6 +182,7 @@ unalias_builtin (list) case 'a': aflag = 1; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -232,7 +232,7 @@ print_alias (alias, flags) value = sh_single_quote (alias->value); if (flags & AL_REUSABLE) - printf ("alias "); + printf ("alias %s", (alias->name && alias->name[0] == '-') ? "-- " : ""); printf ("%s=%s\n", alias->name, value); free (value); diff --git a/builtins/bashgetopt.c b/builtins/bashgetopt.c index b1b7070..d40ffa2 100644 --- a/builtins/bashgetopt.c +++ b/builtins/bashgetopt.c @@ -1,6 +1,6 @@ /* bashgetopt.c -- `getopt' for use by the builtins. */ -/* Copyright (C) 1992-2002 Free Software Foundation, Inc. +/* Copyright (C) 1992-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,12 +31,15 @@ #include "../shell.h" #include "common.h" +#include "bashgetopt.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_optflags; int list_optopt; int list_opttype; @@ -60,6 +63,7 @@ char *opts; if (list == 0) { list_optarg = (char *)NULL; + list_optflags = 0; loptend = (WORD_LIST *)NULL; /* No non-option arguments */ return -1; } @@ -76,6 +80,10 @@ char *opts; lhead = (WORD_LIST *)NULL; loptend = lcurrent; return(-1); + } else if (ISHELP (lcurrent->word->word)) { + lhead = (WORD_LIST *)NULL; + loptend = lcurrent; + return (GETOPT_HELP); } else if (lcurrent->word->word[0] == '-' && lcurrent->word->word[1] == '-' && lcurrent->word->word[2] == 0) { @@ -96,6 +104,7 @@ char *opts; sp = 1; } list_optarg = NULL; + list_optflags = 0; if (lcurrent) loptend = lcurrent->next; return('?'); @@ -107,6 +116,7 @@ char *opts; /* We allow -l2 as equivalent to -l 2 */ if (lcurrent->word->word[sp+1]) { list_optarg = lcurrent->word->word + sp + 1; + list_optflags = 0; lcurrent = lcurrent->next; /* If the specifier is `;', don't set optarg if the next argument looks like another option. */ @@ -117,15 +127,18 @@ char *opts; #endif lcurrent = lcurrent->next; list_optarg = lcurrent->word->word; + list_optflags = lcurrent->word->flags; lcurrent = lcurrent->next; } else if (*cp == ';') { list_optarg = (char *)NULL; + list_optflags = 0; lcurrent = lcurrent->next; } else { /* lcurrent->next == NULL */ errstr[1] = c; sh_needarg (errstr); sp = 1; list_optarg = (char *)NULL; + list_optflags = 0; return('?'); } sp = 1; @@ -134,19 +147,24 @@ char *opts; if (lcurrent->word->word[sp+1]) { if (DIGIT(lcurrent->word->word[sp+1])) { list_optarg = lcurrent->word->word + sp + 1; + list_optflags = 0; lcurrent = lcurrent->next; - } else + } else { list_optarg = (char *)NULL; + list_optflags = 0; + } } else { if (lcurrent->next && legal_number(lcurrent->next->word->word, (intmax_t *)0)) { lcurrent = lcurrent->next; list_optarg = lcurrent->word->word; + list_optflags = lcurrent->word->flags; lcurrent = lcurrent->next; } else { errstr[1] = c; sh_neednumarg (errstr); sp = 1; list_optarg = (char *)NULL; + list_optflags = 0; return ('?'); } } @@ -158,6 +176,7 @@ char *opts; lcurrent = lcurrent->next; } list_optarg = (char *)NULL; + list_optflags = 0; } return(c); diff --git a/builtins/bashgetopt.h b/builtins/bashgetopt.h index f2aea26..79be343 100644 --- a/builtins/bashgetopt.h +++ b/builtins/bashgetopt.h @@ -1,6 +1,6 @@ /* bashgetopt.h -- extern declarations for stuff defined in bashgetopt.c. */ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,7 +25,11 @@ #include +#define GETOPT_EOF -1 +#define GETOPT_HELP -99 + extern char *list_optarg; +extern int list_optflags; extern int list_optopt; extern int list_opttype; @@ -33,7 +37,7 @@ 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)); +extern int internal_getopt PARAMS((WORD_LIST *, char *)); +extern void reset_internal_getopt PARAMS((void)); #endif /* !__BASH_GETOPT_H */ diff --git a/builtins/bind.def b/builtins/bind.def index d0c953b..53a65ac 100644 --- a/builtins/bind.def +++ b/builtins/bind.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,7 +25,7 @@ $PRODUCES bind.c $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] +$SHORT_DOC bind [-lpsvPSVX] [-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 @@ -54,6 +54,8 @@ Options: -f filename Read key bindings from FILENAME. -x keyseq:shell-command Cause SHELL-COMMAND to be executed when KEYSEQ is entered. + -X List key sequences bound with -x and associated commands + in a form that can be reused as input. Exit Status: bind returns 0 unless an unrecognized option is given or an error occurs. @@ -84,10 +86,9 @@ extern int errno; #include "bashgetopt.h" #include "common.h" -static int query_bindings __P((char *)); -static int unbind_command __P((char *)); - -extern int no_line_editing; +static int query_bindings PARAMS((char *)); +static int unbind_command PARAMS((char *)); +static int unbind_keyseq PARAMS((char *)); #define BIND_RETURN(x) do { return_code = x; goto bind_exit; } while (0) @@ -104,6 +105,7 @@ extern int no_line_editing; #define SSFLAG 0x0400 #define UFLAG 0x0800 #define XFLAG 0x1000 +#define XXFLAG 0x2000 int bind_builtin (list) @@ -112,7 +114,7 @@ bind_builtin (list) int return_code; Keymap kmap, saved_keymap; int flags, opt; - char *initfile, *map_name, *fun_name, *unbind_name, *remove_seq, *cmd_seq; + char *initfile, *map_name, *fun_name, *unbind_name, *remove_seq, *cmd_seq, *t; if (no_line_editing) { @@ -126,7 +128,7 @@ bind_builtin (list) kmap = saved_keymap = (Keymap) NULL; flags = 0; - initfile = map_name = fun_name = unbind_name = remove_seq = (char *)NULL; + initfile = map_name = fun_name = unbind_name = remove_seq = cmd_seq = (char *)NULL; return_code = EXECUTION_SUCCESS; if (bash_readline_initialized == 0) @@ -138,7 +140,7 @@ bind_builtin (list) rl_outstream = stdout; reset_internal_getopt (); - while ((opt = internal_getopt (list, "lvpVPsSf:q:u:m:r:x:")) != EOF) + while ((opt = internal_getopt (list, "lvpVPsSXf:q:u:m:r:x:")) != -1) { switch (opt) { @@ -187,6 +189,10 @@ bind_builtin (list) flags |= XFLAG; cmd_seq = list_optarg; break; + case 'X': + flags |= XXFLAG; + break; + case GETOPT_HELP: default: builtin_usage (); BIND_RETURN (EX_USAGE); @@ -201,7 +207,7 @@ bind_builtin (list) if ((flags & MFLAG) && map_name) { kmap = rl_get_keymap_by_name (map_name); - if (!kmap) + if (kmap == 0) { builtin_error (_("`%s': invalid keymap name"), map_name); BIND_RETURN (EXECUTION_FAILURE); @@ -242,7 +248,10 @@ bind_builtin (list) { if (rl_read_init_file (initfile) != 0) { - builtin_error (_("%s: cannot read: %s"), initfile, strerror (errno)); + t = printable_filename (initfile, 0); + builtin_error (_("%s: cannot read: %s"), t, strerror (errno)); + if (t != initfile) + free (t); BIND_RETURN (EXECUTION_FAILURE); } } @@ -255,20 +264,41 @@ bind_builtin (list) 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); - } + opt = unbind_keyseq (remove_seq); + BIND_RETURN (opt); } if (flags & XFLAG) return_code = bind_keyseq_to_unix_command (cmd_seq); + if (flags & XXFLAG) + return_code = print_unix_command_map (); + /* Process the rest of the arguments as binding specifications. */ while (list) { + int olen, nlen, d, i; + char **obindings, **nbindings; + + obindings = rl_invoking_keyseqs (bash_execute_unix_command); + olen = obindings ? strvec_len (obindings) : 0; + rl_parse_and_bind (list->word->word); + + nbindings = rl_invoking_keyseqs (bash_execute_unix_command); + nlen = nbindings ? strvec_len (nbindings) : 0; + + if (nlen < olen) /* fewer bind -x bindings */ + for (d = olen - nlen, i = 0; i < olen && d > 0; i++) + if (nlen == 0 || strvec_search (nbindings, obindings[i]) < 0) + { + unbind_unix_command (obindings[i]); + d--; + } + + strvec_dispose (obindings); + strvec_dispose (nbindings); + list = list->next; } @@ -278,6 +308,9 @@ bind_builtin (list) run_unwind_frame ("bind_builtin"); + if (return_code < 0) + return_code = EXECUTION_FAILURE; + return (sh_chkwrite (return_code)); } @@ -329,4 +362,44 @@ unbind_command (name) rl_unbind_function_in_map (function, rl_get_keymap ()); return EXECUTION_SUCCESS; } + +static int +unbind_keyseq (seq) + char *seq; +{ + char *kseq; + int kslen, type; + rl_command_func_t *f; + + kseq = (char *)xmalloc ((2 * strlen (seq)) + 1); + if (rl_translate_keyseq (seq, kseq, &kslen)) + { + free (kseq); + builtin_error (_("`%s': cannot unbind"), seq); + return EXECUTION_FAILURE; + } + if ((f = rl_function_of_keyseq_len (kseq, kslen, (Keymap)0, &type)) == 0) + { + free (kseq); + return (EXECUTION_SUCCESS); + } + if (type == ISKMAP) + f = ((Keymap) f)[ANYOTHERKEY].function; + + /* I wish this didn't have to translate the key sequence again, but readline + doesn't have a binding function that takes a translated key sequence as + an argument. */ + if (rl_bind_keyseq (seq, (rl_command_func_t *)NULL) != 0) + { + free (kseq); + builtin_error (_("`%s': cannot unbind"), seq); + return (EXECUTION_FAILURE); + } + + if (f == bash_execute_unix_command) + unbind_unix_command (seq); + + free (kseq); + return (EXECUTION_SUCCESS); +} #endif /* READLINE */ diff --git a/builtins/break.def b/builtins/break.def index 232ac1a..b73ed5e 100644 --- a/builtins/break.def +++ b/builtins/break.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -43,12 +43,10 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.h" #include "common.h" -extern char *this_command_name; -extern int posixly_correct; - -static int check_loop_level __P((void)); +static int check_loop_level PARAMS((void)); /* The depth of while's and until's. */ int loop_level = 0; @@ -67,6 +65,8 @@ break_builtin (list) { intmax_t newbreak; + CHECK_HELPOPT (list); + if (check_loop_level () == 0) return (EXECUTION_SUCCESS); @@ -107,6 +107,8 @@ continue_builtin (list) { intmax_t newcont; + CHECK_HELPOPT (list); + if (check_loop_level () == 0) return (EXECUTION_SUCCESS); diff --git a/builtins/builtin.def b/builtins/builtin.def index 3e765e4..74060ee 100644 --- a/builtins/builtin.def +++ b/builtins/builtin.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2017 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,7 +31,7 @@ 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.. +not a shell builtin. $END #include @@ -43,11 +43,10 @@ $END #endif #include "../shell.h" +#include "../execute_cmd.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 @@ -71,7 +70,7 @@ builtin_builtin (list) function = find_shell_builtin (command); #endif /* !DISABLED_BUILTINS */ - if (!function) + if (function == 0) { sh_notbuiltin (command); return (EXECUTION_FAILURE); @@ -79,6 +78,7 @@ builtin_builtin (list) else { this_command_name = command; + this_shell_builtin = function; /* overwrite "builtin" as this builtin */ list = list->next; return ((*function) (list)); } diff --git a/builtins/caller.def b/builtins/caller.def index 7ddbdad..1000979 100644 --- a/builtins/caller.def +++ b/builtins/caller.def @@ -2,6 +2,7 @@ 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. +Copyright (C) 2008-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -80,6 +81,8 @@ caller_builtin (list) char *funcname_s, *source_s, *lineno_s; intmax_t num; + CHECK_HELPOPT (list); + 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); @@ -121,7 +124,7 @@ caller_builtin (list) { sh_invalidnum (list->word->word); builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } return (EXECUTION_SUCCESS); @@ -132,8 +135,8 @@ caller_builtin (list) 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\ + 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\ diff --git a/builtins/cd.def b/builtins/cd.def index d53b258..b87c5d9 100644 --- a/builtins/cd.def +++ b/builtins/cd.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,9 +31,10 @@ $PRODUCES cd.c #include "../bashtypes.h" #include "posixdir.h" #include "posixstat.h" -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) #include #endif +#include #include @@ -53,27 +54,32 @@ $PRODUCES cd.c 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)); +static int bindpwd PARAMS((int)); +static int setpwd PARAMS((char *)); +static char *resetpwd PARAMS((char *)); +static int change_to_directory PARAMS((char *, int, int)); + +static int cdxattr PARAMS((char *, char **)); +static void resetxattr PARAMS((void)); /* Change this to 1 to get cd spelling correction by default. */ int cdspelling = 0; int cdable_vars; +static int eflag; /* file scope so bindpwd() can see it */ +static int xattrflag; /* O_XATTR support for openat */ +static int xattrfd = -1; + $BUILTIN cd $FUNCTION cd_builtin -$SHORT_DOC cd [-L|-P] [dir] +$SHORT_DOC cd [-L|[-P [-e]] [-@]] [dir] Change the shell working directory. Change the current directory to DIR. The default DIR is the value of the -HOME shell variable. +HOME shell variable. If DIR is "-", it is converted to $OLDPWD. The variable CDPATH defines the search path for the directory containing DIR. Alternative directory names in CDPATH are separated by a colon (:). @@ -85,18 +91,30 @@ 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 + -L force symbolic links to be followed: resolve symbolic + links in DIR after processing instances of `..' + -P use the physical directory structure without following + symbolic links: resolve symbolic links in DIR before + processing instances of `..' + -e if the -P option is supplied, and the current working + directory cannot be determined successfully, exit with + a non-zero status +#if defined (O_XATTR) + -@ on systems that support it, present a file with extended + attributes as a directory containing the file attributes +#endif The default is to follow symbolic links, as if `-L' were specified. +`..' is processed by removing the immediately previous pathname component +back to a slash or the beginning of DIR. Exit Status: -Returns 0 if the directory is changed; non-zero otherwise. +Returns 0 if the directory is changed, and if $PWD is set successfully when +-P is used; non-zero otherwise. $END /* Just set $PWD, don't change OLDPWD. Used by `pwd -P' in posix mode. */ -static void +static int setpwd (dirname) char *dirname; { @@ -105,11 +123,14 @@ setpwd (dirname) old_anm = array_needs_making; tvar = bind_variable ("PWD", dirname ? dirname : "", 0); - if (old_anm == 0 && array_needs_making && exported_p (tvar)) + if (tvar && readonly_p (tvar)) + return EXECUTION_FAILURE; + if (tvar && old_anm == 0 && array_needs_making && exported_p (tvar)) { update_export_env_inplace ("PWD=", 4, dirname ? dirname : ""); array_needs_making = 0; } + return EXECUTION_SUCCESS; } static int @@ -117,7 +138,7 @@ bindpwd (no_symlinks) int no_symlinks; { char *dirname, *pwdvar; - int old_anm, r; + int old_anm, r, canon_failed; SHELL_VAR *tvar; r = sh_chkwrite (EXECUTION_SUCCESS); @@ -127,17 +148,31 @@ bindpwd (no_symlinks) : get_working_directory ("cd"); #undef tcwd + /* If canonicalization fails, reset dirname to the_current_working_directory */ + canon_failed = 0; + if (dirname == 0) + { + canon_failed = 1; + dirname = the_current_working_directory; + } + old_anm = array_needs_making; pwdvar = get_string_value ("PWD"); tvar = bind_variable ("OLDPWD", pwdvar, 0); + if (tvar && readonly_p (tvar)) + r = EXECUTION_FAILURE; + if (old_anm == 0 && array_needs_making && exported_p (tvar)) { update_export_env_inplace ("OLDPWD=", 7, pwdvar); array_needs_making = 0; } - setpwd (dirname); + if (setpwd (dirname) == EXECUTION_FAILURE) + r = EXECUTION_FAILURE; + if (canon_failed && eflag) + r = EXECUTION_FAILURE; if (dirname && dirname != the_current_working_directory) free (dirname); @@ -159,10 +194,70 @@ resetpwd (caller) return (tdir); } +static int +cdxattr (dir, ndirp) + char *dir; /* don't assume we can always free DIR */ + char **ndirp; /* return new constructed directory name */ +{ +#if defined (O_XATTR) + int apfd, fd, r, e; + char buf[11+40+40]; /* construct new `fake' path for pwd */ + + apfd = openat (AT_FDCWD, dir, O_RDONLY|O_NONBLOCK); + if (apfd < 0) + return -1; + fd = openat (apfd, ".", O_XATTR); + e = errno; + close (apfd); /* ignore close error for now */ + errno = e; + if (fd < 0) + return -1; + r = fchdir (fd); /* assume fchdir exists everywhere with O_XATTR */ + if (r < 0) + { + close (fd); + return -1; + } + /* NFSv4 and ZFS extended attribute directories do not have names which are + visible in the standard Unix directory tree structure. To ensure we have + a valid name for $PWD, we synthesize one under /proc, but to keep that + path valid, we need to keep the file descriptor open as long as we are in + this directory. This imposes a certain structure on /proc. */ + if (ndirp) + { + sprintf (buf, "/proc/%d/fd/%d", getpid(), fd); + *ndirp = savestring (buf); + } + + if (xattrfd >= 0) + close (xattrfd); + xattrfd = fd; + + return r; +#else + return -1; +#endif +} + +/* Clean up the O_XATTR baggage. Currently only closes xattrfd */ +static void +resetxattr () +{ +#if defined (O_XATTR) + if (xattrfd >= 0) + { + close (xattrfd); + xattrfd = -1; + } +#else + xattrfd = -1; /* not strictly necessary */ +#endif +} + #define LCD_DOVARS 0x001 #define LCD_DOSPELL 0x002 #define LCD_PRINTPATH 0x004 -#define LCD_FREEDIRNAME 0x010 +#define LCD_FREEDIRNAME 0x008 /* This builtin is ultimately the way that all user-visible commands should change the current working directory. It is called by cd_to_string (), @@ -173,7 +268,7 @@ cd_builtin (list) WORD_LIST *list; { char *dirname, *cdpath, *path, *temp; - int path_index, no_symlinks, opt, lflag; + int path_index, no_symlinks, opt, lflag, e; #if defined (RESTRICTED_SHELL) if (restricted) @@ -183,9 +278,15 @@ cd_builtin (list) } #endif /* RESTRICTED_SHELL */ + eflag = 0; no_symlinks = no_symbolic_links; + xattrflag = 0; reset_internal_getopt (); - while ((opt = internal_getopt (list, "LP")) != -1) +#if defined (O_XATTR) + while ((opt = internal_getopt (list, "eLP@")) != -1) +#else + while ((opt = internal_getopt (list, "eLP")) != -1) +#endif { switch (opt) { @@ -195,15 +296,26 @@ cd_builtin (list) case 'L': no_symlinks = 0; break; + case 'e': + eflag = 1; + break; +#if defined (O_XATTR) + case '@': + xattrflag = 1; + break; +#endif + CASE_HELPOPT; default: builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } } list = loptend; lflag = (cdable_vars ? LCD_DOVARS : 0) | ((interactive && cdspelling) ? LCD_DOSPELL : 0); + if (eflag && no_symlinks == 0) + eflag = 0; if (list == 0) { @@ -217,6 +329,20 @@ cd_builtin (list) } lflag = 0; } +#if defined (CD_COMPLAINS) + else if (list->next) + { + builtin_error (_("too many arguments")); + return (EXECUTION_FAILURE); + } +#endif +#if 0 + else if (list->word->word[0] == '\0') + { + builtin_error (_("null directory")); + return (EXECUTION_FAILURE); + } +#endif else if (list->word->word[0] == '-' && list->word->word[1] == '\0') { /* This is `cd -', equivalent to `cd $OLDPWD' */ @@ -248,7 +374,7 @@ cd_builtin (list) temp = sh_makepath (path, dirname, MP_DOTILDE); free (path); - if (change_to_directory (temp, no_symlinks)) + if (change_to_directory (temp, no_symlinks, xattrflag)) { /* POSIX.2 says that if a nonempty directory from CDPATH is used to find the directory to change to, the new @@ -270,6 +396,8 @@ cd_builtin (list) free (temp); } +#if 0 + /* changed for bash-4.2 Posix cd description steps 5-6 */ /* 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] @@ -280,13 +408,14 @@ cd_builtin (list) builtin_error ("%s: %s", dirname, strerror (ENOENT)); return (EXECUTION_FAILURE); } +#endif } 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 (change_to_directory (dirname, no_symlinks, xattrflag)) { if (lflag & LCD_PRINTPATH) printf ("%s\n", dirname); @@ -299,7 +428,7 @@ cd_builtin (list) if (lflag & LCD_DOVARS) { temp = get_string_value (dirname); - if (temp && change_to_directory (temp, no_symlinks)) + if (temp && change_to_directory (temp, no_symlinks, xattrflag)) { printf ("%s\n", temp); return (bindpwd (no_symlinks)); @@ -312,16 +441,21 @@ cd_builtin (list) if (lflag & LCD_DOSPELL) { temp = dirspell (dirname); - if (temp && change_to_directory (temp, no_symlinks)) + if (temp && change_to_directory (temp, no_symlinks, xattrflag)) { printf ("%s\n", temp); + free (temp); return (bindpwd (no_symlinks)); } else FREE (temp); } - builtin_error ("%s: %s", dirname, strerror (errno)); + e = errno; + temp = printable_filename (dirname, 0); + builtin_error ("%s: %s", temp, strerror (e)); + if (temp != dirname) + free (temp); return (EXECUTION_FAILURE); } @@ -332,7 +466,7 @@ Print the name of the current working directory. Options: -L print the value of $PWD if it names the current working - directory + directory -P print the physical directory, without any symbolic links By default, `pwd' behaves as if `-L' were specified. @@ -367,9 +501,10 @@ pwd_builtin (list) case 'L': verbatim_pwd = 0; break; + CASE_HELPOPT; default: builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } } list = loptend; @@ -383,19 +518,24 @@ pwd_builtin (list) 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"); + { + if (directory && directory != tcwd) + free (directory); + directory = resetpwd ("pwd"); + } #undef tcwd if (directory) { + opt = EXECUTION_SUCCESS; printf ("%s\n", directory); /* This is dumb but posix-mandated. */ if (posixly_correct && pflag) - setpwd (directory); + opt = setpwd (directory); if (directory != the_current_working_directory) free (directory); - return (sh_chkwrite (EXECUTION_SUCCESS)); + return (sh_chkwrite (opt)); } else return (EXECUTION_FAILURE); @@ -408,12 +548,12 @@ pwd_builtin (list) to the working directory. Return 1 on success, 0 on failure. */ static int -change_to_directory (newdir, nolinks) +change_to_directory (newdir, nolinks, xattr) char *newdir; - int nolinks; + int nolinks, xattr; { - char *t, *tdir; - int err, canon_failed, r, ndlen, dlen; + char *t, *tdir, *ndir; + int err, canon_failed, r, ndlen; tdir = (char *)NULL; @@ -432,7 +572,6 @@ change_to_directory (newdir, nolinks) : 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. */ @@ -449,7 +588,11 @@ change_to_directory (newdir, nolinks) /* 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 defined (ENAMETOOLONG) if (posixly_correct && nolinks == 0 && canon_failed && (errno != ENAMETOOLONG || ndlen > PATH_MAX)) +#else + if (posixly_correct && nolinks == 0 && canon_failed && ndlen > PATH_MAX) +#endif { #if defined ENAMETOOLONG if (errno != ENOENT && errno != ENAMETOOLONG) @@ -461,8 +604,34 @@ change_to_directory (newdir, nolinks) return (0); } +#if defined (O_XATTR) + if (xattrflag) + { + r = cdxattr (nolinks ? newdir : tdir, &ndir); + if (r >= 0) + { + canon_failed = 0; + free (tdir); + tdir = ndir; + } + else + { + err = errno; + free (tdir); + errno = err; + return (0); /* no xattr */ + } + } + else +#endif + { + r = chdir (nolinks ? newdir : tdir); + if (r >= 0) + resetxattr (); + } + /* If the chdir succeeds, update the_current_working_directory. */ - if (chdir (nolinks ? newdir : tdir) == 0) + if (r == 0) { /* If canonicalization failed, but the chdir succeeded, reset the shell's idea of the_current_working_directory. */ @@ -471,6 +640,8 @@ change_to_directory (newdir, nolinks) t = resetpwd ("cd"); if (t == 0) set_working_directory (tdir); + else + free (t); } else set_working_directory (tdir); @@ -491,8 +662,9 @@ change_to_directory (newdir, nolinks) /* 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) + verbatim. If we succeed, reinitialize the_current_working_directory. + POSIX requires that we just fail here, so we do in posix mode. */ + if (posixly_correct == 0 && chdir (newdir) == 0) { t = resetpwd ("cd"); if (t == 0) diff --git a/builtins/colon.def b/builtins/colon.def index 4b78b30..6891b07 100644 --- a/builtins/colon.def +++ b/builtins/colon.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -50,10 +50,19 @@ Exit Status: Always fails. $END +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "../bashansi.h" +#include "../shell.h" + /* Return a successful result. */ int colon_builtin (ignore) - char *ignore; + WORD_LIST *ignore; { return (0); } @@ -61,7 +70,7 @@ colon_builtin (ignore) /* Return an unsuccessful result. */ int false_builtin (ignore) - char *ignore; + WORD_LIST *ignore; { return (1); } diff --git a/builtins/command.def b/builtins/command.def index 1845279..3efdbe6 100644 --- a/builtins/command.def +++ b/builtins/command.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,10 +30,10 @@ 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 + -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. @@ -57,14 +57,9 @@ $END #include "common.h" #if defined (_CS_PATH) && defined (HAVE_CONFSTR) && !HAVE_DECL_CONFSTR -extern size_t confstr __P((int, char *, size_t)); +extern size_t confstr PARAMS((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 @@ -72,7 +67,6 @@ 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; @@ -82,7 +76,7 @@ command_builtin (list) switch (opt) { case 'p': - use_standard_path = 1; + use_standard_path = CDESC_STDPATH; break; case 'V': verbose = CDESC_SHORTDESC|CDESC_ABSPATH; /* look in common.h for constants */ @@ -90,6 +84,7 @@ command_builtin (list) case 'v': verbose = CDESC_REUSABLE; /* ditto */ break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -108,30 +103,13 @@ command_builtin (list) } #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); + found = describe_command (list->word->word, verbose|use_standard_path); if (found == 0 && verbose != CDESC_REUSABLE) sh_notfound (list->word->word); @@ -139,11 +117,14 @@ command_builtin (list) 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) + begin_unwind_frame ("command_builtin"); + +#define COMMAND_BUILTIN_FLAGS (CMD_NO_FUNCTIONS | CMD_INHIBIT_EXPANSION | CMD_COMMAND_BUILTIN | (use_standard_path ? CMD_STDPATH : 0)) + + INTERNAL_DEBUG (("command_builtin: running execute_command for `%s'", list->word->word)); /* 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. */ @@ -152,18 +133,7 @@ command_builtin (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); @@ -171,49 +141,3 @@ command_builtin (list) 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 index f02e99c..19b00c4 100644 --- a/builtins/common.c +++ b/builtins/common.c @@ -1,6 +1,6 @@ /* common.c - utility functions for all builtins */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -49,6 +49,7 @@ #include "../shell.h" #include "maxpath.h" #include "../flags.h" +#include "../parser.h" #include "../jobs.h" #include "../builtins.h" #include "../input.h" @@ -67,12 +68,6 @@ 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. */ @@ -151,7 +146,7 @@ builtin_usage () { if (this_command_name && *this_command_name) fprintf (stderr, _("%s: usage: "), this_command_name); - fprintf (stderr, "%s\n", current_builtin->short_doc); + fprintf (stderr, "%s\n", _(current_builtin->short_doc)); fflush (stderr); } @@ -175,9 +170,16 @@ int no_options (list) WORD_LIST *list; { + int opt; + reset_internal_getopt (); - if (internal_getopt (list, "") != -1) + if ((opt = internal_getopt (list, "")) != -1) { + if (opt == GETOPT_HELP) + { + builtin_help (); + return (2); + } builtin_usage (); return (1); } @@ -234,7 +236,7 @@ sh_invalidnum (s) { char *msg; - if (*s == '0' && isdigit (s[1])) + if (*s == '0' && isdigit ((unsigned char)s[1])) msg = _("invalid octal number"); else if (*s == '0' && s[1] == 'x') msg = _("invalid hex number"); @@ -264,6 +266,13 @@ sh_readonly (s) builtin_error (_("%s: readonly variable"), s); } +void +sh_noassign (s) + const char *s; +{ + internal_error (_("%s: cannot assign"), s); /* XXX */ +} + void sh_erange (s, desc) char *s, *desc; @@ -335,7 +344,9 @@ int sh_chkwrite (s) int s; { + QUIT; fflush (stdout); + QUIT; if (ferror (stdout)) { sh_wrerror (); @@ -367,9 +378,10 @@ make_builtin_argv (list, ip) return argv; } -/* Remember LIST in $0 ... $9, and REST_OF_ARGS. If DESTRUCTIVE is +/* Remember LIST in $1 ... $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. */ + only discard the ones that are to be replaced. Set POSPARAM_COUNT + to the number of args assigned (length of LIST). */ void remember_args (list, destructive) WORD_LIST *list; @@ -377,6 +389,8 @@ remember_args (list, destructive) { register int i; + posparam_count = 0; + for (i = 1; i < 10; i++) { if ((destructive || list) && dollar_vars[i]) @@ -387,7 +401,7 @@ remember_args (list, destructive) if (list) { - dollar_vars[i] = savestring (list->word->word); + dollar_vars[posparam_count = i] = savestring (list->word->word); list = list->next; } } @@ -399,10 +413,65 @@ remember_args (list, destructive) { dispose_words (rest_of_args); rest_of_args = copy_word_list (list); + posparam_count += list_length (list); } if (destructive) set_dollar_vars_changed (); + + invalidate_cached_quoted_dollar_at (); +} + +void +shift_args (times) + int times; +{ + WORD_LIST *temp; + int count; + + if (times <= 0) /* caller should check */ + return; + + 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; + + posparam_count--; + } +} + +int +number_of_args () +{ +#if 0 + 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++; + +if (n != posparam_count) + itrace("number_of_args: n (%d) != posparam_count (%d)", n, posparam_count); +#else + return posparam_count; +#endif } static int changed_dollar_vars; @@ -494,13 +563,23 @@ get_exitstat (list) list = list->next; if (list == 0) - return (last_command_exit_value); + { + /* If we're not running the DEBUG trap, the return builtin, when not + given any arguments, uses the value of $? before the trap ran. If + given an argument, return uses it. This means that the trap can't + change $?. The DEBUG trap gets to change $?, though, since that is + part of its reason for existing, and because the extended debug mode + does things with the return value. */ + if (this_shell_builtin == return_builtin && running_trap > 0 && running_trap != DEBUG_TRAP+1) + return (trap_saved_exit_value); + 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; + return EX_BADUSAGE; } no_args (list->next); @@ -521,7 +600,7 @@ read_octal (string) { digits++; result = (result * 8) + (*string++ - '0'); - if (result > 0777) + if (result > 07777) return -1; } @@ -628,7 +707,7 @@ get_job_by_name (name, flags) if (this_shell_builtin) builtin_error (_("%s: ambiguous job spec"), name); else - report_error (_("%s: ambiguous job spec"), name); + internal_error (_("%s: ambiguous job spec"), name); return (DUP_JOB); } else @@ -662,7 +741,7 @@ get_job_spec (list) if (DIGIT (*word) && all_digits (word)) { job = atoi (word); - return (job > js.j_jobslots ? NO_JOB : job - 1); + return ((job < 0 || job > js.j_jobslots) ? NO_JOB : job - 1); } jflags = 0; @@ -760,13 +839,9 @@ display_signal_list (list, forcecols) 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 + printf ("%s\n", (this_shell_builtin == kill_builtin && signum > 0) ? name + 3 : name); } else { @@ -867,7 +942,7 @@ find_special_builtin (name) current_builtin->function : (sh_builtin_func_t *)NULL); } - + static int shell_builtin_compare (sbp1, sbp2) struct builtin *sbp1, *sbp2; @@ -888,3 +963,169 @@ initialize_shell_builtins () qsort (shell_builtins, num_shell_builtins, sizeof (struct builtin), (QSFUNC *)shell_builtin_compare); } + +#if !defined (HELP_BUILTIN) +void +builtin_help () +{ + printf ("%s: %s\n", this_command_name, _("help not available in this version")); +} +#endif + +/* **************************************************************** */ +/* */ +/* Variable assignments during builtin commands */ +/* */ +/* **************************************************************** */ + +/* Assign NAME=VALUE, passing FLAGS to the assignment functions. */ +SHELL_VAR * +builtin_bind_variable (name, value, flags) + char *name; + char *value; + int flags; +{ + SHELL_VAR *v; + int vflags, bindflags; + +#if defined (ARRAY_VARS) + /* Callers are responsible for calling this with array references that have + already undergone valid_array_reference checks (read, printf). */ + vflags = assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0; + bindflags = flags | (assoc_expand_once ? ASS_NOEXPAND : 0) | ASS_ALLOWALLSUB; + if (flags & ASS_NOEXPAND) + vflags |= VA_NOEXPAND; + if (flags & ASS_ONEWORD) + vflags |= VA_ONEWORD; + + if (valid_array_reference (name, vflags) == 0) + v = bind_variable (name, value, flags); + else + v = assign_array_element (name, value, bindflags, (array_eltstate_t *)0); +#else /* !ARRAY_VARS */ + v = bind_variable (name, value, flags); +#endif /* !ARRAY_VARS */ + + if (v && readonly_p (v) == 0 && noassign_p (v) == 0) + VUNSETATTR (v, att_invisible); + + return v; +} + +SHELL_VAR * +builtin_bind_var_to_int (name, val, flags) + char *name; + intmax_t val; + int flags; +{ + SHELL_VAR *v; + + v = bind_var_to_int (name, val, flags|ASS_ALLOWALLSUB); + return v; +} + +#if defined (ARRAY_VARS) +SHELL_VAR * +builtin_find_indexed_array (array_name, flags) + char *array_name; + int flags; +{ + SHELL_VAR *entry; + + if ((flags & 2) && legal_identifier (array_name) == 0) + { + sh_invalidid (array_name); + return (SHELL_VAR *)NULL; + } + + entry = find_or_make_array_variable (array_name, 1); + /* With flags argument & 1, find_or_make_array_variable checks for readonly + and noassign variables and prints error messages. */ + if (entry == 0) + return entry; + else if (array_p (entry) == 0) + { + builtin_error (_("%s: not an indexed array"), array_name); + return (SHELL_VAR *)NULL; + } + else if (invisible_p (entry)) + VUNSETATTR (entry, att_invisible); /* no longer invisible */ + + if (flags & 1) + array_flush (array_cell (entry)); + + return entry; +} +#endif /* ARRAY_VARS */ + +/* Like check_unbind_variable, but for use by builtins (only matters for + error messages). */ +int +builtin_unbind_variable (vname) + const char *vname; +{ + SHELL_VAR *v; + + v = find_variable (vname); + if (v && readonly_p (v)) + { + builtin_error (_("%s: cannot unset: readonly %s"), vname, "variable"); + return -2; + } + else if (v && non_unsettable_p (v)) + { + builtin_error (_("%s: cannot unset"), vname); + return -2; + } + return (unbind_variable (vname)); +} + +int +builtin_arrayref_flags (w, baseflags) + WORD_DESC *w; + int baseflags; +{ + char *t; + int vflags; + + vflags = baseflags; + + /* Don't require assoc_expand_once if we have an argument that's already + passed through valid_array_reference and been expanded once. That + doesn't protect it from normal expansions like word splitting, so + proper quoting is still required. */ + if (w->flags & W_ARRAYREF) + vflags |= VA_ONEWORD|VA_NOEXPAND; + +# if 0 + /* This is a little sketchier but handles quoted arguments. */ + if (assoc_expand_once && (t = strchr (w->word, '[')) && t[strlen(t) - 1] == ']') + vflags |= VA_ONEWORD|VA_NOEXPAND; +# endif + + return vflags; +} + +/* **************************************************************** */ +/* */ +/* External interface to manipulate shell options */ +/* */ +/* **************************************************************** */ + +#if defined (ARRAY_VARS) +int +set_expand_once (nval, uwp) + int nval, uwp; +{ + int oa; + + oa = assoc_expand_once; + if (shell_compatibility_level > 51) /* XXX - internal */ + { + if (uwp) + unwind_protect_int (assoc_expand_once); + assoc_expand_once = nval; + } + return oa; +} +#endif diff --git a/builtins/common.h b/builtins/common.h index 39ba687..a170f8f 100644 --- a/builtins/common.h +++ b/builtins/common.h @@ -1,6 +1,6 @@ /* common.h -- extern declarations for functions defined in common.c. */ -/* Copyright (C) 1993-2004 Free Software Foundation, Inc. +/* Copyright (C) 1993-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,9 +23,24 @@ #include "stdc.h" -#define ISOPTION(s, c) (s[0] == '-' && !s[2] && s[1] == c) +#define ISOPTION(s, c) (s[0] == '-' && s[1] == c && !s[2]) +#define ISHELP(s) (STREQ ((s), "--help")) -/* Flag values for parse_and_execute () */ +#define CHECK_HELPOPT(l) \ +do { \ + if ((l) && (l)->word && ISHELP((l)->word->word)) \ + { \ + builtin_help (); \ + return (EX_USAGE); \ + } \ +} while (0) + +#define CASE_HELPOPT \ + case GETOPT_HELP: \ + builtin_help (); \ + return (EX_USAGE) + +/* Flag values for parse_and_execute () and parse_string () */ #define SEVAL_NONINT 0x001 #define SEVAL_INTERACT 0x002 #define SEVAL_NOHIST 0x004 @@ -33,10 +48,12 @@ #define SEVAL_RESETLINE 0x010 #define SEVAL_PARSEONLY 0x020 #define SEVAL_NOLONGJMP 0x040 - -/* Flags for describe_command, shared between type.def and command.def */ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */ #define SEVAL_ONECMD 0x100 /* only allow a single command */ +#define SEVAL_NOHISTEXP 0x200 /* inhibit history expansion */ +#define SEVAL_NOOPTIMIZE 0x400 /* don't try to set optimization flags */ + +/* 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 */ @@ -45,6 +62,7 @@ #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 ./ */ +#define CDESC_STDPATH 0x100 /* command -p */ /* Flags for get_job_by_name */ #define JM_PREFIX 0x01 /* prefix of job name */ @@ -59,118 +77,213 @@ #define ARGS_FUNC 0x02 #define ARGS_SETBLTIN 0x04 +/* Maximum number of attribute letters */ +#define MAX_ATTRIBUTES 16 + /* 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 *)); +extern void builtin_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void builtin_warning PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void builtin_usage PARAMS((void)); +extern void no_args PARAMS((WORD_LIST *)); +extern int no_options PARAMS((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 *)); +extern void sh_needarg PARAMS((char *)); +extern void sh_neednumarg PARAMS((char *)); +extern void sh_notfound PARAMS((char *)); +extern void sh_invalidopt PARAMS((char *)); +extern void sh_invalidoptname PARAMS((char *)); +extern void sh_invalidid PARAMS((char *)); +extern void sh_invalidnum PARAMS((char *)); +extern void sh_invalidsig PARAMS((char *)); +extern void sh_readonly PARAMS((const char *)); +extern void sh_noassign PARAMS((const char *)); +extern void sh_erange PARAMS((char *, char *)); +extern void sh_badpid PARAMS((char *)); +extern void sh_badjob PARAMS((char *)); +extern void sh_nojobs PARAMS((char *)); +extern void sh_restricted PARAMS((char *)); +extern void sh_notbuiltin PARAMS((char *)); +extern void sh_wrerror PARAMS((void)); +extern void sh_ttyerror PARAMS((int)); +extern int sh_chkwrite PARAMS((int)); + +extern char **make_builtin_argv PARAMS((WORD_LIST *, int *)); +extern void remember_args PARAMS((WORD_LIST *, int)); +extern void shift_args PARAMS((int)); +extern int number_of_args PARAMS((void)); + +extern int dollar_vars_changed PARAMS((void)); +extern void set_dollar_vars_unchanged PARAMS((void)); +extern void set_dollar_vars_changed PARAMS((void)); + +extern int get_numeric_arg PARAMS((WORD_LIST *, int, intmax_t *)); +extern int get_exitstat PARAMS((WORD_LIST *)); +extern int read_octal PARAMS((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 *)); +extern char *get_working_directory PARAMS((char *)); +extern void set_working_directory PARAMS((char *)); #if defined (JOB_CONTROL) -extern int get_job_by_name __P((const char *, int)); -extern int get_job_spec __P((WORD_LIST *)); +extern int get_job_by_name PARAMS((const char *, int)); +extern int get_job_spec PARAMS((WORD_LIST *)); #endif -extern int display_signal_list __P((WORD_LIST *, int)); +extern int display_signal_list PARAMS((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)); +extern struct builtin *builtin_address_internal PARAMS((char *, int)); +extern sh_builtin_func_t *find_shell_builtin PARAMS((char *)); +extern sh_builtin_func_t *builtin_address PARAMS((char *)); +extern sh_builtin_func_t *find_special_builtin PARAMS((char *)); +extern void initialize_shell_builtins PARAMS((void)); + +#if defined (ARRAY_VARS) +extern int set_expand_once PARAMS((int, int)); +#endif /* Functions from exit.def */ -extern void bash_logout __P((void)); +extern void bash_logout PARAMS((void)); /* Functions from getopts.def */ -extern void getopts_reset __P((int)); +extern void getopts_reset PARAMS((int)); + +/* Functions from help.def */ +extern void builtin_help PARAMS((void)); + +/* Functions from read.def */ +extern void read_tty_cleanup PARAMS((void)); +extern int read_tty_modified PARAMS((void)); + +extern int read_builtin_timeout PARAMS((int)); +extern void check_read_timeout PARAMS((void)); /* 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 int minus_o_option_value PARAMS((char *)); +extern void list_minus_o_opts PARAMS((int, int)); +extern char **get_minus_o_opts PARAMS((void)); +extern int set_minus_o_option PARAMS((int, char *)); + +extern void set_shellopts PARAMS((void)); +extern void parse_shellopts PARAMS((char *)); +extern void initialize_shell_options PARAMS((int)); -extern void set_shellopts __P((void)); -extern void parse_shellopts __P((char *)); -extern void initialize_shell_options __P((int)); +extern void reset_shell_options PARAMS((void)); -extern void reset_shell_options __P((void)); +extern char *get_current_options PARAMS((void)); +extern void set_current_options PARAMS((const char *)); /* Functions from shopt.def */ -extern void reset_shopt_options __P((void)); -extern char **get_shopt_options __P((void)); +extern void reset_shopt_options PARAMS((void)); +extern char **get_shopt_options PARAMS((void)); + +extern int shopt_setopt PARAMS((char *, int)); +extern int shopt_listopt PARAMS((char *, int)); -extern int shopt_setopt __P((char *, int)); -extern int shopt_listopt __P((char *, int)); +extern int set_login_shell PARAMS((char *, int)); -extern int set_login_shell __P((char *, int)); +extern void set_bashopts PARAMS((void)); +extern void parse_bashopts PARAMS((char *)); +extern void initialize_bashopts PARAMS((int)); -extern void set_bashopts __P((void)); -extern void parse_bashopts __P((char *)); -extern void initialize_bashopts __P((int)); +extern void set_compatibility_opts PARAMS((void)); /* Functions from type.def */ -extern int describe_command __P((char *, int)); +extern int describe_command PARAMS((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)); +extern int set_or_show_attributes PARAMS((WORD_LIST *, int, int)); +extern int show_all_var_attributes PARAMS((int, int)); +extern int show_local_var_attributes PARAMS((int, int)); +extern int show_var_attributes PARAMS((SHELL_VAR *, int, int)); +extern int show_name_attributes PARAMS((char *, int)); +extern int show_localname_attributes PARAMS((char *, int)); +extern int show_func_attributes PARAMS((char *, int)); +extern void set_var_attribute PARAMS((char *, int, int)); +extern int var_attribute_string PARAMS((SHELL_VAR *, int, char *)); /* 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)); +extern char *get_dirstack_from_string PARAMS((char *)); +extern char *get_dirstack_element PARAMS((intmax_t, int)); +extern void set_dirstack_element PARAMS((intmax_t, int, char *)); +extern WORD_LIST *get_directory_stack PARAMS((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 **)); +extern int parse_and_execute PARAMS((char *, const char *, int)); +extern int evalstring PARAMS((char *, const char *, int)); +extern void parse_and_execute_cleanup PARAMS((int)); +extern int parse_string PARAMS((char *, const char *, int, COMMAND **, char **)); +extern int should_suppress_fork PARAMS((COMMAND *)); +extern int can_optimize_connection PARAMS((COMMAND *)); +extern int can_optimize_cat_file PARAMS((COMMAND *)); +extern void optimize_connection_fork PARAMS((COMMAND *)); +extern void optimize_subshell_command PARAMS((COMMAND *)); +extern void optimize_shell_function PARAMS((COMMAND *)); /* 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 *)); +extern int maybe_execute_file PARAMS((const char *, int)); +extern int force_execute_file PARAMS((const char *, int)); +extern int source_file PARAMS((const char *, int)); +extern int fc_execute_file PARAMS((const char *)); + +/* variables from common.c */ +extern sh_builtin_func_t *this_shell_builtin; +extern sh_builtin_func_t *last_shell_builtin; + +extern SHELL_VAR *builtin_bind_variable PARAMS((char *, char *, int)); +extern SHELL_VAR *builtin_bind_var_to_int PARAMS((char *, intmax_t, int)); +extern int builtin_unbind_variable PARAMS((const char *)); + +extern SHELL_VAR *builtin_find_indexed_array PARAMS((char *, int)); +extern int builtin_arrayref_flags PARAMS((WORD_DESC *, int)); + +/* variables from evalfile.c */ +extern int sourcelevel; + +/* variables from evalstring.c */ +extern int parse_and_execute_level; + +/* variables from break.def/continue.def */ +extern int breaking; +extern int continuing; +extern int loop_level; + +/* variables from shift.def */ +extern int print_shift_error; + +/* variables from shopt.def */ +#if defined (ARRAY_VARS) +extern int expand_once_flag; +#endif + +#if defined (EXTENDED_GLOB) +extern int extglob_flag; +#endif + +extern int expaliases_flag; + +/* variables from source.def */ +extern int source_searches_cwd; +extern int source_uses_path; + +/* variables from wait.def */ +extern int wait_intr_flag; + +/* common code to set flags for valid_array_reference and builtin_bind_variable */ +#if defined (ARRAY_VARS) +#define SET_VFLAGS(wordflags, vflags, bindflags) \ + do { \ + vflags = assoc_expand_once ? VA_NOEXPAND : 0; \ + bindflags = assoc_expand_once ? ASS_NOEXPAND : 0; \ + if (assoc_expand_once && (wordflags & W_ARRAYREF)) \ + vflags |= VA_ONEWORD|VA_NOEXPAND; \ + if (vflags & VA_NOEXPAND) \ + bindflags |= ASS_NOEXPAND; \ + if (vflags & VA_ONEWORD) \ + bindflags |= ASS_ONEWORD; \ + } while (0) +#endif #endif /* !__COMMON_H */ diff --git a/builtins/complete.def b/builtins/complete.def index 2267794..6d600ef 100644 --- a/builtins/complete.def +++ b/builtins/complete.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,7 +23,7 @@ $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 ...] +$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-DEI] [-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 @@ -33,15 +33,17 @@ 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 + NAMEs are supplied, all completion specifications -D apply the completions and actions as the default for commands - without any specific completion defined + without any specific completion defined -E apply the completions and actions to "empty" commands -- - completion attempted on a blank line + completion attempted on a blank line + -I apply the completions and actions to the initial (usually the + command) word 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. +uppercase-letter options are listed above. If multiple options are supplied, +the -D option takes precedence over -E, and both take precedence over -I. Exit Status: Returns success unless an invalid option is supplied or an error occurs. @@ -79,26 +81,32 @@ struct _optflags { int rflag; int Dflag; int Eflag; + int Iflag; }; -static int find_compact __P((char *)); -static int find_compopt __P((char *)); +static int find_compact PARAMS((char *)); +static int find_compopt PARAMS((char *)); -static int build_actions __P((WORD_LIST *, struct _optflags *, unsigned long *, unsigned long *)); +static int build_actions PARAMS((WORD_LIST *, struct _optflags *, unsigned long *, unsigned long *)); -static int remove_cmd_completions __P((WORD_LIST *)); +static int remove_cmd_completions PARAMS((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 int print_one_completion PARAMS((char *, COMPSPEC *)); +static int print_compitem PARAMS((BUCKET_CONTENTS *)); +static void print_compopts PARAMS((const char *, COMPSPEC *, int)); +static void print_all_completions PARAMS((void)); +static int print_cmd_completions PARAMS((WORD_LIST *)); + +static void print_compoptions PARAMS((unsigned long, int)); +static void print_compactions PARAMS((unsigned long)); +static void print_arg PARAMS((const char *, const char *, int)); +static void print_cmd_name PARAMS((const char *)); static char *Garg, *Warg, *Parg, *Sarg, *Xarg, *Farg, *Carg; static const struct _compacts { const char * const actname; - int actflag; + unsigned long actflag; int actopt; } compacts[] = { { "alias", CA_ALIAS, 'a' }, @@ -112,7 +120,7 @@ static const struct _compacts { { "export", CA_EXPORT, 'e' }, { "file", CA_FILE, 'f' }, { "function", CA_FUNCTION, 0 }, - { "helptopic", CA_BUILTIN, 0 }, /* for now */ + { "helptopic", CA_HELPTOPIC, 0 }, { "hostname", CA_HOSTNAME, 0 }, { "group", CA_GROUP, 'g' }, { "job", CA_JOB, 'j' }, @@ -129,14 +137,16 @@ static const struct _compacts { }; /* This should be a STRING_INT_ALIST */ -const static struct _compopt { +static const struct _compopt { const char * const optname; - int optflag; + unsigned long optflag; } compopts[] = { { "bashdefault", COPT_BASHDEFAULT }, { "default", COPT_DEFAULT }, { "dirnames", COPT_DIRNAMES }, { "filenames",COPT_FILENAMES}, + { "noquote", COPT_NOQUOTE }, + { "nosort", COPT_NOSORT }, { "nospace", COPT_NOSPACE }, { "plusdirs", COPT_PLUSDIRS }, { (char *)NULL, 0 }, @@ -169,7 +179,7 @@ find_compopt (name) /* 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 + bitmap 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 @@ -188,12 +198,13 @@ build_actions (list, flagp, actp, optp) { int opt, ind, opt_given; unsigned long acts, copts; + WORD_DESC w; 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) + while ((opt = internal_getopt (list, "abcdefgjko:prsuvA:G:W:P:S:X:F:C:DEI")) != -1) { opt_given = 1; switch (opt) @@ -305,8 +316,26 @@ build_actions (list, flagp, actp, optp) builtin_usage (); return (EX_USAGE); } + case 'I': + if (flagp) + { + flagp->Iflag = 1; + break; + } + else + { + sh_invalidopt ("-I"); + builtin_usage (); + return (EX_USAGE); + } case 'F': - Farg = list_optarg; + w.word = Farg = list_optarg; + w.flags = 0; + if (check_identifier (&w, posixly_correct) == 0 || strpbrk (Farg, shell_break_chars) != 0) + { + sh_invalidid (Farg); + return (EX_USAGE); + } break; case 'G': Garg = list_optarg; @@ -323,6 +352,7 @@ build_actions (list, flagp, actp, optp) case 'X': Xarg = list_optarg; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -352,7 +382,8 @@ complete_builtin (list) return (EXECUTION_SUCCESS); } - opt_given = oflags.pflag = oflags.rflag = oflags.Dflag = oflags.Eflag = 0; + opt_given = oflags.pflag = oflags.rflag = 0; + oflags.Dflag = oflags.Eflag = oflags.Iflag = 0; acts = copts = (unsigned long)0L; Garg = Warg = Parg = Sarg = Xarg = Farg = Carg = (char *)NULL; @@ -367,8 +398,14 @@ complete_builtin (list) 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); + if (oflags.Dflag) + wl = make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL); + else if (oflags.Eflag) + wl = make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL); + else if (oflags.Iflag) + wl = make_word_list (make_bare_word (INITIALWORD), (WORD_LIST *)NULL); + else + wl = (WORD_LIST *)NULL; /* -p overrides everything else */ if (oflags.pflag || (list == 0 && opt_given == 0)) @@ -453,118 +490,103 @@ remove_cmd_completions (list) 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 void +print_compoptions (copts, full) + unsigned long copts; + int full; +{ + const struct _compopt *co; + + for (co = compopts; co->optname; co++) + if (copts & co->optflag) + printf ("-o %s ", co->optname); + else if (full) + printf ("+o %s ", co->optname); +} + +static void +print_compactions (acts) + unsigned long acts; +{ + const struct _compacts *ca; + + /* simple flags first */ + for (ca = compacts; ca->actname; ca++) + if (ca->actopt && (acts & ca->actflag)) + printf ("-%c ", ca->actopt); + + /* then the rest of the actions */ + for (ca = compacts; ca->actname; ca++) + if (ca->actopt == 0 && (acts & ca->actflag)) + printf ("-A %s ", ca->actname); +} + +static void +print_arg (arg, flag, quote) + const char *arg, *flag; + int quote; +{ + char *x; + + if (arg) + { + x = quote ? sh_single_quote (arg) : (char *)arg; + printf ("%s %s ", flag, x); + if (x != arg) + free (x); + } +} + +static void +print_cmd_name (cmd) + const char *cmd; +{ + char *x; + + if (STREQ (cmd, DEFAULTCMD)) + printf ("-D"); + else if (STREQ (cmd, EMPTYCMD)) + printf ("-E"); + else if (STREQ (cmd, INITIALWORD)) + printf ("-I"); + else if (*cmd == 0) /* XXX - can this happen? */ + printf ("''"); + else if (sh_contains_shell_metas (cmd)) + { + x = sh_single_quote (cmd); + printf ("%s", x); + free (x); + } + else + printf ("%s", cmd); +} 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"); + print_compoptions (cs->options, 0); + print_compactions (cs->actions); /* 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"); + print_arg (cs->globpat, "-G", 1); + print_arg (cs->words, "-W", 1); + print_arg (cs->prefix, "-P", 1); + print_arg (cs->suffix, "-S", 1); + print_arg (cs->filterpat, "-X", 1); - SQPRINTARG (cs->command, "-C"); + print_arg (cs->command, "-C", 1); /* simple arguments that don't require quoting */ - PRINTARG (cs->funcname, "-F"); + print_arg (cs->funcname, "-F", sh_contains_shell_metas (cs->funcname) != 0); - if (STREQ (cmd, EMPTYCMD)) - printf ("-E\n"); - else if (STREQ (cmd, DEFAULTCMD)) - printf ("-D\n"); - else - printf ("%s\n", cmd); + print_cmd_name (cmd); + printf ("\n"); return (0); } @@ -575,36 +597,12 @@ print_compopts (cmd, cs, full) 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"); - } + print_compoptions (cs->options, full); + print_cmd_name (cmd); - if (STREQ (cmd, EMPTYCMD)) - printf ("-E\n"); - else if (STREQ (cmd, DEFAULTCMD)) - printf ("-D\n"); - else - printf ("%s\n", cmd); + printf ("\n"); } static int @@ -652,7 +650,7 @@ print_cmd_completions (list) $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] +$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 @@ -672,6 +670,8 @@ compgen_builtin (list) COMPSPEC *cs; STRINGLIST *sl; char *word, **matches; + char *old_line; + int old_ind; if (list == 0) return (EXECUTION_SUCCESS); @@ -712,7 +712,15 @@ compgen_builtin (list) cs->filterpat = STRDUP (Xarg); rval = EXECUTION_FAILURE; + + /* probably don't have to save these, just being safe */ + old_line = pcomp_line; + old_ind = pcomp_ind; + pcomp_line = (char *)NULL; + pcomp_ind = 0; sl = gen_compspec_completions (cs, "compgen", word, 0, 0, 0); + pcomp_line = old_line; + pcomp_ind = old_ind; /* If the compspec wants the bash default completions, temporarily turn off programmable completion and call the bash completion code. */ @@ -728,6 +736,7 @@ compgen_builtin (list) if ((sl == 0 || sl->list_len == 0) && (copts & COPT_DEFAULT)) { matches = rl_completion_matches (word, rl_filename_completion_function); + strlist_dispose (sl); sl = completions_to_stringlist (matches); strvec_dispose (matches); } @@ -749,17 +758,18 @@ compgen_builtin (list) $BUILTIN compopt $DEPENDS_ON PROGRAMMABLE_COMPLETION $FUNCTION compopt_builtin -$SHORT_DOC compopt [-o|+o option] [-DE] [name ...] +$SHORT_DOC compopt [-o|+o option] [-DEI] [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 currently being executed. If no OPTIONs are given, 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 + -I Change options for completion on the initial word Using `+o' instead of `-o' turns off the specified option. @@ -780,15 +790,15 @@ int compopt_builtin (list) WORD_LIST *list; { - int opts_on, opts_off, *opts, opt, oind, ret, Dflag, Eflag; + int opts_on, opts_off, *opts, opt, oind, ret, Dflag, Eflag, Iflag; WORD_LIST *l, *wl; COMPSPEC *cs; - opts_on = opts_off = Eflag = Dflag = 0; + opts_on = opts_off = Eflag = Dflag = Iflag = 0; ret = EXECUTION_SUCCESS; reset_internal_getopt (); - while ((opt = internal_getopt (list, "+o:DE")) != EOF) + while ((opt = internal_getopt (list, "+o:DEI")) != -1) { opts = (list_opttype == '-') ? &opts_on : &opts_off; @@ -809,6 +819,10 @@ compopt_builtin (list) case 'E': Eflag = 1; break; + case 'I': + Iflag = 1; + break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -816,8 +830,14 @@ compopt_builtin (list) } 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 (Dflag) + wl = make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL); + else if (Eflag) + wl = make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL); + else if (Iflag) + wl = make_word_list (make_bare_word (INITIALWORD), (WORD_LIST *)NULL); + else + wl = (WORD_LIST *)NULL; if (list == 0 && wl == 0) { @@ -865,5 +885,8 @@ compopt_builtin (list) pcomp_set_compspec_options (cs, opts_off, 0); } + if (wl) + dispose_words (wl); + return (ret); } diff --git a/builtins/declare.def b/builtins/declare.def index a0ce605..7a1b60c 100644 --- a/builtins/declare.def +++ b/builtins/declare.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,7 +22,7 @@ $PRODUCES declare.c $BUILTIN declare $FUNCTION declare_builtin -$SHORT_DOC declare [-aAfFilrtux] [-p] [name[=value] ...] +$SHORT_DOC declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...] Set variable values and attributes. Declare variables and give them attributes. If no NAMEs are given, @@ -31,17 +31,22 @@ 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) + source file when debugging) + -g create global variables when used in a shell function; otherwise + ignored + -I if creating a local variable, inherit the attributes and value + of a variable with the same name at a previous scope -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 + -l to convert the value of each NAME to lower case on assignment + -n make NAME a reference to the variable named by its value -r to make NAMEs readonly -t to make NAMEs have the `trace' attribute - -u to convert NAMEs to upper case on assignment + -u to convert the value of each NAME to upper case on assignment -x to make NAMEs export Using `+' instead of `-' turns off the given attribute. @@ -50,18 +55,19 @@ 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. +command. The `-g' option suppresses this behavior. Exit Status: -Returns success unless an invalid option is supplied or an error occurs. +Returns success unless an invalid option is supplied or a variable +assignment error occurs. $END $BUILTIN typeset $FUNCTION declare_builtin -$SHORT_DOC typeset [-aAfFilrtux] [-p] name[=value] ... +$SHORT_DOC typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...] Set variable values and attributes. -Obsolete. See `help declare'. +A synonym for `declare'. See `help declare'. $END #include @@ -79,14 +85,16 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../flags.h" #include "common.h" #include "builtext.h" #include "bashgetopt.h" -extern int array_needs_making; -extern int posixly_correct; +static SHELL_VAR *declare_find_variable PARAMS((const char *, int, int)); +static char *declare_build_newname PARAMS((char *, char *, int, char *, int)); +static char *declare_transform_name PARAMS((char *, int, int)); -static int declare_internal __P((register WORD_LIST *, int)); +static int declare_internal PARAMS((register WORD_LIST *, int)); /* Declare or change variable attributes. */ int @@ -108,13 +116,20 @@ 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. +Returns success unless an invalid option is supplied, a variable +assignment error occurs, or the shell is not executing a function. $END int local_builtin (list) register WORD_LIST *list; { + /* Catch a straight `local --help' before checking function context */ + if (list && list->word && STREQ (list->word->word, "--help")) + { + builtin_help (); + return (EX_USAGE); + } + if (variable_context) return (declare_internal (list, 1)); else @@ -125,11 +140,93 @@ local_builtin (list) } #if defined (ARRAY_VARS) -# define DECLARE_OPTS "+acfilprtuxAF" +# define DECLARE_OPTS "+acfgilnprtuxAFGI" #else -# define DECLARE_OPTS "+cfilprtuxF" +# define DECLARE_OPTS "+cfgilnprtuxFGI" #endif +static SHELL_VAR * +declare_find_variable (name, mkglobal, chklocal) + const char *name; + int mkglobal, chklocal; +{ + SHELL_VAR *var; + + if (mkglobal == 0) + return (find_variable (name)); + else if (chklocal) + { + var = find_variable (name); + if (var && local_p (var) && var->context == variable_context) + return var; + return (find_global_variable (name)); + } + else + return (find_global_variable (name)); +} + +/* Build a new string + NAME[SUBSCRIPT][[+]=VALUE] + from expanding a nameref into NAME */ +static char * +declare_build_newname (name, subscript_start, offset, value, aflags) + char *name, *subscript_start; + int offset; + char *value; + int aflags; +{ + size_t namelen, savelen; + char *ret; + + savelen = namelen = strlen (name); + if (subscript_start) + { + *subscript_start = '['; /* ] */ + namelen += strlen (subscript_start); + } + ret = xmalloc (namelen + 2 + strlen (value) + 1); + strcpy (ret, name); + if (subscript_start) + strcpy (ret + savelen, subscript_start); + if (offset) + { + if (aflags & ASS_APPEND) + ret[namelen++] = '+'; + ret[namelen++] = '='; + if (value && *value) + strcpy (ret + namelen, value); + else + ret[namelen] = '\0'; + } + + return (ret); +} + +static char * +declare_transform_name (name, flags_on, flags_off) + char *name; + int flags_on, flags_off; +{ + SHELL_VAR *var, *v; + char *newname; + + var = find_variable (name); + if (var == 0) + newname = nameref_transform_name (name, ASS_MKLOCAL); + else if ((flags_on & att_nameref) == 0 && (flags_off & att_nameref) == 0) + { + /* Ok, we're following namerefs here, so let's make sure that if + we followed one, it was at the same context (see below for + more details). */ + v = find_variable_last_nameref (name, 1); + newname = (v && v->context != variable_context) ? name : name_cell (var); + } + else + newname = name; /* dealing with nameref attribute */ + + return (newname); +} + /* The workhorse function. */ static int declare_internal (list, local_var) @@ -137,17 +234,22 @@ declare_internal (list, local_var) int local_var; { int flags_on, flags_off, *flags; - int any_failed, assign_error, pflag, nodefs, opt; + int any_failed, assign_error, pflag, nodefs, opt, onref, offref; + int mkglobal, chklocal, inherit_flag; char *t, *subscript_start; - SHELL_VAR *var; + SHELL_VAR *var, *refvar, *v; FUNCTION_DEF *shell_fn; flags_on = flags_off = any_failed = assign_error = pflag = nodefs = 0; + mkglobal = chklocal = inherit_flag = 0; + refvar = (SHELL_VAR *)NULL; reset_internal_getopt (); - while ((opt = internal_getopt (list, DECLARE_OPTS)) != EOF) + while ((opt = internal_getopt (list, DECLARE_OPTS)) != -1) { flags = list_opttype == '+' ? &flags_off : &flags_on; + /* If you add options here, see whether or not they need to be added to + the loop in subst.c:shell_expand_word_list() */ switch (opt) { case 'a': @@ -167,19 +269,29 @@ declare_internal (list, local_var) return (EX_USAGE); #endif case 'p': - if (local_var == 0) - pflag++; + pflag++; break; - case 'F': + case 'F': nodefs++; *flags |= att_function; break; case 'f': *flags |= att_function; break; + case 'G': + if (flags == &flags_on) + chklocal = 1; + /*FALLTHROUGH*/ + case 'g': + if (flags == &flags_on) + mkglobal = 1; + break; case 'i': *flags |= att_integer; break; + case 'n': + *flags |= att_nameref; + break; case 'r': *flags |= att_readonly; break; @@ -209,6 +321,10 @@ declare_internal (list, local_var) flags_off |= att_capcase|att_lowercase; break; #endif /* CASEMOD_ATTRS */ + case 'I': + inherit_flag = MKLOC_INHERIT; + break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -219,25 +335,12 @@ declare_internal (list, local_var) /* If there are no more arguments left, then we just want to show some variables. */ - if (list == 0) /* declare -[aAfFirtx] */ + if (list == 0) /* declare -[aAfFilnrtux] */ { /* 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); - } - } + show_local_var_attributes (0, nodefs); /* XXX - fix up args later */ else if (pflag && (flags_on == 0 || flags_on == att_function)) show_all_var_attributes (flags_on == 0, nodefs); else if (flags_on == 0) @@ -248,11 +351,16 @@ declare_internal (list, local_var) return (sh_chkwrite (EXECUTION_SUCCESS)); } - if (pflag) /* declare -p [-aAfFirtx] name [name...] */ + if (pflag) /* declare -p [-aAfFilnrtux] [name ...] */ { for (any_failed = 0; list; list = list->next) { - pflag = show_name_attributes (list->word->word, nodefs); + if (flags_on & att_function) + pflag = show_func_attributes (list->word->word, nodefs); + else if (local_var) + pflag = show_localname_attributes (list->word->word, nodefs); + else + pflag = show_name_attributes (list->word->word, nodefs); if (pflag) { sh_notfound (list->word->word); @@ -262,20 +370,141 @@ declare_internal (list, local_var) return (sh_chkwrite (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS)); } + /* Some option combinations that don't make any sense */ + if ((flags_on & att_function) && (flags_on & (att_array|att_assoc|att_integer|att_nameref))) + { + char *optchar; + + if (flags_on & att_nameref) + optchar = "-n"; + else if (flags_on & att_integer) + optchar = "-i"; + else if (flags_on & att_assoc) + optchar = "-A"; + else if (flags_on & att_array) + optchar = "-a"; + + sh_invalidopt (optchar); + return (EXECUTION_FAILURE); + } + #define NEXT_VARIABLE() free (name); list = list->next; continue /* There are arguments left, so we are making variables. */ - while (list) /* declare [-aAfFirx] name [name ...] */ + while (list) /* declare [-aAfFilnrtux] name[=value] [name[=value] ...] */ { - char *value, *name; - int offset, aflags; + char *value, *name, *newname; + int offset, aflags, wflags, created_var; + int assoc_noexpand; #if defined (ARRAY_VARS) int making_array_special, compound_array_assign, simple_array_assign; + int var_exists, array_exists, creating_array, array_subscript_assignment; #endif name = savestring (list->word->word); - offset = assignment (name, 0); + wflags = list->word->flags; +#if defined (ARRAY_VARS) + assoc_noexpand = assoc_expand_once && (wflags & W_ASSIGNMENT); +#else + assoc_noexpand = 0; +#endif + /* XXX - we allow unbalanced brackets if assoc_noexpand is set, we count + brackets and make sure they match if assoc_noexpand is not set. So we + need to make sure we're checking assoc_noexpand and expand_once_flag + for backwards compatibility. We also use assoc_noexpand below when + we call assign_array_element, so we need to make sure they're + consistent in how they count brackets. */ + offset = assignment (name, assoc_noexpand ? 2 : 0); aflags = 0; + created_var = 0; + + if (local_var && variable_context && STREQ (name, "-")) + { + int o; + + o = localvar_inherit; + localvar_inherit = 0; + var = make_local_variable ("-", 0); + localvar_inherit = o; + + if (value_cell (var) == NULL) /* no duplicate instances */ + { + value = get_current_options (); + var_setvalue (var, value); + VSETATTR (var, att_invisible); + } + NEXT_VARIABLE (); + } + + /* 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'. */ + + /* Can't define functions using assignment statements */ + if (offset && (flags_on & att_function)) /* declare -f [-rix] foo=bar */ + { + builtin_error (_("cannot use `-f' to make functions")); + free (name); + return (EXECUTION_FAILURE); + } + + /* There should be a way, however, to let people look at a particular + function definition by saying `typeset -f foo'. This is the only + place in this builtin where we deal with functions. */ + + if (flags_on & att_function) + { + /* Should we restrict this when the shell is in posix mode even if + the function was created before the shell entered posix mode? + Previous versions of the shell enforced the restriction. */ + if (posixly_correct && legal_identifier (name) == 0) + { + sh_invalidid (name); + assign_error++; + NEXT_VARIABLE (); + } + + 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 (name_cell (var)); + if (shell_fn) + printf ("%s %d %s\n", name_cell (var), shell_fn->line, shell_fn->source_file); + else + printf ("%s\n", name_cell (var)); + } + else +#endif /* DEBUGGER */ + { + t = nodefs ? name_cell (var) : 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); + flags_off &= ~att_function; /* makes no sense */ + VUNSETATTR (var, flags_off); + } + } + else + any_failed++; + + NEXT_VARIABLE (); + } if (offset) /* declare [-aAfFirx] name=value */ { @@ -290,13 +519,55 @@ declare_internal (list, local_var) else value = ""; + /* Do some lexical error checking on the LHS and RHS of the assignment + that is specific to nameref variables. */ + if (flags_on & att_nameref) + { +#if defined (ARRAY_VARS) + if (valid_array_reference (name, 0)) + { + builtin_error (_("%s: reference variable cannot be an array"), name); + any_failed++; + NEXT_VARIABLE (); + } + else +#endif + /* disallow self references at global scope, warn at function scope */ + if (check_selfref (name, value, 0)) + { + if (variable_context == 0) + { + builtin_error (_("%s: nameref variable self references not allowed"), name); + assign_error++; /* XXX any_failed++ instead? */ + NEXT_VARIABLE (); + } + else + builtin_warning (_("%s: circular name reference"), name); + } + if (value && *value && (aflags & ASS_APPEND) == 0 && valid_nameref_value (value, 1) == 0) + { + builtin_error (_("`%s': invalid variable name for name reference"), value); + assign_error++; + NEXT_VARIABLE (); + } + } + +restart_new_var_name: + + /* The rest of the loop body deals with declare -[aAlinrtux] name [name...] + where each NAME can be an assignment statement. */ + + subscript_start = (char *)NULL; /* used below */ #if defined (ARRAY_VARS) + /* Determine whether we are creating or assigning an array variable */ + var_exists = array_exists = creating_array = 0; compound_array_assign = simple_array_assign = 0; - subscript_start = (char *)NULL; + array_subscript_assignment = 0; if (t = strchr (name, '[')) /* ] */ { - /* If offset != 0 we have already validated any array reference */ - if (offset == 0 && valid_array_reference (name) == 0) + /* If offset != 0 we have already validated any array reference + because assignment() calls skipsubscript() */ + if (offset == 0 && valid_array_reference (name, 0) == 0) { sh_invalidid (name); assign_error++; @@ -304,17 +575,15 @@ declare_internal (list, local_var) } subscript_start = t; *t = '\0'; - making_array_special = 1; + making_array_special = 1; /* XXX - should this check offset? */ + array_subscript_assignment = offset != 0; } 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) + /* Ensure the argument is a valid, well-formed shell identifier. */ + if (legal_identifier (name) == 0) { sh_invalidid (name); assign_error++; @@ -328,227 +597,452 @@ declare_internal (list, local_var) /* 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)) + refvar = (SHELL_VAR *)NULL; + if (variable_context && mkglobal == 0) { + /* We don't check newname for validity here. We should not have an + invalid name assigned as the value of a nameref, but this could + cause problems. */ + newname = declare_transform_name (name, flags_on, flags_off); + #if defined (ARRAY_VARS) + /* Pass 1 as second argument to make_local_{assoc,array}_variable + return an existing {array,assoc} variable to be flagged as an + error below. */ if (flags_on & att_assoc) - var = make_local_assoc_variable (name); + var = make_local_assoc_variable (newname, MKLOC_ARRAYOK|inherit_flag); else if ((flags_on & att_array) || making_array_special) - var = make_local_array_variable (name); + var = make_local_array_variable (newname, MKLOC_ASSOCOK|inherit_flag); else #endif - var = make_local_variable (name); + if (offset == 0 && (flags_on & att_nameref)) + { + /* First look for refvar at current scope */ + refvar = find_variable_last_nameref (name, 1); + /* VARIABLE_CONTEXT != 0, so we are attempting to create or modify + the attributes for a local variable at the same scope. If we've + used a reference from a previous context to resolve VAR, we + want to throw REFVAR and VAR away and create a new local var. */ + if (refvar && refvar->context != variable_context) + { + refvar = 0; + var = make_local_variable (name, inherit_flag); + } + else if (refvar && refvar->context == variable_context) + var = refvar; + /* Maybe we just want to create a new local variable */ + else if ((var = find_variable (name)) == 0 || var->context != variable_context) + var = make_local_variable (name, inherit_flag); + /* otherwise we have a var at the right context */ + } + else + /* XXX - check name for validity here with valid_nameref_value? */ + var = make_local_variable ((flags_on & att_nameref) ? name : newname, inherit_flag); /* sets att_invisible for new vars */ + if (var == 0) { any_failed++; NEXT_VARIABLE (); } + if (var && nameref_p (var) && readonly_p (var) && nameref_cell (var) && (flags_off & att_nameref)) + { + sh_readonly (name); + 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'. */ + /* VAR is non-null if we just created or fetched a local variable. */ - /* There should be a way, however, to let people look at a particular - function definition by saying `typeset -f foo'. */ + /* Here's what ksh93 seems to do as of the 2012 version: if we are + using declare -n to modify the value of an existing nameref + variable, don't follow the nameref chain at all and just search + for a nameref at the current context. If we have a nameref, + modify its value (changing which variable it references). */ + if (var == 0 && (flags_on & att_nameref)) + { + /* See if we are trying to modify an existing nameref variable, + but don't follow the nameref chain. */ + var = mkglobal ? find_global_variable_noref (name) : find_variable_noref (name); + if (var && nameref_p (var) == 0) + var = 0; + } - if (flags_on & att_function) + /* However, if we're turning off the nameref attribute on an existing + nameref variable, we first follow the nameref chain to the end, + modify the value of the variable this nameref variable references + if there is an assignment statement argument, + *CHANGING ITS VALUE AS A SIDE EFFECT*, then turn off the nameref + flag *LEAVING THE NAMEREF VARIABLE'S VALUE UNCHANGED* */ + else if (var == 0 && (flags_off & att_nameref)) { - if (offset) /* declare -f [-rix] foo=bar */ + /* See if we are trying to modify an existing nameref variable */ + refvar = mkglobal ? find_global_variable_last_nameref (name, 0) : find_variable_last_nameref (name, 0); + if (refvar && nameref_p (refvar) == 0) + refvar = 0; + /* If the nameref is readonly but doesn't have a value, ksh93 + allows the nameref attribute to be removed. If it's readonly + and has a value, even if the value doesn't reference an + existing variable, we disallow the modification */ + if (refvar && nameref_cell (refvar) && readonly_p (refvar)) { - builtin_error (_("cannot use `-f' to make functions")); - free (name); - return (EXECUTION_FAILURE); + sh_readonly (name); + any_failed++; + NEXT_VARIABLE (); } - else /* declare -f [-rx] name [name...] */ + + /* If all we're doing is turning off the nameref attribute, don't + bother with VAR at all, whether it exists or not. Just turn it + off and go on. */ + if (refvar && flags_on == 0 && offset == 0 && flags_off == att_nameref) { - var = find_function (name); + VUNSETATTR (refvar, att_nameref); + NEXT_VARIABLE (); + } - if (var) + if (refvar) + var = declare_find_variable (nameref_cell (refvar), mkglobal, 0); + } +#if defined (ARRAY_VARS) + /* If we have an array assignment to a nameref, remove the nameref + attribute and go on. This handles + declare -n xref[=value]; declare [-a] xref[1]=one */ + else if (var == 0 && offset && array_subscript_assignment) + { + var = mkglobal ? find_global_variable_noref (name) : find_variable_noref (name); + if (var && nameref_p (var)) + { + internal_warning (_("%s: removing nameref attribute"), name); + FREE (value_cell (var)); /* XXX - bash-4.3 compat */ + var_setvalue (var, (char *)NULL); + VUNSETATTR (var, att_nameref); + } + } +#endif + + /* See if we are trying to set flags or value (or create) for an + existing nameref that points to a non-existent variable: e.g., + declare -n foo=bar + unset foo # unsets bar + declare -i foo + foo=4+4 + declare -p foo + */ + if (var == 0 && (mkglobal || flags_on || flags_off || offset)) + { + refvar = mkglobal ? find_global_variable_last_nameref (name, 0) : find_variable_last_nameref (name, 0); + if (refvar && nameref_p (refvar) == 0) + refvar = 0; + if (refvar) + var = declare_find_variable (nameref_cell (refvar), mkglobal, 0); + if (refvar && var == 0) + { + /* I'm not sure subscript_start is ever non-null here. In any + event, build a new name from the nameref value, including any + subscript, and add the [[+]=value] if offset != 0 */ + newname = declare_build_newname (nameref_cell (refvar), subscript_start, offset, value, aflags); + free (name); + name = newname; + + if (offset) { - if (readonly_p (var) && (flags_off & att_readonly)) + offset = assignment (name, 0); + /* If offset was valid previously, but substituting the + the nameref value results in an invalid assignment, + throw an invalid identifier error */ + if (offset == 0) { - builtin_error (_("%s: readonly function"), name); - any_failed++; + sh_invalidid (name); + assign_error++; 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); - } + name[(aflags & ASS_APPEND) ? offset - 1 : offset] = '\0'; + value = name + offset + 1; } - else - any_failed++; - NEXT_VARIABLE (); + + /* OK, let's turn off the nameref attribute. + Now everything else applies to VAR. */ + if (flags_off & att_nameref) + VUNSETATTR (refvar, att_nameref); + + goto restart_new_var_name; + /* NOTREACHED */ } } - 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) + var = declare_find_variable (name, mkglobal, chklocal); - if (var == 0) - { + /* At this point, VAR is the variable we are dealing with; REFVAR is the + nameref variable we dereferenced to get VAR, if any. */ #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 + var_exists = var != 0; + array_exists = var && (array_p (var) || assoc_p (var)); + creating_array = flags_on & (att_array|att_assoc); #endif - if (offset) - var = bind_variable (name, "", 0); - else - { - var = bind_variable (name, (char *)NULL, 0); - VSETATTR (var, att_invisible); - } - } + /* Make a new variable if we need to. */ + 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 + var = mkglobal ? bind_global_variable (name, (char *)NULL, ASS_FORCE) : bind_variable (name, (char *)NULL, ASS_FORCE); - /* Cannot use declare +r to turn off readonly attribute. */ - if (readonly_p (var) && (flags_off & att_readonly)) + if (var == 0) { - sh_readonly (name); - any_failed++; + /* Has to appear in brackets */ NEXT_VARIABLE (); } + if (offset == 0) + VSETATTR (var, att_invisible); + created_var = 1; + } - /* 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 (); - } + /* Nameref variable error checking. */ + + /* Can't take an existing array variable and make it a nameref */ + else if ((array_p (var) || assoc_p (var)) && (flags_on & att_nameref)) + { + builtin_error (_("%s: reference variable cannot be an array"), name); + any_failed++; + NEXT_VARIABLE (); + } + /* Can't have an invalid identifier as nameref value */ + else if (nameref_p (var) && (flags_on & att_nameref) == 0 && (flags_off & att_nameref) == 0 && offset && valid_nameref_value (value, 1) == 0) + { + builtin_error (_("`%s': invalid variable name for name reference"), value); + any_failed++; + NEXT_VARIABLE (); + } + /* Can't make an existing variable a nameref if its current value is not + a valid identifier. Check of offset is to allow an assignment to a + nameref var as part of the declare word to override existing value. */ + else if ((flags_on & att_nameref) && nameref_p (var) == 0 && var_isset (var) && offset == 0 && valid_nameref_value (value_cell (var), 0) == 0) + { + builtin_error (_("`%s': invalid variable name for name reference"), value_cell (var)); + any_failed++; + NEXT_VARIABLE (); + } + /* Can't make an existing readonly variable a nameref. */ + else if ((flags_on & att_nameref) && readonly_p (var)) + { + sh_readonly (name); + any_failed++; + NEXT_VARIABLE (); + } + + /* Readonly variable error checking. */ + + /* Cannot use declare +r to turn off readonly attribute. */ + if (readonly_p (var) && (flags_off & att_readonly)) + { + sh_readonly (name_cell (var)); + any_failed++; + NEXT_VARIABLE (); + } + /* Cannot use declare to assign value to readonly or noassign variable. */ + else 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); + /* Array variable error checking. */ - 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 (); + } + else if ((flags_on & att_array) && assoc_p (var)) + { + builtin_error (_("%s: cannot convert associative to indexed array"), name); + any_failed++; + NEXT_VARIABLE (); + } + else if ((flags_on & att_assoc) && array_p (var)) + { + builtin_error (_("%s: cannot convert indexed to associative array"), name); + any_failed++; + NEXT_VARIABLE (); + } - /* 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 (); - } + /* make declare A[2]=foo as similar to A[2]=foo as possible if A is + already an array or assoc variable. */ + if (array_subscript_assignment && array_exists && creating_array == 0) + simple_array_assign = 1; + else if ((making_array_special || creating_array || array_exists) && offset) + { + int vlen; + vlen = STRLEN (value); +/*itrace("declare_builtin: name = %s value = %s flags = %d", name, value, wflags);*/ - 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)) + if (shell_compatibility_level > 43 && (wflags & W_COMPASSIGN) == 0 && + value[0] == '(' && value[vlen-1] == ')') { - builtin_error (_("%s: cannot convert indexed to associative array"), name); - any_failed++; - NEXT_VARIABLE (); + /* I don't believe this warning is printed any more. + We use creating_array to allow things like + declare -a foo$bar='(abc)' + to work as they have in the past. */ + if (array_exists == 0 && creating_array == 0) + internal_warning (_("%s: quoted compound array assignment deprecated"), list->word->word); + compound_array_assign = array_exists || creating_array; + simple_array_assign = making_array_special; } + else if (value[0] == '(' && value[vlen-1] == ')' && (shell_compatibility_level < 44 || (wflags & W_COMPASSIGN))) + compound_array_assign = 1; + else + simple_array_assign = 1; + } - /* 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); + /* 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); + /* ksh93 compat: turning on nameref attribute turns off -ilu */ + if (flags_on & att_nameref) + VUNSETATTR (var, att_integer|att_uppercase|att_lowercase|att_capcase); + + /* XXX - we note that we are turning on nameref attribute and defer + setting it until the assignment has been made so we don't do an + inadvertent nameref lookup. Might have to do the same thing for + flags_off&att_nameref. */ + /* XXX - ksh93 makes it an error to set a readonly nameref variable + using a single typeset command. */ + onref = (flags_on & att_nameref); + flags_on &= ~att_nameref; +#if defined (ARRAY_VARS) + /* I don't believe this condition ever tests true, but array variables + may not be namerefs */ + if (array_p (var) || assoc_p (var) || compound_array_assign || simple_array_assign) + onref = 0; +#endif + + /* ksh93 seems to do this */ + offref = (flags_off & att_nameref); + flags_off &= ~att_nameref; + + 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) + if (offset && compound_array_assign) + assign_array_var_from_string (var, value, aflags|ASS_FORCE); + else if (simple_array_assign && subscript_start) + { + int local_aflags; + + /* declare [-aA] name[N]=value */ + *subscript_start = '['; /* ] */ + /* XXX - problem here with appending */ + local_aflags = aflags&ASS_APPEND; + local_aflags |= assoc_noexpand ? ASS_NOEXPAND : 0; + local_aflags |= ASS_ALLOWALLSUB; /* allow declare a[@]=at */ + var = assign_array_element (name, value, local_aflags, (array_eltstate_t *)0); /* XXX - not aflags */ + *subscript_start = '\0'; + if (var == 0) /* some kind of assignment error */ { - /* 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); + assign_error++; + flags_on |= onref; + flags_off |= offref; + NEXT_VARIABLE (); } + } + else if (simple_array_assign) + { + /* let bind_{array,assoc}_variable take care of this. */ + if (assoc_p (var)) + bind_assoc_variable (var, name, savestring ("0"), value, aflags|ASS_FORCE); else + bind_array_variable (name, 0, value, aflags|ASS_FORCE); + } + 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)) + /* XXX - no ASS_FORCE here */ + /* bind_variable_value duplicates the essential internals of bind_variable() */ + if (offset) + { + if (onref || nameref_p (var)) + aflags |= ASS_NAMEREF; + v = bind_variable_value (var, value, aflags); + if (v == 0 && (onref || nameref_p (var))) { - SHELL_VAR *tv; - char *tvalue; + if (valid_nameref_value (value, 1) == 0) + sh_invalidid (value); + assign_error++; + /* XXX - unset this variable? or leave it as normal var? */ + if (created_var) + delete_var (name_cell (var), mkglobal ? global_variables : shell_variables); + flags_on |= onref; /* undo change from above */ + flags_off |= offref; + NEXT_VARIABLE (); + } + } + + /* 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); + tv = find_tempenv_variable (name_cell (var)); + if (tv) + { + tvalue = var_isset (var) ? savestring (value_cell (var)) : savestring (""); + tv = bind_variable (name_cell (var), tvalue, 0); 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) + tv->attributes |= var->attributes & ~att_tempvar; + if (tv->context > 0) VSETATTR (tv, att_propagate); - free (tvalue); } - VSETATTR (var, att_propagate); + free (tvalue); } + VSETATTR (var, att_propagate); + } + + /* Turn on nameref attribute we deferred above. */ + VSETATTR (var, onref); + flags_on |= onref; + VUNSETATTR (var, offref); + flags_off |= offref; + + /* Yuck. ksh93 compatibility. XXX - need to investigate more but + definitely happens when turning off nameref attribute on nameref + (see comments above). Under no circumstances allow this to turn + off readonly attribute on readonly nameref variable. */ + if (refvar) + { + if (flags_off & att_readonly) + flags_off &= ~att_readonly; + VUNSETATTR (refvar, flags_off); } stupidly_hack_special_variables (name); diff --git a/builtins/echo.def b/builtins/echo.def index 62c6199..4e2243d 100644 --- a/builtins/echo.def +++ b/builtins/echo.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2018 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,7 +38,8 @@ $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. +Display the ARGs, separated by a single space character and followed by a +newline, on the standard output. Options: -n do not append a newline @@ -50,6 +51,7 @@ Options: \b backspace \c suppress further output \e escape character + \E escape character \f form feed \n new line \r carriage return @@ -57,9 +59,13 @@ Options: \v vertical tab \\ backslash \0nnn the character whose ASCII code is NNN (octal). NNN can be - 0 to 3 octal digits + 0 to 3 octal digits \xHH the eight-bit character whose value is HH (hexadecimal). HH - can be one or two hex digits + can be one or two hex digits + \uHHHH the Unicode character whose value is the hexadecimal value HHHH. + HHHH can be one to four hex digits. + \UHHHHHHHH the Unicode character whose value is the hexadecimal value + HHHHHHHH. HHHHHHHH can be one to eight hex digits. Exit Status: Returns success unless a write error occurs. @@ -97,8 +103,6 @@ int xpg_echo = 1; 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. */ @@ -159,7 +163,6 @@ just_echo: clearerr (stdout); /* clear error before writing and testing success */ - terminate_immediately++; while (list) { i = len = 0; @@ -178,6 +181,7 @@ just_echo: fflush (stdout); /* Fix for bug in SunOS 5.5 printf(3) */ #endif } + QUIT; if (do_v9 && temp) free (temp); list = list->next; @@ -188,11 +192,11 @@ just_echo: } if (list) putchar(' '); + QUIT; } if (display_return) putchar ('\n'); - terminate_immediately--; return (sh_chkwrite (EXECUTION_SUCCESS)); } diff --git a/builtins/enable.def b/builtins/enable.def index 40cbb44..27d341a 100644 --- a/builtins/enable.def +++ b/builtins/enable.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -66,6 +66,7 @@ $END #include "../flags.h" #include "common.h" #include "bashgetopt.h" +#include "findcmd.h" #if defined (PROGRAMMABLE_COMPLETION) # include "../pcomplete.h" @@ -74,6 +75,7 @@ $END #define ENABLED 1 #define DISABLED 2 #define SPECIAL 4 +#define SILENT 8 /* affects dyn_load_builtin behavior */ #define AFLAG 0x01 #define DFLAG 0x02 @@ -83,17 +85,22 @@ $END #define SFLAG 0x20 #if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) -static int dyn_load_builtin __P((WORD_LIST *, int, char *)); +static int dyn_load_builtin PARAMS((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 *)); +static int dyn_unload_builtin PARAMS((char *)); +static void delete_builtin PARAMS((struct builtin *)); +static int local_dlclose PARAMS((void *)); #endif -static void list_some_builtins __P((int)); -static int enable_shell_command __P((char *, int)); +#define STRUCT_SUFFIX "_struct" +/* for now */ +#define LOAD_SUFFIX "_builtin_load" +#define UNLOAD_SUFFIX "_builtin_unload" + +static void list_some_builtins PARAMS((int)); +static int enable_shell_command PARAMS((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 @@ -104,6 +111,7 @@ enable_builtin (list) { int result, flags; int opt, filter; + WORD_LIST *next; #if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) char *filename; #endif @@ -145,6 +153,7 @@ enable_builtin (list) builtin_error (_("dynamic loading not available")); return (EX_USAGE); #endif /* HAVE_DLCLOSE */ + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -171,6 +180,7 @@ enable_builtin (list) filter |= SPECIAL; list_some_builtins (filter); + result = sh_chkwrite (EXECUTION_SUCCESS); } #if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) else if (flags & FFLAG) @@ -180,6 +190,8 @@ enable_builtin (list) filter |= SPECIAL; result = dyn_load_builtin (list, filter, filename); + if (result != EXECUTION_SUCCESS) + result = EXECUTION_FAILURE; /* normalize return value */ #if defined (PROGRAMMABLE_COMPLETION) set_itemlist_dirty (&it_builtins); #endif @@ -205,13 +217,37 @@ enable_builtin (list) while (list) { opt = enable_shell_command (list->word->word, flags & NFLAG); + next = list->next; - if (opt == EXECUTION_FAILURE) +#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) + /* If we try to enable a non-existent builtin, and we have dynamic + loading, try the equivalent of `enable -f name name'. */ + if (opt == EX_NOTFOUND) + { + int dflags, r; + + dflags = ENABLED|SILENT|((flags & SFLAG) ? SPECIAL : 0); + + list->next = 0; + r = dyn_load_builtin (list, dflags, list->word->word); + list->next = next; + if (r == EXECUTION_SUCCESS) + opt = r; +#if defined (PROGRAMMABLE_COMPLETION) + set_itemlist_dirty (&it_builtins); +#endif + } +#endif + + if (opt == EX_NOTFOUND) { sh_notbuiltin (list->word->word); result = EXECUTION_FAILURE; } - list = list->next; + else if (opt != EXECUTION_SUCCESS) + result = EXECUTION_FAILURE; + + list = next; } } return (result); @@ -253,7 +289,7 @@ enable_shell_command (name, disable_p) b = builtin_address_internal (name, 1); if (b == 0) - return (EXECUTION_FAILURE); + return (EX_NOTFOUND); if (disable_p) b->flags &= ~BUILTIN_ENABLED; @@ -290,9 +326,11 @@ dyn_load_builtin (list, flags, filename) WORD_LIST *l; void *handle; - int total, size, new, replaced; - char *struct_name, *name; + int total, size, new, replaced, r; + char *struct_name, *name, *funcname; + sh_load_func_t *loadfunc; struct builtin **new_builtins, *b, *new_shell_builtins, *old_builtin; + char *loadables_path, *load_path; if (list == 0) return (EXECUTION_FAILURE); @@ -301,16 +339,45 @@ dyn_load_builtin (list, flags, filename) #define RTLD_LAZY 1 #endif + handle = 0; + if (absolute_program (filename) == 0) + { + loadables_path = get_string_value ("BASH_LOADABLES_PATH"); + if (loadables_path) + { + load_path = find_in_path (filename, loadables_path, FS_NODIRS|FS_EXEC_PREFERRED); + if (load_path) + { #if defined (_AIX) - handle = dlopen (filename, RTLD_NOW|RTLD_GLOBAL); + handle = dlopen (load_path, RTLD_NOW|RTLD_GLOBAL); #else - handle = dlopen (filename, RTLD_LAZY); + handle = dlopen (load_path, RTLD_LAZY); +#endif /* !_AIX */ + free (load_path); + } + } + } + + /* Fall back to current directory for now */ + if (handle == 0) +#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); + /* If we've been told to be quiet, don't complain about not finding the + specified shared object. */ + if ((flags & SILENT) == 0) + { + name = printable_filename (filename, 0); + builtin_error (_("cannot open shared object %s: %s"), name, dlerror ()); + if (name != filename) + free (name); + } + return (EX_NOTFOUND); } for (new = 0, l = list; l; l = l->next, new++) @@ -327,25 +394,48 @@ dyn_load_builtin (list, flags, filename) size = strlen (name); struct_name = (char *)xmalloc (size + 8); strcpy (struct_name, name); - strcpy (struct_name + size, "_struct"); + strcpy (struct_name + size, STRUCT_SUFFIX); + + old_builtin = builtin_address_internal (name, 1); b = (struct builtin *)dlsym (handle, struct_name); if (b == 0) { + name = printable_filename (filename, 0); builtin_error (_("cannot find %s in shared object %s: %s"), - struct_name, filename, dlerror ()); + struct_name, name, dlerror ()); + if (name != filename) + free (name); free (struct_name); continue; } - free (struct_name); + funcname = xrealloc (struct_name, size + sizeof (LOAD_SUFFIX) + 1); + strcpy (funcname, name); + strcpy (funcname + size, LOAD_SUFFIX); + + loadfunc = (sh_load_func_t *)dlsym (handle, funcname); + if (loadfunc) + { + /* Add warning if running an init function more than once */ + if (old_builtin && (old_builtin->flags & STATIC_BUILTIN) == 0) + builtin_warning (_("%s: dynamic builtin already loaded"), name); + r = (*loadfunc) (name); + if (r == 0) + { + builtin_error (_("load function for %s returns failure (%d): not loaded"), name, r); + free (funcname); + continue; + } + } + free (funcname); b->flags &= ~STATIC_BUILTIN; if (flags & SPECIAL) b->flags |= SPECIAL_BUILTIN; b->handle = handle; - if (old_builtin = builtin_address_internal (name, 1)) + if (old_builtin) { replaced++; FASTCOPY ((char *)b, (char *)old_builtin, sizeof (struct builtin)); @@ -446,7 +536,9 @@ dyn_unload_builtin (name) { struct builtin *b; void *handle; - int ref, i; + char *funcname; + sh_unload_func_t *unloadfunc; + int ref, i, size; b = builtin_address_internal (name, 1); if (b == 0) @@ -467,6 +559,17 @@ dyn_unload_builtin (name) ref++; } + /* Call any unload function */ + size = strlen (name); + funcname = xmalloc (size + sizeof (UNLOAD_SUFFIX) + 1); + strcpy (funcname, name); + strcpy (funcname + size, UNLOAD_SUFFIX); + + unloadfunc = (sh_unload_func_t *)dlsym (handle, funcname); + if (unloadfunc) + (*unloadfunc) (name); /* void function */ + free (funcname); + /* Don't remove the shared object unless the reference count of builtins using it drops to zero. */ if (ref == 1 && local_dlclose (handle) != 0) diff --git a/builtins/eval.def b/builtins/eval.def index ee9a23d..f459bce 100644 --- a/builtins/eval.def +++ b/builtins/eval.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2016 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -53,6 +53,5 @@ eval_builtin (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); + return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST|SEVAL_NOOPTIMIZE) : EXECUTION_SUCCESS); } diff --git a/builtins/evalfile.c b/builtins/evalfile.c index 972d039..604de57 100644 --- a/builtins/evalfile.c +++ b/builtins/evalfile.c @@ -1,6 +1,6 @@ /* evalfile.c - read and evaluate commands from a file or file descriptor */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2017 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,6 +36,7 @@ #include "../bashintl.h" #include "../shell.h" +#include "../parser.h" #include "../jobs.h" #include "../builtins.h" #include "../flags.h" @@ -43,6 +44,8 @@ #include "../execute_cmd.h" #include "../trap.h" +#include + #if defined (HISTORY) # include "../bashhist.h" #endif @@ -66,11 +69,6 @@ extern int errno; #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; @@ -88,8 +86,9 @@ _evalfile (filename, flags) size_t file_size; sh_vmsg_func_t *errfunc; #if defined (ARRAY_VARS) - SHELL_VAR *funcname_v, *nfv, *bash_source_v, *bash_lineno_v; + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; + struct func_array_state *fa; # if defined (DEBUGGER) SHELL_VAR *bash_argv_v, *bash_argc_v; ARRAY *bash_argv_a, *bash_argc_a; @@ -108,23 +107,28 @@ _evalfile (filename, flags) 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)) { + i = errno; + if (fd >= 0) + close (fd); + errno = i; + file_error_and_exit: if (((flags & FEVAL_ENOENTOK) == 0) || errno != ENOENT) file_error (filename); if (flags & FEVAL_LONGJMP) { - last_command_exit_value = 1; + last_command_exit_value = EXECUTION_FAILURE; jump_to_top_level (EXITPROG); } return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE - : ((errno == ENOENT) ? 0 : -1)); + : ((errno == ENOENT && (flags & FEVAL_ENOENTOK) != 0) ? 0 : -1)); } errfunc = ((flags & FEVAL_BUILTIN) ? builtin_error : internal_error); @@ -132,11 +136,13 @@ _evalfile (filename, flags) if (S_ISDIR (finfo.st_mode)) { (*errfunc) (_("%s: is a directory"), filename); + close (fd); 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); + close (fd); return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); } @@ -145,13 +151,10 @@ _evalfile (filename, flags) if (file_size != finfo.st_size || file_size + 1 < file_size) { (*errfunc) (_("%s: file is too large"), filename); + close (fd); 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); @@ -235,32 +238,47 @@ _evalfile (filename, flags) array_push (bash_lineno_a, t); free (t); array_push (funcname_a, "source"); /* not exactly right */ + + fa = (struct func_array_state *)xmalloc (sizeof (struct func_array_state)); + fa->source_a = bash_source_a; + fa->source_v = bash_source_v; + fa->lineno_a = bash_lineno_a; + fa->lineno_v = bash_lineno_v; + fa->funcname_a = funcname_a; + fa->funcname_v = funcname_v; + if (flags & FEVAL_UNWINDPROT) + add_unwind_protect (restore_funcarray_state, fa); + # 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); + if (shell_compatibility_level <= 44) + init_bash_argv (); + array_push (bash_argv_a, (char *)filename); /* XXX - unconditionally? */ tt[0] = '1'; tt[1] = '\0'; array_push (bash_argc_a, tt); + if (flags & FEVAL_UNWINDPROT) + add_unwind_protect (pop_args, 0); } # endif #endif /* set the flags to be passed to parse_and_execute */ - pflags = SEVAL_RESETLINE; + pflags = SEVAL_RESETLINE|SEVAL_NOOPTIMIZE; pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST; if (flags & FEVAL_BUILTIN) result = EXECUTION_SUCCESS; - return_val = setjmp (return_catch); + return_val = setjmp_nosigs (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 (); + parse_and_execute_cleanup (-1); result = return_catch_value; } else @@ -272,30 +290,27 @@ _evalfile (filename, flags) { if (flags & FEVAL_NONINT) interactive = old_interactive; +#if defined (ARRAY_VARS) + restore_funcarray_state (fa); +# if defined (DEBUGGER) + if ((flags & FEVAL_NOPUSHARGS) == 0) + { + /* Don't need to call pop_args here until we do something better + when source is passed arguments (see above). */ + array_pop (bash_argc_a); + array_pop (bash_argv_a); + } +# endif +#endif 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 + /* If we end up with EOF after sourcing a file, which can happen when the file + doesn't end with a newline, pretend that it did. */ + if (current_token == yacc_EOF) + push_token ('\n'); /* XXX */ return ((flags & FEVAL_BUILTIN) ? result : 1); } @@ -317,6 +332,23 @@ maybe_execute_file (fname, force_noninteractive) return result; } +int +force_execute_file (fname, force_noninteractive) + const char *fname; + int force_noninteractive; +{ + char *filename; + int result, flags; + + filename = bash_tilde_expand (fname, 0); + flags = 0; + if (force_noninteractive) + flags |= FEVAL_NONINT; + result = _evalfile (filename, flags); + free (filename); + return result; +} + #if defined (HISTORY) int fc_execute_file (filename) @@ -325,8 +357,9 @@ fc_execute_file (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; + remember_on_history is set. We use FEVAL_BUILTIN to return + the result of parse_and_execute. */ + flags = FEVAL_ENOENTOK|FEVAL_HISTORY|FEVAL_REGFILE|FEVAL_BUILTIN; return (_evalfile (filename, flags)); } #endif /* HISTORY */ @@ -342,7 +375,7 @@ source_file (filename, sflags) if (sflags) flags |= FEVAL_NOPUSHARGS; /* POSIX shells exit if non-interactive and file error. */ - if (posixly_correct && !interactive_shell) + if (posixly_correct && interactive_shell == 0 && executing_command_builtin == 0) flags |= FEVAL_LONGJMP; rval = _evalfile (filename, flags); diff --git a/builtins/evalstring.c b/builtins/evalstring.c index ab43f23..53a7c0b 100644 --- a/builtins/evalstring.c +++ b/builtins/evalstring.c @@ -1,6 +1,6 @@ -/* evalstring.c - evaluate a string as one or more shell commands. +/* evalstring.c - evaluate a string as one or more shell commands. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -39,6 +39,7 @@ #include "../jobs.h" #include "../builtins.h" #include "../flags.h" +#include "../parser.h" #include "../input.h" #include "../execute_cmd.h" #include "../redir.h" @@ -60,20 +61,9 @@ extern int errno; #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 *)); +static int cat_file PARAMS((REDIRECT *)); #define PE_TAG "parse_and_execute top" #define PS_TAG "parse_string top" @@ -86,13 +76,135 @@ set_history_remembering () } #endif +static void +restore_lastcom (x) + char *x; +{ + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = x; +} + +int +should_optimize_fork (command, subshell) + COMMAND *command; + int subshell; +{ + return (running_trap == 0 && + command->type == cm_simple && + signal_is_trapped (EXIT_TRAP) == 0 && + signal_is_trapped (ERROR_TRAP) == 0 && + any_signals_trapped () < 0 && + (subshell || (command->redirects == 0 && command->value.Simple->redirects == 0)) && + ((command->flags & CMD_TIME_PIPELINE) == 0) && + ((command->flags & CMD_INVERT_RETURN) == 0)); +} + +/* This has extra tests to account for STARTUP_STATE == 2, which is for + -c command but has been extended to command and process substitution + (basically any time you call parse_and_execute in a subshell). */ +int +should_suppress_fork (command) + COMMAND *command; +{ + int subshell; + + subshell = subshell_environment & SUBSHELL_PROCSUB; /* salt to taste */ + return (startup_state == 2 && parse_and_execute_level == 1 && + *bash_input.location.string == '\0' && + parser_expanding_alias () == 0 && + should_optimize_fork (command, subshell)); +} + +int +can_optimize_connection (command) + COMMAND *command; +{ + return (*bash_input.location.string == '\0' && + parser_expanding_alias () == 0 && + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && + command->value.Connection->second->type == cm_simple); +} + +void +optimize_connection_fork (command) + COMMAND *command; +{ + if (command->type == cm_connection && + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && + (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) && + (should_suppress_fork (command->value.Connection->second) || + ((subshell_environment & SUBSHELL_PAREN) && should_optimize_fork (command->value.Connection->second, 0)))) + { + command->value.Connection->second->flags |= CMD_NO_FORK; + command->value.Connection->second->value.Simple->flags |= CMD_NO_FORK; + } +} + +void +optimize_subshell_command (command) + COMMAND *command; +{ + if (should_optimize_fork (command, 0)) + { + command->flags |= CMD_NO_FORK; + command->value.Simple->flags |= CMD_NO_FORK; + } + else if (command->type == cm_connection && + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && + command->value.Connection->second->type == cm_simple && + parser_expanding_alias () == 0) + { + command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING; + command->value.Connection->second->value.Simple->flags |= CMD_TRY_OPTIMIZING; + } +} + +void +optimize_shell_function (command) + COMMAND *command; +{ + COMMAND *fc; + + fc = (command->type == cm_group) ? command->value.Group->command : command; + + if (fc->type == cm_simple && should_suppress_fork (fc)) + { + fc->flags |= CMD_NO_FORK; + fc->value.Simple->flags |= CMD_NO_FORK; + } + else if (fc->type == cm_connection && can_optimize_connection (fc) && should_suppress_fork (fc->value.Connection->second)) + { + fc->value.Connection->second->flags |= CMD_NO_FORK; + fc->value.Connection->second->value.Simple->flags |= CMD_NO_FORK; + } +} + +int +can_optimize_cat_file (command) + COMMAND *command; +{ + return (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 && + command->value.Simple->redirects->redirector.dest == 0); +} + /* How to force parse_and_execute () to clean up after itself. */ void -parse_and_execute_cleanup () +parse_and_execute_cleanup (old_running_trap) + int old_running_trap; { - if (running_trap) + if (running_trap > 0) { - run_trap_cleanup (running_trap - 1); + /* We assume if we have a different value for running_trap than when + we started (the only caller that cares is evalstring()), the + original caller will perform the cleanup, and we should not step + on them. */ + if (running_trap != old_running_trap) + run_trap_cleanup (running_trap - 1); unfreeze_jobs_list (); } @@ -108,7 +220,7 @@ parse_prologue (string, flags, tag) int flags; char *tag; { - char *orig_string; + char *orig_string, *lastcom; int x; orig_string = string; @@ -118,6 +230,7 @@ parse_prologue (string, flags, tag) unwind_protect_jmp_buf (top_level); unwind_protect_int (indirection_level); unwind_protect_int (line_number); + unwind_protect_int (line_number_for_err_trap); unwind_protect_int (loop_level); unwind_protect_int (executing_list); unwind_protect_int (comsub_ignore_return); @@ -130,8 +243,7 @@ parse_prologue (string, flags, tag) 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); + unwind_protect_int (history_expansion_inhibited); # endif /* BANG_HISTORY */ #endif /* HISTORY */ @@ -140,8 +252,17 @@ parse_prologue (string, flags, tag) x = get_current_prompt_level (); add_unwind_protect (set_current_prompt_level, x); } - + + if (the_printed_command_except_trap) + { + lastcom = savestring (the_printed_command_except_trap); + add_unwind_protect (restore_lastcom, lastcom); + } + add_unwind_protect (pop_stream, (char *)NULL); + if (parser_expanding_alias ()) + add_unwind_protect (parser_restore_alias, (char *)NULL); + if (orig_string && ((flags & SEVAL_NOFREE) == 0)) add_unwind_protect (xfree, orig_string); end_unwind_frame (); @@ -152,6 +273,10 @@ parse_prologue (string, flags, tag) #if defined (HISTORY) if (flags & SEVAL_NOHIST) bash_history_disable (); +# if defined (BANG_HISTORY) + if (flags & SEVAL_NOHISTEXP) + history_expansion_inhibited = 1; +# endif /* BANG_HISTORY */ #endif /* HISTORY */ } @@ -164,6 +289,8 @@ parse_prologue (string, flags, tag) (flags & SEVAL_NOHIST) -> call bash_history_disable () (flags & SEVAL_NOFREE) -> don't free STRING when finished (flags & SEVAL_RESETLINE) -> reset line_number to 1 + (flags & SEVAL_NOHISTEXP) -> history_expansion_inhibited -> 1 + (flags & SEVAL_NOOPTIMIZE) -> don't try to turn on optimizing flags */ int @@ -175,6 +302,7 @@ parse_and_execute (string, from_file, flags) int code, lreset; volatile int should_jump_to_top_level, last_result; COMMAND *volatile command; + volatile sigset_t pe_sigmask; parse_prologue (string, flags, PE_TAG); @@ -182,11 +310,21 @@ parse_and_execute (string, from_file, flags) lreset = flags & SEVAL_RESETLINE; +#if defined (HAVE_POSIX_SIGNALS) + /* If we longjmp and are going to go on, use this to restore signal mask */ + sigemptyset ((sigset_t *)&pe_sigmask); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, (sigset_t *)&pe_sigmask); +#endif + /* 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 (parser_expanding_alias ()) + /* push current shell_input_line */ + parser_save_alias (); + if (lreset == 0) line_number--; @@ -195,8 +333,13 @@ parse_and_execute (string, from_file, flags) code = should_jump_to_top_level = 0; last_result = EXECUTION_SUCCESS; + /* We need to reset enough of the token state so we can start fresh. */ + if (current_token == yacc_EOF) + current_token = '\n'; /* reset_parser() ? */ + with_input_from_string (string, from_file); - while (*(bash_input.location.string)) + clear_shell_input_line (); + while (*(bash_input.location.string) || parser_expanding_alias ()) { command = (COMMAND *)NULL; @@ -209,15 +352,30 @@ parse_and_execute (string, from_file, flags) /* 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); + code = setjmp_nosigs (top_level); if (code) { should_jump_to_top_level = 0; switch (code) { - case FORCE_EOF: case ERREXIT: + /* variable_context -> 0 is what eval.c:reader_loop() does in + these circumstances. Don't bother with cleanup here because + we don't want to run the function execution cleanup stuff + that will cause pop_context and other functions to run. + We call reset_local_contexts() instead, which just frees + context memory. + XXX - change that if we want the function context to be + unwound. */ + if (exit_immediately_on_error && variable_context) + { + discard_unwind_frame ("pe_dispose"); + reset_local_contexts (); /* not in a function */ + } + should_jump_to_top_level = 1; + goto out; + case FORCE_EOF: case EXITPROG: if (command) run_unwind_frame ("pe_dispose"); @@ -226,10 +384,30 @@ parse_and_execute (string, from_file, flags) should_jump_to_top_level = 1; goto out; + case EXITBLTIN: + if (command) + { + if (variable_context && signal_is_trapped (0)) + { + /* Let's make sure we run the exit trap in the function + context, as we do when not running parse_and_execute. + The pe_dispose unwind frame comes before any unwind- + protects installed by the string we're evaluating, so + it will undo the current function scope. */ + dispose_command (command); + discard_unwind_frame ("pe_dispose"); + } + else + run_unwind_frame ("pe_dispose"); + } + 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 */ + set_pipestatus_from_exit (last_command_exit_value); if (subshell_environment) { should_jump_to_top_level = 1; @@ -239,6 +417,9 @@ parse_and_execute (string, from_file, flags) { #if 0 dispose_command (command); /* pe_dispose does this */ +#endif +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, (sigset_t *)&pe_sigmask, (sigset_t *)NULL); #endif continue; } @@ -248,9 +429,11 @@ parse_and_execute (string, from_file, flags) break; } } - + if (parse_command () == 0) { + int local_expalias, local_alflag; + if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute)) { last_result = EXECUTION_SUCCESS; @@ -261,12 +444,26 @@ parse_and_execute (string, from_file, flags) { struct fd_bitmap *bitmap; - if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def) + if (flags & SEVAL_FUNCDEF) { - internal_warning ("%s: ignoring function definition attempt", from_file); - should_jump_to_top_level = 0; - last_result = last_command_exit_value = EX_BADUSAGE; - break; + char *x; + + /* If the command parses to something other than a straight + function definition, or if we have not consumed the entire + string, or if the parser has transformed the function + name (as parsing will if it begins or ends with shell + whitespace, for example), reject the attempt */ + if (command->type != cm_function_def || + ((x = parser_remaining_input ()) && *x) || + (STREQ (from_file, command->value.Function_def->name->word) == 0)) + { + internal_warning (_("%s: ignoring function definition attempt"), from_file); + should_jump_to_top_level = 0; + last_result = last_command_exit_value = EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); + reset_parser (); + break; + } } bitmap = new_fd_bitmap (FD_BITMAP_SIZE); @@ -289,34 +486,50 @@ parse_and_execute (string, from_file, flags) * 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 + * the command's return status is not being inverted AND + * there aren't any traps in effect * 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)) + if (should_suppress_fork (command)) { command->flags |= CMD_NO_FORK; command->value.Simple->flags |= CMD_NO_FORK; } + + /* Can't optimize forks out here execept for simple commands. + This knows that the parser sets up commands as left-side heavy + (&& and || are left-associative) and after the single parse, + if we are at the end of the command string, the last in a + series of connection commands is + command->value.Connection->second. */ + else if (command->type == cm_connection && + (flags & SEVAL_NOOPTIMIZE) == 0 && + can_optimize_connection (command)) + { + command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING; + command->value.Connection->second->value.Simple->flags |= CMD_TRY_OPTIMIZING; + } #endif /* ONESHOT */ + /* We play tricks in the parser and command_substitute() turning + expand_aliases on and off depending on which parsing pass and + whether or not we're in posix mode. This only matters for + parsing, and we let the higher layers deal with that. We just + want to ensure that expand_aliases is set to the appropriate + global value when we go to execute this command, so we save + and restore it around the execution (we don't restore it if + the global value of the flag (expaliases_flag) changes). */ + local_expalias = expand_aliases; + local_alflag = expaliases_flag; + if (subshell_environment & SUBSHELL_COMSUB) + expand_aliases = expaliases_flag; + /* See if this is a candidate for $( 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) + can_optimize_cat_file (command)) { int r; r = cat_file (command->value.Simple->redirects); @@ -325,30 +538,32 @@ parse_and_execute (string, from_file, flags) 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"); + /* If the global value didn't change, we restore what we had. */ + if ((subshell_environment & SUBSHELL_COMSUB) && local_alflag == expaliases_flag) + expand_aliases = local_expalias; + if (flags & SEVAL_ONECMD) - break; + { + reset_parser (); + break; + } } } else { - last_result = EXECUTION_FAILURE; + last_result = EX_BADUSAGE; /* was 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) + last_command_exit_value == EX_BADSYNTAX && posixly_correct && executing_command_builtin == 0) { -#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 @@ -370,6 +585,8 @@ parse_and_execute (string, from_file, flags) throw_to_top_level (); } + CHECK_TERMSIG; + if (should_jump_to_top_level) jump_to_top_level (code); @@ -382,31 +599,42 @@ parse_and_execute (string, from_file, flags) 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) +parse_string (string, from_file, flags, cmdp, endp) char *string; const char *from_file; int flags; + COMMAND **cmdp; char **endp; { int code, nc; volatile int should_jump_to_top_level; COMMAND *volatile command, *oglobal; char *ostring; + volatile sigset_t ps_sigmask; parse_prologue (string, flags, PS_TAG); +#if defined (HAVE_POSIX_SIGNALS) + /* If we longjmp and are going to go on, use this to restore signal mask */ + sigemptyset ((sigset_t *)&ps_sigmask); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, (sigset_t *)&ps_sigmask); +#endif + /* 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); - + if (parser_expanding_alias ()) + /* push current shell_input_line */ + parser_save_alias (); + code = should_jump_to_top_level = 0; oglobal = global_command; - ostring = string; with_input_from_string (string, from_file); - while (*(bash_input.location.string)) + ostring = bash_input.location.string; + while (*(bash_input.location.string)) /* XXX - parser_expanding_alias () ? */ { command = (COMMAND *)NULL; @@ -417,19 +645,19 @@ parse_string (string, from_file, flags, endp) /* Provide a location for functions which `longjmp (top_level)' to jump to. */ - code = setjmp (top_level); + code = setjmp_nosigs (top_level); if (code) { -#if defined (DEBUG) -itrace("parse_string: longjmp executed: code = %d", code); -#endif + INTERNAL_DEBUG(("parse_string: longjmp executed: code = %d", code)); + should_jump_to_top_level = 0; switch (code) { case FORCE_EOF: case ERREXIT: case EXITPROG: + case EXITBLTIN: case DISCARD: /* XXX */ if (command) dispose_command (command); @@ -439,6 +667,9 @@ itrace("parse_string: longjmp executed: code = %d", code); goto out; default: +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, (sigset_t *)&ps_sigmask, (sigset_t *)NULL); +#endif command_error ("parse_string", CMDERR_BADJUMP, code, 0); break; } @@ -446,7 +677,10 @@ itrace("parse_string: longjmp executed: code = %d", code); if (parse_command () == 0) { - dispose_command (global_command); + if (cmdp) + *cmdp = global_command; + else + dispose_command (global_command); global_command = (COMMAND *)NULL; } else @@ -462,10 +696,14 @@ itrace("parse_string: longjmp executed: code = %d", code); } if (current_token == yacc_EOF || current_token == shell_eof_token) + { + if (current_token == shell_eof_token) + rewind_input_string (); break; + } } - out: +out: global_command = oglobal; nc = bash_input.location.string - ostring; @@ -474,18 +712,24 @@ itrace("parse_string: longjmp executed: code = %d", code); run_unwind_frame (PS_TAG); + /* If we return < 0, the caller (xparse_dolparen) will jump_to_top_level for + us, after doing cleanup */ if (should_jump_to_top_level) - jump_to_top_level (code); + { + if (parse_and_execute_level == 0) + top_level_cleanup (); + if (code == DISCARD) + return -DISCARD; + 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) +int +open_redir_file (r, fnp) REDIRECT *r; + char **fnp; { char *fn; int fd, rval; @@ -502,7 +746,7 @@ cat_file (r) if (fn == 0) { - redirection_error (r, AMBIGUOUS_REDIRECT); + redirection_error (r, AMBIGUOUS_REDIRECT, fn); return -1; } @@ -511,9 +755,33 @@ cat_file (r) { file_error (fn); free (fn); + if (fnp) + *fnp = 0; return -1; } + if (fnp) + *fnp = fn; + else + free (fn); + + return fd; +} + +/* 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; + + fd = open_redir_file (r, &fn); + if (fd < 0) + return -1; + rval = zcatfd (fd, 1, fn); free (fn); @@ -521,3 +789,55 @@ cat_file (r) return (rval); } + +int +evalstring (string, from_file, flags) + char *string; + const char *from_file; + int flags; +{ + volatile int r, rflag, rcatch; + volatile int was_trap; + + /* Are we running a trap when we execute this function? */ + was_trap = running_trap; + + rcatch = 0; + rflag = return_catch_flag; + /* If we are in a place where `return' is valid, we have to catch + `eval "... return"' and make sure parse_and_execute cleans up. Then + we can trampoline to the previous saved return_catch location. */ + if (rflag) + { + begin_unwind_frame ("evalstring"); + + unwind_protect_int (return_catch_flag); + unwind_protect_jmp_buf (return_catch); + + return_catch_flag++; /* increment so we have a counter */ + rcatch = setjmp_nosigs (return_catch); + } + + if (rcatch) + { + /* We care about whether or not we are running the same trap we were + when we entered this function. */ + parse_and_execute_cleanup (was_trap); + r = return_catch_value; + } + else + /* Note that parse_and_execute () frees the string it is passed. */ + r = parse_and_execute (string, from_file, flags); + + if (rflag) + { + run_unwind_frame ("evalstring"); + if (rcatch && return_catch_flag) + { + return_catch_value = r; + sh_longjmp (return_catch, 1); + } + } + + return (r); +} diff --git a/builtins/exec.def b/builtins/exec.def index 0837a98..add9082 100644 --- a/builtins/exec.def +++ b/builtins/exec.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,7 +22,7 @@ $PRODUCES exec.c $BUILTIN exec $FUNCTION exec_builtin -$SHORT_DOC exec [-cl] [-a name] [command [arguments ...]] [redirection ...] +$SHORT_DOC exec [-cl] [-a name] [command [argument ...]] [redirection ...] Replace the shell with the given command. Execute COMMAND, replacing this shell with the specified program. @@ -31,8 +31,8 @@ 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 + -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. @@ -52,6 +52,8 @@ $END # include #endif +#include + #include "../bashansi.h" #include "../bashintl.h" @@ -68,14 +70,15 @@ $END #endif #include "common.h" #include "bashgetopt.h" +#include "input.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; +extern char *exec_argv0; int no_exit_on_failed_exec; @@ -98,11 +101,11 @@ exec_builtin (list) WORD_LIST *list; { int exit_value = EXECUTION_FAILURE; - int cleanenv, login, opt; + int cleanenv, login, opt, orig_job_control; char *argv0, *command, **args, **env, *newname, *com2; - cleanenv = login = 0; - argv0 = (char *)NULL; + cleanenv = login = orig_job_control = 0; + exec_argv0 = argv0 = (char *)NULL; reset_internal_getopt (); while ((opt = internal_getopt (list, "cla:")) != -1) @@ -118,6 +121,7 @@ exec_builtin (list) case 'a': argv0 = list_optarg; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -141,14 +145,27 @@ exec_builtin (list) #endif /* RESTRICTED_SHELL */ args = strvec_from_word_list (list, 1, 0, (int *)NULL); + env = (char **)0; /* 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]); + command = absolute_program (args[0]) ? args[0] : search_for_command (args[0], 1); if (command == 0) { - sh_notfound (args[0]); - exit_value = EX_NOTFOUND; /* As per Posix.2, 3.14.6 */ + if (file_isdir (args[0])) + { +#if defined (EISDIR) + builtin_error (_("%s: cannot execute: %s"), args[0], strerror (EISDIR)); +#else + builtin_error (_("%s: cannot execute: %s"), args[0], strerror (errno)); +#endif + exit_value = EX_NOEXEC; + } + else + { + sh_notfound (args[0]); + exit_value = EX_NOTFOUND; /* As per Posix.2, 3.14.6 */ + } goto failed_exec; } @@ -164,6 +181,7 @@ exec_builtin (list) { free (args[0]); args[0] = login ? mkdashname (argv0) : savestring (argv0); + exec_argv0 = savestring (args[0]); } else if (login) { @@ -174,12 +192,18 @@ exec_builtin (list) /* 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) + exported environment to include the new value. If we've already forked + and are in a subshell, we don't want to decrement the shell level, + since we are `increasing' the level */ + + if (cleanenv == 0 && (subshell_environment & SUBSHELL_PAREN) == 0) adjust_shell_level (-1); if (cleanenv) - env = (char **)NULL; + { + env = strvec_create (1); + env[0] = (char *)0; + } else { maybe_make_export_env (); @@ -191,14 +215,22 @@ exec_builtin (list) maybe_save_shell_history (); #endif /* HISTORY */ - restore_original_signals (); + reset_signal_handlers (); /* leave trap strings in place */ #if defined (JOB_CONTROL) + orig_job_control = job_control; /* XXX - was also interactive_shell */ if (subshell_environment == 0) end_job_control (); + if (interactive || job_control) + default_tty_job_signals (); /* undo initialize_job_signals */ #endif /* JOB_CONTROL */ - shell_execve (command, args, env); +#if defined (BUFFERED_INPUT) + if (default_buffered_input >= 0) + sync_buffered_stream (default_buffered_input); +#endif + + exit_value = 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 @@ -207,7 +239,9 @@ exec_builtin (list) if (cleanenv == 0) adjust_shell_level (1); - if (executable_file (command) == 0) + if (exit_value == EX_NOTFOUND) /* no duplicate error message */ + goto failed_exec; + else 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 */ @@ -219,16 +253,22 @@ failed_exec: FREE (command); if (subshell_environment || (interactive == 0 && no_exit_on_failed_exec == 0)) - exit_shell (exit_value); + exit_shell (last_command_exit_value = exit_value); if (args) strvec_dispose (args); - initialize_traps (); + if (env && env != export_env) + strvec_dispose (env); + + /* If we're not exiting after the exec fails, we restore the shell signal + handlers and then modify the signal dispositions based on the trap strings + before the failed exec. */ initialize_signals (1); + restore_traps (); #if defined (JOB_CONTROL) - if (interactive_shell || job_control) + if (orig_job_control) restart_job_control (); #endif /* JOB_CONTROL */ diff --git a/builtins/exit.def b/builtins/exit.def index 34728eb..9c85bc5 100644 --- a/builtins/exit.def +++ b/builtins/exit.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -41,25 +41,24 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.h" #include "../jobs.h" +#include "../trap.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 exit_or_logout PARAMS((WORD_LIST *)); static int sourced_logout; int exit_builtin (list) WORD_LIST *list; { + CHECK_HELPOPT (list); + if (interactive) { fprintf (stderr, login_shell ? _("logout\n") : "exit\n"); @@ -83,6 +82,8 @@ int logout_builtin (list) WORD_LIST *list; { + CHECK_HELPOPT (list); + if (login_shell == 0 /* && interactive */) { builtin_error (_("not login shell: use `exit'")); @@ -150,7 +151,7 @@ exit_or_logout (list) last_command_exit_value = exit_value; /* Exit the program. */ - jump_to_top_level (EXITPROG); + jump_to_top_level (EXITBLTIN); /*NOTREACHED*/ } diff --git a/builtins/fc.def b/builtins/fc.def index a378d9d..9b8a997 100644 --- a/builtins/fc.def +++ b/builtins/fc.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,7 +52,7 @@ $END #include #if defined (HISTORY) -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif #include "../bashtypes.h" @@ -75,6 +75,7 @@ $END #include "../shell.h" #include "../builtins.h" #include "../flags.h" +#include "../parser.h" #include "../bashhist.h" #include "maxpath.h" #include @@ -85,14 +86,19 @@ $END 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; +#define HIST_INVALID INT_MIN +#define HIST_ERANGE INT_MIN+1 +#define HIST_NOTFOUND INT_MIN+2 -extern int unlink __P((const char *)); +/* Values for the flags argument to fc_gethnum */ +#define HN_LISTING 0x01 +#define HN_FIRST 0x02 -extern FILE *sh_mktmpfp __P((char *, int, char **)); +extern int unlink PARAMS((const char *)); + +extern FILE *sh_mktmpfp PARAMS((char *, int, char **)); + +extern int suppress_debug_trap_verbose; /* **************************************************************** */ /* */ @@ -148,16 +154,22 @@ typedef struct repl { } \ } 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 *)); +static char *fc_dosubs PARAMS((char *, REPL *)); +static char *fc_gethist PARAMS((char *, HIST_ENTRY **, int)); +static int fc_gethnum PARAMS((char *, HIST_ENTRY **, int)); +static int fc_number PARAMS((WORD_LIST *)); +static void fc_replhist PARAMS((char *)); #ifdef INCLUDE_UNUSED -static char *fc_readline __P((FILE *)); -static void fc_addhist __P((char *)); +static char *fc_readline PARAMS((FILE *)); +static void fc_addhist PARAMS((char *)); #endif +static void +set_verbose_flag () +{ + echo_input_at_read = verbose_flag; +} + /* String to execute on a file that we want to edit. */ #define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}" #if defined (STRICT_POSIX) @@ -173,7 +185,7 @@ fc_builtin (list) register int i; register char *sep; int numbering, reverse, listing, execute; - int histbeg, histend, last_hist, retval, opt, rh; + int histbeg, histend, last_hist, retval, opt, rh, real_last; FILE *stream; REPL *rlist, *rl; char *ename, *command, *newcom, *fcedit; @@ -197,7 +209,7 @@ fc_builtin (list) break; case 'l': - listing = 1; + listing = HN_LISTING; /* for fc_gethnum */ break; case 'r': @@ -212,6 +224,7 @@ fc_builtin (list) ename = list_optarg; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -255,7 +268,7 @@ fc_builtin (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); + command = fc_gethist (list ? list->word->word : (char *)NULL, hlist, 0); if (command == NULL) { @@ -303,13 +316,30 @@ fc_builtin (list) rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); last_hist = i - rh - hist_last_line_added; + /* Make sure that real_last is calculated the same way here and in + fc_gethnum. The return value from fc_gethnum is treated specially if + it is == real_last and we are listing commands. */ + real_last = i; + /* back up from the end to the last non-null history entry */ + while (hlist[real_last] == 0 && real_last > 0) + real_last--; + + /* XXX */ + if (i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; + if (last_hist < 0) + last_hist = 0; /* per POSIX */ + if (list) { - histbeg = fc_gethnum (list->word->word, hlist); + histbeg = fc_gethnum (list->word->word, hlist, listing|HN_FIRST); list = list->next; if (list) - histend = fc_gethnum (list->word->word, hlist); + histend = fc_gethnum (list->word->word, hlist, listing); + else if (histbeg == real_last) + histend = listing ? real_last : histbeg; else histend = listing ? last_hist : histbeg; } @@ -328,6 +358,28 @@ fc_builtin (list) histbeg = histend = last_hist; } + if (histbeg == HIST_INVALID || histend == HIST_INVALID) + { + sh_erange ((char *)NULL, _("history specification")); + return (EXECUTION_FAILURE); + } + else if (histbeg == HIST_ERANGE || histend == HIST_ERANGE) + { + sh_erange ((char *)NULL, _("history specification")); + return (EXECUTION_FAILURE); + } + else if (histbeg == HIST_NOTFOUND || histend == HIST_NOTFOUND) + { + builtin_error (_("no command found")); + return (EXECUTION_FAILURE); + } + + /* We don't throw an error for line specifications out of range, per POSIX */ + if (histbeg < 0) + histbeg = 0; + if (histend < 0) + histend = 0; + /* "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) @@ -341,14 +393,36 @@ fc_builtin (list) in parse_and_execute(). */ if (histbeg == histend && histend == last_hist && hlist[last_hist] == 0) last_hist = histbeg = --histend; + + if (hlist[last_hist] == 0) + last_hist--; + if (histend >= last_hist) + histend = last_hist; + else if (histbeg >= last_hist) + histbeg = last_hist; } - /* We print error messages for line specifications out of range. */ - if ((histbeg < 0) || (histend < 0)) + if (histbeg == HIST_INVALID || histend == HIST_INVALID) + { + sh_erange ((char *)NULL, _("history specification")); + return (EXECUTION_FAILURE); + } + else if (histbeg == HIST_ERANGE || histend == HIST_ERANGE) { sh_erange ((char *)NULL, _("history specification")); return (EXECUTION_FAILURE); } + else if (histbeg == HIST_NOTFOUND || histend == HIST_NOTFOUND) + { + builtin_error (_("no command found")); + return (EXECUTION_FAILURE); + } + + /* We don't throw an error for line specifications out of range, per POSIX */ + if (histbeg < 0) + histbeg = 0; + if (histend < 0) + histend = 0; if (histend < histbeg) { @@ -376,6 +450,8 @@ fc_builtin (list) for (i = reverse ? histend : histbeg; reverse ? i >= histbeg : i <= histend; reverse ? i-- : i++) { QUIT; + if (hlist[i] == 0) + continue; if (numbering) fprintf (stream, "%d", i + history_base); if (listing) @@ -385,7 +461,8 @@ fc_builtin (list) else fprintf (stream, "\t%c", histdata (i) ? '*' : ' '); } - fprintf (stream, "%s\n", histline (i)); + if (histline (i)) + fprintf (stream, "%s\n", histline (i)); } if (listing) @@ -396,6 +473,7 @@ fc_builtin (list) { sh_wrerror (); fclose (stream); + FREE (fn); return (EXECUTION_FAILURE); } fclose (stream); @@ -420,6 +498,13 @@ fc_builtin (list) return (EXECUTION_FAILURE); } +#if defined (READLINE) + /* If we're executing as part of a dispatched readline command like + {emacs,vi}_edit_and_execute_command, the readline state will indicate it. + We could remove the partial command from the history, but ksh93 doesn't + so we stay compatible. */ +#endif + /* 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 @@ -429,13 +514,14 @@ fc_builtin (list) /* 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 (xfree, fn); add_unwind_protect (unlink, fn); - unwind_protect_int (echo_input_at_read); + add_unwind_protect (set_verbose_flag, (char *)NULL); + unwind_protect_int (suppress_debug_trap_verbose); echo_input_at_read = 1; - - retval = fc_execute_file (fn); + suppress_debug_trap_verbose = 1; + retval = fc_execute_file (fn); run_unwind_frame ("fc builtin"); return (retval); @@ -458,16 +544,21 @@ fc_number (list) /* 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. */ + is a string, then it is the start of a command line present in HLIST. + MODE includes HN_LISTING if we are listing commands, and does not if we + are executing them. If MODE includes HN_FIRST we are looking for the + first history number specification. */ static int -fc_gethnum (command, hlist) +fc_gethnum (command, hlist, mode) char *command; HIST_ENTRY **hlist; + int mode; { int sign, n, clen, rh; - register int i, j; + register int i, j, last_hist, real_last, listing; register char *s; + listing = mode & HN_LISTING; sign = 1; /* Count history elements. */ for (i = 0; hlist[i]; i++); @@ -485,12 +576,25 @@ fc_gethnum (command, hlist) 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; + last_hist = i - rh - hist_last_line_added; + + if (i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; + if (last_hist < 0) + return (-1); + + real_last = i; + i = last_hist; /* No specification defaults to most recent command. */ if (command == NULL) return (i); + /* back up from the end to the last non-null history entry */ + while (hlist[real_last] == 0 && real_last > 0) + real_last--; + /* Otherwise, there is a specification. It can be a number relative to the current position, or an absolute history number. */ s = command; @@ -507,19 +611,33 @@ fc_gethnum (command, hlist) n = atoi (s); n *= sign; + /* We want to return something that is an offset to HISTORY_BASE. */ + /* If the value is negative or zero, then it is an offset from the current history item. */ + /* We don't use HN_FIRST here, so we don't return different values + depending on whether we're looking for the first or last in a + pair of range arguments, but nobody else does, either. */ if (n < 0) { n += i + 1; return (n < 0 ? 0 : n); } else if (n == 0) - return (i); + return ((sign == -1) ? (listing ? real_last : HIST_INVALID) : i); else { + /* If we're out of range (greater than I (last history entry) or + less than HISTORY_BASE, we want to return different values + based on whether or not we are looking for the first or last + value in a desired range of history entries. */ n -= history_base; - return (i < n ? i : n); + if (n < 0) + return (mode & HN_FIRST ? 0 : i); + else if (n >= i) + return (mode & HN_FIRST ? 0 : i); + else + return n; } } @@ -529,22 +647,24 @@ fc_gethnum (command, hlist) if (STREQN (command, histline (j), clen)) return (j); } - return (-1); + return (HIST_NOTFOUND); } /* Locate the most recent history line which begins with - COMMAND in HLIST, and return a malloc()'ed copy of it. */ + COMMAND in HLIST, and return a malloc()'ed copy of it. + MODE is 1 if we are listing commands, 0 if we are executing them. */ static char * -fc_gethist (command, hlist) +fc_gethist (command, hlist, mode) char *command; HIST_ENTRY **hlist; + int mode; { int i; if (hlist == 0) return ((char *)NULL); - i = fc_gethnum (command, hlist); + i = fc_gethnum (command, hlist, mode); if (i >= 0) return (savestring (histline (i))); diff --git a/builtins/fg_bg.def b/builtins/fg_bg.def index ae7e904..0fb5322 100644 --- a/builtins/fg_bg.def +++ b/builtins/fg_bg.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -46,14 +46,13 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.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)); +static int fg_bg PARAMS((WORD_LIST *, int)); /* How to bring a job into the foreground. */ int @@ -63,6 +62,8 @@ fg_builtin (list) int fg_bit; register WORD_LIST *t; + CHECK_HELPOPT (list); + if (job_control == 0) { sh_nojobs ((char *)NULL); @@ -105,6 +106,8 @@ bg_builtin (list) { int r; + CHECK_HELPOPT (list); + if (job_control == 0) { sh_nojobs ((char *)NULL); diff --git a/builtins/gen-helpfiles.c b/builtins/gen-helpfiles.c new file mode 100644 index 0000000..d27d306 --- /dev/null +++ b/builtins/gen-helpfiles.c @@ -0,0 +1,198 @@ +/* gen-helpfiles - create files containing builtin help text */ + +/* Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +/* This links with a specially-generated version of builtins.c and takes + the long_doc members of each struct builtin element and writes those to + the file named by the `handle' member of the struct builtin element. */ + +#if !defined (CROSS_COMPILING) +# include +#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 +# endif +# include +#endif + +#ifndef _MINIX +# include "../bashtypes.h" +# if defined (HAVE_SYS_FILE_H) +# include +# endif +#endif + +#include "posixstat.h" +#include "filecntl.h" + +#include "../bashansi.h" +#include +#include + +#include "stdc.h" + +#include "../builtins.h" +#include "tmpbuiltins.h" + +#if defined (USING_BASH_MALLOC) +#undef xmalloc +#undef xrealloc +#undef xfree + +#undef malloc +#undef free /* defined in xmalloc.h */ +#endif + +#ifndef errno +extern int errno; +#endif + +#if !defined (__STDC__) && !defined (strcpy) +extern char *strcpy (); +#endif /* !__STDC__ && !strcpy */ + +#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 + +/* 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; + +/* Forward declarations. */ + +int write_helpfiles PARAMS((struct builtin *)); + +/* For each file mentioned on the command line, process it and + write the information to STRUCTFILE and EXTERNFILE, while + creating the production file if necessary. */ +int +main (argc, argv) + int argc; + char **argv; +{ + int arg_index = 1; + + while (arg_index < argc && argv[arg_index][0] == '-') + { + char *arg = argv[arg_index++]; + + if (strcmp (arg, "-noproduction") == 0) + ; + else if (strcmp (arg, "-H") == 0) + 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); + } + } + + write_helpfiles(shell_builtins); + + exit (0); +} + +/* 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) + FILE *stream; + char *documentation; + int indentation; +{ + if (stream == 0) + return; + + if (documentation) + fprintf (stream, "%*s%s\n", indentation, " ", documentation); +} + +int +write_helpfiles (builtins) + struct builtin *builtins; +{ + char *helpfile, *bname, *fname; + FILE *helpfp; + int i, hdlen; + struct builtin b; + + 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 < num_shell_builtins; i++) + { + b = builtins[i]; + + fname = (char *)b.handle; + helpfile = (char *)malloc (hdlen + strlen (fname) + 1); + if (helpfile == 0) + { + fprintf (stderr, "gen-helpfiles: cannot allocate memory\n"); + exit (1); + } + sprintf (helpfile, "helpfiles/%s", fname); + + helpfp = fopen (helpfile, "w"); + if (helpfp == 0) + { + fprintf (stderr, "write_helpfiles: cannot open %s\n", helpfile); + free (helpfile); + continue; + } + + write_documentation (helpfp, b.long_doc[0], 4); + + fflush (helpfp); + fclose (helpfp); + free (helpfile); + } + return 0; +} diff --git a/builtins/getopt.c b/builtins/getopt.c index feb18b5..9529bc3 100644 --- a/builtins/getopt.c +++ b/builtins/getopt.c @@ -223,6 +223,52 @@ sh_getopt_restore_state (argv) nextchar = argv[sh_curopt] + sh_charindex; } +sh_getopt_state_t * +sh_getopt_alloc_istate () +{ + sh_getopt_state_t *ret; + + ret = (sh_getopt_state_t *)xmalloc (sizeof (sh_getopt_state_t)); + return ret; +} + +void +sh_getopt_dispose_istate (gs) + sh_getopt_state_t *gs; +{ + free (gs); +} + +sh_getopt_state_t * +sh_getopt_save_istate () +{ + sh_getopt_state_t *ret; + + ret = sh_getopt_alloc_istate (); + + ret->gs_optarg = sh_optarg; + ret->gs_optind = sh_optind; + ret->gs_curopt = sh_curopt; + ret->gs_nextchar = nextchar; /* XXX */ + ret->gs_charindex = sh_charindex; + ret->gs_flags = 0; /* XXX for later use */ + + return ret; +} + +void +sh_getopt_restore_istate (state) + sh_getopt_state_t *state; +{ + sh_optarg = state->gs_optarg; + sh_optind = state->gs_optind; + sh_curopt = state->gs_curopt; + nextchar = state->gs_nextchar; /* XXX - probably not usable */ + sh_charindex = state->gs_charindex; + + sh_getopt_dispose_istate (state); +} + #if 0 void sh_getopt_debug_restore_state (argv) diff --git a/builtins/getopt.h b/builtins/getopt.h index 75fdec5..fd97859 100644 --- a/builtins/getopt.h +++ b/builtins/getopt.h @@ -1,6 +1,6 @@ /* getopt.h - declarations for getopt. */ -/* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -59,7 +59,24 @@ 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 **)); +extern int sh_getopt PARAMS((int, char *const *, const char *)); + +typedef struct sh_getopt_state +{ + char *gs_optarg; + int gs_optind; + int gs_curopt; + char *gs_nextchar; + int gs_charindex; + int gs_flags; +} sh_getopt_state_t; + +extern void sh_getopt_restore_state PARAMS((char **)); + +extern sh_getopt_state_t *sh_getopt_alloc_istate PARAMS((void)); +extern void sh_getopt_dispose_istate PARAMS((sh_getopt_state_t *)); + +extern sh_getopt_state_t *sh_getopt_save_istate PARAMS((void)); +extern void sh_getopt_restore_istate PARAMS((sh_getopt_state_t *)); #endif /* _SH_GETOPT_H */ diff --git a/builtins/getopts.def b/builtins/getopts.def index c077c8e..4c39c47 100644 --- a/builtins/getopts.def +++ b/builtins/getopts.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,7 +22,7 @@ $PRODUCES getopts.c $BUILTIN getopts $FUNCTION getopts_builtin -$SHORT_DOC getopts optstring name [arg] +$SHORT_DOC getopts optstring name [arg ...] Parse option arguments. Getopts is used by shell procedures to parse positional parameters @@ -54,8 +54,8 @@ 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. +Getopts normally parses the positional parameters, but if arguments +are supplied as ARG values, they are parsed instead. Exit Status: Returns success if an option is found; fails if the end of options is @@ -74,8 +74,10 @@ $END #endif #include "../bashansi.h" +#include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.h" #include "common.h" #include "bashgetopt.h" #include "getopt.h" @@ -84,10 +86,9 @@ $END #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 **)); +static int getopts_unbind_variable PARAMS((char *)); +static int getopts_bind_variable PARAMS((char *, char *)); +static int dogetopts PARAMS((int, char **)); /* getopts_reset is magic code for when OPTIND is reset. N is the value that has just been assigned to OPTIND. */ @@ -99,6 +100,17 @@ getopts_reset (newind) sh_badopt = 0; } +static int +getopts_unbind_variable (name) + char *name; +{ +#if 0 + return (unbind_variable (name)); +#else + return (unbind_variable_noref (name)); +#endif +} + static int getopts_bind_variable (name, value) char *name, *value; @@ -108,7 +120,9 @@ getopts_bind_variable (name, value) if (legal_identifier (name)) { v = bind_variable (name, value, 0); - return (v && (readonly_p (v) == 0)) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; + if (v && (readonly_p (v) || noassign_p (v))) + return (EX_MISCERROR); + return (v ? EXECUTION_SUCCESS : EXECUTION_FAILURE); } else { @@ -198,10 +212,7 @@ dogetopts (argc, argv) 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++) - ; + i = number_of_args () + 1; /* +1 for $0 */ v = strvec_create (i + 1); for (i = 0; i < 10 && dollar_vars[i]; i++) v[i] = dollar_vars[i]; @@ -251,7 +262,7 @@ dogetopts (argc, argv) if (ret == G_EOF) { - unbind_variable ("OPTARG"); + getopts_unbind_variable ("OPTARG"); getopts_bind_variable (name, "?"); return (EXECUTION_FAILURE); } @@ -268,7 +279,7 @@ dogetopts (argc, argv) bind_variable ("OPTARG", strval, 0); } else - unbind_variable ("OPTARG"); + getopts_unbind_variable ("OPTARG"); return (ret); } @@ -287,7 +298,7 @@ dogetopts (argc, argv) else { ret = getopts_bind_variable (name, "?"); - unbind_variable ("OPTARG"); + getopts_unbind_variable ("OPTARG"); } return (ret); } @@ -314,9 +325,12 @@ getopts_builtin (list) } reset_internal_getopt (); - if (internal_getopt (list, "") != -1) + if ((ret = internal_getopt (list, "")) != -1) { - builtin_usage (); + if (ret == GETOPT_HELP) + builtin_help (); + else + builtin_usage (); return (EX_USAGE); } list = loptend; diff --git a/builtins/hash.def b/builtins/hash.def index 7a8aced..03ae547 100644 --- a/builtins/hash.def +++ b/builtins/hash.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -29,15 +29,15 @@ 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 + -d forget the remembered location of each NAME + -l display in a format that may be reused as input + -p pathname use PATHNAME as 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 + NAME Each NAME is searched for in $PATH and added to the list of remembered commands. Exit Status: @@ -61,21 +61,20 @@ $END #include "../shell.h" #include "../builtins.h" +#include "../execute_cmd.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)); +static int add_hashed_command PARAMS((char *, int)); +static int print_hash_info PARAMS((BUCKET_CONTENTS *)); +static int print_portable_hash_info PARAMS((BUCKET_CONTENTS *)); +static int print_hashed_commands PARAMS((int)); +static int list_hashed_filename_targets PARAMS((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 @@ -115,6 +114,7 @@ hash_builtin (list) case 't': list_targets = 1; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -123,9 +123,9 @@ hash_builtin (list) list = loptend; /* hash -t requires at least one argument. */ - if (list == 0 && list_targets) + if (list == 0 && (delete || list_targets)) { - sh_needarg ("-t"); + sh_needarg (delete ? "-d" : "-t"); return (EXECUTION_FAILURE); } @@ -134,10 +134,11 @@ hash_builtin (list) if (list == 0 && expunge_hash_table == 0) { opt = print_hashed_commands (list_portably); - if (opt == 0 && posixly_correct == 0) + if (opt == 0 && posixly_correct == 0 && + (list_portably == 0 || shell_compatibility_level <= 50)) printf (_("%s: hash table empty\n"), this_command_name); - return (EXECUTION_SUCCESS); + return (sh_chkwrite (EXECUTION_SUCCESS)); } if (expunge_hash_table) @@ -148,10 +149,23 @@ hash_builtin (list) return (list_hashed_filename_targets (list, list_portably)); #if defined (RESTRICTED_SHELL) - if (restricted && pathname && strchr (pathname, '/')) + if (restricted && pathname) { - sh_restricted (pathname); - return (EXECUTION_FAILURE); + if (strchr (pathname, '/')) + { + sh_restricted (pathname); + return (EXECUTION_FAILURE); + } + /* If we are changing the hash table in a restricted shell, make sure the + target pathname can be found using a $PATH search. */ + w = find_user_command (pathname); + if (w == 0 || *w == 0 || executable_file (w) == 0) + { + sh_notfound (pathname); + free (w); + return (EXECUTION_FAILURE); + } + free (w); } #endif @@ -159,9 +173,11 @@ hash_builtin (list) { /* Add, remove or rehash the specified commands. */ w = list->word->word; - if (pathname) + if (absolute_program (w)) + continue; + else if (pathname) { - if (is_directory (pathname)) + if (file_isdir (pathname)) { #ifdef EISDIR builtin_error ("%s: %s", pathname, strerror (EISDIR)); @@ -173,8 +189,6 @@ hash_builtin (list) else phash_insert (w, pathname, 0, 0); } - else if (absolute_program (w)) - continue; else if (delete) { if (phash_remove (w)) @@ -202,6 +216,7 @@ add_hashed_command (w, quiet) rv = 0; if (find_function (w) == 0 && find_shell_builtin (w) == 0) { + phash_remove (w); full_path = find_user_command (w); if (full_path && executable_file (full_path)) phash_insert (w, full_path, dot_found_in_search, 0); @@ -229,7 +244,15 @@ static int print_portable_hash_info (item) BUCKET_CONTENTS *item; { - printf ("builtin hash -p %s %s\n", pathdata(item)->path, item->key); + char *fp, *fn; + + fp = printable_filename (pathdata(item)->path, 1); + fn = printable_filename (item->key, 1); + printf ("builtin hash -p %s %s\n", fp, fn); + if (fp != pathdata(item)->path) + free (fp); + if (fn != item->key) + free (fn); return 0; } @@ -275,6 +298,7 @@ list_hashed_filename_targets (list, fmt) printf ("%s\t", l->word->word); printf ("%s\n", target); } + free (target); } return (all_found ? EXECUTION_SUCCESS : EXECUTION_FAILURE); diff --git a/builtins/help.def b/builtins/help.def index f857af9..346d93f 100644 --- a/builtins/help.def +++ b/builtins/help.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -34,10 +34,10 @@ 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 + PATTERN Arguments: - PATTERN Pattern specifiying a help topic + PATTERN Pattern specifying a help topic Exit Status: Returns success unless PATTERN is not found or an invalid option is given. @@ -58,11 +58,13 @@ $END #include #include +#include #include "../bashintl.h" #include "../shell.h" #include "../builtins.h" +#include "../execute_cmd.h" #include "../pathexp.h" #include "common.h" #include "bashgetopt.h" @@ -77,11 +79,11 @@ extern int errno; 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)); +static void show_builtin_command_help PARAMS((void)); +static int open_helpfile PARAMS((char *)); +static void show_desc PARAMS((char *, int)); +static void show_manpage PARAMS((char *, int)); +static void show_longdoc PARAMS((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 @@ -92,7 +94,7 @@ help_builtin (list) { register int i; char *pattern, *name; - int plen, match_found, sflag, dflag, mflag; + int plen, match_found, sflag, dflag, mflag, m, pass, this_found; dflag = sflag = mflag = 0; reset_internal_getopt (); @@ -109,6 +111,7 @@ help_builtin (list) case 's': sflag = 1; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -125,11 +128,11 @@ help_builtin (list) /* We should consider making `help bash' do something. */ - if (glob_pattern_p (list->word->word)) + if (glob_pattern_p (list->word->word) == 1) { - printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1))); + printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1))); print_word_list (list, ", "); - printf ("'\n\n"); + printf ("%s", _("'\n\n")); } for (match_found = 0, pattern = ""; list; list = list->next) @@ -137,29 +140,43 @@ help_builtin (list) pattern = list->word->word; plen = strlen (pattern); - for (i = 0; name = shell_builtins[i].name; i++) + for (pass = 1, this_found = 0; pass < 3; pass++) { - QUIT; - if ((strncmp (pattern, name, plen) == 0) || - (strmatch (pattern, name, FNMATCH_EXTFLAG) != FNM_NOMATCH)) + for (i = 0; name = shell_builtins[i].name; i++) { - 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); + QUIT; + + /* First pass: look for exact string or pattern matches. + Second pass: look for prefix matches like bash-4.2 */ + if (pass == 1) + m = (strcmp (pattern, name) == 0) || + (strmatch (pattern, name, FNMATCH_EXTFLAG) != FNM_NOMATCH); + else + m = strncmp (pattern, name, plen) == 0; + + if (m) + { + this_found = 1; + 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 (pass == 1 && this_found == 1) + break; } } @@ -169,8 +186,29 @@ help_builtin (list) return (EXECUTION_FAILURE); } - fflush (stdout); - return (EXECUTION_SUCCESS); + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +void +builtin_help () +{ + int ind; + ptrdiff_t d; + + current_builtin = builtin_address_internal (this_command_name, 0); + if (current_builtin == 0) + return; + + d = current_builtin - shell_builtins; + +#if defined (__STDC__) + ind = (int)d; +#else + ind = (int)d / sizeof (struct builtin); +#endif + + printf ("%s: %s\n", this_command_name, _(shell_builtins[ind].short_doc)); + show_longdoc (ind); } static int @@ -209,7 +247,7 @@ show_longdoc (i) zcatfd (fd, 1, doc[0]); close (fd); } - else + else if (doc) for (j = 0; doc[j]; j++) printf ("%*s%s\n", BASE_INDENT, " ", _(doc[j])); } @@ -219,7 +257,7 @@ show_desc (name, i) char *name; int i; { - register int j; + register int j, r; char **doc, *line; int fd, usefile; @@ -231,8 +269,9 @@ show_desc (name, i) fd = open_helpfile (doc[0]); if (fd < 0) return; - zmapfd (fd, &line, doc[0]); + r = zmapfd (fd, &line, doc[0]); close (fd); + /* XXX - handle errors if zmapfd returns < 0 */ } else line = doc ? doc[0] : (char *)NULL; @@ -288,7 +327,7 @@ show_manpage (name, i) /* SYNOPSIS */ printf ("SYNOPSIS\n"); - printf ("%*s%s\n\n", BASE_INDENT, " ", shell_builtins[i].short_doc); + printf ("%*s%s\n\n", BASE_INDENT, " ", _(shell_builtins[i].short_doc)); /* DESCRIPTION */ printf ("DESCRIPTION\n"); @@ -326,6 +365,153 @@ show_manpage (name, i) free (line); } +static void +dispcolumn (i, buf, bufsize, width, height) + int i; + char *buf; + size_t bufsize; + int width, height; +{ + int j; + int dispcols; + char *helpdoc; + + /* first column */ + helpdoc = _(shell_builtins[i].short_doc); + + buf[0] = (shell_builtins[i].flags & BUILTIN_ENABLED) ? ' ' : '*'; + strncpy (buf + 1, helpdoc, width - 2); + buf[width - 2] = '>'; /* indicate truncation */ + buf[width - 1] = '\0'; + printf ("%s", buf); + if (((i << 1) >= num_shell_builtins) || (i+height >= num_shell_builtins)) + { + printf ("\n"); + return; + } + + dispcols = strlen (buf); + /* two spaces */ + for (j = dispcols; j < width; j++) + putc (' ', stdout); + + /* second column */ + helpdoc = _(shell_builtins[i+height].short_doc); + + buf[0] = (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? ' ' : '*'; + strncpy (buf + 1, helpdoc, width - 3); + buf[width - 3] = '>'; /* indicate truncation */ + buf[width - 2] = '\0'; + + printf ("%s\n", buf); +} + +#if defined (HANDLE_MULTIBYTE) +static void +wdispcolumn (i, buf, bufsize, width, height) + int i; + char *buf; + size_t bufsize; + int width, height; +{ + int j; + int dispcols, dispchars; + char *helpdoc; + wchar_t *wcstr; + size_t slen, n; + + /* first column */ + helpdoc = _(shell_builtins[i].short_doc); + + wcstr = 0; + slen = mbstowcs ((wchar_t *)0, helpdoc, 0); + if (slen == -1) + { + dispcolumn (i, buf, bufsize, width, height); + return; + } + + /* No bigger than the passed max width */ + if (slen >= width) + slen = width - 2; + wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (width + 2)); + n = mbstowcs (wcstr+1, helpdoc, slen + 1); + wcstr[n+1] = L'\0'; + + /* Turn tabs and newlines into spaces for column display, since wcwidth + returns -1 for them */ + for (j = 1; j < n; j++) + if (wcstr[j] == L'\n' || wcstr[j] == L'\t') + wcstr[j] = L' '; + + /* dispchars == number of characters that will be displayed */ + dispchars = wcsnwidth (wcstr+1, slen, width - 2); + /* dispcols == number of columns required to display DISPCHARS */ + dispcols = wcswidth (wcstr+1, dispchars) + 1; /* +1 for ' ' or '*' */ + + wcstr[0] = (shell_builtins[i].flags & BUILTIN_ENABLED) ? L' ' : L'*'; + + if (dispcols >= width-2) + { + wcstr[dispchars] = L'>'; /* indicate truncation */ + wcstr[dispchars+1] = L'\0'; + } + + printf ("%ls", wcstr); + if (((i << 1) >= num_shell_builtins) || (i+height >= num_shell_builtins)) + { + printf ("\n"); + free (wcstr); + return; + } + + /* at least one space */ + for (j = dispcols; j < width; j++) + putc (' ', stdout); + + /* second column */ + helpdoc = _(shell_builtins[i+height].short_doc); + slen = mbstowcs ((wchar_t *)0, helpdoc, 0); + if (slen == -1) + { + /* for now */ + printf ("%c%s\n", (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? ' ' : '*', helpdoc); + free (wcstr); + return; + } + + /* Reuse wcstr since it is already width wide chars long */ + if (slen >= width) + slen = width - 2; + n = mbstowcs (wcstr+1, helpdoc, slen + 1); + wcstr[n+1] = L'\0'; /* make sure null-terminated */ + + /* Turn tabs and newlines into spaces for column display */ + for (j = 1; j < n; j++) + if (wcstr[j] == L'\n' || wcstr[j] == L'\t') + wcstr[j] = L' '; + + /* dispchars == number of characters that will be displayed */ + dispchars = wcsnwidth (wcstr+1, slen, width - 2); + dispcols = wcswidth (wcstr+1, dispchars) + 1; /* +1 for ' ' or '*' */ + + wcstr[0] = (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? L' ' : L'*'; + + /* The dispchars-1 is there for terminals that behave strangely when you + have \n in the nth column for terminal width n; this is what bash-4.3 + did. */ + if (dispcols >= width - 2) + { + wcstr[dispchars-1] = L'>'; /* indicate truncation */ + wcstr[dispchars] = L'\0'; + } + + printf ("%ls\n", wcstr); + + free (wcstr); +} +#endif /* HANDLE_MULTIBYTE */ + static void show_builtin_command_help () { @@ -342,10 +528,7 @@ Use `man -k' or `info' to find out more about commands not in this list.\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 = default_columns (); width /= 2; if (width > sizeof (blurb)) @@ -358,28 +541,12 @@ A star (*) next to a name means that the command is disabled.\n\ { 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); +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + wdispcolumn (i, blurb, sizeof (blurb), width, height); + else +#endif + dispcolumn (i, blurb, sizeof (blurb), width, height); } } #endif /* HELP_BUILTIN */ diff --git a/builtins/history.def b/builtins/history.def index e8249e9..6918d8a 100644 --- a/builtins/history.def +++ b/builtins/history.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,23 +31,24 @@ 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. + -d offset delete the history entry at position OFFSET. Negative + offsets count back from the end of the history list -a append history lines from this session to the history file -n read all history lines not already read from the history file + and append them to the history list -r read the history file and append the contents to the history - list + 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 + 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 HISTFILE has a value, that is used, else ~/.bash_history. -If the $HISTTIMEFORMAT variable is set and not null, its value is used +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. @@ -74,6 +75,8 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../flags.h" +#include "../parser.h" #include "../bashhist.h" #include #include "bashgetopt.h" @@ -83,13 +86,10 @@ $END 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 *)); +static char *histtime PARAMS((HIST_ENTRY *, const char *)); +static int display_history PARAMS((WORD_LIST *)); +static void push_history PARAMS((WORD_LIST *)); +static int expand_and_print_history PARAMS((WORD_LIST *)); #define AFLAG 0x01 #define RFLAG 0x02 @@ -100,12 +100,16 @@ static int expand_and_print_history __P((WORD_LIST *)); #define CFLAG 0x40 #define DFLAG 0x80 +#ifndef TIMELEN_MAX +# define TIMELEN_MAX 128 +#endif + int history_builtin (list) WORD_LIST *list; { - int flags, opt, result, old_history_lines, obase; - char *filename, *delete_arg; + int flags, opt, result, old_history_lines, obase, ind; + char *filename, *delete_arg, *range; intmax_t delete_offset; flags = 0; @@ -141,6 +145,7 @@ history_builtin (list) flags |= PFLAG; #endif break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -177,16 +182,76 @@ history_builtin (list) return (sh_chkwrite (EXECUTION_SUCCESS)); } #endif + else if ((flags & DFLAG) && (range = strchr ((delete_arg[0] == '-') ? delete_arg + 1 : delete_arg, '-'))) + { + intmax_t delete_start, delete_end; + *range++ = '\0'; + if (legal_number (delete_arg, &delete_start) == 0 || legal_number (range, &delete_end) == 0) + { + range[-1] = '-'; + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + if (delete_arg[0] == '-' && delete_start < 0) + /* the_history[history_length] == 0x0, so this is correct */ + delete_start += history_length; + /* numbers as displayed by display_history are offset by history_base */ + else if (delete_start > 0) + delete_start -= history_base; + + if (delete_start < 0 || delete_start >= history_length) + { + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + + if (range[0] == '-' && delete_end < 0) + delete_end += history_length; + else if (delete_end > 0) + delete_end -= history_base; + + if (delete_end < 0 || delete_end >= history_length) + { + sh_erange (range, _("history position")); + return (EXECUTION_FAILURE); + } + /* XXX - print error if end < start? */ + result = bash_delete_history_range (delete_start, delete_end); + if (where_history () > history_length) + history_set_pos (history_length); + return (result ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + } else if (flags & DFLAG) { - if ((legal_number (delete_arg, &delete_offset) == 0) - || (delete_offset < history_base) - || (delete_offset > (history_base + history_length))) + if (legal_number (delete_arg, &delete_offset) == 0) { sh_erange (delete_arg, _("history position")); return (EXECUTION_FAILURE); } - opt = delete_offset; + /* check for negative offsets, count back from end of list */ + if (delete_arg[0] == '-' && delete_offset < 0) + { + /* since the_history[history_length] == 0x0, this calculation means + that history -d -1 will delete the last history entry, which at + this point is the history -d -1 we just added. */ + ind = history_length + delete_offset; + if (ind < 0) /* offset by history_base below */ + { + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + opt = ind + history_base; /* compensate for opt - history_base below */ + } + else if ((delete_offset < history_base) || (delete_offset >= (history_base + history_length))) + { + sh_erange (delete_arg, _("history position")); + return (EXECUTION_FAILURE); + } + else + opt = delete_offset; + + /* Positive arguments from numbers as displayed by display_history need + to be offset by history_base */ result = bash_delete_histent (opt - history_base); /* Since remove_history changes history_length, this can happen if we delete the last history entry. */ @@ -203,12 +268,24 @@ history_builtin (list) filename = list ? list->word->word : get_string_value ("HISTFILE"); result = EXECUTION_SUCCESS; +#if defined (RESTRICTED_SHELL) + if (restricted && strchr (filename, '/')) + { + sh_restricted (filename); + return (EXECUTION_FAILURE); + } +#endif + 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); + { + result = read_history (filename); + history_lines_in_file = history_lines_read_from_file; + /* history_lines_in_file = where_history () + history_base - 1; */ + } else if (flags & NFLAG) /* Read `new' history from file. */ { /* Read all of the lines in the file that we haven't already read. */ @@ -219,7 +296,8 @@ history_builtin (list) result = read_history_range (filename, history_lines_in_file, -1); using_history (); - history_lines_in_file = where_history (); + history_lines_in_file = history_lines_read_from_file; + /* history_lines_in_file = where_history () + history_base - 1; */ /* 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 @@ -248,12 +326,17 @@ histtime (hlist, histtimefmt) HIST_ENTRY *hlist; const char *histtimefmt; { - static char timestr[128]; + static char timestr[TIMELEN_MAX]; time_t t; + struct tm *tm; t = history_get_time (hlist); - if (t) - strftime (timestr, sizeof (timestr), histtimefmt, localtime (&t)); + tm = t ? localtime (&t) : 0; + if (t && tm) + strftime (timestr, sizeof (timestr), histtimefmt, tm); + else if (hlist->timestamp && hlist->timestamp[0]) + snprintf (timestr, sizeof (timestr), _("%s: invalid timestamp"), + (hlist->timestamp[0] == '#') ? hlist->timestamp + 1: hlist->timestamp); else strcpy (timestr, "??"); return timestr; @@ -324,9 +407,10 @@ push_history (list) 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) + if (remember_on_history && hist_last_line_pushed == 0 && + hist_last_line_added && bash_delete_last_history () == 0) #else - if (hist_last_line_pushed == 0 && + if (remember_on_history && 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) diff --git a/builtins/inlib.def b/builtins/inlib.def deleted file mode 100644 index c4faf0d..0000000 --- a/builtins/inlib.def +++ /dev/null @@ -1,80 +0,0 @@ -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 . - -$PRODUCES inlib.c -#include - -#include -#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 -#include - -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 index b14e91f..1ce098d 100644 --- a/builtins/jobs.def +++ b/builtins/jobs.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,8 +31,8 @@ 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 + -n lists 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 @@ -68,7 +68,7 @@ $END #define JSTATE_RUNNING 0x1 #define JSTATE_STOPPED 0x2 -static int execute_list_with_replacements __P((WORD_LIST *)); +static int execute_list_with_replacements PARAMS((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. @@ -118,6 +118,7 @@ jobs_builtin (list) state = JSTATE_STOPPED; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -212,7 +213,7 @@ execute_list_with_replacements (list) $BUILTIN disown $FUNCTION disown_builtin $DEPENDS_ON JOB_CONTROL -$SHORT_DOC disown [-h] [-ar] [jobspec ...] +$SHORT_DOC disown [-h] [-ar] [jobspec ... | pid ...] Remove jobs from current shell. Removes each JOBSPEC argument from the table of active jobs. Without @@ -221,7 +222,7 @@ 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 + shell receives a SIGHUP -r remove only running jobs Exit Status: @@ -252,6 +253,7 @@ disown_builtin (list) case 'r': running_jobs = 1; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -274,7 +276,7 @@ disown_builtin (list) { 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_by_pid ((pid_t) pid_value, 0, 0) : get_job_spec (list); if (job == NO_JOB || jobs == 0 || INVALID_JOB (job)) diff --git a/builtins/kill.def b/builtins/kill.def index 18c3667..c655092 100644 --- a/builtins/kill.def +++ b/builtins/kill.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -33,7 +33,8 @@ 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 + assumed to be signal numbers for which names should be listed + -L synonym for -l 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 @@ -57,6 +58,8 @@ $END #include "../bashansi.h" #include "../bashintl.h" +#include + #include "../shell.h" #include "../trap.h" #include "../jobs.h" @@ -67,9 +70,7 @@ $END extern int errno; #endif /* !errno */ -extern int posixly_correct; - -static void kill_error __P((pid_t, int)); +static void kill_error PARAMS((pid_t, int)); #if !defined (CONTINUE_AFTER_KILL_ERROR) # define CONTINUE_OR_FAIL return (EXECUTION_FAILURE) @@ -92,8 +93,9 @@ kill_builtin (list) if (list == 0) { builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } + CHECK_HELPOPT (list); any_succeeded = listing = saw_signal = 0; sig = SIGTERM; @@ -105,7 +107,7 @@ kill_builtin (list) { word = list->word->word; - if (ISOPTION (word, 'l')) + if (ISOPTION (word, 'l') || ISOPTION (word, 'L')) { listing++; list = list->next; @@ -116,14 +118,13 @@ kill_builtin (list) if (list) { sigspec = list->word->word; +use_sigspec: 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 + saw_signal++; } else { @@ -131,6 +132,16 @@ kill_builtin (list) return (EXECUTION_FAILURE); } } + else if (word[0] == '-' && word[1] == 's' && ISALPHA (word[2])) + { + sigspec = word + 2; + goto use_sigspec; + } + else if (word[0] == '-' && word[1] == 'n' && ISDIGIT (word[2])) + { + sigspec = word + 2; + goto use_sigspec; + } else if (ISOPTION (word, '-')) { list = list->next; @@ -139,7 +150,7 @@ kill_builtin (list) else if (ISOPTION (word, '?')) { builtin_usage (); - return (EXECUTION_SUCCESS); + return (EX_USAGE); } /* If this is a signal specification then process it. We only process the first one seen; other arguments may signify process groups (e.g, @@ -168,7 +179,7 @@ kill_builtin (list) if (list == 0) { builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } while (list) diff --git a/builtins/let.def b/builtins/let.def index 2601fb9..d090a45 100644 --- a/builtins/let.def +++ b/builtins/let.def @@ -61,7 +61,7 @@ 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.. +If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise. $END #include @@ -86,6 +86,8 @@ let_builtin (list) intmax_t ret; int expok; + CHECK_HELPOPT (list); + /* Skip over leading `--' argument. */ if (list && list->word && ISOPTION (list->word->word, '-')) list = list->next; @@ -98,7 +100,7 @@ let_builtin (list) for (; list; list = list->next) { - ret = evalexp (list->word->word, &expok); + ret = evalexp (list->word->word, EXP_EXPANDED, &expok); if (expok == 0) return (EXECUTION_FAILURE); } @@ -122,7 +124,7 @@ exp_builtin (list) } exp = string_list (list); - ret = evalexp (exp, &expok); + ret = evalexp (exp, EXP_EXPANDED, &expok); (void)free (exp); return (((ret == 0) || (expok == 0)) ? EXECUTION_FAILURE : EXECUTION_SUCCESS); } diff --git a/builtins/mapfile.def b/builtins/mapfile.def index 0946de3..4ddd723 100644 --- a/builtins/mapfile.def +++ b/builtins/mapfile.def @@ -2,7 +2,7 @@ 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. +Copyright (C) 2008-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,7 +23,7 @@ $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] +$SHORT_DOC mapfile [-d delim] [-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 @@ -31,20 +31,23 @@ 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. + -d delim Use DELIM to terminate lines, instead of newline + -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 DELIM from each line read (default newline) + -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. + 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. +element to be assigned and the line to be assigned to that element +as additional arguments. If not supplied with an explicit origin, mapfile will clear ARRAY before assigning to it. @@ -56,7 +59,7 @@ $END $BUILTIN readarray $FUNCTION mapfile_builtin -$SHORT_DOC readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array] +$SHORT_DOC readarray [-d delim] [-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'. @@ -65,6 +68,7 @@ $END #include #include "builtins.h" +#include "../bashtypes.h" #include "posixstat.h" #if defined (HAVE_UNISTD_H) @@ -88,7 +92,10 @@ extern int errno; #if defined (ARRAY_VARS) +static int run_callback PARAMS((const char *, unsigned int, const char *)); + #define DEFAULT_ARRAY_NAME "MAPFILE" +#define DEFAULT_VARIABLE_NAME "MAPLINE" /* not used right now */ /* The value specifying how frequently `mapfile' calls the callback. */ #define DEFAULT_QUANTUM 5000 @@ -97,19 +104,23 @@ extern int errno; #define MAPF_CLEARARRAY 0x01 #define MAPF_CHOP 0x02 +static int delim; + static int -run_callback(callback, current_index) +run_callback (callback, curindex, curline) const char *callback; - unsigned int current_index; + unsigned int curindex; + const char *curline; { unsigned int execlen; - char *execstr; + char *execstr, *qline; int flags; - execlen = strlen (callback) + 10; - /* 1 for space between %s and %d, + qline = sh_single_quote (curline); + execlen = strlen (callback) + strlen (qline) + 10; + /* 1 for each space between %s and %d, another 1 for the last nul char for C string. */ - execlen += 2; + execlen += 3; execstr = xmalloc (execlen); flags = SEVAL_NOHIST; @@ -117,32 +128,36 @@ run_callback(callback, current_index) if (interactive) flags |= SEVAL_INTERACT; #endif - snprintf (execstr, execlen, "%s %d", callback, current_index); - return parse_and_execute(execstr, NULL, flags); + snprintf (execstr, execlen, "%s %d %s", callback, curindex, qline); + free (qline); + return evalstring (execstr, NULL, flags); } static void -do_chop(line) - char * line; +do_chop(line, delim) + char *line; + unsigned char delim; { int length; length = strlen (line); - if (length && line[length-1] == '\n') + if (length && (unsigned char)line[length-1] == delim) line[length-1] = '\0'; } static int -mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_name, flags) +mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_name, delim, flags) int fd; long line_count_goal, origin, nskip, callback_quantum; char *callback, *array_name; + int delim; int flags; { char *line; size_t line_length; unsigned int array_index, line_count; SHELL_VAR *entry; + struct stat sb; int unbuffered_read; line = NULL; @@ -152,25 +167,18 @@ mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_n /* 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)); + entry = builtin_find_indexed_array (array_name, flags & MAPF_CLEARARRAY); + if (entry == 0) + return EXECUTION_FAILURE; #ifndef __CYGWIN__ - unbuffered_read = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); + /* If the delimiter is a newline, turn on unbuffered reads for pipes + (terminals are ok). If the delimiter is not a newline, unbuffered reads + for every file descriptor that's not a regular file. */ + if (delim == '\n') + unbuffered_read = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); + else + unbuffered_read = (fstat (fd, &sb) != 0) || (S_ISREG (sb.st_mode) == 0); #else unbuffered_read = 1; #endif @@ -179,45 +187,46 @@ mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_n /* 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) + if (zgetline (fd, &line, &line_length, delim, 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++) + zgetline (fd, &line, &line_length, delim, unbuffered_read) != -1; + array_index++) { - /* 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); + do_chop (line, delim); /* 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); + + run_callback (callback, array_index, line); } + /* XXX - bad things can happen if the callback modifies ENTRY, e.g., + unsetting it or changing it to a non-indexed-array type. */ bind_array_element (entry, array_index, line, 0); + + /* Have we exceeded # of lines to store? */ + line_count++; + if (line_count_goal != 0 && line_count > line_count_goal) + break; } - xfree (line); + free (line); if (unbuffered_read == 0) zsyncfd (fd); - interrupt_immediately--; return EXECUTION_SUCCESS; } @@ -225,23 +234,26 @@ int mapfile_builtin (list) WORD_LIST *list; { - int opt, code, fd, clear_array, flags; + int opt, code, fd, 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; + delim = '\n'; reset_internal_getopt (); - while ((opt = internal_getopt (list, "u:n:O:tC:c:s:")) != -1) + while ((opt = internal_getopt (list, "d:u:n:O:tC:c:s:")) != -1) { switch (opt) { + case 'd': + delim = *list_optarg; + break; case 'u': code = legal_number (list_optarg, &intval); if (code == 0 || intval < 0 || intval != (int)intval) @@ -307,6 +319,7 @@ mapfile_builtin (list) else nskip = intval; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -329,13 +342,13 @@ mapfile_builtin (list) else array_name = list->word->word; - if (legal_identifier (array_name) == 0 && valid_array_reference (array_name) == 0) + if (legal_identifier (array_name) == 0) { sh_invalidid (array_name); return (EXECUTION_FAILURE); } - return mapfile (fd, lines, origin, nskip, callback_quantum, callback, array_name, flags); + return mapfile (fd, lines, origin, nskip, callback_quantum, callback, array_name, delim, flags); } #else diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c index cdd45e4..f505ebd 100644 --- a/builtins/mkbuiltins.c +++ b/builtins/mkbuiltins.c @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -71,7 +71,9 @@ extern char *strcpy (); /* Flag values that builtins can have. */ #define BUILTIN_FLAG_SPECIAL 0x01 #define BUILTIN_FLAG_ASSIGNMENT 0x02 -#define BUILTIN_FLAG_POSIX_BUILTIN 0x04 +#define BUILTIN_FLAG_LOCALVAR 0x04 +#define BUILTIN_FLAG_POSIX_BUILTIN 0x08 +#define BUILTIN_FLAG_ARRAYREF_ARG 0x10 #define BASE_INDENT 4 @@ -85,6 +87,10 @@ int only_documentation = 0; /* Non-zero means to not do any productions. */ int inhibit_production = 0; +/* Non-zero means to not add functions (xxx_builtin) to the members of the + produced `struct builtin []' */ +int inhibit_functions = 0; + /* Non-zero means to produce separate help files for each builtin, named by the builtin name, in `./helpfiles'. */ int separate_helpfiles = 0; @@ -107,6 +113,12 @@ char *struct_filename = (char *)NULL; /* The name of the external declaration file. */ char *extern_filename = (char *)NULL; +/* The name of the include file to write into the structure file, if it's + different from extern_filename. */ +char *include_filename = (char *)NULL; + +/* The name of the include file to put into the generated struct filename. */ + /* Here is a structure for manipulating arrays of data. */ typedef struct { int size; /* Number of slots allocated to array. */ @@ -155,6 +167,11 @@ char *assignment_builtins[] = (char *)NULL }; +char *localvar_builtins[] = +{ + "declare", "local", "typeset", (char *)NULL +}; + /* The builtin commands that are special to the POSIX search order. */ char *posix_builtins[] = { @@ -163,10 +180,22 @@ char *posix_builtins[] = (char *)NULL }; +/* The builtin commands that can take array references as arguments and pay + attention to `assoc_expand_once'. These are the ones that don't assign + values, but need to avoid double expansions. */ +char *arrayvar_builtins[] = +{ + "declare", "let", "local", "printf", "read", "test", "[", + "typeset", "unset", "wait", /*]*/ + (char *)NULL +}; + /* Forward declarations. */ static int is_special_builtin (); static int is_assignment_builtin (); +static int is_localvar_builtin (); static int is_posix_builtin (); +static int is_arrayvar_builtin (); #if !defined (HAVE_RENAME) static int rename (); @@ -198,7 +227,7 @@ void remove_trailing_whitespace (); /* 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. */ + creating the production file if necessary. */ int main (argc, argv) int argc; @@ -218,10 +247,14 @@ main (argc, argv) if (strcmp (arg, "-externfile") == 0) extern_filename = argv[arg_index++]; + else if (strcmp (arg, "-includefile") == 0) + include_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, "-nofunctions") == 0) + inhibit_functions = 1; else if (strcmp (arg, "-document") == 0) documentation_file = fopen (documentation_filename, "w"); else if (strcmp (arg, "-D") == 0) @@ -259,6 +292,9 @@ main (argc, argv) } } + if (include_filename == 0) + include_filename = extern_filename; + /* If there are no files to process, just quit now. */ if (arg_index == argc) exit (0); @@ -322,10 +358,13 @@ main (argc, argv) fclose (externfile); } +#if 0 + /* This is now done by a different program */ if (separate_helpfiles) { write_helpfiles (saved_builtins); } +#endif if (documentation_file) { @@ -390,7 +429,7 @@ copy_string_array (array) return (copy); } -/* Add ELEMENT to ARRAY, growing the array if neccessary. */ +/* Add ELEMENT to ARRAY, growing the array if necessary. */ void array_add (element, array) char *element; @@ -423,7 +462,7 @@ array_free (array) /* The definition of a function. */ typedef int Function (); -typedef int mk_handler_func_t __P((char *, DEF_FILE *, char *)); +typedef int mk_handler_func_t PARAMS((char *, DEF_FILE *, char *)); /* Structure handles processor directives. */ typedef struct { @@ -431,14 +470,14 @@ typedef struct { 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 *)); +extern int builtin_handler PARAMS((char *, DEF_FILE *, char *)); +extern int function_handler PARAMS((char *, DEF_FILE *, char *)); +extern int short_doc_handler PARAMS((char *, DEF_FILE *, char *)); +extern int comment_handler PARAMS((char *, DEF_FILE *, char *)); +extern int depends_on_handler PARAMS((char *, DEF_FILE *, char *)); +extern int produces_handler PARAMS((char *, DEF_FILE *, char *)); +extern int end_handler PARAMS((char *, DEF_FILE *, char *)); +extern int docname_handler PARAMS((char *, DEF_FILE *, char *)); HANDLER_ENTRY handlers[] = { { "BUILTIN", builtin_handler }, @@ -519,6 +558,7 @@ extract_info (filename, structfile, externfile) if (nr == 0) { fprintf (stderr, "mkbuiltins: %s: skipping zero-length file\n", filename); + free (buffer); return; } @@ -537,7 +577,7 @@ extract_info (filename, structfile, externfile) { array_add (&buffer[i], defs->lines); - while (buffer[i] != '\n' && i < file_size) + while (i < file_size && buffer[i] != '\n') i++; buffer[i++] = '\0'; } @@ -810,8 +850,12 @@ builtin_handler (self, defs, arg) new->flags |= BUILTIN_FLAG_SPECIAL; if (is_assignment_builtin (name)) new->flags |= BUILTIN_FLAG_ASSIGNMENT; + if (is_localvar_builtin (name)) + new->flags |= BUILTIN_FLAG_LOCALVAR; if (is_posix_builtin (name)) new->flags |= BUILTIN_FLAG_POSIX_BUILTIN; + if (is_arrayvar_builtin (name)) + new->flags |= BUILTIN_FLAG_ARRAYREF_ARG; array_add ((char *)new, defs->builtins); building_builtin = 1; @@ -1092,7 +1136,7 @@ char *structfile_header[] = { "/* 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.", + "/* Copyright (C) 1987-2022 Free Software Foundation, Inc.", "", " This file is part of GNU Bash, the Bourne Again SHell.", "", @@ -1122,12 +1166,14 @@ char *structfile_header[] = { " the list of shell reserved control structures, like `if' and `while'.", " The end of the list is denoted with a NULL name field. */", "", + "/* TRANSLATORS: Please do not translate command names in descriptions */", + "", "#include \"../builtins.h\"", (char *)NULL }; char *structfile_footer[] = { - " { (char *)0x0, (sh_builtin_func_t *)0x0, 0, (char **)0x0, (char *)0x0 }", + " { (char *)0x0, (sh_builtin_func_t *)0x0, 0, (char **)0x0, (char *)0x0, (char *)0x0 }", "};", "", "struct builtin *shell_builtins = static_shell_builtins;", @@ -1138,7 +1184,7 @@ char *structfile_footer[] = { (char *)NULL }; -/* Write out any neccessary opening information for +/* Write out any necessary opening information for STRUCTFILE and EXTERNFILE. */ void write_file_headers (structfile, externfile) @@ -1152,7 +1198,7 @@ write_file_headers (structfile, externfile) fprintf (structfile, "%s\n", structfile_header[i]); fprintf (structfile, "#include \"%s\"\n", - extern_filename ? extern_filename : "builtext.h"); + include_filename ? include_filename : "builtext.h"); fprintf (structfile, "#include \"bashintl.h\"\n"); @@ -1162,7 +1208,7 @@ write_file_headers (structfile, externfile) if (externfile) fprintf (externfile, "/* %s - The list of builtins found in libbuiltins.a. */\n", - extern_filename ? extern_filename : "builtext.h"); + include_filename ? include_filename : "builtext.h"); } /* Write out any necessary closing information for @@ -1212,7 +1258,7 @@ write_builtins (defs, structfile, externfile) if (externfile) { if (builtin->function) - fprintf (externfile, "extern int %s __P((WORD_LIST *));\n", + fprintf (externfile, "extern int %s PARAMS((WORD_LIST *));\n", builtin->function); fprintf (externfile, "extern char * const %s_doc[];\n", @@ -1224,22 +1270,42 @@ write_builtins (defs, structfile, externfile) { fprintf (structfile, " { \"%s\", ", builtin->name); - if (builtin->function) + if (builtin->function && inhibit_functions == 0) fprintf (structfile, "%s, ", builtin->function); else fprintf (structfile, "(sh_builtin_func_t *)0x0, "); - fprintf (structfile, "%s%s%s%s, %s_doc,\n", + fprintf (structfile, "%s%s%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_LOCALVAR) ? " | LOCALVAR_BUILTIN" : "", (builtin->flags & BUILTIN_FLAG_POSIX_BUILTIN) ? " | POSIX_BUILTIN" : "", + (builtin->flags & BUILTIN_FLAG_ARRAYREF_ARG) ? " | ARRAYREF_BUILTIN" : "", document_name (builtin)); - fprintf - (structfile, " N_(\"%s\"), (char *)NULL },\n", - builtin->shortdoc ? builtin->shortdoc : builtin->name); - + /* Don't translate short document summaries that are identical + to command names */ + if (builtin->shortdoc && strcmp (builtin->name, builtin->shortdoc) == 0) + { + if (inhibit_functions) + fprintf (structfile, " \"%s\", \"%s\" },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name, + document_name (builtin)); + else + fprintf (structfile, " \"%s\", (char *)NULL },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name); + } + else + { + if (inhibit_functions) + fprintf (structfile, " N_(\"%s\"), \"%s\" },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name, + document_name (builtin)); + else + fprintf (structfile, " N_(\"%s\"), (char *)NULL },\n", + builtin->shortdoc ? builtin->shortdoc : builtin->name); + } } if (structfile || separate_helpfiles) @@ -1247,7 +1313,7 @@ write_builtins (defs, structfile, externfile) long documentation strings. */ save_builtin (builtin); - /* Write out the matching #endif, if neccessary. */ + /* Write out the matching #endif, if necessary. */ if (builtin->dependencies) { if (externfile) @@ -1308,6 +1374,26 @@ write_longdocs (stream, builtins) } } +void +write_dummy_declarations (stream, builtins) + FILE *stream; + ARRAY *builtins; +{ + register int i; + BUILTIN_DESC *builtin; + + for (i = 0; structfile_header[i]; i++) + fprintf (stream, "%s\n", structfile_header[i]); + + for (i = 0; i < builtins->sindex; i++) + { + builtin = (BUILTIN_DESC *)builtins->array[i]; + + /* How to guarantee that no builtin is written more than once? */ + fprintf (stream, "int %s () { return (0); }\n", builtin->function); + } +} + /* 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, @@ -1380,7 +1466,7 @@ write_documentation (stream, documentation, indentation, flags) { register int i, j; register char *line; - int string_array, texinfo, base_indent, last_cpp, filename_p; + int string_array, texinfo, base_indent, filename_p; if (stream == 0) return; @@ -1407,7 +1493,7 @@ write_documentation (stream, documentation, indentation, flags) 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++) + for (i = 0, texinfo = (flags & TEXINFO); documentation && (line = documentation[i]); i++) { /* Allow #ifdef's to be written out verbatim, but don't put them into separate help files. */ @@ -1415,11 +1501,8 @@ write_documentation (stream, documentation, indentation, flags) { 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) @@ -1574,6 +1657,13 @@ is_assignment_builtin (name) return (_find_in_table (name, assignment_builtins)); } +static int +is_localvar_builtin (name) + char *name; +{ + return (_find_in_table (name, localvar_builtins)); +} + static int is_posix_builtin (name) char *name; @@ -1581,6 +1671,13 @@ is_posix_builtin (name) return (_find_in_table (name, posix_builtins)); } +static int +is_arrayvar_builtin (name) + char *name; +{ + return (_find_in_table (name, arrayvar_builtins)); +} + #if !defined (HAVE_RENAME) static int rename (from, to) diff --git a/builtins/printf.def b/builtins/printf.def index e447633..d10cbab 100644 --- a/builtins/printf.def +++ b/builtins/printf.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1997-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,11 +35,20 @@ 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: +In addition to the standard format specifications described in printf(1), +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 + %Q like %q, but apply any precision to the unquoted argument before + quoting + %(fmt)T output the date-time string resulting from using FMT as a format + string for strftime(3) + +The format is re-used as necessary to consume all of the arguments. If +there are fewer arguments than the format requires, extra format +specifications behave as if a zero value or null string, as appropriate, +had been supplied. Exit Status: Returns success unless an invalid option is given or a write or assignment @@ -72,9 +81,12 @@ $END # include #endif +#include "posixtime.h" #include "../bashansi.h" #include "../bashintl.h" +#define NEED_STRFTIME_DECL + #include "../shell.h" #include "shmbutil.h" #include "stdc.h" @@ -106,6 +118,7 @@ extern int errno; vbadd (b, 1); \ else \ putchar (c); \ + QUIT; \ } while (0) #define PF(f, func) \ @@ -117,10 +130,11 @@ extern int errno; 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, fieldwidth, func); \ + nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \ else \ nw = vflag ? vbprintf (f, func) : printf (f, func); \ tw += nw; \ + QUIT; \ if (ferror (stdout)) \ { \ sh_wrerror (); \ @@ -133,10 +147,14 @@ extern int errno; #define PRETURN(value) \ do \ { \ + QUIT; \ if (vflag) \ { \ - bind_printf_variable (vname, vbuf, 0); \ + SHELL_VAR *v; \ + v = builtin_bind_variable (vname, vbuf, bindflags); \ stupidly_hack_special_variables (vname); \ + if (v == 0 || readonly_p (v) || noassign_p (v)) \ + return (EXECUTION_FAILURE); \ } \ if (conv_bufsize > 4096 ) \ { \ @@ -152,8 +170,9 @@ extern int errno; } \ else if (vbuf) \ vbuf[0] = 0; \ - terminate_immediately--; \ - fflush (stdout); \ + if (ferror (stdout) == 0) \ + fflush (stdout); \ + QUIT; \ if (ferror (stdout)) \ { \ sh_wrerror (); \ @@ -167,47 +186,56 @@ extern int errno; #define SKIP1 "#'-+ 0" #define LENMODS "hjlLtz" +#ifndef TIMELEN_MAX +# define TIMELEN_MAX 128 +#endif + +extern time_t shell_start_time; + #if !HAVE_ASPRINTF -extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); +extern int asprintf PARAMS((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); #endif #if !HAVE_VSNPRINTF -extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4))); +extern int vsnprintf PARAMS((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)); +static void printf_erange PARAMS((char *)); +static int printstr PARAMS((char *, char *, int, int, int)); +static int tescape PARAMS((char *, char *, int *, int *)); +static char *bexpand PARAMS((char *, int, int *, int *)); +static char *vbadd PARAMS((char *, int)); +static int vbprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static char *mklong PARAMS((char *, char *, size_t)); +static int getchr PARAMS((void)); +static char *getstr PARAMS((void)); +static int getint PARAMS((void)); +static intmax_t getintmax PARAMS((void)); +static uintmax_t getuintmax PARAMS((void)); #if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN) typedef long double floatmax_t; +# define USE_LONG_DOUBLE 1 # define FLOATMAX_CONV "L" # define strtofltmax strtold #else typedef double floatmax_t; +# define USE_LONG_DOUBLE 0 # define FLOATMAX_CONV "" # define strtofltmax strtod #endif -static floatmax_t getfloatmax __P((void)); +static double getdouble PARAMS((void)); +static floatmax_t getfloatmax PARAMS((void)); -static intmax_t asciicode __P((void)); +static intmax_t asciicode PARAMS((void)); -static WORD_LIST *garglist; +static WORD_LIST *garglist, *orig_arglist; static int retval; static int conversion_error; /* printf -v var support */ static int vflag = 0; +static int bindflags = 0; static char *vbuf, *vname; static size_t vbsize; static int vblen; @@ -222,12 +250,17 @@ printf_builtin (list) WORD_LIST *list; { int ch, fieldwidth, precision; - int have_fieldwidth, have_precision; - char convch, thisch, nextch, *format, *modstart, *fmt, *start; + int have_fieldwidth, have_precision, use_Lmod, altform; + char convch, thisch, nextch, *format, *modstart, *precstart, *fmt, *start; +#if defined (HANDLE_MULTIBYTE) + char mbch[25]; /* 25 > MB_LEN_MAX, plus can handle 4-byte UTF-8 and large Unicode characters*/ + int mbind, mblen; +#endif +#if defined (ARRAY_VARS) + int arrayflags; +#endif conversion_error = 0; - retval = EXECUTION_SUCCESS; - vflag = 0; reset_internal_getopt (); @@ -237,13 +270,18 @@ printf_builtin (list) { case 'v': vname = list_optarg; + bindflags = 0; #if defined (ARRAY_VARS) - if (legal_identifier (vname) || valid_array_reference (vname)) + SET_VFLAGS (list_optflags, arrayflags, bindflags); + retval = legal_identifier (vname) || valid_array_reference (vname, arrayflags); #else - if (legal_identifier (vname)) + retval = legal_identifier (vname); #endif + if (retval) { vflag = 1; + if (vbsize == 0) + vbuf = xmalloc (vbsize = 16); vblen = 0; if (vbuf) vbuf[0] = 0; @@ -254,6 +292,7 @@ printf_builtin (list) return (EX_USAGE); } break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -267,20 +306,28 @@ printf_builtin (list) return (EX_USAGE); } + /* Allow printf -v var "" to act like var="" */ + if (vflag && list->word->word && list->word->word[0] == '\0') + { + SHELL_VAR *v; + v = builtin_bind_variable (vname, "", 0); + stupidly_hack_special_variables (vname); + return ((v == 0 || readonly_p (v) || noassign_p (v)) ? EXECUTION_FAILURE : EXECUTION_SUCCESS); + } + if (list->word->word == 0 || list->word->word[0] == '\0') return (EXECUTION_SUCCESS); format = list->word->word; tw = 0; + retval = EXECUTION_SUCCESS; - garglist = list->next; + garglist = orig_arglist = 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, @@ -294,15 +341,25 @@ printf_builtin (list) for (fmt = format; *fmt; fmt++) { precision = fieldwidth = 0; - have_fieldwidth = have_precision = 0; + have_fieldwidth = have_precision = altform = 0; + precstart = 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); +#if defined (HANDLE_MULTIBYTE) + /* Accommodate possible use of \u or \U, which can result in + multibyte characters */ + memset (mbch, '\0', sizeof (mbch)); + fmt += tescape (fmt, mbch, &mblen, (int *)NULL); + for (mbind = 0; mbind < mblen; mbind++) + PC (mbch[mbind]); +#else + fmt += tescape (fmt, &nextch, (int *)NULL, (int *)NULL); PC (nextch); +#endif fmt--; /* for loop will increment it for us again */ continue; } @@ -322,9 +379,11 @@ printf_builtin (list) continue; } - /* found format specification, skip to field width */ + /* Found format specification, skip to field width. We check for + alternate form for possible later use. */ for (; *fmt && strchr(SKIP1, *fmt); ++fmt) - ; + if (*fmt == '#') + altform++; /* Skip optional field width. */ if (*fmt == '*') @@ -359,6 +418,8 @@ printf_builtin (list) if (*fmt == '-') #endif fmt++; + if (DIGIT (*fmt)) + precstart = fmt; while (DIGIT (*fmt)) fmt++; } @@ -366,8 +427,12 @@ printf_builtin (list) /* skip possible format modifiers */ modstart = fmt; + use_Lmod = 0; while (*fmt && strchr (LENMODS, *fmt)) - fmt++; + { + use_Lmod |= USE_LONG_DOUBLE && *fmt == 'L'; + fmt++; + } if (*fmt == 0) { @@ -381,6 +446,7 @@ printf_builtin (list) modstart[0] = convch; modstart[1] = '\0'; + QUIT; switch(convch) { case 'c': @@ -401,6 +467,82 @@ printf_builtin (list) break; } + case '(': + { + char *timefmt, timebuf[TIMELEN_MAX], *t; + int n; + intmax_t arg; + time_t secs; + struct tm *tm; + + modstart[1] = nextch; /* restore char after left paren */ + timefmt = xmalloc (strlen (fmt) + 3); + fmt++; /* skip over left paren */ + for (t = timefmt, n = 1; *fmt; ) + { + if (*fmt == '(') + n++; + else if (*fmt == ')') + n--; + if (n == 0) + break; + *t++ = *fmt++; + } + *t = '\0'; + if (*++fmt != 'T') + { + builtin_warning (_("`%c': invalid time format specification"), *fmt); + fmt = start; + free (timefmt); + PC (*fmt); + continue; + } + if (timefmt[0] == '\0') + { + timefmt[0] = '%'; + timefmt[1] = 'X'; /* locale-specific current time - should we use `+'? */ + timefmt[2] = '\0'; + } + /* argument is seconds since the epoch with special -1 and -2 */ + /* default argument is equivalent to -1; special case */ + arg = garglist ? getintmax () : -1; + if (arg == -1) + secs = NOW; /* roughly date +%s */ + else if (arg == -2) + secs = shell_start_time; /* roughly $SECONDS */ + else + secs = arg; +#if defined (HAVE_TZSET) + sv_tz ("TZ"); /* XXX -- just make sure */ +#endif + tm = localtime (&secs); + if (tm == 0) + { + secs = 0; + tm = localtime (&secs); + } + n = tm ? strftime (timebuf, sizeof (timebuf), timefmt, tm) : 0; + free (timefmt); + if (n == 0) + timebuf[0] = '\0'; + else + timebuf[sizeof(timebuf) - 1] = '\0'; + /* convert to %s format that preserves fieldwidth and precision */ + modstart[0] = 's'; + modstart[1] = '\0'; + n = printstr (start, timebuf, strlen (timebuf), fieldwidth, precision); /* XXX - %s for now */ + if (n < 0) + { + if (ferror (stdout) == 0) + { + sh_wrerror (); + clearerr (stdout); + } + PRETURN (EXECUTION_FAILURE); + } + break; + } + case 'n': { char *var; @@ -409,7 +551,7 @@ printf_builtin (list) if (var && *var) { if (legal_identifier (var)) - bind_var_to_int (var, tw); + bind_var_to_int (var, tw, 0); else { sh_invalidid (var); @@ -435,8 +577,11 @@ printf_builtin (list) r = printstr (start, xp, rlen, fieldwidth, precision); if (r < 0) { - sh_wrerror (); - clearerr (stdout); + if (ferror (stdout) == 0) + { + sh_wrerror (); + clearerr (stdout); + } retval = EXECUTION_FAILURE; } free (xp); @@ -448,20 +593,41 @@ printf_builtin (list) } case 'q': /* print with shell quoting */ + case 'Q': { char *p, *xp; - int r; + int r, mpr; + size_t slen; r = 0; p = getstr (); + /* Decode precision and apply it to the unquoted string. */ + if (convch == 'Q' && precstart) + { + mpr = *precstart++ - '0'; + while (DIGIT (*precstart)) + mpr = (mpr * 10) + (*precstart++ - '0'); + /* Error if precision > INT_MAX here? */ + precision = (mpr < 0 || mpr > INT_MAX) ? INT_MAX : mpr; + slen = strlen (p); + /* printf precision works in bytes. */ + if (precision < slen) + p[precision] = '\0'; + } 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); + xp = sh_backslash_quote (p, 0, 3); if (xp) { + if (convch == 'Q') + { + slen = strlen (xp); + if (slen > precision) + precision = slen; + } /* Use printstr to get fieldwidth and precision right. */ r = printstr (start, xp, strlen (xp), fieldwidth, precision); if (r < 0) @@ -537,11 +703,24 @@ printf_builtin (list) #endif { char *f; - floatmax_t p; - p = getfloatmax (); - f = mklong (start, FLOATMAX_CONV, sizeof(FLOATMAX_CONV) - 1); - PF (f, p); + if (use_Lmod || posixly_correct == 0) + { + floatmax_t p; + + p = getfloatmax (); + f = mklong (start, FLOATMAX_CONV, USE_LONG_DOUBLE); + PF (f, p); + } + else /* posixly_correct */ + { + double p; + + p = getdouble (); + f = mklong (start, "", 0); + PF (f, p); + } + break; } @@ -558,8 +737,7 @@ printf_builtin (list) if (ferror (stdout)) { - sh_wrerror (); - clearerr (stdout); + /* PRETURN will print error message. */ PRETURN (EXECUTION_FAILURE); } } @@ -592,13 +770,10 @@ printstr (fmt, string, len, fieldwidth, precision) #endif int padlen, nc, ljust, i; int fw, pr; /* fieldwidth and precision */ + intmax_t mfw, mpr; -#if 0 - if (string == 0 || *string == '\0') -#else - if (string == 0 || len == 0) -#endif - return 0; + if (string == 0) + string = ""; #if 0 s = fmt; @@ -608,6 +783,8 @@ printstr (fmt, string, len, fieldwidth, precision) ljust = fw = 0; pr = -1; + mfw = 0; + mpr = -1; /* skip flags */ while (strchr (SKIP1, *fmt)) @@ -617,7 +794,7 @@ printstr (fmt, string, len, fieldwidth, precision) fmt++; } - /* get fieldwidth, if present */ + /* get fieldwidth, if present. rely on caller to clamp fieldwidth at INT_MAX */ if (*fmt == '*') { fmt++; @@ -630,12 +807,14 @@ printstr (fmt, string, len, fieldwidth, precision) } else if (DIGIT (*fmt)) { - fw = *fmt++ - '0'; + mfw = *fmt++ - '0'; while (DIGIT (*fmt)) - fw = (fw * 10) + (*fmt++ - '0'); + mfw = (mfw * 10) + (*fmt++ - '0'); + /* Error if fieldwidth > INT_MAX here? */ + fw = (mfw < 0 || mfw > INT_MAX) ? INT_MAX : mfw; } - /* get precision, if present */ + /* get precision, if present. doesn't handle negative precisions */ if (*fmt == '.') { fmt++; @@ -646,17 +825,23 @@ printstr (fmt, string, len, fieldwidth, precision) } else if (DIGIT (*fmt)) { - pr = *fmt++ - '0'; + mpr = *fmt++ - '0'; while (DIGIT (*fmt)) - pr = (pr * 10) + (*fmt++ - '0'); + mpr = (mpr * 10) + (*fmt++ - '0'); + /* Error if precision > INT_MAX here? */ + pr = (mpr < 0 || mpr > INT_MAX) ? INT_MAX : mpr; + if (pr < precision && precision < INT_MAX) + pr = precision; /* XXX */ } + else + pr = 0; /* "a null digit string is treated as zero" */ } #if 0 /* If we remove this, get rid of `s'. */ if (*fmt != 'b' && *fmt != 'q') { - internal_error ("format parsing problem: %s", s); + internal_error (_("format parsing problem: %s"), s); fw = pr = 0; } #endif @@ -699,15 +884,18 @@ printstr (fmt, string, len, fieldwidth, precision) 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) +tescape (estart, cp, lenp, sawc) char *estart; char *cp; - int *sawc; + int *lenp, *sawc; { register char *p; int temp, c, evalue; + unsigned long uvalue; p = estart; + if (lenp) + *lenp = 1; switch (c = *p++) { @@ -743,14 +931,10 @@ tescape (estart, cp, sawc) *cp = evalue & 0xFF; break; - /* And, as another extension, we allow \xNNN, where each N is a + /* And, as another extension, we allow \xNN, 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) { @@ -761,6 +945,30 @@ tescape (estart, cp, sawc) *cp = evalue & 0xFF; break; +#if defined (HANDLE_MULTIBYTE) + case 'u': + case 'U': + temp = (c == 'u') ? 4 : 8; /* \uNNNN \UNNNNNNNN */ + for (uvalue = 0; ISXDIGIT ((unsigned char)*p) && temp--; p++) + uvalue = (uvalue * 16) + HEXVALUE (*p); + if (p == estart + 1) + { + builtin_error (_("missing unicode digit for \\%c"), c); + *cp = '\\'; + return 0; + } + if (uvalue <= 0x7f) /* <= 0x7f translates directly */ + *cp = uvalue; + else + { + temp = u32cconv (uvalue, cp); + cp[temp] = '\0'; + if (lenp) + *lenp = temp; + } + break; +#endif + case '\\': /* \\ -> \ */ *cp = c; break; @@ -799,18 +1007,20 @@ bexpand (string, len, sawc, lenp) { int temp; char *ret, *r, *s, c; +#if defined (HANDLE_MULTIBYTE) + char mbch[25]; + int mbind, mblen; +#endif -#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 (1); + ret[0] = '\0'; + return (ret); } ret = (char *)xmalloc (len + 1); @@ -823,7 +1033,12 @@ bexpand (string, len, sawc, lenp) continue; } temp = 0; - s += tescape (s, &c, &temp); +#if defined (HANDLE_MULTIBYTE) + memset (mbch, '\0', sizeof (mbch)); + s += tescape (s, mbch, &mblen, &temp); +#else + s += tescape (s, &c, (int *)NULL, &temp); +#endif if (temp) { if (sawc) @@ -831,7 +1046,12 @@ bexpand (string, len, sawc, lenp) break; } +#if defined (HANDLE_MULTIBYTE) + for (mbind = 0; mbind < mblen; mbind++) + *r++ = mbch[mbind]; +#else *r++ = c; +#endif } *r = '\0'; @@ -903,7 +1123,7 @@ vbprintf (format, va_alist) #ifdef DEBUG if (strlen (vbuf) != vblen) - internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf)); + internal_error ("printf:vbprintf: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf)); #endif return (blen); @@ -967,6 +1187,9 @@ getint () ret = getintmax (); + if (garglist == 0) + return ret; + if (ret > INT_MAX) { printf_erange (garglist->word->word); @@ -1034,8 +1257,37 @@ getuintmax () if (*ep) { sh_invalidnum (garglist->word->word); +#if 0 /* Same POSIX.2 conversion error requirements as getintmax(). */ ret = 0; +#endif + conversion_error = 1; + } + else if (errno == ERANGE) + printf_erange (garglist->word->word); + + garglist = garglist->next; + return (ret); +} + +static double +getdouble () +{ + double ret; + char *ep; + + if (garglist == 0) + return (0); + + if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"') + return asciicode (); + + errno = 0; + ret = strtod (garglist->word->word, &ep); + + if (*ep) + { + sh_invalidnum (garglist->word->word); conversion_error = 1; } else if (errno == ERANGE) @@ -1063,8 +1315,10 @@ getfloatmax () if (*ep) { sh_invalidnum (garglist->word->word); +#if 0 /* Same thing about POSIX.2 conversion error requirements. */ ret = 0; +#endif conversion_error = 1; } else if (errno == ERANGE) @@ -1081,18 +1335,17 @@ asciicode () register intmax_t ch; #if defined (HANDLE_MULTIBYTE) wchar_t wc; - size_t mblength, slen; + size_t slen; + int mblength; #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 */ - } + wc = 0; + mblength = mbtowc (&wc, garglist->word->word+1, slen); + if (mblength > 0) + ch = wc; /* XXX */ else #endif ch = (unsigned char)garglist->word->word[1]; @@ -1100,19 +1353,3 @@ asciicode () 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.sh b/builtins/psize.sh index c4d73e1..29bc115 100644 --- a/builtins/psize.sh +++ b/builtins/psize.sh @@ -27,7 +27,7 @@ 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, +# existence 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. diff --git a/builtins/pushd.def b/builtins/pushd.def index 05b7529..829f827 100644 --- a/builtins/pushd.def +++ b/builtins/pushd.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -32,19 +32,19 @@ 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. + 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. + 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. + 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. + new current working directory. The `dirs' builtin displays the directory stack. @@ -64,16 +64,16 @@ 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. + 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. + 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. + 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. @@ -95,17 +95,19 @@ 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 + 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 + 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 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. + -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. @@ -115,7 +117,7 @@ $END #if defined (PUSHD_AND_POPD) #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif @@ -155,12 +157,12 @@ 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 *)); +static void pushd_error PARAMS((int, char *)); +static void clear_directory_stack PARAMS((void)); +static int cd_to_string PARAMS((char *)); +static int change_to_temp PARAMS((char *)); +static void add_dirstack_element PARAMS((char *)); +static int get_dirstack_index PARAMS((intmax_t, int, int *)); #define NOCD 0x01 #define ROTATE 0x02 @@ -178,6 +180,8 @@ pushd_builtin (list) char direction; orig_list = list; + + CHECK_HELPOPT (list); if (list && list->word && ISOPTION (list->word->word, '-')) { list = list->next; @@ -228,7 +232,7 @@ pushd_builtin (list) { sh_invalidnum (list->word->word); builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } if (direction == '-') @@ -245,7 +249,7 @@ pushd_builtin (list) { sh_invalidopt (list->word->word); builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } else break; @@ -321,6 +325,8 @@ popd_builtin (list) char direction; char *which_word; + CHECK_HELPOPT (list); + which_word = (char *)NULL; for (flags = 0, which = 0, direction = '+'; list; list = list->next) { @@ -339,7 +345,7 @@ popd_builtin (list) { sh_invalidnum (list->word->word); builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } which_word = list->word->word; } @@ -347,13 +353,19 @@ popd_builtin (list) { sh_invalidopt (list->word->word); builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); + } + else if (*list->word->word) + { + builtin_error (_("%s: invalid argument"), list->word->word); + builtin_usage (); + return (EX_USAGE); } else break; } - if (which > directory_list_offset || (directory_list_offset == 0 && which == 0)) + if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0)) { pushd_error (directory_list_offset, which_word ? which_word : ""); return (EXECUTION_FAILURE); @@ -375,6 +387,11 @@ popd_builtin (list) remove that directory from the list and shift the remainder of the list into place. */ i = (direction == '+') ? directory_list_offset - which : which; + if (i < 0 || i > directory_list_offset) + { + pushd_error (directory_list_offset, which_word ? which_word : ""); + return (EXECUTION_FAILURE); + } free (pushd_directory_list[i]); directory_list_offset--; @@ -396,6 +413,7 @@ dirs_builtin (list) intmax_t i; char *temp, *w; + CHECK_HELPOPT (list); for (flags = vflag = index_flag = 0, desired_index = -1, w = ""; list; list = list->next) { if (ISOPTION (list->word->word, 'l')) @@ -426,7 +444,7 @@ dirs_builtin (list) { sh_invalidnum (list->word->word); builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } sign = (*list->word->word == '+') ? 1 : -1; desired_index = get_dirstack_index (i, sign, &index_flag); @@ -435,7 +453,7 @@ dirs_builtin (list) { sh_invalidopt (list->word->word); builtin_usage (); - return (EXECUTION_FAILURE); + return (EX_USAGE); } } @@ -660,7 +678,7 @@ get_directory_stack (flags) d = "."; else { - t = polite_directory_format (d); + t = (flags&1) ? polite_directory_format (d) : 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. */ diff --git a/builtins/read.def b/builtins/read.def index 1ef9142..ddd91d3 100644 --- a/builtins/read.def +++ b/builtins/read.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,7 +30,8 @@ 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. +delimiters. By default, the backslash character escapes delimiter characters +and newline. If no NAMEs are supplied, the line read is stored in the REPLY variable. @@ -39,27 +40,31 @@ Options: 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 + -e use Readline to obtain the line + -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 + 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 + 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 + -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 within TIMEOUT seconds. The value of the + TMOUT variable is the default timeout. TIMEOUT may be a + fractional number. If TIMEOUT is 0, read returns + immediately, without trying to read any data, returning + 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, +The return code is zero, unless end-of-file is encountered, read times out +(in which case it's greater than 128), a variable assignment error occurs, or an invalid file descriptor is supplied as the argument to -u. $END @@ -89,6 +94,7 @@ $END #include "../shell.h" #include "common.h" #include "bashgetopt.h" +#include "trap.h" #include @@ -101,6 +107,9 @@ $END # include "input.h" #endif +#include "shmbutil.h" +#include "timer.h" + #if !defined(errno) extern int errno; #endif @@ -108,41 +117,80 @@ extern int errno; struct ttsave { int fd; - TTYSTRUCT *attrs; + 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 *)); +static void reset_attempted_completion_function PARAMS((char *)); +static int set_itext PARAMS((void)); +static char *edit_line PARAMS((char *, char *)); +static void set_eol_delim PARAMS((int)); +static void reset_eol_delim PARAMS((char *)); +static void set_readline_timeout PARAMS((sh_timer *t, time_t, long)); #endif -static SHELL_VAR *bind_read_variable __P((char *, char *)); +static SHELL_VAR *bind_read_variable PARAMS((char *, char *, int)); #if defined (HANDLE_MULTIBYTE) -static int read_mbchar __P((int, char *, int, int, int)); +static int read_mbchar PARAMS((int, char *, int, int, int)); #endif -static void ttyrestore __P((struct ttsave *)); +static void ttyrestore PARAMS((struct ttsave *)); + +static sighandler sigalrm PARAMS((int)); +static void reset_timeout PARAMS((void)); -static sighandler sigalrm __P((int)); -static void reset_alarm __P((void)); +/* Try this to see what the rest of the shell can do with the information. */ +sh_timer *read_timeout; -static procenv_t alrmbuf; +static int reading, tty_modified; static SigHandler *old_alrm; static unsigned char delim; +static struct ttsave termsave; + +/* In all cases, SIGALRM just sets a flag that we check periodically. This + avoids problems with the semi-tricky stuff we do with the xfree of + input_string at the top of the unwind-protect list (see below). */ + +/* Set a flag that check_read_timeout can check. This relies on zread or + read_builtin calling trap.c:check_signals() (which calls check_read_timeout()) */ static sighandler sigalrm (s) int s; { - longjmp (alrmbuf, 1); + /* Display warning if this is called without read_timeout set? */ + if (read_timeout) + read_timeout->alrmflag = 1; } static void -reset_alarm () +reset_timeout () +{ + /* Cancel alarm before restoring signal handler. */ + if (read_timeout) + shtimer_clear (read_timeout); +#if defined (READLINE) + rl_clear_timeout (); +#endif + read_timeout = 0; +} + +void +check_read_timeout () { - set_signal_handler (SIGALRM, old_alrm); - falarm (0, 0); + if (read_timeout && shtimer_chktimeout (read_timeout)) + sh_longjmp (read_timeout->jmpenv, 1); +} + +int +read_builtin_timeout (fd) + int fd; +{ + if ((read_timeout == 0) || + (read_timeout->fd != fd) || + (read_timeout->tmout.tv_sec == 0 && read_timeout->tmout.tv_usec == 0)) + return 0; + + return ((read_timeout->flags & SHTIMER_ALARM) ? shtimer_alrm (read_timeout) + : shtimer_select (read_timeout)); } /* Read the value of the shell variables whose names follow. @@ -156,9 +204,12 @@ read_builtin (list) WORD_LIST *list; { register char *varname; - int size, i, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2; + int size, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2, nflag; + volatile int i; int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul; int raw, edit, nchars, silent, have_timeout, ignore_delim, fd; + int lastsig, t_errno; + int mb_cur_max; unsigned int tmsec, tmusec; long ival, uval; intmax_t intval; @@ -168,13 +219,16 @@ read_builtin (list) struct stat tsb; SHELL_VAR *var; TTYSTRUCT ttattrs, ttset; - struct ttsave termsave; + sigset_t chldset, prevset; #if defined (ARRAY_VARS) WORD_LIST *alist; + int vflags; #endif + int bindflags; #if defined (READLINE) char *rlbuf, *itext; int rlind; + FILE *save_instream; #endif USE_VAR(size); @@ -199,6 +253,10 @@ read_builtin (list) #endif USE_VAR(list); USE_VAR(ps2); + USE_VAR(lastsig); + + reading = tty_modified = 0; + read_timeout = 0; i = 0; /* Index into the string that we are reading. */ raw = edit = 0; /* Not reading raw input by default. */ @@ -211,10 +269,11 @@ read_builtin (list) rlind = 0; #endif + mb_cur_max = MB_CUR_MAX; 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; + ignore_delim = nflag = 0; reset_internal_getopt (); while ((opt = internal_getopt (list, "ersa:d:i:n:p:t:u:N:")) != -1) @@ -246,7 +305,7 @@ read_builtin (list) break; #endif case 't': - code = uconvert (list_optarg, &ival, &uval); + code = uconvert (list_optarg, &ival, &uval, (char **)NULL); if (code == 0 || ival < 0 || uval < 0) { builtin_error (_("%s: invalid timeout specification"), list_optarg); @@ -263,6 +322,7 @@ read_builtin (list) ignore_delim = 1; delim = -1; case 'n': + nflag = 1; code = legal_number (list_optarg, &intval); if (code == 0 || intval < 0 || intval != (int)intval) { @@ -290,6 +350,7 @@ read_builtin (list) case 'd': delim = *list_optarg; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -300,11 +361,22 @@ read_builtin (list) /* `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); + + /* Convenience: check early whether or not the first of possibly several + variable names is a valid identifier, and bail early if so. */ +#if defined (ARRAY_VARS) + if (list) + SET_VFLAGS (list->word->flags, vflags, bindflags); + if (list && legal_identifier (list->word->word) == 0 && valid_array_reference (list->word->word, vflags) == 0) +#else + bindflags = 0; + if (list && legal_identifier (list->word->word) == 0) #endif + { + sh_invalidid (list->word->word); + return (EXECUTION_FAILURE); + } /* If we're asked to ignore the delimiter, make sure we do. */ if (ignore_delim) @@ -323,10 +395,18 @@ read_builtin (list) input_string = (char *)xmalloc (size = 112); /* XXX was 128 */ input_string[0] = '\0'; + /* More input and options validation */ + if (nflag == 1 && nchars == 0) + { + retval = read (fd, &c, 0); + retval = (retval >= 0) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; + goto assign_vars; /* bail early if asked to read 0 chars */ + } + /* $TMOUT, if set, is the default timeout for read. */ if (have_timeout == 0 && (e = get_string_value ("TMOUT"))) { - code = uconvert (e, &ival, &uval); + code = uconvert (e, &ival, &uval, (char **)NULL); if (code == 0 || ival < 0 || uval < 0) tmsec = tmusec = 0; else @@ -336,6 +416,12 @@ read_builtin (list) } } +#if defined (SIGCHLD) + sigemptyset (&chldset); + sigprocmask (SIG_BLOCK, (sigset_t *)0, &chldset); + sigaddset (&chldset, SIGCHLD); +#endif + begin_unwind_frame ("read_builtin"); #if defined (BUFFERED_INPUT) @@ -343,7 +429,11 @@ read_builtin (list) sync_buffered_stream (default_buffered_input); #endif +#if 1 input_is_tty = isatty (fd); +#else + input_is_tty = 1; +#endif if (input_is_tty == 0) #ifndef __CYGWIN__ input_is_pipe = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); @@ -380,25 +470,59 @@ read_builtin (list) if (tmsec > 0 || tmusec > 0) { - code = setjmp (alrmbuf); + read_timeout = shtimer_alloc (); + read_timeout->flags = SHTIMER_LONGJMP; + +#if defined (HAVE_SELECT) + read_timeout->flags |= (edit || posixly_correct) ? SHTIMER_ALARM : SHTIMER_SELECT; +#else + read_timeout->flags |= SHTIMER_ALARM; +#endif + read_timeout->fd = fd; + + read_timeout->alrm_handler = sigalrm; + } + + if (tmsec > 0 || tmusec > 0) + { + code = setjmp_nosigs (read_timeout->jmpenv); if (code) { + reset_timeout (); + sigprocmask (SIG_SETMASK, &prevset, (sigset_t *)0); + /* 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"); + so we have to save input_string temporarily, run the unwind- + protects, then restore input_string so we can use it later */ + orig_input_string = 0; input_string[i] = '\0'; /* make sure it's terminated */ + if (i == 0) + { + t = (char *)xmalloc (1); + t[0] = 0; + } + else + t = savestring (input_string); + + run_unwind_frame ("read_builtin"); + input_string = t; retval = 128+SIGALRM; goto assign_vars; } - old_alrm = set_signal_handler (SIGALRM, sigalrm); - add_unwind_protect (reset_alarm, (char *)NULL); + if (interactive_shell == 0) + initialize_terminating_signals (); + add_unwind_protect (reset_timeout, (char *)NULL); #if defined (READLINE) if (edit) - add_unwind_protect (reset_attempted_completion_function, (char *)NULL); + { + add_unwind_protect (reset_attempted_completion_function, (char *)NULL); + add_unwind_protect (bashline_reset_event_hook, (char *)NULL); + set_readline_timeout (read_timeout, tmsec, tmusec); + } + else #endif - falarm (tmsec, tmusec); + shtimer_set (read_timeout, tmsec, tmusec); } /* If we've been asked to read only NCHARS chars, or we're using some @@ -427,13 +551,16 @@ read_builtin (list) /* ttsave() */ termsave.fd = fd; ttgetattr (fd, &ttattrs); - termsave.attrs = &ttattrs; + termsave.attrs = ttattrs; ttset = ttattrs; i = silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset); if (i < 0) sh_ttyerror (1); + tty_modified = 1; add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); + if (interactive_shell == 0) + initialize_terminating_signals (); } } else if (silent) /* turn off echo but leave term in canonical mode */ @@ -441,24 +568,46 @@ read_builtin (list) /* ttsave (); */ termsave.fd = fd; ttgetattr (fd, &ttattrs); - termsave.attrs = &ttattrs; + termsave.attrs = ttattrs; ttset = ttattrs; i = ttfd_noecho (fd, &ttset); /* ttnoecho (); */ if (i < 0) sh_ttyerror (1); + tty_modified = 1; add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); + if (interactive_shell == 0) + initialize_terminating_signals (); } +#if defined (READLINE) + save_instream = 0; + if (edit && fd != 0) + { + if (bash_readline_initialized == 0) + initialize_readline (); + + unwind_protect_var (rl_instream); + save_instream = rl_instream; + rl_instream = fdopen (fd, "r"); + } +#endif + /* 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; + check_read_timeout (); + /* These only matter if edit == 0 */ + if ((nchars > 0) && (input_is_tty == 0) && ignore_delim) /* read -N */ + unbuffered_read = 2; +#if 0 + else if ((nchars > 0) || (delim != '\n') || input_is_pipe) +#else + else if (((nchars > 0 || delim != '\n') && input_is_tty) || input_is_pipe) + unbuffered_read = 1; +#endif if (prompt && edit == 0) { fprintf (stderr, "%s", prompt); @@ -472,19 +621,32 @@ read_builtin (list) ps2 = 0; for (print_ps2 = eof = retval = 0;;) { + check_read_timeout (); + #if defined (READLINE) if (edit) { - if (rlbuf && rlbuf[rlind] == '\0') + /* If we have a null delimiter, don't treat NULL as ending the line */ + if (rlbuf && rlbuf[rlind] == '\0' && delim != '\0') { - xfree (rlbuf); + free (rlbuf); rlbuf = (char *)0; } +#if defined (SIGCHLD) + if (tmsec > 0 || tmusec > 0) + sigprocmask (SIG_SETMASK, &chldset, &prevset); +#endif if (rlbuf == 0) { + reading = 1; rlbuf = edit_line (prompt ? prompt : "", itext); + reading = 0; rlind = 0; } +#if defined (SIGCHLD) + if (tmsec > 0 || tmusec > 0) + sigprocmask (SIG_SETMASK, &prevset, (sigset_t *)0); +#endif if (rlbuf == 0) { eof = 1; @@ -505,26 +667,73 @@ read_builtin (list) print_ps2 = 0; } - if (unbuffered_read) - retval = zread (fd, &c, 1); + reading = 1; + check_read_timeout (); + errno = 0; + +#if defined (SIGCHLD) + if (tmsec > 0 || tmusec > 0) + sigprocmask (SIG_SETMASK, &chldset, &prevset); +#endif + if (unbuffered_read == 2) + retval = posixly_correct ? zreadintr (fd, &c, 1) : zreadn (fd, &c, nchars - nr); + else if (unbuffered_read) + retval = posixly_correct ? zreadintr (fd, &c, 1) : zread (fd, &c, 1); else - retval = zreadc (fd, &c); + retval = posixly_correct ? zreadcintr (fd, &c) : zreadc (fd, &c); +#if defined (SIGCHLD) + if (tmsec > 0 || tmusec > 0) + sigprocmask (SIG_SETMASK, &prevset, (sigset_t *)0); +#endif + + reading = 0; if (retval <= 0) { + int t; + + t = errno; + if (retval < 0 && errno == EINTR) + { + check_signals (); /* in case we didn't call zread via zreadc */ + lastsig = LASTSIG(); + if (lastsig == 0) + lastsig = trapped_signal_received; +#if 0 + run_pending_traps (); /* because interrupt_immediately is not set */ +#endif + } + else + lastsig = 0; + if (terminating_signal && tty_modified) + ttyrestore (&termsave); /* fix terminal before exiting */ + CHECK_TERMSIG; eof = 1; + errno = t; /* preserve it for the error message below */ break; } + QUIT; /* in case we didn't call check_signals() */ #if defined (READLINE) } #endif - if (i + 4 >= size) /* XXX was i + 2; use i + 4 for multibyte/read_mbchar */ + if (retval <= 0) /* XXX shouldn't happen */ + check_read_timeout (); + + /* XXX -- use i + mb_cur_max (at least 4) for multibyte/read_mbchar */ + if (i + (mb_cur_max > 4 ? mb_cur_max : 4) >= size) { - input_string = (char *)xrealloc (input_string, size += 128); - remove_unwind_protect (); - add_unwind_protect (xfree, input_string); + char *t; + t = (char *)xrealloc (input_string, size += 128); + + /* Only need to change unwind-protect if input_string changes */ + if (t != input_string) + { + input_string = t; + remove_unwind_protect (); + add_unwind_protect (xfree, input_string); + } } /* If the next character is to be accepted verbatim, a backslash @@ -534,7 +743,8 @@ read_builtin (list) pass_next = 0; if (c == '\n') { - i--; /* back up over the CTLESC */ + if (skip_ctlesc == 0 && i > 0) + i--; /* back up over the CTLESC */ if (interactive && input_is_tty && raw == 0) print_ps2 = 1; } @@ -555,9 +765,12 @@ read_builtin (list) continue; } - if ((unsigned char)c == delim) + if (ignore_delim == 0 && (unsigned char)c == delim) break; + if (c == '\0' && delim != '\0') + continue; /* skip NUL bytes in input */ + if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL)) { saw_escape++; @@ -566,12 +779,34 @@ read_builtin (list) add_char: input_string[i++] = c; + check_read_timeout (); #if defined (HANDLE_MULTIBYTE) - if (nchars > 0 && MB_CUR_MAX > 1) + /* XXX - what if C == 127? Can DEL introduce a multibyte sequence? */ + if (mb_cur_max > 1 && is_basic (c) == 0) { input_string[i] = '\0'; /* for simplicity and debugging */ - i += read_mbchar (fd, input_string, i, c, unbuffered_read); + /* If we got input from readline, grab the next multibyte char from + rlbuf. */ +# if defined (READLINE) + if (edit) + { + size_t clen; + clen = mbrlen (rlbuf + rlind - 1, mb_cur_max, (mbstate_t *)NULL); + /* We only deal with valid multibyte sequences longer than one + byte. If we get anything else, we leave the one character + copied and move on to the next. */ + if ((int)clen > 1) + { + memcpy (input_string+i, rlbuf+rlind, clen-1); + i += clen - 1; + rlind += clen - 1; + } + } + else +# endif + if (locale_utf8locale == 0 || ((c & 0x80) != 0)) + i += read_mbchar (fd, input_string, i, c, unbuffered_read); } #endif @@ -581,18 +816,24 @@ add_char: break; } input_string[i] = '\0'; + check_read_timeout (); + +#if defined (READLINE) + if (edit) + free (rlbuf); +#endif -#if 1 if (retval < 0) { - builtin_error (_("read error: %d: %s"), fd, strerror (errno)); + t_errno = errno; + if (errno != EINTR) + builtin_error (_("read error: %d: %s"), fd, strerror (errno)); run_unwind_frame ("read_builtin"); - return (EXECUTION_FAILURE); + return ((t_errno != EINTR) ? EXECUTION_FAILURE : 128+lastsig); } -#endif if (tmsec > 0 || tmusec > 0) - reset_alarm (); + reset_timeout (); if (nchars > 0 || delim != '\n') { @@ -615,8 +856,11 @@ add_char: if (unbuffered_read == 0) zsyncfd (fd); - interrupt_immediately--; - terminate_immediately--; +#if defined (READLINE) + if (save_instream) + rl_instream = save_instream; /* can't portably free it */ +#endif + discard_unwind_frame ("read_builtin"); retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS; @@ -628,20 +872,14 @@ assign_vars: 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); + /* pass 1 for flags arg to clear the existing array + 2 to check for a + valid identifier. */ + var = builtin_find_indexed_array (arrayname, 3); if (var == 0) { - xfree (input_string); + free (input_string); return EXECUTION_FAILURE; /* readonly or noassign */ } - array_flush (array_cell (var)); alist = list_string (input_string, ifs_chars, 0); if (alist) @@ -653,7 +891,7 @@ assign_vars: assign_array_var_from_word_list (var, alist, 0); dispose_words (alist); } - xfree (input_string); + free (input_string); return (retval); } #endif /* ARRAY_VARS */ @@ -684,7 +922,10 @@ assign_vars: } else var = bind_variable ("REPLY", input_string, 0); - VUNSETATTR (var, att_invisible); + if (var == 0 || readonly_p (var) || noassign_p (var)) + retval = EXECUTION_FAILURE; + else + VUNSETATTR (var, att_invisible); free (input_string); return (retval); @@ -703,13 +944,14 @@ assign_vars: { varname = list->word->word; #if defined (ARRAY_VARS) - if (legal_identifier (varname) == 0 && valid_array_reference (varname) == 0) + SET_VFLAGS (list->word->flags, vflags, bindflags); + if (legal_identifier (varname) == 0 && valid_array_reference (varname, vflags) == 0) #else if (legal_identifier (varname) == 0) #endif { sh_invalidid (varname); - xfree (orig_input_string); + free (orig_input_string); return (EXECUTION_FAILURE); } @@ -726,22 +968,22 @@ assign_vars: if (t && saw_escape) { t1 = dequote_string (t); - var = bind_read_variable (varname, t1); - xfree (t1); + var = bind_read_variable (varname, t1, bindflags); + free (t1); } else - var = bind_read_variable (varname, t); + var = bind_read_variable (varname, t ? t : "", bindflags); } else { t = (char *)0; - var = bind_read_variable (varname, ""); + var = bind_read_variable (varname, "", bindflags); } FREE (t); if (var == 0) { - xfree (orig_input_string); + free (orig_input_string); return (EXECUTION_FAILURE); } @@ -751,13 +993,14 @@ assign_vars: /* 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) + SET_VFLAGS (list->word->flags, vflags, bindflags); + if (legal_identifier (list->word->word) == 0 && valid_array_reference (list->word->word, vflags) == 0) #else if (legal_identifier (list->word->word) == 0) #endif { sh_invalidid (list->word->word); - xfree (orig_input_string); + free (orig_input_string); return (EXECUTION_FAILURE); } @@ -784,36 +1027,39 @@ assign_vars: } #endif - if (saw_escape) + if (saw_escape && input_string && *input_string) { t = dequote_string (input_string); - var = bind_read_variable (list->word->word, t); - xfree (t); + var = bind_read_variable (list->word->word, t, bindflags); + free (t); } else - var = bind_read_variable (list->word->word, input_string); - stupidly_hack_special_variables (list->word->word); - FREE (tofree); + var = bind_read_variable (list->word->word, input_string ? input_string : "", bindflags); if (var) - VUNSETATTR (var, att_invisible); - xfree (orig_input_string); + { + stupidly_hack_special_variables (list->word->word); + VUNSETATTR (var, att_invisible); + } + else + retval = EXECUTION_FAILURE; + + FREE (tofree); + free (orig_input_string); return (retval); } static SHELL_VAR * -bind_read_variable (name, value) +bind_read_variable (name, value, flags) char *name, *value; + int flags; { -#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 */ + SHELL_VAR *v; + + v = builtin_bind_variable (name, value, flags); + return (v == 0 ? v + : ((readonly_p (v) || noassign_p (v)) ? (SHELL_VAR *)NULL : v)); } #if defined (HANDLE_MULTIBYTE) @@ -842,11 +1088,15 @@ read_mbchar (fd, string, ind, ch, unbuffered) if (ret == (size_t)-2) { ps = ps_back; - if (unbuffered) + + /* We don't want to be interrupted during a multibyte char read */ + if (unbuffered == 2) + r = zreadn (fd, &c, 1); + else if (unbuffered) r = zread (fd, &c, 1); else r = zreadc (fd, &c); - if (r < 0) + if (r <= 0) goto mbchar_return; mbchar[i++] = c; continue; @@ -869,7 +1119,21 @@ static void ttyrestore (ttp) struct ttsave *ttp; { - ttsetattr (ttp->fd, ttp->attrs); + ttsetattr (ttp->fd, &(ttp->attrs)); + tty_modified = 0; +} + +void +read_tty_cleanup () +{ + if (tty_modified) + ttyrestore (&termsave); +} + +int +read_tty_modified () +{ + return (tty_modified); } #if defined (READLINE) @@ -916,18 +1180,30 @@ edit_line (p, itext) old_attempted_completion_function = rl_attempted_completion_function; rl_attempted_completion_function = (rl_completion_func_t *)NULL; + bashline_set_event_hook (); 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; + bashline_reset_event_hook (); if (ret == 0) - return ret; + { + if (RL_ISSTATE (RL_STATE_TIMEOUT)) + { + sigalrm (SIGALRM); /* simulate receiving SIGALRM */ + check_read_timeout (); + } + return ret; + } + len = strlen (ret); ret = (char *)xrealloc (ret, len + 2); ret[len++] = delim; @@ -935,6 +1211,17 @@ edit_line (p, itext) return ret; } +static void +set_readline_timeout (t, sec, usec) + sh_timer *t; + time_t sec; + long usec; +{ + t->tmout.tv_sec = sec; + t->tmout.tv_usec = usec; + rl_set_timeout (sec, usec); +} + static int old_delim_ctype; static rl_command_func_t *old_delim_func; static int old_newline_ctype; @@ -952,15 +1239,17 @@ set_eol_delim (c) initialize_readline (); cmap = rl_get_keymap (); - /* Change newline to self-insert */ + /* Save the old delimiter char binding */ old_newline_ctype = cmap[RETURN].type; old_newline_func = cmap[RETURN].function; + old_delim_ctype = cmap[c].type; + old_delim_func = cmap[c].function; + + /* Change newline to self-insert */ 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; diff --git a/builtins/reserved.def b/builtins/reserved.def index 2478f16..420042d 100644 --- a/builtins/reserved.def +++ b/builtins/reserved.def @@ -2,7 +2,7 @@ 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. +Copyright (C) 1987-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -114,22 +114,22 @@ Returns the status of the last command executed. $END $BUILTIN while -$SHORT_DOC while COMMANDS; do COMMANDS; done +$SHORT_DOC while COMMANDS; do COMMANDS-2; 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. +Expand and execute COMMANDS-2 as long as the final command in 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 +$SHORT_DOC until COMMANDS; do COMMANDS-2; 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. +Expand and execute COMMANDS-2 as long as the final command in COMMANDS has +an exit status which is not zero. Exit Status: Returns the status of the last command executed. @@ -145,7 +145,7 @@ 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. +The coproc command returns an exit status of 0. $END $BUILTIN function @@ -194,7 +194,7 @@ $SHORT_DOC (( expression )) Evaluate arithmetic expression. The EXPRESSION is evaluated according to the rules for arithmetic -evaluation. Equivalent to "let EXPRESSION". +evaluation. Equivalent to `let "EXPRESSION"'. Exit Status: Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise. diff --git a/builtins/return.def b/builtins/return.def index 641ee16..03c98eb 100644 --- a/builtins/return.def +++ b/builtins/return.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -46,13 +46,10 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.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. */ @@ -60,17 +57,15 @@ int return_builtin (list) WORD_LIST *list; { - if (no_options (list)) - return (EX_USAGE); - list = loptend; /* skip over possible `--' */ + CHECK_HELPOPT (list); return_catch_value = get_exitstat (list); if (return_catch_flag) - longjmp (return_catch, 1); + sh_longjmp (return_catch, 1); else { builtin_error (_("can only `return' from a function or sourced script")); - return (EXECUTION_FAILURE); + return (EX_USAGE); } } diff --git a/builtins/set.def b/builtins/set.def index 5e550cb..44f1769 100644 --- a/builtins/set.def +++ b/builtins/set.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,6 +35,7 @@ $PRODUCES set.c #include "../bashintl.h" #include "../shell.h" +#include "../parser.h" #include "../flags.h" #include "common.h" #include "bashgetopt.h" @@ -49,17 +50,9 @@ $PRODUCES set.c # 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 ...] +$SHORT_DOC set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...] Set or unset values of shell options and positional parameters. Change the value of shell attributes and positional parameters, or @@ -96,12 +89,16 @@ Options: interactive-comments allow comments to appear in interactive commands keyword same as -k +#if defined (JOB_CONTROL) monitor same as -m +#endif noclobber same as -C noexec same as -n noglob same as -f nolog currently accepted but ignored +#if defined (JOB_CONTROL) notify same as -b +#endif nounset same as -u onecmd same as -t physical same as -P @@ -135,9 +132,12 @@ Options: -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 + -P If set, do not resolve symbolic links when executing commands such as cd which change the current directory. - -T If set, the DEBUG trap is inherited by shell functions. + -T If set, the DEBUG and RETURN traps are inherited by shell functions. + -- Assign any remaining arguments to the positional parameters. + If there are no remaining arguments, the positional parameters + are unset. - Assign any remaining arguments to the positional parameters. The -x and -v options are turned off. @@ -151,30 +151,36 @@ 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 *)); +typedef int setopt_set_func_t PARAMS((int, char *)); +typedef int setopt_get_func_t PARAMS((char *)); + +static int find_minus_o_option PARAMS((char *)); -static void print_minus_o_option __P((char *, int, int)); -static void print_all_shell_variables __P((void)); +static void print_minus_o_option PARAMS((char *, int, int)); +static void print_all_shell_variables PARAMS((void)); -static int set_ignoreeof __P((int, char *)); -static int set_posix_mode __P((int, char *)); +static int set_ignoreeof PARAMS((int, char *)); +static int set_posix_mode PARAMS((int, char *)); #if defined (READLINE) -static int set_edit_mode __P((int, char *)); -static int get_edit_mode __P((char *)); +static int set_edit_mode PARAMS((int, char *)); +static int get_edit_mode PARAMS((char *)); #endif #if defined (HISTORY) -static int bash_set_history __P((int, char *)); +static int bash_set_history PARAMS((int, char *)); #endif static const char * const on = "on"; static const char * const off = "off"; +static int previous_option_value; + /* 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. */ + dynamically generate values. If you add a new variable name here + that doesn't have a corresponding single-character option letter, make + sure to set the value appropriately in reset_shell_options. */ const struct { char *name; int letter; @@ -202,7 +208,9 @@ const struct { { "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 }, +#if defined (JOB_CONTROL) { "monitor", 'm', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, +#endif { "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 }, @@ -236,6 +244,18 @@ const struct { ((o_options[i].set_func) ? (*o_options[i].set_func) (onoff, name) \ : (*o_options[i].variable = (onoff == FLAG_ON))) +static int +find_minus_o_option (name) + char *name; +{ + register int i; + + for (i = 0; o_options[i].name; i++) + if (STREQ (name, o_options[i].name)) + return i; + return -1; +} + int minus_o_option_value (name) char *name; @@ -243,21 +263,17 @@ minus_o_option_value (name) register int i; int *on_or_off; - for (i = 0; o_options[i].name; i++) + i = find_minus_o_option (name); + if (i < 0) + return (-1); + + if (o_options[i].letter) { - 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)); - } + on_or_off = find_flag (o_options[i].letter); + return ((on_or_off == FLAG_UNKNOWN) ? -1 : *on_or_off); } - - return (-1); + else + return (GET_BINARY_O_OPTION_VALUE (i, name)); } #define MINUS_O_FORMAT "%-15s\t%s\n" @@ -313,17 +329,75 @@ get_minus_o_opts () return ret; } +char * +get_current_options () +{ + char *temp; + int i, posixopts; + + posixopts = num_posix_options (); /* shopts modified by posix mode */ + /* Make the buffer big enough to hold the set -o options and the shopt + options modified by posix mode. */ + temp = (char *)xmalloc (1 + N_O_OPTIONS + posixopts); + for (i = 0; o_options[i].name; i++) + { + if (o_options[i].letter) + temp[i] = *(find_flag (o_options[i].letter)); + else + temp[i] = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); + } + + /* Add the shell options that are modified by posix mode to the end of the + bitmap. They will be handled in set_current_options() */ + get_posix_options (temp+i); + temp[i+posixopts] = '\0'; + return (temp); +} + +void +set_current_options (bitmap) + const char *bitmap; +{ + int i, v, cv, *on_or_off; + + if (bitmap == 0) + return; + + for (i = 0; o_options[i].name; i++) + { + v = bitmap[i] ? FLAG_ON : FLAG_OFF; + if (o_options[i].letter) + { + /* We should not get FLAG_UNKNOWN here */ + on_or_off = find_flag (o_options[i].letter); + cv = *on_or_off ? FLAG_ON : FLAG_OFF; + if (v != cv) + change_flag (o_options[i].letter, v); + } + else + { + cv = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); + cv = cv ? FLAG_ON : FLAG_OFF; + if (v != cv) + SET_BINARY_O_OPTION_VALUE (i, v, o_options[i].name); + } + } + + /* Now reset the variables changed by posix mode */ + set_posix_options (bitmap+i); +} + 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"); + unbind_variable_noref ("ignoreeof"); if (ignoreeof) bind_variable ("IGNOREEOF", "10", 0); else - unbind_variable ("IGNOREEOF"); + unbind_variable_noref ("IGNOREEOF"); sv_ignoreeof ("IGNOREEOF"); return 0; } @@ -333,9 +407,14 @@ set_posix_mode (on_or_off, option_name) int on_or_off; char *option_name; { + /* short-circuit on no-op */ + if ((on_or_off == FLAG_ON && posixly_correct) || + (on_or_off == FLAG_OFF && posixly_correct == 0)) + return 0; + posixly_correct = on_or_off == FLAG_ON; if (posixly_correct == 0) - unbind_variable ("POSIXLY_CORRECT"); + unbind_variable_noref ("POSIXLY_CORRECT"); else bind_variable ("POSIXLY_CORRECT", "y", 0); sv_strict_posix ("POSIXLY_CORRECT"); @@ -410,31 +489,29 @@ set_minus_o_option (on_or_off, option_name) { register int i; - for (i = 0; o_options[i].name; i++) + i = find_minus_o_option (option_name); + if (i < 0) { - 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); + } + if (o_options[i].letter == 0) + { + previous_option_value = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); + SET_BINARY_O_OPTION_VALUE (i, on_or_off, option_name); + return (EXECUTION_SUCCESS); + } + else + { + if ((previous_option_value = 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 @@ -576,10 +653,18 @@ initialize_shell_options (no_shellopts) void reset_shell_options () { + pipefail_opt = 0; + ignoreeof = 0; + +#if defined (STRICT_POSIX) + posixly_correct = 1; +#else + posixly_correct = 0; +#endif #if defined (HISTORY) - remember_on_history = enable_history_list = 1; + dont_save_function_defs = 0; + remember_on_history = enable_history_list = 1; /* XXX */ #endif - ignoreeof = 0; } /* Set some flags from the word values in the input list. If LIST is empty, @@ -606,6 +691,14 @@ set_builtin (list) { switch (flag_name) { + case 'i': /* don't allow set -i */ + s[0] = list_opttype; + s[1] = 'i'; + s[2] = '\0'; + sh_invalidopt (s); + builtin_usage (); + return (EX_USAGE); + CASE_HELPOPT; case '?': builtin_usage (); return (list_optopt == '?' ? EXECUTION_SUCCESS : EX_USAGE); @@ -715,7 +808,7 @@ set_builtin (list) $BUILTIN unset $FUNCTION unset_builtin -$SHORT_DOC unset [-f] [-v] [name ...] +$SHORT_DOC unset [-f] [-v] [-n] [name ...] Unset values and attributes of shell variables and functions. For each NAME, remove the corresponding variable or function. @@ -723,6 +816,8 @@ 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 + -n treat each NAME as a name reference and unset the variable itself + rather than the variable it references Without options, unset first tries to unset a variable, and if that fails, tries to unset a function. @@ -739,22 +834,28 @@ int unset_builtin (list) WORD_LIST *list; { - int unset_function, unset_variable, unset_array, opt, any_failed; - char *name; + int unset_function, unset_variable, unset_array, opt, nameref, any_failed; + int global_unset_func, global_unset_var, vflags, base_vflags, valid_id; + char *name, *tname; - unset_function = unset_variable = unset_array = any_failed = 0; + unset_function = unset_variable = unset_array = nameref = any_failed = 0; + global_unset_func = global_unset_var = 0; reset_internal_getopt (); - while ((opt = internal_getopt (list, "fv")) != -1) + while ((opt = internal_getopt (list, "fnv")) != -1) { switch (opt) { case 'f': - unset_function = 1; + global_unset_func = 1; break; case 'v': - unset_variable = 1; + global_unset_var = 1; break; + case 'n': + nameref = 1; + break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -763,11 +864,17 @@ unset_builtin (list) list = loptend; - if (unset_function && unset_variable) + if (global_unset_func && global_unset_var) { builtin_error (_("cannot simultaneously unset a function and a variable")); return (EXECUTION_FAILURE); } + else if (unset_function && nameref) + nameref = 0; + +#if defined (ARRAY_VARS) + base_vflags = assoc_expand_once ? VA_NOEXPAND : 0; +#endif while (list) { @@ -779,38 +886,72 @@ unset_builtin (list) name = list->word->word; + unset_function = global_unset_func; + unset_variable = global_unset_var; + +#if defined (ARRAY_VARS) + vflags = builtin_arrayref_flags (list->word, base_vflags); +#endif + #if defined (ARRAY_VARS) unset_array = 0; - if (!unset_function && valid_array_reference (name)) + /* XXX valid array reference second arg was 0 */ + if (!unset_function && nameref == 0 && tokenize_array_reference (name, vflags, &t)) + unset_array = 1; +#endif + /* Get error checking out of the way first. The low-level functions + just perform the unset, relying on the caller to verify. */ + valid_id = legal_identifier (name); + + /* Whether or not we are in posix mode, if neither -f nor -v appears, + skip over trying to unset variables with invalid names and just + treat them as potential shell function names. */ + if (global_unset_func == 0 && global_unset_var == 0 && valid_id == 0) { - t = strchr (name, '['); - *t++ = '\0'; - unset_array++; + unset_variable = unset_array = 0; + unset_function = 1; } -#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) + if (unset_function == 0 && valid_id == 0) { sh_invalidid (name); NEXT_VARIABLE (); } - var = unset_function ? find_function (name) : find_variable (name); + /* Search for functions here if -f supplied or if NAME cannot be a + variable name. */ + var = unset_function ? find_function (name) + : (nameref ? find_variable_last_nameref (name, 0) : find_variable (name)); - if (var && !unset_function && non_unsettable_p (var)) + /* Some variables (but not functions yet) cannot be unset, period. */ + if (var && unset_function == 0 && non_unsettable_p (var)) { builtin_error (_("%s: cannot unset"), name); NEXT_VARIABLE (); } + /* if we have a nameref we want to use it */ + if (var && unset_function == 0 && nameref == 0 && STREQ (name, name_cell(var)) == 0) + name = name_cell (var); + + /* Posix.2 says try variables first, then functions. If we would + find a function after unsuccessfully searching for a variable, + note that we're acting on a function now as if -f were + supplied. The readonly check below takes care of it. */ + if (var == 0 && nameref == 0 && unset_variable == 0 && unset_function == 0) + { + if (var = find_function (name)) + unset_function = 1; + } + /* 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"); + var->name, unset_function ? "function" : "variable"); NEXT_VARIABLE (); } @@ -818,29 +959,62 @@ unset_builtin (list) #if defined (ARRAY_VARS) if (var && unset_array) { - if (array_p (var) == 0 && assoc_p (var) == 0) + if (shell_compatibility_level <= 51) + vflags |= VA_ALLOWALL; + + /* Let unbind_array_element decide what to do with non-array vars */ + tem = unbind_array_element (var, t, vflags); /* XXX new third arg */ + if (tem == -2 && array_p (var) == 0 && assoc_p (var) == 0) { - builtin_error (_("%s: not an array variable"), name); + builtin_error (_("%s: not an array variable"), var->name); NEXT_VARIABLE (); } - else + else if (tem < 0) + any_failed++; + } + else +#endif /* ARRAY_VARS */ + /* If we're trying to unset a nameref variable whose value isn't a set + variable, make sure we still try to unset the nameref's value */ + if (var == 0 && nameref == 0 && unset_function == 0) + { + var = find_variable_last_nameref (name, 0); + if (var && nameref_p (var)) { - tem = unbind_array_element (var, t); - if (tem == -1) - any_failed++; +#if defined (ARRAY_VARS) + if (valid_array_reference (nameref_cell (var), 0)) + { + int len; + + tname = savestring (nameref_cell (var)); + if (var = array_variable_part (tname, 0, &t, &len)) + { + /* change to what unbind_array_element now expects */ + if (t[len - 1] == ']') + t[len - 1] = 0; + tem = unbind_array_element (var, t, vflags); /* XXX new third arg */ + } + free (tname); + } + else +#endif + tem = unbind_variable (nameref_cell (var)); } + else + tem = unbind_variable (name); } else -#endif /* ARRAY_VARS */ - tem = unset_function ? unbind_func (name) : unbind_variable (name); + tem = unset_function ? unbind_func (name) : (nameref ? unbind_nameref (name) : unbind_variable (name)); - /* This is what Posix.2 draft 11+ says. ``If neither -f nor -v + /* This is what Posix.2 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) + if (tem == -1 && nameref == 0 && unset_function == 0 && unset_variable == 0) tem = unbind_func (name); + name = list->word->word; /* reset above for namerefs */ + /* SUSv3, POSIX.1-2001 say: ``Unsetting a variable or function that was not previously set shall not be considered an error.'' */ diff --git a/builtins/setattr.def b/builtins/setattr.def index 8b4cdf7..50c8edf 100644 --- a/builtins/setattr.def +++ b/builtins/setattr.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -34,16 +34,15 @@ $PRODUCES setattr.c #include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.h" +#include "../flags.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 *)); +extern int declare_builtin PARAMS((WORD_LIST *)); #endif #define READONLY_OR_EXPORT \ @@ -82,7 +81,7 @@ export_builtin (list) $BUILTIN readonly $FUNCTION readonly_builtin -$SHORT_DOC readonly [-af] [name[=value] ...] or readonly -p +$SHORT_DOC readonly [-aAf] [name[=value] ...] or readonly -p Mark shell variables as unchangeable. Mark each NAME as read-only; the values of these NAMEs may not be @@ -93,7 +92,8 @@ 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 + -p display a list of all readonly variables or functions, + depending on whether or not the -f option is given An argument of `--' disables further option processing. @@ -132,6 +132,8 @@ set_or_show_attributes (list, attribute, nodefs) #if defined (ARRAY_VARS) WORD_LIST *nlist, *tlist; WORD_DESC *w; + char optw[8]; + int opti; #endif functions_only = arrays_only = assoc_only = 0; @@ -158,6 +160,7 @@ set_or_show_attributes (list, attribute, nodefs) #endif case 'p': break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -186,6 +189,11 @@ set_or_show_attributes (list, attribute, nodefs) builtin_error (_("%s: not a function"), name); any_failed++; } + else if ((attribute & att_exported) && undo == 0 && exportable_function_name (name) == 0) + { + builtin_error (_("%s: cannot export"), name); + any_failed++; + } else SETVARATTR (var, attribute, undo); @@ -230,8 +238,24 @@ set_or_show_attributes (list, attribute, nodefs) { tlist = list->next; list->next = (WORD_LIST *)NULL; - w = arrays_only ? make_word ("-ra") : make_word ("-rA"); + /* Add -g to avoid readonly/export creating local variables: + only local/declare/typeset create local variables */ + opti = 0; + optw[opti++] = '-'; + optw[opti++] = 'g'; + if (attribute & att_readonly) + optw[opti++] = 'r'; + if (attribute & att_exported) + optw[opti++] = 'x'; + if (arrays_only) + optw[opti++] = 'a'; + else + optw[opti++] = 'A'; + optw[opti] = '\0'; + + w = make_word (optw); nlist = make_word_list (w, list); + opt = declare_builtin (nlist); if (opt != EXECUTION_SUCCESS) assign_error++; @@ -253,6 +277,12 @@ set_or_show_attributes (list, attribute, nodefs) } set_var_attribute (name, attribute, undo); + if (assign) /* restore word */ + { + name[assign] = '='; + if (aflags & ASS_APPEND) + name[assign-1] = '+'; + } list = list->next; } } @@ -295,6 +325,12 @@ set_or_show_attributes (list, attribute, nodefs) else if (assoc_only && assoc_p (var) == 0) continue; #endif + + /* If we imported a variable that's not a valid identifier, don't + show it in any lists. */ + if ((var->attributes & (att_invisible|att_imported)) == (att_invisible|att_imported)) + continue; + if ((var->attributes & attribute)) { show_var_attributes (var, READONLY_OR_EXPORT, nodefs); @@ -327,7 +363,11 @@ show_all_var_attributes (v, nodefs) for (i = any_failed = 0; var = variable_list[i]; i++) { - show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + /* There is no equivalent `declare -'. */ + if (variable_context && var->context == variable_context && STREQ (var->name, "-")) + printf ("local -\n"); + else + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); if (any_failed = sh_chkwrite (any_failed)) break; } @@ -335,18 +375,40 @@ show_all_var_attributes (v, nodefs) 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'. */ +/* Show all local variable variables with their attributes. This shows unset + local variables (all_local_variables called with 0 argument). */ int -show_var_attributes (var, pattr, nodefs) +show_local_var_attributes (v, nodefs) + int v, nodefs; +{ + SHELL_VAR **variable_list, *var; + int any_failed; + register int i; + + variable_list = all_local_variables (0); + if (variable_list == 0) + return (EXECUTION_SUCCESS); + + for (i = any_failed = 0; var = variable_list[i]; i++) + { + /* There is no equivalent `declare -'. */ + if (STREQ (var->name, "-")) + printf ("local -\n"); + else + 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); +} + +int +var_attribute_string (var, pattr, flags) SHELL_VAR *var; - int pattr, nodefs; + int pattr; + char *flags; /* filled in with attributes */ { - char flags[16], *x; int i; i = 0; @@ -368,6 +430,9 @@ show_var_attributes (var, pattr, nodefs) if (integer_p (var)) flags[i++] = 'i'; + if (nameref_p (var)) + flags[i++] = 'n'; + if (readonly_p (var)) flags[i++] = 'r'; @@ -401,6 +466,24 @@ show_var_attributes (var, pattr, nodefs) } flags[i] = '\0'; + return i; +} + +/* 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[MAX_ATTRIBUTES], *x; + int i; + + i = var_attribute_string (var, pattr, flags); /* If we're printing functions with definitions, print the function def first, then the attributes, instead of printing output that can't be @@ -421,10 +504,12 @@ show_var_attributes (var, pattr, nodefs) printf ("%s ", this_command_name); #if defined (ARRAY_VARS) - if (array_p (var)) - print_array_assignment (var, 1); + if (invisible_p (var) && (array_p (var) || assoc_p (var))) + printf ("%s\n", var->name); + else if (array_p (var)) + print_array_assignment (var, 0); else if (assoc_p (var)) - print_assoc_assignment (var, 1); + print_assoc_assignment (var, 0); else #endif /* force `readonly' and `export' to not print out function definitions @@ -433,11 +518,14 @@ show_var_attributes (var, pattr, nodefs) 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)) + else if (invisible_p (var) || var_isset (var) == 0) printf ("%s\n", var->name); else { - x = sh_double_quote (var_isset (var) ? value_cell (var) : ""); + if (ansic_shouldquote (value_cell (var))) + x = ansic_quote (value_cell (var), 0, (int *)0); + else + x = sh_double_quote (value_cell (var)); printf ("%s=%s\n", var->name, x); free (x); } @@ -451,9 +539,45 @@ show_name_attributes (name, nodefs) { SHELL_VAR *var; - var = find_variable_internal (name, 1); + var = find_variable_noref (name); + + if (var) /* show every variable with attributes, even unset ones */ + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + return (0); + } + else + return (1); +} + +int +show_localname_attributes (name, nodefs) + char *name; + int nodefs; +{ + SHELL_VAR *var; + + var = find_variable_noref (name); + + if (var && local_p (var) && var->context == variable_context) /* show every variable with attributes, even unset ones */ + { + show_var_attributes (var, READONLY_OR_EXPORT, nodefs); + return (0); + } + else + return (1); +} + +int +show_func_attributes (name, nodefs) + char *name; + int nodefs; +{ + SHELL_VAR *var; + + var = find_function (name); - if (var && invisible_p (var) == 0) + if (var) { show_var_attributes (var, READONLY_OR_EXPORT, nodefs); return (0); @@ -467,7 +591,7 @@ set_var_attribute (name, attribute, undo) char *name; int attribute, undo; { - SHELL_VAR *var, *tv; + SHELL_VAR *var, *tv, *v, *refvar; char *tvalue; if (undo) @@ -483,10 +607,31 @@ set_var_attribute (name, attribute, undo) tvalue = var_isset (tv) ? savestring (value_cell (tv)) : savestring (""); var = bind_variable (tv->name, tvalue, 0); + if (var == 0) + { + free (tvalue); + return; /* XXX - no error message here */ + } var->attributes |= tv->attributes & ~att_tempvar; - VSETATTR (tv, att_propagate); - if (var->context != 0) - VSETATTR (var, att_propagate); + /* This avoids an error message when propagating a read-only var + later on. */ + if (posixly_correct || shell_compatibility_level <= 44) + { + if (var->context == 0 && (attribute & att_readonly)) + { + /* Don't bother to set the `propagate to the global variables + table' flag if we've just bound the variable in that + table */ + v = find_global_variable (tv->name); + if (v != var) + VSETATTR (tv, att_propagate); + } + else + VSETATTR (tv, att_propagate); + if (var->context != 0) + VSETATTR (var, att_propagate); + } + SETVARATTR (tv, attribute, undo); /* XXX */ stupidly_hack_special_variables (tv->name); @@ -495,11 +640,24 @@ set_var_attribute (name, attribute, undo) } else { - var = find_variable_internal (name, 0); + var = find_variable_notempenv (name); + if (var == 0) + { + /* We might have a nameref pointing to something that we can't + resolve to a shell variable. If we do, skip it. We do a little + checking just so we can print an error message. */ + refvar = find_variable_nameref_for_create (name, 0); + if (refvar == INVALID_NAMEREF_VALUE) + return; + /* Otherwise we probably have a nameref pointing to a variable + that hasn't been created yet. bind_variable will take care + of that. */ + } if (var == 0) { var = bind_variable (name, (char *)NULL, 0); - VSETATTR (var, att_invisible); + if (var) + VSETATTR (var, att_invisible); } else if (var->context != 0) VSETATTR (var, att_propagate); diff --git a/builtins/shift.def b/builtins/shift.def index 3213086..bb9af01 100644 --- a/builtins/shift.def +++ b/builtins/shift.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -58,8 +58,9 @@ shift_builtin (list) WORD_LIST *list; { intmax_t times; - register int count; - WORD_LIST *temp; + int itimes, nargs; + + CHECK_HELPOPT (list); if (get_numeric_arg (list, 0, ×) == 0) return (EXECUTION_FAILURE); @@ -71,31 +72,19 @@ shift_builtin (list) sh_erange (list ? list->word->word : NULL, _("shift count")); return (EXECUTION_FAILURE); } - else if (times > number_of_args ()) + nargs = number_of_args (); + if (times > nargs) { if (print_shift_error) sh_erange (list ? list->word->word : NULL, _("shift count")); return (EXECUTION_FAILURE); } + else if (times == nargs) + clear_dollar_vars (); + else + shift_args (itimes = times); + + invalidate_cached_quoted_dollar_at (); - 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 index 68c7245..ba97e70 100644 --- a/builtins/shopt.def +++ b/builtins/shopt.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1994-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,8 +26,8 @@ $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. +arguments, list each supplied OPTNAME, or all shell options if no +OPTNAMEs are given, with an indication of whether or not each is set. Options: -o restrict OPTNAMEs to those defined for use with `set -o' @@ -61,6 +61,10 @@ $END #include "common.h" #include "bashgetopt.h" +#if defined (READLINE) +# include "../bashline.h" +#endif + #if defined (HISTORY) # include "../bashhist.h" #endif @@ -84,6 +88,15 @@ extern int gnu_error_format; extern int check_jobs_at_exit; extern int autocd; extern int glob_star; +extern int glob_asciirange; +extern int glob_always_skip_dot_and_dotdot; +extern int lastpipe_opt; +extern int inherit_errexit; +extern int localvar_inherit; +extern int localvar_unset; +extern int varassign_redir_autoclose; +extern int singlequote_translations; +extern int patsub_replacement; #if defined (EXTENDED_GLOB) extern int extended_glob; @@ -93,39 +106,72 @@ extern int extended_glob; 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 dircomplete_spelling, dircomplete_expand; +extern int complete_fullquote; -extern int enable_hostname_completion __P((int)); +extern int enable_hostname_completion PARAMS((int)); #endif #if defined (PROGRAMMABLE_COMPLETION) extern int prog_completion_enabled; -#endif - -#if defined (RESTRICTED_SHELL) -extern char *shell_name; +extern int progcomp_alias; #endif #if defined (DEBUGGER) extern int debugging_mode; #endif -static void shopt_error __P((char *)); +#if defined (ARRAY_VARS) +extern int assoc_expand_once; +extern int array_expand_once; +int expand_once_flag; +#endif -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 (SYSLOG_HISTORY) +extern int syslog_history; +#endif + +static void shopt_error PARAMS((char *)); + +static int set_shellopts_after_change PARAMS((char *, int)); +static int set_compatibility_level PARAMS((char *, int)); #if defined (RESTRICTED_SHELL) -static int set_restricted_shell __P((char *, int)); +static int set_restricted_shell PARAMS((char *, int)); +#endif + +#if defined (READLINE) +static int shopt_enable_hostname_completion PARAMS((char *, int)); +static int shopt_set_complete_direxpand PARAMS((char *, int)); #endif +#if defined (ARRAY_VARS) +static int set_assoc_expand PARAMS((char *, int)); +#endif + +#if defined (EXTENDED_GLOB) +int extglob_flag = EXTGLOB_DEFAULT; +static int shopt_set_extglob PARAMS((char *, int)); +#endif + +int expaliases_flag = 0; +static int shopt_set_expaliases PARAMS((char *, int)); + +static int shopt_set_debug_mode PARAMS((char *, int)); + static int shopt_login_shell; static int shopt_compat31; static int shopt_compat32; static int shopt_compat40; +static int shopt_compat41; +static int shopt_compat42; +static int shopt_compat43; +static int shopt_compat44; + +typedef int shopt_set_func_t PARAMS((char *, int)); -typedef int shopt_set_func_t __P((char *, int)); +/* If you add a new variable name here, make sure to set the default value + appropriately in reset_shopt_options. */ static struct { char *name; @@ -133,6 +179,9 @@ static struct { shopt_set_func_t *set_func; } shopt_vars[] = { { "autocd", &autocd, (shopt_set_func_t *)NULL }, +#if defined (ARRAY_VARS) + { "assoc_expand_once", &expand_once_flag, set_assoc_expand }, +#endif { "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 }, @@ -146,23 +195,31 @@ static struct { { "compat31", &shopt_compat31, set_compatibility_level }, { "compat32", &shopt_compat32, set_compatibility_level }, { "compat40", &shopt_compat40, set_compatibility_level }, + { "compat41", &shopt_compat41, set_compatibility_level }, + { "compat42", &shopt_compat42, set_compatibility_level }, + { "compat43", &shopt_compat43, set_compatibility_level }, + { "compat44", &shopt_compat44, set_compatibility_level }, #if defined (READLINE) + { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL}, + { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand }, { "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 }, + { "expand_aliases", &expaliases_flag, shopt_set_expaliases }, #if defined (DEBUGGER) - { "extdebug", &debugging_mode, (shopt_set_func_t *)NULL }, + { "extdebug", &debugging_mode, shopt_set_debug_mode }, #endif #if defined (EXTENDED_GLOB) - { "extglob", &extended_glob, (shopt_set_func_t *)NULL }, + { "extglob", &extglob_flag, shopt_set_extglob }, #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 + { "globasciiranges", &glob_asciirange, (shopt_set_func_t *)NULL }, + { "globskipdots", &glob_always_skip_dot_and_dotdot, (shopt_set_func_t *)NULL }, { "globstar", &glob_star, (shopt_set_func_t *)NULL }, { "gnu_errfmt", &gnu_error_format, (shopt_set_func_t *)NULL }, #if defined (HISTORY) @@ -174,10 +231,14 @@ static struct { { "hostcomplete", &perform_hostname_completion, shopt_enable_hostname_completion }, #endif { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL }, + { "inherit_errexit", &inherit_errexit, (shopt_set_func_t *)NULL }, { "interactive_comments", &interactive_comments, set_shellopts_after_change }, + { "lastpipe", &lastpipe_opt, (shopt_set_func_t *)NULL }, #if defined (HISTORY) { "lithist", &literal_history, (shopt_set_func_t *)NULL }, #endif + { "localvar_inherit", &localvar_inherit, (shopt_set_func_t *)NULL }, + { "localvar_unset", &localvar_unset, (shopt_set_func_t *)NULL }, { "login_shell", &shopt_login_shell, set_login_shell }, { "mailwarn", &mail_warning, (shopt_set_func_t *)NULL }, #if defined (READLINE) @@ -185,9 +246,14 @@ static struct { #endif { "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL }, { "nocasematch", &match_ignore_case, (shopt_set_func_t *)NULL }, + { "noexpand_translation", &singlequote_translations, (shopt_set_func_t *)NULL }, { "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL }, + { "patsub_replacement", &patsub_replacement, (shopt_set_func_t *)NULL }, #if defined (PROGRAMMABLE_COMPLETION) { "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL }, +# if defined (ALIAS) + { "progcomp_alias", &progcomp_alias, (shopt_set_func_t *)NULL }, +# endif #endif { "promptvars", &promptvars, (shopt_set_func_t *)NULL }, #if defined (RESTRICTED_SHELL) @@ -195,6 +261,10 @@ static struct { #endif { "shift_verbose", &print_shift_error, (shopt_set_func_t *)NULL }, { "sourcepath", &source_uses_path, (shopt_set_func_t *)NULL }, +#if defined (SYSLOG_HISTORY) && defined (SYSLOG_SHOPT) + { "syslog_history", &syslog_history, (shopt_set_func_t *)NULL }, +#endif + { "varredir_close", &varassign_redir_autoclose, (shopt_set_func_t *)NULL }, { "xpg_echo", &xpg_echo, (shopt_set_func_t *)NULL }, { (char *)0, (int *)0, (shopt_set_func_t *)NULL } }; @@ -206,14 +276,14 @@ static struct { 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)); +static int find_shopt PARAMS((char *)); +static int toggle_shopts PARAMS((int, WORD_LIST *, int)); +static void print_shopt PARAMS((char *, int, int)); +static int list_shopts PARAMS((WORD_LIST *, int)); +static int list_some_shopts PARAMS((int, int)); +static int list_shopt_o_options PARAMS((WORD_LIST *, int)); +static int list_some_o_options PARAMS((int, int)); +static int set_shopt_o_options PARAMS((int, WORD_LIST *, int)); #define SFLAG 0x01 #define UFLAG 0x02 @@ -248,6 +318,7 @@ shopt_builtin (list) case 'p': flags |= PFLAG; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -278,30 +349,86 @@ shopt_builtin (list) } /* Reset the options managed by `shopt' to the values they would have at - shell startup. */ + shell startup. Variables from shopt_vars. */ void reset_shopt_options () { + autocd = cdable_vars = cdspelling = 0; + check_hashed_filenames = CHECKHASH_DEFAULT; + check_window_size = CHECKWINSIZE_DEFAULT; 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; - + no_exit_on_failed_exec = 0; + expand_aliases = expaliases_flag = 0; + extended_quote = 1; + fail_glob_expansion = 0; + glob_asciirange = GLOBASCII_DEFAULT; + glob_star = 0; + gnu_error_format = 0; + hup_on_exit = 0; + inherit_errexit = 0; + interactive_comments = 1; + lastpipe_opt = 0; + localvar_inherit = localvar_unset = 0; + mail_warning = 0; + glob_ignore_case = match_ignore_case = 0; + print_shift_error = 0; source_uses_path = promptvars = 1; + varassign_redir_autoclose = 0; + singlequote_translations = 0; + patsub_replacement = 1; + +#if defined (JOB_CONTROL) + check_jobs_at_exit = 0; +#endif #if defined (EXTENDED_GLOB) - extended_glob = 0; + extended_glob = extglob_flag = EXTGLOB_DEFAULT; +#endif + +#if defined (ARRAY_VARS) + expand_once_flag = assoc_expand_once = 0; #endif #if defined (HISTORY) - literal_history = force_append_history = 0; + literal_history = 0; + force_append_history = 0; command_oriented_history = 1; #endif +#if defined (SYSLOG_HISTORY) +# if defined (SYSLOG_SHOPT) + syslog_history = SYSLOG_SHOPT; +# else + syslog_history = 1; +# endif /* SYSLOG_SHOPT */ +#endif + #if defined (READLINE) + complete_fullquote = 1; + force_fignore = 1; hist_verify = history_reediting = 0; perform_hostname_completion = 1; +# if DIRCOMPLETE_EXPAND_DEFAULT + dircomplete_expand = 1; +# else + dircomplete_expand = 0; #endif + dircomplete_spelling = 0; + no_empty_command_completion = 0; +#endif + +#if defined (PROGRAMMABLE_COMPLETION) + prog_completion_enabled = 1; +# if defined (ALIAS) + progcomp_alias = 0; +# endif +#endif + +#if defined (DEFAULT_ECHO_TO_XPG) || defined (STRICT_POSIX) + xpg_echo = 1; +#else + xpg_echo = 0; +#endif /* DEFAULT_ECHO_TO_XPG */ shopt_login_shell = login_shell; } @@ -333,6 +460,7 @@ toggle_shopts (mode, list, quiet) { WORD_LIST *l; int ind, rval; + SHELL_VAR *v; for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next) { @@ -350,7 +478,9 @@ toggle_shopts (mode, list, quiet) } } - set_bashopts (); + /* Don't set $BASHOPTS here if it hasn't already been initialized */ + if (v = find_variable ("BASHOPTS")) + set_bashopts (); return (rval); } @@ -495,6 +625,41 @@ set_shellopts_after_change (option_name, mode) return (0); } +static int +shopt_set_debug_mode (option_name, mode) + char *option_name; + int mode; +{ +#if defined (DEBUGGER) + error_trace_mode = function_trace_mode = debugging_mode; + set_shellopts (); + if (debugging_mode) + init_bash_argv (); +#endif + return (0); +} + +static int +shopt_set_expaliases (option_name, mode) + char *option_name; + int mode; +{ + expand_aliases = expaliases_flag; + return 0; +} + +#if defined (EXTENDED_GLOB) +static int +shopt_set_extglob (option_name, mode) + char *option_name; + int mode; +{ + extended_glob = extglob_flag; + return 0; +} +#endif + +#if defined (READLINE) static int shopt_enable_hostname_completion (option_name, mode) char *option_name; @@ -502,22 +667,32 @@ shopt_enable_hostname_completion (option_name, mode) { return (enable_hostname_completion (mode)); } +#endif 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; + int ind, oldval; + char *rhs; + + /* If we're unsetting one of the compatibility options, make sure the + current value is in the range of the compatNN space. */ + if (mode == 0) + oldval = shell_compatibility_level; + + /* If we're setting something, redo some of the work we did above in + toggle_shopt(). Unset everything and reset the appropriate option + based on OPTION_NAME. */ + if (mode) + { + shopt_compat31 = shopt_compat32 = 0; + shopt_compat40 = shopt_compat41 = shopt_compat42 = shopt_compat43 = 0; + shopt_compat44 = 0; + ind = find_shopt (option_name); + *shopt_vars[ind].value = mode; + } /* Then set shell_compatibility_level based on what remains */ if (shopt_compat31) @@ -526,10 +701,68 @@ set_compatibility_level (option_name, mode) shell_compatibility_level = 32; else if (shopt_compat40) shell_compatibility_level = 40; + else if (shopt_compat41) + shell_compatibility_level = 41; + else if (shopt_compat42) + shell_compatibility_level = 42; + else if (shopt_compat43) + shell_compatibility_level = 43; + else if (shopt_compat44) + shell_compatibility_level = 44; + else if (oldval > 44 && shell_compatibility_level < DEFAULT_COMPAT_LEVEL) + ; else shell_compatibility_level = DEFAULT_COMPAT_LEVEL; + + /* Make sure the current compatibility level is reflected in BASH_COMPAT */ + rhs = itos (shell_compatibility_level); + bind_variable ("BASH_COMPAT", rhs, 0); + free (rhs); + + return 0; +} + +/* Set and unset the various compatibility options from the value of + shell_compatibility_level; used by sv_shcompat */ +void +set_compatibility_opts () +{ + shopt_compat31 = shopt_compat32 = 0; + shopt_compat40 = shopt_compat41 = shopt_compat42 = shopt_compat43 = 0; + shopt_compat44 = 0; + switch (shell_compatibility_level) + { + case DEFAULT_COMPAT_LEVEL: + case 51: /* completeness */ + case 50: + break; + case 44: + shopt_compat44 = 1; break; + case 43: + shopt_compat43 = 1; break; + case 42: + shopt_compat42 = 1; break; + case 41: + shopt_compat41 = 1; break; + case 40: + shopt_compat40 = 1; break; + case 32: + shopt_compat32 = 1; break; + case 31: + shopt_compat31 = 1; break; + } +} + +#if defined (READLINE) +static int +shopt_set_complete_direxpand (option_name, mode) + char *option_name; + int mode; +{ + set_directory_hook (); return 0; } +#endif #if defined (RESTRICTED_SHELL) /* Don't allow the value of restricted_shell to be modified. */ @@ -683,7 +916,11 @@ parse_bashopts (value) { ind = find_shopt (vname); if (ind >= 0) - *shopt_vars[ind].value = 1; + { + *shopt_vars[ind].value = 1; + if (shopt_vars[ind].set_func) + (*shopt_vars[ind].set_func) (shopt_vars[ind].name, 1); + } free (vname); } } @@ -713,3 +950,17 @@ initialize_bashopts (no_bashopts) /* Set up the $BASHOPTS variable. */ set_bashopts (); } + +#if defined (ARRAY_VARS) +static int +set_assoc_expand (option_name, mode) + char *option_name; + int mode; +{ +#if 0 /* leave this disabled */ + if (shell_compatibility_level <= 51) +#endif + assoc_expand_once = expand_once_flag; + return 0; +} +#endif diff --git a/builtins/source.def b/builtins/source.def index 72627db..5b2f994 100644 --- a/builtins/source.def +++ b/builtins/source.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -69,6 +69,7 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.h" #include "../flags.h" #include "../findcmd.h" #include "common.h" @@ -79,9 +80,7 @@ $END extern int errno; #endif /* !errno */ -extern int posixly_correct; - -static void maybe_pop_dollar_vars __P((void)); +static void maybe_pop_dollar_vars PARAMS((void)); /* If non-zero, `.' uses $PATH to look up the script to be sourced. */ int source_uses_path = 1; @@ -106,6 +105,7 @@ maybe_pop_dollar_vars () if (debugging_mode) pop_args (); /* restore BASH_ARGC and BASH_ARGV */ set_dollar_vars_unchanged (); + invalidate_cached_quoted_dollar_at (); /* just invalidate to be safe */ } /* Read and execute commands from the file passed as argument. Guess what. @@ -117,7 +117,7 @@ source_builtin (list) WORD_LIST *list; { int result; - char *filename, *debug_trap; + char *filename, *debug_trap, *x; if (no_options (list)) return (EX_USAGE); @@ -150,7 +150,15 @@ source_builtin (list) { if (source_searches_cwd == 0) { - builtin_error (_("%s: file not found"), list->word->word); + x = printable_filename (list->word->word, 0); + builtin_error (_("%s: file not found"), x); + if (x != list->word->word) + free (x); + if (posixly_correct && interactive_shell == 0 && executing_command_builtin == 0) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (EXITPROG); + } return (EXECUTION_FAILURE); } else @@ -158,12 +166,14 @@ source_builtin (list) } begin_unwind_frame ("source"); - add_unwind_protect ((Function *)xfree, filename); + add_unwind_protect (xfree, filename); if (list->next) { push_dollar_vars (); add_unwind_protect ((Function *)maybe_pop_dollar_vars, (char *)NULL); + if (debugging_mode || shell_compatibility_level <= 44) + init_bash_argv (); /* Initialize BASH_ARGV and BASH_ARGC */ remember_args (list->next, 1); if (debugging_mode) push_args (list->next); /* Update BASH_ARGV and BASH_ARGC */ @@ -178,7 +188,7 @@ source_builtin (list) { debug_trap = savestring (debug_trap); add_unwind_protect (xfree, debug_trap); - add_unwind_protect (set_debug_trap, debug_trap); + add_unwind_protect (maybe_set_debug_trap, debug_trap); restore_default_signal (DEBUG_TRAP); } diff --git a/builtins/suspend.def b/builtins/suspend.def index 8711e68..4f3a56c 100644 --- a/builtins/suspend.def +++ b/builtins/suspend.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,10 +27,12 @@ $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. +Unless forced, login shells and shells without job control cannot be +suspended. Options: - -f force the suspend, even if the shell is a login shell + -f force the suspend, even if the shell is a login shell or job + control is not enabled. Exit Status: Returns success unless job control is not enabled or an error occurs. @@ -54,7 +56,7 @@ $END #include "common.h" #include "bashgetopt.h" -static sighandler suspend_continue __P((int)); +static sighandler suspend_continue PARAMS((int)); static SigHandler *old_cont; #if 0 @@ -89,22 +91,22 @@ suspend_builtin (list) case 'f': force++; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); } list = loptend; - - if (job_control == 0) - { - sh_nojobs (_("cannot suspend")); - return (EXECUTION_FAILURE); - } + no_args (list); if (force == 0) { - no_args (list); + if (job_control == 0) + { + sh_nojobs (_("cannot suspend")); + return (EXECUTION_FAILURE); + } if (login_shell) { diff --git a/builtins/test.def b/builtins/test.def index 4adff93..bd9a203 100644 --- a/builtins/test.def +++ b/builtins/test.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -28,7 +28,10 @@ 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. +are string operators and numeric comparison operators as well. + +The behavior of test depends on the number of arguments. Read the +bash manual page for the complete specification. File operators: @@ -80,6 +83,9 @@ String operators: Other operators: -o OPTION True if the shell option OPTION is enabled. + -v VAR True if the shell variable VAR is set. + -R VAR True if the shell variable VAR is set and is a name + reference. ! 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. @@ -119,11 +125,10 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../execute_cmd.h" #include "../test.h" #include "common.h" -extern char *this_command_name; - /* TEST/[ builtin. */ int test_builtin (list) diff --git a/builtins/trap.def b/builtins/trap.def index a8da71d..9422943 100644 --- a/builtins/trap.def +++ b/builtins/trap.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,7 +35,11 @@ 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. +a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. If +a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a +script run by the . or source builtins finishes executing. A SIGNAL_SPEC +of ERR means to execute ARG each time a command's failure would cause the +shell to exit when the -e option is enabled. If no arguments are supplied, trap prints the list of commands associated with each signal. @@ -71,8 +75,8 @@ $END #include "common.h" #include "bashgetopt.h" -static void showtrap __P((int)); -static int display_traps __P((WORD_LIST *)); +static void showtrap PARAMS((int, int)); +static int display_traps PARAMS((WORD_LIST *, int)); /* The trap command: @@ -82,7 +86,7 @@ static int display_traps __P((WORD_LIST *)); trap -p [sigspec ...] trap [--] - Set things up so that ARG is executed when SIGNAL(s) N is recieved. + Set things up so that ARG is executed when SIGNAL(s) N is received. 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 @@ -93,8 +97,6 @@ static int display_traps __P((WORD_LIST *)); #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; @@ -103,6 +105,7 @@ trap_builtin (list) list_signal_names = display = 0; result = EXECUTION_SUCCESS; + reset_internal_getopt (); while ((opt = internal_getopt (list, "lp")) != -1) { @@ -114,6 +117,7 @@ trap_builtin (list) case 'p': display++; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -126,7 +130,11 @@ trap_builtin (list) 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))); + { + initialize_terminating_signals (); + get_all_original_signals (); + return (sh_chkwrite (display_traps (list, display && posixly_correct))); + } else { char *first_arg; @@ -163,6 +171,16 @@ trap_builtin (list) operation = REVERT; } + /* If we're in a command substitution, we haven't freed the trap strings + (though we reset the signal handlers). If we're setting a trap to + handle a signal here, free the rest of the trap strings since they + don't apply any more. */ + if (subshell_environment & SUBSHELL_RESETTRAP) + { + free_trap_strings (); + subshell_environment &= ~SUBSHELL_RESETTRAP; + } + while (list) { sig = decode_signal (list->word->word, opt); @@ -188,8 +206,13 @@ trap_builtin (list) switch (sig) { case SIGINT: + /* XXX - should we do this if original disposition + was SIG_IGN? */ if (interactive) set_signal_handler (SIGINT, sigint_sighandler); + /* special cases for interactive == 0 */ + else if (interactive_shell && (sourcelevel||running_trap||parse_and_execute_level)) + set_signal_handler (SIGINT, sigint_sighandler); else set_signal_handler (SIGINT, termsig_sighandler); break; @@ -223,16 +246,27 @@ trap_builtin (list) } static void -showtrap (i) - int i; +showtrap (i, show_default) + int i, show_default; { char *t, *p, *sn; + int free_t; + free_t = 1; p = trap_list[i]; - if (p == (char *)DEFAULT_SIG) - return; + if (p == (char *)DEFAULT_SIG && signal_is_hard_ignored (i) == 0) + { + if (show_default) + t = "-"; + else + return; + free_t = 0; + } + else if (signal_is_hard_ignored (i)) + t = (char *)NULL; + else + t = (p == (char *)IGNORE_SIG) ? (char *)NULL : sh_single_quote (p); - 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. */ @@ -248,19 +282,21 @@ showtrap (i) else printf ("trap -- %s %s\n", t ? t : "''", sn); - FREE (t); + if (free_t) + FREE (t); } static int -display_traps (list) +display_traps (list, show_all) WORD_LIST *list; + int show_all; { int result, i; if (list == 0) { for (i = 0; i < BASH_NSIG; i++) - showtrap (i); + showtrap (i, show_all); return (EXECUTION_SUCCESS); } @@ -273,7 +309,7 @@ display_traps (list) result = EXECUTION_FAILURE; } else - showtrap (i); + showtrap (i, show_all); } return (result); diff --git a/builtins/type.def b/builtins/type.def index ee341bb..a8e47c0 100644 --- a/builtins/type.def +++ b/builtins/type.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,18 +30,18 @@ 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 + 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 + 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'. + 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 + `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. @@ -64,6 +64,8 @@ $END #include "../bashintl.h" #include "../shell.h" +#include "../parser.h" +#include "../execute_cmd.h" #include "../findcmd.h" #include "../hashcmd.h" @@ -74,10 +76,7 @@ $END #include "common.h" #include "bashgetopt.h" -extern int find_reserved_word __P((char *)); - -extern char *this_command_name; -extern int expand_aliases, posixly_correct; +extern int find_reserved_word PARAMS((char *)); /* 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 @@ -168,6 +167,7 @@ type_builtin (list) dflags |= (CDESC_PATH_ONLY|CDESC_FORCE_PATH); dflags &= ~(CDESC_TYPE|CDESC_SHORTDESC); break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -204,6 +204,7 @@ type_builtin (list) * 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_STDPATH command -p standard path list * * CDESC_ALL says whether or not to look for all occurrences of COMMAND, or * return after finding it once. @@ -214,7 +215,7 @@ describe_command (command, dflags) int dflags; { int found, i, found_file, f, all; - char *full_path, *x; + char *full_path, *x, *pathlist; SHELL_VAR *func; #if defined (ALIAS) alias_t *alias; @@ -293,7 +294,12 @@ describe_command (command, dflags) if (dflags & CDESC_TYPE) puts ("builtin"); else if (dflags & CDESC_SHORTDESC) - printf (_("%s is a shell builtin\n"), command); + { + if (posixly_correct && find_special_builtin (command) != 0) + printf (_("%s is a special shell builtin\n"), command); + else + printf (_("%s is a shell builtin\n"), command); + } else if (dflags & CDESC_REUSABLE) printf ("%s\n", command); @@ -346,14 +352,19 @@ describe_command (command, dflags) /* Now search through $PATH. */ while (1) { - if (all == 0) + if (dflags & CDESC_STDPATH) /* command -p, all cannot be non-zero */ + { + pathlist = conf_standard_path (); + full_path = find_in_path (command, pathlist, FS_EXEC_PREFERRED|FS_NODIRS); + free (pathlist); + /* Will only go through this once, since all == 0 if STDPATH set */ + } + else 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? */ + full_path = user_command_matches (command, FS_EXEC_ONLY, found_file); /* XXX - should that be FS_EXEC_PREFERRED? */ - if (!full_path) + if (full_path == 0) break; /* If we found the command as itself by looking through $PATH, it @@ -375,12 +386,18 @@ describe_command (command, dflags) 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); + x = sh_makepath ((char *)NULL, full_path, f); + free (full_path); + full_path = x; } } /* 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); + { + x = sh_makepath ((char *)NULL, full_path, MP_DOCWD|MP_RMDOT); + free (full_path); + full_path = x; + } found_file++; found = 1; diff --git a/builtins/ulimit.def b/builtins/ulimit.def index 7c1e256..fd9f7a3 100644 --- a/builtins/ulimit.def +++ b/builtins/ulimit.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,7 +23,7 @@ $PRODUCES ulimit.c $BUILTIN ulimit $FUNCTION ulimit_builtin $DEPENDS_ON !_MINIX -$SHORT_DOC ulimit [-SHacdefilmnpqrstuvx] [limit] +$SHORT_DOC ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit] Modify shell resource limits. Provides control over the resources available to the shell and processes @@ -39,6 +39,7 @@ Options: -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 + -k the maximum number of kqueues allocated for this process -l the maximum size a process may lock into memory -m the maximum resident set size -n the maximum number of open file descriptors @@ -50,6 +51,11 @@ Options: -u the maximum number of user processes -v the size of virtual memory -x the maximum number of file locks + -P the maximum number of pseudoterminals + -R the maximum time a real-time process can run before blocking + -T the maximum number of threads + +Not all options are available on all platforms. If LIMIT is given, it is the new value of the specified resource; the special LIMIT values `soft', `hard', and `unlimited' stand for the @@ -70,7 +76,7 @@ $END #include #include "../bashtypes.h" -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif @@ -118,17 +124,27 @@ extern int errno; # undef HAVE_RESOURCE #endif +#if !defined (HAVE_RESOURCE) && defined (HAVE_ULIMIT_H) +# include +#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 +/* Alternate names */ + /* 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 */ +#if defined (HAVE_RESOURCE) && defined (RLIMIT_POSIXLOCKS) && !defined (RLIMIT_LOCKS) +# define RLIMIT_LOCKS RLIMIT_POSIXLOCKS +#endif /* HAVE_RESOURCE && RLIMIT_POSIXLOCKS && !RLIMIT_LOCKS */ + /* Some systems have these, some do not. */ #ifdef RLIMIT_FSIZE # define RLIMIT_FILESIZE RLIMIT_FSIZE @@ -163,6 +179,10 @@ extern int errno; # define RLIMIT_MAXUPROC 260 #endif +#if !defined (RLIMIT_PTHREAD) && defined (RLIMIT_NTHR) +# define RLIMIT_PTHREAD RLIMIT_NTHR +#endif + #if !defined (RLIM_INFINITY) # define RLIM_INFINITY 0x7fffffff #endif @@ -184,24 +204,22 @@ extern int errno; #define BLOCKSIZE(x) (((x) == POSIXBLK) ? (posixly_correct ? 512 : 1024) : (x)) -extern int posixly_correct; +static int _findlim PARAMS((int)); -static int _findlim __P((int)); +static int ulimit_internal PARAMS((int, char *, int, int)); -static int ulimit_internal __P((int, char *, int, int)); +static int get_limit PARAMS((int, RLIMTYPE *, RLIMTYPE *)); +static int set_limit PARAMS((int, RLIMTYPE, int)); -static int get_limit __P((int, RLIMTYPE *, RLIMTYPE *)); -static int set_limit __P((int, RLIMTYPE, int)); +static void printone PARAMS((int, RLIMTYPE, int)); +static void print_all_limits PARAMS((int)); -static void printone __P((int, RLIMTYPE, int)); -static void print_all_limits __P((int)); +static int set_all_limits PARAMS((int, RLIMTYPE)); -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 *)); +static int filesize PARAMS((RLIMTYPE *)); +static int pipesize PARAMS((RLIMTYPE *)); +static int getmaxuprc PARAMS((RLIMTYPE *)); +static int getmaxvm PARAMS((RLIMTYPE *, RLIMTYPE *)); typedef struct { int option; /* The ulimit option for this limit. */ @@ -212,8 +230,14 @@ typedef struct { } RESOURCE_LIMITS; static RESOURCE_LIMITS limits[] = { +#ifdef RLIMIT_NPTS + { 'P', RLIMIT_NPTS, 1, "number of pseudoterminals", (char *)NULL }, +#endif +#ifdef RLIMIT_RTTIME + { 'R', RLIMIT_RTTIME, 1, "real-time non-blocking time", "microseconds" }, +#endif #ifdef RLIMIT_PTHREAD - { 'T', RLIMIT_PTHREAD, 1, "number of threads", (char *)NULL }, + { 'T', RLIMIT_PTHREAD, 1, "number of threads", (char *)NULL }, #endif #ifdef RLIMIT_SBSIZE { 'b', RLIMIT_SBSIZE, 1, "socket buffer size", "bytes" }, @@ -231,6 +255,9 @@ static RESOURCE_LIMITS limits[] = { #ifdef RLIMIT_SIGPENDING { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL }, #endif +#ifdef RLIMIT_KQUEUES + { 'k', RLIMIT_KQUEUES, 1, "max kqueues", (char *)NULL }, +#endif #ifdef RLIMIT_MEMLOCK { 'l', RLIMIT_MEMLOCK, 1024, "max locked memory", "kbytes" }, #endif @@ -348,6 +375,7 @@ ulimit_builtin (list) mode |= LIMIT_HARD; break; + CASE_HELPOPT; case '?': builtin_usage (); return (EX_USAGE); @@ -400,6 +428,15 @@ ulimit_builtin (list) } } + /* POSIX compatibility. If the last item in cmdlist does not have an option + argument, but there is an operand (list != 0), treat the operand as if + it were an option argument for that last command. */ + if (list && list->word && cmdlist[ncmd - 1].arg == 0) + { + cmdlist[ncmd - 1].arg = list->word->word; + list = list->next; + } + for (c = 0; c < ncmd; c++) if (ulimit_internal (cmdlist[c].cmd, cmdlist[c].arg, mode, ncmd > 1) == EXECUTION_FAILURE) return (EXECUTION_FAILURE); @@ -717,7 +754,7 @@ printone (limind, curlim, pdesc) else sprintf (unitstr, "(-%c) ", limits[limind].option); - printf ("%-20s %16s", limits[limind].description, unitstr); + printf ("%-20s %20s", limits[limind].description, unitstr); } if (curlim == RLIM_INFINITY) puts ("unlimited"); diff --git a/builtins/umask.def b/builtins/umask.def index 289a0f5..8041d56 100644 --- a/builtins/umask.def +++ b/builtins/umask.def @@ -1,7 +1,7 @@ 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. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -61,18 +61,14 @@ $END #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 *)); +static void print_symbolic_umask PARAMS((mode_t)); +static int symbolic_umask PARAMS((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. */ @@ -95,6 +91,7 @@ umask_builtin (list) case 'p': pflag++; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -149,8 +146,12 @@ umask_builtin (list) /* 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 +#if defined (__STDC__) +print_symbolic_umask (mode_t um) +#else print_symbolic_umask (um) mode_t um; +#endif { char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */ int i; diff --git a/builtins/wait.def b/builtins/wait.def index 0206926..b066d78 100644 --- a/builtins/wait.def +++ b/builtins/wait.def @@ -1,7 +1,7 @@ -This file is wait.def, from which is created wait.c. +'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. +Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,33 +22,46 @@ $BUILTIN wait $FUNCTION wait_builtin $DEPENDS_ON JOB_CONTROL $PRODUCES wait.c -$SHORT_DOC wait [id] +$SHORT_DOC wait [-fn] [-p var] [id ...] Wait for job completion and return exit status. -Waits for the process identified by ID, which may be a process ID or a +Waits for each process identified by an 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. +status is zero. If ID is a job specification, waits for all processes +in that job's pipeline. + +If the -n option is supplied, waits for a single job from the list of IDs, +or, if no IDs are supplied, for the next job to complete and returns its +exit status. + +If the -p option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable VAR +named by the option argument. The variable will be unset initially, before +any assignment. This is useful only when the -n option is supplied. + +If the -f option is supplied, and job control is enabled, waits for the +specified ID to terminate, instead of waiting for it to change status. Exit Status: -Returns the status of ID; fails if ID is invalid or an invalid option is -given. +Returns the status of the last ID; fails if ID is invalid or an invalid +option is given, or if -n is supplied and the shell has no unwaited-for +children. $END $BUILTIN wait $FUNCTION wait_builtin $DEPENDS_ON !JOB_CONTROL -$SHORT_DOC wait [pid] +$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. +Waits for each process specified by a PID and reports its termination status. +If PID is not given, waits for all currently active child processes, +and the return status 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. +Returns the status of the last PID; fails if PID is invalid or an invalid +option is given. $END #include @@ -65,13 +78,20 @@ $END #include "../bashansi.h" #include "../shell.h" +#include "../execute_cmd.h" #include "../jobs.h" +#include "../trap.h" +#include "../sig.h" #include "common.h" #include "bashgetopt.h" extern int wait_signal_received; procenv_t wait_intr_buf; +int wait_intr_flag; + +static int set_waitlist PARAMS((WORD_LIST *)); +static void unset_waitlist PARAMS((void)); /* 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 @@ -81,7 +101,8 @@ procenv_t wait_intr_buf; #define WAIT_RETURN(s) \ do \ { \ - interrupt_immediately = old_interrupt_immediately;\ + wait_signal_received = 0; \ + wait_intr_flag = 0; \ return (s);\ } \ while (0) @@ -90,17 +111,61 @@ int wait_builtin (list) WORD_LIST *list; { - int status, code; - volatile int old_interrupt_immediately; + int status, code, opt, nflag, vflags, bindflags; + volatile int wflags; + char *vname; + SHELL_VAR *pidvar; + struct procstat pstat; USE_VAR(list); - if (no_options (list)) - return (EX_USAGE); + nflag = wflags = vflags = 0; + vname = NULL; + pidvar = (SHELL_VAR *)NULL; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "fnp:")) != -1) + { + switch (opt) + { +#if defined (JOB_CONTROL) + case 'n': + nflag = 1; + break; + case 'f': + wflags |= JWAIT_FORCE; + break; + case 'p': + vname = list_optarg; + vflags = list_optflags; + break; +#endif + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } list = loptend; - old_interrupt_immediately = interrupt_immediately; - interrupt_immediately++; + /* Sanity-check variable name if -p supplied. */ + if (vname) + { +#if defined (ARRAY_VARS) + int arrayflags; + + SET_VFLAGS (vflags, arrayflags, bindflags); + if (legal_identifier (vname) == 0 && valid_array_reference (vname, arrayflags) == 0) +#else + bindflags = 0; + if (legal_identifier (vname) == 0) +#endif + { + sh_invalidid (vname); + WAIT_RETURN (EXECUTION_FAILURE); + } + if (builtin_unbind_variable (vname) == -2) + WAIT_RETURN (EXECUTION_FAILURE); + } /* 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 @@ -110,21 +175,73 @@ wait_builtin (list) 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); + wait_intr_flag = 1; + code = setjmp_sigs (wait_intr_buf); + if (code) { + last_command_exit_signal = wait_signal_received; status = 128 + wait_signal_received; + wait_sigint_cleanup (); +#if defined (JOB_CONTROL) + if (wflags & JWAIT_WAITING) + unset_waitlist (); +#endif + WAIT_RETURN (status); + } + + opt = first_pending_trap (); +#if defined (SIGCHLD) + /* We special case SIGCHLD when not in posix mode because we don't break + out of the wait even when the signal is trapped; we run the trap after + the wait completes. See how it's handled in jobs.c:waitchld(). */ + if (opt == SIGCHLD && posixly_correct == 0) + opt = next_pending_trap (opt+1); +#endif + if (opt != -1) + { + last_command_exit_signal = wait_signal_received = opt; + status = opt + 128; WAIT_RETURN (status); } /* We support jobs or pids. wait [pid-or-job ...] */ +#if defined (JOB_CONTROL) + if (nflag) + { + if (list) + { + opt = set_waitlist (list); + if (opt == 0) + WAIT_RETURN (127); + wflags |= JWAIT_WAITING; + } + + status = wait_for_any_job (wflags, &pstat); + if (vname && status >= 0) + builtin_bind_var_to_int (vname, pstat.pid, bindflags); + + if (status < 0) + status = 127; + if (list) + unset_waitlist (); + WAIT_RETURN (status); + } +#endif + /* 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 (); + opt = wait_for_background_pids (&pstat); +#if 0 + /* Compatibility with NetBSD sh: don't set VNAME since it doesn't + correspond to the return status. */ + if (vname && opt) + builtin_bind_var_to_int (vname, pstat.pid, bindflags); +#endif WAIT_RETURN (EXECUTION_SUCCESS); } @@ -141,11 +258,18 @@ wait_builtin (list) if (legal_number (w, &pid_value) && pid_value == (pid_t)pid_value) { pid = (pid_t)pid_value; - status = wait_for_single_pid (pid); + status = wait_for_single_pid (pid, wflags|JWAIT_PERROR); + /* status > 256 means pid error */ + pstat.pid = (status > 256) ? NO_PID : pid; + pstat.status = (status > 256) ? 127 : status; + if (status > 256) + status = 127; } else { sh_badpid (w); + pstat.pid = NO_PID; + pstat.status = 127; WAIT_RETURN (EXECUTION_FAILURE); } } @@ -165,22 +289,93 @@ wait_builtin (list) sh_badjob (list->word->word); UNBLOCK_CHILD (oset); status = 127; /* As per Posix.2, section 4.70.2 */ + pstat.pid = NO_PID; + pstat.status = status; list = list->next; continue; } /* Job spec used. Wait for the last pid in the pipeline. */ UNBLOCK_CHILD (oset); - status = wait_for_job (job); + status = wait_for_job (job, wflags, &pstat); } #endif /* JOB_CONTROL */ else { sh_badpid (w); + pstat.pid = NO_PID; + pstat.status = 127; status = EXECUTION_FAILURE; } + + /* Don't waste time with a longjmp. */ + if (wait_signal_received) + { + last_command_exit_signal = wait_signal_received; + status = 128 + wait_signal_received; + wait_sigint_cleanup (); + WAIT_RETURN (status); + } + list = list->next; } + if (vname && pstat.pid != NO_PID) + builtin_bind_var_to_int (vname, pstat.pid, bindflags); + WAIT_RETURN (status); } + +#if defined (JOB_CONTROL) +/* Take each valid pid or jobspec in LIST and mark the corresponding job as + J_WAITING, so wait -n knows which jobs to wait for. Return the number of + jobs we found. */ +static int +set_waitlist (list) + WORD_LIST *list; +{ + sigset_t set, oset; + int job, r, njob; + intmax_t pid; + WORD_LIST *l; + + BLOCK_CHILD (set, oset); + njob = 0; + for (l = list; l; l = l->next) + { + job = NO_JOB; + job = (l && legal_number (l->word->word, &pid) && pid == (pid_t) pid) + ? get_job_by_pid ((pid_t) pid, 0, 0) + : get_job_spec (l); + if (job == NO_JOB || jobs == 0 || INVALID_JOB (job)) + { + sh_badjob (l->word->word); + continue; + } + /* We don't check yet to see if one of the desired jobs has already + terminated, but we could. We wait until wait_for_any_job(). This + has the advantage of validating all the arguments. */ + if ((jobs[job]->flags & J_WAITING) == 0) + { + njob++; + jobs[job]->flags |= J_WAITING; + } + } + UNBLOCK_CHILD (oset); + return (njob); +} + +/* Clean up after a call to wait -n jobs */ +static void +unset_waitlist () +{ + int i; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + if (jobs[i] && (jobs[i]->flags & J_WAITING)) + jobs[i]->flags &= ~J_WAITING; + UNBLOCK_CHILD (oset); +} +#endif diff --git a/command.h b/command.h index 4707812..6230354 100644 --- a/command.h +++ b/command.h @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -73,29 +73,48 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, 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 */ +#define W_HASDOLLAR (1 << 0) /* Dollar sign present. */ +#define W_QUOTED (1 << 1) /* Some form of quote character is present. */ +#define W_ASSIGNMENT (1 << 2) /* This word is a variable assignment. */ +#define W_SPLITSPACE (1 << 3) /* Split this word on " " regardless of IFS */ +#define W_NOSPLIT (1 << 4) /* Do not perform word splitting on this word because ifs is empty string. */ +#define W_NOGLOB (1 << 5) /* Do not perform globbing on this word. */ +#define W_NOSPLIT2 (1 << 6) /* Don't split word except for $@ expansion (using spaces) because context does not allow it. */ +#define W_TILDEEXP (1 << 7) /* Tilde expand this assignment word */ +#define W_DOLLARAT (1 << 8) /* UNUSED - $@ and its special handling */ +#define W_ARRAYREF (1 << 9) /* word is a valid array reference */ +#define W_NOCOMSUB (1 << 10) /* Don't perform command substitution on this word */ +#define W_ASSIGNRHS (1 << 11) /* Word is rhs of an assignment statement */ +#define W_NOTILDE (1 << 12) /* Don't perform tilde expansion on this word */ +#define W_NOASSNTILDE (1 << 13) /* don't do tilde expansion like an assignment statement */ +#define W_EXPANDRHS (1 << 14) /* Expanding word in ${paramOPword} */ +#define W_COMPASSIGN (1 << 15) /* Compound assignment */ +#define W_ASSNBLTIN (1 << 16) /* word is a builtin command that takes assignments */ +#define W_ASSIGNARG (1 << 17) /* word is assignment argument to command */ +#define W_HASQUOTEDNULL (1 << 18) /* word contains a quoted null character */ +#define W_DQUOTE (1 << 19) /* UNUSED - word should be treated as if double-quoted */ +#define W_NOPROCSUB (1 << 20) /* don't perform process substitution */ +#define W_SAWQUOTEDNULL (1 << 21) /* word contained a quoted null that was removed */ +#define W_ASSIGNASSOC (1 << 22) /* word looks like associative array assignment */ +#define W_ASSIGNARRAY (1 << 23) /* word looks like a compound indexed array assignment */ +#define W_ARRAYIND (1 << 24) /* word is an array index being expanded */ +#define W_ASSNGLOBAL (1 << 25) /* word is a global assignment to declare (declare/typeset -g) */ +#define W_NOBRACE (1 << 26) /* Don't perform brace expansion */ +#define W_COMPLETE (1 << 27) /* word is being expanded for completion */ +#define W_CHKLOCAL (1 << 28) /* check for local vars on assignment */ +#define W_FORCELOCAL (1 << 29) /* force assignments to be to local variables, non-fatal on assignment errors */ +/* UNUSED (1 << 30) */ + +/* Flags for the `pflags' argument to param_expand() and various + parameter_brace_expand_xxx functions; also used for string_list_dollar_at */ +#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 */ +#define PF_ASSIGNRHS 0x08 /* same as W_ASSIGNRHS */ +#define PF_COMPLETE 0x10 /* same as W_COMPLETE, sets SX_COMPLETE */ +#define PF_EXPANDRHS 0x20 /* same as W_EXPANDRHS */ +#define PF_ALLINDS 0x40 /* array, act as if [@] was supplied */ +#define PF_BACKQUOTE 0x80 /* differentiate `` from $() for command_substitute */ /* Possible values for subshell_environment */ #define SUBSHELL_ASYNC 0x01 /* subshell caused by `command &' */ @@ -105,6 +124,8 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, #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 */ +#define SUBSHELL_RESETTRAP 0x80 /* subshell needs to reset trap strings on first call to trap */ +#define SUBSHELL_IGNTRAP 0x100 /* subshell should reset trapped signals from trap_handler */ /* A structure which represents a word. */ typedef struct word_desc { @@ -168,6 +189,9 @@ typedef struct element { #define CMD_STDIN_REDIR 0x400 /* async command needs implicit must be included before . */ #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) diff --git a/config-top.h b/config-top.h index 8489868..db4ab6e 100644 --- a/config-top.h +++ b/config-top.h @@ -1,6 +1,6 @@ /* config-top.h - various user-settable options not under the control of autoconf. */ -/* Copyright (C) 2002-2009 Free Software Foundation, Inc. +/* Copyright (C) 2002-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,6 +27,10 @@ error messages about `break' and `continue' out of context. */ #define BREAK_COMPLAINS +/* Define CD_COMPLAINS if you want the non-standard, but sometimes-desired + error messages about multiple directory arguments to `cd'. */ +#define CD_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. */ @@ -46,6 +50,11 @@ when a job like `cat jobs.c | exit 1' terminates due to a SIGPIPE. */ #define DONT_REPORT_SIGPIPE +/* Define DONT_REPORT_SIGTERM if you don't want to see `Terminates' message + when a job exits due to SIGTERM, since that's the default signal sent + by the kill builtin. */ +#define DONT_REPORT_SIGTERM + /* 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. */ @@ -54,9 +63,13 @@ /* The default value of the PATH variable. */ #ifndef DEFAULT_PATH_VALUE #define DEFAULT_PATH_VALUE \ - "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." + "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:." #endif +/* If you want to unconditionally set a value for PATH in every restricted + shell, set this. */ +/* #define RBASH_STATIC_PATH_VALUE "/rbin:/usr/rbin" */ + /* 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 @@ -64,6 +77,12 @@ "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" #endif +/* The default path for enable -f */ +#ifndef DEFAULT_LOADABLE_BUILTINS_PATH +#define DEFAULT_LOADABLE_BUILTINS_PATH \ + "/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:." +#endif + /* Default primary and secondary prompt strings. */ #define PPROMPT "\\s-\\v\\$ " #define SPROMPT "> " @@ -74,11 +93,14 @@ reply to the select query is an empty line. */ #define KSH_COMPATIBLE_SELECT +/* Default interactive shell startup file. */ +#define DEFAULT_BASHRC "~/.bashrc" + /* 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 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. */ @@ -90,9 +112,11 @@ which can be fooled under certain not-uncommon circumstances. */ /* #define SSH_SOURCE_BASHRC */ -/* Define if you want the case-capitalizing operators (~[~]) and the +/* Define if you want the case-toggling operators (~[~]) and the `capcase' variable attribute (declare -c). */ -#define CASEMOD_CAPCASE +/* TAG: bash-5.2 disable? */ +#define CASEMOD_TOGGLECASE +#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 @@ -105,7 +129,73 @@ #if defined (SYSLOG_HISTORY) # define SYSLOG_FACILITY LOG_USER # define SYSLOG_LEVEL LOG_INFO +# define OPENLOG_OPTS LOG_PID +#endif + +/* Define if you want syslogging history to be controllable at runtime via a + shell option; if defined, the value is the default for the syslog_history + shopt option */ +#if defined (SYSLOG_HISTORY) +/* #define SYSLOG_SHOPT 1 */ #endif /* Define if you want to include code in shell.c to support wordexp(3) */ /* #define WORDEXP_OPTION */ + +/* Define as 1 if you want to enable code that implements multiple coprocs + executing simultaneously */ +#ifndef MULTIPLE_COPROCS +# define MULTIPLE_COPROCS 0 +#endif + +/* Define to 0 if you want the checkwinsize option off by default, 1 if you + want it on. */ +#define CHECKWINSIZE_DEFAULT 1 + +/* Define to 1 if you want to optimize for sequential array assignment when + using indexed arrays, 0 if you want bash-4.2 behavior, which favors + random access but is O(N) for each array assignment. */ +#define OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT 1 + +/* Define to 1 if you want to be able to export indexed arrays to processes + using the foo=([0]=one [1]=two) and so on */ +/* #define ARRAY_EXPORT 1 */ + +/* Define to 1 if you want the shell to exit if it is running setuid and its + attempt to drop privilege using setuid(getuid()) fails with errno == EAGAIN */ +/* #define EXIT_ON_SETUID_FAILURE 1 */ + +/* Define to 1 if you want the shell to re-check $PATH if a hashed filename + no longer exists. This behavior is the default in Posix mode. */ +#define CHECKHASH_DEFAULT 0 + +/* Define to the maximum level of recursion you want for the eval builtin + and trap handlers (since traps are run as if run by eval). + 0 means the limit is not active. */ +#define EVALNEST_MAX 0 + +/* Define to the maximum level of recursion you want for the source/. builtin. + 0 means the limit is not active. */ +#define SOURCENEST_MAX 0 + +/* Define to use libc mktemp/mkstemp instead of replacements in lib/sh/tmpfile.c */ +#define USE_MKTEMP +#define USE_MKSTEMP +#define USE_MKDTEMP + +/* Define to force the value of OLDPWD inherited from the environment to be a + directory */ +#define OLDPWD_CHECK_DIRECTORY 1 + +/* Define to set the initial size of the history list ($HISTSIZE). This must + be a string. */ +/*#define HISTSIZE_DEFAULT "500"*/ + +/* Define to 0 if you want history expansion to be disabled by default in + interactive shells; define to 1 for the historical behavior of enabling + when the shell is interactive. */ +#define HISTEXPAND_DEFAULT 1 + +/* Undefine or define to 0 if you don't want to allow associative array + assignment using a compound list of key-value pairs. */ +#define ASSOC_KVPAIR_ASSIGNMENT 1 diff --git a/config.h.in b/config.h.in index 07352dd..d6d5293 100644 --- a/config.h.in +++ b/config.h.in @@ -1,6 +1,6 @@ /* config.h -- Configuration file for bash. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2009,2011-2012,2013-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,6 +21,8 @@ #ifndef _CONFIG_H_ #define _CONFIG_H_ +/* Template settings for autoconf */ + /* Configuration feature settings controllable by autoconf. */ /* Define JOB_CONTROL if your operating system supports @@ -160,9 +162,6 @@ 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 @@ -170,6 +169,18 @@ /* Define for case-modifying word expansions */ #undef CASEMOD_EXPANSIONS +/* Define to make the `direxpand' shopt option enabled by default. */ +#undef DIRCOMPLETE_EXPAND_DEFAULT + +/* Define to make the `globasciiranges' shopt option enabled by default. */ +#undef GLOBASCII_DEFAULT + +/* Define to allow functions to be imported from the environment. */ +#undef FUNCTION_IMPORT + +/* Define AFS if you are using Transarc's AFS. */ +#undef AFS + #undef ENABLE_NLS /* End of configuration settings controllable by autoconf. */ @@ -195,13 +206,14 @@ #undef HAVE_LONG_DOUBLE #undef PROTOTYPES +#undef __PROTOTYPES #undef __CHAR_UNSIGNED__ -/* Define if the compiler supports `long long' variables. */ -#undef HAVE_LONG_LONG +/* Define if the compiler supports `long long int' variables. */ +#undef HAVE_LONG_LONG_INT -#undef HAVE_UNSIGNED_LONG_LONG +#undef HAVE_UNSIGNED_LONG_LONG_INT /* The number of bytes in a int. */ #undef SIZEOF_INT @@ -212,12 +224,21 @@ /* The number of bytes in a pointer to char. */ #undef SIZEOF_CHAR_P +/* The number of bytes in a size_t. */ +#undef SIZEOF_SIZE_T + /* The number of bytes in a double (hopefully 8). */ #undef SIZEOF_DOUBLE +/* The number of bytes in an `intmax_t'. */ +#undef SIZEOF_INTMAX_T + /* The number of bytes in a `long long', if we have one. */ #undef SIZEOF_LONG_LONG +/* The number of bytes in a `wchar_t', if supported */ +#undef SIZEOF_WCHAR_T + /* System paths */ #define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail" @@ -225,6 +246,8 @@ /* Characteristics of the system's header files and libraries that affect the compilation environment. */ +/* These are set by AC_USE_SYSTEM_EXTENSIONS */ + /* Define if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE @@ -232,11 +255,18 @@ /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE -/* Define to use GNU libc extensions */ +/* Define to use GNU libc extensions. */ #undef _GNU_SOURCE -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +/* Define to enable general system extensions on Solaris. */ +#undef __EXTENSIONS__ + +/* General system extensions on AIX */ +#undef _ALL_SOURCE + +#undef _POSIX_PTHREAD_SEMANTICS +#undef _TANDEM_SOURCE +#undef _MINIX /* Memory management functions. */ @@ -258,6 +288,11 @@ /* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H +/* Define if major/minor/makedev is defined in */ +#undef MAJOR_IN_MAKEDEV + +/* Define if major/minor/makedev is defined in */ +#undef MAJOR_IN_SYSMACROS /* SYSTEM TYPES */ @@ -308,6 +343,9 @@ /* Define to `unsigned long' if doesn't define. */ #undef uintmax_t + +/* Define to integer type wide enough to hold a pointer if doesn't define. */ +#undef uintptr_t /* Define to `int' if doesn't define. */ #undef uid_t @@ -415,6 +453,19 @@ #undef HAVE_STRUCT_TIMEZONE +#undef WEXITSTATUS_OFFSET + +#undef HAVE_STRUCT_TIMESPEC +#undef TIME_H_DEFINES_STRUCT_TIMESPEC +#undef SYS_TIME_H_DEFINES_STRUCT_TIMESPEC +#undef PTHREAD_H_DEFINES_STRUCT_TIMESPEC + +#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC +#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC +#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC +#undef HAVE_STRUCT_STAT_ST_ATIMENSEC +#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC + /* Characteristics of definitions in the system header files. */ #undef HAVE_GETPW_DECLS @@ -423,6 +474,9 @@ #undef HAVE_LIBC_FNM_EXTMATCH +/* Define if you have and it defines AUDIT_USER_TTY */ +#undef HAVE_DECL_AUDIT_USER_TTY + #undef HAVE_DECL_CONFSTR #undef HAVE_DECL_PRINTF @@ -462,11 +516,6 @@ #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 @@ -479,8 +528,6 @@ #undef HAVE_PRINTF_A_FORMAT -#undef CTYPE_NON_ASCII - /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET @@ -503,12 +550,6 @@ /* 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 @@ -519,9 +560,11 @@ #undef UNUSABLE_RT_SIGNALS - /* Presence of system and C library functions. */ +/* Define if you have the arc4random function. */ +#undef HAVE_ARC4RANDOM + /* Define if you have the asprintf function. */ #undef HAVE_ASPRINTF @@ -531,6 +574,9 @@ /* Define if you have the bzero function. */ #undef HAVE_BZERO +/* Define if you have the chown function. */ +#undef HAVE_CHOWN + /* Define if you have the confstr function. */ #undef HAVE_CONFSTR @@ -546,17 +592,26 @@ /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT +/* Define if you have the dprintf function. */ +#undef HAVE_DPRINTF + /* 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 faccessat function. */ +#undef HAVE_FACCESSAT + /* 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 fnmatch function. */ +#undef HAVE_FNMATCH + +/* Can fnmatch be used as a fallback to match [=equiv=] with collation weights? */ +#undef FNMATCH_EQUIV_FALLBACK /* Define if you have the fpurge/__fpurge function. */ #undef HAVE_FPURGE @@ -569,6 +624,9 @@ /* Define if you have the getcwd function. */ #undef HAVE_GETCWD +/* Define if you have the getentropy function. */ +#undef HAVE_GETENTROPY + /* Define if you have the getdtablesize function. */ #undef HAVE_GETDTABLESIZE @@ -596,6 +654,9 @@ /* Define if you have the getpwuid function. */ #undef HAVE_GETPWUID +/* Define if you have the getrandom function. */ +#undef HAVE_GETRANDOM + /* Define if you have the getrlimit function. */ #undef HAVE_GETRLIMIT @@ -617,6 +678,9 @@ /* Define if you have the iconv function. */ #undef HAVE_ICONV +/* Define if you have the imaxdiv function. */ +#undef HAVE_IMAXDIV + /* Define if you have the inet_aton function. */ #undef HAVE_INET_ATON @@ -629,12 +693,6 @@ /* 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 @@ -680,6 +738,9 @@ /* Define if you have the mbscmp function. */ #undef HAVE_MBSCMP +/* Define if you have the mbsnrtowcs function. */ +#undef HAVE_MBSNRTOWCS + /* Define if you have the mbsrtowcs function. */ #undef HAVE_MBSRTOWCS @@ -689,18 +750,30 @@ /* Define if you have the memset function. */ #undef HAVE_MEMSET +/* Define if you have the mkdtemp function. */ +#undef HAVE_MKDTEMP + /* Define if you have the mkfifo function. */ #undef HAVE_MKFIFO +/* Define if you have the mkstemp function. */ +#undef HAVE_MKSTEMP + /* Define if you have the pathconf function. */ #undef HAVE_PATHCONF +/* Define if you have the pselect function. */ +#undef HAVE_PSELECT + /* 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 random function. */ +#undef HAVE_RANDOM + /* Define if you have the readlink function. */ #undef HAVE_READLINK @@ -741,6 +814,14 @@ #undef HAVE_SETREGID #undef HAVE_DECL_SETREGID +/* Define if you have the setregid function. */ +#undef HAVE_SETRESGID +#undef HAVE_DECL_SETRESGID + +/* Define if you have the setresuid function. */ +#undef HAVE_SETRESUID +#undef HAVE_DECL_SETRESUID + /* Define if you have the setvbuf function. */ #undef HAVE_SETVBUF @@ -762,6 +843,9 @@ /* Define if you have the strchr function. */ #undef HAVE_STRCHR +/* Define if you have the strchrnul function. */ +#undef HAVE_STRCHRNUL + /* Define if you have the strcoll function. */ #undef HAVE_STRCOLL @@ -867,9 +951,15 @@ /* Define if you have the wctype function. */ #undef HAVE_WCTYPE +/* Define if you have the wcswidth function. */ +#undef HAVE_WCSWIDTH + /* Define if you have the wcwidth function. */ #undef HAVE_WCWIDTH +/* and if it works */ +#undef WCWIDTH_BROKEN + /* Presence of certain system include files. */ /* Define if you have the header file. */ @@ -890,6 +980,9 @@ /* Define if you have the header file. */ #undef HAVE_LANGINFO_H +/* Define if you have the header file. */ +#undef HAVE_LIBAUDIT_H + /* Define if you have the header file. */ #undef HAVE_LIBINTL_H @@ -899,6 +992,9 @@ /* Define if you have the header file. */ #undef HAVE_LOCALE_H +/* Define if you have the header file. */ +#undef HAVE_MBSTR_H + /* Define if you have the header file. */ #undef HAVE_NDIR_H @@ -929,6 +1025,9 @@ /* Define if you have the header file. */ #undef HAVE_MEMORY_H +/* Define if you have the header file. */ +#undef HAVE_STDBOOL_H + /* Define if you have the header file. */ #undef HAVE_STDDEF_H @@ -944,6 +1043,12 @@ /* Define if you have the header file. */ #undef HAVE_SYS_FILE_H +/* Define if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_MMAN_H + /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H @@ -956,6 +1061,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_PTEM_H +/* Define if you have the header file. */ +#undef HAVE_SYS_RANDOM_H + /* Define if you have the header file. */ #undef HAVE_SYS_RESOURCE_H @@ -974,8 +1082,6 @@ /* Define if you have */ #undef HAVE_SYS_TIME_H -#undef TIME_WITH_SYS_TIME - /* Define if you have */ #undef HAVE_SYS_TIMES_H @@ -994,6 +1100,9 @@ /* Define if you have the header file. */ #undef HAVE_TERMIOS_H +/* Define if you have the header file. */ +#undef HAVE_ULIMIT_H + /* Define if you have the header file. */ #undef HAVE_UNISTD_H @@ -1014,9 +1123,8 @@ #undef HAVE_LIBSOCKET - -/* Define if on MINIX. */ -#undef _MINIX +/* Are we running the GNU C library, version 2.1 or later? */ +#undef GLIBC21 /* Are we running SVR5 (UnixWare 7)? */ #undef SVR5 @@ -1047,6 +1155,15 @@ #undef GETCWD_BROKEN +#undef DEV_FD_STAT_BROKEN + +/* An array implementation that prioritizes speed (O(1) access) over space, + in array2.c */ +#undef ALT_ARRAY_IMPLEMENTATION + +/* Support for $"..." translatable strings. */ +#undef TRANSLATABLE_STRINGS + /* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */ /* Define if you have the header file. */ @@ -1079,6 +1196,9 @@ /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define if you have the `mremap' function. */ +#undef HAVE_MREMAP + /* Define if you have the `munmap' function. */ #undef HAVE_MUNMAP diff --git a/configure b/configure index 875bbbf..56e8e6f 100755 --- a/configure +++ b/configure @@ -1,79 +1,82 @@ #! /bin/sh -# From configure.in for Bash 4.1, version 4.019. +# From configure.ac for Bash 5.2, version 5.046. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for bash 4.1-release. +# Generated by GNU Autoconf 2.71 for bash 5.2-release. # # Report bugs to . # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 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. ## -## --------------------- ## +## -------------------- ## +## 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 +as_nop=: +if test ${ZSH_VERSION+y} && (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 ;; +else $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi +# Reset variables that may have inherited troublesome values from +# the environment. -# 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 - +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. 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 +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; 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 || @@ -81,31 +84,22 @@ if test "${PATH_SEPARATOR+set}" != set; then } 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= +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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done IFS=$as_save_IFS ;; @@ -116,25 +110,336 @@ 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; } + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (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 \$as_nop + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : + +else \$as_nop + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : + as_have_required=yes +else $as_nop + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -# 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 +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$as_shell as_have_required=yes + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : + break 2 +fi +fi + done;; + esac + as_found=false done -PS1='$ ' -PS2='> ' -PS4='+ ' +IFS=$as_save_IFS +if $as_found +then : -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi + + + if test "x$CONFIG_SHELL" != x +then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + else + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$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 || +printf "%s\n" 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_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -148,13 +453,17 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=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" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -169,415 +478,122 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# 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 -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # 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" || + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - 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 + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # 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 } -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 +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac -if as_func_ret_success; then - : +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - exitcode=1 - echo as_func_ret_success failed. + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' else - exitcode=1 - echo positional parameters were not saved. + test -d ./-p && rmdir ./-p + as_mkdir_p=false 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 +as_test_x='test -x' +as_executable_p=as_fn_executable_p +# 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'" - 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 +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -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 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -592,54 +608,51 @@ 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_VERSION='5.2-release' +PACKAGE_STRING='bash 5.2-release' PACKAGE_BUGREPORT='bug-bash@gnu.org' +PACKAGE_URL='' ac_unique_file="shell.h" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_list= -ac_func_list= +ac_header_c_list= +gt_needs= +ac_func_c_list= +gl_use_threads_default= ac_subst_vars='LTLIBOBJS LOCAL_DEFS LOCAL_LDFLAGS @@ -649,7 +662,8 @@ MALLOC_DEBUG DEBUG RELSTATUS BASHVERS -ARFLAGS +headersdir +loadablesdir BUILD_DIR incdir PROFILE_FLAGS @@ -664,6 +678,9 @@ JOBS_O TERMCAP_DEP TERMCAP_LIB SIGLIST_O +PTHREAD_H_DEFINES_STRUCT_TIMESPEC +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC +TIME_H_DEFINES_STRUCT_TIMESPEC LIBINTL_H INTL_INC INTL_DEP @@ -680,17 +697,47 @@ DATADIRNAME CATOBJEXT USE_INCLUDED_LIBINTL BUILD_INCLUDED_LIBINTL +WINDRES +WOE32 +WOE32DLL +HAVE_NAMELESS_LOCALES +HAVE_WPRINTF +HAVE_NEWLOCALE +HAVE_SNPRINTF +HAVE_ASPRINTF +HAVE_POSIX_PRINTF +INTL_DEFAULT_VERBOSITY +ARFLAGS +INTL_MACOSX_LIBS +GLIBC21 +GNULIB_OVERRIDES_WINT_T INTLBISON LTLIBICONV LIBICONV -GLIBC21 +LTLIBMULTITHREAD +LIBMULTITHREAD +LTLIBTHREAD +LIBTHREAD +LIBPTH_PREFIX +LTLIBPTH +LIBPTH +PRI_MACROS_BROKEN ALLOCA +HAVE_VISIBILITY +CFLAG_VISIBILITY +GLIBC2 +XGETTEXT_EXTRA_OPTIONS MSGMERGE +XGETTEXT_015 XGETTEXT +GMSGFMT_015 +MSGFMT_015 GMSGFMT MSGFMT +GETTEXT_MACRO_VERSION USE_NLS -MKINSTALLDIRS +SED +MKDIR_P SIZE MAKE_SHELL SET_MAKE @@ -713,17 +760,16 @@ READLINE_LIB RL_MINOR RL_MAJOR RL_VERSION -LDFLAGS_FOR_BUILD -CPPFLAGS_FOR_BUILD -CFLAGS_FOR_BUILD +EGREP +GREP +CPP +LIBS_FOR_BUILD +STYLE_CFLAGS +BASE_CFLAGS_FOR_BUILD STATIC_LD -CC_FOR_BUILD SIGNAMES_O SIGNAMES_H CROSS_COMPILE -EGREP -GREP -CPP OBJEXT EXEEXT ac_ct_CC @@ -732,20 +778,23 @@ LDFLAGS CFLAGS CC HELPSTRINGS +HELPFILES_TARGET HELPINSTALL HELPDIRDEFINE HELPDIR +ARRAY_O MALLOC_DEP MALLOC_LDFLAGS MALLOC_LIBRARY MALLOC_LIB MALLOC_SRC MALLOC_TARGET -PURIFY TESTSCRIPT +CPPFLAGS_FOR_BUILD +LDFLAGS_FOR_BUILD +CFLAGS_FOR_BUILD +CC_FOR_BUILD DEBUGGER_START_FILE -lispdir -EMACS host_os host_vendor host_cpu @@ -773,6 +822,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -784,6 +834,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -794,16 +845,14 @@ 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_alt_array_implementation enable_arith_for_command enable_array_variables enable_bang_history @@ -815,11 +864,15 @@ enable_cond_command enable_cond_regexp enable_coprocesses enable_debugger +enable_dev_fd_stat_broken +enable_direxpand_default enable_directory_stack enable_disabled_builtins enable_dparen_arithmetic enable_extended_glob enable_extended_glob_default +enable_function_import +enable_glob_asciiranges_default enable_help_builtin enable_history enable_job_control @@ -834,6 +887,7 @@ enable_select enable_separate_helpfiles enable_single_help_strings enable_strict_posix_default +enable_translatable_strings enable_usg_echo_default enable_xpg_echo_default enable_mem_scramble @@ -841,8 +895,10 @@ enable_profiling enable_static_link enable_largefile enable_nls +enable_threads with_gnu_ld enable_rpath +with_libpth_prefix with_libiconv_prefix with_included_gettext with_libintl_prefix @@ -851,6 +907,10 @@ with_libintl_prefix host_alias target_alias DEBUGGER_START_FILE +CC_FOR_BUILD +CFLAGS_FOR_BUILD +LDFLAGS_FOR_BUILD +CPPFLAGS_FOR_BUILD CC CFLAGS LDFLAGS @@ -897,6 +957,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -921,12 +982,11 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -967,10 +1027,9 @@ do 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; }; } + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -994,10 +1053,9 @@ do 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; }; } + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1150,6 +1208,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1199,10 +1266,9 @@ do 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; }; } + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1216,10 +1282,9 @@ do 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; }; } + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1247,26 +1312,26 @@ do | --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; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) 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; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac 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 + printf "%s\n" "$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} + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1274,16 +1339,14 @@ 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; }; } + as_fn_error $? "missing argument to $ac_option" 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 ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1291,7 +1354,7 @@ fi 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 + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1305,8 +1368,7 @@ do [\\/$]* | ?:[\\/]* ) 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; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1320,8 +1382,6 @@ target=$target_alias 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 @@ -1336,11 +1396,9 @@ 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; }; } + as_fn_error $? "working directory cannot be determined" 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; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1352,7 +1410,7 @@ $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" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1379,13 +1437,11 @@ else 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; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 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; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1411,7 +1467,7 @@ 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. +\`configure' configures bash 5.2-release to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1425,7 +1481,7 @@ Configuration: --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 + -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 @@ -1451,6 +1507,7 @@ Fine tuning of the installation directories: --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] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1476,7 +1533,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bash 4.1-release:";; + short | recursive ) echo "Configuration of bash 5.2-release:";; esac cat <<\_ACEOF @@ -1486,6 +1543,9 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-minimal-config a minimal sh-like configuration --enable-alias enable shell aliases + --enable-alt-array-implementation + enable an alternate array implementation that + optimizes speed at the cost of space --enable-arith-for-command enable arithmetic for command --enable-array-variables @@ -1504,6 +1564,11 @@ Optional Features: --enable-coprocesses enable coprocess support and the coproc reserved word --enable-debugger enable support for bash debugger + --enable-dev-fd-stat-broken + enable this option if stat on /dev/fd/N and fstat on + file descriptor N don't return the same results + --enable-direxpand-default + enable the direxpand shell option by default --enable-directory-stack enable builtins pushd/popd/dirs --enable-disabled-builtins @@ -1514,6 +1579,12 @@ Optional Features: --enable-extended-glob-default force extended pattern matching to be enabled by default + --enable-function-import + allow bash to import exported function definitions + by default + --enable-glob-asciiranges-default + force bracket range expressions in pattern matching + to use the C locale by default --enable-help-builtin include the help builtin --enable-history turn on command history --enable-job-control enable job control features @@ -1536,6 +1607,8 @@ Optional Features: translation --enable-strict-posix-default configure bash to be posix-conformant by default + --enable-translatable-strings + include support for $"..." translatable strings --enable-usg-echo-default a synonym for --enable-xpg-echo-default --enable-xpg-echo-default @@ -1546,12 +1619,14 @@ Optional Features: --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 + --enable-threads={posix|solaris|pth|windows} + specify multithreading API + --disable-threads build without multithread safety --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 @@ -1560,9 +1635,9 @@ Optional Packages: --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-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib + --without-libpth-prefix don't search for libpth in includedir and libdir --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 @@ -1572,16 +1647,28 @@ Optional Packages: Some influential environment variables: DEBUGGER_START_FILE location of bash debugger initialization file + CC_FOR_BUILD + C compiler used when compiling binaries used only at build time + CFLAGS_FOR_BUILD + Compilation options (CFLAGS) used when compiling binaries used + only at build time + LDFLAGS_FOR_BUILD + Linker options (LDFLAGS) used when compiling binaries used only + at build time + CPPFLAGS_FOR_BUILD + C preprocessor options (CPPFLAGS) used when compiling binaries + used only at build time CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - the first program found out of: `bison -y', `byacc', `yacc'. + YACC The `Yet Another Compiler 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. @@ -1605,9 +1692,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$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|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -1635,7 +1722,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1643,7 +1731,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1652,687 +1740,1607 @@ 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 +bash configure 5.2-release +generated by GNU Autoconf 2.71 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2021 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 $@ +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## -_ACEOF -exec 5>>config.log +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam + 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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` + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_c_try_compile -/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 +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -cat >&5 <<_ACEOF +} # ac_fn_c_check_header_compile +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -## ----------- ## -## Core tests. ## -## ----------- ## + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -_ACEOF +} # ac_fn_c_try_cpp +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 -# 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; } +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. */ -# 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 +#include +#undef $2 - 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 +/* 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 $2 (); +/* 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_$2 || defined __stub___$2 +choke me +#endif - 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 +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - 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 +} # ac_fn_c_check_func - 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 +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -# Predefined preprocessor variables. +} # ac_fn_c_try_run -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : +else $as_nop + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +} # ac_fn_c_check_type +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +} # ac_fn_check_decl +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; - -# 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 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=$ac_mid; break +else $as_nop + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; -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 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; -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; }; } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_lo=$ac_mid; break +else $as_nop + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else $as_nop + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=$ac_mid +else $as_nop + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } +#include +#include +int +main (void) +{ + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + 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 +if ac_fn_c_try_run "$LINENO" +then : + echo >>conftest.val; read $3 &5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$4 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +} # ac_fn_c_check_member +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac +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 5.2-release, which was +generated by GNU Autoconf 2.71. Invocation command line was + $ $0$ac_configure_args_raw +_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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" + done +IFS=$as_save_IFS +} >&5 +cat >&5 <<_ACEOF +## ----------- ## +## Core tests. ## +## ----------- ## +_ACEOF - -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 +# 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=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append 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 + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done 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 +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} -# 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 +# 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=$? + # Sanitize IFS. + IFS=" "" $as_nl" + # Save into config.log some information that might help in debugging. + { + echo -case "$RELSTATUS" in -alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;; -*) DEBUG= MALLOC_DEBUG= ;; -esac + printf "%s\n" "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + 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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$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= ;; #( + *) { eval $ac_var=; 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 -# 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; }; } + printf "%s\n" "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo -{ $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; }; } + if test -n "$ac_subst_files"; then + printf "%s\n" "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo + fi -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 + if test -s confdefs.h; then + printf "%s\n" "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$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'; as_fn_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 -{ $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 +printf "%s\n" "/* confdefs.h */" > confdefs.h -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 +# Predefined preprocessor variables. +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -opt_bash_malloc=yes -opt_purify=no -opt_purecov=no -opt_afs=no -opt_curses=no -opt_with_installed_readline=no +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -#htmldir= +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -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 +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -# memory scrambling on free() -case "${host_os}" in -sco3.2v5*|sco3.2v4*) opt_memscramble=no ;; -*) opt_memscramble=yes ;; -esac +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h -# 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; } +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + ac_site_files="$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +fi - # 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 +for ac_site_file in $ac_site_files 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 + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } 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; } +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + >$cache_file fi +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif - 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 +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*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; +} -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_lispdir" >&5 -$as_echo "$am_cv_lispdir" >&6; } - lispdir="$am_cv_lispdir" - fi - fi +/* 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 do not provoke an error unfortunately, instead are silently treated + as an "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 is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -fi +/* 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 **, int *(*)(struct buf *, struct stat *, int), + int, int);' +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; +struct incomplete_array +{ + int datasize; + double data[]; +}; -# Check whether --with-afs was given. -if test "${with_afs+set}" = set; then - withval=$with_afs; opt_afs=$withval -fi +struct named_init { + int number; + const wchar_t *name; + double average; +}; +typedef const char *ccp; -# Check whether --with-bash-malloc was given. -if test "${with_bash_malloc+set}" = set; then - withval=$with_bash_malloc; opt_bash_malloc=$withval -fi +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); -# Check whether --with-curses was given. -if test "${with_curses+set}" = set; then - withval=$with_curses; opt_curses=$withval -fi + const char *str = ""; + int number = 0; + float fnumber = 0; + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); -# Check whether --with-gnu-malloc was given. -if test "${with_gnu_malloc+set}" = set; then - withval=$with_gnu_malloc; opt_bash_malloc=$withval -fi + return *str && number && fnumber; +} +' +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' -# Check whether --with-installed-readline was given. -if test "${with_installed_readline+set}" = set; then - withval=$with_installed_readline; opt_with_installed_readline=$withval +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" +gt_needs="$gt_needs need-ngettext" +as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H" +as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE" +as_fn_append ac_func_c_list " symlink HAVE_SYMLINK" +as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE" +as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H" +as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF" +as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" +as_fn_append ac_func_c_list " alarm HAVE_ALARM" +as_fn_append ac_func_c_list " fpurge HAVE_FPURGE" +as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE" +as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF" +as_fn_append ac_func_c_list " vsnprintf HAVE_VSNPRINTF" + +# Auxiliary files required by this configure script. +ac_aux_files="config.rpath install-sh config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/./support" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +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. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + +# 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,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$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=`printf "%s\n" "$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. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +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_config_headers="$ac_config_headers config.h" + + +BASHVERS=5.2 +RELSTATUS=release + +case "$RELSTATUS" in +alp*|bet*|dev*|rc*|releng*|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_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +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_afs=no +opt_curses=no +opt_with_installed_readline=no + +#htmldir= + +case "${host_cpu}-${host_os}" in +# mostly obsolete platforms +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 +*-dgux*) opt_bash_malloc=no ;; # DG/UX machines +sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 +m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir +*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins +*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft +*-beos*) opt_bash_malloc=no ;; # they say it's suitable +# These need additional investigation +sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF +*-aix*) opt_bash_malloc=no ;; # AIX machines +*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment +# These lack a working sbrk(2) +aarch64-freebsd*) opt_bash_malloc=no ;; +riscv*-freebsd*) opt_bash_malloc=no ;; +# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) +*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep +*-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) +*-machten4) opt_bash_malloc=no ;; # MachTen 4.x +# Niche or non-mainstream-shell-user systems +*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x +*-nsk*) opt_bash_malloc=no ;; # HP NonStop +*-haiku*) opt_bash_malloc=no ;; # Haiku OS +*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk +esac + +# memory scrambling on free() +case "${host_os}" in +sco3.2v5*|sco3.2v4*) opt_memscramble=no ;; +*) opt_memscramble=yes ;; +esac + + + + +# Check whether --with-afs was given. +if test ${with_afs+y} +then : + withval=$with_afs; opt_afs=$withval +fi + + +# Check whether --with-bash-malloc was given. +if test ${with_bash_malloc+y} +then : + withval=$with_bash_malloc; opt_bash_malloc=$withval +fi + + +# Check whether --with-curses was given. +if test ${with_curses+y} +then : + withval=$with_curses; opt_curses=$withval fi -# Check whether --with-purecov was given. -if test "${with_purecov+set}" = set; then - withval=$with_purecov; opt_purecov=$withval +# Check whether --with-gnu-malloc was given. +if test ${with_gnu_malloc+y} +then : + withval=$with_gnu_malloc; opt_bash_malloc=$withval fi -# Check whether --with-purify was given. -if test "${with_purify+set}" = set; then - withval=$with_purify; opt_purify=$withval +# Check whether --with-installed-readline was given. +if test ${with_installed_readline+y} +then : + withval=$with_installed_readline; opt_with_installed_readline=$withval fi @@ -2345,9 +3353,7 @@ if test "$opt_bash_malloc" = yes; then MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' MALLOC_DEP='$(MALLOC_LIBRARY)' - cat >>confdefs.h <<\_ACEOF -#define USING_BASH_MALLOC 1 -_ACEOF + printf "%s\n" "#define USING_BASH_MALLOC 1" >>confdefs.h else MALLOC_LIB= @@ -2356,24 +3362,8 @@ else 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 + printf "%s\n" "#define AFS 1" >>confdefs.h fi @@ -2419,12 +3409,21 @@ opt_single_longdoc_strings=yes opt_casemod_attrs=yes opt_casemod_expansions=yes opt_extglob_default=no +opt_dircomplete_expand_default=no +opt_globascii_default=yes +opt_function_import=yes +opt_dev_fd_stat_broken=no +opt_alt_array_impl=no +opt_translatable_strings=yes + +ARRAY_O=array.o opt_static_link=no opt_profiling=no # Check whether --enable-minimal-config was given. -if test "${enable_minimal_config+set}" = set; then +if test ${enable_minimal_config+y} +then : enableval=$enable_minimal_config; opt_minimal_config=$enableval fi @@ -2439,358 +3438,409 @@ if test $opt_minimal_config = yes; then 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 + opt_translatable_strings=no + opt_globascii_default=yes fi # Check whether --enable-alias was given. -if test "${enable_alias+set}" = set; then +if test ${enable_alias+y} +then : enableval=$enable_alias; opt_alias=$enableval fi +# Check whether --enable-alt-array-implementation was given. +if test ${enable_alt_array_implementation+y} +then : + enableval=$enable_alt_array_implementation; opt_alt_array_impl=$enableval +fi + # Check whether --enable-arith-for-command was given. -if test "${enable_arith_for_command+set}" = set; then +if test ${enable_arith_for_command+y} +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 +if test ${enable_array_variables+y} +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 +if test ${enable_bang_history+y} +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 +if test ${enable_brace_expansion+y} +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 +if test ${enable_casemod_attributes+y} +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 +if test ${enable_casemod_expansions+y} +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 +if test ${enable_command_timing+y} +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 +if test ${enable_cond_command+y} +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 +if test ${enable_cond_regexp+y} +then : enableval=$enable_cond_regexp; opt_cond_regexp=$enableval fi # Check whether --enable-coprocesses was given. -if test "${enable_coprocesses+set}" = set; then +if test ${enable_coprocesses+y} +then : enableval=$enable_coprocesses; opt_coproc=$enableval fi # Check whether --enable-debugger was given. -if test "${enable_debugger+set}" = set; then +if test ${enable_debugger+y} +then : enableval=$enable_debugger; opt_debugger=$enableval fi +# Check whether --enable-dev-fd-stat-broken was given. +if test ${enable_dev_fd_stat_broken+y} +then : + enableval=$enable_dev_fd_stat_broken; opt_dev_fd_stat_broken=$enableval +fi + +# Check whether --enable-direxpand-default was given. +if test ${enable_direxpand_default+y} +then : + enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval +fi + # Check whether --enable-directory-stack was given. -if test "${enable_directory_stack+set}" = set; then +if test ${enable_directory_stack+y} +then : enableval=$enable_directory_stack; opt_dirstack=$enableval fi # Check whether --enable-disabled-builtins was given. -if test "${enable_disabled_builtins+set}" = set; then +if test ${enable_disabled_builtins+y} +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 +if test ${enable_dparen_arithmetic+y} +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 +if test ${enable_extended_glob+y} +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 +if test ${enable_extended_glob_default+y} +then : enableval=$enable_extended_glob_default; opt_extglob_default=$enableval fi +# Check whether --enable-function-import was given. +if test ${enable_function_import+y} +then : + enableval=$enable_function_import; opt_function_import=$enableval +fi + +# Check whether --enable-glob-asciiranges-default was given. +if test ${enable_glob_asciiranges_default+y} +then : + enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval +fi + # Check whether --enable-help-builtin was given. -if test "${enable_help_builtin+set}" = set; then +if test ${enable_help_builtin+y} +then : enableval=$enable_help_builtin; opt_help=$enableval fi # Check whether --enable-history was given. -if test "${enable_history+set}" = set; then +if test ${enable_history+y} +then : enableval=$enable_history; opt_history=$enableval fi # Check whether --enable-job-control was given. -if test "${enable_job_control+set}" = set; then +if test ${enable_job_control+y} +then : enableval=$enable_job_control; opt_job_control=$enableval fi # Check whether --enable-multibyte was given. -if test "${enable_multibyte+set}" = set; then +if test ${enable_multibyte+y} +then : enableval=$enable_multibyte; opt_multibyte=$enableval fi # Check whether --enable-net-redirections was given. -if test "${enable_net_redirections+set}" = set; then +if test ${enable_net_redirections+y} +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 +if test ${enable_process_substitution+y} +then : enableval=$enable_process_substitution; opt_process_subst=$enableval fi # Check whether --enable-progcomp was given. -if test "${enable_progcomp+set}" = set; then +if test ${enable_progcomp+y} +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 +if test ${enable_prompt_string_decoding+y} +then : enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval fi # Check whether --enable-readline was given. -if test "${enable_readline+set}" = set; then +if test ${enable_readline+y} +then : enableval=$enable_readline; opt_readline=$enableval fi # Check whether --enable-restricted was given. -if test "${enable_restricted+set}" = set; then +if test ${enable_restricted+y} +then : enableval=$enable_restricted; opt_restricted=$enableval fi # Check whether --enable-select was given. -if test "${enable_select+set}" = set; then +if test ${enable_select+y} +then : enableval=$enable_select; opt_select=$enableval fi # Check whether --enable-separate-helpfiles was given. -if test "${enable_separate_helpfiles+set}" = set; then +if test ${enable_separate_helpfiles+y} +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 +if test ${enable_single_help_strings+y} +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 +if test ${enable_strict_posix_default+y} +then : enableval=$enable_strict_posix_default; opt_strict_posix=$enableval fi +# Check whether --enable-translatable-strings was given. +if test ${enable_translatable_strings+y} +then : + enableval=$enable_translatable_strings; opt_translatable_strings=$enableval +fi + # Check whether --enable-usg-echo-default was given. -if test "${enable_usg_echo_default+set}" = set; then +if test ${enable_usg_echo_default+y} +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 +if test ${enable_xpg_echo_default+y} +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 +if test ${enable_mem_scramble+y} +then : enableval=$enable_mem_scramble; opt_memscramble=$enableval fi # Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then +if test ${enable_profiling+y} +then : enableval=$enable_profiling; opt_profiling=$enableval fi # Check whether --enable-static-link was given. -if test "${enable_static_link+set}" = set; then +if test ${enable_static_link+y} +then : enableval=$enable_static_link; opt_static_link=$enableval fi + + + + + if test $opt_alias = yes; then -cat >>confdefs.h <<\_ACEOF -#define ALIAS 1 -_ACEOF +printf "%s\n" "#define ALIAS 1" >>confdefs.h fi if test $opt_dirstack = yes; then -cat >>confdefs.h <<\_ACEOF -#define PUSHD_AND_POPD 1 -_ACEOF +printf "%s\n" "#define PUSHD_AND_POPD 1" >>confdefs.h fi if test $opt_restricted = yes; then -cat >>confdefs.h <<\_ACEOF -#define RESTRICTED_SHELL 1 -_ACEOF +printf "%s\n" "#define RESTRICTED_SHELL 1" >>confdefs.h fi if test $opt_process_subst = yes; then -cat >>confdefs.h <<\_ACEOF -#define PROCESS_SUBSTITUTION 1 -_ACEOF +printf "%s\n" "#define PROCESS_SUBSTITUTION 1" >>confdefs.h fi if test $opt_prompt_decoding = yes; then -cat >>confdefs.h <<\_ACEOF -#define PROMPT_STRING_DECODE 1 -_ACEOF +printf "%s\n" "#define PROMPT_STRING_DECODE 1" >>confdefs.h fi if test $opt_select = yes; then -cat >>confdefs.h <<\_ACEOF -#define SELECT_COMMAND 1 -_ACEOF +printf "%s\n" "#define SELECT_COMMAND 1" >>confdefs.h fi if test $opt_help = yes; then -cat >>confdefs.h <<\_ACEOF -#define HELP_BUILTIN 1 -_ACEOF +printf "%s\n" "#define HELP_BUILTIN 1" >>confdefs.h fi if test $opt_array_variables = yes; then -cat >>confdefs.h <<\_ACEOF -#define ARRAY_VARS 1 -_ACEOF +printf "%s\n" "#define ARRAY_VARS 1" >>confdefs.h fi if test $opt_dparen_arith = yes; then -cat >>confdefs.h <<\_ACEOF -#define DPAREN_ARITHMETIC 1 -_ACEOF +printf "%s\n" "#define DPAREN_ARITHMETIC 1" >>confdefs.h fi if test $opt_brace_expansion = yes; then -cat >>confdefs.h <<\_ACEOF -#define BRACE_EXPANSION 1 -_ACEOF +printf "%s\n" "#define BRACE_EXPANSION 1" >>confdefs.h fi if test $opt_disabled_builtins = yes; then -cat >>confdefs.h <<\_ACEOF -#define DISABLED_BUILTINS 1 -_ACEOF +printf "%s\n" "#define DISABLED_BUILTINS 1" >>confdefs.h fi if test $opt_command_timing = yes; then -cat >>confdefs.h <<\_ACEOF -#define COMMAND_TIMING 1 -_ACEOF +printf "%s\n" "#define COMMAND_TIMING 1" >>confdefs.h fi if test $opt_xpg_echo = yes ; then -cat >>confdefs.h <<\_ACEOF -#define DEFAULT_ECHO_TO_XPG 1 -_ACEOF +printf "%s\n" "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h fi if test $opt_strict_posix = yes; then -cat >>confdefs.h <<\_ACEOF -#define STRICT_POSIX 1 -_ACEOF +printf "%s\n" "#define STRICT_POSIX 1" >>confdefs.h fi if test $opt_extended_glob = yes ; then -cat >>confdefs.h <<\_ACEOF -#define EXTENDED_GLOB 1 -_ACEOF +printf "%s\n" "#define EXTENDED_GLOB 1" >>confdefs.h fi if test $opt_extglob_default = yes; then -cat >>confdefs.h <<\_ACEOF -#define EXTGLOB_DEFAULT 1 -_ACEOF +printf "%s\n" "#define EXTGLOB_DEFAULT 1" >>confdefs.h else -cat >>confdefs.h <<\_ACEOF -#define EXTGLOB_DEFAULT 0 -_ACEOF +printf "%s\n" "#define EXTGLOB_DEFAULT 0" >>confdefs.h fi if test $opt_cond_command = yes ; then -cat >>confdefs.h <<\_ACEOF -#define COND_COMMAND 1 -_ACEOF +printf "%s\n" "#define COND_COMMAND 1" >>confdefs.h fi if test $opt_cond_regexp = yes ; then -cat >>confdefs.h <<\_ACEOF -#define COND_REGEXP 1 -_ACEOF +printf "%s\n" "#define COND_REGEXP 1" >>confdefs.h fi if test $opt_coproc = yes; then -cat >>confdefs.h <<\_ACEOF -#define COPROCESS_SUPPORT 1 -_ACEOF +printf "%s\n" "#define COPROCESS_SUPPORT 1" >>confdefs.h fi if test $opt_arith_for_command = yes; then -cat >>confdefs.h <<\_ACEOF -#define ARITH_FOR_COMMAND 1 -_ACEOF +printf "%s\n" "#define ARITH_FOR_COMMAND 1" >>confdefs.h fi if test $opt_net_redirs = yes; then -cat >>confdefs.h <<\_ACEOF -#define NETWORK_REDIRECTIONS 1 -_ACEOF +printf "%s\n" "#define NETWORK_REDIRECTIONS 1" >>confdefs.h fi if test $opt_progcomp = yes; then -cat >>confdefs.h <<\_ACEOF -#define PROGRAMMABLE_COMPLETION 1 -_ACEOF +printf "%s\n" "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h fi if test $opt_multibyte = no; then -cat >>confdefs.h <<\_ACEOF -#define NO_MULTIBYTE_SUPPORT 1 -_ACEOF +printf "%s\n" "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h fi if test $opt_debugger = yes; then -cat >>confdefs.h <<\_ACEOF -#define DEBUGGER 1 -_ACEOF +printf "%s\n" "#define DEBUGGER 1" >>confdefs.h fi if test $opt_casemod_attrs = yes; then -cat >>confdefs.h <<\_ACEOF -#define CASEMOD_ATTRS 1 -_ACEOF +printf "%s\n" "#define CASEMOD_ATTRS 1" >>confdefs.h fi if test $opt_casemod_expansions = yes; then -cat >>confdefs.h <<\_ACEOF -#define CASEMOD_EXPANSIONS 1 -_ACEOF +printf "%s\n" "#define CASEMOD_EXPANSIONS 1" >>confdefs.h + +fi +if test $opt_dircomplete_expand_default = yes; then +printf "%s\n" "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h + +fi +if test $opt_globascii_default = yes; then +printf "%s\n" "#define GLOBASCII_DEFAULT 1" >>confdefs.h + +else +printf "%s\n" "#define GLOBASCII_DEFAULT 0" >>confdefs.h + +fi +if test $opt_function_import = yes; then +printf "%s\n" "#define FUNCTION_IMPORT 1" >>confdefs.h + +fi +if test $opt_dev_fd_stat_broken = yes; then +printf "%s\n" "#define DEV_FD_STAT_BROKEN 1" >>confdefs.h + +fi +if test $opt_alt_array_impl = yes; then +printf "%s\n" "#define ALT_ARRAY_IMPLEMENTATION 1" >>confdefs.h + +ARRAY_O=array2.o +fi +if test $opt_translatable_strings = yes; then +printf "%s\n" "#define TRANSLATABLE_STRINGS 1" >>confdefs.h fi if test $opt_memscramble = yes; then -cat >>confdefs.h <<\_ACEOF -#define MEMSCRAMBLE 1 -_ACEOF +printf "%s\n" "#define MEMSCRAMBLE 1" >>confdefs.h fi @@ -2800,15 +3850,16 @@ else TESTSCRIPT=run-all fi -HELPDIR= HELPDIRDEFINE= HELPINSTALL= +HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET= if test "$opt_separate_help" != no; then if test "$opt_separate_help" = "yes" ; then - HELPDIR='${datadir}/bash' + HELPDIR='${datadir}/bash/helpfiles' else HELPDIR=$opt_separate_help fi HELPDIRDEFINE='-H ${HELPDIR}' HELPINSTALL='install-help' + HELPFILES_TARGET='helpdoc' fi HELPSTRINGS= if test "$opt_single_longdoc_strings" != "yes"; then @@ -2832,10 +3883,25 @@ fi + + +if test -z "$CFLAGS"; then + want_auto_cflags=1 +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' @@ -2844,11 +3910,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2856,26 +3923,30 @@ 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done -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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2884,11 +3955,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -2896,26 +3968,30 @@ 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done -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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2923,8 +3999,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2937,11 +4013,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2949,26 +4026,30 @@ 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done -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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2977,11 +4058,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2990,19 +4072,23 @@ 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -3014,18 +4100,18 @@ if test $ac_prog_rejected = yes; then # 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+' '}$@" + 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3036,11 +4122,12 @@ if test -z "$CC"; then 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3048,26 +4135,30 @@ 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done -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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3080,11 +4171,12 @@ if test -z "$CC"; then 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3092,26 +4184,30 @@ 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done -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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3123,72 +4219,156 @@ done 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$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 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; }; }; } +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$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" +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&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 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3200,9 +4380,9 @@ 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[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$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.*" @@ -3217,17 +4397,18 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +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, @@ -3244,7 +4425,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3260,87 +4441,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop 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 - +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } 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" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +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 @@ -3354,37 +4494,89 @@ for ac_file in conftest.exe conftest conftest.*; do * ) 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; }; }; } +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } 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 conftest$ac_cv_exeext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$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. */ +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3392,17 +4584,18 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3411,39 +4604,32 @@ $as_echo "$ac_try_echo") >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$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; }; }; } +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3453,186 +4639,95 @@ 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 +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no +else $as_nop + ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; 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 ac_fn_c_try_compile "$LINENO" +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 +else $as_nop + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; 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 +if ac_fn_c_try_compile "$LINENO" +then : - ac_c_werror_flag=$ac_save_c_werror_flag +else $as_nop + 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; 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 ac_fn_c_try_compile "$LINENO" +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3647,121 +4742,145 @@ 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_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include -/* 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]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* 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]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -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; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +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 + if ac_fn_c_try_compile "$LINENO" +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3770,2118 +4889,1782 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$want_auto_cflags"; then + AUTO_CFLAGS="-g ${GCC:+-O2}" + AUTO_LDFLAGS="-g ${GCC:+-O2}" +# STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}" + STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}" +else + AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= +fi + + +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done - { $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 + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test ${ac_cv_safe_to_define___extensions__+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 (); +# define __EXTENSIONS__ 1 + $ac_includes_default int -main () +main (void) { -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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_safe_to_define___extensions__=yes +else $as_nop + ac_cv_safe_to_define___extensions__=no 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" +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if test ${ac_cv_should_define__xopen_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_should_define__xopen_source=no + if test $ac_cv_header_wchar_h = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + mbstate_t x; +int +main (void) +{ -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 to if __STDC__ is defined, since - # 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. */ + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#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 + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_should_define__xopen_source=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } -rm -f conftest.err conftest.$ac_ext + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h - # 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 -_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 + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h - # Passes both tests. -ac_preproc_ok=: -break -fi + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h -rm -f conftest.err conftest.$ac_ext + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h -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 + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h + + printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + + if test $ac_cv_header_minix_config_h = yes +then : + MINIX=yes + printf "%s\n" "#define _MINIX 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h + +else $as_nop + MINIX= fi + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - done - ac_cv_prog_CPP=$CPP +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h 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 to if __STDC__ is defined, since - # 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 -#else -# include -#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 +# Check whether --enable-largefile was given. +if test ${enable_largefile+y} +then : + enableval=$enable_largefile; fi -rm -f conftest.err conftest.$ac_ext +if test "$enable_largefile" != no; then - # 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +printf %s "checking for special C compiler options needed for large files... " >&6; } +if test ${ac_cv_sys_largefile_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -_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 +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ - # Passes both tests. -ac_preproc_ok=: -break + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO" +then : + 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; }; }; } +rm -f core conftest.err conftest.$ac_objext conftest.beam + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_largefile_CC=' -n32'; break 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext 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; }; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test ${ac_cv_sys_file_offset_bits+y} +then : + printf %s "(cached) " >&6 +else $as_nop + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include - +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int -main () +main (void) { ; 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_file_offset_bits=no; break 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#define _FILE_OFFSET_BITS 64 +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_file_offset_bits=64; break fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } +if test ${ac_cv_sys_large_files+y} +then : + printf %s "(cached) " >&6 +else $as_nop + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + ; + return 0; +} _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* - +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_large_files=no; break 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#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))) +#define _LARGE_FILES 1 +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int -main () +main (void) { - 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_large_files=1; break fi - - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +printf "%s\n" "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h +;; +esac +rm -rf conftest* + 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. +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 + ;; + *-qnx*) + cross_cache=${srcdir}/cross-build/qnx.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 +CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} +# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX -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 +if test "$opt_profiling" = "yes"; then + PROFILE_FLAGS=-pg + case "$host_os" in + solaris2*|linux*|darwin*) ;; + *) opt_static_link=yes ;; + esac + DEBUG= MALLOC_DEBUG= +fi -#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 +prefer_shared=yes +prefer_static=no - eval "$as_ac_Header=no" +if test "$opt_static_link" = yes; then + prefer_static=yes + prefer_shared=no + # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 + if test "$GCC" = "yes"; then + STATIC_LD="-static" + case "$host_os" in + solaris2*|linux*) ;; + *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental + esac + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# set the appropriate make variables for building the "build tools" +# modify defaults based on whether or not we are cross compiling, since the +# options for the target host may not be appropriate for the build host +if test "X$cross_compiling" = "Xno"; then + CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' + if test X"$opt_profiling" = Xyes; then + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'} + else + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} + fi + # CFLAGS set above to default value if not passed in environment + if test -n "$want_auto_cflags" ; then + CFLAGS_FOR_BUILD="${CFLAGS}" + BASE_CFLAGS_FOR_BUILD="${CFLAGS}" + else + # passed in environment + CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + BASE_CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + fi + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} +else + CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} + BASE_CFLAGS_FOR_BUILD=${BASE_CFLAGS_FOR_BUILD="-g"} + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""} 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 + + + + + + + + + +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "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 -{ $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 +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" 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. + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include +#include + Syntax error _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 +if ac_fn_c_try_cpp "$LINENO" +then : - ac_header_compiler=no +else $as_nop + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -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 + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _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 +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext -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 +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -$as_echo "$ac_cv_header_minix_config_h" >&6; } + + done + ac_cv_prog_CPP=$CPP fi -if test "x$ac_cv_header_minix_config_h" = x""yes; then - MINIX=yes + CPP=$ac_cv_prog_CPP else - MINIX= + ac_cv_prog_CPP=$CPP fi - - - if test "$MINIX" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define _POSIX_SOURCE 1 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$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. + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error _ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext -cat >>confdefs.h <<\_ACEOF -#define _POSIX_1_SOURCE 2 + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : -cat >>confdefs.h <<\_ACEOF -#define _MINIX 1 -_ACEOF - - fi +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +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 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. */ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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" + as_fn_executable_p "$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 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '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 + as_fn_arith $ac_count + 1 && ac_count=$as_val + 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 -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi - ; - 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;; +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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" + as_fn_executable_p "$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 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '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 + as_fn_arith $ac_count + 1 && ac_count=$as_val + 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 -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 + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" - cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 +if test $ac_cv_c_compiler_gnu = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +printf %s "checking whether $CC needs -traditional... " >&6; } +if test ${ac_cv_prog_gcc_traditional+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_pattern="Autoconf.*'x'" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +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 $as_nop + ac_cv_prog_gcc_traditional=no +fi +rm -rf conftest* - cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define _TANDEM_SOURCE 1 + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +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 -rf conftest* + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval=$enable_largefile; -fi -if test "$enable_largefile" != no; then +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 + - { $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 +if test "X$bash_cv_termcap_lib" = "X"; then +_bash_needmsg=yes 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "checking which library has the termcap functions... " >&6; } +_bash_needmsg= +fi +if test ${bash_cv_termcap_lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" +if test "x$ac_cv_func_tgetent" = xyes +then : + bash_cv_termcap_lib=libc +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 +printf %s "checking for tgetent in -ltermcap... " >&6; } +if test ${ac_cv_lib_termcap_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltermcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - /* 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]; + +/* 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. */ +char tgetent (); int -main () +main (void) { - +return tgetent (); ; 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 - - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_termcap_tgetent=yes +else $as_nop + ac_cv_lib_termcap_tgetent=no fi - -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; } +if test "x$ac_cv_lib_termcap_tgetent" = xyes +then : + bash_cv_termcap_lib=libtermcap +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 +printf %s "checking for tgetent in -ltinfo... " >&6; } +if test ${ac_cv_lib_tinfo_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltinfo $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { $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. */ +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tinfo_tgetent=yes +else $as_nop + ac_cv_lib_tinfo_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; } +if test "x$ac_cv_lib_tinfo_tgetent" = xyes +then : + bash_cv_termcap_lib=libtinfo +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 +printf %s "checking for tgetent in -lcurses... " >&6; } +if test ${ac_cv_lib_curses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - /* 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]; + +/* 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. */ +char tgetent (); int -main () +main (void) { - +return tgetent (); ; 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 - - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_curses_tgetent=yes +else $as_nop + ac_cv_lib_curses_tgetent=no 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; } +if test "x$ac_cv_lib_curses_tgetent" = xyes +then : + bash_cv_termcap_lib=libcurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 +printf %s "checking for tgetent in -lncurses... " >&6; } +if test ${ac_cv_lib_ncurses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* 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]; + +/* 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. */ +char tgetent (); int -main () +main (void) { - +return tgetent (); ; 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 - - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncurses_tgetent=yes +else $as_nop + ac_cv_lib_ncurses_tgetent=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; } +if test "x$ac_cv_lib_ncurses_tgetent" = xyes +then : + bash_cv_termcap_lib=libncurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 +printf %s "checking for tgetent in -lncursesw... " >&6; } +if test ${ac_cv_lib_ncursesw_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncursesw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - /* 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]; + +/* 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. */ +char tgetent (); int -main () +main (void) { - +return tgetent (); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncursesw_tgetent=yes +else $as_nop + ac_cv_lib_ncursesw_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; } +if test "x$ac_cv_lib_ncursesw_tgetent" = xyes +then : + bash_cv_termcap_lib=libncursesw +else $as_nop + bash_cv_termcap_lib=gnutermcap +fi +fi 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 - /* 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 () -{ +fi - ; - 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 +fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done +if test "X$_bash_needmsg" = "Xyes"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "checking which library has the termcap functions... " >&6; } 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 +printf "%s\n" "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 +# we assume ncurses is installed somewhere the linker can find it +TERMCAP_LIB=-lncurses +TERMCAP_DEP= fi -SIGNAMES_O= -SIGNAMES_H=lsignames.h +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5 +printf %s "checking version of installed readline library... " >&6; } +# What a pain in the ass this is. -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' +# 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 -z "$CC_FOR_BUILD"; then - if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' - else - CC_FOR_BUILD=gcc - fi -fi +if test ${ac_cv_rl_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_rl_version='8.0' +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include -test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 +extern int rl_gnu_readline_p; -test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2" +int +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); +} -if test "$opt_profiling" = "yes"; then - PROFILE_FLAGS=-pg - case "$host_os" in - solaris2*) ;; - *) opt_static_link=yes ;; - esac - DEBUG= MALLOC_DEBUG= +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_rl_version=`cat conftest.rlv` +else $as_nop + ac_cv_rl_version='0.0' 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext 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" - - +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_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 -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 +if test $ac_cv_rl_version = '0.0' ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 +printf "%s\n" "$ac_cv_rl_version" >&6; } 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 -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* +printf "%s\n" "#define RL_READLINE_VERSION $RL_VERSION" >>confdefs.h - 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 +printf "%s\n" "#define RL_VERSION_MAJOR $RL_MAJOR" >>confdefs.h -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 +printf "%s\n" "#define RL_VERSION_MINOR $RL_MINOR" >>confdefs.h -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 declares tgetent. - For example, HP-UX 11i declares gettimeofday. */ -#define tgetent innocuous_tgetent -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char tgetent (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#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 +# 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 -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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 +printf "%s\n" "$ac_cv_rl_version" >&6; } - 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 + + case "$ac_cv_rl_version" in + 8*|9*) ;; + *) opt_with_installed_readline=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5 +printf "%s\n" "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5 +printf "%s\n" "$as_me: WARNING: using private bash version" >&2;} + ;; + esac 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 +TILDE_LIB=-ltilde +if test $opt_readline = yes; then + printf "%s\n" "#define READLINE 1" >>confdefs.h - ac_cv_lib_termcap_tgetent=no + 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 + printf "%s\n" "#define HISTORY 1" >>confdefs.h -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. */ + fi + if test $opt_bang_history = yes; then + printf "%s\n" "#define BANG_HISTORY 1" >>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 + 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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_tinfo_tgetent=no + HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' + HISTORY_LIB= HISTORY_DEP= 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 + # 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +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 as_fn_executable_p "$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+y}; 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } -{ $as_echo "$as_me:$LINENO: checking version of installed readline library" >&5 -$as_echo_n "checking version of installed readline library... " >&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}' -# What a pain in the ass this is. +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -# save cpp and ld options -_save_CFLAGS="$CFLAGS" -_save_LDFLAGS="$LDFLAGS" -_save_LIBS="$LIBS" +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# 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 -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -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' +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&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 -#include - -extern int rl_gnu_readline_p; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -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` +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 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 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( 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 - - +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi -CFLAGS="$_save_CFLAGS" -LDFLAGS="$_save_LDFLAGS" -LIBS="$_save_LIBS" +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -RL_MAJOR=0 -RL_MINOR=0 +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# ( -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]*$::'` - ;; + +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$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 -# ((( -case $RL_MAJOR in -[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;; -[0-9]) _RL_MAJOR=0$RL_MAJOR ;; -*) _RL_MAJOR=00 ;; +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_YACC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +printf "%s\n" "$YACC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + SET_MAKE= +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi -# ((( -case $RL_MINOR in -[0-9][0-9]) _RL_MINOR=$RL_MINOR ;; -[0-9]) _RL_MINOR=0$RL_MINOR ;; -*) _RL_MINOR=00 ;; + +case "$ac_cv_prog_YACC" in +*bison*) ;; +*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5 +printf "%s\n" "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;; esac -RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}" +case "$host_os" in +opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; +*) MAKE_SHELL=/bin/sh ;; +esac -# 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 +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 RL_READLINE_VERSION $RL_VERSION -_ACEOF +# Checks for stat-related time functions. +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software +# Foundation, Inc. -cat >>confdefs.h <<_ACEOF -#define RL_VERSION_MAJOR $RL_MAJOR -_ACEOF +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -cat >>confdefs.h <<_ACEOF -#define RL_VERSION_MINOR $RL_MINOR -_ACEOF +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ +# Configure checks for struct timespec +# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc. -# 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 +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -{ $as_echo "$as_me:$LINENO: result: $ac_cv_rl_version" >&5 -$as_echo "$ac_cv_rl_version" >&6; } +# Original written by Paul Eggert and Jim Meyering. +# Modified by Chet Ramey for bash -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 +# codeset.m4 serial 5 (gettext-0.18.2) @@ -5889,4576 +6672,3184 @@ 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 +# fcntl-o.m4 serial 6 -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 whether the flags O_NOATIME and O_NOFOLLOW actually work. +# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. +# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. -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 +# gettext.m4 serial 69 (gettext-0.19.9) - 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 +# glibc2.m4 serial 3 +# Test for the GNU C Library, version 2.0 or newer. +# From Bruno Haible. -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. */ +# glibc21.m4 serial 5 -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; +# Test for the GNU C Library, version 2.1 or newer, or uClibc. +# From Bruno Haible. - *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 +# host-cpu-c-abi.m4 serial 11 -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 +# iconv.m4 serial 21 -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 +# intdiv0.m4 serial 6 (gettext-0.18.2) -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 - #include -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 - #include +# intl.m4 serial 34 (gettext-0.19.9) -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 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 -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 -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 +# intlmacosx.m4 serial 6 (gettext-0.19.9) - 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 +# intl-thread-locale.m4 serial 4 -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 +# intmax.m4 serial 6 (gettext-0.18.2) -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 +# inttypes-pri.m4 serial 7 (gettext-0.18.2) - 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 +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. -{ $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 +# inttypes.m4 serial 27 -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 - 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 +# Ensure that the PRI* and SCN* macros are defined appropriately. - ; - 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 +# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. +# If $2 is true, the condition is $3; otherwise if long long int is supported +# approximate the condition with $4; otherwise, assume the condition is false. +# The condition should work on all C99 platforms; the approximations should be +# good enough to work on all practical pre-C99 platforms. +# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. -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 +# inttypes_h.m4 serial 10 -{ $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 +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. -cat >>confdefs.h <<\_ACEOF -#define __PROTOTYPES 1 -_ACEOF -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi +# lcmessage.m4 serial 7 (gettext-0.18.2) -{ $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 +# Check whether LC_MESSAGES is available in . - ; - 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 +# lib-ld.m4 serial 9 -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 +# lib-link.m4 serial 28 -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; } +# lib-prefix.m4 serial 14 -# 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 +# lock.m4 serial 14 -# 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 +# Prerequisites of lib/glthread/lock.c. - rm -f messages.po +# nls.m4 serial 5 (gettext-0.18) -# 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 +# po.m4 serial 24a - 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 +# printf-posix.m4 serial 6 (gettext-0.18.2) -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 +# progtest.m4 serial 7 (gettext-0.18.2) -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 -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 +# Search path for a program which passes the given test. -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 +# pthread_rwlock_rdlock.m4 serial 2 -{ $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 -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# 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; } +# size_max.m4 serial 11 -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 +# stdint_h.m4 serial 9 -{ $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* +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. -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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif +# threadlib.m4 serial 16 -#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; } +# uintmax_t.m4 serial 12 -# 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; } +# Define uintmax_t to 'unsigned long' or 'unsigned long long' +# if it is not already defined in or . -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 +# ulonglong.m4 serial 10 +# visibility.m4 serial 6 -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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#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 +# wchar_t.m4 serial 4 (gettext-0.18.2) -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 +# wint_t.m4 serial 7 -{ $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 -#include -#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 +# xsize.m4 serial 5 -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# 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 */ + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int -main () +main (void) { - 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); +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* 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}; + /* IBM 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 sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; - /* 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; + *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; + } + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; 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 - /* 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_const=yes +else $as_nop + ac_cv_c_const=no fi - - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF +printf "%s\n" "#define const /**/" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } #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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_inline=$ac_kw fi -rm -f conftest* - - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done 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" - - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } - { $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 +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 - # 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +printf %s "checking whether byte ordering is bigendian... " >&6; } +if test ${ac_cv_c_bigendian+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +if ac_fn_c_try_compile "$LINENO" +then : -#include -#include + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include -static void -#ifdef __cplusplus -sigfpe_handler (int sig) -#else -sigfpe_handler (sig) int sig; -#endif +int +main (void) { - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ - exit (sig != SIGFPE); -} +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif -int x = 1; -int y = 0; -int z; -int nan; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include -int main () +int +main (void) { - 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 +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif - z = x / y; - nan = y / y; - exit (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 - 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_bigendian=yes +else $as_nop + ac_cv_c_bigendian=no fi - - - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 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 - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif - { $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. */ + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +#include + int -main () +main (void) { -uintmax_t i = (uintmax_t) -1; +#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 - 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_bigendian=yes +else $as_nop + ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 - +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +unsigned short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + unsigned short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + unsigned short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + unsigned 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; - { $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. */ +int +main (void) +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +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 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +$ac_includes_default int -main () +main (void) { -uintmax_t i = (uintmax_t) -1; + + /* 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_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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_c_bigendian=no +else $as_nop + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +printf "%s\n" "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) -cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H_WITH_UINTMAX 1 -_ACEOF +printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - fi + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 +printf %s "checking for preprocessor stringizing operator... " >&6; } +if test ${ac_cv_c_stringize+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define x(y) #y - { $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. */ +char *s = x(teststring); _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "#teststring" >/dev/null 2>&1 +then : + ac_cv_c_stringize=no +else $as_nop + ac_cv_c_stringize=yes +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5 +printf "%s\n" "$ac_cv_c_stringize" >&6; } +if test $ac_cv_c_stringize = yes; then + +printf "%s\n" "#define HAVE_STRINGIZE 1" >>confdefs.h + +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 +printf %s "checking for long double... " >&6; } +if test ${ac_cv_type_long_double+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$GCC" = yes; then + ac_cv_type_long_double=yes + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -unsigned long long ull = 1; int i = 63; +/* The Stardent Vistra knows sizeof (long double), but does + not support it. */ + long double foo = 0.0L; int -main () +main (void) { -unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull; +static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + sizeof (double) <= sizeof (long double))]; +test_array [0] = 0; +return test_array [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_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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_type_long_double=yes +else $as_nop + ac_cv_type_long_double=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5 +printf "%s\n" "$ac_cv_type_long_double" >&6; } + if test $ac_cv_type_long_double = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSIGNED_LONG_LONG 1 -_ACEOF +printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h fi +if test "$ac_prog_cc_stdc" != no; then +printf "%s\n" "#define PROTOTYPES 1" >>confdefs.h - 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 - +printf "%s\n" "#define __PROTOTYPES 1" >>confdefs.h - { $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 +fi - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +printf %s "checking whether char is unsigned... " >&6; } +if test ${ac_cv_c_char_unsigned+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +$ac_includes_default int -main () +main (void) { +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0; +return test_array [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 - 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_char_unsigned=no +else $as_nop + ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +printf "%s\n" "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes; then + printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +printf %s "checking for working volatile... " >&6; } +if test ${ac_cv_c_volatile+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - fi +int +main (void) +{ +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_volatile=yes +else $as_nop + ac_cv_c_volatile=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 +printf "%s\n" "$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then +printf "%s\n" "#define volatile /**/" >>confdefs.h - 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 +fi - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +printf %s "checking for C/C++ restrict keyword... " >&6; } +if test ${ac_cv_c_restrict+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_restrict=no + # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: + # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html + # Put 'restrict' last, because C++ lacks it. + for ac_kw in __restrict__ __restrict _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#ifdef PRId32 -char *p = PRId32; -#endif +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } int -main () +main (void) { +int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (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 - 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_restrict=$ac_kw fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +printf "%s\n" "$ac_cv_c_restrict" >&6; } - fi + case $ac_cv_c_restrict in + restrict) ;; + no) printf "%s\n" "#define restrict /**/" >>confdefs.h + ;; + *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h + ;; + esac - 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" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + 'BusyBox '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS -# 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=';' + test -d ./--version && rmdir ./--version + if test ${ac_cv_path_mkdir+y}; then + MKDIR_P="$ac_cv_path_mkdir -p" else - PATH_SEPARATOR=: + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P 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. + MKDIR_P="$ac_install_sh -d" 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 &5; then - acl_cv_prog_gnu_ld=yes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$MKDIR_P" >&6; } + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_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 +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_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_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi else - acl_cv_prog_gnu_ld=no + ac_cv_path_SED=$SED 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +printf %s "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test ${enable_nls+y} +then : + enableval=$enable_nls; USE_NLS=$enableval +else $as_nop + USE_NLS=yes +fi - { $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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } - 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 + + + GETTEXT_MACRO_VERSION=0.19 + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 -{ $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; : + +# 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 - enable_rpath=yes + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +printf "%s\n" "$MSGFMT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GMSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +printf "%s\n" "$GMSGFMT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac - 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\" +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +# 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_XGETTEXT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +printf "%s\n" "$XGETTEXT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# 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 + rm -f messages.po - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac - 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 +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 +# 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 - 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 +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGMERGE+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi 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 + 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +printf "%s\n" "$MSGMERGE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - 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 + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= - 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 + ac_config_commands="$ac_config_commands po-directories" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5 +printf %s "checking whether we are using the GNU C Library 2 or newer... " >&6; } +if test ${ac_cv_gnu_library_2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + 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=yes +else $as_nop + ac_cv_gnu_library_2=no +fi +rm -rf conftest* +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5 +printf "%s\n" "$ac_cv_gnu_library_2" >&6; } + GLIBC2="$ac_cv_gnu_library_2" -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 + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +printf %s "checking whether the -Werror option is usable... " >&6; } +if test ${gl_cv_cc_vis_werror+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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; } +int +main (void) +{ -# 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> + ; + return 0; +} _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 +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_cc_vis_werror=yes +else $as_nop + gl_cv_cc_vis_werror=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" -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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +printf "%s\n" "$gl_cv_cc_vis_werror" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +printf %s "checking for simple visibility declarations... " >&6; } +if test ${gl_cv_cc_visibility+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} -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 +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_cc_visibility=yes +else $as_nop + gl_cv_cc_visibility=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" -done - - - - - - - - +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +printf "%s\n" "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi +printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes +then : +else $as_nop +printf "%s\n" "#define size_t unsigned int" >>confdefs.h +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 +printf %s "checking for stdint.h... " >&6; } +if test ${gl_cv_header_stdint_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main (void) +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_stdint_h=yes +else $as_nop + gl_cv_header_stdint_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 +printf "%s\n" "$gl_cv_header_stdint_h" >&6; } + if test $gl_cv_header_stdint_h = yes; then +printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h + fi +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_working_alloca_h=yes +else $as_nop + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h +fi -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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 +#include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# 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 +void *alloca (size_t); +# endif #endif int -main () +main (void) { -return $ac_func (); +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 - 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" +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_alloca_works=yes +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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 - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } fi -done - +if test $ac_cv_func_alloca_works = yes; then +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h +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 +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h - 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_c_stack_direction=0 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +$ac_includes_default int -main () +find_stack_direction (int *addr, int depth) { -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } -_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 -#include int -main () +main (int argc, char **argv) { -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; + return find_stack_direction (0, argc + !argv + 20) < 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 - +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_c_stack_direction=1 +else $as_nop + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h -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; } +ac_func= +for ac_item in $ac_func_c_list +do + if test $ac_func; then + ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func + if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then + echo "#define $ac_item 1" >> confdefs.h + fi + ac_func= else - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= + ac_func=$ac_item fi +done +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +printf %s "checking for working mmap... " >&6; } +if test ${ac_cv_func_mmap_fixed_mapped+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + linux*) ac_cv_func_mmap_fixed_mapped=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_mmap_fixed_mapped=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc - 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 +/* 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. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + 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 -#include -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 +#include +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# 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 () +main (void) { + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; - ; + 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 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* 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 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* 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 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + free (data); + free (data3); 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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_mmap_fixed_mapped=yes +else $as_nop + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - am_cv_proto_iconv_arg1="const" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h -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 +rm -f conftest.mmap conftest.txt - 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 +printf %s "checking whether integer division by zero raises SIGFPE... " >&6; } +if test ${gt_cv_int_divbyzero_sigfpe+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_cv_int_divbyzero_sigfpe= + case "$host_os" in + macos* | darwin[6-9]* | darwin[1-9][0-9]*) + # On Mac OS X 10.2 or newer, just assume the same as when cross- + # compiling. If we were to perform the real test, 1 Crash Report + # dialog window would pop up. + case "$host_cpu" in + i[34567]86 | x86_64) + gt_cv_int_divbyzero_sigfpe="guessing yes" ;; + esac + ;; + esac + if test -z "$gt_cv_int_divbyzero_sigfpe"; then + if test "$cross_compiling" = yes +then : + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac - { $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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main () + +#include +#include + +static void +sigfpe_handler (int sig) { -char* cs = nl_langinfo(CODESET); - ; - return 0; + /* 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 xnan; + +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; + xnan = y / y; + exit (2); } -_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 +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_int_divbyzero_sigfpe=yes +else $as_nop + gt_cv_int_divbyzero_sigfpe=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5 +printf "%s\n" "$gt_cv_int_divbyzero_sigfpe" >&6; } + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac -cat >>confdefs.h <<\_ACEOF -#define HAVE_LANGINFO_CODESET 1 -_ACEOF +printf "%s\n" "#define INTDIV0_RAISES_SIGFPE $value" >>confdefs.h - 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 +printf %s "checking for inttypes.h... " >&6; } +if test ${gl_cv_header_inttypes_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +#include + int -main () +main (void) { -return LC_MESSAGES +uintmax_t i = (uintmax_t) -1; return !i; ; 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 +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_inttypes_h=yes +else $as_nop + gl_cv_header_inttypes_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 +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 +printf "%s\n" "$gl_cv_header_inttypes_h" >&6; } + if test $gl_cv_header_inttypes_h = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LC_MESSAGES 1 -_ACEOF +printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +printf %s "checking for unsigned long long int... " >&6; } +if test ${ac_cv_type_unsigned_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_unsigned_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main (void) +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +else $as_nop + ac_cv_type_unsigned_long_long_int=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext;; + esac 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 - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then - test -n "$INTLBISON" && break -done +printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - 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 + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h + else +printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h + fi + ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h +fi + if test $ac_cv_header_inttypes_h = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 +printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } +if test ${gt_cv_inttypes_pri_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef PRId32 +char *p = PRId32; +#endif +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_inttypes_pri_broken=no +else $as_nop + gt_cv_inttypes_pri_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { $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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 +printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; } + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then - { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } +printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h + PRI_MACROS_BROKEN=1 + else + PRI_MACROS_BROKEN=0 + fi - 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 + # Check whether --enable-threads was given. +if test ${enable_threads+y} +then : + enableval=$enable_threads; gl_use_threads=$enableval +else $as_nop + if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else + case "$host_os" in + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac + fi + fi - { $as_echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 -$as_echo "$nls_cv_force_use_gnu_gettext" >&6; } + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using : + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd* | midnightbsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + fi + + - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + 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+y} +then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else $as_nop + with_gnu_ld=no +fi +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 - { $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 +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +printf %s "checking for ld... " >&6; } +elif test "$GCC" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } +elif test "$with_gnu_ld" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + if test ${acl_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + fi + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + 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 variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # The compiler produces 64-bit code. Add option '-b64' so that the + # linker groks 64-bit object files. + case "$acl_cv_path_LD " in + *" -b64 "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; + esac + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + sparc64-*-netbsd*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -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; -} +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + _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 +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # The compiler produces 32-bit code. Add option '-m elf32_sparc' + # so that the linker groks 32-bit object files. + case "$acl_cv_path_LD " in + *" -m elf32_sparc "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; + esac - gt_cv_func_gnugettext2_libc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + esac -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 + LD="$acl_cv_path_LD" +fi +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${acl_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld - 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" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +printf %s "checking for shared library run path origin... " >&6; } +if test ${acl_cv_rpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 -# 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 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +printf "%s\n" "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test ${enable_rpath+y} +then : + enableval=$enable_rpath; : +else $as_nop + enable_rpath=yes +fi - 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +printf %s "checking 32-bit host C ABI... " >&6; } +if test ${gl_cv_host_cpu_c_abi_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + *) + gl_cv_host_cpu_c_abi_32bit=no ;; + esac + else + case "$host_cpu" in + + i[4567]86 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) \ + && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _ILP32 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=yes +else $as_nop + gl_cv_host_cpu_c_abi_32bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + riscv32 | riscv64 ) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + *) + gl_cv_host_cpu_c_abi_32bit=no + ;; + esac + fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } - 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 + HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + + + + + case "$host_os" in + solaris*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +printf %s "checking for 64-bit host... " >&6; } +if test ${gl_cv_solaris_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _LP64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_solaris_64bit=yes +else $as_nop + gl_cv_solaris_64bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +printf "%s\n" "$gl_cv_solaris_64bit" >&6; };; + esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +printf %s "checking for the common suffixes of directories in the library search path... " >&6; } +if test ${acl_cv_libdirstems+y} +then : + printf %s "(cached) " >&6 +else $as_nop + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + if test "$HOST_CPU_C_ABI_32BIT" != yes; then + searchpath=`(if test -f /usr/bin/gcc \ + && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ + LC_ALL=C /usr/bin/gcc -print-search-dirs; \ + else \ + LC_ALL=C $CC -print-search-dirs; \ + fi) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +printf "%s\n" "$acl_cv_libdirstems" >&6; } + # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` + + + + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +printf %s "checking whether imported symbols can be declared weak... " >&6; } +if test ${gl_cv_have_weak+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern void xyzzy (); +#pragma weak xyzzy +int +main (void) +{ +xyzzy(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_have_weak=maybe +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1 +then : + gl_cv_have_weak="guessing yes" +else $as_nop + gl_cv_have_weak="guessing no" +fi +rm -rf conftest* + + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_have_weak=yes +else $as_nop + gl_cv_have_weak=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +printf "%s\n" "$gl_cv_have_weak" >&6; } + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes +then : + gl_have_pthread_h=yes +else $as_nop + gl_have_pthread_h=no +fi + + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + +int +main (void) +{ +pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_pthread=yes + LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread + LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$save_LIBS + test -n "$gl_have_pthread" && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +printf %s "checking for pthread_kill in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pthread_pthread_kill=yes +else $as_nop + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes +then : + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) + +printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h + + esac + +fi + + elif test -z "$gl_have_pthread"; then + # Some library is needed. Try libpthread and libc_r. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +printf %s "checking for pthread_kill in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pthread_pthread_kill=yes +else $as_nop + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes +then : + gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread +fi + + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 +printf %s "checking for pthread_kill in -lc_r... " >&6; } +if test ${ac_cv_lib_c_r_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_c_r_pthread_kill=yes +else $as_nop + ac_cv_lib_c_r_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; } +if test "x$ac_cv_lib_c_r_pthread_kill" = xyes +then : + gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r +fi + + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + +printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ +thr_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_solaristhread=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h + + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 +printf %s "checking how to link with libpth... " >&6; } +if test ${ac_cv_libpth_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + + + + + + 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-libpth-prefix was given. +if test ${with_libpth_prefix+y} +then : + withval=$with_libpth_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/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBPTH= + LTLIBPTH= + INCPTH= + LIBPTH_PREFIX= + HAVE_LIBPTH= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='pth ' + 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" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBPTH; 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" @@ -10467,20 +9858,43 @@ fi 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 + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done fi fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi fi ;; esac @@ -10490,10 +9904,12 @@ fi done fi if test "X$found_dir" != "X"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-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" + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else haveit= for x in $ltrpathdirs; do @@ -10505,11 +9921,11 @@ fi if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi - if test "$hardcode_direct" = yes; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + if test "$acl_hardcode_direct" = yes; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then @@ -10522,7 +9938,7 @@ fi fi else haveit= - for x in $LDFLAGS $LIBINTL; do + for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -10538,27 +9954,37 @@ fi fi done if test -z "$haveit"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" fi - if test "$hardcode_minus_L" != no; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + if test "$acl_hardcode_minus_L" != no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else - LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" else - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + LIBPTH="${LIBPTH}${LIBPTH:+ }-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/*$,,'` + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi additional_includedir="$basedir/include" ;; esac @@ -10568,12 +9994,12 @@ fi if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in - linux*) haveit=yes;; + linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then - for x in $CPPFLAGS $INCINTL; do + for x in $CPPFLAGS $INCPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -10590,7 +10016,7 @@ fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then - INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" fi fi fi @@ -10607,18 +10033,20 @@ fi case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/lib"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= - if test "X$additional_libdir" = "X/usr/local/lib"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in - linux*) haveit=yes;; + linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= - for x in $LDFLAGS $LIBINTL; do + for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -10635,11 +10063,11 @@ fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" fi fi haveit= - for x in $LDFLAGS $LTLIBINTL; do + for x in $LDFLAGS $LTLIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -10656,7 +10084,7 @@ fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" fi fi fi @@ -10694,250 +10122,65 @@ fi 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" + LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" ;; esac done fi else - LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then + if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-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 -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 -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 + ac_cv_libpth_libs="$LIBPTH" + ac_cv_libpth_ltlibs="$LTLIBPTH" + ac_cv_libpth_cppflags="$INCPTH" + ac_cv_libpth_prefix="$LIBPTH_PREFIX" -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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 +printf "%s\n" "$ac_cv_libpth_libs" >&6; } + LIBPTH="$ac_cv_libpth_libs" + LTLIBPTH="$ac_cv_libpth_ltlibs" + INCPTH="$ac_cv_libpth_cppflags" + LIBPTH_PREFIX="$ac_cv_libpth_prefix" - for element in $INCINTL; do + for element in $INCPTH; do haveit= for x in $CPPFLAGS; do @@ -10959,14499 +10202,7802 @@ $as_echo "$LIBINTL" >&6; } fi done - fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETTEXT 1 -_ACEOF + + HAVE_LIBPTH=yes + -cat >>confdefs.h <<\_ACEOF -#define HAVE_DCGETTEXT 1 + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +pth_self(); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_pth=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" - fi +printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h - POSUB=po - fi + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then +printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + +printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h + fi + ;; + esac + fi + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 +printf %s "checking for multithread API to use... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 +printf "%s\n" "$gl_threads_api" >&6; } - nls_cv_header_intl= - nls_cv_header_libgt= - - DATADIRNAME=share - INSTOBJEXT=.mo - GENCAT=gencat - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + has_rwlock=false + ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include +" +if test "x$ac_cv_type_pthread_rwlock_t" = xyes +then : + has_rwlock=true - INTL_LIBTOOL_SUFFIX_PREFIX= +printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h +fi + if $has_rwlock; then - INTLLIBS="$LIBINTL" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 +printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } +if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y} +then : + printf %s "(cached) " >&6 +else $as_nop + save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + if test "$cross_compiling" = yes +then : + gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define SUCCEED() exit (0) +#define FAILURE() exit (1) +#define UNEXPECTED(n) (exit (10 + (n))) + +/* The main thread creates the waiting writer and the requesting reader threads + in the default way; this guarantees that they have the same priority. + We can reuse the main thread as first reader thread. */ + +static pthread_rwlock_t lock; +static pthread_t reader1; +static pthread_t writer; +static pthread_t reader2; +static pthread_t timer; +/* Used to pass control from writer to reader2 and from reader2 to timer, + as in a relay race. + Passing control from one running thread to another running thread + is most likely faster than to create the second thread. */ +static pthread_mutex_t baton; + +static void * +timer_func (void *ignored) +{ + /* Step 13 (can be before or after step 12): + The timer thread takes the baton, then waits a moment to make sure + it can tell whether the second reader thread is blocked at step 12. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (13); + usleep (100000); + /* By the time we get here, it's clear that the second reader thread is + blocked at step 12. This is the desired behaviour. */ + SUCCEED (); +} + +static void * +reader2_func (void *ignored) +{ + int err; + + /* Step 8 (can be before or after step 7): + The second reader thread takes the baton, then waits a moment to make sure + the writer thread has reached step 7. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (8); + usleep (100000); + /* Step 9: The second reader thread requests the lock. */ + err = pthread_rwlock_tryrdlock (&lock); + if (err == 0) + FAILURE (); + else if (err != EBUSY) + UNEXPECTED (9); + /* Step 10: Launch a timer, to test whether the next call blocks. */ + if (pthread_create (&timer, NULL, timer_func, NULL)) + UNEXPECTED (10); + /* Step 11: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (11); + /* Step 12: The second reader thread requests the lock. */ + err = pthread_rwlock_rdlock (&lock); + if (err == 0) + FAILURE (); + else + UNEXPECTED (12); +} +static void * +writer_func (void *ignored) +{ + /* Step 4: Take the baton, so that the second reader thread does not go ahead + too early. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (4); + /* Step 5: Create the second reader thread. */ + if (pthread_create (&reader2, NULL, reader2_func, NULL)) + UNEXPECTED (5); + /* Step 6: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (6); + /* Step 7: The writer thread requests the lock. */ + if (pthread_rwlock_wrlock (&lock)) + UNEXPECTED (7); + return NULL; +} +int +main () +{ + reader1 = pthread_self (); + /* Step 1: The main thread initializes the lock and the baton. */ + if (pthread_rwlock_init (&lock, NULL)) + UNEXPECTED (1); + if (pthread_mutex_init (&baton, NULL)) + UNEXPECTED (1); + /* Step 2: The main thread acquires the lock as a reader. */ + if (pthread_rwlock_rdlock (&lock)) + UNEXPECTED (2); + /* Step 3: Create the writer thread. */ + if (pthread_create (&writer, NULL, writer_func, NULL)) + UNEXPECTED (3); + /* Job done. Go to sleep. */ + for (;;) + { + sleep (1); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_pthread_rwlock_rdlock_prefer_writer=yes +else $as_nop + gl_cv_pthread_rwlock_rdlock_prefer_writer=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + LIBS="$save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 +printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } + case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in + *yes) +printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h + ;; + esac -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 + fi + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include <$ac_hdr> + #include int -main () +main (void) { -if ((DIR *) 0) -return 0; + +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !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 - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO" +then : - eval "$as_ac_Header=no" -fi +printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h -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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + : -ac_header_dirent=$ac_hdr; break -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -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. */ +int +main (void) +{ +(void) strchr; + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); -/* 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 () +main (void) { -return opendir (); +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + ; 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;; +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; 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 -#include -#include -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 + use_additional=yes + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" -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 + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" - ac_header_compiler=no -fi + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -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 +# Check whether --with-libiconv-prefix was given. +if test ${with_libiconv_prefix+y} +then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then - ac_header_preproc=no -fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" -# 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; } + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -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 + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi fi -done - - - - - - - - - - - - - - - - - - - - - + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + HAVE_LIBICONV= + 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= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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" -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 -#endif - - -#include -_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 -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 -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares _doprnt. - For example, HP-UX 11i declares gettimeofday. */ -#define _doprnt innocuous__doprnt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 - -_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 -#include - -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 declares __setostype. - For example, HP-UX 11i declares gettimeofday. */ -#define __setostype innocuous___setostype - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char __setostype (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares wait3. - For example, HP-UX 11i declares gettimeofday. */ -#define wait3 innocuous_wait3 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wait3 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares isinf. - For example, HP-UX 11i declares gettimeofday. */ -#define isinf innocuous_isinf - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char isinf (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares isnan. - For example, HP-UX 11i declares gettimeofday. */ -#define isnan innocuous_isnan - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char isnan (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares mkfifo. - For example, HP-UX 11i declares gettimeofday. */ -#define mkfifo innocuous_mkfifo - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mkfifo (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 -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 -#endif -#if HAVE_INTTYPES_H -# include -#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 -#endif -#if HAVE_INTTYPES_H -# include -#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 -#endif -#if HAVE_INTTYPES_H -# include -#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 -#endif -#if HAVE_INTTYPES_H -# include -#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 -#endif -#if HAVE_INTTYPES_H -# include -#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 -#endif -#if HAVE_INTTYPES_H -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#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; } + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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 "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_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 -# 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 + 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" - ac_header_preproc=no -fi + 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 "$acl_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 + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + 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* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + 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" -# 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; } + 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/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do -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 + 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" -fi + 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 -done + 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 "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_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=\"$acl_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 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 + am_save_CPPFLAGS="$CPPFLAGS" -done + 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" -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 declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +printf %s "checking for iconv... " >&6; } +if test ${am_cv_func_iconv+y} +then : + printf %s "(cached) " >&6 +else $as_nop -#undef $ac_func + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 $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 +#include +#include int -main () +main (void) { -return $ac_func (); +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 - 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" +if ac_fn_c_try_link "$LINENO" +then : + am_cv_func_iconv=yes fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -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 +#include +#include +int +main (void) +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes fi -done +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi -{ $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 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +printf "%s\n" "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +printf %s "checking for working iconv... " >&6; } +if test ${am_cv_func_iconv_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes +then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 -#include +#include +#include -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const #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 -# 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 () +main (void) { - 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; +int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; - /* 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 +if ac_fn_c_try_run "$LINENO" +then : + am_cv_func_iconv_works=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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +printf "%s\n" "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF +printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h -fi -rm -f conftest.mmap + fi + if test "$am_cv_lib_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +printf %s "checking how to link with libiconv... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +printf "%s\n" "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + if test "$am_cv_func_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +printf %s "checking for iconv declaration... " >&6; } + if test ${am_cv_proto_iconv+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || 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 (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + am_cv_proto_iconv_arg1="" +else $as_nop + am_cv_proto_iconv_arg1="const" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam 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/( /(/'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: + $am_cv_proto_iconv" >&5 +printf "%s\n" " + $am_cv_proto_iconv" >&6; } + else + am_cv_proto_iconv_arg1="" + fi +printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h -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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; } int -main () +main (void) { -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 +if ac_fn_c_try_link "$LINENO" +then : - eval "$as_ac_var=no" -fi +printf "%s\n" "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h -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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default" +if test "x$ac_cv_header_argz_h" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_H 1" >>confdefs.h fi -done +ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h -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_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h +fi + ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes +then : + printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid" +if test "x$ac_cv_func_getegid" = xyes +then : + printf "%s\n" "#define HAVE_GETEGID 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid" +if test "x$ac_cv_func_geteuid" = xyes +then : + printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "getgid" "ac_cv_func_getgid" +if test "x$ac_cv_func_getgid" = xyes +then : + printf "%s\n" "#define HAVE_GETGID 1" >>confdefs.h -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 +fi +ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid" +if test "x$ac_cv_func_getuid" = xyes +then : + printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h - ac_header_compiler=no fi +ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" +if test "x$ac_cv_func_mempcpy" = xyes +then : + printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h -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; } +fi +ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" +if test "x$ac_cv_func_munmap" = xyes +then : + printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h -# 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 +fi +ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" +if test "x$ac_cv_func_stpcpy" = xyes +then : + printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h - ac_header_preproc=no fi +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +fi +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes +then : + printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h -# 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; } +ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h 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 +ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" +if test "x$ac_cv_func_tsearch" = xyes +then : + printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "argz_count" "ac_cv_func_argz_count" +if test "x$ac_cv_func_argz_count" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_COUNT 1" >>confdefs.h -done +fi +ac_fn_c_check_func "$LINENO" "argz_stringify" "ac_cv_func_argz_stringify" +if test "x$ac_cv_func_argz_stringify" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_STRINGIFY 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "argz_next" "ac_cv_func_argz_next" +if test "x$ac_cv_func_argz_next" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_NEXT 1" >>confdefs.h -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 +fi +ac_fn_c_check_func "$LINENO" "__fsetlocking" "ac_cv_func___fsetlocking" +if test "x$ac_cv_func___fsetlocking" = xyes +then : + printf "%s\n" "#define HAVE___FSETLOCKING 1" >>confdefs.h - 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_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" +if test "x$ac_cv_func_localeconv" = xyes +then : + printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h - 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" + ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_feof_unlocked" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 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; } - +printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fgets_unlocked" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 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 +printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h -fi -done -for ac_header in langinfo.h + for ac_prog in bison 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 + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_INTLBISON+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$INTLBISON"; then + ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_INTLBISON="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_header_compiler=no +fi +fi +INTLBISON=$ac_cv_prog_INTLBISON +if test -n "$INTLBISON"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5 +printf "%s\n" "$INTLBISON" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } 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 + test -n "$INTLBISON" && break +done + + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5 +printf %s "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;; + 2.[7-9]* | [3-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +printf "%s\n" "$ac_prog_version" >&6; } + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +printf %s "checking for long long int... " >&6; } +if test ${ac_cv_type_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes +then : + : +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <$ac_header> +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main (void) +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} _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 +if ac_fn_c_try_run "$LINENO" +then : - ac_header_preproc=no +else $as_nop + ac_cv_type_long_long_int=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" +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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; } + fi;; + esac 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then -fi +printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h -done + fi -{ $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. */ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +printf %s "checking for wchar_t... " >&6; } +if test ${gt_cv_c_wchar_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main (void) +{ + + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_c_wchar_t=yes +else $as_nop + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +printf "%s\n" "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 +printf %s "checking for wint_t... " >&6; } +if test ${gt_cv_c_wint_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define mbrlen to an innocuous variant, in case declares mbrlen. - For example, HP-UX 11i declares gettimeofday. */ -#define mbrlen innocuous_mbrlen -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mbrlen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0'; +int +main (void) +{ -#ifdef __STDC__ -# include -#else -# include + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_c_wint_t=yes +else $as_nop + gt_cv_c_wint_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 +printf "%s\n" "$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then + +printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 +printf %s "checking whether wint_t is too small... " >&6; } +if test ${gl_cv_type_wint_t_too_small+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include #endif +#include + int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; -#undef mbrlen +int +main (void) +{ -/* 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" + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_wint_t_too_small=no +else $as_nop + gl_cv_type_wint_t_too_small=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 +printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; } + if test $gl_cv_type_wint_t_too_small = yes; then + GNULIB_OVERRIDES_WINT_T=1 + else + GNULIB_OVERRIDES_WINT_T=0 + fi + else + GNULIB_OVERRIDES_WINT_T=0 + fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 +printf %s "checking for intmax_t... " >&6; } +if test ${gt_cv_c_intmax_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include #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 +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include #endif int -main () +main (void) { -return mbrlen (); +intmax_t x = -1; + return !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_func_mbrlen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_mbrlen=no +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_c_intmax_t=yes +else $as_nop + gt_cv_c_intmax_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 +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 +printf "%s\n" "$gt_cv_c_intmax_t" >&6; } + if test $gt_cv_c_intmax_t = yes; then -fi +printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h -{ $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 declares mbscasecmp. - For example, HP-UX 11i declares gettimeofday. */ -#define mbscasecmp innocuous_mbscasecmp + fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mbscasecmp (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef mbscasecmp + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5 +printf %s "checking whether printf() supports POSIX/XSI format strings... " >&6; } +if test ${gt_cv_func_printf_posix+y} +then : + printf %s "(cached) " >&6 +else $as_nop -/* 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 + if test "$cross_compiling" = yes +then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix #endif -int -main () +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "notposix" >/dev/null 2>&1 +then : + gt_cv_func_printf_posix="guessing no" +else $as_nop + gt_cv_func_printf_posix="guessing yes" +fi +rm -rf conftest* + + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () { -return mbscasecmp (); - ; - return 0; + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 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 +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_func_printf_posix=yes +else $as_nop + gt_cv_func_printf_posix=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5 +printf "%s\n" "$gt_cv_func_printf_posix" >&6; } + case $gt_cv_func_printf_posix in + *yes) -{ $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 declares mbscmp. - For example, HP-UX 11i declares gettimeofday. */ -#define mbscmp innocuous_mbscmp +printf "%s\n" "#define HAVE_POSIX_PRINTF 1" >>confdefs.h -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mbscmp (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + ;; + esac -#ifdef __STDC__ -# include -#else -# include -#endif -#undef mbscmp + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +if test ${ac_cv_gnu_library_2_1+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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" +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif #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 +#ifdef __UCLIBC__ + Lucky user #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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky" >/dev/null 2>&1 +then : + ac_cv_gnu_library_2_1=yes +else $as_nop + ac_cv_gnu_library_2_1=no fi +rm -rf conftest* + -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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 +printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; } -{ $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 declares mbsrtowcs. - For example, HP-UX 11i declares gettimeofday. */ -#define mbsrtowcs innocuous_mbsrtowcs + GLIBC21="$ac_cv_gnu_library_2_1" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mbsrtowcs (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef mbsrtowcs + ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>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" +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 +printf %s "checking for SIZE_MAX... " >&6; } +if test ${gl_cv_size_max+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + gl_cv_size_max= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_STDINT_H +#include #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 +#ifdef SIZE_MAX +Found it #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Found it" >/dev/null 2>&1 +then : + gl_cv_size_max=yes +fi +rm -rf conftest* + + if test -z "$gl_cv_size_max"; then + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include +#include " +then : + +else $as_nop + size_t_bits_minus_1= +fi + + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include " +then : + +else $as_nop + fits_in_uint= +fi + + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern size_t foo; + extern unsigned long foo; + int -main () +main (void) { -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 +if ac_fn_c_try_compile "$LINENO" +then : + fits_in_uint=0 fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + gl_cv_size_max='((size_t)~(size_t)0)' + fi + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 +printf "%s\n" "$gl_cv_size_max" >&6; } + if test "$gl_cv_size_max" != yes; then + +printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h + + fi + + + + + ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 +printf %s "checking for working fcntl.h... " >&6; } +if test ${gl_cv_header_working_fcntl_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac - eval "$as_ac_var=no" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + +int +main (void) +{ + + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_header_working_fcntl_h=yes +else $as_nop + case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 -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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 +printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; } + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h + + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h + + + + + + -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 declares wcrtomb. - For example, HP-UX 11i declares gettimeofday. */ -#define wcrtomb innocuous_wcrtomb -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wcrtomb (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef wcrtomb + if test $ac_cv_func_uselocale = yes; then -/* 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5 +printf %s "checking whether uselocale works... " >&6; } +if test ${gt_cv_func_uselocale_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + # Guess no on AIX, yes otherwise. + case "$host_os" in + aix*) gt_cv_func_uselocale_works="guessing no" ;; + *) gt_cv_func_uselocale_works="guessing yes" ;; + esac -int -main () +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () { -return wcrtomb (); - ; + uselocale (NULL); + setlocale (LC_ALL, "en_US.UTF-8"); 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 +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_func_uselocale_works=yes +else $as_nop + gt_cv_func_uselocale_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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5 +printf "%s\n" "$gt_cv_func_uselocale_works" >&6; } + else + gt_cv_func_uselocale_works=no + fi + case "$gt_cv_func_uselocale_works" in + *yes) -{ $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 declares wcscoll. - For example, HP-UX 11i declares gettimeofday. */ -#define wcscoll innocuous_wcscoll +printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wcscoll (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + ;; + esac -#ifdef __STDC__ -# include -#else -# include -#endif -#undef wcscoll + case "$gt_cv_func_uselocale_works" in + *yes) + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5 +printf %s "checking for fake locale system (OpenBSD)... " >&6; } +if test ${gt_cv_locale_fake+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in + openbsd*) gt_cv_locale_fake="guessing yes" ;; + *) gt_cv_locale_fake="guessing no" ;; + esac -/* 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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -int -main () +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () { -return wcscoll (); - ; - return 0; + locale_t loc1, loc2; + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; + if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; + loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); + loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); + return !(loc1 == loc2); } _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 +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_locale_fake=yes +else $as_nop + gt_cv_locale_fake=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 declares wcsdup. - For example, HP-UX 11i declares gettimeofday. */ -#define wcsdup innocuous_wcsdup +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5 +printf "%s\n" "$gt_cv_locale_fake" >&6; } + ;; + *) gt_cv_locale_fake=no ;; + esac + case "$gt_cv_locale_fake" in + *yes) -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wcsdup (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h -#ifdef __STDC__ -# include -#else -# include -#endif + ;; + esac -#undef wcsdup + case "$gt_cv_func_uselocale_works" in + *yes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5 +printf %s "checking for Solaris 11.4 locale system... " >&6; } +if test ${gt_cv_locale_solaris114+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case "$host_os" in + solaris*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 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 + #include + struct _LC_locale_t *x; + locale_t y; int -main () +main (void) { -return wcsdup (); +*y = 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_func_wcsdup=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_wcsdup=no +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_locale_solaris114=yes +else $as_nop + gt_cv_locale_solaris114=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + *) gt_cv_locale_solaris114=no ;; + esac -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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5 +printf "%s\n" "$gt_cv_locale_solaris114" >&6; } + ;; + *) gt_cv_locale_solaris114=no ;; + esac + if test $gt_cv_locale_solaris114 = yes; then + +printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h + + fi + + case "$gt_cv_func_uselocale_works" in + *yes) + ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l" +if test "x$ac_cv_func_getlocalename_l" = xyes +then : + printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h 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 declares wcwidth. - For example, HP-UX 11i declares gettimeofday. */ -#define wcwidth innocuous_wcwidth + ;; + esac -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wcwidth (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + gt_nameless_locales=no + if false; then + gt_nameless_locales=yes -#ifdef __STDC__ -# include -#else -# include -#endif +printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h -#undef wcwidth + fi -/* 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +printf %s "checking for CFPreferencesCopyAppValue... " >&6; } +if test ${gt_cv_func_CFPreferencesCopyAppValue+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int -main () +main (void) { -return wcwidth (); +CFPreferencesCopyAppValue(NULL, NULL) ; 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 +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else $as_nop + gt_cv_func_CFPreferencesCopyAppValue=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -fi +printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h -{ $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 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +printf %s "checking for CFLocaleCopyCurrent... " >&6; } +if test ${gt_cv_func_CFLocaleCopyCurrent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define wctype to an innocuous variant, in case declares wctype. - For example, HP-UX 11i declares gettimeofday. */ -#define wctype innocuous_wctype - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wctype (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 - +#include int -main () +main (void) { -return wctype (); +CFLocaleCopyCurrent(); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyCurrent=yes +else $as_nop + gt_cv_func_CFLocaleCopyCurrent=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 - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then +printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h - - { $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 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int -main () +main (void) { -wchar_t wc; - char const s[] = ""; - size_t n = 1; - mbstate_t state; - return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); +CFLocaleCopyPreferredLanguages(); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else $as_nop + gt_cv_func_CFLocaleCopyPreferredLanguages=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MBRTOWC 1 -_ACEOF +printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + -if test $ac_cv_func_mbrtowc = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_MBSTATE_T 1 -_ACEOF + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5 +printf %s "checking for flexible array members... " >&6; } +if test ${ac_cv_c_flexmember+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + struct s { int n; double d[]; }; +int +main (void) +{ +int m = getchar (); + struct s *p = (struct s *) malloc (offsetof (struct s, d) + + m * sizeof (double)); + p->d[0] = 0.0; + return p->d != (double *) NULL; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_flexmember=yes +else $as_nop + ac_cv_c_flexmember=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 +printf "%s\n" "$ac_cv_c_flexmember" >&6; } + if test $ac_cv_c_flexmember = yes; then +printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h + else + printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h + 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#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" + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - 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 +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS - -{ $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 +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&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 -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;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="ar" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; 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 + AR=$ac_ct_AR + fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - bash_cv_langinfo_codeset=no + AR="$ac_cv_prog_AR" 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 -z "$ARFLAGS"; then + ARFLAGS='cr' + fi + + + + + case "$enable_silent_rules" in + yes) INTL_DEFAULT_VERBOSITY=0;; + no) INTL_DEFAULT_VERBOSITY=1;; + *) INTL_DEFAULT_VERBOSITY=1;; + esac + + + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t long" >>confdefs.h + + 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 + + ac_fn_c_check_header_compile "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default" +if test "x$ac_cv_header_features_h" = xyes +then : + printf "%s\n" "#define HAVE_FEATURES_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes +then : + printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h -{ $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 +fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h -int -main () -{ +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h - wchar_t foo; - foo = 0; +fi - ; - 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 + ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" +if test "x$ac_cv_func_asprintf" = xyes +then : + printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h - bash_cv_type_wchar_t=no fi +ac_fn_c_check_func "$LINENO" "fwprintf" "ac_cv_func_fwprintf" +if test "x$ac_cv_func_fwprintf" = xyes +then : + printf "%s\n" "#define HAVE_FWPRINTF 1" >>confdefs.h -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 +ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale" +if test "x$ac_cv_func_newlocale" = xyes +then : + printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_WCHAR_T 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" +if test "x$ac_cv_func_putenv" = xyes +then : + printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes +then : + printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h -{ $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 -int -main () -{ +fi +ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h - wctype_t foo; - foo = 0; +fi +ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes +then : + printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" +if test "x$ac_cv_func_strnlen" = xyes +then : + printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h - bash_cv_type_wctype_t=no fi +ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" +if test "x$ac_cv_func_uselocale" = xyes +then : + printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h -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 +ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen" +if test "x$ac_cv_func_wcslen" = xyes +then : + printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_WCTYPE_T 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen" +if test "x$ac_cv_func_wcsnlen" = xyes +then : + printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc" +if test "x$ac_cv_func_mbrtowc" = xyes +then : + printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h -{ $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 -int -main () -{ +fi +ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" +if test "x$ac_cv_func_wcrtomb" = xyes +then : + printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h - wint_t foo; - foo = 0; +fi - ; - 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 + ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__snprintf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__snwprintf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 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 +printf "%s\n" "#define HAVE_DECL__SNWPRINTF $ac_have_decl" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_WINT_T 1 -_ACEOF + ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getc_unlocked" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h -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 declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi -#ifdef __STDC__ -# include -#else -# include -#endif + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi -#undef $ac_func + if test "$ac_cv_func_newlocale" = yes; then + HAVE_NEWLOCALE=1 + else + HAVE_NEWLOCALE=0 + fi -/* 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 + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi -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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 +printf %s "checking for nl_langinfo and CODESET... " >&6; } +if test ${am_cv_langinfo_codeset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +char* cs = nl_langinfo(CODESET); return !cs; + ; + return 0; +} _ACEOF - +if ac_fn_c_try_link "$LINENO" +then : + am_cv_langinfo_codeset=yes +else $as_nop + am_cv_langinfo_codeset=no fi -done +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - LIBS="$OLDLIBS" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 +printf "%s\n" "$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then +printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +printf %s "checking for LC_MESSAGES... " >&6; } +if test ${gt_cv_val_LC_MESSAGES+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 (); +#include int -main () +main (void) { -return dlopen (); +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 - 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 +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_val_LC_MESSAGES=yes +else $as_nop + gt_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 -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" - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 +printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; } + if test $gt_cv_val_LC_MESSAGES = yes; then +printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h + 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ + if test $gt_nameless_locales = yes; then + HAVE_NAMELESS_LOCALES=1 + else + HAVE_NAMELESS_LOCALES=0 + fi -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func + if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac + else + is_woe32dll=no + fi + WOE32DLL=$is_woe32dll -/* 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" + case "$host_os" in + mingw* | cygwin*) is_woe32=yes ;; + *) is_woe32=no ;; + esac + WOE32=$is_woe32 + + if test $WOE32 = yes; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_WINDRES+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - 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 +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +printf "%s\n" "$WINDRES" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_WINDRES+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_WINDRES="windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +printf "%s\n" "$ac_ct_WINDRES" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } 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 + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -/* NetBSD declares sys_siglist in unistd.h. */ -#ifdef HAVE_UNISTD_H -# include -#endif + WINDRES="$ac_cv_prog_WINDRES" +fi + fi -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 -#include -#include -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 (); + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +printf %s "checking for CFPreferencesCopyAppValue... " >&6; } +if test ${gt_cv_func_CFPreferencesCopyAppValue+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int -main () +main (void) { -return getpwent (); +CFPreferencesCopyAppValue(NULL, NULL) ; 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 +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else $as_nop + gt_cv_func_CFPreferencesCopyAppValue=no 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" - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi - ;; -esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -if test "$ac_cv_func_getpeername" = no; then +printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h -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 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +printf %s "checking for CFLocaleCopyCurrent... " >&6; } +if test ${gt_cv_func_CFLocaleCopyCurrent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 (); +#include int -main () +main (void) { -return getpeername (); +CFLocaleCopyCurrent(); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyCurrent=yes +else $as_nop + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then -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 +printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else $as_nop + gt_cv_func_CFLocaleCopyPreferredLanguages=no 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then -fi +printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h -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 + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5 +printf %s "checking whether included gettext is requested... " >&6; } + +# Check whether --with-included-gettext was given. +if test ${with_included_gettext+y} +then : + withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval +else $as_nop + nls_cv_force_use_gnu_gettext=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5 +printf "%s\n" "$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 + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +printf %s "checking for GNU gettext in libc... " >&6; } +if eval test \${$gt_func_gnugettext_libc+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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" +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif -char t_open (); +$gt_revision_test_code + int -main () +main (void) { -return t_open (); + +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ; 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 +if ac_fn_c_try_link "$LINENO" +then : + eval "$gt_func_gnugettext_libc=yes" +else $as_nop + eval "$gt_func_gnugettext_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 -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext 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 +eval ac_res=\$$gt_func_gnugettext_libc + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "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+y} +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/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + fi -fi + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + HAVE_LIBINTL= + 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= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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 "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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 "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_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$_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 + 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 "$acl_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 + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + 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* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do - cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPEERNAME 1 -_ACEOF + 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" -fi + 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/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do -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 -int -main () -{ - struct hostent *hp; - hp = gethostbyname("localhost"); + 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" - ; - 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 + 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 - bash_cv_have_gethostbyname=no -fi + 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" -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + 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 "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_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=\"$acl_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 -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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +printf %s "checking for GNU gettext in libintl... " >&6; } +if eval test \${$gt_func_gnugettext_libintl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -_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 +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF +int +main (void) +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION -cat >>confdefs.h <<\_ACEOF -#define gid_t int + ; + return 0; +} _ACEOF - +if ac_fn_c_try_link "$LINENO" +then : + eval "$gt_func_gnugettext_libintl=yes" +else $as_nop + eval "$gt_func_gnugettext_libintl=no" 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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)) + +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code int -main () +main (void) { - 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 +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION -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 - + ; + return 0; +} _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* +if ac_fn_c_try_link "$LINENO" +then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -$as_echo "$ac_cv_type_getgroups" >&6; } +eval ac_res=\$$gt_func_gnugettext_libintl + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + fi -cat >>confdefs.h <<_ACEOF -#define GETGROUPS_T $ac_cv_type_getgroups -_ACEOF + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi -{ $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 + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + nls_cv_use_gnu_gettext=yes + fi + fi - ac_cv_type_off_t=yes -fi + if test "$nls_cv_use_gnu_gettext" = "yes"; then + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="lib/intl/libintl.a $LIBICONV $LIBTHREAD" + LTLIBINTL="lib/intl/libintl.a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + 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 + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + CATOBJEXT=.gmo + fi -fi + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + 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 + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF +printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h -fi + else + USE_NLS=no + fi + 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +printf %s "checking whether to use NLS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +printf %s "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +printf "%s\n" "$gt_source" >&6; } + fi - ac_cv_type_mode_t=yes -fi + if test "$USE_NLS" = "yes"; then -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 + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +printf %s "checking how to link with libintl... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +printf "%s\n" "$LIBINTL" >&6; } + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do -fi + 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" -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 + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done -cat >>confdefs.h <<_ACEOF -#define mode_t int -_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 +printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.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 +printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF + fi + POSUB=po + fi -cat >>confdefs.h <<\_ACEOF -#define gid_t int -_ACEOF -fi + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + 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 + nls_cv_header_intl= + nls_cv_header_libgt= -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 + DATADIRNAME=share -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF -fi + INSTOBJEXT=.mo -{ $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 + GENCAT=gencat -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 + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi -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 + INTL_LIBTOOL_SUFFIX_PREFIX= -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 + INTLLIBS="$LIBINTL" + + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +printf %s "checking for $ac_hdr that defines DIR... " >&6; } +if eval test \${$as_ac_Header+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include +#include <$ac_hdr> + int -main () +main (void) { -if (sizeof ((ssize_t))) - return 0; +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 - : -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 - - +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_ac_Header=yes" +else $as_nop + eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +eval ac_res=\$$as_ac_Header + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF +ac_header_dirent=$ac_hdr; break 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 +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* 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. */ +char opendir (); int -main () +main (void) { -if (sizeof (time_t)) - return 0; +return opendir (); ; 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 +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 + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : + +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* 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. */ +char opendir (); int -main () +main (void) { -if (sizeof ((time_t))) - return 0; +return opendir (); ; 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 +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 + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : -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 - +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$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 -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 + +ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mkdev_h" = xyes +then : + +printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h fi +if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = xyes +then : +printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h -{ $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. */ +fi -long long ll = 1; int i = 63; -int -main () -{ +fi -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 + ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h -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 + + + +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" +if test "x$ac_cv_header_stdarg_h" = xyes +then : + printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h -{ $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. */ +fi +ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" +if test "x$ac_cv_header_varargs_h" = xyes +then : + printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h -unsigned long long ull = 1; int i = 63; -int -main () -{ +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h -unsigned long long ullmax = (unsigned long long) -1; -return ull << i | ull >> i | ullmax / ull | ullmax % ull; +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default" +if test "x$ac_cv_header_memory_h" = xyes +then : + printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h - bash_cv_type_unsigned_long_long='unsigned long' fi +ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = xyes +then : + printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h -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 +ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default" +if test "x$ac_cv_header_termcap_h" = xyes +then : + printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default" +if test "x$ac_cv_header_termio_h" = xyes +then : + printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" +if test "x$ac_cv_header_termios_h" = xyes +then : + printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h -{ $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 -#include +fi +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.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 +fi +ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" +if test "x$ac_cv_header_stdbool_h" = xyes +then : + printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h - ac_cv_type_signal=void fi +ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes +then : + printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h -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; } +ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF +fi +ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h -{ $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. */ +fi +ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" +if test "x$ac_cv_header_grp_h" = xyes +then : + printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h -#include +fi +ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" +if test "x$ac_cv_header_strings_h" = xyes +then : + printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.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 +fi +ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default" +if test "x$ac_cv_header_regex_h" = xyes +then : + printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h - ac_cv_have_sig_atomic_t=no fi +ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" +if test "x$ac_cv_header_syslog_h" = xyes +then : + printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h -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_fn_c_check_header_compile "$LINENO" "ulimit.h" "ac_cv_header_ulimit_h" "$ac_includes_default" +if test "x$ac_cv_header_ulimit_h" = xyes +then : + printf "%s\n" "#define HAVE_ULIMIT_H 1" >>confdefs.h - 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 +ac_fn_c_check_header_compile "$LINENO" "sys/pte.h" "ac_cv_header_sys_pte_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_pte_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PTE_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stream_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_select_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h -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 +ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_file_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define sig_atomic_t int -_ACEOF +fi +ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mman_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_random_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h -# 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 +fi +ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_times_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h - 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 +ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h -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 +fi +ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_wait_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - 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 +fi - ; - 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 +ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes +then : + printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h - 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= +ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" " +#if HAVE_SYS_STREAM_H +# include +#endif + +" +if test "x$ac_cv_header_sys_ptem_h" = xyes +then : + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" " +#if HAVE_SYS_TIME_H +# include +#endif + +" +if test "x$ac_cv_header_sys_resource_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h + 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 + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int -main () +main (void) { -static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; -test_array [0] = 0 - +char *p = (char *) alloca (2 * sizeof (int)); + if (p) 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_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_working_alloca_h=yes +else $as_nop + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h - 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 #include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +# endif +#endif + int -main () +main (void) { - - 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; - +char *p = (char *) alloca (1); + if (p) return 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_alloca_works=yes +else $as_nop + ac_cv_func_alloca_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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f conftest.val +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } 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 +if test $ac_cv_func_alloca_works = yes; then +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h -# 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 + # 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. - ; - 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 +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - 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 +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h -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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_c_stack_direction=0 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +find_stack_direction (int *addr, int depth) { -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; -test_array [0] = 0 - - ; - return 0; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + 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 - 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 () +main (int argc, char **argv) { -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; + return find_stack_direction (0, argc + !argv + 20) < 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` +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_c_stack_direction=1 +else $as_nop + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h + -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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 +#include - ; - 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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1 +then : + ac_cv_type_uid_t=yes +else $as_nop + ac_cv_type_uid_t=no +fi +rm -rf conftest* - ac_lo=`expr '(' $ac_mid ')' + 1` fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then -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 +printf "%s\n" "#define uid_t int" >>confdefs.h + + +printf "%s\n" "#define gid_t int" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 +printf %s "checking for working chown... " >&6; } +if test ${ac_cv_func_chown_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_chown_works=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_chown_works=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 -#include +#include + int -main () +main (void) { + char *f = "conftest.chown"; + struct stat before, after; - FILE *f = fopen ("conftest.val", "w"); - if (! f) + if (creat (f, 0600) < 0) 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; + if (stat (f, &before) < 0) + return 1; + if (chown (f, (uid_t) -1, (gid_t) -1) == -1) + return 1; + if (stat (f, &after) < 0) + return 1; + return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); ; 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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_chown_works=yes +else $as_nop + ac_cv_func_chown_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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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; } +rm -f conftest.chown +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 +printf "%s\n" "$ac_cv_func_chown_works" >&6; } +if test $ac_cv_func_chown_works = yes; then -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF +printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h +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 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 +printf %s "checking whether getpgrp requires zero arguments... " >&6; } +if test ${ac_cv_func_getpgrp_void+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Use it with a single arg. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; -test_array [0] = 0 - +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_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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_func_getpgrp_void=no +else $as_nop + ac_cv_func_getpgrp_void=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 +printf "%s\n" "$ac_cv_func_getpgrp_void" >&6; } +if test $ac_cv_func_getpgrp_void = yes; then + +printf "%s\n" "#define GETPGRP_VOID 1" >>confdefs.h + +fi + + + +if test "x$ac_cv_func_vprintf" = xno +then : + ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" +if test "x$ac_cv_func__doprnt" = xyes +then : + +printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h + +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5 +printf %s "checking for working strcoll... " >&6; } +if test ${ac_cv_func_strcoll_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_strcoll_works=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_strcoll_works=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - +return (strcoll ("abc", "def") >= 0 || + strcoll ("ABC", "DEF") >= 0 || + strcoll ("123", "456") >= 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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_strcoll_works=yes +else $as_nop + ac_cv_func_strcoll_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5 +printf "%s\n" "$ac_cv_func_strcoll_works" >&6; } +if test $ac_cv_func_strcoll_works = yes; then -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 +printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5 +printf %s "checking for declaration of vprintf in stdio.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; -test_array [0] = 0 +#include - ; - 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;; +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 -rf conftest* + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5 +printf "%s\n" "$ac_cv_func_vprintf" >&6; } + if test $ac_cv_func_vprintf = yes; then + printf "%s\n" "#define HAVE_VPRINTF 1" >>confdefs.h + + 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 -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 +fi + +ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype" +if test "x$ac_cv_func___setostype" = xyes +then : + printf "%s\n" "#define HAVE_SETOSTYPE 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" +if test "x$ac_cv_func_wait3" = xyes +then : + printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" +if test "x$ac_cv_func_mkfifo" = xyes +then : + printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h + +else $as_nop + printf "%s\n" "#define MKFIFO_MISSING 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" +if test "x$ac_cv_func_dup2" = xyes +then : + printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess" +if test "x$ac_cv_func_eaccess" = xyes +then : + printf "%s\n" "#define HAVE_EACCESS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" +if test "x$ac_cv_func_fcntl" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" +if test "x$ac_cv_func_getdtablesize" = xyes +then : + printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" +if test "x$ac_cv_func_getentropy" = xyes +then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" +if test "x$ac_cv_func_getgroups" = xyes +then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" +if test "x$ac_cv_func_gethostname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes +then : + printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername" +if test "x$ac_cv_func_getpeername" = xyes +then : + printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom" +if test "x$ac_cv_func_getrandom" = xyes +then : + printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit" +if test "x$ac_cv_func_getrlimit" = xyes +then : + printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" +if test "x$ac_cv_func_getrusage" = xyes +then : + printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes +then : + printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill" +if test "x$ac_cv_func_kill" = xyes +then : + printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg" +if test "x$ac_cv_func_killpg" = xyes +then : + printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat" +if test "x$ac_cv_func_lstat" = xyes +then : + printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "pselect" "ac_cv_func_pselect" +if test "x$ac_cv_func_pselect" = xyes +then : + printf "%s\n" "#define HAVE_PSELECT 1" >>confdefs.h - 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 +ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink" +if test "x$ac_cv_func_readlink" = xyes +then : + printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h -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 +fi +ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" +if test "x$ac_cv_func_select" = xyes +then : + printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h - ac_lo= ac_hi= fi +ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" +if test "x$ac_cv_func_setdtablesize" = xyes +then : + printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" +if test "x$ac_cv_func_setitimer" = xyes +then : + printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h -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 +fi +ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp" +if test "x$ac_cv_func_tcgetpgrp" = xyes +then : + printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = xyes +then : + printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h - ac_lo=`expr '(' $ac_mid ')' + 1` fi +ac_fn_c_check_func "$LINENO" "ulimit" "ac_cv_func_ulimit" +if test "x$ac_cv_func_ulimit" = xyes +then : + printf "%s\n" "#define HAVE_ULIMIT 1" >>confdefs.h -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 -#include -int -main () -{ +fi +ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" +if test "x$ac_cv_func_waitpid" = xyes +then : + printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h - 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; +fi - ; - 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;; +ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename" +if test "x$ac_cv_func_rename" = xyes +then : + printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" rename.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS rename.$ac_objext" + ;; 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 + + +ac_fn_c_check_func "$LINENO" "bcopy" "ac_cv_func_bcopy" +if test "x$ac_cv_func_bcopy" = xyes +then : + printf "%s\n" "#define HAVE_BCOPY 1" >>confdefs.h + fi -rm -f conftest.val +ac_fn_c_check_func "$LINENO" "bzero" "ac_cv_func_bzero" +if test "x$ac_cv_func_bzero" = xyes +then : + printf "%s\n" "#define HAVE_BZERO 1" >>confdefs.h + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr" +if test "x$ac_cv_func_confstr" = xyes +then : + printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat" +if test "x$ac_cv_func_faccessat" = xyes +then : + printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch" +if test "x$ac_cv_func_fnmatch" = xyes +then : + printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h -# 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 +fi +ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname" +if test "x$ac_cv_func_getservbyname" = xyes +then : + printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent" +if test "x$ac_cv_func_getservent" = xyes +then : + printf "%s\n" "#define HAVE_GETSERVENT 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" +if test "x$ac_cv_func_inet_aton" = xyes +then : + printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h - 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 +ac_fn_c_check_func "$LINENO" "imaxdiv" "ac_cv_func_imaxdiv" +if test "x$ac_cv_func_imaxdiv" = xyes +then : + printf "%s\n" "#define HAVE_IMAXDIV 1" >>confdefs.h -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 +fi +ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" +if test "x$ac_cv_func_memmove" = xyes +then : + printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h - 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 +fi +ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf" +if test "x$ac_cv_func_pathconf" = xyes +then : + printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" +if test "x$ac_cv_func_putenv" = xyes +then : + printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise" +if test "x$ac_cv_func_raise" = xyes +then : + printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h - 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 +ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random" +if test "x$ac_cv_func_random" = xyes +then : + printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h -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 +fi +ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp" +if test "x$ac_cv_func_regcomp" = xyes +then : + printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h - ac_lo= ac_hi= fi +ac_fn_c_check_func "$LINENO" "regexec" "ac_cv_func_regexec" +if test "x$ac_cv_func_regexec" = xyes +then : + printf "%s\n" "#define HAVE_REGEXEC 1" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes +then : + printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h -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 +fi +ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf" +if test "x$ac_cv_func_setlinebuf" = xyes +then : + printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" +if test "x$ac_cv_func_setvbuf" = xyes +then : + printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt" +if test "x$ac_cv_func_siginterrupt" = xyes +then : + printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" +if test "x$ac_cv_func_strchr" = xyes +then : + printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" +if test "x$ac_cv_func_sysconf" = xyes +then : + printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog" +if test "x$ac_cv_func_syslog" = xyes +then : + printf "%s\n" "#define HAVE_SYSLOG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr" +if test "x$ac_cv_func_tcgetattr" = xyes +then : + printf "%s\n" "#define HAVE_TCGETATTR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" +if test "x$ac_cv_func_times" = xyes +then : + printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname" +if test "x$ac_cv_func_ttyname" = xyes +then : + printf "%s\n" "#define HAVE_TTYNAME 1" >>confdefs.h - ac_lo=`expr '(' $ac_mid ')' + 1` fi +ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" +if test "x$ac_cv_func_tzset" = xyes +then : + printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h -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 -#include -int -main () -{ +fi +ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" +if test "x$ac_cv_func_unsetenv" = xyes +then : + printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h - 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; +fi - ; - 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 +ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" +if test "x$ac_cv_func_vasprintf" = xyes +then : + printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h + fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" +if test "x$ac_cv_func_asprintf" = xyes +then : + printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h + fi -rm -f conftest.val + +ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii" +if test "x$ac_cv_func_isascii" = xyes +then : + printf "%s\n" "#define HAVE_ISASCII 1" >>confdefs.h + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank" +if test "x$ac_cv_func_isblank" = xyes +then : + printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "isgraph" "ac_cv_func_isgraph" +if test "x$ac_cv_func_isgraph" = xyes +then : + printf "%s\n" "#define HAVE_ISGRAPH 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "isprint" "ac_cv_func_isprint" +if test "x$ac_cv_func_isprint" = xyes +then : + printf "%s\n" "#define HAVE_ISPRINT 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "isspace" "ac_cv_func_isspace" +if test "x$ac_cv_func_isspace" = xyes +then : + printf "%s\n" "#define HAVE_ISSPACE 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "isxdigit" "ac_cv_func_isxdigit" +if test "x$ac_cv_func_isxdigit" = xyes +then : + printf "%s\n" "#define HAVE_ISXDIGIT 1" >>confdefs.h -# 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 +fi - ; - 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 +ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent" +if test "x$ac_cv_func_getpwent" = xyes +then : + printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" +if test "x$ac_cv_func_getpwnam" = xyes +then : + printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h - 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 +ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid" +if test "x$ac_cv_func_getpwuid" = xyes +then : + printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h -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 +fi - 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 +ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h - ; - 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 +fi +ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" +if test "x$ac_cv_func_mkdtemp" = xyes +then : + printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h - ; - 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 +fi + +ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" +if test "x$ac_cv_func_arc4random" = xyes +then : + printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h - 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= +ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes +then : + printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" getcwd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" + ;; +esac + fi +ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes +then : + printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" memset.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memset.$ac_objext" + ;; +esac -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 +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h - ; - 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;; +else $as_nop + case " $LIBOBJS " in + *" strcasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" + ;; 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 +ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes +then : + printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h -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 ;; +else $as_nop + case " $LIBOBJS " in + *" strcasestr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" + ;; 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 -#include -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; +fi +ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes +then : + printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h - ; - 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;; +else $as_nop + case " $LIBOBJS " in + *" strerror.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strerror.$ac_objext" + ;; 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 +ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" +if test "x$ac_cv_func_strftime" = xyes +then : + printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strftime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strftime.$ac_objext" + ;; +esac + fi -rm -f conftest.val +ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" +if test "x$ac_cv_func_strnlen" = xyes +then : + printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strnlen.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" + ;; +esac + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5 -$as_echo "$ac_cv_sizeof_char_p" >&6; } +ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk" +if test "x$ac_cv_func_strpbrk" = xyes +then : + printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h +else $as_nop + case " $LIBOBJS " in + *" strpbrk.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext" + ;; +esac +fi +ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = xyes +then : + printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p -_ACEOF +else $as_nop + case " $LIBOBJS " in + *" strstr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; +esac +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 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 +ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" +if test "x$ac_cv_func_strtod" = xyes +then : + printf "%s\n" "#define HAVE_STRTOD 1" >>confdefs.h - ; - 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;; +else $as_nop + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; 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;; +fi +ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes +then : + printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtol.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtol.$ac_objext" + ;; 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 +ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h -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 +else $as_nop + case " $LIBOBJS " in + *" strtoul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; +esac - 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 +fi +ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" +if test "x$ac_cv_func_strtoll" = xyes +then : + printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h - ; - 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;; +else $as_nop + case " $LIBOBJS " in + *" strtoll.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoll.$ac_objext" + ;; 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;; +fi +ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes +then : + printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtoull.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" + ;; 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 +ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" +if test "x$ac_cv_func_strtoumax" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUMAX 1" >>confdefs.h -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 +else $as_nop + case " $LIBOBJS " in + *" strtoumax.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext" + ;; +esac - ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf" +if test "x$ac_cv_func_dprintf" = xyes +then : + printf "%s\n" "#define HAVE_DPRINTF 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" dprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS dprintf.$ac_objext" + ;; +esac + 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 +ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" +if test "x$ac_cv_func_strchrnul" = xyes +then : + printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h - ; - 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;; +else $as_nop + case " $LIBOBJS " in + *" strchrnul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext" + ;; 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 ;; +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes +then : + printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strdup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strdup.$ac_objext" + ;; 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 -#include -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; +fi - ; - 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 +ac_fn_c_check_header_compile "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" +if test "x$ac_cv_header_libaudit_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBAUDIT_H 1" >>confdefs.h + fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + +ac_fn_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi -rm -f conftest.val +printf "%s\n" "#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl" >>confdefs.h + + +ac_fn_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_confstr" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&6; } +printf "%s\n" "#define HAVE_DECL_CONFSTR $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_printf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_PRINTF $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_sbrk" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_SBRK $ac_have_decl" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define SIZEOF_DOUBLE $ac_cv_sizeof_double -_ACEOF +ac_fn_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_setregid" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_SETREGID $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strcpy" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRCPY $ac_have_decl" >>confdefs.h -# 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 +ac_fn_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strsignal" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRSIGNAL $ac_have_decl" >>confdefs.h - ; - 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 + +ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" +if test "x$ac_cv_func_setresuid" = xyes +then : + printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid" +if test "x$ac_cv_func_setresgid" = xyes +then : + printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h + +fi + + +ac_fn_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtold" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOLD $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5 +printf %s "checking for broken strtold... " >&6; } + if test ${bash_cv_strtold_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int -main () +main (void) { -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 +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 - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_strtold_broken=no +else $as_nop + bash_cv_strtold_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + - 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5 +printf "%s\n" "$bash_cv_strtold_broken" >&6; } + if test "$bash_cv_strtold_broken" = "yes" ; then + printf "%s\n" "#define STRTOLD_BROKEN 1" >>confdefs.h - 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 + fi - ; - 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 +fi - ; - 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` +ac_fn_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtol" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_STRTOL $ac_have_decl" >>confdefs.h -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_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoll" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h - ac_lo= ac_hi= +ac_fn_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoul" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_STRTOUL $ac_have_decl" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoull" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h -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 +ac_fn_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoumax" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 +printf %s "checking for working mktime... " >&6; } +if test ${ac_cv_func_working_mktime+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_func_working_mktime=no +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () +/* Test program from Paul Eggert and Tony Leneis. */ +#include +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#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 const char *tz_strings[] = { + (const 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 () { -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; - ; - return 0; + /* 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 ((char*) "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; } -_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 +static int +mktime_test1 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (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 (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 ((char*) "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)); +} -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 -#include int -main () +main (void) { + 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; - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long long))) < 0) + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) { - long int i = longval (); - if (i != ((long int) (sizeof (long long)))) + if (tz_strings[i]) + putenv ((char*) 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; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long long)))) + + 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; - 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; + 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_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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_working_mktime=yes +else $as_nop + ac_cv_func_working_mktime=no fi -rm -f conftest.val +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 +printf "%s\n" "$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 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF +fi -{ $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_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default" +if test "x$ac_cv_header_argz_h" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_H 1" >>confdefs.h - ac_cv_type_u_int=yes fi +ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h -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 +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stdio_ext.h" "ac_cv_header_stdio_ext_h" "$ac_includes_default" +if test "x$ac_cv_header_stdio_ext_h" = xyes +then : + printf "%s\n" "#define HAVE_STDIO_EXT_H 1" >>confdefs.h -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 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +printf %s "checking for working mmap... " >&6; } +if test ${ac_cv_func_mmap_fixed_mapped+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + linux*) ac_cv_func_mmap_fixed_mapped=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_mmap_fixed_mapped=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# 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 () +main (void) { -if (sizeof ((u_long))) - return 0; - ; + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + 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 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* 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 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* 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 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + free (data); + free (data3); 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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_mmap_fixed_mapped=yes +else $as_nop + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + +ac_fn_c_check_func "$LINENO" "__argz_count" "ac_cv_func___argz_count" +if test "x$ac_cv_func___argz_count" = xyes +then : + printf "%s\n" "#define HAVE___ARGZ_COUNT 1" >>confdefs.h - ac_cv_type_u_long=yes fi +ac_fn_c_check_func "$LINENO" "__argz_next" "ac_cv_func___argz_next" +if test "x$ac_cv_func___argz_next" = xyes +then : + printf "%s\n" "#define HAVE___ARGZ_NEXT 1" >>confdefs.h -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 +ac_fn_c_check_func "$LINENO" "__argz_stringify" "ac_cv_func___argz_stringify" +if test "x$ac_cv_func___argz_stringify" = xyes +then : + printf "%s\n" "#define HAVE___ARGZ_STRINGIFY 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" +if test "x$ac_cv_func_dcgettext" = xyes +then : + printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" +if test "x$ac_cv_func_mempcpy" = xyes +then : + printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h -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 +ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" +if test "x$ac_cv_func_munmap" = xyes +then : + printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define u_long unsigned long -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap" +if test "x$ac_cv_func_mremap" = xyes +then : + printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" +if test "x$ac_cv_func_stpcpy" = xyes +then : + printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn" +if test "x$ac_cv_func_strcspn" = xyes +then : + printf "%s\n" "#define HAVE_STRCSPN 1" >>confdefs.h +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 +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 -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 + + +ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" +if test "x$ac_cv_header_wctype_h" = xyes +then : + printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h + 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 +ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +if test "x$ac_cv_header_wchar_h" = xyes +then : + printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h 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_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_langinfo_h" = xyes +then : + printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h - 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 +ac_fn_c_check_header_compile "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default" +if test "x$ac_cv_header_mbstr_h" = xyes +then : + printf "%s\n" "#define HAVE_MBSTR_H 1" >>confdefs.h 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 +ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen" +if test "x$ac_cv_func_mbrlen" = xyes +then : + printf "%s\n" "#define HAVE_MBRLEN 1" >>confdefs.h 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_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp" +if test "x$ac_cv_func_mbscasecmp" = xyes +then : + printf "%s\n" "#define HAVE_MBSCMP 1" >>confdefs.h - 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 - +ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp" +if test "x$ac_cv_func_mbscmp" = xyes +then : + printf "%s\n" "#define HAVE_MBSCMP 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs" +if test "x$ac_cv_func_mbsnrtowcs" = xyes +then : + printf "%s\n" "#define HAVE_MBSNRTOWCS 1" >>confdefs.h + 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 +ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs" +if test "x$ac_cv_func_mbsrtowcs" = xyes +then : + printf "%s\n" "#define HAVE_MBSRTOWCS 1" >>confdefs.h fi -fi +ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr" +if test "x$ac_cv_func_mbschr" = xyes +then : + printf "%s\n" "#define HAVE_MBSCHR 1" >>confdefs.h -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;; +else $as_nop + case " $LIBOBJS " in + *" mbschr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mbschr.$ac_objext" + ;; 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 +ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" +if test "x$ac_cv_func_wcrtomb" = xyes +then : + printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll" +if test "x$ac_cv_func_wcscoll" = xyes +then : + printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h + 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 +ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup" +if test "x$ac_cv_func_wcsdup" = xyes +then : + printf "%s\n" "#define HAVE_WCSDUP 1" >>confdefs.h 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;; +ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth" +if test "x$ac_cv_func_wcwidth" = xyes +then : + printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" +if test "x$ac_cv_func_wctype" = xyes +then : + printf "%s\n" "#define HAVE_WCTYPE 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth" +if test "x$ac_cv_func_wcswidth" = xyes +then : + printf "%s\n" "#define HAVE_WCSWIDTH 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" wcswidth.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext" + ;; 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 + +fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5 +printf %s "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } +if test ${ac_cv_func_mbrtowc+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int -main () +main (void) { -if (sizeof ((u_bits16_t))) - return 0; +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 -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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_mbrtowc=yes +else $as_nop + ac_cv_func_mbrtowc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 +printf "%s\n" "$ac_cv_func_mbrtowc" >&6; } + if test $ac_cv_func_mbrtowc = yes; then + +printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h + + fi + +if test $ac_cv_func_mbrtowc = yes; then + printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h - 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 +ac_fn_c_check_func "$LINENO" "iswlower" "ac_cv_func_iswlower" +if test "x$ac_cv_func_iswlower" = xyes +then : + printf "%s\n" "#define HAVE_ISWLOWER 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper" +if test "x$ac_cv_func_iswupper" = xyes +then : + printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" +if test "x$ac_cv_func_towlower" = xyes +then : + printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h -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 +ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper" +if test "x$ac_cv_func_towupper" = xyes +then : + printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define u_bits16_t unsigned char -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "iswctype" "ac_cv_func_iswctype" +if test "x$ac_cv_func_iswctype" = xyes +then : + printf "%s\n" "#define HAVE_ISWCTYPE 1" >>confdefs.h 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 + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5 +printf %s "checking for wchar_t in wchar.h... " >&6; } +if test ${bash_cv_type_wchar_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include int -main () +main (void) { -if (sizeof (u_bits16_t)) - return 0; + + 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 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_type_wchar_t=yes +else $as_nop + bash_cv_type_wchar_t=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5 +printf "%s\n" "$bash_cv_type_wchar_t" >&6; } +if test $bash_cv_type_wchar_t = yes; then + +printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5 +printf %s "checking for wctype_t in wctype.h... " >&6; } +if test ${bash_cv_type_wctype_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include int -main () +main (void) { -if (sizeof ((u_bits16_t))) - return 0; + + 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 - : -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 - +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_type_wctype_t=yes +else $as_nop + bash_cv_type_wctype_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5 +printf "%s\n" "$bash_cv_type_wctype_t" >&6; } +if test $bash_cv_type_wctype_t = yes; then -fi +printf "%s\n" "#define HAVE_WCTYPE_T 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5 +printf %s "checking for wint_t in wctype.h... " >&6; } +if test ${bash_cv_type_wint_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include int -main () +main (void) { -if (sizeof (bits32_t)) - return 0; + + 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 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_type_wint_t=yes +else $as_nop + bash_cv_type_wint_t=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5 +printf "%s\n" "$bash_cv_type_wint_t" >&6; } +if test $bash_cv_type_wint_t = yes; then + +printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5 +printf %s "checking for wcwidth broken with unicode combining characters... " >&6; } +if test ${bash_cv_wcwidth_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + bash_cv_wcwidth_broken=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include +#include +#include + +#include +#include + int -main () +main(c, v) +int c; +char **v; { -if (sizeof ((bits32_t))) - return 0; - ; - return 0; + int w; + + setlocale(LC_ALL, "en_US.UTF-8"); + w = wcwidth (0x0301); + exit (w == 0); /* exit 0 if wcwidth broken */ } + _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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_wcwidth_broken=yes +else $as_nop + bash_cv_wcwidth_broken=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - ac_cv_type_bits32_t=yes fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5 +printf "%s\n" "$bash_cv_wcwidth_broken" >&6; } +if test "$bash_cv_wcwidth_broken" = yes; then -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 +printf "%s\n" "#define WCWIDTH_BROKEN 1" >>confdefs.h + +fi +if test "$am_cv_func_iconv" = yes; then + OLDLIBS="$LIBS" + LIBS="$LIBS $LIBINTL $LIBICONV" + ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" +if test "x$ac_cv_func_locale_charset" = xyes +then : + printf "%s\n" "#define HAVE_LOCALE_CHARSET 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + LIBS="$OLDLIBS" 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 +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 +printf %s "checking size of wchar_t... " >&6; } +if test ${ac_cv_sizeof_wchar_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_wchar_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (wchar_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_wchar_t=0 + fi +fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 +printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; } -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 + + +printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h + + + + + +if test "$opt_static_link" != yes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* 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. */ +char dlopen (); int -main () +main (void) { -if (sizeof ((bits32_t))) - return 0; +return dlopen (); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dl_dlopen=yes +else $as_nop + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : + printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h -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 + LIBS="-ldl $LIBS" +fi + +ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes +then : + printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "dlclose" "ac_cv_func_dlclose" +if test "x$ac_cv_func_dlclose" = xyes +then : + printf "%s\n" "#define HAVE_DLCLOSE 1" >>confdefs.h -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 +ac_fn_c_check_func "$LINENO" "dlsym" "ac_cv_func_dlsym" +if test "x$ac_cv_func_dlsym" = xyes +then : + printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define bits32_t long -_ACEOF +fi 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 +if test "$ac_cv_func_inet_aton" != 'yes'; then + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 +printf %s "checking for inet_aton... " >&6; } +if test ${bash_cv_func_inet_aton+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include +#include +#include +struct in_addr ap; int -main () +main (void) { -if (sizeof ((bits32_t))) - return 0; + inet_aton("127.0.0.1", &ap); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_func_inet_aton=yes +else $as_nop + bash_cv_func_inet_aton=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5 +printf "%s\n" "$bash_cv_func_inet_aton" >&6; } +if test $bash_cv_func_inet_aton = yes; then + printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h -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 - + case " $LIBOBJS " in + *" inet_aton.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" + ;; +esac 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 +case "$host_os" in +irix4*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5 +printf %s "checking for getpwent in -lsun... " >&6; } +if test ${ac_cv_lib_sun_getpwent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsun $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char getpwent (); +int +main (void) +{ +return getpwent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_sun_getpwent=yes +else $as_nop + ac_cv_lib_sun_getpwent=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5 +printf "%s\n" "$ac_cv_lib_sun_getpwent" >&6; } +if test "x$ac_cv_lib_sun_getpwent" = xyes +then : + printf "%s\n" "#define HAVE_LIBSUN 1" >>confdefs.h + + LIBS="-lsun $LIBS" fi + ;; +esac +if test "$ac_cv_func_getpeername" = no; then -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 +if test "X$bash_cv_have_socklib" = "X"; then +_bash_needmsg= 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5 +printf %s "checking for socket library... " >&6; } +_bash_needmsg=yes +fi +if test ${bash_cv_have_socklib+y} +then : + printf %s "(cached) " >&6 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5 +printf %s "checking for getpeername in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_getpeername+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket -lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* 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. */ +char getpeername (); int -main () +main (void) { -if (sizeof (u_bits32_t)) - return 0; +return getpeername (); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_socket_getpeername=yes +else $as_nop + ac_cv_lib_socket_getpeername=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5 +printf "%s\n" "$ac_cv_lib_socket_getpeername" >&6; } +if test "x$ac_cv_lib_socket_getpeername" = xyes +then : + bash_cv_have_socklib=yes +else $as_nop + bash_cv_have_socklib=no +fi + +fi + +if test "X$_bash_needmsg" = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5 +printf %s "checking for libnsl... " >&6; } + _bash_needmsg=yes + fi + if test ${bash_cv_have_libnsl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 +printf %s "checking for t_open in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_t_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* 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. */ +char t_open (); int -main () +main (void) { -if (sizeof ((u_bits32_t))) - return 0; +return t_open (); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_nsl_t_open=yes +else $as_nop + ac_cv_lib_nsl_t_open=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 +printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; } +if test "x$ac_cv_lib_nsl_t_open" = xyes +then : + bash_cv_have_libnsl=yes +else $as_nop + bash_cv_have_libnsl=no +fi - 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 + if test "X$_bash_needmsg" = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5 +printf "%s\n" "$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 + printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h 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 - : +if test "$ac_cv_func_gethostbyname" = no; then + if test "X$bash_cv_have_gethostbyname" = "X"; then +_bash_needmsg=yes else - -cat >>confdefs.h <<_ACEOF -#define u_bits32_t unsigned int -_ACEOF - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 +printf %s "checking for gethostbyname in socket library... " >&6; } +_bash_needmsg= 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 +if test ${bash_cv_have_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include + int -main () +main (void) { -if (sizeof (u_bits32_t)) - return 0; + +struct hostent *hp; +hp = gethostbyname("localhost"); + ; 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 +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_have_gethostbyname=yes +else $as_nop + bash_cv_have_gethostbyname=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "X$_bash_needmsg" = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 +printf %s "checking for gethostbyname in socket library... " >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5 +printf "%s\n" "$bash_cv_have_gethostbyname" >&6; } +if test "$bash_cv_have_gethostbyname" = yes; then +printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h + +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +printf %s "checking type of array argument to getgroups... " >&6; } +if test ${ac_cv_type_getgroups+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_type_getgroups=cross +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { -if (sizeof ((u_bits32_t))) - return 0; - ; - return 0; + 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_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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_type_getgroups=gid_t +else $as_nop + ac_cv_type_getgroups=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext 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 +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_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 $as_nop + ac_cv_type_getgroups=int +fi +rm -rf conftest* fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +printf "%s\n" "$ac_cv_type_getgroups" >&6; } + +printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h + + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define off_t long int" >>confdefs.h -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 +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define mode_t int" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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. */ +#include + _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_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 $as_nop + ac_cv_type_uid_t=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +printf "%s\n" "#define uid_t int" >>confdefs.h + + +printf "%s\n" "#define gid_t int" >>confdefs.h + +fi + + + ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default +" +if test "x$ac_cv_type_pid_t" = xyes +then : + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + + #if defined _WIN64 && !defined __CYGWIN__ + LLP64 + #endif + int -main () +main (void) { -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 +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_pid_type='int' +else $as_nop + ac_pid_type='__int64' fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -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 +printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h 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 +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes +then : -fi +else $as_nop + +printf "%s\n" "#define size_t unsigned int" >>confdefs.h 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 + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = xyes +then : + +printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h + +else $as_nop + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { -if (sizeof (bits64_t)) - return 0; +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [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 +if ac_fn_c_try_compile "$LINENO" +then : + +printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ssize_t int" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" +if test "x$ac_cv_type_time_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define time_t long" >>confdefs.h + +fi + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +printf %s "checking for long long int... " >&6; } +if test ${ac_cv_type_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes +then : + : +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int -main () +main (void) { -if (sizeof ((bits64_t))) - return 0; +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + 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 +if ac_fn_c_try_run "$LINENO" +then : - ac_cv_type_bits64_t=yes +else $as_nop + ac_cv_type_long_long_int=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 - - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi;; + esac 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then -cat >>confdefs.h <<_ACEOF -#define bits64_t char * -_ACEOF +printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h -fi + 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 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +printf %s "checking for unsigned long long int... " >&6; } +if test ${ac_cv_type_unsigned_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_unsigned_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; int -main () +main (void) { -if (sizeof (bits64_t)) - return 0; +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + +else $as_nop + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5 +printf %s "checking for sig_atomic_t in signal.h... " >&6; } +if test ${ac_cv_have_sig_atomic_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + #include int -main () +main (void) { -if (sizeof ((bits64_t))) - return 0; + sig_atomic_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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_have_sig_atomic_t=yes +else $as_nop + ac_cv_have_sig_atomic_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5 +printf "%s\n" "$ac_cv_have_sig_atomic_t" >&6; } +if test "$ac_cv_have_sig_atomic_t" = "no" +then + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5 +printf %s "checking for sig_atomic_t... " >&6; } +if test ${bash_cv_type_sig_atomic_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_STDDEF_H +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sig_atomic_t" >/dev/null 2>&1 +then : + bash_cv_type_sig_atomic_t=yes +else $as_nop + bash_cv_type_sig_atomic_t=no +fi +rm -rf conftest* + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5 +printf "%s\n" "$bash_cv_type_sig_atomic_t" >&6; } + +if test $bash_cv_type_sig_atomic_t = no; then + printf "%s\n" "#define sig_atomic_t int" >>confdefs.h + +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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 +printf %s "checking size of char... " >&6; } +if test ${ac_cv_sizeof_char+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_char" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 +printf "%s\n" "$ac_cv_sizeof_char" >&6; } + + + +printf "%s\n" "#define SIZEOF_CHAR $ac_cv_sizeof_char" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +printf %s "checking size of short... " >&6; } +if test ${ac_cv_sizeof_short+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_short" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (short) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_short=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +printf "%s\n" "$ac_cv_sizeof_short" >&6; } + + + +printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +printf %s "checking size of int... " >&6; } +if test ${ac_cv_sizeof_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +printf "%s\n" "$ac_cv_sizeof_int" >&6; } + + + +printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +printf %s "checking size of long... " >&6; } +if test ${ac_cv_sizeof_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long" >&6; } + + + +printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5 +printf %s "checking size of char *... " >&6; } +if test ${ac_cv_sizeof_char_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_char_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char_p=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5 +printf "%s\n" "$ac_cv_sizeof_char_p" >&6; } + + + +printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +printf %s "checking size of size_t... " >&6; } +if test ${ac_cv_sizeof_size_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_size_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_size_t=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +printf %s "checking size of double... " >&6; } +if test ${ac_cv_sizeof_double+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_double" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_double=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +printf "%s\n" "$ac_cv_sizeof_double" >&6; } + + + +printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +printf %s "checking size of long long... " >&6; } +if test ${ac_cv_sizeof_long_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_long_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi +fi - ac_cv_type_bits64_t=yes fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } -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 +printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h -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 +ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default" +if test "x$ac_cv_type_u_int" = xyes +then : -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 +else $as_nop + +printf "%s\n" "#define u_int unsigned int" >>confdefs.h - 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 +ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default" +if test "x$ac_cv_type_u_long" = xyes +then : +else $as_nop -fi +printf "%s\n" "#define u_long unsigned long" >>confdefs.h -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 + + +if test "$ac_cv_sizeof_short" = 2; then + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits16_t short" >>confdefs.h 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 +elif test "$ac_cv_sizeof_char" = 2; then + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits16_t char" >>confdefs.h - 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 + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes +then : +else $as_nop + +printf "%s\n" "#define bits16_t short" >>confdefs.h 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 + +if test "$ac_cv_sizeof_short" = 2; then + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h 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 +elif test "$ac_cv_sizeof_char" = 2; then + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits16_t unsigned char" >>confdefs.h - 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 + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes +then : + +else $as_nop +printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h 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 +if test "$ac_cv_sizeof_int" = 4; then + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits32_t int" >>confdefs.h fi +elif test "$ac_cv_sizeof_long" = 4; then + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes +then : +else $as_nop -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 +printf "%s\n" "#define bits32_t long" >>confdefs.h - 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 + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes +then : +else $as_nop + +printf "%s\n" "#define bits32_t int" >>confdefs.h 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 +if test "$ac_cv_sizeof_int" = 4; then + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes +then : -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 +else $as_nop + +printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_long" = 4; then + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits32_t unsigned long" >>confdefs.h - 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 + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes +then : + +else $as_nop +printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h 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 + +if test "$ac_cv_sizeof_char_p" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t char *" >>confdefs.h 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 +elif test "$ac_cv_sizeof_double" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t double" >>confdefs.h - 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 +elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : +else $as_nop + +printf "%s\n" "#define bits64_t long long" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +elif test "$ac_cv_sizeof_long" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t long" >>confdefs.h + 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 + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define ptrdiff_t long long -_ACEOF +else $as_nop + +printf "%s\n" "#define bits64_t double" >>confdefs.h 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 +fi + + + +if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t int" >>confdefs.h - 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 +elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : +else $as_nop + +printf "%s\n" "#define ptrdiff_t long" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t long long" >>confdefs.h + 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 + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define ptrdiff_t int -_ACEOF +else $as_nop + +printf "%s\n" "#define ptrdiff_t int" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +printf %s "checking whether stat file-mode macros are broken... " >&6; } +if test ${ac_cv_header_stat_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -25473,50 +18019,29 @@ 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 +if ac_fn_c_try_compile "$LINENO" +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 +else $as_nop + ac_cv_header_stat_broken=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 -$as_echo "$ac_cv_header_stat_broken" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 +printf %s "checking whether #! works in shell scripts... " >&6; } +if test ${ac_cv_sys_interpreter+y} +then : + printf %s "(cached) " >&6 +else $as_nop echo '#! /bin/cat exit 69 ' >conftest @@ -25529,201 +18054,74 @@ else fi rm -f conftest fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5 -$as_echo "$ac_cv_sys_interpreter" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 +printf %s "checking for lstat... " >&6; } +if test ${bash_cv_func_lstat+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + #include + #include int -main () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +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 +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5 +printf "%s\n" "$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 -#endif -#include -#include - -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 - + printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5 +printf %s "checking if dup2 fails to clear the close-on-exec flag... " >&6; } +if test ${bash_cv_dup2_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include +#include +int main() { int fd1, fd2, fl; @@ -25739,75 +18137,50 @@ main() } _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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_dup2_broken" >&5 -$as_echo "$bash_cv_dup2_broken" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5 +printf "%s\n" "$bash_cv_dup2_broken" >&6; } if test $bash_cv_dup2_broken = yes; then -cat >>confdefs.h <<\_ACEOF -#define DUP2_BROKEN 1 -_ACEOF +printf "%s\n" "#define DUP2_BROKEN 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5 +printf %s "checking whether pgrps need synchronization... " >&6; } +if test ${bash_cv_pgrp_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_UNISTD_H # include #endif +#ifdef HAVE_SYS_WAIT_H +# include +#endif +#include +int main() { # ifdef GETPGRP_VOID @@ -25853,71 +18226,44 @@ main() 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 +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_pgrp_pipe=no +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_pgrp_pipe" >&5 -$as_echo "$bash_cv_pgrp_pipe" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5 +printf "%s\n" "$bash_cv_pgrp_pipe" >&6; } if test $bash_cv_pgrp_pipe = yes; then -cat >>confdefs.h <<\_ACEOF -#define PGRP_PIPE 1 -_ACEOF +printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 +printf %s "checking for type of signal functions... " >&6; } +if test ${bash_cv_signal_vintage+y} +then : + printf %s "(cached) " >&6 +else $as_nop -{ $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 +if test ${bash_cv_posix_signals+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include + int -main () +main (void) { sigset_t ss; @@ -25930,679 +18276,330 @@ main () 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 +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_posix_signals=yes +else $as_nop + bash_cv_posix_signals=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test $bash_cv_posix_signals = yes; then + bash_cv_signal_vintage=posix +else + if test ${bash_cv_bsd_signals+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include + int -main () +main (void) { - int mask = sigmask(SIGINT); - sigsetmask(mask); sigblock(mask); sigpause(mask); +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 +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_bsd_signals=yes +else $as_nop + bash_cv_bsd_signals=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test $bash_cv_bsd_signals = yes; then + bash_cv_signal_vintage=4.2bsd + else + if test ${bash_cv_sysv_signals+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - RETSIGTYPE foo() { } +#include +void foo() { } + int -main () +main (void) { - int mask = sigmask(SIGINT); - sigset(SIGINT, foo); sigrelse(SIGINT); - sighold(SIGINT); sigpause(SIGINT); +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 +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_sysv_signals=yes +else $as_nop + bash_cv_sysv_signals=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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 + if test $bash_cv_sysv_signals = yes; then + bash_cv_signal_vintage=svr3 + else + bash_cv_signal_vintage=v7 + fi + fi 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5 +printf "%s\n" "$bash_cv_signal_vintage" >&6; } if test "$bash_cv_signal_vintage" = posix; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_SIGNALS 1 -_ACEOF +printf "%s\n" "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h elif test "$bash_cv_signal_vintage" = "4.2bsd"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_BSD_SIGNALS 1 -_ACEOF +printf "%s\n" "#define HAVE_BSD_SIGNALS 1" >>confdefs.h 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 -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 +printf "%s\n" "#define HAVE_USG_SIGHOLD 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5 +printf %s "checking for sys_errlist and sys_nerr... " >&6; } +if test ${bash_cv_sys_errlist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifdef HAVE_UNISTD_H -#include -#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 -#include -#include -#ifdef HAVE_UNISTD_H -#include -#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 -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifndef UNDER_SYS_SIGLIST_DECLARED -extern char *_sys_siglist[]; -#endif -main() +main (void) { -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 +extern char *sys_errlist[]; +extern int sys_nerr; +char *msg = sys_errlist[sys_nerr - 1]; -{ $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 -#include -#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 +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_sys_errlist=yes +else $as_nop + bash_cv_sys_errlist=no - bash_cv_void_sighandler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5 +printf "%s\n" "$bash_cv_sys_errlist" >&6; } +if test $bash_cv_sys_errlist = yes; then +printf "%s\n" "#define HAVE_SYS_ERRLIST 1" >>confdefs.h + 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 +ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include +/* NetBSD declares sys_siglist in unistd.h. */ +#ifdef HAVE_UNISTD_H +# include +#endif + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_sys_siglist" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_SYS_SIGLIST $ac_have_decl" >>confdefs.h -{ $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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5 +printf %s "checking for sys_siglist in system C library... " >&6; } +if test ${bash_cv_sys_siglist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;} + bash_cv_sys_siglist=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include -#if STDC_HEADERS -#include -#include -#endif -#if HAVE_INTTYPES_H -#include +#include +#ifdef HAVE_UNISTD_H +#include #endif -#if HAVE_STDINT_H -#include +#include +#if !HAVE_DECL_SYS_SIGLIST +extern char *sys_siglist[]; #endif -#include +int +main() +{ +char *msg = sys_siglist[2]; +exit(msg == 0); +} _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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_sys_siglist=yes +else $as_nop + bash_cv_sys_siglist=no fi -rm -f conftest* - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5 +printf "%s\n" "$bash_cv_sys_siglist" >&6; } +if test $bash_cv_sys_siglist = yes; then +printf "%s\n" "#define HAVE_SYS_SIGLIST 1" >>confdefs.h +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5 +printf %s "checking for _sys_siglist in signal.h or unistd.h... " >&6; } +if test ${bash_cv_decl_under_sys_siglist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include -#if STDC_HEADERS -#include -#include -#endif -#if HAVE_INTTYPES_H -#include -#endif -#if HAVE_STDINT_H -#include -#endif #include - +#ifdef HAVE_UNISTD_H +#include +#endif +int +main (void) +{ + char *msg = _sys_siglist[2]; + ; + return 0; +} _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 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_decl_under_sys_siglist=yes +else $as_nop + bash_cv_decl_under_sys_siglist=no fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5 +printf "%s\n" "$bash_cv_decl_under_sys_siglist" >&6; } +if test $bash_cv_decl_under_sys_siglist = yes; then +printf "%s\n" "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5 +printf %s "checking for _sys_siglist in system C library... " >&6; } +if test ${bash_cv_under_sys_siglist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;} + bash_cv_under_sys_siglist=no -{ $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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include -#if STDC_HEADERS -#include -#include -#endif -#if HAVE_INTTYPES_H -#include +#include +#ifdef HAVE_UNISTD_H +#include #endif -#if HAVE_STDINT_H -#include +#include +#ifndef UNDER_SYS_SIGLIST_DECLARED +extern char *_sys_siglist[]; #endif - +int +main() +{ +char *msg = (char *)_sys_siglist[2]; +exit(msg == 0); +} _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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_under_sys_siglist=yes +else $as_nop + bash_cv_under_sys_siglist=no fi -rm -f conftest* - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext 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 - fi -if test $bash_cv_type_quad_t = no; then - cat >>confdefs.h <<_ACEOF -#define quad_t long -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5 +printf "%s\n" "$bash_cv_under_sys_siglist" >&6; } +if test $bash_cv_under_sys_siglist = yes; then +printf "%s\n" "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h 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 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 +printf %s "checking for clock_t... " >&6; } +if test ${bash_cv_type_clock_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#if STDC_HEADERS +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #if HAVE_INTTYPES_H @@ -26611,45 +18608,43 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_STDINT_H #include #endif - +#include _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 + $EGREP "clock_t" >/dev/null 2>&1 +then : + bash_cv_type_clock_t=yes +else $as_nop + bash_cv_type_clock_t=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_intmax_t" >&5 -$as_echo "$bash_cv_type_intmax_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5 +printf "%s\n" "$bash_cv_type_clock_t" >&6; } -if test $bash_cv_type_intmax_t = no; then - cat >>confdefs.h <<_ACEOF -#define intmax_t $bash_cv_type_long_long -_ACEOF +if test $bash_cv_type_clock_t = no; then + printf "%s\n" "#define clock_t long" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5 +printf %s "checking for sigset_t... " >&6; } +if test ${bash_cv_type_sigset_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#if STDC_HEADERS +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #if HAVE_INTTYPES_H @@ -26658,46 +18653,44 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_STDINT_H #include #endif - +#include _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 + $EGREP "sigset_t" >/dev/null 2>&1 +then : + bash_cv_type_sigset_t=yes +else $as_nop + bash_cv_type_sigset_t=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_uintmax_t" >&5 -$as_echo "$bash_cv_type_uintmax_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5 +printf "%s\n" "$bash_cv_type_sigset_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 +if test $bash_cv_type_sigset_t = no; then + printf "%s\n" "#define sigset_t int" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 +printf %s "checking for socklen_t... " >&6; } +if test ${bash_cv_type_socklen_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#if STDC_HEADERS +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #if HAVE_INTTYPES_H @@ -26710,395 +18703,285 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "socklen_t" >/dev/null 2>&1; then + $EGREP "socklen_t" >/dev/null 2>&1 +then : bash_cv_type_socklen_t=yes -else +else $as_nop bash_cv_type_socklen_t=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_socklen_t" >&5 -$as_echo "$bash_cv_type_socklen_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5 +printf "%s\n" "$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 + printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h fi if test $bash_cv_type_socklen_t = no; then - cat >>confdefs.h <<_ACEOF -#define socklen_t int -_ACEOF + printf "%s\n" "#define socklen_t unsigned int" >>confdefs.h 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 + +ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" +if test "x$ac_cv_type_quad_t" = xyes +then : + printf "%s\n" "#define HAVE_QUAD_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of struct rlimit fields" >&5 +printf %s "checking for type of struct rlimit fields... " >&6; } +if test ${bash_cv_type_rlimit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include int -main () +main (void) { 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 +if ac_fn_c_try_compile "$LINENO" +then : bash_cv_type_rlimit=rlim_t -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +else $as_nop +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of struct rlimit fields" >&5 +printf %s "checking for size of struct rlimit fields... " >&6; } +if test ${bash_cv_sizeof_rlim_cur+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&5 +printf "%s\n" "$as_me: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&2;} + bash_cv_sizeof_rlim_cur=$ac_cv_sizeof_long -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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef HAVE_SYS_TIME_H #include +#endif +#include #include main() { -#ifdef HAVE_QUAD_T - struct rlimit rl; - if (sizeof(rl.rlim_cur) == sizeof(quad_t)) - exit(0); -#endif - exit(1); +struct rlimit r; +exit(sizeof (r.rlim_cur)); } -_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 - +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_sizeof_rlim_cur=$? +else $as_nop + bash_cv_sizeof_rlim_cur=$? fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_rlim_cur" >&5 +printf "%s\n" "$bash_cv_sizeof_rlim_cur" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of quad_t" >&5 +printf %s "checking for size of quad_t... " >&6; } +if test ${bash_cv_sizeof_quad_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&5 +printf "%s\n" "$as_me: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&2;} + bash_cv_sizeof_quad_t=0 -{ $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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#include - +#include +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif -int -main () +main() { -static struct termios ac_aggr; -if (ac_aggr.c_line) -return 0; - ; - return 0; +#if HAVE_QUAD_T +quad_t x; +exit(sizeof (x)); +#else +exit (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_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. */ +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_sizeof_quad_t=$? +else $as_nop + bash_cv_sizeof_quad_t=$? +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -#include -#include +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_quad_t" >&5 +printf "%s\n" "$bash_cv_sizeof_quad_t" >&6; } -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 +if test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long; then + bash_cv_type_rlimit='unsigned long' +elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long_long; then + bash_cv_type_rlimit='unsigned long long' +elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_int; then + bash_cv_type_rlimit='unsigned int' +elif test $bash_cv_sizeof_rlim_cur = $bash_cv_sizeof_quad_t; then + bash_cv_type_rlimit='quad_t' else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_type_rlimit='unsigned long' +fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5 +printf "%s\n" "$bash_cv_type_rlimit" >&6; } +printf "%s\n" "#define RLIMTYPE $bash_cv_type_rlimit" >>confdefs.h + - 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 + + ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" +if test "x$ac_cv_type_intmax_t" = xyes +then : + +printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h + +else $as_nop + test $ac_cv_type_long_long_int = yes \ + && ac_type='long long int' \ + || ac_type='long int' + +printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h 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 -#include + ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default" +if test "x$ac_cv_type_uintmax_t" = xyes +then : +printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.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 +else $as_nop + test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long int' \ + || ac_type='unsigned long int' - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h -#include -#include +fi -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 +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 +printf %s "checking size of intmax_t... " >&6; } +if test ${ac_cv_sizeof_intmax_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_intmax_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (intmax_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_intmax_t=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 +printf "%s\n" "$ac_cv_sizeof_intmax_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t" >>confdefs.h + + + + +ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" " +#include +#include + +" +if test "x$ac_cv_member_struct_termios_c_line" = xyes +then : + printf "%s\n" "#define TERMIOS_LDISC 1" >>confdefs.h -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 + + + +ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" " +#include +#include + +" +if test "x$ac_cv_member_struct_termio_c_line" = xyes +then : + printf "%s\n" "#define TERMIO_LDISC 1" >>confdefs.h 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. */ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5 +printf %s "checking for struct dirent.d_ino... " >&6; } +if test ${bash_cv_dirent_has_d_ino+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +ac_fn_c_check_member "$LINENO" "struct dirent" "d_ino" "ac_cv_member_struct_dirent_d_ino" " #include #include #ifdef HAVE_UNISTD_H @@ -27119,67 +19002,37 @@ cat >>conftest.$ac_ext <<_ACEOF # endif #endif /* HAVE_DIRENT_H */ -int -main () -{ - -struct dirent d; int z; z = d.d_ino; +" +if test "x$ac_cv_member_struct_dirent_d_ino" = xyes +then : - ; - 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 +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h - bash_cv_dirent_has_dino=no +bash_cv_dirent_has_d_ino=yes +else $as_nop + bash_cv_dirent_has_d_ino=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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_ino" >&5 +printf "%s\n" "$bash_cv_dirent_has_d_ino" >&6; } +if test $bash_cv_dirent_has_d_ino = yes; then +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h 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. */ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5 +printf %s "checking for struct dirent.d_fileno... " >&6; } +if test ${bash_cv_dirent_has_d_fileno+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +ac_fn_c_check_member "$LINENO" "struct dirent" "d_fileno" "ac_cv_member_struct_dirent_d_fileno" " #include #include #ifdef HAVE_UNISTD_H @@ -27200,67 +19053,37 @@ cat >>conftest.$ac_ext <<_ACEOF # endif #endif /* HAVE_DIRENT_H */ -int -main () -{ - -struct dirent d; int z; z = d.d_fileno; +" +if test "x$ac_cv_member_struct_dirent_d_fileno" = xyes +then : - ; - 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 +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h - bash_cv_dirent_has_d_fileno=no +bash_cv_dirent_has_d_fileno=yes +else $as_nop + 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h 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. */ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5 +printf %s "checking for struct dirent.d_namlen... " >&6; } +if test ${bash_cv_dirent_has_d_namlen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +ac_fn_c_check_member "$LINENO" "struct dirent" "d_namlen" "ac_cv_member_struct_dirent_d_namlen" " #include #include #ifdef HAVE_UNISTD_H @@ -27281,770 +19104,743 @@ cat >>conftest.$ac_ext <<_ACEOF # endif #endif /* HAVE_DIRENT_H */ +" +if test "x$ac_cv_member_struct_dirent_d_namlen" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h + +bash_cv_dirent_has_d_namlen=yes +else $as_nop + bash_cv_dirent_has_d_namlen=no +fi + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5 +printf "%s\n" "$bash_cv_dirent_has_d_namlen" >&6; } +if test $bash_cv_dirent_has_d_namlen = yes; then +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5 +printf %s "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; } +if test ${bash_cv_struct_winsize_header+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +if test ${bash_cv_struct_winsize_ioctl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + int -main () +main (void) { -struct dirent d; int z; z = d.d_namlen; +struct winsize x; +if (sizeof (x) > 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 - 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 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_struct_winsize_ioctl=yes +else $as_nop + bash_cv_struct_winsize_ioctl=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -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 +if test ${bash_cv_struct_winsize_termios+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include -#include +#include + int -main () +main (void) { + struct winsize x; +if (sizeof (x) > 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 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_struct_winsize_termios=yes +else $as_nop + bash_cv_struct_winsize_termios=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi + + + +if test $bash_cv_struct_winsize_ioctl = yes; then bash_cv_struct_winsize_header=ioctl_h +elif test $bash_cv_struct_winsize_termios = yes; 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 + +fi + +if test $bash_cv_struct_winsize_header = ioctl_h; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5 +printf "%s\n" "sys/ioctl.h" >&6; } + printf "%s\n" "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h + +elif test $bash_cv_struct_winsize_header = termios_h; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5 +printf "%s\n" "termios.h" >&6; } + printf "%s\n" "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h + +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +printf "%s\n" "not found" >&6; } +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5 +printf %s "checking for struct timeval in sys/time.h and time.h... " >&6; } +if test ${bash_cv_struct_timeval+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + +int +main (void) +{ +static struct timeval x; x.tv_sec = x.tv_usec; - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_struct_timeval=yes +else $as_nop + bash_cv_struct_timeval=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5 +printf "%s\n" "$bash_cv_struct_timeval" >&6; } +if test $bash_cv_struct_timeval = yes; then + printf "%s\n" "#define HAVE_TIMEVAL 1" >>confdefs.h + +fi + +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test ${ac_cv_struct_tm+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#include +#include + int -main () +main (void) { -struct winsize x; +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 - bash_cv_struct_winsize_header=termios_h -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_struct_tm=time.h +else $as_nop + ac_cv_struct_tm=sys/time.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +printf "%s\n" "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h - bash_cv_struct_winsize_header=other fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include +#include <$ac_cv_struct_tm> + +" +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h + +else + ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_tzname" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 +printf %s "checking for tzname... " >&6; } +if test ${ac_cv_var_tzname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif -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 +int +main (void) +{ +return tzname[0][0]; + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_var_tzname=yes +else $as_nop + ac_cv_var_tzname=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 +printf "%s\n" "$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then -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 +printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h -else - { $as_echo "$as_me:$LINENO: result: not found" >&5 -$as_echo "not found" >&6; } + fi 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5 +printf %s "checking for struct timezone in sys/time.h and time.h... " >&6; } +if test ${bash_cv_struct_timezone+y} +then : + printf %s "(cached) " >&6 +else $as_nop -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _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 + $EGREP "struct timezone" >/dev/null 2>&1 +then : + bash_cv_struct_timezone=yes +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _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 + $EGREP "struct timezone" >/dev/null 2>&1 +then : + bash_cv_struct_timezone=yes +else $as_nop + bash_cv_struct_timezone=no fi -rm -f conftest* +rm -rf conftest* fi -rm -f conftest* +rm -rf 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5 +printf "%s\n" "$bash_cv_struct_timezone" >&6; } +if test $bash_cv_struct_timezone = yes; then + printf "%s\n" "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5 +printf %s "checking for offset of exit status in return status from wait... " >&6; } +if test ${bash_cv_wexitstatus_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5 +printf "%s\n" "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;} + bash_cv_wexitstatus_offset=0 + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include +#include + +#include + int -main () +main(c, v) + int c; + char **v; { -static struct stat ac_aggr; -if (sizeof ac_aggr.st_blocks) -return 0; - ; - return 0; + pid_t pid, p; + int s, i, n; + + s = 0; + pid = fork(); + if (pid == 0) + exit (42); + + /* wait for the process */ + p = wait(&s); + if (p != pid) + exit (255); + + /* crack s */ + for (i = 0; i < (sizeof(s) * 8); i++) + { + n = (s >> i) & 0xff; + if (n == 42) + exit (i); + } + + exit (254); } -_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 +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_wexitstatus_offset=0 +else $as_nop + bash_cv_wexitstatus_offset=$? +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 +if test "$bash_cv_wexitstatus_offset" -gt 32 ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5 +printf "%s\n" "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;} + bash_cv_wexitstatus_offset=0 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5 +printf "%s\n" "$bash_cv_wexitstatus_offset" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 -_ACEOF +printf "%s\n" "#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset" >>confdefs.h -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 + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${bash_cv_sys_struct_timespec_in_time_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include #include int -main () +main (void) { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +static struct timespec x; x.tv_sec = x.tv_nsec; ; 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 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_sys_struct_timespec_in_time_h=yes +else $as_nop + bash_cv_sys_struct_timespec_in_time_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5 +printf "%s\n" "$bash_cv_sys_struct_timespec_in_time_h" >&6; } -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 -_ACEOF + HAVE_STRUCT_TIMESPEC=0 + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $bash_cv_sys_struct_timespec_in_time_h = yes; then + printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h -fi + printf "%s\n" "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h -{ $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 + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${bash_cv_sys_struct_timespec_in_sys_time_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include <$ac_cv_struct_tm> - +#include int -main () +main (void) { -static struct tm ac_aggr; -if (ac_aggr.tm_zone) -return 0; +static struct timespec x; x.tv_sec = x.tv_nsec; ; 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 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_sys_struct_timespec_in_sys_time_h=yes +else $as_nop + bash_cv_sys_struct_timespec_in_sys_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5 +printf "%s\n" "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_cv_struct_tm> + printf "%s\n" "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${bash_cv_sys_struct_timespec_in_pthread_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int -main () +main (void) { -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_zone) -return 0; +static struct timespec x; x.tv_sec = x.tv_nsec; ; 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 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_sys_struct_timespec_in_pthread_h=yes +else $as_nop + bash_cv_sys_struct_timespec_in_pthread_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5 +printf "%s\n" "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h -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 + printf "%s\n" "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ZONE 1 -_ACEOF + fi + fi + fi -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 + + + + + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 +printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; } +if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; int -main () +main (void) { -#ifndef tzname - (void) tzname; -#endif + + st.st_atim = ts; ; 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes +else $as_nop + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 -_ACEOF +printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h + fi +else $as_nop + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes +then : -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h + + +else $as_nop + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h + + +else $as_nop + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h fi +fi + +fi + +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 -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5 +printf %s "checking for sbrk... " >&6; } + if test ${ac_cv_func_sbrk+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int -main () +main (void) { -return tzname[0][0]; + void *x = sbrk (4096); ; 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_sbrk=yes +else $as_nop + ac_cv_func_sbrk=no 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sbrk" >&5 +printf "%s\n" "$ac_cv_func_sbrk" >&6; } + if test X$ac_cv_func_sbrk = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5 +printf %s "checking for working sbrk... " >&6; } +if test ${bash_cv_func_sbrk+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working sbrk if cross-compiling" >&5 +printf "%s\n" "$as_me: WARNING: cannot check working sbrk if cross-compiling" >&2;} + bash_cv_func_sbrk=yes -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -_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 +#include +#include -_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* +int +main(int c, char **v) +{ + void *x; -fi -rm -f conftest* + x = sbrk (4096); + exit ((x == (void *)-1) ? 1 : 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_func_sbrk=yes +else $as_nop + bash_cv_func_sbrk=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sbrk" >&5 +printf "%s\n" "$bash_cv_func_sbrk" >&6; } + if test $bash_cv_func_sbrk = no; then + ac_cv_func_sbrk=no + fi + fi + if test $ac_cv_func_sbrk = yes; then -{ $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 +printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h -fi + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5 +printf %s "checking for the existence of strsignal... " >&6; } +if test ${bash_cv_have_strsignal+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include +#include int -main () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +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 +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5 +printf "%s\n" "$bash_cv_have_strsignal" >&6; } if test $bash_cv_have_strsignal = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRSIGNAL 1 -_ACEOF +printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5 +printf %s "checking if opendir() opens non-directories... " >&6; } +if test ${bash_cv_opendir_not_robust+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -28053,6 +19849,9 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ +#ifdef HAVE_SYS_STAT_H +#include +#endif #if defined(HAVE_DIRENT_H) # include #else @@ -28067,6 +19866,8 @@ cat >>conftest.$ac_ext <<_ACEOF # include # endif #endif /* HAVE_DIRENT_H */ +#include +int main() { DIR *dir; @@ -28085,72 +19886,48 @@ 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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5 +printf %s "checking whether ulimit can substitute for getdtablesize... " >&6; } +if test ${bash_cv_ulimit_maxfds+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#ifdef HAVE_ULIMIT_H +#include +#endif +int main() { long maxfds = ulimit(4, 0L); @@ -28158,162 +19935,61 @@ 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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_ulimit_maxfds" >&5 -$as_echo "$bash_cv_ulimit_maxfds" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5 +printf "%s\n" "$bash_cv_ulimit_maxfds" >&6; } if test $bash_cv_ulimit_maxfds = yes; then -cat >>confdefs.h <<\_ACEOF -#define ULIMIT_MAXFDS 1 -_ACEOF - -fi - - - - - - - - - - - - - - - - +printf "%s\n" "#define ULIMIT_MAXFDS 1" >>confdefs.h - - { $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 - -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 + ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fpurge" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h - -{ $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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5 +printf %s "checking to see if getenv can be redefined... " >&6; } +if test ${bash_cv_getenv_redef+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_UNISTD_H # include #endif +#include #ifndef __STDC__ # ifndef const # define const @@ -28329,6 +20005,7 @@ getenv (name) { return "42"; } +int main() { char *s; @@ -28343,77 +20020,49 @@ 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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_getenv_redef" >&5 -$as_echo "$bash_cv_getenv_redef" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5 +printf "%s\n" "$bash_cv_getenv_redef" >&6; } if test $bash_cv_getenv_redef = yes; then -cat >>confdefs.h <<\_ACEOF -#define CAN_REDEFINE_GETENV 1 -_ACEOF +printf "%s\n" "#define CAN_REDEFINE_GETENV 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5 +printf %s "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; } +if test ${bash_cv_getcwd_malloc+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_UNISTD_H #include #endif +#include +int main() { char *xpwd; @@ -28422,50 +20071,22 @@ main() } _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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_getcwd_malloc" >&5 -$as_echo "$bash_cv_getcwd_malloc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5 +printf "%s\n" "$bash_cv_getcwd_malloc" >&6; } if test $bash_cv_getcwd_malloc = no; then -cat >>confdefs.h <<\_ACEOF -#define GETCWD_BROKEN 1 -_ACEOF +printf "%s\n" "#define GETCWD_BROKEN 1" >>confdefs.h case " $LIBOBJS " in *" getcwd.$ac_objext "* ) ;; @@ -28477,22 +20098,24 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 +printf %s "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; } +if test ${bash_cv_func_sigsetjmp+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&5 +printf "%s\n" "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&2;} + if test "$bash_cv_posix_signals" = "yes" ; then + bash_cv_func_sigsetjmp=present + else + bash_cv_func_sigsetjmp=missing + fi -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_UNISTD_H @@ -28501,7 +20124,9 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include #include +#include +int main() { #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) @@ -28509,21 +20134,30 @@ exit (1); #else int code; -sigset_t set, oset; +sigset_t set, oset, nset; sigjmp_buf xx; /* get the mask */ sigemptyset(&set); sigemptyset(&oset); -sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); +/* paranoia -- make sure SIGINT is not blocked */ +sigdelset (&oset, SIGINT); +sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); /* save it */ code = sigsetjmp(xx, 1); if (code) - exit(0); /* could get sigmask and compare to oset here. */ +{ + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &nset); + /* could compare nset to oset here, but we just look for SIGINT */ + if (sigismember (&nset, SIGINT)) + exit(1); + exit(0); +} -/* change it */ +/* change it so that SIGINT is blocked */ sigaddset(&set, SIGINT); sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); @@ -28532,78 +20166,51 @@ 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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_sigsetjmp" >&5 -$as_echo "$bash_cv_func_sigsetjmp" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5 +printf "%s\n" "$bash_cv_func_sigsetjmp" >&6; } if test $bash_cv_func_sigsetjmp = present; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_SIGSETJMP 1 -_ACEOF +printf "%s\n" "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5 +printf %s "checking whether or not strcoll and strcmp differ... " >&6; } +if test ${bash_cv_func_strcoll_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if defined (HAVE_LOCALE_H) #include #endif +#include +#include +int main(c, v) int c; char *v[]; @@ -28635,168 +20242,98 @@ char *v[]; } _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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5 +printf "%s\n" "$bash_cv_func_strcoll_broken" >&6; } if test $bash_cv_func_strcoll_broken = yes; then -cat >>confdefs.h <<\_ACEOF -#define STRCOLL_BROKEN 1 -_ACEOF +printf "%s\n" "#define STRCOLL_BROKEN 1" >>confdefs.h 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5 +printf %s "checking for standard-conformant snprintf... " >&6; } +if test ${bash_cv_func_snprintf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include +#include + +int +main() +{ + int n; + n = snprintf (0, 0, "%s", "0123456"); + exit(n != 7); +} -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 +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_func_snprintf=yes +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_snprintf" >&5 -$as_echo "$bash_cv_func_snprintf" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define HAVE_SNPRINTF 0" >>confdefs.h 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5 +printf %s "checking for standard-conformant vsnprintf... " >&6; } +if test ${bash_cv_func_vsnprintf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_STDARG_H @@ -28829,6 +20366,7 @@ foo(format, va_alist) return n; } +int main() { int n; @@ -28837,77 +20375,101 @@ main() } _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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_vsnprintf" >&5 -$as_echo "$bash_cv_func_vsnprintf" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define HAVE_VSNPRINTF 0" >>confdefs.h fi -if test "$ac_cv_func_putenv" = "yes"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable strtoimax" >&5 +printf %s "checking for usable strtoimax... " >&6; } +if test ${bash_cv_func_strtoimax+y} +then : + printf %s "(cached) " >&6 +else $as_nop + HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0 + ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" +if test "x$ac_cv_func_strtoimax" = xyes +then : + printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h -{ $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 +fi + + ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoimax" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h + + + if test "$ac_cv_func_strtoimax" = "yes" ; then + HAVE_STRTOIMAX=1 + fi + if test "$ac_cv_have_decl_strtoimax" = "yes" ; then + HAVE_DECL_STRTOIMAX=1 + fi + + if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then + bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1 + else + bash_cv_func_strtoimax=yes + fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5 +printf "%s\n" "$bash_cv_func_strtoimax" >&6; } +if test $bash_cv_func_strtoimax = no; then +case " $LIBOBJS " in + *" strtoimax.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext" + ;; +esac + +fi + + + +if test "$ac_cv_func_putenv" = "yes"; then + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5 +printf %s "checking for standard-conformant putenv declaration... " >&6; } +if test ${bash_cv_std_putenv+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if STDC_HEADERS +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #ifndef __STDC__ @@ -28922,80 +20484,50 @@ extern int putenv (); #endif int -main () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +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 +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5 +printf "%s\n" "$bash_cv_std_putenv" >&6; } if test $bash_cv_std_putenv = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STD_PUTENV 1 -_ACEOF +printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h fi else -cat >>confdefs.h <<\_ACEOF -#define HAVE_STD_PUTENV 1 -_ACEOF +printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5 +printf %s "checking for standard-conformant unsetenv declaration... " >&6; } +if test ${bash_cv_std_unsetenv+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if STDC_HEADERS +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #ifndef __STDC__ @@ -29010,83 +20542,54 @@ extern int unsetenv (); #endif int -main () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +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 +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5 +printf "%s\n" "$bash_cv_std_unsetenv" >&6; } if test $bash_cv_std_unsetenv = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STD_UNSETENV 1 -_ACEOF +printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h fi else -cat >>confdefs.h <<\_ACEOF -#define HAVE_STD_UNSETENV 1 -_ACEOF +printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5 +printf %s "checking for printf floating point output in hex notation... " >&6; } +if test ${bash_cv_printf_a_format+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include +#include int main() @@ -29099,82 +20602,113 @@ main() } _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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fnmatch can be used to check bracket equivalence classes" >&5 +printf %s "checking whether fnmatch can be used to check bracket equivalence classes... " >&6; } +if test ${bash_cv_fnmatch_equiv_fallback+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&2;} + bash_cv_fnmatch_equiv_fallback=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include +#include + +char *pattern = "[[=a=]]"; + +/* char *string = "ä"; */ +unsigned char string[4] = { '\xc3', '\xa4', '\0' }; + +int +main (int c, char **v) +{ + setlocale (LC_ALL, "en_US.UTF-8"); + if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH) + exit (0); + exit (1); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_fnmatch_equiv_fallback=yes +else $as_nop + bash_cv_fnmatch_equiv_fallback=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fnmatch_equiv_fallback" >&5 +printf "%s\n" "$bash_cv_fnmatch_equiv_fallback" >&6; } +if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then + bash_cv_fnmatch_equiv_value=1 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_fnmatch_equiv_value=0 +fi + +printf "%s\n" "#define FNMATCH_EQUIV_FALLBACK $bash_cv_fnmatch_equiv_value" >>confdefs.h + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5 +printf %s "checking if signal handlers must be reinstalled when invoked... " >&6; } +if test ${bash_cv_must_reinstall_sighandlers+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_UNISTD_H #include #endif +#include -typedef RETSIGTYPE sigfunc(); +typedef void sigfunc(); -int nsigint; +volatile int nsigint; #ifdef HAVE_POSIX_SIGNALS sigfunc * @@ -29194,13 +20728,14 @@ set_signal_handler(sig, handler) #define set_signal_handler(s, h) signal(s, h) #endif -RETSIGTYPE +void sigint(s) int s; { nsigint++; } +int main() { nsigint = 0; @@ -29211,70 +20746,33 @@ main() } _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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5 +printf %s "checking for presence of necessary job control definitions... " >&6; } +if test ${bash_cv_job_control_missing+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -29286,104 +20784,77 @@ cat >>conftest.$ac_ext <<_ACEOF #endif #include -/* Add more tests in here as appropriate. */ -main() -{ +/* add more tests in here as appropriate */ + /* signal type */ #if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) -exit(1); +#error #endif /* signals and tty control. */ #if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) -exit (1); +#error #endif /* process control */ #if !defined (WNOHANG) || !defined (WUNTRACED) -exit(1); +#error #endif /* Posix systems have tcgetpgrp and waitpid. */ #if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) -exit(1); +#error #endif #if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) -exit(1); +#error #endif /* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ #if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) -exit(1); +#error #endif -exit(0); + +int +main (void) +{ + int x; + ; + 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 +if ac_fn_c_try_compile "$LINENO" +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 +else $as_nop + bash_cv_job_control_missing=missing -( 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 - - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_job_control_missing" >&5 -$as_echo "$bash_cv_job_control_missing" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define JOB_CONTROL_MISSING 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5 +printf %s "checking for presence of named pipes... " >&6; } +if test ${bash_cv_sys_named_pipes+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -29391,8 +20862,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_UNISTD_H #include #endif +#include +#include /* Add more tests in here as appropriate. */ +int main() { int fd, err; @@ -29423,65 +20897,35 @@ 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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define NAMED_PIPES_MISSING 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5 +printf %s "checking whether termios.h defines TIOCGWINSZ... " >&6; } +if test ${ac_cv_sys_tiocgwinsz_in_termios_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -29491,28 +20935,26 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then + $EGREP "yes" >/dev/null 2>&1 +then : ac_cv_sys_tiocgwinsz_in_termios_h=yes -else +else $as_nop ac_cv_sys_tiocgwinsz_in_termios_h=no fi -rm -f conftest* +rm -rf 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 +printf %s "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; } +if test ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -29522,172 +20964,125 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then + $EGREP "yes" >/dev/null 2>&1 +then : ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes -else +else $as_nop ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no fi -rm -f conftest* +rm -rf 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5 +printf %s "checking for TIOCSTAT in sys/ioctl.h... " >&6; } +if test ${bash_cv_tiocstat_in_ioctl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include int -main () +main (void) { 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 +if ac_fn_c_try_compile "$LINENO" +then : bash_cv_tiocstat_in_ioctl=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +else $as_nop + bash_cv_tiocstat_in_ioctl=no - bash_cv_tiocstat_in_ioctl=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_tiocstat_in_ioctl" >&5 -$as_echo "$bash_cv_tiocstat_in_ioctl" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5 +printf %s "checking for FIONREAD in sys/ioctl.h... " >&6; } +if test ${bash_cv_fionread_in_ioctl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include int -main () +main (void) { 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 +if ac_fn_c_try_compile "$LINENO" +then : bash_cv_fionread_in_ioctl=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +else $as_nop + bash_cv_fionread_in_ioctl=no - bash_cv_fionread_in_ioctl=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_fionread_in_ioctl" >&5 -$as_echo "$bash_cv_fionread_in_ioctl" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5 +printf %s "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; } +if test ${bash_cv_wcontinued_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include +#include #ifndef errno extern int errno; #endif +int main() { int x; @@ -29700,122 +21095,66 @@ main() } _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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_wcontinued_broken" >&5 -$as_echo "$bash_cv_wcontinued_broken" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5 +printf "%s\n" "$bash_cv_wcontinued_broken" >&6; } if test $bash_cv_wcontinued_broken = yes; then -cat >>confdefs.h <<\_ACEOF -#define WCONTINUED_BROKEN 1 -_ACEOF +printf "%s\n" "#define WCONTINUED_BROKEN 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5 +printf %s "checking for speed_t in sys/types.h... " >&6; } +if test ${bash_cv_speed_t_in_sys_types+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { 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 +if ac_fn_c_try_compile "$LINENO" +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 +else $as_nop + bash_cv_speed_t_in_sys_types=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5 +printf "%s\n" "$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 +printf "%s\n" "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5 +printf %s "checking whether getpw functions are declared in pwd.h... " >&6; } +if test ${bash_cv_getpw_declared+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -29826,49 +21165,48 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getpwuid" >/dev/null 2>&1; then + $EGREP "getpwuid" >/dev/null 2>&1 +then : bash_cv_getpw_declared=yes -else +else $as_nop bash_cv_getpw_declared=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_getpw_declared" >&5 -$as_echo "$bash_cv_getpw_declared" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5 +printf "%s\n" "$bash_cv_getpw_declared" >&6; } if test $bash_cv_getpw_declared = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPW_DECLS 1 -_ACEOF +printf "%s\n" "#define HAVE_GETPW_DECLS 1" >>confdefs.h 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5 +printf %s "checking for unusable real-time signals due to large values... " >&6; } +if test ${bash_cv_unusable_rtsigs+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5 +printf "%s\n" "$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 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include +#include #ifndef NSIG # define NSIG 64 #endif +int main () { int n_sigs = 2 * NSIG; @@ -29880,51 +21218,24 @@ main () 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 +if ac_fn_c_try_run "$LINENO" +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 +else $as_nop + 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 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_unusable_rtsigs" >&5 -$as_echo "$bash_cv_unusable_rtsigs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5 +printf "%s\n" "$bash_cv_unusable_rtsigs" >&6; } if test $bash_cv_unusable_rtsigs = yes; then -cat >>confdefs.h <<\_ACEOF -#define UNUSABLE_RT_SIGNALS 1 -_ACEOF +printf "%s\n" "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h fi @@ -29941,23 +21252,24 @@ 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 +hpux*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5 +printf %s "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; } +if test ${bash_cv_kernel_rlimit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test ${bash_cv_rlimit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main () +main (void) { int f; @@ -29967,34 +21279,19 @@ 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 - bash_cv_kernel_rlimit=no -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_rlimit=yes +else $as_nop + bash_cv_rlimit=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +if test $bash_cv_rlimit = no; then +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -30003,55 +21300,31 @@ cat >>conftest.$ac_ext <<_ACEOF #undef _KERNEL int -main () +main (void) { - int f; - f = RLIMIT_DATA; + 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 +if ac_fn_c_try_compile "$LINENO" +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 +else $as_nop + bash_cv_kernel_rlimit=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5 +printf "%s\n" "$bash_cv_kernel_rlimit" >&6; } if test $bash_cv_kernel_rlimit = yes; then -cat >>confdefs.h <<\_ACEOF -#define RLIMIT_NEEDS_KERNEL 1 -_ACEOF +printf "%s\n" "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h fi ;; @@ -30065,373 +21338,214 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "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 +if test ${bash_cv_termcap_lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" +if test "x$ac_cv_func_tgetent" = xyes +then : + bash_cv_termcap_lib=libc +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 +printf %s "checking for tgetent in -ltermcap... " >&6; } +if test ${ac_cv_lib_termcap_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltermcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define tgetent to an innocuous variant, in case declares tgetent. - For example, HP-UX 11i declares gettimeofday. */ -#define tgetent innocuous_tgetent - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char tgetent (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_termcap_tgetent=yes +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; } +if test "x$ac_cv_lib_termcap_tgetent" = xyes +then : + bash_cv_termcap_lib=libtermcap +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 +printf %s "checking for tgetent in -ltinfo... " >&6; } +if test ${ac_cv_lib_tinfo_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 +LIBS="-ltinfo $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tinfo_tgetent=yes +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; } +if test "x$ac_cv_lib_tinfo_tgetent" = xyes +then : + bash_cv_termcap_lib=libtinfo +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 +printf %s "checking for tgetent in -lcurses... " >&6; } +if test ${ac_cv_lib_curses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_curses_tgetent=yes +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; } +if test "x$ac_cv_lib_curses_tgetent" = xyes +then : + bash_cv_termcap_lib=libcurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 +printf %s "checking for tgetent in -lncurses... " >&6; } +if test ${ac_cv_lib_ncurses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 +LIBS="-lncurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncurses_tgetent=yes +else $as_nop + 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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; } +if test "x$ac_cv_lib_ncurses_tgetent" = xyes +then : + bash_cv_termcap_lib=libncurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 +printf %s "checking for tgetent in -lncursesw... " >&6; } +if test ${ac_cv_lib_ncursesw_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 +LIBS="-lncursesw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { 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 +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncursesw_tgetent=yes +else $as_nop + ac_cv_lib_ncursesw_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 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; } +if test "x$ac_cv_lib_ncursesw_tgetent" = xyes +then : + bash_cv_termcap_lib=libncursesw +else $as_nop bash_cv_termcap_lib=gnutermcap fi @@ -30445,12 +21559,14 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 +printf "%s\n" "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" @@ -30468,7 +21584,8 @@ elif test $bash_cv_termcap_lib = libc; then TERMCAP_LIB= TERMCAP_DEP= else -TERMCAP_LIB=-lcurses +# we assume ncurses is installed somewhere the linker can find it +TERMCAP_LIB=-lncurses TERMCAP_DEP= fi @@ -30476,11 +21593,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5 +printf %s "checking whether /dev/fd is available... " >&6; } +if test ${bash_cv_dev_fd+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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] @@ -30500,36 +21618,27 @@ fi fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_dev_fd" >&5 -$as_echo "$bash_cv_dev_fd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5 +printf "%s\n" "$bash_cv_dev_fd" >&6; } if test $bash_cv_dev_fd = "standard"; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_DEV_FD 1 -_ACEOF + printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define DEV_FD_PREFIX "/dev/fd/" -_ACEOF + printf "%s\n" "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h elif test $bash_cv_dev_fd = "whacky"; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_DEV_FD 1 -_ACEOF + printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define DEV_FD_PREFIX "/proc/self/fd/" -_ACEOF + printf "%s\n" "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5 +printf %s "checking whether /dev/stdin stdout stderr are available... " >&6; } +if test ${bash_cv_dev_stdin+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if (exec test -r /dev/stdin < /dev/null) ; then bash_cv_dev_stdin=present else bash_cv_dev_stdin=absent @@ -30537,20 +21646,19 @@ else fi -{ $as_echo "$as_me:$LINENO: result: $bash_cv_dev_stdin" >&5 -$as_echo "$bash_cv_dev_stdin" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5 +printf "%s\n" "$bash_cv_dev_stdin" >&6; } if test $bash_cv_dev_stdin = "present"; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_DEV_STDIN 1 -_ACEOF + printf "%s\n" "#define HAVE_DEV_STDIN 1" >>confdefs.h 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5 +printf %s "checking for default mail directory... " >&6; } +if test ${bash_cv_mail_dir+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -d /var/mail; then bash_cv_mail_dir=/var/mail elif test -d /var/spool/mail; then @@ -30565,11 +21673,9 @@ else 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5 +printf "%s\n" "$bash_cv_mail_dir" >&6; } +printf "%s\n" "#define DEFAULT_MAIL_DIRECTORY \"$bash_cv_mail_dir\"" >>confdefs.h @@ -30578,9 +21684,7 @@ if test "$bash_cv_job_control_missing" = missing; then fi if test "$opt_job_control" = yes; then -cat >>confdefs.h <<\_ACEOF -#define JOB_CONTROL 1 -_ACEOF +printf "%s\n" "#define JOB_CONTROL 1" >>confdefs.h JOBS_O=jobs.o else @@ -30594,24 +21698,16 @@ LOCAL_DEFS=-DSHELL case "${host_os}" in -sysv4.2*) cat >>confdefs.h <<\_ACEOF -#define SVR4_2 1 -_ACEOF +sysv4.2*) printf "%s\n" "#define SVR4_2 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define SVR4 1 -_ACEOF + printf "%s\n" "#define SVR4 1" >>confdefs.h ;; -sysv4*) cat >>confdefs.h <<\_ACEOF -#define SVR4 1 -_ACEOF +sysv4*) printf "%s\n" "#define SVR4 1" >>confdefs.h ;; -sysv5*) cat >>confdefs.h <<\_ACEOF -#define SVR5 1 -_ACEOF +sysv5*) printf "%s\n" "#define SVR5 1" >>confdefs.h ;; -hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;; -hpux*) LOCAL_CFLAGS=-DHPUX ;; +hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; isc*) LOCAL_CFLAGS=-Disc386 ;; rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; @@ -30628,22 +21724,26 @@ 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 + 1.*|2.[0123]*) : ;; + *) printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h ;; esac ;; -*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; +netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; +freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; +*qnx[67]*) 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" ;; +opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;; +*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; 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 +bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading esac case "${host_os}" in @@ -30653,6 +21753,7 @@ freebsd[3-9]*) fi ;; freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading +midnightbsd*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading esac case "$host_cpu" in @@ -30668,14 +21769,17 @@ m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;; mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;; esac +# turn off paren warnings in gcc +#CFLAGS="$CFLAGS ${STYLE_CFLAGS}" + # # 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5 +printf %s "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}"` @@ -30684,8 +21788,11 @@ $as_echo_n "checking shared object configuration for loadable builtins... " >&6; - { $as_echo "$as_me:$LINENO: result: $SHOBJ_STATUS" >&5 -$as_echo "$SHOBJ_STATUS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5 +printf "%s\n" "$SHOBJ_STATUS" >&6; } +else + SHOBJ_STATUS=unsupported + fi # try to create a directory tree if the source is elsewhere @@ -30725,6 +21832,16 @@ fi +# directory where we install dynamically loadable builtins +if test -z "$loadablesdir"; then + loadablesdir='${libdir}/bash' +fi + +if test -z "$headersdir"; then + headersdir='$(includedir)/$(PACKAGE_NAME)' +fi + + @@ -30746,9 +21863,11 @@ fi #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_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/Makefile.inc examples/loadables/Makefile.sample examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh" + + +ac_config_commands="$ac_config_commands stamp-h" -ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -30777,13 +21896,13 @@ _ACEOF 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;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$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 ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -30791,8 +21910,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (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 \). + # `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" @@ -30808,19 +21927,30 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ 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 + if test "x$cache_file" != "x/dev/null"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -30833,14 +21963,15 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= 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"` + ac_i=`printf "%s\n" "$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' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -30849,13 +21980,14 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -30865,75 +21997,76 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 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. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_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 +as_nop=: +if test ${ZSH_VERSION+y} && (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 ;; +else $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi +# Reset variables that may have inherited troublesome values from +# the environment. -# 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 - +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. 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 +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; 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 || @@ -30941,31 +22074,22 @@ if test "${PATH_SEPARATOR+set}" != set; then } 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= +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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done IFS=$as_save_IFS ;; @@ -30976,25 +22100,95 @@ 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; } + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + 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. +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -31008,13 +22202,17 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=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" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -31029,76 +22227,35 @@ $as_echo X/"$0" | } 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 -} - +# 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 -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; 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 + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -31113,49 +22270,85 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$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 || +printf "%s\n" 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_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' 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 + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -31165,13 +22358,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 +This file was extended by bash $as_me 5.2-release, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -31203,13 +22402,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -31228,22 +22429,26 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config='$ac_cs_config_escaped' 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'`\\" +bash config.status 5.2-release +configured by $0, generated by GNU Autoconf 2.71, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2021 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' +MKDIR_P='$MKDIR_P' test -n "\$AWK" || AWK=awk _ACEOF @@ -31253,11 +22458,16 @@ 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=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -31270,40 +22480,41 @@ do -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 ;; + printf "%s\n" "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + printf "%s\n" "$ac_cs_config"; 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"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append 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"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append 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; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$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; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -31320,9 +22531,9 @@ 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 + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -31336,7 +22547,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -31345,9 +22556,8 @@ 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"' + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" @@ -31361,7 +22571,7 @@ 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" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;; "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;; @@ -31375,12 +22585,14 @@ do "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/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;; + "examples/loadables/Makefile.sample") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.sample" ;; "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; - "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;; + "support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;; + "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;; - *) { { $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; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -31390,9 +22602,9 @@ done # 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 + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -31403,26 +22615,24 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_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" + 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; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -31430,7 +22640,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -31438,7 +22654,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -31447,24 +22663,18 @@ _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 '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +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; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 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; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -31472,7 +22682,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -31486,7 +22696,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -31500,7 +22710,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -31520,7 +22730,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -31552,23 +22762,29 @@ 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; }; } +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -31580,7 +22796,7 @@ fi # test -n "$CONFIG_FILES" # 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 || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -31592,13 +22808,11 @@ _ACEOF # 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 + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; 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; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -31683,9 +22897,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _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; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -31698,9 +22910,7 @@ do 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; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -31719,7 +22929,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_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 `:'. @@ -31728,38 +22938,34 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) 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; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append 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' + printf "%s\n" "$*" | 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$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" | + ac_sed_conf_input=`printf "%s\n" "$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; }; } ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -31769,42 +22975,7 @@ $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" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -31822,20 +22993,15 @@ $as_echo X"$as_dir" | 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; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p 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|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$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|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -31873,13 +23039,17 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + 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 @@ -31889,13 +23059,12 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$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=' @@ -31904,7 +23073,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -31929,29 +23098,27 @@ 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 +s&@MKDIR_P@&$ac_MKDIR_P&;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; }; } +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 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" + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +printf "%s\n" "$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 "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_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; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -31959,39 +23126,33 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} # 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;} + printf "%s\n" "/* $configure_input */" >&1 \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$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; }; } + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 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; }; } + printf "%s\n" "/* $configure_input */" >&1 \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in - "default-1":C) + "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in @@ -32001,7 +23162,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} 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_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. @@ -32011,12 +23172,16 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. 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" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then @@ -32024,27 +23189,33 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} 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_' + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= - GMOFILES= UPDATEPOFILES= DUMMYPOFILES= + GMOFILES= 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" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. @@ -32079,7 +23250,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} 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" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|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 @@ -32092,24 +23263,18 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac done ;; - "default":C) -# Makefile uses this timestamp file to record whether config.h is up to date. -echo timestamp > stamp-h - ;; + "stamp-h":C) echo timestamp > stamp-h ;; esac done # for ac_tag -{ (exit 0); exit 0; } +as_fn_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; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -32130,10 +23295,11 @@ if test "$no_create" != yes; then 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; } + $ac_cs_success || as_fn_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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..52d4029 --- /dev/null +++ b/configure.ac @@ -0,0 +1,1326 @@ +dnl +dnl Configure script for bash-5.2 +dnl +dnl report bugs to chet@po.cwru.edu +dnl +dnl Process this file with autoconf to produce a configure script. + +# Copyright (C) 1987-2022 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 . + +AC_REVISION([for Bash 5.2, version 5.046])dnl + +define(bashvers, 5.2) +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.69) + +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*|releng*|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 +AC_CANONICAL_BUILD + +dnl configure defaults +opt_bash_malloc=yes +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 +# mostly obsolete platforms +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 +*-dgux*) opt_bash_malloc=no ;; # DG/UX machines +sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 +m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir +*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins +*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft +*-beos*) opt_bash_malloc=no ;; # they say it's suitable +# These need additional investigation +sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF +*-aix*) opt_bash_malloc=no ;; # AIX machines +*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment +# These lack a working sbrk(2) +aarch64-freebsd*) opt_bash_malloc=no ;; +riscv*-freebsd*) opt_bash_malloc=no ;; +# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) +*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep +*-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) +*-machten4) opt_bash_malloc=no ;; # MachTen 4.x +# Niche or non-mainstream-shell-user systems +*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x +*-nsk*) opt_bash_malloc=no ;; # HP NonStop +*-haiku*) opt_bash_malloc=no ;; # Haiku OS +*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk +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 +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, AS_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval) +AC_ARG_WITH(bash-malloc, AS_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) +AC_ARG_WITH(gnu-malloc, AS_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(installed-readline, AS_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$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_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 +opt_dircomplete_expand_default=no +opt_globascii_default=yes +opt_function_import=yes +opt_dev_fd_stat_broken=no +opt_alt_array_impl=no +opt_translatable_strings=yes + +dnl modified by alternate array implementation option +ARRAY_O=array.o + +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, AS_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 + opt_translatable_strings=no + opt_globascii_default=yes +fi + +AC_ARG_ENABLE(alias, AS_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval) +AC_ARG_ENABLE(alt-array-implementation, AS_HELP_STRING([--enable-alt-array-implementation], [enable an alternate array implementation that optimizes speed at the cost of space]), opt_alt_array_impl=$enableval) +AC_ARG_ENABLE(arith-for-command, AS_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval) +AC_ARG_ENABLE(array-variables, AS_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval) +AC_ARG_ENABLE(bang-history, AS_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval) +AC_ARG_ENABLE(brace-expansion, AS_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval) +AC_ARG_ENABLE(casemod-attributes, AS_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval) +AC_ARG_ENABLE(casemod-expansions, AS_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval) +AC_ARG_ENABLE(command-timing, AS_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval) +AC_ARG_ENABLE(cond-command, AS_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval) +AC_ARG_ENABLE(cond-regexp, AS_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval) +AC_ARG_ENABLE(coprocesses, AS_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval) +AC_ARG_ENABLE(debugger, AS_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval) +AC_ARG_ENABLE(dev-fd-stat-broken, AS_HELP_STRING([--enable-dev-fd-stat-broken], [enable this option if stat on /dev/fd/N and fstat on file descriptor N don't return the same results]), opt_dev_fd_stat_broken=$enableval) +AC_ARG_ENABLE(direxpand-default, AS_HELP_STRING([--enable-direxpand-default], [enable the direxpand shell option by default]), opt_dircomplete_expand_default=$enableval) +AC_ARG_ENABLE(directory-stack, AS_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval) +AC_ARG_ENABLE(disabled-builtins, AS_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval) +AC_ARG_ENABLE(dparen-arithmetic, AS_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval) +AC_ARG_ENABLE(extended-glob, AS_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval) +AC_ARG_ENABLE(extended-glob-default, AS_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval) +AC_ARG_ENABLE(function-import, AS_HELP_STRING([--enable-function-import], [allow bash to import exported function definitions by default]), opt_function_import=$enableval) +AC_ARG_ENABLE(glob-asciiranges-default, AS_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval) +AC_ARG_ENABLE(help-builtin, AS_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval) +AC_ARG_ENABLE(history, AS_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval) +AC_ARG_ENABLE(job-control, AS_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval) +AC_ARG_ENABLE(multibyte, AS_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) +AC_ARG_ENABLE(net-redirections, AS_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval) +AC_ARG_ENABLE(process-substitution, AS_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval) +AC_ARG_ENABLE(progcomp, AS_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval) +AC_ARG_ENABLE(prompt-string-decoding, AS_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval) +AC_ARG_ENABLE(readline, AS_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval) +AC_ARG_ENABLE(restricted, AS_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval) +AC_ARG_ENABLE(select, AS_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval) +AC_ARG_ENABLE(separate-helpfiles, AS_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval) +AC_ARG_ENABLE(single-help-strings, AS_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, AS_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval) +AC_ARG_ENABLE(translatable-strings, AS_HELP_STRING([--enable-translatable-strings], [include support for $"..." translatable strings]), opt_translatable_strings=$enableval) +AC_ARG_ENABLE(usg-echo-default, AS_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval) +AC_ARG_ENABLE(xpg-echo-default, AS_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, AS_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval) +AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval) +AC_ARG_ENABLE(static-link, AS_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval) + +dnl So-called `precious' variables +AC_ARG_VAR([CC_FOR_BUILD], [C compiler used when compiling binaries used only at build time]) +AC_ARG_VAR([CFLAGS_FOR_BUILD], [Compilation options (CFLAGS) used when compiling binaries used only at build time]) +AC_ARG_VAR([LDFLAGS_FOR_BUILD], [Linker options (LDFLAGS) used when compiling binaries used only at build time]) +AC_ARG_VAR([CPPFLAGS_FOR_BUILD], [C preprocessor options (CPPFLAGS) used when compiling binaries used only at build time]) + +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_dircomplete_expand_default = yes; then +AC_DEFINE(DIRCOMPLETE_EXPAND_DEFAULT) +fi +if test $opt_globascii_default = yes; then +AC_DEFINE(GLOBASCII_DEFAULT, 1) +else +AC_DEFINE(GLOBASCII_DEFAULT, 0) +fi +if test $opt_function_import = yes; then +AC_DEFINE(FUNCTION_IMPORT) +fi +if test $opt_dev_fd_stat_broken = yes; then +AC_DEFINE(DEV_FD_STAT_BROKEN) +fi +if test $opt_alt_array_impl = yes; then +AC_DEFINE(ALT_ARRAY_IMPLEMENTATION) +ARRAY_O=array2.o +fi +if test $opt_translatable_strings = yes; then +AC_DEFINE(TRANSLATABLE_STRINGS) +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= HELPFILES_TARGET= +if test "$opt_separate_help" != no; then + if test "$opt_separate_help" = "yes" ; then + HELPDIR='${datadir}/bash/helpfiles' + else + HELPDIR=$opt_separate_help + fi + HELPDIRDEFINE='-H ${HELPDIR}' + HELPINSTALL='install-help' + HELPFILES_TARGET='helpdoc' +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(MALLOC_TARGET) +AC_SUBST(MALLOC_SRC) + +AC_SUBST(MALLOC_LIB) +AC_SUBST(MALLOC_LIBRARY) +AC_SUBST(MALLOC_LDFLAGS) +AC_SUBST(MALLOC_DEP) + +AC_SUBST(ARRAY_O) + +AC_SUBST(htmldir) + +AC_SUBST(HELPDIR) +AC_SUBST(HELPDIRDEFINE) +AC_SUBST(HELPINSTALL) +AC_SUBST(HELPFILES_TARGET) +AC_SUBST(HELPSTRINGS) + +dnl We want these before the checks, so the checks can modify their values. +if test -z "$CFLAGS"; then + want_auto_cflags=1 +fi + +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 + +if test -n "$want_auto_cflags"; then + AUTO_CFLAGS="-g ${GCC:+-O2}" + AUTO_LDFLAGS="-g ${GCC:+-O2}" +# STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}" + STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}" +else + AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= +fi + +dnl test for Unix variants +AC_USE_SYSTEM_EXTENSIONS +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 + ;; + *-qnx*) + cross_cache=${srcdir}/cross-build/qnx.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) + +dnl END changes for cross-building + +dnl default values +CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} +# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX + +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*|linux*|darwin*) ;; + *) opt_static_link=yes ;; + esac + DEBUG= MALLOC_DEBUG= +fi + +prefer_shared=yes +prefer_static=no + +if test "$opt_static_link" = yes; then + prefer_static=yes + prefer_shared=no + # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 + if test "$GCC" = "yes"; then + STATIC_LD="-static" + case "$host_os" in + solaris2*|linux*) ;; + *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental + esac + fi +fi + +# set the appropriate make variables for building the "build tools" +# modify defaults based on whether or not we are cross compiling, since the +# options for the target host may not be appropriate for the build host +if test "X$cross_compiling" = "Xno"; then + CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' + if test X"$opt_profiling" = Xyes; then + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'} + else + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} + fi + # CFLAGS set above to default value if not passed in environment + if test -n "$want_auto_cflags" ; then + CFLAGS_FOR_BUILD="${CFLAGS}" + BASE_CFLAGS_FOR_BUILD="${CFLAGS}" + else + # passed in environment + CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + BASE_CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + fi + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} +else + CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} + BASE_CFLAGS_FOR_BUILD=${BASE_CFLAGS_FOR_BUILD="-g"} + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""} +fi + +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(STATIC_LD) + +AC_SUBST(CC_FOR_BUILD) +AC_SUBST(CFLAGS_FOR_BUILD) +AC_SUBST(BASE_CFLAGS_FOR_BUILD) +AC_SUBST(STYLE_CFLAGS) +AC_SUBST(CPPFLAGS_FOR_BUILD) +AC_SUBST(LDFLAGS_FOR_BUILD) +AC_SUBST(LIBS_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 + 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_TOOL(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 "$ac_cv_prog_YACC" in +*bison*) ;; +*) AC_MSG_WARN([bison not available; needed to process parse.y]) ;; +esac + +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) + +m4_include([m4/stat-time.m4]) +m4_include([m4/timespec.m4]) + +m4_include([m4/strtoimax.m4]) + +dnl include files for gettext + +m4_include([m4/codeset.m4]) +m4_include([m4/extern-inline.m4]) +m4_include([m4/fcntl-o.m4]) +m4_include([m4/gettext.m4]) +m4_include([m4/glibc2.m4]) +m4_include([m4/glibc21.m4]) +m4_include([m4/host-cpu-c-abi.m4]) +m4_include([m4/iconv.m4]) +m4_include([m4/intdiv0.m4]) +m4_include([m4/intl.m4]) +m4_include([m4/intlmacosx.m4]) +m4_include([m4/intl-thread-locale.m4]) +m4_include([m4/intmax.m4]) +m4_include([m4/inttypes-pri.m4]) +m4_include([m4/inttypes.m4]) +m4_include([m4/inttypes_h.m4]) +m4_include([m4/lcmessage.m4]) +m4_include([m4/lib-ld.m4]) +m4_include([m4/lib-link.m4]) +m4_include([m4/lib-prefix.m4]) +m4_include([m4/lock.m4]) +m4_include([m4/nls.m4]) +m4_include([m4/po.m4]) +m4_include([m4/printf-posix.m4]) +m4_include([m4/progtest.m4]) +m4_include([m4/pthread_rwlock_rdlock.m4]) +m4_include([m4/size_max.m4]) +m4_include([m4/stdint_h.m4]) +m4_include([m4/threadlib.m4]) +m4_include([m4/uintmax_t.m4]) +m4_include([m4/ulonglong.m4]) +m4_include([m4/visibility.m4]) +m4_include([m4/wchar_t.m4]) +m4_include([m4/wint_t.m4]) +m4_include([m4/xsize.m4]) + +dnl C compiler characteristics +AC_C_CONST +AC_C_INLINE +AC_C_BIGENDIAN +AC_C_STRINGIZE +AC_TYPE_LONG_DOUBLE +AC_C_PROTOTYPES +AC_C_CHAR_UNSIGNED +AC_C_VOLATILE +AC_C_RESTRICT + +dnl initialize GNU gettext +BASH_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl]) + +dnl header files +AC_HEADER_DIRENT +AC_HEADER_MAJOR + +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 \ + stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \ + regex.h syslog.h ulimit.h) +AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \ + sys/mman.h sys/param.h sys/random.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 +#endif +]]) + +dnl SunOS 4 needs to include before to compile +dnl autoconf complains about presence but inability to compile +AC_CHECK_HEADER(sys/resource.h, AC_DEFINE(HAVE_SYS_RESOURCE_H), [], [[ +#if HAVE_SYS_TIME_H +# include +#endif +]]) + +dnl special checks for libc functions +AC_FUNC_ALLOCA +AC_FUNC_CHOWN +AC_FUNC_GETPGRP +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 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)) + +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 getentropy getgroups \ + gethostname getpagesize getpeername getrandom getrlimit \ + getrusage gettimeofday kill killpg lstat pselect readlink \ + select setdtablesize setitimer tcgetpgrp uname ulimit waitpid) +AC_REPLACE_FUNCS(rename) + +dnl checks for c library functions +AC_CHECK_FUNCS(bcopy bzero confstr faccessat fnmatch \ + getaddrinfo gethostbyname getservbyname getservent inet_aton \ + imaxdiv memmove pathconf putenv raise random 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_CHECK_FUNCS(mkstemp mkdtemp) +AC_CHECK_FUNCS(arc4random) + +AC_REPLACE_FUNCS(getcwd memset) +AC_REPLACE_FUNCS(strcasecmp strcasestr strerror strftime strnlen strpbrk strstr) +AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoumax) +AC_REPLACE_FUNCS(dprintf) +AC_REPLACE_FUNCS(strchrnul) +AC_REPLACE_FUNCS(strdup) + +AC_CHECK_HEADERS(libaudit.h) +AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) + +AC_CHECK_DECLS([confstr]) +AC_CHECK_DECLS([printf]) +AC_CHECK_DECLS([sbrk]) +AC_CHECK_DECLS([setregid]) +AC_CHECK_DECLS([strcpy]) +AC_CHECK_DECLS([strsignal]) + +AC_CHECK_FUNCS(setresuid setresgid) + +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_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[long double r; char *foo, *bar; r = strtold(foo, &bar);]] + )], + [bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes]) + ] + ) + AC_MSG_RESULT($bash_cv_strtold_broken) + if test "$bash_cv_strtold_broken" = "yes" ; then + AC_DEFINE(STRTOLD_BROKEN) + fi +]) + +AC_CHECK_DECLS(strtol) +AC_CHECK_DECLS(strtoll) +AC_CHECK_DECLS(strtoul) +AC_CHECK_DECLS(strtoull) +AC_CHECK_DECLS(strtoumax) + +AC_FUNC_MKTIME + +dnl +dnl Checks for lib/intl and related code (uses some of the output from +dnl BASH_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 mremap stpcpy strcspn]) + +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 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_TYPE_UINTPTR_T + +AC_CHECK_TYPE(ssize_t, int) +AC_CHECK_TYPE(time_t, long) + +AC_TYPE_LONG_LONG_INT +AC_TYPE_UNSIGNED_LONG_LONG_INT + +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(size_t, 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_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_CHECK_TYPE(clock_t, [#include ], long) +BASH_CHECK_TYPE(sigset_t, [#include ], int) +if test "$ac_cv_header_sys_socket_h" = "yes"; then +BASH_CHECK_TYPE(socklen_t, [#include ], [unsigned int], HAVE_SOCKLEN_T) +fi + +AC_CHECK_TYPE(quad_t, AC_DEFINE([HAVE_QUAD_T], [1]), [], ) +BASH_TYPE_RLIMIT + +AC_TYPE_INTMAX_T +AC_TYPE_UINTMAX_T + +AC_CHECK_SIZEOF(intmax_t, 8) + +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 + +BASH_STRUCT_WEXITSTATUS_OFFSET + +BASH_CHECK_TYPE_STRUCT_TIMESPEC +BASH_STAT_TIME + +dnl checks for system calls +BASH_FUNC_SBRK + +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 + +BASH_FUNC_STRTOIMAX + +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 + +BASH_FUNC_FNMATCH_EQUIV_FALLBACK + +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 most of these are really old; 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 -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +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 + 1.*|2.[[0123]]*) : ;; + *) AC_DEFINE(PGRP_PIPE) ;; + esac ;; +netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; +freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; +*qnx[[67]]*) 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 -DRECYCLES_PIDS" ;; +*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; +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 +bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading +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 +midnightbsd*) 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 + +# turn off paren warnings in gcc +#CFLAGS="$CFLAGS ${STYLE_CFLAGS}" + +# +# 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) +else + SHOBJ_STATUS=unsupported + AC_SUBST(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) + +# directory where we install dynamically loadable builtins +if test -z "$loadablesdir"; then + loadablesdir='${libdir}/bash' +fi +AC_SUBST(loadablesdir) +if test -z "$headersdir"; then + headersdir='$(includedir)/$(PACKAGE_NAME)' +fi +AC_SUBST(headersdir) + +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_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/Makefile.inc \ + examples/loadables/Makefile.sample \ + examples/loadables/perl/Makefile \ + support/bash.pc support/bashbug.sh]) + +dnl Makefile uses this timestamp file to record whether config.h is up to date. +AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > stamp-h]) + +AC_OUTPUT diff --git a/configure.in b/configure.ac.orig similarity index 68% rename from configure.in rename to configure.ac.orig index 843bd70..50a6e20 100644 --- a/configure.in +++ b/configure.ac.orig @@ -1,11 +1,11 @@ dnl -dnl Configure script for bash-4.1 +dnl Configure script for bash-5.2 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. +# Copyright (C) 1987-2022 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify @@ -21,15 +21,15 @@ dnl Process this file with autoconf to produce a configure script. # You should have received a copy of the GNU General Public License # along with this program. If not, see . -AC_REVISION([for Bash 4.1, version 4.019])dnl +AC_REVISION([for Bash 5.2, version 5.046])dnl -define(bashvers, 4.1) +define(bashvers, 5.2) 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_PREREQ(2.69) AC_CONFIG_SRCDIR(shell.h) dnl where to find install.sh, config.sub, and config.guess @@ -42,18 +42,17 @@ RELSTATUS=relstatus dnl defaults for debug settings case "$RELSTATUS" in -alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;; +alp*|bet*|dev*|rc*|releng*|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 +AC_CANONICAL_BUILD dnl configure defaults opt_bash_malloc=yes -opt_purify=no -opt_purecov=no opt_afs=no opt_curses=no opt_with_installed_readline=no @@ -64,29 +63,35 @@ 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 +# mostly obsolete platforms 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 +*-dgux*) opt_bash_malloc=no ;; # DG/UX 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 +*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins +*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft +*-beos*) opt_bash_malloc=no ;; # they say it's suitable +# These need additional investigation 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 +*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment +# These lack a working sbrk(2) +aarch64-freebsd*) opt_bash_malloc=no ;; +riscv*-freebsd*) opt_bash_malloc=no ;; +# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep *-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 +# Niche or non-mainstream-shell-user systems +*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x +*-nsk*) opt_bash_malloc=no ;; # HP NonStop +*-haiku*) opt_bash_malloc=no ;; # Haiku OS +*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk esac # memory scrambling on free() @@ -98,18 +103,16 @@ esac dnl dnl macros for the bash debugger dnl -AM_PATH_LISPDIR +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) +AC_ARG_WITH(afs, AS_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval) +AC_ARG_WITH(bash-malloc, AS_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) +AC_ARG_WITH(gnu-malloc, AS_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(installed-readline, AS_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval) if test "$opt_bash_malloc" = yes; then MALLOC_TARGET=malloc @@ -128,17 +131,6 @@ else 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 @@ -186,13 +178,22 @@ opt_single_longdoc_strings=yes opt_casemod_attrs=yes opt_casemod_expansions=yes opt_extglob_default=no +opt_dircomplete_expand_default=no +opt_globascii_default=yes +opt_function_import=yes +opt_dev_fd_stat_broken=no +opt_alt_array_impl=no +opt_translatable_strings=yes + +dnl modified by alternate array implementation option +ARRAY_O=array.o 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) +AC_ARG_ENABLE(minimal-config, AS_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 @@ -206,46 +207,60 @@ if test $opt_minimal_config = yes; then 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) + opt_translatable_strings=no + opt_globascii_default=yes +fi + +AC_ARG_ENABLE(alias, AS_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval) +AC_ARG_ENABLE(alt-array-implementation, AS_HELP_STRING([--enable-alt-array-implementation], [enable an alternate array implementation that optimizes speed at the cost of space]), opt_alt_array_impl=$enableval) +AC_ARG_ENABLE(arith-for-command, AS_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval) +AC_ARG_ENABLE(array-variables, AS_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval) +AC_ARG_ENABLE(bang-history, AS_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval) +AC_ARG_ENABLE(brace-expansion, AS_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval) +AC_ARG_ENABLE(casemod-attributes, AS_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval) +AC_ARG_ENABLE(casemod-expansions, AS_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval) +AC_ARG_ENABLE(command-timing, AS_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval) +AC_ARG_ENABLE(cond-command, AS_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval) +AC_ARG_ENABLE(cond-regexp, AS_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval) +AC_ARG_ENABLE(coprocesses, AS_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval) +AC_ARG_ENABLE(debugger, AS_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval) +AC_ARG_ENABLE(dev-fd-stat-broken, AS_HELP_STRING([--enable-dev-fd-stat-broken], [enable this option if stat on /dev/fd/N and fstat on file descriptor N don't return the same results]), opt_dev_fd_stat_broken=$enableval) +AC_ARG_ENABLE(direxpand-default, AS_HELP_STRING([--enable-direxpand-default], [enable the direxpand shell option by default]), opt_dircomplete_expand_default=$enableval) +AC_ARG_ENABLE(directory-stack, AS_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval) +AC_ARG_ENABLE(disabled-builtins, AS_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval) +AC_ARG_ENABLE(dparen-arithmetic, AS_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval) +AC_ARG_ENABLE(extended-glob, AS_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval) +AC_ARG_ENABLE(extended-glob-default, AS_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval) +AC_ARG_ENABLE(function-import, AS_HELP_STRING([--enable-function-import], [allow bash to import exported function definitions by default]), opt_function_import=$enableval) +AC_ARG_ENABLE(glob-asciiranges-default, AS_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval) +AC_ARG_ENABLE(help-builtin, AS_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval) +AC_ARG_ENABLE(history, AS_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval) +AC_ARG_ENABLE(job-control, AS_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval) +AC_ARG_ENABLE(multibyte, AS_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) +AC_ARG_ENABLE(net-redirections, AS_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval) +AC_ARG_ENABLE(process-substitution, AS_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval) +AC_ARG_ENABLE(progcomp, AS_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval) +AC_ARG_ENABLE(prompt-string-decoding, AS_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval) +AC_ARG_ENABLE(readline, AS_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval) +AC_ARG_ENABLE(restricted, AS_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval) +AC_ARG_ENABLE(select, AS_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval) +AC_ARG_ENABLE(separate-helpfiles, AS_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval) +AC_ARG_ENABLE(single-help-strings, AS_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, AS_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval) +AC_ARG_ENABLE(translatable-strings, AS_HELP_STRING([--enable-translatable-strings], [include support for $"..." translatable strings]), opt_translatable_strings=$enableval) +AC_ARG_ENABLE(usg-echo-default, AS_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval) +AC_ARG_ENABLE(xpg-echo-default, AS_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) +AC_ARG_ENABLE(mem-scramble, AS_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval) +AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval) +AC_ARG_ENABLE(static-link, AS_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval) + +dnl So-called `precious' variables +AC_ARG_VAR([CC_FOR_BUILD], [C compiler used when compiling binaries used only at build time]) +AC_ARG_VAR([CFLAGS_FOR_BUILD], [Compilation options (CFLAGS) used when compiling binaries used only at build time]) +AC_ARG_VAR([LDFLAGS_FOR_BUILD], [Linker options (LDFLAGS) used when compiling binaries used only at build time]) +AC_ARG_VAR([CPPFLAGS_FOR_BUILD], [C preprocessor options (CPPFLAGS) used when compiling binaries used only at build time]) dnl opt_job_control is handled later, after BASH_JOB_CONTROL_MISSING runs @@ -333,6 +348,27 @@ fi if test $opt_casemod_expansions = yes; then AC_DEFINE(CASEMOD_EXPANSIONS) fi +if test $opt_dircomplete_expand_default = yes; then +AC_DEFINE(DIRCOMPLETE_EXPAND_DEFAULT) +fi +if test $opt_globascii_default = yes; then +AC_DEFINE(GLOBASCII_DEFAULT, 1) +else +AC_DEFINE(GLOBASCII_DEFAULT, 0) +fi +if test $opt_function_import = yes; then +AC_DEFINE(FUNCTION_IMPORT) +fi +if test $opt_dev_fd_stat_broken = yes; then +AC_DEFINE(DEV_FD_STAT_BROKEN) +fi +if test $opt_alt_array_impl = yes; then +AC_DEFINE(ALT_ARRAY_IMPLEMENTATION) +ARRAY_O=array2.o +fi +if test $opt_translatable_strings = yes; then +AC_DEFINE(TRANSLATABLE_STRINGS) +fi if test $opt_memscramble = yes; then AC_DEFINE(MEMSCRAMBLE) @@ -344,15 +380,16 @@ else TESTSCRIPT=run-all fi -HELPDIR= HELPDIRDEFINE= HELPINSTALL= +HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET= if test "$opt_separate_help" != no; then if test "$opt_separate_help" = "yes" ; then - HELPDIR='${datadir}/bash' + HELPDIR='${datadir}/bash/helpfiles' else HELPDIR=$opt_separate_help fi HELPDIRDEFINE='-H ${HELPDIR}' HELPINSTALL='install-help' + HELPFILES_TARGET='helpdoc' fi HELPSTRINGS= if test "$opt_single_longdoc_strings" != "yes"; then @@ -361,7 +398,6 @@ fi dnl now substitute in the values generated by arguments AC_SUBST(TESTSCRIPT) -AC_SUBST(PURIFY) AC_SUBST(MALLOC_TARGET) AC_SUBST(MALLOC_SRC) @@ -370,13 +406,21 @@ AC_SUBST(MALLOC_LIBRARY) AC_SUBST(MALLOC_LDFLAGS) AC_SUBST(MALLOC_DEP) +AC_SUBST(ARRAY_O) + AC_SUBST(htmldir) AC_SUBST(HELPDIR) AC_SUBST(HELPDIRDEFINE) AC_SUBST(HELPINSTALL) +AC_SUBST(HELPFILES_TARGET) AC_SUBST(HELPSTRINGS) +dnl We want these before the checks, so the checks can modify their values. +if test -z "$CFLAGS"; then + want_auto_cflags=1 +fi + echo "" echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}" echo "" @@ -386,10 +430,17 @@ 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 +if test -n "$want_auto_cflags"; then + AUTO_CFLAGS="-g ${GCC:+-O2}" + AUTO_LDFLAGS="-g ${GCC:+-O2}" +# STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}" + STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}" +else + AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= +fi +dnl test for Unix variants +AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE dnl BEGIN changes for cross-building (currently cygwin, minGW, and @@ -417,6 +468,9 @@ if test "x$cross_compiling" = "xyes"; then i[[3456]]86-*-beos*) cross_cache=${srcdir}/cross-build/x86-beos.cache ;; + *-qnx*) + cross_cache=${srcdir}/cross-build/qnx.cache + ;; *) echo "configure: cross-compiling for $host is not supported" >&2 ;; esac @@ -432,63 +486,81 @@ 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 default values +CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} +# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX 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*) ;; + solaris2*|linux*|darwin*) ;; *) opt_static_link=yes ;; esac DEBUG= MALLOC_DEBUG= fi +prefer_shared=yes +prefer_static=no + if test "$opt_static_link" = yes; then + prefer_static=yes + prefer_shared=no # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 - if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then + if test "$GCC" = "yes"; then STATIC_LD="-static" case "$host_os" in - solaris2*) ;; + solaris2*|linux*) ;; *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental esac fi fi +# set the appropriate make variables for building the "build tools" +# modify defaults based on whether or not we are cross compiling, since the +# options for the target host may not be appropriate for the build host if test "X$cross_compiling" = "Xno"; then - CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} - LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} + CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' + if test X"$opt_profiling" = Xyes; then + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'} + else + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} + fi + # CFLAGS set above to default value if not passed in environment + if test -n "$want_auto_cflags" ; then + CFLAGS_FOR_BUILD="${CFLAGS}" + BASE_CFLAGS_FOR_BUILD="${CFLAGS}" + else + # passed in environment + CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + BASE_CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + fi + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} else + CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} + BASE_CFLAGS_FOR_BUILD=${BASE_CFLAGS_FOR_BUILD="-g"} + LIBS_FOR_BUILD=${LIBS_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(CC_FOR_BUILD) AC_SUBST(CFLAGS_FOR_BUILD) +AC_SUBST(BASE_CFLAGS_FOR_BUILD) +AC_SUBST(STYLE_CFLAGS) AC_SUBST(CPPFLAGS_FOR_BUILD) AC_SUBST(LDFLAGS_FOR_BUILD) +AC_SUBST(LIBS_FOR_BUILD) AC_PROG_GCC_TRADITIONAL @@ -505,7 +577,7 @@ then RL_LIB_READLINE_VERSION case "$ac_cv_rl_version" in - 5*|6*|7*|8*|9*) ;; + 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]) @@ -597,7 +669,7 @@ 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) +AC_CHECK_TOOL(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" @@ -605,6 +677,11 @@ AC_PROG_RANLIB AC_PROG_YACC AC_PROG_MAKE_SET +case "$ac_cv_prog_YACC" in +*bison*) ;; +*) AC_MSG_WARN([bison not available; needed to process parse.y]) ;; +esac + case "$host_os" in opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; *) MAKE_SHELL=/bin/sh ;; @@ -633,35 +710,75 @@ if test x$SIZE = x; then fi AC_SUBST(SIZE) -dnl Turn on any extensions available in the GNU C library. -AC_DEFINE(_GNU_SOURCE, 1) +m4_include([m4/stat-time.m4]) +m4_include([m4/timespec.m4]) + +m4_include([m4/strtoimax.m4]) + +dnl include files for gettext + +m4_include([m4/codeset.m4]) +m4_include([m4/extern-inline.m4]) +m4_include([m4/fcntl-o.m4]) +m4_include([m4/gettext.m4]) +m4_include([m4/glibc2.m4]) +m4_include([m4/glibc21.m4]) +m4_include([m4/host-cpu-c-abi.m4]) +m4_include([m4/iconv.m4]) +m4_include([m4/intdiv0.m4]) +m4_include([m4/intl.m4]) +m4_include([m4/intlmacosx.m4]) +m4_include([m4/intl-thread-locale.m4]) +m4_include([m4/intmax.m4]) +m4_include([m4/inttypes-pri.m4]) +m4_include([m4/inttypes.m4]) +m4_include([m4/inttypes_h.m4]) +m4_include([m4/lcmessage.m4]) +m4_include([m4/lib-ld.m4]) +m4_include([m4/lib-link.m4]) +m4_include([m4/lib-prefix.m4]) +m4_include([m4/lock.m4]) +m4_include([m4/nls.m4]) +m4_include([m4/po.m4]) +m4_include([m4/printf-posix.m4]) +m4_include([m4/progtest.m4]) +m4_include([m4/pthread_rwlock_rdlock.m4]) +m4_include([m4/size_max.m4]) +m4_include([m4/stdint_h.m4]) +m4_include([m4/threadlib.m4]) +m4_include([m4/uintmax_t.m4]) +m4_include([m4/ulonglong.m4]) +m4_include([m4/visibility.m4]) +m4_include([m4/wchar_t.m4]) +m4_include([m4/wint_t.m4]) +m4_include([m4/xsize.m4]) dnl C compiler characteristics AC_C_CONST AC_C_INLINE AC_C_BIGENDIAN AC_C_STRINGIZE -AC_C_LONG_DOUBLE +AC_TYPE_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]) +BASH_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl]) dnl header files AC_HEADER_DIRENT -AC_HEADER_TIME +AC_HEADER_MAJOR 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 \ + stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \ + regex.h syslog.h ulimit.h) +AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \ + sys/mman.h sys/param.h sys/random.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) @@ -673,10 +790,18 @@ AC_CHECK_HEADER(sys/ptem.h, , ,[[ #endif ]]) +dnl SunOS 4 needs to include before to compile +dnl autoconf complains about presence but inability to compile +AC_CHECK_HEADER(sys/resource.h, AC_DEFINE(HAVE_SYS_RESOURCE_H), [], [[ +#if HAVE_SYS_TIME_H +# include +#endif +]]) + dnl special checks for libc functions AC_FUNC_ALLOCA +AC_FUNC_CHOWN AC_FUNC_GETPGRP -AC_FUNC_SETVBUF_REVERSED AC_FUNC_VPRINTF AC_FUNC_STRCOLL @@ -707,39 +832,42 @@ 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)) +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_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getentropy getgroups \ + gethostname getpagesize getpeername getrandom getrlimit \ + getrusage gettimeofday kill killpg lstat pselect readlink \ + select setdtablesize setitimer tcgetpgrp uname ulimit waitpid) AC_REPLACE_FUNCS(rename) dnl checks for c library functions -AC_CHECK_FUNCS(bcopy bzero confstr fnmatch \ +AC_CHECK_FUNCS(bcopy bzero confstr faccessat fnmatch \ getaddrinfo gethostbyname getservbyname getservent inet_aton \ - memmove pathconf putenv raise regcomp regexec \ + imaxdiv memmove pathconf putenv raise random 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_CHECK_FUNCS(mkstemp mkdtemp) +AC_CHECK_FUNCS(arc4random) + 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_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoumax) +AC_REPLACE_FUNCS(dprintf) +AC_REPLACE_FUNCS(strchrnul) +AC_REPLACE_FUNCS(strdup) + +AC_CHECK_HEADERS(libaudit.h) +AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) AC_CHECK_DECLS([confstr]) AC_CHECK_DECLS([printf]) @@ -748,36 +876,37 @@ AC_CHECK_DECLS([setregid]) AC_CHECK_DECLS([strcpy]) AC_CHECK_DECLS([strsignal]) +AC_CHECK_FUNCS(setresuid setresgid) + 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 ], - [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_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[long double r; char *foo, bar; r = strtold(foo, &bar);]] + )], + [bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes]) + ] ) 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_CHECK_DECLS(strtol) +AC_CHECK_DECLS(strtoll) +AC_CHECK_DECLS(strtoul) +AC_CHECK_DECLS(strtoull) +AC_CHECK_DECLS(strtoumax) AC_FUNC_MKTIME dnl dnl Checks for lib/intl and related code (uses some of the output from -dnl AM_GNU_GETTEXT) +dnl BASH_GNU_GETTEXT) dnl AC_CHECK_HEADERS([argz.h errno.h fcntl.h malloc.h stdio_ext.h]) @@ -785,7 +914,7 @@ 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]) + munmap mremap stpcpy strcspn]) INTL_DEP= INTL_INC= LIBINTL_H= if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then @@ -809,9 +938,6 @@ 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 @@ -839,13 +965,14 @@ AC_TYPE_MODE_T AC_TYPE_UID_T AC_TYPE_PID_T AC_TYPE_SIZE_T +AC_TYPE_UINTPTR_T + AC_CHECK_TYPE(ssize_t, int) AC_CHECK_TYPE(time_t, long) -BASH_TYPE_LONG_LONG -BASH_TYPE_UNSIGNED_LONG_LONG +AC_TYPE_LONG_LONG_INT +AC_TYPE_UNSIGNED_LONG_LONG_INT -AC_TYPE_SIGNAL BASH_TYPE_SIG_ATOMIC_T AC_CHECK_SIZEOF(char, 1) @@ -853,6 +980,7 @@ AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(char *, 4) +AC_CHECK_SIZEOF(size_t, 4) AC_CHECK_SIZEOF(double, 8) AC_CHECK_SIZEOF([long long], 8) @@ -882,7 +1010,6 @@ 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 @@ -893,17 +1020,20 @@ BASH_SYS_SIGLIST BASH_UNDER_SYS_SIGLIST dnl various system types -BASH_TYPE_SIGHANDLER BASH_CHECK_TYPE(clock_t, [#include ], long) BASH_CHECK_TYPE(sigset_t, [#include ], 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 ], int, HAVE_SOCKLEN_T) +BASH_CHECK_TYPE(socklen_t, [#include ], [unsigned int], HAVE_SOCKLEN_T) fi + +AC_CHECK_TYPE(quad_t, AC_DEFINE([HAVE_QUAD_T], [1]), [], ) BASH_TYPE_RLIMIT +AC_TYPE_INTMAX_T +AC_TYPE_UINTMAX_T + +AC_CHECK_SIZEOF(intmax_t, 8) + dnl presence and contents of structures used by system calls BASH_STRUCT_TERMIOS_LDISC BASH_STRUCT_TERMIO_LDISC @@ -917,6 +1047,14 @@ AC_STRUCT_TM AC_STRUCT_TIMEZONE BASH_STRUCT_TIMEZONE +BASH_STRUCT_WEXITSTATUS_OFFSET + +BASH_CHECK_TYPE_STRUCT_TIMESPEC +BASH_STAT_TIME + +dnl checks for system calls +BASH_FUNC_SBRK + dnl presence and behavior of C library functions BASH_FUNC_STRSIGNAL BASH_FUNC_OPENDIR_CHECK @@ -931,6 +1069,8 @@ BASH_FUNC_STRCOLL BASH_FUNC_SNPRINTF BASH_FUNC_VSNPRINTF +BASH_FUNC_STRTOIMAX + 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 @@ -947,6 +1087,8 @@ fi BASH_FUNC_PRINTF_A_FORMAT +BASH_FUNC_FNMATCH_EQUIV_FALLBACK + dnl presence and behavior of OS functions BASH_SYS_REINSTALL_SIGHANDLERS BASH_SYS_JOB_CONTROL_MISSING @@ -1005,15 +1147,15 @@ 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 +dnl most of these are really old; 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 ;; +hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; isc*) LOCAL_CFLAGS=-Disc386 ;; rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; @@ -1030,13 +1172,17 @@ 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) ;; + 1.*|2.[[0123]]*) : ;; + *) AC_DEFINE(PGRP_PIPE) ;; esac ;; -*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; +netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; +freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; +*qnx[[67]]*) 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" ;; +opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;; +*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; esac dnl Stanza for OS/compiler pair-specific flags @@ -1044,6 +1190,8 @@ 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 +bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading esac dnl FreeBSD-3.x can have either a.out or ELF @@ -1054,6 +1202,7 @@ freebsd[[3-9]]*) fi ;; freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading +midnightbsd*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading esac case "$host_cpu" in @@ -1069,6 +1218,9 @@ m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;; mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;; esac +# turn off paren warnings in gcc +#CFLAGS="$CFLAGS ${STYLE_CFLAGS}" + # # Shared object configuration section. These values are generated by # ${srcdir}/support/shobj-conf @@ -1085,6 +1237,9 @@ then AC_SUBST(SHOBJ_LIBS) AC_SUBST(SHOBJ_STATUS) AC_MSG_RESULT($SHOBJ_STATUS) +else + SHOBJ_STATUS=unsupported + AC_SUBST(SHOBJ_STATUS) fi # try to create a directory tree if the source is elsewhere @@ -1124,6 +1279,16 @@ AC_SUBST(BUILD_DIR) AC_SUBST(datarootdir) AC_SUBST(localedir) +# directory where we install dynamically loadable builtins +if test -z "$loadablesdir"; then + loadablesdir='${libdir}/bash' +fi +AC_SUBST(loadablesdir) +if test -z "$headersdir"; then + headersdir='$(includedir)/$(PACKAGE_NAME)' +fi +AC_SUBST(headersdir) + AC_SUBST(YACC) AC_SUBST(AR) AC_SUBST(ARFLAGS) @@ -1145,12 +1310,17 @@ 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 -]) +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/Makefile.inc \ + examples/loadables/Makefile.sample \ + examples/loadables/perl/Makefile \ + support/bash.pc support/bashbug.sh]) + +dnl Makefile uses this timestamp file to record whether config.h is up to date. +AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > stamp-h]) + +AC_OUTPUT diff --git a/configure.orig b/configure.orig new file mode 100755 index 0000000..07d7c2f --- /dev/null +++ b/configure.orig @@ -0,0 +1,23305 @@ +#! /bin/sh +# From configure.ac for Bash 5.2, version 5.046. +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.71 for bash 5.2-release. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 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 +as_nop=: +if test ${ZSH_VERSION+y} && (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 $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; 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 + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (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 \$as_nop + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : + +else \$as_nop + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : + as_have_required=yes +else $as_nop + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : + +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$as_shell as_have_required=yes + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : + break 2 +fi +fi + done;; + esac + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi + + + if test "x$CONFIG_SHELL" != x +then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + else + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$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 || +printf "%s\n" 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_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# 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_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # 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" || + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # 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 +} + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +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='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# 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'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/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= + +# Identity of this package. +PACKAGE_NAME='bash' +PACKAGE_TARNAME='bash' +PACKAGE_VERSION='5.2-release' +PACKAGE_STRING='bash 5.2-release' +PACKAGE_BUGREPORT='bug-bash@gnu.org' +PACKAGE_URL='' + +ac_unique_file="shell.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_STDIO_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +#ifdef HAVE_STRING_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_header_c_list= +gt_needs= +ac_func_c_list= +gl_use_threads_default= +ac_subst_vars='LTLIBOBJS +LOCAL_DEFS +LOCAL_LDFLAGS +LOCAL_CFLAGS +LOCAL_LIBS +MALLOC_DEBUG +DEBUG +RELSTATUS +BASHVERS +headersdir +loadablesdir +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 +PTHREAD_H_DEFINES_STRUCT_TIMESPEC +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC +TIME_H_DEFINES_STRUCT_TIMESPEC +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 +WINDRES +WOE32 +WOE32DLL +HAVE_NAMELESS_LOCALES +HAVE_WPRINTF +HAVE_NEWLOCALE +HAVE_SNPRINTF +HAVE_ASPRINTF +HAVE_POSIX_PRINTF +INTL_DEFAULT_VERBOSITY +ARFLAGS +INTL_MACOSX_LIBS +GLIBC21 +GNULIB_OVERRIDES_WINT_T +INTLBISON +LTLIBICONV +LIBICONV +LTLIBMULTITHREAD +LIBMULTITHREAD +LTLIBTHREAD +LIBTHREAD +LIBPTH_PREFIX +LTLIBPTH +LIBPTH +PRI_MACROS_BROKEN +ALLOCA +HAVE_VISIBILITY +CFLAG_VISIBILITY +GLIBC2 +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS +SED +MKDIR_P +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 +EGREP +GREP +CPP +LIBS_FOR_BUILD +STYLE_CFLAGS +BASE_CFLAGS_FOR_BUILD +STATIC_LD +SIGNAMES_O +SIGNAMES_H +CROSS_COMPILE +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +HELPSTRINGS +HELPFILES_TARGET +HELPINSTALL +HELPDIRDEFINE +HELPDIR +ARRAY_O +MALLOC_DEP +MALLOC_LDFLAGS +MALLOC_LIBRARY +MALLOC_LIB +MALLOC_SRC +MALLOC_TARGET +TESTSCRIPT +CPPFLAGS_FOR_BUILD +LDFLAGS_FOR_BUILD +CFLAGS_FOR_BUILD +CC_FOR_BUILD +DEBUGGER_START_FILE +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 +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_afs +with_bash_malloc +with_curses +with_gnu_malloc +with_installed_readline +enable_minimal_config +enable_alias +enable_alt_array_implementation +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_dev_fd_stat_broken +enable_direxpand_default +enable_directory_stack +enable_disabled_builtins +enable_dparen_arithmetic +enable_extended_glob +enable_extended_glob_default +enable_function_import +enable_glob_asciiranges_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_translatable_strings +enable_usg_echo_default +enable_xpg_echo_default +enable_mem_scramble +enable_profiling +enable_static_link +enable_largefile +enable_nls +enable_threads +with_gnu_ld +enable_rpath +with_libpth_prefix +with_libiconv_prefix +with_included_gettext +with_libintl_prefix +' + ac_precious_vars='build_alias +host_alias +target_alias +DEBUGGER_START_FILE +CC_FOR_BUILD +CFLAGS_FOR_BUILD +LDFLAGS_FOR_BUILD +CPPFLAGS_FOR_BUILD +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' +runstatedir='${localstatedir}/run' +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= ;; + *) ac_optarg=yes ;; + esac + + 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_fn_error $? "invalid feature name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$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_fn_error $? "invalid feature name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$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 ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -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_fn_error $? "invalid package name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$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_fn_error $? "invalid package name: \`$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$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_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + printf "%s\n" "$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_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) printf "%s\n" "$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 runstatedir +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_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +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 + 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_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# 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 || +printf "%s\n" 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_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + 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 5.2-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] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --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 5.2-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-alt-array-implementation + enable an alternate array implementation that + optimizes speed at the cost of space + --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-dev-fd-stat-broken + enable this option if stat on /dev/fd/N and fstat on + file descriptor N don't return the same results + --enable-direxpand-default + enable the direxpand shell option by default + --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-function-import + allow bash to import exported function definitions + by default + --enable-glob-asciiranges-default + force bracket range expressions in pattern matching + to use the C locale 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-translatable-strings + include support for $"..." translatable strings + --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 + --enable-threads={posix|solaris|pth|windows} + specify multithreading API + --disable-threads build without multithread safety + --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-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-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib + --without-libpth-prefix don't search for libpth in includedir and libdir + --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_FOR_BUILD + C compiler used when compiling binaries used only at build time + CFLAGS_FOR_BUILD + Compilation options (CFLAGS) used when compiling binaries used + only at build time + LDFLAGS_FOR_BUILD + Linker options (LDFLAGS) used when compiling binaries used only + at build time + CPPFLAGS_FOR_BUILD + C preprocessor options (CPPFLAGS) used when compiling binaries + used only at build time + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + YACC The `Yet Another Compiler 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 . +_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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$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 configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. + 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 + printf "%s\n" "$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 5.2-release +generated by GNU Autoconf 2.71 + +Copyright (C) 2021 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 + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam + 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. */ + +#include +#undef $2 + +/* 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 $2 (); +/* 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_$2 || defined __stub___$2 +choke me +#endif + +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=$ac_mid; break +else $as_nop + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_lo=$ac_mid; break +else $as_nop + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else $as_nop + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_hi=$ac_mid +else $as_nop + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } +#include +#include +int +main (void) +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + 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 +if ac_fn_c_try_run "$LINENO" +then : + echo >>conftest.val; read $3 &5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$4 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + +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 5.2-release, which was +generated by GNU Autoconf 2.71. Invocation command line was + + $ $0$ac_configure_args_raw + +_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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "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=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append 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 + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset 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=$? + # Sanitize IFS. + IFS=" "" $as_nl" + # Save into config.log some information that might help in debugging. + { + echo + + printf "%s\n" "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + 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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$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= ;; #( + *) { eval $ac_var=; 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 + + printf "%s\n" "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + printf "%s\n" "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + printf "%s\n" "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$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'; as_fn_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 + +printf "%s\n" "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + ac_site_files="$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" +else + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +fi + +for ac_site_file in $ac_site_files +do + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + 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. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*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 do not provoke an error unfortunately, instead are silently treated + as an "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 is necessary to write \x00 == 0 to get something + that is 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 **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" +gt_needs="$gt_needs need-ngettext" +as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H" +as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE" +as_fn_append ac_func_c_list " symlink HAVE_SYMLINK" +as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE" +as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H" +as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF" +as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" +as_fn_append ac_func_c_list " alarm HAVE_ALARM" +as_fn_append ac_func_c_list " fpurge HAVE_FPURGE" +as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE" +as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF" +as_fn_append ac_func_c_list " vsnprintf HAVE_VSNPRINTF" + +# Auxiliary files required by this configure script. +ac_aux_files="config.rpath install-sh config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/./support" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +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. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + +# 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,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$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=`printf "%s\n" "$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. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +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_config_headers="$ac_config_headers config.h" + + +BASHVERS=5.2 +RELSTATUS=release + +case "$RELSTATUS" in +alp*|bet*|dev*|rc*|releng*|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_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +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_afs=no +opt_curses=no +opt_with_installed_readline=no + +#htmldir= + +case "${host_cpu}-${host_os}" in +# mostly obsolete platforms +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 +*-dgux*) opt_bash_malloc=no ;; # DG/UX machines +sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 +m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir +*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins +*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft +*-beos*) opt_bash_malloc=no ;; # they say it's suitable +# These need additional investigation +sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF +*-aix*) opt_bash_malloc=no ;; # AIX machines +*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment +# These lack a working sbrk(2) +aarch64-freebsd*) opt_bash_malloc=no ;; +riscv*-freebsd*) opt_bash_malloc=no ;; +# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) +*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep +*-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) +*-machten4) opt_bash_malloc=no ;; # MachTen 4.x +# Niche or non-mainstream-shell-user systems +*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x +*-nsk*) opt_bash_malloc=no ;; # HP NonStop +*-haiku*) opt_bash_malloc=no ;; # Haiku OS +*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk +esac + +# memory scrambling on free() +case "${host_os}" in +sco3.2v5*|sco3.2v4*) opt_memscramble=no ;; +*) opt_memscramble=yes ;; +esac + + + + +# Check whether --with-afs was given. +if test ${with_afs+y} +then : + withval=$with_afs; opt_afs=$withval +fi + + +# Check whether --with-bash-malloc was given. +if test ${with_bash_malloc+y} +then : + withval=$with_bash_malloc; opt_bash_malloc=$withval +fi + + +# Check whether --with-curses was given. +if test ${with_curses+y} +then : + withval=$with_curses; opt_curses=$withval +fi + + +# Check whether --with-gnu-malloc was given. +if test ${with_gnu_malloc+y} +then : + withval=$with_gnu_malloc; opt_bash_malloc=$withval +fi + + +# Check whether --with-installed-readline was given. +if test ${with_installed_readline+y} +then : + withval=$with_installed_readline; opt_with_installed_readline=$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)' + + printf "%s\n" "#define USING_BASH_MALLOC 1" >>confdefs.h + +else + MALLOC_LIB= + MALLOC_LIBRARY= + MALLOC_LDFLAGS= + MALLOC_DEP= +fi + +if test "$opt_afs" = yes; then + printf "%s\n" "#define AFS 1" >>confdefs.h + +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_dircomplete_expand_default=no +opt_globascii_default=yes +opt_function_import=yes +opt_dev_fd_stat_broken=no +opt_alt_array_impl=no +opt_translatable_strings=yes + +ARRAY_O=array.o + +opt_static_link=no +opt_profiling=no + +# Check whether --enable-minimal-config was given. +if test ${enable_minimal_config+y} +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 + opt_translatable_strings=no + opt_globascii_default=yes +fi + +# Check whether --enable-alias was given. +if test ${enable_alias+y} +then : + enableval=$enable_alias; opt_alias=$enableval +fi + +# Check whether --enable-alt-array-implementation was given. +if test ${enable_alt_array_implementation+y} +then : + enableval=$enable_alt_array_implementation; opt_alt_array_impl=$enableval +fi + +# Check whether --enable-arith-for-command was given. +if test ${enable_arith_for_command+y} +then : + enableval=$enable_arith_for_command; opt_arith_for_command=$enableval +fi + +# Check whether --enable-array-variables was given. +if test ${enable_array_variables+y} +then : + enableval=$enable_array_variables; opt_array_variables=$enableval +fi + +# Check whether --enable-bang-history was given. +if test ${enable_bang_history+y} +then : + enableval=$enable_bang_history; opt_bang_history=$enableval +fi + +# Check whether --enable-brace-expansion was given. +if test ${enable_brace_expansion+y} +then : + enableval=$enable_brace_expansion; opt_brace_expansion=$enableval +fi + +# Check whether --enable-casemod-attributes was given. +if test ${enable_casemod_attributes+y} +then : + enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval +fi + +# Check whether --enable-casemod-expansions was given. +if test ${enable_casemod_expansions+y} +then : + enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval +fi + +# Check whether --enable-command-timing was given. +if test ${enable_command_timing+y} +then : + enableval=$enable_command_timing; opt_command_timing=$enableval +fi + +# Check whether --enable-cond-command was given. +if test ${enable_cond_command+y} +then : + enableval=$enable_cond_command; opt_cond_command=$enableval +fi + +# Check whether --enable-cond-regexp was given. +if test ${enable_cond_regexp+y} +then : + enableval=$enable_cond_regexp; opt_cond_regexp=$enableval +fi + +# Check whether --enable-coprocesses was given. +if test ${enable_coprocesses+y} +then : + enableval=$enable_coprocesses; opt_coproc=$enableval +fi + +# Check whether --enable-debugger was given. +if test ${enable_debugger+y} +then : + enableval=$enable_debugger; opt_debugger=$enableval +fi + +# Check whether --enable-dev-fd-stat-broken was given. +if test ${enable_dev_fd_stat_broken+y} +then : + enableval=$enable_dev_fd_stat_broken; opt_dev_fd_stat_broken=$enableval +fi + +# Check whether --enable-direxpand-default was given. +if test ${enable_direxpand_default+y} +then : + enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval +fi + +# Check whether --enable-directory-stack was given. +if test ${enable_directory_stack+y} +then : + enableval=$enable_directory_stack; opt_dirstack=$enableval +fi + +# Check whether --enable-disabled-builtins was given. +if test ${enable_disabled_builtins+y} +then : + enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval +fi + +# Check whether --enable-dparen-arithmetic was given. +if test ${enable_dparen_arithmetic+y} +then : + enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval +fi + +# Check whether --enable-extended-glob was given. +if test ${enable_extended_glob+y} +then : + enableval=$enable_extended_glob; opt_extended_glob=$enableval +fi + +# Check whether --enable-extended-glob-default was given. +if test ${enable_extended_glob_default+y} +then : + enableval=$enable_extended_glob_default; opt_extglob_default=$enableval +fi + +# Check whether --enable-function-import was given. +if test ${enable_function_import+y} +then : + enableval=$enable_function_import; opt_function_import=$enableval +fi + +# Check whether --enable-glob-asciiranges-default was given. +if test ${enable_glob_asciiranges_default+y} +then : + enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval +fi + +# Check whether --enable-help-builtin was given. +if test ${enable_help_builtin+y} +then : + enableval=$enable_help_builtin; opt_help=$enableval +fi + +# Check whether --enable-history was given. +if test ${enable_history+y} +then : + enableval=$enable_history; opt_history=$enableval +fi + +# Check whether --enable-job-control was given. +if test ${enable_job_control+y} +then : + enableval=$enable_job_control; opt_job_control=$enableval +fi + +# Check whether --enable-multibyte was given. +if test ${enable_multibyte+y} +then : + enableval=$enable_multibyte; opt_multibyte=$enableval +fi + +# Check whether --enable-net-redirections was given. +if test ${enable_net_redirections+y} +then : + enableval=$enable_net_redirections; opt_net_redirs=$enableval +fi + +# Check whether --enable-process-substitution was given. +if test ${enable_process_substitution+y} +then : + enableval=$enable_process_substitution; opt_process_subst=$enableval +fi + +# Check whether --enable-progcomp was given. +if test ${enable_progcomp+y} +then : + enableval=$enable_progcomp; opt_progcomp=$enableval +fi + +# Check whether --enable-prompt-string-decoding was given. +if test ${enable_prompt_string_decoding+y} +then : + enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval +fi + +# Check whether --enable-readline was given. +if test ${enable_readline+y} +then : + enableval=$enable_readline; opt_readline=$enableval +fi + +# Check whether --enable-restricted was given. +if test ${enable_restricted+y} +then : + enableval=$enable_restricted; opt_restricted=$enableval +fi + +# Check whether --enable-select was given. +if test ${enable_select+y} +then : + enableval=$enable_select; opt_select=$enableval +fi + +# Check whether --enable-separate-helpfiles was given. +if test ${enable_separate_helpfiles+y} +then : + enableval=$enable_separate_helpfiles; opt_separate_help=$enableval +fi + +# Check whether --enable-single-help-strings was given. +if test ${enable_single_help_strings+y} +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+y} +then : + enableval=$enable_strict_posix_default; opt_strict_posix=$enableval +fi + +# Check whether --enable-translatable-strings was given. +if test ${enable_translatable_strings+y} +then : + enableval=$enable_translatable_strings; opt_translatable_strings=$enableval +fi + +# Check whether --enable-usg-echo-default was given. +if test ${enable_usg_echo_default+y} +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+y} +then : + enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval +fi + + +# Check whether --enable-mem-scramble was given. +if test ${enable_mem_scramble+y} +then : + enableval=$enable_mem_scramble; opt_memscramble=$enableval +fi + +# Check whether --enable-profiling was given. +if test ${enable_profiling+y} +then : + enableval=$enable_profiling; opt_profiling=$enableval +fi + +# Check whether --enable-static-link was given. +if test ${enable_static_link+y} +then : + enableval=$enable_static_link; opt_static_link=$enableval +fi + + + + + + + + + +if test $opt_alias = yes; then +printf "%s\n" "#define ALIAS 1" >>confdefs.h + +fi +if test $opt_dirstack = yes; then +printf "%s\n" "#define PUSHD_AND_POPD 1" >>confdefs.h + +fi +if test $opt_restricted = yes; then +printf "%s\n" "#define RESTRICTED_SHELL 1" >>confdefs.h + +fi +if test $opt_process_subst = yes; then +printf "%s\n" "#define PROCESS_SUBSTITUTION 1" >>confdefs.h + +fi +if test $opt_prompt_decoding = yes; then +printf "%s\n" "#define PROMPT_STRING_DECODE 1" >>confdefs.h + +fi +if test $opt_select = yes; then +printf "%s\n" "#define SELECT_COMMAND 1" >>confdefs.h + +fi +if test $opt_help = yes; then +printf "%s\n" "#define HELP_BUILTIN 1" >>confdefs.h + +fi +if test $opt_array_variables = yes; then +printf "%s\n" "#define ARRAY_VARS 1" >>confdefs.h + +fi +if test $opt_dparen_arith = yes; then +printf "%s\n" "#define DPAREN_ARITHMETIC 1" >>confdefs.h + +fi +if test $opt_brace_expansion = yes; then +printf "%s\n" "#define BRACE_EXPANSION 1" >>confdefs.h + +fi +if test $opt_disabled_builtins = yes; then +printf "%s\n" "#define DISABLED_BUILTINS 1" >>confdefs.h + +fi +if test $opt_command_timing = yes; then +printf "%s\n" "#define COMMAND_TIMING 1" >>confdefs.h + +fi +if test $opt_xpg_echo = yes ; then +printf "%s\n" "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h + +fi +if test $opt_strict_posix = yes; then +printf "%s\n" "#define STRICT_POSIX 1" >>confdefs.h + +fi +if test $opt_extended_glob = yes ; then +printf "%s\n" "#define EXTENDED_GLOB 1" >>confdefs.h + +fi +if test $opt_extglob_default = yes; then +printf "%s\n" "#define EXTGLOB_DEFAULT 1" >>confdefs.h + +else +printf "%s\n" "#define EXTGLOB_DEFAULT 0" >>confdefs.h + +fi +if test $opt_cond_command = yes ; then +printf "%s\n" "#define COND_COMMAND 1" >>confdefs.h + +fi +if test $opt_cond_regexp = yes ; then +printf "%s\n" "#define COND_REGEXP 1" >>confdefs.h + +fi +if test $opt_coproc = yes; then +printf "%s\n" "#define COPROCESS_SUPPORT 1" >>confdefs.h + +fi +if test $opt_arith_for_command = yes; then +printf "%s\n" "#define ARITH_FOR_COMMAND 1" >>confdefs.h + +fi +if test $opt_net_redirs = yes; then +printf "%s\n" "#define NETWORK_REDIRECTIONS 1" >>confdefs.h + +fi +if test $opt_progcomp = yes; then +printf "%s\n" "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h + +fi +if test $opt_multibyte = no; then +printf "%s\n" "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h + +fi +if test $opt_debugger = yes; then +printf "%s\n" "#define DEBUGGER 1" >>confdefs.h + +fi +if test $opt_casemod_attrs = yes; then +printf "%s\n" "#define CASEMOD_ATTRS 1" >>confdefs.h + +fi +if test $opt_casemod_expansions = yes; then +printf "%s\n" "#define CASEMOD_EXPANSIONS 1" >>confdefs.h + +fi +if test $opt_dircomplete_expand_default = yes; then +printf "%s\n" "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h + +fi +if test $opt_globascii_default = yes; then +printf "%s\n" "#define GLOBASCII_DEFAULT 1" >>confdefs.h + +else +printf "%s\n" "#define GLOBASCII_DEFAULT 0" >>confdefs.h + +fi +if test $opt_function_import = yes; then +printf "%s\n" "#define FUNCTION_IMPORT 1" >>confdefs.h + +fi +if test $opt_dev_fd_stat_broken = yes; then +printf "%s\n" "#define DEV_FD_STAT_BROKEN 1" >>confdefs.h + +fi +if test $opt_alt_array_impl = yes; then +printf "%s\n" "#define ALT_ARRAY_IMPLEMENTATION 1" >>confdefs.h + +ARRAY_O=array2.o +fi +if test $opt_translatable_strings = yes; then +printf "%s\n" "#define TRANSLATABLE_STRINGS 1" >>confdefs.h + +fi + +if test $opt_memscramble = yes; then +printf "%s\n" "#define MEMSCRAMBLE 1" >>confdefs.h + +fi + +if test "$opt_minimal_config" = yes; then + TESTSCRIPT=run-minimal +else + TESTSCRIPT=run-all +fi + +HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET= +if test "$opt_separate_help" != no; then + if test "$opt_separate_help" = "yes" ; then + HELPDIR='${datadir}/bash/helpfiles' + else + HELPDIR=$opt_separate_help + fi + HELPDIRDEFINE='-H ${HELPDIR}' + HELPINSTALL='install-help' + HELPFILES_TARGET='helpdoc' +fi +HELPSTRINGS= +if test "$opt_single_longdoc_strings" != "yes"; then + HELPSTRINGS='-S' +fi + + + + + + + + + + + + + + + + + + + + +if test -z "$CFLAGS"; then + want_auto_cflags=1 +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$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" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$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 + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +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+y} && 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 $as_nop + ac_file='' +fi +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +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_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + 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:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +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_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+y} +ac_save_CFLAGS=$CFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +else $as_nop + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; 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 +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program +_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" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi +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 + + +if test -n "$want_auto_cflags"; then + AUTO_CFLAGS="-g ${GCC:+-O2}" + AUTO_LDFLAGS="-g ${GCC:+-O2}" +# STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}" + STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}" +else + AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= +fi + + +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done + + + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test ${ac_cv_safe_to_define___extensions__+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_safe_to_define___extensions__=yes +else $as_nop + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if test ${ac_cv_should_define__xopen_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_should_define__xopen_source=no + if test $ac_cv_header_wchar_h = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + mbstate_t x; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_should_define__xopen_source=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } + + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h + + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h + + printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + + if test $ac_cv_header_minix_config_h = yes +then : + MINIX=yes + printf "%s\n" "#define _MINIX 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h + +else $as_nop + MINIX= +fi + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h + +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h + +fi + +# Check whether --enable-largefile was given. +if test ${enable_largefile+y} +then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +printf %s "checking for special C compiler options needed for large files... " >&6; } +if test ${ac_cv_sys_largefile_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO" +then : + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test ${ac_cv_sys_file_offset_bits+y} +then : + printf %s "(cached) " >&6 +else $as_nop + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } +if test ${ac_cv_sys_large_files+y} +then : + printf %s "(cached) " >&6 +else $as_nop + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +printf "%s\n" "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h +;; +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 + ;; + *-qnx*) + cross_cache=${srcdir}/cross-build/qnx.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 + + + + +CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} +# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX + +if test "$opt_profiling" = "yes"; then + PROFILE_FLAGS=-pg + case "$host_os" in + solaris2*|linux*|darwin*) ;; + *) opt_static_link=yes ;; + esac + DEBUG= MALLOC_DEBUG= +fi + +prefer_shared=yes +prefer_static=no + +if test "$opt_static_link" = yes; then + prefer_static=yes + prefer_shared=no + # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 + if test "$GCC" = "yes"; then + STATIC_LD="-static" + case "$host_os" in + solaris2*|linux*) ;; + *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental + esac + fi +fi + +# set the appropriate make variables for building the "build tools" +# modify defaults based on whether or not we are cross compiling, since the +# options for the target host may not be appropriate for the build host +if test "X$cross_compiling" = "Xno"; then + CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' + if test X"$opt_profiling" = Xyes; then + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'} + else + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} + fi + # CFLAGS set above to default value if not passed in environment + if test -n "$want_auto_cflags" ; then + CFLAGS_FOR_BUILD="${CFLAGS}" + BASE_CFLAGS_FOR_BUILD="${CFLAGS}" + else + # passed in environment + CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + BASE_CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + fi + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} +else + CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} + BASE_CFLAGS_FOR_BUILD=${BASE_CFLAGS_FOR_BUILD="-g"} + LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""} +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "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+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" 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. + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$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. + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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" + as_fn_executable_p "$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 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '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 + as_fn_arith $ac_count + 1 && ac_count=$as_val + 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_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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" + as_fn_executable_p "$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 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '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 + as_fn_arith $ac_count + 1 && ac_count=$as_val + 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_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +if test $ac_cv_c_compiler_gnu = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +printf %s "checking whether $CC needs -traditional... " >&6; } +if test ${ac_cv_prog_gcc_traditional+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_pattern="Autoconf.*'x'" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +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 $as_nop + ac_cv_prog_gcc_traditional=no +fi +rm -rf conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +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 -rf conftest* + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "checking which library has the termcap functions... " >&6; } +_bash_needmsg= +fi +if test ${bash_cv_termcap_lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" +if test "x$ac_cv_func_tgetent" = xyes +then : + bash_cv_termcap_lib=libc +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 +printf %s "checking for tgetent in -ltermcap... " >&6; } +if test ${ac_cv_lib_termcap_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltermcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_termcap_tgetent=yes +else $as_nop + ac_cv_lib_termcap_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; } +if test "x$ac_cv_lib_termcap_tgetent" = xyes +then : + bash_cv_termcap_lib=libtermcap +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 +printf %s "checking for tgetent in -ltinfo... " >&6; } +if test ${ac_cv_lib_tinfo_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltinfo $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tinfo_tgetent=yes +else $as_nop + ac_cv_lib_tinfo_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; } +if test "x$ac_cv_lib_tinfo_tgetent" = xyes +then : + bash_cv_termcap_lib=libtinfo +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 +printf %s "checking for tgetent in -lcurses... " >&6; } +if test ${ac_cv_lib_curses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_curses_tgetent=yes +else $as_nop + ac_cv_lib_curses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; } +if test "x$ac_cv_lib_curses_tgetent" = xyes +then : + bash_cv_termcap_lib=libcurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 +printf %s "checking for tgetent in -lncurses... " >&6; } +if test ${ac_cv_lib_ncurses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncurses_tgetent=yes +else $as_nop + ac_cv_lib_ncurses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; } +if test "x$ac_cv_lib_ncurses_tgetent" = xyes +then : + bash_cv_termcap_lib=libncurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 +printf %s "checking for tgetent in -lncursesw... " >&6; } +if test ${ac_cv_lib_ncursesw_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncursesw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncursesw_tgetent=yes +else $as_nop + ac_cv_lib_ncursesw_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; } +if test "x$ac_cv_lib_ncursesw_tgetent" = xyes +then : + bash_cv_termcap_lib=libncursesw +else $as_nop + bash_cv_termcap_lib=gnutermcap +fi + +fi + +fi + +fi + +fi + +fi + +fi + +if test "X$_bash_needmsg" = "Xyes"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "checking which library has the termcap functions... " >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 +printf "%s\n" "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 +# we assume ncurses is installed somewhere the linker can find it +TERMCAP_LIB=-lncurses +TERMCAP_DEP= +fi + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5 +printf %s "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+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_rl_version='8.0' + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +extern int rl_gnu_readline_p; + +int +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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_rl_version=`cat conftest.rlv` +else $as_nop + ac_cv_rl_version='0.0' +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 +printf "%s\n" "$ac_cv_rl_version" >&6; } +else + + +printf "%s\n" "#define RL_READLINE_VERSION $RL_VERSION" >>confdefs.h + + +printf "%s\n" "#define RL_VERSION_MAJOR $RL_MAJOR" >>confdefs.h + + +printf "%s\n" "#define RL_VERSION_MINOR $RL_MINOR" >>confdefs.h + + + + + + +# 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 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 +printf "%s\n" "$ac_cv_rl_version" >&6; } + +fi + + + case "$ac_cv_rl_version" in + 8*|9*) ;; + *) opt_with_installed_readline=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5 +printf "%s\n" "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5 +printf "%s\n" "$as_me: WARNING: using private bash version" >&2;} + ;; + esac +fi + +TILDE_LIB=-ltilde +if test $opt_readline = yes; then + printf "%s\n" "#define READLINE 1" >>confdefs.h + + 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 + printf "%s\n" "#define HISTORY 1" >>confdefs.h + + fi + if test $opt_bang_history = yes; then + printf "%s\n" "#define BANG_HISTORY 1" >>confdefs.h + + 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +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 as_fn_executable_p "$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+y}; 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$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' + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_YACC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +printf "%s\n" "$YACC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + SET_MAKE= +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +case "$ac_cv_prog_YACC" in +*bison*) ;; +*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5 +printf "%s\n" "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;; +esac + +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 + + +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software +# Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + + + +# Configure checks for struct timespec + +# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Original written by Paul Eggert and Jim Meyering. +# Modified by Chet Ramey for bash + + + + + + + + + + + +# codeset.m4 serial 5 (gettext-0.18.2) + + + + + + + + +# fcntl-o.m4 serial 6 + + + + +# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. +# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. +# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. + + +# gettext.m4 serial 69 (gettext-0.19.9) + + + + + + + + + + + + + + + + + +# glibc2.m4 serial 3 + +# Test for the GNU C Library, version 2.0 or newer. +# From Bruno Haible. + + + +# glibc21.m4 serial 5 + +# Test for the GNU C Library, version 2.1 or newer, or uClibc. +# From Bruno Haible. + + + +# host-cpu-c-abi.m4 serial 11 + + + + + + + +# iconv.m4 serial 21 + + + + + + + + + +# intdiv0.m4 serial 6 (gettext-0.18.2) + + + + +# intl.m4 serial 34 (gettext-0.19.9) + + + + + + + + + + + +# intlmacosx.m4 serial 6 (gettext-0.19.9) + + + +# intl-thread-locale.m4 serial 4 + + + + + +# intmax.m4 serial 6 (gettext-0.18.2) + + + + +# inttypes-pri.m4 serial 7 (gettext-0.18.2) + + + + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + + + +# inttypes.m4 serial 27 + + + + + + +# Ensure that the PRI* and SCN* macros are defined appropriately. + + +# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. +# If $2 is true, the condition is $3; otherwise if long long int is supported +# approximate the condition with $4; otherwise, assume the condition is false. +# The condition should work on all C99 platforms; the approximations should be +# good enough to work on all practical pre-C99 platforms. +# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. + + + + + + +# inttypes_h.m4 serial 10 + + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + + + +# lcmessage.m4 serial 7 (gettext-0.18.2) + + +# Check whether LC_MESSAGES is available in . + + + +# lib-ld.m4 serial 9 + + + + + + +# lib-link.m4 serial 28 + + + + + + + + + + + + + + + + + + +# lib-prefix.m4 serial 14 + + + + + + + + + + +# lock.m4 serial 14 + + + + +# Prerequisites of lib/glthread/lock.c. + + +# nls.m4 serial 5 (gettext-0.18) + + + + + + +# po.m4 serial 24a + + + + + + + + + + + + +# printf-posix.m4 serial 6 (gettext-0.18.2) + + + + +# progtest.m4 serial 7 (gettext-0.18.2) + + + + +# Search path for a program which passes the given test. + + + +# pthread_rwlock_rdlock.m4 serial 2 + + + + +# size_max.m4 serial 11 + + + + + + +# stdint_h.m4 serial 9 + + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + + + +# threadlib.m4 serial 16 + + + + + + + + + + + + + + + + + + + + + +# uintmax_t.m4 serial 12 + + + + +# Define uintmax_t to 'unsigned long' or 'unsigned long long' +# if it is not already defined in or . + + + +# ulonglong.m4 serial 10 + +# visibility.m4 serial 6 + + + + + +# wchar_t.m4 serial 4 (gettext-0.18.2) + + + + +# wint_t.m4 serial 7 + + + + + + +# xsize.m4 serial 5 + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* 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}; + /* IBM 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 sort of thing. */ + char tx; + char *t = &tx; + 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; + } + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_const=yes +else $as_nop + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +printf "%s\n" "#define const /**/" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$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 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +printf %s "checking whether byte ordering is bigendian... " >&6; } +if test ${ac_cv_c_bigendian+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main (void) +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main (void) +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_bigendian=yes +else $as_nop + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_bigendian=yes +else $as_nop + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +unsigned short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + unsigned short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + unsigned short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + unsigned 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 (void) +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +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 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ + + /* 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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_c_bigendian=no +else $as_nop + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +printf "%s\n" "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 +printf %s "checking for preprocessor stringizing operator... " >&6; } +if test ${ac_cv_c_stringize+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 $as_nop + ac_cv_c_stringize=yes +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5 +printf "%s\n" "$ac_cv_c_stringize" >&6; } +if test $ac_cv_c_stringize = yes; then + +printf "%s\n" "#define HAVE_STRINGIZE 1" >>confdefs.h + +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 +printf %s "checking for long double... " >&6; } +if test ${ac_cv_type_long_double+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$GCC" = yes; then + ac_cv_type_long_double=yes + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* The Stardent Vistra knows sizeof (long double), but does + not support it. */ + long double foo = 0.0L; +int +main (void) +{ +static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + sizeof (double) <= sizeof (long double))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_type_long_double=yes +else $as_nop + ac_cv_type_long_double=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5 +printf "%s\n" "$ac_cv_type_long_double" >&6; } + if test $ac_cv_type_long_double = yes; then + +printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h + + fi + +if test "$ac_prog_cc_stdc" != no; then + +printf "%s\n" "#define PROTOTYPES 1" >>confdefs.h + + +printf "%s\n" "#define __PROTOTYPES 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +printf %s "checking whether char is unsigned... " >&6; } +if test ${ac_cv_c_char_unsigned+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_char_unsigned=no +else $as_nop + ac_cv_c_char_unsigned=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +printf "%s\n" "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes; then + printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +printf %s "checking for working volatile... " >&6; } +if test ${ac_cv_c_volatile+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_volatile=yes +else $as_nop + ac_cv_c_volatile=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 +printf "%s\n" "$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then + +printf "%s\n" "#define volatile /**/" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +printf %s "checking for C/C++ restrict keyword... " >&6; } +if test ${ac_cv_c_restrict+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_restrict=no + # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: + # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html + # Put 'restrict' last, because C++ lacks it. + for ac_kw in __restrict__ __restrict _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + +int +main (void) +{ +int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +printf "%s\n" "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) printf "%s\n" "#define restrict /**/" >>confdefs.h + ;; + *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h + ;; + esac + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + 'BusyBox '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test ${ac_cv_path_mkdir+y}; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P 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. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$MKDIR_P" >&6; } + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_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 +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_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_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +printf %s "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test ${enable_nls+y} +then : + enableval=$enable_nls; USE_NLS=$enableval +else $as_nop + USE_NLS=yes +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } + + + + + GETTEXT_MACRO_VERSION=0.19 + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +printf "%s\n" "$MSGFMT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GMSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +printf "%s\n" "$GMSGFMT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_XGETTEXT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +printf "%s\n" "$XGETTEXT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGMERGE+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +printf "%s\n" "$MSGMERGE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5 +printf %s "checking whether we are using the GNU C Library 2 or newer... " >&6; } +if test ${ac_cv_gnu_library_2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + 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=yes +else $as_nop + ac_cv_gnu_library_2=no +fi +rm -rf conftest* + + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5 +printf "%s\n" "$ac_cv_gnu_library_2" >&6; } + + GLIBC2="$ac_cv_gnu_library_2" + + + + + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +printf %s "checking whether the -Werror option is usable... " >&6; } +if test ${gl_cv_cc_vis_werror+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_cc_vis_werror=yes +else $as_nop + gl_cv_cc_vis_werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +printf "%s\n" "$gl_cv_cc_vis_werror" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +printf %s "checking for simple visibility declarations... " >&6; } +if test ${gl_cv_cc_visibility+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_cc_visibility=yes +else $as_nop + gl_cv_cc_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +printf "%s\n" "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + + + +printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define size_t unsigned int" >>confdefs.h + +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 +printf %s "checking for stdint.h... " >&6; } +if test ${gl_cv_header_stdint_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main (void) +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_stdint_h=yes +else $as_nop + gl_cv_header_stdint_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 +printf "%s\n" "$gl_cv_header_stdint_h" >&6; } + if test $gl_cv_header_stdint_h = yes; then + +printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h + + fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_working_alloca_h=yes +else $as_nop + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +# endif +#endif + +int +main (void) +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_alloca_works=yes +else $as_nop + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } +fi + +if test $ac_cv_func_alloca_works = yes; then + +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h + +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 + +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_c_stack_direction=0 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_c_stack_direction=1 +else $as_nop + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h + + +fi + + +ac_func= +for ac_item in $ac_func_c_list +do + if test $ac_func; then + ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func + if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then + echo "#define $ac_item 1" >> confdefs.h + fi + ac_func= + else + ac_func=$ac_item + fi +done + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +printf %s "checking for working mmap... " >&6; } +if test ${ac_cv_func_mmap_fixed_mapped+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + linux*) ac_cv_func_mmap_fixed_mapped=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_mmap_fixed_mapped=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# 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 (void) +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + 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 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* 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 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* 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 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + free (data); + free (data3); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_mmap_fixed_mapped=yes +else $as_nop + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 +printf %s "checking whether integer division by zero raises SIGFPE... " >&6; } +if test ${gt_cv_int_divbyzero_sigfpe+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + gt_cv_int_divbyzero_sigfpe= + case "$host_os" in + macos* | darwin[6-9]* | darwin[1-9][0-9]*) + # On Mac OS X 10.2 or newer, just assume the same as when cross- + # compiling. If we were to perform the real test, 1 Crash Report + # dialog window would pop up. + case "$host_cpu" in + i[34567]86 | x86_64) + gt_cv_int_divbyzero_sigfpe="guessing yes" ;; + esac + ;; + esac + if test -z "$gt_cv_int_divbyzero_sigfpe"; then + if test "$cross_compiling" = yes +then : + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +static void +sigfpe_handler (int sig) +{ + /* 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 xnan; + +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; + xnan = y / y; + exit (2); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_int_divbyzero_sigfpe=yes +else $as_nop + gt_cv_int_divbyzero_sigfpe=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5 +printf "%s\n" "$gt_cv_int_divbyzero_sigfpe" >&6; } + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + +printf "%s\n" "#define INTDIV0_RAISES_SIGFPE $value" >>confdefs.h + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 +printf %s "checking for inttypes.h... " >&6; } +if test ${gl_cv_header_inttypes_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_inttypes_h=yes +else $as_nop + gl_cv_header_inttypes_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 +printf "%s\n" "$gl_cv_header_inttypes_h" >&6; } + if test $gl_cv_header_inttypes_h = yes; then + +printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +printf %s "checking for unsigned long long int... " >&6; } +if test ${ac_cv_type_unsigned_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_unsigned_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main (void) +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +else $as_nop + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h + + else + +printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h + + fi + + + ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h + +fi + + if test $ac_cv_header_inttypes_h = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 +printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } +if test ${gt_cv_inttypes_pri_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef PRId32 +char *p = PRId32; +#endif + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_inttypes_pri_broken=no +else $as_nop + gt_cv_inttypes_pri_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 +printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; } + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + +printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h + + PRI_MACROS_BROKEN=1 + else + PRI_MACROS_BROKEN=0 + fi + + + + + + + + # Check whether --enable-threads was given. +if test ${enable_threads+y} +then : + enableval=$enable_threads; gl_use_threads=$enableval +else $as_nop + if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else + case "$host_os" in + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac + fi + +fi + + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using : + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd* | midnightbsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + 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+y} +then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else $as_nop + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +printf %s "checking for ld... " >&6; } +elif test "$GCC" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } +elif test "$with_gnu_ld" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + if test ${acl_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + fi + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + 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 variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + # The compiler produces 64-bit code. Add option '-b64' so that the + # linker groks 64-bit object files. + case "$acl_cv_path_LD " in + *" -b64 "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; + esac + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + sparc64-*-netbsd*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # The compiler produces 32-bit code. Add option '-m elf32_sparc' + # so that the linker groks 32-bit object files. + case "$acl_cv_path_LD " in + *" -m elf32_sparc "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; + esac + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + esac + +fi + + LD="$acl_cv_path_LD" +fi +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${acl_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +printf %s "checking for shared library run path origin... " >&6; } +if test ${acl_cv_rpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +printf "%s\n" "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test ${enable_rpath+y} +then : + enableval=$enable_rpath; : +else $as_nop + enable_rpath=yes +fi + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +printf %s "checking 32-bit host C ABI... " >&6; } +if test ${gl_cv_host_cpu_c_abi_32bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + *) + gl_cv_host_cpu_c_abi_32bit=no ;; + esac + else + case "$host_cpu" in + + i[4567]86 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) \ + && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _ILP32 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=yes +else $as_nop + gl_cv_host_cpu_c_abi_32bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + riscv32 | riscv64 ) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_host_cpu_c_abi_32bit=no +else $as_nop + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + + *) + gl_cv_host_cpu_c_abi_32bit=no + ;; + esac + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } + + HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" + + + + + + case "$host_os" in + solaris*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +printf %s "checking for 64-bit host... " >&6; } +if test ${gl_cv_solaris_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _LP64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_solaris_64bit=yes +else $as_nop + gl_cv_solaris_64bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +printf "%s\n" "$gl_cv_solaris_64bit" >&6; };; + esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +printf %s "checking for the common suffixes of directories in the library search path... " >&6; } +if test ${acl_cv_libdirstems+y} +then : + printf %s "(cached) " >&6 +else $as_nop + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + if test "$HOST_CPU_C_ABI_32BIT" != yes; then + searchpath=`(if test -f /usr/bin/gcc \ + && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ + LC_ALL=C /usr/bin/gcc -print-search-dirs; \ + else \ + LC_ALL=C $CC -print-search-dirs; \ + fi) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +printf "%s\n" "$acl_cv_libdirstems" >&6; } + # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` + + + + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +printf %s "checking whether imported symbols can be declared weak... " >&6; } +if test ${gl_cv_have_weak+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern void xyzzy (); +#pragma weak xyzzy +int +main (void) +{ +xyzzy(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv_have_weak=maybe +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1 +then : + gl_cv_have_weak="guessing yes" +else $as_nop + gl_cv_have_weak="guessing no" +fi +rm -rf conftest* + + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_have_weak=yes +else $as_nop + gl_cv_have_weak=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +printf "%s\n" "$gl_cv_have_weak" >&6; } + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes +then : + gl_have_pthread_h=yes +else $as_nop + gl_have_pthread_h=no +fi + + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + +int +main (void) +{ +pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_pthread=yes + LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread + LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$save_LIBS + test -n "$gl_have_pthread" && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +printf %s "checking for pthread_kill in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pthread_pthread_kill=yes +else $as_nop + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes +then : + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) + +printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h + + esac + +fi + + elif test -z "$gl_have_pthread"; then + # Some library is needed. Try libpthread and libc_r. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +printf %s "checking for pthread_kill in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pthread_pthread_kill=yes +else $as_nop + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes +then : + gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread +fi + + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 +printf %s "checking for pthread_kill in -lc_r... " >&6; } +if test ${ac_cv_lib_c_r_pthread_kill+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char pthread_kill (); +int +main (void) +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_c_r_pthread_kill=yes +else $as_nop + ac_cv_lib_c_r_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 +printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; } +if test "x$ac_cv_lib_c_r_pthread_kill" = xyes +then : + gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r +fi + + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + +printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ +thr_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_solaristhread=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h + + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 +printf %s "checking how to link with libpth... " >&6; } +if test ${ac_cv_libpth_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + + + + + + 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-libpth-prefix was given. +if test ${with_libpth_prefix+y} +then : + withval=$with_libpth_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/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBPTH= + LTLIBPTH= + INCPTH= + LIBPTH_PREFIX= + HAVE_LIBPTH= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='pth ' + 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" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBPTH; 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 "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$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 "$acl_hardcode_direct" = yes; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$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 $LIBPTH; 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 + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + 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* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCPTH; 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 + INCPTH="${INCPTH}${INCPTH:+ }-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/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBPTH; 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 + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBPTH; 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 + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-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$,,'` + ;; + *) + LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" + ;; + esac + done + fi + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" + done + fi + + + + + + ac_cv_libpth_libs="$LIBPTH" + ac_cv_libpth_ltlibs="$LTLIBPTH" + ac_cv_libpth_cppflags="$INCPTH" + ac_cv_libpth_prefix="$LIBPTH_PREFIX" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 +printf "%s\n" "$ac_cv_libpth_libs" >&6; } + LIBPTH="$ac_cv_libpth_libs" + LTLIBPTH="$ac_cv_libpth_ltlibs" + INCPTH="$ac_cv_libpth_cppflags" + LIBPTH_PREFIX="$ac_cv_libpth_prefix" + + for element in $INCPTH; 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 + + + + + HAVE_LIBPTH=yes + + + + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +pth_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_have_pth=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + +printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h + + fi + ;; + esac + fi + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 +printf %s "checking for multithread API to use... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 +printf "%s\n" "$gl_threads_api" >&6; } + + + + + + + + + + + + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + has_rwlock=false + ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include +" +if test "x$ac_cv_type_pthread_rwlock_t" = xyes +then : + has_rwlock=true + +printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h + +fi + + if $has_rwlock; then + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 +printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } +if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y} +then : + printf %s "(cached) " >&6 +else $as_nop + save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + if test "$cross_compiling" = yes +then : + gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include + +#define SUCCEED() exit (0) +#define FAILURE() exit (1) +#define UNEXPECTED(n) (exit (10 + (n))) + +/* The main thread creates the waiting writer and the requesting reader threads + in the default way; this guarantees that they have the same priority. + We can reuse the main thread as first reader thread. */ + +static pthread_rwlock_t lock; +static pthread_t reader1; +static pthread_t writer; +static pthread_t reader2; +static pthread_t timer; +/* Used to pass control from writer to reader2 and from reader2 to timer, + as in a relay race. + Passing control from one running thread to another running thread + is most likely faster than to create the second thread. */ +static pthread_mutex_t baton; + +static void * +timer_func (void *ignored) +{ + /* Step 13 (can be before or after step 12): + The timer thread takes the baton, then waits a moment to make sure + it can tell whether the second reader thread is blocked at step 12. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (13); + usleep (100000); + /* By the time we get here, it's clear that the second reader thread is + blocked at step 12. This is the desired behaviour. */ + SUCCEED (); +} + +static void * +reader2_func (void *ignored) +{ + int err; + + /* Step 8 (can be before or after step 7): + The second reader thread takes the baton, then waits a moment to make sure + the writer thread has reached step 7. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (8); + usleep (100000); + /* Step 9: The second reader thread requests the lock. */ + err = pthread_rwlock_tryrdlock (&lock); + if (err == 0) + FAILURE (); + else if (err != EBUSY) + UNEXPECTED (9); + /* Step 10: Launch a timer, to test whether the next call blocks. */ + if (pthread_create (&timer, NULL, timer_func, NULL)) + UNEXPECTED (10); + /* Step 11: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (11); + /* Step 12: The second reader thread requests the lock. */ + err = pthread_rwlock_rdlock (&lock); + if (err == 0) + FAILURE (); + else + UNEXPECTED (12); +} + +static void * +writer_func (void *ignored) +{ + /* Step 4: Take the baton, so that the second reader thread does not go ahead + too early. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (4); + /* Step 5: Create the second reader thread. */ + if (pthread_create (&reader2, NULL, reader2_func, NULL)) + UNEXPECTED (5); + /* Step 6: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (6); + /* Step 7: The writer thread requests the lock. */ + if (pthread_rwlock_wrlock (&lock)) + UNEXPECTED (7); + return NULL; +} + +int +main () +{ + reader1 = pthread_self (); + + /* Step 1: The main thread initializes the lock and the baton. */ + if (pthread_rwlock_init (&lock, NULL)) + UNEXPECTED (1); + if (pthread_mutex_init (&baton, NULL)) + UNEXPECTED (1); + /* Step 2: The main thread acquires the lock as a reader. */ + if (pthread_rwlock_rdlock (&lock)) + UNEXPECTED (2); + /* Step 3: Create the writer thread. */ + if (pthread_create (&writer, NULL, writer_func, NULL)) + UNEXPECTED (3); + /* Job done. Go to sleep. */ + for (;;) + { + sleep (1); + } +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_pthread_rwlock_rdlock_prefer_writer=yes +else $as_nop + gl_cv_pthread_rwlock_rdlock_prefer_writer=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LIBS="$save_LIBS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 +printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } + case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in + *yes) + +printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h + + ;; + esac + + fi + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main (void) +{ + +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + : + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + + + + + + + + + + + + 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+y} +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/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + HAVE_LIBICONV= + 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= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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 "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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 "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_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 "$acl_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 + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + 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* | gnu* | k*bsd*-gnu) 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/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) 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 "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_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=\"$acl_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 + + + + + + + + + + + + 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 + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +printf %s "checking for iconv... " >&6; } +if test ${am_cv_func_iconv+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +printf "%s\n" "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +printf %s "checking for working iconv... " >&6; } +if test ${am_cv_func_iconv_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes +then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main (void) +{ +int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + am_cv_func_iconv_works=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +printf "%s\n" "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + +printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +printf %s "checking how to link with libiconv... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +printf "%s\n" "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +printf %s "checking for iconv declaration... " >&6; } + if test ${am_cv_proto_iconv+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || 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 (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + am_cv_proto_iconv_arg1="" +else $as_nop + am_cv_proto_iconv_arg1="const" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam 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/( /(/'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: + $am_cv_proto_iconv" >&5 +printf "%s\n" " + $am_cv_proto_iconv" >&6; } + else + am_cv_proto_iconv_arg1="" + fi + +printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h + + + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; } +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +printf "%s\n" "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default" +if test "x$ac_cv_header_argz_h" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h + +fi + + ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes +then : + printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid" +if test "x$ac_cv_func_getegid" = xyes +then : + printf "%s\n" "#define HAVE_GETEGID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid" +if test "x$ac_cv_func_geteuid" = xyes +then : + printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getgid" "ac_cv_func_getgid" +if test "x$ac_cv_func_getgid" = xyes +then : + printf "%s\n" "#define HAVE_GETGID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid" +if test "x$ac_cv_func_getuid" = xyes +then : + printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" +if test "x$ac_cv_func_mempcpy" = xyes +then : + printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" +if test "x$ac_cv_func_munmap" = xyes +then : + printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" +if test "x$ac_cv_func_stpcpy" = xyes +then : + printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes +then : + printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" +if test "x$ac_cv_func_tsearch" = xyes +then : + printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "argz_count" "ac_cv_func_argz_count" +if test "x$ac_cv_func_argz_count" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_COUNT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "argz_stringify" "ac_cv_func_argz_stringify" +if test "x$ac_cv_func_argz_stringify" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_STRINGIFY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "argz_next" "ac_cv_func_argz_next" +if test "x$ac_cv_func_argz_next" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_NEXT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "__fsetlocking" "ac_cv_func___fsetlocking" +if test "x$ac_cv_func___fsetlocking" = xyes +then : + printf "%s\n" "#define HAVE___FSETLOCKING 1" >>confdefs.h + +fi + + + ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" +if test "x$ac_cv_func_localeconv" = xyes +then : + printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h + +fi + + + ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_feof_unlocked" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fgets_unlocked" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h + + + + + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_INTLBISON+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_INTLBISON="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5 +printf "%s\n" "$INTLBISON" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$INTLBISON" && break +done + + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5 +printf %s "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;; + 2.[7-9]* | [3-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +printf "%s\n" "$ac_prog_version" >&6; } + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +printf %s "checking for long long int... " >&6; } +if test ${ac_cv_type_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes +then : + : +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main (void) +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + +else $as_nop + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +printf %s "checking for wchar_t... " >&6; } +if test ${gt_cv_c_wchar_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_c_wchar_t=yes +else $as_nop + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +printf "%s\n" "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 +printf %s "checking for wint_t... " >&6; } +if test ${gt_cv_c_wint_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0'; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_c_wint_t=yes +else $as_nop + gt_cv_c_wint_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 +printf "%s\n" "$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then + +printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 +printf %s "checking whether wint_t is too small... " >&6; } +if test ${gl_cv_type_wint_t_too_small+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +#endif +#include + int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_wint_t_too_small=no +else $as_nop + gl_cv_type_wint_t_too_small=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 +printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; } + if test $gl_cv_type_wint_t_too_small = yes; then + GNULIB_OVERRIDES_WINT_T=1 + else + GNULIB_OVERRIDES_WINT_T=0 + fi + else + GNULIB_OVERRIDES_WINT_T=0 + fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 +printf %s "checking for intmax_t... " >&6; } +if test ${gt_cv_c_intmax_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + +int +main (void) +{ +intmax_t x = -1; + return !x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_c_intmax_t=yes +else $as_nop + gt_cv_c_intmax_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 +printf "%s\n" "$gt_cv_c_intmax_t" >&6; } + if test $gt_cv_c_intmax_t = yes; then + +printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h + + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5 +printf %s "checking whether printf() supports POSIX/XSI format strings... " >&6; } +if test ${gt_cv_func_printf_posix+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if test "$cross_compiling" = yes +then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "notposix" >/dev/null 2>&1 +then : + gt_cv_func_printf_posix="guessing no" +else $as_nop + gt_cv_func_printf_posix="guessing yes" +fi +rm -rf conftest* + + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_func_printf_posix=yes +else $as_nop + gt_cv_func_printf_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5 +printf "%s\n" "$gt_cv_func_printf_posix" >&6; } + case $gt_cv_func_printf_posix in + *yes) + +printf "%s\n" "#define HAVE_POSIX_PRINTF 1" >>confdefs.h + + ;; + esac + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +if test ${ac_cv_gnu_library_2_1+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif +#ifdef __UCLIBC__ + Lucky user +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky" >/dev/null 2>&1 +then : + ac_cv_gnu_library_2_1=yes +else $as_nop + ac_cv_gnu_library_2_1=no +fi +rm -rf conftest* + + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 +printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 +printf %s "checking for SIZE_MAX... " >&6; } +if test ${gl_cv_size_max+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + gl_cv_size_max= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Found it" >/dev/null 2>&1 +then : + gl_cv_size_max=yes +fi +rm -rf conftest* + + if test -z "$gl_cv_size_max"; then + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include +#include " +then : + +else $as_nop + size_t_bits_minus_1= +fi + + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include " +then : + +else $as_nop + fits_in_uint= +fi + + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern size_t foo; + extern unsigned long foo; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + fits_in_uint=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 +printf "%s\n" "$gl_cv_size_max" >&6; } + if test "$gl_cv_size_max" != yes; then + +printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h + + fi + + + + + ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h + +fi + + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 +printf %s "checking for working fcntl.h... " >&6; } +if test ${gl_cv_header_working_fcntl_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + +int +main (void) +{ + + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_header_working_fcntl_h=yes +else $as_nop + case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 +printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; } + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h + + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h + + + + + + + + + + + + + + + if test $ac_cv_func_uselocale = yes; then + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5 +printf %s "checking whether uselocale works... " >&6; } +if test ${gt_cv_func_uselocale_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + # Guess no on AIX, yes otherwise. + case "$host_os" in + aix*) gt_cv_func_uselocale_works="guessing no" ;; + *) gt_cv_func_uselocale_works="guessing yes" ;; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + uselocale (NULL); + setlocale (LC_ALL, "en_US.UTF-8"); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_func_uselocale_works=yes +else $as_nop + gt_cv_func_uselocale_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5 +printf "%s\n" "$gt_cv_func_uselocale_works" >&6; } + else + gt_cv_func_uselocale_works=no + fi + case "$gt_cv_func_uselocale_works" in + *yes) + +printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h + + ;; + esac + + + case "$gt_cv_func_uselocale_works" in + *yes) + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5 +printf %s "checking for fake locale system (OpenBSD)... " >&6; } +if test ${gt_cv_locale_fake+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in + openbsd*) gt_cv_locale_fake="guessing yes" ;; + *) gt_cv_locale_fake="guessing no" ;; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + locale_t loc1, loc2; + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; + if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; + loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); + loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); + return !(loc1 == loc2); +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gt_cv_locale_fake=yes +else $as_nop + gt_cv_locale_fake=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5 +printf "%s\n" "$gt_cv_locale_fake" >&6; } + ;; + *) gt_cv_locale_fake=no ;; + esac + case "$gt_cv_locale_fake" in + *yes) + +printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h + + ;; + esac + + case "$gt_cv_func_uselocale_works" in + *yes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5 +printf %s "checking for Solaris 11.4 locale system... " >&6; } +if test ${gt_cv_locale_solaris114+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case "$host_os" in + solaris*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + struct _LC_locale_t *x; + locale_t y; + +int +main (void) +{ +*y = x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gt_cv_locale_solaris114=yes +else $as_nop + gt_cv_locale_solaris114=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + *) gt_cv_locale_solaris114=no ;; + esac + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5 +printf "%s\n" "$gt_cv_locale_solaris114" >&6; } + ;; + *) gt_cv_locale_solaris114=no ;; + esac + if test $gt_cv_locale_solaris114 = yes; then + +printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h + + fi + + case "$gt_cv_func_uselocale_works" in + *yes) + ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l" +if test "x$ac_cv_func_getlocalename_l" = xyes +then : + printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h + +fi + + ;; + esac + + gt_nameless_locales=no + if false; then + gt_nameless_locales=yes + +printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +printf %s "checking for CFPreferencesCopyAppValue... " >&6; } +if test ${gt_cv_func_CFPreferencesCopyAppValue+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else $as_nop + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +printf %s "checking for CFLocaleCopyCurrent... " >&6; } +if test ${gt_cv_func_CFLocaleCopyCurrent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyCurrent=yes +else $as_nop + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else $as_nop + gt_cv_func_CFLocaleCopyPreferredLanguages=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + +printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5 +printf %s "checking for flexible array members... " >&6; } +if test ${ac_cv_c_flexmember+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + struct s { int n; double d[]; }; +int +main (void) +{ +int m = getchar (); + struct s *p = (struct s *) malloc (offsetof (struct s, d) + + m * sizeof (double)); + p->d[0] = 0.0; + return p->d != (double *) NULL; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_flexmember=yes +else $as_nop + ac_cv_c_flexmember=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 +printf "%s\n" "$ac_cv_c_flexmember" >&6; } + if test $ac_cv_c_flexmember = yes; then + +printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h + + else + printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h + + fi + + + + + + + + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="ar" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + + if test -z "$ARFLAGS"; then + ARFLAGS='cr' + fi + + + + + case "$enable_silent_rules" in + yes) INTL_DEFAULT_VERBOSITY=0;; + no) INTL_DEFAULT_VERBOSITY=1;; + *) INTL_DEFAULT_VERBOSITY=1;; + esac + + + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t long" >>confdefs.h + + +fi + + ac_fn_c_check_header_compile "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default" +if test "x$ac_cv_header_features_h" = xyes +then : + printf "%s\n" "#define HAVE_FEATURES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes +then : + printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + +fi + + ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" +if test "x$ac_cv_func_asprintf" = xyes +then : + printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fwprintf" "ac_cv_func_fwprintf" +if test "x$ac_cv_func_fwprintf" = xyes +then : + printf "%s\n" "#define HAVE_FWPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale" +if test "x$ac_cv_func_newlocale" = xyes +then : + printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" +if test "x$ac_cv_func_putenv" = xyes +then : + printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes +then : + printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes +then : + printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" +if test "x$ac_cv_func_strnlen" = xyes +then : + printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" +if test "x$ac_cv_func_uselocale" = xyes +then : + printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen" +if test "x$ac_cv_func_wcslen" = xyes +then : + printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen" +if test "x$ac_cv_func_wcsnlen" = xyes +then : + printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc" +if test "x$ac_cv_func_mbrtowc" = xyes +then : + printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" +if test "x$ac_cv_func_wcrtomb" = xyes +then : + printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h + +fi + + + ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__snprintf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__snwprintf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SNWPRINTF $ac_have_decl" >>confdefs.h + + + ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getc_unlocked" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h + + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + + if test "$ac_cv_func_newlocale" = yes; then + HAVE_NEWLOCALE=1 + else + HAVE_NEWLOCALE=0 + fi + + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 +printf %s "checking for nl_langinfo and CODESET... " >&6; } +if test ${am_cv_langinfo_codeset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +char* cs = nl_langinfo(CODESET); return !cs; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + am_cv_langinfo_codeset=yes +else $as_nop + am_cv_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 +printf "%s\n" "$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then + +printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +printf %s "checking for LC_MESSAGES... " >&6; } +if test ${gt_cv_val_LC_MESSAGES+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_val_LC_MESSAGES=yes +else $as_nop + gt_cv_val_LC_MESSAGES=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 +printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; } + if test $gt_cv_val_LC_MESSAGES = yes; then + +printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h + + fi + + + if test $gt_nameless_locales = yes; then + HAVE_NAMELESS_LOCALES=1 + else + HAVE_NAMELESS_LOCALES=0 + fi + + + if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac + else + is_woe32dll=no + fi + WOE32DLL=$is_woe32dll + + + case "$host_os" in + mingw* | cygwin*) is_woe32=yes ;; + *) is_woe32=no ;; + esac + WOE32=$is_woe32 + + if test $WOE32 = yes; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_WINDRES+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +printf "%s\n" "$WINDRES" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_WINDRES+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_WINDRES="windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +printf "%s\n" "$ac_ct_WINDRES" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + + fi + + + + + + + + + + + + + + + + + + + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +printf %s "checking for CFPreferencesCopyAppValue... " >&6; } +if test ${gt_cv_func_CFPreferencesCopyAppValue+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else $as_nop + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +printf %s "checking for CFLocaleCopyCurrent... " >&6; } +if test ${gt_cv_func_CFLocaleCopyCurrent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyCurrent=yes +else $as_nop + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else $as_nop + gt_cv_func_CFLocaleCopyPreferredLanguages=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + +printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5 +printf %s "checking whether included gettext is requested... " >&6; } + +# Check whether --with-included-gettext was given. +if test ${with_included_gettext+y} +then : + withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval +else $as_nop + nls_cv_force_use_gnu_gettext=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5 +printf "%s\n" "$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 + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +printf %s "checking for GNU gettext in libc... " >&6; } +if eval test \${$gt_func_gnugettext_libc+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + +int +main (void) +{ + +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$gt_func_gnugettext_libc=yes" +else $as_nop + eval "$gt_func_gnugettext_libc=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$gt_func_gnugettext_libc + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "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+y} +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/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + HAVE_LIBINTL= + 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= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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 "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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 "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_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 "$acl_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 + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + 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* | gnu* | k*bsd*-gnu) 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/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) 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 "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_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=\"$acl_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 + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +printf %s "checking for GNU gettext in libintl... " >&6; } +if eval test \${$gt_func_gnugettext_libintl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + +int +main (void) +{ + +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$gt_func_gnugettext_libintl=yes" +else $as_nop + eval "$gt_func_gnugettext_libintl=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + +int +main (void) +{ + +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +eval ac_res=\$$gt_func_gnugettext_libintl + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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 $LIBTHREAD" + LTLIBINTL="lib/intl/libintl.a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + CATOBJEXT=.gmo + fi + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h + + else + USE_NLS=no + fi + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +printf %s "checking whether to use NLS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +printf %s "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +printf "%s\n" "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +printf %s "checking how to link with libintl... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +printf "%s\n" "$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 + + +printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h + + +printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h + + 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 + + + INTLOBJS= + 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=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +printf %s "checking for $ac_hdr that defines DIR... " >&6; } +if eval test \${$as_ac_Header+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main (void) +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_ac_Header=yes" +else $as_nop + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char opendir (); +int +main (void) +{ +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 + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : + +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char opendir (); +int +main (void) +{ +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 + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : + +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$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 + + +ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mkdev_h" = xyes +then : + +printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h + +fi + +if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = xyes +then : + +printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h + +fi + +fi + + + + ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h + +fi + + + +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" +if test "x$ac_cv_header_stdarg_h" = xyes +then : + printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" +if test "x$ac_cv_header_varargs_h" = xyes +then : + printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default" +if test "x$ac_cv_header_memory_h" = xyes +then : + printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = xyes +then : + printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default" +if test "x$ac_cv_header_termcap_h" = xyes +then : + printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default" +if test "x$ac_cv_header_termio_h" = xyes +then : + printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" +if test "x$ac_cv_header_termios_h" = xyes +then : + printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" +if test "x$ac_cv_header_stdbool_h" = xyes +then : + printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes +then : + printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" +if test "x$ac_cv_header_grp_h" = xyes +then : + printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" +if test "x$ac_cv_header_strings_h" = xyes +then : + printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default" +if test "x$ac_cv_header_regex_h" = xyes +then : + printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" +if test "x$ac_cv_header_syslog_h" = xyes +then : + printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ulimit.h" "ac_cv_header_ulimit_h" "$ac_includes_default" +if test "x$ac_cv_header_ulimit_h" = xyes +then : + printf "%s\n" "#define HAVE_ULIMIT_H 1" >>confdefs.h + +fi + +ac_fn_c_check_header_compile "$LINENO" "sys/pte.h" "ac_cv_header_sys_pte_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_pte_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PTE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stream_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_select_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_file_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mman_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_random_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_times_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_wait_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h + +fi + +ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes +then : + printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h + +fi + + +ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" " +#if HAVE_SYS_STREAM_H +# include +#endif + +" +if test "x$ac_cv_header_sys_ptem_h" = xyes +then : + +fi + + +ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" " +#if HAVE_SYS_TIME_H +# include +#endif + +" +if test "x$ac_cv_header_sys_resource_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h + +fi + + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_working_alloca_h=yes +else $as_nop + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +# endif +#endif + +int +main (void) +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_alloca_works=yes +else $as_nop + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } +fi + +if test $ac_cv_func_alloca_works = yes; then + +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h + +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 + +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_c_stack_direction=0 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_c_stack_direction=1 +else $as_nop + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_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 $as_nop + ac_cv_type_uid_t=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +printf "%s\n" "#define uid_t int" >>confdefs.h + + +printf "%s\n" "#define gid_t int" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 +printf %s "checking for working chown... " >&6; } +if test ${ac_cv_func_chown_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_chown_works=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_chown_works=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include + +int +main (void) +{ + char *f = "conftest.chown"; + struct stat before, after; + + if (creat (f, 0600) < 0) + return 1; + if (stat (f, &before) < 0) + return 1; + if (chown (f, (uid_t) -1, (gid_t) -1) == -1) + return 1; + if (stat (f, &after) < 0) + return 1; + return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_chown_works=yes +else $as_nop + ac_cv_func_chown_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +rm -f conftest.chown + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 +printf "%s\n" "$ac_cv_func_chown_works" >&6; } +if test $ac_cv_func_chown_works = yes; then + +printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 +printf %s "checking whether getpgrp requires zero arguments... " >&6; } +if test ${ac_cv_func_getpgrp_void+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Use it with a single arg. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +getpgrp (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_func_getpgrp_void=no +else $as_nop + ac_cv_func_getpgrp_void=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 +printf "%s\n" "$ac_cv_func_getpgrp_void" >&6; } +if test $ac_cv_func_getpgrp_void = yes; then + +printf "%s\n" "#define GETPGRP_VOID 1" >>confdefs.h + +fi + + + +if test "x$ac_cv_func_vprintf" = xno +then : + ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" +if test "x$ac_cv_func__doprnt" = xyes +then : + +printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h + +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5 +printf %s "checking for working strcoll... " >&6; } +if test ${ac_cv_func_strcoll_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_strcoll_works=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_strcoll_works=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +return (strcoll ("abc", "def") >= 0 || + strcoll ("ABC", "DEF") >= 0 || + strcoll ("123", "456") >= 0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_strcoll_works=yes +else $as_nop + ac_cv_func_strcoll_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5 +printf "%s\n" "$ac_cv_func_strcoll_works" >&6; } +if test $ac_cv_func_strcoll_works = yes; then + +printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h + +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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5 +printf %s "checking for declaration of vprintf in stdio.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_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 -rf conftest* + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5 +printf "%s\n" "$ac_cv_func_vprintf" >&6; } + if test $ac_cv_func_vprintf = yes; then + printf "%s\n" "#define HAVE_VPRINTF 1" >>confdefs.h + + 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 + +ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype" +if test "x$ac_cv_func___setostype" = xyes +then : + printf "%s\n" "#define HAVE_SETOSTYPE 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" +if test "x$ac_cv_func_wait3" = xyes +then : + printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" +if test "x$ac_cv_func_mkfifo" = xyes +then : + printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h + +else $as_nop + printf "%s\n" "#define MKFIFO_MISSING 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" +if test "x$ac_cv_func_dup2" = xyes +then : + printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess" +if test "x$ac_cv_func_eaccess" = xyes +then : + printf "%s\n" "#define HAVE_EACCESS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" +if test "x$ac_cv_func_fcntl" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" +if test "x$ac_cv_func_getdtablesize" = xyes +then : + printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" +if test "x$ac_cv_func_getentropy" = xyes +then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" +if test "x$ac_cv_func_getgroups" = xyes +then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" +if test "x$ac_cv_func_gethostname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes +then : + printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername" +if test "x$ac_cv_func_getpeername" = xyes +then : + printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom" +if test "x$ac_cv_func_getrandom" = xyes +then : + printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit" +if test "x$ac_cv_func_getrlimit" = xyes +then : + printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" +if test "x$ac_cv_func_getrusage" = xyes +then : + printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes +then : + printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill" +if test "x$ac_cv_func_kill" = xyes +then : + printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg" +if test "x$ac_cv_func_killpg" = xyes +then : + printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat" +if test "x$ac_cv_func_lstat" = xyes +then : + printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "pselect" "ac_cv_func_pselect" +if test "x$ac_cv_func_pselect" = xyes +then : + printf "%s\n" "#define HAVE_PSELECT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink" +if test "x$ac_cv_func_readlink" = xyes +then : + printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" +if test "x$ac_cv_func_select" = xyes +then : + printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" +if test "x$ac_cv_func_setdtablesize" = xyes +then : + printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" +if test "x$ac_cv_func_setitimer" = xyes +then : + printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp" +if test "x$ac_cv_func_tcgetpgrp" = xyes +then : + printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = xyes +then : + printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ulimit" "ac_cv_func_ulimit" +if test "x$ac_cv_func_ulimit" = xyes +then : + printf "%s\n" "#define HAVE_ULIMIT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" +if test "x$ac_cv_func_waitpid" = xyes +then : + printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename" +if test "x$ac_cv_func_rename" = xyes +then : + printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" rename.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS rename.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "bcopy" "ac_cv_func_bcopy" +if test "x$ac_cv_func_bcopy" = xyes +then : + printf "%s\n" "#define HAVE_BCOPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "bzero" "ac_cv_func_bzero" +if test "x$ac_cv_func_bzero" = xyes +then : + printf "%s\n" "#define HAVE_BZERO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr" +if test "x$ac_cv_func_confstr" = xyes +then : + printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat" +if test "x$ac_cv_func_faccessat" = xyes +then : + printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch" +if test "x$ac_cv_func_fnmatch" = xyes +then : + printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname" +if test "x$ac_cv_func_getservbyname" = xyes +then : + printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent" +if test "x$ac_cv_func_getservent" = xyes +then : + printf "%s\n" "#define HAVE_GETSERVENT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" +if test "x$ac_cv_func_inet_aton" = xyes +then : + printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "imaxdiv" "ac_cv_func_imaxdiv" +if test "x$ac_cv_func_imaxdiv" = xyes +then : + printf "%s\n" "#define HAVE_IMAXDIV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" +if test "x$ac_cv_func_memmove" = xyes +then : + printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf" +if test "x$ac_cv_func_pathconf" = xyes +then : + printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" +if test "x$ac_cv_func_putenv" = xyes +then : + printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise" +if test "x$ac_cv_func_raise" = xyes +then : + printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random" +if test "x$ac_cv_func_random" = xyes +then : + printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp" +if test "x$ac_cv_func_regcomp" = xyes +then : + printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "regexec" "ac_cv_func_regexec" +if test "x$ac_cv_func_regexec" = xyes +then : + printf "%s\n" "#define HAVE_REGEXEC 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes +then : + printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf" +if test "x$ac_cv_func_setlinebuf" = xyes +then : + printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" +if test "x$ac_cv_func_setvbuf" = xyes +then : + printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt" +if test "x$ac_cv_func_siginterrupt" = xyes +then : + printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" +if test "x$ac_cv_func_strchr" = xyes +then : + printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" +if test "x$ac_cv_func_sysconf" = xyes +then : + printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog" +if test "x$ac_cv_func_syslog" = xyes +then : + printf "%s\n" "#define HAVE_SYSLOG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr" +if test "x$ac_cv_func_tcgetattr" = xyes +then : + printf "%s\n" "#define HAVE_TCGETATTR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" +if test "x$ac_cv_func_times" = xyes +then : + printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname" +if test "x$ac_cv_func_ttyname" = xyes +then : + printf "%s\n" "#define HAVE_TTYNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" +if test "x$ac_cv_func_tzset" = xyes +then : + printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" +if test "x$ac_cv_func_unsetenv" = xyes +then : + printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" +if test "x$ac_cv_func_vasprintf" = xyes +then : + printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" +if test "x$ac_cv_func_asprintf" = xyes +then : + printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii" +if test "x$ac_cv_func_isascii" = xyes +then : + printf "%s\n" "#define HAVE_ISASCII 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank" +if test "x$ac_cv_func_isblank" = xyes +then : + printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "isgraph" "ac_cv_func_isgraph" +if test "x$ac_cv_func_isgraph" = xyes +then : + printf "%s\n" "#define HAVE_ISGRAPH 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "isprint" "ac_cv_func_isprint" +if test "x$ac_cv_func_isprint" = xyes +then : + printf "%s\n" "#define HAVE_ISPRINT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "isspace" "ac_cv_func_isspace" +if test "x$ac_cv_func_isspace" = xyes +then : + printf "%s\n" "#define HAVE_ISSPACE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "isxdigit" "ac_cv_func_isxdigit" +if test "x$ac_cv_func_isxdigit" = xyes +then : + printf "%s\n" "#define HAVE_ISXDIGIT 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent" +if test "x$ac_cv_func_getpwent" = xyes +then : + printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" +if test "x$ac_cv_func_getpwnam" = xyes +then : + printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid" +if test "x$ac_cv_func_getpwuid" = xyes +then : + printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" +if test "x$ac_cv_func_mkdtemp" = xyes +then : + printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" +if test "x$ac_cv_func_arc4random" = xyes +then : + printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes +then : + printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" getcwd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes +then : + printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" memset.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memset.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strcasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes +then : + printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strcasestr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes +then : + printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strerror.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strerror.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" +if test "x$ac_cv_func_strftime" = xyes +then : + printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strftime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strftime.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" +if test "x$ac_cv_func_strnlen" = xyes +then : + printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strnlen.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk" +if test "x$ac_cv_func_strpbrk" = xyes +then : + printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strpbrk.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = xyes +then : + printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strstr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" +if test "x$ac_cv_func_strtod" = xyes +then : + printf "%s\n" "#define HAVE_STRTOD 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes +then : + printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtol.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtol.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtoul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" +if test "x$ac_cv_func_strtoll" = xyes +then : + printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtoll.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoll.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes +then : + printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtoull.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" +if test "x$ac_cv_func_strtoumax" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUMAX 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtoumax.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf" +if test "x$ac_cv_func_dprintf" = xyes +then : + printf "%s\n" "#define HAVE_DPRINTF 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" dprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS dprintf.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" +if test "x$ac_cv_func_strchrnul" = xyes +then : + printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strchrnul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes +then : + printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strdup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strdup.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_header_compile "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" +if test "x$ac_cv_header_libaudit_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBAUDIT_H 1" >>confdefs.h + +fi + +ac_fn_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl" >>confdefs.h + + +ac_fn_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_confstr" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_CONFSTR $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_printf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_PRINTF $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_sbrk" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_SBRK $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_setregid" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_SETREGID $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strcpy" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRCPY $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strsignal" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRSIGNAL $ac_have_decl" >>confdefs.h + + +ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" +if test "x$ac_cv_func_setresuid" = xyes +then : + printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid" +if test "x$ac_cv_func_setresgid" = xyes +then : + printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h + +fi + + +ac_fn_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtold" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOLD $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5 +printf %s "checking for broken strtold... " >&6; } + if test ${bash_cv_strtold_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +long double r; char *foo, bar; r = strtold(foo, &bar); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_strtold_broken=no +else $as_nop + bash_cv_strtold_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5 +printf "%s\n" "$bash_cv_strtold_broken" >&6; } + if test "$bash_cv_strtold_broken" = "yes" ; then + printf "%s\n" "#define STRTOLD_BROKEN 1" >>confdefs.h + + fi + +fi + + +ac_fn_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtol" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOL $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoll" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoul" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOUL $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoull" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoumax" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 +printf %s "checking for working mktime... " >&6; } +if test ${ac_cv_func_working_mktime+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_func_working_mktime=no +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Test program from Paul Eggert and Tony Leneis. */ +#include +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#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 const char *tz_strings[] = { + (const 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 ((char*) "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 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (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 (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 ((char*) "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 (void) +{ + 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 ((char*) 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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_working_mktime=yes +else $as_nop + ac_cv_func_working_mktime=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 +printf "%s\n" "$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 + + + +ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default" +if test "x$ac_cv_header_argz_h" = xyes +then : + printf "%s\n" "#define HAVE_ARGZ_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdio_ext.h" "ac_cv_header_stdio_ext_h" "$ac_includes_default" +if test "x$ac_cv_header_stdio_ext_h" = xyes +then : + printf "%s\n" "#define HAVE_STDIO_EXT_H 1" >>confdefs.h + +fi + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +printf %s "checking for working mmap... " >&6; } +if test ${ac_cv_func_mmap_fixed_mapped+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + linux*) ac_cv_func_mmap_fixed_mapped=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_mmap_fixed_mapped=no ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# 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 (void) +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + 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 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* 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 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* 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 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + free (data); + free (data3); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_mmap_fixed_mapped=yes +else $as_nop + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + +ac_fn_c_check_func "$LINENO" "__argz_count" "ac_cv_func___argz_count" +if test "x$ac_cv_func___argz_count" = xyes +then : + printf "%s\n" "#define HAVE___ARGZ_COUNT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "__argz_next" "ac_cv_func___argz_next" +if test "x$ac_cv_func___argz_next" = xyes +then : + printf "%s\n" "#define HAVE___ARGZ_NEXT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "__argz_stringify" "ac_cv_func___argz_stringify" +if test "x$ac_cv_func___argz_stringify" = xyes +then : + printf "%s\n" "#define HAVE___ARGZ_STRINGIFY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" +if test "x$ac_cv_func_dcgettext" = xyes +then : + printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" +if test "x$ac_cv_func_mempcpy" = xyes +then : + printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" +if test "x$ac_cv_func_munmap" = xyes +then : + printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap" +if test "x$ac_cv_func_mremap" = xyes +then : + printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" +if test "x$ac_cv_func_stpcpy" = xyes +then : + printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn" +if test "x$ac_cv_func_strcspn" = xyes +then : + printf "%s\n" "#define HAVE_STRCSPN 1" >>confdefs.h + +fi + + +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_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" +if test "x$ac_cv_header_wctype_h" = xyes +then : + printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h + +fi + +ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +if test "x$ac_cv_header_wchar_h" = xyes +then : + printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h + +fi + +ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_langinfo_h" = xyes +then : + printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h + +fi + + +ac_fn_c_check_header_compile "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default" +if test "x$ac_cv_header_mbstr_h" = xyes +then : + printf "%s\n" "#define HAVE_MBSTR_H 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen" +if test "x$ac_cv_func_mbrlen" = xyes +then : + printf "%s\n" "#define HAVE_MBRLEN 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp" +if test "x$ac_cv_func_mbscasecmp" = xyes +then : + printf "%s\n" "#define HAVE_MBSCMP 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp" +if test "x$ac_cv_func_mbscmp" = xyes +then : + printf "%s\n" "#define HAVE_MBSCMP 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs" +if test "x$ac_cv_func_mbsnrtowcs" = xyes +then : + printf "%s\n" "#define HAVE_MBSNRTOWCS 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs" +if test "x$ac_cv_func_mbsrtowcs" = xyes +then : + printf "%s\n" "#define HAVE_MBSRTOWCS 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr" +if test "x$ac_cv_func_mbschr" = xyes +then : + printf "%s\n" "#define HAVE_MBSCHR 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" mbschr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mbschr.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" +if test "x$ac_cv_func_wcrtomb" = xyes +then : + printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll" +if test "x$ac_cv_func_wcscoll" = xyes +then : + printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup" +if test "x$ac_cv_func_wcsdup" = xyes +then : + printf "%s\n" "#define HAVE_WCSDUP 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth" +if test "x$ac_cv_func_wcwidth" = xyes +then : + printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" +if test "x$ac_cv_func_wctype" = xyes +then : + printf "%s\n" "#define HAVE_WCTYPE 1" >>confdefs.h + +fi + + +ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth" +if test "x$ac_cv_func_wcswidth" = xyes +then : + printf "%s\n" "#define HAVE_WCSWIDTH 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" wcswidth.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext" + ;; +esac + +fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5 +printf %s "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } +if test ${ac_cv_func_mbrtowc+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +wchar_t wc; + char const s[] = ""; + size_t n = 1; + mbstate_t state; + return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_mbrtowc=yes +else $as_nop + ac_cv_func_mbrtowc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 +printf "%s\n" "$ac_cv_func_mbrtowc" >&6; } + if test $ac_cv_func_mbrtowc = yes; then + +printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h + + fi + +if test $ac_cv_func_mbrtowc = yes; then + printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "iswlower" "ac_cv_func_iswlower" +if test "x$ac_cv_func_iswlower" = xyes +then : + printf "%s\n" "#define HAVE_ISWLOWER 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper" +if test "x$ac_cv_func_iswupper" = xyes +then : + printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" +if test "x$ac_cv_func_towlower" = xyes +then : + printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper" +if test "x$ac_cv_func_towupper" = xyes +then : + printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "iswctype" "ac_cv_func_iswctype" +if test "x$ac_cv_func_iswctype" = xyes +then : + printf "%s\n" "#define HAVE_ISWCTYPE 1" >>confdefs.h + +fi + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5 +printf %s "checking for wchar_t in wchar.h... " >&6; } +if test ${bash_cv_type_wchar_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int +main (void) +{ + + wchar_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_type_wchar_t=yes +else $as_nop + bash_cv_type_wchar_t=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5 +printf "%s\n" "$bash_cv_type_wchar_t" >&6; } +if test $bash_cv_type_wchar_t = yes; then + +printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5 +printf %s "checking for wctype_t in wctype.h... " >&6; } +if test ${bash_cv_type_wctype_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int +main (void) +{ + + wctype_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_type_wctype_t=yes +else $as_nop + bash_cv_type_wctype_t=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5 +printf "%s\n" "$bash_cv_type_wctype_t" >&6; } +if test $bash_cv_type_wctype_t = yes; then + +printf "%s\n" "#define HAVE_WCTYPE_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5 +printf %s "checking for wint_t in wctype.h... " >&6; } +if test ${bash_cv_type_wint_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int +main (void) +{ + + wint_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_type_wint_t=yes +else $as_nop + bash_cv_type_wint_t=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5 +printf "%s\n" "$bash_cv_type_wint_t" >&6; } +if test $bash_cv_type_wint_t = yes; then + +printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5 +printf %s "checking for wcwidth broken with unicode combining characters... " >&6; } +if test ${bash_cv_wcwidth_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + bash_cv_wcwidth_broken=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +#include +#include + +int +main(c, v) +int c; +char **v; +{ + int w; + + setlocale(LC_ALL, "en_US.UTF-8"); + w = wcwidth (0x0301); + exit (w == 0); /* exit 0 if wcwidth broken */ +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_wcwidth_broken=yes +else $as_nop + bash_cv_wcwidth_broken=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5 +printf "%s\n" "$bash_cv_wcwidth_broken" >&6; } +if test "$bash_cv_wcwidth_broken" = yes; then + +printf "%s\n" "#define WCWIDTH_BROKEN 1" >>confdefs.h + +fi + +if test "$am_cv_func_iconv" = yes; then + OLDLIBS="$LIBS" + LIBS="$LIBS $LIBINTL $LIBICONV" + ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" +if test "x$ac_cv_func_locale_charset" = xyes +then : + printf "%s\n" "#define HAVE_LOCALE_CHARSET 1" >>confdefs.h + +fi + + LIBS="$OLDLIBS" +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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 +printf %s "checking size of wchar_t... " >&6; } +if test ${ac_cv_sizeof_wchar_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_wchar_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (wchar_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_wchar_t=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 +printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h + + + + + +if test "$opt_static_link" != yes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char dlopen (); +int +main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dl_dlopen=yes +else $as_nop + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : + printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h + + LIBS="-ldl $LIBS" + +fi + +ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes +then : + printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "dlclose" "ac_cv_func_dlclose" +if test "x$ac_cv_func_dlclose" = xyes +then : + printf "%s\n" "#define HAVE_DLCLOSE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "dlsym" "ac_cv_func_dlsym" +if test "x$ac_cv_func_dlsym" = xyes +then : + printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h + +fi + +fi + +if test "$ac_cv_func_inet_aton" != 'yes'; then + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 +printf %s "checking for inet_aton... " >&6; } +if test ${bash_cv_func_inet_aton+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +struct in_addr ap; +int +main (void) +{ + inet_aton("127.0.0.1", &ap); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_func_inet_aton=yes +else $as_nop + bash_cv_func_inet_aton=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5 +printf "%s\n" "$bash_cv_func_inet_aton" >&6; } +if test $bash_cv_func_inet_aton = yes; then + printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" inet_aton.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" + ;; +esac + +fi + +fi + +case "$host_os" in +irix4*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5 +printf %s "checking for getpwent in -lsun... " >&6; } +if test ${ac_cv_lib_sun_getpwent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsun $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char getpwent (); +int +main (void) +{ +return getpwent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_sun_getpwent=yes +else $as_nop + ac_cv_lib_sun_getpwent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5 +printf "%s\n" "$ac_cv_lib_sun_getpwent" >&6; } +if test "x$ac_cv_lib_sun_getpwent" = xyes +then : + printf "%s\n" "#define HAVE_LIBSUN 1" >>confdefs.h + + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5 +printf %s "checking for socket library... " >&6; } +_bash_needmsg=yes +fi +if test ${bash_cv_have_socklib+y} +then : + printf %s "(cached) " >&6 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5 +printf %s "checking for getpeername in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_getpeername+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket -lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char getpeername (); +int +main (void) +{ +return getpeername (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_socket_getpeername=yes +else $as_nop + ac_cv_lib_socket_getpeername=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5 +printf "%s\n" "$ac_cv_lib_socket_getpeername" >&6; } +if test "x$ac_cv_lib_socket_getpeername" = xyes +then : + bash_cv_have_socklib=yes +else $as_nop + bash_cv_have_socklib=no +fi + +fi + +if test "X$_bash_needmsg" = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5 +printf %s "checking for libnsl... " >&6; } + _bash_needmsg=yes + fi + if test ${bash_cv_have_libnsl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 +printf %s "checking for t_open in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_t_open+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char t_open (); +int +main (void) +{ +return t_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_nsl_t_open=yes +else $as_nop + ac_cv_lib_nsl_t_open=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 +printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; } +if test "x$ac_cv_lib_nsl_t_open" = xyes +then : + bash_cv_have_libnsl=yes +else $as_nop + bash_cv_have_libnsl=no +fi + +fi + + if test "X$_bash_needmsg" = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5 +printf "%s\n" "$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 + printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h + + printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h + +fi + +fi +if test "$ac_cv_func_gethostbyname" = no; then + if test "X$bash_cv_have_gethostbyname" = "X"; then +_bash_needmsg=yes +else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 +printf %s "checking for gethostbyname in socket library... " >&6; } +_bash_needmsg= +fi +if test ${bash_cv_have_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main (void) +{ + +struct hostent *hp; +hp = gethostbyname("localhost"); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_have_gethostbyname=yes +else $as_nop + bash_cv_have_gethostbyname=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "X$_bash_needmsg" = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 +printf %s "checking for gethostbyname in socket library... " >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5 +printf "%s\n" "$bash_cv_have_gethostbyname" >&6; } +if test "$bash_cv_have_gethostbyname" = yes; then +printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h + +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +printf %s "checking type of array argument to getgroups... " >&6; } +if test ${ac_cv_type_getgroups+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ac_cv_type_getgroups=cross +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 (void) +{ + 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 +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_type_getgroups=gid_t +else $as_nop + ac_cv_type_getgroups=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_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 $as_nop + ac_cv_type_getgroups=int +fi +rm -rf conftest* + +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +printf "%s\n" "$ac_cv_type_getgroups" >&6; } + +printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h + + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define off_t long int" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define mode_t int" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_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 $as_nop + ac_cv_type_uid_t=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +printf "%s\n" "#define uid_t int" >>confdefs.h + + +printf "%s\n" "#define gid_t int" >>confdefs.h + +fi + + + ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default +" +if test "x$ac_cv_type_pid_t" = xyes +then : + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #if defined _WIN64 && !defined __CYGWIN__ + LLP64 + #endif + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_pid_type='int' +else $as_nop + ac_pid_type='__int64' +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h + + +fi + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define size_t unsigned int" >>confdefs.h + +fi + + + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = xyes +then : + +printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h + +else $as_nop + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ssize_t int" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" +if test "x$ac_cv_type_time_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define time_t long" >>confdefs.h + +fi + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +printf %s "checking for long long int... " >&6; } +if test ${ac_cv_type_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes +then : + : +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main (void) +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + +else $as_nop + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +printf %s "checking for unsigned long long int... " >&6; } +if test ${ac_cv_type_unsigned_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_unsigned_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main (void) +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +else $as_nop + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5 +printf %s "checking for sig_atomic_t in signal.h... " >&6; } +if test ${ac_cv_have_sig_atomic_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include +int +main (void) +{ + sig_atomic_t x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_have_sig_atomic_t=yes +else $as_nop + ac_cv_have_sig_atomic_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5 +printf "%s\n" "$ac_cv_have_sig_atomic_t" >&6; } +if test "$ac_cv_have_sig_atomic_t" = "no" +then + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5 +printf %s "checking for sig_atomic_t... " >&6; } +if test ${bash_cv_type_sig_atomic_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_STDDEF_H +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sig_atomic_t" >/dev/null 2>&1 +then : + bash_cv_type_sig_atomic_t=yes +else $as_nop + bash_cv_type_sig_atomic_t=no +fi +rm -rf conftest* + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5 +printf "%s\n" "$bash_cv_type_sig_atomic_t" >&6; } + +if test $bash_cv_type_sig_atomic_t = no; then + printf "%s\n" "#define sig_atomic_t int" >>confdefs.h + +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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 +printf %s "checking size of char... " >&6; } +if test ${ac_cv_sizeof_char+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_char" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 +printf "%s\n" "$ac_cv_sizeof_char" >&6; } + + + +printf "%s\n" "#define SIZEOF_CHAR $ac_cv_sizeof_char" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +printf %s "checking size of short... " >&6; } +if test ${ac_cv_sizeof_short+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_short" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (short) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_short=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +printf "%s\n" "$ac_cv_sizeof_short" >&6; } + + + +printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +printf %s "checking size of int... " >&6; } +if test ${ac_cv_sizeof_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +printf "%s\n" "$ac_cv_sizeof_int" >&6; } + + + +printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +printf %s "checking size of long... " >&6; } +if test ${ac_cv_sizeof_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long" >&6; } + + + +printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5 +printf %s "checking size of char *... " >&6; } +if test ${ac_cv_sizeof_char_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_char_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (char *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_char_p=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5 +printf "%s\n" "$ac_cv_sizeof_char_p" >&6; } + + + +printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +printf %s "checking size of size_t... " >&6; } +if test ${ac_cv_sizeof_size_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_size_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_size_t=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +printf %s "checking size of double... " >&6; } +if test ${ac_cv_sizeof_double+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_double" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_double=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +printf "%s\n" "$ac_cv_sizeof_double" >&6; } + + + +printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h + + +# 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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +printf %s "checking size of long long... " >&6; } +if test ${ac_cv_sizeof_long_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_long_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } + + + +printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h + + + +ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default" +if test "x$ac_cv_type_u_int" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_int unsigned int" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default" +if test "x$ac_cv_type_u_long" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_long unsigned long" >>confdefs.h + +fi + + + +if test "$ac_cv_sizeof_short" = 2; then + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits16_t short" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_char" = 2; then + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits16_t char" >>confdefs.h + +fi + +else + ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits16_t short" >>confdefs.h + +fi + +fi + + +if test "$ac_cv_sizeof_short" = 2; then + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_char" = 2; then + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits16_t unsigned char" >>confdefs.h + +fi + +else + ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits16_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h + +fi + +fi + + +if test "$ac_cv_sizeof_int" = 4; then + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits32_t int" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_long" = 4; then + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits32_t long" >>confdefs.h + +fi + +else + ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits32_t int" >>confdefs.h + +fi + +fi + + +if test "$ac_cv_sizeof_int" = 4; then + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_long" = 4; then + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits32_t unsigned long" >>confdefs.h + +fi + +else + ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" +if test "x$ac_cv_type_u_bits32_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h + +fi + +fi + + +if test "$ac_cv_sizeof_char_p" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t char *" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_double" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t double" >>confdefs.h + +fi + +elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t long long" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_long" = 8; then + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t long" >>confdefs.h + +fi + +else + ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" +if test "x$ac_cv_type_bits64_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define bits64_t double" >>confdefs.h + +fi + +fi + + + +if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t int" >>confdefs.h + +fi + +elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t long" >>confdefs.h + +fi + +elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t long long" >>confdefs.h + +fi + +else + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ptrdiff_t int" >>confdefs.h + +fi + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +printf %s "checking whether stat file-mode macros are broken... " >&6; } +if test ${ac_cv_header_stat_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +#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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_header_stat_broken=no +else $as_nop + ac_cv_header_stat_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +printf "%s\n" "$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 +printf %s "checking whether #! works in shell scripts... " >&6; } +if test ${ac_cv_sys_interpreter+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 +printf "%s\n" "$ac_cv_sys_interpreter" >&6; } +interpval=$ac_cv_sys_interpreter + +if test $ac_cv_sys_interpreter = yes; then +printf "%s\n" "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h + +fi + +if test "$ac_cv_func_lstat" = "no"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 +printf %s "checking for lstat... " >&6; } +if test ${bash_cv_func_lstat+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + +int +main (void) +{ + lstat(".",(struct stat *)0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_func_lstat=yes +else $as_nop + bash_cv_func_lstat=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5 +printf "%s\n" "$bash_cv_func_lstat" >&6; } +if test $bash_cv_func_lstat = yes; then + printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h + +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5 +printf %s "checking if dup2 fails to clear the close-on-exec flag... " >&6; } +if test ${bash_cv_dup2_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;} + bash_cv_dup2_broken=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +int +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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_dup2_broken=yes +else $as_nop + bash_cv_dup2_broken=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5 +printf "%s\n" "$bash_cv_dup2_broken" >&6; } +if test $bash_cv_dup2_broken = yes; then +printf "%s\n" "#define DUP2_BROKEN 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5 +printf %s "checking whether pgrps need synchronization... " >&6; } +if test ${bash_cv_pgrp_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;} + bash_cv_pgrp_pipe=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_WAIT_H +# include +#endif +#include +int +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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_pgrp_pipe=no +else $as_nop + bash_cv_pgrp_pipe=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5 +printf "%s\n" "$bash_cv_pgrp_pipe" >&6; } +if test $bash_cv_pgrp_pipe = yes; then +printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 +printf %s "checking for type of signal functions... " >&6; } +if test ${bash_cv_signal_vintage+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +if test ${bash_cv_posix_signals+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main (void) +{ + + 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 +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_posix_signals=yes +else $as_nop + bash_cv_posix_signals=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + + +if test $bash_cv_posix_signals = yes; then + bash_cv_signal_vintage=posix +else + if test ${bash_cv_bsd_signals+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main (void) +{ + +int mask = sigmask(SIGINT); +sigsetmask(mask); sigblock(mask); sigpause(mask); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_bsd_signals=yes +else $as_nop + bash_cv_bsd_signals=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + + + if test $bash_cv_bsd_signals = yes; then + bash_cv_signal_vintage=4.2bsd + else + if test ${bash_cv_sysv_signals+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +void foo() { } + +int +main (void) +{ + +int mask = sigmask(SIGINT); +sigset(SIGINT, foo); sigrelse(SIGINT); +sighold(SIGINT); sigpause(SIGINT); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_sysv_signals=yes +else $as_nop + bash_cv_sysv_signals=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + + + if test $bash_cv_sysv_signals = yes; then + bash_cv_signal_vintage=svr3 + else + bash_cv_signal_vintage=v7 + fi + fi +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5 +printf "%s\n" "$bash_cv_signal_vintage" >&6; } +if test "$bash_cv_signal_vintage" = posix; then +printf "%s\n" "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h + +elif test "$bash_cv_signal_vintage" = "4.2bsd"; then +printf "%s\n" "#define HAVE_BSD_SIGNALS 1" >>confdefs.h + +elif test "$bash_cv_signal_vintage" = svr3; then +printf "%s\n" "#define HAVE_USG_SIGHOLD 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5 +printf %s "checking for sys_errlist and sys_nerr... " >&6; } +if test ${bash_cv_sys_errlist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main (void) +{ + +extern char *sys_errlist[]; +extern int sys_nerr; +char *msg = sys_errlist[sys_nerr - 1]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_sys_errlist=yes +else $as_nop + bash_cv_sys_errlist=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5 +printf "%s\n" "$bash_cv_sys_errlist" >&6; } +if test $bash_cv_sys_errlist = yes; then +printf "%s\n" "#define HAVE_SYS_ERRLIST 1" >>confdefs.h + +fi + +ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include +/* NetBSD declares sys_siglist in unistd.h. */ +#ifdef HAVE_UNISTD_H +# include +#endif + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_sys_siglist" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_SYS_SIGLIST $ac_have_decl" >>confdefs.h + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5 +printf %s "checking for sys_siglist in system C library... " >&6; } +if test ${bash_cv_sys_siglist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;} + bash_cv_sys_siglist=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#if !HAVE_DECL_SYS_SIGLIST +extern char *sys_siglist[]; +#endif +int +main() +{ +char *msg = sys_siglist[2]; +exit(msg == 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_sys_siglist=yes +else $as_nop + bash_cv_sys_siglist=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5 +printf "%s\n" "$bash_cv_sys_siglist" >&6; } +if test $bash_cv_sys_siglist = yes; then +printf "%s\n" "#define HAVE_SYS_SIGLIST 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5 +printf %s "checking for _sys_siglist in signal.h or unistd.h... " >&6; } +if test ${bash_cv_decl_under_sys_siglist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +int +main (void) +{ + char *msg = _sys_siglist[2]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_decl_under_sys_siglist=yes +else $as_nop + bash_cv_decl_under_sys_siglist=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5 +printf "%s\n" "$bash_cv_decl_under_sys_siglist" >&6; } +if test $bash_cv_decl_under_sys_siglist = yes; then +printf "%s\n" "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5 +printf %s "checking for _sys_siglist in system C library... " >&6; } +if test ${bash_cv_under_sys_siglist+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;} + bash_cv_under_sys_siglist=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#ifndef UNDER_SYS_SIGLIST_DECLARED +extern char *_sys_siglist[]; +#endif +int +main() +{ +char *msg = (char *)_sys_siglist[2]; +exit(msg == 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_under_sys_siglist=yes +else $as_nop + bash_cv_under_sys_siglist=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5 +printf "%s\n" "$bash_cv_under_sys_siglist" >&6; } +if test $bash_cv_under_sys_siglist = yes; then +printf "%s\n" "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h + +fi + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 +printf %s "checking for clock_t... " >&6; } +if test ${bash_cv_type_clock_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_STDDEF_H +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_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 $as_nop + bash_cv_type_clock_t=no +fi +rm -rf conftest* + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5 +printf "%s\n" "$bash_cv_type_clock_t" >&6; } + +if test $bash_cv_type_clock_t = no; then + printf "%s\n" "#define clock_t long" >>confdefs.h + +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5 +printf %s "checking for sigset_t... " >&6; } +if test ${bash_cv_type_sigset_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_STDDEF_H +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_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 $as_nop + bash_cv_type_sigset_t=no +fi +rm -rf conftest* + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5 +printf "%s\n" "$bash_cv_type_sigset_t" >&6; } + +if test $bash_cv_type_sigset_t = no; then + printf "%s\n" "#define sigset_t int" >>confdefs.h + +fi + +if test "$ac_cv_header_sys_socket_h" = "yes"; then + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 +printf %s "checking for socklen_t... " >&6; } +if test ${bash_cv_type_socklen_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_STDDEF_H +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#include + +_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 $as_nop + bash_cv_type_socklen_t=no +fi +rm -rf conftest* + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5 +printf "%s\n" "$bash_cv_type_socklen_t" >&6; } +if test $bash_cv_type_socklen_t = yes; then + printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h + + fi +if test $bash_cv_type_socklen_t = no; then + printf "%s\n" "#define socklen_t unsigned int" >>confdefs.h + +fi + +fi + +ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" +if test "x$ac_cv_type_quad_t" = xyes +then : + printf "%s\n" "#define HAVE_QUAD_T 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of struct rlimit fields" >&5 +printf %s "checking for type of struct rlimit fields... " >&6; } +if test ${bash_cv_type_rlimit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main (void) +{ +rlim_t xxx; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_type_rlimit=rlim_t +else $as_nop + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of struct rlimit fields" >&5 +printf %s "checking for size of struct rlimit fields... " >&6; } +if test ${bash_cv_sizeof_rlim_cur+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&5 +printf "%s\n" "$as_me: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&2;} + bash_cv_sizeof_rlim_cur=$ac_cv_sizeof_long + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TIME_H +#include +#endif +#include +#include +main() +{ +struct rlimit r; +exit(sizeof (r.rlim_cur)); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_sizeof_rlim_cur=$? +else $as_nop + bash_cv_sizeof_rlim_cur=$? +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_rlim_cur" >&5 +printf "%s\n" "$bash_cv_sizeof_rlim_cur" >&6; } + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of quad_t" >&5 +printf %s "checking for size of quad_t... " >&6; } +if test ${bash_cv_sizeof_quad_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&5 +printf "%s\n" "$as_me: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&2;} + bash_cv_sizeof_quad_t=0 + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif + +main() +{ +#if HAVE_QUAD_T +quad_t x; +exit(sizeof (x)); +#else +exit (0); +#endif +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_sizeof_quad_t=$? +else $as_nop + bash_cv_sizeof_quad_t=$? +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_quad_t" >&5 +printf "%s\n" "$bash_cv_sizeof_quad_t" >&6; } + +if test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long; then + bash_cv_type_rlimit='unsigned long' +elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long_long; then + bash_cv_type_rlimit='unsigned long long' +elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_int; then + bash_cv_type_rlimit='unsigned int' +elif test $bash_cv_sizeof_rlim_cur = $bash_cv_sizeof_quad_t; then + bash_cv_type_rlimit='quad_t' +else + bash_cv_type_rlimit='unsigned long' +fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5 +printf "%s\n" "$bash_cv_type_rlimit" >&6; } +printf "%s\n" "#define RLIMTYPE $bash_cv_type_rlimit" >>confdefs.h + + + + + + ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" +if test "x$ac_cv_type_intmax_t" = xyes +then : + +printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h + +else $as_nop + test $ac_cv_type_long_long_int = yes \ + && ac_type='long long int' \ + || ac_type='long int' + +printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h + +fi + + + + + ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default" +if test "x$ac_cv_type_uintmax_t" = xyes +then : + +printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h + +else $as_nop + test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long int' \ + || ac_type='unsigned long int' + +printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h + +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. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 +printf %s "checking size of intmax_t... " >&6; } +if test ${ac_cv_sizeof_intmax_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_intmax_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (intmax_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_intmax_t=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 +printf "%s\n" "$ac_cv_sizeof_intmax_t" >&6; } + + + +printf "%s\n" "#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t" >>confdefs.h + + + + +ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" " +#include +#include + +" +if test "x$ac_cv_member_struct_termios_c_line" = xyes +then : + printf "%s\n" "#define TERMIOS_LDISC 1" >>confdefs.h + +fi + + + +ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" " +#include +#include + +" +if test "x$ac_cv_member_struct_termio_c_line" = xyes +then : + printf "%s\n" "#define TERMIO_LDISC 1" >>confdefs.h + +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5 +printf %s "checking for struct dirent.d_ino... " >&6; } +if test ${bash_cv_dirent_has_d_ino+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + +ac_fn_c_check_member "$LINENO" "struct dirent" "d_ino" "ac_cv_member_struct_dirent_d_ino" " +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ + +" +if test "x$ac_cv_member_struct_dirent_d_ino" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h + +bash_cv_dirent_has_d_ino=yes +else $as_nop + bash_cv_dirent_has_d_ino=no +fi + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_ino" >&5 +printf "%s\n" "$bash_cv_dirent_has_d_ino" >&6; } +if test $bash_cv_dirent_has_d_ino = yes; then +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5 +printf %s "checking for struct dirent.d_fileno... " >&6; } +if test ${bash_cv_dirent_has_d_fileno+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + +ac_fn_c_check_member "$LINENO" "struct dirent" "d_fileno" "ac_cv_member_struct_dirent_d_fileno" " +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ + +" +if test "x$ac_cv_member_struct_dirent_d_fileno" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h + +bash_cv_dirent_has_d_fileno=yes +else $as_nop + bash_cv_dirent_has_d_fileno=no +fi + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5 +printf "%s\n" "$bash_cv_dirent_has_d_fileno" >&6; } +if test $bash_cv_dirent_has_d_fileno = yes; then +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5 +printf %s "checking for struct dirent.d_namlen... " >&6; } +if test ${bash_cv_dirent_has_d_namlen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + +ac_fn_c_check_member "$LINENO" "struct dirent" "d_namlen" "ac_cv_member_struct_dirent_d_namlen" " +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ + +" +if test "x$ac_cv_member_struct_dirent_d_namlen" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h + +bash_cv_dirent_has_d_namlen=yes +else $as_nop + bash_cv_dirent_has_d_namlen=no +fi + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5 +printf "%s\n" "$bash_cv_dirent_has_d_namlen" >&6; } +if test $bash_cv_dirent_has_d_namlen = yes; then +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5 +printf %s "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; } +if test ${bash_cv_struct_winsize_header+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +if test ${bash_cv_struct_winsize_ioctl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ + +struct winsize x; +if (sizeof (x) > 0) return (0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_struct_winsize_ioctl=yes +else $as_nop + bash_cv_struct_winsize_ioctl=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi + + +if test ${bash_cv_struct_winsize_termios+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ + +struct winsize x; +if (sizeof (x) > 0) return (0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_struct_winsize_termios=yes +else $as_nop + bash_cv_struct_winsize_termios=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi + + + +if test $bash_cv_struct_winsize_ioctl = yes; then + bash_cv_struct_winsize_header=ioctl_h +elif test $bash_cv_struct_winsize_termios = yes; then + bash_cv_struct_winsize_header=termios_h +else + bash_cv_struct_winsize_header=other +fi + +fi + +if test $bash_cv_struct_winsize_header = ioctl_h; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5 +printf "%s\n" "sys/ioctl.h" >&6; } + printf "%s\n" "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h + +elif test $bash_cv_struct_winsize_header = termios_h; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5 +printf "%s\n" "termios.h" >&6; } + printf "%s\n" "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h + +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +printf "%s\n" "not found" >&6; } +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5 +printf %s "checking for struct timeval in sys/time.h and time.h... " >&6; } +if test ${bash_cv_struct_timeval+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + +int +main (void) +{ +static struct timeval x; x.tv_sec = x.tv_usec; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_struct_timeval=yes +else $as_nop + bash_cv_struct_timeval=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5 +printf "%s\n" "$bash_cv_struct_timeval" >&6; } +if test $bash_cv_struct_timeval = yes; then + printf "%s\n" "#define HAVE_TIMEVAL 1" >>confdefs.h + +fi + +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test ${ac_cv_struct_tm+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main (void) +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_struct_tm=time.h +else $as_nop + ac_cv_struct_tm=sys/time.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +printf "%s\n" "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h + +fi + +ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include +#include <$ac_cv_struct_tm> + +" +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h + + +fi + +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h + +else + ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_tzname" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 +printf %s "checking for tzname... " >&6; } +if test ${ac_cv_var_tzname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main (void) +{ +return tzname[0][0]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_var_tzname=yes +else $as_nop + ac_cv_var_tzname=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 +printf "%s\n" "$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h + + fi +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5 +printf %s "checking for struct timezone in sys/time.h and time.h... " >&6; } +if test ${bash_cv_struct_timezone+y} +then : + printf %s "(cached) " >&6 +else $as_nop + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "struct timezone" >/dev/null 2>&1 +then : + bash_cv_struct_timezone=yes +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "struct timezone" >/dev/null 2>&1 +then : + bash_cv_struct_timezone=yes +else $as_nop + bash_cv_struct_timezone=no +fi +rm -rf conftest* + +fi +rm -rf conftest* + + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5 +printf "%s\n" "$bash_cv_struct_timezone" >&6; } +if test $bash_cv_struct_timezone = yes; then + printf "%s\n" "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5 +printf %s "checking for offset of exit status in return status from wait... " >&6; } +if test ${bash_cv_wexitstatus_offset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5 +printf "%s\n" "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;} + bash_cv_wexitstatus_offset=0 + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +#include + +int +main(c, v) + int c; + char **v; +{ + pid_t pid, p; + int s, i, n; + + s = 0; + pid = fork(); + if (pid == 0) + exit (42); + + /* wait for the process */ + p = wait(&s); + if (p != pid) + exit (255); + + /* crack s */ + for (i = 0; i < (sizeof(s) * 8); i++) + { + n = (s >> i) & 0xff; + if (n == 42) + exit (i); + } + + exit (254); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_wexitstatus_offset=0 +else $as_nop + bash_cv_wexitstatus_offset=$? +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +if test "$bash_cv_wexitstatus_offset" -gt 32 ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5 +printf "%s\n" "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;} + bash_cv_wexitstatus_offset=0 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5 +printf "%s\n" "$bash_cv_wexitstatus_offset" >&6; } + +printf "%s\n" "#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset" >>confdefs.h + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${bash_cv_sys_struct_timespec_in_time_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_sys_struct_timespec_in_time_h=yes +else $as_nop + bash_cv_sys_struct_timespec_in_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5 +printf "%s\n" "$bash_cv_sys_struct_timespec_in_time_h" >&6; } + + HAVE_STRUCT_TIMESPEC=0 + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $bash_cv_sys_struct_timespec_in_time_h = yes; then + printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h + + printf "%s\n" "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h + + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${bash_cv_sys_struct_timespec_in_sys_time_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_sys_struct_timespec_in_sys_time_h=yes +else $as_nop + bash_cv_sys_struct_timespec_in_sys_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5 +printf "%s\n" "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h + + printf "%s\n" "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h + + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +printf %s "checking for struct timespec in ... " >&6; } +if test ${bash_cv_sys_struct_timespec_in_pthread_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main (void) +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_sys_struct_timespec_in_pthread_h=yes +else $as_nop + bash_cv_sys_struct_timespec_in_pthread_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5 +printf "%s\n" "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h + + printf "%s\n" "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h + + fi + fi + fi + + + + + + + + + + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 +printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; } +if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + +int +main (void) +{ + + st.st_atim = ts; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes +else $as_nop + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + +printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h + + fi +else $as_nop + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h + + +else $as_nop + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h + + +else $as_nop + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h + + +fi + +fi + +fi + +fi + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5 +printf %s "checking for sbrk... " >&6; } + if test ${ac_cv_func_sbrk+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + void *x = sbrk (4096); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_sbrk=yes +else $as_nop + ac_cv_func_sbrk=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sbrk" >&5 +printf "%s\n" "$ac_cv_func_sbrk" >&6; } + if test X$ac_cv_func_sbrk = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5 +printf %s "checking for working sbrk... " >&6; } +if test ${bash_cv_func_sbrk+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working sbrk if cross-compiling" >&5 +printf "%s\n" "$as_me: WARNING: cannot check working sbrk if cross-compiling" >&2;} + bash_cv_func_sbrk=yes + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main(int c, char **v) +{ + void *x; + + x = sbrk (4096); + exit ((x == (void *)-1) ? 1 : 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_func_sbrk=yes +else $as_nop + bash_cv_func_sbrk=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sbrk" >&5 +printf "%s\n" "$bash_cv_func_sbrk" >&6; } + if test $bash_cv_func_sbrk = no; then + ac_cv_func_sbrk=no + fi + fi + if test $ac_cv_func_sbrk = yes; then + +printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h + + fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5 +printf %s "checking for the existence of strsignal... " >&6; } +if test ${bash_cv_have_strsignal+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +int +main (void) +{ +char *s = (char *)strsignal(2); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_have_strsignal=yes +else $as_nop + bash_cv_have_strsignal=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5 +printf "%s\n" "$bash_cv_have_strsignal" >&6; } +if test $bash_cv_have_strsignal = yes; then +printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5 +printf %s "checking if opendir() opens non-directories... " >&6; } +if test ${bash_cv_opendir_not_robust+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;} + bash_cv_opendir_not_robust=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_SYS_STAT_H +#include +#endif +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* SYSNDIR */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* SYSDIR */ +# ifdef HAVE_NDIR_H +# include +# endif +#endif /* HAVE_DIRENT_H */ +#include +int +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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_opendir_not_robust=yes +else $as_nop + bash_cv_opendir_not_robust=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5 +printf "%s\n" "$bash_cv_opendir_not_robust" >&6; } +if test $bash_cv_opendir_not_robust = yes; then +printf "%s\n" "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5 +printf %s "checking whether ulimit can substitute for getdtablesize... " >&6; } +if test ${bash_cv_ulimit_maxfds+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;} + bash_cv_ulimit_maxfds=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_ULIMIT_H +#include +#endif +int +main() +{ +long maxfds = ulimit(4, 0L); +exit (maxfds == -1L); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_ulimit_maxfds=yes +else $as_nop + bash_cv_ulimit_maxfds=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5 +printf "%s\n" "$bash_cv_ulimit_maxfds" >&6; } +if test $bash_cv_ulimit_maxfds = yes; then +printf "%s\n" "#define ULIMIT_MAXFDS 1" >>confdefs.h + +fi + + + + + + + ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fpurge" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5 +printf %s "checking to see if getenv can be redefined... " >&6; } +if test ${bash_cv_getenv_redef+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5 +printf "%s\n" "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;} + bash_cv_getenv_redef=yes + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#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"; +} +int +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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_getenv_redef=yes +else $as_nop + bash_cv_getenv_redef=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5 +printf "%s\n" "$bash_cv_getenv_redef" >&6; } +if test $bash_cv_getenv_redef = yes; then +printf "%s\n" "#define CAN_REDEFINE_GETENV 1" >>confdefs.h + +fi + +if test "$ac_cv_func_getcwd" = "yes"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5 +printf %s "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; } +if test ${bash_cv_getcwd_malloc+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;} + bash_cv_getcwd_malloc=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +int +main() +{ + char *xpwd; + xpwd = getcwd(0, 0); + exit (xpwd == 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_getcwd_malloc=yes +else $as_nop + bash_cv_getcwd_malloc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5 +printf "%s\n" "$bash_cv_getcwd_malloc" >&6; } +if test $bash_cv_getcwd_malloc = no; then +printf "%s\n" "#define GETCWD_BROKEN 1" >>confdefs.h + +case " $LIBOBJS " in + *" getcwd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" + ;; +esac + +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 +printf %s "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; } +if test ${bash_cv_func_sigsetjmp+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&5 +printf "%s\n" "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&2;} + if test "$bash_cv_posix_signals" = "yes" ; then + bash_cv_func_sigsetjmp=present + else + bash_cv_func_sigsetjmp=missing + fi + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#include + +int +main() +{ +#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) +exit (1); +#else + +int code; +sigset_t set, oset, nset; +sigjmp_buf xx; + +/* get the mask */ +sigemptyset(&set); +sigemptyset(&oset); + +sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); +/* paranoia -- make sure SIGINT is not blocked */ +sigdelset (&oset, SIGINT); +sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); + +/* save it */ +code = sigsetjmp(xx, 1); +if (code) +{ + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &nset); + /* could compare nset to oset here, but we just look for SIGINT */ + if (sigismember (&nset, SIGINT)) + exit(1); + exit(0); +} + +/* change it so that SIGINT is blocked */ +sigaddset(&set, SIGINT); +sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); + +/* and siglongjmp */ +siglongjmp(xx, 10); +exit(1); +#endif +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_func_sigsetjmp=present +else $as_nop + bash_cv_func_sigsetjmp=missing +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5 +printf "%s\n" "$bash_cv_func_sigsetjmp" >&6; } +if test $bash_cv_func_sigsetjmp = present; then +printf "%s\n" "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5 +printf %s "checking whether or not strcoll and strcmp differ... " >&6; } +if test ${bash_cv_func_strcoll_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} + bash_cv_func_strcoll_broken=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if defined (HAVE_LOCALE_H) +#include +#endif +#include +#include + +int +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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_func_strcoll_broken=yes +else $as_nop + bash_cv_func_strcoll_broken=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5 +printf "%s\n" "$bash_cv_func_strcoll_broken" >&6; } +if test $bash_cv_func_strcoll_broken = yes; then +printf "%s\n" "#define STRCOLL_BROKEN 1" >>confdefs.h + +fi + + + + + if test X$ac_cv_func_snprintf = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5 +printf %s "checking for standard-conformant snprintf... " >&6; } +if test ${bash_cv_func_snprintf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5 +printf "%s\n" "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;} + bash_cv_func_snprintf=yes + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main() +{ + int n; + n = snprintf (0, 0, "%s", "0123456"); + exit(n != 7); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_func_snprintf=yes +else $as_nop + bash_cv_func_snprintf=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5 +printf "%s\n" "$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 + +printf "%s\n" "#define HAVE_SNPRINTF 0" >>confdefs.h + + fi + + + + + if test X$ac_cv_func_vsnprintf = Xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5 +printf %s "checking for standard-conformant vsnprintf... " >&6; } +if test ${bash_cv_func_vsnprintf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5 +printf "%s\n" "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;} + bash_cv_func_vsnprintf=yes + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_STDARG_H +#include +#else +#include +#endif +#include +#include + +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; +} + +int +main() +{ + int n; + n = foo("%s", "0123456"); + exit(n != 7); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_func_vsnprintf=yes +else $as_nop + bash_cv_func_vsnprintf=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5 +printf "%s\n" "$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 + +printf "%s\n" "#define HAVE_VSNPRINTF 0" >>confdefs.h + + fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable strtoimax" >&5 +printf %s "checking for usable strtoimax... " >&6; } +if test ${bash_cv_func_strtoimax+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0 + + ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" +if test "x$ac_cv_func_strtoimax" = xyes +then : + printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h + +fi + + ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoimax" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h + + + if test "$ac_cv_func_strtoimax" = "yes" ; then + HAVE_STRTOIMAX=1 + fi + if test "$ac_cv_have_decl_strtoimax" = "yes" ; then + HAVE_DECL_STRTOIMAX=1 + fi + + if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then + bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1 + else + bash_cv_func_strtoimax=yes + fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5 +printf "%s\n" "$bash_cv_func_strtoimax" >&6; } +if test $bash_cv_func_strtoimax = no; then +case " $LIBOBJS " in + *" strtoimax.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext" + ;; +esac + +fi + + + +if test "$ac_cv_func_putenv" = "yes"; then + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5 +printf %s "checking for standard-conformant putenv declaration... " >&6; } +if test ${bash_cv_std_putenv+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_STDDEF_H +#include +#endif +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +#ifdef PROTOTYPES +extern int putenv (char *); +#else +extern int putenv (); +#endif + +int +main (void) +{ +return (putenv == 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_std_putenv=yes +else $as_nop + bash_cv_std_putenv=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5 +printf "%s\n" "$bash_cv_std_putenv" >&6; } +if test $bash_cv_std_putenv = yes; then +printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h + +fi + +else +printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h + +fi +if test "$ac_cv_func_unsetenv" = "yes"; then + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5 +printf %s "checking for standard-conformant unsetenv declaration... " >&6; } +if test ${bash_cv_std_unsetenv+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_STDDEF_H +#include +#endif +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif +#ifdef PROTOTYPES +extern int unsetenv (const char *); +#else +extern int unsetenv (); +#endif + +int +main (void) +{ +return (unsetenv == 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + bash_cv_std_unsetenv=yes +else $as_nop + bash_cv_std_unsetenv=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5 +printf "%s\n" "$bash_cv_std_unsetenv" >&6; } +if test $bash_cv_std_unsetenv = yes; then +printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h + +fi + +else +printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5 +printf %s "checking for printf floating point output in hex notation... " >&6; } +if test ${bash_cv_printf_a_format+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;} + bash_cv_printf_a_format=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +int +main() +{ + double y = 0.0; + char abuf[1024]; + + sprintf(abuf, "%A", y); + exit(strchr(abuf, 'P') == (char *)0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_printf_a_format=yes +else $as_nop + bash_cv_printf_a_format=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5 +printf "%s\n" "$bash_cv_printf_a_format" >&6; } +if test $bash_cv_printf_a_format = yes; then +printf "%s\n" "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fnmatch can be used to check bracket equivalence classes" >&5 +printf %s "checking whether fnmatch can be used to check bracket equivalence classes... " >&6; } +if test ${bash_cv_fnmatch_equiv_fallback+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&2;} + bash_cv_fnmatch_equiv_fallback=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include +#include + +char *pattern = "[[=a=]]"; + +/* char *string = "ä"; */ +unsigned char string[4] = { '\xc3', '\xa4', '\0' }; + +int +main (int c, char **v) +{ + setlocale (LC_ALL, "en_US.UTF-8"); + if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH) + exit (0); + exit (1); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_fnmatch_equiv_fallback=yes +else $as_nop + bash_cv_fnmatch_equiv_fallback=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fnmatch_equiv_fallback" >&5 +printf "%s\n" "$bash_cv_fnmatch_equiv_fallback" >&6; } +if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then + bash_cv_fnmatch_equiv_value=1 +else + bash_cv_fnmatch_equiv_value=0 +fi + +printf "%s\n" "#define FNMATCH_EQUIV_FALLBACK $bash_cv_fnmatch_equiv_value" >>confdefs.h + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5 +printf %s "checking if signal handlers must be reinstalled when invoked... " >&6; } +if test ${bash_cv_must_reinstall_sighandlers+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} + bash_cv_must_reinstall_sighandlers=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +typedef void sigfunc(); + +volatile 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 + +void +sigint(s) +int s; +{ + nsigint++; +} + +int +main() +{ + nsigint = 0; + set_signal_handler(SIGINT, sigint); + kill((int)getpid(), SIGINT); + kill((int)getpid(), SIGINT); + exit(nsigint != 2); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_must_reinstall_sighandlers=no +else $as_nop + bash_cv_must_reinstall_sighandlers=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5 +printf "%s\n" "$bash_cv_must_reinstall_sighandlers" >&6; } +if test $bash_cv_must_reinstall_sighandlers = yes; then +printf "%s\n" "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5 +printf %s "checking for presence of necessary job control definitions... " >&6; } +if test ${bash_cv_job_control_missing+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_SYS_WAIT_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#include + +/* add more tests in here as appropriate */ + +/* signal type */ +#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) +#error +#endif + +/* signals and tty control. */ +#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) +#error +#endif + +/* process control */ +#if !defined (WNOHANG) || !defined (WUNTRACED) +#error +#endif + +/* Posix systems have tcgetpgrp and waitpid. */ +#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) +#error +#endif + +#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) +#error +#endif + +/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ +#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) +#error +#endif + + +int +main (void) +{ + int x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_job_control_missing=present +else $as_nop + bash_cv_job_control_missing=missing + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5 +printf "%s\n" "$bash_cv_job_control_missing" >&6; } +if test $bash_cv_job_control_missing = missing; then +printf "%s\n" "#define JOB_CONTROL_MISSING 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5 +printf %s "checking for presence of named pipes... " >&6; } +if test ${bash_cv_sys_named_pipes+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5 +printf "%s\n" "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;} + bash_cv_sys_named_pipes=missing + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +/* Add more tests in here as appropriate. */ +int +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 +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_sys_named_pipes=present +else $as_nop + bash_cv_sys_named_pipes=missing +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5 +printf "%s\n" "$bash_cv_sys_named_pipes" >&6; } +if test $bash_cv_sys_named_pipes = missing; then +printf "%s\n" "#define NAMED_PIPES_MISSING 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5 +printf %s "checking whether termios.h defines TIOCGWINSZ... " >&6; } +if test ${ac_cv_sys_tiocgwinsz_in_termios_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#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 $as_nop + ac_cv_sys_tiocgwinsz_in_termios_h=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 +printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; } + +if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 +printf %s "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; } +if test ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#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 $as_nop + ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 +printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; } + + if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then + +printf "%s\n" "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h + + fi +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5 +printf %s "checking for TIOCSTAT in sys/ioctl.h... " >&6; } +if test ${bash_cv_tiocstat_in_ioctl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main (void) +{ +int x = TIOCSTAT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_tiocstat_in_ioctl=yes +else $as_nop + bash_cv_tiocstat_in_ioctl=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5 +printf "%s\n" "$bash_cv_tiocstat_in_ioctl" >&6; } +if test $bash_cv_tiocstat_in_ioctl = yes; then +printf "%s\n" "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5 +printf %s "checking for FIONREAD in sys/ioctl.h... " >&6; } +if test ${bash_cv_fionread_in_ioctl+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main (void) +{ +int x = FIONREAD; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_fionread_in_ioctl=yes +else $as_nop + bash_cv_fionread_in_ioctl=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5 +printf "%s\n" "$bash_cv_fionread_in_ioctl" >&6; } +if test $bash_cv_fionread_in_ioctl = yes; then +printf "%s\n" "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h + +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5 +printf %s "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; } +if test ${bash_cv_wcontinued_broken+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5 +printf "%s\n" "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;} + bash_cv_wcontinued_broken=no + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include +#include + +#ifndef errno +extern int errno; +#endif +int +main() +{ + int x; + + x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED); + if (x == -1 && errno == EINVAL) + exit (1); + else + exit (0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_wcontinued_broken=no +else $as_nop + bash_cv_wcontinued_broken=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5 +printf "%s\n" "$bash_cv_wcontinued_broken" >&6; } +if test $bash_cv_wcontinued_broken = yes; then +printf "%s\n" "#define WCONTINUED_BROKEN 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5 +printf %s "checking for speed_t in sys/types.h... " >&6; } +if test ${bash_cv_speed_t_in_sys_types+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +speed_t x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_speed_t_in_sys_types=yes +else $as_nop + bash_cv_speed_t_in_sys_types=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5 +printf "%s\n" "$bash_cv_speed_t_in_sys_types" >&6; } +if test $bash_cv_speed_t_in_sys_types = yes; then +printf "%s\n" "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5 +printf %s "checking whether getpw functions are declared in pwd.h... " >&6; } +if test ${bash_cv_getpw_declared+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getpwuid" >/dev/null 2>&1 +then : + bash_cv_getpw_declared=yes +else $as_nop + bash_cv_getpw_declared=no +fi +rm -rf conftest* + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5 +printf "%s\n" "$bash_cv_getpw_declared" >&6; } +if test $bash_cv_getpw_declared = yes; then +printf "%s\n" "#define HAVE_GETPW_DECLS 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5 +printf %s "checking for unusable real-time signals due to large values... " >&6; } +if test ${bash_cv_unusable_rtsigs+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5 +printf "%s\n" "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;} + bash_cv_unusable_rtsigs=yes + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +#ifndef NSIG +# define NSIG 64 +#endif + +int +main () +{ + int n_sigs = 2 * NSIG; +#ifdef SIGRTMIN + int rtmin = SIGRTMIN; +#else + int rtmin = 0; +#endif + + exit(rtmin < n_sigs); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + bash_cv_unusable_rtsigs=yes +else $as_nop + bash_cv_unusable_rtsigs=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5 +printf "%s\n" "$bash_cv_unusable_rtsigs" >&6; } +if test $bash_cv_unusable_rtsigs = yes; then +printf "%s\n" "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h + +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*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5 +printf %s "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; } +if test ${bash_cv_kernel_rlimit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test ${bash_cv_rlimit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ + + int f; + f = RLIMIT_DATA; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_rlimit=yes +else $as_nop + bash_cv_rlimit=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +if test $bash_cv_rlimit = no; then +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#define _KERNEL +#include +#undef _KERNEL + +int +main (void) +{ + + int f; + f = RLIMIT_DATA; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + bash_cv_kernel_rlimit=yes +else $as_nop + bash_cv_kernel_rlimit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5 +printf "%s\n" "$bash_cv_kernel_rlimit" >&6; } +if test $bash_cv_kernel_rlimit = yes; then +printf "%s\n" "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h + +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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "checking which library has the termcap functions... " >&6; } +_bash_needmsg= +fi +if test ${bash_cv_termcap_lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" +if test "x$ac_cv_func_tgetent" = xyes +then : + bash_cv_termcap_lib=libc +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 +printf %s "checking for tgetent in -ltermcap... " >&6; } +if test ${ac_cv_lib_termcap_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltermcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_termcap_tgetent=yes +else $as_nop + ac_cv_lib_termcap_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; } +if test "x$ac_cv_lib_termcap_tgetent" = xyes +then : + bash_cv_termcap_lib=libtermcap +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 +printf %s "checking for tgetent in -ltinfo... " >&6; } +if test ${ac_cv_lib_tinfo_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltinfo $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_tinfo_tgetent=yes +else $as_nop + ac_cv_lib_tinfo_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; } +if test "x$ac_cv_lib_tinfo_tgetent" = xyes +then : + bash_cv_termcap_lib=libtinfo +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 +printf %s "checking for tgetent in -lcurses... " >&6; } +if test ${ac_cv_lib_curses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_curses_tgetent=yes +else $as_nop + ac_cv_lib_curses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; } +if test "x$ac_cv_lib_curses_tgetent" = xyes +then : + bash_cv_termcap_lib=libcurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 +printf %s "checking for tgetent in -lncurses... " >&6; } +if test ${ac_cv_lib_ncurses_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncurses_tgetent=yes +else $as_nop + ac_cv_lib_ncurses_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; } +if test "x$ac_cv_lib_ncurses_tgetent" = xyes +then : + bash_cv_termcap_lib=libncurses +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 +printf %s "checking for tgetent in -lncursesw... " >&6; } +if test ${ac_cv_lib_ncursesw_tgetent+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncursesw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char tgetent (); +int +main (void) +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ncursesw_tgetent=yes +else $as_nop + ac_cv_lib_ncursesw_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 +printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; } +if test "x$ac_cv_lib_ncursesw_tgetent" = xyes +then : + bash_cv_termcap_lib=libncursesw +else $as_nop + bash_cv_termcap_lib=gnutermcap +fi + +fi + +fi + +fi + +fi + +fi + +fi + +if test "X$_bash_needmsg" = "Xyes"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 +printf %s "checking which library has the termcap functions... " >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 +printf "%s\n" "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 +# we assume ncurses is installed somewhere the linker can find it +TERMCAP_LIB=-lncurses +TERMCAP_DEP= +fi + +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5 +printf %s "checking whether /dev/fd is available... " >&6; } +if test ${bash_cv_dev_fd+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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&5 +printf "%s\n" "$bash_cv_dev_fd" >&6; } +if test $bash_cv_dev_fd = "standard"; then + printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h + + printf "%s\n" "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h + +elif test $bash_cv_dev_fd = "whacky"; then + printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h + + printf "%s\n" "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5 +printf %s "checking whether /dev/stdin stdout stderr are available... " >&6; } +if test ${bash_cv_dev_stdin+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if (exec test -r /dev/stdin < /dev/null) ; then + bash_cv_dev_stdin=present + else + bash_cv_dev_stdin=absent + fi + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5 +printf "%s\n" "$bash_cv_dev_stdin" >&6; } +if test $bash_cv_dev_stdin = "present"; then + printf "%s\n" "#define HAVE_DEV_STDIN 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5 +printf %s "checking for default mail directory... " >&6; } +if test ${bash_cv_mail_dir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5 +printf "%s\n" "$bash_cv_mail_dir" >&6; } +printf "%s\n" "#define DEFAULT_MAIL_DIRECTORY \"$bash_cv_mail_dir\"" >>confdefs.h + + + +if test "$bash_cv_job_control_missing" = missing; then + opt_job_control=no +fi + +if test "$opt_job_control" = yes; then +printf "%s\n" "#define JOB_CONTROL 1" >>confdefs.h + +JOBS_O=jobs.o +else +JOBS_O=nojobs.o +fi + + + + +LOCAL_DEFS=-DSHELL + + +case "${host_os}" in +sysv4.2*) printf "%s\n" "#define SVR4_2 1" >>confdefs.h + + printf "%s\n" "#define SVR4 1" >>confdefs.h + ;; +sysv4*) printf "%s\n" "#define SVR4 1" >>confdefs.h + ;; +sysv5*) printf "%s\n" "#define SVR5 1" >>confdefs.h + ;; +hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +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 + 1.*|2.[0123]*) : ;; + *) printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h + ;; + esac ;; +netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; +freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; +*qnx[67]*) 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 -DRECYCLES_PIDS" ;; +*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; +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 +bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux +hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading +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 +midnightbsd*) 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 + +# turn off paren warnings in gcc +#CFLAGS="$CFLAGS ${STYLE_CFLAGS}" + +# +# 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5 +printf %s "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}"` + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5 +printf "%s\n" "$SHOBJ_STATUS" >&6; } +else + SHOBJ_STATUS=unsupported + +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 + + + +# directory where we install dynamically loadable builtins +if test -z "$loadablesdir"; then + loadablesdir='${libdir}/bash' +fi + +if test -z "$headersdir"; then + headersdir='$(includedir)/$(PACKAGE_NAME)' +fi + + + + + + + + + + + + + + + + + + + + +#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/Makefile.inc examples/loadables/Makefile.sample examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh" + + +ac_config_commands="$ac_config_commands stamp-h" + + +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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$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= ;; #( + *) { eval $ac_var=; 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+y} || &/ + 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 + if test "x$cache_file" != "x/dev/null"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$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= +U= +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=`printf "%s\n" "$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. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append 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" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_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} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: +if test ${ZSH_VERSION+y} && (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 $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; 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 + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# 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 + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$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 || +printf "%s\n" 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_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# 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 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 5.2-release, which was +generated by GNU Autoconf 2.71. 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 and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, 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 ." + +_ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config='$ac_cs_config_escaped' +ac_cs_version="\\ +bash config.status 5.2-release +configured by $0, generated by GNU Autoconf 2.71, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2021 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' +MKDIR_P='$MKDIR_P' +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=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + 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 ) + printf "%s\n" "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + printf "%s\n" "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + printf "%s\n" "$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_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append 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 + \printf "%s\n" "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 + printf "%s\n" "$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, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + 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" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "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/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;; + "examples/loadables/Makefile.sample") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.sample" ;; + "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; + "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;; + "support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;; + "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + 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+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || 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= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# 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=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /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 {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + 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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + 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 >>"\$ac_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 +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +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 >"$ac_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_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + 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 +' >$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_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +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_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[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="$ac_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_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append 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 '` + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`printf "%s\n" "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + 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 || +printf "%s\n" 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"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$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 + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + 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@*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$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 +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +printf "%s\n" "$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 "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + printf "%s\n" "/* $configure_input */" >&1 \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + printf "%s\n" "/* $configure_input */" >&1 \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "po-directories":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 + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + 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" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES 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" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + 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|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|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 ;; + "stamp-h":C) echo timestamp > stamp-h ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# 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 || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + diff --git a/copy_cmd.c b/copy_cmd.c index 911d34f..758ff23 100644 --- a/copy_cmd.c +++ b/copy_cmd.c @@ -2,7 +2,7 @@ primarily for making function definitions, but I'm not sure that anyone else will need it. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -32,25 +32,25 @@ #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 *)); +static PATTERN_LIST *copy_case_clause PARAMS((PATTERN_LIST *)); +static PATTERN_LIST *copy_case_clauses PARAMS((PATTERN_LIST *)); +static FOR_COM *copy_for_command PARAMS((FOR_COM *)); #if defined (ARITH_FOR_COMMAND) -static ARITH_FOR_COM *copy_arith_for_command __P((ARITH_FOR_COM *)); +static ARITH_FOR_COM *copy_arith_for_command PARAMS((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 *)); +static GROUP_COM *copy_group_command PARAMS((GROUP_COM *)); +static SUBSHELL_COM *copy_subshell_command PARAMS((SUBSHELL_COM *)); +static COPROC_COM *copy_coproc_command PARAMS((COPROC_COM *)); +static CASE_COM *copy_case_command PARAMS((CASE_COM *)); +static WHILE_COM *copy_while_command PARAMS((WHILE_COM *)); +static IF_COM *copy_if_command PARAMS((IF_COM *)); #if defined (DPAREN_ARITHMETIC) -static ARITH_COM *copy_arith_command __P((ARITH_COM *)); +static ARITH_COM *copy_arith_command PARAMS((ARITH_COM *)); #endif #if defined (COND_COMMAND) -static COND_COM *copy_cond_command __P((COND_COM *)); +static COND_COM *copy_cond_command PARAMS((COND_COM *)); #endif -static SIMPLE_COM *copy_simple_command __P((SIMPLE_COM *)); +static SIMPLE_COM *copy_simple_command PARAMS((SIMPLE_COM *)); WORD_DESC * copy_word (w) @@ -69,12 +69,20 @@ WORD_LIST * copy_word_list (list) WORD_LIST *list; { - WORD_LIST *new_list; + WORD_LIST *new_list, *tl; - for (new_list = (WORD_LIST *)NULL; list; list = list->next) - new_list = make_word_list (copy_word (list->word), new_list); + for (new_list = tl = (WORD_LIST *)NULL; list; list = list->next) + { + if (new_list == 0) + new_list = tl = make_word_list (copy_word (list->word), new_list); + else + { + tl->next = make_word_list (copy_word (list->word), (WORD_LIST *)NULL); + tl = tl->next; + } + } - return (REVERSE_LIST (new_list, WORD_LIST *)); + return (new_list); } static PATTERN_LIST * @@ -126,7 +134,7 @@ copy_redirect (redirect) { case r_reading_until: case r_deblank_reading_until: - new_redirect->here_doc_eof = savestring (redirect->here_doc_eof); + new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0; /*FALLTHROUGH*/ case r_reading_string: case r_appending_to: @@ -221,6 +229,7 @@ copy_subshell_command (com) new_subshell = (SUBSHELL_COM *)xmalloc (sizeof (SUBSHELL_COM)); new_subshell->command = copy_command (com->command); new_subshell->flags = com->flags; + new_subshell->line = com->line; return (new_subshell); } diff --git a/cross-build/cygwin32.cache b/cross-build/cygwin32.cache deleted file mode 100644 index 36948da..0000000 --- a/cross-build/cygwin32.cache +++ /dev/null @@ -1,251 +0,0 @@ -# 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/qnx.cache b/cross-build/qnx.cache new file mode 100644 index 0000000..3f630fd --- /dev/null +++ b/cross-build/qnx.cache @@ -0,0 +1,66 @@ +bash_cv_decl_strtoimax=${bash_cv_decl_strtoimax=yes} +bash_cv_decl_strtol=${bash_cv_decl_strtol=yes} +bash_cv_decl_strtoll=${bash_cv_decl_strtoll=yes} +bash_cv_decl_strtoul=${bash_cv_decl_strtoul=yes} +bash_cv_decl_strtoull=${bash_cv_decl_strtoull=yes} +bash_cv_decl_strtoumax=${bash_cv_decl_strtoumax=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_dev_stdin=${bash_cv_dev_stdin=present} +bash_cv_dirent_has_d_fileno=${bash_cv_dirent_has_d_fileno=no} +bash_cv_dirent_has_d_namlen=${bash_cv_dirent_has_d_namlen=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_ctype_nonascii=${bash_cv_func_ctype_nonascii=no} +bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present} +bash_cv_func_snprintf=${bash_cv_func_snprintf=yes} +bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken=no} +bash_cv_func_vsnprintf=${bash_cv_func_vsnprintf=yes} +bash_cv_getcwd_malloc=${bash_cv_getcwd_malloc=yes} +bash_cv_getenv_redef=${bash_cv_getenv_redef=yes} +bash_cv_getpw_declared=${bash_cv_getpw_declared=yes} +bash_cv_have_gethostbyname=${bash_cv_have_gethostbyname=no} +bash_cv_have_socklib=${bash_cv_have_socklib=no} +bash_cv_have_strsignal=${bash_cv_have_strsignal=yes} +bash_cv_job_control_missing=${bash_cv_job_control_missing=present} +bash_cv_langinfo_codeset=${bash_cv_langinfo_codeset=no} +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=yes} +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_std_putenv=${bash_cv_std_putenv=yes} +bash_cv_std_unsetenv=${bash_cv_std_unsetenv=yes} +bash_cv_strtold_broken=${bash_cv_strtold_broken=no} +bash_cv_struct_timeval=${bash_cv_struct_timeval=yes} +bash_cv_struct_timezone=${bash_cv_struct_timezone=yes} +bash_cv_struct_winsize_header=${bash_cv_struct_winsize_header=ioctl_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=yes} +bash_cv_sys_struct_timespec_in_time_h=${bash_cv_sys_struct_timespec_in_time_h=yes} +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=yes} +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_sig_atomic_t=${bash_cv_type_sig_atomic_t=yes} +bash_cv_type_sigset_t=${bash_cv_type_sigset_t=yes} +bash_cv_type_socklen_t=${bash_cv_type_socklen_t=yes} +bash_cv_type_uintmax_t=${bash_cv_type_uintmax_t=yes} +bash_cv_type_unsigned_long_long=${bash_cv_type_unsigned_long_long='unsigned long long'} +bash_cv_type_wchar_t=${bash_cv_type_wchar_t=yes} +bash_cv_type_wctype_t=${bash_cv_type_wctype_t=yes} +bash_cv_type_wint_t=${bash_cv_type_wint_t=yes} +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} +bash_cv_wcontinued_broken=${bash_cv_wcontinued_broken=no} +bash_cv_wcwidth_broken=${bash_cv_wcwidth_broken=no} +bash_cv_wexitstatus_offset=${bash_cv_wexitstatus_offset=8} diff --git a/debian/README b/debian/README index 1c73327..bb5e878 100644 --- a/debian/README +++ b/debian/README @@ -7,17 +7,17 @@ of bash. See the details at the end of the file. The bash package was built using the following configuration options: --with-curses \ - --disable-net-redirections \ --enable-largefile \ -bash-static additionally configured with --enable-static-link, bash-minimal -configured with --enable-minimal-config --enable-largefile. +bash-static additionally configured with --enable-static-link. + +The upstream ChangeLog can be found in the bash-doc package. A kind of FAQ for bash on Debian GNU/{Linux,Hurd} ------------------------------------------------- -0. symlinked directory completion behavior +1. symlinked directory completion behavior Starting with readline-4.2a, completion on symlinks that point to directories does not append the slash. To restore the behaviour @@ -25,18 +25,6 @@ A kind of FAQ for bash on Debian GNU/{Linux,Hurd} set mark-symlinked-directories on -1. How can I make /bin/sh point to something else? - - Type - - dpkg-divert --add /bin/sh - - and then point it to whatever you want. Upgrades to bash won't upgrade - the /bin/sh symlink. To put /bin/sh under dpkg control again, type - - dpkg-divert --remove /bin/sh - - 2. How can I make bash 8-bit clean so I can type hi-bit characters directly? @@ -128,12 +116,6 @@ A kind of FAQ for bash on Debian GNU/{Linux,Hurd} to use `set keymap vi-command' and enter key bindings without the \M- prefix (as he discovered)." -9. Why is bash configured with --disable-net-redirections? - - It can produce completely unexpected results. This kind of - feature should not be part of a shell but a special. tool. And - that tool has existed for years already, it's called netcat. - Patches Applied to the Bash Sources ----------------------------------- diff --git a/debian/README.bash_completion b/debian/README.bash_completion index e0a8e75..7be4235 100644 --- a/debian/README.bash_completion +++ b/debian/README.bash_completion @@ -12,6 +12,7 @@ ] To enable programmable completion for bash on Debian, uncomment the -bash_completion lines in /etc/bash.bashrc to source /etc/bash_completion. -/etc/bash_completion sources ~/.bash_completion, if it exists. - +bash_completion lines in /etc/bash.bashrc to source +/usr/share/bash-completion/bash_completion. +/usr/share/bash-completion/bash_completion sources ~/.bash_completion, if +it exists. diff --git a/debian/README.bashdb b/debian/README.bashdb deleted file mode 100644 index de71180..0000000 --- a/debian/README.bashdb +++ /dev/null @@ -1,7 +0,0 @@ -bashdb for Debian ------------------ - -The debugger enhanced bash binary is installed under the name -/usr/bin/bash-bashdb. - - -- Matthias Klose , Sun, 10 Aug 2003 23:10:38 +0200 diff --git a/debian/autoreconf.after b/debian/autoreconf.after new file mode 100644 index 0000000..31f4f1c --- /dev/null +++ b/debian/autoreconf.after @@ -0,0 +1,1304 @@ +symlink ./ChangeLog +ab984e7a4e973053040e4ffcb944d2d1 ./variables.c +a8048d34fd07310cf1f5aa4f90f017d2 ./doc/bash.html +fdfa8b97a186efe690e9b45e0c2e127e ./doc/Makefile.in +b9d73bfa3b6aae9c682a004a77cf0ca8 ./doc/bash.1 +d2a953ff45f5b43b7f6487822b349651 ./doc/builtins.0 +145318bad462d3949c5810782cb4bbb9 ./doc/version.texi +fdaef4f123a22e5b5fdb7a893656d2d3 ./doc/builtins.ps +2712ed9c024a4def2d96524f639e5fca ./doc/bashbug.1 +e1538438a3542bbc076ed3902cf82788 ./doc/bashref.texi +846697acb9912668a33659a10c5a4ce2 ./doc/INTRO +e0dfe3da32d9080ccd99edbb1f4e9e72 ./doc/rbash.1 +fa0991565ca2da0003c7489ce527460d ./doc/bash.0 +5e54a18714eb27c93668f051045a1a49 ./doc/htmlpost.sh +39d2720195aba7869d367bae04c577b6 ./doc/builtins.1 +10b9de612d532fdeeb7fe8fcd1435cc6 ./doc/fdl.txt +b0eab40b51f9fd39e0c62f1e2c2dea27 ./doc/rbash.ps +b626f11f160578dae605ec1f604c28ca ./doc/bash.info +79212bfe6ead71a6890440c6118da314 ./doc/bashref.ps +dd1bc3d50715bdb3154db5ace16d996c ./doc/bash.pdf +4d927357f6b10330b2b37218c5b75264 ./doc/bashbug.0 +e60700357b8c2ef0a072a096119b076e ./doc/bashref.dvi +82dbfaa3bd6282bec38bbae31e212b57 ./doc/texinfo.tex +85800b0420ab6c93605bd0147b7e2e60 ./doc/bashref.pdf +d8ec3d99045d12d6ad4c2905e1f0b952 ./doc/bashref.info +64f555b42c31637a9ecf44418de31c53 ./doc/bashref.html +43328c6cbc26b7d98e932985e02e6a71 ./doc/bash.ps +f97960baba184e7a721bf23cde04c3ad ./doc/README +75d46dabee74d6e308b47373cd5602f2 ./doc/infopost.sh +d5b9698f581ca9d37765066177effa74 ./doc/bashbug.ps +31671afd1b008cb6b12ff2221560ab34 ./doc/rbash.0 +072910d553f79906db69fa7c0e956bba ./doc/fdl.texi +938310371752c6942d96ba9247fdf485 ./pcomplete.h +8d36cf739d418f4450bd28a789840f1b ./hashcmd.h +640541e797d3a4627e31a0a3c84d3282 ./externs.h +b9e99de0292f7b7f5eca674c62067a38 ./y.tab.c +580fa2384ca884bf0cfb14b507b48a6b ./bashhist.c +c0588e02d21ffd3a3ec6f4cd6ebb49da ./execute_cmd.c +172188e3a6fc5409d4f113485cc6d79f ./RBASH +7122cc7a40dee7f0a58b508ba544c269 ./Makefile.in +d3a47c27f28ab0a434470a06c52e7fc9 ./pathnames.h.in +ed47ce2472fa6c6f46c2c58cfa6e7725 ./test.c +f002da3a819cfd05476ff713ddb86240 ./CHANGES +d7babf4417c9bd8ced7899c87e3688e6 ./builtins.h +b390eea0055ed6a89e8bbaad5f52a5ea ./POSIX +26877cc3df473ee58614b55796b644b8 ./jobs.h +c31da77239cad2d397e2f00f25b6a61c ./alias.c +819742e3193df6ed5975e0dd80fc8970 ./COMPAT +32152b6bf35827f6e71ec726030c560d ./siglist.c +639100fb4ef9282a6d7691bbbecdc722 ./sig.c +4cd0d11d28ee1a1efba06fcd97863788 ./config-top.h +d33f92d21c5f0ac1642ad2156c9cc5d0 ./alias.h +6e9b16a1af27731e016423cd4535b5a4 ./make_cmd.c +622450231f2c2a5500a225990705604f ./unwind_prot.c +8c00452ef1e298846493ec8b239f93e2 ./ABOUT-NLS +c8e8ecb30963bd68ddd93748ff6f2fc4 ./dispose_cmd.h +d196ed78c8dba14e5805c2d9b29e2744 ./shell.h +aae58ac47462e00e61ecb599a952221d ./siglist.h +80702baa2a5e1a36dea3571cac49f29e ./builtins/Makefile.in +1eff48e6636a1fcb630083b49cc51b0d ./builtins/let.def +046bbea1bb0e5fa74b14c81a2c6fa48a ./builtins/colon.def +a8507c5d630426493ce66b142db04e7d ./builtins/wait.def +14ce5cda81d9ac78818da34a0dbcc677 ./builtins/caller.def +6116d3293d95d4594b6c83c2d75674d8 ./builtins/common.h +979a0d4607f3f60f6740f882c717ebfa ./builtins/alias.def +46be778b69a2615754742f51a66adf6c ./builtins/reserved.def +36e2f271e95b7639eae50bedc2a13df1 ./builtins/getopt.c +90627247b5538800f43a444d9e2a02f5 ./builtins/jobs.def +55c9068a36c008c74d22078a43e91435 ./builtins/eval.def +6feddef5dccdd0d3fd2fed6f2f69268d ./builtins/inlib.def +8305de2da1f4c375c66fabe283bfd852 ./builtins/return.def +d410c41baa9c7313e07ea89653651277 ./builtins/evalfile.c +ca5bbe92bfb52b5e5324513010e3a4ca ./builtins/bind.def +326dde5030024c83279921001c4eb636 ./builtins/command.def +a841cdc94e4de199dff2719ddc679e60 ./builtins/pushd.def +ea028e4dc5b06230b34111e89547feb1 ./builtins/suspend.def +1cb4842bfe35411da03b033382f14959 ./builtins/source.def +6ccd473c71b6decb55e0339c01c795c7 ./builtins/exec.def +16697336df52ef6020669f3e4b380e15 ./builtins/fg_bg.def +d4c6b97bcd9907cecf2c1bd8c326de0c ./builtins/read.def +8f7d4c630f4eef314a747a88c73bc8cc ./builtins/hash.def +49040e2361b2bd265edf55db036b58fe ./builtins/mapfile.def +95234a434065fbe519299089ed47835c ./builtins/shift.def +c32558215ccaad3cf5bd906de44b8d43 ./builtins/help.def +4bee618e23b6785edbd8fff6bb3b68c6 ./builtins/declare.def +7a28e3a102a0d52712202febbc99cfa2 ./builtins/echo.def +19928865f349d1ac01d4f04ffe3debde ./builtins/history.def +c08d7a5f1a90eecd7213367259f192ea ./builtins/set.def +2ee74aa26c27b446b784b611240a1d41 ./builtins/enable.def +d8bf5b257ebce5879a39606ae44d320c ./builtins/bashgetopt.h +bfec0f9a7f4592eeaac1f358a88e17d1 ./builtins/psize.sh +31a60cb08265c9e1cc9c03f5b7ccbdff ./builtins/bashgetopt.c +9b1860b5adb9fe797e598637a500fdd1 ./builtins/gen-helpfiles.c +dd2aa4c371e04145329d1a3fe56850a7 ./builtins/common.c +9ed7145fe1deae3bddf69d05d2f85cdd ./builtins/test.def +2a001397b71577652e1ff0dd7414bae2 ./builtins/trap.def +8abd2b2ab15e6cb8a9fb78583e36757b ./builtins/complete.def +9013df24f36505d6d671882835bb3cca ./builtins/printf.def +e8ac0429996f6e6e6833a85df0c5f88c ./builtins/psize.c +a7cfad65230c95d1bdf67128bd03a570 ./builtins/setattr.def +9afdbc9940ffc2e11920aa1a43cca36d ./builtins/exit.def +ecb0f943e758973c5da26964b7323975 ./builtins/getopts.def +01a43d425d0fb43ebf34c957390a95b5 ./builtins/cd.def +ee9c95ba5c421402bc1caa97c096b507 ./builtins/shopt.def +bf24988b786428f51d5734618f1560f1 ./builtins/times.def +db0f46136154bb1f42aa36bfc25b478c ./builtins/kill.def +1042ae3e73f3d6405d033d295d973f08 ./builtins/type.def +eebcb50b15e226daaf48cf4e620c4d96 ./builtins/fc.def +8f7a3e35d86127e9d4721cf81e34fb5c ./builtins/umask.def +daa815cca59cb4869fe5337a5a1c29e6 ./builtins/mkbuiltins.c +2a0a2160a9a2900f73ec90a695339c93 ./builtins/builtin.def +8f36f60d85b699f7162485a0011f4cb1 ./builtins/evalstring.c +105c7812b8237bdc0ec62597f2e92f7a ./builtins/ulimit.def +e3d0a5ed55f475eaef6e96d6baed8d60 ./builtins/getopt.h +f959829235b07334beaec3141c3cc1fb ./builtins/break.def +cc55bc662f7fdc6d33489e2ba34c883b ./INSTALL +75af5e8f73c6a861a1a106f9e18c9b2d ./dispose_cmd.c +36c2201542d63d35e9ab6ec755e95edd ./test.h +55598ee205a4cd72eec6d0042e216baf ./parser.h +7a0ffbf3c2528b4a1313bc88b9a9bea5 ./make_cmd.h +f175076a8c1f769e332f337ddc8b4071 ./sig.h +3af7656ab044ea4445b2d79ca887215e ./xmalloc.c +970bd634533e952c75db59de4997a3af ./examples/functions/arrayops.bash +8419b192560031fa4af782142f414d19 ./examples/functions/dirname +48d6c6666fc3dae143fafa264ef3ea17 ./examples/functions/fact +4fb3299b9c1c0065443bb6735b9247e1 ./examples/functions/whence +fd23952f92adc9e4f621283124d4e42b ./examples/functions/inetaddr +b66d2256006f8176af5f7fc97c61af78 ./examples/functions/shcat +f0736896674608c2ab9d44c8d0b936e1 ./examples/functions/seq +38889bedde618a95cb972c567b40537f ./examples/functions/kshenv +30475ae08dbd322648983009a3e680a6 ./examples/functions/basename +7817bb007382592e2088f81e16c3817d ./examples/functions/autoload.v4.t +53d32d4cd1f027ba739b5712ba59026a ./examples/functions/sort-pos-params +8081bb6e1ca28b95529b0290e78c8dcc ./examples/functions/external +66891139570c7d7f9f52243c880f23da ./examples/functions/shcat2 +88d83ac48c07e568c30b398d8f9a7de4 ./examples/functions/autoload.v2 +7e655bc4ecc874f4b84499cd7250cb73 ./examples/functions/csh-compat +76c6f826cf49808988a1bb4660a55482 ./examples/functions/login +61618bbd1999e303c99b65da265d7f7d ./examples/functions/ksh-compat-test +bbee162d6d7c90ab2583db8cd83ebf66 ./examples/functions/notify.bash +b66fb988f045aa03c6cee4c5a97fc8d6 ./examples/functions/isvalidip +00076a9fcebc81643073d782d328182b ./examples/functions/func +0150be613a11b2060f312f8a016b81a9 ./examples/functions/ksh-cd +986edab4118cb47fedd3a21b144ae832 ./examples/functions/substr2 +4be22e5475fe871d1685fc344237d0c9 ./examples/functions/fstty +fd96d7206e035de1f5119dbb6f46949c ./examples/functions/autoload.v4 +11c481722ec7ed987de39e3096cc448a ./examples/functions/substr +03a23de53d2647bddbdad432ed418863 ./examples/functions/autoload +b73ebed3a79a0b53ac799609a0bb93d7 ./examples/functions/inpath +cd149be0c4a983cf0871ca868dec08ea ./examples/functions/isnum2 +39c48771a1a4fbc9ee692b200117989d ./examples/functions/autoload.v3 +dec8b14f112da2772407e8dfae534d72 ./examples/functions/exitstat +33a84a37d8b89534040b7d3b23ea2856 ./examples/functions/array-to-string +b24a911e17c477672b92580522d22527 ./examples/functions/seq2 +b3619eca7c07bdfcec49be203e5414c1 ./examples/functions/which +0f557ddffa7282f1ac04d1a5db15dd76 ./examples/functions/dirstack +d9016d72490d4107c767000389046e65 ./examples/functions/array-stuff +7856017c1c998ae66f936468a15c6d75 ./examples/functions/whatis +272d20cfb5ce473da118f03abe5b89ee ./examples/loadables/hello.c +f5969722be64c01ae1d2cd8f566371be ./examples/loadables/Makefile.in +5df3b760c6e78f3222e68c03445a9c4a ./examples/loadables/cat.c +bcfee1a0b34000285247359f03a215fd ./examples/loadables/sync.c +6614ae525e6be09d290ebfece426c567 ./examples/loadables/stat.c +b99ad6aa6da5671b790d125da2a22f7f ./examples/loadables/logname.c +c9cee188e53c546a7fe68426e64a73c6 ./examples/loadables/whoami.c +48aa43d4c8d82ccc13de9adaa6499456 ./examples/loadables/fdflags.c +b19a8595e7e981baa8e0e7efce6cc812 ./examples/loadables/rm.c +321acef9034b86e781ce29b803c914e8 ./examples/loadables/Makefile.inc.in +fb752b7aeecf3ac126773c673e7f8e41 ./examples/loadables/tee.c +cc2a66d77be2f5ddf8153de8700953d4 ./examples/loadables/mkdir.c +4ba8bf993993597c1a3355824f4418c0 ./examples/loadables/realpath.c +7b9c9188ea48ece88f070f56b6e567a9 ./examples/loadables/dirname.c +02667770626707d189c2ca759ef7a55f ./examples/loadables/necho.c +fabfd59f7dd1d5f7025204cbf896de98 ./examples/loadables/printenv.c +cb03b64a6f72774267f0615b03e6c52b ./examples/loadables/tty.c +85918928162c086edcd54225c6ab9e87 ./examples/loadables/head.c +0a29f0defa6f16c0d8ae0d408a93ab2e ./examples/loadables/ln.c +9f9eec8ac538fa5a33c68b2c764a3ed6 ./examples/loadables/truefalse.c +0a09afc9887e7fef10b45a56d02171d1 ./examples/loadables/id.c +855fe3989640e455fe8c761e10d3a181 ./examples/loadables/unlink.c +1e229999471458671a9f5aea1583cafd ./examples/loadables/setpgid.c +f58ce19db41e74735bfc132c68562370 ./examples/loadables/push.c +6354f1f973a739a0e9d979ea57d0a7e9 ./examples/loadables/basename.c +885635ef3f66c0fcfa9c2c309bc806fa ./examples/loadables/strftime.c +4a45f838985af529c13dc49870a8bcd2 ./examples/loadables/loadables.h +db7be44883297aedbd2627b6419fb988 ./examples/loadables/template.c +2c5945b172353282020fe8a1c09ad052 ./examples/loadables/print.c +726b55d8af8e578754528bdcabf7cfd7 ./examples/loadables/finfo.c +e6ea3ba44a4c07ff9a99c3e92ca118b2 ./examples/loadables/README +511c5c99ad783e9d87c03a5451dab178 ./examples/loadables/pathchk.c +1ba3500d52168412d94ebab0bf883649 ./examples/loadables/rmdir.c +48e2daff5bf70c6059d33cd96ca31032 ./examples/loadables/perl/Makefile.in +91d057b932d91155962b467f2bf85abc ./examples/loadables/perl/iperl.c +59bf292c4a9dc1a067aa62e7fc1eb048 ./examples/loadables/perl/bperl.c +a4d15dea75fa78744dbed3affd39de13 ./examples/loadables/perl/README +1a842b920b64df3518765cd2ed73fa68 ./examples/loadables/uname.c +60bda8ba7650ea6ee33a0dd359500dcd ./examples/loadables/sleep.c +b6e683d3ba2fc465bad01b5dd7aebe8c ./examples/loadables/mypid.c +15300010bd4034de12c3fc4f171692e3 ./examples/bash-completion/bash-completion-2.5.tar.xz +ad9635db6ccc70a8ffc95f4b8f71df1d ./examples/bash-completion/README +fe268cc8bd762bc225e8cf2210fc859e ./examples/INDEX.txt +ff32d792be486576f9a62606c762d331 ./examples/startup-files/bash-profile +86017017975b8a11093108830bfe08ad ./examples/startup-files/Bash_aliases +55763dcc633bb8fe5a9d60386e067b52 ./examples/startup-files/bashrc +d0fc580a63d260f91f2fe6b6d1f1a5c1 ./examples/startup-files/Bash_profile +3cc42a98baae32de6535fa8e8c5cd9ae ./examples/startup-files/Bashrc.bfox +c089d672ad71591c509c65750a10e413 ./examples/startup-files/README +538b5363a412b46a944ec043c50ca761 ./examples/misc/aliasconv.sh +979091dab5f09717af53477af817e07d ./examples/misc/cshtobash +ced8155a3bdcfe8da0ac059a4489763e ./examples/misc/aliasconv.bash +f02f0f74d25c4aecff6df5a34f037820 ./examples/INDEX.html +c0b212aba87640c8e34449a7d642042f ./examples/scripts/shprompt +dade8b67f8e857b47b0f80dd0f4e5d23 ./examples/scripts/zprintf +3a83cf08424c96d275604059d5fccfc4 ./examples/scripts/center +19caa1fba7a3bfd48eefb68d7ea5a049 ./examples/scripts/cat.sh +e45b3a4cc6eae9e36ecdd66db9dc634e ./examples/scripts/spin.bash +66648b792ff548a3d3579245d3fd9f93 ./examples/scripts/xterm_title +04f21afef7e45b5992f4c89044887872 ./examples/scripts/inpath +51700209d84f25b1bae2d84b0206348a ./examples/complete/complete-examples +c986e951aa87ad5ab98625300e46afa0 ./examples/complete/cdfunc +22040551e812c9812b3fa02ebb09a631 ./examples/complete/bashcc-1.0.1.tar.gz +16473c99f6e9e343309309eebd25fa1a ./examples/complete/bash_completion +f553b822ab83859733c2e1e81f5dd9ce ./array.c +8df21a58776ed5a732a74e73bf37c315 ./redir.c +65b913f33b715cf30b69c393795fc6ea ./braces.c +d50de67882dea48a36e9386fb0fc8738 ./findcmd.h +50ee6024bbbe54ba509e72723ed7e26f ./stringlib.c +83792432519ac91241ff7fce999a7149 ./assoc.h +53c72c61c7d8b497117722b2ce81c013 ./assoc.c +95f077e0c53b32bcebad353dc885c255 ./list.c +06f5be14e1b07b7387dac6a190f392c1 ./AUTHORS +6ebc8b74a03e31b80bdd0b43b5e8fd6e ./CWRU/misc/sigs.c +c36f711cd7731df270f2735e0679128f ./CWRU/misc/sigstat.c +f16d739577f52845103da52995eea8fa ./CWRU/misc/hpux10-dlfcn.h +79f25616c0c50631d91c48ea8ad2eb3a ./CWRU/misc/errlist.c +eac4379e721e374f78d6fa2d586d86e5 ./CWRU/misc/open-files.c +afbfb52029c32dfdc702fd7eb328d3fa ./CWRU/misc/bison +bdc00a2813982b11fe69cbabfbb7fa6b ./CWRU/changelog +2cad2f48a69949b81b0abc8e0a6f130f ./CWRU/sh-redir-hack +855d67b0e1111ed41faea4a50ff98aa2 ./CWRU/README +31c94a57a6a672ca7955d93195fdebe5 ./CWRU/PLATFORMS +77dd270c0689eb4f5875f41b2ca764ac ./autom4te.cache/output.0 +2d17d26c703d05886963b5e61f4cbfbb ./autom4te.cache/requests +c74407985bedab0b183a1686f1259db8 ./autom4te.cache/traces.0 +6690cebd5cce2dd4a531758c4fe00bff ./shell.c +aa371c8978ef18bf58a465b6e29e3358 ./y.tab.h +4f47db65aede19a663e3f89fb10509da ./xmalloc.h +c71293e1dd0999297826453280357393 ./patchlevel.h +8352bba518c92da3a912c7de522f4239 ./execute_cmd.h +728603bb3d3e190d9271a3b8d20c7305 ./.pc/man-macro-warnings.diff/doc/bash.1 +f9dbbe62c4958aaaa7041b3a7c27a000 ./.pc/bashbug-editor.diff/support/bashbug.sh +d2feff3292b8ce53a37667908d925873 ./.pc/man-arithmetic.diff/doc/bash.1 +26ab0db90d72e28ad0ba1e22ee510510 ./.pc/.version +dfd390d9795b66bf9638e4372e72be95 ./.pc/bash-aliases-repeat.diff/examples/startup-files/Bash_aliases +2d9a7f71c895a362447bf29d687d86c7 ./.pc/bzero.diff/lib/sh/oslib.c +32956ae0c6eeb9f3b411aed20b5f0212 ./.pc/applied-patches +783f75304e379ea54ec14de5019133a6 ./.pc/deb-bash-config.diff/config-top.h +da31094c885702f9ef29c6fb0a29db1e ./.pc/deb-bash-config.diff/config-bot.h +c4c66ab7f875d46a3eb32a41f13c13d0 ./.pc/rbash-manpage.diff/doc/rbash.1 +b20b1f2794f3a8b254e13257892c60e5 ./.pc/bash-default-editor.diff/builtins/fc.def +5839019356fec45370aef5a8099f250a ./.pc/bash-default-editor.diff/bashline.c +26f1b682a8cdfbc9cd46ff1bd07c7d4b ./.pc/man-vx-opts.diff/doc/bash.1 +b3df3afb6526b49b12212941a28aeb34 ./.pc/exec-redirections-doc.diff/doc/bash.1 +35db791801b5bf9fe481461cdb0741e7 ./.pc/exec-redirections-doc.diff/doc/bashref.texi +d41d8cd98f00b204e9800998ecf8427e ./.pc/.dpkg-source-unapply +bf83d7368413d7b499518843a8b3038f ./.pc/input-err.diff/input.c +7e1d3391525b0bfdfac5477282c82507 ./.pc/man-fignore.diff/doc/bash.1 +9e2c4abfafcf9d4c9ba40d15dcfe7421 ./.pc/man-bashrc.diff/doc/bash.1 +2e7600a328fb876b2751e640e27b4888 ./.pc/use-system-texi2html.diff/doc/Makefile.in +4873e3a0b25406c4adc0db94f0077555 ./.pc/man-test.diff/builtins/test.def +3222fd2d96235593cbd420ea1b4ed94c ./.pc/po-de-fix.diff/po/de.po +266f9759f56277b2751b24d1eb17c50f ./.pc/.quilt_patches +3064a36414f36e736267a658e3c8925b ./.pc/man-nocaseglob.diff/doc/bash.1 +d8d46c5430169bc9ada8f2a03e385a56 ./.pc/deb-examples.diff/examples/loadables/README +f275baa840932dd8f2c954da2d516d53 ./.pc/man-test2.diff/doc/bash.1 +f8a0223e4b4a6674f393437e83f997bc ./.pc/man-test2.diff/doc/bashref.texi +9c4386a1a2fb063d48a1c4f5964c855e ./.pc/man-test2.diff/builtins/test.def +e8a673d5d4d69a5fd11c880fd4c3c481 ./.pc/.quilt_series +7934e2401ae463c279cbf9e8ad9de995 ./.pc/man-bashlogout.diff/doc/bash.1 +000716de09ee39440a027c1c5bf0e3e0 ./bashansi.h +4d09f087d0d496f378810c58abdee656 ./trap.c +99d94c61c0d15d4937e843fbd24cd761 ./NOTES +4d0531e12cd8d0aa8ca4ef90b1e7eac2 ./conftypes.h +8b46dd04da0504bcaf05b10b7dc313ea ./parse.y +231c9b86124fbb30d3024a49f8c91ede ./command.h +636f843191114755de8769925af4284f ./array.h +28e1778e3d812c05b8fc47bf7bc16a14 ./mailcheck.h +fac2bd4dd2194323712b18fe36b2b0df ./NEWS +0e3b2899739a36e425bb3625b2f3826b ./syntax.h +2546690c34260a715116fe3eab0915f8 ./include/shmbchar.h +3a9ee15f7d1ead5a00e2c643873afb5f ./include/ocache.h +24aed7ed761d97c0cfb525993e4a9002 ./include/shmbutil.h +8c5f3b85028035de9ecde19c447edff5 ./include/posixtime.h +0bab71b938eb344efbe8916f3d57bc65 ./include/ansi_stdlib.h +620c7e85b5587e6fb2729b9e9140ba68 ./include/posixdir.h +e432eaad8585f2fa09a77aa015aab5b4 ./include/filecntl.h +e8cf9ce0ae23eb40b5e2b191515ce1e9 ./include/posixselect.h +e432eb4df2399ef6aaf7f85e5e8f9d5e ./include/posixstat.h +23313a93f210490dd1100b28694b37e6 ./include/shtty.h +b7cc29abb842067003718f7227a10e69 ./include/maxpath.h +70202b4c5e22a7fd28840b56aa96b164 ./include/systimes.h +2bbed2eff2f7e9402a6c662afa7d7525 ./include/chartypes.h +d6e7a893a9ebffd5704acfdd6058b16f ./include/stdc.h +1e7a06238c6b2c7d1aa818432360f7b3 ./include/memalloc.h +c20ee4b5b7778b1f4974385050e5dc21 ./include/posixwait.h +7f29ae0fb90e5f5633ffc75974cd5042 ./include/stat-time.h +5db863d98155d7603a3839c8d50c60d0 ./include/typemax.h +077a15ba01bd498f5b9f0f520e0bf8b3 ./include/posixjmp.h +2a4cb87d31d5e6577e8a06dafdb31557 ./include/gettext.h +8436a85731753611120227793df301f8 ./include/unionwait.h +fe943736557537b75324ffc54719212b ./cross-build/opennt.cache +5d8aecfdc70f39928e454fe7b7a077ee ./cross-build/x86-beos.cache +7e5d0e59e4cc50b06a31e3c1756ac98c ./cross-build/cygwin32.cache +08acf124638ab364d559456ef17cd32d ./cross-build/qnx.cache +1100dff3c26df4f4074c57eee85038b7 ./flags.c +2ccbfa50aad635ebfc000d0406353940 ./hashlib.h +8d821f09bd3340309a6c19b141b92fb4 ./trap.h +34a93d5c66da54bd607f218a64a70075 ./bracecomp.c +7a42b9f9054108053733ec39314736a0 ./subst.c +9fa706d0366485194490b7c30ecca604 ./bashhist.h +b8b7641041f78763edb19463fb1bca2e ./bashintl.h +280b4bbfc3be8da1866dcbada31a0e41 ./tests/nquote.tests +1d2c4ab3a2ca4387d7b84ffb74767f72 ./tests/varenv2.sub +ccbdfb8e8b15d512d907afeee1e5c382 ./tests/run-heredoc +a19e72caef9cf1368a99abc76f35d577 ./tests/exp1.sub +8ee9a9b25ba1af0e9b97a3e668d19f26 ./tests/parser.right +399fbee22c6d8bd55a64b3273a02e30b ./tests/run-history +278c050d3b2af32abc8a6ac8b17d11f8 ./tests/more-exp.tests +4e316e0d723a7237d0a1ba833364615a ./tests/builtins2.sub +1ecd456ae2f6882865fe4a74b3d612e4 ./tests/run-quote +27f18db6438f7b11dbd582f765009978 ./tests/run-appendop +f26f9b204e136d7424b0a271d7dd5e78 ./tests/type1.sub +63e761e55299d18bac8751d8f84388cd ./tests/comsub-eof2.sub +a123e7626d117b054459f8fe52600b6f ./tests/getopts5.sub +4ab83e3d8e33285554c02a39fde279e2 ./tests/comsub4.sub +e5c25ca5c105f2cc7959f64a6ecbb030 ./tests/quote.tests +773f02ad82952056366ece718c88c6a0 ./tests/posixexp.right +11a26d720a4ef1ae09e73a97fa58bd54 ./tests/run-case +e66230497bf91658c5530f5db6ba1c06 ./tests/jobs1.sub +cdad05797a3a2f9b0aa135a00bd5a3e4 ./tests/cprint.tests +d0559a4ed7bba6104b4b6cb7c4067d10 ./tests/dollar-star8.sub +41c1f970168995a463c91880e1f3d8f8 ./tests/dstack.right +37dac78b69bc8e2a09e5330b295e5b83 ./tests/run-nquote1 +12962c59dd2eb838bdd06e8a856e2984 ./tests/read4.sub +711a638debd0a3213c399af437147d79 ./tests/appendop2.sub +ac4d700cc2b330624d3f84586e8f1cdd ./tests/prec.right +4b2002b656448fba71ba39afd4f67873 ./tests/vredir2.sub +00c4dde2c71b9b404a3e945638a1076a ./tests/dollar-at-star6.sub +496d7b062760db7c878a9633738e566a ./tests/redir10.sub +16a432cd8733c33666cfc13b2b1d0d36 ./tests/posixexp6.sub +808614fefece4440cfeab051d85300ab ./tests/trap4.sub +c830b4f2332659b7e1f890b01979b815 ./tests/array3.sub +a4ff576dc44595a440342c87ba04444a ./tests/trap3.sub +919efea556546498fd60168c06d3ae03 ./tests/histexp3.sub +951fa68458f98e2c446fe95401666d90 ./tests/history.right +a06a039d06b953414e7e66f7772f1298 ./tests/arith7.sub +c19e7cae104361895f1fe634733a1dfa ./tests/array11.sub +1c46daf5fe5a05fabd37553356d52e6f ./tests/quote.right +f88370b68fced1bd658f3a84412443e1 ./tests/varenv3.sub +f039cddd7ce80a49a12392e6eb3721a8 ./tests/case2.sub +c9975daa3bd82545d8dd7a537a0980d2 ./tests/new-exp5.sub +330c962d02c4326fab94fb72e93d40f0 ./tests/array13.sub +809f96f74d4c8a041308fd88a4eedfca ./tests/nquote.right +e3c655fead5884420737d9984e6b32fb ./tests/run-shopt +b6369ef9f5897050d505bc61ab7f79b7 ./tests/iquote.tests +abd303012e5a462432a15bb4dd2328a8 ./tests/glob1.sub +56da0821821ba7155c238a25fbafd44a ./tests/assoc4.sub +bcda180d367613493c8a691819fa5d0c ./tests/intl.tests +2a27459d370100303f226d541ed5ff20 ./tests/new-exp4.sub +938f50def80b2236d8379e5d168e68d4 ./tests/assoc9.sub +02fd7bf98e7969fb00ca3110b490b2de ./tests/run-posixpat +1325c55e73b048980e6880d0219c93cc ./tests/glob.right +79a526904d40c9df8fa469f75620392b ./tests/run-lastpipe +f8baec0aa4ad2da4dcd9088a2dfa85f4 ./tests/COPYRIGHT +abebfc302020c95d38636742cb1561db ./tests/strip.right +dba142e7e0cf874ccf0a88ab61ea7a34 ./tests/dollar-at5.sub +541f07be93afadd5297c4f7a335e8e95 ./tests/array8.sub +0b3c7dc24645bce655f2f7e33dc98f17 ./tests/ifs.right +837de05c1708b9619ff0df878ebe4b9c ./tests/trap6.sub +712e487d3b346b264c5273f946fd5dca ./tests/lastpipe.tests +48f2166789fc68b8662e41f14247324d ./tests/precedence +87786f0909e6ad4ff45f1d8a6eec8523 ./tests/vredir6.sub +dc89630e498e6db6cfe98ca8a8f591b1 ./tests/run-braces +b08270d947c3ececf70f438125e29584 ./tests/getopts10.sub +d56e4577b8332880b42e081b821dd21b ./tests/histexp.right +247229a6096dc49233f8a4f37205ddb9 ./tests/posixpat.right +3b6ba436dfb695c453aa708875850c22 ./tests/dollar-at-star7.sub +aa3b17f1b4453848d12a20e25262f5c7 ./tests/errors4.sub +998fb9427544de44b2f790b2bafb5739 ./tests/read.tests +5c3adc5ed14daa17e409279a8c302bed ./tests/run-nameref +54f89da798ac8bbf5ac629b7a6abf7d0 ./tests/run-iquote +306698cf428cc16e7829d8d8ef90e1e9 ./tests/array1.sub +7054d052a14e9f43796c2e67b9dff595 ./tests/comsub-eof.tests +172a2fe13546975f109b04955621eb9d ./tests/exportfunc3.sub +94af4f11ca6ea55840eca7e5017ba618 ./tests/arith-for.right +8cefcbd3347f66d8398560a350d10256 ./tests/new-exp7.sub +1b1b2a01e8df2468044e00dfdfbf8c88 ./tests/nameref3.sub +ab9b0c1c08534a07d4f1e4aafd98e1b7 ./tests/run-ifs +ee7e3692e99bf189e960cc5c3e8ee632 ./tests/exec9.sub +5af84e65912eed1c790f90f02dfdc253 ./tests/printf.tests +e85ac9846241016c145b18ebe7577488 ./tests/dbg-support.right +dbd44871973111fc5f9456fcce3cce3a ./tests/array22.sub +fcf60e8c363e317ac6865142af47fdfa ./tests/heredoc3.sub +3fb2d0254dda8949fb2161d9558a32aa ./tests/rsh.tests +a74cc95443d1278f6e1f388038e1fb8d ./tests/vredir.tests +9e42d69a0a6b287cfb16dade98bc09a6 ./tests/exportfunc2.sub +7423bd12b07caf39f4c9a2272f4ca964 ./tests/dollar-at-star +15fc7e6c74733c76a9c3700413922042 ./tests/exp5.sub +a06bf35fd29c581a64dd097e40c17307 ./tests/run-extglob2 +86a1d80262a15aa064b62b72d4572162 ./tests/dollar-at2.sub +f6abc0b106c9844278a1ea4765243aad ./tests/run-execscript +53326d17b32b0db5d6194a88922690a4 ./tests/run-nquote +f7083becd90ccc6c0a0c83a73f5e6c8b ./tests/varenv.sh +5509b0a3d7550a44e82d398848adf1c0 ./tests/exec2.sub +0c8fe1380f143e0cc55eb345d1c132a0 ./tests/vredir5.sub +cbaa1f87a679f9310fbe029af4562f7c ./tests/exec5.sub +e74688241ed329f3ec39ec9bca5ff9df ./tests/herestr.tests +7c984f13913a61253974a10f4b0c3cd7 ./tests/run-globstar +ba0f023e0f73f95693c89423d0dd3fce ./tests/dbg-support2.right +33e947ac33d37da5309b9d8be0a641f5 ./tests/ifs1.sub +630cc87da17939e1cb6fc6c98987fe96 ./tests/array10.sub +bf480941ffbbbb2eae559049c68584b4 ./tests/run-input-test +9034d3a343910997a409f30813e05a58 ./tests/version.mini +6d089d6c863edb8b3ee7b40440ed3399 ./tests/assoc7.sub +88155dfff4f1c13e61b5d30f7581acac ./tests/exec.right +7a92271a3311413a5863719ea88d05a0 ./tests/run-procsub +044b89825817c992e2500c6e1acd1693 ./tests/run-alias +acdd4ce346c2035e8350e34e50d5d719 ./tests/run-vredir +20853a183ab37136352f8d045e55199d ./tests/case.tests +7be923f82f3291b163ee5ce7c2a22292 ./tests/redir.tests +56c96c279cd6db3d07989cb3cbe63e54 ./tests/run-tilde2 +026cce4c9263aad031a1c9a657b9903e ./tests/read5.sub +ee67ffcfb9b83b25cdddecbf68a084ee ./tests/histexp.tests +27be9b87f44ab4e05e7fb5fdd274bf54 ./tests/arith6.sub +1aaab151817cfda87d71c26d28943378 ./tests/case3.sub +085996c69640564b16312cd8e3c7fa6f ./tests/attr.right +ed1bac51c4e4f62663b71bf62cfd2dff ./tests/nquote3.sub +9fa42fc9699525b9bf2a1d07fb62821e ./tests/dollar-at-star5.sub +8f87c0bfaf1390e97a8327c4ff99aa67 ./tests/getopts2.sub +c2c8057f70112b545352d0e88cba2341 ./tests/coproc.tests +e0c1c9c8ce1f5522474d0ede02b9a13b ./tests/extglob3.sub +af891e37f4edb7b40c620b891e2d6ad1 ./tests/alias.tests +b8cacf97218cfeac72135fde56c3d63c ./tests/redir1.sub +8f7f18dc89c60750bd7e615f55600397 ./tests/errors1.sub +f92470bd83b48faa4f9f1fc98a53b743 ./tests/ifs-posix.right +5799c210062e7c9bc26076bf499e7bb2 ./tests/nameref12.sub +058f6eeb402f0ac8ccf5ca90ad154150 ./tests/nameref4.sub +a484278cc4bb04efc2eedc28a82224ed ./tests/exp8.sub +d58df616532ee8b17c72c814e9394916 ./tests/nameref5.sub +dd59245bb97e00fe680c45512b2eff2c ./tests/getopts.tests +031ebc0b547a60ce524b90b716e80fec ./tests/glob2.sub +4d6ba33a19110a0cccae5ac9a21b9097 ./tests/printf4.sub +c99d9b3bec93f06bc566ae647cea82f6 ./tests/dollar-at-star2.sub +708b7548062272fe99eeee391b236339 ./tests/assoc2.sub +8165b16ac82ecb0f3abfccd30028e70f ./tests/mapfile2.sub +30449f14bb075e3eaa2cbee791925e3a ./tests/set-x1.sub +6db567cea8adf3b824a3bad7dbec7c59 ./tests/new-exp3.sub +a89d72c081d50af25afd32261c9c61c0 ./tests/exec13.sub +2dfa75d21eb41588679cb82b9bfeccd9 ./tests/heredoc.right +9c2e38b8746041a5d456063754dd1d89 ./tests/redir4.sub +f9832eb74152f81cf819ca5c3d092338 ./tests/run-new-exp +e6f64da5724c7794da1e7261c1c08696 ./tests/source6.sub +04de6e6393057d44627c2e533d66bef4 ./tests/array17.sub +201be4e1c4a2b57f776871a3d76f7bbd ./tests/exp11.sub +3c6e0b0e4f3de285b8d74c479f2e3c26 ./tests/exp10.sub +15b647585923876c22c65f6eadfdc916 ./tests/posixpipe.right +51c7bbd8eca2e23f3092c198610d4766 ./tests/array16.sub +d292c439fe3ee41fce91580b8633b1d3 ./tests/nquote1.tests +a9dd0daf16e75a3010b1ff5ed649a6a6 ./tests/extglob5.sub +7856c2a8782d8c40a628f5be5851d8ae ./tests/quote1.sub +838752737fcae227bf22e4e74ebb199e ./tests/posixexp3.sub +8b443bc9edda928d4a94fb16d9cea8ed ./tests/shopt.right +9623cd453961659daed08066b38917b9 ./tests/nquote3.tests +0a9e247df892136b1b29ce178bac1a4a ./tests/herestr1.sub +e31681ac1d353bb285b0d5ee8aa195c6 ./tests/run-builtins +8dcb236977b6a9687907243e69c4d1d7 ./tests/getopts.right +4d66cd844ad0f3d219761717d87b2ef0 ./tests/nameref17.sub +ecfcf75c055b97039ffc14803a1b7db8 ./tests/exp7.sub +4f35fd17e3795fd1d88faad408451a18 ./tests/dstack2.right +5a8106bc28042e4b7d282c9d750a2650 ./tests/new-exp1.sub +ba2015d73d7e9427c394f28603a56d2b ./tests/redir7.sub +d12bd15f9828a498900d2ccea62fc446 ./tests/extglob1.sub +1203a71de356500b5e663c44d20dd1c9 ./tests/intl2.sub +ca98cb463950c27026d316a24d43d44b ./tests/printf1.sub +100e83b26f5e3cd41aac80539da5f8de ./tests/run-herestr +1cc6d9e9251863b8979ca713f4f54795 ./tests/casemod.right +ce97e91ee15c8a5b8e0de1895022ecef ./tests/run-coproc +fff9e100a6417aa0750c3ea0edd30bad ./tests/nameref14.sub +5899838adced5c5ecb5790c8592c8a7c ./tests/new-exp2.sub +67c17c2d7b40ab3aabf786d3405ca9d8 ./tests/test.right +e85a7148ee6f7b9262c7495e611b08ac ./tests/posixexp.tests +d236ec72753a981caa83895f1b695f1a ./tests/rhs-exp.right +48b8bf266144169ddbb4096749818a6b ./tests/run-getopts +432e8c3a23bc56d6821d77ee44820e7c ./tests/array4.sub +96b124df7fd3421c4319177c309fcbb6 ./tests/run-varenv +aa89e2968a3b960e29feaa6e96b8f739 ./tests/trap2a.sub +ea832d19d23ef484f21ab8dbf9670695 ./tests/run-histexpand +180c4ab5979e99d34d406e989e469574 ./tests/case1.sub +e78f2ff08bfb91f1c40e0a3ba143824a ./tests/set-e1.sub +99a91a6f938caa3dae458f25fe38e9f8 ./tests/exec10.sub +0fd79f47a7ef58713660e9da8cb12984 ./tests/errors.tests +54911e44eb8c9af5542ba4f3f01cc216 ./tests/heredoc.tests +7823a7d272a41d644f217bd3c9b7c2a3 ./tests/builtins1.sub +93196822b0446845e34ee6cc679a5869 ./tests/array9.sub +8dfa2f388d99880449a2803d9014a01a ./tests/new-exp8.sub +e72d62567473e1e23f89fdd3d4ad13db ./tests/iquote.right +67517dd5e7905c1f275847f70fb497e7 ./tests/dollar-star4.sub +94f3d51665aa9def54c8d2529cce9522 ./tests/run-type +fcc706db2c4510bcf521455cfcb7b5f6 ./tests/nquote2.right +34f6f410f4405b592d94487f2c691946 ./tests/extglob1a.sub +b9ec794d238a4a4ccd205a2e220418b7 ./tests/redir3.in2 +eacfa44fa97db0818dab8f0d2f9874b4 ./tests/exp.tests +2be2f963aa733aa881222c721efd8ec7 ./tests/mapfile1.sub +581decb35bf8b4d6ade52eff709a9236 ./tests/dstack.tests +0f322a2397f1eaf964d72665be79bce7 ./tests/varenv5.sub +e303a00c9e2f35ea715ae64f9746f5b5 ./tests/source7.sub +96776c0a62757cb160645dbda707390e ./tests/tilde.right +509b4e4350dda1bf2ccaa50f7e65d872 ./tests/varenv12.sub +a887f181b6355e3b1a83a6313acc4491 ./tests/alias3.sub +3f93fadbce9d2a68ddb423605bc75fd7 ./tests/run-cprint +b824c71d043ddfe89896846f33784cf0 ./tests/run-test +075314089e5b5e6f29eef7a2c2609c40 ./tests/dollar-at1.sub +9c3b80b4f1d278f09485669ac3a250e3 ./tests/comsub-eof0.sub +d6a04328fe3d6c5ce258699d32ad9440 ./tests/redir11.sub +b744d749c26c8de3a6ec68dafad18bc4 ./tests/run-read +2cea6f520e71b0dcb611c65873c079b5 ./tests/nameref.tests +ba8de2c12390a97f0452eeb794be3e63 ./tests/exec12.sub +9fbd430aa3b565e8714d436fbd052249 ./tests/arith.tests +8775ac05db4b9df12d8d5b226167d688 ./tests/extglob.right +463e50a7c47cb546bce46fc527805597 ./tests/mapfile.data +7b4e3c55862e04a7fa2d5c89b3e02cdc ./tests/test-glue-functions +886bc5de95d2bb58c702c0f60e464dad ./tests/trap5.sub +232251316099bdaf908f49067f041e56 ./tests/globstar.right +bbd0d068d027c28df65bb0539370f012 ./tests/rhs-exp.tests +15e4d3f965b45f63124fcc642e17913e ./tests/array15.sub +c967c1d9a5a3a4b90862ab4a0484a3e6 ./tests/source4.sub +7d2a8078556ab0ff148b56085572e9df ./tests/source3.sub +503a31a43caf87a53f898f5c3ec6c0e3 ./tests/vredir7.sub +0b85730eb2afd090ec030b9ffa84f512 ./tests/tilde2.tests +2a7810ae36af92a3d026b3702b72adb2 ./tests/comsub-eof1.sub +228dd9914e8706a9004919040da872f2 ./tests/type.right +e043fe1af0d17d8cbaea27e9b475088d ./tests/func2.sub +8dc34242c9e5c73d72af70d090047f5a ./tests/assoc1.sub +796df2ce0826be065ad943ece0706b21 ./tests/getopts6.sub +d4c67e7b427c34a9ef6c1be8f550fed3 ./tests/run-dynvar +dedc1e933e29070de4ebf12aa0ece781 ./tests/run-posixexp +8bd95f6f8adc1e2760abe2ea2f434e05 ./tests/comsub3.sub +dd3f50cb1b7b3831e92b42187b791aa1 ./tests/run-assoc +5fafb2447a1c4f074f7ed3c965e1bac5 ./tests/redir3.sub +e858cba3bb87d7fad529c6d0b15a8eb7 ./tests/input.right +92d3ca78dc9394812fe46debdefc91f6 ./tests/coproc.right +a51a2a9d07a2a10f7722cda2f48bbacf ./tests/run-nquote2 +3689ac31241e50a89aa11fc42c6fe88f ./tests/dstack2.tests +e5120080860afacef6761251e5450845 ./tests/unicode3.sub +a14bb4fe77a4e0c09e78c19a051fa73d ./tests/getopts7.sub +f7eac12036c384f9ffe20503111dd6e3 ./tests/vredir3.sub +00f80c9161f00c3733f0c7b67ff703f9 ./tests/dbg-support2.tests +d773b1a012390e2a06134074051feb22 ./tests/cond-regexp3.sub +08956d7fbd85b43a1b2b4c92df49fb8b ./tests/invert.right +43e55b12653b3562140e0de12e888eb7 ./tests/trap.right +bd6b19f22dc2732db6945f2af956262d ./tests/func.right +36c6a09216aceb9adb1ddddabbc5abfe ./tests/dollar-at-star4.sub +a619349c6d13caa03e513443785fab50 ./tests/mapfile.right +422aa15c4975d0f0069cbf13930a50c5 ./tests/jobs.tests +f3c552d8da6de00446dbdf069ed8df7a ./tests/attr.tests +c7987a94eadb8f2fc63f58e57022a085 ./tests/run-intl +d404401c8c6495b206fc35c95e55a6d5 ./tests/redir4.in1 +9083ea2e08d19ad48438ec376ba37e62 ./tests/run-array2 +a87ab4d58dab99c7d96b591f82896305 ./tests/redir3.in1 +f7b7915521af5380e17cdb3a6ec74c13 ./tests/arith5.sub +8fd28e5789f61dd3cf7e90699b2b1fe8 ./tests/comsub-posix3.sub +c1074e59f3ddb1c77e810d21d626b9c7 ./tests/getopts1.sub +5e54c9b4e6a93989453078cf9521f3da ./tests/run-ifs-posix +2a274fdac7fc217d3329430efc5ca7b8 ./tests/arith-for.tests +0aa06699affc6ffd89615b70d7c23c97 ./tests/nquote1.right +d614b7f9499687bba1c38cef6aabd90a ./tests/errors7.sub +1297b54aaf4255a67aaab8a1d214b9dc ./tests/extglob2.right +faf0ac076e2033f10b62cab9496d0c39 ./tests/nameref18.sub +09733b947f1f7f0de38114d90db9f1af ./tests/dollar-at6.sub +8eb6b6b9a2165b400a5e7c5373c056fd ./tests/varenv6.sub +c31ce20bc3d2cafa42aef22c273c4512 ./tests/read6.sub +b315d4f8f1ef1d6eabd08a7e20517d24 ./tests/type2.sub +5dd3f214ff6514189388c840b77c7f05 ./tests/cond-regexp2.sub +29a35dc786e6ed2392c81f2cc3a41a8f ./tests/run-rhs-exp +09e3bfa58a8593af5c41360061a9c9e5 ./tests/read2.sub +52c0ee7d13e3d2063a4ad3a11adfdf93 ./tests/run-minimal +8146b752e96e9431a5b2b03f8788ce05 ./tests/vredir4.sub +a477847ff5949ef81f66709acf57d119 ./tests/nameref6.sub +c7ebb4567c0dba955cdb1aac453d53e7 ./tests/posixexp1.sub +e7d4e534e4f6cd2592380ae09502a082 ./tests/dollar-star5.sub +bd27f09eeb7512051b14718dc124e482 ./tests/invert.tests +b39a2cb59d98457e7ad98a89c5631a80 ./tests/run-extglob3 +ee5e79401db19dd6d54d5169741b1406 ./tests/exec4.sub +2e4eb8b0d09e9fb7bdd9e6199ac6a2dd ./tests/exp3.sub +a221db3fdd6facd83b1a6281647ef709 ./tests/nameref2.sub +16550230ead5a617bc463f5ab9c485ea ./tests/exec7.sub +6393da733bc007df875486c443fa7454 ./tests/assoc3.sub +97f6c2a3716f45f26e9b4de91552fffd ./tests/source1.sub +a1c579739adbccb010447452d358522f ./tests/array23.sub +f5a35be44739d773a1f609a3dee4ceb5 ./tests/run-parser +d566e060af2d8eeb1623983d6336664a ./tests/cond.tests +58c02563dd40da57cdc1ff77eb4ac9bf ./tests/heredoc4.sub +54ae1f4c941056485d47d66a93ab2201 ./tests/exp6.sub +0b4a2fe5f4450489b6051ef701be4093 ./tests/dollar-at7.sub +40ad765fb72f26689e0a4ed4383a98f3 ./tests/builtins.right +d9391705e19d49e56a63f42110e40c60 ./tests/type3.sub +df1aa92381785407dab20ab4260cced3 ./tests/redir.right +583a1e58582d84002e0b4065e73f2e54 ./tests/set-x.tests +a72a9951287590310105494d9cf94a6b ./tests/array6.sub +758f4a7600c5097f6b794a2760398bcd ./tests/run-redir +154d0cdf34c8f849c323d9d29893e4ea ./tests/set-e3.sub +f7b20b69f8cad74062e9c2a4f58e3ede ./tests/history2.sub +4cb20f82254bd8da8a9a5b30f8adda8b ./tests/run-comsub +86b97948b0aba05a4fb447e2b53e7607 ./tests/exp2.sub +8e40f1cecfeca09d12bc9c7ff1378349 ./tests/run-invert +a9becbf64a353a85a14cbeb0ee6f32bc ./tests/globstar1.sub +e99135571d909ef8f2ddf0d5efd3a015 ./tests/dollar-star7.sub +28268532347775c39994a2ff50d5a9b5 ./tests/varenv7.sub +740c952947b978de78e827659fd34652 ./tests/posixexp2.tests +2dbd9d5fb58b72b9d712d472dc211ea4 ./tests/trap2.sub +ed7fd603329ddaab0522475cb708da70 ./tests/varenv4.sub +0b2910562fb1e0dfac809b674e829dd0 ./tests/posixexp4.sub +44144c30fce5ed5d38b165d32b72c110 ./tests/getopts8.sub +f5c8a94d51168433198a467d9a4bcccf ./tests/nquote3.right +8c36a4b73613567b1de8f943e379d389 ./tests/type4.sub +d8266bf732791c2fd48d129a4cbe2b84 ./tests/run-dbg-support2 +808a11f8a98fd68f098d4365685ba06b ./tests/set-e.right +7cc22702eb197015e6ff8ded00aff6d0 ./tests/cond.right +7b4af499098b4b16470df52f2503ee8e ./tests/comsub-posix2.sub +c040eb51d349c74f8b13700700eb8a22 ./tests/read.right +6c5e1161ee846ce84d94f867a3a72dcd ./tests/array19.sub +e9c46e25a9b41e3b128f7a9c2d455973 ./tests/dollar.right +88e89c51800872390a429f1146fa90c5 ./tests/exp12.sub +dc2a3b917ac41e3191479730978d5d87 ./tests/casemod.tests +518d799f7631a7a430c9a8507bde6084 ./tests/nquote5.right +805b72debe32419d9b4bcf5fd21a59d6 ./tests/dollar-at4.sub +c7734cfbed819b9e65333ad54248e3f2 ./tests/errors.right +3b8d566bad42378448c92570a109a578 ./tests/comsub-eof3.sub +726231e74529b01c76a682051d862448 ./tests/dollar-star6.sub +e1b7f00eeeac2fdbb24fb9d33336e3fe ./tests/nameref13.sub +541c8cba65f4d8a94f472df598bafe4b ./tests/arith8.sub +e30c89b06fc6cb13048db1ed7a521ecf ./tests/array.tests +6924456c3e8f1cb082cb3779029cc6af ./tests/misc/sigint-2.sh +671cbbee87c1b27a2bf7c66279c05d44 ./tests/misc/read-nchars.tests +8c0a862f0625e989572d5cca435466cc ./tests/misc/perf-script +ceaace355693a9cfc2853e00ff894cb6 ./tests/misc/dev-tcp.tests +fa3d1f37e1da29ed85f7972687a35372 ./tests/misc/test-minus-e.2 +9b70d89198d56283cd4aa2ce0c649018 ./tests/misc/sigint-4.sh +e436be16997b82d88ac23053be9b149f ./tests/misc/sigint-3.sh +02cd9a6eed6ed4f68f8b2be8d2501740 ./tests/misc/wait-bg.tests +d6a709cb2469336b7fe0564a533b0ec7 ./tests/misc/perftest +91110f67cea5963c41f19baa0ba98bd6 ./tests/misc/test-minus-e.1 +474b8516d51ad15523898d951dc07b7c ./tests/misc/run-r2.sh +b190d9ab1908eeeea45245b8facec605 ./tests/misc/redir-t2.sh +ede572798d4fbbc4e7d65451db6d4124 ./tests/misc/sigint-1.sh +d420ebb134464834c6bfd90658a82abb ./tests/appendop1.sub +03c7eaaef085f75bb2bea86fd418b5c2 ./tests/printf3.sub +85e57b8fcbf08446f52d0244eceb379d ./tests/run-all +099262e769d5db120874d62963138498 ./tests/redir5.sub +7a6040deded3874610f0c1cae8acb4b4 ./tests/run-trap +6e09b225c9b637af2dbbf7446511ac95 ./tests/run-precedence +749ab5fc8aeee2d0d8ca7798b149425b ./tests/arith2.sub +6e43f486ace70c43991b78e572f97e2d ./tests/run-posix2 +23c8519cc8aa162d4550654b0995afd0 ./tests/array20.sub +562fcbd62d1a1389849f58dec995a5d5 ./tests/run-exp-tests +4e458cfcb968501a38d48a725ef06aa1 ./tests/vredir1.sub +6bed8fb1d5a80f64017e93709dfef62b ./tests/run-set-e +28dca56e4bcd943b7ff5a0675592ae32 ./tests/array12.sub +69e4401cf3792e3bbb3048ba1823bad0 ./tests/array24.sub +07482de17713c4a48e28442e4819218b ./tests/nquote4.right +0cc0dd6bea1078ae18099fc6ff8e8153 ./tests/array2.sub +748268281c47528c65e345fc1f6e31d3 ./tests/errors5.sub +dae9d5a8ebb0b67cadf64e34e9773823 ./tests/run-nquote3 +84ccfca5c85e0d422378d2861a5aa8b0 ./tests/dbg-support3.sub +9228d1580114f93fdd3591c9b36ca870 ./tests/run-dirstack +95380b738d16a767f799f07ecbd6362f ./tests/dollar-at-star3.sub +ac7e2d0af783bdaf4d30c45e5ea511c5 ./tests/jobs.right +7e9b2e556371f336c24a8ac145182c50 ./tests/jobs5.sub +4432831a545de72004cf64fdf9138221 ./tests/posixexp2.right +4747fe90d22b81f5202a49c39855b595 ./tests/varenv9.sub +e53156ae173e79cf7508aa2f3018c0b8 ./tests/procsub.tests +a06ae0cd9c2162137e54703a653d6668 ./tests/extglob2.sub +0699dbf2c1f312086b18783db031bc4a ./tests/glob3.sub +84f0ae7c3b19961d1635f709e6e6980c ./tests/extglob4.sub +c854782b435d18ec2bb85476f84420e1 ./tests/tilde2.right +3413509ea55b386b66859836773142fe ./tests/func3.sub +753066e24010f2705fe991760172db93 ./tests/getopts4.sub +84d99fbb2d58dcda74f277643da44027 ./tests/history3.sub +f9abe520eaf000643a619e4c74a9623b ./tests/vredir.right +b5dc98f3594accb10a0055372a0d330a ./tests/redir6.sub +935b14d2e8b14a00c720e5c1a5f09faf ./tests/test1.sub +76a0871ce32cc40d408294b938e8102d ./tests/new-exp9.sub +bb8200fb2d4518ad8298eb31f084cbb9 ./tests/run-func +00e43bbdfcc95173160051824d1df2e1 ./tests/nameref8.sub +4afacd09de838d5f3ea674ace060da34 ./tests/nquote2.sub +0cc1b7ed5032b563bc3136161262d624 ./tests/heredoc2.sub +82d93b607cbcfa9434db01a14adcba49 ./tests/array7.sub +69578d162bb4e9eacc223311ece5fc3d ./tests/assoc.tests +caf8c287da11c0bc1ea146a18992675b ./tests/exec6.sub +902485ef999fdb27722a9698beb25b1c ./tests/dynvar.right +e34c054608573eb1577e7a706b77b3ba ./tests/varenv10.sub +7b455018e80fcbbfc405608553372e7a ./tests/history.list +b10c0dfcc17a021c7199ffd27eb825fa ./tests/run-jobs +09c4964fd8ea4e4d817cbd2c0d40b673 ./tests/exp4.sub +e6dea5cadf75954e47774ab8f46aaf1e ./tests/comsub-eof5.sub +cf6c748d7516c6057e46007245200096 ./tests/assoc8.sub +2eb096e32a587a5a3dff4f5d84a16be3 ./tests/execscript +40e79f322b08719e8666e7cc261e917e ./tests/posixpat.tests +23eb6885f2edab30b443ed12894bf7a4 ./tests/comsub-posix.right +88d257b4451fb62d1f45f0819b3dcf07 ./tests/run-casemod +7852b0fc83110a426f9a8e018fd6fc46 ./tests/cond-regexp1.sub +15ac91cf913f5b6db99665082560a876 ./tests/run-tilde +8912e1589e78ca950d52f639d75fa16b ./tests/nameref19.sub +1a2819be9b0701fef9a8a8187c512586 ./tests/rhs-exp1.sub +42ed57b53897cc71b1da7e00ca47fccb ./tests/alias1.sub +d2b7c6a97194e5484e3fb6437d48af17 ./tests/input-line.sh +7417df74e2352362499caaaa23d8a38a ./tests/unicode2.sub +0616e424f02a76381edfd7f952585486 ./tests/array21.sub +f36c9f14c9e023467919a1b2a86332a5 ./tests/arith3.sub +4b58ef1597a2d53904e880559de2e865 ./tests/arith1.sub +3bc1e8311894b950d063d1cdaf602d84 ./tests/version +00cda9ac64b007072ef66a4ee331c4f7 ./tests/braces.right +a603a3ef408913f4b34c34466b6d9536 ./tests/nameref7.sub +2deca6071e5b23b0b58c1993f61710fa ./tests/case.right +90d1c8464bc38df11862a4184db8a323 ./tests/dollar-star1.sub +2d4588d39783fb3cbcedb24e01cf5121 ./tests/getopts9.sub +0f881f39624bf5b0102cbf884a5f4584 ./tests/comsub1.sub +f9c3d1f14f645bf3d8a4ed0a6c81621b ./tests/trap1.sub +8a87aa3dbab833216ac9d0701f193acb ./tests/run-attr +586720e0ca6a74730ed3c6b5141197f6 ./tests/set-e.tests +d3abac92240454d8d9b8e2b3c576a710 ./tests/printf2.sub +3fd910e4223e6fef288d93faa005731e ./tests/new-exp.tests +54feb391c1c50949bd7a532441cdbb6d ./tests/jobs4.sub +000c63bb5ef885f4d7febc73393d7d9e ./tests/parser.tests +e1f44943175988c7f4a3fe5694b59367 ./tests/jobs6.sub +da9e85e6b1f0445b1145d0bfea55c2e0 ./tests/attr1.sub +1ded9f8ec7c682ee8c789e58ad5b7bea ./tests/lastpipe1.sub +25e937694584018fca891f262424db9a ./tests/cprint.right +1ab9145878eb67e328d925a80dc2bccc ./tests/exec8.sub +7d2a8078556ab0ff148b56085572e9df ./tests/exec1.sub +c97665817effe2f59b8232f663764f5c ./tests/nquote5.tests +45b6e8d19c74123f1e3da92351eff57e ./tests/glob.tests +87a244f3767c580350bcb16ee66ccacf ./tests/arith.right +c54433694bf86cfb4342bf158408392b ./tests/errors3.sub +8961cd9a681bd0aa4df5fee68f3c4c70 ./tests/jobs2.sub +17bf32dd322a204ca68d630f0edaf77b ./tests/new-exp6.sub +1faa8b18a529a7b066bf73ca6ade362e ./tests/extglob2.tests +12056a3eab7dcf2f7ace4f2ba991a0e1 ./tests/run-set-x +daab42225119028ff9de6a89664c51f5 ./tests/func1.sub +810ba929db7553ac9b56b9db588f573c ./tests/dollar-star2.sub +453df045373917875a198a38d2e51232 ./tests/rsh1.sub +f991397475bc411740f4ca8f9fcb087a ./tests/appendop.tests +853f809868708e61073ccd53de3769e6 ./tests/extglob.tests +b315d4f8f1ef1d6eabd08a7e20517d24 ./tests/heredoc1.sub +c16ad027757708773f396f77831a6b87 ./tests/varenv11.sub +a63b62d0ab889954d03d0d5badbcd7ba ./tests/strip.tests +17c37044dfe478dfee2f8e3efdf2209c ./tests/run-comsub-posix +890216407eb681a31fd35601c1462dfa ./tests/trap.tests +67d1df8196b4876170330420d8d860cf ./tests/array-at-star +cdecdd4d4093189346afbd57bd5a38f3 ./tests/globstar2.sub +8c3a755cf22277876872e1320db08076 ./tests/extglob3.tests +0a0cf1cddbcb21b75d27ee38d07aa773 ./tests/ifs.tests +ead123a2fd3b107452a80b1fd93fd05c ./tests/func4.sub +60eb3ec509ee4c73e1685e8ac3bd287a ./tests/builtins.tests +6c8318df1caeaba34f94ac2bc35c0626 ./tests/nameref10.sub +50619bfface4e738caba7a7509efa9bb ./tests/getopts3.sub +99b7dd05bb9302a889fa3e87885d2ed2 ./tests/shopt.tests +48358b797165c9690f34d844cfbba87f ./tests/mapfile.tests +5b344923686581a28e75f16b7ea2dda4 ./tests/array25.sub +16c0b0f2468a364683a7ba0dce646c09 ./tests/redir9.sub +4cb8933f4bf2e4a47b2c82afe816db49 ./tests/alias.right +26ec4c77cdf8402a800007247e009abf ./tests/run-posixexp2 +24cfaf5f0509c45f82a9ceb78e29b0e7 ./tests/run-nquote5 +652903d56904f1691cb32da6b57ba12e ./tests/posix2.right +bf7109c52127ebb51a883dace92256d0 ./tests/globstar.tests +99a043db3f91cce5d4ef5f58905fb83f ./tests/nameref.right +9535d9d5eeb140455a9b33d7702578db ./tests/posixexp5.sub +40d0e264b7f36f1e004610752ad78e00 ./tests/read3.sub +e3b4f4b35fe986ee9d60137db77e7d06 ./tests/exec3.sub +4073f0169de99cd98c13277aa0c43a16 ./tests/tilde.tests +9e1050d5d76ae6fe662ba603761e2f36 ./tests/dbg-support.sub +baa7cd4ec83b2339d709c362388c43c8 ./tests/array18.sub +4afa8607014bee0f127b9727de793c4f ./tests/varenv1.sub +7b1e0d03a2f7d7bacb3153098de86734 ./tests/run-comsub-eof +25ca0467fcf2f34ec1e2f25cf27b6ab3 ./tests/dollar-at3.sub +ea28be205a6ca9aef8e90daa19cea4e7 ./tests/README +d8a4b54a56df5efb66a02e2b5315d8d1 ./tests/run-cond +9a3ee1b1621c40c15e048155e02ed0b4 ./tests/dollar-star9.sub +9095f8f81804b128aaadcf41403fd5bb ./tests/run-printf +69dfc49442ec6dcc67e6f8f3474dcc69 ./tests/builtins3.sub +14e788a510b5fc19776cd417047c5024 ./tests/run-nquote4 +a93791e9e5446555763d09c6fd3df434 ./tests/posixexp2.sub +4e1a23ec18d3498834081d644faee7cd ./tests/builtins5.sub +323c68fa4401d8a6e0456525f10e036c ./tests/history.tests +f23576bd3b1282088c537cac1c028981 ./tests/nquote4.tests +44d89f53c4543dd7e263b456f4abbaa4 ./tests/nquote1.sub +87c25a00f96a5488629a6098eabeaba0 ./tests/run-exportfunc +3af48ad8a5cfb73f61b72c00f93176e4 ./tests/func.tests +1c322db4affff8e95cf21e2220d12825 ./tests/attr2.sub +6bd0c22230717ec41b1d6b271cf69c08 ./tests/printf.right +7c91ce63ebbfcd0d05e3a31dc580290d ./tests/nquote2.tests +31155d2ba7b2acfd419b93e0fadfed4a ./tests/histexp4.sub +910e4395ab79965b4793badc0d35fa10 ./tests/exec11.sub +b8b31f0f8038d116c252be2bb621607f ./tests/dollar-at-star1.sub +12a4ed5d8027c802f2adefbdee230aa5 ./tests/comsub.right +bf47a56b12c7bd9d598722c287e511e3 ./tests/varenv.right +d0780bdbd05f5f5d8232124859352649 ./tests/comsub-posix.tests +bb8207684b1aba7597d96a125d91ae5e ./tests/nameref11.sub +9122a08d98c27b9747ab149ce5b01c07 ./tests/procsub1.sub +3fb4438e03ddb7ad4b7bdcbbe82456ac ./tests/intl3.sub +16d60a4ad4ff9770066577e70673f8fd ./tests/comsub.tests +088f72f6ef260d6a3bf6c4970ed52fcf ./tests/errors6.sub +b59134915deafe480bf3b4c40a47b0b0 ./tests/run-more-exp +7095ca486d755fb6b92f549866ff9ea6 ./tests/run-arith +7c39f0163ae60671979d3f7fd342c67e ./tests/comsub-eof4.sub +ce6a97b1520d25f87b20410e0fc5d771 ./tests/array5.sub +a738f246fdaacbe07d867153f99ffc78 ./tests/run-strip +30ab86f955e8e1d19fd062dbc70a4f38 ./tests/posixpipe.tests +e073fc27a83e4c8acb8fb86c29a0de20 ./tests/set-e3a.sub +e9e30917835da29a3b9a2b4c82bb5603 ./tests/run-mapfile +8d9df1c8a5f0e8f0e59619ebeb81f27d ./tests/iquote1.sub +f98e5dae1f8ffec9e2c885d4b3cf0a72 ./tests/varenv8.sub +f2dcdf6dd8a0cecfbe68420cdd00f72d ./tests/comsub-posix1.sub +4b3512b6d2d8f69b10a83be197931aa2 ./tests/run-extglob +6b57258cb0f256d4a1e3a00a4edcbee1 ./tests/history1.sub +78b048aca5cfdb1fe599c4031a1f250f ./tests/array2.right +8ecbd2d0b89e3252480f1d9898732c5c ./tests/run-array +c4d89706a471397780fa5c83534c9c44 ./tests/source2.sub +3943c554da708e50327ded709ec04697 ./tests/dbg-support.tests +9b30b430017949d419e99ff832112daf ./tests/set-e2.sub +03adc47fc37afabff8743ae5250521b9 ./tests/assoc.right +050ad2eee5bd39b7bd4c18363be6b913 ./tests/lastpipe2.sub +1ed2255b8374ad473757f4f0dbf93e0f ./tests/dollar-at-star8.sub +4985438b465ccd948084174cd6d5012d ./tests/run-rsh +f5866f2038352b271e4f40fb2577fa4f ./tests/histexp2.sub +d4a5231a3a02f8a87ca7663a0e69a390 ./tests/appendop.right +99db10fa4700a86f6f15c019f046d8d7 ./tests/arith4.sub +f566e1d6a531d4ef791862f79037100f ./tests/posix2.tests +99b84d0ca413bdf1f7fd23eb7ca38a03 ./tests/comsub2.sub +f594c25d3f6b832f3d8215fde39ee618 ./tests/set-x.right +176b9bbe63a461e775501f3fd000d8c8 ./tests/run-posixpipe +56832cd2644ff2a608932bb8b19ec433 ./tests/run-arith-for +58e8cc6f359f934cd8ad3b454656fd70 ./tests/new-exp11.sub +ebbcc4ef03e2ad5b94dd699146c88b02 ./tests/intl1.sub +923acb60590ec904bdeeb85a32615f9d ./tests/exportfunc1.sub +5e55aeaf13e33d37a282437bbd549a43 ./tests/exportfunc.right +e6aeeeec5b8d74b7a5e4953df55dc120 ./tests/unicode1.sub +0a4993a00540f6d3d69d09532de4ddc9 ./tests/new-exp.right +ee0a74d0a0f438ab484a341c8150db2f ./tests/errors2.sub +a542ef8c9add7012c434f281ca080fc1 ./tests/dollar-star3.sub +d1b89583aee411d873f3ba2621e3bd84 ./tests/exportfunc.tests +2d8f03b63b0c7ac564b234ec43c51172 ./tests/lastpipe.right +170ba60b828cfea03f5e621289085d97 ./tests/array14.sub +0274670cd3c495db36debc3fa3ec135b ./tests/rsh2.sub +c8270b01b9b8654770d3fd4ed1272eb7 ./tests/jobs3.sub +2608b163403edec7789f083fe50b8688 ./tests/type.tests +42c5ea4f2db5ff6db2228e0dab94d6f2 ./tests/rsh.right +8798955d04074f255db637887e1879e6 ./tests/redir8.sub +6fc26c683564a0d8e7d4f0d747eda7ec ./tests/test.tests +7c8717166504f6452ed18b07a29f3ad1 ./tests/posix2syntax.sub +b887f401d2b32c4f7bb26a153fa0c975 ./tests/more-exp.right +a67a513760fac1881674637fe2d7f48a ./tests/array.right +431dcbc4d56303dd45e4b5cdaf66a94e ./tests/histexp1.sub +7acdd70fe3fd54a6360c28884c001d0f ./tests/parser1.sub +5e1b4d380f6aab8cad6cadf044845f45 ./tests/exp9.sub +d9bba3ab236291ac78dc565b5d5a63c4 ./tests/builtins4.sub +0d3c4f2b495b209c1122f4596238a78b ./tests/new-exp10.sub +8d8f711e9572670085079b9f84707a5a ./tests/alias4.sub +fb3268c52d45c2287c00d522aeeb475b ./tests/run-dollars +70b5c9a0883c3672b90827cde36d1d7e ./tests/braces.tests +3033145e5614108ea943ac0e6c8d8e5a ./tests/intl.right +49c90fd177facf91954447422f3e53b1 ./tests/input-line.sub +40401ee9058e7a835b462a4c22425695 ./tests/extglob3.right +6a8cd4fbfae35fc0fa3a52c326ef9921 ./tests/nameref15.sub +10cb647101a37aeef7cf5511f865d994 ./tests/dynvar.tests +a9b3d790ea8c2f385059a904b5e2619b ./tests/nameref1.sub +5b18718efe6094406e631e474b59e031 ./tests/redir2.sub +cc4b8dc2527fc3cd274b603d935ae2e8 ./tests/procsub.right +4c814172d6f894a35156a310bccdc437 ./tests/assoc6.sub +33b4ec366fdafd11329a8996554d02e6 ./tests/alias2.sub +2b2023926bc911ff5e7ffab347b29b93 ./tests/nameref9.sub +26db20fbfa0bed29dad1f28f7cf299b8 ./tests/builtins6.sub +0ed155f2a1430db874d40c60ad88dda6 ./tests/assoc5.sub +36dfccc7da5edbcc6788b277963790fd ./tests/ifs-posix.tests +fc78fa7d3648f61b8943f49eb91720ac ./tests/run-errors +f538c88a0575e29d3dfce1e431ac5262 ./tests/read1.sub +27ddf17a6cf06fd5295c3fdc86c99bf5 ./tests/nameref16.sub +3867bc7cfcd8a27b82fd076fc38f7a6f ./tests/comsub-eof.right +06463597d3356d47ed43e7946886eecd ./tests/herestr.right +2b35198c67853b1bf0727c4476b175a3 ./tests/source5.sub +fe7823b8185eaf23e560e1937331b6c4 ./tests/exp.right +11bd1d0901c7adfa2f75234b46bab29e ./tests/run-dbg-support +76de7c8486a4af8a500668b0e6be87c1 ./tests/run-glob-test +1290fef00cbdf1607ccf01d971ac50b9 ./redir.h +133daaffa0ad9c8d6b879737e24b6904 ./hashcmd.c +90af2a38a61df82dcfe755e13f4c0e9b ./print_cmd.c +cc08a8ce4f027a7508f693401aeb0306 ./jobs.c +76a55738afd39139dd2d7555595e6ace ./locale.c +1231fb0208d6e6824c0660b3ca47e9b9 ./bashline.h +ed4dce8f6ec807b04c3c24d4da409fb7 ./copy_cmd.c +92ab3757104165eb2bbbd974e83c41e0 ./eval.c +aa9b36b2325d32c41ddc39750c70e978 ./unwind_prot.h +e44e214dc56136122f66da5f2d0c3fcf ./error.c +ecfa86baf9a29200497c7b3cddb1b79a ./version.c +816f31370a1c0a51676365b921bd4121 ./pathexp.c +aa371c8978ef18bf58a465b6e29e3358 ./parser-built +cd1e2301fa0d6ea833ce5cd91b1ca006 ./subst.h +26b24b34d024ab2aec31af3eedfc0847 ./po/en@boldquot.po +e42e3e489c2526d9815e5ed3c4915d4b ./po/af.gmo +d92ec93839abbc831477e0eabf2df91a ./po/lt.po +5629f5051cf3cfb86da1dd9d538eae10 ./po/es.gmo +c7fa02003d2ea7dda5dd92bca6afbce4 ./po/ca.po +26bff27763293388a70725c4c1bedf93 ./po/ru.po +140858226cbabd8977f21e2f29168bb1 ./po/en@boldquot.header +4c2308119eaccb3381e340828e307599 ./po/de.po +36a4eda984fcfbc2746a5d0996adbb94 ./po/ja.gmo +6c79a05462cad28328e28d793ca0444d ./po/de.gmo +4888f78cdf8824812be4786cbf7c1b09 ./po/zh_TW.po +d17fd17c795d19f53e8d6d5e7d68d250 ./po/LINGUAS +957a59087a0223b0e22ea294f30e4a55 ./po/ro.po +540aa2c29d5a7100eca06487165408d7 ./po/Makefile.in.in +499b8fffb1f1438fe1d503151fd5a1eb ./po/sk.gmo +f652c7cf9496049a47b091513f120a45 ./po/quot.sed +ddd397d948b4affd0a9850ab19c5f46c ./po/sr.gmo +8b10e39b744173c8529f7c8778bfa0f3 ./po/id.po +e1e66bee343152afe23437a609884e76 ./po/bg.gmo +64821786af042873444a6e013154ce12 ./po/vi.gmo +9f72ef7fe3e7c7330c158be85dc1bd4c ./po/boldquot.sed +debc6574dfe549a0ce203ae8f4ec006e ./po/pl.po +9e018f5eaf00254fdafbf09ba63df2c2 ./po/pt_BR.po +4d296cbd3b3c108916685fa95772c840 ./po/bg.po +dba0804a7e2d95c9cad32074e9e1db49 ./po/ga.po +f2442c80ae32655607049deec9fc9fa7 ./po/fr.po +4058e3af6c83f511f54a7abd7bd9b71c ./po/en@quot.gmo +4d43527e66aae700057d52b1665e55f0 ./po/ja.po +37b84a20964404a0e3367b168fb1e551 ./po/eo.po +ca31f25833018d51ed9fd3ee567e790d ./po/fr.gmo +bb334b712231c9cf5607c9f4a98d90ed ./po/sr.po +47dc7e611774d60605b0012c93f97aca ./po/ro.gmo +aaf03a1b1d0afa75970594acde047455 ./po/bash.pot +f1f9727ebec008a31999620089c0590a ./po/en@boldquot.gmo +be51d46ffd8b850017fa9ec991763114 ./po/da.po +3533a9dbf5b11aff2a18f69af44bf61d ./po/zh_CN.po +ad4e97ff74edff4f00c0f7c180fb54fa ./po/lt.gmo +905ceefdd67121f1a3f4f6417d043d0b ./po/eo.gmo +88025f3ca24e206a3378c2587675a246 ./po/uk.po +f426ae3683f395fedfbb047206b58603 ./po/cs.po +0acd88c6ac79c87a5be26ad659fe7126 ./po/Rules-quot +62925a0534be06b01cc236d673b87754 ./po/nb.gmo +1db7ba5bf01b572370571c71bfe83442 ./po/ca.gmo +8242fda95b942e9f7df7abae4eca849b ./po/sv.gmo +a17d98ad50b7b57a4d2be6b8b11dfd52 ./po/gl.po +0a03f23661ffd2a4d59ffeb38a7f4b10 ./po/af.po +c1305e59cdaedededc89a0f20bfd7695 ./po/en@quot.po +55ad02fb6e7e5aec92304d2018ed8eab ./po/da.gmo +03e254ccdae925821da2f71a8369a12e ./po/zh_CN.gmo +c1f5a124111b1284c254efd15f091513 ./po/es.po +64253a64392c1711f43dd898214cf840 ./po/it.gmo +0dd85b33f6f5fc905dbdf4ceded88e1b ./po/fi.gmo +d8de6f5f00a661ba39b2094d075963bd ./po/id.gmo +e49f799de64dec5c3d4787317c518b5c ./po/hu.po +62f63d827a6e52cd026e23d3f3a36228 ./po/nl.gmo +55d428b50db8a0697e3ab72d08e6062f ./po/pt.po +725530ab2003f8ecaf9481cf3f7f205c ./po/el.po +b8d349a13678a4e0e18c8ee06c1bebea ./po/insert-header.sin +cd927f43b8af61ceed8b516e7de0730d ./po/zh_TW.gmo +a3b5252c1d2f5cb729ca04a097942ea0 ./po/nl.po +a7d0aaa56b22809dcbe5d8c277270648 ./po/et.po +74d186fc677c0641f29b07f18596e62c ./po/et.gmo +1b55825c3eeb800a4aa75f1e8f0ddb09 ./po/POTFILES.in +cdffbd4ef7c97b97f2c72dd5408e8acb ./po/el.gmo +f3c6b3a29bac4eec505bf8c5fac45af4 ./po/pt_BR.gmo +c204db6982c06bbae60bc333ce9412b7 ./po/tr.gmo +ae2ad0156895c4461ca32fe0524ef902 ./po/remove-potcdate.sin +465f5771e80b3eff8ac6d178859cb0df ./po/uk.gmo +547f424695460e9f967750740e1b415d ./po/tr.po +9ada3624d0ffe4a86487f10876bf02f8 ./po/vi.po +5474510cd05c525578d3f36297ce5904 ./po/sv.po +6f97d9a11866f13dff31885ef5873716 ./po/hr.po +2387b71a7af38721c806e29e6a8cf6bf ./po/fi.po +424693e1171df2a46e12d6b45a01f10e ./po/it.po +5f7f79148da72c1c2b8b2e80559bc6e5 ./po/README +94aef3e55a18b0d91b0d9f937afda610 ./po/pt.gmo +6f404f4dc671ba9ff69dfc9866ae3edf ./po/cs.gmo +b790688c79f69dbd10998b336daef2f9 ./po/ru.gmo +4fab037eca87181f2066bda633c7aca7 ./po/en@quot.header +759ab3cb281d43101d92a8a5311c8fee ./po/Makevars +cd6adb174ab60e163348e29fe1bd5ddc ./po/Rules-builtins +58b9e91e9e0bb506dc4150605a697aea ./po/ga.gmo +eeebaa59b9804068b9bb3b592cccde8c ./po/nb.po +a11a046415fd35b832e841ee443608dc ./po/sl.po +eb9d2d86cbfb2cd5b43575bbcf3af4b8 ./po/gl.gmo +91d7d6297e1907eeb79b5f344f88ed3c ./po/pl.gmo +9b61f7a0fd7f7e2d6dde7cfc14829016 ./po/hr.gmo +3b5e86bdd8921e6d80b872048289b77c ./po/hu.gmo +c3e6d059d419e1c46f144932027216a9 ./po/sk.po +d9e4afc5ffd3bc36b87e7c8d2f201920 ./po/sl.gmo +508d67ad6e5de2e0e69505e0f8b72d37 ./bashtypes.h +a882c889fcffc12070c002512af909ff ./arrayfunc.h +0656b84099a3397dbe873cfc52d6b61b ./mailcheck.c +1663a9818752eb2f92dfddc6bae12144 ./input.c +d54d0ec26607429de901e33880b5514c ./variables.h +3a4560e78db3818f8a3a8d3d6cd6846f ./config.h.in +a37b52a32c53d845b1623a826c8e82b6 ./findcmd.c +a96bed64985953ab06b2ef17c148b95b ./general.h +fd41673ae49d374597e4159e8261f5ee ./MANIFEST +9a4ed1cb85ff905f49e253144dce9560 ./aclocal.m4 +aa9cfa75dc14d2a163993dfc87c151c1 ./input.h +9e9f0658e9c2cb2ac556e5525f91aa92 ./error.h +3cb9c50bf03adf1c73734c375baf02ee ./nojobs.c +454c69d92f867defb64907dd0b9a4bb6 ./pcomplete.c +315af66737d8578e695bbe9043420a6a ./m4/timespec.m4 +499135043b9a522537b719936aeee27a ./m4/stat-time.m4 +74ac8e31f6e972a9793949baddd5d0b0 ./README +5bddbe681e2cb5da1a92fd242ad20904 ./quit.h +fe5e4a496f3829efbd7aa004fb986124 ./bashline.c +2ecfc2175ae2079774f074538470e468 ./lib/glob/doc/Makefile +cf0af04e3799a1163e22ddd0191f4608 ./lib/glob/doc/glob.texi +c9d38837e8f12577070c44f5d8e14cc4 ./lib/glob/Makefile.in +d79ce9ee4d0cd1f44b21a77e194c481a ./lib/glob/smatch.c +58623094b9adb6d645f5d7f825bd6f99 ./lib/glob/strmatch.c +2f77436be1e294ae835f9de2a1ca8bd2 ./lib/glob/glob_loop.c +46224d4b83cdedbf7912877380a42b13 ./lib/glob/glob.h +52c509b620a61ee3edd9cedecf2c407b ./lib/glob/strmatch.h +7abfebd75e8f97205d9bd7073eeeed81 ./lib/glob/collsyms.h +535fb2f3a884ae7a0f1072f0d6d24f74 ./lib/glob/gmisc.c +6e133ccc87b45c9653280511e36344cf ./lib/glob/glob.c +c75628cd83936c87ef2907833164bac4 ./lib/glob/gm_loop.c +e4eb4acbc1ec27bdfc063becc3403390 ./lib/glob/sm_loop.c +17bb0115ceb66e8877c3271940632d72 ./lib/glob/ndir.h +d97646d4b7d1c8b2c893a1ebd3344e05 ./lib/glob/xmbsrtowcs.c +9624c777422a11b270e3ccd80f457db5 ./lib/sh/mailstat.c +0035126f6ba14016d115521600b1389a ./lib/sh/Makefile.in +93c76afddad726ba4a8bf2bff27309ab ./lib/sh/mbscasecmp.c +9fcdcc4b0efcf63cc36752e12383a729 ./lib/sh/clktck.c +414ba369d33cbeb266dec94912c5123d ./lib/sh/memset.c +b507f2cae644eb8ea15139b458de31c9 ./lib/sh/strtoimax.c +b6e442452a62d4ba6d21f7a4dda296d5 ./lib/sh/strerror.c +b8a75791de74ddb98cc94a9c86a14b28 ./lib/sh/strtoll.c +7be0244546242cfd677cd7ded561f985 ./lib/sh/fmtumax.c +eb75e22fea81d6fb86da5f2e3557bafc ./lib/sh/getcwd.c +0549f16bfd5d037c92385850e91566f4 ./lib/sh/zgetline.c +051c8807dd31fbd3ab3b8a27c07c3177 ./lib/sh/itos.c +650638be36a0b0835d31b4174f2e7b74 ./lib/sh/stringlist.c +fa6530729b750f5562ab21c02270e8e4 ./lib/sh/strtoull.c +1b00854d73a3296286d4062809e07161 ./lib/sh/fmtullong.c +dbf5d27634a2626d09b4fb8ae3bdfcd6 ./lib/sh/strdup.c +c2c21f24c163886e9c8ca4f8e8b6b235 ./lib/sh/shmatch.c +fe2c0ad714d50d6a3570f16c6a3f82e7 ./lib/sh/zmapfd.c +502c918c4183a278937c3e7b9fd46aa6 ./lib/sh/strpbrk.c +6e72cdf38534d5522d717065c936c254 ./lib/sh/unicode.c +4464311946c1b7f6590a28b28c2e78ba ./lib/sh/timeval.c +f40652e6e2f41f26e334d3d13ad14c3a ./lib/sh/rename.c +9609354c8705b9fe2f3c43598cef44d1 ./lib/sh/fnxform.c +68aea2aaffec94caea81b7d2380e7b6c ./lib/sh/wcsdup.c +95b07a5e97f9d213dc462ae6de8508ed ./lib/sh/spell.c +92a279b4b45bd2f3fcfe3db3f0240432 ./lib/sh/pathphys.c +2232ee4525635d00bb9b3d41bbbe55b0 ./lib/sh/shmbchar.c +0dd4bc5a7eafa170e896234b6490d2e6 ./lib/sh/eaccess.c +b9034374ca1e0dd482ed8a09d40d99b2 ./lib/sh/snprintf.c +dd9f5242c3f0535502459ea463363e8b ./lib/sh/dprintf.c +08af8b9849086d1ab8bc02837966465c ./lib/sh/inet_aton.c +1d7e1151a6a6e9167e115d3f3fd536be ./lib/sh/stringvec.c +692185ff3080d330bc4ce9d6151c549d ./lib/sh/makepath.c +2dad9a420ffb5f0028016fb875fb5a15 ./lib/sh/mbscmp.c +47d5be6379da4f049c8297fe99f46ff5 ./lib/sh/wcswidth.c +5ab076579f5a2fc4fb50321df36c231f ./lib/sh/strtol.c +0bf1ecfd79e1fa71c15c1e60d7a78190 ./lib/sh/strnlen.c +f700fd9bdbd4138a2ae156029109f5f9 ./lib/sh/input_avail.c +11a4dc10a5b0342edeb77ff280154989 ./lib/sh/strcasecmp.c +6673573cedea232ad26b4148266f9552 ./lib/sh/strtod.c +c12fbafb84a78c7ed1ed2faca8b8e0ad ./lib/sh/setlinebuf.c +868dd15029ed1acc7b98f54a849e9b15 ./lib/sh/tmpfile.c +e3047fab3762eb5c4338372189271b70 ./lib/sh/shtty.c +becb826c3528240ece721bcaab914b6c ./lib/sh/getenv.c +bb567dc7b08eccf9aa7bbf2d26170a5d ./lib/sh/winsize.c +e970b5d2f97bad27393b7049b4069f25 ./lib/sh/strstr.c +7452662b6b7eaa68fde63a8b6b671399 ./lib/sh/netconn.c +f62cbcd5a2b5cad5ca33de38d7eaea37 ./lib/sh/netopen.c +6e0af813ce1c5b0b221df87412044f1a ./lib/sh/oslib.c +b49e417eae68fda796d17621bcc8df31 ./lib/sh/casemod.c +ecb13d8e6ffe4bc4d430213dbc45ed8c ./lib/sh/zcatfd.c +503b7190723324d8ac7b80637685441b ./lib/sh/strtoul.c +4725cfaf5535c120b3acc61e3eda9344 ./lib/sh/uconvert.c +3b7add984af5d85d9f9258a3689caa71 ./lib/sh/strtoumax.c +3d6d0f71046b482596d7ef692cb67bdf ./lib/sh/clock.c +24f8d80c766d67b0bf035c02d0d65c7c ./lib/sh/fpurge.c +f204e7b2897f9294d4f0f8208ef67038 ./lib/sh/strftime.c +5042f96adc4e03164ab27db77f83ce85 ./lib/sh/zwrite.c +809a940eeb5ec23d420319db5e0c51c1 ./lib/sh/mktime.c +5f4f858d9b7c3e65e83dada7a4e56b51 ./lib/sh/strchrnul.c +9f1d06cd1d9eda237f891f8d761e84b6 ./lib/sh/zread.c +e39fe859d4eb64705368547b9b81d971 ./lib/sh/pathcanon.c +a07e014895f74b3ac03543cc0fe90f59 ./lib/sh/ufuncs.c +15932eba81aa7564389520716a03c374 ./lib/sh/times.c +8311be3364b4fe7ff289aa616d277579 ./lib/sh/mbschr.c +1a0458e2d2872a5238287c5ce8759591 ./lib/sh/strcasestr.c +a648d08762047f26645604b0198198f3 ./lib/sh/shquote.c +eb2179075dd9b6400b23aa0e35dbdc69 ./lib/sh/strtrans.c +73839473aae373b9449c64dbf91889dc ./lib/sh/vprint.c +3263ff485308e146340067a48e4b5258 ./lib/sh/wcsnwidth.c +441b2e97d549b82783e1bd8d53921df8 ./lib/sh/fmtulong.c +b87bc9692f21f0bb73a9b87ffa1a5849 ./lib/malloc/Makefile.in +972ffd6fb1ff8c43ddced1e54a61f558 ./lib/malloc/stats.c +b2fa3e1148ab0138cd458df29504336a ./lib/malloc/i386-alloca.s +40a7d61e77bae2834672bc9370402026 ./lib/malloc/x386-alloca.s +3ade849dbcea0b3abdfa36ae18ca232b ./lib/malloc/xmalloc.c +dd09e84026d65bc3baad67668d701b35 ./lib/malloc/table.h +611d59fc43fb78217db4b43bc66123aa ./lib/malloc/stub.c +e318502423536754d6aefed109c4cc09 ./lib/malloc/shmalloc.h +9b35b19ee045e89e9da72aee4ff5fc79 ./lib/malloc/trace.c +a8ebcae9cb40ea3bd9928b3e862d9ae6 ./lib/malloc/imalloc.h +28f84155f51304b46656d84ba4e18358 ./lib/malloc/table.c +115104616717b29beca8dbc7c01310a7 ./lib/malloc/alloca.c +535608823869d40dbafac4263c76b53f ./lib/malloc/watch.c +869c5bbedd4d81220d946a27b4793b2d ./lib/malloc/getpagesize.h +a2ea419b6a1e813eeebd664948f42920 ./lib/malloc/mstats.h +e47b5cc7f8f0a2464330c720f1bb557d ./lib/malloc/watch.h +51d199e4debc21f75589fcfe85a1ba6f ./lib/malloc/malloc.c +57df0bc683bab9e66b2b7d6188857339 ./lib/malloc/xleaktrace +f25563a4ec69e4398ee5c94e17999d72 ./lib/tilde/Makefile.in +a5f7a0953b3a2f3744fad2a83b0835c3 ./lib/tilde/tilde.c +6367b119238a58b510a9c9b000533b26 ./lib/tilde/shell.c +dd7529358acf4efd1d3fcbbdb3a2122d ./lib/tilde/README +4b810af2c83168d3cd86815a6bbeaaff ./lib/tilde/tilde.h +5e0b46ca9bd339825dc767fa8fccedc1 ./lib/termcap/Makefile.in +566ca6b6bf654a5b8fd7e6face4b9380 ./lib/termcap/termcap.h +80f4bd38f4de4132ed3a86af583a469f ./lib/termcap/ltcap.h +690d1c1a0ec3c278a722fde8a399a73c ./lib/termcap/termcap.c +13c3b25d2d5dfbdc01e887c6d2f06606 ./lib/termcap/tparam.c +c54ea59b1f57821afe8f04748ca0be24 ./lib/termcap/version.c +47154544ab73c26a5b6ff0c683a0c53e ./lib/intl/ref-add.sin +4f3e90616276ea41a32c50b9ebe397db ./lib/intl/Makefile.in +ba7d579854539448f7a76eb33cbbc1a5 ./lib/intl/ChangeLog +68692f1a92c690c5efea81769b94dba1 ./lib/intl/gmo.h +1677bc2e34917c41fe50fbf6dc8a955a ./lib/intl/ref-del.sin +5149d37191efbcbc0995d62216338310 ./lib/intl/dgettext.c +61e668a41b906c03c00023d57f8c5c07 ./lib/intl/l10nflist.c +1e98a64aad19104d6ebf3034cf69e18e ./lib/intl/os2compat.h +77d7f7f9aa3faa10c1fbfba9459b53e2 ./lib/intl/finddomain.c +17835c6ed19a1e03f2e0f2c9215e8691 ./lib/intl/gettext.c +b0bcfe220971d8c63197cf22d77b03ab ./lib/intl/plural.c +a9ae683d6494b43f02508cb0150c5c84 ./lib/intl/bindtextdom.c +b107a2948f6bf4a7a765af744079201f ./lib/intl/dcngettext.c +1576bad9074c2bbb0c674ec77a2927b3 ./lib/intl/localename.c +66213e106a88a9ccec4fb60d290c1d83 ./lib/intl/hash-string.h +745c61f03e5ed2c9f49bbf46d70e5d5a ./lib/intl/localealias.c +f58954e1e0c42486288f5da45d7e1f06 ./lib/intl/loadmsgcat.c +f7e1f10e11be24c92003db97cf55ed91 ./lib/intl/intl-compat.c +824fcbd20158f2ad155773e825fa588d ./lib/intl/eval-plural.h +a3be829b47019c5725e8d6eebf76682b ./lib/intl/osdep.c +9bc50f55b6b6a5cabf290aeba194e47e ./lib/intl/config.charset +e4a6fd71dbbf8812fedc1c27e570e91d ./lib/intl/log.c +76ca170a525d5b84d90f0478fe788931 ./lib/intl/VERSION +d3ce7a7265c5e2ff727f2c7dab6d9d80 ./lib/intl/gettextP.h +702820d59a1003203a32a6bf5871a13d ./lib/intl/plural.y +4da4a4f7d3fc5c6599e63268ba68ad77 ./lib/intl/textdomain.c +84e7f0e9f14600e994143f0c2b855c9b ./lib/intl/ngettext.c +2a9f4fdfd2204f05667bcfcf24f1550f ./lib/intl/dcgettext.c +432b87e3670cb7c4e6effd8023ca8955 ./lib/intl/libgnuintl.h.in +8dc19114ce449c8e4bb06aace8704852 ./lib/intl/os2compat.c +81c743388efa49a208b441d956d02006 ./lib/intl/plural-exp.h +be758c2f2663fca2652b4e51539a1fdf ./lib/intl/loadinfo.h +0ef79520ecd00db949efe43f72d8ac54 ./lib/intl/dngettext.c +c8096c04cd9f5c6fb05d63496c9e084c ./lib/intl/plural-exp.c +29c55bea8dab934b7035bd553d242556 ./lib/intl/dcigettext.c +a15c0c2a33abc9e8c12dcf9987eaaa76 ./lib/intl/explodename.c +26e74e5dd046d43a2b1a1b44ec7a6a56 ./lib/intl/localcharset.h +86b86d193ed775abf2b459e316ed0070 ./lib/intl/localcharset.c +fd8765cf938bf0fc085fdb7301e821a7 ./lib/intl/relocatable.h +0ad52aeee8edac39b8bd8b6e6abe8284 ./lib/intl/locale.alias +a2c82417ec5a6d18be2baef865c5a1bb ./lib/intl/relocatable.c +c34e79d96dd40e7643b7366d2d928f07 ./lib/readline/doc/version.texi +9011c6a31fbdb204b2a04a8f93cd1872 ./lib/readline/doc/Makefile +301814fadf04dcaa8dba6d2a9578b75b ./lib/readline/doc/hsuser.texi +f2c574e6fd68c3c8d119485eaad89a76 ./lib/readline/doc/hstech.texi +b35bf3782935e4487f8dcc9d1c0ff91e ./lib/readline/doc/rlman.texi +8576d039a679f02a9b7decf2996164cb ./lib/readline/doc/rltech.texi +fc4331ed5b1a18b6c26cd971b80fa050 ./lib/readline/doc/rluser.texi +4e62e55398e7af4d4f8257ab56a72e3c ./lib/readline/doc/history.texi +072910d553f79906db69fa7c0e956bba ./lib/readline/doc/fdl.texi +8dc95bafc6eb5b4ec0bb0e1b7a7f5890 ./lib/readline/doc/rluserman.texi +039febb24d380307a9ed96d8e0767092 ./lib/readline/callback.c +6cac2a4379545cecf2ad18b3359b3e3f ./lib/readline/emacs_keymap.c +c114b85cbcd5b1eec49cc65443cdcb2c ./lib/readline/Makefile.in +7232ed3b7857122e8a53a99bc6efc38d ./lib/readline/ChangeLog +83c1a52f267a25a5433f38c876516090 ./lib/readline/macro.c +5726064852131ae142d7cccd7ac664b0 ./lib/readline/colors.c +74d4df5cd77c38604565f89c21fcacc0 ./lib/readline/rltty.h +4ad4f0207bcb95eecbfd045cc8abd189 ./lib/readline/complete.c +5ede70a48f9148ac48441bd7a27d13ff ./lib/readline/colors.h +0bab71b938eb344efbe8916f3d57bc65 ./lib/readline/ansi_stdlib.h +620c7e85b5587e6fb2729b9e9140ba68 ./lib/readline/posixdir.h +94f279db5d1e960563410926071e69de ./lib/readline/bind.c +e8cf9ce0ae23eb40b5e2b191515ce1e9 ./lib/readline/posixselect.h +e432eb4df2399ef6aaf7f85e5e8f9d5e ./lib/readline/posixstat.h +0daba0bbbd92284bd012090eb96ad5c3 ./lib/readline/histfile.c +f5b0bfe10af6b0487cc6c1c275ba9593 ./lib/readline/histsearch.c +185bf4027d8641ccf344aed3997bb706 ./lib/readline/isearch.c +4c38bfdf42677c710c270c654d4081f6 ./lib/readline/parse-colors.c +32e6f8515635f2a21b7ba555742980be ./lib/readline/misc.c +35aa356fff4f759751b0850c717d9d33 ./lib/readline/funmap.c +85cfd328e5b060b204b9fe1e5809df82 ./lib/readline/readline.h +ac922dcd0b2c91ee5b68125a7ec17d37 ./lib/readline/rldefs.h +3c9f0c2ffe2e840bcffda7dc99b17097 ./lib/readline/xmalloc.c +65151ae1a011e152402f270b7d4633c3 ./lib/readline/examples/rltest.c +5b43fe2710d96cb383a4c9d8199ad2ca ./lib/readline/examples/rl.c +29f9c14ad5b29d95ee2ab26410f34a56 ./lib/readline/examples/rlcat.c +82f40dde0b5c804d058eff115bc4fcf1 ./lib/readline/examples/Makefile +df3287a2a5ebeb3189ee601408cd5991 ./lib/readline/examples/rl-callbacktest.c +468328e08cf3fd2cbd7ec3481de4a9d5 ./lib/readline/examples/histexamp.c +228fdc869bfde1be5a26e6c274eaf5cc ./lib/readline/examples/fileman.c +05e58ca0def73f34efef5ff4cac6a939 ./lib/readline/examples/Inputrc +d1d82ede8c5e85a0281af2d1c327fa1b ./lib/readline/examples/manexamp.c +032c96681caa1f2c3aae6163b9dd89e8 ./lib/readline/examples/excallback.c +4e4cbb722542fc342e06b0c592e6f039 ./lib/readline/rltty.c +11368baf23970de35833a56f13972d17 ./lib/readline/undo.c +a5f7a0953b3a2f3744fad2a83b0835c3 ./lib/readline/tilde.c +43193f028a5cf0fab061b6d1135d41f1 ./lib/readline/shell.c +5ec5eb2bbd58665ce39d3dc6564ff768 ./lib/readline/keymaps.c +69c4eddc17066af7f3deccae301b7cb2 ./lib/readline/util.c +f23c94c9d1cd34e7c2d9469d5c5651d4 ./lib/readline/savestring.c +b4e8888ab8ed3a4d84679fd74e1df092 ./lib/readline/xmalloc.h +d6bbfb3e33fbc3488a10452670d5755e ./lib/readline/rlconf.h +abaad1067c80b01dde50486731dad458 ./lib/readline/histexpand.c +f5df9557ec7fced94fede0e7a3e93b0b ./lib/readline/rlprivate.h +b5fc756b0f152e134278645b689bd27a ./lib/readline/rlwinsize.h +7c9e37f6ded2de2d611e6533edd99d67 ./lib/readline/text.c +02120f1e3b60238eff5541ba539dc8bc ./lib/readline/chardefs.h +f07ae0b355692aa5ec9594fae2e90cf8 ./lib/readline/histlib.h +4935cecce5b3fbc335bac079ae105019 ./lib/readline/mbutil.c +bd8ee3335e7c5fa83bbc703152419a13 ./lib/readline/rlstdc.h +809ad68d08ea4fd1457279388c04bb9a ./lib/readline/rlshell.h +a281f656ef63cfab0132649f1af43d0b ./lib/readline/history.h +9f398666c4d5c91d2c756c24a02cbfc4 ./lib/readline/nls.c +9ca88a9bb1bd901a32b9bb49f4b7c108 ./lib/readline/terminal.c +f4081c3556d3c577290e6fae30659557 ./lib/readline/signals.c +2b122ab3c1511c7fae2dd186b3e4ce29 ./lib/readline/vi_keymap.c +f9f0bab9b1fe9bec4372062f4e0e5276 ./lib/readline/compat.c +57578bae236604ed6dc466397615a496 ./lib/readline/search.c +a6779e1c5e4e14185b51bd4e996402eb ./lib/readline/input.c +0746f269c36c8aa234ea74cc20fe56cf ./lib/readline/tcap.h +9940b980cee7e32e02193abc62590b76 ./lib/readline/rlmbutil.h +f8070ceeffc2364fb6a943f6f68a5e58 ./lib/readline/keymaps.h +e194e93b2d732981066cafa2f0a47b4f ./lib/readline/rltypedefs.h +077a15ba01bd498f5b9f0f520e0bf8b3 ./lib/readline/posixjmp.h +a7bd2c5a975665a9357754790bc8abf2 ./lib/readline/README +7a29da87ea2c96062860669ef8b33a91 ./lib/readline/kill.c +f2932cf8b2dda34e2584c0f7d52cf1c4 ./lib/readline/vi_mode.c +22dbcbc422a9a69439ab1bb4fd89792e ./lib/readline/STANDALONE +d32239bcb673463ab874e80d47fae504 ./lib/readline/COPYING +d109ef94402e4db5b3ce76273f0f5136 ./lib/readline/parse-colors.h +0dbdfff0400f923228b9faa31b09105d ./lib/readline/parens.c +5c7a5b59204c7fbdec65612fef86ccbb ./lib/readline/display.c +37617e7abcec042d7c3fd9eede2a9981 ./lib/readline/readline.c +c6e7e71d397a1b4575a7c52169bd78af ./lib/readline/xfree.c +01d8d2fe1f165f4e16e9b7306511aad1 ./lib/readline/history.c +4b810af2c83168d3cd86815a6bbeaaff ./lib/readline/tilde.h +ab3b6f898f2e47b802332996e433da8a ./configure +6220fbae73304a052ffa1cedcf3b2a44 ./flags.h +ea11ff7f408a2bfbc18fd0d9c59d3c85 ./Y2K +df0a6a71ed282704114298c8cd1ca5d4 ./config-bot.h +801a5a44a7471ea5aeb2c0ed8c7a3b8f ./mksyntax.c +3429d1a38fbf4cfc77b5ca9e3a7596a6 ./configure.ac +914bb7070d3a0e229cf4b329b7f2f2d8 ./hashlib.c +6b550e197d34dbc6efc4a9d1e504169f ./pcomplib.c +d32239bcb673463ab874e80d47fae504 ./COPYING +570528f5bae956cca82c00e070596971 ./general.c +3f93311dec260b83d57eaff66ce3f2fd ./bashjmp.h +d435e1400edd47edc732ca3f28c23042 ./arrayfunc.c +3fd4caf72a78c8d582cdc35a8669e583 ./pathexp.h +52dc685bc0ce11f362dd7a10b6013bb4 ./support/bash.xbm +2021591f44bcef200cff969ec80fa845 ./support/texi2dvi +d0e26cb94266f93757a3fdcec87c7c0f ./support/mkclone +88476a65fa6438dbef6255e639d6bb34 ./support/Makefile.in +1d68db8aa18dc87c69e52a710da2cd7d ./support/shobj-conf +ad82646514a7f2c743dc83ce2b2b5d84 ./support/printenv.sh +a1dde48f776886228ecaa1230f8921e1 ./support/mkconffiles +e15bc57d4a9dc27bc82270c8175e25c1 ./support/mkversion.sh +64ddebedfe094d725fb5df443e0555bf ./support/config.rpath +bbf1c95b6ae6ee2fbd7b8d55c6284441 ./support/config.sub +2d513ac9d63b5973021ea27718532c94 ./support/SYMLINKS +f4ca6a9ca0bede9a0eaae64f0714efd3 ./support/config.guess +4e2d782878054aa75d29cea26391c3ba ./support/fixlinks +f11af6fb159f13e85b0c1ec6ec08ffdc ./support/recho.c +78cc21ea66df5c5578a77153ab191eb0 ./support/texi2html +8579718a3aa61eed988d31f24958db68 ./support/zecho.c +d9d304a90cc66c704fa652f6f2e0be83 ./support/bash.pc.in +537c1dfc8ed232c07360d5e5ad8c3443 ./support/mkdirs +323b934ca4dde9c6c5414e70b446fede ./support/printenv.c +792922784eade1d03ecb1b33ba8bb7c3 ./support/mkinstalldirs +f01cade8404f87f796fee1a0a296092d ./support/install.sh +8a5b4d266a0c8d4658e362a21608bcdd ./support/mksignames.c +09e40ecfdcb25803b6998ca593ecaaad ./support/rlvers.sh +3749b75fd8227d89f29636a47a181e9c ./support/xcase.c +fce7211629dc4b85307c59b4ea5781b2 ./support/bashbug.sh.in +a60fb778240accc54a051f4bd100ccf2 ./support/missing +8a09778fae2494c17120b05f26c1242e ./support/man2html.c +10865cf7dc85c1cc35275a09075570f8 ./support/xenix-link.sh +da7f37c8928376450c1eeb24c9b84dc6 ./support/signames.c +13314a4d51584fb6669333f5753092f1 ./support/bashbug.sh +a844702710fcc4cc39c885d9b31a7b29 ./support/checkbashisms +0876b8a36df538011a2d18c5d6d0eb6c ./support/bashversion.c +fb99a53b9358d9a73dbafbf03494f917 ./expr.c diff --git a/debian/autoreconf.before b/debian/autoreconf.before new file mode 100644 index 0000000..69923b8 --- /dev/null +++ b/debian/autoreconf.before @@ -0,0 +1,1301 @@ +symlink ./ChangeLog +ab984e7a4e973053040e4ffcb944d2d1 ./variables.c +a8048d34fd07310cf1f5aa4f90f017d2 ./doc/bash.html +fdfa8b97a186efe690e9b45e0c2e127e ./doc/Makefile.in +b9d73bfa3b6aae9c682a004a77cf0ca8 ./doc/bash.1 +d2a953ff45f5b43b7f6487822b349651 ./doc/builtins.0 +145318bad462d3949c5810782cb4bbb9 ./doc/version.texi +fdaef4f123a22e5b5fdb7a893656d2d3 ./doc/builtins.ps +2712ed9c024a4def2d96524f639e5fca ./doc/bashbug.1 +e1538438a3542bbc076ed3902cf82788 ./doc/bashref.texi +846697acb9912668a33659a10c5a4ce2 ./doc/INTRO +e0dfe3da32d9080ccd99edbb1f4e9e72 ./doc/rbash.1 +fa0991565ca2da0003c7489ce527460d ./doc/bash.0 +5e54a18714eb27c93668f051045a1a49 ./doc/htmlpost.sh +39d2720195aba7869d367bae04c577b6 ./doc/builtins.1 +10b9de612d532fdeeb7fe8fcd1435cc6 ./doc/fdl.txt +b0eab40b51f9fd39e0c62f1e2c2dea27 ./doc/rbash.ps +b626f11f160578dae605ec1f604c28ca ./doc/bash.info +79212bfe6ead71a6890440c6118da314 ./doc/bashref.ps +dd1bc3d50715bdb3154db5ace16d996c ./doc/bash.pdf +4d927357f6b10330b2b37218c5b75264 ./doc/bashbug.0 +e60700357b8c2ef0a072a096119b076e ./doc/bashref.dvi +82dbfaa3bd6282bec38bbae31e212b57 ./doc/texinfo.tex +85800b0420ab6c93605bd0147b7e2e60 ./doc/bashref.pdf +d8ec3d99045d12d6ad4c2905e1f0b952 ./doc/bashref.info +64f555b42c31637a9ecf44418de31c53 ./doc/bashref.html +43328c6cbc26b7d98e932985e02e6a71 ./doc/bash.ps +f97960baba184e7a721bf23cde04c3ad ./doc/README +75d46dabee74d6e308b47373cd5602f2 ./doc/infopost.sh +d5b9698f581ca9d37765066177effa74 ./doc/bashbug.ps +31671afd1b008cb6b12ff2221560ab34 ./doc/rbash.0 +072910d553f79906db69fa7c0e956bba ./doc/fdl.texi +938310371752c6942d96ba9247fdf485 ./pcomplete.h +8d36cf739d418f4450bd28a789840f1b ./hashcmd.h +640541e797d3a4627e31a0a3c84d3282 ./externs.h +b9e99de0292f7b7f5eca674c62067a38 ./y.tab.c +580fa2384ca884bf0cfb14b507b48a6b ./bashhist.c +c0588e02d21ffd3a3ec6f4cd6ebb49da ./execute_cmd.c +172188e3a6fc5409d4f113485cc6d79f ./RBASH +7122cc7a40dee7f0a58b508ba544c269 ./Makefile.in +d3a47c27f28ab0a434470a06c52e7fc9 ./pathnames.h.in +ed47ce2472fa6c6f46c2c58cfa6e7725 ./test.c +f002da3a819cfd05476ff713ddb86240 ./CHANGES +d7babf4417c9bd8ced7899c87e3688e6 ./builtins.h +b390eea0055ed6a89e8bbaad5f52a5ea ./POSIX +26877cc3df473ee58614b55796b644b8 ./jobs.h +c31da77239cad2d397e2f00f25b6a61c ./alias.c +819742e3193df6ed5975e0dd80fc8970 ./COMPAT +32152b6bf35827f6e71ec726030c560d ./siglist.c +639100fb4ef9282a6d7691bbbecdc722 ./sig.c +4cd0d11d28ee1a1efba06fcd97863788 ./config-top.h +d33f92d21c5f0ac1642ad2156c9cc5d0 ./alias.h +6e9b16a1af27731e016423cd4535b5a4 ./make_cmd.c +622450231f2c2a5500a225990705604f ./unwind_prot.c +8c00452ef1e298846493ec8b239f93e2 ./ABOUT-NLS +c8e8ecb30963bd68ddd93748ff6f2fc4 ./dispose_cmd.h +d196ed78c8dba14e5805c2d9b29e2744 ./shell.h +aae58ac47462e00e61ecb599a952221d ./siglist.h +80702baa2a5e1a36dea3571cac49f29e ./builtins/Makefile.in +1eff48e6636a1fcb630083b49cc51b0d ./builtins/let.def +046bbea1bb0e5fa74b14c81a2c6fa48a ./builtins/colon.def +a8507c5d630426493ce66b142db04e7d ./builtins/wait.def +14ce5cda81d9ac78818da34a0dbcc677 ./builtins/caller.def +6116d3293d95d4594b6c83c2d75674d8 ./builtins/common.h +979a0d4607f3f60f6740f882c717ebfa ./builtins/alias.def +46be778b69a2615754742f51a66adf6c ./builtins/reserved.def +36e2f271e95b7639eae50bedc2a13df1 ./builtins/getopt.c +90627247b5538800f43a444d9e2a02f5 ./builtins/jobs.def +55c9068a36c008c74d22078a43e91435 ./builtins/eval.def +6feddef5dccdd0d3fd2fed6f2f69268d ./builtins/inlib.def +8305de2da1f4c375c66fabe283bfd852 ./builtins/return.def +d410c41baa9c7313e07ea89653651277 ./builtins/evalfile.c +ca5bbe92bfb52b5e5324513010e3a4ca ./builtins/bind.def +326dde5030024c83279921001c4eb636 ./builtins/command.def +a841cdc94e4de199dff2719ddc679e60 ./builtins/pushd.def +ea028e4dc5b06230b34111e89547feb1 ./builtins/suspend.def +1cb4842bfe35411da03b033382f14959 ./builtins/source.def +6ccd473c71b6decb55e0339c01c795c7 ./builtins/exec.def +16697336df52ef6020669f3e4b380e15 ./builtins/fg_bg.def +d4c6b97bcd9907cecf2c1bd8c326de0c ./builtins/read.def +8f7d4c630f4eef314a747a88c73bc8cc ./builtins/hash.def +49040e2361b2bd265edf55db036b58fe ./builtins/mapfile.def +95234a434065fbe519299089ed47835c ./builtins/shift.def +c32558215ccaad3cf5bd906de44b8d43 ./builtins/help.def +4bee618e23b6785edbd8fff6bb3b68c6 ./builtins/declare.def +7a28e3a102a0d52712202febbc99cfa2 ./builtins/echo.def +19928865f349d1ac01d4f04ffe3debde ./builtins/history.def +c08d7a5f1a90eecd7213367259f192ea ./builtins/set.def +2ee74aa26c27b446b784b611240a1d41 ./builtins/enable.def +d8bf5b257ebce5879a39606ae44d320c ./builtins/bashgetopt.h +bfec0f9a7f4592eeaac1f358a88e17d1 ./builtins/psize.sh +31a60cb08265c9e1cc9c03f5b7ccbdff ./builtins/bashgetopt.c +9b1860b5adb9fe797e598637a500fdd1 ./builtins/gen-helpfiles.c +dd2aa4c371e04145329d1a3fe56850a7 ./builtins/common.c +9ed7145fe1deae3bddf69d05d2f85cdd ./builtins/test.def +2a001397b71577652e1ff0dd7414bae2 ./builtins/trap.def +8abd2b2ab15e6cb8a9fb78583e36757b ./builtins/complete.def +9013df24f36505d6d671882835bb3cca ./builtins/printf.def +e8ac0429996f6e6e6833a85df0c5f88c ./builtins/psize.c +a7cfad65230c95d1bdf67128bd03a570 ./builtins/setattr.def +9afdbc9940ffc2e11920aa1a43cca36d ./builtins/exit.def +ecb0f943e758973c5da26964b7323975 ./builtins/getopts.def +01a43d425d0fb43ebf34c957390a95b5 ./builtins/cd.def +ee9c95ba5c421402bc1caa97c096b507 ./builtins/shopt.def +bf24988b786428f51d5734618f1560f1 ./builtins/times.def +db0f46136154bb1f42aa36bfc25b478c ./builtins/kill.def +1042ae3e73f3d6405d033d295d973f08 ./builtins/type.def +eebcb50b15e226daaf48cf4e620c4d96 ./builtins/fc.def +8f7a3e35d86127e9d4721cf81e34fb5c ./builtins/umask.def +daa815cca59cb4869fe5337a5a1c29e6 ./builtins/mkbuiltins.c +2a0a2160a9a2900f73ec90a695339c93 ./builtins/builtin.def +8f36f60d85b699f7162485a0011f4cb1 ./builtins/evalstring.c +105c7812b8237bdc0ec62597f2e92f7a ./builtins/ulimit.def +e3d0a5ed55f475eaef6e96d6baed8d60 ./builtins/getopt.h +f959829235b07334beaec3141c3cc1fb ./builtins/break.def +cc55bc662f7fdc6d33489e2ba34c883b ./INSTALL +75af5e8f73c6a861a1a106f9e18c9b2d ./dispose_cmd.c +36c2201542d63d35e9ab6ec755e95edd ./test.h +55598ee205a4cd72eec6d0042e216baf ./parser.h +7a0ffbf3c2528b4a1313bc88b9a9bea5 ./make_cmd.h +f175076a8c1f769e332f337ddc8b4071 ./sig.h +3af7656ab044ea4445b2d79ca887215e ./xmalloc.c +970bd634533e952c75db59de4997a3af ./examples/functions/arrayops.bash +8419b192560031fa4af782142f414d19 ./examples/functions/dirname +48d6c6666fc3dae143fafa264ef3ea17 ./examples/functions/fact +4fb3299b9c1c0065443bb6735b9247e1 ./examples/functions/whence +fd23952f92adc9e4f621283124d4e42b ./examples/functions/inetaddr +b66d2256006f8176af5f7fc97c61af78 ./examples/functions/shcat +f0736896674608c2ab9d44c8d0b936e1 ./examples/functions/seq +38889bedde618a95cb972c567b40537f ./examples/functions/kshenv +30475ae08dbd322648983009a3e680a6 ./examples/functions/basename +7817bb007382592e2088f81e16c3817d ./examples/functions/autoload.v4.t +53d32d4cd1f027ba739b5712ba59026a ./examples/functions/sort-pos-params +8081bb6e1ca28b95529b0290e78c8dcc ./examples/functions/external +66891139570c7d7f9f52243c880f23da ./examples/functions/shcat2 +88d83ac48c07e568c30b398d8f9a7de4 ./examples/functions/autoload.v2 +7e655bc4ecc874f4b84499cd7250cb73 ./examples/functions/csh-compat +76c6f826cf49808988a1bb4660a55482 ./examples/functions/login +61618bbd1999e303c99b65da265d7f7d ./examples/functions/ksh-compat-test +bbee162d6d7c90ab2583db8cd83ebf66 ./examples/functions/notify.bash +b66fb988f045aa03c6cee4c5a97fc8d6 ./examples/functions/isvalidip +00076a9fcebc81643073d782d328182b ./examples/functions/func +0150be613a11b2060f312f8a016b81a9 ./examples/functions/ksh-cd +986edab4118cb47fedd3a21b144ae832 ./examples/functions/substr2 +4be22e5475fe871d1685fc344237d0c9 ./examples/functions/fstty +fd96d7206e035de1f5119dbb6f46949c ./examples/functions/autoload.v4 +11c481722ec7ed987de39e3096cc448a ./examples/functions/substr +03a23de53d2647bddbdad432ed418863 ./examples/functions/autoload +b73ebed3a79a0b53ac799609a0bb93d7 ./examples/functions/inpath +cd149be0c4a983cf0871ca868dec08ea ./examples/functions/isnum2 +39c48771a1a4fbc9ee692b200117989d ./examples/functions/autoload.v3 +dec8b14f112da2772407e8dfae534d72 ./examples/functions/exitstat +33a84a37d8b89534040b7d3b23ea2856 ./examples/functions/array-to-string +b24a911e17c477672b92580522d22527 ./examples/functions/seq2 +b3619eca7c07bdfcec49be203e5414c1 ./examples/functions/which +0f557ddffa7282f1ac04d1a5db15dd76 ./examples/functions/dirstack +d9016d72490d4107c767000389046e65 ./examples/functions/array-stuff +7856017c1c998ae66f936468a15c6d75 ./examples/functions/whatis +272d20cfb5ce473da118f03abe5b89ee ./examples/loadables/hello.c +f5969722be64c01ae1d2cd8f566371be ./examples/loadables/Makefile.in +5df3b760c6e78f3222e68c03445a9c4a ./examples/loadables/cat.c +bcfee1a0b34000285247359f03a215fd ./examples/loadables/sync.c +6614ae525e6be09d290ebfece426c567 ./examples/loadables/stat.c +b99ad6aa6da5671b790d125da2a22f7f ./examples/loadables/logname.c +c9cee188e53c546a7fe68426e64a73c6 ./examples/loadables/whoami.c +48aa43d4c8d82ccc13de9adaa6499456 ./examples/loadables/fdflags.c +b19a8595e7e981baa8e0e7efce6cc812 ./examples/loadables/rm.c +321acef9034b86e781ce29b803c914e8 ./examples/loadables/Makefile.inc.in +fb752b7aeecf3ac126773c673e7f8e41 ./examples/loadables/tee.c +cc2a66d77be2f5ddf8153de8700953d4 ./examples/loadables/mkdir.c +4ba8bf993993597c1a3355824f4418c0 ./examples/loadables/realpath.c +7b9c9188ea48ece88f070f56b6e567a9 ./examples/loadables/dirname.c +02667770626707d189c2ca759ef7a55f ./examples/loadables/necho.c +fabfd59f7dd1d5f7025204cbf896de98 ./examples/loadables/printenv.c +cb03b64a6f72774267f0615b03e6c52b ./examples/loadables/tty.c +85918928162c086edcd54225c6ab9e87 ./examples/loadables/head.c +0a29f0defa6f16c0d8ae0d408a93ab2e ./examples/loadables/ln.c +9f9eec8ac538fa5a33c68b2c764a3ed6 ./examples/loadables/truefalse.c +0a09afc9887e7fef10b45a56d02171d1 ./examples/loadables/id.c +855fe3989640e455fe8c761e10d3a181 ./examples/loadables/unlink.c +1e229999471458671a9f5aea1583cafd ./examples/loadables/setpgid.c +f58ce19db41e74735bfc132c68562370 ./examples/loadables/push.c +6354f1f973a739a0e9d979ea57d0a7e9 ./examples/loadables/basename.c +885635ef3f66c0fcfa9c2c309bc806fa ./examples/loadables/strftime.c +4a45f838985af529c13dc49870a8bcd2 ./examples/loadables/loadables.h +db7be44883297aedbd2627b6419fb988 ./examples/loadables/template.c +2c5945b172353282020fe8a1c09ad052 ./examples/loadables/print.c +726b55d8af8e578754528bdcabf7cfd7 ./examples/loadables/finfo.c +e6ea3ba44a4c07ff9a99c3e92ca118b2 ./examples/loadables/README +511c5c99ad783e9d87c03a5451dab178 ./examples/loadables/pathchk.c +1ba3500d52168412d94ebab0bf883649 ./examples/loadables/rmdir.c +48e2daff5bf70c6059d33cd96ca31032 ./examples/loadables/perl/Makefile.in +91d057b932d91155962b467f2bf85abc ./examples/loadables/perl/iperl.c +59bf292c4a9dc1a067aa62e7fc1eb048 ./examples/loadables/perl/bperl.c +a4d15dea75fa78744dbed3affd39de13 ./examples/loadables/perl/README +1a842b920b64df3518765cd2ed73fa68 ./examples/loadables/uname.c +60bda8ba7650ea6ee33a0dd359500dcd ./examples/loadables/sleep.c +b6e683d3ba2fc465bad01b5dd7aebe8c ./examples/loadables/mypid.c +15300010bd4034de12c3fc4f171692e3 ./examples/bash-completion/bash-completion-2.5.tar.xz +ad9635db6ccc70a8ffc95f4b8f71df1d ./examples/bash-completion/README +fe268cc8bd762bc225e8cf2210fc859e ./examples/INDEX.txt +ff32d792be486576f9a62606c762d331 ./examples/startup-files/bash-profile +86017017975b8a11093108830bfe08ad ./examples/startup-files/Bash_aliases +55763dcc633bb8fe5a9d60386e067b52 ./examples/startup-files/bashrc +d0fc580a63d260f91f2fe6b6d1f1a5c1 ./examples/startup-files/Bash_profile +3cc42a98baae32de6535fa8e8c5cd9ae ./examples/startup-files/Bashrc.bfox +c089d672ad71591c509c65750a10e413 ./examples/startup-files/README +538b5363a412b46a944ec043c50ca761 ./examples/misc/aliasconv.sh +979091dab5f09717af53477af817e07d ./examples/misc/cshtobash +ced8155a3bdcfe8da0ac059a4489763e ./examples/misc/aliasconv.bash +f02f0f74d25c4aecff6df5a34f037820 ./examples/INDEX.html +c0b212aba87640c8e34449a7d642042f ./examples/scripts/shprompt +dade8b67f8e857b47b0f80dd0f4e5d23 ./examples/scripts/zprintf +3a83cf08424c96d275604059d5fccfc4 ./examples/scripts/center +19caa1fba7a3bfd48eefb68d7ea5a049 ./examples/scripts/cat.sh +e45b3a4cc6eae9e36ecdd66db9dc634e ./examples/scripts/spin.bash +66648b792ff548a3d3579245d3fd9f93 ./examples/scripts/xterm_title +04f21afef7e45b5992f4c89044887872 ./examples/scripts/inpath +51700209d84f25b1bae2d84b0206348a ./examples/complete/complete-examples +c986e951aa87ad5ab98625300e46afa0 ./examples/complete/cdfunc +22040551e812c9812b3fa02ebb09a631 ./examples/complete/bashcc-1.0.1.tar.gz +16473c99f6e9e343309309eebd25fa1a ./examples/complete/bash_completion +f553b822ab83859733c2e1e81f5dd9ce ./array.c +8df21a58776ed5a732a74e73bf37c315 ./redir.c +65b913f33b715cf30b69c393795fc6ea ./braces.c +d50de67882dea48a36e9386fb0fc8738 ./findcmd.h +50ee6024bbbe54ba509e72723ed7e26f ./stringlib.c +83792432519ac91241ff7fce999a7149 ./assoc.h +53c72c61c7d8b497117722b2ce81c013 ./assoc.c +95f077e0c53b32bcebad353dc885c255 ./list.c +06f5be14e1b07b7387dac6a190f392c1 ./AUTHORS +6ebc8b74a03e31b80bdd0b43b5e8fd6e ./CWRU/misc/sigs.c +c36f711cd7731df270f2735e0679128f ./CWRU/misc/sigstat.c +f16d739577f52845103da52995eea8fa ./CWRU/misc/hpux10-dlfcn.h +79f25616c0c50631d91c48ea8ad2eb3a ./CWRU/misc/errlist.c +eac4379e721e374f78d6fa2d586d86e5 ./CWRU/misc/open-files.c +afbfb52029c32dfdc702fd7eb328d3fa ./CWRU/misc/bison +bdc00a2813982b11fe69cbabfbb7fa6b ./CWRU/changelog +2cad2f48a69949b81b0abc8e0a6f130f ./CWRU/sh-redir-hack +855d67b0e1111ed41faea4a50ff98aa2 ./CWRU/README +31c94a57a6a672ca7955d93195fdebe5 ./CWRU/PLATFORMS +6690cebd5cce2dd4a531758c4fe00bff ./shell.c +aa371c8978ef18bf58a465b6e29e3358 ./y.tab.h +4f47db65aede19a663e3f89fb10509da ./xmalloc.h +c71293e1dd0999297826453280357393 ./patchlevel.h +8352bba518c92da3a912c7de522f4239 ./execute_cmd.h +728603bb3d3e190d9271a3b8d20c7305 ./.pc/man-macro-warnings.diff/doc/bash.1 +f9dbbe62c4958aaaa7041b3a7c27a000 ./.pc/bashbug-editor.diff/support/bashbug.sh +d2feff3292b8ce53a37667908d925873 ./.pc/man-arithmetic.diff/doc/bash.1 +26ab0db90d72e28ad0ba1e22ee510510 ./.pc/.version +dfd390d9795b66bf9638e4372e72be95 ./.pc/bash-aliases-repeat.diff/examples/startup-files/Bash_aliases +2d9a7f71c895a362447bf29d687d86c7 ./.pc/bzero.diff/lib/sh/oslib.c +32956ae0c6eeb9f3b411aed20b5f0212 ./.pc/applied-patches +783f75304e379ea54ec14de5019133a6 ./.pc/deb-bash-config.diff/config-top.h +da31094c885702f9ef29c6fb0a29db1e ./.pc/deb-bash-config.diff/config-bot.h +c4c66ab7f875d46a3eb32a41f13c13d0 ./.pc/rbash-manpage.diff/doc/rbash.1 +b20b1f2794f3a8b254e13257892c60e5 ./.pc/bash-default-editor.diff/builtins/fc.def +5839019356fec45370aef5a8099f250a ./.pc/bash-default-editor.diff/bashline.c +26f1b682a8cdfbc9cd46ff1bd07c7d4b ./.pc/man-vx-opts.diff/doc/bash.1 +b3df3afb6526b49b12212941a28aeb34 ./.pc/exec-redirections-doc.diff/doc/bash.1 +35db791801b5bf9fe481461cdb0741e7 ./.pc/exec-redirections-doc.diff/doc/bashref.texi +d41d8cd98f00b204e9800998ecf8427e ./.pc/.dpkg-source-unapply +bf83d7368413d7b499518843a8b3038f ./.pc/input-err.diff/input.c +7e1d3391525b0bfdfac5477282c82507 ./.pc/man-fignore.diff/doc/bash.1 +9e2c4abfafcf9d4c9ba40d15dcfe7421 ./.pc/man-bashrc.diff/doc/bash.1 +2e7600a328fb876b2751e640e27b4888 ./.pc/use-system-texi2html.diff/doc/Makefile.in +4873e3a0b25406c4adc0db94f0077555 ./.pc/man-test.diff/builtins/test.def +3222fd2d96235593cbd420ea1b4ed94c ./.pc/po-de-fix.diff/po/de.po +266f9759f56277b2751b24d1eb17c50f ./.pc/.quilt_patches +3064a36414f36e736267a658e3c8925b ./.pc/man-nocaseglob.diff/doc/bash.1 +d8d46c5430169bc9ada8f2a03e385a56 ./.pc/deb-examples.diff/examples/loadables/README +f275baa840932dd8f2c954da2d516d53 ./.pc/man-test2.diff/doc/bash.1 +f8a0223e4b4a6674f393437e83f997bc ./.pc/man-test2.diff/doc/bashref.texi +9c4386a1a2fb063d48a1c4f5964c855e ./.pc/man-test2.diff/builtins/test.def +e8a673d5d4d69a5fd11c880fd4c3c481 ./.pc/.quilt_series +7934e2401ae463c279cbf9e8ad9de995 ./.pc/man-bashlogout.diff/doc/bash.1 +000716de09ee39440a027c1c5bf0e3e0 ./bashansi.h +4d09f087d0d496f378810c58abdee656 ./trap.c +99d94c61c0d15d4937e843fbd24cd761 ./NOTES +4d0531e12cd8d0aa8ca4ef90b1e7eac2 ./conftypes.h +8b46dd04da0504bcaf05b10b7dc313ea ./parse.y +231c9b86124fbb30d3024a49f8c91ede ./command.h +636f843191114755de8769925af4284f ./array.h +28e1778e3d812c05b8fc47bf7bc16a14 ./mailcheck.h +fac2bd4dd2194323712b18fe36b2b0df ./NEWS +0e3b2899739a36e425bb3625b2f3826b ./syntax.h +2546690c34260a715116fe3eab0915f8 ./include/shmbchar.h +3a9ee15f7d1ead5a00e2c643873afb5f ./include/ocache.h +24aed7ed761d97c0cfb525993e4a9002 ./include/shmbutil.h +8c5f3b85028035de9ecde19c447edff5 ./include/posixtime.h +0bab71b938eb344efbe8916f3d57bc65 ./include/ansi_stdlib.h +620c7e85b5587e6fb2729b9e9140ba68 ./include/posixdir.h +e432eaad8585f2fa09a77aa015aab5b4 ./include/filecntl.h +e8cf9ce0ae23eb40b5e2b191515ce1e9 ./include/posixselect.h +e432eb4df2399ef6aaf7f85e5e8f9d5e ./include/posixstat.h +23313a93f210490dd1100b28694b37e6 ./include/shtty.h +b7cc29abb842067003718f7227a10e69 ./include/maxpath.h +70202b4c5e22a7fd28840b56aa96b164 ./include/systimes.h +2bbed2eff2f7e9402a6c662afa7d7525 ./include/chartypes.h +d6e7a893a9ebffd5704acfdd6058b16f ./include/stdc.h +1e7a06238c6b2c7d1aa818432360f7b3 ./include/memalloc.h +c20ee4b5b7778b1f4974385050e5dc21 ./include/posixwait.h +7f29ae0fb90e5f5633ffc75974cd5042 ./include/stat-time.h +5db863d98155d7603a3839c8d50c60d0 ./include/typemax.h +077a15ba01bd498f5b9f0f520e0bf8b3 ./include/posixjmp.h +2a4cb87d31d5e6577e8a06dafdb31557 ./include/gettext.h +8436a85731753611120227793df301f8 ./include/unionwait.h +fe943736557537b75324ffc54719212b ./cross-build/opennt.cache +5d8aecfdc70f39928e454fe7b7a077ee ./cross-build/x86-beos.cache +7e5d0e59e4cc50b06a31e3c1756ac98c ./cross-build/cygwin32.cache +08acf124638ab364d559456ef17cd32d ./cross-build/qnx.cache +1100dff3c26df4f4074c57eee85038b7 ./flags.c +2ccbfa50aad635ebfc000d0406353940 ./hashlib.h +8d821f09bd3340309a6c19b141b92fb4 ./trap.h +34a93d5c66da54bd607f218a64a70075 ./bracecomp.c +7a42b9f9054108053733ec39314736a0 ./subst.c +9fa706d0366485194490b7c30ecca604 ./bashhist.h +b8b7641041f78763edb19463fb1bca2e ./bashintl.h +280b4bbfc3be8da1866dcbada31a0e41 ./tests/nquote.tests +1d2c4ab3a2ca4387d7b84ffb74767f72 ./tests/varenv2.sub +ccbdfb8e8b15d512d907afeee1e5c382 ./tests/run-heredoc +a19e72caef9cf1368a99abc76f35d577 ./tests/exp1.sub +8ee9a9b25ba1af0e9b97a3e668d19f26 ./tests/parser.right +399fbee22c6d8bd55a64b3273a02e30b ./tests/run-history +278c050d3b2af32abc8a6ac8b17d11f8 ./tests/more-exp.tests +4e316e0d723a7237d0a1ba833364615a ./tests/builtins2.sub +1ecd456ae2f6882865fe4a74b3d612e4 ./tests/run-quote +27f18db6438f7b11dbd582f765009978 ./tests/run-appendop +f26f9b204e136d7424b0a271d7dd5e78 ./tests/type1.sub +63e761e55299d18bac8751d8f84388cd ./tests/comsub-eof2.sub +a123e7626d117b054459f8fe52600b6f ./tests/getopts5.sub +4ab83e3d8e33285554c02a39fde279e2 ./tests/comsub4.sub +e5c25ca5c105f2cc7959f64a6ecbb030 ./tests/quote.tests +773f02ad82952056366ece718c88c6a0 ./tests/posixexp.right +11a26d720a4ef1ae09e73a97fa58bd54 ./tests/run-case +e66230497bf91658c5530f5db6ba1c06 ./tests/jobs1.sub +cdad05797a3a2f9b0aa135a00bd5a3e4 ./tests/cprint.tests +d0559a4ed7bba6104b4b6cb7c4067d10 ./tests/dollar-star8.sub +41c1f970168995a463c91880e1f3d8f8 ./tests/dstack.right +37dac78b69bc8e2a09e5330b295e5b83 ./tests/run-nquote1 +12962c59dd2eb838bdd06e8a856e2984 ./tests/read4.sub +711a638debd0a3213c399af437147d79 ./tests/appendop2.sub +ac4d700cc2b330624d3f84586e8f1cdd ./tests/prec.right +4b2002b656448fba71ba39afd4f67873 ./tests/vredir2.sub +00c4dde2c71b9b404a3e945638a1076a ./tests/dollar-at-star6.sub +496d7b062760db7c878a9633738e566a ./tests/redir10.sub +16a432cd8733c33666cfc13b2b1d0d36 ./tests/posixexp6.sub +808614fefece4440cfeab051d85300ab ./tests/trap4.sub +c830b4f2332659b7e1f890b01979b815 ./tests/array3.sub +a4ff576dc44595a440342c87ba04444a ./tests/trap3.sub +919efea556546498fd60168c06d3ae03 ./tests/histexp3.sub +951fa68458f98e2c446fe95401666d90 ./tests/history.right +a06a039d06b953414e7e66f7772f1298 ./tests/arith7.sub +c19e7cae104361895f1fe634733a1dfa ./tests/array11.sub +1c46daf5fe5a05fabd37553356d52e6f ./tests/quote.right +f88370b68fced1bd658f3a84412443e1 ./tests/varenv3.sub +f039cddd7ce80a49a12392e6eb3721a8 ./tests/case2.sub +c9975daa3bd82545d8dd7a537a0980d2 ./tests/new-exp5.sub +330c962d02c4326fab94fb72e93d40f0 ./tests/array13.sub +809f96f74d4c8a041308fd88a4eedfca ./tests/nquote.right +e3c655fead5884420737d9984e6b32fb ./tests/run-shopt +b6369ef9f5897050d505bc61ab7f79b7 ./tests/iquote.tests +abd303012e5a462432a15bb4dd2328a8 ./tests/glob1.sub +56da0821821ba7155c238a25fbafd44a ./tests/assoc4.sub +bcda180d367613493c8a691819fa5d0c ./tests/intl.tests +2a27459d370100303f226d541ed5ff20 ./tests/new-exp4.sub +938f50def80b2236d8379e5d168e68d4 ./tests/assoc9.sub +02fd7bf98e7969fb00ca3110b490b2de ./tests/run-posixpat +1325c55e73b048980e6880d0219c93cc ./tests/glob.right +79a526904d40c9df8fa469f75620392b ./tests/run-lastpipe +f8baec0aa4ad2da4dcd9088a2dfa85f4 ./tests/COPYRIGHT +abebfc302020c95d38636742cb1561db ./tests/strip.right +dba142e7e0cf874ccf0a88ab61ea7a34 ./tests/dollar-at5.sub +541f07be93afadd5297c4f7a335e8e95 ./tests/array8.sub +0b3c7dc24645bce655f2f7e33dc98f17 ./tests/ifs.right +837de05c1708b9619ff0df878ebe4b9c ./tests/trap6.sub +712e487d3b346b264c5273f946fd5dca ./tests/lastpipe.tests +48f2166789fc68b8662e41f14247324d ./tests/precedence +87786f0909e6ad4ff45f1d8a6eec8523 ./tests/vredir6.sub +dc89630e498e6db6cfe98ca8a8f591b1 ./tests/run-braces +b08270d947c3ececf70f438125e29584 ./tests/getopts10.sub +d56e4577b8332880b42e081b821dd21b ./tests/histexp.right +247229a6096dc49233f8a4f37205ddb9 ./tests/posixpat.right +3b6ba436dfb695c453aa708875850c22 ./tests/dollar-at-star7.sub +aa3b17f1b4453848d12a20e25262f5c7 ./tests/errors4.sub +998fb9427544de44b2f790b2bafb5739 ./tests/read.tests +5c3adc5ed14daa17e409279a8c302bed ./tests/run-nameref +54f89da798ac8bbf5ac629b7a6abf7d0 ./tests/run-iquote +306698cf428cc16e7829d8d8ef90e1e9 ./tests/array1.sub +7054d052a14e9f43796c2e67b9dff595 ./tests/comsub-eof.tests +172a2fe13546975f109b04955621eb9d ./tests/exportfunc3.sub +94af4f11ca6ea55840eca7e5017ba618 ./tests/arith-for.right +8cefcbd3347f66d8398560a350d10256 ./tests/new-exp7.sub +1b1b2a01e8df2468044e00dfdfbf8c88 ./tests/nameref3.sub +ab9b0c1c08534a07d4f1e4aafd98e1b7 ./tests/run-ifs +ee7e3692e99bf189e960cc5c3e8ee632 ./tests/exec9.sub +5af84e65912eed1c790f90f02dfdc253 ./tests/printf.tests +e85ac9846241016c145b18ebe7577488 ./tests/dbg-support.right +dbd44871973111fc5f9456fcce3cce3a ./tests/array22.sub +fcf60e8c363e317ac6865142af47fdfa ./tests/heredoc3.sub +3fb2d0254dda8949fb2161d9558a32aa ./tests/rsh.tests +a74cc95443d1278f6e1f388038e1fb8d ./tests/vredir.tests +9e42d69a0a6b287cfb16dade98bc09a6 ./tests/exportfunc2.sub +7423bd12b07caf39f4c9a2272f4ca964 ./tests/dollar-at-star +15fc7e6c74733c76a9c3700413922042 ./tests/exp5.sub +a06bf35fd29c581a64dd097e40c17307 ./tests/run-extglob2 +86a1d80262a15aa064b62b72d4572162 ./tests/dollar-at2.sub +f6abc0b106c9844278a1ea4765243aad ./tests/run-execscript +53326d17b32b0db5d6194a88922690a4 ./tests/run-nquote +f7083becd90ccc6c0a0c83a73f5e6c8b ./tests/varenv.sh +5509b0a3d7550a44e82d398848adf1c0 ./tests/exec2.sub +0c8fe1380f143e0cc55eb345d1c132a0 ./tests/vredir5.sub +cbaa1f87a679f9310fbe029af4562f7c ./tests/exec5.sub +e74688241ed329f3ec39ec9bca5ff9df ./tests/herestr.tests +7c984f13913a61253974a10f4b0c3cd7 ./tests/run-globstar +ba0f023e0f73f95693c89423d0dd3fce ./tests/dbg-support2.right +33e947ac33d37da5309b9d8be0a641f5 ./tests/ifs1.sub +630cc87da17939e1cb6fc6c98987fe96 ./tests/array10.sub +bf480941ffbbbb2eae559049c68584b4 ./tests/run-input-test +9034d3a343910997a409f30813e05a58 ./tests/version.mini +6d089d6c863edb8b3ee7b40440ed3399 ./tests/assoc7.sub +88155dfff4f1c13e61b5d30f7581acac ./tests/exec.right +7a92271a3311413a5863719ea88d05a0 ./tests/run-procsub +044b89825817c992e2500c6e1acd1693 ./tests/run-alias +acdd4ce346c2035e8350e34e50d5d719 ./tests/run-vredir +20853a183ab37136352f8d045e55199d ./tests/case.tests +7be923f82f3291b163ee5ce7c2a22292 ./tests/redir.tests +56c96c279cd6db3d07989cb3cbe63e54 ./tests/run-tilde2 +026cce4c9263aad031a1c9a657b9903e ./tests/read5.sub +ee67ffcfb9b83b25cdddecbf68a084ee ./tests/histexp.tests +27be9b87f44ab4e05e7fb5fdd274bf54 ./tests/arith6.sub +1aaab151817cfda87d71c26d28943378 ./tests/case3.sub +085996c69640564b16312cd8e3c7fa6f ./tests/attr.right +ed1bac51c4e4f62663b71bf62cfd2dff ./tests/nquote3.sub +9fa42fc9699525b9bf2a1d07fb62821e ./tests/dollar-at-star5.sub +8f87c0bfaf1390e97a8327c4ff99aa67 ./tests/getopts2.sub +c2c8057f70112b545352d0e88cba2341 ./tests/coproc.tests +e0c1c9c8ce1f5522474d0ede02b9a13b ./tests/extglob3.sub +af891e37f4edb7b40c620b891e2d6ad1 ./tests/alias.tests +b8cacf97218cfeac72135fde56c3d63c ./tests/redir1.sub +8f7f18dc89c60750bd7e615f55600397 ./tests/errors1.sub +f92470bd83b48faa4f9f1fc98a53b743 ./tests/ifs-posix.right +5799c210062e7c9bc26076bf499e7bb2 ./tests/nameref12.sub +058f6eeb402f0ac8ccf5ca90ad154150 ./tests/nameref4.sub +a484278cc4bb04efc2eedc28a82224ed ./tests/exp8.sub +d58df616532ee8b17c72c814e9394916 ./tests/nameref5.sub +dd59245bb97e00fe680c45512b2eff2c ./tests/getopts.tests +031ebc0b547a60ce524b90b716e80fec ./tests/glob2.sub +4d6ba33a19110a0cccae5ac9a21b9097 ./tests/printf4.sub +c99d9b3bec93f06bc566ae647cea82f6 ./tests/dollar-at-star2.sub +708b7548062272fe99eeee391b236339 ./tests/assoc2.sub +8165b16ac82ecb0f3abfccd30028e70f ./tests/mapfile2.sub +30449f14bb075e3eaa2cbee791925e3a ./tests/set-x1.sub +6db567cea8adf3b824a3bad7dbec7c59 ./tests/new-exp3.sub +a89d72c081d50af25afd32261c9c61c0 ./tests/exec13.sub +2dfa75d21eb41588679cb82b9bfeccd9 ./tests/heredoc.right +9c2e38b8746041a5d456063754dd1d89 ./tests/redir4.sub +f9832eb74152f81cf819ca5c3d092338 ./tests/run-new-exp +e6f64da5724c7794da1e7261c1c08696 ./tests/source6.sub +04de6e6393057d44627c2e533d66bef4 ./tests/array17.sub +201be4e1c4a2b57f776871a3d76f7bbd ./tests/exp11.sub +3c6e0b0e4f3de285b8d74c479f2e3c26 ./tests/exp10.sub +15b647585923876c22c65f6eadfdc916 ./tests/posixpipe.right +51c7bbd8eca2e23f3092c198610d4766 ./tests/array16.sub +d292c439fe3ee41fce91580b8633b1d3 ./tests/nquote1.tests +a9dd0daf16e75a3010b1ff5ed649a6a6 ./tests/extglob5.sub +7856c2a8782d8c40a628f5be5851d8ae ./tests/quote1.sub +838752737fcae227bf22e4e74ebb199e ./tests/posixexp3.sub +8b443bc9edda928d4a94fb16d9cea8ed ./tests/shopt.right +9623cd453961659daed08066b38917b9 ./tests/nquote3.tests +0a9e247df892136b1b29ce178bac1a4a ./tests/herestr1.sub +e31681ac1d353bb285b0d5ee8aa195c6 ./tests/run-builtins +8dcb236977b6a9687907243e69c4d1d7 ./tests/getopts.right +4d66cd844ad0f3d219761717d87b2ef0 ./tests/nameref17.sub +ecfcf75c055b97039ffc14803a1b7db8 ./tests/exp7.sub +4f35fd17e3795fd1d88faad408451a18 ./tests/dstack2.right +5a8106bc28042e4b7d282c9d750a2650 ./tests/new-exp1.sub +ba2015d73d7e9427c394f28603a56d2b ./tests/redir7.sub +d12bd15f9828a498900d2ccea62fc446 ./tests/extglob1.sub +1203a71de356500b5e663c44d20dd1c9 ./tests/intl2.sub +ca98cb463950c27026d316a24d43d44b ./tests/printf1.sub +100e83b26f5e3cd41aac80539da5f8de ./tests/run-herestr +1cc6d9e9251863b8979ca713f4f54795 ./tests/casemod.right +ce97e91ee15c8a5b8e0de1895022ecef ./tests/run-coproc +fff9e100a6417aa0750c3ea0edd30bad ./tests/nameref14.sub +5899838adced5c5ecb5790c8592c8a7c ./tests/new-exp2.sub +67c17c2d7b40ab3aabf786d3405ca9d8 ./tests/test.right +e85a7148ee6f7b9262c7495e611b08ac ./tests/posixexp.tests +d236ec72753a981caa83895f1b695f1a ./tests/rhs-exp.right +48b8bf266144169ddbb4096749818a6b ./tests/run-getopts +432e8c3a23bc56d6821d77ee44820e7c ./tests/array4.sub +96b124df7fd3421c4319177c309fcbb6 ./tests/run-varenv +aa89e2968a3b960e29feaa6e96b8f739 ./tests/trap2a.sub +ea832d19d23ef484f21ab8dbf9670695 ./tests/run-histexpand +180c4ab5979e99d34d406e989e469574 ./tests/case1.sub +e78f2ff08bfb91f1c40e0a3ba143824a ./tests/set-e1.sub +99a91a6f938caa3dae458f25fe38e9f8 ./tests/exec10.sub +0fd79f47a7ef58713660e9da8cb12984 ./tests/errors.tests +54911e44eb8c9af5542ba4f3f01cc216 ./tests/heredoc.tests +7823a7d272a41d644f217bd3c9b7c2a3 ./tests/builtins1.sub +93196822b0446845e34ee6cc679a5869 ./tests/array9.sub +8dfa2f388d99880449a2803d9014a01a ./tests/new-exp8.sub +e72d62567473e1e23f89fdd3d4ad13db ./tests/iquote.right +67517dd5e7905c1f275847f70fb497e7 ./tests/dollar-star4.sub +94f3d51665aa9def54c8d2529cce9522 ./tests/run-type +fcc706db2c4510bcf521455cfcb7b5f6 ./tests/nquote2.right +34f6f410f4405b592d94487f2c691946 ./tests/extglob1a.sub +b9ec794d238a4a4ccd205a2e220418b7 ./tests/redir3.in2 +eacfa44fa97db0818dab8f0d2f9874b4 ./tests/exp.tests +2be2f963aa733aa881222c721efd8ec7 ./tests/mapfile1.sub +581decb35bf8b4d6ade52eff709a9236 ./tests/dstack.tests +0f322a2397f1eaf964d72665be79bce7 ./tests/varenv5.sub +e303a00c9e2f35ea715ae64f9746f5b5 ./tests/source7.sub +96776c0a62757cb160645dbda707390e ./tests/tilde.right +509b4e4350dda1bf2ccaa50f7e65d872 ./tests/varenv12.sub +a887f181b6355e3b1a83a6313acc4491 ./tests/alias3.sub +3f93fadbce9d2a68ddb423605bc75fd7 ./tests/run-cprint +b824c71d043ddfe89896846f33784cf0 ./tests/run-test +075314089e5b5e6f29eef7a2c2609c40 ./tests/dollar-at1.sub +9c3b80b4f1d278f09485669ac3a250e3 ./tests/comsub-eof0.sub +d6a04328fe3d6c5ce258699d32ad9440 ./tests/redir11.sub +b744d749c26c8de3a6ec68dafad18bc4 ./tests/run-read +2cea6f520e71b0dcb611c65873c079b5 ./tests/nameref.tests +ba8de2c12390a97f0452eeb794be3e63 ./tests/exec12.sub +9fbd430aa3b565e8714d436fbd052249 ./tests/arith.tests +8775ac05db4b9df12d8d5b226167d688 ./tests/extglob.right +463e50a7c47cb546bce46fc527805597 ./tests/mapfile.data +7b4e3c55862e04a7fa2d5c89b3e02cdc ./tests/test-glue-functions +886bc5de95d2bb58c702c0f60e464dad ./tests/trap5.sub +232251316099bdaf908f49067f041e56 ./tests/globstar.right +bbd0d068d027c28df65bb0539370f012 ./tests/rhs-exp.tests +15e4d3f965b45f63124fcc642e17913e ./tests/array15.sub +c967c1d9a5a3a4b90862ab4a0484a3e6 ./tests/source4.sub +7d2a8078556ab0ff148b56085572e9df ./tests/source3.sub +503a31a43caf87a53f898f5c3ec6c0e3 ./tests/vredir7.sub +0b85730eb2afd090ec030b9ffa84f512 ./tests/tilde2.tests +2a7810ae36af92a3d026b3702b72adb2 ./tests/comsub-eof1.sub +228dd9914e8706a9004919040da872f2 ./tests/type.right +e043fe1af0d17d8cbaea27e9b475088d ./tests/func2.sub +8dc34242c9e5c73d72af70d090047f5a ./tests/assoc1.sub +796df2ce0826be065ad943ece0706b21 ./tests/getopts6.sub +d4c67e7b427c34a9ef6c1be8f550fed3 ./tests/run-dynvar +dedc1e933e29070de4ebf12aa0ece781 ./tests/run-posixexp +8bd95f6f8adc1e2760abe2ea2f434e05 ./tests/comsub3.sub +dd3f50cb1b7b3831e92b42187b791aa1 ./tests/run-assoc +5fafb2447a1c4f074f7ed3c965e1bac5 ./tests/redir3.sub +e858cba3bb87d7fad529c6d0b15a8eb7 ./tests/input.right +92d3ca78dc9394812fe46debdefc91f6 ./tests/coproc.right +a51a2a9d07a2a10f7722cda2f48bbacf ./tests/run-nquote2 +3689ac31241e50a89aa11fc42c6fe88f ./tests/dstack2.tests +e5120080860afacef6761251e5450845 ./tests/unicode3.sub +a14bb4fe77a4e0c09e78c19a051fa73d ./tests/getopts7.sub +f7eac12036c384f9ffe20503111dd6e3 ./tests/vredir3.sub +00f80c9161f00c3733f0c7b67ff703f9 ./tests/dbg-support2.tests +d773b1a012390e2a06134074051feb22 ./tests/cond-regexp3.sub +08956d7fbd85b43a1b2b4c92df49fb8b ./tests/invert.right +43e55b12653b3562140e0de12e888eb7 ./tests/trap.right +bd6b19f22dc2732db6945f2af956262d ./tests/func.right +36c6a09216aceb9adb1ddddabbc5abfe ./tests/dollar-at-star4.sub +a619349c6d13caa03e513443785fab50 ./tests/mapfile.right +422aa15c4975d0f0069cbf13930a50c5 ./tests/jobs.tests +f3c552d8da6de00446dbdf069ed8df7a ./tests/attr.tests +c7987a94eadb8f2fc63f58e57022a085 ./tests/run-intl +d404401c8c6495b206fc35c95e55a6d5 ./tests/redir4.in1 +9083ea2e08d19ad48438ec376ba37e62 ./tests/run-array2 +a87ab4d58dab99c7d96b591f82896305 ./tests/redir3.in1 +f7b7915521af5380e17cdb3a6ec74c13 ./tests/arith5.sub +8fd28e5789f61dd3cf7e90699b2b1fe8 ./tests/comsub-posix3.sub +c1074e59f3ddb1c77e810d21d626b9c7 ./tests/getopts1.sub +5e54c9b4e6a93989453078cf9521f3da ./tests/run-ifs-posix +2a274fdac7fc217d3329430efc5ca7b8 ./tests/arith-for.tests +0aa06699affc6ffd89615b70d7c23c97 ./tests/nquote1.right +d614b7f9499687bba1c38cef6aabd90a ./tests/errors7.sub +1297b54aaf4255a67aaab8a1d214b9dc ./tests/extglob2.right +faf0ac076e2033f10b62cab9496d0c39 ./tests/nameref18.sub +09733b947f1f7f0de38114d90db9f1af ./tests/dollar-at6.sub +8eb6b6b9a2165b400a5e7c5373c056fd ./tests/varenv6.sub +c31ce20bc3d2cafa42aef22c273c4512 ./tests/read6.sub +b315d4f8f1ef1d6eabd08a7e20517d24 ./tests/type2.sub +5dd3f214ff6514189388c840b77c7f05 ./tests/cond-regexp2.sub +29a35dc786e6ed2392c81f2cc3a41a8f ./tests/run-rhs-exp +09e3bfa58a8593af5c41360061a9c9e5 ./tests/read2.sub +52c0ee7d13e3d2063a4ad3a11adfdf93 ./tests/run-minimal +8146b752e96e9431a5b2b03f8788ce05 ./tests/vredir4.sub +a477847ff5949ef81f66709acf57d119 ./tests/nameref6.sub +c7ebb4567c0dba955cdb1aac453d53e7 ./tests/posixexp1.sub +e7d4e534e4f6cd2592380ae09502a082 ./tests/dollar-star5.sub +bd27f09eeb7512051b14718dc124e482 ./tests/invert.tests +b39a2cb59d98457e7ad98a89c5631a80 ./tests/run-extglob3 +ee5e79401db19dd6d54d5169741b1406 ./tests/exec4.sub +2e4eb8b0d09e9fb7bdd9e6199ac6a2dd ./tests/exp3.sub +a221db3fdd6facd83b1a6281647ef709 ./tests/nameref2.sub +16550230ead5a617bc463f5ab9c485ea ./tests/exec7.sub +6393da733bc007df875486c443fa7454 ./tests/assoc3.sub +97f6c2a3716f45f26e9b4de91552fffd ./tests/source1.sub +a1c579739adbccb010447452d358522f ./tests/array23.sub +f5a35be44739d773a1f609a3dee4ceb5 ./tests/run-parser +d566e060af2d8eeb1623983d6336664a ./tests/cond.tests +58c02563dd40da57cdc1ff77eb4ac9bf ./tests/heredoc4.sub +54ae1f4c941056485d47d66a93ab2201 ./tests/exp6.sub +0b4a2fe5f4450489b6051ef701be4093 ./tests/dollar-at7.sub +40ad765fb72f26689e0a4ed4383a98f3 ./tests/builtins.right +d9391705e19d49e56a63f42110e40c60 ./tests/type3.sub +df1aa92381785407dab20ab4260cced3 ./tests/redir.right +583a1e58582d84002e0b4065e73f2e54 ./tests/set-x.tests +a72a9951287590310105494d9cf94a6b ./tests/array6.sub +758f4a7600c5097f6b794a2760398bcd ./tests/run-redir +154d0cdf34c8f849c323d9d29893e4ea ./tests/set-e3.sub +f7b20b69f8cad74062e9c2a4f58e3ede ./tests/history2.sub +4cb20f82254bd8da8a9a5b30f8adda8b ./tests/run-comsub +86b97948b0aba05a4fb447e2b53e7607 ./tests/exp2.sub +8e40f1cecfeca09d12bc9c7ff1378349 ./tests/run-invert +a9becbf64a353a85a14cbeb0ee6f32bc ./tests/globstar1.sub +e99135571d909ef8f2ddf0d5efd3a015 ./tests/dollar-star7.sub +28268532347775c39994a2ff50d5a9b5 ./tests/varenv7.sub +740c952947b978de78e827659fd34652 ./tests/posixexp2.tests +2dbd9d5fb58b72b9d712d472dc211ea4 ./tests/trap2.sub +ed7fd603329ddaab0522475cb708da70 ./tests/varenv4.sub +0b2910562fb1e0dfac809b674e829dd0 ./tests/posixexp4.sub +44144c30fce5ed5d38b165d32b72c110 ./tests/getopts8.sub +f5c8a94d51168433198a467d9a4bcccf ./tests/nquote3.right +8c36a4b73613567b1de8f943e379d389 ./tests/type4.sub +d8266bf732791c2fd48d129a4cbe2b84 ./tests/run-dbg-support2 +808a11f8a98fd68f098d4365685ba06b ./tests/set-e.right +7cc22702eb197015e6ff8ded00aff6d0 ./tests/cond.right +7b4af499098b4b16470df52f2503ee8e ./tests/comsub-posix2.sub +c040eb51d349c74f8b13700700eb8a22 ./tests/read.right +6c5e1161ee846ce84d94f867a3a72dcd ./tests/array19.sub +e9c46e25a9b41e3b128f7a9c2d455973 ./tests/dollar.right +88e89c51800872390a429f1146fa90c5 ./tests/exp12.sub +dc2a3b917ac41e3191479730978d5d87 ./tests/casemod.tests +518d799f7631a7a430c9a8507bde6084 ./tests/nquote5.right +805b72debe32419d9b4bcf5fd21a59d6 ./tests/dollar-at4.sub +c7734cfbed819b9e65333ad54248e3f2 ./tests/errors.right +3b8d566bad42378448c92570a109a578 ./tests/comsub-eof3.sub +726231e74529b01c76a682051d862448 ./tests/dollar-star6.sub +e1b7f00eeeac2fdbb24fb9d33336e3fe ./tests/nameref13.sub +541c8cba65f4d8a94f472df598bafe4b ./tests/arith8.sub +e30c89b06fc6cb13048db1ed7a521ecf ./tests/array.tests +6924456c3e8f1cb082cb3779029cc6af ./tests/misc/sigint-2.sh +671cbbee87c1b27a2bf7c66279c05d44 ./tests/misc/read-nchars.tests +8c0a862f0625e989572d5cca435466cc ./tests/misc/perf-script +ceaace355693a9cfc2853e00ff894cb6 ./tests/misc/dev-tcp.tests +fa3d1f37e1da29ed85f7972687a35372 ./tests/misc/test-minus-e.2 +9b70d89198d56283cd4aa2ce0c649018 ./tests/misc/sigint-4.sh +e436be16997b82d88ac23053be9b149f ./tests/misc/sigint-3.sh +02cd9a6eed6ed4f68f8b2be8d2501740 ./tests/misc/wait-bg.tests +d6a709cb2469336b7fe0564a533b0ec7 ./tests/misc/perftest +91110f67cea5963c41f19baa0ba98bd6 ./tests/misc/test-minus-e.1 +474b8516d51ad15523898d951dc07b7c ./tests/misc/run-r2.sh +b190d9ab1908eeeea45245b8facec605 ./tests/misc/redir-t2.sh +ede572798d4fbbc4e7d65451db6d4124 ./tests/misc/sigint-1.sh +d420ebb134464834c6bfd90658a82abb ./tests/appendop1.sub +03c7eaaef085f75bb2bea86fd418b5c2 ./tests/printf3.sub +85e57b8fcbf08446f52d0244eceb379d ./tests/run-all +099262e769d5db120874d62963138498 ./tests/redir5.sub +7a6040deded3874610f0c1cae8acb4b4 ./tests/run-trap +6e09b225c9b637af2dbbf7446511ac95 ./tests/run-precedence +749ab5fc8aeee2d0d8ca7798b149425b ./tests/arith2.sub +6e43f486ace70c43991b78e572f97e2d ./tests/run-posix2 +23c8519cc8aa162d4550654b0995afd0 ./tests/array20.sub +562fcbd62d1a1389849f58dec995a5d5 ./tests/run-exp-tests +4e458cfcb968501a38d48a725ef06aa1 ./tests/vredir1.sub +6bed8fb1d5a80f64017e93709dfef62b ./tests/run-set-e +28dca56e4bcd943b7ff5a0675592ae32 ./tests/array12.sub +69e4401cf3792e3bbb3048ba1823bad0 ./tests/array24.sub +07482de17713c4a48e28442e4819218b ./tests/nquote4.right +0cc0dd6bea1078ae18099fc6ff8e8153 ./tests/array2.sub +748268281c47528c65e345fc1f6e31d3 ./tests/errors5.sub +dae9d5a8ebb0b67cadf64e34e9773823 ./tests/run-nquote3 +84ccfca5c85e0d422378d2861a5aa8b0 ./tests/dbg-support3.sub +9228d1580114f93fdd3591c9b36ca870 ./tests/run-dirstack +95380b738d16a767f799f07ecbd6362f ./tests/dollar-at-star3.sub +ac7e2d0af783bdaf4d30c45e5ea511c5 ./tests/jobs.right +7e9b2e556371f336c24a8ac145182c50 ./tests/jobs5.sub +4432831a545de72004cf64fdf9138221 ./tests/posixexp2.right +4747fe90d22b81f5202a49c39855b595 ./tests/varenv9.sub +e53156ae173e79cf7508aa2f3018c0b8 ./tests/procsub.tests +a06ae0cd9c2162137e54703a653d6668 ./tests/extglob2.sub +0699dbf2c1f312086b18783db031bc4a ./tests/glob3.sub +84f0ae7c3b19961d1635f709e6e6980c ./tests/extglob4.sub +c854782b435d18ec2bb85476f84420e1 ./tests/tilde2.right +3413509ea55b386b66859836773142fe ./tests/func3.sub +753066e24010f2705fe991760172db93 ./tests/getopts4.sub +84d99fbb2d58dcda74f277643da44027 ./tests/history3.sub +f9abe520eaf000643a619e4c74a9623b ./tests/vredir.right +b5dc98f3594accb10a0055372a0d330a ./tests/redir6.sub +935b14d2e8b14a00c720e5c1a5f09faf ./tests/test1.sub +76a0871ce32cc40d408294b938e8102d ./tests/new-exp9.sub +bb8200fb2d4518ad8298eb31f084cbb9 ./tests/run-func +00e43bbdfcc95173160051824d1df2e1 ./tests/nameref8.sub +4afacd09de838d5f3ea674ace060da34 ./tests/nquote2.sub +0cc1b7ed5032b563bc3136161262d624 ./tests/heredoc2.sub +82d93b607cbcfa9434db01a14adcba49 ./tests/array7.sub +69578d162bb4e9eacc223311ece5fc3d ./tests/assoc.tests +caf8c287da11c0bc1ea146a18992675b ./tests/exec6.sub +902485ef999fdb27722a9698beb25b1c ./tests/dynvar.right +e34c054608573eb1577e7a706b77b3ba ./tests/varenv10.sub +7b455018e80fcbbfc405608553372e7a ./tests/history.list +b10c0dfcc17a021c7199ffd27eb825fa ./tests/run-jobs +09c4964fd8ea4e4d817cbd2c0d40b673 ./tests/exp4.sub +e6dea5cadf75954e47774ab8f46aaf1e ./tests/comsub-eof5.sub +cf6c748d7516c6057e46007245200096 ./tests/assoc8.sub +2eb096e32a587a5a3dff4f5d84a16be3 ./tests/execscript +40e79f322b08719e8666e7cc261e917e ./tests/posixpat.tests +23eb6885f2edab30b443ed12894bf7a4 ./tests/comsub-posix.right +88d257b4451fb62d1f45f0819b3dcf07 ./tests/run-casemod +7852b0fc83110a426f9a8e018fd6fc46 ./tests/cond-regexp1.sub +15ac91cf913f5b6db99665082560a876 ./tests/run-tilde +8912e1589e78ca950d52f639d75fa16b ./tests/nameref19.sub +1a2819be9b0701fef9a8a8187c512586 ./tests/rhs-exp1.sub +42ed57b53897cc71b1da7e00ca47fccb ./tests/alias1.sub +d2b7c6a97194e5484e3fb6437d48af17 ./tests/input-line.sh +7417df74e2352362499caaaa23d8a38a ./tests/unicode2.sub +0616e424f02a76381edfd7f952585486 ./tests/array21.sub +f36c9f14c9e023467919a1b2a86332a5 ./tests/arith3.sub +4b58ef1597a2d53904e880559de2e865 ./tests/arith1.sub +3bc1e8311894b950d063d1cdaf602d84 ./tests/version +00cda9ac64b007072ef66a4ee331c4f7 ./tests/braces.right +a603a3ef408913f4b34c34466b6d9536 ./tests/nameref7.sub +2deca6071e5b23b0b58c1993f61710fa ./tests/case.right +90d1c8464bc38df11862a4184db8a323 ./tests/dollar-star1.sub +2d4588d39783fb3cbcedb24e01cf5121 ./tests/getopts9.sub +0f881f39624bf5b0102cbf884a5f4584 ./tests/comsub1.sub +f9c3d1f14f645bf3d8a4ed0a6c81621b ./tests/trap1.sub +8a87aa3dbab833216ac9d0701f193acb ./tests/run-attr +586720e0ca6a74730ed3c6b5141197f6 ./tests/set-e.tests +d3abac92240454d8d9b8e2b3c576a710 ./tests/printf2.sub +3fd910e4223e6fef288d93faa005731e ./tests/new-exp.tests +54feb391c1c50949bd7a532441cdbb6d ./tests/jobs4.sub +000c63bb5ef885f4d7febc73393d7d9e ./tests/parser.tests +e1f44943175988c7f4a3fe5694b59367 ./tests/jobs6.sub +da9e85e6b1f0445b1145d0bfea55c2e0 ./tests/attr1.sub +1ded9f8ec7c682ee8c789e58ad5b7bea ./tests/lastpipe1.sub +25e937694584018fca891f262424db9a ./tests/cprint.right +1ab9145878eb67e328d925a80dc2bccc ./tests/exec8.sub +7d2a8078556ab0ff148b56085572e9df ./tests/exec1.sub +c97665817effe2f59b8232f663764f5c ./tests/nquote5.tests +45b6e8d19c74123f1e3da92351eff57e ./tests/glob.tests +87a244f3767c580350bcb16ee66ccacf ./tests/arith.right +c54433694bf86cfb4342bf158408392b ./tests/errors3.sub +8961cd9a681bd0aa4df5fee68f3c4c70 ./tests/jobs2.sub +17bf32dd322a204ca68d630f0edaf77b ./tests/new-exp6.sub +1faa8b18a529a7b066bf73ca6ade362e ./tests/extglob2.tests +12056a3eab7dcf2f7ace4f2ba991a0e1 ./tests/run-set-x +daab42225119028ff9de6a89664c51f5 ./tests/func1.sub +810ba929db7553ac9b56b9db588f573c ./tests/dollar-star2.sub +453df045373917875a198a38d2e51232 ./tests/rsh1.sub +f991397475bc411740f4ca8f9fcb087a ./tests/appendop.tests +853f809868708e61073ccd53de3769e6 ./tests/extglob.tests +b315d4f8f1ef1d6eabd08a7e20517d24 ./tests/heredoc1.sub +c16ad027757708773f396f77831a6b87 ./tests/varenv11.sub +a63b62d0ab889954d03d0d5badbcd7ba ./tests/strip.tests +17c37044dfe478dfee2f8e3efdf2209c ./tests/run-comsub-posix +890216407eb681a31fd35601c1462dfa ./tests/trap.tests +67d1df8196b4876170330420d8d860cf ./tests/array-at-star +cdecdd4d4093189346afbd57bd5a38f3 ./tests/globstar2.sub +8c3a755cf22277876872e1320db08076 ./tests/extglob3.tests +0a0cf1cddbcb21b75d27ee38d07aa773 ./tests/ifs.tests +ead123a2fd3b107452a80b1fd93fd05c ./tests/func4.sub +60eb3ec509ee4c73e1685e8ac3bd287a ./tests/builtins.tests +6c8318df1caeaba34f94ac2bc35c0626 ./tests/nameref10.sub +50619bfface4e738caba7a7509efa9bb ./tests/getopts3.sub +99b7dd05bb9302a889fa3e87885d2ed2 ./tests/shopt.tests +48358b797165c9690f34d844cfbba87f ./tests/mapfile.tests +5b344923686581a28e75f16b7ea2dda4 ./tests/array25.sub +16c0b0f2468a364683a7ba0dce646c09 ./tests/redir9.sub +4cb8933f4bf2e4a47b2c82afe816db49 ./tests/alias.right +26ec4c77cdf8402a800007247e009abf ./tests/run-posixexp2 +24cfaf5f0509c45f82a9ceb78e29b0e7 ./tests/run-nquote5 +652903d56904f1691cb32da6b57ba12e ./tests/posix2.right +bf7109c52127ebb51a883dace92256d0 ./tests/globstar.tests +99a043db3f91cce5d4ef5f58905fb83f ./tests/nameref.right +9535d9d5eeb140455a9b33d7702578db ./tests/posixexp5.sub +40d0e264b7f36f1e004610752ad78e00 ./tests/read3.sub +e3b4f4b35fe986ee9d60137db77e7d06 ./tests/exec3.sub +4073f0169de99cd98c13277aa0c43a16 ./tests/tilde.tests +9e1050d5d76ae6fe662ba603761e2f36 ./tests/dbg-support.sub +baa7cd4ec83b2339d709c362388c43c8 ./tests/array18.sub +4afa8607014bee0f127b9727de793c4f ./tests/varenv1.sub +7b1e0d03a2f7d7bacb3153098de86734 ./tests/run-comsub-eof +25ca0467fcf2f34ec1e2f25cf27b6ab3 ./tests/dollar-at3.sub +ea28be205a6ca9aef8e90daa19cea4e7 ./tests/README +d8a4b54a56df5efb66a02e2b5315d8d1 ./tests/run-cond +9a3ee1b1621c40c15e048155e02ed0b4 ./tests/dollar-star9.sub +9095f8f81804b128aaadcf41403fd5bb ./tests/run-printf +69dfc49442ec6dcc67e6f8f3474dcc69 ./tests/builtins3.sub +14e788a510b5fc19776cd417047c5024 ./tests/run-nquote4 +a93791e9e5446555763d09c6fd3df434 ./tests/posixexp2.sub +4e1a23ec18d3498834081d644faee7cd ./tests/builtins5.sub +323c68fa4401d8a6e0456525f10e036c ./tests/history.tests +f23576bd3b1282088c537cac1c028981 ./tests/nquote4.tests +44d89f53c4543dd7e263b456f4abbaa4 ./tests/nquote1.sub +87c25a00f96a5488629a6098eabeaba0 ./tests/run-exportfunc +3af48ad8a5cfb73f61b72c00f93176e4 ./tests/func.tests +1c322db4affff8e95cf21e2220d12825 ./tests/attr2.sub +6bd0c22230717ec41b1d6b271cf69c08 ./tests/printf.right +7c91ce63ebbfcd0d05e3a31dc580290d ./tests/nquote2.tests +31155d2ba7b2acfd419b93e0fadfed4a ./tests/histexp4.sub +910e4395ab79965b4793badc0d35fa10 ./tests/exec11.sub +b8b31f0f8038d116c252be2bb621607f ./tests/dollar-at-star1.sub +12a4ed5d8027c802f2adefbdee230aa5 ./tests/comsub.right +bf47a56b12c7bd9d598722c287e511e3 ./tests/varenv.right +d0780bdbd05f5f5d8232124859352649 ./tests/comsub-posix.tests +bb8207684b1aba7597d96a125d91ae5e ./tests/nameref11.sub +9122a08d98c27b9747ab149ce5b01c07 ./tests/procsub1.sub +3fb4438e03ddb7ad4b7bdcbbe82456ac ./tests/intl3.sub +16d60a4ad4ff9770066577e70673f8fd ./tests/comsub.tests +088f72f6ef260d6a3bf6c4970ed52fcf ./tests/errors6.sub +b59134915deafe480bf3b4c40a47b0b0 ./tests/run-more-exp +7095ca486d755fb6b92f549866ff9ea6 ./tests/run-arith +7c39f0163ae60671979d3f7fd342c67e ./tests/comsub-eof4.sub +ce6a97b1520d25f87b20410e0fc5d771 ./tests/array5.sub +a738f246fdaacbe07d867153f99ffc78 ./tests/run-strip +30ab86f955e8e1d19fd062dbc70a4f38 ./tests/posixpipe.tests +e073fc27a83e4c8acb8fb86c29a0de20 ./tests/set-e3a.sub +e9e30917835da29a3b9a2b4c82bb5603 ./tests/run-mapfile +8d9df1c8a5f0e8f0e59619ebeb81f27d ./tests/iquote1.sub +f98e5dae1f8ffec9e2c885d4b3cf0a72 ./tests/varenv8.sub +f2dcdf6dd8a0cecfbe68420cdd00f72d ./tests/comsub-posix1.sub +4b3512b6d2d8f69b10a83be197931aa2 ./tests/run-extglob +6b57258cb0f256d4a1e3a00a4edcbee1 ./tests/history1.sub +78b048aca5cfdb1fe599c4031a1f250f ./tests/array2.right +8ecbd2d0b89e3252480f1d9898732c5c ./tests/run-array +c4d89706a471397780fa5c83534c9c44 ./tests/source2.sub +3943c554da708e50327ded709ec04697 ./tests/dbg-support.tests +9b30b430017949d419e99ff832112daf ./tests/set-e2.sub +03adc47fc37afabff8743ae5250521b9 ./tests/assoc.right +050ad2eee5bd39b7bd4c18363be6b913 ./tests/lastpipe2.sub +1ed2255b8374ad473757f4f0dbf93e0f ./tests/dollar-at-star8.sub +4985438b465ccd948084174cd6d5012d ./tests/run-rsh +f5866f2038352b271e4f40fb2577fa4f ./tests/histexp2.sub +d4a5231a3a02f8a87ca7663a0e69a390 ./tests/appendop.right +99db10fa4700a86f6f15c019f046d8d7 ./tests/arith4.sub +f566e1d6a531d4ef791862f79037100f ./tests/posix2.tests +99b84d0ca413bdf1f7fd23eb7ca38a03 ./tests/comsub2.sub +f594c25d3f6b832f3d8215fde39ee618 ./tests/set-x.right +176b9bbe63a461e775501f3fd000d8c8 ./tests/run-posixpipe +56832cd2644ff2a608932bb8b19ec433 ./tests/run-arith-for +58e8cc6f359f934cd8ad3b454656fd70 ./tests/new-exp11.sub +ebbcc4ef03e2ad5b94dd699146c88b02 ./tests/intl1.sub +923acb60590ec904bdeeb85a32615f9d ./tests/exportfunc1.sub +5e55aeaf13e33d37a282437bbd549a43 ./tests/exportfunc.right +e6aeeeec5b8d74b7a5e4953df55dc120 ./tests/unicode1.sub +0a4993a00540f6d3d69d09532de4ddc9 ./tests/new-exp.right +ee0a74d0a0f438ab484a341c8150db2f ./tests/errors2.sub +a542ef8c9add7012c434f281ca080fc1 ./tests/dollar-star3.sub +d1b89583aee411d873f3ba2621e3bd84 ./tests/exportfunc.tests +2d8f03b63b0c7ac564b234ec43c51172 ./tests/lastpipe.right +170ba60b828cfea03f5e621289085d97 ./tests/array14.sub +0274670cd3c495db36debc3fa3ec135b ./tests/rsh2.sub +c8270b01b9b8654770d3fd4ed1272eb7 ./tests/jobs3.sub +2608b163403edec7789f083fe50b8688 ./tests/type.tests +42c5ea4f2db5ff6db2228e0dab94d6f2 ./tests/rsh.right +8798955d04074f255db637887e1879e6 ./tests/redir8.sub +6fc26c683564a0d8e7d4f0d747eda7ec ./tests/test.tests +7c8717166504f6452ed18b07a29f3ad1 ./tests/posix2syntax.sub +b887f401d2b32c4f7bb26a153fa0c975 ./tests/more-exp.right +a67a513760fac1881674637fe2d7f48a ./tests/array.right +431dcbc4d56303dd45e4b5cdaf66a94e ./tests/histexp1.sub +7acdd70fe3fd54a6360c28884c001d0f ./tests/parser1.sub +5e1b4d380f6aab8cad6cadf044845f45 ./tests/exp9.sub +d9bba3ab236291ac78dc565b5d5a63c4 ./tests/builtins4.sub +0d3c4f2b495b209c1122f4596238a78b ./tests/new-exp10.sub +8d8f711e9572670085079b9f84707a5a ./tests/alias4.sub +fb3268c52d45c2287c00d522aeeb475b ./tests/run-dollars +70b5c9a0883c3672b90827cde36d1d7e ./tests/braces.tests +3033145e5614108ea943ac0e6c8d8e5a ./tests/intl.right +49c90fd177facf91954447422f3e53b1 ./tests/input-line.sub +40401ee9058e7a835b462a4c22425695 ./tests/extglob3.right +6a8cd4fbfae35fc0fa3a52c326ef9921 ./tests/nameref15.sub +10cb647101a37aeef7cf5511f865d994 ./tests/dynvar.tests +a9b3d790ea8c2f385059a904b5e2619b ./tests/nameref1.sub +5b18718efe6094406e631e474b59e031 ./tests/redir2.sub +cc4b8dc2527fc3cd274b603d935ae2e8 ./tests/procsub.right +4c814172d6f894a35156a310bccdc437 ./tests/assoc6.sub +33b4ec366fdafd11329a8996554d02e6 ./tests/alias2.sub +2b2023926bc911ff5e7ffab347b29b93 ./tests/nameref9.sub +26db20fbfa0bed29dad1f28f7cf299b8 ./tests/builtins6.sub +0ed155f2a1430db874d40c60ad88dda6 ./tests/assoc5.sub +36dfccc7da5edbcc6788b277963790fd ./tests/ifs-posix.tests +fc78fa7d3648f61b8943f49eb91720ac ./tests/run-errors +f538c88a0575e29d3dfce1e431ac5262 ./tests/read1.sub +27ddf17a6cf06fd5295c3fdc86c99bf5 ./tests/nameref16.sub +3867bc7cfcd8a27b82fd076fc38f7a6f ./tests/comsub-eof.right +06463597d3356d47ed43e7946886eecd ./tests/herestr.right +2b35198c67853b1bf0727c4476b175a3 ./tests/source5.sub +fe7823b8185eaf23e560e1937331b6c4 ./tests/exp.right +11bd1d0901c7adfa2f75234b46bab29e ./tests/run-dbg-support +76de7c8486a4af8a500668b0e6be87c1 ./tests/run-glob-test +1290fef00cbdf1607ccf01d971ac50b9 ./redir.h +133daaffa0ad9c8d6b879737e24b6904 ./hashcmd.c +90af2a38a61df82dcfe755e13f4c0e9b ./print_cmd.c +cc08a8ce4f027a7508f693401aeb0306 ./jobs.c +76a55738afd39139dd2d7555595e6ace ./locale.c +1231fb0208d6e6824c0660b3ca47e9b9 ./bashline.h +ed4dce8f6ec807b04c3c24d4da409fb7 ./copy_cmd.c +92ab3757104165eb2bbbd974e83c41e0 ./eval.c +aa9b36b2325d32c41ddc39750c70e978 ./unwind_prot.h +e44e214dc56136122f66da5f2d0c3fcf ./error.c +ecfa86baf9a29200497c7b3cddb1b79a ./version.c +816f31370a1c0a51676365b921bd4121 ./pathexp.c +aa371c8978ef18bf58a465b6e29e3358 ./parser-built +cd1e2301fa0d6ea833ce5cd91b1ca006 ./subst.h +26b24b34d024ab2aec31af3eedfc0847 ./po/en@boldquot.po +e42e3e489c2526d9815e5ed3c4915d4b ./po/af.gmo +d92ec93839abbc831477e0eabf2df91a ./po/lt.po +5629f5051cf3cfb86da1dd9d538eae10 ./po/es.gmo +c7fa02003d2ea7dda5dd92bca6afbce4 ./po/ca.po +26bff27763293388a70725c4c1bedf93 ./po/ru.po +140858226cbabd8977f21e2f29168bb1 ./po/en@boldquot.header +4c2308119eaccb3381e340828e307599 ./po/de.po +36a4eda984fcfbc2746a5d0996adbb94 ./po/ja.gmo +6c79a05462cad28328e28d793ca0444d ./po/de.gmo +4888f78cdf8824812be4786cbf7c1b09 ./po/zh_TW.po +d17fd17c795d19f53e8d6d5e7d68d250 ./po/LINGUAS +957a59087a0223b0e22ea294f30e4a55 ./po/ro.po +540aa2c29d5a7100eca06487165408d7 ./po/Makefile.in.in +499b8fffb1f1438fe1d503151fd5a1eb ./po/sk.gmo +f652c7cf9496049a47b091513f120a45 ./po/quot.sed +ddd397d948b4affd0a9850ab19c5f46c ./po/sr.gmo +8b10e39b744173c8529f7c8778bfa0f3 ./po/id.po +e1e66bee343152afe23437a609884e76 ./po/bg.gmo +64821786af042873444a6e013154ce12 ./po/vi.gmo +9f72ef7fe3e7c7330c158be85dc1bd4c ./po/boldquot.sed +debc6574dfe549a0ce203ae8f4ec006e ./po/pl.po +9e018f5eaf00254fdafbf09ba63df2c2 ./po/pt_BR.po +4d296cbd3b3c108916685fa95772c840 ./po/bg.po +dba0804a7e2d95c9cad32074e9e1db49 ./po/ga.po +f2442c80ae32655607049deec9fc9fa7 ./po/fr.po +4058e3af6c83f511f54a7abd7bd9b71c ./po/en@quot.gmo +4d43527e66aae700057d52b1665e55f0 ./po/ja.po +37b84a20964404a0e3367b168fb1e551 ./po/eo.po +ca31f25833018d51ed9fd3ee567e790d ./po/fr.gmo +bb334b712231c9cf5607c9f4a98d90ed ./po/sr.po +47dc7e611774d60605b0012c93f97aca ./po/ro.gmo +aaf03a1b1d0afa75970594acde047455 ./po/bash.pot +f1f9727ebec008a31999620089c0590a ./po/en@boldquot.gmo +be51d46ffd8b850017fa9ec991763114 ./po/da.po +3533a9dbf5b11aff2a18f69af44bf61d ./po/zh_CN.po +ad4e97ff74edff4f00c0f7c180fb54fa ./po/lt.gmo +905ceefdd67121f1a3f4f6417d043d0b ./po/eo.gmo +88025f3ca24e206a3378c2587675a246 ./po/uk.po +f426ae3683f395fedfbb047206b58603 ./po/cs.po +0acd88c6ac79c87a5be26ad659fe7126 ./po/Rules-quot +62925a0534be06b01cc236d673b87754 ./po/nb.gmo +1db7ba5bf01b572370571c71bfe83442 ./po/ca.gmo +8242fda95b942e9f7df7abae4eca849b ./po/sv.gmo +a17d98ad50b7b57a4d2be6b8b11dfd52 ./po/gl.po +0a03f23661ffd2a4d59ffeb38a7f4b10 ./po/af.po +c1305e59cdaedededc89a0f20bfd7695 ./po/en@quot.po +55ad02fb6e7e5aec92304d2018ed8eab ./po/da.gmo +03e254ccdae925821da2f71a8369a12e ./po/zh_CN.gmo +c1f5a124111b1284c254efd15f091513 ./po/es.po +64253a64392c1711f43dd898214cf840 ./po/it.gmo +0dd85b33f6f5fc905dbdf4ceded88e1b ./po/fi.gmo +d8de6f5f00a661ba39b2094d075963bd ./po/id.gmo +e49f799de64dec5c3d4787317c518b5c ./po/hu.po +62f63d827a6e52cd026e23d3f3a36228 ./po/nl.gmo +55d428b50db8a0697e3ab72d08e6062f ./po/pt.po +725530ab2003f8ecaf9481cf3f7f205c ./po/el.po +b8d349a13678a4e0e18c8ee06c1bebea ./po/insert-header.sin +cd927f43b8af61ceed8b516e7de0730d ./po/zh_TW.gmo +a3b5252c1d2f5cb729ca04a097942ea0 ./po/nl.po +a7d0aaa56b22809dcbe5d8c277270648 ./po/et.po +74d186fc677c0641f29b07f18596e62c ./po/et.gmo +1b55825c3eeb800a4aa75f1e8f0ddb09 ./po/POTFILES.in +cdffbd4ef7c97b97f2c72dd5408e8acb ./po/el.gmo +f3c6b3a29bac4eec505bf8c5fac45af4 ./po/pt_BR.gmo +c204db6982c06bbae60bc333ce9412b7 ./po/tr.gmo +ae2ad0156895c4461ca32fe0524ef902 ./po/remove-potcdate.sin +465f5771e80b3eff8ac6d178859cb0df ./po/uk.gmo +547f424695460e9f967750740e1b415d ./po/tr.po +9ada3624d0ffe4a86487f10876bf02f8 ./po/vi.po +5474510cd05c525578d3f36297ce5904 ./po/sv.po +6f97d9a11866f13dff31885ef5873716 ./po/hr.po +2387b71a7af38721c806e29e6a8cf6bf ./po/fi.po +424693e1171df2a46e12d6b45a01f10e ./po/it.po +5f7f79148da72c1c2b8b2e80559bc6e5 ./po/README +94aef3e55a18b0d91b0d9f937afda610 ./po/pt.gmo +6f404f4dc671ba9ff69dfc9866ae3edf ./po/cs.gmo +b790688c79f69dbd10998b336daef2f9 ./po/ru.gmo +4fab037eca87181f2066bda633c7aca7 ./po/en@quot.header +759ab3cb281d43101d92a8a5311c8fee ./po/Makevars +cd6adb174ab60e163348e29fe1bd5ddc ./po/Rules-builtins +58b9e91e9e0bb506dc4150605a697aea ./po/ga.gmo +eeebaa59b9804068b9bb3b592cccde8c ./po/nb.po +a11a046415fd35b832e841ee443608dc ./po/sl.po +eb9d2d86cbfb2cd5b43575bbcf3af4b8 ./po/gl.gmo +91d7d6297e1907eeb79b5f344f88ed3c ./po/pl.gmo +9b61f7a0fd7f7e2d6dde7cfc14829016 ./po/hr.gmo +3b5e86bdd8921e6d80b872048289b77c ./po/hu.gmo +c3e6d059d419e1c46f144932027216a9 ./po/sk.po +d9e4afc5ffd3bc36b87e7c8d2f201920 ./po/sl.gmo +508d67ad6e5de2e0e69505e0f8b72d37 ./bashtypes.h +a882c889fcffc12070c002512af909ff ./arrayfunc.h +0656b84099a3397dbe873cfc52d6b61b ./mailcheck.c +1663a9818752eb2f92dfddc6bae12144 ./input.c +d54d0ec26607429de901e33880b5514c ./variables.h +3a4560e78db3818f8a3a8d3d6cd6846f ./config.h.in +a37b52a32c53d845b1623a826c8e82b6 ./findcmd.c +a96bed64985953ab06b2ef17c148b95b ./general.h +fd41673ae49d374597e4159e8261f5ee ./MANIFEST +9a4ed1cb85ff905f49e253144dce9560 ./aclocal.m4 +aa9cfa75dc14d2a163993dfc87c151c1 ./input.h +9e9f0658e9c2cb2ac556e5525f91aa92 ./error.h +3cb9c50bf03adf1c73734c375baf02ee ./nojobs.c +454c69d92f867defb64907dd0b9a4bb6 ./pcomplete.c +315af66737d8578e695bbe9043420a6a ./m4/timespec.m4 +499135043b9a522537b719936aeee27a ./m4/stat-time.m4 +74ac8e31f6e972a9793949baddd5d0b0 ./README +5bddbe681e2cb5da1a92fd242ad20904 ./quit.h +fe5e4a496f3829efbd7aa004fb986124 ./bashline.c +2ecfc2175ae2079774f074538470e468 ./lib/glob/doc/Makefile +cf0af04e3799a1163e22ddd0191f4608 ./lib/glob/doc/glob.texi +c9d38837e8f12577070c44f5d8e14cc4 ./lib/glob/Makefile.in +d79ce9ee4d0cd1f44b21a77e194c481a ./lib/glob/smatch.c +58623094b9adb6d645f5d7f825bd6f99 ./lib/glob/strmatch.c +2f77436be1e294ae835f9de2a1ca8bd2 ./lib/glob/glob_loop.c +46224d4b83cdedbf7912877380a42b13 ./lib/glob/glob.h +52c509b620a61ee3edd9cedecf2c407b ./lib/glob/strmatch.h +7abfebd75e8f97205d9bd7073eeeed81 ./lib/glob/collsyms.h +535fb2f3a884ae7a0f1072f0d6d24f74 ./lib/glob/gmisc.c +6e133ccc87b45c9653280511e36344cf ./lib/glob/glob.c +c75628cd83936c87ef2907833164bac4 ./lib/glob/gm_loop.c +e4eb4acbc1ec27bdfc063becc3403390 ./lib/glob/sm_loop.c +17bb0115ceb66e8877c3271940632d72 ./lib/glob/ndir.h +d97646d4b7d1c8b2c893a1ebd3344e05 ./lib/glob/xmbsrtowcs.c +9624c777422a11b270e3ccd80f457db5 ./lib/sh/mailstat.c +0035126f6ba14016d115521600b1389a ./lib/sh/Makefile.in +93c76afddad726ba4a8bf2bff27309ab ./lib/sh/mbscasecmp.c +9fcdcc4b0efcf63cc36752e12383a729 ./lib/sh/clktck.c +414ba369d33cbeb266dec94912c5123d ./lib/sh/memset.c +b507f2cae644eb8ea15139b458de31c9 ./lib/sh/strtoimax.c +b6e442452a62d4ba6d21f7a4dda296d5 ./lib/sh/strerror.c +b8a75791de74ddb98cc94a9c86a14b28 ./lib/sh/strtoll.c +7be0244546242cfd677cd7ded561f985 ./lib/sh/fmtumax.c +eb75e22fea81d6fb86da5f2e3557bafc ./lib/sh/getcwd.c +0549f16bfd5d037c92385850e91566f4 ./lib/sh/zgetline.c +051c8807dd31fbd3ab3b8a27c07c3177 ./lib/sh/itos.c +650638be36a0b0835d31b4174f2e7b74 ./lib/sh/stringlist.c +fa6530729b750f5562ab21c02270e8e4 ./lib/sh/strtoull.c +1b00854d73a3296286d4062809e07161 ./lib/sh/fmtullong.c +dbf5d27634a2626d09b4fb8ae3bdfcd6 ./lib/sh/strdup.c +c2c21f24c163886e9c8ca4f8e8b6b235 ./lib/sh/shmatch.c +fe2c0ad714d50d6a3570f16c6a3f82e7 ./lib/sh/zmapfd.c +502c918c4183a278937c3e7b9fd46aa6 ./lib/sh/strpbrk.c +6e72cdf38534d5522d717065c936c254 ./lib/sh/unicode.c +4464311946c1b7f6590a28b28c2e78ba ./lib/sh/timeval.c +f40652e6e2f41f26e334d3d13ad14c3a ./lib/sh/rename.c +9609354c8705b9fe2f3c43598cef44d1 ./lib/sh/fnxform.c +68aea2aaffec94caea81b7d2380e7b6c ./lib/sh/wcsdup.c +95b07a5e97f9d213dc462ae6de8508ed ./lib/sh/spell.c +92a279b4b45bd2f3fcfe3db3f0240432 ./lib/sh/pathphys.c +2232ee4525635d00bb9b3d41bbbe55b0 ./lib/sh/shmbchar.c +0dd4bc5a7eafa170e896234b6490d2e6 ./lib/sh/eaccess.c +b9034374ca1e0dd482ed8a09d40d99b2 ./lib/sh/snprintf.c +dd9f5242c3f0535502459ea463363e8b ./lib/sh/dprintf.c +08af8b9849086d1ab8bc02837966465c ./lib/sh/inet_aton.c +1d7e1151a6a6e9167e115d3f3fd536be ./lib/sh/stringvec.c +692185ff3080d330bc4ce9d6151c549d ./lib/sh/makepath.c +2dad9a420ffb5f0028016fb875fb5a15 ./lib/sh/mbscmp.c +47d5be6379da4f049c8297fe99f46ff5 ./lib/sh/wcswidth.c +5ab076579f5a2fc4fb50321df36c231f ./lib/sh/strtol.c +0bf1ecfd79e1fa71c15c1e60d7a78190 ./lib/sh/strnlen.c +f700fd9bdbd4138a2ae156029109f5f9 ./lib/sh/input_avail.c +11a4dc10a5b0342edeb77ff280154989 ./lib/sh/strcasecmp.c +6673573cedea232ad26b4148266f9552 ./lib/sh/strtod.c +c12fbafb84a78c7ed1ed2faca8b8e0ad ./lib/sh/setlinebuf.c +868dd15029ed1acc7b98f54a849e9b15 ./lib/sh/tmpfile.c +e3047fab3762eb5c4338372189271b70 ./lib/sh/shtty.c +becb826c3528240ece721bcaab914b6c ./lib/sh/getenv.c +bb567dc7b08eccf9aa7bbf2d26170a5d ./lib/sh/winsize.c +e970b5d2f97bad27393b7049b4069f25 ./lib/sh/strstr.c +7452662b6b7eaa68fde63a8b6b671399 ./lib/sh/netconn.c +f62cbcd5a2b5cad5ca33de38d7eaea37 ./lib/sh/netopen.c +6e0af813ce1c5b0b221df87412044f1a ./lib/sh/oslib.c +b49e417eae68fda796d17621bcc8df31 ./lib/sh/casemod.c +ecb13d8e6ffe4bc4d430213dbc45ed8c ./lib/sh/zcatfd.c +503b7190723324d8ac7b80637685441b ./lib/sh/strtoul.c +4725cfaf5535c120b3acc61e3eda9344 ./lib/sh/uconvert.c +3b7add984af5d85d9f9258a3689caa71 ./lib/sh/strtoumax.c +3d6d0f71046b482596d7ef692cb67bdf ./lib/sh/clock.c +24f8d80c766d67b0bf035c02d0d65c7c ./lib/sh/fpurge.c +f204e7b2897f9294d4f0f8208ef67038 ./lib/sh/strftime.c +5042f96adc4e03164ab27db77f83ce85 ./lib/sh/zwrite.c +809a940eeb5ec23d420319db5e0c51c1 ./lib/sh/mktime.c +5f4f858d9b7c3e65e83dada7a4e56b51 ./lib/sh/strchrnul.c +9f1d06cd1d9eda237f891f8d761e84b6 ./lib/sh/zread.c +e39fe859d4eb64705368547b9b81d971 ./lib/sh/pathcanon.c +a07e014895f74b3ac03543cc0fe90f59 ./lib/sh/ufuncs.c +15932eba81aa7564389520716a03c374 ./lib/sh/times.c +8311be3364b4fe7ff289aa616d277579 ./lib/sh/mbschr.c +1a0458e2d2872a5238287c5ce8759591 ./lib/sh/strcasestr.c +a648d08762047f26645604b0198198f3 ./lib/sh/shquote.c +eb2179075dd9b6400b23aa0e35dbdc69 ./lib/sh/strtrans.c +73839473aae373b9449c64dbf91889dc ./lib/sh/vprint.c +3263ff485308e146340067a48e4b5258 ./lib/sh/wcsnwidth.c +441b2e97d549b82783e1bd8d53921df8 ./lib/sh/fmtulong.c +b87bc9692f21f0bb73a9b87ffa1a5849 ./lib/malloc/Makefile.in +972ffd6fb1ff8c43ddced1e54a61f558 ./lib/malloc/stats.c +b2fa3e1148ab0138cd458df29504336a ./lib/malloc/i386-alloca.s +40a7d61e77bae2834672bc9370402026 ./lib/malloc/x386-alloca.s +3ade849dbcea0b3abdfa36ae18ca232b ./lib/malloc/xmalloc.c +dd09e84026d65bc3baad67668d701b35 ./lib/malloc/table.h +611d59fc43fb78217db4b43bc66123aa ./lib/malloc/stub.c +e318502423536754d6aefed109c4cc09 ./lib/malloc/shmalloc.h +9b35b19ee045e89e9da72aee4ff5fc79 ./lib/malloc/trace.c +a8ebcae9cb40ea3bd9928b3e862d9ae6 ./lib/malloc/imalloc.h +28f84155f51304b46656d84ba4e18358 ./lib/malloc/table.c +115104616717b29beca8dbc7c01310a7 ./lib/malloc/alloca.c +535608823869d40dbafac4263c76b53f ./lib/malloc/watch.c +869c5bbedd4d81220d946a27b4793b2d ./lib/malloc/getpagesize.h +a2ea419b6a1e813eeebd664948f42920 ./lib/malloc/mstats.h +e47b5cc7f8f0a2464330c720f1bb557d ./lib/malloc/watch.h +51d199e4debc21f75589fcfe85a1ba6f ./lib/malloc/malloc.c +57df0bc683bab9e66b2b7d6188857339 ./lib/malloc/xleaktrace +f25563a4ec69e4398ee5c94e17999d72 ./lib/tilde/Makefile.in +a5f7a0953b3a2f3744fad2a83b0835c3 ./lib/tilde/tilde.c +6367b119238a58b510a9c9b000533b26 ./lib/tilde/shell.c +dd7529358acf4efd1d3fcbbdb3a2122d ./lib/tilde/README +4b810af2c83168d3cd86815a6bbeaaff ./lib/tilde/tilde.h +5e0b46ca9bd339825dc767fa8fccedc1 ./lib/termcap/Makefile.in +566ca6b6bf654a5b8fd7e6face4b9380 ./lib/termcap/termcap.h +80f4bd38f4de4132ed3a86af583a469f ./lib/termcap/ltcap.h +690d1c1a0ec3c278a722fde8a399a73c ./lib/termcap/termcap.c +13c3b25d2d5dfbdc01e887c6d2f06606 ./lib/termcap/tparam.c +c54ea59b1f57821afe8f04748ca0be24 ./lib/termcap/version.c +47154544ab73c26a5b6ff0c683a0c53e ./lib/intl/ref-add.sin +4f3e90616276ea41a32c50b9ebe397db ./lib/intl/Makefile.in +ba7d579854539448f7a76eb33cbbc1a5 ./lib/intl/ChangeLog +68692f1a92c690c5efea81769b94dba1 ./lib/intl/gmo.h +1677bc2e34917c41fe50fbf6dc8a955a ./lib/intl/ref-del.sin +5149d37191efbcbc0995d62216338310 ./lib/intl/dgettext.c +61e668a41b906c03c00023d57f8c5c07 ./lib/intl/l10nflist.c +1e98a64aad19104d6ebf3034cf69e18e ./lib/intl/os2compat.h +77d7f7f9aa3faa10c1fbfba9459b53e2 ./lib/intl/finddomain.c +17835c6ed19a1e03f2e0f2c9215e8691 ./lib/intl/gettext.c +b0bcfe220971d8c63197cf22d77b03ab ./lib/intl/plural.c +a9ae683d6494b43f02508cb0150c5c84 ./lib/intl/bindtextdom.c +b107a2948f6bf4a7a765af744079201f ./lib/intl/dcngettext.c +1576bad9074c2bbb0c674ec77a2927b3 ./lib/intl/localename.c +66213e106a88a9ccec4fb60d290c1d83 ./lib/intl/hash-string.h +745c61f03e5ed2c9f49bbf46d70e5d5a ./lib/intl/localealias.c +f58954e1e0c42486288f5da45d7e1f06 ./lib/intl/loadmsgcat.c +f7e1f10e11be24c92003db97cf55ed91 ./lib/intl/intl-compat.c +824fcbd20158f2ad155773e825fa588d ./lib/intl/eval-plural.h +a3be829b47019c5725e8d6eebf76682b ./lib/intl/osdep.c +9bc50f55b6b6a5cabf290aeba194e47e ./lib/intl/config.charset +e4a6fd71dbbf8812fedc1c27e570e91d ./lib/intl/log.c +76ca170a525d5b84d90f0478fe788931 ./lib/intl/VERSION +d3ce7a7265c5e2ff727f2c7dab6d9d80 ./lib/intl/gettextP.h +702820d59a1003203a32a6bf5871a13d ./lib/intl/plural.y +4da4a4f7d3fc5c6599e63268ba68ad77 ./lib/intl/textdomain.c +84e7f0e9f14600e994143f0c2b855c9b ./lib/intl/ngettext.c +2a9f4fdfd2204f05667bcfcf24f1550f ./lib/intl/dcgettext.c +432b87e3670cb7c4e6effd8023ca8955 ./lib/intl/libgnuintl.h.in +8dc19114ce449c8e4bb06aace8704852 ./lib/intl/os2compat.c +81c743388efa49a208b441d956d02006 ./lib/intl/plural-exp.h +be758c2f2663fca2652b4e51539a1fdf ./lib/intl/loadinfo.h +0ef79520ecd00db949efe43f72d8ac54 ./lib/intl/dngettext.c +c8096c04cd9f5c6fb05d63496c9e084c ./lib/intl/plural-exp.c +29c55bea8dab934b7035bd553d242556 ./lib/intl/dcigettext.c +a15c0c2a33abc9e8c12dcf9987eaaa76 ./lib/intl/explodename.c +26e74e5dd046d43a2b1a1b44ec7a6a56 ./lib/intl/localcharset.h +86b86d193ed775abf2b459e316ed0070 ./lib/intl/localcharset.c +fd8765cf938bf0fc085fdb7301e821a7 ./lib/intl/relocatable.h +0ad52aeee8edac39b8bd8b6e6abe8284 ./lib/intl/locale.alias +a2c82417ec5a6d18be2baef865c5a1bb ./lib/intl/relocatable.c +c34e79d96dd40e7643b7366d2d928f07 ./lib/readline/doc/version.texi +9011c6a31fbdb204b2a04a8f93cd1872 ./lib/readline/doc/Makefile +301814fadf04dcaa8dba6d2a9578b75b ./lib/readline/doc/hsuser.texi +f2c574e6fd68c3c8d119485eaad89a76 ./lib/readline/doc/hstech.texi +b35bf3782935e4487f8dcc9d1c0ff91e ./lib/readline/doc/rlman.texi +8576d039a679f02a9b7decf2996164cb ./lib/readline/doc/rltech.texi +fc4331ed5b1a18b6c26cd971b80fa050 ./lib/readline/doc/rluser.texi +4e62e55398e7af4d4f8257ab56a72e3c ./lib/readline/doc/history.texi +072910d553f79906db69fa7c0e956bba ./lib/readline/doc/fdl.texi +8dc95bafc6eb5b4ec0bb0e1b7a7f5890 ./lib/readline/doc/rluserman.texi +039febb24d380307a9ed96d8e0767092 ./lib/readline/callback.c +6cac2a4379545cecf2ad18b3359b3e3f ./lib/readline/emacs_keymap.c +c114b85cbcd5b1eec49cc65443cdcb2c ./lib/readline/Makefile.in +7232ed3b7857122e8a53a99bc6efc38d ./lib/readline/ChangeLog +83c1a52f267a25a5433f38c876516090 ./lib/readline/macro.c +5726064852131ae142d7cccd7ac664b0 ./lib/readline/colors.c +74d4df5cd77c38604565f89c21fcacc0 ./lib/readline/rltty.h +4ad4f0207bcb95eecbfd045cc8abd189 ./lib/readline/complete.c +5ede70a48f9148ac48441bd7a27d13ff ./lib/readline/colors.h +0bab71b938eb344efbe8916f3d57bc65 ./lib/readline/ansi_stdlib.h +620c7e85b5587e6fb2729b9e9140ba68 ./lib/readline/posixdir.h +94f279db5d1e960563410926071e69de ./lib/readline/bind.c +e8cf9ce0ae23eb40b5e2b191515ce1e9 ./lib/readline/posixselect.h +e432eb4df2399ef6aaf7f85e5e8f9d5e ./lib/readline/posixstat.h +0daba0bbbd92284bd012090eb96ad5c3 ./lib/readline/histfile.c +f5b0bfe10af6b0487cc6c1c275ba9593 ./lib/readline/histsearch.c +185bf4027d8641ccf344aed3997bb706 ./lib/readline/isearch.c +4c38bfdf42677c710c270c654d4081f6 ./lib/readline/parse-colors.c +32e6f8515635f2a21b7ba555742980be ./lib/readline/misc.c +35aa356fff4f759751b0850c717d9d33 ./lib/readline/funmap.c +85cfd328e5b060b204b9fe1e5809df82 ./lib/readline/readline.h +ac922dcd0b2c91ee5b68125a7ec17d37 ./lib/readline/rldefs.h +3c9f0c2ffe2e840bcffda7dc99b17097 ./lib/readline/xmalloc.c +65151ae1a011e152402f270b7d4633c3 ./lib/readline/examples/rltest.c +5b43fe2710d96cb383a4c9d8199ad2ca ./lib/readline/examples/rl.c +29f9c14ad5b29d95ee2ab26410f34a56 ./lib/readline/examples/rlcat.c +82f40dde0b5c804d058eff115bc4fcf1 ./lib/readline/examples/Makefile +df3287a2a5ebeb3189ee601408cd5991 ./lib/readline/examples/rl-callbacktest.c +468328e08cf3fd2cbd7ec3481de4a9d5 ./lib/readline/examples/histexamp.c +228fdc869bfde1be5a26e6c274eaf5cc ./lib/readline/examples/fileman.c +05e58ca0def73f34efef5ff4cac6a939 ./lib/readline/examples/Inputrc +d1d82ede8c5e85a0281af2d1c327fa1b ./lib/readline/examples/manexamp.c +032c96681caa1f2c3aae6163b9dd89e8 ./lib/readline/examples/excallback.c +4e4cbb722542fc342e06b0c592e6f039 ./lib/readline/rltty.c +11368baf23970de35833a56f13972d17 ./lib/readline/undo.c +a5f7a0953b3a2f3744fad2a83b0835c3 ./lib/readline/tilde.c +43193f028a5cf0fab061b6d1135d41f1 ./lib/readline/shell.c +5ec5eb2bbd58665ce39d3dc6564ff768 ./lib/readline/keymaps.c +69c4eddc17066af7f3deccae301b7cb2 ./lib/readline/util.c +f23c94c9d1cd34e7c2d9469d5c5651d4 ./lib/readline/savestring.c +b4e8888ab8ed3a4d84679fd74e1df092 ./lib/readline/xmalloc.h +d6bbfb3e33fbc3488a10452670d5755e ./lib/readline/rlconf.h +abaad1067c80b01dde50486731dad458 ./lib/readline/histexpand.c +f5df9557ec7fced94fede0e7a3e93b0b ./lib/readline/rlprivate.h +b5fc756b0f152e134278645b689bd27a ./lib/readline/rlwinsize.h +7c9e37f6ded2de2d611e6533edd99d67 ./lib/readline/text.c +02120f1e3b60238eff5541ba539dc8bc ./lib/readline/chardefs.h +f07ae0b355692aa5ec9594fae2e90cf8 ./lib/readline/histlib.h +4935cecce5b3fbc335bac079ae105019 ./lib/readline/mbutil.c +bd8ee3335e7c5fa83bbc703152419a13 ./lib/readline/rlstdc.h +809ad68d08ea4fd1457279388c04bb9a ./lib/readline/rlshell.h +a281f656ef63cfab0132649f1af43d0b ./lib/readline/history.h +9f398666c4d5c91d2c756c24a02cbfc4 ./lib/readline/nls.c +9ca88a9bb1bd901a32b9bb49f4b7c108 ./lib/readline/terminal.c +f4081c3556d3c577290e6fae30659557 ./lib/readline/signals.c +2b122ab3c1511c7fae2dd186b3e4ce29 ./lib/readline/vi_keymap.c +f9f0bab9b1fe9bec4372062f4e0e5276 ./lib/readline/compat.c +57578bae236604ed6dc466397615a496 ./lib/readline/search.c +a6779e1c5e4e14185b51bd4e996402eb ./lib/readline/input.c +0746f269c36c8aa234ea74cc20fe56cf ./lib/readline/tcap.h +9940b980cee7e32e02193abc62590b76 ./lib/readline/rlmbutil.h +f8070ceeffc2364fb6a943f6f68a5e58 ./lib/readline/keymaps.h +e194e93b2d732981066cafa2f0a47b4f ./lib/readline/rltypedefs.h +077a15ba01bd498f5b9f0f520e0bf8b3 ./lib/readline/posixjmp.h +a7bd2c5a975665a9357754790bc8abf2 ./lib/readline/README +7a29da87ea2c96062860669ef8b33a91 ./lib/readline/kill.c +f2932cf8b2dda34e2584c0f7d52cf1c4 ./lib/readline/vi_mode.c +22dbcbc422a9a69439ab1bb4fd89792e ./lib/readline/STANDALONE +d32239bcb673463ab874e80d47fae504 ./lib/readline/COPYING +d109ef94402e4db5b3ce76273f0f5136 ./lib/readline/parse-colors.h +0dbdfff0400f923228b9faa31b09105d ./lib/readline/parens.c +5c7a5b59204c7fbdec65612fef86ccbb ./lib/readline/display.c +37617e7abcec042d7c3fd9eede2a9981 ./lib/readline/readline.c +c6e7e71d397a1b4575a7c52169bd78af ./lib/readline/xfree.c +01d8d2fe1f165f4e16e9b7306511aad1 ./lib/readline/history.c +4b810af2c83168d3cd86815a6bbeaaff ./lib/readline/tilde.h +e33b7e537fd06e554c593584f9ef9ab8 ./configure +6220fbae73304a052ffa1cedcf3b2a44 ./flags.h +ea11ff7f408a2bfbc18fd0d9c59d3c85 ./Y2K +df0a6a71ed282704114298c8cd1ca5d4 ./config-bot.h +801a5a44a7471ea5aeb2c0ed8c7a3b8f ./mksyntax.c +3429d1a38fbf4cfc77b5ca9e3a7596a6 ./configure.ac +914bb7070d3a0e229cf4b329b7f2f2d8 ./hashlib.c +6b550e197d34dbc6efc4a9d1e504169f ./pcomplib.c +d32239bcb673463ab874e80d47fae504 ./COPYING +570528f5bae956cca82c00e070596971 ./general.c +3f93311dec260b83d57eaff66ce3f2fd ./bashjmp.h +d435e1400edd47edc732ca3f28c23042 ./arrayfunc.c +3fd4caf72a78c8d582cdc35a8669e583 ./pathexp.h +52dc685bc0ce11f362dd7a10b6013bb4 ./support/bash.xbm +2021591f44bcef200cff969ec80fa845 ./support/texi2dvi +d0e26cb94266f93757a3fdcec87c7c0f ./support/mkclone +88476a65fa6438dbef6255e639d6bb34 ./support/Makefile.in +1d68db8aa18dc87c69e52a710da2cd7d ./support/shobj-conf +ad82646514a7f2c743dc83ce2b2b5d84 ./support/printenv.sh +a1dde48f776886228ecaa1230f8921e1 ./support/mkconffiles +e15bc57d4a9dc27bc82270c8175e25c1 ./support/mkversion.sh +64ddebedfe094d725fb5df443e0555bf ./support/config.rpath +bbf1c95b6ae6ee2fbd7b8d55c6284441 ./support/config.sub +2d513ac9d63b5973021ea27718532c94 ./support/SYMLINKS +f4ca6a9ca0bede9a0eaae64f0714efd3 ./support/config.guess +4e2d782878054aa75d29cea26391c3ba ./support/fixlinks +f11af6fb159f13e85b0c1ec6ec08ffdc ./support/recho.c +78cc21ea66df5c5578a77153ab191eb0 ./support/texi2html +8579718a3aa61eed988d31f24958db68 ./support/zecho.c +d9d304a90cc66c704fa652f6f2e0be83 ./support/bash.pc.in +537c1dfc8ed232c07360d5e5ad8c3443 ./support/mkdirs +323b934ca4dde9c6c5414e70b446fede ./support/printenv.c +792922784eade1d03ecb1b33ba8bb7c3 ./support/mkinstalldirs +f01cade8404f87f796fee1a0a296092d ./support/install.sh +8a5b4d266a0c8d4658e362a21608bcdd ./support/mksignames.c +09e40ecfdcb25803b6998ca593ecaaad ./support/rlvers.sh +3749b75fd8227d89f29636a47a181e9c ./support/xcase.c +fce7211629dc4b85307c59b4ea5781b2 ./support/bashbug.sh.in +a60fb778240accc54a051f4bd100ccf2 ./support/missing +8a09778fae2494c17120b05f26c1242e ./support/man2html.c +10865cf7dc85c1cc35275a09075570f8 ./support/xenix-link.sh +da7f37c8928376450c1eeb24c9b84dc6 ./support/signames.c +13314a4d51584fb6669333f5753092f1 ./support/bashbug.sh +a844702710fcc4cc39c885d9b31a7b29 ./support/checkbashisms +0876b8a36df538011a2d18c5d6d0eb6c ./support/bashversion.c +fb99a53b9358d9a73dbafbf03494f917 ./expr.c diff --git a/debian/bash-builtins.7 b/debian/bash-builtins.7 deleted file mode 100644 index 69220eb..0000000 --- a/debian/bash-builtins.7 +++ /dev/null @@ -1,18 +0,0 @@ -.\" 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 7 "2001 October 29" "GNU Bash-2.05a" -.SH NAME -bash-builtins \- bash built-in commands, see \fBbash\fR(1) -.SH SYNOPSIS -bash defines the following built-in commands: -:, ., [, alias, bg, bind, break, builtin, case, cd, command, compgen, complete, -continue, declare, dirs, disown, echo, enable, eval, exec, exit, -export, fc, fg, getopts, hash, help, history, if, jobs, kill, -let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set, -shift, shopt, source, suspend, test, times, trap, type, typeset, -ulimit, umask, unalias, unset, until, wait, while. -.SH BASH BUILTIN COMMANDS -.nr zZ 1 -.so man1/bash.1 -.SH SEE ALSO -bash(1), sh(1) diff --git a/debian/bash-doc.doc-base b/debian/bash-doc.doc-base deleted file mode 100644 index c392ba4..0000000 --- a/debian/bash-doc.doc-base +++ /dev/null @@ -1,10 +0,0 @@ -Document: bashref -Title: Bash Reference Manual -Author: Chet Ramey -Abstract: Bash is an sh-compatible command language interpreter that executes - commands read from the standard input or from a file. Bash also - incorporates useful features from the Korn and C shells (ksh and csh). -Section: Apps/Shells - -Format: pdf -Files: /usr/share/doc/bash/bashref.pdf diff --git a/debian/bash-doc.postinst b/debian/bash-doc.postinst deleted file mode 100644 index 13af80d..0000000 --- a/debian/bash-doc.postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -if [ -f /usr/share/info/bashref.info.gz ]; then - install-info --quiet --section "Shells" "Shells" \ - --description="GNU Bourne-Again SHell Features." \ - /usr/share/info/bashref.info.gz -fi - -#DEBHELPER# diff --git a/debian/bash-doc.prerm b/debian/bash-doc.prerm deleted file mode 100644 index d5c1c42..0000000 --- a/debian/bash-doc.prerm +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -install-info --quiet --remove bashref - -#DEBHELPER# diff --git a/debian/bash-minimal.1 b/debian/bash-minimal.1 deleted file mode 100644 index 16932f8..0000000 --- a/debian/bash-minimal.1 +++ /dev/null @@ -1,62 +0,0 @@ -.TH BASH 1 "May 24, 2003" bash "Debian Free Documentation" -.SH NAME -bash-minimal \- A bash version configured with minimal features -.SH SYNOPSIS -bash [\fB\s-1options\s0\fR] ... [\fI\s-1file\s0\fR] - -.SH DESCRIPTION - -\fBbash-minimal\fR is configured using --enable-minimal-config, which -produces a shell with minimal features, close to the historical Bourne -shell. This means: -.IP "\(bu" 4 -No alias expansion and the `alias' and `unalias' builtins. -.IP "\(bu" 4 -No support for the alternate form of the `for' command that -behaves like the C language `for' statement. -.IP "\(bu" 4 -No support for one-dimensional array shell variables. -.IP "\(bu" 4 -No support for `csh'-like history substitution. -.IP "\(bu" 4 -No `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ). -.IP "\(bu" 4 -No support for recognizing `time' as a reserved word and for -displaying timing statistics for the pipeline following `time'. This -allows pipelines as well as shell builtins and functions to be timed. -.IP "\(bu" 4 -No support for the `[[' conditional command. -.IP "\(bu" 4 -No support for a `csh'-like directory stack and the `pushd', -`popd', and `dirs' builtins -.IP "\(bu" 4 -No support for the `((...))' command. -.IP "\(bu" 4 -No support for the extended pattern matching features. -.IP "\(bu" 4 -No `help' builtin, which displays help on shell builtins and -variables. -.IP "\(bu" 4 -No command history and the `fc' and `history' builtin commands. -.IP "\(bu" 4 -No job control features. -.IP "\(bu" 4 -No special handling of filenames of the form `/dev/tcp/HOST/PORT' and -`/dev/udp/HOST/PORT' when used in redirections. -.IP "\(bu" 4 -No process substitution. -.IP "\(bu" 4 -No interpretation of a number of backslash-escaped characters in the -`$PS1', `$PS2', `$PS3', and `$PS4' prompt strings. -.IP "\(bu" 4 -No programmable completion facilities. -.IP "\(bu" 4 -No support for command-line editing and history with the Bash version -of the Readline library. -.IP "\(bu" 4 -No support for a "restricted shell". If this is enabled, Bash, when -called as `rbash', enters a restricted mode. -.IP "\(bu" 4 -No `select' builtin, which allows the generation of simple menus. -.SH "SEE ALSO" -.BR bash(1) diff --git a/debian/bash-minimal.postinst b/debian/bash-minimal.postinst deleted file mode 100644 index f0a74f1..0000000 --- a/debian/bash-minimal.postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -if [ -x /usr/sbin/add-shell ]; then - /usr/sbin/add-shell /bin/bash-minimal -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/bash-minimal.postrm b/debian/bash-minimal.postrm deleted file mode 100644 index 2431284..0000000 --- a/debian/bash-minimal.postrm +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -if [ -x /usr/sbin/remove-shell ]; then - /usr/sbin/remove-shell /bin/bash-minimal -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/bash-static.postinst b/debian/bash-static.postinst deleted file mode 100644 index ebcea4f..0000000 --- a/debian/bash-static.postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -if [ -x /usr/sbin/add-shell ]; then - /usr/sbin/add-shell /bin/bash-static -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/bash-static.postrm b/debian/bash-static.postrm deleted file mode 100644 index a3600c7..0000000 --- a/debian/bash-static.postrm +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -if [ -x /usr/sbin/remove-shell ]; then - /usr/sbin/remove-shell /bin/bash-static -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/bash.overrides b/debian/bash.overrides new file mode 100644 index 0000000..ddb81f7 --- /dev/null +++ b/debian/bash.overrides @@ -0,0 +1,5 @@ +# no, used conditionally +bash binary: manpage-has-errors-from-man + +# we have NEWS, CHANGES and changelog ... +bash binary: wrong-name-for-upstream-changelog diff --git a/debian/bash.postinst b/debian/bash.postinst deleted file mode 100644 index 5fa0da1..0000000 --- a/debian/bash.postinst +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/bash - -set -e - -# the symlink is in the package now. So this should never happen ... -if [ ! -e /bin/sh ]; then - ln -s bash /bin/sh -fi - -update-alternatives --install \ - /usr/share/man/man7/builtins.7.gz \ - builtins.7.gz \ - /usr/share/man/man7/bash-builtins.7.gz \ - 10 \ - || true - -if [ "$1" = configure ] && dpkg --compare-versions "$2" le 3.2-2 \ - && [ -x /usr/sbin/add-shell ] -then - /usr/sbin/add-shell /bin/bash - /usr/sbin/add-shell /bin/rbash -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/bash.postrm b/debian/bash.postrm deleted file mode 100644 index 1b1b660..0000000 --- a/debian/bash.postrm +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh - -set -e - -case "$1" in - upgrade|failed-upgrade|abort-install|abort-upgrade) - ;; - remove|purge|disappear) - if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then - /usr/sbin/remove-shell /bin/bash - /usr/sbin/remove-shell /bin/rbash - fi - ;; - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/bash.preinst.c b/debian/bash.preinst.c deleted file mode 100644 index 524e126..0000000 --- a/debian/bash.preinst.c +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright (c) 1999 Anthony Towns - * Copyright (c) 2000, 2002 Matthias Klose - * Copyright (c) 2008 Canonical Ltd - * - * You may freely use, distribute, and modify this program. - */ - -// Don't rely on /bin/sh and popen! - -#include -#include -#include -#include -#include -#include -#include -#include - -/* XXX: evil kludge, deal with arbitrary name lengths */ -#ifndef PATH_MAX -#define PATH_MAX 4096 -#endif - -#include "md5.h" - -int check_predepends(void) -{ - pid_t child; - - switch(child = fork()) { - case -1: - /* fork failed */ - return EXIT_FAILURE; - - case 0: - /* i'm the child */ - { - execl( "/usr/bin/dpkg", "/usr/bin/dpkg", - "--assert-support-predepends", NULL ); - _exit(127); - } - - default: - /* i'm the parent */ - { - int status; - pid_t pid; - pid = wait(&status); - if (pid == child) { - if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { - return EXIT_SUCCESS; - } - } - } - } - return EXIT_FAILURE; -} - -#define BUFSIZE 8192 - -int md5sum_match(char *fn, char* fn_digest) -{ - md5_state_t md5; - md5_byte_t digest[16]; - unsigned char hexdigest[33]; - int i, j, fd; - size_t nbytes; - md5_byte_t buf[BUFSIZE]; - - // if not existant, md5sums don't match - if (access(fn, R_OK)) - return 0; - if ((fd = open(fn, O_RDONLY)) == -1) - return 0; - - md5_init(&md5); - while (nbytes = read(fd, buf, BUFSIZE)) - md5_append(&md5, buf, nbytes); - md5_finish(&md5, digest); - close(fd); - - for (i = j = 0; i < 16; i++) { - unsigned char c; - c = (digest[i] >> 4) & 0xf; - c = (c > 9) ? c + 'a' - 10 : c + '0'; - hexdigest[j++] = c; - c = (digest[i] & 0xf); - c = (c > 9) ? c + 'a' - 10 : c + '0'; - hexdigest[j++] = c; - } - hexdigest[j] = '\0'; -#ifdef NDEBUG - fprintf(stderr, "fn=%s, md5sum=%s, expected=%s\n", fn, hexdigest, fn_digest); -#endif - return !strcmp(fn_digest, hexdigest); -} - -int unmodified_file(char *fn, int md5sumc, unsigned char* md5sumv[]) -{ - int i; - - // if not existant, pretend its unmodified - if (access(fn, R_OK)) - return 1; - for (i = 0; i < md5sumc; i++) { - if (md5sum_match(fn, md5sumv[i])) - return 1; - } - return 0; -} - -unsigned char *md5sumv_bash_profile[] = { - "d1a8c44e7dd1bed2f3e75d1343b6e4e1", // dapper, edgy, etch - "0bc1802860b758732b862ef973cd79ff", // feisty, gutsy -}; -const int md5sumc_bash_profile = sizeof(md5sumv_bash_profile) / sizeof (char *); - -unsigned char *md5sumv_profile[] = { - "7d97942254c076a2ea5ea72180266420", // feisty, gutsy -}; -const int md5sumc_profile = sizeof(md5sumv_profile) / sizeof (char *); - -#ifdef BC_CONFIG -unsigned char *md5sumv_completion[] = { - "2bc0b6cf841eefd31d607e618f1ae29d", // dapper - "ae1d298e51ea7f8253eea8b99333561f", // edgy - "adc2e9fec28bd2d4a720e725294650f0", // feisty - "c8bce25ea68fb0312579a421df99955c", // gutsy, and last one in bash - "9da8d1c95748865d516764fb9af82af9", // etch, sid (last one in bash) -}; -const int md5sumc_completion = sizeof(md5sumv_completion) / sizeof (char *); -#endif - -char *check_diversion(void) -{ - pid_t child; - int pipedes[2]; - - if (pipe(pipedes)) - return NULL; - - - switch(child = fork()) { - case -1: - /* fork failed */ - close(pipedes[0]); - close(pipedes[1]); - return NULL; - - case 0: - /* i'm the child */ - { - if (dup2(pipedes[STDOUT_FILENO], STDOUT_FILENO) < 0) - _exit(127); - close(pipedes[STDIN_FILENO]); - close(pipedes[STDOUT_FILENO]); - execl( "/usr/sbin/dpkg-divert", "/usr/sbin/dpkg-divert", - "--list", "/bin/sh", NULL ); - _exit(127); - } - - default: - /* i'm the parent */ - { - static char line[1024]; - FILE *fd; - - close (pipedes[STDOUT_FILENO]); - fcntl (pipedes[STDIN_FILENO], F_SETFD, FD_CLOEXEC); - fd = fdopen (pipedes[STDIN_FILENO], "r"); - - while (fgets(line, 1024, fd) != NULL) { - line[strlen(line)-1] = '\0'; - break; - } - fclose(fd); - return line; - } - } - return NULL; -} - -const char *msg = - "As bash for Debian is destined to provide a working /bin/sh (pointing to\n" - "/bin/bash) your link will be overwritten by a default link.\n\n" - "If you don't want further upgrades to overwrite your customization, please\n" - "read /usr/share/doc/bash/README.Debian.gz for a more permanent solution.\n\n" - "[Press RETURN to continue]"; - -int main(void) { - int targetlen; - char target[PATH_MAX+1], answer[1024], *fn; - - fn = "/etc/skel/.bash_profile"; - if (!access(fn, R_OK)) { - if (unmodified_file(fn, md5sumc_bash_profile, md5sumv_bash_profile)) { - printf("removing %s in favour of /etc/skel/.profile\n", fn); - unlink(fn); - } - else { - fn = "/etc/skel/.profile"; - if (!access(fn, R_OK)) { - if (unmodified_file(fn, md5sumc_profile, md5sumv_profile)) { - printf("renaming /etc/skel/.bash_profile to %s\n", fn); - rename("/etc/skel/.bash_profile", fn); - } - } - } - } - -#ifdef BC_CONFIG - fn = "/etc/bash_completion"; - if (!access(fn, R_OK)) { - if (unmodified_file(fn, md5sumc_completion, md5sumv_completion)) { - printf("removing unmodified %s, now in package bash-completion\n", fn); - unlink(fn); - } - } -#endif - - if (check_predepends() != EXIT_SUCCESS) { - printf("\nPlease upgrade to a new version of dpkg\n\n"); - return EXIT_FAILURE; - } - targetlen = readlink("/bin/sh", target, PATH_MAX); - if (targetlen == -1) { - // error reading link. Will be overwritten. - puts("The bash upgrade discovered that something is wrong with your /bin/sh link."); - puts(msg); - fgets(answer, 1024, stdin); - return EXIT_SUCCESS; - } - target[targetlen] = '\0'; - if (strcmp(target, "bash") != 0 && strcmp(target, "/bin/bash") != 0) { - char *diversion = check_diversion(); - - if (diversion == NULL) - return EXIT_FAILURE; - // printf("diversion: /%s/\n", diversion); - if (strcmp(diversion, "") != 0) - // link is diverted - return EXIT_SUCCESS; - printf("The bash upgrade discovered that your /bin/sh link points to %s.\n", target); - puts(msg); - fgets(answer, 1024, stdin); - return EXIT_SUCCESS; - } - - return EXIT_SUCCESS; -} diff --git a/debian/bash_completion/BUGS b/debian/bash_completion/BUGS deleted file mode 100644 index 4694eac..0000000 --- a/debian/bash_completion/BUGS +++ /dev/null @@ -1,20 +0,0 @@ -$Id: BUGS,v 1.3 2003/05/01 05:49:58 ianmacd Exp $ - -The following are known bugs with the bash completion code. See also the -KNOWN PROBLEMS section of the README file. - -- sudo completion goes awry when a command line contains wildcards - - The problem arises because sudo needs to hand off completion duties to - the function bound to the command that it is told to execute. As part of - this process, any arguments on the command line are expanded. - - Suppose you have the following command line: - - $ sudo mv *.txt foo/ - - This command line contains four tokens, of which '*.txt' is the third. - However, after expansion of the wildcard, there may be any number of - arguments in the command-line that is ultimately handed to mv. - - Note: this bug is believed to be fixed as of the 20030501 release diff --git a/debian/bash_completion/COPYING b/debian/bash_completion/COPYING deleted file mode 100644 index d60c31a..0000000 --- a/debian/bash_completion/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE 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. - - 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 -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This 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 Library General -Public License instead of this License. diff --git a/debian/bash_completion/Changelog b/debian/bash_completion/Changelog deleted file mode 100644 index 0c21fe7..0000000 --- a/debian/bash_completion/Changelog +++ /dev/null @@ -1,5142 +0,0 @@ - -RCS file: /var/cvs/bash_completion/bash_completion,v -Working file: bash_completion -head: 1.872 -branch: -locks: strict -access list: -symbolic names: - rel20060301: 1.872 - rel20050721: 1.827 - rel20050720: 1.819 - rel20050712: 1.815 - rel20050121: 1.786 - rel20050120: 1.785 - rel20050112: 1.776 - rel20050103: 1.772 - rel20041017: 1.758 - rel20040711: 1.737 - rel20040704: 1.731 - rel20040526: 1.714 - rel20040331: 1.700 - rel20040214: 1.690 - rel20040210: 1.683 - rel20040101: 1.672 - rel20031225: 1.667 - rel20031215: 1.662 - rel20031125: 1.657 - rel20031112: 1.653 - rel20031022: 1.644 - rel20031007: 1.637 - rel20031029: 1.630 - rel20030911: 1.624 - rel20030821: 1.617 - rel20030811: 1.610 - rel20030803: 1.603 - rel20030721: 1.594 - rel20030713: 1.590 - rel20030630: 1.585 - rel20030607: 1.579 - rel20030527: 1.571 - rel20030505: 1.562 - rel20030501: 1.560 - rel20030419: 1.548 - rel20030414: 1.543 - rel20030327: 1.538 - rel20030227: 1.535 - rel20030209: 1.529 - rel20030201: 1.524 - rel20030126: 1.520 - rel20030118: 1.515 - rel20030113: 1.511 - devel: 1.504.0.2 - rel20021231: 1.504 - rel20021223: 1.499 - rel20021221: 1.493 - rel20021217: 1.489 - rel20021213: 1.486 - rel20021205: 1.480 - rel20021026: 1.462 - rel20021022: 1.455 - rel20021021: 1.453 - rel20021017: 1.448 - rel20021013: 1.438 - rel20021007: 1.432 - rel20021005: 1.428 - rel20021001: 1.420 - rel20020928: 1.415 - rel20020909: 1.410 - rel20020819: 1.404 - rel20020812: 1.401 - rel20020803: 1.397 - rel20020727: 1.390 - rel20020723: 1.387 - rel20020716: 1.383 - rel20020711: 1.379 - rel20020704: 1.377 - rel20020626: 1.374 - rel20020624: 1.370 - rel20020621: 1.366 - rel20020619: 1.362 - rel20020616: 1.358 - rel20020611: 1.355 - rel20020609: 1.353 - rel20020605: 1.348 - rel20020601: 1.339 - rel20020528: 1.335 - rel20020521: 1.332 - rel20020519: 1.329 - rel20020516: 1.322 - rel20020514: 1.317 - rel20020511: 1.313 - rel20020507: 1.305 - rel20020504: 1.297 - rel20020430: 1.290 - rel20020427: 1.286 - rel20020422: 1.278 - rel20020418: 1.272 - rel20020413: 1.267 - rel20020408: 1.264 - rel20020406: 1.262 - rel20020404: 1.259 - rel20020402: 1.246 - rel20020331: 1.239 - rel20020330: 1.237 - rel20020328: 1.229 - rel20020326: 1.221 - rel20020324: 1.213 - rel20020322: 1.210 - rel20020318: 1.204 - rel20020314: 1.197 - rel20020311: 1.195 - rel20020306: 1.180 - rel20020304: 1.177 - rel20020227: 1.163 - rel20020225: 1.145 - rel20020220: 1.138 - rel20020215: 1.118 - rel20020213: 1.108 - rel20020212: 1.105 - rel20020209: 1.96 - rel20020206: 1.93 - rel20020204: 1.84 - rel20020130: 1.77 - rel20020124: 1.70 - rel20020121: 1.60 - rel20020115: 1.55 - rel20020109: 1.53 - rel20020105: 1.47 -keyword substitution: kv -total revisions: 876; selected revisions: 876 -description: ----------------------------- -revision 1.872 -date: 2006/03/01 16:20:18; author: ianmacd; state: Exp; lines: +2 -2 - -Release 20060301. ----------------------------- -revision 1.871 -date: 2006/03/01 13:15:43; author: ianmacd; state: Exp; lines: +3 -3 - -There were probable bash 3.1 POSIX quote problems if UserKnownHostsFile or -GlobalKnownHostsFile keywords were used inside ssh config files. Fixed. ----------------------------- -revision 1.870 -date: 2006/03/01 10:22:43; author: ianmacd; state: Exp; lines: +425 -1 - -Added new subversion completion implementation by Guillaume Rousse - and removed the old one from contrib. ----------------------------- -revision 1.869 -date: 2006/03/01 10:13:27; author: ianmacd; state: Exp; lines: +38 -1 - -Added minicom completion by Guillaume Rousse . ----------------------------- -revision 1.868 -date: 2006/03/01 10:05:29; author: ianmacd; state: Exp; lines: +14 -2 - ---nodigest and --nosignature options must be set in $nodig and $nosig within -_rpm_installed_packages() itself, not just set in _rpm() before -_rpm_installed_packages() is called. This is because other completion -functions also call _rpm_installed_packages(). - -Fix from Guillaume Rousse . ----------------------------- -revision 1.867 -date: 2006/03/01 09:55:31; author: ianmacd; state: Exp; lines: +3 -3 - -Minor playmidi and timidity additions for .MID(I) (capital letters) files. ----------------------------- -revision 1.866 -date: 2006/03/01 09:49:52; author: ianmacd; state: Exp; lines: +2 -2 - -Add kdvi, dvipdf and advi to programs that complete on .dvi files. Thanks to -Guillaume Rousse . ----------------------------- -revision 1.865 -date: 2006/03/01 09:47:38; author: ianmacd; state: Exp; lines: +10 -9 - -iconv completion improvement from Guillaume Rousse . ----------------------------- -revision 1.864 -date: 2006/03/01 09:40:27; author: ianmacd; state: Exp; lines: +97 -18 - -Replace invoke-rc.d completion with an implementation by Servilio Afre Puentes -. ----------------------------- -revision 1.863 -date: 2006/02/28 12:53:20; author: ianmacd; state: Exp; lines: +2 -2 - -Fix _pkg_config() typo. Thanks to Koblinger Egmont . ----------------------------- -revision 1.862 -date: 2006/02/26 19:20:21; author: ianmacd; state: Exp; lines: +12 -7 - -yum completion update from Ville Skytt� . ----------------------------- -revision 1.861 -date: 2006/02/26 00:12:40; author: ianmacd; state: Exp; lines: +30 -2 - -Debian invoke-rc.d completion by Jan Christoph Ebersbach -. ----------------------------- -revision 1.860 -date: 2006/02/25 13:36:12; author: ianmacd; state: Exp; lines: +7 -4 - -Use ant's complete-ant-cmd.pl if it's available. Suggested by Greg Kedge -. ----------------------------- -revision 1.859 -date: 2006/02/25 13:02:25; author: ianmacd; state: Exp; lines: +17 -1 - -sysctl(8) completion, modified from code sent in by Jonas Davidsson -. ----------------------------- -revision 1.858 -date: 2006/02/25 11:55:56; author: ianmacd; state: Exp; lines: +8 -1 - -Add 'cvs update' completion. Patch from Rafael Luque Leiva -. ----------------------------- -revision 1.857 -date: 2006/02/25 11:49:40; author: ianmacd; state: Exp; lines: +30 -1 - -vncviewer(1) completion by Dean Montgomery . ----------------------------- -revision 1.856 -date: 2006/02/25 11:37:32; author: ianmacd; state: Exp; lines: +6 -1 - -Add support for PLD Linux to _configured_interfaces(). Patch from Elan -Ruusam�e . ----------------------------- -revision 1.855 -date: 2006/02/25 00:24:16; author: ianmacd; state: Exp; lines: +193 -1 - -smartctl completion by Guillaume Rousse . ----------------------------- -revision 1.854 -date: 2006/02/24 23:55:13; author: ianmacd; state: Exp; lines: +2 -2 - -Make make(1) et al complete on filenames, too. Suggested by Christian Boltz -. ----------------------------- -revision 1.853 -date: 2006/02/24 22:07:47; author: ianmacd; state: Exp; lines: +3 -4 - -Use $BASH_COMPLETION_DEBUG to turn on debugging, rather than $DEBUG. ----------------------------- -revision 1.852 -date: 2006/02/24 12:59:03; author: ianmacd; state: Exp; lines: +5 -3 - -Make 'aptitude show' work the same way as 'apt-cache show'. Fix from nerf -. ----------------------------- -revision 1.851 -date: 2006/02/24 12:48:59; author: ianmacd; state: Exp; lines: +2 -5 - -Accidentally left some echo commands for debugging. ----------------------------- -revision 1.850 -date: 2006/02/24 12:04:52; author: ianmacd; state: Exp; lines: +3 -2 - -Make clear that this works with bash and 2.05b, too. ----------------------------- -revision 1.849 -date: 2006/02/24 12:02:15; author: ianmacd; state: Exp; lines: +2 -2 - -Add .flac completion for MPlayer. Suggested by Robert Millan . ----------------------------- -revision 1.848 -date: 2006/02/24 12:00:38; author: ianmacd; state: Exp; lines: +131 -1 - -Add dpkg-source completion from Sven Mueller . ----------------------------- -revision 1.847 -date: 2006/02/24 11:51:39; author: ianmacd; state: Exp; lines: +2 -2 - -Add .exe.so completion to wine. Suggested by Johannes Rohr -. ----------------------------- -revision 1.846 -date: 2006/02/24 11:41:04; author: ianmacd; state: Exp; lines: +2 -2 - -unzip can make use of oowriter's .ott files. Suggested by "Mykola A. -Nickishov" . ----------------------------- -revision 1.845 -date: 2006/02/24 11:37:04; author: ianmacd; state: Exp; lines: +2 -2 - -Fix gdb completion issue when completing second parameter after first -parameter that has white space. Reported by Branden Robinson -. ----------------------------- -revision 1.844 -date: 2006/02/24 11:19:41; author: ianmacd; state: Exp; lines: +2 -2 - -Add .mng to file types that xine et al can complete on. Suggested by Patrick -Fritzsch . ----------------------------- -revision 1.843 -date: 2006/02/24 01:10:58; author: ianmacd; state: Exp; lines: +2 -2 - -MPlayer can also complete on .mpc files. Suggested by knefas -. ----------------------------- -revision 1.842 -date: 2006/02/24 01:09:23; author: ianmacd; state: Exp; lines: +2 -2 - -mkisofs completion now defaults to treating completions as filenames. ----------------------------- -revision 1.841 -date: 2006/02/24 01:03:37; author: ianmacd; state: Exp; lines: +2 -2 - -More timidity completions from Tijmen Baarda . ----------------------------- -revision 1.840 -date: 2006/02/24 00:57:25; author: ianmacd; state: Exp; lines: +2 -3 - -gdb completion wasn't completing second parameter correctly when it was a -file, rather than a PID. Fix from unknown Google source, but provided via -Peter Duff . ----------------------------- -revision 1.839 -date: 2006/02/24 00:46:30; author: ianmacd; state: Exp; lines: +3 -3 - -Minor cvs completion change. ----------------------------- -revision 1.838 -date: 2006/02/24 00:25:33; author: ianmacd; state: Exp; lines: +7 -5 - -Allow man completion to work on OpenBSD, too. Patch by Kyle Wheeler -. ----------------------------- -revision 1.837 -date: 2006/02/24 00:12:41; author: ianmacd; state: Exp; lines: +5 -2 - -Avoid the need for grep in _rl_enabled(). Modified from a suggestion by Kyle -Wheeler . ----------------------------- -revision 1.836 -date: 2006/02/23 22:55:44; author: ianmacd; state: Exp; lines: +15 -1 - -aptitude patch to use grep-status, if available. Patch from Kyle Wheeler -. ----------------------------- -revision 1.835 -date: 2006/02/23 21:16:16; author: ianmacd; state: Exp; lines: +2 -2 - -MPlayer can play 3gp files produced by mobile phones. Suggested by Ismail -Donmez . ----------------------------- -revision 1.834 -date: 2006/02/23 20:27:59; author: ianmacd; state: Exp; lines: +6 -6 - -Add support for 'cvs stat'. Thanks to Ville Skytt� . ----------------------------- -revision 1.833 -date: 2006/02/23 20:26:10; author: ianmacd; state: Exp; lines: +2 -2 - -Add mtr to known hosts completion. Thanks to Ville Skytt� -. ----------------------------- -revision 1.832 -date: 2006/02/23 18:01:37; author: ianmacd; state: Exp; lines: +5 -5 - -_known_hosts() and _mount() were broken by bash 3.1. Some aspect of how -POSIX-quoted strings (e.g. $'\t') are expanded has changed in this version, -requiring that such strings no longer appear inside double-quotes. - -Ville Skytt� pointed out the symptoms and suggested a -fix for _known_hosts(), but that fix relied upon sed understanding \t, which -some versions of sed do not. This version of the fix puts POSIX-quoted strings -outside of the double-quotes. ----------------------------- -revision 1.831 -date: 2005/07/30 06:27:32; author: ianmacd; state: Exp; lines: +2 -2 - -Use -o filenames instead of -o default for Perl. ----------------------------- -revision 1.830 -date: 2005/07/28 00:11:14; author: ianmacd; state: Exp; lines: +3 -3 - -Minor _filedir() edit to remove code no longer in use. ----------------------------- -revision 1.829 -date: 2005/07/28 00:04:59; author: ianmacd; state: Exp; lines: +2 -2 - -evince command was missing ----------------------------- -revision 1.828 -date: 2005/07/24 08:12:41; author: ianmacd; state: Exp; lines: +3 -2 - -Allow evince to complete on wider variety of files (from Vijay Durairaj -) ----------------------------- -revision 1.827 -date: 2005/07/21 19:21:22; author: ianmacd; state: Exp; lines: +2 -2 - -Bumped release to 20050721. ----------------------------- -revision 1.826 -date: 2005/07/21 01:43:47; author: ianmacd; state: Exp; lines: +4 -4 - -MPlayer options should now use dashes, not underscores. (Thanks to Guillaume -Rousse ) ----------------------------- -revision 1.825 -date: 2005/07/21 01:26:01; author: ianmacd; state: Exp; lines: +27 -3 - -Extended mc completion by Guillaume Rousse . ----------------------------- -revision 1.824 -date: 2005/07/21 01:20:36; author: ianmacd; state: Exp; lines: +11 -5 - -lilo completion fix from Guillaume Rousse . ----------------------------- -revision 1.823 -date: 2005/07/21 01:09:27; author: ianmacd; state: Exp; lines: +2 -2 - -Not sure why we had that superfluous echo in there. Perhaps it was to work -around a bug in older versions of bash. ----------------------------- -revision 1.822 -date: 2005/07/21 00:57:24; author: ianmacd; state: Exp; lines: +30 -7 - -iwconfig improvements by Guillaume Rousse ----------------------------- -revision 1.821 -date: 2005/07/21 00:54:36; author: ianmacd; state: Exp; lines: +3 -3 - -Fix up tcpdump and dhclient completion to use correct interfaces function -(patch by Guillaume Rousse ) ----------------------------- -revision 1.820 -date: 2005/07/21 00:40:14; author: ianmacd; state: Exp; lines: +4 -4 - -Turn off expansion disabling in _filedir(), as this has the annoying -side-effect of cancelling alias expansion for a given invocation of a command. ----------------------------- -revision 1.819 -date: 2005/07/20 07:41:41; author: ianmacd; state: Exp; lines: +2 -2 - -Version bumped to 20050720. ----------------------------- -revision 1.818 -date: 2005/07/19 17:38:39; author: ianmacd; state: Exp; lines: +6 -3 - -- evince completion for .pdf files. -- More OpenOffice 2 completions - -This patch from Horst von Brand via Ville Skytt� . ----------------------------- -revision 1.817 -date: 2005/07/19 06:32:31; author: ianmacd; state: Exp; lines: +8 -8 - -Fix up patterns for tarball matching (patch by Ville Skytt� -). ----------------------------- -revision 1.816 -date: 2005/07/19 06:28:48; author: ianmacd; state: Exp; lines: +4 -4 - -Add completion for xine front-ends, plus kplayer/mplayer (patch by Ville -Skytt� ). ----------------------------- -revision 1.815 -date: 2005/07/12 19:13:02; author: ianmacd; state: Exp; lines: +2 -2 - -Minor brace fix. ----------------------------- -revision 1.814 -date: 2005/07/12 16:32:54; author: ianmacd; state: Exp; lines: +3 -3 - -Bump version to 20050712. ----------------------------- -revision 1.813 -date: 2005/07/12 07:28:08; author: ianmacd; state: Exp; lines: +9 -7 - -Make mutt completion also work for muttng (patch by Marcin Kryczek -). ----------------------------- -revision 1.812 -date: 2005/07/12 07:22:57; author: ianmacd; state: Exp; lines: +3 -3 - -tar 1.15.1 can unpack compressed archives, even if [IZzjy] are not given -(patch by Aaron Walker ). ----------------------------- -revision 1.811 -date: 2005/07/12 06:50:25; author: ianmacd; state: Exp; lines: +7 -2 - -Fix _filedir(), so that literal filenames that appear to be glob patterns are -not treated as such (patch by Claudio Bley ). ----------------------------- -revision 1.810 -date: 2005/07/12 00:24:19; author: ianmacd; state: Exp; lines: +2 -1 - -rpm2cpio completion (thanks to Guillaume Rousse ). ----------------------------- -revision 1.809 -date: 2005/07/12 00:23:30; author: ianmacd; state: Exp; lines: +42 -26 - -User and group factorisation patch from Guillaume Rousse -. ----------------------------- -revision 1.808 -date: 2005/07/12 00:21:13; author: ianmacd; state: Exp; lines: +32 -1 - -ntpdate completion by Guillaume Rousse . ----------------------------- -revision 1.807 -date: 2005/07/12 00:20:16; author: ianmacd; state: Exp; lines: +46 -1 - -getent completion by Guillaume Rousse . ----------------------------- -revision 1.806 -date: 2005/07/12 00:19:05; author: ianmacd; state: Exp; lines: +20 -1 - -id completion by Guillaume Rousse . ----------------------------- -revision 1.805 -date: 2005/07/12 00:18:01; author: ianmacd; state: Exp; lines: +112 -1 - -cpio completion by Guillaume Rousse . ----------------------------- -revision 1.804 -date: 2005/07/11 23:38:42; author: ianmacd; state: Exp; lines: +3 -3 - -More extensions for MPlayer (patch by Aaron Walker ). ----------------------------- -revision 1.803 -date: 2005/07/11 23:36:59; author: ianmacd; state: Exp; lines: +3 -2 - -Accept .rmi as an extension for Timidity (patch by Aaron Walker -). ----------------------------- -revision 1.802 -date: 2005/07/11 23:36:17; author: ianmacd; state: Exp; lines: +7 -7 - -Use sed instead of awk in LVM completion (patch by Aaron Walker -) ----------------------------- -revision 1.801 -date: 2005/07/08 04:20:58; author: ianmacd; state: Exp; lines: +6 -6 - -Avoid exit status of 1 when reassigning read-only variables. ----------------------------- -revision 1.800 -date: 2005/07/08 01:47:14; author: ianmacd; state: Exp; lines: +9 -15 - -Simplify definition of BASH_COMPLETION and BASH_COMPLETION_DIR variables. ----------------------------- -revision 1.799 -date: 2005/07/08 01:36:51; author: ianmacd; state: Exp; lines: +162 -162 - -Remove checks of $have by compounding complete commands after function -definitions. ----------------------------- -revision 1.798 -date: 2005/07/07 23:43:25; author: ianmacd; state: Exp; lines: +135 -135 - -Move _lvm() completion to end of all LVM commands. ----------------------------- -revision 1.797 -date: 2005/07/07 23:41:15; author: ianmacd; state: Exp; lines: +3 -6 - -Installation of info completion should not depend on OS. ----------------------------- -revision 1.796 -date: 2005/07/07 23:35:09; author: ianmacd; state: Exp; lines: +3 -3 - -make completion should also work for gnumake. ----------------------------- -revision 1.795 -date: 2005/07/07 23:09:39; author: ianmacd; state: Exp; lines: +12 -16 - -Don't define _pids() and _pgids() twice on Solaris and AIX. ----------------------------- -revision 1.794 -date: 2005/07/07 22:11:38; author: ianmacd; state: Exp; lines: +7 -7 - -Fix scp completion when filename contains shell metacharacters. (Patch from -Markus Wiederkehr ). ----------------------------- -revision 1.793 -date: 2005/07/07 22:07:00; author: ianmacd; state: Exp; lines: +2 -2 - -Add .rmbv file extension to MPlayer completion. (Thanks to Joseph Yen -) ----------------------------- -revision 1.792 -date: 2005/07/07 21:52:03; author: ianmacd; state: Exp; lines: +4 -4 - -Support the new open document formats of OpenOffice 2.0. (patch from Hanno -B�ck ) ----------------------------- -revision 1.791 -date: 2005/07/07 21:45:26; author: ianmacd; state: Exp; lines: +2 -2 - -Use -o filenames for rsync completion. ----------------------------- -revision 1.790 -date: 2005/02/08 21:50:01; author: ianmacd; state: Exp; lines: +3 -3 - -Minor CVS fix from "Samuel J. Irlapati" . ----------------------------- -revision 1.789 -date: 2005/02/03 09:12:44; author: ianmacd; state: Exp; lines: +2 -2 - -- Minor fix to xscreensaver completion. ----------------------------- -revision 1.788 -date: 2005/01/25 10:11:02; author: ianmacd; state: Exp; lines: +2 -2 - -- Support more MPlayer subtitle types. (Thanks to justus schwartz - ) ----------------------------- -revision 1.787 -date: 2005/01/25 01:41:25; author: ianmacd; state: Exp; lines: +2 -2 - -- Remove w3m from commands that complete on .html files, as it's now a more - general file browser. (Debian #291359) ----------------------------- -revision 1.786 -date: 2005/01/21 22:29:49; author: ianmacd; state: Exp; lines: +5 -2 - -- Fix broken sudo completion. -- Bump version to 20050121 ----------------------------- -revision 1.785 -date: 2005/01/20 10:10:00; author: ianmacd; state: Exp; lines: +2 -2 - -- Bump version to 20050120. ----------------------------- -revision 1.784 -date: 2005/01/19 04:41:36; author: ianmacd; state: Exp; lines: +45 -15 - -- Improve ssh2 known hosts completion. (Debian bug #282767) ----------------------------- -revision 1.783 -date: 2005/01/19 04:22:03; author: ianmacd; state: Exp; lines: +2 -2 - -- Remove xargs from list of commands that do longopts completion. xargs - now does completion like sudo, exec, nice, strace, etc. ----------------------------- -revision 1.782 -date: 2005/01/19 04:19:45; author: ianmacd; state: Exp; lines: +19 -7 - -- Pass over switches to metacommands like sudo, nice, exec, etc. - (Debian bug #289847) ----------------------------- -revision 1.781 -date: 2005/01/16 19:10:51; author: ianmacd; state: Exp; lines: +2 -2 - -- Trivial fix to allow python to be called with a path component without - bash displaying a bad subscript error. (Debian bug #290748) ----------------------------- -revision 1.780 -date: 2005/01/16 18:44:15; author: ianmacd; state: Exp; lines: +2 -2 - -- unzip should also work on .sxw files. (Debian bug #286738) ----------------------------- -revision 1.779 -date: 2005/01/16 18:42:01; author: ianmacd; state: Exp; lines: +10 -5 - -- Lots of commands that use _longopts() don't use filenames at all, so - these shouldn't be mapped with '-o filenames'. (Debian bug #283069, which - related only to wget) ----------------------------- -revision 1.778 -date: 2005/01/16 18:27:29; author: ianmacd; state: Exp; lines: +4 -4 - -- Make dd treat completions as filenames, which is bad for options, but - good for filename arguments to 'if' and 'of'. (Debian bug #287286) ----------------------------- -revision 1.777 -date: 2005/01/16 18:12:27; author: ianmacd; state: Exp; lines: +2 -2 - -- Fix lvresize errors when running as non-root (Debian #285604) ----------------------------- -revision 1.776 -date: 2005/01/13 02:22:45; author: ianmacd; state: Exp; lines: +34 -34 - -- Bump version to 20050112 ----------------------------- -revision 1.775 -date: 2005/01/12 22:45:16; author: ianmacd; state: Exp; lines: +7 -3 - -- Make completion work for chown/chgrp when group names contain spaces. - Patch by Robin Rosenberg ----------------------------- -revision 1.774 -date: 2005/01/10 23:39:56; author: ianmacd; state: Exp; lines: +133 -80 - -- Wireless tools completion improvements by Guillaume Rousse - ----------------------------- -revision 1.773 -date: 2005/01/04 23:35:41; author: ianmacd; state: Exp; lines: +2 -1 - -- Make location of openssl.cnf somewhat more flexible (patch by - Ville Skytt� ) ----------------------------- -revision 1.772 -date: 2005/01/04 06:37:42; author: ianmacd; state: Exp; lines: +2 -2 - -- Update version to 20050103. ----------------------------- -revision 1.771 -date: 2005/01/03 05:38:41; author: ianmacd; state: Exp; lines: +472 -4 - -- Complete rewrite of openssl(1) completion by Guillaume Rousse - . ----------------------------- -revision 1.770 -date: 2005/01/03 05:31:38; author: ianmacd; state: Exp; lines: +28 -1 - -- pkg-config completion by Guillaume Rousse . ----------------------------- -revision 1.769 -date: 2005/01/03 03:42:12; author: ianmacd; state: Exp; lines: +6 -1 - -- Cygwin patch for mount and minor find (fstab) robustness fix by - Reini Urban ----------------------------- -revision 1.768 -date: 2005/01/03 03:11:55; author: ianmacd; state: Exp; lines: +22 -12 - -- Completion for alternate Makefile paths by Christoph Gysin . ----------------------------- -revision 1.767 -date: 2005/01/03 02:51:15; author: ianmacd; state: Exp; lines: +2 -1 - -- ps2pdf completion by Volker Stolz . ----------------------------- -revision 1.766 -date: 2005/01/03 02:35:57; author: ianmacd; state: Exp; lines: +70 -1 - -- mkinitrd completion by Guillaume Rousse . ----------------------------- -revision 1.765 -date: 2005/01/03 02:24:14; author: ianmacd; state: Exp; lines: +13 -8 - -- modprobe factorisation patch by Guillaume Rousse . ----------------------------- -revision 1.764 -date: 2005/01/03 02:02:16; author: ianmacd; state: Exp; lines: +67 -1 - -- Wireless tools patch by Guillaume Rousse ----------------------------- -revision 1.763 -date: 2005/01/03 00:53:47; author: ianmacd; state: Exp; lines: +12 -5 - -- cvs(1) completion fixes from Richard L�rk�ng . ----------------------------- -revision 1.762 -date: 2005/01/03 00:48:27; author: ianmacd; state: Exp; lines: +8 -3 - -- Add ,v files to list rcs(1) can complete on. From Ed Catmur - via Aaron Walker . ----------------------------- -revision 1.761 -date: 2004/11/22 21:20:43; author: ianmacd; state: Exp; lines: +3 -3 - -- make sure unaliased grep is used in a couple of places. This really needs - to be performed throughout the file, everywhere where an external command - (or even a built-in) is called. ----------------------------- -revision 1.760 -date: 2004/10/24 19:01:56; author: ianmacd; state: Exp; lines: +3 -3 - -- fixes for completing RealAudio files (patch by Peter Adolphs - ) ----------------------------- -revision 1.759 -date: 2004/10/19 05:51:04; author: ianmacd; state: Exp; lines: +4 -4 - -- make screen completion include the socket part of session names (patch by - John Russell ) ----------------------------- -revision 1.758 -date: 2004/10/17 08:25:34; author: ianmacd; state: Exp; lines: +2 -2 - -- bumped version to 20041017 ----------------------------- -revision 1.757 -date: 2004/10/15 18:27:22; author: ianmacd; state: Exp; lines: +3 -2 - -- properly unset $have at end of sourcing ----------------------------- -revision 1.756 -date: 2004/10/15 07:51:09; author: ianmacd; state: Exp; lines: +4 -6 - -- scp completion was still broken for file names, both local and remote, that - contained shell metacharacters. ----------------------------- -revision 1.755 -date: 2004/10/15 07:30:00; author: ianmacd; state: Exp; lines: +2 -2 - -- fix gzip with files whose names contain spaces ----------------------------- -revision 1.754 -date: 2004/10/15 06:47:39; author: ianmacd; state: Exp; lines: +7 -7 - -- rename _comp-dpkg-installed-packages() to _comp_dpkg_installed_packages() - to comply with POSIX.2 shell function naming ----------------------------- -revision 1.753 -date: 2004/10/15 06:42:27; author: ianmacd; state: Exp; lines: +2 -2 - -- make talk, ytalk and finger not add a suffix of '@' after completing a user - name. This makes same-host completion more pleasant. ----------------------------- -revision 1.752 -date: 2004/10/14 16:57:41; author: ianmacd; state: Exp; lines: +3 -3 - -- apt-cache improvements from savar@gmx.de ----------------------------- -revision 1.751 -date: 2004/10/14 09:31:18; author: ianmacd; state: Exp; lines: +2 -2 - -- add .miff as an extension for display completion ----------------------------- -revision 1.750 -date: 2004/10/14 09:24:15; author: ianmacd; state: Exp; lines: +10 -4 - -- process targets in included Makefiles during make completion (patch by - Christoph Gysin ) ----------------------------- -revision 1.749 -date: 2004/10/14 09:14:12; author: ianmacd; state: Exp; lines: +5 -5 - -- quote bash completion location variables for safety (paths containing spaces - would be problematic) ----------------------------- -revision 1.748 -date: 2004/10/14 09:10:11; author: ianmacd; state: Exp; lines: +3 -9 - -- some more minor tidying ----------------------------- -revision 1.747 -date: 2004/10/14 09:08:33; author: ianmacd; state: Exp; lines: +6 -4 - -- tidy up screen completion ----------------------------- -revision 1.746 -date: 2004/10/14 08:54:55; author: ianmacd; state: Exp; lines: +3 -3 - -- test for dhclient before installing its completion function ----------------------------- -revision 1.745 -date: 2004/10/14 08:52:14; author: ianmacd; state: Exp; lines: +1163 -1 - -- new dhclient and lvm completion by Guillaume Rousse ----------------------------- -revision 1.744 -date: 2004/10/13 20:58:48; author: ianmacd; state: Exp; lines: +4 -4 - -- fix scp completion breakage when filenames contained an ampersand ----------------------------- -revision 1.743 -date: 2004/10/08 16:31:28; author: ianmacd; state: Exp; lines: +3 -4 - -- fix sed error on service completion ----------------------------- -revision 1.742 -date: 2004/09/30 09:48:57; author: ianmacd; state: Exp; lines: +3 -3 - -- add kghostview and kpdf for PostScript and PDF files ----------------------------- -revision 1.741 -date: 2004/09/20 15:58:30; author: ianmacd; state: Exp; lines: +2 -2 - -- allow mplayer to complete on .dv files ----------------------------- -revision 1.740 -date: 2004/07/23 00:41:37; author: ianmacd; state: Exp; lines: +2 -2 - -- grep doesn't support -q on Solaris, so send to /dev/null instead (reported - by Chris Dennis ) ----------------------------- -revision 1.739 -date: 2004/07/19 08:45:15; author: ianmacd; state: Exp; lines: +5 -4 - -- CVS completion fix by Ville Skytt� , to allow better - handling of files and dirs whose names contain whitespace ----------------------------- -revision 1.738 -date: 2004/07/19 08:43:10; author: ianmacd; state: Exp; lines: +10 -9 - -- rpm completion fix from Ville Skytt� to avoid - "--nodigest --nosignatures" being passed as a single option. ----------------------------- -revision 1.737 -date: 2004/07/11 18:36:39; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20040711 ----------------------------- -revision 1.736 -date: 2004/07/11 18:18:24; author: ianmacd; state: Exp; lines: +3 -3 - -- eliminate use of grep in _filedir_xspec() (patch by Claudio Bley - ) ----------------------------- -revision 1.735 -date: 2004/07/06 06:10:33; author: ianmacd; state: Exp; lines: +2 -2 - -- minor fix to mutt completion ----------------------------- -revision 1.734 -date: 2004/07/05 23:45:00; author: ianmacd; state: Exp; lines: +6 -5 - -- fix for dpkg completion (patch by Itay Ben-Yaacov ) ----------------------------- -revision 1.733 -date: 2004/07/05 23:35:36; author: ianmacd; state: Exp; lines: +2 -2 - -- allow symbolic links in /etc/bash_completion.d (patch by Ville Skytt� - ) ----------------------------- -revision 1.732 -date: 2004/07/05 23:31:47; author: ianmacd; state: Exp; lines: +3 -3 - -- improve insmod, modinfo etc completion with path names (patch by Ville - Skytt� ) ----------------------------- -revision 1.731 -date: 2004/07/04 01:47:31; author: ianmacd; state: Exp; lines: +2 -2 - -- release updated to 20040704 ----------------------------- -revision 1.730 -date: 2004/07/04 01:40:08; author: ianmacd; state: Exp; lines: +3 -3 - -- '[' must come first in character classes for sed 4.1. _configure() needed to - be fixed. ----------------------------- -revision 1.729 -date: 2004/07/04 01:15:29; author: ianmacd; state: Exp; lines: +15 -4 - -mark-directories and mark-symlinked-directories are very convenient readline -settings which append a slash to a completed directory/symlinked directory. -Unfortunately, this doesn't work with directories found by looking at $CDPATH. - -There is now also a slash appended if the user completes on an unambiguous -directory found by looking at $CDPATH. - -Patch by Claudio Bley . ----------------------------- -revision 1.728 -date: 2004/07/04 00:56:08; author: ianmacd; state: Exp; lines: +10 -1 - -- add _rl_enabled() to detect whether a given readline variable is on. (patch - by Claudio Bley ) ----------------------------- -revision 1.727 -date: 2004/07/04 00:51:18; author: ianmacd; state: Exp; lines: +21 -1 - -- pgrep and pidof completion by "Peter K. Jensen" ----------------------------- -revision 1.726 -date: 2004/07/04 00:31:33; author: ianmacd; state: Exp; lines: +9 -3 - -- use getent for UID and GID completion when available (based on a patch from - Guillaume Rousse ) ----------------------------- -revision 1.725 -date: 2004/07/04 00:26:29; author: ianmacd; state: Exp; lines: +9 -4 - -- allow service completion to work on xinetd services (patch by Guillaume - Rousse ) ----------------------------- -revision 1.724 -date: 2004/07/04 00:23:57; author: ianmacd; state: Exp; lines: +3 -2 - -- fix some spurious warnings in CVS completion (patch by Guillaume Rousse - ) ----------------------------- -revision 1.723 -date: 2004/07/04 00:20:34; author: ianmacd; state: Exp; lines: +3 -29 - -- use --dump-options with gpg to get viable options (much cleaner than listing - them all) (patch by Andreas Seltenreich ) ----------------------------- -revision 1.722 -date: 2004/07/04 00:11:09; author: ianmacd; state: Exp; lines: +8 -2 - -- fix mutt completion so that leading '=' character is handled properly - (patch from Joe Nahmias ) ----------------------------- -revision 1.721 -date: 2004/07/04 00:03:19; author: ianmacd; state: Exp; lines: +3 -2 - -- allow Emacs to complete on archives (patch from Fr�d�ric Bothamy - ) ----------------------------- -revision 1.720 -date: 2004/07/04 00:01:03; author: ianmacd; state: Exp; lines: +2 -2 - -- add autossh to list of commands that perform _ssh() completion ----------------------------- -revision 1.719 -date: 2004/06/18 07:40:28; author: ianmacd; state: Exp; lines: +3 -3 - -- properly complete on .Z files during tar completion ----------------------------- -revision 1.718 -date: 2004/06/14 07:59:41; author: ianmacd; state: Exp; lines: +2 -2 - -- add ssh-installkeys to list of programs that use known host completion - (Josh Glover ) ----------------------------- -revision 1.717 -date: 2004/06/14 07:56:58; author: ianmacd; state: Exp; lines: +4 -1 - -- Various OpenOffice completions from Ian Redfern ----------------------------- -revision 1.716 -date: 2004/06/01 08:08:18; author: ianmacd; state: Exp; lines: +15 -1 - -- fix PID completion for AIX and Solaris. Patch by Benjamin Floering - ----------------------------- -revision 1.715 -date: 2004/06/01 08:02:57; author: ianmacd; state: Exp; lines: +22 -9 - -- update to aptitude completion by Rafael Sepulveda ----------------------------- -revision 1.714 -date: 2004/05/26 07:20:56; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20040526 ----------------------------- -revision 1.713 -date: 2004/05/26 07:15:28; author: ianmacd; state: Exp; lines: +56 -2 - -- info completion by Matt Perry ----------------------------- -revision 1.712 -date: 2004/05/24 09:50:30; author: ianmacd; state: Exp; lines: +23 -18 - -- chkconfig factorisation and improvements by - Guillaume Rousse ----------------------------- -revision 1.711 -date: 2004/05/24 09:44:44; author: ianmacd; state: Exp; lines: +24 -2 - -- xmms(1) gets its own completion function. - Patch by Guillaume Rousse ----------------------------- -revision 1.710 -date: 2004/05/24 09:43:21; author: ianmacd; state: Exp; lines: +2 -2 - -- use filenames by default for cdrecord completion ----------------------------- -revision 1.709 -date: 2004/05/24 09:42:32; author: ianmacd; state: Exp; lines: +101 -1 - -- aspell completion by Guillaume Rousse ----------------------------- -revision 1.708 -date: 2004/05/24 09:12:31; author: ianmacd; state: Exp; lines: +8 -1 - -- add SuSE support for ifup/down and ifstatus, if present. Patch from - Jonathan ----------------------------- -revision 1.707 -date: 2004/05/24 09:00:23; author: ianmacd; state: Exp; lines: +20 -21 - -- improvement to _update_alternatives() by Ville Skytt� ----------------------------- -revision 1.706 -date: 2004/05/24 08:28:20; author: ianmacd; state: Exp; lines: +3 -3 - -- minor fix to _command() to allow leading whitespace on the command line ----------------------------- -revision 1.705 -date: 2004/05/20 06:40:59; author: ianmacd; state: Exp; lines: +3 -3 - -- dpkg -P is not recognised or completed. Fix from Paul Brook ----------------------------- -revision 1.704 -date: 2004/05/16 00:07:21; author: ianmacd; state: Exp; lines: +2 -2 - -- don't allow aliases for grep to be used during make completion ----------------------------- -revision 1.703 -date: 2004/05/16 00:01:29; author: ianmacd; state: Exp; lines: +2 -2 - -- make mutt file completion actually work after redirection ----------------------------- -revision 1.702 -date: 2004/05/15 23:58:30; author: ianmacd; state: Exp; lines: +7 -7 - -- fix mutt sed errors after redirection ----------------------------- -revision 1.701 -date: 2004/05/11 18:06:08; author: ianmacd; state: Exp; lines: +4 -1 - -- builtin completes on builtins ----------------------------- -revision 1.700 -date: 2004/03/31 17:45:32; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20040331 ----------------------------- -revision 1.699 -date: 2004/03/30 23:21:51; author: ianmacd; state: Exp; lines: +2 -2 - -- remove links from list of commands that complete on .html ----------------------------- -revision 1.698 -date: 2004/03/30 23:16:24; author: ianmacd; state: Exp; lines: +2 -2 - -- mplayer file extension additions from Michael Spurlock ----------------------------- -revision 1.697 -date: 2004/03/30 23:01:33; author: ianmacd; state: Exp; lines: +15 -1 - -- CUPS cancel(1) completion by Jean-Baptiste Quenot ----------------------------- -revision 1.696 -date: 2004/03/30 22:17:15; author: ianmacd; state: Exp; lines: +2 -2 - -- minor mkisofs fix ----------------------------- -revision 1.695 -date: 2004/03/30 22:16:07; author: ianmacd; state: Exp; lines: +2 -2 - -- add amaya to list of browsers ----------------------------- -revision 1.694 -date: 2004/03/30 22:15:33; author: ianmacd; state: Exp; lines: +3 -3 - -- _comp-dpkg-installed-packages() was not returning packages designated - 'essential' ----------------------------- -revision 1.693 -date: 2004/03/30 22:12:09; author: ianmacd; state: Exp; lines: +26 -8 - -- allow cvs completion to handle the various sub-command abbreviataions, such - as 'di' for 'diff', etc. (patch from Chris Halls ) ----------------------------- -revision 1.692 -date: 2004/03/30 21:02:46; author: ianmacd; state: Exp; lines: +12 -5 - -- fix man and cc completion for Cygwin (patch by Mike Wittman - ) ----------------------------- -revision 1.691 -date: 2004/02/25 04:03:28; author: ianmacd; state: Exp; lines: +3 -3 - -- some versions of bash don't like function names containing hyphens ----------------------------- -revision 1.690 -date: 2004/02/15 03:45:21; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20040214 ----------------------------- -revision 1.689 -date: 2004/02/14 10:28:58; author: ianmacd; state: Exp; lines: +3 -4 - -- big speed up for dpkg completion (patch from Philipp Weis ) ----------------------------- -revision 1.688 -date: 2004/02/13 08:47:38; author: ianmacd; state: Exp; lines: +7 -3 - -- fix chsh completion to work on Debian ----------------------------- -revision 1.687 -date: 2004/02/13 08:27:24; author: ianmacd; state: Exp; lines: +3 -1 - -- fix for ant completion by Itamar Almeida de Carvalho ----------------------------- -revision 1.686 -date: 2004/02/13 08:24:42; author: ianmacd; state: Exp; lines: +2 -2 - -- make 'make -f' completion work properly (fix from - Matthew Cheetah Gabeler-Lee ----------------------------- -revision 1.685 -date: 2004/02/12 21:48:32; author: ianmacd; state: Exp; lines: +2 -2 - -- don't unset $have twice at end of script (fix from - Salve Nilsen ) ----------------------------- -revision 1.684 -date: 2004/02/12 21:37:39; author: ianmacd; state: Exp; lines: +2 -2 - -- fix up a continuation error in _filedir() ----------------------------- -revision 1.683 -date: 2004/02/10 09:33:22; author: ianmacd; state: Exp; lines: +2 -2 - -- update to release 20040210 ----------------------------- -revision 1.682 -date: 2004/02/09 22:12:40; author: ianmacd; state: Exp; lines: +2 -2 - -- make apt-cache know about the rdepends option - (patch by Vince ) ----------------------------- -revision 1.681 -date: 2004/02/09 22:06:01; author: ianmacd; state: Exp; lines: +3 -2 - -- install yum-arch completion only if we also have yum ----------------------------- -revision 1.680 -date: 2004/02/09 22:02:48; author: ianmacd; state: Exp; lines: +34 -1 - -- dd completion by Andrew Taylor ----------------------------- -revision 1.679 -date: 2004/02/09 21:57:31; author: ianmacd; state: Exp; lines: +3 -3 - -- xine and mplayer can complete on .VOB files (previously, only .vob was - supported) ----------------------------- -revision 1.678 -date: 2004/02/09 21:52:35; author: ianmacd; state: Exp; lines: +3 -2 - -- make xspec parsing immune to comments (Debian bug #226812) - (fix by Immanuel Halupczok ) ----------------------------- -revision 1.677 -date: 2004/02/09 21:40:41; author: ianmacd; state: Exp; lines: +4 -9 - -- stop things like 'sudo mount' from returning all possible completions - as a single argument. - - Sigh. I no longer understand this function and I'm sure this has now - broken something else. This is simply impossible to get right. Shell - was never meant for anything this complicated. :-( - - The breakage seems to have been introduced as part of 1.577. ----------------------------- -revision 1.676 -date: 2004/02/09 20:57:10; author: ianmacd; state: Exp; lines: +2 -2 - -- allow mplayer to complete on .m2v files, too ----------------------------- -revision 1.675 -date: 2004/02/09 20:52:56; author: ianmacd; state: Exp; lines: +5 -2 - -- make export completion do proper quoting when completing a variable's - value (patch from Andreas Seltenreich ----------------------------- -revision 1.674 -date: 2004/02/09 20:50:56; author: ianmacd; state: Exp; lines: +7 -4 - -- add 'up' as a synonym to 'update' in CVS completion (patch from - Ville Skytt� ----------------------------- -revision 1.673 -date: 2004/02/09 20:49:11; author: ianmacd; state: Exp; lines: +2 -2 - -- xine can also complete on .asx files ----------------------------- -revision 1.672 -date: 2004/01/01 07:39:28; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20040101 ----------------------------- -revision 1.671 -date: 2004/01/01 01:18:21; author: ianmacd; state: Exp; lines: +2 -2 - -- avoid pulling in .rpm* files from $BASH_COMPLETION_DIR/* - (fix by Ville Skytt� ) ----------------------------- -revision 1.670 -date: 2004/01/01 00:58:30; author: ianmacd; state: Exp; lines: +18 -1 - -- Postfix completion enhancement by Michael G ----------------------------- -revision 1.669 -date: 2004/01/01 00:51:46; author: ianmacd; state: Exp; lines: +16 -11 - -- wvdial patch from Guillaume Rousse ----------------------------- -revision 1.668 -date: 2004/01/01 00:48:05; author: ianmacd; state: Exp; lines: +4 -3 - -- FreeBSD portinstall fix from Jean-Baptiste Quenot ----------------------------- -revision 1.667 -date: 2003/12/24 23:19:13; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20031225 ----------------------------- -revision 1.666 -date: 2003/12/24 16:11:43; author: ianmacd; state: Exp; lines: +2 -2 - -- ogg123 can now handle .flac and .spx files ----------------------------- -revision 1.665 -date: 2003/12/15 19:02:22; author: ianmacd; state: Exp; lines: +53 -21 - -- mutt completion improvements by Rodrigo Bernardo Pimentel ----------------------------- -revision 1.664 -date: 2003/12/15 18:57:49; author: ianmacd; state: Exp; lines: +8 -2 - -- more improvements to find(1) completion by Rodrigo Bernardo Pimentel - ----------------------------- -revision 1.663 -date: 2003/12/15 18:54:17; author: ianmacd; state: Exp; lines: +2 -2 - -- forgot to update release ----------------------------- -revision 1.662 -date: 2003/12/15 09:49:51; author: ianmacd; state: Exp; lines: +13 -7 - -- find(1) completion improvements by Rodrigo Bernardo Pimentel - ----------------------------- -revision 1.661 -date: 2003/12/15 09:42:50; author: ianmacd; state: Exp; lines: +376 -3 - -- ImageMagick completion by Guillaume Rousse ----------------------------- -revision 1.660 -date: 2003/12/15 09:30:23; author: ianmacd; state: Exp; lines: +54 -54 - -- replace some white space ----------------------------- -revision 1.659 -date: 2003/12/15 09:09:01; author: ianmacd; state: Exp; lines: +2 -2 - -- allow gpdf to complete on PDF files ----------------------------- -revision 1.658 -date: 2003/12/12 11:10:49; author: ianmacd; state: Exp; lines: +8 -7 - -- apt-cache completion updates from Danilo Piazzalunga - ----------------------------- -revision 1.657 -date: 2003/11/25 19:07:20; author: ianmacd; state: Exp; lines: +2 -2 - -- update version to 20031125 ----------------------------- -revision 1.656 -date: 2003/11/25 18:37:37; author: ianmacd; state: Exp; lines: +97 -1 - -- first cut at mutt completion by Rodrigo Bernardo Pimentel ----------------------------- -revision 1.655 -date: 2003/11/19 19:11:25; author: ianmacd; state: Exp; lines: +2 -2 - -- user completion for w(1) ----------------------------- -revision 1.654 -date: 2003/11/15 08:59:13; author: ianmacd; state: Exp; lines: +52 -31 - -- yum completion improvements from Haakon Nilsen ----------------------------- -revision 1.653 -date: 2003/11/12 10:20:42; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20031112 ----------------------------- -revision 1.652 -date: 2003/11/12 10:19:52; author: ianmacd; state: Exp; lines: +4 -1 - -- default to file completion in perldoc, if current parameter contains - a slash ----------------------------- -revision 1.651 -date: 2003/11/12 10:10:52; author: ianmacd; state: Exp; lines: +4 -3 - -- further bogus matches removed from makefile completion ----------------------------- -revision 1.650 -date: 2003/11/05 19:41:32; author: ianmacd; state: Exp; lines: +2 -2 - -- add .aac and .mp4 support to mplayer ----------------------------- -revision 1.649 -date: 2003/11/04 00:27:29; author: ianmacd; state: Exp; lines: +3 -4 - -- remove bogus targets from make completion ----------------------------- -revision 1.648 -date: 2003/11/03 23:33:01; author: ianmacd; state: Exp; lines: +2 -2 - -- add support for matroska files to mplayer ----------------------------- -revision 1.647 -date: 2003/11/03 23:28:55; author: ianmacd; state: Exp; lines: +14 -1 - -- rpm -qf improvement by G�tz Waschk ----------------------------- -revision 1.646 -date: 2003/11/02 21:19:46; author: ianmacd; state: Exp; lines: +3 -1 - -- gzip should complete on .gz files after redirection ----------------------------- -revision 1.645 -date: 2003/10/30 22:40:28; author: ianmacd; state: Exp; lines: +2 -2 - -- bash 'command' built-in should also complete on commands ----------------------------- -revision 1.644 -date: 2003/10/22 09:16:51; author: ianmacd; state: Exp; lines: +2 -2 - -- update version to 20031022 ----------------------------- -revision 1.643 -date: 2003/10/20 21:07:58; author: ianmacd; state: Exp; lines: +2 -2 - -- another unbound variable warning removed ----------------------------- -revision 1.642 -date: 2003/10/20 21:05:20; author: ianmacd; state: Exp; lines: +7 -3 - -- add URL for latest version of software ----------------------------- -revision 1.641 -date: 2003/10/17 08:51:32; author: ianmacd; state: Exp; lines: +3 -3 - -- add completion for vsound and really ----------------------------- -revision 1.640 -date: 2003/10/17 08:26:39; author: ianmacd; state: Exp; lines: +4 -3 - -- FreeBSD portinstall speed improvements from - Jean-Baptiste Quenot ----------------------------- -revision 1.639 -date: 2003/10/17 08:24:30; author: ianmacd; state: Exp; lines: +2 -2 - -- ee and display also complete on .pcx files ----------------------------- -revision 1.638 -date: 2003/10/08 03:12:27; author: ianmacd; state: Exp; lines: +3 -3 - -- yum and yum-arch now use -o filenames ----------------------------- -revision 1.637 -date: 2003/10/07 08:50:16; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20031007 ----------------------------- -revision 1.636 -date: 2003/10/07 08:42:33; author: ianmacd; state: Exp; lines: +18 -40 - -- more bash 3.x compatibility fixes ----------------------------- -revision 1.635 -date: 2003/10/07 08:17:33; author: ianmacd; state: Exp; lines: +65 -1 - -- yum(8) and yum-arch(8) completion by Ville Skytt� ----------------------------- -revision 1.634 -date: 2003/10/07 08:02:00; author: ianmacd; state: Exp; lines: +50 -14 - -- compatibility fixes for bash 3.x ----------------------------- -revision 1.633 -date: 2003/10/07 06:50:08; author: ianmacd; state: Exp; lines: +2 -2 - -- ggv can also handle .bz2 files ----------------------------- -revision 1.632 -date: 2003/10/07 06:47:55; author: ianmacd; state: Exp; lines: +10 -2 - -- iptables fixes from Alexander Davydenko ----------------------------- -revision 1.631 -date: 2003/10/07 06:45:03; author: ianmacd; state: Exp; lines: +7 -6 - -- minor IPSec fixes ----------------------------- -revision 1.630 -date: 2003/09/29 18:08:05; author: ianmacd; state: Exp; lines: +2 -2 - -- update version to 20030929 ----------------------------- -revision 1.629 -date: 2003/09/29 09:24:15; author: ianmacd; state: Exp; lines: +2 -2 - -- simple perl completion fix by Guillaume Rousse ----------------------------- -revision 1.628 -date: 2003/09/17 07:41:37; author: ianmacd; state: Exp; lines: +12 -17 - -- Java fixes from Markus Wiederkehr ----------------------------- -revision 1.627 -date: 2003/09/13 17:06:14; author: ianmacd; state: Exp; lines: +1 -250 - -- urpmi completion removed; it's now maintained separately by - Guillaume Rousse ----------------------------- -revision 1.626 -date: 2003/09/13 16:49:49; author: ianmacd; state: Exp; lines: +33 -7 - -- postsuper patch from Liviu Daia ----------------------------- -revision 1.625 -date: 2003/09/13 08:24:24; author: ianmacd; state: Exp; lines: +3 -3 - -- .m3u completion for relevant tools ----------------------------- -revision 1.624 -date: 2003/09/11 23:16:44; author: ianmacd; state: Exp; lines: +2 -2 - -- update version to 20030911 ----------------------------- -revision 1.623 -date: 2003/09/11 23:13:40; author: ianmacd; state: Exp; lines: +64 -9 - -- gzip and bzip2 rewrite by Liviu Daia ----------------------------- -revision 1.622 -date: 2003/09/11 23:04:10; author: ianmacd; state: Exp; lines: +2 -2 - -- really fix Java classpath thing ----------------------------- -revision 1.621 -date: 2003/09/11 00:50:30; author: ianmacd; state: Exp; lines: +5 -2 - -- fix service completion from completing on ~ and function files ----------------------------- -revision 1.620 -date: 2003/09/11 00:32:22; author: ianmacd; state: Exp; lines: +2 -2 - -- add .xpi files to unzip completion ----------------------------- -revision 1.619 -date: 2003/09/11 00:21:25; author: ianmacd; state: Exp; lines: +2 -2 - -- properly skip classpath string in Java completion ----------------------------- -revision 1.618 -date: 2003/08/22 07:12:51; author: ianmacd; state: Exp; lines: +3 -3 - -- minor ant completion fix by Bart Vanhaute ----------------------------- -revision 1.617 -date: 2003/08/21 09:55:40; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030821 ----------------------------- -revision 1.616 -date: 2003/08/19 18:52:31; author: ianmacd; state: Exp; lines: +2 -2 - -- bind pkill to same completion function as killall for now ----------------------------- -revision 1.615 -date: 2003/08/18 21:59:05; author: ianmacd; state: Exp; lines: +20 -1 - -- mc completion by Koblinger Egmont ----------------------------- -revision 1.614 -date: 2003/08/18 21:31:45; author: ianmacd; state: Exp; lines: +46 -6 - -- add postcat completion and make minor improvements to other Postfix - command completions (patch by Liviu Daia ) ----------------------------- -revision 1.613 -date: 2003/08/18 09:54:07; author: ianmacd; state: Exp; lines: +11 -16 - -- make chown completion work, whether or not the colon between user and - group name is escaped (fix from Oliver Kiddle ) ----------------------------- -revision 1.612 -date: 2003/08/18 09:33:29; author: ianmacd; state: Exp; lines: +2 -2 - -- allow rpm to complete on .nosrc.rpm packages ----------------------------- -revision 1.611 -date: 2003/08/17 17:21:48; author: ianmacd; state: Exp; lines: +2 -2 - -- xine can also play .wav files ----------------------------- -revision 1.610 -date: 2003/08/11 20:36:19; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030811 ----------------------------- -revision 1.609 -date: 2003/08/08 23:21:51; author: ianmacd; state: Exp; lines: +4 -4 - -- fix killall completion on bash 2.05a (by Liviu.Daia@imar.ro) ----------------------------- -revision 1.608 -date: 2003/08/05 17:41:40; author: ianmacd; state: Exp; lines: +18 -12 - -- more make completion fixes from Guillaume Rousse ----------------------------- -revision 1.607 -date: 2003/08/05 00:32:25; author: ianmacd; state: Exp; lines: +15 -5 - -- make _uids() and _gids() functions use Perl for getpwent(3) ----------------------------- -revision 1.606 -date: 2003/08/04 05:15:28; author: ianmacd; state: Exp; lines: +91 -5 - -- mkisofs completion by Guillaume Rousse ----------------------------- -revision 1.605 -date: 2003/08/04 01:40:25; author: ianmacd; state: Exp; lines: +7 -9 - -- minor reorganisation ----------------------------- -revision 1.604 -date: 2003/08/04 01:36:10; author: ianmacd; state: Exp; lines: +81 -3 - -- cdrecord completion by Guillaume Rousse ----------------------------- -revision 1.603 -date: 2003/08/03 04:02:32; author: ianmacd; state: Exp; lines: +3 -3 - -- update release to 20030803 ----------------------------- -revision 1.602 -date: 2003/08/03 03:23:26; author: ianmacd; state: Exp; lines: +2 -2 - -- stop vi et al from completing on Java .class files ----------------------------- -revision 1.601 -date: 2003/08/03 03:19:30; author: ianmacd; state: Exp; lines: +58 -50 - -- 'make' completion rewrite by Guillaume Rousse ----------------------------- -revision 1.600 -date: 2003/08/03 03:07:38; author: ianmacd; state: Exp; lines: +3 -3 - -- turn --targetbuildarch into --target and --buildarch in rpm completion -- rpm's --rebuild and --recompile can also use --target ----------------------------- -revision 1.599 -date: 2003/08/03 02:57:49; author: ianmacd; state: Exp; lines: +36 -13 - -- tcpdump fixes from Guillaume Rousse ----------------------------- -revision 1.598 -date: 2003/08/03 02:52:43; author: ianmacd; state: Exp; lines: +170 -15 - -- mplayer improvements from Ariel Fermani ----------------------------- -revision 1.597 -date: 2003/08/03 02:42:45; author: ianmacd; state: Exp; lines: +3 -1 - -- allow find completion to return filenames in addition to options if - completing on a null token ----------------------------- -revision 1.596 -date: 2003/07/29 04:19:03; author: ianmacd; state: Exp; lines: +5 -5 - -- some perldoc clean-up ----------------------------- -revision 1.595 -date: 2003/07/21 10:05:34; author: ianmacd; state: Exp; lines: +3 -3 - -- add --triggerscripts option to rpm completion ----------------------------- -revision 1.594 -date: 2003/07/21 07:59:24; author: ianmacd; state: Exp; lines: +2 -2 - -- update to 20030721 ----------------------------- -revision 1.593 -date: 2003/07/20 09:52:57; author: ianmacd; state: Exp; lines: +5 -5 - -- .shtml completion for browsers -- extra extension completions for xine and xanim -- vim et all should not complete on .gz and .bz2 files - (all of the above by Ariel Fermani ) ----------------------------- -revision 1.592 -date: 2003/07/20 09:45:06; author: ianmacd; state: Exp; lines: +26 -14 - -- mplayer fixes and improvements from Ariel Fermani - ----------------------------- -revision 1.591 -date: 2003/07/20 08:46:37; author: ianmacd; state: Exp; lines: +3 -3 - -- dselect fix by Ariel Fermani ----------------------------- -revision 1.590 -date: 2003/07/13 08:12:26; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030713 ----------------------------- -revision 1.589 -date: 2003/07/13 03:37:07; author: ianmacd; state: Exp; lines: +2 -2 - -- _iwfconfig() typo fix by Guillaume Rousse ----------------------------- -revision 1.588 -date: 2003/07/11 09:22:55; author: ianmacd; state: Exp; lines: +9 -4 - -- allow find to search through more than one directory root - (fix derived from patch by Denis McLaughlin ) ----------------------------- -revision 1.587 -date: 2003/07/11 08:48:07; author: ianmacd; state: Exp; lines: +5 -4 - -- update rpm completion for rpm 4.2 (patch from G�tz Waschk - ) ----------------------------- -revision 1.586 -date: 2003/07/11 08:30:59; author: ianmacd; state: Exp; lines: +9 -4 - -- modify kldload and portinstall completion for FreeBSD 5 - (patch from Jean-Baptiste Quenot ) ----------------------------- -revision 1.585 -date: 2003/06/30 01:41:57; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030630 ----------------------------- -revision 1.584 -date: 2003/06/30 01:35:57; author: ianmacd; state: Exp; lines: +4 -3 - -- fix process truncation problem with killall completion ----------------------------- -revision 1.583 -date: 2003/06/23 15:54:01; author: ianmacd; state: Exp; lines: +4 -3 - -- psql update from Guillaume Rousse ----------------------------- -revision 1.582 -date: 2003/06/23 15:39:59; author: ianmacd; state: Exp; lines: +4 -3 - -- new urpmi update from Guillaume Rousse ----------------------------- -revision 1.581 -date: 2003/06/18 00:18:30; author: ianmacd; state: Exp; lines: +2 -2 - -- allow mplayer to complete on .dump files ----------------------------- -revision 1.580 -date: 2003/06/10 21:55:30; author: ianmacd; state: Exp; lines: +2 -2 - -- add xhost to host completion ----------------------------- -revision 1.579 -date: 2003/06/07 23:23:49; author: ianmacd; state: Exp; lines: +4 -3 - -- update release to 20030607 ----------------------------- -revision 1.578 -date: 2003/06/07 23:11:27; author: ianmacd; state: Exp; lines: +6 -1 - -- some standard make commands (e.g. make world) for FreeBSD ----------------------------- -revision 1.577 -date: 2003/06/07 23:09:34; author: ianmacd; state: Exp; lines: +35 -27 - -- patch from Ilya to fix _command(), so that (in his words): - - Now work ok for commands with spaces - - Work if command completion is set with complete -W '...' - - Work in case when complete -F function and function use COMP_POINT or - COMP_LINE - - Fixed bug of incorrect completion list in case 'sudo vim ' ----------------------------- -revision 1.576 -date: 2003/06/07 22:59:37; author: ianmacd; state: Exp; lines: +7 -5 - -- make ifconfig completion work on FreeBSD, too ----------------------------- -revision 1.575 -date: 2003/06/07 22:46:04; author: ianmacd; state: Exp; lines: +3 -3 - -- explicit path to postconf(1) for Postfix completion ----------------------------- -revision 1.574 -date: 2003/06/02 02:41:33; author: ianmacd; state: Exp; lines: +2 -2 - -- minor mount completion fix ----------------------------- -revision 1.573 -date: 2003/06/01 20:44:41; author: ianmacd; state: Exp; lines: +2 -2 - -- make .html completion case-insensitive ----------------------------- -revision 1.572 -date: 2003/06/01 20:09:45; author: ianmacd; state: Exp; lines: +1 -2 - -- fix FreeBSD portinstall completion ----------------------------- -revision 1.571 -date: 2003/05/26 18:22:44; author: ianmacd; state: Exp; lines: +4 -2 - -- minor apt-cache completion fix ----------------------------- -revision 1.570 -date: 2003/05/26 18:17:05; author: ianmacd; state: Exp; lines: +14 -3 - -- handle the case whereby we're sourced from a shell function ----------------------------- -revision 1.569 -date: 2003/05/26 06:50:45; author: ianmacd; state: Exp; lines: +4 -3 - -- dpkg completion was missing the -x option ----------------------------- -revision 1.568 -date: 2003/05/21 17:01:42; author: ianmacd; state: Exp; lines: +2 -2 - -- add pkg_delete and pkg_info back onto FreeBSD commands that use - _pkg_delete() ----------------------------- -revision 1.567 -date: 2003/05/21 09:57:58; author: ianmacd; state: Exp; lines: +26 -2 - -- add FreeBSD portinstall completion (patch by Jean-Baptiste Quenot - ) ----------------------------- -revision 1.566 -date: 2003/05/17 09:55:11; author: ianmacd; state: Exp; lines: +6 -6 - -- various bits of code referred to ${#COMP_WORDS} instead of ${#COMP_WORDS[@]} ----------------------------- -revision 1.565 -date: 2003/05/17 09:52:42; author: ianmacd; state: Exp; lines: +2 -2 - -- silence stderr in man invocation in perldoc completion ----------------------------- -revision 1.564 -date: 2003/05/16 07:12:14; author: ianmacd; state: Exp; lines: +2 -2 - -- make insmod/modprobe completion handle .ko files for the 2.5/2.6 Linux kernel ----------------------------- -revision 1.563 -date: 2003/05/06 08:39:49; author: ianmacd; state: Exp; lines: +8 -2 - -- modify _cd() to make an attempt at variable completion ----------------------------- -revision 1.562 -date: 2003/05/05 06:48:30; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20030505 ----------------------------- -revision 1.561 -date: 2003/05/04 18:35:17; author: ianmacd; state: Exp; lines: +2 -2 - -- rpm completion was broken for Mandrake 9.1. Its rpm 4.0.4 doesn't allow - --nodigest ----------------------------- -revision 1.560 -date: 2003/05/01 05:42:25; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030501 ----------------------------- -revision 1.559 -date: 2003/04/29 07:38:32; author: ianmacd; state: Exp; lines: +3 -2 - -- minor fix to _insmod() to get modprobe -k to do something. - patch from Josh Rosenau ----------------------------- -revision 1.558 -date: 2003/04/29 07:28:10; author: ianmacd; state: Exp; lines: +18 -8 - -- some rpm completion speed-ups, adapted from a patch by Dag Wieers - ----------------------------- -revision 1.557 -date: 2003/04/29 02:24:20; author: ianmacd; state: Exp; lines: +35 -36 - -- new urpmi completion patch from Guillaume Rousse ----------------------------- -revision 1.556 -date: 2003/04/26 02:33:16; author: ianmacd; state: Exp; lines: +2 -2 - -- add --target to rpm -[bt] completion ----------------------------- -revision 1.555 -date: 2003/04/23 07:30:46; author: ianmacd; state: Exp; lines: +26 -21 - -- more urpmi updates from Guillaume Rousse ----------------------------- -revision 1.554 -date: 2003/04/20 22:30:40; author: ianmacd; state: Exp; lines: +2 -2 - -- allow xmms to complete on .mp2 files ----------------------------- -revision 1.553 -date: 2003/04/20 22:19:55; author: ianmacd; state: Exp; lines: +3 -3 - -- fix scp completion problem where 'scp file\ ' did not complete for - a file with a space in the name ----------------------------- -revision 1.552 -date: 2003/04/20 22:15:38; author: ianmacd; state: Exp; lines: +3 -2 - -- make have() user a wider path for searching for binaries on the system. - This enables completion functions for more binaries present on the system - to be installed ----------------------------- -revision 1.551 -date: 2003/04/20 21:53:43; author: ianmacd; state: Exp; lines: +10 -9 - -- fix up command completion noglob stuff ('sudo service' was broken, for - example) ----------------------------- -revision 1.550 -date: 2003/04/20 21:28:17; author: ianmacd; state: Exp; lines: +17 -16 - -- urpmi completion update from Guillaume Rousse ----------------------------- -revision 1.549 -date: 2003/04/19 08:52:57; author: ianmacd; state: Exp; lines: +3 -3 - -- fix FreeBSD ports programs completion ----------------------------- -revision 1.548 -date: 2003/04/19 07:44:04; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030419 ----------------------------- -revision 1.547 -date: 2003/04/19 07:43:41; author: ianmacd; state: Exp; lines: +10 -2 - -- fix for sudo completion when subcommand is passed wildcard globs - (patch by Lucien Saviot ) ----------------------------- -revision 1.546 -date: 2003/04/19 01:12:37; author: ianmacd; state: Exp; lines: +17 -10 - -- minor improvement to --export completion of gpg and the addition of - --recipient completion (patch by jens.heunemann@tngtech.com) ----------------------------- -revision 1.545 -date: 2003/04/17 09:38:27; author: ianmacd; state: Exp; lines: +2 -2 - -- somehow, _expand had been disabled by a stray colon, so that ~user would - be expanded, but ~user/foo* would not ----------------------------- -revision 1.544 -date: 2003/04/15 08:54:50; author: ianmacd; state: Exp; lines: +74 -2 - -- move dict completion into main file and rewrite from scratch ----------------------------- -revision 1.543 -date: 2003/04/14 09:42:09; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030414 ----------------------------- -revision 1.542 -date: 2003/04/14 08:35:23; author: ianmacd; state: Exp; lines: +28 -1 - -- added completion for iconv(1) ----------------------------- -revision 1.541 -date: 2003/04/12 05:05:37; author: ianmacd; state: Exp; lines: +3 -3 - -- make apt-cache complete the showsrc argument ----------------------------- -revision 1.540 -date: 2003/04/08 07:48:47; author: ianmacd; state: Exp; lines: +19 -1 - -- KDE dcop completion by Haakon Nilsen ----------------------------- -revision 1.539 -date: 2003/03/29 08:29:49; author: ianmacd; state: Exp; lines: +2 -2 - -- fix another unset variable warning in CVS completion ----------------------------- -revision 1.538 -date: 2003/03/27 09:07:11; author: ianmacd; state: Exp; lines: +2 -2 - -- update to release 20030327 ----------------------------- -revision 1.537 -date: 2003/03/27 07:48:09; author: ianmacd; state: Exp; lines: +38 -37 - -- when completing on file in /etc/init.d, only complete if we really are - dealing with the init script, not a stand-alone file of the same name ----------------------------- -revision 1.536 -date: 2003/03/18 00:34:02; author: ianmacd; state: Exp; lines: +2 -2 - -- fix core file completion in gdb ----------------------------- -revision 1.535 -date: 2003/02/27 09:31:14; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030227 ----------------------------- -revision 1.534 -date: 2003/02/27 09:30:07; author: ianmacd; state: Exp; lines: +3 -2 - -- exclude mysql init script from completion, as it clashes with completion - for stand-alone mysql ----------------------------- -revision 1.533 -date: 2003/02/26 01:17:54; author: ianmacd; state: Exp; lines: +11 -11 - -- patch from Oliver Kiddle to make bash-completion compatible with the - new bash completion emulation feature of zsh ----------------------------- -revision 1.532 -date: 2003/02/18 21:35:56; author: ianmacd; state: Exp; lines: +2 -2 - -- exclude ssh from service completion, as it clashes with regular ssh - completion on Debian ----------------------------- -revision 1.531 -date: 2003/02/16 08:39:26; author: ianmacd; state: Exp; lines: +2 -2 - -- add .tga completion to ee and display ----------------------------- -revision 1.530 -date: 2003/02/10 07:55:22; author: ianmacd; state: Exp; lines: +3 -3 - -- make slay complete on users and don't redefine su completion ----------------------------- -revision 1.529 -date: 2003/02/09 09:14:09; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20030209 ----------------------------- -revision 1.528 -date: 2003/02/08 07:33:51; author: ianmacd; state: Exp; lines: +14 -2 - -- allow 'cvs -d' to complete from ~/.cvspass (modified patch from - Rodrigo Damazio ) ----------------------------- -revision 1.527 -date: 2003/02/07 18:04:35; author: ianmacd; state: Exp; lines: +3 -3 - -- don't append spaces after directories when doing mount completion -- allow default completion if there are no matches during make completion ----------------------------- -revision 1.526 -date: 2003/02/06 19:08:16; author: ianmacd; state: Exp; lines: +2 -2 - -- allow Java completion to cover .ear files (J2EE Enterprise Application - aRchive) ----------------------------- -revision 1.525 -date: 2003/02/06 19:06:29; author: ianmacd; state: Exp; lines: +7 -7 - -- silence more unset variable warnings in CVS completion ----------------------------- -revision 1.524 -date: 2003/02/01 22:39:25; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030201 ----------------------------- -revision 1.523 -date: 2003/01/30 09:22:43; author: ianmacd; state: Exp; lines: +13 -9 - -- make service completion Debian compatible ----------------------------- -revision 1.522 -date: 2003/01/30 08:56:28; author: ianmacd; state: Exp; lines: +95 -2 - -- rsync completion by Guillaume Rousse ----------------------------- -revision 1.521 -date: 2003/01/30 08:41:42; author: ianmacd; state: Exp; lines: +2 -2 - -- minor cvs fix ----------------------------- -revision 1.520 -date: 2003/01/27 00:41:23; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030126 ----------------------------- -revision 1.519 -date: 2003/01/25 22:22:16; author: ianmacd; state: Exp; lines: +5 -5 - -- silence more unset variable warnings in cvs completion - (patch from "Irlapati, Samuel J." ) ----------------------------- -revision 1.518 -date: 2003/01/25 22:11:18; author: ianmacd; state: Exp; lines: +3 -1 - -- minor fix to ant completion from Jean-Baptiste Quenot ----------------------------- -revision 1.517 -date: 2003/01/21 08:21:15; author: ianmacd; state: Exp; lines: +5 -3 - -- make completion now also supports GNUmakefile ----------------------------- -revision 1.516 -date: 2003/01/21 07:37:44; author: ianmacd; state: Exp; lines: +5 -4 - -- make modinfo complete the same as insmod and modprobe ----------------------------- -revision 1.515 -date: 2003/01/18 09:36:22; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030118 ----------------------------- -revision 1.514 -date: 2003/01/17 10:09:59; author: ianmacd; state: Exp; lines: +15 -2 - -- improve handling of 'cvs export' (patch by Liviu Daia ) ----------------------------- -revision 1.513 -date: 2003/01/17 10:01:29; author: ianmacd; state: Exp; lines: +9 -4 - -- fix mount completion so that it also works on Solaris ----------------------------- -revision 1.512 -date: 2003/01/17 09:54:32; author: ianmacd; state: Exp; lines: +9 -9 - -- fixes to man completion to make it work on Solaris - (patch by Pablo Mejia ) ----------------------------- -revision 1.511 -date: 2003/01/13 16:31:21; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030113 ----------------------------- -revision 1.510 -date: 2003/01/13 16:30:56; author: ianmacd; state: Exp; lines: +2 -2 - -- allow vim et al to complete on .a files ----------------------------- -revision 1.509 -date: 2003/01/13 03:30:37; author: ianmacd; state: Exp; lines: +6 -2 - -- cd should also complete on variable names if cdable_vars is set ----------------------------- -revision 1.508 -date: 2003/01/13 03:28:28; author: ianmacd; state: Exp; lines: +2 -3 - -- jar completes on .war as well as .jar ----------------------------- -revision 1.507 -date: 2003/01/09 11:44:29; author: ianmacd; state: Exp; lines: +14 -6 - -- when completing on classes inside Java JAR files, use zipinfo instead of - the jar command, if it is available ----------------------------- -revision 1.506 -date: 2003/01/09 11:25:58; author: ianmacd; state: Exp; lines: +2 -2 - -- silence awk errors in known_hosts completion ----------------------------- -revision 1.505 -date: 2003/01/02 02:04:42; author: ianmacd; state: Exp; lines: +2 -2 - -- allow vi(m) to complete on ld.so.conf ----------------------------- -revision 1.504 -date: 2002/12/31 17:00:06; author: ianmacd; state: Exp; lines: +2 -2 -branches: 1.504.2; - -- update release to 20021231 ----------------------------- -revision 1.503 -date: 2002/12/31 03:15:25; author: ianmacd; state: Exp; lines: +4 -4 - -- minor known_hosts() fix ----------------------------- -revision 1.502 -date: 2002/12/31 02:59:25; author: ianmacd; state: Exp; lines: +59 -2 - -- extensive gpg(1) completion (more than just longopts, anyway) by - "Guillaume Rousse" with fix-ups by me ----------------------------- -revision 1.501 -date: 2002/12/31 02:40:22; author: ianmacd; state: Exp; lines: +43 -1 - -- wvdial(1) completion by "Guillaume Rousse" ----------------------------- -revision 1.500 -date: 2002/12/30 22:23:21; author: ianmacd; state: Exp; lines: +142 -86 - -- mplayer improvements from Guillaume Rousse ----------------------------- -revision 1.499 -date: 2002/12/23 18:28:54; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20021223 ----------------------------- -revision 1.498 -date: 2002/12/23 08:53:48; author: ianmacd; state: Exp; lines: +2 -2 - -- add groups(1) to list of commands that complete on user names ----------------------------- -revision 1.497 -date: 2002/12/23 08:52:37; author: ianmacd; state: Exp; lines: +2 -2 - -- add dig to commands that complete on known hosts ----------------------------- -revision 1.496 -date: 2002/12/23 08:51:39; author: ianmacd; state: Exp; lines: +5 -3 - -- in known hosts completion, check for known hosts files in - /etc/ssh/ssh_known_hosts and /etc/ssh/ssh_known_hosts2 ----------------------------- -revision 1.495 -date: 2002/12/22 18:45:02; author: ianmacd; state: Exp; lines: +8 -7 - -- mplayer fixes ----------------------------- -revision 1.494 -date: 2002/12/22 18:29:34; author: ianmacd; state: Exp; lines: +2 -2 - -- Java classpath string was not being skipped ----------------------------- -revision 1.493 -date: 2002/12/21 06:47:34; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021221 ----------------------------- -revision 1.492 -date: 2002/12/19 21:57:36; author: ianmacd; state: Exp; lines: +2 -2 - -- minor removepkg fix ----------------------------- -revision 1.491 -date: 2002/12/19 21:56:47; author: ianmacd; state: Exp; lines: +110 -3 - -- proper mplayer completion by Peter Valach ----------------------------- -revision 1.490 -date: 2002/12/18 19:15:46; author: ianmacd; state: Exp; lines: +61 -58 - -- reinstate Samuel J. Irlapati's patch to avoid unbound variable warnings - when bash is run with 'set -u'. This also fixes a CVS completion error - if CVS completion is attempted in a directory with no CVS/Entries file. - Patch was modified to test for set variables with -n, rather than ! -z. ----------------------------- -revision 1.489 -date: 2002/12/17 09:43:45; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021217 ----------------------------- -revision 1.488 -date: 2002/12/16 20:48:58; author: ianmacd; state: Exp; lines: +5 -4 - -- tar should also be able to recognise .tar.Z (or .tZ for that matter) files ----------------------------- -revision 1.487 -date: 2002/12/14 02:17:43; author: ianmacd; state: Exp; lines: +2 -1 - -- perldoc completion also returns names of core Perl man pages ----------------------------- -revision 1.486 -date: 2002/12/13 05:12:34; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021213 ----------------------------- -revision 1.485 -date: 2002/12/10 17:05:31; author: ianmacd; state: Exp; lines: +51 -52 - -- revert unbound variable patch ----------------------------- -revision 1.484 -date: 2002/12/10 01:30:08; author: ianmacd; state: Exp; lines: +6 -5 - -- ytalk now completes in the same way as talk -- traceroute6, tracepath and tracepath6 now also complete on known hosts -- command completion now also performed for ltrace, then, else and do - (patches from Koblinger Egmont ) ----------------------------- -revision 1.483 -date: 2002/12/09 21:48:15; author: ianmacd; state: Exp; lines: +52 -51 - -- fix a lot of variable tests to avoid 'unbound variable' warnings when - running bash with 'set -u' (some still remain, but the file now at least - sources without warnings) (patch by Samuel Irlapati - ) ----------------------------- -revision 1.482 -date: 2002/12/09 21:35:37; author: ianmacd; state: Exp; lines: +2 -2 - -- minor fix to gdb completion ----------------------------- -revision 1.481 -date: 2002/12/06 22:43:02; author: ianmacd; state: Exp; lines: +2 -2 - -- commands that complete on .htm(l) files now complete on .(x)htm(l) ----------------------------- -revision 1.480 -date: 2002/12/05 21:43:10; author: ianmacd; state: Exp; lines: +12 -8 - -- fix ypmatch completion -- update release to 20021205 ----------------------------- -revision 1.479 -date: 2002/12/05 17:58:26; author: ianmacd; state: Exp; lines: +8 -5 - -- ypmatch takes parameters of key, map -- not map, key -- so key completion - is not possible ----------------------------- -revision 1.478 -date: 2002/12/05 06:31:42; author: ianmacd; state: Exp; lines: +22 -1 - -- first stab at ypmatch(1) and ypcat(1) completion ----------------------------- -revision 1.477 -date: 2002/12/05 05:22:22; author: ianmacd; state: Exp; lines: +8 -8 - -- check for insmod and rmmod in path before installing completion functions ----------------------------- -revision 1.476 -date: 2002/12/05 02:58:28; author: ianmacd; state: Exp; lines: +2 -2 - -- add rcsdiff to list of RCS commands that use RCS completion function ----------------------------- -revision 1.475 -date: 2002/12/05 02:56:19; author: ianmacd; state: Exp; lines: +25 -22 - -- don't bother completing on PIDs in screen completion - (patch by Jean-Baptiste Quenot ) ----------------------------- -revision 1.474 -date: 2002/12/05 02:52:56; author: ianmacd; state: Exp; lines: +29 -5 - -- add FreeBSD portupgrade completion - (from Jean-Baptiste Quenot ) ----------------------------- -revision 1.473 -date: 2002/12/05 02:47:49; author: ianmacd; state: Exp; lines: +30 -4 - -- add FreeBSD kernel module command completion (patch from - Jean-Baptiste Quenot ) ----------------------------- -revision 1.472 -date: 2002/12/05 02:31:52; author: ianmacd; state: Exp; lines: +2 -2 - -- add .zargo to list of extensions that unzip can complete on (this is for - Gentleware) ----------------------------- -revision 1.471 -date: 2002/12/05 02:18:17; author: ianmacd; state: Exp; lines: +3 -2 - -- don't source files in $BASH_COMPLETION_DIR if they are vi swap files, - Debian back-ups, Emacs temp files, back-ups, etc. ----------------------------- -revision 1.470 -date: 2002/12/04 07:41:21; author: ianmacd; state: Exp; lines: +2 -2 - -- don't source files in $BASH_COMPLETION_DIR if they end in ~ or .bak ----------------------------- -revision 1.469 -date: 2002/12/04 07:26:35; author: ianmacd; state: Exp; lines: +2 -2 - -- add .flac completion to xmms ----------------------------- -revision 1.468 -date: 2002/12/04 07:25:47; author: ianmacd; state: Exp; lines: +2 -2 - -- make dpkg completion also handle .udeb files ----------------------------- -revision 1.467 -date: 2002/12/04 07:17:47; author: ianmacd; state: Exp; lines: +2 -2 - -- dpkg completion completes for -c as for --contents ----------------------------- -revision 1.466 -date: 2002/12/04 05:43:34; author: ianmacd; state: Exp; lines: +2 -2 - -- make gzip work with .tgz files, not just .gz files ----------------------------- -revision 1.465 -date: 2002/12/04 05:37:03; author: ianmacd; state: Exp; lines: +2 -2 - -- make ee and display complete on .pnm and .xwd files ----------------------------- -revision 1.464 -date: 2002/12/04 05:32:06; author: ianmacd; state: Exp; lines: +2 -2 - -- minor rpm fix ----------------------------- -revision 1.463 -date: 2002/12/04 05:02:12; author: ianmacd; state: Exp; lines: +3 -3 - -- make texi2dvi complete like other LaTeX programs ----------------------------- -revision 1.462 -date: 2002/10/26 06:11:59; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20021026 ----------------------------- -revision 1.461 -date: 2002/10/26 06:04:45; author: ianmacd; state: Exp; lines: +51 -19 - -- Mandrake urpmi completion improvements from Guillaume Rousse - ----------------------------- -revision 1.460 -date: 2002/10/26 05:54:48; author: ianmacd; state: Exp; lines: +3 -2 - -- .wav completion for mplayer ----------------------------- -revision 1.459 -date: 2002/10/25 22:45:23; author: ianmacd; state: Exp; lines: +10 -11 - -- more scp fixes and simplifications ----------------------------- -revision 1.458 -date: 2002/10/23 16:05:16; author: ianmacd; state: Exp; lines: +17 -1 - -- very basic look(1) completion ----------------------------- -revision 1.457 -date: 2002/10/23 15:50:04; author: ianmacd; state: Exp; lines: +2 -2 - -- previous fix to man completion when completing on name with '.' in it, - broke completion on names with colons in them. This fixes that. ----------------------------- -revision 1.456 -date: 2002/10/22 20:23:41; author: ianmacd; state: Exp; lines: +3 -3 - -- use external ls in scp completion if an alias has been defined ----------------------------- -revision 1.455 -date: 2002/10/22 16:00:22; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021022 ----------------------------- -revision 1.454 -date: 2002/10/22 15:59:44; author: ianmacd; state: Exp; lines: +10 -11 - -- get rid of scp helper function, as interpolation is subject to error ----------------------------- -revision 1.453 -date: 2002/10/21 06:42:40; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021021 ----------------------------- -revision 1.452 -date: 2002/10/20 22:20:49; author: ianmacd; state: Exp; lines: +7 -3 - -- PID is optional in screen completion - (patch from Jean-Baptiste Quenot ) ----------------------------- -revision 1.451 -date: 2002/10/20 22:11:21; author: ianmacd; state: Exp; lines: +11 -7 - -- redirect stderr to /dev/null when performing remote path completion for - scp -- factor out the scp ls completion code into its own function, as we need to - call this once remotely and once locally ----------------------------- -revision 1.450 -date: 2002/10/20 06:56:41; author: ianmacd; state: Exp; lines: +6 -5 - -- references to ps now use command built-in to avoid ps calling alias or - function on systems where those are in use ----------------------------- -revision 1.449 -date: 2002/10/17 20:51:25; author: ianmacd; state: Exp; lines: +4 -4 - -- fix sockets being returned in scp completon -- fix FreeBSD pkg_delete completion ----------------------------- -revision 1.448 -date: 2002/10/17 07:20:05; author: ianmacd; state: Exp; lines: +5 -5 - -- update release to 20021017 ----------------------------- -revision 1.447 -date: 2002/10/17 05:33:24; author: ianmacd; state: Exp; lines: +13 -5 - -- scp completion fixes - - don't escape : with \ - - doesn't require bash on remote machine - - deal properly with file names containing spaces - (patch by Lucien Saviot , with minor - alterations from me) ----------------------------- -revision 1.446 -date: 2002/10/17 05:01:21; author: ianmacd; state: Exp; lines: +19 -2 - -- simplify FreeBSD pkg_delete completion, so that it doesn't need sed -- add Slackware Linux removepkg completion (by Christian Birchinger - ) ----------------------------- -revision 1.445 -date: 2002/10/17 03:18:34; author: ianmacd; state: Exp; lines: +16 -1 - -- add FreeBSD pkg_delete and pkg_info completion - (patch by Jean-Baptiste Quenot ) ----------------------------- -revision 1.444 -date: 2002/10/17 03:05:29; author: ianmacd; state: Exp; lines: +2 -2 - -- Perl module completion loops endlessly if an element of the @INC path does - not exist and there are subdirectories in the current directory - (patch from Alexander Kreuzer ) ----------------------------- -revision 1.443 -date: 2002/10/17 02:53:37; author: ianmacd; state: Exp; lines: +2 -2 - -- minor fix to apt-build completion ----------------------------- -revision 1.442 -date: 2002/10/17 02:47:30; author: ianmacd; state: Exp; lines: +2 -2 - -- allow xmms to also complete on .wav files ----------------------------- -revision 1.441 -date: 2002/10/16 00:09:09; author: ianmacd; state: Exp; lines: +2 -3 - -- return core files in gdb completion ----------------------------- -revision 1.440 -date: 2002/10/14 19:57:15; author: ianmacd; state: Exp; lines: +2 -2 - -- tar file completion on files within .bz2 archives did not work ----------------------------- -revision 1.439 -date: 2002/10/14 18:56:46; author: ianmacd; state: Exp; lines: +2 -2 - -- in _tar(), don't perform regular file completion when completing on files - inside tar files ----------------------------- -revision 1.438 -date: 2002/10/13 18:06:00; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021013 ----------------------------- -revision 1.437 -date: 2002/10/13 03:46:49; author: ianmacd; state: Exp; lines: +90 -58 - -various fixes from Rafael Sep�lveda -- fixed apt-cache 'show' completion bug -- fixed function names with hyphens -- aptitude completion function was loaded, regardless of presence of program -- various improvements to other Debian commands ----------------------------- -revision 1.436 -date: 2002/10/10 15:43:38; author: ianmacd; state: Exp; lines: +2 -2 - -- mount completion should ignore commented out lines in /etc/fstab ----------------------------- -revision 1.435 -date: 2002/10/10 08:38:05; author: ianmacd; state: Exp; lines: +37 -5 - -- add option completion to Python -- make Python completion append a '/' at the end of directories - (use -o filenames rather than -o default to compgen) - (patch by Rafael Sep�lveda ) ----------------------------- -revision 1.434 -date: 2002/10/09 07:29:14; author: ianmacd; state: Exp; lines: +2 -2 - -- offer --force-confmiss, not --force-miss with dpkg completion ----------------------------- -revision 1.433 -date: 2002/10/08 07:00:57; author: ianmacd; state: Exp; lines: +4 -1 - -- perform file completion with ssh when -i is given ----------------------------- -revision 1.432 -date: 2002/10/07 16:31:47; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021007 ----------------------------- -revision 1.431 -date: 2002/10/07 16:27:01; author: ianmacd; state: Exp; lines: +2 -2 - -- back out double hostname fix for scp ----------------------------- -revision 1.430 -date: 2002/10/06 22:24:18; author: ianmacd; state: Exp; lines: +2 -2 - -- fix error message when using insmod to complete on a file in .. ----------------------------- -revision 1.429 -date: 2002/10/05 21:33:03; author: ianmacd; state: Exp; lines: +9 -2 - -- option completion for find had mysteriously disappeared ----------------------------- -revision 1.428 -date: 2002/10/05 09:48:48; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021005 ----------------------------- -revision 1.427 -date: 2002/10/05 09:34:57; author: ianmacd; state: Exp; lines: +2 -2 - -- make jar completion accept a leading dash to its option list - (patch by "C. Scott Ananian" ) ----------------------------- -revision 1.426 -date: 2002/10/05 09:33:14; author: ianmacd; state: Exp; lines: +3 -4 - -- fix cvs counting bug - (patch by "C. Scott Ananian" ----------------------------- -revision 1.425 -date: 2002/10/05 09:31:43; author: ianmacd; state: Exp; lines: +26 -5 - -- make java completion aware of -jar ----------------------------- -revision 1.424 -date: 2002/10/05 08:08:53; author: ianmacd; state: Exp; lines: +6 -6 - -- silence some apt-cache complaints in various completions - (patch by Rafael Sep�lveda ) ----------------------------- -revision 1.423 -date: 2002/10/05 08:03:21; author: ianmacd; state: Exp; lines: +4 -2 - -- avoid awk error message in rmmod completion and grep error message in - mount completion, when attempting to complete on a backslash ----------------------------- -revision 1.422 -date: 2002/10/05 07:52:37; author: ianmacd; state: Exp; lines: +3 -3 - -- avoid double machine name bug in scp ----------------------------- -revision 1.421 -date: 2002/10/02 03:32:40; author: ianmacd; state: Exp; lines: +94 -66 - -- many Debian command updates from Rafael Sep�lveda ----------------------------- -revision 1.420 -date: 2002/10/01 09:06:01; author: ianmacd; state: Exp; lines: +3 -1 - -- check for existence of links history file in links completion ----------------------------- -revision 1.419 -date: 2002/10/01 08:57:31; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20021001 ----------------------------- -revision 1.418 -date: 2002/10/01 08:55:38; author: ianmacd; state: Exp; lines: +37 -2 - -- links completion by Alan Ford ----------------------------- -revision 1.417 -date: 2002/10/01 08:07:33; author: ianmacd; state: Exp; lines: +3 -3 - -- some quoting changes to make life easier for Emacs users ----------------------------- -revision 1.416 -date: 2002/10/01 05:57:54; author: ianmacd; state: Exp; lines: +3 -3 - -- fix quoting issue in chown and chgrp completion ----------------------------- -revision 1.415 -date: 2002/09/28 18:48:02; author: ianmacd; state: Exp; lines: +3 -5 - -- apt-build completion was always installed, even if not present ----------------------------- -revision 1.414 -date: 2002/09/28 18:38:50; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020928 ----------------------------- -revision 1.413 -date: 2002/09/28 18:33:12; author: ianmacd; state: Exp; lines: +23 -20 - -- add some options to apt-build completion - (Patch by Rafael Sep�lveda ) ----------------------------- -revision 1.412 -date: 2002/09/28 18:12:24; author: ianmacd; state: Exp; lines: +54 -48 - -- add some parameters to apt-get completion - (patch by Rafael Sep�lveda -- white-space clean-up ----------------------------- -revision 1.411 -date: 2002/09/19 06:21:32; author: ianmacd; state: Exp; lines: +2 -2 - -- make gvim complete on same files as vim ----------------------------- -revision 1.410 -date: 2002/09/09 18:31:59; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020909 ----------------------------- -revision 1.409 -date: 2002/09/09 18:26:14; author: ianmacd; state: Exp; lines: +11 -11 - -- rename rpm helper functions to be more consistent ----------------------------- -revision 1.408 -date: 2002/09/09 15:46:17; author: ianmacd; state: Exp; lines: +5 -5 - -- fix for 'cvs add', where filename ends with another filename, such as - aa.c and a.c ----------------------------- -revision 1.407 -date: 2002/09/08 22:04:26; author: ianmacd; state: Exp; lines: +16 -3 - -- option completion for chown and chgrp ----------------------------- -revision 1.406 -date: 2002/09/08 21:48:27; author: ianmacd; state: Exp; lines: +2 -2 - -- add .ogm and .mp4 to mplayer and xine ----------------------------- -revision 1.405 -date: 2002/08/23 02:00:04; author: ianmacd; state: Exp; lines: +2 -2 - -- more file-types for xmms to complete on ----------------------------- -revision 1.404 -date: 2002/08/19 16:58:12; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020819 ----------------------------- -revision 1.403 -date: 2002/08/19 16:56:55; author: ianmacd; state: Exp; lines: +55 -38 - -- add Linux iwconfig completion -- consolidate most of ifconfig and iwconfig completion into _ifwconfig() ----------------------------- -revision 1.402 -date: 2002/08/12 16:04:58; author: ianmacd; state: Exp; lines: +3 -2 - -- xmms can now also complete on .xm, .mod and .s3m files ----------------------------- -revision 1.401 -date: 2002/08/12 15:29:35; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020812 ----------------------------- -revision 1.400 -date: 2002/08/06 22:04:47; author: ianmacd; state: Exp; lines: +3 -3 - -- ./configure completion was not returning all possible completions for - mawk users, as mawk does not recognise \w ----------------------------- -revision 1.399 -date: 2002/08/05 07:47:30; author: ianmacd; state: Exp; lines: +2 -2 - -- no space after export completion (assuming bash 2.05b) ----------------------------- -revision 1.398 -date: 2002/08/05 07:39:37; author: ianmacd; state: Exp; lines: +2 -2 - -- add .wmv files to those that aviplay will complete on ----------------------------- -revision 1.397 -date: 2002/08/03 09:35:33; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020803 ----------------------------- -revision 1.396 -date: 2002/08/01 01:18:51; author: ianmacd; state: Exp; lines: +3 -2 - -- silence eval errors in _filedir_xspec() when quoting goes awry ----------------------------- -revision 1.395 -date: 2002/08/01 01:11:14; author: ianmacd; state: Exp; lines: +56 -1 - -- add apt-build completion by Rafael Sep�lveda ----------------------------- -revision 1.394 -date: 2002/07/30 15:38:11; author: ianmacd; state: Exp; lines: +2 -2 - -- add elinks to commands performing .html completion ----------------------------- -revision 1.393 -date: 2002/07/29 18:05:59; author: ianmacd; state: Exp; lines: +116 -2 - -- perl and perldoc completion by Alex Shinn ----------------------------- -revision 1.392 -date: 2002/07/29 06:48:29; author: ianmacd; state: Exp; lines: +2 -2 - -- apparently, vim can edit .gz and .bz2 files, so don't exclude these from - the completion list ----------------------------- -revision 1.391 -date: 2002/07/29 06:44:37; author: ianmacd; state: Exp; lines: +2 -2 - -- fix sed error when completing a relative path in insmod completion ----------------------------- -revision 1.390 -date: 2002/07/27 09:12:57; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020727 ----------------------------- -revision 1.389 -date: 2002/07/27 09:12:32; author: ianmacd; state: Exp; lines: +2 -2 - -- fix typo in vim completion and add a couple more file types to avoid - returning as possible completions ----------------------------- -revision 1.388 -date: 2002/07/26 18:55:35; author: ianmacd; state: Exp; lines: +2 -2 - -- _man(): when completing on man page names, a trailing dot would be removed - when trying to complete a man page such as syslog.conf ----------------------------- -revision 1.387 -date: 2002/07/23 15:59:48; author: ianmacd; state: Exp; lines: +2 -2 - -- update to release 20020723 ----------------------------- -revision 1.386 -date: 2002/07/23 15:59:15; author: ianmacd; state: Exp; lines: +4 -4 - -- allow '@' in the release of RPM packages for rpm completion ----------------------------- -revision 1.385 -date: 2002/07/22 20:08:53; author: ianmacd; state: Exp; lines: +2 -2 - -- allow gunzip et al to recognise .dz files (compressed dict files) ----------------------------- -revision 1.384 -date: 2002/07/22 18:57:28; author: ianmacd; state: Exp; lines: +22 -4 - -- add _user_at_host() for user@host style completion. Use this for finger - and talk -- scp completion now no longer appends a space with bash 2.05b -- scp completion now discards stderr when performing remote path completion ----------------------------- -revision 1.383 -date: 2002/07/16 08:16:50; author: ianmacd; state: Exp; lines: +3 -3 - -- bzgrep et all now also recognise .tbz2 -- update release to 20020716 ----------------------------- -revision 1.382 -date: 2002/07/16 01:07:03; author: ianmacd; state: Exp; lines: +10 -2 - -- mount completion will now complete on Samba shares (only the volume, not - the hostname part) ----------------------------- -revision 1.381 -date: 2002/07/15 23:07:02; author: ianmacd; state: Exp; lines: +5 -3 - -- catch more possible completions in configure completion ----------------------------- -revision 1.380 -date: 2002/07/12 09:21:06; author: ianmacd; state: Exp; lines: +2 -2 - -- add some file types that xv can complete on ----------------------------- -revision 1.379 -date: 2002/07/11 07:54:51; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020711 ----------------------------- -revision 1.378 -date: 2002/07/08 05:09:22; author: ianmacd; state: Exp; lines: +3 -3 - -- PINE address book completion fix -- allow WINE to complete on .scr files ----------------------------- -revision 1.377 -date: 2002/07/04 07:13:41; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020704 ----------------------------- -revision 1.376 -date: 2002/07/04 05:45:06; author: ianmacd; state: Exp; lines: +19 -7 - -- urpmi completion update from Guillaume Rousse ----------------------------- -revision 1.375 -date: 2002/07/04 05:14:47; author: ianmacd; state: Exp; lines: +2 -2 - -- touch-ups to mplayer completion ----------------------------- -revision 1.374 -date: 2002/06/26 08:28:12; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020626 ----------------------------- -revision 1.373 -date: 2002/06/26 05:30:50; author: ianmacd; state: Exp; lines: +6 -4 - -- make tilde expansion work during chown completion ----------------------------- -revision 1.372 -date: 2002/06/25 15:48:33; author: ianmacd; state: Exp; lines: +3 -2 - -- make tar completion -o filenames by default. - -o dirnames can be obtained by setting $COMP_TAR_INTERNAL_PATHS prior to - sourcing. ----------------------------- -revision 1.371 -date: 2002/06/24 21:40:04; author: ianmacd; state: Exp; lines: +7 -3 - -- restore expansion of ~: its removal broke too much ----------------------------- -revision 1.370 -date: 2002/06/24 16:37:13; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020624 ----------------------------- -revision 1.369 -date: 2002/06/24 16:34:50; author: ianmacd; state: Exp; lines: +3 -6 - -- avoid tilde expansion where possible, but do interpret the meaning of - ~user. This stops 'cd ~us' from expanding to 'cd /home/user/' ----------------------------- -revision 1.368 -date: 2002/06/24 08:22:11; author: ianmacd; state: Exp; lines: +6 -8 - -- gdb completion defaults to -o filenames, not -o default -- simplify process matching code in gdb completion ----------------------------- -revision 1.367 -date: 2002/06/24 07:52:54; author: ianmacd; state: Exp; lines: +2 -2 - -- allow unzip to complete on Java Enterprise Application Archive files (.ear) ----------------------------- -revision 1.366 -date: 2002/06/21 09:12:59; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020621 ----------------------------- -revision 1.365 -date: 2002/06/21 09:11:32; author: ianmacd; state: Exp; lines: +9 -8 - -- add edit and unedit to cvs completion ----------------------------- -revision 1.364 -date: 2002/06/19 17:12:52; author: ianmacd; state: Exp; lines: +2 -2 - -- don't exclude .o files from make completion ----------------------------- -revision 1.363 -date: 2002/06/19 16:53:48; author: ianmacd; state: Exp; lines: +5 -5 - -- {gzip,bzip2} -t should also complete on .gz and .bz2 files, respectively -- man completion still needed one fix for FreeBSD ----------------------------- -revision 1.362 -date: 2002/06/19 08:18:28; author: ianmacd; state: Exp; lines: +3 -3 - -- update release to 20020619 ----------------------------- -revision 1.361 -date: 2002/06/17 16:40:59; author: ianmacd; state: Exp; lines: +3 -3 - -- allow .tbz as an extension during tar completion ----------------------------- -revision 1.360 -date: 2002/06/17 16:38:37; author: ianmacd; state: Exp; lines: +5 -1 - -- check for non-Linux and presence of gsed (GNU sed). If it's there, alias - it to sed. ----------------------------- -revision 1.359 -date: 2002/06/17 02:08:45; author: ianmacd; state: Exp; lines: +3 -3 - -- make man completion work for FreeBSD ----------------------------- -revision 1.358 -date: 2002/06/16 18:35:58; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020616 ----------------------------- -revision 1.357 -date: 2002/06/16 18:35:28; author: ianmacd; state: Exp; lines: +4 -4 - -- eliminate errors when setting read-only variables ----------------------------- -revision 1.356 -date: 2002/06/12 21:43:00; author: ianmacd; state: Exp; lines: +2 -2 - -- fix quoting bug in PINE address completion ----------------------------- -revision 1.355 -date: 2002/06/11 18:49:57; author: ianmacd; state: Exp; lines: +3 -3 - -- update release to 20020611 ----------------------------- -revision 1.354 -date: 2002/06/10 15:36:50; author: ianmacd; state: Exp; lines: +4 -4 - -- BASH_COMPLETION_DIR had a typo and was set to /etc/bash_completion - instead of /etc/bash_completion.d -- in tar completion, completing on files within a tar file would consume all - memory in bash 2.05a (the perennial compgen -W bug) ----------------------------- -revision 1.353 -date: 2002/06/09 17:22:26; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020609 ----------------------------- -revision 1.352 -date: 2002/06/09 08:38:04; author: ianmacd; state: Exp; lines: +2 -2 - -- unzip and zipinfo now recognise the .wsz extension (used for Winzip skin - files and xmms) ----------------------------- -revision 1.351 -date: 2002/06/09 08:35:56; author: ianmacd; state: Exp; lines: +3 -3 - -- tar completion now recognises the .tbz2 extension ----------------------------- -revision 1.350 -date: 2002/06/09 08:30:35; author: ianmacd; state: Exp; lines: +2 -2 - -- galeon, links and curl now also complete on .html files ----------------------------- -revision 1.349 -date: 2002/06/06 16:48:16; author: ianmacd; state: Exp; lines: +2 -2 - -- tar cf completed properly, but tar -cf did not ----------------------------- -revision 1.348 -date: 2002/06/05 09:55:22; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020605 ----------------------------- -revision 1.347 -date: 2002/06/05 09:52:44; author: ianmacd; state: Exp; lines: +3 -2 - -- _tar(): display directories properly when returning contents of tar files -- add .html file completion for netscape, mozilla, lynx, w3m ----------------------------- -revision 1.346 -date: 2002/06/04 05:45:09; author: ianmacd; state: Exp; lines: +21 -17 - -- use of \ls to avoid calling an alias will still call a function of that - name, if one is defined. Use built-in 'command' instead ----------------------------- -revision 1.345 -date: 2002/06/04 05:28:41; author: ianmacd; state: Exp; lines: +3 -2 - -- add newgrp to list of commands that complete on group names ----------------------------- -revision 1.344 -date: 2002/06/04 05:27:03; author: ianmacd; state: Exp; lines: +2 -2 - -- _tar(): use parameter substitution instead of calling tr(1) ----------------------------- -revision 1.343 -date: 2002/06/02 22:19:38; author: ianmacd; state: Exp; lines: +29 -8 - -- tar completion now completes first on tar files, then on their contents ----------------------------- -revision 1.342 -date: 2002/06/01 21:16:20; author: ianmacd; state: Exp; lines: +55 -1 - -- bash complete completion by Guillaume Rousse ----------------------------- -revision 1.341 -date: 2002/06/01 21:01:05; author: ianmacd; state: Exp; lines: +50 -1 - -- lilo(8) completion by Guillaume Rousse ----------------------------- -revision 1.340 -date: 2002/06/01 20:58:06; author: ianmacd; state: Exp; lines: +212 -43 - -- Java completion overhaul by Guillaume Rousse ----------------------------- -revision 1.339 -date: 2002/06/01 18:46:19; author: ianmacd; state: Exp; lines: +3 -3 - -- updated release to 20020601 ----------------------------- -revision 1.338 -date: 2002/05/30 20:26:41; author: ianmacd; state: Exp; lines: +4 -4 - -- _known_hosts(): BSD sed (and others) has no /i modifier, so we need - [Mm][Aa][Dd][Nn][Ee][Ss][Ss] style matching. Sigh... ----------------------------- -revision 1.337 -date: 2002/05/30 20:17:29; author: ianmacd; state: Exp; lines: +3 -3 - -From: Dr.Rafael Sep�lveda -- fix bug present in both _comp-dpkg-installed-packages() and - _comp-dpkg-hold-packages() that results in all packages being returned. ----------------------------- -revision 1.336 -date: 2002/05/30 19:08:15; author: ianmacd; state: Exp; lines: +33 -1 - -- add basic completion for RCS suite (rcs, rlog, ci, co) ----------------------------- -revision 1.335 -date: 2002/05/28 20:34:38; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020528 ----------------------------- -revision 1.334 -date: 2002/05/28 20:34:11; author: ianmacd; state: Exp; lines: +6 -2 - -From Goetz Waschk -- java -jar completes on .jar files ----------------------------- -revision 1.333 -date: 2002/05/28 20:16:05; author: ianmacd; state: Exp; lines: +79 -5 - -From: Guillaume Rousse -- urpmi now completes on rpm files -- urpmf, urpme, urpmq completion added ----------------------------- -revision 1.332 -date: 2002/05/21 17:10:13; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020521 ----------------------------- -revision 1.331 -date: 2002/05/21 05:35:40; author: ianmacd; state: Exp; lines: +3 -2 - -- add bzme completion (Mandrake) -- unzip & zipinfo also complete on .war files (as used by Tomcat, etc.) - (submission from Goetz Waschk ) ----------------------------- -revision 1.330 -date: 2002/05/21 00:36:07; author: ianmacd; state: Exp; lines: +3 -3 - -- _comp-dpkg-installed-packages(): remove dependence on grep-dctrl - (patch by Dr.Rafael Sep�lveda ) ----------------------------- -revision 1.329 -date: 2002/05/19 16:56:55; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020519 ----------------------------- -revision 1.328 -date: 2002/05/19 16:56:19; author: ianmacd; state: Exp; lines: +13 -14 - -- there were still references to _file_glob() in the code ----------------------------- -revision 1.327 -date: 2002/05/19 09:16:30; author: ianmacd; state: Exp; lines: +6 -9 - -- remove some dependence on grep-dctrl in Debian-specific completion - functions -- don't split ksh style globs over more than one line, since this doesn't seem - to work -both of the above fixes supplied by Dr.Rafael Sep�lveda ----------------------------- -revision 1.326 -date: 2002/05/18 23:00:14; author: ianmacd; state: Exp; lines: +9 -18 - -- replace many calls to compgen -f/-d with calls to _filedir() ----------------------------- -revision 1.325 -date: 2002/05/18 19:05:08; author: ianmacd; state: Exp; lines: +29 -13 - -- Python now completes first on a .(py|pyc|pyo) file, then on any file -- rpm helper function _file_glob() has been integrated into _filedir(), as - the principle was the same ----------------------------- -revision 1.324 -date: 2002/05/18 00:35:26; author: ianmacd; state: Exp; lines: +21 -17 - -- move code that handles host alias completion from _ssh() to _known_hosts() - and call it with _known_hosts -c. This means that _scp() can now also call - it and complete on aliases in the ssh config files ----------------------------- -revision 1.323 -date: 2002/05/16 18:07:38; author: ianmacd; state: Exp; lines: +1 -2 - -- remove redundant line from add_entries() (_cvs() helper function) ----------------------------- -revision 1.322 -date: 2002/05/16 16:15:19; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020516 ----------------------------- -revision 1.321 -date: 2002/05/16 09:10:04; author: ianmacd; state: Exp; lines: +3 -1 - -- _cvs(): get rid of grep in get_entries(), so that characters such as '.' - in file names don't get interpreted ----------------------------- -revision 1.320 -date: 2002/05/16 09:05:04; author: ianmacd; state: Exp; lines: +8 -9 - -- _cd(): completion was failing when CDPATH pointed to directories containing - spaces in their names ----------------------------- -revision 1.319 -date: 2002/05/15 20:56:25; author: ianmacd; state: Exp; lines: +3 -5 - -- _make(): don't include variable assignments when returning targets ----------------------------- -revision 1.318 -date: 2002/05/15 19:43:47; author: ianmacd; state: Exp; lines: +2 -3 - -- _cvs(): fix bug that caused null completion list in 'cvs diff' ----------------------------- -revision 1.317 -date: 2002/05/14 15:54:38; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020514 ----------------------------- -revision 1.316 -date: 2002/05/14 15:53:58; author: ianmacd; state: Exp; lines: +4 -1 - -- _cd(): still need to separate COMPREPLY on spaces ----------------------------- -revision 1.315 -date: 2002/05/13 23:43:29; author: ianmacd; state: Exp; lines: +4 -4 - -- _ssh() and _known_hosts(): ssh config file directives are case-insensitive ----------------------------- -revision 1.314 -date: 2002/05/13 23:40:40; author: ianmacd; state: Exp; lines: +4 -13 - -- _cd(): need to allow \n as separator -- _cd(): removed a chunk of code that probably hasn't worked for a while ----------------------------- -revision 1.313 -date: 2002/05/11 17:28:58; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020511 ----------------------------- -revision 1.312 -date: 2002/05/11 17:22:12; author: ianmacd; state: Exp; lines: +2 -2 - -- _ssh(): fix newline from making it into compgen -W and consuming all of - system memory ----------------------------- -revision 1.311 -date: 2002/05/11 09:28:58; author: ianmacd; state: Exp; lines: +12 -10 - -- perform tilde expansion in dpkg completion ----------------------------- -revision 1.310 -date: 2002/05/10 18:09:35; author: ianmacd; state: Exp; lines: +2 -2 - -- use sed instead of Perl in urpmi completion (patch from Guillaume Rousse - ) ----------------------------- -revision 1.309 -date: 2002/05/09 18:20:53; author: ianmacd; state: Exp; lines: +16 -15 - -- add MP3 files to those on which mplayer and xine will complete -- mpg321 completes on MP3 files -- minor code patch-ups to make Linux-specific functions work on HURD systems - (all of the above from Robert Millan ) ----------------------------- -revision 1.308 -date: 2002/05/08 17:38:56; author: ianmacd; state: Exp; lines: +3 -3 - -- changes to aptitude completion comments by Dr.Rafael Sep�lveda - ----------------------------- -revision 1.307 -date: 2002/05/08 17:26:18; author: ianmacd; state: Exp; lines: +3 -2 - -- in cvs checkout mode, "cvs co -c" should take into account "-d" (patch by - Liviu Daia ) ----------------------------- -revision 1.306 -date: 2002/05/08 17:23:51; author: ianmacd; state: Exp; lines: +11 -2 - -- postmap(1) and postalias(1) from the latest Postfix snapshot have a - new option, "-o" (patch by Liviu Daia ) - -- postfix(1) completion added (patch by Liviu Daia ) ----------------------------- -revision 1.305 -date: 2002/05/07 08:16:32; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020507 ----------------------------- -revision 1.304 -date: 2002/05/06 01:31:28; author: ianmacd; state: Exp; lines: +31 -9 - -- _known_hosts(): check /etc/ssh/ssh_config and ~/ssh/config to get location - of global and user known hosts files, rather than just assuming we know - where they are ----------------------------- -revision 1.303 -date: 2002/05/05 23:28:59; author: ianmacd; state: Exp; lines: +13 -2 - -- _ssh(): now also returns host aliases from /etc/ssh/config and ~/.ssh/config - files ----------------------------- -revision 1.302 -date: 2002/05/05 22:46:30; author: ianmacd; state: Exp; lines: +107 -1 - -- add completion for Postfix commands (patch by Liviu Daia - and Carsten Hoeger ) ----------------------------- -revision 1.301 -date: 2002/05/05 20:29:35; author: ianmacd; state: Exp; lines: +3 -12 - -- _cvs(): cvs checkout now checks for registered modules, not just raw - directories in $CVSROOT ----------------------------- -revision 1.300 -date: 2002/05/05 20:20:02; author: ianmacd; state: Exp; lines: +21 -9 - -- _rpm(): additions for rpm 4.1 ----------------------------- -revision 1.299 -date: 2002/05/05 19:24:31; author: ianmacd; state: Exp; lines: +78 -1 - -- add Debian Linux aptitude(8) completion ----------------------------- -revision 1.298 -date: 2002/05/05 17:42:42; author: ianmacd; state: Exp; lines: +6 -5 - -- _comp-dpkg-installed-packages(): return list of installed packages, rather - installable packages (patch by Dr.Rafael Sep�lveda ) ----------------------------- -revision 1.297 -date: 2002/05/04 20:42:31; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020504 ----------------------------- -revision 1.296 -date: 2002/05/03 01:00:04; author: ianmacd; state: Exp; lines: +2 -1 - -- python completion on .py, .pyc and .pyo files ----------------------------- -revision 1.295 -date: 2002/05/03 00:58:48; author: ianmacd; state: Exp; lines: +2 -2 - -- make xine complete on the same files as mplayer ----------------------------- -revision 1.294 -date: 2002/05/03 00:43:50; author: ianmacd; state: Exp; lines: +23 -23 - -- define CVS helper functions outside of _cvs(), since that just parses them - at run-time anyway ----------------------------- -revision 1.293 -date: 2002/04/30 22:16:35; author: ianmacd; state: Exp; lines: +14 -8 - -- add long option completion to psql completion - (patch by Laurent Martelli ) ----------------------------- -revision 1.292 -date: 2002/04/30 21:55:20; author: ianmacd; state: Exp; lines: +9 -1 - -- cvs completion now handles diff - (patch by Laurent Martelli ) ----------------------------- -revision 1.291 -date: 2002/04/30 21:47:42; author: ianmacd; state: Exp; lines: +2 -2 - -- _filedir_xspec(): avoid eval errors when completing within backticks or - quotes ----------------------------- -revision 1.290 -date: 2002/04/30 16:16:22; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020430 ----------------------------- -revision 1.289 -date: 2002/04/29 20:58:39; author: ianmacd; state: Exp; lines: +6 -5 - -- make installation of RPM functions a compound statement ----------------------------- -revision 1.288 -date: 2002/04/29 20:36:04; author: ianmacd; state: Exp; lines: +98 -9 - -- reworking of Postgresql completion by Guillaume Rousse ----------------------------- -revision 1.287 -date: 2002/04/29 20:21:41; author: ianmacd; state: Exp; lines: +18 -3 - -- _cvs(): remove a superfluous grep and redirect stderr on ls -- add PINE address-book completion ----------------------------- -revision 1.286 -date: 2002/04/27 18:45:24; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020427 ----------------------------- -revision 1.285 -date: 2002/04/24 22:26:49; author: ianmacd; state: Exp; lines: +92 -1 - -- add update-alternatives completion by Guillaume Rousse ----------------------------- -revision 1.284 -date: 2002/04/24 15:40:37; author: ianmacd; state: Exp; lines: +3 -3 - -- _urpmi_media(): urpmi completion now deals properly with spaces (patch - from Guillaume Rousse ----------------------------- -revision 1.283 -date: 2002/04/24 15:28:56; author: ianmacd; state: Exp; lines: +2 -2 - -- check that the files we try to source in $BASH_COMPLETION_DIR are actually - plain old files ----------------------------- -revision 1.282 -date: 2002/04/23 16:01:39; author: ianmacd; state: Exp; lines: +2 -2 - -- zipinfo now completes on the same files as unzip ----------------------------- -revision 1.281 -date: 2002/04/23 02:51:54; author: ianmacd; state: Exp; lines: +4 -1 - -- _export(): make 'export FOO=$' complete on variable names ----------------------------- -revision 1.280 -date: 2002/04/22 17:34:35; author: ianmacd; state: Exp; lines: +2 -2 - -- latex et al now also complete on .dtx and .ins files ----------------------------- -revision 1.279 -date: 2002/04/22 08:39:07; author: ianmacd; state: Exp; lines: +27 -1 - -- add Debian dselect(8) completion ----------------------------- -revision 1.278 -date: 2002/04/22 08:25:31; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020422 ----------------------------- -revision 1.277 -date: 2002/04/22 08:17:57; author: ianmacd; state: Exp; lines: +2 -2 - -- tex, latex et al now also complete on .latex files ----------------------------- -revision 1.276 -date: 2002/04/22 07:59:08; author: ianmacd; state: Exp; lines: +23 -23 - -- use $UNAME instead of $OS, since the latter purportedly has bad interactions - in environments such as Cygwin ----------------------------- -revision 1.275 -date: 2002/04/22 07:48:12; author: ianmacd; state: Exp; lines: +1 -46 - -- move ri completion into contrib dir, because it's relatively uncommon ----------------------------- -revision 1.274 -date: 2002/04/20 23:55:18; author: ianmacd; state: Exp; lines: +3 -3 - -- _man(): avoid calling alias, if an alias called man exists -- bind rpmbuild to _rpm() function ----------------------------- -revision 1.273 -date: 2002/04/20 23:51:33; author: ianmacd; state: Exp; lines: +2 -4 - -- _filedir(): fix error when completing on a quoted parameter -- _cd(): remove useless call of _expand() ----------------------------- -revision 1.272 -date: 2002/04/18 16:05:31; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020418 ----------------------------- -revision 1.271 -date: 2002/04/18 15:55:50; author: ianmacd; state: Exp; lines: +6 -5 - -- add 'annotate' to list of cvs commands that perform completion ----------------------------- -revision 1.270 -date: 2002/04/18 15:29:56; author: ianmacd; state: Exp; lines: +46 -1 - -- added ri (Ruby documentation) completion ----------------------------- -revision 1.269 -date: 2002/04/17 08:44:12; author: ianmacd; state: Exp; lines: +21 -14 - -- _rpm(): rpm -qf worked, but rpm -q -f didn't. Simiarly, rpm -V -f didn't - work; nor did rpm -Vg or rpm -V -g ----------------------------- -revision 1.268 -date: 2002/04/15 00:41:04; author: ianmacd; state: Exp; lines: +6 -5 - -- avoid errors when comp{gen,lete} -g don't work on an unpatched bash 2.05 ----------------------------- -revision 1.267 -date: 2002/04/13 19:24:28; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020412 ----------------------------- -revision 1.266 -date: 2002/04/13 19:21:42; author: ianmacd; state: Exp; lines: +2 -2 - -- _command(): back out change from 1.265, as we can't reliably avoid expansion - of wildcards prior to handing off for subcompletion. Also, back out change - from 1.242 (release 20020402) that set the command line token pointer to be - n-1 after expansion of any wildcards. We can't reliably know what the - position of the current token is after expansion, since someone may do - something like 'sudo ls fo* bar', where 'fo*' expands to multiple - tokens. ----------------------------- -revision 1.265 -date: 2002/04/12 00:24:08; author: ianmacd; state: Exp; lines: +4 -5 - -- _command(): stop wildcards from expanding prior to handing off command line - for subcompletion ----------------------------- -revision 1.264 -date: 2002/04/08 16:30:59; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020408 ----------------------------- -revision 1.263 -date: 2002/04/07 19:17:13; author: ianmacd; state: Exp; lines: +43 -29 - -- _apt-get improvements from Laurent Martelli -- make _rpm()'s helper functions global. Having them within the _rpm() function - body doesn't make them global anyway; it just makes them get sourced at - run-time when _rpm() gets called, so this should be slightly faster ----------------------------- -revision 1.262 -date: 2002/04/06 22:21:13; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020406 ----------------------------- -revision 1.261 -date: 2002/04/06 22:18:59; author: ianmacd; state: Exp; lines: +13 -12 - -- various fixes to urpmi function names to make them officially valid ----------------------------- -revision 1.260 -date: 2002/04/05 19:45:05; author: ianmacd; state: Exp; lines: +5 -5 - -- _rpm(): rpm would try group query completion instead of either uninstalled or - installed query completion when passed a long option that ended with 'g'. - Similarly, it would attempt uninstalled package completion instead of - installed package completion when passed a long option that ended with 'p'. - - verify completion suffered from a similar bug ----------------------------- -revision 1.259 -date: 2002/04/04 16:49:40; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020404 ----------------------------- -revision 1.258 -date: 2002/04/04 16:27:06; author: ianmacd; state: Exp; lines: +2 -2 - -- add compressed files (.Z) to the list that gv and ggv will complete on ----------------------------- -revision 1.257 -date: 2002/04/04 00:42:14; author: ianmacd; state: Exp; lines: +2 -2 - -- add .m3u to list of extensions that xmms et al can complete on ----------------------------- -revision 1.256 -date: 2002/04/03 23:17:10; author: ianmacd; state: Exp; lines: +13 -12 - -- clean up numerous areas where grep would complain if passed a $cur with - a space in it ----------------------------- -revision 1.255 -date: 2002/04/03 23:10:35; author: ianmacd; state: Exp; lines: +15 -16 - -- _rpm(): make package group completion a subcase of -q completion - It was very buggy before, completing only when 'rpm -g' was given (which is - invalid), instead of 'rpm -qg' ----------------------------- -revision 1.254 -date: 2002/04/03 21:10:49; author: ianmacd; state: Exp; lines: +39 -3 - -- _route(): add 'default' and 'gw' as possible completions -- add lftp(1) and autorpm(1) completion from Kirk Bauer ----------------------------- -revision 1.253 -date: 2002/04/03 19:19:30; author: ianmacd; state: Exp; lines: +47 -42 - -- attempt to make everything bash 2.04 compatible by putting making the -o - switch to comp{lete,gen} a shell variable -- allow group completion in bash versions > 2.04 (was > 2.05, but that would - break group completion for anyone who has installed a suitably patched 2.05) ----------------------------- -revision 1.252 -date: 2002/04/03 18:56:55; author: ianmacd; state: Exp; lines: +3 -3 - -- add which(1) to list of commands that complete on commands ----------------------------- -revision 1.251 -date: 2002/04/03 18:56:01; author: ianmacd; state: Exp; lines: +3 -3 - -- _umount(): make returned completions behave properly (remove -o filenames) - and default to directories if all else fails (add -o dirnames) ----------------------------- -revision 1.250 -date: 2002/04/03 07:11:06; author: ianmacd; state: Exp; lines: +4 -8 - -- _cd(): back out some code that attempted to add a trailing slash to - completions relative to paths in $CDPATH, since this caused problems - elsewhere ----------------------------- -revision 1.249 -date: 2002/04/03 01:37:51; author: ianmacd; state: Exp; lines: +20 -12 - -- set $nospace if bash 2.05b -- only use comp{gen,lete} -g if bash > 2.05 -- _cd(): don't append a space to paths relative to $CDPATH when using bash - 2.05b ----------------------------- -revision 1.248 -date: 2002/04/02 19:22:40; author: ianmacd; state: Exp; lines: +11 -9 - -- _cvs(): set $COMP_CVS_REMOTE to get remote repository completion on - 'cvs commit' -- _configure(): set $COMP_CONFIGURE_HINTS to get 'SETTING' included on - --option=SETTING style completions ----------------------------- -revision 1.247 -date: 2002/04/02 16:56:59; author: ianmacd; state: Exp; lines: +8 -4 - -- _configure(): when a completion is of the form --option=SETTING, make the - inclusion of SETTING in the completion be optional (set $hints) ----------------------------- -revision 1.246 -date: 2002/04/02 10:04:57; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020402 ----------------------------- -revision 1.245 -date: 2002/04/02 08:22:27; author: ianmacd; state: Exp; lines: +3 -3 - -- _kill(): call _pids rather than duplicate code -- _longopt(): when parsing --help output, pipe stderr through stdout ----------------------------- -revision 1.244 -date: 2002/04/02 08:17:35; author: ianmacd; state: Exp; lines: +46 -2 - -- add netstat to list of commands that complete on long options -- add renice completion, submitted by Michael G , - and rewritten helper functions _pids() and _pgids() ----------------------------- -revision 1.243 -date: 2002/04/02 07:27:50; author: ianmacd; state: Exp; lines: +28 -8 - -- _dpkg-reconfigure() fix and enhancements from - Dr.Rafael Sep�lveda ----------------------------- -revision 1.242 -date: 2002/04/01 18:50:05; author: ianmacd; state: Exp; lines: +4 -3 - -- _command(): when passing off command lines for subcompletion by other - functions, we were passing incorrect information about the current line - position when the command line contained wildcards that expanded arguments - to multiple arguments ----------------------------- -revision 1.241 -date: 2002/04/01 16:45:45; author: ianmacd; state: Exp; lines: +18 -10 - -- _cvs(): make 'cvs commit' default to local file completion, since remote - completion is very annoying for those who have to supply a password. - Set 'remote=yes' within _cvs() to get the old behaviour. ----------------------------- -revision 1.240 -date: 2002/04/01 01:12:50; author: ianmacd; state: Exp; lines: +2 -2 - -- _scp(): silence errors from remote path completion ----------------------------- -revision 1.239 -date: 2002/03/31 08:06:52; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020331 ----------------------------- -revision 1.238 -date: 2002/03/31 08:04:48; author: ianmacd; state: Exp; lines: +2 -2 - -- fix minor quoting problem in _cd() ----------------------------- -revision 1.237 -date: 2002/03/30 19:33:56; author: ianmacd; state: Exp; lines: +2 -2 - -- release updated to 20020330 ----------------------------- -revision 1.236 -date: 2002/03/30 19:20:51; author: ianmacd; state: Exp; lines: +10 -1 - -- _command(): commands like 'sudo chown' return completions of the form - 'user:'. This gets escaped by _chown() and passed back as 'user\:'. - _command() then escapes this further to 'user\\\:', so we need to unescape it - to have things work correctly. - - Unfortunately, 'sudo rm' might pass back the name of a file that has a - backslash followed by a colon in the name, e.g. 'foo\:bar'. This is - escaped by _command() to 'foo\\\:bar', which we should not unescape. - - How to tell the difference between a completion that contains a backslash - that is escaping the following character, and one that has literal - backslashes? - - We extract the '-o ' information from the compspec and, if we are - dealing with a spec that does not specify that it passes back filenames or - dirnames, we unescape any backslash/colon pairings. Of course, this means - that 'sudo chown' will still do the wrong thing when dealing with a - directory or filename that contains '\:'. Oh well... ----------------------------- -revision 1.235 -date: 2002/03/29 16:33:08; author: ianmacd; state: Exp; lines: +18 -17 - -- fixes to _ant(), _java() and _urpmi() from - Guillaume Rousse ----------------------------- -revision 1.234 -date: 2002/03/29 08:30:47; author: ianmacd; state: Exp; lines: +90 -103 - -- _rpm(): replace add_package_list() with installed_packages() -- _rpm(): remove uninstalled_packages() -- _rpm(): only offer rpm options as possible completions if parameter begins - with a dash ----------------------------- -revision 1.233 -date: 2002/03/29 03:43:09; author: ianmacd; state: Exp; lines: +12 -14 - -- _cd(): checking for CDPATH at the start of the function simplifies things - somewhat ----------------------------- -revision 1.232 -date: 2002/03/29 03:35:42; author: ianmacd; state: Exp; lines: +6 -2 - -- _insmod(): Mandrake Linux has gzipped modules -- add comments to make Emacs go into shell-script-mode upon editing ----------------------------- -revision 1.231 -date: 2002/03/28 23:41:44; author: ianmacd; state: Exp; lines: +12 -8 - -- _cd(): don't foist the new relative to absolute path conversion on people - who don't use $CDPATH ----------------------------- -revision 1.230 -date: 2002/03/28 19:36:19; author: ianmacd; state: Exp; lines: +4 -4 - -- urpmi completion fixes from Guillaume Rousse ----------------------------- -revision 1.229 -date: 2002/03/28 17:22:24; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020328 ----------------------------- -revision 1.228 -date: 2002/03/28 08:41:09; author: ianmacd; state: Exp; lines: +2 -4 - -- _longopt(): remove call to _expand(), since this gets called indirectly - anyway when _filedir() is called. This fixes a double escaping of trailing - backslashes when doing something like 'mv foo\', which would cause an - eval error in _filedir() ----------------------------- -revision 1.227 -date: 2002/03/27 19:33:34; author: ianmacd; state: Exp; lines: +21 -4 - -- dpkg completion enhancements from Laurent Martelli - - options which complete on package names or .deb files now can - complete several of them. - - --listfiles complete on installed package names - - --list complete on package names - - added --force options ----------------------------- -revision 1.226 -date: 2002/03/27 07:32:19; author: ianmacd; state: Exp; lines: +8 -4 - -- _cd(): when CDPATH=.:$HOME and $PWD = $HOME, every subdir of $HOME will be - returned both as $HOME/foo and foo. bash regards these as separate - directories, even though when displayed, bash will strip them to the - basename. Add code to turn any directory that is a subdir of $PWD into an - absolute path, so that it duplicates $HOME/dir and gets deduped. ----------------------------- -revision 1.225 -date: 2002/03/26 20:28:58; author: ianmacd; state: Exp; lines: +2 -2 - -- make fakeroot complete just like sudo ----------------------------- -revision 1.224 -date: 2002/03/26 20:28:01; author: ianmacd; state: Exp; lines: +2 -2 - -- simplify gv and ggv completion ----------------------------- -revision 1.223 -date: 2002/03/26 19:45:45; author: ianmacd; state: Exp; lines: +6 -5 - -- _querybts(): compgen was missing a continuation line that probably - resulted in lots of memory being eaten -- _querybts() and _reportbug(): --ui and --interface were missing '|' - separator ----------------------------- -revision 1.222 -date: 2002/03/26 19:41:47; author: ianmacd; state: Exp; lines: +3 -3 - -- _java(): escape arguments to grep and find ----------------------------- -revision 1.221 -date: 2002/03/26 16:55:10; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020326 ----------------------------- -revision 1.220 -date: 2002/03/26 16:36:00; author: ianmacd; state: Exp; lines: +3 -3 - -- _ncftp(): slight modification to sed command to make it more compatible - across versions of sed ----------------------------- -revision 1.219 -date: 2002/03/26 16:27:02; author: ianmacd; state: Exp; lines: +3 -3 - -- _tar(): some distros (notably Slackware and Sorceror), use -y as the - bzip compression switch, so we add this, along with -I, as that is sometimes - used, too ----------------------------- -revision 1.218 -date: 2002/03/26 16:17:12; author: ianmacd; state: Exp; lines: +7 -10 - -- _chown(): make ':' the user:group separator, since only GNU chown supports - '.'. This requires some escaping work, but makes chown completion work on - any *NIX based system. ----------------------------- -revision 1.217 -date: 2002/03/24 20:26:34; author: ianmacd; state: Exp; lines: +3 -3 - -- _ncftp(): replace cut with sed, since the existing cut command uses - --output-delimiter, which FreeBSD's cut doesn't have. We now also output - only the name of the bookmark, not the expansion to which it points. ----------------------------- -revision 1.216 -date: 2002/03/24 20:05:07; author: ianmacd; state: Exp; lines: +2 -2 - -- _screen(): when dealing with -s, /etc/shells can have comment lines in it ----------------------------- -revision 1.215 -date: 2002/03/24 19:57:37; author: ianmacd; state: Exp; lines: +4 -4 - -- _mount(): showmount is in /bin on FreeBSD -- _mount(): --show-headers is a GNU option not supported on FreeBSD's - showmount, so pipe through 'sed 1d' instead -- _killall(): 'c' switch to ps is superfluous ----------------------------- -revision 1.214 -date: 2002/03/24 19:44:55; author: ianmacd; state: Exp; lines: +31 -2 - -- add handling of -r|--remove|--purge to dpkg completion -- add completion for dpkg-reconfigure -- add time to list of commands that use _command() for completion ----------------------------- -revision 1.213 -date: 2002/03/24 08:11:30; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020324 ----------------------------- -revision 1.212 -date: 2002/03/24 01:34:33; author: ianmacd; state: Exp; lines: +6 -5 - -- killall completion now also works on FreeBSD ----------------------------- -revision 1.211 -date: 2002/03/23 22:59:49; author: ianmacd; state: Exp; lines: +5 -17 - -- alter _kill() to use /proc, so that it also works on FreeBSD and maybe other - systems, too -- alter _killall() to use simpler and more reliable way of getting at the - process name ----------------------------- -revision 1.210 -date: 2002/03/22 16:54:52; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020322 ----------------------------- -revision 1.209 -date: 2002/03/22 16:50:29; author: ianmacd; state: Exp; lines: +1 -62 - -- move p4 completion into contrib, since not many people have this ----------------------------- -revision 1.208 -date: 2002/03/22 16:45:42; author: ianmacd; state: Exp; lines: +8 -10 - -- _rpm(): RPM kan also verify uninstalled packages these days, so detect - and act on -p -- _rpm(): add --querytags, --specfile, --whatrequires and --whatprovides - to options that 'rpm -V' can take ----------------------------- -revision 1.207 -date: 2002/03/22 04:29:30; author: ianmacd; state: Exp; lines: +3 -1 - -- one-liners for vi, vim, emacs and wine ----------------------------- -revision 1.206 -date: 2002/03/22 04:18:54; author: ianmacd; state: Exp; lines: +4 -3 - -- only ee & display can handle .ico files -- realplay can also handle .smi and .smil files ----------------------------- -revision 1.205 -date: 2002/03/19 16:19:58; author: ianmacd; state: Exp; lines: +3 -2 - -- timidity and playmidi complete on .mid and .midi files ----------------------------- -revision 1.204 -date: 2002/03/18 18:12:00; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020318 ----------------------------- -revision 1.203 -date: 2002/03/18 18:10:57; author: ianmacd; state: Exp; lines: +2 -2 - -- gv ggv now also complete on compressed PDF files ----------------------------- -revision 1.202 -date: 2002/03/16 20:49:44; author: ianmacd; state: Exp; lines: +21 -12 - -- add completion for -S|--search in dpkg completion ----------------------------- -revision 1.201 -date: 2002/03/15 20:02:48; author: ianmacd; state: Exp; lines: +2 -2 - -- add chage, write, talk and chfn to list of commands that complete on user ----------------------------- -revision 1.200 -date: 2002/03/15 20:02:06; author: ianmacd; state: Exp; lines: +3 -2 - -- _insmod(): the output of modinfo has changed in recent versions of modutils, - so alter the awk script to also deal with the case of the new output ----------------------------- -revision 1.199 -date: 2002/03/15 17:39:18; author: ianmacd; state: Exp; lines: +5 -4 - -- add .ico completion to ee, display, etc. ----------------------------- -revision 1.198 -date: 2002/03/15 07:20:04; author: ianmacd; state: Exp; lines: +17 -4 - -- _scp(): try to perform remote path completion when parameter contains a - colon. This is subject to usual bash trailing whitespace issue. ----------------------------- -revision 1.197 -date: 2002/03/14 18:27:13; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20020314 ----------------------------- -revision 1.196 -date: 2002/03/13 07:29:52; author: ianmacd; state: Exp; lines: +2 -2 - -- _man(): eval requires double backslash escaping of ls ----------------------------- -revision 1.195 -date: 2002/03/11 19:36:44; author: ianmacd; state: Exp; lines: +4 -3 - -- check that $BASH_COMPLETION_DIR is actually a directory -- update release to 20020311 ----------------------------- -revision 1.194 -date: 2002/03/11 18:38:17; author: ianmacd; state: Exp; lines: +10 -6 - -- use $BASH_COMPLETION_DIR to determine where loose completon scripts are ----------------------------- -revision 1.193 -date: 2002/03/11 02:15:09; author: ianmacd; state: Exp; lines: +103 -1 - -- add Debian Linux reportbug(1) and querybts(1) completion (submitted by - Chris Lawrence ) ----------------------------- -revision 1.192 -date: 2002/03/11 02:10:17; author: ianmacd; state: Exp; lines: +10 -4 - -- _dpkg(): add dpkg-deb options and give dpkg-deb the same expansions as dpkg - (patch submitted by Chris Lawrence ----------------------------- -revision 1.191 -date: 2002/03/08 19:50:24; author: ianmacd; state: Exp; lines: +8 -3 - -- source files in /etc/bash_completion.d prior to sourcing ~/.bash_completion ----------------------------- -revision 1.190 -date: 2002/03/08 19:46:15; author: ianmacd; state: Exp; lines: +5 -1 - -- _cd(): trim leading './' from relative completions, since bash will see - './foo' and 'foo' as two distinct completions and return both, even though - the './' will be cropped when displaying them ----------------------------- -revision 1.189 -date: 2002/03/08 18:26:41; author: ianmacd; state: Exp; lines: +2 -2 - -- _java(): fixed reference to wrong local variable ----------------------------- -revision 1.188 -date: 2002/03/08 18:21:30; author: ianmacd; state: Exp; lines: +8 -7 - -- _dpkg(): -i|--install|--unpack|-A|--record-avail was not completing on - directories -- _dpkg(): -s|--status|-p|--print-avail|-L|--listfiles ignored current - parameter and thus returned full list of installed packages ----------------------------- -revision 1.187 -date: 2002/03/07 19:04:05; author: ianmacd; state: Exp; lines: +14 -15 - -- some white space clean-up, removal of e-mail addresses and removal of - comment pertaining to an ssh completion bug that was fixed a while ago ----------------------------- -revision 1.186 -date: 2002/03/07 19:00:48; author: ianmacd; state: Exp; lines: +123 -1 - -- add _urpmi.media(), _urpmi(), _urpmi.update(), _urpmi.addmedia() and - _urpmi.removemedia() for Mandrake urpmi completion. These were submitted by - Guillaume Rousse ----------------------------- -revision 1.185 -date: 2002/03/07 18:47:12; author: ianmacd; state: Exp; lines: +5 -2 - -- add initial option support to _tar() ----------------------------- -revision 1.184 -date: 2002/03/07 18:44:48; author: ianmacd; state: Exp; lines: +55 -1 - -- add java completion submitted by Guillaume Rousse , - with just a couple of modifications ----------------------------- -revision 1.183 -date: 2002/03/07 18:35:32; author: ianmacd; state: Exp; lines: +31 -1 - -- add jar(1) completion from Guillaume Rousse ----------------------------- -revision 1.182 -date: 2002/03/07 18:32:03; author: ianmacd; state: Exp; lines: +38 -12 - -- ant completion replaced by function provided by - Guillaume Rousse , with a few changes to trap - compgen errors and other minor issues ----------------------------- -revision 1.181 -date: 2002/03/07 17:16:43; author: ianmacd; state: Exp; lines: +33 -21 - -- _rpm(): handle query of uninstalled packages when options are not - concatenated, i.e. rpm -qp worked, but rpm -q -p did not. Further - complicated by fact that other options could be interspersed, - e.g. rpm -q -l -p -i, and that partial concatenation could be given, - e.g. rpm -q -ipl ----------------------------- -revision 1.180 -date: 2002/03/06 20:24:06; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020306 ----------------------------- -revision 1.179 -date: 2002/03/06 18:38:37; author: ianmacd; state: Exp; lines: +2 -2 - -- _man(): Debian does not support man --path, so try setting path using - manpath and, if that fails, use man --path instead ----------------------------- -revision 1.178 -date: 2002/03/06 00:23:30; author: ianmacd; state: Exp; lines: +5 -4 - -- _export() and _configure() default to default bash completion if all else - fails -- before sourcing ~/.bash_completion, check that the current file being - sourced is not this very file. Otherwise, we cause an infinite loop. ----------------------------- -revision 1.177 -date: 2002/03/04 16:33:30; author: ianmacd; state: Exp; lines: +2 -2 - -- release updated to 20020304 ----------------------------- -revision 1.176 -date: 2002/03/04 04:46:42; author: ianmacd; state: Exp; lines: +6 -2 - -- _rpm(): perform path completion for --whatprovides if parameter contains a / ----------------------------- -revision 1.175 -date: 2002/03/02 01:56:21; author: ianmacd; state: Exp; lines: +14 -10 - -- make _man() work on Darwin systems (MacOS X) ----------------------------- -revision 1.174 -date: 2002/03/02 01:13:23; author: ianmacd; state: Exp; lines: +127 -118 - -- moved some functions around, so that all helper functions, completion - functions for built-ins, and completion functions for externals are grouped - together ----------------------------- -revision 1.173 -date: 2002/03/01 23:41:42; author: ianmacd; state: Exp; lines: +13 -6 - -- _longopt(): make vague attempt at path completion after the '=' in - --long-opt= options -- _filedir(): don't bother to set $cur, since every function that calls - it will have already set it ----------------------------- -revision 1.172 -date: 2002/03/01 19:29:34; author: ianmacd; state: Exp; lines: +14 -11 - -- _cvs(): cvs import now traverses entire CVSROOT. Also cleaned up code a - little more ----------------------------- -revision 1.171 -date: 2002/03/01 08:55:36; author: ianmacd; state: Exp; lines: +5 -5 - -- _cvs(): assign to $changed() and $newremoved() as arrays, not scalars ----------------------------- -revision 1.170 -date: 2002/03/01 07:58:23; author: ianmacd; state: Exp; lines: +39 -29 - -- a few more changes to _cvs() from Kyle Wheeler - (e.g. cvs checkout now descends through the CVSROOT) and some code clean-up - to _cvs() by me ----------------------------- -revision 1.169 -date: 2002/03/01 02:02:39; author: ianmacd; state: Exp; lines: +13 -5 - -- expand _function() with typeset/declare completion ----------------------------- -revision 1.168 -date: 2002/03/01 01:42:13; author: ianmacd; state: Exp; lines: +18 -16 - -- large clean-up of sed and awk usage throughout code, where interpolating a - shell variable that contained a / would cause the sed or awk command to fail, - since it expected the / as its own delimiter. Use | instead. ----------------------------- -revision 1.167 -date: 2002/02/28 23:37:10; author: ianmacd; state: Exp; lines: +3 -2 - -- _cd() was not correctly completing on subdirs of $CDPATH (why is this - function so damn hard to get right? :-) ) -- _configure() suffered a sed error when completing on options of the type - --option=PATH ----------------------------- -revision 1.166 -date: 2002/02/28 23:23:14; author: ianmacd; state: Exp; lines: +168 -10 - -- Kyle Wheeler submitted a large _cvs() patch with many - improvements. I rewrote this and fixed a few bugs found on the way. ----------------------------- -revision 1.165 -date: 2002/02/28 06:39:10; author: ianmacd; state: Exp; lines: +5 -2 - -- minor typo corrected in _longopt() -- stop eval error in _expand() when parameter ends with a \ ----------------------------- -revision 1.164 -date: 2002/02/27 22:36:10; author: ianmacd; state: Exp; lines: +4 -4 - -- _man(): quote $manpath to avoid premature expansion and remove local - variable $i ----------------------------- -revision 1.163 -date: 2002/02/27 16:59:49; author: ianmacd; state: Exp; lines: +2 -2 - -- updated release to 20020227 ----------------------------- -revision 1.162 -date: 2002/02/27 16:48:20; author: ianmacd; state: Exp; lines: +18 -18 - -- more code clean-up. Replace many instances of compgen -[df] by calls to - _filedir and removed a few more potential compgen error areas. ----------------------------- -revision 1.161 -date: 2002/02/27 16:28:26; author: ianmacd; state: Exp; lines: +3 -3 - -- _command(): call _filedir() when subcompletion commands return no matches ----------------------------- -revision 1.160 -date: 2002/02/27 11:01:21; author: ianmacd; state: Exp; lines: +2 -2 - -- _root_command() wasn't passing name of command that had called it to - _command() ----------------------------- -revision 1.159 -date: 2002/02/27 10:34:17; author: ianmacd; state: Exp; lines: +2 -2 - -- make psql completion perform default bash completion if all else fails ----------------------------- -revision 1.158 -date: 2002/02/27 09:55:30; author: ianmacd; state: Exp; lines: +4 -8 - -- simplify _root_command() and actually install it for use by sudo ----------------------------- -revision 1.157 -date: 2002/02/27 07:47:09; author: ianmacd; state: Exp; lines: +43 -2 - -- add dpkg completion, based largely on code submitted by Laurent Martelli - ----------------------------- -revision 1.156 -date: 2002/02/27 02:18:08; author: ianmacd; state: Exp; lines: +14 -14 - -- _make(): add long option completion -- cleaned up _configure(), _longopt() and _gcc() ----------------------------- -revision 1.155 -date: 2002/02/27 02:02:43; author: ianmacd; state: Exp; lines: +45 -39 - -multiple potential causes of compgen errors removed ----------------------------- -revision 1.154 -date: 2002/02/27 01:41:56; author: ianmacd; state: Exp; lines: +21 -27 - -- minor bug fixes to _make() -- multiple potential compgen error clean-ups ----------------------------- -revision 1.153 -date: 2002/02/27 01:24:04; author: ianmacd; state: Exp; lines: +10 -25 - -- _rpm(): removed some superfluous returns -- _apt-cache(): renamed _apt_cache and caught some potential compgen errors -- _apt-get(): renamed _apt_get and caught some potential compgen errors ----------------------------- -revision 1.152 -date: 2002/02/27 01:14:52; author: ianmacd; state: Exp; lines: +61 -84 - -- _rpm(): major clean-up, including removal of dashify() -- _rpm(): fix bug that caused --prefix, --relocate and --root to not complete - on directories ----------------------------- -revision 1.151 -date: 2002/02/27 00:35:39; author: ianmacd; state: Exp; lines: +3 -7 - -- clean up superluous returns in _ipsec() ----------------------------- -revision 1.150 -date: 2002/02/27 00:29:54; author: ianmacd; state: Exp; lines: +21 -28 - -- _find(): code clean-up and removal of potential compgen errors ----------------------------- -revision 1.149 -date: 2002/02/27 00:13:04; author: ianmacd; state: Exp; lines: +6 -6 - -prevent compgen errors in _chown(), _chgrp and _man() -fix [ ] test in _chown() and _chgrp() that should have been [[ ]] test ----------------------------- -revision 1.148 -date: 2002/02/26 23:59:47; author: ianmacd; state: Exp; lines: +22 -26 - -code clean-up -prevent compgen error in _man() ----------------------------- -revision 1.147 -date: 2002/02/26 23:21:39; author: ianmacd; state: Exp; lines: +11 -1 - -sudo now calls _root_command(), which is a wrapper around _command(), but also - sets the PATH to include {,/usr{,/local}}/sbin ----------------------------- -revision 1.146 -date: 2002/02/26 21:48:32; author: ianmacd; state: Exp; lines: +20 -2 - -add cardctl completion ----------------------------- -revision 1.145 -date: 2002/02/25 06:50:23; author: ianmacd; state: Exp; lines: +2 -2 - -updated release to 20020225 ----------------------------- -revision 1.144 -date: 2002/02/24 20:52:22; author: ianmacd; state: Exp; lines: +5 -1 - -_rpm(): fixed minor bug in --re{build,compile}/--clean/--rms{ource,pec} that - caused compgen error when passed parameter with hyphens ----------------------------- -revision 1.143 -date: 2002/02/24 06:43:48; author: ianmacd; state: Exp; lines: +4 -2 - -_psql(): try to get list of valid users from Postgres before resorting to - system user list ----------------------------- -revision 1.142 -date: 2002/02/22 16:48:21; author: ianmacd; state: Exp; lines: +8 -3 - -modified _filedir() and _longopt() to allow mkdir and rmdir to complete only - on directories ----------------------------- -revision 1.141 -date: 2002/02/22 08:41:05; author: ianmacd; state: Exp; lines: +4 -5 - -_cd(): sigh, completion on dirs and subdirs of entries in $CDPATH was broken - yet again, this time due to the space having been removed from local $IFS. - This is fixed now, but there's still a bug remaining, namely that completion - does not work correctly if dirs or subdirs of entries in $CDPATH contain - embedded spaces -_longopt(): install completion for {mk,rm}dir as -o filenames, not dirnames ----------------------------- -revision 1.140 -date: 2002/02/21 20:26:36; author: ianmacd; state: Exp; lines: +3 -1 - -_tar(): prevent error if user tries to complete on first parameter using a - string like -x (compgen sees the -x as an option to itself) ----------------------------- -revision 1.139 -date: 2002/02/20 19:09:45; author: ianmacd; state: Exp; lines: +2 -2 - -_known_hosts(): fix bug where defaulting to standard hostname completion - would yield a compgen error ----------------------------- -revision 1.138 -date: 2002/02/20 06:41:50; author: ianmacd; state: Exp; lines: +2 -2 - -update release to 20020220 ----------------------------- -revision 1.137 -date: 2002/02/20 06:26:08; author: ianmacd; state: Exp; lines: +3 -3 - -_longopt(): add irb to list of commands -_longopt(): refine sed command that filters long options ----------------------------- -revision 1.136 -date: 2002/02/20 03:56:08; author: ianmacd; state: Exp; lines: +2 -2 - -_man(): manpath doesn't exist on Sorceror Linux, so use man --path instead ----------------------------- -revision 1.135 -date: 2002/02/20 01:12:52; author: ianmacd; state: Exp; lines: +2 -2 - -_function(): declare won't allow a function that starts with a '-', so use - type instead ----------------------------- -revision 1.134 -date: 2002/02/19 22:49:13; author: ianmacd; state: Exp; lines: +4 -7 - -_rpm(): some clean up ----------------------------- -revision 1.133 -date: 2002/02/19 18:37:15; author: ianmacd; state: Exp; lines: +45 -27 - -take signal completion from _killall() and put it in _signals() -_killall() now calls _signals() -new _kill() function for kill completion -_killall() now only completes on signals if parameter starts with a '-'. - It would previously return process names AND signals for a blank parameter. ----------------------------- -revision 1.132 -date: 2002/02/18 23:40:23; author: ianmacd; state: Exp; lines: +8 -4 - -_man(): remove compgen -G glob in favour of compgen -f -X ----------------------------- -revision 1.131 -date: 2002/02/18 19:21:14; author: ianmacd; state: Exp; lines: +23 -11 - -_tar(): eradicate use of compgen -G in favour of compgen -f -X ----------------------------- -revision 1.130 -date: 2002/02/18 19:07:37; author: ianmacd; state: Exp; lines: +9 -8 - -_rpm(): more removal of compgen -G in favour of compgen -f -X ----------------------------- -revision 1.129 -date: 2002/02/18 18:55:25; author: ianmacd; state: Exp; lines: +3 -13 - -vastly simplify _rpm()'s local file_glob() function by removing compgen -G - glob in favour of a compgen -f -X construction ----------------------------- -revision 1.128 -date: 2002/02/18 18:36:00; author: ianmacd; state: Exp; lines: +5 -3 - -check that $modpath directory can be entered in _insmod() ----------------------------- -revision 1.127 -date: 2002/02/18 18:26:54; author: ianmacd; state: Exp; lines: +12 -11 - -only install route completion if running Linux -check for existence of make before installing its completion ----------------------------- -revision 1.126 -date: 2002/02/18 11:09:59; author: ianmacd; state: Exp; lines: +36 -41 - -check for Linux before installing killall completion -check for existence of cvs before installing its completion -clean up _longopt() -clean up _gcc() -clean up _configure() ----------------------------- -revision 1.125 -date: 2002/02/18 09:39:02; author: ianmacd; state: Exp; lines: +9 -11 - -_configure_func() now calls _longopt(), rather than duplicating code ----------------------------- -revision 1.124 -date: 2002/02/18 09:32:56; author: ianmacd; state: Exp; lines: +5 -31 - -remove _redir_op() and _redir_test() ----------------------------- -revision 1.123 -date: 2002/02/18 09:27:09; author: ianmacd; state: Exp; lines: +2 -2 - -$prev wasn't local to _psql() ----------------------------- -revision 1.122 -date: 2002/02/18 09:26:34; author: ianmacd; state: Exp; lines: +29 -12 - -mkdir and rmdir now bound to _longopt(), default to dirnames -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, xargs, awk, gperf, grep, gpg, grub, indent, less, m4, - sed, shar, date, env, seq, su, tee, uname, who, texindex, cat, csplit, cut, - expand, fmt, fold, head, md5sum, nl, od, paste, pr, ptx, sha1sum, sort, - split, tac, tail, tr, unexpand, uniq, wc, units and rsync now all have - GNU long option completion from _longopt() -gpc completion added into _gcc() -cat, less, more, ln and strip no longer bound to _filedir() ----------------------------- -revision 1.121 -date: 2002/02/17 16:50:17; author: ianmacd; state: Exp; lines: +2 -2 - -ee, xv, qiv and display also complete on .xpm files ----------------------------- -revision 1.120 -date: 2002/02/16 01:13:00; author: ianmacd; state: Exp; lines: +36 -21 - -break part of _gcc() into _longopt() and use this for ldd, wget, bash, id and - info completion, as demonstrated by Manu Rouat ----------------------------- -revision 1.119 -date: 2002/02/15 23:53:58; author: ianmacd; state: Exp; lines: +57 -1 - -completion for gcc and back-ends (g++, c++, g77, and gcj) from - Phil Edwards ----------------------------- -revision 1.118 -date: 2002/02/15 07:18:22; author: ianmacd; state: Exp; lines: +2 -2 - -update release to 20020215 ----------------------------- -revision 1.117 -date: 2002/02/15 00:44:21; author: ianmacd; state: Exp; lines: +2 -2 - -mplayer also completes on .wmv files ----------------------------- -revision 1.116 -date: 2002/02/14 23:39:04; author: ianmacd; state: Exp; lines: +15 -16 - -_man(): use manpath instead of /etc/man{,path}.config to find list of paths - to search. This approach honours $MANPATH -_man(): fixed bug that caused a spurious ':' to be returned as a possible - completion for all manual sections ----------------------------- -revision 1.115 -date: 2002/02/14 21:11:31; author: ianmacd; state: Exp; lines: +9 -14 - -_rpm(): add --nodeps and --nodirtokens to possible completions for rpm -b* - and rpm -t* -_rpm(): add --rmsource, --rmspec, --sign & --nodirtokens to possible - completions for rpm --rebuild and rpm --recompile -_rpm(): rpm --recompile and --rebuild now offer compatible long options as - possible completions, even when current parameter does not start with a '-' -_rpm(): rpm --clean, --rmsource and --rmspec now offer compatible long options - as possible completions, even when current parameter does not start with a '-' ----------------------------- -revision 1.114 -date: 2002/02/14 20:07:42; author: ianmacd; state: Exp; lines: +8 -5 - -_rpm(): default to directory completion as a last resort in more cases ----------------------------- -revision 1.113 -date: 2002/02/14 17:49:43; author: ianmacd; state: Exp; lines: +7 -4 - -_man(): check for /etc/manpath.config as well as /etc/man.config, since - Debian uses the former ----------------------------- -revision 1.112 -date: 2002/02/13 19:25:22; author: ianmacd; state: Exp; lines: +2 -4 - -user name completion for passwd was accidentally later replaced by group - name completion (duh) ----------------------------- -revision 1.111 -date: 2002/02/13 19:23:52; author: ianmacd; state: Exp; lines: +4 -5 - -add rsh, rlogin & ftp to commands that use _known_hosts() ----------------------------- -revision 1.110 -date: 2002/02/13 19:20:59; author: ianmacd; state: Exp; lines: +29 -1 - -beginnings of psql completion ----------------------------- -revision 1.109 -date: 2002/02/13 18:33:29; author: ianmacd; state: Exp; lines: +2 -2 - -mplayer also completes on .mov files ----------------------------- -revision 1.108 -date: 2002/02/13 17:02:57; author: ianmacd; state: Exp; lines: +8 -6 - -update release to 20020213 ----------------------------- -revision 1.107 -date: 2002/02/13 16:54:03; author: ianmacd; state: Exp; lines: +2 -2 - -add line continuation character to _tcpdump(), or compgen will eat up all of - the memory on the system ----------------------------- -revision 1.106 -date: 2002/02/13 16:46:15; author: ianmacd; state: Exp; lines: +4 -7 - -breaking completion definitions that use -X over multiple lines broke them, - when later reassigning them to _filedir_xspec() ----------------------------- -revision 1.105 -date: 2002/02/12 18:36:17; author: ianmacd; state: Exp; lines: +2 -2 - -updated release to 20020212 ----------------------------- -revision 1.104 -date: 2002/02/12 17:05:22; author: ianmacd; state: Exp; lines: +8 -12 - -clean up _man() a little ----------------------------- -revision 1.103 -date: 2002/02/11 23:28:47; author: ianmacd; state: Exp; lines: +36 -3 - -beginnings of gdb completion -type now simply completes on commands (complete -c) rather than using - _command() ----------------------------- -revision 1.102 -date: 2002/02/11 06:06:19; author: ianmacd; state: Exp; lines: +5 -4 - -in _apt-cache(), return package list for --show, --showpkg, --depends - and --dotty ----------------------------- -revision 1.101 -date: 2002/02/11 03:14:08; author: ianmacd; state: Exp; lines: +6 -7 - -_scp() now suffixes a ':' on hostnames ----------------------------- -revision 1.100 -date: 2002/02/11 02:49:26; author: ianmacd; state: Exp; lines: +22 -4 - -add bash export completion -change $cword reference to $cur in alias completion -remove local from list of built-ins that complete on variables, since local - can't be used interactively ----------------------------- -revision 1.99 -date: 2002/02/11 00:11:03; author: ianmacd; state: Exp; lines: +35 -1 - -alias and function completion based on code submitted by - ulf.bartelt@t-online.de ----------------------------- -revision 1.98 -date: 2002/02/10 21:45:46; author: ianmacd; state: Exp; lines: +18 -1 - -ncftp bookmark completion from Markus Dobel ----------------------------- -revision 1.97 -date: 2002/02/10 21:32:39; author: ianmacd; state: Exp; lines: +3 -2 - -add qiv and display to list of programs that complete on image files -xfig completes on .fig files ----------------------------- -revision 1.96 -date: 2002/02/09 08:30:49; author: ianmacd; state: Exp; lines: +2 -2 - -update release to 20020209 ----------------------------- -revision 1.95 -date: 2002/02/08 18:16:44; author: ianmacd; state: Exp; lines: +4 -3 - -fixed minor quoting bug in _filedir() and _filedir_xspec() that caused paths - with embedded spaces to still not be correctly completed in some cases ----------------------------- -revision 1.94 -date: 2002/02/08 17:49:05; author: ianmacd; state: Exp; lines: +17 -18 - -_man(): some systems (e.g. Mandrake) have bzipped man pages -_man(): remove code duplication -more file types for ee and xv ----------------------------- -revision 1.93 -date: 2002/02/06 19:02:53; author: ianmacd; state: Exp; lines: +2 -2 - -updated release to 20020206 ----------------------------- -revision 1.92 -date: 2002/02/06 18:41:06; author: ianmacd; state: Exp; lines: +3 -3 - -make -name, -lname, -iname & -ilname complete on files in _find() and - change default completion from -o default to -o filenames ----------------------------- -revision 1.91 -date: 2002/02/06 17:05:12; author: ianmacd; state: Exp; lines: +3 -2 - -make xdvi also complete on .Z, .gz and .bz2 files ----------------------------- -revision 1.90 -date: 2002/02/06 16:54:09; author: ianmacd; state: Exp; lines: +15 -15 - -change instances of -X '!*.+(foo|bar)' to -X '!*.@(foo|bar) in the various - one-liners, so that e.g. baz would complete on .foo or .bar, but not .foobar ----------------------------- -revision 1.89 -date: 2002/02/06 05:02:46; author: ianmacd; state: Exp; lines: +9 -6 - -added a bunch of one-liners from patch by Matthias Klose ----------------------------- -revision 1.88 -date: 2002/02/06 02:51:20; author: ianmacd; state: Exp; lines: +2 -2 - -add --pkgid, --hdrid, --fileid & --tid query options to _rpm() for rpm 4.0.4 ----------------------------- -revision 1.87 -date: 2002/02/05 16:55:30; author: ianmacd; state: Exp; lines: +3 -3 - -unzip also completes on .pk3 (Quake map) files -xmms, gqmpeg & freeamp also complete on .pls files ----------------------------- -revision 1.86 -date: 2002/02/04 19:11:42; author: ianmacd; state: Exp; lines: +3 -2 - -in _rpm(), consult /var/log/rpmpkgs for package list only if it is newer - than /var/lib/rpm/Packages ----------------------------- -revision 1.85 -date: 2002/02/04 19:07:33; author: ianmacd; state: Exp; lines: +5 -5 - -make scp work with files with embedded spaces (grr...) ----------------------------- -revision 1.84 -date: 2002/02/04 03:15:42; author: ianmacd; state: Exp; lines: +2 -2 - -updated release to 20020204 ----------------------------- -revision 1.83 -date: 2002/02/04 03:12:10; author: ianmacd; state: Exp; lines: +62 -1 - -screen completion added - _screen() -beginnings of openssl completion added - _openssl() ----------------------------- -revision 1.82 -date: 2002/02/03 22:01:43; author: ianmacd; state: Exp; lines: +13 -2 - -make --clean --rmsource and --rmspec work together in _rpm() ----------------------------- -revision 1.81 -date: 2002/01/31 18:03:19; author: ianmacd; state: Exp; lines: +3 -3 - -not all awks are created equal, so use sub() instead of gensub() in _killall() ----------------------------- -revision 1.80 -date: 2002/01/31 17:01:43; author: ianmacd; state: Exp; lines: +2 -2 - -in _zip(), $xspec needs to be quoted to stop it from acting as a shell glob, - rather than a parameter to compgen ----------------------------- -revision 1.79 -date: 2002/01/31 01:35:52; author: ianmacd; state: Exp; lines: +2 -2 - -unzip now also handles .exe files ----------------------------- -revision 1.78 -date: 2002/01/30 19:48:45; author: ianmacd; state: Exp; lines: +19 -12 - -fix _find() so that if first command line parameter does not begin with -, - directory completion is performed. Previously 'find h' would result - in 'find -help'. ----------------------------- -revision 1.77 -date: 2002/01/30 05:08:47; author: ianmacd; state: Exp; lines: +2 -2 - -update release to 20020130 ----------------------------- -revision 1.76 -date: 2002/01/30 05:04:28; author: ianmacd; state: Exp; lines: +3 -3 - ---clean can be used stand-alone in _rpm() ----------------------------- -revision 1.75 -date: 2002/01/29 23:06:26; author: ianmacd; state: Exp; lines: +16 -10 - -make _ifupdown() detect a Debian Linux system and act accordingly -in _man(), check that /etc/man.config is readable, not just that it exists -in _rpm(), check that /var/log/rpmpkgs is readable, not just that it exists ----------------------------- -revision 1.74 -date: 2002/01/29 21:33:49; author: ianmacd; state: Exp; lines: +8 -3 - -define $BASH_COMPLETION to hold location of completion script. This is a - read-only variable used by _filedir_xspec(). Why doesn't bash have a - built-in variable to return the path of the file currently being sourced? ----------------------------- -revision 1.73 -date: 2002/01/29 20:30:00; author: ianmacd; state: Exp; lines: +2 -2 - -apparently, it should be aviplay, not avifile ----------------------------- -revision 1.72 -date: 2002/01/29 18:31:22; author: ianmacd; state: Exp; lines: +4 -1 - -call _expand() from a couple more places in _rpm() ----------------------------- -revision 1.71 -date: 2002/01/24 21:20:31; author: ianmacd; state: Exp; lines: +2 -2 - -make _filedir_xspec() use the basename of commands when looking for matching - exclusion specs (acroread worked, whereas /opt/bin/acroread - did not) ----------------------------- -revision 1.70 -date: 2002/01/24 05:03:26; author: ianmacd; state: Exp; lines: +11 -6 - -release updated to 20020124 -call _expand() from some of the completion routines() -find now performs default completion, rather than dirnames, if nothing else - is returned ----------------------------- -revision 1.69 -date: 2002/01/24 00:41:00; author: ianmacd; state: Exp; lines: +3 -3 - -_rpm() now performs tilde expansion when file globbing -removed commented out gzip and bzip2 one-liners ----------------------------- -revision 1.68 -date: 2002/01/24 00:36:30; author: ianmacd; state: Exp; lines: +17 -6 - -renamed _file_and_dir() _filedir_xspec() -created _filedir(), which is used by cat, less, more, ln and strip, so that - tilde expansion can be performed, prior to pathname expansion ----------------------------- -revision 1.67 -date: 2002/01/24 00:13:21; author: ianmacd; state: Exp; lines: +41 -11 - -_zip() added for gzip and bzip2, so that they complete on .gz2 and .bz2 files - when invoked with the -d flag. -_expand() created for doing tilde expansion on path names. It returns the - number of elements in the COMPREPLY array. _zip(), _cd() and - _file_and_dir() now call this. -fixed minor bug in _file_and_dir() that was removing the '-' from the front of - its parameter ----------------------------- -revision 1.66 -date: 2002/01/23 21:35:17; author: ianmacd; state: Exp; lines: +5 -3 - -by popular request, comment out compspecs for gzip and bzip2. Added a - conditional to installation section of _file_and_dir() to not bind commented - out compspecs to commands ----------------------------- -revision 1.65 -date: 2002/01/23 18:24:46; author: ianmacd; state: Exp; lines: +5 -5 - -add --rmspec handling to _rpm() ----------------------------- -revision 1.64 -date: 2002/01/23 18:14:19; author: ianmacd; state: Exp; lines: +7 -8 - -turn off command tracing when DEBUG is unset -unzip also unpacks .jar files -add ggv to commands that take PostScript files -mplayer CAN'T use MP3 files -_command() wasn't redirecting stderr, so would display a harmless error message - when in 'sudo x ', 'x' didn't have its own compspec -in 'sudo x $1 $2 $n', _command() was calling x's own completion function and - passing the rest of the command line as a single parameter, rather than as - individual tokens. This is fixed, but there may be other breakage as a - result. Need to do more testing. ----------------------------- -revision 1.63 -date: 2002/01/22 08:19:47; author: ianmacd; state: Exp; lines: +2 -2 - -handle rpm -qip (and similar) as well as rpm -qpi ----------------------------- -revision 1.62 -date: 2002/01/21 16:48:10; author: ianmacd; state: Exp; lines: +3 -1 - -fix bug in 'sudo x ' where 'x' has no compspec of its own ----------------------------- -revision 1.61 -date: 2002/01/21 16:29:54; author: ianmacd; state: Exp; lines: +3 -3 - -errors caused by missing quotes fixed (duh!) ----------------------------- -revision 1.60 -date: 2002/01/21 04:58:42; author: ianmacd; state: Exp; lines: +2 -20 - -remove previous _command() completion function -updated release to 20010121 ----------------------------- -revision 1.59 -date: 2002/01/18 16:54:22; author: ianmacd; state: Exp; lines: +49 -2 - -completely rewrote _command(), so that commands like sudo and strace first - complete on a command, then complete according to that command's own - completion specification. E.g. sudo rpm would further complete - according to _rpm(), as if it were being called directly -iptables completion was being installed, even if it were not in user's PATH ----------------------------- -revision 1.58 -date: 2002/01/16 08:18:11; author: ianmacd; state: Exp; lines: +7 -1 - -added some one-liners for multimedia programs ----------------------------- -revision 1.57 -date: 2002/01/16 08:14:14; author: ianmacd; state: Exp; lines: +10 -7 - -_known_hosts(): finally thought of a way to correctly perform completion - when host specification is of the form user@host -_known_hosts(): moved escaping of dots in $cur to within 'if' block that - requires it ----------------------------- -revision 1.56 -date: 2002/01/16 03:16:56; author: ianmacd; state: Exp; lines: +2 -2 - -_man() wasn't completing on filenames with a relative path ----------------------------- -revision 1.55 -date: 2002/01/15 18:20:48; author: ianmacd; state: Exp; lines: +2 -2 - -updated release to 20020115 ----------------------------- -revision 1.54 -date: 2002/01/14 21:38:22; author: ianmacd; state: Exp; lines: +33 -1 - -mysqladmin completion ----------------------------- -revision 1.53 -date: 2002/01/09 16:32:30; author: ianmacd; state: Exp; lines: +2 -2 - -updated release to 20020109 ----------------------------- -revision 1.52 -date: 2002/01/08 05:49:06; author: ianmacd; state: Exp; lines: +35 -11 - -added _chgrp() completion ----------------------------- -revision 1.51 -date: 2002/01/08 01:33:08; author: ianmacd; state: Exp; lines: +19 -1 - -added _ifupdown() for Red Hat Linux if{up,down} completion ----------------------------- -revision 1.50 -date: 2002/01/08 01:26:49; author: ianmacd; state: Exp; lines: +45 -7 - -improve _iptables() with some chain name completion ----------------------------- -revision 1.49 -date: 2002/01/06 19:11:12; author: ianmacd; state: Exp; lines: +3 -2 - -fix iptables - it no longer worked at all, because $prev wasn't set ----------------------------- -revision 1.48 -date: 2002/01/06 04:21:04; author: ianmacd; state: Exp; lines: +2 -2 - -_cd() was no longer completing relative to $CDPATH ----------------------------- -revision 1.47 -date: 2002/01/05 21:04:01; author: ianmacd; state: Exp; lines: +3 -1 - -add release date ----------------------------- -revision 1.46 -date: 2002/01/05 20:48:59; author: ianmacd; state: Exp; lines: +6 -4 - -fixed _cd() so that if $CDPATH is set and no completions are returned - relative to its paths, we still attempt directory completion relative to $PWD ----------------------------- -revision 1.45 -date: 2002/01/05 20:42:41; author: ianmacd; state: Exp; lines: +9 -5 - -make gv also complete on encapsulated PostScript files -add jadetex and pdfjadetex to commands that complete on tex files -improved tar completion to handle .tgz and .tar files -inproved tar completion to perform file completion when c*f is the first - parameter ----------------------------- -revision 1.44 -date: 2002/01/04 19:29:18; author: ianmacd; state: Exp; lines: +4 -4 - -add 'conflicts' and 'obsoletes' query completions to _rpm() ----------------------------- -revision 1.43 -date: 2002/01/04 05:34:21; author: ianmacd; state: Exp; lines: +7 -6 - -make gv also complete on PDF files -include --repackage for rpm -[ei] -fix _cd so that it completes on directories with an embedded space -fix _file_and_dir so that it completes on directories with an embedded space ----------------------------- -revision 1.42 -date: 2002/01/03 01:17:44; author: ianmacd; state: Exp; lines: +2 -2 - -no group completion for chgrp, since we ideally also want filename completion - on second and subsequent parameters ----------------------------- -revision 1.41 -date: 2002/01/03 01:16:41; author: ianmacd; state: Exp; lines: +17 -15 - -add group completion for chgrp -change embedded tabs in the file to $'\t' syntax -be a bit more elegant in determining location of showmount in _mount() -condense awk|grep combo in _configure() to a single sed command -be more intelligent about parsing for exclusion (-X) compspecs when - binding commands to _file_and_dir() ----------------------------- -revision 1.40 -date: 2001/12/21 08:56:18; author: ianmacd; state: Exp; lines: +6 -4 - -check for showmount in /sbin or /usr/sbin in _mount() ----------------------------- -revision 1.39 -date: 2001/12/20 19:26:49; author: ianmacd; state: Exp; lines: +4 -3 - -add a compspec for mpg123 -condense grep | head into a single sed command in _file_and_dir ----------------------------- -revision 1.38 -date: 2001/12/20 17:12:44; author: ianmacd; state: Exp; lines: +16 -17 - -avoid use of extra file descriptor and grep in _file_and_dir by using - parameter substitutions ----------------------------- -revision 1.37 -date: 2001/12/20 08:52:12; author: ianmacd; state: Exp; lines: +44 -4 - -added _file_and_dir as a meta-function for compspecs requiring the -X flag - This allows us to exclude files without excluding directories -use IFS=$'\t' instead of IFS=$(echo -e "\t") ----------------------------- -revision 1.36 -date: 2001/12/18 04:43:25; author: ianmacd; state: Exp; lines: +137 -137 - -replace spaces with tabs ----------------------------- -revision 1.35 -date: 2001/12/18 04:25:04; author: ianmacd; state: Exp; lines: +23 -3 - -basic nslookup completion added ----------------------------- -revision 1.34 -date: 2001/12/13 21:34:17; author: ianmacd; state: Exp; lines: +3 -7 - -make ee and xv complete on more file-types ----------------------------- -revision 1.33 -date: 2001/12/11 21:25:53; author: ianmacd; state: Exp; lines: +21 -2 - -ant completion added ----------------------------- -revision 1.32 -date: 2001/12/05 18:05:49; author: ianmacd; state: Exp; lines: +2 -2 - -use type (built-in) instead of which (external) to determine whether a - particular command is available ----------------------------- -revision 1.31 -date: 2001/12/05 17:32:24; author: ianmacd; state: Exp; lines: +17 -23 - -- removed misleading comment on _man completion -- use -g, not -u for group completion (duh!) -- avoid unnecessary use of $COMPREPLY_SAVE in _ssh/_scp -- use '-' as prefix (-P) to kill, not '%', and put it *before* command -- default to filename completion on _scp -- removed a couple of definitions of $prev that weren't actually used -- source ~/.bash_completion if it exists ----------------------------- -revision 1.30 -date: 2001/11/29 01:37:54; author: ianmacd; state: Exp; lines: +8 -24 - -removed _gid_function and made other modifications to account for the fact - that group completion is now standard in bash 2.05a ----------------------------- -revision 1.29 -date: 2001/11/26 19:19:59; author: ianmacd; state: Exp; lines: +5 -2 - -make _known_hosts() escape meta-characters in paths before handing off to awk -added missing ` in _service ----------------------------- -revision 1.28 -date: 2001/11/20 21:35:19; author: ianmacd; state: Exp; lines: +2 -3 - -$prev not needed in _scp ----------------------------- -revision 1.27 -date: 2001/11/20 05:15:48; author: ianmacd; state: Exp; lines: +43 -22 - -- default to _dirnames on _find -- fixed bug in _known_hosts that caused keys to be printed from known_hosts2 - files -- made _ssh a little more intelligent -- added _scp -- made _cd expand ~ in directory specs -- declared i as a local variable in many functions ----------------------------- -revision 1.26 -date: 2001/11/05 00:11:48; author: ianmacd; state: Exp; lines: +11 -5 - -_rpm now uses /var/log/rpmpkgs if available (in RHL 7.2), since this is much - faster than rpm -qa, at the expense of actuality -_man completion now looks at section 'l' (local) of the manual ----------------------------- -revision 1.25 -date: 2001/09/21 20:51:30; author: ianmacd; state: Exp; lines: +5 -3 - -fixed bug in _cd that caused no completions to be returned if CDPATH was not -set and user was not trying to complete on an absolute path ----------------------------- -revision 1.24 -date: 2001/08/22 17:20:27; author: ianmacd; state: Exp; lines: +23 -23 - -reverted to previous version of _rpm, since last time's fixes broke more things than - they fixed. ----------------------------- -revision 1.23 -date: 2001/08/16 17:49:39; author: ianmacd; state: Exp; lines: +70 -17 - -added _command completion function and extended Perforce completion, both written by - Frank Cusack (frank@google.com) ----------------------------- -revision 1.22 -date: 2001/08/16 17:27:02; author: ianmacd; state: Exp; lines: +23 -23 - -made rpm completion work when -p option to check uninstalled packages is not concatenated -with other options (e.g. -ql -p instead of -qlp) ----------------------------- -revision 1.21 -date: 2001/07/12 05:52:25; author: ianmacd; state: Exp; lines: +6 -6 - -tune cd completion for standard dir completion when all else fails -p4 completion completes on files after first parameter -p4 completion now gives default completion if all else fails ----------------------------- -revision 1.20 -date: 2001/07/09 02:55:01; author: ianmacd; state: Exp; lines: +41 -21 - -corrected bug in have() support function - it returned false positives -umount, rmmod, find, rpm, apt-get, apt-cache, make use '-o filenames' -mount uses '-o default' to get default completion if all else fails -added basic perforce completion ----------------------------- -revision 1.19 -date: 2001/07/09 01:14:13; author: ianmacd; state: Exp; lines: +91 -12 - -added have() function for checking for presence of binaries -check for binaries before installing functions and completions -use '-o' option to 'complete' for optimal completion behaviour -basic tar(1), iptables(8), tcpdump(8) completion added ----------------------------- -revision 1.18 -date: 2001/05/21 22:10:29; author: ianmacd; state: Exp; lines: +10 -121 - -various clean-ups for bash 2.05 ('complete -o' means we can simplify a - bunch of default code) -_cd function made active again -meta default completion function removed (bash 2.05 has 'complete -o default') ----------------------------- -revision 1.17 -date: 2001/03/22 00:33:02; author: ianmacd; state: Exp; lines: +2 -2 - -fixed typo in rpm completion ----------------------------- -revision 1.16 -date: 2001/03/05 20:12:48; author: ianmacd; state: Exp; lines: +207 -21 - -don't try to do NFS mount completion if we don't seem to have showmount -fix quoting issue in insmod completion -add --specfile, --what{provides,requires} sections to RPM completion -move -*g) case glob down to end of case, to avoid catching --checksig in RPM - completion -check /etc/known_hosts2 & ~/.ssh/known_hosts2 for hosts in _known_hosts - completion -fixed typo in service completion -added preliminary _cd meta-function -added some more meta-functions from sample completions supplied with bash 2.04 - source ----------------------------- -revision 1.15 -date: 2001/01/31 23:57:06; author: ianmacd; state: Exp; lines: +16 -1 - -modprobe -r now completes a la insmod -insmod/modprobe now complete on filenames if parameter contains a / ----------------------------- -revision 1.14 -date: 2001/01/31 23:30:49; author: ianmacd; state: Exp; lines: +8 -7 - -insmod completion was not completing module parameters correctly -man completion now resorts to filename completion if no /etc/man.config ----------------------------- -revision 1.13 -date: 2001/01/11 00:09:48; author: ianmacd; state: Exp; lines: +29 -1 - -added Red Hat service completion ----------------------------- -revision 1.12 -date: 2000/12/20 03:04:54; author: ianmacd; state: Exp; lines: +6 -2 - -added --rmsource as stand-alone option to RPM completion ----------------------------- -revision 1.11 -date: 2000/12/19 20:54:49; author: ianmacd; state: Exp; lines: +28 -11 - -fixed bug in killall completion that caused swapped out processes to not be - completed -added file_glob() function to rpm completion ----------------------------- -revision 1.10 -date: 2000/11/20 21:41:43; author: ianmacd; state: Exp; lines: +76 -45 - -rpm completion updated for extra options in rpm 4.x (added --eval, --pipe, - --rcfile, etc.) -some minor bug fixes to rpm completion; code tidied in places -added some outstanding long options to rpm completion (--install, --freshen, - --upgrade, --info, --list, --state, --docfiles, --queryformat, --verify etc.) -added -g group completion ----------------------------- -revision 1.9 -date: 2000/10/29 23:17:19; author: ianmacd; state: Exp; lines: +5 -5 - -fixed RPM completion. Not all RPMs were found when completing -e, etc. ----------------------------- -revision 1.8 -date: 2000/10/19 17:25:36; author: ianmacd; state: Exp; lines: +4 -20 - -reverted cd, mkdir & pushd to standard -d directory completion ----------------------------- -revision 1.7 -date: 2000/10/09 20:07:50; author: ianmacd; state: Exp; lines: +164 -16 - -default to filename completion if all else fails on _mound() and _find() -do filename completion in _man() if parameter contains a / -add filename completion to list of _man completions if no manual section - specified -added functionality to FreeS/WAN IPSec completion -added Debian apt-get & apt-cache completion -added more intelligent directory completion in new _directory function ----------------------------- -revision 1.6 -date: 2000/09/25 23:38:11; author: ianmacd; state: Exp; lines: +118 -30 - -added Makefile completion -split _ssh function up into a _known_hosts function for use by other commands -improved insmod completion with module paramter completion ----------------------------- -revision 1.5 -date: 2000/09/11 20:46:39; author: ianmacd; state: Exp; lines: +66 -10 - -fixed bug in man completion that caused pages with a dot in them - (e.g. lilo.conf) not to be found -ssh completion enhanced with command completion after host has been given -fixed bug in ssh completion that caused bad completions when completing on - a digit -added route(8) completion ----------------------------- -revision 1.4 -date: 2000/08/29 21:21:00; author: ianmacd; state: Exp; lines: +20 -11 - -fixed bug in killall completion (processes with a path were not completed) -added cipher completion to -c option of ssh ----------------------------- -revision 1.3 -date: 2000/08/29 02:41:27; author: ianmacd; state: Exp; lines: +116 -63 - -added ssh completion -cleaned the code in some of the other functions ----------------------------- -revision 1.2 -date: 2000/08/11 23:20:41; author: ianmacd; state: Exp; lines: +253 -1 - -added cvs, rpm, chkconfig and chsh completion ----------------------------- -revision 1.1 -date: 2000/08/09 00:17:29; author: ianmacd; state: Exp; - -initial check-in of bash 2.04 programmable completion stuff ----------------------------- -revision 1.504.2.4 -date: 2003/01/02 18:41:37; author: ianmacd; state: Exp; lines: +2 -2 - -- update release to 20030102-devel ----------------------------- -revision 1.504.2.3 -date: 2003/01/02 02:33:32; author: ianmacd; state: Exp; lines: +2 -2 - -- add minor vim fix from main branch ----------------------------- -revision 1.504.2.2 -date: 2003/01/01 01:07:08; author: ianmacd; state: Exp; lines: +61 -90 - -- large function clean-up by "Guillaume Rousse" ----------------------------- -revision 1.504.2.1 -date: 2003/01/01 01:05:35; author: ianmacd; state: Exp; lines: +160 -44 - -- split for devel branch -- rsync completion by "Guillaume Rousse" -============================================================================= diff --git a/debian/bash_completion/README b/debian/bash_completion/README deleted file mode 100644 index 93616af..0000000 --- a/debian/bash_completion/README +++ /dev/null @@ -1,448 +0,0 @@ -$Id: README,v 1.26 2006/02/25 14:41:11 ianmacd Exp $ - - -INSTALLATION ------------- - -The easiest way to install this software is to use a package, such as -the RPM that I maintain for Red Hat Linux, the .deb package for -Debian/GNU Linux or Ubuntu, etc. - -If that's not an option or you simply don't want to do this, put the -bash_completion file somewhere on your system and source it from either -/etc/bashrc or ~/.bashrc. - -Here's one possible way of doing that from /etc/bashrc: - -# Check for interactive shell. -if [ -n "$PS1" ]; then - if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then - if [ -r /etc/bash_completion ]; then - # Source completion code. - . /etc/bash_completion - fi - fi -fi -unset bash bminor bmajor - -This code checks that the version of bash that is parsing the code is -later than 2.04 and, if so, sources the bash completion code. - -While this code may, at first, seem overly complex, the advantage of -using it is that it will also parse correctly when interpreted by bash -1.x. If you have bash 1.x and bash 2/3.x users on your system, you -must avoid using constructs that were not valid under 1.x syntax. - -If your system has an /etc/profile.d directory, you might instead want -to add a script called bash_completion.sh to that directory. Add the -above code, preceded by the following: - -# Check for bash. -[ -z "$BASH_VERSION" ] && return - -In this case, all *.sh scripts in /etc/profile.d are sourced from -/etc/bashrc by Bourne-like shells, so you need the extra check for bash -in order to avoid sourcing the rest of the script if a shell other than -bash is running. - -For your convenience, a sample bash_completion.sh file is included in -the package. - -If you're using MacOS X, /etc/bashrc is apparently not sourced at all. -In that case, you should put the bash_completion file in /sw/etc and add -the following code to ~/.bash_profile: - -if [ -f /sw/etc/bash_completion ]; then - . /sw/etc/bash_completion -fi - -If you are putting the bash completion source file somewhere other -than /etc/bash_completion, you should ensure that $BASH_COMPLETION is -set to point to it before you source it. Your ~/.bashrc file is a good -place to do this. - - -TROUBLESHOOTING ---------------- - -If you get errors about 'complete' or 'compgen' not accepting the -g -flag, you are probably running bash 2.05 and should either apply the -group completion patch, download a prepatched bash binary of 2.05, or -upgrade to 2.05a or later. - -If you find that some commands, such as 'cd /usr', end with a -trailing space instead of appending a /, you are probably running the -base version of bash 2.05, which suffers from a bug that causes the -'-o filenames' option to the complete built-in to be ignored. You can -fix this by applying the following official patch from the bash -maintainer: - - ftp://ftp.cwru.edu/pub/bash/bash-2.05-patches/bash205-006 - -If you get errors about 'complete' not accepting the -o flag, you are -probably running bash 2.04. In this case, you should upgrade to bash -2.05a or later. However, I have endeavoured to make the code detect -this version of bash and work around this issue, so please inform me -if you still encounter this error. - -Copies of the patches and prepatched versions of bash are available -from: - - http://www.caliban.org/bash/ - -If you find that a given function is producing errors under certain -circumstances when you attempt completion, try running 'set -v' or -'set -x' prior to attempting the completion again. This will produce -useful debugging output that will aid me in fixing the problem if you -are unable to do so yourself. Turn off the trace output by running -either 'set +v' or 'set +x'. - - -KNOWN PROBLEMS --------------- - -I. - -There seems to be some issue with using the bash built-in cd within -Makefiles. When invoked as /bin/sh within Makefiles, bash seems to -have a problem changing directory via the cd command. A work-around -for this is to define SHELL=/bin/bash within your Makefile. This is -believed to be a bug in bash. - -II. - -The have() function is used to conserve memory by only installing -completion functions for those programs that are actually present on -your system. The current method of determining whether or not a given -binary is present is whether or not it can be found along a certain -path of directories. The path that is currently searched is: - - $PATH:/sbin:/usr/sbin:/usr/local/sbin - -where $PATH is your user path at the time the bash completion file is -sourced. - -III. - -Many of the completion functions assume GNU versions of the various -text utilities that they call (e.g. grep, sed and awk). Your mileage -may vary. - -IV. - -If you are seeing 'unbound variable' warnings from bash when hitting -, this is because you have either 'set -u' or 'set -o nounset' -somewhere in your start-up files. This causes bash to flag the use of -any uninitialised shell variables as an error. - -Whilst I try to avoid references to uninitialised variables in the -code, there seem to be at least some cases where bash issues this -warning even though the variable in question has been initialised. - -One place this appears to occur is within the _muttconffiles() helper -function used by mutt completion, where the function calls itself -recursively. This seems to confuse bash and it issues spurious -warnings if 'nounset' is set. - - -FAQ ---- - -Q. The bash completion code inhibits some commands from completing on - files with extensions that are legitimate in my environment. Do I - have to disable completion for that command in order to complete on - the files that I need to? - -A. No. Use M-/ to (in the words of the man page) attempt file name - completion on the text to the left of the cursor. This will - circumvent any file type restrictions put in place by the bash - completion code. - -Q. How can I insert my own local completions without having to - reinsert them every time you issue a new release? - -A. Put them in ~/.bash_completion, which is parsed at the end of the - main completion script. See also the next question. - -Q. I author/maintain package X and would like to maintain my own - completion code for this package. Where should I put it to be sure - that interactive bash shells will find it and source it? - - Put it in the directory pointed to by $BASH_COMPLETION_DIR, which - is defined at the beginning of the main completion script. Any - scripts placed in this directory will be sourced by interactive - bash shells. Usually, this is /etc/bash_completion.d. - -Q. I use CVS in combination with passwordless ssh access to my remote - repository. How can I have the cvs command complete on remotely - checked-out files where relevant? - -A. Define $COMP_CVS_REMOTE. Setting this to anything will result in - the behaviour you would like. - -Q. When I'm running a ./configure script and completion returns a list - of long options to me, some of these take a parameter, - e.g. --this-option=DESCRIPTION. - - Running ./configure --help lists these descriptions, but everything - after the '=' is stripped when returning completions, so I don't - know what kind of data is expected as a given option's parameter. - - Is there a way of getting ./configure completion to return the - entire option string, so that I can see what kind of data is - required and then simply delete the descriptive text and add my own - data? - -A. Define $COMP_CONFIGURE_HINTS. Setting this to anything will result - in the behaviour you would like. - -Q. When doing tar completion on a file within a tar file like this: - - tar tzvf foo.tar.gz - - the pathnames contained in the tar file are not displayed - correctly. The slashes are removed and everything looks like it's - in a single directory. Why is this? - -A. It's a choice I had to make. bash's programmable completion is - limited in how it handles the list of possible completions it - returns. - - Because the paths returned from within the tar file are likely not - existing paths on the file system, '-o dirnames' must be passed to - the complete built-in to make it treat them as such. However, then - bash will append a space when completing on directories during - pathname completion to the tar files themselves. - - It's more important to have proper completion of paths to tar files - than it is to have completion for their contents, so this sacrifice - was made and '-o filenames' is used with complete instead. - - If you would rather have correct path completion for tar file - contents, define $COMP_TAR_INTERNAL_PATHS *before* sourcing - bash_completion. - -Q. When completing on a symlink to a directory, bash does not append - the trailing / and I have to hit again. I don't like this. - -A. This has nothing to do with bash_completion. It's the default for - completing symlinks to directories in bash 2.05a, and was added - because sometimes you want to operate on the symlink itself, rather - than what it points to. - - In bash 2.05b and later, you can get the pre-2.05a behaviour back - by putting 'set mark-symlinked-directories on' in your /etc/inputrc - or ~/.inputrc file. - -Q. Completion goes awry when I try to complete on something that contains - a colon. - -A. This is actually a 'feature' of bash. bash recognises a colon as - starting a new completion token, which is often what you want when - completing something like a PATH variable: - - $ export PATH=/bin:/sbin:/usr - - Without the special treatment of the colon, the above wouldn't work - without programmable completion, so it has long been a feature of - the shell. - - Unfortunately, you don't want the colon to be treated as a special - case when doing something like: - - $ man File::B - - Here, the colons make bash think that it's completing the a new - token that begins with 'B'. - - Unfortunately, there's no way to turn this off. The only thing you - can do is escape the colons with a backslash. - -Q. Where did urpmi completion go? - -A. Guillaume Rousse now maintains it separately as - part of the urpmi RPM package. - - CVS: http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/urpmi/ - Web: http://urpmi.org/ - -Q. Why is rpm completion so slow with -q? - -A. Probably because the database is being queried every time and this uses a - lot of memory. - - You can make this faster by pregenerating the list of installed packages on - the system. Make sure you have a readable file called /var/log/rpmpkgs. - It's generated by /etc/cron.daily/rpm on modern Red Hat and Mandrake - Linux systems. - - If you don't have such a cron job, make one: - - #!/bin/sh - - rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \ - | sort > /var/log/rpmpkgs - - rpm completion will use this flat text file instead of the RPM database, - unless it detects that the database has changed since the file was created, - in which case it will still use the database to ensure accuracy. - -Q. Can tab completion be made even easier? - -A. The readline(3) library offers a few settings that can make tab - completion easier (or at least different) to use. - - For example, try putting the following in either /etc/inputrc or - ~/.inputrc: - - set show-all-if-ambiguous on - - This will allow single tab completion as opposed to requiring a - double tab. This makes things much more pleasant, in my opinion. - - set visible-stats on - - This will suffix each returned file completion with a character - denoting its type, in a similar way to ls(1) with -F or --classify. - - set page-completions off - - This turns off the use of the internal pager when returning long - completion lists. - -Q. This code is rubbish/not bad/pretty good/the best thing since - sliced bread. How can I show my appreciation? - -A. If you're a registered Freshmeat user, take a moment to rate the - project at: - - http://freshmeat.net/rate/19041/ - - Of course, writing to me and letting me know how you feel also works. - Patches and new completion routines are most welcome, too. - -Q. How can I stay abreast of new releases? - -A. If you're a registered Freshmeat user, you can subscribe to new release - announcements at: - - http://freshmeat.net/subscribe/19041/ - -Q. Is bash the be-all-and-end-all of completion as far as shells go? - -A. Absolutely not. zsh has an extremely sophisticated completion system - that offers many features absent from the bash implementation. Its - users often cannot resist pointing this out. More information can - be found at: - - http://www.zsh.org/ - - -CONTRIBUTING ------------- - -Contributions to the bash completion project are more than -welcome. Fixes, clean-ups and improvements of existing code are much -appreciated, as are completion functions for new commands. - -If you wish to contribute code, please bare the following coding -guidelines in mind: - -- Do not use Perl, Ruby, Python etc. to do text processing unless the - command for which you are writing the completion code implies the - presence of one of those languages. - - For example, if you were writing completion code for perldoc(1), the - use of Perl to achieve your goal would be acceptable. irb(1) - completion would similarly make the use of Ruby acceptable. - - Even so, please consider alternatives to these large and slow to - start interpreters. Use lightweight programs such as grep(1), awk(1) - and sed(1). - -- Use the full power of bash 2.x. Programmable completion has only - been available since bash 2.04, so you may as well use all the - features of that version of bash to optimise your code. However, be - careful when using features added since 2.04, since not everyone - will be able to use them. Be ESPECIALLY careful of using features - exclusive to 3.x, as many people are still using 2.x. - - For example, here strings (<<<) were not added until 2.05b, so don't - use them for the time being. - - Similarly, 3.0 added the use of the regex operator '=~', commonly - found in Perl and Ruby. Whilst this is very useful, it's not yet - safe to assume its ubiquity. - - On the other hand, extended globs were added in bash 2.02 and often - enable you to avoid the use of external programs, which are - expensive to fork and execute, so do make full use of those: - - ?(pattern-list) - match zero or one occurences of patterns - *(pattern-list) - match zero or more occurences of patterns - +(pattern-list) - match one or more occurences of patterns - @(pattern-list) - match exactly one of the given patterns - !(pattern-list) - match anything except one of the given patterns - -- Following on from the last point, be sparing with the use of - external processes whenever you can. Completion functions need to be - fast, so sacrificing some code legibility for speed is acceptable. - - For example, judicious use of sed(1) can save you from having to - call grep(1) and pipe the output to cut(1), which saves a fork(2) - and exec(3). - - Sometimes you don't even need sed(1) or other external programs at - all, though. Use of constructs such as ${parameter#word}, - ${parameter%word} and ${parameter/pattern/string} can provide you a - lot of power without having to leave the shell. - - For example, if $foo contains the path to an executable, ${foo##*/} - will give you the basename of the program, without having to call - basename(1). Similarly, ${foo%/*} will give you the dirname, without - having to call dirname(1). - - As another example, - - bar=$( echo $foo | sed -e 's/bar/baz/g' ) - - can be replaced by: - - bar=${foo//bar/baz} - - These forms of parameter substitutions can also be used on arrays, - which makes them very powerful (if a little slow). - -- Do not write to the file-system under any circumstances. This can - create race conditions, is inefficient, violates the principle of - least surprise and lacks robustness. - -- Send your patches as unified diffs. You can make these with - 'diff -u'. - -- Send small, incremental diffs that affect a single function. Don't - cram massive, unrelated patches into a single diff. - -- If your code was written for a particular platform, try to make it - portable to other platforms, so that everyone may enjoy it. If your - code works only with the version of a binary on a particular - platform, ensure that it will not be loaded on other platforms that - have a command with the same name. - - In particular, do not use GNU extensions to commands like sed and - awk if you can write your code another way. If you really must use - them, however, do feel free to do so. - -- Read the existing source code for examples of how to solve - particular problems. Read the bash man page for details of all the - programming tools available to you within the shell. - -- Please test your code thoroughly before sending it to me. I don't - have access to all the commands for which I am sent completion - functions, so I am unable to test them all personally. If your code - is accepted into the distribution, a lot of people will try it out, - so try to do a thorough job of eradicating all the bugs before you - send it to me. - --- -Ian Macdonald diff --git a/debian/bash_completion/TODO b/debian/bash_completion/TODO deleted file mode 100644 index 7e213dd..0000000 --- a/debian/bash_completion/TODO +++ /dev/null @@ -1,55 +0,0 @@ -$Id: TODO,v 1.1 2006/03/01 16:19:26 ianmacd Exp $ - -bash completion needs to be rewritten from the ground up. ---------------------------------------------------------- - -bash completion really needs to be rewritten from the ground up, using all of -the features available in bash 3.1 and without regard for compatibility with -the 2.x line. - -At that time, it should be split into multiple files for easier source -management. Whether or not it is actually installed on the destination -computer as separate files is a matter for future debate. - -If it were installed as tens or even hundreds of files, each of which had to -be opened to decide whether it should be sourced in its entirety, that could -prove very expensive on some systems. - -Alternatively, a master file could decide which of the individual completion -files should be sourced. In that way, we wouldn't need to open extra files -just to ascertain that the commands for those functions aren't on the system, -anyway. - -A further alternative is that a build process be created, which would -concatenate the various files into a single completion file, similar to what -we have now. This option is my least favourite, because a system with a lot of -packages installed currently has to deal with sourcing over 200 kB of bash -code for each invocation of an interactive shell. - -An even better alternative would be if bash supported dynamic loading of shell -functions (in the manner of zsh), but I don't believe there are any plans to -add this feature. - - -bash completion needs a better development environment. -------------------------------------------------------- - -Currently, the bash completion project is managed by a single person: me. This -is how it has been since its inception back in the first half of 2000. - -This way of working is now showing signs of severe strain. For quite some time -already, I have been unable to devote enough time to the project and, as a -result, it has suffered. In particular, releases in the past twelve months -have been few and far between. The 20060301 release is the first in more than -six months. - -Whilst there have been good reasons for my inability to devote more time to -the project, it shouldn't actually matter whether or not I am available. For -that reason, I am going to look at transferring the project to public CVS some -time in 2006. Patches will then no longer find that I am a single point of -failure, but will instead find their way into the code base via a small team -of core developers. - --- -Ian Macdonald -Amsterdam, March 2006 diff --git a/debian/bash_completion/bash_completion b/debian/bash_completion/bash_completion deleted file mode 100644 index feda26d..0000000 --- a/debian/bash_completion/bash_completion +++ /dev/null @@ -1,9299 +0,0 @@ -# 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 -# -# 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 - -[ -n "${BASH_COMPLETION_DEBUG:-}" ] && set -v || set +v - -# Alter the following to reflect the location of this file. -# -{ - # These declarations must go within braces in order to be able to silence - # readonly variable errors. - BASH_COMPLETION="${BASH_COMPLETION:-/etc/bash_completion}" - BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/etc/bash_completion.d}" -} 2>/dev/null || : -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)' dvips dviselect dvitype kdvi dvipdf advi -complete -f -X '!*.@(pdf|PDF)' acroread gpdf xpdf kpdf -complete -f -X '!*.@(@(?(e)ps|?(E)PS)?(.gz|.GZ)|pdf|PDF|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|vcd|ps|pes|fli|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG)' 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|t@(ar?(.@(Z|gz|bz?(2)))|gz|bz?(2))|rpm|zip|ZIP|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 - -# 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 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 #glob - - _expand || return 0 - - #glob=$(set +o|grep noglob) # save glob setting. - #set -f # disable pathname expansion (globbing) - - if [ "${1:-}" = -d ]; then - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -d -- $cur ) ) - #eval "$glob" # restore glob setting. - return 0 - fi - - xspec=${1:+"!*.$1"} # set only if glob passed in as $1 - COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -f -X "$xspec" -- "$cur" ) \ - $( compgen -d -- "$cur" ) ) - #eval "$glob" # restore glob setting. -} - -# 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() -{ - [ "$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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_CWORD]} - - COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- $cur ) ) - - 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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${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' -- $cur ) ) - return 0 - ;; - -?(a|c)newer|-fls|-fprint?(0|f)|-?(i)?(l)name) - _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 \ - -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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_CWORD]} - - if [ $COMP_CWORD -eq 1 ]; then - _configured_interfaces - 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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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' -- "${COMP_WORDS[COMP_CWORD]}" ) ) - return 0 - fi - COMPREPLY=( $( compgen -W 'start stop reload abort flush check' -- \ - "${COMP_WORDS[COMP_CWORD]}" ) ) -} -complete -F _postfix postfix - -# postalias(1) and postmap(1) -# -_postmap() -{ - local cur prev len idx - - cur=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do - if [[ ${COMP_WORDS[i]} == @(install|remove|source|build-dep) ]]; then - special=${COMP_WORDS[i]} - fi - done - - if [ -n "$special" ]; then - case $special in - remove) - 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' -- $cur ) ) - else - - COMPREPLY=( $( compgen -W 'update upgrade dselect-upgrade \ - dist-upgrade install remove source build-dep \ - check clean autoclean' -- $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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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' - - for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do - if [[ ${COMP_WORDS[i]} == @(install|reinstall|hold|unhold|markauto|unmarkauto|dist-upgrade|download|show|forbid-version|purge|remove|changelog) ]]; 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|download|show|changelog)) - 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|update)) - 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 forget-new clean \ - autoclean install reinstall remove \ - hold unhold purge markauto unmarkauto \ - dist-upgrade download search show \ - forbid-version changelog' -- $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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - if [ "$prev" = "-s" ]; then - if [ -f /etc/debian_version ]; then - COMPREPLY=( $( /dev/null ) ) - fi - if [ ${#khd[@]} -gt 0 ]; then - # Needs to look for files called - # .../.ssh2/key_22_.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 - hosts=$( compgen -W "$( sed -ne 's/^[Hh][Oo][Ss][Tt]['"$'\t '"']*\([^*?]*\)$/\1/p' ${config[@]} )" -- $ocur ) - COMPREPLY=( ${COMPREPLY[@]} $hosts ) - fi - - # 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 fping telnet host nslookup rsh rlogin ftp dig ssh-installkeys mtr - -# ssh(1) completion -# -have ssh && { -_ssh() -{ - local cur prev - local -a config - - COMPREPLY=() - cur=${COMP_WORDS[COMP_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 - - local IFS=$'\t\n' - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - _expand || return 0 - - if [[ "$cur" == *:* ]]; 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' ) ) - return 0 - fi - - [[ "$cur" == */* ]] || _known_hosts -c -a - 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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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 - ?(-)c*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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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 - -# 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 - - COMPREPLY=() - cur=${COMP_WORDS[COMP_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[1]} - if [[ "$cmd" == -* ]] ; then - for (( i=1 ; i<=COMP_CWORD ; i++)) ; do - COMP_WORDS[i]=${COMP_WORDS[i+1]} - done - COMP_CWORD=$(($COMP_CWORD-1)) - else - done=1 - fi - done - - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -c -- $cur ) ) - elif complete -p $cmd &>/dev/null; then - cspec=$( complete -p $cmd ) - if [ "${cspec#* -F }" != "$cspec" ]; then - # complete -F - # - # COMP_CWORD and COMP_WORDS() are not read-only, - # so we can set them before handing off to regular - # completion routine - - # set current token number to 1 less than now - COMP_CWORD=$(( $COMP_CWORD - 1 )) - - # get function name - func=${cspec#*-F } - func=${func%% *} - # get current command line minus initial command - cline="${COMP_LINE#*( )$1 }" - # save noglob state - shopt -qo noglob; noglob=$? - # turn on noglob, as things like 'sudo ls *' - # don't work otherwise - shopt -so noglob - # split current command line tokens into array - COMP_WORDS=( $cline ) - # reset noglob if necessary - [ $noglob -eq 1 ] && shopt -uo noglob - $func $cline - # This is needed in case user finished entering - # command and pressed tab (e.g. sudo ls ) - COMP_CWORD=$(( $COMP_CWORD > 0 ? $COMP_CWORD : 1 )) - cur=${COMP_WORDS[COMP_CWORD]} - _COMMAND_FUNC=$func - _COMMAND_FUNC_ARGS=( $cmd $2 $3 ) - COMP_LINE=$cline - COMP_POINT=$(( ${COMP_POINT} - ${#1} - 1 )) - $func $cmd $2 $3 - # remove any \: generated by a command that doesn't - # default to filenames or dirnames (e.g. sudo chown) - 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=${COMP_WORDS[COMP_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'"' '//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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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 && { -have grep-status && { -_comp_dpkg_installed_packages() -{ - grep-status -P -e "^$1" -a -FStatus 'install ok installed' -n -s Package -} -} || { -_comp_dpkg_installed_packages() -{ - grep -A 2 "Package: $1" /var/lib/dpkg/status | \ - grep -B 2 'ok installed' | grep "Package: $1" | cut -d\ -f2 -} -} - -# Debian dpkg(8) completion -# -_dpkg() -{ - local cur prev i - - COMPREPLY=() - cur=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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: 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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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) ]]; 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 - ;; - --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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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 - -m|-M) - _perlmodules - return 0 - ;; - esac - - # handle case where first parameter is not a dash option - if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]]; 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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_CWORD]} - - COMPREPLY=( $( compgen -f $moddir$cur ) ) - COMPREPLY=( ${COMPREPLY[@]#$moddir} ) - COMPREPLY=( ${COMPREPLY[@]%.ko} ) - - return 0 -} -complete -F _kldload $filenames kldload - -_kldunload() -{ - local cur - cur=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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)' - return 0 - ;; - -font) - _filedir '@(desc|ttf)' - return 0 - ;; - -sub) - _filedir '@(srt|SRT|sub|SUB|txt|TXT|utf|UTF|rar|RAR|mpsub|smi|js)' - 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|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|flv|FLV)' - ;; - esac - - return 0 -} -complete $filenames -F _mplayer mplayer mencoder gmplayer kplayer -} - -# KDE dcop completion -# -have dcop && -_dcop() -{ - local cur compstr - - COMPREPLY=() - cur=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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 $default aspell -} - -# xmms(1) completion -# -have xmms && -_xmms() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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-othee --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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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 -# -have update-rc.d && -_update_rc_d() -{ - local cur prev sysvdir services options valid_options - - cur=${COMP_WORDS[COMP_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 -# -have invoke-rc.d && -_invoke_rc_d() -{ - local cur prev sysvdir services options valid_options - - cur=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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=${COMP_WORDS[COMP_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%% *} - - COMPREPLY=( $( eval compgen -f -X "$xspec" -- \ - \"${cur#[\`\"\']}\" 2>/dev/null ) \ - $( compgen -d -- $cur ) ) -} -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 - -### Local Variables: -### mode: shell-script -### End: diff --git a/debian/bash_completion/bash_completion.sh b/debian/bash_completion/bash_completion.sh deleted file mode 100644 index cb85219..0000000 --- a/debian/bash_completion/bash_completion.sh +++ /dev/null @@ -1,18 +0,0 @@ -# $Id: bash_completion.sh,v 1.2 2006/02/25 01:21:33 ianmacd Exp $ - -# Check for bash (and that we haven't already been sourced). -[ -z "$BASH_VERSION" -o -n "$BASH_COMPLETION" ] && return - -# Check for recent enough version of bash. -bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} - -# Check for interactive shell. -if [ -n "$PS1" ]; then - if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then - if [ -r /etc/bash_completion ]; then - # Source completion code. - . /etc/bash_completion - fi - fi -fi -unset bash bminor bmajor diff --git a/debian/bash_completion/contrib/bitkeeper b/debian/bash_completion/contrib/bitkeeper deleted file mode 100644 index 0e9adf8..0000000 --- a/debian/bash_completion/contrib/bitkeeper +++ /dev/null @@ -1,21 +0,0 @@ -# BitKeeper completion adapted from code by Bart Trojanowski -# -# $Id: bitkeeper,v 1.2 2002/06/12 22:03:23 ianmacd Exp $ -# - -_bk() { - local BKCMDS - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - BKCMDS="$( bk help topics | grep '^ bk' | cut -d ' ' -f 4 | \ - xargs echo )" - - COMPREPLY=( $( compgen -W "$BKCMDS" -- "$cur" ) ) - _filedir - - return 0 -} -complete -F _bk bk - diff --git a/debian/bash_completion/contrib/bittorrent b/debian/bash_completion/contrib/bittorrent deleted file mode 100644 index 539a3e0..0000000 --- a/debian/bash_completion/contrib/bittorrent +++ /dev/null @@ -1,37 +0,0 @@ -# btdownloadheadless(1) completion by Guillaume Rousse -# -# $Id: bittorrent,v 1.1 2004/10/14 08:53:25 ianmacd Exp $ -# -_btdownload() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - --@(responsefile|saveas)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--max_uploads --keepalive_interval \ - --download_slice_size --request_backlog \ - --max_message_length --ip --minport --maxport \ - --responsefile --url --saveas --timeout \ - --timeout_check_interval --max_slice_length \ - --max_rate_period --bind --upload_rate_fudge \ - --display_interval --rerequest_interval \ - --min_peers --http_timeout --max_initiate \ - --max_allow_in --check_hashes \ - --max_upload_rate --snub_time --spew \ - --rarest_first_cutoff --min_uploads \ - --report_hash_failures' -- $cur ) ) - else - _filedir - fi -} -complete -F _btdownload btdownloadheadless.py btdownloadcurses.py btdownloadgui.py diff --git a/debian/bash_completion/contrib/cksfv b/debian/bash_completion/contrib/cksfv deleted file mode 100644 index 3163f66..0000000 --- a/debian/bash_completion/contrib/cksfv +++ /dev/null @@ -1,29 +0,0 @@ -# cksfv completion by Chris -# -# $Id: cksfv,v 1.3 2004/03/30 22:39:11 ianmacd Exp $ - -_cksfv() -{ - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- $cur ) ) - return 0 - fi - - case "${COMP_WORDS[$COMP_CWORD-1]}" in - -C) - _filedir -d - return 0 - ;; - -f) - _filedir 'sfv' - return 0 - ;; - esac - - _filedir - return 0 -} -complete -F _cksfv cksfv diff --git a/debian/bash_completion/contrib/clisp b/debian/bash_completion/contrib/clisp deleted file mode 100644 index 6eb42a1..0000000 --- a/debian/bash_completion/contrib/clisp +++ /dev/null @@ -1,25 +0,0 @@ -# bash brogrammable completion for various Common Lisp implementations by -# Nikodemus Siivola -# -# $Id: clisp,v 1.2 2004/03/30 23:05:45 ianmacd Exp $ - -_clisp() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - # completing an option (may or may not be separated by a space) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help --version --license -B -K \ - -M -m -L -N -E -q --quiet --silent -w -I -ansi \ - -traditional -p -C -norc -i -c -l -o -x ' \ - -- $cur ) ) - else - _filedir - fi - - return 0 -} -complete -F _clisp -o default clisp diff --git a/debian/bash_completion/contrib/dsniff b/debian/bash_completion/contrib/dsniff deleted file mode 100644 index 09dc328..0000000 --- a/debian/bash_completion/contrib/dsniff +++ /dev/null @@ -1,271 +0,0 @@ -# dsniff util completion by Guillaume Rousse -# -# $Id: dsniff,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -# arpspoof(8) completion -# -_arpspoof() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - -t) - _known_hosts - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-i -t' -- $cur ) ) - else - _known_hosts - fi - -} -complete -F _arpspoof arpspoof - -# dnsspoof(8) completion -# -_dnsspoof() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - -f) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-i -f' -- $cur ) ) - fi - -} -complete -F _dnsspoof dnsspoof - -# dsniff(8) completion -# -_dsniff() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(r|w|f)) - _filedir - return 0 - ;; - -i) - _interfaces - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-c -d -m -n -i -s -f -t \ - -r -w' -- $cur ) ) - fi - -} -complete -F _dsniff dsniff - -# filesnarf(8), mailsnarf(8) and msgsnarf (8) completion -# -_snarf() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-i -v' -- $cur ) ) - fi - -} -complete -F _snarf filesnarf mailsnarf msgsnarf - -# macof(8) completion -# -_macof() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - esac - - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-i -s -d -e -x -y -n' -- $cur ) ) - fi - -} -complete -F _macof macof - -# sshmitm(8) completion -# -_sshmitm() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-d -I -p' -- $cur ) ) - else - _known_hosts - fi - -} -complete -F _sshmitm sshmitm - -# sshow(8) completion -# -_sshow() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-d -i' -- $cur ) ) - fi - -} -complete -F _sshow sshow - -# tcpkill(8) completion -# -_tcpkill() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- $cur ) ) - fi - -} -complete -F _tcpkill tcpkill - -# tcpnice(8) completion -# -_tcpnice() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) ) - fi - -} -complete -F _tcpnice tcpnice - -# urlsnarf(8) completion -# -_urlsnarf() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -i) - _interfaces - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-n -i -v' -- $cur ) ) - fi - -} -complete -F _urlsnarf urlsnarf - -# webmitm(8) completion -# -_webmitm() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-d' -- $cur ) ) - else - _known_hosts - fi - -} -complete -F _webmitm webmitm diff --git a/debian/bash_completion/contrib/freeciv b/debian/bash_completion/contrib/freeciv deleted file mode 100644 index 6f4b6c8..0000000 --- a/debian/bash_completion/contrib/freeciv +++ /dev/null @@ -1,63 +0,0 @@ -# civserver completion by Guillaume Rousse -# -# $Id: freeciv,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -_civserver() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(f|g|l|r|-file|-log|-gamelog|-read)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-d -f -g -h -i -l -m -M -p -q -r -v\ - --debug --file --gamelog --help --info --log --meta \ - --Metaserver --port --quitidle --read --version' \ - -- $cur ) ) - fi - -} -complete -F _civserver civserver - -# civclient completion by Guillaume Rousse -# -_civclient() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(l|S|t|-log|-Sound|-tiles)) - _filedir - return 0 - ;; - -@(P|-Plugin)) - COMPREPLY=( $( compgen -W 'none esd sdl' -- $cur ) ) - return 0 - ;; - -@(s|-server)) - _known_hosts - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-a -d -h -l -m -n -p -P -s -S -t -v\ - --autoconnect --debug --help --log --meta --name \ - --port --Plugin --server --Sound --tiles --version' \ - -- $cur ) ) - fi - -} -complete -F _civclient civclient diff --git a/debian/bash_completion/contrib/gcl b/debian/bash_completion/contrib/gcl deleted file mode 100644 index 9e1b011..0000000 --- a/debian/bash_completion/contrib/gcl +++ /dev/null @@ -1,24 +0,0 @@ -# bash programmable completion for various Common Lisp implementations by -# Nikodemus Siivola -# -# $Id: gcl,v 1.2 2004/03/30 23:05:45 ianmacd Exp $ - -_gcl() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - # completing an option (may or may not be separated by a space) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-eval -load -f -batch -dir -libdir \ - -compile -o-file -c-file -h-file -data-file -system-p '\ - -- $cur ) ) - else - _filedir - fi - - return 0 -} -complete -F _gcl -o default gcl diff --git a/debian/bash_completion/contrib/gkrellm b/debian/bash_completion/contrib/gkrellm deleted file mode 100644 index 1fe2d01..0000000 --- a/debian/bash_completion/contrib/gkrellm +++ /dev/null @@ -1,36 +0,0 @@ -# gkrellm(1) completion by Guillaume Rousse -# -# $Id: gkrellm,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -_gkrellm() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(t|-theme)) - _filedir -d - return 0 - ;; - -@(p|-plugin)) - _filedir 'so' - return 0 - ;; - -@(s|-server)) - _known_hosts - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--help -t --theme -s --server \ - -g --geometry -wm -w --withdrawn -c --config -nc \ - -f --force-host-config -demo -p --plugin -P \ - --port' -- $cur ) ) - fi - -} -complete -F _gkrellm gkrellm diff --git a/debian/bash_completion/contrib/gnatmake b/debian/bash_completion/contrib/gnatmake deleted file mode 100644 index cadf360..0000000 --- a/debian/bash_completion/contrib/gnatmake +++ /dev/null @@ -1,31 +0,0 @@ -# Gnatmake completion by Ralf_Schroth@t-online.de (Ralf Schroth) -# -# $Id: gnatmake,v 1.1 2002/08/19 16:57:44 ianmacd Exp $ -# -_gnatmake() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - # relevant (and less relevant ;-) )options completion - COMPREPLY=( $( compgen -W '-a -c -f -i -j -k -m -M -n -o \ - -q -s -v -z -aL -A -aO -aI -I -I- -L -nostdinc \ - -nostdlib -cargs -bargs -largs -fstack-check \ - -fno-inline -g -O1 -O0 -O2 -O3 -gnata -gnatA \ - -gnatb -gnatc -gnatd -gnatD -gnate -gnatE \ - -gnatf -gnatF -gnatg -gnatG -gnath -gnati \ - -gnatk -gnatl -gnatL -gnatm -gnatn -gnato \ - -gnatO -gnatp -gnatP -gnatq -gnatR -gnats \ - -gnatt -gnatT -gnatu -gnatU -gnatv -gnatws \ - -gnatwe -gnatwl -gnatwu -gnatW -gnatx -gnatX \ - -gnaty -gnatz -gnatZ -gnat83' -- $cur ) ) - else - # source file completion - _filedir '@(adb|ads)' - - fi -} -complete -F _gnatmake -o filenames gnatmake diff --git a/debian/bash_completion/contrib/harbour b/debian/bash_completion/contrib/harbour deleted file mode 100644 index ccb0b83..0000000 --- a/debian/bash_completion/contrib/harbour +++ /dev/null @@ -1,8 +0,0 @@ -# harbour completion by Dave Pearson -# http://www.harbour-project.org/ -# -# $Id: harbour,v 1.3 2003/12/31 08:22:37 ianmacd Exp $ - -complete -f -X '!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])' harbour gharbour hbpp -complete -f -X '!*.[Hh][Rr][Bb]' hbrun - diff --git a/debian/bash_completion/contrib/hg b/debian/bash_completion/contrib/hg deleted file mode 100644 index a5d9262..0000000 --- a/debian/bash_completion/contrib/hg +++ /dev/null @@ -1,134 +0,0 @@ -# Mercurial completion by Alexis S. L. Carvalho -# -# See: http://www.selenic.com/pipermail/mercurial/2005-August/003378.html -# -# $Id: hg,v 1.1 2006/02/26 00:25:41 ianmacd Exp $ -# -_hg_commands() -{ - local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \ - -e '/^global options:/Q' \ - -e '/^ [^ ]/!d; s/[,:]//g;')" - - # hide debug commands from users, but complete them if - # specifically asked for - if [[ "$cur" == de* ]]; then - commands="$commands debugcheckstate debugstate debugindex" - commands="$commands debugindexdot debugwalk" - fi - COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cur") ) -} - -_hg_paths() -{ - local paths="$(hg paths | sed -e 's/ = .*$//')" - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -W "$paths" -- "$cur" )) -} - -_hg_tags() -{ - local tags="$(hg tags | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//')" - COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$tags" -- "$cur") ) -} - -# this is "kind of" ugly... -_hg_count_non_option() -{ - local i count=0 - local filters="$1" - - for (( i=1; $i<=$COMP_CWORD; i++ )); do - if [[ "${COMP_WORDS[i]}" != -* ]]; then - for f in $filters; do - if [[ ${COMP_WORDS[i-1]} == $f ]]; then - continue 2 - fi - done - count=$(($count + 1)) - fi - done - - echo $(($count - 1)) -} - -_hg() -{ - local cur prev cmd opts i - - COMPREPLY=() - cur="$2" - prev="$3" - - # searching for the command - # (first non-option argument that doesn't follow -R/--repository) - for (( i=1; $i<=$COMP_CWORD; i++ )); do - if [[ ${COMP_WORDS[i]} != -* ]] \ - && [ "${COMP_WORDS[i-1]}" != -R ] \ - && [ "${COMP_WORDS[i-1]}" != --repository ]; then - cmd="${COMP_WORDS[i]}" - break - fi - done - - if [[ "$cur" == -* ]]; then - opts="$(hg -v help | sed -e '1,/^global options/d; /^ -/!d')" - - if [ -n "$cmd" ]; then - opts="$opts $(hg help "$cmd" | sed -e '/^ -/!d; s/ [^-][^ ]*//')" - fi - - COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$opts" -- "$cur") ) - return - fi - - if [ "$prev" = -R ] || [ "$prev" = --repository ]; then - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" )) - return - fi - - if [ -z "$cmd" ] || [ $COMP_CWORD -eq $i ]; then - _hg_commands - return - fi - - if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" = --rev ]; then - _hg_tags - return - fi - - case "$cmd" in - help) - _hg_commands - ;; - export|manifest|update|checkout|up|co) - _hg_tags - ;; - pull|push) - _hg_paths - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" )) - ;; - paths) - _hg_paths - ;; - clone) - local count=$(_hg_count_non_option) - if [ $count = 1 ]; then - _hg_paths - fi - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" )) - ;; - cat) - local count=$(_hg_count_non_option -o --output) - if [ $count = 2 ]; then - _hg_tags - else - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" )) - fi - ;; - *) - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" )) - ;; - esac - -} -complete -o filenames -F _hg hg diff --git a/debian/bash_completion/contrib/isql b/debian/bash_completion/contrib/isql deleted file mode 100644 index d4c21ab..0000000 --- a/debian/bash_completion/contrib/isql +++ /dev/null @@ -1,12 +0,0 @@ -# isql completion by Victor Bogado da Silva Lins -# -# $Id: isql,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -_isql() -{ - local cur - cur=${COMP_WORDS[COMP_CWORD]} - - COMPREPLY=( $( grep \\[$cur $ODBCINI | tr -d \\[\\] ) ) -} -complete -F _isql isql diff --git a/debian/bash_completion/contrib/larch b/debian/bash_completion/contrib/larch deleted file mode 100644 index 60ab6e9..0000000 --- a/debian/bash_completion/contrib/larch +++ /dev/null @@ -1,38 +0,0 @@ -# larch(1) completion by Alex Shinn -# -# $Id: larch,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -_larch() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - if [ $COMP_CWORD -eq 1 ] || [[ "$prev" == -* ]]; then - COMPREPLY=( $( compgen -W ' \ -my-id my-default-archive register-archive whereis-archive archives \ -init-tree tree-root tree-version set-tree-version inventory tagging-method \ -tree-lint missing-tags add delete move explicit-default set-manifest \ -manifest check-manifest mkpatch dopatch patch-report empty-patch \ -make-archive make-category make-branch make-version categories \ -branches versions revisions cat-archive-log archive-cache-revision \ -archive-cached-revisions archive-uncache-revision category-readme \ -branch-readme version-readme make-log logs add-log log-ls cat-log \ -log-header-field changelog log-for-merge merge-points new-on-branch \ -import commit get get-patch lock-branch lock-revision push-mirror \ -build-config update-config replay-config record-config show-config \ -config-history update replay delta-patch star-merge tag prepare-branch \ -finish-branch join-branch whats-missing what-changed file-diffs pristines \ -lock-pristine my-revision-library library-find library-add library-remove \ -library-archives library-categories library-branches library-versions \ -library-revisions library-log library-file touched-files-prereqs \ -patch-set-web update-distributions distribution-name notify my-notifier \ -mail-new-categories mail-new-branches mail-new-versions mail-new-revisions \ -notify-library notify-browser push-new-revisions sendmail-mailx' $cur )) - fi - - return 0 -} -complete -F _larch -o default larch diff --git a/debian/bash_completion/contrib/lilypond b/debian/bash_completion/contrib/lilypond deleted file mode 100644 index 0e71904..0000000 --- a/debian/bash_completion/contrib/lilypond +++ /dev/null @@ -1,5 +0,0 @@ -# lilypond completion by Laurent Martelli -# -# $Id: lilypond,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -complete -f -X '!*.ly' lilypond ly2dvi diff --git a/debian/bash_completion/contrib/lisp b/debian/bash_completion/contrib/lisp deleted file mode 100644 index f1afe8d..0000000 --- a/debian/bash_completion/contrib/lisp +++ /dev/null @@ -1,25 +0,0 @@ -# bash programmable completion for various Common Lisp implementations by -# Nikodemus Siivola -# -# $Id: lisp,v 1.2 2004/03/30 23:05:45 ianmacd Exp $ - -_lisp() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - # completing an option (may or may not be separated by a space) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-core -lib -batch -quit -edit -eval -init \ - -dynamic-space-size -hinit -noinit -nositeinit -load \ - -slave ' \ - -- $cur ) ) - else - _filedir - fi - - return 0 -} -complete -F _lisp -o default lisp diff --git a/debian/bash_completion/contrib/mailman b/debian/bash_completion/contrib/mailman deleted file mode 100644 index 0d92a01..0000000 --- a/debian/bash_completion/contrib/mailman +++ /dev/null @@ -1,532 +0,0 @@ -# Mailman completion by Guillaume Rousse -# -# $Id: mailman,v 1.1 2004/03/30 23:05:34 ianmacd Exp $ -# -_mailman_lists() -{ - COMPREPLY=( $( list_lists -b | grep "^$cur") ) -} - -_add_members() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(r|d|-regular-members-file=|-digest-members-file=)) - _filedir - return 0 - ;; - -@(w|a|-welcome-msg=|-admin-notify=)) - COMPREPLY=( $( compgen -W 'y n' -- $cur) ) - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--regular-members-file= -r \ - --digest-members-file= -d --welcome-msg= -w \ - --admin-notify= -a --help -h' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _add_members add_members - -_remove_members() -{ - - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(f|-file=)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--file= -f --all -a \ - --fromall --nouserack -n --noadminack -N \ - --help -h' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _remove_members remove_members - -_find_member() -{ - - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(l|x|-listname=|-exclude=)) - _mailman_lists - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-l --listname= -x \ - --exclude= --owners -w --help -h' -- $cur ) ) - fi - -} -complete -F _find_member find_member - -_clone_member() -{ - - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(l|-listname=)) - _mailman_lists - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-l --listname= --remove -r \ - --admin -a --quiet -q --nomodify -n --help -h' -- $cur ) ) - fi - -} -complete -F _clone_member clone_member - -_sync_members() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(w|g|d|--welcome-msg=|-goodbye-msg|-digest=)) - COMPREPLY=( $( compgen -W 'y n' -- $cur) ) - return 0 - ;; - -@(d|-file)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--no-change -n --welcome-msg= -w \ - --goodbye-msg= -g --digest= -d --notifyadmin= -a \ - -f --file -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _sync_members sync_members - -_list_lists() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-a --advertised \ - --virtual-host-overview= -V -b --bare \ - -h --help' -- $cur ) ) - fi - -} -complete -F _list_lists list_lists - -_unshunt() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-h --help' -- $cur ) ) - else - _filedir -d - fi - -} -complete -F _unshunt unshunt - -_list_admins() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--all-vhost= -v \ - --all -a -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _list_admins list_admins - -_list_owners() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-w --with-listnames \ - -m --moderators -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _list_owners list_owners - -_list_members() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(o|-output)) - _filedir - return 0 - ;; - -@(d|-digest=)) - COMPREPLY=( $( compgen -W 'mime plain' -- $cur) ) - return 0 - ;; - -@(n|-nomail=)) - COMPREPLY=( $( compgen -W 'byadmin byuser bybounce unknown' -- $cur) ) - return 0 - ;; - esac - - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--output -o --regular -r \ - --digest= -d --nomail= -n --fullnames -f \ - --preserve -p -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _list_members list_members - -_change_pw() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(l|-listname=)) - _mailman_lists - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-a --all --domain= -d --listname= -l \ - --password= -p --quiet -q -h --help' -- $cur ) ) - fi - -} -complete -F _change_pw change_pw - -_withlist() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-l --lock -i --interactive \ - -r --run -a --all -q --quiet -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _withlist withlist - -_newlist() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-l --language -q --quiet -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _newlist newlist - -_rmlist() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--archives -a \ - -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _rmlist rmlist - -_config_list() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(i|o|-inputfile|-outputfile)) - _filedir - return 0 - ;; - esac - - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--inputfile -i --outputfile -o \ - --checkonly -c --verbose -v -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _config_list $filenames config_list - -_arch() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(w|g|d|--welcome-msg=|-goodbye-msg|-digest=)) - COMPREPLY=( $( compgen -W 'y n' -- $cur) ) - return 0 - ;; - -@(d|-file)) - _filedir - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--wipe -s --start= -e --end= \ - -q --quiet -h --help' -- $cur ) ) - else - args=$COMP_CWORD - for (( i=1; i < COMP_CWORD; i++ )); do - if [[ "${COMP_WORDS[i]}" == -* ]]; then - args=$(($args-1)) - fi - done - case $args in - 1) - _mailman_lists - ;; - 2) - _filedir - ;; - esac - fi - -} -complete -F _arch $filenames arch - -_cleanarch() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-s --status -n --dry-run \ - -q --quiet -h --help' -- $cur ) ) - fi - -} -complete -F _cleanarch cleanarch - -_inject() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(l|-listname=)) - _mailman_lists - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-l --listname= -q --queue= \ - -h --help' -- $cur ) ) - else - _filedir - fi - -} -complete -F _inject $filenames inject - -_dumpdb() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--marshal -m --pickle -p --noprint -n -h --help' -- $cur ) ) - else - _filedir - fi - -} -complete -F _dumpdb $filenames dumpdb - -_check_db() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--all -a --verbose -v \ - -h --help' -- $cur ) ) - else - _mailman_lists - fi - -} -complete -F _check_db check_db - -_check_perms() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-f -v -h' -- $cur ) ) - fi - -} -complete -F _check_perms check_perms - -_genaliases() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-q --quiet -h --help' -- $cur ) ) - fi - -} -complete -F _genaliases genaliases - -_mmsitepass() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-c --listcreator -h --help' -- $cur ) ) - fi - -} -complete -F _mmsitepass mmsitepass - -_qrunner() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-r --runner= --once -o \ - -l --list -v --verbose -s --subproc -h --help' -- $cur ) ) - fi - -} -complete -F _qrunner qrunner - -_mailmanctl() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-n --no-restart -u --run-as-user \ - -s --stale-lock-cleanup --quiet -q -h --help' -- $cur ) ) - else - COMPREPLY=( $( compgen -W 'start stop restart reopen' -- $cur ) ) - fi - -} -complete -F _mailmanctl mailmanctl diff --git a/debian/bash_completion/contrib/mcrypt b/debian/bash_completion/contrib/mcrypt deleted file mode 100644 index 8b4e1db..0000000 --- a/debian/bash_completion/contrib/mcrypt +++ /dev/null @@ -1,79 +0,0 @@ -# mcrypt(1) completion by Ariel Fermani -# -# $Id: mcrypt,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -_mcrypt() -{ - local cur prev i decrypt - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - case "$prev" in - -@(g|-openpgp-z)) - COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' \ - -- $cur ) ) - return 0 - ;; - -@(o|-keymode)) - COMPREPLY=( $( mcrypt --list-keymodes 2> /dev/null | - grep "^$cur" ) ) - return 0 - ;; - -@(m|-mode)) - COMPREPLY=( $( mcrypt --list 2> /dev/null | - sed -e 's/.*: //' -e 's/ $//' | sort | - uniq | tr " " "\n" | grep "^$cur" ) ) - return 0 - ;; - -@(a|-algorithm)) - COMPREPLY=( $( mcrypt --list 2> /dev/null | - awk '{print $1}' | grep "^$cur" ) ) - return 0 - ;; - -@(h|-hash)) - COMPREPLY=( $( mcrypt --list-hash 2> /dev/null | - sed 1d | grep "^$cur" ) ) - return 0 - ;; - -@(k|s|-@(key?(size)))) - return 0 - ;; - -@(f|c|-@(keyfile|config))) - _filedir - return 0 - ;; - --@(algorithm|mode)s-directory) - _filedir -d - return 0 - ;; - esac - - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-g --openpgp --openpgp-z -d \ - --decrypt -s --keysize -o --keymode -f --keyfile \ - -c --config -a --algorithm --algorithms-directory \ - -m --mode --modes-directory -h --hash -k --key \ - --noiv -b --bare -z --gzip -p --bzip2 --flush -l \ - --doublecheck -u --unlink --nodelete -t --time -F \ - --force --echo -r --random --list --list-keymodes \ - --list-hash -V --verbose -q --quiet --help -v \ - --version -L --license' -- $cur ) ) - elif [[ ${COMP_WORDS[0]} == mdecrypt ]]; then - _filedir '@(nc)' - else - decrypt=0 - for (( i=1; i < ${#COMP_WORDS[@]}-1; i++ )); do - if [[ ${COMP_WORDS[i]} == -@(d|-decrypt) ]]; then - _filedir '@(nc)' - decrypt=1 - break - fi - done - if [[ $decrypt -eq 0 ]]; then - _filedir - fi - fi -} -complete -o filenames -F _mcrypt mcrypt mdecrypt diff --git a/debian/bash_completion/contrib/modules b/debian/bash_completion/contrib/modules deleted file mode 100644 index 8b180b1..0000000 --- a/debian/bash_completion/contrib/modules +++ /dev/null @@ -1,87 +0,0 @@ -# module completion by Ted Stern -# -# $Id: modules,v 1.2 2005/07/11 17:49:14 ianmacd Exp $ -# -# Completion for Environment Modules `module' alias. -# -# See http://sourceforge.net/projects/modules/ -# http://modules.sourceforge.net/ -# -# There are several versions of modules that are commonly used. Older -# Cray UNICOS systems and many other sites use 2.2.2b. The latest GPL'd -# version is 3.1.6. But the module alias is somewhat self-documenting -# via the `module help' command, so use that to print the options. -# -# Programmable completion might be more difficult under tcsh since the -# module command is an alias, and the `module avail' command returns -# its output as stderr. -# -type module &>/dev/null && { - -_module_list () -{ - local modules="$( echo $LOADEDMODULES | sed 's/:/ /g' | sort )" - compgen -W "$modules" -- $1 -} - -_module_path () -{ - local modules="$( echo $MODULEPATH | sed 's/:/ /g' | sort )" - compgen -W "$modules" -- $1 -} - -_module_avail () -{ - local modules="$( \ - module avail 2>&1 | \ - egrep -v '^(-|$)' | \ - xargs printf '%s\n' | sort )" - - compgen -W "$modules" -- $1 -} - -# A completion function for the module alias -_module () { - local cur prev options - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - if [ $COMP_CWORD -eq 1 ] ; then - # First parameter on line -- we expect it to be a mode selection - - options="$( module help 2>&1 | egrep '^[[:space:]]*\+' | \ - awk '{print $2}' | sed -e 's/|/ /g' | sort )" - - COMPREPLY=( $(compgen -W "$options" -- $cur) ) - - elif [ $COMP_CWORD -eq 2 ] ; then - - case "$prev" in - @(add|display|help|load|show|whatis)) - COMPREPLY=( $(_module_avail $cur) ) - ;; - - @(rm|switch|swap|unload|update)) - COMPREPLY=( $(_module_list $cur) ) - ;; - unuse) - COMPREPLY=( $(_module_path $cur) ) - ;; - esac - elif [ $COMP_CWORD -eq 3 ] ; then - case ${COMP_WORDS[1]} in - @(sw?(ap|itch))) - COMPREPLY=( $(_module_avail $cur) ) - ;; - esac - fi - return 0 -} -complete -o default -F _module module -} -# Local Variables: -# mode:shell-script -# sh-shell:bash -# End: diff --git a/debian/bash_completion/contrib/mtx b/debian/bash_completion/contrib/mtx deleted file mode 100644 index 22b855d..0000000 --- a/debian/bash_completion/contrib/mtx +++ /dev/null @@ -1,45 +0,0 @@ -# mtx completion by Jon Middleton -# -# $Id: mtx,v 1.1 2004/01/01 00:54:41 ianmacd Exp $ - -_mtx() -{ - local cur prev options tapes drives - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - options="-f nobarcode invert noattach --version inquiry noattach \ - inventory status load unload eepos first last next" - - tapes=$(mtx status | \ - awk '/Storage Element [0-9]+:Full/ { printf "%s ", $3 }') - tapes=${tapes//:Full} - - drives=$(mtx status | \ - awk '/Data Transfer Element [0-9]+:(Full|Empty)/ { printf "%s ", $4 }') - drives=${drives//:Full} - drives=${drives//:Empty} - - if [ $COMP_CWORD -gt 1 ]; then - case $prev in - load) - COMPREPLY=( $( compgen -W "$tapes" -- $cur ) ) - ;; - unload|first|last|next) - COMPREPLY=( $( compgen -W "$drives" -- $cur ) ) - ;; - -f) - true - ;; - *) - true - ;; - esac - else - COMPREPLY=( $( compgen -W "$options" -- $cur ) ) - fi - return 0 -} -complete -F _mtx mtx diff --git a/debian/bash_completion/contrib/p4 b/debian/bash_completion/contrib/p4 deleted file mode 100644 index d561722..0000000 --- a/debian/bash_completion/contrib/p4 +++ /dev/null @@ -1,54 +0,0 @@ -# Perforce completion by Frank Cusack -# -# $Id: p4,v 1.3 2003/12/31 08:22:37 ianmacd Exp $ - -_p4() -{ - local cur prev prev2 p4commands p4filetypes - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - # rename isn't really a command - p4commands="$( p4 help commands | awk 'NF>3 {print $1}' )" - p4filetypes="ctext cxtext ktext kxtext ltext tempobj ubinary \ - uresource uxbinary xbinary xltext xtempobj xtext \ - text binary resource" - - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -W "$p4commands" -- $cur ) ) - elif [ $COMP_CWORD -eq 2 ]; then - case "$prev" in - help) - COMPREPLY=( $( compgen -W "simple commands \ - environment filetypes jobview revisions \ - usage views $p4commands" -- $cur ) ) - ;; - admin) - COMPREPLY=( $( compgen -W "checkpoint stop" -- $cur ) ) - ;; - *) - ;; - esac - elif [ $COMP_CWORD -gt 2 ]; then - prev2=${COMP_WORDS[COMP_CWORD-2]} - case "$prev" in - -t) - case "$prev2" in - add|edit|reopen) - COMPREPLY=( $( compgen -W "$p4filetypes" \ - -- $cur) ) - ;; - *) - ;; - esac - ;; - *) - ;; - esac - fi - - return 0 -} -complete -F _p4 -o default p4 g4 diff --git a/debian/bash_completion/contrib/povray b/debian/bash_completion/contrib/povray deleted file mode 100644 index cea5482..0000000 --- a/debian/bash_completion/contrib/povray +++ /dev/null @@ -1,58 +0,0 @@ -# povray completion by "David Necas (Yeti)" -# -# $Id: povray,v 1.2 2003/12/31 08:22:37 ianmacd Exp $ - -_povray() -{ - local cur prev povcur pfx oext defoext - defoext=png # default output extension, if cannot be determined FIXME - - COMPREPLY=() - povcur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - _expand || return 0 - - case $povcur in - [-+]I*) - cur="${povcur#[-+]I}" # to confuse _filedir - pfx="${povcur%"$cur"}" - _filedir pov - COMPREPLY=( ${COMPREPLY[@]/#/$pfx} ) - return 0 - ;; - [-+]O*) - # guess what output file type user may want - case $( ( IFS=$'\n'; echo "${COMP_WORDS[*]}" | grep '^[-+]F' ) ) in - [-+]FN) oext=png ;; - [-+]FP) oext=ppm ;; - [-+]F[CT]) oext=tga ;; - *) oext=$defoext ;; - esac - # complete filename corresponding to previously specified +I - COMPREPLY=( $( ( IFS=$'\n'; echo "${COMP_WORDS[*]}" | grep '^[-+]I' ) ) ) - COMPREPLY=( ${COMPREPLY[@]#[-+]I} ) - COMPREPLY=( ${COMPREPLY[@]/%.pov/.$oext} ) - cur="${povcur#[-+]O}" # to confuse _filedir - pfx="${povcur%"$cur"}" - _filedir $oext - COMPREPLY=( ${COMPREPLY[@]/#/$pfx} ) - return 0 - ;; - *.ini\[|*.ini\[*[^]]) # sections in .ini files - cur="${povcur#*\[}" - pfx="${povcur%\["$cur"}" # prefix == filename - [ -r "$pfx" ] || return 0 - COMPREPLY=( $(sed -e 's/^[[:space:]]*\[\('"$cur"'[^]]*\]\).*$/\1/' -e 't' -e 'd' -- "$pfx") ) - # to prevent [bar] expand to nothing. can be done more easily? - COMPREPLY=( "${COMPREPLY[@]/#/$pfx[}" ) - return 0 - ;; - *) - cur="$povcur" - _filedir '?(ini|pov)' - return 0 - ;; - esac -} -complete -F _povray -o filenames povray xpovray spovray diff --git a/debian/bash_completion/contrib/ri b/debian/bash_completion/contrib/ri deleted file mode 100644 index bbb1f3f..0000000 --- a/debian/bash_completion/contrib/ri +++ /dev/null @@ -1,88 +0,0 @@ -# ri completion for Ruby documentation by Ian Macdonald -# -# $Id: ri,v 1.8 2006/02/25 14:25:59 ianmacd Exp $ -# -ri_get_methods() -{ - local regex - - if [ "$ri_version" = integrated ]; then - if [ -z "$separator" ]; then - regex="(Instance|Class)" - elif [ "$separator" = "#" ]; then - regex=Instance - else - regex=Class - fi - - COMPREPLY=( ${COMPREPLY[@]} \ - "$( ri ${classes[@]} 2>/dev/null | \ - ruby -ane 'if /^'"$regex"' methods:/.../^------------------|^$/ and \ - /^ / then print $_.split(/, |,$/).grep(/^[^\[]*$/).join("\n"); \ - end' | sort -u )" ) - else - # older versions of ri didn't distinguish between class/module and - # instance methods - COMPREPLY=( ${COMPREPLY[@]} \ - "$( ruby -W0 $ri_path ${classes[@]} | ruby -ane 'if /^-/.../^-/ and \ - ! /^-/ and ! /^ +(class|module): / then \ - print $_.split(/, |,$| +/).grep(/^[^\[]*$/).join("\n"); \ - end' | sort -u )" ) - fi - COMPREPLY=( $( compgen $prefix -W '${COMPREPLY[@]}' -- $method ) ) -} - -# needs at least Ruby 1.8.0 in order to use -W0 -_ri() -{ - local cur class method prefix ri_path ri_version separator IFS - local -a classes - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - ri_path=$(type -p ri) - # which version of ri are we using? - # -W0 is required here to stop warnings from older versions of ri - # from being captured when used with Ruby 1.8.1 and later - ri_version="$(ruby -W0 $ri_path -v 2>&1)" || ri_version=integrated - [ "$ri_version" != "${ri_version%200*}" ] && ri_version=integrated - - # need to also split on commas - IFS=$', \n\t' - if [[ "$cur" == [A-Z]*[#.]* ]]; then - [[ "$cur" == *#* ]] && separator=# || separator=. - # we're completing on class and method - class=${cur%$separator*} - method=${cur#*$separator} - classes=( $class ) - prefix="-P $class$separator" - ri_get_methods - return 0 - fi - - if [ "$ri_version" = integrated ]; then - # integrated ri from Ruby 1.9 - classes=( $( ri -c | ruby -ne 'if /^\s*$/..$stdin.eof then \ - if /, [A-Z]+/ then print; end; end' ) ) - elif [ "$ri_version" = "ri 1.8a" ]; then - classes=( $( ruby -W0 $ri_path | \ - ruby -ne 'if /^'"'"'ri'"'"' has/..$stdin.eof then \ - if /^ .*[A-Z]/ then print; end; end' )) - else - classes=( $( ruby -W0 $ri_path | \ - ruby -ne 'if /^I have/..$stdin.eof then \ - if /^ .*[A-Z]/ then print; end; end' )) - fi - - COMPREPLY=( $( compgen -W '${classes[@]}' -- $cur ) ) - if [[ "$cur" == [A-Z]* ]]; then - # we're completing on class or module alone - return 0 - fi - - # we're completing on methods - method=$cur - ri_get_methods -} -complete -F _ri ri diff --git a/debian/bash_completion/contrib/sbcl b/debian/bash_completion/contrib/sbcl deleted file mode 100644 index 51ecddd..0000000 --- a/debian/bash_completion/contrib/sbcl +++ /dev/null @@ -1,24 +0,0 @@ -# bash programmable completion for various Common Lisp implementations by -# Nikodemus Siivola -# -# $Id: sbcl,v 1.2 2004/03/30 23:05:45 ianmacd Exp $ - -_sbcl() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - # completing an option (may or may not be separated by a space) - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '--core --noinform --help --version \ - --sysinit --userinit --eval --noprint --disable-debugger \ - --end-runtime-options --end-toplevel-options ' -- $cur ) ) - else - _filedir - fi - - return 0 -} -complete -F _sbcl -o default sbcl sbcl-mt diff --git a/debian/bash_completion/contrib/sitecopy b/debian/bash_completion/contrib/sitecopy deleted file mode 100644 index 09a49f5..0000000 --- a/debian/bash_completion/contrib/sitecopy +++ /dev/null @@ -1,30 +0,0 @@ -# sitecopy(1) completion -# Copyright 2003 Eelco Lempsink -# License: GNU GPL v2 or later -# -# $Id: sitecopy,v 1.3 2005/01/03 02:44:22 ianmacd Exp $ - -_sitecopy() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - case "$cur" in - --*) - COMPREPLY=( $( compgen -W "$(sitecopy -h | grep -e '--\w' | awk '{sub (/=(FILE|PATH)/, "", $2); print $2}')" -- $cur ) ) - ;; - -*) - COMPREPLY=( $( compgen -W "$(sitecopy -h | grep -e '-\w' | awk '{sub (",", "", $1); print $1}')" -- $cur ) ) - ;; - *) - if [ -r ~/.sitecopyrc ]; then - COMPREPLY=( $( compgen -W "$(grep '^["$'\t '"]*site' ~/.sitecopyrc | awk '{print $2}')" -- $cur ) ) - fi - ;; - esac - - return 0 -} -complete -F _sitecopy -o default sitecopy diff --git a/debian/bash_completion/contrib/snownews b/debian/bash_completion/contrib/snownews deleted file mode 100644 index 8a1d1f4..0000000 --- a/debian/bash_completion/contrib/snownews +++ /dev/null @@ -1,18 +0,0 @@ -# snownews completion by Guillaume Rousse -# -# $Id: snownews,v 1.2 2005/01/03 03:00:44 ianmacd Exp $ - -_snownews() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - if [[ "$cur" == -* ]]; then - # return list of available options - COMPREPLY=( $( compgen -W '--update --help --version \ - --disable-versioncheck -u -h -V' -- $cur)) - fi -} -complete -F _snownews snownews diff --git a/debian/bash_completion/contrib/svk b/debian/bash_completion/contrib/svk deleted file mode 100644 index 70cd81f..0000000 --- a/debian/bash_completion/contrib/svk +++ /dev/null @@ -1,262 +0,0 @@ -# svk completion by Guillaume Rousse -# -# $Id: svk,v 1.1 2006/03/01 10:45:03 ianmacd Exp $ - -_svk() -{ - local cur prev commands options command - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - commands='add admin annotate ann blame praise cat checkout co cleanup \ - cmerge cm commit ci copy cp delete del remove rm depotmap \ - depot describe desc diff di help h ? import info list ls log \ - merge mirror mi mkdir move mv ren rename patch propdel pd pdel \ - propedit pe pedit propget pg pget proplist pl plist propset ps \ - pset pull push resolved revert smerge sm status st stat switch \ - sw sync sy update up 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 - -@(F|-file|-targets)) - _filedir - return 0; - ;; - --encoding) - COMPREPLY=( $( compgen -W \ - '$( iconv --list | sed -e "s@//@@;" )' \ - -- "$cur" ) ) - return 0; - ;; - esac - - command=${COMP_WORDS[1]} - - if [[ "$cur" == -* ]]; then - # possible options for the command - case $command in - add) - options=' --non-recursive -N -q --quiet' - ;; - @(blame|annotate|ann|praise)) - options='-r --revisions -x --cross' - ;; - cat) - options='-r --revision' - ;; - @(checkout|co)) - options='-r --revision -q --quiet -N \ - --non-recursive -l --list -d \ - --detach --export --relocate \ - --purge' - ;; - cleanup) - options='-a --all' - ;; - @(cmerge|cm)) - options='-c --change -l --log -r \ - --revision -a --auto \ - --verbatim --no-ticket -m \ - --message -F --file --template \ --encoding -P --patch -S \ - --sign -C --check-only --direct' - ;; - @(commit|ci)) - options='--import -m --message -F \ - --file --encoding --template \ - -P --patch -S --sign -C \ - --check-only -N \ - --non-recursive --direct' - ;; - @(copy|cp)) - options='-r --revision -p --parent -q \ - --quiet -m --message -F --file \ - --template --encoding -P \ - --patch -S --sign -C \ - --check-only --direct' - ;; - @(delete|del|remove|rm)) - options='-k --keep-local -m --message \ - -F --file --encoding \ - --template -P --patch -S \ - --sign -C --check-only --direct' - ;; - @(depotmap|depot)) - options='-i --init -l --list -d \ - --detach --relocate' - ;; - @(diff|di)) - options='-r --revision -s --summarize \ - -b --verbose -N --non-recursive' - ;; - import) - options='-f --from-checkout -t \ - --to-checkout -m --message -F \ - --file --template --encoding \ - -P --patch -S --sign -C \ - --check-only -N \ - --non-recursive --direct' - ;; - @(list|ls)) - options='-r --revision -v --verbose -R \ - --recursive -d --depth -f \ - --full-path' - ;; - log) - options='-r --revision -l --limit -q \ - --quiet -x --cross -v --verbose' - ;; - merge) - options='-r --revision -c --change -I \ - --incremental -a --auto -l \ - --log -s --sync -t --to -f \ - --from --verbatim --no-ticket \ - --track-rename -m --message \ - -F --file --template \ - --encoding -P --patch -S \ - --sign -C --check-only --direct' - ;; - @(mirror|mi)) - options='-l --list -d --detach \ - --relocate --recover --unlock \ - --upgrade' - ;; - mkdir) - options='-p --parent -m --message -F \ - --file --template --encoding \ - -P --patch -S --sign -C \ - --check-only --direct' - ;; - @(move|mv|rename|ren)) - options='-r --revision -p --parent -q \ - --quiet -m --message -F --file \ - --encoding --template -P \ - --patch -S --sign -C \ - --check-only --direct' - ;; - patch) - options='--depot' - ;; - @(propdel|propset|pdel|pset|pd|ps)) - options='-R --recursive -r --revision \ - --revprop -m --message -F \ - --file --template --encoding \ - -P --patch -S --sign -C \ - --check-only -q --quiet \ - --direct' - ;; - @(propedit|pedit|pe)) - options='-R --recursive -r --revision \ - --revprop -m --message -F \ - --file --template --encoding \ - -P --patch -S --sign -C \ - --check-only --direct' - ;; - @(propget|pget|pg)) - options='-R --recursive -r --revision \ - --revprop --strict' - ;; - @(proplist|plist|pl)) - options='-R --recursive -v --verbose \ - -r --revision --revprop' - ;; - pull) - options='-a --all -l --lump' - ;; - push) - options='-f --from -l --lump -C \ - --check -P --patch -S --sign \ - --verbatim' - ;; - resolved) - options='-R --recursive' - ;; - revert) - options='-R --recursive -q --quiet' - ;; - @(smerge|sm)) - options='-I --incremental -l --log -B \ - --baseless -b --base -s --sync \ - -t --to -f --from --verbatim \ - --no-ticket --track-rename \ - --host --remoterev -m \ - --message -F --file --template \ - --encoding -P --patch -S \ - --sign -C --check-only --direct' - ;; - @(status|stat|st)) - options='-q --quiet --no-ignore -N \ - --non-recursive -v --verbose' - ;; - @(switch|sw)) - options='-r --revision -d --detach -q \ - --quiet' - ;; - @(sync|sy)) - options='-a --all -s --skipto -t \ - --torev' - ;; - @(update|up)) - options='-r --revision -N \ - --non-recursive -C \ - --check-only -s --sync -m \ - --merge -q --quiet' - ;; - esac - options="$options --help -h" - - COMPREPLY=( $( compgen -W "$options" -- $cur ) ) - else - case $command in - @(help|h|\?)) - COMPREPLY=( $( compgen -W "$commands \ - environment commands intro" -- $cur ) ) - ;; - admin) - COMPREPLY=( $( compgen -W 'help \ - deltify dump hotcopy \ - list-dblogs list-unused-dblogs \ - load lstxns recover rmtxns \ - setlog verify rmcache' \ - -- $cur ) ) - ;; - patch) - COMPREPLY=( $( compgen -W '--ls --list \ - --cat --view --regen \ - --regenerate --up --update \ - --apply --rm --delete' \ - -- $cur ) ) - ;; - sync) - COMPREPLY=( $( compgen -W "$( svk \ - mirror --list 2>/dev/null | \ - awk '/^\//{print $1}' )" \ - -- $cur ) ) - ;; - @(co|checkout|push|pull)) - if [[ "$cur" == //*/* ]]; then - path=${cur%/*}/ - else - path=// - fi - COMPREPLY=( $( compgen -W "$( svk \ - list $path 2>/dev/null | sed -e 's|\(.*\)|'$path'\1|')" -- $cur ) ) - ;; - *) - _filedir - ;; - esac - fi - fi - - return 0 -} -complete -F _svk -o default svk diff --git a/debian/bash_completion/contrib/unace b/debian/bash_completion/contrib/unace deleted file mode 100644 index 59f0ca2..0000000 --- a/debian/bash_completion/contrib/unace +++ /dev/null @@ -1,28 +0,0 @@ -# unace(1) completion by Guillaume Rousse -# -# $Id: unace,v 1.3 2003/12/31 08:22:37 ianmacd Exp $ - -_unace() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W '-c -c- -f -f- -o -o- -p -y -y-' -- $cur ) ) - ;; - *) - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -W 'e l t v x' -- $cur ) ) - else - _filedir '@(ace|ACE)' - fi - ;; - esac - - return 0 - -} -complete -F _unace -o filenames unace diff --git a/debian/bash_completion/contrib/unrar b/debian/bash_completion/contrib/unrar deleted file mode 100644 index b47f1d3..0000000 --- a/debian/bash_completion/contrib/unrar +++ /dev/null @@ -1,30 +0,0 @@ -# unrar(1) completion by Guillaume Rousse -# -# $Id: unrar,v 1.4 2004/07/05 23:37:47 ianmacd Exp $ - -_unrar() -{ - local cur - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W '-ad -ap -av- -c- -cfg- -cl -cu \ - -dh -ep -f -idp -ierr -inul -kb -o+ -o- -ow -p -p- -r -ta \ - -tb -tn -to -u -v -ver -vp -x -x@ -y' -- $cur ) ) - ;; - *) - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -W 'e l lb lt p t v vb vt x' -- $cur ) ) - else - _filedir '@(rar|RAR)' - fi - ;; - esac - - return 0 - -} -complete -F _unrar -o filenames unrar diff --git a/debian/bashdb.copyright b/debian/bashdb.copyright deleted file mode 100644 index 6b013cf..0000000 --- a/debian/bashdb.copyright +++ /dev/null @@ -1,430 +0,0 @@ -This is Debian GNU/Linux's prepackaged version of the FSF's GNU Bash, -the Bourne Again SHell. - -This package was put together by Matthias Klose , from -the following sources: - - bash: ftp.gnu.org:/pub/gnu/bash/bash-2.05b.tar.gz - bash_completion: http://freshmeat.net/projects/bashcompletion/ - bashdb: http://bashdb.sf.net/ - (CVS snapshot taken 20030908) - -Bash is free software; you can 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. - -Bash is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License with -your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with -the Debian GNU/Linux bash source package as the file COPYING. If not, -write to the Free Software Foundation, Inc., 59 Temple Place - Suite -330, Boston, MA 02111-1307, USA. - -The Free Software Foundation has exempted Bash from the requirement of -Paragraph 2c of the General Public License. This is to say, there is -no requirement for Bash to print a notice when it is started -interactively in the usual way. We made this exception because users -and standards expect shells not to print such messages. This -exception applies to any program that serves as a shell and that is -based primarily on Bash as opposed to other GNU software. - - -bash_completion is free software; you can 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. - -bashdb is free software; you can 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. - -The bashdb manual is licensed under the GFDL (attached here): - - This file documents the BASH debugger BASH. - - This is the 2.05b rebash-0.43 Edition, April 2002, of `Debugging - with BASHDB: the GNU Source-Level Debugger' for REBASH - - Copyright (C) 2002,2003 Rocky Bernstein for the Free Software - Foundation. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation; with no - Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - - -GNU Free Documentation License -****************************** - - Version 1.1, March 2000 - Copyright (C) 2000 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - 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 - written 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 that contains a - notice placed by the copyright holder saying it can be distributed - under the terms of this License. The "Document", below, refers to - any such manual or work. Any member of the public is a licensee, - and is addressed as "you." - - 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. - (For example, 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. - - 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 "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, whose contents can be viewed and edited directly - and 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 has been designed - to thwart or discourage subsequent modification by readers is not - Transparent. 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 designed for human modification. - Opaque formats include PostScript, PDF, 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 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. - - 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 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 publicly-accessible - computer-network location containing a complete Transparent copy - of the Document, free of added material, which the general - network-using public has access to download anonymously at no - charge using public-standard network protocols. 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 less than five). - 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", and 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. In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, 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 as "Endorsements" or to - conflict in title with any Invariant Section. - - 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. - - 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, does not as a whole count as a - Modified Version of the Document, provided no compilation - copyright is claimed for the compilation. Such a compilation is - called an "aggregate", and this License does not apply to the - other self-contained works thus compiled with the Document, on - account of their being thus compiled, if they 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 - quarter of the entire aggregate, the Document's Cover Texts may be - placed on covers that surround only the Document within the - aggregate. Otherwise they must appear on covers around 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 provided that you also include the - original English version of this License. In case of a - disagreement between the translation and the original English - version of this License, the original English version will prevail. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 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. - - -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.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled "GNU - Free Documentation License." - - If you have no Invariant Sections, write "with no Invariant Sections" -instead of saying which ones are invariant. If you have no Front-Cover -Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being -LIST"; likewise for Back-Cover Texts. - - 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/debian/bashdb.emacsen-install b/debian/bashdb.emacsen-install deleted file mode 100644 index 1b00b47..0000000 --- a/debian/bashdb.emacsen-install +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -e -# /usr/lib/emacsen-common/packages/install/bashdb - -# Written by Jim Van Zandt , borrowing heavily -# from the install scripts for gettext by Santiago Vila -# and octave by Dirk Eddelbuettel . - -FLAVOR=$1 -PACKAGE=bashdb - -if [ ${FLAVOR} = emacs ]; then exit 0; fi - -# bashdb's gud.el doesn't support emacs20 -if [ ${FLAVOR} = emacs20 ]; then exit 0; fi - -FILES="bashdb.el gud.el" - -echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} - -#FLAVORTEST=`echo $FLAVOR | cut -c-6` -#if [ ${FLAVORTEST} = xemacs ] ; then -# SITEFLAG="-no-site-file" -#else -# SITEFLAG="--no-site-file" -#fi -FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" - -ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} -ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} - -# Install-info-altdir does not actually exist. -# Maybe somebody will write it. -if test -x /usr/sbin/install-info-altdir; then - echo install/${PACKAGE}: install Info links for ${FLAVOR} - install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} \ - /usr/share/info/${PACKAGE}.info.gz -fi - -install -m 755 -d ${ELCDIR} -cd ${ELDIR} -cp ${FILES} ${ELCDIR} -cd ${ELCDIR} - -cat << EOF > path.el -(setq load-path (cons "." load-path) byte-compile-warnings nil) -EOF -${FLAVOR} ${FLAGS} ${FILES} -rm -f *.el path.el - -exit 0 diff --git a/debian/bashdb.emacsen-remove b/debian/bashdb.emacsen-remove deleted file mode 100644 index 3a0ac72..0000000 --- a/debian/bashdb.emacsen-remove +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -e -# /usr/lib/emacsen-common/packages/remove/bashdb - -FLAVOR=$1 -PACKAGE=bashdb - -if [ ${FLAVOR} != emacs ]; then - if test -x /usr/sbin/install-info-altdir; then - echo remove/${PACKAGE}: removing Info links for ${FLAVOR} - install-info-altdir --quiet --remove --dirname=${FLAVOR} \ - /usr/share/info/${PACKAGE}.info.gz - fi - - echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} - rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} -fi diff --git a/debian/bashdb.emacsen-startup b/debian/bashdb.emacsen-startup deleted file mode 100644 index 492c596..0000000 --- a/debian/bashdb.emacsen-startup +++ /dev/null @@ -1,20 +0,0 @@ -;; -*-emacs-lisp-*- -;; -;; Emacs startup file for the Debian bashdb package -;; -;; Originally contributed by Nils Naumann -;; Modified by Dirk Eddelbuettel -;; Adapted for dh-make by Jim Van Zandt - -;; The bashdb package follows the Debian/GNU Linux 'emacsen' policy and -;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, -;; xemacs19, emacs20, xemacs20...). The compiled code is then -;; installed in a subdirectory of the respective site-lisp directory. -;; We have to add this to the load-path: -(unless (eq flavor 'emacs20) - (let ((package-dir (concat "/usr/share/" - (symbol-name flavor) - "/site-lisp/bashdb"))) - (when (file-directory-p package-dir) - (setq load-path (cons package-dir load-path)))) - (autoload 'bashdb "bashdb" "Run the bash debugger." t)) diff --git a/debian/bashdb.postinst b/debian/bashdb.postinst deleted file mode 100644 index 69fd9fa..0000000 --- a/debian/bashdb.postinst +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh -e - -install-info --quiet --section "Shells" "Shells" \ - --description="Debugging with the BASH debugger" \ - /usr/share/info/bashdb.info.gz - -#DEBHELPER# diff --git a/debian/bashdb.prerm b/debian/bashdb.prerm deleted file mode 100644 index f7aeb17..0000000 --- a/debian/bashdb.prerm +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -install-info --quiet --remove bashdb - -#DEBHELPER# diff --git a/debian/changelog b/debian/changelog index 57cc12a..cb86abd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-bash (5.2.37-2) unstable; urgency=medium + + * Update upstream to Bash 5.2.37 + + -- Simon Arthur Sun, 22 Jun 2025 23:24:10 +0200 + vyatta-bash (4.1-3+vyos2+current2) unstable; urgency=medium * Force release @@ -2096,3 +2102,4 @@ bash (1.14.7-1) frozen unstable; urgency=low * default unreadable .bash_history in /etc/skel (fixes 1549). -- Guy Maor Sat, 9 Nov 1996 05:07:31 -0600 + diff --git a/debian/clear_console.1 b/debian/clear_console.1 deleted file mode 100644 index 99fe089..0000000 --- a/debian/clear_console.1 +++ /dev/null @@ -1,50 +0,0 @@ -.\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * -.\" * -.\" Permission is hereby granted, free of charge, to any person obtaining a * -.\" copy of this software and associated documentation files (the * -.\" "Software"), to deal in the Software without restriction, including * -.\" without limitation the rights to use, copy, modify, merge, publish, * -.\" distribute, distribute with modifications, sublicense, and/or sell * -.\" copies of the Software, and to permit persons to whom the Software is * -.\" furnished to do so, subject to the following conditions: * -.\" * -.\" The above copyright notice and this permission notice shall be included * -.\" in all copies or substantial portions of the Software. * -.\" * -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * -.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * -.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * -.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * -.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -.\" * -.\" Except as contained in this notice, the name(s) of the above copyright * -.\" holders shall not be used in advertising or otherwise to promote the * -.\" sale, use or other dealings in this Software without prior written * -.\" authorization. * -.\"*************************************************************************** -.\" -.\" $Id: clear.1,v 1.3 2000/07/15 23:59:35 china Exp $ -.TH clear_console 1 "" -.ds n 5 -.SH NAME -\fBclear_console\fR - clear the console -.SH SYNOPSIS -\fBclear\fR -.br -.SH DESCRIPTION -\fBclear_console\fR clears your console if this is possible. It looks in the -environment for the terminal type and then in the \fBterminfo\fR database to -figure out how to clear the screen. To clear the buffer, it then changes the -foreground virtual terminal to another terminal and then back to the original -terminal. -.SH SEE ALSO -\fBclear\fR(1), \fBchvt\fR(1) -.\"# -.\"# The following sets edit modes for GNU EMACS -.\"# Local Variables: -.\"# mode:nroff -.\"# fill-column:79 -.\"# End: diff --git a/debian/clear_console.c b/debian/clear_console.c index dd554b7..4cd3f26 100644 --- a/debian/clear_console.c +++ b/debian/clear_console.c @@ -1,3 +1,12 @@ +/* +Copyright (C) 2006-2019 Canonical Ltd. + +clear_console and it's man page are free software; you can 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. +*/ + #include #include #include @@ -139,22 +148,36 @@ int is_pseudo_tty(int fd) { char *tty = ttyname(fd); - if (!strncmp(tty, "/dev/pts/", 9)) + if (!tty) + { + if (!quiet) + perror("ttyname"); + return 0; + } + + if (strlen(tty) >= 9 && !strncmp(tty, "/dev/pts/", 9)) return 1; - if (!strncmp(tty, "/dev/tty", 8) && tty[8] >= 'a' && tty[8] <= 'z') + if (strlen(tty) >= 8 && !strncmp(tty, "/dev/tty", 8) + && tty[8] >= 'a' && tty[8] <= 'z') return 1; return 0; } -void clear_console(int fd) +int clear_console(int fd) { int num, tmp_num; #if defined(__linux__) struct vt_stat vtstat; #endif + /* Linux console secure erase (since 2.6.39), this is sufficient there; + other terminals silently ignore this code. If they don't and write junk + instead, well, we're clearing the screen anyway. + */ + write(1, "\e[3J", 4); + /* clear screen */ setupterm((char *) 0, 1, (int *) 0); if (tputs(clear_screen, lines > 0 ? lines : 1, putch) == ERR) @@ -163,10 +186,10 @@ void clear_console(int fd) } if (is_pseudo_tty(STDIN_FILENO)) - return; + return 0; if (!strcmp(getenv("TERM"), "screen")) - return; + return 0; /* get current vt */ #if defined(__linux__) @@ -182,7 +205,7 @@ void clear_console(int fd) #if defined(__linux__) num = vtstat.v_active; #endif - tmp_num = (num == 1 ? 2 : 1); + tmp_num = (num == 6 ? 5 : 6); /* switch vt to clear the scrollback buffer */ if (ioctl(fd, VT_ACTIVATE, tmp_num)) @@ -213,6 +236,7 @@ void clear_console(int fd) perror("VT_WAITACTIVE"); exit(1); } + return 0; } int main (int argc, char* argv[]) diff --git a/debian/compat b/debian/compat index ec63514..b4de394 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +11 diff --git a/debian/control b/debian/control index 0d880b8..69cc3f0 100644 --- a/debian/control +++ b/debian/control @@ -2,23 +2,29 @@ Source: vyatta-bash Section: base Priority: optional Maintainer: VyOS Package Maintainers -Standards-Version: 3.6.2 -Build-Depends: autoconf, patch, bison, libncurses5-dev, autotools-dev, - debhelper (>= 5), locales +Standards-Version: 4.7.2 +Build-Depends: autoconf, autotools-dev, bison, libncurses5-dev, + texinfo, texi2html, debhelper (>= 11), gettext, sharutils, + locales , time , + xz-utils, +Build-Depends-Indep: texlive-latex-base, ghostscript, texlive-fonts-recommended, man2html-base +Build-Conflicts: r-base-core +Rules-Requires-Root: binary-targets Package: vyatta-bash Architecture: any -Pre-Depends: ${shlibs:Pre-Depends} -Depends: base-files (>= 2.1.12), debianutils (>= 2.15), bash (>= 3.1) +Multi-Arch: foreign +Pre-Depends: ${shlibs:Pre-Depends}, ${misc:Depends} +Depends: base-files (>= 2.1.12), debianutils (>= 5.6-0.1) Section: shells Priority: optional -Description: The VyOS Shell based on GNU bash - The VyOS Shell based on GNU Bourne Again SHell. - . +Description: GNU Bourne Again SHell Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incorporates useful features from the Korn and C shells (ksh and csh). . Bash is ultimately intended to be a conformant implementation of the IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2). - + . + The Programmable Completion Code, by Ian Macdonald, is now found in + the bash-completion package. diff --git a/debian/copyright b/debian/copyright index b724f67..104fcc9 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,313 +1,186 @@ -The following is the original copyright of the Debian package. - -This is Debian GNU/Linux's prepackaged version of the FSF's GNU Bash, -the Bourne Again SHell. - -This package was put together by Matthias Klose , from -the following sources: - - bash: ftp.gnu.org:/pub/gnu/bash/bash-3.2.tar.gz - bash_completion: http://freshmeat.net/projects/bashcompletion/ - bashdb: http://bashdb.sf.net/ - -Bash homepage: http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html - -Copyright (C) 1989-2006 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 2, or (at your option) any later -version. - -Bash is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License with -your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with -the Debian GNU/Linux bash source package as the file COPYING. If not, -write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301, USA. - -The Free Software Foundation has exempted Bash from the requirement of -Paragraph 2c of the General Public License. This is to say, there is -no requirement for Bash to print a notice when it is started -interactively in the usual way. We made this exception because users -and standards expect shells not to print such messages. This -exception applies to any program that serves as a shell and that is -based primarily on Bash as opposed to other GNU software. - - -bash_completion is free software; you can 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. - -bashdb is free software; you can 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. - -Files with other copyright statement than: Copyright FSF, License GPL ---------------------------------------------------------------------- - -doc/FAQ ("the Bash FAQ") - - This document is Copyright 1995-2005 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. - - -doc/bashref.texi ("Bash Reference Manual"): - - Copyright (c) 1988-2005 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. - +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Contact: chet@po.cwru.edu +Comment: + This is Debian GNU/Linux's prepackaged version of the FSF's GNU Bash, + the Bourne Again SHell. + . + This package was put together by Matthias Klose . +Source: + ftp.gnu.org:/pub/gnu/bash +Files-Excluded: + doc/FAQ + doc/aosa-bash*.pdf + doc/article.* + doc/rose94.* + +Files: * +Copyright: (C) 1987-2022 Free Software Foundation, Inc. +License: GPL-3+ + +Files: examples/shellmath/* +Copyright: (c) 2020 by Michael Wood. All rights reserved. +License: GPL-3+ + +Files: support/bash.xbm +Copyright: (C) 1992 Simon Marshall +License: GPL-3+ + +Files: support/checkbashisms +Copyright: + Copyright (C) 1998 Richard Braakman + Copyright (C) 2002 Josip Rodin + Copyright (C) 2003 Julian Gilbey +License: GPL-3+ + +Files: + tests/ifs-posix.tests + tests/posix2.tests +Copyright: (C) 2005 Glen Fowler + Copyright (c) 1995 Stephen Gildea +License: GPL-3+ + +License: GPL-3+ + Bash is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + . + Bash is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + . + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +Comment: + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in `/usr/share/common-licenses/GPL-3'. + +Files: y.tab.* +Copyright: (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. +License: GPL-3+ with Bison exception + 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 . + . + 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. +Comment: + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in `/usr/share/common-licenses/GPL-3'. + +Files: + examples/functions/array-stuff + examples/functions/fstty + examples/functions/func + examples/functions/inetaddr + examples/functions/isnum2 + examples/functions/ksh* + examples/functions/notify.bash + examples/functions/seq* + examples/functions/sort-pos-params + examples/functions/substr* + examples/functions/substr2 + examples/functions/w* + tests/complete.tests +Copyright: 1992-2020 Chester Ramey +License: GPL-2+ + +Files: + debian/clear_console.c + examples/complete/bash_completion +Copyright: + Copyright (C) 2006-2019 Canonical Ltd. + Copyright (C) Ian Macdonald +License: GPL-2+ + +License: GPL-2+ + 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. + . + TThis 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. +Comment: + On Debian systems, the complete text of the GNU General Public License + version 2 can be found in `/usr/share/common-licenses/GPL-2'. + +Files: + doc/bashref.texi + lib/readline/doc/history.texi + lib/readline/doc/rl*man.texi +Copyright: (c) 1988-2022 Free Software Foundation, Inc. +License: GFDL-NIV-1.3 Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or + 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 have freedom to copy and modify - this GNU Manual, like GNU software. Copies published by the Free - Software Foundation raise funds for GNU development.'' - - -examples/bashdb/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 > - - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License [...] - - -examples/functions/pathfuncs (add dir to path) - - # @(#)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. - - -examples/functions/recurse (Recursive Directory Traverser) - - # Author: Kaz Kylheku - # Copyright 1999 - - -examples/scripts/bcsh.sh (Bourne shell cshell-emulator) - - # "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. - - -examples/scripts/websrv.sh (WWW server in sh) - - #copyright chris ulrich; This software may be used or modified - #in any way so long as this notice remains intact. - - -examples/loadables/getconf.c (POSIX.2 getconf utility) - - /* - * 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 - */ - - -examples/loadables/cut.c: - - /* - * 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. - */ - - -lib/readline/doc/rlman.texi (part of the GNU Readline Library manual) - - Copyright (c) 1988-2004 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.1 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 have freedom to copy and modify - this GNU Manual, like GNU software. Copies published by the Free - Software Foundation raise funds for GNU development.'' - - -lib/readline/doc/rltech.texi (part of the GNU Readline Library manual) - - Copyright (C) 1988-2005 Free Software Foundation, Inc. - + 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''. +Comment: + On Debian systems, the complete text of the GNU Free Documentation License + version 1.3 can be found in `/usr/share/common-licenses/GFDL-1.3'. + +Files: + lib/readline/doc/rltech.texi + lib/readline/doc/rluser.texi + lib/readline/doc/hs*.texi +Copyright: (C) 1988-2022 Free Software Foundation, Inc. +License: Latex2e 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. - + . 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 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. - -lib/readline/doc/rluser.texi (part of the GNU Readline Library manual) - - Copyright (C) 1988-2005 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. - - -readline/doc/{history,hstech,hsuser}.texi (GNU History Library Manual) - - Copyright (C) 1988-2002 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. - - -lib/sh/inet_aton.c: - +Files: lib/sh/inet_aton.c +Copyright: * Copyright (c) 1983, 1990, 1993 * The Regents of the University of California. All rights reserved. - * + * Portions Copyright (c) 1993 by Digital Equipment Corporation. +License: BSD-4-clause-UC and MIT-like + +License: BSD-4-clause-UC * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -316,10 +189,7 @@ lib/sh/inet_aton.c: * 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. + * 3. * 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. @@ -335,9 +205,8 @@ lib/sh/inet_aton.c: * 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. - * + +License: MIT-like * 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 @@ -354,33 +223,9 @@ lib/sh/inet_aton.c: * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. - -lib/termcap/grot/termcap.info (GNU termcap library manual) - - Copyright (C) 1988 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 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 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. - - -support/man2html.c - +Files: support/man2html.c +Copyright: Richard Verhoeven +License: permissive * This program was written by Richard Verhoeven (NL:5482ZX35) * at the Eindhoven University of Technology. Email: rcb5@win.tue.nl * diff --git a/debian/etc.bash.bashrc b/debian/etc.bash.bashrc index ae73152..bce57cd 100644 --- a/debian/etc.bash.bashrc +++ b/debian/etc.bash.bashrc @@ -4,19 +4,22 @@ # this file has to be sourced in /etc/profile. # If not running interactively, don't do anything -[ -z "$PS1" ] && return +[ -z "${PS1-}" ] && return # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # set variable identifying the chroot you work in (used in the prompt below) -if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(< /etc/debian_chroot) fi # set a fancy prompt (non-color, overwrite the one in /etc/profile) -PS1='${debian_chroot:+($debian_chroot)}\u@\H:\w\$ ' +# but only if not SUDOing and have SUDO_PS1 set; then assume smart user. +if ! [ -n "${SUDO_USER-}" -a -n "${SUDO_PS1-}" ]; then + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi # Commented out, don't overwrite xterm -T "title" -n "icontitle" by default. # If this is an xterm set the title to user@host:dir @@ -29,6 +32,27 @@ PS1='${debian_chroot:+($debian_chroot)}\u@\H:\w\$ ' #esac # enable bash completion in interactive shells -#if [ -f /etc/bash_completion ]; then +#if ! shopt -oq posix; then +# if [ -f /usr/share/bash-completion/bash_completion ]; then +# . /usr/share/bash-completion/bash_completion +# elif [ -f /etc/bash_completion ]; then # . /etc/bash_completion +# fi #fi + +# if the command-not-found package is installed, use it +if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then + function command_not_found_handle { + # check because c-n-f could've been removed in the meantime + if [ -x /usr/lib/command-not-found ]; then + /usr/lib/command-not-found -- "$1" + return $? + elif [ -x /usr/share/command-not-found/command-not-found ]; then + /usr/share/command-not-found/command-not-found -- "$1" + return $? + else + printf "%s: command not found\n" "$1" >&2 + return 127 + fi + } +fi diff --git a/debian/etc.profile b/debian/etc.profile index 9293c1b..b67da47 100644 --- a/debian/etc.profile +++ b/debian/etc.profile @@ -9,7 +9,7 @@ fi if [ "$PS1" ]; then if [ "$BASH" ]; then - PS1='${debian_chroot:+($debian_chroot)}\u@\H:\w\$ ' + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi diff --git a/debian/new/bash.postinst b/debian/new/bash.postinst deleted file mode 100644 index 834ac87..0000000 --- a/debian/new/bash.postinst +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash -e - -if [ "$1" = configure ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.05b-4; \ -then - div=$(dpkg-divert --list /bin/sh) - if [ -n "$div" ] && [ -z "${div%%* by bash}" ]; then - # paranoia - ln -sf dash /bin/sh - rm -f /bin/sh.distrib - - dpkg-divert --remove /bin/sh - fi - - div=$(dpkg-divert --list /usr/share/man/man1/sh.1.gz) - if [ -n "$div" ] && [ -z "${div%%* by bash}" ]; then - # paranoia - ln -sf dash.1.gz /usr/share/man/man1/sh.1.gz - rm -f /usr/share/man/man1/sh.1.gz.distrib - - dpkg-divert --remove /usr/share/man/man1/sh.1.gz - fi -fi - -# the symlink is in the package now. So this should never happen ... -if [ ! -e /bin/sh ]; then - ln -s dash /bin/sh -fi diff --git a/debian/new/bash.preinst.c b/debian/new/bash.preinst.c deleted file mode 100644 index 10d43c6..0000000 --- a/debian/new/bash.preinst.c +++ /dev/null @@ -1,229 +0,0 @@ -/* Copyright (c) 1999 Anthony Towns - * Copyright (c) 2000 Matthias Klose - * - * You may freely use, distribute, and modify this program. - */ - -// Don't rely on /bin/sh and popen! - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* XXX: evil kludge, deal with arbitrary name lengths */ -#ifndef PATH_MAX -#define PATH_MAX 4096 -#endif - -int myexec(char *cmd, ...) -{ - va_list ap; - pid_t child; - - char *new_argv[10]; - int new_argc = 0, i; - - new_argv[new_argc++] = cmd; - va_start(ap, cmd); - while ((new_argv[new_argc++] = va_arg(ap, char *))); - va_end(ap); - - switch(child = fork()) { - case -1: - /* fork failed */ - return EXIT_FAILURE; - - case 0: - /* i'm the child */ - { - execv(cmd, new_argv); - _exit(127); - } - - default: - /* i'm the parent */ - { - int status; - pid_t pid; - pid = wait(&status); - if (pid == child) { - if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { - return EXIT_SUCCESS; - } - } - } - } - return EXIT_FAILURE; -} - -int check_predepends(void) -{ - return myexec("/usr/bin/dpkg", "--assert-support-predepends", NULL); -} - -int dpkg_compare_versions(char *v1, char *op, char *v2) -{ - return myexec("/usr/bin/dpkg", "--compare-versions", v1, op, v2, NULL); -} - -int dpkg_divert_add(char *pkg, char *file) -{ - return myexec("/usr/sbin/dpkg-divert", "--package", pkg, "--add", file, NULL); -} - -char *check_diversion(char *diversion_name) -{ - pid_t child; - int pipedes[2]; - - if (pipe(pipedes)) - return NULL; - - - switch(child = fork()) { - case -1: - /* fork failed */ - close(pipedes[0]); - close(pipedes[1]); - return NULL; - - case 0: - /* i'm the child */ - { - if (dup2(pipedes[STDOUT_FILENO], STDOUT_FILENO) < 0) - _exit(127); - close(pipedes[STDIN_FILENO]); - close(pipedes[STDOUT_FILENO]); - execl( "/usr/sbin/dpkg-divert", "/usr/sbin/dpkg-divert", - "--list", diversion_name, NULL ); - _exit(127); - } - - default: - /* i'm the parent */ - { - static char line[1024]; - FILE *fd; - - close (pipedes[STDOUT_FILENO]); - fcntl (pipedes[STDIN_FILENO], F_SETFD, FD_CLOEXEC); - fd = fdopen (pipedes[STDIN_FILENO], "r"); - - while (fgets(line, 1024, fd) != NULL) { - line[strlen(line)-1] = '\0'; - break; - } - fclose(fd); - return line; - } - } - return NULL; -} - -#define FIRST_WITHOUT_SHLINK "2.05b-4" - -const char *msg = - "As bash for Debian is destined to provide a working /bin/sh (pointing to\n" - "/bin/bash) your link will be overwritten by a default link.\n\n" - "If you don't want further upgrades to overwrite your customization,\n" - "please read /usr/share/doc/bash/README.Debian for a more permanent solution.\n\n" - "[Press RETURN to continue]"; - -int main(int argc, char *argv[]) { - int targetlen; - char target[PATH_MAX+1], answer[1024]; - - if (argc < 2) { - printf("\nbash/preinst: expected at least one argument\n\n"); - return EXIT_FAILURE; - } - - if (check_predepends() != EXIT_SUCCESS) { - printf("\nPlease upgrade to a new version of dpkg\n\n"); - return EXIT_FAILURE; - } - -/* - if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt FIRST_WITHOUT_SHLINK; then - div=$(dpkg-divert --list /bin/sh) - if [ -z "$div" ]; then - dpkg-divert --package bash --add /bin/sh - ln -sf dash /bin/sh - fi - div=$(dpkg-divert --list /usr/share/man/man1/sh.1.gz) - if [ -z "$div" ]; then - dpkg-divert --package bash --add /usr/share/man/man1/sh.1.gz - ln -sf dash.1.gz /usr/share/man/man1/sh.1.gz - fi - fi -*/ - - if (strcmp(argv[1], "upgrade") == 0) { - if (argc < 3) { - printf("\nbash/preinst upgrade: expected at least two arguments\n\n"); - return EXIT_FAILURE; - } - if (dpkg_compare_versions(argv[2], "lt", FIRST_WITHOUT_SHLINK) == EXIT_SUCCESS) { - char *diversion = check_diversion("/bin/sh"); - - if (diversion == NULL) - return EXIT_FAILURE; - // printf("diversion: /%s/\n", diversion); - if (strcmp(diversion, "") == 0) { - // link is not diverted - dpkg_divert_add("bash", "/bin/sh"); - - unlink("/bin/sh"); - symlink("dash", "/bin/sh"); - } - - diversion = check_diversion("/usr/share/man/man1/sh.1.gz"); - - if (diversion == NULL) - return EXIT_FAILURE; - // printf("diversion: /%s/\n", diversion); - if (strcmp(diversion, "") == 0) { - // link is not diverted - dpkg_divert_add("bash", "/usr/share/man/man1/sh.1.gz"); - - unlink("/usr/share/man/man1/sh.1.gz"); - symlink("dash.1.gz", "/usr/share/man/man1/sh.1.gz"); - } - - } - } - -#if 0 - targetlen = readlink("/bin/sh", target, PATH_MAX); - if (targetlen == -1) { - // error reading link. Will be overwritten. - puts("The bash upgrade discovered that something is wrong with your /bin/sh link."); - puts(msg); - fgets(answer, 1024, stdin); - return EXIT_SUCCESS; - } - target[targetlen] = '\0'; - if (strcmp(target, "bash") != 0 && strcmp(target, "/bin/bash") != 0) { - char *diversion = check_diversion("/bin/sh"); - - if (diversion == NULL) - return EXIT_FAILURE; - // printf("diversion: /%s/\n", diversion); - if (strcmp(diversion, "") != 0) - // link is diverted - return EXIT_SUCCESS; - printf("The bash upgrade discovered that your /bin/sh link points to %s.\n", target); - puts(msg); - fgets(answer, 1024, stdin); - return EXIT_SUCCESS; - } -#endif - - return EXIT_SUCCESS; -} diff --git a/debian/new/changelog-add b/debian/new/changelog-add deleted file mode 100644 index b68f795..0000000 --- a/debian/new/changelog-add +++ /dev/null @@ -1,4 +0,0 @@ -bash (2.05b-4) unstable; urgency=low - - * Remove /bin/sh symlink from package. - * Pre-Depend on base-files (>= 3.0.5), which contains the symlink. diff --git a/debian/patches/bash-aliases-repeat.diff b/debian/patches/bash-aliases-repeat.diff new file mode 100644 index 0000000..e805473 --- /dev/null +++ b/debian/patches/bash-aliases-repeat.diff @@ -0,0 +1,28 @@ +# DP: Fix bug in Bash_aliases example. + +--- a/examples/startup-files/Bash_aliases ++++ b/examples/startup-files/Bash_aliases +@@ -41,20 +41,20 @@ + { + local count="$1" i; + shift; +- for i in $(seq 1 "$count"); ++ for i in $(_seq 1 "$count"); + do + eval "$@"; + done + } + + # Subfunction needed by `repeat'. +-seq () ++_seq () + { + local lower upper output; + lower=$1 upper=$2; + + if [ $lower -ge $upper ]; then return; fi +- while [ $lower -le $upper ]; ++ while [ $lower -lt $upper ]; + do + echo -n "$lower " + lower=$(($lower + 1)) diff --git a/debian/patches/bash-aliases-repeat.dpatch b/debian/patches/bash-aliases-repeat.dpatch deleted file mode 100644 index ae1ac9b..0000000 --- a/debian/patches/bash-aliases-repeat.dpatch +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Fix bug in Bash_aliases example. - ---- examples/startup-files/Bash_aliases~ 2008-04-19 21:57:24.000000000 +0200 -+++ examples/startup-files/Bash_aliases 2008-04-19 21:59:43.000000000 +0200 -@@ -41,20 +41,20 @@ - { - local count="$1" i; - shift; -- for i in $(seq 1 "$count"); -+ for i in $(_seq 1 "$count"); - do - eval "$@"; - done - } - - # Subfunction needed by `repeat'. --seq () -+_seq () - { - local lower upper output; - lower=$1 upper=$2; - - if [ $lower -ge $upper ]; then return; fi -- while [ $lower -le $upper ]; -+ while [ $lower -lt $upper ]; - do - echo -n "$lower " - lower=$(($lower + 1)) diff --git a/debian/patches/patches/bash-default-editor.dpatch b/debian/patches/bash-default-editor.diff similarity index 58% rename from debian/patches/patches/bash-default-editor.dpatch rename to debian/patches/bash-default-editor.diff index 1d0f44c..0784aa5 100644 --- a/debian/patches/patches/bash-default-editor.dpatch +++ b/debian/patches/bash-default-editor.diff @@ -1,26 +1,22 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - # DP: Use `command -v editor`, as an editor, if available. ---- bash/builtins/fc.def~ 2005-10-13 18:11:24.798452832 +0200 -+++ bash/builtins/fc.def 2005-10-13 19:36:11.956087320 +0200 -@@ -156,11 +156,11 @@ - #endif +--- a/bashline.c ++++ b/bashline.c +@@ -936,8 +936,8 @@ hostnames_matching (text) + 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 VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo vi)}}\"" ++#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo emacs)}}\"" + #define POSIX_VI_EDIT_COMMAND "fc -e vi" + + static int +--- a/builtins/fc.def ++++ b/builtins/fc.def +@@ -171,11 +171,11 @@ set_verbose_flag () + } /* String to execute on a file that we want to edit. */ -#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}" @@ -33,16 +29,3 @@ exit 0 #endif int ---- bash/bashline.c~ 2005-10-13 18:11:24.827448424 +0200 -+++ bash/bashline.c 2005-10-13 19:37:35.382404592 +0200 -@@ -800,8 +800,8 @@ - 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 VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo vi)}}\"" -+#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo emacs)}}\"" - #define POSIX_VI_EDIT_COMMAND "fc -e vi" - - static int diff --git a/debian/patches/bash-default-editor.dpatch b/debian/patches/bash-default-editor.dpatch deleted file mode 100755 index 1d0f44c..0000000 --- a/debian/patches/bash-default-editor.dpatch +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Use `command -v editor`, as an editor, if available. - ---- bash/builtins/fc.def~ 2005-10-13 18:11:24.798452832 +0200 -+++ bash/builtins/fc.def 2005-10-13 19:36:11.956087320 +0200 -@@ -156,11 +156,11 @@ - #endif - - /* String to execute on a file that we want to edit. */ --#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}" -+#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo vi)}}" - #if defined (STRICT_POSIX) - # define POSIX_FC_EDIT_COMMAND "${FCEDIT:-ed}" - #else --# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-ed}}" -+# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo ed)}}" - #endif - - int ---- bash/bashline.c~ 2005-10-13 18:11:24.827448424 +0200 -+++ bash/bashline.c 2005-10-13 19:37:35.382404592 +0200 -@@ -800,8 +800,8 @@ - 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 VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo vi)}}\"" -+#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo emacs)}}\"" - #define POSIX_VI_EDIT_COMMAND "fc -e vi" - - static int diff --git a/debian/patches/bash-subst-param-length.dpatch b/debian/patches/bash-subst-param-length.dpatch deleted file mode 100755 index d84a4e3..0000000 --- a/debian/patches/bash-subst-param-length.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -DP: ignore array subscript while determining variable name for length -DP: substitution -DP: (#345861) - ---- ../bash-3.1/subst.c 2006-01-14 01:12:02.000000000 +0100 -+++ subst.c 2006-01-14 01:12:39.000000000 +0100 -@@ -5814,7 +5814,7 @@ - { - t_index++; - free (name); -- temp1 = string_extract (string, &t_index, "#%:-=?+/}", 0); -+ temp1 = string_extract (string, &t_index, "#%:-=?+/}", EX_VARNAME); - name = (char *)xmalloc (3 + (strlen (temp1))); - *name = string[sindex]; - if (string[sindex] == '!') diff --git a/debian/patches/bash32-001.dpatch b/debian/patches/bash32-001.dpatch deleted file mode 100644 index 3ed0586..0000000 --- a/debian/patches/bash32-001.dpatch +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-001 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-001 - -Bug-Reported-by: Greg Schafer -Bug-Reference-ID: <20061012084940.GA15768@tigers.local> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00046.html - -Bug-Description: - -When using historical ``-style command substitution, bash incorrectly attempts -to interpret shell comments while scanning for the closing backquote. - -Patch: - -*** ../bash-3.2/parse.y Tue Sep 19 16:37:21 2006 ---- parse.y Thu Oct 12 10:30:57 2006 -*************** -*** 2736,2740 **** - count = 1; - pass_next_character = backq_backslash = was_dollar = in_comment = 0; -! check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; - - /* RFLAGS is the set of flags we want to pass to recursive calls. */ ---- 2736,2740 ---- - count = 1; - pass_next_character = backq_backslash = was_dollar = in_comment = 0; -! check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; - - /* RFLAGS is the set of flags we want to pass to recursive calls. */ -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 0 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-002.dpatch b/debian/patches/bash32-002.dpatch deleted file mode 100644 index 0a1c85c..0000000 --- a/debian/patches/bash32-002.dpatch +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-002 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-002 - -Bug-Reported-by: Jim Gifford -Bug-Reference-ID: <12j2pc3aq35mb04@corp.supernews.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00082.html - -Bug-Description: - -An incorrect encoding specification in the Content-Type header causes msgfmt -to fail, which causes `make install' to fail. - -Patch: - -*** ../bash-3.2/po/ru.po Tue Jan 10 17:51:03 2006 ---- po/ru.po Mon Oct 16 15:13:23 2006 -*************** -*** 13,17 **** - "Language-Team: Russian \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%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" ---- 13,17 ---- - "Language-Team: Russian \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" - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-003.dpatch b/debian/patches/bash32-003.dpatch deleted file mode 100644 index 3df73bd..0000000 --- a/debian/patches/bash32-003.dpatch +++ /dev/null @@ -1,166 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-003 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-003 - -Bug-Reported-by: John Gatewood Ham -Bug-Reference-ID: -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00045.html - -Bug-Description: - -When using the conditional command's `=~' operator to match regular -expressions, the parser did not skip over shell metacharacters in the -regular expression, leading to syntax errors. - -Patch: - -*** ../bash-3.2-patched/parse.y Tue Oct 17 11:45:20 2006 ---- parse.y Sat Oct 14 14:56:16 2006 -*************** -*** 1029,1034 **** ---- 1029,1035 ---- - #define PST_CMDTOKEN 0x1000 /* command token OK - unused */ - #define PST_COMPASSIGN 0x2000 /* parsing x=(...) compound assignment */ - #define PST_ASSIGNOK 0x4000 /* assignment statement ok in this context */ -+ #define PST_REGEXP 0x8000 /* parsing an ERE/BRE as a single word */ - - /* Initial size to allocate for tokens, and the - amount to grow them by. */ -*************** -*** 2591,2596 **** ---- 2592,2600 ---- - return (character); - } - -+ if (parser_state & PST_REGEXP) -+ goto tokword; -+ - /* Shell meta-characters. */ - if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0)) - { -*************** -*** 2698,2703 **** ---- 2702,2708 ---- - 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); -*************** -*** 3202,3209 **** - if (tok == WORD && test_binop (yylval.word->word)) - op = yylval.word; - #if defined (COND_REGEXP) -! else if (tok == WORD && STREQ (yylval.word->word,"=~")) -! op = yylval.word; - #endif - else if (tok == '<' || tok == '>') - op = make_word_from_token (tok); /* ( */ ---- 3207,3217 ---- - if (tok == WORD && test_binop (yylval.word->word)) - op = yylval.word; - #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); /* ( */ -*************** -*** 3234,3239 **** ---- 3242,3248 ---- - - /* rhs */ - tok = read_token (READ); -+ parser_state &= ~PST_REGEXP; - if (tok == WORD) - { - tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL); -*************** -*** 3419,3427 **** - goto next_character; - } - - #ifdef EXTENDED_GLOB - /* Parse a ksh-style extended pattern matching specification. */ -! if (extended_glob && PATTERN_CHAR (character)) - { - peek_char = shell_getc (1); - if MBTEST(peek_char == '(') /* ) */ ---- 3428,3461 ---- - 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 == '(') /* ) */ - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ - diff --git a/debian/patches/bash32-004.dpatch b/debian/patches/bash32-004.dpatch deleted file mode 100644 index 84ed736..0000000 --- a/debian/patches/bash32-004.dpatch +++ /dev/null @@ -1,115 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-004 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-004 - -Bug-Reported-by: Stuart Shelton -Bug-Reference-ID: <619141e40610261203y6cda5aa6i23cb24c7aeba996e@mail.gmail.com> -Bug-Reference-URL: - -Bug-Description: - -A bug in the parameter pattern substitution implementation treated a pattern -whose first character was `/' (after expansion) as specifying global -replacement. - -Patch: - -*** ../bash-3.2/subst.c Tue Sep 19 08:35:09 2006 ---- subst.c Thu Oct 26 09:17:50 2006 -*************** -*** 5707,5712 **** ---- 5707,5717 ---- - 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. */ -*************** -*** 5741,5753 **** - } - - /* ksh93 doesn't allow the match specifier to be a part of the expanded -! pattern. This is an extension. */ - p = pat; -! if (pat && pat[0] == '/') -! { -! mflags |= MATCH_GLOBREP|MATCH_ANY; -! p++; -! } - else if (pat && pat[0] == '#') - { - mflags |= MATCH_BEG; ---- 5746,5757 ---- - } - - /* 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; -*** ../bash-3.2/tests/new-exp.right Thu Aug 10 12:00:00 2006 ---- tests/new-exp.right Sun Oct 29 16:03:36 2006 -*************** -*** 430,436 **** - 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] = - argv[2] = - argv[3] = ---- 430,436 ---- - 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] = - argv[2] = - argv[3] = -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 4 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-005.dpatch b/debian/patches/bash32-005.dpatch deleted file mode 100644 index 0e41902..0000000 --- a/debian/patches/bash32-005.dpatch +++ /dev/null @@ -1,242 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-005 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-005 - -Bug-Reported-by: Stuart Shelton -Bug-Reference-ID: <453F7CC8.6030907@openobjects.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00127.html - -Bug-Description: - -A missing extern declaration for `asprintf' caused `double' arguments to be -passed as `0', leading to incorrect results. Additionally, a bug in the -replacement asprintf/snprintf function caused an infinite loop when passed -0 arguments to the floating point conversions under some circumstances. - -Patch: - -*** ../bash-3.2/builtins/printf.def Mon Sep 18 08:48:42 2006 ---- builtins/printf.def Tue Oct 31 08:19:44 2006 -*************** -*** 49,54 **** ---- 49,60 ---- - # define INT_MIN (-2147483647-1) - #endif - -+ #if defined (PREFER_STDARG) -+ # include -+ #else -+ # include -+ #endif -+ - #include - #include - -*************** -*** 151,156 **** ---- 157,166 ---- - #define SKIP1 "#'-+ 0" - #define LENMODS "hjlLtz" - -+ #ifndef HAVE_ASPRINTF -+ extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); -+ #endif -+ - static void printf_erange __P((char *)); - static int printstr __P((char *, char *, int, int, int)); - static int tescape __P((char *, char *, int *)); - - -*** ../bash-3.2/lib/sh/snprintf.c Thu Apr 6 09:48:40 2006 ---- lib/sh/snprintf.c Sat Oct 28 00:00:13 2006 -*************** -*** 471,476 **** ---- 476,483 ---- - 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) -*************** -*** 576,583 **** - { - integral_part[0] = '0'; - integral_part[1] = '\0'; -! fraction_part[0] = '0'; -! fraction_part[1] = '\0'; - if (fract) - *fract = fraction_part; - return integral_part; ---- 583,593 ---- - { - 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; -*************** -*** 805,810 **** ---- 815,821 ---- - PUT_CHAR(*tmp, p); - tmp++; - } -+ - PAD_LEFT(p); - } - -*************** -*** 972,982 **** - if ((p->flags & PF_THOUSANDS) && grouping && (t = groupnum (tmp))) - tmp = t; - - /* 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 - 1; - PAD_RIGHT(p); - PUT_PLUS(d, p, 0.); - PUT_SPACE(d, p, 0.); ---- 983,1003 ---- - 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.); -*************** -*** 991,1001 **** - if (p->precision != 0 || (p->flags & PF_ALTFORM)) - PUT_CHAR(decpoint, p); /* put 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 */ - ---- 1012,1017 ---- -*************** -*** 1011,1024 **** - char *tmp, *tmp2; - int j, i; - -! if (chkinfnan(p, d, 1) || chkinfnan(p, d, 2)) - return; /* already printed nan or inf */ - - GETLOCALEDATA(decpoint, thoussep, grouping); - DEF_PREC(p); -! 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', ---- 1027,1045 ---- - 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', -*************** -*** 1076,1081 **** ---- 1097,1103 ---- - PUT_CHAR(*tmp, p); - tmp++; - } -+ - PAD_LEFT(p); - } - #endif -*************** -*** 1358,1364 **** - STAR_ARGS(data); - DEF_PREC(data); - d = GETDOUBLE(data); -! i = log_10(d); - /* - * for '%g|%G' ANSI: use f if exponent - * is in the range or [-4,p] exclusively ---- 1380,1386 ---- - 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 -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 4 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 5 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-006.dpatch b/debian/patches/bash32-006.dpatch deleted file mode 100644 index 8186345..0000000 --- a/debian/patches/bash32-006.dpatch +++ /dev/null @@ -1,64 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-006 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-006 - -Bug-Reported-by: ebb9@byu.net -Bug-Reference-ID: <45540862.9030900@byu.net> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00017.html - http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00016.html - -Bug-Description: - -In some cases, code that is intended to be used in the presence of multibyte -characters is called when no such characters are present, leading to incorrect -display position calculations and incorrect redisplay. - -Patch: - -*** ../bash-3.2-patched/lib/readline/display.c Thu Sep 14 14:20:12 2006 ---- lib/readline/display.c Mon Nov 13 17:55:57 2006 -*************** -*** 2381,2384 **** ---- 2409,2414 ---- - if (end <= start) - return 0; -+ if (MB_CUR_MAX == 1 || rl_byte_oriented) -+ return (end - start); - - memset (&ps, 0, sizeof (mbstate_t)); -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 5 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 6 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-007.dpatch b/debian/patches/bash32-007.dpatch deleted file mode 100644 index 0dd829d..0000000 --- a/debian/patches/bash32-007.dpatch +++ /dev/null @@ -1,74 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-007 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-007 - -Bug-Reported-by: jidanni@jidanni.org -Bug-Reference-ID: -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00039.html - -Bug-Description: - -When removing the current or previous job from the jobs list, bash incorrectly -resets the current job under some circumstances. - -Patch: - -*** ../bash-3.2-patched/jobs.c Sat Jul 29 16:40:48 2006 ---- jobs.c Fri Nov 24 14:50:01 2006 -*************** -*** 985,990 **** - if (temp == 0) - return; -- if (job_index == js.j_current || job_index == js.j_previous) -- reset_current (); - - if ((dflags & DEL_NOBGPID) == 0) ---- 985,988 ---- -*************** -*** 1029,1032 **** ---- 1027,1033 ---- - 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 (); - } - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 6 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 7 - - #endif /* _PATCHLEVEL_H_ */ - - diff --git a/debian/patches/bash32-008.dpatch b/debian/patches/bash32-008.dpatch deleted file mode 100644 index 6020eef..0000000 --- a/debian/patches/bash32-008.dpatch +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-008 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-008 - -Bug-Reported-by: Linda Walsh -Bug-Reference-ID: <456041FD.8000605@tlinx.org> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00040.html - -Bug-Description: - -When checking pathnames from the command hash table (e.g., when the `checkhash' -shell option is enabled), a bug causes bash to delete and re-lookup each -command. - -Patch: - -*** ../bash-3.2-patched/findcmd.c Wed Aug 17 16:49:54 2005 ---- findcmd.c Fri Nov 24 10:48:37 2006 -*************** -*** 309,313 **** - { - st = file_status (hashed_file); -! if ((st ^ (FS_EXISTS | FS_EXECABLE)) != 0) - { - phash_remove (pathname); ---- 309,313 ---- - { - st = file_status (hashed_file); -! if ((st & (FS_EXISTS|FS_EXECABLE)) != (FS_EXISTS|FS_EXECABLE)) - { - phash_remove (pathname); -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 7 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 8 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-009.dpatch b/debian/patches/bash32-009.dpatch deleted file mode 100644 index fc6e9b0..0000000 --- a/debian/patches/bash32-009.dpatch +++ /dev/null @@ -1,80 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-009 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-009 - -Bug-Reported-by: James.M.Botte@lowes.com -Bug-Reference-ID: -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-12/msg00000.html - -Bug-Description: - -When using its built-in replacement for snprintf/asprintf, bash does not -treat the %x, %X, and %o format specifiers as unsigned numbers. - -Patch: - -*** ../bash-3.2-patched/lib/sh/snprintf.c Mon Nov 13 08:58:52 2006 ---- lib/sh/snprintf.c Wed Dec 6 11:15:04 2006 -*************** -*** 669,673 **** - - sd = d; /* signed for ' ' padding in base 10 */ -! flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; - if (*p->pf == 'X') - flags |= FL_HEXUPPER; ---- 674,679 ---- - - 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; -*************** -*** 739,743 **** - - sd = d; /* signed for ' ' padding in base 10 */ -! flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; - if (*p->pf == 'X') - flags |= FL_HEXUPPER; ---- 745,749 ---- - - 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; -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 8 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 9 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-010.dpatch b/debian/patches/bash32-010.dpatch deleted file mode 100644 index 308006e..0000000 --- a/debian/patches/bash32-010.dpatch +++ /dev/null @@ -1,226 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-010 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-010 - -Bug-Reported-by: Ryan Waldron -Bug-Reference-ID: <20070119065603.546D011E9C@kansas.erebor.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-01/msg00059.html - -Bug-Description: - -The glibc implementation of regcomp/regexec does not allow backslashes to -escape "ordinary" pattern characters when matching. Bash used backslashes -to quote all characters when the pattern argument to the [[ special -command's =~ operator was quoted. This caused the match to fail on Linux -and other systems using GNU libc. - -Patch: - -*** ../bash-3.2.9/pathexp.h Sat Feb 19 17:23:18 2005 ---- pathexp.h Wed Jan 31 22:53:16 2007 -*************** -*** 1,5 **** - /* pathexp.h -- The shell interface to the globbing library. */ - -! /* Copyright (C) 1987-2005 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 1,5 ---- - /* pathexp.h -- The shell interface to the globbing library. */ - -! /* Copyright (C) 1987-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 33,36 **** ---- 33,37 ---- - #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) -*** ../bash-3.2.9/pathexp.c Mon May 6 13:43:05 2002 ---- pathexp.c Mon Feb 26 16:59:23 2007 -*************** -*** 1,5 **** - /* pathexp.c -- The shell interface to the globbing library. */ - -! /* Copyright (C) 1995-2002 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 1,5 ---- - /* pathexp.c -- The shell interface to the globbing library. */ - -! /* Copyright (C) 1995-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 111,114 **** ---- 111,141 ---- - } - -+ /* 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); -+ } -+ - /* PATHNAME can contain characters prefixed by CTLESC; this indicates - that the character is to be quoted. We quote it here in the style -*************** -*** 143,146 **** ---- 170,175 ---- - if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') - continue; -+ if ((qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) -+ continue; - temp[j++] = '\\'; - i++; -*** ../bash-3.2.9/subst.c Tue Nov 7 16:14:41 2006 ---- subst.c Wed Jan 31 23:09:58 2007 -*************** -*** 5,9 **** - beauty, but, hey, you're alright.'' */ - -! /* Copyright (C) 1987-2006 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 5,9 ---- - beauty, but, hey, you're alright.'' */ - -! /* Copyright (C) 1987-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 2647,2655 **** - /* This needs better error handling. */ - /* Expand W for use as an argument to a unary or binary operator in a -! [[...]] expression. If SPECIAL is nonzero, 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. The -! caller is responsible for removing the backslashes if the unquoted -! words is needed later. */ - char * - cond_expand_word (w, special) ---- 2647,2656 ---- - /* 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) -*************** -*** 2659,2662 **** ---- 2660,2664 ---- - char *r, *p; - WORD_LIST *l; -+ int qflags; - - if (w->word == 0 || w->word[0] == '\0') -*************** -*** 2673,2678 **** - else - { - p = string_list (l); -! r = quote_string_for_globbing (p, QGLOB_CVTNULL); - free (p); - } ---- 2675,2683 ---- - else - { -+ qflags = QGLOB_CVTNULL; -+ if (special == 2) -+ qflags |= QGLOB_REGEXP; - p = string_list (l); -! r = quote_string_for_globbing (p, qflags); - free (p); - } -*** ../bash-3.2.9/execute_cmd.c Sat Aug 26 00:23:17 2006 ---- execute_cmd.c Wed Jan 31 23:12:06 2007 -*************** -*** 1,5 **** - /* execute_cmd.c -- Execute a COMMAND structure. */ - -! /* Copyright (C) 1987-2005 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 1,5 ---- - /* execute_cmd.c -- Execute a COMMAND structure. */ - -! /* Copyright (C) 1987-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 2547,2551 **** - if (arg1 == 0) - arg1 = nullstr; -! arg2 = cond_expand_word (cond->right->op, patmatch||rmatch); - if (arg2 == 0) - arg2 = nullstr; ---- 2547,2551 ---- - if (arg1 == 0) - arg1 = nullstr; -! arg2 = cond_expand_word (cond->right->op, rmatch ? 2 : (patmatch ? 1 : 0)); - if (arg2 == 0) - arg2 = nullstr; -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 9 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 10 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-011.dpatch b/debian/patches/bash32-011.dpatch deleted file mode 100644 index a3e4d32..0000000 --- a/debian/patches/bash32-011.dpatch +++ /dev/null @@ -1,157 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-011 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-011 - -Bug-Reported-by: Petr Sumbera -Bug-Reference-ID: <45AF5F4B.1020800@sun.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-01/msg00049.html - -Bug-Description: - -Under certain circumstances (loopback mounts), the bash getcwd does not -return correct results. This patch allows the use of the Solaris libc -getcwd even though it doesn't dynamically allocate memory. - -Run `touch configure' to make sure make doesn't try to run autoconf. -Then run configure with whatever options you like. - -Patch: - -*** ../bash-3.2-patched/configure.in Tue Sep 26 11:05:45 2006 ---- configure.in Wed Jan 31 09:48:00 2007 -*************** -*** 6,10 **** - dnl Process this file with autoconf to produce a configure script. - -! # Copyright (C) 1987-2006 Free Software Foundation, Inc. - - # This program is free software; you can redistribute it and/or modify ---- 6,10 ---- - dnl Process this file with autoconf to produce a configure script. - -! # Copyright (C) 1987-2007 Free Software Foundation, Inc. - - # This program is free software; you can redistribute it and/or modify -*************** -*** 992,996 **** - sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; - sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; -! solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading ---- 992,997 ---- - sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; - sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; -! solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;; -! solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading -*** ../bash-3.2-patched/config-bot.h Tue Sep 12 16:43:04 2006 ---- config-bot.h Tue Mar 6 10:41:31 2007 -*************** -*** 2,6 **** - /* modify settings or make new ones based on what autoconf tells us. */ - -! /* Copyright (C) 1989-2002 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 2,6 ---- - /* modify settings or make new ones based on what autoconf tells us. */ - -! /* Copyright (C) 1989-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 71,77 **** - #endif - -! /* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETCWD so -! the replacement in getcwd.c will be built. */ -! #if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) - # undef HAVE_GETCWD - #endif ---- 71,79 ---- - #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 -*** ../bash-3.2-patched/builtins/common.c Thu Jul 27 09:39:51 2006 ---- builtins/common.c Tue Mar 6 10:43:27 2007 -*************** -*** 1,3 **** -! /* Copyright (C) 1987-2005 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 1,3 ---- -! /* Copyright (C) 1987-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 476,480 **** ---- 476,484 ---- - 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) - { -*** ../bash-3.2-patched/configure Tue Sep 26 11:06:01 2006 ---- configure Tue Mar 6 10:59:20 2007 -*************** -*** 27317,27321 **** - sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; - sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; -! solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading ---- 27317,27322 ---- - sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; - sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; -! solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;; -! solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 10 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 11 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-012.dpatch b/debian/patches/bash32-012.dpatch deleted file mode 100644 index 8307da1..0000000 --- a/debian/patches/bash32-012.dpatch +++ /dev/null @@ -1,115 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-012 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-012 - -Bug-Reported-by: John Wyman -Bug-Reference-ID: <5E7DEFC094C35044B87FAE761D9F0EE20143A3B7@exchange2k.celink.com> -Bug-Reference-URL: - -Bug-Description: - -Some systems (AIX 4.x) don't implement the PRI_xxx macros correctly, -causing syntax errors when attempting to compile bash on those systems. -This patch adds support for the PRI_MACROS_BROKEN define. - -You will need to re-run `configure' after applying the patch. Run -`touch configure' so make doesn't try to run autoconf. - -Patch: - -*** ../bash-3.2.11/config.h.in Tue Sep 12 16:00:54 2006 ---- config.h.in Tue Mar 6 11:17:55 2007 -*************** -*** 1,5 **** - /* config.h -- Configuration file for bash. */ - -! /* Copyright (C) 1987-2006 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 1,5 ---- - /* config.h -- Configuration file for bash. */ - -! /* Copyright (C) 1987-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 414,417 **** ---- 414,419 ---- - #undef HAVE_DECL_STRTOLD - -+ #undef PRI_MACROS_BROKEN -+ - #undef STRTOLD_BROKEN - -*************** -*** 1007,1010 **** ---- 1009,1015 ---- - #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 */ -*** ../bash-3.2.11/builtins/printf.def Mon Nov 13 08:58:52 2006 ---- builtins/printf.def Sun Feb 4 13:58:59 2007 -*************** -*** 2,6 **** - It implements the builtin "printf" in Bash. - -! Copyright (C) 1997-2005 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 2,6 ---- - It implements the builtin "printf" in Bash. - -! Copyright (C) 1997-2007 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 71,74 **** ---- 71,78 ---- - #include "common.h" - -+ #if defined (PRI_MACROS_BROKEN) -+ # undef PRIdMAX -+ #endif -+ - #if !defined (PRIdMAX) - # if HAVE_LONG_LONG -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 11 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 12 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-013.dpatch b/debian/patches/bash32-013.dpatch deleted file mode 100644 index 9573f7e..0000000 --- a/debian/patches/bash32-013.dpatch +++ /dev/null @@ -1,84 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-013 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-013 - -Bug-Reported-by: Magnus Svensson -Bug-Reference-ID: <45BDC44D.80609@mysql.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-01/msg00002.html - -Bug-Description: - -Readline neglects to reallocate the array it uses to keep track of wrapped -screen lines when increasing its size. This will eventually result in -segmentation faults when given sufficiently long input. - -Patch: - -*** ../bash-3.2-patched/lib/readline/display.c Thu Sep 14 14:20:12 2006 ---- lib/readline/display.c Fri Feb 2 20:23:17 2007 -*************** -*** 561,574 **** ---- 561,586 ---- - wrap_offset = prompt_invis_chars_first_line = 0; - } - -+ #if defined (HANDLE_MULTIBYTE) - #define CHECK_INV_LBREAKS() \ - do { \ - if (newlines >= (inv_lbsize - 2)) \ - { \ - inv_lbsize *= 2; \ - inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ -+ _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ - } \ - } while (0) -+ #else -+ #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) -+ #endif /* HANDLE_MULTIBYTE */ - - #if defined (HANDLE_MULTIBYTE) - #define CHECK_LPOS() \ - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 12 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 13 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-014.dpatch b/debian/patches/bash32-014.dpatch deleted file mode 100644 index 2abc259..0000000 --- a/debian/patches/bash32-014.dpatch +++ /dev/null @@ -1,326 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-014 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-014 - -Bug-Reported-by: Brett Stahlman -Bug-Reference-ID: <000701c72d29$a227e0e0$5ec7cf47@computerroom> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-12/msg00065.html - -Bug-Description: - -Bash mishandles word splitting under certain circumstances when IFS is -null (IFS=). Constructs affected include ${param/pat/sub} and others -when expanding arrays (array[@]). - -Patch: - -*** ../bash-3.2-patched/array.c Wed Jun 1 16:39:22 2005 ---- array.c Mon Jan 15 22:58:00 2007 -*************** -*** 121,125 **** - } - -- #ifdef INCLUDE_UNUSED - /* - * Make and return a new array composed of the elements in array A from ---- 121,124 ---- -*************** -*** 142,146 **** - n = array_create_element (element_index(p), element_value(p)); - ADD_BEFORE(a->head, n); -! mi = element_index(ae); - } - a->num_elements = i; ---- 141,145 ---- - n = array_create_element (element_index(p), element_value(p)); - ADD_BEFORE(a->head, n); -! mi = element_index(n); - } - a->num_elements = i; -*************** -*** 148,152 **** - return a; - } -- #endif - - /* ---- 147,150 ---- -*************** -*** 301,304 **** ---- 299,319 ---- - } - -+ 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; -+ } -+ - /* - * Return a string whose elements are the members of array A beginning at -*************** -*** 312,318 **** - int starsub, quoted; - { - ARRAY_ELEMENT *h, *p; - arrayind_t i; -! char *ifs, sep[2]; - - p = a ? array_head (a) : 0; ---- 327,334 ---- - int starsub, quoted; - { -+ ARRAY *a2; - ARRAY_ELEMENT *h, *p; - arrayind_t i; -! char *ifs, sep[2], *t; - - p = a ? array_head (a) : 0; -*************** -*** 337,340 **** ---- 353,363 ---- - ; - -+ 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))) { - ifs = getifs(); -*************** -*** 344,348 **** - sep[1] = '\0'; - -! return (array_to_string_internal (h, p, sep, quoted)); - } - ---- 367,374 ---- - sep[1] = '\0'; - -! t = array_to_string (a2, sep, 0); -! array_dispose(a2); -! -! return t; - } - -*************** -*** 368,372 **** - - if (mflags & MATCH_QUOTED) -! array_quote (a2); - if (mflags & MATCH_STARSUB) { - ifs = getifs(); ---- 394,400 ---- - - if (mflags & MATCH_QUOTED) -! array_quote(a2); -! else -! array_quote_escapes(a2); - if (mflags & MATCH_STARSUB) { - ifs = getifs(); -*** ../bash-3.2-patched/array.h Sun Jun 1 15:50:30 2003 ---- array.h Mon Jan 15 22:35:35 2007 -*************** -*** 56,59 **** ---- 56,60 ---- - extern int array_shift_element __P((ARRAY *, char *)); - extern ARRAY *array_quote __P((ARRAY *)); -+ extern ARRAY *array_quote_escapes __P((ARRAY *)); - - extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int)); -*** ../bash-3.2-patched/subst.c Fri Mar 2 16:20:50 2007 ---- subst.c Tue Mar 6 11:40:55 2007 -*************** -*** 1888,1892 **** ---- 1889,1899 ---- - #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)) -+ #endif - ? quote_list (list) - : list_quote_escapes (list); -*************** -*** 2922,2926 **** - /* 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. */ - char * - quote_escapes (string) ---- 2935,2944 ---- - /* 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. 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. */ - char * - quote_escapes (string) -*************** -*** 2930,2933 **** ---- 2948,2952 ---- - size_t slen; - char *result, *send; -+ int quote_spaces; - DECLARE_MBSTATE; - -*************** -*** 2935,2938 **** ---- 2954,2958 ---- - send = string + slen; - -+ quote_spaces = (ifs_value && *ifs_value == 0); - t = result = (char *)xmalloc ((slen * 2) + 1); - s = string; -*************** -*** 2940,2944 **** - while (*s) - { -! if (*s == CTLESC || *s == CTLNUL) - *t++ = CTLESC; - COPY_CHAR_P (t, s, send); ---- 2960,2964 ---- - while (*s) - { -! if (*s == CTLESC || *s == CTLNUL || (quote_spaces && *s == ' ')) - *t++ = CTLESC; - COPY_CHAR_P (t, s, send); -*************** -*** 2982,2985 **** ---- 3002,3006 ---- - size_t slen; - char *result, *send; -+ int quote_spaces; - DECLARE_MBSTATE; - -*************** -*** 2996,3002 **** - return (strcpy (result, s)); - - while (*s) - { -! if (*s == CTLESC && (s[1] == CTLESC || s[1] == CTLNUL)) - { - s++; ---- 3017,3024 ---- - return (strcpy (result, s)); - -+ quote_spaces = (ifs_value && *ifs_value == 0); - while (*s) - { -! if (*s == CTLESC && (s[1] == CTLESC || s[1] == CTLNUL || (quote_spaces && s[1] == ' '))) - { - s++; -*************** -*** 4462,4466 **** - RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, DEFAULT_ARRAY_SIZE); - -! if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || c == CTLESC || c == CTLNUL) - istring[istring_index++] = CTLESC; - ---- 4498,4510 ---- - 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 (c == CTLESC) -! istring[istring_index++] = CTLESC; -! else if (c == CTLNUL || (c == ' ' && (ifs_value && *ifs_value == 0))) - istring[istring_index++] = CTLESC; - -*************** -*** 5552,5555 **** ---- 5610,5616 ---- - rely on array_subrange to understand how to deal with them). */ - tt = array_subrange (array_cell (v), e1, e2, starsub, quoted); -+ #if 0 -+ /* array_subrange now calls array_quote_escapes as appropriate, so the -+ caller no longer needs to. */ - if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0) - { -*************** -*** 5558,5561 **** ---- 5619,5623 ---- - } - else -+ #endif - temp = tt; - break; -*************** -*** 5808,5811 **** ---- 5870,5876 ---- - case VT_ARRAYVAR: - temp = array_patsub (array_cell (v), p, rep, mflags); -+ #if 0 -+ /* Don't need to do this anymore; array_patsub calls array_quote_escapes -+ as appropriate before adding the space separators. */ - if (temp && (mflags & MATCH_QUOTED) == 0) - { -*************** -*** 5814,5817 **** ---- 5879,5883 ---- - temp = tt; - } -+ #endif - break; - #endif -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 13 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 14 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-015.dpatch b/debian/patches/bash32-015.dpatch deleted file mode 100644 index 398456c..0000000 --- a/debian/patches/bash32-015.dpatch +++ /dev/null @@ -1,114 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-015 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-015 - -Bug-Reported-by: -Bug-Reference-ID: -Bug-Reference-URL: - -Bug-Description: - -Under certain circumstances, when using FIFOs for process substitution, -bash fails to unlink the FIFOs. This leaves open file descriptors that -can cause the shell to hang and litters the file system. - -Patch: - -*** ../bash-3.2-patched/execute_cmd.c Fri Mar 2 16:20:50 2007 ---- execute_cmd.c Wed Jan 31 23:12:06 2007 -*************** -*** 3051,3054 **** ---- 3051,3059 ---- - 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, -*** ../bash-3.2-patched/subst.c Fri Mar 2 16:20:50 2007 ---- subst.c Tue Mar 6 11:40:55 2007 -*************** -*** 4129,4132 **** ---- 4151,4160 ---- - } - -+ int -+ fifos_pending () -+ { -+ return nfifo; -+ } -+ - static char * - make_named_pipe () -*************** -*** 4178,4181 **** ---- 4206,4215 ---- - } - -+ int -+ fifos_pending () -+ { -+ return 0; /* used for cleanup; not needed with /dev/fd */ -+ } -+ - void - unlink_fifo_list () -*************** -*** 4671,4674 **** ---- 4719,4725 ---- - last_command_exit_value = rc; - rc = run_exit_trap (); -+ #if defined (PROCESS_SUBSTITUTION) -+ unlink_fifo_list (); -+ #endif - exit (rc); - } -*** ../bash-3.2-patched/subst.h Tue Sep 19 08:34:41 2006 ---- subst.h Wed Jan 10 09:46:47 2007 -*************** -*** 223,226 **** ---- 223,227 ---- - extern char *pat_subst __P((char *, char *, char *, int)); - -+ extern int fifos_pending __P((void)); - extern void unlink_fifo_list __P((void)); - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 14 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 15 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-016.dpatch b/debian/patches/bash32-016.dpatch deleted file mode 100644 index c04d324..0000000 --- a/debian/patches/bash32-016.dpatch +++ /dev/null @@ -1,71 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-016 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-016 - -Bug-Reported-by: Peter Volkov -Bug-Reference-ID: <1171795523.8021.18.camel@localhost> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-02/msg00054.html - -Bug-Description: - -When moving the cursor, bash sometimes misplaces the cursor when the prompt -contains two or more multibyte characters. The particular circumstance that -uncovered the problem was having the (multibyte) current directory name in -the prompt string. - -Patch: - -*** ../bash-3.2/lib/readline/display.c Fri Jan 19 13:34:50 2007 ---- lib/readline/display.c Sat Mar 10 17:25:44 2007 -*************** -*** 1745,1749 **** - { - dpos = _rl_col_width (data, 0, new); -! if (dpos > prompt_last_invisible) /* XXX - don't use woff here */ - { - dpos -= woff; ---- 1745,1752 ---- - { - dpos = _rl_col_width (data, 0, new); -! /* 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 (new > prompt_last_invisible) /* XXX - don't use woff here */ - { - dpos -= woff; -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 15 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 16 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-017.dpatch b/debian/patches/bash32-017.dpatch deleted file mode 100644 index 88db413..0000000 --- a/debian/patches/bash32-017.dpatch +++ /dev/null @@ -1,104 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-017 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-017 - -Bug-Reported-by: Peter Volkov -Bug-Reference-ID: <1173636022.7039.36.camel@localhost> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00039.html - -Bug-Description: - -When restoring the original prompt after finishing an incremental search, -bash sometimes places the cursor incorrectly if the primary prompt contains -invisible characters. - -Patch: - -*** ../bash-3.2.16/lib/readline/display.c Fri Apr 20 13:30:16 2007 ---- lib/readline/display.c Fri Apr 20 15:17:01 2007 -*************** -*** 1599,1604 **** - if (temp > 0) - { - _rl_output_some_chars (nfd, temp); -! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);; - } - } ---- 1599,1618 ---- - 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); -! 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; - } - } -*************** -*** 1608,1613 **** ---- 1622,1639 ---- - 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); -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 16 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 17 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-018.dpatch b/debian/patches/bash32-018.dpatch deleted file mode 100644 index a7af85d..0000000 --- a/debian/patches/bash32-018.dpatch +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-018 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-018 - -Bug-Reported-by: osicka@post.cz -Bug-Reference-ID: <228.177-19682-1132061412-1179356692@post.cz> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-05/msg00061.html - -Bug-Description: - -In certain cases, bash can lose the saved status of a background job, though -it should still be reported by `wait'. Bash can also loop infinitely after -creating and waiting for 4096 jobs. - -Patch: - -*** ../bash-20070510/jobs.c Thu Mar 8 16:05:50 2007 ---- jobs.c Fri May 18 11:40:14 2007 -*************** -*** 784,792 **** - { - old = js.j_firstj++; - while (js.j_firstj != old) - { - if (js.j_firstj >= js.j_jobslots) - js.j_firstj = 0; -! if (jobs[js.j_firstj]) - break; - js.j_firstj++; ---- 784,794 ---- - { - 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++; -*************** -*** 798,806 **** - { - old = js.j_lastj--; - while (js.j_lastj != old) - { - if (js.j_lastj < 0) - js.j_lastj = js.j_jobslots - 1; -! if (jobs[js.j_lastj]) - break; - js.j_lastj--; ---- 800,810 ---- - { - 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--; -*************** -*** 964,968 **** - realloc_jobs_list (); - -! return (js.j_lastj); - } - ---- 975,983 ---- - 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); - } - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 17 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 18 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-019.dpatch b/debian/patches/bash32-019.dpatch deleted file mode 100644 index dc09554..0000000 --- a/debian/patches/bash32-019.dpatch +++ /dev/null @@ -1,362 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-019 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-019 - -Bug-Reported-by: Thomas Loeber -Bug-Reference-ID: <200703082223.08919.ifp@loeber1.de> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00036.html - -Bug-Description: - -When rl_read_key returns -1, indicating that bash's controlling terminal -has been invalidated for some reason (e.g., receiving a SIGHUP), the error -status was not reported correctly to the caller. This could cause input -loops. - -Patch: - -*** ../bash-3.2-patched/lib/readline/complete.c Fri Jul 28 11:35:49 2006 ---- lib/readline/complete.c Tue Mar 13 08:50:16 2007 -*************** -*** 429,433 **** - if (c == 'n' || c == 'N' || c == RUBOUT) - return (0); -! if (c == ABORT_CHAR) - _rl_abort_internal (); - if (for_pager && (c == NEWLINE || c == RETURN)) ---- 440,444 ---- - 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)) -*** ../bash-3.2-patched/lib/readline/input.c Wed Aug 16 15:15:16 2006 ---- lib/readline/input.c Wed May 2 16:07:59 2007 -*************** -*** 514,518 **** - int size; - { -! int mb_len = 0; - size_t mbchar_bytes_length; - wchar_t wc; ---- 522,526 ---- - int size; - { -! int mb_len, c; - size_t mbchar_bytes_length; - wchar_t wc; -*************** -*** 521,531 **** - memset(&ps, 0, sizeof (mbstate_t)); - memset(&ps_back, 0, sizeof (mbstate_t)); -! - while (mb_len < size) - { - RL_SETSTATE(RL_STATE_MOREINPUT); -! mbchar[mb_len++] = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - - mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); - if (mbchar_bytes_length == (size_t)(-1)) ---- 529,545 ---- - 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)) -*************** -*** 565,569 **** - c = first; - memset (mb, 0, mlen); -! for (i = 0; i < mlen; i++) - { - mb[i] = (char)c; ---- 579,583 ---- - c = first; - memset (mb, 0, mlen); -! for (i = 0; c >= 0 && i < mlen; i++) - { - mb[i] = (char)c; -*** ../bash-3.2-patched/lib/readline/isearch.c Mon Dec 26 17:18:53 2005 ---- lib/readline/isearch.c Fri Mar 9 14:30:59 2007 -*************** -*** 328,333 **** - - f = (rl_command_func_t *)NULL; -! -! /* Translate the keys we do something with to opcodes. */ - if (c >= 0 && _rl_keymap[c].type == ISFUNC) - { ---- 328,340 ---- - - 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) - { -*** ../bash-3.2-patched/lib/readline/misc.c Mon Dec 26 17:20:46 2005 ---- lib/readline/misc.c Fri Mar 9 14:44:11 2007 -*************** -*** 147,150 **** ---- 147,152 ---- - rl_clear_message (); - RL_UNSETSTATE(RL_STATE_NUMERICARG); -+ if (key < 0) -+ return -1; - return (_rl_dispatch (key, _rl_keymap)); - } -*** ../bash-3.2-patched/lib/readline/readline.c Wed Aug 16 15:00:36 2006 ---- lib/readline/readline.c Fri Mar 9 14:47:24 2007 -*************** -*** 646,649 **** ---- 669,677 ---- - { - 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; -*** ../bash-3.2-patched/lib/readline/text.c Fri Jul 28 11:55:27 2006 ---- lib/readline/text.c Sun Mar 25 13:41:38 2007 -*************** -*** 858,861 **** ---- 864,870 ---- - RL_UNSETSTATE(RL_STATE_MOREINPUT); - -+ if (c < 0) -+ return -1; -+ - #if defined (HANDLE_SIGNALS) - if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) -*************** -*** 1521,1524 **** ---- 1530,1536 ---- - 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)); -*************** -*** 1537,1540 **** ---- 1549,1555 ---- - RL_UNSETSTATE(RL_STATE_MOREINPUT); - -+ if (c < 0) -+ return -1; -+ - if (count < 0) - return (_rl_char_search_internal (-count, bdir, c)); -*** ../bash-3.2-patched/lib/readline/vi_mode.c Sat Jul 29 16:42:28 2006 ---- lib/readline/vi_mode.c Fri Mar 9 15:02:11 2007 -*************** -*** 887,890 **** ---- 887,897 ---- - c = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); -+ -+ if (c < 0) -+ { -+ *nextkey = 0; -+ return -1; -+ } -+ - *nextkey = c; - -*************** -*** 903,906 **** ---- 910,918 ---- - c = rl_read_key (); /* real command */ - RL_UNSETSTATE(RL_STATE_MOREINPUT); -+ if (c < 0) -+ { -+ *nextkey = 0; -+ return -1; -+ } - *nextkey = c; - } -*************** -*** 1225,1236 **** - _rl_callback_generic_arg *data; - { - #if defined (HANDLE_MULTIBYTE) -! _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); - #else - RL_SETSTATE(RL_STATE_MOREINPUT); -! _rl_vi_last_search_char = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - #endif - - _rl_callback_func = 0; - _rl_want_redisplay = 1; ---- 1243,1262 ---- - _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; -*************** -*** 1248,1251 **** ---- 1274,1278 ---- - int count, key; - { -+ int c; - #if defined (HANDLE_MULTIBYTE) - static char *target; -*************** -*** 1294,1302 **** - { - #if defined (HANDLE_MULTIBYTE) -! _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); - #else - RL_SETSTATE(RL_STATE_MOREINPUT); -! _rl_vi_last_search_char = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - #endif - } ---- 1321,1335 ---- - { - #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 - } -*************** -*** 1468,1471 **** ---- 1501,1507 ---- - RL_UNSETSTATE(RL_STATE_MOREINPUT); - -+ if (c < 0) -+ return -1; -+ - #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) -*************** -*** 1486,1489 **** ---- 1522,1528 ---- - _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; -*************** -*** 1517,1520 **** ---- 1556,1562 ---- - _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)); - } -*************** -*** 1651,1655 **** - RL_UNSETSTATE(RL_STATE_MOREINPUT); - -! if (ch < 'a' || ch > 'z') - { - rl_ding (); ---- 1693,1697 ---- - RL_UNSETSTATE(RL_STATE_MOREINPUT); - -! if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ - { - rl_ding (); -*************** -*** 1703,1707 **** - return 0; - } -! else if (ch < 'a' || ch > 'z') - { - rl_ding (); ---- 1745,1749 ---- - return 0; - } -! else if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ - { - rl_ding (); -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 18 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 19 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-020.dpatch b/debian/patches/bash32-020.dpatch deleted file mode 100644 index ca4f3ca..0000000 --- a/debian/patches/bash32-020.dpatch +++ /dev/null @@ -1,202 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-020 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-020 - -Bug-Reported-by: Ian A Watson -Bug-Reference-ID: -Bug-Reference-URL: - -Bug-Description: - -In some cases of error processing, a jump back to the top-level processing -loop from a builtin command would leave the shell in an inconsistent state. - -Patch: - -*** ../bash-3.2-patched/sig.c Wed Jan 25 14:57:59 2006 ---- sig.c Sat Mar 10 11:11:30 2007 -*************** -*** 351,354 **** ---- 351,373 ---- - #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; -+ return_catch_flag = 0; -+ } -+ - /* What to do when we've been interrupted, and it is safe to handle it. */ - void -*** ../bash-3.2-patched/sig.h Wed Jan 25 14:50:27 2006 ---- sig.h Sat Mar 10 11:14:18 2007 -*************** -*** 122,125 **** ---- 122,126 ---- - 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__)); -*** ../bash-3.2-patched/builtins/common.c Tue Apr 3 16:47:13 2007 ---- builtins/common.c Mon Apr 30 15:01:33 2007 -*************** -*** 132,135 **** ---- 132,136 ---- - { - builtin_error (_("too many arguments")); -+ top_level_cleanup (); - jump_to_top_level (DISCARD); - } -*************** -*** 396,400 **** - throw_to_top_level (); - else -! jump_to_top_level (DISCARD); - } - no_args (list->next); ---- 410,417 ---- - throw_to_top_level (); - else -! { -! top_level_cleanup (); -! jump_to_top_level (DISCARD); -! } - } - no_args (list->next); -*** ../bash-3.2-patched/subst.c Tue Apr 3 16:47:19 2007 ---- subst.c Tue Jul 17 09:45:11 2007 -*************** -*** 1279,1283 **** - 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); ---- 1290,1294 ---- - 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); -*************** -*** 7662,7665 **** ---- 7706,7711 ---- - expand_no_split_dollar_star = 0; /* XXX */ - expanding_redir = 0; -+ -+ top_level_cleanup (); /* from sig.c */ - - jump_to_top_level (v); -*************** -*** 7880,7884 **** - { - report_error (_("no match: %s"), tlist->word->word); -! jump_to_top_level (DISCARD); - } - else if (allow_null_glob_expansion == 0) ---- 7927,7931 ---- - { - report_error (_("no match: %s"), tlist->word->word); -! exp_jump_to_top_level (DISCARD); - } - else if (allow_null_glob_expansion == 0) -*** ../bash-3.2-patched/arrayfunc.c Thu Jul 27 09:37:59 2006 ---- arrayfunc.c Thu May 31 11:55:46 2007 -*************** -*** 619,622 **** ---- 619,624 ---- - { - last_command_exit_value = EXECUTION_FAILURE; -+ -+ top_level_cleanup (); - jump_to_top_level (DISCARD); - } -*** ../bash-3.2-patched/expr.c Wed Dec 28 17:47:03 2005 ---- expr.c Tue Apr 24 14:17:59 2007 -*************** -*** 930,933 **** ---- 930,934 ---- - { - expr_unwind (); -+ top_level_cleanup (); - jump_to_top_level (DISCARD); - } -*** ../bash-3.2-patched/variables.c Fri Sep 8 13:33:32 2006 ---- variables.c Tue Jul 17 09:54:59 2007 -*************** -*** 1822,1830 **** - lval = evalexp (oval, &expok); /* ksh93 seems to do this */ - if (expok == 0) -! jump_to_top_level (DISCARD); - } - rval = evalexp (value, &expok); - if (expok == 0) -! jump_to_top_level (DISCARD); - if (flags & ASS_APPEND) - rval += lval; ---- 1855,1869 ---- - 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; -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 19 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 20 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-021.dpatch b/debian/patches/bash32-021.dpatch deleted file mode 100644 index a35268d..0000000 --- a/debian/patches/bash32-021.dpatch +++ /dev/null @@ -1,91 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-021 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-021 - -Bug-Reported-by: BAGSHAW Paul RD-TECH-REN -Bug-Reference-ID: <941BA0BF46DB8F4983FF7C8AFE800BC205EA7D4B@ftrdmel3.rd.francetelecom.fr> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00065.html - -Bug-Description: - -When the parser read a backslash-escaped character that would be treated -internally as an escape, it would double the number of escape characters. - -Patch: - -*** ../bash-3.2-patched/parse.y Mon Oct 30 17:22:00 2006 ---- parse.y Sat Mar 24 17:13:20 2007 -*************** -*** 3377,3381 **** - { - pass_next_character = 0; -! goto got_character; - } - ---- 3377,3381 ---- - { - pass_next_character = 0; -! goto got_escaped_character; - } - -*************** -*** 3651,3660 **** - got_character: - -- all_digit_token &= DIGIT (character); -- dollar_present |= character == '$'; -- - if (character == CTLESC || character == CTLNUL) - token[token_index++] = CTLESC; - - token[token_index++] = character; - ---- 3651,3662 ---- - 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; - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 20 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 21 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-022.dpatch b/debian/patches/bash32-022.dpatch deleted file mode 100644 index c5a6145..0000000 --- a/debian/patches/bash32-022.dpatch +++ /dev/null @@ -1,145 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-022 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-022 - -Bug-Reported-by: Chet Ramey -Bug-Reference-ID: -Bug-Reference-URL: - -Bug-Description: - -POSIX specifies that the `read' builtin invoked from an interative shell -must prompt with $PS2 when a line is continued using a backslash while -reading from a terminal. - -Patch: - -*** ../bash-3.2-patched/builtins/read.def Tue Sep 19 08:45:48 2006 ---- builtins/read.def Thu May 24 16:03:30 2007 -*************** -*** 128,133 **** - { - register char *varname; -! int size, i, nr, pass_next, saw_escape, eof, opt, retval, code; -! int input_is_tty, input_is_pipe, unbuffered_read; - int raw, edit, nchars, silent, have_timeout, fd; - unsigned int tmout; ---- 131,136 ---- - { - 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, fd; - unsigned int tmout; -*************** -*** 135,139 **** - char c; - char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname; -! char *e, *t, *t1; - struct stat tsb; - SHELL_VAR *var; ---- 138,142 ---- - char c; - char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname; -! char *e, *t, *t1, *ps2; - struct stat tsb; - SHELL_VAR *var; -*************** -*** 149,152 **** ---- 152,156 ---- - USE_VAR(i); - USE_VAR(pass_next); -+ USE_VAR(print_ps2); - USE_VAR(saw_escape); - USE_VAR(input_is_pipe); -*************** -*** 164,167 **** ---- 168,172 ---- - #endif - USE_VAR(list); -+ USE_VAR(ps2); - - i = 0; /* Index into the string that we are reading. */ -*************** -*** 387,391 **** - #endif - -! for (eof = retval = 0;;) - { - #if defined (READLINE) ---- 394,399 ---- - #endif - -! ps2 = 0; -! for (print_ps2 = eof = retval = 0;;) - { - #if defined (READLINE) -*************** -*** 413,416 **** ---- 421,433 ---- - #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); -*************** -*** 441,445 **** - pass_next = 0; - if (c == '\n') -! i--; /* back up over the CTLESC */ - else - goto add_char; ---- 458,466 ---- - 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; -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 21 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 22 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-023.dpatch b/debian/patches/bash32-023.dpatch deleted file mode 100644 index 0151b65..0000000 --- a/debian/patches/bash32-023.dpatch +++ /dev/null @@ -1,70 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-023 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-023 - -Bug-Reported-by: Chet Ramey -Bug-Reference-ID: -Bug-Reference-URL: - -Bug-Description: - -When an error occurs during the pattern removal word expansion, the shell -can free unallocated memory or free memory multiple times. - -Patch: - -*** ../bash-3.2-patched/subst.c Tue Apr 3 16:47:19 2007 ---- subst.c Tue Jul 17 09:45:11 2007 -*************** -*** 3975,3979 **** - patstr++; - -! pattern = getpattern (patstr, quoted, 1); - - temp1 = (char *)NULL; /* shut up gcc */ ---- 4008,4016 ---- - 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 */ -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 22 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 23 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-024.dpatch b/debian/patches/bash32-024.dpatch deleted file mode 100644 index 217f90e..0000000 --- a/debian/patches/bash32-024.dpatch +++ /dev/null @@ -1,96 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-024 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-024 - -Bug-Reported-by: Peter Volkov -Bug-Reference-ID: <1178376645.9063.25.camel@localhost> -Bug-Reference-URL: http://bugs.gentoo.org/177095 - -Bug-Description: - -The readline display code miscalculated the screen position when performing -a redisplay in which the new text occupies more screen space that the old, -but takes fewer bytes to do so (e.g., when replacing a shorter string -containing multibyte characters with a longer one containing only ASCII). - -Patch: - -*** ../bash-3.2-patched/lib/readline/display.c Thu Apr 26 11:38:22 2007 ---- lib/readline/display.c Thu Jul 12 23:10:10 2007 -*************** -*** 1519,1527 **** - /* Non-zero if we're increasing the number of lines. */ - int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin; - /* 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. */ -! 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 ---- 1568,1596 ---- - /* 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); -+ /* 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 -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 23 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 24 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-025.dpatch b/debian/patches/bash32-025.dpatch deleted file mode 100644 index 088b2c8..0000000 --- a/debian/patches/bash32-025.dpatch +++ /dev/null @@ -1,98 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-025 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-025 - -Bug-Reported-by: Tom Bjorkholm -Bug-Reference-ID: -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-04/msg00004.html - -Bug-Description: - -An off-by-one error in readline's input buffering caused readline to drop -each 511th character of buffered input (e.g., when pasting a large amount -of data into a terminal window). - -Patch: - -*** ../bash-3.2-patched/lib/readline/input.c Wed Aug 16 15:15:16 2006 ---- lib/readline/input.c Tue Jul 17 09:24:21 2007 -*************** -*** 134,139 **** - - *key = ibuffer[pop_index++]; -! - if (pop_index >= ibuffer_len) - pop_index = 0; - ---- 134,142 ---- - - *key = ibuffer[pop_index++]; -! #if 0 - if (pop_index >= ibuffer_len) -+ #else -+ if (pop_index > ibuffer_len) -+ #endif - pop_index = 0; - -*************** -*** 251,255 **** - { - k = (*rl_getc_function) (rl_instream); -! rl_stuff_char (k); - if (k == NEWLINE || k == RETURN) - break; ---- 254,259 ---- - { - k = (*rl_getc_function) (rl_instream); -! if (rl_stuff_char (k) == 0) -! break; /* some problem; no more room */ - if (k == NEWLINE || k == RETURN) - break; -*************** -*** 374,378 **** ---- 378,386 ---- - } - ibuffer[push_index++] = key; -+ #if 0 - if (push_index >= ibuffer_len) -+ #else -+ if (push_index > ibuffer_len) -+ #endif - push_index = 0; - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 24 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 25 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-026.dpatch b/debian/patches/bash32-026.dpatch deleted file mode 100644 index 68aa41b..0000000 --- a/debian/patches/bash32-026.dpatch +++ /dev/null @@ -1,101 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-026 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-026 - -Bug-Reported-by: Chet Ramey -Bug-Reference-ID: -Bug-Reference-URL: - -Bug-Description: - -This keeps the Apple linker from attempting to link bash against Apple's -readline library "replacement" rather than the one shipped with bash. It -extends the configure workaround to Mac OS X Leopard (10.5). - -As a side effect, the patch updates the copyright date displayed in the -version string. - -You must re-run configure after applying the patch, and before rebuilding -bash. - -Patch: - -*** ../bash-3.2-patched/configure.in 2007-03-06 11:07:38.000000000 -0500 ---- configure.in 2007-11-23 15:37:41.000000000 -0500 -*************** -*** 519,523 **** - # dynamic version - case "${host_os}" in -! darwin8*) READLINE_LIB='${READLINE_LIBRARY}' ;; - *) READLINE_LIB=-lreadline ;; - esac ---- 519,523 ---- - # dynamic version - case "${host_os}" in -! darwin[[89]]*) READLINE_LIB='${READLINE_LIBRARY}' ;; - *) READLINE_LIB=-lreadline ;; - esac -*** ../bash-3.2-patched/configure 2007-03-24 14:51:22.000000000 -0400 ---- configure 2007-11-23 15:46:15.000000000 -0500 -*************** -*** 4872,4876 **** - # dynamic version - case "${host_os}" in -! darwin8*) READLINE_LIB='${READLINE_LIBRARY}' ;; - *) READLINE_LIB=-lreadline ;; - esac ---- 4872,4876 ---- - # dynamic version - case "${host_os}" in -! darwin[89]*) READLINE_LIB='${READLINE_LIBRARY}' ;; - *) READLINE_LIB=-lreadline ;; - esac -*** ../bash-3.2-patched/version.c 2005-05-16 11:58:34.000000000 -0400 ---- version.c 2007-11-23 16:03:40.000000000 -0500 -*************** -*** 80,83 **** - printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); - if (extended) -! printf (_("Copyright (C) 2005 Free Software Foundation, Inc.\n")); - } ---- 80,83 ---- - printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); - if (extended) -! printf (_("Copyright (C) 2007 Free Software Foundation, Inc.\n")); - } -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 25 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 26 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-027.dpatch b/debian/patches/bash32-027.dpatch deleted file mode 100644 index cbd9977..0000000 --- a/debian/patches/bash32-027.dpatch +++ /dev/null @@ -1,104 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-027 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-027 - -Bug-Reported-by: dAniel hAhler -Bug-Reference-ID: <4702ED8A.5000503@thequod.de> -Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/119938 - -Bug-Description: - -When updating the display after displaying, for instance, a list of possible -completions, readline will place the cursor at the wrong position if the -prompt contains invisible characters and a newline. - -Patch: - -*** ../bash-3.2.25/lib/readline/display.c Mon Aug 6 14:26:29 2007 ---- lib/readline/display.c Wed Oct 10 22:43:58 2007 -*************** -*** 1049,1053 **** - else - tx = nleft; -! if (_rl_last_c_pos > tx) - { - _rl_backspace (_rl_last_c_pos - tx); /* XXX */ ---- 1049,1053 ---- - else - tx = nleft; -! if (tx >= 0 && _rl_last_c_pos > tx) - { - _rl_backspace (_rl_last_c_pos - tx); /* XXX */ -*************** -*** 1205,1209 **** - { - register char *ofd, *ols, *oe, *nfd, *nls, *ne; -! int temp, lendiff, wsatend, od, nd; - int current_invis_chars; - int col_lendiff, col_temp; ---- 1205,1209 ---- - { - register char *ofd, *ols, *oe, *nfd, *nls, *ne; -! int temp, lendiff, wsatend, od, nd, o_cpos; - int current_invis_chars; - int col_lendiff, col_temp; -*************** -*** 1466,1469 **** ---- 1466,1471 ---- - } - -+ 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 -*************** -*** 1475,1479 **** - 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 == prompt_physical_chars) - cpos_adjusted = 1; - #endif ---- 1477,1483 ---- - 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 -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 26 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 27 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-028.dpatch b/debian/patches/bash32-028.dpatch deleted file mode 100644 index b1b9a24..0000000 --- a/debian/patches/bash32-028.dpatch +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-028 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-028 - -Bug-Reported-by: dAniel hAhler -Bug-Reference-ID: -Bug-Reference-URL: - -Bug-Description: - -Under some circumstances, readline will incorrectly display a prompt string -containing invisible characters after the final newline. - -Patch: - -*** ../bash-3.2-patched/lib/readline/display.c 2007-08-25 13:47:08.000000000 -0400 ---- lib/readline/display.c 2007-11-10 17:51:29.000000000 -0500 -*************** -*** 392,396 **** - local_prompt = expand_prompt (p, &prompt_visible_length, - &prompt_last_invisible, -! (int *)NULL, - &prompt_physical_chars); - c = *t; *t = '\0'; ---- 420,424 ---- - local_prompt = expand_prompt (p, &prompt_visible_length, - &prompt_last_invisible, -! &prompt_invis_chars_first_line, - &prompt_physical_chars); - c = *t; *t = '\0'; -*************** -*** 399,403 **** - local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, - (int *)NULL, -! &prompt_invis_chars_first_line, - (int *)NULL); - *t = c; ---- 427,431 ---- - local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, - (int *)NULL, -! (int *)NULL, - (int *)NULL); - *t = c; -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 27 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 28 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-029.dpatch b/debian/patches/bash32-029.dpatch deleted file mode 100644 index bdafe9f..0000000 --- a/debian/patches/bash32-029.dpatch +++ /dev/null @@ -1,71 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-029 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-029 - -Bug-Reported-by: Tomas Janousek -Bug-Reference-ID: <20071102104034.GA26893@redhat.com> -Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=286861 - -Bug-Description: - -When the bash arithmetic expression evaluator has temporarily turned off -evalation, such as when parsing a pre- or post-decrement or -increment -operator, and an error occurs, evaluation is not re-enabled. - -Patch: - -*** ../bash-3.2-patched/expr.c 2007-08-25 13:47:05.000000000 -0400 ---- expr.c 2007-10-18 08:08:44.000000000 -0400 -*************** -*** 287,290 **** ---- 287,292 ---- - } - free (expr_stack[expr_depth]); /* free the allocated EXPR_CONTEXT */ -+ -+ noeval = 0; /* XXX */ - } - -*************** -*** 320,323 **** ---- 322,326 ---- - - val = 0; -+ noeval = 0; - - FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf)); -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 28 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 29 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-030.dpatch b/debian/patches/bash32-030.dpatch deleted file mode 100644 index 1a2b0ed..0000000 --- a/debian/patches/bash32-030.dpatch +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-030 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-030 - -Bug-Reported-by: Paul Eggert Andreas Schwab -Bug-Reference-ID: <877il0nu84.fsf_-_@penguin.cs.ucla.edu> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-11/msg00023.html http://lists.gnu.org/archive/html/bug-bash/2007-11/msg00022.htmlhttp://lists.gnu.org/archive/html/bug-bash/2007-11/msg00022.html - -Bug-Description: - -If redirections attached to a compound command fail, bash does not set the -command's exit status correctly. This only happens when the command is the -first in a sequential list. - -Patch: - -*** ../bash-3.2-patched/execute_cmd.c 2007-03-24 14:51:05.000000000 -0400 ---- execute_cmd.c 2007-11-05 22:31:14.000000000 -0500 -*************** -*** 615,619 **** - redirection_undo_list = (REDIRECT *)NULL; - dispose_exec_redirects (); -! return (EXECUTION_FAILURE); - } - ---- 620,624 ---- - redirection_undo_list = (REDIRECT *)NULL; - dispose_exec_redirects (); -! return (last_command_exit_value = EXECUTION_FAILURE); - } - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 29 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 30 - - #endif /* _PATCHLEVEL_H_ */ - - diff --git a/debian/patches/bash32-031.dpatch b/debian/patches/bash32-031.dpatch deleted file mode 100644 index f4b96c7..0000000 --- a/debian/patches/bash32-031.dpatch +++ /dev/null @@ -1,81 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-031 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-031 - -Bug-Reported-by: Miroslav Lichvar -Bug-Reference-ID: Fri, 02 Nov 2007 14:07:45 +0100 -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-11/msg00000.html - -Bug-Description: - -In certain cases when outputting characters at the end of the line, -e.g., when displaying the prompt string, readline positions the cursor -incorrectly if the prompt string contains invisible characters and the -text being drawn begins before the last invisible character in the line. - -Patch: - -*** ../bash-3.2-patched/lib/readline/display.c 2007-08-25 13:47:08.000000000 -0400 ---- lib/readline/display.c 2007-11-10 17:51:29.000000000 -0500 -*************** -*** 1566,1574 **** - else - { -- /* We have horizontal scrolling and we are not inserting at -- the end. We have invisible characters in this line. This -- is a dumb update. */ - _rl_output_some_chars (nfd, temp); - _rl_last_c_pos += col_temp; - return; - } ---- 1619,1632 ---- - else - { - _rl_output_some_chars (nfd, temp); - _rl_last_c_pos += col_temp; -+ /* 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; - } -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 30 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 31 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-032.dpatch b/debian/patches/bash32-032.dpatch deleted file mode 100644 index f01d2b0..0000000 --- a/debian/patches/bash32-032.dpatch +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-032 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-032 - -Bug-Reported-by: Uwe Doering -Bug-Reference-ID: <46F3DD72.2090801@geminix.org> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-09/msg00102.html - -Bug-Description: - -There is an off-by-one error in the code that buffers characters received -very quickly in succession, causing characters to be dropped. - -Patch: - -*** ../bash-3.2-patched/lib/readline/input.c 2007-08-25 13:47:10.000000000 -0400 ---- lib/readline/input.c 2007-10-12 22:55:25.000000000 -0400 -*************** -*** 155,159 **** - pop_index--; - if (pop_index < 0) -! pop_index = ibuffer_len - 1; - ibuffer[pop_index] = key; - return (1); ---- 155,159 ---- - pop_index--; - if (pop_index < 0) -! pop_index = ibuffer_len; - ibuffer[pop_index] = key; - return (1); -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 31 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 32 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-033.dpatch b/debian/patches/bash32-033.dpatch deleted file mode 100644 index c83806e..0000000 --- a/debian/patches/bash32-033.dpatch +++ /dev/null @@ -1,107 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-033 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-033 - -Bug-Reported-by: Christophe Martin -Bug-Reference-ID: <465ABA4A.3030805@free.fr> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-05/msg00104.html - -Bug-Description: - -References made within a function to an uninitialized local array variable -using the [*] subscript in a double-quoted string can result in spurious -ASCII 127 characters in the expanded value. - -Patch: - -*** ../bash-3.2-patched/arrayfunc.c 2007-08-25 13:47:05.000000000 -0400 ---- arrayfunc.c 2007-05-31 11:55:46.000000000 -0400 -*************** -*** 723,727 **** - { - if (rtype) -! *rtype = 1; - if (allow_all == 0) - { ---- 723,727 ---- - { - if (rtype) -! *rtype = (t[0] == '*') ? 1 : 2; - if (allow_all == 0) - { -*** ../bash-3.2-patched/subst.c 2007-08-25 13:47:08.000000000 -0400 ---- subst.c 2007-11-14 15:43:00.000000000 -0500 -*************** -*** 4908,4915 **** - intmax_t arg_index; - SHELL_VAR *var; -! int atype; - - ret = 0; - temp = 0; - - /* Handle multiple digit arguments, as in ${11}. */ ---- 4973,4981 ---- - intmax_t arg_index; - SHELL_VAR *var; -! int atype, rflags; - - ret = 0; - temp = 0; -+ rflags = 0; - - /* Handle multiple digit arguments, as in ${11}. */ -*************** -*** 4944,4947 **** ---- 5010,5015 ---- - ? 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 -*************** -*** 4971,4974 **** ---- 5039,5043 ---- - ret = alloc_word_desc (); - ret->word = temp; -+ ret->flags |= rflags; - } - return ret; -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 32 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 33 - - #endif /* _PATCHLEVEL_H_ */ - diff --git a/debian/patches/bash32-034.dpatch b/debian/patches/bash32-034.dpatch deleted file mode 100644 index 19428e5..0000000 --- a/debian/patches/bash32-034.dpatch +++ /dev/null @@ -1,93 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-034 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-034 - -Bug-Reported-by: Ian Campbell -Bug-Reference-ID: -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-10/msg00060.html - -Bug-Description: - -The bash getcwd replacement will write past the end of allocated memory -when it allocates the buffer itself if it uses the buffer size passed as -an argument, and that size is less than the length of the pathname. - -Patch: - -*** ../bash-3.2-patched/lib/sh/getcwd.c 2004-07-21 17:15:19.000000000 -0400 ---- lib/sh/getcwd.c 2007-12-31 19:26:36.000000000 -0500 -*************** -*** 252,268 **** - { - size_t len = pathbuf + pathsize - pathp; - if (buf == NULL) - { -! if (len < (size_t) size) -! len = size; -! buf = (char *) malloc (len); - if (buf == NULL) - goto lose2; - } -! else if ((size_t) size < len) -! { -! errno = ERANGE; -! goto lose2; -! } - (void) memcpy((PTR_T) buf, (PTR_T) pathp, len); - } ---- 287,305 ---- - { - 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); - } -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 33 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 34 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-035.dpatch b/debian/patches/bash32-035.dpatch deleted file mode 100644 index 6bd78d5..0000000 --- a/debian/patches/bash32-035.dpatch +++ /dev/null @@ -1,178 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-035 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-035 - -Bug-Reported-by: Ingo Molnar -Bug-Reference-ID: <20071205202901.GA25202@elte.hu> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-12/msg00014.html - -Bug-Description: - -Bash incorrectly puts the second and subsequent children spawned by a -shell forked to run a command substitution in the wrong process group. - -Patch: - -*** ../bash-3.2-patched/subst.c 2007-12-13 22:31:21.000000000 -0500 ---- subst.c 2008-01-17 22:48:15.000000000 -0500 -*************** -*** 4621,4627 **** - - #if defined (JOB_CONTROL) - set_sigchld_handler (); - stop_making_children (); -! pipeline_pgrp = old_pipeline_pgrp; - #else - stop_making_children (); ---- 4721,4728 ---- - - #if defined (JOB_CONTROL) - set_sigchld_handler (); - stop_making_children (); -! if (pid != 0) -! pipeline_pgrp = old_pipeline_pgrp; - #else - stop_making_children (); -*** ../bash-3.2-patched/jobs.c 2007-08-25 13:46:59.000000000 -0400 ---- jobs.c 2007-12-08 16:47:43.000000000 -0500 -*************** -*** 251,254 **** ---- 251,255 ---- - static int set_job_status_and_cleanup __P((int)); - -+ static WAIT job_signal_status __P((int)); - static WAIT raw_job_exit_status __P((int)); - -*************** -*** 2220,2223 **** ---- 2238,2261 ---- - } - -+ 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. */ -*************** -*** 2302,2310 **** - 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. */ - - /* This is possibly a race condition -- should it go in stop_pipeline? */ - wait_sigint_received = 0; -! if (job_control == 0) - { - old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); ---- 2343,2354 ---- - 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); -*************** -*** 2452,2464 **** - 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. */ -! p = jobs[job]->pipe; -! do -! { -! s = p->status; -! if (WIFSIGNALED(s) || WIFSTOPPED(s)) -! break; -! p = p->next; -! } -! while (p != jobs[job]->pipe); - - if (WIFSIGNALED (s) || WIFSTOPPED (s)) ---- 2496,2500 ---- - 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)) -*************** -*** 2494,2497 **** ---- 2530,2551 ---- - } - } -+ 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 -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 34 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 35 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-036.dpatch b/debian/patches/bash32-036.dpatch deleted file mode 100644 index 1163770..0000000 --- a/debian/patches/bash32-036.dpatch +++ /dev/null @@ -1,63 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-036 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-036 - -Bug-Reported-by: Len Lattanzi -Bug-Reference-ID: <87493131-7AEC-4301-A684-E6CC6D06E3E1@apple.com> -Bug-Reference-URL: - -Bug-Description: - -When initializing a subshell, bash did not reset a sentinel keeping track -of the number of command substitutions, leading to an infinite loop if -an error was encountered in the subshell. - -Patch: - -*** ../bash-3.2-patched/execute_cmd.c 2007-12-13 22:31:14.000000000 -0500 ---- execute_cmd.c 2007-12-20 08:52:34.000000000 -0500 -*************** -*** 3881,3884 **** ---- 3916,3921 ---- - - 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. */ -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 35 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 36 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-037.dpatch b/debian/patches/bash32-037.dpatch deleted file mode 100644 index fbb2c98..0000000 --- a/debian/patches/bash32-037.dpatch +++ /dev/null @@ -1,129 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-037 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-037 - -Bug-Reported-by: jared r r spiegel -Bug-Reference-ID: <200801152201.m0FM1lDp021260@iorek.ice-nine.org> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2008-01/msg00049.html - -Bug-Description: - -Bash inappropriately evaluates command substitutions while expanding -directory names as part of command substitution. - -Patch: - -*** ../bash-3.2-patched/subst.c 2007-12-13 22:31:21.000000000 -0500 ---- subst.c 2008-01-17 22:48:15.000000000 -0500 -*************** -*** 2815,2821 **** - to jump_to_top_level here so we don't endlessly loop. */ - WORD_LIST * -! expand_prompt_string (string, quoted) - char *string; - int quoted; - { - WORD_LIST *value; ---- 2895,2902 ---- - 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; -*************** -*** 2825,2829 **** - return ((WORD_LIST *)NULL); - -! td.flags = 0; - td.word = savestring (string); - ---- 2906,2910 ---- - return ((WORD_LIST *)NULL); - -! td.flags = wflags; - td.word = savestring (string); - -*** ../bash-3.2-patched/subst.h 2007-03-24 14:51:05.000000000 -0400 ---- subst.h 2008-01-17 22:46:08.000000000 -0500 -*************** -*** 136,140 **** - - /* Expand a prompt string. */ -! extern WORD_LIST *expand_prompt_string __P((char *, int)); - - /* Expand STRING just as if you were expanding a word. This also returns ---- 137,141 ---- - - /* 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 -*** ../bash-3.2-patched/parse.y 2007-08-25 13:47:06.000000000 -0400 ---- parse.y 2008-01-17 22:46:30.000000000 -0500 -*************** -*** 4367,4371 **** - { - last_exit_value = last_command_exit_value; -! list = expand_prompt_string (result, Q_DOUBLE_QUOTES); - free (result); - result = string_list (list); ---- 4367,4371 ---- - { - last_exit_value = last_command_exit_value; -! list = expand_prompt_string (result, Q_DOUBLE_QUOTES, 0); - free (result); - result = string_list (list); -*** ../bash-3.2-patched/bashline.c 2006-07-29 16:39:30.000000000 -0400 ---- bashline.c 2008-02-17 12:53:42.000000000 -0500 -*************** -*** 2358,2362 **** - { - new_dirname = savestring (local_dirname); -! wl = expand_prompt_string (new_dirname, 0); /* does the right thing */ - if (wl) - { ---- 2376,2380 ---- - { - new_dirname = savestring (local_dirname); -! wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB); /* does the right thing */ - if (wl) - { -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 36 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 37 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-038.dpatch b/debian/patches/bash32-038.dpatch deleted file mode 100644 index a3727d2..0000000 --- a/debian/patches/bash32-038.dpatch +++ /dev/null @@ -1,99 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-038 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-038 - -Bug-Reported-by: Wojciech Puchar -Bug-Reference-ID: <200803131141.m2DBf9vo001136@wojtek.tensor.gdynia.pl> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2008-03/msg00029.html - -Bug-Description: - -When reading input lines into a single variable using the `read' builtin, -bash did not free the memory it read after assigining it to the named -variable, causing a memory leak noticable when reading large amounts of -data. - - -Patch: - -*** ../bash-3.2-patched/builtins/read.def 2007-08-25 13:47:07.000000000 -0400 ---- builtins/read.def 2008-03-07 12:55:47.000000000 -0500 -*************** -*** 135,139 **** - char c; - char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname; -! char *e, *t, *t1, *ps2; - struct stat tsb; - SHELL_VAR *var; ---- 152,156 ---- - char c; - char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname; -! char *e, *t, *t1, *ps2, *tofree; - struct stat tsb; - SHELL_VAR *var; -*************** -*** 675,678 **** ---- 728,732 ---- - /* Check whether or not the number of fields is exactly the same as the - number of variables. */ -+ tofree = NULL; - if (*input_string) - { -*************** -*** 680,684 **** - t = get_word_from_string (&input_string, ifs_chars, &e); - if (*input_string == 0) -! input_string = t; - else - input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape); ---- 734,738 ---- - 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); -*************** -*** 695,698 **** ---- 749,754 ---- - var = bind_read_variable (list->word->word, input_string); - stupidly_hack_special_variables (list->word->word); -+ FREE (tofree); -+ - if (var) - VUNSETATTR (var, att_invisible); -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 37 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 38 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bash32-039-doc.dpatch b/debian/patches/bash32-039-doc.dpatch deleted file mode 100644 index 5c46c8f..0000000 --- a/debian/patches/bash32-039-doc.dpatch +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-039 (documentation) - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-039 - -Bug-Reported-by: rew@erebor.com -Bug-Reference-ID: <20070119065603.546D011E9C@kansas.erebor.com> -Bug-Reference-URL: - -Bug-Description: - -Bash-3.2 changed the behavior of the [[ command's `=~' operator when the -right-hand side was quoted: it matched the quoted portions as strings. -This patch introduces a new shell option: compat31. When enabled, it -restores the bash-3.1 behavior with respect to evaluating quoted arguments -to the =~ operator. - -Patch: - -*** ../bash-20080214/doc/bashref.texi 2008-02-08 21:28:35.000000000 -0500 ---- doc/bashref.texi 2008-02-22 21:44:51.000000000 -0500 -*************** -*** 4053,4056 **** ---- 4061,4069 ---- - 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 dotglob - If set, Bash includes filenames beginning with a `.' in diff --git a/debian/patches/bash32-039.dpatch b/debian/patches/bash32-039.dpatch deleted file mode 100644 index f39fde8..0000000 --- a/debian/patches/bash32-039.dpatch +++ /dev/null @@ -1,180 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-3.2 upstream patch bash32-039 - - BASH PATCH REPORT - ================= - -Bash-Release: 3.2 -Patch-ID: bash32-039 - -Bug-Reported-by: rew@erebor.com -Bug-Reference-ID: <20070119065603.546D011E9C@kansas.erebor.com> -Bug-Reference-URL: - -Bug-Description: - -Bash-3.2 changed the behavior of the [[ command's `=~' operator when the -right-hand side was quoted: it matched the quoted portions as strings. -This patch introduces a new shell option: compat31. When enabled, it -restores the bash-3.1 behavior with respect to evaluating quoted arguments -to the =~ operator. - -Patch: - -*** ../bash-3.2-patched/execute_cmd.c 2007-12-14 21:12:39.000000000 -0500 ---- execute_cmd.c 2008-02-22 21:20:40.000000000 -0500 -*************** -*** 2547,2551 **** - if (arg1 == 0) - arg1 = nullstr; -! arg2 = cond_expand_word (cond->right->op, rmatch ? 2 : (patmatch ? 1 : 0)); - if (arg2 == 0) - arg2 = nullstr; ---- 2552,2557 ---- - if (arg1 == 0) - arg1 = nullstr; -! arg2 = cond_expand_word (cond->right->op, -! (rmatch && shell_compatibility_level > 31) ? 2 : (patmatch ? 1 : 0)); - if (arg2 == 0) - arg2 = nullstr; -*** ../bash-3.2-patched/shell.h 2003-06-01 15:04:36.000000000 -0400 ---- shell.h 2008-02-22 21:16:48.000000000 -0500 -*************** -*** 90,93 **** ---- 90,94 ---- - extern int interactive, interactive_shell; - extern int startup_state; -+ extern int shell_compatibility_level; - - /* Structure to pass around that holds a bitmap of file descriptors -*** ../bash-3.2-patched/version.c 2007-12-14 21:12:29.000000000 -0500 ---- version.c 2008-04-10 08:22:22.000000000 -0400 -*************** -*** 44,47 **** ---- 44,50 ---- - const char *sccs_version = SCCSVERSION; - -+ /* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */ -+ int shell_compatibility_level = 32; -+ - /* Functions for getting, setting, and displaying the shell version. */ - -*** ../bash-3.2-patched/builtins/shopt.def 2005-02-19 17:25:03.000000000 -0500 ---- builtins/shopt.def 2008-04-10 08:13:32.000000000 -0400 -*************** -*** 102,105 **** ---- 102,107 ---- - static int set_shellopts_after_change __P((int)); - -+ static int set_compatibility_level __P((int)); -+ - #if defined (RESTRICTED_SHELL) - static int set_restricted_shell __P((int)); -*************** -*** 107,110 **** ---- 109,113 ---- - - static int shopt_login_shell; -+ static int shopt_compat31; - - typedef int shopt_set_func_t __P((int)); -*************** -*** 122,125 **** ---- 125,129 ---- - { "cmdhist", &command_oriented_history, (shopt_set_func_t *)NULL }, - #endif -+ { "compat31", &shopt_compat31, set_compatibility_level }, - { "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL }, - { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL }, -*************** -*** 460,463 **** ---- 464,479 ---- - } - -+ static int -+ set_compatibility_level (mode) -+ int mode; -+ { -+ /* Need to change logic here as we add more compatibility levels */ -+ if (shopt_compat31) -+ shell_compatibility_level = 31; -+ else -+ shell_compatibility_level = 32; -+ return 0; -+ } -+ - #if defined (RESTRICTED_SHELL) - /* Don't allow the value of restricted_shell to be modified. */ -*** ../bash-3.2-patched/doc/bash.1 2006-09-28 10:26:05.000000000 -0400 ---- doc/bash.1 2008-04-25 12:32:49.000000000 -0400 -*************** -*** 7978,7981 **** ---- 8200,8209 ---- - 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 dotglob - If set, -*** ../bash-3.2-patched/tests/shopt.right 2005-02-19 17:46:09.000000000 -0500 ---- tests/shopt.right 2008-04-28 09:13:07.000000000 -0400 -*************** -*** 7,10 **** ---- 7,11 ---- - shopt -u checkwinsize - shopt -s cmdhist -+ shopt -u compat31 - shopt -u dotglob - shopt -u execfail -*************** -*** 54,57 **** ---- 55,59 ---- - shopt -u checkhash - shopt -u checkwinsize -+ shopt -u compat31 - shopt -u dotglob - shopt -u execfail -*************** -*** 78,81 **** ---- 80,84 ---- - checkhash off - checkwinsize off -+ compat31 off - dotglob off - execfail off - -*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 ---- patchlevel.h Mon Oct 16 14:22:54 2006 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 38 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 39 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/bashbug-editor.diff b/debian/patches/bashbug-editor.diff new file mode 100644 index 0000000..3b751b6 --- /dev/null +++ b/debian/patches/bashbug-editor.diff @@ -0,0 +1,12 @@ +# DP: send bug reports to Debian bash maintainer too. + +--- a/support/bashbug.sh ++++ b/support/bashbug.sh +@@ -117,6 +117,7 @@ + esac ;; + esac + ++BUGBASH="${BUGBASH},bash@packages.debian.org" + BUGADDR="${1-$BUGBASH}" + + if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then diff --git a/debian/patches/bashbug-editor.dpatch b/debian/patches/bashbug-editor.dpatch deleted file mode 100755 index cb52ebd..0000000 --- a/debian/patches/bashbug-editor.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: send bug reports to Debian bash maintainer too. - -diff -urb bash.orig/support/bashbug.sh bash/support/bashbug.sh ---- bash.orig/support/bashbug.sh 2002-04-16 23:15:15.000000000 +0200 -+++ bash/support/bashbug.sh 2003-09-27 23:35:04.000000000 +0200 -@@ -134,6 +134,7 @@ - esac ;; - esac - -+BUGBASH="${BUGBASH},bash@packages.debian.org" - BUGADDR="${1-$BUGBASH}" - - if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then -Only in bash/support: bashbug.sh.orig diff --git a/debian/patches/bashdb-updates.dpatch b/debian/patches/bashdb-updates.dpatch deleted file mode 100644 index 13a6b24..0000000 --- a/debian/patches/bashdb-updates.dpatch +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh -e - -dir=. -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" - dir=$3 -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) - patch $pdir -f --no-backup-if-mismatch -p1 < $0 - cd $dir && autoconf - ;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Debian updates to bashdb - diff --git a/debian/patches/bashdb.dpatch b/debian/patches/bashdb.dpatch deleted file mode 100644 index 7a330d1..0000000 --- a/debian/patches/bashdb.dpatch +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh -e - -dir=. -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" - dir=$3 -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) - patch $pdir -f --no-backup-if-mismatch -p1 < $0 - rm -f $dir/aclocal.m4 - rm -f $dir/configure - rm -f $dir/doc/bashref.info - rm -f $dir/examples/bashdb/bashdb.el - rm -f $dir/lib/readline/doc/Makefile - rm -f $dir/parser-built - rm -f $dir/pathnames.h - rm -f $dir/y.tab.[ch] - (cd $dir && aclocal -I . -I debugger) - (cd $dir && autoconf) - for i in config.guess config.sub elisp-comp install-sh \ - missing mkinstalldirs - do - cp -p /usr/share/automake-1.7/$i $dir/debugger/ - done - for i in mdate-sh texinfo.tex; do - cp -p /usr/share/automake-1.7/$i $dir/debugger/doc/ - done - (cd $dir/debugger && aclocal -I ..) - cp -p $dir/debugger/elisp-comp $dir/debugger/emacs/. - (cd $dir/debugger && automake) - (cd $dir/debugger && autoconf) - ;; - -unpatch) - patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 - ;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# how to construct this file: -# - unpack the upstream bash source -# - unpack the bashdb source -# - apply bash the seven bash upstream patches -# - diff -ur --unidirectional-new-file \ - --exclude CVS --exclude=.cvsignore --exclude=/db/ \ -# bash-2.05b bashdb - -# DP: bashdb changes - -diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/ChangeLog cvs/ChangeLog diff --git a/debian/patches/builtins-caller.dpatch b/debian/patches/builtins-caller.dpatch deleted file mode 100644 index 915a946..0000000 --- a/debian/patches/builtins-caller.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Fix typo in help message for caller builtin - ---- bash/builtins/caller.def~ 2006-08-24 17:30:39.000000000 +0200 -+++ bash/builtins/caller.def 2008-04-19 23:28:44.000000000 +0200 -@@ -130,7 +130,7 @@ - static char *caller_doc[] = { - N_("Returns the context of the current subroutine call."), - N_(" "), -- N_("Without EXPR, returns returns \"$line $filename\". With EXPR,"), -+ N_("Without EXPR, returns \"$line $filename\". With EXPR,"), - N_("returns \"$line $subroutine $filename\"; this extra information"), - N_("can be used used to provide a stack trace."), - N_(" "), diff --git a/debian/patches/command-not-found-doc.dpatch b/debian/patches/command-not-found-doc.dpatch deleted file mode 100644 index 2ec9a23..0000000 --- a/debian/patches/command-not-found-doc.dpatch +++ /dev/null @@ -1,35 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Add command_not_found_handle in interactive non POSIX mode - ---- bash/doc/bashref.texi~ 2004-06-26 20:26:07.000000000 +0200 -+++ bash/doc/bashref.texi 2004-08-28 15:06:27.000000000 +0200 -@@ -4734,6 +4734,13 @@ - @item UID - The numeric real user id of the current user. This variable is readonly. - -+@item command_not_found_handle -+The name of a shell function to be called if a command cannot be -+found. The return value of this function should be 0, if the command -+is available after execution of the function, otherwise 127 (EX_NOTFOUND). -+Enabled only in interactive, non POSIX mode shells. This is a Debian -+extension. -+ - @end vtable - - @node Bash Features diff --git a/debian/patches/command-not-found.dpatch b/debian/patches/command-not-found.dpatch deleted file mode 100755 index b1feb22..0000000 --- a/debian/patches/command-not-found.dpatch +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Add command_not_found_handle in interactive non POSIX mode - ---- bash/execute_cmd.c~ 2004-08-28 14:43:04.000000000 +0200 -+++ bash/execute_cmd.c 2004-08-28 14:54:57.000000000 +0200 -@@ -3615,8 +3615,26 @@ - - if (command == 0) - { -- internal_error (_("%s: command not found"), pathname); -- exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ -+ SHELL_VAR *f, *v; -+ WORD_LIST *cmdlist; -+ WORD_DESC *w; -+ int fval; -+ if( (posixly_correct || interactive_shell == 0) || -+ (f = find_function ("command_not_found_handle")) == 0) -+ { -+ internal_error (_("%s: command not found"), pathname); -+ exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ -+ } -+ w = make_word("command_not_found_handle"); -+ cmdlist = make_word_list(w, (WORD_LIST*)NULL); -+ -+ w = make_word(pathname); -+ cmdlist->next = make_word_list(w, (WORD_LIST*)NULL); -+ -+ fval = execute_shell_function (f, cmdlist); -+ if (fval == EX_NOTFOUND) -+ internal_error (_("%s: command not found"), pathname); -+ exit(fval); - } - - /* Execve expects the command name to be in args[0]. So we ---- bash/doc/bash.1~ 2004-08-06 08:01:10.000000000 +0200 -+++ bash/doc/bash.1 2004-08-28 15:03:13.000000000 +0200 -@@ -1972,6 +1972,13 @@ - .B % - job identifier. - .TP -+.B command_not_found_handle -+The name of a shell function to be called if a command cannot be -+found. The return value of this function should be 0, if the command -+is available after execution of the function, otherwise 127 (EX_NOTFOUND). -+Enabled only in interactive, non POSIX mode shells. This is a Debian -+extension. -+.TP - .B histchars - The two or three characters which control history expansion - and tokenization (see diff --git a/debian/patches/patches/deb-bash-config.dpatch b/debian/patches/deb-bash-config.diff similarity index 55% rename from debian/patches/patches/deb-bash-config.dpatch rename to debian/patches/deb-bash-config.diff index 24360d0..5b487cc 100644 --- a/debian/patches/patches/deb-bash-config.dpatch +++ b/debian/patches/deb-bash-config.diff @@ -1,20 +1,3 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - # DP: Changed compile time configuration options: # DP: # DP: - Set the default path to comply with Debian policy @@ -32,27 +15,18 @@ exit 0 # DP: - don't define a default DEFAULT_MAIL_DIRECTORY, because it # DP: can cause a timeout on NFS mounts. ---- bash/config-top.h.orig 2008-08-17 16:52:25.000000000 +0000 -+++ bash/config-top.h 2008-11-29 17:35:03.000000000 +0000 -@@ -54,14 +54,14 @@ - /* The default value of the PATH variable. */ - #ifndef DEFAULT_PATH_VALUE - #define DEFAULT_PATH_VALUE \ -- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." -+ "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/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" -+ "/bin:/usr/bin:/sbin:/usr/sbin" - #endif +--- a/config-bot.h ++++ b/config-bot.h +@@ -204,4 +204,4 @@ + /******************************************************************/ - /* Default primary and secondary prompt strings. */ -@@ -75,20 +75,20 @@ - #define KSH_COMPATIBLE_SELECT + /* If you don't want bash to provide a default mail file to check. */ +-/* #undef DEFAULT_MAIL_DIRECTORY */ ++#undef DEFAULT_MAIL_DIRECTORY +--- a/config-top.h ++++ b/config-top.h +@@ -97,20 +97,20 @@ + #define DEFAULT_BASHRC "~/.bashrc" /* System-wide .bashrc file for interactive shells. */ -/* #define SYS_BASHRC "/etc/bash.bashrc" */ @@ -74,13 +48,5 @@ exit 0 -/* #define SSH_SOURCE_BASHRC */ +#define SSH_SOURCE_BASHRC - /* Define if you want the case-capitalizing operators (~[~]) and the + /* Define if you want the case-toggling operators (~[~]) and the `capcase' variable attribute (declare -c). */ ---- bash/config-bot.h.orig 2008-08-17 16:52:02.000000000 +0000 -+++ bash/config-bot.h 2008-11-29 17:32:42.000000000 +0000 -@@ -192,4 +192,4 @@ - /******************************************************************/ - - /* If you don't want bash to provide a default mail file to check. */ --/* #undef DEFAULT_MAIL_DIRECTORY */ -+#undef DEFAULT_MAIL_DIRECTORY diff --git a/debian/patches/deb-bash-config.dpatch b/debian/patches/deb-bash-config.dpatch deleted file mode 100755 index 1aa1e45..0000000 --- a/debian/patches/deb-bash-config.dpatch +++ /dev/null @@ -1,81 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Changed compile time configuration options: -# DP: -# DP: - Set the default path to comply with Debian policy -# DP: -# DP: - Enable System-wide .bashrc file for interactive shells. -# DP: -# DP: - Enable System-wide .bash.logout file for interactive shells. -# DP: -# DP: - make non-interactive shells begun with argv[0][0] == '-' -# DP: run the startup files when not in posix mode. -# DP: -# DP: - try to check whether bash is being run by sshd and source -# DP: the .bashrc if so (like the rshd behavior). -# DP: -# DP: - don't define a default DEFAULT_MAIL_DIRECTORY, because it -# DP: can cause a timeout on NFS mounts. - ---- bash/config-bot.h~ 2003-09-19 21:57:38.000000000 +0200 -+++ bash/config-bot.h 2003-10-09 21:06:01.000000000 +0200 -@@ -178,4 +178,4 @@ - /******************************************************************/ - - /* If you don't want bash to provide a default mail file to check. */ --/* #undef DEFAULT_MAIL_DIRECTORY */ -+#undef DEFAULT_MAIL_DIRECTORY ---- bash-3.1-alpha1/config-top.h 2005-04-29 20:36:34.000000000 +0000 -+++ bash/config-top.h 2005-09-09 19:26:41.923569456 +0000 -@@ -52,14 +52,14 @@ - /* The default value of the PATH variable. */ - #ifndef DEFAULT_PATH_VALUE - #define DEFAULT_PATH_VALUE \ -- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." -+ "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/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" -+ "/bin:/usr/bin:/sbin:/usr/sbin" - #endif - - /* Default primary and secondary prompt strings. */ -@@ -73,15 +73,15 @@ - #define KSH_COMPATIBLE_SELECT - - /* System-wide .bashrc file for interactive shells. */ --/* #define SYS_BASHRC "/etc/bash.bashrc" */ -+#define SYS_BASHRC "/etc/bash.bashrc" - - /* System-wide .bash_logout for login shells. */ --/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */ -+#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 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). */ --/* #define SSH_SOURCE_BASHRC */ -+#define SSH_SOURCE_BASHRC diff --git a/debian/patches/deb-examples.diff b/debian/patches/deb-examples.diff new file mode 100644 index 0000000..77c2d0d --- /dev/null +++ b/debian/patches/deb-examples.diff @@ -0,0 +1,14 @@ +# DP: document readline header location on Debian systems + +--- a/examples/loadables/README ++++ b/examples/loadables/README +@@ -40,6 +40,9 @@ rest of the example builtins. It's inten + that can be modified or included to help you build your own loadables + without having to search for the right CFLAGS and LDFLAGS. + ++On Debian GNU/Linux systems, the bash headers are in /usr/include/bash. ++The appropriate options are already set in the example Makefile. ++ + basename.c Return non-directory portion of pathname. + cat.c cat(1) replacement with no options - the way cat was intended. + csv.c Process a line of csv data and store it in an indexed array. diff --git a/debian/patches/deb-examples.dpatch b/debian/patches/deb-examples.dpatch deleted file mode 100755 index f951fa5..0000000 --- a/debian/patches/deb-examples.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document readline header location on Debian systems - ---- bash/examples/loadables/README~ 2006-12-04 10:21:13.000000000 +0000 -+++ bash/examples/loadables/README 2006-12-04 10:23:05.000000000 +0000 -@@ -32,6 +32,9 @@ - guide'. The file template.c provides a template to use for creating - new loadable builtins. - -+On Debian GNU/Linux systems, the bash headers are in /usr/include/bash. -+The appropriate options are already set in the example Makefile. -+ - 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. diff --git a/debian/patches/exec-redirections-doc.diff b/debian/patches/exec-redirections-doc.diff new file mode 100644 index 0000000..52cfc41 --- /dev/null +++ b/debian/patches/exec-redirections-doc.diff @@ -0,0 +1,25 @@ +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -4121,6 +4121,10 @@ A failure to open or create a file cause + Redirections using file descriptors greater than 9 should be used with + care, as they may conflict with file descriptors the shell uses + internally. ++.PP ++Note that the ++.B exec ++builtin command can make redirections take effect in the current shell. + .SS Redirecting Input + Redirection of input causes the file whose name results from + the expansion of +--- a/doc/bashref.texi ++++ b/doc/bashref.texi +@@ -3044,6 +3044,9 @@ Redirections using file descriptors grea + care, as they may conflict with file descriptors the shell uses + internally. + ++Note that the @code{exec} builtin command can make redirections take ++effect in the current shell. ++ + @subsection Redirecting Input + Redirection of input causes the file whose name results from + the expansion of @var{word} diff --git a/debian/patches/exec-redirections-man.dpatch b/debian/patches/exec-redirections-man.dpatch deleted file mode 100644 index 95b4d70..0000000 --- a/debian/patches/exec-redirections-man.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - ---- bash/doc/bash.1~ 2006-07-12 20:16:36.000000000 -0400 -+++ bash/doc/bash.1 2006-07-12 20:26:49.000000000 -0400 -@@ -3014,6 +3014,10 @@ - Redirections using file descriptors greater than 9 should be used with - care, as they may conflict with file descriptors the shell uses - internally. -+.PP -+Note that the -+.B exec -+builtin command can make redirections take effect in the current shell. - .SS Redirecting Input - .PP - Redirection of input causes the file whose name results from - diff --git a/debian/patches/exec-redirections-texi.dpatch b/debian/patches/exec-redirections-texi.dpatch deleted file mode 100644 index 97a9ea2..0000000 --- a/debian/patches/exec-redirections-texi.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - ---- bash/doc/bashref.texi~ 2005-10-03 15:07:21.000000000 -0400 -+++ bash/doc/bashref.texi 2006-07-12 21:26:57.000000000 -0400 -@@ -2030,6 +2030,9 @@ - care, as they may conflict with file descriptors the shell uses - internally. - -+Note that the @code{exec} builtin command can make redirections take -+effect in the current shell. -+ - @subsection Redirecting Input - Redirection of input causes the file whose name results from - the expansion of @var{word} diff --git a/debian/patches/fix-rl_do_undo-crash.diff b/debian/patches/fix-rl_do_undo-crash.diff new file mode 100644 index 0000000..0622dcb --- /dev/null +++ b/debian/patches/fix-rl_do_undo-crash.diff @@ -0,0 +1,125 @@ +https://git.savannah.gnu.org/cgit/bash.git/patch/?id=277c21d2b2c6730f6cbda428180b08bacdcecc80 + +From 277c21d2b2c6730f6cbda428180b08bacdcecc80 Mon Sep 17 00:00:00 2001 +From: Chet Ramey +Date: Mon, 6 Mar 2023 10:50:45 -0500 +Subject: readline fix for rl_undo_list pointer aliasing; arith command sets + word_top + +--- a/lib/readline/histlib.h ++++ b/lib/readline/histlib.h +@@ -1,6 +1,6 @@ + /* histlib.h -- internal definitions for the history library. */ + +-/* Copyright (C) 1989-2009,2021-2022 Free Software Foundation, Inc. ++/* Copyright (C) 1989-2009,2021-2023 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. +@@ -84,6 +84,7 @@ extern int _hs_history_patsearch (const + + /* history.c */ + extern void _hs_replace_history_data (int, histdata_t *, histdata_t *); ++extern int _hs_search_history_data (histdata_t *); + extern int _hs_at_end_of_history (void); + + /* histfile.c */ +--- a/lib/readline/history.c ++++ b/lib/readline/history.c +@@ -1,6 +1,6 @@ + /* history.c -- standalone history library */ + +-/* Copyright (C) 1989-2021 Free Software Foundation, Inc. ++/* Copyright (C) 1989-2023 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. +@@ -460,7 +460,7 @@ _hs_replace_history_data (int which, his + } + + last = -1; +- for (i = 0; i < history_length; i++) ++ for (i = history_length - 1; i >= 0; i--) + { + entry = the_history[i]; + if (entry == 0) +@@ -477,7 +477,27 @@ _hs_replace_history_data (int which, his + entry = the_history[last]; + entry->data = new; /* XXX - we don't check entry->old */ + } +-} ++} ++ ++int ++_hs_search_history_data (histdata_t *needle) ++{ ++ register int i; ++ HIST_ENTRY *entry; ++ ++ if (history_length == 0 || the_history == 0) ++ return -1; ++ ++ for (i = history_length - 1; i >= 0; i--) ++ { ++ entry = the_history[i]; ++ if (entry == 0) ++ continue; ++ if (entry->data == needle) ++ return i; ++ } ++ return -1; ++} + + /* Remove history element WHICH from the history. The removed + element is returned to you so you can free the line, data, +--- a/lib/readline/misc.c ++++ b/lib/readline/misc.c +@@ -339,6 +339,9 @@ rl_maybe_replace_line (void) + xfree (temp->line); + FREE (temp->timestamp); + xfree (temp); ++ /* XXX - what about _rl_saved_line_for_history? if the saved undo list ++ is rl_undo_list, and we just put that into a history entry, should ++ we set the saved undo list to NULL? */ + } + return 0; + } +@@ -386,14 +389,16 @@ _rl_free_saved_history_line (void) + + if (_rl_saved_line_for_history) + { +- if (rl_undo_list && rl_undo_list == (UNDO_LIST *)_rl_saved_line_for_history->data) +- rl_undo_list = 0; +- /* Have to free this separately because _rl_free_history entry can't: +- it doesn't know whether or not this has application data. Only the +- callers that know this is _rl_saved_line_for_history can know that +- it's an undo list. */ +- if (_rl_saved_line_for_history->data) +- _rl_free_undo_list ((UNDO_LIST *)_rl_saved_line_for_history->data); ++ UNDO_LIST *sentinel; ++ ++ sentinel = (UNDO_LIST *)_rl_saved_line_for_history->data; ++ ++ /* We should only free `data' if it's not the current rl_undo_list and ++ it's not the `data' member in a history entry somewhere. We have to ++ free it separately because only the callers know it's an undo list. */ ++ if (sentinel && sentinel != rl_undo_list && _hs_search_history_data ((histdata_t *)sentinel) < 0) ++ _rl_free_undo_list (sentinel); ++ + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + } +--- a/lib/readline/search.c ++++ b/lib/readline/search.c +@@ -88,8 +88,10 @@ make_history_line_current (HIST_ENTRY *e + + xlist = _rl_saved_line_for_history ? (UNDO_LIST *)_rl_saved_line_for_history->data : 0; + /* At this point, rl_undo_list points to a private search string list. */ +- if (rl_undo_list && rl_undo_list != (UNDO_LIST *)entry->data && rl_undo_list != xlist) ++ if (rl_undo_list && rl_undo_list != (UNDO_LIST *)entry->data && rl_undo_list != xlist && ++ _hs_search_history_data ((histdata_t *)rl_undo_list) < 0) + rl_free_undo_list (); ++ rl_undo_list = 0; /* XXX */ + + /* Now we create a new undo list with a single insert for this text. + WE DON'T CHANGE THE ORIGINAL HISTORY ENTRY UNDO LIST */ diff --git a/debian/patches/input-err.diff b/debian/patches/input-err.diff new file mode 100644 index 0000000..874d3e2 --- /dev/null +++ b/debian/patches/input-err.diff @@ -0,0 +1,15 @@ +# DP: Define PGRP_PIPE to avoid race condition. + +Index: b/input.c +=================================================================== +--- a/input.c ++++ b/input.c +@@ -517,7 +517,7 @@ b_fill_buffer (bp) + if (nr == 0) + bp->b_flag |= B_EOF; + else +- bp->b_flag |= B_ERROR; ++ fatal_error("error reading input file: %s", strerror(errno)); + return (EOF); + } + diff --git a/debian/patches/input-err.dpatch b/debian/patches/input-err.dpatch deleted file mode 100755 index 8fb93d7..0000000 --- a/debian/patches/input-err.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Define PGRP_PIPE to avoid race condition. - ---- input.c~ 2005-07-14 13:29:08.000000000 +0100 -+++ input.c 2006-04-05 14:51:50.000000000 +0100 -@@ -454,7 +454,7 @@ - if (nr == 0) - bp->b_flag |= B_EOF; - else -- bp->b_flag |= B_ERROR; -+ fatal_error("error reading input file: %s", strerror(errno)); - return (EOF); - } - diff --git a/debian/patches/man-arithmetic.diff b/debian/patches/man-arithmetic.diff new file mode 100644 index 0000000..efef19c --- /dev/null +++ b/debian/patches/man-arithmetic.diff @@ -0,0 +1,14 @@ +# DP: document deprecated syntax for arithmetic evaluation. + +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -3580,6 +3580,9 @@ and the substitution of the result. The + \fB$((\fP\fIexpression\fP\fB))\fP + .RE + .PP ++The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will ++be removed in upcoming versions of bash. ++.PP + The + .I expression + undergoes the same expansions diff --git a/debian/patches/man-arithmetic.dpatch b/debian/patches/man-arithmetic.dpatch deleted file mode 100755 index 1178ce8..0000000 --- a/debian/patches/man-arithmetic.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document deprecated syntax for arithmetic evaluation. - -diff -urb bash.orig/doc/bash.1 bash/doc/bash.1 ---- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200 -+++ bash/doc/bash.1 2003-09-28 00:24:17.000000000 +0200 -@@ -2533,6 +2533,9 @@ - \fB$((\fP\fIexpression\fP\fB))\fP - .RE - .PP -+The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will -+be removed in upcoming versions of bash. -+.PP - The - .I expression - is treated as if it were within double quotes, but a double quote diff --git a/debian/patches/man-bashlogout.diff b/debian/patches/man-bashlogout.diff new file mode 100644 index 0000000..73a4f6a --- /dev/null +++ b/debian/patches/man-bashlogout.diff @@ -0,0 +1,14 @@ +# DP: document /etc/bash.bashrc in bash man page + +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -11576,6 +11576,9 @@ The systemwide initialization file, exec + .FN /etc/bash.bashrc + The systemwide per-interactive-shell startup file + .TP ++.FN /etc/bash.bash.logout ++The systemwide login shell cleanup file, executed when a login shell exits ++.TP + .FN ~/.bash_profile + The personal initialization file, executed for login shells + .TP diff --git a/debian/patches/man-bashlogout.dpatch b/debian/patches/man-bashlogout.dpatch deleted file mode 100755 index 9a3f3c1..0000000 --- a/debian/patches/man-bashlogout.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document /etc/bash.bashrc in bash man page - ---- bash/doc/bash.1~ 2004-06-19 15:53:01.000000000 +0200 -+++ bash/doc/bash.1 2004-06-19 15:53:57.000000000 +0200 -@@ -8283,6 +8283,9 @@ - .FN /etc/bash.bashrc - The systemwide per-interactive-shell startup file - .TP -+.FN /etc/bash.logout -+The systemwide login shell cleanup file, executed when a login shell exits -+.TP - .FN ~/.bash_profile - The personal initialization file, executed for login shells - .TP diff --git a/debian/patches/man-bashrc.dpatch b/debian/patches/man-bashrc.diff old mode 100755 new mode 100644 similarity index 65% rename from debian/patches/man-bashrc.dpatch rename to debian/patches/man-bashrc.diff index 3e80ef1..300d3eb --- a/debian/patches/man-bashrc.dpatch +++ b/debian/patches/man-bashrc.diff @@ -1,25 +1,8 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - # DP: document /etc/bash.bashrc in bash man page ---- bash/doc/bash.1~ 2003-11-11 00:09:34.000000000 +0100 -+++ bash/doc/bash.1 2004-01-21 07:33:45.000000000 +0100 -@@ -169,7 +169,9 @@ +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -187,7 +187,9 @@ Display a usage message on standard outp .PD Execute commands from .I file @@ -30,7 +13,7 @@ exit 0 .I ~/.bashrc if the shell is interactive (see .SM -@@ -200,7 +202,9 @@ +@@ -218,7 +220,9 @@ reads these files when it is invoked as below). .TP .B \-\-norc @@ -41,7 +24,7 @@ exit 0 .I ~/.bashrc if the shell is interactive. This option is on by default if the shell is invoked as -@@ -308,13 +312,15 @@ +@@ -333,13 +337,15 @@ exists. .PP When an interactive shell that is not a login shell is started, .B bash @@ -59,17 +42,18 @@ exit 0 .PP When .B bash -@@ -399,7 +405,8 @@ +@@ -426,8 +432,8 @@ or the secure shell daemon \fIsshd\fP. If .B bash - determines it is being run by \fIrshd\fP, it reads and executes --commands from \fI~/.bashrc\fP, if that file exists and is readable. -+commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP, + determines it is being run non-interactively in this fashion, +-it reads and executes commands from \fI~/.bashrc\fP, +-if that file exists and is readable. ++it reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP, +if these files exist and are readable. It will not do this if invoked as \fBsh\fP. The .B \-\-norc -@@ -8273,6 +8280,9 @@ +@@ -11581,6 +11587,9 @@ The \fBbash\fP executable .FN /etc/profile The systemwide initialization file, executed for login shells .TP diff --git a/debian/patches/man-bold-comma.dpatch b/debian/patches/man-bold-comma.dpatch deleted file mode 100644 index ddbcafd..0000000 --- a/debian/patches/man-bold-comma.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: markup fix - ---- bash-3.1/doc/bash.1.orig 2007-05-30 09:53:07.000000000 +0200 -+++ bash-3.1/doc/bash.1 2007-05-30 09:53:13.000000000 +0200 -@@ -577,7 +577,7 @@ - have equal precedence, followed by - .B ; - and --.BR &, -+.BR & , - which have equal precedence. - .PP - A sequence of one or more newlines may appear in a \fIlist\fP instead diff --git a/debian/patches/man-builtin.dpatch b/debian/patches/man-builtin.dpatch deleted file mode 100644 index 6abaef8..0000000 --- a/debian/patches/man-builtin.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: fix man page include - ---- doc/builtins.1~ Mon Nov 29 22:30:13 1999 -+++ doc/builtins.1 Tue Aug 1 21:54:06 2000 -@@ -10,6 +10,6 @@ - ulimit, umask, unalias, unset, until, wait, while \- bash built-in commands, see \fBbash\fR(1) - .SH BASH BUILTIN COMMANDS - .nr zZ 1 --.so bash.1 -+.so /usr/share/man/man1/bash.1 - .SH SEE ALSO - bash(1), sh(1) diff --git a/debian/patches/man-fignore.diff b/debian/patches/man-fignore.diff new file mode 100644 index 0000000..1c52365 --- /dev/null +++ b/debian/patches/man-fignore.diff @@ -0,0 +1,15 @@ +# DP: bash(1): mention quoting when assigning to FIGNORE + +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -2220,7 +2220,9 @@ A filename whose suffix matches one of t + is excluded from the list of matched filenames. + A sample value is + .if t \f(CW".o:~"\fP. +-.if n ".o:~". ++.if n ".o:~" ++(Quoting is needed when assigning a value to this variable, ++which contains tildes). + .TP + .B FUNCNEST + If set to a numeric value greater than 0, defines a maximum function diff --git a/debian/patches/man-fignore.dpatch b/debian/patches/man-fignore.dpatch deleted file mode 100755 index cd005bc..0000000 --- a/debian/patches/man-fignore.dpatch +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash(1): mention quoting when assigning to FIGNORE - -diff -urb bash.orig/doc/bash.1 bash/doc/bash.1 ---- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200 -+++ bash/doc/bash.1 2003-09-28 00:25:21.000000000 +0200 -@@ -1584,7 +1584,9 @@ - is excluded from the list of matched filenames. - A sample value is - .if t \f(CW".o:~"\fP. --.if n ".o:~". -+.if n ".o:~" -+(Quoting is needed when assigning a value to this variable, -+which contains tildes). - .TP - .B GLOBIGNORE - A colon-separated list of patterns defining the set of filenames to diff --git a/debian/patches/man-macro-warnings.diff b/debian/patches/man-macro-warnings.diff new file mode 100644 index 0000000..60497ce --- /dev/null +++ b/debian/patches/man-macro-warnings.diff @@ -0,0 +1,53 @@ +# DP: Move definition of the macro "FN" out of the region of the "ig" +# DP: macro. Define macros and registers "zZ" and "zY". + +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -8,6 +8,22 @@ + .\" Last Change: Mon Sep 19 11:13:21 EDT 2022 + .\" + .\" bash_builtins, strip all but Built-Ins section ++.de zZ ++.. ++.de zY ++.. ++.\" ++.\" 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 ++.. ++.\" Number register zZ is defined in bash-builtins(7) ++.\" Number register zY is defined in rbash(1) ++.\" This man-page is included in them ++.if !rzZ .nr zZ 0 \" avoid a warning about an undefined register ++.if !rzY .nr zY 0 \" avoid a warning about an undefined register + .if \n(zZ=1 .ig zZ + .if \n(zY=1 .ig zY + .TH BASH 1 "2022 September 19" "GNU Bash 5.2" +@@ -36,13 +52,6 @@ + .\" .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 +@@ -2530,8 +2539,8 @@ and is set by the administrator who inst + .BR bash . + A common value is + .na +-.if t \f(CW/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin\fP. +-.if n ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''. ++.if t \f(CW/usr/local/bin:\:/usr/local/sbin:\:/usr/bin:\:/usr/sbin:\:/bin:\:/sbin\fP. ++.if n ``/usr/local/bin:\:/usr/local/sbin:\:/usr/bin:\:/usr/sbin:\:/bin:\:/sbin''. + .ad + .TP + .B POSIXLY_CORRECT diff --git a/debian/patches/man-net-redirections-doc.dpatch b/debian/patches/man-net-redirections-doc.dpatch deleted file mode 100644 index 3cc49de..0000000 --- a/debian/patches/man-net-redirections-doc.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Document, that bash is configured using --disable-net-redirections. - ---- bash/doc/bashref.texi~ 2005-09-09 22:08:10.865192816 +0200 -+++ bash/doc/bashref.texi 2005-09-10 11:42:51.805867224 +0200 -@@ -2025,6 +2025,9 @@ - is an integer port number or service name, Bash attempts to open a UDP - connection to the corresponding socket. - -+NOTE: @code{Bash}, as packaged for Debian, does not support using the -+@file{/dev/tcp} and @file{/dev/udp} files. -+ - @end table - - A failure to open or create a file causes the redirection to fail. diff --git a/debian/patches/man-net-redirections.dpatch b/debian/patches/man-net-redirections.dpatch deleted file mode 100755 index 1bee4b1..0000000 --- a/debian/patches/man-net-redirections.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Document, that bash is configured using --disable-net-redirections. - ---- bash/doc/bash.1~ 2005-09-09 22:08:10.833197680 +0200 -+++ bash/doc/bash.1 2005-09-10 11:47:57.694365104 +0200 -@@ -3033,6 +3033,9 @@ - .PD - .RE - .PP -+\fBNOTE:\fP Bash, as packaged for Debian, does \fBnot\fP support using -+the \fB/dev/tcp\fP and \fB/dev/udp\fP files. -+.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 diff --git a/debian/patches/man-nocaseglob.diff b/debian/patches/man-nocaseglob.diff new file mode 100644 index 0000000..92c4c84 --- /dev/null +++ b/debian/patches/man-nocaseglob.diff @@ -0,0 +1,15 @@ +# DP: Clarify documentation about case-insensitive pathname expansion + +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -3754,6 +3754,10 @@ If the shell option + .B nocaseglob + is enabled, the match is performed without regard to the case + of alphabetic characters. ++Note that when using range expressions like ++[a-z] (see below), letters of the other case may be included, ++depending on the setting of ++.B LC_COLLATE. + When a pattern is used for pathname expansion, + the character + .B ``.'' diff --git a/debian/patches/man-nocaseglob.dpatch b/debian/patches/man-nocaseglob.dpatch deleted file mode 100755 index 6176a53..0000000 --- a/debian/patches/man-nocaseglob.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Clarify documentation about case-insensitive pathname expansion - ---- bash/doc/bash.1~ 2004-08-28 18:25:23.000000000 +0200 -+++ bash/doc/bash.1 2004-08-28 19:13:24.000000000 +0200 -@@ -2690,6 +2690,10 @@ - .B nocaseglob - is enabled, the match is performed without regard to the case - of alphabetic characters. -+Note that when using range expressions like -+[a-z] (see below), letters of the other case may be included, -+depending on the setting of -+.B LC_COLLATE. - When a pattern is used for pathname expansion, - the character - .B ``.'' diff --git a/debian/patches/man-substring-exp-doc.dpatch b/debian/patches/man-substring-exp-doc.dpatch deleted file mode 100644 index c6cdf58..0000000 --- a/debian/patches/man-substring-exp-doc.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Clarify documentation about substring expansion - ---- bash/doc/bashref.texi~ 2004-08-28 15:10:17.000000000 +0200 -+++ bash/doc/bashref.texi 2004-08-28 18:27:16.000000000 +0200 -@@ -1575,6 +1575,9 @@ - @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}. -+Arithmetic expressions starting with a - must be separated by whitespace -+from the preceding : to be -+distinguished from the $@{@var{parameter}:@minus{}@var{word}@} expansion. - If @var{parameter} is @samp{@@}, the result is @var{length} positional - parameters beginning at @var{offset}. - If @var{parameter} is an array name indexed by @samp{@@} or @samp{*}, diff --git a/debian/patches/man-substring-exp.dpatch b/debian/patches/man-substring-exp.dpatch deleted file mode 100755 index 8cfaece..0000000 --- a/debian/patches/man-substring-exp.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Clarify documentation about substring expansion - ---- bash/doc/bash.1~ 2004-08-28 15:10:17.000000000 +0200 -+++ bash/doc/bash.1 2004-08-28 18:25:23.000000000 +0200 -@@ -2356,6 +2356,9 @@ - \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. -+Arithmetic expressions starting with a - must be separated by whitespace -+from the preceding : to be -+distinguished from the \fBUse Default Values\fP expansion. - If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional - parameters beginning at \fIoffset\fP. - If \fIparameter\fP is an array name indexed by @ or *, diff --git a/debian/patches/man-test.diff b/debian/patches/man-test.diff new file mode 100644 index 0000000..ca7a5a1 --- /dev/null +++ b/debian/patches/man-test.diff @@ -0,0 +1,17 @@ +# DP: document conditional file expressions acting on the target of +# DP: symbolic links as well (except -h, -L). + +Index: b/builtins/test.def +=================================================================== +--- a/builtins/test.def ++++ b/builtins/test.def +@@ -64,6 +64,9 @@ File operators: + + FILE1 -ef FILE2 True if file1 is a hard link to file2. + ++All file operators except -h and -L are acting on the target of a symbolic ++link, not on the symlink itself, if FILE is a symbolic link. ++ + String operators: + + -z STRING True if string is empty. diff --git a/debian/patches/man-test.dpatch b/debian/patches/man-test.dpatch deleted file mode 100755 index 9382b35..0000000 --- a/debian/patches/man-test.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document conditional file expressions acting on the target of -# DP: symbolic links as well (except -h, -L). - ---- builtins/test.def~ 2002-04-04 21:48:17.000000000 +0200 -+++ builtins/test.def 2004-10-16 19:51:24.000000000 +0200 -@@ -60,6 +60,9 @@ - - FILE1 -ef FILE2 True if file1 is a hard link to file2. - -+All file operators except -h and -L are acting on the target of a symbolic -+link, not on the symlink itself, if FILE is a symbolic link. -+ - String operators: - - -z STRING True if string is empty. diff --git a/debian/patches/man-test2-doc.dpatch b/debian/patches/man-test2-doc.dpatch deleted file mode 100644 index 6ddb253..0000000 --- a/debian/patches/man-test2-doc.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Doucment handling of paramters of the test builtin. - ---- doc/bashref.texi~ 2005-09-09 19:51:31.150172600 +0000 -+++ doc/bashref.texi 2005-09-09 19:52:12.693857000 +0000 -@@ -5264,6 +5264,10 @@ - Unless otherwise specified, primaries that operate on files follow symbolic - links and operate on the target of the link, rather than the link itself. - -+See the description of the @code{test} builtin command (section -+@pxref{Bash Builtins} below) for the handling of parameters -+(i.e. missing parameters). -+ - @table @code - @item -a @var{file} - True if @var{file} exists. diff --git a/debian/patches/man-test2.diff b/debian/patches/man-test2.diff new file mode 100644 index 0000000..6271a25 --- /dev/null +++ b/debian/patches/man-test2.diff @@ -0,0 +1,40 @@ +# DP: Document handling of parameters of the test builtin. + +--- a/builtins/test.def ++++ b/builtins/test.def +@@ -100,6 +100,9 @@ Arithmetic binary operators return true + less-than, less-than-or-equal, greater-than, or greater-than-or-equal + than ARG2. + ++See the bash manual page bash(1) for the handling of parameters (i.e. ++missing parameters). ++ + Exit Status: + Returns success if EXPR evaluates to true; fails if EXPR evaluates to + false or an invalid argument is given. +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -732,6 +732,10 @@ as primaries. + .if n .sp 1 + When used with \fB[[\fP, the \fB<\fP and \fB>\fP operators sort + lexicographically using the current locale. ++.PP ++See the description of the \fItest\fP builtin command (section SHELL ++BUILTIN COMMANDS below) for the handling of parameters (i.e. ++missing parameters). + .if t .sp 0.5 + .if n .sp 1 + When the \fB==\fP and \fB!=\fP operators are used, the string to the +--- a/doc/bashref.texi ++++ b/doc/bashref.texi +@@ -7322,6 +7322,10 @@ The @code{test} command uses ASCII order + Unless otherwise specified, primaries that operate on files follow symbolic + links and operate on the target of the link, rather than the link itself. + ++See the description of the @code{test} builtin command (section ++@pxref{Bash Builtins} below) for the handling of parameters ++(i.e. missing parameters). ++ + @table @code + @item -a @var{file} + True if @var{file} exists. diff --git a/debian/patches/man-test2.dpatch b/debian/patches/man-test2.dpatch deleted file mode 100755 index 32a9115..0000000 --- a/debian/patches/man-test2.dpatch +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Doucment handling of paramters of the test builtin. - ---- builtins/test.def~ 2004-10-17 17:04:56.000000000 +0200 -+++ builtins/test.def 2004-10-17 17:19:38.000000000 +0200 -@@ -92,6 +92,9 @@ - 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. -+ -+See the bash manual page bash(1) for the handling of parameters (i.e. -+missing parameters). - $END - - $BUILTIN [ ---- doc/bash.1~ 2005-09-09 19:43:43.298296896 +0000 -+++ doc/bash.1 2005-09-09 19:46:26.359507824 +0000 -@@ -3551,6 +3551,10 @@ - .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. -+.PP -+See the description of the \fItest\fP builtin command (section SHELL -+BUILTIN COMMANDS below) for the handling of parameters (i.e. -+missing parameters). - .sp 1 - .PD 0 - .TP diff --git a/debian/patches/man-vx-opts.diff b/debian/patches/man-vx-opts.diff new file mode 100644 index 0000000..9354fe6 --- /dev/null +++ b/debian/patches/man-vx-opts.diff @@ -0,0 +1,19 @@ +# DP: document -v / -x options + +Index: b/doc/bash.1 +=================================================================== +--- a/doc/bash.1 ++++ b/doc/bash.1 +@@ -131,6 +131,12 @@ This option allows the positional parame + when invoking an interactive shell or when reading input + through a pipe. + .TP ++.B \-v ++Print shell input lines as they are read. ++.TP ++.B \-x ++Print commands and their arguments as they are executed. ++.TP + .B \-D + A list of all double-quoted strings preceded by \fB$\fP + is printed on the standard output. diff --git a/debian/patches/man-vx-opts.dpatch b/debian/patches/man-vx-opts.dpatch deleted file mode 100644 index e85b350..0000000 --- a/debian/patches/man-vx-opts.dpatch +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document -v / -x options - ---- ./doc/bash.1~ Wed Jan 20 22:48:04 1999 -+++ ./doc/bash.1 Sun Nov 14 13:26:59 1999 -@@ -104,6 +104,12 @@ - This option allows the positional parameters to be set - when invoking an interactive shell. - .TP -+.B \-v -+Print shell input lines as they are read. -+.TP -+.B \-x -+Print commands and their arguments as they are executed. -+.TP - .B \-D - A list of all double-quoted strings preceded by \fB$\fP - is printed on the standard ouput. diff --git a/debian/patches/no-brk-caching.diff b/debian/patches/no-brk-caching.diff new file mode 100644 index 0000000..dc4ba85 --- /dev/null +++ b/debian/patches/no-brk-caching.diff @@ -0,0 +1,47 @@ +# DP: Don't cache the value of brk between sbrk calls. + +--- a/lib/malloc/malloc.c ++++ b/lib/malloc/malloc.c +@@ -227,8 +227,6 @@ + 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, +@@ -538,7 +536,6 @@ + siz = binsize (nu); + /* Should check for errors here, I guess. */ + sbrk (-siz); +- memtop -= siz; + + #ifdef MALLOC_STATS + _mstats.nsbrk++; +@@ -633,8 +630,6 @@ + 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) + { +@@ -684,7 +679,7 @@ + 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); ++ curbrk = sbrk (0); + sbrk_needed = pagesz - ((long)curbrk & (pagesz - 1)); /* sbrk(0) % pagesz */ + if (sbrk_needed < 0) + sbrk_needed += pagesz; +@@ -699,7 +694,6 @@ + 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 diff --git a/debian/patches/patches/bash-aliases-repeat.dpatch b/debian/patches/patches/bash-aliases-repeat.dpatch deleted file mode 100644 index ae1ac9b..0000000 --- a/debian/patches/patches/bash-aliases-repeat.dpatch +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Fix bug in Bash_aliases example. - ---- examples/startup-files/Bash_aliases~ 2008-04-19 21:57:24.000000000 +0200 -+++ examples/startup-files/Bash_aliases 2008-04-19 21:59:43.000000000 +0200 -@@ -41,20 +41,20 @@ - { - local count="$1" i; - shift; -- for i in $(seq 1 "$count"); -+ for i in $(_seq 1 "$count"); - do - eval "$@"; - done - } - - # Subfunction needed by `repeat'. --seq () -+_seq () - { - local lower upper output; - lower=$1 upper=$2; - - if [ $lower -ge $upper ]; then return; fi -- while [ $lower -le $upper ]; -+ while [ $lower -lt $upper ]; - do - echo -n "$lower " - lower=$(($lower + 1)) diff --git a/debian/patches/patches/bash-minimal.dpatch b/debian/patches/patches/bash-minimal.dpatch deleted file mode 100644 index c6b0039..0000000 --- a/debian/patches/patches/bash-minimal.dpatch +++ /dev/null @@ -1,62 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Build fixes for minimal bash - ---- bash/parse.y~ 2009-11-02 23:34:15.000000000 +0100 -+++ bash/parse.y 2009-12-30 17:08:12.341085169 +0100 -@@ -2772,12 +2772,14 @@ - 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) - { - /*itrace("reset_parser: parser_state includes PST_EXTPAT");*/ - extended_glob = global_extglob; - } -+#endif - - parser_state = 0; - ---- bash/execute_cmd.c~ 2009-11-29 03:29:34.000000000 +0100 -+++ bash/execute_cmd.c 2009-12-30 17:13:36.041085541 +0100 -@@ -4196,7 +4196,9 @@ - if (variable_context == 0 || this_shell_function == 0) - { - make_funcname_visible (0); -+#if defined (PROCESS_SUBSTITUTION) - unlink_fifo_list (); -+#endif - } - - return (result); ---- bash/lib/glob/glob.c~ 2009-11-15 00:39:30.000000000 +0100 -+++ bash/lib/glob/glob.c 2009-12-30 17:34:56.802336552 +0100 -@@ -640,7 +640,11 @@ - continue; - } - -+#ifdef MACOS - convfn = fnx_fromfs (dp->d_name, D_NAMLEN (dp)); -+#else -+ convfn = dp->d_name; -+#endif - if (strmatch (pat, convfn, mflags) != FNM_NOMATCH) - { - if (nalloca < ALLOCA_MAX) diff --git a/debian/patches/patches/bash-subst-param-length.dpatch b/debian/patches/patches/bash-subst-param-length.dpatch deleted file mode 100644 index 836a18c..0000000 --- a/debian/patches/patches/bash-subst-param-length.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -DP: ignore array subscript while determining variable name for length -DP: substitution -DP: (#345861) - ---- ../bash-3.1/subst.c 2006-01-14 01:12:02.000000000 +0100 -+++ subst.c 2006-01-14 01:12:39.000000000 +0100 -@@ -5814,7 +5814,7 @@ - { - t_index++; - free (name); -- temp1 = string_extract (string, &t_index, "#%:-=?+/}", 0); -+ temp1 = string_extract (string, &t_index, "#%:-=?+/}", SX_VARNAME); - name = (char *)xmalloc (3 + (strlen (temp1))); - *name = string[sindex]; - if (string[sindex] == '!') diff --git a/debian/patches/patches/bash41-001.dpatch b/debian/patches/patches/bash41-001.dpatch deleted file mode 100644 index a6d2d07..0000000 --- a/debian/patches/patches/bash41-001.dpatch +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-4.1 upstream patch 001 - - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-001 - -Bug-Reported-by: Yann Rouillard -Bug-Reference-ID: <4B44A410.4070107@pleiades.fr.eu.org> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00018.html - -Bug-Description: - -A prototype for vsnprintf was incorrect, and caused compilation failures -on systems that did not have a suitable vsnprintf, but had a declaration in -one of the system header files. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/builtins/printf.def 2009-11-20 15:31:23.000000000 -0500 ---- ./builtins/printf.def 2010-01-07 08:50:06.000000000 -0500 -*************** -*** 173,177 **** - - #if !HAVE_VSNPRINTF -! extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4))); - #endif - ---- 173,177 ---- - - #if !HAVE_VSNPRINTF -! extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0))); - #endif - -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 0 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-002.dpatch b/debian/patches/patches/bash41-002.dpatch deleted file mode 100644 index 4b0eca2..0000000 --- a/debian/patches/patches/bash41-002.dpatch +++ /dev/null @@ -1,83 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-002 - -Bug-Reported-by: guillaume.outters@free.fr -Bug-Reference-ID: <20100105230441.70D171AA7F52@asterix.local> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00017.html - -Bug-Description: - -Bash-4.1/Readline-6.1 introduced a hook function that allows applications -to rewrite or modify filenames read from the file system before comparing -them with a word to be completed. The converted filename, if it matches, -needs to be inserted into the line buffer, replacing the original contents. - -This fixes a completion bug on Mac OS X involving filenames containing -UTF-8 characters. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/lib/readline/complete.c 2009-11-29 18:39:30.000000000 -0500 ---- ./lib/readline/complete.c 2010-01-06 08:30:23.000000000 -0500 -*************** -*** 2139,2143 **** - if (filename_len == 0) - { -! if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name)) - continue; - ---- 2139,2143 ---- - if (filename_len == 0) - { -! if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn)) - continue; - -*************** -*** 2220,2224 **** - } - -! strcpy (temp + dirlen, entry->d_name); - } - else ---- 2220,2224 ---- - } - -! strcpy (temp + dirlen, convfn); - } - else -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-003.dpatch b/debian/patches/patches/bash41-003.dpatch deleted file mode 100644 index c916ba1..0000000 --- a/debian/patches/patches/bash41-003.dpatch +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-4.1 upstream patch 003 - - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-003 - -Bug-Reported-by: coyote@wariat.org.pl -Bug-Reference-ID: <4b64a1f8.06e2660a.60af.4bfb@mx.google.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00135.html - -Bug-Description: - -If command completion is attempted on a word with a quoted globbing -character (e.g., `*' or `?'), bash can reference a NULL pointer and -dump core. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/bashline.c 2009-10-24 14:10:19.000000000 -0400 ---- ./bashline.c 2010-01-30 21:53:49.000000000 -0500 -*************** -*** 1681,1685 **** - characters in the common prefix are bad) will ever be returned on - regular completion. */ -! if (glob_pattern_p (hint)) - { - if (state == 0) ---- 1681,1685 ---- - characters in the common prefix are bad) will ever be returned on - regular completion. */ -! if (globpat) - { - if (state == 0) -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-004.dpatch b/debian/patches/patches/bash41-004.dpatch deleted file mode 100644 index 51e9154..0000000 --- a/debian/patches/patches/bash41-004.dpatch +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-4.1 upstream patch 004 - - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-004 - -Bug-Reported-by: Crestez Dan Leonard -Bug-Reference-ID: <1265592839.30682.21.camel@deskbox> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00034.html - -Bug-Description: - -When running in Posix mode and executing a shell function without local -variables, bash will not propagate a variable in a special builtin's temporary -environment to have global scope. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/variables.c 2009-11-03 14:13:58.000000000 -0500 ---- ./variables.c 2010-02-08 17:36:18.000000000 -0500 -*************** -*** 3809,3812 **** ---- 3809,3817 ---- - 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); -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 4 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bash41-005.dpatch b/debian/patches/patches/bash41-005.dpatch deleted file mode 100644 index ff40c34..0000000 --- a/debian/patches/patches/bash41-005.dpatch +++ /dev/null @@ -1,75 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash-4.1 upstream patch 005 - - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-005 - -Bug-Reported-by: werner@suse.de -Bug-Reference-ID: <201002251238.o1PCcYcg016893@boole.suse.de> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00132.html - -Bug-Description: - -When the `read' builtin times out after the timeout specified with -t is -exceeded, it does not reset the flags that tell signal handlers to process -signals immediately instead of deferring their handling. This can result -in unsafe functions being called from signal handlers, which can cause bash -to hang or dump core. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/builtins/read.def 2009-10-08 11:35:46.000000000 -0400 ---- ./builtins/read.def 2010-03-17 17:35:39.000000000 -0400 -*************** -*** 616,621 **** - zsyncfd (fd); - -- interrupt_immediately--; -- terminate_immediately--; - discard_unwind_frame ("read_builtin"); - ---- 616,619 ---- -*************** -*** 624,627 **** ---- 622,628 ---- - 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, -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 4 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 5 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/debian/patches/patches/bashbug-editor.dpatch b/debian/patches/patches/bashbug-editor.dpatch deleted file mode 100644 index cb52ebd..0000000 --- a/debian/patches/patches/bashbug-editor.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: send bug reports to Debian bash maintainer too. - -diff -urb bash.orig/support/bashbug.sh bash/support/bashbug.sh ---- bash.orig/support/bashbug.sh 2002-04-16 23:15:15.000000000 +0200 -+++ bash/support/bashbug.sh 2003-09-27 23:35:04.000000000 +0200 -@@ -134,6 +134,7 @@ - esac ;; - esac - -+BUGBASH="${BUGBASH},bash@packages.debian.org" - BUGADDR="${1-$BUGBASH}" - - if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then -Only in bash/support: bashbug.sh.orig diff --git a/debian/patches/patches/bashdb-updates.dpatch b/debian/patches/patches/bashdb-updates.dpatch deleted file mode 100644 index 13a6b24..0000000 --- a/debian/patches/patches/bashdb-updates.dpatch +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh -e - -dir=. -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" - dir=$3 -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) - patch $pdir -f --no-backup-if-mismatch -p1 < $0 - cd $dir && autoconf - ;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Debian updates to bashdb - diff --git a/debian/patches/patches/bashdb.dpatch b/debian/patches/patches/bashdb.dpatch deleted file mode 100644 index 7a330d1..0000000 --- a/debian/patches/patches/bashdb.dpatch +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh -e - -dir=. -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" - dir=$3 -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) - patch $pdir -f --no-backup-if-mismatch -p1 < $0 - rm -f $dir/aclocal.m4 - rm -f $dir/configure - rm -f $dir/doc/bashref.info - rm -f $dir/examples/bashdb/bashdb.el - rm -f $dir/lib/readline/doc/Makefile - rm -f $dir/parser-built - rm -f $dir/pathnames.h - rm -f $dir/y.tab.[ch] - (cd $dir && aclocal -I . -I debugger) - (cd $dir && autoconf) - for i in config.guess config.sub elisp-comp install-sh \ - missing mkinstalldirs - do - cp -p /usr/share/automake-1.7/$i $dir/debugger/ - done - for i in mdate-sh texinfo.tex; do - cp -p /usr/share/automake-1.7/$i $dir/debugger/doc/ - done - (cd $dir/debugger && aclocal -I ..) - cp -p $dir/debugger/elisp-comp $dir/debugger/emacs/. - (cd $dir/debugger && automake) - (cd $dir/debugger && autoconf) - ;; - -unpatch) - patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 - ;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# how to construct this file: -# - unpack the upstream bash source -# - unpack the bashdb source -# - apply bash the seven bash upstream patches -# - diff -ur --unidirectional-new-file \ - --exclude CVS --exclude=.cvsignore --exclude=/db/ \ -# bash-2.05b bashdb - -# DP: bashdb changes - -diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/ChangeLog cvs/ChangeLog diff --git a/debian/patches/patches/builtins-declare-fix.dpatch b/debian/patches/patches/builtins-declare-fix.dpatch deleted file mode 100644 index 87edfc2..0000000 --- a/debian/patches/patches/builtins-declare-fix.dpatch +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: -Andreas Schwab writes: - -> $ declare -A a=b; unset a -> *** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 *** - -And the obvious patch: - ---- bash-4.1/builtins/declare.def.~1~ 2009-11-26 01:42:00.000000000 +0100 -+++ bash-4.1/builtins/declare.def 2010-04-09 19:20:51.000000000 +0200 -@@ -512,7 +512,7 @@ declare_internal (list, local_var) - { - /* let bind_{array,assoc}_variable take care of this. */ - if (assoc_p (var)) -- bind_assoc_variable (var, name, "0", value, aflags); -+ bind_assoc_variable (var, name, savestring ("0"), value, aflags); - else - bind_array_variable (name, 0, value, aflags); - } - diff --git a/debian/patches/patches/deb-examples.dpatch b/debian/patches/patches/deb-examples.dpatch deleted file mode 100644 index f951fa5..0000000 --- a/debian/patches/patches/deb-examples.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document readline header location on Debian systems - ---- bash/examples/loadables/README~ 2006-12-04 10:21:13.000000000 +0000 -+++ bash/examples/loadables/README 2006-12-04 10:23:05.000000000 +0000 -@@ -32,6 +32,9 @@ - guide'. The file template.c provides a template to use for creating - new loadable builtins. - -+On Debian GNU/Linux systems, the bash headers are in /usr/include/bash. -+The appropriate options are already set in the example Makefile. -+ - 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. diff --git a/debian/patches/patches/exec-redirections-man.dpatch b/debian/patches/patches/exec-redirections-man.dpatch deleted file mode 100644 index 95b4d70..0000000 --- a/debian/patches/patches/exec-redirections-man.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - ---- bash/doc/bash.1~ 2006-07-12 20:16:36.000000000 -0400 -+++ bash/doc/bash.1 2006-07-12 20:26:49.000000000 -0400 -@@ -3014,6 +3014,10 @@ - Redirections using file descriptors greater than 9 should be used with - care, as they may conflict with file descriptors the shell uses - internally. -+.PP -+Note that the -+.B exec -+builtin command can make redirections take effect in the current shell. - .SS Redirecting Input - .PP - Redirection of input causes the file whose name results from - diff --git a/debian/patches/patches/exec-redirections-texi.dpatch b/debian/patches/patches/exec-redirections-texi.dpatch deleted file mode 100644 index 97a9ea2..0000000 --- a/debian/patches/patches/exec-redirections-texi.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - ---- bash/doc/bashref.texi~ 2005-10-03 15:07:21.000000000 -0400 -+++ bash/doc/bashref.texi 2006-07-12 21:26:57.000000000 -0400 -@@ -2030,6 +2030,9 @@ - care, as they may conflict with file descriptors the shell uses - internally. - -+Note that the @code{exec} builtin command can make redirections take -+effect in the current shell. -+ - @subsection Redirecting Input - Redirection of input causes the file whose name results from - the expansion of @var{word} diff --git a/debian/patches/patches/input-err.dpatch b/debian/patches/patches/input-err.dpatch deleted file mode 100644 index 8fb93d7..0000000 --- a/debian/patches/patches/input-err.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Define PGRP_PIPE to avoid race condition. - ---- input.c~ 2005-07-14 13:29:08.000000000 +0100 -+++ input.c 2006-04-05 14:51:50.000000000 +0100 -@@ -454,7 +454,7 @@ - if (nr == 0) - bp->b_flag |= B_EOF; - else -- bp->b_flag |= B_ERROR; -+ fatal_error("error reading input file: %s", strerror(errno)); - return (EOF); - } - diff --git a/debian/patches/patches/man-arithmetic.dpatch b/debian/patches/patches/man-arithmetic.dpatch deleted file mode 100644 index 1178ce8..0000000 --- a/debian/patches/patches/man-arithmetic.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document deprecated syntax for arithmetic evaluation. - -diff -urb bash.orig/doc/bash.1 bash/doc/bash.1 ---- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200 -+++ bash/doc/bash.1 2003-09-28 00:24:17.000000000 +0200 -@@ -2533,6 +2533,9 @@ - \fB$((\fP\fIexpression\fP\fB))\fP - .RE - .PP -+The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will -+be removed in upcoming versions of bash. -+.PP - The - .I expression - is treated as if it were within double quotes, but a double quote diff --git a/debian/patches/patches/man-bashlogout.dpatch b/debian/patches/patches/man-bashlogout.dpatch deleted file mode 100644 index 75871e5..0000000 --- a/debian/patches/patches/man-bashlogout.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document /etc/bash.bashrc in bash man page - ---- bash/doc/bash.1~ 2004-06-19 15:53:01.000000000 +0200 -+++ bash/doc/bash.1 2004-06-19 15:53:57.000000000 +0200 -@@ -8283,6 +8283,9 @@ - .FN /etc/bash.bashrc - The systemwide per-interactive-shell startup file - .TP -+.FN /etc/bash.bash.logout -+The systemwide login shell cleanup file, executed when a login shell exits -+.TP - .FN ~/.bash_profile - The personal initialization file, executed for login shells - .TP diff --git a/debian/patches/patches/man-bashrc.dpatch b/debian/patches/patches/man-bashrc.dpatch deleted file mode 100644 index f303854..0000000 --- a/debian/patches/patches/man-bashrc.dpatch +++ /dev/null @@ -1,81 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document /etc/bash.bashrc in bash man page - ---- bash/doc/bash.1.orig 2008-11-29 17:37:14.000000000 +0000 -+++ bash/doc/bash.1 2008-11-29 17:40:07.000000000 +0000 -@@ -184,7 +184,9 @@ - .PD - Execute commands from - .I file --instead of the standard personal initialization file -+instead of the system wide initialization file -+.I /etc/bash.bashrc -+and the standard personal initialization file - .I ~/.bashrc - if the shell is interactive (see - .SM -@@ -215,7 +217,9 @@ - below). - .TP - .B \-\-norc --Do not read and execute the personal initialization file -+Do not read and execute the system wide initialization file -+.I /etc/bash.bashrc -+and the personal initialization file - .I ~/.bashrc - if the shell is interactive. - This option is on by default if the shell is invoked as -@@ -323,13 +327,15 @@ - .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. -+reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP, -+if these files exist. - 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. -+to read and execute commands from \fIfile\fP instead of -+\fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP. - .PP - When - .B bash -@@ -415,7 +421,8 @@ - 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. -+commands from \fI~/.bashrc\fP and \fI~/.bashrc\fP, if these files -+exist and are readable. - It will not do this if invoked as \fBsh\fP. - The - .B \-\-norc -@@ -9293,6 +9300,9 @@ - .FN /etc/profile - The systemwide initialization file, executed for login shells - .TP -+.FN /etc/bash.bashrc -+The systemwide per-interactive-shell startup file -+.TP - .FN ~/.bash_profile - The personal initialization file, executed for login shells - .TP diff --git a/debian/patches/patches/man-builtin.dpatch b/debian/patches/patches/man-builtin.dpatch deleted file mode 100644 index 6abaef8..0000000 --- a/debian/patches/patches/man-builtin.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: fix man page include - ---- doc/builtins.1~ Mon Nov 29 22:30:13 1999 -+++ doc/builtins.1 Tue Aug 1 21:54:06 2000 -@@ -10,6 +10,6 @@ - ulimit, umask, unalias, unset, until, wait, while \- bash built-in commands, see \fBbash\fR(1) - .SH BASH BUILTIN COMMANDS - .nr zZ 1 --.so bash.1 -+.so /usr/share/man/man1/bash.1 - .SH SEE ALSO - bash(1), sh(1) diff --git a/debian/patches/patches/man-fignore.dpatch b/debian/patches/patches/man-fignore.dpatch deleted file mode 100644 index cd005bc..0000000 --- a/debian/patches/patches/man-fignore.dpatch +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: bash(1): mention quoting when assigning to FIGNORE - -diff -urb bash.orig/doc/bash.1 bash/doc/bash.1 ---- bash.orig/doc/bash.1 2003-09-25 21:42:45.000000000 +0200 -+++ bash/doc/bash.1 2003-09-28 00:25:21.000000000 +0200 -@@ -1584,7 +1584,9 @@ - is excluded from the list of matched filenames. - A sample value is - .if t \f(CW".o:~"\fP. --.if n ".o:~". -+.if n ".o:~" -+(Quoting is needed when assigning a value to this variable, -+which contains tildes). - .TP - .B GLOBIGNORE - A colon-separated list of patterns defining the set of filenames to diff --git a/debian/patches/patches/man-net-redirections-doc.dpatch b/debian/patches/patches/man-net-redirections-doc.dpatch deleted file mode 100644 index 3cc49de..0000000 --- a/debian/patches/patches/man-net-redirections-doc.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Document, that bash is configured using --disable-net-redirections. - ---- bash/doc/bashref.texi~ 2005-09-09 22:08:10.865192816 +0200 -+++ bash/doc/bashref.texi 2005-09-10 11:42:51.805867224 +0200 -@@ -2025,6 +2025,9 @@ - is an integer port number or service name, Bash attempts to open a UDP - connection to the corresponding socket. - -+NOTE: @code{Bash}, as packaged for Debian, does not support using the -+@file{/dev/tcp} and @file{/dev/udp} files. -+ - @end table - - A failure to open or create a file causes the redirection to fail. diff --git a/debian/patches/patches/man-net-redirections.dpatch b/debian/patches/patches/man-net-redirections.dpatch deleted file mode 100644 index 1bee4b1..0000000 --- a/debian/patches/patches/man-net-redirections.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Document, that bash is configured using --disable-net-redirections. - ---- bash/doc/bash.1~ 2005-09-09 22:08:10.833197680 +0200 -+++ bash/doc/bash.1 2005-09-10 11:47:57.694365104 +0200 -@@ -3033,6 +3033,9 @@ - .PD - .RE - .PP -+\fBNOTE:\fP Bash, as packaged for Debian, does \fBnot\fP support using -+the \fB/dev/tcp\fP and \fB/dev/udp\fP files. -+.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 diff --git a/debian/patches/patches/man-nocaseglob.dpatch b/debian/patches/patches/man-nocaseglob.dpatch deleted file mode 100644 index 6176a53..0000000 --- a/debian/patches/patches/man-nocaseglob.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Clarify documentation about case-insensitive pathname expansion - ---- bash/doc/bash.1~ 2004-08-28 18:25:23.000000000 +0200 -+++ bash/doc/bash.1 2004-08-28 19:13:24.000000000 +0200 -@@ -2690,6 +2690,10 @@ - .B nocaseglob - is enabled, the match is performed without regard to the case - of alphabetic characters. -+Note that when using range expressions like -+[a-z] (see below), letters of the other case may be included, -+depending on the setting of -+.B LC_COLLATE. - When a pattern is used for pathname expansion, - the character - .B ``.'' diff --git a/debian/patches/patches/man-substring-exp-doc.dpatch b/debian/patches/patches/man-substring-exp-doc.dpatch deleted file mode 100644 index c6cdf58..0000000 --- a/debian/patches/patches/man-substring-exp-doc.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Clarify documentation about substring expansion - ---- bash/doc/bashref.texi~ 2004-08-28 15:10:17.000000000 +0200 -+++ bash/doc/bashref.texi 2004-08-28 18:27:16.000000000 +0200 -@@ -1575,6 +1575,9 @@ - @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}. -+Arithmetic expressions starting with a - must be separated by whitespace -+from the preceding : to be -+distinguished from the $@{@var{parameter}:@minus{}@var{word}@} expansion. - If @var{parameter} is @samp{@@}, the result is @var{length} positional - parameters beginning at @var{offset}. - If @var{parameter} is an array name indexed by @samp{@@} or @samp{*}, diff --git a/debian/patches/patches/man-substring-exp.dpatch b/debian/patches/patches/man-substring-exp.dpatch deleted file mode 100644 index 8cfaece..0000000 --- a/debian/patches/patches/man-substring-exp.dpatch +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Clarify documentation about substring expansion - ---- bash/doc/bash.1~ 2004-08-28 15:10:17.000000000 +0200 -+++ bash/doc/bash.1 2004-08-28 18:25:23.000000000 +0200 -@@ -2356,6 +2356,9 @@ - \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. -+Arithmetic expressions starting with a - must be separated by whitespace -+from the preceding : to be -+distinguished from the \fBUse Default Values\fP expansion. - If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional - parameters beginning at \fIoffset\fP. - If \fIparameter\fP is an array name indexed by @ or *, diff --git a/debian/patches/patches/man-test.dpatch b/debian/patches/patches/man-test.dpatch deleted file mode 100644 index 9382b35..0000000 --- a/debian/patches/patches/man-test.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document conditional file expressions acting on the target of -# DP: symbolic links as well (except -h, -L). - ---- builtins/test.def~ 2002-04-04 21:48:17.000000000 +0200 -+++ builtins/test.def 2004-10-16 19:51:24.000000000 +0200 -@@ -60,6 +60,9 @@ - - FILE1 -ef FILE2 True if file1 is a hard link to file2. - -+All file operators except -h and -L are acting on the target of a symbolic -+link, not on the symlink itself, if FILE is a symbolic link. -+ - String operators: - - -z STRING True if string is empty. diff --git a/debian/patches/patches/man-test2-doc.dpatch b/debian/patches/patches/man-test2-doc.dpatch deleted file mode 100644 index ef981a7..0000000 --- a/debian/patches/patches/man-test2-doc.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Document handling of parameters of the test builtin. - ---- doc/bashref.texi~ 2005-09-09 19:51:31.150172600 +0000 -+++ doc/bashref.texi 2005-09-09 19:52:12.693857000 +0000 -@@ -5264,6 +5264,10 @@ - Unless otherwise specified, primaries that operate on files follow symbolic - links and operate on the target of the link, rather than the link itself. - -+See the description of the @code{test} builtin command (section -+@pxref{Bash Builtins} below) for the handling of parameters -+(i.e. missing parameters). -+ - @table @code - @item -a @var{file} - True if @var{file} exists. diff --git a/debian/patches/patches/man-test2.dpatch b/debian/patches/patches/man-test2.dpatch deleted file mode 100644 index f2cc08a..0000000 --- a/debian/patches/patches/man-test2.dpatch +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Document handling of parameters of the test builtin. - ---- bash/builtins/test.def.orig 2008-11-29 17:41:32.000000000 +0000 -+++ bash/builtins/test.def 2008-11-29 17:44:25.000000000 +0000 -@@ -94,6 +94,9 @@ - less-than, less-than-or-equal, greater-than, or greater-than-or-equal - than ARG2. - -+See the bash manual page bash(1) for the handling of parameters (i.e. -+missing parameters). -+ - Exit Status: - Returns success if EXPR evaluates to true; fails if EXPR evaluates to - false or an invalid argument is given. ---- bash/doc/bash.1.~3~ 2009-12-30 15:45:17.063586386 +0100 -+++ bash/doc/bash.1 2009-12-30 15:53:33.021085355 +0100 -@@ -3843,6 +3843,10 @@ - .if n .sp 1 - When used with \fB[[\fP, The \fB<\fP and \fB>\fP operators sort - lexicographically using the current locale. -+.PP -+See the description of the \fItest\fP builtin command (section SHELL -+BUILTIN COMMANDS below) for the handling of parameters (i.e. -+missing parameters). - .sp 1 - .PD 0 - .TP diff --git a/debian/patches/patches/man-vx-opts.dpatch b/debian/patches/patches/man-vx-opts.dpatch deleted file mode 100644 index e85b350..0000000 --- a/debian/patches/patches/man-vx-opts.dpatch +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: document -v / -x options - ---- ./doc/bash.1~ Wed Jan 20 22:48:04 1999 -+++ ./doc/bash.1 Sun Nov 14 13:26:59 1999 -@@ -104,6 +104,12 @@ - This option allows the positional parameters to be set - when invoking an interactive shell. - .TP -+.B \-v -+Print shell input lines as they are read. -+.TP -+.B \-x -+Print commands and their arguments as they are executed. -+.TP - .B \-D - A list of all double-quoted strings preceded by \fB$\fP - is printed on the standard ouput. diff --git a/debian/patches/patches/pgrp-pipe.dpatch b/debian/patches/patches/pgrp-pipe.dpatch deleted file mode 100644 index 21e9f3e..0000000 --- a/debian/patches/patches/pgrp-pipe.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Define PGRP_PIPE to avoid race condition. - ---- config-bot.h 2004-03-19 17:56:23.000000000 -0500 -+++ config-bot.h 2005-09-16 14:32:33.000000000 -0400 -@@ -179,3 +179,6 @@ - - /* If you don't want bash to provide a default mail file to check. */ - #undef DEFAULT_MAIL_DIRECTORY -+ -+/* Bug #224543 */ -+#define PGRP_PIPE 1 - diff --git a/debian/patches/patches/privmode.dpatch b/debian/patches/patches/privmode.dpatch deleted file mode 100644 index eb9abf2..0000000 --- a/debian/patches/patches/privmode.dpatch +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: XXX missing description -# DP: -# DP: Comment from Chet Ramey : -# DP: -# DP: Nope. This will allow setuid scripts if not called as `sh' and not -# DP: called with the -p option. I won't install this. - - -diff -urb bash.orig/shell.c bash/shell.c ---- bash.orig/shell.c 2003-06-03 19:50:35.000000000 +0200 -+++ bash/shell.c 2003-09-28 00:26:28.000000000 +0200 -@@ -447,7 +447,7 @@ - if (dump_translatable_strings) - read_but_dont_execute = 1; - -- 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 diff --git a/debian/patches/patches/random.dpatch b/debian/patches/patches/random.dpatch deleted file mode 100644 index 6304468..0000000 --- a/debian/patches/patches/random.dpatch +++ /dev/null @@ -1,107 +0,0 @@ -#! /bin/sh -e - -dir=. -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" - dir=$3 -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) - patch $pdir -f --no-backup-if-mismatch -p1 < $0 - echo '2.05' > $dir/_distribution - echo '0' > $dir/_patchlevel - cd $dir && autoconf - rm -f $dir/_distribution $dir/_patchlevel - ;; - -unpatch) - patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 - rm -f $dir/configure $dir/_distribution $dir/_patchlevel - ;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: use the system random functions - -diff -urb bash.orig/config.h.in bash/config.h.in ---- bash.orig/config.h.in 2003-09-22 14:42:35.000000000 +0200 -+++ bash/config.h.in 2003-09-28 00:27:15.000000000 +0200 -@@ -606,6 +606,9 @@ - /* Define if you have the putenv function. */ - #undef HAVE_PUTENV - -+/* Define if you have the random function. */ -+#undef HAVE_RANDOM -+ - /* Define if you have the readlink function. */ - #undef HAVE_READLINK - -@@ -696,6 +699,9 @@ - /* Define if you have the strsignal function or macro. */ - #undef HAVE_STRSIGNAL - -+/* Define if you have the srandom function. */ -+#undef HAVE_SRANDOM -+ - /* Define if you have the sysconf function. */ - #undef HAVE_SYSCONF - -diff -urb bash.orig/variables.c bash/variables.c ---- bash.orig/variables.c 2003-07-31 16:28:57.000000000 +0200 -+++ bash/variables.c 2003-09-28 00:27:15.000000000 +0200 -@@ -1098,16 +1098,22 @@ - static unsigned long rseed = 1; - static int last_random_value; - --/* 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. */ -+/* Use the random number genrator provided by the standard C library, -+ else use a linear congruential random number generator based on the -+ ANSI C standard. This one isn't very good (the values are alternately -+ odd and even, for example), but a more complicated one is overkill. */ - - /* Returns a pseudo-random number between 0 and 32767. */ - static int - brand () - { -+#if defined(HAVE_RANDOM) -+ rseed = (unsigned int) (labs(random()) & 32767); -+ return rseed; -+#else - rseed = rseed * 1103515245 + 12345; - return ((unsigned int)((rseed >> 16) & 32767)); /* was % 32768 */ -+#endif - } - - /* Set the random number generator seed to SEED. */ -@@ -1115,8 +1121,12 @@ - sbrand (seed) - unsigned long seed; - { -+#if defined(HAVE_SRANDOM) -+ srandom(seed); -+#else - rseed = seed; - last_random_value = 0; -+#endif - } - - static SHELL_VAR * ---- bash/configure.in~ 2004-03-02 00:04:29.000000000 +0100 -+++ bash/configure.in 2004-03-02 00:05:48.000000000 +0100 -@@ -667,6 +667,9 @@ - - AC_FUNC_MKTIME - -+dnl checks for random functions -+AC_CHECK_FUNCS(random srandom) -+ - dnl - dnl Checks for lib/intl and related code (uses some of the output from - dnl AM_GNU_GETTEXT) diff --git a/debian/patches/patches/rbash-manpage.dpatch b/debian/patches/patches/rbash-manpage.dpatch deleted file mode 100644 index 73a9969..0000000 --- a/debian/patches/patches/rbash-manpage.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: doc/rbash.1: fix bash(1) reference - ---- doc/rbash.1~ 1999-11-29 22:30:03.000000000 +0100 -+++ doc/rbash.1 2003-02-21 16:15:59.000000000 +0100 -@@ -3,6 +3,6 @@ - rbash \- restricted bash, see \fBbash\fR(1) - .SH RESTRICTED SHELL - .nr zY 1 --.so bash.1 -+.so man1/bash.1 - .SH SEE ALSO - bash(1) diff --git a/debian/patches/patches/rl-del-backspace-policy.dpatch b/debian/patches/patches/rl-del-backspace-policy.dpatch deleted file mode 100644 index ec56b43..0000000 --- a/debian/patches/patches/rl-del-backspace-policy.dpatch +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Handle Debian Backspace/Delete keyboard policy - -diff -urb bash.orig/lib/readline/terminal.c bash/lib/readline/terminal.c ---- bash.orig/lib/readline/terminal.c 2003-09-18 17:03:42.000000000 +0200 -+++ bash/lib/readline/terminal.c 2003-09-27 23:25:59.000000000 +0200 -@@ -148,6 +148,9 @@ - /* Insert key */ - static char *_rl_term_kI; - -+/* The key sequence sent by the Delete key, if any. */ -+static char *_rl_term_kD; -+ - /* Cursor control */ - static char *_rl_term_vs; /* very visible */ - static char *_rl_term_ve; /* normal */ -@@ -314,6 +317,7 @@ - { "ic", &_rl_term_ic }, - { "im", &_rl_term_im }, - { "kH", &_rl_term_kH }, /* home down ?? */ -+ { "kD", &_rl_term_kD }, /* delete */ - { "kI", &_rl_term_kI }, /* insert */ - { "kd", &_rl_term_kd }, - { "ke", &_rl_term_ke }, /* end keypad mode */ -@@ -492,6 +496,7 @@ - - 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); /* Delete */ - - _rl_keymap = xkeymap; - } diff --git a/debian/patches/patches/rl-examples-bdb.dpatch b/debian/patches/patches/rl-examples-bdb.dpatch deleted file mode 100644 index 33cca15..0000000 --- a/debian/patches/patches/rl-examples-bdb.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Modified readline examples to properly build with Debian setup. - ---- ./lib/readline/examples/rl.c~ Mon Nov 8 22:22:03 1999 -+++ ./lib/readline/examples/rl.c Fri Dec 31 17:34:30 1999 -@@ -11,7 +11,7 @@ - - #include - #include --#include "posixstat.h" -+#include - - #if defined (READLINE_LIBRARY) - # include "readline.h" diff --git a/debian/patches/patches/rl-header.dpatch b/debian/patches/patches/rl-header.dpatch deleted file mode 100644 index d147813..0000000 --- a/debian/patches/patches/rl-header.dpatch +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: include stdio.h in readline.h ---- lib/readline/readline.h~ Thu Aug 5 14:10:59 1999 -+++ lib/readline/readline.h Mon Oct 9 20:32:56 2000 -@@ -32,6 +32,7 @@ - # include "keymaps.h" - # include "tilde.h" - #else -+# include - # include - # include - # include diff --git a/debian/patches/patches/rl-setenv.dpatch b/debian/patches/patches/rl-setenv.dpatch deleted file mode 100644 index 9ae1d08..0000000 --- a/debian/patches/patches/rl-setenv.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Prefer setenv over putenv - ---- lib/readline/shell.c~ 2004-10-17 13:07:37.000000000 +0200 -+++ lib/readline/shell.c 2004-10-17 13:06:48.000000000 +0200 -@@ -122,7 +122,7 @@ - { - char *b; - --#if defined (HAVE_PUTENV) -+#if 0 - b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1); - sprintf (b, "LINES=%d", lines); - putenv (b); diff --git a/debian/patches/patches/template.dpatch b/debian/patches/patches/template.dpatch deleted file mode 100644 index e583619..0000000 --- a/debian/patches/patches/template.dpatch +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: diff --git a/debian/patches/pgrp-pipe.dpatch b/debian/patches/pgrp-pipe.dpatch deleted file mode 100755 index 21e9f3e..0000000 --- a/debian/patches/pgrp-pipe.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Define PGRP_PIPE to avoid race condition. - ---- config-bot.h 2004-03-19 17:56:23.000000000 -0500 -+++ config-bot.h 2005-09-16 14:32:33.000000000 -0400 -@@ -179,3 +179,6 @@ - - /* If you don't want bash to provide a default mail file to check. */ - #undef DEFAULT_MAIL_DIRECTORY -+ -+/* Bug #224543 */ -+#define PGRP_PIPE 1 - diff --git a/debian/patches/po-sv.dpatch b/debian/patches/po-sv.dpatch deleted file mode 100755 index 093f682..0000000 --- a/debian/patches/po-sv.dpatch +++ /dev/null @@ -1,4206 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: swedish message strings - ---- bash/po.old/LINGUAS 2003-12-10 16:58:17.000000000 +0000 -+++ bash/po/LINGUAS 2006-03-03 23:10:50.879935272 +0000 -@@ -1,2 +1,3 @@ - # Set of available languages. - en@quot en@boldquot -+sv -diff -urN bash/po.old/sv.po bash/po/sv.po ---- bash/po.old/sv.po 1970-01-01 01:00:00.000000000 +0100 -+++ bash/po/sv.po 2006-03-03 23:53:31.956875584 +0100 -@@ -0,0 +1,4177 @@ -+# Swedish translation of bash. -+# Copyright (C) 2005 Free Software Foundation, Inc. -+# This file is distributed under the same license as the bash package. -+# Daniel Nylander , 2005. -+# -+msgid "" -+msgstr "" -+"Project-Id-Version: bash 3.0\n" -+"Report-Msgid-Bugs-To: bug-bash@gnu.org\n" -+"POT-Creation-Date: 2003-12-22 15:34-0500\n" -+"PO-Revision-Date: 2005-12-28 16:48+0100\n" -+"Last-Translator: Daniel Nylander \n" -+"Language-Team: Swedish \n" -+"MIME-Version: 1.0\n" -+"Content-Type: text/plain; charset=utf-8\n" -+"Content-Transfer-Encoding: 8bit\n" -+ -+#: arrayfunc.c:45 -+msgid "bad array subscript" -+msgstr "" -+ -+#: arrayfunc.c:306 -+#, c-format -+msgid "%s: cannot assign to non-numeric index" -+msgstr "" -+ -+#: bashhist.c:321 -+#, c-format -+msgid "%s: cannot create: %s" -+msgstr "%s: kan inte skapa: %s" -+ -+#: bashline.c:2791 -+msgid "bash_execute_unix_command: cannot find keymap for command" -+msgstr "" -+ -+#: bashline.c:2840 -+#, c-format -+msgid "%s: first non-whitespace character is not `\"'" -+msgstr "" -+ -+#: bashline.c:2869 -+#, c-format -+msgid "no closing `%c' in %s" -+msgstr "" -+ -+#: bashline.c:2903 -+#, c-format -+msgid "%s: missing colon separator" -+msgstr "" -+ -+#: builtins/alias.def:123 -+#, fuzzy, c-format -+msgid "`%s': invalid alias name" -+msgstr "Ogiltigt aliasnamn" -+ -+#: builtins/bind.def:194 -+#, c-format -+msgid "`%s': invalid keymap name" -+msgstr "" -+ -+#: builtins/bind.def:233 -+#, c-format -+msgid "%s: cannot read: %s" -+msgstr "%s: kan inte läsa: %s" -+ -+#: builtins/bind.def:248 -+#, c-format -+msgid "`%s': cannot unbind" -+msgstr "" -+ -+#: builtins/bind.def:283 -+#, c-format -+msgid "`%s': unknown function name" -+msgstr "" -+ -+#: builtins/bind.def:291 -+#, c-format -+msgid "%s is not bound to any keys.\n" -+msgstr "" -+ -+#: builtins/bind.def:295 -+#, fuzzy, c-format -+msgid "%s can be invoked via " -+msgstr "%s kan startas via %s." -+ -+#: builtins/break.def:128 -+msgid "only meaningful in a `for', `while', or `until' loop" -+msgstr "" -+ -+#: builtins/caller.def:127 -+#: builtins.c:320 -+msgid "Returns the context of the current subroutine call." -+msgstr "" -+ -+#: builtins/caller.def:129 -+#: builtins.c:322 -+msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," -+msgstr "" -+ -+#: builtins/caller.def:130 -+#: builtins.c:323 -+msgid "returns \"$line $subroutine $filename\"; this extra information" -+msgstr "" -+ -+#: builtins/caller.def:131 -+#: builtins.c:324 -+msgid "can be used used to provide a stack trace." -+msgstr "" -+ -+#: builtins/caller.def:133 -+#: builtins.c:326 -+msgid "The value of EXPR indicates how many call frames to go back before the" -+msgstr "" -+ -+#: builtins/caller.def:134 -+#: builtins.c:327 -+msgid "current one; the top frame is frame 0." -+msgstr "" -+ -+#: builtins/cd.def:188 -+msgid "HOME not set" -+msgstr "HOME inte inställd" -+ -+#: builtins/cd.def:200 -+msgid "OLDPWD not set" -+msgstr "" -+ -+#: builtins/cd.def:357 -+#, c-format -+msgid "write error: %s" -+msgstr "skrivfel: %s" -+ -+#: builtins/common.c:133 -+#: test.c:921 -+msgid "too many arguments" -+msgstr "för många argument" -+ -+#: builtins/common.c:157 -+#: shell.c:465 -+#: shell.c:737 -+#, c-format -+msgid "%s: option requires an argument" -+msgstr "%s: flagga kräver ett argument" -+ -+#: builtins/common.c:164 -+#, c-format -+msgid "%s: numeric argument required" -+msgstr "" -+ -+#: builtins/common.c:171 -+#, c-format -+msgid "%s: not found" -+msgstr "%s: inte funnen" -+ -+#: builtins/common.c:180 -+#: shell.c:750 -+#, c-format -+msgid "%s: invalid option" -+msgstr "%s: ogiltig flagga" -+ -+#: builtins/common.c:187 -+#, c-format -+msgid "%s: invalid option name" -+msgstr "%s: ogiltigt flaggnamn" -+ -+#: builtins/common.c:194 -+#: general.c:229 -+#: general.c:234 -+#, c-format -+msgid "`%s': not a valid identifier" -+msgstr "\"%s\": inte en giltig identifierare" -+ -+#: builtins/common.c:201 -+#, c-format -+msgid "%s: invalid number" -+msgstr "%s: ogiltigt nummer" -+ -+#: builtins/common.c:208 -+#, c-format -+msgid "%s: invalid signal specification" -+msgstr "" -+ -+#: builtins/common.c:215 -+#, c-format -+msgid "`%s': not a pid or valid job spec" -+msgstr "" -+ -+#: builtins/common.c:222 -+#: error.c:453 -+#, c-format -+msgid "%s: readonly variable" -+msgstr "%s: skrivskyddad variabel" -+ -+#: builtins/common.c:230 -+#, fuzzy, c-format -+msgid "%s: %s out of range" -+msgstr "UTANFÖR OMRÅDET" -+ -+#: builtins/common.c:230 -+#: builtins/common.c:232 -+msgid "argument" -+msgstr "argument" -+ -+#: builtins/common.c:232 -+#, fuzzy, c-format -+msgid "%s out of range" -+msgstr "UTANFÖR OMRÅDET" -+ -+#: builtins/common.c:240 -+#, c-format -+msgid "%s: no such job" -+msgstr "%s: inget sådant jobb" -+ -+#: builtins/common.c:248 -+#, c-format -+msgid "%s: no job control" -+msgstr "%s: ingen jobbkontroll" -+ -+#: builtins/common.c:250 -+msgid "no job control" -+msgstr "ingen jobbkontroll" -+ -+#: builtins/common.c:260 -+#, fuzzy, c-format -+msgid "%s: restricted" -+msgstr "Begränsat" -+ -+#: builtins/common.c:262 -+#, fuzzy -+msgid "restricted" -+msgstr "Begränsat" -+ -+#: builtins/common.c:270 -+#, c-format -+msgid "%s: not a shell builtin" -+msgstr "" -+ -+#: builtins/common.c:486 -+#, c-format -+msgid "%s: error retrieving current directory: %s: %s\n" -+msgstr "" -+ -+#: builtins/common.c:553 -+#: builtins/common.c:555 -+#, c-format -+msgid "%s: ambiguous job spec" -+msgstr "" -+ -+#: builtins/complete.def:251 -+#, c-format -+msgid "%s: invalid action name" -+msgstr "%s: ogiltigt åtgärdsnamn" -+ -+#: builtins/complete.def:381 -+#: builtins/complete.def:524 -+#, c-format -+msgid "%s: no completion specification" -+msgstr "" -+ -+#: builtins/complete.def:571 -+msgid "warning: -F option may not work as you expect" -+msgstr "varning: flaggan -F kanske inte fungerar som du förväntar" -+ -+#: builtins/complete.def:573 -+msgid "warning: -C option may not work as you expect" -+msgstr "varning: flaggan -C kanske inte fungerar som du förväntar" -+ -+#: builtins/declare.def:105 -+msgid "can only be used in a function" -+msgstr "kan endast användas i en funktion" -+ -+#: builtins/declare.def:295 -+msgid "cannot use `-f' to make functions" -+msgstr "" -+ -+#: builtins/declare.def:307 -+#: execute_cmd.c:3949 -+#, c-format -+msgid "%s: readonly function" -+msgstr "%s: skrivskyddad funktion" -+ -+#: builtins/declare.def:389 -+#, c-format -+msgid "%s: cannot destroy array variables in this way" -+msgstr "" -+ -+#: builtins/enable.def:128 -+#: builtins/enable.def:136 -+msgid "dynamic loading not available" -+msgstr "" -+ -+#: builtins/enable.def:303 -+#, c-format -+msgid "cannot open shared object %s: %s" -+msgstr "" -+ -+#: builtins/enable.def:326 -+#, c-format -+msgid "cannot find %s in shared object %s: %s" -+msgstr "" -+ -+#: builtins/enable.def:450 -+#, c-format -+msgid "%s: not dynamically loaded" -+msgstr "%s: inte dynamiskt inläst" -+ -+#: builtins/enable.def:465 -+#, c-format -+msgid "%s: cannot delete: %s" -+msgstr "%s: kan inte ta bort: %s" -+ -+#: builtins/evalfile.c:128 -+#: execute_cmd.c:3821 -+#: shell.c:1395 -+#, c-format -+msgid "%s: is a directory" -+msgstr "%s: är en katalog" -+ -+#: builtins/evalfile.c:133 -+#, c-format -+msgid "%s: not a regular file" -+msgstr "%s: inte en vanlig fil" -+ -+#: builtins/evalfile.c:141 -+#, c-format -+msgid "%s: file is too large" -+msgstr "%s: fil är för stor" -+ -+#: builtins/exec.def:205 -+#, c-format -+msgid "%s: cannot execute: %s" -+msgstr "%s: kan inte starta: %s" -+ -+#: builtins/exit.def:83 -+msgid "not login shell: use `exit'" -+msgstr "" -+ -+#: builtins/exit.def:111 -+msgid "There are stopped jobs.\n" -+msgstr "Det finns stoppade jobb.\n" -+ -+#: builtins/fc.def:252 -+msgid "no command found" -+msgstr "inget kommando hittades" -+ -+#: builtins/fc.def:317 -+msgid "history specification" -+msgstr "" -+ -+#: builtins/fc.def:338 -+#, c-format -+msgid "%s: cannot open temp file: %s" -+msgstr "%s: kan inte öppna temporärfil: %s" -+ -+#: builtins/fg_bg.def:133 -+#, c-format -+msgid "job %d started without job control" -+msgstr "jobb %d startad utan jobbkontroll" -+ -+#: builtins/getopt.c:109 -+#, c-format -+msgid "%s: illegal option -- %c\n" -+msgstr "%s: ogiltig flagga -- %c\n" -+ -+#: builtins/getopt.c:110 -+#, c-format -+msgid "%s: option requires an argument -- %c\n" -+msgstr "%s: flagga kräver ett argument -- %c\n" -+ -+#: builtins/hash.def:83 -+msgid "hashing disabled" -+msgstr "" -+ -+#: builtins/hash.def:128 -+#, c-format -+msgid "%s: hash table empty\n" -+msgstr "" -+ -+#: builtins/help.def:108 -+msgid "Shell commands matching keywords `" -+msgstr "" -+ -+#: builtins/help.def:110 -+msgid "Shell commands matching keyword `" -+msgstr "" -+ -+#: builtins/help.def:138 -+#, c-format -+msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." -+msgstr "" -+ -+#: builtins/help.def:164 -+#, c-format -+msgid "%s: cannot open: %s" -+msgstr "%s: kan inte öppna: %s" -+ -+#: builtins/help.def:182 -+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:148 -+msgid "cannot use more than one of -anrw" -+msgstr "kan inte använda mer än en av -anrw" -+ -+#: builtins/history.def:180 -+msgid "history position" -+msgstr "" -+ -+#: builtins/history.def:390 -+#, c-format -+msgid "%s: history expansion failed" -+msgstr "" -+ -+#: builtins/jobs.def:99 -+msgid "no other options allowed with `-x'" -+msgstr "" -+ -+#: builtins/kill.def:187 -+#, c-format -+msgid "%s: arguments must be process or job IDs" -+msgstr "" -+ -+#: builtins/kill.def:248 -+msgid "Unknown error" -+msgstr "Okänt fel" -+ -+#: builtins/let.def:94 -+#: builtins/let.def:119 -+#: expr.c:496 -+#: expr.c:511 -+#, fuzzy -+msgid "expression expected" -+msgstr "Förväntade uttryck" -+ -+#: builtins/printf.def:249 -+#, c-format -+msgid "`%s': missing format character" -+msgstr "\"%s\": formattecken saknas" -+ -+#: builtins/printf.def:408 -+#, c-format -+msgid "`%c': invalid format character" -+msgstr "\"%c\": ogiltigt formattecken" -+ -+#: builtins/printf.def:601 -+msgid "missing hex digit for \\x" -+msgstr "" -+ -+#: builtins/pushd.def:168 -+msgid "no other directory" -+msgstr "ingen annan katalog" -+ -+#: builtins/pushd.def:435 -+msgid "" -+msgstr "" -+ -+#: builtins/pushd.def:652 -+#: builtins.c:1351 -+msgid "Display the list of currently remembered directories. Directories" -+msgstr "" -+ -+#: builtins/pushd.def:653 -+#: builtins.c:1352 -+msgid "find their way onto the list with the `pushd' command; you can get" -+msgstr "" -+ -+#: builtins/pushd.def:654 -+#: builtins.c:1353 -+msgid "back up through the list with the `popd' command." -+msgstr "" -+ -+#: builtins/pushd.def:656 -+#: builtins.c:1355 -+msgid "The -l flag specifies that `dirs' should not print shorthand versions" -+msgstr "" -+ -+#: builtins/pushd.def:657 -+#: builtins.c:1356 -+msgid "of directories which are relative to your home directory. This means" -+msgstr "" -+ -+#: builtins/pushd.def:658 -+#: builtins.c:1357 -+msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" -+msgstr "" -+ -+#: builtins/pushd.def:659 -+#: builtins.c:1358 -+msgid "causes `dirs' to print the directory stack with one entry per line," -+msgstr "" -+ -+#: builtins/pushd.def:660 -+#: builtins.c:1359 -+msgid "prepending the directory name with its position in the stack. The -p" -+msgstr "" -+ -+#: builtins/pushd.def:661 -+#: builtins.c:1360 -+msgid "flag does the same thing, but the stack position is not prepended." -+msgstr "" -+ -+#: builtins/pushd.def:662 -+#: builtins.c:1361 -+msgid "The -c flag clears the directory stack by deleting all of the elements." -+msgstr "" -+ -+#: builtins/pushd.def:664 -+msgid "+N displays the Nth entry counting from the left of the list shown by" -+msgstr "" -+ -+#: builtins/pushd.def:665 -+#: builtins/pushd.def:668 -+msgid " dirs when invoked without options, starting with zero." -+msgstr "" -+ -+#: builtins/pushd.def:667 -+msgid "-N displays the Nth entry counting from the right of the list shown by" -+msgstr "" -+ -+#: builtins/pushd.def:673 -+#: builtins.c:1302 -+msgid "Adds a directory to the top of the directory stack, or rotates" -+msgstr "" -+ -+#: builtins/pushd.def:674 -+#: builtins.c:1303 -+msgid "the stack, making the new top of the stack the current working" -+msgstr "" -+ -+#: builtins/pushd.def:675 -+#: builtins.c:1304 -+msgid "directory. With no arguments, exchanges the top two directories." -+msgstr "" -+ -+#: builtins/pushd.def:677 -+msgid "+N Rotates the stack so that the Nth directory (counting" -+msgstr "" -+ -+#: builtins/pushd.def:678 -+msgid " from the left of the list shown by `dirs', starting with" -+msgstr "" -+ -+#: builtins/pushd.def:679 -+#: builtins/pushd.def:683 -+msgid " zero) is at the top." -+msgstr "" -+ -+#: builtins/pushd.def:681 -+msgid "-N Rotates the stack so that the Nth directory (counting" -+msgstr "" -+ -+#: builtins/pushd.def:682 -+msgid " from the right of the list shown by `dirs', starting with" -+msgstr "" -+ -+#: builtins/pushd.def:685 -+msgid "-n suppress the normal change of directory when adding directories" -+msgstr "" -+ -+#: builtins/pushd.def:686 -+msgid " to the stack, so only the stack is manipulated." -+msgstr "" -+ -+#: builtins/pushd.def:688 -+msgid "dir adds DIR to the directory stack at the top, making it the" -+msgstr "" -+ -+#: builtins/pushd.def:689 -+msgid " new current working directory." -+msgstr "" -+ -+#: builtins/pushd.def:691 -+#: builtins/pushd.def:711 -+#: builtins.c:1320 -+#: builtins.c:1343 -+msgid "You can see the directory stack with the `dirs' command." -+msgstr "" -+ -+#: builtins/pushd.def:696 -+#: builtins.c:1328 -+msgid "Removes entries from the directory stack. With no arguments," -+msgstr "" -+ -+#: builtins/pushd.def:697 -+#: builtins.c:1329 -+msgid "removes the top directory from the stack, and cd's to the new" -+msgstr "" -+ -+#: builtins/pushd.def:698 -+#: builtins.c:1330 -+msgid "top directory." -+msgstr "" -+ -+#: builtins/pushd.def:700 -+msgid "+N removes the Nth entry counting from the left of the list" -+msgstr "" -+ -+#: builtins/pushd.def:701 -+msgid " shown by `dirs', starting with zero. For example: `popd +0'" -+msgstr "" -+ -+#: builtins/pushd.def:702 -+msgid " removes the first directory, `popd +1' the second." -+msgstr "" -+ -+#: builtins/pushd.def:704 -+msgid "-N removes the Nth entry counting from the right of the list" -+msgstr "" -+ -+#: builtins/pushd.def:705 -+msgid " shown by `dirs', starting with zero. For example: `popd -0'" -+msgstr "" -+ -+#: builtins/pushd.def:706 -+msgid " removes the last directory, `popd -1' the next to last." -+msgstr "" -+ -+#: builtins/pushd.def:708 -+msgid "-n suppress the normal change of directory when removing directories" -+msgstr "" -+ -+#: builtins/pushd.def:709 -+msgid " from the stack, so only the stack is manipulated." -+msgstr "" -+ -+#: builtins/read.def:207 -+#, c-format -+msgid "%s: invalid timeout specification" -+msgstr "" -+ -+#: builtins/read.def:230 -+#, c-format -+msgid "%s: invalid file descriptor specification" -+msgstr "" -+ -+#: builtins/read.def:237 -+#, c-format -+msgid "%d: invalid file descriptor: %s" -+msgstr "" -+ -+#: builtins/read.def:463 -+#, c-format -+msgid "read error: %d: %s" -+msgstr "läsfel: %d: %s" -+ -+#: builtins/return.def:63 -+msgid "can only `return' from a function or sourced script" -+msgstr "" -+ -+#: builtins/set.def:743 -+msgid "cannot simultaneously unset a function and a variable" -+msgstr "" -+ -+#: builtins/set.def:780 -+#, c-format -+msgid "%s: cannot unset" -+msgstr "" -+ -+#: builtins/set.def:787 -+#, c-format -+msgid "%s: cannot unset: readonly %s" -+msgstr "" -+ -+#: builtins/set.def:798 -+#, c-format -+msgid "%s: not an array variable" -+msgstr "" -+ -+#: builtins/setattr.def:165 -+#, c-format -+msgid "%s: not a function" -+msgstr "%s: inte en funktion" -+ -+#: builtins/shift.def:66 -+#: builtins/shift.def:72 -+msgid "shift count" -+msgstr "" -+ -+#: builtins/shopt.def:226 -+msgid "cannot set and unset shell options simultaneously" -+msgstr "" -+ -+#: builtins/shopt.def:291 -+#, c-format -+msgid "%s: invalid shell option name" -+msgstr "" -+ -+#: builtins/source.def:117 -+msgid "filename argument required" -+msgstr "" -+ -+#: builtins/source.def:137 -+#, c-format -+msgid "%s: file not found" -+msgstr "%s: fil inte hittad" -+ -+#: builtins/suspend.def:93 -+msgid "cannot suspend" -+msgstr "" -+ -+#: builtins/suspend.def:103 -+msgid "cannot suspend a login shell" -+msgstr "" -+ -+#: builtins/type.def:231 -+#, c-format -+msgid "%s is aliased to `%s'\n" -+msgstr "" -+ -+#: builtins/type.def:252 -+#, c-format -+msgid "%s is a shell keyword\n" -+msgstr "" -+ -+#: builtins/type.def:272 -+#, c-format -+msgid "%s is a function\n" -+msgstr "%s är en funktion\n" -+ -+#: builtins/type.def:297 -+#, c-format -+msgid "%s is a shell builtin\n" -+msgstr "" -+ -+#: builtins/type.def:318 -+#, c-format -+msgid "%s is %s\n" -+msgstr "%s är %s\n" -+ -+#: builtins/type.def:338 -+#, c-format -+msgid "%s is hashed (%s)\n" -+msgstr "" -+ -+#: builtins/ulimit.def:332 -+#, c-format -+msgid "%s: invalid limit argument" -+msgstr "" -+ -+#: builtins/ulimit.def:358 -+#, c-format -+msgid "`%c': bad command" -+msgstr "\"%c\": felaktigt kommando" -+ -+#: builtins/ulimit.def:387 -+#, c-format -+msgid "%s: cannot get limit: %s" -+msgstr "" -+ -+#: builtins/ulimit.def:425 -+#, c-format -+msgid "%s: cannot modify limit: %s" -+msgstr "" -+ -+#: builtins/umask.def:112 -+msgid "octal number" -+msgstr "oktalt nummer" -+ -+#: builtins/umask.def:226 -+#, c-format -+msgid "`%c': invalid symbolic mode operator" -+msgstr "" -+ -+#: builtins/umask.def:279 -+#, c-format -+msgid "`%c': invalid symbolic mode character" -+msgstr "" -+ -+#: error.c:165 -+#, c-format -+msgid "last command: %s\n" -+msgstr "senaste kommando: %s\n" -+ -+#: error.c:173 -+msgid "Aborting..." -+msgstr "Avbryter..." -+ -+#: error.c:260 -+#, c-format -+msgid "%s: warning: " -+msgstr "%s: varning: " -+ -+#: error.c:405 -+msgid "unknown command error" -+msgstr "okänt kommandofel" -+ -+#: error.c:406 -+msgid "bad command type" -+msgstr "" -+ -+#: error.c:407 -+msgid "bad connector" -+msgstr "" -+ -+#: error.c:408 -+msgid "bad jump" -+msgstr "" -+ -+#: error.c:446 -+#, c-format -+msgid "%s: unbound variable" -+msgstr "" -+ -+#: eval.c:175 -+msgid "timed out waiting for input: auto-logout\n" -+msgstr "" -+ -+#: execute_cmd.c:466 -+#, c-format -+msgid "cannot redirect standard input from /dev/null: %s" -+msgstr "" -+ -+#: execute_cmd.c:1036 -+#, c-format -+msgid "TIMEFORMAT: `%c': invalid format character" -+msgstr "TIDSFORMAT: \"%c\": ogiltigt formattecken" -+ -+#: execute_cmd.c:3521 -+#, c-format -+msgid "%s: restricted: cannot specify `/' in command names" -+msgstr "" -+ -+#: execute_cmd.c:3609 -+#, c-format -+msgid "%s: command not found" -+msgstr "%s: kommando hittades inte" -+ -+#: execute_cmd.c:3839 -+#, c-format -+msgid "%s: %s: bad interpreter" -+msgstr "%s: %s: felaktig tolk" -+ -+#: execute_cmd.c:3876 -+#, c-format -+msgid "%s: cannot execute binary file" -+msgstr "%s: kan inte starta binärfil" -+ -+#: execute_cmd.c:3988 -+#, c-format -+msgid "cannot duplicate fd %d to fd %d" -+msgstr "" -+ -+#: expr.c:239 -+msgid "expression recursion level exceeded" -+msgstr "" -+ -+#: expr.c:263 -+msgid "recursion stack underflow" -+msgstr "" -+ -+#: expr.c:374 -+msgid "syntax error in expression" -+msgstr "syntaxfel i uttryck" -+ -+#: expr.c:414 -+msgid "attempted assignment to non-variable" -+msgstr "" -+ -+#: expr.c:435 -+#: expr.c:440 -+#: expr.c:750 -+msgid "division by 0" -+msgstr "delning med 0" -+ -+#: expr.c:466 -+msgid "bug: bad expassign token" -+msgstr "" -+ -+#: expr.c:508 -+msgid "`:' expected for conditional expression" -+msgstr "" -+ -+#: expr.c:775 -+msgid "exponent less than 0" -+msgstr "" -+ -+#: expr.c:819 -+msgid "identifier expected after pre-increment or pre-decrement" -+msgstr "" -+ -+#: expr.c:847 -+msgid "missing `)'" -+msgstr "saknar `)'" -+ -+#: expr.c:871 -+msgid "syntax error: operand expected" -+msgstr "" -+ -+#: expr.c:1146 -+msgid "invalid number" -+msgstr "ogiltigt nummer" -+ -+#: expr.c:1150 -+msgid "invalid arithmetic base" -+msgstr "" -+ -+#: expr.c:1170 -+msgid "value too great for base" -+msgstr "" -+ -+#: general.c:60 -+msgid "getcwd: cannot access parent directories" -+msgstr "" -+ -+#: input.c:231 -+#, c-format -+msgid "cannot allocate new file descriptor for bash input from fd %d" -+msgstr "" -+ -+#: input.c:239 -+#, c-format -+msgid "save_bash_input: buffer already exists for new fd %d" -+msgstr "" -+ -+#: jobs.c:693 -+#, c-format -+msgid "deleting stopped job %d with process group %ld" -+msgstr "" -+ -+#: jobs.c:1001 -+#, c-format -+msgid "describe_pid: %ld: no such pid" -+msgstr "" -+ -+#: jobs.c:1632 -+#: nojobs.c:648 -+#, c-format -+msgid "wait: pid %ld is not a child of this shell" -+msgstr "" -+ -+#: jobs.c:1815 -+#, c-format -+msgid "wait_for: No record of process %ld" -+msgstr "" -+ -+#: jobs.c:2062 -+#, c-format -+msgid "wait_for_job: job %d is stopped" -+msgstr "" -+ -+#: jobs.c:2284 -+#, c-format -+msgid "%s: job has terminated" -+msgstr "%s: jobb har avslutats" -+ -+#: jobs.c:2293 -+#, c-format -+msgid "%s: job %d already in background" -+msgstr "%s: jobb %d redan i bakgrund" -+ -+#: jobs.c:3037 -+msgid "no job control in this shell" -+msgstr "ingen jobbkontroll i detta skal" -+ -+#: lib/malloc/malloc.c:298 -+#, c-format -+msgid "malloc: failed assertion: %s\n" -+msgstr "" -+ -+#: lib/malloc/malloc.c:314 -+#, c-format -+msgid "" -+"\r\n" -+"malloc: %s:%d: assertion botched\r\n" -+msgstr "" -+ -+#: lib/malloc/malloc.c:740 -+msgid "malloc: block on free list clobbered" -+msgstr "" -+ -+#: lib/malloc/malloc.c:817 -+msgid "free: called with already freed block argument" -+msgstr "" -+ -+#: lib/malloc/malloc.c:820 -+msgid "free: called with unallocated block argument" -+msgstr "" -+ -+#: lib/malloc/malloc.c:839 -+msgid "free: underflow detected; mh_nbytes out of range" -+msgstr "" -+ -+#: lib/malloc/malloc.c:845 -+msgid "free: start and end chunk sizes differ" -+msgstr "" -+ -+#: lib/malloc/malloc.c:942 -+msgid "realloc: called with unallocated block argument" -+msgstr "" -+ -+#: lib/malloc/malloc.c:957 -+msgid "realloc: underflow detected; mh_nbytes out of range" -+msgstr "" -+ -+#: lib/malloc/malloc.c:963 -+msgid "realloc: start and end chunk sizes differ" -+msgstr "" -+ -+#: lib/malloc/table.c:175 -+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -+msgstr "" -+ -+#: lib/malloc/table.c:182 -+#, c-format -+msgid "register_alloc: %p already in table as allocated?\n" -+msgstr "" -+ -+#: lib/malloc/table.c:218 -+#, c-format -+msgid "register_free: %p already in table as free?\n" -+msgstr "" -+ -+#: lib/malloc/watch.c:46 -+msgid "allocated" -+msgstr "allokerat" -+ -+#: lib/malloc/watch.c:48 -+msgid "freed" -+msgstr "" -+ -+#: lib/malloc/watch.c:50 -+msgid "requesting resize" -+msgstr "" -+ -+#: lib/malloc/watch.c:52 -+msgid "just resized" -+msgstr "" -+ -+#: lib/malloc/watch.c:54 -+msgid "bug: unknown operation" -+msgstr "bugg: okänd operation" -+ -+#: lib/malloc/watch.c:56 -+#, c-format -+msgid "malloc: watch alert: %p %s " -+msgstr "" -+ -+#: lib/sh/fmtulong.c:101 -+msgid "invalid base" -+msgstr "" -+ -+#: lib/sh/netopen.c:158 -+#, c-format -+msgid "%s: host unknown" -+msgstr "%s: okänd värd" -+ -+#: lib/sh/netopen.c:165 -+#, c-format -+msgid "%s: invalid service" -+msgstr "%s: ogiltig tjänst" -+ -+#: lib/sh/netopen.c:296 -+#, c-format -+msgid "%s: bad network path specification" -+msgstr "" -+ -+#: lib/sh/netopen.c:336 -+msgid "network operations not supported" -+msgstr "" -+ -+#: mailcheck.c:382 -+msgid "You have mail in $_" -+msgstr "Du har post i $_" -+ -+#: mailcheck.c:407 -+msgid "You have new mail in $_" -+msgstr "Du har ny post i $_" -+ -+#: mailcheck.c:423 -+#, c-format -+msgid "The mail in %s has been read\n" -+msgstr "Posten i %s har lästs\n" -+ -+#: make_cmd.c:318 -+msgid "syntax error: arithmetic expression required" -+msgstr "" -+ -+#: make_cmd.c:320 -+msgid "syntax error: `;' unexpected" -+msgstr "syntaxfel: \";\" oväntad" -+ -+#: make_cmd.c:321 -+#, c-format -+msgid "syntax error: `((%s))'" -+msgstr "syntaxfel: \"((%s))\"" -+ -+#: make_cmd.c:560 -+#, c-format -+msgid "make_here_document: bad instruction type %d" -+msgstr "" -+ -+#: make_cmd.c:730 -+#, c-format -+msgid "make_redirection: redirection instruction `%d' out of range" -+msgstr "" -+ -+#: parse.y:2726 -+#, c-format -+msgid "unexpected EOF while looking for matching `%c'" -+msgstr "" -+ -+#: parse.y:3011 -+msgid "unexpected EOF while looking for `]]'" -+msgstr "" -+ -+#: parse.y:3016 -+#, c-format -+msgid "syntax error in conditional expression: unexpected token `%s'" -+msgstr "" -+ -+#: parse.y:3020 -+msgid "syntax error in conditional expression" -+msgstr "" -+ -+#: parse.y:3098 -+#, c-format -+msgid "unexpected token `%s', expected `)'" -+msgstr "" -+ -+#: parse.y:3102 -+msgid "expected `)'" -+msgstr "förväntade `)'" -+ -+#: parse.y:3130 -+#, c-format -+msgid "unexpected argument `%s' to conditional unary operator" -+msgstr "" -+ -+#: parse.y:3134 -+msgid "unexpected argument to conditional unary operator" -+msgstr "" -+ -+#: parse.y:3171 -+#, c-format -+msgid "unexpected token `%s', conditional binary operator expected" -+msgstr "" -+ -+#: parse.y:3175 -+msgid "conditional binary operator expected" -+msgstr "" -+ -+#: parse.y:3191 -+#, c-format -+msgid "unexpected argument `%s' to conditional binary operator" -+msgstr "" -+ -+#: parse.y:3195 -+msgid "unexpected argument to conditional binary operator" -+msgstr "" -+ -+#: parse.y:3206 -+#, c-format -+msgid "unexpected token `%c' in conditional command" -+msgstr "" -+ -+#: parse.y:3209 -+#, c-format -+msgid "unexpected token `%s' in conditional command" -+msgstr "" -+ -+#: parse.y:3213 -+#, c-format -+msgid "unexpected token %d in conditional command" -+msgstr "" -+ -+#: parse.y:4400 -+#, c-format -+msgid "syntax error near unexpected token `%s'" -+msgstr "" -+ -+#: parse.y:4418 -+#, fuzzy, c-format -+msgid "syntax error near `%s'" -+msgstr "Syntaxfel nära \"%1\"" -+ -+#: parse.y:4428 -+msgid "syntax error: unexpected end of file" -+msgstr "" -+ -+#: parse.y:4428 -+msgid "syntax error" -+msgstr "syntaxfel" -+ -+#: parse.y:4490 -+#, c-format -+msgid "Use \"%s\" to leave the shell.\n" -+msgstr "Använd \"%s\" för att lämna skalet.\n" -+ -+#: parse.y:4649 -+msgid "unexpected EOF while looking for matching `)'" -+msgstr "" -+ -+#: pcomplete.c:988 -+#, c-format -+msgid "completion: function `%s' not found" -+msgstr "" -+ -+#: pcomplib.c:179 -+#, c-format -+msgid "progcomp_insert: %s: NULL COMPSPEC" -+msgstr "" -+ -+#: print_cmd.c:260 -+#, c-format -+msgid "print_command: bad connector `%d'" -+msgstr "" -+ -+#: print_cmd.c:1172 -+#, c-format -+msgid "cprintf: `%c': invalid format character" -+msgstr "" -+ -+#: redir.c:99 -+msgid "file descriptor out of range" -+msgstr "" -+ -+#: redir.c:141 -+#, c-format -+msgid "%s: ambiguous redirect" -+msgstr "" -+ -+#: redir.c:145 -+#, c-format -+msgid "%s: cannot overwrite existing file" -+msgstr "" -+ -+#: redir.c:150 -+#, c-format -+msgid "%s: restricted: cannot redirect output" -+msgstr "" -+ -+#: redir.c:155 -+#, c-format -+msgid "cannot create temp file for here document: %s" -+msgstr "" -+ -+#: redir.c:509 -+msgid "/dev/(tcp|udp)/host/port not supported without networking" -+msgstr "/dev/(tcp|udp)/host/port stöds inte utan nätverk" -+ -+#: redir.c:949 -+msgid "redirection error: cannot duplicate fd" -+msgstr "" -+ -+#: shell.c:302 -+msgid "could not find /tmp, please create!" -+msgstr "kunde inte hitta /tmp, vänligen skapa den!" -+ -+#: shell.c:306 -+msgid "/tmp must be a valid directory name" -+msgstr "/tmp måste vara ett giltigt katalognamn" -+ -+#: shell.c:839 -+#, c-format -+msgid "%c%c: invalid option" -+msgstr "%c%c: ogiltig flagga" -+ -+#: shell.c:1590 -+msgid "I have no name!" -+msgstr "Jag har inget namn!" -+ -+#: shell.c:1725 -+#, 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%s [GNU lång flagga] [flagga] skriptfil ...\n" -+ -+#: shell.c:1727 -+msgid "GNU long options:\n" -+msgstr "GNU långa flaggor:\n" -+ -+#: shell.c:1731 -+msgid "Shell options:\n" -+msgstr "Skalflaggor:\n" -+ -+#: shell.c:1732 -+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" -+msgstr "\t-irsD eller -c kommando eller -O shopt_option\t\t(endast anrop)\n" -+ -+#: shell.c:1747 -+#, c-format -+msgid "\t-%s or -o option\n" -+msgstr "\t-%s eller -o flagga\n" -+ -+#: shell.c:1753 -+#, 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:1754 -+#, 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 skalets inbyggda kommandon.\n" -+ -+#: shell.c:1755 -+msgid "Use the `bashbug' command to report bugs.\n" -+msgstr "Använd kommandot \"bashbug\" för att rapportera buggar.\n" -+ -+#: sig.c:485 -+#, c-format -+msgid "sigprocmask: %d: invalid operation" -+msgstr "" -+ -+#: subst.c:1011 -+#, c-format -+msgid "bad substitution: no closing `%s' in %s" -+msgstr "" -+ -+#: subst.c:2020 -+#, c-format -+msgid "%s: cannot assign list to array member" -+msgstr "" -+ -+#: subst.c:3516 -+#: subst.c:3532 -+msgid "cannot make pipe for process substitution" -+msgstr "" -+ -+#: subst.c:3563 -+msgid "cannot make child for process substitution" -+msgstr "" -+ -+#: subst.c:3608 -+#, c-format -+msgid "cannot open named pipe %s for reading" -+msgstr "" -+ -+#: subst.c:3610 -+#, c-format -+msgid "cannot open named pipe %s for writing" -+msgstr "" -+ -+#: subst.c:3618 -+#, c-format -+msgid "cannout reset nodelay mode for fd %d" -+msgstr "" -+ -+#: subst.c:3628 -+#, c-format -+msgid "cannot duplicate named pipe %s as fd %d" -+msgstr "" -+ -+#: subst.c:3803 -+msgid "cannot make pipe for command substitution" -+msgstr "" -+ -+#: subst.c:3832 -+msgid "cannot make child for command substitution" -+msgstr "" -+ -+#: subst.c:3849 -+msgid "command_substitute: cannot duplicate pipe as fd 1" -+msgstr "" -+ -+#: subst.c:4284 -+#, fuzzy, c-format -+msgid "%s: parameter null or not set" -+msgstr "parameter är tom eller inte satt" -+ -+#: subst.c:4529 -+#, c-format -+msgid "%s: substring expression < 0" -+msgstr "" -+ -+#: subst.c:5209 -+#, c-format -+msgid "%s: bad substitution" -+msgstr "" -+ -+#: subst.c:5283 -+#, c-format -+msgid "$%s: cannot assign in this way" -+msgstr "" -+ -+#: subst.c:6652 -+#, c-format -+msgid "no match: %s" -+msgstr "ingen match: %s" -+ -+#: test.c:154 -+#, fuzzy -+msgid "argument expected" -+msgstr "(argument förväntades)" -+ -+#: test.c:163 -+#, c-format -+msgid "%s: integer expression expected" -+msgstr "" -+ -+#: test.c:361 -+#, fuzzy -+msgid "`)' expected" -+msgstr "\")\" förväntas\n" -+ -+#: test.c:363 -+#, fuzzy, c-format -+msgid "`)' expected, found %s" -+msgstr "\")\" förväntades, fann %s\n" -+ -+#: test.c:378 -+#: test.c:787 -+#: test.c:790 -+#, fuzzy, c-format -+msgid "%s: unary operator expected" -+msgstr "%s: unär operator förväntas\n" -+ -+#: test.c:543 -+#: test.c:830 -+#, fuzzy, c-format -+msgid "%s: binary operator expected" -+msgstr "%s: binär operator förväntas\n" -+ -+#: test.c:905 -+msgid "missing `]'" -+msgstr "saknar \"]\"" -+ -+#: trap.c:194 -+msgid "invalid signal number" -+msgstr "" -+ -+#: trap.c:309 -+#, c-format -+msgid "run_pending_traps: bad value in trap_list[%d]: %p" -+msgstr "" -+ -+#: trap.c:313 -+#, c-format -+msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" -+msgstr "" -+ -+#: trap.c:349 -+#, c-format -+msgid "trap_handler: bad signal %d" -+msgstr "" -+ -+#: variables.c:310 -+#, c-format -+msgid "error importing function definition for `%s'" -+msgstr "" -+ -+#: variables.c:670 -+#, c-format -+msgid "shell level (%d) too high, resetting to 1" -+msgstr "" -+ -+#: variables.c:1610 -+msgid "make_local_variable: no function context at current scope" -+msgstr "" -+ -+#: variables.c:2709 -+msgid "all_local_variables: no function context at current scope" -+msgstr "" -+ -+#: variables.c:2923 -+#: variables.c:2932 -+#, c-format -+msgid "invalid character %d in exportstr for %s" -+msgstr "" -+ -+#: variables.c:2938 -+#, c-format -+msgid "no `=' in exportstr for %s" -+msgstr "" -+ -+#: variables.c:3363 -+msgid "pop_var_context: head of shell_variables not a function context" -+msgstr "" -+ -+#: variables.c:3376 -+msgid "pop_var_context: no global_variables context" -+msgstr "" -+ -+#: variables.c:3442 -+msgid "pop_scope: head of shell_variables not a temporary environment scope" -+msgstr "" -+ -+#: version.c:82 -+msgid "Copyright (C) 2004 Free Software Foundation, Inc.\n" -+msgstr "Copyright (C) 2004 Free Software Foundation, Inc.\n" -+ -+#: xmalloc.c:93 -+#, c-format -+msgid "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)" -+msgstr "" -+ -+#: xmalloc.c:95 -+#, c-format -+msgid "xmalloc: cannot allocate %lu bytes" -+msgstr "" -+ -+#: xmalloc.c:115 -+#, c-format -+msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" -+msgstr "" -+ -+#: xmalloc.c:117 -+#, c-format -+msgid "xrealloc: cannot allocate %lu bytes" -+msgstr "" -+ -+#: xmalloc.c:151 -+#, c-format -+msgid "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" -+msgstr "" -+ -+#: xmalloc.c:153 -+#, c-format -+msgid "xmalloc: %s:%d: cannot allocate %lu bytes" -+msgstr "" -+ -+#: xmalloc.c:175 -+#, c-format -+msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" -+msgstr "" -+ -+#: xmalloc.c:177 -+#, c-format -+msgid "xrealloc: %s:%d: cannot allocate %lu bytes" -+msgstr "" -+ -+#: builtins.c:244 -+msgid "`alias' with no arguments or with the -p option prints the list" -+msgstr "" -+ -+#: builtins.c:245 -+msgid "of aliases in the form alias NAME=VALUE on standard output." -+msgstr "" -+ -+#: builtins.c:246 -+msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." -+msgstr "" -+ -+#: builtins.c:247 -+msgid "A trailing space in VALUE causes the next word to be checked for" -+msgstr "" -+ -+#: builtins.c:248 -+msgid "alias substitution when the alias is expanded. Alias returns" -+msgstr "" -+ -+#: builtins.c:249 -+msgid "true unless a NAME is given for which no alias has been defined." -+msgstr "" -+ -+#: builtins.c:257 -+msgid "Remove NAMEs from the list of defined aliases. If the -a option is given," -+msgstr "" -+ -+#: builtins.c:258 -+msgid "then remove all alias definitions." -+msgstr "" -+ -+#: builtins.c:266 -+msgid "Bind a key sequence to a Readline function or a macro, or set" -+msgstr "" -+ -+#: builtins.c:267 -+msgid "a Readline variable. The non-option argument syntax is equivalent" -+msgstr "" -+ -+#: builtins.c:268 -+msgid "to that found in ~/.inputrc, but must be passed as a single argument:" -+msgstr "" -+ -+#: builtins.c:269 -+msgid "bind '\"\\C-x\\C-r\": re-read-init-file'." -+msgstr "bind '\"\\C-x\\C-r\": re-read-init-file'." -+ -+#: builtins.c:270 -+msgid "bind accepts the following options:" -+msgstr "" -+ -+#: builtins.c:271 -+msgid " -m keymap Use `keymap' as the keymap for the duration of this" -+msgstr "" -+ -+#: builtins.c:272 -+msgid " command. Acceptable keymap names are emacs," -+msgstr "" -+ -+#: builtins.c:273 -+msgid " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," -+msgstr "" -+ -+#: builtins.c:274 -+msgid " vi-command, and vi-insert." -+msgstr "" -+ -+#: builtins.c:275 -+msgid " -l List names of functions." -+msgstr " -l Lista namn på funktioner." -+ -+#: builtins.c:276 -+msgid " -P List function names and bindings." -+msgstr "" -+ -+#: builtins.c:277 -+msgid " -p List functions and bindings in a form that can be" -+msgstr "" -+ -+#: builtins.c:278 -+msgid " reused as input." -+msgstr "" -+ -+#: builtins.c:279 -+msgid " -r keyseq Remove the binding for KEYSEQ." -+msgstr "" -+ -+#: builtins.c:280 -+msgid " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when" -+msgstr "" -+ -+#: builtins.c:281 -+msgid "\t\t\t\tKEYSEQ is entered." -+msgstr "" -+ -+#: builtins.c:282 -+msgid " -f filename Read key bindings from FILENAME." -+msgstr "" -+ -+#: builtins.c:283 -+msgid " -q function-name Query about which keys invoke the named function." -+msgstr "" -+ -+#: builtins.c:284 -+msgid " -u function-name Unbind all keys which are bound to the named function." -+msgstr "" -+ -+#: builtins.c:285 -+msgid " -V List variable names and values" -+msgstr "" -+ -+#: builtins.c:286 -+msgid " -v List variable names and values in a form that can" -+msgstr "" -+ -+#: builtins.c:287 -+msgid " be reused as input." -+msgstr "" -+ -+#: builtins.c:288 -+msgid " -S List key sequences that invoke macros and their values" -+msgstr "" -+ -+#: builtins.c:289 -+msgid " -s List key sequences that invoke macros and their values" -+msgstr "" -+ -+#: builtins.c:290 -+msgid " in a form that can be reused as input." -+msgstr "" -+ -+#: builtins.c:297 -+msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," -+msgstr "" -+ -+#: builtins.c:298 -+msgid "break N levels." -+msgstr "" -+ -+#: builtins.c:304 -+msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." -+msgstr "" -+ -+#: builtins.c:305 -+msgid "If N is specified, resume at the N-th enclosing loop." -+msgstr "" -+ -+#: builtins.c:311 -+msgid "Run a shell builtin. This is useful when you wish to rename a" -+msgstr "" -+ -+#: builtins.c:312 -+msgid "shell builtin to be a function, but need the functionality of the" -+msgstr "" -+ -+#: builtins.c:313 -+msgid "builtin within the function itself." -+msgstr "" -+ -+#: builtins.c:334 -+msgid "Change the current directory to DIR. The variable $HOME is the" -+msgstr "" -+ -+#: builtins.c:335 -+msgid "default DIR. The variable CDPATH defines the search path for" -+msgstr "" -+ -+#: builtins.c:336 -+msgid "the directory containing DIR. Alternative directory names in CDPATH" -+msgstr "" -+ -+#: builtins.c:337 -+msgid "are separated by a colon (:). A null directory name is the same as" -+msgstr "" -+ -+#: builtins.c:338 -+msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," -+msgstr "" -+ -+#: builtins.c:339 -+msgid "then CDPATH is not used. If the directory is not found, and the" -+msgstr "" -+ -+#: builtins.c:340 -+msgid "shell option `cdable_vars' is set, then try the word as a variable" -+msgstr "" -+ -+#: builtins.c:341 -+msgid "name. If that variable has a value, then cd to the value of that" -+msgstr "" -+ -+#: builtins.c:342 -+msgid "variable. The -P option says to use the physical directory structure" -+msgstr "" -+ -+#: builtins.c:343 -+msgid "instead of following symbolic links; the -L option forces symbolic links" -+msgstr "" -+ -+#: builtins.c:344 -+msgid "to be followed." -+msgstr "" -+ -+#: builtins.c:350 -+msgid "Print the current working directory. With the -P option, pwd prints" -+msgstr "" -+ -+#: builtins.c:351 -+msgid "the physical directory, without any symbolic links; the -L option" -+msgstr "" -+ -+#: builtins.c:352 -+msgid "makes pwd follow symbolic links." -+msgstr "" -+ -+#: builtins.c:358 -+msgid "No effect; the command does nothing. A zero exit code is returned." -+msgstr "" -+ -+#: builtins.c:364 -+msgid "Return a successful result." -+msgstr "" -+ -+#: builtins.c:370 -+msgid "Return an unsuccessful result." -+msgstr "" -+ -+#: builtins.c:376 -+msgid "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" -+msgstr "" -+ -+#: builtins.c:377 -+msgid "function called `ls', and you wish to call the command `ls', you can" -+msgstr "" -+ -+#: builtins.c:378 -+msgid "say \"command ls\". If the -p option is given, a default value is used" -+msgstr "" -+ -+#: builtins.c:379 -+msgid "for PATH that is guaranteed to find all of the standard utilities. If" -+msgstr "" -+ -+#: builtins.c:380 -+msgid "the -V or -v option is given, a string is printed describing COMMAND." -+msgstr "" -+ -+#: builtins.c:381 -+msgid "The -V option produces a more verbose description." -+msgstr "" -+ -+#: builtins.c:387 -+msgid "Declare variables and/or give them attributes. If no NAMEs are" -+msgstr "" -+ -+#: builtins.c:388 -+msgid "given, then display the values of variables instead. The -p option" -+msgstr "" -+ -+#: builtins.c:389 -+msgid "will display the attributes and values of each NAME." -+msgstr "" -+ -+#: builtins.c:391 -+msgid "The flags are:" -+msgstr "Flaggorna är:" -+ -+#: builtins.c:393 -+msgid " -a\tto make NAMEs arrays (if supported)" -+msgstr "" -+ -+#: builtins.c:394 -+msgid " -f\tto select from among function names only" -+msgstr "" -+ -+#: builtins.c:395 -+msgid " -F\tto display function names (and line number and source file name if" -+msgstr "" -+ -+#: builtins.c:396 -+msgid "\tdebugging) without definitions" -+msgstr "" -+ -+#: builtins.c:397 -+msgid " -i\tto make NAMEs have the `integer' attribute" -+msgstr "" -+ -+#: builtins.c:398 -+msgid " -r\tto make NAMEs readonly" -+msgstr "" -+ -+#: builtins.c:399 -+msgid " -t\tto make NAMEs have the `trace' attribute" -+msgstr "" -+ -+#: builtins.c:400 -+msgid " -x\tto make NAMEs export" -+msgstr "" -+ -+#: builtins.c:402 -+msgid "Variables with the integer attribute have arithmetic evaluation (see" -+msgstr "" -+ -+#: builtins.c:403 -+msgid "`let') done when the variable is assigned to." -+msgstr "" -+ -+#: builtins.c:405 -+msgid "When displaying values of variables, -f displays a function's name" -+msgstr "" -+ -+#: builtins.c:406 -+msgid "and definition. The -F option restricts the display to function" -+msgstr "" -+ -+#: builtins.c:407 -+#, fuzzy -+msgid "name only." -+msgstr "En&dast namn" -+ -+#: builtins.c:409 -+msgid "Using `+' instead of `-' turns off the given attribute instead. When" -+msgstr "" -+ -+#: builtins.c:410 -+msgid "used in a function, makes NAMEs local, as with the `local' command." -+msgstr "" -+ -+#: builtins.c:416 -+msgid "Obsolete. See `declare'." -+msgstr "Föråldrad. Se \"declare\"." -+ -+#: builtins.c:422 -+msgid "Create a local variable called NAME, and give it VALUE. LOCAL" -+msgstr "" -+ -+#: builtins.c:423 -+msgid "can only be used within a function; it makes the variable NAME" -+msgstr "" -+ -+#: builtins.c:424 -+msgid "have a visible scope restricted to that function and its children." -+msgstr "" -+ -+#: builtins.c:431 -+msgid "Output the ARGs. If -n is specified, the trailing newline is" -+msgstr "" -+ -+#: builtins.c:432 -+msgid "suppressed. If the -e option is given, interpretation of the" -+msgstr "" -+ -+#: builtins.c:433 -+msgid "following backslash-escaped characters is turned on:" -+msgstr "" -+ -+#: builtins.c:434 -+msgid "\t\\a\talert (bell)" -+msgstr "" -+ -+#: builtins.c:435 -+msgid "\t\\b\tbackspace" -+msgstr "" -+ -+#: builtins.c:436 -+msgid "\t\\c\tsuppress trailing newline" -+msgstr "" -+ -+#: builtins.c:437 -+msgid "\t\\E\tescape character" -+msgstr "" -+ -+#: builtins.c:438 -+msgid "\t\\f\tform feed" -+msgstr "" -+ -+#: builtins.c:439 -+msgid "" -+"\t\\n" -+"\tnew line" -+msgstr "" -+ -+#: builtins.c:440 -+msgid "\t\\r\tcarriage return" -+msgstr "" -+ -+#: builtins.c:441 -+msgid "\t\\t\thorizontal tab" -+msgstr "" -+ -+#: builtins.c:442 -+msgid "\t\\v\tvertical tab" -+msgstr "" -+ -+#: builtins.c:443 -+msgid "\t\\\\\tbackslash" -+msgstr "" -+ -+#: builtins.c:444 -+msgid "" -+"\t\\n" -+"um\tthe character whose ASCII code is NUM (octal)." -+msgstr "" -+ -+#: builtins.c:446 -+msgid "You can explicitly turn off the interpretation of the above characters" -+msgstr "" -+ -+#: builtins.c:447 -+msgid "with the -E option." -+msgstr "" -+ -+#: builtins.c:455 -+msgid "Output the ARGs. If -n is specified, the trailing newline is suppressed." -+msgstr "" -+ -+#: builtins.c:462 -+msgid "Enable and disable builtin shell commands. This allows" -+msgstr "" -+ -+#: builtins.c:463 -+msgid "you to use a disk command which has the same name as a shell" -+msgstr "" -+ -+#: builtins.c:464 -+msgid "builtin without specifying a full pathname. If -n is used, the" -+msgstr "" -+ -+#: builtins.c:465 -+msgid "NAMEs become disabled; otherwise NAMEs are enabled. For example," -+msgstr "" -+ -+#: builtins.c:466 -+msgid "to use the `test' found in $PATH instead of the shell builtin" -+msgstr "" -+ -+#: builtins.c:467 -+msgid "version, type `enable -n test'. On systems supporting dynamic" -+msgstr "" -+ -+#: builtins.c:468 -+msgid "loading, the -f option may be used to load new builtins from the" -+msgstr "" -+ -+#: builtins.c:469 -+msgid "shared object FILENAME. The -d option will delete a builtin" -+msgstr "" -+ -+#: builtins.c:470 -+msgid "previously loaded with -f. If no non-option names are given, or" -+msgstr "" -+ -+#: builtins.c:471 -+msgid "the -p option is supplied, a list of builtins is printed. The" -+msgstr "" -+ -+#: builtins.c:472 -+msgid "-a option means to print every builtin with an indication of whether" -+msgstr "" -+ -+#: builtins.c:473 -+msgid "or not it is enabled. The -s option restricts the output to the POSIX.2" -+msgstr "" -+ -+#: builtins.c:474 -+msgid "`special' builtins. The -n option displays a list of all disabled builtins." -+msgstr "" -+ -+#: builtins.c:480 -+msgid "Read ARGs as input to the shell and execute the resulting command(s)." -+msgstr "" -+ -+#: builtins.c:486 -+msgid "Getopts is used by shell procedures to parse positional parameters." -+msgstr "" -+ -+#: builtins.c:488 -+msgid "OPTSTRING contains the option letters to be recognized; if a letter" -+msgstr "" -+ -+#: builtins.c:489 -+msgid "is followed by a colon, the option is expected to have an argument," -+msgstr "" -+ -+#: builtins.c:490 -+msgid "which should be separated from it by white space." -+msgstr "" -+ -+#: builtins.c:492 -+msgid "Each time it is invoked, getopts will place the next option in the" -+msgstr "" -+ -+#: builtins.c:493 -+msgid "shell variable $name, initializing name if it does not exist, and" -+msgstr "" -+ -+#: builtins.c:494 -+msgid "the index of the next argument to be processed into the shell" -+msgstr "" -+ -+#: builtins.c:495 -+msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" -+msgstr "" -+ -+#: builtins.c:496 -+msgid "a shell script is invoked. When an option requires an argument," -+msgstr "" -+ -+#: builtins.c:497 -+msgid "getopts places that argument into the shell variable OPTARG." -+msgstr "" -+ -+#: builtins.c:499 -+msgid "getopts reports errors in one of two ways. If the first character" -+msgstr "" -+ -+#: builtins.c:500 -+msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" -+msgstr "" -+ -+#: builtins.c:501 -+msgid "this mode, no error messages are printed. If an invalid option is" -+msgstr "" -+ -+#: builtins.c:502 -+msgid "seen, getopts places the option character found into OPTARG. If a" -+msgstr "" -+ -+#: builtins.c:503 -+msgid "required argument is not found, getopts places a ':' into NAME and" -+msgstr "" -+ -+#: builtins.c:504 -+msgid "sets OPTARG to the option character found. If getopts is not in" -+msgstr "" -+ -+#: builtins.c:505 -+msgid "silent mode, and an invalid option is seen, getopts places '?' into" -+msgstr "" -+ -+#: builtins.c:506 -+msgid "NAME and unsets OPTARG. If a required argument is not found, a '?'" -+msgstr "" -+ -+#: builtins.c:507 -+msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" -+msgstr "" -+ -+#: builtins.c:508 -+#, fuzzy -+msgid "printed." -+msgstr "Utskrivet" -+ -+#: builtins.c:510 -+msgid "If the shell variable OPTERR has the value 0, getopts disables the" -+msgstr "" -+ -+#: builtins.c:511 -+msgid "printing of error messages, even if the first character of" -+msgstr "" -+ -+#: builtins.c:512 -+msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." -+msgstr "" -+ -+#: builtins.c:514 -+msgid "Getopts normally parses the positional parameters ($0 - $9), but if" -+msgstr "" -+ -+#: builtins.c:515 -+msgid "more arguments are given, they are parsed instead." -+msgstr "" -+ -+#: builtins.c:521 -+msgid "Exec FILE, replacing this shell with the specified program." -+msgstr "" -+ -+#: builtins.c:522 -+msgid "If FILE is not specified, the redirections take effect in this" -+msgstr "" -+ -+#: builtins.c:523 -+msgid "shell. If the first argument is `-l', then place a dash in the" -+msgstr "" -+ -+#: builtins.c:524 -+msgid "zeroth arg passed to FILE, as login does. If the `-c' option" -+msgstr "" -+ -+#: builtins.c:525 -+msgid "is supplied, FILE is executed with a null environment. The `-a'" -+msgstr "" -+ -+#: builtins.c:526 -+msgid "option means to make set argv[0] of the executed process to NAME." -+msgstr "" -+ -+#: builtins.c:527 -+msgid "If the file cannot be executed and the shell is not interactive," -+msgstr "" -+ -+#: builtins.c:528 -+msgid "then the shell exits, unless the shell option `execfail' is set." -+msgstr "" -+ -+#: builtins.c:534 -+msgid "Exit the shell with a status of N. If N is omitted, the exit status" -+msgstr "" -+ -+#: builtins.c:535 -+msgid "is that of the last command executed." -+msgstr "" -+ -+#: builtins.c:541 -+msgid "Logout of a login shell." -+msgstr "" -+ -+#: builtins.c:548 -+msgid "fc is used to list or edit and re-execute commands from the history list." -+msgstr "" -+ -+#: builtins.c:549 -+msgid "FIRST and LAST can be numbers specifying the range, or FIRST can be a" -+msgstr "" -+ -+#: builtins.c:550 -+msgid "string, which means the most recent command beginning with that" -+msgstr "" -+ -+#: builtins.c:551 -+#, fuzzy -+msgid "string." -+msgstr "STRÄNG" -+ -+#: builtins.c:553 -+msgid " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," -+msgstr "" -+ -+#: builtins.c:554 -+msgid " then vi." -+msgstr "" -+ -+#: builtins.c:556 -+msgid " -l means list lines instead of editing." -+msgstr "" -+ -+#: builtins.c:557 -+msgid " -n means no line numbers listed." -+msgstr "" -+ -+#: builtins.c:558 -+msgid " -r means reverse the order of the lines (making it newest listed first)." -+msgstr "" -+ -+#: builtins.c:560 -+msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" -+msgstr "" -+ -+#: builtins.c:561 -+msgid "re-executed after the substitution OLD=NEW is performed." -+msgstr "" -+ -+#: builtins.c:563 -+msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" -+msgstr "" -+ -+#: builtins.c:564 -+msgid "runs the last command beginning with `cc' and typing `r' re-executes" -+msgstr "" -+ -+#: builtins.c:565 -+msgid "the last command." -+msgstr "" -+ -+#: builtins.c:573 -+msgid "Place JOB_SPEC in the foreground, and make it the current job. If" -+msgstr "" -+ -+#: builtins.c:574 -+msgid "JOB_SPEC is not present, the shell's notion of the current job is" -+msgstr "" -+ -+#: builtins.c:575 -+#, fuzzy -+msgid "used." -+msgstr "Anv_änt" -+ -+#: builtins.c:583 -+msgid "Place JOB_SPEC in the background, as if it had been started with" -+msgstr "" -+ -+#: builtins.c:584 -+msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" -+msgstr "" -+ -+#: builtins.c:585 -+msgid "job is used." -+msgstr "" -+ -+#: builtins.c:592 -+msgid "For each NAME, the full pathname of the command is determined and" -+msgstr "" -+ -+#: builtins.c:593 -+msgid "remembered. If the -p option is supplied, PATHNAME is used as the" -+msgstr "" -+ -+#: builtins.c:594 -+msgid "full pathname of NAME, and no path search is performed. The -r" -+msgstr "" -+ -+#: builtins.c:595 -+msgid "option causes the shell to forget all remembered locations. The -d" -+msgstr "" -+ -+#: builtins.c:596 -+msgid "option causes the shell to forget the remembered location of each NAME." -+msgstr "" -+ -+#: builtins.c:597 -+msgid "If the -t option is supplied the full pathname to which each NAME" -+msgstr "" -+ -+#: builtins.c:598 -+msgid "corresponds is printed. If multiple NAME arguments are supplied with" -+msgstr "" -+ -+#: builtins.c:599 -+msgid "-t, the NAME is printed before the hashed full pathname. The -l option" -+msgstr "" -+ -+#: builtins.c:600 -+msgid "causes output to be displayed in a format that may be reused as input." -+msgstr "" -+ -+#: builtins.c:601 -+msgid "If no arguments are given, information about remembered commands is displayed." -+msgstr "" -+ -+#: builtins.c:608 -+msgid "Display helpful information about builtin commands. If PATTERN is" -+msgstr "" -+ -+#: builtins.c:609 -+msgid "specified, gives detailed help on all commands matching PATTERN," -+msgstr "" -+ -+#: builtins.c:610 -+msgid "otherwise a list of the builtins is printed. The -s option" -+msgstr "" -+ -+#: builtins.c:611 -+msgid "restricts the output for each builtin command matching PATTERN to" -+msgstr "" -+ -+#: builtins.c:612 -+msgid "a short usage synopsis." -+msgstr "" -+ -+#: builtins.c:620 -+msgid "Display the history list with line numbers. Lines listed with" -+msgstr "" -+ -+#: builtins.c:621 -+msgid "with a `*' have been modified. Argument of N says to list only" -+msgstr "" -+ -+#: builtins.c:622 -+msgid "the last N lines. The `-c' option causes the history list to be" -+msgstr "" -+ -+#: builtins.c:623 -+msgid "cleared by deleting all of the entries. The `-d' option deletes" -+msgstr "" -+ -+#: builtins.c:624 -+msgid "the history entry at offset OFFSET. The `-w' option writes out the" -+msgstr "" -+ -+#: builtins.c:625 -+msgid "current history to the history file; `-r' means to read the file and" -+msgstr "" -+ -+#: builtins.c:626 -+msgid "append the contents to the history list instead. `-a' means" -+msgstr "" -+ -+#: builtins.c:627 -+msgid "to append history lines from this session to the history file." -+msgstr "" -+ -+#: builtins.c:628 -+msgid "Argument `-n' means to read all history lines not already read" -+msgstr "" -+ -+#: builtins.c:629 -+msgid "from the history file and append them to the history list." -+msgstr "" -+ -+#: builtins.c:631 -+msgid "If FILENAME is given, then that is used as the history file else" -+msgstr "" -+ -+#: builtins.c:632 -+msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." -+msgstr "" -+ -+#: builtins.c:633 -+msgid "If the -s option is supplied, the non-option ARGs are appended to" -+msgstr "" -+ -+#: builtins.c:634 -+msgid "the history list as a single entry. The -p option means to perform" -+msgstr "" -+ -+#: builtins.c:635 -+msgid "history expansion on each ARG and display the result, without storing" -+msgstr "" -+ -+#: builtins.c:636 -+msgid "anything in the history list." -+msgstr "" -+ -+#: builtins.c:638 -+msgid "If the $HISTTIMEFORMAT variable is set and not null, its value is used" -+msgstr "" -+ -+#: builtins.c:639 -+msgid "as a format string for strftime(3) to print the time stamp associated" -+msgstr "" -+ -+#: builtins.c:640 -+msgid "with each displayed history entry. No time stamps are printed otherwise." -+msgstr "" -+ -+#: builtins.c:648 -+msgid "Lists the active jobs. The -l option lists process id's in addition" -+msgstr "" -+ -+#: builtins.c:649 -+msgid "to the normal information; the -p option lists process id's only." -+msgstr "" -+ -+#: builtins.c:650 -+msgid "If -n is given, only processes that have changed status since the last" -+msgstr "" -+ -+#: builtins.c:651 -+msgid "notification are printed. JOBSPEC restricts output to that job. The" -+msgstr "" -+ -+#: builtins.c:652 -+msgid "-r and -s options restrict output to running and stopped jobs only," -+msgstr "" -+ -+#: builtins.c:653 -+msgid "respectively. Without options, the status of all active jobs is" -+msgstr "" -+ -+#: builtins.c:654 -+msgid "printed. If -x is given, COMMAND is run after all job specifications" -+msgstr "" -+ -+#: builtins.c:655 -+msgid "that appear in ARGS have been replaced with the process ID of that job's" -+msgstr "" -+ -+#: builtins.c:656 -+msgid "process group leader." -+msgstr "" -+ -+#: builtins.c:664 -+msgid "By default, removes each JOBSPEC argument from the table of active jobs." -+msgstr "" -+ -+#: builtins.c:665 -+msgid "If the -h option is given, the job is not removed from the table, but is" -+msgstr "" -+ -+#: builtins.c:666 -+msgid "marked so that SIGHUP is not sent to the job if the shell receives a" -+msgstr "" -+ -+#: builtins.c:667 -+msgid "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all" -+msgstr "" -+ -+#: builtins.c:668 -+msgid "jobs from the job table; the -r option means to remove only running jobs." -+msgstr "" -+ -+#: builtins.c:675 -+msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" -+msgstr "" -+ -+#: builtins.c:676 -+msgid "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" -+msgstr "" -+ -+#: builtins.c:677 -+msgid "lists the signal names; if arguments follow `-l' they are assumed to" -+msgstr "" -+ -+#: builtins.c:678 -+msgid "be signal numbers for which names should be listed. Kill is a shell" -+msgstr "" -+ -+#: builtins.c:679 -+msgid "builtin for two reasons: it allows job IDs to be used instead of" -+msgstr "" -+ -+#: builtins.c:680 -+msgid "process IDs, and, if you have reached the limit on processes that" -+msgstr "" -+ -+#: builtins.c:681 -+msgid "you can create, you don't have to start a process to kill another one." -+msgstr "" -+ -+#: builtins.c:687 -+msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" -+msgstr "" -+ -+#: builtins.c:688 -+msgid "is done in fixed-width integers with no check for overflow, though" -+msgstr "" -+ -+#: builtins.c:689 -+msgid "division by 0 is trapped and flagged as an error. The following" -+msgstr "" -+ -+#: builtins.c:690 -+msgid "list of operators is grouped into levels of equal-precedence operators." -+msgstr "" -+ -+#: builtins.c:691 -+msgid "The levels are listed in order of decreasing precedence." -+msgstr "" -+ -+#: builtins.c:693 -+msgid "\tid++, id--\tvariable post-increment, post-decrement" -+msgstr "" -+ -+#: builtins.c:694 -+msgid "\t++id, --id\tvariable pre-increment, pre-decrement" -+msgstr "" -+ -+#: builtins.c:695 -+msgid "\t-, +\t\tunary minus, plus" -+msgstr "" -+ -+#: builtins.c:696 -+msgid "\t!, ~\t\tlogical and bitwise negation" -+msgstr "" -+ -+#: builtins.c:697 -+msgid "\t**\t\texponentiation" -+msgstr "" -+ -+#: builtins.c:698 -+msgid "\t*, /, %\t\tmultiplication, division, remainder" -+msgstr "" -+ -+#: builtins.c:699 -+msgid "\t+, -\t\taddition, subtraction" -+msgstr "" -+ -+#: builtins.c:700 -+msgid "\t<<, >>\t\tleft and right bitwise shifts" -+msgstr "" -+ -+#: builtins.c:701 -+msgid "\t<=, >=, <, >\tcomparison" -+msgstr "" -+ -+#: builtins.c:702 -+msgid "\t==, !=\t\tequality, inequality" -+msgstr "" -+ -+#: builtins.c:703 -+msgid "\t&\t\tbitwise AND" -+msgstr "" -+ -+#: builtins.c:704 -+msgid "\t^\t\tbitwise XOR" -+msgstr "" -+ -+#: builtins.c:705 -+msgid "\t|\t\tbitwise OR" -+msgstr "" -+ -+#: builtins.c:706 -+msgid "\t&&\t\tlogical AND" -+msgstr "" -+ -+#: builtins.c:707 -+msgid "\t||\t\tlogical OR" -+msgstr "" -+ -+#: builtins.c:708 -+msgid "\texpr ? expr : expr" -+msgstr "" -+ -+#: builtins.c:709 -+msgid "\t\t\tconditional operator" -+msgstr "" -+ -+#: builtins.c:710 -+msgid "\t=, *=, /=, %=," -+msgstr "\t=, *=, /=, %=," -+ -+#: builtins.c:711 -+msgid "\t+=, -=, <<=, >>=," -+msgstr "\t+=, -=, <<=, >>=," -+ -+#: builtins.c:712 -+msgid "\t&=, ^=, |=\tassignment" -+msgstr "" -+ -+#: builtins.c:714 -+msgid "Shell variables are allowed as operands. The name of the variable" -+msgstr "" -+ -+#: builtins.c:715 -+msgid "is replaced by its value (coerced to a fixed-width integer) within" -+msgstr "" -+ -+#: builtins.c:716 -+msgid "an expression. The variable need not have its integer attribute" -+msgstr "" -+ -+#: builtins.c:717 -+msgid "turned on to be used in an expression." -+msgstr "" -+ -+#: builtins.c:719 -+msgid "Operators are evaluated in order of precedence. Sub-expressions in" -+msgstr "" -+ -+#: builtins.c:720 -+msgid "parentheses are evaluated first and may override the precedence" -+msgstr "" -+ -+#: builtins.c:721 -+msgid "rules above." -+msgstr "" -+ -+#: builtins.c:723 -+msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" -+msgstr "" -+ -+#: builtins.c:724 -+msgid "otherwise." -+msgstr "" -+ -+#: builtins.c:730 -+msgid "One line is read from the standard input, or from file descriptor FD if the" -+msgstr "" -+ -+#: builtins.c:731 -+msgid "-u option is supplied, and the first word is assigned to the first NAME," -+msgstr "" -+ -+#: builtins.c:732 -+msgid "the second word to the second NAME, and so on, with leftover words assigned" -+msgstr "" -+ -+#: builtins.c:733 -+msgid "to the last NAME. Only the characters found in $IFS are recognized as word" -+msgstr "" -+ -+#: builtins.c:734 -+msgid "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY" -+msgstr "" -+ -+#: builtins.c:735 -+msgid "variable. If the -r option is given, this signifies `raw' input, and" -+msgstr "" -+ -+#: builtins.c:736 -+msgid "backslash escaping is disabled. The -d option causes read to continue" -+msgstr "" -+ -+#: builtins.c:737 -+msgid "until the first character of DELIM is read, rather than newline. If the -p" -+msgstr "" -+ -+#: builtins.c:738 -+msgid "option is supplied, the string PROMPT is output without a trailing newline" -+msgstr "" -+ -+#: builtins.c:739 -+msgid "before attempting to read. If -a is supplied, the words read are assigned" -+msgstr "" -+ -+#: builtins.c:740 -+msgid "to sequential indices of ARRAY, starting at zero. If -e is supplied and" -+msgstr "" -+ -+#: builtins.c:741 -+msgid "the shell is interactive, readline is used to obtain the line. If -n is" -+msgstr "" -+ -+#: builtins.c:742 -+msgid "supplied with a non-zero NCHARS argument, read returns after NCHARS" -+msgstr "" -+ -+#: builtins.c:743 -+msgid "characters have been read. The -s option causes input coming from a" -+msgstr "" -+ -+#: builtins.c:744 -+msgid "terminal to not be echoed." -+msgstr "" -+ -+#: builtins.c:746 -+msgid "The -t option causes read to time out and return failure if a complete line" -+msgstr "" -+ -+#: builtins.c:747 -+msgid "of input is not read within TIMEOUT seconds. If the TMOUT variable is set," -+msgstr "" -+ -+#: builtins.c:748 -+msgid "its value is the default timeout. The return code is zero, unless end-of-file" -+msgstr "" -+ -+#: builtins.c:749 -+msgid "is encountered, read times out, or an invalid file descriptor is supplied as" -+msgstr "" -+ -+#: builtins.c:750 -+msgid "the argument to -u." -+msgstr "" -+ -+#: builtins.c:756 -+msgid "Causes a function to exit with the return value specified by N. If N" -+msgstr "" -+ -+#: builtins.c:757 -+msgid "is omitted, the return status is that of the last command." -+msgstr "" -+ -+#: builtins.c:763 -+msgid " -a Mark variables which are modified or created for export." -+msgstr "" -+ -+#: builtins.c:764 -+msgid " -b Notify of job termination immediately." -+msgstr "" -+ -+#: builtins.c:765 -+msgid " -e Exit immediately if a command exits with a non-zero status." -+msgstr "" -+ -+#: builtins.c:766 -+msgid " -f Disable file name generation (globbing)." -+msgstr "" -+ -+#: builtins.c:767 -+msgid " -h Remember the location of commands as they are looked up." -+msgstr "" -+ -+#: builtins.c:768 -+msgid " -k All assignment arguments are placed in the environment for a" -+msgstr "" -+ -+#: builtins.c:769 -+msgid " command, not just those that precede the command name." -+msgstr "" -+ -+#: builtins.c:770 -+msgid " -m Job control is enabled." -+msgstr "" -+ -+#: builtins.c:771 -+msgid " -n Read commands but do not execute them." -+msgstr "" -+ -+#: builtins.c:772 -+#, fuzzy -+msgid " -o option-name" -+msgstr "Inställningsnamn" -+ -+#: builtins.c:773 -+msgid " Set the variable corresponding to option-name:" -+msgstr "" -+ -+#: builtins.c:774 -+msgid " allexport same as -a" -+msgstr " allexport samma som -a" -+ -+#: builtins.c:775 -+msgid " braceexpand same as -B" -+msgstr " braceexpand samma som -B" -+ -+#: builtins.c:777 -+msgid " emacs use an emacs-style line editing interface" -+msgstr "" -+ -+#: builtins.c:779 -+msgid " errexit same as -e" -+msgstr " errexit samma som -e" -+ -+#: builtins.c:780 -+msgid " errtrace same as -E" -+msgstr " errtrace samma som -E" -+ -+#: builtins.c:781 -+msgid " functrace same as -T" -+msgstr " functrace samma som -T" -+ -+#: builtins.c:782 -+msgid " hashall same as -h" -+msgstr " hashall samma som -h" -+ -+#: builtins.c:784 -+msgid " histexpand same as -H" -+msgstr " histexpand samma som -H" -+ -+#: builtins.c:787 -+msgid " history enable command history" -+msgstr "" -+ -+#: builtins.c:789 -+msgid " ignoreeof the shell will not exit upon reading EOF" -+msgstr "" -+ -+#: builtins.c:790 -+msgid " interactive-comments" -+msgstr "" -+ -+#: builtins.c:791 -+msgid " allow comments to appear in interactive commands" -+msgstr "" -+ -+#: builtins.c:792 -+msgid " keyword same as -k" -+msgstr " keyword samma som -k" -+ -+#: builtins.c:793 -+msgid " monitor same as -m" -+msgstr " monitor samma som -m" -+ -+#: builtins.c:794 -+msgid " noclobber same as -C" -+msgstr " noclobber samma som -C" -+ -+#: builtins.c:795 -+msgid " noexec same as -n" -+msgstr " noexec samma som -n" -+ -+#: builtins.c:796 -+msgid " noglob same as -f" -+msgstr " noglob samma som -f" -+ -+#: builtins.c:797 -+msgid " nolog currently accepted but ignored" -+msgstr "" -+ -+#: builtins.c:798 -+msgid " notify same as -b" -+msgstr " notify samma som -b" -+ -+#: builtins.c:799 -+msgid " nounset same as -u" -+msgstr " nounset samma som -u" -+ -+#: builtins.c:800 -+msgid " onecmd same as -t" -+msgstr " onecmd samma som -t" -+ -+#: builtins.c:801 -+msgid " physical same as -P" -+msgstr " physical samma som -P" -+ -+#: builtins.c:802 -+msgid " pipefail the return value of a pipeline is the status of" -+msgstr "" -+ -+#: builtins.c:803 -+msgid " the last command to exit with a non-zero status," -+msgstr "" -+ -+#: builtins.c:804 -+msgid " or zero if no command exited with a non-zero status" -+msgstr "" -+ -+#: builtins.c:805 -+msgid " posix change the behavior of bash where the default" -+msgstr "" -+ -+#: builtins.c:806 -+msgid " operation differs from the 1003.2 standard to" -+msgstr "" -+ -+#: builtins.c:807 -+msgid " match the standard" -+msgstr "" -+ -+#: builtins.c:808 -+msgid " privileged same as -p" -+msgstr " privileged samma som -p" -+ -+#: builtins.c:809 -+msgid " verbose same as -v" -+msgstr " verbose samma som -v" -+ -+#: builtins.c:811 -+msgid " vi use a vi-style line editing interface" -+msgstr "" -+ -+#: builtins.c:813 -+msgid " xtrace same as -x" -+msgstr " xtrace samma som -x" -+ -+#: builtins.c:814 -+msgid " -p Turned on whenever the real and effective user ids do not match." -+msgstr "" -+ -+#: builtins.c:815 -+msgid " Disables processing of the $ENV file and importing of shell" -+msgstr "" -+ -+#: builtins.c:816 -+msgid " functions. Turning this option off causes the effective uid and" -+msgstr "" -+ -+#: builtins.c:817 -+msgid " gid to be set to the real uid and gid." -+msgstr "" -+ -+#: builtins.c:818 -+msgid " -t Exit after reading and executing one command." -+msgstr "" -+ -+#: builtins.c:819 -+msgid " -u Treat unset variables as an error when substituting." -+msgstr "" -+ -+#: builtins.c:820 -+msgid " -v Print shell input lines as they are read." -+msgstr "" -+ -+#: builtins.c:821 -+msgid " -x Print commands and their arguments as they are executed." -+msgstr "" -+ -+#: builtins.c:823 -+msgid " -B the shell will perform brace expansion" -+msgstr "" -+ -+#: builtins.c:825 -+msgid " -C If set, disallow existing regular files to be overwritten" -+msgstr "" -+ -+#: builtins.c:826 -+msgid " by redirection of output." -+msgstr "" -+ -+#: builtins.c:827 -+msgid " -E If set, the ERR trap is inherited by shell functions." -+msgstr "" -+ -+#: builtins.c:829 -+msgid " -H Enable ! style history substitution. This flag is on" -+msgstr "" -+ -+#: builtins.c:830 -+msgid " by default." -+msgstr "" -+ -+#: builtins.c:832 -+msgid " -P If set, do not follow symbolic links when executing commands" -+msgstr "" -+ -+#: builtins.c:833 -+msgid " such as cd which change the current directory." -+msgstr "" -+ -+#: builtins.c:834 -+msgid " -T If set, the DEBUG trap is inherited by shell functions." -+msgstr "" -+ -+#: builtins.c:836 -+msgid "Using + rather than - causes these flags to be turned off. The" -+msgstr "" -+ -+#: builtins.c:837 -+msgid "flags can also be used upon invocation of the shell. The current" -+msgstr "" -+ -+#: builtins.c:838 -+msgid "set of flags may be found in $-. The remaining n ARGs are positional" -+msgstr "" -+ -+#: builtins.c:839 -+msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" -+msgstr "" -+ -+#: builtins.c:840 -+msgid "ARGs are given, all shell variables are printed." -+msgstr "" -+ -+#: builtins.c:846 -+msgid "For each NAME, remove the corresponding variable or function. Given" -+msgstr "" -+ -+#: builtins.c:847 -+msgid "the `-v', unset will only act on variables. Given the `-f' flag," -+msgstr "" -+ -+#: builtins.c:848 -+msgid "unset will only act on functions. With neither flag, unset first" -+msgstr "" -+ -+#: builtins.c:849 -+msgid "tries to unset a variable, and if that fails, then tries to unset a" -+msgstr "" -+ -+#: builtins.c:850 -+msgid "function. Some variables cannot be unset; also see readonly." -+msgstr "" -+ -+#: builtins.c:856 -+msgid "NAMEs are marked for automatic export to the environment of" -+msgstr "" -+ -+#: builtins.c:857 -+msgid "subsequently executed commands. If the -f option is given," -+msgstr "" -+ -+#: builtins.c:858 -+msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" -+msgstr "" -+ -+#: builtins.c:859 -+msgid "is given, a list of all names that are exported in this shell is" -+msgstr "" -+ -+#: builtins.c:860 -+msgid "printed. An argument of `-n' says to remove the export property" -+msgstr "" -+ -+#: builtins.c:861 -+msgid "from subsequent NAMEs. An argument of `--' disables further option" -+msgstr "" -+ -+#: builtins.c:862 -+#: builtins.c:874 -+#, fuzzy -+msgid "processing." -+msgstr "Bearbetar..." -+ -+#: builtins.c:868 -+msgid "The given NAMEs are marked readonly and the values of these NAMEs may" -+msgstr "" -+ -+#: builtins.c:869 -+msgid "not be changed by subsequent assignment. If the -f option is given," -+msgstr "" -+ -+#: builtins.c:870 -+msgid "then functions corresponding to the NAMEs are so marked. If no" -+msgstr "" -+ -+#: builtins.c:871 -+msgid "arguments are given, or if `-p' is given, a list of all readonly names" -+msgstr "" -+ -+#: builtins.c:872 -+msgid "is printed. The `-a' option means to treat each NAME as" -+msgstr "" -+ -+#: builtins.c:873 -+msgid "an array variable. An argument of `--' disables further option" -+msgstr "" -+ -+#: builtins.c:880 -+msgid "The positional parameters from $N+1 ... are renamed to $1 ... If N is" -+msgstr "" -+ -+#: builtins.c:881 -+msgid "not given, it is assumed to be 1." -+msgstr "" -+ -+#: builtins.c:887 -+#: builtins.c:896 -+msgid "Read and execute commands from FILENAME and return. The pathnames" -+msgstr "" -+ -+#: builtins.c:888 -+#: builtins.c:897 -+msgid "in $PATH are used to find the directory containing FILENAME. If any" -+msgstr "" -+ -+#: builtins.c:889 -+#: builtins.c:898 -+msgid "ARGUMENTS are supplied, they become the positional parameters when" -+msgstr "" -+ -+#: builtins.c:890 -+#: builtins.c:899 -+msgid "FILENAME is executed." -+msgstr "" -+ -+#: builtins.c:906 -+msgid "Suspend the execution of this shell until it receives a SIGCONT" -+msgstr "" -+ -+#: builtins.c:907 -+msgid "signal. The `-f' if specified says not to complain about this" -+msgstr "" -+ -+#: builtins.c:908 -+msgid "being a login shell if it is; just suspend anyway." -+msgstr "" -+ -+#: builtins.c:915 -+msgid "Exits with a status of 0 (true) or 1 (false) depending on" -+msgstr "" -+ -+#: builtins.c:916 -+msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" -+msgstr "" -+ -+#: builtins.c:917 -+msgid "expressions are often used to examine the status of a file. There" -+msgstr "" -+ -+#: builtins.c:918 -+msgid "are string operators as well, and numeric comparison operators." -+msgstr "" -+ -+#: builtins.c:920 -+msgid "File operators:" -+msgstr "" -+ -+#: builtins.c:922 -+msgid " -a FILE True if file exists." -+msgstr "" -+ -+#: builtins.c:923 -+msgid " -b FILE True if file is block special." -+msgstr "" -+ -+#: builtins.c:924 -+msgid " -c FILE True if file is character special." -+msgstr "" -+ -+#: builtins.c:925 -+msgid " -d FILE True if file is a directory." -+msgstr "" -+ -+#: builtins.c:926 -+msgid " -e FILE True if file exists." -+msgstr "" -+ -+#: builtins.c:927 -+msgid " -f FILE True if file exists and is a regular file." -+msgstr "" -+ -+#: builtins.c:928 -+msgid " -g FILE True if file is set-group-id." -+msgstr "" -+ -+#: builtins.c:929 -+msgid " -h FILE True if file is a symbolic link." -+msgstr "" -+ -+#: builtins.c:930 -+msgid " -L FILE True if file is a symbolic link." -+msgstr "" -+ -+#: builtins.c:931 -+msgid " -k FILE True if file has its `sticky' bit set." -+msgstr "" -+ -+#: builtins.c:932 -+msgid " -p FILE True if file is a named pipe." -+msgstr "" -+ -+#: builtins.c:933 -+msgid " -r FILE True if file is readable by you." -+msgstr "" -+ -+#: builtins.c:934 -+msgid " -s FILE True if file exists and is not empty." -+msgstr "" -+ -+#: builtins.c:935 -+msgid " -S FILE True if file is a socket." -+msgstr "" -+ -+#: builtins.c:936 -+msgid " -t FD True if FD is opened on a terminal." -+msgstr "" -+ -+#: builtins.c:937 -+msgid " -u FILE True if the file is set-user-id." -+msgstr "" -+ -+#: builtins.c:938 -+msgid " -w FILE True if the file is writable by you." -+msgstr "" -+ -+#: builtins.c:939 -+msgid " -x FILE True if the file is executable by you." -+msgstr "" -+ -+#: builtins.c:940 -+msgid " -O FILE True if the file is effectively owned by you." -+msgstr "" -+ -+#: builtins.c:941 -+msgid " -G FILE True if the file is effectively owned by your group." -+msgstr "" -+ -+#: builtins.c:942 -+msgid " -N FILE True if the file has been modified since it was last read." -+msgstr "" -+ -+#: builtins.c:944 -+msgid " FILE1 -nt FILE2 True if file1 is newer than file2 (according to" -+msgstr "" -+ -+#: builtins.c:945 -+#, fuzzy -+msgid " modification date)." -+msgstr "Ändrad datum" -+ -+#: builtins.c:947 -+msgid " FILE1 -ot FILE2 True if file1 is older than file2." -+msgstr "" -+ -+#: builtins.c:949 -+msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." -+msgstr "" -+ -+# Operander? -+#: builtins.c:951 -+msgid "String operators:" -+msgstr "Strängoperatörer:" -+ -+#: builtins.c:953 -+msgid " -z STRING True if string is empty." -+msgstr "" -+ -+#: builtins.c:955 -+#, fuzzy -+msgid " -n STRING" -+msgstr "STRÄNG" -+ -+#: builtins.c:956 -+msgid " STRING True if string is not empty." -+msgstr "" -+ -+#: builtins.c:958 -+msgid " STRING1 = STRING2" -+msgstr "" -+ -+#: builtins.c:959 -+msgid " True if the strings are equal." -+msgstr "" -+ -+#: builtins.c:960 -+msgid " STRING1 != STRING2" -+msgstr "" -+ -+#: builtins.c:961 -+msgid " True if the strings are not equal." -+msgstr "" -+ -+#: builtins.c:962 -+msgid " STRING1 < STRING2" -+msgstr "" -+ -+#: builtins.c:963 -+msgid " True if STRING1 sorts before STRING2 lexicographically." -+msgstr "" -+ -+#: builtins.c:964 -+msgid " STRING1 > STRING2" -+msgstr "" -+ -+#: builtins.c:965 -+msgid " True if STRING1 sorts after STRING2 lexicographically." -+msgstr "" -+ -+# Operander? -+#: builtins.c:967 -+msgid "Other operators:" -+msgstr "Övriga operatörer:" -+ -+#: builtins.c:969 -+msgid " -o OPTION True if the shell option OPTION is enabled." -+msgstr "" -+ -+#: builtins.c:970 -+msgid " ! EXPR True if expr is false." -+msgstr "" -+ -+#: builtins.c:971 -+msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." -+msgstr "" -+ -+#: builtins.c:972 -+msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." -+msgstr "" -+ -+#: builtins.c:974 -+msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," -+msgstr "" -+ -+#: builtins.c:975 -+msgid " -lt, -le, -gt, or -ge." -+msgstr "" -+ -+#: builtins.c:977 -+msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," -+msgstr "" -+ -+#: builtins.c:978 -+msgid "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" -+msgstr "" -+ -+#: builtins.c:979 -+msgid "than ARG2." -+msgstr "" -+ -+#: builtins.c:985 -+msgid "This is a synonym for the \"test\" builtin, but the last" -+msgstr "" -+ -+#: builtins.c:986 -+msgid "argument must be a literal `]', to match the opening `['." -+msgstr "" -+ -+#: builtins.c:992 -+msgid "Print the accumulated user and system times for processes run from" -+msgstr "" -+ -+#: builtins.c:993 -+#, fuzzy -+msgid "the shell." -+msgstr "Skal: " -+ -+#: builtins.c:999 -+msgid "The command ARG is to be read and executed when the shell receives" -+msgstr "" -+ -+#: builtins.c:1000 -+msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" -+msgstr "" -+ -+#: builtins.c:1001 -+msgid "reset to their original values. If ARG is the null string each" -+msgstr "" -+ -+#: builtins.c:1002 -+msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." -+msgstr "" -+ -+#: builtins.c:1003 -+msgid "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" -+msgstr "" -+ -+#: builtins.c:1004 -+msgid "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every" -+msgstr "" -+ -+#: builtins.c:1005 -+msgid "command. If ARG is `-p' then the trap commands associated with" -+msgstr "" -+ -+#: builtins.c:1006 -+msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" -+msgstr "" -+ -+#: builtins.c:1007 -+msgid "only `-p' is given, trap prints the list of commands associated with" -+msgstr "" -+ -+#: builtins.c:1008 -+msgid "each signal number. Each SIGNAL_SPEC is either a signal name in " -+msgstr "" -+ -+#: builtins.c:1009 -+msgid "or a signal number. `trap -l' prints a list of signal names and their" -+msgstr "" -+ -+#: builtins.c:1010 -+msgid "corresponding numbers. Note that a signal can be sent to the shell" -+msgstr "" -+ -+#: builtins.c:1011 -+msgid "with \"kill -signal $$\"." -+msgstr "" -+ -+#: builtins.c:1017 -+msgid "For each NAME, indicate how it would be interpreted if used as a" -+msgstr "" -+ -+#: builtins.c:1018 -+#, fuzzy -+msgid "command name." -+msgstr "Kommandonamn" -+ -+#: builtins.c:1020 -+msgid "If the -t option is used, `type' outputs a single word which is one of" -+msgstr "" -+ -+#: builtins.c:1021 -+msgid "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" -+msgstr "" -+ -+#: builtins.c:1022 -+msgid "alias, shell reserved word, shell function, shell builtin, disk file," -+msgstr "" -+ -+#: builtins.c:1023 -+msgid "or unfound, respectively." -+msgstr "" -+ -+#: builtins.c:1025 -+msgid "If the -p flag is used, `type' either returns the name of the disk" -+msgstr "" -+ -+#: builtins.c:1026 -+msgid "file that would be executed, or nothing if `type -t NAME' would not" -+msgstr "" -+ -+#: builtins.c:1027 -+msgid "return `file'." -+msgstr "" -+ -+#: builtins.c:1029 -+msgid "If the -a flag is used, `type' displays all of the places that contain" -+msgstr "" -+ -+#: builtins.c:1030 -+msgid "an executable named `file'. This includes aliases, builtins, and" -+msgstr "" -+ -+#: builtins.c:1031 -+msgid "functions, if and only if the -p flag is not also used." -+msgstr "" -+ -+#: builtins.c:1033 -+msgid "The -f flag suppresses shell function lookup." -+msgstr "" -+ -+#: builtins.c:1035 -+msgid "The -P flag forces a PATH search for each NAME, even if it is an alias," -+msgstr "" -+ -+#: builtins.c:1036 -+msgid "builtin, or function, and returns the name of the disk file that would" -+msgstr "" -+ -+#: builtins.c:1037 -+msgid "be executed." -+msgstr "" -+ -+#: builtins.c:1044 -+msgid "Ulimit provides control over the resources available to processes" -+msgstr "" -+ -+#: builtins.c:1045 -+msgid "started by the shell, on systems that allow such control. If an" -+msgstr "" -+ -+#: builtins.c:1046 -+msgid "option is given, it is interpreted as follows:" -+msgstr "" -+ -+#: builtins.c:1048 -+msgid " -S\tuse the `soft' resource limit" -+msgstr "" -+ -+#: builtins.c:1049 -+msgid " -H\tuse the `hard' resource limit" -+msgstr "" -+ -+#: builtins.c:1050 -+msgid " -a\tall current limits are reported" -+msgstr "" -+ -+#: builtins.c:1051 -+msgid " -c\tthe maximum size of core files created" -+msgstr "" -+ -+#: builtins.c:1052 -+msgid " -d\tthe maximum size of a process's data segment" -+msgstr "" -+ -+#: builtins.c:1053 -+msgid " -f\tthe maximum size of files created by the shell" -+msgstr "" -+ -+#: builtins.c:1054 -+msgid " -l\tthe maximum size a process may lock into memory" -+msgstr "" -+ -+#: builtins.c:1055 -+msgid " -m\tthe maximum resident set size" -+msgstr "" -+ -+#: builtins.c:1056 -+msgid " -n\tthe maximum number of open file descriptors" -+msgstr "" -+ -+#: builtins.c:1057 -+msgid " -p\tthe pipe buffer size" -+msgstr "" -+ -+#: builtins.c:1058 -+msgid " -s\tthe maximum stack size" -+msgstr "" -+ -+#: builtins.c:1059 -+msgid " -t\tthe maximum amount of cpu time in seconds" -+msgstr "" -+ -+#: builtins.c:1060 -+msgid " -u\tthe maximum number of user processes" -+msgstr "" -+ -+#: builtins.c:1061 -+msgid " -v\tthe size of virtual memory" -+msgstr "" -+ -+#: builtins.c:1063 -+msgid "If LIMIT is given, it is the new value of the specified resource;" -+msgstr "" -+ -+#: builtins.c:1064 -+msgid "the special LIMIT values `soft', `hard', and `unlimited' stand for" -+msgstr "" -+ -+#: builtins.c:1065 -+msgid "the current soft limit, the current hard limit, and no limit, respectively." -+msgstr "" -+ -+#: builtins.c:1066 -+msgid "Otherwise, the current value of the specified resource is printed." -+msgstr "" -+ -+#: builtins.c:1067 -+msgid "If no option is given, then -f is assumed. Values are in 1024-byte" -+msgstr "" -+ -+#: builtins.c:1068 -+msgid "increments, except for -t, which is in seconds, -p, which is in" -+msgstr "" -+ -+#: builtins.c:1069 -+msgid "increments of 512 bytes, and -u, which is an unscaled number of" -+msgstr "" -+ -+#: builtins.c:1070 -+#, fuzzy -+msgid "processes." -+msgstr "Processer" -+ -+#: builtins.c:1077 -+msgid "The user file-creation mask is set to MODE. If MODE is omitted, or if" -+msgstr "" -+ -+#: builtins.c:1078 -+msgid "`-S' is supplied, the current value of the mask is printed. The `-S'" -+msgstr "" -+ -+#: builtins.c:1079 -+msgid "option makes the output symbolic; otherwise an octal number is output." -+msgstr "" -+ -+#: builtins.c:1080 -+msgid "If `-p' is supplied, and MODE is omitted, the output is in a form" -+msgstr "" -+ -+#: builtins.c:1081 -+msgid "that may be used as input. If MODE begins with a digit, it is" -+msgstr "" -+ -+#: builtins.c:1082 -+msgid "interpreted as an octal number, otherwise it is a symbolic mode string" -+msgstr "" -+ -+#: builtins.c:1083 -+msgid "like that accepted by chmod(1)." -+msgstr "" -+ -+#: builtins.c:1090 -+#: builtins.c:1102 -+msgid "Wait for the specified process and report its termination status. If" -+msgstr "" -+ -+#: builtins.c:1091 -+#: builtins.c:1103 -+msgid "N is not given, all currently active child processes are waited for," -+msgstr "" -+ -+#: builtins.c:1092 -+msgid "and the return code is zero. N may be a process ID or a job" -+msgstr "" -+ -+#: builtins.c:1093 -+msgid "specification; if a job spec is given, all processes in the job's" -+msgstr "" -+ -+#: builtins.c:1094 -+msgid "pipeline are waited for." -+msgstr "" -+ -+#: builtins.c:1104 -+msgid "and the return code is zero. N is a process ID; if it is not given," -+msgstr "" -+ -+#: builtins.c:1105 -+msgid "all child processes of the shell are waited for." -+msgstr "" -+ -+#: builtins.c:1112 -+msgid "The `for' loop executes a sequence of commands for each member in a" -+msgstr "" -+ -+#: builtins.c:1113 -+msgid "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" -+msgstr "" -+ -+#: builtins.c:1114 -+msgid "assumed. For each element in WORDS, NAME is set to that element, and" -+msgstr "" -+ -+#: builtins.c:1115 -+msgid "the COMMANDS are executed." -+msgstr "" -+ -+#: builtins.c:1121 -+msgid "Equivalent to" -+msgstr "" -+ -+#: builtins.c:1122 -+msgid "\t(( EXP1 ))" -+msgstr "" -+ -+#: builtins.c:1123 -+msgid "\twhile (( EXP2 )); do" -+msgstr "" -+ -+#: builtins.c:1124 -+msgid "\t\tCOMMANDS" -+msgstr "" -+ -+#: builtins.c:1125 -+msgid "\t\t(( EXP3 ))" -+msgstr "" -+ -+#: builtins.c:1126 -+msgid "\tdone" -+msgstr "" -+ -+#: builtins.c:1127 -+msgid "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is" -+msgstr "" -+ -+#: builtins.c:1128 -+msgid "omitted, it behaves as if it evaluates to 1." -+msgstr "" -+ -+#: builtins.c:1134 -+msgid "The WORDS are expanded, generating a list of words. The" -+msgstr "" -+ -+#: builtins.c:1135 -+msgid "set of expanded words is printed on the standard error, each" -+msgstr "" -+ -+#: builtins.c:1136 -+msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" -+msgstr "" -+ -+#: builtins.c:1137 -+msgid "is assumed. The PS3 prompt is then displayed and a line read" -+msgstr "" -+ -+#: builtins.c:1138 -+msgid "from the standard input. If the line consists of the number" -+msgstr "" -+ -+#: builtins.c:1139 -+msgid "corresponding to one of the displayed words, then NAME is set" -+msgstr "" -+ -+#: builtins.c:1140 -+msgid "to that word. If the line is empty, WORDS and the prompt are" -+msgstr "" -+ -+#: builtins.c:1141 -+msgid "redisplayed. If EOF is read, the command completes. Any other" -+msgstr "" -+ -+#: builtins.c:1142 -+msgid "value read causes NAME to be set to null. The line read is saved" -+msgstr "" -+ -+#: builtins.c:1143 -+msgid "in the variable REPLY. COMMANDS are executed after each selection" -+msgstr "" -+ -+#: builtins.c:1144 -+msgid "until a break command is executed." -+msgstr "" -+ -+#: builtins.c:1150 -+msgid "Execute PIPELINE and print a summary of the real time, user CPU time," -+msgstr "" -+ -+#: builtins.c:1151 -+msgid "and system CPU time spent executing PIPELINE when it terminates." -+msgstr "" -+ -+#: builtins.c:1152 -+msgid "The return status is the return status of PIPELINE. The `-p' option" -+msgstr "" -+ -+#: builtins.c:1153 -+msgid "prints the timing summary in a slightly different format. This uses" -+msgstr "" -+ -+#: builtins.c:1154 -+msgid "the value of the TIMEFORMAT variable as the output format." -+msgstr "" -+ -+#: builtins.c:1160 -+msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" -+msgstr "" -+ -+#: builtins.c:1161 -+msgid "`|' is used to separate multiple patterns." -+msgstr "" -+ -+#: builtins.c:1167 -+msgid "The if COMMANDS are executed. If the exit status is zero, then the then" -+msgstr "" -+ -+#: builtins.c:1168 -+msgid "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" -+msgstr "" -+ -+#: builtins.c:1169 -+msgid "in turn, and if the exit status is zero, the corresponding then COMMANDS" -+msgstr "" -+ -+#: builtins.c:1170 -+msgid "are executed and the if command completes. Otherwise, the else COMMANDS" -+msgstr "" -+ -+#: builtins.c:1171 -+msgid "are executed, if present. The exit status is the exit status of the last" -+msgstr "" -+ -+#: builtins.c:1172 -+msgid "command executed, or zero if no condition tested true." -+msgstr "" -+ -+#: builtins.c:1178 -+#: builtins.c:1185 -+msgid "Expand and execute COMMANDS as long as the final command in the" -+msgstr "" -+ -+#: builtins.c:1179 -+msgid "`while' COMMANDS has an exit status of zero." -+msgstr "" -+ -+#: builtins.c:1186 -+msgid "`until' COMMANDS has an exit status which is not zero." -+msgstr "" -+ -+#: builtins.c:1192 -+msgid "Create a simple command invoked by NAME which runs COMMANDS." -+msgstr "" -+ -+#: builtins.c:1193 -+msgid "Arguments on the command line along with NAME are passed to the" -+msgstr "" -+ -+#: builtins.c:1194 -+msgid "function as $0 .. $n." -+msgstr "" -+ -+#: builtins.c:1200 -+msgid "Run a set of commands in a group. This is one way to redirect an" -+msgstr "" -+ -+#: builtins.c:1201 -+msgid "entire set of commands." -+msgstr "" -+ -+#: builtins.c:1207 -+msgid "This is similar to the `fg' command. Resume a stopped or background" -+msgstr "" -+ -+#: builtins.c:1208 -+msgid "job. If you specifiy DIGITS, then that job is used. If you specify" -+msgstr "" -+ -+#: builtins.c:1209 -+msgid "WORD, then the job whose name begins with WORD is used. Following the" -+msgstr "" -+ -+#: builtins.c:1210 -+msgid "job specification with a `&' places the job in the background." -+msgstr "" -+ -+#: builtins.c:1216 -+msgid "The EXPRESSION is evaluated according to the rules for arithmetic" -+msgstr "" -+ -+#: builtins.c:1217 -+msgid "evaluation. Equivalent to \"let EXPRESSION\"." -+msgstr "" -+ -+#: builtins.c:1223 -+msgid "Returns a status of 0 or 1 depending on the evaluation of the conditional" -+msgstr "" -+ -+#: builtins.c:1224 -+msgid "expression EXPRESSION. Expressions are composed of the same primaries used" -+msgstr "" -+ -+#: builtins.c:1225 -+msgid "by the `test' builtin, and may be combined using the following operators" -+msgstr "" -+ -+#: builtins.c:1227 -+msgid "\t( EXPRESSION )\tReturns the value of EXPRESSION" -+msgstr "" -+ -+#: builtins.c:1228 -+msgid "\t! EXPRESSION\tTrue if EXPRESSION is false; else false" -+msgstr "" -+ -+#: builtins.c:1229 -+msgid "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false" -+msgstr "" -+ -+#: builtins.c:1230 -+msgid "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false" -+msgstr "" -+ -+#: builtins.c:1232 -+msgid "When the `==' and `!=' operators are used, the string to the right of the" -+msgstr "" -+ -+#: builtins.c:1233 -+msgid "operator is used as a pattern and pattern matching is performed. The" -+msgstr "" -+ -+#: builtins.c:1234 -+msgid "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to" -+msgstr "" -+ -+#: builtins.c:1235 -+msgid "determine the expression's value." -+msgstr "" -+ -+#: builtins.c:1241 -+msgid "BASH_VERSION Version information for this Bash." -+msgstr "" -+ -+#: builtins.c:1242 -+msgid "CDPATH A colon separated list of directories to search" -+msgstr "" -+ -+#: builtins.c:1243 -+msgid "\t\twhen the argument to `cd' is not found in the current" -+msgstr "" -+ -+#: builtins.c:1244 -+msgid "\t\tdirectory." -+msgstr "" -+ -+#: builtins.c:1245 -+msgid "GLOBIGNORE\tA colon-separated list of patterns describing filenames to" -+msgstr "" -+ -+#: builtins.c:1246 -+msgid "\t\tbe ignored by pathname expansion." -+msgstr "" -+ -+#: builtins.c:1248 -+msgid "HISTFILE The name of the file where your command history is stored." -+msgstr "" -+ -+#: builtins.c:1249 -+msgid "HISTFILESIZE The maximum number of lines this file can contain." -+msgstr "" -+ -+#: builtins.c:1250 -+msgid "HISTSIZE The maximum number of history lines that a running" -+msgstr "" -+ -+#: builtins.c:1251 -+msgid "\t\tshell can access." -+msgstr "" -+ -+#: builtins.c:1253 -+msgid "HOME The complete pathname to your login directory." -+msgstr "" -+ -+#: builtins.c:1254 -+msgid "HOSTNAME\tThe name of the current host." -+msgstr "" -+ -+#: builtins.c:1255 -+msgid "HOSTTYPE The type of CPU this version of Bash is running under." -+msgstr "" -+ -+#: builtins.c:1256 -+msgid "IGNOREEOF Controls the action of the shell on receipt of an EOF" -+msgstr "" -+ -+#: builtins.c:1257 -+msgid "\t\tcharacter as the sole input. If set, then the value" -+msgstr "" -+ -+#: builtins.c:1258 -+msgid "\t\tof it is the number of EOF characters that can be seen" -+msgstr "" -+ -+#: builtins.c:1259 -+msgid "\t\tin a row on an empty line before the shell will exit" -+msgstr "" -+ -+#: builtins.c:1260 -+msgid "\t\t(default 10). When unset, EOF signifies the end of input." -+msgstr "" -+ -+#: builtins.c:1261 -+msgid "MACHTYPE\tA string describing the current system Bash is running on." -+msgstr "" -+ -+#: builtins.c:1262 -+msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." -+msgstr "" -+ -+#: builtins.c:1263 -+msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" -+msgstr "" -+ -+#: builtins.c:1264 -+msgid "\t\tfor new mail." -+msgstr "" -+ -+#: builtins.c:1265 -+msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." -+msgstr "" -+ -+#: builtins.c:1266 -+msgid "PATH A colon-separated list of directories to search when" -+msgstr "" -+ -+#: builtins.c:1267 -+msgid "\t\tlooking for commands." -+msgstr "" -+ -+#: builtins.c:1268 -+msgid "PROMPT_COMMAND A command to be executed before the printing of each" -+msgstr "" -+ -+#: builtins.c:1269 -+msgid "\t\tprimary prompt." -+msgstr "" -+ -+#: builtins.c:1270 -+msgid "PS1 The primary prompt string." -+msgstr "" -+ -+#: builtins.c:1271 -+msgid "PS2 The secondary prompt string." -+msgstr "" -+ -+#: builtins.c:1272 -+msgid "PWD\t\tThe full pathname of the current directory." -+msgstr "" -+ -+#: builtins.c:1273 -+msgid "SHELLOPTS\tA colon-separated list of enabled shell options." -+msgstr "" -+ -+#: builtins.c:1274 -+msgid "TERM The name of the current terminal type." -+msgstr "" -+ -+#: builtins.c:1275 -+msgid "TIMEFORMAT\tThe output format for timing statistics displayed by the" -+msgstr "" -+ -+#: builtins.c:1276 -+msgid "\t\t`time' reserved word." -+msgstr "" -+ -+#: builtins.c:1277 -+msgid "auto_resume Non-null means a command word appearing on a line by" -+msgstr "" -+ -+#: builtins.c:1278 -+msgid "\t\titself is first looked for in the list of currently" -+msgstr "" -+ -+#: builtins.c:1279 -+msgid "\t\tstopped jobs. If found there, that job is foregrounded." -+msgstr "" -+ -+#: builtins.c:1280 -+msgid "\t\tA value of `exact' means that the command word must" -+msgstr "" -+ -+#: builtins.c:1281 -+msgid "\t\texactly match a command in the list of stopped jobs. A" -+msgstr "" -+ -+#: builtins.c:1282 -+msgid "\t\tvalue of `substring' means that the command word must" -+msgstr "" -+ -+#: builtins.c:1283 -+msgid "\t\tmatch a substring of the job. Any other value means that" -+msgstr "" -+ -+#: builtins.c:1284 -+msgid "\t\tthe command must be a prefix of a stopped job." -+msgstr "" -+ -+#: builtins.c:1287 -+msgid "histchars Characters controlling history expansion and quick" -+msgstr "" -+ -+#: builtins.c:1288 -+msgid "\t\tsubstitution. The first character is the history" -+msgstr "" -+ -+#: builtins.c:1289 -+msgid "\t\tsubstitution character, usually `!'. The second is" -+msgstr "" -+ -+#: builtins.c:1290 -+msgid "\t\tthe `quick substitution' character, usually `^'. The" -+msgstr "" -+ -+#: builtins.c:1291 -+msgid "\t\tthird is the `history comment' character, usually `#'." -+msgstr "" -+ -+#: builtins.c:1293 -+msgid "HISTIGNORE\tA colon-separated list of patterns used to decide which" -+msgstr "" -+ -+#: builtins.c:1294 -+msgid "\t\tcommands should be saved on the history list." -+msgstr "" -+ -+#: builtins.c:1306 -+msgid "+N\tRotates the stack so that the Nth directory (counting" -+msgstr "" -+ -+#: builtins.c:1307 -+msgid "\tfrom the left of the list shown by `dirs', starting with" -+msgstr "" -+ -+#: builtins.c:1308 -+#: builtins.c:1312 -+msgid "\tzero) is at the top." -+msgstr "" -+ -+#: builtins.c:1310 -+msgid "-N\tRotates the stack so that the Nth directory (counting" -+msgstr "" -+ -+#: builtins.c:1311 -+msgid "\tfrom the right of the list shown by `dirs', starting with" -+msgstr "" -+ -+#: builtins.c:1314 -+msgid "-n\tsuppress the normal change of directory when adding directories" -+msgstr "" -+ -+#: builtins.c:1315 -+msgid "\tto the stack, so only the stack is manipulated." -+msgstr "" -+ -+#: builtins.c:1317 -+msgid "dir\tadds DIR to the directory stack at the top, making it the" -+msgstr "" -+ -+#: builtins.c:1318 -+msgid "\tnew current working directory." -+msgstr "" -+ -+#: builtins.c:1332 -+msgid "+N\tremoves the Nth entry counting from the left of the list" -+msgstr "" -+ -+#: builtins.c:1333 -+msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" -+msgstr "" -+ -+#: builtins.c:1334 -+msgid "\tremoves the first directory, `popd +1' the second." -+msgstr "" -+ -+#: builtins.c:1336 -+msgid "-N\tremoves the Nth entry counting from the right of the list" -+msgstr "" -+ -+#: builtins.c:1337 -+msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" -+msgstr "" -+ -+#: builtins.c:1338 -+msgid "\tremoves the last directory, `popd -1' the next to last." -+msgstr "" -+ -+#: builtins.c:1340 -+msgid "-n\tsuppress the normal change of directory when removing directories" -+msgstr "" -+ -+#: builtins.c:1341 -+msgid "\tfrom the stack, so only the stack is manipulated." -+msgstr "" -+ -+#: builtins.c:1363 -+msgid "+N\tdisplays the Nth entry counting from the left of the list shown by" -+msgstr "" -+ -+#: builtins.c:1364 -+#: builtins.c:1367 -+msgid "\tdirs when invoked without options, starting with zero." -+msgstr "" -+ -+#: builtins.c:1366 -+msgid "-N\tdisplays the Nth entry counting from the right of the list shown by" -+msgstr "" -+ -+#: builtins.c:1374 -+msgid "Toggle the values of variables controlling optional behavior." -+msgstr "" -+ -+#: builtins.c:1375 -+msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" -+msgstr "" -+ -+#: builtins.c:1376 -+msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" -+msgstr "" -+ -+#: builtins.c:1377 -+msgid "status indicates whether each OPTNAME is set or unset. The -o" -+msgstr "" -+ -+#: builtins.c:1378 -+msgid "option restricts the OPTNAMEs to those defined for use with" -+msgstr "" -+ -+#: builtins.c:1379 -+msgid "`set -o'. With no options, or with the -p option, a list of all" -+msgstr "" -+ -+#: builtins.c:1380 -+msgid "settable options is displayed, with an indication of whether or" -+msgstr "" -+ -+#: builtins.c:1381 -+msgid "not each is set." -+msgstr "" -+ -+#: builtins.c:1387 -+msgid "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT" -+msgstr "" -+ -+#: builtins.c:1388 -+msgid "is a character string which contains three types of objects: plain" -+msgstr "" -+ -+#: builtins.c:1389 -+msgid "characters, which are simply copied to standard output, character escape" -+msgstr "" -+ -+#: builtins.c:1390 -+msgid "sequences which are converted and copied to the standard output, and" -+msgstr "" -+ -+#: builtins.c:1391 -+msgid "format specifications, each of which causes printing of the next successive" -+msgstr "" -+ -+#: builtins.c:1392 -+msgid "argument. In addition to the standard printf(1) formats, %b means to" -+msgstr "" -+ -+#: builtins.c:1393 -+msgid "expand backslash escape sequences in the corresponding argument, and %q" -+msgstr "" -+ -+#: builtins.c:1394 -+msgid "means to quote the argument in a way that can be reused as shell input." -+msgstr "" -+ -+#: builtins.c:1401 -+msgid "For each NAME, specify how arguments are to be completed." -+msgstr "" -+ -+#: builtins.c:1402 -+msgid "If the -p option is supplied, or if no options are supplied, existing" -+msgstr "" -+ -+#: builtins.c:1403 -+msgid "completion specifications are printed in a way that allows them to be" -+msgstr "" -+ -+#: builtins.c:1404 -+msgid "reused as input. The -r option removes a completion specification for" -+msgstr "" -+ -+#: builtins.c:1405 -+msgid "each NAME, or, if no NAMEs are supplied, all completion specifications." -+msgstr "" -+ -+#: builtins.c:1413 -+msgid "Display the possible completions depending on the options. Intended" -+msgstr "" -+ -+#: builtins.c:1414 -+msgid "to be used from within a shell function generating possible completions." -+msgstr "" -+ -+#: builtins.c:1415 -+msgid "If the optional WORD argument is supplied, matches against WORD are" -+msgstr "" -+ -+#: builtins.c:1416 -+msgid "generated." -+msgstr "genererad." -+ diff --git a/debian/patches/privmode.dpatch b/debian/patches/privmode.dpatch deleted file mode 100755 index eb9abf2..0000000 --- a/debian/patches/privmode.dpatch +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: XXX missing description -# DP: -# DP: Comment from Chet Ramey : -# DP: -# DP: Nope. This will allow setuid scripts if not called as `sh' and not -# DP: called with the -p option. I won't install this. - - -diff -urb bash.orig/shell.c bash/shell.c ---- bash.orig/shell.c 2003-06-03 19:50:35.000000000 +0200 -+++ bash/shell.c 2003-09-28 00:26:28.000000000 +0200 -@@ -447,7 +447,7 @@ - if (dump_translatable_strings) - read_but_dont_execute = 1; - -- 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 diff --git a/debian/patches/random.dpatch b/debian/patches/random.dpatch deleted file mode 100644 index 6304468..0000000 --- a/debian/patches/random.dpatch +++ /dev/null @@ -1,107 +0,0 @@ -#! /bin/sh -e - -dir=. -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" - dir=$3 -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) - patch $pdir -f --no-backup-if-mismatch -p1 < $0 - echo '2.05' > $dir/_distribution - echo '0' > $dir/_patchlevel - cd $dir && autoconf - rm -f $dir/_distribution $dir/_patchlevel - ;; - -unpatch) - patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 - rm -f $dir/configure $dir/_distribution $dir/_patchlevel - ;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: use the system random functions - -diff -urb bash.orig/config.h.in bash/config.h.in ---- bash.orig/config.h.in 2003-09-22 14:42:35.000000000 +0200 -+++ bash/config.h.in 2003-09-28 00:27:15.000000000 +0200 -@@ -606,6 +606,9 @@ - /* Define if you have the putenv function. */ - #undef HAVE_PUTENV - -+/* Define if you have the random function. */ -+#undef HAVE_RANDOM -+ - /* Define if you have the readlink function. */ - #undef HAVE_READLINK - -@@ -696,6 +699,9 @@ - /* Define if you have the strsignal function or macro. */ - #undef HAVE_STRSIGNAL - -+/* Define if you have the srandom function. */ -+#undef HAVE_SRANDOM -+ - /* Define if you have the sysconf function. */ - #undef HAVE_SYSCONF - -diff -urb bash.orig/variables.c bash/variables.c ---- bash.orig/variables.c 2003-07-31 16:28:57.000000000 +0200 -+++ bash/variables.c 2003-09-28 00:27:15.000000000 +0200 -@@ -1098,16 +1098,22 @@ - static unsigned long rseed = 1; - static int last_random_value; - --/* 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. */ -+/* Use the random number genrator provided by the standard C library, -+ else use a linear congruential random number generator based on the -+ ANSI C standard. This one isn't very good (the values are alternately -+ odd and even, for example), but a more complicated one is overkill. */ - - /* Returns a pseudo-random number between 0 and 32767. */ - static int - brand () - { -+#if defined(HAVE_RANDOM) -+ rseed = (unsigned int) (labs(random()) & 32767); -+ return rseed; -+#else - rseed = rseed * 1103515245 + 12345; - return ((unsigned int)((rseed >> 16) & 32767)); /* was % 32768 */ -+#endif - } - - /* Set the random number generator seed to SEED. */ -@@ -1115,8 +1121,12 @@ - sbrand (seed) - unsigned long seed; - { -+#if defined(HAVE_SRANDOM) -+ srandom(seed); -+#else - rseed = seed; - last_random_value = 0; -+#endif - } - - static SHELL_VAR * ---- bash/configure.in~ 2004-03-02 00:04:29.000000000 +0100 -+++ bash/configure.in 2004-03-02 00:05:48.000000000 +0100 -@@ -667,6 +667,9 @@ - - AC_FUNC_MKTIME - -+dnl checks for random functions -+AC_CHECK_FUNCS(random srandom) -+ - dnl - dnl Checks for lib/intl and related code (uses some of the output from - dnl AM_GNU_GETTEXT) diff --git a/debian/patches/rbash-manpage.diff b/debian/patches/rbash-manpage.diff new file mode 100644 index 0000000..0103e61 --- /dev/null +++ b/debian/patches/rbash-manpage.diff @@ -0,0 +1,12 @@ +# DP: doc/rbash.1: fix bash(1) reference + +--- a/doc/rbash.1 ++++ b/doc/rbash.1 +@@ -3,6 +3,6 @@ + rbash \- restricted bash, see \fBbash\fR(1) + .SH RESTRICTED SHELL + .nr zY 1 +-.so bash.1 ++.so man1/bash.1 + .SH SEE ALSO + bash(1) diff --git a/debian/patches/rbash-manpage.dpatch b/debian/patches/rbash-manpage.dpatch deleted file mode 100755 index 73a9969..0000000 --- a/debian/patches/rbash-manpage.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: doc/rbash.1: fix bash(1) reference - ---- doc/rbash.1~ 1999-11-29 22:30:03.000000000 +0100 -+++ doc/rbash.1 2003-02-21 16:15:59.000000000 +0100 -@@ -3,6 +3,6 @@ - rbash \- restricted bash, see \fBbash\fR(1) - .SH RESTRICTED SHELL - .nr zY 1 --.so bash.1 -+.so man1/bash.1 - .SH SEE ALSO - bash(1) diff --git a/debian/patches/rl-del-backspace-policy.dpatch b/debian/patches/rl-del-backspace-policy.dpatch deleted file mode 100644 index ec56b43..0000000 --- a/debian/patches/rl-del-backspace-policy.dpatch +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Handle Debian Backspace/Delete keyboard policy - -diff -urb bash.orig/lib/readline/terminal.c bash/lib/readline/terminal.c ---- bash.orig/lib/readline/terminal.c 2003-09-18 17:03:42.000000000 +0200 -+++ bash/lib/readline/terminal.c 2003-09-27 23:25:59.000000000 +0200 -@@ -148,6 +148,9 @@ - /* Insert key */ - static char *_rl_term_kI; - -+/* The key sequence sent by the Delete key, if any. */ -+static char *_rl_term_kD; -+ - /* Cursor control */ - static char *_rl_term_vs; /* very visible */ - static char *_rl_term_ve; /* normal */ -@@ -314,6 +317,7 @@ - { "ic", &_rl_term_ic }, - { "im", &_rl_term_im }, - { "kH", &_rl_term_kH }, /* home down ?? */ -+ { "kD", &_rl_term_kD }, /* delete */ - { "kI", &_rl_term_kI }, /* insert */ - { "kd", &_rl_term_kd }, - { "ke", &_rl_term_ke }, /* end keypad mode */ -@@ -492,6 +496,7 @@ - - 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); /* Delete */ - - _rl_keymap = xkeymap; - } diff --git a/debian/patches/rl-examples-bdb.dpatch b/debian/patches/rl-examples-bdb.dpatch deleted file mode 100644 index 33cca15..0000000 --- a/debian/patches/rl-examples-bdb.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Modified readline examples to properly build with Debian setup. - ---- ./lib/readline/examples/rl.c~ Mon Nov 8 22:22:03 1999 -+++ ./lib/readline/examples/rl.c Fri Dec 31 17:34:30 1999 -@@ -11,7 +11,7 @@ - - #include - #include --#include "posixstat.h" -+#include - - #if defined (READLINE_LIBRARY) - # include "readline.h" diff --git a/debian/patches/rl-header.dpatch b/debian/patches/rl-header.dpatch deleted file mode 100644 index d147813..0000000 --- a/debian/patches/rl-header.dpatch +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: include stdio.h in readline.h ---- lib/readline/readline.h~ Thu Aug 5 14:10:59 1999 -+++ lib/readline/readline.h Mon Oct 9 20:32:56 2000 -@@ -32,6 +32,7 @@ - # include "keymaps.h" - # include "tilde.h" - #else -+# include - # include - # include - # include diff --git a/debian/patches/rl-setenv.dpatch b/debian/patches/rl-setenv.dpatch deleted file mode 100644 index 9ae1d08..0000000 --- a/debian/patches/rl-setenv.dpatch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: Prefer setenv over putenv - ---- lib/readline/shell.c~ 2004-10-17 13:07:37.000000000 +0200 -+++ lib/readline/shell.c 2004-10-17 13:06:48.000000000 +0200 -@@ -122,7 +122,7 @@ - { - char *b; - --#if defined (HAVE_PUTENV) -+#if 0 - b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1); - sprintf (b, "LINES=%d", lines); - putenv (b); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..4bb7a09 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,20 @@ +bashbug-editor.diff +deb-bash-config.diff +deb-examples.diff +man-arithmetic.diff +man-fignore.diff +man-bashrc.diff +man-bashlogout.diff +man-nocaseglob.diff +man-test.diff +man-test2.diff +rbash-manpage.diff +bash-default-editor.diff +input-err.diff +exec-redirections-doc.diff +bash-aliases-repeat.diff +# no-brk-caching.diff +use-system-texi2html.diff +man-macro-warnings.diff +man-vx-opts.diff +fix-rl_do_undo-crash.diff diff --git a/debian/patches/template.dpatch b/debian/patches/template.dpatch deleted file mode 100644 index e583619..0000000 --- a/debian/patches/template.dpatch +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/sh -e - -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -# DP: diff --git a/debian/patches/use-system-texi2html.diff b/debian/patches/use-system-texi2html.diff new file mode 100644 index 0000000..8aac63e --- /dev/null +++ b/debian/patches/use-system-texi2html.diff @@ -0,0 +1,13 @@ +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -70,8 +70,8 @@ TEXINDEX = texindex + TEX = tex + + MAKEINFO = makeinfo +-TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi +-TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html ++TEXI2DVI = texi2dvi ++TEXI2HTML = texi2html + MAN2HTML = ${BUILD_DIR}/support/man2html + HTMLPOST = ${srcdir}/htmlpost.sh + QUIETPS = #set this to -q to shut up dvips diff --git a/debian/rules b/debian/rules index 72c11c2..e46c27f 100755 --- a/debian/rules +++ b/debian/rules @@ -6,25 +6,47 @@ unexport LANG LC_ALL LC_CTYPE LC_COLLATE LC_TIME LC_NUMERIC LC_MESSAGES # architecture dependent variables -DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) -DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) -DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) -DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) -DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) - -VERSION := 3.3 +vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) +DPKG_VARS := $(shell dpkg-architecture) +DEB_BUILD_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH) +DEB_HOST_ARCH_OS ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH_OS) +DEB_HOST_GNU_CPU ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_CPU) +DEB_HOST_GNU_SYSTEM ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_SYSTEM) +DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH) + +VERSION := 4.2 #PKGVERSION := $(shell dpkg-parsechangelog \ # | sed -n '/Version:/s/\(.* \)\(.*\)-2\(.*\)/\2\3/p') #PKGVERSION := 3.0 #dpkg_ctrl_args := -v$(PKGVERSION) -VBinary-Version=$(PKGVERSION) +with_gfdl = yes + +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CC = $(DEB_HOST_GNU_TYPE)-gcc +else + CC = gcc +endif + +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIP = : +else + ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + STRIP = $(DEB_HOST_GNU_TYPE)-strip + else + STRIP = strip + endif +endif -with_gfdl = no -CC = gcc -CFLAGS = -g -O2 -Wall -SHELL = bash +dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS="hardening=+all" DEB_CFLAGS_MAINT_APPEND="-Wall" dpkg-buildflags +CFLAGS := $(shell $(dpkg_buildflags) --get CFLAGS) +CPPFLAGS := $(shell $(dpkg_buildflags) --get CPPFLAGS) +LDFLAGS := $(shell $(dpkg_buildflags) --get LDFLAGS) + +SHELL = /bin/bash YACC = bison -y IX = install -o 0 -g 0 @@ -35,59 +57,71 @@ with_installed_rl = no debflags = -PWD := $(shell pwd) p = vyatta-bash d = debian/$(p) +termcap_lib := $(if $(wildcard /usr/lib/libtinfo.so /usr/lib/$(DEB_HOST_MULTIARCH)/libtinfo.so), \ + -ltinfo, \ + -lncurses) + conf_args = \ - --with-curses \ - --disable-net-redirections \ --enable-largefile \ --prefix=/usr \ --infodir=/usr/share/info \ - --mandir=/usr/share/man + --mandir=/usr/share/man \ + --without-bash-malloc ifeq ($(with_installed_rl),yes) conf_args += --with-installed-readline endif +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + conf_args += --build $(DEB_HOST_GNU_TYPE) +else + conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +endif -conf_args += --host=$(DEB_HOST_GNU_TYPE) - -build: before-build bash-build +#build: bash-build static-build check +build: stamps/before-build bash-build check +build-arch: build +build-indep: build -before-build: +stamps/before-build: + dh_testdir +# dh_update_autotools_config + dh_autotools-dev_updateconfig + mkdir -p stamps : # see #327477, needed to have HAVE_DEV_STDIN defined (test -d /dev/fd && test -r /dev/stdin < /dev/null) \ || (test -d /proc/self/fd && test -r /dev/stdin < /dev/null) ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux freebsd)) - $(CC) $(CFLAGS) -o clear_console debian/clear_console.c -lncurses + $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o clear_console \ + debian/clear_console.c $(termcap_lib) endif + touch $@ # --------------------------------------------------------------------------- # build standard bash bash-build: $(MAKE) -f debian/rules do-build-bash \ - bash_src=bash \ - bash_patches="$(debian_patches)" \ + bash_src=. \ build=bash \ configure_args="$(conf_args)" -bash-configure: +bash-configure: stamps/before-build $(MAKE) -f debian/rules do-configure-bash \ - bash_src=bash \ - bash_patches="$(debian_patches)" \ + bash_src=. \ build=bash \ configure_args="$(conf_args)" -# --------------------------------------------------------------------------- - check: stamps/stamp-check stamps/stamp-check: bash-build @echo BEGIN test ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) -sh debian/locale-gen - LOCPATH=$(PWD)/locales \ - $(MAKE) -C build-bash test 2>&1 | tee build-bash/test-protocol + LOCPATH=$(CURDIR)/locales \ + time $(MAKE) -C build-bash test 2>&1 | tee build-bash/test-protocol + endif else @echo Suppress 'make' test, because this is cross build endif @@ -99,46 +133,52 @@ endif clean: dh_testdir dh_testroot - rm -rf stamps build-* bash bashdb + rm -rf stamps build-* rm -f debian/README.Debian rm -rf locales rm -f clear_console + rm -fr doc/bash.info doc/bash.pdf doc/bash.html doc/bashref.info doc/bashref.pdf doc/bashref.html + dh_autotools-dev_restoreconfig dh_clean # --------------------------------------------------------------------------- + install: bash-install bash-install: bash-build stamps/stamp-install-bash -stamps/stamp-install-bash: stamps/stamp-build-bash +stamps/stamp-install-bash: stamps/before-build stamps/stamp-build-bash dh_testdir dh_testroot - dh_clean -k -p$(p) + dh_prep -p$(p) dh_installdirs -p$(p) \ bin : # install it $(MAKE) -C build-bash install \ - CC='$(CC)' \ - CFLAGS='$(CFLAGS)' \ YACC="$(YACC)" \ - DESTDIR=$(PWD)/$(d) + DESTDIR=$(CURDIR)/$(d) + mv $(d)/usr/bin/vbash $(d)/bin/. rmdir $(d)/usr/bin + : # /etc/shells integration + $(ID) -D debian/shells.d/bash $(d)/usr/share/debianutils/shells.d/vbash + +# cat debian/README stamps/stamp-patch > debian/README.Debian cat debian/README > debian/README.Debian touch stamps/stamp-install-bash binary-bash: bash-install - rm -f debian/files dh_testdir dh_testroot - dh_installchangelogs -p$(p) bash/CWRU/changelog + dh_installchangelogs -p$(p) dh_installdocs -p$(p) \ - bash/{CHANGES,NEWS,COMPAT,doc/INTRO,POSIX} \ + CHANGES NEWS COMPAT doc/INTRO POSIX \ debian/{README.Debian,README.abs-guide,README.commands} \ debian/inputrc.arrows + dh_installmenu -p$(p) dh_strip -p$(p) dh_compress -p$(p) dh_fixperms -p$(p) @@ -161,21 +201,48 @@ binary: binary-arch do-build-$(build): stamps/stamp-build-$(build) stamps/stamp-build-$(build): stamps/stamp-configure-$(build) dh_testdir +ifneq (,$(profiled_build)) + $(MAKE) -C build-$(build) \ + CFLAGS='$(CFLAGS) -fprofile-generate' \ + YACC="$(YACC)" \ + TERMCAP_LIB="$(termcap_lib)" \ + deb_builddir=build-$(build)/ \ + $(debflags) + -sh debian/locale-gen + cp debian/run-my-gprof bash/tests/ + LOCPATH=$(CURDIR)/locales \ + time $(MAKE) -C build-$(build) TESTSCRIPT=run-my-gprof test 2>&1 \ + | tee build-bash/profile-protocol + $(MAKE) -C build-$(build) clean + rm -f build-$(build)/lib/malloc/malloc*.gc?? $(MAKE) -C build-$(build) \ - CC='$(CC)' \ - CFLAGS='$(CFLAGS)' \ + CFLAGS='$(CFLAGS) -fprofile-use' \ YACC="$(YACC)" \ + TERMCAP_LIB="$(termcap_lib)" \ deb_builddir=build-$(build)/ \ $(debflags) +else + $(MAKE) -C build-$(build) \ + YACC="$(YACC)" \ + TERMCAP_LIB="$(termcap_lib)" \ + deb_builddir=build-$(build)/ \ + $(debflags) +endif +ifeq ($(with_gfdl),yes) + $(MAKE) -C build-$(build)/doc \ + bash.info +endif touch stamps/stamp-build-$(build) do-configure-$(build): stamps/stamp-configure-$(build) -stamps/stamp-configure-$(build): stamps/stamp-unpack-$(bash_src) +stamps/stamp-configure-$(build): stamps/before-build dh_testdir rm -rf build-$(build) mkdir build-$(build) cd build-$(build) && \ - CC="$(CC)" CFLAGS="$(CFLAGS)" YACC="$(YACC)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + YACC="$(YACC)" \ ../$(bash_src)/configure $(configure_args) if ! grep -q '#define HAVE_DEV_STDIN 1' build-$(build)/config.h; then \ echo "HAVE_DEV_STDIN not defined, abortig build"; \ @@ -183,24 +250,37 @@ stamps/stamp-configure-$(build): stamps/stamp-unpack-$(bash_src) fi touch stamps/stamp-configure-$(build) -unpack-$(bash_src): stamps/stamp-unpack-$(bash_src) -stamps/stamp-unpack-$(bash_src): - mkdir -p stamps - rm -rf bash-$(VERSION) $(bash_src) - rm -f stamps/stamp-patch-$(bash_src){,-*} - tar c --exclude='bash-src.tar' --exclude='debian' --exclude='.git' \ - --exclude='stamps' --exclude='bash' --exclude='build-bash' \ - --exclude='build-min' --exclude='build-static' \ - -f bash-src.tar . - mkdir -p $(bash_src) - tar x -C $(bash_src) -f bash-src.tar - rm -f bash-src.tar - cp -p /usr/share/misc/config.* $(bash_src)/. - cp -p /usr/share/misc/config.* $(bash_src)/support/. - touch stamps/stamp-unpack-$(bash_src) - -.PHONY: unpack patch binary binary-arch clean build bash-build \ - check bash-configure binary-bash install bash-install +update-patches: + export QUILT_PATCHES=$(patchdir); \ + export QUILT_REFRESH_ARGS="--no-timestamps --no-index -p ab"; \ + export QUILT_DIFF_ARGS="--no-timestamps --no-index -p ab"; \ + while quilt push; do quilt refresh; done + +#unpack-$(bash_src): stamps/stamp-unpack-$(bash_src) +#stamps/stamp-unpack-$(bash_src): +# mkdir -p stamps +# rm -rf bash-$(VERSION) $(bash_src) +# rm -f stamps/stamp-patch-$(bash_src){,-*} +# tar xf bash-$(VERSION)*.tar.xz +# mv bash-$(VERSION) $(bash_src) +# rm -f bash/y.tab.? +# cp -p /usr/share/misc/config.* $(bash_src)/. +# cp -p /usr/share/misc/config.* $(bash_src)/support/. +# touch stamps/stamp-unpack-$(bash_src) + +remove-non-dfsg-files: + rm -f doc/article.* + rm -f doc/FAQ + rm -f doc/aosa-bash*.pdf + rm -f doc/rose94.* + +.NOTPARALLEL: build +.PHONY: unpack binary binary-arch clean \ + build bash-build \ + check \ + bash-configure \ + binary-bash \ + install bash-install # Local Variables: # mode: makefile diff --git a/debian/run-my-gprof b/debian/run-my-gprof new file mode 100644 index 0000000..7a495ba --- /dev/null +++ b/debian/run-my-gprof @@ -0,0 +1,32 @@ +#! /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 + +echo Running tests as test load ... + +for x in run-* +do + case $x in + $0|run-minimal|run-gprof|run-all) ;; + run-jobs|run-gprof) echo SKIP $x ;; + *.orig|*~) ;; + *) echo $x ; sh $x ;; + esac +done + +exit 0 diff --git a/debian/shells.d/bash b/debian/shells.d/bash new file mode 100644 index 0000000..7b96b9c --- /dev/null +++ b/debian/shells.d/bash @@ -0,0 +1,2 @@ +/bin/vbash +/usr/bin/vbash diff --git a/debian/skel.bash_profile b/debian/skel.bash_profile deleted file mode 100644 index 2b29651..0000000 --- a/debian/skel.bash_profile +++ /dev/null @@ -1,16 +0,0 @@ -# ~/.bash_profile: executed by bash(1) for login shells. -# see /usr/share/doc/bash/examples/startup-files for examples. -# the files are located in the bash-doc package. - -# the default umask is set in /etc/login.defs -#umask 022 - -# include .bashrc if it exists -if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi - -# set PATH so it includes user's private bin if it exists -if [ -d ~/bin ] ; then - PATH=~/bin:"${PATH}" -fi diff --git a/debian/skel.bashrc b/debian/skel.bashrc index 3ac9e8f..9360f69 100644 --- a/debian/skel.bashrc +++ b/debian/skel.bashrc @@ -3,70 +3,111 @@ # for examples # If not running interactively, don't do anything -[ -z "$PS1" ] && return +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth -# don't put duplicate lines in the history. See bash(1) for more options -export HISTCONTROL=ignoredups +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + # make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) -if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in -xterm-color) - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\H\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' - ;; -*) - PS1='${debian_chroot:+($debian_chroot)}\u@\H:\w\$ ' - ;; + xterm-color|*-256color) color_prompt=yes;; esac -# Comment in the above and uncomment this below for a color prompt -#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\H\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) - PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" ;; *) ;; esac -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -#if [ -f ~/.bash_aliases ]; then -# . ~/.bash_aliases -#fi - # enable color support of ls and also add handy aliases -if [ "$TERM" != "dumb" ]; then - eval "`dircolors -b`" +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' - #alias dir='ls --color=auto --format=vertical' - #alias vdir='ls --color=auto --format=long' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' fi +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + # some more ls aliases #alias ll='ls -l' #alias la='ls -A' #alias l='ls -CF' +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). -if [ -f /etc/bash_completion ]; then +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then . /etc/bash_completion + fi fi diff --git a/debian/skel.profile b/debian/skel.profile new file mode 100644 index 0000000..d89ea5a --- /dev/null +++ b/debian/skel.profile @@ -0,0 +1,27 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..1b45adf --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,2 @@ +# No texinfo file has a gfdl with an invariant or cover text +bash source: license-problem-gfdl-invariants diff --git a/debian/vyatta-bash.postinst b/debian/vyatta-bash.postinst index edf824e..5032102 100644 --- a/debian/vyatta-bash.postinst +++ b/debian/vyatta-bash.postinst @@ -1,9 +1,16 @@ -#! /bin/sh -e +#! /bin/bash + +set -e if [ -x /usr/sbin/add-shell ]; then /usr/sbin/add-shell /bin/vbash fi +# This should never happen. +if [ ! -e /bin/sh ]; then + ln -s vbash /bin/sh +fi + #DEBHELPER# exit 0 diff --git a/debian/vyatta-bash.postrm b/debian/vyatta-bash.postrm deleted file mode 100644 index 7039466..0000000 --- a/debian/vyatta-bash.postrm +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -set -e - -case "$1" in - upgrade|failed-upgrade|abort-install|abort-upgrade) - ;; - remove|purge|disappear) - if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then - /usr/sbin/remove-shell /bin/vbash - fi - ;; - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/bash.prerm b/debian/vyatta-bash.prerm similarity index 62% rename from debian/bash.prerm rename to debian/vyatta-bash.prerm index 52052a2..55d13ee 100644 --- a/debian/bash.prerm +++ b/debian/vyatta-bash.prerm @@ -4,11 +4,12 @@ set -e case "$1" in upgrade) - update-alternatives --remove builtins.7.gz \ - /usr/share/man/man7/bash-builtins.7.gz ;; remove|deconfigure) + if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then + /usr/sbin/remove-shell /bin/vbash + fi ;; failed-upgrade) diff --git a/debian/watch b/debian/watch index dd1998d..1ffb88f 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,3 @@ -version=2 +version=4 +opts=repacksuffix=+dfsg,dversionmangle=auto \ ftp://ftp.gnu.org/gnu/bash/bash-([\d\.]*).tar.gz debian uupdate diff --git a/dispose_cmd.h b/dispose_cmd.h index 0a3889c..6095d44 100644 --- a/dispose_cmd.h +++ b/dispose_cmd.h @@ -1,6 +1,6 @@ /* dispose_cmd.h -- Functions appearing in dispose_cmd.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,18 +23,18 @@ #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 *)); +extern void dispose_command PARAMS((COMMAND *)); +extern void dispose_word_desc PARAMS((WORD_DESC *)); +extern void dispose_word PARAMS((WORD_DESC *)); +extern void dispose_words PARAMS((WORD_LIST *)); +extern void dispose_word_array PARAMS((char **)); +extern void dispose_redirects PARAMS((REDIRECT *)); #if defined (COND_COMMAND) -extern void dispose_cond_node __P((COND_COM *)); +extern void dispose_cond_node PARAMS((COND_COM *)); #endif -extern void dispose_function_def_contents __P((FUNCTION_DEF *)); -extern void dispose_function_def __P((FUNCTION_DEF *)); +extern void dispose_function_def_contents PARAMS((FUNCTION_DEF *)); +extern void dispose_function_def PARAMS((FUNCTION_DEF *)); #endif /* !_DISPOSE_CMD_H_ */ diff --git a/doc/._fdl.texi b/doc/._fdl.texi deleted file mode 100644 index 3d0bb98..0000000 Binary files a/doc/._fdl.texi and /dev/null differ diff --git a/doc/._fdl.txt b/doc/._fdl.txt deleted file mode 100644 index cf58b16..0000000 Binary files a/doc/._fdl.txt and /dev/null differ diff --git a/doc/Makefile.in b/doc/Makefile.in index 3e0e68b..8bf775e 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,6 +1,6 @@ # This Makefile is for the Bash/documentation directory -*- text -*-. # -# Copyright (C) 2003-2009 Free Software Foundation, Inc. +# Copyright (C) 2003-2015 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 @@ -23,13 +23,15 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ + # SHELL = @MAKE_SHELL@ RM = rm -f topdir = @top_srcdir@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -38,6 +40,8 @@ datarootdir = @datarootdir@ infodir = @infodir@ +docdir = @docdir@ + # set this to a directory name to have the HTML files installed htmldir = @htmldir@ @@ -70,11 +74,12 @@ 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 +# experimental; uses external texi2dvi for now; this needs pdftex to be present +TEXI2PDF = texi2dvi --pdf TEXINPUTDIR = $(RL_LIBDIR)/doc SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS @@ -86,7 +91,9 @@ PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -s MKDIRS = ${SUPPORT_SRCDIR}/mkdirs # This should be a program that converts troff to an ascii-readable format -NROFF = groff -Tascii +# added the -P -c for benefit of Mac OS X, which insists on adding colors if +# it's not present +NROFF = groff -Tascii -P -c # This should be a program that converts troff to postscript GROFF = groff @@ -100,11 +107,11 @@ BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi .1.ps: $(RM) $@ - -${GROFF} -man $< > $@ + -${GROFF} -I${srcdir} -man $< > $@ .1.0: $(RM) $@ - -${NROFF} -man $< > $@ + -${NROFF} -I${srcdir} -man $< > $@ .1.html: $(RM) $@ @@ -120,11 +127,11 @@ BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi .3.ps: $(RM) $@ - -${GROFF} -man $< > $@ + -${GROFF} -I${srcdir} -man $< > $@ .3.0: $(RM) $@ - -${NROFF} -man $< > $@ + -${NROFF} -I${srcdir} -man $< > $@ .3.html: $(RM) $@ @@ -142,13 +149,17 @@ BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi ${RM} $@ -${DVIPS} $< -all: ps info dvi text html +#.texi.pdf: +# $(RM) $@ +# -${TEXI2PDF} $< + +all: ps info dvi text html $(MAN2HTML) 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 +INFOFILES = bashref.info bash.info MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0 HTMLFILES = bashref.html bash.html PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf @@ -161,20 +172,30 @@ html: ${HTMLFILES} pdf: ${PDFFILES} bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER) - ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi + $(RM) $@ + ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; } bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + $(RM) $@ $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi +# experimental +bashref.pdf: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + $(RM) $@ + ${SET_TEXINPUTS} $(TEXI2PDF) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; } + +# can also use: +# $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER) - $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi + $(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi -bash.info: bashref.info - ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \ +bash.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER) + $(RM) $@ + $(MAKEINFO) -o $@ --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi bash.txt: bash.1 bash.ps: bash.1 -bash.html: bash.1 $(MAN2HTML) +bash.html: bash.1 bashbug.ps: bashbug.1 builtins.ps: builtins.1 bash.1 rbash.ps: rbash.1 bash.1 @@ -187,10 +208,15 @@ article.ps: article.ms bashref.ps: bashref.dvi article.pdf: article.ps -bashref.pdf: bashref.dvi +#bashref.pdf: bashref.dvi +# experimental +bashref.pdf: bashref.texi bash.pdf: bash.ps rose94.pdf: rose94.ps +OTHER_DOCS = $(srcdir)/FAQ $(srcdir)/INTRO +OTHER_INSTALLED_DOCS = FAQ INTRO + $(MAN2HTML): ${topdir}/support/man2html.c -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html) @@ -218,13 +244,15 @@ maybe-clean: installdirs: -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir) -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir) + -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(docdir) -if test -n "$(htmldir)" ; then \ $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \ fi -install: info installdirs bash.info +install: info installdirs -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext} -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext} + -$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir) # 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} @@ -248,10 +276,21 @@ install_builtins: installdirs install_everything: install install_builtins +install-html: html + -if test -n "${htmldir}" ; then \ + $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \ + $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \ + fi + uninstall: -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext} -$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext} $(RM) $(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 --delete --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \ + else true; fi + -( cd $(DESTDIR)$(docdir) && $(RM) $(OTHER_INSTALLED_DOCS) ) -if test -n "$(htmldir)" ; then \ $(RM) $(DESTDIR)$(htmldir)/bash.html ; \ $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \ @@ -287,18 +326,18 @@ faq.mail: FAQ faq.headers.mail faq.version cat faq.headers.mail faq.version FAQ > $@ inst: bashref.texi - $(SHELL) ./mkinstall - cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL + $(SHELL) ${srcdir}/mkinstall -t ${topdir} -s ${srcdir} + cmp -s INSTALL ${topdir}/INSTALL || mv INSTALL ${topdir}/INSTALL $(RM) INSTALL posix: bashref.texi - $(SHELL) ./mkposix - cmp -s POSIX ../POSIX || mv POSIX ../POSIX + $(SHELL) ${srcdir}/mkposix -t ${topdir} -s ${srcdir} + cmp -s POSIX ${topdir}/POSIX || mv POSIX ${topdir}/POSIX $(RM) POSIX rbash: bashref.texi - $(SH) ./mkrbash - cmp -s RBASH ../RBASH || mv RBASH ../RBASH + $(SHELL) ${srcdir}/mkrbash -t ${topdir} -s ${srcdir} + cmp -s RBASH ${topdir}/RBASH || mv RBASH ${topdir}/RBASH $(RM) RBASH -xdist: pdf inst posix rbash +xdist: everything inst posix rbash diff --git a/doc/bash.0 b/doc/bash.0 index 675cd2f..1580b77 100644 --- a/doc/bash.0 +++ b/doc/bash.0 @@ -1,4 +1,4 @@ -BASH(1) BASH(1) +BASH(1) General Commands Manual BASH(1) @@ -6,10 +6,10 @@ NNAAMMEE bash - GNU Bourne-Again SHell SSYYNNOOPPSSIISS - bbaasshh [options] [file] + bbaasshh [options] [command_string | file] CCOOPPYYRRIIGGHHTT - Bash is Copyright (C) 1989-2009 by the Free Software Foundation, Inc. + Bash is Copyright (C) 1989-2022 by the Free Software Foundation, Inc. DDEESSCCRRIIPPTTIIOONN BBaasshh is an sshh-compatible command language interpreter that executes @@ -21,13 +21,17 @@ DDEESSCCRRIIPPTTIIOONN 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. + All of the single-character shell options documented in the description + of the sseett builtin command, including --oo, can be used as options when + the shell is invoked. In addition, bbaasshh interprets the following op- + tions when it is invoked: + + --cc If the --cc option is present, then commands are read from the + first non-option argument _c_o_m_m_a_n_d___s_t_r_i_n_g. If there are argu- + ments after the _c_o_m_m_a_n_d___s_t_r_i_n_g, the first argument is as- + signed to $$00 and any remaining arguments are assigned to the + positional parameters. The assignment to $$00 sets the name of + the shell, which is used in warning and error messages. --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). @@ -36,34 +40,33 @@ OOPPTTIIOONNSS --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- + set when invoking an interactive shell or when reading input + through a pipe. + --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 + 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 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. + 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. + BBaasshh also interprets a number of multi-character options. These op- + tions must appear on the command line before the single-character op- + tions 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). + of the eexxttddeebbuugg option to the sshhoopptt 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. @@ -74,8 +77,8 @@ OOPPTTIIOONNSS ----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). + tialization file _~_/_._b_a_s_h_r_c if the shell is interactive (see IINN-- + VVOOCCAATTIIOONN below). ----llooggiinn Equivalent to --ll. @@ -88,22 +91,24 @@ OOPPTTIIOONNSS 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). + files when it is invoked as a login shell (see IINNVVOOCCAATTIIOONN be- + low). ----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. + _~_/_._b_a_s_h_r_c if the shell is interactive. This option is on by de- + fault 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). + from the POSIX standard to match the standard (_p_o_s_i_x _m_o_d_e). See + SSEEEE AALLSSOO below for a reference to a document that details how + posix mode affects bash's behavior. ----rreessttrriicctteedd The shell becomes restricted (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). ----vveerrbboossee - Equivalent to --vv. + Equivalent to --vv. ----vveerrssiioonn Show version information for this instance of bbaasshh on the stan- @@ -116,8 +121,8 @@ AARRGGUUMMEENNTTSS 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 + tus of the last command executed in the script. If no commands are ex- + ecuted, 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. @@ -125,27 +130,29 @@ 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. + An _i_n_t_e_r_a_c_t_i_v_e shell is one started without non-option arguments (un- + less --ss is specified) 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-- + 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 filenames 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 + 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 + 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 login shell exits, or a non-interactive login shell + executes the eexxiitt builtin command, 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 @@ -153,29 +160,29 @@ IINNVVOOCCAATTIIOONN 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 + When bbaasshh is started non-interactively, to run a shell script, for ex- + ample, 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 + 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 + If bbaasshh is invoked with the name sshh, it tries to mimic the startup be- + havior of historical versions of sshh as closely as possible, while con- + forming to the POSIX standard as well. When invoked as an interactive + 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 in- + hibit 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. + effect. A non-interactive shell invoked with the name sshh does not at- + tempt 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, @@ -184,75 +191,79 @@ IINNVVOOCCAATTIIOONN 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. + connected to a network connection, as when executed by the historical + remote shell daemon, usually _r_s_h_d, or the secure shell daemon _s_s_h_d. If + bbaasshh determines it is being run non-interactively 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 neither _r_s_h_d nor _s_s_h_d 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. + the SSHHEELLLLOOPPTTSS, BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they ap- + pear 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- + 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 + 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- + 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 + A character that, when unquoted, separates words. One of the following: - || && ;; (( )) << >> ssppaaccee ttaabb + || && ;; (( )) << >> ssppaaccee ttaabb nneewwlliinnee ccoonnttrrooll ooppeerraattoorr A _t_o_k_e_n that performs a control function. It is one of the fol- lowing symbols: - |||| && &&&& ;; ;;;; (( )) || ||&& <> + |||| && &&&& ;; ;;;; ;;&& ;;;;&& (( )) || ||&& <> 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: + first word of a command (see SSHHEELLLL GGRRAAMMMMAARR below), the third word of a + ccaassee or sseelleecctt command (only iinn is valid), or the third word of a ffoorr + command (only iinn and ddoo are valid): - !! ccaassee ddoo ddoonnee eelliiff eellssee eessaacc ffii ffoorr ffuunnccttiioonn iiff iinn sseelleecctt tthheenn uunnttiill - wwhhiillee {{ }} ttiimmee [[[[ ]]]] + !! ccaassee ccoopprroocc ddoo ddoonnee eelliiff eellssee eessaacc ffii ffoorr ffuunnccttiioonn iiff iinn sseelleecctt + tthheenn uunnttiill wwhhiillee {{ }} ttiimmee [[[[ ]]]] SSHHEELLLL GGRRAAMMMMAARR + This section describes the syntax of the various forms of shell com- + mands. + 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 + 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. + and is passed as argument zero. The remaining words are passed as ar- + guments 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 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 + 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 ... ] + [ttiimmee [--pp]] [ ! ] _c_o_m_m_a_n_d_1 [ [|||||&&] _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 standard output of _c_o_m_m_a_n_d_1 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 _c_o_m_m_a_n_d_1(see RREEDDIIRREECCTTIIOONN below). If ||&& is used, + _c_o_m_m_a_n_d_1's standard error, in addition to its standard output, is con- + nected to _c_o_m_m_a_n_d_2's standard input through the pipe; it is shorthand + for 22>>&&11 ||. This implicit redirection of the standard error to the + standard output is performed after any redirections specified by _c_o_m_- + _m_a_n_d_1. 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 @@ -266,119 +277,153 @@ SSHHEELLLL GGRRAAMMMMAARR 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). + specified by POSIX. When the shell is in _p_o_s_i_x _m_o_d_e, it does not rec- + ognize ttiimmee as a reserved word if the next token begins with a `-'. + 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. + + When the shell is in _p_o_s_i_x _m_o_d_e, ttiimmee may be followed by a newline. In + this case, the shell displays the total user and system time consumed + by the shell and its children. The TTIIMMEEFFOORRMMAATT variable may be used to + specify the format of the time information. + + Each command in a multi-command pipeline, where pipes are created, is + executed in a _s_u_b_s_h_e_l_l, which is a separate process. See CCOOMMMMAANNDD EEXXEE-- + CCUUTTIIOONN EENNVVIIRROONNMMEENNTT for a description of subshells and a subshell envi- + ronment. If the llaassttppiippee option is enabled using the sshhoopptt builtin + (see the description of sshhoopptt below), the last element of a pipeline + may be run by the shell process when job control is not active. LLiissttss - A _l_i_s_t is a sequence of one or more pipelines separated by one of the + 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 <>. 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 + 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. + 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. These are + referred to as _a_s_y_n_c_h_r_o_n_o_u_s commands. 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 exe- + cuted. - AND and OR lists are sequences of one of more pipelines separated by + AND and OR lists are sequences of one or 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. + of zero (success). 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 + _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: + A _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d is one of the following. In most cases a _l_i_s_t in a + command's description may be separated from the rest of the command by + one or more newlines, and may be followed by a newline in place of a + semicolon. - (_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 executed in a subshell (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONN-- + MMEENNTT below for a description of a subshell environment). Vari- + able 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 _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 + _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 + 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"". + The _e_x_p_r_e_s_s_i_o_n is evaluated according to the rules described be- + low under AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN. If the value of the expression + is non-zero, the return status is 0; otherwise the return status + is 1. The _e_x_p_r_e_s_s_i_o_n undergoes the same expansions as if it + were within double quotes, but double quote characters in _e_x_- + _p_r_e_s_s_i_o_n are not treated specially and are removed. [[[[ _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 + 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. + The words between the [[[[ and ]]]] do not undergo word splitting + and pathname expansion. The shell performs tilde expansion, pa- + rameter and variable expansion, arithmetic expansion, command + substitution, process substitution, and quote removal on those + words (the expansions that would occur if the words were en- + closed in double quotes). Conditional 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. + the rules described below under PPaatttteerrnn MMaattcchhiinngg, as if the eexxtt-- + gglloobb shell option were enabled. The == operator is equivalent to + ====. If the nnooccaasseemmaattcchh shell option 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 pat- + tern may be quoted to force the quoted portion 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, + right of the operator is considered a POSIX extended regular ex- + pression and matched accordingly (using the POSIX _r_e_g_c_o_m_p and + _r_e_g_e_x_e_c interfaces usually described 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 condi- + tional expression's return value is 2. If the nnooccaasseemmaattcchh shell + option is enabled, the match is performed without regard to the + case of alphabetic characters. If any part of the pattern is + quoted, the quoted portion is matched literally. This means ev- + ery character in the quoted portion matches itself, instead of + having any special pattern matching meaning. If the pattern is + stored in a shell variable, quoting the variable expansion + forces the entire pattern to be matched literally. Treat + bracket expressions in regular expressions carefully, since nor- + mal quoting and pattern characters lose their meanings between + brackets. + + The pattern will match if it matches any part of the string. + Anchor the pattern using the ^^ and $$ regular expression opera- + tors to force it to match the entire string. The array variable + BBAASSHH__RREEMMAATTCCHH records which parts of the string matched the pat- + tern. The element of BBAASSHH__RREEMMAATTCCHH with index 0 contains the + portion of the string matching the entire regular expression. + Substrings matched by parenthesized subexpressions within the + regular expression are saved in the remaining BBAASSHH__RREEMMAATTCCHH in- + dices. The element of BBAASSHH__RREEMMAATTCCHH with index _n is the portion + of the string matching the _nth parenthesized subexpression. + Bash sets BBAASSHH__RREEMMAATTCCHH in the global scope; declaring it as a + local variable will lead to unexpected results. + + 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 + 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. @@ -388,68 +433,69 @@ SSHHEELLLL GGRRAAMMMMAARR 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 + 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 + 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 pa- + rameter 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 + 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. + items, and 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). + sseelleecctt then displays the PPSS33 prompt and reads a line from the + standard 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 sseelleecctt command completes and + returns 1. 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 exe- + cuted 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 + each _p_a_t_t_e_r_n in turn, using the matching rules described under + PPaatttteerrnn MMaattcchhiinngg below. The _w_o_r_d is expanded using tilde expan- + sion, parameter and variable expansion, arithmetic expansion, + command substitution, process substitution and quote removal. + Each _p_a_t_t_e_r_n examined is expanded using tilde expansion, parame- + ter and variable expansion, arithmetic expansion, command sub- + stitution, process substitution, and quote removal. If the nnoo-- + ccaasseemmaattcchh shell option is enabled, the match is performed with- + out regard to the case of alphabetic characters. When a match + is found, the corresponding _l_i_s_t is executed. If the ;;;; opera- + tor is used, no subsequent matches are attempted after the first + pattern match. Using ;;&& in place of ;;;; causes execution to con- + tinue with the _l_i_s_t associated with the next set of patterns. + Using ;;;;&& in place of ;;;; causes the shell to test the next pat- + tern list in the statement, if any, and execute any associated + _l_i_s_t on a successful match, continuing the case statement execu- + tion as if the pattern list had not matched. 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 @@ -458,15 +504,15 @@ SSHHEELLLL GGRRAAMMMMAARR 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. + wwhhiillee _l_i_s_t_-_1; ddoo _l_i_s_t_-_2; ddoonnee + uunnttiill _l_i_s_t_-_1; ddoo _l_i_s_t_-_2; ddoonnee + The wwhhiillee command continuously executes the list _l_i_s_t_-_2 as long + as the last command in the list _l_i_s_t_-_1 returns an exit status of + zero. The uunnttiill command is identical to the wwhhiillee command, ex- + cept that the test is negated: _l_i_s_t_-_2 is executed as long as the + last command in _l_i_s_t_-_1 returns a non-zero exit status. The exit + status of the wwhhiillee and uunnttiill commands is the exit status of the + last command executed in _l_i_s_t_-_2, 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 @@ -474,49 +520,76 @@ SSHHEELLLL GGRRAAMMMMAARR 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: + The syntax 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. + This creates a coprocess named _N_A_M_E. _c_o_m_m_a_n_d may be either a simple + command or a compound command (see above). _N_A_M_E is a shell variable + name. If _N_A_M_E is not supplied, the default name is CCOOPPRROOCC. + + The recommended form to use 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 form is recommended because simple commands result in the copro- + cess always being named CCOOPPRROOCC, and it is simpler to use and more com- + plete than the other compound commands. + + If _c_o_m_m_a_n_d is a compound command, _N_A_M_E is optional. The word following + ccoopprroocc determines whether that word is interpreted as a variable name: + it is interpreted as _N_A_M_E if it is not a reserved word that introduces + a compound command. If _c_o_m_m_a_n_d is a simple command, _N_A_M_E is not al- + lowed; this is to avoid confusion between _N_A_M_E and the first word of + the simple command. + + When the coprocess 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 de- + scriptor 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 as- + signed 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. Other than those created to execute command + and process substitutions, the file descriptors are not available in + subshells. + + The process ID of the shell spawned to execute the coprocess is avail- + able 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. + + Since the coprocess is created as an asynchronous command, the ccoopprroocc + command always returns success. 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. + 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.) + _f_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] + ffuunnccttiioonn _f_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 _f_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. If the + ffuunnccttiioonn reserved word is used, but the parentheses are not sup- + plied, the braces are recommended. _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d is executed + whenever _f_n_a_m_e is specified as the name of a simple command. + When in _p_o_s_i_x _m_o_d_e, _f_n_a_m_e must be a valid shell _n_a_m_e and may not + be the name of one of the POSIX _s_p_e_c_i_a_l _b_u_i_l_t_i_n_s. In default + mode, a function name can be any unquoted shell word that does + not contain $$. Any redirections (see RREEDDIIRREECCTTIIOONN below) speci- + fied 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-- @@ -545,9 +618,9 @@ QQUUOOTTIINNGG 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 - . If a \\ pair appears, and the backslash is not - itself quoted, the \\ is treated as a line continuation (that - is, it is removed from the input stream and effectively ignored). + . If a \\ pair appears, and the backslash is not it- + self quoted, the \\ 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 @@ -555,21 +628,24 @@ QQUUOOTTIINNGG 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 <>. 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. + when history expansion is enabled, !!. When the shell is in _p_o_s_i_x _m_o_d_e, + the !! has no special meaning within double quotes, even when history + expansion is enabled. The characters $$ and `` retain their special + meaning within double quotes. The backslash retains its special mean- + ing only when followed by one of the following characters: $$, ``, "", \\, + or <>. 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: + Character sequences of the form $$'_s_t_r_i_n_g' are treated as a special + variant of single quotes. The sequence expands to _s_t_r_i_n_g, with back- + slash-escaped characters in _s_t_r_i_n_g replaced as specified by the ANSI C + standard. Backslash escape sequences, if present, are decoded as fol- + lows: \\aa alert (bell) \\bb backspace \\ee @@ -582,58 +658,100 @@ QQUUOOTTIINNGG \\\\ 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 + \\?? question mark + \\_n_n_n the eight-bit character whose value is the octal value + _n_n_n (one to three octal digits) + \\xx_H_H the eight-bit character whose value is the hexadecimal value _H_H (one or two hex digits) + \\uu_H_H_H_H the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H (one to four hex digits) + \\UU_H_H_H_H_H_H_H_H + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H_H_H_H_H (one to eight hex digits) \\cc_x a control-_x character - The expanded result is single-quoted, as if the dollar sign had not + 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. + the string to be translated according to the current locale. The _g_e_t_- + _t_e_x_t infrastructure performs the lookup and translation, using the + LLCC__MMEESSSSAAGGEESS, TTEEXXTTDDOOMMAAIINNDDIIRR, and TTEEXXTTDDOOMMAAIINN shell variables. If the + current locale is CC or PPOOSSIIXX, if there are no translations available, + or if the string is not translated, the dollar sign is ignored. This + is a form of double quoting, so the string remains double-quoted by de- + fault, whether or not it is translated and replaced. If the nnooeexx-- + ppaanndd__ttrraannssllaattiioonn option is enabled using the sshhoopptt builtin, translated + strings are single-quoted instead of double-quoted. See the descrip- + tion of sshhoopptt below under SSHHEELLLLBUILTINCCOOMMMMAANNDDSS. 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). + 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 + 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-- + 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. + is not used (see AArriitthhmmeettiicc EExxppaannssiioonn below). Word splitting and path- + name expansion are not performed. Assignment statements may also ap- + pear as arguments to the aalliiaass, ddeeccllaarree, ttyyppeesseett, eexxppoorrtt, rreeaaddoonnllyy, and + llooccaall builtin commands (_d_e_c_l_a_r_a_t_i_o_n commands). When in _p_o_s_i_x _m_o_d_e, + these builtins may appear in a command after one or more instances of + the ccoommmmaanndd builtin and retain these assignment statement properties. 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. + or add to the variable's previous value. This includes arguments to + builtin commands such as ddeeccllaarree that accept assignment statements + (_d_e_c_l_a_r_a_t_i_o_n commands). When += is applied to a variable for which the + iinntteeggeerr attribute has been set, _v_a_l_u_e is evaluated as an arithmetic ex- + pression and added to the variable's current value, which is also eval- + uated. When += is applied to an array variable using compound assign- + ment (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 ap- + plied to a string-valued variable, _v_a_l_u_e is expanded and appended to + the variable's value. + + A variable can be assigned the _n_a_m_e_r_e_f attribute using the --nn option to + the ddeeccllaarree or llooccaall builtin commands (see the descriptions of ddeeccllaarree + and llooccaall below) to create a _n_a_m_e_r_e_f, or a reference to another vari- + able. This allows variables to be manipulated indirectly. Whenever + the nameref variable is referenced, assigned to, unset, or has its at- + tributes modified (other than using or changing the _n_a_m_e_r_e_f attribute + itself), the operation is actually performed on the variable specified + by the nameref variable's value. A nameref is commonly used within + shell functions to refer to a variable whose name is passed as an argu- + ment to the function. For instance, if a variable name is passed to a + shell function as its first argument, running + declare -n ref=$1 + inside the function creates a nameref variable rreeff whose value is the + variable name passed as the first argument. References and assignments + to rreeff, and changes to its attributes, are treated as references, as- + signments, and attribute modifications to the variable whose name was + passed as $$11. If the control variable in a ffoorr loop has the nameref + attribute, the list of words can be a list of shell variables, and a + name reference will be established for each word in the list, in turn, + when the loop is executed. Array variables cannot be given the nnaammeerreeff + attribute. However, nameref variables can reference array variables + and subscripted array variables. Namerefs can be unset using the --nn + option to the uunnsseett builtin. Otherwise, if uunnsseett is executed with the + name of a nameref variable as an argument, the variable referenced by + the nameref variable will be unset. 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, @@ -650,16 +768,24 @@ 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" + the expansion is not within double quotes, each positional pa- + rameter expands to a separate word. In contexts where it is + performed, those words are subject to further word splitting and + pathname expansion. When the expansion occurs within double + quotes, it expands to a single word with the value of each pa- + rameter separated by the first character of the IIFFSS special + variable. That is, "$$**" is equivalent 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 separated by spaces. If IIFFSS is + null, the parameters are joined without intervening separators. + @@ Expands to the positional parameters, starting from one. In + contexts where word splitting is performed, this expands each + positional parameter to a separate word; if not within double + quotes, these words are subject to word splitting. In contexts + where word splitting is not performed, this expands to a single + word with each positional parameter separated by a space. When + the expansion occurs within double quotes, each parameter ex- + pands 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 @@ -670,33 +796,33 @@ PPAARRAAMMEETTEERRSS ?? 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. + tion, by the sseett builtin command, or those set by the shell it- + self (such as the --ii option). + $$ Expands to the process ID of the shell. In a subshell, it ex- + pands to the process ID of the current shell, not the subshell. + !! Expands to the process ID of the job most recently placed into + the background, whether executed as an asynchronous command or + using the bbgg builtin (see JJOOBB CCOONNTTRROOLL below). 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 + set to the filename 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 + __ At shell startup, set to the 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 simple command executed in the foreground, 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. + BBAASSHH Expands to the full filename used to invoke this instance of bbaasshh. BBAASSHHOOPPTTSS A colon-separated list of enabled shell options. Each word in @@ -707,23 +833,30 @@ PPAARRAAMMEETTEERRSS 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 + 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. + that do not require bbaasshh to be re-initialized. Assignments to + BBAASSHHPPIIDD have no effect. If BBAASSHHPPIIDD is unset, it loses its spe- + cial properties, even if it is subsequently reset. 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. + internal list of aliases as maintained by the aalliiaass builtin. + Elements added to this array appear in the alias list; however, + unsetting array elements currently does not cause aliases to be + removed from the alias list. If BBAASSHH__AALLIIAASSEESS is unset, it loses + its special properties, even if it is subsequently reset. BBAASSHH__AARRGGCC - An array variable whose values are the number of parameters in + 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 + 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) + extended debugging mode (see the description of the eexxttddeebbuugg op- + tion to the sshhoopptt builtin below). Setting eexxttddeebbuugg after the + shell has started to execute a script, or referencing this vari- + able when eexxttddeebbuugg is not set, may result in inconsistent val- + ues. BBAASSHH__AARRGGVV An array variable containing all of the parameters in the cur- rent bbaasshh execution call stack. The final parameter of the last @@ -731,82 +864,92 @@ PPAARRAAMMEETTEERRSS 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) + the description of the eexxttddeebbuugg option to the sshhoopptt builtin be- + low). Setting eexxttddeebbuugg after the shell has started to execute a + script, or referencing this variable when eexxttddeebbuugg is not set, + may result in inconsistent values. + BBAASSHH__AARRGGVV00 + When referenced, this variable expands to the name of the shell + or shell script (identical to $$00; see the description of special + parameter 0 above). Assignment to BBAASSHH__AARRGGVV00 causes the value + assigned to also be assigned to $$00. If BBAASSHH__AARRGGVV00 is unset, it + loses its special properties, even if it is subsequently reset. 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. + however, unsetting array elements currently does not cause com- + mand names to be removed from the hash table. If BBAASSHH__CCMMDDSS is + unset, it loses its special properties, even if it is subse- + quently reset. 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. + trap. If BBAASSHH__CCOOMMMMAANNDD is unset, it loses its special proper- + ties, even if it is subsequently reset. 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. + An array variable whose members are the line numbers in source + files where each corresponding member of FFUUNNCCNNAAMMEE was invoked. + $${{BBAASSHH__LLIINNEENNOO[[_$_i]]}} is the line number in the source file + ($${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}}) where $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called (or + $${{BBAASSHH__LLIINNEENNOO[[_$_i_-_1]]}} if referenced within another shell func- + tion). Use LLIINNEENNOO to obtain the current line number. + BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH + A colon-separated list of directories in which the shell looks + for dynamically loadable builtins specified by the eennaabbllee com- + mand. 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. + 0 is the portion of the string matching the entire regular ex- + pression. The element with index _n is the portion of the string + matching the _nth parenthesized subexpression. BBAASSHH__SSOOUURRCCEE - An array variable whose members are the source filenames corre- - sponding to the elements in the FFUUNNCCNNAAMMEE array variable. + An array variable whose members are the source filenames where + the corresponding shell function names in the FFUUNNCCNNAAMMEE array + variable are defined. The shell function $${{FFUUNNCCNNAAMMEE[[_$_i]]}} is de- + fined in the file $${{BBAASSHH__SSOOUURRCCEE[[_$_i]]}} and called from + $${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}}. BBAASSHH__SSUUBBSSHHEELLLL - Incremented by one each time a subshell or subshell environment - is spawned. The initial value is 0. + Incremented by one within each subshell or subshell environment + when the shell begins executing in that environment. The ini- + tial value is 0. If BBAASSHH__SSUUBBSSHHEELLLL is unset, it loses its spe- + cial properties, even if it is subsequently reset. 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[[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). - + shell functions and external commands invoked by the program- + mable 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 + 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). - + equal to $${{##CCOOMMPP__LLIINNEE}}. This variable is available only in + shell functions and external commands invoked by the program- + mable 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, @@ -814,179 +957,246 @@ PPAARRAAMMEETTEERRSS 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). - + shell functions and external commands invoked by the program- + mable 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- + 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 + 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 de- + scribed above. This variable is available only in shell func- + tions invoked by the programmable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). - + CCOOPPRROOCC An array variable (see AArrrraayyss below) created to hold the file + descriptors for output from and input to an unnamed coprocess + (see CCoopprroocceesssseess above). 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 + 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 + 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. - + able will not change the current directory. If DDIIRRSSTTAACCKK is un- + set, it loses its special properties, even if it is subsequently + reset. + EEPPOOCCHHRREEAALLTTIIMMEE + Each time this parameter is referenced, it expands to the number + of seconds since the Unix Epoch (see _t_i_m_e(3)) as a floating + point value with micro-second granularity. Assignments to + EEPPOOCCHHRREEAALLTTIIMMEE are ignored. If EEPPOOCCHHRREEAALLTTIIMMEE is unset, it loses + its special properties, even if it is subsequently reset. + EEPPOOCCHHSSEECCOONNDDSS + Each time this parameter is referenced, it expands to the number + of seconds since the Unix Epoch (see _t_i_m_e(3)). Assignments to + EEPPOOCCHHSSEECCOONNDDSS are ignored. If EEPPOOCCHHSSEECCOONNDDSS is unset, it loses + its special properties, even if it is subsequently 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. - + tom-most element (the one with the highest index) is "main". + This variable exists only when a shell function is executing. + Assignments to FFUUNNCCNNAAMMEE have no effect. If FFUUNNCCNNAAMMEE is unset, + it loses its special properties, even if it is subsequently re- + set. + + This variable can be used with BBAASSHH__LLIINNEENNOO and BBAASSHH__SSOOUURRCCEE. + Each element of FFUUNNCCNNAAMMEE has corresponding elements in + BBAASSHH__LLIINNEENNOO and BBAASSHH__SSOOUURRCCEE to describe the call stack. For in- + stance, $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called from the file + $${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}} at line number $${{BBAASSHH__LLIINNEENNOO[[_$_i]]}}. The + ccaalllleerr builtin displays the current call stack using this infor- + mation. 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. - + current user is a member. Assignments to GGRROOUUPPSS have no effect. + 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. - + command. Assignments to HHIISSTTCCMMDD are ignored. If HHIISSTTCCMMDD is un- + set, 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- + 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 + 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_- + 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. - + MMAAPPFFIILLEE + An array variable (see AArrrraayyss below) created to hold the text + read by the mmaappffiillee builtin when no variable name is supplied. 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 + RRAANNDDOOMM Each time this parameter is referenced, it expands to a random + integer between 0 and 32767. Assigning a value to RRAANNDDOOMM ini- + tializes (seeds) the sequence of random numbers. If RRAANNDDOOMM is + unset, it loses its special properties, even if it is subse- + quently reset. + RREEAADDLLIINNEE__AARRGGUUMMEENNTT + Any numeric argument given to a readline command that was de- + fined using "bind -x" (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) when it + was invoked. + RREEAADDLLIINNEE__LLIINNEE + The contents of the rreeaaddlliinnee line buffer, for use with "bind -x" + (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + RREEAADDLLIINNEE__MMAARRKK + The position of the mark (saved insertion point) in the rreeaaddlliinnee + line buffer, for use with "bind -x" (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS + below). The characters between the insertion point and the mark + are often called the _r_e_g_i_o_n. + RREEAADDLLIINNEE__PPOOIINNTT + The position of the insertion point in the rreeaaddlliinnee line buffer, + for use with "bind -x" (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). + 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. - + Each time this parameter is referenced, it expands to the number + of seconds since shell invocation. 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. + The number of seconds at shell invocation and the current time + are always determined by querying the system clock. If SSEECCOONNDDSS + is unset, it loses its special properties, even if it is subse- + quently 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 + 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 + 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. - + SSRRAANNDDOOMM + This variable expands to a 32-bit pseudo-random number each time + it is referenced. The random number generator is not linear on + systems that support /dev/urandom or _a_r_c_4_r_a_n_d_o_m, so each re- + turned number has no relationship to the numbers preceding it. + The random number generator cannot be seeded, so assignments to + this variable have no effect. If SSRRAANNDDOOMM is unset, it loses its + special properties, even if it is subsequently reset. 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. - + The following variables are used by the shell. In some cases, bbaasshh as- + signs a default value to a variable; these cases are noted below. + + BBAASSHH__CCOOMMPPAATT + The value is used to set the shell's compatibility level. See + SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below for a description of the various + compatibility levels and their effects. The value may be a dec- + imal number (e.g., 4.2) or an integer (e.g., 42) corresponding + to the desired compatibility level. If BBAASSHH__CCOOMMPPAATT is unset or + set to the empty string, the compatibility level is set to the + default for the current version. If BBAASSHH__CCOOMMPPAATT is set to a + value that is not one of the valid compatibility levels, the + shell prints an error message and sets the compatibility level + to the default for the current version. The valid values corre- + spond to the compatibility levels described below under SSHHEELLLL + CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE. For example, 4.2 and 42 are valid values + that correspond to the ccoommppaatt4422 sshhoopptt option and set the compat- + ibility level to 42. The current version is also a valid value. 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". + arithmetic expansion before being interpreted as a filename. + PPAATTHH is not used to search for the resultant filename. 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 + If set to an integer corresponding to a valid file descriptor, + bbaasshh will write the trace output generated when _s_e_t _-_x is en- + abled 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. + CCDDPPAATTHH The search path for the ccdd command. This is a colon-separated + list of directories in which the shell looks for destination di- + rectories specified by the ccdd command. A sample value is + ".:~:/usr". + CCHHIILLDD__MMAAXX + Set the number of exited child status values for the shell to + remember. Bash will not allow this value to be decreased below + a POSIX-mandated minimum, and there is a maximum value (cur- + rently 8192) that this may not exceed. The minimum value is + system-dependent. CCOOLLUUMMNNSS - Used by the sseelleecctt builtin command to determine the terminal - width when printing selection lists. Automatically set upon - receipt of a SIGWINCH. + Used by the sseelleecctt compound command to determine the terminal + width when printing selection lists. Automatically set if the + cchheecckkwwiinnssiizzee option is enabled or in an interactive shell upon + receipt of a SSIIGGWWIINNCCHH. 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). + generated by a shell function invoked by the programmable com- + pletion facility (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn below). Each ar- + ray element contains one possible completion. 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. + an Emacs shell buffer and disables line editing. + EENNVV Expanded and executed similarly to BBAASSHH__EENNVV (see IINNVVOOCCAATTIIOONN + above) when an interactive shell is invoked in _p_o_s_i_x _m_o_d_e. + EEXXEECCIIGGNNOORREE + A colon-separated list of shell patterns (see PPaatttteerrnn MMaattcchhiinngg) + defining the list of filenames to be ignored by command search + using PPAATTHH. Files whose full pathnames match one of these pat- + terns are not considered executable files for the purposes of + completion and command execution via PPAATTHH lookup. This does not + affect the behavior of the [[, tteesstt, and [[[[ commands. Full path- + names in the command hash table are not subject to EEXXEECCIIGGNNOORREE. + Use this variable to ignore shared library files that have the + executable bit set, but are not executable files. The pattern + matching honors the setting of the eexxttgglloobb shell option. 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:~". + FFUUNNCCNNEESSTT + If set to a numeric value greater than 0, defines a maximum + function nesting level. Function invocations that exceed this + nesting level will cause the current command to abort. 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. + A colon-separated list of patterns defining the set of file + names to be ignored by pathname expansion. If a file name + 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 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 @@ -1001,66 +1211,78 @@ PPAARRAAMMEETTEERRSS 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. + the command history is not saved when a 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. + this variable is assigned a value, the history file is trun- + cated, if necessary, to contain no more than that number of + lines by removing the oldest entries. The history file is also + truncated to this size after writing it when a shell exits. If + the value is 0, the history file is truncated to zero size. + Non-numeric values and numeric values less than zero inhibit + truncation. The shell sets the default value to the value of + HHIISSTTSSIIZZEE after reading any startup files. 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. + lines should be saved on the history list. Each pattern is an- + chored 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 HHIISSTTCCOONNTTRROOLL are + applied. In addition to the normal shell pattern matching char- + acters, `&&' matches the previous history line. `&&' may be es- + caped using a backslash; the backslash is removed before at- + tempting a match. The second and subsequent lines of a multi- + line compound command are not tested, and are added to the his- + tory regardless of the value of HHIISSTTIIGGNNOORREE. The pattern match- + ing honors the setting of the eexxttgglloobb shell option. HHIISSTTSSIIZZEE - The number of commands to remember in the command history (see - HHIISSTTOORRYY below). The default value is 500. + The number of commands to remember in the command history (see + HHIISSTTOORRYY below). If the value is 0, commands are not saved in + the history list. Numeric values less than zero result in every + command being saved on the history list (there is no limit). + The shell sets the default value to 500 after reading any + startup files. HHIISSTTTTIIMMEEFFOORRMMAATT - If this variable is set and not null, its value is used as a + 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 + 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 + 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- + The list of possible hostname completions may be changed while + the shell is running; the next time hostname completion is at- + tempted 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 + 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 af- + ter expansion and to split lines into words with the rreeaadd builtin command. The default value is ``''. 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 + 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). + The filename for the rreeaaddlliinnee startup file, overriding the de- + fault of _~_/_._i_n_p_u_t_r_c (see RREEAADDLLIINNEE below). + IINNSSIIDDEE__EEMMAACCSS + If this variable appears in the environment when the shell + starts, bbaasshh assumes that it is running inside an Emacs shell + buffer and may disable line editing, depending on the value of + TTEERRMM. 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__ @@ -1068,8 +1290,8 @@ PPAARRAAMMEETTEERRSS 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. + of range expressions, equivalence classes, and collating se- + quences 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 @@ -1080,29 +1302,34 @@ PPAARRAAMMEETTEERRSS 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 + LLCC__TTIIMMEE + This variable determines the locale category used for data and + time formatting. + LLIINNEESS Used by the sseelleecctt compound command to determine the column + length for printing selection lists. Automatically set if the + cchheecckkwwiinnssiizzee option is enabled or in an interactive shell 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. + MMAAIILL If this parameter is set to a file or directory name and the + MMAAIILLPPAATTHH variable is not set, bbaasshh informs the user of the ar- + rival of mail in the specified file or Maildir-format directory. MMAAIILLCCHHEECCKK - Specifies how often (in seconds) bbaasshh checks for mail. The - default is 60 seconds. When it is time to check for mail, the + Specifies how often (in seconds) bbaasshh checks for mail. The de- + fault 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: + A colon-separated list of filenames to be checked for mail. The + message to be printed when mail arrives in a particular file may + be specified by separating the filename 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). + BBaasshh can be configured to supply a default value for this vari- + able (there is no value by default), but the location 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 @@ -1113,22 +1340,29 @@ PPAARRAAMMEETTEERRSS 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''. + set by the administrator who installs bbaasshh. A common value is + ``/usr/local/bin:/usr/lo- + cal/sbin:/usr/bin:/usr/sbin:/bin:/sbin''. 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. + 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. When the shell enters + _p_o_s_i_x _m_o_d_e, it sets this variable if it was not already set. PPRROOMMPPTT__CCOOMMMMAANNDD - If set, the value is executed as a command prior to issuing each - primary prompt. + If this variable is set, and is an array, the value of each set + element is executed as a command prior to issuing each primary + prompt. If this is set but not an array variable, its value is + used as a command to execute instead. 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. + PPSS00 The value of this parameter is expanded (see PPRROOMMPPTTIINNGG below) + and displayed by interactive shells after reading a command and + before the command is executed. PPSS11 The value of this parameter is expanded (see PPRROOMMPPTTIINNGG below) and used as the primary prompt string. The default value is ``\\ss--\\vv\\$$ ''. @@ -1137,13 +1371,13 @@ PPAARRAAMMEETTEERRSS 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. + value is printed before each command bbaasshh displays during an ex- + ecution trace. The first character of the expanded value of PPSS44 + is replicated multiple times, as necessary, to indicate multiple + levels of indirection. The default is ``++ ''. + SSHHEELLLL This variable expands to the full pathname to the shell. 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 @@ -1169,121 +1403,158 @@ PPAARRAAMMEETTEERRSS 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 + $$''\\nnrreeaall\\tt%%33llRR\\nnuusseerr\\tt%%33llUU\\nnssyyss\\tt%%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- + TTMMOOUUTT If set to a value greater than zero, TTMMOOUUTT is treated as the de- + fault 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. - + interpreted as the number of seconds to wait for a line of input + after issuing the primary prompt. BBaasshh terminates after waiting + for that number of seconds if a complete line of 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- + 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 + 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 + 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- + 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 + 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. + 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 ref- + erenced using arbitrary strings. Unless otherwise noted, indexed array + indices must be non-negative integers. 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. + an arithmetic expression that must evaluate to a number. To explicitly + declare an indexed array, use ddeeccllaarree --aa _n_a_m_e (see SSHHEELLLL BBUUIILLTTIINN CCOOMM-- + MMAANNDDSS 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. + 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 may be of the form [_s_u_b_- + _s_c_r_i_p_t]=_s_t_r_i_n_g. Indexed array assignments do not require anything but + _s_t_r_i_n_g. Each _v_a_l_u_e in the list is expanded using all the shell expan- + sions described below under EEXXPPAANNSSIIOONN. When assigning to indexed ar- + rays, 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. + + When assigning to an associative array, the words in a compound assign- + ment may be either assignment statements, for which the subscript is + required, or a list of words that is interpreted as a sequence of al- + ternating keys and values: _n_a_m_e=(( _k_e_y_1 _v_a_l_u_e_1 _k_e_y_2 _v_a_l_u_e_2 ...)). These + are treated identically to _n_a_m_e=(( [_k_e_y_1]=_v_a_l_u_e_1 [_k_e_y_2]=_v_a_l_u_e_2 ...)). + The first word in the list determines how the remaining words are in- + terpreted; all assignments in a list must be of the same type. When + using key/value pairs, the keys may not be missing or empty; a final + missing value is treated like the empty string. 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. + 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 in- + troduced above. When assigning to an indexed array, if _n_a_m_e is sub- + scripted by a negative number, that number is interpreted as relative + to one greater than the maximum index of _n_a_m_e, so negative indices + count back from the end of the array, and an index of -1 references the + last element. + + The += operator will append to an array variable when assigning using + the compound assignment syntax; see PPAARRAAMMEETTEERRSS above. - Any element of an array may be referenced using ${_n_a_m_e[_s_u_b_s_c_r_i_p_t]}. + 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 + _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 + 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 + 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 ex- + pansion 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 elements in the ar- + ray. If the _s_u_b_s_c_r_i_p_t used to reference an element of an indexed array + evaluates to a number less than zero, it is interpreted as relative to + one greater than the maximum index of the array, so negative indices + count back from the end of the array, and an index of -1 references the + last element. + + Referencing an array variable without a subscript is equivalent to ref- + erencing the array with a subscript of 0. Any reference to a variable + using a valid subscript is legal, and bbaasshh will create an array if nec- + essary. + + 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. + It is possible to obtain the keys (indices) of an array as well as the + values. ${!!_n_a_m_e[_@]} and ${!!_n_a_m_e[_*]} expand to the indices assigned in + array variable _n_a_m_e. The treatment when in double quotes is similar to + the expansion of the special parameters _@ and _* within double quotes. + + The uunnsseett builtin is used to destroy arrays. uunnsseett _n_a_m_e[_s_u_b_s_c_r_i_p_t] de- + stroys the array element at index _s_u_b_s_c_r_i_p_t, for both indexed and asso- + ciative arrays. Negative subscripts to indexed arrays are interpreted + as described above. Unsetting the last element of an array variable + does not unset the variable. uunnsseett _n_a_m_e, where _n_a_m_e is an array, re- + moves the entire array. 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 + @@, behaves differently depending on whether _n_a_m_e is an indexed or asso- + ciative array. If _n_a_m_e is an associative array, this unsets the ele- + ment with subscript ** or @@. If _n_a_m_e is an indexed array, unset removes + all of the elements but does not remove the array itself. + + When using a variable name with a subscript as an argument to a com- + mand, such as with uunnsseett, without using the word expansion syntax de- + scribed above, the argument is subject to pathname expansion. If path- + name expansion is not desired, the argument should be quoted. 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. + specify an indexed array and a --AA option to specify an associative ar- + ray. If both options are supplied, --AA takes precedence. 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 assignments. EEXXPPAANNSSIIOONN Expansion is performed on the command line after it has been split into @@ -1291,17 +1562,25 @@ EEXXPPAANNSSIIOONN _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. + The order of expansions is: brace expansion; tilde expansion, parameter + and variable expansion, arithmetic expansion, and command substitution + (done in a left-to-right fashion); word splitting; and pathname expan- + sion. 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. + able: _p_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n. This is performed at the same time as + tilde, parameter, variable, and arithmetic expansion and command sub- + stitution. - 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). + After these expansions are performed, quote characters present in the + original word are removed unless they have been quoted themselves + (_q_u_o_t_e _r_e_m_o_v_a_l). + + Only brace expansion, word splitting, and pathname expansion can in- + crease the number of words of the expansion; other expansions expand a + single word to a single word. The only exceptions to this are the ex- + pansions of "$$@@" and "$${{_n_a_m_e[[@@]]}}", and, in most cases, $$** 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- @@ -1318,17 +1597,17 @@ EEXXPPAANNSSIIOONN 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. + either integers or single letters, 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 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 + letters are supplied, the expression expands to each character lexico- + graphically between _x and _y, inclusive, using the default C locale. + Note that both _x and _y must be of the same type (integer or letter). + 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 @@ -1336,11 +1615,12 @@ EEXXPPAANNSSIIOONN 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 + closing braces, and at least one unquoted comma or a valid sequence ex- + pression. 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. + sion, the string $${{ is not considered eligible for brace expansion, and + inhibits brace expansion until the closing }}. This construct is typically used as shorthand when the common prefix of the strings to be generated is longer than in the above example: @@ -1349,36 +1629,36 @@ EEXXPPAANNSSIIOONN 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 + 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 + 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 + If the tilde-prefix is a `~+', the value of the shell variable PPWWDD re- + places 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- + 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 @@ -1386,9 +1666,14 @@ EEXXPPAANNSSIIOONN 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. + also performed. Consequently, one may use filenames with tildes in as- + signments to PPAATTHH, MMAAIILLPPAATTHH, and CCDDPPAATTHH, and the shell assigns the ex- + panded value. + + Bash also performs tilde expansion on words satisfying the conditions + of variable assignments (as described above under PPAARRAAMMEETTEERRSS) when they + appear as arguments to simple commands. Bash does not do this, except + for the _d_e_c_l_a_r_a_t_i_o_n commands listed above, when in _p_o_s_i_x _m_o_d_e. PPaarraammeetteerr EExxppaannssiioonn The `$$' character introduces parameter expansion, command substitution, @@ -1398,77 +1683,102 @@ EEXXPPAANNSSIIOONN 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. + escaped by a backslash or within a quoted string, and not within an em- + bedded arithmetic expansion, command substitution, or parameter expan- + sion. ${_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. + to be interpreted as part of its name. The _p_a_r_a_m_e_t_e_r is a shell + parameter as described above PPAARRAAMMEETTEERRSS) or an array reference + (AArrrraayyss). + + If the first character of _p_a_r_a_m_e_t_e_r is an exclamation point (!!), and + _p_a_r_a_m_e_t_e_r is not a _n_a_m_e_r_e_f, it introduces a level of indirection. BBaasshh + uses the value formed by expanding the rest of _p_a_r_a_m_e_t_e_r as the new _p_a_- + _r_a_m_e_t_e_r; this is then expanded and that value is used in the rest of + the expansion, rather than the expansion of the original _p_a_r_a_m_e_t_e_r. + This is known as _i_n_d_i_r_e_c_t _e_x_p_a_n_s_i_o_n. The value is subject to tilde ex- + pansion, parameter expansion, command substitution, and arithmetic ex- + pansion. If _p_a_r_a_m_e_t_e_r is a nameref, this expands to the name of the + parameter referenced by _p_a_r_a_m_e_t_e_r instead of performing the complete + indirect expansion. The exceptions to this are the expansions 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 indirec- + tion. 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. + When not performing substring expansion, using the forms documented be- + low (e.g., ::--), bbaasshh tests for a parameter that is unset or null. + Omitting the colon results in a test only for a parameter that is un- + set. ${_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 + 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. + AAssssiiggnn DDeeffaauulltt VVaalluueess. If _p_a_r_a_m_e_t_e_r is unset or null, the ex- + pansion 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 pa- + rameters 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 + 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 + 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. + SSuubbssttrriinngg EExxppaannssiioonn. Expands to up to _l_e_n_g_t_h characters of the + value of _p_a_r_a_m_e_t_e_r starting at the character specified by _o_f_f_- + _s_e_t. If _p_a_r_a_m_e_t_e_r is @@ or **, an indexed array subscripted by @@ + or **, or an associative array name, the results differ as de- + scribed below. If _l_e_n_g_t_h is omitted, expands to the substring + of the value of _p_a_r_a_m_e_t_e_r starting at the character specified by + _o_f_f_s_e_t and extending to the end of the value. _l_e_n_g_t_h and _o_f_f_s_e_t + are arithmetic expressions (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN below). + 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. + used as an offset in characters from the end of the value of _p_a_- + _r_a_m_e_t_e_r. If _l_e_n_g_t_h evaluates to a number less than zero, it is + interpreted as an offset in characters from the end of the value + of _p_a_r_a_m_e_t_e_r rather than a number of characters, and the expan- + sion is the characters between _o_f_f_s_e_t and that result. Note + that a negative offset must be separated from the colon by at + least one space to avoid being confused with the ::-- expansion. + + If _p_a_r_a_m_e_t_e_r is @@ or **, the result is _l_e_n_g_t_h positional parame- + ters beginning at _o_f_f_s_e_t. A negative _o_f_f_s_e_t is taken relative + to one greater than the greatest positional parameter, so an + offset of -1 evaluates to the last positional parameter. It is + an expansion error if _l_e_n_g_t_h evaluates to a number less than + zero. + + If _p_a_r_a_m_e_t_e_r is an indexed array name subscripted 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. It is an + expansion error if _l_e_n_g_t_h evaluates to a number less than zero. + + Substring expansion applied to an associative array produces un- + defined results. + + Substring indexing is zero-based unless the positional parame- + ters are used, in which case the indexing starts at 1 by de- + fault. 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 + 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 @@ -1476,76 +1786,119 @@ EEXXPPAANNSSIIOONN ${!!_n_a_m_e[_@]} ${!!_n_a_m_e[_*]} - LLiisstt ooff aarrrraayy kkeeyyss.. If _n_a_m_e is an array variable, expands to + 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. + 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 sub- + stituted 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 substituted is + the number of elements in the array. If _p_a_r_a_m_e_t_e_r is an indexed + array name subscripted by a negative number, that number is in- + terpreted as relative to one greater than the maximum index of + _p_a_r_a_m_e_t_e_r, so negative indices count back from the end of the + array, and an index of -1 references the last element. ${_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 + RReemmoovvee mmaattcchhiinngg pprreeffiixx ppaatttteerrnn. The _w_o_r_d is expanded to produce + a pattern just as in pathname expansion, and matched against the + expanded value of _p_a_r_a_m_e_t_e_r using the rules described under PPaatt-- + tteerrnn MMaattcchhiinngg below. 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 pattern (the ``####'' + case) deleted. If _p_a_r_a_m_e_t_e_r is @@ or **, the pattern removal op- + eration 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 vari- + able 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, and matched against the + expanded value of _p_a_r_a_m_e_t_e_r using the rules described under PPaatt-- + tteerrnn MMaattcchhiinngg below. 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 ex- + pansion 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- + ${_p_a_r_a_m_e_t_e_r////_p_a_t_t_e_r_n//_s_t_r_i_n_g} + ${_p_a_r_a_m_e_t_e_r//##_p_a_t_t_e_r_n//_s_t_r_i_n_g} + ${_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. + _s_t_r_i_n_g. _s_t_r_i_n_g undergoes tilde expansion, parameter and vari- + able expansion, arithmetic expansion, command and process sub- + stitution, and quote removal. The match is performed using the + rules described under PPaatttteerrnn MMaattcchhiinngg below. In the first form + above, only the first match is replaced. If there are two + slashes separating _p_a_r_a_m_e_t_e_r and _p_a_t_t_e_r_n (the second form + above), all matches of _p_a_t_t_e_r_n are replaced with _s_t_r_i_n_g. If + _p_a_t_t_e_r_n is preceded by ## (the third form above), it must match + at the beginning of the expanded value of _p_a_r_a_m_e_t_e_r. If _p_a_t_t_e_r_n + is preceded by %% (the fourth form above), it must match at the + end of the expanded value of _p_a_r_a_m_e_t_e_r. If the expansion of + _s_t_r_i_n_g is null, matches of _p_a_t_t_e_r_n are deleted. If _s_t_r_i_n_g is + null, matches of _p_a_t_t_e_r_n are deleted and the // following _p_a_t_t_e_r_n + may be omitted. + + If the ppaattssuubb__rreeppllaacceemmeenntt shell option is enabled using sshhoopptt, + any unquoted instances of && in _s_t_r_i_n_g are replaced with the + matching portion of _p_a_t_t_e_r_n. + + Quoting any part of _s_t_r_i_n_g inhibits replacement in the expansion + of the quoted portion, including replacement strings stored in + shell variables. Backslash will escape && in _s_t_r_i_n_g; the back- + slash is removed in order to permit a literal && in the replace- + ment string. Backslash can also be used to escape a backslash; + \\\\ results in a literal backslash in the replacement. Users + should take care if _s_t_r_i_n_g is double-quoted to avoid unwanted + interactions between the backslash and double-quoting, since + backslash has special meaning within double quotes. Pattern + substitution performs the check for unquoted && after expanding + _s_t_r_i_n_g; shell programmers should quote any occurrences of && they + want to be taken literally in the replacement and ensure any in- + stances of && they want to be replaced are unquoted. + + If the nnooccaasseemmaattcchh shell option is enabled, the match is per- + formed without regard to the case of alphabetic characters. If + _p_a_r_a_m_e_t_e_r is @@ or **, the substitution operation is applied to + each positional parameter in turn, and the expansion is the re- + sultant 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 mem- + ber 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 + 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. Each character in + the expanded value of _p_a_r_a_m_e_t_e_r is tested against _p_a_t_t_e_r_n, and, + if it matches the pattern, its case is converted. The pattern + should not attempt to match more than one character. The ^^ op- + erator 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- + 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 @@ -1554,20 +1907,65 @@ EEXXPPAANNSSIIOONN member of the array in turn, and the expansion is the resultant list. + ${_p_a_r_a_m_e_t_e_r@@_o_p_e_r_a_t_o_r} + PPaarraammeetteerr ttrraannssffoorrmmaattiioonn. The expansion is either a transforma- + tion of the value of _p_a_r_a_m_e_t_e_r or information about _p_a_r_a_m_e_t_e_r + itself, depending on the value of _o_p_e_r_a_t_o_r. Each _o_p_e_r_a_t_o_r is a + single letter: + + UU The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with lowercase alphabetic characters converted to upper- + case. + uu The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with the first character converted to uppercase, if it is + alphabetic. + LL The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with uppercase alphabetic characters converted to lower- + case. + QQ The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + quoted in a format that can be reused as input. + EE The expansion is a string that is the value of _p_a_r_a_m_e_t_e_r + with backslash escape sequences expanded as with the + $$''......'' quoting mechanism. + PP The expansion is a string that is the result of expanding + the value of _p_a_r_a_m_e_t_e_r as if it were a prompt string (see + PPRROOMMPPTTIINNGG below). + AA The expansion is a string in the form of an assignment + statement or ddeeccllaarree command that, if evaluated, will + recreate _p_a_r_a_m_e_t_e_r with its attributes and value. + KK Produces a possibly-quoted version of the value of _p_a_r_a_m_- + _e_t_e_r, except that it prints the values of indexed and as- + sociative arrays as a sequence of quoted key-value pairs + (see AArrrraayyss above). + aa The expansion is a string consisting of flag values rep- + resenting _p_a_r_a_m_e_t_e_r's attributes. + kk Like the K transformation, but expands the keys and val- + ues of indexed and associative arrays to separate words + after word splitting. + + If _p_a_r_a_m_e_t_e_r is @@ or **, the 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 operation is applied to each member of the array in turn, + and the expansion is the resultant list. + + The result of the expansion is subject to word splitting and + pathname expansion as described below. + 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)). + BBaasshh performs the expansion by executing _c_o_m_m_a_n_d in a subshell environ- + ment 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 com- + mand 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 @@ -1588,25 +1986,27 @@ EEXXPPAANNSSIIOONN $$((((_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 _e_x_p_r_e_s_s_i_o_n undergoes the same expansions as if it were within dou- + ble quotes, but double quote characters in _e_x_p_r_e_s_s_i_o_n are not treated + specially and are removed. All tokens in the expression undergo param- + eter and variable expansion, command substitution, and quote removal. + The result is treated as the arithmetic expression to be evaluated. + Arithmetic expansions may be nested. - The evaluation is performed according to the rules listed below under + 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. + _P_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n allows a process's input or output to be referred + to using a filename. It takes the form of <<((_l_i_s_t)) or >>((_l_i_s_t)). The + process _l_i_s_t is run asynchronously, and its input or output appears as + a filename. This filename is passed as an argument to the current com- + mand as the result of the expansion. If the >>((_l_i_s_t)) form is used, + writing to the file will provide 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. Process substitution is supported on systems that sup- + port named pipes (_F_I_F_O_s) or the //ddeevv//ffdd method of naming open files. When available, process substitution is performed simultaneously with parameter and variable expansion, command substitution, and arithmetic @@ -1618,57 +2018,71 @@ EEXXPPAANNSSIIOONN 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 <><><>, the default, - then sequences of <>, <>, and <> 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. + results of the other expansions into words using these characters as + field terminators. If IIFFSS is unset, or its value is exactly + <><><>, the default, then sequences of <>, <>, + and <> 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, + ttaabb, and nneewwlliinnee are ignored at the beginning and end of the word, as + long as the whitespace character is in the value of IIFFSS (an IIFFSS white- + space 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 and passed to commands + as empty strings. Unquoted implicit null arguments, resulting from the + expansion of parameters that have no values, are removed. If a parame- + ter with no value is expanded within double quotes, a null argument re- + sults and is retained and passed to a command as an empty string. When + a quoted null argument appears as part of a word whose expansion is + non-null, the null argument is removed. That is, the word -d'' becomes + -d after word splitting and null argument removal. 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. + appears, and is not quoted, then the word is regarded as a _p_a_t_t_e_r_n, and + replaced with an alphabetically sorted list of filenames matching the + pattern (see PPaatttteerrnn MMaattcchhiinngg below). If no matching filenames 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 per- + formed without regard to the case of alphabetic 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 ex- + plicitly, unless the shell option ddoottgglloobb is set. In order to match + the filenames ````..'''' and ````....'''', the pattern must begin with ``.'' (for + example, ``.?''), even if ddoottgglloobb is set. If the gglloobbsskkiippddoottss shell + option is enabled, the filenames ````..'''' and ````....'''' are never matched, + even if the pattern begins with a ````..''''. When not matching pathnames, + the ````..'''' character is not treated specially. When matching a path- + name, the slash character must always be matched explicitly by a slash + in the pattern, but in other matching contexts it can be matched by a + special pattern character as described below under PPaatttteerrnn MMaattcchhiinngg. + See the description of sshhoopptt below under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS for a + description of the nnooccaasseegglloobb, nnuullllgglloobb, gglloobbsskkiippddoottss, ffaaiillgglloobb, 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. If the nnooccaasseegglloobb option is set, the match- + ing against the patterns in GGLLOOBBIIGGNNOORREE is performed without regard to + case. The filenames ````..'''' and ````....'''' are always ignored when GGLLOOBBIIGG-- + NNOORREE is set and not null. However, setting GGLLOOBBIIGGNNOORREE to a non-null + value has the effect of enabling the ddoottgglloobb 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 GGLLOOBBIIGGNNOORREE. The ddoottgglloobb option is disabled when GGLLOOBBIIGGNNOORREE + is unset. The pattern matching honors the setting of the eexxttgglloobb shell + option. PPaatttteerrnn MMaattcchhiinngg @@ -1680,47 +2094,54 @@ EEXXPPAANNSSIIOONN 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: + ** Matches any string, including the null string. When the + gglloobbssttaarr shell option is enabled, and ** is used in a + pathname expansion context, two adjacent **s used as a + single pattern will match all files and zero or more di- + rectories and subdirectories. If followed by a //, two + adjacent **s will match only directories and subdirecto- + ries. + ?? Matches any single character. + [[......]] Matches any one of the enclosed characters. A pair of + characters separated by a hyphen denotes a _r_a_n_g_e _e_x_p_r_e_s_- + _s_i_o_n; any character that falls between those two charac- + ters, inclusive, using the current locale's collating se- + quence and character set, is matched. If the first char- + acter following the [[ is a !! or a ^^ then any character + not enclosed is matched. The sorting order of characters + in range expressions, and the characters included in the + range, are determined by the current locale and the val- + ues of the LLCC__CCOOLLLLAATTEE or LLCC__AALLLL shell variables, if set. + To obtain the traditional interpretation of range expres- + sions, where [[aa--dd]] is equivalent to [[aabbccdd]], set value of + the LLCC__AALLLL shell variable to CC, or enable the gglloobbaassccii-- + iirraannggeess shell option. 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. + + 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 character _. + + Within [[ and ]], an _e_q_u_i_v_a_l_e_n_c_e _c_l_a_s_s can be specified us- + ing the syntax [[==_c==]], which matches all characters with + the same collation weight (as defined by the current lo- + cale) as the character _c. + + Within [[ and ]], the syntax [[.._s_y_m_b_o_l..]] matches the collat- + ing symbol _s_y_m_b_o_l. + + If the eexxttgglloobb shell option is enabled using the sshhoopptt builtin, the + shell recognizes several extended pattern matching operators. 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 following sub-patterns: ??((_p_a_t_t_e_r_n_-_l_i_s_t)) Matches zero or one occurrence of the given patterns @@ -1733,6 +2154,25 @@ EEXXPPAANNSSIIOONN !!((_p_a_t_t_e_r_n_-_l_i_s_t)) Matches anything except one of the given patterns + Theeexxttgglloobb option changes the behavior of the parser, since the paren- + theses are normally treated as operators with syntactic meaning. To + ensure that extended matching patterns are parsed correctly, make sure + that eexxttgglloobb is enabled before parsing constructs containing the pat- + terns, including shell functions and command substitutions. + + When matching filenames, the ddoottgglloobb shell option determines the set of + filenames that are tested: when ddoottgglloobb is enabled, the set of file- + names includes all files beginning with ``.'', but ``.'' and ``..'' + must be matched by a pattern or sub-pattern that begins with a dot; + when it is disabled, the set does not include any filenames beginning + with ``.'' unless the pattern or sub-pattern begins with a ``.''. As + above, ``.'' only has a special meaning when matching filenames. + + Complicated extended pattern matching against long strings is slow, es- + pecially when the patterns contain alternations and the strings contain + multiple matches. Using separate matches against shorter strings, or + using arrays of strings instead of a single long string, may be faster. + QQuuoottee RReemmoovvaall After the preceding expansions, all unquoted occurrences of the charac- ters \\, '', and "" that did not result from one of the above expansions @@ -1740,18 +2180,24 @@ EEXXPPAANNSSIIOONN 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 + using a special notation interpreted by the shell. _R_e_d_i_r_e_c_t_i_o_n allows + commands' file handles to be duplicated, opened, closed, made to refer + to different files, and can change the files the command reads from and + writes to. Redirection may also be used to modify file handles in the + current shell execution environment. The following redirection opera- + tors may precede or appear anywhere within a _s_i_m_p_l_e _c_o_m_m_a_n_d or may fol- + low 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. + file descriptor greater than or equal to 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. If {_v_a_r_n_a_m_e} is supplied, the redirect- + ion persists beyond the scope of the command, allowing the shell pro- + grammer to manage the file descriptor's lifetime manually. The + vvaarrrreeddiirr__cclloossee shell option manages this behavior. In the following descriptions, if the file descriptor number is omit- ted, and the first character of the redirection operator is <<, the re- @@ -1761,9 +2207,9 @@ RREEDDIIRREECCTTIIOONN 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. + expansion, parameter and variable expansion, command substitution, + arithmetic expansion, 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 @@ -1780,10 +2226,13 @@ RREEDDIIRREECCTTIIOONN 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: + tions, as described in the following table. If the operating system on + which bbaasshh is running provides these special files, bash will use them; + otherwise it will emulate them internally with the behavior described + below. //ddeevv//ffdd//_f_d - If _f_d is a valid integer, file descriptor _f_d is dupli- + If _f_d is a valid integer, file descriptor _f_d is dupli- cated. //ddeevv//ssttddiinn File descriptor 0 is duplicated. @@ -1793,22 +2242,22 @@ RREEDDIIRREECCTTIIOONN 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. + is an integer port number or service name, bbaasshh attempts + to open the corresponding TCP 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. + is an integer port number or service name, bbaasshh attempts + to open the corresponding UDP 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- + 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 + 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: @@ -1816,41 +2265,40 @@ RREEDDIIRREECCTTIIOONN [_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 + Redirection of output causes the file whose name results from the ex- + pansion 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 + 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 >>, 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 + Redirection of output in this fashion causes the file whose name re- + sults from the expansion of _w_o_r_d to be opened for appending on file de- + scriptor _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 + 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: + There are two formats for redirecting standard output and standard er- + ror: &&>>_w_o_r_d and @@ -1861,10 +2309,13 @@ RREEDDIIRREECCTTIIOONN >>_w_o_r_d 2>>&&1 + When using the second form, _w_o_r_d may not expand to a number or --. If + it does, other redirection operators apply (see DDuupplliiccaattiinngg FFiillee DDee-- + ssccrriippttoorrss below) for compatibility reasons. 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 + 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: @@ -1875,38 +2326,45 @@ RREEDDIIRREECCTTIIOONN >>>>_w_o_r_d 2>>&&1 + (see DDuupplliiccaattiinngg FFiillee DDeessccrriippttoorrss below). + HHeerree DDooccuummeennttss - This type of redirection instructs the shell to read input from the + 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. + blanks) is seen. All of the lines read up to that point are then used + as the standard input (or file descriptor _n if _n is specified) for a + command. The format of here-documents is: - <<<<[--]_w_o_r_d + [_n]<<<<[--]_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 \\<> is ignored, and \\ must be used to quote - the characters \\, $$, and ``. + No parameter and variable expansion, command substitution, arithmetic + expansion, or pathname expansion is performed on _w_o_r_d. If any part of + _w_o_r_d is 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 un- + quoted, all lines of the here-document are subjected to parameter ex- + pansion, command substitution, and arithmetic expansion, the character + sequence \\<> is ignored, and \\ must be used to quote the charac- + ters \\, $$, 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 + stripped from input lines and the line containing _d_e_l_i_m_i_t_e_r. This al- + lows 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 + [_n]<<<<<<_w_o_r_d - The _w_o_r_d is expanded and supplied to the command on its standard input. + The _w_o_r_d undergoes tilde expansion, parameter and variable expansion, + command substitution, arithmetic expansion, and quote removal. Path- + name expansion and word splitting are not performed. The result is + supplied as a single string, with a newline appended, to the command on + its standard input (or file descriptor _n if _n is specified). DDuupplliiccaattiinngg FFiillee DDeessccrriippttoorrss The redirection operator @@ -1914,22 +2372,23 @@ RREEDDIIRREECCTTIIOONN [_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. + 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 de- + scriptor open for input, a redirection error occurs. If _w_o_r_d evaluates + 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. + 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. If _w_o_r_d evaluates to --, file descriptor _n is + closed. As a special case, if _n is omitted, and _w_o_r_d does not expand + to one or more digits or --, the standard output and standard error are + redirected as described previously. MMoovviinngg FFiillee DDeessccrriippttoorrss The redirection operator @@ -1977,93 +2436,136 @@ AALLIIAASSEESS 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). + arguments are needed, use a shell function (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 + 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. + The rules concerning the definition and use of aliases are somewhat + confusing. BBaasshh always reads at least one complete line of input, and + all lines that make up a compound command, before executing any of the + commands on that line or the compound command. 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 command. As a + consequence, aliases defined in a function are not available until af- + ter that function is executed. To be safe, always put alias defini- + tions on a separate line, and do not use aalliiaass in compound 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 + 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 + in the context of the current shell; no new process is created to in- + terpret 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- + updated to reflect the change. Special parameter 00 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 + All other aspects of the shell execution environment are identical be- + tween 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 + Variables local to the function may be declared with the llooccaall builtin + command (_l_o_c_a_l _v_a_r_i_a_b_l_e_s). Ordinarily, variables and their values are + shared between the function and its caller. If a variable is declared + llooccaall, the variable's visible scope is restricted to that function and + its children (including the functions it calls). + + In the following description, the _c_u_r_r_e_n_t _s_c_o_p_e is a currently- execut- + ing function. Previous scopes consist of that function's caller and so + on, back to the "global" scope, where the shell is not executing any + shell function. Consequently, a local variable at the current scope is + a variable declared using the llooccaall or ddeeccllaarree builtins in the function + that is currently executing. + + Local variables "shadow" variables with the same name declared at pre- + vious scopes. For instance, a local variable declared in a function + hides a global variable of the same name: references and assignments + refer to the local variable, leaving the global variable unmodified. + When the function returns, the global variable is once again visible. + + The shell uses _d_y_n_a_m_i_c _s_c_o_p_i_n_g to control a variable's visibility + within functions. With dynamic scoping, visible variables and their + values are a result of the sequence of function calls that caused exe- + cution to reach the current function. The value of a variable that a + function sees depends on its value within its caller, if any, whether + that caller is the "global" scope or another shell function. This is + also the value that a local variable declaration "shadows", and the + value that is restored when the function returns. + + For example, if a variable _v_a_r is declared as local in function _f_u_n_c_1, + and _f_u_n_c_1 calls another function _f_u_n_c_2, references to _v_a_r made from + within _f_u_n_c_2 will resolve to the local variable _v_a_r from _f_u_n_c_1, shadow- + ing any global variable named _v_a_r. + + The uunnsseett builtin also acts using the same dynamic scope: if a variable + is local to the current scope, uunnsseett will unset it; otherwise the unset + will refer to the variable found in any calling scope as described + above. If a variable at the current local scope is unset, it will re- + main so (appearing as unset) until it is reset in that scope or until + the function returns. Once the function returns, any instance of the + variable at a previous scope will become visible. If the unset acts on + a variable at a previous scope, any instance of a variable with that + name that had been shadowed will become visible (see below how the lloo-- + ccaallvvaarr__uunnsseett shell option changes this behavior). + + The FFUUNNCCNNEESSTT variable, if set to a numeric value greater than 0, de- + fines a maximum function nesting level. Function invocations that ex- + ceed the limit cause the entire command to abort. + + 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 be- + fore 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 + 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. + 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 child shell processes (those created when exe- + cuting a separate shell invocation) 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. + + Functions may be recursive. The FFUUNNCCNNEESSTT variable may be used to limit + the depth of the function call stack and restrict the number of func- + tion invocations. By default, no limit is imposed on the number of re- + cursive 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. + The shell allows arithmetic expressions to be evaluated, under certain + circumstances (see the lleett and ddeeccllaarree builtin commands, the (((( com- + pound command, 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 fol- + lowing list of operators is grouped into levels of equal-precedence op- + erators. The levels are listed in order of decreasing precedence. _i_d++++ _i_d---- variable post-increment and post-decrement + -- ++ unary minus and plus ++++_i_d ----_i_d variable pre-increment and pre-decrement - -- ++ unary minus and plus !! ~~ logical and bitwise negation **** exponentiation ** // %% multiplication, division, remainder @@ -2084,36 +2586,45 @@ AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN _e_x_p_r_1 ,, _e_x_p_r_2 comma - Shell variables are allowed as operands; parameter expansion is per- + 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 + 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 + 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 0. A shell variable need not have its _i_n_t_e_g_e_r 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 + Integer constants follow the C language definition, without suffixes or + character constants. Constants with a leading 0 are interpreted as oc- + tal numbers. A leading 0x or 0X denotes hexadecimal. Otherwise, num- + bers take the form [_b_a_s_e_#]n, where the optional _b_a_s_e is a decimal num- + ber between 2 and 64 representing the arithmetic base, and _n is a num- + ber in that base. If _b_a_s_e_# is omitted, then base 10 is used. When + specifying _n, if a non-digit is required, 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 up- + percase letters may be used interchangeably to represent numbers be- + tween 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- + Conditional expressions are used by the [[[[ compound command and the + tteesstt and [[ builtin commands to test file attributes and perform string + and arithmetic comparisons. The tteesstt and [[ commands determine their + behavior based on the number of arguments; see the descriptions of + those commands for any other command-specific actions. + + Expressions are formed from the following unary or binary primaries. + BBaasshh handles several filenames specially when they are used in expres- + sions. If the operating system on which bbaasshh is running provides these + special files, bash will use them; otherwise it will emulate them in- + ternally with this behavior: 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, @@ -2123,8 +2634,8 @@ CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS 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. + When used with [[[[, the << and >> operators sort lexicographically using + the current locale. The tteesstt command sorts using ASCII ordering. --aa _f_i_l_e True if _f_i_l_e exists. @@ -2157,30 +2668,36 @@ CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS 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. + --OO _f_i_l_e + True if _f_i_l_e exists and is owned by the effective user id. + --SS _f_i_l_e + True if _f_i_l_e exists and is a socket. + _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. _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 + 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 + 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 + True if the 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. + --vv _v_a_r_n_a_m_e + True if the shell variable _v_a_r_n_a_m_e is set (has been assigned a + value). + --RR _v_a_r_n_a_m_e + True if the shell variable _v_a_r_n_a_m_e is set and is a name refer- + ence. --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 @@ -2190,7 +2707,9 @@ CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS _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. + command for POSIX conformance. When used with the [[[[ command, + this performs pattern matching as described above (CCoommppoouunndd CCoomm-- + mmaannddss). _s_t_r_i_n_g_1 !!== _s_t_r_i_n_g_2 True if the strings are not equal. @@ -2206,19 +2725,22 @@ CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS 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. + or negative integers. When used with the [[[[ command, _A_r_g_1 and + _A_r_g_2 are evaluated as arithmetic expressions (see AARRIITTHHMMEETTIICC + EEVVAALLUUAATTIIOONN above). SSIIMMPPLLEE CCOOMMMMAANNDD EEXXPPAANNSSIIOONN - When a simple command is executed, the shell performs the following - expansions, assignments, and redirections, from left to right. + When a simple command is executed, the shell performs the following ex- + pansions, assignments, and redirections, from left to right, in the + following order. - 1. The words that the parser has marked as variable assignments - (those preceding the command name) and redirections are saved + 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 + 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. @@ -2229,14 +2751,16 @@ SSIIMMPPLLEE CCOOMMMMAANNDD EEXXPPAANNSSIIOONN 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 + shell environment. In the case of such a command (one that consists + only of assignment statements and redirections), assignment statements + are performed before redirections. Otherwise, the variables are added + to the environment of the executed command and do not affect the cur- + rent 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 af- + fect 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 @@ -2259,29 +2783,31 @@ CCOOMMMMAANNDD EEXXEECCUUTTIIOONN 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 + taining an executable file by that name. BBaasshh uses a hash table to re- + member 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. + in a separate execution environment with the original command and the + original command's arguments as its arguments, and the function's exit + status becomes the exit status of that subshell. If that function is + not defined, the shell prints an error message and returns an exit sta- + tus of 127. - If the search is successful, or if the command name contains one or + 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 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, and the shell creates a new instance of + itself 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 @@ -2295,7 +2821,6 @@ CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENN 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 @@ -2345,36 +2870,38 @@ CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENN A command invoked in this separate environment cannot affect the shell's execution environment. + A _s_u_b_s_h_e_l_l is a copy of the shell process. + 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- + of the shell environment, except that traps caught by the shell are re- + set 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 + the --ee option from the parent shell. When not in _p_o_s_i_x _m_o_d_e, bbaasshh 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. + If a command is followed by a && and job control is not active, the de- + fault standard input for the command is the empty file _/_d_e_v_/_n_u_l_l. Oth- + erwise, the invoked command inherits the file descriptors of the call- + ing 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 + The shell provides several ways to manipulate the environment. On in- + vocation, 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 + cesses. Executed commands inherit the environment. The eexxppoorrtt and ddee-- + ccllaarree --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 + ronment is modified, the new value becomes part of the environment, re- + placing 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. @@ -2389,15 +2916,15 @@ EENNVVIIRROONNMMEENNTT 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. + full filename of the command and passed to that command in its environ- + ment. 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 + 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 @@ -2405,8 +2932,8 @@ EEXXIITT SSTTAATTUUSS 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, + If a command is not found, the child process created to execute it re- + turns 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, @@ -2414,22 +2941,26 @@ EEXXIITT SSTTAATTUUSS 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. + return an exit status of 2 to indicate incorrect usage, generally in- + valid options or missing arguments. - 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 + The exit status of the last command is available in the special parame- + ter $?. + + BBaasshh itself returns the exit status of the last command executed, un- + less 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. + all cases, bbaasshh ignores SSIIGGQQUUIITT. If job control is in effect, bbaasshh ig- + nores 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 + inherited by the shell from its parent. When job control is not in ef- + fect, 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. @@ -2439,8 +2970,8 @@ SSIIGGNNAALLSS 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. + (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) or marked to not receive SSIIGGHHUUPP us- + ing 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. @@ -2452,101 +2983,134 @@ SSIIGGNNAALLSS set will cause the wwaaiitt builtin to return immediately with an exit sta- tus greater than 128, immediately after which the trap is executed. + When job control is not enabled, and bbaasshh is waiting for a foreground + command to complete, the shell receives keyboard-generated signals such + as SSIIGGIINNTT (usually generated by ^^CC) that users commonly intend to send + to that command. This happens because the shell and the command are in + the same process group as the terminal, and ^^CC sends SSIIGGIINNTT to all pro- + cesses in that process group. + + When bbaasshh is running without job control enabled and receives SSIIGGIINNTT + while waiting for a foreground command, it waits until that foreground + command terminates and then decides what to do about the SSIIGGIINNTT: + + 1. If the command terminates due to the SSIIGGIINNTT, bbaasshh concludes that + the user meant to end the entire script, and acts on the SSIIGGIINNTT + (e.g., by running a SSIIGGIINNTT trap or exiting itself); + + 2. If the command does not terminate due to SSIIGGIINNTT, the program + handled the SSIIGGIINNTT itself and did not treat it as a fatal sig- + nal. In that case, bbaasshh does not treat SSIIGGIINNTT as a fatal sig- + nal, either, instead assuming that the SSIIGGIINNTT was used as part + of the program's normal operation (e.g., emacs uses it to abort + editing commands) or deliberately discarded. However, bbaasshh will + run any trap set on SSIIGGIINNTT, as it does with any other trapped + signal it receives while it is waiting for the foreground com- + mand to complete, for compatibility. + 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 + _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 ex- + ecution 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 in- + terface 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 + 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 + 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, + 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 + 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 + 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, + 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 + 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 re- + turned 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 + 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, + line. For example, %%ccee refers to a stopped job whose command name be- + gins with ccee. 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 previous job with a --. A single % (with no accompanying + job specification) 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, + 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 + 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. + immediately. Any trap on SSIIGGCCHHLLDD is executed for each child that ex- + its. - 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- + 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 + 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. + When the shell is waiting for a job or process using the wwaaiitt builtin, + and job control is enabled, wwaaiitt will return when the job changes + state. The --ff option causes wwaaiitt to wait until the job or process ter- + minates before returning. + 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: + needs more input to complete a command. BBaasshh displays PPSS00 after it + reads a command but before executing it. BBaasshh displays PPSS44 as de- + scribed above before tracing each command when the --xx option is en- + abled. 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 + \\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 + the _f_o_r_m_a_t is passed to _s_t_r_f_t_i_m_e(3) and the result is in- + serted 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 `.' @@ -2555,7 +3119,7 @@ PPRROOMMPPTTIINNGG \\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 + \\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 @@ -2564,76 +3128,79 @@ PPRROOMMPPTTIINNGG \\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 + \\ww the value of the PPWWDD shell variable ($$PPWWDD), with $$HHOOMMEE + abbreviated with a tilde (uses the value of the + PPRROOMMPPTT__DDIIRRTTRRIIMM variable) + \\WW the basename of $$PPWWDD, 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 + \\[[ 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). + 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 be- + low), while the command number is the position in the sequence of com- + mands 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 + pprroommppttvvaarrss shell option (see the description of the sshhoopptt command under + SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). This can have unwanted side effects if + escaped portions of the string appear within command substitution or + contain characters special to word expansion. RREEAADDLLIINNEE - This is the library that handles reading input when using an interac- + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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. If that file does not exist or cannot be read, the ultimate + default is _/_e_t_c_/_i_n_p_u_t_r_c. When a program which uses the readline li- + brary 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 constructs. 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 @@ -2653,7 +3220,7 @@ RREEAADDLLIINNEE 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- + 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. @@ -2723,6 +3290,7 @@ RREEAADDLLIINNEE form sseett _v_a_r_i_a_b_l_e_-_n_a_m_e _v_a_l_u_e + or using the bbiinndd builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). Except where noted, readline variables can take the values OOnn or OOffff (without regard to case). Unrecognized variable names are ignored. @@ -2730,82 +3298,170 @@ RREEAADDLLIINNEE sitive), and "1" are equivalent to OOnn. All other values are equivalent to OOffff. The variables and their default values are: + aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr + A string variable that controls the text color and background + when displaying the text in the active region (see the descrip- + tion of eennaabbllee--aaccttiivvee--rreeggiioonn below). This string must not take + up any physical character positions on the display, so it should + consist only of terminal escape sequences. It is output to the + terminal before displaying the text in the active region. This + variable is reset to the default value whenever the terminal + type changes. The default value is the string that puts the + terminal in standout mode, as obtained from the terminal's ter- + minfo description. A sample value might be "\e[01;33m". + aaccttiivvee--rreeggiioonn--eenndd--ccoolloorr + A string variable that "undoes" the effects of aaccttiivvee--rree-- + ggiioonn--ssttaarrtt--ccoolloorr and restores "normal" terminal display appear- + ance after displaying text in the active region. This string + must not take up any physical character positions on the dis- + play, so it should consist only of terminal escape sequences. + It is output to the terminal after displaying the text in the + active region. This variable is reset to the default value + whenever the terminal type changes. The default value is the + string that restores the terminal from standout mode, as ob- + tained from the terminal's terminfo description. A sample value + might be "\e[0m". bbeellll--ssttyyllee ((aauuddiibbllee)) - Controls what happens when readline wants to ring the terminal + 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 + 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 + If set to OOnn, readline attempts to bind the control characters treated specially by the kernel's terminal driver to their read- line equivalents. + bblliinnkk--mmaattcchhiinngg--ppaarreenn ((OOffff)) + If set to OOnn, readline attempts to briefly move the cursor to an + opening parenthesis when a closing parenthesis is inserted. + ccoolloorreedd--ccoommpplleettiioonn--pprreeffiixx ((OOffff)) + If set to OOnn, when listing completions, readline displays the + common prefix of the set of possible completions using a differ- + ent color. The color definitions are taken from the value of + the LLSS__CCOOLLOORRSS environment variable. If there is a color defini- + tion in $$LLSS__CCOOLLOORRSS for the custom suffix "readline-colored-com- + pletion-prefix", readline uses this color for the common prefix + instead of its default. + ccoolloorreedd--ssttaattss ((OOffff)) + If set to OOnn, readline displays possible completions using dif- + ferent colors to indicate their file type. The color defini- + tions are taken from the value of the LLSS__CCOOLLOORRSS environment + variable. ccoommmmeenntt--bbeeggiinn ((````##'''')) - The string that is inserted when the readline iinnsseerrtt--ccoommmmeenntt + 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--ddiissppllaayy--wwiiddtthh ((--11)) + The number of screen columns used to display possible matches + when performing completion. The value is ignored if it is less + than 0 or greater than the terminal screen width. A value of 0 + will cause matches to be displayed one per line. The default + value is -1. ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff)) If set to OOnn, readline performs filename matching and completion in a case-insensitive fashion. + ccoommpplleettiioonn--mmaapp--ccaassee ((OOffff)) + If set to OOnn, and ccoommpplleettiioonn--iiggnnoorree--ccaassee is enabled, readline + treats hyphens (_-) and underscores (__) as equivalent when per- + forming case-insensitive filename matching and completion. 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- + 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. + 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, readline + will ask whether or not the user wishes to view them; otherwise + they are simply listed on the terminal. A zero value means + readline should never ask; negative values are treated as zero. 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). + _m_e_t_a _p_r_e_f_i_x). The default is _O_n, but readline will set it to + _O_f_f if the locale contains eight-bit characters. This variable + is dependent on the LLCC__CCTTYYPPEE locale category, and may change if + the locale is changed. 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 + 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 + 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. + 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. + eemmaaccss--mmooddee--ssttrriinngg ((@@)) + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + displayed immediately before the last line of the primary prompt + when emacs editing mode is active. The value is expanded like a + key binding, so the standard set of meta- and control prefixes + and backslash escape sequences is available. Use the \1 and \2 + escapes to begin and end sequences of non-printing characters, + which can be used to embed a terminal control sequence into the + mode string. + eennaabbllee--aaccttiivvee--rreeggiioonn ((OOnn)) + The _p_o_i_n_t is the current cursor position, and _m_a_r_k refers to a + saved cursor position. The text between the point and mark is + referred to as the _r_e_g_i_o_n. When this variable is set to _O_n, + readline allows certain commands to designate the region as _a_c_- + _t_i_v_e. When the region is active, readline highlights the text + in the region using the value of the aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr, + which defaults to the string that enables the terminal's stand- + out mode. The active region shows the text inserted by brack- + eted-paste and any matching text found by incremental and non- + incremental history searches. + eennaabbllee--bbrraacckkeetteedd--ppaassttee ((OOnn)) + When set to OOnn, readline configures the terminal to insert each + paste into the editing buffer as a single string of characters, + instead of treating each character as if it had been read from + the keyboard. This prevents readline from executing any editing + commands bound to key sequences appearing in the pasted text. 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. + pad when it is called. Some systems need this to enable the ar- + row 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 + 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. + If set to OOnn, tilde expansion is performed when readline at- + tempts 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-- + 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. + hhiissttoorryy--ssiizzee ((uunnsseett)) + Set the maximum number of history entries saved in the history + list. If set to zero, any existing history entries are deleted + and no new entries are saved. If set to a value less than zero, + the number of history entries is not limited. By default, the + number of history entries is set to the value of the HHIISSTTSSIIZZEE + shell variable. If an attempt is made to set _h_i_s_t_o_r_y_-_s_i_z_e to a + non-numeric value, the maximum number of history entries will be + set to 500. 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. + new line. This setting is automatically enabled for terminals + of height 1. 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. + If set to OOnn, readline will enable eight-bit input (that is, it + will not strip the eighth bit from the characters it reads), re- + gardless of what the terminal claims it can support. The name + mmeettaa--ffllaagg is a synonym for this variable. The default is _O_f_f, + but readline will set it to _O_n if the locale contains eight-bit + characters. This variable is dependent on the LLCC__CCTTYYPPEE locale + category, and may change if the locale is changed. iisseeaarrcchh--tteerrmmiinnaattoorrss ((````CC--[[CC--JJ'''')) The string of characters that should terminate an incremental search without subsequently executing the character as a com- @@ -2817,6 +3473,18 @@ RREEAADDLLIINNEE _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. + kkeeyysseeqq--ttiimmeeoouutt ((550000)) + Specifies the duration _r_e_a_d_l_i_n_e will wait for a character when + reading an ambiguous key sequence (one that can form a complete + key sequence using the input read so far, or can take additional + input to complete a longer key sequence). If no input is re- + ceived within the timeout, _r_e_a_d_l_i_n_e will use the shorter but + complete key sequence. The value is specified in milliseconds, + so a value of 1000 means that _r_e_a_d_l_i_n_e will wait one second for + additional input. If this variable is set to a value less than + or equal to zero, or to a non-numeric value, _r_e_a_d_l_i_n_e will wait + until another key is pressed to decide which key sequence to + complete. mmaarrkk--ddiirreeccttoorriieess ((OOnn)) If set to OOnn, completed directory names have a slash appended. mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff)) @@ -2824,93 +3492,146 @@ RREEAADDLLIINNEE 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). + tories have a slash appended (subject to the value of mmaarrkk--ddii-- + rreeccttoorriieess). 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. + filename completion. If set to OOffff, the leading `.' must be + supplied by the user in the filename to be completed. + mmeennuu--ccoommpplleettee--ddiissppllaayy--pprreeffiixx ((OOffff)) + If set to OOnn, menu completion displays the common prefix of the + list of possible completions (which may be empty) before cycling + through the list. 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. + The default is _O_f_f, but readline will set it to _O_n if the locale + contains eight-bit characters. This variable is dependent on + the LLCC__CCTTYYPPEE locale category, and may change if the locale is + changed. ppaaggee--ccoommpplleettiioonnss ((OOnn)) - If set to OOnn, readline uses an internal _m_o_r_e-like pager to dis- + 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 + 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 + 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 + 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 + 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. + 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 in- + stead of ringing the bell. + sshhooww--mmooddee--iinn--pprroommpptt ((OOffff)) + If set to OOnn, add a string to the beginning of the prompt indi- + cating the editing mode: emacs, vi command, or vi insertion. + The mode strings are user-settable (e.g., _e_m_a_c_s_-_m_o_d_e_-_s_t_r_i_n_g). 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 + 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. + vvii--ccmmdd--mmooddee--ssttrriinngg ((((ccmmdd)))) + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + displayed immediately before the last line of the primary prompt + when vi editing mode is active and in command mode. The value + is expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the \1 and \2 escapes to begin and end sequences of non- + printing characters, which can be used to embed a terminal con- + trol sequence into the mode string. + vvii--iinnss--mmooddee--ssttrriinngg ((((iinnss)))) + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + displayed immediately before the last line of the primary prompt + when vi editing mode is active and in insertion mode. The value + is expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the \1 and \2 escapes to begin and end sequences of non- + printing characters, which can be used to embed a terminal con- + trol sequence into the mode string. 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- + 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 + 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 + $$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, after any comparison operator, + extends to the end of the line; unless otherwise noted, 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 in- + stance, 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 + 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, + of the == is tested against both the 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. + vveerrssiioonn + The vveerrssiioonn test may be used to perform comparisons + against specific readline versions. The vveerrssiioonn expands + to the current readline version. The set of comparison + operators includes ==, (and ====), !!==, <<==, >>==, <<, and >>. + The version number supplied on the right side of the op- + erator consists of a major version number, an optional + decimal point, and an optional minor version (e.g., 77..11). + If the minor version is omitted, it is assumed to be 00. + The operator may be separated from the string vveerrssiioonn and + from the version number argument by whitespace. + 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 + specific settings. Each program using the readline li- + brary 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: + bbaasshh: $$iiff Bash # Quote the current or previous word "\C-xq": "\eb\"\ef\"" $$eennddiiff + _v_a_r_i_a_b_l_e + The _v_a_r_i_a_b_l_e construct provides simple equality tests for + readline variables and values. The permitted comparison + operators are _=, _=_=, and _!_=. The variable name must be + separated from the comparison operator by whitespace; the + operator may be separated from the value on the right + hand side by whitespace. Both string and boolean vari- + ables may be tested. Boolean variables must be tested + against the values _o_n and _o_f_f. + $$eennddiiff This command, as seen in the previous example, terminates an $$iiff command. @@ -2918,51 +3639,51 @@ RREEAADDLLIINNEE test fails. $$iinncclluuddee - This directive takes a single filename as an argument and reads - commands and bindings from that file. For example, the follow- + 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 + 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- + 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 + 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 + 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- + 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 + 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 + 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 + 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 + 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 @@ -2978,38 +3699,63 @@ RREEAADDLLIINNEE 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 + 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 + 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 + Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters. + pprreevviioouuss--ssccrreeeenn--lliinnee + Attempt to move point to the same physical screen column on the + previous physical screen line. This will not have the desired + effect if the current readline line does not take up more than + one physical line or if point is not greater than the length of + the prompt plus the screen width. + nneexxtt--ssccrreeeenn--lliinnee + Attempt to move point to the same physical screen column on the + next physical screen line. This will not have the desired effect + if the current readline line does not take up more than one + physical line or if the length of the current readline line is + not greater than the length of the prompt plus the screen width. + cclleeaarr--ddiissppllaayy ((MM--CC--ll)) + Clear the screen and, if possible, the terminal's scrollback + buffer, then redraw the current line, leaving the current line + at the top of the screen. 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. + Clear the screen, then redraw the current line, leaving the cur- + rent 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 + 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 + 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 + Move to the end of the input history, i.e., the line currently being entered. + 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. A + numeric argument, if supplied, specifies the history entry to + use instead of the current line. + ffeettcchh--hhiissttoorryy + With a numeric argument, fetch that entry from the history list + and make it the current line. Without an argument, move back to + the first entry in the history list. rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr)) Search backward starting at the current line and moving `up' through the history as necessary. This is an incremental @@ -3033,54 +3779,69 @@ RREEAADDLLIINNEE 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. + hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--bbaacckkwwaarrdd + Search backward through the history for the string of characters + between the start of the current line and the current cursor po- + sition (the _p_o_i_n_t). The search string may match anywhere in a + history line. This is a non-incremental search. + hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--ffoorrwwaarrdd + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a non-in- + cremental 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 + previous command begin with word 0). A negative argument in- + serts 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 + of the previous history entry). With a numeric 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. + move back through the history list, inserting the last word (or + the word specified by the argument to the first call) of each + line in turn. Any numeric argument supplied to these successive + calls determines the direction to move through the history. A + negative argument switches the direction through the history + (back or forward). The history expansion facilities are used to + extract the last word, 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 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. + Perform history expansion on the current line. See HHIISSTTOORRYY EEXX-- + PPAANNSSIIOONN below for a description of history expansion. mmaaggiicc--ssppaaccee - Perform history expansion on the current line and insert a + 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 + 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. + eeddiitt--aanndd--eexxeeccuuttee--ccoommmmaanndd ((CC--xx CC--ee)) + Invoke an editor on the current command line, and execute the + result as shell commands. BBaasshh attempts to invoke $$VVIISSUUAALL, $$EEDD-- + IITTOORR, and _e_m_a_c_s as the editor, in that order. CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt + _e_n_d_-_o_f_-_f_i_l_e ((uussuuaallllyy CC--dd)) + The character indicating end-of-file as set, for example, by + ``stty''. If this character is read when there are no charac- + ters on the line, and point is at the beginning of the line, + readline interprets it as the end of input and returns EEOOFF. 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. + Delete the character at point. If this function is bound to the + same character as the tty EEOOFF character, as CC--dd commonly is, see + above for the effects. bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt)) Delete the character behind the cursor. When given a numeric argument, save the deleted text on the kill ring. @@ -3105,14 +3866,14 @@ RREEAADDLLIINNEE 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. + Uppercase the current (or following) word. With a negative ar- + gument, 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. + Lowercase the current (or following) word. With a negative ar- + gument, 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. + Capitalize the current (or following) word. With a negative ar- + gument, 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 @@ -3142,11 +3903,11 @@ RREEAADDLLIINNEE 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)) + sshheellll--kkiillll--wwoorrdd 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)) + sshheellll--bbaacckkwwaarrdd--kkiillll--wwoorrdd Kill the word behind point. Word boundaries are the same as those used by sshheellll--bbaacckkwwaarrdd--wwoorrdd. uunniixx--wwoorrdd--rruubboouutt ((CC--ww)) @@ -3182,10 +3943,10 @@ RREEAADDLLIINNEE 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 + lowed by digits, executing uunniivveerrssaall--aarrgguummeenntt again ends the nu- + meric argument, but is otherwise ignored. As a special case, if + this command is immediately followed by a character that is nei- + ther a digit nor 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, @@ -3211,17 +3972,16 @@ RREEAADDLLIINNEE 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 + moves _n positions forward in the list of matches; a negative ar- + gument may be used to move backward through the list. This com- + mand is intended to be bound to TTAABB, but is unbound by default. + mmeennuu--ccoommpplleettee--bbaacckkwwaarrdd + Identical 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 + 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--//)) @@ -3230,54 +3990,57 @@ RREEAADDLLIINNEE 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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- + Re-execute the last keyboard macro defined, by making the char- acters in the macro appear as if typed at the keyboard. + pprriinntt--llaasstt--kkbbdd--mmaaccrroo (()) + Print the last keyboard macro defined in a format suitable for + the _i_n_p_u_t_r_c file. MMiisscceellllaanneeoouuss rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr)) @@ -3286,9 +4049,10 @@ RREEAADDLLIINNEE 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. + ddoo--lloowweerrccaassee--vveerrssiioonn ((MM--AA,, MM--BB,, MM--_x,, ......)) + If the metafied character _x is uppercase, run the command that + is bound to the corresponding metafied lowercase character. The + behavior is undefined if _x is already lowercase. pprreeffiixx--mmeettaa ((EESSCC)) Metafy the next character typed. EESSCC ff is equivalent to MMeettaa--ff. uunnddoo ((CC--__,, CC--xx CC--uu)) @@ -3308,13 +4072,13 @@ RREEAADDLLIINNEE 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. + that character. A negative argument searches for previous oc- + currences. 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 (()) + rence of that character. A negative argument searches for sub- + sequent 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 @@ -3326,52 +4090,57 @@ RREEAADDLLIINNEE 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 + 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. + If a numeric argument causes the comment character to be re- + moved, the line will be executed by the shell. + ssppeellll--ccoorrrreecctt--wwoorrdd ((CC--xx ss)) + Perform spelling correction on the current word, treating it as + a directory or filename, in the same way as the ccddssppeellll shell + option. Word boundaries are the same as those used by + sshheellll--ffoorrwwaarrdd--wwoorrdd. 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. + The word before point is treated as a pattern for pathname ex- + pansion, with an asterisk implicitly appended. This pattern is + used to generate a list of matching filenames for possible com- + pletions. 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. + The word before point is treated as a pattern for pathname ex- + pansion, and the list of matching filenames is inserted, replac- + ing 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 + 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- + 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 + 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 + 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 + 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. + 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. + the ccoommpplleettee builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below), the program- + mable 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), @@ -3381,151 +4150,159 @@ RREEAADDLLIINNEE 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- + If those searches do not result in a compspec, any compspec defined + with the --DD option to ccoommpplleettee is used as the default. If there is no + default compspec, bbaasshh attempts alias expansion on the command word as + a final resort, and attempts to find a compspec for the command word + from any successful expansion. + + 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 + 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 + Any completions specified by a pathname expansion pattern to the --GG op- + tion 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 + 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 + 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 + 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 ($$11) is the name of the command whose arguments are be- + ing completed, the second argument ($$22) is the word being completed, + and the third argument ($$33) is the word preceding the word being com- + pleted on the current command line. No filtering of the generated com- + pletions 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, one per array element. + + 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. + 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. + ing the pattern will be removed. If the nnooccaasseemmaattcchh shell option is + enabled, the match is performed without regard to the case of alpha- + betic characters. 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 previously-applied actions do not generate any matches, and the + --oo ddiirrnnaammeess option was supplied to ccoommpplleettee when the compspec was de- + fined, directory name completion is attempted. - If the --oo pplluussddiirrss option was supplied to ccoommpplleettee when the compspec + 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 + 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- + 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, + 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 + 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 + 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 + 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 + attempt to find a new 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: + For instance, assuming that there is a library of compspecs, each kept + in a file corresponding to the name of the command, the following de- + fault 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 + complete -D -F _completion_loader -o bashdefault -o default HHIISSTTOORRYY - When the --oo hhiissttoorryy option to the sseett builtin is enabled, the shell + 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 + 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 + 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. + 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. If HHIISSTTFFIILLEE-- + SSIIZZEE is unset, or set to null, a non-numeric value, or a numeric value + less than zero, the history file is not truncated. When the history + file is read, lines beginning with the history comment character fol- + lowed immediately by a digit are interpreted as timestamps for the fol- + lowing history line. These timestamps are optionally displayed depend- + ing on the value of the HHIISSTTTTIIMMEEFFOORRMMAATT variable. When a shell with + history enabled exits, the last $$HHIISSTTSSIIZZEE lines are copied from the + history 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 + overwritten. If HHIISSTTFFIILLEE is unset, or if the history file is un- + writable, the history is not saved. If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is + set, time stamps are written to the history file, marked with the his- + tory 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 HHIISSTTFFIILLEESSIIZZEE lines. If HHIISSTTFFIILLEESSIIZZEE + is unset, or set to null, a non-numeric value, or a numeric value less + than zero, the history file is not truncated. 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 + ttoorryy builtin may be used to display or modify the history list and ma- + nipulate the history file. When using command-line editing, search commands are available in each editing mode that provide access to the history list. @@ -3537,12 +4314,12 @@ HHIISSTTOORRYY 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. + BBUUIILLTTIINN CCOOMMMMAANNDDSS for information on setting and unsetting shell op- + tions. HHIISSTTOORRYY EEXXPPAANNSSIIOONN The shell supports a history expansion feature that is similar to the - history expansion in ccsshh.. This section describes what syntax features + 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 @@ -3554,197 +4331,220 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN 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 + read, before the shell breaks it into words, and is performed on each + line individually without taking quoting on previous lines into ac- + count. 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 avail- + able to manipulate the selected words. The line is broken into words + in the same fashion as when reading 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. His- + tory expansions are introduced by the appearance of the history expan- + sion character, which is !! by default. Only backslash (\\) and single + quotes can quote the history expansion character, but the history ex- + pansion character is also treated as quoted if it immediately precedes + the closing double quote in a double-quoted string. + + 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 + Several shell options settable with the sshhoopptt builtin may be used to + tailor the behavior of history expansion. If the hhiissttvveerriiffyy shell op- + tion 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 + 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 + 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 + 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- + 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. + An event designator is a reference to a command line entry in the his- + tory list. Unless the reference is absolute, events are relative to + the current position in the history 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. + !!--_n Refer to the current command 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. + Refer to the most recent command preceding the current position + in the history list 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. + Refer to the most recent command preceding the current position + in the history list containing _s_t_r_i_n_g. The trailing ?? may be + omitted if _s_t_r_i_n_g is followed immediately by a newline. If + _s_t_r_i_n_g is missing, the string from the most recent search is + used; it is an error if there is no previous search string. ^^_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). + Quick substitution. Repeat the previous 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 MMooddiiffiieerrss 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- + 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. + $$ The last word. This is usually the last argument, but will ex- + pand to the zeroth word if there is only one word in the line. + %% The first word matched by the most recent `?_s_t_r_i_n_g?' search, if + the search string begins with a character that is part of a + word. _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. + xx-- Abbreviates _x_-_$ like xx**, but omits the last word. If xx is miss- + ing, it defaults to 0. - If a word designator is supplied without an event specification, the + 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 `:'. + After the optional word designator, there may appear a sequence of one + or more of the following modifiers, each preceded by a `:'. These mod- + ify, or edit, the word or words selected from the history event. - hh Remove a trailing file name component, leaving only the head. - tt Remove all leading file name components, leaving the tail. + hh Remove a trailing filename component, leaving only the head. + tt Remove all leading filename 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. + xx Quote the substituted words as with qq, but break into words at + bbllaannkkss and newlines. The qq and xx modifiers are mutually exclu- + sive; the last one supplied is used. 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. + line. Any character may be used as the delimiter 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 single 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 substi- + tutions took place, the last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search. + If _n_e_w is null, each matching _o_l_d is deleted. && 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 + 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. + GG Apply the following `ss' or `&&' 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. + options. The ::, ttrruuee, ffaallssee, and tteesstt/[[ builtins do not accept options + and do not treat ---- specially. The eexxiitt, llooggoouutt, rreettuurrnn, bbrreeaakk, ccoonn-- + ttiinnuuee, lleett, and sshhiifftt 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 interpreta- + tion. :: [_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. + and performing any specified redirections. The return status is + zero. .. _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. + Read and execute commands from _f_i_l_e_n_a_m_e in the current shell en- + vironment 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, + filenames in PPAATTHH are used to find the directory containing + _f_i_l_e_n_a_m_e, but _f_i_l_e_n_a_m_e does not need to be executable. The file + searched for in PPAATTHH need not be executable. When bbaasshh is not + in _p_o_s_i_x _m_o_d_e, it searches the current directory 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 positional parameters when + _f_i_l_e_n_a_m_e is executed. Otherwise the positional parameters are + unchanged. If the --TT option is enabled, .. inherits any trap on + DDEEBBUUGG; if it is not, any DDEEBBUUGG trap string is saved and restored + around the call to .., and .. unsets the DDEEBBUUGG trap while it exe- + cutes. If --TT is not set, and the sourced file changes the DDEEBBUUGG + trap, the new value is retained when .. completes. 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 + 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 + 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 re- + turns 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 + 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 + 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] [--llppssvvPPSSVVXX] 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: + bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d + bbiinndd _r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d_-_l_i_n_e + 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 ap- + pear in a rreeaaddlliinnee initialization file such as _._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. + and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d (_v_i_-_m_o_v_e + is also a synonym); _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 + --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- + --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 + --SS Display rreeaaddlliinnee key sequences bound to macros and the strings they output. - --vv Display rreeaaddlliinnee variable names and values in such a way + --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 @@ -3756,71 +4556,93 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --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 + Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is en- + tered. 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 and RREEAADDLLIINNEE__MMAARRKK + variables to the current location of the insertion point + and the saved insertion point (the mark), respectively. + The shell assigns any numeric argument the user supplied + to the RREEAADDLLIINNEE__AARRGGUUMMEENNTT variable. If there was no argu- + ment, that variable is not set. If the executed command + changes the value of any of RREEAADDLLIINNEE__LLIINNEE, RREEAADD-- + LLIINNEE__PPOOIINNTT, or RREEAADDLLIINNEE__MMAARRKK, those new values will be + reflected in the editing state. + --XX List all key sequences bound to shell commands and the + associated commands in a format that can be reused as in- + put. + + 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 + 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 ex- + ited. 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 + 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- + 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 + 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- + 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- + 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 + 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. + ccdd [--LL|[--PP [--ee]] [-@]] [_d_i_r] + Change the current directory to _d_i_r. if _d_i_r is not supplied, + the value of the HHOOMMEE shell variable is the default. The vari- + able CCDDPPAATTHH defines the search path for the directory containing + _d_i_r: each directory name in CCDDPPAATTHH is searched for _d_i_r. Alter- + native directory names in CCDDPPAATTHH are separated by a colon (:). + A null directory name in CCDDPPAATTHH is the same as the current di- + rectory, i.e., ``..''. If _d_i_r begins with a slash (/), then CCDD-- + PPAATTHH is not used. The --PP option causes ccdd to use the physical + directory structure by resolving symbolic links while traversing + _d_i_r and before processing instances of _._. in _d_i_r (see also the + --PP option to the sseett builtin command); the --LL option forces sym- + bolic links to be followed by resolving the link after process- + ing instances of _._. in _d_i_r. If _._. appears in _d_i_r, it is pro- + cessed by removing the immediately previous pathname component + from _d_i_r, back to a slash or the beginning of _d_i_r. If the --ee + option is supplied with --PP, and the current working directory + cannot be successfully determined after a successful directory + change, ccdd will return an unsuccessful status. On systems that + support it, the --@@ option presents the extended attributes asso- + ciated with a file as a directory. An argument of -- is con- + verted to $$OOLLDDPPWWDD before the directory change is attempted. If + a non-empty directory name from CCDDPPAATTHH is used, or if -- is the + first argument, and the directory change is successful, the ab- + solute pathname of the new working directory is written to the + standard output. If the directory change is successful, ccdd sets + the value of the PPWWDD environment variable to the new directory + name, and sets the OOLLDDPPWWDD environment variable to the value of + the current working directory before the change. The return + value is true if the directory was successfully 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 + 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 + find all of the standard utilities. If either the --VV or --vv op- + tion 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 filename 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 @@ -3833,69 +4655,82 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS _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. + various shell variables set by the programmable completion fa- + cilities, 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 matches will be generated in the same way as if the program- + mable completion code had generated them directly from a comple- + tion specification with the same flags. If _w_o_r_d is specified, + 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 ...] + ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEEII] [--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 [--DDEEII] [_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- + pletion specifications. The --DD option indicates that other sup- + plied options and actions should apply to the ``default'' com- + mand completion; that is, completion attempted on a command for + which no completion has previously been defined. The --EE option + indicates that other supplied options and actions should apply + to ``empty'' command completion; that is, completion attempted + on a blank line. The --II option indicates that other supplied + options and actions should apply to completion on the initial + non-assignment word on the line, or after a command delimiter + such as ;; or ||, which is usually command name completion. If + multiple options are supplied, the --DD option takes precedence + over --EE, and both take precedence over --II. If any of --DD, --EE, or + --II are supplied, any other _n_a_m_e arguments are ignored; these + completions only apply to the case specified by the option. + + The process of applying these completion specifications when + word completion is attempted is described above under PPrrooggrraamm-- + mmaabbllee 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- + 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 + ddeeffaauulltt Use readline's default filename completion if the compspec generates no matches. ddiirrnnaammeess - Perform directory name completion if the comp- + 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 + 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 + nnooqquuoottee Tell readline not to quote the completed words + if they are filenames (quoting filenames is the + default). + nnoossoorrtt Tell readline not to sort the list of possible + completions alphabetically. + nnoossppaaccee Tell readline not to append a space (the de- + fault) 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. + generated, directory name completion is at- + tempted 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: @@ -3928,9 +4763,9 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --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 + sseettoopptt Valid arguments for the --oo option to the sseett builtin. - sshhoopptt Shell option names as accepted by the sshhoopptt + sshhoopptt Shell option names as accepted by the sshhoopptt builtin. ssiiggnnaall Signal names. ssttooppppeedd Names of stopped jobs, if job control is active. @@ -3938,86 +4773,105 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS vvaarriiaabbllee Names of all shell variables. May also be spec- ified as --vv. + --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. Arguments + are passed as with the --FF option. + --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 the function is executed, the + first argument ($$11) is the name of the command whose ar- + guments are being completed, the second argument ($$22) is + the word being completed, and the third argument ($$33) is + the word preceding the word being completed on the cur- + rent command line. When it finishes, the possible com- + pletions are retrieved from the value of the CCOOMMPPRREEPPLLYY + array variable. --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. + --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. --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. + is expanded. Shell quoting is honored within _w_o_r_d_l_i_s_t, + in order to provide a mechanism for the words to contain + shell metacharacters or characters in the value of IIFFSS. + The possible completions are the members of the resul- + tant list which match the word being completed. --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. + case, any completion not matching _f_i_l_t_e_r_p_a_t is removed. - 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 + 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. + ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEEII] [++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-executing completion if no _n_a_m_es are + supplied. If no _o_p_t_i_o_ns are given, display the completion op- + tions 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 de- + scribed above. The --DD option indicates that other supplied op- + tions 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 other + supplied options should apply to ``empty'' command completion; + that is, completion attempted on a blank line. The --II option + indicates that other supplied options should apply to completion + on the initial non-assignment word on the line, or after a com- + mand delimiter such as ;; or ||, which is usually command name + completion. + + 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 + completion 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 + sseelleecctt loop. If _n is specified, resume at the _nth enclosing + loop. _n must be >= 1. If _n is greater than the number of en- + closing 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 [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + ttyyppeesseett [--aaAAffFFggiiIIllnnrrttuuxx] [--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: + with _n_a_m_e arguments, additional options, other than --ff and --FF, + 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 at- + tributes and values of all shell variables. The --ff option will + restrict the display to shell functions. The --FF option inhibits + the display of function definitions; 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 each + _n_a_m_e is defined are displayed as well. The --FF option implies + --ff. The --gg option forces variables to be created or modified at + the global scope, even when ddeeccllaarree is executed in a shell func- + tion. It is ignored in all other cases. The --II option causes + local variables to inherit the attributes (except the _n_a_m_e_r_e_f + attribute) and value of any existing variable with the same _n_a_m_e + at a surrounding scope. If there is no existing variable, the + local variable is initially unset. The following options can be + used to restrict output to variables with the specified attri- + bute 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 @@ -4029,85 +4883,95 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --ll When the variable is assigned a value, all upper-case characters are converted to lower-case. The upper-case attribute is disabled. + --nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name + reference to another variable. That other variable is + defined by the value of _n_a_m_e. All references, assign- + ments, and attribute modifications to _n_a_m_e, except those + using or changing the --nn attribute itself, are performed + on the variable referenced by _n_a_m_e's value. The nameref + attribute cannot be applied to array variables. --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 + --tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions in- + herit 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. + --xx Mark _n_a_m_es for export to subsequent commands via the en- + vironment. + + Using `+' instead of `-' turns off the attribute instead, with + the exceptions that ++aa and ++AA may not be used to destroy array + variables and ++rr will not remove the readonly attribute. When + used in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e local, as + with the llooccaall command, unless the --gg option is supplied. If a + variable name is followed by =_v_a_l_u_e, the value of the variable + is set to _v_a_l_u_e. When using --aa or --AA and the compound assign- + ment syntax to create array variables, additional attributes do + not take effect until subsequent assignments. 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 as- + sign a value to an array variable without using the compound as- + signment 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 read- + only 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 --ff. + + ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]] + Without options, displays the list of currently remembered di- + rectories. The default display is on a single line with direc- + tory names separated by spaces. Directories are added to the + list with the ppuusshhdd command; the ppooppdd command removes entries + from the list. The current directory is always the first direc- + tory in the stack. + --cc Clears the directory stack by deleting all of the en- + tries. + --ll Produces a listing using full pathnames; 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. ++_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 + 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. + ddiissoowwnn [--aarr] [--hh] [_j_o_b_s_p_e_c ... | _p_i_d ... ] + Without options, remove each _j_o_b_s_p_e_c from the table of active + jobs. If _j_o_b_s_p_e_c is not 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 the --hh option + is given, each _j_o_b_s_p_e_c is not removed from the table, but is + marked so that SSIIGGHHUUPP is not sent to the job if the shell re- + ceives a SSIIGGHHUUPP. 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 ar- + gument 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: + Output the _a_r_gs, separated by spaces, followed by a newline. + The return status is 0 unless a write error occurs. If --nn is + specified, the trailing newline is suppressed. If the --ee option + is given, interpretation of the following backslash-escaped + characters is enabled. The --EE option disables the interpreta- + tion of these escape characters, 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 es- + cape characters by default. eecchhoo does not interpret ---- to mean + the end of options. eecchhoo interprets the following escape se- + quences: \\aa alert (bell) \\bb backspace \\cc suppress further output - \\ee an escape character + \\ee + \\EE an escape character \\ff form feed \\nn new line \\rr carriage return @@ -4118,27 +4982,38 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS _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) + \\uu_H_H_H_H the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H (one to four hex digits) + \\UU_H_H_H_H_H_H_H_H + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H_H_H_H_H (one to eight 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 + If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are en- + abled. 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. + Bash will use the value of the BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH variable as a + colon-separated list of directories in which to search for _f_i_l_e_- + _n_a_m_e. The default is system-dependent. The --dd option will + delete a builtin previously loaded with --ff. If no _n_a_m_e argu- + ments are given, or if the --pp option is supplied, a list of + shell builtins is printed. With no other option arguments, the + list consists of all enabled shell builtins. If --nn is supplied, + only disabled builtins are printed. If --aa is supplied, the list + printed includes all builtins, with an indication of whether or + not each is enabled. If --ss is supplied, the output is re- + stricted to the POSIX _s_p_e_c_i_a_l builtins. If no options are sup- + plied and a _n_a_m_e is not a shell builtin, eennaabbllee will attempt to + load _n_a_m_e from a shared object named _n_a_m_e, as if the command + were ``enable -f _n_a_m_e _n_a_m_e . 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- @@ -4150,16 +5025,17 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + 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 + unless the eexxeeccffaaiill shell option is enabled. In that 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. + file cannot be executed. A subshell exits unconditionally if + eexxeecc fails. If _c_o_m_m_a_n_d 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. eexxiitt [_n] Cause the shell to exit with a status of _n. If _n is omitted, @@ -4171,27 +5047,29 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + if the --pp option is supplied, a list of names of all exported + variables 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 sup- + plied with a _n_a_m_e that is not a function. 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 first form selects a range of commands from _f_i_r_s_t to _l_a_s_t + from the history list and displays or edits and re-executes + them. _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 current command number). When listing, a + _f_i_r_s_t or _l_a_s_t of 0 is equivalent to -1 and -0 is equivalent to + the current command (usually the ffcc command); otherwise 0 is + equivalent to -1 and -0 is invalid. 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 specified, 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 @@ -4203,13 +5081,13 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + of _p_a_t is replaced by _r_e_p. _C_o_m_m_a_n_d is interpreted the same as + _f_i_r_s_t above. 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. - 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 + If the first form is used, the return value is 0 unless an in- + valid 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 @@ -4226,41 +5104,42 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g _._._.] 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 + nized; if a character is followed by a colon, the option is ex- + pected 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. + 1 each time the shell or a shell script is invoked. When an op- + tion requires an argument, ggeettooppttss places that argument into the + variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automatically; + it must be manually reset between multiple calls to ggeettooppttss + within the same shell invocation if a new set of parameters 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 ?. + When the end of options is encountered, ggeettooppttss exits with a re- + turn value greater than zero. OOPPTTIINNDD is set to the index of the + first non-option argument, and _n_a_m_e 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- + arguments are supplied as _a_r_g values, ggeettooppttss parses those in- + stead. + + 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. + ggeettooppttss is silent, the option character found is placed in OOPP-- + TTAARRGG 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 @@ -4273,62 +5152,74 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + Each time hhaasshh is invoked, the full pathname of the command _n_a_m_e + is determined by searching the directories in $$PPAATTHH and remem- + bered. Any previously-remembered pathname is discarded. 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 filename of the command. The --rr option + causes the shell to forget all remembered locations. The --dd op- + tion 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 + 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 + 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 + 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. + + 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 --dd _s_t_a_r_t-_e_n_d 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 + _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 + Delete the history entry at position _o_f_f_s_e_t. If _o_f_f_s_e_t + is negative, it is interpreted as relative to one greater + than the last history position, so negative indices count + back from the end of the history, and an index of -1 + refers to the current hhiissttoorryy --dd command. + --dd _s_t_a_r_t-_e_n_d + Delete the range of history entries between positions + _s_t_a_r_t and _e_n_d, inclusive. Positive and negative values + for _s_t_a_r_t and _e_n_d are interpreted as described above. + --aa Append the ``new'' history lines to the history file. + These are history lines entered since the beginning of + the current bbaasshh session, but not already appended 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 + file into the current history list. These are lines ap- + pended 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. + --rr Read the contents of the history file and append them to + the current history list. + --ww Write the current history list to the history file, over- + writing 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 @@ -4342,79 +5233,91 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + timestamps for the following history entry. 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 or range + is supplied as an argument to --dd, or the history expansion sup- + plied 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 + --nn Display information only about jobs that have changed + status since the user was last notified of their status. + --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. + --rr Display only running jobs. + --ss Display only 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 + 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. + _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and ex- + ecutes _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 + kkiillll --ll|--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. + --ll is a number specifying either a signal number or the exit + status of a process terminated by a signal. The --LL option is + equivalent to --ll. kkiillll returns true if at least one signal was + successfully sent, or false if an error occurs or an invalid op- + tion 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] ...] + 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. + tion and its children. If _n_a_m_e is -, the set of shell options + is made local to the function in which llooccaall is invoked: shell + options changed using the sseett builtin inside the function are + restored to their original values when the function returns. + The restore is effected as if a series of sseett commands were exe- + cuted to restore the values that were in place before the func- + tion. 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] + mmaappffiillee [--dd _d_e_l_i_m] [--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 [--dd _d_e_l_i_m] [--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 + --dd The first character of _d_e_l_i_m is used to terminate each + input line, rather than newline. If _d_e_l_i_m is the empty + string, mmaappffiillee will terminate a line when it reads a NUL + character. + --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 + --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. + --tt Remove a trailing _d_e_l_i_m (default 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 @@ -4424,88 +5327,124 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + array element to be assigned and the line to be assigned to that + element as additional arguments. _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. + 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. + Removes entries from the directory stack. The elements are num- + bered from 0 starting at the first directory listed by ddiirrss. + With no arguments, ppooppdd removes the top directory from the + stack, and changes to the new top directory. Arguments, if sup- + plied, have the following meanings: + --nn Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is ma- + nipulated. + ++_n Removes the _nth entry counting from the left of the list + shown by ddiirrss, starting with zero, from the stack. 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 + 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. + If the top element of the directory stack is modified, and the + _-_n option was not supplied, ppooppdd uses the ccdd builtin to change + to the directory at the top of the stack. If the ccdd fails, ppooppdd + returns a non-zero value. + + Otherwise, ppooppdd returns false if an invalid option is encoun- + tered, the directory stack is empty, or a non-existent directory + stack entry is specified. + + If the ppooppdd command is successful, bash runs ddiirrss to show the + final contents of the directory stack, and the return status is + 0. 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_- + control of the _f_o_r_m_a_t. 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 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 _a_r_g_u_m_e_n_t. In + addition to the standard _p_r_i_n_t_f(1) format specifications, pprriinnttff + interprets the following extensions: + %%bb causes pprriinnttff to expand backslash escape sequences in the + corresponding _a_r_g_u_m_e_n_t in the same way as eecchhoo --ee. + %%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. + %%QQ like %%qq, but applies any supplied precision to the _a_r_g_u_- + _m_e_n_t before quoting it. + %%((_d_a_t_e_f_m_t))TT + causes pprriinnttff to output the date-time string resulting + from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3). + The corresponding _a_r_g_u_m_e_n_t is an integer representing the + number of seconds since the epoch. Two special argument + values may be used: -1 represents the current time, and + -2 represents the time the shell was invoked. If no ar- + gument is specified, conversion behaves as if -1 had been + given. This is an exception to the usual pprriinnttff behav- + ior. + + The %b, %q, and %T directives all use the field width and preci- + sion arguments from the format specification and write that many + bytes from (or use that wide a field for) the expanded argument, + which usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C con- + stants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value + is the ASCII value of the following character. + + 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 + 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 + 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, ppuusshhdd exchanges the top two ele- + ments of the directory stack. Arguments, if supplied, have the + following meanings: + --nn Suppresses the normal change of directory when rotating + or 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 + --_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. + _d_i_r Adds _d_i_r to the directory stack at the top + + After the stack has been modified, if the --nn option was not sup- + plied, ppuusshhdd uses the ccdd builtin to change to the directory at + the top of the stack. If the ccdd fails, ppuusshhdd returns a non-zero + value. - 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. + Otherwise, if no arguments are supplied, ppuusshhdd returns 0 unless + the directory stack is empty. When rotating the directory + stack, ppuusshhdd returns 0 unless the directory stack is empty or a + non-existent directory stack element is specified. + + If the ppuusshhdd command is successful, bash runs ddiirrss to show the + final contents of the directory stack. ppwwdd [--LLPP] Print the absolute pathname of the current working directory. @@ -4513,140 +5452,176 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + occurs while reading the name of the current directory or an in- + valid 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: + One line is read from the standard input, or from the file de- + scriptor _f_d supplied as an argument to the --uu option, split into + words as described above under WWoorrdd SSpplliittttiinngg, and the first + word is assigned to the first _n_a_m_e, the second word to the sec- + ond _n_a_m_e, and so on. If there are more words than names, the + remaining words and their intervening delimiters are 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 val- + ues. The characters in IIFFSS are used to split the line into + words using the same rules the shell uses for expansion (de- + scribed above under WWoorrdd SSpplliittttiinngg). The backslash character + (\\) may be used to remove any special meaning for the next char- + acter read and for line continuation. Options, if supplied, + have the following 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. + new values are assigned. Other _n_a_m_e arguments are ig- + nored. --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. + The first character of _d_e_l_i_m is used to terminate the in- + put line, rather than newline. If _d_e_l_i_m is the empty + string, rreeaadd will terminate a line when it reads a NUL + character. --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. + not previously active) editing settings, but uses read- + line's default filename completion. --ii _t_e_x_t - If rreeaaddlliinnee is being used to read the line, _t_e_x_t is + 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 + rreeaadd returns after reading _n_c_h_a_r_s characters rather than + waiting for a complete line of input, but honors 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. + 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. The result is not split on the characters in + IIFFSS; the intent is that the variable is assigned exactly + the characters read (with the exception of backslash; see + the --rr option below). --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. + lar, a backslash-newline pair may not then 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. + line of input (or a specified number of characters) is + not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a deci- + mal number with a fractional portion following the deci- + mal point. This option is only effective if rreeaadd is + reading input from a terminal, pipe, or other special + file; it has no effect when reading from regular files. + If rreeaadd times out, rreeaadd saves any partial input read into + the specified variable _n_a_m_e. If _t_i_m_e_o_u_t is 0, rreeaadd re- + turns immediately, without trying to read any data. The + exit status is 0 if input is available on the specified + file descriptor, or the read will return EOF, non-zero + 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. + If no _n_a_m_e_s are supplied, the line read, without the ending de- + limiter but otherwise unmodified, is assigned to the variable + RREEPPLLYY. The exit status is zero, unless end-of-file is encoun- + tered, rreeaadd times out (in which case the status is greater than + 128), a variable assignment error (such as assigning to a read- + only variable) occurs, or an invalid file descriptor is supplied + as the argument to --uu. - rreeaaddoonnllyy [--aaAAppff] [_n_a_m_e[=_w_o_r_d] ...] + rreeaaddoonnllyy [--aaAAff] [--pp] [_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. + marked. The --aa option restricts the variables to indexed ar- + rays; the --AA option restricts the variables to associative ar- + rays. If both options are supplied, --AA takes precedence. 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 other options may be + used to restrict the output to a subset of the set of readonly + names. 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- + Causes a function to stop executing and return the value speci- + fied by _n to its caller. If _n is omitted, the return status is + that of the last command executed in the function body. If rree-- + ttuurrnn is executed by a trap handler, the last command used to de- + termine the status is the last command executed before the trap + handler. If rreettuurrnn is executed during a DDEEBBUUGG trap, the last + command used to determine the status is the last command exe- + cuted by the trap handler before rreettuurrnn was invoked. If rreettuurrnn + is 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 _n is supplied, the return value is its least signif- + icant 8 bits. The return status is non-zero if rreettuurrnn is sup- + plied a non-numeric argument, or is used outside a function and + not during execution of a script by .. or ssoouurrccee. Any command + associated with the RREETTUURRNN trap is executed before execution re- + sumes after the function or script. + + sseett [--aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] + sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] + Without options, display the name and value of each shell vari- + able in a format that can be reused as input for setting or re- + setting the currently-set variables. Read-only variables cannot + 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 argu- + ments remaining after option processing are treated as values + for the positional parameters and are assigned, in order, to $$11, + $$22, ...... $$_n. Options, if specified, have the following mean- + ings: + --aa Each variable or function that is created or modified is + given the export attribute and marked 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 + --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 _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d + (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 !!. If a + compound command other than a subshell returns a non- + zero status because a command failed while --ee was being + ignored, the shell does not exit. 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. + + If a compound command or shell function executes in a + context where --ee is being ignored, none of the commands + executed within the compound command or function body + will be affected by the --ee setting, even if --ee is set + and a command returns a failure status. If a compound + command or shell function sets --ee while executing in a + context where --ee is ignored, that setting will not have + any effect until the compound command or the command + containing the function call completes. --ff Disable pathname expansion. --hh Remember the location of commands as they are looked up for execution. This is enabled by default. @@ -4655,13 +5630,13 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + support it (see JJOOBB CCOONNTTRROOLL above). All processes run + in a separate process group. When a background job com- + pletes, the shell prints a line containing its exit sta- + tus. --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. + to check a shell script for syntax errors. This is ig- + nored 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 @@ -4685,9 +5660,9 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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). + The effect is as if the shell command ``IG- + NOREEOF=10'' had been executed (see SShheellll VVaarrii-- + aabblleess above). kkeeyywwoorrdd Same as --kk. mmoonniittoorr Same as --mm. nnoocclloobbbbeerr @@ -4708,7 +5683,9 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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). + match the standard (_p_o_s_i_x _m_o_d_e). See SSEEEE AALLSSOO + below for a reference to a document that details + how posix mode affects bash's behavior. pprriivviilleeggeedd Same as --pp. vveerrbboossee Same as --vv. @@ -4724,8 +5701,8 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --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 + BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they ap- + pear 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 @@ -4733,9 +5710,12 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + --rr Enable restricted shell mode. This option cannot be un- + set once it has been set. --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 + cial parameters "@" and "*", or array variables sub- + scripted with "@" or "*", 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 @@ -4757,16 +5737,16 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + --PP If set, the shell does not resolve 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. + shell functions, command substitutions, and commands ex- + ecuted 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 @@ -4777,258 +5757,398 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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- + rather than - causes these options to be turned off. The op- + tions can also be specified as arguments to an invocation of the + shell. The current set of options may be found in $$--. The re- + turn 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. + Parameters represented by the numbers $$## down to $$##-_n+1 are un- + set. _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 param- + eters 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: + Toggle the values of settings controlling optional shell behav- + ior. The settings can be either those listed below, or, if the + --oo option is used, those available with the --oo option to the sseett + builtin command. With no options, or with the --pp option, a list + of all settable options is displayed, with an indication of + whether or not each is set; if _o_p_t_n_a_m_e_s are supplied, the output + is restricted to those options. The --pp option causes output to + be displayed in a form that may be reused as input. Other op- + tions have the following 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 + --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- + 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 + --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. + If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, sshhoopptt + shows only those options which are set or unset, respectively. + 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 + 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 op- + tions, 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- + aassssoocc__eexxppaanndd__oonnccee + If set, the shell suppresses multiple evaluation of as- + sociative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform + variable assignments, and while executing builtins that + perform array dereferencing. + 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 + 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 + 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 + ter, and one character too many. If a correction is + found, the corrected filename 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- + 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 + 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. + second exit is attempted without an intervening command + (see JJOOBB CCOONNTTRROOLL above). The shell always postpones ex- + iting 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. + If set, bbaasshh checks the window size after each external + (non-builtin) command and, if necessary, updates the + values of LLIINNEESS and CCOOLLUUMMNNSS. This option is enabled by + default. 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. + easy re-editing of multi-line commands. This option is + enabled by default, but only has an effect if command + history is enabled, as described above under HHIISSTTOORRYY. 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. + ccoommppaatt4411 + ccoommppaatt4422 + ccoommppaatt4433 + ccoommppaatt4444 + ccoommppaatt5500 + These control aspects of the shell's compatibility mode + (see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below). + + ccoommpplleettee__ffuullllqquuoottee + If set, bbaasshh quotes all shell metacharacters in file- + names and directory names when performing completion. + If not set, bbaasshh removes metacharacters such as the dol- + lar sign from the set of characters that will be quoted + in completed filenames when these metacharacters appear + in shell variable references in words to be completed. + This means that dollar signs in variable names that ex- + pand to directories will not be quoted; however, any + dollar signs appearing in filenames will not be quoted, + either. This is active only when bash is using back- + slashes to quote completed filenames. This variable is + set by default, which is the default bash behavior in + versions through 4.2. + + ddiirreexxppaanndd + If set, bbaasshh replaces directory names with the results + of word expansion when performing filename completion. + This changes the contents of the readline editing buf- + fer. If not set, bbaasshh attempts to preserve what the + user typed. + 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. + the results of pathname expansion. The filenames ````..'''' + and ````....'''' must always be matched explicitly, even if + ddoottgglloobb is set. + 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: + If set at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the ----ddeebbuuggggeerr option. If set af- + ter invocation, 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 + + 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- + + 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), the shell + simulates a call to rreettuurrnn. + + 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. + + 66.. Error tracing is enabled: command substitution, + shell functions, and subshells invoked with (( + _c_o_m_m_a_n_d )) inherit the EERRRR 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 + 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 + 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 + 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. + ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a de- + scription of FFIIGGNNOORREE. This option is enabled by de- + fault. + + gglloobbaasscciiiirraannggeess + If set, range expressions used in pattern matching + bracket expressions (see PPaatttteerrnn MMaattcchhiinngg above) behave + as if in the traditional C locale when performing com- + parisons. That is, the current locale's collating se- + quence is not taken into account, so bb will not collate + between AA and BB, and upper-case and lower-case ASCII + characters will collate together. + + gglloobbsskkiippddoottss + If set, pathname expansion will never match the file- + names ````..'''' and ````....'''', even if the pattern begins with + a ````..''''. 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. + text will match all 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. + If set, the history list is appended to the file named + by the value of the HHIISSTTFFIILLEE variable when the shell ex- + its, rather than overwriting the file. + hhiissttrreeeeddiitt - If set, and rreeaaddlliinnee is being used, a user is given the + 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 + 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 + 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. + + iinnhheerriitt__eerrrreexxiitt + If set, command substitution inherits the value of the + eerrrreexxiitt option, instead of unsetting it in the subshell + environment. This option is enabled when _p_o_s_i_x _m_o_d_e is + enabled. + 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. + in an interactive shell (see CCOOMMMMEENNTTSS above). This op- + tion is enabled by default. + + llaassttppiippee + If set, and job control is not active, the shell runs + the last command of a pipeline not executed in the back- + ground in the current shell environment. + 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. + + llooccaallvvaarr__iinnhheerriitt + If set, local variables inherit the value and attributes + of a variable of the same name that exists at a previous + scope before any new value is assigned. The nameref at- + tribute is not inherited. + + llooccaallvvaarr__uunnsseett + If set, calling uunnsseett on local variables in previous + function scopes marks them so subsequent lookups find + them unset until that function returns. This is identi- + cal to the behavior of unsetting local variables at the + current function scope. + llooggiinn__sshheellll - The shell sets this option if it is started as a login - shell (see IINNVVOOCCAATTIIOONN above). The value may not be + 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- + 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 + If set, and rreeaaddlliinnee is being used, bbaasshh will not at- + tempt 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 + 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 + If set, bbaasshh matches patterns in a case-insensitive fashion when performing matching while executing ccaassee or - [[[[ conditional commands. + [[[[ conditional commands, when performing pattern substi- + tution word expansions, or when filtering possible com- + pletions as part of programmable completion. + + nnooeexxppaanndd__ttrraannssllaattiioonn + If set, bbaasshh encloses the translated results of $"..." + quoting in single quotes instead of double quotes. If + the string is not translated, this has no effect. + nnuullllgglloobb - If set, bbaasshh allows patterns which match no files (see - PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string, + If set, bbaasshh allows patterns which match no files (see + PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string, rather than themselves. + + ppaattssuubb__rreeppllaacceemmeenntt + If set, bbaasshh expands occurrences of && in the replacement + string of pattern substitution to the text matched by + the pattern, as described under PPaarraammeetteerr EExxppaannssiioonn + above. This option is enabled by default. + pprrooggccoommpp If set, the programmable completion facilities (see PPrroo-- ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is enabled by default. + + pprrooggccoommpp__aalliiaass + If set, and programmable completion is enabled, bbaasshh + treats a command name that doesn't have any completions + as a possible alias and attempts alias expansion. If it + has an alias, bbaasshh attempts programmable completion us- + ing the command word resulting from the expanded alias. + pprroommppttvvaarrss If set, prompt strings undergo parameter expansion, com- - mand substitution, arithmetic expansion, and quote - removal after being expanded as described in PPRROOMMPPTTIINNGG + mand substitution, arithmetic expansion, and quote re- + moval 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 + The shell sets this option if it is started in re- + stricted 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 + 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. + + vvaarrrreeddiirr__cclloossee + If set, the shell automatically closes file descriptors + assigned using the _{_v_a_r_n_a_m_e_} redirection syntax (see RREE-- + DDIIRREECCTTIIOONN above) instead of leaving them open when the + command completes. + xxppgg__eecchhoo - If set, the eecchhoo builtin expands backslash-escape - sequences by default. + If set, the eecchhoo builtin expands backslash-escape se- + quences 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. + Suspend the execution of this shell until it receives a SSIIGGCCOONNTT + signal. A login shell, or a shell without job control enabled, + cannot be suspended; the --ff option can be used to override this + and force the suspension. The return status is 0 unless the + shell is a login shell or job control is not enabled and --ff is + not supplied. + 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. + Return a status of 0 (true) or 1 (false) depending on the evalu- + ation of the conditional expression _e_x_p_r. Each operator and op- + erand 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. + listed in decreasing order of precedence. The evaluation de- + pends on the number of arguments; see below. Operator prece- + dence is used when there are five or more arguments. !! _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 + 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. @@ -5045,13 +6165,14 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + 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 + The following conditions are applied in the order listed. 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 @@ -5064,56 +6185,66 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS is the one-argument test of the second argument. Other- wise, the expression is false. 4 arguments + The following conditions are applied in the order listed. 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. + the three-argument expression composed of the remaining + arguments. the two-argument test using the second and + third arguments. If the first argument is exactly (( and + the fourth argument is exactly )), the result is the two- + argument test of the second and third arguments. Other- + wise, 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. - ttiimmeess Print the accumulated user and system times for the shell and + When used with tteesstt or [[, the << and >> operators sort lexico- + graphically using ASCII ordering. + + 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 + The command _a_r_g is to be read and executed when the shell re- + ceives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a sin- + gle _s_i_g_s_p_e_c) or --, each specified signal is reset to its origi- + nal 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 com- + mands associated with each signal. The --ll option causes the + shell to print a list of signal names and their corresponding + 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 SSIIGG 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 + If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a + pipeline (which may consist of a single simple command), a list, + or a compound command returns 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 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 using + !!. These are the same conditions obeyed by the eerrrreexxiitt (--ee) op- + tion. + + Signals ignored upon entry to the shell cannot be trapped or re- + set. 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. @@ -5124,22 +6255,23 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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, + then nothing is printed, and an exit status of false is re- + turned. 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 specified + as a command name, or nothing if ``type -t name'' would not re- + turn _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]] + hashed, --pp and --PP print the hashed value, which is not necessar- + ily 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 + function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true + if all of the arguments are found, false if any are not found. + + uulliimmiitt [--HHSS] --aa + uulliimmiitt [--HHSS] [--bbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_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 @@ -5149,13 +6281,13 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + current hard limit, the current soft limit, and no limit, re- + spectively. 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, if appropriate, are printed before the value. Other op- + tions are interpreted as follows: + --aa All current limits are reported; no limits are set --bb The maximum socket buffer size --cc The maximum size of core files created --dd The maximum size of a process's data segment @@ -5163,6 +6295,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --ff The maximum size of files written by the shell and its children --ii The maximum number of pending signals + --kk The maximum number of kqueues that may be allocated --ll The maximum size that may be locked into memory --mm The maximum resident set size (many systems do not honor this limit) @@ -5176,74 +6309,240 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --uu The maximum number of processes available to a single user --vv The maximum amount of virtual memory available to the - shell + shell and, on some systems, to its children --xx The maximum number of file locks + --PP The maximum number of pseudoterminals + --RR The maximum time a real-time process can run before + blocking, in microseconds --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. + If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the + new value of the specified resource. If no option is given, + then --ff is assumed. Values are in 1024-byte increments, except + for --tt, which is in seconds; --RR, which is in microseconds; --pp, + which is in units of 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and + --uu, which are unscaled values; and, when in posix mode, --cc and + --ff, which are in 512-byte increments. 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 + 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, + 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 + 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. + uunnsseett [-ffvv] [-nn] [_n_a_m_e ...] + For each _n_a_m_e, remove the corresponding variable or function. + If the --vv option is given, each _n_a_m_e refers to a shell variable, + and that variable is removed. 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. If the --nn option + is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f attribute, + _n_a_m_e will be unset rather than the variable it references. --nn + has no effect if the --ff option is supplied. If no options are + supplied, each _n_a_m_e refers to a variable; if there is no vari- + able by that name, a function with that name, if any, is unset. + Each unset variable or function is removed from the environment + passed to subsequent commands. If any of BBAASSHH__AALLIIAASSEESS, + BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBBSSHHEELLLL, BBAASSHHPPIIDD, + CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCC-- + NNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECCOONNDDSS, or SSRRAANNDDOOMM are + unset, they lose their special properties, even if they are sub- + sequently reset. The exit status is true unless a _n_a_m_e is read- + only or may not be unset. + + wwaaiitt [--ffnn] [--pp _v_a_r_n_a_m_e] [_i_d _._._.] + Wait for each specified child process and return its termination + status. Each _i_d 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_d is not given, wwaaiitt waits for all running + background jobs and the last-executed process substitution, if + its process id is the same as $$!!, and the return status is zero. + If the --nn option is supplied, wwaaiitt waits for a single job from + the list of _i_ds or, if no _i_ds are supplied, any job, to complete + and returns its exit status. If none of the supplied arguments + is a child of the shell, or if no arguments are supplied and the + shell has no unwaited-for children, the exit status is 127. If + the --pp option is supplied, the process or job identifier of the + job for which the exit status is returned is assigned to the + variable _v_a_r_n_a_m_e named by the option argument. The variable + will be unset initially, before any assignment. This is useful + only when the --nn option is supplied. Supplying the --ff option, + when job control is enabled, forces wwaaiitt to wait for _i_d to ter- + minate before returning its status, instead of returning when it + changes status. If _i_d specifies a non-existent process or job, + the return status is 127. If wwaaiitt is interrupted by a signal, + the return status will be greater than 128, as described under + SSIIGGNNAALLSS above. Otherwise, the return status is the exit status + of the last process or job waited for. + +SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE + Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, speci- + fied as a set of options to the shopt builtin ( ccoommppaatt3311, ccoommppaatt3322, + ccoommppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibil- + ity level -- each option is mutually exclusive. The compatibility + level is intended to allow users to select behavior from previous ver- + sions that is incompatible with newer versions while they migrate + scripts to use current features and behavior. It's intended to be a + temporary solution. + + This section does not mention behavior that is standard for a particu- + lar version (e.g., setting ccoommppaatt3322 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 subsequent versions). + + If a user enables, say, ccoommppaatt3322, it may affect the behavior of other + compatibility levels up to and including the current compatibility + level. The idea is that each compatibility level controls behavior + that changed in that version of bbaasshh, but that behavior may have been + present in earlier versions. For instance, the change to use locale- + based comparisons with the [[[[ command came in bash-4.1, and earlier + versions used ASCII-based comparisons, so enabling ccoommppaatt3322 will enable + ASCII-based comparisons as well. That granularity may not be suffi- + cient for all uses, and as a result users should employ compatibility + levels carefully. Read the documentation for a particular feature to + find out the current behavior. + + Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as- + signed to this variable (a decimal version number like 4.2, or an inte- + ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com- + patibility level. + + Starting with bash-4.4, Bash has begun deprecating older compatibility + levels. Eventually, the options will be removed in favor of BBAASSHH__CCOOMM-- + PPAATT. + + Bash-5.0 is the final version for which there will be an individual + shopt option for the previous version. Users should use BBAASSHH__CCOOMMPPAATT on + bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each + compatibility level setting. The ccoommppaatt_N_N tag is used as shorthand for + setting the compatibility level to _N_N using one of the following mecha- + nisms. For versions prior to bash-5.0, the compatibility level may be + set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and + later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re- + quired for bash-5.1 and later versions. + + ccoommppaatt3311 + +o quoting the rhs of the [[[[ command's regexp matching oper- + ator (=~) has no special effect + + ccoommppaatt3322 + +o interrupting a command list such as "a ; b ; c" causes + the execution of the next command in the list (in + bash-4.0 and later versions, the shell acts as if it re- + ceived the interrupt, so interrupting one command in a + list aborts the execution of the entire list) + + ccoommppaatt4400 + +o the << and >> operators to the [[[[ command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII col- + lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current + locale's collation sequence and _s_t_r_c_o_l_l(3). + + ccoommppaatt4411 + +o in _p_o_s_i_x mode, ttiimmee may be followed by options and still + be recognized as a reserved word (this is POSIX interpre- + tation 267) + +o in _p_o_s_i_x mode, the parser requires that an even number of + single quotes occur in the _w_o_r_d portion of a double- + quoted parameter expansion and treats them specially, so + that characters within the single quotes are considered + quoted (this is POSIX interpretation 221) + + ccoommppaatt4422 + +o the replacement string in double-quoted pattern substitu- + tion does not undergo quote removal, as it does in ver- + sions after bash-4.2 + +o in posix mode, single quotes are considered special when + expanding the _w_o_r_d portion of a double-quoted parameter + expansion and can be used to quote a closing brace or + other special character (this is part of POSIX interpre- + tation 221); in later versions, single quotes are not + special within double-quoted word expansions + + ccoommppaatt4433 + +o the shell does not print a warning message if an attempt + is made to use a quoted compound assignment as an argu- + ment to declare (e.g., declare -a foo='(1 2)'). Later + versions warn that this usage is deprecated + +o word expansion errors are considered non-fatal errors + that cause the current command to fail, even in posix + mode (the default behavior is to make them fatal errors + that cause the shell to exit) + +o when executing a shell function, the loop state + (while/until/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to pre- + vent this + + ccoommppaatt4444 + +o the shell sets up the values used by BBAASSHH__AARRGGVV and + BBAASSHH__AARRGGCC so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + +o a subshell inherits loops from its parent context, so + bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit. + Bash-5.0 and later reset the loop state to prevent the + exit + +o variable assignments preceding builtins like eexxppoorrtt and + rreeaaddoonnllyy that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + + ccoommppaatt5500 + +o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro- + duce slightly more randomness. If the shell compatibility + level is set to 50 or lower, it reverts to the method + from bash-5.0 and previous versions, so seeding the ran- + dom number generator by assigning a value to RRAANNDDOOMM will + produce the same sequence as in bash-5.0 + +o If the command hash table is empty, bash versions prior + to bash-5.1 printed an informational message to that ef- + fect, even when producing output that can be reused as + input. Bash-5.1 suppresses that message when the --ll op- + tion is supplied. + + ccoommppaatt5511 + +o The uunnsseett builtin treats attempts to unset array sub- + scripts @@ and ** differently depending on whether the ar- + ray is indexed or associative, and differently than in + previous versions. 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 + 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 setting or unsetting the values of SSHHEELLLL, PPAATTHH, HHIISSTTFFIILLEE, EENNVV, + or BBAASSHH__EENNVV +o specifying command names containing // - +o specifying a file name containing a // as an argument to the .. + +o specifying a filename containing a // as an argument to the .. builtin command - +o Specifying a filename containing a slash as an argument to the + +o specifying a filename containing a slash as an argument to the + hhiissttoorryy 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 @@ -5261,25 +6560,28 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL +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 + +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. + +o turning off restricted mode with sseett ++rr or sshhoopptt --uu rree-- + ssttrriicctteedd__sshheellll. 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 + 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 + _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 -- + http://pubs.opengroup.org/onlinepubs/9699919799/ + http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode _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) @@ -5296,6 +6598,9 @@ FFIILLEESS _~_/_._b_a_s_h___l_o_g_o_u_t The individual login shell cleanup file, executed when a login shell exits + _~_/_._b_a_s_h___h_i_s_t_o_r_y + The default value of HHIISSTTFFIILLEE, the file in which bash saves the + command history _~_/_._i_n_p_u_t_r_c Individual _r_e_a_d_l_i_n_e initialization file @@ -5308,9 +6613,10 @@ AAUUTTHHOORRSS 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_/. + 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_/_g_n_u_/_b_a_s_h_/ and _h_t_t_p_:_/_/_g_i_t_._s_a_v_a_n_- + _n_a_h_._g_n_u_._o_r_g_/_c_g_i_t_/_b_a_s_h_._g_i_t_/_s_n_a_p_s_h_o_t_/_b_a_s_h_-_m_a_s_t_e_r_._t_a_r_._g_z. 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 @@ -5330,7 +6636,7 @@ BBUUGG RREEPPOORRTTSS 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. + to _c_h_e_t_._r_a_m_e_y_@_c_a_s_e_._e_d_u. BBUUGGSS It's too big and too slow. @@ -5355,4 +6661,4 @@ BBUUGGSS -GNU Bash-4.1 2009 December 29 BASH(1) +GNU Bash 5.2 2022 September 19 BASH(1) diff --git a/doc/bash.1 b/doc/bash.1 index 1890b3c..55c5622 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -3,14 +3,14 @@ .\" .\" Chet Ramey .\" Case Western Reserve University -.\" chet@po.cwru.edu +.\" chet.ramey@case.edu .\" -.\" Last Change: Tue Dec 29 15:36:16 EST 2009 +.\" Last Change: Mon Sep 19 11:13:21 EDT 2022 .\" .\" 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" +.TH BASH 1 "2022 September 19" "GNU Bash 5.2" .\" .\" There's some problem with having a `@' .\" in a tagged paragraph with the BSD man macros. @@ -23,19 +23,19 @@ .\" 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 -.. +.\" .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. @@ -48,10 +48,10 @@ bash \- GNU Bourne-Again SHell .SH SYNOPSIS .B bash [options] -[file] +[command_string | 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. +.if n Bash is Copyright (C) 1989-2022 by the Free Software Foundation, Inc. +.if t Bash is Copyright \(co 1989-2022 by the Free Software Foundation, Inc. .SH DESCRIPTION .B Bash is an \fBsh\fR-compatible command language interpreter that @@ -67,21 +67,27 @@ Shell and Utilities portion of the IEEE POSIX specification .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 +All of the single-character shell options documented in the +description of the \fBset\fR builtin command, including \fB\-o\fP, +can be used as options when the shell is invoked. +In addition, \fBbash\fR interprets the following options when it is invoked: .PP .PD 0 .TP 10 -.BI \-c "\| string\^" +.B \-c If the .B \-c -option is present, then commands are read from -.IR string . +option is present, then commands are read from the first non-option argument +.IR command_string . If there are arguments after the -.IR string , -they are assigned to the positional parameters, starting with -.BR $0 . +.IR command_string , +the first argument is assigned to +.B $0 +and any remaining arguments are assigned to the positional parameters. +The assignment to +.B $0 +sets the name of the shell, which is used in warning and error messages. .TP .B \-i If the @@ -113,7 +119,8 @@ If the 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. +when invoking an interactive shell or when reading input +through a pipe. .TP .B \-D A list of all double-quoted strings preceded by \fB$\fP @@ -161,10 +168,6 @@ 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 @@ -224,6 +227,11 @@ This option is on by default if the shell is invoked as .B \-\-posix Change the behavior of \fBbash\fP where the default operation differs from the POSIX standard to match the standard (\fIposix mode\fP). +See +.SM +.B "SEE ALSO" +below for a reference to a document that details how posix mode affects +bash's behavior. .TP .B \-\-restricted The shell becomes restricted (see @@ -232,7 +240,7 @@ The shell becomes restricted (see below). .TP .B \-\-verbose -Equivalent to \fB\-v\fP. +Equivalent to \fB\-v\fP. .TP .B \-\-version Show version information for this instance of @@ -248,7 +256,7 @@ 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, +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. @@ -265,14 +273,15 @@ 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 +or one started with the .B \-\-login option. .PP An \fIinteractive\fP shell is one started without non-option arguments +(unless \fB\-s\fP is specified) and without the .B \-c -option +option, whose standard input and error are both connected to terminals (as determined by .IR isatty (3)), @@ -296,7 +305,7 @@ 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 +Tildes are expanded in filenames as described below under .B "Tilde Expansion" in the .SM @@ -316,7 +325,8 @@ The .B \-\-noprofile option may be used when the shell is started to inhibit this behavior. .PP -When a login shell exits, +When an interactive login shell exits, +or a non-interactive login shell executes the \fBexit\fP builtin command, .B bash reads and executes commands from the file \fI~/.bash_logout\fP, if it exists. @@ -350,7 +360,7 @@ behaves as if the following command were executed: but the value of the .SM .B PATH -variable is not used to search for the file name. +variable is not used to search for the filename. .PP If .B bash @@ -386,7 +396,7 @@ files, the option has no effect. A non-interactive shell invoked with the name .B sh -does not attempt to read any other startup files. +does not attempt to read any other startup files. When invoked as .BR sh , .B bash @@ -410,19 +420,21 @@ 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. +connected to a network connection, as when executed by +the historical 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. +determines it is being run non-interactively 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 +option may be used to force another file to be read, but neither +\fIrshd\fP nor \fIsshd\fP 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 @@ -442,12 +454,11 @@ 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 +.B blank A space or tab. .TP .B word @@ -456,7 +467,7 @@ Also known as a .BR token . .TP .B name -A +A .I word consisting only of alphanumeric characters and underscores, and beginning with an alphabetic character or an underscore. Also @@ -468,40 +479,42 @@ 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 +.if t \fB| & ; ( ) < > space tab newline\fP +.if n \fB| & ; ( ) < > space tab newline\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 & && ; ;; ( ) | |& \fP -.if n \fB|| & && ; ;; ( ) | |& \fP +.if t \fB|| & && ; ;; ;& ;;& ( ) | |& \fP +.if n \fB|| & && ; ;; ;& ;;& ( ) | |& \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 +the first word of a command (see .SM .B SHELL GRAMMAR -below) or the third word of a -.B case +below), the third word of a +.B case or +.B select +command +(only \fBin\fP is valid), or the third word of a .B for -command: +command (only \fBin\fP and \fBdo\fP are valid): .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 n ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]] +.if t ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]] .if t .RE .SH "SHELL GRAMMAR" +This section describes the syntax of the various forms of shell commands. .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 @@ -512,7 +525,6 @@ 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 | @@ -520,23 +532,24 @@ 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 ... ] +[\fBtime\fP [\fB\-p\fP]] [ ! ] \fIcommand1\fP [ [\fB|\fP\(bv\fB|&\fP] \fIcommand2\fP ... ] .RE .PP The standard output of -.I command +.I command1 is connected via a pipe to the standard input of .IR command2 . This connection is performed before any redirections specified by the -command (see +.IR command1 (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. +If \fB|&\fP is used, \fIcommand1\fP's standard error, in addition to its +standard output, 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 to the standard output is +performed after any redirections specified by \fIcommand1\fP. .PP The return status of a pipeline is the exit status of the last command, unless the \fBpipefail\fP option is enabled. @@ -556,6 +569,8 @@ 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. +When the shell is in \fIposix mode\fP, it does not recognize +\fBtime\fP as a reserved word if the next token begins with a `-'. The .SM .B TIMEFORMAT @@ -567,17 +582,35 @@ under .B "Shell Variables" below. .PP -Each command in a pipeline is executed as a separate process (i.e., in a -subshell). -.SS Lists +When the shell is in \fIposix mode\fP, \fBtime\fP +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The +.SM +.B TIMEFORMAT +variable may be used to specify the format of +the time information. .PP +Each command in a multi-command pipeline, +where pipes are created, +is executed in a \fIsubshell\fP, which is a +separate process. +See +.SM +\fBCOMMAND EXECUTION ENVIRONMENT\fP +for a description of subshells and a subshell environment. +If the \fBlastpipe\fP option is enabled using the \fBshopt\fP builtin +(see the description of \fBshopt\fP below), +the last element of a pipeline may be run by the shell process +when job control is not active. +.SS Lists A \fIlist\fP is a sequence of one or more pipelines separated by one of the operators .BR ; , .BR & , .BR && , or -.BR \(bv\(bv , +.BR || , and optionally terminated by one of .BR ; , .BR & , @@ -587,7 +620,7 @@ or Of these list operators, .B && and -.B \(bv\(bv +.B || have equal precedence, followed by .B ; and @@ -600,15 +633,18 @@ of a semicolon to delimit commands. 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 +in a subshell. +The shell does not wait for the command to +finish, and the return status is 0. +These are referred to as \fIasynchronous\fP commands. +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 sequences of one or more pipelines separated by the +\fB&&\fP and \fB||\fP control operators, respectively. AND and OR lists are executed with left associativity. An AND list has the form .RS @@ -619,31 +655,32 @@ An AND list has the form .I command2 is executed if, and only if, .I command1 -returns an exit status of zero. +returns an exit status of zero (success). .PP An OR list has the form .RS .PP -\fIcommand1\fP \fB\(bv\(bv\fP \fIcommand2\fP -.PP +\fIcommand1\fP \fB||\fP \fIcommand2\fP .RE .PP .I command2 -is executed if and only if +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: +A \fIcompound command\fP is one of the following. +In most cases a \fIlist\fP in a command's description may be separated from +the rest of the command by one or more newlines, and may be followed by a +newline in place of a semicolon. .TP (\fIlist\fP) -\fIlist\fP is executed in a subshell environment (see +\fIlist\fP is executed in a subshell (see .SM \fBCOMMAND EXECUTION ENVIRONMENT\fP -below). +below for a description of a subshell environment). 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 @@ -667,8 +704,12 @@ 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. +otherwise the return status is 1. +The \fIexpression\fP +undergoes the same expansions +as if it were within double quotes, +but double quote characters in \fIexpression\fP are not treated specially +and are removed. .TP \fB[[\fP \fIexpression\fP \fB]]\fP Return a status of 0 or 1 depending on the evaluation of @@ -676,59 +717,85 @@ 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 +The words between the \fB[[\fP and \fB]]\fP do not undergo word splitting +and pathname expansion. +The shell performs tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process -substitution, and quote removal are performed. +substitution, and quote removal on those words +(the expansions that would occur if the words were enclosed in double quotes). 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 +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 +to the rules described below under \fBPattern Matching\fP, +as if the \fBextglob\fP shell option were enabled. +The \fB=\fP operator is equivalent to \fB==\fP. +If the .B nocasematch -is enabled, the match is performed without regard to the case +shell option 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. +Any part of the pattern may be quoted to force the quoted portion +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)). +a POSIX extended regular expression and matched accordingly +(using the POSIX \fIregcomp\fP and \fIregexec\fP interfaces +usually described 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 +If the .B nocasematch -is enabled, the match is performed without regard to the case +shell option 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 +If any part of the pattern is quoted, the quoted portion is matched literally. +This means every character in the quoted portion matches itself, +instead of having any special pattern matching meaning. +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched literally. +Treat bracket expressions in regular expressions carefully, +since normal quoting and pattern characters lose their meanings +between brackets. +.if t .sp 0.5 +.if n .sp 1 +The pattern will match if it matches any part of the string. +Anchor the pattern using the \fB^\fP and \fB$\fP regular expression +operators to force it to match the entire string. +The array variable .SM -.BR BASH_REMATCH . +.B BASH_REMATCH +records which parts of the string matched the pattern. The element of .SM .B BASH_REMATCH -with index 0 is the portion of the string -matching the entire regular expression. -The element of +with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining +.SM +.B BASH_REMATCH +indices. The element of .SM .B BASH_REMATCH with index \fIn\fP is the portion of the string matching the \fIn\fPth parenthesized subexpression. +Bash sets +.SM +.B BASH_REMATCH +in the global scope; declaring it as a local variable will lead to +unexpected results. .if t .sp 0.5 .if n .sp 1 Expressions may be combined using the following operators, listed @@ -754,8 +821,7 @@ and .I expression2 are true. .TP -.if t \fIexpression1\fP \fB\(bv\(bv\fP \fIexpression2\fP -.if n \fIexpression1\fP \fB||\fP \fIexpression2\fP +\fIexpression1\fP \fB||\fP \fIexpression2\fP True if either .I expression1 or @@ -763,9 +829,7 @@ or is true. .PD .LP -The \fB&&\fP and -.if t \fB\(bv\(bv\fP -.if n \fB||\fP +The \fB&&\fP and \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. @@ -800,21 +864,24 @@ 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 +of items, and 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 +below). +.B select +then displays the .SM .B PS3 -prompt is then displayed and a line read from the standard input. +prompt and reads a line 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 +is set to that word. +If the line is empty, the words and prompt are displayed again. +If EOF is read, the \fBselect\fP command completes and returns 1. +Any other value read causes .I name to be set to null. The line read is saved in the variable .SM @@ -833,19 +900,19 @@ or zero if no commands were executed. \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). +it against each \fIpattern\fP in turn, using the matching rules +described under +.B Pattern Matching +below. The \fIword\fP is expanded using tilde -expansion, parameter and variable expansion, arithmetic substitution, +expansion, parameter and variable expansion, arithmetic expansion, 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 +expansion, parameter and variable expansion, arithmetic expansion, +command substitution, process substitution, and quote removal. +If the .B nocasematch -is enabled, the match is performed without regard to the case +shell option 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 @@ -854,16 +921,17 @@ 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. +on a successful match, +continuing the case statement execution as if the pattern list had not matched. 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 \ +\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 +.B if .I list is executed. If its exit status is zero, the \fBthen\fP \fIlist\fP is executed. Otherwise, each \fBelif\fP @@ -873,45 +941,61 @@ 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 +\fBwhile\fP \fIlist-1\fP; \fBdo\fP \fIlist-2\fP; \fBdone\fP .PD 0 .TP -\fBuntil\fP \fIlist\fP; \fBdo\fP \fIlist\fP; \fBdone\fP +\fBuntil\fP \fIlist-1\fP; \fBdo\fP \fIlist-2\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 +The \fBwhile\fP command continuously executes the list +\fIlist-2\fP as long as the last command in the list \fIlist-1\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 +to the \fBwhile\fP command, except that the test is negated: +.I list-2 is executed as long as the last command in -.I list +.I list-1 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 +of the last command executed in \fIlist-2\fP, 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: +The syntax 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 +\fIcommand\fP may be either a simple command or a compound +command (see above). +\fINAME\fP is a shell variable name. +If \fINAME\fP is not supplied, the default name is \fBCOPROC\fP. +.PP +The recommended form to use for a coprocess is +.RS +.PP +\fBcoproc\fP \fINAME\fP { \fIcommand\fP [\fIredirections\fP]; } +.RE +.PP +This form is recommended because simple commands result in the coprocess +always being named \fBCOPROC\fP, and it is simpler to use and more complete +than the other compound commands. +.PP +If \fIcommand\fP is a compound command, \fINAME\fP is optional. The +word following \fBcoproc\fP determines whether that word is interpreted +as a variable name: it is interpreted as \fINAME\fP if it is not a +reserved word that introduces a compound command. +If \fIcommand\fP is a simple command, \fINAME\fP is not allowed; this +is to avoid confusion between \fINAME\fP and the first word of the simple +command. +.PP +When the coprocess 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 @@ -929,29 +1013,44 @@ command (see 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 +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. +.PP +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 +Since the coprocess is created as an asynchronous command, +the \fBcoproc\fP command always returns success. 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. +\fIfname\fP () \fIcompound\-command\fP [\fIredirection\fP] +.PD 0 +.TP +\fBfunction\fP \fIfname\fP [()] \fIcompound\-command\fP [\fIredirection\fP] +.PD +This defines a function named \fIfname\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 +.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 +If the \fBfunction\fP reserved word is used, but the +parentheses are not supplied, the braces are recommended. +\fIcompound\-command\fP is executed whenever \fIfname\fP is specified as the name of a simple command. +When in \fIposix mode\fP, \fIfname\fP must be a valid shell \fIname\fP +and may not be the name of one of the +POSIX \fIspecial builtins\fP. +In default mode, a function name can be any unquoted shell word that does +not contain \fB$\fP. Any redirections (see .SM .B REDIRECTION @@ -982,7 +1081,7 @@ option enabled does not allow comments. The 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 +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. @@ -1024,6 +1123,8 @@ of all characters within the quotes, with the exception of .BR \e , and, when history expansion is enabled, .BR ! . +When the shell is in \fIposix mode\fP, the \fB!\fP has no special meaning +within double quotes, even when history expansion is enabled. The characters .B $ and @@ -1056,10 +1157,11 @@ quotes (see .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: +Character sequences of the form \fB$\fP\(aq\fIstring\fP\(aq are treated +as a special variant of single quotes. +The sequence expands to \fIstring\fP, with backslash-escaped characters +in \fIstring\fP replaced as specified by the ANSI C standard. +Backslash escape sequences, if present, are decoded as follows: .RS .PD 0 .TP @@ -1073,19 +1175,19 @@ backspace .TP .B \eE an escape character -.TP +.TP .B \ef form feed -.TP +.TP .B \en new line -.TP +.TP .B \er carriage return .TP .B \et horizontal tab -.TP +.TP .B \ev vertical tab .TP @@ -1097,15 +1199,26 @@ single quote .TP .B \e\(dq double quote -.TP +.TP +.B \e? +question mark +.TP .B \e\fInnn\fP the eight-bit character whose value is the octal value \fInnn\fP -(one to three digits) +(one 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) .TP +.B \eu\fIHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHH\fP (one to four hex digits) +.TP +.B \eU\fIHHHHHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHHHHHH\fP (one to eight hex digits) +.TP .B \ec\fIx\fP a control-\fIx\fP character .PD @@ -1116,10 +1229,23 @@ 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. +The \fIgettext\fP infrastructure performs the lookup and +translation, using the \fBLC_MESSAGES\fP, \fBTEXTDOMAINDIR\fP, +and \fBTEXTDOMAIN\fP shell variables. +If the current locale is \fBC\fP or \fBPOSIX\fP, +if there are no translations available, +or if the string is not translated, +the dollar sign is ignored. +This is a form of double quoting, so the string remains double-quoted +by default, whether or not it is translated and replaced. +If the \fBnoexpand_translation\fP option is enabled +using the \fBshopt\fP builtin, +translated strings are single-quoted instead of double-quoted. +See the description of +.B shopt +below under +.SM +.BR SHELL BUILTIN COMMANDS . .SH PARAMETERS A .I parameter @@ -1175,10 +1301,7 @@ 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. +Word splitting and pathname expansion are not performed. Assignment statements may also appear as arguments to the .BR alias , .BR declare , @@ -1187,12 +1310,17 @@ Assignment statements may also appear as arguments to the .BR readonly , and .B local -builtin commands. +builtin commands (\fIdeclaration\fP commands). +When in \fIposix mode\fP, these builtins may appear in a command after +one or more instances of the \fBcommand\fP builtin and retain these +assignment statement properties. .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 +This includes arguments to builtin commands such as \fBdeclare\fP that +accept assignment statements (\fIdeclaration\fP commands). +When += is applied to a variable for which the \fBinteger\fP 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 @@ -1204,8 +1332,43 @@ appended to the array beginning at one greater than the array's maximum index 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 variable can be assigned the \fInameref\fP attribute using the +\fB\-n\fP option to the \fBdeclare\fP or \fBlocal\fP builtin commands +(see the descriptions of \fBdeclare\fP and \fBlocal\fP below) +to create a \fInameref\fP, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the \fInameref\fP +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable's value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +.sp .5 +.RS +.if t \f(CWdeclare -n ref=$1\fP +.if n declare -n ref=$1 +.RE +.sp .5 +inside the function creates a nameref variable \fBref\fP whose value is +the variable name passed as the first argument. +References and assignments to \fBref\fP, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as \fB$1\fP. +If the control variable in a \fBfor\fP loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the \fBnameref\fP attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the \fB\-n\fP option to the \fBunset\fP builtin. +Otherwise, if \fBunset\fP is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. +.SS Positional Parameters A .I positional parameter is a parameter denoted by one or more @@ -1226,16 +1389,18 @@ digit is expanded, it must be enclosed in braces (see .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 +Expands to the positional parameters, starting from one. +When the expansion is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and pathname expansion. +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 @@ -1254,7 +1419,14 @@ If is null, the parameters are joined without intervening separators. .TP .B @ -Expands to the positional parameters, starting from one. When the +Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +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" ... @@ -1262,7 +1434,7 @@ 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 +When there are no positional parameters, "\fB$@\fP" and .B $@ expand to nothing (i.e., they are removed). .TP @@ -1274,7 +1446,7 @@ Expands to the exit status of the most recently executed foreground pipeline. .TP .B \- -Expands to the current option flags as specified upon invocation, +Expands to the current option flags as specified upon invocation, by the .B set builtin command, or those set by the shell itself @@ -1283,13 +1455,17 @@ builtin command, or those set by the shell itself option). .TP .B $ -Expands to the process ID of the shell. In a () subshell, it +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. +Expands to the process ID of the job most recently placed into the +background, whether executed as an asynchronous command or using +the \fBbg\fP builtin (see +.SM +.B "JOB CONTROL" +below). .TP .B 0 Expands to the name of the shell or shell script. This is set at @@ -1305,29 +1481,28 @@ 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 +to the filename used to invoke .BR bash , as given by argument zero. +.PD +.SS Shell Variables +The following variables are set by the shell: +.PP +.PD 0 .TP .B _ -At shell startup, set to the absolute pathname used to invoke the +At shell startup, set to the 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. +Subsequently, expands to the last argument to the previous simple +command executed in the foreground, 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 +Expands to the full filename used to invoke this instance of .BR bash . .TP .B BASHOPTS @@ -1352,15 +1527,28 @@ reading any startup files. This variable is read-only. .TP .B BASHPID -Expands to the process id of the current \fBbash\fP process. +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. +Assignments to +.SM +.B BASHPID +have no effect. +If +.B BASHPID +is unset, it loses its special properties, even if it is +subsequently reset. .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. +list of aliases as maintained by the \fBalias\fP builtin. +Elements added to this array appear in the alias list; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If +.B BASH_ALIASES +is unset, it loses its special properties, even if it is +subsequently reset. .TP .B BASH_ARGC An array variable whose values are the number of parameters in each @@ -1378,7 +1566,10 @@ only when in extended debugging mode (see the description of the .B extdebug option to the .B shopt -builtin below) +builtin below). +Setting \fBextdebug\fP after the shell has started to execute a script, +or referencing this variable when \fBextdebug\fP is not set, +may result in inconsistent values. .TP .B BASH_ARGV An array variable containing all of the parameters in the current \fBbash\fP @@ -1396,37 +1587,69 @@ only when in extended debugging mode .B extdebug option to the .B shopt -builtin below) +builtin below). +Setting \fBextdebug\fP after the shell has started to execute a script, +or referencing this variable when \fBextdebug\fP is not set, +may result in inconsistent values. +.TP +.B BASH_ARGV0 +When referenced, this variable expands to the name of the shell or shell +script (identical to +.BR $0 ; +see the description of special parameter 0 above). +Assignment to +.B BASH_ARGV0 +causes the value assigned to also be assigned to \fB$0\fP. +If +.B BASH_ARGV0 +is unset, it loses its special properties, even if it is +subsequently reset. .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. +Elements added to this array appear in the hash table; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If +.B BASH_CMDS +is unset, it loses its special properties, even if it is +subsequently reset. .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. +If +.B BASH_COMMAND +is unset, it loses its special properties, even if it is +subsequently reset. .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 +where each corresponding member of .SM -.BR FUNCNAME . +.B FUNCNAME +was invoked. \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 +file (\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP) 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_LOADABLES_PATH +A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +.B enable +command. +.TP .B BASH_REMATCH An array variable whose members are assigned by the \fB=~\fP binary operator to the \fB[[\fP conditional command. @@ -1434,18 +1657,26 @@ 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 +An array variable whose members are the source filenames +where the corresponding shell function names in the .SM .B FUNCNAME -array variable. +array variable are defined. +The shell function +\fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP is defined in the file +\fB${BASH_SOURCE[\fP\fI$i\fP\fB]}\fP and called from +\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP. .TP .B BASH_SUBSHELL -Incremented by one each time a subshell or subshell environment is spawned. +Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. The initial value is 0. +If +.B BASH_SUBSHELL +is unset, it loses its special properties, even if it is +subsequently reset. .TP .B BASH_VERSINFO A readonly array variable whose members hold version information for @@ -1454,7 +1685,6 @@ this instance of 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). @@ -1475,7 +1705,6 @@ The release status (e.g., \fIbeta1\fP). The value of .SM .BR MACHTYPE . -.PD .RE .TP .B BASH_VERSION @@ -1544,6 +1773,11 @@ This variable is available only in shell functions invoked by the programmable completion facilities (see \fBProgrammable Completion\fP below). .TP +.B COPROC +An array variable (see \fBArrays\fP below) created to hold the file descriptors +for output from and input to an unnamed coprocess (see \fBCoprocesses\fP +above). +.TP .B DIRSTACK An array variable (see .B Arrays @@ -1564,6 +1798,33 @@ If is unset, it loses its special properties, even if it is subsequently reset. .TP +.B EPOCHREALTIME +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see \fItime\fP\fR(3)\fP) as a floating point value +with micro-second granularity. +Assignments to +.SM +.B EPOCHREALTIME +are ignored. +If +.SM +.B EPOCHREALTIME +is unset, it loses its special properties, even if it is +subsequently reset. +.TP +.B EPOCHSECONDS +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see \fItime\fP\fR(3)\fP). +Assignments to +.SM +.B EPOCHSECONDS +are ignored. +If +.SM +.B EPOCHSECONDS +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. @@ -1573,27 +1834,37 @@ 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 +The bottom-most element (the one with the highest index) 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. +have no effect. If .SM .B FUNCNAME is unset, it loses its special properties, even if it is subsequently reset. +.if t .sp 0.5 +.if n .sp 1 +This variable can be used with \fBBASH_LINENO\fP and \fBBASH_SOURCE\fP. +Each element of \fBFUNCNAME\fP has corresponding elements in +\fBBASH_LINENO\fP and \fBBASH_SOURCE\fP to describe the call stack. +For instance, \fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called from the file +\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP at line number +\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP. +The \fBcaller\fP builtin displays the current call stack using this +information. .TP .B GROUPS An array variable containing the list of groups of which the current user is a member. -Assignments to +Assignments to .SM .B GROUPS -have no effect and return an error status. +have no effect. If .SM .B GROUPS @@ -1603,6 +1874,10 @@ subsequently reset. .B HISTCMD The history number, or index in the history list, of the current command. +Assignments to +.SM +.B HISTCMD +are ignored. If .SM .B HISTCMD @@ -1638,6 +1913,10 @@ type on which is executing, in the standard GNU \fIcpu-company-system\fP format. The default is system-dependent. .TP +.B MAPFILE +An array variable (see \fBArrays\fP below) created to hold the text +read by the \fBmapfile\fP builtin when no variable name is supplied. +.TP .B OLDPWD The previous working directory as set by the .B cd @@ -1682,18 +1961,64 @@ The current working directory as set by the 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 +Each time this parameter is referenced, it expands to a random integer +between 0 and 32767. +Assigning a value to .SM -.BR RANDOM . +.BR RANDOM +initializes (seeds) the sequence of random numbers. If .SM .B RANDOM is unset, it loses its special properties, even if it is subsequently reset. .TP +.B READLINE_ARGUMENT +Any numeric argument given to a readline command that was defined using +.if t \f(CWbind -x\fP +.if n "bind -x" +(see +.SM +.B "SHELL BUILTIN COMMANDS" +below) +when it was invoked. +.TP +.B READLINE_LINE +The contents of the +.B readline +line buffer, for use with +.if t \f(CWbind -x\fP +.if n "bind -x" +(see +.SM +.B "SHELL BUILTIN COMMANDS" +below). +.TP +.B READLINE_MARK +The position of the mark (saved insertion point) in the +.B readline +line buffer, for use with +.if t \f(CWbind -x\fP +.if n "bind -x" +(see +.SM +.B "SHELL BUILTIN COMMANDS" +below). +The characters between the insertion point and the mark are often +called the \fIregion\fP. +.TP +.B READLINE_POINT +The position of the insertion point in the +.B readline +line buffer, for use with +.if t \f(CWbind -x\fP +.if n "bind -x" +(see +.SM +.B "SHELL BUILTIN COMMANDS" +below). +.TP .B REPLY Set to the line of input read by the .B read @@ -1701,13 +2026,15 @@ 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 +referenced, it expands to the number of seconds since shell invocation. +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. +The number of seconds at shell invocation and the current time are always +determined by querying the system clock. If .SM .B SECONDS @@ -1740,6 +2067,19 @@ Incremented by one each time an instance of .B bash is started. .TP +.B SRANDOM +This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support \f(CW/dev/urandom\fP or \fIarc4random\fP, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If +.SM +.B SRANDOM +is unset, it loses its special properties, +even if it is subsequently reset. +.TP .B UID Expands to the user ID of the current user, initialized at shell startup. This variable is readonly. @@ -1752,6 +2092,29 @@ below. .PP .PD 0 .TP +.B BASH_COMPAT +The value is used to set the shell's compatibility level. +See +.SM +.B "SHELL COMPATIBILITY MODE" +below for a description of the various compatibility +levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If \fBBASH_COMPAT\fP is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If \fBBASH_COMPAT\fP is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below under +.SM +.BR "SHELL COMPATIBILITY MODE" . +For example, 4.2 and 42 are valid values that correspond +to the \fBcompat42\fP \fBshopt\fP option +and set the compatibility level to 42. +The current version is also a valid value. +.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 @@ -1761,22 +2124,10 @@ The value of .SM .B BASH_ENV is subjected to parameter expansion, command substitution, and arithmetic -expansion before being interpreted as a file name. +expansion before being interpreted as a filename. .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". +is not used to search for the resultant filename. .TP .B BASH_XTRACEFD If set to an integer corresponding to a valid file descriptor, \fBbash\fP @@ -1800,23 +2151,70 @@ to 2 (the standard error file descriptor) and then unsetting it will result in the standard error being closed. .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 CHILD_MAX +Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a POSIX-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent. +.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. +Used by the \fBselect\fP compound command to determine the terminal width +when printing selection lists. +Automatically set if the +.B checkwinsize +option is enabled or in an interactive shell upon receipt of a +.SM +.BR 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). +Each array element contains one possible completion. .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 +it assumes that the shell is running in an Emacs shell buffer and disables line editing. .TP +.B ENV +Expanded and executed similarly to +.SM +.B BASH_ENV +(see \fBINVOCATION\fP above) +when an interactive shell is invoked in \fIposix mode\fP. +.TP +.B EXECIGNORE +A colon-separated list of shell patterns (see \fBPattern Matching\fP) +defining the list of filenames to be ignored by command search using +\fBPATH\fP. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via \fBPATH\fP lookup. +This does not affect the behavior of the \fB[\fP, \fBtest\fP, and \fB[[\fP +commands. +Full pathnames in the command hash table are not subject to \fBEXECIGNORE\fP. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the \fBextglob\fP shell +option. +.TP .B FCEDIT The default editor for the .B fc @@ -1828,7 +2226,7 @@ filename completion (see .SM .B READLINE below). -A filename whose suffix matches one of the entries in +A filename whose suffix matches one of the entries in .SM .B FIGNORE is excluded from the list of matched filenames. @@ -1836,10 +2234,15 @@ A sample value is .if t \f(CW".o:~"\fP. .if n ".o:~". .TP +.B FUNCNEST +If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort. +.TP .B GLOBIGNORE -A colon-separated list of patterns defining the set of filenames to +A colon-separated list of patterns defining the set of file names to be ignored by pathname expansion. -If a filename matched by a pathname expansion pattern also matches one +If a file name matched by a pathname expansion pattern also matches one of the patterns in .SM .BR GLOBIGNORE , @@ -1853,14 +2256,14 @@ If the list of values includes lines which begin with a .B space character are not saved in the history list. -A value of +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 +.I 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. @@ -1882,15 +2285,19 @@ 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. +command history is not saved when a 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. +necessary, +to contain no more than that number of lines by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of \fBHISTSIZE\fP +after reading any startup files. .TP .B HISTIGNORE A colon-separated list of patterns used to decide which command lines @@ -1908,12 +2315,18 @@ 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 . +The pattern matching honors the setting of the \fBextglob\fP shell +option. .TP .B HISTSIZE The number of commands to remember in the command history (see .SM .B HISTORY -below). The default value is 500. +below). +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files. .TP .B HISTTIMEFORMAT If this variable is set and not null, its value is used as a format string @@ -1990,6 +2403,11 @@ startup file, overriding the default of .B READLINE below). .TP +.B INSIDE_EMACS +If this variable appears in the environment when the shell starts, +\fBbash\fP assumes that it is running inside an Emacs shell buffer +and may disable line editing, depending on the value of \fBTERM\fP. +.TP .B LANG Used to determine the locale category for any category not specifically selected with a variable starting with \fBLC_\fP. @@ -2019,19 +2437,27 @@ strings preceded by a \fB$\fP. .B LC_NUMERIC This variable determines the locale category used for number formatting. .TP +.B LC_TIME +This variable determines the locale category used for data and time +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 +Used by the \fBselect\fP compound command to determine the column length +for printing selection lists. +Automatically set if the +.B checkwinsize +option is enabled or in an interactive shell upon receipt of a .SM .BR SIGWINCH . .TP .B MAIL -If this parameter is set to a file name and the +If this parameter is set to a file or directory name and the .SM .B MAILPATH variable is not set, .B bash -informs the user of the arrival of mail in the specified file. +informs the user of the arrival of mail in the specified file or +Maildir-format directory. .TP .B MAILCHECK Specifies how @@ -2043,18 +2469,20 @@ 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. +A colon-separated list of filenames 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 `?'. +may be specified by separating the filename from the message with a `?'. When used in the text of the message, \fB$_\fP expands to the name of -the current mailfile. +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 +can be configured to supply +a default value for this variable (there is no value by default), +but the location of the user mail files that it uses is system dependent (e.g., /var/mail/\fB$USER\fP). .RE .TP @@ -2089,8 +2517,10 @@ 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''. +.na +.if t \f(CW/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin\fP. +.if n ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''. +.ad .TP .B POSIXLY_CORRECT If this variable is in the environment when \fBbash\fP starts, the shell @@ -2101,10 +2531,15 @@ 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. +When the shell enters \fIposix mode\fP, it sets this variable if it was +not already set. .TP .B PROMPT_COMMAND -If set, the value is executed as a command prior to issuing each primary -prompt. +If this variable is set, and is an array, +the value of each set element is executed as a command +prior to issuing each primary prompt. +If this is set but not an array variable, +its value is used as a command to execute instead. .TP .B PROMPT_DIRTRIM If set to a number greater than zero, the value is used as the number of @@ -2114,6 +2549,13 @@ trailing directory components to retain when expanding the \fB\ew\fP and .B PROMPTING below). Characters removed are replaced with an ellipsis. .TP +.B PS0 +The value of this parameter is expanded (see +.SM +.B PROMPTING +below) and displayed by interactive shells after reading a command +and before the command is executed. +.TP .B PS1 The value of this parameter is expanded (see .SM @@ -2143,13 +2585,14 @@ The value of this parameter is expanded as with and the value is printed before each command .B bash displays during an execution trace. The first character of +the expanded value 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. +This variable expands to the full pathname to the shell. If it is not set when the shell starts, .B bash assigns to it the full pathname of the current user's login shell. @@ -2197,9 +2640,10 @@ 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. +value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\et%3lS\(aq\fP. If the value is null, no timing information is displayed. A trailing newline is added when the format string is displayed. +.PD 0 .TP .B TMOUT If set to a value greater than zero, @@ -2213,14 +2657,15 @@ after .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. +number of seconds to wait for a line of input after issuing the +primary prompt. .B Bash -terminates after waiting for that number of seconds if input does -not arrive. +terminates after waiting for that number of seconds if a complete +line of 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. +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 @@ -2278,15 +2723,15 @@ 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 +expressions) and are zero-based; associative arrays are referenced using arbitrary strings. +Unless otherwise noted, indexed array indices must be non-negative integers. .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 +is treated as an arithmetic expression that must evaluate to a number. +To explicitly declare an indexed array, use .B declare \-a \fIname\fP (see .SM @@ -2307,19 +2752,45 @@ 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. +\fIvalue\fP may be of the form [\fIsubscript\fP]=\fIstring\fP. +Indexed array assignments do not require anything but \fIstring\fP. +Each \fIvalue\fP in the list is expanded using all the shell expansions +described below under +.SM +.BR EXPANSION . 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. +When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +\fIname\fP=\fB( \fP\fIkey1 value1 key2 value2\fP ...\fB)\fP. +These are treated identically to +\fIname\fP=\fB(\fP [\fIkey1\fP]=\fIvalue1\fP [\fIkey2\fP]=\fIvalue2\fP ...\fB)\fP. +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string. .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. +When assigning to an indexed array, if +.I name +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +\fIname\fP, so negative indices count back from the end of the +array, and an index of \-1 references the last element. +.PP +The += operator will append to an array variable when assigning +using the compound assignment syntax; see +.SM +.B PARAMETERS +above. .PP Any element of an array may be referenced using ${\fIname\fP[\fIsubscript\fP]}. The braces are required to avoid @@ -2345,21 +2816,50 @@ of the special parameters \fB*\fP and \fB@\fP (see 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. +If the +.I subscript +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the +array, and an index of \-1 references the last element. +.PP Referencing an array variable without a subscript is equivalent to referencing the array with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +.B bash +will create an array if necessary. .PP An array variable is considered set if a subscript has been assigned a value. The null string is a valid value. .PP +It is possible to obtain the keys (indices) of an array as well as the values. +${\fB!\fP\fIname\fP[\fI@\fP]} and ${\fB!\fP\fIname\fP[\fI*\fP]} +expand to the indices assigned in array variable \fIname\fP. +The treatment when in double quotes is similar to the expansion of the +special parameters \fI@\fP and \fI*\fP within double quotes. +.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 +destroys the array element at index \fIsubscript\fP, +for both indexed and associative arrays. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +\fBunset\fP \fIname\fP, where \fIname\fP is an array, +removes the entire array. \fBunset\fP \fIname\fP[\fIsubscript\fP], where -\fIsubscript\fP is \fB*\fP or \fB@\fP, removes the entire array. +\fIsubscript\fP is \fB*\fP or \fB@\fP, behaves differently depending on +whether \fIname\fP is an indexed or associative array. +If \fIname\fP is an associative array, this unsets the element with +subscript \fB*\fP or \fB@\fP. +If \fIname\fP is an indexed array, unset removes all of the elements but +does not remove the array itself. +.PP +When using a variable name with a subscript as an argument to a command, +such as with \fBunset\fP, without using the word expansion syntax +described above, the argument is subject to pathname expansion. +If pathname expansion is not desired, the argument should be quoted. .PP The .BR declare , @@ -2371,6 +2871,9 @@ builtins each accept a option to specify an indexed array and a .B \-A option to specify an associative array. +If both options are supplied, +.B \-A +takes precedence. The .B read builtin accepts a @@ -2394,25 +2897,33 @@ words. There are seven kinds of expansion performed: 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. +The order of expansions is: +brace expansion; +tilde expansion, parameter and variable expansion, 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. +This is performed at the +same time as tilde, parameter, variable, and arithmetic expansion and +command substitution. +.PP +After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(\fIquote removal\fP). .PP Only brace expansion, word splitting, and pathname expansion -can change the number of words of the expansion; other expansions +can increase 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" +"\fB$@\fP" and "\fB${\fP\fIname\fP\fB[@]}\fP", +and, in most cases, \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 @@ -2434,19 +2945,22 @@ 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, +where \fIx\fP and \fIy\fP are either integers or single letters, 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 +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 letters are supplied, the expression expands to each character +lexicographically between \fIx\fP and \fIy\fP, inclusive, +using the default C locale. +Note that both \fIx\fP and \fIy\fP must be of the same type +(integer or letter). When the increment is supplied, it is used as the difference between -each term. The default increment is 1 or -1 as appropriate. +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 @@ -2462,7 +2976,8 @@ 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. +is not considered eligible for brace expansion, and inhibits brace +expansion until the closing \fB}\fP. .PP This construct is typically used as shorthand when the common prefix of the strings to be generated is longer than in the @@ -2497,7 +3012,7 @@ If strict compatibility with is desired, start .B bash with the -.B +B +.B +B option or disable brace expansion with the .B +B option to the @@ -2507,7 +3022,6 @@ command (see .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. @@ -2552,7 +3066,7 @@ following a or the first .BR = . In these cases, tilde expansion is also performed. -Consequently, one may use file names with tildes in assignments to +Consequently, one may use filenames with tildes in assignments to .SM .BR PATH , .SM @@ -2561,8 +3075,15 @@ and .SM .BR CDPATH , and the shell assigns the expanded value. -.SS Parameter Expansion .PP +Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (as described above under +.SM +.BR PARAMETERS ) +when they appear as arguments to simple commands. +Bash does not do this, except for the \fIdeclaration\fP commands listed +above, when in \fIposix mode\fP. +.SS Parameter Expansion 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 @@ -2586,16 +3107,24 @@ or when .I parameter is followed by a character which is not to be interpreted as part of its name. +The \fIparameter\fP is a shell parameter as described above +\fBPARAMETERS\fP) or an array reference (\fBArrays\fP). .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. +and \fIparameter\fP is not a \fInameref\fP, +it introduces a level of indirection. +\fBBash\fP uses the value formed by expanding the rest of +\fIparameter\fP as the new \fIparameter\fP; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original \fIparameter\fP. This is known as \fIindirect expansion\fP. -The exceptions to this are the expansions of ${!\fIprefix\fP*} and +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If \fIparameter\fP is a nameref, this expands to the name of the +parameter referenced by \fIparameter\fP instead of performing the +complete indirect expansion. +The exceptions to this are the expansions of ${\fB!\fP\fIprefix\fP\fB*\fP} and ${\fB!\fP\fIname\fP[\fI@\fP]} described below. The exclamation point must immediately follow the left brace in order to introduce indirection. @@ -2603,7 +3132,8 @@ introduce indirection. 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, +When not performing substring expansion, using the forms documented below +(e.g., \fB:-\fP), \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 @@ -2655,31 +3185,52 @@ ${\fIparameter\fP\fB:\fP\fIoffset\fP} .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 +\fBSubstring Expansion\fP. +Expands to up to \fIlength\fP characters of the value 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. +If \fIparameter\fP is \fB@\fP or \fB*\fP, an indexed array subscripted by +\fB@\fP or \fB*\fP, or an associative array name, the results differ as +described below. +If \fIlength\fP is omitted, expands to the substring of the value of +\fIparameter\fP starting at the character specified by \fIoffset\fP +and extending to the end of the value. \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. +.sp 1 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. +is used as an offset in characters +from the end of the value of \fIparameter\fP. +If \fIlength\fP evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of \fIparameter\fP rather than +a number of characters, and the expansion is the characters between +\fIoffset\fP and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the \fB:-\fP expansion. +.sp 1 +If \fIparameter\fP is \fB@\fP or \fB*\fP, the result is \fIlength\fP +positional parameters beginning at \fIoffset\fP. +A negative \fIoffset\fP is taken relative to one greater than the greatest +positional parameter, so an offset of \-1 evaluates to the last positional +parameter. +It is an expansion error if \fIlength\fP evaluates to a number less than +zero. +.sp 1 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. +It is an expansion error if \fIlength\fP evaluates to a number less than +zero. +.sp 1 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 +.sp 1 +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. @@ -2689,7 +3240,7 @@ ${\fB!\fP\fIprefix\fP\fB*\fP} .TP ${\fB!\fP\fIprefix\fP\fB@\fP} .PD -\fBNames matching prefix.\fP +\fBNames matching prefix\fP. Expands to the names of variables whose names begin with \fIprefix\fP, separated by the first character of the .SM @@ -2703,7 +3254,7 @@ ${\fB!\fP\fIname\fP[\fI@\fP]} .TP ${\fB!\fP\fIname\fP[\fI*\fP]} .PD -\fBList of array keys.\fP +\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 @@ -2712,13 +3263,13 @@ 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 +\fBParameter length\fP. The length in characters of the value of \fIparameter\fP is substituted. If .I parameter is .B * -or +or .BR @ , the value substituted is the number of positional parameters. If @@ -2728,17 +3279,28 @@ is an array name subscripted by or .BR @ , the value substituted is the number of elements in the array. +If +.I parameter +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +\fIparameter\fP, so negative indices count back from the end of the +array, and an index of \-1 references the last element. .TP ${\fIparameter\fP\fB#\fP\fIword\fP} .PD 0 .TP ${\fIparameter\fP\fB##\fP\fIword\fP} .PD -\fBRemove matching prefix pattern.\fP -The +\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 +expansion, and matched against the expanded value of +.I parameter +using the rules described under +.B Pattern Matching +below. +If the pattern matches the beginning of the value of .IR parameter , then the result of the expansion is the expanded value of @@ -2767,9 +3329,13 @@ ${\fIparameter\fP\fB%\fP\fIword\fP} .TP ${\fIparameter\fP\fB%%\fP\fIword\fP} .PD -\fBRemove matching suffix pattern.\fP +\fBRemove matching suffix pattern\fP. The \fIword\fP is expanded to produce a pattern just as in -pathname expansion. +pathname expansion, and matched against the expanded value of +.I parameter +using the rules described under +.B Pattern Matching +below. 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 @@ -2794,19 +3360,62 @@ 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 +.PD 0 +.TP +${\fIparameter\fP\fB//\fP\fIpattern\fP\fB/\fP\fIstring\fP} +.TP +${\fIparameter\fP\fB/#\fP\fIpattern\fP\fB/\fP\fIstring\fP} +.TP +${\fIparameter\fP\fB/%\fP\fIpattern\fP\fB/\fP\fIstring\fP} +.PD +\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 +\fIstring\fP undergoes tilde expansion, parameter and variable expansion, +arithmetic expansion, command and process substitution, and quote removal. +The match is performed using the rules described under +.B Pattern Matching +below. +In the first form above, only the first match is replaced. +If there are two slashes separating \fIparameter\fP and \fIpattern\fP +(the second form above), all matches of \fIpattern\fP are +replaced with \fIstring\fP. +If \fIpattern\fP is preceded by \fB#\fP (the third form above), +it must match at the beginning of the expanded value of \fIparameter\fP. +If \fIpattern\fP is preceded by \fB%\fP (the fourth form above), +it must match at the end of the expanded value of \fIparameter\fP. +If the expansion of \fIstring\fP is null, +matches of \fIpattern\fP are deleted. +If \fIstring\fP is null, +matches of \fIpattern\fP are deleted and the \fB/\fP following \fIpattern\fP may be omitted. +.sp 1 +If the \fBpatsub_replacement\fP shell option is enabled using \fBshopt\fP, +any unquoted instances of \fB&\fP in \fIstring\fP are replaced with the +matching portion of \fIpattern\fP. +.sp 1 +Quoting any part of \fIstring\fP inhibits replacement in the +expansion of the quoted portion, including replacement strings stored +in shell variables. +Backslash will escape \fB&\fP in \fIstring\fP; the backslash is removed +in order to permit a literal \fB&\fP in the replacement string. +Backslash can also be used to escape a backslash; \fB\e\e\fP results in +a literal backslash in the replacement. +Users should take care if \fIstring\fP is double-quoted to avoid +unwanted interactions between the backslash and double-quoting, since +backslash has special meaning within double quotes. +Pattern substitution performs the check for unquoted \fB&\fP after +expanding \fIstring\fP; +shell programmers should quote any occurrences of \fB&\fP +they want to be taken literally in the replacement +and ensure any instances of \fB&\fP they want to be replaced are unquoted. +.sp 1 +If the +.B nocasematch +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. If .I parameter is @@ -2833,16 +3442,19 @@ ${\fIparameter\fP\fB,\fP\fIpattern\fP} .TP ${\fIparameter\fP\fB,,\fP\fIpattern\fP} .PD -\fBCase modification.\fP +\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. +Each character in the expanded value of \fIparameter\fP is tested against +\fIpattern\fP, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. 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.. +the first character in the expanded value. If \fIpattern\fP is omitted, it is treated like a \fB?\fP, which matches every character. If @@ -2861,11 +3473,83 @@ 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 +.TP +${\fIparameter\fP\fB@\fP\fIoperator\fP} +\fBParameter transformation\fP. +The expansion is either a transformation of the value of \fIparameter\fP +or information about \fIparameter\fP itself, depending on the value of +\fIoperator\fP. Each \fIoperator\fP is a single letter: +.sp 1 +.RS +.PD 0 +.TP +.B U +The expansion is a string that is the value of \fIparameter\fP with lowercase +alphabetic characters converted to uppercase. +.TP +.B u +The expansion is a string that is the value of \fIparameter\fP with the first +character converted to uppercase, if it is alphabetic. +.TP +.B L +The expansion is a string that is the value of \fIparameter\fP with uppercase +alphabetic characters converted to lowercase. +.TP +.B Q +The expansion is a string that is the value of \fIparameter\fP quoted in a +format that can be reused as input. +.TP +.B E +The expansion is a string that is the value of \fIparameter\fP with backslash +escape sequences expanded as with the \fB$\(aq...\(aq\fP quoting mechanism. +.TP +.B P +The expansion is a string that is the result of expanding the value of +\fIparameter\fP as if it were a prompt string (see \fBPROMPTING\fP below). +.TP +.B A +The expansion is a string in the form of +an assignment statement or \fBdeclare\fP command that, if +evaluated, will recreate \fIparameter\fP with its attributes and value. +.TP +.B K +Produces a possibly-quoted version of the value of \fIparameter\fP, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(see \fBArrays\fP above). +.TP +.B a +The expansion is a string consisting of flag values representing +\fIparameter\fP's attributes. +.TP +.B k +Like the K transformation, but expands the keys and values of +indexed and associative arrays to separate words after word splitting. +.PD .PP +If +.I parameter +is +.B @ +or +.BR * , +the 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 operation is applied to each member of the +array in turn, and the expansion is the resultant list. +.sp 1 +The result of the expansion is subject to word splitting and pathname +expansion as described below. +.RE +.SS Command Substitution \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 @@ -2876,8 +3560,8 @@ or .RE .PP .B Bash -performs the expansion by executing \fIcommand\fP and -replacing the command substitution with the standard output of the +performs the expansion by executing \fIcommand\fP in a subshell environment +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. @@ -2901,7 +3585,6 @@ escape the inner backquotes with backslashes. 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 @@ -2911,10 +3594,13 @@ and the substitution of the result. The format for arithmetic expansion is: .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. +undergoes the same expansions +as if it were within double quotes, +but double quote characters in \fIexpression\fP are not treated specially +and are removed. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. Arithmetic expansions may be nested. .PP The evaluation is performed according to the rules listed below under @@ -2926,27 +3612,29 @@ 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. +\fIProcess substitution\fP allows a process's input or output to be +referred to using a filename. 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 +The process \fIlist\fP is run asynchronously, and its input or output +appears as a filename. +This filename 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 +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. +Process substitution is supported on systems that support named +pipes (\fIFIFOs\fP) or the \fB/dev/fd\fP method of naming open files. .PP When available, process substitution is performed -simultaneously with parameter and variable expansion, +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, @@ -2959,7 +3647,8 @@ 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 +expansions into words using these characters as field terminators. +If .SM .B IFS is unset, or its @@ -2982,14 +3671,15 @@ If .B IFS has a value other than the default, then sequences of the whitespace characters -.B space +.BR space , +.BR tab , and -.B tab +.B newline are ignored at the beginning and end of the word, as long as the whitespace character is in the value of .SM -.BR IFS +.B IFS (an .SM .B IFS @@ -3013,16 +3703,22 @@ If the value of .B IFS is null, no word splitting occurs. .PP -Explicit null arguments (\^\f3"\^"\fP or \^\f3\(aq\^\(aq\fP\^) are retained. +Explicit null arguments (\^\f3"\^"\fP or \^\f3\(aq\^\(aq\fP\^) are retained +and passed to commands as empty strings. 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. +null argument results and is retained +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +\f(CW\-d\(aq\^\(aq\fP becomes \f(CW\-d\fP after word splitting and +null argument removal. .PP Note that if no expansion occurs, no splitting is performed. .SS Pathname Expansion -.PP After word splitting, unless the .B \-f @@ -3033,16 +3729,20 @@ scans each word for the characters .BR ? , and .BR [ . -If one of these characters appears, then the word is +If one of these characters appears, and is not quoted, 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, +filenames matching the pattern +(see +.SM +.B "Pattern Matching" +below). +If no matching filenames are found, and the shell option .B nullglob is not enabled, the word is left unchanged. -If the +If the .B nullglob option is set, and no matches are found, the word is removed. @@ -3061,11 +3761,31 @@ 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 +In order to match the filenames +.B ``.'' +and +.BR ``..'' , +the pattern must begin with ``.'' (for example, ``.?''), +even if +.B dotglob +is set. +If the +.B globskipdots +shell option is enabled, the filenames +.B ``.'' +and +.BR ``..'' +are never matched, even if the pattern begins with a +.BR ``.'' . +When not matching pathnames, the .B ``.'' character is not treated specially. +When matching a pathname, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below under +.SM +.BR "Pattern Matching" . See the description of .B shopt below under @@ -3074,6 +3794,7 @@ below under for a description of the .BR nocaseglob , .BR nullglob , +.BR globskipdots , .BR failglob , and .B dotglob @@ -3091,7 +3812,11 @@ 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 +If the \fBnocaseglob\fP option is set, the matching against the patterns in +.SM +.B GLOBIGNORE +is performed without regard to case. +The filenames .B ``.'' and .B ``..'' @@ -3103,10 +3828,10 @@ is set and not null. However, setting .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 +shell option, so all other filenames beginning with a .B ``.'' will match. -To get the old behavior of ignoring file names beginning with a +To get the old behavior of ignoring filenames beginning with a .BR ``.'' , make .B ``.*'' @@ -3119,6 +3844,8 @@ option is disabled when .SM .B GLOBIGNORE is unset. +The pattern matching honors the setting of the \fBextglob\fP shell +option. .PP \fBPattern Matching\fP .PP @@ -3132,6 +3859,7 @@ they are to be matched literally. The special pattern characters have the following meanings: .PP .PD 0 +.RS .TP .B * Matches any string, including the null string. @@ -3149,7 +3877,7 @@ Matches any single character. 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, +any character that falls between those two characters, inclusive, using the current locale's collating sequence and character set, is matched. If the first character following the .B [ @@ -3158,13 +3886,28 @@ is a 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 +The sorting order of characters in range expressions, +and the characters included in the range, +are determined by +the current locale and the values of the .SM .B LC_COLLATE -shell variable, -if set. -A +or +.SM +.B LC_ALL +shell variables, if set. +To obtain the traditional interpretation of range expressions, where +.B [a\-d] +is equivalent to +.BR [abcd] , +set value of the +.B LC_ALL +shell variable to +.BR C , +or enable the +.B globasciiranges +shell option. +A .B \- may be matched by including it as the first or last character in the set. @@ -3195,7 +3938,7 @@ The \fBword\fP character class matches letters, digits, and the character _. .if n .sp 1 Within .B [ -and +and .BR ] , an \fIequivalence class\fP can be specified using the syntax \fB[=\fP\fIc\fP\fB=]\fP, which matches all characters with the @@ -3206,15 +3949,16 @@ the character \fIc\fP. .if n .sp 1 Within .B [ -and +and .BR ] , the syntax \fB[.\fP\fIsymbol\fP\fB.]\fP matches the collating symbol \fIsymbol\fP. .RE +.RE .PD .PP If the \fBextglob\fP shell option is enabled using the \fBshopt\fP -builtin, several extended pattern matching operators are recognized. +builtin, the shell recognizes several extended pattern matching operators. 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 @@ -3239,8 +3983,29 @@ Matches one of the given patterns Matches anything except one of the given patterns .RE .PD -.SS Quote Removal .PP +The\fBextglob\fP option changes the behavior of the parser, since the +parentheses are normally treated as operators with syntactic meaning. +To ensure that extended matching patterns are parsed correctly, make sure +that \fBextglob\fP is enabled before parsing constructs containing the +patterns, including shell functions and command substitutions. +.PP +When matching filenames, the \fBdotglob\fP shell option determines +the set of filenames that are tested: +when \fBdotglob\fP is enabled, the set of filenames includes all files +beginning with ``.'', but ``.'' and ``..'' must be matched by a +pattern or sub-pattern that begins with a dot; +when it is disabled, the set does not +include any filenames beginning with ``.'' unless the pattern +or sub-pattern begins with a ``.''. +As above, ``.'' only has a special meaning when matching filenames. +.PP +Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. +.SS Quote Removal After the preceding expansions, all unquoted occurrences of the characters .BR \e , @@ -3252,8 +4017,13 @@ 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 +\fIRedirection\fP allows commands' file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in the +current shell execution environment. +The following redirection operators may precede or appear anywhere within a .I simple command or may follow a @@ -3265,9 +4035,14 @@ 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 +than or equal to 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. +If {\fIvarname\fP} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. +The \fBvarredir_close\fP shell option manages this behavior. .PP In the following descriptions, if the file descriptor number is omitted, and the first character of the redirection operator is @@ -3279,21 +4054,22 @@ 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. +descriptions, unless otherwise noted, is subjected to +brace expansion, tilde expansion, parameter and variable 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, +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 +directs both standard output and standard error to the file .IR dirlist , while the command .RS @@ -3308,7 +4084,10 @@ 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: +redirections, as described in the following table. +If the operating system on which \fBbash\fP is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below. .RS .PP .PD 0 @@ -3328,12 +4107,12 @@ File descriptor 2 is duplicated. .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. +the corresponding TCP 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. +the corresponding UDP socket. .PD .RE .PP @@ -3343,7 +4122,6 @@ 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 @@ -3359,7 +4137,6 @@ The general format for redirecting input is: [\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 @@ -3396,7 +4173,6 @@ option to the 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 @@ -3412,9 +4188,7 @@ The general format for appending output is: .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) @@ -3440,8 +4214,11 @@ This is semantically equivalent to \fB>\fP\fIword\fP 2\fB>&\fP1 .RE .PP +When using the second form, \fIword\fP may not expand to a number or +\fB\-\fP. If it does, other redirection operators apply +(see \fBDuplicating File Descriptors\fP below) for compatibility +reasons. .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) @@ -3460,40 +4237,41 @@ This is semantically equivalent to .PP \fB>>\fP\fIword\fP 2\fB>&\fP1 .RE -.SS Here Documents .PP +(see \fBDuplicating File Descriptors\fP below). +.SS Here Documents 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. +input (or file descriptor \fIn\fP if \fIn\fP is specified) for a command. .PP The format of here-documents is: .RS .PP .nf -\fB<<\fP[\fB\-\fP]\fIword\fP +[\fIn\fP]\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 +No parameter and variable expansion, command substitution, +arithmetic expansion, or pathname expansion is performed on .IR word . -If any characters in +If any part of .I word -are quoted, the +is 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 +all lines of the here-document are subjected to +parameter expansion, command substitution, and arithmetic expansion, +the character sequence .B \e is ignored, and .B \e @@ -3516,14 +4294,18 @@ A variant of here documents, the format is: .RS .PP .nf -\fB<<<\fP\fIword\fP +[\fIn\fP]\fB<<<\fP\fIword\fP .fi .RE .PP -The \fIword\fP is expanded and supplied to the command on its standard -input. +The \fIword\fP undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Pathname expansion and word splitting are not performed. +The result is supplied as a single string, with a newline appended, +to the command on its +standard input (or file descriptor \fIn\fP if \fIn\fP is specified). .SS "Duplicating File Descriptors" -.PP The redirection operator .RS .PP @@ -3561,11 +4343,17 @@ 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. +If +.I word +evaluates to +.BR \- , +file descriptor +.I n +is closed. 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 +expand to one or more digits or \fB\-\fP, the standard output and standard error are redirected as described previously. .SS "Moving File Descriptors" -.PP The redirection operator .RS .PP @@ -3587,7 +4375,6 @@ 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 @@ -3642,7 +4429,7 @@ command, and removed with the command. .PP There is no mechanism for using arguments in the replacement text. -If arguments are needed, a shell function should be used (see +If arguments are needed, use a shell function (see .SM .B FUNCTIONS below). @@ -3662,9 +4449,10 @@ below). 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 +always reads at least one complete line of input, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +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. @@ -3673,7 +4461,7 @@ 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 +is itself a 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 @@ -3697,7 +4485,7 @@ function become the positional parameters during its execution. The special parameter .B # -is updated to reflect the change. Special parameter 0 +is updated to reflect the change. Special parameter \fB0\fP is unchanged. The first element of the .SM @@ -3707,7 +4495,7 @@ is executing. .PP All other aspects of the shell execution environment are identical between a function and its caller -with these exceptions: the +with these exceptions: the .SM .B DEBUG and @@ -3733,8 +4521,64 @@ been enabled. .PP Variables local to the function may be declared with the .B local -builtin command. Ordinarily, variables and their values +builtin command (\fIlocal variables\fP). +Ordinarily, variables and their values are shared between the function and its caller. +If a variable is declared \fBlocal\fP, the variable's visible scope +is restricted to that function and its children (including the functions +it calls). +.PP +In the following description, the \fIcurrent scope\fP is a currently- +executing function. +Previous scopes consist of that function's caller and so on, +back to the "global" scope, where the shell is not executing +any shell function. +Consequently, a local variable at the current scope is a variable +declared using the \fBlocal\fP or \fBdeclare\fP builtins in the +function that is currently executing. +.PP +Local variables "shadow" variables with the same name declared at +previous scopes. +For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. +.PP +The shell uses \fIdynamic scoping\fP to control a variable's visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. +.PP +For example, if a variable \fIvar\fP is declared as local in function +\fIfunc1\fP, and \fIfunc1\fP calls another function \fIfunc2\fP, +references to \fIvar\fP made from within \fIfunc2\fP will resolve to the +local variable \fIvar\fP from \fIfunc1\fP, shadowing any global variable +named \fIvar\fP. +.PP +The \fBunset\fP builtin also acts using the same dynamic scope: if a +variable is local to the current scope, \fBunset\fP will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +(appearing as unset) +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible +(see below how the \fBlocalvar_unset\fP shell option changes this behavior). +.PP +The \fBFUNCNEST\fP variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort. .PP If the builtin command .B return @@ -3764,27 +4608,26 @@ or 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 +Functions may be exported so that child shell processes +(those created when executing a separate shell invocation) automatically have them defined with the .B \-f -option to the +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. +Functions may be recursive. +The \fBFUNCNEST\fP variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, 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). +commands, the \fB((\fP compound command, 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 @@ -3798,12 +4641,12 @@ The levels are listed in order of decreasing precedence. .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 ++\fIid\fP \-\-\fIid\fP +variable pre-increment and pre-decrement +.TP .B ! ~ logical and bitwise negation .TP @@ -3858,18 +4701,22 @@ 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. +\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 +A shell variable need not have its \fIinteger\fP attribute turned on to be used in an expression. .PP +Integer constants follow the C language definition, without suffixes or +character constants. 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 +Otherwise, numbers take the form [\fIbase#\fP]n, where the optional \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, +When specifying \fIn\fP, +if a non-digit is required, +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 @@ -3882,7 +4729,16 @@ rules above. 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. +The \fBtest\fP and \fB[\fP commands determine their behavior based on +the number of arguments; see the descriptions of those commands for any +other command-specific actions. +.PP Expressions are formed from the following unary or binary primaries. +\fBBash\fP handles several filenames specially when they are used in +expressions. +If the operating system on which \fBbash\fP is running provides these +special files, bash will use them; otherwise it will emulate them +internally with this behavior: 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 @@ -3893,8 +4749,9 @@ 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 +When used with \fB[[\fP, the \fB<\fP and \fB>\fP operators sort lexicographically using the current locale. +The \fBtest\fP command sorts using ASCII ordering. .sp 1 .PD 0 .TP @@ -3948,20 +4805,24 @@ True if \fIfile\fP exists and is writable. .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 \-N \fIfile\fP +True if \fIfile\fP exists and has been modified since it was last read. +.TP +.B \-O \fIfile\fP +True if \fIfile\fP exists and is owned by the effective user id. +.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. +\fIfile1\fP \fB\-ef\fP \fIfile2\fP +True if \fIfile1\fP and \fIfile2\fP refer to the same device and +inode numbers. .TP \fIfile1\fP \-\fBnt\fP \fIfile2\fP True if \fIfile1\fP is newer (according to modification date) than \fIfile2\fP, @@ -3971,12 +4832,8 @@ or if \fIfile1\fP exists and \fPfile2\fP does not. 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 +True if the shell option .I optname is enabled. See the list of options under the description of the @@ -3985,6 +4842,16 @@ option to the .B set builtin below. .TP +.B \-v \fIvarname\fP +True if the shell variable +.I varname +is set (has been assigned a value). +.TP +.B \-R \fIvarname\fP +True if the shell variable +.I varname +is set and is a name reference. +.TP .B \-z \fIstring\fP True if the length of \fIstring\fP is zero. .TP @@ -4004,6 +4871,8 @@ is non-zero. .PD True if the strings are equal. \fB=\fP should be used with the \fBtest\fP command for POSIX conformance. +When used with the \fB[[\fP command, this performs pattern matching as +described above (\fBCompound Commands\fP). .TP \fIstring1\fP \fB!=\fP \fIstring2\fP True if the strings are not equal. @@ -4032,10 +4901,19 @@ greater than, or greater than or equal to \fIarg2\fP, respectively. and .I arg2 may be positive or negative integers. +When used with the \fB[[\fP command, +.I Arg1 +and +.I Arg2 +are evaluated as arithmetic expressions (see +.SM +.B "ARITHMETIC EVALUATION" +above). .PD .SH "SIMPLE COMMAND EXPANSION" When a simple command is executed, the shell performs the following -expansions, assignments, and redirections, from left to right. +expansions, assignments, and redirections, from left to right, in +the following order. .IP 1. The words that the parser has marked as variable assignments (those preceding the command name) and redirections are saved for later @@ -4055,7 +4933,11 @@ 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 +shell environment. +In the case of such a command (one that consists only of assignment +statements and redirections), assignment statements are performed before +redirections. +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. @@ -4104,9 +4986,10 @@ A full search of the directories in 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 +If that function exists, it is invoked in a separate execution environment +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. +exit status becomes the exit status of that subshell. If that function is not defined, the shell prints an error message and returns an exit status of 127. .PP @@ -4119,8 +5002,10 @@ 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 \fIshell script\fP, a file -containing shell commands. A subshell is spawned to execute -it. This subshell reinitializes itself, so +containing shell commands, and the shell creates a +new instance of itself +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 @@ -4135,7 +5020,7 @@ 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 executable format themselves. The arguments to the +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 @@ -4143,7 +5028,6 @@ 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 @@ -4177,8 +5061,8 @@ of \fB$$\fP, and the value of 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 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 @@ -4195,7 +5079,9 @@ 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. +shell's execution environment. +.PP +A \fIsubshell\fP is a copy of the shell process. .PP Command substitution, commands grouped with parentheses, and asynchronous commands are invoked in a @@ -4207,8 +5093,8 @@ 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. +the \fB\-e\fP option from the parent shell. When not in \fIposix mode\fP, +\fBbash\fP 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. @@ -4218,7 +5104,7 @@ shell as modified by redirections. When a program is invoked it is given an array of strings called the .IR environment . -This is a list of +This is a list of \fIname\fP\-\fIvalue\fP pairs, of the form .IR "name\fR=\fPvalue" . .PP @@ -4255,7 +5141,7 @@ parameter assignments, as described above in These assignment statements affect only the environment seen by that command. .PP -If the +If the .B \-k option is set (see the .B set @@ -4268,19 +5154,18 @@ When .B bash invokes an external command, the variable .B _ -is set to the full file name of the command and passed to that +is set to the full filename 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 +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 +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 @@ -4295,8 +5180,12 @@ 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. +while they execute. +All builtins return an exit status of 2 to indicate incorrect usage, +generally invalid options or missing arguments. +.PP +The exit status of the last command is available in the special +parameter $?. .PP \fBBash\fP itself returns the exit status of the last command executed, unless a syntax error occurs, in which case it exits @@ -4360,12 +5249,12 @@ to ensure that they receive the .BR SIGHUP . To prevent the shell from sending the signal to a particular job, it should be removed from the -jobs table with the +jobs table with the .B disown builtin (see .SM .B "SHELL BUILTIN COMMANDS" -below) or marked +below) or marked to not receive .SM .B SIGHUP @@ -4377,18 +5266,75 @@ If the shell option has been set with .BR shopt , .B bash -sends a +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. +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. +.PP +When job control is not enabled, and \fBbash\fP is waiting for a foreground +command to complete, the shell receives keyboard-generated signals +such as +.SM +.B SIGINT +(usually generated by \fB^C\fP) that users commonly intend to send +to that command. +This happens because the shell and the command are in the +same process group as the terminal, and \fB^C\fP sends +.SM +.B SIGINT +to all processes in that process group. +.PP +When \fBbash\fP is running without job control enabled and receives +.SM +.B SIGINT +while waiting for a foreground command, it waits until that foreground +command terminates and then decides what to do about the +.SM +.BR SIGINT : +.IP 1. +If the command terminates due to the +.SM +.BR SIGINT , +\fBbash\fP concludes +that the user meant to end the entire script, and acts on the +.SM +.B SIGINT +(e.g., by running a +.SM +.B SIGINT +trap or exiting itself); +.IP 2. +If the command does not terminate due to +.SM +.BR SIGINT , +the program handled the +.SM +.B SIGINT +itself and did not treat it as a fatal signal. +In that case, \fBbash\fP does not treat +.SM +.B SIGINT +as a fatal signal, either, instead assuming that the +.SM +.B SIGINT +was used as part of the program's normal operation +(e.g., emacs uses it to abort editing +commands) or deliberately discarded. +However, \fBbash\fP will run any +trap set on +.SM +.BR SIGINT , +as it does with any other trapped signal it +receives while it is waiting for the foreground command to +complete, for compatibility. .SH "JOB CONTROL" .I Job control refers to the ability to selectively stop (\fIsuspend\fP) @@ -4438,10 +5384,10 @@ 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 +terminal are sent a .SM .B SIGTTIN (SIGTTOU) -signal by the kernel's terminal driver, +signal by the kernel's terminal driver, which, unless caught, suspends the process. .PP If the operating system on which @@ -4455,7 +5401,7 @@ Typing the character (typically .BR ^Z , Control-Z) while a process is running -causes that process to be stopped and returns control to +causes that process to be stopped and returns control to .BR bash . Typing the .I "delayed suspend" @@ -4488,8 +5434,9 @@ 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, +job whose command name begins with +.BR ce . +If a prefix matches more than one job, .B bash reports an error. Using .BR %?ce , @@ -4505,7 +5452,7 @@ 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 +The .I "previous job" may be referenced using .BR %\- . @@ -4536,7 +5483,7 @@ 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 +any other output. If the .B \-b option to the .B set @@ -4557,12 +5504,17 @@ 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. +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. +.PP +When the shell is waiting for a job or process using the \fBwait\fP +builtin, and job control is enabled, \fBwait\fP will return when the +job changes state. The \fB\-f\fP option causes \fBwait\fP to wait +until the job or process terminates before returning. .SH PROMPTING -When executing interactively, +When executing interactively, .B bash displays the primary prompt .SM @@ -4572,6 +5524,17 @@ when it is ready to read a command, and the secondary prompt .B PS2 when it needs more input to complete a command. .B Bash +displays +.SM +.B PS0 +after it reads a command but before executing it. +.B Bash +displays +.SM +.B PS4 +as described above +before tracing each command when the \fB\-x\fP option is enabled. +.B Bash allows these prompt strings to be customized by inserting a number of backslash-escaped special characters that are decoded as follows: .RS @@ -4636,7 +5599,8 @@ the version of \fBbash\fP (e.g., 2.00) the release of \fBbash\fP, version + patch level (e.g., 2.00.0) .TP .B \ew -the current working directory, with +the value of the \fBPWD\fP shell variable (\fB$PWD\fP), +with .SM .B $HOME abbreviated with a tilde @@ -4646,7 +5610,8 @@ abbreviated with a tilde variable) .TP .B \eW -the basename of the current working directory, with +the basename of \fB$PWD\fP, +with .SM .B $HOME abbreviated with a tilde @@ -4696,6 +5661,9 @@ command under .SM .B "SHELL BUILTIN COMMANDS" below). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion. .SH READLINE This is the library that handles reading input when using an interactive shell, unless the @@ -4703,7 +5671,7 @@ shell, unless the 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. +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 @@ -4723,13 +5691,12 @@ options to the .B set builtin. .SS "Readline Notation" -.PP -In this section, the emacs-style notation is used to denote +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, +means Control\-N. Similarly, .I meta keys are denoted by M\-\fIkey\fR, so M\-x means Meta\-X. (On keyboards -without a +without a .I meta key, M\-\fIx\fP means ESC \fIx\fP, i.e., press the Escape key then the @@ -4747,7 +5714,7 @@ 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. +backward direction. Commands whose behavior with arguments deviates from this are noted below. .PP @@ -4755,11 +5722,10 @@ 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. +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 @@ -4767,6 +5733,8 @@ The name of this file is taken from the value of the .B INPUTRC variable. If that variable is unset, the default is .IR ~/.inputrc . +If that file does not exist or cannot be read, the ultimate default is +.IR /etc/inputrc . When a program which uses the readline library starts up, the initialization file is read, and the key bindings and variables are set. @@ -4778,7 +5746,7 @@ 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 +.I inputrc file. Other programs that use this library may add their own commands and bindings. @@ -4792,7 +5760,7 @@ or .RS C\-Meta\-u: universal\-argument .RE -into the +into the .I inputrc would make M\-C\-u execute the readline command .IR universal\-argument . @@ -4813,12 +5781,11 @@ and 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: +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 @@ -4874,7 +5841,7 @@ is again bound to the function .I "C\-x C\-r" is bound to the function .BR re\-read\-init\-file , -and +and .I "ESC [ 1 1 ~" is bound to insert the text .if t \f(CWFunction Key 1\fP. @@ -4964,7 +5931,6 @@ builtin command (see .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 @@ -4973,6 +5939,10 @@ file with a statement of the form .PP \fBset\fP \fIvariable\-name\fP \fIvalue\fP .RE +or using the \fBbind\fP builtin command (see +.SM +.B SHELL BUILTIN COMMANDS +below). .PP Except where noted, readline variables can take the values .B On @@ -4987,6 +5957,30 @@ The variables and their default values are: .PP .PD 0 .TP +.B active\-region\-start\-color +A string variable that controls the text color and background when displaying +the text in the active region (see the description of +\fBenable\-active\-region\fP below). +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal before displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that puts the terminal in standout mode, +as obtained from the terminal's terminfo description. +A sample value might be \f(CW"\ee[01;33m"\fP. +.TP +.B active\-region\-end\-color +A string variable that "undoes" the effects of \fBactive\-region\-start\-color\fP +and restores "normal" terminal display appearance after displaying text +in the active region. +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal after displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that restores the terminal from standout mode, +as obtained from the terminal's terminfo description. +A sample value might be \f(CW"\ee[0m"\fP. +.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 @@ -4998,6 +5992,25 @@ 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 blink\-matching\-paren (Off) +If set to \fBOn\fP, readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. +.TP +.B colored\-completion\-prefix (Off) +If set to \fBOn\fP, when listing completions, readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the \fBLS_COLORS\fP +environment variable. +If there is a color definition in \fB$LS_COLORS\fP for the custom suffix +"readline-colored-completion-prefix", readline uses this color for +the common prefix instead of its default. +.TP +.B colored\-stats (Off) +If set to \fBOn\fP, readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the \fBLS_COLORS\fP +environment variable. +.TP .B comment\-begin (``#'') The string that is inserted when the readline .B insert\-comment @@ -5008,10 +6021,23 @@ in emacs mode and to .B # in vi command mode. .TP +.B completion\-display\-width (\-1) +The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is \-1. +.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\-map\-case (Off) +If set to \fBOn\fP, and \fBcompletion\-ignore\-case\fP is enabled, readline +treats hyphens (\fI\-\fP) and underscores (\fI_\fP) as equivalent when +performing case\-insensitive filename matching and completion. +.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 @@ -5022,36 +6048,72 @@ replaced with an ellipsis when displaying possible completions. 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. +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, +readline will ask whether or not the user wishes to view them; +otherwise they are simply listed on the terminal. +A zero value means readline should never ask; negative values are +treated as zero. .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). +The default is \fIOn\fP, but readline will set it to \fIOff\fP if the +locale contains eight-bit characters. +This variable is dependent on the \fBLC_CTYPE\fP locale category, and +may change if the locale is changed. .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 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 editing\-mode (emacs) Controls whether readline begins with a set of key bindings similar -to \fIemacs\fP or \fIvi\fP. +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. +.B emacs\-mode\-string (@) +If the \fIshow\-mode\-in\-prompt\fP variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \e1 and \e2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +.TP +.B enable\-active\-region (On) +The \fIpoint\fP is the current cursor position, and \fImark\fP refers +to a saved cursor position. +The text between the point and mark is referred to as the \fIregion\fP. +When this variable is set to \fIOn\fP, readline allows certain commands +to designate the region as \fIactive\fP. +When the region is active, readline highlights the text in the region using +the value of the \fBactive\-region\-start\-color\fP, which defaults to the +string that enables +the terminal's standout mode. +The active region shows the text inserted by bracketed-paste and any +matching text found by incremental and non-incremental history searches. +.TP +.B enable\-bracketed\-paste (On) +When set to \fBOn\fP, readline configures the terminal to insert each +paste into the editing buffer as a single string of characters, instead +of treating each character as if it had been read from the keyboard. +This prevents readline from executing any editing commands bound to key +sequences appearing in the pasted text. .TP .B enable\-keypad (Off) When set to \fBOn\fP, readline will try to enable the application @@ -5064,29 +6126,41 @@ 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 +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 +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. +.B history\-size (unset) +Set the maximum number of history entries saved in the history list. +If set to zero, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is set to the value of the +\fBHISTSIZE\fP shell variable. +If an attempt is made to set \fIhistory\-size\fP to a non-numeric value, +the maximum number of history entries will be set to 500. .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. +This setting is automatically enabled for terminals of height 1. .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), +it will not strip the eighth 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. +The default is \fIOff\fP, but readline will set it to \fIOn\fP if the +locale contains eight-bit characters. +This variable is dependent on the \fBLC_CTYPE\fP locale category, and +may change if the locale is changed. .TP .B isearch\-terminators (``C\-[C\-J'') The string of characters that should terminate an incremental @@ -5106,6 +6180,19 @@ the value of .B editing\-mode also affects the default keymap. .TP +.B keyseq\-timeout (500) +Specifies the duration \fIreadline\fP will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, \fIreadline\fP will use the shorter +but complete key sequence. +The value is specified in milliseconds, so a value of 1000 means that +\fIreadline\fP will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, \fIreadline\fP will wait until another key is pressed to +decide which key sequence to complete. +.TP .B mark\-directories (On) If set to \fBOn\fP, completed directory names have a slash appended. @@ -5121,14 +6208,24 @@ have a slash appended (subject to the value of .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 +names begin with a `.' (hidden files) when performing filename +completion. +If set to \fBOff\fP, the leading `.' must be supplied by the user in the filename to be completed. .TP +.B menu\-complete\-display\-prefix (Off) +If set to \fBOn\fP, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list. +.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. +The default is \fIOff\fP, but readline will set it to \fIOn\fP if the +locale contains eight-bit characters. +This variable is dependent on the \fBLC_CTYPE\fP locale category, and +may change if the locale is changed. .TP .B page\-completions (On) If set to \fBOn\fP, readline uses an internal \fImore\fP-like pager @@ -5137,9 +6234,9 @@ to display a screenful of possible completions at a time. .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 +.TP .B revert\-all\-at\-newline (Off) -If set to \fBon\fP, readline will undo all changes to history lines +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. @@ -5147,7 +6244,7 @@ calls to \fBreadline\fP. .B show\-all\-if\-ambiguous (Off) This alters the default behavior of the completion functions. If set to -.BR on , +.BR On , words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell. .TP @@ -5155,12 +6252,17 @@ matches to be listed immediately instead of ringing the bell. This alters the default behavior of the completion functions in a fashion similar to \fBshow\-all\-if\-ambiguous\fP. If set to -.BR on , +.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 show\-mode\-in\-prompt (Off) +If set to \fBOn\fP, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., \fIemacs\-mode\-string\fP). +.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 @@ -5169,24 +6271,46 @@ 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 vi\-cmd\-mode\-string ((cmd)) +If the \fIshow\-mode\-in\-prompt\fP variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \e1 and \e2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +.TP +.B vi\-ins\-mode\-string ((ins)) +If the \fIshow\-mode\-in\-prompt\fP variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \e1 and \e2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +.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 +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. +readline. The text of the test, after any comparison operator, + extends to the end of the line; +unless otherwise noted, 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 @@ -5200,7 +6324,7 @@ 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 +is tested against both the full name of the terminal and the portion of the terminal name before the first \fB\-\fP. This allows .I sun to match both @@ -5208,6 +6332,26 @@ to match both and .IR sun\-cmd , for instance. +.IP \fBversion\fP +The \fBversion\fP test may be used to perform comparisons against +specific readline versions. +The \fBversion\fP expands to the current readline version. +The set of comparison operators includes +.BR = , +(and +.BR == ), +.BR != , +.BR <= , +.BR >= , +.BR < , +and +.BR > . +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., \fB7.1\fP). If the minor version is omitted, it +is assumed to be \fB0\fP. +The operator may be separated from the string \fBversion\fP +and from the version number argument by whitespace. .IP \fBapplication\fP The \fBapplication\fP construct is used to include application-specific settings. Each program using the readline @@ -5215,7 +6359,7 @@ 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: +key sequence that quotes the current or previous word in \fBbash\fP: .sp 1 .RS .nf @@ -5225,6 +6369,15 @@ key sequence that quotes the current or previous word in Bash: \fB$endif\fP .fi .RE +.IP \fIvariable\fP +The \fIvariable\fP construct provides simple equality tests for readline +variables and values. +The permitted comparison operators are \fI=\fP, \fI==\fP, and \fI!=\fP. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values \fIon\fP and \fIoff\fP. .RE .IP \fB$endif\fP This command, as seen in the previous example, terminates an @@ -5243,7 +6396,6 @@ would read \fI/etc/inputrc\fP: .fi .RE .SS Searching -.PP Readline provides commands for searching through the command history (see .SM @@ -5286,7 +6438,6 @@ 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. @@ -5295,7 +6446,6 @@ 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) @@ -5326,8 +6476,28 @@ Words are delimited by non-quoted shell metacharacters. Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters. .TP +.B previous\-screen\-line +Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. +.TP +.B next\-screen\-line +Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +readline line does not take up more than one physical line or if the length +of the current readline line is not greater than the length of the prompt +plus the screen width. +.TP +.B clear\-display (M\-C\-l) +Clear the screen and, if possible, the terminal's scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen. +.TP .B clear\-screen (C\-l) -Clear the screen leaving the current line at the top of the screen. +Clear the screen, +then redraw the current line, +leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen. .TP @@ -5335,7 +6505,6 @@ screen. Refresh the current line. .PD .SS Commands for Manipulating the History -.PP .PD 0 .TP .B accept\-line (Newline, Return) @@ -5361,6 +6530,18 @@ Move to the first line in the history. Move to the end of the input history, i.e., the line currently being entered. .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. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. +.TP +.B +fetch\-history +With a numeric argument, fetch that entry from the history list +and make it the current line. +Without an argument, move back to the first entry in the history list. +.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. @@ -5387,10 +6568,23 @@ 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 +.B history\-substring\-search\-backward +Search backward through the history for the string of characters +between the start of the current line and the current cursor +position (the \fIpoint\fP). +The search string may match anywhere in a history line. +This is a non-incremental search. +.TP +.B history\-substring\-search\-forward +Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +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 @@ -5401,11 +6595,15 @@ as if the "!\fIn\fP" history expansion had been specified. .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. +the previous history entry). +With a numeric 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, +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). +The history expansion facilities are used to extract the last word, as if the "!$" history expansion had been specified. .TP .B shell\-expand\-line (M\-C\-e) @@ -5443,12 +6641,7 @@ Perform history and alias expansion on the current line. .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) +.B edit\-and\-execute\-command (C\-x C\-e) Invoke an editor on the current command line, and execute the result as shell commands. \fBBash\fP attempts to invoke @@ -5459,17 +6652,24 @@ commands. 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 +.B \fIend\-of\-file\fP (usually C\-d) +The character indicating end-of-file as set, for example, by +.if t \f(CWstty\fP. +.if n ``stty''. +If this character is read when there are no characters +on the line, and point is at the beginning of the line, readline +interprets it as the end of input and returns .SM .BR EOF . .TP +.B delete\-char (C\-d) +Delete the character at point. +If this function is bound to the +same character as the tty \fBEOF\fP character, as \fBC\-d\fP +commonly is, see above for the effects. +.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. @@ -5500,7 +6700,7 @@ Negative arguments have no effect. 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. +the last two words on the line. .TP .B upcase\-word (M\-u) Uppercase the current (or following) word. With a negative argument, @@ -5520,13 +6720,12 @@ 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 +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) @@ -5543,7 +6742,7 @@ The killed text is saved on the kill-ring. .B kill\-whole\-line Kill all characters on the current line, no matter where point is. .TP -.B kill\-word (M\-d) +.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. @@ -5552,12 +6751,12 @@ Word boundaries are the same as those used by \fBforward\-word\fP. Kill the word behind point. Word boundaries are the same as those used by \fBbackward\-word\fP. .TP -.B shell\-kill\-word (M\-d) +.B 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 those used by \fBshell\-forward\-word\fP. .TP -.B shell\-backward\-kill\-word (M\-Rubout) +.B shell\-backward\-kill\-word Kill the word behind point. Word boundaries are the same as those used by \fBshell\-backward\-word\fP. .TP @@ -5597,7 +6796,6 @@ or .BR yank\-pop . .PD .SS Numeric Arguments -.PP .PD 0 .TP .B digit\-argument (M\-0, M\-1, ..., M\-\-) @@ -5612,14 +6810,13 @@ 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 +character that is neither a digit nor 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) @@ -5653,7 +6850,7 @@ through the list. This command is intended to be bound to \fBTAB\fP, but is unbound by default. .TP -.B menu\-complete-\backward +.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. @@ -5724,7 +6921,6 @@ enclosed within braces so the list is available to the shell (see above). .PD .SS Keyboard Macros -.PP .PD 0 .TP .B start\-kbd\-macro (C\-x (\^) @@ -5737,9 +6933,12 @@ and store the definition. .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. +.TP +.B print\-last\-kbd\-macro () +Print the last keyboard macro defined in a format suitable for the +\fIinputrc\fP file. .PD .SS Miscellaneous -.PP .PD 0 .TP .B re\-read\-init\-file (C\-x C\-r) @@ -5751,9 +6950,10 @@ 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. +.B do\-lowercase\-version (M\-A, M\-B, M\-\fIx\fP, ...) +If the metafied character \fIx\fP is uppercase, run the command +that is bound to the corresponding metafied lowercase character. +The behavior is undefined if \fIx\fP is already lowercase. .TP .B prefix\-meta (ESC) Metafy the next character typed. @@ -5784,13 +6984,13 @@ 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. +character. A negative argument 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. +character. A negative argument searches for subsequent occurrences. .TP -.B skip\-csi\-sequence () +.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 @@ -5803,10 +7003,10 @@ but usually bound to ESC\-[. 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 +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 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 @@ -5815,14 +7015,19 @@ a shell comment. If a numeric argument causes the comment character to be removed, the line will be executed by the shell. .TP +.B spell\-correct\-word (C\-x s) +Perform spelling correction on the current word, treating it as a directory +or filename, in the same way as the \fBcdspell\fP shell option. +Word boundaries are the same as those used by \fBshell\-forward\-word\fP. +.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. +generate a list of matching filenames 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. +and the list of matching filenames is inserted, replacing the word. If a numeric argument is supplied, an asterisk is appended before pathname expansion. .TP @@ -5856,7 +7061,6 @@ 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 @@ -5874,8 +7078,11 @@ 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 +If those searches do not result in a compspec, any compspec defined with the \fB\-D\fP option to \fBcomplete\fP is used as the default. +If there is no default compspec, \fBbash\fP attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion. .PP Once a compspec has been found, it is used to generate the list of matching words. @@ -5917,7 +7124,7 @@ 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 +as described above under .SM .BR EXPANSION . The results are split using the rules described above under @@ -5939,17 +7146,19 @@ and .B COMP_TYPE variables are assigned values as described above under \fBShell Variables\fP. -If a shell function is being invoked, the +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. +When the function or command is invoked, +the first argument (\fB$1\fP) is the name of the command whose arguments are +being completed, +the second argument (\fB$2\fP) is the word being completed, +and the third argument (\fB$3\fP) 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. @@ -5960,7 +7169,7 @@ The function may use any of the shell facilities, including the It must put the possible completions in the .SM .B COMPREPLY -array variable. +array variable, one per array element. .PP Next, any command specified with the \fB\-C\fP option is invoked in an environment equivalent to command substitution. @@ -5977,6 +7186,10 @@ 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. +If the +.B nocasematch +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. .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 @@ -6005,20 +7218,20 @@ 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 +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. +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 +attempt to find a new 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 @@ -6034,7 +7247,7 @@ completion function would load completions dynamically: .br } .br -complete -D -F _completion_loader +complete -D -F _completion_loader -o bashdefault -o default .br \fP .SH HISTORY @@ -6078,14 +7291,16 @@ is truncated, if necessary, to contain no more than the number of lines specified by the value of .SM .BR HISTFILESIZE . +If \fBHISTFILESIZE\fP is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated. When the history file is read, lines beginning with the history comment character followed immediately -by a digit are interpreted as timestamps for the preceding history line. +by a digit are interpreted as timestamps for the following history line. These timestamps are optionally displayed depending on the value of the .SM .B HISTTIMEFORMAT variable. -When an interactive shell exits, the last +When a shell with history enabled exits, the last .SM .B $HISTSIZE lines are copied from the history list to @@ -6121,7 +7336,8 @@ to contain no more than lines. If .SM .B HISTFILESIZE -is not set, no truncation is performed. +is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated. .PP The builtin command .B fc @@ -6162,14 +7378,13 @@ builtin below under .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. +.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 +.B +H option to the .B set builtin command (see @@ -6184,7 +7399,9 @@ 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. +is read, before the shell breaks it into words, and is performed +on each line individually without taking quoting on previous lines into +account. It takes place in two parts. The first is to determine which line from the history list to use during substitution. @@ -6199,7 +7416,9 @@ 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. +the history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string. .PP Several characters inhibit history expansion if found immediately following the history expansion character, even if it is unquoted: @@ -6252,9 +7471,10 @@ 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. +Unless the reference is absolute, events are relative to the current +position in the history list. .PP .PD 0 .TP @@ -6270,39 +7490,42 @@ Refer to command line .IR n . .TP .B !\-\fIn\fR -Refer to the current command line minus +Refer to the current command 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 +Refer to the most recent command preceding the current position in the +history list starting with .IR string . .TP .B !?\fIstring\fR\fB[?]\fR -Refer to the most recent command containing +Refer to the most recent command preceding the current position in the +history list containing .IR string . The trailing \fB?\fP may be omitted if .I string is followed immediately by a newline. +If \fIstring\fP is missing, the string from the most recent search is used; +it is an error if there is no previous search string. .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 +Quick substitution. Repeat the previous command, replacing .I string1 with .IR string2 . Equivalent to -``!!:s/\fIstring1\fP/\fIstring2\fP/'' +``!!:s\d\s+2^\s-2\u\fIstring1\fP\d\s+2^\s-2\u\fIstring2\fP\d\s+2^\s-2\u'' (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 +A .B : separates the event specification from the word designator. It may be omitted if the word designator begins with a @@ -6329,10 +7552,12 @@ The \fIn\fRth word. The first argument. That is, word 1. .TP .B $ -The last argument. +The last word. This is usually the last argument, but will expand to the +zeroth word if there is only one word in the line. .TP .B % -The word matched by the most recent `?\fIstring\fR?' search. +The first word matched by the most recent `?\fIstring\fR?' search, +if the search string begins with a character that is part of a word. .TP .I x\fB\-\fPy A range of words; `\-\fIy\fR' abbreviates `0\-\fIy\fR'. @@ -6349,23 +7574,23 @@ Abbreviates \fIx\-$\fP. .TP .B x\- Abbreviates \fIx\-$\fP like \fBx*\fP, but omits the last word. +If \fBx\fP is missing, it defaults to 0. .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 `:'. +These modify, or edit, the word or words selected from the history event. .PP .PD 0 -.PP .TP .B h -Remove a trailing file name component, leaving only the head. +Remove a trailing filename component, leaving only the head. .TP .B t -Remove all leading file name components, leaving the tail. +Remove all leading filename components, leaving the tail. .TP .B r Remove a trailing suffix of the form \fI.xxx\fP, leaving the @@ -6386,15 +7611,19 @@ Quote the substituted words as with but break into words at .B blanks and newlines. +The \fBq\fP and \fBx\fP modifiers are mutually exclusive; the last one +supplied is used. .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 +in the event line. +Any character may be used as the delimiter 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 @@ -6402,7 +7631,8 @@ with a single backslash. If & appears in .IR new , it is replaced by .IR old . -A single backslash will quote the &. If +A single backslash will quote the &. +If .I old is null, it is set to the last .I old @@ -6412,6 +7642,11 @@ the last in a .B !?\fIstring\fR\fB[?]\fR search. +If +.I new +is null, each matching +.I old +is deleted. .TP .B & Repeat the previous substitution. @@ -6426,7 +7661,8 @@ 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. +Apply the following `\fBs\fP' or `\fB&\fP' modifier once to each word +in the event line. .PD .SH "SHELL BUILTIN COMMANDS" .\" start of bash_builtins @@ -6438,9 +7674,10 @@ section as accepting options preceded by accepts .B \-\- to signify the end of the options. -The \fB:\fP, \fBtrue\fP, \fBfalse\fP, and \fBtest\fP builtins +The \fB:\fP, \fBtrue\fP, \fBfalse\fP, and \fBtest\fP/\fB[\fP builtins do not accept options and do not treat \fB\-\-\fP specially. -The \fBexit\fP, \fBlogout\fP, \fBbreak\fP, \fBcontinue\fP, \fBlet\fP, +The \fBexit\fP, \fBlogout\fP, \fBreturn\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 @@ -6454,7 +7691,8 @@ require \fB\-\-\fP to prevent this interpretation. No effect; the command does nothing beyond expanding .I arguments and performing any specified -redirections. A zero exit code is returned. +redirections. +The return status is zero. .TP \fB .\| \fP \fIfilename\fP [\fIarguments\fP] .PD 0 @@ -6469,17 +7707,18 @@ executed from .IR filename . If .I filename -does not contain a slash, file names in +does not contain a slash, filenames in .SM .B PATH are used to find the directory containing -.IR filename . +.IR filename , +but \fIfilename\fP does not need to be executable. 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 +When \fBbash\fP is not in \fIposix mode\fP, it searches +the current directory if no file is found in .SM .BR PATH . If the @@ -6493,6 +7732,12 @@ 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. +If the \fB\-T\fP option is enabled, \fB.\fP inherits any trap on +\fBDEBUG\fP; if it is not, any \fBDEBUG\fP trap string is saved and +restored around the call to \fB.\fP, and \fB.\fP unsets the +\fBDEBUG\fP trap while it executes. +If \fB\-T\fP is not set, and the sourced file changes +the \fBDEBUG\fP trap, the new value is retained when \fB.\fP completes. 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 @@ -6505,7 +7750,7 @@ 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 +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. @@ -6525,7 +7770,7 @@ 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] +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSVX\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] @@ -6536,7 +7781,9 @@ or was started without job control. .TP \fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIfunction\-name\fP .TP -\fBbind\fP \fIreadline\-command\fP +\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIreadline\-command\fP +.TP +\fBbind\fP \fIreadline-command-line\fP .PD Display current .B readline @@ -6545,7 +7792,9 @@ key and function bindings, bind a key sequence to a function or macro, or set a .B readline variable. -Each non-option argument is a command as it would appear in +Each non-option argument is a command as it would appear in a +.B readline +initialization file such as .IR .inputrc , but each binding or command must be passed as a separate argument; e.g., '"\eC\-x\eC\-r": re\-read\-init\-file'. @@ -6563,7 +7812,8 @@ 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 +\fIvi\fP is equivalent to \fIvi\-command\fP (\fIvi\-move\fP is also +a synonym); \fIemacs\fP is equivalent to \fIemacs\-standard\fP. .TP .B \-l @@ -6612,14 +7862,29 @@ When \fIshell\-command\fP is executed, the shell sets the 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 +and .SM -.B READLINE_LINE -or +.B READLINE_MARK +variables to the current location of the insertion point and the saved +insertion point (the mark), respectively. +The shell assigns any numeric argument the user supplied to the +.SM +.B READLINE_ARGUMENT +variable. +If there was no argument, that variable is not set. +If the executed command changes the value of any of +.SM +.BR READLINE_LINE , .SM .BR READLINE_POINT , +or +.SM +.BR READLINE_MARK , those new values will be reflected in the editing state. +.TP +.B \-X +List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input. .PD .PP The return value is 0 unless an unrecognized option is given or an @@ -6655,10 +7920,10 @@ 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. +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 +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 @@ -6667,18 +7932,21 @@ 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 +\fBcd\fP [\fB\-L\fP|[\fB\-P\fP [\fB\-e\fP]] [\-@]] [\fIdir\fP] +Change the current directory to \fIdir\fP. +if \fIdir\fP is not supplied, the value of the .SM .B HOME -is the -default -.IR dir . +shell variable is the default. The variable .SM .B CDPATH defines the search path for the directory containing -.IR dir . +.IR dir : +each directory name in +.SM +.B CDPATH +is searched for \fIdir\fP. Alternative directory names in .SM .B CDPATH @@ -6691,20 +7959,36 @@ begins with a slash (/), then .SM .B CDPATH -is not used. The +is not used. The .B \-P -option says to use the physical directory structure instead of -following symbolic links (see also the +option causes \fBcd\fP to use the physical directory structure +by resolving symbolic links while traversing \fIdir\fP and +before processing instances of \fI..\fP in \fIdir\fP (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 +option forces symbolic links to be followed by resolving the link +after processing instances of \fI..\fP in \fIdir\fP. +If \fI..\fP appears in \fIdir\fP, it is processed by removing the +immediately previous pathname component from \fIdir\fP, back to a slash +or the beginning of \fIdir\fP. +If the +.B \-e +option is supplied with +.BR \-P , +and the current working directory cannot be successfully determined +after a successful directory change, \fBcd\fP will return an unsuccessful +status. +On systems that support it, the \fB\-@\fP option presents the extended +attributes associated with a file as a directory. +An argument of .B \- -is equivalent to +is converted to .SM -.BR $OLDPWD . +.B $OLDPWD +before the directory change is attempted. If a non-empty directory name from .SM .B CDPATH @@ -6712,6 +7996,10 @@ 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. +If the directory change is successful, \fBcd\fP sets the value of the +\fBPWD\fP environment variable to the new directory name, and sets the +\fBOLDPWD\fP environment variable to the value of the current working +directory before the change. The return value is true if the directory was successfully changed; false otherwise. .TP @@ -6720,8 +8008,8 @@ Run .I command with .I args -suppressing the normal shell function lookup. Only builtin -commands or commands found in the +suppressing the normal shell function lookup. +Only builtin commands or commands found in the .SM .B PATH are executed. If the @@ -6740,7 +8028,7 @@ option is supplied, a description of .I command is printed. The .B \-v -option causes a single word indicating the command or file name +option causes a single word indicating the command or filename used to invoke .I command to be displayed; the @@ -6779,12 +8067,12 @@ will be displayed. 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] +\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DEI\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] .br -[\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP] +[\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] [\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 ...] +\fBcomplete\fP \fB\-pr\fP [\fB\-DEI\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, @@ -6793,15 +8081,26 @@ 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 +The \fB\-D\fP option indicates that other supplied 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 +The \fB\-E\fP option indicates that other supplied options and actions should apply to ``empty'' command completion; that is, completion attempted on a blank line. +The \fB\-I\fP option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after +a command delimiter such as \fB;\fP or \fB|\fP, which is usually command +name completion. +If multiple options are supplied, the \fB\-D\fP option takes precedence +over \fB\-E\fP, and both take precedence over \fB\-I\fP. +If any of \fB\-D\fP, \fB\-E\fP, or \fB\-I\fP are supplied, any other +\fIname\fP arguments are ignored; these completions only apply to the case +specified by the option. .sp 1 The process of applying these completion specifications when word completion -is attempted is described above under \fBProgrammable Completion\fP. +is attempted is described +.ie \n(zZ=1 in \fIbash(1)\fP. +.el 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 @@ -6835,12 +8134,19 @@ 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 noquote +Tell readline not to quote the completed words if they are filenames +(quoting filenames is the default). +.TP 8 +.B nosort +Tell readline not to sort the list of possible completions alphabetically. +.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, +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 @@ -6926,38 +8232,29 @@ User names. May also be specified as \fB\-u\fP. 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. +Arguments are passed as with the \fB\-F\fP option. .TP 8 \fB\-F\fP \fIfunction\fP The shell function \fIfunction\fP is executed in the current shell environment. +When the function is executed, +the first argument (\fB$1\fP) is the name of the command whose arguments are +being completed, +the second argument (\fB$2\fP) is the word being completed, +and the third argument (\fB$3\fP) is the word preceding the word being +completed on the current command line. 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. +\fB\-G\fP \fIglobpat\fP +The pathname expansion pattern \fIglobpat\fP is expanded to generate +the possible completions. .TP 8 \fB\-P\fP \fIprefix\fP \fIprefix\fP is added at the beginning of each possible completion @@ -6966,6 +8263,28 @@ after all other options have been applied. \fB\-S\fP \fIsuffix\fP \fIsuffix\fP is appended to each possible completion after all other options have been applied. +.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. +Shell quoting is honored within \fIwordlist\fP, +in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of +.SM +.BR IFS . +The possible completions are the members of the resultant list which +match the word being completed. +.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. .PD .PP The return value is true unless an invalid option is supplied, an option @@ -6975,21 +8294,25 @@ 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] +\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DEI\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. +currently-executing 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 +The \fB\-D\fP option indicates that other supplied 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 +The \fB\-E\fP option indicates that other supplied options should apply to ``empty'' command completion; that is, completion attempted on a blank line. -.PP +The \fB\-I\fP option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, +or after a command delimiter such as \fB;\fP or \fB|\fP, which is usually +command name completion. +.sp 1 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. @@ -7012,10 +8335,10 @@ 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] ...] +\fBdeclare\fP [\fB\-aAfFgiIlnrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] .PD 0 .TP -\fBtypeset\fP [\fB\-aAfFilrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] +\fBtypeset\fP [\fB\-aAfFgiIlnrtux\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. @@ -7025,7 +8348,8 @@ option will display the attributes and values of each .IR name . When .B \-p -is used with \fIname\fP arguments, additional options are ignored. +is used with \fIname\fP arguments, additional options, +other than \fB\-f\fP and \fB\-F\fP, are ignored. When .B \-p is supplied without \fIname\fP arguments, it will display the attributes @@ -7039,11 +8363,23 @@ The 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 +the source file name and line number where each \fIname\fP +is defined are displayed as well. The .B \-F option implies .BR \-f . +The +.B \-g +option forces variables to be created or modified at the global scope, +even when \fBdeclare\fP is executed in a shell function. +It is ignored in all other cases. +The +.B \-I +option causes local variables to inherit the attributes +(except the \fInameref\fP attribute) +and value of any existing variable with the same +\fIname\fP at a surrounding scope. +If there is no existing variable, the local variable is initially unset. The following options can be used to restrict output to variables with the specified attribute or to give variables attributes: @@ -7053,12 +8389,14 @@ to give variables attributes: .B \-a Each \fIname\fP is an indexed array variable (see .B Arrays -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). .TP .B \-A Each \fIname\fP is an associative array variable (see .B Arrays -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). .TP .B \-f Use function names only. @@ -7067,13 +8405,25 @@ Use function names only. The variable is treated as an integer; arithmetic evaluation (see .SM .B "ARITHMETIC EVALUATION" -above) is performed when the variable is assigned a value. +.ie \n(zZ=1 in \fIbash(1)\fP) +.el 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 \-n +Give each \fIname\fP the \fInameref\fP attribute, making +it a name reference to another variable. +That other variable is defined by the value of \fIname\fP. +All references, assignments, and attribute modifications +to \fIname\fP, except those using or changing the +\fB\-n\fP attribute itself, are performed on the variable referenced by +\fIname\fP's value. +The nameref attribute cannot be applied to array variables. +.TP .B \-r Make \fIname\fPs readonly. These names cannot then be assigned values by subsequent assignment statements or unset. @@ -7095,16 +8445,23 @@ Mark \fIname\fPs for export to subsequent commands via the environment. .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 +with the exceptions that \fB+a\fP and \fB+A\fP +may not be used to destroy array variables and \fB+r\fP will not remove the readonly attribute. When used in a function, -makes each -\fIname\fP local, as with the +.B declare +and +.B typeset +make each +\fIname\fP local, as with the .B local -command. +command, +unless the \fB\-g\fP option is supplied. If a variable name is followed by =\fIvalue\fP, the value of the variable is set to \fIvalue\fP. +When using \fB\-a\fP or \fB\-A\fP and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. 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'', @@ -7113,42 +8470,33 @@ 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, +.ie \n(zZ=1 in \fIbash(1)\fP), +.el 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] +.B dirs [\fB\-clpv\fP] [+\fIn\fP] [\-\fIn\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 +Directories are added to the list with the .B pushd command; the .B popd command removes entries from the list. +The current directory is always the first directory in the stack. .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. +Produces a listing using full pathnames; +the default listing format uses a tilde to denote the home directory. .TP .B \-p Print the directory stack with one entry per line. @@ -7156,6 +8504,18 @@ Print the directory stack with one entry per line. .B \-v Print the directory stack with one entry per line, prefixing each entry with its index in the stack. +.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. .PD .PP The return value is 0 unless an @@ -7163,14 +8523,14 @@ 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 +\fBdisown\fP [\fB\-ar\fP] [\fB\-h\fP] [\fIjobspec\fP ... | \fIpid\fP ... ] +Without options, remove each .I jobspec -is removed from the table of active jobs. +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. +is not present, and neither the \fB\-a\fP nor the \fB\-r\fP option +is supplied, 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 @@ -7181,13 +8541,6 @@ is not sent to the job if the shell receives a .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 @@ -7201,7 +8554,7 @@ 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. +The return status is 0 unless a write error occurs. 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 @@ -7228,6 +8581,8 @@ backspace suppress further output .TP .B \ee +.TP +.B \eE an escape character .TP .B \ef @@ -7255,6 +8610,14 @@ the eight-bit character whose value is the octal value \fInnn\fP .B \ex\fIHH\fP the eight-bit character whose value is the hexadecimal value \fIHH\fP (one or two hex digits) +.TP +.B \eu\fIHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHH\fP (one to four hex digits) +.TP +.B \eU\fIHHHHHHHH\fP +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +\fIHHHHHHHH\fP (one to eight hex digits) .PD .RE .TP @@ -7279,7 +8642,11 @@ option means to load the new builtin command .I name from shared object .IR filename , -on systems that support dynamic loading. The +on systems that support dynamic loading. +Bash will use the value of the \fBBASH_LOADABLES_PATH\fP variable as a +colon-separated list of directories in which to search for \fIfilename\fP. +The default is system-dependent. +The .B \-d option will delete a builtin previously loaded with .BR \-f . @@ -7293,6 +8660,11 @@ 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. +If no options are supplied and a \fIname\fP is not a shell builtin, +\fBenable\fP will attempt to load \fIname\fP from a shared object named +\fIname\fP, as if the command were +.if t \f(CWenable \-f\fP \fIname name\fP . +.if n ``enable -f \fIname name\fP . The return value is 0 unless a .I name is not a shell builtin or there is an error loading a new builtin @@ -7319,7 +8691,7 @@ 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 +the shell places a dash at the beginning of the zeroth argument passed to .IR command . This is what .IR login (1) @@ -7331,13 +8703,16 @@ 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 +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 +unless the .B execfail -is enabled, in which case it returns failure. +shell option +is enabled. In that case, it returns failure. An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if \fBexec\fP fails. If .I command is not specified, any redirections take effect in the current shell, @@ -7363,10 +8738,9 @@ is executed before the shell terminates. The supplied .I names are marked for automatic export to the environment of -subsequently executed commands. If the +subsequently executed commands. If the .B \-f -option is given, -the +option is given, the .I names refer to functions. If no @@ -7374,7 +8748,7 @@ If no are given, or if the .B \-p option is supplied, a list -of all names that are exported in this shell is printed. +of names of all exported variables is printed. The .B \-n option causes the export property to be removed from each @@ -7395,20 +8769,25 @@ that is not a function. .TP \fBfc\fP \fB\-s\fP [\fIpat\fP=\fIrep\fP] [\fIcmd\fP] .PD -Fix Command. In the first form, a range of commands from +The first form selects a range of commands from .I first to .I last -is selected from the history list. +from the history list and displays or edits and re-executes them. .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 +command number). +When listing, a \fIfirst\fP or \fIlast\fP of +0 is equivalent to \-1 and \-0 is equivalent to the current +command (usually the \fBfc\fP command); otherwise 0 is equivalent to \-1 +and \-0 is invalid. +If .I last -is not specified it is set to +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 @@ -7417,7 +8796,7 @@ prints the last 10 commands) and to otherwise. If .I first -is not specified it is set to the previous +is not specified, it is set to the previous command for editing and \-16 for listing. .sp 1 The @@ -7453,6 +8832,7 @@ 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. +\fICommand\fP is interpreted the same as \fIfirst\fP above. A useful alias to use with this is .if n ``r="fc -s"'', .if t \f(CWr='fc \-s'\fP, @@ -7499,7 +8879,7 @@ 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] +\fBgetopts\fP \fIoptstring\fP \fIname\fP [\fIarg ...\fP] .B getopts is used by shell procedures to parse positional parameters. .I optstring @@ -7541,12 +8921,13 @@ 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 ?. +and \fIname\fP is set to ?. .sp 1 .B getopts normally parses the positional parameters, but if more arguments are -given in -.IR args , +supplied as +.I arg +values, .B getopts parses those instead. .sp 1 @@ -7555,14 +8936,14 @@ 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 +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 +character of .I optstring is not a colon. .sp 1 @@ -7605,17 +8986,18 @@ 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 +Each time \fBhash\fP is invoked, +the full pathname of the command +.I name +is determined by searching the directories in .B $PATH -and remembered. +and remembered. Any previously-remembered pathname is discarded. 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. +is used as the full filename of the command. The .B \-r option causes the shell to forget all @@ -7658,9 +9040,10 @@ Display the description of each \fIpattern\fP in a manpage-like format .B \-s Display only a short usage synopsis for each \fIpattern\fP .PD -.RE +.PP The return status is 0 unless no command matches .IR pattern . +.RE .TP \fBhistory [\fIn\fP] .PD 0 @@ -7669,6 +9052,8 @@ The return status is 0 unless no command matches .TP \fBhistory \-d\fP \fIoffset\fP .TP +\fBhistory \-d\fP \fIstart\fP\-\fIend\fP +.TP \fBhistory\fP \fB\-anrw\fP [\fIfilename\fP] .TP \fBhistory\fP \fB\-p\fP \fIarg\fP [\fIarg ...\fP] @@ -7677,7 +9062,7 @@ The return status is 0 unless no command matches .PD With no options, display the command history list with line numbers. Lines listed -with a +with a .B * have been modified. An argument of .I n @@ -7705,10 +9090,21 @@ Clear the history list by deleting all the entries. .TP \fB\-d\fP \fIoffset\fP Delete the history entry at position \fIoffset\fP. +If \fIoffset\fP is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of \-1 refers to the current +\fBhistory -d\fP command. +.TP +\fB\-d\fP \fIstart\fP\-\fIend\fP +Delete the range of history entries between positions \fIstart\fP and +\fIend\fP, inclusive. +Positive and negative values for \fIstart\fP and \fIend\fP +are interpreted as described above. .TP .B \-a -Append the ``new'' history lines (history lines entered since the -beginning of the current \fBbash\fP session) to the history file. +Append the ``new'' history lines to the history file. +These are history lines entered since the beginning of the current +\fBbash\fP session, but not already appended to the history file. .TP .B \-n Read the history lines not already read from the history @@ -7718,10 +9114,10 @@ current \fBbash\fP session. .TP .B \-r Read the contents of the history file -and use them as the current history. +and append them to the current history list. .TP .B \-w -Write the current history to the history file, overwriting the +Write the current history list to the history file, overwriting the history file's contents. .TP .B \-p @@ -7747,10 +9143,10 @@ 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. +as timestamps for the following history entry. 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 +\fIoffset\fP or range is supplied as an argument to \fB\-d\fP, or the history expansion supplied as an argument to \fB\-p\fP fails. .RE .TP @@ -7768,19 +9164,19 @@ meanings: 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 \-p +List only the process ID of the job's process group +leader. +.TP .B \-r -Restrict output to running jobs. +Display only running jobs. .TP .B \-s -Restrict output to stopped jobs. +Display only stopped jobs. .PD .PP If @@ -7811,7 +9207,7 @@ returning its exit status. \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] +\fBkill\fP \fB\-l\fP|\fB\-L\fP [\fIsigspec\fP | \fIexit_status\fP] .PD Send the signal named by .I sigspec @@ -7848,6 +9244,9 @@ 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. +The +.B \-L +option is equivalent to \fB\-l\fP. .B kill returns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered. @@ -7858,16 +9257,17 @@ Each is an arithmetic expression to be evaluated (see .SM .B "ARITHMETIC EVALUATION" -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el 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] ...] +\fBlocal\fP [\fIoption\fP] [\fIname\fP[=\fIvalue\fP] ... | \- ] For each argument, a local variable named -.I name +.I name is created, and assigned .IR value . The \fIoption\fP can be any of the options accepted by \fBdeclare\fP. @@ -7876,6 +9276,12 @@ When is used within a function, it causes the variable .I name to have a visible scope restricted to that function and its children. +If \fIname\fP is \-, the set of shell options is made local to the function +in which \fBlocal\fP is invoked: shell options changed using the +\fBset\fP builtin inside the function are restored to their original values +when the function returns. +The restore is effected as if a series of \fBset\fP commands were executed +to restore the values that were in place before the function. With no operands, .B local writes a list of local variables to the standard output. It is @@ -7891,16 +9297,16 @@ is supplied, or .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] +\fBmapfile\fP [\fB\-d\fP \fIdelim\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] +\fBreadarray\fP [\fB\-d\fP \fIdelim\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 +or from file descriptor +.I fd +if the .B \-u option is supplied. The variable @@ -7911,6 +9317,12 @@ Options, if supplied, have the following meanings: .RS .PD 0 .TP +.B \-d +The first character of \fIdelim\fP is used to terminate each input line, +rather than newline. +If \fIdelim\fP is the empty string, \fBmapfile\fP will terminate a line +when it reads a NUL character. +.TP .B \-n Copy at most .I count @@ -7927,7 +9339,7 @@ The default index is 0. Discard the first \fIcount\fP lines read. .TP .B \-t -Remove a trailing newline from each line read. +Remove a trailing \fIdelim\fP (default newline) from each line read. .TP .B \-u Read lines from file descriptor \fIfd\fP instead of the standard input. @@ -7945,12 +9357,13 @@ Specify the number of lines read between each call to .PP If .B \-C -is specified without +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 to be assigned and the line to be assigned to that element +as additional arguments. +\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 @@ -7962,10 +9375,12 @@ argument is supplied, \fIarray\fP is invalid or unassignable, or if .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. +Removes entries from the directory stack. +The elements are numbered from 0 starting at the first directory +listed by \fBdirs\fP. +With no arguments, \fBpopd\fP +removes the top directory from the stack, and +changes to the new top directory. Arguments, if supplied, have the following meanings: .RS .PD 0 @@ -7978,7 +9393,8 @@ from the stack, so that only the stack is manipulated. Removes the \fIn\fPth entry counting from the left of the list shown by .BR dirs , -starting with zero. For example: +starting with zero, from the stack. +For example: .if n ``popd +0'' .if t \f(CWpopd +0\fP removes the first directory, @@ -7999,41 +9415,82 @@ removes the last directory, the next to last. .PD .PP +If the top element of the directory stack is modified, and +the \fI-n\fP option was not supplied, \fBpopd\fP uses the \fBcd\fP +builtin to change to the directory at the top of the stack. +If the \fBcd\fP fails, \fBpopd\fP returns a non-zero value. +.PP +Otherwise, +.B popd +returns false if an invalid option is encountered, the directory stack +is empty, or a non-existent directory stack entry is specified. +.PP If the .B popd -command is successful, a +command is successful, +bash runs .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. +to show the final contents of the directory stack, +and the return status is 0. .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 \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 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 +In addition to the standard \fIprintf\fP(1) format specifications, +\fBprintf\fP interprets the following extensions: +.RS +.PD 0 +.TP +.B %b +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 the same way as \fBecho \-e\fP. +.TP +.B %q +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 +.TP +.B %Q +like \fB%q\fP, but applies any supplied precision to the \fIargument\fP +before quoting it. +.TP +.B %(\fIdatefmt\fP)T +causes \fBprintf\fP to output the date-time string resulting from using +\fIdatefmt\fP as a format string for \fIstrftime\fP(3). +The corresponding \fIargument\fP is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: \-1 represents the current +time, and \-2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if \-1 had been given. +This is an exception to the usual \fBprintf\fP behavior. +.PD +.PP +The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original. +.PP +Arguments to non-string format specifiers are treated as C constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. +.PP 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. +appropriate, had been supplied. +The return value is zero on success, non-zero on failure. +.RE .TP \fBpushd\fP [\fB\-n\fP] [+\fIn\fP] [\-\fIn\fP] .PD 0 @@ -8042,15 +9499,16 @@ non-zero on failure. .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. +directory. +With no arguments, \fBpushd\fP exchanges the top two elements of +the directory stack. 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. +Suppresses the normal change of directory when rotating or +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 @@ -8068,32 +9526,35 @@ starting with zero) is at the top. .I dir Adds .I dir -to the directory stack at the top, making it the -new current working directory. +to the directory stack at the top .PD .PP -If the +After the stack has been modified, if the \fB\-n\fP option was not +supplied, \fBpushd\fP uses the \fBcd\fP builtin to change to the +directory at the top of the stack. +If the \fBcd\fP fails, \fBpushd\fP returns a non-zero value. +.PP +Otherwise, if no arguments are supplied, .B pushd -command is successful, a -.B dirs -is performed as well. -If the first form is used, +returns 0 unless the directory stack is empty. +When rotating the directory stack, .B pushd -returns 0 unless the cd to -.I dir -fails. With the second form, +returns 0 unless the directory stack is empty or +a non-existent directory stack element is specified. +.PP +If the .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. +command is successful, +bash runs +.B dirs +to show the final contents of the directory stack. .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 +option is supplied or the .B \-o physical option to the .B set @@ -8107,20 +9568,30 @@ 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 +\fIfd\fP supplied as an argument to the \fB\-u\fP option, +split into words as described +.ie \n(zZ=1 in \fIbash(1)\fP +.el above +under \fBWord Splitting\fP, +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 +and so on. +If there are more words than names, the remaining words and their +intervening delimiters are 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 +The characters in .SM .B IFS -are used to split the line into words. +are used to split the line into words using the same rules the shell +uses for expansion (described +.ie \n(zZ=1 in \fIbash(1)\fP +.el above +under \fBWord Splitting\fP). 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: @@ -8139,6 +9610,8 @@ Other \fIname\fP arguments are ignored. .B \-d \fIdelim\fP The first character of \fIdelim\fP is used to terminate the input line, rather than newline. +If \fIdelim\fP is the empty string, \fBread\fP will terminate a line +when it reads a NUL character. .TP .B \-e If the standard input @@ -8147,9 +9620,11 @@ is coming from a terminal, (see .SM .B READLINE -above) is used to obtain the line. +.ie \n(zZ=1 in \fIbash(1)\fP) +.el above) +is used to obtain the line. Readline uses the current (or default, if line editing was not previously -active) editing settings. +active) editing settings, but uses readline's default filename completion. .TP .B \-i \fItext\fP If @@ -8159,7 +9634,7 @@ 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 +waiting for a complete line of input, but honors a delimiter if fewer than \fInchars\fP characters are read before the delimiter. .TP .B \-N \fInchars\fP @@ -8169,6 +9644,9 @@ than waiting for a complete line of input, unless EOF is encountered or Delimiter characters encountered in the input are not treated specially and do not cause \fBread\fP to return until \fInchars\fP characters are read. +The result is not split on the characters in \fBIFS\fP; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the \fB\-r\fP option below). .TP .B \-p \fIprompt\fP Display \fIprompt\fP on standard error, without a @@ -8178,7 +9656,7 @@ is displayed only if input is coming from a terminal. .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 +In particular, a backslash-newline pair may not then be used as a line continuation. .TP .B \-s @@ -8187,14 +9665,20 @@ 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. +input (or a specified number of characters) +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. +If \fBread\fP times out, \fBread\fP saves any partial input read into +the specified variable \fIname\fP. +If \fItimeout\fP is 0, \fBread\fP returns immediately, without trying to +read any data. +The exit status is 0 if input is available on the specified file descriptor, +or the read will return EOF, +non-zero otherwise. The exit status is greater than 128 if the timeout is exceeded. .TP .B \-u \fIfd\fP @@ -8203,15 +9687,18 @@ Read input from file descriptor \fIfd\fP. .PP If no .I names -are supplied, the line read is assigned to the variable +are supplied, the line read, +without the ending delimiter but otherwise unmodified, +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. +The exit status is zero, unless end-of-file is encountered, \fBread\fP +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +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] ...] +\fBreadonly\fP [\fB\-aAf\fP] [\fB\-p\fP] [\fIname\fP[=\fIword\fP] ...] .PD The given \fInames\fP are marked readonly; the values of these @@ -8227,11 +9714,16 @@ The option restricts the variables to indexed arrays; the .B \-A option restricts the variables to associative arrays. +If both options are supplied, +.B \-A +takes precedence. If no .I name arguments are given, or if the .B \-p option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. The .B \-p option causes output to be displayed in a format that @@ -8248,30 +9740,44 @@ is supplied with a that is not a function. .TP \fBreturn\fP [\fIn\fP] -Causes a function to exit with the return value specified by -.IR n . -If +Causes a function to stop executing and return the value specified by +.I n +to its caller. +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 +executed in the function body. +If \fBreturn\fP is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If \fBreturn\fP is executed during a \fBDEBUG\fP trap, the last command +used to determine the status is the last command executed by the trap +handler before \fBreturn\fP was invoked. +If +.B return +is 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. +script as the exit status of the script. +If \fIn\fP is supplied, the return value is its least significant +8 bits. +The return status is non-zero if +.B return +is supplied a non-numeric argument, or +is used outside a +function and not during execution of a script by \fB.\fP\^ or \fBsource\fP. 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 ...] +\fBset\fP [\fB\-abefhkmnptuvxBCEHPT\fP] [\fB\-o\fP \fIoption\-name\fP] [\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...] .PD 0 .TP -\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\fP] [\fIarg\fP ...] +\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\-name\fP] [\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...] .PD -Without options, the name and value of each shell variable are displayed +Without options, display the name and value of each shell variable in a format that can be reused as input for setting or resetting the currently-set variables. Read-only variables cannot be reset. @@ -8279,7 +9785,7 @@ 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 +as values for the positional parameters and are assigned, in order, to .BR $1 , .BR $2 , .B ... @@ -8289,8 +9795,9 @@ Options, if specified, have the following meanings: .PD 0 .TP 8 .B \-a -Automatically mark variables and functions which are modified or -created for export to the environment of subsequent commands. +Each variable or function that is created or modified is given the +export attribute and marked for export to the environment of +subsequent commands. .TP 8 .B \-b Report the status of terminated background jobs @@ -8298,19 +9805,22 @@ 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 +Exit immediately if a +\fIpipeline\fP (which may consist of a single \fIsimple command\fP), +a \fIlist\fP, +or a \fIcompound command\fP +(see .SM .B SHELL GRAMMAR -above) exits with a non-zero status. +.ie \n(zZ=1 in \fIbash(1)\fP), +.el 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, +keyword, part of the test following the .B if or @@ -8318,23 +9828,39 @@ or 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, +.B || +list except the command following the final \fB&&\fP or \fB||\fP, any command in a pipeline but the last, or if the command's return value is being inverted with .BR ! . +If a compound command other than a subshell +returns a non-zero status because a command failed +while \fB\-e\fP was being ignored, the shell does not exit. 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 +.ie \n(zZ=1 in \fIbash(1)\fP), +.el above), +and may cause subshells to exit before executing all the commands in the subshell. +.if t .sp 0.5 +.if n .sp 1 +If a compound command or shell function executes in a context +where \fB\-e\fP is being ignored, +none of the commands executed within the compound command or function body +will be affected by the \fB\-e\fP setting, even if \fB\-e\fP is set +and a command returns a failure status. +If a compound command or shell function sets \fB\-e\fP while executing in +a context where \fB\-e\fP is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes. .TP 8 .B \-f Disable pathname expansion. -.TP 8 +.TP 8 .B \-h Remember the location of commands as they are looked up for execution. This is enabled by default. @@ -8350,14 +9876,16 @@ 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. +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status. .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. +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: @@ -8400,7 +9928,10 @@ Same as .BR \-H . .TP 8 .B history -Enable command history, as described above under +Enable command history, as described +.ie \n(zZ=1 in \fIbash(1)\fP +.el above +under .SM .BR HISTORY . This option is on by default in interactive shells. @@ -8412,7 +9943,8 @@ The effect is as if the shell command had been executed (see .B Shell Variables -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). .TP 8 .B keyword Same as @@ -8464,6 +9996,13 @@ Change the behavior of .B bash where the default operation differs from the POSIX standard to match the standard (\fIposix mode\fP). +See +.SM +.B "SEE ALSO" +.ie \n(zZ=1 in \fIbash(1)\fP +.el below +for a reference to a document that details how posix mode affects +bash's behavior. .TP 8 .B privileged Same as @@ -8523,12 +10062,18 @@ 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 \-r +Enable restricted shell mode. +This option cannot be unset once it has been set. +.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 +parameters "@" and "*", +or array variables subscripted with "@" or "*", +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. @@ -8548,7 +10093,9 @@ or associated word list. .B \-B The shell performs brace expansion (see .B Brace Expansion -above). This is on by default. +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). +This is on by default. .TP 8 .B \-C If set, @@ -8558,7 +10105,7 @@ does not overwrite an existing file with the .BR >& , and .B <> -redirection operators. This may be overridden when +redirection operators. This may be overridden when creating output files by using the redirection operator .B >| instead of @@ -8576,7 +10123,7 @@ 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 +If set, the shell does not resolve symbolic links when executing commands such as .B cd that change the current working directory. It uses the @@ -8630,7 +10177,7 @@ If .I n is 0, no parameters are changed. If -.I n +.I n is not given, it is assumed to be 1. If .I n @@ -8642,11 +10189,17 @@ is greater than 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. +Toggle the values of settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +.B \-o +option is used, those available with the +.B \-o +option to the \fBset\fP builtin command. 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. +an indication of whether or not each is set; +if \fIoptnames\fP are supplied, the output is restricted to those options. 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: @@ -8679,8 +10232,9 @@ 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. +is used with no \fIoptname\fP arguments, +.B shopt +shows only those options which are set or unset, respectively. Unless otherwise noted, the \fBshopt\fP options are disabled (unset) by default. .PP @@ -8694,6 +10248,12 @@ The list of \fBshopt\fP options is: .if n .sp 1v .PD 0 .TP 8 +.B assoc_expand_once +If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing. +.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. @@ -8712,7 +10272,7 @@ If set, minor errors in the spelling of a directory component in a 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, +If a correction is found, the corrected filename is printed, and the command proceeds. This option is only used by interactive shells. .TP 8 @@ -8728,17 +10288,19 @@ 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. +.ie \n(zZ=1 in \fIbash(1)\fP). +.el 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 +If set, \fBbash\fP checks the window size after each external (non-builtin) +command and, if necessary, updates the values of .SM .B LINES and .SM .BR COLUMNS . +This option is enabled by default. .TP 8 .B cmdhist If set, @@ -8746,25 +10308,66 @@ If set, attempts to save all lines of a multiple-line command in the same history entry. This allows easy re-editing of multi-line commands. +This option is enabled by default, but only has an effect if command +history is enabled, as described +.ie \n(zZ=1 in \fIbash(1)\fP +.el above +under +.SM +.BR HISTORY . +.PD 0 .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 +.TP 8 +.B compat40 +.TP 8 +.B compat41 +.TP 8 +.B compat42 +.TP 8 +.B compat43 +.TP 8 +.B compat44 +.TP 8 +.B compat50 +.PD +These control aspects of the shell's compatibility mode +(see +.SM +.B "SHELL COMPATIBILITY MODE" +.ie \n(zZ=1 in \fIbash(1)\fP). +.el below). +.TP 8 +.B complete_fullquote 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. +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, +.B bash +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default bash behavior in +versions through 4.2. .TP 8 -.B compat40 +.B direxpand 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. +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the readline editing +buffer. +If not set, +.B bash +attempts to preserve what the user typed. .TP 8 .B dirspell If set, @@ -8773,10 +10376,17 @@ attempts spelling correction on directory names during word completion if the directory name initially supplied does not exist. .TP 8 .B dotglob -If set, +If set, .B bash includes filenames beginning with a `.' in the results of pathname expansion. +The filenames +.B ``.'' +and +.B ``..'' +must always be matched explicitly, even if +.B dotglob +is set. .TP 8 .B execfail If set, a non-interactive shell will not exit if @@ -8787,13 +10397,20 @@ builtin command. An interactive shell does not exit if fails. .TP 8 .B expand_aliases -If set, aliases are expanded as described above under +If set, aliases are expanded as described +.ie \n(zZ=1 in \fIbash(1)\fP +.el 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: +If set at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the \fB\-\-debugger\fP option. +If set after invocation, behavior intended for use by debuggers is enabled: .RS .TP .B 1. @@ -8808,8 +10425,8 @@ next command is skipped and not executed. .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. +executed by the \fB.\fP or \fBsource\fP builtins), the shell simulates +a call to \fBreturn\fP. .TP .B 4. .SM @@ -8817,21 +10434,26 @@ executed by the \fB.\fP or \fBsource\fP builtins), a call to and .SM .B BASH_ARGV -are updated as described in their descriptions above. +are updated as described in their descriptions +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). .TP .B 5. -Function tracing is enabled: command substitution, shell functions, and +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 +Error tracing is enabled: command substitution, shell functions, and subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the -\fBERROR\fP trap. +\fBERR\fP trap. .RE .TP 8 .B extglob -If set, the extended pattern matching features described above under +If set, the extended pattern matching features described +.ie \n(zZ=1 in \fIbash(1)\fP +.el above +under \fBPathname Expansion\fP are enabled. .TP 8 .B extquote @@ -8853,14 +10475,41 @@ the ignored words are the only possible completions. See .SM \fBSHELL VARIABLES\fP -above for a description of +.ie \n(zZ=1 in \fIbash(1)\fP +.el above +for a description of .SM .BR FIGNORE . This option is enabled by default. .TP 8 +.B globasciiranges +If set, range expressions used in pattern matching bracket expressions (see +.SM +.B Pattern Matching +.ie \n(zZ=1 in \fIbash(1)\fP) +.el above) +behave as if in the traditional C locale when performing +comparisons. That is, the current locale's collating sequence +is not taken into account, so +.B b +will not collate between +.B A +and +.BR B , +and upper-case and lower-case ASCII characters will collate together. +.TP 8 +.B globskipdots +If set, pathname expansion will never match the filenames +.B ``.'' +and +.BR ``..'' , +even if the pattern begins with a +.BR ``.'' . +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. +match all files and zero or more directories and subdirectories. If the pattern is followed by a \fB/\fP, only directories and subdirectories match. .TP 8 @@ -8882,7 +10531,7 @@ is being used, a user is given the opportunity to re-edit a failed history substitution. .TP 8 .B histverify -If set, and +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 @@ -8897,7 +10546,8 @@ word containing a \fB@\fP is being completed (see under .SM .B READLINE -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). This is enabled by default. .TP 8 .B huponexit @@ -8906,6 +10556,11 @@ If set, \fBbash\fP will send .B SIGHUP to all jobs when an interactive login shell exits. .TP 8 +.B inherit_errexit +If set, command substitution inherits the value of the \fBerrexit\fP option, +instead of unsetting it in the subshell environment. +This option is enabled when \fIposix mode\fP is enabled. +.TP 8 .B interactive_comments If set, allow a word beginning with .B # @@ -8913,7 +10568,13 @@ 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. +.ie \n(zZ=1 in \fIbash(1)\fP). +.el above). +This option is enabled by default. +.TP 8 +.B lastpipe +If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment. .TP 8 .B lithist If set, and the @@ -8921,15 +10582,27 @@ If set, and the option is enabled, multi-line commands are saved to the history with embedded newlines rather than using semicolon separators where possible. .TP 8 +.B localvar_inherit +If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The nameref attribute is not inherited. +.TP 8 +.B localvar_unset +If set, calling \fBunset\fP on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope. +.TP 8 .B login_shell The shell sets this option if it is started as a login shell (see .SM .B "INVOCATION" -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el 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 +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 @@ -8950,13 +10623,23 @@ If set, matches filenames in a case\-insensitive fashion when performing pathname expansion (see .B Pathname Expansion -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el 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. +while executing \fBcase\fP or \fB[[\fP conditional commands, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. +.TP 8 +.B noexpand_translation +If set, +.B bash +encloses the translated results of $"..." quoting in single quotes +instead of double quotes. +If the string is not translated, this has no effect. .TP 8 .B nullglob If set, @@ -8964,27 +10647,50 @@ If set, allows patterns which match no files (see .B Pathname Expansion -above) +.ie \n(zZ=1 in \fIbash(1)\fP) +.el above) to expand to a null string, rather than themselves. .TP 8 +.B patsub_replacement +If set, \fBbash\fP +expands occurrences of \fB&\fP in the replacement string of pattern +substitution to the text matched by the pattern, as described +under \fBParameter Expansion\fP +.ie \n(zZ=1 in \fIbash(1)\fP. +.el above. +This option is enabled by default. +.TP 8 .B progcomp If set, the programmable completion facilities (see -\fBProgrammable Completion\fP above) are enabled. +\fBProgrammable Completion\fP +.ie \n(zZ=1 in \fIbash(1)\fP) +.el above) +are enabled. This option is enabled by default. .TP 8 +.B progcomp_alias +If set, and programmable completion is enabled, \fBbash\fP treats a command +name that doesn't have any completions as a possible alias and attempts +alias expansion. If it has an alias, \fBbash\fP attempts programmable +completion using the command word resulting from the expanded alias. +.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. +.ie \n(zZ=1 in \fIbash(1)\fP. +.el 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 +The shell sets this option if it is started in restricted mode +(see .SM .B "RESTRICTED SHELL" -below). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el 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. @@ -8997,37 +10703,54 @@ number of positional parameters. .TP 8 .B sourcepath If set, the -\fBsource\fP (\fB.\fP) builtin uses the value of +\fB.\fP (\fBsource\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 varredir_close +If set, the shell automatically closes file descriptors assigned using the +\fI{varname}\fP redirection syntax (see +.SM +.B REDIRECTION +.ie \n(zZ=1 in \fIbash(1)\fP) +.el above) +instead of leaving them open when the command completes. +.TP 8 .B xpg_echo If set, the \fBecho\fP builtin expands backslash-escape sequences by default. .RE +.PD .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 +signal. A login shell, +or a shell without job control enabled, +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 +The return status is 0 unless the shell is a login shell +or job control is not enabled +and .B \-f -is not supplied, or if job control is not enabled. +is not supplied. .TP \fBtest\fP \fIexpr\fP .PD 0 .TP \fB[\fP \fIexpr\fP \fB]\fP -Return a status of 0 or 1 depending on +Return a status of 0 (true) or 1 (false) 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 +Expressions are composed of the primaries described +.ie \n(zZ=1 in \fIbash(1)\fP +.el above +under .SM .BR "CONDITIONAL EXPRESSIONS" . \fBtest\fP does not accept any options, nor does it accept and ignore @@ -9037,6 +10760,7 @@ an argument of \fB\-\-\fP 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. +Operator precedence is used when there are five or more arguments. .RS .PD 0 .TP @@ -9079,7 +10803,9 @@ The expression is true if and only if the argument is not null. 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 +If the first argument is one of the unary conditional operators listed +.ie \n(zZ=1 in \fIbash(1)\fP +.el above under .SM .BR "CONDITIONAL EXPRESSIONS" , @@ -9088,14 +10814,17 @@ 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 +The following conditions are applied in the order listed. +If the second argument is one of the binary conditional operators listed +.ie \n(zZ=1 in \fIbash(1)\fP +.el 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. +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 @@ -9104,14 +10833,24 @@ argument. Otherwise, the expression is false. .TP 4 arguments +The following conditions are applied in the order listed. 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 +the two-argument test using the second and third arguments. +If the first argument is exactly \fB(\fP and the fourth argument is +exactly \fB)\fP, the result is the two-argument test of the second +and third 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. +.if t .sp 0.5 +.if n .sp 1 +.LP +When used with \fBtest\fP or \fB[\fP, the \fB<\fP and \fB>\fP operators +sort lexicographically using ASCII ordering. .RE .PD .TP @@ -9132,7 +10871,7 @@ is absent (and there is a single \fIsigspec\fP) or each specified signal is reset to its original disposition (the value it had upon entrance to the shell). -If +If .I arg is the null string the signal specified by each .I sigspec @@ -9157,7 +10896,10 @@ 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. +Signal names are case insensitive and the +.SM +.B SIG +prefix is optional. .if t .sp 0.5 .if n .sp 1 If a @@ -9180,7 +10922,8 @@ is executed before every \fIsimple command\fP, \fIfor\fP command, command, and before the first command executes in a shell function (see .SM .B SHELL GRAMMAR -above). +.ie \n(zZ=1 in \fIbash(1)\fP). +.el 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 @@ -9190,8 +10933,8 @@ is .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. +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 @@ -9201,7 +10944,10 @@ is .BR ERR , the command .I arg -is executed whenever a simple command has a non\-zero exit status, +is executed whenever +a pipeline (which may consist of a single simple +command), a list, or a compound command returns a +non\-zero exit status, subject to the following conditions. The .SM @@ -9211,17 +10957,19 @@ command is part of the command list immediately following a .B while or .B until -keyword, +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 +.B || +list except the command following the final \fB&&\fP or \fB||\fP, +any command in a pipeline but the last, +or if the command's return value is +being inverted using .BR ! . -These are the same conditions obeyed by the \fBerrexit\fP option. +These are the same conditions obeyed by the \fBerrexit\fP (\fB\-e\fP) option. .if t .sp 0.5 .if n .sp 1 Signals ignored upon entry to the shell cannot be trapped or reset. @@ -9234,7 +10982,7 @@ is invalid; otherwise returns true. .TP \fBtype\fP [\fB\-aftpP\fP] \fIname\fP [\fIname\fP ...] -With no options, +With no options, indicate how each .I name would be interpreted if used as a command name. @@ -9248,7 +10996,7 @@ prints a string which is one of .IR function , .IR builtin , or -.I file +.I file if .I name is an alias, shell reserved word, function, builtin, or disk file, @@ -9284,19 +11032,19 @@ If a command is hashed, .B \-p and .B \-P -print the hashed value, not necessarily the file that appears -first in +print the hashed value, which is not necessarily the file that appears +first in .SM .BR PATH . If the .B \-a -option is used, +option is used, .B type prints all of the places that contain -an executable named +an executable named .IR name . This includes aliases and functions, -if and only if the +if and only if the .B \-p option is not also used. The table of hashed commands is not consulted @@ -9309,7 +11057,11 @@ option suppresses shell function lookup, as with the \fBcommand\fP builtin. returns true if all of the arguments are found, false if any are not found. .TP -\fBulimit\fP [\fB\-HSTabcdefilmnpqrstuvx\fP [\fIlimit\fP]] +\fBulimit\fP [\fB\-HS\fP] \fB\-a\fP +.PD 0 +.TP +\fBulimit\fP [\fB\-HS\fP] [\fB\-bcdefiklmnpqrstuvxPRT\fP [\fIlimit\fP]] +.PD 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 @@ -9332,13 +11084,14 @@ 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. +resource is specified, the limit name and unit, if appropriate, +are printed before the value. Other options are interpreted as follows: .RS .PD 0 .TP .B \-a -All current limits are reported +All current limits are reported; no limits are set .TP .B \-b The maximum socket buffer size @@ -9358,6 +11111,9 @@ The maximum size of files written by the shell and its children .B \-i The maximum number of pending signals .TP +.B \-k +The maximum number of kqueues that may be allocated +.TP .B \-l The maximum size that may be locked into memory .TP @@ -9387,40 +11143,56 @@ The maximum amount of cpu time in seconds The maximum number of processes available to a single user .TP .B \-v -The maximum amount of virtual memory available to the shell +The maximum amount of virtual memory available to the shell and, on +some systems, to its children .TP .B \-x The maximum number of file locks .TP +.B \-P +The maximum number of pseudoterminals +.TP +.B \-R +The maximum time a real-time process can run before blocking, in microseconds +.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 +is given, and the .B \-a -option is display only). +option is not used, +\fIlimit\fP is the new value of the specified resource. If no option is given, then .B \-f is assumed. Values are in 1024-byte increments, except for .BR \-t , -which is in seconds, +which is in seconds; +.BR \-R , +which is in microseconds; .BR \-p , -which is in units of 512-byte blocks, -and +which is in units of 512-byte blocks; +.BR \-P , .BR \-T , .BR \-b , +.BR \-k , .BR \-n , and .BR \-u , -which are unscaled values. +which are unscaled values; +and, when in posix mode, +.B \-c +and +.BR \-f , +which are in 512-byte increments. 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 +The user file-creation mask is set to .IR mode . If .I mode @@ -9452,15 +11224,15 @@ value is true unless a supplied .I name is not a defined alias. .TP -\fBunset\fP [\-\fBfv\fP] [\fIname\fP ...] +\fBunset\fP [\-\fBfv\fP] [\-\fBn\fP] [\fIname\fP ...] For each .IR name , remove the corresponding variable or function. -If no options are supplied, or the +If the .B \-v option is given, each .I name -refers to a shell variable. +refers to a shell variable, and that variable is removed. Read-only variables may not be unset. If .B \-f @@ -9468,45 +11240,304 @@ is specified, each .I name refers to a shell function, and the function definition is removed. +If the +.B \-n +option is supplied, and \fIname\fP is a variable with the \fInameref\fP +attribute, \fIname\fP will be unset rather than the variable it +references. +\fB\-n\fP has no effect if the \fB\-f\fP option is supplied. +If no options are supplied, each \fIname\fP refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. Each unset variable or function is removed from the environment passed to subsequent commands. If any of .SM -.BR COMP_WORDBREAKS , +.BR BASH_ALIASES , .SM -.BR RANDOM , +.BR BASH_ARGV0 , .SM -.BR SECONDS , +.BR BASH_CMDS , .SM -.BR LINENO , +.BR BASH_COMMAND , .SM -.BR HISTCMD , +.BR BASH_SUBSHELL , +.SM +.BR BASHPID , +.SM +.BR COMP_WORDBREAKS , +.SM +.BR DIRSTACK , +.SM +.BR EPOCHREALTIME , +.SM +.BR EPOCHSECONDS , .SM .BR FUNCNAME , .SM .BR GROUPS , +.SM +.BR HISTCMD , +.SM +.BR LINENO , +.SM +.BR RANDOM , +.SM +.BR SECONDS , or .SM -.B DIRSTACK +.B SRANDOM are unset, they lose their special properties, even if they are subsequently reset. The exit status is true unless a .I name -is readonly. +is readonly or may not be unset. .TP -\fBwait\fP [\fIn ...\fP] -Wait for each specified process and return its termination status. +\fBwait\fP [\fB\-fn\fP] [\fP\-p\fP \fIvarname\fP] [\fIid ...\fP] +Wait for each specified child process and return its termination status. Each -.I n +.I id 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 +.I id +is not given, +\fBwait\fP waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +\fB$!\fP, +and the return status is zero. +If the \fB\-n\fP option is supplied, +\fBwait\fP waits for a single job +from the list of \fIid\fPs or, if no \fIid\fPs are supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the \fB\-p\fP option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +\fIvarname\fP named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the \fB\-n\fP option is supplied. +Supplying the \fB\-f\fP option, when job control is enabled, +forces \fBwait\fP to wait for \fIid\fP to terminate before returning +its status, instead of returning when it changes status. +If +.I id +specifies a non-existent process or job, the return status is 127. +If \fBwait\fP is interrupted by a signal, the return status will be greater +than 128, as described under +.B SIGNALS +.ie \n(zZ=1 in \fIbash(1)\fP. +.el above. +Otherwise, the return status is the exit status of the last process or job waited for. +.SH "SHELL COMPATIBILITY MODE" +Bash-4.0 introduced the concept of a \fIshell compatibility level\fP, +specified as a set of options to the shopt builtin ( +.BR compat31 , +.BR compat32 , +.BR compat40 , +.BR compat41 , +and so on). +There is only one current +compatibility level -- each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. +.PP +This section does not mention behavior that is standard for a particular +version (e.g., setting \fBcompat32\fP 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 subsequent versions). +.PP +If a user enables, say, \fBcompat32\fP, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of \fBbash\fP, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the \fB[[\fP +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling \fBcompat32\fP will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. +.PP +Bash-4.3 introduced a new shell variable: +.SM +.BR BASH_COMPAT . +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the \fBcompat\fP\fINN\fP option, like 42) determines the +compatibility level. +.PP +Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of +.SM +.BR BASH_COMPAT . +.PP +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use +.SM +.B BASH_COMPAT +on bash-5.0 and later versions. +.PP +The following table describes the behavior changes controlled by each +compatibility level setting. +The \fBcompat\fP\fINN\fP tag is used as shorthand for setting the +compatibility level +to \fINN\fP using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding \fBcompat\fP\fINN\fP shopt option. +For bash-4.3 and later versions, the +.SM +.B BASH_COMPAT +variable is preferred, +and it is required for bash-5.1 and later versions. +.TP +\fBcompat31\fP +.PD 0 +.RS +.IP \(bu +quoting the rhs of the \fB[[\fP command's regexp matching operator (=~) +has no special effect +.RE +.PD +.TP +\fBcompat32\fP +.PD 0 +.RS +.IP \(bu +interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +.RE +.PD +.TP +\fBcompat40\fP +.PD 0 +.RS +.IP \(bu +the \fB<\fP and \fB>\fP operators to the \fB[[\fP command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and +.IR strcmp (3); +bash-4.1 and later use the current locale's collation sequence and +.IR strcoll (3). +.RE +.PD +.TP +\fBcompat41\fP +.PD 0 +.RS +.IP \(bu +in \fIposix\fP mode, \fBtime\fP may be followed by options and still be +recognized as a reserved word (this is POSIX interpretation 267) +.IP \(bu +in \fIposix\fP mode, the parser requires that an even number of single +quotes occur in the \fIword\fP portion of a double-quoted +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is POSIX interpretation 221) +.RE +.PD +.TP +\fBcompat42\fP +.PD 0 +.RS +.IP \(bu +the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +.IP \(bu +in posix mode, single quotes are considered special when expanding +the \fIword\fP portion of a double-quoted parameter expansion +and can be used to quote a closing brace or other special character +(this is part of POSIX interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +.RE +.PD +.TP +\fBcompat43\fP +.PD 0 +.RS +.IP \(bu +the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(e.g., declare -a foo=\(aq(1 2)\(aq). Later versions warn that this usage is +deprecated +.IP \(bu +word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +.IP \(bu +when executing a shell function, the loop state (while/until/etc.) +is not reset, so \fBbreak\fP or \fBcontinue\fP in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +.RE +.PD +.TP +\fBcompat44\fP +.PD 0 +.RS +.IP \(bu +the shell sets up the values used by +.SM +.B BASH_ARGV +and +.SM +.B BASH_ARGC +so they can expand to the shell's positional parameters even if extended +debugging mode is not enabled +.IP \(bu +a subshell inherits loops from its parent context, so \fBbreak\fP +or \fBcontinue\fP will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +.IP \(bu +variable assignments preceding builtins like \fBexport\fP and \fBreadonly\fP +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +.RE +.PD +.TP +\fBcompat50\fP +.PD 0 +.RS +.IP \(bu +Bash-5.1 changed the way +.SM +.B $RANDOM +is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +.SM +.B RANDOM +will produce the same sequence as in bash-5.0 +.IP \(bu +If the command hash table is empty, bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the \fB\-l\fP option is supplied. +.RE +.PD +.TP +\fBcompat51\fP +.PD 0 +.RS +.IP \(bu +The \fBunset\fP builtin treats attempts to unset array subscripts \fB@\fP +and \fB*\fP differently depending on whether the array is indexed or +associative, and differently than in previous versions. +.RE +.PD .\" bash_builtins .if \n(zZ=1 .ig zZ .SH "RESTRICTED SHELL" @@ -9535,6 +11566,8 @@ setting or unsetting the values of .SM .BR PATH , .SM +.BR HISTFILE , +.SM .BR ENV , or .SM @@ -9543,13 +11576,17 @@ or specifying command names containing .B / .IP \(bu -specifying a file name containing a +specifying a filename containing a .B / as an argument to the .B . builtin command .IP \(bu -Specifying a filename containing a slash as an argument to the +specifying a filename containing a slash as an argument to the +.B history +builtin command +.IP \(bu +specifying a filename containing a slash as an argument to the .B \-p option to the .B hash @@ -9576,7 +11613,7 @@ options to the .B enable builtin command .IP \(bu -Using the \fBenable\fP builtin command to enable disabled shell builtins +using the \fBenable\fP builtin command to enable disabled shell builtins .IP \(bu specifying the .B \-p @@ -9585,7 +11622,7 @@ option to the builtin command .IP \(bu turning off restricted mode with -\fBset +r\fP or \fBset +o restricted\fP. +\fBset +r\fP or \fBshopt -u restricted_shell\fP. .PP These restrictions are enforced after any startup files are read. .PP @@ -9610,7 +11647,10 @@ script. .TP \fIThe Gnu History Library\fP, Brian Fox and Chet Ramey .TP -\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE +\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE -- +http://pubs.opengroup.org/onlinepubs/9699919799/ +.TP +http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode .TP \fIsh\fP(1), \fIksh\fP(1), \fIcsh\fP(1) .TP @@ -9636,6 +11676,10 @@ The individual per-interactive-shell startup file .FN ~/.bash_logout The individual login shell cleanup file, executed when a login shell exits .TP +.FN ~/.bash_history +The default value of \fBHISTFILE\fP, the file in which bash saves the +command history +.TP .FN ~/.inputrc Individual \fIreadline\fP initialization file .PD @@ -9655,7 +11699,8 @@ 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. +\fIftp://ftp.gnu.org/pub/gnu/bash/\fP and +\fIhttp://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz\fP. .PP Once you have determined that a bug actually exists, use the .I bashbug @@ -9687,12 +11732,11 @@ 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 . +.IR chet.ramey@case.edu . .SH BUGS -.PP It's too big and too slow. .PP -There are some subtle differences between +There are some subtle differences between .B bash and traditional versions of .BR sh , diff --git a/doc/bash.html b/doc/bash.html index 2aa2825..d809369 100644 --- a/doc/bash.html +++ b/doc/bash.html @@ -3,7 +3,7 @@ -
BASH(1)2009 December 29BASH(1) +BASH(1)2022 September 19BASH(1)

Index @@ -18,6 +18,18 @@ + + + + + + + + + + + + @@ -37,12 +49,12 @@

SYNOPSIS

bash [options] -[file] +[command_string | file]  

COPYRIGHT

-Bash is Copyright © 1989-2009 by the Free Software Foundation, Inc. +Bash is Copyright © 1989-2022 by the Free Software Foundation, Inc.  

DESCRIPTION

@@ -67,28 +79,35 @@

DESCRIPTION

 

OPTIONS

-In addition to the single-character shell options documented in the -description of the set builtin command, bash +All of the single-character shell options documented in the +description of the set builtin command, including -o, +can be used as options when the shell is invoked. +In addition, bash interprets the following options when it is invoked:

-
-c string +
-c
If the -c -option is present, then commands are read from -string. +option is present, then commands are read from the first non-option argument +command_string. If there are arguments after the -string, +command_string, + +the first argument is assigned to +$0 -they are assigned to the positional parameters, starting with -$0. +and any remaining arguments are assigned to the positional parameters. +The assignment to +$0 +sets the name of the shell, which is used in warning and error messages.
-i
@@ -132,7 +151,8 @@

OPTIONS

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. +when invoking an interactive shell or when reading input +through a pipe.
-D
@@ -195,11 +215,6 @@

OPTIONS

option to the shopt -builtin below) -and shell function tracing (see the description of the --o functrace option to the -set - builtin below).
--dump-po-strings @@ -278,6 +293,12 @@

OPTIONS

Change the behavior of bash where the default operation differs from the POSIX standard to match the standard (posix mode). +See +SEE ALSO + + +below for a reference to a document that details how posix mode affects +bash's behavior.
--restricted
@@ -289,7 +310,7 @@

OPTIONS

--verbose
-Equivalent to -v. +Equivalent to -v.
--version
@@ -313,7 +334,7 @@

ARGUMENTS

If bash -is invoked in this fashion, +is invoked in this fashion, $0 is set to the name of the file, and the positional parameters @@ -336,17 +357,18 @@

INVOCATION

A login shell is one whose first character of argument zero is a -, -or one started with the +or one started with the --login option.

An interactive shell is one started without non-option arguments +(unless -s is specified) and without the -c -option +option, whose standard input and error are both connected to terminals (as determined by isatty(3)), @@ -379,7 +401,7 @@

INVOCATION

bash reports an error. -Tildes are expanded in file names as described below under +Tildes are expanded in filenames as described below under Tilde Expansion in the @@ -405,7 +427,8 @@

INVOCATION

option may be used when the shell is started to inhibit this behavior.

-When a login shell exits, +When an interactive login shell exits, +or a non-interactive login shell executes the exit builtin command, bash reads and executes commands from the file ~/.bash_logout, if it @@ -450,7 +473,7 @@

INVOCATION

PATH -variable is not used to search for the file name. +variable is not used to search for the filename.

If @@ -499,7 +522,7 @@

INVOCATION

A non-interactive shell invoked with the name sh -does not attempt to read any other startup files. +does not attempt to read any other startup files. When invoked as sh, @@ -533,13 +556,15 @@

INVOCATION

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. +connected to a network connection, as when executed by +the historical 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. +determines it is being run non-interactively 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 @@ -547,8 +572,8 @@

INVOCATION

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 +option may be used to force another file to be read, but neither +rshd nor sshd generally invoke the shell with those options or allow them to be specified.

@@ -575,13 +600,11 @@

INVOCATION

 

DEFINITIONS

-

- The following definitions are used throughout the rest of this document.

-
blank +
blank
A space or tab. @@ -595,7 +618,7 @@

DEFINITIONS

name
-A +A word consisting only of alphanumeric characters and underscores, and @@ -612,14 +635,10 @@

DEFINITIONS

-| & ; ( ) < > space tab - -

+| & ; ( ) < > space tab newline
-

-

control operator
@@ -628,7 +647,7 @@

DEFINITIONS

-|| & && ; ;; ( ) | |& <newline> +|| & && ; ;; ;& ;;& ( ) | |& <newline>

@@ -639,17 +658,21 @@

RESERVED WORDS

Reserved words 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 +the first word of a command (see SHELL GRAMMAR -below) or the third word of a -case +below), the third word of a +case or +select + +command +(only in is valid), or the third word of a for -command: +command (only in and do are valid):

@@ -657,18 +680,17 @@

RESERVED WORDS

-! case do done elif else esac fi for function if in select then until while { } time [[ ]] +! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]]
 

SHELL GRAMMAR

+This section describes the syntax of the various forms of shell commands.  

Simple Commands

-

- A simple command is a sequence of optional variable assignments followed by blank-separated words and redirections, and terminated by a control operator. The first word @@ -683,8 +705,6 @@

Simple Commands

 

Pipelines

-

- A pipeline is a sequence of one or more commands separated by one of the control operators | @@ -694,28 +714,30 @@

Pipelines

-[time [-p]] [ ! ] command [ [|||&] command2 ... ] +[time [-p]] [ ! ] command1 [ [|||&] command2 ... ]

The standard output of -command +command1 is connected via a pipe to the standard input of command2. This connection is performed before any redirections specified by the -command (see +command1(see + REDIRECTION below). -If |& is used, the standard error of command 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. +If |& is used, command1's standard error, in addition to its +standard output, is connected to +command2's standard input through the pipe; +it is shorthand for 2>&1 |. +This implicit redirection of the standard error to the standard output is +performed after any redirections specified by command1.

The return status of a pipeline is the exit status of the last @@ -739,6 +761,8 @@

Pipelines

system time consumed by its execution are reported when the pipeline terminates. The -p option changes the output format to that specified by POSIX. +When the shell is in posix mode, it does not recognize +time as a reserved word if the next token begins with a `-'. The TIMEFORMAT @@ -754,13 +778,31 @@

Pipelines

below.

-Each command in a pipeline is executed as a separate process (i.e., in a -subshell). -  -

Lists

+When the shell is in posix mode, time +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The +TIMEFORMAT + +variable may be used to specify the format of +the time information.

+Each command in a multi-command pipeline, +where pipes are created, +is executed in a subshell, which is a +separate process. +See +COMMAND EXECUTION ENVIRONMENT +for a description of subshells and a subshell environment. +If the lastpipe option is enabled using the shopt builtin +(see the description of shopt below), +the last element of a pipeline may be run by the shell process +when job control is not active. +  +

Lists

+ A list is a sequence of one or more pipelines separated by one of the operators ;, @@ -805,8 +847,11 @@

Lists

&, the shell executes the command in the background -in a subshell. The shell does not wait for the command to -finish, and the return status is 0. Commands separated by a +in a subshell. +The shell does not wait for the command to +finish, and the return status is 0. +These are referred to as asynchronous commands. +Commands separated by a ; are executed sequentially; the shell waits for each @@ -814,7 +859,7 @@

Lists

exit status of the last command executed.

-AND and OR lists are sequences of one of more pipelines separated by the +AND and OR lists are sequences of one or more pipelines separated by the && and || control operators, respectively. AND and OR lists are executed with left associativity. An AND list has the form @@ -831,7 +876,7 @@

Lists

is executed if, and only if, command1 -returns an exit status of zero. +returns an exit status of zero (success).

An OR list has the form @@ -839,15 +884,13 @@

Lists

command1 || command2 -

-

command2 -is executed if and only if +is executed if, and only if, command1 returns a non-zero exit status. @@ -857,14 +900,15 @@

Lists

 

Compound Commands

-

- -A compound command is one of the following: +A compound command is one of the following. +In most cases a list in a command's description may be separated from +the rest of the command by one or more newlines, and may be followed by a +newline in place of a semicolon.

(list)
-list is executed in a subshell environment (see +list is executed in a subshell (see COMMAND EXECUTION ENVIRONMENT -below). +below for a description of a subshell environment). 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 @@ -887,8 +931,12 @@

Compound Commands

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". +otherwise the return status is 1. +The expression +undergoes the same expansions +as if it were within double quotes, +but double quote characters in expression are not treated specially +and are removed.
[[ expression ]]
Return a status of 0 or 1 depending on the evaluation of the conditional expression expression. @@ -896,67 +944,96 @@

Compound Commands

CONDITIONAL EXPRESSIONS. -Word splitting and pathname expansion are not performed on the words -between the [[ and ]]; tilde expansion, parameter and +The words between the [[ and ]] do not undergo word splitting +and pathname expansion. +The shell performs tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process -substitution, and quote removal are performed. +substitution, and quote removal on those words +(the expansions that would occur if the words were enclosed in double quotes). Conditional operators such as -f must be unquoted to be recognized as primaries.

-When used with [[, The < and > operators sort +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 Pattern Matching. -If the shell option +to the rules described below under Pattern Matching, +as if the extglob shell option were enabled. +The = operator is equivalent to ==. +If the nocasematch -is enabled, the match is performed without regard to the case +shell option 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. +Any part of the pattern may be quoted to force the quoted portion +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 regex(3)). +a POSIX extended regular expression and matched accordingly +(using the POSIX regcomp and regexec interfaces +usually described in 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 +If the nocasematch -is enabled, the match is performed without regard to the case +shell option 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. +If any part of the pattern is quoted, the quoted portion is matched literally. +This means every character in the quoted portion matches itself, +instead of having any special pattern matching meaning. +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched literally. +Treat bracket expressions in regular expressions carefully, +since normal quoting and pattern characters lose their meanings +between brackets. +

+ + +The pattern will match if it matches any part of the string. +Anchor the pattern using the ^ and $ regular expression +operators to force it to match the entire string. +The array variable +BASH_REMATCH +records which parts of the string matched the pattern. The element of BASH_REMATCH -with index 0 is the portion of the string -matching the entire regular expression. -The element of +with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining +BASH_REMATCH + + +indices. The element of BASH_REMATCH with index n is the portion of the string matching the nth parenthesized subexpression. +Bash sets +BASH_REMATCH + + +in the global scope; declaring it as a local variable will lead to +unexpected results.

@@ -988,9 +1065,7 @@

Compound Commands

expression2 are true. -
expression1 || expression2 -
- +
expression1 || expression2
True if either expression1 @@ -1002,9 +1077,7 @@

Compound Commands

-The && and -|| - +The && and || operators do not evaluate expression2 if the value of expression1 is sufficient to determine the return value of the entire conditional expression. @@ -1039,24 +1112,28 @@

Compound Commands

that is executed, or false if any of the expressions is invalid.
select name [ in word ] ; do list ; done
The list of words following in is expanded, generating a list -of items. The set of expanded words is printed on the standard +of items, and the set of expanded words is printed on the standard error, each preceded by a number. If the in word is omitted, the positional parameters are printed (see PARAMETERS -below). The +below). +select + +then displays the PS3 -prompt is then displayed and a line read from the standard input. +prompt and reads a line 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 command completes. Any -other value read causes +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 and returns 1. +Any other value read causes name to be set to null. The line read is saved in the variable @@ -1080,21 +1157,21 @@

Compound Commands

case word in [ [(] pattern [ | pattern ]
A case command first expands word, and tries to match -it against each pattern in turn, using the same matching rules -as for pathname expansion (see -Pathname Expansion +it against each pattern in turn, using the matching rules +described under +Pattern Matching -below). +below. The word is expanded using tilde -expansion, parameter and variable expansion, arithmetic substitution, +expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution and quote removal. Each pattern examined is expanded using tilde -expansion, parameter and variable expansion, arithmetic substitution, -command substitution, and process substitution. -If the shell option +expansion, parameter and variable expansion, arithmetic expansion, +command substitution, process substitution, and quote removal. +If the nocasematch -is enabled, the match is performed without regard to the case +shell option is enabled, the match is performed without regard to the case of alphabetic characters. When a match is found, the corresponding list is executed. If the ;; operator is used, no subsequent matches are attempted after @@ -1103,13 +1180,14 @@

Compound Commands

the list 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 list -on a successful match. +on a successful match, +continuing the case statement execution as if the pattern list had not matched. The exit status is zero if no pattern matches. Otherwise, it is the exit status of the last command executed in list. -
if list; then list; [ elif list; then list; ] ... [ else list; ] fi
+
if list; then list; [ elif list; then list; ] ... [ else list; ] fi
The -if +if list @@ -1120,33 +1198,28 @@

Compound Commands

command completes. Otherwise, the else list is executed, if present. The exit status is the exit status of the last command executed, or zero if no condition tested true. -
while list; do list; done
+
while list-1; do list-2; done
-
until list; do list; done
+
until list-1; do list-2; done
-The while command continuously executes the do -list as long as the last command in list returns +The while command continuously executes the list +list-2 as long as the last command in the list list-1 returns an exit status of zero. The until command is identical -to the while command, except that the test is negated; -the -do - -list +to the while command, except that the test is negated: +list-2 is executed as long as the last command in -list +list-1 returns a non-zero exit status. The exit status of the while and until commands is the exit status -of the last do list command executed, or zero if +of the last command executed in list-2, or zero if none was executed.
 

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 @@ -1154,7 +1227,7 @@

Coprocesses

established between the executing shell and the coprocess.

-The format for a coprocess is: +The syntax for a coprocess is:

@@ -1164,11 +1237,36 @@

Coprocesses

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 (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 +command may be either a simple command or a compound +command (see above). +NAME is a shell variable name. +If NAME is not supplied, the default name is COPROC. +

+ +The recommended form to use for a coprocess is +

+

+ +coproc NAME { command [redirections]; } +

+ +

+ +This form is recommended because simple commands result in the coprocess +always being named COPROC, and it is simpler to use and more complete +than the other compound commands. +

+ +If command is a compound command, NAME is optional. The +word following coproc determines whether that word is interpreted +as a variable name: it is interpreted as NAME if it is not a +reserved word that introduces a compound command. +If command is a simple command, NAME is not allowed; this +is to avoid confusion between NAME and the first word of the simple +command. +

+ +When the coprocess is executed, the shell creates an array variable (see Arrays below) named NAME in the context of the executing shell. @@ -1190,34 +1288,48 @@

Coprocesses

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 +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. +

+ +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.

+Since the coprocess is created as an asynchronous command, +the coproc command always returns success. The return status of a coprocess is the exit status of command.  

Shell Function Definitions

-

- 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:

-
[ function ] name () compound-command [redirection]
-This defines a function named name. +
fname () compound-command [redirection]
+ +
function fname [()] compound-command [redirection]
+ +This defines a function named fname. 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 +compound-command (see Compound Commands above). That command is usually a list of commands between { and }, but may be any command listed under Compound Commands above. -compound-command is executed whenever name is specified as the +If the function reserved word is used, but the +parentheses are not supplied, the braces are recommended. +compound-command is executed whenever fname is specified as the name of a simple command. +When in posix mode, fname must be a valid shell name +and may not be the name of one of the +POSIX special builtins. +In default mode, a function name can be any unquoted shell word that does +not contain $. Any redirections (see REDIRECTION @@ -1261,7 +1373,7 @@

COMMENTS

QUOTING

Quoting is used to remove the special meaning of certain -characters or words to the shell. Quoting can be used to +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. @@ -1317,6 +1429,8 @@

QUOTING

and, when history expansion is enabled, !. +When the shell is in posix mode, the ! has no special meaning +within double quotes, even when history expansion is enabled. The characters $ @@ -1362,10 +1476,11 @@

QUOTING

below).

-Words of the form $aqstringaq 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: +Character sequences of the form $aqstringaq are treated +as a special variant of single quotes. +The sequence expands to string, with backslash-escaped characters +in string replaced as specified by the ANSI C standard. +Backslash escape sequences, if present, are decoded as follows:

@@ -1416,16 +1531,30 @@

QUOTING

double quote +
\? + +
+question mark
\nnn
the eight-bit character whose value is the octal value nnn -(one to three digits) +(one to three octal digits)
\xHH
the eight-bit character whose value is the hexadecimal value HH (one or two hex digits) +
\uHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +
\UHHHHHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight hex digits)
\cx
@@ -1441,10 +1570,25 @@

QUOTING

A double-quoted string preceded by a dollar sign ($dqstringdq) 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. +The gettext infrastructure performs the lookup and +translation, using the LC_MESSAGES, TEXTDOMAINDIR, +and TEXTDOMAIN shell variables. +If the current locale is C or POSIX, +if there are no translations available, +or if the string is not translated, +the dollar sign is ignored. +This is a form of double quoting, so the string remains double-quoted +by default, whether or not it is translated and replaced. +If the noexpand_translation option is enabled +using the shopt builtin, +translated strings are single-quoted instead of double-quoted. +See the description of +shopt + +below under +SHELLBUILTINCOMMANDS. + +  

PARAMETERS

@@ -1524,11 +1668,7 @@

PARAMETERS

Arithmetic Expansion below). -Word splitting is not performed, with the exception -of "$@" as explained below under -Special Parameters. - -Pathname expansion is not performed. +Word splitting and pathname expansion are not performed. Assignment statements may also appear as arguments to the alias, @@ -1543,13 +1683,18 @@

PARAMETERS

and local -builtin commands. +builtin commands (declaration commands). +When in posix mode, these builtins may appear in a command after +one or more instances of the command builtin and retain these +assignment statement properties.

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 +This includes arguments to builtin commands such as declare that +accept assignment statements (declaration commands). +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 (see @@ -1562,10 +1707,46 @@

PARAMETERS

associative array. When applied to a string-valued variable, value is expanded and appended to the variable's value. -  -

Positional Parameters

+

+ +A variable can be assigned the nameref attribute using the +-n option to the declare or local builtin commands +(see the descriptions of declare and local below) +to create a nameref, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the nameref +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable's value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +

+

+declare -n ref=$1 + +

+inside the function creates a nameref variable ref whose value is +the variable name passed as the first argument. +References and assignments to ref, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as $1. +If the control variable in a for loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the -n option to the unset builtin. +Otherwise, if unset is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. +  +

Positional Parameters

A positional parameter @@ -1594,8 +1775,6 @@

Positional Parameters

 

Special Parameters

-

- The shell treats several parameters specially. These parameters may only be referenced; assignment to them is not allowed. @@ -1603,10 +1782,13 @@

Special Parameters

*
-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 +Expands to the positional parameters, starting from one. +When the expansion is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and pathname expansion. +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 @@ -1631,7 +1813,14 @@

Special Parameters

@
-Expands to the positional parameters, starting from one. When the +Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the expansion occurs within double quotes, each parameter expands to a separate word. That is, "$@" is equivalent to "$1" "$2" ... @@ -1639,7 +1828,7 @@

Special Parameters

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 +When there are no positional parameters, "$@" and $@ expand to nothing (i.e., they are removed). @@ -1655,7 +1844,7 @@

Special Parameters

-
-Expands to the current option flags as specified upon invocation, +Expands to the current option flags as specified upon invocation, by the set @@ -1667,14 +1856,19 @@

Special Parameters

$
-Expands to the process ID of the shell. In a () subshell, it +Expands to the process ID of the shell. In a subshell, it expands to the process ID of the current shell, not the subshell.
!
-Expands to the process ID of the most recently executed background -(asynchronous) command. +Expands to the process ID of the job most recently placed into the +background, whether executed as an asynchronous command or using +the bg builtin (see +JOB CONTROL + + +below).
0
@@ -1696,38 +1890,36 @@

Special Parameters

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 +to the filename used to invoke bash, 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 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.
 

Shell Variables

-

- The following variables are set by the shell:

+
_ + +
+At shell startup, set to the 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 simple +command executed in the foreground, 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.
BASH
-Expands to the full file name used to invoke this instance of +Expands to the full filename used to invoke this instance of bash.
BASHOPTS @@ -1761,16 +1953,32 @@

Shell Variables

BASHPID
-Expands to the process id of the current bash process. +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. +Assignments to +BASHPID + + +have no effect. +If +BASHPID + +is unset, it loses its special properties, even if it is +subsequently reset.
BASH_ALIASES
An associative array variable whose members correspond to the internal -list of aliases as maintained by the alias builtin -Elements added to this array appear in the alias list; unsetting array -elements cause aliases to be removed from the alias list. +list of aliases as maintained by the alias builtin. +Elements added to this array appear in the alias list; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If +BASH_ALIASES + +is unset, it loses its special properties, even if it is +subsequently reset.
BASH_ARGC
@@ -1793,7 +2001,10 @@

Shell Variables

option to the shopt -builtin below) +builtin below). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values.
BASH_ARGV
@@ -1816,20 +2027,51 @@

Shell Variables

option to the shopt -builtin below) +builtin below). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values. +
BASH_ARGV0 + +
+When referenced, this variable expands to the name of the shell or shell +script (identical to +$0; + +see the description of special parameter 0 above). +Assignment to +BASH_ARGV0 + +causes the value assigned to also be assigned to $0. +If +BASH_ARGV0 + +is unset, it loses its special properties, even if it is +subsequently reset.
BASH_CMDS
An associative array variable whose members correspond to the internal hash table of commands as maintained by the hash builtin. -Elements added to this array appear in the hash table; unsetting array -elements cause commands to be removed from the hash table. +Elements added to this array appear in the hash table; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If +BASH_CMDS + +is unset, it loses its special properties, even if it is +subsequently reset.
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. +If +BASH_COMMAND + +is unset, it loses its special properties, even if it is +subsequently reset.
BASH_EXECUTION_STRING
@@ -1838,20 +2080,29 @@

Shell Variables

An array variable whose members are the line numbers in source files -corresponding to each member of -FUNCNAME. +where each corresponding member of +FUNCNAME +was invoked. ${BASH_LINENO[$i]} is the line number in the source -file where ${FUNCNAME[$i]} was called +file (${BASH_SOURCE[$i+1]}) 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_LOADABLES_PATH + +
+A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +enable + +command.
BASH_REMATCH
@@ -1861,21 +2112,30 @@

Shell Variables

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 +An array variable whose members are the source filenames +where the corresponding shell function names in the FUNCNAME -array variable. +array variable are defined. +The shell function +${FUNCNAME[$i]} is defined in the file +${BASH_SOURCE[$i]} and called from +${BASH_SOURCE[$i+1]}.
BASH_SUBSHELL
-Incremented by one each time a subshell or subshell environment is spawned. +Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. The initial value is 0. +If +BASH_SUBSHELL + +is unset, it loses its special properties, even if it is +subsequently reset.
BASH_VERSINFO
@@ -1886,7 +2146,6 @@

Shell Variables

The values assigned to the array members are as follows:

-
BASH_VERSINFO[0] @@ -1915,7 +2174,6 @@

Shell Variables

MACHTYPE. -
BASH_VERSION @@ -1995,6 +2253,12 @@

Shell Variables

This variable is available only in shell functions invoked by the programmable completion facilities (see Programmable Completion below). +
COPROC + +
+An array variable (see Arrays below) created to hold the file descriptors +for output from and input to an unnamed coprocess (see Coprocesses +above).
DIRSTACK
@@ -2018,6 +2282,39 @@

Shell Variables

If DIRSTACK + +is unset, it loses its special properties, even if it is +subsequently reset. +
EPOCHREALTIME + +
+Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see time(3)) as a floating point value +with micro-second granularity. +Assignments to +EPOCHREALTIME + + +are ignored. +If +EPOCHREALTIME + + +is unset, it loses its special properties, even if it is +subsequently reset. +
EPOCHSECONDS + +
+Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see time(3)). +Assignments to +EPOCHSECONDS + + +are ignored. +If +EPOCHSECONDS + is unset, it loses its special properties, even if it is subsequently reset. @@ -2033,7 +2330,7 @@

Shell Variables

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 +The bottom-most element (the one with the highest index) is "main". This variable exists only when a shell function is executing. @@ -2041,23 +2338,34 @@

Shell Variables

FUNCNAME -have no effect and return an error status. +have no effect. If FUNCNAME is unset, it loses its special properties, even if it is subsequently reset. +

+ + +This variable can be used with BASH_LINENO and BASH_SOURCE. +Each element of FUNCNAME has corresponding elements in +BASH_LINENO and BASH_SOURCE to describe the call stack. +For instance, ${FUNCNAME[$i]} was called from the file +${BASH_SOURCE[$i+1]} at line number +${BASH_LINENO[$i]}. +The caller builtin displays the current call stack using this +information.

GROUPS
An array variable containing the list of groups of which the current user is a member. -Assignments to +Assignments to GROUPS -have no effect and return an error status. +have no effect. If GROUPS @@ -2069,6 +2377,11 @@

Shell Variables

The history number, or index in the history list, of the current command. +Assignments to +HISTCMD + + +are ignored. If HISTCMD @@ -2111,6 +2424,11 @@

Shell Variables

is executing, in the standard GNU cpu-company-system format. The default is system-dependent. +
MAPFILE + +
+An array variable (see Arrays below) created to hold the text +read by the mapfile builtin when no variable name is supplied.
OLDPWD
@@ -2172,38 +2490,97 @@

Shell Variables

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 +Each time this parameter is referenced, it expands to a random integer +between 0 and 32767. +Assigning a value to -RANDOM. +RANDOM +initializes (seeds) the sequence of random numbers. If RANDOM is unset, it loses its special properties, even if it is subsequently reset. -
REPLY +
READLINE_ARGUMENT
-Set to the line of input read by the -read +Any numeric argument given to a readline command that was defined using +bind -x -builtin command when no arguments are supplied. -
SECONDS +(see +SHELL BUILTIN COMMANDS + + +below) +when it was invoked. +
READLINE_LINE
-Each time this parameter is -referenced, the number of seconds since shell invocation is returned. If a -value is assigned to +The contents of the +readline + +line buffer, for use with +bind -x + +(see +SHELL BUILTIN COMMANDS + + +below). +
READLINE_MARK + +
+The position of the mark (saved insertion point) in the +readline + +line buffer, for use with +bind -x + +(see +SHELL BUILTIN COMMANDS + + +below). +The characters between the insertion point and the mark are often +called the region. +
READLINE_POINT + +
+The position of the insertion point in the +readline + +line buffer, for use with +bind -x + +(see +SHELL BUILTIN COMMANDS + + +below). +
REPLY + +
+Set to the line of input read by the +read + +builtin command when no arguments are supplied. +
SECONDS + +
+Each time this parameter is +referenced, it expands to the number of seconds since shell invocation. +If a value is assigned to SECONDS, the value returned upon subsequent references is the number of seconds since the assignment plus the value assigned. +The number of seconds at shell invocation and the current time are always +determined by querying the system clock. If SECONDS @@ -2245,6 +2622,21 @@

Shell Variables

bash is started. +
SRANDOM + +
+This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support /dev/urandom or arc4random, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If +SRANDOM + + +is unset, it loses its special properties, +even if it is subsequently reset.
UID
@@ -2263,6 +2655,32 @@

Shell Variables

+
BASH_COMPAT + +
+The value is used to set the shell's compatibility level. +See +SHELL COMPATIBILITY MODE + + +below for a description of the various compatibility +levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If BASH_COMPAT is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If BASH_COMPAT is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below under +SHELL COMPATIBILITY MODE. + + +For example, 4.2 and 42 are valid values that correspond +to the compat42 shopt option +and set the compatibility level to 42. +The current version is also a valid value.
BASH_ENV
@@ -2276,26 +2694,11 @@

Shell Variables

is subjected to parameter expansion, command substitution, and arithmetic -expansion before being interpreted as a file name. +expansion before being interpreted as a filename. PATH -is not used to search for the resultant file name. -
CDPATH - -
-The search path for the -cd - -command. -This is a colon-separated list of directories in which the shell looks -for destination directories specified by the -cd - -command. -A sample value is -".:~:/usr". - +is not used to search for the resultant filename.
BASH_XTRACEFD
@@ -2322,17 +2725,48 @@

Shell Variables

to 2 (the standard error file descriptor) and then unsetting it will result in the standard error being closed. +
CDPATH + +
+The search path for the +cd + +command. +This is a colon-separated list of directories in which the shell looks +for destination directories specified by the +cd + +command. +A sample value is +".:~:/usr". + +
CHILD_MAX + +
+Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a POSIX-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent.
COLUMNS
-Used by the select builtin command to determine the terminal width -when printing selection lists. Automatically set upon receipt of a SIGWINCH. +Used by the select compound command to determine the terminal width +when printing selection lists. +Automatically set if the +checkwinsize + +option is enabled or in an interactive shell upon receipt of a +SIGWINCH. + +
COMPREPLY
An array variable from which bash reads the possible completions generated by a shell function invoked by the programmable completion facility (see Programmable Completion below). +Each array element contains one possible completion.
EMACS
@@ -2340,8 +2774,33 @@

Shell Variables

with value t, -it assumes that the shell is running in an emacs shell buffer and disables +it assumes that the shell is running in an Emacs shell buffer and disables line editing. +
ENV + +
+Expanded and executed similarly to +BASH_ENV + + +(see INVOCATION above) +when an interactive shell is invoked in posix mode. +
EXECIGNORE + +
+A colon-separated list of shell patterns (see Pattern Matching) +defining the list of filenames to be ignored by command search using +PATH. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via PATH lookup. +This does not affect the behavior of the [, test, and [[ +commands. +Full pathnames in the command hash table are not subject to EXECIGNORE. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the extglob shell +option.
FCEDIT
@@ -2358,7 +2817,7 @@

Shell Variables

below). -A filename whose suffix matches one of the entries in +A filename whose suffix matches one of the entries in FIGNORE @@ -2366,12 +2825,18 @@

Shell Variables

A sample value is ".o:~". +
FUNCNEST + +
+If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort.
GLOBIGNORE
-A colon-separated list of patterns defining the set of filenames to +A colon-separated list of patterns defining the set of file names to be ignored by pathname expansion. -If a filename matched by a pathname expansion pattern also matches one +If a file name matched by a pathname expansion pattern also matches one of the patterns in GLOBIGNORE, @@ -2389,7 +2854,7 @@

Shell Variables

space character are not saved in the history list. -A value of +A value of ignoredups causes lines matching the previous history entry to not be saved. @@ -2426,16 +2891,20 @@

Shell Variables

below). The default value is ~/.bash_history. If unset, the -command history is not saved when an interactive shell exits. +command history is not saved when a shell exits.
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. +necessary, +to contain no more than that number of lines by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of HISTSIZE +after reading any startup files.
HISTIGNORE
@@ -2456,6 +2925,8 @@

Shell Variables

HISTIGNORE. +The pattern matching honors the setting of the extglob shell +option.
HISTSIZE
@@ -2463,7 +2934,11 @@

Shell Variables

HISTORY -below). The default value is 500. +below). +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files.
HISTTIMEFORMAT
@@ -2562,6 +3037,12 @@

Shell Variables

below). +
INSIDE_EMACS + +
+If this variable appears in the environment when the shell starts, +bash assumes that it is running inside an Emacs shell buffer +and may disable line editing, depending on the value of TERM.
LANG
@@ -2598,25 +3079,35 @@

Shell Variables

This variable determines the locale category used for number formatting. +
LC_TIME + +
+This variable determines the locale category used for data and time +formatting.
LINES
-Used by the select builtin command to determine the column length -for printing selection lists. Automatically set upon receipt of a +Used by the select compound command to determine the column length +for printing selection lists. +Automatically set if the +checkwinsize + +option is enabled or in an interactive shell upon receipt of a SIGWINCH.
MAIL
-If this parameter is set to a file name and the +If this parameter is set to a file or directory name and the MAILPATH variable is not set, bash -informs the user of the arrival of mail in the specified file. +informs the user of the arrival of mail in the specified file or +Maildir-format directory.
MAILCHECK
@@ -2631,11 +3122,11 @@

Shell Variables

MAILPATH
-A colon-separated list of file names to be checked for mail. +A colon-separated list of filenames 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 `?'. +may be specified by separating the filename from the message with a `?'. When used in the text of the message, $_ expands to the name of -the current mailfile. +the current mailfile. Example:

@@ -2645,7 +3136,9 @@

Shell Variables

Bash -supplies a default value for this variable, but the location of the user +can be configured to supply +a default value for this variable (there is no value by default), +but the location of the user mail files that it uses is system dependent (e.g., /var/mail/$USER).
@@ -2690,7 +3183,9 @@

Shell Variables

bash. A common value is -/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin. + +/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin. +
POSIXLY_CORRECT @@ -2704,11 +3199,16 @@

Shell Variables

set -o posix had been executed. +When the shell enters posix mode, it sets this variable if it was +not already set.
PROMPT_COMMAND
-If set, the value is executed as a command prior to issuing each primary -prompt. +If this variable is set, and is an array, +the value of each set element is executed as a command +prior to issuing each primary prompt. +If this is set but not an array variable, +its value is used as a command to execute instead.
PROMPT_DIRTRIM
@@ -2719,6 +3219,15 @@

Shell Variables

below). Characters removed are replaced with an ellipsis. +
PS0 + +
+The value of this parameter is expanded (see +PROMPTING + + +below) and displayed by interactive shells after reading a command +and before the command is executed.
PS1
@@ -2759,6 +3268,7 @@

Shell Variables

bash displays during an execution trace. The first character of +the expanded value of PS4 @@ -2767,7 +3277,7 @@

Shell Variables

SHELL
-The full pathname to the shell is kept in this environment variable. +This variable expands to the full pathname to the shell. If it is not set when the shell starts, bash @@ -2825,9 +3335,10 @@

Shell Variables

included.
If this variable is not set, bash acts as if it had the -value $aq\nreal\t%3lR\nuser\t%3lU\nsys %3lSaq. +value $aq\nreal\t%3lR\nuser\t%3lU\nsys\t%3lSaq. If the value is null, no timing information is displayed. A trailing newline is added when the format string is displayed. +
TMOUT
@@ -2844,16 +3355,17 @@

Shell Variables

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. +number of seconds to wait for a line of input after issuing the +primary prompt. Bash -terminates after waiting for that number of seconds if input does -not arrive. +terminates after waiting for that number of seconds if a complete +line of 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. +If set, bash uses its value as the name of a directory in which +bash creates temporary files for the shell's use.
auto_resume
@@ -2925,17 +3437,17 @@

Arrays

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 +expressions) and are zero-based; associative arrays are referenced using arbitrary strings. +Unless otherwise noted, indexed array indices must be non-negative integers.

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 indexed array, -use +is treated as an arithmetic expression that must evaluate to a number. +To explicitly declare an indexed array, use declare -a name (see @@ -2965,15 +3477,30 @@

Arrays

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. +value may be of the form [subscript]=string. +Indexed array assignments do not require anything but string. +Each value in the list is expanded using all the shell expansions +described below under +EXPANSION. + + 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.

-When assigning to an associative array, the subscript is required. +When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +name=( key1 value1 key2 value2 ...). +These are treated identically to +name=( [key1]=value1 [key2]=value2 ...). +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string.

This syntax is also accepted by the @@ -2981,6 +3508,21 @@

Arrays

builtin. Individual array elements may be assigned to using the name[subscript]=value syntax introduced above. +When assigning to an indexed array, if +name + +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +name, so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+ +The += operator will append to an array variable when assigning +using the compound assignment syntax; see +PARAMETERS + + +above.

Any element of an array may be referenced using @@ -3009,24 +3551,58 @@

Arrays

above). ${#name[subscript]} expands to the length of ${name[subscript]}. If subscript is * or @, the expansion is the number of elements in the array. +If the +subscript + +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+ Referencing an array variable without a subscript is equivalent to referencing the array with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +bash + +will create an array if necessary.

An array variable is considered set if a subscript has been assigned a value. The null string is a valid value.

+It is possible to obtain the keys (indices) of an array as well as the values. +${!name[@]} and ${!name[*]} +expand to the indices assigned in array variable name. +The treatment when in double quotes is similar to the expansion of the +special parameters @ and * within double quotes. +

+ 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 pathname -expansion. -unset name, where name is an array, or +destroys the array element at index subscript, +for both indexed and associative arrays. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +unset name, where name is an array, +removes the entire array. unset name[subscript], where -subscript is * or @, removes the entire array. +subscript is * or @, behaves differently depending on +whether name is an indexed or associative array. +If name is an associative array, this unsets the element with +subscript * or @. +If name is an indexed array, unset removes all of the elements but +does not remove the array itself. +

+ +When using a variable name with a subscript as an argument to a command, +such as with unset, without using the word expansion syntax +described above, the argument is subject to pathname expansion. +If pathname expansion is not desired, the argument should be quoted.

The @@ -3044,6 +3620,10 @@

Arrays

-A option to specify an associative array. +If both options are supplied, +-A + +takes precedence. The read @@ -3081,22 +3661,32 @@

EXPANSION

-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. +The order of expansions is: +brace expansion; +tilde expansion, parameter and variable expansion, 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 available: process substitution. +This is performed at the +same time as tilde, parameter, variable, and arithmetic expansion and +command substitution. +

+ +After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(quote removal).

Only brace expansion, word splitting, and pathname expansion -can change the number of words of the expansion; other expansions +can increase 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 "${name[@]}" +"$@" and "${name[@]}", +and, in most cases, $* and ${name[*]} as explained above (see PARAMETERS). @@ -3104,8 +3694,6 @@

EXPANSION

 

Brace Expansion

-

- Brace expansion is a mechanism by which arbitrary strings @@ -3132,17 +3720,20 @@

Brace Expansion

A sequence expression takes the form {x..y[..incr]}, -where x and y are either integers or single characters, +where x and y are either integers or single letters, 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 +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 letters are supplied, the expression expands to each character +lexicographically between x and y, inclusive, +using the default C locale. +Note that both x and y must be of the same type +(integer or letter). When the increment is supplied, it is used as the difference between each term. The default increment is 1 or -1 as appropriate.

@@ -3163,7 +3754,8 @@

Brace Expansion

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. +is not considered eligible for brace expansion, and inhibits brace +expansion until the closing }.

This construct is typically used as shorthand when the common @@ -3211,7 +3803,7 @@

Brace Expansion

bash with the -+B ++B option or disable brace expansion with the +B @@ -3227,8 +3819,6 @@

Brace Expansion

 

Tilde Expansion

-

- 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 tilde-prefix. @@ -3283,7 +3873,7 @@

Tilde Expansion

=. In these cases, tilde expansion is also performed. -Consequently, one may use file names with tildes in assignments to +Consequently, one may use filenames with tildes in assignments to PATH, @@ -3295,11 +3885,19 @@

Tilde Expansion

and the shell assigns the expanded value. +

+ +Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (as described above under +PARAMETERS) + + +when they appear as arguments to simple commands. +Bash does not do this, except for the declaration commands listed +above, when in posix mode.  

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 @@ -3327,18 +3925,26 @@

Parameter Expansion

is followed by a character which is not to be interpreted as part of its name. +The parameter is a shell parameter as described above +PARAMETERS) or an array reference (Arrays).

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. +and parameter is not a nameref, +it introduces a level of indirection. +Bash uses the value formed by expanding the rest of +parameter as the new parameter; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original parameter. This is known as indirect expansion. -The exceptions to this are the expansions of ${!prefix*} and +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If parameter is a nameref, this expands to the name of the +parameter referenced by parameter instead of performing the +complete 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. @@ -3348,7 +3954,8 @@

Parameter Expansion

parameter expansion, command substitution, and arithmetic expansion.

-When not performing substring expansion, using the forms documented below, +When not performing substring expansion, using the forms documented below +(e.g., :-), bash tests for a parameter that is unset or null. Omitting the colon results in a test only for a parameter that is unset.

@@ -3407,31 +4014,52 @@

Parameter Expansion

${parameter:offset:length}
-Substring Expansion. -Expands to up to length characters of parameter +Substring Expansion. +Expands to up to length characters of the value 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. +If parameter is @ or *, an indexed array subscripted by +@ or *, or an associative array name, the results differ as +described below. +If length is omitted, expands to the substring of the value of +parameter starting at the character specified by offset +and extending to the end of the value. length and offset are arithmetic expressions (see ARITHMETIC EVALUATION below). -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. +is used as an offset in characters +from the end of the value of parameter. +If length evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of parameter rather than +a number of characters, and the expansion is the characters between +offset and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the :- expansion. +

+If parameter is @ or *, the result is length +positional parameters beginning at offset. +A negative offset is taken relative to one greater than the greatest +positional parameter, so an offset of -1 evaluates to the last positional +parameter. +It is an expansion error if length evaluates to a number less than +zero. +

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. +It is an expansion error if length evaluates to a number less than +zero. +

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 +

+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, $0 is prefixed to the list. @@ -3439,7 +4067,7 @@

Parameter Expansion

${!prefix@}
-Names matching prefix. +Names matching prefix. Expands to the names of variables whose names begin with prefix, separated by the first character of the IFS @@ -3452,7 +4080,7 @@

Parameter Expansion

${!name[*]}
-List of array keys. +List of array keys. 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 @@ -3460,7 +4088,7 @@

Parameter Expansion

When @ is used and the expansion appears within double quotes, each key expands to a separate word.
${#parameter}
-Parameter length. +Parameter length. The length in characters of the value of parameter is substituted. If parameter @@ -3468,7 +4096,7 @@

Parameter Expansion

is * -or +or @, the value substituted is the number of positional parameters. @@ -3482,16 +4110,30 @@

Parameter Expansion

@, the value substituted is the number of elements in the array. +If +parameter + +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +parameter, so negative indices count back from the end of the +array, and an index of -1 references the last element.
${parameter#word}
${parameter##word}
-Remove matching prefix pattern. -The +Remove matching prefix pattern. +The word is expanded to produce a pattern just as in pathname -expansion. If the pattern matches the beginning of +expansion, and matched against the expanded value of +parameter + +using the rules described under +Pattern Matching + +below. +If the pattern matches the beginning of the value of parameter, @@ -3526,9 +4168,15 @@

Parameter Expansion

${parameter%%word}
-Remove matching suffix pattern. +Remove matching suffix pattern. The word is expanded to produce a pattern just as in -pathname expansion. +pathname expansion, and matched against the expanded value of +parameter + +using the rules described under +Pattern Matching + +below. If the pattern matches a trailing portion of the expanded value of parameter, @@ -3560,19 +4208,61 @@

Parameter Expansion

the pattern removal operation is applied to each member of the array in turn, and the expansion is the resultant list.
${parameter/pattern/string}
-Pattern substitution. + +
${parameter//pattern/string}
+
${parameter/#pattern/string}
+
${parameter/%pattern/string}
+ +Pattern substitution. The pattern is expanded to produce a pattern just as in pathname 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 +string undergoes tilde expansion, parameter and variable expansion, +arithmetic expansion, command and process substitution, and quote removal. +The match is performed using the rules described under +Pattern Matching + +below. +In the first form above, only the first match is replaced. +If there are two slashes separating parameter and pattern +(the second form above), all matches of pattern are +replaced with string. +If pattern is preceded by # (the third form above), +it must match at the beginning of the expanded value of parameter. +If pattern is preceded by % (the fourth form above), +it must match at the end of the expanded value of parameter. +If the expansion of string is null, +matches of pattern are deleted. +If string is null, +matches of pattern are deleted and the / following pattern may be omitted. +

+If the patsub_replacement shell option is enabled using shopt, +any unquoted instances of & in string are replaced with the +matching portion of pattern. +

+Quoting any part of string inhibits replacement in the +expansion of the quoted portion, including replacement strings stored +in shell variables. +Backslash will escape & in string; the backslash is removed +in order to permit a literal & in the replacement string. +Backslash can also be used to escape a backslash; \\ results in +a literal backslash in the replacement. +Users should take care if string is double-quoted to avoid +unwanted interactions between the backslash and double-quoting, since +backslash has special meaning within double quotes. +Pattern substitution performs the check for unquoted & after +expanding string; +shell programmers should quote any occurrences of & +they want to be taken literally in the replacement +and ensure any instances of & they want to be replaced are unquoted. +

+If the +nocasematch + +shell option is enabled, the match is performed without regard to the case +of alphabetic characters. If parameter @@ -3601,16 +4291,19 @@

Parameter Expansion

${parameter,pattern}
${parameter,,pattern}
-Case modification. +Case modification. This expansion modifies the case of alphabetic characters in parameter. The pattern is expanded to produce a pattern just as in pathname expansion. +Each character in the expanded value of parameter is tested against +pattern, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. 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.. +the first character in the expanded value. If pattern is omitted, it is treated like a ?, which matches every character. If @@ -3635,16 +4328,105 @@

Parameter Expansion

the case modification operation is applied to each member of the array in turn, and the expansion is the resultant list. +
${parameter@operator}
+Parameter transformation. +The expansion is either a transformation of the value of parameter +or information about parameter itself, depending on the value of +operator. Each operator is a single letter: +

+

+ +
+
U + +
+The expansion is a string that is the value of parameter with lowercase +alphabetic characters converted to uppercase. +
u + +
+The expansion is a string that is the value of parameter with the first +character converted to uppercase, if it is alphabetic. +
L + +
+The expansion is a string that is the value of parameter with uppercase +alphabetic characters converted to lowercase. +
Q + +
+The expansion is a string that is the value of parameter quoted in a +format that can be reused as input. +
E + +
+The expansion is a string that is the value of parameter with backslash +escape sequences expanded as with the $aq...aq quoting mechanism. +
P + +
+The expansion is a string that is the result of expanding the value of +parameter as if it were a prompt string (see PROMPTING below). +
A + +
+The expansion is a string in the form of +an assignment statement or declare command that, if +evaluated, will recreate parameter with its attributes and value. +
K + +
+Produces a possibly-quoted version of the value of parameter, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(see Arrays above). +
a + +
+The expansion is a string consisting of flag values representing +parameter's attributes. +
k + +
+Like the K transformation, but expands the keys and values of +indexed and associative arrays to separate words after word splitting. + +
+

+ +If +parameter + +is +@ + +or +*, + +the 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 operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+The result of the expansion is subject to word splitting and pathname +expansion as described below. +

+
 

Command Substitution

-

- Command substitution allows the output of a command to replace the command name. There are two forms: -

-

@@ -3660,8 +4442,8 @@

Command Substitution

Bash -performs the expansion by executing command and -replacing the command substitution with the standard output of the +performs the expansion by executing command in a subshell environment +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. @@ -3693,8 +4475,6 @@

Command Substitution

 

Arithmetic Expansion

-

- Arithmetic expansion allows the evaluation of an arithmetic expression and the substitution of the result. The format for arithmetic expansion is:

@@ -3708,10 +4488,13 @@

Arithmetic Expansion

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, string -expansion, command substitution, and quote removal. +undergoes the same expansions +as if it were within double quotes, +but double quote characters in expression are not treated specially +and are removed. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. Arithmetic expansions may be nested.

@@ -3729,32 +4512,32 @@

Arithmetic Expansion

 

Process Substitution

-

- -Process substitution is supported on systems that support named -pipes (FIFOs) or the /dev/fd method of naming open files. +Process substitution allows a process's input or output to be +referred to using a filename. 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 +The process list is run asynchronously, and its input or output +appears as a filename. +This filename is passed as an argument to the current command as the result of the -expansion. If the >(list) form is used, writing to +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. +Process substitution is supported on systems that support named +pipes (FIFOs) or the /dev/fd method of naming open files.

When available, process substitution is performed -simultaneously with parameter and variable expansion, +simultaneously with parameter and variable expansion, command substitution, and arithmetic expansion.  

Word Splitting

-

- The shell scans the results of parameter expansion, command substitution, @@ -3770,7 +4553,8 @@

Word Splitting

as a delimiter, and splits the results of the other -expansions into words on these characters. If +expansions into words using these characters as field terminators. +If IFS @@ -3800,10 +4584,12 @@

Word Splitting

has a value other than the default, then sequences of the whitespace characters -space +space, + +tab, and -tab +newline are ignored at the beginning and end of the word, as long as the whitespace character is in the @@ -3841,11 +4627,18 @@

Word Splitting

is null, no word splitting occurs.

-Explicit null arguments ("" or aqaq) are retained. +Explicit null arguments ("" or aqaq) are retained +and passed to commands as empty strings. 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. +null argument results and is retained +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +-daqaq becomes -d after word splitting and +null argument removal.

Note that if no expansion occurs, no splitting @@ -3853,8 +4646,6 @@

Word Splitting

 

Pathname Expansion

-

- After word splitting, unless the -f @@ -3870,18 +4661,23 @@

Pathname Expansion

and [. -If one of these characters appears, then the word is +If one of these characters appears, and is not quoted, 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 +filenames matching the pattern +(see +Pattern Matching + + +below). +If no matching filenames are found, +and the shell option +nullglob is not enabled, the word is left unchanged. -If the +If the nullglob option is set, and no matches are found, @@ -3905,12 +4701,40 @@

Pathname Expansion

dotglob is set. -When matching a pathname, the slash character must always be -matched explicitly. -In other cases, the +In order to match the filenames +``.'' + +and +``..'', + +the pattern must begin with ``.'' (for example, ``.?''), +even if +dotglob + +is set. +If the +globskipdots + +shell option is enabled, the filenames +``.'' + +and +``..'' + +are never matched, even if the pattern begins with a +``.''. + +When not matching pathnames, the ``.'' character is not treated specially. +When matching a pathname, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below under +Pattern Matching. + + See the description of shopt @@ -3923,6 +4747,8 @@

Pathname Expansion

nullglob, +globskipdots, + failglob, and @@ -3947,7 +4773,12 @@

Pathname Expansion

is removed from the list of matches. -The file names +If the nocaseglob option is set, the matching against the patterns in +GLOBIGNORE + + +is performed without regard to case. +The filenames ``.'' and @@ -3964,11 +4795,11 @@

Pathname Expansion

to a non-null value has the effect of enabling the dotglob -shell option, so all other file names beginning with a +shell option, so all other filenames beginning with a ``.'' will match. -To get the old behavior of ignoring file names beginning with a +To get the old behavior of ignoring filenames beginning with a ``.'', make @@ -3986,6 +4817,8 @@

Pathname Expansion

is unset. +The pattern matching honors the setting of the extglob shell +option.

Pattern Matching @@ -4003,6 +4836,7 @@

Pathname Expansion

+

* @@ -4024,7 +4858,7 @@

Pathname Expansion

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, +any character that falls between those two characters, inclusive, using the current locale's collating sequence and character set, is matched. If the first character following the [ @@ -4036,14 +4870,35 @@

Pathname Expansion

^ 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 +The sorting order of characters in range expressions, +and the characters included in the range, +are determined by +the current locale and the values of the LC_COLLATE -shell variable, -if set. -A +or +LC_ALL + + +shell variables, if set. +To obtain the traditional interpretation of range expressions, where +[a-d] + +is equivalent to +[abcd], + +set value of the +LC_ALL + +shell variable to +C, + +or enable the +globasciiranges + +shell option. +A - may be matched by including it as the first or last character @@ -4087,7 +4942,7 @@

Pathname Expansion

Within [ -and +and ], an equivalence class can be specified using the syntax @@ -4102,18 +4957,20 @@

Pathname Expansion

Within [ -and +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. +builtin, the shell recognizes several extended pattern matching operators. 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 @@ -4135,11 +4992,34 @@

Pathname Expansion

-  -

Quote Removal

+

+ +Theextglob option changes the behavior of the parser, since the +parentheses are normally treated as operators with syntactic meaning. +To ensure that extended matching patterns are parsed correctly, make sure +that extglob is enabled before parsing constructs containing the +patterns, including shell functions and command substitutions. +

+When matching filenames, the dotglob shell option determines +the set of filenames that are tested: +when dotglob is enabled, the set of filenames includes all files +beginning with ``.'', but ``.'' and ``..'' must be matched by a +pattern or sub-pattern that begins with a dot; +when it is disabled, the set does not +include any filenames beginning with ``.'' unless the pattern +or sub-pattern begins with a ``.''. +As above, ``.'' only has a special meaning when matching filenames.

+Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. +  +

Quote Removal

+ After the preceding expansions, all unquoted occurrences of the characters \, @@ -4156,8 +5036,13 @@

REDIRECTION

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 +Redirection allows commands' file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in the +current shell execution environment. +The following redirection operators may precede or appear anywhere within a simple command @@ -4172,9 +5057,14 @@

REDIRECTION

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 +than or equal to 10 and assign it to varname. +If >&- or <&- is preceded by {varname}, the value of varname defines the file descriptor to close. +If {varname} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. +The varredir_close shell option manages this behavior.

In the following descriptions, if the file descriptor number is @@ -4190,16 +5080,17 @@

REDIRECTION

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. +descriptions, unless otherwise noted, is subjected to +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, quote removal, +pathname 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, +Note that the order of redirections is significant. For example, the command

@@ -4209,7 +5100,7 @@

REDIRECTION

-directs both standard output and standard error to the file +directs both standard output and standard error to the file dirlist, while the command @@ -4231,7 +5122,10 @@

REDIRECTION

Bash handles several filenames specially when they are used in -redirections, as described in the following table: +redirections, as described in the following table. +If the operating system on which bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below.

@@ -4258,13 +5152,13 @@

REDIRECTION

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. +the corresponding TCP 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. +the corresponding UDP socket.
@@ -4279,8 +5173,6 @@

REDIRECTION

 

Redirecting Input

-

- Redirection of input causes the file whose name results from the expansion of word @@ -4304,8 +5196,6 @@

Redirecting Input

 

Redirecting Output

-

- Redirection of output causes the file whose name results from the expansion of word @@ -4358,8 +5248,6 @@

Redirecting Output

 

Appending Redirected Output

-

- Redirection of output in this fashion causes the file whose name results from the expansion of @@ -4381,13 +5269,9 @@

Appending Redirected Output

[n]>>word
-

-  

Redirecting Standard Output and Standard Error

-

- This construct allows both the standard output (file descriptor 1) and the standard error output (file descriptor 2) @@ -4422,11 +5306,13 @@

Redirecting Standard Output and Standard Error

+When using the second form, word may not expand to a number or +-. If it does, other redirection operators apply +(see Duplicating File Descriptors below) for compatibility +reasons.  

Appending Standard Output and Standard Error

-

- This construct allows both the standard output (file descriptor 1) and the standard error output (file descriptor 2) @@ -4452,11 +5338,12 @@

Appending Standard Output and Standard Error

>>word 2>&1
+

+ +(see Duplicating File Descriptors below).  

Here Documents

-

- This type of redirection instructs the shell to read input from the current source until a line containing only delimiter @@ -4464,7 +5351,7 @@

Here Documents

(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. +input (or file descriptor n if n is specified) for a command.

The format of here-documents is: @@ -4472,7 +5359,7 @@

Here Documents

-<<[-]word
+[n]<<[-]word
         here-document
 delimiter
 
@@ -4481,14 +5368,14 @@

Here Documents

-No parameter expansion, command substitution, arithmetic expansion, -or pathname expansion is performed on +No parameter and variable expansion, command substitution, +arithmetic expansion, or pathname expansion is performed on word. -If any characters in +If any part of word -are quoted, the +is quoted, the delimiter is the result of quote removal on @@ -4496,9 +5383,9 @@

Here Documents

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 +all lines of the here-document are subjected to +parameter expansion, command substitution, and arithmetic expansion, +the character sequence \<newline> is ignored, and @@ -4532,20 +5419,23 @@

Here Strings

-<<<word
+[n]<<<word
 

-The word is expanded and supplied to the command on its standard -input. +The word undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Pathname expansion and word splitting are not performed. +The result is supplied as a single string, with a newline appended, +to the command on its +standard input (or file descriptor n if n is specified).  

Duplicating File Descriptors

-

- The redirection operator

@@ -4599,14 +5489,22 @@

Duplicating File Descriptors

word do not specify a file descriptor open for output, a redirection error occurs. +If +word + +evaluates to +-, + +file descriptor +n + +is closed. As a special case, if n is omitted, and word does not -expand to one or more digits, the standard output and standard +expand to one or more digits or -, the standard output and standard error are redirected as described previously.  

Moving File Descriptors

-

- The redirection operator

@@ -4639,8 +5537,6 @@

Moving File Descriptors

 

Opening File Descriptors for Reading and Writing

-

- The redirection operator

@@ -4714,7 +5610,7 @@

ALIASES

There is no mechanism for using arguments in the replacement text. -If arguments are needed, a shell function should be used (see +If arguments are needed, use a shell function (see FUNCTIONS @@ -4740,9 +5636,10 @@

ALIASES

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 +always reads at least one complete line of input, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +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. @@ -4751,7 +5648,7 @@

ALIASES

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 +is itself a 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 @@ -4781,7 +5678,7 @@

FUNCTIONS

The special parameter # -is updated to reflect the change. Special parameter 0 +is updated to reflect the change. Special parameter 0 is unchanged. The first element of the FUNCNAME @@ -4793,7 +5690,7 @@

FUNCTIONS

All other aspects of the shell execution environment are identical between a function and its caller -with these exceptions: the +with these exceptions: the DEBUG @@ -4827,8 +5724,70 @@

FUNCTIONS

Variables local to the function may be declared with the local -builtin command. Ordinarily, variables and their values +builtin command (local variables). +Ordinarily, variables and their values are shared between the function and its caller. +If a variable is declared local, the variable's visible scope +is restricted to that function and its children (including the functions +it calls). +

+ +In the following description, the current scope is a currently- +executing function. +Previous scopes consist of that function's caller and so on, +back to the "global" scope, where the shell is not executing +any shell function. +Consequently, a local variable at the current scope is a variable +declared using the local or declare builtins in the +function that is currently executing. +

+ +Local variables "shadow" variables with the same name declared at +previous scopes. +For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. +

+ +The shell uses dynamic scoping to control a variable's visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. +

+ +For example, if a variable var is declared as local in function +func1, and func1 calls another function func2, +references to var made from within func2 will resolve to the +local variable var from func1, shadowing any global variable +named var. +

+ +The unset builtin also acts using the same dynamic scope: if a +variable is local to the current scope, unset will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +(appearing as unset) +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible +(see below how the localvar_unset shell option changes this behavior). +

+ +The FUNCNEST variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort.

If the builtin command @@ -4868,11 +5827,12 @@

FUNCTIONS

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 +Functions may be exported so that child shell processes +(those created when executing a separate shell invocation) automatically have them defined with the -f -option to the +option to the export builtin. @@ -4881,20 +5841,18 @@

FUNCTIONS

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.

-Functions may be recursive. No limit is imposed on the number -of recursive calls. +Functions may be recursive. +The FUNCNEST variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, no limit is imposed on the number of recursive calls.  

ARITHMETIC EVALUATION

The shell allows arithmetic expressions to be evaluated, under certain circumstances (see the let and declare builtin -commands and Arithmetic Expansion). +commands, the (( compound command, and Arithmetic Expansion). 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 @@ -4910,14 +5868,14 @@

ARITHMETIC EVALUATION

variable post-increment and post-decrement -
++id --id - -
-variable pre-increment and pre-decrement
- +
unary minus and plus +
++id --id + +
+variable pre-increment and pre-decrement
! ~
@@ -4992,17 +5950,21 @@

ARITHMETIC EVALUATION

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 +A shell variable need not have its integer attribute turned on to be used in an expression.

+Integer constants follow the C language definition, without suffixes or +character constants. 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 +Otherwise, numbers take the form [base#]n, where the optional 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, +When specifying n, +if a non-digit is required, +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 @@ -5018,7 +5980,17 @@

CONDITIONAL EXPRESSIONS

Conditional expressions are used by the [[ compound command and the test and [ builtin commands to test file attributes and perform string and arithmetic comparisons. +The test and [ commands determine their behavior based on +the number of arguments; see the descriptions of those commands for any +other command-specific actions. +

+ Expressions are formed from the following unary or binary primaries. +Bash handles several filenames specially when they are used in +expressions. +If the operating system on which bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with this behavior: If any 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 @@ -5031,8 +6003,9 @@

CONDITIONAL EXPRESSIONS

-When used with [[, The < and > operators sort +When used with [[, the < and > operators sort lexicographically using the current locale. +The test command sorts using ASCII ordering.

@@ -5103,10 +6076,6 @@

CONDITIONAL EXPRESSIONS

True if file exists and is executable. -
-O file - -
-True if file exists and is owned by the effective user id.
-G file
@@ -5115,27 +6084,31 @@

CONDITIONAL EXPRESSIONS

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. +
-O file + +
+True if file exists and is owned by the effective user id. +
-S file + +
+True if file exists and is a socket. +
file1 -ef file2
+True if file1 and file2 refer to the same device and +inode numbers.
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 +True if the shell option optname is enabled. @@ -5146,6 +6119,20 @@

CONDITIONAL EXPRESSIONS

set builtin below. +
-v varname + +
+True if the shell variable +varname + +is set (has been assigned a value). +
-R varname + +
+True if the shell variable +varname + +is set and is a name reference.
-z string
@@ -5166,6 +6153,8 @@

CONDITIONAL EXPRESSIONS

True if the strings are equal. = should be used with the test command for POSIX conformance. +When used with the [[ command, this performs pattern matching as +described above (Compound Commands).
string1 != string2
True if the strings are not equal.
string1 < string2
@@ -5201,13 +6190,25 @@

CONDITIONAL EXPRESSIONS

arg2 may be positive or negative integers. +When used with the [[ command, +Arg1 + +and +Arg2 + +are evaluated as arithmetic expressions (see +ARITHMETIC EVALUATION + + +above).
 

SIMPLE COMMAND EXPANSION

When a simple command is executed, the shell performs the following -expansions, assignments, and redirections, from left to right. +expansions, assignments, and redirections, from left to right, in +the following order.
1.
The words that the parser has marked as variable assignments (those @@ -5231,7 +6232,11 @@

SIMPLE COMMAND EXPANSION

If no command name results, the variable assignments affect the current -shell environment. Otherwise, the variables are added to the environment +shell environment. +In the case of such a command (one that consists only of assignment +statements and redirections), assignment statements are performed before +redirections. +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. @@ -5293,9 +6298,10 @@

COMMAND EXECUTION

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 +If that function exists, it is invoked in a separate execution environment +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. +exit status becomes the exit status of that subshell. If that function is not defined, the shell prints an error message and returns an exit status of 127.

@@ -5310,8 +6316,10 @@

COMMAND EXECUTION

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, a file -containing shell commands. A subshell is spawned to execute -it. This subshell reinitializes itself, so +containing shell commands, and the shell creates a +new instance of itself +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 @@ -5328,7 +6336,7 @@

COMMAND EXECUTION

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 +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 @@ -5338,7 +6346,6 @@

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 @@ -5376,8 +6383,8 @@

COMMAND EXECUTION ENVIRONMENT

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 following. +Unless otherwise noted, the values are inherited from the shell.
*
@@ -5397,7 +6404,10 @@

COMMAND EXECUTION ENVIRONMENT

A command invoked in this separate environment cannot affect the -shell's execution environment. +shell's execution environment. +

+ +A subshell is a copy of the shell process.

Command substitution, commands grouped with parentheses, @@ -5411,8 +6421,8 @@

COMMAND 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. +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 @@ -5426,7 +6436,7 @@

ENVIRONMENT

called the environment. -This is a list of +This is a list of name-value pairs, of the form name=value. @@ -5475,7 +6485,7 @@

ENVIRONMENT

by that command.

-If the +If the -k option is set (see the @@ -5494,23 +6504,21 @@

ENVIRONMENT

invokes an external command, the variable _ -is set to the full file name of the command and passed to that +is set to the full filename of the command and passed to that command in its environment.  

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 +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 +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, bash uses @@ -5528,8 +6536,13 @@

EXIT STATUS

Shell builtin commands return a status of 0 (true) if successful, and non-zero (false) if an error occurs -while they execute. -All builtins return an exit status of 2 to indicate incorrect usage. +while they execute. +All builtins return an exit status of 2 to indicate incorrect usage, +generally invalid options or missing arguments. +

+ +The exit status of the last command is available in the special +parameter $?.

Bash itself returns the exit status of the last command @@ -5614,14 +6627,14 @@

SIGNALS

To prevent the shell from sending the signal to a particular job, it should be removed from the -jobs table with the +jobs table with the disown builtin (see SHELL BUILTIN COMMANDS -below) or marked +below) or marked to not receive SIGHUP @@ -5639,7 +6652,7 @@

SIGNALS

bash -sends a +sends a SIGHUP @@ -5648,11 +6661,84 @@

SIGNALS

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. +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. +

+ +When job control is not enabled, and bash is waiting for a foreground +command to complete, the shell receives keyboard-generated signals +such as +SIGINT + + +(usually generated by ^C) that users commonly intend to send +to that command. +This happens because the shell and the command are in the +same process group as the terminal, and ^C sends +SIGINT + + +to all processes in that process group. +

+ +When bash is running without job control enabled and receives +SIGINT + + +while waiting for a foreground command, it waits until that foreground +command terminates and then decides what to do about the +SIGINT: + + +

+
1.
+If the command terminates due to the +SIGINT, + + +bash concludes +that the user meant to end the entire script, and acts on the +SIGINT + + +(e.g., by running a +SIGINT + + +trap or exiting itself); +
2.
+If the command does not terminate due to +SIGINT, + + +the program handled the +SIGINT + + +itself and did not treat it as a fatal signal. +In that case, bash does not treat +SIGINT + + +as a fatal signal, either, instead assuming that the +SIGINT + + +was used as part of the program's normal operation +(e.g., emacs uses it to abort editing +commands) or deliberately discarded. +However, bash will run any +trap set on +SIGINT, + + +as it does with any other trapped signal it +receives while it is waiting for the foreground command to +complete, for compatibility. +
 

JOB CONTROL

@@ -5720,11 +6806,11 @@

JOB CONTROL

terminal. Background processes which attempt to read from (write to when stty tostop is in effect) the -terminal are sent a +terminal are sent a SIGTTIN (SIGTTOU) -signal by the kernel's terminal driver, +signal by the kernel's terminal driver, which, unless caught, suspends the process.

@@ -5743,7 +6829,7 @@

JOB CONTROL

^Z, Control-Z) while a process is running -causes that process to be stopped and returns control to +causes that process to be stopped and returns control to bash. Typing the @@ -5788,9 +6874,10 @@

JOB CONTROL

%ce refers to a stopped -ce +job whose command name begins with +ce. -job. If a prefix matches more than one job, +If a prefix matches more than one job, bash reports an error. Using @@ -5813,7 +6900,7 @@

JOB CONTROL

which is the last job stopped while it was in the foreground or started in the background. -The +The previous job may be referenced using @@ -5854,7 +6941,7 @@

JOB CONTROL

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 +any other output. If the -b option to the @@ -5882,14 +6969,20 @@

JOB CONTROL

The jobs -command may then be used to inspect their status. +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. +

+ +When the shell is waiting for a job or process using the wait +builtin, and job control is enabled, wait will return when the +job changes state. The -f option causes wait to wait +until the job or process terminates before returning.  

PROMPTING

-When executing interactively, +When executing interactively, bash displays the primary prompt @@ -5903,6 +6996,21 @@

PROMPTING

when it needs more input to complete a command. Bash +displays +PS0 + + +after it reads a command but before executing it. +Bash + +displays +PS4 + + +as described above +before tracing each command when the -x option is enabled. +Bash + allows these prompt strings to be customized by inserting a number of backslash-escaped special characters that are decoded as follows:
@@ -5988,7 +7096,8 @@

PROMPTING

\w
-the current working directory, with +the value of the PWD shell variable ($PWD), +with $HOME @@ -6001,7 +7110,8 @@

PROMPTING

\W
-the basename of the current working directory, with +the basename of $PWD, +with $HOME @@ -6067,6 +7177,9 @@

PROMPTING

below). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion.  

READLINE

@@ -6077,7 +7190,7 @@

READLINE

option is given at shell invocation. Line editing is also used when using the -e option to the read builtin. -By default, the line editing commands are similar to those of emacs. +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 @@ -6106,15 +7219,13 @@

READLINE

 

Readline Notation

-

- -In this section, the emacs-style notation is used to denote +In this section, the Emacs-style notation is used to denote keystrokes. Control keys are denoted by C-key, e.g., C-n -means Control-N. Similarly, +means Control-N. Similarly, meta keys are denoted by M-key, so M-x means Meta-X. (On keyboards -without a +without a meta key, M-x means ESC x, i.e., press the Escape key @@ -6137,7 +7248,7 @@

Readline Notation

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., kill-line) causes that command to act in a -backward direction. +backward direction. Commands whose behavior with arguments deviates from this are noted below.

@@ -6146,14 +7257,12 @@

Readline Notation

deleted is saved for possible future retrieval (yanking). The killed text is saved in a kill ring. Consecutive kills cause the text to be -accumulated into one unit, which can be yanked all at once. +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.  

Readline Initialization

-

- Readline is customized by putting commands in an initialization file (the inputrc file). The name of this file is taken from the value of the @@ -6163,6 +7272,9 @@

Readline Initialization

variable. 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 initialization file is read, and the key bindings and variables are set. @@ -6175,7 +7287,7 @@

Readline Initialization

The default key-bindings may be changed with an -inputrc +inputrc file. Other programs that use this library may add their own commands @@ -6194,7 +7306,7 @@

Readline Initialization

C-Meta-u: universal-argument
-into the +into the inputrc would make M-C-u execute the readline command @@ -6231,14 +7343,12 @@

Readline Initialization

 

Readline Key Bindings

-

- The syntax for controlling key bindings in the 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: +it should be bound. The name may be specified in one of two ways: as a symbolic key name, possibly with Meta- or Control- prefixes, or as a key sequence.

@@ -6316,7 +7426,7 @@

Readline Key Bindings

is bound to the function re-read-init-file, -and +and ESC [ 1 1 ~ is bound to insert the text @@ -6438,8 +7548,6 @@

Readline Key Bindings

 

Readline Variables

-

- Readline has variables that can be used to further customize its behavior. A variable may be set in the inputrc @@ -6451,6 +7559,11 @@

Readline Variables

set variable-name value
+or using the bind builtin command (see +SHELL BUILTIN COMMANDS + + +below).

Except where noted, readline variables can take the values @@ -6469,6 +7582,32 @@

Readline Variables

+
active-region-start-color + +
+A string variable that controls the text color and background when displaying +the text in the active region (see the description of +enable-active-region below). +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal before displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that puts the terminal in standout mode, +as obtained from the terminal's terminfo description. +A sample value might be "\e[01;33m". +
active-region-end-color + +
+A string variable that "undoes" the effects of active-region-start-color +and restores "normal" terminal display appearance after displaying text +in the active region. +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal after displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that restores the terminal from standout mode, +as obtained from the terminal's terminfo description. +A sample value might be "\e[0m".
bell-style (audible)
@@ -6482,6 +7621,28 @@

Readline Variables

If set to On, readline attempts to bind the control characters treated specially by the kernel's terminal driver to their readline equivalents. +
blink-matching-paren (Off) + +
+If set to On, readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. +
colored-completion-prefix (Off) + +
+If set to On, when listing completions, readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the LS_COLORS +environment variable. +If there is a color definition in $LS_COLORS for the custom suffix +"readline-colored-completion-prefix", readline uses this color for +the common prefix instead of its default. +
colored-stats (Off) + +
+If set to On, readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the LS_COLORS +environment variable.
comment-begin (``#'')
@@ -6496,11 +7657,26 @@

Readline Variables

# in vi command mode. +
completion-display-width (-1) + +
+The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is -1.
completion-ignore-case (Off)
If set to On, readline performs filename matching and completion in a case-insensitive fashion. +
completion-map-case (Off) + +
+If set to On, and completion-ignore-case is enabled, readline +treats hyphens (-) and underscores (_) as equivalent when +performing case-insensitive filename matching and completion.
completion-prefix-display-length (0)
@@ -6514,11 +7690,13 @@

Readline Variables

This determines when the user is queried about viewing the number of possible completions generated by the possible-completions 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. +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, +readline will ask whether or not the user wishes to view them; +otherwise they are simply listed on the terminal. +A zero value means readline should never ask; negative values are +treated as zero.
convert-meta (On)
@@ -6526,17 +7704,27 @@

Readline Variables

eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing an escape character (in effect, using escape as the meta prefix). +The default is On, but readline will set it to Off if the +locale contains eight-bit characters. +This variable is dependent on the LC_CTYPE locale category, and +may change if the locale is changed.
disable-completion (Off)
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. +
echo-control-characters (On) + +
+When set to On, on operating systems that indicate they support it, +readline echoes a character corresponding to a signal generated from the +keyboard.
editing-mode (emacs)
Controls whether readline begins with a set of key bindings similar -to emacs or vi. +to Emacs or vi. editing-mode can be set to either @@ -6545,12 +7733,39 @@

Readline Variables

or vi. -
echo-control-characters (On) - -
-When set to On, on operating systems that indicate they support it, -readline echoes a character corresponding to a signal generated from the -keyboard. +
emacs-mode-string (@) + +
+If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \1 and \2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +
enable-active-region (On) + +
+The point is the current cursor position, and mark refers +to a saved cursor position. +The text between the point and mark is referred to as the region. +When this variable is set to On, readline allows certain commands +to designate the region as active. +When the region is active, readline highlights the text in the region using +the value of the active-region-start-color, which defaults to the +string that enables +the terminal's standout mode. +The active region shows the text inserted by bracketed-paste and any +matching text found by incremental and non-incremental history searches. +
enable-bracketed-paste (On) + +
+When set to On, readline configures the terminal to insert each +paste into the editing buffer as a single string of characters, instead +of treating each character as if it had been read from the keyboard. +This prevents readline from executing any editing commands bound to key +sequences appearing in the pasted text.
enable-keypad (Off)
@@ -6566,34 +7781,46 @@

Readline Variables

expand-tilde (Off)
-If set to on, tilde expansion is performed when readline +If set to On, tilde expansion is performed when readline attempts word completion.
history-preserve-point (Off)
-If set to on, the history code attempts to place point at the +If set to On, the history code attempts to place point at the same location on each history line retrieved with previous-history or next-history. -
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. +
history-size (unset) + +
+Set the maximum number of history entries saved in the history list. +If set to zero, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is set to the value of the +HISTSIZE shell variable. +If an attempt is made to set history-size to a non-numeric value, +the maximum number of history entries will be set to 500.
horizontal-scroll-mode (Off)
When set to On, 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. +This setting is automatically enabled for terminals of height 1.
input-meta (Off)
If set to On, readline will enable eight-bit input (that is, -it will not strip the high bit from the characters it reads), +it will not strip the eighth bit from the characters it reads), regardless of what the terminal claims it can support. The name meta-flag is a synonym for this variable. +The default is Off, but readline will set it to On if the +locale contains eight-bit characters. +This variable is dependent on the LC_CTYPE locale category, and +may change if the locale is changed.
isearch-terminators (``C-[C-J'')
@@ -6617,6 +7844,20 @@

Readline Variables

editing-mode also affects the default keymap. +
keyseq-timeout (500) + +
+Specifies the duration readline will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, readline will use the shorter +but complete key sequence. +The value is specified in milliseconds, so a value of 1000 means that +readline will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, readline will wait until another key is pressed to +decide which key sequence to complete.
mark-directories (On)
@@ -6637,15 +7878,26 @@

Readline Variables

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 +names begin with a `.' (hidden files) when performing filename +completion. +If set to Off, the leading `.' must be supplied by the user in the filename to be completed. +
menu-complete-display-prefix (Off) + +
+If set to On, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list.
output-meta (Off)
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, but readline will set it to On if the +locale contains eight-bit characters. +This variable is dependent on the LC_CTYPE locale category, and +may change if the locale is changed.
page-completions (On)
@@ -6659,7 +7911,7 @@

Readline Variables

revert-all-at-newline (Off)
-If set to on, readline will undo all changes to history lines +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. @@ -6668,7 +7920,7 @@

Readline Variables

This alters the default behavior of the completion functions. If set to -on, +On, words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell. @@ -6678,12 +7930,18 @@

Readline Variables

This alters the default behavior of the completion functions in a fashion similar to show-all-if-ambiguous. If set to -on, +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. +
show-mode-in-prompt (Off) + +
+If set to On, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., emacs-mode-string).
skip-completed-text (Off)
@@ -6693,6 +7951,30 @@

Readline Variables

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. +
vi-cmd-mode-string ((cmd)) + +
+If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \1 and \2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +
vi-ins-mode-string ((ins)) + +
+If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the \1 and \2 escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string.
visible-stats (Off)
@@ -6704,21 +7986,20 @@

Readline Variables

 

Readline Conditional 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 +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. +readline. The text of the test, after any comparison operator, +
 extends to the end of the line; +unless otherwise noted, no characters are required to isolate it.
mode
@@ -6734,7 +8015,7 @@

Readline Conditional Constructs

terminal's function keys. The word on the right side of the = -is tested against the both full name of the terminal and the portion +is tested against both the full name of the terminal and the portion of the terminal name before the first -. This allows sun @@ -6745,14 +8026,41 @@

Readline Conditional Constructs

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 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: +
version
+The version test may be used to perform comparisons against +specific readline versions. +The version expands to the current readline version. +The set of comparison operators includes +=, + +(and +==), + +!=, + +<=, + +>=, + +<, + +and +>. + +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., 7.1). If the minor version is omitted, it +is assumed to be 0. +The operator may be separated from the string version +and from the version number argument by whitespace. +
application
+The application construct is used to include +application-specific settings. Each program using the readline +library sets the application name, 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:

@@ -6764,6 +8072,15 @@ 

Readline Conditional Constructs

+
variable
+The variable construct provides simple equality tests for readline +variables and values. +The permitted comparison operators are =, ==, and !=. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values on and off.
$endif
@@ -6788,8 +8105,6 @@

Readline Conditional Constructs

 

Searching

-

- Readline provides commands for searching through the command history (see HISTORY @@ -6841,8 +8156,6 @@

Searching

 

Readline Command Names

-

- 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. @@ -6853,8 +8166,6 @@

Readline Command Names

 

Commands for Moving

-

-

beginning-of-line (C-a) @@ -6893,10 +8204,33 @@

Commands for Moving

Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters. +
previous-screen-line + +
+Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. +
next-screen-line + +
+Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +readline line does not take up more than one physical line or if the length +of the current readline line is not greater than the length of the prompt +plus the screen width. +
clear-display (M-C-l) + +
+Clear the screen and, if possible, the terminal's scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen.
clear-screen (C-l)
-Clear the screen leaving the current line at the top of the screen. +Clear the screen, +then redraw the current line, +leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen.
redraw-current-line @@ -6908,8 +8242,6 @@

Commands for Moving

 

Commands for Manipulating the History

-

-

accept-line (Newline, Return) @@ -6941,6 +8273,19 @@

Commands for Manipulating the History

Move to the end of the input history, i.e., the line currently being entered. +
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. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. +
fetch-history + +
+With a numeric argument, fetch that entry from the history list +and make it the current line. +Without an argument, move back to the first entry in the history list.
reverse-search-history (C-r)
@@ -6973,6 +8318,21 @@

Commands for Manipulating the History

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. +
history-substring-search-backward + +
+Search backward through the history for the string of characters +between the start of the current line and the current cursor +position (the point). +The search string may match anywhere in a history line. +This is a non-incremental search. +
history-substring-search-forward + +
+Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search.
yank-nth-arg (M-C-y)
@@ -6990,11 +8350,15 @@

Commands for Manipulating the History

Insert the last argument to the previous command (the last word of -the previous history entry). With an argument, -behave exactly like yank-nth-arg. +the previous history entry). +With a numeric 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, +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). +The history expansion facilities are used to extract the last word, as if the "!$" history expansion had been specified.
shell-expand-line (M-C-e) @@ -7041,13 +8405,7 @@

Commands for Manipulating the History

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) +
edit-and-execute-command (C-x C-e)
Invoke an editor on the current command line, and execute the result as shell @@ -7065,20 +8423,27 @@

Commands for Manipulating the History

 

Commands for Changing Text

-

-

-
delete-char (C-d) +
end-of-file (usually 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 +The character indicating end-of-file as set, for example, by +stty. + +If this character is read when there are no characters +on the line, and point is at the beginning of the line, readline +interprets it as the end of input and returns EOF. +
delete-char (C-d) + +
+Delete the character at point. +If this function is bound to the +same character as the tty EOF character, as C-d +commonly is, see above for the effects.
backward-delete-char (Rubout)
@@ -7117,7 +8482,7 @@

Commands for Changing Text

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. +the last two words on the line.
upcase-word (M-u)
@@ -7141,7 +8506,7 @@

Commands for Changing Text

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 +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. @@ -7150,8 +8515,6 @@

Commands for Changing Text

 

Killing and Yanking

-

-

kill-line (C-k) @@ -7172,7 +8535,7 @@

Killing and Yanking

Kill all characters on the current line, no matter where point is. -
kill-word (M-d) +
kill-word (M-d)
Kill from point to the end of the current word, or if between @@ -7183,13 +8546,13 @@

Killing and Yanking

Kill the word behind point. Word boundaries are the same as those used by backward-word. -
shell-kill-word (M-d) +
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 those used by shell-forward-word. -
shell-backward-kill-word (M-Rubout) +
shell-backward-kill-word
Kill the word behind point. @@ -7245,8 +8608,6 @@

Killing and Yanking

 

Numeric Arguments

-

-

digit-argument (M-0, M-1, ..., M--) @@ -7265,7 +8626,7 @@

Numeric Arguments

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 +character that is neither a digit nor 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 @@ -7275,8 +8636,6 @@

Numeric Arguments

 

Completing

-

-

complete (TAB) @@ -7315,7 +8674,7 @@

Completing

through the list. This command is intended to be bound to TAB, but is unbound by default. -
menu-complete-rd +
menu-complete-backward
Identical to menu-complete, but moves backward through the list @@ -7406,8 +8765,6 @@

Completing

 

Keyboard Macros

-

-

start-kbd-macro (C-x () @@ -7424,13 +8781,16 @@

Keyboard Macros

Re-execute the last keyboard macro defined, by making the characters in the macro appear as if typed at the keyboard. +
print-last-kbd-macro () + +
+Print the last keyboard macro defined in a format suitable for the +inputrc file.
 

Miscellaneous

-

-

re-read-init-file (C-x C-r) @@ -7445,11 +8805,12 @@

Miscellaneous

ring the terminal's bell (subject to the setting of bell-style). -
do-uppercase-version (M-a, M-b, M-x, ...) +
do-lowercase-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. +If the metafied character x is uppercase, run the command +that is bound to the corresponding metafied lowercase character. +The behavior is undefined if x is already lowercase.
prefix-meta (ESC)
@@ -7491,13 +8852,13 @@

Miscellaneous

A character is read and point is moved to the next occurrence of that -character. A negative count searches for previous occurrences. +character. A negative argument 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 () +character. A negative argument searches for subsequent occurrences. +
skip-csi-sequence
Read enough characters to consume a multi-key sequence such as those @@ -7514,10 +8875,10 @@

Miscellaneous

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 +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 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 @@ -7525,17 +8886,23 @@

Miscellaneous

a shell comment. If a numeric argument causes the comment character to be removed, the line will be executed by the shell. +
spell-correct-word (C-x s) + +
+Perform spelling correction on the current word, treating it as a directory +or filename, in the same way as the cdspell shell option. +Word boundaries are the same as those used by shell-forward-word.
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. +generate a list of matching filenames 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. +and the list of matching filenames is inserted, replacing the word. If a numeric argument is supplied, an asterisk is appended before pathname expansion.
glob-list-expansions (C-x g) @@ -7579,8 +8946,6 @@

Miscellaneous

 

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 (see @@ -7600,8 +8965,11 @@

Programmable Completion

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 +If those searches do not result in a compspec, any compspec defined with the -D option to complete is used as the default. +If there is no default compspec, bash attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion.

Once a compspec has been found, it is used to generate the list of @@ -7653,7 +9021,7 @@

Programmable Completion

Each word is then expanded using brace expansion, tilde expansion, parameter and variable expansion, command substitution, and arithmetic expansion, -as described above under +as described above under EXPANSION. @@ -7681,7 +9049,7 @@

Programmable Completion

variables are assigned values as described above under Shell Variables. -If a shell function is being invoked, the +If a shell function is being invoked, the COMP_WORDS @@ -7690,10 +9058,12 @@

Programmable Completion

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. +When the function or command is invoked, +the first argument ($1) is the name of the command whose arguments are +being completed, +the second argument ($2) is the word being completed, +and the third argument ($3) 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. @@ -7706,7 +9076,7 @@

Programmable Completion

COMPREPLY -array variable. +array variable, one per array element.

Next, any command specified with the -C option is invoked @@ -7725,6 +9095,11 @@

Programmable Completion

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. +If the +nocasematch + +shell option is enabled, the match is performed without regard to the case +of alphabetic characters.

Finally, any prefix and suffix specified with the -P and -S @@ -7758,7 +9133,7 @@

Programmable Completion

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 +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.

@@ -7772,7 +9147,7 @@

Programmable Completion

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 +attempt to find a new 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.

@@ -7794,7 +9169,7 @@

Programmable Completion

}
-complete -D -F _completion_loader +complete -D -F _completion_loader -o bashdefault -o default
@@ -7852,15 +9227,17 @@

HISTORY

HISTFILESIZE. +If HISTFILESIZE is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated. When the history file is read, lines beginning with the history comment character followed immediately -by a digit are interpreted as timestamps for the preceding history line. +by a digit are interpreted as timestamps for the following history line. These timestamps are optionally displayed depending on the value of the HISTTIMEFORMAT variable. -When an interactive shell exits, the last +When a shell with history enabled exits, the last $HISTSIZE @@ -7905,7 +9282,8 @@

HISTORY

HISTFILESIZE -is not set, no truncation is performed. +is unset, or set to null, a non-numeric value, +or a numeric value less than zero, the history file is not truncated.

The builtin command @@ -7959,11 +9337,9 @@

HISTORY

 

HISTORY EXPANSION

-

- The shell supports a history expansion feature that is similar to the history expansion in -csh. +csh. This section describes what syntax features are available. This feature is enabled by default for interactive shells, and can be @@ -7988,7 +9364,9 @@

HISTORY EXPANSION

History expansion is performed immediately after a complete line -is read, before the shell breaks it into words. +is read, before the shell breaks it into words, and is performed +on each line individually without taking quoting on previous lines into +account. It takes place in two parts. The first is to determine which line from the history list to use during substitution. @@ -8003,7 +9381,9 @@

HISTORY EXPANSION

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. +the history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string.

Several characters inhibit history expansion if found immediately @@ -8075,10 +9455,10 @@

HISTORY EXPANSION

 

Event Designators

-

- An event designator is a reference to a command line entry in the history list. +Unless the reference is absolute, events are relative to the current +position in the history list.

@@ -8101,7 +9481,7 @@

Event Designators

!-n
-Refer to the current command line minus +Refer to the current command minus n.
!! @@ -8111,30 +9491,34 @@

Event Designators

!string
-Refer to the most recent command starting with +Refer to the most recent command preceding the current position in the +history list starting with string.
!?string[?]
-Refer to the most recent command containing +Refer to the most recent command preceding the current position in the +history list containing string. The trailing ? may be omitted if string is followed immediately by a newline. +If string is missing, the string from the most recent search is used; +it is an error if there is no previous search string.
^string1^string2^
-Quick substitution. Repeat the last command, replacing +Quick substitution. Repeat the previous command, replacing string1 with string2. Equivalent to -``!!:s/string1/string2/'' +``!!:s^string1^string2^'' (see Modifiers below).
!# @@ -8145,10 +9529,8 @@

Event Designators

 

Word Designators

-

- Word designators are used to select desired words from the event. -A +A : separates the event specification from the word designator. @@ -8187,11 +9569,13 @@

Word Designators

$
-The last argument. +The last word. This is usually the last argument, but will expand to the +zeroth word if there is only one word in the line.
%
-The word matched by the most recent `?string?' search. +The first word matched by the most recent `?string?' search, +if the search string begins with a character that is part of a word.
x-y
@@ -8213,6 +9597,7 @@

Word Designators

Abbreviates x-$ like x*, but omits the last word. +If x is missing, it defaults to 0.

@@ -8222,24 +9607,21 @@

Word Designators

 

Modifiers

-

- After the optional word designator, there may appear a sequence of one or more of the following modifiers, each preceded by a `:'. +These modify, or edit, the word or words selected from the history event.

-

-

h
-Remove a trailing file name component, leaving only the head. +Remove a trailing filename component, leaving only the head.
t
-Remove all leading file name components, leaving the tail. +Remove all leading filename components, leaving the tail.
r
@@ -8267,6 +9649,8 @@

Modifiers

blanks and newlines. +The q and x modifiers are mutually exclusive; the last one +supplied is used.
s/old/new/
@@ -8276,9 +9660,11 @@

Modifiers

for the first occurrence of 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 +in the event line. +Any character may be used as the delimiter in place of /. +The final delimiter is optional if it is the last character of the +event line. +The delimiter may be quoted in old and @@ -8290,7 +9676,8 @@

Modifiers

it is replaced by old. -A single backslash will quote the &. If +A single backslash will quote the &. +If old is null, it is set to the last @@ -8304,6 +9691,13 @@

Modifiers

!?string[?] search. +If +new + +is null, each matching +old + +is deleted.
&
@@ -8321,7 +9715,8 @@

Modifiers

G
-Apply the following `s' modifier once to each word in the event line. +Apply the following `s' or `&' modifier once to each word +in the event line.
  @@ -8339,9 +9734,10 @@

SHELL BUILTIN COMMANDS

-- to signify the end of the options. -The :, true, false, and test builtins +The :, true, false, and test/[ builtins do not accept options and do not treat -- specially. -The exit, logout, break, continue, let, +The exit, logout, return, +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 @@ -8356,7 +9752,8 @@

SHELL BUILTIN COMMANDS

arguments and performing any specified -redirections. A zero exit code is returned. +redirections. +The return status is zero.
. filename [arguments]
source filename [arguments]
@@ -8372,20 +9769,21 @@

SHELL BUILTIN COMMANDS

If filename -does not contain a slash, file names in +does not contain a slash, filenames in PATH are used to find the directory containing -filename. +filename, +but filename does not need to be executable. The file searched for in PATH need not be executable. -When bash is not in posix mode, the current directory is -searched if no file is found in +When bash is not in posix mode, it searches +the current directory if no file is found in PATH. @@ -8403,6 +9801,12 @@

SHELL BUILTIN COMMANDS

If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. +If the -T option is enabled, . inherits any trap on +DEBUG; if it is not, any DEBUG trap string is saved and +restored around the call to ., and . unsets the +DEBUG trap while it executes. +If -T is not set, and the sourced file changes +the DEBUG trap, the new value is retained when . completes. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename @@ -8416,7 +9820,7 @@

SHELL BUILTIN COMMANDS

alias name=value on standard output. When arguments are supplied, an alias is defined for each name whose value is given. -A trailing space in value causes the next word to be +A trailing space in value causes the next word to be checked for alias substitution when the alias is expanded. For each name in the argument list for which no value is supplied, the name and value of the alias is printed. @@ -8438,13 +9842,14 @@

SHELL BUILTIN COMMANDS

returns 0 unless run when job control is disabled or, when run with job control enabled, any specified jobspec was not found or was started without job control. -
bind [-m keymap] [-lpsvPSV]
+
bind [-m keymap] [-lpsvPSVX]
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
+
bind [-m keymap] keyseq:readline-command
+
bind readline-command-line
Display current readline @@ -8456,7 +9861,10 @@

SHELL BUILTIN COMMANDS

readline variable. -Each non-option argument is a command as it would appear in +Each non-option argument is a command as it would appear in a +readline + +initialization file such as .inputrc, but each binding or command must be passed as a separate argument; @@ -8480,7 +9888,8 @@

SHELL BUILTIN COMMANDS

vi-move, vi-command, and vi-insert. -vi is equivalent to vi-command; emacs is +vi is equivalent to vi-command (vi-move is also +a synonym); emacs is equivalent to emacs-standard.
-l @@ -8543,16 +9952,35 @@

SHELL BUILTIN COMMANDS

READLINE_POINT -variable to the current location of the insertion point. -If the executed command changes the value of -READLINE_LINE +and +READLINE_MARK + + +variables to the current location of the insertion point and the saved +insertion point (the mark), respectively. +The shell assigns any numeric argument the user supplied to the +READLINE_ARGUMENT + + +variable. +If there was no argument, that variable is not set. +If the executed command changes the value of any of +READLINE_LINE, -or READLINE_POINT, + +or +READLINE_MARK, + those new values will be reflected in the editing state. +
-X + +
+List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input.

@@ -8596,10 +10024,10 @@

SHELL BUILTIN COMMANDS

is not a shell builtin command.
caller [expr]
Returns the context of any active subroutine call (a shell function or -a script executed with the . or source builtins. +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 +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 @@ -8607,22 +10035,25 @@

SHELL BUILTIN COMMANDS

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. -
cd [-L|-P] [dir]
-Change the current directory to dir. The variable +
cd [-L|[-P [-e]] [-@]] [dir]
+Change the current directory to dir. +if dir is not supplied, the value of the HOME -is the -default -dir. - +shell variable is the default. The variable CDPATH defines the search path for the directory containing -dir. +dir: + +each directory name in +CDPATH + +is searched for dir. Alternative directory names in CDPATH @@ -8639,11 +10070,12 @@

SHELL BUILTIN COMMANDS

CDPATH -is not used. The +is not used. The -P -option says to use the physical directory structure instead of -following symbolic links (see also the +option causes cd to use the physical directory structure +by resolving symbolic links while traversing dir and +before processing instances of .. in dir (see also the -P option to the @@ -8652,13 +10084,30 @@

SHELL BUILTIN COMMANDS

builtin command); the -L -option forces symbolic links to be followed. An argument of +option forces symbolic links to be followed by resolving the link +after processing instances of .. in dir. +If .. appears in dir, it is processed by removing the +immediately previous pathname component from dir, back to a slash +or the beginning of dir. +If the +-e + +option is supplied with +-P, + +and the current working directory cannot be successfully determined +after a successful directory change, cd will return an unsuccessful +status. +On systems that support it, the -@ option presents the extended +attributes associated with a file as a directory. +An argument of - -is equivalent to -$OLDPWD. +is converted to +$OLDPWD +before the directory change is attempted. If a non-empty directory name from CDPATH @@ -8667,6 +10116,10 @@

SHELL BUILTIN COMMANDS

- is the first argument, and the directory change is successful, the absolute pathname of the new working directory is written to the standard output. +If the directory change is successful, cd sets the value of the +PWD environment variable to the new directory name, and sets the +OLDPWD environment variable to the value of the current working +directory before the change. The return value is true if the directory was successfully changed; false otherwise.
command [-pVv] command [arg ...]
@@ -8676,8 +10129,8 @@

SHELL BUILTIN COMMANDS

with args -suppressing the normal shell function lookup. Only builtin -commands or commands found in the +suppressing the normal shell function lookup. +Only builtin commands or commands found in the PATH @@ -8704,7 +10157,7 @@

SHELL BUILTIN COMMANDS

is printed. The -v -option causes a single word indicating the command or file name +option causes a single word indicating the command or filename used to invoke command @@ -8750,12 +10203,12 @@

SHELL BUILTIN COMMANDS

The return value is true unless an invalid option is supplied, or no matches were generated. -

complete [-abcdefgjksuv] [-o comp-option] [-DE] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command]
+
complete [-abcdefgjksuv] [-o comp-option] [-DEI] [-A action] [-G globpat] [-W wordlist]

-[-X filterpat] [-P prefix] [-S suffix] name [name ...] +[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] name [name ...] -
complete -pr [-DE] [name ...]
+
complete -pr [-DEI] [name ...]
Specify how arguments to each name should be completed. If the -p option is supplied, or if no options are supplied, @@ -8764,15 +10217,26 @@

SHELL BUILTIN COMMANDS

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 +The -D option indicates that other supplied 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 +The -E option indicates that other supplied options and actions should apply to ``empty'' command completion; that is, completion attempted on a blank line. +The -I option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after +a command delimiter such as ; or |, which is usually command +name completion. +If multiple options are supplied, the -D option takes precedence +over -E, and both take precedence over -I. +If any of -D, -E, or -I are supplied, any other +name arguments are ignored; these completions only apply to the case +specified by the option.

The process of applying these completion specifications when word completion -is attempted is described above under Programmable Completion. +is attempted is described + +above under Programmable Completion.

Other options, if specified, have the following meanings. The arguments to the -G, -W, and -X options @@ -8811,6 +10275,15 @@

SHELL BUILTIN COMMANDS

filename-specific processing (like adding a slash to directory names, quoting special characters, or suppressing trailing spaces). Intended to be used with shell functions. +
noquote + +
+Tell readline not to quote the completed words if they are filenames +(quoting filenames is the default). +
nosort + +
+Tell readline not to sort the list of possible completions alphabetically.
nospace
@@ -8819,7 +10292,7 @@

SHELL BUILTIN COMMANDS

plusdirs
-After any matches defined by the compspec are generated, +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.
@@ -8931,29 +10404,49 @@

SHELL BUILTIN COMMANDS

Names of all shell variables. May also be specified as -v.
-
-G globpat
-The pathname 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. +Arguments are passed as with the -F option.
-F function
The shell function function is executed in the current shell environment. +When the function is executed, +the first argument ($1) is the name of the command whose arguments are +being completed, +the second argument ($2) is the word being completed, +and the third argument ($3) is the word preceding the word being +completed on the current command line. When it finishes, the possible completions are retrieved from the value of the COMPREPLY array variable. +
-G globpat
+The pathname expansion pattern globpat is expanded to generate +the possible completions. +
-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. +
-W wordlist
+The wordlist is split using the characters in the +IFS + + +special variable as delimiters, and each resultant word is expanded. +Shell quoting is honored within wordlist, +in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of +IFS. + + +The possible completions are the members of the resultant list which +match the word being completed.
-X filterpat
filterpat is a pattern as used for pathname expansion. It is applied to the list of possible completions generated by the @@ -8961,12 +10454,6 @@

SHELL BUILTIN COMMANDS

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.

@@ -8978,27 +10465,28 @@

SHELL BUILTIN COMMANDS

an error occurs adding a completion specification.
-
compopt [-o option] [-DE] [+o option] [name]
+
compopt [-o option] [-DEI] [+o option] [name]
Modify completion options for each name according to the options, or for the -currently-execution completion if no names are supplied. +currently-executing 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 +The -D option indicates that other supplied 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 +The -E option indicates that other supplied options should apply to ``empty'' command completion; that is, completion attempted on a blank line. -
+The -I option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, +or after a command delimiter such as ; or |, which is usually +command name completion.

- 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. -

continue [n]
Resume the next iteration of the enclosing for, @@ -9023,9 +10511,9 @@

SHELL BUILTIN COMMANDS

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. -
declare [-aAfFilrtux] [-p] [name[=value] ...]
+
declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]
-
typeset [-aAfFilrtux] [-p] [name[=value] ...]
+
typeset [-aAfFgiIlnrtux] [-p] [name[=value] ...]
Declare variables and/or give them attributes. If no names are given then display the values of variables. @@ -9038,7 +10526,8 @@

SHELL BUILTIN COMMANDS

When -p -is used with name arguments, additional options are ignored. +is used with name arguments, additional options, +other than -f and -F, are ignored. When -p @@ -9054,13 +10543,27 @@

SHELL BUILTIN COMMANDS

option inhibits the display of function definitions; only the function name and attributes are printed. If the extdebug shell option is enabled using shopt, -the source file name and line number where the function is defined -are displayed as well. The +the source file name and line number where each name +is defined are displayed as well. The -F option implies -f. +The +-g + +option forces variables to be created or modified at the global scope, +even when declare is executed in a shell function. +It is ignored in all other cases. +The +-I + +option causes local variables to inherit the attributes +(except the nameref attribute) +and value of any existing variable with the same +name at a surrounding scope. +If there is no existing variable, the local variable is initially unset. The following options can be used to restrict output to variables with the specified attribute or to give variables attributes: @@ -9073,6 +10576,7 @@

SHELL BUILTIN COMMANDS

Each name is an indexed array variable (see Arrays + above).
-A @@ -9080,6 +10584,7 @@

SHELL BUILTIN COMMANDS

Each name is an associative array variable (see Arrays + above).
-f @@ -9092,13 +10597,26 @@

SHELL BUILTIN COMMANDS

ARITHMETIC EVALUATION -above) is performed when the variable is assigned a value. + +above) +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. +
-n + +
+Give each name the nameref attribute, making +it a name reference to another variable. +That other variable is defined by the value of name. +All references, assignments, and attribute modifications +to name, except those using or changing the +-n attribute itself, are performed on the variable referenced by +name's value. +The nameref attribute cannot be applied to array variables.
-r
@@ -9127,17 +10645,26 @@

SHELL BUILTIN COMMANDS

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 +with the exceptions that +a and +A +may not be used to destroy array variables and +r will not remove the readonly attribute. When used in a function, -makes each -name local, as with the +declare + +and +typeset + +make each +name local, as with the local -command. +command, +unless the -g option is supplied. If a variable name is followed by =value, the value of the variable is set to value. +When using -a or -A and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. The return value is 0 unless an invalid option is encountered, an attempt is made to define a function using @@ -9147,40 +10674,31 @@

SHELL BUILTIN COMMANDS

using the compound assignment syntax (see Arrays -above), one of the names is not a valid shell variable name, + +above), +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.
-
dirs [+n] [-n] [-cplv] +
dirs [-clpv] [+n] [-n]
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 +Directories are added to the list with the pushd command; the popd command removes entries from the list. +The current directory is always the first directory in the stack.
-
+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.
-c
@@ -9188,8 +10706,8 @@

SHELL BUILTIN COMMANDS

-l
-Produces a longer listing; the default listing format uses a -tilde to denote the home directory. +Produces a listing using full pathnames; +the default listing format uses a tilde to denote the home directory.
-p
@@ -9199,6 +10717,18 @@

SHELL BUILTIN COMMANDS

Print the directory stack with one entry per line, prefixing each entry with its index in the stack. +
+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.

@@ -9208,16 +10738,16 @@

SHELL BUILTIN COMMANDS

of the directory stack.
-
disown [-ar] [-h] [jobspec ...]
-Without options, each +
disown [-ar] [-h] [jobspec ... | pid ... ]
+Without options, remove each jobspec -is removed from the table of active jobs. +from the table of active jobs. If jobspec -is not present, and neither -a nor -r is supplied, -the shell's notion of the current job is used. +is not present, and neither the -a nor the -r option +is supplied, the current job is used. If the -h option is given, each jobspec @@ -9232,16 +10762,6 @@

SHELL BUILTIN COMMANDS

If no jobspec -is present, and neither the --a - -nor the --r - -option is supplied, the current job is used. -If no -jobspec - is supplied, the -a @@ -9258,7 +10778,7 @@

SHELL BUILTIN COMMANDS

does not specify a valid job.
echo [-neE] [arg ...]
Output the args, separated by spaces, followed by a newline. -The return status is always 0. +The return status is 0 unless a write error occurs. 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 @@ -9292,6 +10812,9 @@

SHELL BUILTIN COMMANDS

suppress further output
\e +
+
\E +
an escape character
\f @@ -9328,6 +10851,16 @@

SHELL BUILTIN COMMANDS

the eight-bit character whose value is the hexadecimal value HH (one or two hex digits) +
\uHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +
\UHHHHHHHH + +
+the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight hex digits)
@@ -9357,7 +10890,11 @@

SHELL BUILTIN COMMANDS

from shared object filename, -on systems that support dynamic loading. The +on systems that support dynamic loading. +Bash will use the value of the BASH_LOADABLES_PATH variable as a +colon-separated list of directories in which to search for filename. +The default is system-dependent. +The -d option will delete a builtin previously loaded with @@ -9374,6 +10911,11 @@

SHELL BUILTIN COMMANDS

indication of whether or not each is enabled. If -s is supplied, the output is restricted to the POSIX special builtins. +If no options are supplied and a name is not a shell builtin, +enable will attempt to load name from a shared object named +name, as if the command were +enable -f name name . + The return value is 0 unless a name @@ -9405,7 +10947,7 @@

SHELL BUILTIN COMMANDS

-l option is supplied, -the shell places a dash at the beginning of the zeroth argument passed to +the shell places a dash at the beginning of the zeroth argument passed to command. This is what @@ -9423,15 +10965,18 @@

SHELL BUILTIN COMMANDS

is supplied, the shell passes name -as the zeroth argument to the executed command. If +as the zeroth argument to the executed command. +If command cannot be executed for some reason, a non-interactive shell exits, -unless the shell option +unless the execfail -is enabled, in which case it returns failure. +shell option +is enabled. In that case, it returns failure. An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if exec fails. If command @@ -9460,11 +11005,10 @@

SHELL BUILTIN COMMANDS

names are marked for automatic export to the environment of -subsequently executed commands. If the +subsequently executed commands. If the -f -option is given, -the +option is given, the names refer to functions. @@ -9475,7 +11019,7 @@

SHELL BUILTIN COMMANDS

-p option is supplied, a list -of all names that are exported in this shell is printed. +of names of all exported variables is printed. The -n @@ -9498,13 +11042,13 @@

SHELL BUILTIN COMMANDS

fc -s [pat=rep] [cmd]
-Fix Command. In the first form, a range of commands from +The first form selects a range of commands from first to last -is selected from the history list. +from the history list and displays or edits and re-executes them. First and @@ -9513,10 +11057,15 @@

SHELL BUILTIN COMMANDS

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 +command number). +When listing, a first or last of +0 is equivalent to -1 and -0 is equivalent to the current +command (usually the fc command); otherwise 0 is equivalent to -1 +and -0 is invalid. +If last -is not specified it is set to +is not specified, it is set to the current command for listing (so that fc -l -10 @@ -9527,7 +11076,7 @@

SHELL BUILTIN COMMANDS

If first -is not specified it is set to the previous +is not specified, it is set to the previous command for editing and -16 for listing.

The @@ -9573,6 +11122,7 @@

SHELL BUILTIN COMMANDS

In the second form, command is re-executed after each instance of pat is replaced by rep. +Command is interpreted the same as first above. A useful alias to use with this is r='fc -s', @@ -9626,7 +11176,7 @@

SHELL BUILTIN COMMANDS

jobspec specifies a job that was started without job control. -
getopts optstring name [args]
+
getopts optstring name [arg ...]
getopts is used by shell procedures to parse positional parameters. @@ -9680,14 +11230,15 @@

SHELL BUILTIN COMMANDS

is set to the index of the first non-option argument, -and name is set to ?. +and name is set to ?.

getopts normally parses the positional parameters, but if more arguments are -given in -args, +supplied as +arg +values, getopts parses those instead. @@ -9700,7 +11251,7 @@

SHELL BUILTIN COMMANDS

is a colon, silent -error reporting is used. In normal operation diagnostic messages +error reporting is used. In normal operation, diagnostic messages are printed when invalid options or missing option arguments are encountered. If the variable @@ -9708,7 +11259,7 @@

SHELL BUILTIN COMMANDS

is set to 0, no error messages will be displayed, even if the first -character of +character of optstring is not a colon. @@ -9763,21 +11314,22 @@

SHELL BUILTIN COMMANDS

It returns false if the end of options is encountered or an error occurs.
hash [-lr] [-p filename] [-dt] [name]
-For each -name, +Each time hash is invoked, +the full pathname of the command +name -the full file name of the command is determined by searching +is determined by searching the directories in $PATH -and remembered. +and remembered. Any previously-remembered pathname is discarded. If the -p option is supplied, no path search is performed, and filename -is used as the full file name of the command. +is used as the full filename of the command. The -r @@ -9831,22 +11383,26 @@

SHELL BUILTIN COMMANDS

Display only a short usage synopsis for each pattern -
+
+

The return status is 0 unless no command matches pattern. + +

history [n]
history -c
history -d offset
+
history -d start-end
history -anrw [filename]
history -p arg [arg ...]
history -s arg [arg ...]
With no options, display the command history list with line numbers. Lines listed -with a +with a * have been modified. An argument of @@ -9880,11 +11436,21 @@

SHELL BUILTIN COMMANDS

Clear the history list by deleting all the entries.
-d offset
Delete the history entry at position offset. +If offset is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of -1 refers to the current +history -d command. +
-d start-end
+Delete the range of history entries between positions start and +end, inclusive. +Positive and negative values for start and end +are interpreted as described above.
-a
-Append the ``new'' history lines (history lines entered since the -beginning of the current bash session) to the history file. +Append the ``new'' history lines to the history file. +These are history lines entered since the beginning of the current +bash session, but not already appended to the history file.
-n
@@ -9896,11 +11462,11 @@

SHELL BUILTIN COMMANDS

Read the contents of the history file -and use them as the current history. +and append them to the current history list.
-w
-Write the current history to the history file, overwriting the +Write the current history list to the history file, overwriting the history file's contents.
-p @@ -9933,10 +11499,10 @@

SHELL BUILTIN COMMANDS

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. +as timestamps for the following history entry. The return value is 0 unless an invalid option is encountered, an error occurs while reading or writing the history file, an invalid -offset is supplied as an argument to -d, or the +offset or range is supplied as an argument to -d, or the history expansion supplied as an argument to -p fails. @@ -9954,24 +11520,24 @@

SHELL BUILTIN COMMANDS

List process IDs in addition to the normal information. -
-p - -
-List only the process ID of the job's process group -leader.
-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. +Display only running jobs.
-s
-Restrict output to stopped jobs. +Display only stopped jobs.

@@ -10013,7 +11579,7 @@

SHELL BUILTIN COMMANDS

kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ...
-
kill -l [sigspec | exit_status]
+
kill -l|-L [sigspec | exit_status]
Send the signal named by sigspec @@ -10063,6 +11629,10 @@

SHELL BUILTIN COMMANDS

is a number specifying either a signal number or the exit status of a process terminated by a signal. +The +-L + +option is equivalent to -l. kill returns true if at least one signal was successfully sent, or false @@ -10075,6 +11645,7 @@

SHELL BUILTIN COMMANDS

ARITHMETIC EVALUATION + above). If the last arg @@ -10083,9 +11654,9 @@

SHELL BUILTIN COMMANDS

let returns 1; 0 is returned otherwise. -
local [option] [name[=value] ...]
+
local [option] [name[=value] ... | - ]
For each argument, a local variable named -name +name is created, and assigned value. @@ -10098,6 +11669,12 @@

SHELL BUILTIN COMMANDS

name to have a visible scope restricted to that function and its children. +If name is -, the set of shell options is made local to the function +in which local is invoked: shell options changed using the +set builtin inside the function are restored to their original values +when the function returns. +The restore is effected as if a series of set commands were executed +to restore the values that were in place before the function. With no operands, local @@ -10117,17 +11694,17 @@

SHELL BUILTIN COMMANDS

Exit a login shell. -
mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
+
mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
-
readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
+
readarray [-d delim] [-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 +or from file descriptor fd -if the +if the -u option is supplied. @@ -10140,6 +11717,13 @@

SHELL BUILTIN COMMANDS

+
-d + +
+The first character of delim is used to terminate each input line, +rather than newline. +If delim is the empty string, mapfile will terminate a line +when it reads a NUL character.
-n
@@ -10164,7 +11748,7 @@

SHELL BUILTIN COMMANDS

-t
-Remove a trailing newline from each line read. +Remove a trailing delim (default newline) from each line read.
-u
@@ -10191,13 +11775,14 @@

SHELL BUILTIN COMMANDS

If -C -is specified without +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 to be assigned and the line to be assigned to that element +as additional arguments. +callback is evaluated after the line is read but before the array element is assigned.

@@ -10211,11 +11796,12 @@

SHELL BUILTIN COMMANDS

popd [-n] [+n] [-n]
-Removes entries from the directory stack. With no arguments, -removes the top directory from the stack, and performs a -cd - -to the new top directory. +Removes entries from the directory stack. +The elements are numbered from 0 starting at the first directory +listed by dirs. +With no arguments, popd +removes the top directory from the stack, and +changes to the new top directory. Arguments, if supplied, have the following meanings:
@@ -10230,7 +11816,8 @@

SHELL BUILTIN COMMANDS

shown by dirs, -starting with zero. For example: +starting with zero, from the stack. +For example: popd +0 removes the first directory, @@ -10253,52 +11840,106 @@

SHELL BUILTIN COMMANDS

-If the +If the top element of the directory stack is modified, and +the -n option was not supplied, popd uses the cd +builtin to change to the directory at the top of the stack. +If the cd fails, popd returns a non-zero value. +

+ +Otherwise, popd -command is successful, a -dirs +returns false if an invalid option is encountered, the directory stack +is empty, or a non-existent directory stack entry is specified. +

-is performed as well, and the return status is 0. +If the 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. +command is successful, +bash runs +dirs + +to show the final contents of the directory stack, +and the return status is 0.

printf [-v var] format [arguments]
Write the formatted arguments to the standard output under the control of the format. +The -v option causes the output to be assigned to the variable +var rather than being printed to the standard output. +

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 +In addition to the standard printf(1) format specifications, +printf interprets the following extensions: +

+ +
+
%b + +
+causes printf to expand backslash escape sequences in the corresponding -argument (except that \c terminates output, backslashes in -\aq, \", 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 the same way as echo -e. +
%q + +
+causes printf to output the corresponding argument in a format that can be reused as shell input. +
%Q + +
+like %q, but applies any supplied precision to the argument +before quoting it. +
%(datefmt)T + +
+causes printf to output the date-time string resulting from using +datefmt as a format string for strftime(3). +The corresponding argument is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: -1 represents the current +time, and -2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if -1 had been given. +This is an exception to the usual printf behavior. + +

-The -v option causes the output to be assigned to the variable -var rather than being printed to the standard output. + +The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original.

+ +Arguments to non-string format specifiers are treated as C constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. +

+ 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. +appropriate, had been supplied. +The return value is zero on success, non-zero on failure. +

+
pushd [-n] [+n] [-n]
pushd [-n] [dir]
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. +directory. +With no arguments, pushd exchanges the top two elements of +the directory stack. Arguments, if supplied, have the following meanings:
@@ -10306,8 +11947,8 @@

SHELL BUILTIN COMMANDS

-n
-Suppresses the normal change of directory when adding directories -to the stack, so that only the stack is manipulated. +Suppresses the normal change of directory when rotating or +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 @@ -10327,32 +11968,36 @@

SHELL BUILTIN COMMANDS

Adds dir -to the directory stack at the top, making it the -new current working directory. +to the directory stack at the top

-If the -pushd +After the stack has been modified, if the -n option was not +supplied, pushd uses the cd builtin to change to the +directory at the top of the stack. +If the cd fails, pushd returns a non-zero value. +

-command is successful, a -dirs +Otherwise, if no arguments are supplied, +pushd -is performed as well. -If the first form is used, +returns 0 unless the directory stack is empty. +When rotating the directory stack, pushd -returns 0 unless the cd to -dir +returns 0 unless the directory stack is empty or +a non-existent directory stack element is specified. +

-fails. With the second form, +If the 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. +command is successful, +bash runs +dirs + +to show the final contents of the directory stack.

pwd [-LP]
@@ -10360,7 +12005,7 @@

SHELL BUILTIN COMMANDS

The pathname printed contains no symbolic links if the -P -option is supplied or the +option is supplied or the -o physical option to the @@ -10376,24 +12021,34 @@

SHELL BUILTIN COMMANDS

invalid option is supplied.
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 +fd supplied as an argument to the -u option, +split into words as described + +above +under Word Splitting, +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 +and so on. +If there are more words than names, the remaining words and their +intervening delimiters are 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 characters in IFS -are used to split the line into words. +are used to split the line into words using the same rules the shell +uses for expansion (described + +above +under Word Splitting). 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 following meanings: @@ -10417,6 +12072,8 @@

SHELL BUILTIN COMMANDS

The first character of delim is used to terminate the input line, rather than newline. +If delim is the empty string, read will terminate a line +when it reads a NUL character.
-e
@@ -10428,9 +12085,11 @@

SHELL BUILTIN COMMANDS

READLINE -above) is used to obtain the line. + +above) +is used to obtain the line. Readline uses the current (or default, if line editing was not previously -active) editing settings. +active) editing settings, but uses readline's default filename completion.
-i text
@@ -10443,7 +12102,7 @@

SHELL BUILTIN COMMANDS

read returns after reading nchars characters rather than -waiting for a complete line of input, but honor a delimiter if fewer +waiting for a complete line of input, but honors a delimiter if fewer than nchars characters are read before the delimiter.
-N nchars @@ -10454,6 +12113,9 @@

SHELL BUILTIN COMMANDS

Delimiter characters encountered in the input are not treated specially and do not cause read to return until nchars characters are read. +The result is not split on the characters in IFS; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the -r option below).
-p prompt
@@ -10465,7 +12127,7 @@

SHELL BUILTIN COMMANDS

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 +In particular, a backslash-newline pair may not then be used as a line continuation.
-s @@ -10476,14 +12138,20 @@

SHELL BUILTIN COMMANDS

Cause read to time out and return failure if a complete line of -input is not read within timeout seconds. +input (or a specified number of characters) +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. +If read times out, read saves any partial input read into +the specified variable name. +If timeout is 0, read returns immediately, without trying to +read any data. +The exit status is 0 if input is available on the specified file descriptor, +or the read will return EOF, +non-zero otherwise. The exit status is greater than 128 if the timeout is exceeded.
-u fd @@ -10496,16 +12164,19 @@

SHELL BUILTIN COMMANDS

If no names -are supplied, the line read is assigned to the variable +are supplied, the line read, +without the ending delimiter but otherwise unmodified, +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. +The exit status is zero, unless end-of-file is encountered, read +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +or an invalid file descriptor is supplied as the argument to -u. -
readonly [-aApf] [name[=word] ...]
+
readonly [-aAf] [-p] [name[=word] ...]
The given names are marked readonly; the values of these @@ -10525,6 +12196,10 @@

SHELL BUILTIN COMMANDS

-A option restricts the variables to associative arrays. +If both options are supplied, +-A + +takes precedence. If no name @@ -10532,6 +12207,8 @@

SHELL BUILTIN COMMANDS

-p option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. The -p @@ -10551,15 +12228,25 @@

SHELL BUILTIN COMMANDS

that is not a function.
return [n]
-Causes a function to exit with the return value specified by -n. +Causes a function to stop executing and return the value specified by +n -If +to its caller. +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 +executed in the function body. +If return is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If return is executed during a DEBUG trap, the last command +used to determine the status is the last command executed by the trap +handler before return was invoked. +If +return + +is used outside a function, +but during execution of a script by the . (source) command, it causes the shell to stop executing @@ -10567,16 +12254,22 @@

SHELL BUILTIN COMMANDS

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. +script as the exit status of the script. +If n is supplied, the return value is its least significant +8 bits. +The return status is non-zero if +return + +is supplied a non-numeric argument, or +is used outside a +function and not during execution of a script by . or source. Any command associated with the RETURN trap is executed before execution resumes after the function or script. -
set [--abefhkmnptuvxBCEHPT] [-o option] [arg ...]
+
set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
-
set [+abefhkmnptuvxBCEHPT] [+o option] [arg ...]
+
set [+abefhkmnptuvxBCEHPT] [+o option-name] [--] [-] [arg ...]
-Without options, the name and value of each shell variable are displayed +Without options, display the name and value of each shell variable in a format that can be reused as input for setting or resetting the currently-set variables. Read-only variables cannot be reset. @@ -10584,7 +12277,7 @@

SHELL BUILTIN COMMANDS

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 +as values for the positional parameters and are assigned, in order, to $1, $2, @@ -10600,8 +12293,9 @@

SHELL BUILTIN COMMANDS

-a
-Automatically mark variables and functions which are modified or -created for export to the environment of subsequent commands. +Each variable or function that is created or modified is given the +export attribute and marked for export to the environment of +subsequent commands.
-b
@@ -10611,14 +12305,17 @@

SHELL BUILTIN COMMANDS

-e
-Exit immediately if a pipeline (which may consist of a single -simple command), a subshell command enclosed in parentheses, -or one of the commands executed as part of a command list enclosed -by braces (see +Exit immediately if a +pipeline (which may consist of a single simple command), +a list, +or a compound command +(see SHELL GRAMMAR -above) exits with a non-zero status. + +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 while @@ -10626,7 +12323,7 @@

SHELL BUILTIN COMMANDS

or until -keyword, +keyword, part of the test following the if @@ -10645,14 +12342,31 @@

SHELL BUILTIN COMMANDS

being inverted with !. +If a compound command other than a subshell +returns a non-zero status because a command failed +while -e was being ignored, the shell does not exit. A trap on ERR, if set, is executed before the shell exits. This option applies to the shell environment and each subshell environment separately (see COMMAND EXECUTION ENVIRONMENT -above), and may cause + +above), +and may cause subshells to exit before executing all the commands in the subshell. +

+ + +If a compound command or shell function executes in a context +where -e is being ignored, +none of the commands executed within the compound command or function body +will be affected by the -e setting, even if -e is set +and a command returns a failure status. +If a compound command or shell function sets -e while executing in +a context where -e is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes.

-f
@@ -10677,15 +12391,17 @@

SHELL BUILTIN COMMANDS

JOB CONTROL -above). Background processes run in a separate process -group and a line containing their exit status is printed -upon their completion. + +above). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status.
-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. +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.
-o option-name
@@ -10747,7 +12463,10 @@

SHELL BUILTIN COMMANDS

history
-Enable command history, as described above under +Enable command history, as described + +above +under HISTORY. @@ -10762,6 +12481,7 @@

SHELL BUILTIN COMMANDS

(see Shell Variables + above).
keyword @@ -10836,6 +12556,14 @@

SHELL BUILTIN COMMANDS

where the default operation differs from the POSIX standard to match the standard (posix mode). +See +SEE ALSO + + + +below +for a reference to a document that details how posix mode affects +bash's behavior.
privileged
@@ -10915,6 +12643,11 @@

SHELL BUILTIN COMMANDS

not reset. Turning this option off causes the effective user and group ids to be set to the real user and group ids. +
-r + +
+Enable restricted shell mode. +This option cannot be unset once it has been set.
-t
@@ -10923,7 +12656,9 @@

SHELL BUILTIN COMMANDS

Treat unset variables and parameters other than the special -parameters "@" and "*" as an error when performing +parameters "@" and "*", +or array variables subscripted with "@" or "*", +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. @@ -10948,7 +12683,9 @@

SHELL BUILTIN COMMANDS

The shell performs brace expansion (see Brace Expansion -above). This is on by default. + +above). +This is on by default.
-C
@@ -10963,7 +12700,7 @@

SHELL BUILTIN COMMANDS

and <> -redirection operators. This may be overridden when +redirection operators. This may be overridden when creating output files by using the redirection operator >| @@ -10987,7 +12724,7 @@

SHELL BUILTIN COMMANDS

-P
-If set, the shell does not follow symbolic links when executing +If set, the shell does not resolve symbolic links when executing commands such as cd @@ -11056,7 +12793,7 @@

SHELL BUILTIN COMMANDS

is 0, no parameters are changed. If -n +n is not given, it is assumed to be 1. If @@ -11071,12 +12808,20 @@

SHELL BUILTIN COMMANDS

or less than zero; otherwise 0.
shopt [-pqsu] [-o] [optname ...]
-Toggle the values of variables controlling optional shell behavior. +Toggle the values of settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +-o + +option is used, those available with the +-o + +option to the set builtin command. 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. +an indication of whether or not each is set; +if optnames are supplied, the output is restricted to those options. The -p option causes output to be displayed in a form that may be reused as input. Other options have the following meanings: @@ -11121,8 +12866,10 @@

SHELL BUILTIN COMMANDS

or -u -is used with no optname arguments, the display is limited to -those options which are set or unset, respectively. +is used with no optname arguments, +shopt + +shows only those options which are set or unset, respectively. Unless otherwise noted, the shopt options are disabled (unset) by default.

@@ -11139,6 +12886,13 @@

SHELL BUILTIN COMMANDS

+
assoc_expand_once + +
+If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing.
autocd
@@ -11163,7 +12917,7 @@

SHELL BUILTIN COMMANDS

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, +If a correction is found, the corrected filename is printed, and the command proceeds. This option is only used by interactive shells.
checkhash @@ -11182,13 +12936,14 @@

SHELL BUILTIN COMMANDS

JOB CONTROL -above). The shell always -postpones exiting if any jobs are stopped. + +above). +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 +If set, bash checks the window size after each external (non-builtin) +command and, if necessary, updates the values of LINES @@ -11196,6 +12951,7 @@

SHELL BUILTIN COMMANDS

COLUMNS. +This option is enabled by default.
cmdhist
@@ -11205,31 +12961,82 @@

SHELL BUILTIN COMMANDS

attempts to save all lines of a multiple-line command in the same history entry. This allows easy re-editing of multi-line commands. +This option is enabled by default, but only has an effect if command +history is enabled, as described + +above +under +HISTORY. + + +
compat31
-If set, -bash - -changes its behavior to that of version 3.1 with respect to quoted -arguments to the conditional command's =~ operator.
compat32 +
+
compat40 + +
+
compat41 + +
+
compat42 + +
+
compat43 + +
+
compat44 + +
+
compat50 + +
+ +These control aspects of the shell's compatibility mode +(see +SHELL COMPATIBILITY MODE + + + +below). +
complete_fullquote +
If set, 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. -
compat40 +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, +bash + +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default bash behavior in +versions through 4.2. +
direxpand
If set, 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. +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the readline editing +buffer. +If not set, +bash + +attempts to preserve what the user typed.
dirspell
@@ -11241,11 +13048,21 @@

SHELL BUILTIN COMMANDS

dotglob
-If set, +If set, bash includes filenames beginning with a `.' in the results of pathname expansion. +The filenames +``.'' + +and +``..'' + +must always be matched explicitly, even if +dotglob + +is set.
execfail
@@ -11260,7 +13077,10 @@

SHELL BUILTIN COMMANDS

expand_aliases
-If set, aliases are expanded as described above under +If set, aliases are expanded as described + +above +under ALIASES. @@ -11268,7 +13088,11 @@

SHELL BUILTIN COMMANDS

extdebug
-If set, behavior intended for use by debuggers is enabled: +If set at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the --debugger option. +If set after invocation, behavior intended for use by debuggers is enabled:
1. @@ -11287,8 +13111,8 @@

SHELL BUILTIN COMMANDS

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. +executed by the . or source builtins), the shell simulates +a call to return.
4.
@@ -11299,25 +13123,30 @@

SHELL BUILTIN COMMANDS

BASH_ARGV -are updated as described in their descriptions above. +are updated as described in their descriptions + +above).
5.
-Function tracing is enabled: command substitution, shell functions, and +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 +Error tracing is enabled: command substitution, shell functions, and subshells invoked with ( command ) inherit the -ERROR trap. +ERR trap.
extglob
-If set, the extended pattern matching features described above under +If set, the extended pattern matching features described + +above +under Pathname Expansion are enabled.
extquote @@ -11342,16 +13171,52 @@

SHELL BUILTIN COMMANDS

the ignored words are the only possible completions. See SHELL VARIABLES -above for a description of + +above +for a description of FIGNORE. +This option is enabled by default. +
globasciiranges + +
+If set, range expressions used in pattern matching bracket expressions (see +Pattern Matching + + + +above) +behave as if in the traditional C locale when performing +comparisons. That is, the current locale's collating sequence +is not taken into account, so +b + +will not collate between +A + +and +B, + +and upper-case and lower-case ASCII characters will collate together. +
globskipdots + +
+If set, pathname expansion will never match the filenames +``.'' + +and +``..'', + +even if the pattern begins with a +``.''. + This option is enabled by default.
globstar
If set, the pattern ** used in a pathname expansion context will -match a files and zero or more directories and subdirectories. +match all files and zero or more directories and subdirectories. If the pattern is followed by a /, only directories and subdirectories match.
gnu_errfmt @@ -11379,7 +13244,7 @@

SHELL BUILTIN COMMANDS

histverify
-If set, and +If set, and readline is being used, the results of history substitution are not immediately @@ -11399,6 +13264,7 @@

SHELL BUILTIN COMMANDS

READLINE + above). This is enabled by default.
huponexit @@ -11409,6 +13275,12 @@

SHELL BUILTIN COMMANDS

to all jobs when an interactive login shell exits. +
inherit_errexit + +
+If set, command substitution inherits the value of the errexit option, +instead of unsetting it in the subshell environment. +This option is enabled when posix mode is enabled.
interactive_comments
@@ -11420,7 +13292,14 @@

SHELL BUILTIN COMMANDS

COMMENTS -above). This option is enabled by default. + +above). +This option is enabled by default. +
lastpipe + +
+If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment.
lithist
@@ -11429,6 +13308,19 @@

SHELL BUILTIN COMMANDS

option is enabled, multi-line commands are saved to the history with embedded newlines rather than using semicolon separators where possible. +
localvar_inherit + +
+If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The nameref attribute is not inherited. +
localvar_unset + +
+If set, calling unset on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope.
login_shell
@@ -11436,12 +13328,13 @@

SHELL BUILTIN COMMANDS

INVOCATION + above). The value may not be changed.
mailwarn
-If set, and a file that bash is checking for mail has been +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 @@ -11469,6 +13362,7 @@

SHELL BUILTIN COMMANDS

expansion (see Pathname Expansion + above).
nocasematch @@ -11477,7 +13371,18 @@

SHELL BUILTIN COMMANDS

bash matches patterns in a case-insensitive fashion when performing matching -while executing case or [[ conditional commands. +while executing case or [[ conditional commands, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. +
noexpand_translation + +
+If set, +bash + +encloses the translated results of $"..." quoting in single quotes +instead of double quotes. +If the string is not translated, this has no effect.
nullglob
@@ -11488,14 +13393,35 @@

SHELL BUILTIN COMMANDS

files (see Pathname Expansion + above) to expand to a null string, rather than themselves. +
patsub_replacement + +
+If set, bash +expands occurrences of & in the replacement string of pattern +substitution to the text matched by the pattern, as described +under Parameter Expansion + +above. +This option is enabled by default.
progcomp
If set, the programmable completion facilities (see -Programmable Completion above) are enabled. +Programmable Completion + +above) +are enabled. This option is enabled by default. +
progcomp_alias + +
+If set, and programmable completion is enabled, bash treats a command +name that doesn't have any completions as a possible alias and attempts +alias expansion. If it has an alias, bash attempts programmable +completion using the command word resulting from the expanded alias.
promptvars
@@ -11505,14 +13431,18 @@

SHELL BUILTIN COMMANDS

PROMPTING -above. This option is enabled by default. + +above. +This option is enabled by default.
restricted_shell
-The shell sets this option if it is started in restricted mode (see +The shell sets this option if it is started in restricted mode +(see RESTRICTED SHELL + below). The value may not be changed. This is not reset when the startup files are executed, allowing @@ -11529,12 +13459,23 @@

SHELL BUILTIN COMMANDS

If set, the -source (.) builtin uses the value of +. (source) builtin uses the value of PATH to find the directory containing the file supplied as an argument. This option is enabled by default. +
varredir_close + +
+If set, the shell automatically closes file descriptors assigned using the +{varname} redirection syntax (see +REDIRECTION + + + +above) +instead of leaving them open when the command completes.
xpg_echo
@@ -11542,28 +13483,36 @@

SHELL BUILTIN COMMANDS

by default.
+
suspend [-f]
Suspend the execution of this shell until it receives a SIGCONT -signal. A login shell cannot be suspended; the +signal. A login shell, +or a shell without job control enabled, +cannot be suspended; the -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 +The return status is 0 unless the shell is a login shell +or job control is not enabled +and -f -is not supplied, or if job control is not enabled. +is not supplied.
test expr
[ expr ]
-Return a status of 0 or 1 depending on +Return a status of 0 (true) or 1 (false) depending on the evaluation of the conditional expression expr. Each operator and operand must be a separate argument. -Expressions are composed of the primaries described above under +Expressions are composed of the primaries described + +above +under CONDITIONAL EXPRESSIONS. @@ -11575,6 +13524,7 @@

SHELL BUILTIN COMMANDS

Expressions may be combined using the following operators, listed in decreasing order of precedence. The evaluation depends on the number of arguments; see below. +Operator precedence is used when there are five or more arguments.
@@ -11624,7 +13574,9 @@

SHELL BUILTIN COMMANDS

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 listed above +If the first argument is one of the unary conditional operators listed + +above under CONDITIONAL EXPRESSIONS, @@ -11633,7 +13585,10 @@

SHELL BUILTIN COMMANDS

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 +The following conditions are applied in the order listed. +If the second argument is one of the binary conditional operators listed + +above under CONDITIONAL EXPRESSIONS, @@ -11641,7 +13596,7 @@

SHELL BUILTIN COMMANDS

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. +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 @@ -11649,14 +13604,27 @@

SHELL BUILTIN COMMANDS

argument. Otherwise, the expression is false.
4 arguments
+The following conditions are applied in the order listed. 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 +the two-argument test using the second and third arguments. +If the first argument is exactly ( and the fourth argument is +exactly ), the result is the two-argument test of the second +and third 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. -
+

+ + + +

+ +When used with test or [, the < and > operators +sort lexicographically using ASCII ordering. +

times @@ -11681,7 +13649,7 @@

SHELL BUILTIN COMMANDS

each specified signal is reset to its original disposition (the value it had upon entrance to the shell). -If +If arg is the null string the signal specified by each @@ -11715,7 +13683,11 @@

SHELL BUILTIN COMMANDS

is either a signal name defined in <signal.h>, or a signal number. -Signal names are case insensitive and the SIG prefix is optional. +Signal names are case insensitive and the +SIG + + +prefix is optional.

@@ -11746,6 +13718,7 @@

SHELL BUILTIN COMMANDS

SHELL GRAMMAR + above). Refer to the description of the extdebug option to the shopt builtin for details of its effect on the DEBUG trap. @@ -11759,8 +13732,8 @@

SHELL BUILTIN COMMANDS

the command arg -is executed each time a shell function or a script executed with the -. or source builtins finishes executing. +is executed each time a shell function or a script executed with +the . or source builtins finishes executing.

@@ -11774,7 +13747,10 @@

SHELL BUILTIN COMMANDS

the command arg -is executed whenever a simple command has a non-zero exit status, +is executed whenever +a pipeline (which may consist of a single simple +command), a list, or a compound command returns a +non-zero exit status, subject to the following conditions. The ERR @@ -11787,7 +13763,7 @@

SHELL BUILTIN COMMANDS

or until -keyword, +keyword, part of the test in an if @@ -11797,11 +13773,13 @@

SHELL BUILTIN COMMANDS

or || -list, or if the command's return value is -being inverted via +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 using !. -These are the same conditions obeyed by the errexit option. +These are the same conditions obeyed by the errexit (-e) option.

@@ -11816,7 +13794,7 @@

SHELL BUILTIN COMMANDS

returns true.
type [-aftpP] name [name ...]
-With no options, +With no options, indicate how each name @@ -11837,7 +13815,7 @@

SHELL BUILTIN COMMANDS

builtin, or -file +file if name @@ -11885,23 +13863,23 @@

SHELL BUILTIN COMMANDS

and -P -print the hashed value, not necessarily the file that appears -first in +print the hashed value, which is not necessarily the file that appears +first in PATH. If the -a -option is used, +option is used, type prints all of the places that contain -an executable named +an executable named name. This includes aliases and functions, -if and only if the +if and only if the -p option is not also used. @@ -11917,7 +13895,10 @@

SHELL BUILTIN COMMANDS

returns true if all of the arguments are found, false if any are not found. -
ulimit [-HSTabcdefilmnpqrstuvx [limit]]
+
ulimit [-HS] -a
+ +
ulimit [-HS] [-bcdefiklmnpqrstuvxPRT [limit]]
+ Provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The -H and -S options specify that the hard or soft limit is @@ -11945,7 +13926,8 @@

SHELL BUILTIN COMMANDS

is omitted, the current value of the soft limit of the resource is printed, unless the -H option is given. When more than one -resource is specified, the limit name and unit are printed before the value. +resource is specified, the limit name and unit, if appropriate, +are printed before the value. Other options are interpreted as follows:
@@ -11953,7 +13935,7 @@

SHELL BUILTIN COMMANDS

-a
-All current limits are reported +All current limits are reported; no limits are set
-b
@@ -11978,6 +13960,10 @@

SHELL BUILTIN COMMANDS

The maximum number of pending signals +
-k + +
+The maximum number of kqueues that may be allocated
-l
@@ -12018,11 +14004,20 @@

SHELL BUILTIN COMMANDS

-v
-The maximum amount of virtual memory available to the shell +The maximum amount of virtual memory available to the shell and, on +some systems, to its children
-x
The maximum number of file locks +
-P + +
+The maximum number of pseudoterminals +
-R + +
+The maximum time a real-time process can run before blocking, in microseconds
-T
@@ -12034,37 +14029,51 @@

SHELL BUILTIN COMMANDS

If limit -is given, it is the new value of the specified resource (the +is given, and the -a -option is display only). +option is not used, +limit is the new value of the specified resource. If no option is given, then -f is assumed. Values are in 1024-byte increments, except for -t, -which is in seconds, +which is in seconds; +-R, + +which is in microseconds; -p, -which is in units of 512-byte blocks, -and +which is in units of 512-byte blocks; +-P, + -T, -b, +-k, + -n, and -u, -which are unscaled values. +which are unscaled values; +and, when in posix mode, +-c + +and +-f, + +which are in 512-byte increments. The return status is 0 unless an invalid option or argument is supplied, or an error occurs while setting a new limit.
umask [-p] [-S] [mode]
-The user file-creation mask is set to +The user file-creation mask is set to mode. If @@ -12103,18 +14112,18 @@

SHELL BUILTIN COMMANDS

name is not a defined alias. -
unset [-fv] [name ...]
+
unset [-fv] [-n] [name ...]
For each name, remove the corresponding variable or function. -If no options are supplied, or the +If the -v option is given, each name -refers to a shell variable. +refers to a shell variable, and that variable is removed. Read-only variables may not be unset. If -f @@ -12124,22 +14133,47 @@

SHELL BUILTIN COMMANDS

refers to a shell function, and the function definition is removed. +If the +-n + +option is supplied, and name is a variable with the nameref +attribute, name will be unset rather than the variable it +references. +-n has no effect if the -f option is supplied. +If no options are supplied, each name refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. Each unset variable or function is removed from the environment passed to subsequent commands. If any of -COMP_WORDBREAKS, +BASH_ALIASES, -RANDOM, +BASH_ARGV0, -SECONDS, +BASH_CMDS, -LINENO, +BASH_COMMAND, -HISTCMD, +BASH_SUBSHELL, + + +BASHPID, + + +COMP_WORDBREAKS, + + +DIRSTACK, + + +EPOCHREALTIME, + + +EPOCHSECONDS, FUNCNAME, @@ -12147,37 +14181,315 @@

SHELL BUILTIN COMMANDS

GROUPS, + +HISTCMD, + + +LINENO, + + +RANDOM, + + +SECONDS, + or -DIRSTACK +SRANDOM are unset, they lose their special properties, even if they are subsequently reset. The exit status is true unless a name -is readonly. -
wait [n ...]
-Wait for each specified process and return its termination status. +is readonly or may not be unset. +
wait [-fn] [-p varname] [id ...]
+Wait for each specified child process and return its termination status. Each -n +id 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 +id + +is not given, +wait waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +$!, +and the return status is zero. +If the -n option is supplied, +wait waits for a single job +from the list of ids or, if no ids are supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the -p option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +varname named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the -n option is supplied. +Supplying the -f option, when job control is enabled, +forces wait to wait for id to terminate before returning +its status, instead of returning when it changes status. +If +id -is not given, all currently active child processes -are waited for, and the return status is zero. If -n +specifies a non-existent process or job, the return status is 127. +If wait is interrupted by a signal, the return status will be greater +than 128, as described under +SIGNALS -specifies a non-existent process or job, the return status is -127. Otherwise, the return status is the exit status of the last + +above. +Otherwise, the return status is the exit status of the last process or job waited for. + +  +

SHELL COMPATIBILITY MODE

+ +Bash-4.0 introduced the concept of a shell compatibility level, +specified as a set of options to the shopt builtin ( +compat31, + +compat32, + +compat40, + +compat41, + +and so on). +There is only one current +compatibility level -- each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. +

+ +This section 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 subsequent versions). +

+ +If a user enables, say, compat32, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of bash, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the [[ +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling compat32 will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. +

+ +Bash-4.3 introduced a new shell variable: +BASH_COMPAT. + + +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the compatNN option, like 42) determines the +compatibility level. +

+ +Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of +BASH_COMPAT. + + +

+ +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use +BASH_COMPAT + + +on bash-5.0 and later versions. +

+ +The following table describes the behavior changes controlled by each +compatibility level setting. +The compatNN tag is used as shorthand for setting the +compatibility level +to NN using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding compatNN shopt option. +For bash-4.3 and later versions, the +BASH_COMPAT + + +variable is preferred, +and it is required for bash-5.1 and later versions. +

+
compat31
+ +
+
+
*
+quoting the rhs of the [[ command's regexp matching operator (=~) +has no special effect +
+ + +
compat32
+ +
+
+
*
+interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +
+ + +
compat40
+ +
+
+
*
+the < and > operators to the [[ command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and +strcmp(3); + +bash-4.1 and later use the current locale's collation sequence and +strcoll(3). + +
+ + +
compat41
+ +
+
+
*
+in posix mode, time may be followed by options and still be +recognized as a reserved word (this is POSIX interpretation 267) +
*
+in posix mode, the parser requires that an even number of single +quotes occur in the word portion of a double-quoted +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is POSIX interpretation 221) +
+ + +
compat42
+ +
+
+
*
+the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +
*
+in posix mode, single quotes are considered special when expanding +the word portion of a double-quoted parameter expansion +and can be used to quote a closing brace or other special character +(this is part of POSIX interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +
+ + +
compat43
+ +
+
+
*
+the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(e.g., declare -a foo=aq(1 2)aq). Later versions warn that this usage is +deprecated +
*
+word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +
*
+when executing a shell function, the loop state (while/until/etc.) +is not reset, so break or continue in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +
+ + +
compat44
+ +
+
+
*
+the shell sets up the values used by +BASH_ARGV + + +and +BASH_ARGC + + +so they can expand to the shell's positional parameters even if extended +debugging mode is not enabled +
*
+a subshell inherits loops from its parent context, so break +or continue will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +
*
+variable assignments preceding builtins like export and readonly +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +
+ + +
compat50
+ +
+
+
*
+Bash-5.1 changed the way +$RANDOM + + +is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +RANDOM + + +will produce the same sequence as in bash-5.0 +
*
+If the command hash table is empty, bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the -l option is supplied. +
+ + +
compat51
+ +
+
+
*
+The unset builtin treats attempts to unset array subscripts @ +and * differently depending on whether the array is indexed or +associative, and differently than in previous versions. +
+ +
-  + 

RESTRICTED SHELL

@@ -12211,6 +14523,9 @@

RESTRICTED SHELL

PATH, + +HISTFILE, + ENV, @@ -12224,7 +14539,7 @@

RESTRICTED SHELL

/
*
-specifying a file name containing a +specifying a filename containing a / as an argument to the @@ -12232,7 +14547,12 @@

RESTRICTED SHELL

builtin command
*
-Specifying a filename containing a slash as an argument to the +specifying a filename containing a slash as an argument to the +history + +builtin command +
*
+specifying a filename containing a slash as an argument to the -p option to the @@ -12266,7 +14586,7 @@

RESTRICTED SHELL

builtin command
*
-Using the enable builtin command to enable disabled shell builtins +using the enable builtin command to enable disabled shell builtins
*
specifying the -p @@ -12277,7 +14597,7 @@

RESTRICTED SHELL

builtin command
*
turning off restricted mode with -set +r or set +o restricted. +set +r or shopt -u restricted_shell.

@@ -12299,7 +14619,7 @@

RESTRICTED SHELL

script. -  + 

SEE ALSO

@@ -12307,13 +14627,15 @@

SEE ALSO

Bash Reference Manual, Brian Fox and Chet Ramey
The Gnu Readline Library, Brian Fox and Chet Ramey
The Gnu History Library, Brian Fox and Chet Ramey
-
Portable Operating System Interface (POSIX) Part 2: Shell and Utilities, IEEE
+
Portable Operating System Interface (POSIX) Part 2: Shell and Utilities, IEEE --
+http://pubs.opengroup.org/onlinepubs/9699919799/ +
http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
sh(1), ksh(1), csh(1)
emacs(1), vi(1)
readline(3)
-  + 

FILES

@@ -12344,13 +14666,19 @@

FILES

The individual login shell cleanup file, executed when a login shell exits
+~/.bash_history + +
+The default value of HISTFILE, the file in which bash saves the +command history +
~/.inputrc
Individual readline initialization file -  + 

AUTHORS

Brian Fox, Free Software Foundation @@ -12363,7 +14691,7 @@

AUTHORS


chet.ramey@case.edu -  + 

BUG REPORTS

If you find a bug in @@ -12375,7 +14703,8 @@

BUG REPORTS

bash. The latest version is always available from -ftp://ftp.gnu.org/pub/bash/. +ftp://ftp.gnu.org/pub/gnu/bash/ and +http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz.

Once you have determined that a bug actually exists, use the @@ -12412,17 +14741,15 @@

BUG REPORTS

Comments and bug reports concerning this manual page should be directed to -chet@po.cwru.edu. +chet.ramey@case.edu. -  + 

BUGS

-

- It's too big and too slow.

-There are some subtle differences between +There are some subtle differences between bash and traditional versions of @@ -12460,7 +14787,7 @@

BUGS


-
GNU Bash-4.12009 December 29BASH(1) +GNU Bash 5.22022 September 19BASH(1)

@@ -12557,15 +14884,16 @@

BUGS

Modifiers
SHELL BUILTIN COMMANDS
-
RESTRICTED SHELL
-
SEE ALSO
-
FILES
-
AUTHORS
-
BUG REPORTS
-
BUGS
+
SHELL COMPATIBILITY MODE
+
RESTRICTED SHELL
+
SEE ALSO
+
FILES
+
AUTHORS
+
BUG REPORTS
+
BUGS

-This document was created by man2html from bash.1.
-Time: 30 December 2009 13:07:38 EST +This document was created by man2html from /usr/local/src/bash/bash-20220907/doc/bash.1.
+Time: 19 September 2022 12:02:51 EDT diff --git a/doc/bash.info b/doc/bash.info new file mode 100644 index 0000000..6d31de6 --- /dev/null +++ b/doc/bash.info @@ -0,0 +1,12675 @@ +This is bash.info, produced by makeinfo version 6.8 from bashref.texi. + +This text is a brief description of the features that are present in the +Bash shell (version 5.2, 19 September 2022). + + This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.2. + + Copyright (C) 1988-2022 Free Software Foundation, Inc. + + 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". +INFO-DIR-SECTION Basics +START-INFO-DIR-ENTRY +* Bash: (bash). The GNU Bourne-Again SHell. +END-INFO-DIR-ENTRY + + +File: bash.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 5.2, 19 September 2022). The Bash home page is +. + + This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.2. + + 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, noting which +features were inspired by other shells and which are specific to Bash. + + 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: bash.info, Node: Introduction, Next: Definitions, Up: Top + +1 Introduction +************** + +* Menu: + +* What is Bash?:: A short description of Bash. +* What is a shell?:: A brief introduction to shells. + + +File: bash.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: bash.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: bash.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 'space', 'tab', 'newline', 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: bash.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: bash.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: bash.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: bash.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: bash.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: bash.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: bash.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, '!'. When the shell is in +POSIX mode (*note Bash POSIX Mode::), the '!' has no special meaning +within double quotes, even 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: bash.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double Quotes, Up: Quoting + +3.1.2.4 ANSI-C Quoting +...................... + +Character sequences of the form $'STRING' are treated as a special kind +of single quotes. The sequence expands to STRING, with +backslash-escaped characters in STRING 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 +'\?' + question mark +'\NNN' + the eight-bit character whose value is the octal value NNN (one to + three octal digits) +'\xHH' + the eight-bit character whose value is the hexadecimal value HH + (one or two hex digits) +'\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) +'\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight hex digits) +'\cX' + a control-X character + +The expanded result is single-quoted, as if the dollar sign had not been +present. + + +File: bash.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting + +3.1.2.5 Locale-Specific Translation +................................... + +* Menu: + +* Creating Internationalized Scripts:: How to use translations and different + languages in your scripts. + +Prefixing a double-quoted string with a dollar sign ('$'), such as +$"hello, world", will cause the string to be translated according to the +current locale. The 'gettext' infrastructure performs the lookup and +translation, using the 'LC_MESSAGES', 'TEXTDOMAINDIR', and 'TEXTDOMAIN' +shell variables, as explained below. See the gettext documentation for +additional details not covered here. If the current locale is 'C' or +'POSIX', if there are no translations available, of if the string is not +translated, the dollar sign is ignored. Since this is a form of double +quoting, the string remains double-quoted by default, whether or not it +is translated and replaced. If the 'noexpand_translation' option is +enabled using the 'shopt' builtin (*note The Shopt Builtin::), +translated strings are single-quoted instead of double-quoted. + + The rest of this section is a brief overview of how you use gettext +to create translations for strings in a shell script named SCRIPTNAME. +There are more details in the gettext documentation. + + +File: bash.info, Node: Creating Internationalized Scripts, Up: Locale Translation + +Once you've marked the strings in your script that you want to translate +using $"...", you create a gettext "template" file using the command + + bash --dump-po-strings SCRIPTNAME > DOMAIN.pot + +The DOMAIN is your "message domain". It's just an arbitrary string +that's used to identify the files gettext needs, like a package or +script name. It needs to be unique among all the message domains on +systems where you install the translations, so gettext knows which +translations correspond to your script. You'll use the template file to +create translations for each target language. The template file +conventionally has the suffix '.pot'. + + You copy this template file to a separate file for each target +language you want to support (called "PO" files, which use the suffix +'.po'). PO files use various naming conventions, but when you are +working to translate a template file into a particular language, you +first copy the template file to a file whose name is the language you +want to target, with the '.po' suffix. For instance, the Spanish +translations of your strings would be in a file named 'es.po', and to +get started using a message domain named "example," you would run + + cp example.pot es.po + +Ultimately, PO files are often named DOMAIN.po and installed in +directories that contain multiple translation files for a particular +language. + + Whichever naming convention you choose, you will need to translate +the strings in the PO files into the appropriate languages. This has to +be done manually. + + When you have the translations and PO files complete, you'll use the +gettext tools to produce what are called "MO" files, which are compiled +versions of the PO files the gettext tools use to look up translations +efficiently. MO files are also called "message catalog" files. You use +the 'msgfmt' program to do this. For instance, if you had a file with +Spanish translations, you could run + + msgfmt -o es.mo es.po + +to produce the corresponding MO file. + + Once you have the MO files, you decide where to install them and use +the 'TEXTDOMAINDIR' shell variable to tell the gettext tools where they +are. Make sure to use the same message domain to name the MO files as +you did for the PO files when you install them. + + Your users will use the 'LANG' or 'LC_MESSAGES' shell variables to +select the desired language. + + You set the 'TEXTDOMAIN' variable to the script's message domain. As +above, you use the message domain to name your translation files. + + You, or possibly your users, set the 'TEXTDOMAINDIR' variable to the +name of a directory where the message catalog files are stored. If you +install the message files into the system's standard message catalog +directory, you don't need to worry about this variable. + + The directory where the message catalog files are stored varies +between systems. Some 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 the '.mo' suffix. If you use the 'TEXTDOMAIN' variable, you may +need to set the 'TEXTDOMAINDIR' variable to the location of the message +catalog files, as above. It's common to use both variables in this +fashion: '$TEXTDOMAINDIR'/'$LC_MESSAGES'/LC_MESSAGES/'$TEXTDOMAIN'.mo. + + If you used that last convention, and you wanted to store the message +catalog files with Spanish (es) and Esperanto (eo) translations into a +local directory you use for custom translation files, you could run + + TEXTDOMAIN=example + TEXTDOMAINDIR=/usr/local/share/locale + + cp es.mo ${TEXTDOMAINDIR}/es/LC_MESSAGES/${TEXTDOMAIN}.mo + cp eo.mo ${TEXTDOMAINDIR}/eo/LC_MESSAGES/${TEXTDOMAIN}.mo + + When all of this is done, and the message catalog files containing +the compiled translations are installed in the correct location, your +users will be able to see translated strings in any of the supported +languages by setting the 'LANG' or 'LC_MESSAGES' environment variables +before running your script. + + +File: bash.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: bash.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: + +* Reserved Words:: Words that have special meaning to the shell. +* 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. +* GNU Parallel:: Running commands in parallel. + + +File: bash.info, Node: Reserved Words, Next: Simple Commands, Up: Shell Commands + +3.2.1 Reserved Words +-------------------- + +Reserved words are words that have special meaning to the shell. They +are used to begin and end the shell's compound commands. + + The following words are recognized as reserved when unquoted and the +first word of a command (see below for exceptions): + +'if' 'then' 'elif' 'else' 'fi' 'time' +'for' 'in' 'until' 'while' 'do' 'done' +'case' 'esac' 'coproc''select''function' +'{' '}' '[[' ']]' '!' + +'in' is recognized as a reserved word if it is the third word of a +'case' or 'select' command. 'in' and 'do' are recognized as reserved +words if they are the third word in a 'for' command. + + +File: bash.info, Node: Simple Commands, Next: Pipelines, Prev: Reserved Words, Up: Shell Commands + +3.2.2 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: bash.info, Node: Pipelines, Next: Lists, Prev: Simple Commands, Up: Shell Commands + +3.2.3 Pipelines +--------------- + +A 'pipeline' is a sequence of one or more 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 COMMAND1. + + If '|&' is used, COMMAND1's standard error, in addition to its +standard output, is connected to COMMAND2's standard input through the +pipe; it is shorthand for '2>&1 |'. This implicit redirection of the +standard error to the standard output is performed after any +redirections specified by COMMAND1. + + 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. When the shell is in POSIX mode (*note Bash POSIX +Mode::), it does not recognize 'time' as a reserved word if the next +token begins with a '-'. 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. + + When the shell is in POSIX mode (*note Bash POSIX Mode::), 'time' may +be followed by a newline. In this case, the shell displays the total +user and system time consumed by the shell and its children. The +'TIMEFORMAT' variable may be used to specify the format of the time +information. + + If the pipeline is not executed asynchronously (*note Lists::), the +shell waits for all commands in the pipeline to complete. + + Each command in a multi-command pipeline, where pipes are created, is +executed in its own "subshell", which is a separate process (*note +Command Execution Environment::). If the 'lastpipe' option is enabled +using the 'shopt' builtin (*note The Shopt Builtin::), the last element +of a pipeline may be run by the shell process when job control is not +active. + + 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: bash.info, Node: Lists, Next: Compound Commands, Prev: Pipelines, Up: Shell Commands + +3.2.4 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", and these are referred to as +"asynchronous" commands. 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 (success). + + 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: bash.info, Node: Compound Commands, Next: Coprocesses, Prev: Lists, Up: Shell Commands + +3.2.5 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 language 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. + + In most cases a list of commands in a compound command's description +may be separated from the rest of the command by one or more newlines, +and may be followed by a newline in place of a semicolon. + + Bash provides looping constructs, conditional commands, and +mechanisms to group commands and execute them as a unit. + + +File: bash.info, Node: Looping Constructs, Next: Conditional Constructs, Up: Compound Commands + +3.2.5.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 (*note Shell Expansions::), 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 COMMANDS 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: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev: Looping Constructs, Up: Compound Commands + +3.2.5.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. The match is performed + according to the rules described below in *note Pattern Matching::. + If the 'nocasematch' shell option (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 (*note Shell + Parameter Expansion::) before matching is attempted. Each PATTERN + undergoes tilde expansion, parameter expansion, command + substitution, arithmetic expansion, process substitution, and quote + removal. + + 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. It's a common idiom + to use '*' as the final pattern to define the default case, since + that pattern will always match. + + 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, continuing the case + statement execution as if the pattern list had not matched. + + 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, and 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. 'select' then displays the 'PS3' prompt and + reads a line 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 and returns 1. 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::). The EXPRESSION + undergoes the same expansions as if it were within double quotes, + but double quote characters in EXPRESSION are not treated specially + are removed. If the value of the expression is non-zero, the + return status is 0; otherwise the return status is 1. + +'[[...]]' + [[ 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::. + The words between the '[[' and ']]' do not undergo word splitting + and filename expansion. The shell performs tilde expansion, + parameter and variable expansion, arithmetic expansion, command + substitution, process substitution, and quote removal on those + words (the expansions that would occur if the words were enclosed + in double quotes). 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::, as if the + 'extglob' shell option were enabled. The '=' operator is identical + to '=='. If the 'nocasematch' shell option (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. + + If you quote any part of the pattern, using any of the shell's + quoting mechanisms, the quoted portion is matched literally. This + means every character in the quoted portion matches itself, instead + of having any special pattern matching meaning. + + An additional binary operator, '=~', is available, with the same + precedence as '==' and '!='. When you use '=~', the string to the + right of the operator is considered a POSIX extended regular + expression pattern and matched accordingly (using the POSIX + 'regcomp' and 'regexec' interfaces usually described in regex(3)). + The return value is 0 if the string matches the pattern, and 1 if + it does not. If the regular expression is syntactically incorrect, + the conditional expression returns 2. If the 'nocasematch' shell + option (see the description of 'shopt' in *note The Shopt + Builtin::) is enabled, the match is performed without regard to the + case of alphabetic characters. + + You can quote any part of the pattern to force the quoted portion + to be matched literally instead of as a regular expression (see + above). If the pattern is stored in a shell variable, quoting the + variable expansion forces the entire pattern to be matched + literally. + + The pattern will match if it matches any part of the string. If + you want to force the pattern to match the entire string, anchor + the pattern using the '^' and '$' regular expression operators. + + For example, the following will match a line (stored in the shell + variable 'line') if there is a sequence of characters anywhere in + the value consisting of any number, including zero, of characters + in the 'space' character class, immediately followed by zero or one + instances of 'a', then a 'b': + + [[ $line =~ [[:space:]]*(a)?b ]] + + That means values for 'line' like 'aab', ' aaaaaab', 'xaby', and ' + ab' will all match, as will a line containing a 'b' anywhere in its + value. + + If you want to match a character that's special to the regular + expression grammar ('^$|[]()\.*+?'), it has to be quoted to remove + its special meaning. This means that in the pattern 'xxx.txt', the + '.' matches any character in the string (its usual regular + expression meaning), but in the pattern '"xxx.txt"', it can only + match a literal '.'. + + Likewise, if you want to include a character in your pattern that + has a special meaning to the regular expression grammar, you must + make sure it's not quoted. If you want to anchor a pattern at the + beginning or end of the string, for instance, you cannot quote the + '^' or '$' characters using any form of shell quoting. + + If you want to match 'initial string' at the start of a line, the + following will work: + [[ $line =~ ^"initial string" ]] + but this will not: + [[ $line =~ "^initial string" ]] + because in the second example the '^' is quoted and doesn't have + its usual special meaning. + + It is sometimes difficult to specify a regular expression properly + without using quotes, or to keep track of the quoting used by + regular expressions while paying attention to shell quoting and the + shell's quote removal. Storing the regular expression in a shell + variable is often a useful way to avoid problems with quoting + characters that are special to the shell. For example, the + following is equivalent to the pattern used above: + + pattern='[[:space:]]*(a)?b' + [[ $line =~ $pattern ]] + + Shell programmers should take special care with backslashes, since + backslashes are used by both the shell and regular expressions to + remove the special meaning from the following character. This + means that after the shell's word expansions complete (*note Shell + Expansions::), any backslashes remaining in parts of the pattern + that were originally not quoted can remove the special meaning of + pattern characters. If any part of the pattern is quoted, the + shell does its best to ensure that the regular expression treats + those remaining backslashes as literal, if they appeared in a + quoted portion. + + The following two sets of commands are _not_ equivalent: + + pattern='\.' + + [[ . =~ $pattern ]] + [[ . =~ \. ]] + + [[ . =~ "$pattern" ]] + [[ . =~ '\.' ]] + + The first two matches will succeed, but the second two will not, + because in the second two the backslash will be part of the pattern + to be matched. In the first two examples, the pattern passed to + the regular expression parser is '\.'. The backslash removes the + special meaning from '.', so the literal '.' matches. In the + second two examples, the pattern passed to the regular expression + parser has the backslash quoted (e.g., '\\\.'), which will not + match the string, since it does not contain a backslash. If the + string in the first examples were anything other than '.', say 'a', + the pattern would not match, because the quoted '.' in the pattern + loses its special meaning of matching any single character. + + Bracket expressions in regular expressions can be sources of errors + as well, since characters that are normally special in regular + expressions lose their special meanings between brackets. However, + you can use bracket expressions to match special pattern characters + without quoting them, so they are sometimes useful for this + purpose. + + Though it might seem like a strange way to write it, the following + pattern will match a '.' in the string: + + [[ . =~ [.] ]] + + The shell performs any word expansions before passing the pattern + to the regular expression functions, so you can assume that the + shell's quoting takes precedence. As noted above, the regular + expression parser will interpret any unquoted backslashes remaining + in the pattern after shell expansion according to its own rules. + The intention is to avoid making shell programmers quote things + twice as much as possible, so shell quoting should be sufficient to + quote special pattern characters where that's necessary. + + The array variable 'BASH_REMATCH' records which parts of the string + matched the pattern. The element of 'BASH_REMATCH' with index 0 + contains the portion of the string matching the entire regular + expression. Substrings matched by parenthesized subexpressions + within the regular expression are saved in the remaining + 'BASH_REMATCH' indices. The element of 'BASH_REMATCH' with index N + is the portion of the string matching the Nth parenthesized + subexpression. + + Bash sets 'BASH_REMATCH' in the global scope; declaring it as a + local variable will lead to unexpected results. + + 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: bash.info, Node: Command Grouping, Prev: Conditional Constructs, Up: Compound Commands + +3.2.5.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 forces the shell to + create a subshell (*note Command Execution Environment::), and each + of the commands in LIST is executed in that subshell environment. + 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: bash.info, Node: Coprocesses, Next: GNU Parallel, Prev: Compound Commands, Up: Shell Commands + +3.2.6 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 syntax for a coprocess is: + + coproc [NAME] COMMAND [REDIRECTIONS] + +This creates a coprocess named NAME. COMMAND may be either a simple +command (*note Simple Commands::) or a compound command (*note Compound +Commands::). NAME is a shell variable name. If NAME is not supplied, +the default name is 'COPROC'. + + The recommended form to use for a coprocess is + + coproc NAME { COMMAND; } + +This form is recommended because simple commands result in the coprocess +always being named 'COPROC', and it is simpler to use and more complete +than the other compound commands. + + There are other forms of coprocesses: + + coproc NAME COMPOUND-COMMAND + coproc COMPOUND-COMMAND + coproc SIMPLE-COMMAND + +If COMMAND is a compound command, NAME is optional. The word following +'coproc' determines whether that word is interpreted as a variable name: +it is interpreted as NAME if it is not a reserved word that introduces a +compound command. If COMMAND is a simple command, NAME is not allowed; +this is to avoid confusion between NAME and the first word of the simple +command. + + When the coprocess 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. Other than those created to execute command and +process substitutions, the file descriptors are not available in +subshells. + + 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. + + Since the coprocess is created as an asynchronous command, the +'coproc' command always returns success. The return status of a +coprocess is the exit status of COMMAND. + + +File: bash.info, Node: GNU Parallel, Prev: Coprocesses, Up: Shell Commands + +3.2.7 GNU Parallel +------------------ + +There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. + + GNU Parallel, as its name suggests, can be used to build and run +commands in parallel. You may run the same command with different +arguments, whether they are filenames, usernames, hostnames, or lines +read from files. GNU Parallel provides shorthand references to many of +the most common operations (input lines, various portions of the input +line, different ways to specify the input source, and so on). Parallel +can replace 'xargs' or feed commands from its input sources to several +different instances of Bash. + + For a complete description, refer to the GNU Parallel documentation, +which is available at +. + + +File: bash.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: + FNAME () COMPOUND-COMMAND [ REDIRECTIONS ] + + or + + function FNAME [()] COMPOUND-COMMAND [ REDIRECTIONS ] + + This defines a shell function named FNAME. 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. If the 'function' reserved word is used, +but the parentheses are not supplied, the braces are recommended. +COMPOUND-COMMAND is executed whenever FNAME is specified as the name of +a simple command. When the shell is in POSIX mode (*note Bash POSIX +Mode::), FNAME must be a valid shell name and may not be the same as one +of the special builtins (*note Special Builtins::). In default mode, a +function name can be any unquoted shell word that does not contain '$'. +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. + + The 'FUNCNEST' variable, if set to a numeric value greater than 0, +defines a maximum function nesting level. Function invocations that +exceed the limit cause the entire command to abort. + + 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 ("local variables"). Ordinarily, variables and their values are +shared between a function and its caller. These variables are visible +only to the function and the commands it invokes. This is particularly +important when a shell function calls other functions. + + In the following description, the "current scope" is a currently- +executing function. Previous scopes consist of that function's caller +and so on, back to the "global" scope, where the shell is not executing +any shell function. Consequently, a local variable at the current local +scope is a variable declared using the 'local' or 'declare' builtins in +the function that is currently executing. + + Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. + + The shell uses "dynamic scoping" to control a variable's visibility +within functions. With dynamic scoping, visible variables and their +values are a result of the sequence of function calls that caused +execution to reach the current function. The value of a variable that a +function sees depends on its value within its caller, if any, whether +that caller is the "global" scope or another shell function. This is +also the value that a local variable declaration "shadows", and the +value that is restored when the function returns. + + For example, if a variable 'var' is declared as local in function +'func1', and 'func1' calls another function 'func2', references to 'var' +made from within 'func2' will resolve to the local variable 'var' from +'func1', shadowing any global variable named 'var'. + + The following script demonstrates this behavior. When executed, the +script displays + + In func2, var = func1 local + + func1() + { + local var='func1 local' + func2 + } + + func2() + { + echo "In func2, var = $var" + } + + var=global + func1 + + The 'unset' builtin also acts using the same dynamic scope: if a +variable is local to the current scope, 'unset' will unset it; otherwise +the unset will refer to the variable found in any calling scope as +described above. If a variable at the current local scope is unset, it +will remain so (appearing as unset) until it is reset in that scope or +until the function returns. Once the function returns, any instance of +the variable at a previous scope will become visible. If the unset acts +on a variable at a previous scope, any instance of a variable with that +name that had been shadowed will become visible (see below how +'localvar_unset'shell option changes this behavior). + + Function names and definitions may be listed with the '-f' option to +the 'declare' ('typeset') builtin command (*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 child shell +processes (those created when executing a separate shell invocation) +automatically have them defined with the '-f' option to the 'export' +builtin (*note Bourne Shell Builtins::). + + Functions may be recursive. The 'FUNCNEST' variable may be used to +limit the depth of the function call stack and restrict the number of +function invocations. By default, no limit is placed on the number of +recursive calls. + + +File: bash.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 (*note +Shell Parameter Expansion::). 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 and filename expansion are not performed. Assignment +statements may also appear as arguments to the 'alias', 'declare', +'typeset', 'export', 'readonly', and 'local' builtin commands +("declaration" commands). When in POSIX mode (*note Bash POSIX Mode::), +these builtins may appear in a command after one or more instances of +the 'command' builtin and retain these assignment statement properties. + + 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. This +includes arguments to builtin commands such as 'declare' that accept +assignment statements (declaration commands). 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. + + A variable can be assigned the 'nameref' attribute using the '-n' +option to the 'declare' or 'local' builtin commands (*note Bash +Builtins::) to create a "nameref", or a reference to another variable. +This allows variables to be manipulated indirectly. Whenever the +nameref variable is referenced, assigned to, unset, or has its +attributes modified (other than using or changing the nameref attribute +itself), the operation is actually performed on the variable specified +by the nameref variable's value. A nameref is commonly used within +shell functions to refer to a variable whose name is passed as an +argument to the function. For instance, if a variable name is passed to +a shell function as its first argument, running + declare -n ref=$1 +inside the function creates a nameref variable 'ref' whose value is the +variable name passed as the first argument. References and assignments +to 'ref', and changes to its attributes, are treated as references, +assignments, and attribute modifications to the variable whose name was +passed as '$1'. + + If the control variable in a 'for' loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. Namerefs can be unset using the '-n' option to the +'unset' builtin (*note Bourne Shell Builtins::). Otherwise, if 'unset' +is executed with the name of a nameref variable as an argument, the +variable referenced by the nameref variable will be unset. + + +File: bash.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: bash.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 is not within double quotes, each positional + parameter expands to a separate word. In contexts where it is + performed, those words are subject to further word splitting and + filename expansion. 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. In + contexts where word splitting is performed, this expands each + positional parameter to a separate word; if not within double + quotes, these words are subject to word splitting. In contexts + where word splitting is not performed, this expands to a single + word with each positional parameter separated by a space. When the + expansion occurs within double quotes, and word splitting is + performed, 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 job most recently placed + into the background, whether executed as an asynchronous command or + using the 'bg' builtin (*note Job Control Builtins::). + +'0' + ($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. + + +File: bash.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 and variable expansion, 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 tilde, parameter, variable, and arithmetic expansion and command +substitution. + + After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +("quote removal"). + + Only brace expansion, word splitting, and filename expansion can +increase 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 '$*' (*note Special Parameters::), and +'"${NAME[@]}"' and '${NAME[*]}' (*note Arrays::). + + After all expansions, 'quote removal' (*note Quote Removal::) is +performed. + + +File: bash.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 filenames 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 sequence +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 letters, 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 +letters are supplied, the expression expands to each character +lexicographically between X and Y, inclusive, using the default C +locale. Note that both X and Y must be of the same type (integer or +letter). 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. + + 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, and inhibits brace expansion until the closing '}'. + + 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: bash.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 filenames 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' + + Bash also performs tilde expansion on words satisfying the conditions +of variable assignments (*note Shell Parameters::) when they appear as +arguments to simple commands. Bash does not do this, except for the +declaration commands listed above, when in POSIX mode. + + +File: bash.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 PARAMETER is a shell parameter as +described above (*note Shell Parameters::) or an array reference (*note +Arrays::). 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 (!), and +PARAMETER is not a nameref, it introduces a level of indirection. Bash +uses the value formed by expanding the rest of PARAMETER as the new +PARAMETER; this is then expanded and that value is used in the rest of +the expansion, rather than the expansion of the original PARAMETER. +This is known as 'indirect expansion'. The value is subject to tilde +expansion, parameter expansion, command substitution, and arithmetic +expansion. If PARAMETER is a nameref, this expands to the name of the +variable referenced by PARAMETER instead of performing the complete +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 (e.g., ':-'), 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. + + $ v=123 + $ echo ${v-unset} + 123 + +'${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. + + $ var= + $ : ${var:=DEFAULT} + $ echo $var + DEFAULT + +'${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. + + $ var= + $ : ${var:?var is unset or null} + bash: var: var is unset or null + +'${PARAMETER:+WORD}' + If PARAMETER is null or unset, nothing is substituted, otherwise + the expansion of WORD is substituted. + + $ var=123 + $ echo ${var:+var is set and not null} + var is set and not null + +'${PARAMETER:OFFSET}' +'${PARAMETER:OFFSET:LENGTH}' + This is referred to as Substring Expansion. It expands to up to + LENGTH characters of the value of PARAMETER starting at the + character specified by OFFSET. If PARAMETER is '@' or '*', an + indexed array subscripted by '@' or '*', or an associative array + name, the results differ as described below. If LENGTH is omitted, + it expands to the substring of the value of PARAMETER starting at + the character specified by OFFSET and extending to the end of the + value. LENGTH and OFFSET are arithmetic expressions (*note Shell + Arithmetic::). + + If OFFSET evaluates to a number less than zero, the value is used + as an offset in characters from the end of the value of PARAMETER. + If LENGTH evaluates to a number less than zero, it is interpreted + as an offset in characters from the end of the value of PARAMETER + rather than a number of characters, and the expansion is the + characters between OFFSET and that result. Note that a negative + offset must be separated from the colon by at least one space to + avoid being confused with the ':-' expansion. + + Here are some examples illustrating substring expansion on + parameters and subscripted arrays: + + $ string=01234567890abcdefgh + $ echo ${string:7} + 7890abcdefgh + $ echo ${string:7:0} + + $ echo ${string:7:2} + 78 + $ echo ${string:7:-2} + 7890abcdef + $ echo ${string: -7} + bcdefgh + $ echo ${string: -7:0} + + $ echo ${string: -7:2} + bc + $ echo ${string: -7:-2} + bcdef + $ set -- 01234567890abcdefgh + $ echo ${1:7} + 7890abcdefgh + $ echo ${1:7:0} + + $ echo ${1:7:2} + 78 + $ echo ${1:7:-2} + 7890abcdef + $ echo ${1: -7} + bcdefgh + $ echo ${1: -7:0} + + $ echo ${1: -7:2} + bc + $ echo ${1: -7:-2} + bcdef + $ array[0]=01234567890abcdefgh + $ echo ${array[0]:7} + 7890abcdefgh + $ echo ${array[0]:7:0} + + $ echo ${array[0]:7:2} + 78 + $ echo ${array[0]:7:-2} + 7890abcdef + $ echo ${array[0]: -7} + bcdefgh + $ echo ${array[0]: -7:0} + + $ echo ${array[0]: -7:2} + bc + $ echo ${array[0]: -7:-2} + bcdef + + If PARAMETER is '@' or '*', the result is LENGTH positional + parameters beginning at OFFSET. A negative OFFSET is taken + relative to one greater than the greatest positional parameter, so + an offset of -1 evaluates to the last positional parameter. It is + an expansion error if LENGTH evaluates to a number less than zero. + + The following examples illustrate substring expansion using + positional parameters: + + $ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:7} + 7 8 9 0 a b c d e f g h + $ echo ${@:7:0} + + $ echo ${@:7:2} + 7 8 + $ echo ${@:7:-2} + bash: -2: substring expression < 0 + $ echo ${@: -7:2} + b c + $ echo ${@:0} + ./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:0:2} + ./bash 1 + $ echo ${@: -7:0} + + + 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. It is an + expansion error if LENGTH evaluates to a number less than zero. + + These examples show how you can use substring expansion with + indexed arrays: + + $ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h) + $ echo ${array[@]:7} + 7 8 9 0 a b c d e f g h + $ echo ${array[@]:7:2} + 7 8 + $ echo ${array[@]: -7:2} + b c + $ echo ${array[@]: -7:-2} + bash: -2: substring expression < 0 + $ echo ${array[@]:0} + 0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${array[@]:0:2} + 0 1 + $ echo ${array[@]: -7:0} + + + Substring expansion applied to an associative array produces + undefined results. + + 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, '$0' 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. If PARAMETER is an indexed array name + subscripted by a negative number, that number is interpreted as + relative to one greater than the maximum index of PARAMETER, so + negative indices count back from the end of the array, and an index + of -1 references the last element. + +'${PARAMETER#WORD}' +'${PARAMETER##WORD}' + The WORD is expanded to produce a pattern and matched according to + the rules described below (*note Pattern Matching::). 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 and matched according to + the rules described below (*note Pattern Matching::). 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}' +'${PARAMETER//PATTERN/STRING}' +'${PARAMETER/#PATTERN/STRING}' +'${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. STRING undergoes tilde + expansion, parameter and variable expansion, arithmetic expansion, + command and process substitution, and quote removal. The match is + performed according to the rules described below (*note Pattern + Matching::). + + In the first form above, only the first match is replaced. If + there are two slashes separating PARAMETER and PATTERN (the second + form above), all matches of PATTERN are replaced with STRING. If + PATTERN is preceded by '#' (the third form above), it must match at + the beginning of the expanded value of PARAMETER. If PATTERN is + preceded by '%' (the fourth form above), it must match at the end + of the expanded value of PARAMETER. If the expansion of STRING is + null, matches of PATTERN are deleted. If STRING is null, matches + of PATTERN are deleted and the '/' following PATTERN may be + omitted. + + If the 'patsub_replacement' shell option is enabled using 'shopt', + any unquoted instances of '&' in STRING are replaced with the + matching portion of PATTERN. This is intended to duplicate a + common 'sed' idiom. + + Quoting any part of STRING inhibits replacement in the expansion of + the quoted portion, including replacement strings stored in shell + variables. Backslash will escape '&' in STRING; the backslash is + removed in order to permit a literal '&' in the replacement string. + Users should take care if STRING is double-quoted to avoid unwanted + interactions between the backslash and double-quoting, since + backslash has special meaning within double quotes. Pattern + substitution performs the check for unquoted '&' after expanding + STRING, so users should ensure to properly quote any occurrences of + '&' they want to be taken literally in the replacement and ensure + any instances of '&' they want to be replaced are unquoted. + + For instance, + + var=abcdef + rep='& ' + echo ${var/abc/& } + echo "${var/abc/& }" + echo ${var/abc/$rep} + echo "${var/abc/$rep}" + + will display four lines of "abc def", while + + var=abcdef + rep='& ' + echo ${var/abc/\& } + echo "${var/abc/\& }" + echo ${var/abc/"& "} + echo ${var/abc/"$rep"} + + will display four lines of "& def". Like the pattern removal + operators, double quotes surrounding the replacement string quote + the expanded characters, while double quotes enclosing the entire + parameter substitution do not, since the expansion is performed in + a context that doesn't take any enclosing double quotes into + account. + + Since backslash can escape '&', it can also escape a backslash in + the replacement string. This means that '\\' will insert a literal + backslash into the replacement, so these two 'echo' commands + + var=abcdef + rep='\\&xyz' + echo ${var/abc/\\&xyz} + echo ${var/abc/$rep} + + will both output '\abcxyzdef'. + + It should rarely be necessary to enclose only STRING in double + quotes. + + If the 'nocasematch' shell option (see the description of 'shopt' + in *note The Shopt Builtin::) is enabled, the match is performed + without regard to the case of alphabetic characters. 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. Each character in the expanded value of + PARAMETER is tested against PATTERN, and, if it matches the + pattern, its case is converted. The pattern should not attempt to + match more than one character. + + 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. + +'${PARAMETER@OPERATOR}' + The expansion is either a transformation of the value of PARAMETER + or information about PARAMETER itself, depending on the value of + OPERATOR. Each OPERATOR is a single letter: + + 'U' + The expansion is a string that is the value of PARAMETER with + lowercase alphabetic characters converted to uppercase. + 'u' + The expansion is a string that is the value of PARAMETER with + the first character converted to uppercase, if it is + alphabetic. + 'L' + The expansion is a string that is the value of PARAMETER with + uppercase alphabetic characters converted to lowercase. + 'Q' + The expansion is a string that is the value of PARAMETER + quoted in a format that can be reused as input. + 'E' + The expansion is a string that is the value of PARAMETER with + backslash escape sequences expanded as with the '$'...'' + quoting mechanism. + 'P' + The expansion is a string that is the result of expanding the + value of PARAMETER as if it were a prompt string (*note + Controlling the Prompt::). + 'A' + The expansion is a string in the form of an assignment + statement or 'declare' command that, if evaluated, will + recreate PARAMETER with its attributes and value. + 'K' + Produces a possibly-quoted version of the value of PARAMETER, + except that it prints the values of indexed and associative + arrays as a sequence of quoted key-value pairs (*note + Arrays::). + 'a' + The expansion is a string consisting of flag values + representing PARAMETER's attributes. + 'k' + Like the 'K' transformation, but expands the keys and values + of indexed and associative arrays to separate words after word + splitting. + + If PARAMETER is '@' or '*', the 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 operation is applied to each member of the array in turn, + and the expansion is the resultant list. + + The result of the expansion is subject to word splitting and + filename expansion as described below. + + +File: bash.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 in a subshell +environment 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: bash.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 undergoes the same expansions as if it were within +double quotes, but double quote characters in EXPRESSION are not treated +specially and are removed. All tokens in the expression undergo +parameter and variable expansion, command substitution, and quote +removal. The result is treated as the arithmetic expression to be +evaluated. 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: bash.info, Node: Process Substitution, Next: Word Splitting, Prev: Arithmetic Expansion, Up: Shell Expansions + +3.5.6 Process Substitution +-------------------------- + +Process substitution allows a process's input or output to be referred +to using a filename. It takes the form of + <(LIST) +or + >(LIST) +The process LIST is run asynchronously, and its input or output appears +as a filename. This filename 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. Process substitution is supported on systems that +support named pipes (FIFOs) or the '/dev/fd' method of naming open +files. + + When available, process substitution is performed simultaneously with +parameter and variable expansion, command substitution, and arithmetic +expansion. + + +File: bash.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 using these characters as +field terminators. If 'IFS' is unset, or its value is exactly +'', the default, then sequences of ' ', +'', and '' 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', 'tab', and 'newline' 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 and passed to +commands as empty strings. 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 and passed to a command as an empty +string. When a quoted null argument appears as part of a word whose +expansion is non-null, the null argument is removed. That is, the word +'-d''' becomes '-d' after word splitting and null argument removal. + + Note that if no expansion occurs, no splitting is performed. + + +File: bash.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, and is not quoted, then the word is +regarded as a PATTERN, and replaced with an alphabetically sorted list +of filenames matching the pattern (*note Pattern Matching::). If no +matching filenames 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. In order to match +the filenames '.' and '..', the pattern must begin with '.' (for +example, '.?'), even if 'dotglob' is set. If the 'globskipdots' shell +option is enabled, the filenames '.' and '..' are never matched, even if +the pattern begins with a '.'. When not matching filenames, the '.' +character is not treated specially. + + When matching a filename, the slash character must always be matched +explicitly by a slash in the pattern, but in other matching contexts it +can be matched by a special pattern character as described below (*note +Pattern Matching::). + + See the description of 'shopt' in *note The Shopt Builtin::, for a +description of the 'nocaseglob', 'nullglob', 'globskipdots', 'failglob', +and 'dotglob' options. + + The 'GLOBIGNORE' shell variable may be used to restrict the set of +file names matching a pattern. If 'GLOBIGNORE' is set, each matching +file name that also matches one of the patterns in 'GLOBIGNORE' is +removed from the list of matches. If the 'nocaseglob' option is set, +the matching against the patterns in 'GLOBIGNORE' is performed without +regard to case. 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: bash.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 falls 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, and the + characters included in the range, are determined by the current + locale and the values of the 'LC_COLLATE' and 'LC_ALL' shell + variables, 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 '[aBbCcDdxYyZz]', 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', or enable the 'globasciiranges' shell option. + + 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, +the shell recognizes several extended pattern matching operators. In +the following description, a PATTERN-LIST is a list of one or more +patterns separated by a '|'. When matching filenames, the 'dotglob' +shell option determines the set of filenames that are tested, as +described above. 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. + + The 'extglob' option changes the behavior of the parser, since the +parentheses are normally treated as operators with syntactic meaning. +To ensure that extended matching patterns are parsed correctly, make +sure that 'extglob' is enabled before parsing constructs containing the +patterns, including shell functions and command substitutions. + + When matching filenames, the 'dotglob' shell option determines the +set of filenames that are tested: when 'dotglob' is enabled, the set of +filenames includes all files beginning with '.', but the filenames '.' +and '..' must be matched by a pattern or sub-pattern that begins with a +dot; when it is disabled, the set does not include any filenames +beginning with "." unless the pattern or sub-pattern begins with a '.'. +As above, '.' only has a special meaning when matching filenames. + + Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. Using separate matches against shorter +strings, or using arrays of strings instead of a single long string, may +be faster. + + +File: bash.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: bash.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" allows +commands' file handles to be duplicated, opened, closed, made to refer +to different files, and can change the files the command reads from and +writes to. Redirection may also be used to modify file handles in 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. If {VARNAME} is supplied, the redirection persists +beyond the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. The 'varredir_close' shell +option manages this behavior (*note The Shopt Builtin::). + + 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. If the operating +system on which Bash is running provides these special files, bash will +use them; otherwise it will emulate them internally with the behavior +described below. + +'/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 the + corresponding TCP 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 the + corresponding UDP 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 + + 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 + When using the second form, WORD may not expand to a number or '-'. +If it does, other redirection operators apply (see Duplicating File +Descriptors below) for compatibility reasons. + +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 + (see Duplicating File Descriptors below). + +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 (or file descriptor N if N is specified) for a +command. + + The format of here-documents is: + [N]<<[-]WORD + HERE-DOCUMENT + DELIMITER + + No parameter and variable expansion, command substitution, arithmetic +expansion, or filename expansion is performed on WORD. If any part of +WORD is 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, 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: + [N]<<< WORD + + The WORD undergoes tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. Filename +expansion and word splitting are not performed. The result is supplied +as a single string, with a newline appended, to the command on its +standard input (or file descriptor N if N is specified). + +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. If WORD evaluates to '-', file descriptor N +is closed. As a special case, if N is omitted, and WORD does not expand +to one or more digits or '-', 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: bash.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: bash.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, in the +following order. + + 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. In the case of such a command (one that +consists only of assignment statements and redirections), assignment +statements are performed before redirections. 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: bash.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 in a separate execution environment + with the original command and the original command's arguments as + its arguments, and the function's exit status becomes the exit + status of that subshell. 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: bash.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. + + A "subshell" is a copy of the shell process. + + 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: bash.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 pathname of the command and passed to that command in its +environment. + + +File: bash.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, generally invalid options or missing +arguments. + + The exit status of the last command is available in the special +parameter $? (*note Special Parameters::). + + +File: bash.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. + + When job control is not enabled, and Bash is waiting for a foreground +command to complete, the shell receives keyboard-generated signals such +as 'SIGINT' (usually generated by '^C') that users commonly intend to +send to that command. This happens because the shell and the command +are in the same process group as the terminal, and '^C' sends 'SIGINT' +to all processes in that process group. See *note Job Control::, for a +more in-depth discussion of process groups. + + When Bash is running without job control enabled and receives +'SIGINT' while waiting for a foreground command, it waits until that +foreground command terminates and then decides what to do about the +'SIGINT': + + 1. If the command terminates due to the 'SIGINT', Bash concludes that + the user meant to end the entire script, and acts on the 'SIGINT' + (e.g., by running a 'SIGINT' trap or exiting itself); + + 2. If the pipeline does not terminate due to 'SIGINT', the program + handled the 'SIGINT' itself and did not treat it as a fatal signal. + In that case, Bash does not treat 'SIGINT' as a fatal signal, + either, instead assuming that the 'SIGINT' was used as part of the + program's normal operation (e.g., 'emacs' uses it to abort editing + commands) or deliberately discarded. However, Bash will run any + trap set on 'SIGINT', as it does with any other trapped signal it + receives while it is waiting for the foreground command to + complete, for compatibility. + + +File: bash.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 creates a new instance of itself 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 and, depending on the operating system, one +or more optional arguments for that interpreter. 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 one or more optional +arguments 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 supplied to the script. The details of how the +interpreter line is split into an interpreter name and a set of +arguments vary across systems. 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 a single argument +to a maximum of 32 characters, so it's not portable to assume that using +more than one argument will work. + + 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. It's +a common idiom to use 'env' to find 'bash' even if it's been installed +in another directory: '#!/usr/bin/env bash' will find the first +occurrence of 'bash' in '$PATH'. + + +File: bash.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', 'return', +'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: bash.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, but FILENAME does not need to be + executable. When Bash is not in POSIX mode, it searches the + current directory 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. If the '-T' option is enabled, '.' inherits any trap on + 'DEBUG'; if it is not, any 'DEBUG' trap string is saved and + restored around the call to '.', and '.' unsets the 'DEBUG' trap + while it executes. If '-T' is not set, and the sourced file + changes the 'DEBUG' trap, the new value is retained when '.' + completes. 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 [-e]] [-@] [DIRECTORY] + + Change the current working directory to DIRECTORY. If DIRECTORY is + not supplied, the value of the 'HOME' shell variable is used. If + the shell variable 'CDPATH' exists, it is used as a search path: + each directory name in 'CDPATH' is searched for DIRECTORY, with + alternative directory names in 'CDPATH' separated by a colon (':'). + If DIRECTORY begins with a slash, 'CDPATH' is not used. + + The '-P' option means to not follow symbolic links: symbolic links + are resolved while 'cd' is traversing DIRECTORY and before + processing an instance of '..' in DIRECTORY. + + By default, or when the '-L' option is supplied, symbolic links in + DIRECTORY are resolved after 'cd' processes an instance of '..' in + DIRECTORY. + + If '..' appears in DIRECTORY, it is processed by removing the + immediately preceding pathname component, back to a slash or the + beginning of DIRECTORY. + + If the '-e' option is supplied with '-P' and the current working + directory cannot be successfully determined after a successful + directory change, 'cd' will return an unsuccessful status. + + On systems that support it, the '-@' option presents the extended + attributes associated with a file as a directory. + + If DIRECTORY is '-', it is converted to '$OLDPWD' before the + directory change is attempted. + + 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. + + If the directory change is successful, 'cd' sets the value of the + 'PWD' environment variable to the new directory name, and sets the + 'OLDPWD' environment variable to the value of the current working + directory before the change. + + 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 COMMAND cannot be executed for some reason, a non-interactive + shell exits, unless the 'execfail' shell option is enabled. In + that case, it returns failure. An interactive shell returns + failure if the file cannot be executed. A subshell exits + unconditionally if 'exec' fails. 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 names of all + exported variables 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 [ARG ...] + + '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 whitespace. 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 supplied as ARG values, '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] + + Each time 'hash' is invoked, it remembers the full pathnames of the + 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'. Any + previously-remembered pathname is discarded. 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 [-aAf] [-p] [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 both options + are supplied, '-A' takes precedence. If no NAME arguments are + given, or if the '-p' option is supplied, a list of all readonly + names is printed. The other options may be used to restrict the + output to a subset of the set of readonly names. 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 stop executing and return the value N to + its caller. If N is not supplied, the return value is the exit + status of the last command executed in the function. If 'return' + is executed by a trap handler, the last command used to determine + the status is the last command executed before the trap handler. + If 'return' is executed during a 'DEBUG' trap, the last command + used to determine the status is the last command executed by the + trap handler before 'return' was invoked. 'return' may also be + used to terminate execution of a script being executed with the '.' + ('source') builtin, returning either N or the exit status of the + last command executed within the script as the exit status of the + script. If N is supplied, the return value is its least + significant 8 bits. 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 supplied a non-numeric + argument or 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 '$#' down 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' +'[' + test EXPR + + Evaluate a conditional expression EXPR and return a status of 0 + (true) or 1 (false). 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. Operator precedence is used when + there are five or more arguments. + + '! 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 + The following conditions are applied in the order listed. + + 1. 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. + 2. If the first argument is '!', the value is the negation + of the two-argument test using the second and third + arguments. + 3. If the first argument is exactly '(' and the third + argument is exactly ')', the result is the one-argument + test of the second argument. + 4. Otherwise, the expression is false. + + 4 arguments + The following conditions are applied in the order listed. + + 1. If the first argument is '!', the result is the negation + of the three-argument expression composed of the + remaining arguments. + 2. If the first argument is exactly '(' and the fourth + argument is exactly ')', the result is the two-argument + test of the second and third arguments. + 3. 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. + + When used with 'test' or '[', the '<' and '>' operators sort + lexicographically using ASCII ordering. + +'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 + pipeline (which may consist of a single simple command), a list, or + a compound command returns 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 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 using '!'. These are the same conditions + obeyed by the 'errexit' ('-e') 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 [-fnv] [NAME] + + Remove each variable or function NAME. If the '-v' option is + given, each NAME refers to a shell variable and that variable is + removed. If the '-f' option is given, the NAMEs refer to shell + functions, and the function definition is removed. If the '-n' + option is supplied, and NAME is a variable with the 'nameref' + attribute, NAME will be unset rather than the variable it + references. '-n' has no effect if the '-f' option is supplied. If + no options are supplied, each NAME refers to a variable; if there + is no variable by that name, a function with that name, if any, is + unset. Readonly variables and functions may not be unset. Some + shell variables lose their special behavior if they are unset; such + behavior is noted in the description of the individual variables. + The return status is zero unless a NAME is readonly or may not be + unset. + + +File: bash.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] [-lpsvPSVX] + 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 [-m KEYMAP] KEYSEQ:READLINE-COMMAND + bind READLINE-COMMAND-LINE + + 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' ('vi-move' is also a synonym); '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' and 'READLINE_MARK' variables + to the current location of the insertion point and the saved + insertion point (the MARK), respectively. The shell assigns + any numeric argument the user supplied to the + 'READLINE_ARGUMENT' variable. If there was no argument, that + variable is not set. If the executed command changes the + value of any of 'READLINE_LINE', 'READLINE_POINT', or + 'READLINE_MARK', those new values will be reflected in the + editing state. + + '-X' + List all key sequences bound to shell commands and the + associated commands in a format that can be reused as input. + + 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 [-aAfFgiIlnrtux] [-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, + other than '-f' and '-F', 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 each NAME is defined are + displayed as well. '-F' implies '-f'. + + The '-g' option forces variables to be created or modified at the + global scope, even when 'declare' is executed in a shell function. + It is ignored in all other cases. + + The '-I' option causes local variables to inherit the attributes + (except the 'nameref' attribute) and value of any existing variable + with the same NAME at a surrounding scope. If there is no existing + variable, the local variable is initially unset. + + 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. + + '-n' + Give each NAME the 'nameref' attribute, making it a name + reference to another variable. That other variable is defined + by the value of NAME. All references, assignments, and + attribute modifications to NAME, except for those using or + changing the '-n' attribute itself, are performed on the + variable referenced by NAME's value. The nameref attribute + cannot be applied to array variables. + + '-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' and '+A' may not be used to destroy array + variables and '+r' will not remove the readonly attribute. When + used in a function, 'declare' makes each NAME local, as with the + 'local' command, unless the '-g' option is used. If a variable + name is followed by =VALUE, the value of the variable is set to + VALUE. + + When using '-a' or '-A' and the compound assignment syntax to + create array variables, additional attributes do not take effect + until subsequent assignments. + + 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 0 unless a write error occurs. 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' + '\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) + '\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) + '\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight 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. + Bash will use the value of the 'BASH_LOADABLES_PATH' variable as a + colon-separated list of directories in which to search for + FILENAME. The default is system-dependent. 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::). + + If no options are supplied and a NAME is not a shell builtin, + 'enable' will attempt to load NAME from a shared object named NAME, + as if the command were 'enable -f NAME NAME'. + + 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. If NAME is '-', the set of shell options is made + local to the function in which 'local' is invoked: shell options + changed using the 'set' builtin inside the function are restored to + their original values when the function returns. The restore is + effected as if a series of 'set' commands were executed to restore + the values that were in place before the function. 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 [-d DELIM] [-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: + + '-d' + The first character of DELIM is used to terminate each input + line, rather than newline. If DELIM is the empty string, + 'mapfile' will terminate a line when it reads a NUL character. + '-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 DELIM (default newline) from each line read. + '-u' + Read lines from file descriptor FD instead of the standard + input. + '-C' + Evaluate CALLBACK each time QUANTUM 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 and the line to be assigned to that + element as additional arguments. 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 '-v' option causes the output to be + assigned to the variable VAR rather than being printed to the + standard output. + + 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, 'printf' interprets the following + extensions: + + '%b' + Causes 'printf' to expand backslash escape sequences in the + corresponding ARGUMENT in the same way as 'echo -e' (*note + Bash Builtins::). + '%q' + Causes 'printf' to output the corresponding ARGUMENT in a + format that can be reused as shell input. + '%Q' + like '%q', but applies any supplied precision to the ARGUMENT + before quoting it. + '%(DATEFMT)T' + Causes 'printf' to output the date-time string resulting from + using DATEFMT as a format string for 'strftime'(3). The + corresponding ARGUMENT is an integer representing the number + of seconds since the epoch. Two special argument values may + be used: -1 represents the current time, and -2 represents the + time the shell was invoked. If no argument is specified, + conversion behaves as if -1 had been given. This is an + exception to the usual 'printf' behavior. + + The %b, %q, and %T directives all use the field width and precision + arguments from the format specification and write that many bytes + from (or use that wide a field for) the expanded argument, which + usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C language + constants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value is + the ASCII value of the following character. + + 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, split + into words as described above in *note Word Splitting::, and the + first word is assigned to the first NAME, the second word to the + second NAME, and so on. If there are more words than names, the + remaining words and their intervening delimiters are 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 using the same rules the shell uses for expansion + (described above in *note Word Splitting::). 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 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. If DELIM is the empty string, + 'read' will terminate a line when it reads a NUL character. + + '-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, but uses + Readline's default filename completion. + + '-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 honors 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. The + result is not split on the characters in 'IFS'; the intent is + that the variable is assigned exactly the characters read + (with the exception of backslash; see the '-r' option below). + + '-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 then 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 (or a specified number of characters) 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 'read' times out, 'read' saves any + partial input read into the specified variable NAME. If + TIMEOUT is 0, 'read' returns immediately, without trying to + read any data. The exit status is 0 if input is available on + the specified file descriptor, or the read will return EOF, + non-zero otherwise. The exit status is greater than 128 if + the timeout is exceeded. + + '-u FD' + Read input from file descriptor FD. + + If no NAMEs are supplied, the line read, without the ending + delimiter but otherwise unmodified, is assigned to the variable + 'REPLY'. The exit status is zero, unless end-of-file is + encountered, 'read' times out (in which case the status is greater + than 128), a variable assignment error (such as assigning to a + readonly variable) occurs, or an invalid file descriptor is + supplied as the argument to '-u'. + +'readarray' + readarray [-d DELIM] [-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, which + is 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 [-afFgrxilnrtux] [-p] [NAME[=VALUE] ...] + + The 'typeset' command is supplied for compatibility with the Korn + shell. It is a synonym for the 'declare' builtin command. + +'ulimit' + ulimit [-HS] -a + ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [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; no limits are set. + + '-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. + + '-k' + The maximum number of kqueues that may be allocated. + + '-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 shell, + and, on some systems, to its children. + + '-x' + The maximum number of file locks. + + '-P' + The maximum number of pseudoterminals. + + '-R' + The maximum time a real-time process can run before blocking, + in microseconds. + + '-T' + The maximum number of threads. + + If LIMIT is given, and the '-a' option is not used, LIMIT 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 more than one + resource is specified, the limit name and unit, if appropriate, are + printed before the value. 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; '-R', which is in + microseconds; '-p', which is in units of 512-byte blocks; '-P', + '-T', '-b', '-k', '-n' and '-u', which are unscaled values; and, + when in POSIX Mode (*note Bash POSIX Mode::), '-c' and '-f', which + are in 512-byte increments. + + 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: bash.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: bash.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-NAME] [--] [-] [ARGUMENT ...] + set [+abefhkmnptuvxBCEHPT] [+o OPTION-NAME] [--] [-] [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' + Each variable or function that is created or modified is given + the export attribute and marked 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 list (*note Lists::), or a compound command (*note Compound + Commands::) 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 '!'. If a + compound command other than a subshell returns a non-zero + status because a command failed while '-e' was being ignored, + the shell does not exit. 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. + + If a compound command or shell function executes in a context + where '-e' is being ignored, none of the commands executed + within the compound command or function body will be affected + by the '-e' setting, even if '-e' is set and a command returns + a failure status. If a compound command or shell function + sets '-e' while executing in a context where '-e' is ignored, + that setting will not have any effect until the compound + command or the command containing the function call completes. + + '-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::). All processes + run in a separate process group. When a background job + completes, the shell prints a line containing its exit status. + + '-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. + + '-r' + Enable restricted shell mode. This option cannot be unset + once it has been set. + + '-t' + Exit after reading and executing one command. + + '-u' + Treat unset variables and parameters other than the special + parameters '@' or '*', or array variables subscripted with '@' + 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 resolve 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: bash.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 settings controlling optional shell behavior. + The settings can be either those listed below, or, if the '-o' + option is used, those available with the '-o' option to the 'set' + builtin command (*note The Set Builtin::). 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; if OPTNAMEs are + supplied, the output is restricted to those options. 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, 'shopt' + shows only 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: + + 'assoc_expand_once' + If set, the shell suppresses multiple evaluation of + associative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform variable + assignments, and while executing builtins that perform array + dereferencing. + + '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 external + (non-builtin) command and, if necessary, updates the values of + 'LINES' and 'COLUMNS'. This option is enabled by default. + + '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. This option is enabled by + default, but only has an effect if command history is enabled + (*note Bash History Facilities::). + + 'compat31' + 'compat32' + 'compat40' + 'compat41' + 'compat42' + 'compat43' + 'compat44' + These control aspects of the shell's compatibility mode (*note + Shell Compatibility Mode::). + + 'complete_fullquote' + If set, Bash quotes all shell metacharacters in filenames and + directory names when performing completion. If not set, Bash + removes metacharacters such as the dollar sign from the set of + characters that will be quoted in completed filenames when + these metacharacters appear in shell variable references in + words to be completed. This means that dollar signs in + variable names that expand to directories will not be quoted; + however, any dollar signs appearing in filenames will not be + quoted, either. This is active only when bash is using + backslashes to quote completed filenames. This variable is + set by default, which is the default Bash behavior in versions + through 4.2. + + 'direxpand' + If set, Bash replaces directory names with the results of word + expansion when performing filename completion. This changes + the contents of the Readline editing buffer. If not set, Bash + attempts to preserve what the user typed. + + '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. The filenames '.' and '..' + must always be matched explicitly, even if 'dotglob' is set. + + '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 at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the '--debugger' option. If set after + invocation, 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), the shell simulates a call to + 'return'. + + 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 'ERR' 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. + + 'globasciiranges' + If set, range expressions used in pattern matching bracket + expressions (*note Pattern Matching::) behave as if in the + traditional C locale when performing comparisons. That is, + the current locale's collating sequence is not taken into + account, so 'b' will not collate between 'A' and 'B', and + upper-case and lower-case ASCII characters will collate + together. + + 'globskipdots' + If set, filename expansion will never match the filenames '.' + and '..', even if the pattern begins with a '.'. This option + is enabled by default. + + 'globstar' + If set, the pattern '**' used in a filename expansion context + will match all 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::). + + 'inherit_errexit' + If set, command substitution inherits the value of the + 'errexit' option, instead of unsetting it in the subshell + environment. This option is enabled when POSIX mode is + enabled. + + '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. + + 'lastpipe' + If set, and job control is not active, the shell runs the last + command of a pipeline not executed in the background in the + current shell environment. + + '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. + + 'localvar_inherit' + If set, local variables inherit the value and attributes of a + variable of the same name that exists at a previous scope + before any new value is assigned. The 'nameref' attribute is + not inherited. + + 'localvar_unset' + If set, calling 'unset' on local variables in previous + function scopes marks them so subsequent lookups find them + unset until that function returns. This is identical to the + behavior of unsetting local variables at the current function + scope. + + '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 (*note Conditional Constructs::, when + performing pattern substitution word expansions, or when + filtering possible completions as part of programmable + completion. + + 'noexpand_translation' + If set, Bash encloses the translated results of $"..." + quoting in single quotes instead of double quotes. If the + string is not translated, this has no effect. + + 'nullglob' + If set, Bash allows filename patterns which match no files to + expand to a null string, rather than themselves. + + 'patsub_replacement' + If set, Bash expands occurrences of '&' in the replacement + string of pattern substitution to the text matched by the + pattern, as described above (*note Shell Parameter + Expansion::). This option is enabled by default. + + 'progcomp' + If set, the programmable completion facilities (*note + Programmable Completion::) are enabled. This option is + enabled by default. + + 'progcomp_alias' + If set, and programmable completion is enabled, Bash treats a + command name that doesn't have any completions as a possible + alias and attempts alias expansion. If it has an alias, Bash + attempts programmable completion using the command word + resulting from the expanded alias. + + 'promptvars' + If set, prompt strings undergo parameter expansion, command + substitution, arithmetic expansion, and quote removal after + being expanded as described below (*note Controlling the + 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. + + 'varredir_close' + If set, the shell automatically closes file descriptors + assigned using the '{varname}' redirection syntax (*note + Redirections::) instead of leaving them open when the command + completes. + + 'xpg_echo' + If set, the 'echo' builtin expands backslash-escape sequences + by default. + + +File: bash.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: bash.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: bash.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 or directory name and the + 'MAILPATH' variable is not set, Bash informs the user of the + arrival of mail in the specified file or Maildir-format directory. + +'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 + filename 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 + Controlling the Prompt::, for the complete list of escape sequences + that are expanded before 'PS1' is displayed. + +'PS2' + The secondary prompt string. The default value is '> '. 'PS2' is + expanded in the same way as 'PS1' before being displayed. + + +File: bash.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::). + +'_' + ($_, an underscore.) At shell startup, set to the 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 simple command executed in the foreground, + 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. + +'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. Assignments to + 'BASHPID' have no effect. If 'BASHPID' is unset, it loses its + special properties, even if it is subsequently reset. + +'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; however, unsetting array elements + currently does not cause aliases to be removed from the alias list. + If 'BASH_ALIASES' is unset, it loses its special properties, even + if it is subsequently reset. + +'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). Setting 'extdebug' + after the shell has started to execute a script, or referencing + this variable when 'extdebug' is not set, may result in + inconsistent values. + +'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). Setting 'extdebug' after the shell has + started to execute a script, or referencing this variable when + 'extdebug' is not set, may result in inconsistent values. + +'BASH_ARGV0' + When referenced, this variable expands to the name of the shell or + shell script (identical to '$0'; *Note Special Parameters::, for + the description of special parameter 0). Assignment to + 'BASH_ARGV0' causes the value assigned to also be assigned to '$0'. + If 'BASH_ARGV0' is unset, it loses its special properties, even if + it is subsequently reset. + +'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; however, unsetting array elements + currently does not cause command names to be removed from the hash + table. If 'BASH_CMDS' is unset, it loses its special properties, + even if it is subsequently reset. + +'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. If + 'BASH_COMMAND' is unset, it loses its special properties, even if + it is subsequently reset. + +'BASH_COMPAT' + The value is used to set the shell's compatibility level. *Note + Shell Compatibility Mode::, for a description of the various + compatibility levels and their effects. The value may be a decimal + number (e.g., 4.2) or an integer (e.g., 42) corresponding to the + desired compatibility level. If 'BASH_COMPAT' is unset or set to + the empty string, the compatibility level is set to the default for + the current version. If 'BASH_COMPAT' is set to a value that is + not one of the valid compatibility levels, the shell prints an + error message and sets the compatibility level to the default for + the current version. The valid values correspond to the + compatibility levels described below (*note Shell Compatibility + Mode::). For example, 4.2 and 42 are valid values that correspond + to the 'compat42' 'shopt' option and set the compatibility level to + 42. The current version is also a valid value. + +'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 where each corresponding member of 'FUNCNAME' was invoked. + '${BASH_LINENO[$i]}' is the line number in the source file + ('${BASH_SOURCE[$i+1]}') where '${FUNCNAME[$i]}' was called (or + '${BASH_LINENO[$i-1]}' if referenced within another shell + function). Use 'LINENO' to obtain the current line number. + +'BASH_LOADABLES_PATH' + A colon-separated list of directories in which the shell looks for + dynamically loadable builtins specified by the 'enable' command. + +'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. + +'BASH_SOURCE' + An array variable whose members are the source filenames where the + corresponding shell function names in the 'FUNCNAME' array variable + are defined. The shell function '${FUNCNAME[$i]}' is defined in + the file '${BASH_SOURCE[$i]}' and called from + '${BASH_SOURCE[$i+1]}' + +'BASH_SUBSHELL' + Incremented by one within each subshell or subshell environment + when the shell begins executing in that environment. The initial + value is 0. If 'BASH_SUBSHELL' is unset, it loses its special + properties, even if it is subsequently reset. + +'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. + +'CHILD_MAX' + Set the number of exited child status values for the shell to + remember. Bash will not allow this value to be decreased below a + POSIX-mandated minimum, and there is a maximum value (currently + 8192) that this may not exceed. The minimum value is + system-dependent. + +'COLUMNS' + Used by the 'select' command to determine the terminal width when + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell 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: , + 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::). Each array + element contains one possible completion. + +'COPROC' + An array variable created to hold the file descriptors for output + from and input to an unnamed coprocess (*note Coprocesses::). + +'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. + +'ENV' + Expanded and executed similarly to 'BASH_ENV' (*note Bash Startup + Files::) when an interactive shell is invoked in POSIX Mode (*note + Bash POSIX Mode::). + +'EPOCHREALTIME' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch as a floating point value with + micro-second granularity (see the documentation for the C library + function 'time' for the definition of Epoch). Assignments to + 'EPOCHREALTIME' are ignored. If 'EPOCHREALTIME' is unset, it loses + its special properties, even if it is subsequently reset. + +'EPOCHSECONDS' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch (see the documentation for the C + library function 'time' for the definition of Epoch). Assignments + to 'EPOCHSECONDS' are ignored. If 'EPOCHSECONDS' is unset, it + loses its special properties, even if it is subsequently reset. + +'EUID' + The numeric effective user id of the current user. This variable + is readonly. + +'EXECIGNORE' + A colon-separated list of shell patterns (*note Pattern Matching::) + defining the list of filenames to be ignored by command search + using 'PATH'. Files whose full pathnames match one of these + patterns are not considered executable files for the purposes of + completion and command execution via 'PATH' lookup. This does not + affect the behavior of the '[', 'test', and '[[' commands. Full + pathnames in the command hash table are not subject to + 'EXECIGNORE'. Use this variable to ignore shared library files + that have the executable bit set, but are not executable files. + The pattern matching honors the setting of the 'extglob' shell + option. + +'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 filename whose suffix matches one of the + entries in 'FIGNORE' is excluded from the list of matched + filenames. 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 (the one with the highest index) is '"main"'. + This variable exists only when a shell function is executing. + Assignments to 'FUNCNAME' have no effect. If 'FUNCNAME' is unset, + it loses its special properties, even if it is subsequently reset. + + This variable can be used with 'BASH_LINENO' and 'BASH_SOURCE'. + Each element of 'FUNCNAME' has corresponding elements in + 'BASH_LINENO' and 'BASH_SOURCE' to describe the call stack. For + instance, '${FUNCNAME[$i]}' was called from the file + '${BASH_SOURCE[$i+1]}' at line number '${BASH_LINENO[$i]}'. The + 'caller' builtin displays the current call stack using this + information. + +'FUNCNEST' + If set to a numeric value greater than 0, defines a maximum + function nesting level. Function invocations that exceed this + nesting level will cause the current command to abort. + +'GLOBIGNORE' + A colon-separated list of patterns defining the set of file names + to be ignored by filename expansion. If a file name matched by a + filename expansion pattern also matches one of the patterns in + 'GLOBIGNORE', it is removed from the list of matches. The pattern + matching honors the setting of the 'extglob' shell option. + +'GROUPS' + An array variable containing the list of groups of which the + current user is a member. Assignments to 'GROUPS' have no effect. + 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. Assignments to 'HISTCMD' are ignored. 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, to contain no more than that number of lines by + removing the oldest entries. The history file is also truncated to + this size after writing it when a shell exits. If the value is 0, + the history file is truncated to zero size. Non-numeric values and + numeric values less than zero inhibit truncation. The shell sets + the default value to the value of 'HISTSIZE' after reading any + startup files. + +'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'. The pattern matching honors the setting of the + 'extglob' shell option. + + '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. If + the value is 0, commands are not saved in the history list. + Numeric values less than zero result in every command being saved + on the history list (there is no limit). The shell sets the + default value to 500 after reading any startup files. + +'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'. + +'INSIDE_EMACS' + If Bash finds this variable in the environment when the shell + starts, it assumes that the shell is running in an Emacs shell + buffer and may disable line editing depending on the value of + 'TERM'. + +'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. + +'LC_TIME' + This variable determines the locale category used for data and time + formatting. + +'LINENO' + The line number in the script or shell function currently + executing. If 'LINENO' is unset, it loses its special properties, + even if it is subsequently reset. + +'LINES' + Used by the 'select' command to determine the column length for + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell 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. + +'MAPFILE' + An array variable created to hold the text read by the 'mapfile' + builtin when no variable name is supplied. + +'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. When the shell enters POSIX mode, it sets this + variable if it was not already set. + +'PPID' + The process ID of the shell's parent process. This variable is + readonly. + +'PROMPT_COMMAND' + If this variable is set, and is an array, the value of each set + element is interpreted as a command to execute before printing the + primary prompt ('$PS1'). If this is set but not an array variable, + its value is used as a command to execute instead. + +'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 Controlling the + Prompt::). Characters removed are replaced with an ellipsis. + +'PS0' + The value of this parameter is expanded like 'PS1' and displayed by + interactive shells after reading a command and before the command + is executed. + +'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 of this parameter is expanded like 'PS1' and the expanded + 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 the expanded value 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, it expands to a random + integer between 0 and 32767. Assigning a value to this variable + seeds the random number generator. If 'RANDOM' is unset, it loses + its special properties, even if it is subsequently reset. + +'READLINE_ARGUMENT' + Any numeric argument given to a Readline command that was defined + using 'bind -x' (*note Bash Builtins:: when it was invoked. + +'READLINE_LINE' + The contents of the Readline line buffer, for use with 'bind -x' + (*note Bash Builtins::). + +'READLINE_MARK' + The position of the "mark" (saved insertion point) in the Readline + line buffer, for use with 'bind -x' (*note Bash Builtins::). The + characters between the insertion point and the mark are often + called the "region". + +'READLINE_POINT' + The position of the insertion point in the Readline line buffer, + for use with 'bind -x' (*note Bash Builtins::). + +'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. The number of seconds + at shell invocation and the current time are always determined by + querying the system clock. If 'SECONDS' is unset, it loses its + special properties, even if it is subsequently reset. + +'SHELL' + This environment variable expands to the full pathname to the + shell. 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. + +'SRANDOM' + This variable expands to a 32-bit pseudo-random number each time it + is referenced. The random number generator is not linear on + systems that support '/dev/urandom' or 'arc4random', so each + returned number has no relationship to the numbers preceding it. + The random number generator cannot be seeded, so assignments to + this variable have no effect. If 'SRANDOM' is unset, it loses its + special properties, even if it is subsequently reset. + +'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 a line of input after issuing the primary + prompt. Bash terminates after waiting for that number of seconds + if a complete line of 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: bash.info, Node: Bash Features, Next: Job Control, Prev: Shell Variables, Up: Top + +6 Bash Features +*************** + +This chapter 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. +* Controlling the Prompt:: Customizing the various prompt strings. +* The Restricted Shell:: A more controlled mode of shell execution. +* Bash POSIX Mode:: Making Bash behave more closely to what + the POSIX standard specifies. +* Shell Compatibility Mode:: How Bash supports behavior that was present + in earlier versions and has changed. + + +File: bash.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 ...] + + All of the single-character options used with the 'set' builtin +(*note The Set Builtin::) can be used as options when the shell is +invoked. In addition, 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). + +'--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' + Read and execute commands from the first non-option argument + COMMAND_STRING, then exit. If there are arguments after the + COMMAND_STRING, the first argument is assigned to '$0' and any + remaining arguments are assigned to the positional parameters. The + assignment to '$0' sets the name of the shell, which is used in + warning and error messages. + +'-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 or when reading input through a pipe. + +'-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: bash.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 filenames 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 an interactive login shell exits, or a non-interactive login +shell executes the 'exit' builtin command, 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 +filename. + + 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 network connection, as when executed by the historical +remote shell daemon, usually 'rshd', or the secure shell daemon 'sshd'. +If Bash determines it is being run non-interactively 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 neither 'rshd' nor 'sshd' +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: bash.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 an interactive shell? + + +File: bash.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) and without specifying the '-c' option, 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: bash.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: bash.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. Bash expands and + displays 'PS0' after it reads a command but before executing it. + See *note Controlling the Prompt::, for a complete list of prompt + string escape sequences. + + 4. Bash executes the values of the set elements of the + 'PROMPT_COMMAND' array variable as commands 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 a shell with history enabled 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. If the 'cdspell' shell option is enabled, the shell will attempt + simple spelling correction for directory arguments to the 'cd' + builtin (see the description of the 'cdspell' option to the 'shopt' + builtin in *note The Shopt Builtin::). The 'cdspell' option is + only effective in interactive shells. + + 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: bash.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 (*note +Conditional Constructs::) and the 'test' and '[' builtin commands (*note +Bourne Shell Builtins::). The 'test' and '[' commands determine their +behavior based on the number of arguments; see the descriptions of those +commands for any other command-specific actions. + + Expressions may be unary or binary, and are formed from the following +primaries. Unary expressions are often used to examine the status of a +file. There are string operators and numeric comparison operators as +well. Bash handles several filenames specially when they are used in +expressions. If the operating system on which Bash is running provides +these special files, Bash will use them; otherwise it will emulate them +internally with this behavior: 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. The 'test' command uses ASCII ordering. + + 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. + +'-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. + +'-N FILE' + True if FILE exists and has been modified since it was last read. + +'-O FILE' + True if FILE exists and is owned by the effective user id. + +'-S FILE' + True if FILE exists and is a socket. + +'FILE1 -ef FILE2' + True if FILE1 and FILE2 refer to the same device and inode numbers. + +'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. + +'-o OPTNAME' + True if the 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::). + +'-v VARNAME' + True if the shell variable VARNAME is set (has been assigned a + value). + +'-R VARNAME' + True if the shell variable VARNAME is set and is a name reference. + +'-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. When used with the '[[' command, + this performs pattern matching as described above (*note + Conditional Constructs::). + + '=' 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. When used with the '[[' command, + ARG1 and ARG2 are evaluated as arithmetic expressions (*note Shell + Arithmetic::). + + +File: bash.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 using the '((' compound command, the 'let' +builtin, or the '-i' option to the 'declare' builtin. + + 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. + + Integer constants follow the C language definition, without suffixes +or character constants. 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 the optional 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. When +specifying N, if a non-digit is required, 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: bash.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 'blank', 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, use a shell function (*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, and +all lines that make up a compound command, before executing any of the +commands on that line or the compound command. 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 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: bash.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. Unless otherwise noted, +indexed array indices must be non-negative integers. + + 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. 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 VALUE2 ... ) +where each VALUE may be of the form '[SUBSCRIPT]='STRING. Indexed array +assignments do not require anything but STRING. 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. + + Each VALUE in the list undergoes all the shell expansions described +above (*note Shell Expansions::). + + When assigning to an associative array, the words in a compound +assignment may be either assignment statements, for which the subscript +is required, or a list of words that is interpreted as a sequence of +alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). These +are treated identically to NAME=( [KEY1]=VALUE1 [KEY2]=VALUE2 ... ). +The first word in the list determines how the remaining words are +interpreted; all assignments in a list must be of the same type. When +using key/value pairs, the keys may not be missing or empty; a final +missing value is treated like the empty string. + + This syntax is also accepted by the 'declare' builtin. Individual +array elements may be assigned to using the 'NAME[SUBSCRIPT]=VALUE' +syntax introduced above. + + When assigning to an indexed array, if NAME is subscripted by a +negative number, that number is interpreted as relative to one greater +than the maximum index of NAME, so negative indices count back from the +end of the array, and an index of -1 references the last element. + + The '+=' operator will append to an array variable when assigning +using the compound assignment syntax; see *note Shell Parameters:: +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. If the SUBSCRIPT used to reference an +element of an indexed array evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the +array, so negative indices count back from the end of the array, and an +index of -1 refers to the last element. + + Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. Any reference to a variable using a +valid subscript is legal, and 'bash' will create an array if necessary. + + An array variable is considered set if a subscript has been assigned +a value. The null string is a valid value. + + It is possible to obtain the keys (indices) of an array as well as +the values. ${!NAME[@]} and ${!NAME[*]} expand to the indices assigned +in array variable NAME. The treatment when in double quotes is similar +to the expansion of the special parameters '@' and '*' within double +quotes. + + The 'unset' builtin is used to destroy arrays. 'unset +NAME[SUBSCRIPT]' destroys the array element at index SUBSCRIPT. +Negative subscripts to indexed arrays are interpreted as described +above. Unsetting the last element of an array variable does not unset +the variable. 'unset NAME', where NAME is an array, removes the entire +array. 'unset NAME[SUBSCRIPT]' behaves differently depending on the +array type when given a subscript of '*' or '@'. When NAME is an +associative array, it removes the element with key '*' or '@'. If NAME +is an indexed array, 'unset' removes all of the elements, but does not +remove the array itself. + + When using a variable name with a subscript as an argument to a +command, such as with 'unset', without using the word expansion syntax +described above, the argument is subject to the shell's filename +expansion. If filename expansion is not desired, the argument should be +quoted. + + 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. If both options are supplied, '-A' takes precedence. +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: bash.info, Node: The Directory Stack, Next: Controlling the 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 +current directory is always the "top" of the directory stack. + + The contents of the directory stack are also visible as the value of +the 'DIRSTACK' shell variable. + + +File: bash.info, Node: Directory Stack Builtins, Up: The Directory Stack + +6.8.1 Directory Stack Builtins +------------------------------ + +'dirs' + dirs [-clpv] [+N | -N] + + 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. The current directory is always + the first directory in the stack. + + '-c' + Clears the directory stack by deleting all of the elements. + '-l' + Produces a listing using full pathnames; 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. + '+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. + +'popd' + popd [-n] [+N | -N] + + Removes elements from the directory stack. The elements are + numbered from 0 starting at the first directory listed by 'dirs'; + that is, 'popd' is equivalent to 'popd +0'. + + When no arguments are given, 'popd' removes the top directory from + the stack and changes to the new top directory. + + Arguments, if supplied, have the following meanings: + + '-n' + Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is + manipulated. + '+N' + Removes the Nth directory (counting from the left of the list + printed by 'dirs'), starting with zero, from the stack. + '-N' + Removes the Nth directory (counting from the right of the list + printed by 'dirs'), starting with zero, from the stack. + + If the top element of the directory stack is modified, and the '-n' + option was not supplied, 'popd' uses the 'cd' builtin to change to + the directory at the top of the stack. If the 'cd' fails, 'popd' + returns a non-zero value. + + Otherwise, 'popd' returns an unsuccessful status if an invalid + option is encountered, the directory stack is empty, or a + non-existent directory stack entry is specified. + + If the 'popd' command is successful, Bash runs 'dirs' to show the + final contents of the directory stack, and the return status is 0. + +'pushd' + pushd [-n] [+N | -N | DIR] + + 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, 'pushd' exchanges the top two + elements of the directory stack. + + Arguments, if supplied, have the following meanings: + + '-n' + Suppresses the normal change of directory when rotating or + 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 DIR be the top of the stack. + + After the stack has been modified, if the '-n' option was not + supplied, 'pushd' uses the 'cd' builtin to change to the directory + at the top of the stack. If the 'cd' fails, 'pushd' returns a + non-zero value. + + Otherwise, if no arguments are supplied, 'pushd' returns 0 unless + the directory stack is empty. When rotating the directory stack, + 'pushd' returns 0 unless the directory stack is empty or a + non-existent directory stack element is specified. + + If the 'pushd' command is successful, Bash runs 'dirs' to show the + final contents of the directory stack. + + +File: bash.info, Node: Controlling the Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features + +6.9 Controlling the Prompt +========================== + +Bash examines the value of the array variable 'PROMPT_COMMAND' just +before printing each primary prompt. If any elements in +'PROMPT_COMMAND' are set and non-null, Bash executes each value, in +numeric order, 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 'PS0', 'PS1', 'PS2', and 'PS4': + +'\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 value of the 'PWD' shell variable ('$PWD'), 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 The Shopt +Builtin::). This can have unwanted side effects if escaped portions of +the string appear within command substitution or contain characters +special to word expansion. + + +File: bash.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Controlling the 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', 'HISTFILE', + '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 + 'history' 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 'shopt -u + restricted_shell'. + + 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. + + The restricted shell mode is only one component of a useful +restricted environment. It should be accompanied by setting 'PATH' to a +value that allows execution of only a few verified commands (commands +that allow shell escapes are particularly vulnerable), changing the +current directory to a non-writable directory other than '$HOME' after +login, not allowing the restricted shell to execute shell scripts, and +cleaning the environment of variables that cause some commands to modify +their behavior (e.g., 'VISUAL' or 'PAGER'). + + Modern systems provide more secure ways to implement a restricted +environment, such as 'jails', 'zones', or 'containers'. + + +File: bash.info, Node: Bash POSIX Mode, Next: Shell Compatibility 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. Bash ensures that the 'POSIXLY_CORRECT' variable is set. + + 2. 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'. + + 3. Bash will not insert a command without the execute bit set into the + command hash table, even if it returns it as a (last-ditch) result + from a '$PATH' search. + + 4. The message printed by the job control code and builtins when a job + exits with a non-zero status is 'Done(status)'. + + 5. The message printed by the job control code and builtins when a job + is stopped is 'Stopped(SIGNAME)', where SIGNAME is, for example, + 'SIGTSTP'. + + 6. Alias expansion is always enabled, even in non-interactive shells. + + 7. Reserved words appearing in a context where reserved words are + recognized do not undergo alias expansion. + + 8. Alias expansion is performed when initially parsing a command + substitution. The default mode generally defers it, when enabled, + until the command substitution is executed. This means that + command substitution will not expand aliases that are defined after + the command substitution is initially parsed (e.g., as part of a + function definition). + + 9. 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. + + 10. The POSIX startup files are executed ('$ENV') rather than the + normal Bash files. + + 11. Tilde expansion is only performed on assignments preceding a + command name, rather than on all assignment statements on the line. + + 12. The default history file is '~/.sh_history' (this is the default + value of '$HISTFILE'). + + 13. Redirection operators do not perform filename expansion on the + word in the redirection unless the shell is interactive. + + 14. Redirection operators do not perform word splitting on the word in + the redirection. + + 15. 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. + + 16. Function names may not be the same as one of the POSIX special + builtins. + + 17. POSIX special builtins are found before shell functions during + command lookup. + + 18. When printing shell function definitions (e.g., by 'type'), Bash + does not print the 'function' keyword. + + 19. Literal tildes that appear as the first character in elements of + the 'PATH' variable are not expanded as described above under *note + Tilde Expansion::. + + 20. The 'time' reserved word may be used by itself as a command. When + used in this way, it displays timing statistics for the shell and + its completed children. The 'TIMEFORMAT' variable controls the + format of the timing information. + + 21. When parsing and expanding a ${...} expansion that appears within + double quotes, single quotes are no longer special and cannot be + used to quote a closing brace or other special character, unless + the operator is one of those defined to perform pattern removal. + In this case, they do not have to appear as matched pairs. + + 22. The parser does not recognize 'time' as a reserved word if the + next token begins with a '-'. + + 23. The '!' character does not introduce history expansion within a + double-quoted string, even if the 'histexpand' option is enabled. + + 24. 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. + + 25. 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. + + 26. A non-interactive shell exits with an error status if a variable + assignment error occurs in an assignment statement preceding a + special builtin, but not with any other simple command. For any + other simple command, the shell aborts execution of that command, + and execution continues at the top level ("the shell shall not + perform any further processing of the command in which the error + occurred"). + + 27. 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. + + 28. Non-interactive shells exit if FILENAME in '.' FILENAME is not + found. + + 29. Non-interactive shells exit if a syntax error in an arithmetic + expansion results in an invalid expression. + + 30. Non-interactive shells exit if a parameter expansion error occurs. + + 31. Non-interactive shells exit if there is a syntax error in a script + read with the '.' or 'source' builtins, or in a string processed by + the 'eval' builtin. + + 32. While variable indirection is available, it may not be applied to + the '#' and '?' special parameters. + + 33. Expanding the '*' special parameter in a pattern context where the + expansion is double-quoted does not treat the '$*' as if it were + double-quoted. + + 34. Assignment statements preceding POSIX special builtins persist in + the shell environment after the builtin completes. + + 35. The 'command' builtin does not prevent builtins that take + assignment statements as arguments from expanding them as + assignment statements; when not in POSIX mode, assignment builtins + lose their assignment statement expansion properties when preceded + by 'command'. + + 36. 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. + + 37. The output of 'kill -l' prints all the signal names on a single + line, separated by spaces, without the 'SIG' prefix. + + 38. The 'kill' builtin does not accept signal names with a 'SIG' + prefix. + + 39. The 'export' and 'readonly' builtin commands display their output + in the format required by POSIX. + + 40. The 'trap' builtin displays signal names without the leading + 'SIG'. + + 41. 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. + + 42. 'trap -p' displays signals whose dispositions are set to SIG_DFL + and those that were ignored when the shell started. + + 43. The '.' and 'source' builtins do not search the current directory + for the filename argument if it is not found by searching 'PATH'. + + 44. Enabling POSIX mode has the effect of setting the + 'inherit_errexit' option, so subshells spawned to execute command + substitutions inherit the value of the '-e' option from the parent + shell. When the 'inherit_errexit' option is not enabled, Bash + clears the '-e' option in such subshells. + + 45. Enabling POSIX mode has the effect of setting the 'shift_verbose' + option, so numeric arguments to 'shift' that exceed the number of + positional parameters will result in an error message. + + 46. When the 'alias' builtin displays alias definitions, it does not + display them with a leading 'alias ' unless the '-p' option is + supplied. + + 47. When the 'set' builtin is invoked without options, it does not + display shell function names and definitions. + + 48. 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. + + 49. 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. + + 50. When the 'cd' builtin cannot change a directory because the length + of the pathname constructed from '$PWD' and the directory name + supplied as an argument exceeds 'PATH_MAX' when all symbolic links + are expanded, 'cd' will fail instead of attempting to use only the + supplied directory name. + + 51. 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. + + 52. When listing the history, the 'fc' builtin does not include an + indication of whether or not a history entry has been modified. + + 53. The default editor used by 'fc' is 'ed'. + + 54. 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'. + + 55. The 'vi' editing mode will invoke the 'vi' editor directly when + the 'v' command is run, instead of checking '$VISUAL' and + '$EDITOR'. + + 56. 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. + + 57. The 'ulimit' builtin uses a block size of 512 bytes for the '-c' + and '-f' options. + + 58. 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. + + 59. The 'read' builtin may be interrupted by a signal for which a trap + has been set. If Bash receives a trapped signal while executing + 'read', the trap handler executes and 'read' returns an exit status + greater than 128. + + 60. The 'printf' builtin uses 'double' (via 'strtod') to convert + arguments corresponding to floating point conversion specifiers, + instead of 'long double' if it's available. The 'L' length + modifier forces 'printf' to use 'long double' if it's available. + + 61. Bash removes an exited background process's status from the list + of such statuses after the 'wait' builtin is used to obtain it. + + 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: bash.info, Node: Shell Compatibility Mode, Prev: Bash POSIX Mode, Up: Bash Features + +6.12 Shell Compatibility Mode +============================= + +Bash-4.0 introduced the concept of a "shell compatibility level", +specified as a set of options to the shopt builtin ('compat31', +'compat32', 'compat40', 'compat41', and so on). There is only one +current compatibility level - each option is mutually exclusive. The +compatibility level is intended to allow users to select behavior from +previous versions that is incompatible with newer versions while they +migrate scripts to use current features and behavior. It's intended to +be a temporary solution. + + This section 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 subsequent versions). + + If a user enables, say, 'compat32', it may affect the behavior of +other compatibility levels up to and including the current compatibility +level. The idea is that each compatibility level controls behavior that +changed in that version of Bash, but that behavior may have been present +in earlier versions. For instance, the change to use locale-based +comparisons with the '[[' command came in bash-4.1, and earlier versions +used ASCII-based comparisons, so enabling 'compat32' will enable +ASCII-based comparisons as well. That granularity may not be sufficient +for all uses, and as a result users should employ compatibility levels +carefully. Read the documentation for a particular feature to find out +the current behavior. + + Bash-4.3 introduced a new shell variable: 'BASH_COMPAT'. The value +assigned to this variable (a decimal version number like 4.2, or an +integer corresponding to the 'compat'NN option, like 42) determines the +compatibility level. + + Starting with bash-4.4, Bash has begun deprecating older +compatibility levels. Eventually, the options will be removed in favor +of 'BASH_COMPAT'. + + Bash-5.0 is the final version for which there will be an individual +shopt option for the previous version. Users should use 'BASH_COMPAT' +on bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each +compatibility level setting. The 'compat'NN tag is used as shorthand +for setting the compatibility level to NN using one of the following +mechanisms. For versions prior to bash-5.0, the compatibility level may +be set using the corresponding 'compat'NN shopt option. For bash-4.3 +and later versions, the 'BASH_COMPAT' variable is preferred, and it is +required for bash-5.1 and later versions. + +'compat31' + * quoting the rhs of the '[[' command's regexp matching operator + (=~) has no special effect + +'compat32' + * interrupting a command list such as "a ; b ; c" causes the + execution of the next command in the list (in bash-4.0 and + later versions, the shell acts as if it received the + interrupt, so interrupting one command in a list aborts the + execution of the entire list) + +'compat40' + * the '<' and '>' operators to the '[[' command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII collation + and strcmp(3); bash-4.1 and later use the current locale's + collation sequence and strcoll(3). + +'compat41' + * in posix mode, 'time' may be followed by options and still be + recognized as a reserved word (this is POSIX interpretation + 267) + * in posix mode, the parser requires that an even number of + single quotes occur in the WORD portion of a double-quoted + ${...} parameter expansion and treats them specially, so that + characters within the single quotes are considered quoted + (this is POSIX interpretation 221) + +'compat42' + * the replacement string in double-quoted pattern substitution + does not undergo quote removal, as it does in versions after + bash-4.2 + * in posix mode, single quotes are considered special when + expanding the WORD portion of a double-quoted ${...} parameter + expansion and can be used to quote a closing brace or other + special character (this is part of POSIX interpretation 221); + in later versions, single quotes are not special within + double-quoted word expansions + +'compat43' + * the shell does not print a warning message if an attempt is + made to use a quoted compound assignment as an argument to + declare (e.g., declare -a foo='(1 2)'). Later versions warn + that this usage is deprecated + * word expansion errors are considered non-fatal errors that + cause the current command to fail, even in posix mode (the + default behavior is to make them fatal errors that cause the + shell to exit) + * when executing a shell function, the loop state + (while/until/etc.) is not reset, so 'break' or 'continue' in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to prevent + this + +'compat44' + * the shell sets up the values used by 'BASH_ARGV' and + 'BASH_ARGC' so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + * a subshell inherits loops from its parent context, so 'break' + or 'continue' will cause the subshell to exit. Bash-5.0 and + later reset the loop state to prevent the exit + * variable assignments preceding builtins like 'export' and + 'readonly' that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + +'compat50 (set using BASH_COMPAT)' + * Bash-5.1 changed the way '$RANDOM' is generated to introduce + slightly more randomness. If the shell compatibility level is + set to 50 or lower, it reverts to the method from bash-5.0 and + previous versions, so seeding the random number generator by + assigning a value to 'RANDOM' will produce the same sequence + as in bash-5.0 + * If the command hash table is empty, Bash versions prior to + bash-5.1 printed an informational message to that effect, even + when producing output that can be reused as input. Bash-5.1 + suppresses that message when the '-l' option is supplied. + +'compat51 (set using BASH_COMPAT)' + * The 'unset' builtin will unset the array 'a' given an argument + like 'a[@]'. Bash-5.2 will unset an element with key '@' + (associative arrays) or remove all the elements without + unsetting the array (indexed arrays) + * arithmetic commands ( ((...)) ) and the expressions in an + arithmetic for statement can be expanded more than once + * expressions used as arguments to arithmetic operators in the + '[[' conditional command can be expanded more than once + * the expressions in substring parameter brace expansion can be + expanded more than once + * the expressions in the $(( ... )) word expansion can be + expanded more than once + * arithmetic expressions used as indexed array subscripts can be + expanded more than once + * 'test -v', when given an argument of 'A[@]', where A is an + existing associative array, will return true if the array has + any set elements. Bash-5.2 will look for and report on a key + named '@' + * the ${PARAMETER[:]=VALUE} word expansion will return VALUE, + before any variable-specific transformations have been + performed (e.g., converting to lowercase). Bash-5.2 will + return the final value assigned to the variable. + * Parsing command substitutions will behave as if extended glob + (*note The Shopt Builtin::) is enabled, so that parsing a + command substitution containing an extglob pattern (say, as + part of a shell function) will not fail. This assumes the + intent is to enable extglob before the command is executed and + word expansions are performed. It will fail at word expansion + time if extglob hasn't been enabled by the time the command is + executed. + + +File: bash.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: bash.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 job whose command name begins with +'ce'. 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. + + When the shell is waiting for a job or process using the 'wait' +builtin, and job control is enabled, 'wait' will return when the job +changes state. The '-f' option causes 'wait' to wait until the job or +process terminates before returning. + + +File: bash.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' + Display only running jobs. + + '-s' + Display only 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|-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 '-L' option is equivalent to + '-l'. 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 [-fn] [-p VARNAME] [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, 'wait' waits + for all running background jobs and the last-executed process + substitution, if its process id is the same as $!, and the return + status is zero. If the '-n' option is supplied, 'wait' waits for a + single job from the list of PIDs or JOBSPECs or, if no arguments + are supplied, any job, to complete and returns its exit status. If + none of the supplied arguments is a child of the shell, or if no + arguments are supplied and the shell has no unwaited-for children, + the exit status is 127. If the '-p' option is supplied, the + process or job identifier of the job for which the exit status is + returned is assigned to the variable VARNAME named by the option + argument. The variable will be unset initially, before any + assignment. This is useful only when the '-n' option is supplied. + Supplying the '-f' option, when job control is enabled, forces + 'wait' to wait for each PID or JOBSPEC to terminate before + returning its status, instead of returning when it changes status. + If neither JOBSPEC nor PID specifies an active child process of the + shell, the return status is 127. If 'wait' is interrupted by a + signal, the return status will be greater than 128, as described + above (*note Signals::). Otherwise, the return status is the exit + status of the last process or job waited for. + +'disown' + disown [-ar] [-h] [JOBSPEC ... | PID ... ] + + Without options, remove each JOBSPEC 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 the '-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, or a shell without job control enabled, + cannot be suspended; the '-f' option can be used to override this + and force the suspension. The return status is 0 unless the shell + is a login shell or job control is not enabled and '-f' is not + supplied. + + When job control is not active, the 'kill' and 'wait' builtins do not +accept JOBSPEC arguments. They must be supplied process IDs. + + +File: bash.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: bash.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. +* A Programmable Completion Example:: An example shell function for + generating possible completions. + + +File: bash.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 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 +key is pressed. The Meta key is labeled on many keyboards. On +keyboards with two keys labeled (usually to either side of the +space bar), the on the left side is generally set to work as a +Meta key. The 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, or another key working as a +Meta key, the identical keystroke can be generated by typing +_first_, and then typing . Either process is known as "metafying" +the 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, , +, , , , and all stand for themselves when seen +in this text, or in an init file (*note Readline Init File::). If your +keyboard lacks a key, typing will produce the desired +character. The key may be labeled or on some +keyboards. + + +File: bash.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 . You do not have to be at the end of +the line to press ; 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: bash.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. + or + 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 key might be set to +delete the character to the left of the cursor and the key set to +delete the character underneath the cursor, like 'C-d', rather than the +character to the left of the cursor.) + + +File: bash.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 . +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: bash.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-' + Kill from the cursor to 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-' 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: bash.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: bash.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 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 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: bash.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 their 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'. The 'bind' builtin command can also +be used to set Readline keybindings and variables. *Note Bash +Builtins::. + + 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: bash.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. + + 'active-region-start-color' + A string variable that controls the text color and background + when displaying the text in the active region (see the + description of 'enable-active-region' below). This string + must not take up any physical character positions on the + display, so it should consist only of terminal escape + sequences. It is output to the terminal before displaying the + text in the active region. This variable is reset to the + default value whenever the terminal type changes. The default + value is the string that puts the terminal in standout mode, + as obtained from the terminal's terminfo description. A + sample value might be '\e[01;33m'. + + 'active-region-end-color' + A string variable that "undoes" the effects of + 'active-region-start-color' and restores "normal" terminal + display appearance after displaying text in the active region. + This string must not take up any physical character positions + on the display, so it should consist only of terminal escape + sequences. It is output to the terminal after displaying the + text in the active region. This variable is reset to the + default value whenever the terminal type changes. The default + value is the string that restores the terminal from standout + mode, as obtained from the terminal's terminfo description. A + sample value might be '\e[0m'. + + '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' (the default), Readline attempts to bind the + control characters treated specially by the kernel's terminal + driver to their Readline equivalents. + + 'blink-matching-paren' + If set to 'on', Readline attempts to briefly move the cursor + to an opening parenthesis when a closing parenthesis is + inserted. The default is 'off'. + + 'colored-completion-prefix' + If set to 'on', when listing completions, Readline displays + the common prefix of the set of possible completions using a + different color. The color definitions are taken from the + value of the 'LS_COLORS' environment variable. If there is a + color definition in 'LS_COLORS' for the custom suffix + 'readline-colored-completion-prefix', Readline uses this color + for the common prefix instead of its default. The default is + 'off'. + + 'colored-stats' + If set to 'on', Readline displays possible completions using + different colors to indicate their file type. The color + definitions are taken from the value of the 'LS_COLORS' + environment variable. The default is 'off'. + + 'comment-begin' + The string to insert at the beginning of the line when the + 'insert-comment' command is executed. The default value is + '"#"'. + + 'completion-display-width' + The number of screen columns used to display possible matches + when performing completion. The value is ignored if it is + less than 0 or greater than the terminal screen width. A + value of 0 will cause matches to be displayed one per line. + The default value is -1. + + 'completion-ignore-case' + If set to 'on', Readline performs filename matching and + completion in a case-insensitive fashion. The default value + is 'off'. + + 'completion-map-case' + If set to 'on', and COMPLETION-IGNORE-CASE is enabled, + Readline treats hyphens ('-') and underscores ('_') as + equivalent when performing case-insensitive filename matching + and completion. 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 or equal to this value, Readline will ask whether or not + the user wishes to view them; otherwise, they are simply + listed. This variable must be set to an integer value greater + than or equal to zero. A zero value means Readline should + never ask; negative values are treated as zero. 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 character, converting them + to a meta-prefixed key sequence. The default value is 'on', + but will be set to 'off' if the locale is one that contains + eight-bit characters. This variable is dependent on the + 'LC_CTYPE' locale category, and may change if the locale is + changed. + + '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'. + + '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'. + + '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'. + + 'emacs-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when emacs editing mode is active. The value is + expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the '\1' and '\2' escapes to begin and end sequences of + non-printing characters, which can be used to embed a terminal + control sequence into the mode string. The default is '@'. + + 'enable-active-region' + The "point" is the current cursor position, and "mark" refers + to a saved cursor position (*note Commands For Moving::). The + text between the point and mark is referred to as the + "region". When this variable is set to 'On', Readline allows + certain commands to designate the region as "active". When + the region is active, Readline highlights the text in the + region using the value of the 'active-region-start-color', + which defaults to the string that enables the terminal's + standout mode. The active region shows the text inserted by + bracketed-paste and any matching text found by incremental and + non-incremental history searches. The default is 'On'. + + 'enable-bracketed-paste' + When set to 'On', Readline configures the terminal to insert + each paste into the editing buffer as a single string of + characters, instead of treating each character as if it had + been read from the keyboard. This is called putting the + terminal into "bracketed paste mode"; it prevents Readline + from executing any editing commands bound to key sequences + appearing in the pasted text. 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, any existing history entries are + deleted and no new entries are saved. If set to a value less + than zero, the number of history entries is not limited. By + default, the number of history entries is not limited. If an + attempt is made to set HISTORY-SIZE to a non-numeric value, + the maximum number of history entries will be set to 500. + + '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. This variable is automatically set to 'on' + for terminals of height 1. 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', but Readline will set it to 'on' if + the locale contains eight-bit characters. The name + 'meta-flag' is a synonym for this variable. This variable is + dependent on the 'LC_CTYPE' locale category, and may change if + the locale is changed. + + '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 and 'C-J' will terminate + an incremental search. + + 'keymap' + Sets Readline's idea of the current keymap for key binding + commands. Built-in 'keymap' names are 'emacs', + 'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move', + 'vi-command', and 'vi-insert'. 'vi' is equivalent to + 'vi-command' ('vi-move' is also a synonym); 'emacs' is + equivalent to 'emacs-standard'. Applications may add + additional names. The default value is 'emacs'. The value of + the 'editing-mode' variable also affects the default keymap. + + 'keyseq-timeout' + Specifies the duration Readline will wait for a character when + reading an ambiguous key sequence (one that can form a + complete key sequence using the input read so far, or can take + additional input to complete a longer key sequence). If no + input is received within the timeout, Readline will use the + shorter but complete key sequence. Readline uses this value + to determine whether or not input is available on the current + input source ('rl_instream' by default). The value is + specified in milliseconds, so a value of 1000 means that + Readline will wait one second for additional input. If this + variable is set to a value less than or equal to zero, or to a + non-numeric value, Readline will wait until another key is + pressed to decide which key sequence to complete. The default + value is '500'. + + '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. If set to 'off', the leading + '.' must be supplied by the user in the filename to be + completed. This variable is 'on' by default. + + 'menu-complete-display-prefix' + If set to 'on', menu completion displays the common prefix of + the list of possible completions (which may be empty) before + cycling through the list. The default is 'off'. + + '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', but Readline will set it to + 'on' if the locale contains eight-bit characters. This + variable is dependent on the 'LC_CTYPE' locale category, and + may change if the locale is changed. + + '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'. + + 'show-mode-in-prompt' + If set to 'on', add a string to the beginning of the prompt + indicating the editing mode: emacs, vi command, or vi + insertion. The mode strings are user-settable (e.g., + EMACS-MODE-STRING). 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'. + + 'vi-cmd-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in command mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(cmd)'. + + 'vi-ins-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in insertion mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(ins)'. + + '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 be 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 example above, '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 ' <[> <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: bash.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, after any comparison operator, extends to the + end of the line; unless otherwise noted, 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. + + 'version' + The 'version' test may be used to perform comparisons against + specific Readline versions. The 'version' expands to the + current Readline version. The set of comparison operators + includes '=' (and '=='), '!=', '<=', '>=', '<', and '>'. The + version number supplied on the right side of the operator + consists of a major version number, an optional decimal point, + and an optional minor version (e.g., '7.1'). If the minor + version is omitted, it is assumed to be '0'. The operator may + be separated from the string 'version' and from the version + number argument by whitespace. The following example sets a + variable if the Readline version being used is 7.0 or newer: + $if version >= 7.0 + set show-mode-in-prompt on + $endif + + '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 + + 'variable' + The VARIABLE construct provides simple equality tests for + Readline variables and values. The permitted comparison + operators are '=', '==', and '!='. The variable name must be + separated from the comparison operator by whitespace; the + operator may be separated from the value on the right hand + side by whitespace. Both string and boolean variables may be + tested. Boolean variables must be tested against the values + ON and OFF. The following example is equivalent to the + 'mode=emacs' test described above: + $if editing-mode == emacs + set show-mode-in-prompt on + $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: bash.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 system-wide 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 150 or more possible completions for a word, + # ask whether or not the user 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: bash.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: bash.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 (M-C-f)' + Move forward to the end of the next word. Words are delimited by + non-quoted shell metacharacters. + +'shell-backward-word (M-C-b)' + Move back to the start of the current or previous word. Words are + delimited by non-quoted shell metacharacters. + +'previous-screen-line ()' + Attempt to move point to the same physical screen column on the + previous physical screen line. This will not have the desired + effect if the current Readline line does not take up more than one + physical line or if point is not greater than the length of the + prompt plus the screen width. + +'next-screen-line ()' + Attempt to move point to the same physical screen column on the + next physical screen line. This will not have the desired effect + if the current Readline line does not take up more than one + physical line or if the length of the current Readline line is not + greater than the length of the prompt plus the screen width. + +'clear-display (M-C-l)' + Clear the screen and, if possible, the terminal's scrollback + buffer, then redraw the current line, leaving the current line at + the top of the screen. + +'clear-screen (C-l)' + Clear the screen, then 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: bash.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. + This command sets the region to the matched text and activates the + mark. + +'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. + This command sets the region to the matched text and activates the + mark. + +'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. The search string may match + anywhere in a history line. + +'non-incremental-forward-search-history (M-n)' + Search forward starting at the current line and moving 'down' + through the history as necessary using a non-incremental search for + a string supplied by the user. The search string may match + anywhere in a history line. + +'history-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string must match at the beginning of a history line. 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. The search + string must match at the beginning of a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-backward ()' + Search backward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. 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 a numeric argument, behave exactly + like 'yank-nth-arg'. Successive calls to 'yank-last-arg' move back + through the history list, inserting the last word (or the word + specified by the argument to the first call) of each line in turn. + Any numeric argument supplied to these successive calls determines + the direction to move through the history. A negative argument + switches the direction through the history (back or forward). The + history expansion facilities are used to extract the last argument, + as if the '!$' history expansion had been specified. + +'operate-and-get-next (C-o)' + Accept the current line for return to the calling application as if + a newline had been entered, and fetch the next line relative to the + current line from the history for editing. A numeric argument, if + supplied, specifies the history entry to use instead of the current + line. + +'fetch-history ()' + With a numeric argument, fetch that entry from the history list and + make it the current line. Without an argument, move back to the + first entry in the history list. + + +File: bash.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands + +8.4.3 Commands For Changing Text +-------------------------------- + +'end-of-file (usually C-d)' + The character indicating end-of-file as set, for example, by + 'stty'. If this character is read when there are no characters on + the line, and point is at the beginning of the line, Readline + interprets it as the end of input and returns EOF. + +'delete-char (C-d)' + Delete the character at point. If this function is bound to the + same character as the tty EOF character, as 'C-d' commonly is, see + above for the effects. + +'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. + +'bracketed-paste-begin ()' + This function is intended to be bound to the "bracketed paste" + escape sequence sent by some terminals, and such a binding is + assigned by default. It allows Readline to insert the pasted text + as a single unit without treating each character as if it had been + read from the keyboard. The characters are inserted as if each one + was bound to 'self-insert' instead of executing any editing + commands. + + Bracketed paste sets the region (the characters between point and + the mark) to the inserted text. It uses the concept of an _active + mark_: when the mark is active, Readline redisplay uses the + terminal's standout mode to denote the region. + +'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: bash.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. With a negative + numeric argument, kill backward from the cursor to the beginning of + the current line. + +'backward-kill-line (C-x Rubout)' + Kill backward from the cursor to the beginning of the current line. + With a negative numeric argument, kill forward from the cursor to + the end of the current 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-)' + Kill the word behind point. Word boundaries are the same as + 'backward-word'. + +'shell-kill-word (M-C-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 'shell-forward-word'. + +'shell-backward-kill-word ()' + Kill the word behind point. Word boundaries are the same as + 'shell-backward-word'. + +'shell-transpose-words (M-C-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. Word + boundaries are the same as 'shell-forward-word' and + '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: bash.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 nor 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: bash.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands + +8.4.6 Letting Readline Type For You +----------------------------------- + +'complete ()' + 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. When + displaying completions, Readline sets the number of columns used + for display to the value of 'completion-display-width', the value + of the environment variable 'COLUMNS', or the screen width, in that + order. + +'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 , 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-)' + 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: bash.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. + +'print-last-kbd-macro ()' + Print the last keyboard macro defined in a format suitable for the + INPUTRC file. + + +File: bash.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-lowercase-version (M-A, M-B, M-X, ...)' + If the metafied character X is upper case, run the command that is + bound to the corresponding metafied lower case character. The + behavior is undefined if X is already lower case. + +'prefix-meta ()' + Metafy the next character typed. This is for keyboards without a + meta key. Typing ' 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 argument 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 argument 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. + +'spell-correct-word (C-x s)' + Perform spelling correction on the current word, treating it as a + directory or filename, in the same way as the 'cdspell' shell + option. Word boundaries are the same as those used by + 'shell-forward-word'. + +'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'. + +'edit-and-execute-command (C-x C-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: bash.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 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 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: bash.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. If +there is no default compspec, Bash attempts alias expansion on the +command word as a final resort, and attempts to find a compspec for the +command word from any successful expansion + + 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 within the +string, in order to provide a mechanism for the words to contain shell +metacharacters or characters in the value of 'IFS'. 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 ($1) is the name of +the command whose arguments are being completed, the second argument +($2) is the word being completed, and the third argument ($3) 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, one per array element. + + 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. If the 'nocasematch' shell option +(see the description of 'shopt' in *note The Shopt Builtin::) is +enabled, the match is performed without regard to the case of alphabetic +characters. + + 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 new 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 -o bashdefault -o default + + +File: bash.info, Node: Programmable Completion Builtins, Next: A Programmable Completion Example, Prev: Programmable Completion, Up: Command Line Editing + +8.7 Programmable Completion Builtins +==================================== + +Three builtin commands are available to manipulate the programmable +completion facilities: one to specify how the arguments to a particular +command are to be completed, and two to modify the completion as it is +happening. + +'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] [-DEI] [-A ACTION] [-G GLOBPAT] + [-W WORDLIST] [-F FUNCTION] [-C COMMAND] [-X FILTERPAT] + [-P PREFIX] [-S SUFFIX] NAME [NAME ...] + complete -pr [-DEI] [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 other + supplied 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 other supplied options and actions should apply to "empty" + command completion; that is, completion attempted on a blank line. + The '-I' option indicates that other supplied options and actions + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. If multiple options are supplied, + the '-D' option takes precedence over '-E', and both take + precedence over '-I'. If any of '-D', '-E', or '-I' are supplied, + any other NAME arguments are ignored; these completions only apply + to the case specified by the option. + + The process of applying these completion specifications when word + completion is attempted is described above (*note Programmable + Completion::). + + 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'. + + 'noquote' + Tell Readline not to quote the completed words if they + are filenames (quoting filenames is the default). + + 'nosort' + Tell Readline not to sort the list of possible + completions alphabetically. + + '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'. + + '-C COMMAND' + COMMAND is executed in a subshell environment, and its output + is used as the possible completions. Arguments are passed as + with the '-F' option. + + '-F FUNCTION' + The shell function FUNCTION is executed in the current shell + environment. When it is executed, $1 is the name of the + command whose arguments are being completed, $2 is the word + being completed, and $3 is the word preceding the word being + completed, as described above (*note Programmable + Completion::). When it finishes, the possible completions are + retrieved from the value of the 'COMPREPLY' array variable. + + '-G GLOBPAT' + The filename expansion pattern GLOBPAT is expanded to generate + the possible completions. + + '-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. + + '-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. + + '-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. + + 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] [-DEI] [+o OPTION] [NAME] + Modify completion options for each NAME according to the OPTIONs, + or for the currently-executing 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 other supplied 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 other supplied options should apply to + "empty" command completion; that is, completion attempted on a + blank line. The '-I' option indicates that other supplied options + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. + + If multiple options are supplied, the '-D' option takes precedence + over '-E', and both take precedence over '-I' + + 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: bash.info, Node: A Programmable Completion Example, Prev: Programmable Completion Builtins, Up: Command Line Editing + +8.8 A Programmable Completion Example +===================================== + +The most common way to obtain additional completion functionality beyond +the default actions 'complete' and 'compgen' provide is to use a shell +function and bind it to a particular command using 'complete -F'. + + The following function provides completions for the 'cd' builtin. It +is a reasonably good example of what shell functions must do when used +for completion. This function uses the word passed as '$2' to determine +the directory name to complete. You can also use the 'COMP_WORDS' array +variable; the current word is indexed by the 'COMP_CWORD' variable. + + The function relies on the 'complete' and 'compgen' builtins to do +much of the work, adding only the things that the Bash 'cd' does beyond +accepting basic directory names: tilde expansion (*note Tilde +Expansion::), searching directories in $CDPATH, which is described above +(*note Bourne Shell Builtins::), and basic support for the 'cdable_vars' +shell option (*note The Shopt Builtin::). '_comp_cd' modifies the value +of IFS so that it contains only a newline to accommodate file names +containing spaces and tabs - 'compgen' prints the possible completions +it generates one per line. + + Possible completions go into the COMPREPLY array variable, one +completion per array element. The programmable completion system +retrieves the completions from there when the function returns. + + # A completion function for the cd builtin + # based on the cd completion function from the bash_completion package + _comp_cd() + { + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, which also expands tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=${CDPATH/#:/.:} + _cdpath=${_cdpath//::/:.:} + _cdpath=${_cdpath/%:/:.} + for i in ${_cdpath//:/$'\n'}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="${#COMPREPLY[@]}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=${j#$i/} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + return 0 + } + + We install the completion function using the '-F' option to +'complete': + + # Tell readline to quote appropriate and append slashes to directories; + # use the bash default completion for other arguments + complete -o filenames -o nospace -o bashdefault -F _comp_cd cd + +Since we'd like Bash and Readline to take care of some of the other +details for us, we use several other options to tell Bash and Readline +what to do. The '-o filenames' option tells Readline that the possible +completions should be treated as filenames, and quoted appropriately. +That option will also cause Readline to append a slash to filenames it +can determine are directories (which is why we might want to extend +'_comp_cd' to append a slash if we're using directories found via +CDPATH: Readline can't tell those completions are directories). The '-o +nospace' option tells Readline to not append a space character to the +directory name, in case we want to append to it. The '-o bashdefault' +option brings in the rest of the "Bash default" completions - possible +completions that Bash adds to the default Readline set. These include +things like command name completion, variable completion for words +beginning with '$' or '${', completions containing pathname expansion +patterns (*note Filename Expansion::), and so on. + + Once installed using 'complete', '_comp_cd' will be called every time +we attempt word completion for a 'cd' command. + + Many more examples - an extensive collection of completions for most +of the common GNU, Unix, and Linux commands - are available as part of +the bash_completion project. This is installed by default on many +GNU/Linux distributions. Originally written by Ian Macdonald, the +project now lives at . There +are ports for other systems such as Solaris and Mac OS X. + + An older version of the bash_completion package is distributed with +bash in the 'examples/complete' subdirectory. + + +File: bash.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: bash.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 a shell with history enabled 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 unset, or set to null, a +non-numeric value, or a numeric value less than zero, the history file +is not truncated. + + 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 following history entry. + + 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 The Shopt Builtin::, for a description of 'shopt'. + + +File: bash.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] + + The first form selects a range of commands from FIRST to LAST from + the history list and displays or edits and re-executes them. 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). + + When listing, a FIRST or LAST of 0 is equivalent to -1 and -0 is + equivalent to the current command (usually the 'fc' command); + otherwise 0 is equivalent to -1 and -0 is invalid. + + 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. COMMAND is + interpreted the same as FIRST above. + + 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 -d START-END + 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. If OFFSET is + positive, it should be specified as it appears when the + history is displayed. If OFFSET is negative, it is + interpreted as relative to one greater than the last history + position, so negative indices count back from the end of the + history, and an index of '-1' refers to the current 'history + -d' command. + + '-d START-END' + Delete the range of history entries between positions START + and END, inclusive. Positive and negative values for START + and END are interpreted as described above. + + '-a' + Append the new history lines to the history file. These are + history lines entered since the beginning of the current Bash + session, but not already appended 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 history file and append its contents to the history + list. + + '-w' + Write out the current history list 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. + + If a FILENAME argument is supplied when any of the '-w', '-r', + '-a', or '-n' options is used, Bash uses FILENAME as the history + file. If not, then the value of the 'HISTFILE' variable is used. + + The return value is 0 unless an invalid option is encountered, an + error occurs while reading or writing the history file, an invalid + OFFSET or range is supplied as an argument to '-d', or the history + expansion supplied as an argument to '-p' fails. + + +File: bash.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 is performed immediately after a complete line is +read, before the shell breaks it into words, and is performed on each +line individually. Bash attempts to inform the history expansion +functions about quoting still in effect from previous lines. + + 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. + + History expansion implements shell-like quoting conventions: a +backslash can be used to remove the special handling for the next +character; single quotes enclose verbatim sequences of characters, and +can be used to inhibit history expansion; and characters enclosed within +double quotes may be subject to history expansion, since backslash can +escape the history expansion character, but single quotes may not, since +they are not treated specially within double quotes. + + When using the shell, only '\' and ''' may be used to escape the +history expansion character, but the history expansion character is also +treated as quoted if it immediately precedes the closing double quote in +a double-quoted string. + + Several shell options settable with the 'shopt' builtin (*note The +Shopt Builtin::) 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: bash.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. Unless the reference is absolute, events are relative to +the current position 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 preceding the current position in + the history list starting with STRING. + +'!?STRING[?]' + Refer to the most recent command preceding the current position in + the history list containing STRING. The trailing '?' may be + omitted if the STRING is followed immediately by a newline. If + STRING is missing, the string from the most recent search is used; + it is an error if there is no previous search string. + +'^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: bash.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 first word matched by the most recent '?STRING?' search, if the + search string begins with a character that is part of a word. + +'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 'x' is + missing, it defaults to 0. + + If a word designator is supplied without an event specification, the +previous command is used as the event. + + +File: bash.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 ':'. These modify, +or edit, the word or words selected from the history event. + +'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. The 'q' and 'x' modifiers are mutually + exclusive; the last one supplied is used. + +'s/OLD/NEW/' + Substitute NEW for the first occurrence of OLD in the event line. + Any character may be used as the delimiter 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 '&'. If OLD is null, it is set to the last OLD + substituted, or, if no previous history substitutions took place, + the last STRING in a !?STRING'[?]' search. If NEW is null, each + matching OLD is deleted. 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' or '&' modifier once to each word in the + event. + + +File: bash.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: bash.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, message translation + files, some supplemental documentation, a number of example + loadable builtin commands, and a set of header files for developing + loadable builtins. You may need additional privileges to install + 'bash' to your desired destination, so 'sudo make install' might be + required. More information about controlling the locations where + 'bash' and other files are installed is below (*note Installation + Names::). + + 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', 'po', 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-4.2$ ./configure --help + +at the Bash prompt in your Bash source directory. + + If you want to build Bash in a directory separate from the source +directory - to build for multiple architectures, for example - just use +the full path to the configure script. The following commands will +build bash in a directory under '/usr/local/build' from the source code +in '/usr/local/src/bash-4.4': + + mkdir /usr/local/build/bash-4.4 + cd /usr/local/build/bash-4.4 + bash /usr/local/src/bash-4.4/configure + make + + See *note Compiling For Multiple Architectures:: for more information +about building in a directory separate from the source. + + 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 so they can be +considered for the next release. + + The file 'configure.ac' is used to create 'configure' by a program +called Autoconf. You only need 'configure.ac' 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.69 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: bash.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: bash.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 (*note Basic Installation::). 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 support 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: bash.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.; that is, the "installation prefix" defaults to +'/usr/local'. You can specify an installation prefix other than +'/usr/local' by giving 'configure' the option '--prefix=PATH', or by +specifying a value for the 'prefix' 'make' variable when running 'make +install' (e.g., 'make install prefix=PATH'). The 'prefix' variable +provides a default for 'exec_prefix' and other variables used when +installing bash. + + 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. + + If you would like to change the installation locations for a single +run, you can specify these variables as arguments to 'make': 'make +install exec_prefix=/' will install 'bash' and 'bashbug' into '/bin' +instead of the default '/usr/local/bin'. + + If you want to see the files bash will install and where it will +install them without changing anything on your system, specify the +variable 'DESTDIR' as an argument to 'make'. Its value should be the +absolute directory path you'd like to use as the root of your sample +installation tree. For example, + + mkdir /fs1/bash-install + make install DESTDIR=/fs1/bash-install + +will install 'bash' into '/fs1/bash-install/usr/local/bin/bash', the +documentation into directories within +'/fs1/bash-install/usr/local/share', the example loadable builtins into +'/fs1/bash-install/usr/local/lib/bash', and so on. You can use the +usual 'exec_prefix' and 'prefix' variables to alter the directory paths +beneath the value of 'DESTDIR'. + + The GNU Makefile standards provide a more complete description of +these variables and their effects. + + +File: bash.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 needs 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: bash.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: bash.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: bash.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-libintl-prefix[=PREFIX]' + Define this to make Bash link with a locally-installed version of + the libintl library instead of the version in 'lib/intl'. + +'--with-libiconv-prefix[=PREFIX]' + Define this to make Bash look for libiconv in PREFIX instead of the + standard system locations. There is no version included with Bash. + +'--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, linked, and installed, rather than changing run-time features. + +'--enable-largefile' + Enable support for large files + (http://www.unix.org/version2/whatsnew/lfs20mar.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-separate-helpfiles' + Use external files for the documentation displayed by the 'help' + builtin instead of storing the text internally. + +'--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 'alt-array-implementation', +'disabled-builtins', 'direxpand-default', 'strict-posix-default', 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-alt-array-implementation' + This builds bash using an alternate implementation of arrays (*note + Arrays::) that provides faster access at the expense of using more + memory (sometimes many times more, depending on how sparse an array + is). + +'--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-dev-fd-stat-broken' + If calling 'stat' on /dev/fd/N returns different results than + calling 'fstat' on file descriptor N, supply this option to enable + a workaround. This has implications for conditional commands that + test file attributes. + +'--enable-direxpand-default' + Cause the 'direxpand' shell option (*note The Shopt Builtin::) to + be enabled by default when the shell starts. It is normally + disabled by default. + +'--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-function-import' + Include support for importing function definitions exported by + another instance of the shell from the environment. This option is + enabled by default. + +'--enable-glob-asciirange-default' + Set the default value of the 'globasciiranges' shell option + described above under *note The Shopt Builtin:: to be enabled. + This controls the behavior of character ranges when used in pattern + matching bracket expressions. + +'--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 '$PS0', '$PS1', '$PS2', and '$PS4' prompt + strings. See *note Controlling the 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' compound command, which allows the generation + of simple menus (*note Conditional Constructs::). + +'--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-translatable-strings' + Enable support for '$"STRING"' translatable strings (*note Locale + Translation::). + +'--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: bash.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 + and from +. + + 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 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 . + + +File: bash.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. + + * The filename expansion bracket expression code uses '!' and '^' to + negate the set of characters between the brackets. The Bourne + shell uses only '!'. + + * 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 a '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 Controlling the 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: bash.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. + + + 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 + . + + 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: bash.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: bash.info, Node: Builtin Index, Next: Reserved Word Index, Up: Indexes + +D.1 Index of Shell Builtin Commands +=================================== + +[index] +* Menu: + +* .: Bourne Shell Builtins. + (line 17) +* :: Bourne Shell Builtins. + (line 11) +* [: Bourne Shell Builtins. + (line 275) +* alias: Bash Builtins. (line 11) +* bg: Job Control Builtins. + (line 7) +* bind: Bash Builtins. (line 21) +* break: Bourne Shell Builtins. + (line 37) +* builtin: Bash Builtins. (line 108) +* caller: Bash Builtins. (line 117) +* cd: Bourne Shell Builtins. + (line 45) +* command: Bash Builtins. (line 134) +* compgen: Programmable Completion Builtins. + (line 12) +* complete: Programmable Completion Builtins. + (line 30) +* compopt: Programmable Completion Builtins. + (line 238) +* continue: Bourne Shell Builtins. + (line 90) +* declare: Bash Builtins. (line 154) +* dirs: Directory Stack Builtins. + (line 7) +* disown: Job Control Builtins. + (line 104) +* echo: Bash Builtins. (line 257) +* enable: Bash Builtins. (line 306) +* eval: Bourne Shell Builtins. + (line 99) +* exec: Bourne Shell Builtins. + (line 107) +* exit: Bourne Shell Builtins. + (line 125) +* export: Bourne Shell Builtins. + (line 132) +* fc: Bash History Builtins. + (line 10) +* fg: Job Control Builtins. + (line 17) +* getopts: Bourne Shell Builtins. + (line 148) +* hash: Bourne Shell Builtins. + (line 192) +* help: Bash Builtins. (line 342) +* history: Bash History Builtins. + (line 46) +* jobs: Job Control Builtins. + (line 27) +* kill: Job Control Builtins. + (line 58) +* let: Bash Builtins. (line 361) +* local: Bash Builtins. (line 369) +* logout: Bash Builtins. (line 385) +* mapfile: Bash Builtins. (line 390) +* popd: Directory Stack Builtins. + (line 35) +* printf: Bash Builtins. (line 436) +* pushd: Directory Stack Builtins. + (line 69) +* pwd: Bourne Shell Builtins. + (line 212) +* read: Bash Builtins. (line 488) +* readarray: Bash Builtins. (line 585) +* readonly: Bourne Shell Builtins. + (line 222) +* return: Bourne Shell Builtins. + (line 241) +* set: The Set Builtin. (line 11) +* shift: Bourne Shell Builtins. + (line 262) +* shopt: The Shopt Builtin. (line 9) +* source: Bash Builtins. (line 594) +* suspend: Job Control Builtins. + (line 116) +* test: Bourne Shell Builtins. + (line 275) +* times: Bourne Shell Builtins. + (line 360) +* trap: Bourne Shell Builtins. + (line 366) +* type: Bash Builtins. (line 599) +* typeset: Bash Builtins. (line 631) +* ulimit: Bash Builtins. (line 637) +* umask: Bourne Shell Builtins. + (line 415) +* unalias: Bash Builtins. (line 743) +* unset: Bourne Shell Builtins. + (line 433) +* wait: Job Control Builtins. + (line 76) + + +File: bash.info, Node: Reserved Word Index, Next: Variable Index, Prev: Builtin Index, Up: Indexes + +D.2 Index of Shell Reserved Words +================================= + +[index] +* Menu: + +* !: Pipelines. (line 9) +* [[: Conditional Constructs. + (line 126) +* ]]: Conditional Constructs. + (line 126) +* {: Command Grouping. (line 21) +* }: Command Grouping. (line 21) +* 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 32) +* function: Shell Functions. (line 13) +* if: Conditional Constructs. + (line 7) +* in: Conditional Constructs. + (line 28) +* select: Conditional Constructs. + (line 84) +* then: Conditional Constructs. + (line 7) +* time: Pipelines. (line 9) +* until: Looping Constructs. (line 12) +* while: Looping Constructs. (line 22) + + +File: bash.info, Node: Variable Index, Next: Function Index, Prev: Reserved Word Index, Up: Indexes + +D.3 Parameter and Variable Index +================================ + +[index] +* Menu: + +* !: Special Parameters. (line 55) +* #: Special Parameters. (line 39) +* $: Special Parameters. (line 51) +* $!: Special Parameters. (line 56) +* $#: Special Parameters. (line 40) +* $$: Special Parameters. (line 52) +* $*: Special Parameters. (line 10) +* $-: Special Parameters. (line 47) +* $0: Special Parameters. (line 61) +* $?: Special Parameters. (line 43) +* $@: Special Parameters. (line 23) +* $_: Bash Variables. (line 14) +* *: Special Parameters. (line 9) +* -: Special Parameters. (line 46) +* 0: Special Parameters. (line 60) +* ?: Special Parameters. (line 42) +* @: Special Parameters. (line 22) +* _: Bash Variables. (line 13) +* active-region-end-color: Readline Init File Syntax. + (line 51) +* active-region-start-color: Readline Init File Syntax. + (line 38) +* auto_resume: Job Control Variables. + (line 6) +* BASH: Bash Variables. (line 23) +* BASHOPTS: Bash Variables. (line 26) +* BASHPID: Bash Variables. (line 35) +* BASH_ALIASES: Bash Variables. (line 42) +* BASH_ARGC: Bash Variables. (line 51) +* BASH_ARGV: Bash Variables. (line 64) +* BASH_ARGV0: Bash Variables. (line 76) +* BASH_CMDS: Bash Variables. (line 84) +* BASH_COMMAND: Bash Variables. (line 93) +* BASH_COMPAT: Bash Variables. (line 100) +* BASH_ENV: Bash Variables. (line 116) +* BASH_EXECUTION_STRING: Bash Variables. (line 122) +* BASH_LINENO: Bash Variables. (line 125) +* BASH_LOADABLES_PATH: Bash Variables. (line 133) +* BASH_REMATCH: Bash Variables. (line 137) +* BASH_SOURCE: Bash Variables. (line 145) +* BASH_SUBSHELL: Bash Variables. (line 152) +* BASH_VERSINFO: Bash Variables. (line 158) +* BASH_VERSION: Bash Variables. (line 181) +* BASH_XTRACEFD: Bash Variables. (line 184) +* bell-style: Readline Init File Syntax. + (line 64) +* bind-tty-special-chars: Readline Init File Syntax. + (line 71) +* blink-matching-paren: Readline Init File Syntax. + (line 76) +* CDPATH: Bourne Shell Variables. + (line 9) +* CHILD_MAX: Bash Variables. (line 195) +* colored-completion-prefix: Readline Init File Syntax. + (line 81) +* colored-stats: Readline Init File Syntax. + (line 91) +* COLUMNS: Bash Variables. (line 202) +* comment-begin: Readline Init File Syntax. + (line 97) +* completion-display-width: Readline Init File Syntax. + (line 102) +* completion-ignore-case: Readline Init File Syntax. + (line 109) +* completion-map-case: Readline Init File Syntax. + (line 114) +* completion-prefix-display-length: Readline Init File Syntax. + (line 120) +* completion-query-items: Readline Init File Syntax. + (line 127) +* COMPREPLY: Bash Variables. (line 254) +* COMP_CWORD: Bash Variables. (line 208) +* COMP_KEY: Bash Variables. (line 237) +* COMP_LINE: Bash Variables. (line 214) +* COMP_POINT: Bash Variables. (line 219) +* COMP_TYPE: Bash Variables. (line 227) +* COMP_WORDBREAKS: Bash Variables. (line 241) +* COMP_WORDS: Bash Variables. (line 247) +* convert-meta: Readline Init File Syntax. + (line 138) +* COPROC: Bash Variables. (line 260) +* DIRSTACK: Bash Variables. (line 264) +* disable-completion: Readline Init File Syntax. + (line 148) +* echo-control-characters: Readline Init File Syntax. + (line 153) +* editing-mode: Readline Init File Syntax. + (line 158) +* EMACS: Bash Variables. (line 274) +* emacs-mode-string: Readline Init File Syntax. + (line 164) +* enable-active-region: Readline Init File Syntax. + (line 174) +* enable-bracketed-paste: Readline Init File Syntax. + (line 187) +* enable-keypad: Readline Init File Syntax. + (line 196) +* ENV: Bash Variables. (line 279) +* EPOCHREALTIME: Bash Variables. (line 284) +* EPOCHSECONDS: Bash Variables. (line 292) +* EUID: Bash Variables. (line 299) +* EXECIGNORE: Bash Variables. (line 303) +* expand-tilde: Readline Init File Syntax. + (line 207) +* FCEDIT: Bash Variables. (line 316) +* FIGNORE: Bash Variables. (line 320) +* FUNCNAME: Bash Variables. (line 326) +* FUNCNEST: Bash Variables. (line 343) +* GLOBIGNORE: Bash Variables. (line 348) +* GROUPS: Bash Variables. (line 355) +* histchars: Bash Variables. (line 361) +* HISTCMD: Bash Variables. (line 376) +* HISTCONTROL: Bash Variables. (line 382) +* HISTFILE: Bash Variables. (line 398) +* HISTFILESIZE: Bash Variables. (line 402) +* HISTIGNORE: Bash Variables. (line 413) +* history-preserve-point: Readline Init File Syntax. + (line 211) +* history-size: Readline Init File Syntax. + (line 217) +* HISTSIZE: Bash Variables. (line 433) +* HISTTIMEFORMAT: Bash Variables. (line 440) +* HOME: Bourne Shell Variables. + (line 13) +* horizontal-scroll-mode: Readline Init File Syntax. + (line 226) +* HOSTFILE: Bash Variables. (line 448) +* HOSTNAME: Bash Variables. (line 459) +* HOSTTYPE: Bash Variables. (line 462) +* IFS: Bourne Shell Variables. + (line 18) +* IGNOREEOF: Bash Variables. (line 465) +* input-meta: Readline Init File Syntax. + (line 235) +* INPUTRC: Bash Variables. (line 475) +* INSIDE_EMACS: Bash Variables. (line 479) +* isearch-terminators: Readline Init File Syntax. + (line 245) +* keymap: Readline Init File Syntax. + (line 252) +* LANG: Creating Internationalized Scripts. + (line 51) +* LANG <1>: Bash Variables. (line 485) +* LC_ALL: Bash Variables. (line 489) +* LC_COLLATE: Bash Variables. (line 493) +* LC_CTYPE: Bash Variables. (line 500) +* LC_MESSAGES: Creating Internationalized Scripts. + (line 51) +* LC_MESSAGES <1>: Bash Variables. (line 505) +* LC_NUMERIC: Bash Variables. (line 509) +* LC_TIME: Bash Variables. (line 513) +* LINENO: Bash Variables. (line 517) +* LINES: Bash Variables. (line 522) +* MACHTYPE: Bash Variables. (line 528) +* MAIL: Bourne Shell Variables. + (line 22) +* MAILCHECK: Bash Variables. (line 532) +* MAILPATH: Bourne Shell Variables. + (line 27) +* MAPFILE: Bash Variables. (line 540) +* mark-modified-lines: Readline Init File Syntax. + (line 282) +* mark-symlinked-directories: Readline Init File Syntax. + (line 287) +* match-hidden-files: Readline Init File Syntax. + (line 292) +* menu-complete-display-prefix: Readline Init File Syntax. + (line 299) +* meta-flag: Readline Init File Syntax. + (line 235) +* OLDPWD: Bash Variables. (line 544) +* OPTARG: Bourne Shell Variables. + (line 34) +* OPTERR: Bash Variables. (line 547) +* OPTIND: Bourne Shell Variables. + (line 38) +* OSTYPE: Bash Variables. (line 551) +* output-meta: Readline Init File Syntax. + (line 304) +* page-completions: Readline Init File Syntax. + (line 312) +* PATH: Bourne Shell Variables. + (line 42) +* PIPESTATUS: Bash Variables. (line 554) +* POSIXLY_CORRECT: Bash Variables. (line 559) +* PPID: Bash Variables. (line 569) +* PROMPT_COMMAND: Bash Variables. (line 573) +* PROMPT_DIRTRIM: Bash Variables. (line 579) +* PS0: Bash Variables. (line 585) +* PS1: Bourne Shell Variables. + (line 48) +* PS2: Bourne Shell Variables. + (line 53) +* PS3: Bash Variables. (line 590) +* PS4: Bash Variables. (line 595) +* PWD: Bash Variables. (line 603) +* RANDOM: Bash Variables. (line 606) +* READLINE_ARGUMENT: Bash Variables. (line 612) +* READLINE_LINE: Bash Variables. (line 616) +* READLINE_MARK: Bash Variables. (line 620) +* READLINE_POINT: Bash Variables. (line 626) +* REPLY: Bash Variables. (line 630) +* revert-all-at-newline: Readline Init File Syntax. + (line 322) +* SECONDS: Bash Variables. (line 633) +* SHELL: Bash Variables. (line 642) +* SHELLOPTS: Bash Variables. (line 647) +* SHLVL: Bash Variables. (line 656) +* show-all-if-ambiguous: Readline Init File Syntax. + (line 329) +* show-all-if-unmodified: Readline Init File Syntax. + (line 335) +* show-mode-in-prompt: Readline Init File Syntax. + (line 344) +* skip-completed-text: Readline Init File Syntax. + (line 350) +* SRANDOM: Bash Variables. (line 661) +* TEXTDOMAIN: Creating Internationalized Scripts. + (line 51) +* TEXTDOMAINDIR: Creating Internationalized Scripts. + (line 51) +* TIMEFORMAT: Bash Variables. (line 670) +* TMOUT: Bash Variables. (line 708) +* TMPDIR: Bash Variables. (line 720) +* UID: Bash Variables. (line 724) +* vi-cmd-mode-string: Readline Init File Syntax. + (line 363) +* vi-ins-mode-string: Readline Init File Syntax. + (line 374) +* visible-stats: Readline Init File Syntax. + (line 385) + + +File: bash.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes + +D.4 Function Index +================== + +[index] +* Menu: + +* abort (C-g): Miscellaneous Commands. + (line 10) +* accept-line (Newline or Return): Commands For History. + (line 6) +* alias-expand-line (): Miscellaneous Commands. + (line 131) +* backward-char (C-b): Commands For Moving. (line 15) +* backward-delete-char (Rubout): Commands For Text. (line 17) +* backward-kill-line (C-x Rubout): Commands For Killing. + (line 11) +* backward-kill-word (M-): Commands For Killing. + (line 28) +* 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) +* bracketed-paste-begin (): Commands For Text. (line 33) +* call-last-kbd-macro (C-x e): Keyboard Macros. (line 13) +* capitalize-word (M-c): Commands For Text. (line 66) +* character-search (C-]): Miscellaneous Commands. + (line 42) +* character-search-backward (M-C-]): Miscellaneous Commands. + (line 47) +* clear-display (M-C-l): Commands For Moving. (line 48) +* clear-screen (C-l): Commands For Moving. (line 53) +* complete (): Commands For Completion. + (line 6) +* complete-command (M-!): Commands For Completion. + (line 80) +* complete-filename (M-/): Commands For Completion. + (line 49) +* complete-hostname (M-@): Commands For Completion. + (line 72) +* complete-into-braces (M-{): Commands For Completion. + (line 100) +* complete-username (M-~): Commands For Completion. + (line 56) +* complete-variable (M-$): Commands For Completion. + (line 64) +* copy-backward-word (): Commands For Killing. + (line 69) +* copy-forward-word (): Commands For Killing. + (line 74) +* copy-region-as-kill (): Commands For Killing. + (line 65) +* dabbrev-expand (): Commands For Completion. + (line 95) +* delete-char (C-d): Commands For Text. (line 12) +* delete-char-or-list (): Commands For Completion. + (line 43) +* delete-horizontal-space (): Commands For Killing. + (line 57) +* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6) +* display-shell-version (C-x C-v): Miscellaneous Commands. + (line 116) +* do-lowercase-version (M-A, M-B, M-X, ...): Miscellaneous Commands. + (line 14) +* downcase-word (M-l): Commands For Text. (line 62) +* dump-functions (): Miscellaneous Commands. + (line 74) +* dump-macros (): Miscellaneous Commands. + (line 86) +* dump-variables (): Miscellaneous Commands. + (line 80) +* dynamic-complete-history (M-): Commands For Completion. + (line 90) +* edit-and-execute-command (C-x C-e): Miscellaneous Commands. + (line 140) +* end-kbd-macro (C-x )): Keyboard Macros. (line 9) +* end-of-file (usually C-d): Commands For Text. (line 6) +* 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 37) +* fetch-history (): Commands For History. + (line 103) +* forward-backward-delete-char (): Commands For Text. (line 21) +* forward-char (C-f): Commands For Moving. (line 12) +* forward-search-history (C-s): Commands For History. + (line 33) +* forward-word (M-f): Commands For Moving. (line 18) +* glob-complete-word (M-g): Miscellaneous Commands. + (line 98) +* glob-expand-word (C-x *): Miscellaneous Commands. + (line 104) +* glob-list-expansions (C-x g): Miscellaneous Commands. + (line 110) +* history-and-alias-expand-line (): Miscellaneous Commands. + (line 134) +* history-expand-line (M-^): Miscellaneous Commands. + (line 124) +* history-search-backward (): Commands For History. + (line 57) +* history-search-forward (): Commands For History. + (line 51) +* history-substring-search-backward (): Commands For History. + (line 69) +* history-substring-search-forward (): Commands For History. + (line 63) +* insert-comment (M-#): Miscellaneous Commands. + (line 61) +* insert-completions (M-*): Commands For Completion. + (line 22) +* insert-last-argument (M-. or M-_): Miscellaneous Commands. + (line 137) +* kill-line (C-k): Commands For Killing. + (line 6) +* kill-region (): Commands For Killing. + (line 61) +* kill-whole-line (): Commands For Killing. + (line 19) +* kill-word (M-d): Commands For Killing. + (line 23) +* magic-space (): Miscellaneous Commands. + (line 127) +* menu-complete (): Commands For Completion. + (line 26) +* menu-complete-backward (): Commands For Completion. + (line 38) +* next-history (C-n): Commands For History. + (line 17) +* next-screen-line (): Commands For Moving. (line 41) +* non-incremental-forward-search-history (M-n): Commands For History. + (line 45) +* non-incremental-reverse-search-history (M-p): Commands For History. + (line 39) +* operate-and-get-next (C-o): Commands For History. + (line 96) +* overwrite-mode (): Commands For Text. (line 70) +* possible-command-completions (C-x !): Commands For Completion. + (line 86) +* possible-completions (M-?): Commands For Completion. + (line 15) +* possible-filename-completions (C-x /): Commands For Completion. + (line 52) +* possible-hostname-completions (C-x @): Commands For Completion. + (line 76) +* possible-username-completions (C-x ~): Commands For Completion. + (line 60) +* possible-variable-completions (C-x $): Commands For Completion. + (line 68) +* prefix-meta (): Miscellaneous Commands. + (line 19) +* previous-history (C-p): Commands For History. + (line 13) +* previous-screen-line (): Commands For Moving. (line 34) +* print-last-kbd-macro (): Keyboard Macros. (line 17) +* quoted-insert (C-q or C-v): Commands For Text. (line 26) +* re-read-init-file (C-x C-r): Miscellaneous Commands. + (line 6) +* redraw-current-line (): Commands For Moving. (line 57) +* reverse-search-history (C-r): Commands For History. + (line 27) +* revert-line (M-r): Miscellaneous Commands. + (line 26) +* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 30) +* set-mark (C-@): Miscellaneous Commands. + (line 33) +* shell-backward-kill-word (): Commands For Killing. + (line 37) +* shell-backward-word (M-C-b): Commands For Moving. (line 30) +* shell-expand-line (M-C-e): Miscellaneous Commands. + (line 119) +* shell-forward-word (M-C-f): Commands For Moving. (line 26) +* shell-kill-word (M-C-d): Commands For Killing. + (line 32) +* shell-transpose-words (M-C-t): Commands For Killing. + (line 41) +* skip-csi-sequence (): Miscellaneous Commands. + (line 52) +* spell-correct-word (C-x s): Miscellaneous Commands. + (line 92) +* start-kbd-macro (C-x (): Keyboard Macros. (line 6) +* tilde-expand (M-&): Miscellaneous Commands. + (line 30) +* transpose-chars (C-t): Commands For Text. (line 47) +* transpose-words (M-t): Commands For Text. (line 53) +* undo (C-_ or C-x C-u): Miscellaneous Commands. + (line 23) +* universal-argument (): Numeric Arguments. (line 10) +* unix-filename-rubout (): Commands For Killing. + (line 52) +* unix-line-discard (C-u): Commands For Killing. + (line 16) +* unix-word-rubout (C-w): Commands For Killing. + (line 48) +* upcase-word (M-u): Commands For Text. (line 58) +* yank (C-y): Commands For Killing. + (line 79) +* yank-last-arg (M-. or M-_): Commands For History. + (line 84) +* yank-nth-arg (M-C-y): Commands For History. + (line 75) +* yank-pop (M-y): Commands For Killing. + (line 82) + + +File: bash.info, Node: Concept Index, Prev: Function Index, Up: Indexes + +D.5 Concept Index +================= + +[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) +* Compatibility Level: Shell Compatibility Mode. + (line 6) +* Compatibility Mode: Shell Compatibility Mode. + (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: Definitions. (line 26) +* exit status <1>: Exit Status. (line 6) +* 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 8) +* history expansion: History Interaction. (line 6) +* history list: Bash History Facilities. + (line 6) +* History, how to use: A Programmable Completion Example. + (line 113) +* 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: Invoking Bash. (line 131) +* interactive shell <1>: Interactive Shells. (line 6) +* internationalization: Locale Translation. (line 6) +* internationalized scripts: Creating Internationalized Scripts. + (line 3) +* job: Definitions. (line 38) +* job control: Definitions. (line 42) +* job control <1>: Job Control Basics. (line 6) +* kill ring: Readline Killing Commands. + (line 18) +* killing text: Readline Killing Commands. + (line 6) +* localization: Locale Translation. (line 6) +* login shell: Invoking Bash. (line 128) +* 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: Controlling the Prompt. + (line 6) +* quoting: Quoting. (line 6) +* quoting, ANSI: ANSI-C Quoting. (line 6) +* Readline, how to use: Job Control Variables. + (line 23) +* redirection: Redirections. (line 6) +* reserved word: Definitions. (line 70) +* reserved words: Reserved Words. (line 6) +* 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: Definitions. (line 82) +* special builtin <1>: Special Builtins. (line 6) +* startup files: Bash Startup Files. (line 6) +* string translations: Creating Internationalized Scripts. + (line 3) +* 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: Top896 +Node: Introduction2815 +Node: What is Bash?3028 +Node: What is a shell?4139 +Node: Definitions6674 +Node: Basic Shell Features9622 +Node: Shell Syntax10838 +Node: Shell Operation11861 +Node: Quoting13151 +Node: Escape Character14452 +Node: Single Quotes14934 +Node: Double Quotes15279 +Node: ANSI-C Quoting16554 +Node: Locale Translation17861 +Node: Creating Internationalized Scripts19169 +Node: Comments23283 +Node: Shell Commands23898 +Node: Reserved Words24833 +Node: Simple Commands25586 +Node: Pipelines26237 +Node: Lists29233 +Node: Compound Commands31025 +Node: Looping Constructs32034 +Node: Conditional Constructs34526 +Node: Command Grouping49011 +Node: Coprocesses50486 +Node: GNU Parallel53146 +Node: Shell Functions54060 +Node: Shell Parameters61942 +Node: Positional Parameters66327 +Node: Special Parameters67226 +Node: Shell Expansions70437 +Node: Brace Expansion72561 +Node: Tilde Expansion75292 +Node: Shell Parameter Expansion77910 +Node: Command Substitution96258 +Node: Arithmetic Expansion97610 +Node: Process Substitution98575 +Node: Word Splitting99692 +Node: Filename Expansion101633 +Node: Pattern Matching104379 +Node: Quote Removal109378 +Node: Redirections109670 +Node: Executing Commands119327 +Node: Simple Command Expansion119994 +Node: Command Search and Execution122101 +Node: Command Execution Environment124476 +Node: Environment127508 +Node: Exit Status129168 +Node: Signals130949 +Node: Shell Scripts134395 +Node: Shell Builtin Commands137419 +Node: Bourne Shell Builtins139454 +Node: Bash Builtins160917 +Node: Modifying Shell Behavior191770 +Node: The Set Builtin192112 +Node: The Shopt Builtin202710 +Node: Special Builtins218619 +Node: Shell Variables219595 +Node: Bourne Shell Variables220029 +Node: Bash Variables222130 +Node: Bash Features254942 +Node: Invoking Bash255952 +Node: Bash Startup Files261962 +Node: Interactive Shells267090 +Node: What is an Interactive Shell?267498 +Node: Is this Shell Interactive?268144 +Node: Interactive Shell Behavior268956 +Node: Bash Conditional Expressions272582 +Node: Shell Arithmetic277221 +Node: Aliases280162 +Node: Arrays282772 +Node: The Directory Stack289160 +Node: Directory Stack Builtins289941 +Node: Controlling the Prompt294198 +Node: The Restricted Shell297160 +Node: Bash POSIX Mode299767 +Node: Shell Compatibility Mode311682 +Node: Job Control320246 +Node: Job Control Basics320703 +Node: Job Control Builtins325702 +Node: Job Control Variables331494 +Node: Command Line Editing332647 +Node: Introduction and Notation334315 +Node: Readline Interaction335935 +Node: Readline Bare Essentials337123 +Node: Readline Movement Commands338909 +Node: Readline Killing Commands339866 +Node: Readline Arguments341784 +Node: Searching342825 +Node: Readline Init File345008 +Node: Readline Init File Syntax346266 +Node: Conditional Init Constructs369849 +Node: Sample Init File374042 +Node: Bindable Readline Commands377163 +Node: Commands For Moving378364 +Node: Commands For History380412 +Node: Commands For Text385403 +Node: Commands For Killing389049 +Node: Numeric Arguments392079 +Node: Commands For Completion393215 +Node: Keyboard Macros397403 +Node: Miscellaneous Commands398088 +Node: Readline vi Mode404030 +Node: Programmable Completion404934 +Node: Programmable Completion Builtins412711 +Node: A Programmable Completion Example423460 +Node: Using History Interactively428705 +Node: Bash History Facilities429386 +Node: Bash History Builtins432388 +Node: History Interaction437409 +Node: Event Designators441026 +Node: Word Designators442377 +Node: Modifiers444134 +Node: Installing Bash445939 +Node: Basic Installation447073 +Node: Compilers and Options450792 +Node: Compiling For Multiple Architectures451530 +Node: Installation Names453219 +Node: Specifying the System Type455325 +Node: Sharing Defaults456039 +Node: Operation Controls456709 +Node: Optional Features457664 +Node: Reporting Bugs468880 +Node: Major Differences From The Bourne Shell470152 +Node: GNU Free Documentation License486998 +Node: Indexes512172 +Node: Builtin Index512623 +Node: Reserved Word Index519447 +Node: Variable Index521892 +Node: Function Index538663 +Node: Concept Index552444 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/doc/bash.pdf b/doc/bash.pdf index cb36c5e..b8f7dd6 100644 Binary files a/doc/bash.pdf and b/doc/bash.pdf differ diff --git a/doc/bash.ps b/doc/bash.ps index 8b4d573..b6a4bbe 100644 Binary files a/doc/bash.ps and b/doc/bash.ps differ diff --git a/doc/bashbug.0 b/doc/bashbug.0 index 41fc1ed..58f08de 100644 --- a/doc/bashbug.0 +++ b/doc/bashbug.0 @@ -1,4 +1,4 @@ -BASHBUG(1) BASHBUG(1) +BASHBUG(1) General Commands Manual BASHBUG(1) @@ -27,10 +27,12 @@ DDEESSCCRRIIPPTTIIOONN 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. + EEDDIITTOORR Specifies the preferred editor. If EEDDIITTOORR is not set, bbaasshhbbuugg + attempts to locate a number of alternative editors, including + eemmaaccss. If bbaasshhbbuugg cannot locate any of the alternative editors, + it attempts to execute vvii. - HHOOMMEE Directory in which the failed bug report is saved if the mail + HHOOMMEE Directory in which the failed bug report is saved if the mail fails. TTMMPPDDIIRR Directory in which to create temporary files and directories. @@ -47,4 +49,4 @@ AAUUTTHHOORRSS -GNU Bash-4.0 1998 July 30 BASHBUG(1) +GNU Bash 5.2 2020 August 1 BASHBUG(1) diff --git a/doc/bashbug.1 b/doc/bashbug.1 index 962cb9c..abcaf48 100644 --- a/doc/bashbug.1 +++ b/doc/bashbug.1 @@ -5,9 +5,9 @@ .\" Case Western Reserve University .\" chet@po.cwru.edu .\" -.\" Last Change: Tue Apr 3 15:46:30 EDT 2007 +.\" Last Change: Sun Aug 2 15:39:07 EDT 2020 .\" -.TH BASHBUG 1 "1998 July 30" "GNU Bash-4.0" +.TH BASHBUG 1 "2020 August 1" "GNU Bash 5.1" .SH NAME bashbug \- report a bug in bash .SH SYNOPSIS @@ -43,8 +43,11 @@ Specifies the preferred editor. If .B EDITOR is not set, .B bashbug -defaults to +attempts to locate a number of alternative editors, including .BR emacs . +If +.B bashbug +cannot locate any of the alternative editors, it attempts to execute \fBvi\fP. .TP .B HOME Directory in which the failed bug report is saved if the mail fails. diff --git a/doc/bashbug.ps b/doc/bashbug.ps index efbcdda..55fe45c 100644 Binary files a/doc/bashbug.ps and b/doc/bashbug.ps differ diff --git a/doc/bashref.dvi b/doc/bashref.dvi new file mode 100644 index 0000000..a7a571b Binary files /dev/null and b/doc/bashref.dvi differ diff --git a/doc/bashref.html b/doc/bashref.html new file mode 100644 index 0000000..928b3ff --- /dev/null +++ b/doc/bashref.html @@ -0,0 +1,16033 @@ + + + + + + +Bash Reference Manual + + + + + + + + + + + + + + + + + + + + +

Bash Reference Manual

+ + + + + + + + + + + +
+
+

+Next: , Previous: , Up: (dir)   [Contents][Index]

+
+

Bash Features

+ +

This text is a brief description of the features that are present in +the Bash shell (version 5.2, 19 September 2022). +The Bash home page is http://www.gnu.org/software/bash/. +

+

This is Edition 5.2, last updated 19 September 2022, +of The GNU Bash Reference Manual, +for Bash, Version 5.2. +

+

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, noting which features were inspired by other shells and +which are specific to Bash. +

+

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. +

+ +
+

Table of Contents

+ +
+ + +
+
+
+
+
+

+Next: , Up: Bash Features   [Contents][Index]

+
+

1 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. +

+
+
+
+
+

+Previous: , Up: Introduction   [Contents][Index]

+
+

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. +

+
+
+
+
+ +

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 space, tab, newline, or one of the following characters: +‘|’, ‘&’, ‘;’, ‘(’, ‘)’, ‘<’, or +‘>’. +

+
+
name
+
+

A word consisting solely of letters, numbers, and underscores, +and beginning with a letter or underscore. Names are used as +shell variable and function names. +Also referred to as an identifier. +

+
+
operator
+

A control operator or a redirection operator. +See 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. +

+
+ +
+
+
+ +

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. +

+ + +
+
+ +

3.1 Shell Syntax

+ +

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. +

+ +
+
+
+

+Next: , Up: Shell Syntax   [Contents][Index]

+
+

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 (see Shell Scripts), from a string +supplied as an argument to the -c invocation option +(see Invoking Bash), or from the user’s terminal. + +
  2. Breaks the input into words and operators, obeying the quoting rules +described in Quoting. These tokens are separated by +metacharacters. Alias expansion is performed by this step +(see Aliases). + +
  3. Parses the tokens into simple and compound commands +(see Shell Commands). + +
  4. Performs the various shell expansions (see Shell Expansions), breaking +the expanded tokens into lists of filenames (see Filename Expansion) +and commands and arguments. + +
  5. Performs any necessary redirections (see Redirections) and removes +the redirection operators and their operands from the argument list. + +
  6. Executes the command (see Executing Commands). + +
  7. Optionally waits for the command to complete and collects its exit +status (see Exit Status). + +
+ +
+
+
+
+

+Next: , Previous: , Up: Shell Syntax   [Contents][Index]

+
+

3.1.2 Quoting

+ + +

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 (see 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 +(see History Expansion), the +history expansion character, usually ‘!’, must be quoted +to prevent history expansion. See Bash History Facilities, for +more details concerning history expansion. +

+

There are three quoting mechanisms: the +escape character, single quotes, and double quotes. +

+ +
+
+
+

+Next: , Up: Quoting   [Contents][Index]

+
+

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). +

+
+
+
+
+

+Next: , Previous: , Up: Quoting   [Contents][Index]

+
+

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. +

+
+
+
+
+

+Next: , Previous: , Up: Quoting   [Contents][Index]

+
+

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, ‘!’. +When the shell is in +POSIX mode (see Bash POSIX Mode), +the ‘!’ has no special meaning +within double quotes, even when history expansion is enabled. +The characters ‘$’ and ‘`’ +retain their special meaning within double quotes (see 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 (see Shell Parameter Expansion). +

+
+
+
+ +

3.1.2.4 ANSI-C Quoting

+ + +

Character sequences of the form $’string’ are treated as a special +kind of single quotes. +The sequence expands to string, with backslash-escaped characters +in string 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 +

+
\?
+

question mark +

+
\nnn
+

the eight-bit character whose value is the octal value nnn +(one to three octal digits) +

+
\xHH
+

the eight-bit character whose value is the hexadecimal value HH +(one or two hex digits) +

+
\uHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +

+
\UHHHHHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight hex digits) +

+
\cx
+

a control-x character +

+
+ +

The expanded result is single-quoted, as if the dollar sign had not +been present. +

+
+
+
+
+

+Previous: , Up: Quoting   [Contents][Index]

+
+

3.1.2.5 Locale-Specific Translation

+ + + + + +

Prefixing a double-quoted string with a dollar sign (‘$’), such +as $"hello, world", +will cause the string to be translated according to the current locale. +The gettext infrastructure performs the lookup and +translation, using the LC_MESSAGES, TEXTDOMAINDIR, +and TEXTDOMAIN shell variables, as explained below. +See the gettext documentation for additional details not covered here. +If the current locale is C or POSIX, +if there are no translations available, +of if the string is not translated, +the dollar sign is ignored. +Since this is a form of double quoting, the string remains double-quoted +by default, whether or not it is translated and replaced. +If the noexpand_translation option is enabled +using the shopt builtin (see The Shopt Builtin), +translated strings are single-quoted instead of double-quoted. +

+

The rest of this section is a brief overview of how you use gettext to +create translations for strings in a shell script named scriptname. +There are more details in the gettext documentation. +

+
+
+

+   [Contents][Index]

+
+

Creating Internationalized Scripts

+ + +

Once you’ve marked the strings in your script +that you want to translate using $"...", +you create a gettext "template" file using the command +

+
+
bash --dump-po-strings scriptname > domain.pot
+
+ +

The domain is your message domain. +It’s just an arbitrary string that’s used to identify the files gettext +needs, like a package or script name. +It needs to be unique among all +the message domains on systems where you install the translations, so +gettext knows which translations correspond to your script. +You’ll use the template file to create translations for each target language. +The template file conventionally has the suffix ‘.pot’. +

+

You copy this template file to a separate file for each target language +you want to support (called "PO" files, which use the suffix ‘.po’). +PO files use various naming conventions, but +when you are working to translate a template file into a particular +language, you first copy the template file to a file whose name is the +language you want to target, with the ‘.po’ suffix. +For instance, the Spanish translations of your strings would be +in a file named ‘es.po’, and to get started using a message +domain named "example," you would run +

+
+
cp example.pot es.po
+
+ +

Ultimately, PO files are often named domain.po and installed in +directories that contain multiple translation files for a particular language. +

+

Whichever naming convention you choose, you will need to translate the +strings in the PO files into the appropriate languages. +This has to be done manually. +

+

When you have the translations and PO files complete, you’ll use the +gettext tools to produce what are called "MO" files, which are compiled +versions of the PO files the gettext tools use to look up translations +efficiently. +MO files are also called "message catalog" files. +You use the msgfmt program to do this. +For instance, if you had a file with Spanish translations, you could run +

+
+
msgfmt -o es.mo es.po
+
+ +

to produce the corresponding MO file. +

+

Once you have the MO files, you decide where to install them and use the +TEXTDOMAINDIR shell variable to tell the gettext tools where they are. +Make sure to use the same message domain to name the MO files +as you did for the PO files when you install them. +

+ + + + +

Your users will use the LANG or LC_MESSAGES shell variables to +select the desired language. +

+

You set the TEXTDOMAIN variable to the script’s message domain. +As above, you use the message domain to name your translation files. +

+

You, or possibly your users, set the TEXTDOMAINDIR variable to the +name of a directory where the message catalog files are stored. +If you install the message files into the system’s standard message catalog +directory, you don’t need to worry about this variable. +

+

The directory where the message catalog files are stored varies between +systems. +Some 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 the ‘.mo’ suffix. +If you use the TEXTDOMAIN variable, you may need to set the +TEXTDOMAINDIR variable to the location of the message catalog files, +as above. +It’s common to use both variables in this fashion: +$TEXTDOMAINDIR/$LC_MESSAGES/LC_MESSAGES/$TEXTDOMAIN.mo. +

+

If you used that last convention, and you wanted to store the message +catalog files with Spanish (es) and Esperanto (eo) translations into a +local directory you use for custom translation files, you could run +

+
+
TEXTDOMAIN=example
+TEXTDOMAINDIR=/usr/local/share/locale
+
+cp es.mo ${TEXTDOMAINDIR}/es/LC_MESSAGES/${TEXTDOMAIN}.mo
+cp eo.mo ${TEXTDOMAINDIR}/eo/LC_MESSAGES/${TEXTDOMAIN}.mo
+
+ +

When all of this is done, and the message catalog files containing the +compiled translations are installed in the correct location, +your users will be able to see translated strings +in any of the supported languages by setting the LANG or +LC_MESSAGES environment variables before running your script. +

+
+
+
+
+
+

+Previous: , Up: Shell Syntax   [Contents][Index]

+
+

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 (see 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. +See Interactive Shells, for a description of what makes +a shell interactive. +

+
+
+
+
+ +

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. +

+ + +
+
+ +

3.2.1 Reserved Words

+ + +

Reserved words are words that have special meaning to the shell. +They are used to begin and end the shell’s compound commands. +

+

The following words are recognized as reserved when unquoted and +the first word of a command (see below for exceptions): +

+ + + + + +
ifthenelifelsefitime
forinuntilwhiledodone
caseesaccoprocselectfunction
{}[[]]!
+ +

in is recognized as a reserved word if it is the third word of a +case or select command. +in and do are recognized as reserved +words if they are the third word in a for command. +

+
+
+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.2 Simple Commands

+ + +

A simple command is the kind of command encountered most often. +It’s just a sequence of words separated by blanks, terminated +by one of the shell’s control operators (see 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 (see 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. +

+
+
+
+ +

3.2.3 Pipelines

+ + + +

A pipeline is a sequence of one or more 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 +command1. +

+

If ‘|&’ is used, command1’s standard error, in addition to +its standard output, is connected to +command2’s standard input through the pipe; +it is shorthand for 2>&1 |. +This implicit redirection of the standard error to the standard output is +performed after any redirections specified by command1. +

+

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. +When the shell is in POSIX mode (see Bash POSIX Mode), +it does not recognize time as a reserved word if the next +token begins with a ‘-’. +The TIMEFORMAT variable may be set to a format string that +specifies how the timing information should be displayed. +See 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. +

+

When the shell is in POSIX mode (see Bash POSIX Mode), time +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The TIMEFORMAT variable may be used to specify the format of +the time information. +

+

If the pipeline is not executed asynchronously (see Lists of Commands), the +shell waits for all commands in the pipeline to complete. +

+

Each command in a multi-command pipeline, +where pipes are created, +is executed in its own subshell, which is a +separate process (see Command Execution Environment). +If the lastpipe option is enabled using the shopt builtin +(see The Shopt Builtin), +the last element of a pipeline may be run by the shell process +when job control is not active. +

+

The exit +status of a pipeline is the exit status of the last command in the +pipeline, unless the pipefail option is enabled +(see 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. +

+
+
+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.4 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, +and these are referred to as asynchronous commands. +The shell does not wait for the command to finish, and the return +status is 0 (true). +When job control is not active (see 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 (success). +

+

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. +

+
+
+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.5 Compound Commands

+ + + +

Compound commands are the shell programming language constructs. +Each construct begins with a reserved word or control operator and is +terminated by a corresponding reserved word or operator. +Any redirections (see Redirections) associated with a compound command +apply to all commands within that compound command unless explicitly overridden. +

+

In most cases a list of commands in a compound command’s description may be +separated from the rest of the command by one or more newlines, and may be +followed by a newline in place of a semicolon. +

+

Bash provides looping constructs, conditional commands, and mechanisms +to group commands and execute them as a unit. +

+ +
+
+ +

3.2.5.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 (see Shell Expansions), 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 +(see 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 (see 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 commands +that is executed, or false if any of the expressions is invalid. +

+
+ +

The break and continue builtins (see Bourne Shell Builtins) +may be used to control loop execution. +

+
+
+
+ +

3.2.5.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. +The match is performed according +to the rules described below in Pattern Matching. +If the nocasematch shell option +(see the description of shopt in 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 +(see Shell Parameter Expansion) +before matching is attempted. +Each pattern undergoes tilde expansion, parameter expansion, +command substitution, arithmetic expansion, process substitution, and +quote removal. +

+

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. +It’s a common idiom to use ‘*’ as the final pattern to define the +default case, since that pattern will always match. +

+

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, +continuing the case statement execution as if the pattern list had not matched. +

+

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, and 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. +select then displays the PS3 +prompt and reads a line 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 and returns 1. +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 (see Shell Arithmetic). +The expression undergoes the same expansions +as if it were within double quotes, +but double quote characters in expression are not treated specially +are removed. +If the value of the expression is non-zero, the return status is 0; +otherwise the return status is 1. +

+ +
+
[[…]]
+
+
+
[[ 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 +Bash Conditional Expressions. +The words between the [[ and ]] do not undergo word splitting +and filename expansion. +The shell performs tilde expansion, parameter and +variable expansion, arithmetic expansion, command substitution, process +substitution, and quote removal on those words +(the expansions that would occur if the words were enclosed in double quotes). +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 Pattern Matching, +as if the extglob shell option were enabled. +The ‘=’ operator is identical to ‘==’. +If the nocasematch shell option +(see the description of shopt in 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. +

+

If you quote any part of the pattern, +using any of the shell’s quoting mechanisms, +the quoted portion is matched literally. +This means every character in the quoted portion matches itself, +instead of having any special pattern matching meaning. +

+

An additional binary operator, ‘=~’, is available, with the same +precedence as ‘==’ and ‘!=’. +When you use ‘=~’, the string to the right of the operator is considered +a POSIX extended regular expression pattern and matched accordingly +(using the POSIX regcomp and regexec interfaces +usually described in regex(3)). +The return value is 0 if the string matches the pattern, and 1 if it does not. +If the regular expression is syntactically incorrect, the conditional +expression returns 2. +If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +

+

You can quote any part of the pattern +to force the quoted portion to be matched literally +instead of as a regular expression (see above). +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched literally. +

+

The pattern will match if it matches any part of the string. +If you want to force the pattern to match the entire string, +anchor the pattern using the ‘^’ and ‘$’ regular expression +operators. +

+

For example, the following will match a line +(stored in the shell variable line) +if there is a sequence of characters anywhere in the value consisting of +any number, including zero, of +characters in the space character class, +immediately followed by zero or one instances of ‘a’, +then a ‘b’: +

+
+
[[ $line =~ [[:space:]]*(a)?b ]]
+
+ +

That means values for line like +‘aab’, ‘ aaaaaab’, ‘xaby’, and ‘ ab’ +will all match, +as will a line containing a ‘b’ anywhere in its value. +

+

If you want to match a character that’s special to the regular expression +grammar (‘^$|[]()\.*+?’), it has to be quoted to remove its special +meaning. +This means that in the pattern ‘xxx.txt’, the ‘.’ matches any +character in the string (its usual regular expression meaning), but in the +pattern ‘"xxx.txt"’, it can only match a literal ‘.’. +

+

Likewise, if you want to include a character in your pattern that has a +special meaning to the regular expression grammar, you must make sure it’s +not quoted. +If you want to anchor a pattern at the beginning or end of the string, +for instance, you cannot quote the ‘^’ or ‘$’ +characters using any form of shell quoting. +

+

If you want to match ‘initial string’ at the start of a line, +the following will work: +

+
[[ $line =~ ^"initial string" ]]
+
+

but this will not: +

+
[[ $line =~ "^initial string" ]]
+
+

because in the second example the ‘^’ is quoted and doesn’t have its +usual special meaning. +

+

It is sometimes difficult to specify a regular expression properly +without using quotes, or to keep track of the quoting used by regular +expressions while paying attention to +shell quoting and the shell’s quote removal. +Storing the regular expression in a shell variable is often a useful +way to avoid problems with quoting characters that are special to the +shell. +For example, the following is equivalent to the pattern used above: +

+
+
pattern='[[:space:]]*(a)?b'
+[[ $line =~ $pattern ]]
+
+ +

Shell programmers should take special care with backslashes, since +backslashes are used by both the shell and regular expressions to remove +the special meaning from the following character. +This means that after the shell’s word expansions complete +(see Shell Expansions), +any backslashes remaining in parts of the pattern +that were originally not quoted can remove the +special meaning of pattern characters. +If any part of the pattern is quoted, the shell does its best to ensure that +the regular expression treats those remaining backslashes as literal, +if they appeared in a quoted portion. +

+

The following two sets of commands are not equivalent: +

+
+
pattern='\.'
+
+[[ . =~ $pattern ]]
+[[ . =~ \. ]]
+
+[[ . =~ "$pattern" ]]
+[[ . =~ '\.' ]]
+
+ +

The first two matches will succeed, but the second two will not, because +in the second two the backslash will be part of the pattern to be matched. +In the first two examples, the pattern passed to the regular expression +parser is ‘\.’. The backslash removes the special meaning from +‘.’, so the literal ‘.’ matches. +In the second two examples, the pattern passed to the regular expression +parser has the backslash quoted (e.g., ‘\\\.’), which will not match +the string, since it does not contain a backslash. +If the string in the first examples were anything other than ‘.’, say +‘a’, the pattern would not match, because the quoted ‘.’ in the +pattern loses its special meaning of matching any single character. +

+

Bracket expressions in regular expressions can be sources of errors as well, +since characters that are normally special in regular expressions +lose their special meanings between brackets. +However, you can use bracket expressions to match special pattern characters +without quoting them, so they are sometimes useful for this purpose. +

+

Though it might seem like a strange way to write it, the following pattern +will match a ‘.’ in the string: +

+
+
[[ . =~ [.] ]]
+
+ +

The shell performs any word expansions before passing the pattern +to the regular expression functions, +so you can assume that the shell’s quoting takes precedence. +As noted above, the regular expression parser will interpret any +unquoted backslashes remaining in the pattern after shell expansion +according to its own rules. +The intention is to avoid making shell programmers quote things twice +as much as possible, so shell quoting should be sufficient to quote +special pattern characters where that’s necessary. +

+

The array variable BASH_REMATCH records which parts of the string +matched the pattern. +The element of BASH_REMATCH with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining BASH_REMATCH indices. +The element of BASH_REMATCH with index n is the portion of the +string matching the nth parenthesized subexpression. +

+

Bash sets +BASH_REMATCH +in the global scope; declaring it as a local variable will lead to +unexpected results. +

+

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. +

+
+ +
+
+
+ +

3.2.5.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 forces the shell to create +a subshell (see Command Execution Environment), and each +of the commands in list is executed in that subshell environment. +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 blanks 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. +

+
+
+
+
+
+

+Next: , Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.6 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 syntax for a coprocess is: +

+
+
coproc [NAME] command [redirections]
+
+ +

This creates a coprocess named NAME. +command may be either a simple command (see Simple Commands) +or a compound command (see Compound Commands). +NAME is a shell variable name. +If NAME is not supplied, the default name is COPROC. +

+

The recommended form to use for a coprocess is +

+
+
coproc NAME { command; }
+
+ +

This form is recommended because simple commands result in the coprocess +always being named COPROC, and it is simpler to use and more complete +than the other compound commands. +

+

There are other forms of coprocesses: +

+
+
coproc NAME compound-command
+coproc compound-command
+coproc simple-command
+
+ +

If command is a compound command, NAME is optional. The +word following coproc determines whether that word is interpreted +as a variable name: it is interpreted as NAME if it is not a +reserved word that introduces a compound command. +If command is a simple command, NAME is not allowed; this +is to avoid confusion between NAME and the first word of the simple +command. +

+

When the coprocess is executed, the shell creates an array variable +(see 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 (see Redirections). +The file descriptors can be utilized as arguments to shell commands +and redirections using standard word expansions. +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. +

+

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. +

+

Since the coprocess is created as an asynchronous command, +the coproc command always returns success. +The return status of a coprocess is the exit status of command. +

+
+
+
+
+

+Previous: , Up: Shell Commands   [Contents][Index]

+
+

3.2.7 GNU Parallel

+ +

There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. +

+

GNU Parallel, as its name suggests, can be used to build and run commands +in parallel. You may run the same command with different arguments, whether +they are filenames, usernames, hostnames, or lines read from files. GNU +Parallel provides shorthand references to many of the most common operations +(input lines, various portions of the input line, different ways to specify +the input source, and so on). Parallel can replace xargs or feed +commands from its input sources to several different instances of Bash. +

+

For a complete description, refer to the GNU Parallel documentation, which +is available at +https://www.gnu.org/software/parallel/parallel_tutorial.html. +

+
+
+
+
+ +

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: + +

+
fname () compound-command [ redirections ]
+
+ +

or +

+
+
function fname [()] compound-command [ redirections ]
+
+ +

This defines a shell function named fname. 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 (see Compound Commands). +That command is usually a list enclosed between { and }, but +may be any compound command listed above. +If the function reserved word is used, but the +parentheses are not supplied, the braces are recommended. +compound-command is executed whenever fname is specified as the +name of a simple command. +When the shell is in POSIX mode (see Bash POSIX Mode), +fname must be a valid shell name and +may not be the same as one of the special builtins +(see Special Builtins). +In default mode, a function name can be any unquoted shell word that does +not contain ‘$’. +Any redirections (see 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 (see 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 +blanks 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 (see 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. +See Bourne Shell Builtins, for the description of the +trap builtin. +

+

The FUNCNEST variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort. +

+

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 (local variables). +Ordinarily, variables and their values +are shared between a function and its caller. +These variables are visible only to +the function and the commands it invokes. This is particularly +important when a shell function calls other functions. +

+

In the following description, the current scope is a currently- +executing function. +Previous scopes consist of that function’s caller and so on, +back to the "global" scope, where the shell is not executing +any shell function. +Consequently, a local variable at the current local scope is a variable +declared using the local or declare builtins in the +function that is currently executing. +

+

Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. +

+

The shell uses dynamic scoping to control a variable’s visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. +

+

For example, if a variable var is declared as local in function +func1, and func1 calls another function func2, +references to var made from within func2 will resolve to the +local variable var from func1, shadowing any global variable +named var. +

+

The following script demonstrates this behavior. +When executed, the script displays +

+
+
In func2, var = func1 local
+
+ +
+
func1()
+{
+    local var='func1 local'
+    func2
+}
+
+func2()
+{
+    echo "In func2, var = $var"
+}
+
+var=global
+func1
+
+ +

The unset builtin also acts using the same dynamic scope: if a +variable is local to the current scope, unset will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +(appearing as unset) +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible +(see below how localvar_unsetshell option changes this behavior). +

+

Function names and definitions may be listed with the +-f option to the declare (typeset) +builtin command (see Bash Builtin Commands). +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 child shell processes +(those created when executing a separate shell invocation) +automatically have them defined with the +-f option to the export builtin +(see Bourne Shell Builtins). +

+

Functions may be recursive. +The FUNCNEST variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, no limit is placed on the number of recursive calls. +

+
+
+
+ +

3.4 Shell Parameters

+ + + + + +

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 Bash Builtin Commands). +

+

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 (see Shell Parameter Expansion). +If the variable has its integer +attribute set, then value +is evaluated as an arithmetic expression even if the $((…)) +expansion is not used (see Arithmetic Expansion). +Word splitting and filename expansion are not performed. +Assignment statements may also appear as arguments to the +alias, +declare, typeset, export, readonly, +and local builtin commands (declaration commands). +When in POSIX mode (see Bash POSIX Mode), these builtins may appear +in a command after one or more instances of the command builtin +and retain these assignment statement properties. +

+

In the context where an assignment statement is assigning a value +to a shell variable or array index (see Arrays), the ‘+=’ +operator can be used to +append to or add to the variable’s previous value. +This includes arguments to builtin commands such as declare that +accept assignment statements (declaration commands). +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 +(see 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. +

+

A variable can be assigned the nameref attribute using the +-n option to the declare or local builtin commands +(see Bash Builtin Commands) +to create a nameref, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the nameref +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable’s value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +

+
declare -n ref=$1
+
+

inside the function creates a nameref variable ref whose value is +the variable name passed as the first argument. +References and assignments to ref, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as $1. +

+

If the control variable in a for loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the -n option to the unset builtin +(see Bourne Shell Builtins). +Otherwise, if unset is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. +

+ +
+
+ +

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 (see Shell Builtin Commands). +The positional parameters are +temporarily replaced when a shell function is executed +(see Shell Functions). +

+

When a positional parameter consisting of more than a single +digit is expanded, it must be enclosed in braces. +

+
+
+
+ +

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 is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and filename expansion. +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. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the +expansion occurs within double quotes, and word splitting is performed, +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 job most recently placed into the +background, whether executed as an asynchronous command or using +the bg builtin (see Job Control Builtins). +

+
+
0
+
+

($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 +(see Shell Scripts), $0 is set to the name of that file. +If Bash is started with the -c option (see 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. +

+
+ +
+
+
+
+ +

3.5 Shell Expansions

+ + +

Expansion is performed on the command line after it has been split into +tokens. There are seven kinds of expansion performed: +

+
    +
  • brace expansion +
  • tilde expansion +
  • parameter and variable expansion +
  • command substitution +
  • arithmetic expansion +
  • word splitting +
  • filename expansion +
+ + +

The order of expansions is: +brace expansion; +tilde expansion, parameter and variable expansion, 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 tilde, parameter, variable, and arithmetic expansion and +command substitution. +

+

After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(quote removal). +

+

Only brace expansion, word splitting, and filename expansion +can increase 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 $* (see Special Parameters), and +"${name[@]}" and ${name[*]} +(see Arrays). +

+

After all expansions, quote removal (see Quote Removal) +is performed. +

+ +
+
+ +

3.5.1 Brace Expansion

+ + + +

Brace expansion is a mechanism by which arbitrary strings may be generated. +This mechanism is similar to +filename expansion (see Filename Expansion), +but the filenames 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 sequence 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 letters, +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 letters are supplied, the expression expands to each character +lexicographically between x and y, inclusive, +using the default C locale. +Note that both x and y must be of the same type +(integer or letter). +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. +

+

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, +and inhibits brace expansion until the closing ‘}’. +

+

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}}
+
+ +
+
+
+ +

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 (see 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 filenames 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’ +

+
+ +

Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (see Shell Parameters) +when they appear as arguments to simple commands. +Bash does not do this, except for the declaration commands listed +above, when in POSIX mode. +

+
+
+
+ +

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 parameter is a shell parameter as described above +(see Shell Parameters) or an array reference (see Arrays). +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 (!), +and parameter is not a nameref, +it introduces a level of indirection. +Bash uses the value formed by expanding the rest of +parameter as the new parameter; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original parameter. +This is known as indirect expansion. +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If parameter is a nameref, this expands to the name of the +variable referenced by parameter instead of performing the +complete 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 (e.g., ‘:-’), 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. +

+
+
$ v=123
+$ echo ${v-unset}
+123
+
+ +
+
${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. +

+
+
$ var=
+$ : ${var:=DEFAULT}
+$ echo $var
+DEFAULT
+
+ +
+
${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. +

+
+
$ var=
+$ : ${var:?var is unset or null}
+bash: var: var is unset or null
+
+ +
+
${parameter:+word}
+

If parameter +is null or unset, nothing is substituted, otherwise the expansion of +word is substituted. +

+
+
$ var=123
+$ echo ${var:+var is set and not null}
+var is set and not null
+
+ +
+
${parameter:offset}
+
${parameter:offset:length}
+

This is referred to as Substring Expansion. +It expands to up to length characters of the value of parameter +starting at the character specified by offset. +If parameter is ‘@’ or ‘*’, an indexed array subscripted by +‘@’ or ‘*’, or an associative array name, the results differ as +described below. +If length is omitted, it expands to the substring of the value of +parameter starting at the character specified by offset +and extending to the end of the value. +length and offset are arithmetic expressions +(see Shell Arithmetic). +

+

If offset evaluates to a number less than zero, the value +is used as an offset in characters +from the end of the value of parameter. +If length evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of parameter rather than +a number of characters, and the expansion is the characters between +offset and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the ‘:-’ expansion. +

+

Here are some examples illustrating substring expansion on parameters and +subscripted arrays: +

+
$ string=01234567890abcdefgh
+$ echo ${string:7}
+7890abcdefgh
+$ echo ${string:7:0}
+
+$ echo ${string:7:2}
+78
+$ echo ${string:7:-2}
+7890abcdef
+$ echo ${string: -7}
+bcdefgh
+$ echo ${string: -7:0}
+
+$ echo ${string: -7:2}
+bc
+$ echo ${string: -7:-2}
+bcdef
+$ set -- 01234567890abcdefgh
+$ echo ${1:7}
+7890abcdefgh
+$ echo ${1:7:0}
+
+$ echo ${1:7:2}
+78
+$ echo ${1:7:-2}
+7890abcdef
+$ echo ${1: -7}
+bcdefgh
+$ echo ${1: -7:0}
+
+$ echo ${1: -7:2}
+bc
+$ echo ${1: -7:-2}
+bcdef
+$ array[0]=01234567890abcdefgh
+$ echo ${array[0]:7}
+7890abcdefgh
+$ echo ${array[0]:7:0}
+
+$ echo ${array[0]:7:2}
+78
+$ echo ${array[0]:7:-2}
+7890abcdef
+$ echo ${array[0]: -7}
+bcdefgh
+$ echo ${array[0]: -7:0}
+
+$ echo ${array[0]: -7:2}
+bc
+$ echo ${array[0]: -7:-2}
+bcdef
+
+

If parameter is ‘@’ or ‘*’, the result is length +positional parameters beginning at offset. +A negative offset is taken relative to one greater than the greatest +positional parameter, so an offset of -1 evaluates to the last positional +parameter. +It is an expansion error if length evaluates to a number less than zero. +

+

The following examples illustrate substring expansion using positional +parameters: +

+
$ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
+$ echo ${@:7}
+7 8 9 0 a b c d e f g h
+$ echo ${@:7:0}
+
+$ echo ${@:7:2}
+7 8
+$ echo ${@:7:-2}
+bash: -2: substring expression < 0
+$ echo ${@: -7:2}
+b c
+$ echo ${@:0}
+./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
+$ echo ${@:0:2}
+./bash 1
+$ echo ${@: -7:0}
+
+
+

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. +It is an expansion error if length evaluates to a number less than zero. +

+

These examples show how you can use substring expansion with indexed +arrays: +

+
$ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h)
+$ echo ${array[@]:7}
+7 8 9 0 a b c d e f g h
+$ echo ${array[@]:7:2}
+7 8
+$ echo ${array[@]: -7:2}
+b c
+$ echo ${array[@]: -7:-2}
+bash: -2: substring expression < 0
+$ echo ${array[@]:0}
+0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
+$ echo ${array[@]:0:2}
+0 1
+$ echo ${array[@]: -7:0}
+
+
+

Substring expansion applied to an associative array produces undefined +results. +

+

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, $0 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. +If parameter +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +parameter, so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+
+
${parameter#word}
+
${parameter##word}
+

The word +is expanded to produce a pattern and matched according to the rules +described below (see Pattern Matching). 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 and matched according to the rules +described below (see Pattern Matching). +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}
+
${parameter//pattern/string}
+
${parameter/#pattern/string}
+
${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. +string undergoes tilde expansion, parameter and variable expansion, +arithmetic expansion, command and process substitution, and quote removal. +The match is performed according to the rules described below +(see Pattern Matching). +

+

In the first form above, only the first match is replaced. +If there are two slashes separating parameter and pattern +(the second form above), all matches of pattern are +replaced with string. +If pattern is preceded by ‘#’ (the third form above), +it must match at the beginning of the expanded value of parameter. +If pattern is preceded by ‘%’ (the fourth form above), +it must match at the end of the expanded value of parameter. +If the expansion of string is null, +matches of pattern are deleted. +If string is null, +matches of pattern are deleted +and the ‘/’ following pattern may be omitted. +

+

If the patsub_replacement shell option is enabled using shopt, +any unquoted instances of ‘&’ in string are replaced with the +matching portion of pattern. +This is intended to duplicate a common sed idiom. +

+

Quoting any part of string inhibits replacement in the +expansion of the quoted portion, including replacement strings stored +in shell variables. +Backslash will escape ‘&’ in string; the backslash is removed +in order to permit a literal ‘&’ in the replacement string. +Users should take care if string is double-quoted to avoid +unwanted interactions between the backslash and double-quoting, since +backslash has special meaning within double quotes. +Pattern substitution performs the check for unquoted ‘&’ after +expanding string, +so users should ensure to properly quote any occurrences of ‘&’ +they want to be taken literally in the replacement +and ensure any instances of ‘&’ they want to be replaced are unquoted. +

+

For instance, +

+
+
var=abcdef
+rep='& '
+echo ${var/abc/& }
+echo "${var/abc/& }"
+echo ${var/abc/$rep}
+echo "${var/abc/$rep}"
+
+ +

will display four lines of "abc def", while +

+
+
var=abcdef
+rep='& '
+echo ${var/abc/\& }
+echo "${var/abc/\& }"
+echo ${var/abc/"& "}
+echo ${var/abc/"$rep"}
+
+ +

will display four lines of "& def". +Like the pattern removal operators, double quotes surrounding the +replacement string quote the expanded characters, while double quotes +enclosing the entire parameter substitution do not, since +the expansion is performed in a +context that doesn’t take any enclosing double quotes into account. +

+

Since backslash can escape ‘&’, it can also escape a backslash in +the replacement string. +This means that ‘\\’ will insert a literal +backslash into the replacement, so these two echo commands +

+
+
var=abcdef
+rep='\\&xyz'
+echo ${var/abc/\\&xyz}
+echo ${var/abc/$rep}
+
+ +

will both output ‘\abcxyzdef’. +

+

It should rarely be necessary to enclose only string in double +quotes. +

+

If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +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. +Each character in the expanded value of parameter is tested against +pattern, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. +

+

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. +

+
+
${parameter@operator}
+

The expansion is either a transformation of the value of parameter +or information about parameter itself, depending on the value of +operator. Each operator is a single letter: +

+
+
U
+

The expansion is a string that is the value of parameter with lowercase +alphabetic characters converted to uppercase. +

+
u
+

The expansion is a string that is the value of parameter with the first +character converted to uppercase, if it is alphabetic. +

+
L
+

The expansion is a string that is the value of parameter with uppercase +alphabetic characters converted to lowercase. +

+
Q
+

The expansion is a string that is the value of parameter quoted in a +format that can be reused as input. +

+
E
+

The expansion is a string that is the value of parameter with backslash +escape sequences expanded as with the $'…' quoting mechanism. +

+
P
+

The expansion is a string that is the result of expanding the value of +parameter as if it were a prompt string (see Controlling the Prompt). +

+
A
+

The expansion is a string in the form of +an assignment statement or declare command that, if +evaluated, will recreate parameter with its attributes and value. +

+
K
+

Produces a possibly-quoted version of the value of parameter, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(see Arrays). +

+
a
+

The expansion is a string consisting of flag values representing +parameter’s attributes. +

+
k
+

Like the ‘K’ transformation, but expands the keys and values of +indexed and associative arrays to separate words after word splitting. +

+
+ +

If parameter is ‘@’ or ‘*’, +the 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 operation is applied to each member of the +array in turn, and the expansion is the resultant list. +

+

The result of the expansion is subject to word splitting and filename +expansion as described below. +

+
+ +
+
+
+ +

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 in a subshell environment +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. +

+
+
+
+ +

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 undergoes the same expansions +as if it were within double quotes, +but double quote characters in expression are not treated specially +and are removed. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. +Arithmetic expansions may be nested. +

+

The evaluation is performed according to the rules listed below +(see Shell Arithmetic). +If the expression is invalid, Bash prints a message indicating +failure to the standard error and no substitution occurs. +

+
+
+
+ +

3.5.6 Process Substitution

+ + +

Process substitution allows a process’s input or output to be +referred to using a filename. +It takes the form of +

+
<(list)
+
+

or +

+
>(list)
+
+

The process list is run asynchronously, and its input or output +appears as a filename. +This filename 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. +Process substitution is supported on systems that support named +pipes (FIFOs) or the /dev/fd method of naming open files. +

+

When available, process substitution is performed simultaneously with +parameter and variable expansion, command substitution, and arithmetic +expansion. +

+
+
+
+ +

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 using these characters +as field terminators. +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, tab, and newline +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 +and passed to commands as empty strings. +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 +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +-d'' becomes -d after word splitting and +null argument removal. +

+

Note that if no expansion occurs, no splitting +is performed. +

+
+
+
+
+

+Next: , Previous: , Up: Shell Expansions   [Contents][Index]

+
+

3.5.8 Filename Expansion

+ + + + + +

After word splitting, unless the -f option has been set +(see The Set Builtin), Bash scans each word for the characters +‘*’, ‘?’, and ‘[’. +If one of these characters appears, and is not quoted, then the word is +regarded as a pattern, +and replaced with an alphabetically sorted list of +filenames matching the pattern (see Pattern Matching). +If no matching filenames 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. +In order to match the filenames ‘.’ and ‘..’, +the pattern must begin with ‘.’ (for example, ‘.?’), +even if dotglob is set. +If the globskipdots shell option is enabled, the filenames +‘.’ and ‘..’ are never matched, even if the pattern begins +with a ‘.’. +When not matching filenames, the ‘.’ character is not treated specially. +

+

When matching a filename, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below (see Pattern Matching). +

+

See the description of shopt in The Shopt Builtin, +for a description of the nocaseglob, nullglob, +globskipdots, +failglob, and dotglob options. +

+

The GLOBIGNORE +shell variable may be used to restrict the set of file names matching a +pattern. If GLOBIGNORE +is set, each matching file name that also matches one of the patterns in +GLOBIGNORE is removed from the list of matches. +If the nocaseglob option is set, the matching against the patterns in +GLOBIGNORE is performed without regard to case. +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. +

+ +
+
+ +

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 falls 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, +and the characters included in the range, +are determined by +the current locale and the values of the +LC_COLLATE and LC_ALL shell variables, 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 ‘[aBbCcDdxYyZz]’, 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’, or enable the +globasciiranges shell option. +

+

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, the shell recognizes several extended pattern matching operators. +In the following description, a pattern-list is a list of one +or more patterns separated by a ‘|’. +When matching filenames, the dotglob shell option determines +the set of filenames that are tested, as described above. +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. +

+
+ +

The extglob option changes the behavior of the parser, since the +parentheses are normally treated as operators with syntactic meaning. +To ensure that extended matching patterns are parsed correctly, make sure +that extglob is enabled before parsing constructs containing the +patterns, including shell functions and command substitutions. +

+

When matching filenames, the dotglob shell option determines +the set of filenames that are tested: +when dotglob is enabled, the set of filenames includes all files +beginning with ‘.’, but the filenames +‘.’ and ‘..’ must be matched by a +pattern or sub-pattern that begins with a dot; +when it is disabled, the set does not +include any filenames beginning with “.” unless the pattern +or sub-pattern begins with a ‘.’. +As above, ‘.’ only has a special meaning when matching filenames. +

+

Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. +

+
+
+
+
+ +

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. +

+
+
+
+
+ +

3.6 Redirections

+ + +

Before a command is executed, its input and output +may be redirected +using a special notation interpreted by the shell. +Redirection allows commands’ file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in 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. +If {varname} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor’s lifetime manually. +The varredir_close shell option manages this behavior +(see The Shopt Builtin). +

+

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. +If the operating system on which Bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below. +

+
+
/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 +the corresponding TCP 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 +the corresponding UDP 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
+
+

When using the second form, word may not expand to a number or +‘-’. If it does, other redirection operators apply +(see Duplicating File Descriptors below) for compatibility reasons. +

+
+
+

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
+
+

(see Duplicating File Descriptors below). +

+
+
+

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 (or file descriptor n if n is specified) for a command. +

+

The format of here-documents is: +

+
[n]<<[-]word
+        here-document
+delimiter
+
+ +

No parameter and variable expansion, command substitution, +arithmetic expansion, or filename expansion is performed on +word. If any part of word is 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, +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: +

+
[n]<<< word
+
+ +

The word undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Filename expansion and word splitting are not performed. +The result is supplied as a single string, +with a newline appended, +to the command on its +standard input (or file descriptor n if n is specified). +

+
+
+

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. +If word +evaluates to ‘-’, file descriptor n is closed. +As a special case, if n is omitted, and word does not +expand to one or more digits or ‘-’, 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. +

+
+
+
+
+ +

3.7 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, in +the following order. +

+
    +
  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 (see 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 (see 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. +In the case of such a command (one that consists only of assignment +statements and redirections), assignment statements are performed before +redirections. +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. +

+
+
+
+ +

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 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 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 in a separate execution environment +with the original command and +the original command’s arguments as its arguments, and the function’s +exit status becomes the exit status of that subshell. +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 +Shell Scripts. + +
  6. If the command was not begun asynchronously, the shell waits for +the command to complete and collects its exit status. + +
+ +
+
+
+ +

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 (see The Shopt Builtin) + +
  • shell aliases defined with alias (see Aliases) + +
  • various process IDs, including those of background jobs +(see Lists of Commands), 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 (see 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. +

+

A subshell is a copy of the shell process. +

+

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. +

+
+
+
+ +

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 Shell Parameters. +These assignment statements affect only the environment seen +by that command. +

+

If the -k option is set (see 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 pathname of the command and passed to that +command in its environment. +

+
+
+
+
+

+Next: , Previous: , Up: Executing Commands   [Contents][Index]

+
+

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 +(see Conditional Constructs) and some of the list +constructs (see Lists of Commands). +

+

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, +generally invalid options or missing arguments. +

+

The exit status of the last command is available in the special +parameter $? (see Special Parameters). +

+
+
+
+
+

+Previous: , Up: Executing Commands   [Contents][Index]

+
+

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 (see 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 (see Job Control Builtins) or marked +to not receive SIGHUP using disown -h. +

+

If the huponexit shell option has been set with shopt +(see 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. +

+

When job control is not enabled, and Bash is waiting for a foreground +command to complete, the shell receives keyboard-generated signals +such as SIGINT (usually generated by ‘^C’) that users +commonly intend to send to that command. +This happens because the shell and the command are in the same process +group as the terminal, and ‘^C’ sends SIGINT to all processes +in that process group. +See Job Control, for a more in-depth discussion of process groups. +

+

When Bash is running without job control enabled and receives SIGINT +while waiting for a foreground command, it waits until that foreground +command terminates and then decides what to do about the SIGINT: +

+
    +
  1. If the command terminates due to the SIGINT, Bash concludes +that the user meant to end the entire script, and acts on the +SIGINT (e.g., by running a SIGINT trap or exiting itself); + +
  2. If the pipeline does not terminate due to SIGINT, the program +handled the SIGINT itself and did not treat it as a fatal signal. +In that case, Bash does not treat SIGINT as a fatal signal, +either, instead assuming that the SIGINT was used as part of the +program’s normal operation (e.g., emacs uses it to abort editing +commands) or deliberately discarded. However, Bash will run any +trap set on SIGINT, as it does with any other trapped signal it +receives while it is waiting for the foreground command to +complete, for compatibility. +
+ +
+
+
+
+ +

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 +(see 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 creates a +new instance of itself +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 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 and, depending on the operating system, one +or more optional arguments for that interpreter. +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 one or more optional arguments 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 supplied to the +script. +The details of how the interpreter line is split into an interpreter name +and a set of arguments vary across systems. +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 a single argument to a maximum of 32 characters, so it’s not +portable to assume that using more than one argument will work. +

+

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. It’s a common idiom to use env to find +bash even if it’s been installed in another directory: +#!/usr/bin/env bash will find the first occurrence of bash +in $PATH. +

+
+
+
+
+ +

4 Shell Builtin Commands

+ + +

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 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 (see Job Control Builtins), the directory stack +(see Directory Stack Builtins), the command history +(see Bash History Builtins), and the programmable completion +facilities (see 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, return, +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. +

+ +
+
+ +

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, +but filename does not need to be executable. +When Bash is not in POSIX mode, it searches the current directory +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. +If the -T option is enabled, . inherits any trap on +DEBUG; if it is not, any DEBUG trap string is saved and +restored around the call to ., and . unsets the +DEBUG trap while it executes. +If -T is not set, and the sourced file changes +the DEBUG trap, the new value is retained when . completes. +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 [-e]] [-@] [directory]
+
+ +

Change the current working directory to directory. +If directory is not supplied, the value of the HOME +shell variable is used. +If the shell variable +CDPATH exists, it is used as a search path: +each directory name in CDPATH is searched for +directory, with alternative directory names in CDPATH +separated by a colon (‘:’). +If directory begins with a slash, CDPATH is not used. +

+

The -P option means to not follow symbolic links: symbolic links +are resolved while cd is traversing directory and before +processing an instance of ‘..’ in directory. +

+

By default, or when the -L option is supplied, symbolic links +in directory are resolved after cd processes an instance +of ‘..’ in directory. +

+

If ‘..’ appears in directory, it is processed by removing the +immediately preceding pathname component, back to a slash or the beginning +of directory. +

+

If the -e option is supplied with -P +and the current working directory cannot be successfully determined +after a successful directory change, cd will return an unsuccessful +status. +

+

On systems that support it, the -@ option presents the extended +attributes associated with a file as a directory. +

+

If directory is ‘-’, it is converted to $OLDPWD +before the directory change is attempted. +

+

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. +

+

If the directory change is successful, cd sets the value of the +PWD environment variable to the new directory name, and sets the +OLDPWD environment variable to the value of the current working +directory before the change. +

+

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 command +cannot be executed for some reason, a non-interactive shell exits, +unless the execfail shell option +is enabled. In that case, it returns failure. +An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if exec fails. +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 names of all exported variables 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 [arg …]
+
+ +

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 whitespace. +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 +supplied as arg values, 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]
+
+ +

Each time hash is invoked, it remembers the full pathnames of the +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. +Any previously-remembered pathname is discarded. +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 [-aAf] [-p] [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 both options are supplied, -A takes precedence. +If no name arguments are given, or if the -p +option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. +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 stop executing and return the value n +to its caller. +If n is not supplied, the return value is the exit status of the +last command executed in the function. +If return is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If return is executed during a DEBUG trap, the last command +used to determine the status is the last command executed by the trap +handler before return was invoked. +return may also be used to terminate execution of a script +being executed with the . (source) builtin, +returning either n or +the exit status of the last command executed within the script as the exit +status of the script. +If n is supplied, the return value is its least significant +8 bits. +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 supplied a non-numeric +argument or 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 $# down 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
+
[
+
+
+
test expr
+
+ +

Evaluate a conditional expression expr and return a status of 0 +(true) or 1 (false). +Each operator and operand must be a separate argument. +Expressions are composed of the primaries described below in +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. +Operator precedence is used when there are five or more arguments. +

+
+
! 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 +(see 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
+

The following conditions are applied in the order listed. +

+
    +
  1. If the second argument is one of the binary conditional +operators (see 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. +
  2. If the first argument is ‘!’, the value is the negation of +the two-argument test using the second and third arguments. +
  3. If the first argument is exactly ‘(’ and the third argument is +exactly ‘)’, the result is the one-argument test of the second +argument. +
  4. Otherwise, the expression is false. +
+ +
+
4 arguments
+

The following conditions are applied in the order listed. +

+
    +
  1. If the first argument is ‘!’, the result is the negation of +the three-argument expression composed of the remaining arguments. +
  2. If the first argument is exactly ‘(’ and the fourth argument is +exactly ‘)’, the result is the two-argument test of the second +and third arguments. +
  3. 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. +

+
+ +

When used with test or ‘[’, the ‘<’ and ‘>’ +operators sort lexicographically using ASCII ordering. +

+
+
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 (see 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 pipeline (which may consist of a single simple +command), a list, or a compound command returns 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 +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 using !. +These are the same conditions obeyed by the errexit (-e) +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 [-fnv] [name]
+
+ +

Remove each variable or function name. +If the -v option is given, each +name refers to a shell variable and that variable is removed. +If the -f option is given, the names refer to shell +functions, and the function definition is removed. +If the -n option is supplied, and name is a variable with +the nameref attribute, name will be unset rather than the +variable it references. +-n has no effect if the -f option is supplied. +If no options are supplied, each name refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. +Readonly variables and functions may not be unset. +Some shell variables lose their special behavior if they are unset; such +behavior is noted in the description of the individual variables. +The return status is zero unless a name is readonly or may not be unset. +

+
+ +
+
+
+ +

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 Aliases. +

+
+
bind
+
+
bind [-m keymap] [-lpsvPSVX]
+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 [-m keymap] keyseq:readline-command
+bind readline-command-line
+
+ +

Display current Readline (see 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 (see 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 (vi-move is also a +synonym); 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 and READLINE_MARK variables +to the current location of the insertion point and the saved insertion +point (the mark), respectively. +The shell assigns any numeric argument the user supplied to the +READLINE_ARGUMENT variable. +If there was no argument, that variable is not set. +If the executed command changes the value of any of READLINE_LINE, +READLINE_POINT, or READLINE_MARK, those new values will be +reflected in the editing state. +

+
+
-X
+

List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input. +

+
+ +

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 [-aAfFgiIlnrtux] [-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, +other than -f and -F, 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 +(see The Shopt Builtin), the source file name and line number where +each name is defined are displayed as well. +-F implies -f. +

+

The -g option forces variables to be created or modified at +the global scope, even when declare is executed in a shell function. +It is ignored in all other cases. +

+

The -I option causes local variables to inherit the attributes +(except the nameref attribute) +and value of any existing variable with the same +name at a surrounding scope. +If there is no existing variable, the local variable is initially unset. +

+

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 (see Arrays). +

+
+
-A
+

Each name is an associative array variable (see Arrays). +

+
+
-f
+

Use function names only. +

+
+
-i
+

The variable is to be treated as +an integer; arithmetic evaluation (see 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. +

+
+
-n
+

Give each name the nameref attribute, making +it a name reference to another variable. +That other variable is defined by the value of name. +All references, assignments, and attribute modifications +to name, except for those using or changing the +-n attribute itself, are performed on the variable referenced by +name’s value. +The nameref attribute cannot be applied to array variables. +

+
+
-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’ and ‘+A’ +may not be used to destroy array variables and ‘+r’ will not +remove the readonly attribute. +When used in a function, declare makes each name local, +as with the local command, unless the -g option is used. +If a variable name is followed by =value, the value of the variable +is set to value. +

+

When using -a or -A and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. +

+

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 (see 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 0 unless a write error occurs. +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
+
\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) +

+
\uHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHH (one to four hex digits) +

+
\UHHHHHHHH
+

the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +HHHHHHHH (one to eight 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. +Bash will use the value of the BASH_LOADABLES_PATH variable as a +colon-separated list of directories in which to search for filename. +The default is system-dependent. +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 (see Special Builtins). +

+

If no options are supplied and a name is not a shell builtin, +enable will attempt to load name from a shared object named +name, as if the command were +‘enable -f name name’. +

+

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 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. +If name is ‘-’, the set of shell options is made local to the +function in which local is invoked: shell options changed using +the set builtin inside the function are restored to their original +values when the function returns. +The restore is effected as if a series of set commands were executed +to restore the values that were in place before the function. +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 [-d delim] [-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: +

+
+
-d
+

The first character of delim is used to terminate each input line, +rather than newline. +If delim is the empty string, mapfile will terminate a line +when it reads a NUL character. +

+
-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 delim (default newline) from each line read. +

+
-u
+

Read lines from file descriptor fd instead of the standard input. +

+
-C
+

Evaluate callback each time quantum 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 and the line to be assigned to that element +as additional arguments. +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 -v option causes the output to be assigned to the variable +var rather than being printed to the standard output. +

+

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, printf +interprets the following extensions: +

+
+
%b
+

Causes printf to expand backslash escape sequences in the +corresponding argument in the same way as echo -e +(see Bash Builtin Commands). +

+
%q
+

Causes printf to output the +corresponding argument in a format that can be reused as shell input. +

+
%Q
+

like %q, but applies any supplied precision to the argument +before quoting it. +

+
%(datefmt)T
+

Causes printf to output the date-time string resulting from using +datefmt as a format string for strftime(3). +The corresponding argument is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: -1 represents the current +time, and -2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if -1 had been given. +This is an exception to the usual printf behavior. +

+
+ +

The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original. +

+

Arguments to non-string format specifiers are treated as C language constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. +

+

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, +split into words as described above in Word Splitting, +and the first word +is assigned to the first name, the second word to the second name, +and so on. +If there are more words than names, +the remaining words and their intervening delimiters are 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 using the same rules the shell +uses for expansion (described above in Word Splitting). +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 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. +If delim is the empty string, read will terminate a line +when it reads a NUL character. +

+
+
-e
+

Readline (see Command Line Editing) is used to obtain the line. +Readline uses the current (or default, if line editing was not previously +active) editing settings, but uses Readline’s default filename completion. +

+
+
-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 honors 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. +The result is not split on the characters in IFS; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the -r option below). +

+
+
-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 then 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 (or a specified number of characters) +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 read times out, read saves any partial input read into +the specified variable name. +If timeout is 0, read returns immediately, without trying to +read any data. +The exit status is 0 if input is available on the specified file descriptor, +or the read will return EOF, +non-zero otherwise. +The exit status is greater than 128 if the timeout is exceeded. +

+
+
-u fd
+

Read input from file descriptor fd. +

+
+ +

If no names are supplied, the line read, +without the ending delimiter but otherwise unmodified, +is assigned to the +variable REPLY. +The exit status is zero, unless end-of-file is encountered, read +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +or an invalid file descriptor is supplied as the argument to -u. +

+
+
readarray
+
+
readarray [-d delim] [-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 . (see 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, +which is 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 [-afFgrxilnrtux] [-p] [name[=value] …]
+
+ +

The typeset command is supplied for compatibility with the Korn +shell. +It is a synonym for the declare builtin command. +

+
+
ulimit
+
+
ulimit [-HS] -a
+ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [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; no limits are set. +

+
+
-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. +

+
+
-k
+

The maximum number of kqueues that may be allocated. +

+
+
-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 shell, and, on +some systems, to its children. +

+
+
-x
+

The maximum number of file locks. +

+
+
-P
+

The maximum number of pseudoterminals. +

+
+
-R
+

The maximum time a real-time process can run before blocking, in microseconds. +

+
+
-T
+

The maximum number of threads. +

+
+ +

If limit is given, and the -a option is not used, +limit 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 more than one +resource is specified, the limit name and unit, if appropriate, +are printed before the value. +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; +-R, which is in microseconds; +-p, which is in units of 512-byte blocks; +-P, +-T, +-b, +-k, +-n and -u, which are unscaled values; +and, when in POSIX Mode (see Bash POSIX Mode), +-c and -f, which are in 512-byte increments. +

+

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 Aliases. +

+
+ +
+
+
+ +

4.3 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-name] [--] [-] [argument …]
+set [+abefhkmnptuvxBCEHPT] [+o option-name] [--] [-] [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
+

Each variable or function that is created or modified is given the +export attribute and marked 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 (see Pipelines), which may consist of a single simple command +(see Simple Commands), +a list (see Lists of Commands), +or a compound command (see Compound Commands) +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 !. +If a compound command other than a subshell +returns a non-zero status because a command failed +while -e was being ignored, the shell does not exit. +A trap on ERR, if set, is executed before the shell exits. +

+

This option applies to the shell environment and each subshell environment +separately (see Command Execution Environment), and may cause +subshells to exit before executing all the commands in the subshell. +

+

If a compound command or shell function executes in a context where +-e is being ignored, +none of the commands executed within the compound command or function body +will be affected by the -e setting, even if -e is set +and a command returns a failure status. +If a compound command or shell function sets -e while executing in +a context where -e is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes. +

+
+
-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 (see Job Control). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status. +

+
+
-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 (see 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 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 +(see 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. +

+
+
-r
+

Enable restricted shell mode. +This option cannot be unset once it has been set. +

+
+
-t
+

Exit after reading and executing one command. +

+
+
-u
+

Treat unset variables and parameters other than the special parameters +‘@’ or ‘*’, +or array variables subscripted with ‘@’ 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 (see 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 (see History Expansion). +This option is on by default for interactive shells. +

+
+
-P
+

If set, do not resolve 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. +

+
+ +
+
+
+ +

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 settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +-o option is used, those available with the -o +option to the set builtin command (see The Set Builtin). +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; +if optnames are supplied, the output is restricted to those options. +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 (see The Set Builtin). +

+
+ +

If either -s or -u +is used with no optname arguments, shopt shows only +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: +

+
assoc_expand_once
+

If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing. +

+
+
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 (see Job Control). +The shell always postpones exiting if any jobs are stopped. +

+
+
checkwinsize
+

If set, Bash checks the window size after each external (non-builtin) +command and, if necessary, updates the values of +LINES and COLUMNS. +This option is enabled by default. +

+
+
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. +This option is enabled by default, but only has an effect if command +history is enabled (see Bash History Facilities). +

+
+
compat31
+
compat32
+
compat40
+
compat41
+
compat42
+
compat43
+
compat44
+

These control aspects of the shell’s compatibility mode +(see Shell Compatibility Mode). +

+
+
complete_fullquote
+

If set, Bash +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, Bash +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default Bash behavior in +versions through 4.2. +

+
+
direxpand
+

If set, Bash +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the Readline editing +buffer. +If not set, Bash attempts to preserve what the user typed. +

+
+
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. +The filenames ‘.’ and ‘..’ must always be matched explicitly, +even if dotglob is set. +

+
+
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, +Aliases. +This option is enabled by default for interactive shells. +

+
+
extdebug
+

If set at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the --debugger option. +If set after invocation, behavior intended for use by debuggers is enabled: +

+
    +
  1. The -F option to the declare builtin (see Bash Builtin Commands) +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), the shell simulates +a call to return. + +
  4. BASH_ARGC and BASH_ARGV are updated as described in their +descriptions (see 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 +ERR trap. +
+ +
+
extglob
+

If set, the extended pattern matching features described above +(see 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. +See Bash Variables, for a description of FIGNORE. +This option is enabled by default. +

+
+
globasciiranges
+

If set, range expressions used in pattern matching bracket expressions +(see Pattern Matching) +behave as if in the traditional C locale when performing +comparisons. That is, the current locale’s collating sequence +is not taken into account, so +‘b’ will not collate between ‘A’ and ‘B’, +and upper-case and lower-case ASCII characters will collate together. +

+
+
globskipdots
+

If set, filename expansion will never match the filenames +‘.’ and ‘..’, +even if the pattern begins with a ‘.’. +This option is enabled by default. +

+
+
globstar
+

If set, the pattern ‘**’ used in a filename expansion context will +match all 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 (see Letting Readline Type For You). This option is enabled +by default. +

+
+
huponexit
+

If set, Bash will send SIGHUP to all jobs when an interactive +login shell exits (see Signals). +

+
+
inherit_errexit
+

If set, command substitution inherits the value of the errexit option, +instead of unsetting it in the subshell environment. +This option is enabled when POSIX mode is enabled. +

+
+
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. +

+
+
lastpipe
+

If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment. +

+
+
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. +

+
+
localvar_inherit
+

If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The nameref attribute is not inherited. +

+
+
localvar_unset
+

If set, calling unset on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope. +

+
+
login_shell
+

The shell sets this option if it is started as a login shell +(see 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 (see Conditional Constructs, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. +

+
+
noexpand_translation
+

If set, Bash +encloses the translated results of $"..." quoting in single quotes +instead of double quotes. +If the string is not translated, this has no effect. +

+
+
nullglob
+

If set, Bash allows filename patterns which match no +files to expand to a null string, rather than themselves. +

+
+
patsub_replacement
+

If set, Bash +expands occurrences of ‘&’ in the replacement string of pattern +substitution to the text matched by the pattern, as described +above (see Shell Parameter Expansion). +This option is enabled by default. +

+
+
progcomp
+

If set, the programmable completion facilities +(see Programmable Completion) are enabled. +This option is enabled by default. +

+
+
progcomp_alias
+

If set, and programmable completion is enabled, Bash treats a command +name that doesn’t have any completions as a possible alias and attempts +alias expansion. If it has an alias, Bash attempts programmable +completion using the command word resulting from the expanded alias. +

+
+
promptvars
+

If set, prompt strings undergo +parameter expansion, command substitution, arithmetic +expansion, and quote removal after being expanded +as described below (see Controlling the Prompt). +This option is enabled by default. +

+
+
restricted_shell
+

The shell sets this option if it is started in restricted mode +(see 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. +

+
+
varredir_close
+

If set, the shell automatically closes file descriptors assigned using the +{varname} redirection syntax (see Redirections) instead of +leaving them open when the command completes. +

+
+
xpg_echo
+

If set, the echo builtin expands backslash-escape sequences +by default. +

+
+
+
+
+ +
+
+
+
+ +

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 Bash POSIX Mode. +

+

These are the POSIX special builtins: +

+
break : . continue eval exec exit export readonly return set
+shift trap unset
+
+ +
+
+
+
+ +

5 Shell Variables

+ + +

This chapter describes the shell variables that Bash uses. +Bash automatically assigns default values to a number of 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 +(see 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 or directory name +and the MAILPATH variable +is not set, Bash informs the user of the arrival of mail in +the specified file or Maildir-format directory. +

+
+
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 filename 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\$ ’. +See Controlling the Prompt, for the complete list of escape +sequences that are expanded before PS1 is displayed. +

+
+
PS2
+

The secondary prompt string. The default value is ‘> ’. +PS2 is expanded in the same way as PS1 before being +displayed. +

+
+
+ +
+
+
+ +

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 +(see Job Control Variables). +

+
+
_
+
+

($_, an underscore.) +At shell startup, set to the 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 simple +command executed in the foreground, 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. +

+
+
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 (see 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. +Assignments to BASHPID have no effect. +If BASHPID +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_ALIASES
+

An associative array variable whose members correspond to the internal +list of aliases as maintained by the alias builtin. +(see Bourne Shell Builtins). +Elements added to this array appear in the alias list; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If BASH_ALIASES +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
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 The Shopt Builtin +for a description of the extdebug option to the shopt +builtin). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values. +

+
+
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 The Shopt Builtin +for a description of the extdebug option to the shopt +builtin). +Setting extdebug after the shell has started to execute a script, +or referencing this variable when extdebug is not set, +may result in inconsistent values. +

+
+
BASH_ARGV0
+

When referenced, this variable expands to the name of the shell or shell +script (identical to $0; See Special Parameters, +for the description of special parameter 0). +Assignment to BASH_ARGV0 +causes the value assigned to also be assigned to $0. +If BASH_ARGV0 +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_CMDS
+

An associative array variable whose members correspond to the internal +hash table of commands as maintained by the hash builtin +(see Bourne Shell Builtins). +Elements added to this array appear in the hash table; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If BASH_CMDS +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
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. +If BASH_COMMAND +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_COMPAT
+

The value is used to set the shell’s compatibility level. +See Shell Compatibility Mode, for a description of the various +compatibility levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If BASH_COMPAT is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If BASH_COMPAT is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below (see Shell Compatibility Mode). +For example, 4.2 and 42 are valid values that correspond +to the compat42 shopt option +and set the compatibility level to 42. +The current version is also a valid value. +

+
+
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. See 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 +where each corresponding member of FUNCNAME was invoked. +${BASH_LINENO[$i]} is the line number in the source file +(${BASH_SOURCE[$i+1]}) where +${FUNCNAME[$i]} was called (or ${BASH_LINENO[$i-1]} if +referenced within another shell function). +Use LINENO to obtain the current line number. +

+
+
BASH_LOADABLES_PATH
+

A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +enable command. +

+
+
BASH_REMATCH
+

An array variable whose members are assigned by the ‘=~’ binary +operator to the [[ conditional command +(see 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. +

+
+
BASH_SOURCE
+

An array variable whose members are the source filenames where the +corresponding shell function names in the FUNCNAME array +variable are defined. +The shell function ${FUNCNAME[$i]} is defined in the file +${BASH_SOURCE[$i]} and called from ${BASH_SOURCE[$i+1]} +

+
+
BASH_SUBSHELL
+

Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. +The initial value is 0. +If BASH_SUBSHELL +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
BASH_VERSINFO
+

A readonly array variable (see 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. +

+
+
CHILD_MAX
+

Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a POSIX-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent. +

+
+
COLUMNS
+

Used by the select command to determine the terminal width +when printing selection lists. +Automatically set if the checkwinsize option is enabled +(see The Shopt Builtin), or in an interactive shell 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 (see 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 (see 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 (see 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 (see 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 (see Programmable Completion). +

+
+
COMPREPLY
+

An array variable from which Bash reads the possible completions +generated by a shell function invoked by the programmable completion +facility (see Programmable Completion). +Each array element contains one possible completion. +

+
+
COPROC
+

An array variable created to hold the file descriptors +for output from and input to an unnamed coprocess (see Coprocesses). +

+
+
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. +

+
+
ENV
+

Expanded and executed similarly to BASH_ENV +(see Bash Startup Files) +when an interactive shell is invoked in +POSIX Mode (see Bash POSIX Mode). +

+
+
EPOCHREALTIME
+

Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch as a floating point value with micro-second granularity +(see the documentation for the C library function time for the +definition of Epoch). +Assignments to EPOCHREALTIME are ignored. +If EPOCHREALTIME +is unset, it loses its special properties, even if +it is subsequently reset. +

+
+
EPOCHSECONDS
+

Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see the documentation for the C library function +time for the definition of Epoch). +Assignments to EPOCHSECONDS are ignored. +If EPOCHSECONDS +is unset, it loses its special properties, even if +it is subsequently reset. +

+
+
EUID
+

The numeric effective user id of the current user. This variable +is readonly. +

+
+
EXECIGNORE
+

A colon-separated list of shell patterns (see Pattern Matching) +defining the list of filenames to be ignored by command search using +PATH. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via PATH lookup. +This does not affect the behavior of the [, test, and [[ +commands. +Full pathnames in the command hash table are not subject to EXECIGNORE. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the extglob shell +option. +

+
+
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 filename whose suffix matches one of the entries in +FIGNORE +is excluded from the list of matched filenames. 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 (the one with the highest index) +is "main". +This variable exists only when a shell function is executing. +Assignments to FUNCNAME have no effect. +If FUNCNAME +is unset, it loses its special properties, even if +it is subsequently reset. +

+

This variable can be used with BASH_LINENO and BASH_SOURCE. +Each element of FUNCNAME has corresponding elements in +BASH_LINENO and BASH_SOURCE to describe the call stack. +For instance, ${FUNCNAME[$i]} was called from the file +${BASH_SOURCE[$i+1]} at line number ${BASH_LINENO[$i]}. +The caller builtin displays the current call stack using this +information. +

+
+
FUNCNEST
+

If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort. +

+
+
GLOBIGNORE
+

A colon-separated list of patterns defining the set of file names to +be ignored by filename expansion. +If a file name matched by a filename expansion pattern also matches one +of the patterns in GLOBIGNORE, it is removed from the list +of matches. +The pattern matching honors the setting of the extglob shell +option. +

+
+
GROUPS
+

An array variable containing the list of groups of which the current +user is a member. +Assignments to GROUPS have no effect. +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 (see History Expansion). +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. +Assignments to HISTCMD are ignored. +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, to contain no more than that number of lines +by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of HISTSIZE +after reading any startup files. +

+
+
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. +The pattern matching honors the setting of the extglob shell +option. +

+

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. +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files. +

+
+
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. +

+
+
INSIDE_EMACS
+

If Bash finds this variable in the environment when the shell +starts, it assumes that the shell is running in an Emacs shell buffer +and may disable line editing depending on the value of TERM. +

+
+
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 +(see Filename Expansion). +

+
+
LC_CTYPE
+

This variable determines the interpretation of characters and the +behavior of character classes within filename expansion and pattern +matching (see Filename Expansion). +

+
+
LC_MESSAGES
+

This variable determines the locale used to translate double-quoted +strings preceded by a ‘$’ (see Locale-Specific Translation). +

+
+
LC_NUMERIC
+

This variable determines the locale category used for number formatting. +

+
+
LC_TIME
+

This variable determines the locale category used for data and time +formatting. +

+
+
LINENO
+

The line number in the script or shell function currently executing. +If LINENO +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
LINES
+

Used by the select command to determine the column length +for printing selection lists. +Automatically set if the checkwinsize option is enabled +(see The Shopt Builtin), or in an interactive shell 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. +

+
+
MAPFILE
+

An array variable created to hold the text read by the +mapfile builtin when no variable name is supplied. +

+
+
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 (see 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 (see 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. +When the shell enters POSIX mode, it sets this variable if it was +not already set. +

+
+
PPID
+

The process ID of the shell’s parent process. This variable +is readonly. +

+
+
PROMPT_COMMAND
+

If this variable is set, and is an array, +the value of each set element is interpreted as a command to execute +before printing the primary prompt ($PS1). +If this is set but not an array variable, +its value is used as a command to execute instead. +

+
+
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 (see Controlling the Prompt). +Characters removed are replaced with an ellipsis. +

+
+
PS0
+

The value of this parameter is expanded like PS1 +and displayed by interactive shells after reading a command +and before the command is executed. +

+
+
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 of this parameter is expanded like PS1 +and the expanded value is the prompt printed before the command line +is echoed when the -x option is set (see The Set Builtin). +The first character of the expanded value 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, it expands to a random integer +between 0 and 32767. Assigning a value to this +variable seeds the random number generator. +If RANDOM +is unset, it loses its special properties, even if it is +subsequently reset. +

+
+
READLINE_ARGUMENT
+

Any numeric argument given to a Readline command that was defined using +‘bind -x’ (see Bash Builtin Commands +when it was invoked. +

+
+
READLINE_LINE
+

The contents of the Readline line buffer, for use +with ‘bind -x’ (see Bash Builtin Commands). +

+
+
READLINE_MARK
+

The position of the mark (saved insertion point) in the +Readline line buffer, for use +with ‘bind -x’ (see Bash Builtin Commands). +The characters between the insertion point and the mark are often +called the region. +

+
+
READLINE_POINT
+

The position of the insertion point in the Readline line buffer, for use +with ‘bind -x’ (see Bash Builtin Commands). +

+
+
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. +The number of seconds at shell invocation and the current time are always +determined by querying the system clock. +If SECONDS +is unset, it loses its special properties, +even if it is subsequently reset. +

+
+
SHELL
+

This environment variable expands to the full pathname to the shell. +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 (see 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. +

+
+
SRANDOM
+

This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support /dev/urandom or arc4random, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If SRANDOM +is unset, it loses its special properties, +even if it is subsequently reset. +

+
+
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 (see Bash Builtin Commands). +The select command (see 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 a line of input after issuing +the primary prompt. +Bash +terminates after waiting for that number of seconds if a complete +line of 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. +

+
+
+ +
+
+
+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

6 Bash Features

+ +

This chapter describes features unique to Bash. +

+ + +
+
+ +

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 …]
+
+ +

All of the single-character options used with the set builtin +(see The Set Builtin) can be used as options when the shell is invoked. +In addition, 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 The Shopt Builtin +for a description of the extdebug option to the shopt +builtin). +

+
+
--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 (see 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. See Bash POSIX Mode, for a description of the Bash +POSIX mode. +

+
+
--restricted
+

Make the shell a restricted shell (see 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
+

Read and execute commands from the first non-option argument +command_string, then exit. +If there are arguments after the command_string, +the first argument is assigned to $0 +and any remaining arguments are assigned to the positional parameters. +The assignment to $0 sets the name of the shell, which is used +in warning and error messages. +

+
+
-i
+

Force the shell to run interactively. Interactive shells are +described in 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. +See Bash Startup Files, for a description of the special behavior +of a login shell. +

+
+
-r
+

Make the shell a restricted shell (see 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 or when reading input +through a pipe. +

+
+
-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 (see Locale-Specific 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 (see 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. See 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 (see 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. +

+
+
+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

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 filenames as described above under +Tilde Expansion (see Tilde Expansion). +

+

Interactive shells are described in 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 an interactive login shell exits, +or a non-interactive login shell executes the exit builtin command, +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 +filename. +

+

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 network connection, as when executed by +the historical remote shell daemon, usually rshd, +or the secure shell daemon sshd. +If Bash +determines it is being run non-interactively 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 +neither rshd nor sshd 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. +

+
+
+
+ +

6.3 Interactive Shells

+ + + + + +
+
+ +

6.3.1 What is an Interactive Shell?

+ +

An interactive shell +is one started without non-option arguments +(unless -s is specified) +and without specifying the -c option, +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. +

+
+
+
+ +

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
+
+ +
+
+
+ +

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 Bash Startup Files. + +
  2. Job Control (see 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. +Bash expands and displays PS0 after it reads a command but before +executing it. +See Controlling the Prompt, for a complete list of prompt +string escape sequences. + +
  4. Bash executes the values of the set elements of the PROMPT_COMMAND +array variable as commands before printing the primary prompt, $PS1 +(see Bash Variables). + +
  5. Readline (see 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 (see The Set Builtin). + +
  7. Command history (see Bash History Facilities) +and history expansion (see History Expansion) +are enabled by default. +Bash will save the command history to the file named by $HISTFILE +when a shell with history enabled exits. + +
  8. Alias expansion (see Aliases) is performed by default. + +
  9. In the absence of any traps, Bash ignores SIGTERM +(see Signals). + +
  10. In the absence of any traps, SIGINT is caught and handled +(see 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 (see Signals). + +
  12. The -n invocation option is ignored, and ‘set -n’ has +no effect (see The Set Builtin). + +
  13. Bash will check for mail periodically, depending on the values of the +MAIL, MAILPATH, and MAILCHECK shell variables +(see 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 +(see The Set Builtin). + +
  15. The shell will not exit on expansion errors caused by var being unset +or null in ${var:?word} expansions +(see 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 (see Bash POSIX Mode). + +
  18. A failed exec will not cause the shell to exit +(see Bourne Shell Builtins). + +
  19. Parser syntax errors will not cause the shell to exit. + +
  20. If the cdspell shell option is enabled, the shell will attempt +simple spelling correction for directory arguments to the cd +builtin (see the description of the cdspell +option to the shopt builtin in The Shopt Builtin). +The cdspell option is only effective in interactive shells. + +
  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 (see Bash Variables). + +
+ +
+
+
+
+ +

6.4 Bash Conditional Expressions

+ + +

Conditional expressions are used by the [[ compound command +(see Conditional Constructs) +and the test and [ builtin commands +(see Bourne Shell Builtins). +The test +and [ commands determine their behavior based on the number +of arguments; see the descriptions of those commands for any other +command-specific actions. +

+

Expressions may be unary or binary, +and are formed from the following primaries. +Unary expressions are often used to examine the status of a file. +There are string operators and numeric comparison operators as well. +Bash handles several filenames specially when they are used in +expressions. +If the operating system on which Bash is running provides these +special files, Bash will use them; otherwise it will emulate them +internally with this behavior: +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. +The test command uses ASCII ordering. +

+

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. +

+
+
-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. +

+
+
-N file
+

True if file exists and has been modified since it was last read. +

+
+
-O file
+

True if file exists and is owned by the effective user id. +

+
+
-S file
+

True if file exists and is a socket. +

+
+
file1 -ef file2
+

True if file1 and file2 refer to the same device and +inode numbers. +

+
+
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. +

+
+
-o optname
+

True if the shell option optname is enabled. +The list of options appears in the description of the -o +option to the set builtin (see The Set Builtin). +

+
+
-v varname
+

True if the shell variable varname is set (has been assigned a value). +

+
+
-R varname
+

True if the shell variable varname is set and is a name reference. +

+
+
-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. +When used with the [[ command, this performs pattern matching as +described above (see Conditional Constructs). +

+

=’ 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. +When used with the [[ command, Arg1 and Arg2 +are evaluated as arithmetic expressions (see Shell Arithmetic). +

+
+ +
+
+
+ +

6.5 Shell Arithmetic

+ + + + + + +

The shell allows arithmetic expressions to be evaluated, as one of +the shell expansions or by using the (( compound command, the +let builtin, or the -i option to the declare builtin. +

+

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. +

+

Integer constants follow the C language definition, without suffixes or +character constants. +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 the optional 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. +When specifying n, +if a non-digit is required, +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. +

+
+
+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

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 +blank, 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, use a shell function +(see Shell Functions). +

+

Aliases are not expanded when the shell is not interactive, +unless the expand_aliases shell option is set using +shopt (see 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, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +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 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. +

+
+
+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

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 (see Shell Arithmetic)) and are zero-based; +associative arrays use arbitrary strings. +Unless otherwise noted, indexed array indices must be non-negative integers. +

+

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. +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 value2 … )
+
+

where each +value may be of the form [subscript]=string. +Indexed array assignments do not require anything but string. +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. +

+

Each value in the list undergoes all the shell expansions +described above (see Shell Expansions). +

+

When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +name=(key1 value1 key2 value2 … ). +These are treated identically to +name=( [key1]=value1 [key2]=value2 … ). +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string. +

+

This syntax is also accepted by the declare +builtin. Individual array elements may be assigned to using the +name[subscript]=value syntax introduced above. +

+

When assigning to an indexed array, if name +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +name, so negative indices count back from the end of the +array, and an index of -1 references the last element. +

+

The ‘+=’ operator will append to an array variable when assigning +using the compound assignment syntax; see Shell Parameters 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. +If the subscript +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the array, +and an index of -1 refers to the last element. +

+

Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +bash will create an array if necessary. +

+

An array variable is considered set if a subscript has been assigned a +value. The null string is a valid value. +

+

It is possible to obtain the keys (indices) of an array as well as the values. +${!name[@]} and ${!name[*]} expand to the indices +assigned in array variable name. +The treatment when in double quotes is similar to the expansion of the +special parameters ‘@’ and ‘*’ within double quotes. +

+

The unset builtin is used to destroy arrays. +unset name[subscript] +destroys the array element at index subscript. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +unset name, where name is an array, removes the +entire array. +unset name[subscript] behaves differently +depending on the array type when given a +subscript of ‘*’ or ‘@’. +When name is an associative array, it removes the element with key +‘*’ or ‘@’. +If name is an indexed array, unset removes all of the elements, +but does not remove the array itself. +

+

When using a variable name with a subscript as an argument to a command, +such as with unset, without using the word expansion syntax +described above, the argument is subject to the shell’s filename expansion. +If filename expansion is not desired, the argument should be quoted. +

+

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. +If both options are supplied, -A takes precedence. +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. +

+
+
+
+
+

+Next: , Previous: , Up: Bash Features   [Contents][Index]

+
+

6.8 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 current directory is always the "top" +of the directory stack. +

+

The contents of the directory stack are also visible +as the value of the DIRSTACK shell variable. +

+ +
+
+ +

6.8.1 Directory Stack Builtins

+ +
+
dirs
+
+
dirs [-clpv] [+N | -N]
+
+ +

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. +The current directory is always the first directory in the stack. +

+
+
-c
+

Clears the directory stack by deleting all of the elements. +

+
-l
+

Produces a listing using full pathnames; +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. +

+
+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. +

+
+ +
+
popd
+
+
popd [-n] [+N | -N]
+
+ +

Removes elements from the directory stack. +The elements are numbered from 0 starting at the first directory +listed by dirs; +that is, popd is equivalent to popd +0. +

+

When no arguments are given, popd +removes the top directory from the stack and changes to +the new top directory. +

+

Arguments, if supplied, have the following meanings: +

+
+
-n
+

Suppresses the normal change of directory when removing directories +from the stack, so that only the stack is manipulated. +

+
+N
+

Removes the Nth directory (counting from the left of the +list printed by dirs), starting with zero, from the stack. +

+
-N
+

Removes the Nth directory (counting from the right of the +list printed by dirs), starting with zero, from the stack. +

+
+ +

If the top element of the directory stack is modified, and +the -n option was not supplied, popd uses the cd +builtin to change to the directory at the top of the stack. +If the cd fails, popd returns a non-zero value. +

+

Otherwise, popd returns an unsuccessful status if +an invalid option is encountered, the directory stack +is empty, or a non-existent directory stack entry is specified. +

+

If the popd command is successful, +Bash runs dirs to show the final contents of the directory stack, +and the return status is 0. +

+ +
+
pushd
+
+
pushd [-n] [+N | -N | dir]
+
+ +

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, pushd exchanges the top two elements +of the directory stack. +

+

Arguments, if supplied, have the following meanings: +

+
+
-n
+

Suppresses the normal change of directory when rotating or +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 dir be the top of the stack. +

+
+ +

After the stack has been modified, if the -n option was not +supplied, pushd uses the cd builtin to change to the +directory at the top of the stack. +If the cd fails, pushd returns a non-zero value. +

+

Otherwise, if no arguments are supplied, pushd returns 0 unless the +directory stack is empty. +When rotating the directory stack, pushd returns 0 unless +the directory stack is empty or a non-existent directory stack element +is specified. +

+

If the pushd command is successful, +Bash runs dirs to show the final contents of the directory stack. +

+
+
+ +
+
+
+
+ +

6.9 Controlling the Prompt

+ + +

Bash examines the value of the array variable PROMPT_COMMAND just before +printing each primary prompt. +If any elements in PROMPT_COMMAND are set and non-null, Bash +executes each value, in numeric order, +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 PS0, PS1, PS2, and +PS4: +

+
+
\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 value of the PWD shell variable ($PWD), +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 +(see 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 (see The Shopt Builtin). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion. +

+
+
+
+ +

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, +HISTFILE, +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 history +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 ‘shopt -u restricted_shell’. +
+ +

These restrictions are enforced after any startup files are read. +

+

When a command that is found to be a shell script is executed +(see Shell Scripts), rbash turns off any restrictions in +the shell spawned to execute the script. +

+

The restricted shell mode is only one component of a useful restricted +environment. It should be accompanied by setting PATH to a value +that allows execution of only a few verified commands (commands that +allow shell escapes are particularly vulnerable), changing the current +directory to a non-writable directory other than $HOME after login, +not allowing the restricted shell to execute shell scripts, and cleaning +the environment of variables that cause some commands to modify their +behavior (e.g., VISUAL or PAGER). +

+

Modern systems provide more secure ways to implement a restricted environment, +such as jails, zones, or containers. +

+ +
+
+
+ +

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. Bash ensures that the POSIXLY_CORRECT variable is set. + +
  2. 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’. + +
  3. Bash will not insert a command without the execute bit set into the +command hash table, even if it returns it as a (last-ditch) result +from a $PATH search. + +
  4. The message printed by the job control code and builtins when a job +exits with a non-zero status is ‘Done(status)’. + +
  5. The message printed by the job control code and builtins when a job +is stopped is ‘Stopped(signame)’, where signame is, for +example, SIGTSTP. + +
  6. Alias expansion is always enabled, even in non-interactive shells. + +
  7. Reserved words appearing in a context where reserved words are recognized +do not undergo alias expansion. + +
  8. Alias expansion is performed when initially parsing a command substitution. +The default mode generally defers it, when enabled, until the command +substitution is executed. This means that command substitution will not +expand aliases that are defined after the command substitution is initially +parsed (e.g., as part of a function definition). + +
  9. 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. + +
  10. The POSIX startup files are executed ($ENV) rather than +the normal Bash files. + +
  11. Tilde expansion is only performed on assignments preceding a command +name, rather than on all assignment statements on the line. + +
  12. The default history file is ~/.sh_history (this is the +default value of $HISTFILE). + +
  13. Redirection operators do not perform filename expansion on the word +in the redirection unless the shell is interactive. + +
  14. Redirection operators do not perform word splitting on the word in the +redirection. + +
  15. Function names must be valid shell names. 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. + +
  16. Function names may not be the same as one of the POSIX special +builtins. + +
  17. POSIX special builtins are found before shell functions +during command lookup. + +
  18. When printing shell function definitions (e.g., by type), Bash does +not print the function keyword. + +
  19. Literal tildes that appear as the first character in elements of +the PATH variable are not expanded as described above +under Tilde Expansion. + +
  20. The time reserved word may be used by itself as a command. When +used in this way, it displays timing statistics for the shell and its +completed children. The TIMEFORMAT variable controls the format +of the timing information. + +
  21. When parsing and expanding a ${…} expansion that appears within +double quotes, single quotes are no longer special and cannot be used to +quote a closing brace or other special character, unless the operator is +one of those defined to perform pattern removal. In this case, they do +not have to appear as matched pairs. + +
  22. The parser does not recognize time as a reserved word if the next +token begins with a ‘-’. + + +
  23. The ‘!’ character does not introduce history expansion within a +double-quoted string, even if the histexpand option is enabled. + +
  24. 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. + +
  25. 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. + +
  26. A non-interactive shell exits with an error status if a variable +assignment error occurs in an assignment statement preceding a special +builtin, but not with any other simple command. For any other simple +command, the shell aborts execution of that command, and execution continues +at the top level ("the shell shall not perform any further processing of the +command in which the error occurred"). + +
  27. 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. + +
  28. Non-interactive shells exit if filename in . filename +is not found. + +
  29. Non-interactive shells exit if a syntax error in an arithmetic expansion +results in an invalid expression. + +
  30. Non-interactive shells exit if a parameter expansion error occurs. + +
  31. Non-interactive shells exit if there is a syntax error in a script read +with the . or source builtins, or in a string processed by +the eval builtin. + +
  32. While variable indirection is available, it may not be applied to the +‘#’ and ‘?’ special parameters. + +
  33. Expanding the ‘*’ special parameter in a pattern context where the +expansion is double-quoted does not treat the $* as if it were +double-quoted. + +
  34. Assignment statements preceding POSIX special builtins +persist in the shell environment after the builtin completes. + +
  35. The command builtin does not prevent builtins that take assignment +statements as arguments from expanding them as assignment statements; +when not in POSIX mode, assignment builtins lose their assignment +statement expansion properties when preceded by command. + +
  36. 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. + +
  37. The output of ‘kill -l’ prints all the signal names on a single line, +separated by spaces, without the ‘SIG’ prefix. + +
  38. The kill builtin does not accept signal names with a ‘SIG’ +prefix. + +
  39. The export and readonly builtin commands display their +output in the format required by POSIX. + +
  40. The trap builtin displays signal names without the leading +SIG. + +
  41. 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. + +
  42. trap -p displays signals whose dispositions are set to SIG_DFL and +those that were ignored when the shell started. + +
  43. The . and source builtins do not search the current directory +for the filename argument if it is not found by searching PATH. + +
  44. Enabling POSIX mode has the effect of setting the +inherit_errexit option, so +subshells spawned to execute command substitutions inherit the value of +the -e option from the parent shell. +When the inherit_errexit option is not enabled, +Bash clears the -e option in such subshells. + +
  45. Enabling POSIX mode has the effect of setting the +shift_verbose option, so numeric arguments to shift +that exceed the number of positional parameters will result in an +error message. + +
  46. When the alias builtin displays alias definitions, it does not +display them with a leading ‘alias ’ unless the -p option +is supplied. + +
  47. When the set builtin is invoked without options, it does not display +shell function names and definitions. + +
  48. 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. + +
  49. 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. + +
  50. When the cd builtin cannot change a directory because the +length of the pathname +constructed from $PWD and the directory name supplied as an argument +exceeds PATH_MAX when all symbolic links are expanded, cd will +fail instead of attempting to use only the supplied directory name. + +
  51. 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. + +
  52. When listing the history, the fc builtin does not include an +indication of whether or not a history entry has been modified. + +
  53. The default editor used by fc is ed. + +
  54. 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. + +
  55. The vi editing mode will invoke the vi editor directly when +the ‘v’ command is run, instead of checking $VISUAL and +$EDITOR. + +
  56. 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. + +
  57. The ulimit builtin uses a block size of 512 bytes for the -c +and -f options. + +
  58. 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. + +
  59. The read builtin may be interrupted by a signal for which a trap +has been set. +If Bash receives a trapped signal while executing read, the trap +handler executes and read returns an exit status greater than 128. + +
  60. The printf builtin uses double (via strtod) to convert +arguments corresponding to floating point conversion specifiers, instead of +long double if it’s available. The ‘L’ length modifier forces +printf to use long double if it’s available. + +
  61. Bash removes an exited background process’s status from the list of such +statuses after the wait builtin is used to obtain it. + +
+ +

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 +(see Optional Features). +

+
+
+
+
+

+Previous: , Up: Bash Features   [Contents][Index]

+
+

6.12 Shell Compatibility Mode

+ + + +

Bash-4.0 introduced the concept of a shell compatibility level, +specified as a set of options to the shopt builtin +(compat31, +compat32, +compat40, +compat41, +and so on). +There is only one current +compatibility level – each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It’s intended to be a temporary solution. +

+

This section 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 subsequent versions). +

+

If a user enables, say, compat32, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of Bash, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the [[ +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling compat32 will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. +

+

Bash-4.3 introduced a new shell variable: BASH_COMPAT. +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the compatNN option, like 42) determines the +compatibility level. +

+

Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of BASH_COMPAT. +

+

Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use BASH_COMPAT +on bash-5.0 and later versions. +

+

The following table describes the behavior changes controlled by each +compatibility level setting. +The compatNN tag is used as shorthand for setting the +compatibility level +to NN using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding compatNN shopt option. +For bash-4.3 and later versions, the BASH_COMPAT variable is preferred, +and it is required for bash-5.1 and later versions. +

+
+
compat31
+
    +
  • quoting the rhs of the [[ command’s regexp matching operator (=~) +has no special effect +
+ +
+
compat32
+
    +
  • interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +
+ +
+
compat40
+
    +
  • the ‘<’ and ‘>’ operators to the [[ command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and strcmp(3); +bash-4.1 and later use the current locale’s collation sequence and +strcoll(3). +
+ +
+
compat41
+
    +
  • in posix mode, time may be followed by options and still be +recognized as a reserved word (this is POSIX interpretation 267) +
  • in posix mode, the parser requires that an even number of single +quotes occur in the word portion of a double-quoted ${…} +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is POSIX interpretation 221) +
+ +
+
compat42
+
    +
  • the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +
  • in posix mode, single quotes are considered special when expanding +the word portion of a double-quoted ${…} parameter expansion +and can be used to quote a closing brace or other special character +(this is part of POSIX interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +
+ +
+
compat43
+
    +
  • the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(e.g., declare -a foo=’(1 2)’). Later versions warn that this usage is +deprecated +
  • word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +
  • when executing a shell function, the loop state (while/until/etc.) +is not reset, so break or continue in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +
+ +
+
compat44
+
    +
  • the shell sets up the values used by BASH_ARGV and BASH_ARGC +so they can expand to the shell’s positional parameters even if extended +debugging mode is not enabled +
  • a subshell inherits loops from its parent context, so break +or continue will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +
  • variable assignments preceding builtins like export and readonly +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +
+ +
+
compat50 (set using BASH_COMPAT)
+
    +
  • Bash-5.1 changed the way $RANDOM is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +RANDOM will produce the same sequence as in bash-5.0 +
  • If the command hash table is empty, Bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the -l option is supplied. +
+ +
+
compat51 (set using BASH_COMPAT)
+
    +
  • The unset builtin will unset the array a given an argument like +‘a[@]’. +Bash-5.2 will unset an element with key ‘@’ (associative arrays) +or remove all the elements without unsetting the array (indexed arrays) +
  • arithmetic commands ( ((...)) ) and the expressions in an arithmetic for +statement can be expanded more than once +
  • expressions used as arguments to arithmetic operators in the [[ +conditional command can be expanded more than once +
  • the expressions in substring parameter brace expansion can be +expanded more than once +
  • the expressions in the $(( ... )) word expansion can be expanded +more than once +
  • arithmetic expressions used as indexed array subscripts can be +expanded more than once +
  • test -v, when given an argument of ‘A[@]’, where A is +an existing associative array, will return true if the array has any set +elements. +Bash-5.2 will look for and report on a key named ‘@’ +
  • the ${parameter[:]=value} word expansion will return +value, before any variable-specific transformations have been +performed (e.g., converting to lowercase). +Bash-5.2 will return the final value assigned to the variable. +
  • Parsing command substitutions will behave as if extended glob +(see The Shopt Builtin) +is enabled, so that parsing a command substitution containing an extglob +pattern (say, as part of a shell function) will not fail. +This assumes the intent is to enable extglob before the command is executed +and word expansions are performed. +It will fail at word expansion time if extglob hasn’t been +enabled by the time the command is executed. +
+
+
+ +
+
+
+
+ +

7 Job Control

+ +

This chapter discusses what job control is, how it works, and how +Bash allows you to access its facilities. +

+ + +
+
+ +

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 job whose command name begins with ‘ce’. +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 (see 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 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. +

+

When the shell is waiting for a job or process using the wait +builtin, and job control is enabled, wait will return when the +job changes state. The -f option causes wait to wait +until the job or process terminates before returning. +

+
+
+
+ +

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
+

Display only running jobs. +

+
+
-s
+

Display only 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|-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 -L option is equivalent to -l. +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 [-fn] [-p varname] [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, +wait waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +$!, +and the return status is zero. +If the -n option is supplied, wait waits for a single job +from the list of pids or jobspecs or, if no arguments are +supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the -p option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +varname named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the -n option is supplied. +Supplying the -f option, when job control is enabled, +forces wait to wait for each pid or jobspec to +terminate before returning its status, instead of returning when it changes +status. +If neither jobspec nor pid specifies an active child process +of the shell, the return status is 127. +If wait is interrupted by a signal, the return status will be greater +than 128, as described above (see Signals). +Otherwise, the return status is the exit status +of the last process or job waited for. +

+
+
disown
+
+
disown [-ar] [-h] [jobspec … | pid … ]
+
+ +

Without options, remove each jobspec 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 the +-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, +or a shell without job control enabled, +cannot be suspended; the -f +option can be used to override this and force the suspension. +The return status is 0 unless the shell is a login shell +or job control is not enabled +and +-f +is not supplied. +

+
+
+ +

When job control is not active, the kill and wait +builtins do not accept jobspec arguments. They must be +supplied process IDs. +

+
+
+
+
+

+Previous: , Up: Job Control   [Contents][Index]

+
+

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 (see 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. +

+
+
+ + + + + + +
+
+
+
+ +

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 (see Bash Builtin Commands). +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 +(see The Set Builtin), or disabled using the +o emacs or ++o vi options to set. +

+ + +
+
+ +

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 +(see 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. +

+
+
+
+ +

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. +

+ + +
+
+ +

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 might 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.) +

+
+
+
+ +

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. +

+
+
+
+ +

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 to 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. +

+
+ +
+
+
+ +

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. +

+
+
+
+ +

8.2.5 Searching for Commands in the History

+ +

Readline provides commands for searching through the command history +(see 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-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. +

+
+
+
+
+ +

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 their 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. +The bind builtin command can also be used to set Readline +keybindings and variables. +See Bash Builtin Commands. +

+

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. +

+ + +
+
+ +

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 (see 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. See Bash Builtin Commands. +

+

A great deal of run-time behavior is changeable with the following +variables. +

+ +
+
active-region-start-color
+

A string variable that controls the text color and background when displaying +the text in the active region (see the description of +enable-active-region below). +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal before displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that puts the terminal in standout mode, +as obtained from the terminal’s terminfo description. +A sample value might be ‘\e[01;33m’. +

+
+
active-region-end-color
+

A string variable that "undoes" the effects of active-region-start-color +and restores "normal" terminal display appearance after displaying text +in the active region. +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal after displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that restores the terminal from standout mode, +as obtained from the terminal’s terminfo description. +A sample value might be ‘\e[0m’. +

+
+
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’ (the default), Readline attempts to bind the control +characters treated specially by the kernel’s terminal driver to their +Readline equivalents. +

+
+ +

If set to ‘on’, Readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. The default +is ‘off’. +

+
+
colored-completion-prefix
+

If set to ‘on’, when listing completions, Readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the LS_COLORS +environment variable. +If there is a color definition in LS_COLORS for the custom suffix +‘readline-colored-completion-prefix’, Readline uses this color for +the common prefix instead of its default. +The default is ‘off’. +

+
+
colored-stats
+

If set to ‘on’, Readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the LS_COLORS +environment variable. +The default is ‘off’. +

+
+
comment-begin
+

The string to insert at the beginning of the line when the +insert-comment command is executed. The default value +is "#". +

+
+
completion-display-width
+

The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is -1. +

+
+
completion-ignore-case
+

If set to ‘on’, Readline performs filename matching and completion +in a case-insensitive fashion. +The default value is ‘off’. +

+
+
completion-map-case
+

If set to ‘on’, and completion-ignore-case is enabled, Readline +treats hyphens (‘-’) and underscores (‘_’) as equivalent when +performing case-insensitive filename matching and completion. +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 or equal to this value, +Readline will ask whether or not the user wishes to view them; +otherwise, they are simply listed. +This variable must be set to an integer value greater than or equal to zero. +A zero value means Readline should never ask; negative values are +treated as zero. +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’, but +will be set to ‘off’ if the locale is one that contains +eight-bit characters. +This variable is dependent on the LC_CTYPE locale category, and +may change if the locale is changed. +

+
+
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’. +

+
+
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’. +

+
+
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’. +

+
+
emacs-mode-string
+

If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the ‘\1’ and ‘\2’ escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is ‘@’. +

+
+
enable-active-region
+

The point is the current cursor position, and mark refers +to a saved cursor position (see Commands For Moving). +The text between the point and mark is referred to as the region. +When this variable is set to ‘On’, Readline allows certain commands +to designate the region as active. +When the region is active, Readline highlights the text in the region using +the value of the active-region-start-color, which defaults to the +string that enables +the terminal’s standout mode. +The active region shows the text inserted by bracketed-paste and any +matching text found by incremental and non-incremental history searches. +The default is ‘On’. +

+
+
enable-bracketed-paste
+

When set to ‘On’, Readline configures the terminal to insert each +paste into the editing buffer as a single string of characters, instead +of treating each character as if it had been read from the keyboard. +This is called putting the terminal into bracketed paste mode; +it prevents Readline from executing any editing commands bound to key +sequences appearing in the pasted text. +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, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is not limited. +If an attempt is made to set history-size to a non-numeric value, +the maximum number of history entries will be set to 500. +

+
+
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. +This variable is automatically set to ‘on’ for terminals of height 1. +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’, but Readline will set it to ‘on’ if the +locale contains eight-bit characters. +The name meta-flag is a synonym for this variable. +This variable is dependent on the LC_CTYPE locale category, and +may change if the locale is changed. +

+
+
isearch-terminators
+

The string of characters that should terminate an incremental search without +subsequently executing the character as a command (see Searching for Commands in the History). +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. +Built-in keymap names are +emacs, +emacs-standard, +emacs-meta, +emacs-ctlx, +vi, +vi-move, +vi-command, and +vi-insert. +vi is equivalent to vi-command (vi-move is also a +synonym); emacs is equivalent to emacs-standard. +Applications may add additional names. +The default value is emacs. +The value of the editing-mode variable also affects the +default keymap. +

+
+
keyseq-timeout
+

Specifies the duration Readline will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, Readline will use the shorter +but complete key sequence. +Readline uses this value to determine whether or not input is +available on the current input source (rl_instream by default). +The value is specified in milliseconds, so a value of 1000 means that +Readline will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, Readline will wait until another key is pressed to +decide which key sequence to complete. +The default value is 500. +

+
+
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. +If set to ‘off’, the leading ‘.’ must be +supplied by the user in the filename to be completed. +This variable is ‘on’ by default. +

+
+
menu-complete-display-prefix
+

If set to ‘on’, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list. The default is ‘off’. +

+
+
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’, but Readline will set it to ‘on’ if the +locale contains eight-bit characters. +This variable is dependent on the LC_CTYPE locale category, and +may change if the locale is changed. +

+
+
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’. +

+
+
show-mode-in-prompt
+

If set to ‘on’, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., emacs-mode-string). +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’. +

+
+
vi-cmd-mode-string
+

If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the ‘\1’ and ‘\2’ escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is ‘(cmd)’. +

+
+
vi-ins-mode-string
+

If the show-mode-in-prompt variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the ‘\1’ and ‘\2’ escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is ‘(ins)’. +

+
+
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 be put directly into an initialization file. +See Bash Builtin Commands. +

+
+
keynamefunction-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 example above, 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\\": "\\"
+
+ +
+
+ +
+
+
+ +

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, after any comparison operator, +extends to the end of the line; +unless otherwise noted, 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. +

+
+
version
+

The version test may be used to perform comparisons against +specific Readline versions. +The version expands to the current Readline version. +The set of comparison operators includes +‘=’ (and ‘==’), ‘!=’, ‘<=’, ‘>=’, ‘<’, +and ‘>’. +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., ‘7.1’). If the minor version is omitted, it +is assumed to be ‘0’. +The operator may be separated from the string version and +from the version number argument by whitespace. +The following example sets a variable if the Readline version being used +is 7.0 or newer: +

+
$if version >= 7.0
+set show-mode-in-prompt on
+$endif
+
+ +
+
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
+
+ +
+
variable
+

The variable construct provides simple equality tests for Readline +variables and values. +The permitted comparison operators are ‘=’, ‘==’, and ‘!=’. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values on and off. +The following example is equivalent to the mode=emacs test described +above: +

+
$if editing-mode == emacs
+set show-mode-in-prompt on
+$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
+
+
+
+ +
+
+
+ +

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 system-wide 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 150 or more possible completions for a word,
+# ask whether or not the user 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
+
+ +
+
+
+
+ +

8.4 Bindable Readline 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. (See Bash Builtin Commands.) +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. +

+ +
+
+ +

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 (M-C-f)
+

Move forward to the end of the next word. +Words are delimited by non-quoted shell metacharacters. +

+
+
shell-backward-word (M-C-b)
+

Move back to the start of the current or previous word. +Words are delimited by non-quoted shell metacharacters. +

+
+
previous-screen-line ()
+

Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. +

+
+
next-screen-line ()
+

Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if the length +of the current Readline line is not greater than the length of the prompt +plus the screen width. +

+
+
clear-display (M-C-l)
+

Clear the screen and, if possible, the terminal’s scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen. +

+
+
clear-screen (C-l)
+

Clear the screen, +then 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. +

+
+
+ +
+
+
+ +

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. +This command sets the region to the matched text and activates the mark. +

+
+
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. +This command sets the region to the matched text and activates the mark. +

+
+
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. +The search string may match anywhere in a history line. +

+
+
non-incremental-forward-search-history (M-n)
+

Search forward starting at the current line and moving ‘down’ +through the history as necessary using a non-incremental search +for a string supplied by the user. +The search string may match anywhere in a history line. +

+
+
history-search-forward ()
+

Search forward through the history for the string of characters +between the start of the current line and the point. +The search string must match at the beginning of a history line. +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. +The search string must match at the beginning of a history line. +This is a non-incremental search. +By default, this command is unbound. +

+
+
history-substring-search-forward ()
+

Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +By default, this command is unbound. +

+
+
history-substring-search-backward ()
+

Search backward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +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 a numeric argument, behave exactly like yank-nth-arg. +Successive calls to yank-last-arg move back through the history +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). +The history expansion facilities are used to extract the last argument, +as if the ‘!$’ history expansion had been specified. +

+
+
operate-and-get-next (C-o)
+

Accept the current line for return to the calling application as if a +newline had been entered, +and fetch the next line relative to the current line from the history +for editing. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. +

+
+
fetch-history ()
+

With a numeric argument, fetch that entry from the history list +and make it the current line. +Without an argument, move back to the first entry in the history list. +

+
+
+ +
+
+
+ +

8.4.3 Commands For Changing Text

+ +
+
end-of-file (usually C-d)
+

The character indicating end-of-file as set, for example, by +stty. If this character is read when there are no characters +on the line, and point is at the beginning of the line, Readline +interprets it as the end of input and returns EOF. +

+
+
delete-char (C-d)
+

Delete the character at point. If this function is bound to the +same character as the tty EOF character, as C-d +commonly is, see above for the effects. +

+
+
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. +

+
+
bracketed-paste-begin ()
+

This function is intended to be bound to the "bracketed paste" escape +sequence sent by some terminals, and such a binding is assigned by default. +It allows Readline to insert the pasted text as a single unit without treating +each character as if it had been read from the keyboard. The characters +are inserted as if each one was bound to self-insert instead of +executing any editing commands. +

+

Bracketed paste sets the region (the characters between point and the mark) +to the inserted text. It uses the concept of an active mark: when the +mark is active, Readline redisplay uses the terminal’s standout mode to +denote the region. +

+
+
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. +

+
+
+ +
+
+
+ +

8.4.4 Killing And Yanking

+ +
+
kill-line (C-k)
+

Kill the text from point to the end of the line. +With a negative numeric argument, kill backward from the cursor to the +beginning of the current line. +

+
+
backward-kill-line (C-x Rubout)
+

Kill backward from the cursor to the beginning of the current line. +With a negative numeric argument, kill forward from the cursor to the +end of the current 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 (M-C-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 shell-forward-word. +

+
+
shell-backward-kill-word ()
+

Kill the word behind point. +Word boundaries are the same as shell-backward-word. +

+
+
shell-transpose-words (M-C-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. +Word boundaries are the same as shell-forward-word and +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. +

+
+ +
+
+
+ +

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 nor 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. +

+
+ +
+
+
+ +

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. +When displaying completions, Readline sets the number of columns used +for display to the value of completion-display-width, the value of +the environment variable COLUMNS, or the screen width, in that order. +

+
+
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 +(see Brace Expansion). +

+
+
+ +
+
+
+ +

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. +

+
+
print-last-kbd-macro ()
+

Print the last keyboard macro defined in a format suitable for the +inputrc file. +

+
+
+ +
+
+
+ +

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-lowercase-version (M-A, M-B, M-x, …)
+

If the metafied character x is upper case, run the command +that is bound to the corresponding metafied lower case character. +The behavior is undefined if x is already lower case. +

+
+
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 argument 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 argument 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. +

+
+
spell-correct-word (C-x s)
+

Perform spelling correction on the current word, treating it as a directory +or filename, in the same way as the cdspell shell option. +Word boundaries are the same as those used by shell-forward-word. +

+
+
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 (see 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 +(see History Expansion). +

+
+
alias-expand-line ()
+

Perform alias expansion on the current line (see 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. +

+
+
edit-and-execute-command (C-x C-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. +

+ + +
+
+ +
+
+
+
+ +

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 standard. +

+

In order to switch interactively between emacs and vi +editing modes, use the ‘set -o emacs’ and ‘set -o vi’ +commands (see 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. +

+
+
+
+ +

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 (see 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. +If there is no default compspec, Bash attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion +

+

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 Letting Readline Type For You) 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. +See 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 within the string, in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of IFS. +Each word is then expanded using +brace expansion, tilde expansion, parameter and variable expansion, +command substitution, and arithmetic expansion, +as described above (see Shell Expansions). +The results are split using the rules described above +(see 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 (see 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 ($1) is the +name of the command whose arguments are being completed, the +second argument ($2) is the word being completed, and the third argument +($3) 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 +(see Programmable Completion Builtins), to generate the matches. +It must put the possible completions in the COMPREPLY array +variable, one per array element. +

+

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. +If the nocasematch shell option +(see the description of shopt in The Shopt Builtin) +is enabled, the match is performed without regard to the case +of alphabetic characters. +

+

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 new 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 -o bashdefault -o default
+
+ +
+
+
+ +

8.7 Programmable Completion Builtins

+ + +

Three builtin commands are available to manipulate the programmable completion +facilities: one to specify how the arguments to a particular command are to +be completed, and two to modify the completion as it is happening. +

+
+
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] [-DEI] [-A action] [-G globpat]
+[-W wordlist] [-F function] [-C command] [-X filterpat]
+[-P prefix] [-S suffix] name [name …]
+complete -pr [-DEI] [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 other supplied 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 other supplied options and actions should +apply to “empty” command completion; that is, completion attempted on a +blank line. +The -I option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as ‘;’ or ‘|’, which is usually command +name completion. +If multiple options are supplied, the -D option takes precedence +over -E, and both take precedence over -I. +If any of -D, -E, or -I are supplied, any other +name arguments are ignored; these completions only apply to the case +specified by the option. +

+

The process of applying these completion specifications when word completion +is attempted is described above (see Programmable Completion). +

+

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. +

+
+
noquote
+

Tell Readline not to quote the completed words if they are filenames +(quoting filenames is the default). +

+
+
nosort
+

Tell Readline not to sort the list of possible completions alphabetically. +

+
+
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 (see 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 (see Bash Builtin Commands). +

+
+
hostname
+

Hostnames, as taken from the file specified by the +HOSTFILE shell variable (see 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 +(see The Set Builtin). +

+
+
shopt
+

Shell option names as accepted by the shopt builtin +(see Bash Builtin Commands). +

+
+
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. +

+
+ +
+
-C command
+

command is executed in a subshell environment, and its output is +used as the possible completions. +Arguments are passed as with the -F option. +

+
+
-F function
+

The shell function function is executed in the current shell +environment. +When it is executed, $1 is the name of the command whose arguments are +being completed, $2 is the word being completed, and $3 is the word +preceding the word being completed, as described above +(see Programmable Completion). +When it finishes, the possible completions are retrieved from the value +of the COMPREPLY array variable. +

+
+
-G globpat
+

The filename expansion pattern globpat is expanded to generate +the possible completions. +

+
+
-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. +

+
+
-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. +

+
+
-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. +

+
+ +

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] [-DEI] [+o option] [name]
+
+

Modify completion options for each name according to the +options, or for the currently-executing 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 other supplied 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 other supplied options should +apply to “empty” command completion; that is, completion attempted on a +blank line. +The -I option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as ‘;’ or ‘|’, which is usually command +name completion. +

+

If multiple options are supplied, the -D option takes precedence +over -E, and both take precedence over -I +

+

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. +

+
+
+ +
+
+
+ +

8.8 A Programmable Completion Example

+ +

The most common way to obtain additional completion functionality beyond +the default actions complete and compgen provide is to use +a shell function and bind it to a particular command using complete -F. +

+

The following function provides completions for the cd builtin. +It is a reasonably good example of what shell functions must do when +used for completion. This function uses the word passed as $2 +to determine the directory name to complete. You can also use the +COMP_WORDS array variable; the current word is indexed by the +COMP_CWORD variable. +

+

The function relies on the complete and compgen builtins +to do much of the work, adding only the things that the Bash cd +does beyond accepting basic directory names: +tilde expansion (see Tilde Expansion), +searching directories in $CDPATH, which is described above +(see Bourne Shell Builtins), +and basic support for the cdable_vars shell option +(see The Shopt Builtin). +_comp_cd modifies the value of IFS so that it contains only +a newline to accommodate file names containing spaces and tabs – +compgen prints the possible completions it generates one per line. +

+

Possible completions go into the COMPREPLY array variable, one +completion per array element. The programmable completion system retrieves +the completions from there when the function returns. +

+
+
# A completion function for the cd builtin
+# based on the cd completion function from the bash_completion package
+_comp_cd()
+{
+    local IFS=$' \t\n'    # normalize IFS
+    local cur _skipdot _cdpath
+    local i j k
+
+    # Tilde expansion, which also expands tilde to full pathname
+    case "$2" in
+    \~*)    eval cur="$2" ;;
+    *)      cur=$2 ;;
+    esac
+
+    # no cdpath or absolute pathname -- straight directory completion
+    if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then
+        # compgen prints paths one per line; could also use while loop
+        IFS=$'\n'
+        COMPREPLY=( $(compgen -d -- "$cur") )
+        IFS=$' \t\n'
+    # CDPATH+directories in the current directory if not in CDPATH
+    else
+        IFS=$'\n'
+        _skipdot=false
+        # preprocess CDPATH to convert null directory names to .
+        _cdpath=${CDPATH/#:/.:}
+        _cdpath=${_cdpath//::/:.:}
+        _cdpath=${_cdpath/%:/:.}
+        for i in ${_cdpath//:/$'\n'}; do
+            if [[ $i -ef . ]]; then _skipdot=true; fi
+            k="${#COMPREPLY[@]}"
+            for j in $( compgen -d -- "$i/$cur" ); do
+                COMPREPLY[k++]=${j#$i/}        # cut off directory
+            done
+        done
+        $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") )
+        IFS=$' \t\n'
+    fi
+
+    # variable names if appropriate shell option set and no completions
+    if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then
+        COMPREPLY=( $(compgen -v -- "$cur") )
+    fi
+
+    return 0
+}
+
+ +

We install the completion function using the -F option to +complete: +

+
+
# Tell readline to quote appropriate and append slashes to directories;
+# use the bash default completion for other arguments
+complete -o filenames -o nospace -o bashdefault -F _comp_cd cd
+
+ +

Since we’d like Bash and Readline to take care of some +of the other details for us, we use several other options to tell Bash +and Readline what to do. The -o filenames option tells Readline +that the possible completions should be treated as filenames, and quoted +appropriately. That option will also cause Readline to append a slash to +filenames it can determine are directories (which is why we might want to +extend _comp_cd to append a slash if we’re using directories found +via CDPATH: Readline can’t tell those completions are directories). +The -o nospace option tells Readline to not append a space +character to the directory name, in case we want to append to it. +The -o bashdefault option brings in the rest of the "Bash default" +completions – possible completions that Bash adds to the default Readline +set. These include things like command name completion, variable completion +for words beginning with ‘$’ or ‘${’, completions containing pathname +expansion patterns (see Filename Expansion), and so on. +

+

Once installed using complete, _comp_cd will be called every +time we attempt word completion for a cd command. +

+

Many more examples – an extensive collection of completions for most of +the common GNU, Unix, and Linux commands – are available as part of the +bash_completion project. This is installed by default on many GNU/Linux +distributions. Originally written by Ian Macdonald, the project now lives +at https://github.com/scop/bash-completion/. There are ports for +other systems such as Solaris and Mac OS X. +

+

An older version of the bash_completion package is distributed with bash +in the examples/complete subdirectory. +

+ + +
+
+
+
+ +

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. +

+ + +
+
+ +

9.1 Bash History Facilities

+ + + +

When the -o history option to the set builtin +is enabled (see 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 a shell with history enabled exits, the last +$HISTSIZE lines are copied from the history list to the file +named by $HISTFILE. +If the histappend shell option is set (see Bash Builtin Commands), +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 unset, or set to null, a non-numeric value, or +a numeric value less than zero, the history file is not truncated. +

+

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 following history entry. +

+

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 (see Commands For Manipulating The 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. +See The Shopt Builtin, for a description of shopt. +

+
+
+
+ +

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]
+
+ +

The first form selects a range of commands from first to +last from the history list and displays or edits and re-executes +them. +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). +

+

When listing, a first or last of 0 is equivalent to -1 +and -0 is equivalent to the current command (usually the fc +command); +otherwise 0 is equivalent to -1 and -0 is invalid. +

+

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. +command is interpreted the same as first above. +

+

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 (see Aliases). +

+
+
history
+
+
history [n]
+history -c
+history -d offset
+history -d start-end
+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. +If offset is positive, it should be specified as it appears when +the history is displayed. +If offset is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of ‘-1’ refers to the current +history -d command. +

+
+
-d start-end
+

Delete the range of history entries between positions start and +end, inclusive. +Positive and negative values for start and end +are interpreted as described above. +

+
+
-a
+

Append the new history lines to the history file. +These are history lines entered since the beginning of the current +Bash session, but not already appended 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 history file and append its contents to +the history list. +

+
+
-w
+

Write out the current history list 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. +

+
+
+ +

If a filename argument is supplied +when any of the -w, -r, -a, or -n options +is used, Bash uses filename as the history file. +If not, then the value of the HISTFILE variable is used. +

+

The return value is 0 unless an invalid option is encountered, an +error occurs while reading or writing the history file, an invalid +offset or range is supplied as an argument to -d, or the +history expansion supplied as an argument to -p fails. +

+
+
+ +
+
+
+ +

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 is performed immediately after a complete line +is read, before the shell breaks it into words, and is performed +on each line individually. Bash attempts to inform the history +expansion functions about quoting still in effect from previous lines. +

+

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. +

+

History expansion implements shell-like quoting conventions: +a backslash can be used to remove the special handling for the next character; +single quotes enclose verbatim sequences of characters, and can be used to +inhibit history expansion; +and characters enclosed within double quotes may be subject to history +expansion, since backslash can escape the history expansion character, +but single quotes may not, since they are not treated specially within +double quotes. +

+

When using the shell, only ‘\’ and ‘'’ may be used to escape the +history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string. +

+

Several shell options settable with the shopt +builtin (see The Shopt Builtin) 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 (see Bash Variables). The shell uses +the history comment character to mark history timestamps when +writing the history file. +

+ + +
+
+ +

9.3.1 Event Designators

+ + +

An event designator is a reference to a command line entry in the +history list. +Unless the reference is absolute, events are relative to the current +position in the history list. + +

+
+
!
+

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 +preceding the current position in the history list +starting with string. +

+
+
!?string[?]
+

Refer to the most recent command +preceding the current position in the history list +containing string. +The trailing +‘?’ may be omitted if the string is followed immediately by +a newline. +If string is missing, the string from the most recent search is used; +it is an error if there is no previous search string. +

+
+
^string1^string2^
+

Quick Substitution. Repeat the last command, replacing string1 +with string2. Equivalent to +!!:s^string1^string2^. +

+
+
!#
+

The entire command line typed so far. +

+
+
+ +
+
+
+
+

+Next: , Previous: , Up: History Expansion   [Contents][Index]

+
+

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 0th word. For many applications, this is the command word. +

+
+
n
+

The nth word. +

+
+
^
+

The first argument; that is, word 1. +

+
+
$
+

The last argument. +

+
+
%
+

The first word matched by the most recent ‘?string?’ search, +if the search string begins with a character that is part of a word. +

+
+
x-y
+

A range of words; ‘-y’ abbreviates ‘0-y’. +

+
+
*
+

All of the words, except the 0th. 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 ‘x’ is missing, it defaults to 0. +

+
+
+ +

If a word designator is supplied without an event specification, the +previous command is used as the event. +

+
+
+
+ +

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 ‘:’. +These modify, or edit, the word or words selected from the history event. +

+
+
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. +The ‘q’ and ‘x’ modifiers are mutually exclusive; the last one +supplied is used. +

+
+
s/old/new/
+

Substitute new for the first occurrence of old in the +event line. +Any character may be used as the delimiter 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 ‘&’. +If old is null, it is set to the last old +substituted, or, if no previous history substitutions took place, +the last string +in a !?string[?] +search. +If new is null, each matching old is deleted. +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’ or ‘&’ modifier once to each word +in the event. +

+
+
+ +
+
+
+
+
+ +

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. +

+ + +
+
+ +

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, message translation +files, some supplemental documentation, a number of example loadable +builtin commands, and a set of header files for developing loadable +builtins. +You may need additional privileges to install bash to your +desired destination, so ‘sudo make install’ might be required. +More information about controlling the locations where bash and +other files are installed is below (see Installation Names). + +
+ +

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, po, 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-4.2$ ./configure --help
+
+ +

at the Bash prompt in your Bash source directory. +

+

If you want to build Bash in a directory separate from the source +directory – to build for multiple architectures, for example – +just use the full path to the configure script. The following commands +will build bash in a directory under /usr/local/build from +the source code in /usr/local/src/bash-4.4: +

+
+
mkdir /usr/local/build/bash-4.4
+cd /usr/local/build/bash-4.4
+bash /usr/local/src/bash-4.4/configure
+make
+
+ +

See Compiling For Multiple Architectures for more information +about building in a directory separate from the source. +

+

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.ac is used to create configure +by a program called Autoconf. +You only need configure.ac 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.69 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’. +

+
+
+
+ +

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. +

+
+
+
+ +

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 +(see Basic Installation). +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 support 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. +

+
+
+
+ +

10.4 Installation Names

+ +

By default, ‘make install’ will install into +/usr/local/bin, /usr/local/man, etc.; +that is, the installation prefix defaults to /usr/local. +You can specify an installation prefix other than /usr/local by +giving configure the option --prefix=PATH, +or by specifying a value for the prefixmake’ +variable when running ‘make install’ +(e.g., ‘make install prefix=PATH’). +The prefix variable provides a default for exec_prefix and +other variables used when installing bash. +

+

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. +

+

If you would like to change the installation locations for a single run, +you can specify these variables as arguments to make: +‘make install exec_prefix=/’ will install bash and +bashbug into /bin instead of the default /usr/local/bin. +

+

If you want to see the files bash will install and where it will install +them without changing anything on your system, specify the variable +DESTDIR as an argument to make. Its value should be the +absolute directory path you’d like to use as the root of your sample +installation tree. For example, +

+
+
mkdir /fs1/bash-install
+make install DESTDIR=/fs1/bash-install
+
+ +

will install bash into /fs1/bash-install/usr/local/bin/bash, +the documentation into directories within +/fs1/bash-install/usr/local/share, the example loadable builtins into +/fs1/bash-install/usr/local/lib/bash, and so on. +You can use the usual exec_prefix and prefix variables to alter +the directory paths beneath the value of DESTDIR. +

+

The GNU Makefile standards provide a more complete description of these +variables and their effects. +

+
+
+
+ +

10.5 Specifying the System Type

+ +

There may be some features configure can not figure out +automatically, but needs 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. +

+
+
+
+ +

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. +

+
+
+
+ +

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. +

+
+
+
+ +

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-libintl-prefix[=PREFIX]
+

Define this to make Bash link with a locally-installed version of the +libintl library instead of the version in lib/intl. +

+
+
--with-libiconv-prefix[=PREFIX]
+

Define this to make Bash look for libiconv in PREFIX instead of the +standard system locations. There is no version included with Bash. +

+
+
--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, linked, and installed, rather than changing run-time features. +

+
+
--enable-largefile
+

Enable support for 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. +

+
+
--enable-profiling
+

This builds a Bash binary that produces profiling information to be +processed by gprof each time it is executed. +

+
+
--enable-separate-helpfiles
+

Use external files for the documentation displayed by the help builtin +instead of storing the text internally. +

+
+
--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 +‘alt-array-implementation’, +‘disabled-builtins’, +‘direxpand-default’, +‘strict-posix-default’, +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 (see Aliases). +

+
+
--enable-alt-array-implementation
+

This builds bash using an alternate implementation of arrays +(see Arrays) that provides faster access at the expense of using +more memory (sometimes many times more, depending on how sparse an array is). +

+
+
--enable-arith-for-command
+

Include support for the alternate form of the for command +that behaves like the C language for statement +(see Looping Constructs). +

+
+
--enable-array-variables
+

Include support for one-dimensional array shell variables +(see Arrays). +

+
+
--enable-bang-history
+

Include support for csh-like history substitution +(see History Expansion). +

+
+
--enable-brace-expansion
+

Include csh-like brace expansion +( b{a,b}cbac bbc ). +See 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 +(see Pipelines). +This allows pipelines as well as shell builtins and functions to be timed. +

+
+
--enable-cond-command
+

Include support for the [[ conditional command. +(see Conditional Constructs). +

+
+
--enable-cond-regexp
+

Include support for matching POSIX regular expressions using the +‘=~’ binary operator in the [[ conditional command. +(see Conditional Constructs). +

+
+
--enable-coprocesses
+

Include support for coprocesses and the coproc reserved word +(see Pipelines). +

+
+
--enable-debugger
+

Include support for the bash debugger (distributed separately). +

+
+
--enable-dev-fd-stat-broken
+

If calling stat on /dev/fd/N returns different results than +calling fstat on file descriptor N, supply this option to +enable a workaround. +This has implications for conditional commands that test file attributes. +

+
+
--enable-direxpand-default
+

Cause the direxpand shell option (see The Shopt Builtin) +to be enabled by default when the shell starts. +It is normally disabled by default. +

+
+
--enable-directory-stack
+

Include support for a csh-like directory stack and the +pushd, popd, and dirs builtins +(see 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 Bash Builtin Commands, for details of the builtin and +enable builtin commands. +

+
+
--enable-dparen-arithmetic
+

Include support for the ((…)) command +(see Conditional Constructs). +

+
+
--enable-extended-glob
+

Include support for the extended pattern matching features described +above under Pattern Matching. +

+
+
--enable-extended-glob-default
+

Set the default value of the extglob shell option described +above under The Shopt Builtin to be enabled. +

+
+
--enable-function-import
+

Include support for importing function definitions exported by another +instance of the shell from the environment. This option is enabled by +default. +

+
+
--enable-glob-asciirange-default
+

Set the default value of the globasciiranges shell option described +above under The Shopt Builtin to be enabled. +This controls the behavior of character ranges when used in pattern matching +bracket expressions. +

+
+
--enable-help-builtin
+

Include the help builtin, which displays help on shell builtins and +variables (see Bash Builtin Commands). +

+
+
--enable-history
+

Include command history and the fc and history +builtin commands (see Bash History Facilities). +

+
+
--enable-job-control
+

This enables the job control features (see 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 (see Redirections). +

+
+
--enable-process-substitution
+

This enables process substitution (see Process Substitution) if +the operating system provides the necessary support. +

+
+
--enable-progcomp
+

Enable the programmable completion facilities +(see 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 $PS0, $PS1, $PS2, and $PS4 prompt +strings. See Controlling the 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 (see 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 +The Restricted Shell, for a description of restricted mode. +

+
+
--enable-select
+

Include the select compound command, which allows the generation of +simple menus (see Conditional Constructs). +

+
+
--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 (see Bash POSIX Mode). +

+
+
--enable-translatable-strings
+

Enable support for $"string" translatable strings +(see Locale-Specific Translation). +

+
+
--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. +See Bash Builtin Commands, 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. +

+
+
+
+
+ +

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/ and from +http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz. +

+

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 +bug-bash@gnu.org. +

+
+
+
+ +

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 (see Bash POSIX Mode). + +
  • Bash has multi-character invocation options (see Invoking Bash). + +
  • Bash has command-line editing (see Command Line Editing) and +the bind builtin. + +
  • Bash provides a programmable word completion mechanism +(see Programmable Completion), and builtin commands +complete, compgen, and compopt, to +manipulate it. + +
  • Bash has command history (see 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 +(see History Expansion). + +
  • Bash has one-dimensional array variables (see 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 (see 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 +(see Locale-Specific Translation). + +
  • Bash implements the ! keyword to negate the return value of +a pipeline (see 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 (see 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 (see Looping Constructs). + +
  • Bash includes the select compound command, which allows the +generation of simple menus (see Conditional Constructs). + +
  • Bash includes the [[ compound command, which makes conditional +testing part of the shell grammar (see Conditional Constructs), including +optional regular expression matching. + +
  • Bash provides optional case-insensitive matching for the case and +[[ constructs. + +
  • Bash includes brace expansion (see Brace Expansion) and tilde +expansion (see Tilde Expansion). + +
  • Bash implements command aliases and the alias and unalias +builtins (see Aliases). + +
  • Bash provides shell arithmetic, the (( compound command +(see Conditional Constructs), +and arithmetic expansion (see 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 (see Shell Parameter Expansion). + +
  • The expansion ${#xx}, which returns the length of ${xx}, +is supported (see 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 +(see Shell Parameter Expansion). + +
  • The expansion +${var/[/]pattern[/replacement]}, +which matches pattern and replaces it with replacement in +the value of var, is available (see Shell Parameter Expansion). + +
  • The expansion ${!prefix*} expansion, which expands to +the names of all shell variables whose names begin with prefix, +is available (see Shell Parameter Expansion). + +
  • Bash has indirect variable expansion using ${!word} +(see Shell Parameter Expansion). + +
  • Bash can expand positional parameters beyond $9 using +${num}. + +
  • The POSIX $() form of command substitution +is implemented (see Command Substitution), +and preferred to the Bourne shell’s `` (which +is also implemented for backwards compatibility). + +
  • Bash has process substitution (see 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). See Bash Variables, +for details. + +
  • The IFS variable is used to split only the results of expansion, +not all words (see Word Splitting). +This closes a longstanding shell security hole. + +
  • The filename expansion bracket expression code uses ‘!’ and ‘^’ +to negate the set of characters between the brackets. +The Bourne shell uses only ‘!’. + +
  • Bash implements the full set of POSIX filename expansion operators, +including character classes, equivalence classes, and +collating symbols (see Filename Expansion). + +
  • Bash implements extended pattern matching features when the extglob +shell option is enabled (see 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 +(see Bash Builtin Commands). + +
  • Variable assignments preceding commands affect only that command, even +builtins and functions (see 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 (see 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 (see 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 (see Redirections). + +
  • Bash can open network connections to arbitrary machines and services +with the redirection operators (see Redirections). + +
  • The noclobber option is available to avoid overwriting existing +files with output redirection (see The Set Builtin). +The ‘>|’ redirection operator may be used to override noclobber. + +
  • The Bash cd and pwd builtins (see 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 (see Bash Builtin Commands). + +
  • The command builtin allows selective disabling of functions +when command lookup is performed (see Bash Builtin Commands). + +
  • Individual builtins may be enabled or disabled using the enable +builtin (see Bash Builtin Commands). + +
  • 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 +(see Bourne Shell Builtins). + +
  • Shell functions may be exported to children via the environment +using export -f (see 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’ +(see Bourne Shell Builtins). + +
  • Bash includes a help builtin for quick reference to shell +facilities (see Bash Builtin Commands). + +
  • The printf builtin is available to display formatted output +(see Bash Builtin Commands). + +
  • The Bash read builtin (see Bash Builtin Commands) +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 +(see Bourne Shell Builtins). + +
  • Bash includes the shopt builtin, for finer control of shell +optional capabilities (see The Shopt Builtin), and allows these options +to be set and unset at shell invocation (see Invoking Bash). + +
  • Bash has much more optional behavior controllable with the set +builtin (see The Set Builtin). + +
  • The ‘-x’ (xtrace) option displays commands other than +simple commands when performing an execution trace +(see The Set Builtin). + +
  • The test builtin (see 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 (see 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 (see 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 (see Bourne Shell Builtins) allows a +RETURN pseudo-signal specification, similar to +EXIT and DEBUG. +Commands specified with a 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 (see Bash Builtin Commands). + +
  • 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 (see Bourne Shell Builtins). + +
  • Bash implements a csh-like directory stack, and provides the +pushd, popd, and dirs builtins to manipulate it +(see 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 (see Controlling the Prompt). + +
  • The Bash restricted mode is more useful (see 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 (see 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 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). +
+ +
+
+
+
+ +

Appendix C GNU Free Documentation License

+ +
Version 1.3, 3 November 2008 +
+ +
+
Copyright © 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.
+
+ +
    +
  1. 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. +

    +
  2. 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. +

    +
  3. 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. +

    +
  4. 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. +

    +
  5. 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: +

    +
      +
    1. 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. + +
    2. 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. + +
    3. State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +
    4. Preserve all the copyright notices of the Document. + +
    5. Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +
    6. 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. + +
    7. Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document’s license notice. + +
    8. Include an unaltered copy of this License. + +
    9. 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. + +
    10. 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. + +
    11. 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. + +
    12. 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. + +
    13. Delete any section Entitled “Endorsements”. Such a section +may not be included in the Modified Version. + +
    14. Do not retitle any existing section to be Entitled “Endorsements” or +to conflict in title with any Invariant Section. + +
    15. 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. +

    +
  6. 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.” +

    +
  7. 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. +

    +
  8. 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. +

    +
  9. 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. +

    +
  10. 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. +

    +
  11. 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. +

    +
  12. 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. +

+ + +
+
+
+ +

Appendix D Indexes

+ + + +
+
+ +

D.1 Index of Shell Builtin Commands

+
Jump to:   . +   +: +   +[ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +J +   +K +   +L +   +M +   +P +   +R +   +S +   +T +   +U +   +W +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

.
.: Bourne Shell Builtins

:
:: Bourne Shell Builtins

[
[: Bourne Shell Builtins

A
alias: Bash Builtins

B
bg: Job Control Builtins
bind: Bash Builtins
break: Bourne Shell Builtins
builtin: Bash Builtins

C
caller: Bash Builtins
cd: Bourne Shell Builtins
command: Bash Builtins
compgen: Programmable Completion Builtins
complete: Programmable Completion Builtins
compopt: Programmable Completion Builtins
continue: Bourne Shell Builtins

D
declare: Bash Builtins
dirs: Directory Stack Builtins
disown: Job Control Builtins

E
echo: Bash Builtins
enable: Bash Builtins
eval: Bourne Shell Builtins
exec: Bourne Shell Builtins
exit: Bourne Shell Builtins
export: Bourne Shell Builtins

F
fc: Bash History Builtins
fg: Job Control Builtins

G
getopts: Bourne Shell Builtins

H
hash: Bourne Shell Builtins
help: Bash Builtins
history: Bash History Builtins

J
jobs: Job Control Builtins

K
kill: Job Control Builtins

L
let: Bash Builtins
local: Bash Builtins
logout: Bash Builtins

M
mapfile: Bash Builtins

P
popd: Directory Stack Builtins
printf: Bash Builtins
pushd: Directory Stack Builtins
pwd: Bourne Shell Builtins

R
read: Bash Builtins
readarray: Bash Builtins
readonly: Bourne Shell Builtins
return: Bourne Shell Builtins

S
set: The Set Builtin
shift: Bourne Shell Builtins
shopt: The Shopt Builtin
source: Bash Builtins
suspend: Job Control Builtins

T
test: Bourne Shell Builtins
times: Bourne Shell Builtins
trap: Bourne Shell Builtins
type: Bash Builtins
typeset: Bash Builtins

U
ulimit: Bash Builtins
umask: Bourne Shell Builtins
unalias: Bash Builtins
unset: Bourne Shell Builtins

W
wait: Job Control Builtins

+
Jump to:   . +   +: +   +[ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +J +   +K +   +L +   +M +   +P +   +R +   +S +   +T +   +U +   +W +   +
+ +
+
+
+ +

D.2 Index of Shell Reserved Words

+
Jump to:   ! +   +[ +   +] +   +{ +   +} +   +
+C +   +D +   +E +   +F +   +I +   +S +   +T +   +U +   +W +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

!
!: Pipelines

[
[[: Conditional Constructs

]
]]: Conditional Constructs

{
{: Command Grouping

}
}: Command Grouping

C
case: Conditional Constructs

D
do: Looping Constructs
done: Looping Constructs

E
elif: Conditional Constructs
else: Conditional Constructs
esac: Conditional Constructs

F
fi: Conditional Constructs
for: Looping Constructs
function: Shell Functions

I
if: Conditional Constructs
in: Conditional Constructs

S
select: Conditional Constructs

T
then: Conditional Constructs
time: Pipelines

U
until: Looping Constructs

W
while: Looping Constructs

+
Jump to:   ! +   +[ +   +] +   +{ +   +} +   +
+C +   +D +   +E +   +F +   +I +   +S +   +T +   +U +   +W +   +
+ +
+
+
+ +

D.3 Parameter and Variable Index

+
Jump to:   ! +   +# +   +$ +   +* +   +- +   +0 +   +? +   +@ +   +_ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +L +   +M +   +O +   +P +   +R +   +S +   +T +   +U +   +V +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

!
!: Special Parameters

#
#: Special Parameters

$
$: Special Parameters
$!: Special Parameters
$#: Special Parameters
$$: Special Parameters
$*: Special Parameters
$-: Special Parameters
$0: Special Parameters
$?: Special Parameters
$@: Special Parameters
$_: Bash Variables

*
*: Special Parameters

-
-: Special Parameters

0
0: Special Parameters

?
?: Special Parameters

@
@: Special Parameters

_
_: Bash Variables

A
active-region-end-color: Readline Init File Syntax
active-region-start-color: Readline Init File Syntax
auto_resume: Job Control Variables

B
BASH: Bash Variables
BASHOPTS: Bash Variables
BASHPID: Bash Variables
BASH_ALIASES: Bash Variables
BASH_ARGC: Bash Variables
BASH_ARGV: Bash Variables
BASH_ARGV0: Bash Variables
BASH_CMDS: Bash Variables
BASH_COMMAND: Bash Variables
BASH_COMPAT: Bash Variables
BASH_ENV: Bash Variables
BASH_EXECUTION_STRING: Bash Variables
BASH_LINENO: Bash Variables
BASH_LOADABLES_PATH: Bash Variables
BASH_REMATCH: Bash Variables
BASH_SOURCE: Bash Variables
BASH_SUBSHELL: Bash Variables
BASH_VERSINFO: Bash Variables
BASH_VERSION: Bash Variables
BASH_XTRACEFD: Bash Variables
bell-style: Readline Init File Syntax
bind-tty-special-chars: Readline Init File Syntax
blink-matching-paren: Readline Init File Syntax

C
CDPATH: Bourne Shell Variables
CHILD_MAX: Bash Variables
colored-completion-prefix: Readline Init File Syntax
colored-stats: Readline Init File Syntax
COLUMNS: Bash Variables
comment-begin: Readline Init File Syntax
completion-display-width: Readline Init File Syntax
completion-ignore-case: Readline Init File Syntax
completion-map-case: Readline Init File Syntax
completion-prefix-display-length: Readline Init File Syntax
completion-query-items: Readline Init File Syntax
COMPREPLY: Bash Variables
COMP_CWORD: Bash Variables
COMP_KEY: Bash Variables
COMP_LINE: Bash Variables
COMP_POINT: Bash Variables
COMP_TYPE: Bash Variables
COMP_WORDBREAKS: Bash Variables
COMP_WORDS: Bash Variables
convert-meta: Readline Init File Syntax
COPROC: Bash Variables

D
DIRSTACK: Bash Variables
disable-completion: Readline Init File Syntax

E
echo-control-characters: Readline Init File Syntax
editing-mode: Readline Init File Syntax
EMACS: Bash Variables
emacs-mode-string: Readline Init File Syntax
enable-active-region: Readline Init File Syntax
enable-bracketed-paste: Readline Init File Syntax
enable-keypad: Readline Init File Syntax
ENV: Bash Variables
EPOCHREALTIME: Bash Variables
EPOCHSECONDS: Bash Variables
EUID: Bash Variables
EXECIGNORE: Bash Variables
expand-tilde: Readline Init File Syntax

F
FCEDIT: Bash Variables
FIGNORE: Bash Variables
FUNCNAME: Bash Variables
FUNCNEST: Bash Variables

G
GLOBIGNORE: Bash Variables
GROUPS: Bash Variables

H
histchars: Bash Variables
HISTCMD: Bash Variables
HISTCONTROL: Bash Variables
HISTFILE: Bash Variables
HISTFILESIZE: Bash Variables
HISTIGNORE: Bash Variables
history-preserve-point: Readline Init File Syntax
history-size: Readline Init File Syntax
HISTSIZE: Bash Variables
HISTTIMEFORMAT: Bash Variables
HOME: Bourne Shell Variables
horizontal-scroll-mode: Readline Init File Syntax
HOSTFILE: Bash Variables
HOSTNAME: Bash Variables
HOSTTYPE: Bash Variables

I
IFS: Bourne Shell Variables
IGNOREEOF: Bash Variables
input-meta: Readline Init File Syntax
INPUTRC: Bash Variables
INSIDE_EMACS: Bash Variables
isearch-terminators: Readline Init File Syntax

K
keymap: Readline Init File Syntax

L
LANG: Creating Internationalized Scripts
LANG: Bash Variables
LC_ALL: Bash Variables
LC_COLLATE: Bash Variables
LC_CTYPE: Bash Variables
LC_MESSAGES: Creating Internationalized Scripts
LC_MESSAGES: Bash Variables
LC_NUMERIC: Bash Variables
LC_TIME: Bash Variables
LINENO: Bash Variables
LINES: Bash Variables

M
MACHTYPE: Bash Variables
MAIL: Bourne Shell Variables
MAILCHECK: Bash Variables
MAILPATH: Bourne Shell Variables
MAPFILE: Bash Variables
mark-modified-lines: Readline Init File Syntax
mark-symlinked-directories: Readline Init File Syntax
match-hidden-files: Readline Init File Syntax
menu-complete-display-prefix: Readline Init File Syntax
meta-flag: Readline Init File Syntax

O
OLDPWD: Bash Variables
OPTARG: Bourne Shell Variables
OPTERR: Bash Variables
OPTIND: Bourne Shell Variables
OSTYPE: Bash Variables
output-meta: Readline Init File Syntax

P
page-completions: Readline Init File Syntax
PATH: Bourne Shell Variables
PIPESTATUS: Bash Variables
POSIXLY_CORRECT: Bash Variables
PPID: Bash Variables
PROMPT_COMMAND: Bash Variables
PROMPT_DIRTRIM: Bash Variables
PS0: Bash Variables
PS1: Bourne Shell Variables
PS2: Bourne Shell Variables
PS3: Bash Variables
PS4: Bash Variables
PWD: Bash Variables

R
RANDOM: Bash Variables
READLINE_ARGUMENT: Bash Variables
READLINE_LINE: Bash Variables
READLINE_MARK: Bash Variables
READLINE_POINT: Bash Variables
REPLY: Bash Variables
revert-all-at-newline: Readline Init File Syntax

S
SECONDS: Bash Variables
SHELL: Bash Variables
SHELLOPTS: Bash Variables
SHLVL: Bash Variables
show-all-if-ambiguous: Readline Init File Syntax
show-all-if-unmodified: Readline Init File Syntax
show-mode-in-prompt: Readline Init File Syntax
skip-completed-text: Readline Init File Syntax
SRANDOM: Bash Variables

T
TEXTDOMAIN: Creating Internationalized Scripts
TEXTDOMAINDIR: Creating Internationalized Scripts
TIMEFORMAT: Bash Variables
TMOUT: Bash Variables
TMPDIR: Bash Variables

U
UID: Bash Variables

V
vi-cmd-mode-string: Readline Init File Syntax
vi-ins-mode-string: Readline Init File Syntax
visible-stats: Readline Init File Syntax

+
Jump to:   ! +   +# +   +$ +   +* +   +- +   +0 +   +? +   +@ +   +_ +   +
+A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +L +   +M +   +O +   +P +   +R +   +S +   +T +   +U +   +V +   +
+ +
+
+
+ +

D.4 Function Index

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +U +   +Y +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

A
abort (C-g): Miscellaneous Commands
accept-line (Newline or Return): Commands For History
alias-expand-line (): Miscellaneous Commands

B
backward-char (C-b): Commands For Moving
backward-delete-char (Rubout): Commands For Text
backward-kill-line (C-x Rubout): Commands For Killing
backward-kill-word (M-DEL): Commands For Killing
backward-word (M-b): Commands For Moving
beginning-of-history (M-<): Commands For History
beginning-of-line (C-a): Commands For Moving
bracketed-paste-begin (): Commands For Text

C
call-last-kbd-macro (C-x e): Keyboard Macros
capitalize-word (M-c): Commands For Text
character-search (C-]): Miscellaneous Commands
character-search-backward (M-C-]): Miscellaneous Commands
clear-display (M-C-l): Commands For Moving
clear-screen (C-l): Commands For Moving
complete (TAB): Commands For Completion
complete-command (M-!): Commands For Completion
complete-filename (M-/): Commands For Completion
complete-hostname (M-@): Commands For Completion
complete-into-braces (M-{): Commands For Completion
complete-username (M-~): Commands For Completion
complete-variable (M-$): Commands For Completion
copy-backward-word (): Commands For Killing
copy-forward-word (): Commands For Killing
copy-region-as-kill (): Commands For Killing

D
dabbrev-expand (): Commands For Completion
delete-char (C-d): Commands For Text
delete-char-or-list (): Commands For Completion
delete-horizontal-space (): Commands For Killing
digit-argument (M-0, M-1, … M--): Numeric Arguments
display-shell-version (C-x C-v): Miscellaneous Commands
do-lowercase-version (M-A, M-B, M-x, …): Miscellaneous Commands
downcase-word (M-l): Commands For Text
dump-functions (): Miscellaneous Commands
dump-macros (): Miscellaneous Commands
dump-variables (): Miscellaneous Commands
dynamic-complete-history (M-TAB): Commands For Completion

E
edit-and-execute-command (C-x C-e): Miscellaneous Commands
end-kbd-macro (C-x )): Keyboard Macros
end-of-file (usually C-d): Commands For Text
end-of-history (M->): Commands For History
end-of-line (C-e): Commands For Moving
exchange-point-and-mark (C-x C-x): Miscellaneous Commands

F
fetch-history (): Commands For History
forward-backward-delete-char (): Commands For Text
forward-char (C-f): Commands For Moving
forward-search-history (C-s): Commands For History
forward-word (M-f): Commands For Moving

G
glob-complete-word (M-g): Miscellaneous Commands
glob-expand-word (C-x *): Miscellaneous Commands
glob-list-expansions (C-x g): Miscellaneous Commands

H
history-and-alias-expand-line (): Miscellaneous Commands
history-expand-line (M-^): Miscellaneous Commands
history-search-backward (): Commands For History
history-search-forward (): Commands For History
history-substring-search-backward (): Commands For History
history-substring-search-forward (): Commands For History

I
insert-comment (M-#): Miscellaneous Commands
insert-completions (M-*): Commands For Completion
insert-last-argument (M-. or M-_): Miscellaneous Commands

K
kill-line (C-k): Commands For Killing
kill-region (): Commands For Killing
kill-whole-line (): Commands For Killing
kill-word (M-d): Commands For Killing

M
magic-space (): Miscellaneous Commands
menu-complete (): Commands For Completion
menu-complete-backward (): Commands For Completion

N
next-history (C-n): Commands For History
next-screen-line (): Commands For Moving
non-incremental-forward-search-history (M-n): Commands For History
non-incremental-reverse-search-history (M-p): Commands For History

O
operate-and-get-next (C-o): Commands For History
overwrite-mode (): Commands For Text

P
possible-command-completions (C-x !): Commands For Completion
possible-completions (M-?): Commands For Completion
possible-filename-completions (C-x /): Commands For Completion
possible-hostname-completions (C-x @): Commands For Completion
possible-username-completions (C-x ~): Commands For Completion
possible-variable-completions (C-x $): Commands For Completion
prefix-meta (ESC): Miscellaneous Commands
previous-history (C-p): Commands For History
previous-screen-line (): Commands For Moving
print-last-kbd-macro (): Keyboard Macros

Q
quoted-insert (C-q or C-v): Commands For Text

R
re-read-init-file (C-x C-r): Miscellaneous Commands
redraw-current-line (): Commands For Moving
reverse-search-history (C-r): Commands For History
revert-line (M-r): Miscellaneous Commands

S
self-insert (a, b, A, 1, !, …): Commands For Text
set-mark (C-@): Miscellaneous Commands
shell-backward-kill-word (): Commands For Killing
shell-backward-word (M-C-b): Commands For Moving
shell-expand-line (M-C-e): Miscellaneous Commands
shell-forward-word (M-C-f): Commands For Moving
shell-kill-word (M-C-d): Commands For Killing
shell-transpose-words (M-C-t): Commands For Killing
skip-csi-sequence (): Miscellaneous Commands
spell-correct-word (C-x s): Miscellaneous Commands
start-kbd-macro (C-x (): Keyboard Macros

T
tilde-expand (M-&): Miscellaneous Commands
transpose-chars (C-t): Commands For Text
transpose-words (M-t): Commands For Text

U
undo (C-_ or C-x C-u): Miscellaneous Commands
universal-argument (): Numeric Arguments
unix-filename-rubout (): Commands For Killing
unix-line-discard (C-u): Commands For Killing
unix-word-rubout (C-w): Commands For Killing
upcase-word (M-u): Commands For Text

Y
yank (C-y): Commands For Killing
yank-last-arg (M-. or M-_): Commands For History
yank-nth-arg (M-C-y): Commands For History
yank-pop (M-y): Commands For Killing

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +G +   +H +   +I +   +K +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +U +   +Y +   +
+ +
+
+
+
+

+Previous: , Up: Indexes   [Contents][Index]

+
+

D.5 Concept Index

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +H +   +I +   +J +   +K +   +L +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +V +   +W +   +Y +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry  Section

A
alias expansion: Aliases
arithmetic evaluation: Shell Arithmetic
arithmetic expansion: Arithmetic Expansion
arithmetic, shell: Shell Arithmetic
arrays: Arrays

B
background: Job Control Basics
Bash configuration: Basic Installation
Bash installation: Basic Installation
Bourne shell: Basic Shell Features
brace expansion: Brace Expansion
builtin: Definitions

C
command editing: Readline Bare Essentials
command execution: Command Search and Execution
command expansion: Simple Command Expansion
command history: Bash History Facilities
command search: Command Search and Execution
command substitution: Command Substitution
command timing: Pipelines
commands, compound: Compound Commands
commands, conditional: Conditional Constructs
commands, grouping: Command Grouping
commands, lists: Lists
commands, looping: Looping Constructs
commands, pipelines: Pipelines
commands, shell: Shell Commands
commands, simple: Simple Commands
comments, shell: Comments
Compatibility Level: Shell Compatibility Mode
Compatibility Mode: Shell Compatibility Mode
completion builtins: Programmable Completion Builtins
configuration: Basic Installation
control operator: Definitions
coprocess: Coprocesses

D
directory stack: The Directory Stack

E
editing command lines: Readline Bare Essentials
environment: Environment
evaluation, arithmetic: Shell Arithmetic
event designators: Event Designators
execution environment: Command Execution Environment
exit status: Definitions
exit status: Exit Status
expansion: Shell Expansions
expansion, arithmetic: Arithmetic Expansion
expansion, brace: Brace Expansion
expansion, filename: Filename Expansion
expansion, parameter: Shell Parameter Expansion
expansion, pathname: Filename Expansion
expansion, tilde: Tilde Expansion
expressions, arithmetic: Shell Arithmetic
expressions, conditional: Bash Conditional Expressions

F
field: Definitions
filename: Definitions
filename expansion: Filename Expansion
foreground: Job Control Basics
functions, shell: Shell Functions

H
history builtins: Bash History Builtins
history events: Event Designators
history expansion: History Interaction
history list: Bash History Facilities
History, how to use: A Programmable Completion Example

I
identifier: Definitions
initialization file, readline: Readline Init File
installation: Basic Installation
interaction, readline: Readline Interaction
interactive shell: Invoking Bash
interactive shell: Interactive Shells
internationalization: Locale Translation
internationalized scripts: Creating Internationalized Scripts

J
job: Definitions
job control: Definitions
job control: Job Control Basics

K
kill ring: Readline Killing Commands
killing text: Readline Killing Commands

L
localization: Locale Translation
login shell: Invoking Bash

M
matching, pattern: Pattern Matching
metacharacter: Definitions

N
name: Definitions
native languages: Locale Translation
notation, readline: Readline Bare Essentials

O
operator, shell: Definitions

P
parameter expansion: Shell Parameter Expansion
parameters: Shell Parameters
parameters, positional: Positional Parameters
parameters, special: Special Parameters
pathname expansion: Filename Expansion
pattern matching: Pattern Matching
pipeline: Pipelines
POSIX: Definitions
POSIX Mode: Bash POSIX Mode
process group: Definitions
process group ID: Definitions
process substitution: Process Substitution
programmable completion: Programmable Completion
prompting: Controlling the Prompt

Q
quoting: Quoting
quoting, ANSI: ANSI-C Quoting

R
Readline, how to use: Job Control Variables
redirection: Redirections
reserved word: Definitions
reserved words: Reserved Words
restricted shell: The Restricted Shell
return status: Definitions

S
shell arithmetic: Shell Arithmetic
shell function: Shell Functions
shell script: Shell Scripts
shell variable: Shell Parameters
shell, interactive: Interactive Shells
signal: Definitions
signal handling: Signals
special builtin: Definitions
special builtin: Special Builtins
startup files: Bash Startup Files
string translations: Creating Internationalized Scripts
suspending jobs: Job Control Basics

T
tilde expansion: Tilde Expansion
token: Definitions
translation, native languages: Locale Translation

V
variable, shell: Shell Parameters
variables, readline: Readline Init File Syntax

W
word: Definitions
word splitting: Word Splitting

Y
yanking text: Readline Killing Commands

+
Jump to:   A +   +B +   +C +   +D +   +E +   +F +   +H +   +I +   +J +   +K +   +L +   +M +   +N +   +O +   +P +   +Q +   +R +   +S +   +T +   +V +   +W +   +Y +   +
+ +
+
+
+ + + + + diff --git a/doc/bashref.info b/doc/bashref.info new file mode 100644 index 0000000..25372f9 --- /dev/null +++ b/doc/bashref.info @@ -0,0 +1,12676 @@ +This is bashref.info, produced by makeinfo version 6.8 from +bashref.texi. + +This text is a brief description of the features that are present in the +Bash shell (version 5.2, 19 September 2022). + + This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.2. + + Copyright (C) 1988-2022 Free Software Foundation, Inc. + + 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". +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 5.2, 19 September 2022). The Bash home page is +. + + This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash +Reference Manual', for 'Bash', Version 5.2. + + 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, noting which +features were inspired by other shells and which are specific to Bash. + + 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, 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 'space', 'tab', 'newline', 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, '!'. When the shell is in +POSIX mode (*note Bash POSIX Mode::), the '!' has no special meaning +within double quotes, even 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 +...................... + +Character sequences of the form $'STRING' are treated as a special kind +of single quotes. The sequence expands to STRING, with +backslash-escaped characters in STRING 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 +'\?' + question mark +'\NNN' + the eight-bit character whose value is the octal value NNN (one to + three octal digits) +'\xHH' + the eight-bit character whose value is the hexadecimal value HH + (one or two hex digits) +'\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) +'\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight 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 +................................... + +* Menu: + +* Creating Internationalized Scripts:: How to use translations and different + languages in your scripts. + +Prefixing a double-quoted string with a dollar sign ('$'), such as +$"hello, world", will cause the string to be translated according to the +current locale. The 'gettext' infrastructure performs the lookup and +translation, using the 'LC_MESSAGES', 'TEXTDOMAINDIR', and 'TEXTDOMAIN' +shell variables, as explained below. See the gettext documentation for +additional details not covered here. If the current locale is 'C' or +'POSIX', if there are no translations available, of if the string is not +translated, the dollar sign is ignored. Since this is a form of double +quoting, the string remains double-quoted by default, whether or not it +is translated and replaced. If the 'noexpand_translation' option is +enabled using the 'shopt' builtin (*note The Shopt Builtin::), +translated strings are single-quoted instead of double-quoted. + + The rest of this section is a brief overview of how you use gettext +to create translations for strings in a shell script named SCRIPTNAME. +There are more details in the gettext documentation. + + +File: bashref.info, Node: Creating Internationalized Scripts, Up: Locale Translation + +Once you've marked the strings in your script that you want to translate +using $"...", you create a gettext "template" file using the command + + bash --dump-po-strings SCRIPTNAME > DOMAIN.pot + +The DOMAIN is your "message domain". It's just an arbitrary string +that's used to identify the files gettext needs, like a package or +script name. It needs to be unique among all the message domains on +systems where you install the translations, so gettext knows which +translations correspond to your script. You'll use the template file to +create translations for each target language. The template file +conventionally has the suffix '.pot'. + + You copy this template file to a separate file for each target +language you want to support (called "PO" files, which use the suffix +'.po'). PO files use various naming conventions, but when you are +working to translate a template file into a particular language, you +first copy the template file to a file whose name is the language you +want to target, with the '.po' suffix. For instance, the Spanish +translations of your strings would be in a file named 'es.po', and to +get started using a message domain named "example," you would run + + cp example.pot es.po + +Ultimately, PO files are often named DOMAIN.po and installed in +directories that contain multiple translation files for a particular +language. + + Whichever naming convention you choose, you will need to translate +the strings in the PO files into the appropriate languages. This has to +be done manually. + + When you have the translations and PO files complete, you'll use the +gettext tools to produce what are called "MO" files, which are compiled +versions of the PO files the gettext tools use to look up translations +efficiently. MO files are also called "message catalog" files. You use +the 'msgfmt' program to do this. For instance, if you had a file with +Spanish translations, you could run + + msgfmt -o es.mo es.po + +to produce the corresponding MO file. + + Once you have the MO files, you decide where to install them and use +the 'TEXTDOMAINDIR' shell variable to tell the gettext tools where they +are. Make sure to use the same message domain to name the MO files as +you did for the PO files when you install them. + + Your users will use the 'LANG' or 'LC_MESSAGES' shell variables to +select the desired language. + + You set the 'TEXTDOMAIN' variable to the script's message domain. As +above, you use the message domain to name your translation files. + + You, or possibly your users, set the 'TEXTDOMAINDIR' variable to the +name of a directory where the message catalog files are stored. If you +install the message files into the system's standard message catalog +directory, you don't need to worry about this variable. + + The directory where the message catalog files are stored varies +between systems. Some 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 the '.mo' suffix. If you use the 'TEXTDOMAIN' variable, you may +need to set the 'TEXTDOMAINDIR' variable to the location of the message +catalog files, as above. It's common to use both variables in this +fashion: '$TEXTDOMAINDIR'/'$LC_MESSAGES'/LC_MESSAGES/'$TEXTDOMAIN'.mo. + + If you used that last convention, and you wanted to store the message +catalog files with Spanish (es) and Esperanto (eo) translations into a +local directory you use for custom translation files, you could run + + TEXTDOMAIN=example + TEXTDOMAINDIR=/usr/local/share/locale + + cp es.mo ${TEXTDOMAINDIR}/es/LC_MESSAGES/${TEXTDOMAIN}.mo + cp eo.mo ${TEXTDOMAINDIR}/eo/LC_MESSAGES/${TEXTDOMAIN}.mo + + When all of this is done, and the message catalog files containing +the compiled translations are installed in the correct location, your +users will be able to see translated strings in any of the supported +languages by setting the 'LANG' or 'LC_MESSAGES' environment variables +before running your script. + + +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: + +* Reserved Words:: Words that have special meaning to the shell. +* 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. +* GNU Parallel:: Running commands in parallel. + + +File: bashref.info, Node: Reserved Words, Next: Simple Commands, Up: Shell Commands + +3.2.1 Reserved Words +-------------------- + +Reserved words are words that have special meaning to the shell. They +are used to begin and end the shell's compound commands. + + The following words are recognized as reserved when unquoted and the +first word of a command (see below for exceptions): + +'if' 'then' 'elif' 'else' 'fi' 'time' +'for' 'in' 'until' 'while' 'do' 'done' +'case' 'esac' 'coproc''select''function' +'{' '}' '[[' ']]' '!' + +'in' is recognized as a reserved word if it is the third word of a +'case' or 'select' command. 'in' and 'do' are recognized as reserved +words if they are the third word in a 'for' command. + + +File: bashref.info, Node: Simple Commands, Next: Pipelines, Prev: Reserved Words, Up: Shell Commands + +3.2.2 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.3 Pipelines +--------------- + +A 'pipeline' is a sequence of one or more 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 COMMAND1. + + If '|&' is used, COMMAND1's standard error, in addition to its +standard output, is connected to COMMAND2's standard input through the +pipe; it is shorthand for '2>&1 |'. This implicit redirection of the +standard error to the standard output is performed after any +redirections specified by COMMAND1. + + 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. When the shell is in POSIX mode (*note Bash POSIX +Mode::), it does not recognize 'time' as a reserved word if the next +token begins with a '-'. 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. + + When the shell is in POSIX mode (*note Bash POSIX Mode::), 'time' may +be followed by a newline. In this case, the shell displays the total +user and system time consumed by the shell and its children. The +'TIMEFORMAT' variable may be used to specify the format of the time +information. + + If the pipeline is not executed asynchronously (*note Lists::), the +shell waits for all commands in the pipeline to complete. + + Each command in a multi-command pipeline, where pipes are created, is +executed in its own "subshell", which is a separate process (*note +Command Execution Environment::). If the 'lastpipe' option is enabled +using the 'shopt' builtin (*note The Shopt Builtin::), the last element +of a pipeline may be run by the shell process when job control is not +active. + + 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.4 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", and these are referred to as +"asynchronous" commands. 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 (success). + + 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.5 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 language 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. + + In most cases a list of commands in a compound command's description +may be separated from the rest of the command by one or more newlines, +and may be followed by a newline in place of a semicolon. + + 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.5.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 (*note Shell Expansions::), 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 COMMANDS 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.5.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. The match is performed + according to the rules described below in *note Pattern Matching::. + If the 'nocasematch' shell option (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 (*note Shell + Parameter Expansion::) before matching is attempted. Each PATTERN + undergoes tilde expansion, parameter expansion, command + substitution, arithmetic expansion, process substitution, and quote + removal. + + 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. It's a common idiom + to use '*' as the final pattern to define the default case, since + that pattern will always match. + + 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, continuing the case + statement execution as if the pattern list had not matched. + + 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, and 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. 'select' then displays the 'PS3' prompt and + reads a line 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 and returns 1. 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::). The EXPRESSION + undergoes the same expansions as if it were within double quotes, + but double quote characters in EXPRESSION are not treated specially + are removed. If the value of the expression is non-zero, the + return status is 0; otherwise the return status is 1. + +'[[...]]' + [[ 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::. + The words between the '[[' and ']]' do not undergo word splitting + and filename expansion. The shell performs tilde expansion, + parameter and variable expansion, arithmetic expansion, command + substitution, process substitution, and quote removal on those + words (the expansions that would occur if the words were enclosed + in double quotes). 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::, as if the + 'extglob' shell option were enabled. The '=' operator is identical + to '=='. If the 'nocasematch' shell option (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. + + If you quote any part of the pattern, using any of the shell's + quoting mechanisms, the quoted portion is matched literally. This + means every character in the quoted portion matches itself, instead + of having any special pattern matching meaning. + + An additional binary operator, '=~', is available, with the same + precedence as '==' and '!='. When you use '=~', the string to the + right of the operator is considered a POSIX extended regular + expression pattern and matched accordingly (using the POSIX + 'regcomp' and 'regexec' interfaces usually described in regex(3)). + The return value is 0 if the string matches the pattern, and 1 if + it does not. If the regular expression is syntactically incorrect, + the conditional expression returns 2. If the 'nocasematch' shell + option (see the description of 'shopt' in *note The Shopt + Builtin::) is enabled, the match is performed without regard to the + case of alphabetic characters. + + You can quote any part of the pattern to force the quoted portion + to be matched literally instead of as a regular expression (see + above). If the pattern is stored in a shell variable, quoting the + variable expansion forces the entire pattern to be matched + literally. + + The pattern will match if it matches any part of the string. If + you want to force the pattern to match the entire string, anchor + the pattern using the '^' and '$' regular expression operators. + + For example, the following will match a line (stored in the shell + variable 'line') if there is a sequence of characters anywhere in + the value consisting of any number, including zero, of characters + in the 'space' character class, immediately followed by zero or one + instances of 'a', then a 'b': + + [[ $line =~ [[:space:]]*(a)?b ]] + + That means values for 'line' like 'aab', ' aaaaaab', 'xaby', and ' + ab' will all match, as will a line containing a 'b' anywhere in its + value. + + If you want to match a character that's special to the regular + expression grammar ('^$|[]()\.*+?'), it has to be quoted to remove + its special meaning. This means that in the pattern 'xxx.txt', the + '.' matches any character in the string (its usual regular + expression meaning), but in the pattern '"xxx.txt"', it can only + match a literal '.'. + + Likewise, if you want to include a character in your pattern that + has a special meaning to the regular expression grammar, you must + make sure it's not quoted. If you want to anchor a pattern at the + beginning or end of the string, for instance, you cannot quote the + '^' or '$' characters using any form of shell quoting. + + If you want to match 'initial string' at the start of a line, the + following will work: + [[ $line =~ ^"initial string" ]] + but this will not: + [[ $line =~ "^initial string" ]] + because in the second example the '^' is quoted and doesn't have + its usual special meaning. + + It is sometimes difficult to specify a regular expression properly + without using quotes, or to keep track of the quoting used by + regular expressions while paying attention to shell quoting and the + shell's quote removal. Storing the regular expression in a shell + variable is often a useful way to avoid problems with quoting + characters that are special to the shell. For example, the + following is equivalent to the pattern used above: + + pattern='[[:space:]]*(a)?b' + [[ $line =~ $pattern ]] + + Shell programmers should take special care with backslashes, since + backslashes are used by both the shell and regular expressions to + remove the special meaning from the following character. This + means that after the shell's word expansions complete (*note Shell + Expansions::), any backslashes remaining in parts of the pattern + that were originally not quoted can remove the special meaning of + pattern characters. If any part of the pattern is quoted, the + shell does its best to ensure that the regular expression treats + those remaining backslashes as literal, if they appeared in a + quoted portion. + + The following two sets of commands are _not_ equivalent: + + pattern='\.' + + [[ . =~ $pattern ]] + [[ . =~ \. ]] + + [[ . =~ "$pattern" ]] + [[ . =~ '\.' ]] + + The first two matches will succeed, but the second two will not, + because in the second two the backslash will be part of the pattern + to be matched. In the first two examples, the pattern passed to + the regular expression parser is '\.'. The backslash removes the + special meaning from '.', so the literal '.' matches. In the + second two examples, the pattern passed to the regular expression + parser has the backslash quoted (e.g., '\\\.'), which will not + match the string, since it does not contain a backslash. If the + string in the first examples were anything other than '.', say 'a', + the pattern would not match, because the quoted '.' in the pattern + loses its special meaning of matching any single character. + + Bracket expressions in regular expressions can be sources of errors + as well, since characters that are normally special in regular + expressions lose their special meanings between brackets. However, + you can use bracket expressions to match special pattern characters + without quoting them, so they are sometimes useful for this + purpose. + + Though it might seem like a strange way to write it, the following + pattern will match a '.' in the string: + + [[ . =~ [.] ]] + + The shell performs any word expansions before passing the pattern + to the regular expression functions, so you can assume that the + shell's quoting takes precedence. As noted above, the regular + expression parser will interpret any unquoted backslashes remaining + in the pattern after shell expansion according to its own rules. + The intention is to avoid making shell programmers quote things + twice as much as possible, so shell quoting should be sufficient to + quote special pattern characters where that's necessary. + + The array variable 'BASH_REMATCH' records which parts of the string + matched the pattern. The element of 'BASH_REMATCH' with index 0 + contains the portion of the string matching the entire regular + expression. Substrings matched by parenthesized subexpressions + within the regular expression are saved in the remaining + 'BASH_REMATCH' indices. The element of 'BASH_REMATCH' with index N + is the portion of the string matching the Nth parenthesized + subexpression. + + Bash sets 'BASH_REMATCH' in the global scope; declaring it as a + local variable will lead to unexpected results. + + 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.5.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 forces the shell to + create a subshell (*note Command Execution Environment::), and each + of the commands in LIST is executed in that subshell environment. + 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, Next: GNU Parallel, Prev: Compound Commands, Up: Shell Commands + +3.2.6 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 syntax for a coprocess is: + + coproc [NAME] COMMAND [REDIRECTIONS] + +This creates a coprocess named NAME. COMMAND may be either a simple +command (*note Simple Commands::) or a compound command (*note Compound +Commands::). NAME is a shell variable name. If NAME is not supplied, +the default name is 'COPROC'. + + The recommended form to use for a coprocess is + + coproc NAME { COMMAND; } + +This form is recommended because simple commands result in the coprocess +always being named 'COPROC', and it is simpler to use and more complete +than the other compound commands. + + There are other forms of coprocesses: + + coproc NAME COMPOUND-COMMAND + coproc COMPOUND-COMMAND + coproc SIMPLE-COMMAND + +If COMMAND is a compound command, NAME is optional. The word following +'coproc' determines whether that word is interpreted as a variable name: +it is interpreted as NAME if it is not a reserved word that introduces a +compound command. If COMMAND is a simple command, NAME is not allowed; +this is to avoid confusion between NAME and the first word of the simple +command. + + When the coprocess 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. Other than those created to execute command and +process substitutions, the file descriptors are not available in +subshells. + + 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. + + Since the coprocess is created as an asynchronous command, the +'coproc' command always returns success. The return status of a +coprocess is the exit status of COMMAND. + + +File: bashref.info, Node: GNU Parallel, Prev: Coprocesses, Up: Shell Commands + +3.2.7 GNU Parallel +------------------ + +There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. + + GNU Parallel, as its name suggests, can be used to build and run +commands in parallel. You may run the same command with different +arguments, whether they are filenames, usernames, hostnames, or lines +read from files. GNU Parallel provides shorthand references to many of +the most common operations (input lines, various portions of the input +line, different ways to specify the input source, and so on). Parallel +can replace 'xargs' or feed commands from its input sources to several +different instances of Bash. + + For a complete description, refer to the GNU Parallel documentation, +which is available at +. + + +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: + FNAME () COMPOUND-COMMAND [ REDIRECTIONS ] + + or + + function FNAME [()] COMPOUND-COMMAND [ REDIRECTIONS ] + + This defines a shell function named FNAME. 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. If the 'function' reserved word is used, +but the parentheses are not supplied, the braces are recommended. +COMPOUND-COMMAND is executed whenever FNAME is specified as the name of +a simple command. When the shell is in POSIX mode (*note Bash POSIX +Mode::), FNAME must be a valid shell name and may not be the same as one +of the special builtins (*note Special Builtins::). In default mode, a +function name can be any unquoted shell word that does not contain '$'. +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. + + The 'FUNCNEST' variable, if set to a numeric value greater than 0, +defines a maximum function nesting level. Function invocations that +exceed the limit cause the entire command to abort. + + 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 ("local variables"). Ordinarily, variables and their values are +shared between a function and its caller. These variables are visible +only to the function and the commands it invokes. This is particularly +important when a shell function calls other functions. + + In the following description, the "current scope" is a currently- +executing function. Previous scopes consist of that function's caller +and so on, back to the "global" scope, where the shell is not executing +any shell function. Consequently, a local variable at the current local +scope is a variable declared using the 'local' or 'declare' builtins in +the function that is currently executing. + + Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. + + The shell uses "dynamic scoping" to control a variable's visibility +within functions. With dynamic scoping, visible variables and their +values are a result of the sequence of function calls that caused +execution to reach the current function. The value of a variable that a +function sees depends on its value within its caller, if any, whether +that caller is the "global" scope or another shell function. This is +also the value that a local variable declaration "shadows", and the +value that is restored when the function returns. + + For example, if a variable 'var' is declared as local in function +'func1', and 'func1' calls another function 'func2', references to 'var' +made from within 'func2' will resolve to the local variable 'var' from +'func1', shadowing any global variable named 'var'. + + The following script demonstrates this behavior. When executed, the +script displays + + In func2, var = func1 local + + func1() + { + local var='func1 local' + func2 + } + + func2() + { + echo "In func2, var = $var" + } + + var=global + func1 + + The 'unset' builtin also acts using the same dynamic scope: if a +variable is local to the current scope, 'unset' will unset it; otherwise +the unset will refer to the variable found in any calling scope as +described above. If a variable at the current local scope is unset, it +will remain so (appearing as unset) until it is reset in that scope or +until the function returns. Once the function returns, any instance of +the variable at a previous scope will become visible. If the unset acts +on a variable at a previous scope, any instance of a variable with that +name that had been shadowed will become visible (see below how +'localvar_unset'shell option changes this behavior). + + Function names and definitions may be listed with the '-f' option to +the 'declare' ('typeset') builtin command (*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 child shell +processes (those created when executing a separate shell invocation) +automatically have them defined with the '-f' option to the 'export' +builtin (*note Bourne Shell Builtins::). + + Functions may be recursive. The 'FUNCNEST' variable may be used to +limit the depth of the function call stack and restrict the number of +function invocations. By default, 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 (*note +Shell Parameter Expansion::). 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 and filename expansion are not performed. Assignment +statements may also appear as arguments to the 'alias', 'declare', +'typeset', 'export', 'readonly', and 'local' builtin commands +("declaration" commands). When in POSIX mode (*note Bash POSIX Mode::), +these builtins may appear in a command after one or more instances of +the 'command' builtin and retain these assignment statement properties. + + 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. This +includes arguments to builtin commands such as 'declare' that accept +assignment statements (declaration commands). 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. + + A variable can be assigned the 'nameref' attribute using the '-n' +option to the 'declare' or 'local' builtin commands (*note Bash +Builtins::) to create a "nameref", or a reference to another variable. +This allows variables to be manipulated indirectly. Whenever the +nameref variable is referenced, assigned to, unset, or has its +attributes modified (other than using or changing the nameref attribute +itself), the operation is actually performed on the variable specified +by the nameref variable's value. A nameref is commonly used within +shell functions to refer to a variable whose name is passed as an +argument to the function. For instance, if a variable name is passed to +a shell function as its first argument, running + declare -n ref=$1 +inside the function creates a nameref variable 'ref' whose value is the +variable name passed as the first argument. References and assignments +to 'ref', and changes to its attributes, are treated as references, +assignments, and attribute modifications to the variable whose name was +passed as '$1'. + + If the control variable in a 'for' loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. Namerefs can be unset using the '-n' option to the +'unset' builtin (*note Bourne Shell Builtins::). Otherwise, if 'unset' +is executed with the name of a nameref variable as an argument, the +variable referenced by the nameref variable will be unset. + + +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 is not within double quotes, each positional + parameter expands to a separate word. In contexts where it is + performed, those words are subject to further word splitting and + filename expansion. 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. In + contexts where word splitting is performed, this expands each + positional parameter to a separate word; if not within double + quotes, these words are subject to word splitting. In contexts + where word splitting is not performed, this expands to a single + word with each positional parameter separated by a space. When the + expansion occurs within double quotes, and word splitting is + performed, 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 job most recently placed + into the background, whether executed as an asynchronous command or + using the 'bg' builtin (*note Job Control Builtins::). + +'0' + ($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. + + +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 and variable expansion, 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 tilde, parameter, variable, and arithmetic expansion and command +substitution. + + After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +("quote removal"). + + Only brace expansion, word splitting, and filename expansion can +increase 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 '$*' (*note Special Parameters::), and +'"${NAME[@]}"' 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 filenames 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 sequence +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 letters, 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 +letters are supplied, the expression expands to each character +lexicographically between X and Y, inclusive, using the default C +locale. Note that both X and Y must be of the same type (integer or +letter). 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. + + 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, and inhibits brace expansion until the closing '}'. + + 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 filenames 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' + + Bash also performs tilde expansion on words satisfying the conditions +of variable assignments (*note Shell Parameters::) when they appear as +arguments to simple commands. Bash does not do this, except for the +declaration commands listed above, when in POSIX mode. + + +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 PARAMETER is a shell parameter as +described above (*note Shell Parameters::) or an array reference (*note +Arrays::). 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 (!), and +PARAMETER is not a nameref, it introduces a level of indirection. Bash +uses the value formed by expanding the rest of PARAMETER as the new +PARAMETER; this is then expanded and that value is used in the rest of +the expansion, rather than the expansion of the original PARAMETER. +This is known as 'indirect expansion'. The value is subject to tilde +expansion, parameter expansion, command substitution, and arithmetic +expansion. If PARAMETER is a nameref, this expands to the name of the +variable referenced by PARAMETER instead of performing the complete +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 (e.g., ':-'), 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. + + $ v=123 + $ echo ${v-unset} + 123 + +'${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. + + $ var= + $ : ${var:=DEFAULT} + $ echo $var + DEFAULT + +'${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. + + $ var= + $ : ${var:?var is unset or null} + bash: var: var is unset or null + +'${PARAMETER:+WORD}' + If PARAMETER is null or unset, nothing is substituted, otherwise + the expansion of WORD is substituted. + + $ var=123 + $ echo ${var:+var is set and not null} + var is set and not null + +'${PARAMETER:OFFSET}' +'${PARAMETER:OFFSET:LENGTH}' + This is referred to as Substring Expansion. It expands to up to + LENGTH characters of the value of PARAMETER starting at the + character specified by OFFSET. If PARAMETER is '@' or '*', an + indexed array subscripted by '@' or '*', or an associative array + name, the results differ as described below. If LENGTH is omitted, + it expands to the substring of the value of PARAMETER starting at + the character specified by OFFSET and extending to the end of the + value. LENGTH and OFFSET are arithmetic expressions (*note Shell + Arithmetic::). + + If OFFSET evaluates to a number less than zero, the value is used + as an offset in characters from the end of the value of PARAMETER. + If LENGTH evaluates to a number less than zero, it is interpreted + as an offset in characters from the end of the value of PARAMETER + rather than a number of characters, and the expansion is the + characters between OFFSET and that result. Note that a negative + offset must be separated from the colon by at least one space to + avoid being confused with the ':-' expansion. + + Here are some examples illustrating substring expansion on + parameters and subscripted arrays: + + $ string=01234567890abcdefgh + $ echo ${string:7} + 7890abcdefgh + $ echo ${string:7:0} + + $ echo ${string:7:2} + 78 + $ echo ${string:7:-2} + 7890abcdef + $ echo ${string: -7} + bcdefgh + $ echo ${string: -7:0} + + $ echo ${string: -7:2} + bc + $ echo ${string: -7:-2} + bcdef + $ set -- 01234567890abcdefgh + $ echo ${1:7} + 7890abcdefgh + $ echo ${1:7:0} + + $ echo ${1:7:2} + 78 + $ echo ${1:7:-2} + 7890abcdef + $ echo ${1: -7} + bcdefgh + $ echo ${1: -7:0} + + $ echo ${1: -7:2} + bc + $ echo ${1: -7:-2} + bcdef + $ array[0]=01234567890abcdefgh + $ echo ${array[0]:7} + 7890abcdefgh + $ echo ${array[0]:7:0} + + $ echo ${array[0]:7:2} + 78 + $ echo ${array[0]:7:-2} + 7890abcdef + $ echo ${array[0]: -7} + bcdefgh + $ echo ${array[0]: -7:0} + + $ echo ${array[0]: -7:2} + bc + $ echo ${array[0]: -7:-2} + bcdef + + If PARAMETER is '@' or '*', the result is LENGTH positional + parameters beginning at OFFSET. A negative OFFSET is taken + relative to one greater than the greatest positional parameter, so + an offset of -1 evaluates to the last positional parameter. It is + an expansion error if LENGTH evaluates to a number less than zero. + + The following examples illustrate substring expansion using + positional parameters: + + $ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:7} + 7 8 9 0 a b c d e f g h + $ echo ${@:7:0} + + $ echo ${@:7:2} + 7 8 + $ echo ${@:7:-2} + bash: -2: substring expression < 0 + $ echo ${@: -7:2} + b c + $ echo ${@:0} + ./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${@:0:2} + ./bash 1 + $ echo ${@: -7:0} + + + 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. It is an + expansion error if LENGTH evaluates to a number less than zero. + + These examples show how you can use substring expansion with + indexed arrays: + + $ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h) + $ echo ${array[@]:7} + 7 8 9 0 a b c d e f g h + $ echo ${array[@]:7:2} + 7 8 + $ echo ${array[@]: -7:2} + b c + $ echo ${array[@]: -7:-2} + bash: -2: substring expression < 0 + $ echo ${array[@]:0} + 0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h + $ echo ${array[@]:0:2} + 0 1 + $ echo ${array[@]: -7:0} + + + Substring expansion applied to an associative array produces + undefined results. + + 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, '$0' 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. If PARAMETER is an indexed array name + subscripted by a negative number, that number is interpreted as + relative to one greater than the maximum index of PARAMETER, so + negative indices count back from the end of the array, and an index + of -1 references the last element. + +'${PARAMETER#WORD}' +'${PARAMETER##WORD}' + The WORD is expanded to produce a pattern and matched according to + the rules described below (*note Pattern Matching::). 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 and matched according to + the rules described below (*note Pattern Matching::). 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}' +'${PARAMETER//PATTERN/STRING}' +'${PARAMETER/#PATTERN/STRING}' +'${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. STRING undergoes tilde + expansion, parameter and variable expansion, arithmetic expansion, + command and process substitution, and quote removal. The match is + performed according to the rules described below (*note Pattern + Matching::). + + In the first form above, only the first match is replaced. If + there are two slashes separating PARAMETER and PATTERN (the second + form above), all matches of PATTERN are replaced with STRING. If + PATTERN is preceded by '#' (the third form above), it must match at + the beginning of the expanded value of PARAMETER. If PATTERN is + preceded by '%' (the fourth form above), it must match at the end + of the expanded value of PARAMETER. If the expansion of STRING is + null, matches of PATTERN are deleted. If STRING is null, matches + of PATTERN are deleted and the '/' following PATTERN may be + omitted. + + If the 'patsub_replacement' shell option is enabled using 'shopt', + any unquoted instances of '&' in STRING are replaced with the + matching portion of PATTERN. This is intended to duplicate a + common 'sed' idiom. + + Quoting any part of STRING inhibits replacement in the expansion of + the quoted portion, including replacement strings stored in shell + variables. Backslash will escape '&' in STRING; the backslash is + removed in order to permit a literal '&' in the replacement string. + Users should take care if STRING is double-quoted to avoid unwanted + interactions between the backslash and double-quoting, since + backslash has special meaning within double quotes. Pattern + substitution performs the check for unquoted '&' after expanding + STRING, so users should ensure to properly quote any occurrences of + '&' they want to be taken literally in the replacement and ensure + any instances of '&' they want to be replaced are unquoted. + + For instance, + + var=abcdef + rep='& ' + echo ${var/abc/& } + echo "${var/abc/& }" + echo ${var/abc/$rep} + echo "${var/abc/$rep}" + + will display four lines of "abc def", while + + var=abcdef + rep='& ' + echo ${var/abc/\& } + echo "${var/abc/\& }" + echo ${var/abc/"& "} + echo ${var/abc/"$rep"} + + will display four lines of "& def". Like the pattern removal + operators, double quotes surrounding the replacement string quote + the expanded characters, while double quotes enclosing the entire + parameter substitution do not, since the expansion is performed in + a context that doesn't take any enclosing double quotes into + account. + + Since backslash can escape '&', it can also escape a backslash in + the replacement string. This means that '\\' will insert a literal + backslash into the replacement, so these two 'echo' commands + + var=abcdef + rep='\\&xyz' + echo ${var/abc/\\&xyz} + echo ${var/abc/$rep} + + will both output '\abcxyzdef'. + + It should rarely be necessary to enclose only STRING in double + quotes. + + If the 'nocasematch' shell option (see the description of 'shopt' + in *note The Shopt Builtin::) is enabled, the match is performed + without regard to the case of alphabetic characters. 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. Each character in the expanded value of + PARAMETER is tested against PATTERN, and, if it matches the + pattern, its case is converted. The pattern should not attempt to + match more than one character. + + 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. + +'${PARAMETER@OPERATOR}' + The expansion is either a transformation of the value of PARAMETER + or information about PARAMETER itself, depending on the value of + OPERATOR. Each OPERATOR is a single letter: + + 'U' + The expansion is a string that is the value of PARAMETER with + lowercase alphabetic characters converted to uppercase. + 'u' + The expansion is a string that is the value of PARAMETER with + the first character converted to uppercase, if it is + alphabetic. + 'L' + The expansion is a string that is the value of PARAMETER with + uppercase alphabetic characters converted to lowercase. + 'Q' + The expansion is a string that is the value of PARAMETER + quoted in a format that can be reused as input. + 'E' + The expansion is a string that is the value of PARAMETER with + backslash escape sequences expanded as with the '$'...'' + quoting mechanism. + 'P' + The expansion is a string that is the result of expanding the + value of PARAMETER as if it were a prompt string (*note + Controlling the Prompt::). + 'A' + The expansion is a string in the form of an assignment + statement or 'declare' command that, if evaluated, will + recreate PARAMETER with its attributes and value. + 'K' + Produces a possibly-quoted version of the value of PARAMETER, + except that it prints the values of indexed and associative + arrays as a sequence of quoted key-value pairs (*note + Arrays::). + 'a' + The expansion is a string consisting of flag values + representing PARAMETER's attributes. + 'k' + Like the 'K' transformation, but expands the keys and values + of indexed and associative arrays to separate words after word + splitting. + + If PARAMETER is '@' or '*', the 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 operation is applied to each member of the array in turn, + and the expansion is the resultant list. + + The result of the expansion is subject to word splitting and + filename expansion as described below. + + +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 in a subshell +environment 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 undergoes the same expansions as if it were within +double quotes, but double quote characters in EXPRESSION are not treated +specially and are removed. All tokens in the expression undergo +parameter and variable expansion, command substitution, and quote +removal. The result is treated as the arithmetic expression to be +evaluated. 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 allows a process's input or output to be referred +to using a filename. It takes the form of + <(LIST) +or + >(LIST) +The process LIST is run asynchronously, and its input or output appears +as a filename. This filename 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. Process substitution is supported on systems that +support named pipes (FIFOs) or the '/dev/fd' method of naming open +files. + + 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 using these characters as +field terminators. If 'IFS' is unset, or its value is exactly +'', the default, then sequences of ' ', +'', and '' 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', 'tab', and 'newline' 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 and passed to +commands as empty strings. 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 and passed to a command as an empty +string. When a quoted null argument appears as part of a word whose +expansion is non-null, the null argument is removed. That is, the word +'-d''' becomes '-d' after word splitting and null argument removal. + + 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, and is not quoted, then the word is +regarded as a PATTERN, and replaced with an alphabetically sorted list +of filenames matching the pattern (*note Pattern Matching::). If no +matching filenames 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. In order to match +the filenames '.' and '..', the pattern must begin with '.' (for +example, '.?'), even if 'dotglob' is set. If the 'globskipdots' shell +option is enabled, the filenames '.' and '..' are never matched, even if +the pattern begins with a '.'. When not matching filenames, the '.' +character is not treated specially. + + When matching a filename, the slash character must always be matched +explicitly by a slash in the pattern, but in other matching contexts it +can be matched by a special pattern character as described below (*note +Pattern Matching::). + + See the description of 'shopt' in *note The Shopt Builtin::, for a +description of the 'nocaseglob', 'nullglob', 'globskipdots', 'failglob', +and 'dotglob' options. + + The 'GLOBIGNORE' shell variable may be used to restrict the set of +file names matching a pattern. If 'GLOBIGNORE' is set, each matching +file name that also matches one of the patterns in 'GLOBIGNORE' is +removed from the list of matches. If the 'nocaseglob' option is set, +the matching against the patterns in 'GLOBIGNORE' is performed without +regard to case. 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 falls 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, and the + characters included in the range, are determined by the current + locale and the values of the 'LC_COLLATE' and 'LC_ALL' shell + variables, 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 '[aBbCcDdxYyZz]', 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', or enable the 'globasciiranges' shell option. + + 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, +the shell recognizes several extended pattern matching operators. In +the following description, a PATTERN-LIST is a list of one or more +patterns separated by a '|'. When matching filenames, the 'dotglob' +shell option determines the set of filenames that are tested, as +described above. 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. + + The 'extglob' option changes the behavior of the parser, since the +parentheses are normally treated as operators with syntactic meaning. +To ensure that extended matching patterns are parsed correctly, make +sure that 'extglob' is enabled before parsing constructs containing the +patterns, including shell functions and command substitutions. + + When matching filenames, the 'dotglob' shell option determines the +set of filenames that are tested: when 'dotglob' is enabled, the set of +filenames includes all files beginning with '.', but the filenames '.' +and '..' must be matched by a pattern or sub-pattern that begins with a +dot; when it is disabled, the set does not include any filenames +beginning with "." unless the pattern or sub-pattern begins with a '.'. +As above, '.' only has a special meaning when matching filenames. + + Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. Using separate matches against shorter +strings, or using arrays of strings instead of a single long string, may +be faster. + + +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" allows +commands' file handles to be duplicated, opened, closed, made to refer +to different files, and can change the files the command reads from and +writes to. Redirection may also be used to modify file handles in 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. If {VARNAME} is supplied, the redirection persists +beyond the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. The 'varredir_close' shell +option manages this behavior (*note The Shopt Builtin::). + + 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. If the operating +system on which Bash is running provides these special files, bash will +use them; otherwise it will emulate them internally with the behavior +described below. + +'/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 the + corresponding TCP 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 the + corresponding UDP 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 + + 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 + When using the second form, WORD may not expand to a number or '-'. +If it does, other redirection operators apply (see Duplicating File +Descriptors below) for compatibility reasons. + +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 + (see Duplicating File Descriptors below). + +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 (or file descriptor N if N is specified) for a +command. + + The format of here-documents is: + [N]<<[-]WORD + HERE-DOCUMENT + DELIMITER + + No parameter and variable expansion, command substitution, arithmetic +expansion, or filename expansion is performed on WORD. If any part of +WORD is 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, 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: + [N]<<< WORD + + The WORD undergoes tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. Filename +expansion and word splitting are not performed. The result is supplied +as a single string, with a newline appended, to the command on its +standard input (or file descriptor N if N is specified). + +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. If WORD evaluates to '-', file descriptor N +is closed. As a special case, if N is omitted, and WORD does not expand +to one or more digits or '-', 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, in the +following order. + + 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. In the case of such a command (one that +consists only of assignment statements and redirections), assignment +statements are performed before redirections. 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 in a separate execution environment + with the original command and the original command's arguments as + its arguments, and the function's exit status becomes the exit + status of that subshell. 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. + + A "subshell" is a copy of the shell process. + + 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 pathname 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, generally invalid options or missing +arguments. + + The exit status of the last command is available in the special +parameter $? (*note Special Parameters::). + + +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. + + When job control is not enabled, and Bash is waiting for a foreground +command to complete, the shell receives keyboard-generated signals such +as 'SIGINT' (usually generated by '^C') that users commonly intend to +send to that command. This happens because the shell and the command +are in the same process group as the terminal, and '^C' sends 'SIGINT' +to all processes in that process group. See *note Job Control::, for a +more in-depth discussion of process groups. + + When Bash is running without job control enabled and receives +'SIGINT' while waiting for a foreground command, it waits until that +foreground command terminates and then decides what to do about the +'SIGINT': + + 1. If the command terminates due to the 'SIGINT', Bash concludes that + the user meant to end the entire script, and acts on the 'SIGINT' + (e.g., by running a 'SIGINT' trap or exiting itself); + + 2. If the pipeline does not terminate due to 'SIGINT', the program + handled the 'SIGINT' itself and did not treat it as a fatal signal. + In that case, Bash does not treat 'SIGINT' as a fatal signal, + either, instead assuming that the 'SIGINT' was used as part of the + program's normal operation (e.g., 'emacs' uses it to abort editing + commands) or deliberately discarded. However, Bash will run any + trap set on 'SIGINT', as it does with any other trapped signal it + receives while it is waiting for the foreground command to + complete, for compatibility. + + +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 creates a new instance of itself 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 and, depending on the operating system, one +or more optional arguments for that interpreter. 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 one or more optional +arguments 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 supplied to the script. The details of how the +interpreter line is split into an interpreter name and a set of +arguments vary across systems. 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 a single argument +to a maximum of 32 characters, so it's not portable to assume that using +more than one argument will work. + + 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. It's +a common idiom to use 'env' to find 'bash' even if it's been installed +in another directory: '#!/usr/bin/env bash' will find the first +occurrence of 'bash' in '$PATH'. + + +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', 'return', +'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, but FILENAME does not need to be + executable. When Bash is not in POSIX mode, it searches the + current directory 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. If the '-T' option is enabled, '.' inherits any trap on + 'DEBUG'; if it is not, any 'DEBUG' trap string is saved and + restored around the call to '.', and '.' unsets the 'DEBUG' trap + while it executes. If '-T' is not set, and the sourced file + changes the 'DEBUG' trap, the new value is retained when '.' + completes. 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 [-e]] [-@] [DIRECTORY] + + Change the current working directory to DIRECTORY. If DIRECTORY is + not supplied, the value of the 'HOME' shell variable is used. If + the shell variable 'CDPATH' exists, it is used as a search path: + each directory name in 'CDPATH' is searched for DIRECTORY, with + alternative directory names in 'CDPATH' separated by a colon (':'). + If DIRECTORY begins with a slash, 'CDPATH' is not used. + + The '-P' option means to not follow symbolic links: symbolic links + are resolved while 'cd' is traversing DIRECTORY and before + processing an instance of '..' in DIRECTORY. + + By default, or when the '-L' option is supplied, symbolic links in + DIRECTORY are resolved after 'cd' processes an instance of '..' in + DIRECTORY. + + If '..' appears in DIRECTORY, it is processed by removing the + immediately preceding pathname component, back to a slash or the + beginning of DIRECTORY. + + If the '-e' option is supplied with '-P' and the current working + directory cannot be successfully determined after a successful + directory change, 'cd' will return an unsuccessful status. + + On systems that support it, the '-@' option presents the extended + attributes associated with a file as a directory. + + If DIRECTORY is '-', it is converted to '$OLDPWD' before the + directory change is attempted. + + 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. + + If the directory change is successful, 'cd' sets the value of the + 'PWD' environment variable to the new directory name, and sets the + 'OLDPWD' environment variable to the value of the current working + directory before the change. + + 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 COMMAND cannot be executed for some reason, a non-interactive + shell exits, unless the 'execfail' shell option is enabled. In + that case, it returns failure. An interactive shell returns + failure if the file cannot be executed. A subshell exits + unconditionally if 'exec' fails. 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 names of all + exported variables 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 [ARG ...] + + '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 whitespace. 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 supplied as ARG values, '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] + + Each time 'hash' is invoked, it remembers the full pathnames of the + 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'. Any + previously-remembered pathname is discarded. 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 [-aAf] [-p] [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 both options + are supplied, '-A' takes precedence. If no NAME arguments are + given, or if the '-p' option is supplied, a list of all readonly + names is printed. The other options may be used to restrict the + output to a subset of the set of readonly names. 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 stop executing and return the value N to + its caller. If N is not supplied, the return value is the exit + status of the last command executed in the function. If 'return' + is executed by a trap handler, the last command used to determine + the status is the last command executed before the trap handler. + If 'return' is executed during a 'DEBUG' trap, the last command + used to determine the status is the last command executed by the + trap handler before 'return' was invoked. 'return' may also be + used to terminate execution of a script being executed with the '.' + ('source') builtin, returning either N or the exit status of the + last command executed within the script as the exit status of the + script. If N is supplied, the return value is its least + significant 8 bits. 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 supplied a non-numeric + argument or 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 '$#' down 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' +'[' + test EXPR + + Evaluate a conditional expression EXPR and return a status of 0 + (true) or 1 (false). 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. Operator precedence is used when + there are five or more arguments. + + '! 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 + The following conditions are applied in the order listed. + + 1. 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. + 2. If the first argument is '!', the value is the negation + of the two-argument test using the second and third + arguments. + 3. If the first argument is exactly '(' and the third + argument is exactly ')', the result is the one-argument + test of the second argument. + 4. Otherwise, the expression is false. + + 4 arguments + The following conditions are applied in the order listed. + + 1. If the first argument is '!', the result is the negation + of the three-argument expression composed of the + remaining arguments. + 2. If the first argument is exactly '(' and the fourth + argument is exactly ')', the result is the two-argument + test of the second and third arguments. + 3. 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. + + When used with 'test' or '[', the '<' and '>' operators sort + lexicographically using ASCII ordering. + +'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 + pipeline (which may consist of a single simple command), a list, or + a compound command returns 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 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 using '!'. These are the same conditions + obeyed by the 'errexit' ('-e') 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 [-fnv] [NAME] + + Remove each variable or function NAME. If the '-v' option is + given, each NAME refers to a shell variable and that variable is + removed. If the '-f' option is given, the NAMEs refer to shell + functions, and the function definition is removed. If the '-n' + option is supplied, and NAME is a variable with the 'nameref' + attribute, NAME will be unset rather than the variable it + references. '-n' has no effect if the '-f' option is supplied. If + no options are supplied, each NAME refers to a variable; if there + is no variable by that name, a function with that name, if any, is + unset. Readonly variables and functions may not be unset. Some + shell variables lose their special behavior if they are unset; such + behavior is noted in the description of the individual variables. + The return status is zero unless a NAME is readonly or may not be + unset. + + +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] [-lpsvPSVX] + 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 [-m KEYMAP] KEYSEQ:READLINE-COMMAND + bind READLINE-COMMAND-LINE + + 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' ('vi-move' is also a synonym); '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' and 'READLINE_MARK' variables + to the current location of the insertion point and the saved + insertion point (the MARK), respectively. The shell assigns + any numeric argument the user supplied to the + 'READLINE_ARGUMENT' variable. If there was no argument, that + variable is not set. If the executed command changes the + value of any of 'READLINE_LINE', 'READLINE_POINT', or + 'READLINE_MARK', those new values will be reflected in the + editing state. + + '-X' + List all key sequences bound to shell commands and the + associated commands in a format that can be reused as input. + + 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 [-aAfFgiIlnrtux] [-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, + other than '-f' and '-F', 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 each NAME is defined are + displayed as well. '-F' implies '-f'. + + The '-g' option forces variables to be created or modified at the + global scope, even when 'declare' is executed in a shell function. + It is ignored in all other cases. + + The '-I' option causes local variables to inherit the attributes + (except the 'nameref' attribute) and value of any existing variable + with the same NAME at a surrounding scope. If there is no existing + variable, the local variable is initially unset. + + 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. + + '-n' + Give each NAME the 'nameref' attribute, making it a name + reference to another variable. That other variable is defined + by the value of NAME. All references, assignments, and + attribute modifications to NAME, except for those using or + changing the '-n' attribute itself, are performed on the + variable referenced by NAME's value. The nameref attribute + cannot be applied to array variables. + + '-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' and '+A' may not be used to destroy array + variables and '+r' will not remove the readonly attribute. When + used in a function, 'declare' makes each NAME local, as with the + 'local' command, unless the '-g' option is used. If a variable + name is followed by =VALUE, the value of the variable is set to + VALUE. + + When using '-a' or '-A' and the compound assignment syntax to + create array variables, additional attributes do not take effect + until subsequent assignments. + + 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 0 unless a write error occurs. 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' + '\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) + '\uHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHH (one to four hex digits) + '\UHHHHHHHH' + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value HHHHHHHH (one to eight 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. + Bash will use the value of the 'BASH_LOADABLES_PATH' variable as a + colon-separated list of directories in which to search for + FILENAME. The default is system-dependent. 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::). + + If no options are supplied and a NAME is not a shell builtin, + 'enable' will attempt to load NAME from a shared object named NAME, + as if the command were 'enable -f NAME NAME'. + + 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. If NAME is '-', the set of shell options is made + local to the function in which 'local' is invoked: shell options + changed using the 'set' builtin inside the function are restored to + their original values when the function returns. The restore is + effected as if a series of 'set' commands were executed to restore + the values that were in place before the function. 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 [-d DELIM] [-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: + + '-d' + The first character of DELIM is used to terminate each input + line, rather than newline. If DELIM is the empty string, + 'mapfile' will terminate a line when it reads a NUL character. + '-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 DELIM (default newline) from each line read. + '-u' + Read lines from file descriptor FD instead of the standard + input. + '-C' + Evaluate CALLBACK each time QUANTUM 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 and the line to be assigned to that + element as additional arguments. 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 '-v' option causes the output to be + assigned to the variable VAR rather than being printed to the + standard output. + + 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, 'printf' interprets the following + extensions: + + '%b' + Causes 'printf' to expand backslash escape sequences in the + corresponding ARGUMENT in the same way as 'echo -e' (*note + Bash Builtins::). + '%q' + Causes 'printf' to output the corresponding ARGUMENT in a + format that can be reused as shell input. + '%Q' + like '%q', but applies any supplied precision to the ARGUMENT + before quoting it. + '%(DATEFMT)T' + Causes 'printf' to output the date-time string resulting from + using DATEFMT as a format string for 'strftime'(3). The + corresponding ARGUMENT is an integer representing the number + of seconds since the epoch. Two special argument values may + be used: -1 represents the current time, and -2 represents the + time the shell was invoked. If no argument is specified, + conversion behaves as if -1 had been given. This is an + exception to the usual 'printf' behavior. + + The %b, %q, and %T directives all use the field width and precision + arguments from the format specification and write that many bytes + from (or use that wide a field for) the expanded argument, which + usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C language + constants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value is + the ASCII value of the following character. + + 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, split + into words as described above in *note Word Splitting::, and the + first word is assigned to the first NAME, the second word to the + second NAME, and so on. If there are more words than names, the + remaining words and their intervening delimiters are 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 using the same rules the shell uses for expansion + (described above in *note Word Splitting::). 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 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. If DELIM is the empty string, + 'read' will terminate a line when it reads a NUL character. + + '-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, but uses + Readline's default filename completion. + + '-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 honors 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. The + result is not split on the characters in 'IFS'; the intent is + that the variable is assigned exactly the characters read + (with the exception of backslash; see the '-r' option below). + + '-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 then 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 (or a specified number of characters) 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 'read' times out, 'read' saves any + partial input read into the specified variable NAME. If + TIMEOUT is 0, 'read' returns immediately, without trying to + read any data. The exit status is 0 if input is available on + the specified file descriptor, or the read will return EOF, + non-zero otherwise. The exit status is greater than 128 if + the timeout is exceeded. + + '-u FD' + Read input from file descriptor FD. + + If no NAMEs are supplied, the line read, without the ending + delimiter but otherwise unmodified, is assigned to the variable + 'REPLY'. The exit status is zero, unless end-of-file is + encountered, 'read' times out (in which case the status is greater + than 128), a variable assignment error (such as assigning to a + readonly variable) occurs, or an invalid file descriptor is + supplied as the argument to '-u'. + +'readarray' + readarray [-d DELIM] [-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, which + is 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 [-afFgrxilnrtux] [-p] [NAME[=VALUE] ...] + + The 'typeset' command is supplied for compatibility with the Korn + shell. It is a synonym for the 'declare' builtin command. + +'ulimit' + ulimit [-HS] -a + ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [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; no limits are set. + + '-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. + + '-k' + The maximum number of kqueues that may be allocated. + + '-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 shell, + and, on some systems, to its children. + + '-x' + The maximum number of file locks. + + '-P' + The maximum number of pseudoterminals. + + '-R' + The maximum time a real-time process can run before blocking, + in microseconds. + + '-T' + The maximum number of threads. + + If LIMIT is given, and the '-a' option is not used, LIMIT 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 more than one + resource is specified, the limit name and unit, if appropriate, are + printed before the value. 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; '-R', which is in + microseconds; '-p', which is in units of 512-byte blocks; '-P', + '-T', '-b', '-k', '-n' and '-u', which are unscaled values; and, + when in POSIX Mode (*note Bash POSIX Mode::), '-c' and '-f', which + are in 512-byte increments. + + 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-NAME] [--] [-] [ARGUMENT ...] + set [+abefhkmnptuvxBCEHPT] [+o OPTION-NAME] [--] [-] [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' + Each variable or function that is created or modified is given + the export attribute and marked 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 list (*note Lists::), or a compound command (*note Compound + Commands::) 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 '!'. If a + compound command other than a subshell returns a non-zero + status because a command failed while '-e' was being ignored, + the shell does not exit. 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. + + If a compound command or shell function executes in a context + where '-e' is being ignored, none of the commands executed + within the compound command or function body will be affected + by the '-e' setting, even if '-e' is set and a command returns + a failure status. If a compound command or shell function + sets '-e' while executing in a context where '-e' is ignored, + that setting will not have any effect until the compound + command or the command containing the function call completes. + + '-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::). All processes + run in a separate process group. When a background job + completes, the shell prints a line containing its exit status. + + '-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. + + '-r' + Enable restricted shell mode. This option cannot be unset + once it has been set. + + '-t' + Exit after reading and executing one command. + + '-u' + Treat unset variables and parameters other than the special + parameters '@' or '*', or array variables subscripted with '@' + 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 resolve 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 settings controlling optional shell behavior. + The settings can be either those listed below, or, if the '-o' + option is used, those available with the '-o' option to the 'set' + builtin command (*note The Set Builtin::). 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; if OPTNAMEs are + supplied, the output is restricted to those options. 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, 'shopt' + shows only 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: + + 'assoc_expand_once' + If set, the shell suppresses multiple evaluation of + associative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform variable + assignments, and while executing builtins that perform array + dereferencing. + + '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 external + (non-builtin) command and, if necessary, updates the values of + 'LINES' and 'COLUMNS'. This option is enabled by default. + + '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. This option is enabled by + default, but only has an effect if command history is enabled + (*note Bash History Facilities::). + + 'compat31' + 'compat32' + 'compat40' + 'compat41' + 'compat42' + 'compat43' + 'compat44' + These control aspects of the shell's compatibility mode (*note + Shell Compatibility Mode::). + + 'complete_fullquote' + If set, Bash quotes all shell metacharacters in filenames and + directory names when performing completion. If not set, Bash + removes metacharacters such as the dollar sign from the set of + characters that will be quoted in completed filenames when + these metacharacters appear in shell variable references in + words to be completed. This means that dollar signs in + variable names that expand to directories will not be quoted; + however, any dollar signs appearing in filenames will not be + quoted, either. This is active only when bash is using + backslashes to quote completed filenames. This variable is + set by default, which is the default Bash behavior in versions + through 4.2. + + 'direxpand' + If set, Bash replaces directory names with the results of word + expansion when performing filename completion. This changes + the contents of the Readline editing buffer. If not set, Bash + attempts to preserve what the user typed. + + '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. The filenames '.' and '..' + must always be matched explicitly, even if 'dotglob' is set. + + '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 at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the '--debugger' option. If set after + invocation, 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), the shell simulates a call to + 'return'. + + 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 'ERR' 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. + + 'globasciiranges' + If set, range expressions used in pattern matching bracket + expressions (*note Pattern Matching::) behave as if in the + traditional C locale when performing comparisons. That is, + the current locale's collating sequence is not taken into + account, so 'b' will not collate between 'A' and 'B', and + upper-case and lower-case ASCII characters will collate + together. + + 'globskipdots' + If set, filename expansion will never match the filenames '.' + and '..', even if the pattern begins with a '.'. This option + is enabled by default. + + 'globstar' + If set, the pattern '**' used in a filename expansion context + will match all 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::). + + 'inherit_errexit' + If set, command substitution inherits the value of the + 'errexit' option, instead of unsetting it in the subshell + environment. This option is enabled when POSIX mode is + enabled. + + '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. + + 'lastpipe' + If set, and job control is not active, the shell runs the last + command of a pipeline not executed in the background in the + current shell environment. + + '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. + + 'localvar_inherit' + If set, local variables inherit the value and attributes of a + variable of the same name that exists at a previous scope + before any new value is assigned. The 'nameref' attribute is + not inherited. + + 'localvar_unset' + If set, calling 'unset' on local variables in previous + function scopes marks them so subsequent lookups find them + unset until that function returns. This is identical to the + behavior of unsetting local variables at the current function + scope. + + '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 (*note Conditional Constructs::, when + performing pattern substitution word expansions, or when + filtering possible completions as part of programmable + completion. + + 'noexpand_translation' + If set, Bash encloses the translated results of $"..." + quoting in single quotes instead of double quotes. If the + string is not translated, this has no effect. + + 'nullglob' + If set, Bash allows filename patterns which match no files to + expand to a null string, rather than themselves. + + 'patsub_replacement' + If set, Bash expands occurrences of '&' in the replacement + string of pattern substitution to the text matched by the + pattern, as described above (*note Shell Parameter + Expansion::). This option is enabled by default. + + 'progcomp' + If set, the programmable completion facilities (*note + Programmable Completion::) are enabled. This option is + enabled by default. + + 'progcomp_alias' + If set, and programmable completion is enabled, Bash treats a + command name that doesn't have any completions as a possible + alias and attempts alias expansion. If it has an alias, Bash + attempts programmable completion using the command word + resulting from the expanded alias. + + 'promptvars' + If set, prompt strings undergo parameter expansion, command + substitution, arithmetic expansion, and quote removal after + being expanded as described below (*note Controlling the + 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. + + 'varredir_close' + If set, the shell automatically closes file descriptors + assigned using the '{varname}' redirection syntax (*note + Redirections::) instead of leaving them open when the command + completes. + + 'xpg_echo' + If set, the 'echo' builtin expands backslash-escape sequences + by default. + + +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 or directory name and the + 'MAILPATH' variable is not set, Bash informs the user of the + arrival of mail in the specified file or Maildir-format directory. + +'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 + filename 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 + Controlling the Prompt::, for the complete list of escape sequences + that are expanded before 'PS1' is displayed. + +'PS2' + The secondary prompt string. The default value is '> '. 'PS2' is + expanded in the same way as 'PS1' before being displayed. + + +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::). + +'_' + ($_, an underscore.) At shell startup, set to the 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 simple command executed in the foreground, + 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. + +'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. Assignments to + 'BASHPID' have no effect. If 'BASHPID' is unset, it loses its + special properties, even if it is subsequently reset. + +'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; however, unsetting array elements + currently does not cause aliases to be removed from the alias list. + If 'BASH_ALIASES' is unset, it loses its special properties, even + if it is subsequently reset. + +'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). Setting 'extdebug' + after the shell has started to execute a script, or referencing + this variable when 'extdebug' is not set, may result in + inconsistent values. + +'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). Setting 'extdebug' after the shell has + started to execute a script, or referencing this variable when + 'extdebug' is not set, may result in inconsistent values. + +'BASH_ARGV0' + When referenced, this variable expands to the name of the shell or + shell script (identical to '$0'; *Note Special Parameters::, for + the description of special parameter 0). Assignment to + 'BASH_ARGV0' causes the value assigned to also be assigned to '$0'. + If 'BASH_ARGV0' is unset, it loses its special properties, even if + it is subsequently reset. + +'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; however, unsetting array elements + currently does not cause command names to be removed from the hash + table. If 'BASH_CMDS' is unset, it loses its special properties, + even if it is subsequently reset. + +'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. If + 'BASH_COMMAND' is unset, it loses its special properties, even if + it is subsequently reset. + +'BASH_COMPAT' + The value is used to set the shell's compatibility level. *Note + Shell Compatibility Mode::, for a description of the various + compatibility levels and their effects. The value may be a decimal + number (e.g., 4.2) or an integer (e.g., 42) corresponding to the + desired compatibility level. If 'BASH_COMPAT' is unset or set to + the empty string, the compatibility level is set to the default for + the current version. If 'BASH_COMPAT' is set to a value that is + not one of the valid compatibility levels, the shell prints an + error message and sets the compatibility level to the default for + the current version. The valid values correspond to the + compatibility levels described below (*note Shell Compatibility + Mode::). For example, 4.2 and 42 are valid values that correspond + to the 'compat42' 'shopt' option and set the compatibility level to + 42. The current version is also a valid value. + +'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 where each corresponding member of 'FUNCNAME' was invoked. + '${BASH_LINENO[$i]}' is the line number in the source file + ('${BASH_SOURCE[$i+1]}') where '${FUNCNAME[$i]}' was called (or + '${BASH_LINENO[$i-1]}' if referenced within another shell + function). Use 'LINENO' to obtain the current line number. + +'BASH_LOADABLES_PATH' + A colon-separated list of directories in which the shell looks for + dynamically loadable builtins specified by the 'enable' command. + +'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. + +'BASH_SOURCE' + An array variable whose members are the source filenames where the + corresponding shell function names in the 'FUNCNAME' array variable + are defined. The shell function '${FUNCNAME[$i]}' is defined in + the file '${BASH_SOURCE[$i]}' and called from + '${BASH_SOURCE[$i+1]}' + +'BASH_SUBSHELL' + Incremented by one within each subshell or subshell environment + when the shell begins executing in that environment. The initial + value is 0. If 'BASH_SUBSHELL' is unset, it loses its special + properties, even if it is subsequently reset. + +'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. + +'CHILD_MAX' + Set the number of exited child status values for the shell to + remember. Bash will not allow this value to be decreased below a + POSIX-mandated minimum, and there is a maximum value (currently + 8192) that this may not exceed. The minimum value is + system-dependent. + +'COLUMNS' + Used by the 'select' command to determine the terminal width when + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell 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: , + 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::). Each array + element contains one possible completion. + +'COPROC' + An array variable created to hold the file descriptors for output + from and input to an unnamed coprocess (*note Coprocesses::). + +'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. + +'ENV' + Expanded and executed similarly to 'BASH_ENV' (*note Bash Startup + Files::) when an interactive shell is invoked in POSIX Mode (*note + Bash POSIX Mode::). + +'EPOCHREALTIME' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch as a floating point value with + micro-second granularity (see the documentation for the C library + function 'time' for the definition of Epoch). Assignments to + 'EPOCHREALTIME' are ignored. If 'EPOCHREALTIME' is unset, it loses + its special properties, even if it is subsequently reset. + +'EPOCHSECONDS' + Each time this parameter is referenced, it expands to the number of + seconds since the Unix Epoch (see the documentation for the C + library function 'time' for the definition of Epoch). Assignments + to 'EPOCHSECONDS' are ignored. If 'EPOCHSECONDS' is unset, it + loses its special properties, even if it is subsequently reset. + +'EUID' + The numeric effective user id of the current user. This variable + is readonly. + +'EXECIGNORE' + A colon-separated list of shell patterns (*note Pattern Matching::) + defining the list of filenames to be ignored by command search + using 'PATH'. Files whose full pathnames match one of these + patterns are not considered executable files for the purposes of + completion and command execution via 'PATH' lookup. This does not + affect the behavior of the '[', 'test', and '[[' commands. Full + pathnames in the command hash table are not subject to + 'EXECIGNORE'. Use this variable to ignore shared library files + that have the executable bit set, but are not executable files. + The pattern matching honors the setting of the 'extglob' shell + option. + +'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 filename whose suffix matches one of the + entries in 'FIGNORE' is excluded from the list of matched + filenames. 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 (the one with the highest index) is '"main"'. + This variable exists only when a shell function is executing. + Assignments to 'FUNCNAME' have no effect. If 'FUNCNAME' is unset, + it loses its special properties, even if it is subsequently reset. + + This variable can be used with 'BASH_LINENO' and 'BASH_SOURCE'. + Each element of 'FUNCNAME' has corresponding elements in + 'BASH_LINENO' and 'BASH_SOURCE' to describe the call stack. For + instance, '${FUNCNAME[$i]}' was called from the file + '${BASH_SOURCE[$i+1]}' at line number '${BASH_LINENO[$i]}'. The + 'caller' builtin displays the current call stack using this + information. + +'FUNCNEST' + If set to a numeric value greater than 0, defines a maximum + function nesting level. Function invocations that exceed this + nesting level will cause the current command to abort. + +'GLOBIGNORE' + A colon-separated list of patterns defining the set of file names + to be ignored by filename expansion. If a file name matched by a + filename expansion pattern also matches one of the patterns in + 'GLOBIGNORE', it is removed from the list of matches. The pattern + matching honors the setting of the 'extglob' shell option. + +'GROUPS' + An array variable containing the list of groups of which the + current user is a member. Assignments to 'GROUPS' have no effect. + 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. Assignments to 'HISTCMD' are ignored. 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, to contain no more than that number of lines by + removing the oldest entries. The history file is also truncated to + this size after writing it when a shell exits. If the value is 0, + the history file is truncated to zero size. Non-numeric values and + numeric values less than zero inhibit truncation. The shell sets + the default value to the value of 'HISTSIZE' after reading any + startup files. + +'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'. The pattern matching honors the setting of the + 'extglob' shell option. + + '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. If + the value is 0, commands are not saved in the history list. + Numeric values less than zero result in every command being saved + on the history list (there is no limit). The shell sets the + default value to 500 after reading any startup files. + +'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'. + +'INSIDE_EMACS' + If Bash finds this variable in the environment when the shell + starts, it assumes that the shell is running in an Emacs shell + buffer and may disable line editing depending on the value of + 'TERM'. + +'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. + +'LC_TIME' + This variable determines the locale category used for data and time + formatting. + +'LINENO' + The line number in the script or shell function currently + executing. If 'LINENO' is unset, it loses its special properties, + even if it is subsequently reset. + +'LINES' + Used by the 'select' command to determine the column length for + printing selection lists. Automatically set if the 'checkwinsize' + option is enabled (*note The Shopt Builtin::), or in an interactive + shell 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. + +'MAPFILE' + An array variable created to hold the text read by the 'mapfile' + builtin when no variable name is supplied. + +'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. When the shell enters POSIX mode, it sets this + variable if it was not already set. + +'PPID' + The process ID of the shell's parent process. This variable is + readonly. + +'PROMPT_COMMAND' + If this variable is set, and is an array, the value of each set + element is interpreted as a command to execute before printing the + primary prompt ('$PS1'). If this is set but not an array variable, + its value is used as a command to execute instead. + +'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 Controlling the + Prompt::). Characters removed are replaced with an ellipsis. + +'PS0' + The value of this parameter is expanded like 'PS1' and displayed by + interactive shells after reading a command and before the command + is executed. + +'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 of this parameter is expanded like 'PS1' and the expanded + 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 the expanded value 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, it expands to a random + integer between 0 and 32767. Assigning a value to this variable + seeds the random number generator. If 'RANDOM' is unset, it loses + its special properties, even if it is subsequently reset. + +'READLINE_ARGUMENT' + Any numeric argument given to a Readline command that was defined + using 'bind -x' (*note Bash Builtins:: when it was invoked. + +'READLINE_LINE' + The contents of the Readline line buffer, for use with 'bind -x' + (*note Bash Builtins::). + +'READLINE_MARK' + The position of the "mark" (saved insertion point) in the Readline + line buffer, for use with 'bind -x' (*note Bash Builtins::). The + characters between the insertion point and the mark are often + called the "region". + +'READLINE_POINT' + The position of the insertion point in the Readline line buffer, + for use with 'bind -x' (*note Bash Builtins::). + +'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. The number of seconds + at shell invocation and the current time are always determined by + querying the system clock. If 'SECONDS' is unset, it loses its + special properties, even if it is subsequently reset. + +'SHELL' + This environment variable expands to the full pathname to the + shell. 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. + +'SRANDOM' + This variable expands to a 32-bit pseudo-random number each time it + is referenced. The random number generator is not linear on + systems that support '/dev/urandom' or 'arc4random', so each + returned number has no relationship to the numbers preceding it. + The random number generator cannot be seeded, so assignments to + this variable have no effect. If 'SRANDOM' is unset, it loses its + special properties, even if it is subsequently reset. + +'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 a line of input after issuing the primary + prompt. Bash terminates after waiting for that number of seconds + if a complete line of 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 chapter 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. +* Controlling the Prompt:: Customizing the various prompt strings. +* The Restricted Shell:: A more controlled mode of shell execution. +* Bash POSIX Mode:: Making Bash behave more closely to what + the POSIX standard specifies. +* Shell Compatibility Mode:: How Bash supports behavior that was present + in earlier versions and has changed. + + +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 ...] + + All of the single-character options used with the 'set' builtin +(*note The Set Builtin::) can be used as options when the shell is +invoked. In addition, 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). + +'--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' + Read and execute commands from the first non-option argument + COMMAND_STRING, then exit. If there are arguments after the + COMMAND_STRING, the first argument is assigned to '$0' and any + remaining arguments are assigned to the positional parameters. The + assignment to '$0' sets the name of the shell, which is used in + warning and error messages. + +'-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 or when reading input through a pipe. + +'-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 filenames 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 an interactive login shell exits, or a non-interactive login +shell executes the 'exit' builtin command, 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 +filename. + + 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 network connection, as when executed by the historical +remote shell daemon, usually 'rshd', or the secure shell daemon 'sshd'. +If Bash determines it is being run non-interactively 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 neither 'rshd' nor 'sshd' +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 an 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) and without specifying the '-c' option, 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. Bash expands and + displays 'PS0' after it reads a command but before executing it. + See *note Controlling the Prompt::, for a complete list of prompt + string escape sequences. + + 4. Bash executes the values of the set elements of the + 'PROMPT_COMMAND' array variable as commands 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 a shell with history enabled 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. If the 'cdspell' shell option is enabled, the shell will attempt + simple spelling correction for directory arguments to the 'cd' + builtin (see the description of the 'cdspell' option to the 'shopt' + builtin in *note The Shopt Builtin::). The 'cdspell' option is + only effective in interactive shells. + + 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 (*note +Conditional Constructs::) and the 'test' and '[' builtin commands (*note +Bourne Shell Builtins::). The 'test' and '[' commands determine their +behavior based on the number of arguments; see the descriptions of those +commands for any other command-specific actions. + + Expressions may be unary or binary, and are formed from the following +primaries. Unary expressions are often used to examine the status of a +file. There are string operators and numeric comparison operators as +well. Bash handles several filenames specially when they are used in +expressions. If the operating system on which Bash is running provides +these special files, Bash will use them; otherwise it will emulate them +internally with this behavior: 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. The 'test' command uses ASCII ordering. + + 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. + +'-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. + +'-N FILE' + True if FILE exists and has been modified since it was last read. + +'-O FILE' + True if FILE exists and is owned by the effective user id. + +'-S FILE' + True if FILE exists and is a socket. + +'FILE1 -ef FILE2' + True if FILE1 and FILE2 refer to the same device and inode numbers. + +'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. + +'-o OPTNAME' + True if the 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::). + +'-v VARNAME' + True if the shell variable VARNAME is set (has been assigned a + value). + +'-R VARNAME' + True if the shell variable VARNAME is set and is a name reference. + +'-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. When used with the '[[' command, + this performs pattern matching as described above (*note + Conditional Constructs::). + + '=' 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. When used with the '[[' command, + ARG1 and ARG2 are evaluated as arithmetic expressions (*note Shell + Arithmetic::). + + +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 using the '((' compound command, the 'let' +builtin, or the '-i' option to the 'declare' builtin. + + 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. + + Integer constants follow the C language definition, without suffixes +or character constants. 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 the optional 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. When +specifying N, if a non-digit is required, 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 'blank', 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, use a shell function (*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, and +all lines that make up a compound command, before executing any of the +commands on that line or the compound command. 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 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. Unless otherwise noted, +indexed array indices must be non-negative integers. + + 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. 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 VALUE2 ... ) +where each VALUE may be of the form '[SUBSCRIPT]='STRING. Indexed array +assignments do not require anything but STRING. 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. + + Each VALUE in the list undergoes all the shell expansions described +above (*note Shell Expansions::). + + When assigning to an associative array, the words in a compound +assignment may be either assignment statements, for which the subscript +is required, or a list of words that is interpreted as a sequence of +alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). These +are treated identically to NAME=( [KEY1]=VALUE1 [KEY2]=VALUE2 ... ). +The first word in the list determines how the remaining words are +interpreted; all assignments in a list must be of the same type. When +using key/value pairs, the keys may not be missing or empty; a final +missing value is treated like the empty string. + + This syntax is also accepted by the 'declare' builtin. Individual +array elements may be assigned to using the 'NAME[SUBSCRIPT]=VALUE' +syntax introduced above. + + When assigning to an indexed array, if NAME is subscripted by a +negative number, that number is interpreted as relative to one greater +than the maximum index of NAME, so negative indices count back from the +end of the array, and an index of -1 references the last element. + + The '+=' operator will append to an array variable when assigning +using the compound assignment syntax; see *note Shell Parameters:: +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. If the SUBSCRIPT used to reference an +element of an indexed array evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the +array, so negative indices count back from the end of the array, and an +index of -1 refers to the last element. + + Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. Any reference to a variable using a +valid subscript is legal, and 'bash' will create an array if necessary. + + An array variable is considered set if a subscript has been assigned +a value. The null string is a valid value. + + It is possible to obtain the keys (indices) of an array as well as +the values. ${!NAME[@]} and ${!NAME[*]} expand to the indices assigned +in array variable NAME. The treatment when in double quotes is similar +to the expansion of the special parameters '@' and '*' within double +quotes. + + The 'unset' builtin is used to destroy arrays. 'unset +NAME[SUBSCRIPT]' destroys the array element at index SUBSCRIPT. +Negative subscripts to indexed arrays are interpreted as described +above. Unsetting the last element of an array variable does not unset +the variable. 'unset NAME', where NAME is an array, removes the entire +array. 'unset NAME[SUBSCRIPT]' behaves differently depending on the +array type when given a subscript of '*' or '@'. When NAME is an +associative array, it removes the element with key '*' or '@'. If NAME +is an indexed array, 'unset' removes all of the elements, but does not +remove the array itself. + + When using a variable name with a subscript as an argument to a +command, such as with 'unset', without using the word expansion syntax +described above, the argument is subject to the shell's filename +expansion. If filename expansion is not desired, the argument should be +quoted. + + 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. If both options are supplied, '-A' takes precedence. +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: Controlling the 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 +current directory is always the "top" 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 [-clpv] [+N | -N] + + 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. The current directory is always + the first directory in the stack. + + '-c' + Clears the directory stack by deleting all of the elements. + '-l' + Produces a listing using full pathnames; 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. + '+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. + +'popd' + popd [-n] [+N | -N] + + Removes elements from the directory stack. The elements are + numbered from 0 starting at the first directory listed by 'dirs'; + that is, 'popd' is equivalent to 'popd +0'. + + When no arguments are given, 'popd' removes the top directory from + the stack and changes to the new top directory. + + Arguments, if supplied, have the following meanings: + + '-n' + Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is + manipulated. + '+N' + Removes the Nth directory (counting from the left of the list + printed by 'dirs'), starting with zero, from the stack. + '-N' + Removes the Nth directory (counting from the right of the list + printed by 'dirs'), starting with zero, from the stack. + + If the top element of the directory stack is modified, and the '-n' + option was not supplied, 'popd' uses the 'cd' builtin to change to + the directory at the top of the stack. If the 'cd' fails, 'popd' + returns a non-zero value. + + Otherwise, 'popd' returns an unsuccessful status if an invalid + option is encountered, the directory stack is empty, or a + non-existent directory stack entry is specified. + + If the 'popd' command is successful, Bash runs 'dirs' to show the + final contents of the directory stack, and the return status is 0. + +'pushd' + pushd [-n] [+N | -N | DIR] + + 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, 'pushd' exchanges the top two + elements of the directory stack. + + Arguments, if supplied, have the following meanings: + + '-n' + Suppresses the normal change of directory when rotating or + 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 DIR be the top of the stack. + + After the stack has been modified, if the '-n' option was not + supplied, 'pushd' uses the 'cd' builtin to change to the directory + at the top of the stack. If the 'cd' fails, 'pushd' returns a + non-zero value. + + Otherwise, if no arguments are supplied, 'pushd' returns 0 unless + the directory stack is empty. When rotating the directory stack, + 'pushd' returns 0 unless the directory stack is empty or a + non-existent directory stack element is specified. + + If the 'pushd' command is successful, Bash runs 'dirs' to show the + final contents of the directory stack. + + +File: bashref.info, Node: Controlling the Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features + +6.9 Controlling the Prompt +========================== + +Bash examines the value of the array variable 'PROMPT_COMMAND' just +before printing each primary prompt. If any elements in +'PROMPT_COMMAND' are set and non-null, Bash executes each value, in +numeric order, 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 'PS0', 'PS1', 'PS2', and 'PS4': + +'\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 value of the 'PWD' shell variable ('$PWD'), 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 The Shopt +Builtin::). This can have unwanted side effects if escaped portions of +the string appear within command substitution or contain characters +special to word expansion. + + +File: bashref.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Controlling the 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', 'HISTFILE', + '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 + 'history' 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 'shopt -u + restricted_shell'. + + 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. + + The restricted shell mode is only one component of a useful +restricted environment. It should be accompanied by setting 'PATH' to a +value that allows execution of only a few verified commands (commands +that allow shell escapes are particularly vulnerable), changing the +current directory to a non-writable directory other than '$HOME' after +login, not allowing the restricted shell to execute shell scripts, and +cleaning the environment of variables that cause some commands to modify +their behavior (e.g., 'VISUAL' or 'PAGER'). + + Modern systems provide more secure ways to implement a restricted +environment, such as 'jails', 'zones', or 'containers'. + + +File: bashref.info, Node: Bash POSIX Mode, Next: Shell Compatibility 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. Bash ensures that the 'POSIXLY_CORRECT' variable is set. + + 2. 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'. + + 3. Bash will not insert a command without the execute bit set into the + command hash table, even if it returns it as a (last-ditch) result + from a '$PATH' search. + + 4. The message printed by the job control code and builtins when a job + exits with a non-zero status is 'Done(status)'. + + 5. The message printed by the job control code and builtins when a job + is stopped is 'Stopped(SIGNAME)', where SIGNAME is, for example, + 'SIGTSTP'. + + 6. Alias expansion is always enabled, even in non-interactive shells. + + 7. Reserved words appearing in a context where reserved words are + recognized do not undergo alias expansion. + + 8. Alias expansion is performed when initially parsing a command + substitution. The default mode generally defers it, when enabled, + until the command substitution is executed. This means that + command substitution will not expand aliases that are defined after + the command substitution is initially parsed (e.g., as part of a + function definition). + + 9. 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. + + 10. The POSIX startup files are executed ('$ENV') rather than the + normal Bash files. + + 11. Tilde expansion is only performed on assignments preceding a + command name, rather than on all assignment statements on the line. + + 12. The default history file is '~/.sh_history' (this is the default + value of '$HISTFILE'). + + 13. Redirection operators do not perform filename expansion on the + word in the redirection unless the shell is interactive. + + 14. Redirection operators do not perform word splitting on the word in + the redirection. + + 15. 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. + + 16. Function names may not be the same as one of the POSIX special + builtins. + + 17. POSIX special builtins are found before shell functions during + command lookup. + + 18. When printing shell function definitions (e.g., by 'type'), Bash + does not print the 'function' keyword. + + 19. Literal tildes that appear as the first character in elements of + the 'PATH' variable are not expanded as described above under *note + Tilde Expansion::. + + 20. The 'time' reserved word may be used by itself as a command. When + used in this way, it displays timing statistics for the shell and + its completed children. The 'TIMEFORMAT' variable controls the + format of the timing information. + + 21. When parsing and expanding a ${...} expansion that appears within + double quotes, single quotes are no longer special and cannot be + used to quote a closing brace or other special character, unless + the operator is one of those defined to perform pattern removal. + In this case, they do not have to appear as matched pairs. + + 22. The parser does not recognize 'time' as a reserved word if the + next token begins with a '-'. + + 23. The '!' character does not introduce history expansion within a + double-quoted string, even if the 'histexpand' option is enabled. + + 24. 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. + + 25. 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. + + 26. A non-interactive shell exits with an error status if a variable + assignment error occurs in an assignment statement preceding a + special builtin, but not with any other simple command. For any + other simple command, the shell aborts execution of that command, + and execution continues at the top level ("the shell shall not + perform any further processing of the command in which the error + occurred"). + + 27. 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. + + 28. Non-interactive shells exit if FILENAME in '.' FILENAME is not + found. + + 29. Non-interactive shells exit if a syntax error in an arithmetic + expansion results in an invalid expression. + + 30. Non-interactive shells exit if a parameter expansion error occurs. + + 31. Non-interactive shells exit if there is a syntax error in a script + read with the '.' or 'source' builtins, or in a string processed by + the 'eval' builtin. + + 32. While variable indirection is available, it may not be applied to + the '#' and '?' special parameters. + + 33. Expanding the '*' special parameter in a pattern context where the + expansion is double-quoted does not treat the '$*' as if it were + double-quoted. + + 34. Assignment statements preceding POSIX special builtins persist in + the shell environment after the builtin completes. + + 35. The 'command' builtin does not prevent builtins that take + assignment statements as arguments from expanding them as + assignment statements; when not in POSIX mode, assignment builtins + lose their assignment statement expansion properties when preceded + by 'command'. + + 36. 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. + + 37. The output of 'kill -l' prints all the signal names on a single + line, separated by spaces, without the 'SIG' prefix. + + 38. The 'kill' builtin does not accept signal names with a 'SIG' + prefix. + + 39. The 'export' and 'readonly' builtin commands display their output + in the format required by POSIX. + + 40. The 'trap' builtin displays signal names without the leading + 'SIG'. + + 41. 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. + + 42. 'trap -p' displays signals whose dispositions are set to SIG_DFL + and those that were ignored when the shell started. + + 43. The '.' and 'source' builtins do not search the current directory + for the filename argument if it is not found by searching 'PATH'. + + 44. Enabling POSIX mode has the effect of setting the + 'inherit_errexit' option, so subshells spawned to execute command + substitutions inherit the value of the '-e' option from the parent + shell. When the 'inherit_errexit' option is not enabled, Bash + clears the '-e' option in such subshells. + + 45. Enabling POSIX mode has the effect of setting the 'shift_verbose' + option, so numeric arguments to 'shift' that exceed the number of + positional parameters will result in an error message. + + 46. When the 'alias' builtin displays alias definitions, it does not + display them with a leading 'alias ' unless the '-p' option is + supplied. + + 47. When the 'set' builtin is invoked without options, it does not + display shell function names and definitions. + + 48. 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. + + 49. 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. + + 50. When the 'cd' builtin cannot change a directory because the length + of the pathname constructed from '$PWD' and the directory name + supplied as an argument exceeds 'PATH_MAX' when all symbolic links + are expanded, 'cd' will fail instead of attempting to use only the + supplied directory name. + + 51. 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. + + 52. When listing the history, the 'fc' builtin does not include an + indication of whether or not a history entry has been modified. + + 53. The default editor used by 'fc' is 'ed'. + + 54. 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'. + + 55. The 'vi' editing mode will invoke the 'vi' editor directly when + the 'v' command is run, instead of checking '$VISUAL' and + '$EDITOR'. + + 56. 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. + + 57. The 'ulimit' builtin uses a block size of 512 bytes for the '-c' + and '-f' options. + + 58. 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. + + 59. The 'read' builtin may be interrupted by a signal for which a trap + has been set. If Bash receives a trapped signal while executing + 'read', the trap handler executes and 'read' returns an exit status + greater than 128. + + 60. The 'printf' builtin uses 'double' (via 'strtod') to convert + arguments corresponding to floating point conversion specifiers, + instead of 'long double' if it's available. The 'L' length + modifier forces 'printf' to use 'long double' if it's available. + + 61. Bash removes an exited background process's status from the list + of such statuses after the 'wait' builtin is used to obtain it. + + 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: Shell Compatibility Mode, Prev: Bash POSIX Mode, Up: Bash Features + +6.12 Shell Compatibility Mode +============================= + +Bash-4.0 introduced the concept of a "shell compatibility level", +specified as a set of options to the shopt builtin ('compat31', +'compat32', 'compat40', 'compat41', and so on). There is only one +current compatibility level - each option is mutually exclusive. The +compatibility level is intended to allow users to select behavior from +previous versions that is incompatible with newer versions while they +migrate scripts to use current features and behavior. It's intended to +be a temporary solution. + + This section 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 subsequent versions). + + If a user enables, say, 'compat32', it may affect the behavior of +other compatibility levels up to and including the current compatibility +level. The idea is that each compatibility level controls behavior that +changed in that version of Bash, but that behavior may have been present +in earlier versions. For instance, the change to use locale-based +comparisons with the '[[' command came in bash-4.1, and earlier versions +used ASCII-based comparisons, so enabling 'compat32' will enable +ASCII-based comparisons as well. That granularity may not be sufficient +for all uses, and as a result users should employ compatibility levels +carefully. Read the documentation for a particular feature to find out +the current behavior. + + Bash-4.3 introduced a new shell variable: 'BASH_COMPAT'. The value +assigned to this variable (a decimal version number like 4.2, or an +integer corresponding to the 'compat'NN option, like 42) determines the +compatibility level. + + Starting with bash-4.4, Bash has begun deprecating older +compatibility levels. Eventually, the options will be removed in favor +of 'BASH_COMPAT'. + + Bash-5.0 is the final version for which there will be an individual +shopt option for the previous version. Users should use 'BASH_COMPAT' +on bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each +compatibility level setting. The 'compat'NN tag is used as shorthand +for setting the compatibility level to NN using one of the following +mechanisms. For versions prior to bash-5.0, the compatibility level may +be set using the corresponding 'compat'NN shopt option. For bash-4.3 +and later versions, the 'BASH_COMPAT' variable is preferred, and it is +required for bash-5.1 and later versions. + +'compat31' + * quoting the rhs of the '[[' command's regexp matching operator + (=~) has no special effect + +'compat32' + * interrupting a command list such as "a ; b ; c" causes the + execution of the next command in the list (in bash-4.0 and + later versions, the shell acts as if it received the + interrupt, so interrupting one command in a list aborts the + execution of the entire list) + +'compat40' + * the '<' and '>' operators to the '[[' command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII collation + and strcmp(3); bash-4.1 and later use the current locale's + collation sequence and strcoll(3). + +'compat41' + * in posix mode, 'time' may be followed by options and still be + recognized as a reserved word (this is POSIX interpretation + 267) + * in posix mode, the parser requires that an even number of + single quotes occur in the WORD portion of a double-quoted + ${...} parameter expansion and treats them specially, so that + characters within the single quotes are considered quoted + (this is POSIX interpretation 221) + +'compat42' + * the replacement string in double-quoted pattern substitution + does not undergo quote removal, as it does in versions after + bash-4.2 + * in posix mode, single quotes are considered special when + expanding the WORD portion of a double-quoted ${...} parameter + expansion and can be used to quote a closing brace or other + special character (this is part of POSIX interpretation 221); + in later versions, single quotes are not special within + double-quoted word expansions + +'compat43' + * the shell does not print a warning message if an attempt is + made to use a quoted compound assignment as an argument to + declare (e.g., declare -a foo='(1 2)'). Later versions warn + that this usage is deprecated + * word expansion errors are considered non-fatal errors that + cause the current command to fail, even in posix mode (the + default behavior is to make them fatal errors that cause the + shell to exit) + * when executing a shell function, the loop state + (while/until/etc.) is not reset, so 'break' or 'continue' in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to prevent + this + +'compat44' + * the shell sets up the values used by 'BASH_ARGV' and + 'BASH_ARGC' so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + * a subshell inherits loops from its parent context, so 'break' + or 'continue' will cause the subshell to exit. Bash-5.0 and + later reset the loop state to prevent the exit + * variable assignments preceding builtins like 'export' and + 'readonly' that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + +'compat50 (set using BASH_COMPAT)' + * Bash-5.1 changed the way '$RANDOM' is generated to introduce + slightly more randomness. If the shell compatibility level is + set to 50 or lower, it reverts to the method from bash-5.0 and + previous versions, so seeding the random number generator by + assigning a value to 'RANDOM' will produce the same sequence + as in bash-5.0 + * If the command hash table is empty, Bash versions prior to + bash-5.1 printed an informational message to that effect, even + when producing output that can be reused as input. Bash-5.1 + suppresses that message when the '-l' option is supplied. + +'compat51 (set using BASH_COMPAT)' + * The 'unset' builtin will unset the array 'a' given an argument + like 'a[@]'. Bash-5.2 will unset an element with key '@' + (associative arrays) or remove all the elements without + unsetting the array (indexed arrays) + * arithmetic commands ( ((...)) ) and the expressions in an + arithmetic for statement can be expanded more than once + * expressions used as arguments to arithmetic operators in the + '[[' conditional command can be expanded more than once + * the expressions in substring parameter brace expansion can be + expanded more than once + * the expressions in the $(( ... )) word expansion can be + expanded more than once + * arithmetic expressions used as indexed array subscripts can be + expanded more than once + * 'test -v', when given an argument of 'A[@]', where A is an + existing associative array, will return true if the array has + any set elements. Bash-5.2 will look for and report on a key + named '@' + * the ${PARAMETER[:]=VALUE} word expansion will return VALUE, + before any variable-specific transformations have been + performed (e.g., converting to lowercase). Bash-5.2 will + return the final value assigned to the variable. + * Parsing command substitutions will behave as if extended glob + (*note The Shopt Builtin::) is enabled, so that parsing a + command substitution containing an extglob pattern (say, as + part of a shell function) will not fail. This assumes the + intent is to enable extglob before the command is executed and + word expansions are performed. It will fail at word expansion + time if extglob hasn't been enabled by the time the command is + executed. + + +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 job whose command name begins with +'ce'. 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. + + When the shell is waiting for a job or process using the 'wait' +builtin, and job control is enabled, 'wait' will return when the job +changes state. The '-f' option causes 'wait' to wait until the job or +process terminates before returning. + + +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' + Display only running jobs. + + '-s' + Display only 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|-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 '-L' option is equivalent to + '-l'. 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 [-fn] [-p VARNAME] [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, 'wait' waits + for all running background jobs and the last-executed process + substitution, if its process id is the same as $!, and the return + status is zero. If the '-n' option is supplied, 'wait' waits for a + single job from the list of PIDs or JOBSPECs or, if no arguments + are supplied, any job, to complete and returns its exit status. If + none of the supplied arguments is a child of the shell, or if no + arguments are supplied and the shell has no unwaited-for children, + the exit status is 127. If the '-p' option is supplied, the + process or job identifier of the job for which the exit status is + returned is assigned to the variable VARNAME named by the option + argument. The variable will be unset initially, before any + assignment. This is useful only when the '-n' option is supplied. + Supplying the '-f' option, when job control is enabled, forces + 'wait' to wait for each PID or JOBSPEC to terminate before + returning its status, instead of returning when it changes status. + If neither JOBSPEC nor PID specifies an active child process of the + shell, the return status is 127. If 'wait' is interrupted by a + signal, the return status will be greater than 128, as described + above (*note Signals::). Otherwise, the return status is the exit + status of the last process or job waited for. + +'disown' + disown [-ar] [-h] [JOBSPEC ... | PID ... ] + + Without options, remove each JOBSPEC 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 the '-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, or a shell without job control enabled, + cannot be suspended; the '-f' option can be used to override this + and force the suspension. The return status is 0 unless the shell + is a login shell or job control is not enabled and '-f' is not + supplied. + + 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. +* A Programmable Completion Example:: An example shell function for + generating possible completions. + + +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 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 +key is pressed. The Meta key is labeled on many keyboards. On +keyboards with two keys labeled (usually to either side of the +space bar), the on the left side is generally set to work as a +Meta key. The 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, or another key working as a +Meta key, the identical keystroke can be generated by typing +_first_, and then typing . Either process is known as "metafying" +the 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, , +, , , , and all stand for themselves when seen +in this text, or in an init file (*note Readline Init File::). If your +keyboard lacks a key, typing will produce the desired +character. The key may be labeled or 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 . You do not have to be at the end of +the line to press ; 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. + or + 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 key might be set to +delete the character to the left of the cursor and the 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 . +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-' + Kill from the cursor to 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-' 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 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 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 their 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'. The 'bind' builtin command can also +be used to set Readline keybindings and variables. *Note Bash +Builtins::. + + 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. + + 'active-region-start-color' + A string variable that controls the text color and background + when displaying the text in the active region (see the + description of 'enable-active-region' below). This string + must not take up any physical character positions on the + display, so it should consist only of terminal escape + sequences. It is output to the terminal before displaying the + text in the active region. This variable is reset to the + default value whenever the terminal type changes. The default + value is the string that puts the terminal in standout mode, + as obtained from the terminal's terminfo description. A + sample value might be '\e[01;33m'. + + 'active-region-end-color' + A string variable that "undoes" the effects of + 'active-region-start-color' and restores "normal" terminal + display appearance after displaying text in the active region. + This string must not take up any physical character positions + on the display, so it should consist only of terminal escape + sequences. It is output to the terminal after displaying the + text in the active region. This variable is reset to the + default value whenever the terminal type changes. The default + value is the string that restores the terminal from standout + mode, as obtained from the terminal's terminfo description. A + sample value might be '\e[0m'. + + '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' (the default), Readline attempts to bind the + control characters treated specially by the kernel's terminal + driver to their Readline equivalents. + + 'blink-matching-paren' + If set to 'on', Readline attempts to briefly move the cursor + to an opening parenthesis when a closing parenthesis is + inserted. The default is 'off'. + + 'colored-completion-prefix' + If set to 'on', when listing completions, Readline displays + the common prefix of the set of possible completions using a + different color. The color definitions are taken from the + value of the 'LS_COLORS' environment variable. If there is a + color definition in 'LS_COLORS' for the custom suffix + 'readline-colored-completion-prefix', Readline uses this color + for the common prefix instead of its default. The default is + 'off'. + + 'colored-stats' + If set to 'on', Readline displays possible completions using + different colors to indicate their file type. The color + definitions are taken from the value of the 'LS_COLORS' + environment variable. The default is 'off'. + + 'comment-begin' + The string to insert at the beginning of the line when the + 'insert-comment' command is executed. The default value is + '"#"'. + + 'completion-display-width' + The number of screen columns used to display possible matches + when performing completion. The value is ignored if it is + less than 0 or greater than the terminal screen width. A + value of 0 will cause matches to be displayed one per line. + The default value is -1. + + 'completion-ignore-case' + If set to 'on', Readline performs filename matching and + completion in a case-insensitive fashion. The default value + is 'off'. + + 'completion-map-case' + If set to 'on', and COMPLETION-IGNORE-CASE is enabled, + Readline treats hyphens ('-') and underscores ('_') as + equivalent when performing case-insensitive filename matching + and completion. 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 or equal to this value, Readline will ask whether or not + the user wishes to view them; otherwise, they are simply + listed. This variable must be set to an integer value greater + than or equal to zero. A zero value means Readline should + never ask; negative values are treated as zero. 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 character, converting them + to a meta-prefixed key sequence. The default value is 'on', + but will be set to 'off' if the locale is one that contains + eight-bit characters. This variable is dependent on the + 'LC_CTYPE' locale category, and may change if the locale is + changed. + + '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'. + + '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'. + + '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'. + + 'emacs-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when emacs editing mode is active. The value is + expanded like a key binding, so the standard set of meta- and + control prefixes and backslash escape sequences is available. + Use the '\1' and '\2' escapes to begin and end sequences of + non-printing characters, which can be used to embed a terminal + control sequence into the mode string. The default is '@'. + + 'enable-active-region' + The "point" is the current cursor position, and "mark" refers + to a saved cursor position (*note Commands For Moving::). The + text between the point and mark is referred to as the + "region". When this variable is set to 'On', Readline allows + certain commands to designate the region as "active". When + the region is active, Readline highlights the text in the + region using the value of the 'active-region-start-color', + which defaults to the string that enables the terminal's + standout mode. The active region shows the text inserted by + bracketed-paste and any matching text found by incremental and + non-incremental history searches. The default is 'On'. + + 'enable-bracketed-paste' + When set to 'On', Readline configures the terminal to insert + each paste into the editing buffer as a single string of + characters, instead of treating each character as if it had + been read from the keyboard. This is called putting the + terminal into "bracketed paste mode"; it prevents Readline + from executing any editing commands bound to key sequences + appearing in the pasted text. 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, any existing history entries are + deleted and no new entries are saved. If set to a value less + than zero, the number of history entries is not limited. By + default, the number of history entries is not limited. If an + attempt is made to set HISTORY-SIZE to a non-numeric value, + the maximum number of history entries will be set to 500. + + '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. This variable is automatically set to 'on' + for terminals of height 1. 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', but Readline will set it to 'on' if + the locale contains eight-bit characters. The name + 'meta-flag' is a synonym for this variable. This variable is + dependent on the 'LC_CTYPE' locale category, and may change if + the locale is changed. + + '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 and 'C-J' will terminate + an incremental search. + + 'keymap' + Sets Readline's idea of the current keymap for key binding + commands. Built-in 'keymap' names are 'emacs', + 'emacs-standard', 'emacs-meta', 'emacs-ctlx', 'vi', 'vi-move', + 'vi-command', and 'vi-insert'. 'vi' is equivalent to + 'vi-command' ('vi-move' is also a synonym); 'emacs' is + equivalent to 'emacs-standard'. Applications may add + additional names. The default value is 'emacs'. The value of + the 'editing-mode' variable also affects the default keymap. + + 'keyseq-timeout' + Specifies the duration Readline will wait for a character when + reading an ambiguous key sequence (one that can form a + complete key sequence using the input read so far, or can take + additional input to complete a longer key sequence). If no + input is received within the timeout, Readline will use the + shorter but complete key sequence. Readline uses this value + to determine whether or not input is available on the current + input source ('rl_instream' by default). The value is + specified in milliseconds, so a value of 1000 means that + Readline will wait one second for additional input. If this + variable is set to a value less than or equal to zero, or to a + non-numeric value, Readline will wait until another key is + pressed to decide which key sequence to complete. The default + value is '500'. + + '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. If set to 'off', the leading + '.' must be supplied by the user in the filename to be + completed. This variable is 'on' by default. + + 'menu-complete-display-prefix' + If set to 'on', menu completion displays the common prefix of + the list of possible completions (which may be empty) before + cycling through the list. The default is 'off'. + + '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', but Readline will set it to + 'on' if the locale contains eight-bit characters. This + variable is dependent on the 'LC_CTYPE' locale category, and + may change if the locale is changed. + + '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'. + + 'show-mode-in-prompt' + If set to 'on', add a string to the beginning of the prompt + indicating the editing mode: emacs, vi command, or vi + insertion. The mode strings are user-settable (e.g., + EMACS-MODE-STRING). 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'. + + 'vi-cmd-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in command mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(cmd)'. + + 'vi-ins-mode-string' + If the SHOW-MODE-IN-PROMPT variable is enabled, this string is + displayed immediately before the last line of the primary + prompt when vi editing mode is active and in insertion mode. + The value is expanded like a key binding, so the standard set + of meta- and control prefixes and backslash escape sequences + is available. Use the '\1' and '\2' escapes to begin and end + sequences of non-printing characters, which can be used to + embed a terminal control sequence into the mode string. The + default is '(ins)'. + + '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 be 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 example above, '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 ' <[> <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, after any comparison operator, extends to the + end of the line; unless otherwise noted, 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. + + 'version' + The 'version' test may be used to perform comparisons against + specific Readline versions. The 'version' expands to the + current Readline version. The set of comparison operators + includes '=' (and '=='), '!=', '<=', '>=', '<', and '>'. The + version number supplied on the right side of the operator + consists of a major version number, an optional decimal point, + and an optional minor version (e.g., '7.1'). If the minor + version is omitted, it is assumed to be '0'. The operator may + be separated from the string 'version' and from the version + number argument by whitespace. The following example sets a + variable if the Readline version being used is 7.0 or newer: + $if version >= 7.0 + set show-mode-in-prompt on + $endif + + '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 + + 'variable' + The VARIABLE construct provides simple equality tests for + Readline variables and values. The permitted comparison + operators are '=', '==', and '!='. The variable name must be + separated from the comparison operator by whitespace; the + operator may be separated from the value on the right hand + side by whitespace. Both string and boolean variables may be + tested. Boolean variables must be tested against the values + ON and OFF. The following example is equivalent to the + 'mode=emacs' test described above: + $if editing-mode == emacs + set show-mode-in-prompt on + $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 system-wide 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 150 or more possible completions for a word, + # ask whether or not the user 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 (M-C-f)' + Move forward to the end of the next word. Words are delimited by + non-quoted shell metacharacters. + +'shell-backward-word (M-C-b)' + Move back to the start of the current or previous word. Words are + delimited by non-quoted shell metacharacters. + +'previous-screen-line ()' + Attempt to move point to the same physical screen column on the + previous physical screen line. This will not have the desired + effect if the current Readline line does not take up more than one + physical line or if point is not greater than the length of the + prompt plus the screen width. + +'next-screen-line ()' + Attempt to move point to the same physical screen column on the + next physical screen line. This will not have the desired effect + if the current Readline line does not take up more than one + physical line or if the length of the current Readline line is not + greater than the length of the prompt plus the screen width. + +'clear-display (M-C-l)' + Clear the screen and, if possible, the terminal's scrollback + buffer, then redraw the current line, leaving the current line at + the top of the screen. + +'clear-screen (C-l)' + Clear the screen, then 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. + This command sets the region to the matched text and activates the + mark. + +'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. + This command sets the region to the matched text and activates the + mark. + +'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. The search string may match + anywhere in a history line. + +'non-incremental-forward-search-history (M-n)' + Search forward starting at the current line and moving 'down' + through the history as necessary using a non-incremental search for + a string supplied by the user. The search string may match + anywhere in a history line. + +'history-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string must match at the beginning of a history line. 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. The search + string must match at the beginning of a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-forward ()' + Search forward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. This is a + non-incremental search. By default, this command is unbound. + +'history-substring-search-backward ()' + Search backward through the history for the string of characters + between the start of the current line and the point. The search + string may match anywhere in a history line. 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 a numeric argument, behave exactly + like 'yank-nth-arg'. Successive calls to 'yank-last-arg' move back + through the history list, inserting the last word (or the word + specified by the argument to the first call) of each line in turn. + Any numeric argument supplied to these successive calls determines + the direction to move through the history. A negative argument + switches the direction through the history (back or forward). The + history expansion facilities are used to extract the last argument, + as if the '!$' history expansion had been specified. + +'operate-and-get-next (C-o)' + Accept the current line for return to the calling application as if + a newline had been entered, and fetch the next line relative to the + current line from the history for editing. A numeric argument, if + supplied, specifies the history entry to use instead of the current + line. + +'fetch-history ()' + With a numeric argument, fetch that entry from the history list and + make it the current line. Without an argument, move back to the + first entry in the history list. + + +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 +-------------------------------- + +'end-of-file (usually C-d)' + The character indicating end-of-file as set, for example, by + 'stty'. If this character is read when there are no characters on + the line, and point is at the beginning of the line, Readline + interprets it as the end of input and returns EOF. + +'delete-char (C-d)' + Delete the character at point. If this function is bound to the + same character as the tty EOF character, as 'C-d' commonly is, see + above for the effects. + +'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. + +'bracketed-paste-begin ()' + This function is intended to be bound to the "bracketed paste" + escape sequence sent by some terminals, and such a binding is + assigned by default. It allows Readline to insert the pasted text + as a single unit without treating each character as if it had been + read from the keyboard. The characters are inserted as if each one + was bound to 'self-insert' instead of executing any editing + commands. + + Bracketed paste sets the region (the characters between point and + the mark) to the inserted text. It uses the concept of an _active + mark_: when the mark is active, Readline redisplay uses the + terminal's standout mode to denote the region. + +'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. With a negative + numeric argument, kill backward from the cursor to the beginning of + the current line. + +'backward-kill-line (C-x Rubout)' + Kill backward from the cursor to the beginning of the current line. + With a negative numeric argument, kill forward from the cursor to + the end of the current 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-)' + Kill the word behind point. Word boundaries are the same as + 'backward-word'. + +'shell-kill-word (M-C-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 'shell-forward-word'. + +'shell-backward-kill-word ()' + Kill the word behind point. Word boundaries are the same as + 'shell-backward-word'. + +'shell-transpose-words (M-C-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. Word + boundaries are the same as 'shell-forward-word' and + '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 nor 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 ()' + 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. When + displaying completions, Readline sets the number of columns used + for display to the value of 'completion-display-width', the value + of the environment variable 'COLUMNS', or the screen width, in that + order. + +'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 , 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-)' + 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. + +'print-last-kbd-macro ()' + Print the last keyboard macro defined in a format suitable for the + INPUTRC file. + + +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-lowercase-version (M-A, M-B, M-X, ...)' + If the metafied character X is upper case, run the command that is + bound to the corresponding metafied lower case character. The + behavior is undefined if X is already lower case. + +'prefix-meta ()' + Metafy the next character typed. This is for keyboards without a + meta key. Typing ' 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 argument 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 argument 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. + +'spell-correct-word (C-x s)' + Perform spelling correction on the current word, treating it as a + directory or filename, in the same way as the 'cdspell' shell + option. Word boundaries are the same as those used by + 'shell-forward-word'. + +'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'. + +'edit-and-execute-command (C-x C-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 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 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. If +there is no default compspec, Bash attempts alias expansion on the +command word as a final resort, and attempts to find a compspec for the +command word from any successful expansion + + 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 within the +string, in order to provide a mechanism for the words to contain shell +metacharacters or characters in the value of 'IFS'. 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 ($1) is the name of +the command whose arguments are being completed, the second argument +($2) is the word being completed, and the third argument ($3) 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, one per array element. + + 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. If the 'nocasematch' shell option +(see the description of 'shopt' in *note The Shopt Builtin::) is +enabled, the match is performed without regard to the case of alphabetic +characters. + + 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 new 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 -o bashdefault -o default + + +File: bashref.info, Node: Programmable Completion Builtins, Next: A Programmable Completion Example, Prev: Programmable Completion, Up: Command Line Editing + +8.7 Programmable Completion Builtins +==================================== + +Three builtin commands are available to manipulate the programmable +completion facilities: one to specify how the arguments to a particular +command are to be completed, and two to modify the completion as it is +happening. + +'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] [-DEI] [-A ACTION] [-G GLOBPAT] + [-W WORDLIST] [-F FUNCTION] [-C COMMAND] [-X FILTERPAT] + [-P PREFIX] [-S SUFFIX] NAME [NAME ...] + complete -pr [-DEI] [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 other + supplied 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 other supplied options and actions should apply to "empty" + command completion; that is, completion attempted on a blank line. + The '-I' option indicates that other supplied options and actions + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. If multiple options are supplied, + the '-D' option takes precedence over '-E', and both take + precedence over '-I'. If any of '-D', '-E', or '-I' are supplied, + any other NAME arguments are ignored; these completions only apply + to the case specified by the option. + + The process of applying these completion specifications when word + completion is attempted is described above (*note Programmable + Completion::). + + 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'. + + 'noquote' + Tell Readline not to quote the completed words if they + are filenames (quoting filenames is the default). + + 'nosort' + Tell Readline not to sort the list of possible + completions alphabetically. + + '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'. + + '-C COMMAND' + COMMAND is executed in a subshell environment, and its output + is used as the possible completions. Arguments are passed as + with the '-F' option. + + '-F FUNCTION' + The shell function FUNCTION is executed in the current shell + environment. When it is executed, $1 is the name of the + command whose arguments are being completed, $2 is the word + being completed, and $3 is the word preceding the word being + completed, as described above (*note Programmable + Completion::). When it finishes, the possible completions are + retrieved from the value of the 'COMPREPLY' array variable. + + '-G GLOBPAT' + The filename expansion pattern GLOBPAT is expanded to generate + the possible completions. + + '-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. + + '-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. + + '-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. + + 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] [-DEI] [+o OPTION] [NAME] + Modify completion options for each NAME according to the OPTIONs, + or for the currently-executing 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 other supplied 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 other supplied options should apply to + "empty" command completion; that is, completion attempted on a + blank line. The '-I' option indicates that other supplied options + should apply to completion on the initial non-assignment word on + the line, or after a command delimiter such as ';' or '|', which is + usually command name completion. + + If multiple options are supplied, the '-D' option takes precedence + over '-E', and both take precedence over '-I' + + 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: A Programmable Completion Example, Prev: Programmable Completion Builtins, Up: Command Line Editing + +8.8 A Programmable Completion Example +===================================== + +The most common way to obtain additional completion functionality beyond +the default actions 'complete' and 'compgen' provide is to use a shell +function and bind it to a particular command using 'complete -F'. + + The following function provides completions for the 'cd' builtin. It +is a reasonably good example of what shell functions must do when used +for completion. This function uses the word passed as '$2' to determine +the directory name to complete. You can also use the 'COMP_WORDS' array +variable; the current word is indexed by the 'COMP_CWORD' variable. + + The function relies on the 'complete' and 'compgen' builtins to do +much of the work, adding only the things that the Bash 'cd' does beyond +accepting basic directory names: tilde expansion (*note Tilde +Expansion::), searching directories in $CDPATH, which is described above +(*note Bourne Shell Builtins::), and basic support for the 'cdable_vars' +shell option (*note The Shopt Builtin::). '_comp_cd' modifies the value +of IFS so that it contains only a newline to accommodate file names +containing spaces and tabs - 'compgen' prints the possible completions +it generates one per line. + + Possible completions go into the COMPREPLY array variable, one +completion per array element. The programmable completion system +retrieves the completions from there when the function returns. + + # A completion function for the cd builtin + # based on the cd completion function from the bash_completion package + _comp_cd() + { + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, which also expands tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=${CDPATH/#:/.:} + _cdpath=${_cdpath//::/:.:} + _cdpath=${_cdpath/%:/:.} + for i in ${_cdpath//:/$'\n'}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="${#COMPREPLY[@]}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=${j#$i/} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + return 0 + } + + We install the completion function using the '-F' option to +'complete': + + # Tell readline to quote appropriate and append slashes to directories; + # use the bash default completion for other arguments + complete -o filenames -o nospace -o bashdefault -F _comp_cd cd + +Since we'd like Bash and Readline to take care of some of the other +details for us, we use several other options to tell Bash and Readline +what to do. The '-o filenames' option tells Readline that the possible +completions should be treated as filenames, and quoted appropriately. +That option will also cause Readline to append a slash to filenames it +can determine are directories (which is why we might want to extend +'_comp_cd' to append a slash if we're using directories found via +CDPATH: Readline can't tell those completions are directories). The '-o +nospace' option tells Readline to not append a space character to the +directory name, in case we want to append to it. The '-o bashdefault' +option brings in the rest of the "Bash default" completions - possible +completions that Bash adds to the default Readline set. These include +things like command name completion, variable completion for words +beginning with '$' or '${', completions containing pathname expansion +patterns (*note Filename Expansion::), and so on. + + Once installed using 'complete', '_comp_cd' will be called every time +we attempt word completion for a 'cd' command. + + Many more examples - an extensive collection of completions for most +of the common GNU, Unix, and Linux commands - are available as part of +the bash_completion project. This is installed by default on many +GNU/Linux distributions. Originally written by Ian Macdonald, the +project now lives at . There +are ports for other systems such as Solaris and Mac OS X. + + An older version of the bash_completion package is distributed with +bash in the 'examples/complete' subdirectory. + + +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 a shell with history enabled 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 unset, or set to null, a +non-numeric value, or a numeric value less than zero, the history file +is not truncated. + + 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 following history entry. + + 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 The Shopt Builtin::, 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] + + The first form selects a range of commands from FIRST to LAST from + the history list and displays or edits and re-executes them. 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). + + When listing, a FIRST or LAST of 0 is equivalent to -1 and -0 is + equivalent to the current command (usually the 'fc' command); + otherwise 0 is equivalent to -1 and -0 is invalid. + + 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. COMMAND is + interpreted the same as FIRST above. + + 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 -d START-END + 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. If OFFSET is + positive, it should be specified as it appears when the + history is displayed. If OFFSET is negative, it is + interpreted as relative to one greater than the last history + position, so negative indices count back from the end of the + history, and an index of '-1' refers to the current 'history + -d' command. + + '-d START-END' + Delete the range of history entries between positions START + and END, inclusive. Positive and negative values for START + and END are interpreted as described above. + + '-a' + Append the new history lines to the history file. These are + history lines entered since the beginning of the current Bash + session, but not already appended 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 history file and append its contents to the history + list. + + '-w' + Write out the current history list 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. + + If a FILENAME argument is supplied when any of the '-w', '-r', + '-a', or '-n' options is used, Bash uses FILENAME as the history + file. If not, then the value of the 'HISTFILE' variable is used. + + The return value is 0 unless an invalid option is encountered, an + error occurs while reading or writing the history file, an invalid + OFFSET or range is supplied as an argument to '-d', or the history + expansion supplied as an argument to '-p' fails. + + +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 is performed immediately after a complete line is +read, before the shell breaks it into words, and is performed on each +line individually. Bash attempts to inform the history expansion +functions about quoting still in effect from previous lines. + + 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. + + History expansion implements shell-like quoting conventions: a +backslash can be used to remove the special handling for the next +character; single quotes enclose verbatim sequences of characters, and +can be used to inhibit history expansion; and characters enclosed within +double quotes may be subject to history expansion, since backslash can +escape the history expansion character, but single quotes may not, since +they are not treated specially within double quotes. + + When using the shell, only '\' and ''' may be used to escape the +history expansion character, but the history expansion character is also +treated as quoted if it immediately precedes the closing double quote in +a double-quoted string. + + Several shell options settable with the 'shopt' builtin (*note The +Shopt Builtin::) 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. Unless the reference is absolute, events are relative to +the current position 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 preceding the current position in + the history list starting with STRING. + +'!?STRING[?]' + Refer to the most recent command preceding the current position in + the history list containing STRING. The trailing '?' may be + omitted if the STRING is followed immediately by a newline. If + STRING is missing, the string from the most recent search is used; + it is an error if there is no previous search string. + +'^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 first word matched by the most recent '?STRING?' search, if the + search string begins with a character that is part of a word. + +'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 'x' is + missing, it defaults to 0. + + 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 ':'. These modify, +or edit, the word or words selected from the history event. + +'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. The 'q' and 'x' modifiers are mutually + exclusive; the last one supplied is used. + +'s/OLD/NEW/' + Substitute NEW for the first occurrence of OLD in the event line. + Any character may be used as the delimiter 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 '&'. If OLD is null, it is set to the last OLD + substituted, or, if no previous history substitutions took place, + the last STRING in a !?STRING'[?]' search. If NEW is null, each + matching OLD is deleted. 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' or '&' 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, message translation + files, some supplemental documentation, a number of example + loadable builtin commands, and a set of header files for developing + loadable builtins. You may need additional privileges to install + 'bash' to your desired destination, so 'sudo make install' might be + required. More information about controlling the locations where + 'bash' and other files are installed is below (*note Installation + Names::). + + 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', 'po', 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-4.2$ ./configure --help + +at the Bash prompt in your Bash source directory. + + If you want to build Bash in a directory separate from the source +directory - to build for multiple architectures, for example - just use +the full path to the configure script. The following commands will +build bash in a directory under '/usr/local/build' from the source code +in '/usr/local/src/bash-4.4': + + mkdir /usr/local/build/bash-4.4 + cd /usr/local/build/bash-4.4 + bash /usr/local/src/bash-4.4/configure + make + + See *note Compiling For Multiple Architectures:: for more information +about building in a directory separate from the source. + + 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 so they can be +considered for the next release. + + The file 'configure.ac' is used to create 'configure' by a program +called Autoconf. You only need 'configure.ac' 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.69 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 (*note Basic Installation::). 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 support 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.; that is, the "installation prefix" defaults to +'/usr/local'. You can specify an installation prefix other than +'/usr/local' by giving 'configure' the option '--prefix=PATH', or by +specifying a value for the 'prefix' 'make' variable when running 'make +install' (e.g., 'make install prefix=PATH'). The 'prefix' variable +provides a default for 'exec_prefix' and other variables used when +installing bash. + + 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. + + If you would like to change the installation locations for a single +run, you can specify these variables as arguments to 'make': 'make +install exec_prefix=/' will install 'bash' and 'bashbug' into '/bin' +instead of the default '/usr/local/bin'. + + If you want to see the files bash will install and where it will +install them without changing anything on your system, specify the +variable 'DESTDIR' as an argument to 'make'. Its value should be the +absolute directory path you'd like to use as the root of your sample +installation tree. For example, + + mkdir /fs1/bash-install + make install DESTDIR=/fs1/bash-install + +will install 'bash' into '/fs1/bash-install/usr/local/bin/bash', the +documentation into directories within +'/fs1/bash-install/usr/local/share', the example loadable builtins into +'/fs1/bash-install/usr/local/lib/bash', and so on. You can use the +usual 'exec_prefix' and 'prefix' variables to alter the directory paths +beneath the value of 'DESTDIR'. + + The GNU Makefile standards provide a more complete description of +these variables and their effects. + + +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 needs 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-libintl-prefix[=PREFIX]' + Define this to make Bash link with a locally-installed version of + the libintl library instead of the version in 'lib/intl'. + +'--with-libiconv-prefix[=PREFIX]' + Define this to make Bash look for libiconv in PREFIX instead of the + standard system locations. There is no version included with Bash. + +'--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, linked, and installed, rather than changing run-time features. + +'--enable-largefile' + Enable support for large files + (http://www.unix.org/version2/whatsnew/lfs20mar.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-separate-helpfiles' + Use external files for the documentation displayed by the 'help' + builtin instead of storing the text internally. + +'--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 'alt-array-implementation', +'disabled-builtins', 'direxpand-default', 'strict-posix-default', 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-alt-array-implementation' + This builds bash using an alternate implementation of arrays (*note + Arrays::) that provides faster access at the expense of using more + memory (sometimes many times more, depending on how sparse an array + is). + +'--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-dev-fd-stat-broken' + If calling 'stat' on /dev/fd/N returns different results than + calling 'fstat' on file descriptor N, supply this option to enable + a workaround. This has implications for conditional commands that + test file attributes. + +'--enable-direxpand-default' + Cause the 'direxpand' shell option (*note The Shopt Builtin::) to + be enabled by default when the shell starts. It is normally + disabled by default. + +'--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-function-import' + Include support for importing function definitions exported by + another instance of the shell from the environment. This option is + enabled by default. + +'--enable-glob-asciirange-default' + Set the default value of the 'globasciiranges' shell option + described above under *note The Shopt Builtin:: to be enabled. + This controls the behavior of character ranges when used in pattern + matching bracket expressions. + +'--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 '$PS0', '$PS1', '$PS2', and '$PS4' prompt + strings. See *note Controlling the 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' compound command, which allows the generation + of simple menus (*note Conditional Constructs::). + +'--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-translatable-strings' + Enable support for '$"STRING"' translatable strings (*note Locale + Translation::). + +'--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 + and from +. + + 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 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 . + + +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. + + * The filename expansion bracket expression code uses '!' and '^' to + negate the set of characters between the brackets. The Bourne + shell uses only '!'. + + * 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 a '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 Controlling the 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. + + + 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 + . + + 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 +=================================== + +[index] +* Menu: + +* .: Bourne Shell Builtins. + (line 17) +* :: Bourne Shell Builtins. + (line 11) +* [: Bourne Shell Builtins. + (line 275) +* alias: Bash Builtins. (line 11) +* bg: Job Control Builtins. + (line 7) +* bind: Bash Builtins. (line 21) +* break: Bourne Shell Builtins. + (line 37) +* builtin: Bash Builtins. (line 108) +* caller: Bash Builtins. (line 117) +* cd: Bourne Shell Builtins. + (line 45) +* command: Bash Builtins. (line 134) +* compgen: Programmable Completion Builtins. + (line 12) +* complete: Programmable Completion Builtins. + (line 30) +* compopt: Programmable Completion Builtins. + (line 238) +* continue: Bourne Shell Builtins. + (line 90) +* declare: Bash Builtins. (line 154) +* dirs: Directory Stack Builtins. + (line 7) +* disown: Job Control Builtins. + (line 104) +* echo: Bash Builtins. (line 257) +* enable: Bash Builtins. (line 306) +* eval: Bourne Shell Builtins. + (line 99) +* exec: Bourne Shell Builtins. + (line 107) +* exit: Bourne Shell Builtins. + (line 125) +* export: Bourne Shell Builtins. + (line 132) +* fc: Bash History Builtins. + (line 10) +* fg: Job Control Builtins. + (line 17) +* getopts: Bourne Shell Builtins. + (line 148) +* hash: Bourne Shell Builtins. + (line 192) +* help: Bash Builtins. (line 342) +* history: Bash History Builtins. + (line 46) +* jobs: Job Control Builtins. + (line 27) +* kill: Job Control Builtins. + (line 58) +* let: Bash Builtins. (line 361) +* local: Bash Builtins. (line 369) +* logout: Bash Builtins. (line 385) +* mapfile: Bash Builtins. (line 390) +* popd: Directory Stack Builtins. + (line 35) +* printf: Bash Builtins. (line 436) +* pushd: Directory Stack Builtins. + (line 69) +* pwd: Bourne Shell Builtins. + (line 212) +* read: Bash Builtins. (line 488) +* readarray: Bash Builtins. (line 585) +* readonly: Bourne Shell Builtins. + (line 222) +* return: Bourne Shell Builtins. + (line 241) +* set: The Set Builtin. (line 11) +* shift: Bourne Shell Builtins. + (line 262) +* shopt: The Shopt Builtin. (line 9) +* source: Bash Builtins. (line 594) +* suspend: Job Control Builtins. + (line 116) +* test: Bourne Shell Builtins. + (line 275) +* times: Bourne Shell Builtins. + (line 360) +* trap: Bourne Shell Builtins. + (line 366) +* type: Bash Builtins. (line 599) +* typeset: Bash Builtins. (line 631) +* ulimit: Bash Builtins. (line 637) +* umask: Bourne Shell Builtins. + (line 415) +* unalias: Bash Builtins. (line 743) +* unset: Bourne Shell Builtins. + (line 433) +* wait: Job Control Builtins. + (line 76) + + +File: bashref.info, Node: Reserved Word Index, Next: Variable Index, Prev: Builtin Index, Up: Indexes + +D.2 Index of Shell Reserved Words +================================= + +[index] +* Menu: + +* !: Pipelines. (line 9) +* [[: Conditional Constructs. + (line 126) +* ]]: Conditional Constructs. + (line 126) +* {: Command Grouping. (line 21) +* }: Command Grouping. (line 21) +* 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 32) +* function: Shell Functions. (line 13) +* if: Conditional Constructs. + (line 7) +* in: Conditional Constructs. + (line 28) +* select: Conditional Constructs. + (line 84) +* then: Conditional Constructs. + (line 7) +* time: Pipelines. (line 9) +* until: Looping Constructs. (line 12) +* while: Looping Constructs. (line 22) + + +File: bashref.info, Node: Variable Index, Next: Function Index, Prev: Reserved Word Index, Up: Indexes + +D.3 Parameter and Variable Index +================================ + +[index] +* Menu: + +* !: Special Parameters. (line 55) +* #: Special Parameters. (line 39) +* $: Special Parameters. (line 51) +* $!: Special Parameters. (line 56) +* $#: Special Parameters. (line 40) +* $$: Special Parameters. (line 52) +* $*: Special Parameters. (line 10) +* $-: Special Parameters. (line 47) +* $0: Special Parameters. (line 61) +* $?: Special Parameters. (line 43) +* $@: Special Parameters. (line 23) +* $_: Bash Variables. (line 14) +* *: Special Parameters. (line 9) +* -: Special Parameters. (line 46) +* 0: Special Parameters. (line 60) +* ?: Special Parameters. (line 42) +* @: Special Parameters. (line 22) +* _: Bash Variables. (line 13) +* active-region-end-color: Readline Init File Syntax. + (line 51) +* active-region-start-color: Readline Init File Syntax. + (line 38) +* auto_resume: Job Control Variables. + (line 6) +* BASH: Bash Variables. (line 23) +* BASHOPTS: Bash Variables. (line 26) +* BASHPID: Bash Variables. (line 35) +* BASH_ALIASES: Bash Variables. (line 42) +* BASH_ARGC: Bash Variables. (line 51) +* BASH_ARGV: Bash Variables. (line 64) +* BASH_ARGV0: Bash Variables. (line 76) +* BASH_CMDS: Bash Variables. (line 84) +* BASH_COMMAND: Bash Variables. (line 93) +* BASH_COMPAT: Bash Variables. (line 100) +* BASH_ENV: Bash Variables. (line 116) +* BASH_EXECUTION_STRING: Bash Variables. (line 122) +* BASH_LINENO: Bash Variables. (line 125) +* BASH_LOADABLES_PATH: Bash Variables. (line 133) +* BASH_REMATCH: Bash Variables. (line 137) +* BASH_SOURCE: Bash Variables. (line 145) +* BASH_SUBSHELL: Bash Variables. (line 152) +* BASH_VERSINFO: Bash Variables. (line 158) +* BASH_VERSION: Bash Variables. (line 181) +* BASH_XTRACEFD: Bash Variables. (line 184) +* bell-style: Readline Init File Syntax. + (line 64) +* bind-tty-special-chars: Readline Init File Syntax. + (line 71) +* blink-matching-paren: Readline Init File Syntax. + (line 76) +* CDPATH: Bourne Shell Variables. + (line 9) +* CHILD_MAX: Bash Variables. (line 195) +* colored-completion-prefix: Readline Init File Syntax. + (line 81) +* colored-stats: Readline Init File Syntax. + (line 91) +* COLUMNS: Bash Variables. (line 202) +* comment-begin: Readline Init File Syntax. + (line 97) +* completion-display-width: Readline Init File Syntax. + (line 102) +* completion-ignore-case: Readline Init File Syntax. + (line 109) +* completion-map-case: Readline Init File Syntax. + (line 114) +* completion-prefix-display-length: Readline Init File Syntax. + (line 120) +* completion-query-items: Readline Init File Syntax. + (line 127) +* COMPREPLY: Bash Variables. (line 254) +* COMP_CWORD: Bash Variables. (line 208) +* COMP_KEY: Bash Variables. (line 237) +* COMP_LINE: Bash Variables. (line 214) +* COMP_POINT: Bash Variables. (line 219) +* COMP_TYPE: Bash Variables. (line 227) +* COMP_WORDBREAKS: Bash Variables. (line 241) +* COMP_WORDS: Bash Variables. (line 247) +* convert-meta: Readline Init File Syntax. + (line 138) +* COPROC: Bash Variables. (line 260) +* DIRSTACK: Bash Variables. (line 264) +* disable-completion: Readline Init File Syntax. + (line 148) +* echo-control-characters: Readline Init File Syntax. + (line 153) +* editing-mode: Readline Init File Syntax. + (line 158) +* EMACS: Bash Variables. (line 274) +* emacs-mode-string: Readline Init File Syntax. + (line 164) +* enable-active-region: Readline Init File Syntax. + (line 174) +* enable-bracketed-paste: Readline Init File Syntax. + (line 187) +* enable-keypad: Readline Init File Syntax. + (line 196) +* ENV: Bash Variables. (line 279) +* EPOCHREALTIME: Bash Variables. (line 284) +* EPOCHSECONDS: Bash Variables. (line 292) +* EUID: Bash Variables. (line 299) +* EXECIGNORE: Bash Variables. (line 303) +* expand-tilde: Readline Init File Syntax. + (line 207) +* FCEDIT: Bash Variables. (line 316) +* FIGNORE: Bash Variables. (line 320) +* FUNCNAME: Bash Variables. (line 326) +* FUNCNEST: Bash Variables. (line 343) +* GLOBIGNORE: Bash Variables. (line 348) +* GROUPS: Bash Variables. (line 355) +* histchars: Bash Variables. (line 361) +* HISTCMD: Bash Variables. (line 376) +* HISTCONTROL: Bash Variables. (line 382) +* HISTFILE: Bash Variables. (line 398) +* HISTFILESIZE: Bash Variables. (line 402) +* HISTIGNORE: Bash Variables. (line 413) +* history-preserve-point: Readline Init File Syntax. + (line 211) +* history-size: Readline Init File Syntax. + (line 217) +* HISTSIZE: Bash Variables. (line 433) +* HISTTIMEFORMAT: Bash Variables. (line 440) +* HOME: Bourne Shell Variables. + (line 13) +* horizontal-scroll-mode: Readline Init File Syntax. + (line 226) +* HOSTFILE: Bash Variables. (line 448) +* HOSTNAME: Bash Variables. (line 459) +* HOSTTYPE: Bash Variables. (line 462) +* IFS: Bourne Shell Variables. + (line 18) +* IGNOREEOF: Bash Variables. (line 465) +* input-meta: Readline Init File Syntax. + (line 235) +* INPUTRC: Bash Variables. (line 475) +* INSIDE_EMACS: Bash Variables. (line 479) +* isearch-terminators: Readline Init File Syntax. + (line 245) +* keymap: Readline Init File Syntax. + (line 252) +* LANG: Creating Internationalized Scripts. + (line 51) +* LANG <1>: Bash Variables. (line 485) +* LC_ALL: Bash Variables. (line 489) +* LC_COLLATE: Bash Variables. (line 493) +* LC_CTYPE: Bash Variables. (line 500) +* LC_MESSAGES: Creating Internationalized Scripts. + (line 51) +* LC_MESSAGES <1>: Bash Variables. (line 505) +* LC_NUMERIC: Bash Variables. (line 509) +* LC_TIME: Bash Variables. (line 513) +* LINENO: Bash Variables. (line 517) +* LINES: Bash Variables. (line 522) +* MACHTYPE: Bash Variables. (line 528) +* MAIL: Bourne Shell Variables. + (line 22) +* MAILCHECK: Bash Variables. (line 532) +* MAILPATH: Bourne Shell Variables. + (line 27) +* MAPFILE: Bash Variables. (line 540) +* mark-modified-lines: Readline Init File Syntax. + (line 282) +* mark-symlinked-directories: Readline Init File Syntax. + (line 287) +* match-hidden-files: Readline Init File Syntax. + (line 292) +* menu-complete-display-prefix: Readline Init File Syntax. + (line 299) +* meta-flag: Readline Init File Syntax. + (line 235) +* OLDPWD: Bash Variables. (line 544) +* OPTARG: Bourne Shell Variables. + (line 34) +* OPTERR: Bash Variables. (line 547) +* OPTIND: Bourne Shell Variables. + (line 38) +* OSTYPE: Bash Variables. (line 551) +* output-meta: Readline Init File Syntax. + (line 304) +* page-completions: Readline Init File Syntax. + (line 312) +* PATH: Bourne Shell Variables. + (line 42) +* PIPESTATUS: Bash Variables. (line 554) +* POSIXLY_CORRECT: Bash Variables. (line 559) +* PPID: Bash Variables. (line 569) +* PROMPT_COMMAND: Bash Variables. (line 573) +* PROMPT_DIRTRIM: Bash Variables. (line 579) +* PS0: Bash Variables. (line 585) +* PS1: Bourne Shell Variables. + (line 48) +* PS2: Bourne Shell Variables. + (line 53) +* PS3: Bash Variables. (line 590) +* PS4: Bash Variables. (line 595) +* PWD: Bash Variables. (line 603) +* RANDOM: Bash Variables. (line 606) +* READLINE_ARGUMENT: Bash Variables. (line 612) +* READLINE_LINE: Bash Variables. (line 616) +* READLINE_MARK: Bash Variables. (line 620) +* READLINE_POINT: Bash Variables. (line 626) +* REPLY: Bash Variables. (line 630) +* revert-all-at-newline: Readline Init File Syntax. + (line 322) +* SECONDS: Bash Variables. (line 633) +* SHELL: Bash Variables. (line 642) +* SHELLOPTS: Bash Variables. (line 647) +* SHLVL: Bash Variables. (line 656) +* show-all-if-ambiguous: Readline Init File Syntax. + (line 329) +* show-all-if-unmodified: Readline Init File Syntax. + (line 335) +* show-mode-in-prompt: Readline Init File Syntax. + (line 344) +* skip-completed-text: Readline Init File Syntax. + (line 350) +* SRANDOM: Bash Variables. (line 661) +* TEXTDOMAIN: Creating Internationalized Scripts. + (line 51) +* TEXTDOMAINDIR: Creating Internationalized Scripts. + (line 51) +* TIMEFORMAT: Bash Variables. (line 670) +* TMOUT: Bash Variables. (line 708) +* TMPDIR: Bash Variables. (line 720) +* UID: Bash Variables. (line 724) +* vi-cmd-mode-string: Readline Init File Syntax. + (line 363) +* vi-ins-mode-string: Readline Init File Syntax. + (line 374) +* visible-stats: Readline Init File Syntax. + (line 385) + + +File: bashref.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes + +D.4 Function Index +================== + +[index] +* Menu: + +* abort (C-g): Miscellaneous Commands. + (line 10) +* accept-line (Newline or Return): Commands For History. + (line 6) +* alias-expand-line (): Miscellaneous Commands. + (line 131) +* backward-char (C-b): Commands For Moving. (line 15) +* backward-delete-char (Rubout): Commands For Text. (line 17) +* backward-kill-line (C-x Rubout): Commands For Killing. + (line 11) +* backward-kill-word (M-): Commands For Killing. + (line 28) +* 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) +* bracketed-paste-begin (): Commands For Text. (line 33) +* call-last-kbd-macro (C-x e): Keyboard Macros. (line 13) +* capitalize-word (M-c): Commands For Text. (line 66) +* character-search (C-]): Miscellaneous Commands. + (line 42) +* character-search-backward (M-C-]): Miscellaneous Commands. + (line 47) +* clear-display (M-C-l): Commands For Moving. (line 48) +* clear-screen (C-l): Commands For Moving. (line 53) +* complete (): Commands For Completion. + (line 6) +* complete-command (M-!): Commands For Completion. + (line 80) +* complete-filename (M-/): Commands For Completion. + (line 49) +* complete-hostname (M-@): Commands For Completion. + (line 72) +* complete-into-braces (M-{): Commands For Completion. + (line 100) +* complete-username (M-~): Commands For Completion. + (line 56) +* complete-variable (M-$): Commands For Completion. + (line 64) +* copy-backward-word (): Commands For Killing. + (line 69) +* copy-forward-word (): Commands For Killing. + (line 74) +* copy-region-as-kill (): Commands For Killing. + (line 65) +* dabbrev-expand (): Commands For Completion. + (line 95) +* delete-char (C-d): Commands For Text. (line 12) +* delete-char-or-list (): Commands For Completion. + (line 43) +* delete-horizontal-space (): Commands For Killing. + (line 57) +* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6) +* display-shell-version (C-x C-v): Miscellaneous Commands. + (line 116) +* do-lowercase-version (M-A, M-B, M-X, ...): Miscellaneous Commands. + (line 14) +* downcase-word (M-l): Commands For Text. (line 62) +* dump-functions (): Miscellaneous Commands. + (line 74) +* dump-macros (): Miscellaneous Commands. + (line 86) +* dump-variables (): Miscellaneous Commands. + (line 80) +* dynamic-complete-history (M-): Commands For Completion. + (line 90) +* edit-and-execute-command (C-x C-e): Miscellaneous Commands. + (line 140) +* end-kbd-macro (C-x )): Keyboard Macros. (line 9) +* end-of-file (usually C-d): Commands For Text. (line 6) +* 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 37) +* fetch-history (): Commands For History. + (line 103) +* forward-backward-delete-char (): Commands For Text. (line 21) +* forward-char (C-f): Commands For Moving. (line 12) +* forward-search-history (C-s): Commands For History. + (line 33) +* forward-word (M-f): Commands For Moving. (line 18) +* glob-complete-word (M-g): Miscellaneous Commands. + (line 98) +* glob-expand-word (C-x *): Miscellaneous Commands. + (line 104) +* glob-list-expansions (C-x g): Miscellaneous Commands. + (line 110) +* history-and-alias-expand-line (): Miscellaneous Commands. + (line 134) +* history-expand-line (M-^): Miscellaneous Commands. + (line 124) +* history-search-backward (): Commands For History. + (line 57) +* history-search-forward (): Commands For History. + (line 51) +* history-substring-search-backward (): Commands For History. + (line 69) +* history-substring-search-forward (): Commands For History. + (line 63) +* insert-comment (M-#): Miscellaneous Commands. + (line 61) +* insert-completions (M-*): Commands For Completion. + (line 22) +* insert-last-argument (M-. or M-_): Miscellaneous Commands. + (line 137) +* kill-line (C-k): Commands For Killing. + (line 6) +* kill-region (): Commands For Killing. + (line 61) +* kill-whole-line (): Commands For Killing. + (line 19) +* kill-word (M-d): Commands For Killing. + (line 23) +* magic-space (): Miscellaneous Commands. + (line 127) +* menu-complete (): Commands For Completion. + (line 26) +* menu-complete-backward (): Commands For Completion. + (line 38) +* next-history (C-n): Commands For History. + (line 17) +* next-screen-line (): Commands For Moving. (line 41) +* non-incremental-forward-search-history (M-n): Commands For History. + (line 45) +* non-incremental-reverse-search-history (M-p): Commands For History. + (line 39) +* operate-and-get-next (C-o): Commands For History. + (line 96) +* overwrite-mode (): Commands For Text. (line 70) +* possible-command-completions (C-x !): Commands For Completion. + (line 86) +* possible-completions (M-?): Commands For Completion. + (line 15) +* possible-filename-completions (C-x /): Commands For Completion. + (line 52) +* possible-hostname-completions (C-x @): Commands For Completion. + (line 76) +* possible-username-completions (C-x ~): Commands For Completion. + (line 60) +* possible-variable-completions (C-x $): Commands For Completion. + (line 68) +* prefix-meta (): Miscellaneous Commands. + (line 19) +* previous-history (C-p): Commands For History. + (line 13) +* previous-screen-line (): Commands For Moving. (line 34) +* print-last-kbd-macro (): Keyboard Macros. (line 17) +* quoted-insert (C-q or C-v): Commands For Text. (line 26) +* re-read-init-file (C-x C-r): Miscellaneous Commands. + (line 6) +* redraw-current-line (): Commands For Moving. (line 57) +* reverse-search-history (C-r): Commands For History. + (line 27) +* revert-line (M-r): Miscellaneous Commands. + (line 26) +* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 30) +* set-mark (C-@): Miscellaneous Commands. + (line 33) +* shell-backward-kill-word (): Commands For Killing. + (line 37) +* shell-backward-word (M-C-b): Commands For Moving. (line 30) +* shell-expand-line (M-C-e): Miscellaneous Commands. + (line 119) +* shell-forward-word (M-C-f): Commands For Moving. (line 26) +* shell-kill-word (M-C-d): Commands For Killing. + (line 32) +* shell-transpose-words (M-C-t): Commands For Killing. + (line 41) +* skip-csi-sequence (): Miscellaneous Commands. + (line 52) +* spell-correct-word (C-x s): Miscellaneous Commands. + (line 92) +* start-kbd-macro (C-x (): Keyboard Macros. (line 6) +* tilde-expand (M-&): Miscellaneous Commands. + (line 30) +* transpose-chars (C-t): Commands For Text. (line 47) +* transpose-words (M-t): Commands For Text. (line 53) +* undo (C-_ or C-x C-u): Miscellaneous Commands. + (line 23) +* universal-argument (): Numeric Arguments. (line 10) +* unix-filename-rubout (): Commands For Killing. + (line 52) +* unix-line-discard (C-u): Commands For Killing. + (line 16) +* unix-word-rubout (C-w): Commands For Killing. + (line 48) +* upcase-word (M-u): Commands For Text. (line 58) +* yank (C-y): Commands For Killing. + (line 79) +* yank-last-arg (M-. or M-_): Commands For History. + (line 84) +* yank-nth-arg (M-C-y): Commands For History. + (line 75) +* yank-pop (M-y): Commands For Killing. + (line 82) + + +File: bashref.info, Node: Concept Index, Prev: Function Index, Up: Indexes + +D.5 Concept Index +================= + +[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) +* Compatibility Level: Shell Compatibility Mode. + (line 6) +* Compatibility Mode: Shell Compatibility Mode. + (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: Definitions. (line 26) +* exit status <1>: Exit Status. (line 6) +* 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 8) +* history expansion: History Interaction. (line 6) +* history list: Bash History Facilities. + (line 6) +* History, how to use: A Programmable Completion Example. + (line 113) +* 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: Invoking Bash. (line 131) +* interactive shell <1>: Interactive Shells. (line 6) +* internationalization: Locale Translation. (line 6) +* internationalized scripts: Creating Internationalized Scripts. + (line 3) +* job: Definitions. (line 38) +* job control: Definitions. (line 42) +* job control <1>: Job Control Basics. (line 6) +* kill ring: Readline Killing Commands. + (line 18) +* killing text: Readline Killing Commands. + (line 6) +* localization: Locale Translation. (line 6) +* login shell: Invoking Bash. (line 128) +* 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: Controlling the Prompt. + (line 6) +* quoting: Quoting. (line 6) +* quoting, ANSI: ANSI-C Quoting. (line 6) +* Readline, how to use: Job Control Variables. + (line 23) +* redirection: Redirections. (line 6) +* reserved word: Definitions. (line 70) +* reserved words: Reserved Words. (line 6) +* 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: Definitions. (line 82) +* special builtin <1>: Special Builtins. (line 6) +* startup files: Bash Startup Files. (line 6) +* string translations: Creating Internationalized Scripts. + (line 3) +* 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: Top899 +Node: Introduction2821 +Node: What is Bash?3037 +Node: What is a shell?4151 +Node: Definitions6689 +Node: Basic Shell Features9640 +Node: Shell Syntax10859 +Node: Shell Operation11885 +Node: Quoting13178 +Node: Escape Character14482 +Node: Single Quotes14967 +Node: Double Quotes15315 +Node: ANSI-C Quoting16593 +Node: Locale Translation17903 +Node: Creating Internationalized Scripts19214 +Node: Comments23331 +Node: Shell Commands23949 +Node: Reserved Words24887 +Node: Simple Commands25643 +Node: Pipelines26297 +Node: Lists29296 +Node: Compound Commands31091 +Node: Looping Constructs32103 +Node: Conditional Constructs34598 +Node: Command Grouping49086 +Node: Coprocesses50564 +Node: GNU Parallel53227 +Node: Shell Functions54144 +Node: Shell Parameters62029 +Node: Positional Parameters66417 +Node: Special Parameters67319 +Node: Shell Expansions70533 +Node: Brace Expansion72660 +Node: Tilde Expansion75394 +Node: Shell Parameter Expansion78015 +Node: Command Substitution96366 +Node: Arithmetic Expansion97721 +Node: Process Substitution98689 +Node: Word Splitting99809 +Node: Filename Expansion101753 +Node: Pattern Matching104502 +Node: Quote Removal109504 +Node: Redirections109799 +Node: Executing Commands119459 +Node: Simple Command Expansion120129 +Node: Command Search and Execution122239 +Node: Command Execution Environment124617 +Node: Environment127652 +Node: Exit Status129315 +Node: Signals131099 +Node: Shell Scripts134548 +Node: Shell Builtin Commands137575 +Node: Bourne Shell Builtins139613 +Node: Bash Builtins161079 +Node: Modifying Shell Behavior191935 +Node: The Set Builtin192280 +Node: The Shopt Builtin202881 +Node: Special Builtins218793 +Node: Shell Variables219772 +Node: Bourne Shell Variables220209 +Node: Bash Variables222313 +Node: Bash Features255128 +Node: Invoking Bash256141 +Node: Bash Startup Files262154 +Node: Interactive Shells267285 +Node: What is an Interactive Shell?267696 +Node: Is this Shell Interactive?268345 +Node: Interactive Shell Behavior269160 +Node: Bash Conditional Expressions272789 +Node: Shell Arithmetic277431 +Node: Aliases280375 +Node: Arrays282988 +Node: The Directory Stack289379 +Node: Directory Stack Builtins290163 +Node: Controlling the Prompt294423 +Node: The Restricted Shell297388 +Node: Bash POSIX Mode299998 +Node: Shell Compatibility Mode311916 +Node: Job Control320483 +Node: Job Control Basics320943 +Node: Job Control Builtins325945 +Node: Job Control Variables331740 +Node: Command Line Editing332896 +Node: Introduction and Notation334567 +Node: Readline Interaction336190 +Node: Readline Bare Essentials337381 +Node: Readline Movement Commands339170 +Node: Readline Killing Commands340130 +Node: Readline Arguments342051 +Node: Searching343095 +Node: Readline Init File345281 +Node: Readline Init File Syntax346542 +Node: Conditional Init Constructs370128 +Node: Sample Init File374324 +Node: Bindable Readline Commands377448 +Node: Commands For Moving378652 +Node: Commands For History380703 +Node: Commands For Text385697 +Node: Commands For Killing389346 +Node: Numeric Arguments392379 +Node: Commands For Completion393518 +Node: Keyboard Macros397709 +Node: Miscellaneous Commands398397 +Node: Readline vi Mode404342 +Node: Programmable Completion405249 +Node: Programmable Completion Builtins413029 +Node: A Programmable Completion Example423781 +Node: Using History Interactively429029 +Node: Bash History Facilities429713 +Node: Bash History Builtins432718 +Node: History Interaction437742 +Node: Event Designators441362 +Node: Word Designators442716 +Node: Modifiers444476 +Node: Installing Bash446284 +Node: Basic Installation447421 +Node: Compilers and Options451143 +Node: Compiling For Multiple Architectures451884 +Node: Installation Names453576 +Node: Specifying the System Type455685 +Node: Sharing Defaults456402 +Node: Operation Controls457075 +Node: Optional Features458033 +Node: Reporting Bugs469252 +Node: Major Differences From The Bourne Shell470527 +Node: GNU Free Documentation License487376 +Node: Indexes512553 +Node: Builtin Index513007 +Node: Reserved Word Index519834 +Node: Variable Index522282 +Node: Function Index539056 +Node: Concept Index552840 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/doc/bashref.pdf b/doc/bashref.pdf new file mode 100644 index 0000000..eb8b766 Binary files /dev/null and b/doc/bashref.pdf differ diff --git a/doc/bashref.ps b/doc/bashref.ps new file mode 100644 index 0000000..02ab1d3 Binary files /dev/null and b/doc/bashref.ps differ diff --git a/doc/bashref.texi b/doc/bashref.texi new file mode 100644 index 0000000..b0dc2fa --- /dev/null +++ b/doc/bashref.texi @@ -0,0 +1,10129 @@ +\input texinfo.tex @c -*- texinfo -*- +@c %**start of header +@setfilename bashref.info +@settitle Bash Reference Manual + +@include version.texi +@c %**end of header + +@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--2022 Free Software Foundation, Inc. + +@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, 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 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 + +@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}). +The Bash home page is @url{http://www.gnu.org/software/bash/}. + +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, noting which features were inspired by other shells and +which are specific to Bash. + +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{|}, @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{space}, @code{tab}, @code{newline}, 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 +@dfn{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 +@dfn{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{!}. +When the shell is in +@sc{posix} mode (@pxref{Bash POSIX Mode}), +the @samp{!} has no special meaning +within double quotes, even when history expansion is enabled. +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 + +Character sequences of the form $'@var{string}' are treated as a special +kind of single quotes. +The sequence expands to @var{string}, with backslash-escaped characters +in @var{string} 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 \? +question mark +@item \@var{nnn} +the eight-bit character whose value is the octal value @var{nnn} +(one 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) +@item \u@var{HHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHH} (one to four hex digits) +@item \U@var{HHHHHHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHHHHHH} (one to eight 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 +@menu +* Creating Internationalized Scripts:: How to use translations and different + languages in your scripts. +@end menu + +Prefixing a double-quoted string with a dollar sign (@samp{$}), such +as @verb{|$"hello, world"|}, +will cause the string to be translated according to the current locale. +The @code{gettext} infrastructure performs the lookup and +translation, using the @code{LC_MESSAGES}, @code{TEXTDOMAINDIR}, +and @code{TEXTDOMAIN} shell variables, as explained below. +See the gettext documentation for additional details not covered here. +If the current locale is @code{C} or @code{POSIX}, +if there are no translations available, +of if the string is not translated, +the dollar sign is ignored. +Since this is a form of double quoting, the string remains double-quoted +by default, whether or not it is translated and replaced. +If the @code{noexpand_translation} option is enabled +using the @code{shopt} builtin (@pxref{The Shopt Builtin}), +translated strings are single-quoted instead of double-quoted. + +The rest of this section is a brief overview of how you use gettext to +create translations for strings in a shell script named @var{scriptname}. +There are more details in the gettext documentation. + +@node Creating Internationalized Scripts +@cindex internationalized scripts +@cindex string translations +Once you've marked the strings in your script +that you want to translate using $"...", +you create a gettext "template" file using the command + +@example +bash --dump-po-strings @var{scriptname} > @var{domain}.pot +@end example + +@noindent +The @var{domain} is your @dfn{message domain}. +It's just an arbitrary string that's used to identify the files gettext +needs, like a package or script name. +It needs to be unique among all +the message domains on systems where you install the translations, so +gettext knows which translations correspond to your script. +You'll use the template file to create translations for each target language. +The template file conventionally has the suffix @samp{.pot}. + +You copy this template file to a separate file for each target language +you want to support (called "PO" files, which use the suffix @samp{.po}). +PO files use various naming conventions, but +when you are working to translate a template file into a particular +language, you first copy the template file to a file whose name is the +language you want to target, with the @samp{.po} suffix. +For instance, the Spanish translations of your strings would be +in a file named @samp{es.po}, and to get started using a message +domain named "example," you would run + +@example +cp example.pot es.po +@end example + +@noindent +Ultimately, PO files are often named @var{domain}.po and installed in +directories that contain multiple translation files for a particular language. + +Whichever naming convention you choose, you will need to translate the +strings in the PO files into the appropriate languages. +This has to be done manually. + +When you have the translations and PO files complete, you'll use the +gettext tools to produce what are called "MO" files, which are compiled +versions of the PO files the gettext tools use to look up translations +efficiently. +MO files are also called "message catalog" files. +You use the @command{msgfmt} program to do this. +For instance, if you had a file with Spanish translations, you could run + +@example +msgfmt -o es.mo es.po +@end example + +@noindent +to produce the corresponding MO file. + +Once you have the MO files, you decide where to install them and use the +@code{TEXTDOMAINDIR} shell variable to tell the gettext tools where they are. +Make sure to use the same message domain to name the MO files +as you did for the PO files when you install them. + +@vindex LANG +@vindex LC_MESSAGES +@vindex TEXTDOMAIN +@vindex TEXTDOMAINDIR +Your users will use the @env{LANG} or @env{LC_MESSAGES} shell variables to +select the desired language. + +You set the @env{TEXTDOMAIN} variable to the script's message domain. +As above, you use the message domain to name your translation files. + +You, or possibly your users, set the @env{TEXTDOMAINDIR} variable to the +name of a directory where the message catalog files are stored. +If you install the message files into the system's standard message catalog +directory, you don't need to worry about this variable. + +The directory where the message catalog files are stored varies between +systems. +Some 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 the @samp{.mo} suffix. +If you use the @env{TEXTDOMAIN} variable, you may need to set the +@env{TEXTDOMAINDIR} variable to the location of the message catalog files, +as above. +It's common to use both variables in this fashion: +@env{$TEXTDOMAINDIR}/@env{$LC_MESSAGES}/LC_MESSAGES/@env{$TEXTDOMAIN}.mo. + +If you used that last convention, and you wanted to store the message +catalog files with Spanish (es) and Esperanto (eo) translations into a +local directory you use for custom translation files, you could run + +@example +TEXTDOMAIN=example +TEXTDOMAINDIR=/usr/local/share/locale + +cp es.mo $@{TEXTDOMAINDIR@}/es/LC_MESSAGES/$@{TEXTDOMAIN@}.mo +cp eo.mo $@{TEXTDOMAINDIR@}/eo/LC_MESSAGES/$@{TEXTDOMAIN@}.mo +@end example + +When all of this is done, and the message catalog files containing the +compiled translations are installed in the correct location, +your users will be able to see translated strings +in any of the supported languages by setting the @env{LANG} or +@env{LC_MESSAGES} environment variables before running your script. + +@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 +* Reserved Words:: Words that have special meaning to the shell. +* 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. +* GNU Parallel:: Running commands in parallel. +@end menu + +@node Reserved Words +@subsection Reserved Words +@cindex reserved words + +Reserved words are words that have special meaning to the shell. +They are used to begin and end the shell's compound commands. + +The following words are recognized as reserved when unquoted and +the first word of a command (see below for exceptions): + +@multitable @columnfractions .1 .1 .1 .1 .12 .1 +@item @code{if} @tab @code{then} @tab @code{elif} +@tab @code{else} @tab @code{fi} @tab @code{time} +@item @code{for} @tab @code{in} @tab @code{until} +@tab @code{while} @tab @code{do} @tab @code{done} +@item @code{case} @tab @code{esac} @tab @code{coproc} +@tab @code{select} @tab @code{function} +@item @code{@{} @tab @code{@}} @tab @code{[[} @tab @code{]]} @tab @code{!} +@end multitable + +@noindent +@code{in} is recognized as a reserved word if it is the third word of a +@code{case} or @code{select} command. +@code{in} and @code{do} are recognized as reserved +words if they are the third word in a @code{for} command. + +@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 one or more commands separated by +one of the control operators @samp{|} or @samp{|&}. + +@rwindex time +@rwindex ! +@cindex command timing +The format for a pipeline is +@example +[time [-p]] [!] @var{command1} [ | or |& @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 +@var{command1}. + +If @samp{|&} is used, @var{command1}'s standard error, in addition to +its standard output, 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 to the standard output is +performed after any redirections specified by @var{command1}. + +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}. +When the shell is in @sc{posix} mode (@pxref{Bash POSIX Mode}), +it does not recognize @code{time} as a reserved word if the next +token begins with a @samp{-}. +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. + +When the shell is in @sc{posix} mode (@pxref{Bash POSIX Mode}), @code{time} +may be followed by a newline. In this case, the shell displays the +total user and system time consumed by the shell and its children. +The @env{TIMEFORMAT} variable may be used to specify the format of +the time information. + +If the pipeline is not executed asynchronously (@pxref{Lists}), the +shell waits for all commands in the pipeline to complete. + +Each command in a multi-command pipeline, +where pipes are created, +is executed in its own @dfn{subshell}, which is a +separate process (@pxref{Command Execution Environment}). +If the @code{lastpipe} option is enabled using the @code{shopt} builtin +(@pxref{The Shopt Builtin}), +the last element of a pipeline may be run by the shell process +when job control is not active. + +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 @dfn{background}, +and these are referred to as @dfn{asynchronous} commands. +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 (success). + +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 language 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. + +In most cases a list of commands in a compound command's description may be +separated from the rest of the command by one or more newlines, and may be +followed by a newline in place of a semicolon. + +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} (@pxref{Shell Expansions}), 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{commands} +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 +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}. +The match is performed according +to the rules described below in @ref{Pattern Matching}. +If the @code{nocasematch} shell option +(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 +(@pxref{Shell Parameter Expansion}) +before matching is attempted. +Each @var{pattern} undergoes tilde expansion, parameter expansion, +command substitution, arithmetic expansion, process substitution, and +quote removal. + +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. +It's a common idiom to use @samp{*} as the final pattern to define the +default case, since that pattern will always match. + +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, +continuing the case statement execution as if the pattern list had not matched. + +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, and 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. +@code{select} then displays the @env{PS3} +prompt and reads a line 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 and returns 1. +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}). +The @var{expression} undergoes the same expansions +as if it were within double quotes, +but double quote characters in @var{expression} are not treated specially +are removed. +If the value of the expression is non-zero, the return status is 0; +otherwise the return status is 1. + + +@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}. +The words between the @code{[[} and @code{]]} do not undergo word splitting +and filename expansion. +The shell performs tilde expansion, parameter and +variable expansion, arithmetic expansion, command substitution, process +substitution, and quote removal on those words +(the expansions that would occur if the words were enclosed in double quotes). +Conditional operators such as @samp{-f} must be unquoted to be recognized +as primaries. + +When used with @code{[[}, 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}, +as if the @code{extglob} shell option were enabled. +The @samp{=} operator is identical to @samp{==}. +If the @code{nocasematch} shell option +(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. + +If you quote any part of the pattern, +using any of the shell's quoting mechanisms, +the quoted portion is matched literally. +This means every character in the quoted portion matches itself, +instead of having any special pattern matching meaning. + +An additional binary operator, @samp{=~}, is available, with the same +precedence as @samp{==} and @samp{!=}. +When you use @samp{=~}, the string to the right of the operator is considered +a @sc{posix} extended regular expression pattern and matched accordingly +(using the @sc{posix} @code{regcomp} and @code{regexec} interfaces +usually described in @i{regex}(3)). +The return value is 0 if the string matches the pattern, and 1 if it does not. +If the regular expression is syntactically incorrect, the conditional +expression returns 2. +If the @code{nocasematch} shell option +(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. + +You can quote any part of the pattern +to force the quoted portion to be matched literally +instead of as a regular expression (see above). +If the pattern is stored in a shell variable, quoting the variable +expansion forces the entire pattern to be matched literally. + +The pattern will match if it matches any part of the string. +If you want to force the pattern to match the entire string, +anchor the pattern using the @samp{^} and @samp{$} regular expression +operators. + +For example, the following will match a line +(stored in the shell variable @code{line}) +if there is a sequence of characters anywhere in the value consisting of +any number, including zero, of +characters in the @code{space} character class, +immediately followed by zero or one instances of @samp{a}, +then a @samp{b}: + +@example +[[ $line =~ [[:space:]]*(a)?b ]] +@end example + +@noindent +That means values for @code{line} like +@samp{aab}, @samp{ aaaaaab}, @samp{xaby}, and @samp{ ab} +will all match, +as will a line containing a @samp{b} anywhere in its value. + +If you want to match a character that's special to the regular expression +grammar (@samp{^$|[]()\.*+?}), it has to be quoted to remove its special +meaning. +This means that in the pattern @samp{xxx.txt}, the @samp{.} matches any +character in the string (its usual regular expression meaning), but in the +pattern @samp{"xxx.txt"}, it can only match a literal @samp{.}. + +Likewise, if you want to include a character in your pattern that has a +special meaning to the regular expression grammar, you must make sure it's +not quoted. +If you want to anchor a pattern at the beginning or end of the string, +for instance, you cannot quote the @samp{^} or @samp{$} +characters using any form of shell quoting. + +If you want to match @samp{initial string} at the start of a line, +the following will work: +@example +[[ $line =~ ^"initial string" ]] +@end example +@noindent +but this will not: +@example +[[ $line =~ "^initial string" ]] +@end example +@noindent +because in the second example the @samp{^} is quoted and doesn't have its +usual special meaning. + +It is sometimes difficult to specify a regular expression properly +without using quotes, or to keep track of the quoting used by regular +expressions while paying attention to +shell quoting and the shell's quote removal. +Storing the regular expression in a shell variable is often a useful +way to avoid problems with quoting characters that are special to the +shell. +For example, the following is equivalent to the pattern used above: + +@example +pattern='[[:space:]]*(a)?b' +[[ $line =~ $pattern ]] +@end example + +Shell programmers should take special care with backslashes, since +backslashes are used by both the shell and regular expressions to remove +the special meaning from the following character. +This means that after the shell's word expansions complete +(@pxref{Shell Expansions}), +any backslashes remaining in parts of the pattern +that were originally not quoted can remove the +special meaning of pattern characters. +If any part of the pattern is quoted, the shell does its best to ensure that +the regular expression treats those remaining backslashes as literal, +if they appeared in a quoted portion. + +The following two sets of commands are @emph{not} equivalent: + +@example +pattern='\.' + +[[ . =~ $pattern ]] +[[ . =~ \. ]] + +[[ . =~ "$pattern" ]] +[[ . =~ '\.' ]] +@end example + +@noindent +The first two matches will succeed, but the second two will not, because +in the second two the backslash will be part of the pattern to be matched. +In the first two examples, the pattern passed to the regular expression +parser is @samp{\.}. The backslash removes the special meaning from +@samp{.}, so the literal @samp{.} matches. +In the second two examples, the pattern passed to the regular expression +parser has the backslash quoted (e.g., @samp{\\\.}), which will not match +the string, since it does not contain a backslash. +If the string in the first examples were anything other than @samp{.}, say +@samp{a}, the pattern would not match, because the quoted @samp{.} in the +pattern loses its special meaning of matching any single character. + +Bracket expressions in regular expressions can be sources of errors as well, +since characters that are normally special in regular expressions +lose their special meanings between brackets. +However, you can use bracket expressions to match special pattern characters +without quoting them, so they are sometimes useful for this purpose. + +Though it might seem like a strange way to write it, the following pattern +will match a @samp{.} in the string: + +@example +[[ . =~ [.] ]] +@end example + +The shell performs any word expansions before passing the pattern +to the regular expression functions, +so you can assume that the shell's quoting takes precedence. +As noted above, the regular expression parser will interpret any +unquoted backslashes remaining in the pattern after shell expansion +according to its own rules. +The intention is to avoid making shell programmers quote things twice +as much as possible, so shell quoting should be sufficient to quote +special pattern characters where that's necessary. + +The array variable @code{BASH_REMATCH} records which parts of the string +matched the pattern. +The element of @code{BASH_REMATCH} with index 0 contains the portion of +the string matching the entire regular expression. +Substrings matched by parenthesized subexpressions within the regular +expression are saved in the remaining @code{BASH_REMATCH} indices. +The element of @code{BASH_REMATCH} with index @var{n} is the portion of the +string matching the @var{n}th parenthesized subexpression. + +Bash sets +@code{BASH_REMATCH} +in the global scope; declaring it as a local variable will lead to +unexpected results. + +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 forces the shell to create +a subshell (@pxref{Command Execution Environment}), and each +of the commands in @var{list} is executed in that subshell environment. +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 reserved words, so they must be separated from the @var{list} +by @code{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 @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 syntax for a coprocess is: + +@example +coproc [@var{NAME}] @var{command} [@var{redirections}] +@end example + +@noindent +This creates a coprocess named @var{NAME}. +@var{command} may be either a simple command (@pxref{Simple Commands}) +or a compound command (@pxref{Compound Commands}). +@var{NAME} is a shell variable name. +If @var{NAME} is not supplied, the default name is @code{COPROC}. + +The recommended form to use for a coprocess is + +@example +coproc @var{NAME} @{ @var{command}; @} +@end example + +@noindent +This form is recommended because simple commands result in the coprocess +always being named @code{COPROC}, and it is simpler to use and more complete +than the other compound commands. + +There are other forms of coprocesses: + +@example +coproc @var{NAME} @var{compound-command} +coproc @var{compound-command} +coproc @var{simple-command} +@end example + +@noindent +If @var{command} is a compound command, @var{NAME} is optional. The +word following @code{coproc} determines whether that word is interpreted +as a variable name: it is interpreted as @var{NAME} if it is not a +reserved word that introduces a compound command. +If @var{command} is a simple command, @var{NAME} is not allowed; this +is to avoid confusion between @var{NAME} and the first word of the simple +command. + +When the coprocess 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. +Other than those created to execute command and process substitutions, +the file descriptors are not available in subshells. + +The process ID of the shell spawned to execute the coprocess is +available as the value of the variable @env{@var{NAME}_PID}. +The @code{wait} +builtin command may be used to wait for the coprocess to terminate. + +Since the coprocess is created as an asynchronous command, +the @code{coproc} command always returns success. +The return status of a coprocess is the exit status of @var{command}. + +@node GNU Parallel +@subsection GNU Parallel + +There are ways to run commands in parallel that are not built into Bash. +GNU Parallel is a tool to do just that. + +GNU Parallel, as its name suggests, can be used to build and run commands +in parallel. You may run the same command with different arguments, whether +they are filenames, usernames, hostnames, or lines read from files. GNU +Parallel provides shorthand references to many of the most common operations +(input lines, various portions of the input line, different ways to specify +the input source, and so on). Parallel can replace @code{xargs} or feed +commands from its input sources to several different instances of Bash. + +For a complete description, refer to the GNU Parallel documentation, which +is available at +@url{https://www.gnu.org/software/parallel/parallel_tutorial.html}. + +@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 +@var{fname} () @var{compound-command} [ @var{redirections} ] +@end example + +or + +@example +function @var{fname} [()] @var{compound-command} [ @var{redirections} ] +@end example + +This defines a shell function named @var{fname}. The reserved +word @code{function} is optional. +If the @code{function} reserved +word is supplied, the parentheses are optional. +The @dfn{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. +If the @code{function} reserved word is used, but the +parentheses are not supplied, the braces are recommended. +@var{compound-command} is executed whenever @var{fname} is specified as the +name of a simple command. +When the shell is in @sc{posix} mode (@pxref{Bash POSIX Mode}), +@var{fname} must be a valid shell name and +may not be the same as one of the special builtins +(@pxref{Special Builtins}). +In default mode, a function name can be any unquoted shell word that does +not contain @samp{$}. +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. + +The @env{FUNCNEST} variable, if set to a numeric value greater +than 0, defines a maximum function nesting level. Function +invocations that exceed the limit cause the entire command to +abort. + +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 (@dfn{local variables}). +Ordinarily, variables and their values +are shared between a function and its caller. +These variables are visible only to +the function and the commands it invokes. This is particularly +important when a shell function calls other functions. + +In the following description, the @dfn{current scope} is a currently- +executing function. +Previous scopes consist of that function's caller and so on, +back to the "global" scope, where the shell is not executing +any shell function. +Consequently, a local variable at the current local scope is a variable +declared using the @code{local} or @code{declare} builtins in the +function that is currently executing. + +Local variables "shadow" variables with the same name declared at +previous scopes. For instance, a local variable declared in a function +hides a global variable of the same name: references and assignments +refer to the local variable, leaving the global variable unmodified. +When the function returns, the global variable is once again visible. + +The shell uses @dfn{dynamic scoping} to control a variable's visibility +within functions. +With dynamic scoping, visible variables and their values +are a result of the sequence of function calls that caused execution +to reach the current function. +The value of a variable that a function sees depends +on its value within its caller, if any, whether that caller is +the "global" scope or another shell function. +This is also the value that a local variable +declaration "shadows", and the value that is restored when the function +returns. + +For example, if a variable @env{var} is declared as local in function +@code{func1}, and @code{func1} calls another function @code{func2}, +references to @env{var} made from within @code{func2} will resolve to the +local variable @env{var} from @code{func1}, shadowing any global variable +named @env{var}. + +The following script demonstrates this behavior. +When executed, the script displays + +@example +In func2, var = func1 local +@end example + +@example +func1() +@{ + local var='func1 local' + func2 +@} + +func2() +@{ + echo "In func2, var = $var" +@} + +var=global +func1 +@end example + +The @code{unset} builtin also acts using the same dynamic scope: if a +variable is local to the current scope, @code{unset} will unset it; +otherwise the unset will refer to the variable found in any calling scope +as described above. +If a variable at the current local scope is unset, it will remain so +(appearing as unset) +until it is reset in that scope or until the function returns. +Once the function returns, any instance of the variable at a previous +scope will become visible. +If the unset acts on a variable at a previous scope, any instance of a +variable with that name that had been shadowed will become visible +(see below how @code{localvar_unset}shell option changes this behavior). + +Function names and definitions may be listed with the +@option{-f} option to the @code{declare} (@code{typeset}) +builtin command (@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 child shell processes +(those created when executing a separate shell invocation) +automatically have them defined with the +@option{-f} option to the @code{export} builtin +(@pxref{Bourne Shell Builtins}). + +Functions may be recursive. +The @code{FUNCNEST} variable may be used to limit the depth of the +function call stack and restrict the number of function invocations. +By default, 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 @dfn{parameter} is an entity that stores values. +It can be a @code{name}, a number, or one of the special characters +listed below. +A @dfn{variable} is a parameter denoted by a @code{name}. +A variable has a @code{value} and zero or more @code{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 (@pxref{Shell Parameter Expansion}). +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 and filename expansion are 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 (@dfn{declaration} commands). +When in @sc{posix} mode (@pxref{Bash POSIX Mode}), these builtins may appear +in a command after one or more instances of the @code{command} builtin +and retain these assignment statement properties. + +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. +This includes arguments to builtin commands such as @code{declare} that +accept assignment statements (declaration commands). +When @samp{+=} is applied to a variable for which the @code{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. + +A variable can be assigned the @code{nameref} attribute using the +@option{-n} option to the @code{declare} or @code{local} builtin commands +(@pxref{Bash Builtins}) +to create a @dfn{nameref}, or a reference to another variable. +This allows variables to be manipulated indirectly. +Whenever the nameref variable is referenced, assigned to, unset, or has +its attributes modified (other than using or changing the nameref +attribute itself), the +operation is actually performed on the variable specified by the nameref +variable's value. +A nameref is commonly used within shell functions to refer to a variable +whose name is passed as an argument to the function. +For instance, if a variable name is passed to a shell function as its first +argument, running +@example +declare -n ref=$1 +@end example +@noindent +inside the function creates a nameref variable @env{ref} whose value is +the variable name passed as the first argument. +References and assignments to @env{ref}, and changes to its attributes, +are treated as references, assignments, and attribute modifications +to the variable whose name was passed as @code{$1}. + +If the control variable in a @code{for} loop has the nameref attribute, +the list of words can be a list of shell variables, and a name reference +will be established for each word in the list, in turn, when the loop is +executed. +Array variables cannot be given the nameref attribute. +However, nameref variables can reference array variables and subscripted +array variables. +Namerefs can be unset using the @option{-n} option to the @code{unset} builtin +(@pxref{Bourne Shell Builtins}). +Otherwise, if @code{unset} is executed with the name of a nameref variable +as an argument, the variable referenced by the nameref variable will be unset. + +@node Positional Parameters +@subsection Positional Parameters +@cindex parameters, positional + +A @dfn{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 * +@vindex $* +($*) Expands to the positional parameters, starting from one. +When the expansion is not within double quotes, each positional parameter +expands to a separate word. +In contexts where it is performed, those words +are subject to further word splitting and filename expansion. +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 @@ +@vindex $@@ +($@@) Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the +expansion occurs within double quotes, and word splitting is performed, +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 # +@vindex $# +($#) Expands to the number of positional parameters in decimal. + +@item ? +@vindex $? +($?) Expands to the exit status of the most recently executed foreground +pipeline. + +@item - +@vindex $- +($-, 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 $ +@vindex $$ +($$) Expands to the process @sc{id} of the shell. In a subshell, it +expands to the process @sc{id} of the invoking shell, not the subshell. + +@item ! +@vindex $! +($!) Expands to the process @sc{id} of the job most recently placed into the +background, whether executed as an asynchronous command or using +the @code{bg} builtin (@pxref{Job Control Builtins}). + +@item 0 +@vindex $0 +($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. +@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 and variable expansion, 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: @dfn{process substitution}. +This is performed at the +same time as tilde, parameter, variable, and arithmetic expansion and +command substitution. + +After these expansions are performed, quote characters present in the +original word are removed unless they have been quoted themselves +(@dfn{quote removal}). + +Only brace expansion, word splitting, and filename expansion +can increase 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{"$@@"} and @code{$*} (@pxref{Special Parameters}), and +@code{"$@{@var{name}[@@]@}"} 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 +@dfn{filename expansion} (@pxref{Filename Expansion}), +but the filenames 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 sequence 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 letters, +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 letters are supplied, the expression expands to each character +lexicographically between @var{x} and @var{y}, inclusive, +using the default C locale. +Note that both @var{x} and @var{y} must be of the same type +(integer or letter). +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. + +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, +and inhibits brace expansion until the closing @samp{@}}. + +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 @dfn{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 @dfn{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 filenames 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 + +Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (@pxref{Shell Parameters}) +when they appear as arguments to simple commands. +Bash does not do this, except for the declaration commands listed +above, when in @sc{posix} mode. + +@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 @var{parameter} is a shell parameter as described above +(@pxref{Shell Parameters}) or an array reference (@pxref{Arrays}). +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 (!), +and @var{parameter} is not a nameref, +it introduces a level of indirection. +Bash uses the value formed by expanding the rest of +@var{parameter} as the new @var{parameter}; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original @var{parameter}. +This is known as @code{indirect expansion}. +The value is subject to tilde expansion, +parameter expansion, command substitution, and arithmetic expansion. +If @var{parameter} is a nameref, this expands to the name of the +variable referenced by @var{parameter} instead of performing the +complete 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 (e.g., @samp{:-}), 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. + +@example +$ v=123 +$ echo $@{v-unset@} +123 +@end example + +@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. + +@example +$ var= +$ : $@{var:=DEFAULT@} +$ echo $var +DEFAULT +@end example + +@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. + +@example +$ var= +$ : $@{var:?var is unset or null@} +bash: var: var is unset or null +@end example + +@item $@{@var{parameter}:+@var{word}@} +If @var{parameter} +is null or unset, nothing is substituted, otherwise the expansion of +@var{word} is substituted. + +@example +$ var=123 +$ echo $@{var:+var is set and not null@} +var is set and not null +@end example + +@item $@{@var{parameter}:@var{offset}@} +@itemx $@{@var{parameter}:@var{offset}:@var{length}@} +This is referred to as Substring Expansion. +It expands to up to @var{length} characters of the value of @var{parameter} +starting at the character specified by @var{offset}. +If @var{parameter} is @samp{@@} or @samp{*}, an indexed array subscripted by +@samp{@@} or @samp{*}, or an associative array name, the results differ as +described below. +If @var{length} is omitted, it expands to the substring of the value of +@var{parameter} starting at the character specified by @var{offset} +and extending to the end of the value. +@var{length} and @var{offset} are arithmetic expressions +(@pxref{Shell Arithmetic}). + +If @var{offset} evaluates to a number less than zero, the value +is used as an offset in characters +from the end of the value of @var{parameter}. +If @var{length} evaluates to a number less than zero, +it is interpreted as an offset in characters +from the end of the value of @var{parameter} rather than +a number of characters, and the expansion is the characters between +@var{offset} and that result. +Note that a negative offset must be separated from the colon by at least +one space to avoid being confused with the @samp{:-} expansion. + +Here are some examples illustrating substring expansion on parameters and +subscripted arrays: + +@verbatim +$ string=01234567890abcdefgh +$ echo ${string:7} +7890abcdefgh +$ echo ${string:7:0} + +$ echo ${string:7:2} +78 +$ echo ${string:7:-2} +7890abcdef +$ echo ${string: -7} +bcdefgh +$ echo ${string: -7:0} + +$ echo ${string: -7:2} +bc +$ echo ${string: -7:-2} +bcdef +$ set -- 01234567890abcdefgh +$ echo ${1:7} +7890abcdefgh +$ echo ${1:7:0} + +$ echo ${1:7:2} +78 +$ echo ${1:7:-2} +7890abcdef +$ echo ${1: -7} +bcdefgh +$ echo ${1: -7:0} + +$ echo ${1: -7:2} +bc +$ echo ${1: -7:-2} +bcdef +$ array[0]=01234567890abcdefgh +$ echo ${array[0]:7} +7890abcdefgh +$ echo ${array[0]:7:0} + +$ echo ${array[0]:7:2} +78 +$ echo ${array[0]:7:-2} +7890abcdef +$ echo ${array[0]: -7} +bcdefgh +$ echo ${array[0]: -7:0} + +$ echo ${array[0]: -7:2} +bc +$ echo ${array[0]: -7:-2} +bcdef +@end verbatim + +If @var{parameter} is @samp{@@} or @samp{*}, the result is @var{length} +positional parameters beginning at @var{offset}. +A negative @var{offset} is taken relative to one greater than the greatest +positional parameter, so an offset of -1 evaluates to the last positional +parameter. +It is an expansion error if @var{length} evaluates to a number less than zero. + +The following examples illustrate substring expansion using positional +parameters: + +@verbatim +$ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h +$ echo ${@:7} +7 8 9 0 a b c d e f g h +$ echo ${@:7:0} + +$ echo ${@:7:2} +7 8 +$ echo ${@:7:-2} +bash: -2: substring expression < 0 +$ echo ${@: -7:2} +b c +$ echo ${@:0} +./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h +$ echo ${@:0:2} +./bash 1 +$ echo ${@: -7:0} + +@end verbatim + +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. +It is an expansion error if @var{length} evaluates to a number less than zero. + +These examples show how you can use substring expansion with indexed +arrays: + +@verbatim +$ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h) +$ echo ${array[@]:7} +7 8 9 0 a b c d e f g h +$ echo ${array[@]:7:2} +7 8 +$ echo ${array[@]: -7:2} +b c +$ echo ${array[@]: -7:-2} +bash: -2: substring expression < 0 +$ echo ${array[@]:0} +0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h +$ echo ${array[@]:0:2} +0 1 +$ echo ${array[@]: -7:0} + +@end verbatim + +Substring expansion applied to an associative array produces undefined +results. + +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{$0} 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. +If @var{parameter} +is an indexed array name subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +@var{parameter}, so negative indices count back from the end of the +array, and an index of -1 references the last element. + +@item $@{@var{parameter}#@var{word}@} +@itemx $@{@var{parameter}##@var{word}@} +The @var{word} +is expanded to produce a pattern and matched according to the rules +described below (@pxref{Pattern Matching}). 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 and matched according to the rules +described below (@pxref{Pattern Matching}). +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}@} +@itemx $@{@var{parameter}//@var{pattern}/@var{string}@} +@itemx $@{@var{parameter}/#@var{pattern}/@var{string}@} +@itemx $@{@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}. +@var{string} undergoes tilde expansion, parameter and variable expansion, +arithmetic expansion, command and process substitution, and quote removal. +The match is performed according to the rules described below +(@pxref{Pattern Matching}). + +In the first form above, only the first match is replaced. +If there are two slashes separating @var{parameter} and @var{pattern} +(the second form above), all matches of @var{pattern} are +replaced with @var{string}. +If @var{pattern} is preceded by @samp{#} (the third form above), +it must match at the beginning of the expanded value of @var{parameter}. +If @var{pattern} is preceded by @samp{%} (the fourth form above), +it must match at the end of the expanded value of @var{parameter}. +If the expansion of @var{string} is null, +matches of @var{pattern} are deleted. +If @var{string} is null, +matches of @var{pattern} are deleted +and the @samp{/} following @var{pattern} may be omitted. + +If the @code{patsub_replacement} shell option is enabled using @code{shopt}, +any unquoted instances of @samp{&} in @var{string} are replaced with the +matching portion of @var{pattern}. +This is intended to duplicate a common @code{sed} idiom. + +Quoting any part of @var{string} inhibits replacement in the +expansion of the quoted portion, including replacement strings stored +in shell variables. +Backslash will escape @samp{&} in @var{string}; the backslash is removed +in order to permit a literal @samp{&} in the replacement string. +Users should take care if @var{string} is double-quoted to avoid +unwanted interactions between the backslash and double-quoting, since +backslash has special meaning within double quotes. +Pattern substitution performs the check for unquoted @samp{&} after +expanding @var{string}, +so users should ensure to properly quote any occurrences of @samp{&} +they want to be taken literally in the replacement +and ensure any instances of @samp{&} they want to be replaced are unquoted. + +For instance, + +@example +var=abcdef +rep='& ' +echo $@{var/abc/& @} +echo "$@{var/abc/& @}" +echo $@{var/abc/$rep@} +echo "$@{var/abc/$rep@}" +@end example + +@noindent +will display four lines of "abc def", while + +@example +var=abcdef +rep='& ' +echo $@{var/abc/\& @} +echo "$@{var/abc/\& @}" +echo $@{var/abc/"& "@} +echo $@{var/abc/"$rep"@} +@end example + +@noindent +will display four lines of "& def". +Like the pattern removal operators, double quotes surrounding the +replacement string quote the expanded characters, while double quotes +enclosing the entire parameter substitution do not, since +the expansion is performed in a +context that doesn't take any enclosing double quotes into account. + +Since backslash can escape @samp{&}, it can also escape a backslash in +the replacement string. +This means that @samp{\\} will insert a literal +backslash into the replacement, so these two @code{echo} commands + +@example +var=abcdef +rep='\\&xyz' +echo $@{var/abc/\\&xyz@} +echo $@{var/abc/$rep@} +@end example + +@noindent +will both output @samp{\abcxyzdef}. + +It should rarely be necessary to enclose only @var{string} in double +quotes. + +If the @code{nocasematch} shell option +(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. +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. +Each character in the expanded value of @var{parameter} is tested against +@var{pattern}, and, if it matches the pattern, its case is converted. +The pattern should not attempt to match more than one character. + +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. + +@item $@{@var{parameter}@@@var{operator}@} +The expansion is either a transformation of the value of @var{parameter} +or information about @var{parameter} itself, depending on the value of +@var{operator}. Each @var{operator} is a single letter: + +@table @code +@item U +The expansion is a string that is the value of @var{parameter} with lowercase +alphabetic characters converted to uppercase. +@item u +The expansion is a string that is the value of @var{parameter} with the first +character converted to uppercase, if it is alphabetic. +@item L +The expansion is a string that is the value of @var{parameter} with uppercase +alphabetic characters converted to lowercase. +@item Q +The expansion is a string that is the value of @var{parameter} quoted in a +format that can be reused as input. +@item E +The expansion is a string that is the value of @var{parameter} with backslash +escape sequences expanded as with the @code{$'@dots{}'} quoting mechanism. +@item P +The expansion is a string that is the result of expanding the value of +@var{parameter} as if it were a prompt string (@pxref{Controlling the Prompt}). +@item A +The expansion is a string in the form of +an assignment statement or @code{declare} command that, if +evaluated, will recreate @var{parameter} with its attributes and value. +@item K +Produces a possibly-quoted version of the value of @var{parameter}, +except that it prints the values of +indexed and associative arrays as a sequence of quoted key-value pairs +(@pxref{Arrays}). +@item a +The expansion is a string consisting of flag values representing +@var{parameter}'s attributes. +@item k +Like the @samp{K} transformation, but expands the keys and values of +indexed and associative arrays to separate words after word splitting. +@end table + +If @var{parameter} is @samp{@@} or @samp{*}, +the 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 operation is applied to each member of the +array in turn, and the expansion is the resultant list. + +The result of the expansion is subject to word splitting and filename +expansion as described below. +@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} in a subshell environment +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 @var{expression} undergoes the same expansions +as if it were within double quotes, +but double quote characters in @var{expression} are not treated specially +and are removed. +All tokens in the expression undergo parameter and variable expansion, +command substitution, and quote removal. +The result is treated as the arithmetic expression to be evaluated. +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 allows a process's input or output to be +referred to using a filename. +It takes the form of +@example +<(@var{list}) +@end example +@noindent +or +@example +>(@var{list}) +@end example +@noindent +The process @var{list} is run asynchronously, and its input or output +appears as a filename. +This filename 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. +Process substitution is supported on systems that support named +pipes (@sc{fifo}s) or the @file{/dev/fd} method of naming open files. + +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 using these characters +as field terminators. +If @env{IFS} is unset, or its value is exactly @code{}, +the default, then sequences of +@code{ }, @code{}, and @code{} +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}, @code{tab}, and @code{newline} +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 +and passed to commands as empty strings. +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 +and passed to a command as an empty string. +When a quoted null argument appears as part of a word whose expansion is +non-null, the null argument is removed. +That is, the word +@code{-d''} becomes @code{-d} after word splitting and +null argument removal. + +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, and is not quoted, then the word is +regarded as a @var{pattern}, +and replaced with an alphabetically sorted list of +filenames matching the pattern (@pxref{Pattern Matching}). +If no matching filenames 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. +In order to match the filenames @samp{.} and @samp{..}, +the pattern must begin with @samp{.} (for example, @samp{.?}), +even if @code{dotglob} is set. +If the @code{globskipdots} shell option is enabled, the filenames +@samp{.} and @samp{..} are never matched, even if the pattern begins +with a @samp{.}. +When not matching filenames, the @samp{.} character is not treated specially. + +When matching a filename, the slash character must always be +matched explicitly by a slash in the pattern, but in other matching +contexts it can be matched by a special pattern character as described +below (@pxref{Pattern Matching}). + +See the description of @code{shopt} in @ref{The Shopt Builtin}, +for a description of the @code{nocaseglob}, @code{nullglob}, +@code{globskipdots}, +@code{failglob}, and @code{dotglob} options. + +The @env{GLOBIGNORE} +shell variable may be used to restrict the set of file names matching a +pattern. If @env{GLOBIGNORE} +is set, each matching file name that also matches one of the patterns in +@env{GLOBIGNORE} is removed from the list of matches. +If the @code{nocaseglob} option is set, the matching against the patterns in +@env{GLOBIGNORE} is performed without regard to case. +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 falls 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, +and the characters included in the range, +are determined by +the current locale and the values of the +@env{LC_COLLATE} and @env{LC_ALL} shell variables, 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{[aBbCcDdxYyZz]}, 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}, or enable the +@code{globasciiranges} shell option. + +Within @samp{[} and @samp{]}, @dfn{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 @dfn{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, the shell recognizes several extended pattern matching operators. +In the following description, a @var{pattern-list} is a list of one +or more patterns separated by a @samp{|}. +When matching filenames, the @code{dotglob} shell option determines +the set of filenames that are tested, as described above. +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 + +The @code{extglob} option changes the behavior of the parser, since the +parentheses are normally treated as operators with syntactic meaning. +To ensure that extended matching patterns are parsed correctly, make sure +that @code{extglob} is enabled before parsing constructs containing the +patterns, including shell functions and command substitutions. + +When matching filenames, the @code{dotglob} shell option determines +the set of filenames that are tested: +when @code{dotglob} is enabled, the set of filenames includes all files +beginning with @samp{.}, but the filenames +@samp{.} and @samp{..} must be matched by a +pattern or sub-pattern that begins with a dot; +when it is disabled, the set does not +include any filenames beginning with ``.'' unless the pattern +or sub-pattern begins with a @samp{.}. +As above, @samp{.} only has a special meaning when matching filenames. + +Complicated extended pattern matching against long strings is slow, +especially when the patterns contain alternations and the strings +contain multiple matches. +Using separate matches against shorter strings, or using arrays of +strings instead of a single long string, may be faster. + +@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 @dfn{redirected} +using a special notation interpreted by the shell. +@dfn{Redirection} allows commands' file handles to be +duplicated, opened, closed, +made to refer to different files, +and can change the files the command reads from and writes to. +Redirection may also be used to modify file handles in 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. +If @{@var{varname}@} is supplied, the redirection persists beyond +the scope of the command, allowing the shell programmer to manage +the file descriptor's lifetime manually. +The @code{varredir_close} shell option manages this behavior +(@pxref{The Shopt Builtin}). + +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. +If the operating system on which Bash is running provides these +special files, bash will use them; otherwise it will emulate them +internally with the behavior described below. + +@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 +the corresponding TCP 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 +the corresponding UDP 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 +When using the second form, @var{word} may not expand to a number or +@samp{-}. If it does, other redirection operators apply +(see Duplicating File Descriptors below) for compatibility reasons. + +@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 +(see Duplicating File Descriptors below). + +@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 (or file descriptor @var{n} if @var{n} is specified) for a command. + +The format of here-documents is: +@example +[@var{n}]<<[@minus{}]@var{word} + @var{here-document} +@var{delimiter} +@end example + +No parameter and variable expansion, command substitution, +arithmetic expansion, or filename expansion is performed on +@var{word}. If any part of @var{word} is 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, +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{n}]<<< @var{word} +@end example + +The @var{word} undergoes +tilde expansion, parameter and variable expansion, +command substitution, arithmetic expansion, and quote removal. +Filename expansion and word splitting are not performed. +The result is supplied as a single string, +with a newline appended, +to the command on its +standard input (or file descriptor @var{n} if @var{n} is specified). + +@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. +If @var{word} +evaluates to @samp{-}, file descriptor @var{n} is closed. +As a special case, if @var{n} is omitted, and @var{word} does not +expand to one or more digits or @samp{-}, 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, in +the following order. + +@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. +In the case of such a command (one that consists only of assignment +statements and redirections), assignment statements are performed before +redirections. +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 in a separate execution environment +with the original command and +the original command's arguments as its arguments, and the function's +exit status becomes the exit status of that subshell. +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 +@dfn{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 @dfn{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. + +A @dfn{subshell} is a copy of the shell process. + +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 @dfn{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 @code{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 pathname 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 +@code{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, +generally invalid options or missing arguments. + +The exit status of the last command is available in the special +parameter $? (@pxref{Special Parameters}). + +@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. + +When job control is not enabled, and Bash is waiting for a foreground +command to complete, the shell receives keyboard-generated signals +such as @code{SIGINT} (usually generated by @samp{^C}) that users +commonly intend to send to that command. +This happens because the shell and the command are in the same process +group as the terminal, and @samp{^C} sends @code{SIGINT} to all processes +in that process group. +See @ref{Job Control}, for a more in-depth discussion of process groups. + +When Bash is running without job control enabled and receives @code{SIGINT} +while waiting for a foreground command, it waits until that foreground +command terminates and then decides what to do about the @code{SIGINT}: + +@enumerate +@item +If the command terminates due to the @code{SIGINT}, Bash concludes +that the user meant to end the entire script, and acts on the +@code{SIGINT} (e.g., by running a @code{SIGINT} trap or exiting itself); + +@item +If the pipeline does not terminate due to @code{SIGINT}, the program +handled the @code{SIGINT} itself and did not treat it as a fatal signal. +In that case, Bash does not treat @code{SIGINT} as a fatal signal, +either, instead assuming that the @code{SIGINT} was used as part of the +program's normal operation (e.g., @command{emacs} uses it to abort editing +commands) or deliberately discarded. However, Bash will run any +trap set on @code{SIGINT}, as it does with any other trapped signal it +receives while it is waiting for the foreground command to +complete, for compatibility. +@end enumerate + +@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 creates a +new instance of itself +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 and, depending on the operating system, one +or more optional arguments for that interpreter. +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 one or more optional arguments 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 supplied to the +script. +The details of how the interpreter line is split into an interpreter name +and a set of arguments vary across systems. +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 a single argument to a maximum of 32 characters, so it's not +portable to assume that using more than one argument will work. + +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. It's a common idiom to use @code{env} to find +@code{bash} even if it's been installed in another directory: +@code{#!/usr/bin/env bash} will find the first occurrence of @code{bash} +in @env{$PATH}. + +@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}/@code{[} +builtins do not accept options and do not treat @samp{--} specially. +The @code{exit}, @code{logout}, @code{return}, +@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}, +but @var{filename} does not need to be executable. +When Bash is not in @sc{posix} mode, it searches the current directory +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. +If the @option{-T} option is enabled, @code{.} inherits any trap on +@code{DEBUG}; if it is not, any @code{DEBUG} trap string is saved and +restored around the call to @code{.}, and @code{.} unsets the +@code{DEBUG} trap while it executes. +If @option{-T} is not set, and the sourced file changes +the @code{DEBUG} trap, the new value is retained when @code{.} completes. +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 [-e]] [-@@] [@var{directory}] +@end example + +Change the current working directory to @var{directory}. +If @var{directory} is not supplied, the value of the @env{HOME} +shell variable is used. +If the shell variable +@env{CDPATH} exists, it is used as a search path: +each directory name in @env{CDPATH} is searched for +@var{directory}, with alternative directory names in @env{CDPATH} +separated by a colon (@samp{:}). +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 resolved while @code{cd} is traversing @var{directory} and before +processing an instance of @samp{..} in @var{directory}. + +By default, or when the @option{-L} option is supplied, symbolic links +in @var{directory} are resolved after @code{cd} processes an instance +of @samp{..} in @var{directory}. + +If @samp{..} appears in @var{directory}, it is processed by removing the +immediately preceding pathname component, back to a slash or the beginning +of @var{directory}. + +If the @option{-e} option is supplied with @option{-P} +and the current working directory cannot be successfully determined +after a successful directory change, @code{cd} will return an unsuccessful +status. + +On systems that support it, the @option{-@@} option presents the extended +attributes associated with a file as a directory. + +If @var{directory} is @samp{-}, it is converted to @env{$OLDPWD} +before the directory change is attempted. + +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. + +If the directory change is successful, @code{cd} sets the value of the +@env{PWD} environment variable to the new directory name, and sets the +@env{OLDPWD} environment variable to the value of the current working +directory before the change. + +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 @var{command} +cannot be executed for some reason, a non-interactive shell exits, +unless the @code{execfail} shell option +is enabled. In that case, it returns failure. +An interactive shell returns failure if the file cannot be executed. +A subshell exits unconditionally if @code{exec} fails. +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{name}s are supplied, or if the @option{-p} option is given, a +list of names of all exported variables 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{arg} @dots{}] +@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 whitespace. +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 @var{name} is set to @samp{?}. + +@code{getopts} +normally parses the positional parameters, but if more arguments are +supplied as @var{arg} values, @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 + +Each time @code{hash} is invoked, it remembers the full pathnames of the +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}. +Any previously-remembered pathname is discarded. +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 [-aAf] [-p] [@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 both options are supplied, @option{-A} takes precedence. +If no @var{name} arguments are given, or if the @option{-p} +option is supplied, a list of all readonly names is printed. +The other options may be used to restrict the output to a subset of +the set of readonly names. +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 stop executing and return the value @var{n} +to its caller. +If @var{n} is not supplied, the return value is the exit status of the +last command executed in the function. +If @code{return} is executed by a trap handler, the last command used to +determine the status is the last command executed before the trap handler. +If @code{return} is executed during a @code{DEBUG} trap, the last command +used to determine the status is the last command executed by the trap +handler before @code{return} was invoked. +@code{return} may also be used to terminate execution of a script +being executed with the @code{.} (@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. +If @var{n} is supplied, the return value is its least significant +8 bits. +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 supplied a non-numeric +argument or 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{$#} down 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 [ +@example +test @var{expr} +@end example + +Evaluate a conditional expression @var{expr} and return a status of 0 +(true) or 1 (false). +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. +Operator precedence is used when there are five or more arguments. + +@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 +The following conditions are applied in the order listed. + +@enumerate +@item +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. +@item +If the first argument is @samp{!}, the value is the negation of +the two-argument test using the second and third arguments. +@item +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. +@item +Otherwise, the expression is false. +@end enumerate + +@item 4 arguments +The following conditions are applied in the order listed. + +@enumerate +@item +If the first argument is @samp{!}, the result is the negation of +the three-argument expression composed of the remaining arguments. +@item +If the first argument is exactly @samp{(} and the fourth argument is +exactly @samp{)}, the result is the two-argument test of the second +and third arguments. +@item +Otherwise, the expression is parsed and evaluated according to +precedence using the rules listed above. +@end enumerate + +@item 5 or more arguments +The expression is parsed and evaluated according to precedence +using the rules listed above. +@end table + +When used with @code{test} or @samp{[}, the @samp{<} and @samp{>} +operators sort lexicographically using ASCII ordering. + +@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 pipeline (which may consist of a single simple +command), a list, or a compound command returns 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 +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 using @code{!}. +These are the same conditions obeyed by the @code{errexit} (@option{-e}) +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 [-fnv] [@var{name}] +@end example + +Remove each variable or function @var{name}. +If the @option{-v} option is given, each +@var{name} refers to a shell variable and that variable is removed. +If the @option{-f} option is given, the @var{name}s refer to shell +functions, and the function definition is removed. +If the @option{-n} option is supplied, and @var{name} is a variable with +the @code{nameref} attribute, @var{name} will be unset rather than the +variable it references. +@option{-n} has no effect if the @option{-f} option is supplied. +If no options are supplied, each @var{name} refers to a variable; if +there is no variable by that name, a function with that name, if any, is +unset. +Readonly variables and functions may not be unset. +Some shell variables lose their special behavior if they are unset; such +behavior is noted in the description of the individual variables. +The return status is zero unless a @var{name} is readonly or may not be unset. +@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 [-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}] [-lpsvPSVX] +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 [-m @var{keymap}] @var{keyseq:readline-command} +bind @var{readline-command-line} +@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{vi-move} is also a +synonym); @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} and @code{READLINE_MARK} variables +to the current location of the insertion point and the saved insertion +point (the @var{mark}), respectively. +The shell assigns any numeric argument the user supplied to the +@code{READLINE_ARGUMENT} variable. +If there was no argument, that variable is not set. +If the executed command changes the value of any of @code{READLINE_LINE}, +@code{READLINE_POINT}, or @code{READLINE_MARK}, those new values will be +reflected in the editing state. + +@item -X +List all key sequences bound to shell commands and the associated commands +in a format that can be reused as input. +@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 [-aAfFgiIlnrtux] [-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, +other than @option{-f} and @option{-F}, 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 +each @var{name} is defined are displayed as well. +@option{-F} implies @option{-f}. + +The @option{-g} option forces variables to be created or modified at +the global scope, even when @code{declare} is executed in a shell function. +It is ignored in all other cases. + +The @option{-I} option causes local variables to inherit the attributes +(except the @code{nameref} attribute) +and value of any existing variable with the same +@var{name} at a surrounding scope. +If there is no existing variable, the local variable is initially unset. + +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 -n +Give each @var{name} the @code{nameref} attribute, making +it a name reference to another variable. +That other variable is defined by the value of @var{name}. +All references, assignments, and attribute modifications +to @var{name}, except for those using or changing the +@option{-n} attribute itself, are performed on the variable referenced by +@var{name}'s value. +The nameref attribute cannot be applied to array variables. + +@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} and @samp{+A} +may not be used to destroy array variables 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, unless the @option{-g} option is used. +If a variable name is followed by =@var{value}, the value of the variable +is set to @var{value}. + +When using @option{-a} or @option{-A} and the compound assignment syntax to +create array variables, additional attributes do not take effect until +subsequent assignments. + +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{name}s 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 0 unless a write error occurs. +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 +@itemx \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) +@item \u@var{HHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHH} (one to four hex digits) +@item \U@var{HHHHHHHH} +the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value +@var{HHHHHHHH} (one to eight 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. +Bash will use the value of the @env{BASH_LOADABLES_PATH} variable as a +colon-separated list of directories in which to search for @var{filename}. +The default is system-dependent. +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}). + +If no options are supplied and a @var{name} is not a shell builtin, +@code{enable} will attempt to load @var{name} from a shared object named +@var{name}, as if the command were +@samp{enable -f @var{name} @var{name}}. + +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} @dots{}] +@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. +If @var{name} is @samp{-}, the set of shell options is made local to the +function in which @code{local} is invoked: shell options changed using +the @code{set} builtin inside the function are restored to their original +values when the function returns. +The restore is effected as if a series of @code{set} commands were executed +to restore the values that were in place before the function. +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 [-d @var{delim}] [-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 -d +The first character of @var{delim} is used to terminate each input line, +rather than newline. +If @var{delim} is the empty string, @code{mapfile} will terminate a line +when it reads a NUL character. +@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 @var{delim} (default 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} 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 and the line to be assigned to that element +as additional arguments. +@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 @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 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, @code{printf} +interprets the following extensions: + +@table @code +@item %b +Causes @code{printf} to expand backslash escape sequences in the +corresponding @var{argument} in the same way as @code{echo -e} +(@pxref{Bash Builtins}). +@item %q +Causes @code{printf} to output the +corresponding @var{argument} in a format that can be reused as shell input. +@item %Q +like @code{%q}, but applies any supplied precision to the @var{argument} +before quoting it. +@item %(@var{datefmt})T +Causes @code{printf} to output the date-time string resulting from using +@var{datefmt} as a format string for @code{strftime}(3). +The corresponding @var{argument} is an integer representing the number of +seconds since the epoch. +Two special argument values may be used: -1 represents the current +time, and -2 represents the time the shell was invoked. +If no argument is specified, conversion behaves as if -1 had been given. +This is an exception to the usual @code{printf} behavior. +@end table + +@noindent +The %b, %q, and %T directives all use the field width and precision +arguments from the format specification and write that many bytes from +(or use that wide a field for) the expanded argument, which usually +contains more characters than the original. + +Arguments to non-string format specifiers are treated as C language constants, +except that a leading plus or minus sign is allowed, and if the leading +character is a single or double quote, the value is the ASCII value of +the following character. + +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, +split into words as described above in @ref{Word Splitting}, +and the first word +is assigned to the first @var{name}, the second word to the second @var{name}, +and so on. +If there are more words than names, +the remaining words and their intervening delimiters are 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 using the same rules the shell +uses for expansion (described above in @ref{Word Splitting}). +The backslash character @samp{\} may be used to remove any special +meaning for the next character read and for line continuation. + +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. +If @var{delim} is the empty string, @code{read} will terminate a line +when it reads a NUL character. + +@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, but uses Readline's default filename completion. + +@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 honors 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. +The result is not split on the characters in @code{IFS}; the intent is +that the variable is assigned exactly the characters read +(with the exception of backslash; see the @option{-r} option below). + +@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 then 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 (or a specified number of characters) +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 @code{read} times out, @code{read} saves any partial input read into +the specified variable @var{name}. +If @var{timeout} is 0, @code{read} returns immediately, without trying to +read any data. +The exit status is 0 if input is available on the specified file descriptor, +or the read will return EOF, +non-zero 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 + +If no @var{name}s are supplied, the line read, +without the ending delimiter but otherwise unmodified, +is assigned to the +variable @env{REPLY}. +The exit status is zero, unless end-of-file is encountered, @code{read} +times out (in which case the status is greater than 128), +a variable assignment error (such as assigning to a readonly variable) occurs, +or an invalid file descriptor is supplied as the argument to @option{-u}. + +@item readarray +@btindex readarray +@example +readarray [-d @var{delim}] [-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, +which is 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{name}s are found, non-zero +if any are not found. + +@item typeset +@btindex typeset +@example +typeset [-afFgrxilnrtux] [-p] [@var{name}[=@var{value}] @dots{}] +@end example + +The @code{typeset} command is supplied for compatibility with the Korn +shell. +It is a synonym for the @code{declare} builtin command. + +@item ulimit +@btindex ulimit +@example +ulimit [-HS] -a +ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [@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; no limits are set. + +@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 -k +The maximum number of kqueues that may be allocated. + +@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 @sc{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 shell, and, on +some systems, to its children. + +@item -x +The maximum number of file locks. + +@item -P +The maximum number of pseudoterminals. + +@item -R +The maximum time a real-time process can run before blocking, in microseconds. + +@item -T +The maximum number of threads. +@end table + +If @var{limit} is given, and the @option{-a} option is not used, +@var{limit} 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 more than one +resource is specified, the limit name and unit, if appropriate, +are printed before the value. +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{-R}, which is in microseconds; +@option{-p}, which is in units of 512-byte blocks; +@option{-P}, +@option{-T}, +@option{-b}, +@option{-k}, +@option{-n} and @option{-u}, which are unscaled values; +and, when in @sc{posix} Mode (@pxref{Bash POSIX Mode}), +@option{-c} and @option{-f}, which are in 512-byte increments. + +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-name}] [--] [-] [@var{argument} @dots{}] +set [+abefhkmnptuvxBCEHPT] [+o @var{option-name}] [--] [-] [@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 +Each variable or function that is created or modified is given the +export attribute and marked 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 list (@pxref{Lists}), +or a compound command (@pxref{Compound Commands}) +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{!}. +If a compound command other than a subshell +returns a non-zero status because a command failed +while @option{-e} was being ignored, the shell does not exit. +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. + +If a compound command or shell function executes in a context where +@option{-e} is being ignored, +none of the commands executed within the compound command or function body +will be affected by the @option{-e} setting, even if @option{-e} is set +and a command returns a failure status. +If a compound command or shell function sets @option{-e} while executing in +a context where @option{-e} is ignored, that setting will not have any +effect until the compound command or the command containing the function +call completes. + +@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}). +All processes run in a separate process group. +When a background job completes, the shell prints a line +containing its exit status. + +@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 @option{-p} option is not supplied, these actions +are taken and the effective user id is set to the real user id. +If the @option{-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 -r +Enable restricted shell mode. +This option cannot be unset once it has been set. + +@item -t +Exit after reading and executing one command. + +@item -u +Treat unset variables and parameters other than the special parameters +@samp{@@} or @samp{*}, +or array variables subscripted with @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 resolve 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 settings controlling optional shell behavior. +The settings can be either those listed below, or, if the +@option{-o} option is used, those available with the @option{-o} +option to the @code{set} builtin command (@pxref{The Set Builtin}). +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; +if @var{optname}s are supplied, the output is restricted to those options. +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{optname}s 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, @code{shopt} shows only +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{optname}s +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 assoc_expand_once +If set, the shell suppresses multiple evaluation of associative array +subscripts during arithmetic expression evaluation, while executing +builtins that can perform variable assignments, +and while executing builtins that perform array dereferencing. + +@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 external (non-builtin) +command and, if necessary, updates the values of +@env{LINES} and @env{COLUMNS}. +This option is enabled by default. + +@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. +This option is enabled by default, but only has an effect if command +history is enabled (@pxref{Bash History Facilities}). + +@item compat31 +@itemx compat32 +@itemx compat40 +@itemx compat41 +@itemx compat42 +@itemx compat43 +@itemx compat44 +These control aspects of the shell's compatibility mode +(@pxref{Shell Compatibility Mode}). + +@item complete_fullquote +If set, Bash +quotes all shell metacharacters in filenames and directory names when +performing completion. +If not set, Bash +removes metacharacters such as the dollar sign from the set of +characters that will be quoted in completed filenames +when these metacharacters appear in shell variable references in words to be +completed. +This means that dollar signs in variable names that expand to directories +will not be quoted; +however, any dollar signs appearing in filenames will not be quoted, either. +This is active only when bash is using backslashes to quote completed +filenames. +This variable is set by default, which is the default Bash behavior in +versions through 4.2. + +@item direxpand +If set, Bash +replaces directory names with the results of word expansion when performing +filename completion. This changes the contents of the Readline editing +buffer. +If not set, Bash attempts to preserve what the user typed. + +@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. +The filenames @samp{.} and @samp{..} must always be matched explicitly, +even if @code{dotglob} is set. + +@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 at shell invocation, +or in a shell startup file, +arrange to execute the debugger profile +before the shell starts, identical to the @option{--debugger} option. +If set after invocation, 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), the shell simulates +a call to @code{return}. + +@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{ERR} 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 globasciiranges +If set, range expressions used in pattern matching bracket expressions +(@pxref{Pattern Matching}) +behave as if in the traditional C locale when performing +comparisons. That is, the current locale's collating sequence +is not taken into account, so +@samp{b} will not collate between @samp{A} and @samp{B}, +and upper-case and lower-case ASCII characters will collate together. + +@item globskipdots +If set, filename expansion will never match the filenames +@samp{.} and @samp{..}, +even if the pattern begins with a @samp{.}. +This option is enabled by default. + +@item globstar +If set, the pattern @samp{**} used in a filename expansion context will +match all 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 inherit_errexit +If set, command substitution inherits the value of the @code{errexit} option, +instead of unsetting it in the subshell environment. +This option is enabled when @sc{posix} mode is enabled. + +@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 lastpipe +If set, and job control is not active, the shell runs the last command of +a pipeline not executed in the background in the current shell environment. + +@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 localvar_inherit +If set, local variables inherit the value and attributes of a variable of +the same name that exists at a previous scope before any new value is +assigned. The @code{nameref} attribute is not inherited. + +@item localvar_unset +If set, calling @code{unset} on local variables in previous function scopes +marks them so subsequent lookups find them unset until that function +returns. This is identical to the behavior of unsetting local variables +at the current function scope. + +@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 (@pxref{Conditional Constructs}, +when performing pattern substitution word expansions, +or when filtering possible completions as part of programmable completion. + +@item noexpand_translation +If set, Bash +encloses the translated results of $"..." quoting in single quotes +instead of double quotes. +If the string is not translated, this has no effect. + +@item nullglob +If set, Bash allows filename patterns which match no +files to expand to a null string, rather than themselves. + +@item patsub_replacement +If set, Bash +expands occurrences of @samp{&} in the replacement string of pattern +substitution to the text matched by the pattern, as described +above (@pxref{Shell Parameter Expansion}). +This option is enabled by default. + +@item progcomp +If set, the programmable completion facilities +(@pxref{Programmable Completion}) are enabled. +This option is enabled by default. + +@item progcomp_alias +If set, and programmable completion is enabled, Bash treats a command +name that doesn't have any completions as a possible alias and attempts +alias expansion. If it has an alias, Bash attempts programmable +completion using the command word resulting from the expanded alias. + +@item promptvars +If set, prompt strings undergo +parameter expansion, command substitution, arithmetic +expansion, and quote removal after being expanded +as described below (@pxref{Controlling the 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{.} (@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 varredir_close +If set, the shell automatically closes file descriptors assigned using the +@code{@{varname@}} redirection syntax (@pxref{Redirections}) instead of +leaving them open when the command completes. + +@item xpg_echo +If set, the @code{echo} builtin expands backslash-escape sequences +by default. + +@end table +@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 or directory name +and the @env{MAILPATH} variable +is not set, Bash informs the user of the arrival of mail in +the specified file or Maildir-format directory. + +@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 filename 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{Controlling the 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{> }. +@env{PS2} is expanded in the same way as @env{PS1} before being +displayed. + +@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 _ +@vindex $_ +($_, an underscore.) +At shell startup, set to the 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 simple +command executed in the foreground, 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. + +@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. +Assignments to @env{BASHPID} have no effect. +If @env{BASHPID} +is unset, it loses its special properties, even if it is +subsequently reset. + +@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; however, +unsetting array elements currently does not cause aliases to be removed +from the alias list. +If @env{BASH_ALIASES} +is unset, it loses its special properties, even if it is +subsequently reset. + +@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). +Setting @code{extdebug} after the shell has started to execute a script, +or referencing this variable when @code{extdebug} is not set, +may result in inconsistent values. + +@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). +Setting @code{extdebug} after the shell has started to execute a script, +or referencing this variable when @code{extdebug} is not set, +may result in inconsistent values. + +@item BASH_ARGV0 +When referenced, this variable expands to the name of the shell or shell +script (identical to @code{$0}; @xref{Special Parameters}, +for the description of special parameter 0). +Assignment to @code{BASH_ARGV0} +causes the value assigned to also be assigned to @code{$0}. +If @env{BASH_ARGV0} +is unset, it loses its special properties, even if it is +subsequently reset. + +@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; however, +unsetting array elements currently does not cause command names to be removed +from the hash table. +If @env{BASH_CMDS} +is unset, it loses its special properties, even if it is +subsequently reset. + +@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. +If @env{BASH_COMMAND} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item BASH_COMPAT +The value is used to set the shell's compatibility level. +@xref{Shell Compatibility Mode}, for a description of the various +compatibility levels and their effects. +The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) +corresponding to the desired compatibility level. +If @env{BASH_COMPAT} is unset or set to the empty string, the compatibility +level is set to the default for the current version. +If @env{BASH_COMPAT} is set to a value that is not one of the valid +compatibility levels, the shell prints an error message and sets the +compatibility level to the default for the current version. +The valid values correspond to the compatibility levels +described below (@pxref{Shell Compatibility Mode}). +For example, 4.2 and 42 are valid values that correspond +to the @code{compat42} @code{shopt} option +and set the compatibility level to 42. +The current version is also a valid value. + +@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 +where each corresponding member of @env{FUNCNAME} was invoked. +@code{$@{BASH_LINENO[$i]@}} is the line number in the source file +(@code{$@{BASH_SOURCE[$i+1]@}}) where +@code{$@{FUNCNAME[$i]@}} was called (or @code{$@{BASH_LINENO[$i-1]@}} if +referenced within another shell function). +Use @code{LINENO} to obtain the current line number. + +@item BASH_LOADABLES_PATH +A colon-separated list of directories in which the shell looks for +dynamically loadable builtins specified by the +@code{enable} command. + +@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. + +@item BASH_SOURCE +An array variable whose members are the source filenames where the +corresponding shell function names in the @code{FUNCNAME} array +variable are defined. +The shell function @code{$@{FUNCNAME[$i]@}} is defined in the file +@code{$@{BASH_SOURCE[$i]@}} and called from @code{$@{BASH_SOURCE[$i+1]@}} + +@item BASH_SUBSHELL +Incremented by one within each subshell or subshell environment when +the shell begins executing in that environment. +The initial value is 0. +If @env{BASH_SUBSHELL} +is unset, it loses its special properties, even if it is +subsequently reset. + +@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 @dfn{release}). + +@item BASH_VERSINFO[1] +The minor version number (the @dfn{version}). + +@item BASH_VERSINFO[2] +The patch level. + +@item BASH_VERSINFO[3] +The build version. + +@item BASH_VERSINFO[4] +The release status (e.g., @code{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 CHILD_MAX +Set the number of exited child status values for the shell to remember. +Bash will not allow this value to be decreased below a @sc{posix}-mandated +minimum, and there is a maximum value (currently 8192) that this may +not exceed. +The minimum value is system-dependent. + +@item COLUMNS +Used by the @code{select} command to determine the terminal width +when printing selection lists. +Automatically set if the @code{checkwinsize} option is enabled +(@pxref{The Shopt Builtin}), or in an interactive shell 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: +@key{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 @env{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}). +Each array element contains one possible completion. + +@item COPROC +An array variable created to hold the file descriptors +for output from and input to an unnamed coprocess (@pxref{Coprocesses}). + +@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 ENV +Expanded and executed similarly to @code{BASH_ENV} +(@pxref{Bash Startup Files}) +when an interactive shell is invoked in +@sc{posix} Mode (@pxref{Bash POSIX Mode}). + +@item EPOCHREALTIME +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch as a floating point value with micro-second granularity +(see the documentation for the C library function @code{time} for the +definition of Epoch). +Assignments to @env{EPOCHREALTIME} are ignored. +If @env{EPOCHREALTIME} +is unset, it loses its special properties, even if +it is subsequently reset. + +@item EPOCHSECONDS +Each time this parameter is referenced, it expands to the number of seconds +since the Unix Epoch (see the documentation for the C library function +@code{time} for the definition of Epoch). +Assignments to @env{EPOCHSECONDS} are ignored. +If @env{EPOCHSECONDS} +is unset, it loses its special properties, even if +it is subsequently reset. + +@item EUID +The numeric effective user id of the current user. This variable +is readonly. + +@item EXECIGNORE +A colon-separated list of shell patterns (@pxref{Pattern Matching}) +defining the list of filenames to be ignored by command search using +@code{PATH}. +Files whose full pathnames match one of these patterns are not considered +executable files for the purposes of completion and command execution +via @code{PATH} lookup. +This does not affect the behavior of the @code{[}, @code{test}, and @code{[[} +commands. +Full pathnames in the command hash table are not subject to @code{EXECIGNORE}. +Use this variable to ignore shared library files that have the executable +bit set, but are not executable files. +The pattern matching honors the setting of the @code{extglob} shell +option. + +@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 filename whose suffix matches one of the entries in +@env{FIGNORE} +is excluded from the list of matched filenames. 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 (the one with the highest index) +is @code{"main"}. +This variable exists only when a shell function is executing. +Assignments to @env{FUNCNAME} have no effect. +If @env{FUNCNAME} +is unset, it loses its special properties, even if +it is subsequently reset. + +This variable can be used with @code{BASH_LINENO} and @code{BASH_SOURCE}. +Each element of @code{FUNCNAME} has corresponding elements in +@code{BASH_LINENO} and @code{BASH_SOURCE} to describe the call stack. +For instance, @code{$@{FUNCNAME[$i]@}} was called from the file +@code{$@{BASH_SOURCE[$i+1]@}} at line number @code{$@{BASH_LINENO[$i]@}}. +The @code{caller} builtin displays the current call stack using this +information. + +@item FUNCNEST +If set to a numeric value greater than 0, defines a maximum function +nesting level. Function invocations that exceed this nesting level +will cause the current command to abort. + +@item GLOBIGNORE +A colon-separated list of patterns defining the set of file names to +be ignored by filename expansion. +If a file name matched by a filename expansion pattern also matches one +of the patterns in @env{GLOBIGNORE}, it is removed from the list +of matches. +The pattern matching honors the setting of the @code{extglob} shell +option. + +@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. +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 +@dfn{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. +Assignments to @env{HISTCMD} are ignored. +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, to contain no more than that number of lines +by removing the oldest entries. +The history file is also truncated to this size after +writing it when a shell exits. +If the value is 0, the history file is truncated to zero size. +Non-numeric values and numeric values less than zero inhibit truncation. +The shell sets the default value to the value of @env{HISTSIZE} +after reading any startup files. + +@item HISTIGNORE +A colon-separated list of patterns used to decide which command +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}. +The pattern matching honors the setting of the @code{extglob} shell +option. + +@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. +If the value is 0, commands are not saved in the history list. +Numeric values less than zero result in every command being saved +on the history list (there is no limit). +The shell sets the default value to 500 after reading any startup files. + +@item HISTTIMEFORMAT +If this variable is set and not null, its value is used as a format string +for @code{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 INSIDE_EMACS +If Bash finds this variable in the environment when the shell +starts, it assumes that the shell is running in an Emacs shell buffer +and may disable line editing depending on the value of @env{TERM}. + +@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 LC_TIME +This variable determines the locale category used for data and time +formatting. + +@item LINENO +The line number in the script or shell function currently executing. +If @env{LINENO} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item LINES +Used by the @code{select} command to determine the column length +for printing selection lists. +Automatically set if the @code{checkwinsize} option is enabled +(@pxref{The Shopt Builtin}), or in an interactive shell 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 MAPFILE +An array variable created to hold the text read by the +@code{mapfile} builtin when no variable name is supplied. + +@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 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, Bash enables @sc{posix} mode, +as if the command +@example +@code{set -o posix} +@end example +@noindent +had been executed. +When the shell enters @sc{posix} mode, it sets this variable if it was +not already set. + +@item PPID +The process @sc{id} of the shell's parent process. This variable +is readonly. + +@item PROMPT_COMMAND +If this variable is set, and is an array, +the value of each set element is interpreted as a command to execute +before printing the primary prompt (@env{$PS1}). +If this is set but not an array variable, +its value is used as a command to execute instead. + +@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{Controlling the Prompt}). +Characters removed are replaced with an ellipsis. + +@item PS0 +The value of this parameter is expanded like @env{PS1} +and displayed by interactive shells after reading a command +and before the command is executed. + +@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 of this parameter is expanded like @env{PS1} +and the expanded 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 the expanded value 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, it expands to a random integer +between 0 and 32767. Assigning a value to this +variable seeds the random number generator. +If @env{RANDOM} +is unset, it loses its special properties, even if it is +subsequently reset. + +@item READLINE_ARGUMENT +Any numeric argument given to a Readline command that was defined using +@samp{bind -x} (@pxref{Bash Builtins} +when it was invoked. + +@item READLINE_LINE +The contents of the Readline line buffer, for use +with @samp{bind -x} (@pxref{Bash Builtins}). + +@item READLINE_MARK +The position of the @dfn{mark} (saved insertion point) in the +Readline line buffer, for use +with @samp{bind -x} (@pxref{Bash Builtins}). +The characters between the insertion point and the mark are often +called the @dfn{region}. + +@item READLINE_POINT +The position of the insertion point in the Readline line buffer, for use +with @samp{bind -x} (@pxref{Bash Builtins}). + +@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. +The number of seconds at shell invocation and the current time are always +determined by querying the system clock. +If @env{SECONDS} +is unset, it loses its special properties, +even if it is subsequently reset. + +@item SHELL +This environment variable expands to the full pathname to the shell. +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 SRANDOM +This variable expands to a 32-bit pseudo-random number each time it is +referenced. The random number generator is not linear on systems that +support @file{/dev/urandom} or @code{arc4random}, so each returned number +has no relationship to the numbers preceding it. +The random number generator cannot be seeded, so assignments to this +variable have no effect. +If @env{SRANDOM} +is unset, it loses its special properties, +even if it is subsequently reset. + +@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 a line of input after issuing +the primary prompt. +Bash +terminates after waiting for that number of seconds if a complete +line of 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 chapter 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. +* Controlling the Prompt:: Customizing the various prompt strings. +* The Restricted Shell:: A more controlled mode of shell execution. +* Bash POSIX Mode:: Making Bash behave more closely to what + the POSIX standard specifies. +* Shell Compatibility Mode:: How Bash supports behavior that was present + in earlier versions and has changed. +@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 + +All of the single-character options used with the @code{set} builtin +(@pxref{The Set Builtin}) can be used as options when the shell is invoked. +In addition, 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). + +@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 +Read and execute commands from the first non-option argument +@var{command_string}, then exit. +If there are arguments after the @var{command_string}, +the first argument is assigned to @code{$0} +and any remaining arguments are assigned to the positional parameters. +The assignment to @code{$0} sets the name of the shell, which is used +in warning and error messages. + +@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 or when reading input +through a pipe. + +@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 filenames 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 an interactive login shell exits, +or a non-interactive login shell executes the @code{exit} builtin command, +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 +filename. + +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 network connection, as when executed by +the historical remote shell daemon, usually @code{rshd}, +or the secure shell daemon @code{sshd}. +If Bash +determines it is being run non-interactively 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 +neither @code{rshd} nor @code{sshd} 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 @option{-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 @option{-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 an 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) +and without specifying the @option{-c} option, +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. +Bash expands and displays @env{PS0} after it reads a command but before +executing it. +See @ref{Controlling the Prompt}, for a complete list of prompt +string escape sequences. + +@item +Bash executes the values of the set elements of the @env{PROMPT_COMMAND} +array variable as commands 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 a shell with history enabled 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 +If the @code{cdspell} shell option is enabled, the shell will attempt +simple spelling correction for directory arguments to the @code{cd} +builtin (see the description of the @code{cdspell} +option to the @code{shopt} builtin in @ref{The Shopt Builtin}). +The @code{cdspell} option is only effective in interactive shells. + +@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 +(@pxref{Conditional Constructs}) +and the @code{test} and @code{[} builtin commands +(@pxref{Bourne Shell Builtins}). +The @code{test} +and @code{[} commands determine their behavior based on the number +of arguments; see the descriptions of those commands for any other +command-specific actions. + +Expressions may be unary or binary, +and are formed from the following primaries. +Unary expressions are often used to examine the status of a file. +There are string operators and numeric comparison operators as well. +Bash handles several filenames specially when they are used in +expressions. +If the operating system on which Bash is running provides these +special files, Bash will use them; otherwise it will emulate them +internally with this behavior: +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 @code{[[}, the @samp{<} and @samp{>} operators sort +lexicographically using the current locale. +The @code{test} command uses ASCII ordering. + +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 -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 -N @var{file} +True if @var{file} exists and has been modified since it was last read. + +@item -O @var{file} +True if @var{file} exists and is owned by the effective user id. + +@item -S @var{file} +True if @var{file} exists and is a socket. + +@item @var{file1} -ef @var{file2} +True if @var{file1} and @var{file2} refer to the same device and +inode numbers. + +@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 -o @var{optname} +True if the 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 -v @var{varname} +True if the shell variable @var{varname} is set (has been assigned a value). + +@item -R @var{varname} +True if the shell variable @var{varname} is set and is a name reference. + +@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. +When used with the @code{[[} command, this performs pattern matching as +described above (@pxref{Conditional Constructs}). + +@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. +When used with the @code{[[} command, @var{Arg1} and @var{Arg2} +are evaluated as arithmetic expressions (@pxref{Shell Arithmetic}). +@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 using the @code{((} compound command, the +@code{let} builtin, or the @option{-i} option to the @code{declare} builtin. + +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 +@code{integer} attribute using @samp{declare -i} is assigned a value. +A null value evaluates to 0. +A shell variable need not have its @code{integer} attribute turned on +to be used in an expression. + +Integer constants follow the C language definition, without suffixes or +character constants. +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 the optional @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. +When specifying @var{n}, +if a non-digit is required, +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 + +@dfn{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 +@code{blank}, 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, use a shell function +(@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, +and all lines that make up a compound command, +before executing any of the commands on that line or the compound command. +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 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. +Unless otherwise noted, indexed array indices must be non-negative integers. + +An indexed array is created automatically if any variable is assigned to +using the syntax +@example +@var{name}[@var{subscript}]=@var{value} +@end example + +@noindent +The @var{subscript} +is treated as an arithmetic expression that must evaluate to a number. +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. + +@noindent +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 +@var{name}=(@var{value1} @var{value2} @dots{} ) +@end example +@noindent +where each +@var{value} may be of the form @code{[@var{subscript}]=}@var{string}. +Indexed array assignments do not require anything but @var{string}. +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. + +Each @var{value} in the list undergoes all the shell expansions +described above (@pxref{Shell Expansions}). + +When assigning to an associative array, the words in a compound assignment +may be either assignment statements, for which the subscript is required, +or a list of words that is interpreted as a sequence of alternating keys +and values: +@var{name}=(@var{key1} @var{value1} @var{key2} @var{value2} @dots{} ). +These are treated identically to +@var{name}=( [@var{key1}]=@var{value1} [@var{key2}]=@var{value2} @dots{} ). +The first word in the list determines how the remaining words +are interpreted; all assignments in a list must be of the same type. +When using key/value pairs, the keys may not be missing or empty; +a final missing value is treated like the empty string. + +This syntax is also accepted by the @code{declare} +builtin. Individual array elements may be assigned to using the +@code{@var{name}[@var{subscript}]=@var{value}} syntax introduced above. + +When assigning to an indexed array, if @var{name} +is subscripted by a negative number, that number is +interpreted as relative to one greater than the maximum index of +@var{name}, so negative indices count back from the end of the +array, and an index of -1 references the last element. + +The @samp{+=} operator will append to an array variable when assigning +using the compound assignment syntax; see @ref{Shell Parameters} above. + +Any element of an array may be referenced using +@code{$@{@var{name}[@var{subscript}]@}}. +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{$@{@var{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{$@{@var{name}[@@]@}} expands each element of +@var{name} to a separate word. When there are no array members, +@code{$@{@var{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{$@{#@var{name}[@var{subscript}]@}} expands to the length of +@code{$@{@var{name}[@var{subscript}]@}}. +If @var{subscript} is @samp{@@} or +@samp{*}, the expansion is the number of elements in the array. +If the @var{subscript} +used to reference an element of an indexed array +evaluates to a number less than zero, it is +interpreted as relative to one greater than the maximum index of the array, +so negative indices count back from the end of the array, +and an index of -1 refers to the last element. + +Referencing an array variable without a subscript is equivalent to +referencing with a subscript of 0. +Any reference to a variable using a valid subscript is legal, and +@code{bash} will create an array if necessary. + +An array variable is considered set if a subscript has been assigned a +value. The null string is a valid value. + +It is possible to obtain the keys (indices) of an array as well as the values. +$@{!@var{name}[@@]@} and $@{!@var{name}[*]@} expand to the indices +assigned in array variable @var{name}. +The treatment when in double quotes is similar to the expansion of the +special parameters @samp{@@} and @samp{*} within double quotes. + +The @code{unset} builtin is used to destroy arrays. +@code{unset @var{name}[@var{subscript}]} +destroys the array element at index @var{subscript}. +Negative subscripts to indexed arrays are interpreted as described above. +Unsetting the last element of an array variable does not unset the variable. +@code{unset @var{name}}, where @var{name} is an array, removes the +entire array. +@code{unset @var{name}[@var{subscript}]} behaves differently +depending on the array type when given a +subscript of @samp{*} or @samp{@@}. +When @var{name} is an associative array, it removes the element with key +@samp{*} or @samp{@@}. +If @var{name} is an indexed array, @code{unset} removes all of the elements, +but does not remove the array itself. + +When using a variable name with a subscript as an argument to a command, +such as with @code{unset}, without using the word expansion syntax +described above, the argument is subject to the shell's filename expansion. +If filename expansion is not desired, the argument should be quoted. + +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. +If both options are supplied, @option{-A} takes precedence. +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 current directory is always the "top" +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 [-clpv] [+@var{N} | -@var{N}] +@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. +The current directory is always the first directory in the stack. + +@table @code +@item -c +Clears the directory stack by deleting all of the elements. +@item -l +Produces a listing using full pathnames; +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. +@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. +@end table + +@item popd +@btindex popd +@example +popd [-n] [+@var{N} | -@var{N}] +@end example + +Removes elements from the directory stack. +The elements are numbered from 0 starting at the first directory +listed by @code{dirs}; +that is, @code{popd} is equivalent to @code{popd +0}. + +When no arguments are given, @code{popd} +removes the top directory from the stack and changes to +the new top directory. + +Arguments, if supplied, have the following meanings: + +@table @code +@item -n +Suppresses the normal change of directory when removing directories +from the stack, so that only the stack is manipulated. +@item +@var{N} +Removes the @var{N}th directory (counting from the left of the +list printed by @code{dirs}), starting with zero, from the stack. +@item -@var{N} +Removes the @var{N}th directory (counting from the right of the +list printed by @code{dirs}), starting with zero, from the stack. +@end table + +If the top element of the directory stack is modified, and +the @option{-n} option was not supplied, @code{popd} uses the @code{cd} +builtin to change to the directory at the top of the stack. +If the @code{cd} fails, @code{popd} returns a non-zero value. + +Otherwise, @code{popd} returns an unsuccessful status if +an invalid option is encountered, the directory stack +is empty, or a non-existent directory stack entry is specified. + +If the @code{popd} command is successful, +Bash runs @code{dirs} to show the final contents of the directory stack, +and the return status is 0. + +@btindex pushd +@item pushd +@example +pushd [-n] [@var{+N} | @var{-N} | @var{dir}] +@end example + +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, @code{pushd} exchanges the top two elements +of the directory stack. + +Arguments, if supplied, have the following meanings: + +@table @code +@item -n +Suppresses the normal change of directory when rotating or +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 @var{dir} be the top of the stack. +@end table + +After the stack has been modified, if the @option{-n} option was not +supplied, @code{pushd} uses the @code{cd} builtin to change to the +directory at the top of the stack. +If the @code{cd} fails, @code{pushd} returns a non-zero value. + +Otherwise, if no arguments are supplied, @code{pushd} returns 0 unless the +directory stack is empty. +When rotating the directory stack, @code{pushd} returns 0 unless +the directory stack is empty or a non-existent directory stack element +is specified. + +If the @code{pushd} command is successful, +Bash runs @code{dirs} to show the final contents of the directory stack. + +@end table + +@node Controlling the Prompt +@section Controlling the Prompt +@cindex prompting + +Bash examines the value of the array variable @env{PROMPT_COMMAND} just before +printing each primary prompt. +If any elements in @env{PROMPT_COMMAND} are set and non-null, Bash +executes each value, in numeric order, +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 @env{PS0}, @env{PS1}, @env{PS2}, and +@env{PS4}: + +@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 value of the @code{PWD} shell variable (@env{$PWD}), +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{The Shopt Builtin}). +This can have unwanted side effects if escaped portions of the string +appear within command substitution or contain characters special to +word expansion. + +@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{HISTFILE}, +@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 @code{history} +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{shopt -u restricted_shell}. +@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. + +The restricted shell mode is only one component of a useful restricted +environment. It should be accompanied by setting @env{PATH} to a value +that allows execution of only a few verified commands (commands that +allow shell escapes are particularly vulnerable), changing the current +directory to a non-writable directory other than @env{$HOME} after login, +not allowing the restricted shell to execute shell scripts, and cleaning +the environment of variables that cause some commands to modify their +behavior (e.g., @env{VISUAL} or @env{PAGER}). + +Modern systems provide more secure ways to implement a restricted environment, +such as @code{jails}, @code{zones}, or @code{containers}. + + +@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 +Bash ensures that the @env{POSIXLY_CORRECT} variable is set. + +@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 +Bash will not insert a command without the execute bit set into the +command hash table, even if it returns it as a (last-ditch) result +from a @env{$PATH} search. + +@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 +Alias expansion is always enabled, even in non-interactive shells. + +@item +Reserved words appearing in a context where reserved words are recognized +do not undergo alias expansion. + +@item +Alias expansion is performed when initially parsing a command substitution. +The default mode generally defers it, when enabled, until the command +substitution is executed. This means that command substitution will not +expand aliases that are defined after the command substitution is initially +parsed (e.g., as part of a function definition). + +@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 +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 +Function names may not be the same as one of the @sc{posix} special +builtins. + +@item +@sc{posix} special builtins are found before shell functions +during command lookup. + +@item +When printing shell function definitions (e.g., by @code{type}), Bash does +not print the @code{function} keyword. + +@item +Literal tildes that appear as the first character in elements of +the @env{PATH} variable are not expanded as described above +under @ref{Tilde Expansion}. + +@item +The @code{time} reserved word may be used by itself as a command. When +used in this way, it displays timing statistics for the shell and its +completed children. The @env{TIMEFORMAT} variable controls the format +of the timing information. + +@item +When parsing and expanding a $@{@dots{}@} expansion that appears within +double quotes, single quotes are no longer special and cannot be used to +quote a closing brace or other special character, unless the operator is +one of those defined to perform pattern removal. In this case, they do +not have to appear as matched pairs. + +@item +The parser does not recognize @code{time} as a reserved word if the next +token begins with a @samp{-}. + +@ignore +@item +When parsing @code{$()} command substitutions containing here-documents, +the parser does not allow a here-document to be delimited by the closing +right parenthesis. The newline after the here-document delimiter is required. +@end ignore + +@item +The @samp{!} character does not introduce history expansion within a +double-quoted string, even if the @code{histexpand} option is enabled. + +@item +If a @sc{posix} special builtin returns an error status, a +non-interactive shell exits. The fatal errors are those listed in +the @sc{posix} standard, and include things like passing incorrect options, +redirection errors, variable assignment errors for assignments preceding +the command name, and so on. + +@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 a variable +assignment error occurs in an assignment statement preceding a special +builtin, but not with any other simple command. For any other simple +command, the shell aborts execution of that command, and execution continues +at the top level ("the shell shall not perform any further processing of the +command in which the error occurred"). + +@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 +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 +Non-interactive shells exit if a parameter expansion error occurs. + +@item +Non-interactive shells exit if there is a syntax error in a script read +with the @code{.} or @code{source} builtins, or in a string processed by +the @code{eval} builtin. + +@item +While variable indirection is available, it may not be applied to the +@samp{#} and @samp{?} special parameters. + +@item +Expanding the @samp{*} special parameter in a pattern context where the +expansion is double-quoted does not treat the @code{$*} as if it were +double-quoted. + +@item +Assignment statements preceding @sc{posix} special builtins +persist in the shell environment after the builtin completes. + +@item +The @code{command} builtin does not prevent builtins that take assignment +statements as arguments from expanding them as assignment statements; +when not in @sc{posix} mode, assignment builtins lose their assignment +statement expansion properties when preceded by @code{command}. + +@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 +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 +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 +@code{trap -p} displays signals whose dispositions are set to SIG_DFL and +those that were ignored when the shell started. + +@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 +Enabling @sc{posix} mode has the effect of setting the +@code{inherit_errexit} option, so +subshells spawned to execute command substitutions inherit the value of +the @option{-e} option from the parent shell. +When the @code{inherit_errexit} option is not enabled, +Bash clears the @option{-e} option in such subshells. + +@item +Enabling @sc{posix} mode has the effect of setting the +@code{shift_verbose} option, so numeric arguments to @code{shift} +that exceed the number of positional parameters will result in an +error message. + +@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 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 physical mode. + +@item +When the @code{cd} builtin cannot change a directory because the +length of the pathname +constructed from @code{$PWD} and the directory name supplied as an argument +exceeds @code{PATH_MAX} when all symbolic links are expanded, @code{cd} will +fail instead of attempting to use only the supplied directory name. + +@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. + +@item +The @code{read} builtin may be interrupted by a signal for which a trap +has been set. +If Bash receives a trapped signal while executing @code{read}, the trap +handler executes and @code{read} returns an exit status greater than 128. + +@item +The @code{printf} builtin uses @code{double} (via @code{strtod}) to convert +arguments corresponding to floating point conversion specifiers, instead of +@code{long double} if it's available. The @samp{L} length modifier forces +@code{printf} to use @code{long double} if it's available. + +@item +Bash removes an exited background process's status from the list of such +statuses after the @code{wait} builtin is used to obtain it. + +@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 Shell Compatibility Mode +@section Shell Compatibility Mode +@cindex Compatibility Level +@cindex Compatibility Mode + +Bash-4.0 introduced the concept of a @dfn{shell compatibility level}, +specified as a set of options to the shopt builtin +(@code{compat31}, +@code{compat32}, +@code{compat40}, +@code{compat41}, +and so on). +There is only one current +compatibility level -- each option is mutually exclusive. +The compatibility level is intended to allow users to select behavior +from previous versions that is incompatible with newer versions +while they migrate scripts to use current features and +behavior. It's intended to be a temporary solution. + +This section does not mention behavior that is standard for a particular +version (e.g., setting @code{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 subsequent versions). + +If a user enables, say, @code{compat32}, it may affect the behavior of other +compatibility levels up to and including the current compatibility level. +The idea is that each compatibility level controls behavior that changed +in that version of Bash, +but that behavior may have been present in earlier versions. +For instance, the change to use locale-based comparisons with the @code{[[} +command came in bash-4.1, and earlier versions used ASCII-based comparisons, +so enabling @code{compat32} will enable ASCII-based comparisons as well. +That granularity may not be sufficient for +all uses, and as a result users should employ compatibility levels carefully. +Read the documentation for a particular feature to find out the +current behavior. + +Bash-4.3 introduced a new shell variable: @env{BASH_COMPAT}. +The value assigned +to this variable (a decimal version number like 4.2, or an integer +corresponding to the @code{compat}@var{NN} option, like 42) determines the +compatibility level. + +Starting with bash-4.4, Bash has begun deprecating older compatibility +levels. +Eventually, the options will be removed in favor of @env{BASH_COMPAT}. + +Bash-5.0 is the final version for which there will be an individual shopt +option for the previous version. Users should use @env{BASH_COMPAT} +on bash-5.0 and later versions. + +The following table describes the behavior changes controlled by each +compatibility level setting. +The @code{compat}@var{NN} tag is used as shorthand for setting the +compatibility level +to @var{NN} using one of the following mechanisms. +For versions prior to bash-5.0, the compatibility level may be set using +the corresponding @code{compat}@var{NN} shopt option. +For bash-4.3 and later versions, the @env{BASH_COMPAT} variable is preferred, +and it is required for bash-5.1 and later versions. + +@table @code +@item compat31 +@itemize @bullet +@item +quoting the rhs of the @code{[[} command's regexp matching operator (=~) +has no special effect +@end itemize + +@item compat32 +@itemize @bullet +@item +interrupting a command list such as "a ; b ; c" causes the execution +of the next command in the list (in bash-4.0 and later versions, +the shell acts as if it received the interrupt, so +interrupting one command in a list aborts the execution of the +entire list) +@end itemize + +@item compat40 +@itemize @bullet +@item +the @samp{<} and @samp{>} operators to the @code{[[} command do not +consider the current locale when comparing strings; they use ASCII +ordering. +Bash versions prior to bash-4.1 use ASCII collation and strcmp(3); +bash-4.1 and later use the current locale's collation sequence and +strcoll(3). +@end itemize + +@item compat41 +@itemize @bullet +@item +in posix mode, @code{time} may be followed by options and still be +recognized as a reserved word (this is @sc{posix} interpretation 267) +@item +in posix mode, the parser requires that an even number of single +quotes occur in the @var{word} portion of a double-quoted $@{@dots{}@} +parameter expansion and treats them specially, so that characters within +the single quotes are considered quoted +(this is @sc{posix} interpretation 221) +@end itemize + +@item compat42 +@itemize @bullet +@item +the replacement string in double-quoted pattern substitution does not +undergo quote removal, as it does in versions after bash-4.2 +@item +in posix mode, single quotes are considered special when expanding +the @var{word} portion of a double-quoted $@{@dots{}@} parameter expansion +and can be used to quote a closing brace or other special character +(this is part of @sc{posix} interpretation 221); +in later versions, single quotes +are not special within double-quoted word expansions +@end itemize + +@item compat43 +@itemize @bullet +@item +the shell does not print a warning message if an attempt is made to +use a quoted compound assignment as an argument to declare +(e.g., declare -a foo='(1 2)'). Later versions warn that this usage is +deprecated +@item +word expansion errors are considered non-fatal errors that cause the +current command to fail, even in posix mode +(the default behavior is to make them fatal errors that cause the shell +to exit) +@item +when executing a shell function, the loop state (while/until/etc.) +is not reset, so @code{break} or @code{continue} in that function will break +or continue loops in the calling context. Bash-4.4 and later reset +the loop state to prevent this +@end itemize + +@item compat44 +@itemize @bullet +@item +the shell sets up the values used by @env{BASH_ARGV} and @env{BASH_ARGC} +so they can expand to the shell's positional parameters even if extended +debugging mode is not enabled +@item +a subshell inherits loops from its parent context, so @code{break} +or @code{continue} will cause the subshell to exit. +Bash-5.0 and later reset the loop state to prevent the exit +@item +variable assignments preceding builtins like @code{export} and @code{readonly} +that set attributes continue to affect variables with the same +name in the calling environment even if the shell is not in posix +mode +@end itemize + +@item compat50 (set using BASH_COMPAT) +@itemize @bullet +@item +Bash-5.1 changed the way @code{$RANDOM} is generated to introduce slightly +more randomness. If the shell compatibility level is set to 50 or +lower, it reverts to the method from bash-5.0 and previous versions, +so seeding the random number generator by assigning a value to +@env{RANDOM} will produce the same sequence as in bash-5.0 +@item +If the command hash table is empty, Bash versions prior to bash-5.1 +printed an informational message to that effect, even when producing +output that can be reused as input. Bash-5.1 suppresses that message +when the @option{-l} option is supplied. +@end itemize + +@item compat51 (set using BASH_COMPAT) +@itemize @bullet +@item +The @code{unset} builtin will unset the array @code{a} given an argument like +@samp{a[@@]}. +Bash-5.2 will unset an element with key @samp{@@} (associative arrays) +or remove all the elements without unsetting the array (indexed arrays) +@item +arithmetic commands ( ((...)) ) and the expressions in an arithmetic for +statement can be expanded more than once +@item +expressions used as arguments to arithmetic operators in the @code{[[} +conditional command can be expanded more than once +@item +the expressions in substring parameter brace expansion can be +expanded more than once +@item +the expressions in the $(( ... )) word expansion can be expanded +more than once +@item +arithmetic expressions used as indexed array subscripts can be +expanded more than once +@item +@code{test -v}, when given an argument of @samp{A[@@]}, where @var{A} is +an existing associative array, will return true if the array has any set +elements. +Bash-5.2 will look for and report on a key named @samp{@@} +@item +the $@{@var{parameter}[:]=@var{value}@} word expansion will return +@var{value}, before any variable-specific transformations have been +performed (e.g., converting to lowercase). +Bash-5.2 will return the final value assigned to the variable. +@item +Parsing command substitutions will behave as if extended glob +(@pxref{The Shopt Builtin}) +is enabled, so that parsing a command substitution containing an extglob +pattern (say, as part of a shell function) will not fail. +This assumes the intent is to enable extglob before the command is executed +and word expansions are performed. +It will fail at word expansion time if extglob hasn't been +enabled by the time the command is executed. +@end itemize +@end table + +@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 +@dfn{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 @dfn{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 (@dfn{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 job whose command name begins with @samp{ce}. +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. + +When the shell is waiting for a job or process using the @code{wait} +builtin, and job control is enabled, @code{wait} will return when the +job changes state. The @option{-f} option causes @code{wait} to wait +until the job or process terminates before returning. + +@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 +Display only running jobs. + +@item -s +Display only 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|-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 @option{-L} option is equivalent to @option{-l}. +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 [-fn] [-p @var{varname}] [@var{jobspec} or @var{pid} @dots{}] +@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, +@code{wait} waits for all running background jobs and +the last-executed process substitution, if its process id is the same as +@var{$!}, +and the return status is zero. +If the @option{-n} option is supplied, @code{wait} waits for a single job +from the list of @var{pid}s or @var{jobspec}s or, if no arguments are +supplied, any job, +to complete and returns its exit status. +If none of the supplied arguments is a child of the shell, or if no arguments +are supplied and the shell has no unwaited-for children, the exit status +is 127. +If the @option{-p} option is supplied, the process or job identifier of the job +for which the exit status is returned is assigned to the variable +@var{varname} named by the option argument. +The variable will be unset initially, before any assignment. +This is useful only when the @option{-n} option is supplied. +Supplying the @option{-f} option, when job control is enabled, +forces @code{wait} to wait for each @var{pid} or @var{jobspec} to +terminate before returning its status, instead of returning when it changes +status. +If neither @var{jobspec} nor @var{pid} specifies an active child process +of the shell, the return status is 127. +If @code{wait} is interrupted by a signal, the return status will be greater +than 128, as described above (@pxref{Signals}). +Otherwise, the return status is the exit status +of the last process or job waited for. + +@item disown +@btindex disown +@example +disown [-ar] [-h] [@var{jobspec} @dots{} | @var{pid} @dots{} ] +@end example + +Without options, remove each @var{jobspec} 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 the +@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, +or a shell without job control enabled, +cannot be suspended; the @option{-f} +option can be used to override this and force the suspension. +The return status is 0 unless the shell is a login shell +or job control is not enabled +and +@option{-f} +is not supplied. + +@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, message translation +files, some supplemental documentation, a number of example loadable +builtin commands, and a set of header files for developing loadable +builtins. +You may need additional privileges to install @code{bash} to your +desired destination, so @samp{sudo make install} might be required. +More information about controlling the locations where @code{bash} and +other files are installed is below (@pxref{Installation Names}). + +@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}, @file{po}, 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-4.2$ ./configure --help +@end example + +@noindent +at the Bash prompt in your Bash source directory. + +If you want to build Bash in a directory separate from the source +directory -- to build for multiple architectures, for example -- +just use the full path to the configure script. The following commands +will build bash in a directory under @file{/usr/local/build} from +the source code in @file{/usr/local/src/bash-4.4}: + +@example +mkdir /usr/local/build/bash-4.4 +cd /usr/local/build/bash-4.4 +bash /usr/local/src/bash-4.4/configure +make +@end example + +See @ref{Compiling For Multiple Architectures} for more information +about building in a directory separate from the source. + +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.ac} is used to create @code{configure} +by a program called Autoconf. +You only need @file{configure.ac} 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.69 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 +(@pxref{Basic Installation}). +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 support 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.; +that is, the @dfn{installation prefix} defaults to @file{/usr/local}. +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 @env{prefix} @samp{make} +variable when running @samp{make install} +(e.g., @samp{make install prefix=@var{PATH}}). +The @env{prefix} variable provides a default for @env{exec_prefix} and +other variables used when installing bash. + +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. + +If you would like to change the installation locations for a single run, +you can specify these variables as arguments to @code{make}: +@samp{make install exec_prefix=/} will install @code{bash} and +@code{bashbug} into @file{/bin} instead of the default @file{/usr/local/bin}. + +If you want to see the files bash will install and where it will install +them without changing anything on your system, specify the variable +@env{DESTDIR} as an argument to @code{make}. Its value should be the +absolute directory path you'd like to use as the root of your sample +installation tree. For example, + +@example +mkdir /fs1/bash-install +make install DESTDIR=/fs1/bash-install +@end example + +@noindent +will install @code{bash} into @file{/fs1/bash-install/usr/local/bin/bash}, +the documentation into directories within +@file{/fs1/bash-install/usr/local/share}, the example loadable builtins into +@file{/fs1/bash-install/usr/local/lib/bash}, and so on. +You can use the usual @env{exec_prefix} and @env{prefix} variables to alter +the directory paths beneath the value of @env{DESTDIR}. + +The GNU Makefile standards provide a more complete description of these +variables and their effects. + +@node Specifying the System Type +@section Specifying the System Type + +There may be some features @code{configure} can not figure out +automatically, but needs 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-libintl-prefix[=@var{PREFIX}] +Define this to make Bash link with a locally-installed version of the +libintl library instead of the version in @file{lib/intl}. + +@item --with-libiconv-prefix[=@var{PREFIX}] +Define this to make Bash look for libiconv in @var{PREFIX} instead of the +standard system locations. There is no version included with Bash. + +@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, linked, and installed, rather than changing run-time features. + +@table @code +@item --enable-largefile +Enable support for @uref{http://www.unix.org/version2/whatsnew/lfs20mar.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-separate-helpfiles +Use external files for the documentation displayed by the @code{help} builtin +instead of storing the text internally. + +@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{alt-array-implementation}, +@samp{disabled-builtins}, +@samp{direxpand-default}, +@samp{strict-posix-default}, +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-alt-array-implementation +This builds bash using an alternate implementation of arrays +(@pxref{Arrays}) that provides faster access at the expense of using +more memory (sometimes many times more, depending on how sparse an array is). + +@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 @code{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 @sc{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-dev-fd-stat-broken +If calling @code{stat} on /dev/fd/@var{N} returns different results than +calling @code{fstat} on file descriptor @var{N}, supply this option to +enable a workaround. +This has implications for conditional commands that test file attributes. + +@item --enable-direxpand-default +Cause the @code{direxpand} shell option (@pxref{The Shopt Builtin}) +to be enabled by default when the shell starts. +It is normally disabled by default. + +@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 @code{extglob} shell option described +above under @ref{The Shopt Builtin} to be enabled. + +@item --enable-function-import +Include support for importing function definitions exported by another +instance of the shell from the environment. This option is enabled by +default. + +@item --enable-glob-asciirange-default +Set the default value of the @code{globasciiranges} shell option described +above under @ref{The Shopt Builtin} to be enabled. +This controls the behavior of character ranges when used in pattern matching +bracket expressions. + +@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{$PS0}, @env{$PS1}, @env{$PS2}, and @env{$PS4} prompt +strings. See @ref{Controlling the 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} compound command, which allows the generation of +simple menus (@pxref{Conditional Constructs}). + +@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-translatable-strings +Enable support for @code{$"@var{string}"} translatable strings +(@pxref{Locale Translation}). + +@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/} and from +@uref{http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz}. + +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{bug-bash@@gnu.org}. + +@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}/[/]}@var{pattern}@code{[/}@var{replacement}@code{]@}}, +which matches @var{pattern} and replaces it with @var{replacement} in +the value of @var{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 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 +The filename expansion bracket expression code uses @samp{!} and @samp{^} +to negate the set of characters between the brackets. +The Bourne shell uses only @samp{!}. + +@item +Bash implements the full set of @sc{posix} filename expansion operators, +including character classes, equivalence classes, and +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} (@option{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 a @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{Controlling the 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 index a721e38..1a9b3ed 100644 --- a/doc/builtins.0 +++ b/doc/builtins.0 @@ -1,56 +1,62 @@ -BASH_BUILTINS(1) BASH_BUILTINS(1) +BASH_BUILTINS(1) General Commands Manual 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, + :, ., [, 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, + readarray, 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. + options. The ::, ttrruuee, ffaallssee, and tteesstt/[[ builtins do not accept options + and do not treat ---- specially. The eexxiitt, llooggoouutt, rreettuurrnn, bbrreeaakk, ccoonn-- + ttiinnuuee, lleett, and sshhiifftt 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 interpreta- + tion. :: [_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. + No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s + and performing any specified redirections. The return status is + zero. .. _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. + Read and execute commands from _f_i_l_e_n_a_m_e in the current shell en- + vironment 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, + filenames in PPAATTHH are used to find the directory containing + _f_i_l_e_n_a_m_e, but _f_i_l_e_n_a_m_e does not need to be executable. The file + searched for in PPAATTHH need not be executable. When bbaasshh is not + in _p_o_s_i_x _m_o_d_e, it searches the current directory 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 positional parameters when + _f_i_l_e_n_a_m_e is executed. Otherwise the positional parameters are + unchanged. If the --TT option is enabled, .. inherits any trap on + DDEEBBUUGG; if it is not, any DDEEBBUUGG trap string is saved and restored + around the call to .., and .. unsets the DDEEBBUUGG trap while it exe- + cutes. If --TT is not set, and the sourced file changes the DDEEBBUUGG + trap, the new value is retained when .. completes. 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 + _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 + plied, the name and value of the alias is printed. AAlliiaass re- + turns true unless a _n_a_m_e is given for which no alias has been defined. bbgg [_j_o_b_s_p_e_c ...] @@ -61,24 +67,27 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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] [--llppssvvPPSSVVXX] 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 + bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d + bbiinndd _r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d_-_l_i_n_e 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: + variable. Each non-option argument is a command as it would ap- + pear in a rreeaaddlliinnee initialization file such as _._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. + _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 (_v_i_-_m_o_v_e + is also a synonym); _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. @@ -100,14 +109,21 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS --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 + Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is en- + tered. 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. + lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT and RREEAADDLLIINNEE__MMAARRKK + variables to the current location of the insertion point + and the saved insertion point (the mark), respectively. + The shell assigns any numeric argument the user supplied + to the RREEAADDLLIINNEE__AARRGGUUMMEENNTT variable. If there was no argu- + ment, that variable is not set. If the executed command + changes the value of any of RREEAADDLLIINNEE__LLIINNEE, RREEAADD-- + LLIINNEE__PPOOIINNTT, or RREEAADDLLIINNEE__MMAARRKK, those new values will be + reflected in the editing state. + --XX List all key sequences bound to shell commands and the + associated commands in a format that can be reused as in- + put. The return value is 0 unless an unrecognized option is given or an error occurred. @@ -115,8 +131,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + than the number of enclosing loops, all enclosing loops are ex- + ited. 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] @@ -129,7 +145,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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- + 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, @@ -140,106 +156,133 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + ccdd [--LL|[--PP [--ee]] [-@]] [_d_i_r] + Change the current directory to _d_i_r. if _d_i_r is not supplied, + the value of the HHOOMMEE shell variable is the default. The vari- + able CCDDPPAATTHH defines the search path for the directory containing + _d_i_r: each directory name in CCDDPPAATTHH is searched for _d_i_r. Alter- + native directory names in CCDDPPAATTHH are separated by a colon (:). + A null directory name in CCDDPPAATTHH is the same as the current di- + rectory, i.e., ``..''. If _d_i_r begins with a slash (/), then CCDD-- + PPAATTHH is not used. The --PP option causes ccdd to use the physical + directory structure by resolving symbolic links while traversing + _d_i_r and before processing instances of _._. in _d_i_r (see also the + --PP option to the sseett builtin command); the --LL option forces sym- + bolic links to be followed by resolving the link after process- + ing instances of _._. in _d_i_r. If _._. appears in _d_i_r, it is pro- + cessed by removing the immediately previous pathname component + from _d_i_r, back to a slash or the beginning of _d_i_r. If the --ee + option is supplied with --PP, and the current working directory + cannot be successfully determined after a successful directory + change, ccdd will return an unsuccessful status. On systems that + support it, the --@@ option presents the extended attributes asso- + ciated with a file as a directory. An argument of -- is con- + verted to $$OOLLDDPPWWDD before the directory change is attempted. If + a non-empty directory name from CCDDPPAATTHH is used, or if -- is the + first argument, and the directory change is successful, the ab- + solute pathname of the new working directory is written to the + standard output. If the directory change is successful, ccdd sets + the value of the PPWWDD environment variable to the new directory + name, and sets the OOLLDDPPWWDD environment variable to the value of + the current working directory before the change. The return + value is true if the directory was successfully 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 + 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 op- + tion 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 filename 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 + 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- + 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, + 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 fa- + cilities, while available, will not have useful values. + + The matches will be generated in the same way as if the program- + mable completion code had generated them directly from a comple- + tion specification with the same flags. If _w_o_r_d is specified, + 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 + ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEEII] [--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 [--DDEEII] [_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. + 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 other sup- + plied options and actions should apply to the ``default'' com- + mand completion; that is, completion attempted on a command for + which no completion has previously been defined. The --EE option + indicates that other supplied options and actions should apply + to ``empty'' command completion; that is, completion attempted + on a blank line. The --II option indicates that other supplied + options and actions should apply to completion on the initial + non-assignment word on the line, or after a command delimiter + such as ;; or ||, which is usually command name completion. If + multiple options are supplied, the --DD option takes precedence + over --EE, and both take precedence over --II. If any of --DD, --EE, or + --II are supplied, any other _n_a_m_e arguments are ignored; these + completions only apply to the case specified by the option. The process of applying these completion specifications when - word completion is attempted is described above under PPrroo-- - ggrraammmmaabbllee CCoommpplleettiioonn. + word completion is attempted is described in _b_a_s_h_(_1_). - 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- + 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- + 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 + ddeeffaauulltt Use readline's default filename completion if the compspec generates no matches. ddiirrnnaammeess - Perform directory name completion if the comp- + 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 + 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 + nnooqquuoottee Tell readline not to quote the completed words + if they are filenames (quoting filenames is the + default). + nnoossoorrtt Tell readline not to sort the list of possible + completions alphabetically. + nnoossppaaccee Tell readline not to append a space (the de- + fault) 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. + generated, directory name completion is at- + tempted 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: @@ -272,9 +315,9 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS --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 + sseettoopptt Valid arguments for the --oo option to the sseett builtin. - sshhoopptt Shell option names as accepted by the sshhoopptt + sshhoopptt Shell option names as accepted by the sshhoopptt builtin. ssiiggnnaall Signal names. ssttooppppeedd Names of stopped jobs, if job control is active. @@ -282,176 +325,205 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS vvaarriiaabbllee Names of all shell variables. May also be spec- ified as --vv. + --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. Arguments + are passed as with the --FF option. + --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 the function is executed, the + first argument ($$11) is the name of the command whose ar- + guments are being completed, the second argument ($$22) is + the word being completed, and the third argument ($$33) is + the word preceding the word being completed on the cur- + rent command line. When it finishes, the possible com- + pletions are retrieved from the value of the CCOOMMPPRREEPPLLYY + array variable. --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. + --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. --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. + is expanded. Shell quoting is honored within _w_o_r_d_l_i_s_t, + in order to provide a mechanism for the words to contain + shell metacharacters or characters in the value of IIFFSS. + The possible completions are the members of the resul- + tant list which match the word being completed. --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. + case, any completion not matching _f_i_l_t_e_r_p_a_t is removed. - 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 + 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. + ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEEII] [++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-executing completion if no _n_a_m_es are + supplied. If no _o_p_t_i_o_ns are given, display the completion op- + tions 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 de- + scribed above. The --DD option indicates that other supplied op- + tions 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 other + supplied options should apply to ``empty'' command completion; + that is, completion attempted on a blank line. The --II option + indicates that other supplied options should apply to completion + on the initial non-assignment word on the line, or after a com- + mand delimiter such as ;; or ||, which is usually command name + completion. + + 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 + completion 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 + sseelleecctt loop. If _n is specified, resume at the _nth enclosing + loop. _n must be >= 1. If _n is greater than the number of en- + closing 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 [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] + ttyyppeesseett [--aaAAffFFggiiIIllnnrrttuuxx] [--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). + with _n_a_m_e arguments, additional options, other than --ff and --FF, + 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 at- + tributes and values of all shell variables. The --ff option will + restrict the display to shell functions. The --FF option inhibits + the display of function definitions; 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 each + _n_a_m_e is defined are displayed as well. The --FF option implies + --ff. The --gg option forces variables to be created or modified at + the global scope, even when ddeeccllaarree is executed in a shell func- + tion. It is ignored in all other cases. The --II option causes + local variables to inherit the attributes (except the _n_a_m_e_r_e_f + attribute) and value of any existing variable with the same _n_a_m_e + at a surrounding scope. If there is no existing variable, the + local variable is initially unset. The following options can be + used to restrict output to variables with the specified attri- + bute or to give variables attributes: + --aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss in + _b_a_s_h_(_1_)). + --AA Each _n_a_m_e is an associative array variable (see AArrrraayyss in + _b_a_s_h_(_1_)). --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. + tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN in _b_a_s_h_(_1_)) 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. + --nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name + reference to another variable. That other variable is + defined by the value of _n_a_m_e. All references, assign- + ments, and attribute modifications to _n_a_m_e, except those + using or changing the --nn attribute itself, are performed + on the variable referenced by _n_a_m_e's value. The nameref + attribute cannot be applied to array variables. --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 + --tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions in- + herit 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. + --xx Mark _n_a_m_es for export to subsequent commands via the en- + vironment. + + Using `+' instead of `-' turns off the attribute instead, with + the exceptions that ++aa and ++AA may not be used to destroy array + variables and ++rr will not remove the readonly attribute. When + used in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e local, as + with the llooccaall command, unless the --gg option is supplied. If a + variable name is followed by =_v_a_l_u_e, the value of the variable + is set to _v_a_l_u_e. When using --aa or --AA and the compound assign- + ment syntax to create array variables, additional attributes do + not take effect until subsequent assignments. 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 as- + sign a value to an array variable without using the compound as- + signment syntax (see AArrrraayyss in _b_a_s_h_(_1_)), 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 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 --ff. + + ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]] + Without options, displays the list of currently remembered di- + rectories. The default display is on a single line with direc- + tory names separated by spaces. Directories are added to the + list with the ppuusshhdd command; the ppooppdd command removes entries + from the list. The current directory is always the first direc- + tory in the stack. + --cc Clears the directory stack by deleting all of the en- + tries. + --ll Produces a listing using full pathnames; 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. ++_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 + 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. + ddiissoowwnn [--aarr] [--hh] [_j_o_b_s_p_e_c ... | _p_i_d ... ] + Without options, remove each _j_o_b_s_p_e_c from the table of active + jobs. If _j_o_b_s_p_e_c is not 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 the --hh option + is given, each _j_o_b_s_p_e_c is not removed from the table, but is + marked so that SSIIGGHHUUPP is not sent to the job if the shell re- + ceives a SSIIGGHHUUPP. 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 ar- + gument 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: + Output the _a_r_gs, separated by spaces, followed by a newline. + The return status is 0 unless a write error occurs. If --nn is + specified, the trailing newline is suppressed. If the --ee option + is given, interpretation of the following backslash-escaped + characters is enabled. The --EE option disables the interpreta- + tion of these escape characters, 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 es- + cape characters by default. eecchhoo does not interpret ---- to mean + the end of options. eecchhoo interprets the following escape se- + quences: \\aa alert (bell) \\bb backspace \\cc suppress further output - \\ee an escape character + \\ee + \\EE an escape character \\ff form feed \\nn new line \\rr carriage return @@ -462,27 +534,38 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS _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) + \\uu_H_H_H_H the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H (one to four hex digits) + \\UU_H_H_H_H_H_H_H_H + the Unicode (ISO/IEC 10646) character whose value is the + hexadecimal value _H_H_H_H_H_H_H_H (one to eight 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 + If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are en- + abled. 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. + Bash will use the value of the BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH variable as a + colon-separated list of directories in which to search for _f_i_l_e_- + _n_a_m_e. The default is system-dependent. The --dd option will + delete a builtin previously loaded with --ff. If no _n_a_m_e argu- + ments are given, or if the --pp option is supplied, a list of + shell builtins is printed. With no other option arguments, the + list consists of all enabled shell builtins. If --nn is supplied, + only disabled builtins are printed. If --aa is supplied, the list + printed includes all builtins, with an indication of whether or + not each is enabled. If --ss is supplied, the output is re- + stricted to the POSIX _s_p_e_c_i_a_l builtins. If no options are sup- + plied and a _n_a_m_e is not a shell builtin, eennaabbllee will attempt to + load _n_a_m_e from a shared object named _n_a_m_e, as if the command + were ``enable -f _n_a_m_e _n_a_m_e . 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- @@ -494,16 +577,17 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + 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 + unless the eexxeeccffaaiill shell option is enabled. In that 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. + file cannot be executed. A subshell exits unconditionally if + eexxeecc fails. If _c_o_m_m_a_n_d 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. eexxiitt [_n] Cause the shell to exit with a status of _n. If _n is omitted, @@ -515,27 +599,29 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + if the --pp option is supplied, a list of names of all exported + variables 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 sup- + plied with a _n_a_m_e that is not a function. 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 first form selects a range of commands from _f_i_r_s_t to _l_a_s_t + from the history list and displays or edits and re-executes + them. _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 current command number). When listing, a + _f_i_r_s_t or _l_a_s_t of 0 is equivalent to -1 and -0 is equivalent to + the current command (usually the ffcc command); otherwise 0 is + equivalent to -1 and -0 is invalid. 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 specified, 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 @@ -543,17 +629,17 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + 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. + of _p_a_t is replaced by _r_e_p. _C_o_m_m_a_n_d is interpreted the same as + _f_i_r_s_t above. 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. - 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 + If the first form is used, the return value is 0 unless an in- + valid 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 @@ -570,41 +656,42 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g _._._.] 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 + nized; if a character is followed by a colon, the option is ex- + pected 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. + 1 each time the shell or a shell script is invoked. When an op- + tion requires an argument, ggeettooppttss places that argument into the + variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automatically; + it must be manually reset between multiple calls to ggeettooppttss + within the same shell invocation if a new set of parameters 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 ?. + When the end of options is encountered, ggeettooppttss exits with a re- + turn value greater than zero. OOPPTTIINNDD is set to the index of the + first non-option argument, and _n_a_m_e 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- + arguments are supplied as _a_r_g values, ggeettooppttss parses those in- + stead. + + 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. + ggeettooppttss is silent, the option character found is placed in OOPP-- + TTAARRGG 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 @@ -617,62 +704,74 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + Each time hhaasshh is invoked, the full pathname of the command _n_a_m_e + is determined by searching the directories in $$PPAATTHH and remem- + bered. Any previously-remembered pathname is discarded. 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 filename of the command. The --rr option + causes the shell to forget all remembered locations. The --dd op- + tion 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 + 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 + 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 + 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. + + 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 --dd _s_t_a_r_t-_e_n_d 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 + _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 + Delete the history entry at position _o_f_f_s_e_t. If _o_f_f_s_e_t + is negative, it is interpreted as relative to one greater + than the last history position, so negative indices count + back from the end of the history, and an index of -1 + refers to the current hhiissttoorryy --dd command. + --dd _s_t_a_r_t-_e_n_d + Delete the range of history entries between positions + _s_t_a_r_t and _e_n_d, inclusive. Positive and negative values + for _s_t_a_r_t and _e_n_d are interpreted as described above. + --aa Append the ``new'' history lines to the history file. + These are history lines entered since the beginning of + the current bbaasshh session, but not already appended 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 + file into the current history list. These are lines ap- + pended 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. + --rr Read the contents of the history file and append them to + the current history list. + --ww Write the current history list to the history file, over- + writing 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 @@ -686,79 +785,91 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + timestamps for the following history entry. 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 or range + is supplied as an argument to --dd, or the history expansion sup- + plied 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 + --nn Display information only about jobs that have changed + status since the user was last notified of their status. + --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. + --rr Display only running jobs. + --ss Display only 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 + 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. + _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and ex- + ecutes _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 + kkiillll --ll|--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. + --ll is a number specifying either a signal number or the exit + status of a process terminated by a signal. The --LL option is + equivalent to --ll. kkiillll returns true if at least one signal was + successfully sent, or false if an error occurs or an invalid op- + tion 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. + MMEETTIICC EEVVAALLUUAATTIIOONN in _b_a_s_h_(_1_)). 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] ...] + 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. + tion and its children. If _n_a_m_e is -, the set of shell options + is made local to the function in which llooccaall is invoked: shell + options changed using the sseett builtin inside the function are + restored to their original values when the function returns. + The restore is effected as if a series of sseett commands were exe- + cuted to restore the values that were in place before the func- + tion. 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] + mmaappffiillee [--dd _d_e_l_i_m] [--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 [--dd _d_e_l_i_m] [--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 + --dd The first character of _d_e_l_i_m is used to terminate each + input line, rather than newline. If _d_e_l_i_m is the empty + string, mmaappffiillee will terminate a line when it reads a NUL + character. + --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 + --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. + --tt Remove a trailing _d_e_l_i_m (default 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 @@ -768,88 +879,124 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + array element to be assigned and the line to be assigned to that + element as additional arguments. _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. + 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. + Removes entries from the directory stack. The elements are num- + bered from 0 starting at the first directory listed by ddiirrss. + With no arguments, ppooppdd removes the top directory from the + stack, and changes to the new top directory. Arguments, if sup- + plied, have the following meanings: + --nn Suppresses the normal change of directory when removing + directories from the stack, so that only the stack is ma- + nipulated. + ++_n Removes the _nth entry counting from the left of the list + shown by ddiirrss, starting with zero, from the stack. 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 + 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. + If the top element of the directory stack is modified, and the + _-_n option was not supplied, ppooppdd uses the ccdd builtin to change + to the directory at the top of the stack. If the ccdd fails, ppooppdd + returns a non-zero value. + + Otherwise, ppooppdd returns false if an invalid option is encoun- + tered, the directory stack is empty, or a non-existent directory + stack entry is specified. + + If the ppooppdd command is successful, bash runs ddiirrss to show the + final contents of the directory stack, and the return status is + 0. 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_- + control of the _f_o_r_m_a_t. 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 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 _a_r_g_u_m_e_n_t. In + addition to the standard _p_r_i_n_t_f(1) format specifications, pprriinnttff + interprets the following extensions: + %%bb causes pprriinnttff to expand backslash escape sequences in the + corresponding _a_r_g_u_m_e_n_t in the same way as eecchhoo --ee. + %%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. + %%QQ like %%qq, but applies any supplied precision to the _a_r_g_u_- + _m_e_n_t before quoting it. + %%((_d_a_t_e_f_m_t))TT + causes pprriinnttff to output the date-time string resulting + from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3). + The corresponding _a_r_g_u_m_e_n_t is an integer representing the + number of seconds since the epoch. Two special argument + values may be used: -1 represents the current time, and + -2 represents the time the shell was invoked. If no ar- + gument is specified, conversion behaves as if -1 had been + given. This is an exception to the usual pprriinnttff behav- + ior. + + The %b, %q, and %T directives all use the field width and preci- + sion arguments from the format specification and write that many + bytes from (or use that wide a field for) the expanded argument, + which usually contains more characters than the original. + + Arguments to non-string format specifiers are treated as C con- + stants, except that a leading plus or minus sign is allowed, and + if the leading character is a single or double quote, the value + is the ASCII value of the following character. + + 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 + 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 + 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, ppuusshhdd exchanges the top two ele- + ments of the directory stack. Arguments, if supplied, have the + following meanings: + --nn Suppresses the normal change of directory when rotating + or 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 + --_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. + _d_i_r Adds _d_i_r to the directory stack at the top + + After the stack has been modified, if the --nn option was not sup- + plied, ppuusshhdd uses the ccdd builtin to change to the directory at + the top of the stack. If the ccdd fails, ppuusshhdd returns a non-zero + value. - 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. + Otherwise, if no arguments are supplied, ppuusshhdd returns 0 unless + the directory stack is empty. When rotating the directory + stack, ppuusshhdd returns 0 unless the directory stack is empty or a + non-existent directory stack element is specified. + + If the ppuusshhdd command is successful, bash runs ddiirrss to show the + final contents of the directory stack. ppwwdd [--LLPP] Print the absolute pathname of the current working directory. @@ -857,140 +1004,176 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + occurs while reading the name of the current directory or an in- + valid 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 + One line is read from the standard input, or from the file de- + scriptor _f_d supplied as an argument to the --uu option, split into + words as described in _b_a_s_h_(_1_) under WWoorrdd SSpplliittttiinngg, 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: + second _n_a_m_e, and so on. If there are more words than names, the + remaining words and their intervening delimiters are 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 val- + ues. The characters in IIFFSS are used to split the line into + words using the same rules the shell uses for expansion (de- + scribed in _b_a_s_h_(_1_) under WWoorrdd SSpplliittttiinngg). The backslash charac- + ter (\\) may be used to remove any special meaning for the next + character read and for line continuation. Options, if supplied, + have the following 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. + new values are assigned. Other _n_a_m_e arguments are ig- + nored. --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. + The first character of _d_e_l_i_m is used to terminate the in- + put line, rather than newline. If _d_e_l_i_m is the empty + string, rreeaadd will terminate a line when it reads a NUL + character. --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. + (see RREEAADDLLIINNEE in _b_a_s_h_(_1_)) is used to obtain the line. + Readline uses the current (or default, if line editing + was not previously active) editing settings, but uses + readline's default filename completion. --ii _t_e_x_t - If rreeaaddlliinnee is being used to read the line, _t_e_x_t is + 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 + rreeaadd returns after reading _n_c_h_a_r_s characters rather than + waiting for a complete line of input, but honors 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. + 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. The result is not split on the characters in + IIFFSS; the intent is that the variable is assigned exactly + the characters read (with the exception of backslash; see + the --rr option below). --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. + lar, a backslash-newline pair may not then 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. + line of input (or a specified number of characters) is + not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a deci- + mal number with a fractional portion following the deci- + mal point. This option is only effective if rreeaadd is + reading input from a terminal, pipe, or other special + file; it has no effect when reading from regular files. + If rreeaadd times out, rreeaadd saves any partial input read into + the specified variable _n_a_m_e. If _t_i_m_e_o_u_t is 0, rreeaadd re- + turns immediately, without trying to read any data. The + exit status is 0 if input is available on the specified + file descriptor, or the read will return EOF, non-zero + 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. + If no _n_a_m_e_s are supplied, the line read, without the ending de- + limiter but otherwise unmodified, is assigned to the variable + RREEPPLLYY. The exit status is zero, unless end-of-file is encoun- + tered, rreeaadd times out (in which case the status is greater than + 128), a variable assignment error (such as assigning to a read- + only variable) occurs, or an invalid file descriptor is supplied + as the argument to --uu. - rreeaaddoonnllyy [--aaAAppff] [_n_a_m_e[=_w_o_r_d] ...] + rreeaaddoonnllyy [--aaAAff] [--pp] [_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. + marked. The --aa option restricts the variables to indexed ar- + rays; the --AA option restricts the variables to associative ar- + rays. If both options are supplied, --AA takes precedence. 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 other options may be + used to restrict the output to a subset of the set of readonly + names. 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- + Causes a function to stop executing and return the value speci- + fied by _n to its caller. If _n is omitted, the return status is + that of the last command executed in the function body. If rree-- + ttuurrnn is executed by a trap handler, the last command used to de- + termine the status is the last command executed before the trap + handler. If rreettuurrnn is executed during a DDEEBBUUGG trap, the last + command used to determine the status is the last command exe- + cuted by the trap handler before rreettuurrnn was invoked. If rreettuurrnn + is 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 _n is supplied, the return value is its least signif- + icant 8 bits. The return status is non-zero if rreettuurrnn is sup- + plied a non-numeric argument, or is used outside a function and + not during execution of a script by .. or ssoouurrccee. Any command + associated with the RREETTUURRNN trap is executed before execution re- + sumes after the function or script. + + sseett [--aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] + sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] + Without options, display the name and value of each shell vari- + able in a format that can be reused as input for setting or re- + setting the currently-set variables. Read-only variables cannot + 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 argu- + ments remaining after option processing are treated as values + for the positional parameters and are assigned, in order, to $$11, + $$22, ...... $$_n. Options, if specified, have the following mean- + ings: + --aa Each variable or function that is created or modified is + given the export attribute and marked 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, + --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 _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d + (see SSHHEELLLL GGRRAAMMMMAARR in _b_a_s_h_(_1_)), 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 fi- + nal &&&& or ||||, any command in a pipeline but the last, or + if the command's return value is being inverted with !!. + If a compound command other than a subshell returns a + non-zero status because a command failed while --ee was + being ignored, the shell does not exit. 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. + ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT in + _b_a_s_h_(_1_)), and may cause subshells to exit before execut- + ing all the commands in the subshell. + + If a compound command or shell function executes in a + context where --ee is being ignored, none of the commands + executed within the compound command or function body + will be affected by the --ee setting, even if --ee is set + and a command returns a failure status. If a compound + command or shell function sets --ee while executing in a + context where --ee is ignored, that setting will not have + any effect until the compound command or the command + containing the function call completes. --ff Disable pathname expansion. --hh Remember the location of commands as they are looked up for execution. This is enabled by default. @@ -999,13 +1182,13 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + support it (see JJOOBB CCOONNTTRROOLL in _b_a_s_h_(_1_)). All processes + run in a separate process group. When a background job + completes, the shell prints a line containing its exit + status. --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. + to check a shell script for syntax errors. This is ig- + nored 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 @@ -1025,13 +1208,13 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + hhiissttoorryy Enable command history, as described in _b_a_s_h_(_1_) + under HHIISSTTOORRYY. This option is on by default in + interactive shells. iiggnnoorreeeeooff - The effect is as if the shell command - ``IGNOREEOF=10'' had been executed (see SShheellll - VVaarriiaabblleess above). + The effect is as if the shell command ``IG- + NOREEOF=10'' had been executed (see SShheellll VVaarrii-- + aabblleess in _b_a_s_h_(_1_)). kkeeyywwoorrdd Same as --kk. mmoonniittoorr Same as --mm. nnoocclloobbbbeerr @@ -1052,7 +1235,9 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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). + match the standard (_p_o_s_i_x _m_o_d_e). See SSEEEE AALLSSOO + in _b_a_s_h_(_1_) for a reference to a document that + details how posix mode affects bash's behavior. pprriivviilleeggeedd Same as --pp. vveerrbboossee Same as --vv. @@ -1068,8 +1253,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS --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 + BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they ap- + pear 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 @@ -1077,9 +1262,12 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + --rr Enable restricted shell mode. This option cannot be un- + set once it has been set. --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 + cial parameters "@" and "*", or array variables sub- + scripted with "@" or "*", 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 @@ -1090,7 +1278,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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. + in _b_a_s_h_(_1_)). 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- @@ -1101,16 +1289,16 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + --PP If set, the shell does not resolve 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. + shell functions, command substitutions, and commands ex- + ecuted 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 @@ -1121,255 +1309,396 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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- + rather than - causes these options to be turned off. The op- + tions can also be specified as arguments to an invocation of the + shell. The current set of options may be found in $$--. The re- + turn 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. + Parameters represented by the numbers $$## down to $$##-_n+1 are un- + set. _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 param- + eters 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: + Toggle the values of settings controlling optional shell behav- + ior. The settings can be either those listed below, or, if the + --oo option is used, those available with the --oo option to the sseett + builtin command. With no options, or with the --pp option, a list + of all settable options is displayed, with an indication of + whether or not each is set; if _o_p_t_n_a_m_e_s are supplied, the output + is restricted to those options. The --pp option causes output to + be displayed in a form that may be reused as input. Other op- + tions have the following 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 + --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- + 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 + --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. + If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, sshhoopptt + shows only those options which are set or unset, respectively. + 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 + 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 op- + tions, 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- + aassssoocc__eexxppaanndd__oonnccee + If set, the shell suppresses multiple evaluation of as- + sociative array subscripts during arithmetic expression + evaluation, while executing builtins that can perform + variable assignments, and while executing builtins that + perform array dereferencing. + 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 + 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 + 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 + ter, and one character too many. If a correction is + found, the corrected filename 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- + 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 + 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. + second exit is attempted without an intervening command + (see JJOOBB CCOONNTTRROOLL in _b_a_s_h_(_1_)). The shell always post- + pones 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. + If set, bbaasshh checks the window size after each external + (non-builtin) command and, if necessary, updates the + values of LLIINNEESS and CCOOLLUUMMNNSS. This option is enabled by + default. 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. + easy re-editing of multi-line commands. This option is + enabled by default, but only has an effect if command + history is enabled, as described in _b_a_s_h_(_1_) under HHIISS-- + TTOORRYY. 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. + ccoommppaatt4411 + ccoommppaatt4422 + ccoommppaatt4433 + ccoommppaatt4444 + ccoommppaatt5500 + These control aspects of the shell's compatibility mode + (see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE in _b_a_s_h_(_1_)). + + ccoommpplleettee__ffuullllqquuoottee + If set, bbaasshh quotes all shell metacharacters in file- + names and directory names when performing completion. + If not set, bbaasshh removes metacharacters such as the dol- + lar sign from the set of characters that will be quoted + in completed filenames when these metacharacters appear + in shell variable references in words to be completed. + This means that dollar signs in variable names that ex- + pand to directories will not be quoted; however, any + dollar signs appearing in filenames will not be quoted, + either. This is active only when bash is using back- + slashes to quote completed filenames. This variable is + set by default, which is the default bash behavior in + versions through 4.2. + + ddiirreexxppaanndd + If set, bbaasshh replaces directory names with the results + of word expansion when performing filename completion. + This changes the contents of the readline editing buf- + fer. If not set, bbaasshh attempts to preserve what the + user typed. + ddiirrssppeellll - If set, bbaasshh attempts spelling correction on directory - names during word completion if the directory name ini- + 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. + + ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in + the results of pathname expansion. The filenames ````..'''' + and ````....'''' must always be matched explicitly, even if + ddoottgglloobb is set. + 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 + 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. + If set, aliases are expanded as described in _b_a_s_h_(_1_) un- + der AALLIIAASSEESS. This option is enabled by default for in- + teractive shells. + eexxttddeebbuugg - If set, behavior intended for use by debuggers is - enabled: + If set at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the ----ddeebbuuggggeerr option. If set af- + ter invocation, 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. + cuted by the .. or ssoouurrccee builtins), the shell + simulates a call to rreettuurrnn. + 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described - in their descriptions above. - 55.. Function tracing is enabled: command substitu- + in their descriptions in _b_a_s_h_(_1_)). + + 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. + _c_o_m_m_a_n_d )) inherit the EERRRR trap. + eexxttgglloobb If set, the extended pattern matching features described - above under PPaatthhnnaammee EExxppaannssiioonn are enabled. + in _b_a_s_h_(_1_) 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. + ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS in _b_a_s_h_(_1_) for a + description of FFIIGGNNOORREE. This option is enabled by de- + fault. + + gglloobbaasscciiiirraannggeess + If set, range expressions used in pattern matching + bracket expressions (see PPaatttteerrnn MMaattcchhiinngg in _b_a_s_h_(_1_)) + behave as if in the traditional C locale when performing + comparisons. That is, the current locale's collating + sequence is not taken into account, so bb will not col- + late between AA and BB, and upper-case and lower-case + ASCII characters will collate together. + + gglloobbsskkiippddoottss + If set, pathname expansion will never match the file- + names ````..'''' and ````....'''', even if the pattern begins with + a ````..''''. 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. + text will match all 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. + by the value of the HHIISSTTFFIILLEE variable when the shell ex- + its, 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. + is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE in + _b_a_s_h_(_1_)). This is enabled by default. + hhuuppoonneexxiitt If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter- active login shell exits. + + iinnhheerriitt__eerrrreexxiitt + If set, command substitution inherits the value of the + eerrrreexxiitt option, instead of unsetting it in the subshell + environment. This option is enabled when _p_o_s_i_x _m_o_d_e is + enabled. + 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 + and all remaining characters on that line to be ignored + in an interactive shell (see CCOOMMMMEENNTTSS in _b_a_s_h_(_1_)). This option is enabled by default. - lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line + + llaassttppiippee + If set, and job control is not active, the shell runs + the last command of a pipeline not executed in the back- + ground in the current shell environment. + + 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. + + llooccaallvvaarr__iinnhheerriitt + If set, local variables inherit the value and attributes + of a variable of the same name that exists at a previous + scope before any new value is assigned. The nameref at- + tribute is not inherited. + + llooccaallvvaarr__uunnsseett + If set, calling uunnsseett on local variables in previous + function scopes marks them so subsequent lookups find + them unset until that function returns. This is identi- + cal to the behavior of unsetting local variables at the + current function scope. + llooggiinn__sshheellll The shell sets this option if it is started as a login - shell (see IINNVVOOCCAATTIIOONN above). The value may not be + shell (see IINNVVOOCCAATTIIOONN in _b_a_s_h_(_1_)). 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 + If set, and rreeaaddlliinnee is being used, bbaasshh will not at- + tempt 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). + EExxppaannssiioonn in _b_a_s_h_(_1_)). + nnooccaasseemmaattcchh If set, bbaasshh matches patterns in a case-insensitive fashion when performing matching while executing ccaassee or - [[[[ conditional commands. + [[[[ conditional commands, when performing pattern substi- + tution word expansions, or when filtering possible com- + pletions as part of programmable completion. + + nnooeexxppaanndd__ttrraannssllaattiioonn + If set, bbaasshh encloses the translated results of $"..." + quoting in single quotes instead of double quotes. If + the string is not translated, this has no effect. + nnuullllgglloobb If set, bbaasshh allows patterns which match no files (see - PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string, - rather than themselves. + PPaatthhnnaammee EExxppaannssiioonn in _b_a_s_h_(_1_)) to expand to a null + string, rather than themselves. + + ppaattssuubb__rreeppllaacceemmeenntt + If set, bbaasshh expands occurrences of && in the replacement + string of pattern substitution to the text matched by + the pattern, as described under PPaarraammeetteerr EExxppaannssiioonn in + _b_a_s_h_(_1_). This option is enabled by default. + pprrooggccoommpp If set, the programmable completion facilities (see PPrroo-- - ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is - enabled by default. + ggrraammmmaabbllee CCoommpplleettiioonn in _b_a_s_h_(_1_)) are enabled. This op- + tion is enabled by default. + + pprrooggccoommpp__aalliiaass + If set, and programmable completion is enabled, bbaasshh + treats a command name that doesn't have any completions + as a possible alias and attempts alias expansion. If it + has an alias, bbaasshh attempts programmable completion us- + ing the command word resulting from the expanded alias. + 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. + mand substitution, arithmetic expansion, and quote re- + moval after being expanded as described in PPRROOMMPPTTIINNGG in + _b_a_s_h_(_1_). 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. + The shell sets this option if it is started in re- + stricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL in _b_a_s_h_(_1_)). 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. + sshhiifftt__vveerrbboossee - If set, the sshhiifftt builtin prints an error message when + 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 + 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. + + vvaarrrreeddiirr__cclloossee + If set, the shell automatically closes file descriptors + assigned using the _{_v_a_r_n_a_m_e_} redirection syntax (see RREE-- + DDIIRREECCTTIIOONN in _b_a_s_h_(_1_)) instead of leaving them open when + the command completes. + xxppgg__eecchhoo - If set, the eecchhoo builtin expands backslash-escape - sequences by default. + If set, the eecchhoo builtin expands backslash-escape se- + quences 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. + signal. A login shell, or a shell without job control enabled, + cannot be suspended; the --ff option can be used to override this + and force the suspension. The return status is 0 unless the + shell is a login shell or job control is not enabled and --ff is + not supplied. + 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. + Return a status of 0 (true) or 1 (false) depending on the evalu- + ation of the conditional expression _e_x_p_r. Each operator and op- + erand must be a separate argument. Expressions are composed of + the primaries described in _b_a_s_h_(_1_) under CCOONNDDIITTIIOONNAALL EEXXPPRREESS-- + SSIIOONNSS. 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 de- + pends on the number of arguments; see below. Operator prece- + dence is used when there are five or more arguments. !! _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 @@ -1390,125 +1719,138 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 + ment is one of the unary conditional operators listed in + _b_a_s_h_(_1_) 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. + The following conditions are applied in the order listed. + If the second argument is one of the binary conditional + operators listed in _b_a_s_h_(_1_) under CCOONNDDIITTIIOONNAALL EEXXPPRREESS-- + SSIIOONNSS, the result of the expression is the result of the + binary test using the first and third arguments as oper- + ands. The --aa and --oo operators are considered binary op- + erators when there are three arguments. If the first ar- + gument is !!, the value is the negation of the two-argu- + ment test using the second and third arguments. If the + first argument is exactly (( and the third argument is ex- + actly )), the result is the one-argument test of the sec- + ond argument. Otherwise, the expression is false. 4 arguments + The following conditions are applied in the order listed. 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. + arguments. the two-argument test using the second and + third arguments. If the first argument is exactly (( and + the fourth argument is exactly )), the result is the two- + argument test of the second and third arguments. Other- + wise, 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 + The expression is parsed and evaluated according to precedence using the rules listed above. + When used with tteesstt or [[, the << and >> operators sort lexico- + graphically using ASCII ordering. + 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. + The command _a_r_g is to be read and executed when the shell re- + ceives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a sin- + gle _s_i_g_s_p_e_c) or --, each specified signal is reset to its origi- + nal 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 com- + mands associated with each signal. The --ll option causes the + shell to print a list of signal names and their corresponding + 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 SSIIGG 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 + first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR in + _b_a_s_h_(_1_)). 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 finishes executing. + + If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a + pipeline (which may consist of a single simple command), a list, + or a compound command returns 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 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 using + !!. These are the same conditions obeyed by the eerrrreexxiitt (--ee) op- + tion. + + Signals ignored upon entry to the shell cannot be trapped or re- + set. 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 + 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 + 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, + 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 re- + turned. 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 specified + as a command name, or nothing if ``type -t name'' would not re- + turn _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. + hashed, --pp and --PP print the hashed value, which is not necessar- + ily 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 + function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true + if all of the arguments are found, false if any are not found. + + uulliimmiitt [--HHSS] --aa + uulliimmiitt [--HHSS] [--bbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_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- + 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 + current hard limit, the current soft limit, and no limit, re- + spectively. 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, if appropriate, are printed before the value. Other op- + tions are interpreted as follows: + --aa All current limits are reported; no limits are set --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 + --ff The maximum size of files written by the shell and its children --ii The maximum number of pending signals + --kk The maximum number of kqueues that may be allocated --ll The maximum size that may be locked into memory - --mm The maximum resident set size (many systems do not honor + --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) @@ -1517,20 +1859,25 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS --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 + --uu The maximum number of processes available to a single user - --vv The maximum amount of virtual memory available to the - shell + --vv The maximum amount of virtual memory available to the + shell and, on some systems, to its children --xx The maximum number of file locks + --PP The maximum number of pseudoterminals + --RR The maximum time a real-time process can run before + blocking, in microseconds --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. + If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the + new value of the specified resource. If no option is given, + then --ff is assumed. Values are in 1024-byte increments, except + for --tt, which is in seconds; --RR, which is in microseconds; --pp, + which is in units of 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and + --uu, which are unscaled values; and, when in posix mode, --cc and + --ff, which are in 512-byte increments. 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 @@ -1549,31 +1896,188 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 ...] + uunnsseett [-ffvv] [-nn] [_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 + If the --vv option is given, each _n_a_m_e refers to a shell variable, + and that variable is removed. 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. + tion, and the function definition is removed. If the --nn option + is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f attribute, + _n_a_m_e will be unset rather than the variable it references. --nn + has no effect if the --ff option is supplied. If no options are + supplied, each _n_a_m_e refers to a variable; if there is no vari- + able by that name, a function with that name, if any, is unset. + Each unset variable or function is removed from the environment + passed to subsequent commands. If any of BBAASSHH__AALLIIAASSEESS, + BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBBSSHHEELLLL, BBAASSHHPPIIDD, + CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCC-- + NNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECCOONNDDSS, or SSRRAANNDDOOMM are + unset, they lose their special properties, even if they are sub- + sequently reset. The exit status is true unless a _n_a_m_e is read- + only or may not be unset. + + wwaaiitt [--ffnn] [--pp _v_a_r_n_a_m_e] [_i_d _._._.] + Wait for each specified child process and return its termination + status. Each _i_d 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_d is not given, wwaaiitt waits for all running + background jobs and the last-executed process substitution, if + its process id is the same as $$!!, and the return status is zero. + If the --nn option is supplied, wwaaiitt waits for a single job from + the list of _i_ds or, if no _i_ds are supplied, any job, to complete + and returns its exit status. If none of the supplied arguments + is a child of the shell, or if no arguments are supplied and the + shell has no unwaited-for children, the exit status is 127. If + the --pp option is supplied, the process or job identifier of the + job for which the exit status is returned is assigned to the + variable _v_a_r_n_a_m_e named by the option argument. The variable + will be unset initially, before any assignment. This is useful + only when the --nn option is supplied. Supplying the --ff option, + when job control is enabled, forces wwaaiitt to wait for _i_d to ter- + minate before returning its status, instead of returning when it + changes status. If _i_d specifies a non-existent process or job, + the return status is 127. If wwaaiitt is interrupted by a signal, + the return status will be greater than 128, as described under + SSIIGGNNAALLSS in _b_a_s_h_(_1_). Otherwise, the return status is the exit + status of the last process or job waited for. + +SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE + Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, speci- + fied as a set of options to the shopt builtin ( ccoommppaatt3311, ccoommppaatt3322, + ccoommppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibil- + ity level -- each option is mutually exclusive. The compatibility + level is intended to allow users to select behavior from previous ver- + sions that is incompatible with newer versions while they migrate + scripts to use current features and behavior. It's intended to be a + temporary solution. + + This section does not mention behavior that is standard for a particu- + lar version (e.g., setting ccoommppaatt3322 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 subsequent versions). + + If a user enables, say, ccoommppaatt3322, it may affect the behavior of other + compatibility levels up to and including the current compatibility + level. The idea is that each compatibility level controls behavior + that changed in that version of bbaasshh, but that behavior may have been + present in earlier versions. For instance, the change to use locale- + based comparisons with the [[[[ command came in bash-4.1, and earlier + versions used ASCII-based comparisons, so enabling ccoommppaatt3322 will enable + ASCII-based comparisons as well. That granularity may not be suffi- + cient for all uses, and as a result users should employ compatibility + levels carefully. Read the documentation for a particular feature to + find out the current behavior. + + Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as- + signed to this variable (a decimal version number like 4.2, or an inte- + ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com- + patibility level. + + Starting with bash-4.4, Bash has begun deprecating older compatibility + levels. Eventually, the options will be removed in favor of BBAASSHH__CCOOMM-- + PPAATT. + + Bash-5.0 is the final version for which there will be an individual + shopt option for the previous version. Users should use BBAASSHH__CCOOMMPPAATT on + bash-5.0 and later versions. + + The following table describes the behavior changes controlled by each + compatibility level setting. The ccoommppaatt_N_N tag is used as shorthand for + setting the compatibility level to _N_N using one of the following mecha- + nisms. For versions prior to bash-5.0, the compatibility level may be + set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and + later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re- + quired for bash-5.1 and later versions. + + ccoommppaatt3311 + +o quoting the rhs of the [[[[ command's regexp matching oper- + ator (=~) has no special effect + + ccoommppaatt3322 + +o interrupting a command list such as "a ; b ; c" causes + the execution of the next command in the list (in + bash-4.0 and later versions, the shell acts as if it re- + ceived the interrupt, so interrupting one command in a + list aborts the execution of the entire list) + + ccoommppaatt4400 + +o the << and >> operators to the [[[[ command do not consider + the current locale when comparing strings; they use ASCII + ordering. Bash versions prior to bash-4.1 use ASCII col- + lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current + locale's collation sequence and _s_t_r_c_o_l_l(3). + + ccoommppaatt4411 + +o in _p_o_s_i_x mode, ttiimmee may be followed by options and still + be recognized as a reserved word (this is POSIX interpre- + tation 267) + +o in _p_o_s_i_x mode, the parser requires that an even number of + single quotes occur in the _w_o_r_d portion of a double- + quoted parameter expansion and treats them specially, so + that characters within the single quotes are considered + quoted (this is POSIX interpretation 221) + + ccoommppaatt4422 + +o the replacement string in double-quoted pattern substitu- + tion does not undergo quote removal, as it does in ver- + sions after bash-4.2 + +o in posix mode, single quotes are considered special when + expanding the _w_o_r_d portion of a double-quoted parameter + expansion and can be used to quote a closing brace or + other special character (this is part of POSIX interpre- + tation 221); in later versions, single quotes are not + special within double-quoted word expansions + + ccoommppaatt4433 + +o the shell does not print a warning message if an attempt + is made to use a quoted compound assignment as an argu- + ment to declare (e.g., declare -a foo='(1 2)'). Later + versions warn that this usage is deprecated + +o word expansion errors are considered non-fatal errors + that cause the current command to fail, even in posix + mode (the default behavior is to make them fatal errors + that cause the shell to exit) + +o when executing a shell function, the loop state + (while/until/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in + that function will break or continue loops in the calling + context. Bash-4.4 and later reset the loop state to pre- + vent this + + ccoommppaatt4444 + +o the shell sets up the values used by BBAASSHH__AARRGGVV and + BBAASSHH__AARRGGCC so they can expand to the shell's positional + parameters even if extended debugging mode is not enabled + +o a subshell inherits loops from its parent context, so + bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit. + Bash-5.0 and later reset the loop state to prevent the + exit + +o variable assignments preceding builtins like eexxppoorrtt and + rreeaaddoonnllyy that set attributes continue to affect variables + with the same name in the calling environment even if the + shell is not in posix mode + + ccoommppaatt5500 + +o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro- + duce slightly more randomness. If the shell compatibility + level is set to 50 or lower, it reverts to the method + from bash-5.0 and previous versions, so seeding the ran- + dom number generator by assigning a value to RRAANNDDOOMM will + produce the same sequence as in bash-5.0 + +o If the command hash table is empty, bash versions prior + to bash-5.1 printed an informational message to that ef- + fect, even when producing output that can be reused as + input. Bash-5.1 suppresses that message when the --ll op- + tion is supplied. + + ccoommppaatt5511 + +o The uunnsseett builtin treats attempts to unset array sub- + scripts @@ and ** differently depending on whether the ar- + ray is indexed or associative, and differently than in + previous versions. SSEEEE AALLSSOO bash(1), sh(1) -GNU Bash-4.0 2004 Apr 20 BASH_BUILTINS(1) +GNU Bash 5.2 2021 November 22 BASH_BUILTINS(1) diff --git a/doc/builtins.1 b/doc/builtins.1 index bf8bfec..43d92a2 100644 --- a/doc/builtins.1 +++ b/doc/builtins.1 @@ -1,13 +1,20 @@ .\" 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" +.\" +.\" 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 +.. +.TH BASH_BUILTINS 1 "2021 November 22" "GNU Bash 5.2" .SH NAME -bash, :, ., [, alias, bg, bind, break, builtin, caller, -cd, command, compgen, complete, -compopt, continue, declare, dirs, disown, echo, enable, eval, exec, exit, +:, ., [, 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, +readarray, 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 diff --git a/doc/builtins.ps b/doc/builtins.ps index 539dfb0..1becc2a 100644 Binary files a/doc/builtins.ps and b/doc/builtins.ps differ diff --git a/doc/infopost.sh b/doc/infopost.sh deleted file mode 100755 index 85c49b4..0000000 --- a/doc/infopost.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /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 index eb06220..96845d0 100644 --- a/doc/rbash.0 +++ b/doc/rbash.0 @@ -1,4 +1,4 @@ -RBASH(1) RBASH(1) +RBASH(1) General Commands Manual RBASH(1) @@ -14,20 +14,24 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL +o changing directories with ccdd - +o setting or unsetting the values of SSHHEELLLL, PPAATTHH, EENNVV, or BBAASSHH__EENNVV + +o setting or unsetting the values of SSHHEELLLL, PPAATTHH, HHIISSTTFFIILLEE, EENNVV, + or BBAASSHH__EENNVV +o specifying command names containing // - +o specifying a file name containing a // as an argument to the .. + +o specifying a filename containing a // as an argument to the .. builtin command - +o Specifying a filename containing a slash as an argument to the + +o specifying a filename containing a slash as an argument to the + hhiissttoorryy 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 + +o importing function definitions from the shell environment at startup - +o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at + +o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at startup +o redirecting output using the >, >|, <>, >&, &>, and >> redirect- @@ -36,24 +40,25 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL +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 + +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 + +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. + +o turning off restricted mode with sseett ++rr or sshhoopptt --uu rree-- + ssttrriicctteedd__sshheellll. 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. + 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) +Bash-5.2 2021 November 22 RBASH(1) diff --git a/doc/rbash.1 b/doc/rbash.1 index 56e38fd..39309b4 100644 --- a/doc/rbash.1 +++ b/doc/rbash.1 @@ -1,4 +1,4 @@ -.TH RBASH 1 "2004 Apr 20" "GNU Bash-4.0" +.TH RBASH 1 "2021 November 22" "Bash-5.2" .SH NAME rbash \- restricted bash, see \fBbash\fR(1) .SH RESTRICTED SHELL diff --git a/doc/rbash.ps b/doc/rbash.ps index 518087d..06fe883 100644 Binary files a/doc/rbash.ps and b/doc/rbash.ps differ diff --git a/doc/texinfo.tex b/doc/texinfo.tex index 03c2998..d494cce 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -1,13 +1,14 @@ % 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} +\def\texinfoversion{2015-11-22.14} % % 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. +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 +% 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 @@ -24,13 +25,14 @@ % % 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.) +% restriction. This Exception is an additional permission under section 7 +% of the GNU General Public License, version 3 ("GPLv3"). % % 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). +% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % @@ -65,7 +67,6 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} - \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -93,14 +94,15 @@ \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ +\let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ +\let\ptexsp=\sp \let\ptexstar=\* +\let\ptexsup=\sup \let\ptext=\t \let\ptextop=\top -{\catcode`\'=\active -\global\let\ptexquoteright'}% Math-mode def from plain.tex. -\let\ptexraggedright=\raggedright +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. @@ -118,10 +120,11 @@ % 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\putworderror\undefined \gdef\putworderror{error}\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\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 @@ -160,15 +163,18 @@ \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. +\chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! +\chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; +\chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. @@ -190,46 +196,6 @@ 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 @@ -246,7 +212,7 @@ \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen - \ifx\eTeXversion\undefined\else % etex gives us more logging + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 @@ -257,6 +223,13 @@ \errorcontextlines16 }% +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + % 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. % @@ -267,7 +240,15 @@ \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} -% For @cropmarks command. +% Output routine +% + +% 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 } + % Do @cropmarks to get crop marks. % \newif\ifcropmarks @@ -294,6 +275,7 @@ % 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}% @@ -301,11 +283,14 @@ \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% - \the\toks0 \the\toks2 - \noexpand\or \the\toks4 \the\toks6 - \noexpand\else \the\toks8 + \the\toks0 \the\toks2 % 0: top marks (\last...) + \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) + \noexpand\else \the\toks8 % 2: color marks }% } + +% \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark. +% % \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., @@ -321,33 +306,75 @@ % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} +\def\lastsection{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} +% Margin to add to right of even pages, to left of odd pages. +\newdimen\bindingoffset +\newdimen\normaloffset +\newdimen\pagewidth \newdimen\pageheight + % 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. +% \onepageout takes a vbox as an argument. +% \shipout a vbox for a single page, adding an optional header, footer, +% cropmarks, and footnote. This also causes index entries for this page +% to be written to the auxiliary files. +% \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % + % Common context changes for both heading and footing. % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). + \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} + % + % Retrieve the information for the headings from the marks in the page, + % and call Plain TeX's \makeheadline and \makefootline, which use the + % values in \headline and \footline. + % + % This is used to check if we are on the first page of a chapter. + \ifcase0\topmark\fi + \ifx\thischapter\empty + % See comment for \gettopheadingmarks + \ifcase0\firstmark\fi + \let\curchaptername\thischaptername + \ifcase1\firstmark\fi + \let\prevchaptername\thischaptername + \else + \let\curchaptername\thischaptername + \ifcase1\topmark\fi + \let\prevchaptername\thischaptername + \fi + % \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}% + % + \ifx\curchaptername\prevchaptername + \let\thischapterheading\thischapter + \else + % \thischapterheading is the same as \thischapter except it is blank + % for the first page of a chapter. This is to prevent the chapter name + % being shown twice. + \def\thischapterheading{}% + \fi + % + \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% + \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% % {% + % Set context for writing to auxiliary files like index files. % 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. @@ -356,10 +383,10 @@ \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}} + % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; - % it needs to be - % {\code {{\tt \backslashcurfont }acronym} + % it needs to be + % {\code {{\backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi @@ -417,6 +444,7 @@ \newinsert\margin \dimen\margin=\maxdimen +% Main part of page, including any footnotes \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi @@ -439,9 +467,13 @@ \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + +% Argument parsing + % 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. +% For example, \def\foo{\parsearg\fooxxx}. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% @@ -460,9 +492,11 @@ }% } -% First remove any @comment, then any @c comment. +% First remove any @comment, then any @c comment. Also remove a @texinfoc +% comment (see \scanmacro for details). Pass the result on to \argcheckspaces. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} -\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm} +\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % @@ -497,14 +531,13 @@ % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + +% \parseargdef - define a command taking an argument on the line +% % \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% } @@ -577,7 +610,7 @@ } \def\inenvironment#1{% \ifx#1\empty - out of any environment% + outside of any environment% \else in environment \expandafter\string#1% \fi @@ -589,7 +622,7 @@ \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else - % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup @@ -599,85 +632,6 @@ \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 @@ -694,7 +648,7 @@ \def\:{\spacefactor=1000 } % @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak @@ -709,7 +663,7 @@ \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. -% +% \def\onword{on} \def\offword{off} % @@ -719,7 +673,7 @@ \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple - \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } @@ -773,6 +727,12 @@ \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. + \addgroupbox + \prevdepth = \dimen1 + \checkinserts +} + +\def\addgroupbox{ % \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). @@ -785,9 +745,8 @@ \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 ...'. @@ -801,15 +760,6 @@ \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. @@ -873,7 +823,7 @@ % @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'. +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} @@ -920,6 +870,36 @@ \temp } +% @| 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). This command +% is not documented, not supported, and doesn't work. +% +\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 + }% + }% +} + % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} @@ -930,6 +910,7 @@ \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. + \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes @@ -965,7 +946,7 @@ \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} - +% \def\thisfile{} % @center line @@ -973,37 +954,55 @@ % \parseargdef\center{% \ifhmode - \let\next\centerH + \let\centersub\centerH \else - \let\next\centerV + \let\centersub\centerV \fi - \next{\hfil \ignorespaces#1\unskip \hfil}% + \centersub{\hfil \ignorespaces#1\unskip \hfil}% + \let\centersub\relax % don't let the definition persist, just in case } -\def\centerH#1{% - {% - \hfil\break - \advance\hsize by -\leftskip - \advance\hsize by -\rightskip - \line{#1}% - \break - }% +\def\centerH#1{{% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break +}} +% +\newcount\centerpenalty +\def\centerV#1{% + % The idea here is the same as in \startdefun, \cartouche, etc.: if + % @center is the first thing after a section heading, we need to wipe + % out the negative parskip inserted by \sectionheading, but still + % prevent a page break here. + \centerpenalty = \lastpenalty + \ifnum\centerpenalty>10000 \vskip\parskip \fi + \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi + \line{\kern\leftskip #1\kern\rightskip}% } -\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=\active% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}% -\def\comment{\begingroup \catcode`\^^M=\other% -\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% -\commentxxx} -{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} +{\catcode`\^^M=\active% +\gdef\commentxxx#1^^M{\endgroup% +\futurelet\nexttoken\commentxxxx}% +\gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}% +} -\let\c=\comment +\def\c{\begingroup \catcode`\^^M=\active% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\cxxx} +{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}} +% See comment in \scanmacro about why the definitions of @c and @comment differ % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. @@ -1074,172 +1073,23 @@ % 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}% - } + \gdef\indent {\restorefirstparagraphindent \indent}% + \gdef\noindent{\restorefirstparagraphindent \noindent}% + \global\everypar = {\kern -\parindent \restorefirstparagraphindent}% } -% 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 +\gdef\restorefirstparagraphindent{% + \global\let\indent = \ptexindent + \global\let\noindent = \ptexnoindent + \global\everypar = {}% } -% @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}% -} +% @setfilename INFO-FILENAME - ignored +\let\setfilename=\comment % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} @@ -1257,14 +1107,14 @@ \newtoks\toksC \newtoks\toksD \newbox\boxA +\newbox\boxB \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 +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else @@ -1279,50 +1129,24 @@ % 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}% +% See 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. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\thisisundefined + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images @@ -1332,13 +1156,18 @@ \ifpdf % - % Color manipulation macros based on pdfcolor.tex. - \def\cmykDarkRed{0.28 1 1 0.35} - \def\cmykBlack{0 0 0 1} + % Color manipulation macros using ideas from pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. The dark red here is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. We use + % black by default, though. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} % % 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}} + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. @@ -1348,7 +1177,7 @@ \pdfsetcolor{#1}% } % - \def\maincolor{\cmykBlack} + \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} @@ -1378,32 +1207,34 @@ % % #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}% + \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % - % pdftex (and the PDF format) support .png, .jpg, .pdf (among - % others). Let's try in that order. + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. \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 + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% - \else \gdef\pdfimgext{PDF}% + \else \gdef\pdfimgext{JPG}% \fi - \else \gdef\pdfimgext{pdf}% + \else \gdef\pdfimgext{jpeg}% \fi - \else \gdef\pdfimgext{JPG}% + \else \gdef\pdfimgext{jpg}% \fi - \else \gdef\pdfimgext{jpeg}% + \else \gdef\pdfimgext{png}% \fi - \else \gdef\pdfimgext{jpg}% + \else \gdef\pdfimgext{PDF}% \fi - \else \gdef\pdfimgext{png}% + \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup @@ -1415,8 +1246,8 @@ \else \immediate\pdfximage \fi - \ifdim \wd0 >0pt width \imagewidth \fi - \ifdim \wd2 >0pt height \imageheight \fi + \ifdim \wd0 >0pt width \pdfimagewidth \fi + \ifdim \wd2 >0pt height \pdfimageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else @@ -1431,20 +1262,18 @@ % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive - \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% - \backslashparens\pdfdestname + \txiescapepdf\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} + % by default, use black for everything. + \def\urlcolor{\rgbBlack} + \def\linkcolor{\rgbBlack} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines @@ -1466,29 +1295,24 @@ % 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}% + \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else - % Doubled backslashes in the name. - {\activebackslashdouble \xdef\pdfoutlinedest{#3}% - \backslashparens\pdfoutlinedest}% + \txiescapepdf\pdfoutlinedest \fi % - % Also double the backslashes in the display string. - {\activebackslashdouble \xdef\pdfoutlinetext{#1}% - \backslashparens\pdfoutlinetext}% + % Also escape PDF chars in the display string. + \edef\pdfoutlinetext{#1}% + \txiescapepdf\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\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% @@ -1542,25 +1366,41 @@ % 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. + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % \indexnofonts \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] % \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 + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 \fi \nextsp} - \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else @@ -1573,7 +1413,7 @@ % 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 @@ -1657,9 +1497,6 @@ \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. @@ -1671,6 +1508,7 @@ % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % +\newdimen\textleading \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 @@ -1692,7 +1530,7 @@ % 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 +\ifpdf \ifx\pdffontattr\thisisundefined \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 @@ -1943,28 +1781,34 @@ \fi\fi -% Set the font macro #1 to the font named #2, adding on the -% specified font prefix (normally `cm'). +% Set the font macro #1 to the font named \fontprefix#2. % #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). +% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). +% Example: +% #1 = \textrm +% #2 = \rmshape +% #3 = 10 +% #4 = \mainmagstep +% #5 = OT1 +% \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 +% +% (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 +\ifx\fontprefix\thisisundefined \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\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} @@ -1979,9 +1823,8 @@ \def\scshape{csc} \def\scbshape{csc} -% Definitions for a main text size of 11pt. This is the default in -% Texinfo. -% +% Definitions for a main text size of 11pt. (The default in Texinfo.) +% \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} @@ -2001,8 +1844,10 @@ % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defsl\slshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} -\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf +\let\tenttsl=\defttsl \let\tensl=\defsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} @@ -2063,6 +1908,7 @@ % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} @@ -2102,17 +1948,17 @@ \font\reducedsy=cmsy10 \def\reducedecsize{1000} -% reset the current fonts -\textfonts +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts \rm -} % end of 11pt text font size definitions +} % end of 11pt text font size definitions, \definetextfontsizexi % 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} @@ -2132,8 +1978,10 @@ % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defsl\slshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} -\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf +\let\tensl=\defsl \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} @@ -2201,7 +2049,7 @@ \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} -\font\seci=cmmi12 +\font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} @@ -2233,29 +2081,28 @@ \font\reducedsy=cmsy9 \def\reducedecsize{0900} -% reduce space between paragraphs -\divide\parskip by 2 - -% reset the current fonts -\textfonts +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts \rm -} % end of 10pt text font size definitions +} % end of 10pt text font size definitions, \definetextfontsizex % 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} +\def\xword{10} +\def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% - \wlog{doing @fonttextsize \textsizearg}% + %\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 @@ -2266,12 +2113,9 @@ \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). +% we have to define the \textfont of the standard families. We don't +% bother to reset \scriptfont and \scriptscriptfont; awaiting user need. % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy @@ -2285,8 +2129,8 @@ % \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. +% and \lllsize (three sizes lower). These relative commands are used +% in, e.g., the LaTeX logo and acronyms. % % This all needs generalizing, badly. % @@ -2305,7 +2149,7 @@ \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} + \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl @@ -2322,7 +2166,7 @@ \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% - \resetmathfonts \setleading{16pt}} + \resetmathfonts \setleading{17pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc @@ -2433,12 +2277,14 @@ % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% - \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname + \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 + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } @@ -2451,29 +2297,32 @@ \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\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \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. -% +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead 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 @@ -2485,7 +2334,7 @@ % 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 @@ -2496,33 +2345,85 @@ \else \char'22 \fi } +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\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 +% Font commands. -% \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} +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} + +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ifx\next\.% + \else\ifx\next\comma% + \else\ptexslash + \fi\fi\fi\fi\fi + \aftersmartic +} -% like \smartslanted except unconditionally uses \ttsl. -% @var is set to this for defun arguments. -\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. +\def\ttslanted#1{{\ttsl #1}} % @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} +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} \let\i=\smartitalic \let\slanted=\smartslanted -\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic @@ -2572,34 +2473,12 @@ % @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} +% @indicateurl is \samp, that is, with quotes. +\let\indicateurl=\samp -% @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. +% @code (and similar) prints in typewriter, but with spaces the same +% size as normal in the surrounding text, without hyphenation, etc. +% This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. @@ -2618,18 +2497,18 @@ \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. +% (But see \codedashfinish below.) % 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. +% and arrange explicitly to hyphenate at a dash. -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active @@ -2643,15 +2522,38 @@ \let-\codedash \let_\codeunder \else - \let-\realdash + \let-\normaldash \let_\realunder \fi + % Given -foo (with a single dash), we do not want to allow a break + % after the hyphen. + \global\let\codedashprev=\codedash + % \codex } + % + \gdef\codedash{\futurelet\next\codedashfinish} + \gdef\codedashfinish{% + \normaldash % always output the dash character itself. + % + % Now, output a discretionary to allow a line break, unless + % (a) the next character is a -, or + % (b) the preceding character is a -. + % E.g., given --posix, we do not want to allow a break after either -. + % Given --foo-bar, we do want to allow a break between the - and the b. + \ifx\next\codedash \else + \ifx\codedashprev\codedash + \else \discretionary{}{}{}\fi + \fi + % we need the space after the = for the case when \next itself is a + % space token; it would get swallowed otherwise. As in @code{- a}. + \global\let\codedashprev= \next + } } +\def\normaldash{-} +% +\def\codex #1{\tclose{#1}\endgroup} -\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.) @@ -2663,13 +2565,12 @@ \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. -% +% each of the four underscores in __typeof__. This is bad. +% @allowcodebreaks provides a document-level way to turn breaking at - +% and _ on and off. +% \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} @@ -2683,13 +2584,155 @@ \allowcodebreaksfalse \else \errhelp = \EMsimple - \errmessage{Unknown @allowcodebreaks option `\txiarg'}% + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \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}} +% For @command, @env, @file, @option quotes seem unnecessary, +% so use \code rather than \samp. +\let\command=\code +\let\env=\code +\let\file=\code +\let\option=\code + +% @uref (abbreviation for `urlref') aka @url 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. + +% TeX-only option to allow changing PDF output to show only the second +% arg (if given), and not the url (which is then just the link target). +\newif\ifurefurlonlylink + +% The main macro is \urefbreak, which allows breaking at expected +% places within the url. (There used to be another version, which +% didn't support automatic breaking.) +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +% +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% look for second arg + \ifdim\wd0 > 0pt + \ifpdf + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi + \else + \unhbox0\ (\urefcode{#1})% DVI, always show arg and url + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode\ampChar=\active \catcode\dotChar=\active + \catcode\hashChar=\active \catcode\questChar=\active + \catcode\slashChar=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretchamount{.13em} +\def\urefpoststretchamount{.1em} +\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} +\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + +% @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 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), @@ -2704,7 +2747,7 @@ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple - \errmessage{Unknown @kbdinputstyle option `\txiarg'}% + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} @@ -2714,87 +2757,53 @@ % 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 +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} -% @clicksequence{File @click{} Open ...} -\def\clicksequence#1{\begingroup #1\endgroup} +\def\xkey{\key} +\def\kbdsub#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 +} -% @clickstyle @arrow (by default) -\parseargdef\clickstyle{\def\click{#1}} -\def\click{\arrow} +% 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}}}} -% @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. +% 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\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} +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} -% @url synonym for @uref, since that's how everyone uses it. -% -\let\url=\uref +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} -% 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 +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} % 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}% @@ -2802,11 +2811,12 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } % @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}% @@ -2814,10 +2824,264 @@ \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 +} + +% @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 math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% 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 + % have to provide another name for sup operator + \let\mathopsup=\sup + $\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 + } +} + +% for @sub and @sup, if in math mode, just do a normal sub/superscript. +% If in text, use math to place as sub/superscript, but switch +% into text mode, with smaller fonts. This is a different font than the +% one used for real math sub/superscripts (8pt vs. 7pt), but let's not +% fix it (significant additions to font machinery) until someone notices. +% +\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi} +\def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}% +% +\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi} +\def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}% + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% +% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if +% FMTNAME is tex, else ELSE-TEXT. +\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} +\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi +} +% +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + +% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set. +% +\long\def\inlineifset#1{\doinlineifset #1,\finish} +\long\def\doinlineifset#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax + \else\ignorespaces#2\fi +} + +% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set. +% +\long\def\inlineifclear#1{\doinlineifclear #1,\finish} +\long\def\doinlineifclear#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi } \message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +% Unless we're in typewriter, use \ecfont because the CM text fonts do +% not have braces, and we don't want to switch into math. +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\let\{=\mylbrace \let\lbracechar=\{ +\let\}=\myrbrace \let\rbracechar=\} +\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\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\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{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX +} + +% Some math mode symbols. Define \ensuremath to switch into math mode +% unless we are already there. Expansion tricks may not be needed here, +% but safer, and can't hurt. +\def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi} +\def\ensuredmath#1{$\relax#1$} +% +\def\bullet{\ensuremath\ptexbullet} +\def\geq{\ensuremath\ge} +\def\leq{\ensuremath\le} +\def\minus{\ensuremath-} + +% @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 +} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % @@ -2839,7 +3103,7 @@ {\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} +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. @@ -2863,52 +3127,59 @@ % 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 + \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize - \else + \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. +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} @@ -2922,7 +3193,7 @@ % 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. @@ -2945,19 +3216,32 @@ \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % -\def\ecfont{% +% Use the European Computer Modern fonts (cm-super in outline format) +% for non-CM glyphs. That is ec* for regular text and tc* for the text +% companion symbols (LaTeX TS1 encoding). Both are part of the ec +% package and follow the same conventions. +% +\def\ecfont{\etcfont{e}} +\def\tcfont{\etcfont{t}} +% +\def\etcfont#1{% % 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 + \ifmonospace + % typewriter: + \font\thisecfont = #1ctt\ecsize \space at \nominalsize \else - % regular: - \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi \fi \thisecfont } @@ -2979,8 +3263,8 @@ % 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 +% +\ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi @@ -3008,8 +3292,9 @@ \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} +\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. @@ -3069,14 +3354,28 @@ \finishedtitlepagetrue } -%%% Macros to be used within @titlepage: +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. Because +% it is always used for titles, nothing else, we call \rmisbold. \par +% should be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rmisbold + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + +% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage - \leftline{\titlefonts\rmisbold #1} + \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -3102,7 +3401,7 @@ } -%%% Set up page headings and footings. +% Set up page headings and footings. \let\thispage=\folio @@ -3111,7 +3410,7 @@ \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages -% Now make TeX use those variables +% Now make \makeheadline and \makefootline in Plain TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline @@ -3167,6 +3466,10 @@ % @everyheadingmarks % @everyfootingmarks +% These define \getoddheadingmarks, \getevenheadingmarks, +% \getoddfootingmarks, and \getevenfootingmarks, each to one of +% \gettopheadingmarks, \getbottomheadingmarks. +% \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} @@ -3196,10 +3499,14 @@ \def\headings #1 {\csname HEADINGS#1\endcsname} -\def\HEADINGSoff{% -\global\evenheadline={\hfil} \global\evenfootline={\hfil} -\global\oddheadline={\hfil} \global\oddfootline={\hfil}} -\HEADINGSoff +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + % 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 @@ -3210,7 +3517,7 @@ \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager @@ -3221,8 +3528,8 @@ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\evenheadline={\line{\thischapterheading\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} @@ -3233,7 +3540,7 @@ \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } @@ -3241,8 +3548,8 @@ \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\evenheadline={\line{\thischapterheading\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chappager } @@ -3250,7 +3557,7 @@ % 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 +\ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month @@ -3311,7 +3618,7 @@ \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent - \advance\rightskip by0pt plus1fil + \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % @@ -3325,7 +3632,7 @@ % 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 @@ -3420,7 +3727,7 @@ \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % - % Try typesetting the item mark that if the document erroneously says + % Try typesetting the item mark so 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 @@ -3452,7 +3759,12 @@ \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % - \vadjust{\penalty 1200}}% not good to break after first line of item. + \ifinner\else + \vadjust{\penalty 1200}% not good to break after first line of item. + \fi + % We can be in inner vertical mode in a footnote, although an + % @itemize looks awful there. + }% \flushcr } @@ -3670,19 +3982,23 @@ } % 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 +% +% @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 below 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 + \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % +% default for tables with no headings. +\let\headitemcrhook=\relax +% % 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. @@ -3713,15 +4029,15 @@ % \everycr = {% \noalign{% - \global\everytab={}% + \global\everytab={}% Reset from possible headitem. \global\colcount=0 % Reset the column counter. - % Check for saved footnotes, etc. + % + % 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. + % + % Perhaps a \nobreak, then reset: + \headitemcrhook + \global\let\headitemcrhook=\relax }% }% % @@ -3797,18 +4113,18 @@ \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. +% 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. +\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. +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. \fi} @@ -3960,7 +4276,7 @@ \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { - \catcode`\- = \active \catcode`\_ = \active + \catcode`\-=\active \catcode`\_=\active % \gdef\makevalueexpandable{% \let\value = \expandablevalue @@ -3969,7 +4285,7 @@ % ..., 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 + \let-\normaldash \let_\normalunderscore } } @@ -3980,7 +4296,12 @@ % 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). -% +% +% Unfortunately, this has the consequence that when _ is in the *value* +% of an @set, it does not print properly in the roman fonts (get the cmr +% dot accent at position 126 instead). No fix comes to mind, and it's +% been this way since 2003 or earlier, so just ignore it. +% \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% @@ -3992,8 +4313,9 @@ % @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. +% +% To get the special treatment we need for `@end ifset,' we call +% \makecond and then redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} @@ -4009,7 +4331,7 @@ } \def\ifsetfail{\doignore{ifset}} -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% @ifclear VAR ... @end executes 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 @@ -4020,6 +4342,35 @@ \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} +% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written +% without the @) is in fact defined. We can only feasibly check at the +% TeX level, so something like `mathcode' is going to considered +% defined even though it is not a Texinfo command. +% +\makecond{ifcommanddefined} +\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} +% +\def\doifcmddefined#1#2{{% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname #2\endcsname\relax + #1% If not defined, \let\next as above. + \fi + \expandafter + }\next +} +\def\ifcmddefinedfail{\doignore{ifcommanddefined}} + +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. +\makecond{ifcommandnotdefined} +\def\ifcommandnotdefined{% + \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} +\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} + +% Set the `txicommandconditionals' variable, so documents have a way to +% test if the @ifcommand...defined conditionals are available. +\set txicommandconditionals + % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment @@ -4035,19 +4386,16 @@ % 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. +% \newindex {foo} defines an index named IX. +% It automatically defines \IXindex such that +% \IXindex ...rest of line... puts an entry in the index IX. +% It also defines \IXindfile to be the number of the output channel for +% the file that accumulates this index. The file's extension is IX. % 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\chardef\csname#1indfile\endcsname=0 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } @@ -4060,15 +4408,20 @@ % \def\defcodeindex{\parsearg\newcodeindex} % -\def\newcodeindex#1{% - \iflinks - \expandafter\newwrite \csname#1indfile\endcsname - \openout \csname#1indfile\endcsname \jobname.#1 - \fi +\def\newcodeindex#1{% + \expandafter\chardef\csname#1indfile\endcsname=0 \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } +% The default indices: +\newindex{cp}% concepts, +\newcodeindex{fn}% functions, +\newcodeindex{vr}% variables, +\newcodeindex{tp}% types, +\newcodeindex{ky}% keys +\newcodeindex{pg}% and programs. + % @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. @@ -4097,63 +4450,33 @@ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } -% Define \doindex, the driver for all \fooindex macros. +% Define \doindex, the driver for all index 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. +% and it the two-letter name of the index. -\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} -\def\singleindexer #1{\doind{\indexname}{#1}} +\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx} +\def\doindexxxx #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}}} +\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} +\def\docodeindexxxx #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. +% Used when writing an index entry out to an index file, to prevent +% expansion of Texinfo commands that can appear in an index entry. % \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 + % Need these unexpandable (because we define \tt as a dummy) + % definitions when @{ or @} appear in index entry text. Also, more + % complicated, when \tex is in effect and \{ is a \delimiter again. + % We can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. Perhaps we + % should use @lbracechar and @rbracechar? + \def\{{{\tt\char123}}% + \def\}{{\tt\char125}}% % % Do the redefinitions. \commondummies @@ -4178,9 +4501,8 @@ % 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, + % 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. @@ -4199,23 +4521,28 @@ \commondummiesnofonts % \definedummyletter\_% + \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE + \definedummyword\DH \definedummyword\L - \definedummyword\OE \definedummyword\O + \definedummyword\OE + \definedummyword\TH \definedummyword\aa \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown \definedummyword\l - \definedummyword\oe \definedummyword\o - \definedummyword\ss - \definedummyword\exclamdown - \definedummyword\questiondown + \definedummyword\oe \definedummyword\ordf \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf @@ -4231,20 +4558,26 @@ \definedummyword\TeX % % Assorted special characters. + \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots + \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright - \definedummyword\expansion + \definedummyword\lbracechar + \definedummyword\leq + \definedummyword\mathopsup \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds @@ -4256,7 +4589,10 @@ \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase + \definedummyword\rbracechar \definedummyword\result + \definedummyword\sub + \definedummyword\sup \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. @@ -4270,6 +4606,8 @@ } % \commondummiesnofonts: common to \commondummies and \indexnofonts. +% Define \definedumyletter, \definedummyaccent and \definedummyword before +% using. % \def\commondummiesnofonts{% % Control letters and accents. @@ -4301,18 +4639,27 @@ \definedummyword\b \definedummyword\i \definedummyword\r + \definedummyword\sansserif \definedummyword\sc + \definedummyword\slanted \definedummyword\t % % Commands that take arguments. + \definedummyword\abbr \definedummyword\acronym + \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn + \definedummyword\dmn + \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file + \definedummyword\image + \definedummyword\indicateurl + \definedummyword\inforef \definedummyword\kbd \definedummyword\key \definedummyword\math @@ -4322,6 +4669,7 @@ \definedummyword\samp \definedummyword\strong \definedummyword\tie + \definedummyword\U \definedummyword\uref \definedummyword\url \definedummyword\var @@ -4330,6 +4678,52 @@ \definedummyword\xref } +% For testing: output @{ and @} in index sort strings as \{ and \}. +\newif\ifusebracesinindexes + +\let\indexlbrace\relax +\let\indexrbrace\relax + +{\catcode`\@=0 +\catcode`\\=13 + @gdef@backslashdisappear{@def\{}} +} + +{ +\catcode`\<=13 +\catcode`\-=13 +\catcode`\`=13 + \gdef\indexnonalnumdisappear{% + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else + % @set txiindexlquoteignore makes us ignore left quotes in the sort term. + % (Introduced for FSFS 2nd ed.) + \let`=\empty + \fi + % + \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else + \backslashdisappear + \fi + % + \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else + \def-{}% + \fi + \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else + \def<{}% + \fi + \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else + \def\@{}% + \fi + } + + \gdef\indexnonalnumreappear{% + \useindexbackslash + \let-\normaldash + \let<\normalless + \def\@{@}% + } +} + + % \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 @@ -4340,9 +4734,8 @@ \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. + % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent - % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command @@ -4352,48 +4745,60 @@ % \def\ { }% \def\@{@}% - % how to handle braces? \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + \def\lbracechar{{\indexlbrace}}% + \def\rbracechar{{\indexrbrace}}% + \let\{=\lbracechar + \let\}=\rbracechar + % % % Non-English letters. \def\AA{AA}% \def\AE{AE}% + \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% + \def\TH{TH}% \def\aa{aa}% \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% - \def\o{o}% - \def\ss{ss}% - \def\exclamdown{!}% - \def\questiondown{?}% \def\ordf{a}% \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{th}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% - \def\registeredsymbol{R}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% + \def\expansion{==>}% + \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% - \def\expansion{==>}% + \def\leq{<=}% \def\minus{-}% - \def\pounds{pounds}% \def\point{.}% + \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% @@ -4401,30 +4806,35 @@ \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% + \def\registeredsymbol{R}% \def\result{=>}% - \def\textdegree{degrees}% + \def\textdegree{o}% % % 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. +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. +% TODO: Two-level index? Operation index? + +% Workhorse for all indexes. % #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). @@ -4432,6 +4842,7 @@ \def\dosubind#1#2#3{% \iflinks {% + \requireopenindexfile{#1}% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. @@ -4447,7 +4858,49 @@ \fi } -% Write the entry in \toks0 to the index file: +% Check if an index file has been opened, and if not, open it. +\def\requireopenindexfile#1{% +\ifnum\csname #1indfile\endcsname=0 + \expandafter\newwrite \csname#1indfile\endcsname + \edef\suffix{#1}% + % A .fls suffix would conflict with the file extension for the output + % of -recorder, so use .f1s instead. + \ifx\suffix\indexisfl\def\suffix{f1}\fi + % Open the file + \immediate\openout\csname#1indfile\endcsname \jobname.\suffix + % Using \immediate here prevents an object entering into the current box, + % which could confound checks such as those in \safewhatsit for preceding + % skips. +\fi} +\def\indexisfl{fl} + +% Output \ as {\indexbackslash}, because \ is an escape character in +% the index files. +\let\indexbackslash=\relax +{\catcode`\@=0 \catcode`\\=\active + @gdef@useindexbackslash{@def\{{@indexbackslash}}} +} + +% Definition for writing index entry text. +\def\sortas#1{\ignorespaces}% + +% Definition for writing index entry sort key. Should occur at the at +% the beginning of the index entry, like +% @cindex @sortas{september} \september +% The \ignorespaces takes care of following space, but there's no way +% to remove space before it. +{ +\catcode`\-=13 +\gdef\indexwritesortas{% + \begingroup + \indexnonalnumreappear + \indexwritesortasxxx} +\gdef\indexwritesortasxxx#1{% + \xdef\indexsortkey{#1}\endgroup} +} + + +% Write the entry in \toks0 to the index file. % \def\dosubindwrite{% % Put the index entry in the margin if desired. @@ -4457,14 +4910,20 @@ % % 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. + \useindexbackslash % \indexbackslash isn't defined now so it will be output + % as is; and it will print as backslash. + % Get the string to sort by, by processing the index entry with all + % font commands turned off. {\indexnofonts - \edef\temp{\the\toks0}% need full expansion - \xdef\indexsorttmp{\temp}% + \indexnonalnumdisappear + \xdef\indexsortkey{}% + \let\sortas=\indexwritesortas + \edef\temp{\the\toks0}% + \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas + \ifx\indexsortkey\empty + \xdef\indexsortkey{\temp}% + \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi + \fi }% % % Set up the complete index entry, with both the sort key and @@ -4474,10 +4933,11 @@ % sorted result. \edef\temp{% \write\writeto{% - \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% + \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% }% \temp } +\newbox\dummybox % used above % Take care of unwanted page breaks/skips around a whatsit: % @@ -4514,10 +4974,9 @@ % % ..., ready, GO: % -\def\safewhatsit#1{% -\ifhmode +\def\safewhatsit#1{\ifhmode #1% -\else + \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% @@ -4541,7 +5000,6 @@ % 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. @@ -4554,8 +5012,7 @@ % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi -\fi -} +\fi} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} @@ -4606,7 +5063,9 @@ % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 - \openin 1 \jobname.#1s + % See comment in \requireopenindexfile. + \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi + \openin 1 \jobname.\indexname s \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 @@ -4614,43 +5073,96 @@ % there is some text. \putwordIndexNonexistent \else + \catcode`\\ = 0 + \escapechar = `\\ % % 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 + \read 1 to \thisline \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 = `\\ + \def\indexbackslash{\ttbackslash}% + \let\indexlbrace\{ % Likewise, set these sequences for braces + \let\indexrbrace\} % used in the sort key. \begindoublecolumns - \input \jobname.#1s + \let\entryorphanpenalty=\indexorphanpenalty + % + % Read input from the index file line by line. + \loopdo + \ifeof1 + \let\firsttoken\relax + \else + \read 1 to \nextline + \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% + \act + \fi + \thisline + % + \ifeof1\else + \let\thisline\nextline + \repeat + %% \enddoublecolumns \fi \fi \closein 1 \endgroup} +\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} +\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} + +\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} +\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} + % 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 - % +{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13 +\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 +\catcode`\$=3 +\gdef\initialglyphs{% + % Some changes for non-alphabetic characters. Using the glyphs from the + % math fonts looks more consistent than the typewriter font used elsewhere + % for these characters. + \def\indexbackslash{\math{\backslash}}% + \let\\=\indexbackslash + % + % Can't get bold backslash so don't use bold forward slash + \catcode`\/=13 + \def/{{\secrmnotbold \normalslash}}% + \def-{{\normaldash\normaldash}}% en dash `--' + \def^{{\chapbf \normalcaret}}% + \def~{{\chapbf \normaltilde}}% + \def\_{% + \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% + \def|{$\vert$}% + \def<{$\less$}% + \def>{$\gtr$}% + \def+{$\normalplus$}% +}} + +\def\initial{% + \bgroup + \initialglyphs + \initialx +} + +\def\initialx#1{% % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. + % The glue before the bonus allows a little bit of space at the + % bottom of a column to reduce an increase in inter-line spacing. \nobreak - \vskip 0pt plus 3\baselineskip - \penalty 0 - \vskip 0pt plus -3\baselineskip + \vskip 0pt plus 5\baselineskip + \penalty -300 + \vskip 0pt plus -5\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column @@ -4658,25 +5170,24 @@ % 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}% + \vskip 1.67\baselineskip plus 1\baselineskip + \leftline{\secfonts \kern-0.05em \secbf #1}% + % \secfonts is inside the argument of \leftline so that the change of + % \baselineskip will not affect any glue inserted before the vbox that + % \leftline creates. % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip -}} + \egroup % \initialglyphs +} + +\newdimen\entryrightmargin +\entryrightmargin=0pt % \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 % @@ -4684,77 +5195,167 @@ % 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 + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% An undocumented command % % A bit of stretch before each entry for the benefit of balancing % columns. - \vskip 0pt plus1pt + \vskip 0pt plus0.5pt % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } +\def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% + % Save the text of the entry + \global\setbox\boxA=\hbox\bgroup \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. + % Not absorbing as a macro argument reduces the chance of problems + % with catcodes occurring. } -\def\finishentry#1{% +{\catcode`\@=11 +\gdef\finishentry#1{% + \egroup % end box A + \dimen@ = \wd\boxA % Length of text of entry + \global\setbox\boxA=\hbox\bgroup\unhbox\boxA % #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 - \ % + % Get the width of the page numbers, and only use + % leaders if they are present. + \global\setbox\boxB = \hbox{#1}% + \ifdim\wd\boxB = 0pt + \null\nobreak\hfill\ % \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 + \pdfgettoks#1.% + \hskip\skip\thinshrinkable\the\toksA \else - \ #1% + \hskip\skip\thinshrinkable #1% \fi \fi - \par + \egroup % end \boxA + \ifdim\wd\boxB = 0pt + \global\setbox\entryindexbox=\box\boxA + \else + \global\setbox\entryindexbox=\vbox\bgroup\noindent + % We want the text of the entries to be aligned to the left, and the + % page numbers to be aligned to the right. + % + \advance\leftskip by 0pt plus 1fil + \advance\leftskip by 0pt plus -1fill + \rightskip = 0pt plus -1fil + \advance\rightskip by 0pt plus 1fill + % Cause last line, which could consist of page numbers on their own + % if the list of page numbers is long, to be aligned to the right. + \parfillskip=0pt plus -1fill + % + \hangindent=1em + % + \advance\rightskip by \entryrightmargin + % Determine how far we can stretch into the margin. + % This allows, e.g., "Appendix H GNU Free Documentation License" to + % fit on one line in @letterpaper format. + \ifdim\entryrightmargin>2.1em + \dimen@i=2.1em + \else + \dimen@i=0em + \fi + \advance \parfillskip by 0pt minus 1\dimen@i + % + \dimen@ii = \hsize + \advance\dimen@ii by -1\leftskip + \advance\dimen@ii by -1\entryrightmargin + \advance\dimen@ii by 1\dimen@i + \let\maybestrut=\relax + \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line + \let\maybestrut=\strut + \ifdim\dimen@ > 0.8\dimen@ii % due to long index text + \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly + \dimen@ii = \hsize + \advance \dimen@ii by -1em + \ifnum\dimen@>\dimen@ii + % If the entry is too long, use the whole line + \dimen@ = \dimen@ii + \fi + \advance\leftskip by 0pt plus 1fill % ragged right + \advance \dimen@ by 1\rightskip + \parshape = 2 0pt \dimen@ 1em \dimen@ii + % Ideally we'd add a finite glue at the end of the first line only, but + % TeX doesn't seem to provide a way to do such a thing. + \fi\fi + \maybestrut % Add a strut on the first and last lines + \unhbox\boxA + \maybestrut + % + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % Word spacing - no stretch + \spaceskip=\fontdimen2\font minus \fontdimen4\font + % + \linepenalty=1000 % Discourage line breaks. + \hyphenpenalty=5000 % Discourage hyphenation. + % + \par % format the paragraph + \egroup % The \vbox + \fi \endgroup + % delay text of entry until after penalty + \bgroup\aftergroup\insertindexentrybox + \entryorphanpenalty +}} + +\newskip\thinshrinkable +\skip\thinshrinkable=.15em minus .15em + +\newbox\entryindexbox +\def\insertindexentrybox{% +\lineskip=0pt % This comes into effect when the \vbox has a large + % height due to the paragraph in it having several + % lines. +\box\entryindexbox} + +% Default is no penalty +\let\entryorphanpenalty\egroup + +% Used from \printindex. \firsttoken should be the first token +% after the \entry. If it's not another \entry, we are at the last +% line of a group of index entries, so insert a penalty to discourage +% orphaned index entries. +\long\def\indexorphanpenalty{% + \def\isentry{\entry}% + \ifx\firsttoken\isentry + \else + \unskip\penalty 9000 + % The \unskip here stops breaking before the glue. It relies on the + % \vskip above being there, otherwise there is an error + % "You can't use `\unskip' in vertical mode". There has to be glue + % in the current vertical list that hasn't been added to the + % "current page". See Chapter 24 of the TeXbook. This contradicts + % Section 8.3.7 in "TeX by Topic," though. + \fi + \egroup % now comes the box added with \aftergroup } % Like plain.tex's \dotfill, except uses up at least 1 em. +% The filll stretch here overpowers both the fil and fill stretch to push +% the page number to the right. \def\indexdotfill{\cleaders - \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll} + \def\primary #1{\line{#1\hfil}} @@ -4780,6 +5381,11 @@ \newbox\partialpage \newdimen\doublecolumnhsize +\newdimen\doublecolumntopgap +\doublecolumntopgap = 0pt + +\newtoks\savedtopmark % Used in \begindoublecolumns +\newtoks\savedfirstmark \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. @@ -4801,9 +5407,23 @@ \unvbox\PAGE \kern-\topskip \kern\baselineskip }% + % Save \topmark and \firstmark + \global\savedtopmark=\expandafter{\topmark}% + \global\savedfirstmark=\expandafter{\firstmark}% }% \eject % run that output routine to set \partialpage % + % We recover the two marks that the last output routine saved in order + % to propagate the information in marks added around a chapter heading, + % which could be otherwise be lost by the time the final page is output. + % + \mark{\the\savedtopmark}% Only mark in page passed to following \output. + \output = {% + \setbox0=\box\PAGE % clear box 255 + }abc\eject + % + \mark{\the\savedfirstmark}% + % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % @@ -4830,11 +5450,15 @@ % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) + \global\doublecolumntopgap = \topskip + \global\advance\doublecolumntopgap by -1\baselineskip + \global\advance\vsize by -1\doublecolumntopgap \vsize = 2\vsize + \topskip=0pt } % The double-column output routine for all double-column pages except -% the last. +% the last, which is done by \balancecolumns. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth @@ -4859,10 +5483,13 @@ % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize - \hbox to\pagewidth{\box0\hfil\box2}% + \vbox{% + \vskip\doublecolumntopgap + \hbox to\pagewidth{\box0\hfil\box2}}% } -% -% All done with double columns. + + +% Finished with 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 @@ -4916,28 +5543,47 @@ \pagegoal = \vsize } % -% Called at the end of the double column material. +% Only called for the last of the double column material. \doublecolumnout +% does the others. \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}% + \ifdim\dimen@<14\baselineskip + % Don't split a short final column in two. + \setbox2=\vbox{}% + \else + \divide\dimen@ by 2 % target to split to + \dimen@ii = \dimen@ + \splittopskip = \topskip + % Loop until the second column is no higher than the first + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + % Remove glue from bottom of first column to + % make sure it is higher than the second. + \global\setbox1 = \vbox{\unvbox1\unpenalty\unskip}% + \ifdim\ht3>\ht1 + \global\advance\dimen@ by 1pt + \repeat + }% + \multiply\dimen@ii by 4 + \divide\dimen@ii by 5 + \ifdim\ht3<\dimen@ii + % Column heights are too different, so don't make their bottoms + % flush with each other. The glue at the end of the second column + % allows a second column to stretch, reducing the difference in + % height between the two. + \setbox0=\vbox to\dimen@{\unvbox1\vfill}% + \setbox2=\vbox to\dimen@{\unvbox3\vskip 0pt plus 0.3\ht0}% + \else + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + \fi + \fi % \pagesofar } @@ -4947,7 +5593,26 @@ \message{sectioning,} % Chapters, sections, etc. -% \unnumberedno is an oxymoron, of course. But we count the unnumbered +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rmisbold #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + % This outputs a mark at the end of the page that clears \thischapter + % and \thissection, as is done in \startcontents. + \let\pchapsepmacro\relax + \chapmacro{}{Yomitfromtoc}{}% + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. 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 @@ -5026,8 +5691,8 @@ \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 +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. @@ -5052,8 +5717,8 @@ % The heading type: \def\headtype{#1}% \if \headtype U% - \ifnum \absseclevel < \unmlevel - \chardef\unmlevel = \absseclevel + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: @@ -5065,10 +5730,10 @@ \fi\fi \fi % Check for numbered within unnumbered: - \ifnum \absseclevel > \unmlevel + \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else - \chardef\unmlevel = 3 + \chardef\unnlevel = 3 \fi \fi % Now print the heading: @@ -5122,7 +5787,9 @@ \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % - \message{\putwordChapter\space \the\chapno}% + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% @@ -5133,15 +5800,17 @@ \global\let\subsubsection = \numberedsubsubsec } -\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz +\outer\parseargdef\appendix{\apphead0{#1}} % normally 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}% + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % @@ -5150,7 +5819,8 @@ \global\let\subsubsection = \appendixsubsubsec } -\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 @@ -5182,9 +5852,6 @@ % @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 @@ -5194,40 +5861,47 @@ \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 +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} \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 +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \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 +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} \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 +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} \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 +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% @@ -5235,21 +5909,25 @@ } % Subsubsections. -\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \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 +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \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 +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% @@ -5265,14 +5943,6 @@ % 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 @@ -5280,10 +5950,8 @@ \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 + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak \suppressfirstparagraphindent } @@ -5299,16 +5967,19 @@ % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. -%%% Args are the skip and penalty (usually negative) +% 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 +% Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} + +% Start a new page \def\chappager{\par\vfill\supereject} + +% \chapoddpage - start on an odd page for a new chapter % 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. @@ -5316,9 +5987,8 @@ \chappager \ifodd\pageno \else \begingroup - \evenheadline={\hfil}\evenfootline={\hfil}% - \oddheadline={\hfil}\oddfootline={\hfil}% - \hbox to 0pt{}% + \headingsoff + \null \chappager \endgroup \fi @@ -5345,17 +6015,20 @@ \CHAPPAGon -% Chapter opening. +% \chapmacro - Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. +% Not used for @heading series. % % To test against our argument. \def\Ynothingkeyword{Ynothing} -\def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} +\def\Yomitfromtockeyword{Yomitfromtoc} % \def\chapmacro#1#2#3{% + \checkenv{}% chapters, etc., should not start inside an environment. + % % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs @@ -5374,7 +6047,10 @@ \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% - \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: \noexpand\thischaptername}% }% \else @@ -5382,7 +6058,10 @@ \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% - \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi @@ -5402,6 +6081,7 @@ % {% \chapfonts \rmisbold + \let\footnote=\errfootnoteheading % give better error message % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called @@ -5438,8 +6118,7 @@ % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright - \hangindent=\wd0 \centerparametersmaybe + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title @@ -5461,18 +6140,18 @@ \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 + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip\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 + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% + \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen @@ -5496,20 +6175,29 @@ % 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. +% #1 is the text of the title, +% #2 is the section level (sec/subsec/subsubsec), +% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), +% #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}% % + % It is ok for the @heading series commands to appear inside an + % environment (it's been historically allowed, though the logic is + % dubious), but not the others. + \ifx\temptype\Yomitfromtockeyword\else + \checkenv{}% non-@*heading should not be in an environment. + \fi + \let\footnote=\errfootnoteheading + % + % Switch to the right set of fonts. + \csname #2fonts\endcsname \rmisbold + % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword @@ -5525,7 +6213,10 @@ \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% - \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi @@ -5535,7 +6226,10 @@ \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% - \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi @@ -5555,7 +6249,7 @@ % % Now the second mark, after the heading break. No break points % between here and the heading. - \let\prevsectiondefs=\lastsectiondefs + \global\let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. @@ -5609,15 +6303,15 @@ % % 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.) + % discardable item.) However, when a paragraph is not started next + % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out + % or the negative glue will cause weirdly wrong output, typically + % obscuring the section heading with something else. \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 + % + % This is so the last item on the main vertical list is a known + % \penalty > 10000, so \startdefun, etc., can recognize the situation + % and do the needful. \penalty 10001 } @@ -5673,7 +6367,7 @@ % 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 @@ -5715,7 +6409,7 @@ \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. + \entryrightmargin=\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi @@ -5723,7 +6417,7 @@ % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. -% +% \def\tocreadfilename{\jobname.toc} % Normal (long) toc. @@ -5749,6 +6443,7 @@ \def\summarycontents{% \startcontents{\putwordShortTOC}% % + \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry @@ -5804,9 +6499,22 @@ % The last argument is the page number. % The arguments in between are the chapter number, section number, ... +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + % 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{% @@ -5821,7 +6529,7 @@ \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % -\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} @@ -5854,6 +6562,8 @@ \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup + % Move the page numbers slightly to the right + \advance\entryrightmargin by -0.05em \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup @@ -5893,9 +6603,9 @@ \message{environments,} % @foo ... @end foo. -% @tex ... @end tex escapes into raw Tex temporarily. +% @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. +% But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% @@ -5908,10 +6618,15 @@ \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other - \catcode`\`=\other - \catcode`\'=\other + \catcode `\`=\other + \catcode `\'=\other \escapechar=`\\ % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % + % Inverse of the list at the beginning of the file. \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc @@ -5927,9 +6642,11 @@ \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash + \let\sp=\ptexsp \let\*=\ptexstar + %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode \let\t=\ptext - \expandafter \let\csname top\endcsname=\ptextop % outer + \expandafter \let\csname top\endcsname=\ptextop % we've made it outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% @@ -5959,6 +6676,24 @@ % 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 + \ifnum\lastpenalty<10000 + % Penalize breaking before the environment, because preceding text + % often leads into it. + \penalty100 + \fi + \vskip\envskipamount + \fi + \fi +}} + +\def\afterenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else @@ -5974,8 +6709,6 @@ \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 @@ -6013,9 +6746,13 @@ % 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 + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi + % + \setbox\groupbox=\vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup @@ -6028,7 +6765,7 @@ \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip - \comment % For explanation, see the end of \def\group. + \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi @@ -6039,6 +6776,7 @@ \egroup \cartbot \egroup + \addgroupbox \checkinserts } @@ -6048,7 +6786,7 @@ \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak - \hfuzz = 12pt % Don't be fussy + \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % 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 @@ -6114,41 +6852,42 @@ } % 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} +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#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} +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% } - -% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % -\maketwodispenvs {lisp}{example}{% +\maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. - \gobble % eat return + \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % -\makedispenv {display}{% +\makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % -\makedispenv{format}{% +\makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble @@ -6167,16 +6906,20 @@ \envdef\flushright{% \let\nonarrowing = t% \nonfillstart - \advance\leftskip by 0pt plus 1fill + \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right -% justification. From plain.tex. +% justification. From plain.tex. Don't stretch around special +% characters in urls in this environment, since the stretch at the right +% should be enough. \envdef\raggedright{% - \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax + \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax + \def\urefprestretchamount{0pt}% + \def\urefpoststretchamount{0pt}% } \let\Eraggedright\par @@ -6202,43 +6945,28 @@ % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % +\makedispenvdef{quotation}{\quotationstart} +% \def\quotationstart{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \parindent=0pt - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \indentedblockstart % same as \indentedblock, but increase right margin too. \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 + \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } +\def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% @@ -6248,6 +6976,32 @@ \fi } +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\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 + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, @@ -6295,21 +7049,28 @@ % Setup for the @verbatim environment % -% Real tab expansion +% Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % -\def\starttabbox{\setbox0=\hbox\bgroup} +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\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 + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup @@ -6318,15 +7079,16 @@ \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart - % Easiest (and conventionally used) font for verbatim - \tt - \def\par{\leavevmode\egroup\box0\endgraf}% + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and - % make each space count - % must do in this order: + % make each space count. + % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } @@ -6383,6 +7145,7 @@ \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% @@ -6396,7 +7159,7 @@ % 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. +% possible is desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} @@ -6432,7 +7195,7 @@ % 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 + % As a further 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. @@ -6469,7 +7232,7 @@ #1#2 \endheader % common ending: \interlinepenalty = 10000 - \advance\rightskip by 0pt plus 1fil + \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx @@ -6491,7 +7254,7 @@ \temp } -% \domakedefun \deffn \deffnx \deffnheader +% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) } % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. @@ -6499,13 +7262,36 @@ \def\domakedefun#1#2#3{% \envdef#1{% \startdefun + \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } -%%% Untyped functions: +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} @@ -6524,7 +7310,7 @@ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } -%%% Typed functions: +% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} @@ -6539,10 +7325,11 @@ % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Typed variables: +% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} @@ -6560,7 +7347,7 @@ \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Untyped variables: +% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } @@ -6571,7 +7358,8 @@ % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } -%%% Type: +% Types: + % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% @@ -6599,25 +7387,49 @@ % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% + \par % 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 + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category 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. + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % % 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 + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % % 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. + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize @@ -6639,8 +7451,16 @@ % . 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 + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm @@ -6660,7 +7480,10 @@ \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. + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 @@ -6758,7 +7581,7 @@ % 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 +\ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% @@ -6769,29 +7592,42 @@ } \fi +\let\aftermacroxxx\relax +\def\aftermacro{\aftermacroxxx} + +% alias because \c means cedilla in @tex or @math +\let\texinfoc=\c + +% Used at the time of macro expansion. +% Argument is macro body with arguments substituted \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 + \newlinechar`\^^M + \def\xprocessmacroarg{\eatspaces}% + % + % Process the macro body under the current catcode regime. + \scantokens{#1\texinfoc}\aftermacro% + % + % The \c is to remove the \newlinechar added by \scantokens, and + % can be noticed by \parsearg. + % The \aftermacro allows a \comment at the end of the macro definition + % to duplicate itself past the final \newlinechar added by \scantokens: + % this is used in the definition of \group to comment out a newline. We + % don't do the same for \c to support Texinfo files with macros that ended + % with a @c, which should no longer be necessary. + % We avoid surrounding the call to \scantokens with \bgroup and \egroup + % to allow macros to open or close groups themselves. } \def\scanexp#1{% + \bgroup + % Undo catcode changes of \startcontents and \printindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. + % FIXME: This may not be needed. + %\catcode`\@=0 \catcode`\\=\active \escapechar=`\@ \edef\temp{\noexpand\scanmacro{#1}}% \temp + \egroup } \newcount\paramno % Count of parameters @@ -6815,7 +7651,7 @@ % 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 @@ -6841,22 +7677,22 @@ % 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 \. - +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% % 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 +% done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. - -\def\scanctxt{% +% +\def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other - \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other @@ -6864,23 +7700,37 @@ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } -\def\scanargctxt{% +\def\scanargctxt{% used for copying and captions, not macros. \scanctxt + \catcode`\@=\other \catcode`\\=\other \catcode`\^^M=\other } -\def\macrobodyctxt{% +\def\macrobodyctxt{% used for @macro definitions \scanctxt + \catcode`\ =\other + \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } +% Used when scanning braced macro arguments. Note, however, that catcode +% changes here are ineffectual if the macro invocation was nested inside +% an argument to another Texinfo command. \def\macroargctxt{% \scanctxt - \catcode`\\=\other + \catcode`\ =\active + \catcode`\^^M=\other + \catcode`\\=\active +} + +\def\macrolineargctxt{% used for whole-line arguments without braces + \scanctxt + \catcode`\{=\other + \catcode`\}=\other } % \mbodybackslash is the definition of \ in @macro bodies. @@ -6888,22 +7738,30 @@ % 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\margbackslash#1{\char`\#1 } + \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% - \getargs{#1}% now \macname is the macname and \argl the arglist + \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments - \paramno=0% + \paramno=0\relax \else \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% @@ -6945,125 +7803,513 @@ \fi } -% This makes use of the obscure feature that if the last token of a -% is #, then the preceding argument is delimited by -% an opening brace, and that opening brace is not consumed. +% \getargs -- Parse the arguments to a @macro line. Set \macname to +% the name of the macro, and \argl to the braced argument list. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} -\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} +% This made use of the feature that if the last token of a +% is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. -% 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. +% Parse the optional {params} list to @macro or @rmacro. +% Set \paramno to the number of arguments, +% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a +% three-param macro.) Define \macarg.BLAH for each BLAH in the params +% list to some hook where the argument is to be expanded. If there are +% less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% % 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,;,} +% If there are 10 or more arguments, a different technique is used: see +% \parsemmanyargdef. +% +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + % \hash is redefined to `#' later to get it into definitions + \let\processmacroarg\relax + \parsemargdefxxx#1,;,% + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx - \advance\paramno by 1% + \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname - {\xeatspaces{\hash\the\paramno}}% + {\processmacroarg{\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.) +% \parsemacbody, \parsermacbody +% +% Read recursive and nonrecursive macro bodies. (They're different since +% rec and nonrec macros end differently.) +% +% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro +% body to be transformed. +% Set \macrobody to the body of the macro, and call \defmacro. +% +{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% +\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% +{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% +\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% + +% Make @ a letter, so that we can make private-to-Texinfo macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax + +%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%% + +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime under which the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, no macro can have more than 256 arguments (else error). +% +% In case that there are 10 or more arguments we parse again the arguments +% list to set new definitions for the \macarg.BLAH macros corresponding to +% each BLAH argument. It was anyhow needed to parse already once this list +% in order to count the arguments, and as macros with at most 9 arguments +% are by far more frequent than macro with 10 or more arguments, defining +% twice the \macarg.BLAH macros does not cost too much processing power. +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + + +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments' values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa. +% +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +% Define the named-macro outside of this group and then close this group. +% +\def\macargexpandinbody@{% + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} + +% Trailing missing arguments are set to empty. +% +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} + + +%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%% + -\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. +% Remove following spaces at the expansion stage. +% This works because spaces are discarded before each argument when TeX is +% getting the arguments for a macro. +% This must not be immediately followed by a }. +\long\def\gobblespaces#1{#1} + +% This defines a Texinfo @macro or @rmacro, called by \parsemacbody. +% \macrobody has the body of the macro in it, with placeholders for +% its parameters, looking like "\processmacroarg{\hash 1}". +% \paramno is the number of parameters +% \paramlist is a TeX parameter text, e.g. "#1,#2,#3," +% There are eight cases: recursive and nonrecursive macros of zero, one, +% up to nine, and many arguments. % \xdef is used so that macro definitions will survive the file -% they're defined in; @include reads the file inside a group. +% they're defined in: @include reads the file inside a group. +% \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars - \ifrecursive + \ifnum\paramno=1 + \def\processmacroarg{\gobblespaces}% + % This removes the pair of braces around the argument. We don't + % use \eatspaces, because this can cause ends of lines to be lost + % when the argument to \eatspaces is read, leading to line-based + % commands like "@itemize" not being read correctly. + \else + \def\processmacroarg{\xprocessmacroarg}% + \let\xprocessmacroarg\relax + \fi + \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% - \noexpand\scanmacro{\temp}}% + \noexpand\scanmacro{\macrobody}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt + \bgroup \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}}% + \expandafter\noexpand\csname\the\macname @@@\endcsname}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname{% + \noexpand\gobblespaces##1\empty}% + % The \empty is for \gobblespaces in case #1 is empty + }% + \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% + \egroup\noexpand\scanmacro{\macrobody}}% + \else + \ifnum\paramno<10\relax % at most 9 + % See non-recursive section below for comments + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\expandafter + \noexpand\macroargctxt + \noexpand\expandafter + \expandafter\noexpand\csname\the\macname @@\endcsname}% + \expandafter\xdef\csname\the\macname @@\endcsname##1{% + \noexpand\passargtomacro + \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname @@@@\endcsname\paramlist{% + \egroup\noexpand\scanmacro{\macrobody}}% + \else % 10 or more + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi \fi - \else + \else %%%%%%%%%%%%%%%%%%%%%% Non-recursive %%%%%%%%%%%%%%%%%%%%%%%%%% \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% + \noexpand\scanmacro{\macrobody}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt + \bgroup \noexpand\braceorline - \expandafter\noexpand\csname\the\macname xxx\endcsname}% - \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@\endcsname}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname{% + \noexpand\gobblespaces##1\empty}% + % The \empty is for \gobblespaces in case #1 is empty + }% + \expandafter\xdef\csname\the\macname @@@@\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}% + \noexpand\scanmacro{\macrobody}% + }% + \else % at most 9 + \ifnum\paramno<10\relax + % @MACNAME sets the context for reading the macro argument + % @MACNAME@@ gets the argument, processes backslashes and appends a + % comma. + % @MACNAME@@@ removes braces surrounding the argument list. + % @MACNAME@@@@ scans the macro body with arguments substituted. + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\expandafter % This \expandafter skip any spaces after the + \noexpand\macroargctxt % macro before we change the catcode of space. + \noexpand\expandafter + \expandafter\noexpand\csname\the\macname @@\endcsname}% + \expandafter\xdef\csname\the\macname @@\endcsname##1{% + \noexpand\passargtomacro + \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname @@@@\endcsname\paramlist{% + \egroup\noexpand\scanmacro{\macrobody}}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse + \fi \fi \fi} +\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes + \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) + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +{\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape +@catcode`@_=11 % private names +@catcode`@!=11 % used as argument separator + +% \passargtomacro#1#2 - +% Call #1 with a list of tokens #2, with any doubled backslashes in #2 +% compressed to one. +% +% This implementation works by expansion, and not execution (so we cannot use +% \def or similar). This reduces the risk of this failing in contexts where +% complete expansion is done with no execution (for example, in writing out to +% an auxiliary file for an index entry). +% +% State is kept in the input stream: the argument passed to +% @look_ahead, @gobble_and_check_finish and @add_segment is +% +% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input) +% +% where: +% THE_MACRO - name of the macro we want to call +% ARG_RESULT - argument list we build to pass to that macro +% PENDING_BS - either a backslash or nothing +% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next + +@gdef@passargtomacro#1#2{% + @add_segment #1!{}@relax#2\@_finish\% +} +@gdef@_finish{@_finishx} @global@let@_finishx@relax + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 used to look ahead +% +% If the next token is not a backslash, process the rest of the argument; +% otherwise, remove the next token. +@gdef@look_ahead#1!#2#3#4{% + @ifx#4\% + @expandafter@gobble_and_check_finish + @else + @expandafter@add_segment + @fi#1!{#2}#4#4% +} + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 should be a backslash, which is gobbled. +% #5 looks ahead +% +% Double backslash found. Add a single backslash, and look ahead. +@gdef@gobble_and_check_finish#1!#2#3#4#5{% + @add_segment#1\!{}#5#5% +} + +@gdef@is_fi{@fi} + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 is input stream until next backslash +% +% Input stream is either at the start of the argument, or just after a +% backslash sequence, either a lone backslash, or a doubled backslash. +% NEXT_TOKEN contains the first token in the input stream: if it is \finish, +% finish; otherwise, append to ARG_RESULT the segment of the argument up until +% the next backslash. PENDING_BACKSLASH contains a backslash to represent +% a backslash just before the start of the input stream that has not been +% added to ARG_RESULT. +@gdef@add_segment#1!#2#3#4\{% +@ifx#3@_finish + @call_the_macro#1!% +@else + % append the pending backslash to the result, followed by the next segment + @expandafter@is_fi@look_ahead#1#2#4!{\}@fi + % this @fi is discarded by @look_ahead. + % we can't get rid of it with \expandafter because we don't know how + % long #4 is. +} + +% #1 - THE_MACRO +% #2 - ARG_RESULT +% #3 discards the res of the conditional in @add_segment, and @is_fi ends the +% conditional. +@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} + +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% \braceorline MAC is used for a one-argument macro MAC. It checks +% whether the next non-whitespace character is a {. It sets the context +% for reading the argument (slightly different in the two cases). Then, +% to read the argument, in the whole-line case, it then calls the regular +% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. +% \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% - \ifx\nchar\bgroup\else - \expandafter\parsearg + \ifx\nchar\bgroup + \macroargctxt + \expandafter\passargtomacro + \else + \macrolineargctxt\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. +% sign. 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{% @@ -7084,7 +8330,8 @@ % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, +\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 @@ -7137,6 +8384,7 @@ \pdfmkdest{#1}% \iflinks {% + \requireauxfile \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef @@ -7145,39 +8393,78 @@ \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 + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\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\pxref{\putwordsee{} \xrefXX} +\def\xref{\putwordSee{} \xrefXX} +\def\ref{\xrefXX} + +\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX} +\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]} +% +\newbox\toprefbox +\newbox\printedrefnamebox +\newbox\infofilenamebox +\newbox\printedmanualbox +% \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces - \def\printedmanual{\ignorespaces #5}% + % + % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual\unskip}% - \setbox0=\hbox{\printedrefname\unskip}% - \ifdim \wd0 = 0pt + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 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. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use 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. + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs - % We know the real title if we have the xref values. + % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. @@ -7191,13 +8478,20 @@ \ifpdf {\indexnofonts \turnoffactive + \makevalueexpandable % This expands tokens, so do it after making catcode changes, so _ - % etc. don't get their TeX definitions. + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % - % See comments at \activebackslashdouble. - {\activebackslashdouble \xdef\pdfxrefdest{#1}% - \backslashparens\pdfxrefdest}% + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \edef\pdfxrefdest{#1}% + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets + \else + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi % \leavevmode \startlink attr{/Border [0 0 0]}% @@ -7224,29 +8518,42 @@ \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 + \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % - % if the user also gave the printed manual name (fifth arg), append + % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". - \ifdim \wd1 > 0pt + \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. + % + % If we use \unhbox 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 \wd\printedmanualbox > 0pt + % Cross-manual reference with a printed manual name. + % + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. + % + \crossmanualxref{\code{\infofilename\unskip}}% % - % 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 + % Reference within this manual. + % % _ (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 @@ -7258,7 +8565,7 @@ \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. + % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: @@ -7266,11 +8573,43 @@ % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% - \fi + \ifx,\tokenafterxref + \else\ifx.\tokenafterxref + \else\ifx;\tokenafterxref + \else\ifx)\tokenafterxref + \else,% add a , if xref not followed by punctuation + \fi\fi\fi\fi + \fi\fi \fi \endlink \endgroup} +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + % 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 @@ -7310,6 +8649,7 @@ % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% + \requireauxfile {% \indexnofonts \otherbackslash @@ -7321,7 +8661,8 @@ \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue @@ -7372,6 +8713,23 @@ \fi } +% 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 at the beginning of the file. +% +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% Used when writing to the aux file, or when using data from it. +\def\requireauxfile{% + \iflinks + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux + \fi + \global\let\requireauxfile=\relax % Only do this once. +} + % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% @@ -7451,14 +8809,7 @@ \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 - }% - }% + {\setnonasciicharscatcodenonglobal\other}% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 @@ -7485,15 +8836,13 @@ % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } -% @footnotestyle is meaningful for info output only. +% @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}$}% % @@ -7517,6 +8866,11 @@ % \gdef\dofootnote{% \insert\footins\bgroup + % + % Nested footnotes are not supported in TeX, that would take a lot + % more work. (\startsavinginserts does not suffice.) + \let\footnote=\errfootnotenest + % % 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. @@ -7548,17 +8902,30 @@ % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 +\def\errfootnotenest{% + \errhelp=\EMsimple + \errmessage{Nested footnotes not supported in texinfo.tex, + even though they work in makeinfo; sorry} +} + +\def\errfootnoteheading{% + \errhelp=\EMsimple + \errmessage{Footnotes in chapters, sections, etc., are not supported} +} + % 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. @@ -7635,7 +9002,7 @@ it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% - \ifx\epsfbox\undefined + \ifx\epsfbox\thisisundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% @@ -7651,14 +9018,22 @@ % #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. +% #6 is just the usual extra ignored arg for parsing 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 + \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro % If the image is by itself, center it. \ifvmode \imagevmodetrue + \else \ifx\centersub\centerV + % for @center @image, we need a vbox so we can have our vertical space + \imagevmodetrue + \vbox\bgroup % vbox has better behavior than vtop herev + \fi\fi + % + \ifimagevmode \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space @@ -7668,9 +9043,13 @@ \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 + % environment such as @quotation is respected. + % However, if we're at the top level, we don't want the + % normal paragraph indentation. + % On the other hand, if we are in the case of @center @image, we don't + % want to start a paragraph, which will create a hsize-width box and + % eradicate the centering. + \ifx\centersub\centerV\else \noindent \fi % % Output the image. \ifpdf @@ -7682,7 +9061,10 @@ \epsfbox{#1.eps}% \fi % - \ifimagevmode \medskip \fi % space after the standalone image + \ifimagevmode + \medskip % space after a standalone image + \fi + \ifx\centersub\centerV \egroup \fi \endgroup} @@ -7822,6 +9204,7 @@ % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% + \requireauxfile \atdummies % % since we read the caption text in the macro world, where ^^M @@ -7961,35 +9344,36 @@ { \catcode`\_ = \active \globaldefs=1 -\parseargdef\documentlanguage{\begingroup - \let_=\normalunderscore % normal _ character for filenames +\parseargdef\documentlanguage{% \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. + \let_ = \normalunderscore % normal _ character for filename test \openin 1 txi-#1.tex \ifeof 1 - \documentlanguagetrywithoutunderscore{#1_\finish}% + \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{% +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else + \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } +}% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current @@ -7998,16 +9382,16 @@ % 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. @@ -8043,7 +9427,8 @@ % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % -\parseargdef\documentencoding{% +\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} +\def\documentencodingzzz#1{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % @@ -8062,7 +9447,7 @@ \setnonasciicharscatcode\active \lattwochardefs % - \else \ifx \declaredencoding \latone + \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % @@ -8072,10 +9457,12 @@ % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active - \utfeightchardefs + % since we already invoked \utfeightchardefs at the top level + % (below), do not re-invoke it, then our check for duplicated + % definitions triggers. Making non-ascii chars active is enough. % - \else - \message{Unknown document encoding #1, ignoring.}% + \else + \message{Ignoring unknown document encoding: #1.}% % \fi % utfeight \fi % latnine @@ -8084,10 +9471,11 @@ \fi % ascii } +% emacs-page % 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.}} +% +\def\missingcharmsg#1{\message{Character missing, sorry: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} @@ -8099,21 +9487,21 @@ % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% - \gdef^^a0{~} + \gdef^^a0{\tie} \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^^a2{{\tcfont \char162}} % cent + \gdef^^a3{\pounds} + \gdef^^a4{{\tcfont \char164}} % currency + \gdef^^a5{{\tcfont \char165}} % yen + \gdef^^a6{{\tcfont \char166}} % broken bar \gdef^^a7{\S} - \gdef^^a8{\"{}} - \gdef^^a9{\copyright} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} - \gdef^^ac{$\lnot$} - \gdef^^ad{\-} - \gdef^^ae{\registeredsymbol} + \gdef^^ac{\ensuremath\lnot} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} @@ -8123,13 +9511,11 @@ \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} - % - \gdef^^b7{$^.$} + \gdef^^b7{\ensuremath\cdot} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} - % - \gdef^^bb{\guilletright} + \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} @@ -8140,7 +9526,7 @@ \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} - \gdef^^c5{\ringaccent A} + \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} @@ -8152,7 +9538,7 @@ \gdef^^ce{\^I} \gdef^^cf{\"I} % - \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} @@ -8166,7 +9552,7 @@ \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} - \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} @@ -8186,7 +9572,7 @@ \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % - \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} @@ -8200,7 +9586,7 @@ \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} - \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^fe{\th} \gdef^^ff{\"y} } @@ -8221,7 +9607,7 @@ % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% - \gdef^^a0{~} + \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} @@ -8272,7 +9658,7 @@ \gdef^^ce{\^I} \gdef^^cf{\v D} % - \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} @@ -8281,7 +9667,7 @@ \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} - \gdef^^d9{\ringaccent U} + \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} @@ -8302,11 +9688,11 @@ \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} - \gdef^^ed{\'\i} - \gdef^^ee{\^\i} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % - \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} @@ -8325,11 +9711,11 @@ } % 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 @@ -8383,6 +9769,18 @@ \UTFviiiLoop \endgroup +\def\globallet{\global\let} % save some \expandafter's below + +% @U{xxxx} to produce U+xxxx, if we support it. +\def\U#1{% + \expandafter\ifx\csname uni:#1\endcsname \relax + \errhelp = \EMsimple + \errmessage{Unicode character U+#1 not supported, sorry}% + \else + \csname uni:#1\endcsname + \fi +} + \begingroup \catcode`\"=12 \catcode`\<=12 @@ -8391,10 +9789,9 @@ \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 - \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax - \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% @@ -8406,6 +9803,13 @@ \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% + % + \expandafter\ifx\csname uni:#1\endcsname \relax \else + \message{Internal error, already defined: #1}% + \fi + % + % define an additional control sequence for this code point. + \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp \endgroup} \gdef\parseXMLCharref{% @@ -8443,23 +9847,53 @@ \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup +% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M +% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) +% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) +% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A +% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B +% +% Many of our renditions are less than wonderful, and all the missing +% characters are available somewhere. Loading the necessary fonts +% awaits user request. We can't truly support Unicode without +% reimplementing everything that's been done in LaTeX for many years, +% plus probably using luatex or xetex, and who knows what else. +% We won't be doing that here in this simple file. But we can try to at +% least make most of the characters not bomb out. +% \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency + \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen + \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar + \DeclareUnicodeCharacter{00A7}{\S} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B1}{\ensuremath\pm} + \DeclareUnicodeCharacter{00B2}{$^2$} + \DeclareUnicodeCharacter{00B3}{$^3$} \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B5}{$\mu$} + \DeclareUnicodeCharacter{00B6}{\P} + \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00B9}{$^1$} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BC}{$1\over4$} + \DeclareUnicodeCharacter{00BD}{$1\over2$} + \DeclareUnicodeCharacter{00BE}{$3\over4$} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} @@ -8479,18 +9913,21 @@ \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} + \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D7}{\ensuremath\times} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} @@ -8510,18 +9947,21 @@ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F7}{\ensuremath\div} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} @@ -8534,20 +9974,23 @@ \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{010F}{d'} + \DeclareUnicodeCharacter{0110}{\DH} + \DeclareUnicodeCharacter{0111}{\dh} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} @@ -8557,14 +10000,20 @@ \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0122}{\cedilla{G}} + \DeclareUnicodeCharacter{0123}{\cedilla{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + \DeclareUnicodeCharacter{012E}{\ogonek{I}} + \DeclareUnicodeCharacter{012F}{\ogonek{i}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} @@ -8572,15 +10021,29 @@ \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0136}{\cedilla{K}} + \DeclareUnicodeCharacter{0137}{\cedilla{k}} + \DeclareUnicodeCharacter{0138}{\ensuremath\kappa} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} + \DeclareUnicodeCharacter{013B}{\cedilla{L}} + \DeclareUnicodeCharacter{013C}{\cedilla{l}} + \DeclareUnicodeCharacter{013D}{L'}% should kern + \DeclareUnicodeCharacter{013E}{l'}% should kern + \DeclareUnicodeCharacter{013F}{L\U{00B7}} + \DeclareUnicodeCharacter{0140}{l\U{00B7}} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0145}{\cedilla{N}} + \DeclareUnicodeCharacter{0146}{\cedilla{n}} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{0149}{'n} + \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}} + \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} @@ -8592,6 +10055,8 @@ \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0156}{\cedilla{R}} + \DeclareUnicodeCharacter{0157}{\cedilla{r}} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} @@ -8603,10 +10068,12 @@ \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} - \DeclareUnicodeCharacter{0162}{\cedilla{t}} - \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0162}{\cedilla{T}} + \DeclareUnicodeCharacter{0163}{\cedilla{t}} \DeclareUnicodeCharacter{0164}{\v{T}} - + \DeclareUnicodeCharacter{0165}{\v{t}} + \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} @@ -8618,6 +10085,8 @@ \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0172}{\ogonek{U}} + \DeclareUnicodeCharacter{0173}{\ogonek{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} @@ -8629,6 +10098,7 @@ \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} + \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} @@ -8685,6 +10155,83 @@ \DeclareUnicodeCharacter{02DB}{\ogonek{ }} + % Greek letters upper case + \DeclareUnicodeCharacter{0391}{{\it A}} + \DeclareUnicodeCharacter{0392}{{\it B}} + \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}} + \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}} + \DeclareUnicodeCharacter{0395}{{\it E}} + \DeclareUnicodeCharacter{0396}{{\it Z}} + \DeclareUnicodeCharacter{0397}{{\it H}} + \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}} + \DeclareUnicodeCharacter{0399}{{\it I}} + \DeclareUnicodeCharacter{039A}{{\it K}} + \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}} + \DeclareUnicodeCharacter{039C}{{\it M}} + \DeclareUnicodeCharacter{039D}{{\it N}} + \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}} + \DeclareUnicodeCharacter{039F}{{\it O}} + \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}} + \DeclareUnicodeCharacter{03A1}{{\it P}} + %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma + \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}} + \DeclareUnicodeCharacter{03A4}{{\it T}} + \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}} + \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}} + \DeclareUnicodeCharacter{03A7}{{\it X}} + \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}} + \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}} + + % Vowels with accents + \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}} + \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}} + \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}} + \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}} + \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}} + \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}} + + % Standalone accent + \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}} + + % Greek letters lower case + \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha} + \DeclareUnicodeCharacter{03B2}{\ensuremath\beta} + \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma} + \DeclareUnicodeCharacter{03B4}{\ensuremath\delta} + \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon} + \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta} + \DeclareUnicodeCharacter{03B7}{\ensuremath\eta} + \DeclareUnicodeCharacter{03B8}{\ensuremath\theta} + \DeclareUnicodeCharacter{03B9}{\ensuremath\iota} + \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa} + \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda} + \DeclareUnicodeCharacter{03BC}{\ensuremath\mu} + \DeclareUnicodeCharacter{03BD}{\ensuremath\nu} + \DeclareUnicodeCharacter{03BE}{\ensuremath\xi} + \DeclareUnicodeCharacter{03BF}{{\it o}} % omicron + \DeclareUnicodeCharacter{03C0}{\ensuremath\pi} + \DeclareUnicodeCharacter{03C1}{\ensuremath\rho} + \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma} + \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma} + \DeclareUnicodeCharacter{03C4}{\ensuremath\tau} + \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon} + \DeclareUnicodeCharacter{03C6}{\ensuremath\phi} + \DeclareUnicodeCharacter{03C7}{\ensuremath\chi} + \DeclareUnicodeCharacter{03C8}{\ensuremath\psi} + \DeclareUnicodeCharacter{03C9}{\ensuremath\omega} + + % More Greek vowels with accents + \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}} + \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}} + \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}} + \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}} + \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}} + + % Variant Greek letters + \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta} + \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi} + \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho} + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} @@ -8812,6 +10359,7 @@ \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} + % Punctuation \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} @@ -8820,26 +10368,227 @@ \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2020}{\ensuremath\dagger} + \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{202F}{\thinspace} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} + % Mathematical symbols + \DeclareUnicodeCharacter{2200}{\ensuremath\forall} + \DeclareUnicodeCharacter{2203}{\ensuremath\exists} + \DeclareUnicodeCharacter{2208}{\ensuremath\in} \DeclareUnicodeCharacter{2212}{\minus} - \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2217}{\ast} + \DeclareUnicodeCharacter{221E}{\ensuremath\infty} + \DeclareUnicodeCharacter{2225}{\ensuremath\parallel} + \DeclareUnicodeCharacter{2227}{\ensuremath\wedge} + \DeclareUnicodeCharacter{2229}{\ensuremath\cap} \DeclareUnicodeCharacter{2261}{\equiv} + \DeclareUnicodeCharacter{2264}{\ensuremath\leq} + \DeclareUnicodeCharacter{2265}{\ensuremath\geq} + \DeclareUnicodeCharacter{2282}{\ensuremath\subset} + \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq} + + \DeclareUnicodeCharacter{2016}{\ensuremath\Vert} + \DeclareUnicodeCharacter{2032}{\ensuremath\prime} + \DeclareUnicodeCharacter{210F}{\ensuremath\hbar} + \DeclareUnicodeCharacter{2111}{\ensuremath\Im} + \DeclareUnicodeCharacter{2113}{\ensuremath\ell} + \DeclareUnicodeCharacter{2118}{\ensuremath\wp} + \DeclareUnicodeCharacter{211C}{\ensuremath\Re} + \DeclareUnicodeCharacter{2127}{\ensuremath\mho} + \DeclareUnicodeCharacter{2135}{\ensuremath\aleph} + \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow} + \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow} + \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow} + \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow} + \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow} + \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow} + \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow} + \DeclareUnicodeCharacter{2198}{\ensuremath\searrow} + \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow} + \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto} + \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow} + \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow} + \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup} + \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown} + \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright} + \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup} + \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown} + \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons} + \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow} + \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow} + \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow} + \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow} + \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow} + \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto} + \DeclareUnicodeCharacter{2201}{\ensuremath\complement} + \DeclareUnicodeCharacter{2202}{\ensuremath\partial} + \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset} + \DeclareUnicodeCharacter{2207}{\ensuremath\nabla} + \DeclareUnicodeCharacter{2209}{\ensuremath\notin} + \DeclareUnicodeCharacter{220B}{\ensuremath\owns} + \DeclareUnicodeCharacter{220F}{\ensuremath\prod} + \DeclareUnicodeCharacter{2210}{\ensuremath\coprod} + \DeclareUnicodeCharacter{2211}{\ensuremath\sum} + \DeclareUnicodeCharacter{2213}{\ensuremath\mp} + \DeclareUnicodeCharacter{2218}{\ensuremath\circ} + \DeclareUnicodeCharacter{221A}{\ensuremath\surd} + \DeclareUnicodeCharacter{221D}{\ensuremath\propto} + \DeclareUnicodeCharacter{2220}{\ensuremath\angle} + \DeclareUnicodeCharacter{2223}{\ensuremath\mid} + \DeclareUnicodeCharacter{2228}{\ensuremath\vee} + \DeclareUnicodeCharacter{222A}{\ensuremath\cup} + \DeclareUnicodeCharacter{222B}{\ensuremath\smallint} + \DeclareUnicodeCharacter{222E}{\ensuremath\oint} + \DeclareUnicodeCharacter{223C}{\ensuremath\sim} + \DeclareUnicodeCharacter{2240}{\ensuremath\wr} + \DeclareUnicodeCharacter{2243}{\ensuremath\simeq} + \DeclareUnicodeCharacter{2245}{\ensuremath\cong} + \DeclareUnicodeCharacter{2248}{\ensuremath\approx} + \DeclareUnicodeCharacter{224D}{\ensuremath\asymp} + \DeclareUnicodeCharacter{2250}{\ensuremath\doteq} + \DeclareUnicodeCharacter{2260}{\ensuremath\neq} + \DeclareUnicodeCharacter{226A}{\ensuremath\ll} + \DeclareUnicodeCharacter{226B}{\ensuremath\gg} + \DeclareUnicodeCharacter{227A}{\ensuremath\prec} + \DeclareUnicodeCharacter{227B}{\ensuremath\succ} + \DeclareUnicodeCharacter{2283}{\ensuremath\supset} + \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq} + \DeclareUnicodeCharacter{228E}{\ensuremath\uplus} + \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset} + \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset} + \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq} + \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq} + \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap} + \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup} + \DeclareUnicodeCharacter{2295}{\ensuremath\oplus} + \DeclareUnicodeCharacter{2296}{\ensuremath\ominus} + \DeclareUnicodeCharacter{2297}{\ensuremath\otimes} + \DeclareUnicodeCharacter{2298}{\ensuremath\oslash} + \DeclareUnicodeCharacter{2299}{\ensuremath\odot} + \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash} + \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv} + \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop} + \DeclareUnicodeCharacter{22A5}{\ensuremath\bot} + \DeclareUnicodeCharacter{22A8}{\ensuremath\models} + \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd} + \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd} + \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge} + \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee} + \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap} + \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup} + \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond} + \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot} + \DeclareUnicodeCharacter{22C6}{\ensuremath\star} + \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie} + \DeclareUnicodeCharacter{2308}{\ensuremath\lceil} + \DeclareUnicodeCharacter{2309}{\ensuremath\rceil} + \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor} + \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor} + \DeclareUnicodeCharacter{2322}{\ensuremath\frown} + \DeclareUnicodeCharacter{2323}{\ensuremath\smile} + + \DeclareUnicodeCharacter{25A1}{\ensuremath\Box} + \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle} + \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright} + \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown} + \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft} + \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond} + \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit} + \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit} + \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit} + \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit} + \DeclareUnicodeCharacter{266D}{\ensuremath\flat} + \DeclareUnicodeCharacter{266E}{\ensuremath\natural} + \DeclareUnicodeCharacter{266F}{\ensuremath\sharp} + \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc} + \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle} + \DeclareUnicodeCharacter{27C2}{\ensuremath\perp} + \DeclareUnicodeCharacter{27E8}{\ensuremath\langle} + \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow} + \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow} + \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow} + \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto} + \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus} + \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot} + \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus} + \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes} + \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus} + \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup} + \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join} + \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg} + \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq} + \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq} + + \global\mathchardef\checkmark="1370 % actually the square root sign + \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark} }% end of \utfeightchardefs - % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } +% Latin1 (ISO-8859-1) character definitions. +\def\nonasciistringdefs{% + \setnonasciicharscatcode\active + \def\defstringchar##1{\def##1{\string##1}}% + % + \defstringchar^^80\defstringchar^^81\defstringchar^^82\defstringchar^^83% + \defstringchar^^84\defstringchar^^85\defstringchar^^86\defstringchar^^87% + \defstringchar^^88\defstringchar^^89\defstringchar^^8a\defstringchar^^8b% + \defstringchar^^8c\defstringchar^^8d\defstringchar^^8e\defstringchar^^8f% + % + \defstringchar^^90\defstringchar^^91\defstringchar^^92\defstringchar^^93% + \defstringchar^^94\defstringchar^^95\defstringchar^^96\defstringchar^^97% + \defstringchar^^98\defstringchar^^99\defstringchar^^9a\defstringchar^^9b% + \defstringchar^^9c\defstringchar^^9d\defstringchar^^9e\defstringchar^^9f% + % + \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% + \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% + \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% + \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% + % + \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% + \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% + \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% + \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% + % + \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% + \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% + \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% + \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% + % + \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% + \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% + \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% + \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% + % + \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% + \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% + \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% + \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% + % + \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% + \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% + \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% + \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% +} + + +% define all the unicode characters we know about, for the sake of @U. +\utfeightchardefs + + % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. @@ -8858,8 +10607,8 @@ % Prevent underfull vbox error messages. \vbadness = 10000 -% Don't be so finicky about underfull hboxes, either. -\hbadness = 2000 +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 @@ -9066,28 +10815,21 @@ \message{and turning on texinfo input format.} +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + % 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 +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} % 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, @@ -9114,11 +10856,9 @@ \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote -\catcode`\~=\active -\def~{{\tt\char126}} -\chardef\hat=`\^ -\catcode`\^=\active -\def^{{\tt \hat}} +\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde +\chardef\hatchar=`\^ +\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} @@ -9128,22 +10868,28 @@ \catcode`\|=\active \def|{{\tt\char124}} + \chardef \less=`\< -\catcode`\<=\active -\def<{{\tt \less}} +\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless \chardef \gtr=`\> -\catcode`\>=\active -\def>{{\tt \gtr}} -\catcode`\+=\active -\def+{{\tt \char 43}} -\catcode`\$=\active -\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix +\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr +\catcode`\+=\active \def+{{\tt \char 43}} +\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix +\catcode`\-=\active \let-=\normaldash -% 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 for headline/footline in the output routine, in case the page +% breaks in the middle of an @tex block. +\def\texinfochars{% + \let< = \activeless + \let> = \activegtr + \let~ = \activetilde + \let^ = \activehat + \markupsetuplqdefault \markupsetuprqdefault + \let\b = \strong + \let\i = \smartitalic + % in principle, all other definitions in \tex have to be undone too. +} % Used sometimes to turn off (effectively) the active characters even after % parsing them. @@ -9163,68 +10909,116 @@ % \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 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 +\catcode`\\=\active % @ for escape char from now on. + +% Print a typewriter backslash. For math mode, we can't simply use +% \backslashcurfont: the story here is that in math mode, the \char +% of \backslashcurfont ends up printing the roman \ from the math symbol +% font (because \char in math mode uses the \mathcode, and plain.tex +% sets \mathcode`\\="026E). Hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. + +@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents. % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. +% catcode other. We switch back and forth between these. @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 +% +{@catcode`- = @active + @gdef@normalturnoffactive{% + @nonasciistringdefs + @let-=@normaldash + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @let\=@ttbackslash + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces + } +} + +% 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 @fixbackslash turn them back on. +@catcode`+=@other @catcode`@_=@other +% \enablebackslashhack - allow file to begin `\input texinfo' +% % 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 +% If the file did not have a `\input texinfo', then it is turned off after +% the first line; otherwise the first `\' in the file would cause an error. +% This is used on the very last line of this file, texinfo.tex. +% We also use @c to call @fixbackslash, in case ends of lines are hidden. +{ +@catcode`@^=7 +@catcode`@^^M=13@gdef@enablebackslashhack{% + @global@let\ = @eatinput% + @catcode`@^^M=13% + @def@c{@fixbackslash@c}% + @def ^^M{@let^^M@secondlinenl}% + @gdef @secondlinenl{@let^^M@thirdlinenl}% + @gdef @thirdlinenl{@fixbackslash}% +}} + +{@catcode`@^=7 @catcode`@^^M=13% +@gdef@eatinput input texinfo#1^^M{@fixbackslash}} -% 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 + @ifx\@eatinput @let\ = @ttbackslash @fi + @catcode13=5 % regular end of line + @let@c=@texinfoc + % Also turn back on active characters that might appear in the input + % file name, in case not using a pre-dumped format. @catcode`+=@active @catcode`@_=@active + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets + % called at the beginning of every Texinfo file. Not opening texinfo.cnf + % directly in this file, texinfo.tex, makes it possible to make a format + % file for Texinfo. + % + @openin 1 texinfo.cnf + @ifeof 1 @else @input texinfo.cnf @fi + @closein 1 } + % Say @foo, not \foo, in error messages. @escapechar = `@@ +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} + % These look ok in all fonts, so just make them not special. -@catcode`@& = @other -@catcode`@# = @other -@catcode`@% = @other +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @@ -9234,10 +11028,10 @@ @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault - + @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) -@c page-delimiter: "^\\\\message" +@c page-delimiter: "^\\\\message\\|emacs-page" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @@ -9248,3 +11042,4 @@ @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore +@enablebackslashhack diff --git a/doc/version.texi b/doc/version.texi index 80a2209..175aa07 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,10 +1,11 @@ @ignore -Copyright (C) 1988-2009 Free Software Foundation, Inc. +Copyright (C) 1988-2022 Free Software Foundation, Inc. @end ignore -@set LASTCHANGE Wed Dec 23 16:29:41 EST 2009 +@set LASTCHANGE Mon Sep 19 11:13:51 EDT 2022 -@set EDITION 4.1 -@set VERSION 4.1 -@set UPDATED 23 December 2009 -@set UPDATED-MONTH December 2009 +@set EDITION 5.2 +@set VERSION 5.2 + +@set UPDATED 19 September 2022 +@set UPDATED-MONTH September 2022 diff --git a/error.c b/error.c index c6ea581..1a1e59d 100644 --- a/error.c +++ b/error.c @@ -1,6 +1,6 @@ /* error.c -- Functions for handling errors. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -44,6 +44,7 @@ extern int errno; #include "bashintl.h" #include "shell.h" +#include "execute_cmd.h" #include "flags.h" #include "input.h" @@ -51,20 +52,18 @@ extern int errno; # include "bashhist.h" #endif -extern int executing_line_number __P((void)); +extern int executing_line_number PARAMS((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)); +extern int give_terminal_to PARAMS((pid_t, int)); #endif /* JOB_CONTROL */ #if defined (ARRAY_VARS) extern const char * const bash_badsub_errmsg; #endif -static void error_prolog __P((int)); +static void error_prolog PARAMS((int)); /* The current maintainer of the shell. You change this in the Makefile. */ @@ -200,7 +199,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = EXECUTION_FAILURE; + exit_shell (last_command_exit_value); + } } void @@ -246,6 +249,7 @@ internal_error (format, va_alist) va_end (args); } +void #if defined (PREFER_STDARG) invalid_cmd (const char *format, ...) #else @@ -256,6 +260,8 @@ invalid_cmd (format, va_alist) { va_list args; + error_prolog (1); + SH_VA_START (args, format); vfprintf (stderr, format, args); @@ -286,6 +292,55 @@ internal_warning (format, va_alist) va_end (args); } +void +#if defined (PREFER_STDARG) +internal_inform (const char *format, ...) +#else +internal_inform (format, va_alist) + const char *format; + va_dcl +#endif +{ + va_list args; + + error_prolog (1); + /* TRANSLATORS: this is a prefix for informational messages. */ + fprintf (stderr, _("INFORM: ")); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); +} + +void +#if defined (PREFER_STDARG) +internal_debug (const char *format, ...) +#else +internal_debug (format, va_alist) + const char *format; + va_dcl +#endif +{ +#ifdef DEBUG + va_list args; + + error_prolog (1); + fprintf (stderr, _("DEBUG warning: ")); + + SH_VA_START (args, format); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + + va_end (args); +#else + return; +#endif +} + void #if defined (PREFER_STDARG) sys_error (const char *format, ...) @@ -354,6 +409,36 @@ parser_error (lineno, format, va_alist) } #ifdef DEBUG +/* This assumes ASCII and is suitable only for debugging */ +char * +strescape (str) + const char *str; +{ + char *r, *result; + unsigned char *s; + + r = result = (char *)xmalloc (strlen (str) * 2 + 1); + + for (s = (unsigned char *)str; s && *s; s++) + { + if (*s < ' ') + { + *r++ = '^'; + *r++ = *s+64; + } + else if (*s == 127) + { + *r++ = '^'; + *r++ = '?'; + } + else + *r++ = *s; + } + + *r = '\0'; + return result; +} + void #if defined (PREFER_STDARG) itrace (const char *format, ...) diff --git a/error.h b/error.h index d5ec12f..09fac5b 100644 --- a/error.h +++ b/error.h @@ -1,6 +1,6 @@ /* error.h -- External declarations of functions appearing in error.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -24,49 +24,62 @@ #include "stdc.h" /* Get the name of the shell or shell script for an error message. */ -extern char *get_name_for_error __P((void)); +extern char *get_name_for_error PARAMS((void)); /* Report an error having to do with FILENAME. */ -extern void file_error __P((const char *)); +extern void file_error PARAMS((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))); +extern void programming_error PARAMS((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))); +extern void report_error PARAMS((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))); +extern void parser_error PARAMS((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))); +extern void fatal_error PARAMS((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))); +extern void sys_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal error. */ -extern void internal_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void internal_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an invalid command. */ -extern void invalid_cmd __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void invalid_cmd PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal warning. */ -extern void internal_warning __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void internal_warning PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Report an internal warning for debugging purposes. */ +extern void internal_debug PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); + +/* Report an internal informational notice. */ +extern void internal_inform PARAMS((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))); +extern char *strescape PARAMS((const char *)); +extern void itrace PARAMS((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); +extern void trace PARAMS((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 void command_error PARAMS((const char *, int, int, int)); -extern char *command_errstr __P((int)); +extern char *command_errstr PARAMS((int)); -/* Specific errror message functions that eventually call report_error or +/* Specific error 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 *)); +extern void err_badarraysub PARAMS((const char *)); +extern void err_unboundvar PARAMS((const char *)); +extern void err_readonly PARAMS((const char *)); + +#ifdef DEBUG +# define INTERNAL_DEBUG(x) internal_debug x +#else +# define INTERNAL_DEBUG(x) +#endif #endif /* !_ERROR_H_ */ diff --git a/eval.c b/eval.c index 7b818b0..93457ec 100644 --- a/eval.c +++ b/eval.c @@ -1,6 +1,6 @@ /* eval.c -- reading and evaluating commands. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,9 +30,12 @@ #include "bashansi.h" #include +#include + #include "bashintl.h" #include "shell.h" +#include "parser.h" #include "flags.h" #include "trap.h" @@ -45,24 +48,14 @@ # 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)); +static void send_pwd_to_eterm PARAMS((void)); +static sighandler alrm_catcher PARAMS((int)); #if defined (READLINE) extern char *current_readline_line; extern int current_readline_line_index; #endif - /* Read and execute commands until EOF is reached. This assumes that the input source has already been initialized. */ int @@ -77,17 +70,22 @@ reader_loop () our_indirection_level = ++indirection_level; + if (just_one_command) + reset_readahead_token (); + while (EOF_Reached == 0) { int code; - code = setjmp (top_level); + code = setjmp_nosigs (top_level); #if defined (PROCESS_SUBSTITUTION) unlink_fifo_list (); #endif /* PROCESS_SUBSTITUTION */ - if (interactive_shell && signal_is_ignored (SIGINT) == 0) + /* XXX - why do we set this every time through the loop? And why do + it if SIGINT is trapped in an interactive shell? */ + if (interactive_shell && signal_is_ignored (SIGINT) == 0 && signal_is_trapped (SIGINT) == 0) set_signal_handler (SIGINT, sigint_sighandler); if (code != NOT_JUMPED) @@ -96,13 +94,14 @@ reader_loop () switch (code) { - /* Some kind of throw to top_level has occured. */ - case FORCE_EOF: + /* Some kind of throw to top_level has occurred. */ case ERREXIT: + if (exit_immediately_on_error) + reset_local_contexts (); /* not in a function */ + case FORCE_EOF: case EXITPROG: + case EXITBLTIN: current_command = (COMMAND *)NULL; - if (exit_immediately_on_error) - variable_context = 0; /* not in a function */ EOF_Reached = EOF; goto exec_done; @@ -111,7 +110,7 @@ reader_loop () leave existing non-zero values (e.g., > 128 on signal) alone. */ if (last_command_exit_value == 0) - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); if (subshell_environment) { current_command = (COMMAND *)NULL; @@ -124,6 +123,8 @@ reader_loop () dispose_command (current_command); current_command = (COMMAND *)NULL; } + + restore_sigmask (); break; default: @@ -144,17 +145,34 @@ reader_loop () { if (interactive_shell == 0 && read_but_dont_execute) { - last_command_exit_value = EXECUTION_SUCCESS; + set_exit_status (last_command_exit_value); dispose_command (global_command); global_command = (COMMAND *)NULL; } else if (current_command = global_command) { global_command = (COMMAND *)NULL; + + /* If the shell is interactive, expand and display $PS0 after reading a + command (possibly a list or pipeline) and before executing it. */ + if (interactive && ps0_prompt) + { + char *ps0_string; + + ps0_string = decode_prompt_string (ps0_prompt); + if (ps0_string && *ps0_string) + { + fprintf (stderr, "%s", ps0_string); + fflush (stderr); + } + free (ps0_string); + } + current_command_number++; executing = 1; stdin_redir = 0; + execute_command (current_command); exec_done: @@ -180,12 +198,56 @@ reader_loop () return (last_command_exit_value); } +/* Pretty print shell scripts */ +int +pretty_print_loop () +{ + COMMAND *current_command; + char *command_to_print; + int code; + int global_posix_mode, last_was_newline; + + global_posix_mode = posixly_correct; + last_was_newline = 0; + while (EOF_Reached == 0) + { + code = setjmp_nosigs (top_level); + if (code) + return (EXECUTION_FAILURE); + if (read_command() == 0) + { + current_command = global_command; + global_command = 0; + posixly_correct = 1; /* print posix-conformant */ + if (current_command && (command_to_print = make_command_string (current_command))) + { + printf ("%s\n", command_to_print); /* for now */ + last_was_newline = 0; + } + else if (last_was_newline == 0) + { + printf ("\n"); + last_was_newline = 1; + } + posixly_correct = global_posix_mode; + dispose_command (current_command); + } + else + return (EXECUTION_FAILURE); + } + + return (EXECUTION_SUCCESS); +} + static sighandler alrm_catcher(i) int i; { - printf (_("\007timed out waiting for input: auto-logout\n")); - fflush (stdout); + char *msg; + + msg = _("\007timed out waiting for input: auto-logout\n"); + write (1, msg, strlen (msg)); + bash_logout (); /* run ~/.bash_logout if this is a login shell */ jump_to_top_level (EXITPROG); SIGRETURN (0); @@ -196,12 +258,66 @@ alrm_catcher(i) static void send_pwd_to_eterm () { - char *pwd; + char *pwd, *f; + f = 0; pwd = get_string_value ("PWD"); if (pwd == 0) - pwd = get_working_directory ("eterm"); + f = pwd = get_working_directory ("eterm"); fprintf (stderr, "\032/%s\n", pwd); + free (f); +} + +#if defined (ARRAY_VARS) +/* Caller ensures that A has a non-zero number of elements */ +int +execute_array_command (a, v) + ARRAY *a; + void *v; +{ + char *tag; + char **argv; + int argc, i; + + tag = (char *)v; + argc = 0; + argv = array_to_argv (a, &argc); + for (i = 0; i < argc; i++) + { + if (argv[i] && argv[i][0]) + execute_variable_command (argv[i], tag); + } + strvec_dispose (argv); + return 0; +} +#endif + +static void +execute_prompt_command () +{ + char *command_to_execute; + SHELL_VAR *pcv; +#if defined (ARRAY_VARS) + ARRAY *pcmds; +#endif + + pcv = find_variable ("PROMPT_COMMAND"); + if (pcv == 0 || var_isset (pcv) == 0 || invisible_p (pcv)) + return; +#if defined (ARRAY_VARS) + if (array_p (pcv)) + { + if ((pcmds = array_cell (pcv)) && array_num_elements (pcmds) > 0) + execute_array_command (pcmds, "PROMPT_COMMAND"); + return; + } + else if (assoc_p (pcv)) + return; /* currently don't allow associative arrays here */ +#endif + + command_to_execute = value_cell (pcv); + if (command_to_execute && *command_to_execute) + execute_variable_command (command_to_execute, "PROMPT_COMMAND"); } /* Call the YACC-generated parser and return the status of the parse. @@ -212,19 +328,22 @@ 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) + is set then its value (array or string) is the command(s) to execute. */ + /* The tests are a combination of SHOULD_PROMPT() and prompt_again() + from parse.y, which are the conditions under which the prompt is + actually printed. */ + if (interactive && bash_input.type != st_string && parser_expanding_alias() == 0) { - command_to_execute = get_string_value ("PROMPT_COMMAND"); - if (command_to_execute) - execute_variable_command (command_to_execute, "PROMPT_COMMAND"); +#if defined (READLINE) + if (no_line_editing || (bash_input.type == st_stdin && parser_will_prompt ())) +#endif + execute_prompt_command (); if (running_under_emacs == 2) send_pwd_to_eterm (); /* Yuck */ @@ -235,36 +354,36 @@ parse_command () current_command_line_count = 0; r = yyparse (); -#if defined (READLINE) - if (interactive && in_vyatta_restricted_mode(FULL) - && current_readline_line) { - if (!is_vyatta_command(current_readline_line, global_command)) { - char *start = current_readline_line; - char *end = NULL; - char *cmd = NULL; - int cmdlen = 0; - while (*start && (whitespace(*start) || *start == '\n')) { - start++; - } - end = start; - while (*end && (!whitespace(*end) && *end != '\n')) { - end++; + #if defined (READLINE) + if (interactive && in_vyatta_restricted_mode(FULL) + && current_readline_line) { + if (!is_vyatta_command(current_readline_line, global_command)) { + char *start = current_readline_line; + char *end = NULL; + char *cmd = NULL; + int cmdlen = 0; + while (*start && (whitespace(*start) || *start == '\n')) { + start++; + } + end = start; + while (*end && (!whitespace(*end) && *end != '\n')) { + end++; + } + cmdlen = end-start; + cmd = malloc(cmdlen+1); + bzero(cmd,cmdlen+1); + strncpy(cmd, start, cmdlen); + + printf("\n Invalid command: [%s]\n\n", cmd); + current_readline_line_index = 0; + current_readline_line[0] = '\n'; + current_readline_line[1] = '\0'; + return 1; } - cmdlen = end-start; - cmd = malloc(cmdlen+1); - bzero(cmd,cmdlen+1); - strncpy(cmd, start, cmdlen); - - printf("\n Invalid command: [%s]\n\n", cmd); - current_readline_line_index = 0; - current_readline_line[0] = '\n'; - current_readline_line[1] = '\0'; - return 1; + } else if (interactive && current_readline_line) { + vyatta_check_expansion(global_command, 0); } - } else if (interactive && current_readline_line) { - vyatta_check_expansion(global_command, 0); - } -#endif + #endif if (need_here_doc) gather_here_documents (); diff --git a/examples/INDEX.html b/examples/INDEX.html index 5e8cdc6..bcca1f9 100644 --- a/examples/INDEX.html +++ b/examples/INDEX.html @@ -43,45 +43,29 @@ A more ksh-compatible 'autoload' (with lazy load). ksh + + ./functions/autoload.v3 + An updated ksh-compatible 'autoload'. + 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/dirstack + Directory stack functions. ./functions/exitstat @@ -100,18 +84,6 @@ 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). @@ -121,10 +93,6 @@ 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. @@ -133,18 +101,6 @@ ./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]]. @@ -164,47 +120,14 @@ ./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. @@ -237,10 +160,6 @@ 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. @@ -253,17 +172,6 @@ ./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 @@ -278,26 +186,18 @@ 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/fdflags.c + Display or modify file descriptor flags - ./loadables/getconf.c - POSIX.2 getconf utility. - - - ./loadables/getconf.h - Replacement definitions for ones the system doesn't provide. + ./loadables/finfo.c + Print file info. ./loadables/head.c @@ -323,10 +223,18 @@ ./loadables/Makefile.in Simple makefile for the sample loadable builtins. + + ./loadables/Makefile.inc.in + Sample makefile to use for loadable builtin development. + ./loadables/mkdir.c Make directories. + + ./loadables/mypid.c + Demonstrate how a loadable builtin can create and delete shell variables. + ./loadables/necho.c echo without options or argument interpretation. @@ -355,14 +263,26 @@ ./loadables/realpath.c Canonicalize pathnames, resolving symlinks. + + ./loadables/rm.c + Remove file. + ./loadables/rmdir.c Remove directory. + + ./loadables/setpgid.c + Set a child process's process group. + ./loadables/sleep.c sleep for fractions of a second. + + ./loadables/stat.c + Load an associative array with stat information about a file. + ./loadables/strftime.c Loadable builtin interface to strftime(3). @@ -430,217 +350,12 @@ ./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. @@ -650,65 +365,15 @@ ./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. @@ -718,37 +383,6 @@ ./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. @@ -789,36 +423,4 @@ - - ./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/INDEX.txt b/examples/INDEX.txt index db2858f..b47e211 100644 --- a/examples/INDEX.txt +++ b/examples/INDEX.txt @@ -9,43 +9,25 @@ Path Description X-Ref ./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/autoload.v4 An updated ksh-compatible 'autoload'. 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/dirstack Directory stack functions. ./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 @@ -53,28 +35,25 @@ Path Description X-Ref ./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/fdflags.c Display or modify file descriptor flags ./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/Makefile.inc.in Sample makefile to use for loadable builtin development. ./loadables/mkdir.c Make directories. +./loadables/mypid.c Demonstrate how a loadable builtin can create and delete shell variables. ./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. @@ -82,8 +61,11 @@ Path Description X-Ref ./loadables/push.c Anyone remember TOPS-20? ./loadables/README README ./loadables/realpath.c Canonicalize pathnames, resolving symlinks. +./loadables/rm.c Remove file. ./loadables/rmdir.c Remove directory. +./loadables/setpgid.c Set a child process's process group. ./loadables/sleep.c sleep for fractions of a second. +./loadables/stat.c Load an associative array with stat information about a file. ./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. @@ -101,82 +83,13 @@ Path Description X-Ref ./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). @@ -188,11 +101,3 @@ Path Description X-Ref ./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/bash-completion/README b/examples/bash-completion/README new file mode 100644 index 0000000..fb5e765 --- /dev/null +++ b/examples/bash-completion/README @@ -0,0 +1,7 @@ +Master source: https://github.com/scop/bash-completion + +This is the latest version of the bash-completion package, which provides +programmable completion specifications for a large number of commands. + +If you are a vendor installing bash or preparing a package containing bash, +please install the latest version of bash-completion when installing bash. diff --git a/examples/bash-completion/bash-completion-2.5.tar.xz b/examples/bash-completion/bash-completion-2.5.tar.xz new file mode 100644 index 0000000..f5b9079 Binary files /dev/null and b/examples/bash-completion/bash-completion-2.5.tar.xz differ diff --git a/examples/complete/cdfunc b/examples/complete/cdfunc new file mode 100644 index 0000000..439edaf --- /dev/null +++ b/examples/complete/cdfunc @@ -0,0 +1,76 @@ +# cdfunc - example completion function for cd +# +# based on the cd completion function from the bash_completion package +# +# Chet Ramey +# +# Copyright 2011 Chester Ramey +# +# 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. +# +# TThis 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. + +_comp_cd() +{ + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, with side effect of expanding tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=${CDPATH/#:/.:} + _cdpath=${_cdpath//::/:.:} + _cdpath=${_cdpath/%:/:.} + for i in ${_cdpath//:/$'\n'}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="${#COMPREPLY[@]}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=${j#$i/} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + # append slash to passed directory name that is the only completion. + # readline will not do this if we complete from CDPATH + if [[ ${#COMPREPLY[@]} -eq 1 ]]; then + i=${COMPREPLY[0]} # shorthand + if [[ "$cur" == "$i" ]] && [[ "$i" != "*/" ]]; then + COMPREPLY[0]+=/ + fi + fi + return 0 +} + +complete -o filenames -o nospace -o bashdefault -F _comp_cd cd diff --git a/examples/complete/complete-examples b/examples/complete/complete-examples index baa97e3..8a0746d 100644 --- a/examples/complete/complete-examples +++ b/examples/complete/complete-examples @@ -1,6 +1,23 @@ # # Completion examples # +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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. +# +# TThis 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. # # This encapsulates the default bash completion code diff --git a/examples/complete/complete.freebsd b/examples/complete/complete.freebsd deleted file mode 100644 index 7f6f4c2..0000000 --- a/examples/complete/complete.freebsd +++ /dev/null @@ -1,31 +0,0 @@ -#Date: Wed, 31 Jan 2001 12:53:56 -0800 -#From: Aaron Smith -#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 deleted file mode 100644 index c55b436..0000000 --- a/examples/complete/complete.gnu-longopt +++ /dev/null @@ -1,43 +0,0 @@ -# -# Originally from: -# -#Message-ID: <3B13EC65.179451AE@wanadoo.fr> -#Date: Tue, 29 May 2001 20:37:25 +0200 -#From: Manu Rouat -#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 deleted file mode 100644 index 2af9fc7..0000000 --- a/examples/complete/complete.ianmac +++ /dev/null @@ -1,433 +0,0 @@ -##### -#To: chet@po.cwru.edu, sarahmckenna@lucent.com -#Message-Id: -#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
' is the -# expected syntax. This allows one to do something like -# 'man 3 str' 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 deleted file mode 100644 index 6fb0a96..0000000 --- a/examples/complete/complete2.ianmac +++ /dev/null @@ -1,271 +0,0 @@ -##### -#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: -#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 index 97ed512..e6316c7 100644 --- a/examples/functions/array-stuff +++ b/examples/functions/array-stuff @@ -1,3 +1,22 @@ +# +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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. +# +# TThis 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. + # usage: reverse arrayname reverse() { diff --git a/examples/functions/arrayops.bash b/examples/functions/arrayops.bash new file mode 100644 index 0000000..d34353a --- /dev/null +++ b/examples/functions/arrayops.bash @@ -0,0 +1,146 @@ +# arrayops.bash --- hide some of the nasty syntax for manipulating bash arrays +# Author: Noah Friedman +# Created: 2016-07-08 +# Public domain + +# $Id: arrayops.bash,v 1.3 2016/07/28 15:38:55 friedman Exp $ + +# Commentary: + +# These functions try to tame the syntactic nightmare that is bash array +# syntax, which makes perl's almost look reasonable. +# +# For example the apush function below lets you write: +# +# apush arrayvar newval +# +# instead of +# +# ${arrayvar[${#arrayvar[@]}]}=newval +# +# Because seriously, you've got to be kidding me. + +# These functions avoid the use of local variables as much as possible +# (especially wherever modification occurs) because those variable names +# might shadow the array name passed in. Dynamic scope! + +# Code: + +#:docstring apush: +# Usage: apush arrayname val1 {val2 {...}} +# +# Appends VAL1 and any remaining arguments to the end of the array +# ARRAYNAME as new elements. +#:end docstring: +apush() +{ + eval "$1=(\"\${$1[@]}\" \"\${@:2}\")" +} + +#:docstring apop: +# Usage: apop arrayname {n} +# +# Removes the last element from ARRAYNAME. +# Optional argument N means remove the last N elements. +#:end docstring: +apop() +{ + eval "$1=(\"\${$1[@]:0:\${#$1[@]}-${2-1}}\")" +} + +#:docstring aunshift: +# Usage: aunshift arrayname val1 {val2 {...}} +# +# Prepends VAL1 and any remaining arguments to the beginning of the array +# ARRAYNAME as new elements. The new elements will appear in the same order +# as given to this function, rather than inserting them one at a time. +# +# For example: +# +# foo=(a b c) +# aunshift foo 1 2 3 +# => foo is now (1 2 3 a b c) +# but +# +# foo=(a b c) +# aunshift foo 1 +# aunshift foo 2 +# aunshift foo 3 +# => foo is now (3 2 1 a b c) +# +#:end docstring: +aunshift() +{ + eval "$1=(\"\${@:2}\" \"\${$1[@]}\")" +} + +#:docstring ashift: +# Usage: ashift arrayname {n} +# +# Removes the first element from ARRAYNAME. +# Optional argument N means remove the first N elements. +#:end docstring: +ashift() +{ + eval "$1=(\"\${$1[@]: -\${#$1[@]}+${2-1}}\")" +} + +#:docstring aset: +# Usage: aset arrayname idx newval +# +# Assigns ARRAYNAME[IDX]=NEWVAL +#:end docstring: +aset() +{ + eval "$1[\$2]=${@:3}" +} + +#:docstring aref: +# Usage: aref arrayname idx {idx2 {...}} +# +# Echoes the value of ARRAYNAME at index IDX to stdout. +# If more than one IDX is specified, each one is echoed. +# +# Unfortunately bash functions cannot return arbitrary values in the usual way. +#:end docstring: +aref() +{ + eval local "v=(\"\${$1[@]}\")" + local x + for x in ${@:2} ; do echo "${v[$x]}"; done +} + +#:docstring aref: +# Usage: alen arrayname +# +# Echoes the length of the number of elements in ARRAYNAME. +# +# It also returns number as a numeric value, but return values are limited +# by a maximum of 255 so don't rely on this unless you know your arrays are +# relatively small. +#:end docstring: +alen() +{ + eval echo "\${#$1[@]}" + eval return "\${#$1[@]}" +} + +#:docstring anreverse: +# Usage: anreverse arrayname +# +# Reverse the order of the elements in ARRAYNAME. +# The array variable is altered by this operation. +#:end docstring: +anreverse() +{ + eval set $1 "\"\${$1[@]}\"" + eval unset $1 + while [ $# -gt 1 ]; do + eval "$1=(\"$2\" \"\${$1[@]}\")" + set $1 "${@:3}" + done +} + +#provide arrayops + +# arrayops.bash ends here diff --git a/examples/functions/autoload b/examples/functions/autoload index a563a77..cb3a673 100644 --- a/examples/functions/autoload +++ b/examples/functions/autoload @@ -22,7 +22,7 @@ # # 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 +# containing 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. # diff --git a/examples/functions/autoload.v2 b/examples/functions/autoload.v2 index e8f3433..e29c695 100644 --- a/examples/functions/autoload.v2 +++ b/examples/functions/autoload.v2 @@ -29,7 +29,7 @@ _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 +# containing 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. # diff --git a/examples/functions/autoload.v4 b/examples/functions/autoload.v4 new file mode 100644 index 0000000..850c614 --- /dev/null +++ b/examples/functions/autoload.v4 @@ -0,0 +1,556 @@ +## -*- sh -*- + +# The psuedo-ksh autoloader. + +# How to use: +# o One function per file. +# o File and function name match exactly. +# o File is located in a directory that is in FPATH. +# o This script (autoload) must be sourced in as early as possible. This +# implies that any code in this script should NOT rely on any library of local +# or self-defined functions having already been loaded. +# o autoload must be called for each function before the function can be used. If +# autoloads are in directories where there are nothing but autoloads, then +# 'autoload /path/to/files/*' suffices (but see options -a and -f). +# o The call must be made in the current environment, not a subshell. +# o The command line suffices as "current environment". If you have autoload +# calls in a script, that script must be dotted into the process. + +# 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 +# The fourth cut came from Matthew Persico, matthew.persico@gmail.com 2017/August + +autoload_calc_shimsize () +{ + echo $((AUTOLOAD_SHIM_OVERHEAD + 3 * ${#1})) +} + +_autoload_split_fpath () +{ + (IFS=':'; set -- ${FPATH}; echo "$@") +} + +_aload() +{ + local opt OPTIND + local doexport=0 + local doreload=0 + local doverbose=0 + local doevalshim=0 + local loadthese + local optimize=0 + local loaded=0 + local exported=0 + local optimized=0 + local summary=0 + local dofpath=0 + while getopts xrvla:oyf opt; do + case $opt in + x) doexport=1;; + r) doreload=1;; + v) doverbose=1;; + l) doevalshim=1;; + a) loadthese=$(find $OPTARG -maxdepth 1 -type f -printf '%f ');; + o) optimize=1;; + y) summary=1;; + f) loadthese=$(find $(_autoload_split_fpath) -maxdepth 1 -type f -printf '%f ');; + *) echo "_aload: usage: _aload [-xrvlyf] [-a dir] [function ...]" >&2; return;; + esac + done + + shift $(($OPTIND-1)) + + [ -z "$loadthese" ] && loadthese="$@" + + local func + for func in $loadthese; do + local exists_fn + exists_fn=$(declare -F $func) + if [ -n "$exists_fn" ] && ((doreload==0)) && ((doevalshim==0)) + then + if ((doverbose)) + then + echo "autoload: function '$func' already exists" + fi + else + local andevaled='' + local andexported='' + local evalstat=0 + local doshim=1 + local funcfile + funcfile=$(_autoload_resolve $func) + if [[ $funcfile ]] ; then + ## The file was found for $func. Process it. + + if ((optimize)); then + ## For the first function loaded, we will not know + ## AUTOLOAD_SHIM_OVERHEAD. We can only calculate it after + ## we have loaded one function. + if [[ $AUTOLOAD_SHIM_OVERHEAD ]]; then + local size=$(wc -c $funcfile| sed 's/ .*//') + local shimsize=$(autoload_calc_shimsize $func) + if (( size <= shimsize)); then + doshim=0 + andevaled=', optimized' + ((optimized+=1)) + fi + fi + fi + + if ((doevalshim)); then + doshim=0 + andevaled=', evaled' + fi + + ## 'brand' as in branding a cow with a mark. We add a local + ## variable to each function we autoload so that we can tell + ## later on it is an autoloaded function without having to + ## maintain some bash array or hash that cannot be passed to + ## and used by subshells. + local brandtext + brandtext="eval \"\$(type $func | sed -e 1d -e 4ilocal\\ AUTOLOADED=\'$func\')\"" + if ((doshim)); then + ## Don't bother trying to save space by shoving all the + ## eval text below onto one unreadable line; new lines will + ## be added at your semicolons and any indentation below + ## seems to be ignored anyway if you export the function; + ## look at its BASH_FUNCTION representation. + eval $func '() + { + local IS_SHIM="$func" + local file=$(_autoload_resolve '$func') + if [[ $file ]] + then + . $file + '$brandtext' + '$func' "$@" + return $? + else + return 1; + fi + }' + else + . $funcfile + eval "$brandtext" + fi + evalstat=$? + if((evalstat==0)) + then + ((loaded+=1)) + ((doexport)) && export -f $func && andexported=', exported' && ((exported+=1)) + ((doverbose)) && echo "$func autoloaded${andexported}${andevaled}" + if [[ ! $AUTOLOAD_SHIM_OVERHEAD ]] && ((doshim)); then + ## ...we have just loaded the first function shim into + ## memory. Let's calc the AUTOLOAD_SHIM_OVERHEAD size + ## to use going forward. In theory, we could check + ## again here to see if we should optimize and source + ## in this function, now that we now the + ## AUTOLOAD_SHIM_OVERHEAD. In practice, it's not worth + ## duping that code or creating a function to do so for + ## one function. + AUTOLOAD_SHIM_OVERHEAD=$(type $func | grep -v -E "^$1 is a function" | sed "s/$func//g"| wc -c) + export AUTOLOAD_SHIM_OVERHEAD + fi + else + echo "$func failed to load" >&2 + fi + fi + fi + done + ((summary)) && echo "autoload: loaded:$loaded exported:$exported optimized:$optimized overhead:$AUTOLOAD_SHIM_OVERHEAD bytes" +} + +_autoload_dump() +{ + local opt OPTIND + local opt_p='' + local opt_s='' + while getopts ps opt + do + case $opt in + p ) opt_p=1;; + s ) opt_s=1;; + esac + done + + shift $(($OPTIND-1)) + + local exported='' + local executed='' + local func + for func in $(declare | grep -E 'local\\{0,1} AUTOLOADED' | sed -e "s/.*AUTOLOADED=//" -e 's/\\//g' -e 's/[");]//g' -e "s/'//g") + do + if [ -n "$opt_p" ]; then echo -n "autoload "; fi + if [ -n "$opt_s" ] + then + exported=$(declare -F | grep -E "${func}$" | sed 's/declare -f\(x\{0,1\}\).*/\1/') + [ "$exported" = 'x' ] && exported=' exported' || exported=' not exported' + executed=$(type $func | grep 'local IS_SHIM') + [ -z "$executed" ] && executed=' executed' || executed=' not executed' + fi + echo "${func}${exported}${executed}" + done +} + +_autoload_resolve() +{ + if [[ ! "$FPATH" ]]; then + echo "autoload: FPATH not set or null" >&2 + return + fi + + local p # for 'path'. The $() commands in the for loop split the FPATH + # string into its constituents so that each one may be processed. + + for p in $( _autoload_split_fpath ); do + p=${p:-.} + if [ -f $p/$1 ]; then echo $p/$1; return; fi + done + + echo "autoload: $1: function source file not found" >&2 +} + +_autoload_edit() +{ + [ -z "$EDITOR" ] && echo "Error: no EDITOR defined" && return 1 + local toedit + local func + for func in "$@" + do + local file=$(_autoload_resolve $func) + if [[ $file ]] + then + toedit="$toedit $file" + else + echo "$funcname not found in FPATH funcfile. Skipping." + fi + done + + [ -z "$toedit" ] && return 1 + + local timemarker=$(mktemp) + + $EDITOR $toedit + + local i + for i in $toedit + do + if [ $i -nt $timemarker ] + then + local f=$(basename $i) + echo Reloading $f + autoload -r $f + fi + done +} + +_autoload_page() +{ + [ -z "$PAGER" ] && echo "Error: no PAGER defined" && return 1 + local topage + local func + for func in "$@" + do + local file=$(_autoload_resolve $func) + if [[ $file ]] + then + topage="$topage $file" + else + echo "$funcname not found in FPATH funcfile. Skipping." + fi + done + + [ -z "$topage" ] && return 1 + + $PAGER $topage +} + +_autoload_remove() +{ + unset -f "$@" +} + +_autoload_help() +{ + cat <&2; return;; + esac + done + + shift $(($OPTIND-1)) + if [ -n "$dumpopt" ] + then + _autoload_dump $dumpopt + else + _aload $passthru "$@" + fi +} + +autoreload () +{ + autoload -r "$@" +} + +## When we source in autoload, we export (but NOT autoload) the autoload +## functions so that they are available in subshells and you don't have to +## source in the autoload file in subshells. +export -f _aload \ + _autoload_dump \ + _autoload_edit \ + _autoload_help \ + _autoload_page \ + _autoload_resolve \ + _autoload_split_fpath \ + autoload \ + autoload_calc_shimsize \ + autoreload diff --git a/examples/functions/autoload.v4.t b/examples/functions/autoload.v4.t new file mode 100644 index 0000000..6d35d14 --- /dev/null +++ b/examples/functions/autoload.v4.t @@ -0,0 +1,184 @@ +#!/bin/bash + +workdir=$(mktemp -d) + +cp autoload $workdir + +cd $workdir +pwd + +. ./autoload + +funclist='ALTEST_func1 ALTEST_funcexport ALTEST_funcu' +for funcname in $funclist; do + cat < $funcname +$funcname () +{ +echo this is $funcname + +} +EOFFUNC + +done + +export FPATH=$workdir + +autoload ALTEST_func1 ALTEST_funcu +autoload -x ALTEST_funcexport + +ok=0 +failed=0 + +for funcname in $funclist; do + + testname="$funcname loaded" + got=$(type $funcname 2>&1) + if [[ $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname" + ((failed+=1)) + else + echo "ok - $testname" + ((ok+=1)) + + testname="$funcname is a shim" + if [[ ! $got =~ "IS_SHIM" ]]; then + echo "## Failed $testname" + ((failed+=1)) + else + echo "ok - $testname" + ((ok+=1)) + + testname="$funcname shim executed" + $funcname > /dev/null + got=$(type $funcname 2>&1) + if [[ $got =~ "IS_SHIM" ]]; then + echo "## Failed $testname" + ((failed+=1)) + else + echo "ok - $testname" + ((ok+=1)) + fi + fi + fi +done + +funcname=ALTEST_func1 +testname="$funcname shim reloaded" +autoload -r $funcname +got=$(type $funcname 2>&1) +if [[ ! $got =~ "IS_SHIM" ]]; then + echo "## Failed $testname" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +funcname=ALTEST_funcu +testname="$funcname shim unloaded" +autoload -u $funcname +got=$(type $funcname 2>&1) +if [[ ! $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +testname="autoload -p" +got=$(autoload -p | grep ALTEST) +if [[ ! $got =~ "autoload ALTEST_func1" ]] || \ + [[ ! $got =~ "autoload ALTEST_funcexport" ]] ; then +echo "## Failed $testname" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +testname="autoload -s" +echo "Executing $testname, could take a long time..." +got=$(autoload -s | grep ALTEST) +if [[ ! $got =~ "ALTEST_func1 not exported not executed" ]] || \ + [[ ! $got =~ "ALTEST_funcexport exported executed" ]] ; then + echo "## Failed $testname" + echo "## got: $got" + ((failed+=1)) +else + echo "ok - $testname" + ((ok+=1)) +fi + +testname="autoload -r -a $FPATH" +autoload -r -a $FPATH +localfailed=0 +localok=0 +for funcname in $funclist; do + got=$(type $funcname 2>&1) + if [[ $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname - $funcname" + ((localfailed+=1)) + else + ((localok+=1)) + if [[ ! $got =~ "IS_SHIM" ]]; then + ((localfailed+=1)) + else + ((localok+=1)) + fi + fi +done +if ((localfailed==0)); then + echo "ok - $testname" + ((ok+=1)) +else + ((failed+=1)) +fi + +testname="autoload -u $funclist" +autoload -u $funclist +localfailed=0 +localok=0 +for funcname in $funclist; do + got=$(type $funcname 2>&1) + if [[ ! $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname - $funcname" + ((localfailed+=1)) + else + ((localok+=1)) + fi +done +if ((localfailed==0)); then + echo "ok - $testname" + ((ok+=1)) +else + ((failed+=1)) +fi + +testname="autoload -r -f" +autoload -r -f +localfailed=0 +localok=0 +for funcname in $funclist; do + got=$(type $funcname 2>&1) + if [[ $got =~ "$funcname: not found" ]]; then + echo "## Failed $testname - $funcname" + ((localfailed+=1)) + else + ((localok+=1)) + if [[ ! $got =~ "IS_SHIM" ]]; then + ((localfailed+=1)) + else + ((localok+=1)) + fi + fi +done +if ((localfailed==0)); then + echo "ok - $testname" + ((ok+=1)) +else + ((failed+=1)) +fi + +echo $ok passed, $failed failed +exit $failed diff --git a/examples/functions/basename2 b/examples/functions/basename2 deleted file mode 100644 index a42231c..0000000 --- a/examples/functions/basename2 +++ /dev/null @@ -1,43 +0,0 @@ -#From: "Grigoriy Strokin" -#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 deleted file mode 100644 index 61dc8d7..0000000 --- a/examples/functions/coproc.bash +++ /dev/null @@ -1,108 +0,0 @@ -# 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 deleted file mode 100644 index 9675cda..0000000 --- a/examples/functions/coshell.README +++ /dev/null @@ -1,53 +0,0 @@ -Date: Fri, 21 Sep 2001 14:50:29 -0400 -From: "Jason M. Felice" -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 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 <&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 index b8dcf8f..6671ca8 100644 --- a/examples/functions/csh-compat +++ b/examples/functions/csh-compat @@ -1,4 +1,4 @@ -# C-shell compatabilty package. +# C-shell compatibility package. # setenv VAR VALUE function setenv () { diff --git a/examples/functions/dirfuncs b/examples/functions/dirfuncs deleted file mode 100644 index 3958bbe..0000000 --- a/examples/functions/dirfuncs +++ /dev/null @@ -1,142 +0,0 @@ -# -# 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/dirstack b/examples/functions/dirstack new file mode 100644 index 0000000..d68e619 --- /dev/null +++ b/examples/functions/dirstack @@ -0,0 +1,160 @@ +#!/bin/bash +# @(#) dirstack + +### +# Another implementation of the directory manipulation functions +# published in the Bolsky & Korn book : "The new Korn shell" : +# cd, to change current directory +# d, to display the stack content +# Eric Sanchis (eric.sanchis@iut-rodez.fr), 2012 +# +# 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 . +# +### + + +shopt -s expand_aliases +shopt -s extglob +shopt -s cdable_vars + +alias integer='declare -i' + +integer MAX=32 +integer INDMAX=MAX-1 +integer INDTOP=0 + +unalias cd 2>/dev/null +alias cd=cdir + +unset tab +tab[INDTOP]="$(pwd)" + + +function cdir +{ + local -i ind + local dir + +dir="${1:-$HOME}" +case "$dir" in + - ) # cd - => equivalent to : cd -1 + ind=INDTOP-1 + cd_by_number $ind + ;; + -+([[:digit:]]) ) # cd -n + ind=$INDTOP-${dir#-} + cd_by_number $ind + ;; + *) # cd ~ or cd dir_name + cd_by_name "$dir" +esac +} + + +function cd_by_number +{ + local -i k=$1 + local -i j + local dirtmp + +if (( k < 0 )) + then + echo Impossible to change directory >&2 + return 1 + else + dirtmp="${tab[k]}" + j=k+1 + while (( j <= INDTOP )) + do + tab[j-1]="${tab[j]}" + j=j+1 + done + tab[INDTOP]="$dirtmp" + \cd "${tab[INDTOP]}" +fi +} + + +function cd_by_name +{ + local -i i + local rep + +rep=$( \cd "$1" &>/dev/null && pwd) +if [[ -z "$rep" ]] + then + echo cd : "$1" unknown >&2 + return 1 +fi + + i=$INDTOP + while (( i >= 0 )) + do + if [[ "${tab[i]}" == "$rep" ]] + then break + fi + i=i-1 + done + +if (( i == INDTOP )) + then # cd -0 => we do nothing ! + return 0 + elif (( i == -1 )) + then # the directory isn't in the stack + if (( INDTOP == INDMAX )) + then # the stack is FULL + # the oldest directory is removed + local -i m + + m=1 + while (( m <= INDMAX )) + do + tab[m-1]="${tab[m]}" + m=m+1 + done + else # the new directory is added to the top of the stack + INDTOP=INDTOP+1 + fi + tab[INDTOP]="$rep" + \cd "${tab[INDTOP]}" + return 0 + + else # the directory is already in the stack + # $i gives its index + cd_by_number $i +fi +} + + +function d # display the directory stack +{ + local -i i + local rep + +i=0 +while (( $i <= $INDTOP )) + do + rep="${tab[INDTOP-i]#$HOME/}" + case "$rep" in + $HOME) rep="~" ;; + /* ) : ;; + * ) rep="~/$rep" + esac + + echo "$i ) $rep" + i=i+1 + done +} + + diff --git a/examples/functions/emptydir b/examples/functions/emptydir deleted file mode 100644 index 412af5b..0000000 --- a/examples/functions/emptydir +++ /dev/null @@ -1,28 +0,0 @@ -#! /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/fstty b/examples/functions/fstty index a770d84..5ed594f 100644 --- a/examples/functions/fstty +++ b/examples/functions/fstty @@ -2,6 +2,24 @@ # 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 # +# +# Chet Ramey +# +# Copyright 2011 Chester Ramey +# +# 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. +# +# TThis 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. # # Convert between the stty ^H control character form and the readline \C-H diff --git a/examples/functions/func b/examples/functions/func index 710f643..e7696f7 100644 --- a/examples/functions/func +++ b/examples/functions/func @@ -3,8 +3,24 @@ # # usage: func name [name ...] # -# Chet Ramey -# chet@ins.CWRU.Edu +# Chet Ramey +# +# Copyright 1991 Chester Ramey +# +# 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. +# +# TThis 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. + func() { local status=0 diff --git a/examples/functions/gethtml b/examples/functions/gethtml deleted file mode 100644 index 2eec1d8..0000000 --- a/examples/functions/gethtml +++ /dev/null @@ -1,35 +0,0 @@ -# -# get_html -- get a web page from a remote server -# -# Original Author: Jeff Korn -# Modified for bash by Chet Ramey -# -# 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 deleted file mode 100644 index d402c7d..0000000 --- a/examples/functions/getoptx.bash +++ /dev/null @@ -1,301 +0,0 @@ -#From: "Grigoriy Strokin" -#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" ( 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 index f3e228f..9e72613 100644 --- a/examples/functions/inetaddr +++ b/examples/functions/inetaddr @@ -1,3 +1,22 @@ +# +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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. +# +# TThis 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. + # # inet2hex - Internet address conversion, dotted-decimal to hex # diff --git a/examples/functions/isnum.bash b/examples/functions/isnum.bash deleted file mode 100644 index b733965..0000000 --- a/examples/functions/isnum.bash +++ /dev/null @@ -1,52 +0,0 @@ -#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 index e2e7a5f..b21974d 100644 --- a/examples/functions/isnum2 +++ b/examples/functions/isnum2 @@ -1,7 +1,26 @@ +# +# Chet Ramey +# +# Copyright 1998 Chester Ramey +# +# 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. +# +# TThis 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. + isnum2() { case "$1" in - '[-+]' | '') return 1;; # empty or bare `-' or `+' + [-+] | '') return 1;; # empty or bare `-' or `+' [-+]*[!0-9]*) return 1;; # non-digit with leading sign [-+]*) return 0;; # OK *[!0-9]*) return 1;; # non-digit diff --git a/examples/functions/jdate.bash b/examples/functions/jdate.bash deleted file mode 100644 index 9488ed9..0000000 --- a/examples/functions/jdate.bash +++ /dev/null @@ -1,78 +0,0 @@ -#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 deleted file mode 100644 index 212c9ce..0000000 --- a/examples/functions/jj.bash +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 4433b35..0000000 --- a/examples/functions/keep +++ /dev/null @@ -1,62 +0,0 @@ -# From: Seth Chaiklin -# 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 index 801a490..26b00a9 100644 --- a/examples/functions/ksh-cd +++ b/examples/functions/ksh-cd @@ -1,3 +1,22 @@ +# +# Chet Ramey +# +# Copyright 2001 Chester Ramey +# +# 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. +# +# TThis 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. + # # ksh-like `cd': cd [-LP] [dir [change]] # diff --git a/examples/functions/ksh-compat-test b/examples/functions/ksh-compat-test index feee965..919d82b 100644 --- a/examples/functions/ksh-compat-test +++ b/examples/functions/ksh-compat-test @@ -1,4 +1,22 @@ # +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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. +# +# TThis 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. +# # replacements for test/[ that do arithmetic expansion on the operands to # the arithmetic operators, like ksh. # diff --git a/examples/functions/kshenv b/examples/functions/kshenv index 7594f2d..9faba08 100644 --- a/examples/functions/kshenv +++ b/examples/functions/kshenv @@ -5,6 +5,24 @@ # Chet Ramey # chet@ins.CWRU.Edu # + +# +# Copyright 2002 Chester Ramey +# +# 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. +# +# TThis 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. + # # These are definitions for the ksh compiled-in `exported aliases'. There # are others, but we already have substitutes for them: "history", "type", diff --git a/examples/functions/lowercase b/examples/functions/lowercase deleted file mode 100644 index 3cf6bde..0000000 --- a/examples/functions/lowercase +++ /dev/null @@ -1,27 +0,0 @@ -#! /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 deleted file mode 100644 index 60f9aed..0000000 --- a/examples/functions/manpage +++ /dev/null @@ -1,129 +0,0 @@ -# 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 deleted file mode 100644 index 3c0c743..0000000 --- a/examples/functions/mhfold +++ /dev/null @@ -1,16 +0,0 @@ -# To: chet@ins.CWRU.Edu -# Subject: Bash functions -# From: Sandeep Mehta - -# 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 index dafbac5..ed4377c 100644 --- a/examples/functions/notify.bash +++ b/examples/functions/notify.bash @@ -1,3 +1,22 @@ +# +# Chet Ramey +# +# Copyright 1992 Chester Ramey +# +# 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. +# +# TThis 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. + trap _notify CHLD NOTIFY_ALL=false unset NOTIFY_LIST diff --git a/examples/functions/pathfuncs b/examples/functions/pathfuncs deleted file mode 100644 index 56fdca3..0000000 --- a/examples/functions/pathfuncs +++ /dev/null @@ -1,45 +0,0 @@ -#From: "Simon J. Gerraty" -#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 - -# @(#)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 deleted file mode 100644 index f69cd50..0000000 --- a/examples/functions/recurse +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -#From: kaz@ashi.footprints.net (Kaz Kylheku) -#Newsgroups: comp.os.linux.misc -#Subject: Re: bash question: subdirectories -#Message-ID: -#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 deleted file mode 100644 index 2e2dc7a..0000000 --- a/examples/functions/repeat2 +++ /dev/null @@ -1,43 +0,0 @@ -# To: chet@ins.CWRU.Edu -# Subject: Bash functions -# From: Sandeep Mehta - -########################################## -# -# repeat - clone of C shell builtin `repeat' -# -# usage: repeat -# -# It has been tested inside other functions and in conditionals like -# if [ "`repeat `" ]; then COMMANDS [ else COMMANDS ] fi -# Please send me fixes/enhancements. -# -# Sandeep Mehta -########################################## -repeat() -{ - local rcount=$1 - - if [ $# -le 1 ] || [ -z "$rcount" ]; then - echo "usage: repeat " 1>&2 - return 2 - fi - - shift - - local acmd=("$@") - - if [ $rcount -le 0 ]; then - echo "count must be greater than 0" - echo "usage: repeat " 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 deleted file mode 100644 index 65048bf..0000000 --- a/examples/functions/repeat3 +++ /dev/null @@ -1,12 +0,0 @@ -# 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 index 87c8a2c..c1953ee 100644 --- a/examples/functions/seq +++ b/examples/functions/seq @@ -1,3 +1,22 @@ +# +# Chet Ramey +# +# Copyright 1995 Chester Ramey +# +# 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. +# +# TThis 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. + # Generate a sequence from m to n, m defaults to 1. seq () diff --git a/examples/functions/seq2 b/examples/functions/seq2 index c3ad95c..4a54498 100644 --- a/examples/functions/seq2 +++ b/examples/functions/seq2 @@ -1,3 +1,22 @@ +# +# Chet Ramey +# +# Copyright 1998 Chester Ramey +# +# 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. +# +# TThis 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. + # Generate a sequence from m to n, m defaults to 1. seq () diff --git a/examples/functions/shcat b/examples/functions/shcat index c5d3d63..84f0391 100644 --- a/examples/functions/shcat +++ b/examples/functions/shcat @@ -1,6 +1,6 @@ shcat() { - while read -r line + while IFS= read -r line do echo "$line" done diff --git a/examples/functions/shcat2 b/examples/functions/shcat2 index 6fe90f4..8ceff33 100644 --- a/examples/functions/shcat2 +++ b/examples/functions/shcat2 @@ -1,8 +1,8 @@ shcat() { - while read -r line + while read -r do - echo "$line" + echo "$REPLY" done } diff --git a/examples/functions/sort-pos-params b/examples/functions/sort-pos-params index 0052b46..95acd85 100644 --- a/examples/functions/sort-pos-params +++ b/examples/functions/sort-pos-params @@ -1,4 +1,23 @@ -# Sort the positional paramters. +# +# Chet Ramey +# +# Copyright 2001 Chester Ramey +# +# 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. +# +# TThis 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. + +# Sort the positional parameters. # Make sure the positional parameters are passed as arguments to the function. # If -u is the first arg, remove duplicate array members. sort_posparams() diff --git a/examples/functions/substr b/examples/functions/substr index a80b3b4..f19f5d7 100644 --- a/examples/functions/substr +++ b/examples/functions/substr @@ -1,4 +1,22 @@ # +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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. +# +# TThis 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. +# # substr -- a function to emulate the ancient ksh builtin # diff --git a/examples/functions/substr2 b/examples/functions/substr2 index 2bb8d36..fc21b98 100644 --- a/examples/functions/substr2 +++ b/examples/functions/substr2 @@ -1,4 +1,22 @@ # +# Chet Ramey +# +# Copyright 2002 Chester Ramey +# +# 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. +# +# TThis 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. +# # substr -- a function to emulate the ancient ksh builtin # @@ -29,7 +47,7 @@ substr() done if [ "$OPTIND" -gt 1 ] ; then - shift $[ $OPTIND -1 ] + shift $(( $OPTIND -1 )) fi if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then diff --git a/examples/functions/term b/examples/functions/term deleted file mode 100644 index fbe99f1..0000000 --- a/examples/functions/term +++ /dev/null @@ -1,35 +0,0 @@ -# -# 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 index 56c5a58..570c585 100644 --- a/examples/functions/whatis +++ b/examples/functions/whatis @@ -9,6 +9,25 @@ # case, the value is printed in a form which would yield the same value # if typed as input to the shell itself. # +# +# Chet Ramey +# +# Copyright 1994 Chester Ramey +# +# 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. +# +# TThis 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. + whatis() { diff --git a/examples/functions/whence b/examples/functions/whence index 70b2322..ba27b00 100644 --- a/examples/functions/whence +++ b/examples/functions/whence @@ -8,6 +8,25 @@ # Chet Ramey # chet@ins.CWRU.Edu # +# +# Chet Ramey +# +# Copyright 1994 Chester Ramey +# +# 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. +# +# TThis 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. + whence() { local vflag= path= diff --git a/examples/functions/which b/examples/functions/which index ca33703..f0db290 100644 --- a/examples/functions/which +++ b/examples/functions/which @@ -3,6 +3,24 @@ # # usage: which [-as] command [command...] # +# +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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. +# +# TThis 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. which() { diff --git a/examples/functions/xalias.bash b/examples/functions/xalias.bash deleted file mode 100644 index 88a00dc..0000000 --- a/examples/functions/xalias.bash +++ /dev/null @@ -1,22 +0,0 @@ -# xalias - convert csh alias commands to bash functions -# from Mohit Aron -# 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 deleted file mode 100644 index 6d29038..0000000 --- a/examples/functions/xfind.bash +++ /dev/null @@ -1,52 +0,0 @@ -#! /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 index 343beb0..956f018 100644 --- a/examples/loadables/Makefile.in +++ b/examples/loadables/Makefile.in @@ -1,7 +1,7 @@ # # Simple makefile for the sample loadable builtins # -# Copyright (C) 1996-2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2022 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 @@ -17,6 +17,9 @@ # along with this program. If not, see . # +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + # Include some boilerplate Gnu makefile definitions. prefix = @prefix@ @@ -28,10 +31,22 @@ includedir = @includedir@ datarootdir = @datarootdir@ +loadablesdir = @loadablesdir@ +headersdir = @headersdir@ + topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ + +# Support an alternate destination root directory for package building +DESTDIR = + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALLMODE= -m 0755 @SET_MAKE@ CC = @CC@ @@ -43,6 +58,7 @@ host_os = @host_os@ host_cpu = @host_cpu@ host_vendor = @host_vendor@ +STYLE_CFLAGS = @STYLE_CFLAGS@ CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ DEFS = @DEFS@ @@ -52,6 +68,8 @@ CPPFLAGS = @CPPFLAGS@ BASHINCDIR = ${topdir}/include +SUPPORT_SRC = $(topdir)/support/ + LIBBUILD = ${BUILD_DIR}/lib INTL_LIBSRC = ${topdir}/lib/intl @@ -59,7 +77,7 @@ INTL_BUILDDIR = ${LIBBUILD}/intl INTL_INC = @INTL_INC@ LIBINTL_H = @LIBINTL_H@ -CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS) +CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(STYLE_CFLAGS) # # These values are generated for configure by ${topdir}/support/shobj-conf. @@ -75,7 +93,7 @@ SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ SHOBJ_LIBS = @SHOBJ_LIBS@ SHOBJ_STATUS = @SHOBJ_STATUS@ -INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \ +INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins -I${srcdir} \ -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \ -I$(BUILD_DIR)/builtins $(INTL_INC) @@ -83,10 +101,11 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \ $(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 +ALLPROG = print truefalse sleep finfo logname basename dirname fdflags \ + tty pathchk tee head mkdir rmdir mkfifo mktemp printenv id whoami \ + uname sync push ln unlink realpath strftime mypid setpgid seq rm \ + accept csv dsv cut stat getconf +OTHERPROG = necho hello cat pushd asort all: $(SHOBJ_STATUS) @@ -98,7 +117,7 @@ unsupported: @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 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." @@ -110,15 +129,15 @@ print: print.o 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) +accept: accept.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ accept.o $(SHOBJ_LIBS) + sleep: sleep.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS) @@ -128,6 +147,15 @@ finfo: finfo.o cat: cat.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS) +rm: rm.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rm.o $(SHOBJ_LIBS) + +fdflags: fdflags.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ fdflags.o $(SHOBJ_LIBS) + +seq: seq.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ seq.o $(SHOBJ_LIBS) + logname: logname.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ_LIBS) @@ -152,12 +180,21 @@ mkdir: mkdir.o rmdir: rmdir.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rmdir.o $(SHOBJ_LIBS) +mkfifo: mkfifo.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkfifo.o $(SHOBJ_LIBS) + +mktemp: mktemp.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mktemp.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) +getconf: getconf.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS) + id: id.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ id.o $(SHOBJ_LIBS) @@ -179,18 +216,33 @@ ln: ln.o 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) +csv: csv.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ csv.o $(SHOBJ_LIBS) + +dsv: dsv.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dsv.o $(SHOBJ_LIBS) + +cut: cut.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.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) +setpgid: setpgid.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ setpgid.o $(SHOBJ_LIBS) + +stat: stat.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ stat.o $(SHOBJ_LIBS) + +asort: asort.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ asort.o $(SHOBJ_LIBS) + # pushd is a special case. We use the same source that the builtin version # uses, with special compilation options. # @@ -200,7 +252,7 @@ pushd.c: ${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 $@ $< + $(SHOBJ_CC) -Wno-format-security -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) @@ -213,13 +265,45 @@ mostlyclean: clean -( cd perl && ${MAKE} ${MFLAGS} $@ ) distclean maintainer-clean: clean - $(RM) Makefile pushd.c + $(RM) Makefile Makefile.inc Makefile.sample pushd.c -( cd perl && ${MAKE} ${MFLAGS} $@ ) +installdirs: + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(loadablesdir) + +install-dev: installdirs + @$(INSTALL_DATA) Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.inc + @$(INSTALL_DATA) Makefile.sample $(DESTDIR)$(loadablesdir)/Makefile.sample + @$(INSTALL_DATA) $(srcdir)/loadables.h $(DESTDIR)$(loadablesdir)/loadables.h + @( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" install-headers) + +install-supported: all installdirs install-dev + @echo installing example loadable builtins in $(DESTDIR)${loadablesdir} + @for prog in ${ALLPROG}; do \ + echo $$prog ; \ + $(INSTALL_PROGRAM) $(INSTALLMODE) $$prog $(DESTDIR)$(loadablesdir)/$$prog ;\ + done + +uninstall-dev: + -$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.sample + -$(RM) $(DESTDIR)$(loadablesdir)/loadables.h + -( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" uninstall-headers) + +uninstall-supported: uninstall-dev + -( cd $(DESTDIR)${loadablesdir} && $(RM) ${ALLPROG} ) + +install-unsupported: +uninstall-unsupported: + +install: install-$(SHOBJ_STATUS) +uninstall: uninstall-$(SHOBJ_STATUS) + print.o: print.c truefalse.o: truefalse.c +accept.o: accept.c sleep.o: sleep.c finfo.o: finfo.c +getconf.o: getconf.c getconf.h logname.o: logname.c basename.o: basename.c dirname.o: dirname.c @@ -229,9 +313,11 @@ 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 +csv.o: csv.c +dsv.o: dsv.c +cut.o: cut.c printenv.o: printenv.c id.o: id.c whoami.o: whoami.c @@ -239,6 +325,11 @@ uname.o: uname.c sync.o: sync.c push.o: push.c mkdir.o: mkdir.c +mktemp.o: mktemp.c realpath.o: realpath.c strftime.o: strftime.c -mypid.o: mypid.c +setpgid.o: setpgid.c +stat.o: stat.c +fdflags.o: fdflags.c +seq.o: seq.c +asort.o: asort.c diff --git a/examples/loadables/Makefile.inc.in b/examples/loadables/Makefile.inc.in new file mode 100644 index 0000000..ee3c303 --- /dev/null +++ b/examples/loadables/Makefile.inc.in @@ -0,0 +1,101 @@ +# +# Sample makefile for bash loadable builtin development +# +# Copyright (C) 2015-2022 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 . +# + +PACKAGE = @PACKAGE_NAME@ +VERSION = @PACKAGE_VERSION@ + +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + +# Include some boilerplate Gnu makefile definitions. +prefix = @prefix@ + +exec_prefix = @exec_prefix@ +bindir = @bindir@ +libdir = @libdir@ +infodir = @infodir@ +includedir = @includedir@ + +datarootdir = @datarootdir@ + +loadablesdir = @loadablesdir@ +headersdir = @headersdir@ + +topdir = @top_srcdir@ +BUILD_DIR = @BUILD_DIR@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +# Support an alternate destination root directory for package building +DESTDIR = + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALLMODE= -m 0755 + +@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 + +SUPPORT_SRC = $(topdir)/support/ + +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$(headersdir) -I$(headersdir)/include -I$(headersdir)/builtins + +.c.o: + $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< diff --git a/examples/loadables/Makefile.sample.in b/examples/loadables/Makefile.sample.in new file mode 100644 index 0000000..fe9b06a --- /dev/null +++ b/examples/loadables/Makefile.sample.in @@ -0,0 +1,44 @@ +# +# Sample makefile for bash loadable builtin development +# +# Copyright (C) 2022 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 . +# + +# these should match the ones in Makefile.in (for the make install target) + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = @libdir@ + +# ${loadablesdir} is where the example loadable builtins and data files +# are installed (make install target in Makefile.in) + +loadablesdir = @loadablesdir@ +DESTDIR = + +# include Makefile.inc for all boilerplate definitions + +include $(DESTDIR)$(loadablesdir)/Makefile.inc + +# here, `example' is the name of the shared object +# replace `example' with the appropriate filename + +all: example + +example: example.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS) + +example.o: example.c diff --git a/examples/loadables/README b/examples/loadables/README index d29b43a..c729a6a 100644 --- a/examples/loadables/README +++ b/examples/loadables/README @@ -1,11 +1,13 @@ 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 +execution time is dominated by process startup time. Some 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. +see, csv, which allows you to manipulate data from comma-separated +values files, fdflags, which lets you change the flags associated +with one of the shell's file descriptors, 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. @@ -32,29 +34,43 @@ 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. +The file "Makefile.inc" is created using the same values that configure +writes into Makefile.in, and is installed in the same directory as the +rest of the example builtins. It's intended to be a start at something +that can be modified or included to help you build your own loadables +without having to search for the right CFLAGS and LDFLAGS. + 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. +csv.c Process a line of csv data and store it in an indexed array. +cut.c Cut out selected portions of each line of a file. dirname.c Return directory portion of pathname. +fdflags.c Change the flag associated with one of bash's open file descriptors. 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. +loadables.h File loadable builtins can include for shell definitions. logname.c Print login name of current user. Makefile.in Simple makefile for the sample loadable builtins. +Makefile.inc.in Sample makefile to use for loadable builtin development. mkdir.c Make directories. +mkfifo.c Create named pipes. +mktemp.c Make unique temporary file name. +mypid.c Add $MYPID variable, demonstrate use of unload hook function. 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. +rm.c Remove files and directories. rmdir.c Remove directory. +seq.c Print a sequence of decimal or floating point numbers. +setpgid.c Set a process's pgrp; example of how to wrap a system call. sleep.c sleep for fractions of a second. +stat.c populate an associative array with information about a file 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. diff --git a/examples/loadables/accept.c b/examples/loadables/accept.c new file mode 100644 index 0000000..ff98423 --- /dev/null +++ b/examples/loadables/accept.c @@ -0,0 +1,245 @@ +/* accept - listen for and accept a remote network connection on a given port */ + +/* + Copyright (C) 2020 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 . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include +#include +#include "bashtypes.h" +#include +#include +#include +#include "typemax.h" + +#include +#include +#include + +#include "loadables.h" + +static int accept_bind_variable (char *, int); + +int +accept_builtin (list) + WORD_LIST *list; +{ + SHELL_VAR *v; + intmax_t iport; + int opt; + char *tmoutarg, *fdvar, *rhostvar, *rhost, *bindaddr; + unsigned short uport; + int servsock, clisock; + struct sockaddr_in server, client; + socklen_t clientlen; + struct timeval timeval; + struct linger linger = { 0, 0 }; + + rhostvar = tmoutarg = fdvar = rhost = bindaddr = (char *)NULL; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "b:r:t:v:")) != -1) + { + switch (opt) + { + case 'b': + bindaddr = list_optarg; + break; + case 'r': + rhostvar = list_optarg; + break; + case 't': + tmoutarg = list_optarg; + break; + case 'v': + fdvar = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + list = loptend; + + /* Validate input and variables */ + if (tmoutarg) + { + long ival, uval; + opt = uconvert (tmoutarg, &ival, &uval, (char **)0); + if (opt == 0 || ival < 0 || uval < 0) + { + builtin_error ("%s: invalid timeout specification", tmoutarg); + return (EXECUTION_FAILURE); + } + timeval.tv_sec = ival; + timeval.tv_usec = uval; + /* XXX - should we warn if ival == uval == 0 ? */ + } + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + if (legal_number (list->word->word, &iport) == 0 || iport < 0 || iport > TYPE_MAXIMUM (unsigned short)) + { + builtin_error ("%s: invalid port number", list->word->word); + return (EXECUTION_FAILURE); + } + uport = (unsigned short)iport; + + if (fdvar == 0) + fdvar = "ACCEPT_FD"; + + unbind_variable (fdvar); + if (rhostvar) + unbind_variable (rhostvar); + + if ((servsock = socket (AF_INET, SOCK_STREAM, IPPROTO_IP)) < 0) + { + builtin_error ("cannot create socket: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + + memset ((char *)&server, 0, sizeof (server)); + server.sin_family = AF_INET; + server.sin_port = htons(uport); + server.sin_addr.s_addr = bindaddr ? inet_addr (bindaddr) : htonl(INADDR_ANY); + + if (server.sin_addr.s_addr == INADDR_NONE) + { + builtin_error ("invalid address: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + + opt = 1; + setsockopt (servsock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof (opt)); + setsockopt (servsock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof (linger)); + + if (bind (servsock, (struct sockaddr *)&server, sizeof (server)) < 0) + { + builtin_error ("socket bind failure: %s", strerror (errno)); + close (servsock); + return (EXECUTION_FAILURE); + } + + if (listen (servsock, 1) < 0) + { + builtin_error ("listen failure: %s", strerror (errno)); + close (servsock); + return (EXECUTION_FAILURE); + } + + if (tmoutarg) + { + fd_set iofds; + + FD_ZERO(&iofds); + FD_SET(servsock, &iofds); + + opt = select (servsock+1, &iofds, 0, 0, &timeval); + if (opt < 0) + builtin_error ("select failure: %s", strerror (errno)); + if (opt <= 0) + { + close (servsock); + return (EXECUTION_FAILURE); + } + } + + clientlen = sizeof (client); + if ((clisock = accept (servsock, (struct sockaddr *)&client, &clientlen)) < 0) + { + builtin_error ("client accept failure: %s", strerror (errno)); + close (servsock); + return (EXECUTION_FAILURE); + } + + close (servsock); + + accept_bind_variable (fdvar, clisock); + if (rhostvar) + { + rhost = inet_ntoa (client.sin_addr); + v = builtin_bind_variable (rhostvar, rhost, 0); + if (v == 0 || readonly_p (v) || noassign_p (v)) + builtin_error ("%s: cannot set variable", rhostvar); + } + + return (EXECUTION_SUCCESS); +} + +static int +accept_bind_variable (varname, intval) + char *varname; + int intval; +{ + SHELL_VAR *v; + char ibuf[INT_STRLEN_BOUND (int) + 1], *p; + + p = fmtulong (intval, 10, ibuf, sizeof (ibuf), 0); + v = builtin_bind_variable (varname, p, 0); /* XXX */ + if (v == 0 || readonly_p (v) || noassign_p (v)) + builtin_error ("%s: cannot set variable", varname); + return (v != 0); +} + +char *accept_doc[] = { + "Accept a network connection on a specified port.", + "" + "This builtin allows a bash script to act as a TCP/IP server.", + "", + "Options, if supplied, have the following meanings:", + " -b address use ADDRESS as the IP address to listen on; the", + " default is INADDR_ANY", + " -t timeout wait TIMEOUT seconds for a connection. TIMEOUT may", + " be a decimal number including a fractional portion", + " -v varname store the numeric file descriptor of the connected", + " socket into VARNAME. The default VARNAME is ACCEPT_FD", + " -r rhost store the IP address of the remote host into the shell", + " variable RHOST, in dotted-decimal notation", + "", + "If successful, the shell variable ACCEPT_FD, or the variable named by the", + "-v option, will be set to the fd of the connected socket, suitable for", + "use as 'read -u$ACCEPT_FD'. RHOST, if supplied, will hold the IP address", + "of the remote client. The return status is 0.", + "", + "On failure, the return status is 1 and ACCEPT_FD (or VARNAME) and RHOST,", + "if supplied, will be unset.", + "", + "The server socket fd will be closed before accept returns.", + (char *) NULL +}; + +struct builtin accept_struct = { + "accept", /* builtin name */ + accept_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + accept_doc, /* array of long documentation strings. */ + "accept [-b address] [-t timeout] [-v varname] [-r addrvar ] port", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/examples/loadables/asort.c b/examples/loadables/asort.c new file mode 100644 index 0000000..e847ef8 --- /dev/null +++ b/examples/loadables/asort.c @@ -0,0 +1,279 @@ +/* + Copyright (C) 2020 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 . +*/ +#include +#include +#include + +#include "bashtypes.h" +#include "shell.h" +#include "builtins.h" +#include "common.h" +#include "xmalloc.h" +#include "bashgetopt.h" + +typedef struct sort_element { + ARRAY_ELEMENT *v; // used when sorting array in-place + char *key; // used when sorting assoc array + char *value; // points to value of array element or assoc entry + double num; // used for numeric sort +} sort_element; + +static int reverse_flag; +static int numeric_flag; + +static int +compare(const void *p1, const void *p2) { + const sort_element e1 = *(sort_element *) p1; + const sort_element e2 = *(sort_element *) p2; + + if (numeric_flag) { + if (reverse_flag) + return (e2.num > e1.num) ? 1 : (e2.num < e1.num) ? -1 : 0; + else + return (e1.num > e2.num) ? 1 : (e1.num < e2.num) ? -1 : 0; + } + else { + if (reverse_flag) + return strcoll(e2.value, e1.value); + else + return strcoll(e1.value, e2.value); + } +} + +static int +sort_index(SHELL_VAR *dest, SHELL_VAR *source) { + HASH_TABLE *hash; + BUCKET_CONTENTS *bucket; + sort_element *sa; + ARRAY *array, *dest_array; + ARRAY_ELEMENT *ae; + size_t i, j, n; + char ibuf[INT_STRLEN_BOUND (intmax_t) + 1]; // used by fmtulong + char *key; + + dest_array = array_cell(dest); + + if (assoc_p(source)) { + hash = assoc_cell(source); + n = hash->nentries; + sa = xmalloc(n * sizeof(sort_element)); + i = 0; + for ( j = 0; j < hash->nbuckets; ++j ) { + bucket = hash->bucket_array[j]; + while ( bucket ) { + sa[i].v = NULL; + sa[i].key = bucket->key; + if ( numeric_flag ) + sa[i].num = strtod(bucket->data, NULL); + else + sa[i].value = bucket->data; + i++; + bucket = bucket->next; + } + } + } + else { + array = array_cell(source); + n = array_num_elements(array); + sa = xmalloc(n * sizeof(sort_element)); + i = 0; + + for (ae = element_forw(array->head); ae != array->head; ae = element_forw(ae)) { + sa[i].v = ae; + if (numeric_flag) + sa[i].num = strtod(element_value(ae), NULL); + else + sa[i].value = element_value(ae); + i++; + } + } + + // sanity check + if ( i != n ) { + builtin_error("%s: corrupt array", source->name); + return EXECUTION_FAILURE; + } + + qsort(sa, n, sizeof(sort_element), compare); + + array_flush(dest_array); + + for ( i = 0; i < n; ++i ) { + if ( assoc_p(source) ) + key = sa[i].key; + else + key = fmtulong((long unsigned)sa[i].v->ind, 10, ibuf, sizeof(ibuf), 0); + + array_insert(dest_array, i, key); + } + + return EXECUTION_SUCCESS; +} + +static int +sort_inplace(SHELL_VAR *var) { + size_t i, n; + ARRAY *a; + ARRAY_ELEMENT *ae; + sort_element *sa = 0; + + a = array_cell(var); + n = array_num_elements(a); + + if ( n == 0 ) + return EXECUTION_SUCCESS; + + sa = xmalloc(n * sizeof(sort_element)); + + i = 0; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + sa[i].v = ae; + if (numeric_flag) + sa[i].num = strtod(element_value(ae), NULL); + else + sa[i].value = element_value(ae); + i++; + } + + // sanity check + if ( i != n ) { + builtin_error("%s: corrupt array", var->name); + return EXECUTION_FAILURE; + } + + qsort(sa, n, sizeof(sort_element), compare); + + // for in-place sort, simply "rewire" the array elements + sa[0].v->prev = sa[n-1].v->next = a->head; + a->head->next = sa[0].v; + a->head->prev = sa[n-1].v; + a->max_index = n - 1; + for (i = 0; i < n; i++) { + sa[i].v->ind = i; + if (i > 0) + sa[i].v->prev = sa[i-1].v; + if (i < n - 1) + sa[i].v->next = sa[i+1].v; + } + xfree(sa); + return EXECUTION_SUCCESS; +} + +int +asort_builtin(WORD_LIST *list) { + SHELL_VAR *var, *var2; + char *word; + int opt, ret; + int index_flag = 0; + + numeric_flag = 0; + reverse_flag = 0; + + reset_internal_getopt(); + while ((opt = internal_getopt(list, "inr")) != -1) { + switch (opt) { + case 'i': index_flag = 1; break; + case 'n': numeric_flag = 1; break; + case 'r': reverse_flag = 1; break; + CASE_HELPOPT; + default: + builtin_usage(); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) { + builtin_usage(); + return EX_USAGE; + } + + if (legal_identifier (list->word->word) == 0) { + sh_invalidid (list->word->word); + return EXECUTION_FAILURE; + } + + if ( index_flag ) { + if ( list->next == 0 || list->next->next ) { + builtin_usage(); + return EX_USAGE; + } + if (legal_identifier (list->next->word->word) == 0) { + sh_invalidid (list->next->word->word); + return EXECUTION_FAILURE; + } + var = find_or_make_array_variable(list->word->word, 1); + if (var == 0) + return EXECUTION_FAILURE; + var2 = find_variable(list->next->word->word); + if ( !var2 || ( !array_p(var2) && !assoc_p(var2) ) ) { + builtin_error("%s: Not an array", list->next->word->word); + return EXECUTION_FAILURE; + } + return sort_index(var, var2); + } + + while (list) { + word = list->word->word; + var = find_variable(word); + list = list->next; + + if (var == 0 || array_p(var) == 0) { + builtin_error("%s: Not an array", word); + continue; + } + if (readonly_p(var) || noassign_p(var)) { + if (readonly_p(var)) + err_readonly(word); + continue; + } + + if ( (ret = sort_inplace(var)) != EXECUTION_SUCCESS ) + return ret; + } + return EXECUTION_SUCCESS; + +} + +char *asort_doc[] = { + "Sort arrays in-place.", + "", + "Options:", + " -n compare according to string numerical value", + " -r reverse the result of comparisons", + " -i sort using indices/keys", + "", + "If -i is supplied, SOURCE is not sorted in-place, but the indices (or keys", + "if associative) of SOURCE, after sorting it by its values, are placed as", + "values in the indexed array DEST", + "", + "Associative arrays may not be sorted in-place.", + "", + "Exit status:", + "Return value is zero unless an error happened (like invalid variable name", + "or readonly array).", + (char *)NULL +}; + +struct builtin asort_struct = { + "asort", + asort_builtin, + BUILTIN_ENABLED, + asort_doc, + "asort [-nr] array ... or asort [-nr] -i dest source", + 0 +}; diff --git a/examples/loadables/basename.c b/examples/loadables/basename.c index b5705cb..29dd1a6 100644 --- a/examples/loadables/basename.c +++ b/examples/loadables/basename.c @@ -2,6 +2,24 @@ /* See Makefile for compilation details. */ +/* + Copyright (C) 1999-2020 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 . +*/ + #include "config.h" #if defined (HAVE_UNISTD_H) @@ -12,21 +30,23 @@ #include "builtins.h" #include "shell.h" #include "common.h" +#include "bashgetopt.h" +int basename_builtin (list) WORD_LIST *list; { int slen, sufflen, off; char *string, *suffix, *fn; + if (no_options (list)) + return (EX_USAGE); + list = loptend; if (list == 0) { builtin_usage (); return (EX_USAGE); - } - - if (no_options (list)) - return (EX_USAGE); + } string = list->word->word; suffix = (char *)NULL; diff --git a/examples/loadables/cat.c b/examples/loadables/cat.c index 1ce2e2d..71685f3 100644 --- a/examples/loadables/cat.c +++ b/examples/loadables/cat.c @@ -5,7 +5,7 @@ */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2009,2022 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -36,13 +36,25 @@ extern char *strerror (); extern char **make_builtin_argv (); static int -fcopy(fd) +fcopy(fd, fn) int fd; +char *fn; { - char buf[1024], *s; + char buf[4096], *s; int n, w, e; while (n = read(fd, buf, sizeof (buf))) { + if (n < 0) { + e = errno; + write(2, "cat: read error: ", 18); + write(2, fn, strlen(fn)); + write(2, ": ", 2); + s = strerror(e); + write(2, s, strlen(s)); + write(2, "\n", 1); + return 1; + } + QUIT; w = write(1, buf, n); if (w != n) { e = errno; @@ -52,10 +64,12 @@ int fd; write(2, "\n", 1); return 1; } + QUIT; } return 0; } +int cat_main (argc, argv) int argc; char **argv; @@ -64,9 +78,10 @@ char **argv; char *s; if (argc == 1) - return (fcopy(0)); + return (fcopy(0, "standard input")); for (i = r = 1; i < argc; i++) { + QUIT; if (argv[i][0] == '-' && argv[i][1] == '\0') fd = 0; else { @@ -81,13 +96,15 @@ char **argv; continue; } } - r = fcopy(fd); + r = fcopy(fd, argv[i]); if (fd != 0) close(fd); } + QUIT; return (r); } +int cat_builtin(list) WORD_LIST *list; { @@ -95,6 +112,7 @@ WORD_LIST *list; int c, r; v = make_builtin_argv(list, &c); + QUIT; r = cat_main(c, v); free(v); diff --git a/examples/loadables/csv.c b/examples/loadables/csv.c new file mode 100644 index 0000000..75b3772 --- /dev/null +++ b/examples/loadables/csv.c @@ -0,0 +1,206 @@ +/* csv - process a line of csv data and populate an indexed array with the + fields */ + +/* + Copyright (C) 2020 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 . +*/ + +/* See Makefile for compilation details. */ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "bashansi.h" +#include + +#include "loadables.h" + +#define CSV_ARRAY_DEFAULT "CSV" + +#define NQUOTE 0 +#define DQUOTE 1 + +/* Split LINE into comma-separated fields, storing each field into a separate + element of array variable CSV, starting at index 0. The format of LINE is + as described in RFC 4180. */ +static int +csvsplit (csv, line, dstring) + SHELL_VAR *csv; + char *line, *dstring; +{ + arrayind_t ind; + char *field, *prev, *buf, *xbuf; + int delim, qstate; + int b, rval; + + xbuf = 0; + ind = 0; + field = prev = line; + + do + { + if (*prev == '"') + { + if (xbuf == 0) + xbuf = xmalloc (strlen (prev) + 1); + buf = xbuf; + b = 0; + qstate = DQUOTE; + for (field = ++prev; *field; field++) + { + if (qstate == DQUOTE && *field == '"' && field[1] == '"') + buf[b++] = *field++; /* skip double quote */ + else if (qstate == DQUOTE && *field == '"') + qstate = NQUOTE; + else if (qstate == NQUOTE && *field == *dstring) + break; + else + /* This copies any text between a closing double quote and the + delimiter. If you want to change that, make sure to do the + copy only if qstate == DQUOTE. */ + buf[b++] = *field; + } + buf[b] = '\0'; + } + else + { + buf = prev; + field = prev + strcspn (prev, dstring); + } + + delim = *field; + *field = '\0'; + + bind_array_element (csv, ind, buf, 0); + ind++; + + *field = delim; + + if (delim == *dstring) + prev = field + 1; + } + while (delim == *dstring); + + if (xbuf) + free (xbuf); + + return (rval = ind); /* number of fields */ +} + +int +csv_builtin (list) + WORD_LIST *list; +{ + int opt, rval; + char *array_name, *csvstring; + SHELL_VAR *v; + + array_name = 0; + rval = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "a:")) != -1) + { + switch (opt) + { + case 'a': + array_name = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (array_name == 0) + array_name = CSV_ARRAY_DEFAULT; + + if (legal_identifier (array_name) == 0) + { + sh_invalidid (array_name); + return (EXECUTION_FAILURE); + } + + if (list == 0) + { + builtin_error ("csv string argument required"); + return (EX_USAGE); + } + + v = find_or_make_array_variable (array_name, 1); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + if (v && readonly_p (v)) + err_readonly (array_name); + return (EXECUTION_FAILURE); + } + else if (array_p (v) == 0) + { + builtin_error ("%s: not an indexed array", array_name); + return (EXECUTION_FAILURE); + } + if (invisible_p (v)) + VUNSETATTR (v, att_invisible); + array_flush (array_cell (v)); + + csvstring = list->word->word; + + if (csvstring == 0 || *csvstring == 0) + return (EXECUTION_SUCCESS); + + opt = csvsplit (v, csvstring, ","); + /* Maybe do something with OPT here, it's the number of fields */ + + return (rval); +} + +/* Called when builtin is enabled and loaded from the shared object. If this + function returns 0, the load fails. */ +int +csv_builtin_load (name) + char *name; +{ + return (1); +} + +/* Called when builtin is disabled. */ +void +csv_builtin_unload (name) + char *name; +{ +} + +char *csv_doc[] = { + "Read comma-separated fields from a string.", + "", + "Parse STRING, a line of comma-separated values, into individual fields,", + "and store them into the indexed array ARRAYNAME starting at index 0.", + "If ARRAYNAME is not supplied, \"CSV\" is the default array name.", + (char *)NULL +}; + +struct builtin csv_struct = { + "csv", /* builtin name */ + csv_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + csv_doc, /* array of long documentation strings. */ + "csv [-a ARRAY] string", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/examples/loadables/cut.c b/examples/loadables/cut.c index 47d7d3e..48f8004 100644 --- a/examples/loadables/cut.c +++ b/examples/loadables/cut.c @@ -1,379 +1,631 @@ +/* cut,lcut - extract specified fields from a line and assign them to an array + or print them to the standard output */ + /* - * 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 */ + Copyright (C) 2020 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 . +*/ + +/* See Makefile for compilation details. */ #include -#include +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "bashansi.h" #include +#include #include -#include "bashansi.h" +#include "loadables.h" +#include "shmbutil.h" -#ifdef HAVE_LIMITS_H -# include -#endif +#define CUT_ARRAY_DEFAULT "CUTFIELDS" -#ifdef HAVE_UNISTD_H -# include -#endif +#define NOPOS -2 /* sentinel for unset startpos/endpos */ -#include "builtins.h" -#include "shell.h" -#include "bashgetopt.h" -#include "common.h" +#define BOL 0 +#define EOL INT_MAX +#define NORANGE -1 /* just a position, no range */ -#if !defined (errno) -extern int errno; -#endif +#define BFLAG (1 << 0) +#define CFLAG (1 << 1) +#define DFLAG (1 << 2) +#define FFLAG (1 << 3) +#define SFLAG (1 << 4) -#if !defined (_POSIX2_LINE_MAX) -# define _POSIX2_LINE_MAX 2048 -#endif +struct cutpos +{ + int startpos, endpos; /* zero-based, correction done in getlist() */ +}; -static int cflag; -static char dchar; -static int dflag; -static int fflag; -static int sflag; +struct cutop +{ + int flags; + int delim; + int npos; + struct cutpos *poslist; +}; -static int autostart, autostop, maxval; -static char positions[_POSIX2_LINE_MAX + 1]; +static int +poscmp (a, b) + void *a, *b; +{ + struct cutpos *p1, *p2; -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 *)); + p1 = (struct cutpos *)a; + p2 = (struct cutpos *)b; + return (p1->startpos - p2->startpos); +} -int -cut_builtin(list) - WORD_LIST *list; +static int +getlist (arg, opp) + char *arg; + struct cutpos **opp; { - 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); + char *ntok, *ltok, *larg; + int s, e; + intmax_t num; + struct cutpos *poslist; + int npos, nsize; + + poslist = 0; + nsize = npos = 0; + s = e = 0; + larg = arg; + while (ltok = strsep (&larg, ",")) + { + if (*ltok == 0) + continue; + + ntok = strsep (<ok, "-"); + if (*ntok == 0) + s = BOL; + else + { + if (legal_number (ntok, &num) == 0 || (int)num != num || num <= 0) + { + builtin_error ("%s: invalid list value", ntok); + *opp = poslist; + return -1; + } + s = num; + s--; /* fields are 1-based */ + } + if (ltok == 0) + e = NORANGE; + else if (*ltok == 0) + e = EOL; + else + { + if (legal_number (ltok, &num) == 0 || (int)num != num || num <= 0) + { + builtin_error ("%s: invalid list value", ltok); + *opp = poslist; + return -1; + } + e = num; + e--; + if (e == s) + e = NORANGE; } - 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); + if (npos == nsize) + { + nsize += 4; + poslist = (struct cutpos *)xrealloc (poslist, nsize * sizeof (struct cutpos)); } + poslist[npos].startpos = s; + poslist[npos].endpos = e; + npos++; + } + if (npos == 0) + { + builtin_error ("missing list of positions"); + *opp = poslist; + return -1; + } + + qsort (poslist, npos, sizeof(poslist[0]), poscmp); + *opp = poslist; + + return npos; +} + +static int +cutbytes (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; +{ + arrayind_t ind; + char *buf, *bmap; + size_t llen; + int i, b, n, s, e; + + llen = strlen (line); + buf = xmalloc (llen + 1); + bmap = xmalloc (llen + 1); + memset (bmap, 0, llen); + + for (n = 0; n < ops->npos; n++) + { + s = ops->poslist[n].startpos; /* no translation needed yet */ + e = ops->poslist[n].endpos; + if (e == NORANGE) + e = s; + else if (e == EOL || e >= llen) + e = llen - 1; + /* even if a column is specified multiple times, it will only be printed + once */ + for (i = s; i <= e; i++) + bmap[i] = 1; + } + + b = 0; + for (i = 0; i < llen; i++) + if (bmap[i]) + buf[b++] = line[i]; + buf[b] = 0; + + if (v) + { + ind = 0; + bind_array_element (v, ind, buf, 0); + ind++; + } + else + printf ("%s\n", buf); + + free (buf); + free (bmap); + + return ind; +} - return (EXECUTION_SUCCESS); +static int +cutchars (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; +{ + arrayind_t ind; + char *buf, *bmap; + wchar_t *wbuf, *wb2; + size_t llen, wlen; + int i, b, n, s, e; + + if (MB_CUR_MAX == 1) + return (cutbytes (v, line, ops)); + if (locale_utf8locale && utf8_mbsmbchar (line) == 0) + return (cutbytes (v, line, ops)); + + llen = strlen (line); + wbuf = (wchar_t *)xmalloc ((llen + 1) * sizeof (wchar_t)); + + wlen = mbstowcs (wbuf, line, llen); + if (MB_INVALIDCH (wlen)) + { + free (wbuf); + return (cutbytes (v, line, ops)); + } + + bmap = xmalloc (llen + 1); + memset (bmap, 0, llen); + + for (n = 0; n < ops->npos; n++) + { + s = ops->poslist[n].startpos; /* no translation needed yet */ + e = ops->poslist[n].endpos; + if (e == NORANGE) + e = s; + else if (e == EOL || e >= wlen) + e = wlen - 1; + /* even if a column is specified multiple times, it will only be printed + once */ + for (i = s; i <= e; i++) + bmap[i] = 1; + } + + wb2 = (wchar_t *)xmalloc ((wlen + 1) * sizeof (wchar_t)); + b = 0; + for (i = 0; i < wlen; i++) + if (bmap[i]) + wb2[b++] = wbuf[i]; + wb2[b] = 0; + + free (wbuf); + + buf = bmap; + n = wcstombs (buf, wb2, llen); + + if (v) + { + ind = 0; + bind_array_element (v, ind, buf, 0); + ind++; + } + else + printf ("%s\n", buf); + + free (buf); + free (wb2); + + return ind; } +/* The basic strategy is to cut the line into fields using strsep, populate + an array of fields from 0..nf, then select those fields using the same + bitmap approach as cut{bytes,chars} and assign them to the array variable + V or print them on stdout. This function obeys SFLAG. */ static int -get_list(list) - char *list; +cutfields (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; { - 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); + arrayind_t ind; + char *buf, *bmap, *field, **fields, delim[2]; + size_t llen, fsize; + int i, b, n, s, e, nf; + + ind = 0; + + delim[0] = ops->delim; + delim[1] = '\0'; + + fields = 0; + nf = 0; + fsize = 0; + + field = buf = line; + do + { + field = strsep (&buf, delim); /* destructive */ + if (nf == fsize) + { + fsize += 8; + fields = xrealloc (fields, fsize * sizeof (char *)); + } + fields[nf] = field; + if (field) + nf++; + } + while (field); + + if (nf == 1) + { + free (fields); + if (ops->flags & SFLAG) + return ind; + if (v) + { + bind_array_element (v, ind, line, 0); + ind++; } + else + printf ("%s\n", line); + return ind; + } + + bmap = xmalloc (nf + 1); + memset (bmap, 0, nf); + + for (n = 0; n < ops->npos; n++) + { + s = ops->poslist[n].startpos; /* no translation needed yet */ + e = ops->poslist[n].endpos; + if (e == NORANGE) + e = s; + else if (e == EOL || e >= nf) + e = nf - 1; + /* even if a column is specified multiple times, it will only be printed + once */ + for (i = s; i <= e; i++) + bmap[i] = 1; + } + + for (i = 1, b = 0; b < nf; b++) + { + if (bmap[b] == 0) + continue; + if (v) + { + bind_array_element (v, ind, fields[b], 0); + ind++; + } + else + { + if (i == 0) + putchar (ops->delim); + printf ("%s", fields[b]); + } + i = 0; + } + if (v == 0) + putchar ('\n'); + + return nf; +} - /* overlapping ranges */ - if (autostop && maxval > autostop) - maxval = autostop; +static int +cutline (v, line, ops) + SHELL_VAR *v; + char *line; + struct cutop *ops; +{ + int rval; - /* set autostart */ - if (autostart) - memset(positions + 1, '1', autostart); + if (ops->flags & BFLAG) + rval = cutbytes (v, line, ops); + else if (ops->flags & CFLAG) + rval = cutchars (v, line, ops); + else + rval = cutfields (v, line, ops); - return 0; + return (rval >= 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE); } -/* ARGSUSED */ static int -c_cut(fp, fname) - FILE *fp; - char *fname; +cutfile (v, list, ops) + SHELL_VAR *v; + WORD_LIST *list; + struct cutop *ops; { - 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'); + int fd, unbuffered_read; + char *line, *b; + size_t llen; + WORD_LIST *l; + ssize_t n; + + line = 0; + llen = 0; + + l = list; + do + { + /* for each file */ + if (l == 0 || (l->word->word[0] == '-' && l->word->word[1] == '\0')) + fd = 0; + else + fd = open (l->word->word, O_RDONLY); + if (fd < 0) + { + file_error (l->word->word); + return (EXECUTION_FAILURE); + } + +#ifndef __CYGWIN__ + unbuffered_read = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); +#else + unbuffered_read = 1; +#endif + + while ((n = zgetline (fd, &line, &llen, '\n', unbuffered_read)) != -1) + { + QUIT; + if (line[n] == '\n') + line[n] = '\0'; /* cutline expects no newline terminator */ + cutline (v, line, ops); /* can modify line */ } - return (0); + if (fd > 0) + close (fd); + + QUIT; + if (l) + l = l->next; + } + while (l); + + free (line); + return EXECUTION_SUCCESS; } +#define OPTSET(x) ((cutflags & (x)) ? 1 : 0) + static int -f_cut(fp, fname) - FILE *fp; - char *fname; +cut_internal (which, list) + int which; /* not used yet */ + WORD_LIST *list; { - 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'); + int opt, rval, cutflags, delim, npos; + char *array_name, *cutstring, *list_arg; + SHELL_VAR *v; + struct cutop op; + struct cutpos *poslist; + + v = 0; + rval = EXECUTION_SUCCESS; + + cutflags = 0; + array_name = 0; + list_arg = 0; + delim = '\t'; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "a:b:c:d:f:sn")) != -1) + { + switch (opt) + { + case 'a': + array_name = list_optarg; + break; + case 'b': + cutflags |= BFLAG; + list_arg = list_optarg; + break; + case 'c': + cutflags |= CFLAG; + list_arg = list_optarg; + break; + case 'd': + cutflags |= DFLAG; + delim = list_optarg[0]; + if (delim == 0 || list_optarg[1]) + { + builtin_error ("delimiter must be a single non-null character"); + return (EX_USAGE); + } + break; + case 'f': + cutflags |= FFLAG; + list_arg = list_optarg; + break; + case 'n': + break; + case 's': + cutflags |= SFLAG; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (array_name && (legal_identifier (array_name) == 0)) + { + sh_invalidid (array_name); + return (EXECUTION_FAILURE); + } + + if (list == 0 && which == 0) + { + builtin_error ("string argument required"); + return (EX_USAGE); + } + + /* options are mutually exclusive and one is required */ + if ((OPTSET (BFLAG) + OPTSET (CFLAG) + OPTSET (FFLAG)) != 1) + { + builtin_usage (); + return (EX_USAGE); + } + + if ((npos = getlist (list_arg, &poslist)) < 0) + { + free (poslist); + return (EXECUTION_FAILURE); + } + + if (array_name) + { + v = find_or_make_array_variable (array_name, 1); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + if (v && readonly_p (v)) + err_readonly (array_name); + return (EXECUTION_FAILURE); + } + else if (array_p (v) == 0) + { + builtin_error ("%s: not an indexed array", array_name); + return (EXECUTION_FAILURE); + } + if (invisible_p (v)) + VUNSETATTR (v, att_invisible); + array_flush (array_cell (v)); + } + + op.flags = cutflags; + op.delim = delim; + op.npos = npos; + op.poslist = poslist; + + /* we implement cut as a builtin with a cutfile() function that opens each + filename in LIST as a filename (or `-' for stdin) and runs cutline on + every line in the file. */ + if (which == 0) + { + cutstring = list->word->word; + if (cutstring == 0 || *cutstring == 0) + { + free (poslist); + return (EXECUTION_SUCCESS); } - return (0); + rval = cutline (v, cutstring, &op); + } + else + rval = cutfile (v, list, &op); + + return (rval); } -/* - * 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; +int +lcut_builtin (list) + WORD_LIST *list; { - 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 */ + return (cut_internal (0, list)); +} + +int +cut_builtin (list) + WORD_LIST *list; +{ + return (cut_internal (1, list)); } -static char *cut_doc[] = { - "Select portions of lines.", +char *lcut_doc[] = { + "Extract selected fields from a string.", "", - "Select portions of each line (as specified by LIST) from each FILE", - "(by default, the standard input), and write them to the standard output.", + "Select portions of LINE (as specified by LIST) and assign them to", + "elements of the indexed array ARRAY starting at index 0, or write", + "them to the standard output if -a is not specified.", + "", "Items specified by LIST are either column positions or fields delimited", - "by a special character. Column numbering starts at 1.", - (char *)0 + "by a special character, and are described more completely in cut(1).", + "", + "Columns correspond to bytes (-b), characters (-c), or fields (-f). The", + "field delimiter is specified by -d (default TAB). Column numbering", + "starts at 1.", + (char *)NULL +}; + +struct builtin lcut_struct = { + "lcut", /* builtin name */ + lcut_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + lcut_doc, /* array of long documentation strings. */ + "lcut [-a ARRAY] [-b LIST] [-c LIST] [-f LIST] [-d CHAR] [-sn] line", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; + +char *cut_doc[] = { + "Extract selected fields from each line of a file.", + "", + "Select portions of each line (as specified by LIST) from each FILE", + "and write them to the standard output. cut reads from the standard", + "input if no FILE arguments are specified or if a FILE argument is a", + "single hyphen.", + "", + "Items specified by LIST are either column positions or fields delimited", + "by a special character, and are described more completely in cut(1).", + "", + "Columns correspond to bytes (-b), characters (-c), or fields (-f). The", + "field delimiter is specified by -d (default TAB). Column numbering", + "starts at 1.", + (char *)NULL }; 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 + "cut", /* builtin name */ + cut_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + cut_doc, /* array of long documentation strings. */ + "cut [-a ARRAY] [-b LIST] [-c LIST] [-f LIST] [-d CHAR] [-sn] [file ...]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ }; diff --git a/examples/loadables/dirname.c b/examples/loadables/dirname.c index 0f30286..d802ca7 100644 --- a/examples/loadables/dirname.c +++ b/examples/loadables/dirname.c @@ -30,22 +30,25 @@ #include "builtins.h" #include "shell.h" #include "common.h" +#include "bashgetopt.h" +int dirname_builtin (list) WORD_LIST *list; { int slen; char *string; + if (no_options (list)) + return (EX_USAGE); + list = loptend; + if (list == 0 || list->next) { builtin_usage (); return (EX_USAGE); } - if (no_options (list)) - return (EX_USAGE); - string = list->word->word; slen = strlen (string); diff --git a/examples/loadables/dsv.c b/examples/loadables/dsv.c new file mode 100644 index 0000000..70e59cb --- /dev/null +++ b/examples/loadables/dsv.c @@ -0,0 +1,300 @@ +/* dsv - process a line of delimiter-separated data and populate an indexed + array with the fields */ + +/* + Copyright (C) 2022 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 . +*/ + +/* See Makefile for compilation details. */ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "bashansi.h" +#include + +#include "loadables.h" + +#define DSV_ARRAY_DEFAULT "DSV" + +#define NQUOTE 0 +#define DQUOTE 1 +#define SQUOTE 2 + +#define F_SHELLQUOTE 0x01 +#define F_GREEDY 0x02 +#define F_PRESERVE 0x04 + +/* Split LINE into delimiter-separated fields, storing each field into a + separate element of array variable DSV, starting at index 0. The format + of LINE is delimiter-separated values. By default, this splits lines of + CSV data as described in RFC 4180. If *DSTRING is any other value than + ',', this uses that character as a field delimiter. Pass F_SHELLQUOTE in + FLAGS to understand shell-like double-quoting and backslash-escaping in + double quotes instead of the "" CSV behavior, and shell-like single quotes. + Pass F_GREEDY in FLAGS to consume multiple leading and trailing instances + of *DSTRING and consecutive instances of *DSTRING in LINE without creating + null fields. If you want to preserve the quote characters in the generated + fields, pass F_PRESERVE; by default, this removes them. */ +static int +dsvsplit (dsv, line, dstring, flags) + SHELL_VAR *dsv; + char *line, *dstring; + int flags; +{ + arrayind_t ind; + char *field, *prev, *buf, *xbuf; + int delim, qstate; + int b, rval; + + xbuf = 0; + ind = 0; + field = prev = line; + + /* If we want a greedy split, consume leading instances of *DSTRING */ + if (flags & F_GREEDY) + { + while (*prev == *dstring) + prev++; + field = prev; + } + + do + { + if (*prev == '"') + { + if (xbuf == 0) + xbuf = xmalloc (strlen (prev) + 1); + buf = xbuf; + b = 0; + if (flags & F_PRESERVE) + buf[b++] = *prev; + qstate = DQUOTE; + for (field = ++prev; *field; field++) + { + if (qstate == DQUOTE && *field == '"' && field[1] == '"' && (flags & F_SHELLQUOTE) == 0) + buf[b++] = *field++; /* skip double quote */ + else if (qstate == DQUOTE && (flags & F_SHELLQUOTE) && *field == '\\' && strchr (slashify_in_quotes, field[1]) != 0) + buf[b++] = *++field; /* backslash quoted double quote */ + else if (qstate == DQUOTE && *field == '"') + { + qstate = NQUOTE; + if (flags & F_PRESERVE) + buf[b++] = *field; + } + else if (qstate == NQUOTE && *field == *dstring) + break; + else + /* This copies any text between a closing double quote and the + delimiter. If you want to change that, make sure to do the + copy only if qstate == DQUOTE. */ + buf[b++] = *field; + } + buf[b] = '\0'; + } + else if ((flags & F_SHELLQUOTE) && *prev == '\'') + { + if (xbuf == 0) + xbuf = xmalloc (strlen (prev) + 1); + buf = xbuf; + b = 0; + if (flags & F_PRESERVE) + buf[b++] = *prev; + qstate = SQUOTE; + for (field = ++prev; *field; field++) + { + if (qstate == SQUOTE && *field == '\'') + { + qstate = NQUOTE; + if (flags & F_PRESERVE) + buf[b++] = *field; + } + else if (qstate == NQUOTE && *field == *dstring) + break; + else + /* This copies any text between a closing single quote and the + delimiter. If you want to change that, make sure to do the + copy only if qstate == SQUOTE. */ + buf[b++] = *field; + } + buf[b] = '\0'; + } + else + { + buf = prev; + field = prev + strcspn (prev, dstring); + } + + delim = *field; + *field = '\0'; + + if ((flags & F_GREEDY) == 0 || buf[0]) + { + bind_array_element (dsv, ind, buf, 0); + ind++; + } + + *field = delim; + + if (delim == *dstring) + prev = field + 1; + } + while (delim == *dstring); + + if (xbuf) + free (xbuf); + + return (rval = ind); /* number of fields */ +} + +int +dsv_builtin (list) + WORD_LIST *list; +{ + int opt, rval, flags; + char *array_name, *dsvstring, *delims; + SHELL_VAR *v; + + array_name = 0; + rval = EXECUTION_SUCCESS; + + delims = ","; + flags = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "a:d:Sgp")) != -1) + { + switch (opt) + { + case 'a': + array_name = list_optarg; + break; + case 'd': + delims = list_optarg; + break; + case 'S': + flags |= F_SHELLQUOTE; + break; + case 'g': + flags |= F_GREEDY; + break; + case 'p': + flags |= F_PRESERVE; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (array_name == 0) + array_name = DSV_ARRAY_DEFAULT; + + if (legal_identifier (array_name) == 0) + { + sh_invalidid (array_name); + return (EXECUTION_FAILURE); + } + + if (list == 0) + { + builtin_error ("dsv string argument required"); + return (EX_USAGE); + } + + v = find_or_make_array_variable (array_name, 1); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + if (v && readonly_p (v)) + err_readonly (array_name); + return (EXECUTION_FAILURE); + } + else if (array_p (v) == 0) + { + builtin_error ("%s: not an indexed array", array_name); + return (EXECUTION_FAILURE); + } + if (invisible_p (v)) + VUNSETATTR (v, att_invisible); + array_flush (array_cell (v)); + + dsvstring = list->word->word; + + if (dsvstring == 0 || *dsvstring == 0) + return (EXECUTION_SUCCESS); + + opt = dsvsplit (v, dsvstring, delims, flags); + /* Maybe do something with OPT here, it's the number of fields */ + + return (rval); +} + +/* Called when builtin is enabled and loaded from the shared object. If this + function returns 0, the load fails. */ +int +dsv_builtin_load (name) + char *name; +{ + return (1); +} + +/* Called when builtin is disabled. */ +void +dsv_builtin_unload (name) + char *name; +{ +} + +char *dsv_doc[] = { + "Read delimiter-separated fields from STRING.", + "", + "Parse STRING, a line of delimiter-separated values, into individual", + "fields, and store them into the indexed array ARRAYNAME starting at", + "index 0. The parsing understands and skips over double-quoted strings. ", + "If ARRAYNAME is not supplied, \"DSV\" is the default array name.", + "If the delimiter is a comma, the default, this parses comma-", + "separated values as specified in RFC 4180.", + "", + "The -d option specifies the delimiter. The delimiter is the first", + "character of the DELIMS argument. Specifying a DELIMS argument that", + "contains more than one character is not supported and will produce", + "unexpected results. The -S option enables shell-like quoting: double-", + "quoted strings can contain backslashes preceding special characters,", + "and the backslash will be removed; and single-quoted strings are", + "processed as the shell would process them. The -g option enables a", + "greedy split: sequences of the delimiter are skipped at the beginning", + "and end of STRING, and consecutive instances of the delimiter in STRING", + "do not generate empty fields. If the -p option is supplied, dsv leaves", + "quote characters as part of the generated field; otherwise they are", + "removed.", + "", + "The return value is 0 unless an invalid option is supplied or the ARRAYNAME", + "argument is invalid or readonly.", + (char *)NULL +}; + +struct builtin dsv_struct = { + "dsv", /* builtin name */ + dsv_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + dsv_doc, /* array of long documentation strings. */ + "dsv [-a ARRAYNAME] [-d DELIMS] [-Sgp] string", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/examples/loadables/fdflags.c b/examples/loadables/fdflags.c new file mode 100644 index 0000000..9f2d089 --- /dev/null +++ b/examples/loadables/fdflags.c @@ -0,0 +1,374 @@ +/* Loadable builtin to get and set file descriptor flags. */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 2017-2022 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 . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include +#include +#include "bashansi.h" +#include + +#include "loadables.h" + +#ifndef FD_CLOEXEC +# define FD_CLOEXEC 1 +#endif + +static const struct +{ + const char *name; + int value; +} file_flags[] = +{ +#ifdef O_APPEND + { "append", O_APPEND }, +#else +# define O_APPEND 0 +#endif +#ifdef O_ASYNC + { "async", O_ASYNC }, +#else +# define O_ASYNC 0 +#endif +#ifdef O_SYNC + { "sync", O_SYNC }, +#else +# define O_SYNC 0 +#endif +#ifdef O_NONBLOCK + { "nonblock", O_NONBLOCK }, +#else +# define O_NONBLOCK 0 +#endif +#ifdef O_FSYNC + { "fsync", O_FSYNC }, +#else +# define O_FSYNC 0 +#endif +#ifdef O_DSYNC + { "dsync", O_DSYNC }, +#else +# define O_DSYNC 0 +#endif +#ifdef O_RSYNC + { "rsync", O_RSYNC }, +#else +# define O_RSYNC 0 +#endif +#ifdef O_ALT_IO + { "altio", O_ALT_IO }, +#else +# define O_ALT_IO 0 +#endif +#ifdef O_DIRECT + { "direct", O_DIRECT }, +#else +# define O_DIRECT 0 +#endif +#ifdef O_NOATIME + { "noatime", O_NOATIME }, +#else +# define O_NOATIME 0 +#endif +#ifdef O_NOSIGPIPE + { "nosigpipe", O_NOSIGPIPE }, +#else +# define O_NOSIGPIPE 0 +#endif + +#ifndef O_CLOEXEC +# define ALLFLAGS (O_APPEND|O_ASYNC|O_SYNC|O_NONBLOCK|O_FSYNC|O_DSYNC|\ + O_RSYNC|O_ALT_IO|O_DIRECT|O_NOATIME|O_NOSIGPIPE) + +/* An unused bit in the file status flags word we can use to pass around the + state of close-on-exec. */ +# define O_CLOEXEC ((~ALLFLAGS) ^ ((~ALLFLAGS) & ((~ALLFLAGS) - 1))) +#endif + +#ifdef O_CLOEXEC + { "cloexec", O_CLOEXEC }, +#endif +}; + +#define N_FLAGS (sizeof (file_flags) / sizeof (file_flags[0])) + +#ifndef errno +extern int errno; +#endif + +/* FIX THIS */ +static int +getallflags () +{ + int i, allflags; + + for (i = allflags = 0; i < N_FLAGS; i++) + allflags |= file_flags[i].value; + return allflags; +} + +static int +getflags(int fd, int p) +{ + int c, f; + int allflags; + + if ((c = fcntl(fd, F_GETFD)) == -1) + { + if (p) + builtin_error("can't get status for fd %d: %s", fd, strerror(errno)); + return -1; + } + + if ((f = fcntl(fd, F_GETFL)) == -1) + { + if (p) + builtin_error("Can't get flags for fd %d: %s", fd, strerror(errno)); + return -1; + } + + if (c) + f |= O_CLOEXEC; + + return f & getallflags(); +} + +static void +printone(int fd, int p, int verbose) +{ + int f; + size_t i; + + if ((f = getflags(fd, p)) == -1) + return; + + printf ("%d:", fd); + + for (i = 0; i < N_FLAGS; i++) + { + if (f & file_flags[i].value) + { + printf ("%s%s", verbose ? "+" : "", file_flags[i].name); + f &= ~file_flags[i].value; + } + else if (verbose) + printf ( "-%s", file_flags[i].name); + else + continue; + + if (f || (verbose && i != N_FLAGS - 1)) + putchar (','); + } + printf ("\n"); +} + +static int +parseflags(char *s, int *p, int *n) +{ + int f, *v; + size_t i; + + f = 0; + *p = *n = 0; + + for (s = strtok(s, ","); s; s = strtok(NULL, ",")) + { + switch (*s) + { + case '+': + v = p; + s++; + break; + case '-': + v = n; + s++; + break; + default: + v = &f; + break; + } + + for (i = 0; i < N_FLAGS; i++) + if (strcmp(s, file_flags[i].name) == 0) + { + *v |= file_flags[i].value; + break; + } + if (i == N_FLAGS) + builtin_error("invalid flag `%s'", s); + } + + return f; +} + +static void +setone(int fd, char *v, int verbose) +{ + int f, n, pos, neg, cloexec; + + f = getflags(fd, 1); + if (f == -1) + return; + + parseflags(v, &pos, &neg); + + cloexec = -1; + + if ((pos & O_CLOEXEC) && (f & O_CLOEXEC) == 0) + cloexec = FD_CLOEXEC; + if ((neg & O_CLOEXEC) && (f & O_CLOEXEC)) + cloexec = 0; + + if (cloexec != -1 && fcntl(fd, F_SETFD, cloexec) == -1) + builtin_error("can't set status for fd %d: %s", fd, strerror(errno)); + + pos &= ~O_CLOEXEC; + neg &= ~O_CLOEXEC; + f &= ~O_CLOEXEC; + + n = f; + n |= pos; + n &= ~neg; + + if (n != f && fcntl(fd, F_SETFL, n) == -1) + builtin_error("can't set flags for fd %d: %s", fd, strerror(errno)); +} + +static int +getmaxfd () +{ + int maxfd, ignore; + +#ifdef F_MAXFD + maxfd = fcntl (0, F_MAXFD); + if (maxfd > 0) + return maxfd; +#endif + + maxfd = getdtablesize (); + if (maxfd <= 0) + maxfd = HIGH_FD_MAX; + for (maxfd--; maxfd > 0; maxfd--) + if (fcntl (maxfd, F_GETFD, &ignore) != -1) + break; + + return maxfd; +} + +int +fdflags_builtin (WORD_LIST *list) +{ + int opt, maxfd, i, num, verbose, setflag; + char *setspec; + WORD_LIST *l; + intmax_t inum; + + setflag = verbose = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "s:v")) != -1) + { + switch (opt) + { + case 's': + setflag = 1; + setspec = list_optarg; + break; + case 'v': + verbose = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + + } + list = loptend; + + /* Maybe we could provide some default here, but we don't yet. */ + if (list == 0 && setflag) + return (EXECUTION_SUCCESS); + + if (list == 0) + { + maxfd = getmaxfd (); + if (maxfd < 0) + { + builtin_error ("can't get max fd: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + for (i = 0; i < maxfd; i++) + printone (i, 0, verbose); + return (EXECUTION_SUCCESS); + } + + opt = EXECUTION_SUCCESS; + for (l = list; l; l = l->next) + { + if (legal_number (l->word->word, &inum) == 0 || inum < 0) + { + builtin_error ("%s: invalid file descriptor", l->word->word); + opt = EXECUTION_FAILURE; + continue; + } + num = inum; /* truncate to int */ + if (setflag) + setone (num, setspec, verbose); + else + printone (num, 1, verbose); + } + + return (opt); +} + +char *fdflags_doc[] = +{ + "Display and modify file descriptor flags.", + "", + "Display or, if the -s option is supplied, set flags for each file", + "descriptor supplied as an argument. If the -v option is supplied,", + "the display is verbose, including each settable option name in the", + "form of a string such as that accepted by the -s option.", + "", + "The -s option accepts a string with a list of flag names, each preceded", + "by a `+' (set) or `-' (unset). Those changes are applied to each file", + "descriptor supplied as an argument.", + "", + "If no file descriptor arguments are supplied, the displayed information", + "consists of the status of flags for each of the shell's open files.", + (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 fdflags_struct = { + "fdflags", /* builtin name */ + fdflags_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + fdflags_doc, /* array of long documentation strings. */ + "fdflags [-v] [-s flags_string] [fd ...]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/examples/loadables/finfo.c b/examples/loadables/finfo.c index af7ffb6..8c278c3 100644 --- a/examples/loadables/finfo.c +++ b/examples/loadables/finfo.c @@ -5,11 +5,35 @@ * 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 . +*/ + #ifdef HAVE_CONFIG_H # include #endif #include +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif #include "posixstat.h" #include #include @@ -21,6 +45,7 @@ #include "shell.h" #include "builtins.h" #include "common.h" +#include "getopt.h" #ifndef errno extern int errno; @@ -28,8 +53,10 @@ extern int errno; extern char **make_builtin_argv (); +static void perms(); static int printst(); static int printsome(); +static void printmode(); static int printfinfo(); static int finfo_main(); @@ -174,7 +201,7 @@ int m; return (m & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID)); } -static int +static void perms(m) int m; { @@ -218,7 +245,7 @@ int m; printf ("u=%s,g=%s,o=%s", ubits, gbits, obits); } -static int +static void printmode(mode) int mode; { @@ -244,7 +271,7 @@ int mode; printf("\n"); } -static int +static int printst(st) struct stat *st; { @@ -313,13 +340,13 @@ int flags; else printf("%ld\n", st->st_ctime); } else if (flags & OPT_DEV) - printf("%d\n", st->st_dev); + printf("%lu\n", (unsigned long)st->st_dev); else if (flags & OPT_INO) - printf("%d\n", st->st_ino); + printf("%lu\n", (unsigned long)st->st_ino); else if (flags & OPT_FID) - printf("%d:%ld\n", st->st_dev, st->st_ino); + printf("%lu:%lu\n", (unsigned long)st->st_dev, (unsigned long)st->st_ino); else if (flags & OPT_NLINK) - printf("%d\n", st->st_nlink); + printf("%lu\n", (unsigned long)st->st_nlink); else if (flags & OPT_LNKNAM) { #ifdef S_ISLNK b = xmalloc(4096); @@ -441,7 +468,7 @@ char **argv; void builtin_usage() { - fprintf(stderr, "%s: usage: %s [-%s] [file ...]\n", prog, OPTIONS); + fprintf(stderr, "%s: usage: %s [-%s] [file ...]\n", prog, prog, OPTIONS); } #ifndef HAVE_STRERROR diff --git a/examples/loadables/getconf.c b/examples/loadables/getconf.c index d3dec41..75a0a56 100644 --- a/examples/loadables/getconf.c +++ b/examples/loadables/getconf.c @@ -1,1345 +1,1148 @@ -/* - * 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. - */ +/* Copyright (C) 1991-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. -/* - * 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 - */ + 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; version 2 of the License, or + (at your option) any later version. -#ifdef HAVE_CONFIG_H -# include -#endif + 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. -#ifdef HAVE_SYS_PARAM_H -# include -#endif + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Modified by Chet Ramey for inclusion in bash. */ + +#include -#include -#ifdef HAVE_LIMITS_H -#include -#endif -#ifdef HAVE_LOCALE_H -#include -#endif -#ifdef HAVE_UNISTD_H #include -#endif #include +#include +#include +#include +#include +#include +#include #include "typemax.h" - -#include "bashansi.h" -#include "shell.h" -#include "builtins.h" -#include "stdc.h" -#include "common.h" -#include "bashgetopt.h" - +#include "loadables.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 }, +#define VAL_LLONG_MIN -1000 +#define VAL_LLONG_MAX -1001 +#define VAL_ULLONG_MAX -1002 +#define VAL_ULONG_MAX -1003 +#define VAL_SSIZE_MAX -1004 +#define VAL_SIZE_MAX -1005 + +struct conf + { + const char *name; + const long call_name; /* or value for CONSTANT */ + const enum { SYSCONF, CONFSTR, PATHCONF, CONSTANT, UNDEFINED } call; + }; + +static const struct conf vars[] = + { +#ifdef _PC_LINK_MAX + { "LINK_MAX", _PC_LINK_MAX, PATHCONF }, + { "_POSIX_LINK_MAX", _PC_LINK_MAX, PATHCONF }, +#else + { "LINK_MAX", _POSIX_LINK_MAX, CONSTANT }, + { "_POSIX_LINK_MAX", _POSIX_LINK_MAX, CONSTANT }, #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 }, +#ifdef _PC_MAX_CANON + { "MAX_CANON", _PC_MAX_CANON, PATHCONF }, + { "_POSIX_MAX_CANON", _PC_MAX_CANON, PATHCONF }, +#else + { "MAX_CANON", _POSIX_MAX_CANON, CONSTANT }, + { "_POSIX_MAX_CANON", _POSIX_MAX_CANON, CONSTANT }, #endif -#if defined (_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS) - { "POSIX_V6_ILP32_OFFBIG_LINTFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS }, +#ifdef _PC_MAX_INPUT + { "MAX_INPUT", _PC_MAX_INPUT, PATHCONF }, + { "_POSIX_MAX_INPUT", _PC_MAX_INPUT, PATHCONF }, +#else + { "MAX_INPUT", _POSIX_MAX_INPUT, CONSTANT }, + { "_POSIX_MAX_INPUT", _POSIX_MAX_INPUT, CONSTANT }, #endif -#if defined (_SC_POSIX_V6_LP64_OFF64) - { "_POSIX_V6_LP64_OFF64", SYSCONF, _SC_POSIX_V6_LP64_OFF64 }, +#ifdef _PC_NAME_MAX + { "NAME_MAX", _PC_NAME_MAX, PATHCONF }, + { "_POSIX_NAME_MAX", _PC_NAME_MAX, PATHCONF }, +#else + { "NAME_MAX", _POSIX_NAME_MAX, CONSTANT }, + { "_POSIX_NAME_MAX", _POSIX_NAME_MAX, CONSTANT }, #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 }, +#ifdef _PC_PATH_MAX + { "PATH_MAX", _PC_PATH_MAX, PATHCONF }, + { "_POSIX_PATH_MAX", _PC_PATH_MAX, PATHCONF }, +#else + { "PATH_MAX", _POSIX_PATH_MAX, CONSTANT }, + { "_POSIX_PATH_MAX", _POSIX_PATH_MAX, CONSTANT }, #endif -#if defined (CS_POSIX_V6_LP64_OFF64_LINTFLAGS) - { "POSIX_V6_LP64_OFF64_LINTFLAGS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS }, +#ifdef _PC_PIPE_BUF + { "PIPE_BUF", _PC_PIPE_BUF, PATHCONF }, + { "_POSIX_PIPE_BUF", _PC_PIPE_BUF, PATHCONF }, +#else + { "PIPE_BUF", _POSIX_PIPE_BUF, CONSTANT }, + { "_POSIX_PIPE_BUF", _POSIX_PIPE_BUF, CONSTANT }, #endif -#if defined (_SC_POSIX_V6_LPBIG_OFFBIG) - { "_POSIX_V6_LPBIG_OFFBIG", SYSCONF, _SC_POSIX_V6_LPBIG_OFFBIG }, +#ifdef _PC_SOCK_MAXBUF + { "SOCK_MAXBUF", _PC_SOCK_MAXBUF, PATHCONF }, #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 }, +#ifdef _PC_ASYNC_IO + { "_POSIX_ASYNC_IO", _PC_ASYNC_IO, PATHCONF }, #endif -#if defined (_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS) - { "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS }, + { "_POSIX_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED, PATHCONF }, + { "_POSIX_NO_TRUNC", _PC_NO_TRUNC, PATHCONF }, +#ifdef _PC_PRIO_IO + { "_POSIX_PRIO_IO", _PC_PRIO_IO, PATHCONF }, #endif - -#if defined (_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS) - { "POSIX_6_WIDTH_RESTRICTED_ENVS", CONFSTR, _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS }, +#ifdef _PC_SYNC_IO + { "_POSIX_SYNC_IO", _PC_SYNC_IO, PATHCONF }, #endif + { "_POSIX_VDISABLE", _PC_VDISABLE, PATHCONF }, - /* POSIX.2 Utility Limit Minimum Values */ -#ifdef _POSIX2_BC_BASE_MAX - { "POSIX2_BC_BASE_MAX", CONSTANT, _POSIX2_BC_BASE_MAX }, + { "ARG_MAX", _SC_ARG_MAX, SYSCONF }, + { "ATEXIT_MAX", _SC_ATEXIT_MAX, SYSCONF }, +#ifdef _SC_CHAR_BIT + { "CHAR_BIT", _SC_CHAR_BIT, SYSCONF }, #else - { "POSIX2_BC_BASE_MAX", G_UNDEF, -1 }, + { "CHAR_BIT", CHAR_BIT, CONSTANT }, #endif -#ifdef _POSIX2_BC_DIM_MAX - { "POSIX2_BC_DIM_MAX", CONSTANT, _POSIX2_BC_DIM_MAX }, +#ifdef _SC_CHAR_MAX + { "CHAR_MAX", _SC_CHAR_MAX, SYSCONF }, #else - { "POSIX2_BC_DIM_MAX", G_UNDEF, -1 }, + { "CHAR_BIT", CHAR_MAX, CONSTANT }, #endif -#ifdef _POSIX2_BC_SCALE_MAX - { "POSIX2_BC_SCALE_MAX", CONSTANT, _POSIX2_BC_SCALE_MAX }, +#ifdef _SC_CHAR_MIN + { "CHAR_MIN", _SC_CHAR_MIN, SYSCONF }, #else - { "POSIX2_BC_SCALE_MAX", G_UNDEF, -1 }, + { "CHAR_MIN", CHAR_MIN, CONSTANT }, #endif -#ifdef _POSIX2_BC_STRING_MAX - { "POSIX2_BC_STRING_MAX", CONSTANT, _POSIX2_BC_STRING_MAX }, + { "CHILD_MAX", _SC_CHILD_MAX, SYSCONF }, + { "CLK_TCK", _SC_CLK_TCK, SYSCONF }, +#ifdef _SC_INT_BIT + { "INT_BIT", _SC_INT_BIT, SYSCONF }, #else - { "POSIX2_BC_STRING_MAX", G_UNDEF, -1 }, + { "INT_BIT", INT_BIT, CONSTANT }, #endif -#ifdef _POSIX2_CHARCLASS_NAME_MAX - { "POSIX2_CHARCLASS_NAME_MAX", CONSTANT, _POSIX2_CHARCLASS_NAME_MAX }, +#ifdef _SC_INT_MAX + { "INT_MAX", _SC_INT_MAX, SYSCONF }, #else - { "POSIX2_CHARCLASS_NAME_MAX", G_UNDEF, -1 }, + { "INT_MAX", INT_MAX, CONSTANT }, #endif -#ifdef _POSIX2_COLL_WEIGHTS_MAX - { "POSIX2_COLL_WEIGHTS_MAX", CONSTANT, _POSIX2_COLL_WEIGHTS_MAX }, +#ifdef _SC_INT_MIN + { "INT_MIN", _SC_INT_MIN, SYSCONF }, #else - { "POSIX2_COLL_WEIGHTS_MAX", G_UNDEF, -1 }, + { "INT_MIN", INT_MIN, CONSTANT }, #endif -#if defined (_POSIX2_EQUIV_CLASS_MAX) - { "POSIX2_EQUIV_CLASS_MAX", CONSTANT, _POSIX2_EQUIV_CLASS_MAX }, +#ifdef _SC_UIO_MAXIOV + { "IOV_MAX", _SC_UIO_MAXIOV, SYSCONF }, #endif -#ifdef _POSIX2_EXPR_NEST_MAX - { "POSIX2_EXPR_NEST_MAX", CONSTANT, _POSIX2_EXPR_NEST_MAX }, + { "LOGNAME_MAX", _SC_LOGIN_NAME_MAX, SYSCONF }, +#ifdef _SC_LONG_BIT + { "LONG_BIT", _SC_LONG_BIT, SYSCONF }, #else - { "POSIX2_EXPR_NEST_MAX", G_UNDEF, -1 }, + { "LONG_BIT", LONG_BIT, CONSTANT }, #endif -#ifdef _POSIX2_LINE_MAX - { "POSIX2_LINE_MAX", CONSTANT, _POSIX2_LINE_MAX }, + { "LONG_MIN", LONG_MIN, CONSTANT }, + { "LONG_MAX", LONG_MAX, CONSTANT }, +#if HAVE_LONG_LONG_INT + { "LLONG_MIN", VAL_LLONG_MIN, CONSTANT }, + { "LLONG_MAX", VAL_LLONG_MAX, CONSTANT }, #else - { "POSIX2_LINE_MAX", G_UNDEF, -1 }, + { "LLONG_MIN", LLONG_MIN, CONSTANT }, + { "LLONG_MAX", LLONG_MAX, CONSTANT }, #endif -#ifdef _POSIX2_RE_DUP_MAX - { "POSIX2_RE_DUP_MAX", CONSTANT, _POSIX2_RE_DUP_MAX }, +#ifdef _SC_MB_LEN_MAX + { "MB_LEN_MAX", _SC_MB_LEN_MAX, SYSCONF }, #else - { "POSIX2_RE_DUP_MAX", G_UNDEF, -1 }, + { "MB_LEN_MAX", MB_LEN_MAX, CONSTANT }, #endif -#if defined (_POSIX2_VERSION) - { "POSIX2_VERSION", CONSTANT, _POSIX2_VERSION }, -#else -# if !defined (_SC_2_VERSION) - { "POSIX2_VERSION", G_UNDEF, -1 }, -# endif + { "NGROUPS_MAX", _SC_NGROUPS_MAX, SYSCONF }, +#ifdef _SC_NL_ARGMAX + { "NL_ARGMAX", _SC_NL_ARGMAX, SYSCONF }, #endif - -#ifdef _POSIX2_BC_BASE_MAX - { "_POSIX2_BC_BASE_MAX", CONSTANT, _POSIX2_BC_BASE_MAX }, -#else - { "_POSIX2_BC_BASE_MAX", G_UNDEF, -1 }, +#ifdef _SC_NL_LANGMAX + { "NL_LANGMAX", _SC_NL_LANGMAX, SYSCONF }, #endif -#ifdef _POSIX2_BC_DIM_MAX - { "_POSIX2_BC_DIM_MAX", CONSTANT, _POSIX2_BC_DIM_MAX }, -#else - { "_POSIX2_BC_DIM_MAX", G_UNDEF, -1 }, +#ifdef _SC_NL_MSGMAX + { "NL_MSGMAX", _SC_NL_MSGMAX, SYSCONF }, #endif -#ifdef _POSIX2_BC_SCALE_MAX - { "_POSIX2_BC_SCALE_MAX", CONSTANT, _POSIX2_BC_SCALE_MAX }, -#else - { "_POSIX2_BC_SCALE_MAX", G_UNDEF, -1 }, +#ifdef _SC_NL_NMAX + { "NL_NMAX", _SC_NL_NMAX, SYSCONF }, #endif -#ifdef _POSIX2_BC_STRING_MAX - { "_POSIX2_BC_STRING_MAX", CONSTANT, _POSIX2_BC_STRING_MAX }, -#else - { "_POSIX2_BC_STRING_MAX", G_UNDEF, -1 }, +#ifdef _SC_NL_SETMAX + { "NL_SETMAX", _SC_NL_SETMAX, SYSCONF }, #endif -#ifdef _POSIX2_CHARCLASS_NAME_MAX - { "_POSIX2_CHARCLASS_NAME_MAX", CONSTANT, _POSIX2_CHARCLASS_NAME_MAX }, -#else - { "_POSIX2_CHARCLASS_NAME_MAX", G_UNDEF, -1 }, +#ifdef _SC_NL_TEXTMAX + { "NL_TEXTMAX", _SC_NL_TEXTMAX, SYSCONF }, #endif -#ifdef _POSIX2_COLL_WEIGHTS_MAX - { "_POSIX2_COLL_WEIGHTS_MAX", CONSTANT, _POSIX2_COLL_WEIGHTS_MAX }, -#else - { "_POSIX2_COLL_WEIGHTS_MAX", G_UNDEF, -1 }, + { "NSS_BUFLEN_GROUP", _SC_GETGR_R_SIZE_MAX, SYSCONF }, + { "NSS_BUFLEN_PASSWD", _SC_GETPW_R_SIZE_MAX, SYSCONF }, +#ifdef _SC_NZERO + { "NZERO", _SC_NZERO, SYSCONF }, #endif -#if defined (_POSIX2_EQUIV_CLASS_MAX) - { "POSIX2_EQUIV_CLASS_MAX", CONSTANT, _POSIX2_EQUIV_CLASS_MAX }, + { "OPEN_MAX", _SC_OPEN_MAX, SYSCONF }, + { "PAGESIZE", _SC_PAGESIZE, SYSCONF }, + { "PAGE_SIZE", _SC_PAGESIZE, SYSCONF }, +#ifdef _SC_PASS_MAX + { "PASS_MAX", _SC_PASS_MAX, SYSCONF }, #endif -#ifdef _POSIX2_EXPR_NEST_MAX - { "_POSIX2_EXPR_NEST_MAX", CONSTANT, _POSIX2_EXPR_NEST_MAX }, + { "PTHREAD_DESTRUCTOR_ITERATIONS", _SC_THREAD_DESTRUCTOR_ITERATIONS, SYSCONF }, + { "PTHREAD_KEYS_MAX", _SC_THREAD_KEYS_MAX, SYSCONF }, + { "PTHREAD_STACK_MIN", _SC_THREAD_STACK_MIN, SYSCONF }, + { "PTHREAD_THREADS_MAX", _SC_THREAD_THREADS_MAX, SYSCONF }, +#ifdef _SC_SCHAR_MAX + { "SCHAR_MAX", _SC_SCHAR_MAX, SYSCONF }, #else - { "_POSIX2_EXPR_NEST_MAX", G_UNDEF, -1 }, + { "SCHAR_MAX", SCHAR_MAX, CONSTANT }, #endif -#ifdef _POSIX2_LINE_MAX - { "_POSIX2_LINE_MAX", CONSTANT, _POSIX2_LINE_MAX }, +#ifdef _SC_SCHAR_MIN + { "SCHAR_MIN", _SC_SCHAR_MIN, SYSCONF }, #else - { "_POSIX2_LINE_MAX", G_UNDEF, -1 }, + { "SCHAR_MIN", SCHAR_MIN, CONSTANT }, #endif -#ifdef _POSIX2_RE_DUP_MAX - { "_POSIX2_RE_DUP_MAX", CONSTANT, _POSIX2_RE_DUP_MAX }, +#ifdef _SC_SHRT_MAX + { "SHRT_MAX", _SC_SHRT_MAX, SYSCONF }, #else - { "_POSIX2_RE_DUP_MAX", G_UNDEF, -1 }, + { "SHRT_MAX", SHRT_MAX, CONSTANT }, #endif - - /* X/OPEN Maxmimum Values */ -#ifdef _XOPEN_IOV_MAX - { "_XOPEN_IOV_MAX", CONSTANT, _XOPEN_IOV_MAX }, +#ifdef _SC_SHRT_MIN + { "SHRT_MIN", _SC_SHRT_MIN, SYSCONF }, #else - { "_XOPEN_IOV_MAX", G_UNDEF, -1 }, + { "SHRT_MIN", SHRT_MIN, CONSTANT }, #endif -#ifdef _XOPEN_NAME_MAX - { "_XOPEN_NAME_MAX", CONSTANT, _XOPEN_NAME_MAX }, +#ifdef _SC_SIZE_MAX + { "SIZE_MAX", _SC_SIZE_MAX, SYSCONF }, #else - { "_XOPEN_NAME_MAX", G_UNDEF, -1 }, + { "SIZE_MAX", VAL_SIZE_MAX, CONSTANT }, #endif -#ifdef _XOPEN_PATH_MAX - { "_XOPEN_PATH_MAX", CONSTANT, _XOPEN_PATH_MAX }, +#ifdef _SC_SSIZE_MAX + { "SSIZE_MAX", _SC_SSIZE_MAX, SYSCONF }, +#elif SIZEOF_SIZE_MAX == 8 + { "SSIZE_MAX", VAL_SSIZE_MAX, CONSTANT }, #else - { "_XOPEN_PATH_MAX", G_UNDEF, -1 }, + { "SSIZE_MAX", VAL_SSIZE_MAX, CONSTANT }, #endif - - /* POSIX.1 Minimum Values */ -#ifdef _POSIX_AIO_LISTIO_MAX - { "_POSIX_AIO_LISTIO_MAX", CONSTANT, _POSIX_AIO_LISTIO_MAX }, + { "TTY_NAME_MAX", _SC_TTY_NAME_MAX, SYSCONF }, + { "TZNAME_MAX", _SC_TZNAME_MAX, SYSCONF }, +#ifdef _SC_UCHAR_MAX + { "UCHAR_MAX", _SC_UCHAR_MAX, SYSCONF }, #else - { "_POSIX_AIO_LISTIO_MAX", G_UNDEF, -1 }, + { "UCHAR_MAX", UCHAR_MAX, CONSTANT }, #endif -#ifdef _POSIX_AIO_MAX - { "_POSIX_AIO_MAX", CONSTANT, _POSIX_AIO_MAX }, +#ifdef _SC_UINT_MAX + { "UINT_MAX", _SC_UINT_MAX, SYSCONF }, #else - { "_POSIX_AIO_MAX", G_UNDEF, -1 }, + { "UINT_MAX", UINT_MAX, CONSTANT }, #endif -#ifdef _POSIX_ARG_MAX - { "_POSIX_ARG_MAX", CONSTANT, _POSIX_ARG_MAX }, -#else - { "_POSIX_ARG_MAX", G_UNDEF, -1 }, +#ifdef _SC_UIO_MAXIOV + { "UIO_MAXIOV", _SC_UIO_MAXIOV, SYSCONF }, #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 }, +#ifdef _SC_ULONG_MAX + { "ULONG_MAX", _SC_ULONG_MAX, SYSCONF }, #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 }, + { "ULONG_MAX", VAL_ULONG_MAX, CONSTANT }, +#endif +#ifdef HAVE_LONG_LONG_INT + { "ULLONG_MAX", VAL_ULLONG_MAX, CONSTANT }, +#endif +#ifdef _SC_USHRT_MAX + { "USHRT_MAX", _SC_USHRT_MAX, SYSCONF }, #else - { "_POSIX_TZNAME_MAX", G_UNDEF, -1 }, -#endif - - /* POSIX.1 Maximum Values */ -#ifdef _POSIX_CLOCKRES_MIN - { "_POSIX_CLOCKRES_MIN", CONSTANT, _POSIX_CLOCKRES_MIN }, + { "USHRT_MAX", USHRT_MAX, CONSTANT }, +#endif +#ifdef _SC_WORD_BIT + { "WORD_BIT", _SC_WORD_BIT, SYSCONF }, #else - { "_POSIX_CLOCKRES_MIN", G_UNDEF, -1 }, + { "WORD_BIT", WORD_BIT, CONSTANT }, #endif - - /* POSIX.1-2001/XPG6 (and later) Runtime Invariants from */ -#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 }, +#ifdef _SC_AVPHYS_PAGES + { "_AVPHYS_PAGES", _SC_AVPHYS_PAGES, SYSCONF }, #endif -#ifdef _SC_BC_DIM_MAX - { "BC_DIM_MAX", SYSCONF, _SC_BC_DIM_MAX }, + { "_NPROCESSORS_CONF", _SC_NPROCESSORS_CONF, SYSCONF }, + { "_NPROCESSORS_ONLN", _SC_NPROCESSORS_ONLN, SYSCONF }, + { "_PHYS_PAGES", _SC_PHYS_PAGES, SYSCONF }, +#ifdef _SC_ARG_MAX + { "_POSIX_ARG_MAX", _SC_ARG_MAX, SYSCONF }, +#else + { "_POSIX_ARG_MAX", _POSIX_ARG_MAX, CONSTANT }, #endif -#ifdef _SC_BC_SCALE_MAX - { "BC_SCALE_MAX", SYSCONF, _SC_BC_SCALE_MAX }, + { "_POSIX_ASYNCHRONOUS_IO", _SC_ASYNCHRONOUS_IO, SYSCONF }, +#ifdef _SC_CHILD_MAX + { "_POSIX_CHILD_MAX", _SC_CHILD_MAX, SYSCONF }, +#else + { "_POSIX_CHILD_MAX", _POSIX_CHILD_MAX, CONSTANT }, #endif -#ifdef _SC_BC_STRING_MAX - { "BC_STRING_MAX", SYSCONF, _SC_BC_STRING_MAX }, + { "_POSIX_FSYNC", _SC_FSYNC, SYSCONF }, + { "_POSIX_JOB_CONTROL", _SC_JOB_CONTROL, SYSCONF }, + { "_POSIX_MAPPED_FILES", _SC_MAPPED_FILES, SYSCONF }, + { "_POSIX_MEMLOCK", _SC_MEMLOCK, SYSCONF }, + { "_POSIX_MEMLOCK_RANGE", _SC_MEMLOCK_RANGE, SYSCONF }, + { "_POSIX_MEMORY_PROTECTION", _SC_MEMORY_PROTECTION, SYSCONF }, + { "_POSIX_MESSAGE_PASSING", _SC_MESSAGE_PASSING, SYSCONF }, + { "_POSIX_NGROUPS_MAX", _SC_NGROUPS_MAX, SYSCONF }, + { "_POSIX_OPEN_MAX", _SC_OPEN_MAX, SYSCONF }, +#ifdef _SC_PII + { "_POSIX_PII", _SC_PII, SYSCONF }, #endif -#ifdef CHARCLASS_NAME_MAX - { "CHARCLASS_NAME_MAX", CONSTANT, CHARCLASS_NAME_MAX }, +#ifdef _SC_PII_INTERNET + { "_POSIX_PII_INTERNET", _SC_PII_INTERNET, SYSCONF }, #endif -#ifdef _SC_COLL_WEIGHTS_MAX - { "COLL_WEIGHTS_MAX", SYSCONF, _SC_COLL_WEIGHTS_MAX }, +#ifdef _SC_PII_INTERNET_DGRAM + { "_POSIX_PII_INTERNET_DGRAM", _SC_PII_INTERNET_DGRAM, SYSCONF }, #endif -#ifdef _SC_EXPR_NEST_MAX - { "EXPR_NEST_MAX", SYSCONF, _SC_EXPR_NEST_MAX }, +#ifdef _SC_PII_INTERNET_STREAM + { "_POSIX_PII_INTERNET_STREAM", _SC_PII_INTERNET_STREAM, SYSCONF }, #endif -#ifdef _SC_LINE_MAX - { "LINE_MAX", SYSCONF, _SC_LINE_MAX }, +#ifdef _SC_PII_OSI + { "_POSIX_PII_OSI", _SC_PII_OSI, SYSCONF }, #endif -# ifdef NL_ARGMAX - { "NL_ARGMAX", CONSTANT, NL_ARGMAX }, +#ifdef _SC_PII_OSI_CLTS + { "_POSIX_PII_OSI_CLTS", _SC_PII_OSI_CLTS, SYSCONF }, #endif -#ifdef NL_LANGMAX - { "NL_LANGMAX", CONSTANT, NL_LANGMAX }, +#ifdef _SC_PII_OSI_COTS + { "_POSIX_PII_OSI_COTS", _SC_PII_OSI_COTS, SYSCONF }, #endif -#ifdef NL_MSGMAX - { "NL_MSGMAX", CONSTANT, NL_MSGMAX }, +#ifdef _SC_PII_OSI_M + { "_POSIX_PII_OSI_M", _SC_PII_OSI_M, SYSCONF }, #endif -#ifdef NL_NMAX - { "NL_NMAX", CONSTANT, NL_NMAX }, +#ifdef _SC_PII_SOCKET + { "_POSIX_PII_SOCKET", _SC_PII_SOCKET, SYSCONF }, #endif -#ifdef NL_SETMAX - { "NL_SETMAX", CONSTANT, NL_SETMAX }, +#ifdef _SC_PII_XTI + { "_POSIX_PII_XTI", _SC_PII_XTI, SYSCONF }, #endif -#ifdef NL_TEXTMAX - { "NL_TEXTMAX", CONSTANT, NL_TEXTMAX }, +#ifdef _SC_POLL + { "_POSIX_POLL", _SC_POLL, SYSCONF }, #endif -#ifdef _SC_RAW_SOCKET - { "RAW_SOCKET", SYSCONF, _SC_RAW_SOCKET }, +#ifdef _SC_PRIORITIZED_IO + { "_POSIX_PRIORITIZED_IO", _SC_PRIORITIZED_IO, SYSCONF }, #endif -#ifdef _SC_RE_DUP_MAX - { "RE_DUP_MAX", SYSCONF, _SC_RE_DUP_MAX }, + { "_POSIX_PRIORITY_SCHEDULING", _SC_PRIORITY_SCHEDULING, SYSCONF }, + { "_POSIX_REALTIME_SIGNALS", _SC_REALTIME_SIGNALS, SYSCONF }, + { "_POSIX_SAVED_IDS", _SC_SAVED_IDS, SYSCONF }, +#ifdef _SC_SELECT + { "_POSIX_SELECT", _SC_SELECT, SYSCONF }, #endif - - /* POSIX.2 Optional Facility Configuration Values */ -#ifdef _SC_2_C_BIND - { "POSIX2_C_BIND", SYSCONF, _SC_2_C_BIND }, + { "_POSIX_SEMAPHORES", _SC_SEMAPHORES, SYSCONF }, + { "_POSIX_SHARED_MEMORY_OBJECTS", _SC_SHARED_MEMORY_OBJECTS, SYSCONF }, +#ifdef _SC_SSIZE_MAX + { "_POSIX_SSIZE_MAX", _SC_SSIZE_MAX, SYSCONF }, +#elif SIZEOF_SIZE_T == 8 + { "_POSIX_SSIZE_MAX", VAL_SSIZE_MAX, CONSTANT }, #else - { "POSIX2_C_BIND", G_UNDEF, -1 }, + { "_POSIX_SSIZE_MAX", VAL_SSIZE_MAX, CONSTANT }, #endif -#ifdef _SC_2_C_DEV - { "POSIX2_C_DEV", SYSCONF, _SC_2_C_DEV }, +#ifdef _SC_STREAM_MAX + { "_POSIX_STREAM_MAX", _SC_STREAM_MAX, SYSCONF }, +#else + { "_POSIX_STREAM_MAX", _POSIX_STREAM_MAX, CONSTANT }, +#endif + { "_POSIX_SYNCHRONIZED_IO", _SC_SYNCHRONIZED_IO, SYSCONF }, + { "_POSIX_THREADS", _SC_THREADS, SYSCONF }, + { "_POSIX_THREAD_ATTR_STACKADDR", _SC_THREAD_ATTR_STACKADDR, SYSCONF }, + { "_POSIX_THREAD_ATTR_STACKSIZE", _SC_THREAD_ATTR_STACKSIZE, SYSCONF }, + { "_POSIX_THREAD_PRIORITY_SCHEDULING", _SC_THREAD_PRIORITY_SCHEDULING, SYSCONF }, + { "_POSIX_THREAD_PRIO_INHERIT", _SC_THREAD_PRIO_INHERIT, SYSCONF }, + { "_POSIX_THREAD_PRIO_PROTECT", _SC_THREAD_PRIO_PROTECT, SYSCONF }, +#ifdef _SC_THREAD_ROBUST_PRIO_INHERIT + { "_POSIX_THREAD_ROBUST_PRIO_INHERIT", _SC_THREAD_ROBUST_PRIO_INHERIT, + SYSCONF }, +#endif +#ifdef _SC_THREAD_ROBUST_PRIO_PROTECT + { "_POSIX_THREAD_ROBUST_PRIO_PROTECT", _SC_THREAD_ROBUST_PRIO_PROTECT, + SYSCONF }, +#endif + { "_POSIX_THREAD_PROCESS_SHARED", _SC_THREAD_PROCESS_SHARED, SYSCONF }, + { "_POSIX_THREAD_SAFE_FUNCTIONS", _SC_THREAD_SAFE_FUNCTIONS, SYSCONF }, + { "_POSIX_TIMERS", _SC_TIMERS, SYSCONF }, + { "TIMER_MAX", _SC_TIMER_MAX, SYSCONF }, +#ifdef _POSIX_TZNAME_MAX + { "_POSIX_TZNAME_MAX", _SC_TZNAME_MAX, SYSCONF }, #else - { "POSIX2_C_DEV", G_UNDEF, -1 }, + { "_POSIX_TZNAME_MAX", _POSIX_TZNAME_MAX, CONSTANT }, #endif -#if defined (_SC_2_C_VERSION) - { "POSIX2_C_VERSION", SYSCONF, _SC_2_C_VERSION }, -#else - { "POSIX2_C_VERSION", G_UNDEF, -1 }, + { "_POSIX_VERSION", _SC_VERSION, SYSCONF }, +#ifdef _SC_T_IOV_MAX + { "_T_IOV_MAX", _SC_T_IOV_MAX, SYSCONF }, #endif -#if defined (_SC_2_CHAR_TERM) - { "POSIX2_CHAR_TERM", SYSCONF, _SC_2_CHAR_TERM }, -#else - { "POSIX2_CHAR_TERM", G_UNDEF, -1 }, +#ifdef _SC_XOPEN_CRYPT + { "_XOPEN_CRYPT", _SC_XOPEN_CRYPT, SYSCONF }, #endif -#ifdef _SC_2_FORT_DEV - { "POSIX2_FORT_DEV", SYSCONF, _SC_2_FORT_DEV }, -#else - { "POSIX2_FORT_DEV", G_UNDEF, -1 }, +#ifdef _SC_XOPEN_ENH_I18N + { "_XOPEN_ENH_I18N", _SC_XOPEN_ENH_I18N, SYSCONF }, #endif -#ifdef _SC_2_FORT_RUN - { "POSIX2_FORT_RUN", SYSCONF, _SC_2_FORT_RUN }, -#else - { "POSIX2_FORT_RUN", G_UNDEF, -1 }, +#ifdef _SC_XOPEN_LEGACY + { "_XOPEN_LEGACY", _SC_XOPEN_LEGACY, SYSCONF }, #endif -#ifdef _SC_2_LOCALEDEF - { "POSIX2_LOCALEDEF", SYSCONF, _SC_2_LOCALEDEF }, -#else - { "POSIX2_LOCALEDEF", G_UNDEF, -1 }, +#ifdef _SC_XOPEN_REALTIME + { "_XOPEN_REALTIME", _SC_XOPEN_REALTIME, SYSCONF }, #endif -#ifdef _SC_2_SW_DEV - { "POSIX2_SW_DEV", SYSCONF, _SC_2_SW_DEV }, -#else - { "POSIX2_SW_DEV", G_UNDEF, -1 }, +#ifdef _SC_XOPEN_REALTIME_THREADS + { "_XOPEN_REALTIME_THREADS", _SC_XOPEN_REALTIME_THREADS, SYSCONF }, #endif -#if defined (_SC2_UPE) - { "POSIX2_UPE", SYSCONF, _SC_2_UPE }, -#else - { "POSIX2_UPE", G_UNDEF, -1 }, +#ifdef _SC_XOPEN_SHM + { "_XOPEN_SHM", _SC_XOPEN_SHM, SYSCONF }, #endif -#if !defined (_POSIX2_VERSION) && defined (_SC_2_VERSION) - { "_POSIX2_VERSION", SYSCONF, _SC_2_VERSION }, -#else - { "_POSIX2_VERSION", G_UNDEF, -1 }, +#ifdef _SC_XOPEN_UNIX + { "_XOPEN_UNIX", _SC_XOPEN_UNIX, SYSCONF }, #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 }, +#ifdef _SC_XOPEN_VERSION + { "_XOPEN_VERSION", _SC_XOPEN_VERSION, SYSCONF }, #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 }, +#ifdef _SC_XOPEN_XCU_VERSION + { "_XOPEN_XCU_VERSION", _SC_XOPEN_XCU_VERSION, SYSCONF }, #endif - - /* POSIX.1 Configurable System Variables */ -#ifdef _SC_ARG_MAX - { "ARG_MAX", SYSCONF, _SC_ARG_MAX }, +#ifdef _SC_XOPEN_XPG2 + { "_XOPEN_XPG2", _SC_XOPEN_XPG2, SYSCONF }, #endif -#ifdef _SC_CHILD_MAX - { "CHILD_MAX", SYSCONF, _SC_CHILD_MAX }, +#ifdef _SC_XOPEN_XPG3 + { "_XOPEN_XPG3", _SC_XOPEN_XPG3, SYSCONF }, #endif -#ifdef _SC_CLK_TCK - { "CLK_TCK", SYSCONF, _SC_CLK_TCK }, +#ifdef _SC_XOPEN_XPG4 + { "_XOPEN_XPG4", _SC_XOPEN_XPG4, SYSCONF }, #endif -#ifdef _SC_DELAYTIMER_MAX - { "DELAYTIMER_MAX", SYSCONF, _SC_DELAYTIMER_MAX }, + /* POSIX.2 */ +#ifdef _SC_BC_BASE_MAX + { "BC_BASE_MAX", _SC_BC_BASE_MAX, SYSCONF }, + { "POSIX2_BC_BASE_MAX", _SC_BC_BASE_MAX, SYSCONF }, +#else + { "BC_BASE_MAX", _POSIX2_BC_BASE_MAX, CONSTANT }, #endif -#ifdef _SC_NGROUPS_MAX - { "NGROUPS_MAX", SYSCONF, _SC_NGROUPS_MAX }, +#ifdef _SC_BC_BASE_MAX + { "BC_DIM_MAX", _SC_BC_DIM_MAX, SYSCONF }, + { "POSIX2_BC_DIM_MAX", _SC_BC_DIM_MAX, SYSCONF }, +#else + { "BC_DIM_MAX", _POSIX2_BC_DIM_MAX, CONSTANT }, #endif -#ifdef NZERO - { "NZERO", CONSTANT, NZERO }, +#ifdef _SC_BC_SCALE_MAX + { "BC_SCALE_MAX", _SC_BC_SCALE_MAX, SYSCONF }, + { "POSIX2_BC_SCALE_MAX", _SC_BC_SCALE_MAX, SYSCONF }, +#else + { "BC_SCALE_MAX", _POSIX2_BC_SCALE_MAX, CONSTANT }, #endif -#ifdef _SC_OPEN_MAX - { "OPEN_MAX", SYSCONF, _SC_OPEN_MAX }, +#ifdef _SC_BC_STRING_MAX + { "BC_STRING_MAX", _SC_BC_STRING_MAX, SYSCONF }, + { "POSIX2_BC_STRING_MAX", _SC_BC_STRING_MAX, SYSCONF }, +#else + { "BC_STRING_MAX", _POSIX2_BC_STRING_MAX, CONSTANT }, + { "POSIX2_BC_STRING_MAX", _POSIX2_BC_STRING_MAX, CONSTANT }, #endif -#ifdef PASS_MAX - { "PASS_MAX", CONSTANT, PASS_MAX }, +#ifdef _SC_CHARCLASS_NAME_MAX + { "CHARCLASS_NAME_MAX", _SC_CHARCLASS_NAME_MAX, SYSCONF }, #endif -#ifdef _SC_STREAM_MAX - { "STREAM_MAX", SYSCONF, _SC_STREAM_MAX }, +#ifdef _SC_COLL_WEIGHTS_MAX + { "COLL_WEIGHTS_MAX", _SC_COLL_WEIGHTS_MAX, SYSCONF }, + { "POSIX2_COLL_WEIGHTS_MAX", _SC_COLL_WEIGHTS_MAX, SYSCONF }, +#else + { "COLL_WEIGHTS_MAX", _POSIX2_COLL_WEIGHTS_MAX, CONSTANT }, + { "POSIX2_COLL_WEIGHTS_MAX", _POSIX2_COLL_WEIGHTS_MAX, CONSTANT }, #endif -#ifdef TMP_MAX - { "TMP_MAX", CONSTANT, TMP_MAX }, +#ifdef _SC_EQUIV_CLASS_MAX + { "EQUIV_CLASS_MAX", _SC_EQUIV_CLASS_MAX, SYSCONF }, +#else + { "EQUIV_CLASS_MAX", _POSIX2_EQUIV_CLASS_MAX, CONSTANT }, #endif -#ifdef _SC_TZNAME_MAX - { "TZNAME_MAX", SYSCONF, _SC_TZNAME_MAX }, +#ifdef _SC_EXPR_NEST_MAX + { "EXPR_NEST_MAX", _SC_EXPR_NEST_MAX, SYSCONF }, + { "POSIX2_EXPR_NEST_MAX", _SC_EXPR_NEST_MAX, SYSCONF }, +#else + { "EXPR_NEST_MAX", _POSIX2_EXPR_NEST_MAX, CONSTANT }, + { "POSIX2_EXPR_NEST_MAX", _POSIX2_EXPR_NEST_MAX, CONSTANT }, #endif - - /* POSIX.1 Optional Facility Configuration Values */ -#if defined (_SC_ADVISORY_INFO) - { "_POSIX_ADVISORY_INFO", SYSCONF, _SC_ADVISORY_INFO }, +#ifdef _SC_LINE_MAX + { "LINE_MAX", _SC_LINE_MAX, SYSCONF }, + { "_POSIX2_LINE_MAX", _SC_LINE_MAX, SYSCONF }, + { "POSIX2_LINE_MAX", _SC_LINE_MAX, SYSCONF }, +#else + { "LINE_MAX", _POSIX2_LINE_MAX, CONSTANT }, + { "_POSIX2_LINE_MAX", _POSIX2_LINE_MAX, CONSTANT }, + { "POSIX2_LINE_MAX", _POSIX2_LINE_MAX, CONSTANT }, #endif -#if defined (_SC_ASYNCHRONOUS_IO) - { "_POSIX_ASYNCHRONOUS_IO", SYSCONF, _SC_ASYNCHRONOUS_IO }, +#ifdef _SC_RE_DUP_MAX + { "POSIX2_RE_DUP_MAX", _SC_RE_DUP_MAX, SYSCONF }, + { "RE_DUP_MAX", _SC_RE_DUP_MAX, SYSCONF }, +#else + { "POSIX2_RE_DUP_MAX", _POSIX2_RE_DUP_MAX, CONSTANT }, + { "RE_DUP_MAX", _POSIX2_RE_DUP_MAX, CONSTANT }, #endif -#if defined (_SC_BARRIERS) - { "_POSIX_BARRIERS", SYSCONF, _SC_BARRIERS }, + { "POSIX2_CHAR_TERM", _SC_2_CHAR_TERM, SYSCONF }, + { "POSIX2_C_BIND", _SC_2_C_BIND, SYSCONF }, + { "POSIX2_C_DEV", _SC_2_C_DEV, SYSCONF }, +#ifdef _SC_2_C_VERSION + { "POSIX2_C_VERSION", _SC_2_C_VERSION, SYSCONF }, #endif -#if defined (_SC_BASE) - { "_POSIX_BASE", SYSCONF, _SC_BASE }, + { "POSIX2_FORT_DEV", _SC_2_FORT_DEV, SYSCONF }, + { "POSIX2_FORT_RUN", _SC_2_FORT_RUN, SYSCONF }, + { "POSIX2_LOCALEDEF", _SC_2_LOCALEDEF, SYSCONF }, + { "POSIX2_SW_DEV", _SC_2_SW_DEV, SYSCONF }, + { "POSIX2_UPE", _SC_2_UPE, SYSCONF }, + { "POSIX2_VERSION", _SC_2_VERSION, SYSCONF }, + + { "PATH", _CS_PATH, CONFSTR }, + { "CS_PATH", _CS_PATH, CONFSTR }, + + /* LFS */ +#ifdef _CS_LFS_CFLAGS + { "LFS_CFLAGS", _CS_LFS_CFLAGS, CONFSTR }, #endif -#if defined (_SC_C_LANG_SUPPORT) - { "_POSIX_C_LANG_SUPPORT", SYSCONF, _SC_C_LANG_SUPPORT }, +#ifdef _CS_LFS_LDFLAGS + { "LFS_LDFLAGS", _CS_LFS_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_C_LANG_SUPPORT_R) - { "_POSIX_C_LANG_SUPPORT_R", SYSCONF, _SC_C_LANG_SUPPORT_R }, +#ifdef _CS_LFS_LIBS + { "LFS_LIBS", _CS_LFS_LIBS, CONFSTR }, #endif -#if defined (_SC_CLOCK_SELECTION) - { "_POSIX_CLOCK_SELECTION", SYSCONF, _SC_CLOCK_SELECTION }, +#ifdef _CS_LFS_LINTFLAGS + { "LFS_LINTFLAGS", _CS_LFS_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_CPUTIME) - { "_POSIX_CPUTIME", SYSCONF, _SC_CPUTIME }, +#ifdef _CS_LFS64_CFLAGS + { "LFS64_CFLAGS", _CS_LFS64_CFLAGS, CONFSTR }, #endif -#if defined (_SC_DEVICE_IO) - { "_POSIX_DEVICE_IO", SYSCONF, _SC_DEVICE_IO }, +#ifdef _CS_LFS64_LDFLAGS + { "LFS64_LDFLAGS", _CS_LFS64_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_DEVICE_SPECIFIC) - { "_POSIX_DEVICE_SPECIFIC", SYSCONF, _SC_DEVICE_SPECIFIC }, +#ifdef _CS_LFS64_LIBS + { "LFS64_LIBS", _CS_LFS64_LIBS, CONFSTR }, #endif -#if defined (_SC_DEVICE_SPECIFIC_R) - { "_POSIX_DEVICE_SPECIFIC_R", SYSCONF, _SC_DEVICE_SPECIFIC_R }, + +#ifdef _CS_LFS64_LINTFLAGS + { "LFS64_LINTFLAGS", _CS_LFS64_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_FD_MGMT) - { "_POSIX_FD_MGMT", SYSCONF, _SC_FD_MGMT }, + + /* Programming environments. */ +#ifdef _CS_V5_WIDTH_RESTRICTED_ENVS + { "_XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS, CONFSTR }, + { "XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS, CONFSTR }, #endif -#if defined (_SC_FIFO) - { "_POSIX_FIFO", SYSCONF, _SC_FIFO }, + +#ifdef _SC_XBS5_ILP32_OFF32 + { "_XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32, SYSCONF }, #endif -#if defined (_SC_FILE_ATTRIBUTES) - { "_POSIX_FILE_ATTRIBUTES", SYSCONF, _SC_FILE_ATTRIBUTES }, +#ifdef _CS_XBS5_ILP32_OFF32_CFLAGS + { "XBS5_ILP32_OFF32_CFLAGS", _CS_XBS5_ILP32_OFF32_CFLAGS, CONFSTR }, #endif -#if defined (_SC_FILE_LOCKING) - { "_POSIX_FILE_LOCKING", SYSCONF, _SC_FILE_LOCKING }, +#ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS + { "XBS5_ILP32_OFF32_LDFLAGS", _CS_XBS5_ILP32_OFF32_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_FILE_SYSTEM) - { "_POSIX_FILE_SYSTEM", SYSCONF, _SC_FILE_SYSTEM }, +#ifdef _CS_XBS5_ILP32_OFF32_LIBS + { "XBS5_ILP32_OFF32_LIBS", _CS_XBS5_ILP32_OFF32_LIBS, CONFSTR }, #endif -#if defined (_SC_FSYNC) - { "_POSIX_FSYNC", SYSCONF, _SC_FSYNC }, +#ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS + { "XBS5_ILP32_OFF32_LINTFLAGS", _CS_XBS5_ILP32_OFF32_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_IPV6) - { "_POSIX_IPV6", SYSCONF, _SC_IPV6 }, + +#ifdef _SC_XBS5_ILP32_OFFBIG + { "_XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG, SYSCONF }, #endif -#if defined (_SC_JOB_CONTROL) - { "_POSIX_JOB_CONTROL", SYSCONF, _SC_JOB_CONTROL }, +#ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS + { "XBS5_ILP32_OFFBIG_CFLAGS", _CS_XBS5_ILP32_OFFBIG_CFLAGS, CONFSTR }, #endif -#if defined (_SC_MAPPED_FILES) - { "_POSIX_MAPPED_FILES", SYSCONF, _SC_MAPPED_FILES }, +#ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS + { "XBS5_ILP32_OFFBIG_LDFLAGS", _CS_XBS5_ILP32_OFFBIG_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_MEMLOCK) - { "_POSIX_MEMLOCK", SYSCONF, _SC_MEMLOCK }, +#ifdef _CS_XBS5_ILP32_OFFBIG_LIBS + { "XBS5_ILP32_OFFBIG_LIBS", _CS_XBS5_ILP32_OFFBIG_LIBS, CONFSTR }, #endif -#if defined (_SC_MEMLOCK_RANGE) - { "_POSIX_MEMLOCK_RANGE", SYSCONF, _SC_MEMLOCK_RANGE }, +#ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS + { "XBS5_ILP32_OFFBIG_LINTFLAGS", _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_MEMORY_PROTECTION) - { "_POSIX_MEMORY_PROTECTION", SYSCONF, _SC_MEMORY_PROTECTION }, + +#ifdef _SC_XBS5_LP64_OFF64 + { "_XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64, SYSCONF }, #endif -#if defined (_SC_MESSAGE_PASSING) - { "_POSIX_MESSAGE_PASSING", SYSCONF, _SC_MESSAGE_PASSING }, +#ifdef _CS_XBS5_LP64_OFF64_CFLAGS + { "XBS5_LP64_OFF64_CFLAGS", _CS_XBS5_LP64_OFF64_CFLAGS, CONFSTR }, #endif -#if defined (_SC_MONOTONIC_CLOCK) - { "_POSIX_MONOTONIC_CLOCK", SYSCONF, _SC_MONOTONIC_CLOCK }, +#ifdef _CS_XBS5_LP64_OFF64_LDFLAGS + { "XBS5_LP64_OFF64_LDFLAGS", _CS_XBS5_LP64_OFF64_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_MULTI_PROCESS) - { "_POSIX_MULTI_PROCESS", SYSCONF, _SC_MULTI_PROCESS }, +#ifdef _CS_XBS5_LP64_OFF64_LIBS + { "XBS5_LP64_OFF64_LIBS", _CS_XBS5_LP64_OFF64_LIBS, CONFSTR }, #endif -#if defined (_SC_NETWORKING) - { "_POSIX_NETWORKING", SYSCONF, _SC_NETWORKING }, +#ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS + { "XBS5_LP64_OFF64_LINTFLAGS", _CS_XBS5_LP64_OFF64_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_PIPE) - { "_POSIX_PIPE", SYSCONF, _SC_PIPE }, + +#ifdef _SC_XBS5_LPBIG_OFFBIG + { "_XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG, SYSCONF }, #endif -#if defined (SC_PRIORITIZED_IO) - { "_POSIX_PRIORITIZED_IO", SYSCONF, _SC_PRIORITIZED_IO }, +#ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS + { "XBS5_LPBIG_OFFBIG_CFLAGS", _CS_XBS5_LPBIG_OFFBIG_CFLAGS, CONFSTR }, #endif -#if defined (_SC_PRIORITY_SCHEDULING) - { "_POSIX_PRIORITY_SCHEDULING", SYSCONF, _SC_PRIORITY_SCHEDULING }, +#ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS + { "XBS5_LPBIG_OFFBIG_LDFLAGS", _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_READER_WRITER_LOCKS) - { "_POSIX_READER_WRITER_LOCKS", SYSCONF, _SC_READER_WRITER_LOCKS }, +#ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS + { "XBS5_LPBIG_OFFBIG_LIBS", _CS_XBS5_LPBIG_OFFBIG_LIBS, CONFSTR }, #endif -#if defined (_SC_RAW_SOCKETS) - { "_POSIX_RAW_SOCKETS", SYSCONF, _SC_RAW_SOCKETS }, +#ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS + { "XBS5_LPBIG_OFFBIG_LINTFLAGS", _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_REALTIME_SIGNALS) - { "_POSIX_REALTIME_SIGNALS", SYSCONF, _SC_REALTIME_SIGNALS }, + +#ifdef _SC_V6_ILP32_OFF32 + { "_POSIX_V6_ILP32_OFF32", _SC_V6_ILP32_OFF32, SYSCONF }, #endif -#if defined (_SC_REGEXP) - { "_POSIX_REGEXP", SYSCONF, _SC_REGEXP }, +#ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS + { "POSIX_V6_ILP32_OFF32_CFLAGS", _CS_POSIX_V6_ILP32_OFF32_CFLAGS, CONFSTR }, #endif -#if defined (_SC_SAVED_IDS) - { "_POSIX_SAVED_IDS", SYSCONF, _SC_SAVED_IDS }, +#ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS + { "POSIX_V6_ILP32_OFF32_LDFLAGS", _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_SEMAPHORES) - { "_POSIX_SEMAPHORES", SYSCONF, _SC_SEMAPHORES }, +#ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS + { "POSIX_V6_ILP32_OFF32_LIBS", _CS_POSIX_V6_ILP32_OFF32_LIBS, CONFSTR }, #endif -#if defined (_SC_SHARED_MEMORY_OBJECTS) - { "_POSIX_SHARED_MEMORY_OBJECTS", SYSCONF, _SC_SHARED_MEMORY_OBJECTS }, +#ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS + { "POSIX_V6_ILP32_OFF32_LINTFLAGS", _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, CONFSTR }, #endif - { "_POSIX_SHELL", CONSTANT, 1 }, -#if defined (_SC_SIGNALS) - { "_POSIX_SIGNALS", SYSCONF, _SC_SIGNALS }, + +#ifdef _CS_V6_WIDTH_RESTRICTED_ENVS + { "_POSIX_V6_WIDTH_RESTRICTED_ENVS", _CS_V6_WIDTH_RESTRICTED_ENVS, CONFSTR }, + { "POSIX_V6_WIDTH_RESTRICTED_ENVS", _CS_V6_WIDTH_RESTRICTED_ENVS, CONFSTR }, #endif -#if defined (_SC_SINGLE_PROCESS) - { "_POSIX_SINGLE_PROCESS", SYSCONF, _SC_SINGLE_PROCESS }, + +#ifdef _SC_V6_ILP32_OFFBIG + { "_POSIX_V6_ILP32_OFFBIG", _SC_V6_ILP32_OFFBIG, SYSCONF }, #endif -#if defined (_SC_SPAWN) - { "_POSIX_SPAWN", SYSCONF, _SC_SPAWN }, +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS + { "POSIX_V6_ILP32_OFFBIG_CFLAGS", _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, CONFSTR }, #endif -#if defined (_SC_SPIN_LOCKS) - { "_POSIX_SPIN_LOCKS", SYSCONF, _SC_SPIN_LOCKS }, +#ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS + { "POSIX_V6_ILP32_OFFBIG_LDFLAGS", _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_SPORADIC_SERVER) - { "_POSIX_SPORADIC_SERVER", SYSCONF, _SC_SPORADIC_SERVER }, +#ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS + { "POSIX_V6_ILP32_OFFBIG_LIBS", _CS_POSIX_V6_ILP32_OFFBIG_LIBS, CONFSTR }, #endif -#if defined (_SC_SYMLOOP_MAX) - { "_POSIX_SYMLOOP_MAX", SYSCONF, _SC_SYMLOOP_MAX }, +#ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS + { "POSIX_V6_ILP32_OFFBIG_LINTFLAGS", _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_SYNCHRONIZED_IO) - { "_POSIX_SYNCHRONIZED_IO", SYSCONF, _SC_SYNCHRONIZED_IO }, + +#ifdef _SC_V6_LP64_OFF64 + { "_POSIX_V6_LP64_OFF64", _SC_V6_LP64_OFF64, SYSCONF }, #endif -#if defined (_SC_SYSTEM_DATABASE) - { "_POSIX_SYSTEM_DATABASE", SYSCONF, _SC_SYSTEM_DATABASE }, +#ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS + { "POSIX_V6_LP64_OFF64_CFLAGS", _CS_POSIX_V6_LP64_OFF64_CFLAGS, CONFSTR }, #endif -#if defined (_SC_SYSTEM_DATABASE_R) - { "_POSIX_SYSTEM_DATABASE_R", SYSCONF, _SC_SYSTEM_DATABASE_R }, +#ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS + { "POSIX_V6_LP64_OFF64_LDFLAGS", _CS_POSIX_V6_LP64_OFF64_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_THREAD_ATTR_STACKADDR) - { "_POSIX_THREAD_ATTR_STACKADDR", SYSCONF, _SC_THREAD_ATTR_STACKADDR }, +#ifdef _CS_POSIX_V6_LP64_OFF64_LIBS + { "POSIX_V6_LP64_OFF64_LIBS", _CS_POSIX_V6_LP64_OFF64_LIBS, CONFSTR }, #endif -#if defined (_SC_THREAD_ATTR_STACKSIZE) - { "_POSIX_THREAD_ATTR_STACKSIZE", SYSCONF, _SC_THREAD_ATTR_STACKSIZE }, +#ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS + { "POSIX_V6_LP64_OFF64_LINTFLAGS", _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_THREAD_CPUTIME) - { "_POSIX_THREAD_CPUTIME", SYSCONF, _SC_THREAD_CPUTIME }, + +#ifdef _SC_V6_LPBIG_OFFBIG + { "_POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG, SYSCONF }, #endif -#if defined (_SC_THREAD_PRIO_INHERIT) - { "_POSIX_THREAD_PRIO_INHERIT", SYSCONF, _SC_THREAD_PRIO_INHERIT }, +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS + { "POSIX_V6_LPBIG_OFFBIG_CFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, CONFSTR }, #endif -#if defined (_SC_THREAD_PRIO_PROTECT) - { "_POSIX_THREAD_PRIO_PROTECT", SYSCONF, _SC_THREAD_PRIO_PROTECT }, +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS + { "POSIX_V6_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_THREAD_PRIORITY_SCHEDULING) - { "_POSIX_THREAD_PRIORITY_SCHEDULING", SYSCONF, _SC_THREAD_PRIORITY_SCHEDULING }, +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS + { "POSIX_V6_LPBIG_OFFBIG_LIBS", _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, CONFSTR }, #endif -#if defined (_SC_THREAD_PROCESS_SHARED) - { "_POSIX_THREAD_PROCESS_SHARED", SYSCONF, _SC_THREAD_PROCESS_SHARED }, +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS + { "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_THREAD_SAFE_FUNCTIONS) - { "_POSIX_THREAD_SAFE_FUNCTIONS", SYSCONF, _SC_THREAD_SAFE_FUNCTIONS }, + +#ifdef _SC_V7_ILP32_OFF32 + { "_POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32, SYSCONF }, #endif -#if defined (_SC_THREAD_SPORADIC_SERVER) - { "_POSIX_THREAD_SPORADIC_SERVER", SYSCONF, _SC_THREAD_SPORADIC_SERVER }, +#ifdef _CS_POSIX_V7_ILP32_OFF32_CFLAGS + { "POSIX_V7_ILP32_OFF32_CFLAGS", _CS_POSIX_V7_ILP32_OFF32_CFLAGS, CONFSTR }, #endif -#if defined (_SC_THREADS) - { "_POSIX_THREADS", SYSCONF, _SC_THREADS }, +#ifdef _CS_POSIX_V7_ILP32_OFF32_LDFLAGS + { "POSIX_V7_ILP32_OFF32_LDFLAGS", _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_TIMEOUTS) - { "_POSIX_TIMEOUTS", SYSCONF, _SC_TIMEOUTS }, +#ifdef _CS_POSIX_V7_ILP32_OFF32_LIBS + { "POSIX_V7_ILP32_OFF32_LIBS", _CS_POSIX_V7_ILP32_OFF32_LIBS, CONFSTR }, #endif -#if defined (_SC_TIMERS) - { "_POSIX_TIMERS", SYSCONF, _SC_TIMERS }, +#ifdef _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS + { "POSIX_V7_ILP32_OFF32_LINTFLAGS", _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_TRACE) - { "_POSIX_TRACE", SYSCONF, _SC_TRACE }, + +#ifdef _CS_V7_WIDTH_RESTRICTED_ENVS + { "_POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS, CONFSTR }, + { "POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS, CONFSTR }, #endif -#if defined (_SC_TRACE) - { "_POSIX_TRACE_EVENT_FILTER",SYSCONF, _SC_TRACE_EVENT_FILTER }, + +#ifdef _SC_V7_ILP32_OFFBIG + { "_POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG, SYSCONF }, #endif -#if defined (_SC_TRACE) - { "_POSIX_TRACE_INHERIT", SYSCONF, _SC_TRACE_INHERIT }, +#ifdef _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS + { "POSIX_V7_ILP32_OFFBIG_CFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, CONFSTR }, #endif -#if defined (_SC_TRACE) - { "_POSIX_TRACE_LOG", SYSCONF, _SC_TRACE_LOG }, +#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS + { "POSIX_V7_ILP32_OFFBIG_LDFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_TYPED_MEMORY_OBJECTS) - { "_POSIX_TYPED_MEMORY_OBJECTS", SYSCONF, _SC_TYPED_MEMORY_OBJECTS }, +#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LIBS + { "POSIX_V7_ILP32_OFFBIG_LIBS", _CS_POSIX_V7_ILP32_OFFBIG_LIBS, CONFSTR }, #endif -#if defined (_SC_VERSION) - { "_POSIX_VERSION", SYSCONF, _SC_VERSION }, +#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS + { "POSIX_V7_ILP32_OFFBIG_LINTFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, CONFSTR }, #endif - /* XPG 4.2 Configurable System Variables. */ -#if defined (_SC_ATEXIT_MAX) - { "ATEXIT_MAX", SYSCONF, _SC_ATEXIT_MAX }, +#ifdef _SC_V7_LP64_OFF64 + { "_POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64, SYSCONF }, #endif -#if defined (_SC_GETGR_R_SIZE_MAX) - { "GETGR_R_SIZE_MAX", SYSCONF, _SC_GETGR_R_SIZE_MAX }, +#ifdef _CS_POSIX_V7_LP64_OFF64_CFLAGS + { "POSIX_V7_LP64_OFF64_CFLAGS", _CS_POSIX_V7_LP64_OFF64_CFLAGS, CONFSTR }, #endif -#if defined (_SC_GETPW_R_SIZE_MAX) - { "GETPW_R_SIZE_MAX", SYSCONF, _SC_GETPW_R_SIZE_MAX }, +#ifdef _CS_POSIX_V7_LP64_OFF64_LDFLAGS + { "POSIX_V7_LP64_OFF64_LDFLAGS", _CS_POSIX_V7_LP64_OFF64_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_HOST_NAME_MAX) - { "HOST_NAME_MAX", SYSCONF, _SC_HOST_NAME_MAX }, +#ifdef _CS_POSIX_V7_LP64_OFF64_LIBS + { "POSIX_V7_LP64_OFF64_LIBS", _CS_POSIX_V7_LP64_OFF64_LIBS, CONFSTR }, #endif -#if defined (_SC_IOV_MAX) - { "IOV_MAX", SYSCONF, _SC_IOV_MAX }, +#ifdef _CS_POSIX_V7_LP64_OFF64_LINTFLAGS + { "POSIX_V7_LP64_OFF64_LINTFLAGS", _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_LOGIN_NAME_MAX) - { "LOGIN_NAME_MAX", SYSCONF, _SC_LOGIN_NAME_MAX }, + +#ifdef _SC_V7_LPBIG_OFFBIG + { "_POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG, SYSCONF }, #endif -#if defined (_SC_LOGNAME_MAX) - { "LOGNAME_MAX", SYSCONF, _SC_LOGNAME_MAX }, +#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS + { "POSIX_V7_LPBIG_OFFBIG_CFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, CONFSTR }, #endif -#if defined (_SC_PAGESIZE) - { "PAGESIZE", SYSCONF, _SC_PAGESIZE }, +#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS + { "POSIX_V7_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, CONFSTR }, #endif -#if defined (_SC_PAGE_SIZE) - { "PAGE_SIZE", SYSCONF, _SC_PAGE_SIZE }, +#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LIBS + { "POSIX_V7_LPBIG_OFFBIG_LIBS", _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, CONFSTR }, #endif -#if defined (_SC_SYMLOOP_MAX) - { "SYMLOOP_MAX", SYSCONF, _SC_SYMLOOP_MAX }, +#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS + { "POSIX_V7_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, CONFSTR }, #endif -#if defined (_SC_TTY_NAME_MAX) - { "TTY_NAME_MAX", SYSCONF, _SC_TTY_NAME_MAX }, + +#ifdef _SC_ADVISORY_INFO + { "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF }, #endif -#if defined (_SC_USER_GROUPS) - { "_POSIX_USER_GROUPS", SYSCONF, _SC_USER_GROUPS }, +#ifdef _SC_BARRIERS + { "_POSIX_BARRIERS", _SC_BARRIERS, SYSCONF }, #endif -#if defined (_SC_USER_GROUPS_R) - { "_POSIX_USER_GROUPS_R", SYSCONF, _SC_USER_GROUPS_R }, +#ifdef _SC_BASE + { "_POSIX_BASE", _SC_BASE, SYSCONF }, #endif - -#if defined (_SC_AIO_LISTIO_MAX) - { "AIO_LISTIO_MAX", SYSCONF, _SC_AIO_LISTIO_MAX }, +#ifdef _SC_C_LANG_SUPPORT + { "_POSIX_C_LANG_SUPPORT", _SC_C_LANG_SUPPORT, SYSCONF }, #endif -#if defined (_SC_AIO_MAX) - { "AIO_MAX", SYSCONF, _SC_AIO_MAX }, +#ifdef _SC_C_LANG_SUPPORT_R + { "_POSIX_C_LANG_SUPPORT_R", _SC_C_LANG_SUPPORT_R, SYSCONF }, #endif -#if defined (_SC_AIO_PRIO_DELTA_MAX) - { "AIO_PRIO_DELTA_MAX", SYSCONF, _SC_AIO_PRIO_DELTA_MAX }, + { "_POSIX_CLOCK_SELECTION", _SC_CLOCK_SELECTION, SYSCONF }, + { "_POSIX_CPUTIME", _SC_CPUTIME, SYSCONF }, + { "_POSIX_THREAD_CPUTIME", _SC_THREAD_CPUTIME, SYSCONF }, +#ifdef _SC_DEVICE_SPECIFIC + { "_POSIX_DEVICE_SPECIFIC", _SC_DEVICE_SPECIFIC, SYSCONF }, #endif -#if defined (_SC_MQ_OPEN_MAX) - { "MQ_OPEN_MAX", SYSCONF, _SC_MQ_OPEN_MAX }, +#ifdef _SC_DEVICE_SPECIFIC_R + { "_POSIX_DEVICE_SPECIFIC_R", _SC_DEVICE_SPECIFIC_R, SYSCONF }, #endif -#if defined (_SC_MQ_PRIO_MAX) - { "MQ_PRIO_MAX", SYSCONF, _SC_MQ_PRIO_MAX }, +#ifdef _SC_FD_MGMT + { "_POSIX_FD_MGMT", _SC_FD_MGMT, SYSCONF }, #endif -#if defined (_SC_RTSIG_MAX) - { "RTSIG_MAX", SYSCONF, _SC_RTSIG_MAX }, +#ifdef _SC_FIFO + { "_POSIX_FIFO", _SC_FIFO, SYSCONF }, #endif -#if defined (_SC_SEM_NSEMS_MAX) - { "SEM_NSEMS_MAX", SYSCONF, _SC_SEM_NSEMS_MAX }, +#ifdef _SC_PIPE + { "_POSIX_PIPE", _SC_PIPE, SYSCONF }, #endif -#if defined (_SC_SEM_VALUE_MAX) - { "SEM_VALUE_MAX", SYSCONF, _SC_SEM_VALUE_MAX }, +#ifdef _SC_FILE_ATTRIBUTES + { "_POSIX_FILE_ATTRIBUTES", _SC_FILE_ATTRIBUTES, SYSCONF }, #endif -#if defined (_SC_SIGQUEUE_MAX) - { "SIGQUEUE_MAX", SYSCONF, _SC_SIGQUEUE_MAX }, +#ifdef _SC_FILE_LOCKING + { "_POSIX_FILE_LOCKING", _SC_FILE_LOCKING, SYSCONF }, #endif -#if defined (_SC_TIMER_MAX) - { "TIMER_MAX", SYSCONF, _SC_TIMER_MAX }, +#ifdef _SC_FILE_SYSTEM + { "_POSIX_FILE_SYSTEM", _SC_FILE_SYSTEM, SYSCONF }, #endif - -#if defined (_SC_THREAD_DESTRUCTOR_ITERATIONS) - { "PTHREAD_DESTRUCTOR_ITERATIONS", SYSCONF, _SC_THREAD_DESTRUCTOR_ITERATIONS }, + { "_POSIX_MONOTONIC_CLOCK", _SC_MONOTONIC_CLOCK, SYSCONF }, +#ifdef _SC_MULTI_PROCESS + { "_POSIX_MULTI_PROCESS", _SC_MULTI_PROCESS, SYSCONF }, #endif -#if defined (_SC_THREAD_KEYS_MAX) - { "PTHREAD_KEYS_MAX", SYSCONF, _SC_THREAD_KEYS_MAX }, +#ifdef _SC_SINGLE_PROCESS + { "_POSIX_SINGLE_PROCESS", _SC_SINGLE_PROCESS, SYSCONF }, #endif -#if defined (_SC_THREAD_STACK_MIN) - { "PTHREAD_STACK_MIN", SYSCONF, _SC_THREAD_STACK_MIN }, +#ifdef _SC_NETWORKING + { "_POSIX_NETWORKING", _SC_NETWORKING, SYSCONF }, #endif -#if defined (_SC_THREAD_THREADS_MAX) - { "PTHREAD_THREADS_MAX", SYSCONF, _SC_THREAD_THREADS_MAX }, + { "_POSIX_READER_WRITER_LOCKS", _SC_READER_WRITER_LOCKS, SYSCONF }, + { "_POSIX_SPIN_LOCKS", _SC_SPIN_LOCKS, SYSCONF }, + { "_POSIX_REGEXP", _SC_REGEXP, SYSCONF }, +#ifdef _SC_REGEX_VERSION + { "_REGEX_VERSION", _SC_REGEX_VERSION, SYSCONF }, #endif - - /* XPG 4.2 (and later) Optional Facility Configuration Values */ -#if defined (_SC_XOPEN_CRYPT) - { "_XOPEN_CRYPT", SYSCONF, _SC_XOPEN_CRYPT }, + { "_POSIX_SHELL", _SC_SHELL, SYSCONF }, +#ifdef _SC_SIGNALS + { "_POSIX_SIGNALS", _SC_SIGNALS, SYSCONF }, #endif -#if defined (_SC_XOPEN_ENH_I18N) - { "_XOPEN_ENH_I18N", SYSCONF, _SC_XOPEN_ENH_I18N }, + { "_POSIX_SPAWN", _SC_SPAWN, SYSCONF }, +#ifdef _SC_SPORADIC_SERVER + { "_POSIX_SPORADIC_SERVER", _SC_SPORADIC_SERVER, SYSCONF }, #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 }, +#ifdef _SC_THREAD_SPORADIC_SERVER + { "_POSIX_THREAD_SPORADIC_SERVER", _SC_THREAD_SPORADIC_SERVER, SYSCONF }, #endif -#if defined (_SC_XOPEN_REALTIME_THREADS) - { "_XOPEN_REALTIME_THREADS", SYSCONF, _SC_XOPEN_REALTIME_THREADS }, +#ifdef _SC_SYSTEM_DATABASE + { "_POSIX_SYSTEM_DATABASE", _SC_SYSTEM_DATABASE, SYSCONF }, #endif -#if defined (_SC_XOPEN_SHM) - { "_XOPEN_SHM", SYSCONF, _SC_XOPEN_SHM }, +#ifdef _SC_SYSTEM_DATABASE_R + { "_POSIX_SYSTEM_DATABASE_R", _SC_SYSTEM_DATABASE_R, SYSCONF }, #endif -#if defined (_SC_XOPEN_STREAMS) - { "_XOPEN_STREAMS", SYSCONF, _SC_XOPEN_STREAMS }, +#ifdef _SC_TIMEOUTS + { "_POSIX_TIMEOUTS", _SC_TIMEOUTS, SYSCONF }, #endif -#if defined (_SC_XOPEN_UNIX) - { "_XOPEN_UNIX", SYSCONF, _SC_XOPEN_UNIX }, +#ifdef _SC_TYPED_MEMORY_OBJECTS + { "_POSIX_TYPED_MEMORY_OBJECTS", _SC_TYPED_MEMORY_OBJECTS, SYSCONF }, #endif -#if defined (_SC_XOPEN_VERSION) - { "_XOPEN_VERSION", SYSCONF, _SC_XOPEN_VERSION }, +#ifdef _SC_USER_GROUPS + { "_POSIX_USER_GROUPS", _SC_USER_GROUPS, SYSCONF }, #endif -#if defined (_SC_XOPEN_XCU_VERSION) - { "_XOPEN_XCU_VERSION", SYSCONF, _SC_XOPEN_XCU_VERSION }, +#ifdef _SC_USER_GROUPS_R + { "_POSIX_USER_GROUPS_R", _SC_USER_GROUPS_R, SYSCONF }, #endif -#if defined (_SC_XOPEN_XPG2) - { "_XOPEN_XPG2", SYSCONF, _SC_XOPEN_XPG2 }, + { "POSIX2_PBS", _SC_2_PBS, SYSCONF }, + { "POSIX2_PBS_ACCOUNTING", _SC_2_PBS_ACCOUNTING, SYSCONF }, + { "POSIX2_PBS_LOCATE", _SC_2_PBS_LOCATE, SYSCONF }, + { "POSIX2_PBS_TRACK", _SC_2_PBS_TRACK, SYSCONF }, + { "POSIX2_PBS_MESSAGE", _SC_2_PBS_MESSAGE, SYSCONF }, + { "SYMLOOP_MAX", _SC_SYMLOOP_MAX, SYSCONF }, + { "STREAM_MAX", _SC_STREAM_MAX, SYSCONF }, + { "AIO_LISTIO_MAX", _SC_AIO_LISTIO_MAX, SYSCONF }, + { "AIO_MAX", _SC_AIO_MAX, SYSCONF }, +#ifdef _SC_AIO_PRIO_DELTA_MAX + { "AIO_PRIO_DELTA_MAX", _SC_AIO_PRIO_DELTA_MAX, SYSCONF }, #endif -#if defined (_SC_XOPEN_XPG3) - { "_XOPEN_XPG3", SYSCONF, _SC_XOPEN_XPG3 }, + { "DELAYTIMER_MAX", _SC_DELAYTIMER_MAX, SYSCONF }, + { "HOST_NAME_MAX", _SC_HOST_NAME_MAX, SYSCONF }, + { "LOGIN_NAME_MAX", _SC_LOGIN_NAME_MAX, SYSCONF }, + { "MQ_OPEN_MAX", _SC_MQ_OPEN_MAX, SYSCONF }, + { "MQ_PRIO_MAX", _SC_MQ_PRIO_MAX, SYSCONF }, +#ifdef _SC_DEVICE_IO + { "_POSIX_DEVICE_IO", _SC_DEVICE_IO, SYSCONF }, #endif -#if defined (_SC_XOPEN_XPG4) - { "_XOPEN_XPG4", SYSCONF, _SC_XOPEN_XPG4 }, +#ifdef _SC_TRACE + { "_POSIX_TRACE", _SC_TRACE, SYSCONF }, #endif -#if defined (_SC_XOPEN_XPG5) - { "_XOPEN_XPG5", SYSCONF, _SC_XOPEN_XPG5 }, +#ifdef _SC_TRACE_EVENT_FILTER + { "_POSIX_TRACE_EVENT_FILTER", _SC_TRACE_EVENT_FILTER, SYSCONF }, #endif - - /* POSIX.1 Configurable Pathname Values */ -#ifdef _PC_LINK_MAX - { "LINK_MAX", PATHCONF, _PC_LINK_MAX }, +#ifdef _SC_TRACE_INHERIT + { "_POSIX_TRACE_INHERIT", _SC_TRACE_INHERIT, SYSCONF }, #endif -#ifdef _PC_MAX_CANON - { "MAX_CANON", PATHCONF, _PC_MAX_CANON }, +#ifdef _SC_TRACE_LOG + { "_POSIX_TRACE_LOG", _SC_TRACE_LOG, SYSCONF }, #endif -#ifdef _PC_MAX_INPUT - { "MAX_INPUT", PATHCONF, _PC_MAX_INPUT }, + { "RTSIG_MAX", _SC_RTSIG_MAX, SYSCONF }, +#ifdef _SC_SEM_NSEMS_MAX + { "SEM_NSEMS_MAX", _SC_SEM_NSEMS_MAX, SYSCONF }, #endif -#ifdef _PC_NAME_MAX - { "NAME_MAX", PATHCONF, _PC_NAME_MAX }, +#ifdef _SC_SEM_VALUE_MAX + { "SEM_VALUE_MAX", _SC_SEM_VALUE_MAX, SYSCONF }, #endif -#ifdef _PC_PATH_MAX - { "PATH_MAX", PATHCONF, _PC_PATH_MAX }, + { "SIGQUEUE_MAX", _SC_SIGQUEUE_MAX, SYSCONF }, + { "FILESIZEBITS", _PC_FILESIZEBITS, PATHCONF }, +#ifdef _PC_ALLOC_SIZE_MIN + { "POSIX_ALLOC_SIZE_MIN", _PC_ALLOC_SIZE_MIN, PATHCONF }, #endif -#ifdef _PC_PIPE_BUF - { "PIPE_BUF", PATHCONF, _PC_PIPE_BUF }, +#ifdef _PC_REC_INCR_XFER_SIZE + { "POSIX_REC_INCR_XFER_SIZE", _PC_REC_INCR_XFER_SIZE, PATHCONF }, #endif -#ifdef _PC_SYMLINK_MAX - { "SYMLINK_MAX", PATHCONF, _PC_SYMLINK_MAX }, +#ifdef _PC_REC_MAX_XFER_SIZE + { "POSIX_REC_MAX_XFER_SIZE", _PC_REC_MAX_XFER_SIZE, PATHCONF }, #endif -#ifdef _PC_CHOWN_RESTRICTED - { "_POSIX_CHOWN_RESTRICTED", PATHCONF, _PC_CHOWN_RESTRICTED }, +#ifdef _PC_REC_MIN_XFER_SIZE + { "POSIX_REC_MIN_XFER_SIZE", _PC_REC_MIN_XFER_SIZE, PATHCONF }, #endif -#ifdef _PC_NO_TRUNC - { "_POSIX_NO_TRUNC", PATHCONF, _PC_NO_TRUNC }, +#ifdef _PC_REC_XFER_ALIGN + { "POSIX_REC_XFER_ALIGN", _PC_REC_XFER_ALIGN, PATHCONF }, #endif -#ifdef _PC_VDISABLE - { "_POSIX_VDISABLE", PATHCONF, _PC_VDISABLE }, + { "SYMLINK_MAX", _PC_SYMLINK_MAX, PATHCONF }, +#ifdef _PC_2_SYMLINKS + { "POSIX2_SYMLINKS", _PC_2_SYMLINKS, PATHCONF }, #endif - /* XPG 4.2 Configurable Pathname Values */ -#if defined (_PC_FILESIZEBITS) - { "FILESIZEBITS", PATHCONF, _PC_FILESIZEBITS }, +#ifdef _SC_LEVEL1_ICACHE_SIZE + { "LEVEL1_ICACHE_SIZE", _SC_LEVEL1_ICACHE_SIZE, SYSCONF }, + { "LEVEL1_ICACHE_ASSOC", _SC_LEVEL1_ICACHE_ASSOC, SYSCONF }, + { "LEVEL1_ICACHE_LINESIZE", _SC_LEVEL1_ICACHE_LINESIZE, SYSCONF }, + { "LEVEL1_DCACHE_SIZE", _SC_LEVEL1_DCACHE_SIZE, SYSCONF }, + { "LEVEL1_DCACHE_ASSOC", _SC_LEVEL1_DCACHE_ASSOC, SYSCONF }, + { "LEVEL1_DCACHE_LINESIZE", _SC_LEVEL1_DCACHE_LINESIZE, SYSCONF }, #endif -#if defined (_PC_ASYNC_IO) - { "_POSIX_ASYNC_IO", PATHCONF, _PC_ASYNC_IO }, +#ifdef _SC_LEVEL2_CACHE_SIZE + { "LEVEL2_CACHE_SIZE", _SC_LEVEL2_CACHE_SIZE, SYSCONF }, + { "LEVEL2_CACHE_ASSOC", _SC_LEVEL2_CACHE_ASSOC, SYSCONF }, + { "LEVEL2_CACHE_LINESIZE", _SC_LEVEL2_CACHE_LINESIZE, SYSCONF }, #endif -#if defined (_PC_PRIO_IO) - { "_POSIX_PRIO_IO", PATHCONF, _PC_PRIO_IO }, +#ifdef _SC_LEVEL3_CACHE_SIZE + { "LEVEL3_CACHE_SIZE", _SC_LEVEL3_CACHE_SIZE, SYSCONF }, + { "LEVEL3_CACHE_ASSOC", _SC_LEVEL3_CACHE_ASSOC, SYSCONF }, + { "LEVEL3_CACHE_LINESIZE", _SC_LEVEL3_CACHE_LINESIZE, SYSCONF }, #endif -#if defined (_PC_SYNC_IO) - { "_POSIX_SYNC_IO", PATHCONF, _PC_SYNC_IO }, +#ifdef _SC_LEVEL4_CACHE_SIZE + { "LEVEL4_CACHE_SIZE", _SC_LEVEL4_CACHE_SIZE, SYSCONF }, + { "LEVEL4_CACHE_ASSOC", _SC_LEVEL4_CACHE_ASSOC, SYSCONF }, + { "LEVEL4_CACHE_LINESIZE", _SC_LEVEL4_CACHE_LINESIZE, SYSCONF }, #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 }, +#ifdef _SC_IPV6 + { "IPV6", _SC_IPV6, SYSCONF }, + { "_POSIX_IPV6", _SC_IPV6, SYSCONF }, +#endif +#ifdef _SC_RAW_SOCKETS + { "RAW_SOCKETS", _SC_RAW_SOCKETS, SYSCONF }, + { "_POSIX_RAW_SOCKETS", _SC_RAW_SOCKETS, SYSCONF }, #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 (); + { NULL, 0, SYSCONF } + }; -static void getconf_help (); -static int getconf_print (); -static int getconf_one (); -static int getconf_all (); +static int getconf_print (const struct conf *, const char *, int); +static int getconf_all (void); +static int getconf_one (WORD_LIST *); +static int getconf_internal (const struct conf *, int); -int -getconf_builtin (list) - WORD_LIST *list; +static int +getconf_internal (const struct conf *c, int all) { - 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); - } + long l, val; + intmax_t v; + uintmax_t uv; + unsigned long ul; +#if HAVE_LONG_LONG_INT + unsigned long long ull; + long long ll; +#endif + int r; + + val = c->call_name; + r = EXECUTION_SUCCESS; + if (val == VAL_ULONG_MAX) + { + ul = ULONG_MAX; + printf ("%lu", ul); + } +#if HAVE_LONG_LONG_INT + else if (val == VAL_ULLONG_MAX) + { + ull = ULLONG_MAX; + printf ("%llu", ull); + } + else if (val == VAL_LLONG_MIN || val == VAL_LLONG_MAX) + { + ll = (val == VAL_LLONG_MIN) ? LLONG_MIN : LLONG_MAX; + printf ("%lld", ll); + } +#endif +#if HAVE_LONG_LONG_INT + else if (val == VAL_SSIZE_MAX) + { + ll = SSIZE_MAX; + printf ("%lld", ll); + } + else if (val == VAL_SIZE_MAX) + { + ul = SIZE_MAX; + printf ("%lu", ul); + } +#else + else if (val == VAL_SSIZE_MAX) + { + v = SSIZE_MAX; + printf ("%jd", v); + } + else if (val == VAL_SIZE_MAX) + { + uv = SIZE_MAX; + printf ("%ju", uv); + } +#endif + else + printf ("%ld", val); - r = aflag ? getconf_all() : getconf_one(list); + if (r == EXECUTION_SUCCESS) + printf ("\n"); - return r; + return (r); } - -static void -getconf_help() + +static int +getconf_all (void) { - const struct conf_variable *cp; - register int i, column; + const struct conf *c; + char *path; + int r; - 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); - } + r = EXECUTION_SUCCESS; + for (c = vars; c->name != NULL; ++c) + { + printf("%-35s", c->name); + path = "/"; /* XXX for now */ + if (getconf_print (c, path, 1) == EXECUTION_FAILURE) + r = EXECUTION_FAILURE; + } + return (r); } static int -getconf_print(cp, vpath, all) -struct conf_variable *cp; -char *vpath; -int all; +getconf_one (WORD_LIST *list) { - 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 + const struct conf *c; + char *vname, *vpath; - printf("%lu\n", cp->value); - break; - default: - printf("%ld\n", cp->value); - break; - } - break; + vname = list->word->word; + vpath = (list->next && list->next->word) ? list->next->word->word : 0; - 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; - } + for (c = vars; c->name != NULL; ++c) + { + if (strcmp (c->name, vname) == 0 || (strncmp (c->name, "_POSIX_", 7) == 0 && + strcmp (c->name + 7, vname) == 0)) + break; + } + if (c->name == NULL) + { + builtin_error ("%s: unknown variable", vname); + return (EXECUTION_FAILURE); + } - return (ferror(stdout) ? EXECUTION_FAILURE : EXECUTION_SUCCESS); + if (c->call_name == PATHCONF && list->next == 0) + { + builtin_usage (); + return (EX_USAGE); + } + else if (c->call_name != PATHCONF && list->next) + { + builtin_usage (); + return (EX_USAGE); + } + + return (getconf_print (c, vpath, 0)); } static int -getconf_all() +getconf_print (const struct conf *c, const char *vpath, int all) { - const struct conf_variable *cp; - int ret; + long value; + size_t clen; + char *cvalue; + int cn; - 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; + cn = c->call_name; + switch (c->call) + { + case PATHCONF: + errno = 0; + value = pathconf (vpath, cn); + if (value == -1L) + { + if (errno) + builtin_error ("pathconf %s: %s: %s", c->name, vpath, strerror (errno)); + printf ("undefined\n"); + return (EXECUTION_FAILURE); } - return ret; -} + else + printf ("%ld\n", value); + return (EXECUTION_SUCCESS); + + case SYSCONF: + errno = 0; + value = sysconf (cn); + if (value == -1L) + { + if (errno) + builtin_error ("%s: %s", c->name, strerror (errno)); + printf ("undefined\n"); + return (EXECUTION_FAILURE); + } + else + printf ("%ld\n", value); + return (EXECUTION_SUCCESS); + + case CONFSTR: + errno = 0; + clen = confstr (cn, (char *) NULL, 0); + cvalue = (char *) malloc (clen); + if (cvalue == NULL) + { + builtin_error ("memory allocation failure"); + return (EXECUTION_FAILURE); + } + if (confstr (c->call_name, cvalue, clen) != clen) + { + if (errno != 0) + builtin_error ("%s: confstr: %s", c->name, strerror (errno)); + printf ("undefined\n"); + return (EXECUTION_FAILURE); + } + else + printf ("%.*s\n", (int) clen, cvalue); + free (cvalue); + return (EXECUTION_SUCCESS); -static int -getconf_one(list) - WORD_LIST *list; -{ - const struct conf_variable *cp; - char *vname, *vpath; + case CONSTANT: + return (getconf_internal (c, all)); - vname = list->word->word; - vpath = (list->next && list->next->word) ? list->next->word->word - : (char *)NULL; + case UNDEFINED: + builtin_error ("%s: undefined", c->name); + return (EXECUTION_FAILURE); + } - 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); - } + /* NOTREACHED */ + return (EX_USAGE); +} - if (cp->type == PATHCONF) { - if (list->next == 0) { - builtin_usage(); - return(EX_USAGE); - } - } else { - if (list->next) { - builtin_usage(); - return(EX_USAGE); - } +int +getconf_builtin (WORD_LIST *list) +{ + const struct conf *c; + int r, opt, aflag, vflag; + char *varg; + + aflag = vflag = 0; + varg = 0; + reset_internal_getopt (); + while ((opt = internal_getopt (list, "ahv:")) != -1) + { + switch (opt) + { + case 'a': + aflag = 1; + break; + CASE_HELPOPT; + case 'h': + builtin_help (); + return (EX_USAGE); + case 'v': + return (EX_DISKFALLBACK); + default: + builtin_usage (); + return (EX_USAGE); } + } + + list = loptend; + if ((aflag == 0 && list == 0) || (aflag && list) || list_length(list) > 2) + { + builtin_usage(); + return (EX_USAGE); + } - return (getconf_print(cp, vpath, 0)); + r = aflag ? getconf_all () : getconf_one (list); + return r; } static char *getconf_doc[] = { @@ -1358,133 +1161,3 @@ struct builtin getconf_struct = { "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 index c84062d..b8b9f10 100644 --- a/examples/loadables/getconf.h +++ b/examples/loadables/getconf.h @@ -1,4 +1,22 @@ -/* getconf.h -- replacement definitions for ones the system doesn't provide. */ +/* + Copyright (C) 2021 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 . +*/ +/* getconf.h -- replacement definitions for ones the system doesn't provide + and don't appear in */ #ifndef _GETCONF_H #define _GETCONF_H @@ -77,138 +95,42 @@ # 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. */ +/* ANSI/ISO C, POSIX.1-200x, XPG 4.2, and C language type limits. + Defined only if the system include files and don't. */ -#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 +# define SCHAR_MAX 127 #endif #ifndef SCHAR_MIN -# define SCHAR_MIN CHAR_MIN +# define SCHAR_MIN -128 #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 +#ifndef INT_BIT +# define INT_BIT (sizeof (int) * CHAR_BIT) #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 +#ifndef LONG_BIT +# define LONG_BIT (sizeof (long int) * CHAR_BIT) #endif #ifndef WORD_BIT # define WORD_BIT (sizeof (int) * CHAR_BIT) #endif +#if !defined (PRIdMAX) +# if HAVE_LONG_LONG +# define PRIdMAX "lld" +# else +# define PRIdMAX "ld" +# endif +#endif + #endif /* _GETCONF_H */ diff --git a/examples/loadables/head.c b/examples/loadables/head.c index 22cf6ab..f9f022a 100644 --- a/examples/loadables/head.c +++ b/examples/loadables/head.c @@ -79,17 +79,21 @@ file_head (fp, cnt) { while ((ch = getc (fp)) != EOF) { + QUIT; if (putchar (ch) == EOF) { builtin_error ("write error: %s", strerror (errno)); return EXECUTION_FAILURE; } + QUIT; if (ch == '\n') break; } } + return (EXECUTION_SUCCESS); } +int head_builtin (list) WORD_LIST *list; { @@ -115,6 +119,7 @@ head_builtin (list) return (EX_USAGE); } break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -138,6 +143,7 @@ head_builtin (list) printf ("%s==> %s <==\n", opt ? "" : "\n", l->word->word); opt = 0; } + QUIT; rval = file_head (fp, nline); fclose (fp); } diff --git a/examples/loadables/hello.c b/examples/loadables/hello.c index bff6e76..b09362b 100644 --- a/examples/loadables/hello.c +++ b/examples/loadables/hello.c @@ -3,6 +3,24 @@ /* 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 . +*/ + #include #if defined (HAVE_UNISTD_H) @@ -11,9 +29,7 @@ #include -#include "builtins.h" -#include "shell.h" -#include "bashgetopt.h" +#include "loadables.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 @@ -40,6 +56,23 @@ hello_builtin (list) return (EXECUTION_SUCCESS); } +int +hello_builtin_load (s) + char *s; +{ + printf ("hello builtin loaded\n"); + fflush (stdout); + return (1); +} + +void +hello_builtin_unload (s) + char *s; +{ + printf ("hello builtin unloaded\n"); + fflush (stdout); +} + /* 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. */ @@ -61,4 +94,3 @@ struct builtin hello_struct = { "hello", /* usage synopsis; becomes short_doc */ 0 /* reserved for internal use */ }; - diff --git a/examples/loadables/id.c b/examples/loadables/id.c index 8773349..f857b54 100644 --- a/examples/loadables/id.c +++ b/examples/loadables/id.c @@ -91,6 +91,7 @@ id_builtin (list) case 'n': id_flags |= ID_USENAME; break; case 'r': id_flags |= ID_USEREAL; break; case 'u': id_flags |= ID_USERONLY; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); diff --git a/examples/loadables/ln.c b/examples/loadables/ln.c index ec73636..874e9db 100644 --- a/examples/loadables/ln.c +++ b/examples/loadables/ln.c @@ -3,7 +3,7 @@ /* See Makefile for compilation details. */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -42,14 +42,16 @@ extern int errno; #endif -typedef int unix_link_syscall_t __P((const char *, const char *)); +typedef int unix_link_syscall_t PARAMS((const char *, const char *)); #define LN_SYMLINK 0x01 #define LN_UNLINK 0x02 +#define LN_NOFOLLOW 0x04 static unix_link_syscall_t *linkfn; static int dolink (); +int ln_builtin (list) WORD_LIST *list; { @@ -70,6 +72,11 @@ ln_builtin (list) case 's': flags |= LN_SYMLINK; break; + case 'h': + case 'n': + flags |= LN_NOFOLLOW; + break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -138,8 +145,10 @@ mkdirpath (dir, file) #if defined (HAVE_LSTAT) # define LSTAT lstat +# define LSTAT_OR_STAT_IF(c, f, b) ((c) ? lstat((f), (b)) : stat((f), (b))) #else # define LSTAT stat +# define LSTAT_OR_STAT_IF(c, f, b) (stat((f), (b))) #endif static int @@ -171,7 +180,7 @@ dolink (src, dst, flags) /* 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 ((LSTAT_OR_STAT_IF((flags & LN_NOFOLLOW), dst, &dsb) == 0) && S_ISDIR (dsb.st_mode)) { if ((p = strrchr (src, '/')) == 0) p = src; @@ -210,7 +219,8 @@ char *ln_doc[] = { "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.", + "By default, ln makes hard links. Specifying -n or its synonym -h", + "causes ln to not resolve symlinks in the target file or directory.", (char *)NULL }; @@ -221,6 +231,6 @@ struct builtin ln_struct = { 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 */ + "ln [-fhns] file1 [file2] OR ln [-fhns] file ... directory", /* usage synopsis; becomes short_doc */ 0 /* reserved for internal use */ }; diff --git a/examples/loadables/loadables.h b/examples/loadables/loadables.h new file mode 100644 index 0000000..c730357 --- /dev/null +++ b/examples/loadables/loadables.h @@ -0,0 +1,34 @@ +/* loadables.h -- Include files needed by all loadable builtins */ + +/* Copyright (C) 2015 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + + +#ifndef __LOADABLES_H_ +#define __LOADABLES_H_ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "builtins.h" +#include "shell.h" +#include "bashgetopt.h" +#include "common.h" + +#endif diff --git a/examples/loadables/logname.c b/examples/loadables/logname.c index 95b7e21..27e6591 100644 --- a/examples/loadables/logname.c +++ b/examples/loadables/logname.c @@ -35,6 +35,7 @@ extern int errno; #endif +int logname_builtin (list) WORD_LIST *list; { diff --git a/examples/loadables/mkdir.c b/examples/loadables/mkdir.c index f41f171..a5b4930 100644 --- a/examples/loadables/mkdir.c +++ b/examples/loadables/mkdir.c @@ -52,12 +52,12 @@ int mkdir_builtin (list) WORD_LIST *list; { - int opt, pflag, omode, rval, octal, nmode, parent_mode, um; + int opt, pflag, mflag, omode, rval, nmode, parent_mode; char *mode; WORD_LIST *l; reset_internal_getopt (); - pflag = 0; + pflag = mflag = 0; mode = (char *)NULL; while ((opt = internal_getopt(list, "m:p")) != -1) switch (opt) @@ -66,8 +66,10 @@ mkdir_builtin (list) pflag = 1; break; case 'm': + mflag = 1; mode = list_optarg; break; + CASE_HELPOPT; default: builtin_usage(); return (EX_USAGE); @@ -90,9 +92,8 @@ mkdir_builtin (list) builtin_error ("invalid file mode: %s", mode); return (EXECUTION_FAILURE); } - octal = 1; } - else if (mode) + else /* symbolic mode */ { /* initial bits are a=rwx; the mode argument modifies them */ omode = parse_symbolic_mode (mode, S_IRWXU | S_IRWXG | S_IRWXO); @@ -101,7 +102,6 @@ mkdir_builtin (list) builtin_error ("invalid file mode: %s", mode); return (EXECUTION_FAILURE); } - octal = 0; } /* Make the new mode */ @@ -109,14 +109,14 @@ mkdir_builtin (list) umask (original_umask); nmode = (S_IRWXU | S_IRWXG | S_IRWXO) & ~original_umask; - parent_mode = nmode | (S_IWRITE|S_IEXEC); /* u+wx */ + parent_mode = nmode | (S_IWUSR|S_IXUSR); /* 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)) + if (pflag && make_path (l->word->word, mflag, nmode, parent_mode)) { rval = EXECUTION_FAILURE; continue; @@ -134,8 +134,9 @@ mkdir_builtin (list) 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) +make_path (path, user_mode, nmode, parent_mode) char *path; + int user_mode; int nmode, parent_mode; { int oumask; @@ -150,7 +151,7 @@ make_path (path, nmode, parent_mode) return 1; } - if (chmod (path, nmode)) + if (user_mode && chmod (path, nmode)) { builtin_error ("%s: %s", path, strerror (errno)); return 1; @@ -174,13 +175,20 @@ make_path (path, nmode, parent_mode) *p = '\0'; if (stat (npath, &sb) != 0) { - if (mkdir (npath, parent_mode)) + if (mkdir (npath, 0)) { builtin_error ("cannot create directory `%s': %s", npath, strerror (errno)); umask (original_umask); free (npath); return 1; } + if (chmod (npath, parent_mode) != 0) + { + builtin_error ("cannot chmod directory `%s': %s", npath, strerror (errno)); + umask (original_umask); + free (npath); + return 1; + } } else if (S_ISDIR (sb.st_mode) == 0) { @@ -220,7 +228,7 @@ char *mkdir_doc[] = { "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", + "are created with permission 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.", diff --git a/examples/loadables/mkfifo.c b/examples/loadables/mkfifo.c new file mode 100644 index 0000000..2bc4e98 --- /dev/null +++ b/examples/loadables/mkfifo.c @@ -0,0 +1,146 @@ +/* mkfifo - make FIFOs */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 1999-2020 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 . +*/ + +#include + +#include "bashtypes.h" +#include "posixstat.h" +#include +#include +#include "bashansi.h" +#if defined (HAVE_UNISTD_H) +# include +#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 original_umask; + +int +mkfifo_builtin (list) + WORD_LIST *list; +{ + int opt, mflag, omode, rval, nmode, basemode; + char *mode; + WORD_LIST *l; + + mflag = 0; + mode = (char *)NULL; + + reset_internal_getopt (); + while ((opt = internal_getopt(list, "m:")) != -1) + switch (opt) + { + case 'm': + mflag = 1; + mode = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage(); + return (EX_USAGE); + } + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + basemode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; + if (mode == NULL) + omode = basemode; + else if (ISOCTAL (*mode)) /* octal number */ + { + omode = read_octal (mode); + if (omode < 0) + { + builtin_error ("invalid file mode: %s", mode); + return (EXECUTION_FAILURE); + } + } + else /* symbolic mode */ + { + /* initial bits are a=rwx; the mode argument modifies them */ + omode = parse_symbolic_mode (mode, basemode); + if (omode < 0) + { + builtin_error ("invalid file mode: %s", mode); + return (EXECUTION_FAILURE); + } + } + + /* Make the new mode */ + original_umask = umask (0); + umask (original_umask); + + nmode = basemode & ~original_umask; + /* Adjust new mode based on mode argument */ + nmode &= omode; + + for (rval = EXECUTION_SUCCESS, l = list; l; l = l->next) + { + if (mkfifo (l->word->word, nmode) < 0) + { + builtin_error ("cannot create FIFO `%s': %s", l->word->word, strerror (errno)); + rval = EXECUTION_FAILURE; + } + } + return rval; +} + + +char *mkfifo_doc[] = { + "Create FIFOs (named pipes).", + "", + "Make FIFOs. Create the FIFOs named as arguments, in", + "the order specified, using mode a=rw as modified by the current", + "umask (see `help umask'). The -m option causes the file permission", + "bits of the final FIFO 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=rw\". mkfifo returns 0 if the FIFOs are", + "umask, plus write and search permissions for the owner. mkdir", + "created successfully, and non-zero if an error occurs.", + (char *)NULL +}; + +struct builtin mkfifo_struct = { + "mkfifo", + mkfifo_builtin, + BUILTIN_ENABLED, + mkfifo_doc, + "mkfifo [-m mode] fifo_name [fifo_name ...]", + 0 +}; diff --git a/examples/loadables/mktemp.c b/examples/loadables/mktemp.c new file mode 100644 index 0000000..1f7c9ad --- /dev/null +++ b/examples/loadables/mktemp.c @@ -0,0 +1,212 @@ +/* mktemp - create temporary file or directory */ + +/* + Copyright (C) 2019 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 . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include +#include "bashansi.h" + +#include "loadables.h" + +#define DEFAULT_PREFIX "shtmp" + +int +mktemp_builtin (list) + WORD_LIST *list; +{ + WORD_LIST *l; + int rval, opt, fd, mflags, base_mflags; + int dflag, qflag, tflag, uflag, onetime; + char *prefix, *varname, *filename, *template; + SHELL_VAR *v; + + dflag = qflag = uflag = tflag = onetime = 0; + prefix = varname = 0; + rval = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "dqut:v:")) != -1) + { + switch (opt) + { + case 'd': + dflag = 1; + break; + case 'q': + qflag = 1; + break; + case 't': + tflag = 1; + prefix = list_optarg; + break; + case 'u': + uflag = 1; + break; + case 'v': + varname = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (varname) /* check for validity, not readonly */ + { + if (legal_identifier (varname) == 0) + { + if (qflag == 0) + sh_invalidid (varname); + return (EXECUTION_FAILURE); + } + v = find_variable (varname); + if (v && readonly_p (v)) + { + if (qflag == 0) + sh_readonly (varname); + return (EXECUTION_FAILURE); + } + } + + onetime = (list == 0); /* once through the loop, $TMPDIR/prefix.XXXXXX */ + + if (prefix == 0) + prefix = DEFAULT_PREFIX; + base_mflags = MT_USETMPDIR|MT_USERANDOM; /* USERANDOM not strictly needed */ + + while (list || onetime) + { + mflags = base_mflags; + onetime = 0; +#if defined (USE_MKTEMP) && defined (USE_MKSTEMP) + if (list) + { + template = list->word->word; + mflags |= MT_TEMPLATE; + } +#else + /* This is sub-optimal. */ + if (list) + { + /* Treat the basename as a prefix */ + template = strrchr (list->word->word, '/'); + if (template) + template++; + else + template = list->word->word; + } +#endif + else + template = prefix; + + if (dflag) + { + filename = sh_mktmpdir (template, mflags); + if (filename == 0) + { + if (qflag == 0) + builtin_error ("%s: cannot create directory", template); + rval = EXECUTION_FAILURE; + } + else + { + if (uflag) + rmdir (filename); + printf ("%s\n", filename); + } + } + else /* filename */ + { + fd = sh_mktmpfd (template, mflags, &filename); + if (fd < 0) + { + if (qflag == 0) + builtin_error ("%s: cannot create file", template); + rval = EXECUTION_FAILURE; + } + else + { + close (fd); + if (uflag) + unlink (filename); + printf ("%s\n", filename); + } + } + + /* Assign variable if requested */ + if (filename && varname) + { + v = builtin_bind_variable (varname, filename, 0); + if (v == 0 || readonly_p (v) || noassign_p (v)) + { + builtin_error ("%s: cannot set variable", varname); + rval = EXECUTION_FAILURE; + } + } + + FREE (filename); + + if (list) + list = list->next; + } + + return (rval); +} + +char *mktemp_doc[] = { + "Make unique temporary file name", + "", + "Take each supplied filename template and overwrite a portion of it", + "to create a filename, which is unique and may be used by the calling", + "script. TEMPLATE is a string ending in some number of 'X's. If", + "TEMPLATE is not supplied, shtmp.XXXXXX is used and $TMPDIR is used as", + "the name of the containing directory. Files are created u+rw; directories", + "are created u+rwx.", + "", + "Options, if supplied, have the following meanings:", + "", + " -d Create a directory instead of a file", + " -q Do not print error messages about file creation failure", + " -t PREFIX Use PREFIX as the directory in which to create files", + " -u Do not create anything; simply print a name", + " -v VAR Store the generated name into shell variable VAR", + "", + "Any PREFIX supplied with -t is ignored if TEMPLATE is supplied.", + "", + "The return status is true if the file or directory was created successfully;", + "false if an error occurs or VAR is invalid or readonly.", + + (char *)NULL +}; + +struct builtin mktemp_struct = { + "mktemp", /* builtin name */ + mktemp_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + mktemp_doc, /* array of long documentation strings. */ + "mktemp [-d] [-q] [-t prefix] [-u] [-v varname] [template] ...", + 0 /* reserved for internal use */ +}; diff --git a/examples/loadables/mypid.c b/examples/loadables/mypid.c index 135cdb3..fc1b267 100644 --- a/examples/loadables/mypid.c +++ b/examples/loadables/mypid.c @@ -5,7 +5,13 @@ * 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. + * + * This defines an unload hook function that is called when the builtin is + * deleted with enable -d that will unbind the MYPID variable so future + * references to it do not attempt to access memory that is no longer part + * of this process's address space. */ +#include #include #include @@ -17,8 +23,11 @@ #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; \ + if (v) \ + { \ + v->dynamic_value = gfunc; \ + v->assign_func = afunc; \ + } \ } \ while (0) @@ -56,6 +65,12 @@ enable_mypid_builtin(WORD_LIST *list) return 0; } +void +enable_mypid_builtin_unload (char *s) +{ + unbind_variable ("MYPID"); +} + char const *enable_mypid_doc[] = { "Enable $MYPID.", "", diff --git a/examples/loadables/necho.c b/examples/loadables/necho.c index b567389..dd2092b 100644 --- a/examples/loadables/necho.c +++ b/examples/loadables/necho.c @@ -25,6 +25,7 @@ #include "builtins.h" #include "shell.h" +int necho_builtin (list) WORD_LIST *list; { @@ -37,7 +38,7 @@ WORD_LIST *list; char *necho_doc[] = { "Display arguments.", "", - "Print the arguments to the standard ouput separated", + "Print the arguments to the standard output separated", "by space characters and terminated with a newline.", (char *)NULL }; diff --git a/examples/loadables/pathchk.c b/examples/loadables/pathchk.c index c5fd24a..c1151db 100644 --- a/examples/loadables/pathchk.c +++ b/examples/loadables/pathchk.c @@ -98,6 +98,7 @@ extern char *strerror (); static int validate_path (); +int pathchk_builtin (list) WORD_LIST *list; { @@ -111,6 +112,7 @@ pathchk_builtin (list) case 'p': pflag = 1; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -134,7 +136,7 @@ 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", + "create or access a file without causing 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 @@ -323,7 +325,7 @@ validate_path (path, portability) if (!last_elem) { exists = dir_ok (path); - if (dir_ok == 0) + if (exists == 0) { free (parent); return 1; @@ -370,8 +372,8 @@ validate_path (path, portability) free (parent); if (strlen (path) > path_max) { - builtin_error ("path `%s' has length %d; exceeds limit of %d", - path, strlen (path), path_max); + builtin_error ("path `%s' has length %lu; exceeds limit of %d", + path, (unsigned long)strlen (path), path_max); return 1; } diff --git a/examples/loadables/perl/Makefile.in b/examples/loadables/perl/Makefile.in index d8860bd..59f39b6 100644 --- a/examples/loadables/perl/Makefile.in +++ b/examples/loadables/perl/Makefile.in @@ -32,7 +32,7 @@ datarootdir = @datarootdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ @SET_MAKE@ CC = @CC@ diff --git a/examples/loadables/perl/bperl.c b/examples/loadables/perl/bperl.c index 77e3f7c..5b15258 100644 --- a/examples/loadables/perl/bperl.c +++ b/examples/loadables/perl/bperl.c @@ -3,23 +3,24 @@ */ #include -#include #include #include "builtins.h" #include "shell.h" +#include "common.h" #ifndef errno extern int errno; #endif -extern char **make_builtin_argv (); +extern char **make_builtin_argv (WORD_LIST *, int *); extern char **export_env; -extern int perl_main(); +extern void perl_close(void); +extern int perl_main(int, char **, char **); -bperl_builtin(list) -WORD_LIST *list; +int +bperl_builtin(WORD_LIST *list) { char **v; int c, r; @@ -31,6 +32,12 @@ WORD_LIST *list; return r; } +void +bperl_builtin_unload (char *s) +{ + perl_close(); +} + char *bperl_doc[] = { "An interface to a perl5 interpreter.", (char *)0 diff --git a/examples/loadables/perl/iperl.c b/examples/loadables/perl/iperl.c index 92a6038..89438af 100644 --- a/examples/loadables/perl/iperl.c +++ b/examples/loadables/perl/iperl.c @@ -1,15 +1,29 @@ #include /* from the Perl distribution */ #include /* from the Perl distribution */ -extern void xs_init _((void)); +#define iperl my_perl /* I guess the name `my_perl' is required */ + +extern void xs_init (pTHX); static PerlInterpreter *iperl; /*** The Perl interpreter ***/ +static int first = 1; + +void +perl_close (void) +{ + PERL_SYS_TERM(); +} + int perl_main(int argc, char **argv, char **env) { int r; + if (first) { + first = 0; + PERL_SYS_INIT3(&argc, &argv, &env); + } iperl = perl_alloc(); perl_construct(iperl); perl_parse(iperl, xs_init, argc, argv, (char **)NULL); diff --git a/examples/loadables/print.c b/examples/loadables/print.c index e17597b..d6c5903 100644 --- a/examples/loadables/print.c +++ b/examples/loadables/print.c @@ -122,6 +122,7 @@ print_builtin (list) case 'f': pfmt = list_optarg; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -180,7 +181,8 @@ printargs (list, ofp) 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); + if (ostr) + fprintf (ofp, "%s", ostr); free (ostr); if (sawc) return (0); diff --git a/examples/loadables/printenv.c b/examples/loadables/printenv.c index 8d3a05d..8c7f720 100644 --- a/examples/loadables/printenv.c +++ b/examples/loadables/printenv.c @@ -46,6 +46,7 @@ printenv_builtin (list) { switch (opt) { + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); diff --git a/examples/loadables/push.c b/examples/loadables/push.c index b076073..b27455b 100644 --- a/examples/loadables/push.c +++ b/examples/loadables/push.c @@ -4,7 +4,7 @@ */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -35,7 +35,7 @@ extern int errno; #endif -extern int dollar_dollar_pid; +extern pid_t dollar_dollar_pid; extern int last_command_exit_value; int @@ -51,6 +51,7 @@ push_builtin (list) { switch (opt) { + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -91,7 +92,7 @@ push_builtin (list) else { stop_pipeline (0, (COMMAND *)NULL); - xstatus = wait_for (pid); + xstatus = wait_for (pid, 0); return (xstatus); } } diff --git a/examples/loadables/realpath.c b/examples/loadables/realpath.c index ffcbef8..ef83671 100644 --- a/examples/loadables/realpath.c +++ b/examples/loadables/realpath.c @@ -1,10 +1,13 @@ /* * realpath -- canonicalize pathnames, resolving symlinks * - * usage: realpath [-csv] pathname [pathname...] + * usage: realpath [-cqsv] [-a name] pathname [pathname...] * - * options: -c check whether or not each resolved path exists - * -s no output, exit status determines whether path is valid + * options: -a name assign each canonicalized pathname to indexed array + * variable NAME + * -c check whether or not each resolved path exists + * -q no output, exit status determines whether path is valid + * -s strip . and .. from the pathname only, no symlink resolution * -v produce verbose output * * @@ -19,7 +22,7 @@ */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2009,2021,2022 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -60,61 +63,119 @@ extern int errno; extern char *sh_realpath(); -realpath_builtin(list) -WORD_LIST *list; +int +realpath_builtin(WORD_LIST *list) { - int opt, cflag, vflag, sflag, es; - char *r, realbuf[PATH_MAX], *p; + int opt, cflag, vflag, qflag, sflag, aflag, es; + char *r, realbuf[PATH_MAX], *p, *newpath; struct stat sb; +#if defined (ARRAY_VARS) + arrayind_t ind; + char *aname; + SHELL_VAR *v; +#endif if (list == 0) { builtin_usage(); return (EX_USAGE); } - vflag = cflag = sflag = 0; + vflag = cflag = qflag = aflag = sflag = 0; +#if defined (ARRAY_VARS) + aname = NULL; + v = NULL; + ind = 0; +#endif reset_internal_getopt(); - while ((opt = internal_getopt (list, "csv")) != -1) { + while ((opt = internal_getopt (list, "a:cqsv")) != -1) { switch (opt) { +#if defined (ARRAY_VARS) + case 'a': + aflag = 1; + aname = list_optarg; + break; +#endif case 'c': cflag = 1; break; + case 'q': + qflag = 1; + break; case 's': sflag = 1; break; case 'v': vflag = 1; break; + CASE_HELPOPT; default: builtin_usage(); + return (EX_USAGE); } } list = loptend; - if (list == 0) + if (list == 0) { builtin_usage(); + return (EX_USAGE); + } + +#if defined (ARRAY_VARS) + if (aflag && legal_identifier (aname) == 0) { + sh_invalidid(aname); + return (EXECUTION_FAILURE); + } + if (aname && builtin_unbind_variable (aname) == -2) + return (EXECUTION_FAILURE); + if (aname) { + v = find_or_make_array_variable (aname, 1); + if (v == 0 || readonly_p (v) || noassign_p (v)) { + if (v && readonly_p (v)) + err_readonly (aname); + return (EXECUTION_FAILURE); + } else if (array_p (v) == 0) { + builtin_error ("%s: not an indexed array", aname); + return (EXECUTION_FAILURE); + } + if (invisible_p (v)) + VUNSETATTR (v, att_invisible); + array_flush (array_cell (v)); + } +#endif for (es = EXECUTION_SUCCESS; list; list = list->next) { p = list->word->word; - r = sh_realpath(p, realbuf); + if (sflag) { + /* sh_canonpath doesn't convert to absolute pathnames */ + newpath = make_absolute(p, get_string_value("PWD")); + r = sh_canonpath(newpath, PATH_CHECKDOTDOT|PATH_CHECKEXISTS); + free(newpath); + } else + r = sh_realpath(p, realbuf); if (r == 0) { es = EXECUTION_FAILURE; - if (sflag == 0) + if (qflag == 0) builtin_error("%s: cannot resolve: %s", p, strerror(errno)); continue; } - if (cflag && (stat(realbuf, &sb) < 0)) { + if (cflag && (stat(r, &sb) < 0)) { es = EXECUTION_FAILURE; - if (sflag == 0) + if (qflag == 0) builtin_error("%s: %s", p, strerror(errno)); continue; } - if (sflag == 0) { + if (aflag) { + bind_array_element (v, ind, r, 0); + ind++; + } + if (qflag == 0) { if (vflag) printf ("%s -> ", p); - printf("%s\n", realbuf); + printf("%s\n", r); } + if (sflag) + free (r); } return es; } @@ -123,10 +184,16 @@ 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.", + "symbolic links.", + "The -a option stores each canonicalized PATHNAME argument into the indexed", + "array VARNAME.", + "The -c option checks whether or not each resolved name exists.", + "The -q option produces no output; the exit status determines the", + "validity of each PATHNAME, but any array assignment is still performed.", + "If the -s option is supplied, canonicalize . and .. pathname components", + "without resolving symbolic links.", + "The -v option produces verbose output.", + "The exit status is 0 if each PATHNAME was resolved; non-zero otherwise.", (char *)NULL }; @@ -135,6 +202,6 @@ struct builtin realpath_struct = { 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 */ + "realpath [-a varname] [-cqsv] pathname [pathname...]", /* usage synopsis */ 0 /* reserved for internal use */ }; diff --git a/examples/loadables/rm.c b/examples/loadables/rm.c new file mode 100644 index 0000000..d8d1522 --- /dev/null +++ b/examples/loadables/rm.c @@ -0,0 +1,185 @@ +/* rm - remove files and directories with -r */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 2016 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 . +*/ + +#include "config.h" + +#include +#include +#include +#include "builtins.h" +#include "shell.h" +#include "common.h" +#include "bashgetopt.h" + +#if !defined (errno) +extern int errno; +#endif + +static int rm_file(const char *fname); + +static int force, recursive; + +static int +_remove_directory(const char *dirname) +{ + DIR *dir; + struct dirent *dp; + size_t dirlen; + int err; + + dirlen = strlen (dirname); + err = 0; + + if ((dir = opendir(dirname))) + { + while ((dp = readdir(dir))) + { +#ifdef __GNUC__ + char fname[dirlen + 1 + strlen (dp->d_name) + 1]; +#else + char *fname; + int fnsize; +#endif + + QUIT; + if (*dp->d_name == '.' && (dp->d_name[1] == 0 || (dp->d_name[1] == '.' && dp->d_name[2] == 0))) + continue; + +#ifdef __GNUC__ + snprintf(fname, sizeof (fname), "%s/%s", dirname, dp->d_name); +#else + fnsize = dirlen + 1 + strlen (dp->d_name) + 1; + fname = xmalloc (fnsize); + snprintf(fname, fnsize, "%s/%s", dirname, dp->d_name); +#endif + + if (rm_file (fname) && force == 0) + err = 1; +#ifndef __GNUC__ + free (fname); +#endif + QUIT; + } + + closedir(dir); + + if (err == 0 && rmdir (dirname) && force == 0) + err = 1; + } + else if (force == 0) + err = 1; + + if (err) + builtin_error ("%s: %s", dirname, strerror (errno)); + + return err; +} + +static int +rm_file(const char *fname) +{ + if (unlink (fname) == 0) + return 0; + + QUIT; + /* If FNAME is a directory glibc returns EISDIR but correct POSIX value + would be EPERM. If we get that error and FNAME is a directory and -r + was supplied, recursively remove the directory and its contents */ + if ((errno == EISDIR || errno == EPERM) && recursive && file_isdir (fname)) + return _remove_directory(fname); + else if (force) + return 0; + + builtin_error ("%s: %s", fname, strerror (errno)); + return 1; +} + +int +rm_builtin (list) + WORD_LIST *list; +{ + const char *name; + WORD_LIST *l; + int rval, opt; + + recursive = force = 0; + rval = EXECUTION_SUCCESS; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "Rrfi")) != -1) + { + switch (opt) + { + case 'R': + case 'r': + recursive = 1; + break; + case 'f': + force = 1; + break; + case 'i': + return (EX_DISKFALLBACK); + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + { + if (force == 0) + { + builtin_usage (); + return (EXECUTION_FAILURE); + } + return (EXECUTION_SUCCESS); + } + + for (l = list; l; l = l->next) + { + QUIT; + if (rm_file(l->word->word) && force == 0) + rval = EXECUTION_FAILURE; + } + + return rval; +} + +char *rm_doc[] = { + "Remove files.", + "", + "rm removes the files specified as arguments.", + (char *)NULL +}; + +/* The standard structure describing a builtin command. bash keeps an array + of these structures. */ +struct builtin rm_struct = { + "rm", /* builtin name */ + rm_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + rm_doc, /* array of long documentation strings. */ + "rm [-rf] file ...", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/examples/loadables/rmdir.c b/examples/loadables/rmdir.c index 0cfe6c7..001c2bd 100644 --- a/examples/loadables/rmdir.c +++ b/examples/loadables/rmdir.c @@ -32,6 +32,7 @@ extern int errno; #endif +int rmdir_builtin (list) WORD_LIST *list; { diff --git a/examples/loadables/seq.c b/examples/loadables/seq.c new file mode 100644 index 0000000..f8eec5b --- /dev/null +++ b/examples/loadables/seq.c @@ -0,0 +1,502 @@ +/* seq - print sequence of numbers to standard output. + Copyright (C) 2018-2020 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 . */ + +/* Written as bash builtin by Chet Ramey. Portions from seq.c by Ulrich Drepper. */ + +#include + +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include + +#include "bashansi.h" +#include "loadables.h" +#include "bashintl.h" + +#ifndef errno +extern int errno; +#endif + +#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 (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN) +typedef long double floatmax_t; +# define FLOATMAX_CONV "L" +# define strtofltmax strtold +# define FLOATMAX_FMT "%Lg" +# define FLOATMAX_WFMT "%0.Lf" +# define USE_LONG_DOUBLE +#else +typedef double floatmax_t; +# define FLOATMAX_CONV "" +# define strtofltmax strtod +# define FLOATMAX_FMT "%g" +# define FLOATMAX_WFMT "%0.f" +#endif +static floatmax_t getfloatmax PARAMS((const char *)); +static char *genformat PARAMS((floatmax_t, floatmax_t, floatmax_t)); + +#define MAX(a, b) (((a) < (b))? (b) : (a)) + +static int conversion_error = 0; + +/* If true print all number with equal width. */ +static int equal_width; + +/* The string used to separate two numbers. */ +static char const *separator; + +/* The string output after all numbers have been output. */ +static char const terminator[] = "\n"; + +static char decimal_point; + +/* Pretty much the same as the version in builtins/printf.def */ +static floatmax_t +getfloatmax (arg) + const char *arg; +{ + floatmax_t ret; + char *ep; + + errno = 0; + ret = strtofltmax (arg, &ep); + + if (*ep) + { + sh_invalidnum ((char *)arg); + conversion_error = 1; + } + else if (errno == ERANGE) + { + builtin_error ("warning: %s: %s", arg, strerror(ERANGE)); + conversion_error = 1; + } + + if (ret == -0.0) + ret = 0.0; + + return (ret); +} + +/* If FORMAT is a valid printf format for a double argument, return + its long double equivalent, allocated from dynamic storage. This + was written by Ulrich Drepper, taken from coreutils:seq.c */ +static char * +long_double_format (char const *fmt) +{ + size_t i; + size_t length_modifier_offset; + int has_L; + + for (i = 0; ! (fmt[i] == '%' && fmt[i + 1] != '%'); i += (fmt[i] == '%') + 1) + { + if (!fmt[i]) + { + builtin_error ("format %s has no %% directive", fmt); + return 0; + } + } + + i++; + i += strspn (fmt + i, "-+#0 '"); /* zero or more flags */ + i += strspn (fmt + i, "0123456789"); /* optional minimum field width */ + if (fmt[i] == '.') /* optional precision */ + { + i++; + i += strspn (fmt + i, "0123456789"); + } + + length_modifier_offset = i; /* optional length modifier */ + /* we could ignore an 'l' length modifier here */ + has_L = (fmt[i] == 'L'); + i += has_L; + switch (fmt[i]) + { + case '\0': + builtin_error ("format %s ends in %%", fmt); + return 0; + case 'A': + case 'a': + case 'e': + case 'E': + case 'f': + case 'F': + case 'g': + case 'G': + break; + default: + builtin_error ("format %s has unknown `%%%c' directive", fmt, fmt[i]); + return 0; + } + for (i++; ; i += (fmt[i] == '%') + 1) + if (fmt[i] == '%' && fmt[i + 1] != '%') + { + builtin_error ("format %s has too many %% directives", fmt); + return 0; + } + else if (fmt[i] == 0) + { + size_t format_size = i + 1; + char *ldfmt = xmalloc (format_size + 1); + memcpy (ldfmt, fmt, length_modifier_offset); +#ifdef USE_LONG_DOUBLE + ldfmt[length_modifier_offset] = 'L'; + strcpy (ldfmt + length_modifier_offset + 1, + fmt + length_modifier_offset + has_L); +#else + strcpy (ldfmt + length_modifier_offset, fmt + length_modifier_offset); +#endif + return ldfmt; + } +} + +/* Return the number of digits following the decimal point in NUMBUF */ +static int +getprec (numbuf) + const char *numbuf; +{ + int p; + char *dp; + + if (dp = strchr (numbuf, decimal_point)) + dp++; /* skip over decimal point */ + for (p = 0; dp && *dp && ISDIGIT (*dp); dp++) + p++; + return p; +} + +/* Return the default format given FIRST, INCR, and LAST. */ +static char * +genformat (first, incr, last) + floatmax_t first, incr, last; +{ + static char buf[6 + 2 * INT_STRLEN_BOUND (int)]; + int wfirst, wlast, width; + int iprec, fprec, lprec, prec; + + if (equal_width == 0) + return (FLOATMAX_FMT); + + /* OK, we have to figure out the largest number of decimal places. This is + a little more expensive than using the original strings. */ + snprintf (buf, sizeof (buf), FLOATMAX_FMT, incr); + iprec = getprec (buf); + + wfirst = snprintf (buf, sizeof (buf), FLOATMAX_FMT, first); + fprec = getprec (buf); + + prec = MAX (fprec, iprec); + + wlast = snprintf (buf, sizeof (buf), FLOATMAX_FMT, last); + lprec = getprec (buf); + + /* increase first width by any increased precision in increment */ + wfirst += (prec - fprec); + + /* adjust last width to use precision from first/incr */ + wlast += (prec - lprec); + + if (lprec && prec == 0) + wlast--; /* no decimal point */ + if (lprec == 0 && prec) + wlast++; /* include decimal point */ + if (fprec == 0 && prec) + wfirst++; /* include decimal point */ + + width = MAX (wfirst, wlast); + if (width) + sprintf (buf, "%%0%d.%d%sf", width, prec, FLOATMAX_CONV); + else + sprintf (buf, "%%.%d%sf", prec, FLOATMAX_CONV); + + return buf; +} + +int +print_fltseq (fmt, first, last, incr) + const char *fmt; + floatmax_t first, last, incr; +{ + int n; + floatmax_t next; + const char *s; + + n = 0; /* iteration counter */ + s = ""; + for (next = first; incr >= 0 ? (next <= last) : (next >= last); next = first + n * incr) + { + QUIT; + if (*s && fputs (s, stdout) == EOF) + return (sh_chkwrite (EXECUTION_FAILURE)); + if (printf (fmt, next) < 0) + return (sh_chkwrite (EXECUTION_FAILURE)); + s = separator; + n++; + } + + if (n > 0 && fputs (terminator, stdout) == EOF) + return (sh_chkwrite (EXECUTION_FAILURE)); + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +/* must be <= INT_STRLEN_BOUND(intmax_t) */ +int +width_needed (num) + intmax_t num; +{ + int ret; + + ret = num < 0; /* sign */ + if (ret) + num = -num; + do + ret++; + while (num /= 10); + return ret; +} + +int +print_intseq (ifirst, ilast, iincr) + intmax_t ifirst, ilast, iincr; +{ + char intwfmt[6 + INT_STRLEN_BOUND(int) + sizeof (PRIdMAX)]; + const char *s; + intmax_t i, next; + + /* compute integer format string */ + if (equal_width) /* -w supplied */ + { + int wfirst, wlast, width; + + wfirst = width_needed (ifirst); + wlast = width_needed (ilast); + width = MAX(wfirst, wlast); + + /* The leading %s is for the separator */ + snprintf (intwfmt, sizeof (intwfmt), "%%s%%0%u" PRIdMAX, width); + } + + /* We could use braces.c:mkseq here but that allocates lots of memory */ + s = ""; + for (i = ifirst; (ifirst <= ilast) ? (i <= ilast) : (i >= ilast); i = next) + { + QUIT; + /* The leading %s is for the separator */ + if (printf (equal_width ? intwfmt : "%s%" PRIdMAX, s, i) < 0) + return (sh_chkwrite (EXECUTION_FAILURE)); + s = separator; + next = i + iincr; + } + + if (fputs (terminator, stdout) == EOF) + return (sh_chkwrite (EXECUTION_FAILURE)); + return (sh_chkwrite (EXECUTION_SUCCESS)); +} + +int +seq_builtin (list) + WORD_LIST *list; +{ + floatmax_t first, last, incr; + intmax_t ifirst, ilast, iincr; + WORD_LIST *l; + int opt, nargs, intseq, freefmt; + char *first_str, *incr_str, *last_str; + char const *fmtstr; /* The printf(3) format used for output. */ + + equal_width = 0; + separator = "\n"; + fmtstr = NULL; + + first = 1.0; + last = 0.0; + incr = 0.0; /* set later */ + ifirst = ilast = iincr = 0; + first_str = incr_str = last_str = 0; + + intseq = freefmt = 0; + opt = 0; + + reset_internal_getopt (); + while (opt != -1) + { + l = lcurrent ? lcurrent : list; + if (l && l->word && l->word->word && l->word->word[0] == '-' && + (l->word->word[1] == '.' || DIGIT (l->word->word[1]))) + { + loptend = l; + break; /* negative number */ + } + if ((opt = internal_getopt (list, "f:s:w")) == -1) + break; + + switch (opt) + { + case 'f': + fmtstr = list_optarg; + break; + case 's': + separator = list_optarg; + break; + case 'w': + equal_width = 1; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + list = loptend; + + if (list == 0) + { + builtin_usage (); + return (EXECUTION_FAILURE); + } + + for (nargs = 1, l = list; l->next; l = l->next) + nargs++; + if (nargs > 3) + { + builtin_usage (); + return (EXECUTION_FAILURE); + } + + /* LAST */ + conversion_error = 0; + last = getfloatmax (last_str = l->word->word); + if (conversion_error) + return (EXECUTION_FAILURE); + + /* FIRST LAST */ + if (nargs > 1) + { + conversion_error = 0; + first = getfloatmax (first_str = list->word->word); + if (conversion_error) + return (EXECUTION_FAILURE); + } + + /* FIRST INCR LAST */ + if (nargs > 2) + { + conversion_error = 0; + incr = getfloatmax (incr_str = list->next->word->word); + if (conversion_error) + return (EXECUTION_FAILURE); + if (incr == 0.0) + { + builtin_error ("zero %screment", (first < last) ? "in" : "de"); + return (EXECUTION_FAILURE); + } + } + + /* Sanitize arguments */ + if (incr == 0.0) + incr = (first <= last) ? 1.0 : -1.0; + if ((incr < 0.0 && first < last) || (incr > 0 && first > last)) + { + builtin_error ("incorrect %screment", (first < last) ? "in" : "de"); + return (EXECUTION_FAILURE); + } + + /* validate format here */ + if (fmtstr) + { + fmtstr = long_double_format (fmtstr); + freefmt = 1; + if (fmtstr == 0) + return (EXECUTION_FAILURE); + } + + if (fmtstr != NULL && equal_width) + { + builtin_warning ("-w ignored when the format string is specified"); + equal_width = 0; + } + + /* Placeholder for later additional conditions */ + if (last_str && all_digits (last_str) && + (first_str == 0 || all_digits (first_str)) && + (incr_str == 0 || all_digits (incr_str)) && + fmtstr == NULL) + intseq = 1; + + if (intseq) + { + ifirst = (intmax_t)first; /* truncation */ + ilast = (intmax_t)last; + iincr = (intmax_t)incr; + + return (print_intseq (ifirst, ilast, iincr)); + } + + decimal_point = locale_decpoint (); + if (fmtstr == NULL) + fmtstr = genformat (first, incr, last); + + print_fltseq (fmtstr, first, last, incr); + + if (freefmt) + free ((void *)fmtstr); + return sh_chkwrite (EXECUTION_SUCCESS); +} + +/* Taken largely from GNU seq. */ +char *seq_doc[] = { + "Print numbers from FIRST to LAST, in steps of INCREMENT.", + "", + "-f FORMAT use printf style floating-point FORMAT", + "-s STRING use STRING to separate numbers (default: \\n)", + "-w equalize width by padding with leading zeroes", + "", + "If FIRST or INCREMENT is omitted, it defaults to 1. However, an", + "omitted INCREMENT defaults to -1 when LAST is smaller than FIRST.", + "The sequence of numbers ends when the sum of the current number and", + "INCREMENT would become greater than LAST.", + "FIRST, INCREMENT, and LAST are interpreted as floating point values.", + "", + "FORMAT must be suitable for printing one argument of type 'double';", + "it defaults to %.PRECf if FIRST, INCREMENT, and LAST are all fixed point", + "decimal numbers with maximum precision PREC, and to %g otherwise.", + (char *)NULL +}; + +struct builtin seq_struct = { + "seq", + seq_builtin, + BUILTIN_ENABLED, + seq_doc, + "seq [-f format] [-s separator] [-w] [FIRST [INCR]] LAST", + 0 +}; diff --git a/examples/loadables/setpgid.c b/examples/loadables/setpgid.c new file mode 100644 index 0000000..e56fd51 --- /dev/null +++ b/examples/loadables/setpgid.c @@ -0,0 +1,121 @@ +/* setpgid.c: bash loadable wrapper for setpgid system call + + An example of how to wrap a system call with a loadable builtin. + + Originally contributed by Jason Vas Dias + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include +#include + +#include "bashtypes.h" +#include "posixtime.h" + +#include + +#include "builtins.h" +#include "shell.h" +#include "common.h" + +#include "bashgetopt.h" + +#if !defined (_POSIX_VERSION) +# define setpgid(pid, pgrp) setpgrp (pid, pgrp) +#endif + +int +setpgid_builtin (list) + WORD_LIST *list; +{ + register WORD_LIST *wl; + intmax_t pid_arg, pgid_arg; + pid_t pid, pgid; + char *pidstr, *pgidstr; + + wl = list; + pid = pgid = 0; + + if (wl == 0 || wl->next == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + pidstr = wl->word ? wl->word->word : 0; + pgidstr = wl->next->word ? wl->next->word->word : 0; + + if (pidstr == 0 || pgidstr == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + if (legal_number (pidstr, &pid_arg) == 0) + { + builtin_error ("%s: pid argument must be numeric", pidstr); + return (EXECUTION_FAILURE); + } + if (pid_arg < 0) + { + builtin_error("%s: negative pid values not allowed", pidstr); + return (EXECUTION_FAILURE); + } + pid = pid_arg; + + if (legal_number (pgidstr, &pgid_arg) == 0) + { + builtin_error ("%s: pgrp argument must be numeric", pgidstr); + return (EXECUTION_FAILURE); + } + if (pgid_arg < 0) + { + builtin_error ("%s: negative pgrp values not allowed", pgidstr); + return (EXECUTION_FAILURE); + } + pgid = pgid_arg; + + errno = 0; + if (setpgid(pid, pgid) < 0) + { + builtin_error("setpgid failed: %s", strerror (errno)); + return (EXECUTION_FAILURE); + } + return (EXECUTION_SUCCESS); +} + +const char *setpgid_doc[] = { + "invoke the setpgid(2) system call", + "", + "Arguments:", + " pid : numeric process identifier, >= 0", + " pgrpid: numeric process group identifier, >=0", + "See the setpgid(2) manual page.", + (const char *)NULL +}; + +struct builtin setpgid_struct = { + "setpgid", + setpgid_builtin, + BUILTIN_ENABLED, + (char **)setpgid_doc, + "setpgid pid pgrpid", + 0 +}; diff --git a/examples/loadables/sleep.c b/examples/loadables/sleep.c index a9bd36f..204601f 100644 --- a/examples/loadables/sleep.c +++ b/examples/loadables/sleep.c @@ -2,10 +2,12 @@ * sleep -- sleep for fractions of a second * * usage: sleep seconds[.fraction] + * + * as an extension, we support the GNU time interval format (2m20s) */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -44,38 +46,117 @@ #include #include "chartypes.h" -#include "shell.h" -#include "builtins.h" -#include "common.h" +#include "loadables.h" + +#define S_SEC 1 +#define S_MIN (60*S_SEC) +#define S_HOUR (60*S_MIN) +#define S_DAY (24*S_HOUR) + +static int +parse_gnutimefmt (char *string, long *sp, long *up) +{ + int c, r; + char *s, *ep; + long tsec, tusec, accumsec, accumusec, t; + int mult; + + tsec = tusec = 0; + accumsec = accumusec = 0; + mult = 1; + + for (s = string; s && *s; s++) { + r = uconvert(s, &accumsec, &accumusec, &ep); + if (r == 0 && *ep == 0) + return r; + c = *ep; + mult = 1; + switch (c) { + case '\0': + case 's': + mult = S_SEC; + break; + case 'm': + mult = S_MIN; + break; + case 'h': + mult = S_HOUR; + break; + case 'd': + mult = S_DAY; + break; + default: + return 0; + } + + /* multiply the accumulated value by the multiplier */ + t = accumusec * mult; + accumsec = accumsec * mult + (t / 1000000); + accumusec = t % 1000000; + + /* add to running total */ + tsec += accumsec; + tusec += accumusec; + if (tusec >= 1000000) { + tsec++; + tusec -= 1000000; + } + + /* reset and continue */ + accumsec = accumusec = 0; + mult = 1; + if (c == 0) + break; + s = ep; + } + + if (sp) + *sp = tsec; + if (up) + *up = tusec; -#define RETURN(x) \ - do { \ - if (sp) *sp = sec; \ - if (usp) *usp = usec; \ - return (x); \ - } while (0) + return 1; +} int -sleep_builtin (list) -WORD_LIST *list; +sleep_builtin (WORD_LIST *list) { long sec, usec; + char *ep; + int r, mul; + time_t t; if (list == 0) { builtin_usage(); return(EX_USAGE); } + /* Skip over `--' */ + if (list->word && ISOPTION (list->word->word, '-')) + list = list->next; + if (*list->word->word == '-' || list->next) { builtin_usage (); return (EX_USAGE); } - if (uconvert(list->word->word, &sec, &usec)) { + r = uconvert(list->word->word, &sec, &usec, &ep); + /* + * Maybe postprocess conversion failures here based on EP + * + * A heuristic: if the conversion failed, but the argument appears to + * contain a GNU-like interval specifier (e.g. "1m30s"), try to parse + * it. If we can't, return the right exit code to tell + * execute_builtin to try and execute a disk command instead. + */ + if (r == 0 && (strchr ("dhms", *ep) || strpbrk (list->word->word, "dhms"))) + r = parse_gnutimefmt (list->word->word, &sec, &usec); + + if (r) { fsleep(sec, usec); + QUIT; return(EXECUTION_SUCCESS); - } - + } builtin_error("%s: bad sleep interval", list->word->word); return (EXECUTION_FAILURE); } @@ -84,6 +165,7 @@ static char *sleep_doc[] = { "Suspend execution for specified period.", "" "sleep suspends execution for a minimum of SECONDS[.FRACTION] seconds.", + "As an extension, sleep accepts GNU-style time intervals (e.g., 2m30s).", (char *)NULL }; diff --git a/examples/loadables/stat.c b/examples/loadables/stat.c new file mode 100644 index 0000000..1e60e7b --- /dev/null +++ b/examples/loadables/stat.c @@ -0,0 +1,464 @@ +/* stat - load up an associative array with stat information about a file */ + +/* See Makefile for compilation details. */ + +/* + Copyright (C) 2016,2022 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 . +*/ + +#include + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include + +#include +#include "posixstat.h" +#include +#include +#include +#include +#include "posixtime.h" + +#include "bashansi.h" +#include "shell.h" +#include "builtins.h" +#include "common.h" +#include "bashgetopt.h" + +#ifndef errno +extern int errno; +#endif + +#define ST_NAME 0 +#define ST_DEV 1 +#define ST_INO 2 +#define ST_MODE 3 +#define ST_NLINK 4 +#define ST_UID 5 +#define ST_GID 6 +#define ST_RDEV 7 +#define ST_SIZE 8 +#define ST_ATIME 9 +#define ST_MTIME 10 +#define ST_CTIME 11 +#define ST_BLKSIZE 12 +#define ST_BLOCKS 13 +#define ST_CHASELINK 14 +#define ST_PERMS 15 + +#define ST_END 16 + +static char *arraysubs[] = + { + "name", "device", "inode", "type", "nlink", "uid", "gid", "rdev", + "size", "atime", "mtime", "ctime", "blksize", "blocks", "link", "perms", + 0 + }; + +#define DEFTIMEFMT "%a %b %e %k:%M:%S %Z %Y" +#ifndef TIMELEN_MAX +# define TIMELEN_MAX 128 +#endif + +static char *stattime (time_t, const char *); + +static int +getstat (fname, flags, sp) + const char *fname; + int flags; + struct stat *sp; +{ + intmax_t lfd; + int fd, r; + + if (strncmp (fname, "/dev/fd/", 8) == 0) + { + if ((legal_number(fname + 8, &lfd) == 0) || (int)lfd != lfd) + { + errno = EINVAL; + return -1; + } + fd = lfd; + r = fstat(fd, sp); + } +#ifdef HAVE_LSTAT + else if (flags & 1) + r = lstat(fname, sp); +#endif + else + r = stat(fname, sp); + + return r; +} + +static char * +statlink (fname, sp) + char *fname; + struct stat *sp; +{ +#if defined (HAVE_READLINK) + char linkbuf[PATH_MAX]; + int n; + + if (fname && S_ISLNK (sp->st_mode) && (n = readlink (fname, linkbuf, PATH_MAX)) > 0) + { + linkbuf[n] = '\0'; + return (savestring (linkbuf)); + } + else +#endif + return (savestring (fname)); +} + +static char * +octalperms (m) + int m; +{ + int operms; + char *ret; + + operms = 0; + + if (m & S_IRUSR) + operms |= 0400; + if (m & S_IWUSR) + operms |= 0200; + if (m & S_IXUSR) + operms |= 0100; + + if (m & S_IRGRP) + operms |= 0040; + if (m & S_IWGRP) + operms |= 0020; + if (m & S_IXGRP) + operms |= 0010; + + if (m & S_IROTH) + operms |= 0004; + if (m & S_IWOTH) + operms |= 0002; + if (m & S_IXOTH) + operms |= 0001; + + if (m & S_ISUID) + operms |= 04000; + if (m & S_ISGID) + operms |= 02000; + if (m & S_ISVTX) + operms |= 01000; + + ret = (char *)xmalloc (16); + snprintf (ret, 16, "%04o", operms); + return ret; +} + +static char * +statperms (m) + int m; +{ + char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */ + int i; + char *ret; + + 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'; + + ret = (char *)xmalloc (32); + snprintf (ret, 32, "u=%s,g=%s,o=%s", ubits, gbits, obits); + return ret; +} + +static char * +statmode(mode) + int mode; +{ + char *modestr, *m; + + modestr = m = (char *)xmalloc (8); + if (S_ISBLK (mode)) + *m++ = 'b'; + if (S_ISCHR (mode)) + *m++ = 'c'; + if (S_ISDIR (mode)) + *m++ = 'd'; + if (S_ISREG(mode)) + *m++ = '-'; + if (S_ISFIFO(mode)) + *m++ = 'p'; + if (S_ISLNK(mode)) + *m++ = 'l'; + if (S_ISSOCK(mode)) + *m++ = 's'; + +#ifdef S_ISDOOR + if (S_ISDOOR (mode)) + *m++ = 'D'; +#endif +#ifdef S_ISWHT + if (S_ISWHT(mode)) + *m++ = 'W'; +#endif +#ifdef S_ISNWK + if (S_ISNWK(mode)) + *m++ = 'n'; +#endif +#ifdef S_ISMPC + if (S_ISMPC (mode)) + *m++ = 'm'; +#endif + + *m = '\0'; + return (modestr); +} + +static char * +stattime (t, timefmt) + time_t t; + const char *timefmt; +{ + char *tbuf, *ret; + const char *fmt; + size_t tlen; + struct tm *tm; + + fmt = timefmt ? timefmt : DEFTIMEFMT; + tm = localtime (&t); + + ret = xmalloc (TIMELEN_MAX); + + tlen = strftime (ret, TIMELEN_MAX, fmt, tm); + if (tlen == 0) + tlen = strftime (ret, TIMELEN_MAX, DEFTIMEFMT, tm); + + return ret; +} + +static char * +statval (which, fname, flags, fmt, sp) + int which; + char *fname; + int flags; + char *fmt; + struct stat *sp; +{ + int temp; + + switch (which) + { + case ST_NAME: + return savestring (fname); + case ST_DEV: + return itos (sp->st_dev); + case ST_INO: + return itos (sp->st_ino); + case ST_MODE: + return (statmode (sp->st_mode)); + case ST_NLINK: + return itos (sp->st_nlink); + case ST_UID: + return itos (sp->st_uid); + case ST_GID: + return itos (sp->st_gid); + case ST_RDEV: + return itos (sp->st_rdev); + case ST_SIZE: + return itos (sp->st_size); + case ST_ATIME: + return ((flags & 2) ? stattime (sp->st_atime, fmt) : itos (sp->st_atime)); + case ST_MTIME: + return ((flags & 2) ? stattime (sp->st_mtime, fmt) : itos (sp->st_mtime)); + case ST_CTIME: + return ((flags & 2) ? stattime (sp->st_ctime, fmt) : itos (sp->st_ctime)); + case ST_BLKSIZE: + return itos (sp->st_blksize); + case ST_BLOCKS: + return itos (sp->st_blocks); + case ST_CHASELINK: + return (statlink (fname, sp)); + case ST_PERMS: + temp = sp->st_mode & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID); + return (flags & 2) ? statperms (temp) : octalperms (temp); + default: + return savestring ("42"); + } +} + +static int +loadstat (vname, var, fname, flags, fmt, sp) + char *vname; + SHELL_VAR *var; + char *fname; + int flags; + char *fmt; + struct stat *sp; +{ + int i; + char *key, *value; + SHELL_VAR *v; + + for (i = 0; arraysubs[i]; i++) + { + key = savestring (arraysubs[i]); + value = statval (i, fname, flags, fmt, sp); + v = bind_assoc_variable (var, vname, key, value, ASS_FORCE); + } + return 0; +} + +int +stat_builtin (list) + WORD_LIST *list; +{ + int opt, flags; + char *aname, *fname, *timefmt; + struct stat st; + SHELL_VAR *v; + + aname = "STAT"; + flags = 0; + timefmt = 0; + + reset_internal_getopt (); + while ((opt = internal_getopt (list, "A:F:Ll")) != -1) + { + switch (opt) + { + case 'A': + aname = list_optarg; + break; + case 'L': + flags |= 1; /* operate on links rather than resolving them */ + break; + case 'l': + flags |= 2; + break; + case 'F': + timefmt = list_optarg; + break; + CASE_HELPOPT; + default: + builtin_usage (); + return (EX_USAGE); + } + } + + if (legal_identifier (aname) == 0) + { + sh_invalidid (aname); + return (EXECUTION_FAILURE); + } + + list = loptend; + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + +#if 0 + unbind_variable (aname); +#endif + fname = list->word->word; + + if (getstat (fname, flags, &st) < 0) + { + builtin_error ("%s: cannot stat: %s", fname, strerror (errno)); + return (EXECUTION_FAILURE); + } + + v = find_or_make_array_variable (aname, 3); + if (v == 0) + { + builtin_error ("%s: cannot create variable", aname); + return (EXECUTION_FAILURE); + } + if (loadstat (aname, v, fname, flags, timefmt, &st) < 0) + { + builtin_error ("%s: cannot assign file status information", aname); + unbind_variable (aname); + return (EXECUTION_FAILURE); + } + + 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 *stat_doc[] = { + "Load an associative array with file status information.", + "", + "Take a filename and load the status information returned by a", + "stat(2) call on that file into the associative array specified", + "by the -A option. The default array name is STAT.", + "", + "If the -L option is supplied, stat does not resolve symbolic links", + "and reports information about the link itself. The -l option results", + "in longer-form listings for some of the fields. When -l is used,", + "the -F option supplies a format string passed to strftime(3) to", + "display the file time information.", + "The exit status is 0 unless the stat fails or assigning the array", + "is unsuccessful.", + (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 stat_struct = { + "stat", /* builtin name */ + stat_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + stat_doc, /* array of long documentation strings. */ + "stat [-lL] [-A aname] file", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ +}; diff --git a/examples/loadables/strftime.c b/examples/loadables/strftime.c index 2de09e3..f4e194e 100644 --- a/examples/loadables/strftime.c +++ b/examples/loadables/strftime.c @@ -34,6 +34,7 @@ #include "builtins.h" #include "shell.h" #include "common.h" +#include "bashgetopt.h" int strftime_builtin (list) @@ -46,15 +47,16 @@ strftime_builtin (list) int n; intmax_t i; + if (no_options (list)) + return (EX_USAGE); + list = loptend; + if (list == 0) { builtin_usage (); return (EX_USAGE); } - if (no_options (list)) - return (EX_USAGE); - format = list->word->word; if (format == 0 || *format == 0) { @@ -86,7 +88,7 @@ strftime_builtin (list) /* 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++) + for (n = 1; n <= 8; n++) { tbuf = xrealloc (tbuf, tbsize * n); tsize = strftime (tbuf, tbsize * n, format, t); @@ -94,7 +96,8 @@ strftime_builtin (list) break; } - printf ("%s\n", tbuf); + if (tsize) + printf ("%s\n", tbuf); free (tbuf); return (EXECUTION_SUCCESS); diff --git a/examples/loadables/sync.c b/examples/loadables/sync.c index d91852e..4fbeee1 100644 --- a/examples/loadables/sync.c +++ b/examples/loadables/sync.c @@ -28,6 +28,7 @@ #include "shell.h" #include "bashgetopt.h" +int sync_builtin (list) WORD_LIST *list; { diff --git a/examples/loadables/tee.c b/examples/loadables/tee.c index 8b5715f..0365aa9 100644 --- a/examples/loadables/tee.c +++ b/examples/loadables/tee.c @@ -3,7 +3,7 @@ /* See Makefile for compilation details. */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -60,6 +60,7 @@ extern int interrupt_immediately; extern char *strerror (); +int tee_builtin (list) WORD_LIST *list; { @@ -83,6 +84,7 @@ tee_builtin (list) case 'i': nointr = 1; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -119,6 +121,7 @@ tee_builtin (list) fl = fl->next; fl->next = (FLIST *)NULL; } + QUIT; } while ((nr = read(0, buf, TEE_BUFSIZE)) > 0) @@ -135,6 +138,7 @@ tee_builtin (list) break; } bp += nw; + QUIT; } while (n -= nw); } @@ -154,7 +158,8 @@ tee_builtin (list) tee_flist = tee_flist->next; free (fl); } - + + QUIT; return (rval); } @@ -162,7 +167,7 @@ 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", + "filename argument. If the `-a' option is given, the specified", "files are appended to, otherwise they are overwritten. If the", "`-i' option is supplied, tee ignores interrupts.", (char *)NULL diff --git a/examples/loadables/template.c b/examples/loadables/template.c index 3a5814f..094b80c 100644 --- a/examples/loadables/template.c +++ b/examples/loadables/template.c @@ -11,9 +11,7 @@ #include #include -#include "builtins.h" -#include "shell.h" -#include "bashgetopt.h" +#include "loadables.h" #if !defined (errno) extern int errno; @@ -21,6 +19,7 @@ extern int errno; extern char *strerror (); +int template_builtin (list) WORD_LIST *list; { @@ -32,6 +31,7 @@ template_builtin (list) { switch (opt) { + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -42,6 +42,22 @@ template_builtin (list) return (rval); } +/* Called when `template' is enabled and loaded from the shared object. If this + function returns 0, the load fails. */ +int +template_builtin_load (name) + char *name; +{ + return (1); +} + +/* Called when `template' is disabled. */ +void +template_builtin_unload (name) + char *name; +{ +} + char *template_doc[] = { "Short description.", "" diff --git a/examples/loadables/truefalse.c b/examples/loadables/truefalse.c index 113e88f..e011fa1 100644 --- a/examples/loadables/truefalse.c +++ b/examples/loadables/truefalse.c @@ -25,12 +25,14 @@ #include "builtins.h" #include "common.h" +int true_builtin (list) WORD_LIST *list; { return EXECUTION_SUCCESS; } +int false_builtin (list) WORD_LIST *list; { diff --git a/examples/loadables/tty.c b/examples/loadables/tty.c index 1d88506..381df25 100644 --- a/examples/loadables/tty.c +++ b/examples/loadables/tty.c @@ -3,7 +3,7 @@ /* See Makefile for compilation details. */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -30,6 +30,7 @@ extern char *ttyname (); +int tty_builtin (list) WORD_LIST *list; { @@ -45,6 +46,7 @@ tty_builtin (list) case 's': sflag = 1; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); @@ -53,6 +55,7 @@ tty_builtin (list) list = loptend; t = ttyname (0); + QUIT; if (sflag == 0) puts (t ? t : "not a tty"); return (t ? EXECUTION_SUCCESS : EXECUTION_FAILURE); diff --git a/examples/loadables/uname.c b/examples/loadables/uname.c index a1bddd5..106a1c8 100644 --- a/examples/loadables/uname.c +++ b/examples/loadables/uname.c @@ -63,6 +63,7 @@ static void uprint(); static int uname_flags; +int uname_builtin (list) WORD_LIST *list; { @@ -94,6 +95,7 @@ uname_builtin (list) case 'v': uname_flags |= FLAG_VERSION; break; + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); diff --git a/examples/loadables/unlink.c b/examples/loadables/unlink.c index 07e3f3d..ff2a78a 100644 --- a/examples/loadables/unlink.c +++ b/examples/loadables/unlink.c @@ -38,6 +38,7 @@ extern int errno; #endif +int unlink_builtin (list) WORD_LIST *list; { diff --git a/examples/loadables/whoami.c b/examples/loadables/whoami.c index 6f8471a..3e7e36e 100644 --- a/examples/loadables/whoami.c +++ b/examples/loadables/whoami.c @@ -28,6 +28,7 @@ #include "bashgetopt.h" #include "common.h" +int whoami_builtin (list) WORD_LIST *list; { @@ -38,6 +39,7 @@ whoami_builtin (list) { switch (opt) { + CASE_HELPOPT; default: builtin_usage (); return (EX_USAGE); diff --git a/examples/misc/aliasconv.bash b/examples/misc/aliasconv.bash old mode 100755 new mode 100644 diff --git a/examples/misc/aliasconv.sh b/examples/misc/aliasconv.sh old mode 100755 new mode 100644 diff --git a/examples/misc/cshtobash b/examples/misc/cshtobash old mode 100755 new mode 100644 diff --git a/examples/misc/suncmd.termcap b/examples/misc/suncmd.termcap deleted file mode 100644 index c3422fb..0000000 --- a/examples/misc/suncmd.termcap +++ /dev/null @@ -1,30 +0,0 @@ -#Posted-Date: Fri, 9 Mar 90 18:34:29 EST -#Date: Fri, 9 Mar 90 18:34:29 EST -#From: "Eirik Fuller" -#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 deleted file mode 100644 index 4e9460c..0000000 --- a/examples/obashdb/PERMISSION +++ /dev/null @@ -1,27 +0,0 @@ -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 ) -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 -Cc: cmarie@ora.com, cam@iinet.com.au, brosenblatt@tm.com -In-Reply-To: Chet Ramey , 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 deleted file mode 100644 index 2f643d1..0000000 --- a/examples/obashdb/README +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100755 index 560cb7c..0000000 --- a/examples/obashdb/bashdb +++ /dev/null @@ -1,581 +0,0 @@ -#! /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 > -# -# 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 deleted file mode 100644 index 40584dd..0000000 --- a/examples/obashdb/bashdb.el +++ /dev/null @@ -1,177 +0,0 @@ -;;; bashdb.el --- Grand Unified Debugger mode for running bashdb -;; Copyright (C) 2000, 2001 Masatake YAMATO - -;; Author: Masatake YAMATO - -;; 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 deleted file mode 100644 index f415c48..0000000 --- a/examples/scripts.noah/PERMISSION +++ /dev/null @@ -1,29 +0,0 @@ -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 ) -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 ) -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: 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 deleted file mode 100644 index 95272d7..0000000 --- a/examples/scripts.noah/README +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 9b221b8..0000000 --- a/examples/scripts.noah/aref.bash +++ /dev/null @@ -1,44 +0,0 @@ -# aref.bash --- pseudo-array manipulating routines -# Author: Noah Friedman -# 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 deleted file mode 100644 index 2504459..0000000 --- a/examples/scripts.noah/bash.sub.bash +++ /dev/null @@ -1,28 +0,0 @@ -# bash.sub.bash --- stub for standalone shell scripts using bash library -# Author: Noah Friedman -# 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 deleted file mode 100644 index 4ea737b..0000000 --- a/examples/scripts.noah/bash_version.bash +++ /dev/null @@ -1,42 +0,0 @@ -# bash_version.bash --- get major and minor components of bash version number -# Author: Noah Friedman -# 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 deleted file mode 100644 index 6121726..0000000 --- a/examples/scripts.noah/meta.bash +++ /dev/null @@ -1,37 +0,0 @@ -# meta.bash --- meta key frobnications -# Author: Noah Friedman -# 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 deleted file mode 100644 index 3ea43ad..0000000 --- a/examples/scripts.noah/mktmp.bash +++ /dev/null @@ -1,66 +0,0 @@ -# mktmp.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index 37b62b6..0000000 --- a/examples/scripts.noah/number.bash +++ /dev/null @@ -1,185 +0,0 @@ -# number.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index 3dc25a9..0000000 --- a/examples/scripts.noah/prompt.bash +++ /dev/null @@ -1,40 +0,0 @@ -# prompt.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index aa7c463..0000000 --- a/examples/scripts.noah/remap_keys.bash +++ /dev/null @@ -1,71 +0,0 @@ -# remap_keybindings.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index f38040a..0000000 --- a/examples/scripts.noah/require.bash +++ /dev/null @@ -1,182 +0,0 @@ -# require.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index 24a1220..0000000 --- a/examples/scripts.noah/send_mail.bash +++ /dev/null @@ -1,140 +0,0 @@ -# send_mail.bash -# Author: Noah Friedman -# 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" - # From: "" - if (match(data, /^\"[^\"]*\"[ \t]*<.*>/)) { - data_idx = match(data, /^\"[^\"]*\"[ \t]*.*")) - data = substr(data, 1, RSTART - 1); - return data - } - # From: real name - if (match(data, /<.*>/)) { - 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 deleted file mode 100644 index 5d9e96d..0000000 --- a/examples/scripts.noah/shcat.bash +++ /dev/null @@ -1,49 +0,0 @@ -# shcat.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index 2b36489..0000000 --- a/examples/scripts.noah/source.bash +++ /dev/null @@ -1,63 +0,0 @@ -# source.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index d80ebe8..0000000 --- a/examples/scripts.noah/string.bash +++ /dev/null @@ -1,226 +0,0 @@ -# string.bash --- bash emulation of string(3) library routines -# Author: Noah Friedman -# 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 deleted file mode 100644 index 611d970..0000000 --- a/examples/scripts.noah/stty.bash +++ /dev/null @@ -1,64 +0,0 @@ -# stty.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index 2674a29..0000000 --- a/examples/scripts.noah/y_or_n_p.bash +++ /dev/null @@ -1,78 +0,0 @@ -# y_or_n_p.bash -# Author: Noah Friedman -# 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 deleted file mode 100644 index f65e848..0000000 --- a/examples/scripts.v2/PERMISSION +++ /dev/null @@ -1,59 +0,0 @@ -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 ) -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 ) -From: John DuBois -Date: Tue, 9 May 1995 22:33:12 -0700 -In-Reply-To: Chet Ramey - "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 -} 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 deleted file mode 100644 index 74f27c5..0000000 --- a/examples/scripts.v2/README +++ /dev/null @@ -1,37 +0,0 @@ -This collection of scripts was originally written for ksh-88 by -John DuBois . 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 deleted file mode 100644 index 285bede..0000000 --- a/examples/scripts.v2/arc2tarz +++ /dev/null @@ -1,85 +0,0 @@ -#! /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 deleted file mode 100644 index 54260c0..0000000 --- a/examples/scripts.v2/bashrand +++ /dev/null @@ -1,76 +0,0 @@ -#! /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 deleted file mode 100644 index f26128b..0000000 --- a/examples/scripts.v2/cal2day.bash +++ /dev/null @@ -1,49 +0,0 @@ -#!/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 - -#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 deleted file mode 100644 index df8aea7..0000000 --- a/examples/scripts.v2/cdhist.bash +++ /dev/null @@ -1,176 +0,0 @@ -#! /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 - 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$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 deleted file mode 100644 index 2b51e5d..0000000 --- a/examples/scripts.v2/corename +++ /dev/null @@ -1,43 +0,0 @@ -#! /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 deleted file mode 100644 index 1e94d21..0000000 --- a/examples/scripts.v2/fman +++ /dev/null @@ -1,281 +0,0 @@ -#! /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 " -# 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 deleted file mode 100755 index 572aa7b..0000000 --- a/examples/scripts.v2/frcp +++ /dev/null @@ -1,288 +0,0 @@ -#! /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 or $name [ ...] -At least one of and 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 deleted file mode 100644 index fd2ec5d..0000000 --- a/examples/scripts.v2/lowercase +++ /dev/null @@ -1,44 +0,0 @@ -#! /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 deleted file mode 100644 index c91ba64..0000000 --- a/examples/scripts.v2/ncp +++ /dev/null @@ -1,187 +0,0 @@ -#! /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 deleted file mode 100644 index 37645bd..0000000 --- a/examples/scripts.v2/newext +++ /dev/null @@ -1,64 +0,0 @@ -#! /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] [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 deleted file mode 100644 index c91ba64..0000000 --- a/examples/scripts.v2/nmv +++ /dev/null @@ -1,187 +0,0 @@ -#! /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 deleted file mode 100644 index 66ebc5f..0000000 --- a/examples/scripts.v2/pages +++ /dev/null @@ -1,187 +0,0 @@ -#! /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 deleted file mode 100644 index ab6cd2c..0000000 --- a/examples/scripts.v2/pf +++ /dev/null @@ -1,127 +0,0 @@ -#! /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 deleted file mode 100644 index cc419ac..0000000 --- a/examples/scripts.v2/pmtop +++ /dev/null @@ -1,25 +0,0 @@ -#! /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 deleted file mode 100644 index da76026..0000000 --- a/examples/scripts.v2/ren +++ /dev/null @@ -1,585 +0,0 @@ -#!/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 - -name=${0##*/} -Usage="Usage: -$name [-fhqtv] [-m] [-z] [-[pP]] - 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, -P: Act only on filenames that do (if -p is given) or do - not (if -P is given) match the sh-style filename globbing pattern - . This further restricts the filenames that are acted on, beyond - the filename selection produced by oldpattern and the filename list (if - any). 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: 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: Set the size of the number fields that result when -m is used. The - field is truncated to the trailing digits or filled out to - 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 deleted file mode 100644 index 96c46d6..0000000 --- a/examples/scripts.v2/rename +++ /dev/null @@ -1,122 +0,0 @@ -#! /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 deleted file mode 100644 index b6fccac..0000000 --- a/examples/scripts.v2/repeat +++ /dev/null @@ -1,121 +0,0 @@ -#! /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 : sleep for seconds after each iteration except the last. --v: Print start and end values before beginning." -} - -name=${0##*/} -Usage="Usage: repeat [-hpv] [-s ] [[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 deleted file mode 100644 index 73a1bb9..0000000 --- a/examples/scripts.v2/shprof +++ /dev/null @@ -1,66 +0,0 @@ -#! /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 deleted file mode 100644 index 1ba6b6b..0000000 --- a/examples/scripts.v2/untar +++ /dev/null @@ -1,80 +0,0 @@ -#! /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 deleted file mode 100644 index 7984058..0000000 --- a/examples/scripts.v2/uudec +++ /dev/null @@ -1,45 +0,0 @@ -: -# @(#) 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 deleted file mode 100644 index 480aa48..0000000 --- a/examples/scripts.v2/uuenc +++ /dev/null @@ -1,69 +0,0 @@ -#! /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] ..." -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 deleted file mode 100644 index 7523cc8..0000000 --- a/examples/scripts.v2/vtree +++ /dev/null @@ -1,137 +0,0 @@ -#! /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 deleted file mode 100644 index 7a1dbde..0000000 --- a/examples/scripts.v2/where +++ /dev/null @@ -1,111 +0,0 @@ -#! /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 deleted file mode 100755 index 1694450..0000000 --- a/examples/scripts/adventure.sh +++ /dev/null @@ -1,553 +0,0 @@ -#!/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/bcalc b/examples/scripts/bcalc new file mode 100644 index 0000000..bc7e2b4 --- /dev/null +++ b/examples/scripts/bcalc @@ -0,0 +1,104 @@ +#! /bin/bash +# +# bcalc - a coproc example that uses bc to evaluate floating point expressions +# +# 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 . +# +# If supplied command-line arguments, it uses them as the expression to have +# bc evaluate, and exits after reading the result. Otherwise, it enters an +# interactive mode, reading expressions and passing them to bc for evaluation, +# with line editing and history. +# +# You could even use this to write bc programs, but you'd have to rework the +# single-line REPL a little bit to do that (and get over the annoying timeout +# on the read) +# +# Chet Ramey +# chet.ramey@case.edu + +# we force stderr to avoid synchronization issues on calculation errors, even +# with the read timeout +init() +{ + coproc BC { bc -q 2>&1; } + # set scale + printf "scale = 10\n" >&${BC[1]} + # bash automatically sets BC_PID to the coproc pid; we store it so we + # can be sure to use it even after bash reaps the coproc and unsets + # the variables + coproc_pid=$BC_PID +} + +# not strictly necessary; the pipes will be closed when the program exits +# but we can use it in reset() below +fini() +{ + eval exec "${BC[1]}>&- ${BC[0]}<&-" +} + +reset() +{ + fini # close the old pipes + + sleep 1 + kill -1 $coproc_pid >/dev/null 2>&1 # make sure the coproc is dead + unset coproc_pid + + init +} + +# set a read timeout of a half second to avoid synchronization problems +calc() +{ + printf "%s\n" "$1" >&${BC[1]} + read -t 0.5 ANSWER <&${BC[0]} +} + +init + +# if we have command line options, process them as a single expression and +# print the result. we could just run `bc <<<"scale = 10 ; $*"' and be done +# with it, but we init the coproc before this and run the calculation through +# the pipes in case we want to do something else with the answer + +if [ $# -gt 0 ] ; then + calc "$*" + printf "%s\n" "$ANSWER" + fini + exit 0 +fi + +# we don't want to save the history anywhere +unset HISTFILE + +while read -e -p 'equation: ' EQN +do + case "$EQN" in + '') continue ;; + exit|quit) break ;; + reset) reset ; continue ;; + esac + + # save to the history list + history -s "$EQN" + + # run it through bc + calc "$EQN" + if [ -n "$ANSWER" ] ; then + printf "%s\n" "$ANSWER" + fi +done +fini + +exit 0 diff --git a/examples/scripts/bcsh.sh b/examples/scripts/bcsh.sh deleted file mode 100755 index b810cab..0000000 --- a/examples/scripts/bcsh.sh +++ /dev/null @@ -1,1254 +0,0 @@ -# 1-Feb-86 09:37:35-MST,30567;000000000001 -# Return-Path: -# 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 -# 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/center b/examples/scripts/center index 8d367d3..dbe6133 100644 --- a/examples/scripts/center +++ b/examples/scripts/center @@ -5,6 +5,23 @@ # tabs in the lines might cause this to look a little bit off # # +# Chet Ramey +# +# Copyright 1999 Chester Ramey +# +# 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. +# +# TThis 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. width=${COLUMNS:-80} diff --git a/examples/scripts/dd-ex.sh b/examples/scripts/dd-ex.sh deleted file mode 100644 index fafc83f..0000000 --- a/examples/scripts/dd-ex.sh +++ /dev/null @@ -1,476 +0,0 @@ -#!/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 <&1` - IFS="$saveIFS" - $dd if=$tmp bs=1 count=$1 2>/dev/null - ;; - *) $dd 2>/dev/null </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 n1n2, 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 </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 deleted file mode 100644 index 15f3ba8..0000000 --- a/examples/scripts/fixfiles.bash +++ /dev/null @@ -1,92 +0,0 @@ -#! /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 -# 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 deleted file mode 100644 index c308125..0000000 --- a/examples/scripts/hanoi.bash +++ /dev/null @@ -1,21 +0,0 @@ -# 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 old mode 100755 new mode 100644 diff --git a/examples/scripts/krand.bash b/examples/scripts/krand.bash deleted file mode 100755 index dfdfd32..0000000 --- a/examples/scripts/krand.bash +++ /dev/null @@ -1,74 +0,0 @@ -# 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 deleted file mode 100644 index 3f2efae..0000000 --- a/examples/scripts/line-input.bash +++ /dev/null @@ -1,184 +0,0 @@ -#! /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 deleted file mode 100644 index 3781293..0000000 --- a/examples/scripts/nohup.bash +++ /dev/null @@ -1,51 +0,0 @@ -# -# 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 deleted file mode 100755 index 9bbdb97..0000000 --- a/examples/scripts/precedence +++ /dev/null @@ -1,75 +0,0 @@ -# @(#)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 deleted file mode 100644 index 9cb6b50..0000000 --- a/examples/scripts/randomcard.bash +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100755 index 388bea8..0000000 --- a/examples/scripts/scrollbar +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# -# scrollbar - display scrolling text -# -# usage: scrollbar args -# -# A cute hack originally from Heiner Steven -# -# 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 deleted file mode 100755 index 0e53634..0000000 --- a/examples/scripts/scrollbar2 +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# scrollbar - display scrolling text -# -# usage: scrollbar args -# -# A cute hack originally from Heiner Steven -# -# 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 deleted file mode 100644 index 951d4e4..0000000 --- a/examples/scripts/self-repro +++ /dev/null @@ -1,9 +0,0 @@ -# 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 deleted file mode 100644 index 2e06c0b..0000000 --- a/examples/scripts/showperm.bash +++ /dev/null @@ -1,53 +0,0 @@ -#Newsgroups: comp.unix.shell -#From: gwc@root.co.uk (Geoff Clare) -#Subject: Re: Determining permissions on a file -#Message-ID: -#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 -# -# 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 old mode 100755 new mode 100644 index ec8b997..098c45f --- a/examples/scripts/shprompt +++ b/examples/scripts/shprompt @@ -11,6 +11,22 @@ # # Chet Ramey # chet@ins.CWRU.Edu +# +# Copyright 2002 Chester Ramey +# +# 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. +# +# TThis 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. type=file @@ -44,7 +60,7 @@ do done if [ "$OPTIND" -gt 1 ] ; then - shift $[$OPTIND - 1] + shift $(( $OPTIND - 1 )) fi while : diff --git a/examples/scripts/spin.bash b/examples/scripts/spin.bash index dc6a66a..9fa9125 100644 --- a/examples/scripts/spin.bash +++ b/examples/scripts/spin.bash @@ -5,6 +5,22 @@ # Chet Ramey # chet@po.cwru.edu # +# Copyright 1997 Chester Ramey +# +# 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. +# +# TThis 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. + bs=$'\b' chars="|${bs} \\${bs} -${bs} /${bs}" diff --git a/examples/scripts/timeout b/examples/scripts/timeout deleted file mode 100644 index ac8d88f..0000000 --- a/examples/scripts/timeout +++ /dev/null @@ -1,53 +0,0 @@ -#Newsgroups: comp.unix.admin,comp.unix.solaris,comp.unix.shell -#From: gwc@root.co.uk (Geoff Clare) -#Subject: Re: timeout -t (Re: How to give rsh a shorter timeout?) -#Message-ID: -#Date: Fri, 13 Feb 1998 18:23:52 GMT - -# -# Conversion to bash v2 syntax done by Chet Ramey &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 deleted file mode 100755 index 2c6fb77..0000000 --- a/examples/scripts/timeout2 +++ /dev/null @@ -1,29 +0,0 @@ -#!/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 deleted file mode 100644 index 5c19d2e..0000000 --- a/examples/scripts/timeout3 +++ /dev/null @@ -1,91 +0,0 @@ -#!/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 - -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 < 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 deleted file mode 100755 index 878cbab..0000000 --- a/examples/scripts/vtree2 +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 -# -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 deleted file mode 100644 index 2059b9f..0000000 --- a/examples/scripts/vtree3 +++ /dev/null @@ -1,99 +0,0 @@ -#!/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 deleted file mode 100644 index 0678764..0000000 --- a/examples/scripts/vtree3a +++ /dev/null @@ -1,100 +0,0 @@ -#!/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 deleted file mode 100644 index e07746b..0000000 --- a/examples/scripts/websrv.sh +++ /dev/null @@ -1,230 +0,0 @@ -#!/bin/sh -#for instructions or updates go to: -#This script's home page -#email me questions or comments at: -#insom@math.ucr.edu -#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 -# - -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 "
"
-    cat "$DOCHOME/$url/.title"
-    echo "
" - 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 "$link
" - ;; - 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 "
"
-    test -f "$DOCHOME/$url" && 
-      tbl < "$DOCHOME/$url"  | nroff ||
-      no_url "$url" 
-    echo "
" - ;; - *.nroff) - header "text/html; charset=US-ASCII" - echo "
"
-    test -f "$DOCHOME/$url" && 
-      nroff < "$DOCHOME/$url" ||
-      no_url "$url" 
-    echo "
" - ;; - *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 "
"
-    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 "
" - 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 "
"
-         cat "$DOCHOME/$url"
-         echo "
" - ;; - 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 old mode 100755 new mode 100644 index 72ba099..839003f --- a/examples/scripts/xterm_title +++ b/examples/scripts/xterm_title @@ -4,6 +4,23 @@ # # Derived from http://www.clark.net/pub/dickey/xterm/xterm.faq.html#how2_title # + +# Copyright 1997 Chester Ramey +# +# 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. +# +# TThis 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. + P=${0##*/} [ -z "$DISPLAY" ] && { echo "${P}: not running X" >&2 diff --git a/examples/scripts/zprintf b/examples/scripts/zprintf old mode 100755 new mode 100644 index 5e2e3ad..86f9e95 --- a/examples/scripts/zprintf +++ b/examples/scripts/zprintf @@ -11,6 +11,23 @@ # Chet Ramey # chet@po.cwru.edu +# Copyright 1996 Chester Ramey +# +# 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. +# +# TThis 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. + + [ $# -lt 1 ] && { echo "zprintf: usage: zprintf format [args ...]" >&2 exit 2 diff --git a/examples/shellmath/LICENSE b/examples/shellmath/LICENSE new file mode 100644 index 0000000..e3bf3bb --- /dev/null +++ b/examples/shellmath/LICENSE @@ -0,0 +1,677 @@ +Shellfloat is copyright (c) 2020 by Michael Wood. +================================================================================ + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/examples/shellmath/README.md b/examples/shellmath/README.md new file mode 100644 index 0000000..1b47256 --- /dev/null +++ b/examples/shellmath/README.md @@ -0,0 +1,166 @@ +# Shellmath +Introducing decimal arithmetic libraries for the Bash shell, because +they said it couldn't be done... and because: + +. + +![image info](./image.png) + +## Quick-start guide +Download this project and source the file `shellmath.sh` into your shell script, +then fire away at the shellmath API! + +The ___basic___ API looks like this: +``` + _shellmath_add arg1 arg2 [...] argN + _shellmath_subtract arg1 arg2 # means arg1 - arg2 + _shellmath_multiply arg1 arg2 [...] argN + _shellmath_divide arg1 arg2 # means arg1 / arg2 +``` + +The ___extended___ API introduces one more function: +``` + _shellmath_getReturnValue arg +``` + +This function optimizes away the need for ___$(___ subshelling ___)___ in order to capture `shellmath`'s output. +To use this feature, just be sure to set `__shellmath_isOptimized=1` at the top +of your script. (You can find an example in `faster_e_demo.sh`.) + +Operands to the _shellmath_ functions can be integers or decimal +numbers presented in either standard or scientific notation: +``` + _shellmath_add 1.009 4.223e-2 + _shellmath_getReturnValue sum + echo "The sum is $sum" +``` +Addition and multiplication are of arbitrary arity; try this on for size: +``` + _shellmath_multiply 1 2 3 4 5 6 + _shellmath_getReturnValue sixFactorial + echo "6 factorial is $sixFactorial" +``` +Subtraction and division, OTOH, are exclusively binary operations. + +## The demos +For a gentle introduction to `shellmath` run the demo `slower_e_demo.sh` +with a small whole-number argument, say 15: +``` +$ slower_e_demo.sh 15 +e = 2.7182818284589936 +``` + +This script uses a few `shellmath` API calls to calculate *e*, the mathematical +constant also known as [Euler's number](https://oeis.org/A001113). The argument +*15* tells the script to evaluate the *15th-degree* Maclaurin polynomial for *e*. +(That's the Taylor polynomial centered at 0.) Take a look inside the script to +see how it uses the `shellmath` APIs. + +There is another demo script very much like this one but *different*, and the +sensitive user can *feel* the difference. Try the following, but don't blink +or you'll miss it ;) +``` +$ faster_e_demo.sh 15 +e = 2.7182818284589936 +``` + +Did you feel the difference? Try the `-t` option with both scripts; this will produce +timing statistics. Here are my results +when running from my minGW64 command prompt on Windows 10 with an Intel i3 Core CPU: +``` +$ for n in {1..5}; do faster_e_demo.sh -t 15 2>&1; done | awk '/^real/ {print $2}' +0m0.055s +0m0.051s +0m0.056s +0m0.054s +0m0.054s + +$ for n in {1..5}; do slower_e_demo.sh -t 15 2>&1; done | awk '/^real/ {print $2}' +0m0.498s +0m0.594s +0m0.536s +0m0.511s +0m0.580s +``` + +(When sizing up these timings, do keep in mind that ___we are timing the +calculation of e from its Maclaurin polynomial. Every invocation of either +script is exercising the shellmath arithmetic subroutines 31 times.___) + +The comment header in `faster_e_demo.sh` explains the optimization and shows +how to put this faster version to work for you. + +## Runtime efficiency competitive with awk and bc +The file `timingData.txt` captures the results of some timing experiments that compare +`shellmath` against the GNU versions of the calculators `awk` and `bc`. The experiments +exercised each of the arithmetic operations and captured the results in a shell variable. +The result summary below shows that `shellmath` is competitive with `awk` and runs faster +than `bc` in these experiments. (One commenter noted that the differences in execution speed +can be partially explained by the fact that `shellmath` and `awk` use finite precision +whereas `bc` uses arbitrary precision. Another factor in these measurements is the need to +subshell 'awk' and 'bc' to capture their results, whereas 'shellmath' writes directly to +the shell's global memory.) + +Here are the run times of `shellmath` as a percentage of the `awk` and `bc` equivalents: +``` + versus awk versus bc + Addition: 82.2% 40.6% + Subtraction: 95.9% 50.5% + Multiplication: 135.9% 73.3% + Division: 80.3% 43.2% +``` + +Astute observers will note the experiments provide approximations to the sum, difference, +product, and quotient of *pi* and *e*. Unfortunately I did not gain insight as to which +of these values, if any, are +[transcendental](https://en.wikipedia.org/wiki/Transcendental_number#Possible_transcendental_numbers). + +You can find a deeper discussion of shellmath's runtime efficiency +[here](https://github.com/clarity20/shellmath/wiki/Shellmath-and-runtime-efficiency). + +## Background +The Bash shell does not have built-in operators for decimal arithmetic, making it +something of an oddity among well-known, widely-used programming languages. For the most part, +practitioners in need of powerful computational building blocks have naturally opted +for *other* languages and tools. Their widespread availability has diverted attention +from the possibility of *implementing* decimal arithmetic in Bash and it's easy to assume +that this ***cannot*** be done: + ++ From the indispensable _Bash FAQ_ (on _Greg's Wiki_): [How can I calculate with floating point numbers?](http://mywiki.wooledge.org/BashFAQ/022) + *"For most operations... an external program must be used."* ++ From Mendel Cooper's wonderful and encyclopedic _Advanced Bash Scripting Guide_: + [Bash does not understand floating point arithmetic. Use bc instead.](https://tldp.org/LDP/abs/html/ops.html#NOFLOATINGPOINT) ++ From a community discussion on Stack Overflow, _How do I use floating point division in bash?_ + The user's [preferred answer](https://stackoverflow.com/questions/12722095/how-do-i-use-floating-point-division-in-bash#12722107) + is a good example of _prevailing thought_ on this subject. + +Meanwhile, + ++ Bash maintainer (BDFL?) Chet Ramey sounds a (brighter?) note in [The Bash Reference Guide, Section 6.5](https://tiswww.case.edu/php/chet/bash/bashref.html#Shell-Arithmetic) + by emphasizing what the built-in arithmetic operators ***can*** do. + +But finally, a glimmer of hope: + ++ A [diamond-in-the-rough](http://stackoverflow.com/a/24431665/3776858) buried elsewhere + on Stack Overflow. + This down-and-dirty milestone computes the decimal quotient of two integer arguments. At a casual + glance, it seems to have drawn inspiration from the [Euclidean algorithm](https://mathworld.wolfram.com/EuclideanAlgorithm.html) + for computing GCDs, an entirely different approach than `shellmath`'s. + +Please try `shellmath` on for size and draw your own conclusions! + +## How it works +`shellmath` splits decimal numbers into their integer and fractional parts, +performs the appropriate integer operations on the parts, and recombines the results. +(In the spirit of Bash, numerical overflow is silently ignored.) + +Because if we can get carrying, borrowing, place value, and the distributive +law right, then the sky's the limit! As they say--erm, as they ___said___ in Rome, + + Ad astra per aspera. + +## And now... +You can run your floating-point calculations directly in Bash! + +## Please see also: +[A short discussion on arbitrary precision and shellmath](https://github.com/clarity20/shellmath/wiki/Shellmath-and-arbitrary-precision-arithmetic) diff --git a/examples/shellmath/assert.sh b/examples/shellmath/assert.sh new file mode 100644 index 0000000..bc4122e --- /dev/null +++ b/examples/shellmath/assert.sh @@ -0,0 +1,85 @@ +#!/bin/env bash +############################################################################### +# Internal test engine functions +############################################################################### + +RED='\033[0;31m' +GREEN='\033[0;32m' +NO_COLOR='\033[0m' + +function _shellmath_assert_returnCode() +{ + _shellmath_assert_functionReturn -c "$@" + return $? +} + +function _shellmath_assert_returnString() +{ + _shellmath_assert_functionReturn "$@" + return $? +} + +function _shellmath_assert_functionReturn() +{ + if [[ $# -lt 2 ]]; then + echo "USAGE: ${FUNCNAME[0]} [-c] returnStringOrCode functionName [ functionArgs ... ]" + echo " By default, asserts against the string output by the function." + echo " Use -c to assert against the numeric return code instead." + return "${__shellmath_returnCodes[FAIL]}" + fi + + if [[ "${1,,}" == '-c' ]]; then + mode=RETURN_CODE + shift + else + mode=RETURN_STRING + fi + + expectedReturn="$1" + func="$2" + shift 2 + + args=("$@") + + # Exercise the function in optimized mode; it will run faster by avoiding + # subshelling. This also suppresses dumping of function output to stdout. + __shellmath_isOptimized=${__shellmath_true} + "$func" "${args[@]}" + returnCode=$? + __shellmath_isOptimized=${__shellmath_false} + + # Fetch the return value(s) + local numReturnValues + declare -a actualReturn + _shellmath_getReturnValueCount numReturnValues + if ((numReturnValues == 1)); then + _shellmath_getReturnValue actualReturn[0] + else + # Multiple returns? Join them into one string + local _i evalString="_shellmath_getReturnValues" + for ((_i=0; _i/dev/null; then + echo "${RED}FAIL${NO_COLOR} Line $lineNumber: Command "$command": Syntax error. Required: String|Code value operation args..." + return 3 + fi + + # Run the command, being respectful of shell metacharacters + fullCommand="${words[*]}" + eval "$fullCommand" + local returnString + _shellmath_getReturnValue returnString + echo -e "$returnString" Line "$lineNumber": "$command" + + fi + +} + + +function _main() +{ + source shellmath.sh + source assert.sh + + # Initialize certain globals. As "public" functions, the arithmetic + # functions need to do this themselves, but there are some "private" + # functions that need this here when they are auto-tested. + _shellmath_precalc; __shellmath_didPrecalc=$__shellmath_true + + # Process the test file line-by-line using the above runTests() function + mapfile -t -c 1 -C _shellmath_runTests -O 1 < "${1:-testCases.in}" + + exit 0 +} + +_main "$@" + diff --git a/examples/shellmath/shellmath.sh b/examples/shellmath/shellmath.sh new file mode 100644 index 0000000..5804ad2 --- /dev/null +++ b/examples/shellmath/shellmath.sh @@ -0,0 +1,1068 @@ +#!/bin/env bash +################################################################################ +# shellmath.sh +# Shell functions for floating-point arithmetic using only builtins +# +# Copyright (c) 2020 by Michael Wood. All rights reserved. +# +# Usage: +# +# source _thisPath_/_thisFileName_ +# +# # Conventional method: call the APIs by subshelling +# mySum=$( _shellmath_add 202.895 6.00311 ) +# echo $mySum +# +# # Optimized method: use hidden globals to simulate more flexible pass-and-return +# _shellmath_isOptimized=1 +# _shellmath_add 44.2 -87 +# _shellmath_getReturnValue mySum +# echo $mySum +# +################################################################################ + + +################################################################################ +# Program constants +################################################################################ +declare -A -r __shellmath_numericTypes=( + [INTEGER]=0 + [DECIMAL]=1 +) + +declare -A -r __shellmath_returnCodes=( + [SUCCESS]="0:Success" + [FAIL]="1:General failure" + [ILLEGAL_NUMBER]="2:Invalid argument; decimal number required: '%s'" + [DIVIDE_BY_ZERO]="3:Divide by zero error" +) + +declare -r -i __shellmath_true=1 +declare -r -i __shellmath_false=0 + +declare __shellmath_SUCCESS __shellmath_FAIL __shellmath_ILLEGAL_NUMBER + +################################################################################ +# Program state +################################################################################ +declare __shellmath_isOptimized=${__shellmath_false} +declare __shellmath_didPrecalc=${__shellmath_false} + + +################################################################################ +# Error-handling utilities +################################################################################ +function _shellmath_getReturnCode() +{ + local errorName=$1 + return "${__shellmath_returnCodes[$errorName]%%:*}" +} + +function _shellmath_warn() +{ + # Generate an error message and return control to the caller + _shellmath_handleError -r "$@" + return $? +} + +function _shellmath_exit() +{ + # Generate an error message and EXIT THE SCRIPT / interpreter + _shellmath_handleError "$@" +} + +function _shellmath_handleError() +{ + # Hidden option "-r" causes return instead of exit + local returnDontExit=$__shellmath_false + if [[ "$1" == "-r" ]]; then + returnDontExit=${__shellmath_true} + shift + fi + + # Format of $1: returnCode:msgTemplate + [[ "$1" =~ ^([0-9]+):(.*) ]] + returnCode=${BASH_REMATCH[1]} + msgTemplate=${BASH_REMATCH[2]} + shift + + # Display error msg, making parameter substitutions as needed + msgParameters="$*" + printf "$msgTemplate" "${msgParameters[@]}" + + if ((returnDontExit)); then + return "$returnCode" + else + exit "$returnCode" + fi +} + + +################################################################################ +# precalc() +# +# Pre-calculates certain global data and by setting the global variable +# "__shellmath_didPrecalc" records that this routine has been called. As an +# optimization, the caller should check that global to prevent needless +# invocations. +################################################################################ +function _shellmath_precalc() +{ + # Set a few global constants + _shellmath_getReturnCode SUCCESS; __shellmath_SUCCESS=$? + _shellmath_getReturnCode FAIL; __shellmath_FAIL=$? + _shellmath_getReturnCode ILLEGAL_NUMBER; __shellmath_ILLEGAL_NUMBER=$? + + # Determine the decimal precision to which we can accurately calculate. + # To do this we probe for the threshold at which integers overflow and + # take the integer floor of that number's base-10 logarithm. + # We check the 64-bit, 32-bit and 16-bit thresholds only. + if ((2**63 < 2**63-1)); then + __shellmath_precision=18 + __shellmath_maxValue=$((2**63-1)) + elif ((2**31 < 2**31-1)); then + __shellmath_precision=9 + __shellmath_maxValue=$((2**31-1)) + else ## ((2**15 < 2**15-1)) + __shellmath_precision=4 + __shellmath_maxValue=$((2**15-1)) + fi + + __shellmath_didPrecalc=$__shellmath_true +} + + +################################################################################ +# Simulate pass-and-return by reference using a secret global storage array +################################################################################ + +declare -a __shellmath_storage + +function _shellmath_setReturnValues() +{ + local -i _i + + for ((_i=1; _i<=$#; _i++)); do + __shellmath_storage[_i]="${!_i}" + done + + __shellmath_storage[0]=$# +} + +function _shellmath_getReturnValues() +{ + local -i _i + local evalString + + for ((_i=1; _i<=$#; _i++)); do + evalString+=${!_i}="${__shellmath_storage[_i]}"" " + done + + eval "$evalString" +} + +function _shellmath_setReturnValue() { __shellmath_storage=(1 "$1"); } +function _shellmath_getReturnValue() { eval "$1"=\"${__shellmath_storage[1]}\"; } +function _shellmath_getReturnValueCount() { eval "$1"=\"${__shellmath_storage[0]}\"; } + +################################################################################ +# validateAndParse(numericString) +# Return Code: SUCCESS or ILLEGAL_NUMBER +# Return Signature: integerPart fractionalPart isNegative numericType isScientific +# +# Validate and parse arguments to the main arithmetic routines +################################################################################ + +function _shellmath_validateAndParse() +{ + local n="$1" + local isNegative=${__shellmath_false} + local isScientific=${__shellmath_false} + local numericType returnCode + + ((returnCode = __shellmath_SUCCESS)) + + # Accept decimals: leading digits (optional), decimal point, trailing digits + if [[ "$n" =~ ^[-]?([0-9]*)\.([0-9]+)$ ]]; then + local integerPart=${BASH_REMATCH[1]:-0} + local fractionalPart=${BASH_REMATCH[2]} + + # Strip superfluous trailing zeros + if [[ "$fractionalPart" =~ ^(.*[^0])0*$ ]]; then + fractionalPart=${BASH_REMATCH[1]} + fi + + numericType=${__shellmath_numericTypes[DECIMAL]} + + # Factor out the negative sign if it is present + if [[ "$n" =~ ^- ]]; then + isNegative=${__shellmath_true} + n=${n:1} + fi + + _shellmath_setReturnValues "$integerPart" "$fractionalPart" \ + $isNegative "$numericType" $isScientific + return "$returnCode" + + # Accept integers + elif [[ "$n" =~ ^[-]?[0-9]+$ ]]; then + numericType=${__shellmath_numericTypes[INTEGER]} + + # Factor out the negative sign if it is present + if [[ "$n" =~ ^- ]]; then + isNegative=${__shellmath_true} + n=${n:1} + fi + + _shellmath_setReturnValues "$n" 0 $isNegative "$numericType" $isScientific + return "$returnCode" + + # Accept scientific notation: 1e5, 2.44E+10, etc. + elif [[ "$n" =~ (.*)[Ee](.*) ]]; then + local significand=${BASH_REMATCH[1]} + local exponent=${BASH_REMATCH[2]} + + # Validate the significand: optional sign, integer part, + # optional decimal point and fractional part + if [[ "$significand" =~ ^[-]?([0-9]+)(\.([0-9]+))?$ ]]; then + + isScientific=${__shellmath_true} + + # Separate the integer and fractional parts + local sigInteger=${BASH_REMATCH[1]} + local sigIntLength=${#sigInteger} + local sigFraction=${BASH_REMATCH[3]} + + # Strip superfluous trailing zeros + if [[ "$sigFraction" =~ ^(.*[^0])0*$ ]]; then + sigFraction=${BASH_REMATCH[1]} + fi + + local sigFracLength=${#sigFraction} + + if [[ "$n" =~ ^- ]]; then + isNegative=${__shellmath_true} + n=${n:1} + fi + + # Rewrite the scientifically-notated number in ordinary decimal notation. + # IOW, realign the integer and fractional parts. Separate with a space + # so they can be returned as two separate values + if ((exponent > 0)); then + local zeroCount integer fraction + ((zeroCount = exponent - sigFracLength)) + if ((zeroCount > 0)); then + printf -v zeros "%0*d" "$zeroCount" 0 + n=${sigInteger}${sigFraction}${zeros}" 0" + numericType=${__shellmath_numericTypes[INTEGER]} + elif ((zeroCount < 0)); then + n=${sigInteger}${sigFraction:0:exponent}" "${sigFraction:exponent} + numericType=${__shellmath_numericTypes[DECIMAL]} + else + n=${sigInteger}${sigFraction}" 0" + numericType=${__shellmath_numericTypes[INTEGER]} + fi + integer=${n% *}; fraction=${n#* } + _shellmath_setReturnValues "$integer" "$fraction" $isNegative "$numericType" $isScientific + return "$returnCode" + + elif ((exponent < 0)); then + local zeroCount integer fraction + ((zeroCount = -exponent - sigIntLength)) + if ((zeroCount > 0)); then + printf -v zeros "%0*d" "$zeroCount" 0 + n="0 "${zeros}${sigInteger}${sigFraction} + numericType=${__shellmath_numericTypes[DECIMAL]} + elif ((zeroCount < 0)); then + n=${sigInteger:0:-zeroCount}" "${sigInteger:(-zeroCount)}${sigFraction} + numericType=${__shellmath_numericTypes[DECIMAL]} + else + n="0 "${sigInteger}${sigFraction} + numericType=${__shellmath_numericTypes[DECIMAL]} + fi + integer=${n% *}; fraction=${n#* } + _shellmath_setReturnValues "$integer" "$fraction" $isNegative "$numericType" $isScientific + return "$returnCode" + + else + # exponent == 0 means the number is already aligned as desired + numericType=${__shellmath_numericTypes[DECIMAL]} + _shellmath_setReturnValues "$sigInteger" "$sigFraction" $isNegative "$numericType" $isScientific + return "$returnCode" + fi + + # Reject strings like xxx[Ee]yyy where xxx, yyy are not valid numbers + else + ((returnCode = __shellmath_ILLEGAL_NUMBER)) + _shellmath_setReturnValues "" + return "$returnCode" + fi + + # Reject everything else + else + ((returnCode = __shellmath_ILLEGAL_NUMBER)) + _shellmath_setReturnValues "" + return "$returnCode" + fi +} + + +################################################################################ +# numToScientific (integerPart, fractionalPart) +# +# Format conversion utility function +################################################################################ +function _shellmath_numToScientific() +{ + local integerPart=$1 fractionalPart=$2 + local exponent head tail scientific + + if ((integerPart > 0)); then + ((exponent = ${#integerPart}-1)) + head=${integerPart:0:1} + tail=${integerPart:1}${fractionalPart} + elif ((integerPart < 0)); then + ((exponent = ${#integerPart}-2)) # skip "-" and first digit + head=${integerPart:0:2} + tail=${integerPart:2}${fractionalPart} + else + [[ "$fractionalPart" =~ ^[-]?(0*)([^0])(.*)$ ]] + exponent=$((-(${#BASH_REMATCH[1]} + 1))) + head=${BASH_REMATCH[2]} + tail=${BASH_REMATCH[3]} + fi + + # Remove trailing zeros + [[ $tail =~ ^.*[^0] ]]; tail=${BASH_REMATCH[0]:-0} + + printf -v scientific "%d.%de%d" "$head" "$tail" "$exponent" + + _shellmath_setReturnValue "$scientific" +} + + +################################################################################ +# _shellmath_add (addend_1, addend_2) +################################################################################ +function _shellmath_add() +{ + local n1="$1" + local n2="$2" + + if ((! __shellmath_didPrecalc)); then + _shellmath_precalc; __shellmath_didPrecalc=$__shellmath_true + fi + + local isVerbose=$(( __shellmath_isOptimized == __shellmath_false )) + + # Is the caller itself an arithmetic function? + local isSubcall=${__shellmath_false} + local isMultiplication=${__shellmath_false} + if [[ "${FUNCNAME[1]}" =~ shellmath_(add|subtract|multiply|divide)$ ]]; then + isSubcall=${__shellmath_true} + if [[ "${BASH_REMATCH[1]}" == multiply ]]; then + isMultiplication=${__shellmath_true} + fi + fi + + # Handle corner cases where argument count is not 2 + local argCount=$# + if ((argCount == 0)); then + echo "Usage: ${FUNCNAME[0]} addend_1 addend_2" + return "$__shellmath_SUCCESS" + elif ((argCount == 1)); then + # Note the result as-is, print if running "normally", and return + _shellmath_setReturnValue "$n1" + (( isVerbose && ! isSubcall )) && echo "$n1" + return "$__shellmath_SUCCESS" + elif ((argCount > 2 && !isSubcall)); then + local recursiveReturn + + # Use a binary recursion tree to add everything up + # 1) left branch + _shellmath_add "${@:1:$((argCount/2))}"; recursiveReturn=$? + _shellmath_getReturnValue n1 + if (( recursiveReturn != __shellmath_SUCCESS )); then + _shellmath_setReturnValue "$n1" + return "$recursiveReturn" + fi + # 2) right branch + _shellmath_add "${@:$((argCount/2+1))}"; recursiveReturn=$? + _shellmath_getReturnValue n2 + if (( recursiveReturn != __shellmath_SUCCESS )); then + _shellmath_setReturnValue "$n2" + return "$recursiveReturn" + fi + # 3) head node + local sum + _shellmath_add "$n1" "$n2"; recursiveReturn=$? + _shellmath_getReturnValue sum + _shellmath_setReturnValue "$sum" + if (( isVerbose && ! isSubcall )); then + echo "$sum" + fi + return "$recursiveReturn" + fi + + local integerPart1 fractionalPart1 integerPart2 fractionalPart2 + local isNegative1 type1 isScientific1 isNegative2 type2 isScientific2 + local flags + + if ((isMultiplication)); then + integerPart1="$1" + fractionalPart1="$2" + integerPart2="$3" + fractionalPart2="$4" + + type1=${__shellmath_numericTypes[DECIMAL]} + type2=${__shellmath_numericTypes[DECIMAL]} + isNegative1=$__shellmath_false + isNegative2=$__shellmath_false + isScientific1=$__shellmath_false + isScientific2=$__shellmath_false + else + # Check and parse the arguments + _shellmath_validateAndParse "$n1"; flags=$? + _shellmath_getReturnValues integerPart1 fractionalPart1 isNegative1 type1 isScientific1 + if ((flags == __shellmath_ILLEGAL_NUMBER)); then + _shellmath_warn "${__shellmath_returnCodes[ILLEGAL_NUMBER]}" "$n1" + return $? + fi + _shellmath_validateAndParse "$n2"; flags=$? + _shellmath_getReturnValues integerPart2 fractionalPart2 isNegative2 type2 isScientific2 + if ((flags == __shellmath_ILLEGAL_NUMBER)); then + _shellmath_warn "${__shellmath_returnCodes[ILLEGAL_NUMBER]}" "$n2" + return $? + fi + fi + + # Quick add & return for integer adds + if ((type1==type2 && type1==__shellmath_numericTypes[INTEGER])); then + ((isNegative1)) && ((integerPart1*=-1)) + ((isNegative2)) && ((integerPart2*=-1)) + local sum=$((integerPart1 + integerPart2)) + if (( (!isSubcall) && (isScientific1 || isScientific2) )); then + _shellmath_numToScientific $sum "" + _shellmath_getReturnValue sum + fi + _shellmath_setReturnValue $sum + if (( isVerbose && ! isSubcall )); then + echo "$sum" + fi + return "$__shellmath_SUCCESS" + fi + + # Right-pad both fractional parts with zeros to the same length + local fractionalLen1=${#fractionalPart1} + local fractionalLen2=${#fractionalPart2} + if ((fractionalLen1 > fractionalLen2)); then + # Use printf to zero-pad. This avoids mathematical side effects. + printf -v fractionalPart2 %-*s "$fractionalLen1" "$fractionalPart2" + fractionalPart2=${fractionalPart2// /0} + elif ((fractionalLen2 > fractionalLen1)); then + printf -v fractionalPart1 %-*s "$fractionalLen2" "$fractionalPart1" + fractionalPart1=${fractionalPart1// /0} + fi + local unsignedFracLength=${#fractionalPart1} + + # Implement a sign convention that will enable us to detect carries by + # comparing string lengths of addends and sums: propagate the sign across + # both numeric parts (whether unsigned or zero). + if ((isNegative1)); then + fractionalPart1="-"$fractionalPart1 + integerPart1="-"$integerPart1 + fi + if ((isNegative2)); then + fractionalPart2="-"$fractionalPart2 + integerPart2="-"$integerPart2 + fi + + local integerSum=0 + local fractionalSum=0 + + ((integerSum = integerPart1+integerPart2)) + + # Summing the fractional parts is tricky: We need to override the shell's + # default interpretation of leading zeros, but the operator for doing this + # (the "10#" operator) cannot work directly with negative numbers. So we + # break it all down. + if ((isNegative1)); then + ((fractionalSum += (-1) * 10#${fractionalPart1:1})) + else + ((fractionalSum += 10#$fractionalPart1)) + fi + if ((isNegative2)); then + ((fractionalSum += (-1) * 10#${fractionalPart2:1})) + else + ((fractionalSum += 10#$fractionalPart2)) + fi + + unsignedFracSumLength=${#fractionalSum} + if [[ "$fractionalSum" =~ ^[-] ]]; then + ((unsignedFracSumLength--)) + fi + + # Restore any leading zeroes that were lost when adding + if ((unsignedFracSumLength < unsignedFracLength)); then + local lengthDiff=$((unsignedFracLength - unsignedFracSumLength)) + local zeroPrefix + printf -v zeroPrefix "%0*d" "$lengthDiff" 0 + if ((fractionalSum < 0)); then + fractionalSum="-"${zeroPrefix}${fractionalSum:1} + else + fractionalSum=${zeroPrefix}${fractionalSum} + fi + fi + + # Carry a digit from fraction to integer if required + if ((10#$fractionalSum!=0 && unsignedFracSumLength > unsignedFracLength)); then + local carryAmount + ((carryAmount = isNegative1?-1:1)) + ((integerSum += carryAmount)) + # Remove the leading 1-digit whether the fraction is + or - + fractionalSum=${fractionalSum/1/} + fi + + # Transform the partial sums from additive to concatenative. Example: the + # pair (-2,3) is not -2.3 but rather (-2)+(0.3), i.e. -1.7 so we want to + # transform (-2,3) to (-1,7). This transformation is meaningful when + # the two parts have opposite signs, so that's what we look for. + if ((integerSum < 0 && 10#$fractionalSum > 0)); then + ((integerSum += 1)) + ((fractionalSum = 10#$fractionalSum - 10**unsignedFracSumLength)) + elif ((integerSum > 0 && 10#$fractionalSum < 0)); then + ((integerSum -= 1)) + ((fractionalSum = 10**unsignedFracSumLength + 10#$fractionalSum)) + fi + # This last case needs to function either as an "else" for the above, + # or as a coda to the "if" clause when integerSum is -1 initially. + if ((integerSum == 0 && 10#$fractionalSum < 0)); then + integerSum="-"$integerSum + ((fractionalSum *= -1)) + fi + + # Touch up the numbers for display + local sum + ((10#$fractionalSum < 0)) && fractionalSum=${fractionalSum:1} + if (( (!isSubcall) && (isScientific1 || isScientific2) )); then + _shellmath_numToScientific "$integerSum" "$fractionalSum" + _shellmath_getReturnValue sum + elif ((10#$fractionalSum)); then + printf -v sum "%s.%s" "$integerSum" "$fractionalSum" + else + sum=$integerSum + fi + + # Note the result, print if running "normally", and return + _shellmath_setReturnValue $sum + if (( isVerbose && ! isSubcall )); then + echo "$sum" + fi + + return "$__shellmath_SUCCESS" +} + + +################################################################################ +# subtract (subtrahend, minuend) +################################################################################ +function _shellmath_subtract() +{ + local n1="$1" + local n2="$2" + local isVerbose=$(( __shellmath_isOptimized == __shellmath_false )) + + if ((! __shellmath_didPrecalc)); then + _shellmath_precalc; __shellmath_didPrecalc=$__shellmath_true + fi + + if (( $# == 0 || $# > 2 )); then + echo "Usage: ${FUNCNAME[0]} subtrahend minuend" + return "$__shellmath_SUCCESS" + elif (( $# == 1 )); then + # Note the value as-is and return + _shellmath_setReturnValue "$n1" + ((isVerbose)) && echo "$n1" + return "$__shellmath_SUCCESS" + fi + + # Symbolically negate the second argument + if [[ "$n2" =~ ^- ]]; then + n2=${n2:1} + else + n2="-"$n2 + fi + + # Calculate, note the result, print if running "normally", and return + local difference + _shellmath_add "$n1" "$n2" + _shellmath_getReturnValue difference + if ((isVerbose)); then + echo "$difference" + fi + + return $? +} + + +################################################################################ +# reduceOuterPairs (two integer parts [, two fractional parts]) +# +# Examines the magnitudes of two numbers in advance of a multiplication +# and either chops off their lowest-order digits or pushes them to the +# corresponding lower-order parts in order to prevent overflow in the product. +# The choice depends on whether 2 or 4 arguments are supplied. +################################################################################ +function _shellmath_reduceOuterPairs() +{ + local value1="$1" value2="$2" subvalue1="$3" subvalue2="$4" + + local digitExcess value1Len=${#value1} value2Len=${#value2} + ((digitExcess = value1Len + value2Len - __shellmath_precision)) + + # Be very precise about detecting overflow. The "digit excess" underestimates + # this: floor(log_10(longLongMax)). We don't want to needlessly lose precision + # when a product barely squeezes under the exact threshold. + if ((digitExcess>1 || (digitExcess==1 && value1 > __shellmath_maxValue/value2) )); then + + # Identify the digit-tails to be pruned off and either discarded or + # pushed past the decimal point. In pruning the two values we want to + # retain as much "significance" as possible, so we try to equalize the + # lengths of the remaining digit sequences. + local tail1 tail2 + local lengthDiff leftOver + + # Which digit string is longer, and by how much? + ((lengthDiff = value1Len - value2Len)) + if ((lengthDiff > 0)); then + if ((digitExcess <= lengthDiff)); then + # Chop digits from the longer string only + tail1=${value1:(-digitExcess)} + tail2="" # do not chop anything + else + # Chop more digits from the longer string so the two strings + # end up as nearly-equal in length as possible + ((leftOver = digitExcess - lengthDiff)) + tail1=${value1:(-(lengthDiff + leftOver/2))} + tail2=${value2:(-((leftOver+1)/2))} + fi + else + ((lengthDiff *= -1)) + # Mirror the above code block but swap 1 and 2 + if ((digitExcess <= lengthDiff)); then + tail1="" + tail2=${value2:(-digitExcess)} + else + ((leftOver = digitExcess - lengthDiff)) + tail1=${value1:(-((leftOver+1)/2))} + tail2=${value2:(-(lengthDiff + leftOver/2))} + fi + fi + + # Discard the least-significant digits or move them past the decimal point + value1=${value1%${tail1}} + [[ -n "$subvalue1" ]] && subvalue1=${tail1}${subvalue1%0} # remove placeholder zero + value2=${value2%${tail2}} + [[ -n "$subvalue2" ]] && subvalue2=${tail2}${subvalue2%0} + else + # Signal the caller that no rescaling was actually done + ((digitExcess = 0)) + fi + + _shellmath_setReturnValues "$value1" "$value2" \ + "$subvalue1" "$subvalue2" "$digitExcess" +} + +################################################################################ +# rescaleValue(value, rescaleFactor) +# +# Upscales a decimal value by "factor" orders of magnitude: 3.14159 --> 3141.59 +################################################################################ +function _shellmath_rescaleValue() +{ + local value="$1" rescalingFactor="$2" + local head tail zeroCount zeroTail + + [[ "$value" =~ ^(.*)\.(.*)$ ]] + head=${BASH_REMATCH[1]} + tail=${BASH_REMATCH[2]} + ((zeroCount = rescalingFactor - ${#tail})) + if ((zeroCount > 0)); then + printf -v zeroTail "%0*d" "$zeroCount" 0 + value=${head}${tail}${zeroTail} + elif ((zeroCount < 0)); then + value=${head}${tail:0:rescalingFactor}"."${tail:rescalingFactor} + else + value=${head}${tail} + fi + + _shellmath_setReturnValue "$value" +} + +################################################################################ +# reduceCrossPairs (two integer parts, two fractional parts) +# +# Examines the precision of the inner products (of "multiplication by parts") +# and if necessary truncates the fractional part(s) to prevent overflow +################################################################################ +function _shellmath_reduceCrossPairs() +{ + local value1="$1" value2="$2" subvalue1="$3" subvalue2="$4" + + local digitExcess value1Len=${#value1} value2Len=${#value2} + local subvalue1Len=${#subvalue1} subvalue2Len=${#subvalue2} + + # Check BOTH cross-products + ((digitExcess = value1Len + subvalue2Len - __shellmath_precision)) + if ((digitExcess > 1 || (digitExcess==1 && value1 > __shellmath_maxValue/subvalue2) )); then + subvalue2=${subvalue2:0:(-digitExcess)} + fi + ((digitExcess = value2Len + subvalue1Len - __shellmath_precision)) + if ((digitExcess > 1 || (digitExcess==1 && value2 > __shellmath_maxValue/subvalue1) )); then + subvalue1=${subvalue1:0:(-digitExcess)} + fi + + _shellmath_setReturnValues "$subvalue1" "$subvalue2" +} + + +function _shellmath_round() +{ + local number="$1" digitCount="$2" + local nextDigit=${number:digitCount:1} + + number=${number:0:digitCount} + if ((nextDigit >= 5)); then + printf -v number "%0*d" "$digitCount" $((10#$number + 1)) + fi + + _shellmath_setReturnValue "$number" +} + +################################################################################ +# multiply (multiplicand, multiplier) +################################################################################ +function _shellmath_multiply() +{ + local n1="$1" + local n2="$2" + + if ((! __shellmath_didPrecalc)); then + _shellmath_precalc; __shellmath_didPrecalc=$__shellmath_true + fi + + local isVerbose=$(( __shellmath_isOptimized == __shellmath_false )) + + # Is the caller itself an arithmetic function? + local isSubcall=${__shellmath_false} + if [[ "${FUNCNAME[1]}" =~ shellmath_(add|subtract|multiply|divide)$ ]]; then + isSubcall=${__shellmath_true} + fi + + # Handle corner cases where argument count is not 2 + local argCount=$# + if ((argCount == 0)); then + echo "Usage: ${FUNCNAME[0]} factor_1 factor_2" + return "$__shellmath_SUCCESS" + elif ((argCount == 1)); then + # Note the value as-is and return + _shellmath_setReturnValue "$n1" + (( isVerbose && ! isSubcall )) && echo "$n1" + return "$__shellmath_SUCCESS" + elif ((argCount > 2)); then + local recursiveReturn + + # Use a binary recursion tree to multiply everything out + # 1) left branch + _shellmath_multiply "${@:1:$((argCount/2))}"; recursiveReturn=$? + _shellmath_getReturnValue n1 + if (( recursiveReturn != __shellmath_SUCCESS )); then + _shellmath_setReturnValue "$n1" + return "$recursiveReturn" + fi + # 2) right branch + _shellmath_multiply "${@:$((argCount/2+1))}"; recursiveReturn=$? + _shellmath_getReturnValue n2 + if (( recursiveReturn != __shellmath_SUCCESS )); then + _shellmath_setReturnValue "$n2" + return "$recursiveReturn" + fi + # 3) head node + local product + _shellmath_multiply "$n1" "$n2"; recursiveReturn=$? + _shellmath_getReturnValue product + _shellmath_setReturnValue "$product" + if (( isVerbose && ! isSubcall )); then + echo "$product" + fi + return "$recursiveReturn" + fi + + local integerPart1 fractionalPart1 integerPart2 fractionalPart2 + local isNegative1 type1 isScientific1 isNegative2 type2 isScientific2 + local flags + + # Check and parse the arguments + _shellmath_validateAndParse "$n1"; flags=$? + _shellmath_getReturnValues integerPart1 fractionalPart1 isNegative1 type1 isScientific1 + if ((flags == __shellmath_ILLEGAL_NUMBER)); then + _shellmath_warn "${__shellmath_returnCodes[ILLEGAL_NUMBER]}" "$n1" + return $? + fi + _shellmath_validateAndParse "$n2"; flags=$? + _shellmath_getReturnValues integerPart2 fractionalPart2 isNegative2 type2 isScientific2 + if ((flags == __shellmath_ILLEGAL_NUMBER)); then + _shellmath_warn "${__shellmath_returnCodes[ILLEGAL_NUMBER]}" "$n2" + return $? + fi + + # Overflow / underflow detection and accommodation + local rescalingFactor=0 + if ((${#integerPart1} + ${#integerPart2} + ${#fractionalPart1} + ${#fractionalPart2} >= ${__shellmath_precision})); then + _shellmath_reduceOuterPairs "$integerPart1" "$integerPart2" "$fractionalPart1" "$fractionalPart2" + _shellmath_getReturnValues integerPart1 integerPart2 fractionalPart1 fractionalPart2 rescalingFactor + if ((10#$fractionalPart1)); then type1=${__shellmath_numericTypes[DECIMAL]}; fi + if ((10#$fractionalPart2)); then type2=${__shellmath_numericTypes[DECIMAL]}; fi + + _shellmath_reduceCrossPairs "$integerPart1" "$integerPart2" "$fractionalPart1" "$fractionalPart2" + _shellmath_getReturnValues fractionalPart1 fractionalPart2 + + _shellmath_reduceOuterPairs "$fractionalPart1" "$fractionalPart2" + _shellmath_getReturnValues fractionalPart1 fractionalPart2 + fi + + # Quick multiply & return for integer multiplies + if ((type1==type2 && type1==__shellmath_numericTypes[INTEGER])); then + ((isNegative1)) && ((integerPart1*=-1)) + ((isNegative2)) && ((integerPart2*=-1)) + local product=$((integerPart1 * integerPart2)) + if ((rescalingFactor > 0)); then + _shellmath_rescaleValue "$product" "$rescalingFactor" + _shellmath_getReturnValue product + fi + if (( (!isSubcall) && (isScientific1 || isScientific2) )); then + _shellmath_numToScientific $product "" + _shellmath_getReturnValue product + fi + _shellmath_setReturnValue $product + if (( isVerbose && ! isSubcall )); then + echo "$product" + fi + return "$__shellmath_SUCCESS" + fi + + # The product has four components per the distributive law + local intProduct floatProduct innerProduct1 innerProduct2 + # Widths of the decimal parts + local floatWidth fractionalWidth1 fractionalWidth2 + + # Compute the integer and floating-point components + ((intProduct = integerPart1 * integerPart2)) + + fractionalWidth1=${#fractionalPart1} + fractionalWidth2=${#fractionalPart2} + ((floatWidth = fractionalWidth1 + fractionalWidth2)) + ((floatProduct = 10#$fractionalPart1 * 10#$fractionalPart2)) + if ((${#floatProduct} < floatWidth)); then + printf -v floatProduct "%0*d" "$floatWidth" "$floatProduct" + fi + + # Compute the inner products: First integer-multiply, then rescale + ((innerProduct1 = integerPart1 * 10#$fractionalPart2)) + ((innerProduct2 = integerPart2 * 10#$fractionalPart1)) + + # Rescale the inner products back to decimals so we can shellmath_add() them + if ((fractionalWidth2 <= ${#innerProduct1})); then + local innerInt1=${innerProduct1:0:(-$fractionalWidth2)} + local innerFloat1=${innerProduct1:(-$fractionalWidth2)} + integerPart1=${innerInt1} + fractionalPart1=${innerFloat1} + else + integerPart1=0 + printf -v fractionalPart1 "%0*d" "$fractionalWidth2" "$innerProduct1" + fi + if ((fractionalWidth1 <= ${#innerProduct2})); then + local innerInt2=${innerProduct2:0:(-$fractionalWidth1)} + local innerFloat2=${innerProduct2:(-$fractionalWidth1)} + integerPart2=${innerInt2} + fractionalPart2=${innerFloat2} + else + integerPart2=0 + printf -v fractionalPart2 "%0*d" "$fractionalWidth1" "$innerProduct2" + fi + + # Combine the distributed parts + local innerSum product + # Add the inner products to get the inner sum + _shellmath_add "$integerPart1" "$fractionalPart1" "$integerPart2" "$fractionalPart2" + _shellmath_getReturnValue innerSum + [[ "$innerSum" =~ (.*)\.(.*) ]] + integerPart1=${BASH_REMATCH[1]} + fractionalPart1=${BASH_REMATCH[2]} + # Add inner sum + outer sum + _shellmath_add "$integerPart1" "$fractionalPart1" "$intProduct" "$floatProduct" + _shellmath_getReturnValue product + + # Determine the sign of the product + if ((isNegative1 != isNegative2)); then + product="-"$product + fi + + # When we pre-detect overflow in the integer part of the computation, + # we compensate by shrinking the inputs by some order of magnitude. + # Having now finished the computation, we revert to the original magnitude. + if ((rescalingFactor > 0)); then + _shellmath_rescaleValue "$product" "$rescalingFactor" + _shellmath_getReturnValue product + fi + + # Convert to scientific notation if appropriate + if (( (!isSubcall) && (isScientific1 || isScientific2) )); then + _shellmath_numToScientific "${product%.*}" "${product#*.}" + _shellmath_getReturnValue product + fi + + # Note the result, print if running "normally", and return + _shellmath_setReturnValue $product + if (( isVerbose && ! isSubcall )); then + echo "$product" + fi + + return "$__shellmath_SUCCESS" +} + + +################################################################################ +# divide (dividend, divisor) +################################################################################ +function _shellmath_divide() +{ + local n1="$1" + local n2="$2" + local integerPart1 fractionalPart1 integerPart2 fractionalPart2 + local isNegative1 type1 isScientific1 isNegative2 type2 isScientific2 + + if ((! __shellmath_didPrecalc)); then + _shellmath_precalc; __shellmath_didPrecalc=$__shellmath_true + fi + + local isVerbose=$(( __shellmath_isOptimized == __shellmath_false )) + + local isTesting=${__shellmath_false} + if [[ "${FUNCNAME[1]}" == "_shellmath_assert_functionReturn" ]]; then + isTesting=${__shellmath_true} + fi + + if [[ $# -eq 0 || $# -gt 2 ]]; then + echo "Usage: ${FUNCNAME[0]} dividend divisor" + return "$__shellmath_SUCCESS" + elif [[ $# -eq 1 ]]; then + # Note the value as-is and return + _shellmath_setReturnValue "$n1" + ((isVerbose)) && echo "$n1" + return "$__shellmath_SUCCESS" + fi + + # Check and parse the arguments + local flags + _shellmath_validateAndParse "$n1"; flags=$? + _shellmath_getReturnValues integerPart1 fractionalPart1 isNegative1 type1 isScientific1 + if ((flags == __shellmath_ILLEGAL_NUMBER)); then + _shellmath_warn "${__shellmath_returnCodes[ILLEGAL_NUMBER]}" "$n1" + return $? + fi + _shellmath_validateAndParse "$n2"; flags=$? + _shellmath_getReturnValues integerPart2 fractionalPart2 isNegative2 type2 isScientific2 + if ((flags == __shellmath_ILLEGAL_NUMBER)); then + _shellmath_warn "${__shellmath_returnCodes[ILLEGAL_NUMBER]}" "$n2" + return $? + fi + + # Throw error on divide by zero + if ((integerPart2 == 0 && 10#$fractionalPart2 == 0)); then + _shellmath_warn "${__shellmath_returnCodes[DIVIDE_BY_ZERO]}" "$n2" + return $? + fi + + # Convert the division problem to an *integer* division problem by rescaling + # both inputs so as to lose their decimal points. To obtain maximal precision, + # we scale up the numerator further, padding with as many zeros as it can hold + local numerator denominator quotient + local rescaleFactor zeroCount zeroTail + + if ((integerPart1 == 0)); then + integerPart1="" + fi + ((zeroCount = __shellmath_precision - ${#integerPart1} - ${#fractionalPart1})) + ((rescaleFactor = __shellmath_precision - ${#integerPart1} - ${#fractionalPart2})) + if ((zeroCount > 0)); then + printf -v zeroTail "%0*d" "$zeroCount" 0 + fi + + # Rescale and rewrite the fraction to be computed, and compute it + numerator=${integerPart1}${fractionalPart1}${zeroTail} + denominator=${integerPart2}${fractionalPart2} + ((quotient = 10#$numerator / 10#$denominator)) + + # For greater precision, re-divide by the remainder to get the next digits of the quotient + local remainder quotient_2 + ((remainder = 10#$numerator % 10#$denominator)) # cannot exceed numerator or thus, maxValue + ((zeroCount = __shellmath_precision - ${#remainder})) + if ((zeroCount > 0)); then + printf -v zeroTail "%0*d" "$zeroCount" 0 + else + zeroTail="" + fi + # Derive the new numerator from the remainder. Do not change the denominator. + numerator=${remainder}${zeroTail} + ((quotient_2 = 10#$numerator / 10#$denominator)) + quotient=${quotient}${quotient_2} + ((rescaleFactor += ${#quotient_2})) + + # Rescale back. For aesthetic reasons we also round off at the "precision"th decimal place + ((zeroCount = rescaleFactor - ${#quotient})) + if ((zeroCount >= 0)); then + local zeroPrefix="" fractionalPart + if ((zeroCount > 0)); then + printf -v zeroPrefix "%0*d" "$((rescaleFactor - ${#quotient}))" 0 + fi + fractionalPart=${zeroPrefix}${quotient} + _shellmath_round "$fractionalPart" $__shellmath_precision + _shellmath_getReturnValue fractionalPart + quotient="0."${fractionalPart} + else + fractionalPart=${quotient:(-$rescaleFactor)} + _shellmath_round "$fractionalPart" $__shellmath_precision + _shellmath_getReturnValue fractionalPart + quotient=${quotient:0:(-$rescaleFactor)}"."${fractionalPart} + fi + + # Determine the sign of the quotient + if ((isNegative1 != isNegative2)); then + quotient="-"$quotient + fi + + if ((isTesting)); then + # Trim zeros. (Requires decimal point and zero tail.) + if [[ "$quotient" =~ [\.].*0$ ]]; then + # If the decimal point IMMEDIATELY precedes the 0s, remove that too + [[ $quotient =~ [\.]?0+$ ]] + quotient=${quotient%${BASH_REMATCH[0]}} + fi + fi + + # Convert to scientific notation if appropriate + if ((isScientific1 || isScientific2)); then + _shellmath_numToScientific "${quotient%.*}" "${quotient#*.}" + _shellmath_getReturnValue quotient + fi + + # Note the result, print if running "normally", and return + _shellmath_setReturnValue "$quotient" + if ((isVerbose)); then + echo "$quotient" + fi + + return "$__shellmath_SUCCESS" +} + diff --git a/examples/shellmath/slower_e_demo.sh b/examples/shellmath/slower_e_demo.sh new file mode 100644 index 0000000..d8fc931 --- /dev/null +++ b/examples/shellmath/slower_e_demo.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +############################################################################### +# This script illustrates the use of the shellmath APIs to perform +# decimal calculations. Here we approximate the mathematical constant 'e' +# using its Maclaurin polynomials (i.e. its Taylor polynomials centered at 0). +############################################################################### + +source shellmath.sh + +# Setting the '-t' flag will cause the script to time the algorithm +if [[ "$1" == '-t' ]]; then + do_timing=${__shellmath_true} + shift +fi + +if [[ $# -ne 1 ]]; then + echo "USAGE: ${BASH_SOURCE##*/} [-t] *N*" + echo " Approximates 'e' using the N-th order Maclaurin polynomial" + echo " (i.e. the Taylor polynomial centered at 0)." + echo " Specify the '-t' flag to time the main algorithm." + exit 0 +elif [[ ! "$1" =~ ^[0-9]+$ ]]; then + echo "Illegal argument. Whole numbers only, please." + exit 1 +fi + + +function run_algorithm() +{ + # Initialize + n=0; N=$1; zero_factorial=1 + + # Initialize e to the zeroth-order term + term=$(_shellmath_divide 1 $zero_factorial) + e=$term + + # Compute successive terms T(n) := T(n-1)/n and accumulate into e + for ((n=1; n<=N; n++)); do + term=$(_shellmath_divide "$term" "$n") + e=$(_shellmath_add "$e" "$term") + done + + echo "e = $e" +} + + +if (( do_timing == __shellmath_true )); then + time run_algorithm "$1" +else + run_algorithm "$1" +fi + +exit 0 + diff --git a/examples/shellmath/testCases.in b/examples/shellmath/testCases.in new file mode 100644 index 0000000..54e3a82 --- /dev/null +++ b/examples/shellmath/testCases.in @@ -0,0 +1,142 @@ +################################################################ +# The general testcase syntax is +# assertionType expectedValue functionUnderTest [args ... ] +# +# where assertionType is either of: +# Code to indicate the (bash-style) integer return code +# String to indicate the string "printed" as a side effect +# +# and functionUnderTest is the function name +# with the "_shellmath_" prefix removed. +################################################################ + +################################ +# Tests for SUPPORTING FUNCTIONS +################################ + +# Tests for getReturnCode() +Code 0 getReturnCode SUCCESS +Code 1 getReturnCode FAIL +Code 2 getReturnCode ILLEGAL_NUMBER + +## Tests for validateAndParse(): +## Validate a number, determine its type and sign, split it into parts + +# Detect Invalid input +Code 2 validateAndParse NaN +String "" validateAndParse NaN +# Positive integers +String "4 0 0 0 0" validateAndParse 4 +# Negative integers +String "9 0 1 0 0" validateAndParse -9 +# Decimals +String "4 2 0 1 0" validateAndParse 4.2 +# Negative decimals +String "4 2 1 1 0" validateAndParse -4.2 +# Scientific / exponential notation: Check all code branches +String "340000 0 0 0 1" validateAndParse 3.4e5 +String "344 4 0 1 1" validateAndParse 3.444e2 +String "34567 0 0 0 1" validateAndParse 3.4567e4 +String "0 003456 0 1 1" validateAndParse 3.456e-3 +String "34 56 0 1 1" validateAndParse 345.6e-1 +String "0 23011 0 1 1" validateAndParse 23.011e-2 +String "23 011 0 1 1" validateAndParse 23.011e0 + +#################### +# Tests for ADDITION +#################### +String 4 add 4 +String 9 add 4 5 + +# Same-length decimal tails with no leading zeros, no carry across decimal point +String 2.214 add 1.105 1.109 + +# Carry across decimal point +String 3.8 add 1.9 1.9 +String -3.8 add -1.9 -1.9 + +# Different-length decimals, one with leading zero +String 2.195 add 1.105 1.09 +String -2.195 add -1.105 -1.09 + +# Same-length tails having leading zeros +String 2.014 add 1.005 1.009 +String -2.014 add -1.005 -1.009 +# Different-length tails with and without leading zeros +String 3.31462 add 1.905 1.40962 +String 2.01462 add 1.005 1.00962 + +# Subtraction +String 2.5 subtract 5.2 2.7 +String -2.5 subtract 2.7 5.2 +String 2.5 add 5.2 -2.7 + +# Integer part equal to 0 +String 1.5 add 0.6 0.9 +String 1.5 add .6 .9 +String -0.3 add 0.6 -0.9 +String -0.3 add .6 -.9 + +# Recursive/multiple addition +String 12 add 2 4 6 +String 6.6 add 1.1 2.2 3.3 + +########################## +# Tests for MULTIPLICATION +########################## +String 4 multiply 4 +String 20 multiply 4 5 + +String 21.32 multiply 4.1 5.2 +String -21.32 multiply -4.1 5.2 + +# Carry-heavy products +String 98.901 multiply 9.9 9.99 + +# Leading zeros after decimal point: +# Track place value with zero-padding +String 1.0201 multiply 1.01 1.01 +String 0.0001 multiply 0.01 0.01 +String 0.0001 add 0 0.0001 + +# Staggered decimal precisions +String 0.000001 multiply 0.01 0.0001 + +# Interpret in base 10 +String 2.2781 multiply 1.09 2.09 + +# Recursive multiplication +String 35.1384 multiply 1.1 2.2 3.3 4.4 + +#################### +# Tests for DIVISION +#################### +String 4 divide 4 +String 4 divide 20 5 + +String 0.5 divide 1 2 +String -0.5 divide -1 2 + +# Mixed fractions +String 34.54 divide 3454 100 + +# Non-terminating decimals +String 0.166666666666666667 divide 1 6 + +# Decimal arguments +String 0.25 divide 0.5 2 +String 0.04165 divide 0.1666 4 + +########################### +# Tests for scientific math +########################### +String 8.8e4 add 1.1e4 7.7e4 +String 4.239e1 add 1.224e1 3.015e1 +String -6.6e4 add 1.1e4 -7.7e4 +String -66000 add 11000 -77000 +String 1.23123e2 add 1.23e2 1.23e-1 +String 8.1403e7 multiply 2.03e5 4.01e2 +String 1.0e-7 multiply 1.0e-3 1.0e-4 +String 1.0e-7 multiply 1e-3 1e-4 + + diff --git a/examples/shellmath/timingData.txt b/examples/shellmath/timingData.txt new file mode 100644 index 0000000..d1de887 --- /dev/null +++ b/examples/shellmath/timingData.txt @@ -0,0 +1,42 @@ +$ ######## Activate optimized mode as described in the README ######## +$ __shellmath_isOptimized=1 + +$ ######## Addition ######## +$ time { for ((i=0; i<100; i++)); do _shellmath_add 3.1415926 2.7182818; _shellmath_getReturnValue sum; done; } +real 0m0.196s +user 0m0.195s +sys 0m0.000s +$ time { for ((i=0; i<100; i++)); do sum=$(bc <<< "3.1415926+2.7182818"); done; } +real 0m0.488s +user 0m0.092s +sys 0m0.384s + +$ ######## Subtraction ######## +$ time { for ((i=0; i<100; i++)); do _shellmath_subtract 3.1415926 2.7182818; _shellmath_getReturnValue diff; done; } +real 0m0.236s +user 0m0.234s +sys 0m0.001s +$ time { for ((i=0; i<100; i++)); do diff=$(bc <<< "3.1415926-2.7182818"); done; } +real 0m0.461s +user 0m0.090s +sys 0m0.388s + +$ ######## Multiplication ######## +$ time { for ((i=0; i<100; i++)); do _shellmath_multiply 3.1415926 2.7182818; _shellmath_getReturnValue prod; done; } +real 0m0.340s +user 0m0.333s +sys 0m0.005s +$ time { for ((i=0; i<100; i++)); do prod=$(bc <<< "3.1415926*2.7182818"); done; } +real 0m0.465s +user 0m0.105s +sys 0m0.377s + +$ ######## Division ######## +$ time { for ((i=0; i<100; i++)); do _shellmath_divide 3.1415926/2.7182818; _shellmath_getReturnValue quot; done; } +real 0m0.196s +user 0m0.195s +sys 0m0.000s +$ time { for ((i=0; i<100; i++)); do quot=$(bc <<< "scale=8; 3.1415926/2.7182818"); done; } +real 0m0.463s +user 0m0.116s +sys 0m0.364s diff --git a/examples/startup-files/Bash_aliases b/examples/startup-files/Bash_aliases index bb9c01e..2abb93e 100644 --- a/examples/startup-files/Bash_aliases +++ b/examples/startup-files/Bash_aliases @@ -17,7 +17,7 @@ alias pu="pushd" alias po="popd" # -# Csh compatability: +# Csh compatibility: # alias unsetenv=unset function setenv () { diff --git a/examples/startup-files/README b/examples/startup-files/README index 92667a6..00df041 100644 --- a/examples/startup-files/README +++ b/examples/startup-files/README @@ -10,12 +10,3 @@ 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 deleted file mode 100644 index 67ad14a..0000000 --- a/examples/startup-files/apple/README +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index 23d3399..0000000 --- a/examples/startup-files/apple/aliases +++ /dev/null @@ -1,34 +0,0 @@ -## -# 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 deleted file mode 100644 index a80145b..0000000 --- a/examples/startup-files/apple/bash.defaults +++ /dev/null @@ -1,22 +0,0 @@ -## -# 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 deleted file mode 100644 index fee218b..0000000 --- a/examples/startup-files/apple/environment +++ /dev/null @@ -1,24 +0,0 @@ -## -# 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 deleted file mode 100644 index b91f787..0000000 --- a/examples/startup-files/apple/login +++ /dev/null @@ -1,15 +0,0 @@ -## -# 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 deleted file mode 100644 index 812731c..0000000 --- a/examples/startup-files/apple/logout +++ /dev/null @@ -1,10 +0,0 @@ -## -# 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 deleted file mode 100644 index 2451b9f..0000000 --- a/examples/startup-files/apple/rc +++ /dev/null @@ -1,63 +0,0 @@ -## -# 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/bashrc b/examples/startup-files/bashrc index 069e8be..2d8d37b 100644 --- a/examples/startup-files/bashrc +++ b/examples/startup-files/bashrc @@ -1,6 +1,7 @@ -if [ -z "$PS1" ]; then - return -fi +case $- in +*i*) ;; +*) return ;; +esac # bogus if [ -f /unix ] ; then diff --git a/execute_cmd.c b/execute_cmd.c index df4094b..1390980 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -1,6 +1,6 @@ /* execute_cmd.c -- Execute a COMMAND structure. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -33,7 +33,7 @@ #include "filecntl.h" #include "posixstat.h" #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif @@ -58,6 +58,7 @@ extern int errno; #endif #define NEED_FPURGE_DECL +#define NEED_SH_SETLINEBUF_DECL #include "bashansi.h" #include "bashintl.h" @@ -65,6 +66,7 @@ extern int errno; #include "memalloc.h" #include "shell.h" #include /* use <...> so we pick it up from the build directory */ +#include "parser.h" #include "flags.h" #include "builtins.h" #include "hashlib.h" @@ -83,6 +85,8 @@ extern int errno; #include "builtins/common.h" #include "builtins/builtext.h" /* list of builtins */ +#include "builtins/getopt.h" + #include #include @@ -98,101 +102,98 @@ extern int errno; # 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 defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif + +extern int command_string_index; +extern char *the_printed_command; +extern time_t shell_start_time; +#if defined (HAVE_GETTIMEOFDAY) +extern struct timeval shellstart; +#endif #if 0 extern char *glob_argv_flags; #endif -extern int close __P((int)); +extern int close PARAMS((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 *)); +static void close_pipes PARAMS((int, int)); +static void do_piping PARAMS((int, int)); +static void bind_lastarg PARAMS((char *)); +static int shell_control_structure PARAMS((enum command_type)); +static void cleanup_redirects PARAMS((REDIRECT *)); #if defined (JOB_CONTROL) -static int restore_signal_mask __P((sigset_t *)); +static int restore_signal_mask PARAMS((sigset_t *)); #endif -static void async_redirect_stdin __P((void)); +static int builtin_status PARAMS((int)); -static int builtin_status __P((int)); - -static int execute_for_command __P((FOR_COM *)); +static int execute_for_command PARAMS((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 *)); +static int displen PARAMS((const char *)); +static int print_index_and_element PARAMS((int, int, WORD_LIST *)); +static void indent PARAMS((int, int)); +static void print_select_list PARAMS((WORD_LIST *, int, int, int)); +static char *select_query PARAMS((WORD_LIST *, int, char *, int)); +static int execute_select_command PARAMS((SELECT_COM *)); #endif #if defined (DPAREN_ARITHMETIC) -static int execute_arith_command __P((ARITH_COM *)); +static int execute_arith_command PARAMS((ARITH_COM *)); #endif #if defined (COND_COMMAND) -static int execute_cond_node __P((COND_COM *)); -static int execute_cond_command __P((COND_COM *)); +static int execute_cond_node PARAMS((COND_COM *)); +static int execute_cond_command PARAMS((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 *, +static int mkfmt PARAMS((char *, int, int, time_t, int)); +static void print_formatted_time PARAMS((FILE *, char *, time_t, int, time_t, int, time_t, int, int)); -static int time_command __P((COMMAND *, int, int, int, struct fd_bitmap *)); +static int time_command PARAMS((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 *, +static intmax_t eval_arith_for_expr PARAMS((WORD_LIST *, int *)); +static int execute_arith_for_command PARAMS((ARITH_FOR_COM *)); +#endif +static int execute_case_command PARAMS((CASE_COM *)); +static int execute_while_command PARAMS((WHILE_COM *)); +static int execute_until_command PARAMS((WHILE_COM *)); +static int execute_while_or_until PARAMS((WHILE_COM *, int)); +static int execute_if_command PARAMS((IF_COM *)); +static int execute_null_command PARAMS((REDIRECT *, int, int, int)); +static void fix_assignment_words PARAMS((WORD_LIST *)); +static void fix_arrayref_words PARAMS((WORD_LIST *)); +static int execute_simple_command PARAMS((SIMPLE_COM *, int, int, int, struct fd_bitmap *)); +static int execute_builtin PARAMS((sh_builtin_func_t *, WORD_LIST *, int, int)); +static int execute_function PARAMS((SHELL_VAR *, WORD_LIST *, int, struct fd_bitmap *, int, int)); +static int execute_builtin_or_function PARAMS((WORD_LIST *, sh_builtin_func_t *, SHELL_VAR *, REDIRECT *, struct fd_bitmap *, int)); -static void execute_subshell_builtin_or_function __P((WORD_LIST *, REDIRECT *, +static void execute_subshell_builtin_or_function PARAMS((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 *, +static int execute_disk_command PARAMS((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 *)); +static char *getinterp PARAMS((char *, int, int *)); +static void initialize_subshell PARAMS((void)); +static int execute_in_subshell PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); #if defined (COPROCESS_SUPPORT) -static int execute_coproc __P((COMMAND *, int, int, struct fd_bitmap *)); +static void coproc_setstatus PARAMS((struct coproc *, int)); +static int execute_coproc PARAMS((COMMAND *, int, int, struct fd_bitmap *)); #endif -static int execute_pipeline __P((COMMAND *, int, int, int, struct fd_bitmap *)); +static int execute_pipeline PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); -static int execute_connection __P((COMMAND *, int, int, int, struct fd_bitmap *)); +static int execute_connection PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); -static int execute_intern_function __P((WORD_DESC *, COMMAND *)); +static int execute_intern_function PARAMS((WORD_DESC *, FUNCTION_DEF *)); /* 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. */ @@ -213,12 +214,16 @@ int return_catch_value; procenv_t return_catch; /* The value returned by the last synchronous command. */ -int last_command_exit_value; +volatile 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; +/* Are we currently ignoring the -e option for the duration of a builtin's + execution? */ +int builtin_ignoring_errexit = 0; + /* The list of redirections to perform which will undo the redirections that I made in the shell. */ REDIRECT *redirection_undo_list = (REDIRECT *)NULL; @@ -253,6 +258,8 @@ SHELL_VAR *this_shell_function; /* If non-zero, matches in case and [[ ... ]] are case-insensitive */ int match_ignore_case = 0; +int executing_command_builtin = 0; + struct stat SB; /* used for debugging */ static int special_builtin_failed; @@ -267,11 +274,42 @@ static int function_line_number; report the correct line number. Kind of a hack. */ static int showing_function_line; -static int line_number_for_err_trap; +static int connection_count; + +/* $LINENO ($BASH_LINENO) for use by an ERR trap. Global so parse_and_execute + can save and restore it. */ +int line_number_for_err_trap; + +/* A convenience macro to avoid resetting line_number_for_err_trap while + running the ERR trap. */ +#define SET_LINE_NUMBER(v) \ +do { \ + line_number = v; \ + if (signal_in_progress (ERROR_TRAP) == 0 && running_trap != (ERROR_TRAP + 1)) \ + line_number_for_err_trap = line_number; \ +} while (0) + +/* This can't be in executing_line_number() because that's used for LINENO + and we want LINENO to reflect the line number of commands run during + the ERR trap. Right now this is only used to push to BASH_LINENO. */ +#define GET_LINE_NUMBER() \ + (signal_in_progress (ERROR_TRAP) && running_trap == ERROR_TRAP+1) \ + ? line_number_for_err_trap \ + : executing_line_number () /* A sort of function nesting level counter */ -static int funcnest = 0; -int funcnest_max = 0; /* XXX - for bash-4.2 */ +int funcnest = 0; +int funcnest_max = 0; + +int evalnest = 0; +int evalnest_max = EVALNEST_MAX; + +int sourcenest = 0; +int sourcenest_max = SOURCENEST_MAX; + +volatile int from_return_trap = 0; + +int lastpipe_opt = 0; struct fd_bitmap *current_fds_to_close = (struct fd_bitmap *)NULL; @@ -338,15 +376,15 @@ executing_line_number () return currently_executing_command->value.Cond->line; #endif #if defined (DPAREN_ARITHMETIC) - else if (currently_executing_command->type == cm_arith) + 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) + if (currently_executing_command->type == cm_arith_for) return currently_executing_command->value.ArithFor->line; #endif - return line_number; + return line_number; } else return line_number; @@ -380,7 +418,7 @@ execute_command (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) + if (variable_context == 0 && executing_list == 0) unlink_fifo_list (); #endif /* PROCESS_SUBSTITUTION */ @@ -431,6 +469,16 @@ cleanup_redirects (list) dispose_redirects (list); } +void +undo_partial_redirects () +{ + if (redirection_undo_list) + { + cleanup_redirects (redirection_undo_list); + redirection_undo_list = (REDIRECT *)NULL; + } +} + #if 0 /* Function to unwind_protect the redirections for functions and builtins. */ static void @@ -451,6 +499,16 @@ dispose_exec_redirects () } } +void +dispose_partial_redirects () +{ + if (redirection_undo_list) + { + dispose_redirects (redirection_undo_list); + 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. */ @@ -465,7 +523,7 @@ restore_signal_mask (set) #ifdef DEBUG /* A debugging function that can be called from gdb, for instance. */ void -open_files () +open_files (void) { register int i; int f, fd_table_size; @@ -482,7 +540,7 @@ open_files () } #endif -static void +void async_redirect_stdin () { int fd; @@ -499,9 +557,9 @@ async_redirect_stdin () #define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0) -/* Execute the command passed in COMMAND, perhaps doing it asynchrounously. +/* Execute the command passed in COMMAND, perhaps doing it asynchronously. COMMAND is exactly what read_command () places into GLOBAL_COMMAND. - ASYNCHROUNOUS, if non-zero, says to do this command in the background. + ASYNCHRONOUS, 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. @@ -519,20 +577,21 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, int pipe_in, pipe_out; struct fd_bitmap *fds_to_close; { - int exec_result, user_subshell, invert, ignore_return, was_error_trap; + int exec_result, user_subshell, invert, ignore_return, was_error_trap, fork_flags; REDIRECT *my_undo_list, *exec_undo_list; - volatile int last_pid; + char *tcmd; volatile int save_line_number; +#if defined (PROCESS_SUBSTITUTION) + volatile int ofifo, nfifo, osize, saved_fifo; + volatile void *ofifo_list; +#endif -#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) + if (read_but_dont_execute) + return (last_command_exit_value); + if (command == 0) return (EXECUTION_SUCCESS); -#endif QUIT; run_pending_traps (); @@ -560,32 +619,76 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, #if defined (COPROCESS_SUPPORT) if (command->type == cm_coproc) - return (execute_coproc (command, pipe_in, pipe_out, fds_to_close)); + return (last_command_exit_value = execute_coproc (command, pipe_in, pipe_out, fds_to_close)); #endif user_subshell = command->type == cm_subshell || ((command->flags & CMD_WANT_SUBSHELL) != 0); +#if defined (TIME_BEFORE_SUBSHELL) + if ((command->flags & CMD_TIME_PIPELINE) && user_subshell && asynchronous == 0) + { + command->flags |= CMD_FORCE_SUBSHELL; + exec_result = time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close); + currently_executing_command = (COMMAND *)NULL; + return (exec_result); + } +#endif + 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; + int s; + char *p; /* 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); + save_line_number = line_number; + if (command->type == cm_subshell) + SET_LINE_NUMBER (command->value.Subshell->line); /* XXX - save value? */ + /* Otherwise we defer setting line_number */ + tcmd = make_command_string (command); + fork_flags = asynchronous ? FORK_ASYNC : 0; + paren_pid = make_child (p = savestring (tcmd), fork_flags); + + if (user_subshell && signal_is_trapped (ERROR_TRAP) && + signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + if (paren_pid == 0) - exit (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)); - /* NOTREACHED */ + { +#if defined (JOB_CONTROL) + FREE (p); /* child doesn't use pointer */ +#endif + /* We want to run the exit trap for forced {} subshells, and we + want to note this before execute_in_subshell modifies the + COMMAND struct. Need to keep in mind that execute_in_subshell + runs the exit trap for () subshells itself. */ + /* This handles { command; } & */ + s = user_subshell == 0 && command->type == cm_group && pipe_in == NO_PIPE && pipe_out == NO_PIPE && asynchronous; + /* run exit trap for : | { ...; } and { ...; } | : */ + /* run exit trap for : | ( ...; ) and ( ...; ) | : */ + s += user_subshell == 0 && command->type == cm_group && (pipe_in != NO_PIPE || pipe_out != NO_PIPE) && asynchronous == 0; + + last_command_exit_value = execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close); + if (s) + subshell_exit (last_command_exit_value); + else + sh_exit (last_command_exit_value); + /* NOTREACHED */ + } else { close_pipes (pipe_in, pipe_out); #if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) - unlink_fifo_list (); + if (variable_context == 0) /* wait until shell function completes */ + 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 @@ -597,25 +700,25 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, stop_pipeline (asynchronous, (COMMAND *)NULL); + line_number = save_line_number; + 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); + exec_result = wait_for (paren_pid, 0); /* If we have to, invert the return value. */ if (invert) - exec_result = ((last_command_exit_value == EXECUTION_SUCCESS) + exec_result = ((exec_result == EXECUTION_SUCCESS) ? EXECUTION_FAILURE : EXECUTION_SUCCESS); - else - exec_result = last_command_exit_value; + last_command_exit_value = exec_result; 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 (); @@ -624,12 +727,11 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, 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); + return (last_command_exit_value); } else { @@ -637,6 +739,9 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, run_pending_traps (); + /* Posix 2013 2.9.3.1: "the exit status of an asynchronous list + shall be zero." */ + last_command_exit_value = 0; return (EXECUTION_SUCCESS); } } @@ -665,33 +770,67 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, if (shell_control_structure (command->type) && command->redirects) stdin_redir = stdin_redirects (command->redirects); +#if defined (PROCESS_SUBSTITUTION) +# if !defined (HAVE_DEV_FD) + reap_procsubs (); +# endif + + /* XXX - also if sourcelevel != 0? */ + if (variable_context != 0 || executing_list) + { + ofifo = num_fifos (); + ofifo_list = copy_fifo_list ((int *)&osize); + begin_unwind_frame ("internal_fifos"); + if (ofifo_list) + add_unwind_protect (xfree, ofifo_list); + saved_fifo = 1; + } + else + saved_fifo = 0; +#endif + /* Handle WHILE FOR CASE etc. with redirections. (Also '&' input redirection.) */ + was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0; + ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; + if (do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0) { - cleanup_redirects (redirection_undo_list); - redirection_undo_list = (REDIRECT *)NULL; + undo_partial_redirects (); dispose_exec_redirects (); - return (last_command_exit_value = EXECUTION_FAILURE); - } +#if defined (PROCESS_SUBSTITUTION) + if (saved_fifo) + { + free ((void *)ofifo_list); + discard_unwind_frame ("internal_fifos"); + } +#endif - if (redirection_undo_list) - { - my_undo_list = (REDIRECT *)copy_redirects (redirection_undo_list); - dispose_redirects (redirection_undo_list); - redirection_undo_list = (REDIRECT *)NULL; + /* Handle redirection error as command failure if errexit set. */ + last_command_exit_value = EXECUTION_FAILURE; + if (ignore_return == 0 && invert == 0 && pipe_in == NO_PIPE && pipe_out == NO_PIPE) + { + if (was_error_trap) + { + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap (); + line_number = save_line_number; + } + if (exit_immediately_on_error) + { + run_pending_traps (); + jump_to_top_level (ERREXIT); + } + } + return (last_command_exit_value); } - 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; + my_undo_list = redirection_undo_list; + redirection_undo_list = (REDIRECT *)NULL; + + exec_undo_list = exec_redirection_undo_list; + exec_redirection_undo_list = (REDIRECT *)NULL; if (my_undo_list || exec_undo_list) begin_unwind_frame ("loop_redirections"); @@ -702,8 +841,6 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, 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) @@ -717,7 +854,6 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, #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) @@ -725,7 +861,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, if (command->flags & CMD_STDIN_REDIR) command->value.Simple->flags |= CMD_STDIN_REDIR; - line_number_for_err_trap = line_number = command->value.Simple->line; + SET_LINE_NUMBER (command->value.Simple->line); exec_result = execute_simple_command (command->value.Simple, pipe_in, pipe_out, asynchronous, fds_to_close); @@ -745,34 +881,46 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, 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) + when the shell is compiled without job control. Don't worry about + whether or not last_made_pid == last_pid; already_making_children + tells us whether or not there are unwaited-for children to wait + for and reap. */ + if (already_making_children && pipe_out == NO_PIPE) { stop_pipeline (asynchronous, (COMMAND *)NULL); if (asynchronous) { DESCRIBE_PID (last_made_pid); + exec_result = EXECUTION_SUCCESS; + invert = 0; /* async commands always succeed */ } else #if !defined (JOB_CONTROL) /* Do not wait for asynchronous processes started from startup files. */ - if (last_made_pid != last_asynchronous_pid) + if (last_made_pid != NO_PID && last_made_pid != last_asynchronous_pid) +#else + if (last_made_pid != NO_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); + exec_result = wait_for (last_made_pid, 0); } } /* 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) + only the failure of a simple command. We don't want to run the error + trap if the command run by the `command' builtin fails; we want to + defer that until the command builtin itself returns failure. */ + /* 2020/07/14 -- this changes with how the command builtin is handled */ + if (was_error_trap && ignore_return == 0 && invert == 0 && + pipe_in == NO_PIPE && pipe_out == NO_PIPE && + (command->value.Simple->flags & CMD_COMMAND_BUILTIN) == 0 && + exec_result != EXECUTION_SUCCESS) { last_command_exit_value = exec_result; line_number = line_number_for_err_trap; @@ -786,6 +934,13 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, { last_command_exit_value = exec_result; run_pending_traps (); + + /* Undo redirections before running exit trap on the way out of + set -e. Report by Mark Farrell 5/19/2014 */ + if (exit_immediately_on_error && signal_is_trapped (0) && + unwind_protect_tag_on_stack ("saved-redirects")) + run_unwind_frame ("saved-redirects"); + jump_to_top_level (ERREXIT); } @@ -884,44 +1039,42 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, case cm_connection: exec_result = execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close); + if (asynchronous) + invert = 0; /* XXX */ + 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: +#endif + case cm_function_def: was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0; - if (ignore_return) +#if defined (DPAREN_ARITHMETIC) + if (ignore_return && command->type == cm_arith) + command->value.Arith->flags |= CMD_IGNORE_RETURN; +#endif +#if defined (COND_COMMAND) + if (ignore_return && command->type == cm_cond) command->value.Cond->flags |= CMD_IGNORE_RETURN; +#endif - line_number_for_err_trap = save_line_number = line_number; - exec_result = execute_cond_command (command->value.Cond); + line_number_for_err_trap = save_line_number = line_number; /* XXX */ +#if defined (DPAREN_ARITHMETIC) + if (command->type == cm_arith) + exec_result = execute_arith_command (command->value.Arith); + else +#endif +#if defined (COND_COMMAND) + if (command->type == cm_cond) + exec_result = execute_cond_command (command->value.Cond); + else +#endif + if (command->type == cm_function_def) + exec_result = execute_intern_function (command->value.Function_def->name, + command->value.Function_def); line_number = save_line_number; if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS) @@ -941,22 +1094,13 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, } 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); - } + cleanup_redirects (my_undo_list); if (exec_undo_list) dispose_redirects (exec_undo_list); @@ -964,6 +1108,17 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, if (my_undo_list || exec_undo_list) discard_unwind_frame ("loop_redirections"); +#if defined (PROCESS_SUBSTITUTION) + if (saved_fifo) + { + nfifo = num_fifos (); + if (nfifo > ofifo) + close_new_fifos ((void *)ofifo_list, osize); + free ((void *)ofifo_list); + discard_unwind_frame ("internal_fifos"); + } +#endif + /* Invert the return value if we have to */ if (invert) exec_result = (exec_result == EXECUTION_SUCCESS) @@ -985,24 +1140,24 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, # endif set_pipestatus_from_exit (exec_result); break; + default: + break; } #endif last_command_exit_value = exec_result; run_pending_traps (); -#if 0 - if (running_trap == 0) -#endif - currently_executing_command = (COMMAND *)NULL; + 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 *)); +extern struct timeval *difftimeval PARAMS((struct timeval *, struct timeval *, struct timeval *)); +extern struct timeval *addtimeval PARAMS((struct timeval *, struct timeval *, struct timeval *)); +extern int timeval_to_cpu PARAMS((struct timeval *, struct timeval *, struct timeval *)); #endif #define POSIX_TIMEFORMAT "real %2R\nuser %2U\nsys %2S" @@ -1054,7 +1209,7 @@ mkfmt (buf, prec, lng, sec, sec_fraction) and 999. */ if (prec != 0) { - buf[ind++] = '.'; + buf[ind++] = locale_decpoint (); for (aind = 1; aind <= prec; aind++) { buf[ind++] = (sec_fraction / precs[aind]) + '0'; @@ -1182,11 +1337,13 @@ time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close) int asynchronous, pipe_in, pipe_out; struct fd_bitmap *fds_to_close; { - int rv, posix_time, old_flags; + int rv, posix_time, old_flags, nullcmd, code; time_t rs, us, ss; int rsf, usf, ssf; int cpu; char *time_format; + volatile procenv_t save_top_level; + volatile int old_subshell; #if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY) struct timeval real, user, sys; @@ -1216,13 +1373,38 @@ time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close) # endif #endif - posix_time = (command->flags & CMD_TIME_POSIX); + old_subshell = subshell_environment; + posix_time = command && (command->flags & CMD_TIME_POSIX); + + nullcmd = (command == 0) || (command->type == cm_simple && command->value.Simple->words == 0 && command->value.Simple->redirects == 0); + if (posixly_correct && nullcmd) + { +#if defined (HAVE_GETRUSAGE) + selfb.ru_utime.tv_sec = kidsb.ru_utime.tv_sec = selfb.ru_stime.tv_sec = kidsb.ru_stime.tv_sec = 0; + selfb.ru_utime.tv_usec = kidsb.ru_utime.tv_usec = selfb.ru_stime.tv_usec = kidsb.ru_stime.tv_usec = 0; + before = shellstart; +#else + before.tms_utime = before.tms_stime = before.tms_cutime = before.tms_cstime = 0; + tbefore = shell_start_time; +#endif + } old_flags = command->flags; + COPY_PROCENV (top_level, save_top_level); command->flags &= ~(CMD_TIME_PIPELINE|CMD_TIME_POSIX); - rv = execute_command_internal (command, asynchronous, pipe_in, pipe_out, fds_to_close); + code = setjmp_nosigs (top_level); + if (code == NOT_JUMPED) + rv = execute_command_internal (command, asynchronous, pipe_in, pipe_out, fds_to_close); + COPY_PROCENV (save_top_level, top_level); + command->flags = old_flags; + /* If we're jumping in a different subshell environment than we started, + don't bother printing timing stats, just keep longjmping back to the + original top level. */ + if (code != NOT_JUMPED && subshell_environment && subshell_environment != old_subshell) + sh_longjmp (top_level, code); + rs = us = ss = 0; rsf = usf = ssf = cpu = 0; @@ -1271,11 +1453,19 @@ time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close) if (posix_time) time_format = POSIX_TIMEFORMAT; else if ((time_format = get_string_value ("TIMEFORMAT")) == 0) - time_format = BASH_TIMEFORMAT; + { + if (posixly_correct && nullcmd) + time_format = "user\t%2lU\nsys\t%2lS"; + else + time_format = BASH_TIMEFORMAT; + } if (time_format && *time_format) print_formatted_time (stderr, time_format, rs, rsf, us, usf, ss, ssf, cpu); + if (code) + sh_longjmp (top_level, code); + return rv; } #endif /* COMMAND_TIMING */ @@ -1290,10 +1480,9 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) 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; + volatile int user_subshell, user_coproc, invert; + int return_code, function_value, should_redir_stdin, ois, result; + volatile COMMAND *tcom; USE_VAR(user_subshell); USE_VAR(user_coproc); @@ -1314,6 +1503,7 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) /* 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 @@ -1346,14 +1536,23 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) expansion with `shopt -s expand_alias' to continue to expand aliases. */ if (ois != interactive_shell) - expand_aliases = 0; + expand_aliases = expaliases_flag = 0; } /* Subshells are neither login nor interactive. */ login_shell = interactive = 0; + /* And we're no longer in a loop. See Posix interp 842 (we are not in the + "same execution environment"). */ + if (shell_compatibility_level > 44) + loop_level = 0; + if (user_subshell) - subshell_environment = SUBSHELL_PAREN; + { + subshell_environment = SUBSHELL_PAREN; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; + } else { subshell_environment = 0; /* XXX */ @@ -1365,9 +1564,30 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) subshell_environment |= SUBSHELL_COPROC; } + QUIT; + CHECK_TERMSIG; + reset_terminating_signals (); /* in sig.c */ /* Cancel traps, in trap.c. */ - restore_original_signals (); + /* Reset the signal handlers in the child, but don't free the + trap strings. Set a flag noting that we have to free the + trap strings if we run trap to change a signal disposition. */ + clear_pending_traps (); + reset_signal_handlers (); + subshell_environment |= SUBSHELL_RESETTRAP; + /* Note that signal handlers have been reset, so we should no longer + reset the handler and resend trapped signals to ourselves. */ + subshell_environment &= ~SUBSHELL_IGNTRAP; + + /* We are in a subshell, so forget that we are running a trap handler or + that the signal handler has changed (we haven't changed it!) */ + /* XXX - maybe do this for `real' signals and not ERR/DEBUG/RETURN/EXIT + traps? */ + if (running_trap > 0) + { + run_trap_cleanup (running_trap - 1); + running_trap = 0; /* XXX - maybe leave this */ + } /* Make sure restore_original_signals doesn't undo the work done by make_child to ensure that asynchronous children are immune to SIGINT @@ -1378,18 +1598,16 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) setup_async_signals (); asynchronous = 0; } + else + set_sigint_handler (); #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); @@ -1400,15 +1618,26 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) coproc_closeall (); #endif +#if defined (PROCESS_SUBSTITUTION) + clear_fifo_list (); /* XXX- we haven't created any FIFOs */ +#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. */ + sh compatibility, but I'm not sure it's the right thing to do. + Note that an input pipe to a compound command suffices to inhibit + the implicit /dev/null redirection for asynchronous commands + executed as part of that compound command. */ if (user_subshell) { - stdin_redir = stdin_redirects (command->redirects); - restore_default_signal (0); + stdin_redir = stdin_redirects (command->redirects) || pipe_in != NO_PIPE; +#if 0 + restore_default_signal (EXIT_TRAP); /* XXX - reset_signal_handlers above */ +#endif } + else if (shell_control_structure (command->type) && pipe_in != NO_PIPE) + stdin_redir = 1; /* If this is an asynchronous command (command &), we want to redirect the standard input from /dev/null in the absence of @@ -1416,6 +1645,19 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) if (should_redir_stdin && stdin_redir == 0) async_redirect_stdin (); +#if defined (BUFFERED_INPUT) + /* In any case, we are not reading our command input from stdin. */ + default_buffered_input = -1; +#endif + + /* We can't optimize away forks if one of the commands executed by the + subshell sets an exit trap, so we set CMD_NO_FORK for simple commands + and set CMD_TRY_OPTIMIZING for simple commands on the right side of an + and-or or `;' list to test for optimizing forks when they are executed. */ + if (user_subshell && command->type == cm_subshell && + (command->flags & (CMD_TIME_PIPELINE|CMD_INVERT_RETURN)) == 0) + optimize_subshell_command (command->value.Subshell->command); + /* Do redirections, then dispose of them before recursive call. */ if (command->redirects) { @@ -1459,30 +1701,34 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) invert = (tcom->flags & CMD_INVERT_RETURN) != 0; tcom->flags &= ~CMD_INVERT_RETURN; - result = setjmp (top_level); + result = setjmp_nosigs (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); + function_value = setjmp_nosigs (return_catch); /* If we're going to exit the shell, we don't want to invert the return status. */ - if (result == EXITPROG) + if (result == EXITPROG || result == EXITBLTIN) invert = 0, return_code = last_command_exit_value; else if (result) - return_code = EXECUTION_FAILURE; + return_code = (last_command_exit_value == EXECUTION_SUCCESS) ? EXECUTION_FAILURE : last_command_exit_value; else if (function_value) return_code = return_catch_value; else - return_code = execute_command_internal (tcom, asynchronous, NO_PIPE, NO_PIPE, fds_to_close); + return_code = execute_command_internal ((COMMAND *)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; + /* Check for terminating signals before we return to our caller, which we + expect to exit immediately anyway. */ + CHECK_TERMSIG; + /* 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)) @@ -1491,7 +1737,9 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) return_code = run_exit_trap (); } - subshell_level--; +#if 0 + subshell_level--; /* don't bother, caller will just exit */ +#endif return (return_code); /* NOTREACHED */ } @@ -1511,20 +1759,25 @@ typedef struct cplist struct cpelement *head; struct cpelement *tail; int ncoproc; + int lock; } 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)); +static struct cpelement *cpe_alloc PARAMS((struct coproc *)); +static void cpe_dispose PARAMS((struct cpelement *)); +static struct cpelement *cpl_add PARAMS((struct coproc *)); +static struct cpelement *cpl_delete PARAMS((pid_t)); +static void cpl_reap PARAMS((void)); +static void cpl_flush PARAMS((void)); +static void cpl_closeall PARAMS((void)); +static struct cpelement *cpl_search PARAMS((pid_t)); +static struct cpelement *cpl_searchbyname PARAMS((const char *)); +static void cpl_prune PARAMS((void)); + +static void coproc_free PARAMS((struct coproc *)); -Coproc sh_coproc = { 0, NO_PID, -1, -1, 0, 0 }; +/* Will go away when there is fully-implemented support for multiple coprocs. */ +Coproc sh_coproc = { 0, NO_PID, -1, -1, 0, 0, 0, 0, 0 }; cplist_t coproc_list = {0, 0, 0}; @@ -1588,9 +1841,7 @@ cpl_delete (pid) if (p == 0) return 0; /* not found */ -#if defined (DEBUG) - itrace("cpl_delete: deleting %d", pid); -#endif + INTERNAL_DEBUG (("cpl_delete: deleting %d", pid)); /* Housekeeping in the border cases. */ if (p == coproc_list.head) @@ -1610,32 +1861,41 @@ cpl_delete (pid) 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; + struct cpelement *p, *next, *nh, *nt; - 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 + /* Build a new list by removing dead coprocs and fix up the coproc_list + pointers when done. */ + nh = nt = next = (struct cpelement *)0; + for (p = coproc_list.head; p; p = next) + { + next = p->next; + if (p->coproc->c_flags & COPROC_DEAD) + { + coproc_list.ncoproc--; /* keep running count, fix up pointers later */ + INTERNAL_DEBUG (("cpl_reap: deleting %d", p->coproc->c_pid)); + coproc_dispose (p->coproc); + cpe_dispose (p); + } + else if (nh == 0) + nh = nt = p; + else + { + nt->next = p; + nt = nt->next; + } + } - coproc_dispose (p->coproc); - cpe_dispose (p); - } + if (coproc_list.ncoproc == 0) + coproc_list.head = coproc_list.tail = 0; + else + { + if (nt) + nt->next = 0; + coproc_list.head = nh; + coproc_list.tail = nt; + if (coproc_list.ncoproc == 1) + coproc_list.tail = coproc_list.head; /* just to make sure */ + } } /* Clear out the list of saved statuses */ @@ -1657,17 +1917,36 @@ cpl_flush () coproc_list.ncoproc = 0; } +static void +cpl_closeall () +{ + struct cpelement *cpe; + + for (cpe = coproc_list.head; cpe; cpe = cpe->next) + coproc_close (cpe->coproc); +} + +static void +cpl_fdchk (fd) + int fd; +{ + struct cpelement *cpe; + + for (cpe = coproc_list.head; cpe; cpe = cpe->next) + coproc_checkfd (cpe->coproc, fd); +} + /* 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; + struct cpelement *cpe; - for (cp = coproc_list.head ; cp; cp = cp->next) - if (cp->coproc->c_pid == pid) - return cp; + for (cpe = coproc_list.head ; cpe; cpe = cpe->next) + if (cpe->coproc->c_pid == pid) + return cpe; return (struct cpelement *)NULL; } @@ -1675,7 +1954,7 @@ cpl_search (pid) cpelement struct if found. If not found, return NULL. */ static struct cpelement * cpl_searchbyname (name) - char *name; + const char *name; { struct cpelement *cp; @@ -1685,6 +1964,17 @@ cpl_searchbyname (name) return (struct cpelement *)NULL; } +static pid_t +cpl_firstactive () +{ + struct cpelement *cpe; + + for (cpe = coproc_list.head ; cpe; cpe = cpe->next) + if ((cpe->coproc->c_flags & COPROC_DEAD) == 0) + return cpe->coproc->c_pid; + return (pid_t)NO_PID; +} + #if 0 static void cpl_prune () @@ -1710,14 +2000,28 @@ struct coproc * getcoprocbypid (pid) pid_t pid; { +#if MULTIPLE_COPROCS + struct cpelement *p; + + p = cpl_search (pid); + return (p ? p->coproc : 0); +#else return (pid == sh_coproc.c_pid ? &sh_coproc : 0); +#endif } struct coproc * getcoprocbyname (name) const char *name; { +#if MULTIPLE_COPROCS + struct cpelement *p; + + p = cpl_searchbyname (name); + return (p ? p->coproc : 0); +#else return ((sh_coproc.c_name && STREQ (sh_coproc.c_name, name)) ? &sh_coproc : 0); +#endif } void @@ -1728,7 +2032,7 @@ coproc_init (cp) 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; + cp->c_flags = cp->c_status = cp->c_lock = 0; } struct coproc * @@ -1738,33 +2042,62 @@ coproc_alloc (name, pid) { struct coproc *cp; - cp = &sh_coproc; /* XXX */ +#if MULTIPLE_COPROCS + cp = (struct coproc *)xmalloc (sizeof (struct coproc)); +#else + cp = &sh_coproc; +#endif coproc_init (cp); + cp->c_lock = 2; - cp->c_name = savestring (name); cp->c_pid = pid; - + cp->c_name = savestring (name); +#if MULTIPLE_COPROCS + cpl_add (cp); +#endif + cp->c_lock = 0; return (cp); } +static void +coproc_free (cp) + struct coproc *cp; +{ + free (cp); +} + void coproc_dispose (cp) struct coproc *cp; { + sigset_t set, oset; + if (cp == 0) return; + BLOCK_SIGNAL (SIGCHLD, set, oset); + cp->c_lock = 3; coproc_unsetvars (cp); FREE (cp->c_name); coproc_close (cp); +#if MULTIPLE_COPROCS + coproc_free (cp); +#else coproc_init (cp); + cp->c_lock = 0; +#endif + UNBLOCK_SIGNAL (oset); } -/* Placeholder for now. */ +/* Placeholder for now. Will require changes for multiple coprocs */ void coproc_flush () { +#if MULTIPLE_COPROCS + cpl_flush (); +#else coproc_dispose (&sh_coproc); +#endif } void @@ -1787,17 +2120,25 @@ coproc_close (cp) void coproc_closeall () { - coproc_close (&sh_coproc); +#if MULTIPLE_COPROCS + cpl_closeall (); +#else + coproc_close (&sh_coproc); /* XXX - will require changes for multiple coprocs */ +#endif } void coproc_reap () { +#if MULTIPLE_COPROCS + cpl_reap (); +#else struct coproc *cp; - cp = &sh_coproc; + cp = &sh_coproc; /* XXX - will require changes for multiple coprocs */ if (cp && (cp->c_flags & COPROC_DEAD)) coproc_dispose (cp); +#endif } void @@ -1844,7 +2185,11 @@ void coproc_fdchk (fd) int fd; { +#if MULTIPLE_COPROCS + cpl_fdchk (fd); +#else coproc_checkfd (&sh_coproc, fd); +#endif } void @@ -1873,35 +2218,59 @@ coproc_fdrestore (cp) cp->c_wfd = cp->c_wsave; } +static void +coproc_setstatus (cp, status) + struct coproc *cp; + int status; +{ + cp->c_lock = 4; + cp->c_status = status; + cp->c_flags |= COPROC_DEAD; + cp->c_flags &= ~COPROC_RUNNING; + /* Don't dispose the coproc or unset the COPROC_XXX variables because + this is executed in a signal handler context. Wait until coproc_reap + takes care of it. */ + cp->c_lock = 0; +} + void coproc_pidchk (pid, status) pid_t pid; + int status; { struct coproc *cp; +#if MULTIPLE_COPROCS + struct cpelement *cpe; + + /* We're not disposing the coproc because this is executed in a signal + handler context */ + cpe = cpl_search (pid); + cp = cpe ? cpe->coproc : 0; +#else 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 - } + coproc_setstatus (cp, status); } +pid_t +coproc_active () +{ +#if MULTIPLE_COPROCS + return (cpl_firstactive ()); +#else + return ((sh_coproc.c_flags & COPROC_DEAD) ? NO_PID : sh_coproc.c_pid); +#endif +} void coproc_setvars (cp) struct coproc *cp; { SHELL_VAR *v; char *namevar, *t; - int l; + size_t l; + WORD_DESC w; #if defined (ARRAY_VARS) arrayind_t ind; #endif @@ -1909,11 +2278,44 @@ coproc_setvars (cp) if (cp->c_name == 0) return; + /* We could do more here but right now we only check the name, warn if it's + not a valid identifier, and refuse to create variables with invalid names + if a coproc with such a name is supplied. */ + w.word = cp->c_name; + w.flags = 0; + if (check_identifier (&w, 1) == 0) + return; + l = strlen (cp->c_name); namevar = xmalloc (l + 16); #if defined (ARRAY_VARS) v = find_variable (cp->c_name); + + /* This is the same code as in find_or_make_array_variable */ + if (v == 0) + { + v = find_variable_nameref_for_create (cp->c_name, 1); + if (v == INVALID_NAMEREF_VALUE) + { + free (namevar); + return; + } + if (v && nameref_p (v)) + { + free (cp->c_name); + cp->c_name = savestring (nameref_cell (v)); + v = make_new_array_variable (cp->c_name); + } + } + + if (v && (readonly_p (v) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (cp->c_name); + free (namevar); + return; + } if (v == 0) v = make_new_array_variable (cp->c_name); if (array_p (v) == 0) @@ -1926,7 +2328,7 @@ coproc_setvars (cp) t = itos (cp->c_wfd); ind = 1; - bind_array_variable (cp->c_name, ind, t, 0); + v = bind_array_variable (cp->c_name, ind, t, 0); free (t); #else sprintf (namevar, "%s_READ", cp->c_name); @@ -1941,7 +2343,7 @@ coproc_setvars (cp) sprintf (namevar, "%s_PID", cp->c_name); t = itos (cp->c_pid); - bind_variable (namevar, t, 0); + v = bind_variable (namevar, t, 0); free (t); free (namevar); @@ -1961,10 +2363,10 @@ coproc_unsetvars (cp) namevar = xmalloc (l + 16); sprintf (namevar, "%s_PID", cp->c_name); - unbind_variable (namevar); + unbind_variable_noref (namevar); #if defined (ARRAY_VARS) - unbind_variable (cp->c_name); + check_unbind_variable (cp->c_name); #else sprintf (namevar, "%s_READ", cp->c_name); unbind_variable (namevar); @@ -1981,22 +2383,35 @@ execute_coproc (command, pipe_in, pipe_out, fds_to_close) int pipe_in, pipe_out; struct fd_bitmap *fds_to_close; { - int rpipe[2], wpipe[2], estat; + int rpipe[2], wpipe[2], estat, invert; pid_t coproc_pid; Coproc *cp; - char *tcmd; + char *tcmd, *p, *name; + sigset_t set, oset; - /* 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); + /* XXX -- can be removed after changes to handle multiple coprocs */ +#if !MULTIPLE_COPROCS + if (sh_coproc.c_pid != NO_PID && (sh_coproc.c_rfd >= 0 || sh_coproc.c_wfd >= 0)) + internal_warning (_("execute_coproc: coproc [%d:%s] still exists"), sh_coproc.c_pid, sh_coproc.c_name); + coproc_init (&sh_coproc); #endif + + invert = (command->flags & CMD_INVERT_RETURN) != 0; + + /* expand name without splitting - could make this dependent on a shopt option */ + name = expand_string_unsplit_to_string (command->value.Coproc->name, 0); + /* Optional check -- could be relaxed */ + if (legal_identifier (name) == 0) + { + internal_error (_("`%s': not a valid identifier"), name); + free (name); + return (invert ? EXECUTION_SUCCESS : EXECUTION_FAILURE); + } + else + { + free (command->value.Coproc->name); + command->value.Coproc->name = name; } - coproc_init (&sh_coproc); command_string_index = 0; tcmd = make_command_string (command); @@ -2004,12 +2419,20 @@ execute_coproc (command, pipe_in, pipe_out, fds_to_close) 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); + BLOCK_SIGNAL (SIGCHLD, set, oset); + + coproc_pid = make_child (p = savestring (tcmd), FORK_ASYNC); + if (coproc_pid == 0) { close (rpipe[0]); close (wpipe[1]); +#if defined (JOB_CONTROL) + FREE (p); +#endif + + UNBLOCK_SIGNAL (oset); estat = execute_in_subshell (command, 1, wpipe[0], rpipe[1], fds_to_close); fflush (stdout); @@ -2025,13 +2448,17 @@ execute_coproc (command, pipe_in, pipe_out, fds_to_close) cp->c_rfd = rpipe[0]; cp->c_wfd = wpipe[1]; + cp->c_flags |= COPROC_RUNNING; + SET_CLOSE_ON_EXEC (cp->c_rfd); SET_CLOSE_ON_EXEC (cp->c_wfd); coproc_setvars (cp); + UNBLOCK_SIGNAL (oset); + #if 0 - itrace ("execute_coproc: [%d] %s", coproc_pid, the_printed_command); + itrace ("execute_coproc (%s): [%d] %s", command->value.Coproc->name, coproc_pid, the_printed_command); #endif close_pipes (pipe_in, pipe_out); @@ -2042,10 +2469,32 @@ execute_coproc (command, pipe_in, pipe_out, fds_to_close) DESCRIBE_PID (coproc_pid); run_pending_traps (); - return (EXECUTION_SUCCESS); + return (invert ? EXECUTION_FAILURE : EXECUTION_SUCCESS); } #endif +/* If S == -1, it's a special value saying to close stdin */ +static void +restore_stdin (s) + int s; +{ + if (s == -1) + close (0); + else + { + dup2 (s, 0); + close (s); + } +} + +/* Catch-all cleanup function for lastpipe code for unwind-protects */ +static void +lastpipe_cleanup (s) + int s; +{ + set_jobs_list_frozen (s); +} + static int execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) COMMAND *command; @@ -2053,8 +2502,10 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) struct fd_bitmap *fds_to_close; { int prev, fildes[2], new_bitmap_size, dummyfd, ignore_return, exec_result; + int lstdin, lastpipe_flag, lastpipe_jid, old_frozen, stdin_valid; COMMAND *cmd; struct fd_bitmap *fd_bitmap; + pid_t lastpid; #if defined (JOB_CONTROL) sigset_t set, oset; @@ -2063,6 +2514,8 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; + stdin_valid = sh_validfd (0); + prev = pipe_in; cmd = command; @@ -2144,19 +2597,94 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) cmd = cmd->value.Connection->second; } + lastpid = last_made_pid; + /* Now execute the rightmost command in the pipeline. */ if (ignore_return && cmd) cmd->flags |= CMD_IGNORE_RETURN; + + lastpipe_flag = 0; + + begin_unwind_frame ("lastpipe-exec"); + lstdin = -2; /* -1 is special, meaning fd 0 is closed */ + /* If the `lastpipe' option is set with shopt, and job control is not + enabled, execute the last element of non-async pipelines in the + current shell environment. */ + /* prev can be 0 if fd 0 was closed when this function was executed. prev + will never be 0 at this point if fd 0 was valid when this function was + executed (though we check above). */ + if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev >= 0) + { + /* -1 is a special value meaning to close stdin */ + lstdin = (prev > 0 && stdin_valid) ? move_to_high_fd (0, 1, -1) : -1; + if (lstdin > 0 || lstdin == -1) + { + do_piping (prev, pipe_out); + prev = NO_PIPE; + add_unwind_protect (restore_stdin, lstdin); + lastpipe_flag = 1; + old_frozen = freeze_jobs_list (); + lastpipe_jid = stop_pipeline (0, (COMMAND *)NULL); /* XXX */ + add_unwind_protect (lastpipe_cleanup, old_frozen); +#if defined (JOB_CONTROL) + UNBLOCK_CHILD (oset); /* XXX */ +#endif + } + if (cmd) + cmd->flags |= CMD_LASTPIPE; + } + if (prev >= 0) + add_unwind_protect (close, prev); + exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close); if (prev >= 0) close (prev); + if (lstdin > 0 || lstdin == -1) + restore_stdin (lstdin); + #if defined (JOB_CONTROL) UNBLOCK_CHILD (oset); #endif QUIT; + + if (lastpipe_flag) + { +#if defined (JOB_CONTROL) + if (INVALID_JOB (lastpipe_jid) == 0) + { + append_process (savestring (the_printed_command_except_trap), dollar_dollar_pid, exec_result, lastpipe_jid); + lstdin = wait_for (lastpid, 0); + } + else + { + lstdin = wait_for_single_pid (lastpid, 0); /* checks bgpids list */ + if (lstdin > 256) /* error sentinel */ + lstdin = 127; + } +#else + lstdin = wait_for (lastpid, 0); +#endif + +#if defined (JOB_CONTROL) + /* If wait_for removes the job from the jobs table, use result of last + command as pipeline's exit status as usual. The jobs list can get + frozen and unfrozen at inconvenient times if there are multiple pipelines + running simultaneously. */ + if (INVALID_JOB (lastpipe_jid) == 0) + exec_result = job_exit_status (lastpipe_jid); + else if (pipefail_opt) + exec_result = exec_result | lstdin; /* XXX */ + /* otherwise we use exec_result */ +#endif + + set_jobs_list_frozen (old_frozen); + } + + discard_unwind_frame ("lastpipe-exec"); + return (exec_result); } @@ -2166,7 +2694,6 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) 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; @@ -2181,8 +2708,6 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) if (tc == 0) return (EXECUTION_SUCCESS); - rp = tc->redirects; - if (ignore_return) tc->flags |= CMD_IGNORE_RETURN; tc->flags |= CMD_AMPERSAND; @@ -2217,6 +2742,7 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) /* Just call execute command on both sides. */ case ';': + case '\n': /* special case, happens in command substitutions */ if (ignore_return) { if (command->value.Connection->first) @@ -2226,8 +2752,17 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) } executing_list++; QUIT; + +#if 1 execute_command (command->value.Connection->first); +#else + execute_command_internal (command->value.Connection->first, + asynchronous, pipe_in, pipe_out, + fds_to_close); +#endif + QUIT; + optimize_connection_fork (command); /* XXX */ exec_result = execute_command_internal (command->value.Connection->second, asynchronous, pipe_in, pipe_out, fds_to_close); @@ -2239,9 +2774,15 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) invert = (command->flags & CMD_INVERT_RETURN) != 0; ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0; - line_number_for_err_trap = line_number; + SET_LINE_NUMBER (line_number); /* XXX - save value? */ exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close); + if (asynchronous) + { + exec_result = EXECUTION_SUCCESS; + invert = 0; + } + if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS) { last_command_exit_value = exec_result; @@ -2283,17 +2824,24 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) if (command->value.Connection->first) command->value.Connection->first->flags |= CMD_IGNORE_RETURN; +#if 1 exec_result = execute_command (command->value.Connection->first); +#else + exec_result = execute_command_internal (command->value.Connection->first, 0, NO_PIPE, NO_PIPE, fds_to_close); +#endif 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; + optimize_connection_fork (command); - exec_result = execute_command (command->value.Connection->second); + second = command->value.Connection->second; + if (ignore_return && second) + second->flags |= CMD_IGNORE_RETURN; + + exec_result = execute_command (second); } executing_list--; break; @@ -2307,10 +2855,13 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) return exec_result; } +/* The test used to be only for interactive_shell, but we don't want to report + job status when the shell is not interactive or when job control isn't + enabled. */ #define REAP() \ do \ { \ - if (!interactive_shell) \ + if (job_control == 0 || interactive_shell == 0) \ reap_dead_jobs (); \ } \ while (0) @@ -2343,6 +2894,7 @@ execute_for_command (for_command) loop_level++; identifier = for_command->name->word; + line_number = for_command->line; /* for expansion error messages */ list = releaser = expand_words_no_vars (for_command->map_list); begin_unwind_frame ("for"); @@ -2375,11 +2927,7 @@ execute_for_command (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); @@ -2394,11 +2942,27 @@ execute_for_command (for_command) #endif this_command_name = (char *)NULL; - v = bind_variable (identifier, list->word->word, 0); - if (readonly_p (v) || noassign_p (v)) + /* XXX - special ksh93 for command index variable handling */ + v = find_variable_last_nameref (identifier, 1); + if (v && nameref_p (v)) + { + if (valid_nameref_value (list->word->word, 1) == 0) + { + sh_invalidid (list->word->word); + v = 0; + } + else if (readonly_p (v)) + err_readonly (name_cell (v)); + else + v = bind_variable_value (v, list->word->word, ASS_NAMEREF); + } + else + v = bind_variable (identifier, list->word->word, 0); + + if (v == 0 || readonly_p (v) || noassign_p (v)) { line_number = save_line_number; - if (readonly_p (v) && interactive_shell == 0 && posixly_correct) + if (v && readonly_p (v) && interactive_shell == 0 && posixly_correct) { last_command_exit_value = EXECUTION_FAILURE; jump_to_top_level (FORCE_EOF); @@ -2411,6 +2975,12 @@ execute_for_command (for_command) return (EXECUTION_FAILURE); } } + + if (ifsname (identifier)) + setifs (v); + else + stupidly_hack_special_variables (identifier); + retval = execute_command (for_command->action); REAP (); QUIT; @@ -2441,7 +3011,7 @@ execute_for_command (for_command) { SHELL_VAR *new_value; - new_value = bind_variable (identifier, value_cell(old_value), 0); + new_value = bind_variable (identifier, value_cell (old_value), 0); new_value->attributes = old_value->attributes; dispose_variable (old_value); } @@ -2476,18 +3046,24 @@ eval_arith_for_expr (l, okp) { WORD_LIST *new; intmax_t expresult; - int r; + int r, eflag; + char *expr, *temp; + + expr = l->next ? string_list (l) : l->word->word; + temp = expand_arith_string (expr, Q_DOUBLE_QUOTES|Q_ARITH); + if (l->next) + free (expr); + new = make_word_list (make_word (temp ? temp : ""), (WORD_LIST *)NULL); + free (temp); - 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) + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -2496,9 +3072,12 @@ eval_arith_for_expr (l, okp) r = run_debug_trap (); /* In debugging mode, if the DEBUG trap returns a non-zero status, we skip the command. */ + eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED; + this_command_name = "(("; /* )) for expression error messages */ + #if defined (DEBUGGER) if (debugging_mode == 0 || r == EXECUTION_SUCCESS) - expresult = evalexp (new->word->word, okp); + expresult = evalexp (new->word->word, eflag, okp); else { expresult = 0; @@ -2506,7 +3085,7 @@ eval_arith_for_expr (l, okp) *okp = 1; } #else - expresult = evalexp (new->word->word, okp); + expresult = evalexp (new->word->word, eflag, okp); #endif dispose_words (new); } @@ -2539,8 +3118,13 @@ execute_arith_for_command (arith_for_command) 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; + if (variable_context && interactive_shell && sourcelevel == 0) + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } /* Evaluate the initialization expression. */ expresult = eval_arith_for_expr (arith_for_command->init, &expok); @@ -2619,6 +3203,29 @@ static int LINES, COLS, tabsize; : ((s < 100000) ? 5 \ : 6))))) +static int +displen (s) + const char *s; +{ +#if defined (HANDLE_MULTIBYTE) + wchar_t *wcstr; + size_t slen; + int wclen; + + wcstr = 0; + slen = mbstowcs (wcstr, s, 0); + if (slen == -1) + slen = 0; + wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (slen + 1)); + mbstowcs (wcstr, s, slen + 1); + wclen = wcswidth (wcstr, slen); + free (wcstr); + return (wclen < 0 ? STRLEN(s) : wclen); +#else + return (STRLEN (s)); +#endif +} + static int print_index_and_element (len, ind, list) int len, ind; @@ -2631,8 +3238,10 @@ print_index_and_element (len, ind, list) return (0); for (i = ind, l = list; l && --i; l = l->next) ; + if (l == 0) /* don't think this can happen */ + return (0); fprintf (stderr, "%*d%s%s", len, ind, RP_SPACE, l->word->word); - return (STRLEN (l->word->word)); + return (displen (l->word->word)); } static void @@ -2714,15 +3323,12 @@ select_query (list, list_len, prompt, print_menu) char *prompt; int print_menu; { - int max_elem_len, indices_len, len; + int max_elem_len, indices_len, len, r, oe; 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; + COLS = default_columns (); #if 0 t = get_string_value ("TABSIZE"); @@ -2736,7 +3342,7 @@ select_query (list, list_len, prompt, print_menu) max_elem_len = 0; for (l = list; l; l = l->next) { - len = STRLEN (l->word->word); + len = displen (l->word->word); if (len > max_elem_len) max_elem_len = len; } @@ -2751,12 +3357,18 @@ select_query (list, list_len, prompt, print_menu) fflush (stderr); QUIT; - if (read_builtin ((WORD_LIST *)NULL) == EXECUTION_FAILURE) + oe = executing_builtin; + executing_builtin = 1; + r = read_builtin ((WORD_LIST *)NULL); + executing_builtin = oe; + if (r != EXECUTION_SUCCESS) { putchar ('\n'); return ((char *)NULL); } repl_string = get_string_value ("REPLY"); + if (repl_string == 0) + return ((char *)NULL); if (*repl_string == 0) { print_menu = 1; @@ -2769,7 +3381,7 @@ select_query (list, list_len, prompt, print_menu) for (l = list; l && --reply; l = l->next) ; - return (l->word->word); + return (l->word->word); /* XXX - can't be null? */ } } @@ -2816,6 +3428,8 @@ execute_select_command (select_command) return (EXECUTION_SUCCESS); #endif + this_command_name = (char *)0; + loop_level++; identifier = select_command->name->word; @@ -2859,9 +3473,9 @@ execute_select_command (select_command) } v = bind_variable (identifier, selection, 0); - if (readonly_p (v) || noassign_p (v)) + if (v == 0 || readonly_p (v) || noassign_p (v)) { - if (readonly_p (v) && interactive_shell == 0 && posixly_correct) + if (v && readonly_p (v) && interactive_shell == 0 && posixly_correct) { last_command_exit_value = EXECUTION_FAILURE; jump_to_top_level (FORCE_EOF); @@ -2876,6 +3490,8 @@ execute_select_command (select_command) } } + stupidly_hack_special_variables (identifier); + retval = execute_command (select_command->action); REAP (); @@ -2923,7 +3539,7 @@ execute_case_command (case_command) WORD_LIST *wlist, *es; PATTERN_LIST *clauses; char *word, *pattern; - int retval, match, ignore_return, save_line_number; + int retval, match, ignore_return, save_line_number, qflags; save_line_number = line_number; line_number = case_command->line; @@ -2955,15 +3571,27 @@ execute_case_command (case_command) } #endif - wlist = expand_word_unsplit (case_command->word, 0); - word = wlist ? string_list (wlist) : savestring (""); + /* Use the same expansions (the ones POSIX specifies) as the patterns; + dequote the resulting string (as POSIX specifies) since the quotes in + patterns are handled specially below. We have to do it in this order + because we're not supposed to perform word splitting. */ + wlist = expand_word_leave_quoted (case_command->word, 0); + if (wlist) + { + char *t; + t = string_list (wlist); + word = dequote_string (t); + free (t); + } + else + word = 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); + add_unwind_protect (xfree, word); #define EXIT_CASE() goto exit_case_command @@ -2975,7 +3603,18 @@ execute_case_command (case_command) 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); + { + /* Convert quoted null strings into empty strings. */ + qflags = QGLOB_CVTNULL; + + /* We left CTLESC in place quoting CTLESC and CTLNUL after the + call to expand_word_leave_quoted; tell quote_string_for_globbing + to remove those here. This works for both unquoted portions of + the word (which call quote_escapes) and quoted portions + (which call quote_string). */ + qflags |= QGLOB_CTLESC; + pattern = quote_string_for_globbing (es->word->word, qflags); + } else { pattern = (char *)xmalloc (1); @@ -2989,6 +3628,7 @@ execute_case_command (case_command) free (pattern); dispose_words (es); + QUIT; if (match) { @@ -3065,17 +3705,22 @@ execute_while_or_until (while_command, type) 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. */ + this, and the shell will cease to execute commands. The same holds + true for `continue'. */ if (type == CMD_WHILE && return_value != EXECUTION_SUCCESS) { if (breaking) breaking--; + if (continuing) + continuing--; break; } if (type == CMD_UNTIL && return_value == EXECUTION_SUCCESS) { if (breaking) breaking--; + if (continuing) + continuing--; break; } @@ -3140,24 +3785,29 @@ static int execute_arith_command (arith_command) ARITH_COM *arith_command; { - int expok, save_line_number, retval; + int expok, save_line_number, retval, eflag; intmax_t expresult; WORD_LIST *new; - char *exp; + char *exp, *t; expresult = 0; save_line_number = line_number; this_command_name = "(("; /* )) */ - line_number = arith_command->line; + SET_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; + if (variable_context && interactive_shell && sourcelevel == 0) + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } command_string_index = 0; print_arith_command (arith_command->exp); - if (signal_in_progress (DEBUG_TRAP) == 0) + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -3177,21 +3827,30 @@ execute_arith_command (arith_command) } #endif - new = expand_words_no_vars (arith_command->exp); + this_command_name = "(("; /* )) */ + t = (char *)NULL; + new = arith_command->exp; + exp = (new->next) ? (t = string_list (new)) : new->word->word; + + exp = expand_arith_string (exp, Q_DOUBLE_QUOTES|Q_ARITH); + FREE (t); /* If we're tracing, make a new word list with `((' at the front and `))' - at the back and print it. */ + at the back and print it. Change xtrace_print_arith_cmd to take a string + when I change eval_arith_for_expr to use expand_arith_string(). */ if (echo_command_at_execute) - xtrace_print_arith_cmd (new); + { + new = make_word_list (make_word (exp ? exp : ""), (WORD_LIST *)NULL); + xtrace_print_arith_cmd (new); + dispose_words (new); + } - if (new) + if (exp) { - exp = new->next ? string_list (new) : new->word->word; - expresult = evalexp (exp, &expok); + eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED; + expresult = evalexp (exp, eflag, &expok); line_number = save_line_number; - if (exp != new->word->word) - free (exp); - dispose_words (new); + free (exp); } else { @@ -3210,12 +3869,16 @@ execute_arith_command (arith_command) static char * const nullstr = ""; +/* XXX - can COND ever be NULL when this is called? */ static int execute_cond_node (cond) COND_COM *cond; { - int result, invert, patmatch, rmatch, mflags, ignore; - char *arg1, *arg2; + int result, invert, patmatch, rmatch, arith, mode, mflags, ignore; + char *arg1, *arg2, *op; +#if 0 + char *t1, *t2; +#endif invert = (cond->flags & CMD_INVERT_RETURN); ignore = (cond->flags & CMD_IGNORE_RETURN); @@ -3243,41 +3906,66 @@ execute_cond_node (cond) } else if (cond->type == COND_UNARY) { + int oa, varop, varflag; + if (ignore) comsub_ignore_return++; - arg1 = cond_expand_word (cond->left->op, 0); + varop = STREQ (cond->op->word, "-v"); +#if defined (ARRAY_VARS) + varflag = (varop && valid_array_reference (cond->left->op->word, VA_NOEXPAND)) ? TEST_ARRAYEXP : 0; +#else + varflag = 0; +#endif + arg1 = cond_expand_word (cond->left->op, varop ? 3 : 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 defined (ARRAY_VARS) + if (varop) + oa = set_expand_once (0, 0); /* no-op for compatibility levels <= 51 */ +#endif + result = unary_test (cond->op->word, arg1, varflag) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; +#if defined (ARRAY_VARS) + if (varop) + assoc_expand_once = oa; +#endif 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')); + op = cond->op->word; + mode = 0; + patmatch = (((op[1] == '=') && (op[2] == '\0') && + (op[0] == '!' || op[0] == '=')) || + (op[0] == '=' && op[1] == '\0')); #if defined (COND_REGEXP) - rmatch = (cond->op->word[0] == '=' && cond->op->word[1] == '~' && - cond->op->word[2] == '\0'); + rmatch = (op[0] == '=' && op[1] == '~' && op[2] == '\0'); #endif + arith = STREQ (op, "-eq") || STREQ (op, "-ne") || STREQ (op, "-lt") || + STREQ (op, "-le") || STREQ (op, "-gt") || STREQ (op, "-ge"); + + if (arith) + mode = 3; + else if (rmatch && shell_compatibility_level > 31) + mode = 2; + else if (patmatch) + mode = 1; if (ignore) comsub_ignore_return++; - arg1 = cond_expand_word (cond->left->op, 0); + arg1 = cond_expand_word (cond->left->op, arith ? mode : 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)); + arg2 = cond_expand_word (cond->right->op, mode); if (ignore) comsub_ignore_return--; if (arg2 == 0) @@ -3294,18 +3982,24 @@ execute_cond_node (cond) mflags |= SHMAT_SUBEXP; #endif +#if 0 + t1 = strescape(arg1); + t2 = strescape(arg2); + itrace("execute_cond_node: sh_regmatch on `%s' and `%s'", t1, t2); + free(t1); + free(t2); +#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; + extended_glob = extglob_flag; } if (arg1 != nullstr) free (arg1); @@ -3331,18 +4025,21 @@ execute_cond_command (cond_command) { int retval, save_line_number; - retval = EXECUTION_SUCCESS; save_line_number = line_number; - this_command_name = "[["; - line_number = cond_command->line; + SET_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; + if (variable_context && interactive_shell && sourcelevel == 0) + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } command_string_index = 0; print_cond_command (cond_command); - if (signal_in_progress (DEBUG_TRAP) == 0) + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -3361,6 +4058,8 @@ execute_cond_command (cond_command) } #endif + this_command_name = "[["; /* ]] */ + #if 0 debug_print_cond_command (cond_command); #endif @@ -3380,7 +4079,8 @@ bind_lastarg (arg) if (arg == 0) arg = ""; var = bind_variable ("_", arg, 0); - VUNSETATTR (var, att_exported); + if (var) + VUNSETATTR (var, att_exported); } /* Execute a null command. Fork a subshell if the command uses pipes or is @@ -3392,17 +4092,22 @@ execute_null_command (redirects, pipe_in, pipe_out, async) int pipe_in, pipe_out, async; { int r; - int forcefork; + int forcefork, fork_flags; REDIRECT *rd; for (forcefork = 0, rd = redirects; rd; rd = rd->next) - forcefork += rd->rflags & REDIR_VARASSIGN; + { + forcefork += rd->rflags & REDIR_VARASSIGN; + /* Safety */ + forcefork += (rd->redirector.dest == 0 || fd_is_bash_input (rd->redirector.dest)) && (INPUT_REDIRECT (rd->instruction) || TRANSLATE_REDIRECT (rd->instruction) || rd->instruction == r_close_this); + } 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) + fork_flags = async ? FORK_ASYNC : 0; + if (make_child ((char *)NULL, fork_flags) == 0) { /* Cancel traps, in trap.c. */ restore_original_signals (); /* XXX */ @@ -3413,6 +4118,8 @@ execute_null_command (redirects, pipe_in, pipe_out, async) coproc_closeall (); #endif + interactive = 0; /* XXX */ + subshell_environment = 0; if (async) subshell_environment |= SUBSHELL_ASYNC; @@ -3428,7 +4135,8 @@ execute_null_command (redirects, pipe_in, pipe_out, async) { close_pipes (pipe_in, pipe_out); #if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) - unlink_fifo_list (); + if (pipe_out == NO_PIPE) + unlink_fifo_list (); #endif return (EXECUTION_SUCCESS); } @@ -3461,50 +4169,171 @@ static void fix_assignment_words (words) WORD_LIST *words; { - WORD_LIST *w; + WORD_LIST *w, *wcmd; struct builtin *b; - int assoc; + int assoc, global, array, integer; if (words == 0) return; b = 0; - assoc = 0; + assoc = global = array = integer = 0; - for (w = words; w; w = w->next) + /* Skip over assignment statements preceding a command name */ + wcmd = words; + for (wcmd = words; wcmd; wcmd = wcmd->next) + if ((wcmd->word->flags & W_ASSIGNMENT) == 0) + break; + /* Posix (post-2008) says that `command' doesn't change whether + or not the builtin it shadows is a `declaration command', even + though it removes other special builtin properties. In Posix + mode, we skip over one or more instances of `command' and + deal with the next word as the assignment builtin. */ + while (posixly_correct && wcmd && wcmd->word && wcmd->word->word && STREQ (wcmd->word->word, "command")) + wcmd = wcmd->next; + + for (w = wcmd; w; w = w->next) if (w->word->flags & W_ASSIGNMENT) { + /* Lazy builtin lookup, only do it if we find an assignment */ if (b == 0) { - b = builtin_address_internal (words->word->word, 0); + b = builtin_address_internal (wcmd->word->word, 0); if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0) return; else if (b && (b->flags & ASSIGNMENT_BUILTIN)) - words->word->flags |= W_ASSNBLTIN; + wcmd->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; + if (array) + w->word->flags |= W_ASSIGNARRAY; #endif + if (global) + w->word->flags |= W_ASSNGLOBAL; + + /* If we have an assignment builtin that does not create local variables, + make sure we create global variables even if we internally call + `declare'. The CHKLOCAL flag means to set attributes or values on + an existing local variable, if there is one. */ + if (b && ((b->flags & (ASSIGNMENT_BUILTIN|LOCALVAR_BUILTIN)) == ASSIGNMENT_BUILTIN)) + w->word->flags |= W_ASSNGLOBAL|W_CHKLOCAL; + else if (b && (b->flags & ASSIGNMENT_BUILTIN) && (b->flags & LOCALVAR_BUILTIN) && variable_context) + w->word->flags |= W_FORCELOCAL; } #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')) + else if (w->word->word[0] == '-' && (strpbrk (w->word->word+1, "Aag") != 0)) +#else + else if (w->word->word[0] == '-' && strchr (w->word->word+1, 'g')) +#endif { if (b == 0) { - b = builtin_address_internal (words->word->word, 0); + b = builtin_address_internal (wcmd->word->word, 0); if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0) return; else if (b && (b->flags & ASSIGNMENT_BUILTIN)) - words->word->flags |= W_ASSNBLTIN; + wcmd->word->flags |= W_ASSNBLTIN; } - if (words->word->flags & W_ASSNBLTIN) + if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'A')) assoc = 1; + else if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'a')) + array = 1; + if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'g')) + global = 1; } +} + +#if defined (ARRAY_VARS) +/* Set W_ARRAYREF on words that are valid array references to a builtin that + accepts them. This is intended to completely replace assoc_expand_once in + time. */ +static void +fix_arrayref_words (words) + WORD_LIST *words; +{ + WORD_LIST *w, *wcmd; + struct builtin *b; + + if (words == 0) + return; + + b = 0; + + /* Skip over assignment statements preceding a command name */ + wcmd = words; + for (wcmd = words; wcmd; wcmd = wcmd->next) + if ((wcmd->word->flags & W_ASSIGNMENT) == 0) + break; + + /* Skip over `command' */ + while (wcmd && wcmd->word && wcmd->word->word && STREQ (wcmd->word->word, "command")) + wcmd = wcmd->next; + + if (wcmd == 0) + return; + + /* If it's not an array reference builtin, we have nothing to do. */ + b = builtin_address_internal (wcmd->word->word, 0); + if (b == 0 || (b->flags & ARRAYREF_BUILTIN) == 0) + return; + + for (w = wcmd->next; w; w = w->next) + { + if (w->word && w->word->word && valid_array_reference (w->word->word, 0)) + w->word->flags |= W_ARRAYREF; + } +} +#endif + +#ifndef ISOPTION +# define ISOPTION(s, c) (s[0] == '-' && s[1] == c && s[2] == 0) +#endif + +#define RETURN_NOT_COMMAND() \ + do { if (typep) *typep = 0; return words; } while (0) + +/* Make sure we have `command [-p] command_name [args]', and handle skipping + over the usual `--' that ends the options. Returns the updated WORDS with + the command and options stripped and sets *TYPEP to a non-zero value. If + any other options are supplied, or there is not a command_name, we punt + and return a zero value in *TYPEP without updating WORDS. */ +static WORD_LIST * +check_command_builtin (words, typep) + WORD_LIST *words; + int *typep; +{ + int type; + WORD_LIST *w; + + w = words->next; + type = 1; + + if (w && ISOPTION (w->word->word, 'p')) /* command -p */ + { +#if defined (RESTRICTED_SHELL) + if (restricted) + RETURN_NOT_COMMAND(); #endif + w = w->next; + type = 2; + } + + if (w && ISOPTION (w->word->word, '-')) /* command [-p] -- */ + w = w->next; + else if (w && w->word->word[0] == '-') /* any other option */ + RETURN_NOT_COMMAND(); + + if (w == 0 || w->word->word == 0) /* must have a command_name */ + RETURN_NOT_COMMAND(); + + if (typep) + *typep = type; + return w; } /* Return 1 if the file found by searching $PATH for PATHNAME, defaulting @@ -3514,8 +4343,12 @@ is_dirname (pathname) char *pathname; { char *temp; - temp = search_for_command (pathname); - return (temp ? file_isdir (temp) : file_isdir (pathname)); + int ret; + + temp = search_for_command (pathname, 0); + ret = temp ? file_isdir (temp) : file_isdir (pathname); + free (temp); + return ret; } /* The meaty part of all the executions. We have to start hacking the @@ -3530,17 +4363,26 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) WORD_LIST *words, *lastword; char *command_line, *lastarg, *temp; int first_word_quoted, result, builtin_is_special, already_forked, dofork; + int fork_flags, cmdflags; pid_t old_last_async_pid; sh_builtin_func_t *builtin; SHELL_VAR *func; + volatile int old_builtin, old_command_builtin; result = EXECUTION_SUCCESS; special_builtin_failed = builtin_is_special = 0; command_line = (char *)0; + QUIT; + /* If we're in a function, update the line number information. */ if (variable_context && interactive_shell && sourcelevel == 0) - line_number -= function_line_number; + { + /* line numbers in a function start at 1 */ + line_number -= function_line_number - 1; + if (line_number <= 0) + line_number = 1; + } /* Remember what this command line looks like at invocation. */ command_string_index = 0; @@ -3566,13 +4408,15 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) return (EXECUTION_SUCCESS); #endif + cmdflags = simple_command->flags; + 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; + already_forked = 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 @@ -3590,18 +4434,22 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) if (dofork) { + char *p; + /* 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) + fork_flags = async ? FORK_ASYNC : 0; + if (make_child (p = savestring (the_printed_command_except_trap), fork_flags) == 0) { already_forked = 1; - simple_command->flags |= CMD_NO_FORK; + cmdflags |= CMD_NO_FORK; - subshell_environment = SUBSHELL_FORK; + /* We redo some of what make_child() does with SUBSHELL_IGNTRAP */ + subshell_environment = SUBSHELL_FORK|SUBSHELL_IGNTRAP; /* XXX */ if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) subshell_environment |= SUBSHELL_PIPE; if (async) @@ -3613,6 +4461,10 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) if (fds_to_close) close_fd_bitmap (fds_to_close); + /* If we fork because of an input pipe, note input pipe for later to + inhibit async commands from redirecting stdin from /dev/null */ + stdin_redir |= pipe_in != NO_PIPE; + do_piping (pipe_in, pipe_out); pipe_in = pipe_out = NO_PIPE; #if defined (COPROCESS_SUPPORT) @@ -3620,30 +4472,42 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) #endif last_asynchronous_pid = old_last_async_pid; + + if (async) + subshell_level++; /* not for pipes yet */ + +#if defined (JOB_CONTROL) + FREE (p); /* child doesn't use pointer */ +#endif } else { + /* Don't let simple commands that aren't the last command in a + pipeline change $? for the rest of the pipeline (or at all). */ + if (pipe_out != NO_PIPE) + result = last_command_exit_value; 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); } } + QUIT; /* XXX */ + /* 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) + if ((cmdflags & CMD_INHIBIT_EXPANSION) == 0) { current_fds_to_close = fds_to_close; fix_assignment_words (simple_command->words); +#if defined (ARRAY_VARS) + fix_arrayref_words (simple_command->words); +#endif /* Pass the ignore return flag down to command substitutions */ - if (simple_command->flags & CMD_IGNORE_RETURN) /* XXX */ + if (cmdflags & CMD_IGNORE_RETURN) /* XXX */ comsub_ignore_return++; words = expand_words (simple_command->words); - if (simple_command->flags & CMD_IGNORE_RETURN) + if (cmdflags & CMD_IGNORE_RETURN) comsub_ignore_return--; current_fds_to_close = (struct fd_bitmap *)NULL; } @@ -3660,7 +4524,7 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) pipe_in, pipe_out, already_forked ? 0 : async); if (already_forked) - exit (result); + sh_exit (result); else { bind_lastarg ((char *)NULL); @@ -3673,12 +4537,16 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) begin_unwind_frame ("simple-command"); - if (echo_command_at_execute) + if (echo_command_at_execute && (cmdflags & CMD_COMMAND_BUILTIN) == 0) xtrace_print_word_list (words, 1); builtin = (sh_builtin_func_t *)NULL; func = (SHELL_VAR *)NULL; - if ((simple_command->flags & CMD_NO_FUNCTIONS) == 0) + + /* This test is still here in case we want to change the command builtin + handler code below to recursively call execute_simple_command (after + modifying the simple_command struct). */ + if ((cmdflags & 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 @@ -3696,12 +4564,65 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) 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) + /* What happens in posix mode when an assignment preceding a command name + fails. This should agree with the code in execute_cmd.c: + do_assignment_statements(), even though I don't think it's executed any + more. */ + if (posixly_correct && tempenv_assign_error) { +#if defined (DEBUG) + /* I don't know if this clause is ever executed, so let's check */ +itrace("execute_simple_command: posix mode tempenv assignment error"); +#endif last_command_exit_value = EXECUTION_FAILURE; - jump_to_top_level (ERREXIT); +#if defined (STRICT_POSIX) + jump_to_top_level ((interactive_shell == 0) ? FORCE_EOF : DISCARD); +#else + if (interactive_shell == 0 && builtin_is_special) + jump_to_top_level (FORCE_EOF); + else if (interactive_shell == 0) + jump_to_top_level (DISCARD); /* XXX - maybe change later */ + else + jump_to_top_level (DISCARD); +#endif + } + tempenv_assign_error = 0; /* don't care about this any more */ + + /* This is where we handle the command builtin as a pseudo-reserved word + prefix. This allows us to optimize away forks if we can. */ + old_command_builtin = -1; + if (builtin == 0 && func == 0) + { + WORD_LIST *disposer, *l; + int cmdtype; + + builtin = find_shell_builtin (words->word->word); + while (builtin == command_builtin) + { + disposer = words; + cmdtype = 0; + words = check_command_builtin (words, &cmdtype); + if (cmdtype > 0) /* command -p [--] words */ + { + for (l = disposer; l->next != words; l = l->next) + ; + l->next = 0; + dispose_words (disposer); + cmdflags |= CMD_COMMAND_BUILTIN | CMD_NO_FUNCTIONS; + if (cmdtype == 2) + cmdflags |= CMD_STDPATH; + builtin = find_shell_builtin (words->word->word); + } + else + break; + } + if (cmdflags & CMD_COMMAND_BUILTIN) + { + old_command_builtin = executing_command_builtin; + unwind_protect_int (executing_command_builtin); + executing_command_builtin |= 1; + } + builtin = 0; } add_unwind_protect (dispose_words, words); @@ -3723,7 +4644,7 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) goto return_result; } - /* One other possiblilty. The user may want to resume an existing job. + /* One other possibililty. 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 && @@ -3778,41 +4699,77 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) if (builtin || func) { if (builtin) - unwind_protect_int (executing_builtin); /* modified in execute_builtin */ + { + old_builtin = executing_builtin; + unwind_protect_int (executing_builtin); /* modified in execute_builtin */ + if (old_command_builtin == -1) /* sentinel, can be set above */ + { + old_command_builtin = executing_command_builtin; + unwind_protect_int (executing_command_builtin); /* ditto and set above */ + } + } if (already_forked) { /* reset_terminating_signals (); */ /* XXX */ - /* Cancel traps, in trap.c. */ - restore_original_signals (); + /* Reset the signal handlers in the child, but don't free the + trap strings. Set a flag noting that we have to free the + trap strings if we run trap to change a signal disposition. */ + reset_signal_handlers (); + subshell_environment |= SUBSHELL_RESETTRAP; + subshell_environment &= ~SUBSHELL_IGNTRAP; if (async) { - if ((simple_command->flags & CMD_STDIN_REDIR) && + if ((cmdflags & CMD_STDIN_REDIR) && pipe_in == NO_PIPE && (stdin_redirects (simple_command->redirects) == 0)) async_redirect_stdin (); setup_async_signals (); } - subshell_level++; + if (async == 0) + subshell_level++; execute_subshell_builtin_or_function (words, simple_command->redirects, builtin, func, pipe_in, pipe_out, async, fds_to_close, - simple_command->flags); + cmdflags); subshell_level--; } else { result = execute_builtin_or_function (words, builtin, func, simple_command->redirects, fds_to_close, - simple_command->flags); + cmdflags); if (builtin) { if (result > EX_SHERRBASE) { + switch (result) + { + case EX_REDIRFAIL: + case EX_BADASSIGN: + case EX_EXPFAIL: + /* These errors cause non-interactive posix mode shells to exit */ + if (posixly_correct && builtin_is_special && interactive_shell == 0) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (ERREXIT); + } + break; + case EX_DISKFALLBACK: + /* XXX - experimental */ + executing_builtin = old_builtin; + executing_command_builtin = old_command_builtin; + builtin = 0; + + /* The redirections have already been `undone', so this + will have to do them again. But piping is forever. */ + pipe_in = pipe_out = -1; + goto execute_from_filesystem; + } result = builtin_status (result); if (builtin_is_special) - special_builtin_failed = 1; + special_builtin_failed = 1; /* XXX - take command builtin into account? */ } /* In POSIX mode, if there are assignment statements preceding a special builtin, they persist after the builtin @@ -3825,7 +4782,7 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) if (result == EX_USAGE) result = EX_BADUSAGE; else if (result > EX_SHERRBASE) - result = EXECUTION_FAILURE; + result = builtin_status (result); } set_pipestatus_from_exit (result); @@ -3836,27 +4793,37 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) if (autocd && interactive && words->word && is_dirname (words->word->word)) { + words = make_word_list (make_word ("--"), words); words = make_word_list (make_word ("cd"), words); xtrace_print_word_list (words, 0); + func = find_function ("cd"); goto run_builtin; } +execute_from_filesystem: if (command_line == 0) - command_line = savestring (the_printed_command_except_trap); + command_line = savestring (the_printed_command_except_trap ? 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; + /* The old code did not test already_forked and only did this if + subshell_environment&SUBSHELL_COMSUB != 0 (comsubs and procsubs). Other + uses of the no-fork optimization left FIFOs in $TMPDIR */ + if (already_forked == 0 && (cmdflags & CMD_NO_FORK) && fifos_pending() > 0) + cmdflags &= ~CMD_NO_FORK; #endif - - execute_disk_command (words, simple_command->redirects, command_line, + result = execute_disk_command (words, simple_command->redirects, command_line, pipe_in, pipe_out, async, fds_to_close, - simple_command->flags); + cmdflags); return_result: bind_lastarg (lastarg); FREE (command_line); dispose_words (words); + if (builtin) + { + executing_builtin = old_builtin; + executing_command_builtin = old_command_builtin; + } discard_unwind_frame ("simple-command"); this_command_name = (char *)NULL; /* points to freed memory now */ return (result); @@ -3873,16 +4840,17 @@ builtin_status (result) switch (result) { case EX_USAGE: + case EX_BADSYNTAX: r = EX_BADUSAGE; break; case EX_REDIRFAIL: - case EX_BADSYNTAX: case EX_BADASSIGN: case EX_EXPFAIL: r = EXECUTION_FAILURE; break; default: - r = EXECUTION_SUCCESS; + /* other special exit statuses not yet defined */ + r = (result > EX_SHERRBASE) ? EXECUTION_FAILURE : EXECUTION_SUCCESS; break; } return (r); @@ -3894,17 +4862,13 @@ execute_builtin (builtin, words, flags, subshell) WORD_LIST *words; int flags, subshell; { - int old_e_flag, result, eval_unwind; - int isbltinenv; + int result, eval_unwind, ignexit_flag; + int isbltinenv, should_keep; char *error_trap; -#if 0 - /* XXX -- added 12/11 */ - terminate_immediately++; -#endif - error_trap = 0; - old_e_flag = exit_immediately_on_error; + should_keep = 0; + /* 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 @@ -3913,10 +4877,11 @@ execute_builtin (builtin, words, flags, subshell) 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)) + (builtin == eval_builtin || (flags & CMD_COMMAND_BUILTIN) || builtin == source_builtin)) { begin_unwind_frame ("eval_builtin"); unwind_protect_int (exit_immediately_on_error); + unwind_protect_int (builtin_ignoring_errexit); error_trap = TRAP_STRING (ERROR_TRAP); if (error_trap) { @@ -3926,6 +4891,8 @@ execute_builtin (builtin, words, flags, subshell) restore_default_signal (ERROR_TRAP); } exit_immediately_on_error = 0; + ignexit_flag = builtin_ignoring_errexit; + builtin_ignoring_errexit = 1; eval_unwind = 1; } else @@ -3933,9 +4900,21 @@ execute_builtin (builtin, words, flags, subshell) /* 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); + problem only with the `unset', `source' and `eval' builtins. + `mapfile' is a special case because it uses evalstring (same as + eval or source) to run its callbacks. */ + /* SHOULD_KEEP is for the pop_scope call below; it only matters when + posixly_correct is set, but we should propagate the temporary environment + to the enclosing environment only for special builtins. */ + isbltinenv = (builtin == source_builtin || builtin == eval_builtin || builtin == unset_builtin || builtin == mapfile_builtin); + should_keep = isbltinenv && builtin != mapfile_builtin; +#if defined (HISTORY) && defined (READLINE) + if (builtin == fc_builtin || builtin == read_builtin) + { + isbltinenv = 1; + should_keep = 0; + } +#endif if (isbltinenv) { @@ -3945,23 +4924,53 @@ execute_builtin (builtin, words, flags, subshell) if (temporary_env) { push_scope (VC_BLTNENV, temporary_env); + if (flags & CMD_COMMAND_BUILTIN) + should_keep = 0; if (subshell == 0) - add_unwind_protect (pop_scope, (flags & CMD_COMMAND_BUILTIN) ? 0 : "1"); + add_unwind_protect (pop_scope, should_keep ? "1" : 0); temporary_env = (HASH_TABLE *)NULL; } } + if (subshell == 0 && builtin == eval_builtin) + { + if (evalnest_max > 0 && evalnest >= evalnest_max) + { + internal_error (_("eval: maximum eval nesting level exceeded (%d)"), evalnest); + evalnest = 0; + jump_to_top_level (DISCARD); + } + unwind_protect_int (evalnest); + /* The test for subshell == 0 above doesn't make a difference */ + evalnest++; /* execute_subshell_builtin_or_function sets this to 0 */ + } + else if (subshell == 0 && builtin == source_builtin) + { + if (sourcenest_max > 0 && sourcenest >= sourcenest_max) + { + internal_error (_("%s: maximum source nesting level exceeded (%d)"), this_command_name, sourcenest); + sourcenest = 0; + jump_to_top_level (DISCARD); + } + unwind_protect_int (sourcenest); + /* The test for subshell == 0 above doesn't make a difference */ + sourcenest++; /* execute_subshell_builtin_or_function sets this to 0 */ + } + /* `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) + table, since `return' is a POSIX special builtin. We don't do this if + it's being run by the `command' builtin, since that's supposed to inhibit + the special builtin properties. */ + if (posixly_correct && subshell == 0 && builtin == return_builtin && (flags & CMD_COMMAND_BUILTIN) == 0 && temporary_env) { begin_unwind_frame ("return_temp_env"); add_unwind_protect (merge_temporary_env, (char *)NULL); } executing_builtin++; + executing_command_builtin |= builtin == command_builtin; result = ((*builtin) (words->next)); /* This shouldn't happen, but in case `return' comes back instead of @@ -3974,23 +4983,52 @@ execute_builtin (builtin, words, flags, subshell) if (eval_unwind) { - exit_immediately_on_error += old_e_flag; + builtin_ignoring_errexit = ignexit_flag; + exit_immediately_on_error = builtin_ignoring_errexit ? 0 : errexit_flag; if (error_trap) { set_error_trap (error_trap); - xfree (error_trap); + free (error_trap); } discard_unwind_frame ("eval_builtin"); } -#if 0 - /* XXX -- added 12/11 */ - terminate_immediately--; -#endif - return (result); } +static void +maybe_restore_getopt_state (gs) + sh_getopt_state_t *gs; +{ + /* If we have a local copy of OPTIND and it's at the right (current) + context, then we restore getopt's internal state. If not, we just + let it go. We know there is a local OPTIND if gs->gs_flags & 1. + This is set below in execute_function() before the context is run. */ + if (gs->gs_flags & 1) + sh_getopt_restore_istate (gs); + else + free (gs); +} + +#if defined (ARRAY_VARS) +void +restore_funcarray_state (fa) + struct func_array_state *fa; +{ + SHELL_VAR *nfv; + ARRAY *funcname_a; + + array_pop (fa->source_a); + array_pop (fa->lineno_a); + + GET_ARRAY_FROM_VAR ("FUNCNAME", nfv, funcname_a); + if (nfv == fa->funcname_v) + array_pop (funcname_a); + + free (fa); +} +#endif + static int execute_function (var, words, flags, fds_to_close, async, subshell) SHELL_VAR *var; @@ -3999,25 +5037,29 @@ execute_function (var, words, flags, fds_to_close, async, subshell) struct fd_bitmap *fds_to_close; int async, subshell; { - int return_val, result; + int return_val, result, lineno; 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; + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a; + volatile ARRAY *bash_source_a; + volatile ARRAY *bash_lineno_a; + struct func_array_state *fa; #endif FUNCTION_DEF *shell_fn; char *sfile, *t; + sh_getopt_state_t *gs; + SHELL_VAR *gv; 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); + internal_error (_("%s: maximum function nesting level exceeded (%d)"), var->name, funcnest); + funcnest = 0; /* XXX - should we reset it somewhere else? */ jump_to_top_level (DISCARD); } -#endif #if defined (ARRAY_VARS) GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); @@ -4029,18 +5071,36 @@ execute_function (var, words, flags, fds_to_close, async, subshell) if (tc && (flags & CMD_IGNORE_RETURN)) tc->flags |= CMD_IGNORE_RETURN; + /* A limited attempt at optimization: shell functions at the end of command + substitutions that are already marked NO_FORK. */ + if (tc && (flags & CMD_NO_FORK) && (subshell_environment & SUBSHELL_COMSUB)) + optimize_shell_function (tc); + + gs = sh_getopt_save_istate (); if (subshell == 0) { begin_unwind_frame ("function_calling"); + /* If the shell is in posix mode, this will push the variables in + the temporary environment to the "current shell environment" (the + global scope), and dispose the temporary env before setting it to + NULL later. This behavior has disappeared from the latest edition + of the standard, so I will eventually remove it from variables.c: + push_var_context. */ push_context (var->name, subshell, temporary_env); + /* This has to be before the pop_context(), because the unwinding of + local variables may cause the restore of a local declaration of + OPTIND to force a getopts state reset. */ + add_unwind_protect (maybe_restore_getopt_state, gs); add_unwind_protect (pop_context, (char *)NULL); unwind_protect_int (line_number); + unwind_protect_int (line_number_for_err_trap); + unwind_protect_int (function_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); + unwind_protect_int (loop_level); } else push_context (var->name, subshell, temporary_env); /* don't unwind-protect for subshells */ @@ -4067,7 +5127,7 @@ execute_function (var, words, flags, fds_to_close, async, subshell) { debug_trap = savestring (debug_trap); add_unwind_protect (xfree, debug_trap); - add_unwind_protect (set_debug_trap, debug_trap); + add_unwind_protect (maybe_set_debug_trap, debug_trap); } restore_default_signal (DEBUG_TRAP); } @@ -4079,24 +5139,20 @@ execute_function (var, words, flags, fds_to_close, async, subshell) { error_trap = savestring (error_trap); add_unwind_protect (xfree, error_trap); - add_unwind_protect (set_error_trap, error_trap); + add_unwind_protect (maybe_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); + add_unwind_protect (maybe_set_return_trap, return_trap); } restore_default_signal (RETURN_TRAP); } @@ -4106,22 +5162,44 @@ execute_function (var, words, flags, fds_to_close, async, subshell) /* 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 ((ARRAY *)funcname_a, this_shell_function->name); - array_push (bash_source_a, sfile); - t = itos (executing_line_number ()); - array_push (bash_lineno_a, t); + array_push ((ARRAY *)bash_source_a, sfile); + lineno = GET_LINE_NUMBER (); + t = itos (lineno); + array_push ((ARRAY *)bash_lineno_a, t); free (t); #endif +#if defined (ARRAY_VARS) + fa = (struct func_array_state *)xmalloc (sizeof (struct func_array_state)); + fa->source_a = (ARRAY *)bash_source_a; + fa->source_v = bash_source_v; + fa->lineno_a = (ARRAY *)bash_lineno_a; + fa->lineno_v = bash_lineno_v; + fa->funcname_a = (ARRAY *)funcname_a; + fa->funcname_v = funcname_v; + if (subshell == 0) + add_unwind_protect (restore_funcarray_state, fa); +#endif + /* The temporary environment for a function is supposed to apply to all commands executed within the function body. */ + /* Initialize BASH_ARGC and BASH_ARGV before we blow away the positional + parameters */ + if (debugging_mode || shell_compatibility_level <= 44) + init_bash_argv (); + remember_args (words->next, 1); /* Update BASH_ARGV and BASH_ARGC */ if (debugging_mode) - push_args (words->next); + { + push_args (words->next); + if (subshell == 0) + add_unwind_protect (pop_args, 0); + } /* Number of the line on which the function body starts. */ line_number = function_line_number = tc->line; @@ -4131,17 +5209,23 @@ execute_function (var, words, flags, fds_to_close, async, subshell) stop_pipeline (async, (COMMAND *)NULL); #endif + if (shell_compatibility_level > 43) + loop_level = 0; + fc = tc; + from_return_trap = 0; + return_catch_flag++; - return_val = setjmp (return_catch); + return_val = setjmp_nosigs (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 (); + if (from_return_trap == 0) + run_return_trap (); currently_executing_command = save_current; } else @@ -4175,26 +5259,23 @@ execute_function (var, words, flags, fds_to_close, async, subshell) showing_function_line = 0; } - /* Restore BASH_ARGC and BASH_ARGV */ - if (debugging_mode) - pop_args (); + /* If we have a local copy of OPTIND, note it in the saved getopts state. */ + gv = find_variable ("OPTIND"); + if (gv && gv->context == variable_context) + gs->gs_flags |= 1; 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); + else + { + restore_funcarray_state (fa); + /* Restore BASH_ARGC and BASH_ARGV */ + if (debugging_mode) + pop_args (); + } #endif - + if (variable_context == 0 || this_shell_function == 0) { make_funcname_visible (0); @@ -4202,7 +5283,7 @@ execute_function (var, words, flags, fds_to_close, async, subshell) unlink_fifo_list (); #endif } - + return (result); } @@ -4256,6 +5337,10 @@ execute_subshell_builtin_or_function (words, redirects, builtin, var, /* A subshell is neither a login shell nor interactive. */ login_shell = interactive = 0; + if (builtin == eval_builtin) + evalnest = 0; + else if (builtin == source_builtin) + sourcenest = 0; if (async) subshell_environment |= SUBSHELL_ASYNC; @@ -4276,6 +5361,8 @@ execute_subshell_builtin_or_function (words, redirects, builtin, var, without_job_control (); set_sigchld_handler (); +#else + without_job_control (); #endif /* JOB_CONTROL */ set_sigint_handler (); @@ -4292,34 +5379,43 @@ execute_subshell_builtin_or_function (words, redirects, builtin, var, { /* Give builtins a place to jump back to on failure, so we don't go back up to main(). */ - result = setjmp (top_level); + result = setjmp_nosigs (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); + funcvalue = setjmp_nosigs (return_catch); - if (result == EXITPROG) - exit (last_command_exit_value); + if (result == EXITPROG || result == EXITBLTIN) + subshell_exit (last_command_exit_value); else if (result) - exit (EXECUTION_FAILURE); + subshell_exit (EXECUTION_FAILURE); else if (funcvalue) - exit (return_catch_value); + subshell_exit (return_catch_value); else { r = execute_builtin (builtin, words, flags, 1); fflush (stdout); if (r == EX_USAGE) r = EX_BADUSAGE; - exit (r); + /* XXX - experimental */ + else if (r == EX_DISKFALLBACK) + { + char *command_line; + + command_line = savestring (the_printed_command_except_trap ? the_printed_command_except_trap : ""); + r = execute_disk_command (words, (REDIRECT *)0, command_line, + -1, -1, async, (struct fd_bitmap *)0, flags|CMD_NO_FORK); + } + subshell_exit (r); } } else { r = execute_function (var, words, flags, fds_to_close, async, 1); fflush (stdout); - exit (r); + subshell_exit (r); } } @@ -4343,17 +5439,31 @@ execute_builtin_or_function (words, builtin, var, redirects, { int result; REDIRECT *saved_undo_list; - sh_builtin_func_t *saved_this_shell_builtin; +#if defined (PROCESS_SUBSTITUTION) + int ofifo, nfifo, osize; + void *ofifo_list; +#endif + +#if defined (PROCESS_SUBSTITUTION) + begin_unwind_frame ("saved_fifos"); + /* If we return, we longjmp and don't get a chance to restore the old + fifo list, so we add an unwind protect to free it */ + ofifo = num_fifos (); + ofifo_list = copy_fifo_list (&osize); + if (ofifo_list) + add_unwind_protect (xfree, ofifo_list); +#endif if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0) { - cleanup_redirects (redirection_undo_list); - redirection_undo_list = (REDIRECT *)NULL; + undo_partial_redirects (); dispose_exec_redirects (); +#if defined (PROCESS_SUBSTITUTION) + free (ofifo_list); +#endif 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. */ @@ -4368,7 +5478,7 @@ execute_builtin_or_function (words, builtin, var, redirects, if (saved_undo_list) { - begin_unwind_frame ("saved redirects"); + begin_unwind_frame ("saved-redirects"); add_unwind_protect (cleanup_redirects, (char *)saved_undo_list); } @@ -4393,24 +5503,37 @@ execute_builtin_or_function (words, builtin, var, redirects, and preserve the redirections. */ if (builtin == command_builtin && this_shell_builtin == exec_builtin) { + int discard; + + discard = 0; if (saved_undo_list) - dispose_redirects (saved_undo_list); + { + dispose_redirects (saved_undo_list); + discard = 1; + } redirection_undo_list = exec_redirection_undo_list; saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL; - discard_unwind_frame ("saved_redirects"); + if (discard) + discard_unwind_frame ("saved-redirects"); } if (saved_undo_list) { redirection_undo_list = saved_undo_list; - discard_unwind_frame ("saved redirects"); + discard_unwind_frame ("saved-redirects"); } - if (redirection_undo_list) - { - cleanup_redirects (redirection_undo_list); - redirection_undo_list = (REDIRECT *)NULL; - } + undo_partial_redirects (); + +#if defined (PROCESS_SUBSTITUTION) + /* Close any FIFOs created by this builtin or function. */ + nfifo = num_fifos (); + if (nfifo > ofifo) + close_new_fifos (ofifo_list, osize); + if (ofifo_list) + free (ofifo_list); + discard_unwind_frame ("saved_fifos"); +#endif return (result); } @@ -4426,10 +5549,15 @@ setup_async_signals () if (job_control == 0) #endif { + /* Make sure we get the original signal dispositions now so we don't + confuse the trap builtin later if the subshell tries to use it to + reset SIGINT/SIGQUIT. Don't call set_signal_ignored; that sets + the value of original_signals to SIG_IGN. Posix interpretation 751. */ + get_original_signal (SIGINT); set_signal_handler (SIGINT, SIG_IGN); - set_signal_ignored (SIGINT); + + get_original_signal (SIGQUIT); set_signal_handler (SIGQUIT, SIG_IGN); - set_signal_ignored (SIGQUIT); } } @@ -4457,7 +5585,7 @@ setup_async_signals () # define NOTFOUND_HOOK "command_not_found_handle" #endif -static void +static int execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, async, fds_to_close, cmdflags) WORD_LIST *words; @@ -4467,22 +5595,25 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, struct fd_bitmap *fds_to_close; int cmdflags; { - char *pathname, *command, **args; - int nofork; + char *pathname, *command, **args, *p; + int nofork, stdpath, result, fork_flags; pid_t pid; SHELL_VAR *hookf; WORD_LIST *wl; - nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */ + stdpath = (cmdflags & CMD_STDPATH); /* use command -p path */ + nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */ pathname = words->word->word; + p = 0; + result = EXECUTION_SUCCESS; #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; + result = 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). */ @@ -4493,10 +5624,21 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, } #endif /* RESTRICTED_SHELL */ - command = search_for_command (pathname); + /* If we want to change this so `command -p' (CMD_STDPATH) does not insert + any pathname it finds into the hash table, it should read + command = search_for_command (pathname, stdpath ? CMDSRCH_STDPATH : CMDSRCH_HASH); + */ + command = search_for_command (pathname, CMDSRCH_HASH|(stdpath ? CMDSRCH_STDPATH : 0)); + QUIT; if (command) { + /* If we're optimizing out the fork (implicit `exec'), decrement the + shell level like `exec' would do. Don't do this if we are already + in a pipeline environment, assuming it's already been done. */ + if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE && (subshell_environment & SUBSHELL_PIPE) == 0) + adjust_shell_level (-1); + maybe_make_export_env (); put_command_name_into_env (command); } @@ -4508,22 +5650,23 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE) pid = 0; else - pid = make_child (savestring (command_line), async); + { + fork_flags = async ? FORK_ASYNC : 0; + pid = make_child (p = savestring (command_line), fork_flags); + } 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 - + reset_terminating_signals (); /* XXX */ /* Cancel traps, in trap.c. */ restore_original_signals (); + subshell_environment &= ~SUBSHELL_IGNTRAP; + +#if defined (JOB_CONTROL) + FREE (p); +#endif /* restore_original_signals may have undone the work done by make_child to ensure that SIGINT and SIGQUIT are ignored @@ -4551,18 +5694,30 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, if (async) interactive = 0; - subshell_environment = SUBSHELL_FORK; + subshell_environment |= SUBSHELL_FORK; /* XXX - was just = */ + +#if defined (PROCESS_SUBSTITUTION) && !defined (HAVE_DEV_FD) + clear_fifo_list (); /* XXX - we haven't created any FIFOs */ +#endif + /* reset shell_pgrp to pipeline_pgrp here for word expansions performed + by the redirections here? */ 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 (); + unlink_all_fifos (); #endif /* PROCESS_SUBSTITUTION */ exit (EXECUTION_FAILURE); } +#if defined (PROCESS_SUBSTITUTION) && !defined (HAVE_DEV_FD) + /* This should only contain FIFOs created as part of redirection + expansion. */ + unlink_all_fifos (); +#endif + if (async) interactive = old_interactive; @@ -4571,10 +5726,21 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, hookf = find_function (NOTFOUND_HOOK); if (hookf == 0) { + /* Make sure filenames are displayed using printable characters */ + pathname = printable_filename (pathname, 0); invalid_cmd (_("\n Invalid command: [%s]\n"), pathname); exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ } + /* We don't want to manage process groups for processes we start + from here, so we turn off job control and don't attempt to + manipulate the terminal's process group. */ + without_job_control (); + +#if defined (JOB_CONTROL) + set_sigchld_handler (); +#endif + wl = make_word_list (make_word (NOTFOUND_HOOK), words); exit (execute_shell_function (hookf, wl)); } @@ -4588,13 +5754,18 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, else { parent_return: + QUIT; + /* 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 0 if (variable_context == 0) unlink_fifo_list (); +#endif #endif FREE (command); + return (result); } } @@ -4716,9 +5887,10 @@ initialize_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 (); + +#if defined (JOB_CONTROL) set_sigchld_handler (); init_job_stats (); #endif /* JOB_CONTROL */ @@ -4741,7 +5913,7 @@ initialize_subshell () 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; + variable_context = return_catch_flag = funcnest = evalnest = sourcenest = 0; executing_list = 0; /* XXX */ @@ -4757,13 +5929,15 @@ initialize_subshell () # define SETOSTYPE(x) #endif +#define HASH_BANG_BUFSIZ 128 + #define READ_SAMPLE_BUF(file, buf, len) \ do \ { \ fd = open(file, O_RDONLY); \ if (fd >= 0) \ { \ - len = read (fd, buf, 80); \ + len = read (fd, buf, HASH_BANG_BUFSIZ); \ close (fd); \ } \ else \ @@ -4779,7 +5953,7 @@ shell_execve (command, args, env) char **args, **env; { int larray, i, fd; - char sample[80]; + char sample[HASH_BANG_BUFSIZ]; int sample_len; SETOSTYPE (0); /* Some systems use for USG/POSIX semantics */ @@ -4792,8 +5966,14 @@ shell_execve (command, args, env) Maybe it is something we can hack ourselves. */ if (i != ENOEXEC) { + /* make sure this is set correctly for file_error/report_error */ + last_command_exit_value = (i == ENOENT) ? EX_NOTFOUND : EX_NOEXEC; /* XXX Posix.2 says that exit status is 126 */ if (file_isdir (command)) +#if defined (EISDIR) + internal_error (_("%s: %s"), command, strerror (EISDIR)); +#else internal_error (_("%s: is a directory"), command); +#endif else if (executable_file (command) == 0) { errno = i; @@ -4805,12 +5985,19 @@ shell_execve (command, args, env) errno = i; file_error (command); } + else if (i == ENOENT) + { + errno = i; + internal_error (_("%s: cannot execute: required file not found"), 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 > 0) + sample[sample_len - 1] = '\0'; if (sample_len > 2 && sample[0] == '#' && sample[1] == '!') { char *interp; @@ -4834,7 +6021,7 @@ shell_execve (command, args, env) errno = i; file_error (command); } - return ((i == ENOENT) ? EX_NOTFOUND : EX_NOEXEC); /* XXX Posix.2 says that exit status is 126 */ + return (last_command_exit_value); } /* This file is executable. @@ -4852,7 +6039,7 @@ shell_execve (command, args, env) 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 + being the size of the BSD exec header), but we allow up to 128 characters. */ if (sample_len > 0) { @@ -4863,7 +6050,8 @@ shell_execve (command, args, env) #endif if (check_binary_file (sample, sample_len)) { - internal_error (_("%s: cannot execute binary file"), command); + internal_error (_("%s: cannot execute binary file: %s"), command, strerror (i)); + errno = i; return (EX_BINARY_FILE); } } @@ -4871,6 +6059,7 @@ shell_execve (command, args, env) /* We have committed to attempting to execute the contents of this file as shell commands. */ + reset_parser (); initialize_subshell (); set_sigint_handler (); @@ -4911,16 +6100,21 @@ shell_execve (command, args, env) unbind_args (); /* remove the positional parameters */ - longjmp (subshell_top_level, 1); +#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD) + clear_fifo_list (); /* pipe fds are what they are now */ +#endif + + sh_longjmp (subshell_top_level, 1); /*NOTREACHED*/ } static int -execute_intern_function (name, function) +execute_intern_function (name, funcdef) WORD_DESC *name; - COMMAND *function; + FUNCTION_DEF *funcdef; { SHELL_VAR *var; + char *t; if (check_identifier (name, posixly_correct) == 0) { @@ -4932,6 +6126,21 @@ execute_intern_function (name, function) return (EXECUTION_FAILURE); } + if (strchr (name->word, CTLESC)) /* WHY? */ + { + t = dequote_escapes (name->word); + free (name->word); + name->word = t; + } + + /* Posix interpretation 383 */ + if (posixly_correct && find_special_builtin (name->word)) + { + internal_error (_("`%s': is a special builtin"), name->word); + last_command_exit_value = EX_BADUSAGE; + jump_to_top_level (interactive_shell ? DISCARD : ERREXIT); + } + var = find_function (name->word); if (var && (readonly_p (var) || noassign_p (var))) { @@ -4940,7 +6149,11 @@ execute_intern_function (name, function) return (EXECUTION_FAILURE); } - bind_function (name->word, function); +#if defined (DEBUGGER) + bind_function_def (name->word, funcdef, 1); +#endif + + bind_function (name->word, funcdef->command); return (EXECUTION_SUCCESS); } @@ -4990,6 +6203,10 @@ do_piping (pipe_in, pipe_out) dup_error (pipe_in, 0); if (pipe_in > 0) close (pipe_in); +#ifdef __CYGWIN__ + /* Let stdio know the fd may have changed from text to binary mode. */ + freopen (NULL, "r", stdin); +#endif /* __CYGWIN__ */ } if (pipe_out != NO_PIPE) { @@ -5005,5 +6222,11 @@ do_piping (pipe_in, pipe_out) if (dup2 (1, 2) < 0) dup_error (1, 2); } +#ifdef __CYGWIN__ + /* Let stdio know the fd may have changed from text to binary mode, and + make sure to preserve stdout line buffering. */ + freopen (NULL, "w", stdout); + sh_setlinebuf (stdout); +#endif /* __CYGWIN__ */ } } diff --git a/execute_cmd.h b/execute_cmd.h index 67ae93a..465030a 100644 --- a/execute_cmd.h +++ b/execute_cmd.h @@ -1,6 +1,6 @@ /* execute_cmd.h - functions from execute_cmd.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2017 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,46 +23,101 @@ #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 *)); +#if defined (ARRAY_VARS) +struct func_array_state + { + ARRAY *funcname_a; + SHELL_VAR *funcname_v; + ARRAY *source_a; + SHELL_VAR *source_v; + ARRAY *lineno_a; + SHELL_VAR *lineno_v; + }; +#endif -extern void coproc_setvars __P((struct coproc *)); -extern void coproc_unsetvars __P((struct coproc *)); +/* Placeholder for later expansion to include more execution state */ +/* XXX - watch out for pid_t */ +struct execstate + { + pid_t pid; + int subshell_env; + }; + + +/* Variables declared in execute_cmd.c, used by many other files */ +extern int return_catch_flag; +extern int return_catch_value; +extern volatile int last_command_exit_value; +extern int last_command_exit_signal; +extern int builtin_ignoring_errexit; +extern int executing_builtin; +extern int executing_list; +extern int comsub_ignore_return; +extern int subshell_level; +extern int match_ignore_case; +extern int executing_command_builtin; +extern int funcnest, funcnest_max; +extern int evalnest, evalnest_max; +extern int sourcenest, sourcenest_max; +extern int stdin_redir; +extern int line_number_for_err_trap; + +extern char *the_printed_command_except_trap; + +extern char *this_command_name; +extern SHELL_VAR *this_shell_function; + +/* Functions declared in execute_cmd.c, used by many other files */ + +extern struct fd_bitmap *new_fd_bitmap PARAMS((int)); +extern void dispose_fd_bitmap PARAMS((struct fd_bitmap *)); +extern void close_fd_bitmap PARAMS((struct fd_bitmap *)); +extern int executing_line_number PARAMS((void)); +extern int execute_command PARAMS((COMMAND *)); +extern int execute_command_internal PARAMS((COMMAND *, int, int, int, struct fd_bitmap *)); +extern int shell_execve PARAMS((char *, char **, char **)); +extern void setup_async_signals PARAMS((void)); +extern void async_redirect_stdin PARAMS((void)); + +extern void undo_partial_redirects PARAMS((void)); +extern void dispose_partial_redirects PARAMS((void)); +extern void dispose_exec_redirects PARAMS((void)); + +extern int execute_shell_function PARAMS((SHELL_VAR *, WORD_LIST *)); + +extern struct coproc *getcoprocbypid PARAMS((pid_t)); +extern struct coproc *getcoprocbyname PARAMS((const char *)); + +extern void coproc_init PARAMS((struct coproc *)); +extern struct coproc *coproc_alloc PARAMS((char *, pid_t)); +extern void coproc_dispose PARAMS((struct coproc *)); +extern void coproc_flush PARAMS((void)); +extern void coproc_close PARAMS((struct coproc *)); +extern void coproc_closeall PARAMS((void)); +extern void coproc_reap PARAMS((void)); +extern pid_t coproc_active PARAMS((void)); + +extern void coproc_rclose PARAMS((struct coproc *, int)); +extern void coproc_wclose PARAMS((struct coproc *, int)); +extern void coproc_fdclose PARAMS((struct coproc *, int)); + +extern void coproc_checkfd PARAMS((struct coproc *, int)); +extern void coproc_fdchk PARAMS((int)); + +extern void coproc_pidchk PARAMS((pid_t, int)); + +extern void coproc_fdsave PARAMS((struct coproc *)); +extern void coproc_fdrestore PARAMS((struct coproc *)); + +extern void coproc_setvars PARAMS((struct coproc *)); +extern void coproc_unsetvars PARAMS((struct coproc *)); #if defined (PROCESS_SUBSTITUTION) -extern void close_all_files __P((void)); +extern void close_all_files PARAMS((void)); +#endif + +#if defined (ARRAY_VARS) +extern void restore_funcarray_state PARAMS((struct func_array_state *)); #endif #endif /* _EXECUTE_CMD_H_ */ diff --git a/expr.c b/expr.c index 446e678..66e120d 100644 --- a/expr.c +++ b/expr.c @@ -1,6 +1,6 @@ /* expr.c -- arithmetic expression evaluation. */ -/* Copyright (C) 1990-2009 Free Software Foundation, Inc. +/* Copyright (C) 1990-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,8 +26,8 @@ order of decreasing precedence. "id++", "id--" [post-increment and post-decrement] - "++id", "--id" [pre-increment and pre-decrement] "-", "+" [(unary operators)] + "++id", "--id" [pre-increment and pre-decrement] "!", "~" "**" [(exponentiation)] "*", "/", "%" @@ -63,7 +63,7 @@ Implementation is a recursive-descent parser. Chet Ramey - chet@ins.CWRU.Edu + chet@po.cwru.edu */ #include "config.h" @@ -82,12 +82,17 @@ #include "bashintl.h" #include "shell.h" +#include "arrayfunc.h" +#include "execute_cmd.h" +#include "flags.h" +#include "subst.h" +#include "typemax.h" /* INTMAX_MAX, INTMAX_MIN */ /* 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. */ +/* Size be which the expression stack grows when necessary. */ #define EXPR_STACK_GROW_SIZE 10 /* Maximum amount of recursion allowed. This prevents a non-integer @@ -134,8 +139,30 @@ #define COMMA ',' /* This should be the function corresponding to the operator with the - highest precedence. */ -#define EXP_HIGHEST expcomma + lowest precedence. */ +#define EXP_LOWEST expcomma + +#ifndef MAX_INT_LEN +# define MAX_INT_LEN 32 +#endif + +struct lvalue +{ + char *tokstr; /* possibly-rewritten lvalue if not NULL */ + intmax_t tokval; /* expression evaluated value */ + SHELL_VAR *tokvar; /* variable described by array or var reference */ + intmax_t ind; /* array index if not -1 */ +}; + +/* A structure defining a single expression context. */ +typedef struct { + int curtok, lasttok; + char *expression, *tp, *lasttp; + intmax_t tokval; + char *tokstr; + int noeval; + struct lvalue lval; +} EXPR_CONTEXT; static char *expression; /* The current expression */ static char *tp; /* token lexical position */ @@ -148,62 +175,55 @@ 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)); +/* set to 1 if the expression has already been run through word expansion */ +static int already_expanded; -/* 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; +static struct lvalue curlval = {0, 0, 0, -1}; +static struct lvalue lastlval = {0, 0, 0, -1}; -#ifdef INCLUDE_UNUSED -/* Not used yet. */ -typedef struct { - char *tokstr; - intmax_t tokval; -} LVALUE; +static int _is_arithop PARAMS((int)); +static void readtok PARAMS((void)); /* lexical analyzer */ + +static void init_lvalue PARAMS((struct lvalue *)); +static struct lvalue *alloc_lvalue PARAMS((void)); +static void free_lvalue PARAMS((struct lvalue *)); + +static intmax_t expr_streval PARAMS((char *, int, struct lvalue *)); +static intmax_t strlong PARAMS((char *)); +static void evalerror PARAMS((const char *)); + +static void pushexp PARAMS((void)); +static void popexp PARAMS((void)); +static void expr_unwind PARAMS((void)); +static void expr_bind_variable PARAMS((char *, char *)); +#if defined (ARRAY_VARS) +static void expr_bind_array_element PARAMS((char *, arrayind_t, char *)); #endif +static intmax_t subexpr PARAMS((char *)); + +static intmax_t expcomma PARAMS((void)); +static intmax_t expassign PARAMS((void)); +static intmax_t expcond PARAMS((void)); +static intmax_t explor PARAMS((void)); +static intmax_t expland PARAMS((void)); +static intmax_t expbor PARAMS((void)); +static intmax_t expbxor PARAMS((void)); +static intmax_t expband PARAMS((void)); +static intmax_t exp5 PARAMS((void)); +static intmax_t exp4 PARAMS((void)); +static intmax_t expshift PARAMS((void)); +static intmax_t exp3 PARAMS((void)); +static intmax_t expmuldiv PARAMS((void)); +static intmax_t exppower PARAMS((void)); +static intmax_t exp1 PARAMS((void)); +static intmax_t exp0 PARAMS((void)); + /* 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 @@ -217,6 +237,7 @@ extern const char * const bash_badsub_errmsg; (X)->tokval = tokval; \ (X)->tokstr = tokstr; \ (X)->noeval = noeval; \ + (X)->lval = curlval; \ } while (0) #define RESTORETOK(X) \ @@ -228,6 +249,7 @@ extern const char * const bash_badsub_errmsg; tokval = (X)->tokval; \ tokstr = (X)->tokstr; \ noeval = (X)->noeval; \ + curlval = (X)->lval; \ } while (0) /* Push and save away the contents of the globals describing the @@ -261,8 +283,13 @@ popexp () { EXPR_CONTEXT *context; - if (expr_depth == 0) - evalerror (_("recursion stack underflow")); + if (expr_depth <= 0) + { + /* See the comment at the top of evalexp() for an explanation of why + this is done. */ + expression = lasttp = 0; + evalerror (_("recursion stack underflow")); + } context = expr_stack[--expr_depth]; @@ -285,7 +312,8 @@ expr_unwind () free (expr_stack[expr_depth]); } - free (expr_stack[expr_depth]); /* free the allocated EXPR_CONTEXT */ + if (expr_depth == 0) + free (expr_stack[expr_depth]); /* free the allocated EXPR_CONTEXT */ noeval = 0; /* XXX */ } @@ -294,10 +322,73 @@ static void expr_bind_variable (lhs, rhs) char *lhs, *rhs; { - (void)bind_int_variable (lhs, rhs); + SHELL_VAR *v; + int aflags; + + if (lhs == 0 || *lhs == 0) + return; /* XXX */ + +#if defined (ARRAY_VARS) + aflags = (assoc_expand_once && already_expanded) ? ASS_NOEXPAND : 0; + aflags |= ASS_ALLOWALLSUB; /* allow assoc[@]=value */ +#else + aflags = 0; +#endif + v = bind_int_variable (lhs, rhs, aflags); + if (v && (readonly_p (v) || noassign_p (v))) + sh_longjmp (evalbuf, 1); /* variable assignment error */ stupidly_hack_special_variables (lhs); } +#if defined (ARRAY_VARS) +/* This is similar to the logic in arrayfunc.c:valid_array_reference when + you pass VA_NOEXPAND. */ +static int +expr_skipsubscript (vp, cp) + char *vp, *cp; +{ + int flags, isassoc; + SHELL_VAR *entry; + + isassoc = 0; + entry = 0; + if (assoc_expand_once & already_expanded) + { + *cp = '\0'; + isassoc = legal_identifier (vp) && (entry = find_variable (vp)) && assoc_p (entry); + *cp = '['; /* ] */ + } + flags = (isassoc && assoc_expand_once && already_expanded) ? VA_NOEXPAND : 0; + return (skipsubscript (cp, 0, flags)); +} + +/* Rewrite tok, which is of the form vname[expression], to vname[ind], where + IND is the already-calculated value of expression. */ +static void +expr_bind_array_element (tok, ind, rhs) + char *tok; + arrayind_t ind; + char *rhs; +{ + char *lhs, *vname; + size_t llen; + char ibuf[INT_STRLEN_BOUND (arrayind_t) + 1], *istr; + + istr = fmtumax (ind, 10, ibuf, sizeof (ibuf), 0); + vname = array_variable_name (tok, 0, (char **)NULL, (int *)NULL); + + llen = strlen (vname) + sizeof (ibuf) + 3; + lhs = xmalloc (llen); + + sprintf (lhs, "%s[%s]", vname, istr); /* XXX */ + +/*itrace("expr_bind_array_element: %s=%s", lhs, rhs);*/ + expr_bind_variable (lhs, rhs); + free (vname); + free (lhs); +} +#endif /* ARRAY_VARS */ + /* 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 @@ -312,8 +403,9 @@ expr_bind_variable (lhs, rhs) 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) +evalexp (expr, flags, validp) char *expr; + int flags; int *validp; { intmax_t val; @@ -322,10 +414,11 @@ evalexp (expr, validp) val = 0; noeval = 0; + already_expanded = (flags&EXP_EXPANDED); FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf)); - c = setjmp (evalbuf); + c = setjmp_nosigs (evalbuf); if (c) { @@ -334,6 +427,10 @@ evalexp (expr, validp) tokstr = expression = (char *)NULL; expr_unwind (); + expr_depth = 0; /* XXX - make sure */ + + /* We copy in case we've called evalexp recursively */ + FASTCOPY (oevalbuf, evalbuf, sizeof (evalbuf)); if (validp) *validp = 0; @@ -364,17 +461,20 @@ subexpr (expr) return (0); pushexp (); - curtok = lasttok = 0; expression = savestring (expr); tp = expression; + curtok = lasttok = 0; tokstr = (char *)NULL; tokval = 0; + init_lvalue (&curlval); + lastlval = curlval; readtok (); - val = EXP_HIGHEST (); + val = EXP_LOWEST (); + /*TAG:bash-5.3 make it clear that these are arithmetic syntax errors */ if (curtok != 0) evalerror (_("syntax error in expression")); @@ -406,6 +506,10 @@ expassign () { register intmax_t value; char *lhs, *rhs; + arrayind_t lind; +#if defined (HAVE_IMAXDIV) + imaxdiv_t idiv; +#endif value = expcond (); if (curtok == EQ || curtok == OP_ASSIGN) @@ -424,26 +528,45 @@ expassign () lvalue = value; } + if (tokstr == 0) + evalerror (_("syntax error in variable assignment")); + + /* XXX - watch out for pointer aliasing issues here */ lhs = savestring (tokstr); + /* save ind in case rhs is string var and evaluation overwrites it */ + lind = curlval.ind; readtok (); value = expassign (); if (special) { + if ((op == DIV || op == MOD) && value == 0) + { + if (noeval == 0) + evalerror (_("division by 0")); + else + value = 1; + } + switch (op) { case MUL: + /* Handle INTMAX_MIN and INTMAX_MAX * -1 specially here? */ 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; + if (lvalue == INTMAX_MIN && value == -1) + lvalue = (op == DIV) ? INTMAX_MIN : 0; + else +#if HAVE_IMAXDIV + { + idiv = imaxdiv (lvalue, value); + lvalue = (op == DIV) ? idiv.quot : idiv.rem; + } +#else + lvalue = (op == DIV) ? lvalue / value : lvalue % value; +#endif break; case PLUS: lvalue += value; @@ -476,12 +599,23 @@ expassign () rhs = itos (value); if (noeval == 0) - expr_bind_variable (lhs, rhs); + { +#if defined (ARRAY_VARS) + if (lind != -1) + expr_bind_array_element (lhs, lind, rhs); + else +#endif + expr_bind_variable (lhs, rhs); + } + if (curlval.tokstr && curlval.tokstr == tokstr) + init_lvalue (&curlval); + free (rhs); free (lhs); FREE (tokstr); tokstr = (char *)NULL; /* For freeing on errors. */ } + return (value); } @@ -496,24 +630,23 @@ expcond () 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 (); + readtok (); + if (curtok == 0 || curtok == COL) + evalerror (_("expression expected")); + + val1 = EXP_LOWEST (); if (set_noeval) noeval--; if (curtok != COL) evalerror (_("`:' expected for conditional expression")); - readtok (); - if (curtok == 0) - evalerror (_("expression expected")); + set_noeval = 0; if (cval) { @@ -521,7 +654,11 @@ expcond () noeval++; } + readtok (); + if (curtok == 0) + evalerror (_("expression expected")); val2 = expcond (); + if (set_noeval) noeval--; rval = cval ? val1 : val2; @@ -599,6 +736,7 @@ expbor () readtok (); val2 = expbxor (); val1 = val1 | val2; + lasttok = NUM; } return (val1); @@ -617,6 +755,7 @@ expbxor () readtok (); val2 = expband (); val1 = val1 ^ val2; + lasttok = NUM; } return (val1); @@ -635,6 +774,7 @@ expband () readtok (); val2 = exp5 (); val1 = val1 & val2; + lasttok = NUM; } return (val1); @@ -657,6 +797,7 @@ exp5 () val1 = (val1 == val2); else if (op == NEQ) val1 = (val1 != val2); + lasttok = NUM; } return (val1); } @@ -685,6 +826,7 @@ exp4 () val1 = val1 < val2; else /* (op == GT) */ val1 = val1 > val2; + lasttok = NUM; } return (val1); } @@ -708,6 +850,7 @@ expshift () val1 = val1 << val2; else val1 = val1 >> val2; + lasttok = NUM; } return (val1); @@ -718,27 +861,31 @@ exp3 () { register intmax_t val1, val2; - val1 = exp2 (); + val1 = expmuldiv (); while ((curtok == PLUS) || (curtok == MINUS)) { int op = curtok; readtok (); - val2 = exp2 (); + val2 = expmuldiv (); if (op == PLUS) val1 += val2; else if (op == MINUS) val1 -= val2; + lasttok = NUM; } return (val1); } static intmax_t -exp2 () +expmuldiv () { register intmax_t val1, val2; +#if defined (HAVE_IMAXDIV) + imaxdiv_t idiv; +#endif val1 = exppower (); @@ -747,24 +894,69 @@ exp2 () (curtok == MOD)) { int op = curtok; + char *stp, *sltp; + stp = tp; readtok (); val2 = exppower (); + /* Handle division by 0 and twos-complement arithmetic overflow */ if (((op == DIV) || (op == MOD)) && (val2 == 0)) - evalerror (_("division by 0")); + { + if (noeval == 0) + { + sltp = lasttp; + lasttp = stp; + while (lasttp && *lasttp && whitespace (*lasttp)) + lasttp++; + evalerror (_("division by 0")); + lasttp = sltp; + } + else + val2 = 1; + } + else if (op == MOD && val1 == INTMAX_MIN && val2 == -1) + { + val1 = 0; + continue; + } + else if (op == DIV && val1 == INTMAX_MIN && val2 == -1) + val2 = 1; if (op == MUL) val1 *= val2; - else if (op == DIV) - val1 /= val2; - else if (op == MOD) - val1 %= val2; + else if (op == DIV || op == MOD) +#if defined (HAVE_IMAXDIV) + { + idiv = imaxdiv (val1, val2); + val1 = (op == DIV) ? idiv.quot : idiv.rem; + } +#else + val1 = (op == DIV) ? val1 / val2 : val1 % val2; +#endif + lasttok = NUM; } return (val1); } +static intmax_t +ipow (base, exp) + intmax_t base, exp; +{ + intmax_t result; + + result = 1; + while (exp) + { + if (exp & 1) + result *= base; + exp >>= 1; + base *= base; + } + return result; +} + static intmax_t exppower () { @@ -775,13 +967,12 @@ exppower () { readtok (); val2 = exppower (); /* exponentiation is right-associative */ + lasttok = NUM; if (val2 == 0) return (1); if (val2 < 0) evalerror (_("exponent less than 0")); - for (c = 1; val2--; c *= val1) - ; - val1 = c; + val1 = ipow (val1, val2); } return (val1); } @@ -795,11 +986,25 @@ exp1 () { readtok (); val = !exp1 (); + lasttok = NUM; } else if (curtok == BNOT) { readtok (); val = ~exp1 (); + lasttok = NUM; + } + else if (curtok == MINUS) + { + readtok (); + val = - exp1 (); + lasttok = NUM; + } + else if (curtok == PLUS) + { + readtok (); + val = exp1 (); + lasttok = NUM; } else val = exp0 (); @@ -828,27 +1033,26 @@ exp0 () v2 = tokval + ((stok == PREINC) ? 1 : -1); vincdec = itos (v2); if (noeval == 0) - expr_bind_variable (tokstr, vincdec); + { +#if defined (ARRAY_VARS) + if (curlval.ind != -1) + expr_bind_array_element (curlval.tokstr, curlval.ind, vincdec); + else +#endif + if (tokstr) + 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) { + /* XXX - save curlval here? Or entire expression context? */ readtok (); - val = EXP_HIGHEST (); + val = EXP_LOWEST (); if (curtok != RPAR) /* ( */ evalerror (_("missing `)'")); @@ -873,22 +1077,30 @@ exp0 () /* restore certain portions of EC */ tokstr = ec.tokstr; noeval = ec.noeval; + curlval = ec.lval; lasttok = STR; /* ec.curtok */ v2 = val + ((stok == POSTINC) ? 1 : -1); vincdec = itos (v2); if (noeval == 0) - expr_bind_variable (tokstr, vincdec); + { +#if defined (ARRAY_VARS) + if (curlval.ind != -1) + expr_bind_array_element (curlval.tokstr, curlval.ind, vincdec); + else +#endif + expr_bind_variable (tokstr, vincdec); + } free (vincdec); curtok = NUM; /* make sure x++=7 is flagged as an error */ } else { + /* XXX - watch out for pointer aliasing issues here */ if (stok == STR) /* free new tokstr before old one is restored */ FREE (tokstr); RESTORETOK (&ec); } - } readtok (); @@ -899,31 +1111,81 @@ exp0 () return (val); } +static void +init_lvalue (lv) + struct lvalue *lv; +{ + lv->tokstr = 0; + lv->tokvar = 0; + lv->tokval = lv->ind = -1; +} + +static struct lvalue * +alloc_lvalue () +{ + struct lvalue *lv; + + lv = xmalloc (sizeof (struct lvalue)); + init_lvalue (lv); + return (lv); +} + +static void +free_lvalue (lv) + struct lvalue *lv; +{ + free (lv); /* should be inlined */ +} + static intmax_t -expr_streval (tok, e) +expr_streval (tok, e, lvalue) char *tok; int e; + struct lvalue *lvalue; { SHELL_VAR *v; char *value; intmax_t tval; + int initial_depth; +#if defined (ARRAY_VARS) + arrayind_t ind; + int tflag, aflag; + array_eltstate_t es; +#endif + +/*itrace("expr_streval: %s: noeval = %d expanded=%d", tok, noeval, already_expanded);*/ + /* If we are suppressing evaluation, just short-circuit here instead of + going through the rest of the evaluator. */ + if (noeval) + return (0); + + initial_depth = expr_depth; + +#if defined (ARRAY_VARS) + tflag = (assoc_expand_once && already_expanded) ? AV_NOEXPAND : 0; /* for a start */ +#endif /* [[[[[ */ #if defined (ARRAY_VARS) - v = (e == ']') ? array_variable_part (tok, (char **)0, (int *)0) : find_variable (tok); + aflag = tflag; /* use a different variable for now */ + if (shell_compatibility_level > 51) + aflag |= AV_ATSTARKEYS; + v = (e == ']') ? array_variable_part (tok, tflag, (char **)0, (int *)0) : find_variable (tok); #else v = find_variable (tok); #endif + if (v == 0 && e != ']') + v = find_variable_last_nameref (tok, 0); 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; + value = (e == ']') ? array_variable_name (tok, tflag, (char **)0, (int *)0) : tok; #else value = tok; #endif - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); err_unboundvar (value); #if defined (ARRAY_VARS) @@ -931,6 +1193,9 @@ expr_streval (tok, e) FREE (value); /* array_variable_name returns new memory */ #endif + if (no_longjmp_on_fatal_error && interactive_shell) + sh_longjmp (evalbuf, 1); + if (interactive_shell) { expr_unwind (); @@ -942,17 +1207,41 @@ expr_streval (tok, e) } #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); + init_eltstate (&es); + es.ind = -1; + /* If the second argument to get_array_value doesn't include AV_ALLOWALL, + 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. AFLAG is set above and is either AV_NOEXPAND + or 0. */ + value = (e == ']') ? get_array_value (tok, aflag, &es) : get_variable_value (v); + ind = es.ind; + flush_eltstate (&es); #else value = get_variable_value (v); #endif + if (expr_depth < initial_depth) + { + if (no_longjmp_on_fatal_error && interactive_shell) + sh_longjmp (evalbuf, 1); + return (0); + } + tval = (value && *value) ? subexpr (value) : 0; + if (lvalue) + { + lvalue->tokstr = tok; /* XXX */ + lvalue->tokval = tval; + lvalue->tokvar = v; /* XXX */ +#if defined (ARRAY_VARS) + lvalue->ind = ind; +#else + lvalue->ind = -1; +#endif + } + return (tval); } @@ -1024,6 +1313,7 @@ readtok () register char *cp, *xp; register unsigned char c, c1; register int e; + struct lvalue lval; /* Skip leading whitespace. */ cp = tp; @@ -1058,7 +1348,7 @@ readtok () #if defined (ARRAY_VARS) if (c == '[') { - e = skipsubscript (cp, 0, 0); + e = expr_skipsubscript (tp, cp); /* XXX - was skipsubscript */ if (cp[e] == ']') { cp += e + 1; @@ -1071,10 +1361,15 @@ readtok () #endif /* ARRAY_VARS */ *cp = '\0'; + /* XXX - watch out for pointer aliasing issues here */ + if (curlval.tokstr && curlval.tokstr == tokstr) + init_lvalue (&curlval); + FREE (tokstr); tokstr = savestring (tp); *cp = c; + /* XXX - make peektok part of saved token state? */ SAVETOK (&ec); tokstr = (char *)NULL; /* keep it from being freed */ tp = savecp = cp; @@ -1090,7 +1385,10 @@ readtok () /* 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); + { + lastlval = curlval; + tokval = expr_streval (tokstr, e, &curlval); + } else tokval = 0; @@ -1151,6 +1449,19 @@ readtok () c = POWER; else if ((c == '-' || c == '+') && c1 == c && curtok == STR) c = (c == '-') ? POSTDEC : POSTINC; +#if STRICT_ARITH_PARSING + else if ((c == '-' || c == '+') && c1 == c && curtok == NUM) +#else + else if ((c == '-' || c == '+') && c1 == c && curtok == NUM && (lasttok == PREINC || lasttok == PREDEC)) +#endif + { + /* This catches something like --FOO++ */ + /* TAG:bash-5.3 add gettext calls here or make this a separate function */ + if (c == '-') + evalerror ("--: assignment requires lvalue"); + else + evalerror ("++: assignment requires lvalue"); + } else if ((c == '-' || c == '+') && c1 == c) { /* Quickly scan forward to see if this is followed by optional @@ -1161,7 +1472,20 @@ readtok () if (legal_variable_starter ((unsigned char)*xp)) c = (c == '-') ? PREDEC : PREINC; else + /* Could force parsing as preinc or predec and throw an error */ +#if STRICT_ARITH_PARSING + { + /* Posix says unary plus and minus have higher priority than + preinc and predec. */ + /* This catches something like --4++ */ + if (c == '-') + evalerror ("--: assignment requires lvalue"); + else + evalerror ("++: assignment requires lvalue"); + } +#else cp--; /* not preinc or predec, so unget the character */ +#endif } else if (c1 == EQ && member (c, "*/%+-&^|")) { @@ -1197,12 +1521,12 @@ evalerror (msg) char *name, *t; name = this_command_name; - for (t = expression; whitespace (*t); t++) + for (t = expression; t && whitespace (*t); t++) ; internal_error (_("%s%s%s: %s (error token is \"%s\")"), - name ? name : "", name ? ": " : "", t, - msg, (lasttp && *lasttp) ? lasttp : ""); - longjmp (evalbuf, 1); + name ? name : "", name ? ": " : "", + t ? t : "", msg, (lasttp && *lasttp) ? lasttp : ""); + sh_longjmp (evalbuf, 1); } /* Convert a string to an intmax_t integer, with an arbitrary base. @@ -1212,10 +1536,12 @@ evalerror (msg) 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 + interchangeably. 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). */ +#define VALID_NUMCHAR(c) (ISALNUM(c) || ((c) == '_') || ((c) == '@')) + static intmax_t strlong (num) char *num; @@ -1223,7 +1549,7 @@ strlong (num) register char *s; register unsigned char c; int base, foundbase; - intmax_t val; + intmax_t val, pval; s = num; @@ -1241,6 +1567,10 @@ strlong (num) { base = 16; s++; +#if STRICT_ARITH_PARSING + if (*s == 0) + evalerror (_("invalid number")); +#endif } else base = 8; @@ -1262,8 +1592,13 @@ strlong (num) base = val; val = 0; foundbase++; + + /* Make sure a base# is followed by a character that can compose a + valid integer constant. Jeremy Townshend */ + if (VALID_NUMCHAR (*s) == 0) + evalerror (_("invalid integer constant")); } - else if (ISALNUM(c) || (c == '_') || (c == '@')) + else if (VALID_NUMCHAR (c)) { if (DIGIT(c)) c = TODIGIT(c); @@ -1279,7 +1614,14 @@ strlong (num) if (c >= base) evalerror (_("value too great for base")); +#ifdef CHECK_OVERFLOW + pval = val; val = (val * base) + c; + if (val < 0 || val < pval) /* overflow */ + return INTMAX_MAX; +#else + val = (val * base) + c; +#endif } else break; @@ -1324,7 +1666,7 @@ main (argc, argv) for (i = 1; i < argc; i++) { - v = evalexp (argv[i], &expok); + v = evalexp (argv[i], 0, &expok); if (expok == 0) fprintf (stderr, _("%s: expression error\n"), argv[i]); else diff --git a/externs.h b/externs.h index c22f8f1..818ebf7 100644 --- a/externs.h +++ b/externs.h @@ -1,7 +1,7 @@ /* externs.h -- extern function declarations which do not appear in their own header file. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,139 +27,160 @@ #include "stdc.h" /* Functions from expr.c. */ -extern intmax_t evalexp __P((char *, int *)); +#define EXP_EXPANDED 0x01 + +extern intmax_t evalexp PARAMS((char *, int, 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 char *make_command_string PARAMS((COMMAND *)); +extern char *print_comsub PARAMS((COMMAND *)); +extern char *named_function_string PARAMS((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 *)); +extern void print_command PARAMS((COMMAND *)); +extern void print_simple_command PARAMS((SIMPLE_COM *)); +extern void print_word_list PARAMS((WORD_LIST *, char *)); /* debugger support */ -extern void print_for_command_head __P((FOR_COM *)); +extern void print_for_command_head PARAMS((FOR_COM *)); #if defined (SELECT_COMMAND) -extern void print_select_command_head __P((SELECT_COM *)); +extern void print_select_command_head PARAMS((SELECT_COM *)); #endif -extern void print_case_command_head __P((CASE_COM *)); +extern void print_case_command_head PARAMS((CASE_COM *)); #if defined (DPAREN_ARITHMETIC) -extern void print_arith_command __P((WORD_LIST *)); +extern void print_arith_command PARAMS((WORD_LIST *)); #endif #if defined (COND_COMMAND) -extern void print_cond_command __P((COND_COM *)); +extern void print_cond_command PARAMS((COND_COM *)); #endif /* set -x support */ -extern void xtrace_init __P((void)); +extern void xtrace_init PARAMS((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 *)); +extern void xtrace_set PARAMS((int, FILE *)); +#endif +extern void xtrace_fdchk PARAMS((int)); +extern void xtrace_reset PARAMS((void)); +extern char *indirection_level_string PARAMS((void)); +extern void xtrace_print_assignment PARAMS((char *, char *, int, int)); +extern void xtrace_print_word_list PARAMS((WORD_LIST *, int)); +extern void xtrace_print_for_command_head PARAMS((FOR_COM *)); #if defined (SELECT_COMMAND) -extern void xtrace_print_select_command_head __P((SELECT_COM *)); +extern void xtrace_print_select_command_head PARAMS((SELECT_COM *)); #endif -extern void xtrace_print_case_command_head __P((CASE_COM *)); +extern void xtrace_print_case_command_head PARAMS((CASE_COM *)); #if defined (DPAREN_ARITHMETIC) -extern void xtrace_print_arith_cmd __P((WORD_LIST *)); +extern void xtrace_print_arith_cmd PARAMS((WORD_LIST *)); #endif #if defined (COND_COMMAND) -extern void xtrace_print_cond_term __P((int, int, WORD_DESC *, char *, char *)); +extern void xtrace_print_cond_term PARAMS((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)); +extern void exit_shell PARAMS((int)) __attribute__((__noreturn__)); +extern void sh_exit PARAMS((int)) __attribute__((__noreturn__)); +extern void subshell_exit PARAMS((int)) __attribute__((__noreturn__)); +extern void set_exit_status PARAMS((int)); +extern void disable_priv_mode PARAMS((void)); +extern void unbind_args PARAMS((void)); #if defined (RESTRICTED_SHELL) -extern int shell_is_restricted __P((char *)); -extern int maybe_make_restricted __P((char *)); +extern int shell_is_restricted PARAMS((char *)); +extern int maybe_make_restricted PARAMS((char *)); #endif -extern void unset_bash_input __P((int)); -extern void get_current_user_info __P((void)); +extern void unset_bash_input PARAMS((int)); +extern void get_current_user_info PARAMS((void)); /* Functions from eval.c. */ -extern int reader_loop __P((void)); -extern int parse_command __P((void)); -extern int read_command __P((void)); +extern int reader_loop PARAMS((void)); +extern int pretty_print_loop PARAMS((void)); +extern int parse_command PARAMS((void)); +extern int read_command PARAMS((void)); /* Functions from logging.c */ -extern void initialize_logging __P((void)); +extern void initialize_logging PARAMS((void)); /* Functions from braces.c. */ #if defined (BRACE_EXPANSION) -extern char **brace_expand __P((char *)); +extern char **brace_expand PARAMS((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 int yyparse PARAMS((void)); +extern int return_EOF PARAMS((void)); +extern void push_token PARAMS((int)); +extern char *xparse_dolparen PARAMS((char *, char *, int *, int)); +extern COMMAND *parse_string_to_command PARAMS((char *, int)); +extern void reset_parser PARAMS((void)); +extern void reset_readahead_token PARAMS((void)); +extern WORD_LIST *parse_string_to_word_list PARAMS((char *, int, const char *)); + +extern int parser_will_prompt PARAMS((void)); +extern int parser_in_command_position PARAMS((void)); + +extern void free_pushed_string_input PARAMS((void)); + +extern int parser_expanding_alias PARAMS((void)); +extern void parser_save_alias PARAMS((void)); +extern void parser_restore_alias PARAMS((void)); -extern void free_pushed_string_input __P((void)); +extern void clear_shell_input_line PARAMS((void)); -extern char *decode_prompt_string __P((char *)); +extern char *decode_prompt_string PARAMS((char *)); -extern int get_current_prompt_level __P((void)); -extern void set_current_prompt_level __P((int)); +extern int get_current_prompt_level PARAMS((void)); +extern void set_current_prompt_level PARAMS((int)); #if defined (HISTORY) -extern char *history_delimiting_chars __P((void)); +extern char *history_delimiting_chars PARAMS((const char *)); #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 *)); +extern void set_default_locale PARAMS((void)); +extern void set_default_locale_vars PARAMS((void)); +extern int set_locale_var PARAMS((char *, char *)); +extern int set_lang PARAMS((char *, char *)); +extern void set_default_lang PARAMS((void)); +extern char *get_locale_var PARAMS((char *)); +extern char *localetrans PARAMS((char *, int, int *)); +extern char *mk_msgstr PARAMS((char *, int *)); +extern char *locale_expand PARAMS((char *, int, int, int, int *)); +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#endif /* 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 void list_walk PARAMS((GENERIC_LIST *, sh_glist_func_t *)); +extern void wlist_walk PARAMS((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 int find_string_in_alist PARAMS((char *, STRING_INT_ALIST *, int)); +extern char *find_token_in_alist PARAMS((int, STRING_INT_ALIST *, int)); +extern int find_index_in_alist PARAMS((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)); +extern char *substring PARAMS((const char *, int, int)); +extern char *strsub PARAMS((char *, char *, char *, int)); +extern char *strcreplace PARAMS((char *, int, const char *, int)); +extern void strip_leading PARAMS((char *)); +extern void strip_trailing PARAMS((char *, int, int)); +extern void xbcopy PARAMS((char *, char *, int)); /* Functions from version.c. */ -extern char *shell_version_string __P((void)); -extern void show_shell_version __P((int)); +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((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)); +extern char *sh_modcase PARAMS((const char *, char *, int)); /* Defines for flags argument to sh_modcase. These need to agree with what's in lib/sh/casemode.c */ @@ -175,14 +196,16 @@ extern char *sh_modcase __P((const char *, char *, int)); #define CASE_USEWORDS 0x1000 /* declarations for functions defined in lib/sh/clktck.c */ -extern long get_clk_tck __P((void)); +extern long get_clk_tck PARAMS((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/dprintf.c */ +#if !defined (HAVE_DPRINTF) +extern void dprintf PARAMS((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); +#endif /* Declarations for functions defined in lib/sh/fmtulong.c */ #define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */ @@ -190,19 +213,19 @@ extern void fdprintf __P((int, const char *, ...)) __attribute__((__format__ (p #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 *fmtulong PARAMS((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)); +#if defined (HAVE_LONG_LONG_INT) +extern char *fmtullong PARAMS((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)); +extern char *fmtumax PARAMS((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)); +extern char *fnx_fromfs PARAMS((char *, size_t)); +extern char *fnx_tofs PARAMS((char *, size_t)); /* Declarations for functions defined in lib/sh/fpurge.c */ @@ -212,24 +235,25 @@ extern char *fnx_tofs __P((char *, size_t)); #if HAVE_FPURGE # define fpurge _bash_fpurge #endif -extern int fpurge __P((FILE *stream)); +extern int fpurge PARAMS((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)); +extern char *getcwd PARAMS((char *, size_t)); #endif /* Declarations for functions defined in lib/sh/input_avail.c */ -extern int input_avail __P((int)); +extern int input_avail PARAMS((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)); +extern char *inttostr PARAMS((intmax_t, char *, size_t)); +extern char *itos PARAMS((intmax_t)); +extern char *mitos PARAMS((intmax_t)); +extern char *uinttostr PARAMS((uintmax_t, char *, size_t)); +extern char *uitos PARAMS((uintmax_t)); /* declarations for functions defined in lib/sh/makepath.c */ #define MP_DOTILDE 0x01 @@ -237,45 +261,45 @@ extern char *uitos __P((uintmax_t)); #define MP_RMDOT 0x04 #define MP_IGNDOT 0x08 -extern char *sh_makepath __P((const char *, const char *, int)); +extern char *sh_makepath PARAMS((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 *)); +extern char *mbscasecmp PARAMS((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)); +extern char *mbschr PARAMS((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 *)); +extern char *mbscmp PARAMS((const char *, const char *)); #endif /* declarations for functions defined in lib/sh/netconn.c */ -extern int isnetconn __P((int)); +extern int isnetconn PARAMS((int)); /* declarations for functions defined in lib/sh/netopen.c */ -extern int netopen __P((char *)); +extern int netopen PARAMS((char *)); /* Declarations for functions defined in lib/sh/oslib.c */ #if !defined (HAVE_DUP2) || defined (DUP2_BROKEN) -extern int dup2 __P((int, int)); +extern int dup2 PARAMS((int, int)); #endif #if !defined (HAVE_GETDTABLESIZE) -extern int getdtablesize __P((void)); +extern int getdtablesize PARAMS((void)); #endif /* !HAVE_GETDTABLESIZE */ #if !defined (HAVE_GETHOSTNAME) -extern int gethostname __P((char *, int)); +extern int gethostname PARAMS((char *, int)); #endif /* !HAVE_GETHOSTNAME */ -extern int getmaxgroups __P((void)); -extern long getmaxchild __P((void)); +extern int getmaxgroups PARAMS((void)); +extern long getmaxchild PARAMS((void)); /* declarations for functions defined in lib/sh/pathcanon.c */ #define PATH_CHECKDOTDOT 0x0001 @@ -283,59 +307,78 @@ extern long getmaxchild __P((void)); #define PATH_HARDPATH 0x0004 #define PATH_NOALLOC 0x0008 -extern char *sh_canonpath __P((char *, int)); +extern char *sh_canonpath PARAMS((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 *)); +extern char *sh_physpath PARAMS((char *, int)); +extern char *sh_realpath PARAMS((const char *, char *)); + +/* declarations for functions defined in lib/sh/random.c */ +extern int brand PARAMS((void)); +extern void sbrand PARAMS((unsigned long)); /* set bash random number generator. */ +extern void seedrand PARAMS((void)); /* seed generator randomly */ +extern void seedrand32 PARAMS((void)); +extern u_bits32_t get_urandom32 PARAMS((void)); /* declarations for functions defined in lib/sh/setlinebuf.c */ #ifdef NEED_SH_SETLINEBUF_DECL -extern int sh_setlinebuf __P((FILE *)); +extern int sh_setlinebuf PARAMS((FILE *)); #endif /* declarations for functions defined in lib/sh/shaccess.c */ -extern int sh_eaccess __P((char *, int)); +extern int sh_eaccess PARAMS((const char *, int)); /* declarations for functions defined in lib/sh/shmatch.c */ -extern int sh_regmatch __P((const char *, const char *, int)); +extern int sh_regmatch PARAMS((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/shmbchar.c */ +extern size_t mbstrlen PARAMS((const char *)); +extern char *mbsmbchar PARAMS((const char *)); +extern int sh_mbsnlen PARAMS((const char *, size_t, int)); + /* 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 *)); +extern char *sh_single_quote PARAMS((const char *)); +extern char *sh_double_quote PARAMS((const char *)); +extern char *sh_mkdoublequoted PARAMS((const char *, int, int)); +extern char *sh_un_double_quote PARAMS((char *)); +extern char *sh_backslash_quote PARAMS((char *, const char *, int)); +extern char *sh_backslash_quote_for_double_quotes PARAMS((char *, int)); +extern char *sh_quote_reusable PARAMS((char *, int)); +extern int sh_contains_shell_metas PARAMS((const char *)); +extern int sh_contains_quotes PARAMS((const char *)); /* declarations for functions defined in lib/sh/spell.c */ -extern int spname __P((char *, char *)); -extern char *dirspell __P((char *)); +extern int spname PARAMS((char *, char *)); +extern char *dirspell PARAMS((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 *)); +extern int strncasecmp PARAMS((const char *, const char *, size_t)); +extern int strcasecmp PARAMS((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 *)); +extern char *strcasestr PARAMS((const char *, const char *)); +#endif + +/* declarations for functions defined in lib/sh/strchrnul.c */ +#if ! HAVE_STRCHRNUL +extern char *strchrnul PARAMS((const char *, int)); #endif /* declarations for functions defined in lib/sh/strerror.c */ #if !defined (HAVE_STRERROR) && !defined (strerror) -extern char *strerror __P((int)); +extern char *strerror PARAMS((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 *)); +extern size_t strftime PARAMS((char *, size_t, const char *, const struct tm *)); #endif /* declarations for functions and structures defined in lib/sh/stringlist.c */ @@ -347,87 +390,94 @@ typedef struct _list_of_strings { 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 *)); +typedef int sh_strlist_map_func_t PARAMS((char *)); + +extern STRINGLIST *strlist_create PARAMS((int)); +extern STRINGLIST *strlist_resize PARAMS((STRINGLIST *, int)); +extern void strlist_flush PARAMS((STRINGLIST *)); +extern void strlist_dispose PARAMS((STRINGLIST *)); +extern int strlist_remove PARAMS((STRINGLIST *, char *)); +extern STRINGLIST *strlist_copy PARAMS((STRINGLIST *)); +extern STRINGLIST *strlist_merge PARAMS((STRINGLIST *, STRINGLIST *)); +extern STRINGLIST *strlist_append PARAMS((STRINGLIST *, STRINGLIST *)); +extern STRINGLIST *strlist_prefix_suffix PARAMS((STRINGLIST *, char *, char *)); +extern void strlist_print PARAMS((STRINGLIST *, char *)); +extern void strlist_walk PARAMS((STRINGLIST *, sh_strlist_map_func_t *)); +extern void strlist_sort PARAMS((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)); +extern char **strvec_create PARAMS((int)); +extern char **strvec_resize PARAMS((char **, int)); +extern char **strvec_mcreate PARAMS((int)); +extern char **strvec_mresize PARAMS((char **, int)); +extern void strvec_flush PARAMS((char **)); +extern void strvec_dispose PARAMS((char **)); +extern int strvec_remove PARAMS((char **, char *)); +extern int strvec_len PARAMS((char **)); +extern int strvec_search PARAMS((char **, char *)); +extern char **strvec_copy PARAMS((char **)); +extern int strvec_posixcmp PARAMS((char **, char **)); +extern int strvec_strcmp PARAMS((char **, char **)); +extern void strvec_sort PARAMS((char **, int)); + +extern char **strvec_from_word_list PARAMS((WORD_LIST *, int, int, int *)); +extern WORD_LIST *strvec_to_word_list PARAMS((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)); +extern size_t strnlen PARAMS((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 *)); +extern char *strpbrk PARAMS((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 **)); +extern double strtod PARAMS((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)); +extern long strtol PARAMS((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)); +#if defined (HAVE_LONG_LONG_INT) && !HAVE_DECL_STRTOLL +extern long long strtoll PARAMS((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)); +extern unsigned long strtoul PARAMS((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)); +#if defined (HAVE_UNSIGNED_LONG_LONG_INT) && !HAVE_DECL_STRTOULL +extern unsigned long long strtoull PARAMS((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)); +extern intmax_t strtoimax PARAMS((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)); +extern uintmax_t strtoumax PARAMS((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 *)); +extern char *ansicstr PARAMS((char *, int, int, int *, int *)); +extern char *ansic_quote PARAMS((char *, int, int *)); +extern int ansic_shouldquote PARAMS((const char *)); +extern char *ansiexpand PARAMS((char *, int, int, int *)); + +/* declarations for functions defined in lib/sh/strvis.c */ +extern int sh_charvis PARAMS((const char *, size_t *, size_t, char *, size_t *)); +extern char *sh_strvis PARAMS((const char *)); /* 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 @@ -439,40 +489,69 @@ extern void print_timeval (); #define MT_USETMPDIR 0x0001 #define MT_READWRITE 0x0002 #define MT_USERANDOM 0x0004 +#define MT_TEMPLATE 0x0008 -extern char *sh_mktmpname __P((char *, int)); -extern int sh_mktmpfd __P((char *, int, char **)); -/* extern FILE *sh_mktmpfp __P((char *, int, char **)); */ +extern char *sh_mktmpname PARAMS((char *, int)); +extern int sh_mktmpfd PARAMS((char *, int, char **)); +/* extern FILE *sh_mktmpfp PARAMS((char *, int, char **)); */ +extern char *sh_mktmpdir PARAMS((char *, int)); /* declarations for functions defined in lib/sh/uconvert.c */ -extern int uconvert __P((char *, long *, long *)); +extern int uconvert PARAMS((char *, long *, long *, char **)); /* 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)); +extern unsigned int falarm PARAMS((unsigned int, unsigned int)); +extern unsigned int fsleep PARAMS((unsigned int, unsigned int)); + +/* declarations for functions defined in lib/sh/unicode.c */ +extern int u32cconv PARAMS((unsigned long, char *)); +extern void u32reset PARAMS((void)); + +/* declarations for functions defined in lib/sh/utf8.c */ +extern char *utf8_mbschr PARAMS((const char *, int)); +extern int utf8_mbscmp PARAMS((const char *, const char *)); +extern char *utf8_mbsmbchar PARAMS((const char *)); +extern int utf8_mbsnlen PARAMS((const char *, size_t, int)); +extern int utf8_mblen PARAMS((const char *, size_t)); +extern size_t utf8_mbstrlen PARAMS((const char *)); + +/* declarations for functions defined in lib/sh/wcsnwidth.c */ +#if defined (HANDLE_MULTIBYTE) +extern int wcsnwidth PARAMS((const wchar_t *, size_t, int)); +#endif /* declarations for functions defined in lib/sh/winsize.c */ -extern void get_new_window_size __P((int, int *, int *)); +extern void get_new_window_size PARAMS((int, int *, int *)); /* declarations for functions defined in lib/sh/zcatfd.c */ -extern int zcatfd __P((int, int, char *)); +extern int zcatfd PARAMS((int, int, char *)); /* declarations for functions defined in lib/sh/zgetline.c */ -extern ssize_t zgetline __P((int, char **, size_t *, int)); +extern ssize_t zgetline PARAMS((int, char **, size_t *, int, int)); /* declarations for functions defined in lib/sh/zmapfd.c */ -extern int zmapfd __P((int, char **, char *)); +extern int zmapfd PARAMS((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)); +extern ssize_t zread PARAMS((int, char *, size_t)); +extern ssize_t zreadretry PARAMS((int, char *, size_t)); +extern ssize_t zreadintr PARAMS((int, char *, size_t)); +extern ssize_t zreadc PARAMS((int, char *)); +extern ssize_t zreadcintr PARAMS((int, char *)); +extern ssize_t zreadn PARAMS((int, char *, size_t)); +extern void zreset PARAMS((void)); +extern void zsyncfd PARAMS((int)); /* declarations for functions defined in lib/sh/zwrite.c */ -extern int zwrite __P((int, char *, size_t)); +extern int zwrite PARAMS((int, char *, size_t)); + +/* declarations for functions defined in lib/glob/gmisc.c */ +extern int match_pattern_char PARAMS((char *, char *, int)); +extern int umatchlen PARAMS((char *, size_t)); + +#if defined (HANDLE_MULTIBYTE) +extern int match_pattern_wchar PARAMS((wchar_t *, wchar_t *, int)); +extern int wmatchlen PARAMS((wchar_t *, size_t)); +#endif #endif /* _EXTERNS_H_ */ diff --git a/findcmd.c b/findcmd.c index 557f8b5..95f231e 100644 --- a/findcmd.c +++ b/findcmd.c @@ -1,6 +1,6 @@ /* findcmd.c -- Functions to search for commands by name. */ -/* Copyright (C) 1997-2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -32,27 +32,33 @@ #if defined (HAVE_UNISTD_H) # include #endif +#include #include "bashansi.h" #include "memalloc.h" #include "shell.h" +#include "execute_cmd.h" #include "flags.h" #include "hashlib.h" #include "pathexp.h" #include "hashcmd.h" #include "findcmd.h" /* matching prototypes and declarations */ -extern int posixly_correct; +#include + +#if !defined (errno) +extern int errno; +#endif /* 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 *_find_user_command_internal PARAMS((const char *, int)); +static char *find_user_command_internal PARAMS((const char *, int)); +static char *find_user_command_in_path PARAMS((const char *, char *, int, int *)); +static char *find_in_path_element PARAMS((const char *, char *, int, int, struct stat *, int *)); +static char *find_absolute_program PARAMS((const char *, int)); -static char *get_next_path_element __P((char *, int *)); +static char *get_next_path_element PARAMS((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 @@ -63,7 +69,7 @@ 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; +int check_hashed_filenames = CHECKHASH_DEFAULT; /* DOT_FOUND_IN_SEARCH becomes non-zero when find_user_command () encounters a `.' as the directory pathname while scanning the @@ -71,9 +77,39 @@ int check_hashed_filenames; containing the file of interest. */ int dot_found_in_search = 0; +/* Set up EXECIGNORE; a blacklist of patterns that executable files should not + match. */ +static struct ignorevar execignore = +{ + "EXECIGNORE", + NULL, + 0, + NULL, + NULL +}; + +void +setup_exec_ignore (varname) + char *varname; +{ + setup_ignore_patterns (&execignore); +} + +static int +exec_name_should_ignore (name) + const char *name; +{ + struct ign *p; + + for (p = execignore.ignores; p && p->val; p++) + if (strmatch (p->val, (char *)name, FNMATCH_EXTFLAG|FNM_CASEFOLD) != FNM_NOMATCH) + return 1; + return 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. + The EXECABLE bit is non-zero the file is executable. Zero is returned if the file is not found. */ int file_status (name) @@ -98,7 +134,7 @@ file_status (name) 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) + if (exec_name_should_ignore (name) == 0 && eaccess (name, X_OK) == 0) r |= FS_EXECABLE; if (eaccess (name, R_OK) == 0) r |= FS_READABLE; @@ -108,7 +144,7 @@ file_status (name) /* 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) + if (exec_name_should_ignore (name) == 0 && access (name, X_OK) == 0) r |= FS_EXECABLE; if (access (name, R_OK) == 0) r |= FS_READABLE; @@ -125,7 +161,7 @@ file_status (name) if (current_user.euid == (uid_t)0) { r |= FS_READABLE; - if (finfo.st_mode & S_IXUGO) + if (exec_name_should_ignore (name) == 0 && (finfo.st_mode & S_IXUGO)) r |= FS_EXECABLE; return r; } @@ -133,7 +169,7 @@ file_status (name) /* 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) + if (exec_name_should_ignore (name) == 0 && (finfo.st_mode & S_IXUSR)) r |= FS_EXECABLE; if (finfo.st_mode & S_IRUSR) r |= FS_READABLE; @@ -142,7 +178,7 @@ file_status (name) /* If we are in the owning group, the group permissions apply. */ else if (group_member (finfo.st_gid)) { - if (finfo.st_mode & S_IXGRP) + if (exec_name_should_ignore (name) == 0 && (finfo.st_mode & S_IXGRP)) r |= FS_EXECABLE; if (finfo.st_mode & S_IRGRP) r |= FS_READABLE; @@ -151,7 +187,7 @@ file_status (name) /* Else we check whether `others' have permission to execute the file */ else { - if (finfo.st_mode & S_IXOTH) + if (exec_name_should_ignore (name) == 0 && finfo.st_mode & S_IXOTH) r |= FS_EXECABLE; if (finfo.st_mode & S_IROTH) r |= FS_READABLE; @@ -172,6 +208,10 @@ executable_file (file) int s; s = file_status (file); +#if defined (EISDIR) + if (s & FS_DIRECTORY) + errno = EISDIR; /* let's see if we can improve error messages */ +#endif return ((s & FS_EXECABLE) && ((s & FS_DIRECTORY) == 0)); } @@ -226,7 +266,7 @@ _find_user_command_internal (name, flags) /* 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? */ + if (var = find_variable_tempenv ("PATH")) /* XXX could be array? */ path_list = value_cell (var); else path_list = (char *)NULL; @@ -234,7 +274,7 @@ _find_user_command_internal (name, flags) if (path_list == 0 || *path_list == '\0') return (savestring (name)); - cmd = find_user_command_in_path (name, path_list, flags); + cmd = find_user_command_in_path (name, path_list, flags, (int *)0); return (cmd); } @@ -287,12 +327,17 @@ get_next_path_element (path_list, path_index_pointer) /* 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. */ + in $PATH. If (FLAGS&CMDSRCH_HASH) is non-zero, insert the instance of + PATHNAME found in $PATH into the command hash table. + If (FLAGS&CMDSRCH_STDPATH) is non-zero, we are running in a `command -p' + environment and should use the Posix standard path. + Returns a newly-allocated string. */ char * -search_for_command (pathname) +search_for_command (pathname, flags) const char *pathname; + int flags; { - char *hashed_file, *command; + char *hashed_file, *command, *path_list; int temp_path, st; SHELL_VAR *path; @@ -300,15 +345,13 @@ search_for_command (pathname) /* 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); + path = find_variable_tempenv ("PATH"); 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) + if (temp_path == 0 && (flags & CMDSRCH_STDPATH) == 0 && absolute_program (pathname) == 0) hashed_file = phash_search (pathname); /* If a command found in the hash table no longer exists, we need to @@ -334,18 +377,40 @@ search_for_command (pathname) 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) + if (flags & CMDSRCH_STDPATH) + path_list = conf_standard_path (); + else if (temp_path || path) + path_list = value_cell (path); + else + path_list = 0; + + command = find_user_command_in_path (pathname, path_list, FS_EXEC_PREFERRED|FS_NODIRS, &st); + + if (command && hashing_enabled && temp_path == 0 && (flags & CMDSRCH_HASH)) { - command = find_user_command_in_path (pathname, value_cell (path), - FS_EXEC_PREFERRED|FS_NODIRS); + /* If we found the full pathname the same as the command name, the + command probably doesn't exist. Don't put it into the hash + table unless it's an executable file in the current directory. */ + if (STREQ (command, pathname)) + { + if (st & FS_EXECABLE) + phash_insert ((char *)pathname, command, dot_found_in_search, 1); + } + /* If we're in posix mode, don't add files without the execute bit + to the hash table. */ + else if (posixly_correct || check_hashed_filenames) + { + if (st & FS_EXECABLE) + phash_insert ((char *)pathname, command, dot_found_in_search, 1); + } + else + phash_insert ((char *)pathname, command, dot_found_in_search, 1); } - 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 */ + + if (flags & CMDSRCH_STDPATH) + free (path_list); } + return (command); } @@ -389,7 +454,8 @@ user_command_matches (name, flags, state) name_len = strlen (name); file_to_lose_on = (char *)NULL; dot_found_in_search = 0; - stat (".", &dotinfo); + if (stat (".", &dotinfo) < 0) + dotinfo.st_dev = dotinfo.st_ino = 0; /* so same_file won't match */ path_list = get_string_value ("PATH"); path_index = 0; } @@ -401,8 +467,7 @@ user_command_matches (name, flags, state) if (path_element == 0) break; - match = find_in_path_element (name, path_element, flags, name_len, &dotinfo); - + match = find_in_path_element (name, path_element, flags, name_len, &dotinfo, (int *)0); free (path_element); if (match == 0) @@ -455,19 +520,22 @@ find_absolute_program (name, flags) } static char * -find_in_path_element (name, path, flags, name_len, dotinfop) +find_in_path_element (name, path, flags, name_len, dotinfop, rflagsp) const char *name; char *path; int flags, name_len; struct stat *dotinfop; + int *rflagsp; { int status; char *full_path, *xpath; - xpath = (*path == '~') ? bash_tilde_expand (path, 0) : path; + xpath = (posixly_correct == 0 && *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. `./.') */ + /* We could also do this or something similar for all relative pathnames + found while searching PATH. */ if (dot_found_in_search == 0 && *xpath == '.') dot_found_in_search = same_file (".", xpath, dotinfop, (struct stat *)NULL); @@ -478,6 +546,9 @@ find_in_path_element (name, path, flags, name_len, dotinfop) if (xpath != path) free (xpath); + if (rflagsp) + *rflagsp = status; + if ((status & FS_EXISTS) == 0) { free (full_path); @@ -506,7 +577,7 @@ find_in_path_element (name, path, flags, name_len, dotinfop) /* 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) + if ((flags & FS_EXEC_PREFERRED) && file_to_lose_on == 0 && exec_name_should_ignore (full_path) == 0) file_to_lose_on = savestring (full_path); /* If we want only executable files, or we don't want directories and @@ -536,19 +607,22 @@ find_in_path_element (name, path, flags, name_len, dotinfop) FS_NODIRS: Don't find any directories. */ static char * -find_user_command_in_path (name, path_list, flags) +find_user_command_in_path (name, path_list, flags, rflagsp) const char *name; char *path_list; - int flags; + int flags, *rflagsp; { char *full_path, *path; - int path_index, name_len; + int path_index, name_len, rflags; 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 (rflagsp) + *rflagsp = 0; + if (absolute_program (name)) { full_path = find_absolute_program (name, flags); @@ -560,7 +634,8 @@ find_user_command_in_path (name, path_list, flags) file_to_lose_on = (char *)NULL; name_len = strlen (name); - stat (".", &dotinfo); + if (stat (".", &dotinfo) < 0) + dotinfo.st_dev = dotinfo.st_ino = 0; path_index = 0; while (path_list[path_index]) @@ -574,12 +649,12 @@ find_user_command_in_path (name, path_list, flags) /* 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); + full_path = find_in_path_element (name, path, flags, name_len, &dotinfo, &rflags); 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)) + /* We use the file status flag bits to check whether full_path is a + directory, which we reject here. */ + if (full_path && (rflags & FS_DIRECTORY)) { free (full_path); continue; @@ -587,6 +662,8 @@ find_user_command_in_path (name, path_list, flags) if (full_path) { + if (rflagsp) + *rflagsp = rflags; FREE (file_to_lose_on); return (full_path); } @@ -598,7 +675,7 @@ find_user_command_in_path (name, path_list, flags) 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)) + if (file_to_lose_on && (flags & FS_NODIRS) && file_isdir (file_to_lose_on)) { free (file_to_lose_on); file_to_lose_on = (char *)NULL; @@ -606,3 +683,14 @@ find_user_command_in_path (name, path_list, flags) return (file_to_lose_on); } + +/* External interface to find a command given a $PATH. Separate from + find_user_command_in_path to allow future customization. */ +char * +find_in_path (name, path_list, flags) + const char *name; + char *path_list; + int flags; +{ + return (find_user_command_in_path (name, path_list, flags, (int *)0)); +} diff --git a/findcmd.h b/findcmd.h index db74c1c..bf45781 100644 --- a/findcmd.h +++ b/findcmd.h @@ -1,6 +1,6 @@ /* findcmd.h - functions from findcmd.c. */ -/* Copyright (C) 1997-2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015,2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,13 +23,25 @@ #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)); +/* Flags for search_for_command */ +#define CMDSRCH_HASH 0x01 +#define CMDSRCH_STDPATH 0x02 +#define CMDSRCH_TEMPENV 0x04 + +extern int file_status PARAMS((const char *)); +extern int executable_file PARAMS((const char *)); +extern int is_directory PARAMS((const char *)); +extern int executable_or_directory PARAMS((const char *)); +extern char *find_user_command PARAMS((const char *)); +extern char *find_in_path PARAMS((const char *, char *, int)); +extern char *find_path_file PARAMS((const char *)); +extern char *search_for_command PARAMS((const char *, int)); +extern char *user_command_matches PARAMS((const char *, int, int)); +extern void setup_exec_ignore PARAMS((char *)); + +extern int dot_found_in_search; + +/* variables managed via shopt */ +extern int check_hashed_filenames; #endif /* _FINDCMD_H_ */ diff --git a/flags.c b/flags.c index d3b38ad..30f6c13 100644 --- a/flags.c +++ b/flags.c @@ -1,7 +1,7 @@ /* flags.c -- Everything about flags except the `set' command. That is in builtins.c */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,6 +25,7 @@ #endif #include "shell.h" +#include "execute_cmd.h" #include "flags.h" #if defined (BANG_HISTORY) @@ -32,18 +33,9 @@ #endif #if defined (JOB_CONTROL) -extern int set_job_control __P((int)); +extern int set_job_control PARAMS((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. */ @@ -59,7 +51,9 @@ int mark_modified_vars = 0; int asynchronous_notification = 0; /* Non-zero means exit immediately if a command exits with a non-zero - exit status. */ + exit status. The first is what controls set -e; the second is what + bash uses internally. */ +int errexit_flag = 0; int exit_immediately_on_error = 0; /* Non-zero means disable filename globbing. */ @@ -87,6 +81,7 @@ int unbound_vars_is_error = 0; /* Non-zero means type out input lines after you read them. */ int echo_input_at_read = 0; +int verbose_flag = 0; /* Non-zero means type out the command definition after reading, but before executing. */ @@ -117,16 +112,14 @@ int no_symbolic_links = 0; 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; +int history_expansion = HISTEXPAND_DEFAULT; +int histexp_flag = 0; #endif /* BANG_HISTORY */ /* Non-zero means that we allow comments to appear in interactive commands. */ @@ -175,7 +168,7 @@ const struct flags_alist shell_flags[] = { #if defined (JOB_CONTROL) { 'b', &asynchronous_notification }, #endif /* JOB_CONTROL */ - { 'e', &exit_immediately_on_error }, + { 'e', &errexit_flag }, { 'f', &disallow_filename_globbing }, { 'h', &hashing_enabled }, { 'i', &forced_interactive }, @@ -190,7 +183,7 @@ const struct flags_alist shell_flags[] = { #endif /* RESTRICTED_SHELL */ { 't', &just_one_command }, { 'u', &unbound_vars_is_error }, - { 'v', &echo_input_at_read }, + { 'v', &verbose_flag }, { 'x', &echo_command_at_execute }, /* New flags that control non-standard things. */ @@ -203,9 +196,8 @@ const struct flags_alist shell_flags[] = { { 'C', &noclobber }, { 'E', &error_trace_mode }, #if defined (BANG_HISTORY) - { 'H', &history_expansion }, + { 'H', &histexp_flag }, #endif /* BANG_HISTORY */ - { 'I', &no_invisible_vars }, { 'P', &no_symbolic_links }, { 'T', &function_trace_mode }, {0, (int *)NULL} @@ -250,7 +242,6 @@ change_flag (flag, on_or_off) return (FLAG_ERROR); old_value = *value; - *value = (on_or_off == FLAG_ON) ? 1 : 0; /* Special cases for a few flags. */ @@ -258,6 +249,7 @@ change_flag (flag, on_or_off) { #if defined (BANG_HISTORY) case 'H': + history_expansion = histexp_flag; if (on_or_off == FLAG_ON) bash_initialize_history (); break; @@ -269,6 +261,11 @@ change_flag (flag, on_or_off) break; #endif /* JOB_CONTROL */ + case 'e': + if (builtin_ignoring_errexit == 0) + exit_immediately_on_error = errexit_flag; + break; + case 'n': if (interactive_shell) read_but_dont_execute = 0; @@ -286,6 +283,9 @@ change_flag (flag, on_or_off) break; #endif + case 'v': + echo_input_at_read = verbose_flag; + break; } return (old_value); @@ -313,14 +313,45 @@ which_set_flags () return (temp); } +char * +get_current_flags () +{ + char *temp; + int i; + + temp = (char *)xmalloc (1 + NUM_SHELL_FLAGS); + for (i = 0; shell_flags[i].name; i++) + temp[i] = *(shell_flags[i].value); + temp[i] = '\0'; + return (temp); +} + +void +set_current_flags (bitmap) + const char *bitmap; +{ + int i; + + if (bitmap == 0) + return; + for (i = 0; shell_flags[i].name; i++) + *(shell_flags[i].value) = bitmap[i]; +} + void reset_shell_flags () { - mark_modified_vars = exit_immediately_on_error = disallow_filename_globbing = 0; + mark_modified_vars = 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; + noclobber = unbound_vars_is_error = 0; echo_command_at_execute = jobs_m_flag = forced_interactive = 0; - no_symbolic_links = no_invisible_vars = privileged_mode = pipefail_opt = 0; + no_symbolic_links = 0; + privileged_mode = pipefail_opt = 0; + + error_trace_mode = function_trace_mode = 0; + + exit_immediately_on_error = errexit_flag = 0; + echo_input_at_read = verbose_flag = 0; hashing_enabled = interactive_comments = 1; @@ -329,7 +360,7 @@ reset_shell_flags () #endif #if defined (BANG_HISTORY) - history_expansion = 1; + histexp_flag = 0; #endif #if defined (BRACE_EXPANSION) diff --git a/flags.h b/flags.h index d8fa757..a3b5daa 100644 --- a/flags.h +++ b/flags.h @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -41,14 +41,18 @@ extern const struct flags_alist shell_flags[]; extern char optflags[]; extern int - mark_modified_vars, exit_immediately_on_error, disallow_filename_globbing, + mark_modified_vars, errexit_flag, 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, + just_one_command, unbound_vars_is_error, echo_input_at_read, verbose_flag, + echo_command_at_execute, noclobber, + hashing_enabled, forced_interactive, privileged_mode, jobs_m_flag, asynchronous_notification, interactive_comments, no_symbolic_links, function_trace_mode, error_trace_mode, pipefail_opt; +/* -c, -s invocation options -- not really flags, but they show up in $- */ +extern int want_pending_command, read_from_stdin; + #if 0 extern int lexical_scoping; #endif @@ -59,6 +63,7 @@ extern int brace_expansion; #if defined (BANG_HISTORY) extern int history_expansion; +extern int histexp_flag; #endif /* BANG_HISTORY */ #if defined (RESTRICTED_SHELL) @@ -66,12 +71,15 @@ 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 int *find_flag PARAMS((int)); +extern int change_flag PARAMS((int, int)); +extern char *which_set_flags PARAMS((void)); +extern void reset_shell_flags PARAMS((void)); + +extern char *get_current_flags PARAMS((void)); +extern void set_current_flags PARAMS((const char *)); -extern void initialize_flags __P((void)); +extern void initialize_flags PARAMS((void)); /* A macro for efficiency. */ #define change_flag_char(flag, on_or_off) change_flag (flag, on_or_off) diff --git a/general.c b/general.c index 26c7d3d..bda39f4 100644 --- a/general.c +++ b/general.c @@ -1,6 +1,6 @@ /* general.c -- Stuff that is used by all files. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,7 +21,7 @@ #include "config.h" #include "bashtypes.h" -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif #include "posixstat.h" @@ -39,7 +39,18 @@ #include "bashintl.h" #include "shell.h" +#include "parser.h" +#include "flags.h" +#include "findcmd.h" #include "test.h" +#include "trap.h" +#include "pathexp.h" + +#include "builtins/common.h" + +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif #include @@ -47,20 +58,47 @@ 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; +#ifdef __CYGWIN__ +# include +#endif -static char *bash_special_tilde_expansions __P((char *)); -static int unquoted_tilde_word __P((const char *)); -static void initialize_group_array __P((void)); +static char *bash_special_tilde_expansions PARAMS((char *)); +static int unquoted_tilde_word PARAMS((const char *)); +static void initialize_group_array PARAMS((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'. */ +/* Do whatever is necessary to initialize `Posix mode'. This currently + modifies the following variables which are controlled via shopt: + interactive_comments + source_uses_path + expand_aliases + inherit_errexit + print_shift_error + posixglob + + and the following variables which cannot be user-modified: + + source_searches_cwd + + If we add to the first list, we need to change the table and functions + below */ + +static struct { + int *posix_mode_var; +} posix_vars[] = +{ + &interactive_comments, + &source_uses_path, + &expaliases_flag, + &inherit_errexit, + &print_shift_error, + 0 +}; + +static char *saved_posix_vars = 0; + void posix_initialize (on) int on; @@ -68,18 +106,65 @@ posix_initialize (on) /* Things that should be turned on when posix mode is enabled. */ if (on != 0) { - interactive_comments = source_uses_path = expand_aliases = 1; + interactive_comments = source_uses_path = 1; + expand_aliases = expaliases_flag = 1; + inherit_errexit = 1; source_searches_cwd = 0; + print_shift_error = 1; } /* Things that should be turned on when posix mode is disabled. */ - if (on == 0) + else if (saved_posix_vars) /* on == 0, restore saved settings */ + { + set_posix_options (saved_posix_vars); + expand_aliases = expaliases_flag; + free (saved_posix_vars); + saved_posix_vars = 0; + } + else /* on == 0, restore a default set of settings */ { source_searches_cwd = 1; - expand_aliases = interactive_shell; + expand_aliases = expaliases_flag = interactive_shell; /* XXX */ + print_shift_error = 0; } } +int +num_posix_options () +{ + return ((sizeof (posix_vars) / sizeof (posix_vars[0])) - 1); +} + +char * +get_posix_options (bitmap) + char *bitmap; +{ + register int i; + + if (bitmap == 0) + bitmap = (char *)xmalloc (num_posix_options ()); /* no trailing NULL */ + for (i = 0; posix_vars[i].posix_mode_var; i++) + bitmap[i] = *(posix_vars[i].posix_mode_var); + return bitmap; +} + +#undef save_posix_options +void +save_posix_options () +{ + saved_posix_vars = get_posix_options (saved_posix_vars); +} + +void +set_posix_options (bitmap) + const char *bitmap; +{ + register int i; + + for (i = 0; posix_vars[i].posix_mode_var; i++) + *(posix_vars[i].posix_mode_var) = bitmap[i]; +} + /* **************************************************************** */ /* */ /* Functions to convert to and from and display non-standard types */ @@ -146,9 +231,9 @@ print_rlimtype (n, addnl) /* Return non-zero if all of the characters in STRING are digits. */ int all_digits (string) - char *string; + const char *string; { - register char *s; + register const char *s; for (s = string; *s; s++) if (DIGIT (*s) == 0) @@ -171,6 +256,9 @@ legal_number (string, result) if (result) *result = 0; + if (string == 0) + return 0; + errno = 0; value = strtoimax (string, &ep, 10); if (errno || ep == string) @@ -182,7 +270,7 @@ legal_number (string, result) /* If *string is not '\0' but *ep is '\0' on return, the entire string is valid. */ - if (string && *string && *ep == '\0') + if (*string && *ep == '\0') { if (result) *result = value; @@ -200,9 +288,9 @@ legal_number (string, result) digit. */ int legal_identifier (name) - char *name; + const char *name; { - register char *s; + register const char *s; unsigned char c; if (!name || !(c = *name) || (legal_variable_starter (c) == 0)) @@ -216,22 +304,73 @@ legal_identifier (name) return (1); } +/* Return 1 if NAME is a valid value that can be assigned to a nameref + variable. FLAGS can be 2, in which case the name is going to be used + to create a variable. Other values are currently unused, but could + be used to allow values to be stored and indirectly referenced, but + not used in assignments. */ +int +valid_nameref_value (name, flags) + const char *name; + int flags; +{ + if (name == 0 || *name == 0) + return 0; + + /* valid identifier */ +#if defined (ARRAY_VARS) + if (legal_identifier (name) || (flags != 2 && valid_array_reference (name, 0))) +#else + if (legal_identifier (name)) +#endif + return 1; + + return 0; +} + +int +check_selfref (name, value, flags) + const char *name; + char *value; + int flags; +{ + char *t; + + if (STREQ (name, value)) + return 1; + +#if defined (ARRAY_VARS) + if (valid_array_reference (value, 0)) + { + t = array_variable_name (value, 0, (char **)NULL, (int *)NULL); + if (t && STREQ (name, t)) + { + free (t); + return 1; + } + free (t); + } +#endif + + return 0; /* not a self reference */ +} + /* 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, + does not contain a dollar sign, nor is quoted in any way. + If CHECK_WORD is non-zero, the word is checked to ensure that it consists of only letters, - digits, and underscores. */ + digits, and underscores, and does not consist of all digits. */ int check_identifier (word, check_word) WORD_DESC *word; int check_word; { - if ((word->flags & (W_HASDOLLAR|W_QUOTED)) || all_digits (word->word)) + if (word->flags & (W_HASDOLLAR|W_QUOTED)) /* XXX - HASDOLLAR? */ { internal_error (_("`%s': not a valid identifier"), word->word); return (0); } - else if (check_word && legal_identifier (word->word) == 0) + else if (check_word && (all_digits (word->word) || legal_identifier (word->word) == 0)) { internal_error (_("`%s': not a valid identifier"), word->word); return (0); @@ -240,15 +379,45 @@ check_identifier (word, check_word) return (1); } +/* Return 1 if STRING is a function name that the shell will import from + the environment. Currently we reject attempts to import shell functions + containing slashes, beginning with newlines or containing blanks. In + Posix mode, we require that STRING be a valid shell identifier. Not + used yet. */ +int +importable_function_name (string, len) + const char *string; + size_t len; +{ + if (absolute_program (string)) /* don't allow slash */ + return 0; + if (*string == '\n') /* can't start with a newline */ + return 0; + if (shellblank (*string) || shellblank(string[len-1])) + return 0; + return (posixly_correct ? legal_identifier (string) : 1); +} + +int +exportable_function_name (string) + const char *string; +{ + if (absolute_program (string)) + return 0; + if (mbschr (string, '=') != 0) + return 0; + 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; + const char *string; int flags; { - register char *s; + register const char *s; for (s = string; *s; s++) if (shellbreak (*s) || shellxquote (*s) || shellexp (*s) || (*s == '/')) @@ -257,7 +426,9 @@ legal_alias_name (string, flags) } /* Returns non-zero if STRING is an assignment statement. The returned value - is the index of the `=' sign. */ + is the index of the `=' sign. If FLAGS&1 we are expecting a compound assignment + and require an array subscript before the `=' to denote an assignment + statement. */ int assignment (string, flags) const char *string; @@ -269,7 +440,17 @@ assignment (string, flags) c = string[indx = 0]; #if defined (ARRAY_VARS) - if ((legal_variable_starter (c) == 0) && (flags == 0 || c != '[')) /* ] */ + /* If parser_state includes PST_COMPASSIGN, FLAGS will include 1, so we are + parsing the contents of a compound assignment. If parser_state includes + PST_REPARSE, we are in the middle of an assignment statement and breaking + the words between the parens into words and assignment statements, but + we don't need to check for that right now. Within a compound assignment, + the subscript is required to make the word an assignment statement. If + we don't have a subscript, even if the word is a valid assignment + statement otherwise, we don't want to treat it as one. */ + if ((flags & 1) && c != '[') /* ] */ + return (0); + else if ((flags & 1) == 0 && legal_variable_starter (c) == 0) #else if (legal_variable_starter (c) == 0) #endif @@ -285,7 +466,9 @@ assignment (string, flags) #if defined (ARRAY_VARS) if (c == '[') { - newi = skipsubscript (string, indx, 0); + newi = skipsubscript (string, indx, (flags & 2) ? 1 : 0); + /* XXX - why not check for blank subscripts here, if we do in + valid_array_reference? */ if (string[newi++] != ']') return (0); if (string[newi] == '+' && string[newi+1] == '=') @@ -308,6 +491,20 @@ assignment (string, flags) return (0); } +int +line_isblank (line) + const char *line; +{ + register int i; + + if (line == 0) + return 0; /* XXX */ + for (i = 0; line[i]; i++) + if (isblank ((unsigned char)line[i]) == 0) + break; + return (line[i] == '\0'); +} + /* **************************************************************** */ /* */ /* Functions to manage files and file descriptors */ @@ -355,6 +552,14 @@ sh_unset_nodelay_mode (fd) return 0; } +/* Just a wrapper for the define in include/filecntl.h */ +int +sh_setclexec (fd) + int fd; +{ + return (SET_CLOSE_ON_EXEC (fd)); +} + /* Return 1 if file descriptor FD is valid; 0 otherwise. */ int sh_validfd (fd) @@ -363,6 +568,14 @@ sh_validfd (fd) return (fcntl (fd, F_GETFD, 0) >= 0); } +int +fd_ispipe (fd) + int fd; +{ + errno = 0; + return ((lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE)); +} + /* There is a bug in the NeXT 2.1 rlogind that causes opens of /dev/tty to fail. */ @@ -388,7 +601,8 @@ check_dev_tty () return; tty_fd = open (tty, O_RDWR|O_NONBLOCK); } - close (tty_fd); + if (tty_fd >= 0) + close (tty_fd); } /* Return 1 if PATH1 and PATH2 are the same file. This is kind of @@ -396,7 +610,7 @@ check_dev_tty () corresponding to PATH1 and PATH2, respectively. */ int same_file (path1, path2, stp1, stp2) - char *path1, *path2; + const char *path1, *path2; struct stat *stp1, *stp2; { struct stat st1, st2; @@ -465,16 +679,24 @@ move_to_high_fd (fd, check_new, maxfd) int check_binary_file (sample, sample_len) - char *sample; + const char *sample; int sample_len; { register int i; + int nline; unsigned char c; + if (sample_len >= 4 && sample[0] == 0x7f && sample[1] == 'E' && sample[2] == 'L' && sample[3] == 'F') + return 1; + + /* Generally we check the first line for NULs. If the first line looks like + a `#!' interpreter specifier, we look for NULs in the first two lines. */ + nline = (sample[0] == '#' && sample[1] == '!') ? 2 : 1; + for (i = 0; i < sample_len; i++) { c = sample[i]; - if (c == '\n') + if (c == '\n' && --nline == 0) return (0); if (c == '\0') return (1); @@ -526,7 +748,7 @@ sh_closepipe (pv) int file_exists (fn) - char *fn; + const char *fn; { struct stat sb; @@ -535,7 +757,7 @@ file_exists (fn) int file_isdir (fn) - char *fn; + const char *fn; { struct stat sb; @@ -544,11 +766,27 @@ file_isdir (fn) int file_iswdir (fn) - char *fn; + const char *fn; { return (file_isdir (fn) && sh_eaccess (fn, W_OK) == 0); } +/* Return 1 if STRING is "." or "..", optionally followed by a directory + separator */ +int +path_dot_or_dotdot (string) + const char *string; +{ + if (string == 0 || *string == '\0' || *string != '.') + return (0); + + /* string[0] == '.' */ + if (PATHSEP(string[1]) || (string[1] == '.' && PATHSEP(string[2]))) + return (1); + + return (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 @@ -592,7 +830,7 @@ absolute_program (string) begin with. */ char * make_absolute (string, dot_path) - char *string, *dot_path; + const char *string, *dot_path; { char *result; @@ -601,7 +839,8 @@ make_absolute (string, dot_path) { char pathbuf[PATH_MAX + 1]; - cygwin_conv_to_full_posix_path (string, pathbuf); + /* WAS cygwin_conv_to_full_posix_path (string, pathbuf); */ + cygwin_conv_path (CCP_WIN_A_TO_POSIX, string, pathbuf, PATH_MAX); result = savestring (pathbuf); } #else @@ -740,12 +979,33 @@ trim_pathname (name, maxlen) *nbeg++ = '.'; nlen = nend - ntail; - memcpy (nbeg, ntail, nlen); + memmove (nbeg, ntail, nlen); nbeg[nlen] = '\0'; return name; } +/* Return a printable representation of FN without special characters. The + caller is responsible for freeing memory if this returns something other + than its argument. If FLAGS is non-zero, we are printing for portable + re-input and should single-quote filenames appropriately. */ +char * +printable_filename (fn, flags) + char *fn; + int flags; +{ + char *newf; + + if (ansic_shouldquote (fn)) + newf = ansic_quote (fn, 0, NULL); + else if (flags && sh_contains_shell_metas (fn)) + newf = sh_single_quote (fn); + else + newf = fn; + + return newf; +} + /* 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. */ @@ -800,7 +1060,7 @@ extract_colon_unit (string, p_index) /* **************************************************************** */ #if defined (PUSHD_AND_POPD) -extern char *get_dirstack_from_string __P((char *)); +extern char *get_dirstack_from_string PARAMS((char *)); #endif static char **bash_tilde_prefixes; @@ -949,13 +1209,9 @@ bash_tilde_expand (s, assign_p) const char *s; int assign_p; { - int old_immed, old_term, r; + int 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) @@ -963,8 +1219,9 @@ bash_tilde_expand (s, assign_p) r = (*s == '~') ? unquoted_tilde_word (s) : 1; ret = r ? tilde_expand (s) : savestring (s); - interrupt_immediately = old_immed; - terminate_immediately = old_term; + + QUIT; + return (ret); } @@ -1134,3 +1391,61 @@ get_group_array (ngp) *ngp = ngroups; return group_iarray; } + +/* **************************************************************** */ +/* */ +/* Miscellaneous functions */ +/* */ +/* **************************************************************** */ + +/* 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. */ +char * +conf_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 */ +} + +int +default_columns () +{ + char *v; + int c; + + c = -1; + v = get_string_value ("COLUMNS"); + if (v && *v) + { + c = atoi (v); + if (c > 0) + return c; + } + + if (check_window_size) + get_new_window_size (0, (int *)0, &c); + + return (c > 0 ? c : 80); +} + + diff --git a/general.h b/general.h index b61444d..0adb694 100644 --- a/general.h +++ b/general.h @@ -1,6 +1,6 @@ /* general.h -- defines that everybody likes to use. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -64,7 +64,7 @@ extern char *strchr (), *strrchr (); #endif #if !defined (strcpy) && (defined (HAVE_DECL_STRCPY) && !HAVE_DECL_STRCPY) -extern char *strcpy __P((char *, const char *)); +extern char *strcpy PARAMS((char *, const char *)); #endif #if !defined (savestring) @@ -94,15 +94,34 @@ extern char *strcpy __P((char *, const char *)); /* Nonzero if the integer type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) +/* The width in bits of the integer type or expression T. + Padding bits are not supported; this is checked at compile-time below. */ +#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) + +/* Bound on length of the string representing an unsigned integer + value representable in B bits. log10 (2.0) < 146/485. The + smallest value of B where this bound is not tight is 2621. */ +#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) + /* 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 \ + ((TYPE_WIDTH (t) - TYPE_SIGNED (t)) * 302 / 1000 \ + 1 + TYPE_SIGNED (t)) +/* Updated version adapted from gnulib/intprops.h, not used right now. + Changes the approximation of log10(2) from 302/1000 to 146/485. */ +#if 0 +#define INT_STRLEN_BOUND(t) \ + (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - TYPE_SIGNED (t)) + TYPE_SIGNED(t)) +#endif + +/* Bound on buffer size needed to represent an integer type or expression T, + including the terminating null. */ +#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) /* Define exactly what a legal shell identifier consists of. */ #define legal_variable_starter(c) (ISALPHA(c) || (c == '_')) @@ -126,7 +145,7 @@ typedef struct { int token; } STRING_INT_ALIST; -/* A macro to avoid making an uneccessary function call. */ +/* A macro to avoid making an unnecessary function call. */ #define REVERSE_LIST(list, type) \ ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \ : (type)(list)) @@ -188,44 +207,48 @@ typedef char **CPPFunction (); /* no longer used */ /* 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 int sh_intfunc_t PARAMS((int)); +typedef int sh_ivoidfunc_t PARAMS((void)); +typedef int sh_icpfunc_t PARAMS((char *)); +typedef int sh_icppfunc_t PARAMS((char **)); +typedef int sh_iptrfunc_t PARAMS((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 void sh_voidfunc_t PARAMS((void)); +typedef void sh_vintfunc_t PARAMS((int)); +typedef void sh_vcpfunc_t PARAMS((char *)); +typedef void sh_vcppfunc_t PARAMS((char **)); +typedef void sh_vptrfunc_t PARAMS((PTR_T)); -typedef int sh_wdesc_func_t __P((WORD_DESC *)); -typedef int sh_wlist_func_t __P((WORD_LIST *)); +typedef int sh_wdesc_func_t PARAMS((WORD_DESC *)); +typedef int sh_wlist_func_t PARAMS((WORD_LIST *)); -typedef int sh_glist_func_t __P((GENERIC_LIST *)); +typedef int sh_glist_func_t PARAMS((GENERIC_LIST *)); -typedef char *sh_string_func_t __P((char *)); /* like savestring, et al. */ +typedef char *sh_string_func_t PARAMS((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 */ +typedef int sh_msg_func_t PARAMS((const char *, ...)); /* printf(3)-like */ +typedef void sh_vmsg_func_t PARAMS((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 void sh_sv_func_t PARAMS((char *)); /* sh_vcpfunc_t */ +typedef void sh_free_func_t PARAMS((PTR_T)); /* sh_vptrfunc_t */ +typedef void sh_resetsig_func_t PARAMS((int)); /* sh_vintfunc_t */ + +typedef int sh_ignore_func_t PARAMS((const char *)); /* sh_icpfunc_t */ -typedef int sh_ignore_func_t __P((const char *)); /* sh_icpfunc_t */ +typedef int sh_assign_func_t PARAMS((const char *)); +typedef int sh_wassign_func_t PARAMS((WORD_DESC *, int)); -typedef int sh_assign_func_t __P((const char *)); /* sh_icpfunc_t */ -typedef int sh_wassign_func_t __P((WORD_DESC *)); +typedef int sh_load_func_t PARAMS((char *)); +typedef void sh_unload_func_t PARAMS((char *)); -typedef int sh_builtin_func_t __P((WORD_LIST *)); /* sh_wlist_func_t */ +typedef int sh_builtin_func_t PARAMS((WORD_LIST *)); /* sh_wlist_func_t */ #endif /* SH_FUNCTION_TYPEDEF */ #define NOW ((time_t) time ((time_t *) 0)) +#define GETTIME(tv) gettimeofday(&(tv), NULL) /* Some defines for calling file status functions. */ #define FS_EXISTS 0x1 @@ -267,61 +290,85 @@ typedef int QSFUNC (); #endif /* __CYGWIN__ */ #define PATHSEP(c) (ISDIRSEP(c) || (c) == 0) +#define DOT_OR_DOTDOT(s) (s[0] == '.' && (s[1] == 0 || (s[1] == '.' && s[2] == 0))) + +#if defined (HANDLE_MULTIBYTE) +#define WDOT_OR_DOTDOT(w) (w[0] == L'.' && (w[1] == L'\0' || (w[1] == L'.' && w[2] == L'\0'))) +#endif + #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 *)); +extern PTR_T xmalloc PARAMS((size_t)); +extern PTR_T xrealloc PARAMS((void *, size_t)); +extern void xfree PARAMS((void *)); #endif /* Declarations for functions defined in general.c */ -extern void posix_initialize __P((int)); +extern void posix_initialize PARAMS((int)); + +extern int num_posix_options PARAMS((void)); +extern char *get_posix_options PARAMS((char *)); +extern void set_posix_options PARAMS((const char *)); + +extern void save_posix_options PARAMS((void)); #if defined (RLIMTYPE) -extern RLIMTYPE string_to_rlimtype __P((char *)); -extern void print_rlimtype __P((RLIMTYPE, int)); +extern RLIMTYPE string_to_rlimtype PARAMS((char *)); +extern void print_rlimtype PARAMS((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)); +extern int all_digits PARAMS((const char *)); +extern int legal_number PARAMS((const char *, intmax_t *)); +extern int legal_identifier PARAMS((const char *)); +extern int importable_function_name PARAMS((const char *, size_t)); +extern int exportable_function_name PARAMS((const char *)); +extern int check_identifier PARAMS((WORD_DESC *, int)); +extern int valid_nameref_value PARAMS((const char *, int)); +extern int check_selfref PARAMS((const char *, char *, int)); +extern int legal_alias_name PARAMS((const char *, int)); +extern int line_isblank PARAMS((const char *)); +extern int assignment PARAMS((const char *, int)); + +extern int sh_unset_nodelay_mode PARAMS((int)); +extern int sh_setclexec PARAMS((int)); +extern int sh_validfd PARAMS((int)); +extern int fd_ispipe PARAMS((int)); +extern void check_dev_tty PARAMS((void)); +extern int move_to_high_fd PARAMS((int, int, int)); +extern int check_binary_file PARAMS((const char *, int)); #ifdef _POSIXSTAT_H_ -extern int same_file __P((char *, char *, struct stat *, struct stat *)); +extern int same_file PARAMS((const char *, const char *, struct stat *, struct stat *)); #endif -extern int sh_openpipe __P((int *)); -extern int sh_closepipe __P((int *)); +extern int sh_openpipe PARAMS((int *)); +extern int sh_closepipe PARAMS((int *)); + +extern int file_exists PARAMS((const char *)); +extern int file_isdir PARAMS((const char *)); +extern int file_iswdir PARAMS((const char *)); +extern int path_dot_or_dotdot PARAMS((const char *)); +extern int absolute_pathname PARAMS((const char *)); +extern int absolute_program PARAMS((const char *)); -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 PARAMS((const char *, const char *)); +extern char *base_pathname PARAMS((char *)); +extern char *full_pathname PARAMS((char *)); +extern char *polite_directory_format PARAMS((char *)); +extern char *trim_pathname PARAMS((char *, int)); +extern char *printable_filename PARAMS((char *, int)); -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 PARAMS((char *, int *)); -extern char *extract_colon_unit __P((char *, int *)); +extern void tilde_initialize PARAMS((void)); +extern char *bash_tilde_find_word PARAMS((const char *, int, int *)); +extern char *bash_tilde_expand PARAMS((const 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 PARAMS((gid_t)); +extern char **get_group_list PARAMS((int *)); +extern int *get_group_array PARAMS((int *)); -extern int group_member __P((gid_t)); -extern char **get_group_list __P((int *)); -extern int *get_group_array __P((int *)); +extern char *conf_standard_path PARAMS((void)); +extern int default_columns PARAMS((void)); #endif /* _GENERAL_H_ */ diff --git a/hashcmd.c b/hashcmd.c index fc0bfbe..891f967 100644 --- a/hashcmd.c +++ b/hashcmd.c @@ -1,7 +1,7 @@ /* hashcmd.c - functions for managing a hash table mapping command names to full pathnames. */ -/* Copyright (C) 1997-2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,14 +31,13 @@ #include "bashansi.h" #include "shell.h" +#include "flags.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)); +static void phash_freedata PARAMS((PTR_T)); void phash_create () diff --git a/hashcmd.h b/hashcmd.h index 758f5b4..2459f20 100644 --- a/hashcmd.h +++ b/hashcmd.h @@ -1,6 +1,6 @@ /* hashcmd.h - Common defines for hashing filenames. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,7 +21,7 @@ #include "stdc.h" #include "hashlib.h" -#define FILENAME_HASH_BUCKETS 64 /* must be power of two */ +#define FILENAME_HASH_BUCKETS 256 /* must be power of two */ extern HASH_TABLE *hashed_filenames; @@ -35,9 +35,9 @@ typedef struct _pathdata { #define pathdata(x) ((PATH_DATA *)(x)->data) -extern void phash_create __P((void)); -extern void phash_flush __P((void)); +extern void phash_create PARAMS((void)); +extern void phash_flush PARAMS((void)); -extern void phash_insert __P((char *, char *, int, int)); -extern int phash_remove __P((const char *)); -extern char *phash_search __P((const char *)); +extern void phash_insert PARAMS((char *, char *, int, int)); +extern int phash_remove PARAMS((const char *)); +extern char *phash_search PARAMS((const char *)); diff --git a/hashlib.c b/hashlib.c index ea67dfc..4a7e813 100644 --- a/hashlib.c +++ b/hashlib.c @@ -34,11 +34,27 @@ #include "shell.h" #include "hashlib.h" +/* tunable constants for rehashing */ +#define HASH_REHASH_MULTIPLIER 4 +#define HASH_REHASH_FACTOR 2 + +#define HASH_SHOULDGROW(table) \ + ((table)->nentries >= (table)->nbuckets * HASH_REHASH_FACTOR) + +/* an initial approximation */ +#define HASH_SHOULDSHRINK(table) \ + (((table)->nbuckets > DEFAULT_HASH_BUCKETS) && \ + ((table)->nentries < (table)->nbuckets / HASH_REHASH_MULTIPLIER)) + /* 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 *)); +static BUCKET_CONTENTS *copy_bucket_array PARAMS((BUCKET_CONTENTS *, sh_string_func_t *)); + +static void hash_rehash PARAMS((HASH_TABLE *, int)); +static void hash_grow PARAMS((HASH_TABLE *)); +static void hash_shrink PARAMS((HASH_TABLE *)); /* Make a new hash table with BUCKETS number of buckets. Initialize each slot in the table to NULL. */ @@ -105,6 +121,60 @@ copy_bucket_array (ba, cpdata) return new_bucket; } +static void +hash_rehash (table, nsize) + HASH_TABLE *table; + int nsize; +{ + int osize, i, j; + BUCKET_CONTENTS **old_bucket_array, *item, *next; + + if (table == NULL || nsize == table->nbuckets) + return; + + osize = table->nbuckets; + old_bucket_array = table->bucket_array; + + table->nbuckets = nsize; + table->bucket_array = (BUCKET_CONTENTS **)xmalloc (table->nbuckets * sizeof (BUCKET_CONTENTS *)); + for (i = 0; i < table->nbuckets; i++) + table->bucket_array[i] = (BUCKET_CONTENTS *)NULL; + + for (j = 0; j < osize; j++) + { + for (item = old_bucket_array[j]; item; item = next) + { + next = item->next; + i = item->khash & (table->nbuckets - 1); + item->next = table->bucket_array[i]; + table->bucket_array[i] = item; + } + } + + free (old_bucket_array); +} + +static void +hash_grow (table) + HASH_TABLE *table; +{ + int nsize; + + nsize = table->nbuckets * HASH_REHASH_MULTIPLIER; + if (nsize > 0) /* overflow */ + hash_rehash (table, nsize); +} + +static void +hash_shrink (table) + HASH_TABLE *table; +{ + int nsize; + + nsize = table->nbuckets / HASH_REHASH_MULTIPLIER; + hash_rehash (table, nsize); +} + HASH_TABLE * hash_copy (table, cpdata) HASH_TABLE *table; @@ -125,6 +195,20 @@ hash_copy (table, cpdata) return new_table; } +/* This is the best 32-bit string hash function I found. It's one of the + Fowler-Noll-Vo family (FNV-1). + + The magic is in the interesting relationship between the special prime + 16777619 (2^24 + 403) and 2^32 and 2^8. */ + +#define FNV_OFFSET 2166136261 +#define FNV_PRIME 16777619 + +/* If you want to use 64 bits, use +FNV_OFFSET 14695981039346656037 +FNV_PRIME 1099511628211 +*/ + /* The `khash' check below requires that strings that compare equally with strcmp hash to the same value. */ unsigned int @@ -133,14 +217,12 @@ hash_string (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++) + for (i = FNV_OFFSET; *s; s++) { - i *= 16777619; + /* FNV-1a has the XOR first, traditional FNV-1 has the multiply first */ + + /* was i *= FNV_PRIME */ + i += (i<<1) + (i<<4) + (i<<7) + (i<<8) + (i<<24); i ^= *s; } @@ -179,6 +261,7 @@ hash_search (string, table, flags) for (list = table->bucket_array ? table->bucket_array[bucket] : 0; list; list = list->next) { + /* This is the comparison function */ if (hv == list->khash && STREQ (list->key, string)) { list->times_found++; @@ -188,6 +271,12 @@ hash_search (string, table, flags) if (flags & HASH_CREATE) { + if (HASH_SHOULDGROW (table)) + { + hash_grow (table); + bucket = HASH_BUCKET (string, table, hv); + } + list = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS)); list->next = table->bucket_array[bucket]; table->bucket_array[bucket] = list; @@ -259,6 +348,9 @@ hash_insert (string, table, flags) if (item == 0) { + if (HASH_SHOULDGROW (table)) + hash_grow (table); + bucket = HASH_BUCKET (string, table, hv); item = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS)); @@ -382,6 +474,7 @@ hash_pstats (table, name) HASH_TABLE *table, *ntable; int interrupt_immediately = 0; +int running_trap = 0; int signal_is_trapped (s) @@ -402,13 +495,23 @@ fatal_error (const char *format, ...) abort(); } +void +internal_warning (const char *format, ...) +{ +} + +int main () { char string[256]; int count = 0; BUCKET_CONTENTS *tt; +#if defined (TEST_NBUCKETS) + table = hash_create (TEST_NBUCKETS); +#else table = hash_create (0); +#endif for (;;) { diff --git a/hashlib.h b/hashlib.h index 4620e42..cf2de98 100644 --- a/hashlib.h +++ b/hashlib.h @@ -1,6 +1,6 @@ /* hashlib.h -- the data structures used in hashing in Bash. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,26 +45,26 @@ typedef struct hash_table { int nentries; /* How many entries does this table have. */ } HASH_TABLE; -typedef int hash_wfunc __P((BUCKET_CONTENTS *)); +typedef int hash_wfunc PARAMS((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 *)); +extern HASH_TABLE *hash_create PARAMS((int)); +extern HASH_TABLE *hash_copy PARAMS((HASH_TABLE *, sh_string_func_t *)); +extern void hash_flush PARAMS((HASH_TABLE *, sh_free_func_t *)); +extern void hash_dispose PARAMS((HASH_TABLE *)); +extern void hash_walk PARAMS((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 *)); +extern int hash_bucket PARAMS((const char *, HASH_TABLE *)); +extern int hash_size PARAMS((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)); +extern BUCKET_CONTENTS *hash_search PARAMS((const char *, HASH_TABLE *, int)); +extern BUCKET_CONTENTS *hash_insert PARAMS((char *, HASH_TABLE *, int)); +extern BUCKET_CONTENTS *hash_remove PARAMS((const char *, HASH_TABLE *, int)); /* Miscellaneous */ -extern unsigned int hash_string __P((const char *)); +extern unsigned int hash_string PARAMS((const char *)); /* Redefine the function as a macro for speed. */ #define hash_items(bucket, table) \ @@ -73,7 +73,7 @@ extern unsigned int hash_string __P((const char *)); (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 DEFAULT_HASH_BUCKETS 128 /* must be power of two */ #define HASH_ENTRIES(ht) ((ht) ? (ht)->nentries : 0) diff --git a/home/shemminger/vyatta/mendocino/vyatta-bash/logging.c b/home/shemminger/vyatta/mendocino/vyatta-bash/logging.c deleted file mode 100644 index f21d2a7..0000000 --- a/home/shemminger/vyatta/mendocino/vyatta-bash/logging.c +++ /dev/null @@ -1,101 +0,0 @@ -/* logging.c -- Shell command logging functionality */ - -/* This file is part of GNU Bash, the Bourne Again SHell. - - Bash is free software; you can 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. - - Bash is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with Bash; see the file COPYING. If not, write to the Free Software - Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. - - This code was originally developed by Vyatta, Inc. - Portions created by Vyatta are Copyright (C) 2010 Vyatta, Inc. */ - -#include "shell.h" -#include "filecntl.h" -#include "jobs.h" - -#include -#include -#include - -#include "logmessage.h" - -/* - * Find terminal port associated with stdin. - * Since shell is interactive - */ -static const char *get_tty() -{ - const char *tty = ttyname(0); - - if (tty) { - if (!strncmp(tty, "/dev/", 5)) - tty += 5; - } - - return tty; -} - -static mqd_t message_queue = -1; -static const char *current_tty; - -void initialize_logging () -{ - const char *tty; - - tty = get_tty(); - if (tty == NULL) - return; /* Not really an interactive shell */ - - message_queue = mq_open("/vbash", O_WRONLY); - if (message_queue == (mqd_t)-1) - return; /* No logging server running */ - - SET_CLOSE_ON_EXEC(message_queue); - - current_tty = strdup(tty); -} - -/* - * Logs the result of the child for more detailed accounting - */ -void log_process_exit (child) - PROCESS *child; -{ - size_t cc; - struct command_log *lrec; - - if (message_queue == (mqd_t) -1) /* message queue does not exist */ - return; - - if (child->command == NULL) /* no command info */ - return; - - cc = sizeof(*lrec) + strlen(child->command) + 1; - lrec = alloca(cc); - memset(lrec, 0, cc); - - lrec->pid = child->pid; - lrec->status = WEXITSTATUS(child->status); - lrec->endtime = time(0); - lrec->uid = current_user.uid; - lrec->euid = current_user.euid; - lrec->gid = current_user.gid; - lrec->egid = current_user.egid; - strncpy(lrec->name, current_user.user_name, UT_NAMESIZE); - strncpy(lrec->tty, current_tty, UT_LINESIZE); - strcpy(lrec->command, child->command); - - /* Ignore errors?? */ - mq_send(message_queue, (char *)lrec, cc, 0); -} - diff --git a/home/shemminger/vyatta/mendocino/vyatta-bash/logmessage.h b/home/shemminger/vyatta/mendocino/vyatta-bash/logmessage.h deleted file mode 100644 index 5bccacc..0000000 --- a/home/shemminger/vyatta/mendocino/vyatta-bash/logmessage.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Format of messages sent on /vbash message queue. - - This code was originally developed by Vyatta, Inc. - Copyright (C) 2010 Vyatta, Inc. - */ - -struct command_log { - pid_t pid; - int status; - time_t endtime; - uid_t uid, euid; - gid_t gid, egid; - char name[UT_NAMESIZE]; - char tty[UT_LINESIZE]; - char command[0]; -}; diff --git a/home/shemminger/vyatta/mendocino/vyatta-bash/vyatta-restricted.c b/home/shemminger/vyatta/mendocino/vyatta-bash/vyatta-restricted.c deleted file mode 100644 index c0337e7..0000000 --- a/home/shemminger/vyatta/mendocino/vyatta-bash/vyatta-restricted.c +++ /dev/null @@ -1,569 +0,0 @@ -/* vyatta-restricted.c -- Vyatta restricted mode functionality */ - -/* This file is part of GNU Bash, the Bourne Again SHell. - - Bash is free software; you can 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. - - Bash is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with Bash; see the file COPYING. If not, write to the Free Software - Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. - - This code was originally developed by Vyatta, Inc. - Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. */ - -#include "shell.h" -#include "bashhist.h" -#include "vyatta-restricted.h" - -#define FILENAME_MODE "restricted-mode" -#define FILENAME_OP "allowed-op" -#define FILENAME_CFG "allowed-cfg" -#define FILENAME_PIPE "allowed-pipe" - -static char *prev_cmdline = NULL; - -/* allowed commands lists */ -static char **allowed_op_cmds = NULL; -static char **allowed_cfg_cmds = NULL; -static char **allowed_pipe_cmds = NULL; -static int *pipe_cmd_args = NULL; - -static char *vyatta_user_level_dir = NULL; - -/* default restricted mode */ -static int vyatta_default_output_restricted = 0; -static int vyatta_default_full_restricted = 0; - -static char *expand_disable_cmds[] = { "_vyatta_op_run", - "/opt/vyatta/sbin/my_set", - "/opt/vyatta/sbin/my_delete", - "/opt/vyatta/sbin/my_commit", - NULL }; - -static int -is_expansion_disabled() -{ - char *exp = getenv("VYATTA_ENABLE_SHELL_EXPANSION"); - if (!exp) { - return 1; - } - return 0; -} - -void -vyatta_reset_hist_expansion() -{ -#if defined (BANG_HISTORY) - if (is_expansion_disabled()) { - history_expansion_inhibited = 1; - } else { - history_expansion_inhibited = 0; - } -#endif -} - -static int -is_in_command_list(const char *cmd, char *cmds[]) -{ - int idx = 0; - for (idx = 0; cmds[idx]; idx++) { - if (strcmp(cmd, cmds[idx]) == 0) { - return 1; - } - } - return 0; -} - -static int -is_vyatta_restricted_pipe_command(WORD_LIST *words) -{ - WORD_LIST *w = words; - int count = 1; - while (w = w->next) { - count++; - } - if (words) { - int i = 0; - if (!allowed_pipe_cmds) { - /* no restriction */ - return 1; - } - for (i = 0; allowed_pipe_cmds[i]; i++) { - if (strcmp(words->word->word, allowed_pipe_cmds[i]) == 0 - && count == pipe_cmd_args[i]) { - return 1; - } - } - } - /* not allowed */ - return 0; -} - -static void -make_restricted_word(WORD_DESC *word) -{ - char *c, *ns, *n; - int sq_count = 0; - char *uqs = string_quote_removal(word->word, 0); - - for (c = uqs; *c; c++) { - if (*c == '\'') { - sq_count++; - } - } - - /* strlen + start/end quotes + \0 + extra "'\''" */ - ns = (char *) xmalloc(strlen(uqs) + 2 + 1 + (3 * sq_count)); - n = ns; - *n = '\''; - n++; - for (c = uqs; *c; c++) { - if (*c == '\'') { - *n = '\''; - *(n + 1) = '\\'; - *(n + 2) = '\''; - *(n + 3) = '\''; - n += 4; - } else { - *n = *c; - n++; - } - } - *n = '\''; - *(n + 1) = '\0'; - - free(word->word); - free(uqs); - word->word = ns; - word->flags = W_QUOTED; -} - -static void -make_restricted_wordlist(WORD_LIST *words) -{ - WORD_LIST *l = words->next; /* skip the first word */ - for (; l; l = l->next) { - make_restricted_word(l->word); - } -} - -/* this basically disables shell expansions for "simple" commands. */ -/* full: do a "full" check (disallow env override && also check pipe). */ -void -vyatta_check_expansion(COMMAND *cmd, int full) -{ - struct simple_com *cS; - struct connection *cC; - - if (!cmd) { - return; - } - if (!full && !is_expansion_disabled()) { - /* enabled */ - return; - } - - switch (cmd->type) { - case cm_simple: - cS = cmd->value.Simple; - if (cS && !(cS->redirects)) { - /* simple command, no redirects */ - if (cS->words && cS->words->word && - is_in_command_list(cS->words->word->word, expand_disable_cmds)) { - /* user command => quote all words */ - make_restricted_wordlist(cS->words); - } - } - break; - case cm_connection: - cC = cmd->value.Connection; - if ((cC->connector == '|') && (cC->first->type == cm_simple)) { - struct simple_com *cS1 = cC->first->value.Simple; - if (!(cS1->redirects)) { - /* simple, no redirects */ - if (is_in_command_list(cS1->words->word->word, expand_disable_cmds)) { - /* user command => quote all words */ - make_restricted_wordlist(cS1->words); - } - } - if (full && (cC->second->type == cm_simple)) { - struct simple_com *cS2 = cC->second->value.Simple; - if (!(cS2->redirects)) { - /* simple, no redirects */ - /* quote all words (not checking user command after pipe) */ - make_restricted_wordlist(cS2->words); - } - } - } - break; - default: - break; - } -} - -static int -is_vyatta_restricted_command(COMMAND *cmd) -{ - struct simple_com *cS; - struct connection *cC; - - if (!cmd) { - return 1; - } - - switch (cmd->type) { - case cm_simple: - cS = cmd->value.Simple; - if (!(cS->redirects)) { - /* simple command, no redirects */ - return 1; - } - break; - case cm_connection: - cC = cmd->value.Connection; - if (cC->connector == '|') { - if ((cC->first->type == cm_simple) && (cC->second->type == cm_simple)) { - struct simple_com *cS1 = cC->first->value.Simple; - struct simple_com *cS2 = cC->second->value.Simple; - if (!(cS1->redirects) && !(cS2->redirects)) { - /* both are simple and no redirects */ - if (is_vyatta_restricted_pipe_command(cS2->words)) { - /* pipe command is allowed => allowed */ - return 1; - } - } - } - } - break; - default: - break; - } - /* not allowed */ - return 0; -} - -static int -is_vyatta_cfg_command(const char *cmd) -{ - if (!allowed_cfg_cmds) { - /* no restriction */ - return 1; - } - return is_in_command_list(cmd, allowed_cfg_cmds); -} - -static int -is_vyatta_op_command(const char *cmd) -{ - if (!allowed_op_cmds) { - /* no restriction */ - return 1; - } - return is_in_command_list(cmd, allowed_op_cmds); -} - -int -is_vyatta_command(char *cmdline, COMMAND *cmd) -{ - char *cfg = getenv("_OFR_CONFIGURE"); - int in_cfg = (cfg) ? (strcmp(cfg, "ok") == 0) : 0; - char *start = cmdline; - char *end = NULL; - char save = 0; - int ret = 0; - - /* check expansions (full) */ - vyatta_check_expansion(cmd, 1); - - if (!prev_cmdline) { - prev_cmdline = strdup(""); - } - if (strcmp(cmdline, prev_cmdline) == 0) { - /* still at the same line. not checking. */ - return 1; - } - if (!is_vyatta_restricted_command(cmd)) { - return 0; - } - - while (*start && (whitespace(*start) || *start == '\n')) { - start++; - } - if (*start == 0) { - /* empty command line is valid */ - free(prev_cmdline); - prev_cmdline = strdup(cmdline); - return 1; - } - end = start; - while (*end && (!whitespace(*end) && *end != '\n')) { - end++; - } - save = *end; - *end = 0; - - if (in_cfg) { - ret = is_vyatta_cfg_command(start); - } else { - ret = is_vyatta_op_command(start); - } - *end = save; - - if (ret) { - /* valid command */ - free(prev_cmdline); - prev_cmdline = strdup(cmdline); - } - return ret; -} - -static FILE * -fopen_level_file(char *file_name) -{ - FILE *f = NULL; -#define BUF_SIZE 1024 - char *buf = (char *) xmalloc(BUF_SIZE); - if (!buf) { - return NULL; - } - - do { - int r = snprintf(buf, BUF_SIZE, "%s/%s", vyatta_user_level_dir, file_name); - if (r >= BUF_SIZE) { - break; - } - - f = fopen(buf, "r"); - } while (0); - - free(buf); - return f; -} - -static char * -fgets_level_file(char *buf, int size, FILE *lfile) -{ - if (fgets(buf, size, lfile)) { - int end = 0; - while (buf[end] && isprint(buf[end]) && !isspace(buf[end])) { - end++; - } - buf[end] = 0; - return buf; - } else { - return NULL; - } -} - -static void -set_default_mode() -{ - FILE *lfile = NULL; - char *line = NULL; - char buf[256]; - - /* default to full restricted */ - vyatta_default_output_restricted = 0; - vyatta_default_full_restricted = 1; - - if (!(lfile = fopen_level_file(FILENAME_MODE))) { - return; - } - while (line = fgets_level_file(buf, 256, lfile)) { - if (strcmp(line, "output") == 0) { - vyatta_default_output_restricted = 1; - vyatta_default_full_restricted = 0; - break; - } - if (strcmp(line, "full") == 0) { - vyatta_default_output_restricted = 0; - vyatta_default_full_restricted = 1; - break; - } - } - fclose(lfile); - return; -} - -static void -set_allowed_op_cmds() -{ - FILE *lfile = NULL; - char *line = NULL; - char buf[256]; - int count = 1; - - if (allowed_op_cmds) { - return; - } - - if (!(lfile = fopen_level_file(FILENAME_OP))) { - return; - } - while (line = fgets_level_file(buf, 256, lfile)) { - count++; - } - fclose(lfile); - - /* count is 1 more than number of lines */ - allowed_op_cmds = (char **) xmalloc(sizeof(char *) * count); - memset(allowed_op_cmds, 0, sizeof(char *) * count); - - if (!(lfile = fopen_level_file(FILENAME_OP))) { - return; - } - count = 0; - while (line = fgets_level_file(buf, 256, lfile)) { - allowed_op_cmds[count] = strdup(line); - count++; - } - fclose(lfile); - return; -} - -static void -set_allowed_cfg_cmds() -{ - FILE *lfile = NULL; - char *line = NULL; - char buf[256]; - int count = 1; - - if (allowed_cfg_cmds) { - return; - } - - if (!(lfile = fopen_level_file(FILENAME_CFG))) { - return; - } - while (line = fgets_level_file(buf, 256, lfile)) { - count++; - } - fclose(lfile); - - /* count is 1 more than number of lines */ - allowed_cfg_cmds = (char **) xmalloc(sizeof(char *) * count); - memset(allowed_cfg_cmds, 0, sizeof(char *) * count); - - if (!(lfile = fopen_level_file(FILENAME_CFG))) { - return; - } - count = 0; - while (line = fgets_level_file(buf, 256, lfile)) { - allowed_cfg_cmds[count] = strdup(line); - count++; - } - fclose(lfile); - return; -} - -static void -set_allowed_pipe_cmds() -{ - FILE *lfile = NULL; - char *line = NULL; - char buf[256]; - int count = 0; - - if (allowed_pipe_cmds) { - return; - } - - if (!(lfile = fopen_level_file(FILENAME_PIPE))) { - return; - } - while (line = fgets_level_file(buf, 256, lfile)) { - count++; - } - fclose(lfile); - - count = (count / 2) + 2; - /* count is 1 more than entries */ - allowed_pipe_cmds = (char **) xmalloc(sizeof(char *) * count); - memset(allowed_pipe_cmds, 0, sizeof(char *) * count); - pipe_cmd_args = (int *) xmalloc(sizeof(int *) * count); - memset(pipe_cmd_args, 0, sizeof(int *) * count); - - if (!(lfile = fopen_level_file(FILENAME_PIPE))) { - return; - } - count = 0; - while (line = fgets_level_file(buf, 256, lfile)) { - allowed_pipe_cmds[count] = strdup(line); - if (!(line = fgets_level_file(buf, 256, lfile))) { - free(allowed_pipe_cmds[count]); - allowed_pipe_cmds[count] = NULL; - break; - } - pipe_cmd_args[count] = atoi(line); - /* limit to between 1 and 256 */ - if (pipe_cmd_args[count] < 1 || pipe_cmd_args[count] > 256) { - free(allowed_pipe_cmds[count]); - allowed_pipe_cmds[count] = NULL; - pipe_cmd_args[count] = 0; - break; - } - count++; - } - fclose(lfile); - return; -} - -static int -init_vyatta_restricted_mode() -{ - if (!(vyatta_user_level_dir = getenv("VYATTA_USER_LEVEL_DIR"))) { - /* level dir not set, return failure */ - return 0; - } - - /* set the default restricted mode based on level */ - set_default_mode(); - - /* set the allowed commands */ - set_allowed_op_cmds(); - set_allowed_cfg_cmds(); - set_allowed_pipe_cmds(); - - return 1; -} - -int -in_vyatta_restricted_mode(enum vyatta_restricted_type type) -{ - char *rval = getenv("VYATTA_RESTRICTED_MODE"); - int output = 0; - int full = 0; - - if (!vyatta_user_level_dir && !init_vyatta_restricted_mode()) { - /* init failed, return false (not restricted) */ - return 0; - } - - output = vyatta_default_output_restricted; - full = vyatta_default_full_restricted; - - /* environment var overrides default */ - if (rval) { - output = (strcmp(rval, "output") == 0); - full = (strcmp(rval, "full") == 0); - } - - if (type == OUTPUT && (output || full)) { - return 1; - } - if (type == FULL && full) { - return 1; - } - - return 0; -} - diff --git a/home/shemminger/vyatta/mendocino/vyatta-bash/vyatta-restricted.h b/home/shemminger/vyatta/mendocino/vyatta-bash/vyatta-restricted.h deleted file mode 100644 index 0dd45bd..0000000 --- a/home/shemminger/vyatta/mendocino/vyatta-bash/vyatta-restricted.h +++ /dev/null @@ -1,36 +0,0 @@ -/* vyatta-restricted.h -- header for Vyatta restricted mode functionality */ - -/* This file is part of GNU Bash, the Bourne Again SHell. - - Bash is free software; you can 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. - - Bash is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with Bash; see the file COPYING. If not, write to the Free Software - Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. - - This code was originally developed by Vyatta, Inc. - Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. */ - -#if !defined(_VYATTA_RESTRICTED_H_) -#define _VYATTA_RESTRICTED_H_ - -#include - -#include "command.h" - -enum vyatta_restricted_type { OUTPUT, FULL }; -extern int in_vyatta_restricted_mode __P((enum vyatta_restricted_type)); -extern int is_vyatta_command __P((char *, COMMAND *)); -extern void vyatta_check_expansion __P((COMMAND *, int)); -extern void vyatta_reset_hist_expansion(); - -#endif /* _VYATTA_RESTRICTED_H_ */ - diff --git a/include/chartypes.h b/include/chartypes.h index 0560769..d5be4a3 100644 --- a/include/chartypes.h +++ b/include/chartypes.h @@ -1,6 +1,6 @@ /* chartypes.h -- extend ctype.h */ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,22 +23,18 @@ #include -/* 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. */ +#ifndef UCHAR_MAX +# define UCHAR_MAX 255 +#endif +#ifndef CHAR_MAX +# define CHAR_MAX 127 +#endif -#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII) +/* use this as a proxy for C89 */ +#if defined (HAVE_STDLIB_H) && defined (HAVE_STRING_H) # define IN_CTYPE_DOMAIN(c) 1 #else -# define IN_CTYPE_DOMAIN(c) isascii(c) +# define IN_CTYPE_DOMAIN(c) ((c) >= 0 && (c) <= CHAR_MAX) #endif #if !defined (isspace) && !defined (HAVE_ISSPACE) @@ -46,11 +42,11 @@ #endif #if !defined (isprint) && !defined (HAVE_ISPRINT) -# define isprint(c) (isalpha(c) || isdigit(c) || ispunct(c)) +# define isprint(c) (isalpha((unsigned char)c) || isdigit((unsigned char)c) || ispunct((unsigned char)c)) #endif #if defined (isblank) || defined (HAVE_ISBLANK) -# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c)) +# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank ((unsigned char)c)) #else # define ISBLANK(c) ((c) == ' ' || (c) == '\t') #endif @@ -58,7 +54,7 @@ #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)) +# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c) && !isspace ((unsigned char)c)) #endif #if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) @@ -67,16 +63,16 @@ #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 ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c)) +#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit ((unsigned char)c)) +#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum ((unsigned char)c)) +#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha ((unsigned char)c)) +#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl ((unsigned char)c)) +#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower ((unsigned char)c)) +#define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct ((unsigned char)c)) +#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace ((unsigned char)c)) +#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper ((unsigned char)c)) +#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit ((unsigned char)c)) #define ISLETTER(c) (ISALPHA(c)) @@ -103,11 +99,11 @@ #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) +# define TOCTRL(x) ((x) == '?' ? 0x7f : (TOUPPER(x) & 0x1f)) #endif #ifndef UNCTRL /* control char to letter -- ASCII */ -# define UNCTRL(x) (TOUPPER((x) | 0x40)) +# define UNCTRL(x) (TOUPPER(x ^ 0x40)) #endif #endif /* _SH_CHARTYPES_H */ diff --git a/include/filecntl.h b/include/filecntl.h index 31667a1..9bcbab8 100644 --- a/include/filecntl.h +++ b/include/filecntl.h @@ -42,4 +42,12 @@ # endif #endif +/* Make sure O_BINARY and O_TEXT are defined to avoid Windows-specific code. */ +#if !defined (O_BINARY) +# define O_BINARY 0 +#endif +#if !defined (O_TEXT) +# define O_TEXT 0 +#endif + #endif /* ! _FILECNTL_H_ */ diff --git a/include/posixdir.h b/include/posixdir.h index bd33694..b737bd7 100644 --- a/include/posixdir.h +++ b/include/posixdir.h @@ -1,6 +1,6 @@ /* posixdir.h -- Posix directory reading includes and defines. */ -/* Copyright (C) 1987,1991 Free Software Foundation, Inc. +/* Copyright (C) 1987,1991,2012,2019,2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -46,16 +46,26 @@ # define D_NAMLEN(d) ((d)->d_namlen) #endif /* !HAVE_DIRENT_H */ +/* The bash code fairly consistently uses d_fileno; make sure it's available */ #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. */ +#if !defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO) # define REAL_DIR_ENTRY(dp) 1 #else # define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) #endif /* _POSIX_SOURCE */ +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (BROKEN_DIRENT_D_INO) +# define D_INO_AVAILABLE +#endif + +/* Signal the rest of the code that it can safely use dirent.d_fileno */ +#if defined (D_INO_AVAILABLE) || defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define D_FILENO_AVAILABLE 1 +#endif + #endif /* !_POSIXDIR_H_ */ diff --git a/include/posixjmp.h b/include/posixjmp.h index 49bfecf..9c7e99e 100644 --- a/include/posixjmp.h +++ b/include/posixjmp.h @@ -1,6 +1,6 @@ /* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ -/* Copyright (C) 1987,1991 Free Software Foundation, Inc. +/* Copyright (C) 1987,1991-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,14 +27,20 @@ #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 */ + +# define setjmp_nosigs(x) sigsetjmp((x), 0) +# define setjmp_sigs(x) sigsetjmp((x), 1) + +# define _rl_longjmp(x, n) siglongjmp((x), (n)) +# define sh_longjmp(x, n) siglongjmp((x), (n)) #else # define procenv_t jmp_buf + +# define setjmp_nosigs setjmp +# define setjmp_sigs setjmp + +# define _rl_longjmp(x, n) longjmp((x), (n)) +# define sh_longjmp(x, n) longjmp((x), (n)) #endif #endif /* _POSIXJMP_H_ */ diff --git a/include/posixstat.h b/include/posixstat.h index 3eb7f29..b607786 100644 --- a/include/posixstat.h +++ b/include/posixstat.h @@ -1,7 +1,7 @@ /* posixstat.h -- Posix stat(2) definitions for systems that don't have them. */ -/* Copyright (C) 1987,1991 Free Software Foundation, Inc. +/* Copyright (C) 1987-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -132,6 +132,26 @@ # 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) +#else /* !S_IRWXU */ + /* S_IRWXU is defined, but "group" and "other" bits might not be + (happens in certain versions of MinGW). */ +# if !defined (S_IRGRP) +# define S_IRGRP (S_IREAD >> 3) /* read, group */ +# define S_IWGRP (S_IWRITE >> 3) /* write, group */ +# define S_IXGRP (S_IEXEC >> 3) /* execute, group */ +# endif /* !S_IRGRP */ + +# if !defined (S_IROTH) +# 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_IROTH */ +# if !defined (S_IRWXG) +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +# endif +# if !defined (S_IRWXO) +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +# endif #endif /* !S_IRWXU */ /* These are non-standard, but are used in builtins.c$symbolic_umask() */ diff --git a/include/posixtime.h b/include/posixtime.h index 31bdddf..e70ebec 100644 --- a/include/posixtime.h +++ b/include/posixtime.h @@ -1,6 +1,6 @@ /* posixtime.h -- wrapper for time.h, sys/times.h mess. */ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,16 +25,10 @@ /* Some systems require this, mostly for the definition of `struct timezone'. For example, Dynix/ptx has that definition in rather than sys/time.h */ -#if defined (TIME_WITH_SYS_TIME) +#if defined (HAVE_SYS_TIME_H) # include -# include -#else -# if defined (HAVE_SYS_TIME_H) -# include -# else -# include -# endif #endif +#include #if !defined (HAVE_SYSCONF) || !defined (_SC_CLK_TCK) # if !defined (CLK_TCK) @@ -46,4 +40,45 @@ # endif /* !CLK_TCK */ #endif /* !HAVE_SYSCONF && !_SC_CLK_TCK */ +#if !HAVE_TIMEVAL +struct timeval +{ + time_t tv_sec; + long int tv_usec; +}; +#endif + +#if !HAVE_GETTIMEOFDAY +extern int gettimeofday PARAMS((struct timeval *, void *)); +#endif + +/* These exist on BSD systems, at least. */ +#if !defined (timerclear) +# define timerclear(tvp) do { (tvp)->tv_sec = 0; (tvp)->tv_usec = 0; } while (0) +#endif +#if !defined (timerisset) +# define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) +#endif +#if !defined (timercmp) +# define timercmp(a, b, CMP) \ + (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) \ + : ((a)->tv_sec CMP (b)->tv_sec)) +#endif + +/* These are non-standard. */ +#if !defined (timerisunset) +# define timerisunset(tvp) ((tvp)->tv_sec == 0 && (tvp)->tv_usec == 0) +#endif +#if !defined (timerset) +# define timerset(tvp, s, u) do { tvp->tv_sec = s; tvp->tv_usec = u; } while (0) +#endif + +#ifndef TIMEVAL_TO_TIMESPEC +# define TIMEVAL_TO_TIMESPEC(tv, ts) \ + do { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ + } while (0) +#endif + #endif /* _POSIXTIME_H_ */ diff --git a/include/posixwait.h b/include/posixwait.h index 815ea22..63b59c2 100644 --- a/include/posixwait.h +++ b/include/posixwait.h @@ -77,7 +77,11 @@ typedef int WAIT; # endif /* !WIFSIGNALED */ # if !defined (WIFCORED) -# define WIFCORED(s) ((s) & 0200) +# if defined (WCOREDUMP) +# define WIFCORED(s) (WCOREDUMP(s)) +# else +# define WIFCORED(s) ((s) & 0200) +# endif # endif /* !WIFCORED */ #else /* !_POSIX_VERSION */ diff --git a/include/shmbchar.h b/include/shmbchar.h new file mode 100644 index 0000000..27b0024 --- /dev/null +++ b/include/shmbchar.h @@ -0,0 +1,112 @@ +/* Multibyte character data type. + Copyright (C) 2001, 2005-2007, 2009-2010, 2021 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 . */ + +/* Written by Bruno Haible . */ + +#ifndef _SHMBCHAR_H +#define _SHMBCHAR_H 1 + +#if defined (HANDLE_MULTIBYTE) + +#include + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.1 has a bug: and must be included before + . */ +#include +#include +#include +#include + + +/* is_basic(c) tests whether the single-byte character c is in the + ISO C "basic character set". */ + +#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) +/* The character set is ISO-646, not EBCDIC. */ +# define IS_BASIC_ASCII 1 + +extern const unsigned int is_basic_table[]; + +static inline int +is_basic (char c) +{ + return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) + & 1; +} + +#else + +static inline int +is_basic (char c) +{ + switch (c) + { + case '\b': case '\r': case '\n': + case '\t': case '\v': case '\f': + case ' ': case '!': case '"': case '#': case '%': + case '&': case '\'': case '(': case ')': case '*': + case '+': case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': + case '?': + case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': + case 'K': case 'L': case 'M': case 'N': case 'O': + case 'P': case 'Q': case 'R': case 'S': case 'T': + case 'U': case 'V': case 'W': case 'X': case 'Y': + case 'Z': + case '[': case '\\': case ']': case '^': case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': + case 'z': case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +} + +#endif + +#endif /* HANDLE_MULTIBYTE */ +#endif /* _SHMBCHAR_H */ diff --git a/include/shmbutil.h b/include/shmbutil.h index 2b40804..0f711ea 100644 --- a/include/shmbutil.h +++ b/include/shmbutil.h @@ -1,6 +1,6 @@ /* shmbutil.h -- utility functions for multibyte characters. */ -/* Copyright (C) 2002-2004 Free Software Foundation, Inc. +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,13 +27,18 @@ #include #if defined (HANDLE_MULTIBYTE) +#include "shmbchar.h" -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 xwcsrtombs PARAMS((char *, const wchar_t **, size_t, mbstate_t *)); +extern size_t xmbsrtowcs PARAMS((wchar_t *, const char **, size_t, mbstate_t *)); +extern size_t xdupmbstowcs PARAMS((wchar_t **, char ***, const char *)); -extern size_t mbstrlen __P((const char *)); +extern size_t mbstrlen PARAMS((const char *)); -extern char *xstrchr __P((const char *, int)); +extern char *xstrchr PARAMS((const char *, int)); + +extern int locale_mb_cur_max; /* XXX */ +extern int locale_utf8locale; /* XXX */ #ifndef MB_INVALIDCH #define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) @@ -46,6 +51,10 @@ extern char *xstrchr __P((const char *, int)); #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) +#define UTF8_SINGLEBYTE(c) (((c) & 0x80) == 0) +#define UTF8_MBFIRSTCHAR(c) (((c) & 0xc0) == 0xc0) +#define UTF8_MBCHAR(c) (((c) & 0xc0) == 0x80) + #else /* !HANDLE_MULTIBYTE */ #undef MB_LEN_MAX @@ -71,6 +80,9 @@ extern char *xstrchr __P((const char *, int)); # define wchar_t int #endif +#define UTF8_SINGLEBYTE(c) (1) +#define UTF8_MBFIRSTCHAR(c) (0) + #endif /* !HANDLE_MULTIBYTE */ /* Declare and initialize a multibyte state. Call must be terminated @@ -97,13 +109,22 @@ extern char *xstrchr __P((const char *, int)); # define ADVANCE_CHAR(_str, _strsize, _i) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ + int _f; \ \ - state_bak = state; \ - mblength = mbrlen ((_str) + (_i), (_strsize) - (_i), &state); \ + _f = is_basic ((_str)[_i]); \ + if (_f) \ + mblength = 1; \ + else if (locale_utf8locale && (((_str)[_i] & 0x80) == 0)) \ + mblength = (_str)[_i] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_str) + (_i), (_strsize) - (_i), &state); \ + } \ \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ @@ -130,13 +151,22 @@ extern char *xstrchr __P((const char *, int)); # define ADVANCE_CHAR_P(_str, _strsize) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ + int _f; \ \ - state_bak = state; \ - mblength = mbrlen ((_str), (_strsize), &state); \ + _f = is_basic (*(_str)); \ + if (_f) \ + mblength = 1; \ + else if (locale_utf8locale && ((*(_str) & 0x80) == 0)) \ + mblength = *(_str) != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_str), (_strsize), &state); \ + } \ \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ @@ -158,7 +188,7 @@ extern char *xstrchr __P((const char *, int)); # define BACKUP_CHAR(_str, _strsize, _i) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ @@ -200,7 +230,7 @@ extern char *xstrchr __P((const char *, int)); # define BACKUP_CHAR_P(_base, _strsize, _str) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ @@ -241,14 +271,22 @@ extern char *xstrchr __P((const char *, int)); # define COPY_CHAR_P(_dst, _src, _srcend) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _k; \ \ - state_bak = state; \ - mblength = mbrlen ((_src), (_srcend) - (_src), &state); \ + _k = is_basic (*(_src)); \ + if (_k) \ + mblength = 1; \ + else if (locale_utf8locale && ((*(_src) & 0x80) == 0)) \ + mblength = *(_src) != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src), (_srcend) - (_src), &state); \ + } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ @@ -274,14 +312,22 @@ extern char *xstrchr __P((const char *, int)); # define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _k; \ \ - state_bak = state; \ - mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src)+(_si)), &state); \ + _k = is_basic ((_src)[(_si)]); \ + if (_k) \ + mblength = 1; \ + else if (locale_utf8locale && ((_src)[(_si)] & 0x80) == 0) \ + mblength = (_src)[(_si)] != 0; \ + else \ + {\ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src)+(_si)), &state); \ + } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ @@ -311,14 +357,22 @@ extern char *xstrchr __P((const char *, int)); # define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _i; \ \ - state_bak = state; \ - mblength = mbrlen ((_src) + (_si), (_slen) - (_si), &state); \ + _i = is_basic ((_src)[(_si)]); \ + if (_i) \ + mblength = 1; \ + else if (locale_utf8locale && ((_src)[(_si)] & 0x80) == 0) \ + mblength = (_src)[(_si)] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_slen) - (_si), &state); \ + } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ @@ -352,13 +406,22 @@ extern char *xstrchr __P((const char *, int)); # define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ + int _i; \ \ - state_bak = state; \ - mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src) + (_si)), &state); \ + _i = is_basic (*((_src) + (_si))); \ + if (_i) \ + mblength = 1; \ + else if (locale_utf8locale && (((_src)[_si] & 0x80) == 0)) \ + mblength = (_src)[_si] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src) + (_si)), &state); \ + } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ @@ -389,14 +452,22 @@ extern char *xstrchr __P((const char *, int)); # define SADD_MBCHAR(_dst, _src, _si, _srcsize) \ do \ { \ - if (MB_CUR_MAX > 1) \ + if (locale_mb_cur_max > 1) \ { \ int i; \ mbstate_t state_bak; \ size_t mblength; \ \ - state_bak = state; \ - mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + i = is_basic (*((_src) + (_si))); \ + if (i) \ + mblength = 1; \ + else if (locale_utf8locale && (((_src)[_si] & 0x80) == 0)) \ + mblength = (_src)[_si] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + } \ if (mblength == (size_t)-1 || mblength == (size_t)-2) \ { \ state = state_bak; \ @@ -419,7 +490,7 @@ extern char *xstrchr __P((const char *, int)); # define SADD_MBCHAR(_dst, _src, _si, _srcsize) #endif -/* Watch out when using this -- it's just straight textual subsitution */ +/* Watch out when using this -- it's just straight textual substitution */ #if defined (HANDLE_MULTIBYTE) # define SADD_MBQCHAR_BODY(_dst, _src, _si, _srcsize) \ \ @@ -427,8 +498,16 @@ extern char *xstrchr __P((const char *, int)); mbstate_t state_bak; \ size_t mblength; \ \ - state_bak = state; \ - mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + i = is_basic (*((_src) + (_si))); \ + if (i) \ + mblength = 1; \ + else if (locale_utf8locale && (((_src)[_si] & 0x80) == 0)) \ + mblength = (_src)[_si] != 0; \ + else \ + { \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + } \ if (mblength == (size_t)-1 || mblength == (size_t)-2) \ { \ state = state_bak; \ @@ -445,5 +524,36 @@ extern char *xstrchr __P((const char *, int)); \ goto add_string +# define SADD_MBCHAR_BODY(_dst, _src, _si, _srcsize) \ +\ + int i; \ + mbstate_t state_bak; \ + size_t mblength; \ +\ + i = is_basic (*((_src) + (_si))); \ + if (i) \ + mblength = 1; \ + else if (locale_utf8locale && (((_src)[_si] & 0x80) == 0)) \ + mblength = (_src)[_si] != 0; \ + else \ + { \ + 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+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 index 66500d9..fdf379b 100644 --- a/include/shtty.h +++ b/include/shtty.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. */ +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. */ /* This file is part of GNU Bash, the Bourne Again SHell. @@ -67,24 +67,24 @@ /* 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 *)); +extern int ttgetattr PARAMS((int, TTYSTRUCT *)); +extern int ttsetattr PARAMS((int, TTYSTRUCT *)); /* Save and restore the terminal's attributes from static storage. */ -extern void ttsave __P((void)); -extern void ttrestore __P((void)); +extern void ttsave PARAMS((void)); +extern void ttrestore PARAMS((void)); /* Return the attributes corresponding to the file descriptor (0 or 1) passed as an argument. */ -extern TTYSTRUCT *ttattr __P((int)); +extern TTYSTRUCT *ttattr PARAMS((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 *)); +extern int tt_setonechar PARAMS((TTYSTRUCT *)); +extern int tt_setnoecho PARAMS((TTYSTRUCT *)); +extern int tt_seteightbit PARAMS((TTYSTRUCT *)); +extern int tt_setnocanon PARAMS((TTYSTRUCT *)); +extern int tt_setcbreak PARAMS((TTYSTRUCT *)); /* These functions are all generally mutually exclusive. If you call more than one (bracketed with calls to ttsave and ttrestore, of @@ -94,19 +94,19 @@ extern int tt_setcbreak __P((TTYSTRUCT *)); /* 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_onechar PARAMS((int, TTYSTRUCT *)); +extern int ttfd_noecho PARAMS((int, TTYSTRUCT *)); +extern int ttfd_eightbit PARAMS((int, TTYSTRUCT *)); +extern int ttfd_nocanon PARAMS((int, TTYSTRUCT *)); -extern int ttfd_cbreak __P((int, TTYSTRUCT *)); +extern int ttfd_cbreak PARAMS((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 ttonechar PARAMS((void)); +extern int ttnoecho PARAMS((void)); +extern int tteightbit PARAMS((void)); +extern int ttnocanon PARAMS((void)); -extern int ttcbreak __P((void)); +extern int ttcbreak PARAMS((void)); #endif diff --git a/include/stat-time.h b/include/stat-time.h new file mode 100644 index 0000000..e04cc61 --- /dev/null +++ b/include/stat-time.h @@ -0,0 +1,214 @@ +/* stat-related time functions. + + Copyright (C) 2005, 2007, 2009-2012 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 . */ + +/* Written by Paul Eggert. */ + +#ifndef STAT_TIME_H +#define STAT_TIME_H 1 + +#include + +#if defined (TIME_H_DEFINES_STRUCT_TIMESPEC) +# include +#elif defined (SYS_TIME_H_DEFINES_STRUCT_TIMESPEC) +# include +#elif defined (PTHREAD_H_DEFINES_STRUCT_TIMESPEC) +# include +#endif + +#ifndef HAVE_STRUCT_TIMESPEC +struct timespec +{ + time_t tv_sec; + long int tv_nsec; +}; +#endif + +/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type + struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, + ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, + if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim + for access, status change, data modification, or birth (creation) + time respectively. + + These macros are private to stat-time.h. */ +#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC +# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) +# else +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) +# endif +#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) +#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) +#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) +#endif + +/* Return the nanosecond component of *ST's access time. */ +static inline long int +get_stat_atime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_atim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's status change time. */ +static inline long int +get_stat_ctime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_ctim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's data modification time. */ +static inline long int +get_stat_mtime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_mtim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's birth time. */ +static inline long int +get_stat_birthtime_ns (struct stat const *st) +{ +# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + return STAT_TIMESPEC (st, st_birthtim).tv_nsec; +# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + return STAT_TIMESPEC_NS (st, st_birthtim); +# else + /* Avoid a "parameter unused" warning. */ + (void) st; + return 0; +# endif +} + +/* Return *ST's access time. */ +static inline struct timespec +get_stat_atime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim); +#else + struct timespec t; + t.tv_sec = st->st_atime; + t.tv_nsec = get_stat_atime_ns (st); + return t; +#endif +} + +/* Return *ST's status change time. */ +static inline struct timespec +get_stat_ctime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim); +#else + struct timespec t; + t.tv_sec = st->st_ctime; + t.tv_nsec = get_stat_ctime_ns (st); + return t; +#endif +} + +/* Return *ST's data modification time. */ +static inline struct timespec +get_stat_mtime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim); +#else + struct timespec t; + t.tv_sec = st->st_mtime; + t.tv_nsec = get_stat_mtime_ns (st); + return t; +#endif +} + +static inline int +timespec_cmp (struct timespec a, struct timespec b) +{ + return (a.tv_sec < b.tv_sec + ? -1 + : (a.tv_sec > b.tv_sec + ? 1 + : (int) (a.tv_nsec - b.tv_nsec))); +} + +/* Return *ST's birth time, if available; otherwise return a value + with tv_sec and tv_nsec both equal to -1. */ +static inline struct timespec +get_stat_birthtime (struct stat const *st) +{ + struct timespec t; + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) + t = STAT_TIMESPEC (st, st_birthtim); +#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + t.tv_sec = st->st_birthtime; + t.tv_nsec = st->st_birthtimensec; +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* Native Windows platforms (but not Cygwin) put the "file creation + time" in st_ctime (!). See + . */ + t.tv_sec = st->st_ctime; + t.tv_nsec = 0; +#else + /* Birth time is not supported. */ + t.tv_sec = -1; + t.tv_nsec = -1; + /* Avoid a "parameter unused" warning. */ + (void) st; +#endif + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) + /* FreeBSD and NetBSD sometimes signal the absence of knowledge by + using zero. Attempt to work around this problem. Alas, this can + report failure even for valid time stamps. Also, NetBSD + sometimes returns junk in the birth time fields; work around this + bug if it is detected. */ + if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000)) + { + t.tv_sec = -1; + t.tv_nsec = -1; + } +#endif + + return t; +} + +#endif diff --git a/include/stdc.h b/include/stdc.h index df01d81..38516ae 100644 --- a/include/stdc.h +++ b/include/stdc.h @@ -1,7 +1,7 @@ /* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,20 +26,21 @@ /* 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)); */ + extern char *func PARAMS((char *, char *, int)); */ -#if !defined (__P) +#if !defined (PARAMS) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) -# define __P(protos) protos +# define PARAMS(protos) protos # else -# define __P(protos) () +# define PARAMS(protos) () # endif #endif +/* Fortify, at least, has trouble with this definition */ #if defined (HAVE_STRINGIZE) -# define __STRING(x) #x +# define CPP_STRING(x) #x #else -# define __STRING(x) "x" +# define CPP_STRING(x) "x" #endif #if !defined (__STDC__) diff --git a/include/systimes.h b/include/systimes.h index 9629d25..aefcab7 100644 --- a/include/systimes.h +++ b/include/systimes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,11 +45,11 @@ struct tms }; /* Store the CPU time used by this process and all its - dead descendents in BUFFER. + dead descendants 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)); +extern clock_t times PARAMS((struct tms *buffer)); #endif /* !HAVE_SYS_TIMES_H */ #endif /* _BASH_SYSTIMES_H */ diff --git a/include/timer.h b/include/timer.h new file mode 100644 index 0000000..2779475 --- /dev/null +++ b/include/timer.h @@ -0,0 +1,64 @@ +/* timer.h -- data structures used by the shell timers in lib/sh/timers.c */ + +/* Copyright (C) 2021 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "bashjmp.h" +typedef struct _shtimer +{ + struct timeval tmout; + + int fd; + int flags; + + int alrmflag; /* should be set by alrm_handler */ + + SigHandler *alrm_handler; + SigHandler *old_handler; + + procenv_t jmpenv; + + int (*tm_handler) (struct _shtimer *); /* called on timeout if set */ + PTR_T *data; /* reserved */ +} sh_timer; + +#define SHTIMER_ALARM 0x01 /* mutually exclusive */ +#define SHTIMER_SELECT 0x02 +#define SHTIMER_LONGJMP 0x04 + +#define SHTIMER_SIGSET 0x100 +#define SHTIMER_ALRMSET 0x200 + +extern sh_timer *shtimer_alloc (void); +extern void shtimer_flush (sh_timer *); +extern void shtimer_dispose (sh_timer *); + +extern void shtimer_set (sh_timer *, time_t, long); +extern void shtimer_unset (sh_timer *); + +extern void shtimer_cleanup (sh_timer *); +extern void shtimer_clear (sh_timer *); + +extern int shtimer_chktimeout (sh_timer *); + +extern int shtimer_select (sh_timer *); +extern int shtimer_alrm (sh_timer *); diff --git a/include/typemax.h b/include/typemax.h index 32e7a89..e3b98f4 100644 --- a/include/typemax.h +++ b/include/typemax.h @@ -1,6 +1,6 @@ /* typemax.h -- encapsulate max values for long, long long, etc. */ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,17 +35,26 @@ # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) #endif +#ifndef TYPE_SIGNED_MAGNITUDE +# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) +#endif + +#ifndef TYPE_WIDTH +# define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) +#endif + #ifndef TYPE_MINIMUM -# define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \ - ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \ - : (t) 0)) +# define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) #endif #ifndef TYPE_MAXIMUM -# define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t))) +# define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) #endif -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT # ifndef LLONG_MAX # define LLONG_MAX TYPE_MAXIMUM(long long int) # define LLONG_MIN TYPE_MINIMUM(long long int) @@ -70,15 +79,63 @@ # define UINT_MAX ((unsigned int) ~(unsigned int)0) #endif +#ifndef SHRT_MAX +# define SHRT_MAX TYPE_MAXIMUM(short) +# define SHRT_MIN TYPE_MINIMUM(short) +# define USHRT_MAX ((unsigned short) ~(unsigned short)0) +#endif + +#ifndef UCHAR_MAX +# define UCHAR_MAX 255 +#endif + /* workaround for gcc bug in versions < 2.7 */ -#if defined (HAVE_LONG_LONG) && __GNUC__ == 2 && __GNUC_MINOR__ < 7 +#if defined (HAVE_LONG_LONG_INT) && __GNUC__ == 2 && __GNUC_MINOR__ < 7 static const unsigned long long int maxquad = ULLONG_MAX; # undef ULLONG_MAX # define ULLONG_MAX maxquad #endif +#if !defined (INTMAX_MAX) || !defined (INTMAX_MIN) + +#if SIZEOF_INTMAX_T == SIZEOF_LONG_LONG +# define INTMAX_MAX LLONG_MAX +# define INTMAX_MIN LLONG_MIN +#elif SIZEOF_INTMAX_T == SIZEOF_LONG +# define INTMAX_MAX LONG_MAX +# define INTMAX_MIN LONG_MIN +#else +# define INTMAX_MAX INT_MAX +# define INTMAX_MIN INT_MIN +#endif + +#endif + #ifndef SSIZE_MAX -# define SSIZE_MAX 32767 /* POSIX minimum max */ +# define SSIZE_MAX INT_MAX #endif +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) ~(size_t)0) +#endif + +#ifndef sh_imaxabs +# define sh_imaxabs(x) (((x) >= 0) ? (x) : -(x)) +#endif + +/* Handle signed arithmetic overflow and underflow. Have to do it this way + to avoid compilers optimizing out simpler overflow checks. */ + +/* Make sure that a+b does not exceed MAXV or is smaller than MINV (if b < 0). + Assumes that b > 0 if a > 0 and b < 0 if a < 0 */ +#define ADDOVERFLOW(a,b,minv,maxv) \ + ((((a) > 0) && ((b) > ((maxv) - (a)))) || \ + (((a) < 0) && ((b) < ((minv) - (a))))) + +/* Make sure that a-b is not smaller than MINV or exceeds MAXV (if b < 0). + Assumes that b > 0 if a > 0 and b < 0 if a < 0 */ +#define SUBOVERFLOW(a,b,minv,maxv) \ + ((((b) > 0) && ((a) < ((minv) + (b)))) || \ + (((b) < 0) && ((a) > ((maxv) + (b))))) + #endif /* _SH_TYPEMAX_H */ diff --git a/input.c b/input.c index fe21aef..7b439f8 100644 --- a/input.c +++ b/input.c @@ -1,6 +1,6 @@ /* input.c -- functions to perform buffered input with synchronization. */ -/* Copyright (C) 1992-2009 Free Software Foundation, Inc. +/* Copyright (C) 1992-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,12 +36,10 @@ #include "bashansi.h" #include "bashintl.h" -#include "command.h" -#include "general.h" +#include "shell.h" #include "input.h" -#include "error.h" #include "externs.h" -#include "quit.h" +#include "trap.h" #if !defined (errno) extern int errno; @@ -59,12 +57,12 @@ extern int errno; # define X_EWOULDBLOCK -99 #endif -extern void termsig_handler __P((int)); +extern void termsig_handler PARAMS((int)); /* Functions to handle reading input on systems that don't restart read(2) if a signal is received. */ -static char localbuf[128]; +static char localbuf[1024]; static int local_index = 0, local_bufused = 0; /* Posix and USG systems do not guarantee to restart read () if it is @@ -83,24 +81,34 @@ getc_with_restart (stream) { while (1) { - CHECK_TERMSIG; + QUIT; + run_pending_traps (); + local_bufused = read (fileno (stream), localbuf, sizeof(localbuf)); if (local_bufused > 0) break; + else if (local_bufused == 0) + { + local_index = 0; + return EOF; + } 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)); + local_index = local_bufused = 0; return EOF; } continue; } - else if (local_bufused == 0 || errno != EINTR) + else if (errno != EINTR) { - local_index = 0; + local_index = local_bufused = 0; return EOF; } + else if (interrupt_state || terminating_signal) /* QUIT; */ + local_index = local_bufused = 0; } local_index = 0; } @@ -124,7 +132,7 @@ ungetc_with_restart (c, stream) /* A facility similar to stdio, but input-only. */ #if defined (USING_BASH_MALLOC) -# define MAX_INPUT_BUFFER_SIZE 8176 +# define MAX_INPUT_BUFFER_SIZE 8172 #else # define MAX_INPUT_BUFFER_SIZE 8192 #endif @@ -142,8 +150,6 @@ ungetc_with_restart (c, stream) #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 @@ -193,6 +199,8 @@ make_buffered_stream (fd, buffer, bufsize) bp->b_used = bp->b_inputp = bp->b_flag = 0; if (bufsize == 1) bp->b_flag |= B_UNBUFF; + if (O_TEXT && (fcntl (fd, F_GETFL) & O_TEXT) != 0) + bp->b_flag |= B_TEXT; return (bp); } @@ -259,11 +267,13 @@ save_bash_input (fd, new_fd) return -1; } - if (buffers[nfd]) + if (nfd < nbuffers && 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); + if (buffers[nfd]->b_flag & B_SHAREDBUF) + buffers[nfd]->b_buffer = (char *)NULL; free_buffered_stream (buffers[nfd]); } @@ -299,7 +309,7 @@ save_bash_input (fd, new_fd) 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 + fd 0, sync_buffered_stream is used instead, to cooperate with input redirection (look at redir.c:add_undo_redirect()). */ int check_bash_input (fd) @@ -343,6 +353,12 @@ duplicate_buffered_stream (fd1, 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; + /* If this buffer is shared with another fd, don't free the buffer */ + else if (buffers[fd2]->b_flag & B_SHAREDBUF) + { + buffers[fd2]->b_buffer = (char *)NULL; + free_buffered_stream (buffers[fd2]); + } else free_buffered_stream (buffers[fd2]); } @@ -357,15 +373,14 @@ duplicate_buffered_stream (fd1, fd2) buffers[fd2]->b_flag |= B_WASBASHINPUT; } + if (fd_is_bash_input (fd1) || (buffers[fd1] && (buffers[fd1]->b_flag & B_SHAREDBUF))) + buffers[fd2]->b_flag |= B_SHAREDBUF; + 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__ */ +#define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0) /* Take FD, a file descriptor, and create and return a buffered stream corresponding to it. If something is wrong and the file descriptor @@ -432,6 +447,8 @@ close_buffered_stream (bp) if (!bp) return (0); fd = bp->b_fd; + if (bp->b_flag & B_SHAREDBUF) + bp->b_buffer = (char *)NULL; free_buffered_stream (bp); return (close (fd)); } @@ -452,7 +469,7 @@ close_buffered_fd (fd) return (close_buffered_stream (buffers[fd])); } -/* Make the BUFFERED_STREAM associcated with buffers[FD] be BP, and return +/* Make the BUFFERED_STREAM associated with buffers[FD] be BP, and return the old BUFFERED_STREAM. */ BUFFERED_STREAM * set_buffered_stream (fd, bp) @@ -472,12 +489,30 @@ b_fill_buffer (bp) BUFFERED_STREAM *bp; { ssize_t nr; + off_t o; CHECK_TERMSIG; - nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); + /* In an environment where text and binary files are treated differently, + compensate for lseek() on text files returning an offset different from + the count of characters read() returns. Text-mode streams have to be + treated as unbuffered. */ + if ((bp->b_flag & (B_TEXT | B_UNBUFF)) == B_TEXT) + { + o = lseek (bp->b_fd, 0, SEEK_CUR); + nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); + if (nr > 0 && nr < lseek (bp->b_fd, 0, SEEK_CUR) - o) + { + lseek (bp->b_fd, o, SEEK_SET); + bp->b_flag |= B_UNBUFF; + bp->b_size = 1; + nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); + } + } + else + nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); if (nr <= 0) { - bp->b_used = 0; + bp->b_used = bp->b_inputp = 0; bp->b_buffer[0] = 0; if (nr == 0) bp->b_flag |= B_EOF; @@ -486,15 +521,6 @@ b_fill_buffer (bp) 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); @@ -512,7 +538,7 @@ bufstream_ungetc(c, bp) int c; BUFFERED_STREAM *bp; { - if (c == EOF || bp->b_inputp == 0) + if (c == EOF || bp == 0 || bp->b_inputp == 0) return (EOF); bp->b_buffer[--bp->b_inputp] = c; @@ -543,6 +569,9 @@ buffered_getchar () { CHECK_TERMSIG; + if (bash_input.location.buffered_fd < 0 || buffers[bash_input.location.buffered_fd] == 0) + return EOF; + #if !defined (DJGPP) return (bufstream_getc (buffers[bash_input.location.buffered_fd])); #else diff --git a/input.h b/input.h index 834626a..cb3eee4 100644 --- a/input.h +++ b/input.h @@ -1,6 +1,6 @@ /* input.h -- Structures and unions used for reading input. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -32,8 +32,8 @@ 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 */ +typedef int sh_cget_func_t PARAMS((void)); /* sh_ivoidfunc_t */ +typedef int sh_cunget_func_t PARAMS((int)); /* sh_intfunc_t */ enum stream_type {st_none, st_stdin, st_stream, st_string, st_bstream}; @@ -48,6 +48,8 @@ enum stream_type {st_none, st_stdin, st_stream, st_string, st_bstream}; #define B_ERROR 0x02 #define B_UNBUFF 0x04 #define B_WASBASHINPUT 0x08 +#define B_TEXT 0x10 +#define B_SHAREDBUF 0x20 /* shared input buffer */ /* A buffered stream. Like a FILE *, but with our own buffering and synchronization. Look in input.c for the implementation. */ @@ -66,6 +68,7 @@ extern BUFFERED_STREAM **buffers; #endif extern int default_buffered_input; +extern int bash_input_fd_changed; #endif /* BUFFERED_INPUT */ @@ -89,44 +92,44 @@ 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 *)); +extern void initialize_bash_input PARAMS((void)); +extern void init_yy_io PARAMS((sh_cget_func_t *, sh_cunget_func_t *, enum stream_type, const char *, INPUT_STREAM)); +extern char *yy_input_name PARAMS((void)); +extern void with_input_from_stdin PARAMS((void)); +extern void with_input_from_string PARAMS((char *, const char *)); +extern void with_input_from_stream PARAMS((FILE *, const char *)); +extern void push_stream PARAMS((int)); +extern void pop_stream PARAMS((void)); +extern int stream_on_stack PARAMS((enum stream_type)); +extern char *read_secondary_line PARAMS((int)); +extern int find_reserved_word PARAMS((char *)); +extern void gather_here_documents PARAMS((void)); +extern void execute_variable_command PARAMS((char *, char *)); + +extern int *save_token_state PARAMS((void)); +extern void restore_token_state PARAMS((int *)); /* Functions from input.c */ -extern int getc_with_restart __P((FILE *)); -extern int ungetc_with_restart __P((int, FILE *)); +extern int getc_with_restart PARAMS((FILE *)); +extern int ungetc_with_restart PARAMS((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 *)); +extern int fd_is_bash_input PARAMS((int)); +extern int set_bash_input_fd PARAMS((int)); +extern int save_bash_input PARAMS((int, int)); +extern int check_bash_input PARAMS((int)); +extern int duplicate_buffered_stream PARAMS((int, int)); +extern BUFFERED_STREAM *fd_to_buffered_stream PARAMS((int)); +extern BUFFERED_STREAM *set_buffered_stream PARAMS((int, BUFFERED_STREAM *)); +extern BUFFERED_STREAM *open_buffered_stream PARAMS((char *)); +extern void free_buffered_stream PARAMS((BUFFERED_STREAM *)); +extern int close_buffered_stream PARAMS((BUFFERED_STREAM *)); +extern int close_buffered_fd PARAMS((int)); +extern int sync_buffered_stream PARAMS((int)); +extern int buffered_getchar PARAMS((void)); +extern int buffered_ungetchar PARAMS((int)); +extern void with_input_from_buffered_stream PARAMS((int, char *)); #endif /* BUFFERED_INPUT */ #endif /* _INPUT_H_ */ diff --git a/jobs.c b/jobs.c index 8da311d..5f08ce0 100644 --- a/jobs.c +++ b/jobs.c @@ -3,7 +3,7 @@ /* This file works with both POSIX and BSD systems. It implements job control. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,7 +45,9 @@ #include "filecntl.h" #include +#if defined (HAVE_SYS_PARAM_H) #include +#endif #if defined (BUFFERED_INPUT) # include "input.h" @@ -66,24 +68,48 @@ #include "bashansi.h" #include "bashintl.h" #include "shell.h" +#include "parser.h" #include "jobs.h" #include "execute_cmd.h" #include "flags.h" +#include "typemax.h" + #include "builtins/builtext.h" #include "builtins/common.h" +#include "logging.h" + +#if defined (READLINE) +# include +#endif + #if !defined (errno) extern int errno; #endif /* !errno */ -#define DEFAULT_CHILD_MAX 32 +#if !defined (HAVE_KILLPG) +extern int killpg PARAMS((pid_t, int)); +#endif + +#if !DEFAULT_CHILD_MAX +# define DEFAULT_CHILD_MAX 4096 +#endif + +#if !MAX_CHILD_MAX +# define MAX_CHILD_MAX 32768 +#endif + #if !defined (DEBUG) #define MAX_JOBS_IN_ARRAY 4096 /* production */ #else #define MAX_JOBS_IN_ARRAY 128 /* testing */ #endif +/* XXX for now */ +#define PIDSTAT_TABLE_SZ 4096 +#define BGPIDS_TABLE_SZ 512 + /* 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 */ @@ -138,27 +164,22 @@ extern int errno; /* 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)); +typedef int sh_job_map_func_t PARAMS((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; +extern SigHandler **original_signals; + +extern void set_original_signal PARAMS((int, SigHandler *)); + 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 }; +ps_index_t pidstat_table[PIDSTAT_TABLE_SZ]; +struct bgpids bgpids = { 0, 0, 0, 0 }; + +struct procchain procsubs = { 0, 0, 0 }; /* The array of known jobs. */ JOB **jobs = (JOB **)NULL; @@ -190,19 +211,11 @@ pid_t pipeline_pgrp = (pid_t)0; 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; +volatile pid_t last_made_pid = NO_PID; /* Pid of the last asynchronous child. */ -pid_t last_asynchronous_pid = NO_PID; +volatile pid_t last_asynchronous_pid = NO_PID; /* The pipeline currently being built. */ PROCESS *the_pipeline = (PROCESS *)NULL; @@ -210,77 +223,91 @@ PROCESS *the_pipeline = (PROCESS *)NULL; /* If this is non-zero, do job control. */ int job_control = 1; +/* Are we running in background? (terminal_pgrp != shell_pgrp) */ +int running_in_background = 0; + /* 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; +int check_window_size = CHECKWINSIZE_DEFAULT; + +PROCESS *last_procsub_child = (PROCESS *)NULL; /* 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)); +void debug_print_pgrps (void); + +static sighandler wait_sigint_handler PARAMS((int)); +static sighandler sigchld_handler PARAMS((int)); +static sighandler sigcont_sighandler PARAMS((int)); +static sighandler sigstop_sighandler PARAMS((int)); + +static int waitchld PARAMS((pid_t, int)); + +static PROCESS *find_pid_in_pipeline PARAMS((pid_t, PROCESS *, int)); +static PROCESS *find_pipeline PARAMS((pid_t, int, int *)); +static PROCESS *find_process PARAMS((pid_t, int, int *)); + +static char *current_working_directory PARAMS((void)); +static char *job_working_directory PARAMS((void)); +static char *j_strsignal PARAMS((int)); +static char *printable_job_status PARAMS((int, PROCESS *, int)); + +static PROCESS *find_last_proc PARAMS((int, int)); +static pid_t find_last_pid PARAMS((int, int)); + +static int set_new_line_discipline PARAMS((int)); +static int map_over_jobs PARAMS((sh_job_map_func_t *, int, int)); +static int job_last_stopped PARAMS((int)); +static int job_last_running PARAMS((int)); +static int most_recent_job_in_state PARAMS((int, JOB_STATE)); +static int find_job PARAMS((pid_t, int, PROCESS **)); +static int print_job PARAMS((JOB *, int, int, int)); +static int process_exit_status PARAMS((WAIT)); +static int process_exit_signal PARAMS((WAIT)); +static int set_job_status_and_cleanup PARAMS((int)); + +static WAIT job_signal_status PARAMS((int)); +static WAIT raw_job_exit_status PARAMS((int)); + +static void notify_of_job_status PARAMS((void)); +static void reset_job_indices PARAMS((void)); +static void cleanup_dead_jobs PARAMS((void)); +static int processes_in_job PARAMS((int)); +static void realloc_jobs_list PARAMS((void)); +static int compact_jobs_list PARAMS((int)); +static void add_process PARAMS((char *, pid_t)); +static void print_pipeline PARAMS((PROCESS *, int, int, FILE *)); +static void pretty_print_job PARAMS((int, int, FILE *)); +static void set_current_job PARAMS((int)); +static void reset_current PARAMS((void)); +static void set_job_running PARAMS((int)); +static void setjstatus PARAMS((int)); +static int maybe_give_terminal_to PARAMS((pid_t, pid_t, int)); +static void mark_all_jobs_as_dead PARAMS((void)); +static void mark_dead_jobs_as_notified PARAMS((int)); +static void restore_sigint_handler PARAMS((void)); #if defined (PGRP_PIPE) -static void pipe_read __P((int *)); +static void pipe_read PARAMS((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)); +/* Hash table manipulation */ + +static ps_index_t *pshash_getbucket PARAMS((pid_t)); +static void pshash_delindex PARAMS((ps_index_t)); + +/* Saved background process status management */ +static struct pidstat *bgp_add PARAMS((pid_t, int)); +static int bgp_delete PARAMS((pid_t)); +static void bgp_clear PARAMS((void)); +static int bgp_search PARAMS((pid_t)); + +static struct pipeline_saver *alloc_pipeline_saver PARAMS((void)); + +static ps_index_t bgp_getindex PARAMS((void)); +static void bgp_resize PARAMS((void)); /* XXX */ #if defined (ARRAY_VARS) static int *pstatuses; /* list of pipeline statuses */ @@ -294,18 +321,24 @@ static int queue_sigchld; #define QUEUE_SIGCHLD(os) (os) = sigchld, queue_sigchld++ +/* We set queue_sigchld around the call to waitchld to protect data structures + from a SIGCHLD arriving while waitchld is executing. */ #define UNQUEUE_SIGCHLD(os) \ do { \ queue_sigchld--; \ if (queue_sigchld == 0 && os != sigchld) \ - waitchld (-1, 0); \ + { \ + queue_sigchld = 1; \ + waitchld (-1, 0); \ + queue_sigchld = 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 struct pipeline_saver *saved_pipeline; static int saved_already_making_children; /* Set this to non-zero whenever you don't want the jobs list to change at @@ -316,10 +349,6 @@ 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 @@ -346,8 +375,6 @@ void init_job_stats () { js = zerojs; - first_pid = NO_PID; - pid_wrap = -1; } /* Return the working directory for the current process. Unlike @@ -423,27 +450,74 @@ cleanup_the_pipeline () discard_pipeline (disposer); } +/* Not used right now */ +void +discard_last_procsub_child () +{ + PROCESS *disposer; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + disposer = last_procsub_child; + last_procsub_child = (PROCESS *)NULL; + UNBLOCK_CHILD (oset); + + if (disposer) + discard_pipeline (disposer); +} + +static struct pipeline_saver * +alloc_pipeline_saver () +{ + struct pipeline_saver *ret; + + ret = (struct pipeline_saver *)xmalloc (sizeof (struct pipeline_saver)); + ret->pipeline = 0; + ret->next = 0; + return ret; +} + void save_pipeline (clear) int clear; { - saved_pipeline = the_pipeline; + sigset_t set, oset; + struct pipeline_saver *saver; + + BLOCK_CHILD (set, oset); + saver = alloc_pipeline_saver (); + saver->pipeline = the_pipeline; + saver->next = saved_pipeline; + saved_pipeline = saver; if (clear) the_pipeline = (PROCESS *)NULL; saved_already_making_children = already_making_children; + UNBLOCK_CHILD (oset); } -void +PROCESS * restore_pipeline (discard) int discard; { PROCESS *old_pipeline; + sigset_t set, oset; + struct pipeline_saver *saver; + BLOCK_CHILD (set, oset); old_pipeline = the_pipeline; - the_pipeline = saved_pipeline; + the_pipeline = saved_pipeline->pipeline; + saver = saved_pipeline; + saved_pipeline = saved_pipeline->next; + free (saver); already_making_children = saved_already_making_children; + UNBLOCK_CHILD (oset); + if (discard && old_pipeline) - discard_pipeline (old_pipeline); + { + discard_pipeline (old_pipeline); + return ((PROCESS *)NULL); + } + return old_pipeline; } /* Start building a pipeline. */ @@ -453,7 +527,12 @@ start_pipeline () if (the_pipeline) { cleanup_the_pipeline (); - pipeline_pgrp = 0; + /* If job_control == 0, pipeline_pgrp will always be equal to shell_pgrp; + if job_control != 0, pipeline_pgrp == shell_pgrp for command and + process substitution, in which case we want it to be the same as + shell_pgrp for the lifetime of this shell instance. */ + if (pipeline_pgrp != shell_pgrp) + pipeline_pgrp = 0; #if defined (PGRP_PIPE) sh_closepipe (pgrp_pipe); #endif @@ -566,9 +645,15 @@ stop_pipeline (async, deferred) the_pipeline = (PROCESS *)NULL; newjob->pgrp = pipeline_pgrp; - pipeline_pgrp = 0; + + /* Invariant: if the shell is executing a command substitution, + pipeline_pgrp == shell_pgrp. Other parts of the shell assume this. */ + if (pipeline_pgrp != shell_pgrp) + pipeline_pgrp = 0; newjob->flags = 0; + if (pipefail_opt) + newjob->flags |= J_PIPEFAIL; /* Flag to see if in another pgrp. */ if (job_control) @@ -627,7 +712,7 @@ stop_pipeline (async, deferred) { newjob->flags |= J_FOREGROUND; /* - * !!!!! NOTE !!!!! (chet@ins.cwru.edu) + * !!!!! NOTE !!!!! (chet@po.cwru.edu) * * The currently-accepted job control wisdom says to set the * terminal's process group n+1 times in an n-step pipeline: @@ -635,34 +720,104 @@ stop_pipeline (async, deferred) * the parent gives it away. * * Don't give the terminal away if this shell is an asynchronous - * subshell. + * subshell or if we're a (presumably non-interactive) shell running + * in the background. * */ - if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0 && running_in_background == 0) maybe_give_terminal_to (shell_pgrp, newjob->pgrp, 0); } } stop_making_children (); UNBLOCK_CHILD (oset); - return (js.j_current); + return (newjob ? i : js.j_current); } /* Functions to manage the list of exited background pids whose status has - been saved. */ + been saved. -static struct pidstat * -bgp_alloc (pid, status) + pidstat_table: + + The current implementation is a hash table using a single (separate) arena + for storage that can be allocated and freed as a unit. The size of the hash + table is a multiple of PIDSTAT_TABLE_SZ (4096) and multiple PIDs that hash + to the same value are chained through the bucket_next and bucket_prev + pointers (basically coalesced hashing for collision resolution). + + bgpids.storage: + + All pid/status storage is done using the circular buffer bgpids.storage. + This must contain at least js.c_childmax entries. The circular buffer is + used to supply the ordered list Posix requires ("the last CHILD_MAX + processes"). To avoid searching the entire storage table for a given PID, + the hash table (pidstat_table) holds pointers into the storage arena and + uses a doubly-linked list of cells (bucket_next/bucket_prev, also pointers + into the arena) to implement collision resolution. */ + +/* The number of elements in bgpids.storage always has to be > js.c_childmax for + the circular buffer to work right. */ +static void +bgp_resize () +{ + ps_index_t nsize, nsize_cur, nsize_max; + ps_index_t psi; + + if (bgpids.nalloc == 0) + { + /* invalidate hash table when bgpids table is reallocated */ + for (psi = 0; psi < PIDSTAT_TABLE_SZ; psi++) + pidstat_table[psi] = NO_PIDSTAT; + nsize = BGPIDS_TABLE_SZ; /* should be power of 2 */ + bgpids.head = 0; + } + else + nsize = bgpids.nalloc; + + nsize_max = TYPE_MAXIMUM (ps_index_t); + nsize_cur = (ps_index_t)js.c_childmax; + if (nsize_cur < 0) /* overflow */ + nsize_cur = MAX_CHILD_MAX; + + while (nsize > 0 && nsize < nsize_cur) /* > 0 should catch overflow */ + nsize <<= 1; + if (nsize > nsize_max || nsize <= 0) /* overflow? */ + nsize = nsize_max; + if (nsize > MAX_CHILD_MAX) + nsize = nsize_max = MAX_CHILD_MAX; /* hard cap */ + + if (bgpids.nalloc < nsize_cur && bgpids.nalloc < nsize_max) + { + bgpids.storage = (struct pidstat *)xrealloc (bgpids.storage, nsize * sizeof (struct pidstat)); + + for (psi = bgpids.nalloc; psi < nsize; psi++) + bgpids.storage[psi].pid = NO_PID; + + bgpids.nalloc = nsize; + + } + else if (bgpids.head >= bgpids.nalloc) /* wrap around */ + bgpids.head = 0; +} + +static ps_index_t +bgp_getindex () +{ + if (bgpids.nalloc < (ps_index_t)js.c_childmax || bgpids.head >= bgpids.nalloc) + bgp_resize (); + + pshash_delindex (bgpids.head); /* XXX - clear before reusing */ + return bgpids.head++; +} + +static ps_index_t * +pshash_getbucket (pid) pid_t pid; - int status; { - struct pidstat *ps; + unsigned long hash; /* XXX - u_bits32_t */ - ps = (struct pidstat *)xmalloc (sizeof (struct pidstat)); - ps->pid = pid; - ps->status = status; - ps->next = (struct pidstat *)0; - return ps; + hash = pid * 0x9e370001UL; + return (&pidstat_table[hash % PIDSTAT_TABLE_SZ]); } static struct pidstat * @@ -670,61 +825,102 @@ bgp_add (pid, status) pid_t pid; int status; { + ps_index_t *bucket, psi; struct pidstat *ps; - ps = bgp_alloc (pid, status); + /* bucket == existing chain of pids hashing to same value + psi = where were going to put this pid/status */ - if (bgpids.list == 0) - { - bgpids.list = bgpids.end = ps; - bgpids.npid = 0; /* just to make sure */ - } - else + bucket = pshash_getbucket (pid); /* index into pidstat_table */ + psi = bgp_getindex (); /* bgpids.head, index into storage */ + + /* XXX - what if psi == *bucket? */ + if (psi == *bucket) { - bgpids.end->next = ps; - bgpids.end = ps; + internal_debug ("hashed pid %d (pid %d) collides with bgpids.head, skipping", psi, pid); + bgpids.storage[psi].pid = NO_PID; /* make sure */ + psi = bgp_getindex (); /* skip to next one */ } + + ps = &bgpids.storage[psi]; + + ps->pid = pid; + ps->status = status; + ps->bucket_next = *bucket; + ps->bucket_prev = NO_PIDSTAT; + bgpids.npid++; +#if 0 if (bgpids.npid > js.c_childmax) bgp_prune (); +#endif + + if (ps->bucket_next != NO_PIDSTAT) + bgpids.storage[ps->bucket_next].bucket_prev = psi; + + *bucket = psi; /* set chain head in hash table */ return ps; } +static void +pshash_delindex (psi) + ps_index_t psi; +{ + struct pidstat *ps; + ps_index_t *bucket; + + ps = &bgpids.storage[psi]; + if (ps->pid == NO_PID) + return; + + if (ps->bucket_next != NO_PIDSTAT) + bgpids.storage[ps->bucket_next].bucket_prev = ps->bucket_prev; + if (ps->bucket_prev != NO_PIDSTAT) + bgpids.storage[ps->bucket_prev].bucket_next = ps->bucket_next; + else + { + bucket = pshash_getbucket (ps->pid); + *bucket = ps->bucket_next; /* deleting chain head in hash table */ + } + + /* clear out this cell, in case it gets reused. */ + ps->pid = NO_PID; + ps->bucket_next = ps->bucket_prev = NO_PIDSTAT; +} + static int bgp_delete (pid) pid_t pid; { - struct pidstat *prev, *p; + ps_index_t psi, orig_psi; - for (prev = p = bgpids.list; p; prev = p, p = p->next) - if (p->pid == pid) - { - prev->next = p->next; /* remove from list */ + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) + return 0; + + /* Search chain using hash to find bucket in pidstat_table */ + for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) + { + if (bgpids.storage[psi].pid == pid) break; - } + if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ + { + internal_warning (_("bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next"), psi); + return 0; + } + } - if (p == 0) + if (psi == NO_PIDSTAT) return 0; /* not found */ -#if defined (DEBUG) +#if 0 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; + pshash_delindex (psi); /* hash table management */ 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; } @@ -732,46 +928,242 @@ bgp_delete (pid) static void bgp_clear () { - struct pidstat *ps, *p; + if (bgpids.storage == 0 || bgpids.nalloc == 0) + return; + + free (bgpids.storage); + + bgpids.storage = 0; + bgpids.nalloc = 0; + bgpids.head = 0; - 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. */ + found. If not found, return -1. We hash to the right spot in pidstat_table + and follow the bucket chain to the end. */ static int bgp_search (pid) pid_t pid; { - struct pidstat *ps; + ps_index_t psi, orig_psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) + return -1; + + /* Search chain using hash to find bucket in pidstat_table */ + for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) + { + if (bgpids.storage[psi].pid == pid) + return (bgpids.storage[psi].status); + if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ + { + internal_warning (_("bgp_search: LOOP: psi (%d) == storage[psi].bucket_next"), psi); + return -1; + } + } - for (ps = bgpids.list ; ps; ps = ps->next) - if (ps->pid == pid) - return ps->status; return -1; } +#if 0 static void bgp_prune () { - struct pidstat *ps; + return; +} +#endif + +/* External interface to bgp_add; takes care of blocking and unblocking + SIGCHLD. Not really used. */ +void +save_proc_status (pid, status) + pid_t pid; + int status; +{ + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + bgp_add (pid, status); + UNBLOCK_CHILD (oset); +} + +#if defined (PROCESS_SUBSTITUTION) +/* Functions to add and remove PROCESS * children from the list of running + asynchronous process substitutions. The list is currently a simple singly + linked list of PROCESS *, so it works with the set of callers that want + a child. subst.c:process_substitute adds to the list, the various wait* + functions manipulate child->running and child->status, and processes are + eventually removed from the list and added to the bgpids table. */ + +static void +procsub_free (p) + PROCESS *p; +{ + FREE (p->command); + free (p); +} + +PROCESS * +procsub_add (p) + PROCESS *p; +{ + sigset_t set, oset; - while (bgpids.npid > js.c_childmax) + BLOCK_CHILD (set, oset); + if (procsubs.head == 0) { - ps = bgpids.list; - bgpids.list = bgpids.list->next; - free (ps); - bgpids.npid--; + procsubs.head = procsubs.end = p; + procsubs.nproc = 0; } + else + { + procsubs.end->next = p; + procsubs.end = p; + } + procsubs.nproc++; + UNBLOCK_CHILD (oset); + + return p; } +PROCESS * +procsub_search (pid) + pid_t pid; +{ + PROCESS *p; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + for (p = procsubs.head; p; p = p->next) + if (p->pid == pid) + break; + UNBLOCK_CHILD (oset); + + return p; +} + +PROCESS * +procsub_delete (pid) + pid_t pid; +{ + PROCESS *p, *prev; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + for (p = prev = procsubs.head; p; prev = p, p = p->next) + if (p->pid == pid) + { + prev->next = p->next; + break; + } + + if (p == 0) + { + UNBLOCK_CHILD (oset); + return p; + } + + if (p == procsubs.head) + procsubs.head = procsubs.head->next; + else if (p == procsubs.end) + procsubs.end = prev; + + procsubs.nproc--; + if (procsubs.nproc == 0) + procsubs.head = procsubs.end = 0; + else if (procsubs.nproc == 1) /* XXX */ + procsubs.end = procsubs.head; + + /* this can't be called anywhere in a signal handling path */ + bgp_add (p->pid, process_exit_status (p->status)); + UNBLOCK_CHILD (oset); + return (p); +} + +int +procsub_waitpid (pid) + pid_t pid; +{ + PROCESS *p; + int r; + + p = procsub_search (pid); + if (p == 0) + return -1; + if (p->running == PS_DONE) + return (p->status); + r = wait_for (p->pid, 0); + return (r); /* defer removing until later */ +} + +void +procsub_waitall () +{ + PROCESS *p; + int r; + + for (p = procsubs.head; p; p = p->next) + { + if (p->running == PS_DONE) + continue; + r = wait_for (p->pid, 0); + } +} + +void +procsub_clear () +{ + PROCESS *p, *ps; + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + + for (ps = procsubs.head; ps; ) + { + p = ps; + ps = ps->next; + procsub_free (p); + } + procsubs.head = procsubs.end = 0; + procsubs.nproc = 0; + UNBLOCK_CHILD (oset); +} + +/* Must be called with SIGCHLD blocked. */ +void +procsub_prune () +{ + PROCESS *ohead, *oend, *ps, *p; + int onproc; + + if (procsubs.nproc == 0) + return; + + ohead = procsubs.head; + oend = procsubs.end; + onproc = procsubs.nproc; + + procsubs.head = procsubs.end = 0; + procsubs.nproc = 0; + + for (p = ohead; p; ) + { + ps = p->next; + p->next = 0; + if (p->running == PS_DONE) + { + bgp_add (p->pid, process_exit_status (p->status)); + procsub_free (p); + } + else + procsub_add (p); + p = ps; + } +} +#endif + /* 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 @@ -795,7 +1187,7 @@ reset_job_indices () js.j_firstj++; } if (js.j_firstj == old) - js.j_firstj = js.j_lastj = js.j_njobs = 0; + js.j_firstj = js.j_lastj = js.j_njobs = 0; } if (jobs[js.j_lastj] == 0) { @@ -811,7 +1203,7 @@ reset_job_indices () js.j_lastj--; } if (js.j_lastj == old) - js.j_firstj = js.j_lastj = js.j_njobs = 0; + js.j_firstj = js.j_lastj = js.j_njobs = 0; } } @@ -821,6 +1213,7 @@ cleanup_dead_jobs () { register int i; int os; + PROCESS *discard; if (js.j_jobslots == 0 || jobs_list_frozen) return; @@ -830,17 +1223,20 @@ cleanup_dead_jobs () /* 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG(("cleanup_dead_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); if (jobs[i] && DEADJOB (i) && IS_NOTIFIED (i)) delete_job (i, 0); } +#if defined (PROCESS_SUBSTITUTION) + procsub_prune (); + last_procsub_child = (PROCESS *)NULL; +#endif + #if defined (COPROCESS_SUPPORT) coproc_reap (); #endif @@ -877,14 +1273,12 @@ delete_old_job (pid) 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 + INTERNAL_DEBUG (("delete_old_job: found pid %d in job %d with state %d", pid, job, jobs[job]->state)); if (JOBSTATE (job) == JDEAD) delete_job (job, DEL_NOBGPID); else { - internal_warning (_("forked pid %d appears in running job %d"), pid, job); + internal_debug (_("forked pid %d appears in running job %d"), pid, job+1); if (p) p->pid = 0; } @@ -927,7 +1321,7 @@ realloc_jobs_list () } } -#if defined (DEBUG) +#if 0 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); @@ -958,14 +1352,14 @@ realloc_jobs_list () 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 +#if 0 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 +/* Compact the jobs list by removing dead jobs. Assume 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 @@ -981,7 +1375,7 @@ compact_jobs_list (flags) reap_dead_jobs (); realloc_jobs_list (); -#ifdef DEBUG +#if 0 itrace("compact_jobs_list: returning %d", (js.j_lastj || jobs[js.j_lastj]) ? js.j_lastj + 1 : 0); #endif @@ -1007,10 +1401,9 @@ delete_job (job_index, dflags) if (temp == 0) return; - if ((dflags & DEL_NOBGPID) == 0) + if ((dflags & DEL_NOBGPID) == 0 && (temp->flags & (J_ASYNC|J_FOREGROUND)) == J_ASYNC) { 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)); } @@ -1027,13 +1420,13 @@ delete_job (job_index, dflags) js.c_injobs -= ndel; if (temp->state == JDEAD) { - js.c_reaped -= ndel; + /* XXX - save_pipeline and restore_pipeline (e.g., for DEBUG trap) can + mess with this total. */ + js.c_reaped -= ndel; /* assumes proc hadn't been reaped earlier */ 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 + INTERNAL_DEBUG (("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)); js.c_reaped = 0; } } @@ -1068,7 +1461,7 @@ nohup_job (job_index) } /* Get rid of the data structure associated with a process chain. */ -static int +int discard_pipeline (chain) register PROCESS *chain; { @@ -1105,12 +1498,10 @@ add_process (name, pid) 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 + internal_debug ("add_process: process %5ld (%s) in the_pipeline", (long)p->pid, p->command); if (PALIVE (p)) - internal_warning (_("add_process: pid %5ld (%s) marked as still alive"), (long)p->pid, p->command); + internal_warning (_("add_process: pid %5ld (%s) marked as still alive"), (long)p->pid, p->command); p->running = PS_RECYCLED; /* mark as recycled */ } #endif @@ -1134,6 +1525,33 @@ add_process (name, pid) } } +/* Create a (dummy) PROCESS with NAME, PID, and STATUS, and make it the last + process in jobs[JID]->pipe. Used by the lastpipe code. */ +void +append_process (name, pid, status, jid) + char *name; + pid_t pid; + int status; + int jid; +{ + PROCESS *t, *p; + + t = (PROCESS *)xmalloc (sizeof (PROCESS)); + t->next = (PROCESS *)NULL; + t->pid = pid; + /* set process exit status using offset discovered by configure */ + t->status = (status & 0xff) << WEXITSTATUS_OFFSET; + t->running = PS_DONE; + t->command = name; + + js.c_reaped++; /* XXX */ + + for (p = jobs[jid]->pipe; p->next != jobs[jid]->pipe; p = p->next) + ; + p->next = t; + t->next = jobs[jid]->pipe; +} + #if 0 /* Take the last job and make it the first job. Must be called with SIGCHLD blocked. */ @@ -1193,12 +1611,11 @@ map_over_jobs (func, arg1, arg2) /* 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG (("map_over_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); + if (jobs[i]) { result = (*func)(jobs[i], arg1, arg2, i); @@ -1268,6 +1685,27 @@ kill_current_pipeline () start_pipeline (); } +static PROCESS * +find_pid_in_pipeline (pid, pipeline, alive_only) + pid_t pid; + PROCESS *pipeline; + int alive_only; +{ + PROCESS *p; + + p = 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 != pipeline); + return ((PROCESS *)NULL); +} + /* 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. */ @@ -1279,23 +1717,25 @@ find_pipeline (pid, alive_only, jobp) { int job; PROCESS *p; + struct pipeline_saver *save; /* See if this process is in the pipeline that we are building. */ + p = (PROCESS *)NULL; 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); - } + if (the_pipeline && (p = find_pid_in_pipeline (pid, the_pipeline, alive_only))) + return (p); + + /* Is this process in a saved pipeline? */ + for (save = saved_pipeline; save; save = save->next) + if (save->pipeline && (p = find_pid_in_pipeline (pid, save->pipeline, alive_only))) + return (p); + +#if defined (PROCESS_SUBSTITUTION) + if (procsubs.nproc > 0 && (p = procsub_search (pid)) && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p))) + return (p); +#endif job = find_job (pid, alive_only, &p); if (jobp) @@ -1334,12 +1774,11 @@ find_job (pid, alive_only, procp) /* 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG (("find_job: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); + if (jobs[i]) { p = jobs[i]->pipe; @@ -1365,9 +1804,10 @@ find_job (pid, alive_only, procp) /* 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) +get_job_by_pid (pid, block, procp) pid_t pid; int block; + PROCESS **procp; { int job; sigset_t set, oset; @@ -1375,7 +1815,7 @@ get_job_by_pid (pid, block) if (block) BLOCK_CHILD (set, oset); - job = find_job (pid, 0, NULL); + job = find_job (pid, 0, procp); if (block) UNBLOCK_CHILD (oset); @@ -1413,7 +1853,7 @@ j_strsignal (s) if (x == 0) { x = retcode_name_buffer; - sprintf (x, _("Signal %d"), s); + snprintf (x, sizeof(retcode_name_buffer), _("Signal %d"), s); } return x; } @@ -1436,7 +1876,7 @@ printable_job_status (j, p, format) else { temp = retcode_name_buffer; - sprintf (temp, _("Stopped(%s)"), signal_name (WSTOPSIG (p->status))); + snprintf (temp, sizeof(retcode_name_buffer), _("Stopped(%s)"), signal_name (WSTOPSIG (p->status))); } } else if (RUNNING (j)) @@ -1452,11 +1892,14 @@ printable_job_status (j, p, format) temp = retcode_name_buffer; es = WEXITSTATUS (p->status); if (es == 0) - strcpy (temp, _("Done")); + { + strncpy (temp, _("Done"), sizeof (retcode_name_buffer) - 1); + temp[sizeof (retcode_name_buffer) - 1] = '\0'; + } else if (posixly_correct) - sprintf (temp, _("Done(%d)"), es); + snprintf (temp, sizeof(retcode_name_buffer), _("Done(%d)"), es); else - sprintf (temp, _("Exit %d"), es); + snprintf (temp, sizeof(retcode_name_buffer), _("Exit %d"), es); } else temp = _("Unknown status"); @@ -1576,9 +2019,8 @@ print_pipeline (p, job_index, format, stream) 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"); + putc ('\r', stream); + fprintf (stream, "\n"); } if (p == last) @@ -1644,6 +2086,7 @@ list_one_job (job, format, ignore, job_index) int format, ignore, job_index; { pretty_print_job (job_index, format, stdout); + cleanup_dead_jobs (); } void @@ -1677,22 +2120,36 @@ list_all_jobs (format) 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) +make_child (command, flags) char *command; - int async_p; + int flags; { - int forksleep; - sigset_t set, oset; + int async_p, forksleep; + sigset_t set, oset, termset, chldset, oset_copy; pid_t pid; + SigHandler *oterm; + + sigemptyset (&oset_copy); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &oset_copy); + sigaddset (&oset_copy, SIGTERM); + /* Block SIGTERM here and unblock in child after fork resets the + set of pending signals. */ sigemptyset (&set); sigaddset (&set, SIGCHLD); sigaddset (&set, SIGINT); + sigaddset (&set, SIGTERM); + sigemptyset (&oset); sigprocmask (SIG_BLOCK, &set, &oset); + /* Blocked in the parent, child will receive it after unblocking SIGTERM */ + if (interactive_shell) + oterm = set_signal_handler (SIGTERM, SIG_DFL); + making_children (); + async_p = (flags & FORK_ASYNC); forksleep = 1; #if defined (BUFFERED_INPUT) @@ -1708,16 +2165,28 @@ make_child (command, async_p) /* Create the child, handle severe errors. Retry on EAGAIN. */ while ((pid = fork ()) < 0 && errno == EAGAIN && forksleep < FORKSLEEP_MAX) { -#if 0 /* for bash-4.2 */ + /* bash-4.2 */ + /* keep SIGTERM blocked until we reset the handler to SIG_IGN */ + sigprocmask (SIG_SETMASK, &oset_copy, (sigset_t *)NULL); /* If we can't create any children, try to reap some dead ones. */ waitchld (-1, 0); -#endif + + errno = EAGAIN; /* restore errno */ sys_error ("fork: retry"); + if (sleep (forksleep) != 0) break; forksleep <<= 1; + + if (interrupt_state) + break; + sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL); } + if (pid != 0) + if (interactive_shell) + set_signal_handler (SIGTERM, oterm); + if (pid < 0) { sys_error ("fork"); @@ -1729,7 +2198,7 @@ make_child (command, async_p) if (the_pipeline) kill_current_pipeline (); - last_command_exit_value = EX_NOEXEC; + set_exit_status (EX_NOEXEC); throw_to_top_level (); /* Reset signals, etc. */ } @@ -1739,6 +2208,11 @@ make_child (command, async_p) signals to the default state for a new process. */ pid_t mypid; + subshell_environment |= SUBSHELL_IGNTRAP; + + /* If this ends up being changed to modify or use `command' in the + child process, go back and change callers who free `command' in + the child process when this returns. */ mypid = getpid (); #if defined (BUFFERED_INPUT) /* Close default_buffered_input if it's > 0. We don't close it if it's @@ -1747,9 +2221,11 @@ make_child (command, async_p) unset_bash_input (0); #endif /* BUFFERED_INPUT */ - /* Restore top-level signal mask. */ - sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL); + CLRINTERRUPT; /* XXX - children have their own interrupt state */ + /* Restore top-level signal mask, including unblocking SIGTERM */ + restore_sigmask (); + if (job_control) { /* All processes in this pipeline belong in the same @@ -1781,7 +2257,7 @@ make_child (command, async_p) 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)) + if ((flags & FORK_NOTERM) == 0 && async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&(SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0) && running_in_background == 0) give_terminal_to (pipeline_pgrp, 0); #if defined (PGRP_PIPE) @@ -1810,15 +2286,11 @@ make_child (command, async_p) 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. */ + /* Avoid pid aliasing. 1 seems like a safe, unusual pid value. */ last_asynchronous_pid = 1; #endif } @@ -1827,13 +2299,6 @@ make_child (command, async_p) /* 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) @@ -1863,19 +2328,17 @@ make_child (command, 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. */ + /* Avoid pid aliasing. 1 seems like a safe, unusual pid value. */ last_asynchronous_pid = 1; #endif - if (pid_wrap > 0) - delete_old_job (pid); + /* Delete the saved status for any job containing this PID in case it's + been reused. */ + 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 */ + /* Perform the check for pid reuse unconditionally. Some systems reuse + PIDs before giving a process CHILD_MAX/_SC_CHILD_MAX unique ones. */ + bgp_delete (pid); /* new process, discard any saved status */ last_made_pid = pid; @@ -1883,9 +2346,9 @@ make_child (command, async_p) 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. */ + /* Unblock SIGTERM, SIGINT, and SIGCHLD unless creating a pipeline, in + which case SIGCHLD remains blocked until all commands in the pipeline + have been created (execute_cmd.c:execute_pipeline()). */ sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); } @@ -1901,12 +2364,51 @@ ignore_tty_job_signals () set_signal_handler (SIGTTOU, SIG_IGN); } +/* Reset the tty-generated job control signals to SIG_DFL unless that signal + was ignored at entry to the shell, in which case we need to set it to + SIG_IGN in the child. We can't rely on resetting traps, since the hard + ignored signals can't be trapped. */ +void +default_tty_job_signals () +{ + if (signal_is_trapped (SIGTSTP) == 0 && signal_is_hard_ignored (SIGTSTP)) + set_signal_handler (SIGTSTP, SIG_IGN); + else + set_signal_handler (SIGTSTP, SIG_DFL); + + if (signal_is_trapped (SIGTTIN) == 0 && signal_is_hard_ignored (SIGTTIN)) + set_signal_handler (SIGTTIN, SIG_IGN); + else + set_signal_handler (SIGTTIN, SIG_DFL); + + if (signal_is_trapped (SIGTTOU) == 0 && signal_is_hard_ignored (SIGTTOU)) + set_signal_handler (SIGTTOU, SIG_IGN); + else + set_signal_handler (SIGTTOU, SIG_DFL); +} + +/* Called once in a parent process. */ void -default_tty_job_signals () +get_original_tty_job_signals () { - set_signal_handler (SIGTSTP, SIG_DFL); - set_signal_handler (SIGTTIN, SIG_DFL); - set_signal_handler (SIGTTOU, SIG_DFL); + static int fetched = 0; + + if (fetched == 0) + { + if (interactive_shell) + { + set_original_signal (SIGTSTP, SIG_DFL); + set_original_signal (SIGTTIN, SIG_DFL); + set_original_signal (SIGTTOU, SIG_DFL); + } + else + { + get_original_signal (SIGTSTP); + get_original_signal (SIGTTIN); + get_original_signal (SIGTTOU); + } + fetched = 1; + } } /* When we end a job abnormally, or if we stop a job, we set the tty to the @@ -2079,14 +2581,17 @@ find_last_pid (job, block) 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. */ + jobs table, it returns 127. If FLAGS doesn't include JWAIT_PERROR, + we suppress the error message if PID isn't found. */ + int -wait_for_single_pid (pid) +wait_for_single_pid (pid, flags) pid_t pid; + int flags; { register PROCESS *child; sigset_t set, oset; - int r, job; + int r, job, alive; BLOCK_CHILD (set, oset); child = find_pipeline (pid, 0, (int *)NULL); @@ -2101,11 +2606,23 @@ wait_for_single_pid (pid) if (child == 0) { - internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid); - return (127); + if (flags & JWAIT_PERROR) + internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid); + return (257); } - r = wait_for (pid); + alive = 0; + do + { + r = wait_for (pid, 0); + if ((flags & JWAIT_FORCE) == 0) + break; + + BLOCK_CHILD (set, oset); + alive = PALIVE (child); + UNBLOCK_CHILD (oset); + } + while (alive); /* POSIX.2: if we just waited for a job, we can remove it from the jobs table. */ @@ -2122,18 +2639,23 @@ wait_for_single_pid (pid) bgp_delete (pid); } + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; + return r; } -/* Wait for all of the backgrounds of this shell to finish. */ -void -wait_for_background_pids () +/* Wait for all of the background processes started by this shell to finish. */ +int +wait_for_background_pids (ps) + struct procstat *ps; { - register int i, r, waited_for; + register int i, r; + int any_stopped, check_async, njobs; sigset_t set, oset; pid_t pid; - for (waited_for = 0;;) + for (njobs = any_stopped = 0, check_async = 1;;) { BLOCK_CHILD (set, oset); @@ -2141,12 +2663,17 @@ wait_for_background_pids () /* 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG (("wait_for_background_pids: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); + + if (jobs[i] && STOPPED (i)) + { + builtin_warning ("job %d[%d] stopped", i+1, find_last_pid (i, 0)); + any_stopped = 1; + } + if (jobs[i] && RUNNING (i) && IS_FOREGROUND (i) == 0) break; } @@ -2161,28 +2688,52 @@ wait_for_background_pids () UNBLOCK_CHILD (oset); QUIT; errno = 0; /* XXX */ - r = wait_for_single_pid (pid); - if (r == -1) + r = wait_for_single_pid (pid, JWAIT_PERROR); + if (ps) + { + ps->pid = pid; + ps->status = (r < 0 || r > 256) ? 127 : r; + } + if (r == -1 && errno == ECHILD) { /* If we're mistaken about job state, compensate. */ - if (errno == ECHILD) - mark_all_jobs_as_dead (); + check_async = 0; + mark_all_jobs_as_dead (); } - else - waited_for++; + njobs++; } +#if defined (PROCESS_SUBSTITUTION) + procsub_waitall (); +#endif + /* 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 (); + + return njobs; } /* 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 int wait_sigint_received; +static int child_caught_sigint; + +int waiting_for_child; + +/* Clean up state after longjmp to wait_intr_buf */ +void +wait_sigint_cleanup () +{ + queue_sigchld = 0; + waiting_for_child = 0; + restore_sigint_handler (); +} + static void restore_sigint_handler () { @@ -2190,11 +2741,10 @@ restore_sigint_handler () { set_signal_handler (SIGINT, old_sigint_handler); old_sigint_handler = INVALID_SIGNAL_HANDLER; + waiting_for_child = 0; } } -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). */ @@ -2204,10 +2754,9 @@ wait_sigint_handler (sig) { SigHandler *sigint_handler; - if (interrupt_immediately || - (this_shell_builtin && this_shell_builtin == wait_builtin)) + if (this_shell_builtin && this_shell_builtin == wait_builtin) { - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (128+SIGINT); 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). */ @@ -2215,19 +2764,28 @@ wait_sigint_handler (sig) 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); + if (wait_intr_flag) + sh_longjmp (wait_intr_buf, 1); + else + /* Let CHECK_WAIT_INTR handle it in wait_for/waitchld */ + SIGRETURN (0); } - - ADDINTERRUPT; - QUIT; + else /* wait_builtin but signal not trapped, treat as interrupt */ + kill (getpid (), SIGINT); } /* XXX - should this be interrupt_state? If it is, the shell will act as if it got the SIGINT interrupt. */ - wait_sigint_received = 1; + if (waiting_for_child) + wait_sigint_received = 1; + else + { + set_exit_status (128+SIGINT); + restore_sigint_handler (); + kill (getpid (), SIGINT); + } /* Otherwise effectively ignore the SIGINT and allow the running job to be killed. */ @@ -2283,7 +2841,7 @@ raw_job_exit_status (job) int fail; WAIT ret; - if (pipefail_opt) + if (jobs[job]->flags & J_PIPEFAIL) { fail = 0; p = jobs[job]->pipe; @@ -2306,14 +2864,14 @@ raw_job_exit_status (job) /* 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 +int job_exit_status (job) int job; { return (process_exit_status (raw_job_exit_status (job))); } -static int +int job_exit_signal (job) int job; { @@ -2340,18 +2898,19 @@ job_exit_signal (job) the jobs table. Returns -1 if waitchld() returns -1, indicating that there are no unwaited-for child processes. */ int -wait_for (pid) +wait_for (pid, flags) pid_t pid; + int flags; { 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. */ + child = 0; BLOCK_CHILD (set, oset); /* Ignore interrupts while waiting for a job run without job control @@ -2364,10 +2923,17 @@ wait_for (pid) substitution. */ /* This is possibly a race condition -- should it go in stop_pipeline? */ - wait_sigint_received = 0; + wait_sigint_received = child_caught_sigint = 0; if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) { - old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + SigHandler *temp_sigint_handler; + + temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + if (temp_sigint_handler == wait_sigint_handler) + internal_debug ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap); + else + old_sigint_handler = temp_sigint_handler; + waiting_for_child = 0; if (old_sigint_handler == SIG_IGN) set_signal_handler (SIGINT, old_sigint_handler); } @@ -2379,55 +2945,51 @@ wait_for (pid) /* Check for terminating signals and exit the shell if we receive one */ CHECK_TERMSIG; + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; + /* 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 (pid != ANY_PID) + 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) + if (job == NO_JOB && pid != ANY_PID) /* XXX -- && pid != ANY_PID ? */ 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 (pid == ANY_PID || 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 + int old_waiting; + 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 + old_waiting = waiting_for_child; + waiting_for_child = 1; + /* XXX - probably not strictly necessary but we want to catch + everything that happened before we switch the behavior of + trap_handler to longjmp on a trapped signal (waiting_for_child) */ + CHECK_WAIT_INTR; + r = waitchld (pid, 1); /* XXX */ + waiting_for_child = old_waiting; +#if 0 +itrace("wait_for: blocking wait for %d returns %d child = %p", (int)pid, r, child); +#endif queue_sigchld = 0; if (r == -1 && errno == ECHILD && this_shell_builtin == wait_builtin) { termination_state = -1; + /* XXX - restore sigint handler here */ + restore_sigint_handler (); goto wait_for_return; } @@ -2437,8 +2999,11 @@ wait_for (pid) if it exists, as JDEAD. */ if (r == -1 && errno == ECHILD) { - child->running = PS_DONE; - WSTATUS (child->status) = 0; /* XXX -- can't find true status */ + if (child) + { + 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) { @@ -2446,8 +3011,12 @@ wait_for (pid) js.c_reaped++; js.j_ndead++; } + if (pid == ANY_PID) + { + termination_state = -1; + break; + } } -#endif /* WAITPID_BROKEN */ } /* If the shell is interactive, and job control is disabled, see @@ -2458,20 +3027,34 @@ wait_for (pid) QUIT; /* Check for terminating signals and exit the shell if we receive one */ CHECK_TERMSIG; + + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; + + if (pid == ANY_PID) + { + /* XXX - could set child but we don't have a handle on what waitchld + reaps. Leave termination_state alone. */ + restore_sigint_handler (); + goto wait_for_return; + } } while (PRUNNING (child) || (job != NO_JOB && RUNNING (job))); + /* Restore the original SIGINT signal handler before we return. */ + restore_sigint_handler (); + /* 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); + : (child ? process_exit_status (child->status) : EXECUTION_SUCCESS); last_command_exit_signal = (job != NO_JOB) ? job_exit_signal (job) - : process_exit_signal (child->status); + : (child ? process_exit_signal (child->status) : 0); /* XXX */ - if ((job != NO_JOB && JOBSTATE (job) == JSTOPPED) || WIFSTOPPED (child->status)) + if ((job != NO_JOB && JOBSTATE (job) == JSTOPPED) || (child && WIFSTOPPED (child->status))) termination_state = 128 + WSTOPSIG (child->status); if (job == NO_JOB || IS_JOBCONTROL (job)) @@ -2493,7 +3076,18 @@ wait_for (pid) 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); + /* Don't modify terminal pgrp if we are running in background or a + subshell. Make sure subst.c:command_substitute uses the same + conditions to determine whether or not it should undo this and + give the terminal to pipeline_pgrp. We don't give the terminal + back to shell_pgrp if an async job in the background exits because + we never gave it to that job in the first place. An async job in + the foreground is one we started in the background and foregrounded + with `fg', and gave it the terminal. */ + if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 && + (job == NO_JOB || IS_ASYNC (job) == 0 || IS_FOREGROUND (job)) && + (subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0) + give_terminal_to (shell_pgrp, 0); } /* If the command did not exit cleanly, or the job is just @@ -2527,6 +3121,11 @@ if (job == NO_JOB) get_new_window_size (0, (int *)0, (int *)0); } else +#if defined (READLINE) + /* We don't want to do this if we are running a process during + programmable completion or a command bound to `bind -x'. */ + if (RL_ISSTATE (RL_STATE_COMPLETING|RL_STATE_DISPATCHING|RL_STATE_TERMPREPPED) == 0) +#endif get_tty_state (); /* If job control is enabled, the job was started with job @@ -2542,6 +3141,18 @@ if (job == NO_JOB) SIGINT signal handler; maybe it should. */ if (signal_is_trapped (SIGINT) == 0 && (loop_level || (shell_compatibility_level > 32 && executing_list))) ADDINTERRUPT; + /* Call any SIGINT trap handler if the shell is running a loop, so + the loop can be broken. This seems more useful and matches the + behavior when the shell is running a builtin command in a loop + when it is interrupted. Change ADDINTERRUPT to + trap_handler (SIGINT) to run the trap without interrupting the + loop. */ + else if (signal_is_trapped (SIGINT) && loop_level) + ADDINTERRUPT; + /* If an interactive shell with job control enabled is sourcing + a file, allow the interrupt to terminate the file sourcing. */ + else if (interactive_shell && signal_is_trapped (SIGINT) == 0 && sourcelevel) + ADDINTERRUPT; else { putchar ('\n'); @@ -2549,17 +3160,16 @@ if (job == NO_JOB) } } } - else if ((subshell_environment & SUBSHELL_COMSUB) && wait_sigint_received) + else if ((subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PIPE)) && 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) + substitution or to run a pipeline element that consists of + something like a while loop or a for loop, simulate getting + and being killed by the SIGINT to pass the status back to our + parent. */ + if (child_caught_sigint == 0 && 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 (); @@ -2567,9 +3177,23 @@ if (job == NO_JOB) kill (getpid (), SIGINT); } } + else if (interactive_shell == 0 && subshell_environment == 0 && IS_FOREGROUND (job)) + { + s = job_signal_status (job); + + /* If we are non-interactive, but job control is enabled, and the job + died due to SIGINT, pretend we got the SIGINT */ + if (job_control && IS_JOBCONTROL (job) && WIFSIGNALED (s) && WTERMSIG (s) == SIGINT) + { + ADDINTERRUPT; /* For now */ + } + + if (check_window_size) + get_new_window_size (0, (int *)0, (int *)0); + } /* Moved here from set_job_status_and_cleanup, which is in the SIGCHLD - signal handler path */ + signal handler path */ if (DEADJOB (job) && IS_FOREGROUND (job) /*&& subshell_environment == 0*/) setjstatus (job); @@ -2585,30 +3209,47 @@ if (job == NO_JOB) 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. */ + are no unwaited-for child processes or an error occurs. If FLAGS + includes JWAIT_FORCE, we wait for the job to terminate, no just change + state */ int -wait_for_job (job) - int job; +wait_for_job (job, flags, ps) + int job, flags; + struct procstat *ps; { pid_t pid; - int r; + int r, state; sigset_t set, oset; BLOCK_CHILD(set, oset); - if (JOBSTATE (job) == JSTOPPED) + state = JOBSTATE (job); + if (state == 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); + + do + { + r = wait_for (pid, 0); + if (r == -1 && errno == ECHILD) + mark_all_jobs_as_dead (); + + CHECK_WAIT_INTR; + + if ((flags & JWAIT_FORCE) == 0) + break; + + BLOCK_CHILD (set, oset); + state = (job != NO_JOB && jobs[job]) ? JOBSTATE (job) : JDEAD; + UNBLOCK_CHILD (oset); + } + while (state != JDEAD); /* POSIX.2: we can remove the job from the jobs table if we just waited for it. */ @@ -2617,9 +3258,99 @@ wait_for_job (job) jobs[job]->flags |= J_NOTIFIED; UNBLOCK_CHILD (oset); + if (ps) + { + ps->pid = pid; + ps->status = (r < 0) ? 127 : r; + } return r; } +/* Wait for any background job started by this shell to finish. Very + similar to wait_for_background_pids(). Returns the exit status of + the next exiting job, -1 if there are no background jobs. The caller + is responsible for translating -1 into the right return value. RPID, + if non-null, gets the pid of the job's process leader. */ +int +wait_for_any_job (flags, ps) + int flags; + struct procstat *ps; +{ + pid_t pid; + int i, r; + sigset_t set, oset; + + if (jobs_list_frozen) + return -1; + + /* First see if there are any unnotified dead jobs that we can report on */ + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + { + if ((flags & JWAIT_WAITING) && jobs[i] && IS_WAITING (i) == 0) + continue; /* if we don't want it, skip it */ + if (jobs[i] && DEADJOB (i) && IS_NOTIFIED (i) == 0) + { +return_job: + r = job_exit_status (i); + pid = find_last_pid (i, 0); + if (ps) + { + ps->pid = pid; + ps->status = r; + } + notify_of_job_status (); /* XXX */ + delete_job (i, 0); +#if defined (COPROCESS_SUPPORT) + coproc_reap (); +#endif + UNBLOCK_CHILD (oset); + return r; + } + } + UNBLOCK_CHILD (oset); + + /* At this point, we have no dead jobs in the jobs table. Wait until we + get one, even if it takes multiple pids exiting. */ + for (;;) + { + /* Make sure there is a background job to wait for */ + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + if (jobs[i] && RUNNING (i) && IS_FOREGROUND (i) == 0) + break; + if (i == js.j_jobslots) + { + UNBLOCK_CHILD (oset); + return -1; + } + + UNBLOCK_CHILD (oset); + + QUIT; + CHECK_TERMSIG; + CHECK_WAIT_INTR; + + errno = 0; + r = wait_for (ANY_PID, 0); /* special sentinel value for wait_for */ + if (r == -1 && errno == ECHILD) + mark_all_jobs_as_dead (); + + /* Now we see if we have any dead jobs and return the first one */ + BLOCK_CHILD (set, oset); + for (i = 0; i < js.j_jobslots; i++) + { + if ((flags & JWAIT_WAITING) && jobs[i] && IS_WAITING (i) == 0) + continue; /* if we don't want it, skip it */ + if (jobs[i] && DEADJOB (i)) + goto return_job; + } + UNBLOCK_CHILD (oset); + } + + return -1; +} + /* 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 @@ -2824,6 +3555,13 @@ start_job (job, foreground) BLOCK_CHILD (set, oset); + if ((subshell_environment & SUBSHELL_COMSUB) && (pipeline_pgrp == shell_pgrp)) + { + internal_error (_("%s: no current jobs"), this_command_name); + UNBLOCK_CHILD (oset); + return (-1); + } + if (DEADJOB (job)) { internal_error (_("%s: job has terminated"), this_command_name); @@ -2891,6 +3629,7 @@ start_job (job, foreground) { get_tty_state (); save_stty = shell_tty_info; + jobs[job]->flags &= ~J_ASYNC; /* no longer async */ /* Give the terminal to this job. */ if (IS_JOBCONTROL (job)) give_terminal_to (jobs[job]->pgrp, 0); @@ -2912,7 +3651,7 @@ start_job (job, foreground) pid = find_last_pid (job, 0); UNBLOCK_CHILD (oset); - st = wait_for (pid); + st = wait_for (pid, 0); shell_tty_info = save_stty; set_tty_state (); return (st); @@ -2963,7 +3702,7 @@ kill_pid (pid, sig, group) 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) + else if (jobs[job]->pgrp == shell_pgrp) /* XXX - IS_JOBCONTROL(job) == 0? */ { p = jobs[job]->pipe; do @@ -3036,6 +3775,8 @@ waitchld (wpid, block) WAIT status; PROCESS *child; pid_t pid; + int ind; + int call_set_current, last_stopped_job, job, children_exited, waitpid_flags; static int wcontinued = WCONTINUED; /* run-time fix for glibc problem */ @@ -3051,8 +3792,11 @@ waitchld (wpid, block) : 0; if (sigchld || block == 0) waitpid_flags |= WNOHANG; + /* Check for terminating signals and exit the shell if we receive one */ CHECK_TERMSIG; + /* Check for a trapped signal interrupting the wait builtin and jump out */ + CHECK_WAIT_INTR; if (block == 1 && queue_sigchld == 0 && (waitpid_flags & WNOHANG) == 0) { @@ -3062,6 +3806,14 @@ waitchld (wpid, block) pid = WAITPID (-1, &status, waitpid_flags); +#if 0 +if (wpid != -1 && block) + itrace("waitchld: blocking waitpid returns %d", pid); +#endif +#if 0 +if (wpid != -1) + itrace("waitchld: %s waitpid returns %d", block?"blocking":"non-blocking", pid); +#endif /* WCONTINUED may be rejected by waitpid as invalid even when defined */ if (wcontinued && pid < 0 && errno == EINVAL) { @@ -3073,7 +3825,7 @@ waitchld (wpid, block) 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) @@ -3084,14 +3836,39 @@ waitchld (wpid, block) break; } +#if 0 +itrace("waitchld: waitpid returns %d block = %d children_exited = %d", pid, block, children_exited); +#endif /* 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; + CHECK_WAIT_INTR; + + /* If waitpid returns -1/EINTR and the shell saw a SIGINT, then we + assume the child has blocked or handled SIGINT. In that case, we + require the child to actually die due to SIGINT to act on the + SIGINT we received; otherwise we assume the child handled it and + let it go. */ + if (pid < 0 && errno == EINTR && wait_sigint_received) + child_caught_sigint = 1; + if (pid <= 0) continue; /* jumps right to the test */ + /* Linux kernels appear to signal the parent but not interrupt the + waitpid() (or restart it even without SA_RESTART) on SIGINT, so if + we saw a SIGINT and the process exited or died due to some other + signal, assume the child caught the SIGINT. */ + if (wait_sigint_received && (WIFSIGNALED (status) == 0 || WTERMSIG (status) != SIGINT)) + child_caught_sigint = 1; + + /* If the child process did die due to SIGINT, forget our assumption + that it caught or otherwise handled it. */ + if (WIFSIGNALED (status) && WTERMSIG (status) == SIGINT) + child_caught_sigint = 0; + /* children_exited is used to run traps on SIGCHLD. We don't want to - run the trap if a process is just being continued. */ + run the trap if a process is just being continued. */ if (WIFCONTINUED(status) == 0) { children_exited++; @@ -3102,7 +3879,16 @@ waitchld (wpid, block) child = find_process (pid, 1, &job); /* want living procs only */ #if defined (COPROCESS_SUPPORT) - coproc_pidchk (pid, status); + coproc_pidchk (pid, WSTATUS(status)); +#endif + +#if defined (PROCESS_SUBSTITUTION) + /* Only manipulate the list of process substitutions while SIGCHLD + is blocked. We only use this as a hint that we can remove FIFOs + or close file descriptors corresponding to terminated process + substitutions. */ + if ((ind = find_procsub_child (pid)) >= 0) + set_procsub_status (ind, pid, WSTATUS (status)); #endif /* It is not an error to have a child terminate that we did @@ -3122,12 +3908,12 @@ waitchld (wpid, block) if (PEXITED (child)) { - log_process_exit (child); + log_process_exit (child); js.c_totreaped++; if (job != NO_JOB) js.c_reaped++; } - + if (job == NO_JOB) continue; @@ -3151,25 +3937,43 @@ waitchld (wpid, block) } /* Call a SIGCHLD trap handler for each child that exits, if one is set. */ - if (job_control && signal_is_trapped (SIGCHLD) && children_exited && + if (children_exited && + (signal_is_trapped (SIGCHLD) || trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER) && 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] */ + /* This was trap_handler (SIGCHLD) but that can lose traps if + children_exited > 1 */ + queue_sigchld_trap (children_exited); wait_signal_received = SIGCHLD; - longjmp (wait_intr_buf, 1); + /* If we're in a signal handler, let CHECK_WAIT_INTR pick it up; + run_pending_traps will call run_sigchld_trap later */ + if (sigchld == 0 && wait_intr_flag) + sh_longjmp (wait_intr_buf, 1); } - - run_sigchld_trap (children_exited); + /* If not in posix mode and not executing the wait builtin, queue the + signal for later handling. Run the trap immediately if we are + executing the wait builtin, but don't break out of `wait'. */ + else if (sigchld) /* called from signal handler */ + queue_sigchld_trap (children_exited); + else if (signal_in_progress (SIGCHLD)) + queue_sigchld_trap (children_exited); + else if (trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER) + queue_sigchld_trap (children_exited); + else if (running_trap) + queue_sigchld_trap (children_exited); + else if (this_shell_builtin == wait_builtin) + run_sigchld_trap (children_exited); /* XXX */ + else + queue_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) + if (asynchronous_notification && interactive && executing_builtin == 0) notify_of_job_status (); return (children_exited); @@ -3211,8 +4015,7 @@ set_job_status_and_cleanup (job) #endif { any_stopped = 1; - any_tstped |= interactive && job_control && - (WSTOPSIG (child->status) == SIGTSTP); + any_tstped |= job_control && (WSTOPSIG (child->status) == SIGTSTP); } child = child->next; } @@ -3278,7 +4081,7 @@ set_job_status_and_cleanup (job) 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) && + child_caught_sigint && IS_FOREGROUND (job) && signal_is_trapped (SIGINT)) { int old_frozen; @@ -3299,8 +4102,12 @@ set_job_status_and_cleanup (job) 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) && + SIGINT, it needs to perform normal SIGINT processing. XXX - should + this change its behavior depending on whether the last command in an + pipeline exited due to SIGINT, or any process in the pipeline? Right + now it does this if any process in the pipeline exits due to SIGINT. */ + else if (wait_sigint_received && + child_caught_sigint == 0 && IS_FOREGROUND (job) && IS_JOBCONTROL (job) == 0) { int old_frozen; @@ -3314,9 +4121,9 @@ set_job_status_and_cleanup (job) /* 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. */ + 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); @@ -3338,9 +4145,9 @@ set_job_status_and_cleanup (job) 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 (); + restore_sigint_handler (); if (temp_handler == SIG_DFL) - termsig_handler (SIGINT); + termsig_handler (SIGINT); /* XXX */ else if (temp_handler != SIG_IGN) (*temp_handler) (SIGINT); } @@ -3399,10 +4206,11 @@ run_sigchld_trap (nchild) 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); + unwind_protect_pointer (this_shell_builtin); + unwind_protect_pointer (temporary_env); /* 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 () @@ -3412,16 +4220,19 @@ run_sigchld_trap (nchild) subst_assign_varlist = (WORD_LIST *)NULL; the_pipeline = (PROCESS *)NULL; + temporary_env = 0; /* traps should not run with temporary env */ + + running_trap = SIGCHLD + 1; 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); + parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE); } run_unwind_frame ("SIGCHLD trap"); + running_trap = 0; } /* Function to call when you want to notify people of changes @@ -3466,22 +4277,37 @@ notify_of_job_status () 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 + + /* Do the same thing and don't print anything or mark as notified + for the signals we're not going to report on. This is the opposite + of the first two cases under case JDEAD below. */ + else if (interactive_shell == 0 && DEADJOB (job) && IS_FOREGROUND (job) == 0 && + WIFSIGNALED (s) && (termsig == SIGINT +#if defined (DONT_REPORT_SIGTERM) + || termsig == SIGTERM +#endif +#if defined (DONT_REPORT_SIGPIPE) + || termsig == SIGPIPE +#endif + || signal_is_trapped (termsig))) + continue; + + /* hang onto the status if the shell is running -c command */ + else if (startup_state == 2 && subshell_environment == 0 && + WIFSIGNALED (s) == 0 && + ((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job))) + continue; + /* 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. */ + substitution, so don't print anything. + Otherwise, if the shell is not interactive, POSIX says that `jobs' + is the only way to notify of job status. */ if ((job_control == 0 && interactive_shell) || - (startup_state == 2 && (subshell_environment & SUBSHELL_COMSUB))) -#endif + (startup_state == 2 && (subshell_environment & SUBSHELL_COMSUB)) || + (startup_state == 2 && posixly_correct && (subshell_environment & SUBSHELL_COMSUB) == 0)) { /* POSIX.2 compatibility: if the shell is not interactive, hang onto the job corresponding to the last asynchronous @@ -3494,12 +4320,15 @@ notify_of_job_status () /* Print info on jobs that are running in the background, and on foreground jobs that were killed by anything - except SIGINT (and possibly SIGPIPE). */ + except SIGINT (and possibly SIGTERM and SIGPIPE). */ switch (JOBSTATE (job)) { case JDEAD: if (interactive_shell == 0 && termsig && WIFSIGNALED (s) && termsig != SIGINT && +#if defined (DONT_REPORT_SIGTERM) + termsig != SIGTERM && +#endif #if defined (DONT_REPORT_SIGPIPE) termsig != SIGPIPE && #endif @@ -3511,6 +4340,7 @@ notify_of_job_status () } else if (IS_FOREGROUND (job)) { + /* foreground jobs, interactive and non-interactive shells */ #if !defined (DONT_REPORT_SIGPIPE) if (termsig && WIFSIGNALED (s) && termsig != SIGINT) #else @@ -3524,9 +4354,13 @@ notify_of_job_status () fprintf (stderr, "\n"); } + /* foreground jobs that exit cleanly */ + jobs[job]->flags |= J_NOTIFIED; } - else if (job_control) /* XXX job control test added */ + else if (job_control) { + /* background jobs with job control, interactive and + non-interactive shells */ if (dir == 0) dir = current_working_directory (); pretty_print_job (job, JLIST_STANDARD, stderr); @@ -3535,7 +4369,14 @@ notify_of_job_status () _("(wd now: %s)\n"), polite_directory_format (dir)); } - jobs[job]->flags |= J_NOTIFIED; + /* Interactive shells without job control enabled are handled + above. */ + /* XXX - this is a catch-all in case we missed a state */ + else +{ +internal_debug("notify_of_job_status: catch-all setting J_NOTIFIED on job %d (%d), startup state = %d", job, jobs[job]->flags, startup_state); + jobs[job]->flags |= J_NOTIFIED; +} break; case JSTOPPED: @@ -3570,7 +4411,7 @@ initialize_job_control (force) int force; { pid_t t; - int t_errno; + int t_errno, tty_sigs; t_errno = -1; shell_pgrp = getpgid (0); @@ -3581,12 +4422,13 @@ initialize_job_control (force) exit (1); } - /* We can only have job control if we are interactive. */ - if (interactive == 0) + /* We can only have job control if we are interactive unless we force it. */ + if (interactive == 0 && force == 0) { job_control = 0; original_pgrp = NO_PID; shell_tty = fileno (stderr); + terminal_pgrp = tcgetpgrp (shell_tty); /* for checking later */ } else { @@ -3606,7 +4448,8 @@ initialize_job_control (force) if (shell_tty == -1) shell_tty = dup (fileno (stderr)); /* fd 2 */ - shell_tty = move_to_high_fd (shell_tty, 1, -1); + if (shell_tty != -1) + 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. */ @@ -3614,18 +4457,28 @@ initialize_job_control (force) { shell_pgrp = getpid (); setpgid (0, shell_pgrp); - tcsetpgrp (shell_tty, shell_pgrp); + if (shell_tty != -1) + tcsetpgrp (shell_tty, shell_pgrp); } + tty_sigs = 0; while ((terminal_pgrp = tcgetpgrp (shell_tty)) != -1) { if (shell_pgrp != terminal_pgrp) { SigHandler *ottin; - ottin = set_signal_handler(SIGTTIN, SIG_DFL); + CHECK_TERMSIG; + ottin = set_signal_handler (SIGTTIN, SIG_DFL); kill (0, SIGTTIN); set_signal_handler (SIGTTIN, ottin); + if (tty_sigs++ > 16) + { + sys_error (_("initialize_job_control: no job control in background")); + job_control = 0; + original_pgrp = terminal_pgrp; /* for eventual give_terminal_to */ + goto just_bail; + } continue; } break; @@ -3667,6 +4520,8 @@ initialize_job_control (force) t_errno = errno; setpgid (0, original_pgrp); shell_pgrp = original_pgrp; + errno = t_errno; + sys_error (_("cannot set terminal process group (%d)"), shell_pgrp); job_control = 0; } } @@ -3683,6 +4538,9 @@ initialize_job_control (force) internal_error (_("no job control in this shell")); } +just_bail: + running_in_background = terminal_pgrp != shell_pgrp; + if (shell_tty != fileno (stderr)) SET_CLOSE_ON_EXEC (shell_tty); @@ -3693,10 +4551,7 @@ initialize_job_control (force) 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; + set_maxchild (0); return job_control; } @@ -3709,6 +4564,7 @@ debug_print_pgrps () (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)); + itrace("pipeline_pgrp -> %ld", (long)pipeline_pgrp); } #endif @@ -3786,7 +4642,7 @@ initialize_job_signals () 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 + /* Leave disposition unmodified for non-interactive shells without job control. */ } @@ -3880,9 +4736,7 @@ maybe_give_terminal_to (opgrp, npgrp, flags) } 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 + internal_debug ("%d: maybe_give_terminal_to: terminal pgrp == %d shell pgrp = %d new pgrp = %d in_background = %d", (int)getpid(), tpgrp, opgrp, npgrp, running_in_background); return -1; } else @@ -3911,14 +4765,18 @@ delete_all_jobs (running_only) /* 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG (("delete_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); + if (jobs[i] && (running_only == 0 || (running_only && RUNNING(i)))) - delete_job (i, DEL_WARNSTOPPED); + /* We don't want to add any of these pids to bgpids. If running_only + is non-zero, we don't want to add running jobs to the list. + If we are interested in all jobs, not just running jobs, and + we are going to clear the bgpids list below (bgp_clear()), we + don't need to bother. */ + delete_job (i, DEL_WARNSTOPPED|DEL_NOBGPID); } if (running_only == 0) { @@ -3967,12 +4825,11 @@ count_all_jobs () /* 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG (("count_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); + if (jobs[i] && DEADJOB(i) == 0) n++; } @@ -4037,17 +4894,16 @@ mark_dead_jobs_as_notified (force) 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG (("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); + if (jobs[i] && DEADJOB (i)) { ndead++; @@ -4055,17 +4911,15 @@ mark_dead_jobs_as_notified (force) } } -#ifdef DEBUG +# if 0 if (ndeadproc != js.c_reaped) itrace("mark_dead_jobs_as_notified: ndeadproc (%d) != js.c_reaped (%d)", ndeadproc, js.c_reaped); +# endif if (ndead != js.j_ndead) - itrace("mark_dead_jobs_as_notified: ndead (%d) != js.j_ndead (%d)", ndead, js.j_ndead); -#endif + INTERNAL_DEBUG (("mark_dead_jobs_as_notified: ndead (%d) != js.j_ndead (%d)", ndead, js.j_ndead)); if (js.c_childmax < 0) - js.c_childmax = getmaxchild (); - if (js.c_childmax < 0) - js.c_childmax = DEFAULT_CHILD_MAX; + set_maxchild (0); /* Don't do anything if the number of dead processes is less than CHILD_MAX and we're not forcing a cleanup. */ @@ -4095,12 +4949,11 @@ itrace("mark_dead_jobs_as_notified: child_max = %d ndead = %d ndeadproc = %d", j { 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); + INTERNAL_DEBUG (("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 + INTERNAL_DEBUG (("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj)); + /* 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 @@ -4115,13 +4968,30 @@ itrace("mark_dead_jobs_as_notified: child_max = %d ndead = %d ndeadproc = %d", j } /* Here to allow other parts of the shell (like the trap stuff) to - unfreeze the jobs list. */ + freeze and unfreeze the jobs list. */ +int +freeze_jobs_list () +{ + int o; + + o = jobs_list_frozen; + jobs_list_frozen = 1; + return o; +} + void unfreeze_jobs_list () { jobs_list_frozen = 0; } +void +set_jobs_list_frozen (s) + int s; +{ + jobs_list_frozen = s; +} + /* Allow or disallow job control to take place. Returns the old value of job_control. */ int @@ -4133,6 +5003,26 @@ set_job_control (arg) old = job_control; job_control = arg; + if (terminal_pgrp == NO_PID && shell_tty >= 0) + terminal_pgrp = tcgetpgrp (shell_tty); + + /* If we're turning on job control we're going to want to know the shell's + process group. */ + if (job_control != old && job_control) + shell_pgrp = getpgid (0); + + running_in_background = (terminal_pgrp != shell_pgrp); + +#if 0 + if (interactive_shell == 0 && running_in_background == 0 && job_control != old) + { + if (job_control) + initialize_job_signals (); + else + default_tty_job_signals (); + } +#endif + /* 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) @@ -4161,16 +5051,14 @@ without_job_control () void end_job_control () { - if (interactive_shell) /* XXX - should it be interactive? */ - { - terminate_stopped_jobs (); + if (job_control) + terminate_stopped_jobs (); - if (original_pgrp >= 0) - give_terminal_to (original_pgrp, 1); - } + if (original_pgrp >= 0 && terminal_pgrp != original_pgrp) + give_terminal_to (original_pgrp, 1); - if (original_pgrp >= 0) - setpgid (0, original_pgrp); + if (original_pgrp >= 0 && setpgid (0, original_pgrp) == 0) + shell_pgrp = original_pgrp; } /* Restart job control by closing shell tty and reinitializing. This is @@ -4183,6 +5071,36 @@ restart_job_control () initialize_job_control (0); } +/* Set the maximum number of background children we keep track of to NCHILD. + If the caller passes NCHILD as 0 or -1, this ends up setting it to + LMAXCHILD, which is initialized the first time through. */ +void +set_maxchild (nchild) + int nchild; +{ + static int lmaxchild = -1; + + /* Initialize once. */ + if (lmaxchild < 0) + { + errno = 0; + lmaxchild = getmaxchild (); + if (lmaxchild < 0 && errno == 0) + lmaxchild = MAX_CHILD_MAX; /* assume unlimited */ + } + if (lmaxchild < 0) + lmaxchild = DEFAULT_CHILD_MAX; + + /* Clamp value we set. Minimum is what Posix requires, maximum is defined + above as MAX_CHILD_MAX. */ + if (nchild < lmaxchild) + nchild = lmaxchild; + else if (nchild > MAX_CHILD_MAX) + nchild = MAX_CHILD_MAX; + + js.c_childmax = nchild; +} + /* Set the handler to run when the shell receives a SIGCHLD signal. */ void set_sigchld_handler () diff --git a/jobs.h b/jobs.h index 65de773..276204f 100644 --- a/jobs.h +++ b/jobs.h @@ -1,6 +1,6 @@ /* jobs.h -- structures and definitions used by the jobs.c file. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,6 +38,15 @@ /* I looked it up. For pretty_print_job (). The real answer is 24. */ #define LONGEST_SIGNAL_DESC 24 +/* Defines for the wait_for_* functions and for the wait builtin to use */ +#define JWAIT_PERROR (1 << 0) +#define JWAIT_FORCE (1 << 1) +#define JWAIT_NOWAIT (1 << 2) /* don't waitpid(), just return status if already exited */ +#define JWAIT_WAITING (1 << 3) /* wait for jobs marked J_WAITING only */ + +/* flags for wait_for */ +#define JWAIT_NOTERM (1 << 8) /* wait_for doesn't give terminal away */ + /* The max time to sleep while retrying fork() on EAGAIN failure */ #define FORKSLEEP_MAX 16 @@ -61,6 +70,11 @@ typedef struct process { char *command; /* The particular program that is running. */ } PROCESS; +struct pipeline_saver { + struct process *pipeline; + struct pipeline_saver *next; +}; + /* PALIVE really means `not exited' */ #define PSTOPPED(p) (WIFSTOPPED((p)->status)) #define PRUNNING(p) ((p)->running == PS_RUNNING) @@ -92,13 +106,16 @@ typedef enum { JNONE = -1, JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, JMIXED = 8 } J #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_STATSAVED 0x10 /* A process in this job had status saved via $! */ #define J_ASYNC 0x20 /* Job was started asynchronously */ +#define J_PIPEFAIL 0x40 /* pipefail set when job was started */ +#define J_WAITING 0x80 /* one of a list of jobs for which we are waiting */ #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) +#define IS_WAITING(j) ((jobs[j]->flags & J_WAITING) != 0) typedef struct job { char *wd; /* The working directory at time of invocation. */ @@ -137,18 +154,42 @@ struct jobstats { JOB *j_lastasync; /* last async job allocated by stop_pipeline */ }; +/* Revised to accommodate new hash table bgpids implementation. */ +typedef pid_t ps_index_t; + struct pidstat { - struct pidstat *next; - pid_t pid; - int status; + ps_index_t bucket_next; + ps_index_t bucket_prev; + + pid_t pid; + bits16_t status; /* only 8 bits really needed */ }; struct bgpids { - struct pidstat *list; - struct pidstat *end; + struct pidstat *storage; /* storage arena */ + + ps_index_t head; + ps_index_t nalloc; + int npid; }; +#define NO_PIDSTAT (ps_index_t)-1 + +/* standalone process status struct, without bgpids indexes */ +struct procstat { + pid_t pid; + bits16_t status; +}; + +/* A standalone singly-linked list of PROCESS *, used in various places + including keeping track of process substitutions. */ +struct procchain { + PROCESS *head; + PROCESS *end; + int nproc; +}; + #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. */ @@ -156,6 +197,14 @@ struct bgpids { /* A value which cannot be a process ID. */ #define NO_PID (pid_t)-1 +#define ANY_PID (pid_t)-1 + +/* flags for make_child () */ +#define FORK_SYNC 0 /* normal synchronous process */ +#define FORK_ASYNC 1 /* background process */ +#define FORK_NOJOB 2 /* don't put process in separate pgrp */ +#define FORK_NOTERM 4 /* don't give terminal to any pgrp */ + /* System calls. */ #if !defined (HAVE_UNISTD_H) extern pid_t fork (), getpid (), getpgrp (); @@ -165,81 +214,112 @@ extern pid_t fork (), getpid (), getpgrp (); extern struct jobstats js; extern pid_t original_pgrp, shell_pgrp, pipeline_pgrp; -extern pid_t last_made_pid, last_asynchronous_pid; +extern volatile 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 int already_making_children; +extern int running_in_background; -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 PROCESS *last_procsub_child; -extern int count_all_jobs __P((void)); +extern JOB **jobs; -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)); +extern void making_children PARAMS((void)); +extern void stop_making_children PARAMS((void)); +extern void cleanup_the_pipeline PARAMS((void)); +extern void discard_last_procsub_child PARAMS((void)); +extern void save_pipeline PARAMS((int)); +extern PROCESS *restore_pipeline PARAMS((int)); +extern void start_pipeline PARAMS((void)); +extern int stop_pipeline PARAMS((int, COMMAND *)); +extern int discard_pipeline PARAMS((PROCESS *)); +extern void append_process PARAMS((char *, pid_t, int, int)); + +extern void save_proc_status PARAMS((pid_t, int)); + +extern PROCESS *procsub_add PARAMS((PROCESS *)); +extern PROCESS *procsub_search PARAMS((pid_t)); +extern PROCESS *procsub_delete PARAMS((pid_t)); +extern int procsub_waitpid PARAMS((pid_t)); +extern void procsub_waitall PARAMS((void)); +extern void procsub_clear PARAMS((void)); +extern void procsub_prune PARAMS((void)); + +extern void delete_job PARAMS((int, int)); +extern void nohup_job PARAMS((int)); +extern void delete_all_jobs PARAMS((int)); +extern void nohup_all_jobs PARAMS((int)); + +extern int count_all_jobs PARAMS((void)); + +extern void terminate_current_pipeline PARAMS((void)); +extern void terminate_stopped_jobs PARAMS((void)); +extern void hangup_all_jobs PARAMS((void)); +extern void kill_current_pipeline PARAMS((void)); #if defined (__STDC__) && defined (pid_t) -extern int get_job_by_pid __P((int, int)); -extern void describe_pid __P((int)); +extern int get_job_by_pid PARAMS((int, int, PROCESS **)); +extern void describe_pid PARAMS((int)); #else -extern int get_job_by_pid __P((pid_t, int)); -extern void describe_pid __P((pid_t)); +extern int get_job_by_pid PARAMS((pid_t, int, PROCESS **)); +extern void describe_pid PARAMS((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 void list_one_job PARAMS((JOB *, int, int, int)); +extern void list_all_jobs PARAMS((int)); +extern void list_stopped_jobs PARAMS((int)); +extern void list_running_jobs PARAMS((int)); -extern pid_t make_child __P((char *, int)); +extern pid_t make_child PARAMS((char *, int)); -extern int get_tty_state __P((void)); -extern int set_tty_state __P((void)); +extern int get_tty_state PARAMS((void)); +extern int set_tty_state PARAMS((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 int job_exit_status PARAMS((int)); +extern int job_exit_signal PARAMS((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 int wait_for_single_pid PARAMS((pid_t, int)); +extern int wait_for_background_pids PARAMS((struct procstat *)); +extern int wait_for PARAMS((pid_t, int)); +extern int wait_for_job PARAMS((int, int, struct procstat *)); +extern int wait_for_any_job PARAMS((int, struct procstat *)); -extern void run_sigchld_trap __P((int)); +extern void wait_sigint_cleanup PARAMS((void)); -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 notify_and_cleanup PARAMS((void)); +extern void reap_dead_jobs PARAMS((void)); +extern int start_job PARAMS((int, int)); +extern int kill_pid PARAMS((pid_t, int, int)); +extern int initialize_job_control PARAMS((int)); +extern void initialize_job_signals PARAMS((void)); +extern int give_terminal_to PARAMS((pid_t, int)); -extern void init_job_stats __P((void)); +extern void run_sigchld_trap PARAMS((int)); -extern void close_pgrp_pipe __P((void)); -extern void save_pgrp_pipe __P((int *, int)); -extern void restore_pgrp_pipe __P((int *)); +extern int freeze_jobs_list PARAMS((void)); +extern void unfreeze_jobs_list PARAMS((void)); +extern void set_jobs_list_frozen PARAMS((int)); +extern int set_job_control PARAMS((int)); +extern void without_job_control PARAMS((void)); +extern void end_job_control PARAMS((void)); +extern void restart_job_control PARAMS((void)); +extern void set_sigchld_handler PARAMS((void)); +extern void ignore_tty_job_signals PARAMS((void)); +extern void default_tty_job_signals PARAMS((void)); +extern void get_original_tty_job_signals PARAMS((void)); -#if defined (JOB_CONTROL) -extern int job_control; +extern void init_job_stats PARAMS((void)); + +extern void close_pgrp_pipe PARAMS((void)); +extern void save_pgrp_pipe PARAMS((int *, int)); +extern void restore_pgrp_pipe PARAMS((int *)); + +extern void set_maxchild PARAMS((int)); + +#ifdef DEBUG +extern void debug_print_pgrps (void); #endif +extern int job_control; /* set to 0 in nojobs.c */ + #endif /* _JOBS_H_ */ diff --git a/lib/glob/Makefile.in b/lib/glob/Makefile.in index 1ccae68..27e34f9 100644 --- a/lib/glob/Makefile.in +++ b/lib/glob/Makefile.in @@ -20,7 +20,7 @@ # along with this program. If not, see . srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ @@ -42,6 +42,7 @@ PROFILE_FLAGS = @PROFILE_FLAGS@ CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ +STYLE_CFLAGS = @STYLE_CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @@ -52,8 +53,8 @@ BASHINCDIR = ${topdir}/include INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib -CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} \ - $(LOCAL_CFLAGS) $(CFLAGS) +CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) ${INCLUDES} $(CPPFLAGS) \ + $(STYLE_CFLAGS) $(LOCAL_CFLAGS) $(CFLAGS) ${ADDON_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. @@ -71,7 +72,7 @@ CSOURCES = $(srcdir)/glob.c $(srcdir)/strmatch.c $(srcdir)/smatch.c \ # The header files for this library. HSOURCES = $(srcdir)/strmatch.h -OBJECTS = glob.o strmatch.o smatch.o xmbsrtowcs.o +OBJECTS = glob.o strmatch.o smatch.o xmbsrtowcs.o gmisc.o # The texinfo files which document this library. DOCSOURCE = doc/glob.texi @@ -119,6 +120,9 @@ realclean distclean maintainer-clean: clean mostlyclean: clean -( cd doc && $(MAKE) $(MFLAGS) $@ ) +${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) + ###################################################################### # # # Dependencies for the object files which make up this library. # @@ -137,22 +141,29 @@ strmatch.o: $(BUILD_DIR)/config.h strmatch.o: $(BASHINCDIR)/stdc.h glob.o: $(BUILD_DIR)/config.h +glob.o: $(topdir)/shell.h $(BUILD_DIR)/pathnames.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 +gmisc.o: $(BUILD_DIR)/config.h +gmisc.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h +gmisc.o: $(BASHINCDIR)/shmbutil.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 +gmisc.o: gmisc.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 +gmisc.o: gm_loop.c smatch.o: sm_loop.c diff --git a/lib/glob/glob.c b/lib/glob/glob.c index c77618f..b66af85 100644 --- a/lib/glob/glob.c +++ b/lib/glob/glob.c @@ -1,6 +1,6 @@ /* glob.c -- file-name wildcard pattern matching for Bash. - Copyright (C) 1985-2009 Free Software Foundation, Inc. + Copyright (C) 1985-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -48,7 +48,10 @@ #include "stdc.h" #include "memalloc.h" +#include + #include "shell.h" +#include "general.h" #include "glob.h" #include "strmatch.h" @@ -81,9 +84,11 @@ struct globval 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 void throw_to_top_level PARAMS((void)); +extern int sh_eaccess PARAMS((const char *, int)); +extern char *sh_makepath PARAMS((const char *, const char *, int)); +extern int signal_is_pending PARAMS((int)); +extern void run_pending_traps PARAMS((void)); extern int extended_glob; @@ -95,28 +100,44 @@ int noglob_dot_filenames = 1; is done without regard to case. */ int glob_ignore_case = 0; +/* Global variable controlling whether globbing ever returns . or .. + regardless of the pattern. If set to 1, no glob pattern will ever + match `.' or `..'. Disabled by default. */ +int glob_always_skip_dot_and_dotdot = 1; + /* 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)); +static int skipname PARAMS((char *, char *, int)); #if HANDLE_MULTIBYTE -static int mbskipname __P((char *, char *, int)); +static int mbskipname PARAMS((char *, char *, int)); #endif +void udequote_pathname PARAMS((char *)); #if HANDLE_MULTIBYTE -static void udequote_pathname __P((char *)); -static void wdequote_pathname __P((char *)); +void wcdequote_pathname PARAMS((wchar_t *)); +static void wdequote_pathname PARAMS((char *)); +static void dequote_pathname PARAMS((char *)); #else -# define dequote_pathname udequote_pathname +# define dequote_pathname(p) udequote_pathname(p) #endif -static void dequote_pathname __P((char *)); -static int glob_testdir __P((char *)); -static char **glob_dir_to_array __P((char *, char **, int)); +static int glob_testdir PARAMS((char *, int)); +static char **glob_dir_to_array PARAMS((char *, char **, int)); + +/* Make sure these names continue to agree with what's in smatch.c */ +extern char *glob_patscan PARAMS((char *, char *, int)); +extern wchar_t *glob_patscan_wc PARAMS((wchar_t *, wchar_t *, int)); + +/* And this from gmisc.c/gm_loop.c */ +extern int wextglob_pattern_p PARAMS((wchar_t *)); + +extern char *glob_dirscan PARAMS((char *, int)); /* Compile `glob_loop.c' for single-byte characters. */ -#define CHAR unsigned char +#define GCHAR unsigned char +#define CHAR char #define INT int #define L(CS) CS #define INTERNAL_GLOB_PATTERN_P internal_glob_pattern_p @@ -125,6 +146,7 @@ static char **glob_dir_to_array __P((char *, char **, int)); /* Compile `glob_loop.c' again for multibyte characters. */ #if HANDLE_MULTIBYTE +#define GCHAR wchar_t #define CHAR wchar_t #define INT wint_t #define L(CS) L##CS @@ -144,7 +166,7 @@ glob_pattern_p (pattern) wchar_t *wpattern; int r; - if (MB_CUR_MAX == 1) + if (MB_CUR_MAX == 1 || mbsmbchar (pattern) == 0) return (internal_glob_pattern_p ((unsigned char *)pattern)); /* Convert strings to wide chars, and call the multibyte version. */ @@ -158,69 +180,268 @@ glob_pattern_p (pattern) return r; #else - return (internal_glob_pattern_p (pattern)); + return (internal_glob_pattern_p ((unsigned char *)pattern)); #endif } +#if EXTENDED_GLOB + +#if defined (HANDLE_MULTIBYTE) +# define XSKIPNAME(p, d, f) mbskipname(p, d, f) +#else +# define XSKIPNAME(p, d, f) skipname(p, d, f) +#endif + +/* Return 1 if all subpatterns in the extended globbing pattern PAT indicate + that the name should be skipped. XXX - doesn't handle pattern negation, + not sure if it should */ +static int +extglob_skipname (pat, dname, flags) + char *pat, *dname; + int flags; +{ + char *pp, *pe, *t, *se; + int n, r, negate, wild, nullpat, xflags; + + negate = *pat == '!'; + wild = *pat == '*' || *pat == '?'; + pp = pat + 2; + se = pp + strlen (pp); /* end of pattern string */ + pe = glob_patscan (pp, se, 0); /* end of extglob pattern */ + + /* if pe == 0, this is an invalid extglob pattern */ + if (pe == 0) + return 0; + + xflags = flags | ( negate ? GX_NEGATE : 0); + + /* if pe != se we have more of the pattern at the end of the extglob + pattern. Check the easy case first ( */ + if (pe == se && *pe == 0 && pe[-1] == ')' && (t = strchr (pp, '|')) == 0) + { + pe[-1] = '\0'; + /* This is where we check whether the pattern is being negated and + match all files beginning with `.' if the pattern begins with a + literal `.'. */ + r = XSKIPNAME (pp, dname, xflags); /*(*/ + pe[-1] = ')'; + return r; + } + + /* Is the extglob pattern between the parens the null pattern? The null + pattern can match nothing, so should we check any remaining portion of + the pattern? */ + nullpat = pe >= (pat + 2) && pe[-2] == '(' && pe[-1] == ')'; + + /* check every subpattern */ + while (t = glob_patscan (pp, pe, '|')) + { + /* If T == PE and *T == 0 (&& PE[-1] == RPAREN), we have hit the end + of a pattern with no trailing characters. */ + n = t[-1]; /* ( */ + if (extglob_pattern_p (pp) && n == ')') /* nested extglob? */ + t[-1] = n; /* no-op for now */ + else + t[-1] = '\0'; + r = XSKIPNAME (pp, dname, xflags); + t[-1] = n; + if (r == 0) /* if any pattern says not skip, we don't skip */ + return r; + pp = t; + if (pp == pe) + break; + } + + /* glob_patscan might find end of string */ + if (pp == se) + return r; + + /* but if it doesn't then we didn't match a leading dot */ + if (wild && *pe) /* if we can match zero instances, check further */ + return (XSKIPNAME (pe, dname, flags)); + + return 1; +} +#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; { + int i; + +#if EXTENDED_GLOB + if (extglob_pattern_p (pat)) /* XXX */ + return (extglob_skipname (pat, dname, flags)); +#endif + + if (glob_always_skip_dot_and_dotdot && DOT_OR_DOTDOT (dname)) + return 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[0] != '.' && (pat[0] != '\\' || pat[1] != '.') && - (dname[0] == '.' && - (dname[1] == '\0' || (dname[1] == '.' && dname[2] == '\0')))) + DOT_OR_DOTDOT (dname)) 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] != '.')) +#if 0 + /* This is where we check whether the pattern is being negated and + match all files beginning with `.' if the pattern begins with a + literal `.'. This is the negation of the next clause. */ + else if ((flags & GX_NEGATE) && noglob_dot_filenames == 0 && + dname[0] == '.' && + (pat[0] == '.' || (pat[0] == '\\' && pat[1] == '.'))) + return 0; +#endif + + /* If a dot must be explicitly 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 + +static int +wskipname (pat, dname, flags) + wchar_t *pat, *dname; + int flags; +{ + int i; + + if (glob_always_skip_dot_and_dotdot && WDOT_OR_DOTDOT (dname)) + return 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[0] != L'.' && + (pat[0] != L'\\' || pat[1] != L'.') && + WDOT_OR_DOTDOT (dname)) + return 1; + +#if 0 + /* This is where we check whether the pattern is being negated and + match all files beginning with `.' if the pattern begins with a + literal `.'. This is the negation of the next clause. */ + else if ((flags & GX_NEGATE) && noglob_dot_filenames == 0 && + dname[0] == L'.' && + (pat[0] == L'.' || (pat[0] == L'\\' && pat[1] == L'.'))) + return 0; +#endif + + /* If a leading dot must be explicitly matched, check to see if the + pattern and dirname both have one. */ + else if (noglob_dot_filenames && dname[0] == L'.' && + pat[0] != L'.' && (pat[0] != L'\\' || pat[1] != L'.')) + return 1; + + return 0; +} + +static int +wextglob_skipname (pat, dname, flags) + wchar_t *pat, *dname; + int flags; +{ +#if EXTENDED_GLOB + wchar_t *pp, *pe, *t, *se, n; + int r, negate, wild, nullpat, xflags; + + negate = *pat == L'!'; + wild = *pat == L'*' || *pat == L'?'; + pp = pat + 2; + se = pp + wcslen (pp); + pe = glob_patscan_wc (pp, se, 0); + + /* if pe == 0, this is an invalid extglob pattern */ + if (pe == 0) + return 0; + + xflags = flags | ( negate ? GX_NEGATE : 0); + + /* if pe != se we have more of the pattern at the end of the extglob + pattern. Check the easy case first ( */ + if (pe == se && *pe == L'\0' && pe[-1] == L')' && (t = wcschr (pp, L'|')) == 0) + { + pe[-1] = L'\0'; + r = wskipname (pp, dname, xflags); /*(*/ + pe[-1] = L')'; + return r; + } + + /* Is the extglob pattern between the parens the null pattern? The null + pattern can match nothing, so should we check any remaining portion of + the pattern? */ + nullpat = pe >= (pat + 2) && pe[-2] == L'(' && pe[-1] == L')'; + + /* check every subpattern */ + while (t = glob_patscan_wc (pp, pe, '|')) + { + n = t[-1]; /* ( */ + if (wextglob_pattern_p (pp) && n == L')') /* nested extglob? */ + t[-1] = n; /* no-op for now */ + else + t[-1] = L'\0'; + r = wskipname (pp, dname, xflags); + t[-1] = n; + if (r == 0) + return 0; + pp = t; + if (pp == pe) + break; + } + + /* glob_patscan_wc might find end of string */ + if (pp == se) + return r; + + /* but if it doesn't then we didn't match a leading dot */ + if (wild && *pe != L'\0') + return (wskipname (pe, dname, flags)); + + return 1; +#else + return (wskipname (pat, dname, flags)); +#endif +} + /* 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; + int ret, ext; wchar_t *pat_wc, *dn_wc; size_t pat_n, dn_n; + if (mbsmbchar (dname) == 0 && mbsmbchar (pat) == 0) + return (skipname (pat, dname, flags)); + + ext = 0; +#if EXTENDED_GLOB + ext = extglob_pattern_p (pat); +#endif + + pat_wc = dn_wc = (wchar_t *)NULL; + pat_n = xdupmbstowcs (&pat_wc, NULL, pat); - dn_n = xdupmbstowcs (&dn_wc, NULL, dname); + if (pat_n != (size_t)-1) + 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; - } + ret = ext ? wextglob_skipname (pat_wc, dn_wc, flags) : wskipname (pat_wc, dn_wc, flags); + else + ret = skipname (pat, dname, flags); FREE (pat_wc); FREE (dn_wc); @@ -230,7 +451,7 @@ mbskipname (pat, dname, flags) #endif /* HANDLE_MULTIBYTE */ /* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */ -static void +void udequote_pathname (pathname) char *pathname; { @@ -252,6 +473,26 @@ udequote_pathname (pathname) #if HANDLE_MULTIBYTE /* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */ +void +wcdequote_pathname (wpathname) + wchar_t *wpathname; +{ + int i, j; + + 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'; +} + static void wdequote_pathname (pathname) char *pathname; @@ -262,30 +503,34 @@ wdequote_pathname (pathname) int i, j; wchar_t *orig_wpathname; + if (mbsmbchar (pathname) == 0) + { + udequote_pathname (pathname); + return; + } + 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; + /* Something wrong. Fall back to single-byte */ + udequote_pathname (pathname); + return; } - if (wpathname) - wpathname[j] = L'\0'; + orig_wpathname = wpathname; + + wcdequote_pathname (wpathname); /* Convert the wide character string into unibyte character set. */ memset (&ps, '\0', sizeof(mbstate_t)); n = wcsrtombs(pathname, (const wchar_t **)&wpathname, len, &ps); + if (n == (size_t)-1 || (wpathname && *wpathname != 0)) /* what? now you tell me? */ + { + wpathname = orig_wpathname; + memset (&ps, '\0', sizeof(mbstate_t)); + n = xwcsrtombs (pathname, (const wchar_t **)&wpathname, len, &ps); + } pathname[len] = '\0'; /* Can't just free wpathname here; wcsrtombs changes it in many cases. */ @@ -315,17 +560,29 @@ dequote_pathname (pathname) # endif /* AFS */ #endif /* !HAVE_LSTAT */ -/* Return 0 if DIR is a directory, -1 otherwise. */ +/* Return 0 if DIR is a directory, -2 if DIR is a symlink, -1 otherwise. */ static int -glob_testdir (dir) +glob_testdir (dir, flags) char *dir; + int flags; { struct stat finfo; + int r; -/*itrace("glob_testdir: testing %s", dir);*/ - if (stat (dir, &finfo) < 0) +/*itrace("glob_testdir: testing %s" flags = %d, dir, flags);*/ +#if defined (HAVE_LSTAT) + r = (flags & GX_ALLDIRS) ? lstat (dir, &finfo) : stat (dir, &finfo); +#else + r = stat (dir, &finfo); +#endif + if (r < 0) return (-1); +#if defined (S_ISLNK) + if (S_ISLNK (finfo.st_mode)) + return (-2); +#endif + if (S_ISDIR (finfo.st_mode) == 0) return (-1); @@ -399,7 +656,6 @@ finddirs (pat, sdir, flags, ep, np) return ret; } - /* Return a vector of names of files in directory DIR whose names match glob pattern PAT. @@ -434,6 +690,7 @@ glob_vector (pat, dir, flags) register unsigned int i; int mflags; /* Flags passed to strmatch (). */ int pflags; /* flags passed to sh_makepath () */ + int hasglob; /* return value from glob_pattern_p */ int nalloca; struct globval *firstmalloc, *tmplink; char *convfn; @@ -444,11 +701,13 @@ glob_vector (pat, dir, flags) firstmalloc = 0; nalloca = 0; + name_vector = NULL; + /*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) + if (glob_testdir (dir, 0) < 0) return ((char **) &glob_error_return); nextlink = (struct globval *)alloca (sizeof (struct globval)); @@ -470,25 +729,31 @@ glob_vector (pat, dir, flags) skip = 1; } - patlen = strlen (pat); + patlen = (pat && *pat) ? strlen (pat) : 0; /* If the filename pattern (PAT) does not contain any globbing characters, + or contains a pattern with only backslash escapes (hasglob == 2), 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) + hasglob = 0; + if (skip == 0 && ((hasglob = glob_pattern_p (pat)) == 0 || hasglob == 2)) { int dirlen; struct stat finfo; - if (glob_testdir (dir) < 0) + if (glob_testdir (dir, 0) < 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; + { + FREE (nextname); + FREE (npat); + lose = 1; + } else { strcpy (npat, pat); @@ -510,7 +775,10 @@ glob_vector (pat, dir, flags) count = 1; } else - lose = 1; + { + free (npat); + lose = 1; + } } else { @@ -528,7 +796,7 @@ glob_vector (pat, dir, flags) 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) + if (glob_testdir (dir, 0) < 0) return ((char **) &glob_error_return); #endif @@ -538,7 +806,7 @@ glob_vector (pat, dir, flags) /* 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; + mflags = (noglob_dot_filenames ? FNM_PERIOD : FNM_DOTDOT) | FNM_PATHNAME; #ifdef FNM_CASEFOLD if (glob_ignore_case) @@ -550,8 +818,7 @@ glob_vector (pat, dir, flags) 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 + /* 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) @@ -562,7 +829,12 @@ glob_vector (pat, dir, flags) lose = 1; break; } - + else if (signal_is_pending (SIGINT)) /* XXX - make SIGINT traps responsive */ + { + lose = 1; + break; + } + dp = readdir (d); if (dp == NULL) break; @@ -591,7 +863,7 @@ glob_vector (pat, dir, flags) if (flags & GX_NULLDIR) pflags |= MP_IGNDOT; subdir = sh_makepath (dir, dp->d_name, pflags); - isdir = glob_testdir (subdir); + isdir = glob_testdir (subdir, flags); if (isdir < 0 && (flags & GX_MATCHDIRS)) { free (subdir); @@ -620,6 +892,7 @@ glob_vector (pat, dir, flags) } } + /* XXX - should we even add this if it's not a directory? */ nextlink = (struct globval *) malloc (sizeof (struct globval)); if (firstmalloc == 0) firstmalloc = nextlink; @@ -627,6 +900,11 @@ glob_vector (pat, dir, flags) nextname = (char *) malloc (sdlen + 1); if (nextlink == 0 || nextname == 0) { + if (firstmalloc && firstmalloc == nextlink) + firstmalloc = 0; + /* If we reset FIRSTMALLOC we can free this here. */ + FREE (nextlink); + FREE (nextname); free (subdir); lose = 1; break; @@ -639,6 +917,8 @@ glob_vector (pat, dir, flags) ++count; continue; } + else if (flags & GX_MATCHDIRS) + free (subdir); convfn = fnx_fromfs (dp->d_name, D_NAMLEN (dp)); if (strmatch (pat, convfn, mflags) != FNM_NOMATCH) @@ -658,6 +938,19 @@ glob_vector (pat, dir, flags) nextname = (char *) malloc (D_NAMLEN (dp) + 1); if (nextlink == 0 || nextname == 0) { + /* We free NEXTLINK here, since it won't be added to the + LASTLINK chain. If we used malloc, and it returned non- + NULL, firstmalloc will be set to something valid. If it's + NEXTLINK, reset it before we free NEXTLINK to avoid + duplicate frees. If not, it will be taken care of by the + loop below with TMPLINK. */ + if (firstmalloc) + { + if (firstmalloc == nextlink) + firstmalloc = 0; + FREE (nextlink); + } + FREE (nextname); lose = 1; break; } @@ -675,13 +968,17 @@ glob_vector (pat, dir, flags) /* 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) + if (add_current && lose == 0) { sdlen = strlen (dir); nextname = (char *)malloc (sdlen + 1); nextlink = (struct globval *) malloc (sizeof (struct globval)); if (nextlink == 0 || nextname == 0) - lose = 1; + { + FREE (nextlink); + FREE (nextname); + lose = 1; + } else { nextlink->name = nextname; @@ -701,7 +998,7 @@ glob_vector (pat, dir, flags) lose |= name_vector == NULL; } - /* Have we run out of memory? */ + /* Have we run out of memory or been interrupted? */ if (lose) { tmplink = 0; @@ -725,7 +1022,7 @@ glob_vector (pat, dir, flags) FREE (tmplink); } - QUIT; + /* Don't call QUIT; here; let higher layers deal with it. */ return ((char **)NULL); } @@ -807,22 +1104,33 @@ glob_dir_to_array (dir, array, flags) result[i] = (char *) malloc (l + strlen (array[i]) + 3); if (result[i] == NULL) - return (NULL); + { + int ind; + for (ind = 0; ind < i; ind++) + free (result[ind]); + free (result); + 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 (array[i][0]) { - if ((stat (result[i], &sb) == 0) && S_ISDIR (sb.st_mode)) + strcpy (result[i] + l + add_slash, array[i]); + if (flags & GX_MARKDIRS) { - size_t rlen; - rlen = strlen (result[i]); - result[i][rlen] = '/'; - result[i][rlen+1] = '\0'; + 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'; + } } } + else + result[i][l+add_slash] = '\0'; } result[i] = NULL; @@ -844,12 +1152,12 @@ glob_filename (pathname, flags) char *pathname; int flags; { - char **result; + char **result, **new_result; unsigned int result_size; - char *directory_name, *filename, *dname; + char *directory_name, *filename, *dname, *fn; unsigned int directory_len; int free_dirname; /* flag */ - int dflags; + int dflags, hasglob; result = (char **) malloc (sizeof (char *)); result_size = 1; @@ -862,6 +1170,18 @@ glob_filename (pathname, flags) /* Find the filename. */ filename = strrchr (pathname, '/'); +#if defined (EXTENDED_GLOB) + if (filename && extended_glob) + { + fn = glob_dirscan (pathname, '/'); +#if DEBUG_MATCHING + if (fn != filename) + fprintf (stderr, "glob_filename: glob_dirscan: fn (%s) != filename (%s)\n", fn ? fn : "(null)", filename); +#endif + filename = fn; + } +#endif + if (filename == NULL) { filename = pathname; @@ -875,7 +1195,10 @@ glob_filename (pathname, flags) directory_name = (char *) malloc (directory_len + 1); if (directory_name == 0) /* allocation failed? */ - return (NULL); + { + free (result); + return (NULL); + } bcopy (pathname, directory_name, directory_len); directory_name[directory_len] = '\0'; @@ -883,21 +1206,75 @@ glob_filename (pathname, flags) free_dirname = 1; } + hasglob = 0; /* If directory_name contains globbing characters, then we - have to expand the previous levels. Just recurse. */ - if (glob_pattern_p (directory_name)) + have to expand the previous levels. Just recurse. + If glob_pattern_p returns != [0,1] we have a pattern that has backslash + quotes but no unquoted glob pattern characters. We dequote it below. */ + if (directory_len > 0 && (hasglob = glob_pattern_p (directory_name)) == 1) { - char **directories; + char **directories, *d, *p; register unsigned int i; + int all_starstar, last_starstar; + all_starstar = last_starstar = 0; + d = directory_name; 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; + /* Collapse a sequence of ** patterns separated by one or more slashes + to a single ** terminated by a slash or NUL */ + if ((flags & GX_GLOBSTAR) && d[0] == '*' && d[1] == '*' && (d[2] == '/' || d[2] == '\0')) + { + p = d; + while (d[0] == '*' && d[1] == '*' && (d[2] == '/' || d[2] == '\0')) + { + p = d; + if (d[2]) + { + d += 3; + while (*d == '/') + d++; + if (*d == 0) + break; + } + } + if (*d == 0) + all_starstar = 1; + d = p; + dflags |= GX_ALLDIRS|GX_ADDCURDIR; + directory_len = strlen (d); + } - if (directory_name[directory_len - 1] == '/') - directory_name[directory_len - 1] = '\0'; + /* If there is a non [star][star]/ component in directory_name, we + still need to collapse trailing sequences of [star][star]/ into + a single one and note that the directory name ends with [star][star], + so we can compensate if filename is [star][star] */ + if ((flags & GX_GLOBSTAR) && all_starstar == 0) + { + int dl, prev; + prev = dl = directory_len; + while (dl >= 4 && d[dl - 1] == '/' && + d[dl - 2] == '*' && + d[dl - 3] == '*' && + d[dl - 4] == '/') + prev = dl, dl -= 3; + if (dl != directory_len) + last_starstar = 1; + directory_len = prev; + } - directories = glob_filename (directory_name, dflags); + /* If the directory name ends in [star][star]/ but the filename is + [star][star], just remove the final [star][star] from the directory + so we don't have to scan everything twice. */ + if (last_starstar && directory_len > 4 && + filename[0] == '*' && filename[1] == '*' && filename[2] == 0) + { + directory_len -= 3; + } + + if (d[directory_len - 1] == '/') + d[directory_len - 1] = '\0'; + + directories = glob_filename (d, dflags|GX_RECURSE); if (free_dirname) { @@ -919,13 +1296,26 @@ glob_filename (pathname, flags) return ((char **) &glob_error_return); } + /* If we have something like [star][star]/[star][star], it's no use to + glob **, then do it again, and throw half the results away. */ + if (all_starstar && filename[0] == '*' && filename[1] == '*' && filename[2] == 0) + { + free ((char *) directories); + free (directory_name); + directory_name = NULL; + directory_len = 0; + goto only_filename; + } + /* 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; + int shouldbreak; + shouldbreak = 0; /* XXX -- we've recursively scanned any directories resulting from a `**', so turn off the flag. We turn it on again below if filename is `**' */ @@ -934,6 +1324,7 @@ glob_filename (pathname, flags) files ending in `h' with a `/' appended. */ dname = directories[i]; dflags = flags & ~(GX_MARKDIRS|GX_ALLDIRS|GX_ADDCURDIR); + /* last_starstar? */ if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') dflags |= GX_ALLDIRS|GX_ADDCURDIR; if (dname[0] == '\0' && filename[0]) @@ -941,7 +1332,44 @@ glob_filename (pathname, flags) dflags |= GX_NULLDIR; dname = "."; /* treat null directory name and non-null filename as current directory */ } - temp_results = glob_vector (filename, dname, dflags); + + /* Special handling for symlinks to directories with globstar on */ + if (all_starstar && (dflags & GX_NULLDIR) == 0) + { + int dlen; + + /* If we have a directory name that is not null (GX_NULLDIR above) + and is a symlink to a directory, we return the symlink if + we're not `descending' into it (filename[0] == 0) and return + glob_error_return (which causes the code below to skip the + name) otherwise. I should fold this into a test that does both + checks instead of calling stat twice. */ + if (glob_testdir (dname, flags|GX_ALLDIRS) == -2 && glob_testdir (dname, 0) == 0) + { + if (filename[0] != 0) + temp_results = (char **)&glob_error_return; /* skip */ + else + { + /* Construct array to pass to glob_dir_to_array */ + temp_results = (char **)malloc (2 * sizeof (char *)); + if (temp_results == NULL) + goto memory_error; + temp_results[0] = (char *)malloc (1); + if (temp_results[0] == 0) + { + free (temp_results); + goto memory_error; + } + **temp_results = '\0'; + temp_results[1] = NULL; + dflags |= GX_SYMLINK; /* mostly for debugging */ + } + } + else + temp_results = glob_vector (filename, dname, dflags); + } + else + temp_results = glob_vector (filename, dname, dflags); /* Handle error cases. */ if (temp_results == NULL) @@ -956,19 +1384,57 @@ glob_filename (pathname, flags) /* 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; + if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && (filename[2] == '\0' || filename[2] == '/')) + { + /* When do we remove null elements from temp_results? And + how to avoid duplicate elements in the final result? */ + /* If (dflags & GX_NULLDIR) glob_filename potentially left a + NULL placeholder in the temp results just in case + glob_vector/glob_dir_to_array did something with it, but + if it didn't, and we're not supposed to be passing them + through for some reason ((flags & GX_NULLDIR) == 0) we + need to remove all the NULL elements from the beginning + of TEMP_RESULTS. */ + /* If we have a null directory name and ** as the filename, + we have just searched for everything from the current + directory on down. Break now (shouldbreak = 1) to avoid + duplicate entries in the final result. */ +#define NULL_PLACEHOLDER(x) ((x) && *(x) && **(x) == 0) + if ((dflags & GX_NULLDIR) && (flags & GX_NULLDIR) == 0 && + NULL_PLACEHOLDER (temp_results)) +#undef NULL_PLACEHOLDER + { + register int i, n; + for (n = 0; temp_results[n] && *temp_results[n] == 0; n++) + ; + i = n; + do + temp_results[i - n] = temp_results[i]; + while (temp_results[i++] != 0); + array = temp_results; + shouldbreak = 1; + } + else + array = temp_results; + } + else if (dflags & GX_SYMLINK) + array = glob_dir_to_array (directories[i], temp_results, flags); 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 *)); + new_result = (char **)realloc (result, (result_size + l) * sizeof (char *)); - if (result == NULL) - goto memory_error; + if (new_result == NULL) + { + for (l = 0; array[l]; ++l) + free (array[l]); + free ((char *)array); + goto memory_error; + } + result = new_result; for (l = 0; array[l] != NULL; ++l) result[result_size++ - 1] = array[l]; @@ -978,6 +1444,11 @@ glob_filename (pathname, flags) /* Note that the elements of ARRAY are not freed. */ if (array != temp_results) free ((char *) array); + else if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') + free (temp_results); /* expanding ** case above */ + + if (shouldbreak) + break; } } /* Free the directories. */ @@ -989,12 +1460,46 @@ glob_filename (pathname, flags) return (result); } +only_filename: /* 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); + { + if (free_dirname) + free (directory_name); + return (NULL); + } + /* If we have a directory name with quoted characters, and we are + being called recursively to glob the directory portion of a pathname, + we need to dequote the directory name before returning it so the + caller can read the directory */ + if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) != 0) + { + dequote_pathname (directory_name); + directory_len = strlen (directory_name); + } + + /* We could check whether or not the dequoted directory_name is a + directory and return it here, returning the original directory_name + if not, but we don't do that. We do return the dequoted directory + name if we're not being called recursively and the dequoted name + corresponds to an actual directory. For better backwards compatibility, + we can return &glob_error_return unconditionally in this case. */ + + if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) == 0) + { + dequote_pathname (directory_name); + if (glob_testdir (directory_name, 0) < 0) + { + if (free_dirname) + free (directory_name); + free ((char *) result); + return ((char **)&glob_error_return); + } + } + /* Handle GX_MARKDIRS here. */ result[0] = (char *) malloc (directory_len + 1); if (result[0] == NULL) @@ -1047,10 +1552,13 @@ glob_filename (pathname, flags) { if (free_dirname) free (directory_name); + QUIT; /* XXX - shell */ + run_pending_traps (); return (temp_results); } result = glob_dir_to_array ((dflags & GX_ALLDIRS) ? "" : directory_name, temp_results, flags); + if (free_dirname) free (directory_name); return (result); @@ -1071,6 +1579,7 @@ glob_filename (pathname, flags) free (directory_name); QUIT; + run_pending_traps (); return (NULL); } diff --git a/lib/glob/glob.h b/lib/glob/glob.h index 993ed70..4741057 100644 --- a/lib/glob/glob.h +++ b/lib/glob/glob.h @@ -1,5 +1,5 @@ /* File-name wildcard pattern matching for GNU. - Copyright (C) 1985, 1988, 1989, 2008,2009 Free Software Foundation, Inc. + Copyright (C) 1985-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -30,10 +30,15 @@ #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 ** */ +#define GX_RECURSE 0x800 /* internal -- glob_filename called recursively */ +#define GX_SYMLINK 0x1000 /* internal -- symlink to a directory */ +#define GX_NEGATE 0x2000 /* internal -- extglob pattern being negated */ -extern int glob_pattern_p __P((const char *)); -extern char **glob_vector __P((char *, char *, int)); -extern char **glob_filename __P((char *, int)); +extern int glob_pattern_p PARAMS((const char *)); +extern char **glob_vector PARAMS((char *, char *, int)); +extern char **glob_filename PARAMS((char *, int)); + +extern int extglob_pattern_p PARAMS((const char *)); extern char *glob_error_return; extern int noglob_dot_filenames; diff --git a/lib/glob/glob_loop.c b/lib/glob/glob_loop.c index 89e86af..467e7ae 100644 --- a/lib/glob/glob_loop.c +++ b/lib/glob/glob_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2005 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -16,20 +16,20 @@ along with Bash. If not, see . */ -static int INTERNAL_GLOB_PATTERN_P __P((const CHAR *)); +static int INTERNAL_GLOB_PATTERN_P PARAMS((const GCHAR *)); /* 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; + const GCHAR *pattern; { - register const CHAR *p; - register CHAR c; - int bopen; + register const GCHAR *p; + register GCHAR c; + int bopen, bsquote; p = pattern; - bopen = 0; + bopen = bsquote = 0; while ((c = *p++) != L('\0')) switch (c) @@ -54,14 +54,31 @@ INTERNAL_GLOB_PATTERN_P (pattern) continue; case L('\\'): - if (*p++ == L('\0')) + /* Don't let the pattern end in a backslash (GMATCH returns no match + if the pattern ends in a backslash anyway), but otherwise note that + we have seen this, since the matching engine uses backslash as an + escape character and it can be removed. We return 2 later if we + have seen only backslash-escaped characters, so interested callers + know they can shortcut and just dequote the pathname. */ + if (*p != L('\0')) + { + p++; + bsquote = 1; + continue; + } + else /* (*p == L('\0')) */ return 0; } - return 0; +#if 0 + return bsquote ? 2 : 0; +#else + return (0); +#endif } #undef INTERNAL_GLOB_PATTERN_P #undef L #undef INT #undef CHAR +#undef GCHAR diff --git a/lib/glob/gm_loop.c b/lib/glob/gm_loop.c new file mode 100644 index 0000000..ac516f8 --- /dev/null +++ b/lib/glob/gm_loop.c @@ -0,0 +1,208 @@ +/* Copyright (C) 1991-2017 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#if EXTENDED_GLOB +int +EXTGLOB_PATTERN_P (pat) + const CHAR *pat; +{ + switch (pat[0]) + { + case L('*'): + case L('+'): + case L('!'): + case L('@'): + case L('?'): + return (pat[1] == L('(')); /* ) */ + default: + return 0; + } + + return 0; +} +#endif + +/* Return 1 of the first character of STRING could match the first + character of pattern PAT. Compiled to both single and wiide character + versions. FLAGS is a subset of strmatch flags; used to do case-insensitive + matching for now. */ +int +MATCH_PATTERN_CHAR (pat, string, flags) + CHAR *pat, *string; + int flags; +{ + CHAR c; + + if (*string == 0) + return (*pat == L('*')); /* XXX - allow only * to match empty string */ + + switch (c = *pat++) + { + default: + return (FOLD(*string) == FOLD(c)); + case L('\\'): + return (FOLD(*string) == FOLD(*pat)); + case L('?'): + return (*pat == L('(') ? 1 : (*string != L'\0')); + case L('*'): + return (1); + case L('+'): + case L('!'): + case L('@'): + return (*pat == L('(') ? 1 : (FOLD(*string) == FOLD(c))); + case L('['): + return (*string != L('\0')); + } +} + +int +MATCHLEN (pat, max) + CHAR *pat; + size_t max; +{ + CHAR c; + int matlen, bracklen, t, in_cclass, in_collsym, in_equiv; + + if (*pat == 0) + return (0); + + matlen = in_cclass = in_collsym = in_equiv = 0; + while (c = *pat++) + { + switch (c) + { + default: + matlen++; + break; + case L('\\'): + if (*pat == 0) + return ++matlen; + else + { + matlen++; + pat++; + } + break; + case L('?'): + if (*pat == LPAREN) + return (matlen = -1); /* XXX for now */ + else + matlen++; + break; + case L('*'): + return (matlen = -1); + case L('+'): + case L('!'): + case L('@'): + if (*pat == LPAREN) + return (matlen = -1); /* XXX for now */ + else + matlen++; + break; + case L('['): + /* scan for ending `]', skipping over embedded [:...:] */ + bracklen = 1; + c = *pat++; + do + { + if (c == 0) + { + pat--; /* back up to NUL */ + matlen += bracklen; + goto bad_bracket; + } + else if (c == L('\\')) + { + /* *pat == backslash-escaped character */ + bracklen++; + /* If the backslash or backslash-escape ends the string, + bail. The ++pat skips over the backslash escape */ + if (*pat == 0 || *++pat == 0) + { + matlen += bracklen; + goto bad_bracket; + } + } + else if (c == L('[') && *pat == L(':')) /* character class */ + { + pat++; + bracklen++; + in_cclass = 1; + } + else if (in_cclass && c == L(':') && *pat == L(']')) + { + pat++; + bracklen++; + in_cclass = 0; + } + else if (c == L('[') && *pat == L('.')) /* collating symbol */ + { + pat++; + bracklen++; + if (*pat == L(']')) /* right bracket can appear as collating symbol */ + { + pat++; + bracklen++; + } + in_collsym = 1; + } + else if (in_collsym && c == L('.') && *pat == L(']')) + { + pat++; + bracklen++; + in_collsym = 0; + } + else if (c == L('[') && *pat == L('=')) /* equivalence class */ + { + pat++; + bracklen++; + if (*pat == L(']')) /* right bracket can appear as equivalence class */ + { + pat++; + bracklen++; + } + in_equiv = 1; + } + else if (in_equiv && c == L('=') && *pat == L(']')) + { + pat++; + bracklen++; + in_equiv = 0; + } + else + bracklen++; + } + while ((c = *pat++) != L(']')); + matlen++; /* bracket expression can only match one char */ +bad_bracket: + break; + } + } + + return matlen; +} + +#undef EXTGLOB_PATTERN_P +#undef MATCH_PATTERN_CHAR +#undef MATCHLEN +#undef FOLD +#undef L +#undef LPAREN +#undef RPAREN +#undef INT +#undef CHAR diff --git a/lib/glob/gmisc.c b/lib/glob/gmisc.c new file mode 100644 index 0000000..f3d74ce --- /dev/null +++ b/lib/glob/gmisc.c @@ -0,0 +1,108 @@ +/* gmisc.c -- miscellaneous pattern matching utility functions for Bash. + + Copyright (C) 2010-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne-Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#include "bashansi.h" +#include "shmbutil.h" +#include "chartypes.h" + +#include "stdc.h" + +#ifndef FNM_CASEFOLD +# include "strmatch.h" +#endif +#include "glob.h" + +/* Make sure these names continue to agree with what's in smatch.c */ +extern char *glob_patscan PARAMS((char *, char *, int)); + +/* Compile `gm_loop.c' for single-byte characters. */ +#define CHAR char +#define INT int +#define L(CS) CS +#define EXTGLOB_PATTERN_P extglob_pattern_p +#define MATCH_PATTERN_CHAR match_pattern_char +#define MATCHLEN umatchlen +#define FOLD(c) ((flags & FNM_CASEFOLD) \ + ? TOLOWER ((unsigned char)c) \ + : ((unsigned char)c)) +#ifndef LPAREN +#define LPAREN '(' +#define RPAREN ')' +#endif +#include "gm_loop.c" + +/* Compile `gm_loop.c' again for multibyte characters. */ +#if HANDLE_MULTIBYTE + +#define CHAR wchar_t +#define INT wint_t +#define L(CS) L##CS +#define EXTGLOB_PATTERN_P wextglob_pattern_p +#define MATCH_PATTERN_CHAR match_pattern_wchar +#define MATCHLEN wmatchlen + +#define FOLD(c) ((flags & FNM_CASEFOLD) && iswupper (c) ? towlower (c) : (c)) +#define LPAREN L'(' +#define RPAREN L')' +#include "gm_loop.c" + +#endif /* HANDLE_MULTIBYTE */ + + +#if defined (EXTENDED_GLOB) +/* Skip characters in PAT and return the final occurrence of DIRSEP. This + is only called when extended_glob is set, so we have to skip over extglob + patterns x(...) */ +char * +glob_dirscan (pat, dirsep) + char *pat; + int dirsep; +{ + char *p, *d, *pe, *se; + + d = pe = se = 0; + for (p = pat; p && *p; p++) + { + if (extglob_pattern_p (p)) + { + if (se == 0) + se = p + strlen (p) - 1; + pe = glob_patscan (p + 2, se, 0); + if (pe == 0) + continue; + else if (*pe == 0) + break; + p = pe - 1; /* will do increment above */ + continue; + } + if (*p == dirsep) + d = p; + } + return d; +} +#endif /* EXTENDED_GLOB */ diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c index dfff06c..247ba28 100644 --- a/lib/glob/sm_loop.c +++ b/lib/glob/sm_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2006 Free Software Foundation, Inc. +/* Copyright (C) 1991-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -16,13 +16,24 @@ along with Bash. If not, see . */ -int FCT __P((CHAR *, CHAR *, int)); +extern int interrupt_state, terminating_signal; -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)); +struct STRUCT +{ + CHAR *pattern; + CHAR *string; +}; + +int FCT PARAMS((CHAR *, CHAR *, int)); + +static int GMATCH PARAMS((CHAR *, CHAR *, CHAR *, CHAR *, struct STRUCT *, int)); +static CHAR *PARSE_COLLSYM PARAMS((CHAR *, INT *)); +static CHAR *BRACKMATCH PARAMS((CHAR *, U_CHAR, int)); +static int EXTMATCH PARAMS((INT, CHAR *, CHAR *, CHAR *, CHAR *, int)); + +extern void DEQUOTE_PATHNAME PARAMS((CHAR *)); + +/*static*/ CHAR *PATSCAN PARAMS((CHAR *, CHAR *, INT)); int FCT (pattern, string, flags) @@ -38,15 +49,16 @@ FCT (pattern, string, flags) se = string + STRLEN ((XCHAR *)string); pe = pattern + STRLEN ((XCHAR *)pattern); - return (GMATCH (string, se, pattern, pe, flags)); + return (GMATCH (string, se, pattern, pe, (struct STRUCT *)NULL, 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) +GMATCH (string, se, pattern, pe, ends, flags) CHAR *string, *se; CHAR *pattern, *pe; + struct STRUCT *ends; int flags; { CHAR *p, *n; /* pattern, string */ @@ -71,6 +83,9 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); sc = n < se ? *n : '\0'; + if (interrupt_state || terminating_signal) + return FNM_NOMATCH; + #ifdef EXTENDED_GLOB /* EXTMATCH () will handle recursively calling GMATCH, so we can just return what EXTMATCH() returns. */ @@ -80,7 +95,7 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); 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); + lflags = (n == string) ? flags : (flags & ~(FNM_PERIOD|FNM_DOTDOT)); return (EXTMATCH (c, n, se, p, pe, lflags)); } #endif /* EXTENDED_GLOB */ @@ -99,9 +114,21 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); string or if it is the first character following a slash and we are matching a pathname. */ return FNM_NOMATCH; + + /* `?' cannot match `.' or `..' 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_DOTDOT) && + ((n == string && SDOT_OR_DOTDOT(n)) || + ((flags & FNM_PATHNAME) && n[-1] == L('/') && PDOT_OR_DOTDOT(n)))) + return FNM_NOMATCH; + break; case L('\\'): /* backslash escape removes special meaning */ + if (p == pe && sc == '\\' && (n+1 == se)) + break; + if (p == pe) return FNM_NOMATCH; @@ -117,10 +144,16 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); return FNM_NOMATCH; break; - case '*': /* Match zero or more characters */ - if (p == pe) - return 0; - + case L('*'): /* Match zero or more characters */ + /* See below for the reason for using this. It avoids backtracking + back to a previous `*'. Picked up from glibc. */ + if (ends != NULL) + { + ends->pattern = p - 1; + ends->string = n; + 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 @@ -128,6 +161,17 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); we are matching a pathname. */ return FNM_NOMATCH; + /* `*' cannot match `.' or `..' 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_DOTDOT) && + ((n == string && SDOT_OR_DOTDOT(n)) || + ((flags & FNM_PATHNAME) && n[-1] == L('/') && PDOT_OR_DOTDOT(n)))) + return FNM_NOMATCH; + + if (p == pe) + return 0; + /* 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++) @@ -139,13 +183,18 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); 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; + + /* We can match 0 or 1 times. If we match, return success */ + if (EXTMATCH (c, n, 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 1 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 else if (c == L('?')) @@ -185,19 +234,67 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); break; } + /* The wildcards are the last element of the pattern. The name + cannot match completely if we are looking for a pathname and + it contains another slash, unless FNM_LEADING_DIR is set. */ + if (c == L('\0')) + { + int r = (flags & FNM_PATHNAME) == 0 ? 0 : FNM_NOMATCH; + if (flags & FNM_PATHNAME) + { + if (flags & FNM_LEADING_DIR) + r = 0; + else if (MEMCHR (n, L('/'), se - n) == NULL) + r = 0; + } + return r; + } + /* 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); + /* If we've hit the end of the string and the rest of the pattern + is something that matches the empty string, we can succeed. */ +#if defined (EXTENDED_GLOB) + if (n == se && ((flags & FNM_EXTMATCH) && (c == L('!') || c == L('?')) && *p == L('('))) + { + --p; + if (EXTMATCH (c, n, se, p, pe, flags) == 0) + return (c == L('!') ? FNM_NOMATCH : 0); + return (c == L('!') ? 0 : FNM_NOMATCH); + } +#endif + + /* If we stop at a slash in the pattern and we are looking for a + pathname ([star]/foo), then consume enough of the string to stop + at any slash and then try to match the rest of the pattern. If + the string doesn't contain a slash, fail */ + if (c == L('/') && (flags & FNM_PATHNAME)) + { + while (n < se && *n != L('/')) + ++n; + if (n < se && *n == L('/') && (GMATCH (n+1, se, p, pe, NULL, flags) == 0)) + return 0; + return FNM_NOMATCH; /* XXX */ + } + /* General case, use recursion. */ { U_CHAR c1; + const CHAR *endp; + struct STRUCT end; + + end.pattern = NULL; + endp = MEMCHR (n, (flags & FNM_PATHNAME) ? L('/') : L('\0'), se - n); + if (endp == 0) + endp = se; c1 = ((flags & FNM_NOESCAPE) == 0 && c == L('\\')) ? *p : c; c1 = FOLD (c1); - for (--p; n < se; ++n) + for (--p; n < endp; ++n) { /* Only call strmatch if the first character indicates a possible match. We can check the first character if @@ -213,9 +310,24 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); continue; /* Otherwise, we just recurse. */ - if (GMATCH (n, se, p, pe, flags & ~FNM_PERIOD) == 0) - return (0); + if (GMATCH (n, se, p, pe, &end, flags & ~(FNM_PERIOD|FNM_DOTDOT)) == 0) + { + if (end.pattern == NULL) + return (0); + break; + } } + /* This is a clever idea from glibc, used to avoid backtracking + to a `*' that appears earlier in the pattern. We get away + without saving se and pe because they are always the same, + even in the recursive calls to gmatch */ + if (end.pattern != NULL) + { + p = end.pattern; + n = end.string; + continue; + } + return FNM_NOMATCH; } @@ -231,6 +343,14 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe); (n == string || ((flags & FNM_PATHNAME) && n[-1] == L('/')))) return (FNM_NOMATCH); + /* `?' cannot match `.' or `..' 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_DOTDOT) && + ((n == string && SDOT_OR_DOTDOT(n)) || + ((flags & FNM_PATHNAME) && n[-1] == L('/') && PDOT_OR_DOTDOT(n)))) + return FNM_NOMATCH; + p = BRACKMATCH (p, sc, flags); if (p == 0) return FNM_NOMATCH; @@ -271,6 +391,12 @@ PARSE_COLLSYM (p, vp) for (pc = 0; p[pc]; pc++) if (p[pc] == L('.') && p[pc+1] == L(']')) break; + if (p[pc] == 0) + { + if (vp) + *vp = INVALID; + return (p + pc); + } val = COLLSYM (p, pc); if (vp) *vp = val; @@ -290,11 +416,14 @@ BRACKMATCH (p, test, flags) { register CHAR cstart, cend, c; register int not; /* Nonzero if the sense of the character class is inverted. */ - int brcnt; + int brcnt, forcecoll, isrange; INT pc; CHAR *savep; + CHAR *brchrp; + U_CHAR orig_test; - test = FOLD (test); + orig_test = test; + test = FOLD (orig_test); savep = p; @@ -311,6 +440,7 @@ BRACKMATCH (p, test, flags) /* Initialize cstart and cend in case `-' is the last character of the pattern. */ cstart = cend = c; + forcecoll = 0; /* POSIX.2 equivalence class: [=c=]. See POSIX.2 2.8.3.2. Find the end of the equivalence class, move the pattern pointer past @@ -358,12 +488,26 @@ BRACKMATCH (p, test, flags) { bcopy (p + 1, ccname, (close - p - 1) * sizeof (CHAR)); *(ccname + (close - p - 1)) = L('\0'); - pc = IS_CCLASS (test, (XCHAR *)ccname); + /* As a result of a POSIX discussion, char class names are + allowed to be quoted (?) */ + DEQUOTE_PATHNAME (ccname); + pc = IS_CCLASS (orig_test, (XCHAR *)ccname); } if (pc == -1) - pc = 0; + { + /* CCNAME is not a valid character class in the current + locale. In addition to noting no match (pc = 0), we have + a choice about what to do with the invalid charclass. + Posix leaves the behavior unspecified, but we're going + to skip over the charclass and keep going instead of + testing ORIG_TEST against each character in the class + string. If we don't want to do that, take out the update + of P. */ + pc = 0; + p = close + 2; + } else - p = close + 2; + p = close + 2; /* move past the closing `]' */ free (ccname); } @@ -400,6 +544,7 @@ BRACKMATCH (p, test, flags) range. If it is, we set cstart to one greater than `test', so any comparisons later will fail. */ cstart = (pc == INVALID) ? test + 1 : pc; + forcecoll = 1; } if (!(flags & FNM_NOESCAPE) && c == L('\\')) @@ -410,6 +555,7 @@ BRACKMATCH (p, test, flags) } cstart = cend = FOLD (cstart); + isrange = 0; /* 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 @@ -422,6 +568,9 @@ BRACKMATCH (p, test, flags) c = *p++; c = FOLD (c); + if (c == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); + if ((flags & FNM_PATHNAME) && c == L('/')) /* [/] can never match when matching a pathname. */ return (CHAR *)0; @@ -443,6 +592,7 @@ BRACKMATCH (p, test, flags) 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; + forcecoll = 1; } cend = FOLD (cend); @@ -453,16 +603,19 @@ BRACKMATCH (p, test, flags) 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 (RANGECMP (cstart, cend, forcecoll) > 0) { if (c == L(']')) break; c = FOLD (c); continue; } + isrange = 1; } - if (RANGECMP (test, cstart) >= 0 && RANGECMP (test, cend) <= 0) + if (isrange == 0 && test == cstart) + goto matched; + if (isrange && RANGECMP (test, cstart, forcecoll) >= 0 && RANGECMP (test, cend, forcecoll) <= 0) goto matched; if (c == L(']')) @@ -475,17 +628,40 @@ BRACKMATCH (p, test, flags) /* Skip the rest of the [...] that already matched. */ c = *--p; brcnt = 1; + brchrp = 0; while (brcnt > 0) { + int oc; + /* A `[' without a matching `]' is just another character to match. */ if (c == L('\0')) return ((test == L('[')) ? savep : (CHAR *)0); + oc = c; c = *p++; if (c == L('[') && (*p == L('=') || *p == L(':') || *p == L('.'))) - brcnt++; - else if (c == L(']')) - brcnt--; + { + brcnt++; + brchrp = p++; /* skip over the char after the left bracket */ + if ((c = *p) == L('\0')) + return ((test == L('[')) ? savep : (CHAR *)0); + /* If *brchrp == ':' we should check that the rest of the characters + form a valid character class name. We don't do that yet, but we + keep BRCHRP in case we want to. */ + } + /* We only want to check brchrp if we set it above. */ + else if (c == L(']') && brcnt > 1 && brchrp != 0 && oc == *brchrp) + { + brcnt--; + brchrp = 0; /* just in case */ + } + /* Left bracket loses its special meaning inside a bracket expression. + It is only valid when followed by a `.', `=', or `:', which we check + for above. Technically the right bracket can appear in a collating + symbol, so we check for that here. Otherwise, it terminates the + bracket expression. */ + else if (c == L(']') && (brchrp == 0 || *brchrp != L('.')) && brcnt >= 1) + brcnt = 0; else if (!(flags & FNM_NOESCAPE) && c == L('\\')) { if (*p == '\0') @@ -516,8 +692,9 @@ BRACKMATCH (p, test, flags) 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 * + first character after the matching DELIM or NULL if the pattern is + empty or invalid. */ +/*static*/ CHAR * PATSCAN (string, end, delim) CHAR *string, *end; INT delim; @@ -530,6 +707,9 @@ PATSCAN (string, end, delim) cchar = 0; bfirst = NULL; + if (string == end) + return (NULL); + for (s = string; c = *s; s++) { if (s >= end) @@ -606,19 +786,32 @@ STRCOMPARE (p, pe, s, se) { int ret; CHAR c1, c2; + int l1, l2; + l1 = pe - p; + l2 = se - s; + + if (l1 != l2) + return (FNM_NOMATCH); /* unequal lengths, can't be identical */ + c1 = *pe; c2 = *se; - *pe = *se = '\0'; + if (c1 != 0) + *pe = '\0'; + if (c2 != 0) + *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; + if (c1 != 0) + *pe = c1; + if (c2 != 0) + *se = c2; return (ret == 0 ? ret : FNM_NOMATCH); } @@ -660,7 +853,7 @@ fprintf(stderr, "extmatch: flags = %d\n", flags); /* 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)) + if (xc == L('*') && (GMATCH (s, se, prest, pe, NULL, flags) == 0)) return 0; /* OK, we have to do this the hard way. First, we make sure one of @@ -673,16 +866,16 @@ fprintf(stderr, "extmatch: flags = %d\n", flags); { /* Match this substring (S -> SREST) against this subpattern (psub -> pnext - 1) */ - m1 = GMATCH (s, srest, psub, pnext - 1, flags) == 0; + m1 = GMATCH (s, srest, psub, pnext - 1, NULL, 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); + xflags = (srest > s) ? (flags & ~(FNM_PERIOD|FNM_DOTDOT)) : flags; + m2 = (GMATCH (srest, se, prest, pe, NULL, xflags) == 0) || + (s != srest && GMATCH (srest, se, p - 1, pe, NULL, xflags) == 0); } if (m1 && m2) return (0); @@ -697,7 +890,7 @@ fprintf(stderr, "extmatch: flags = %d\n", flags); /* 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)) + if (xc == L('?') && (GMATCH (s, se, prest, pe, NULL, flags) == 0)) return 0; /* OK, we have to do this the hard way. First, we see if one of @@ -710,9 +903,9 @@ fprintf(stderr, "extmatch: flags = %d\n", flags); 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) + xflags = (srest > s) ? (flags & ~(FNM_PERIOD|FNM_DOTDOT)) : flags; + if (GMATCH (s, srest, psub, pnext - 1, NULL, flags) == 0 && + GMATCH (srest, se, prest, pe, NULL, xflags) == 0) return (0); } if (pnext == prest) @@ -728,14 +921,26 @@ fprintf(stderr, "extmatch: flags = %d\n", flags); { pnext = PATSCAN (psub, pe, L('|')); /* If one of the patterns matches, just bail immediately. */ - if (m1 = (GMATCH (s, srest, psub, pnext - 1, flags) == 0)) + if (m1 = (GMATCH (s, srest, psub, pnext - 1, NULL, flags) == 0)) break; if (pnext == prest) break; } + + /* If nothing matched, but the string starts with a period and we + need to match periods explicitly, don't return this as a match, + even for negation. */ + if (m1 == 0 && (flags & FNM_PERIOD) && *s == '.') + return (FNM_NOMATCH); + + if (m1 == 0 && (flags & FNM_DOTDOT) && + (SDOT_OR_DOTDOT (s) || + ((flags & FNM_PATHNAME) && s[-1] == L('/') && PDOT_OR_DOTDOT(s)))) + return (FNM_NOMATCH); + /* 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) + xflags = (srest > s) ? (flags & ~(FNM_PERIOD|FNM_DOTDOT)) : flags; + if (m1 == 0 && GMATCH (srest, se, prest, pe, NULL, xflags) == 0) return (0); } return (FNM_NOMATCH); @@ -759,11 +964,18 @@ fprintf(stderr, "extmatch: flags = %d\n", flags); #undef PATSCAN #undef STRCOMPARE #undef EXTMATCH +#undef DEQUOTE_PATHNAME +#undef STRUCT #undef BRACKMATCH #undef STRCHR #undef STRCOLL #undef STRLEN #undef STRCMP +#undef MEMCHR #undef COLLEQUIV #undef RANGECMP +#undef ISDIRSEP +#undef PATHSEP +#undef PDOT_OR_DOTDOT +#undef SDOT_OR_DOTDOT #undef L diff --git a/lib/glob/smatch.c b/lib/glob/smatch.c index 11d86b0..379c2d2 100644 --- a/lib/glob/smatch.c +++ b/lib/glob/smatch.c @@ -1,7 +1,7 @@ /* strmatch.c -- ksh-like extended pattern matching for the shell and filename globbing. */ -/* Copyright (C) 1991-2005 Free Software Foundation, Inc. +/* Copyright (C) 1991-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,6 +30,18 @@ #include "shmbutil.h" #include "xmalloc.h" +#include + +#if !defined (errno) +extern int errno; +#endif + +#if FNMATCH_EQUIV_FALLBACK +/* We don't include in order to avoid namespace collisions; the + internal strmatch still uses the FNM_ constants. */ +extern int fnmatch (const char *, const char *, int); +#endif + /* First, compile `sm_loop.c' for single-byte characters. */ #define CHAR unsigned char #define U_CHAR unsigned char @@ -43,15 +55,53 @@ #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) +#ifndef GLOBASCII_DEFAULT +# define GLOBASCII_DEFAULT 0 +#endif + +int glob_asciirange = GLOBASCII_DEFAULT; + +#if FNMATCH_EQUIV_FALLBACK +/* Construct a string w1 = "c1" and a pattern w2 = "[[=c2=]]" and pass them + to fnmatch to see if wide characters c1 and c2 collate as members of the + same equivalence class. We can't really do this portably any other way */ +static int +_fnmatch_fallback (s, p) + int s, p; /* string char, patchar */ +{ + char s1[2]; /* string */ + char s2[8]; /* constructed pattern */ + + s1[0] = (unsigned char)s; + s1[1] = '\0'; + + /* reconstruct the pattern */ + s2[0] = s2[1] = '['; + s2[2] = '='; + s2[3] = (unsigned char)p; + s2[4] = '='; + s2[5] = s2[6] = ']'; + s2[7] = '\0'; + + return (fnmatch ((const char *)s2, (const char *)s1, 0)); +} +#endif + /* 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. */ + all characters. If GLOB_ASCIIRANGE is non-zero, and we're not forcing + the use of strcoll (e.g., for explicit collating symbols), we use + straight ordering as if in the C locale. */ #if defined (HAVE_STRCOLL) -/* Helper function for collating symbol equivalence. */ -static int rangecmp (c1, c2) +/* Helper functions for collating symbol equivalence. */ + +/* Return 0 if C1 == C2 or collates equally if FORCECOLL is non-zero. */ +static int +charcmp (c1, c2, forcecoll) int c1, c2; + int forcecoll; { static char s1[2] = { ' ', '\0' }; static char s2[2] = { ' ', '\0' }; @@ -64,26 +114,51 @@ static int rangecmp (c1, c2) if (c1 == c2) return (0); + if (forcecoll == 0 && glob_asciirange) + return (c1 - c2); + s1[0] = c1; s2[0] = c2; - if ((ret = strcoll (s1, s2)) != 0) - return ret; - return (c1 - c2); + return (strcoll (s1, s2)); +} + +static int +rangecmp (c1, c2, forcecoll) + int c1, c2; + int forcecoll; +{ + int r; + + r = charcmp (c1, c2, forcecoll); + + /* We impose a total ordering here by returning c1-c2 if charcmp returns 0 */ + if (r != 0) + return r; + return (c1 - c2); /* impose total ordering */ } #else /* !HAVE_STRCOLL */ -# define rangecmp(c1, c2) ((int)(c1) - (int)(c2)) +# define rangecmp(c1, c2, f) ((int)(c1) - (int)(c2)) #endif /* !HAVE_STRCOLL */ #if defined (HAVE_STRCOLL) +/* Returns 1 if chars C and EQUIV collate equally in the current locale. */ static int -collequiv (c1, c2) - int c1, c2; +collequiv (c, equiv) + int c, equiv; { - return (rangecmp (c1, c2) == 0); + if (charcmp (c, equiv, 1) == 0) + return 1; + +#if FNMATCH_EQUIV_FALLBACK + return (_fnmatch_fallback (c, equiv) == 0); +#else + return 0; +#endif + } #else -# define collequiv(c1, c2) ((c1) == (c2)) +# define collequiv(c, equiv) ((c) == (equiv)) #endif #define _COLLSYM _collsym @@ -131,25 +206,33 @@ static char const *const cclass_name[] = #define N_CHAR_CLASS (sizeof(cclass_name) / sizeof (cclass_name[0])) -static int -is_cclass (c, name) - int c; +static enum char_class +is_valid_cclass (name) const char *name; { - enum char_class char_class = CC_NO_CLASS; - int i, result; + enum char_class ret; + int i; + + ret = CC_NO_CLASS; for (i = 1; i < N_CHAR_CLASS; i++) { if (STREQ (name, cclass_name[i])) { - char_class = (enum char_class)i; + ret = (enum char_class)i; break; } } - if (char_class == 0) - return -1; + return ret; +} + +static int +cclass_test (c, char_class) + int c; + enum char_class char_class; +{ + int result; switch (char_class) { @@ -202,6 +285,22 @@ is_cclass (c, name) return result; } + +static int +is_cclass (c, name) + int c; + const char *name; +{ + enum char_class char_class; + int result; + + char_class = is_valid_cclass (name); + if (char_class == CC_NO_CLASS) + return -1; + + result = cclass_test (c, char_class); + return (result); +} /* Now include `sm_loop.c' for single-byte characters. */ /* The result of FOLD is an `unsigned char' */ @@ -209,19 +308,32 @@ is_cclass (c, name) ? TOLOWER ((unsigned char)c) \ : ((unsigned char)c)) +#if !defined (__CYGWIN__) +# define ISDIRSEP(c) ((c) == '/') +#else +# define ISDIRSEP(c) ((c) == '/' || (c) == '\\') +#endif /* __CYGWIN__ */ +#define PATHSEP(c) (ISDIRSEP(c) || (c) == 0) + +# define PDOT_OR_DOTDOT(s) (s[0] == '.' && (PATHSEP (s[1]) || (s[1] == '.' && PATHSEP (s[2])))) +# define SDOT_OR_DOTDOT(s) (s[0] == '.' && (s[1] == 0 || (s[1] == '.' && s[2] == 0))) + #define FCT internal_strmatch #define GMATCH gmatch #define COLLSYM collsym #define PARSE_COLLSYM parse_collsym #define BRACKMATCH brackmatch -#define PATSCAN patscan +#define PATSCAN glob_patscan #define STRCOMPARE strcompare #define EXTMATCH extmatch +#define DEQUOTE_PATHNAME udequote_pathname +#define STRUCT smat_struct #define STRCHR(S, C) strchr((S), (C)) +#define MEMCHR(S, C, N) memchr((S), (C), (N)) #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 RANGECMP(C1, C2, F) rangecmp((C1), (C2), (F)) #define COLLEQUIV(C1, C2) collequiv((C1), (C2)) #define CTYPE_T enum char_class #define IS_CCLASS(C, S) is_cclass((C), (S)) @@ -241,27 +353,97 @@ is_cclass (c, name) # define STREQ(s1, s2) ((wcscmp (s1, s2) == 0)) # define STREQN(a, b, n) ((a)[0] == (b)[0] && wcsncmp(a, b, n) == 0) +extern char *mbsmbchar PARAMS((const char *)); + +#if FNMATCH_EQUIV_FALLBACK +/* Construct a string w1 = "c1" and a pattern w2 = "[[=c2=]]" and pass them + to fnmatch to see if wide characters c1 and c2 collate as members of the + same equivalence class. We can't really do this portably any other way */ static int -rangecmp_wc (c1, c2) +_fnmatch_fallback_wc (c1, c2) + wchar_t c1, c2; /* string char, patchar */ +{ + char w1[MB_LEN_MAX+1]; /* string */ + char w2[MB_LEN_MAX+8]; /* constructed pattern */ + int l1, l2; + + l1 = wctomb (w1, c1); + if (l1 == -1) + return (2); + w1[l1] = '\0'; + + /* reconstruct the pattern */ + w2[0] = w2[1] = '['; + w2[2] = '='; + l2 = wctomb (w2+3, c2); + if (l2 == -1) + return (2); + w2[l2+3] = '='; + w2[l2+4] = w2[l2+5] = ']'; + w2[l2+6] = '\0'; + + return (fnmatch ((const char *)w2, (const char *)w1, 0)); +} +#endif + +static int +charcmp_wc (c1, c2, forcecoll) wint_t c1, c2; + int forcecoll; { static wchar_t s1[2] = { L' ', L'\0' }; static wchar_t s2[2] = { L' ', L'\0' }; + int r; if (c1 == c2) return 0; + if (forcecoll == 0 && glob_asciirange && c1 <= UCHAR_MAX && c2 <= UCHAR_MAX) + return ((int)(c1 - c2)); + s1[0] = c1; s2[0] = c2; return (wcscoll (s1, s2)); } +static int +rangecmp_wc (c1, c2, forcecoll) + wint_t c1, c2; + int forcecoll; +{ + int r; + + r = charcmp_wc (c1, c2, forcecoll); + + /* We impose a total ordering here by returning c1-c2 if charcmp returns 0, + as we do above in the single-byte case. */ + if (r != 0 || forcecoll) + return r; + return ((int)(c1 - c2)); /* impose total ordering */ +} + +/* Returns 1 if wide chars C and EQUIV collate equally in the current locale. */ static int collequiv_wc (c, equiv) wint_t c, equiv; { - return (!(c - equiv)); + wchar_t s, p; + + if (charcmp_wc (c, equiv, 1) == 0) + return 1; + +#if FNMATCH_EQUIV_FALLBACK +/* We check explicitly for success (fnmatch returns 0) to avoid problems if + our local definition of FNM_NOMATCH (strmatch.h) doesn't match the + system's (fnmatch.h). We don't care about error return values here. */ + + s = c; + p = equiv; + return (_fnmatch_fallback_wc (s, p) == 0); +#else + return 0; +#endif } /* Helper function for collating symbol. */ @@ -314,7 +496,9 @@ is_wcclass (wc, name) 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 (mbs == 0) + return -1; + mbslength = wcsrtombs (mbs, (const wchar_t **)&name, (wcslen(name) * MB_CUR_MAX + 1), &state); if (mbslength == (size_t)-1 || mbslength == (size_t)-2) { @@ -333,21 +517,79 @@ is_wcclass (wc, name) return (iswctype (wc, desc)); } +/* Return 1 if there are no char class [:class:] expressions (degenerate case) + or only posix-specified (C locale supported) char class expressions in + PATTERN. These are the ones where it's safe to punt to the single-byte + code, since wide character support allows locale-defined char classes. + This only uses single-byte code, but is only needed to support multibyte + locales. */ +static int +posix_cclass_only (pattern) + char *pattern; +{ + char *p, *p1; + char cc[16]; /* sufficient for all valid posix char class names */ + enum char_class valid; + + p = pattern; + while (p = strchr (p, '[')) + { + if (p[1] != ':') + { + p++; + continue; + } + p += 2; /* skip past "[:" */ + /* Find end of char class expression */ + for (p1 = p; *p1; p1++) + if (*p1 == ':' && p1[1] == ']') + break; + if (*p1 == 0) /* no char class expression found */ + break; + /* Find char class name and validate it against posix char classes */ + if ((p1 - p) >= sizeof (cc)) + return 0; + bcopy (p, cc, p1 - p); + cc[p1 - p] = '\0'; + valid = is_valid_cclass (cc); + if (valid == CC_NO_CLASS) + return 0; /* found unrecognized char class name */ + + p = p1 + 2; /* found posix char class name */ + } + + return 1; /* no char class names or only posix */ +} + /* Now include `sm_loop.c' for multibyte characters. */ #define FOLD(c) ((flags & FNM_CASEFOLD) && iswupper (c) ? towlower (c) : (c)) + +# if !defined (__CYGWIN__) +# define ISDIRSEP(c) ((c) == L'/') +# else +# define ISDIRSEP(c) ((c) == L'/' || (c) == L'\\') +# endif /* __CYGWIN__ */ +# define PATHSEP(c) (ISDIRSEP(c) || (c) == L'\0') + +# define PDOT_OR_DOTDOT(w) (w[0] == L'.' && (PATHSEP(w[1]) || (w[1] == L'.' && PATHSEP(w[2])))) +# define SDOT_OR_DOTDOT(w) (w[0] == L'.' && (w[1] == L'\0' || (w[1] == L'.' && w[2] == L'\0'))) + #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 PATSCAN glob_patscan_wc #define STRCOMPARE wscompare #define EXTMATCH extmatch_wc +#define DEQUOTE_PATHNAME wcdequote_pathname +#define STRUCT wcsmat_struct #define STRCHR(S, C) wcschr((S), (C)) +#define MEMCHR(S, C, N) wmemchr((S), (C), (N)) #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 RANGECMP(C1, C2, F) rangecmp_wc((C1), (C2), (F)) #define COLLEQUIV(C1, C2) collequiv_wc((C1), (C2)) #define CTYPE_T enum char_class #define IS_CCLASS(C, S) is_wcclass((C), (S)) @@ -365,10 +607,14 @@ xstrmatch (pattern, string, flags) int ret; size_t n; wchar_t *wpattern, *wstring; + size_t plen, slen, mplen, mslen; if (MB_CUR_MAX == 1) return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); + if (mbsmbchar (string) == 0 && mbsmbchar (pattern) == 0 && posix_cclass_only (pattern)) + 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)); diff --git a/lib/glob/strmatch.c b/lib/glob/strmatch.c index cea9bd8..5b7b49f 100644 --- a/lib/glob/strmatch.c +++ b/lib/glob/strmatch.c @@ -1,7 +1,7 @@ /* strmatch.c -- ksh-like extended pattern matching for the shell and filename globbing. */ -/* Copyright (C) 1991-2002 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -24,9 +24,9 @@ #include "stdc.h" #include "strmatch.h" -extern int xstrmatch __P((char *, char *, int)); +extern int xstrmatch PARAMS((char *, char *, int)); #if defined (HANDLE_MULTIBYTE) -extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); +extern int internal_wstrmatch PARAMS((wchar_t *, wchar_t *, int)); #endif int diff --git a/lib/glob/strmatch.h b/lib/glob/strmatch.h index 5c99e0c..d6a6b0f 100644 --- a/lib/glob/strmatch.h +++ b/lib/glob/strmatch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2004 Free Software Foundation, Inc. +/* Copyright (C) 1991-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -46,6 +46,9 @@ #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ #define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ +#define FNM_FIRSTCHAR (1 << 6) /* Match only the first character */ +#define FNM_DOTDOT (1 << 7) /* force `.' and `..' to match explicitly even if FNM_PERIOD not supplied. */ + /* Value returned by `strmatch' if STRING does not match PATTERN. */ #undef FNM_NOMATCH @@ -53,10 +56,10 @@ /* Match STRING against the filename pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ -extern int strmatch __P((char *, char *, int)); +extern int strmatch PARAMS((char *, char *, int)); #if HANDLE_MULTIBYTE -extern int wcsmatch __P((wchar_t *, wchar_t *, int)); +extern int wcsmatch PARAMS((wchar_t *, wchar_t *, int)); #endif #endif /* _STRMATCH_H */ diff --git a/lib/glob/xmbsrtowcs.c b/lib/glob/xmbsrtowcs.c index 23fcd8e..17250c3 100644 --- a/lib/glob/xmbsrtowcs.c +++ b/lib/glob/xmbsrtowcs.c @@ -1,6 +1,6 @@ /* xmbsrtowcs.c -- replacement function for mbsrtowcs */ -/* Copyright (C) 2002-2004 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -18,6 +18,12 @@ along with Bash. If not, see . */ +/* Ask for GNU extensions to get extern declaration for mbsnrtowcs if + available via glibc. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + #include #include @@ -29,9 +35,21 @@ #if HANDLE_MULTIBYTE +#include +#if !defined (errno) +extern int errno; +#endif + +#define WSBUF_INC 32 + #ifndef FREE # define FREE(x) do { if (x) free (x); } while (0) #endif + +#if ! HAVE_STRCHRNUL +extern char *strchrnul PARAMS((const char *, int)); +#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>. */ @@ -120,6 +138,126 @@ xmbsrtowcs (dest, src, len, pstate) return (wclength); } +#if HAVE_MBSNRTOWCS +/* Convert a multibyte string to a wide character string. Memory for the + new wide character string is obtained with malloc. + + Fast multiple-character version of xdupmbstowcs used when the indices are + not required and mbsnrtowcs is available. */ + +static size_t +xdupmbstowcs2 (destp, src) + wchar_t **destp; /* Store the pointer to the wide character string */ + const char *src; /* Multibyte character string */ +{ + const char *p; /* Conversion start position of src */ + wchar_t *wsbuf; /* Buffer for wide characters. */ + size_t wsbuf_size; /* Size of WSBUF */ + size_t wcnum; /* Number of wide characters in WSBUF */ + mbstate_t state; /* Conversion State */ + size_t n, wcslength; /* Number of wide characters produced by the conversion. */ + const char *end_or_backslash; + size_t nms; /* Number of multibyte characters to convert at one time. */ + mbstate_t tmp_state; + const char *tmp_p; + + memset (&state, '\0', sizeof(mbstate_t)); + + wsbuf_size = 0; + wsbuf = NULL; + + p = src; + wcnum = 0; + do + { + end_or_backslash = strchrnul(p, '\\'); + nms = end_or_backslash - p; + if (*end_or_backslash == '\0') + nms++; + + /* Compute the number of produced wide-characters. */ + tmp_p = p; + tmp_state = state; + + if (nms == 0 && *p == '\\') /* special initial case */ + nms = wcslength = 1; + else + wcslength = mbsnrtowcs (NULL, &tmp_p, nms, 0, &tmp_state); + + if (wcslength == 0) + { + tmp_p = p; /* will need below */ + tmp_state = state; + wcslength = 1; /* take a single byte */ + } + + /* Conversion failed. */ + if (wcslength == (size_t)-1) + { + free (wsbuf); + *destp = NULL; + return (size_t)-1; + } + + /* Resize the buffer if it is not large enough. */ + if (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */ + { + wchar_t *wstmp; + + while (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */ + wsbuf_size += WSBUF_INC; + + wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t)); + if (wstmp == NULL) + { + free (wsbuf); + *destp = NULL; + return (size_t)-1; + } + wsbuf = wstmp; + } + + /* Perform the conversion. This is assumed to return 'wcslength'. + It may set 'p' to NULL. */ + n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state); + + if (n == 0 && p == 0) + { + wsbuf[wcnum] = L'\0'; + break; + } + + /* Compensate for taking single byte on wcs conversion failure above. */ + if (wcslength == 1 && (n == 0 || n == (size_t)-1)) + { + state = tmp_state; + p = tmp_p; + wsbuf[wcnum] = *p; + if (*p == 0) + break; + else + { + wcnum++; p++; + } + } + else + wcnum += wcslength; + + if (mbsinit (&state) && (p != NULL) && (*p == '\\')) + { + wsbuf[wcnum++] = L'\\'; + p++; + } + } + while (p != NULL); + + *destp = wsbuf; + + /* Return the length of the wide character string, not including `\0'. */ + return wcnum; +} +#endif /* HAVE_MBSNRTOWCS */ + /* Convert a multibyte string to a wide character string. Memory for the new wide character string is obtained with malloc. @@ -131,8 +269,6 @@ xmbsrtowcs (dest, src, len, pstate) 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 */ @@ -152,9 +288,16 @@ xdupmbstowcs (destp, indicesp, src) { if (destp) *destp = NULL; + if (indicesp) + *indicesp = NULL; return (size_t)-1; } +#if HAVE_MBSNRTOWCS + if (indicesp == NULL) + return (xdupmbstowcs2 (destp, src)); +#endif + memset (&state, '\0', sizeof(mbstate_t)); wsbuf_size = WSBUF_INC; @@ -162,6 +305,8 @@ xdupmbstowcs (destp, indicesp, src) if (wsbuf == NULL) { *destp = NULL; + if (indicesp) + *indicesp = NULL; return (size_t)-1; } @@ -173,6 +318,7 @@ xdupmbstowcs (destp, indicesp, src) { free (wsbuf); *destp = NULL; + *indicesp = NULL; return (size_t)-1; } } @@ -207,6 +353,8 @@ xdupmbstowcs (destp, indicesp, src) free (wsbuf); FREE (indices); *destp = NULL; + if (indicesp) + *indicesp = NULL; return (size_t)-1; } @@ -226,18 +374,22 @@ xdupmbstowcs (destp, indicesp, src) free (wsbuf); FREE (indices); *destp = NULL; + if (indicesp) + *indicesp = NULL; return (size_t)-1; } wsbuf = wstmp; if (indicesp) { - idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char **)); + idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char *)); if (idxtmp == NULL) { free (wsbuf); free (indices); *destp = NULL; + if (indicesp) + *indicesp = NULL; return (size_t)-1; } indices = idxtmp; @@ -259,4 +411,113 @@ xdupmbstowcs (destp, indicesp, src) return (wcnum - 1); } +/* Convert wide character string to multibyte character string. Treat invalid + wide characters as bytes. Used only in unusual circumstances. + + Written by Bruno Haible , 2008, adapted by Chet Ramey + for use in Bash. */ + +/* Convert wide character string *SRCP to a multibyte character string and + store the result in DEST. Store at most LEN bytes in DEST. */ +size_t +xwcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) +{ + const wchar_t *src; + size_t cur_max; /* XXX - locale_cur_max */ + char buf[64], *destptr, *tmp_dest; + unsigned char uc; + mbstate_t prev_state; + + cur_max = MB_CUR_MAX; + if (cur_max > sizeof (buf)) /* Holy cow. */ + return (size_t)-1; + + src = *srcp; + + if (dest != NULL) + { + destptr = dest; + + for (; len > 0; src++) + { + wchar_t wc; + size_t ret; + + wc = *src; + /* If we have room, store directly into DEST. */ + tmp_dest = destptr; + ret = wcrtomb (len >= cur_max ? destptr : buf, wc, ps); + + if (ret == (size_t)(-1)) /* XXX */ + { + /* Since this is used for globbing and other uses of filenames, + treat invalid wide character sequences as bytes. This is + intended to be symmetric with xdupmbstowcs2. */ +handle_byte: + destptr = tmp_dest; /* in case wcrtomb modified it */ + uc = wc; + ret = 1; + if (len >= cur_max) + *destptr = uc; + else + buf[0] = uc; + if (ps) + memset (ps, 0, sizeof (mbstate_t)); + } + + if (ret > cur_max) /* Holy cow */ + goto bad_input; + + if (len < ret) + break; + + if (len < cur_max) + memcpy (destptr, buf, ret); + + if (wc == 0) + { + src = NULL; + /* Here mbsinit (ps). */ + break; + } + destptr += ret; + len -= ret; + } + *srcp = src; + return destptr - dest; + } + else + { + /* Ignore dest and len, don't store *srcp at the end, and + don't clobber *ps. */ + mbstate_t state = *ps; + size_t totalcount = 0; + + for (;; src++) + { + wchar_t wc; + size_t ret; + + wc = *src; + ret = wcrtomb (buf, wc, &state); + + if (ret == (size_t)(-1)) + goto bad_input2; + if (wc == 0) + { + /* Here mbsinit (&state). */ + break; + } + totalcount += ret; + } + return totalcount; + } + +bad_input: + *srcp = src; +bad_input2: + errno = EILSEQ; + return (size_t)(-1); +} + #endif /* HANDLE_MULTIBYTE */ diff --git a/lib/intl/Makefile.in b/lib/intl/Makefile.in index c5245d4..00fdb61 100644 --- a/lib/intl/Makefile.in +++ b/lib/intl/Makefile.in @@ -49,13 +49,15 @@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) l = @INTL_LIBTOOL_SUFFIX_PREFIX@ -AR = ar +AR = @AR@ CC = @CC@ LIBTOOL = @LIBTOOL@ RANLIB = @RANLIB@ YACC = @INTLBISON@ -y -d YFLAGS = --name-prefix=__gettext +ARFLAGS = @ARFLAGS@ + LOCAL_DEFS = @LOCAL_DEFS@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ @@ -146,7 +148,7 @@ all-no-no: libintl.a libgnuintl.a: $(OBJECTS) rm -f $@ - $(AR) cru $@ $(OBJECTS) + $(AR) $(ARFLAGS) $@ $(OBJECTS) $(RANLIB) $@ libintl.la libgnuintl.la: $(OBJECTS) diff --git a/lib/intl/VERSION b/lib/intl/VERSION index 1303183..f49e0dd 100644 --- a/lib/intl/VERSION +++ b/lib/intl/VERSION @@ -1 +1,3 @@ GNU gettext library from gettext-0.12.1 + +This is here only in the case the system doesn't provide it diff --git a/lib/intl/l10nflist.c b/lib/intl/l10nflist.c index 9f02487..4ce284a 100644 --- a/lib/intl/l10nflist.c +++ b/lib/intl/l10nflist.c @@ -272,7 +272,7 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, } if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) { - /* This component can be part of both syntaces but has different + /* This component can be part of both syntaxes but has different leading characters. For CEN we use `+', else `@'. */ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; cp = stpcpy (cp, modifier); @@ -332,7 +332,10 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) * sizeof (struct loaded_l10nfile *))); if (retval == NULL) - return NULL; + { + free (abs_filename); + return NULL; + } retval->filename = abs_filename; diff --git a/lib/intl/loadmsgcat.c b/lib/intl/loadmsgcat.c index 83ca63f..adbd7b4 100644 --- a/lib/intl/loadmsgcat.c +++ b/lib/intl/loadmsgcat.c @@ -978,7 +978,11 @@ _nl_load_domain (domain_file, domainbinding) data = (struct mo_file_header *) malloc (size); if (data == NULL) - return; + { + if (use_mmap == 0) + close (fd); + return; + } to_read = size; read_ptr = (char *) data; @@ -1019,7 +1023,15 @@ _nl_load_domain (domain_file, domainbinding) domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); if (domain == NULL) - return; + { +#ifdef HAVE_MMAP + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + return; + } domain_file->data = domain; domain->data = (char *) data; diff --git a/lib/intl/localealias.c b/lib/intl/localealias.c index d99a48d..7a730db 100644 --- a/lib/intl/localealias.c +++ b/lib/intl/localealias.c @@ -305,7 +305,10 @@ read_alias_file (fname, fname_len) if (nmap >= maxmap) if (__builtin_expect (extend_alias_table (), 0)) - return added; + { + fclose (fp); + return added; + } alias_len = strlen (alias) + 1; value_len = strlen (value) + 1; @@ -318,7 +321,10 @@ read_alias_file (fname, fname_len) ? alias_len + value_len : 1024)); char *new_pool = (char *) realloc (string_space, new_size); if (new_pool == NULL) - return added; + { + fclose (fp); + return added; + } if (__builtin_expect (string_space != new_pool, 0)) { diff --git a/lib/intl/ref-add.sin b/lib/intl/ref-add.sin old mode 100755 new mode 100644 diff --git a/lib/intl/ref-del.sin b/lib/intl/ref-del.sin old mode 100755 new mode 100644 diff --git a/lib/malloc/Makefile.in b/lib/malloc/Makefile.in index e40f00a..7ec8f64 100644 --- a/lib/malloc/Makefile.in +++ b/lib/malloc/Makefile.in @@ -1,6 +1,6 @@ # Skeleton Makefile for the GNU malloc code # -# Copyright (C) 1996-2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 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 @@ -16,7 +16,7 @@ # along with this program. If not, see . srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ @@ -38,6 +38,7 @@ PROFILE_FLAGS = @PROFILE_FLAGS@ CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ +STYLE_CFLAGS = @STYLE_CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @@ -56,7 +57,7 @@ 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) + $(CFLAGS) $(MALLOC_CFLAGS) $(STYLE_CFLAGS) $(CPPFLAGS) .c.o: $(CC) $(CCFLAGS) -c $< @@ -112,6 +113,7 @@ 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 +stats.o: ${BUILD_DIR}/config.h table.o: ${BUILD_DIR}/config.h watch.o: ${BUILD_DIR}/config.h diff --git a/lib/malloc/getpagesize.h b/lib/malloc/getpagesize.h index 7f32340..a59eabe 100644 --- a/lib/malloc/getpagesize.h +++ b/lib/malloc/getpagesize.h @@ -32,7 +32,7 @@ #endif #if !defined (getpagesize) -# ifndef _MINIX +# if defined (HAVE_SYS_PARAM_H) # include # endif # if defined (PAGESIZE) diff --git a/lib/malloc/imalloc.h b/lib/malloc/imalloc.h index 34df10a..bebd136 100644 --- a/lib/malloc/imalloc.h +++ b/lib/malloc/imalloc.h @@ -1,6 +1,6 @@ /* imalloc.h -- internal malloc definitions shared by source files. */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -32,6 +32,11 @@ #define MALLOC_WRAPFUNCS +/* If defined, as it is by default, use the lesscore() function to attempt + to reduce the top of the heap when freeing memory blocks larger than a + defined threshold. */ +#define USE_LESSCORE + /* Generic pointer type. */ #ifndef PTR_T # if defined (__STDC__) @@ -45,11 +50,11 @@ # define NULL 0 #endif -#if !defined (__STRING) +#if !defined (CPP_STRING) # if defined (HAVE_STRINGIZE) -# define __STRING(x) #x +# define CPP_STRING(x) #x # else -# define __STRING(x) "x" +# define CPP_STRING(x) "x" # endif /* !HAVE_STRINGIZE */ #endif /* !__STRING */ @@ -67,11 +72,11 @@ # endif /* HAVE_BCOPY */ #endif /* !__GNUC__ */ -#if !defined (__P) +#if !defined (PARAMS) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) -# define __P(protos) protos +# define PARAMS(protos) protos # else -# define __P(protos) () +# define PARAMS(protos) () # endif #endif @@ -165,4 +170,9 @@ do { \ # define _(x) x #endif +#include + +extern void _malloc_block_signals PARAMS((sigset_t *, sigset_t *)); +extern void _malloc_unblock_signals PARAMS((sigset_t *, sigset_t *)); + #endif /* _IMALLOC_H */ diff --git a/lib/malloc/malloc.c b/lib/malloc/malloc.c index bca68e8..f61f027 100644 --- a/lib/malloc/malloc.c +++ b/lib/malloc/malloc.c @@ -1,6 +1,6 @@ /* malloc.c - dynamic memory allocation for bash. */ -/* Copyright (C) 1985-2005 Free Software Foundation, Inc. +/* Copyright (C) 1985-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -25,6 +25,8 @@ * * Nov 1983, Mike@BRL, Added support for 4.1C/4.2 BSD. * + * [VERY] old explanation: + * * 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 @@ -45,10 +47,10 @@ */ /* - * 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. + * nextf[i] is the pointer to the next free block of size 2^(i+5). The + * smallest allocatable block is 32 bytes. The overhead information will + * go in the first 16 bytes of the block, and the returned pointer will point + * to the rest. */ /* Define MEMSCRAMBLE to have free() write 0xcf into memory as it's freed, to @@ -81,9 +83,17 @@ #else # include #endif - +#include #include +#if !defined (botch) +#include +#endif + +#if defined (HAVE_MMAP) +#include +#endif + /* Define getpagesize () if the system does not. */ #ifndef HAVE_GETPAGESIZE # include "getpagesize.h" @@ -100,12 +110,19 @@ # include "watch.h" #endif +#ifdef powerof2 +# undef powerof2 +#endif +/* Could also use (((x) & -(x)) == (x)) */ +#define powerof2(x) ((((x) - 1) & (x)) == 0) + /* System-specific omissions. */ #ifdef HPUX # define NO_VALLOC #endif -#define NBUCKETS 30 +#define MALLOC_PAGESIZE_MIN 4096 +#define MALLOC_INCR_PAGES 8192 #define ISALLOC ((char) 0xf7) /* magic byte that implies allocation */ #define ISFREE ((char) 0x54) /* magic byte that implies free block */ @@ -123,23 +140,30 @@ enough room in the block for the new size. Range checking is always done. */ union mhead { - bits64_t mh_align; /* 8 */ + bits64_t mh_align[2]; /* 16 */ 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 */ + char mi_magic8[8]; /* MAGIC1 guard bytes */ /* 8 */ } 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 mh_magic8 minfo.mi_magic8 + +#define MAGIC8_NUMBYTES 8 +#define MALLOC_SIZE_T u_bits32_t #define MOVERHEAD sizeof(union mhead) -#define MALIGN_MASK 7 /* one less than desired alignment */ +#define MALIGN_MASK 15 /* one less than desired alignment */ + +/* Guard bytes we write at the end of the allocation, encoding the size. */ typedef union _malloc_guard { char s[4]; u_bits32_t i; @@ -151,7 +175,11 @@ typedef union _malloc_guard { 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. */ +/* If we have mmap, this is not used for chunks larger than mmap_threshold, + since we munmap immediately on free(). */ +/* If SIZEOF_CHAR_P == 8, this goes into the mh_magic8 buffer at the end of + the rest of the struct. This may need adjusting. */ #define CHAIN(a) \ (*(union mhead **) (sizeof (char *) + (char *) (a))) @@ -159,37 +187,70 @@ typedef union _malloc_guard { 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) */ +/* Written in the bytes before the block's real space (-SIZEOF_CHAR_P bytes) */ +#define MAGIC1 0x55 #define MAGIC2 0x5555 -#define MSLOP 4 /* 4 bytes extra for u_bits32_t size */ + +#define MSLOP 4 /* 4 bytes extra for u_bits32_t end guard 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. */ + rounded up to nearest multiple of 16 (alignment) 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); \ + if (!(p)) xbotch((PTR_T)0, ERR_ASSERT_FAILED, CPP_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 +#define SPLIT_MIN 1 /* 64 */ +#define SPLIT_MID 9 /* 16384 */ +#define SPLIT_MAX 12 /* 131072 */ /* Minimum and maximum bucket indices for block coalescing. */ -#define COMBINE_MIN 2 -#define COMBINE_MAX (pagebucket - 1) /* XXX */ +#define COMBINE_MIN 1 /* 64 */ +#define COMBINE_MAX (pagebucket - 1) /* 2048 for 4096-byte pages */ + +#define LESSCORE_MIN 8 /* 8192 */ +#define LESSCORE_FRC 11 /* 65536 */ -#define LESSCORE_MIN 10 -#define LESSCORE_FRC 13 +/* Which bin do we prepopulate with the initial sbrk memory? */ +#define PREPOP_BIN 1 +#define PREPOP_SIZE 64 -#define STARTBUCK 1 +#define STARTBUCK 0 + +/* Should we use mmap for large allocations? */ +#if defined (HAVE_MMAP) +# if defined (MAP_ANON) && !defined (MAP_ANONYMOUS) +# define MAP_ANONYMOUS MAP_ANON +# endif +#endif + +#if defined (HAVE_MMAP) && defined (MAP_ANONYMOUS) +# define USE_MMAP 1 +#endif + +#if defined (USE_MMAP) +# define MMAP_THRESHOLD 12 /* must be >= SPLIT_MAX, COMBINE_MAX */ +#else +# define MMAP_THRESHOLD (8 * SIZEOF_LONG) +#endif + +/* We don't try to decipher the differences between the Linux-style and + BSD-style implementations of mremap here; we use the Linux one. */ +#if USE_MMAP == 1 && defined (HAVE_MREMAP) && defined (MREMAP_MAYMOVE) +# define USE_MREMAP 1 +#endif + +/* usable bins from STARTBUCK..NBUCKETS-1 */ + +#define NBUCKETS 28 /* Flags for the internal functions. */ #define MALLOC_WRAPPER 0x01 /* wrapper function */ @@ -215,7 +276,7 @@ typedef union _malloc_guard { #define RIGHT_BUCKET(nb, nu) \ (((nb) > binsizes[(nu)-1]) && ((nb) <= binsizes[(nu)])) -/* nextf[i] is free list of blocks of size 2**(i + 3) */ +/* nextf[i] is free list of blocks of size 2**(i + 5) */ static union mhead *nextf[NBUCKETS]; @@ -230,43 +291,50 @@ 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, + 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)) */ +/* binsizes[x] == (1 << ((x) + 5)) */ #define binsize(x) binsizes[(x)] +#define MAXALLOC_SIZE binsizes[NBUCKETS-1] + +#if !defined (errno) +extern int errno; +#endif + /* 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)); +static PTR_T internal_malloc PARAMS((size_t, const char *, int, int)); +static PTR_T internal_realloc PARAMS((PTR_T, size_t, const char *, int, int)); +static void internal_free PARAMS((PTR_T, const char *, int, int)); +static PTR_T internal_memalign PARAMS((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)); +static PTR_T internal_calloc PARAMS((size_t, size_t, const char *, int, int)); +static void internal_cfree PARAMS((PTR_T, const char *, int, int)); #endif #ifndef NO_VALLOC -static PTR_T internal_valloc __P((size_t, const char *, int, int)); +static PTR_T internal_valloc PARAMS((size_t, const char *, int, int)); #endif +static PTR_T internal_remap PARAMS((PTR_T, size_t, int, int)); #if defined (botch) extern void botch (); #else -static void botch __P((const char *, const char *, int)); +static void botch PARAMS((const char *, const char *, int)); #endif -static void xbotch __P((PTR_T, int, const char *, const char *, int)); +static void xbotch PARAMS((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)); +extern int running_trap; +extern int signal_is_trapped PARAMS((int)); #endif #ifdef MALLOC_STATS @@ -278,12 +346,15 @@ int malloc_flags = 0; /* future use */ int malloc_trace = 0; /* trace allocations and frees to stderr */ int malloc_register = 0; /* future use */ +/* Use a variable in case we want to dynamically adapt it in the future */ +int malloc_mmap_threshold = MMAP_THRESHOLD; + #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)); +extern void mtrace_alloc PARAMS((const char *, PTR_T, size_t, const char *, int)); +extern void mtrace_free PARAMS((PTR_T, int, const char *, int)); #endif #if !defined (botch) @@ -498,8 +569,8 @@ xsplit (mp, nu) busy[nbuck] = 0; } -static void -block_signals (setp, osetp) +void +_malloc_block_signals (setp, osetp) sigset_t *setp, *osetp; { #ifdef HAVE_POSIX_SIGNALS @@ -513,8 +584,8 @@ block_signals (setp, osetp) #endif } -static void -unblock_signals (setp, osetp) +void +_malloc_unblock_signals (setp, osetp) sigset_t *setp, *osetp; { #ifdef HAVE_POSIX_SIGNALS @@ -526,6 +597,7 @@ unblock_signals (setp, osetp) #endif } +#if defined (USE_LESSCORE) /* 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. */ @@ -546,6 +618,7 @@ lesscore (nu) /* give system back some memory */ _mstats.nlesscore[nu]++; #endif } +#endif /* USE_LESSCORE */ /* Ask system for more memory; add to NEXTF[NU]. BUSY[NU] must be set to 1. */ static void @@ -562,10 +635,14 @@ morecore (nu) /* 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)) +# if defined (SIGCHLD) + if (running_trap || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD)) +# else + if (running_trap || signal_is_trapped (SIGINT)) +# endif #endif { - block_signals (&set, &oset); + _malloc_block_signals (&set, &oset); blocked_sigs = 1; } @@ -580,7 +657,7 @@ morecore (nu) /* Try to split a larger block here, if we're within the range of sizes to split. */ - if (nu >= SPLIT_MIN) + if (nu >= SPLIT_MIN && nu <= malloc_mmap_threshold) { bsplit (nu); if (nextf[nu] != 0) @@ -589,7 +666,7 @@ morecore (nu) /* 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]) + if (nu >= COMBINE_MIN && nu < COMBINE_MAX && nu <= malloc_mmap_threshold && busy[nu - 1] == 0 && nextf[nu - 1]) { bcoalesce (nu); if (nextf[nu] != 0) @@ -618,6 +695,25 @@ morecore (nu) nblks = 1; } +#if defined (USE_MMAP) + if (nu > malloc_mmap_threshold) + { + mp = (union mhead *)mmap (0, sbrk_amt, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + if ((void *)mp == MAP_FAILED) + goto morecore_done; + nextf[nu] = mp; + mp->mh_alloc = ISFREE; + mp->mh_index = nu; + CHAIN (mp) = 0; +#ifdef MALLOC_STATS + _mstats.nmmap++; + _mstats.tmmap += sbrk_amt; +#endif + goto morecore_done; + } +#endif + + #ifdef MALLOC_STATS _mstats.nsbrk++; _mstats.tsbrk += sbrk_amt; @@ -631,7 +727,7 @@ morecore (nu) memtop += sbrk_amt; - /* shouldn't happen, but just in case -- require 8-byte alignment */ + /* shouldn't happen, but just in case -- require 8- or 16-byte alignment */ if ((long)mp & MALIGN_MASK) { mp = (union mhead *) (((long)mp + MALIGN_MASK) & ~MALIGN_MASK); @@ -652,7 +748,7 @@ morecore (nu) morecore_done: if (blocked_sigs) - unblock_signals (&set, &oset); + _malloc_unblock_signals (&set, &oset); } static void @@ -661,9 +757,6 @@ malloc_debug_dummy () write (1, "malloc_debug_dummy\n", 19); } -#define PREPOP_BIN 2 -#define PREPOP_SIZE 32 - static int pagealign () { @@ -673,8 +766,8 @@ pagealign () char *curbrk; pagesz = getpagesize (); - if (pagesz < 1024) - pagesz = 1024; + if (pagesz < MALLOC_PAGESIZE_MIN) + pagesz = MALLOC_PAGESIZE_MIN; /* 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 @@ -698,8 +791,8 @@ pagealign () 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 + popular bin (3 == 64 bytes) with it. Add whatever we need to curbrk + to make things 64-byte aligned, compute how many 64-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); @@ -740,7 +833,7 @@ internal_malloc (n, file, line, flags) /* get a block */ register union mhead *p; register int nunits; register char *m, *z; - long nbytes; + MALLOC_SIZE_T nbytes; mguard_t mg; /* Get the system page size and align break pointer so future sbrks will @@ -754,13 +847,17 @@ internal_malloc (n, file, line, flags) /* get a block */ 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. */ +#if SIZEOF_SIZE_T == 8 + if (ALLOCATED_BYTES(n) > MAXALLOC_SIZE) + return ((PTR_T) NULL); +#endif nbytes = ALLOCATED_BYTES(n); nunits = (nbytes <= (pagesz >> 1)) ? STARTBUCK : pagebucket; for ( ; nunits < NBUCKETS; nunits++) if (nbytes <= binsize(nunits)) break; - /* Silently reject too-large requests. */ + /* Silently reject too-large requests. XXX - can increase this if HAVE_MMAP */ if (nunits >= NBUCKETS) return ((PTR_T) NULL); @@ -801,6 +898,9 @@ internal_malloc (n, file, line, flags) /* get a block */ p->mh_magic2 = MAGIC2; p->mh_nbytes = n; + /* Begin guard */ + MALLOC_MEMSET ((char *)p->mh_magic8, MAGIC1, MAGIC8_NUMBYTES); + /* End guard */ mg.i = n; z = mg.s; @@ -835,6 +935,14 @@ internal_malloc (n, file, line, flags) /* get a block */ _malloc_ckwatch (p + 1, file, line, W_ALLOC, n); #endif +#if defined (MALLOC_DEBUG) + z = (char *) (p + 1); + /* Check alignment of returned pointer */ + if ((unsigned long)z & MALIGN_MASK) + fprintf (stderr, "malloc: %s:%d: warning: request for %d bytes not aligned on %d byte boundary\r\n", + file ? file : _("unknown"), line, p->mh_nbytes, MALIGN_MASK+1); +#endif + return (PTR_T) (p + 1); } @@ -847,8 +955,8 @@ internal_free (mem, file, line, flags) register union mhead *p; register char *ap, *z; register int nunits; - register unsigned int nbytes; - int ubytes; /* caller-requested size */ + register MALLOC_SIZE_T nbytes; + MALLOC_SIZE_T ubytes; /* caller-requested size */ mguard_t mg; if ((ap = (char *)mem) == 0) @@ -862,8 +970,8 @@ internal_free (mem, file, line, flags) p = (union mhead *) ap - 1; } -#if defined (MALLOC_TRACE) || defined (MALLOC_REGISTER) - if (malloc_trace || malloc_register) +#if defined (MALLOC_TRACE) || defined (MALLOC_REGISTER) || defined (MALLOC_WATCH) + if (malloc_trace || malloc_register || _malloc_nwatch > 0) ubytes = p->mh_nbytes; #endif @@ -881,19 +989,25 @@ internal_free (mem, file, line, flags) 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'. + /* The MAGIC8_NUMBYTES bytes before the memory handed to the user are now + used for a simple check 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 + 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); + { + int i; + for (i = 0, z = p->mh_magic8; i < MAGIC8_NUMBYTES; i++) + if (*z++ != MAGIC1) + xbotch (mem, ERR_UNDERFLOW, + _("free: underflow detected; magic8 corrupted"), file, line); + } ap += p->mh_nbytes; z = mg.s; @@ -901,11 +1015,20 @@ internal_free (mem, file, line, flags) 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) +#if defined (USE_MMAP) + if (nunits > malloc_mmap_threshold) + { + munmap (p, binsize (nunits)); +#if defined (MALLOC_STATS) + _mstats.nlesscore[nunits]++; +#endif + goto free_return; + } #endif + +#if defined (USE_LESSCORE) + /* We take care of the mmap case and munmap above */ + if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop)) { /* If above LESSCORE_FRC, give back unconditionally. This should be set high enough to be infrequently encountered. If between LESSCORE_MIN @@ -918,6 +1041,7 @@ internal_free (mem, file, line, flags) goto free_return; } } +#endif /* USE_LESSCORE */ #ifdef MEMSCRAMBLE if (p->mh_nbytes) @@ -966,6 +1090,58 @@ internal_free (mem, file, line, flags) #endif } +#if USE_MREMAP == 1 +/* Assume the caller (internal_realloc) has already performed the sanity and + overflow tests. Basically we kill the old guard information, determine the + new size, call mremap with the new size, and add the bookkeeping and guard + information back in. */ +static PTR_T +internal_remap (mem, n, nunits, flags) + PTR_T mem; + register size_t n; + int nunits; + int flags; +{ + register union mhead *p, *np; + char *m, *z; + mguard_t mg; + MALLOC_SIZE_T nbytes; + + if (nunits >= NBUCKETS) /* Uh oh */ + return ((PTR_T) NULL); + + p = (union mhead *)mem - 1; + + m = (char *)mem + p->mh_nbytes; + z = mg.s; + *m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0; /* erase guard */ + + nbytes = ALLOCATED_BYTES(n); + + busy[nunits] = 1; + np = (union mhead *)mremap (p, binsize (p->mh_index), binsize (nunits), MREMAP_MAYMOVE); + busy[nunits] = 0; + if (np == MAP_FAILED) + return (PTR_T)NULL; + + if (np != p) + { + np->mh_alloc = ISALLOC; + np->mh_magic2 = MAGIC2; + MALLOC_MEMSET ((char *)np->mh_magic8, MAGIC1, MAGIC8_NUMBYTES); + } + np->mh_index = nunits; + np->mh_nbytes = n; + + mg.i = n; + z = mg.s; + m = (char *)(np + 1) + n; + *m++ = *z++, *m++ = *z++, *m++ = *z++, *m++ = *z++; + + return ((PTR_T)(np + 1)); +} +#endif + static PTR_T internal_realloc (mem, n, file, line, flags) PTR_T mem; @@ -974,9 +1150,9 @@ internal_realloc (mem, n, file, line, flags) int line, flags; { register union mhead *p; - register u_bits32_t tocopy; - register unsigned int nbytes; - register int nunits; + register MALLOC_SIZE_T tocopy; + register MALLOC_SIZE_T nbytes; + register int newunits, nunits; register char *m, *z; mguard_t mg; @@ -1014,6 +1190,14 @@ internal_realloc (mem, n, file, line, flags) if (IN_BUCKET(nbytes, nunits) == 0) xbotch (mem, ERR_UNDERFLOW, _("realloc: underflow detected; mh_nbytes out of range"), file, line); + { + int i; + for (i = 0, z = p->mh_magic8; i < MAGIC8_NUMBYTES; i++) + if (*z++ != MAGIC1) + xbotch (mem, ERR_UNDERFLOW, + _("realloc: underflow detected; magic8 corrupted"), file, line); + + } m = (char *)mem + (tocopy = p->mh_nbytes); z = mg.s; @@ -1029,18 +1213,23 @@ internal_realloc (mem, n, file, line, flags) _mstats.bytesreq += (n < tocopy) ? 0 : n - tocopy; #endif + /* If we're reallocating to the same size as previously, return now */ + if (n == p->mh_nbytes) + return mem; + +#if SIZEOF_SIZE_T == 8 + if (ALLOCATED_BYTES(n) > MAXALLOC_SIZE) + return ((PTR_T) NULL); +#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 (RIGHT_BUCKET(nbytes, nunits) || RIGHT_BUCKET(nbytes, nunits-1)) { -#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); @@ -1058,10 +1247,31 @@ internal_realloc (mem, n, file, line, flags) _mstats.nrcopy++; #endif +#if USE_MREMAP == 1 + /* If we are using mmap and have mremap, we use it here. Make sure that + the old size and new size are above the threshold where we use mmap */ + if (nbytes > p->mh_nbytes) + newunits = nunits; + else + newunits = (nbytes <= (pagesz >> 1)) ? STARTBUCK : pagebucket; + for ( ; newunits < NBUCKETS; newunits++) + if (nbytes <= binsize(newunits)) + break; + + if (nunits > malloc_mmap_threshold && newunits > malloc_mmap_threshold) + { + m = internal_remap (mem, n, newunits, MALLOC_INTERNAL); + if (m == 0) + return 0; + } + else +#endif /* USE_MREMAP */ + { 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) @@ -1102,11 +1312,7 @@ internal_memalign (alignment, size, file, line, flags) 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. */ @@ -1117,6 +1323,55 @@ internal_memalign (alignment, size, file, line, flags) return aligned; } +int +posix_memalign (memptr, alignment, size) + void **memptr; + size_t alignment, size; +{ + void *mem; + + /* Perform posix-mandated error checking here */ + if ((alignment % sizeof (void *) != 0) || alignment == 0) + return EINVAL; + else if (powerof2 (alignment) == 0) + return EINVAL; + + mem = internal_memalign (alignment, size, (char *)0, 0, 0); + if (mem != 0) + { + *memptr = mem; + return 0; + } + return ENOMEM; +} + +size_t +malloc_usable_size (mem) + void *mem; +{ + register union mhead *p; + register char *ap; + + if ((ap = (char *)mem) == 0) + return 0; + + /* Find the true start of the memory block to discover which bin */ + p = (union mhead *) ap - 1; + + if (p->mh_alloc == ISMEMALIGN) + { + ap -= p->mh_nbytes; + p = (union mhead *) ap - 1; + } + + /* return 0 if ISFREE */ + if (p->mh_alloc == ISFREE) + return 0; + + /* Since we use bounds checking, the usable size is the last requested size. */ + return (p->mh_nbytes); +} + #if !defined (NO_VALLOC) /* This runs into trouble with getpagesize on HPUX, and Multimax machines. Patching out seems cleaner than the ugly fix needed. */ diff --git a/lib/malloc/mstats.h b/lib/malloc/mstats.h index 11389ff..aa3fa33 100644 --- a/lib/malloc/mstats.h +++ b/lib/malloc/mstats.h @@ -1,6 +1,6 @@ /* mstats.h - definitions for malloc statistics */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -25,8 +25,9 @@ #ifdef MALLOC_STATS +/* This needs to change if the definition in malloc.c changes */ #ifndef NBUCKETS -# define NBUCKETS 30 +# define NBUCKETS 28 #endif /* @@ -77,6 +78,8 @@ struct _malstats { int nsplit[NBUCKETS]; int tbcoalesce; int ncoalesce[NBUCKETS]; + int nmmap; + bits32_t tmmap; }; /* Return statistics describing allocation of blocks of size BLOCKSIZE. @@ -98,12 +101,13 @@ struct bucket_stats { int nlesscore; int nsplit; int ncoalesce; + int nmmap; /* currently unused */ }; -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 *)); +extern struct bucket_stats malloc_bucket_stats PARAMS((int)); +extern struct _malstats malloc_stats PARAMS((void)); +extern void print_malloc_stats PARAMS((char *)); +extern void trace_malloc_stats PARAMS((char *, char *)); #endif /* MALLOC_STATS */ diff --git a/lib/malloc/shmalloc.h b/lib/malloc/shmalloc.h index 2dac615..d51193e 100644 --- a/lib/malloc/shmalloc.h +++ b/lib/malloc/shmalloc.h @@ -1,6 +1,6 @@ /* Functions (currently) for use by the shell to do malloc debugging and tracking. */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -21,11 +21,11 @@ #ifndef _SH_MALLOC_H #define _SH_MALLOC_H -#ifndef __P +#ifndef PARAMS # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) -# define __P(protos) protos +# define PARAMS(protos) protos # else -# define __P(protos) () +# define PARAMS(protos) () # endif #endif @@ -41,30 +41,30 @@ #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_malloc PARAMS((size_t, const char *, int)); +extern PTR_T sh_realloc PARAMS((PTR_T, size_t, const char *, int)); +extern void sh_free PARAMS((PTR_T, const char *, int)); -extern PTR_T sh_memalign __P((size_t, size_t, const char *, int)); +extern PTR_T sh_memalign PARAMS((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_calloc PARAMS((size_t, size_t, const char *, int)); +extern void sh_cfree PARAMS((PTR_T, const char *, int)); -extern PTR_T sh_valloc __P((size_t, const char *, int)); +extern PTR_T sh_valloc PARAMS((size_t, const char *, int)); /* trace.c */ -extern int malloc_set_trace __P((int)); +extern int malloc_set_trace PARAMS((int)); extern void malloc_set_tracefp (); /* full prototype requires stdio.h */ -extern void malloc_set_tracefn __P((char *, char *)); +extern void malloc_set_tracefn PARAMS((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)); +extern void mregister_dump_table PARAMS((void)); +extern void mregister_table_init PARAMS((void)); +extern int malloc_set_register PARAMS((int)); /* stats.c */ -extern void print_malloc_stats __P((char *)); +extern void print_malloc_stats PARAMS((char *)); extern void fprint_malloc_stats (); /* full prototype requires stdio.h */ -extern void trace_malloc_stats __P((char *, char *)); +extern void trace_malloc_stats PARAMS((char *, char *)); #endif diff --git a/lib/malloc/stats.c b/lib/malloc/stats.c index 8665918..b38df9f 100644 --- a/lib/malloc/stats.c +++ b/lib/malloc/stats.c @@ -1,6 +1,6 @@ /* stats.c - malloc statistics */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -34,11 +34,13 @@ #include "mstats.h" -extern int malloc_free_blocks __P((int)); +extern int malloc_free_blocks PARAMS((int)); + +extern int malloc_mmap_threshold; extern struct _malstats _mstats; -extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t)); +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); struct bucket_stats malloc_bucket_stats (size) @@ -103,18 +105,24 @@ _print_malloc_stats (s, fp) for (i = totused = totfree = 0; i < NBUCKETS; i++) { v = malloc_bucket_stats (i); + /* Show where the mmap threshold is; sizes greater than this use mmap to + allocate and munmap to free (munmap shows up as lesscore). */ + if (i == malloc_mmap_threshold+1) + fprintf (fp, "--------\n"); 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); + fprintf (fp, "%8lu\t%4d\t%6d\t%5d%8d\t%8d %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, "\nTotal bytes requested by application: %lu\n", (unsigned long)_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 mmaps: %d, total bytes via mmap: %d\n", + _mstats.nmmap, _mstats.tmmap); fprintf (fp, "Total blocks split: %d, total block coalesces: %d\n", _mstats.tbsplit, _mstats.tbcoalesce); } diff --git a/lib/malloc/table.c b/lib/malloc/table.c index cf89b3c..e6acbf4 100644 --- a/lib/malloc/table.c +++ b/lib/malloc/table.c @@ -1,6 +1,6 @@ /* table.c - bookkeeping functions for allocated memory */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -28,18 +28,34 @@ #include "imalloc.h" #include "table.h" +#ifdef SHELL +extern int running_trap; +extern int signal_is_trapped PARAMS((int)); +#endif + extern int malloc_register; #ifdef MALLOC_REGISTER -#define FIND_ALLOC 0x01 /* allocate new entry or find existing */ -#define FIND_EXIST 0x02 /* find existing entry */ +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); + +#define FIND_ALLOC 0x01 /* find slot for new allocation */ +#define FIND_EXIST 0x02 /* find slot for existing entry for free() or search */ static int table_count = 0; static int table_allocated = 0; +static int table_bucket_index = REG_TABLE_SIZE-1; static mr_table_t mem_table[REG_TABLE_SIZE]; static mr_table_t mem_overflow; +#ifndef STREQ +#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0) +#endif + +static int location_table_index = 0; +static int location_table_count = 0; +static ma_table_t mlocation_table[REG_TABLE_SIZE]; + /* * NOTE: taken from dmalloc (http://dmalloc.com) and modified. */ @@ -67,8 +83,15 @@ which_bucket (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)); + +#define next_bucket() ((table_bucket_index + 1) & (REG_TABLE_SIZE-1)) +#define next_entry(mem) ((mem == mem_table + REG_TABLE_SIZE - 1) ? mem_table : ++mem) + +#define prev_bucket() (table_bucket_index == 0 ? REG_TABLE_SIZE-1 : table_bucket_index-1) +#define prev_entry(mem) ((mem == mem_table) ? mem_table + REG_TABLE_SIZE - 1 : mem - 1) #endif static mr_table_t * @@ -78,60 +101,37 @@ find_entry (mem, flags) { unsigned int bucket; register mr_table_t *tp; - mr_table_t *endp, *lastp; + mr_table_t *endp; 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; + /* If we want to insert an allocation entry just use the next slot */ + if (flags & FIND_ALLOC) + { + table_bucket_index = next_bucket(); + table_count++; + tp = mem_table + table_bucket_index; + memset(tp, 0, sizeof (mr_table_t)); /* overwrite next existing entry */ + return tp; + } + + tp = endp = mem_table + table_bucket_index; + /* search for last allocation corresponding to MEM, return entry pointer */ 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; + tp = prev_entry (tp); - if (tp == endp && (flags & FIND_EXIST)) + /* if we went all the way around and didn't find it, return NULL */ + if (tp == endp) 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; + return (mr_table_t *)NULL; } mr_table_t * @@ -168,6 +168,20 @@ mregister_alloc (tag, mem, size, file, line) int line; { mr_table_t *tentry; + 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 (running_trap || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD)) +#endif + { + _malloc_block_signals (&set, &oset); + blocked_sigs = 1; + } + + mlocation_register_alloc (file, line); tentry = find_entry (mem, FIND_ALLOC); @@ -175,6 +189,8 @@ mregister_alloc (tag, mem, size, file, line) { /* oops. table is full. punt. */ fprintf (stderr, _("register_alloc: alloc table is full with FIND_ALLOC?\n")); + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); return; } @@ -194,6 +210,9 @@ mregister_alloc (tag, mem, size, file, line) if (tentry != &mem_overflow) table_allocated++; + + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); } void @@ -204,6 +223,18 @@ mregister_free (mem, size, file, line) int line; { mr_table_t *tentry; + 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 (running_trap || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD)) +#endif + { + _malloc_block_signals (&set, &oset); + blocked_sigs = 1; + } tentry = find_entry (mem, FIND_EXIST); if (tentry == 0) @@ -212,6 +243,8 @@ mregister_free (mem, size, file, line) #if 0 fprintf (stderr, "register_free: %p not in allocation table?\n", mem); #endif + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); return; } if (tentry->flags & MT_FREE) @@ -228,6 +261,9 @@ mregister_free (mem, size, file, line) if (tentry != &mem_overflow) table_allocated--; + + if (blocked_sigs) + _malloc_unblock_signals (&set, &oset); } /* If we ever add more flags, this will require changes. */ @@ -254,7 +290,9 @@ _register_dump_table(fp) { entry = mem_table[i]; if (entry.mem) - fprintf (fp, "[%d] %p:%d:%s:%s:%s:%d:%d:%d\n", i, + fprintf (fp, "%s[%d] %p:%zu:%s:%s:%s:%d:%d:%d\n", + (i == table_bucket_index) ? "*" : "", + i, entry.mem, entry.size, _entry_flags(entry.flags), entry.func ? entry.func : "unknown", @@ -278,6 +316,105 @@ mregister_table_init () table_count = 0; } +/* Simple for now */ + +static ma_table_t * +find_location_entry (file, line) + const char *file; + int line; +{ + register ma_table_t *tp, *endp; + + endp = mlocation_table + location_table_count; + for (tp = mlocation_table; tp <= endp; tp++) + { + if (tp->line == line && STREQ (file, tp->file)) + return tp; + } + return (ma_table_t *)NULL; +} + +void +mlocation_register_alloc (file, line) + const char *file; + int line; +{ + ma_table_t *lentry; + const char *nfile; + + if (file == 0) + { + mlocation_table[0].nalloc++; + return; + } + + nfile = strrchr (file, '/'); + if (nfile) + nfile++; + else + nfile = file; + + lentry = find_location_entry (nfile, line); + if (lentry == 0) + { + location_table_index++; + if (location_table_index == REG_TABLE_SIZE) + location_table_index = 1; /* slot 0 reserved */ + lentry = mlocation_table + location_table_index; + lentry->file = nfile; + lentry->line = line; + lentry->nalloc = 1; + if (location_table_count < REG_TABLE_SIZE) + location_table_count++; /* clamp at REG_TABLE_SIZE for now */ + } + else + lentry->nalloc++; +} + +static void +_location_dump_table (fp) + FILE *fp; +{ + register ma_table_t *tp, *endp; + + endp = mlocation_table + location_table_count; + for (tp = mlocation_table; tp < endp; tp++) + fprintf (fp, "%s:%d\t%d\n", tp->file ? tp->file : "unknown", + tp->line ? tp->line : 0, + tp->nalloc); +} + +void +mlocation_dump_table () +{ + _location_dump_table (stderr); +} + +#define LOCROOT "/var/tmp/maltrace/locations." + +void +mlocation_write_table () +{ + FILE *fp; + char defname[sizeof (LOCROOT) + 64]; + + fp = _imalloc_fopen ((char *)NULL, (char *)NULL, LOCROOT, defname, sizeof (defname)); + if (fp == 0) + return; /* XXX - no error message yet */ + _location_dump_table (fp); + fclose (fp); +} + +void +mlocation_table_init () +{ + memset (mlocation_table, 0, sizeof (ma_table_t) * REG_TABLE_SIZE); + mlocation_table[0].file = ""; /* reserve slot 0 for unknown locations */ + mlocation_table[0].line = 0; + mlocation_table[0].nalloc = 0; + location_table_count = 1; +} + #endif /* MALLOC_REGISTER */ int diff --git a/lib/malloc/table.h b/lib/malloc/table.h index 41ce9f7..92866cf 100644 --- a/lib/malloc/table.h +++ b/lib/malloc/table.h @@ -1,6 +1,6 @@ /* table.h - definitions for tables for keeping track of allocated memory */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -57,12 +57,23 @@ typedef struct mr_table { #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 mr_table_t *mr_table_entry PARAMS((PTR_T)); +extern void mregister_alloc PARAMS((const char *, PTR_T, size_t, const char *, int)); +extern void mregister_free PARAMS((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)); +extern void mregister_dump_table PARAMS((void)); +extern void mregister_table_init PARAMS((void)); + +typedef struct ma_table { + const char *file; + int line; + int nalloc; +} ma_table_t; + +extern void mlocation_register_alloc PARAMS((const char *, int)); +extern void mlocation_table_init PARAMS((void)); +extern void mlocation_dump_table PARAMS((void)); +extern void mlocation_write_table PARAMS((void)); /* NOTE: HASH_MIX taken from dmalloc (http://dmalloc.com) */ diff --git a/lib/malloc/trace.c b/lib/malloc/trace.c index 6d93f99..391ca9d 100644 --- a/lib/malloc/trace.c +++ b/lib/malloc/trace.c @@ -1,6 +1,6 @@ /* trace.c - tracing functions for malloc */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,7 +35,7 @@ static int _mtrace_verbose = 0; #ifdef MALLOC_TRACE -extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t)); +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); FILE *_mtrace_fp = NULL; extern char _malloc_trace_buckets[]; @@ -52,10 +52,10 @@ mtrace_alloc (tag, mem, size, file, line) _mtrace_fp = stderr; if (_mtrace_verbose) - fprintf (_mtrace_fp, "alloc: %s: %p (%d bytes) from '%s:%d'\n", + fprintf (_mtrace_fp, "alloc: %s: %p (%zu bytes) from '%s:%d'\n", tag, mem, size, file ? file : "unknown", line); else - fprintf (_mtrace_fp, "alloc:%p:%d:%s:%d\n", + fprintf (_mtrace_fp, "alloc:%p:%zu:%s:%d\n", mem, size, file ? file : "unknown", line); } diff --git a/lib/malloc/watch.h b/lib/malloc/watch.h index 6782acc..2a0f497 100644 --- a/lib/malloc/watch.h +++ b/lib/malloc/watch.h @@ -1,6 +1,6 @@ /* watch.h - definitions for tables for keeping track of allocated memory */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -34,7 +34,7 @@ extern int _malloc_nwatch; -extern void _malloc_ckwatch __P((PTR_T, const char *, int, int, unsigned long)); +extern void _malloc_ckwatch PARAMS((PTR_T, const char *, int, int, unsigned long)); #endif /* MALLOC_WATCH */ diff --git a/lib/readline/Makefile.in b/lib/readline/Makefile.in index 2204628..3b16139 100644 --- a/lib/readline/Makefile.in +++ b/lib/readline/Makefile.in @@ -4,7 +4,7 @@ # # ############################################################################# -# Copyright (C) 1994-2009 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 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 @@ -28,7 +28,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_VERSION = @PACKAGE_VERSION@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ @@ -52,8 +52,11 @@ SHELL = @MAKE_SHELL@ ETAGS = etags -tw CTAGS = ctags -tw +DEBUG = @DEBUG@ + CFLAGS = @CFLAGS@ -LOCAL_CFLAGS = @LOCAL_CFLAGS@ +LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} +STYLE_CFLAGS = @STYLE_CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @@ -62,7 +65,8 @@ 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) +CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} \ + $(STYLE_CFLAGS) $(LOCAL_CFLAGS) $(CFLAGS) ${ADDON_CFLAGS} .c.o: ${RM} $@ @@ -83,21 +87,24 @@ CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.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 + $(srcdir)/colors.c $(srcdir)/parse-colors.c \ + $(srcdir)/mbutil.c $(srcdir)/xfree.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 + rltypedefs.h rlmbutil.h colors.h parse-colors.h HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o savestring.o \ mbutil.o TILDEOBJ = tilde.o +COLORSOBJ = colors.o parse-colors.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 + text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) $(COLORSOBJ) \ + xmalloc.o xfree.o compat.o # The texinfo files which document this library. DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo @@ -123,9 +130,9 @@ libreadline.a: $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS) -test -n "$(RANLIB)" && $(RANLIB) $@ -libhistory.a: $(HISTOBJ) xmalloc.o +libhistory.a: $(HISTOBJ) xmalloc.o xfree.o $(RM) $@ - $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o + $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o -test -n "$(RANLIB)" && $(RANLIB) $@ documentation: force @@ -172,10 +179,12 @@ 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 +compat.o: ${BUILD_DIR}/config.h +compat.o: rlstdc.h rltypedefs.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 +complete.o: colors.h display.o: ansi_stdlib.h posixstat.h display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h display.o: tcap.h @@ -233,6 +242,7 @@ 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 +savestring.o: ${BUILD_DIR}/config.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 @@ -262,6 +272,15 @@ 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 +xfree.o: ${BUILD_DIR}/config.h ansi_stdlib.h + +colors.o: ${BUILD_DIR}/config.h colors.h +colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h +colors.o: rlconf.h +colors.o: ansi_stdlib.h posixstat.h +parse-colors.o: ${BUILD_DIR}/config.h colors.h parse-colors.h +parse-colors.o: rldefs.h rlconf.h +parse-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h bind.o: rlshell.h histfile.o: rlshell.h @@ -292,6 +311,8 @@ text.o: rlprivate.h undo.o: rlprivate.h util.o: rlprivate.h vi_mode.o: rlprivate.h +colors.o: rlprivate.h +parse-colors.o: rlprivate.h bind.o: xmalloc.h complete.o: xmalloc.h @@ -317,7 +338,10 @@ tilde.o: xmalloc.h undo.o: xmalloc.h util.o: xmalloc.h vi_mode.o: xmalloc.h +xfree.o: xmalloc.h xmalloc.o: xmalloc.h +colors.o: xmalloc.h +parse-colors.o: xmalloc.h complete.o: rlmbutil.h display.o: rlmbutil.h @@ -330,6 +354,8 @@ readline.o: rlmbutil.h search.o: rlmbutil.h text.o: rlmbutil.h vi_mode.o: rlmbutil.h +colors.o: rlmbutil.h +parse-colors.o: rlmbutil.h # Rules for deficient makes, like SunOS and Solaris bind.o: bind.c @@ -359,8 +385,12 @@ tilde.o: tilde.c undo.o: undo.c util.o: util.c vi_mode.o: vi_mode.c +xfree.o: xfree.c xmalloc.o: xmalloc.c +colors.o: colors.c +parse-colors.o: parse-colors.c + histexpand.o: histexpand.c histfile.o: histfile.c history.o: history.c diff --git a/lib/readline/bind.c b/lib/readline/bind.c index fc8c2a2..971116a 100644 --- a/lib/readline/bind.c +++ b/lib/readline/bind.c @@ -1,6 +1,6 @@ /* bind.c -- key binding and startup file support for the readline library. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 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. @@ -72,20 +72,47 @@ extern char *strchr (), *strrchr (); /* 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 int _rl_skip_to_delim (char *, int, int); -static char *_rl_get_string_variable_value PARAMS((const char *)); -static int substring_member_of_array PARAMS((const char *, const char * const *)); +#if defined (USE_VARARGS) && defined (PREFER_STDARG) +static void _rl_init_file_error (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +#else +static void _rl_init_file_error (); +#endif + +static rl_command_func_t *_rl_function_of_keyseq_internal (const char *, size_t, Keymap, int *); + +static char *_rl_read_file (char *, size_t *); +static int _rl_read_init_file (const char *, int); +static int glean_key_from_name (char *); + +static int find_boolean_var (const char *); +static int find_string_var (const char *); + +static const char *boolean_varname (int); +static const char *string_varname (int); + +static char *_rl_get_string_variable_value (const char *); +static int substring_member_of_array (const char *, const char * const *); + +static int _rl_get_keymap_by_name (const char *); +static int _rl_get_keymap_by_map (Keymap); static int currently_reading_init_file; /* used only in this file */ static int _rl_prefer_visible_bell = 1; +#define OP_EQ 1 +#define OP_NE 2 +#define OP_GT 3 +#define OP_GE 4 +#define OP_LT 5 +#define OP_LE 6 + +#define OPSTART(c) ((c) == '=' || (c) == '!' || (c) == '<' || (c) == '>') +#define CMPSTART(c) ((c) == '=' || (c) == '!') + /* **************************************************************** */ /* */ /* Binding keys */ @@ -96,10 +123,7 @@ static int _rl_prefer_visible_bell = 1; 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; +rl_add_defun (const char *name, rl_command_func_t *function, int key) { if (key != -1) rl_bind_key (key, function); @@ -109,13 +133,15 @@ rl_add_defun (name, function, key) /* 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; +rl_bind_key (int key, rl_command_func_t *function) { - if (key < 0) + char keyseq[4]; + int l; + + if (key < 0 || key > largest_char) return (key); + /* Want to make this a multi-character key sequence with an ESC prefix */ if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii) { if (_rl_keymap[ESC].type == ISKMAP) @@ -128,11 +154,46 @@ rl_bind_key (key, function) escmap[key].function = function; return (0); } - return (key); + + /* Otherwise, let's just let rl_generic_bind handle the key sequence. + We start it off with ESC here and let the code below add the rest + of the sequence. */ + keyseq[0] = ESC; + l = 1; + key = UNMETA(key); + goto bind_keyseq; } - _rl_keymap[key].type = ISFUNC; - _rl_keymap[key].function = function; + /* If it's bound to a function or macro, just overwrite. Otherwise we have + to treat it as a key sequence so rl_generic_bind handles shadow keymaps + for us. If we are binding '\' or \C-@ (NUL) make sure to escape it so + it makes it through the call to rl_translate_keyseq. */ + if (_rl_keymap[key].type != ISKMAP) + { + if (_rl_keymap[key].type == ISMACR) + xfree ((char *)_rl_keymap[key].function); + _rl_keymap[key].type = ISFUNC; + _rl_keymap[key].function = function; + } + else + { + l = 0; +bind_keyseq: + if (key == '\\') + { + keyseq[l++] = '\\'; + keyseq[l++] = '\\'; + } + else if (key == '\0') + { + keyseq[l++] = '\\'; + keyseq[l++] = '0'; + } + else + keyseq[l++] = key; + keyseq[l] = '\0'; + rl_bind_keyseq (keyseq, function); + } rl_binding_keymap = _rl_keymap; return (0); } @@ -140,10 +201,7 @@ rl_bind_key (key, function) /* 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; +rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) { int result; Keymap oldmap; @@ -156,57 +214,44 @@ rl_bind_key_in_map (key, 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. */ + now, this is always used to attempt to bind the arrow keys. */ int -rl_bind_key_if_unbound_in_map (key, default_func, kmap) - int key; - rl_command_func_t *default_func; - Keymap kmap; +rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *default_func, Keymap kmap) { - char keyseq[2]; + char *keyseq; - keyseq[0] = (unsigned char)key; - keyseq[1] = '\0'; + keyseq = rl_untranslate_keyseq ((unsigned char)key); 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; +rl_bind_key_if_unbound (int key, rl_command_func_t *default_func) { - char keyseq[2]; + char *keyseq; - keyseq[0] = (unsigned char)key; - keyseq[1] = '\0'; + keyseq = rl_untranslate_keyseq ((unsigned char)key); 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. */ + Returns non-zero in case of error. This is not the same as self-insert; + this makes it a dead key. */ int -rl_unbind_key (key) - int key; +rl_unbind_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. */ +/* 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; +rl_unbind_key_in_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; +rl_unbind_function_in_map (rl_command_func_t *func, Keymap map) { register int i, rval; @@ -217,14 +262,20 @@ rl_unbind_function_in_map (func, map) map[i].function = (rl_command_func_t *)NULL; rval = 1; } + else if (map[i].type == ISKMAP) /* TAG:readline-8.1 */ + { + int r; + r = rl_unbind_function_in_map (func, FUNCTION_TO_KEYMAP (map, i)); + if (r == 1) + rval = 1; + } } return rval; } +/* Unbind all keys bound to COMMAND, which is a bindable command name, in MAP */ int -rl_unbind_command_in_map (command, map) - const char *command; - Keymap map; +rl_unbind_command_in_map (const char *command, Keymap map) { rl_command_func_t *func; @@ -238,9 +289,7 @@ rl_unbind_command_in_map (command, map) 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; +rl_bind_keyseq (const char *keyseq, rl_command_func_t *function) { return (rl_generic_bind (ISFUNC, keyseq, (char *)function, _rl_keymap)); } @@ -249,20 +298,14 @@ rl_bind_keyseq (keyseq, function) 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; +rl_bind_keyseq_in_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; +rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) { return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map)); } @@ -271,16 +314,24 @@ rl_set_key (keyseq, function, map) 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_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *default_func, Keymap kmap) { rl_command_func_t *func; + char *keys; + int keys_len; if (keyseq) { - func = rl_function_of_keyseq (keyseq, kmap, (int *)NULL); + /* Handle key sequences that require translations and `raw' ones that + don't. This might be a problem with backslashes. */ + keys = (char *)xmalloc (1 + (2 * strlen (keyseq))); + if (rl_translate_keyseq (keyseq, keys, &keys_len)) + { + xfree (keys); + return -1; + } + func = rl_function_of_keyseq_len (keys, keys_len, kmap, (int *)NULL); + xfree (keys); #if defined (VI_MODE) if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode) #else @@ -294,9 +345,7 @@ rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap) } int -rl_bind_keyseq_if_unbound (keyseq, default_func) - const char *keyseq; - rl_command_func_t *default_func; +rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *default_func) { return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap)); } @@ -305,9 +354,7 @@ rl_bind_keyseq_if_unbound (keyseq, default_func) 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; +rl_macro_bind (const char *keyseq, const char *macro, Keymap map) { char *macro_keys; int macro_keys_len; @@ -329,16 +376,13 @@ rl_macro_bind (keyseq, macro, map) 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; +rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) { char *keys; - int keys_len; + int keys_len, prevkey, ic; register int i; KEYMAP_ENTRY k; + Keymap prevmap; k.function = 0; @@ -361,11 +405,16 @@ rl_generic_bind (type, keyseq, data, map) return -1; } + prevmap = map; + prevkey = keys[0]; + /* Bind keys, making new keymaps as necessary. */ for (i = 0; i < keys_len; i++) { unsigned char uc = keys[i]; - int ic; + + if (i > 0) + prevkey = ic; ic = uc; if (ic < 0 || ic >= KEYMAP_SIZE) @@ -374,12 +423,19 @@ rl_generic_bind (type, keyseq, data, map) return -1; } + /* We now rely on rl_translate_keyseq to do this conversion, so this + check is superfluous. */ +#if 0 if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) { ic = UNMETA (ic); if (map[ESC].type == ISKMAP) - map = FUNCTION_TO_KEYMAP (map, ESC); + { + prevmap = map; + map = FUNCTION_TO_KEYMAP (map, ESC); + } } +#endif if ((i + 1) < keys_len) { @@ -397,6 +453,7 @@ rl_generic_bind (type, keyseq, data, map) map[ic].type = ISKMAP; map[ic].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap()); } + prevmap = map; 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 @@ -412,10 +469,9 @@ rl_generic_bind (type, keyseq, data, map) } else { - if (map[ic].type == ISMACR) - xfree ((char *)map[ic].function); - else if (map[ic].type == ISKMAP) + if (map[ic].type == ISKMAP) { + prevmap = map; map = FUNCTION_TO_KEYMAP (map, ic); ic = ANYOTHERKEY; /* If we're trying to override a keymap with a null function @@ -426,13 +482,36 @@ rl_generic_bind (type, keyseq, data, map) if (type == ISFUNC && data == 0) data = (char *)_rl_null_function; } + if (map[ic].type == ISMACR) + xfree ((char *)map[ic].function); map[ic].function = KEYMAP_TO_FUNCTION (data); map[ic].type = type; } rl_binding_keymap = map; + } + + /* If we unbound a key (type == ISFUNC, data == 0), and the prev keymap + points to the keymap where we unbound the key (sanity check), and the + current binding keymap is empty (rl_empty_keymap() returns non-zero), + and the binding keymap has ANYOTHERKEY set with type == ISFUNC + (overridden function), delete the now-empty keymap, take the previously- + overridden function and remove the override. */ + /* Right now, this only works one level back. */ + if (type == ISFUNC && data == 0 && + prevmap[prevkey].type == ISKMAP && + (FUNCTION_TO_KEYMAP(prevmap, prevkey) == rl_binding_keymap) && + rl_binding_keymap[ANYOTHERKEY].type == ISFUNC && + rl_empty_keymap (rl_binding_keymap)) + { + prevmap[prevkey].type = rl_binding_keymap[ANYOTHERKEY].type; + prevmap[prevkey].function = rl_binding_keymap[ANYOTHERKEY].function; + rl_discard_keymap (rl_binding_keymap); + rl_binding_keymap = prevmap; + } + xfree (keys); return 0; } @@ -441,61 +520,40 @@ rl_generic_bind (type, keyseq, data, map) 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; +rl_translate_keyseq (const char *seq, char *array, int *len) { - register int i, c, l, temp; + register int i, l, temp; + int has_control, has_meta; + unsigned char c; - for (i = l = 0; c = seq[i]; i++) + has_control = 0; + has_meta = 0; + + /* When there are incomplete prefixes \C- or \M- (has_control || has_meta) + without base character at the end of SEQ, they are processed as the + prefixes for '\0'. + */ + for (i = l = 0; (c = seq[i]) || has_control || has_meta; i++) { - if (c == '\\') + /* Only backslashes followed by a non-null character are handled + specially. Trailing backslash (backslash followed by '\0') is + processed as a normal character. + */ + if (c == '\\' && seq[i + 1] != '\0') { c = seq[++i]; - if (c == 0) - break; - /* Handle \C- and \M- prefixes. */ - if ((c == 'C' || c == 'M') && seq[i + 1] == '-') + if (c == 'C' && 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])); - } + i++; + has_control = 1; + continue; + } + else if (c == 'M' && seq[i + 1] == '-') + { + i++; + has_meta = 1; continue; } @@ -506,42 +564,42 @@ rl_translate_keyseq (seq, array, len) switch (c) { case 'a': - array[l++] = '\007'; + c = '\007'; break; case 'b': - array[l++] = '\b'; + c = '\b'; break; case 'd': - array[l++] = RUBOUT; /* readline-specific */ + c = RUBOUT; /* readline-specific */ break; case 'e': - array[l++] = ESC; + c = ESC; break; case 'f': - array[l++] = '\f'; + c = '\f'; break; case 'n': - array[l++] = NEWLINE; + c = NEWLINE; break; case 'r': - array[l++] = RETURN; + c = RETURN; break; case 't': - array[l++] = TAB; + c = TAB; break; case 'v': - array[l++] = 0x0B; + c = 0x0B; break; case '\\': - array[l++] = '\\'; + c = '\\'; 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++) + for (temp = 2, c -= '0'; ISOCTAL ((unsigned char)seq[i]) && temp--; i++) c = (c * 8) + OCTVALUE (seq[i]); i--; /* auto-increment in for loop */ - array[l++] = c & largest_char; + c &= largest_char; break; case 'x': i++; @@ -550,16 +608,40 @@ rl_translate_keyseq (seq, array, len) if (temp == 2) c = 'x'; i--; /* auto-increment in for loop */ - array[l++] = c & largest_char; + c &= largest_char; break; default: /* backslashes before non-special chars just add the char */ - array[l++] = c; + c &= largest_char; break; /* the backslash is stripped */ } - continue; } - array[l++] = c; + /* Process \C- and \M- flags */ + if (has_control) + { + /* Special treatment for C-? */ + c = (c == '?') ? RUBOUT : CTRL (_rl_to_upper (c)); + has_control = 0; + } + if (has_meta) + { + c = META (c); + has_meta = 0; + } + + /* If convert-meta is turned on, convert a meta char to a key sequence */ + if (META_CHAR (c) && _rl_convert_meta_chars_to_ascii) + { + array[l++] = ESC; /* ESC is meta-prefix */ + array[l++] = UNMETA (c); + } + else + array[l++] = (c); + + /* Null characters may be processed for incomplete prefixes at the end of + sequence */ + if (seq[i] == '\0') + break; } *len = l; @@ -567,9 +649,40 @@ rl_translate_keyseq (seq, array, len) return (0); } +static int +_rl_isescape (int c) +{ + switch (c) + { + case '\007': + case '\b': + case '\f': + case '\n': + case '\r': + case TAB: + case 0x0b: return (1); + default: return (0); + } +} + +static int +_rl_escchar (int c) +{ + switch (c) + { + case '\007': return ('a'); + case '\b': return ('b'); + case '\f': return ('f'); + case '\n': return ('n'); + case '\r': return ('r'); + case TAB: return ('t'); + case 0x0b: return ('v'); + default: return (c); + } +} + char * -rl_untranslate_keyseq (seq) - int seq; +rl_untranslate_keyseq (int seq) { static char kseq[16]; int i, c; @@ -618,9 +731,8 @@ rl_untranslate_keyseq (seq) return kseq; } -static char * -_rl_untranslate_macro_value (seq) - char *seq; +char * +_rl_untranslate_macro_value (char *seq, int use_escapes) { char *ret, *r, *s; int c; @@ -644,9 +756,14 @@ _rl_untranslate_macro_value (seq) else if (CTRL_CHAR (c)) { *r++ = '\\'; - *r++ = 'C'; - *r++ = '-'; - c = _rl_to_lower (UNCTRL (c)); + if (use_escapes && _rl_isescape (c)) + c = _rl_escchar (c); + else + { + *r++ = 'C'; + *r++ = '-'; + c = _rl_to_lower (UNCTRL (c)); + } } else if (c == RUBOUT) { @@ -672,10 +789,9 @@ _rl_untranslate_macro_value (seq) /* Return a pointer to the function that STRING represents. If STRING doesn't have a matching function, then a NULL pointer - is returned. */ + is returned. The string match is case-insensitive. */ rl_command_func_t * -rl_named_function (string) - const char *string; +rl_named_function (const char *string) { register int i; @@ -692,18 +808,15 @@ rl_named_function (string) 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; +static rl_command_func_t * +_rl_function_of_keyseq_internal (const char *keyseq, size_t len, Keymap map, int *type) { register int i; if (map == 0) map = _rl_keymap; - for (i = 0; keyseq && keyseq[i]; i++) + for (i = 0; keyseq && i < len; i++) { unsigned char ic = keyseq[i]; @@ -729,7 +842,7 @@ rl_function_of_keyseq (keyseq, map, type) { /* If this is the last key in the key sequence, return the map. */ - if (keyseq[i + 1] == '\0') + if (i + 1 == len) { if (type) *type = ISKMAP; @@ -742,9 +855,9 @@ rl_function_of_keyseq (keyseq, map, type) /* 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]) + else if (map[ic].type != ISKMAP && i+1 < len) return ((rl_command_func_t *)NULL); - else /* map[ic].type != ISKMAP && keyseq[i+1] == 0 */ + else /* map[ic].type != ISKMAP && i+1 == len */ { if (type) *type = map[ic].type; @@ -755,6 +868,97 @@ rl_function_of_keyseq (keyseq, map, type) return ((rl_command_func_t *) NULL); } +rl_command_func_t * +rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) +{ + return _rl_function_of_keyseq_internal (keyseq, strlen (keyseq), map, type); +} + +rl_command_func_t * +rl_function_of_keyseq_len (const char *keyseq, size_t len, Keymap map, int *type) +{ + return _rl_function_of_keyseq_internal (keyseq, len, map, type); +} + +/* Assuming there is a numeric argument at the beginning of KEYSEQ (the + caller is responsible for checking), return the index of the portion of + the key sequence following the numeric argument. If there's no numeric + argument (?), or if KEYSEQ consists solely of a numeric argument (?), + return -1. */ +int +rl_trim_arg_from_keyseq (const char *keyseq, size_t len, Keymap map) +{ + register int i, j, parsing_digits; + unsigned char ic; + Keymap map0; + + if (map == 0) + map = _rl_keymap; + map0 = map; + + /* The digits following the initial one (e.g., the binding to digit-argument) + or the optional `-' in a binding to digit-argument or universal-argument + are not added to rl_executing_keyseq. This is basically everything read by + rl_digit_loop. The parsing_digits logic is here in case they ever are. */ + for (i = j = parsing_digits = 0; keyseq && i < len; i++) + { + ic = keyseq[i]; + + if (parsing_digits) + { + if (_rl_digit_p (ic)) + { + j = i + 1; + continue; + } + parsing_digits = 0; + } + + if (map[ic].type == ISKMAP) + { + if (i + 1 == len) + return -1; + map = FUNCTION_TO_KEYMAP (map, ic); + continue; + } + if (map[ic].type == ISFUNC) + { +#if defined (VI_MODE) + if (map[ic].function != rl_digit_argument && map[ic].function != rl_universal_argument && map[ic].function != rl_vi_arg_digit) +#else + if (map[ic].function != rl_digit_argument && map[ic].function != rl_universal_argument) +#endif + return (j); + + /* We don't bother with a keyseq that is only a numeric argument */ + if (i + 1 == len) + return -1; + + parsing_digits = 1; + + /* This logic should be identical to rl_digit_loop */ + /* We accept M-- as equivalent to M--1, C-u- as equivalent to C-u-1 + but set parsing_digits to 2 to note that we saw `-' */ + if (map[ic].function == rl_universal_argument && (i + 1 == '-')) + { + i++; + parsing_digits = 2; + } + if (map[ic].function == rl_digit_argument && ic == '-') + { + parsing_digits = 2; + } + + map = map0; + j = i + 1; + } + } + + /* If we're still parsing digits by the time we get here, we don't allow a + key sequence that consists solely of a numeric argument */ + return -1; +} + /* The last key bindings file read. */ static char *last_readline_init_file = (char *)NULL; @@ -767,17 +971,20 @@ static int current_readline_init_lineno; 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; +_rl_read_file (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 = -1; + if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0)) + { + if (file >= 0) + close (file); + return ((char *)NULL); + } file_size = (size_t)finfo.st_size; @@ -814,8 +1021,7 @@ _rl_read_file (filename, sizep) /* Re-read the current keybindings file. */ int -rl_re_read_init_file (count, ignore) - int count, ignore; +rl_re_read_init_file (int count, int ignore) { int r; r = rl_read_init_file ((const char *)NULL); @@ -832,8 +1038,7 @@ rl_re_read_init_file (count, ignore) 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; +rl_read_init_file (const char *filename) { /* Default the filename. */ if (filename == 0) @@ -858,9 +1063,7 @@ rl_read_init_file (filename) } static int -_rl_read_init_file (filename, include_level) - const char *filename; - int include_level; +_rl_read_init_file (const char *filename, int include_level) { register int i; char *buffer, *openname, *line, *end; @@ -926,14 +1129,91 @@ _rl_read_init_file (filename, include_level) } static void -_rl_init_file_error (msg) - const char *msg; +#if defined (PREFER_STDARG) +_rl_init_file_error (const char *format, ...) +#else +_rl_init_file_error (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: "); 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); + fprintf (stderr, "%s: line %d: ", current_readline_init_file, + current_readline_init_lineno); + + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); + fflush (stderr); + + va_end (args); +} + +/* **************************************************************** */ +/* */ +/* Parser Helper Functions */ +/* */ +/* **************************************************************** */ + +static int +parse_comparison_op (s, indp) + const char *s; + int *indp; +{ + int i, peekc, op; + + if (OPSTART (s[*indp]) == 0) + return -1; + i = *indp; + peekc = s[i] ? s[i+1] : 0; + op = -1; + + if (s[i] == '=') + { + op = OP_EQ; + if (peekc == '=') + i++; + i++; + } + else if (s[i] == '!' && peekc == '=') + { + op = OP_NE; + i += 2; + } + else if (s[i] == '<' && peekc == '=') + { + op = OP_LE; + i += 2; + } + else if (s[i] == '>' && peekc == '=') + { + op = OP_GE; + i += 2; + } + else if (s[i] == '<') + { + op = OP_LT; + i += 1; + } + else if (s[i] == '>') + { + op = OP_GT; + i += 1; + } + + *indp = i; + return op; } /* **************************************************************** */ @@ -942,7 +1222,7 @@ _rl_init_file_error (msg) /* */ /* **************************************************************** */ -typedef int _rl_parser_func_t PARAMS((char *)); +typedef int _rl_parser_func_t (char *); /* Things that mean `Control'. */ const char * const _rl_possible_control_prefixes[] = { @@ -953,6 +1233,12 @@ const char * const _rl_possible_meta_prefixes[] = { "Meta", "M-", (const char *)NULL }; +/* Forward declarations */ +static int parser_if (char *); +static int parser_else (char *); +static int parser_endif (char *); +static int parser_include (char *); + /* Conditionals. */ /* Calling programs set this to have their argv[0]. */ @@ -966,10 +1252,11 @@ static int if_stack_size; /* Push _rl_parsing_conditionalized_out, and set parser state based on ARGS. */ static int -parser_if (args) - char *args; +parser_if (char *args) { - register int i; + int i, llen, boolvar, strvar; + + boolvar = strvar = -1; /* Push parser state. */ if (if_stack_depth + 1 >= if_stack_size) @@ -986,6 +1273,8 @@ parser_if (args) if (_rl_parsing_conditionalized_out) return 0; + llen = strlen (args); + /* Isolate first argument. */ for (i = 0; args[i] && !whitespace (args[i]); i++); @@ -1028,10 +1317,139 @@ parser_if (args) _rl_parsing_conditionalized_out = mode != rl_editing_mode; } #endif /* VI_MODE */ + else if (_rl_strnicmp (args, "version", 7) == 0) + { + int rlversion, versionarg, op, previ, major, minor, opresult; + + _rl_parsing_conditionalized_out = 1; + rlversion = RL_VERSION_MAJOR*10 + RL_VERSION_MINOR; + /* if "version" is separated from the operator by whitespace, or the + operand is separated from the operator by whitespace, restore it. + We're more liberal with allowed whitespace for this variable. */ + if (i > 0 && i <= llen && args[i-1] == '\0') + args[i-1] = ' '; + args[llen] = '\0'; /* just in case */ + for (i = 7; whitespace (args[i]); i++) + ; + if (OPSTART(args[i]) == 0) + { + _rl_init_file_error ("comparison operator expected, found `%s'", args[i] ? args + i : "end-of-line"); + return 0; + } + previ = i; + op = parse_comparison_op (args, &i); + if (op <= 0) + { + _rl_init_file_error ("comparison operator expected, found `%s'", args+previ); + return 0; + } + for ( ; args[i] && whitespace (args[i]); i++) + ; + if (args[i] == 0 || _rl_digit_p (args[i]) == 0) + { + _rl_init_file_error ("numeric argument expected, found `%s'", args+i); + return 0; + } + major = minor = 0; + previ = i; + for ( ; args[i] && _rl_digit_p (args[i]); i++) + major = major*10 + _rl_digit_value (args[i]); + if (args[i] == '.') + { + if (args[i + 1] && _rl_digit_p (args [i + 1]) == 0) + { + _rl_init_file_error ("numeric argument expected, found `%s'", args+previ); + return 0; + } + for (++i; args[i] && _rl_digit_p (args[i]); i++) + minor = minor*10 + _rl_digit_value (args[i]); + } + /* optional - check for trailing garbage on the line, allow whitespace + and a trailing comment */ + previ = i; + for ( ; args[i] && whitespace (args[i]); i++) + ; + if (args[i] && args[i] != '#') + { + _rl_init_file_error ("trailing garbage on line: `%s'", args+previ); + return 0; + } + versionarg = major*10 + minor; + + switch (op) + { + case OP_EQ: + opresult = rlversion == versionarg; + break; + case OP_NE: + opresult = rlversion != versionarg; + break; + case OP_GT: + opresult = rlversion > versionarg; + break; + case OP_GE: + opresult = rlversion >= versionarg; + break; + case OP_LT: + opresult = rlversion < versionarg; + break; + case OP_LE: + opresult = rlversion <= versionarg; + break; + } + _rl_parsing_conditionalized_out = 1 - opresult; + } /* 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 if ((boolvar = find_boolean_var (args)) >= 0 || (strvar = find_string_var (args)) >= 0) + { + int op, previ; + size_t vlen; + const char *vname; + char *valuearg, *vval, prevc; + + _rl_parsing_conditionalized_out = 1; + vname = (boolvar >= 0) ? boolean_varname (boolvar) : string_varname (strvar); + vlen = strlen (vname); + if (i > 0 && i <= llen && args[i-1] == '\0') + args[i-1] = ' '; + args[llen] = '\0'; /* just in case */ + for (i = vlen; whitespace (args[i]); i++) + ; + if (CMPSTART(args[i]) == 0) + { + _rl_init_file_error ("equality comparison operator expected, found `%s'", args[i] ? args + i : "end-of-line"); + return 0; + } + previ = i; + op = parse_comparison_op (args, &i); + if (op != OP_EQ && op != OP_NE) + { + _rl_init_file_error ("equality comparison operator expected, found `%s'", args+previ); + return 0; + } + for ( ; args[i] && whitespace (args[i]); i++) + ; + if (args[i] == 0) + { + _rl_init_file_error ("argument expected, found `%s'", args+i); + return 0; + } + previ = i; + valuearg = args + i; + for ( ; args[i] && whitespace (args[i]) == 0; i++) + ; + prevc = args[i]; + args[i] = '\0'; /* null-terminate valuearg */ + vval = rl_variable_value (vname); + if (op == OP_EQ) + _rl_parsing_conditionalized_out = _rl_stricmp (vval, valuearg) != 0; + else if (op == OP_NE) + _rl_parsing_conditionalized_out = _rl_stricmp (vval, valuearg) == 0; + args[i] = prevc; + } else _rl_parsing_conditionalized_out = 1; return 0; @@ -1039,8 +1457,7 @@ parser_if (args) /* Invert the current parser state if there is anything on the stack. */ static int -parser_else (args) - char *args; +parser_else (char *args) { register int i; @@ -1070,8 +1487,7 @@ parser_else (args) /* Terminate a conditional, popping the value of _rl_parsing_conditionalized_out from the stack. */ static int -parser_endif (args) - char *args; +parser_endif (char *args) { if (if_stack_depth) _rl_parsing_conditionalized_out = if_stack[--if_stack_depth]; @@ -1081,8 +1497,7 @@ parser_endif (args) } static int -parser_include (args) - char *args; +parser_include (char *args) { const char *old_init_file; char *e; @@ -1122,8 +1537,7 @@ static const struct { /* Handle a parser directive. STATEMENT is the line of the directive without any leading `$'. */ static int -handle_parser_directive (statement) - char *statement; +handle_parser_directive (char *statement) { register int i; char *directive, *args; @@ -1153,26 +1567,55 @@ handle_parser_directive (statement) } /* display an error message about the unknown parser directive */ - _rl_init_file_error ("unknown parser directive"); + _rl_init_file_error ("%s: unknown parser directive", directive); return (1); } +/* Start at STRING[START] and look for DELIM. Return I where STRING[I] == + DELIM or STRING[I] == 0. DELIM is usually a double quote. */ +static int +_rl_skip_to_delim (char *string, int start, int delim) +{ + int i, c, passc; + + for (i = start,passc = 0; c = string[i]; i++) + { + if (passc) + { + passc = 0; + if (c == 0) + break; + continue; + } + + if (c == '\\') + { + passc = 1; + continue; + } + + if (c == delim) + break; + } + + return i; +} + /* 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; +rl_parse_and_bind (char *string) { char *funname, *kname; register int c, i; - int key, equivalency; + int key, equivalency, foundmod, foundsep; while (string && whitespace (*string)) string++; - if (!string || !*string || *string == '#') + if (string == 0 || *string == 0 || *string == '#') return 0; /* If this is a parser directive, act on it. */ @@ -1192,38 +1635,31 @@ rl_parse_and_bind (string) 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; - } + i = _rl_skip_to_delim (string, 1, '"'); - 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"); + _rl_init_file_error ("%s: no closing `\"' in key binding", string); return 1; } + else + i++; /* skip past closing double quote */ } /* Advance to the colon (:) or whitespace which separates the two objects. */ for (; (c = string[i]) && c != ':' && c != ' ' && c != '\t'; i++ ); + if (i == 0) + { + _rl_init_file_error ("`%s': invalid key binding: missing key sequence", string); + return 1; + } + equivalency = (c == ':' && string[i + 1] == '='); + foundsep = c != 0; + /* Mark the end of the command (or keyname). */ if (string[i]) string[i++] = '\0'; @@ -1236,6 +1672,7 @@ rl_parse_and_bind (string) if (_rl_stricmp (string, "set") == 0) { char *var, *value, *e; + int s; var = string + i; /* Make VAR point to start of variable name. */ @@ -1243,23 +1680,46 @@ rl_parse_and_bind (string) /* Make VALUE point to start of value string. */ value = var; - while (*value && !whitespace (*value)) value++; + while (*value && whitespace (*value) == 0) 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) + /* Strip trailing whitespace from values of boolean variables. */ + if (find_boolean_var (var) >= 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'; + /* just read a whitespace-delimited word or empty string */ + for (e = value; *e && whitespace (*e) == 0; e++) + ; + if (e > value) + *e = '\0'; /* cut off everything trailing */ + } + else if ((i = find_string_var (var)) >= 0) + { + /* Allow quoted strings in variable values */ + if (*value == '"') + { + i = _rl_skip_to_delim (value, 1, *value); + value[i] = '\0'; + value++; /* skip past the quote */ + } + else + { + /* 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'; + } + } + else + { + /* avoid calling rl_variable_bind just to find this out */ + _rl_init_file_error ("%s: unknown variable name", var); + return 1; } rl_variable_bind (var, value); @@ -1282,32 +1742,18 @@ rl_parse_and_bind (string) the quoted string delimiter, like the shell. */ if (*funname == '\'' || *funname == '"') { - int delimiter, passc; - - delimiter = string[i++]; - for (passc = 0; c = string[i]; i++) + i = _rl_skip_to_delim (string, i+1, *funname); + if (string[i]) + i++; + else { - if (passc) - { - passc = 0; - continue; - } - - if (c == '\\') - { - passc = 1; - continue; - } - - if (c == delimiter) - break; + _rl_init_file_error ("`%s': missing closing quote for macro", funname); + return 1; } - if (c) - i++; } /* Advance to the end of the string. */ - for (; string[i] && !whitespace (string[i]); i++); + for (; string[i] && whitespace (string[i]) == 0; i++); /* No extra whitespace at the end of the string. */ string[i] = '\0'; @@ -1319,6 +1765,12 @@ rl_parse_and_bind (string) return 0; } + if (foundsep == 0) + { + _rl_init_file_error ("%s: no key sequence terminator", string); + return 1; + } + /* 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 == '"') @@ -1367,7 +1819,7 @@ rl_parse_and_bind (string) /* Get the actual character we want to deal with. */ kname = strrchr (string, '-'); - if (!kname) + if (kname == 0) kname = string; else kname++; @@ -1375,11 +1827,24 @@ rl_parse_and_bind (string) key = glean_key_from_name (kname); /* Add in control and meta bits. */ + foundmod = 0; if (substring_member_of_array (string, _rl_possible_control_prefixes)) - key = CTRL (_rl_to_upper (key)); + { + key = CTRL (_rl_to_upper (key)); + foundmod = 1; + } if (substring_member_of_array (string, _rl_possible_meta_prefixes)) - key = META (key); + { + key = META (key); + foundmod = 1; + } + + if (foundmod == 0 && kname != string) + { + _rl_init_file_error ("%s: unknown key modifier", string); + return 1; + } /* Temporary. Handle old-style keyname with macro-binding. */ if (*funname == '\'' || *funname == '"') @@ -1406,6 +1871,7 @@ rl_parse_and_bind (string) #endif /* PREFIX_META_HACK */ else rl_bind_key (key, rl_named_function (funname)); + return 0; } @@ -1423,10 +1889,17 @@ static const struct { { "bind-tty-special-chars", &_rl_bind_stty_chars, 0 }, { "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL }, { "byte-oriented", &rl_byte_oriented, 0 }, +#if defined (COLOR_SUPPORT) + { "colored-completion-prefix",&_rl_colored_completion_prefix, 0 }, + { "colored-stats", &_rl_colored_stats, 0 }, +#endif { "completion-ignore-case", &_rl_completion_case_fold, 0 }, + { "completion-map-case", &_rl_completion_case_map, 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-active-region", &_rl_enable_active_region, 0 }, + { "enable-bracketed-paste", &_rl_enable_bracketed_paste, V_SPECIAL }, { "enable-keypad", &_rl_enable_keypad, 0 }, { "enable-meta-key", &_rl_enable_meta, 0 }, { "expand-tilde", &rl_complete_with_tilde_expansion, 0 }, @@ -1437,6 +1910,7 @@ static const struct { { "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 }, + { "menu-complete-display-prefix", &_rl_menu_complete_prefix_first, 0 }, { "meta-flag", &_rl_meta_flag, 0 }, { "output-meta", &_rl_output_meta_chars, 0 }, { "page-completions", &_rl_page_completions, 0 }, @@ -1445,16 +1919,16 @@ static const struct { { "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 }, + { "show-mode-in-prompt", &_rl_show_mode_in_prompt, 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 } + { (char *)NULL, (int *)NULL, 0 } }; static int -find_boolean_var (name) - const char *name; +find_boolean_var (const char *name) { register int i; @@ -1464,12 +1938,17 @@ find_boolean_var (name) return -1; } +static const char * +boolean_varname (int i) +{ + return ((i >= 0) ? boolean_varlist[i].name : (char *)NULL); +} + /* 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; +hack_special_boolean_var (int i) { const char *name; @@ -1484,9 +1963,13 @@ hack_special_boolean_var (i) else _rl_bell_preference = AUDIBLE_BELL; } + else if (_rl_stricmp (name, "show-mode-in-prompt") == 0) + _rl_reset_prompt (); + else if (_rl_stricmp (name, "enable-bracketed-paste") == 0) + _rl_enable_active_region = _rl_enable_bracketed_paste; } -typedef int _rl_sv_func_t PARAMS((const char *)); +typedef int _rl_sv_func_t (const char *); /* These *must* correspond to the array indices for the appropriate string variable. (Though they're not used right now.) */ @@ -1500,34 +1983,47 @@ typedef int _rl_sv_func_t PARAMS((const char *)); #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 int sv_region_start_color (const char *); +static int sv_region_end_color (const char *); +static int sv_bell_style (const char *); +static int sv_combegin (const char *); +static int sv_dispprefix (const char *); +static int sv_compquery (const char *); +static int sv_compwidth (const char *); +static int sv_editmode (const char *); +static int sv_emacs_modestr (const char *); +static int sv_histsize (const char *); +static int sv_isrchterm (const char *); +static int sv_keymap (const char *); +static int sv_seqtimeout (const char *); +static int sv_viins_modestr (const char *); +static int sv_vicmd_modestr (const char *); static const struct { const char * const name; int flags; _rl_sv_func_t *set_func; } string_varlist[] = { + { "active-region-end-color", V_STRING, sv_region_end_color }, + { "active-region-start-color", V_STRING, sv_region_start_color }, { "bell-style", V_STRING, sv_bell_style }, { "comment-begin", V_STRING, sv_combegin }, + { "completion-display-width", V_INT, sv_compwidth }, { "completion-prefix-display-length", V_INT, sv_dispprefix }, { "completion-query-items", V_INT, sv_compquery }, { "editing-mode", V_STRING, sv_editmode }, + { "emacs-mode-string", V_STRING, sv_emacs_modestr }, { "history-size", V_INT, sv_histsize }, { "isearch-terminators", V_STRING, sv_isrchterm }, { "keymap", V_STRING, sv_keymap }, - { (char *)NULL, 0 } + { "keyseq-timeout", V_INT, sv_seqtimeout }, + { "vi-cmd-mode-string", V_STRING, sv_vicmd_modestr }, + { "vi-ins-mode-string", V_STRING, sv_viins_modestr }, + { (char *)NULL, 0, (_rl_sv_func_t *)0 } }; static int -find_string_var (name) - const char *name; +find_string_var (const char *name) { register int i; @@ -1537,12 +2033,17 @@ find_string_var (name) return -1; } +static const char * +string_varname (int i) +{ + return ((i >= 0) ? string_varlist[i].name : (char *)NULL); +} + /* 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 + the value is null or empty, `on' (case-insensitive), or "1". All other values result in 0 (false). */ static int -bool_to_int (value) - const char *value; +bool_to_int (const char *value) { return (value == 0 || *value == '\0' || (_rl_stricmp (value, "on") == 0) || @@ -1550,8 +2051,7 @@ bool_to_int (value) } char * -rl_variable_value (name) - const char *name; +rl_variable_value (const char *name) { register int i; @@ -1565,12 +2065,11 @@ rl_variable_value (name) return (_rl_get_string_variable_value (string_varlist[i].name)); /* Unknown variable names return NULL. */ - return 0; + return (char *)NULL; } int -rl_variable_bind (name, value) - const char *name, *value; +rl_variable_bind (const char *name, const char *value) { register int i; int v; @@ -1587,18 +2086,23 @@ rl_variable_bind (name, value) i = find_string_var (name); - /* For the time being, unknown variable names or string names without a - handler function are simply ignored. */ + /* For the time being, string names without a handler function are simply + ignored. */ if (i < 0 || string_varlist[i].set_func == 0) - return 0; + { + if (i < 0) + _rl_init_file_error ("%s: unknown variable name", name); + return 0; + } v = (*string_varlist[i].set_func) (value); + if (v != 0) + _rl_init_file_error ("%s: could not set value to `%s'", name, value); return v; } static int -sv_editmode (value) - const char *value; +sv_editmode (const char *value) { if (_rl_strnicmp (value, "vi", 2) == 0) { @@ -1618,8 +2122,7 @@ sv_editmode (value) } static int -sv_combegin (value) - const char *value; +sv_combegin (const char *value) { if (value && *value) { @@ -1631,8 +2134,7 @@ sv_combegin (value) } static int -sv_dispprefix (value) - const char *value; +sv_dispprefix (const char *value) { int nval = 0; @@ -1647,8 +2149,7 @@ sv_dispprefix (value) } static int -sv_compquery (value) - const char *value; +sv_compquery (const char *value) { int nval = 100; @@ -1663,24 +2164,38 @@ sv_compquery (value) } static int -sv_histsize (value) - const char *value; +sv_compwidth (const char *value) { - int nval = 500; + int nval = -1; + if (value && *value) + nval = atoi (value); + + _rl_completion_columns = nval; + return 0; +} + +static int +sv_histsize (const char *value) +{ + int nval; + + nval = 500; if (value && *value) { nval = atoi (value); if (nval < 0) - return 1; + { + unstifle_history (); + return 0; + } } stifle_history (nval); return 0; } static int -sv_keymap (value) - const char *value; +sv_keymap (const char *value) { Keymap kmap; @@ -1694,8 +2209,35 @@ sv_keymap (value) } static int -sv_bell_style (value) - const char *value; +sv_seqtimeout (const char *value) +{ + int nval; + + nval = 0; + if (value && *value) + { + nval = atoi (value); + if (nval < 0) + nval = 0; + } + _rl_keyseq_timeout = nval; + return 0; +} + +static int +sv_region_start_color (const char *value) +{ + return (_rl_reset_region_color (0, value)); +} + +static int +sv_region_end_color (const char *value) +{ + return (_rl_reset_region_color (1, value)); +} + +static int +sv_bell_style (const char *value) { if (value == 0 || *value == '\0') _rl_bell_preference = AUDIBLE_BELL; @@ -1711,8 +2253,7 @@ sv_bell_style (value) } static int -sv_isrchterm (value) - const char *value; +sv_isrchterm (const char *value) { int beg, end, delim; char *v; @@ -1731,7 +2272,7 @@ sv_isrchterm (value) } else { - for (beg = end = 0; whitespace (v[end]) == 0; end++) + for (beg = end = 0; v[end] && whitespace (v[end]) == 0; end++) ; } @@ -1745,7 +2286,93 @@ sv_isrchterm (value) xfree (v); return 0; } - + +extern char *_rl_emacs_mode_str; + +static int +sv_emacs_modestr (const char *value) +{ + if (value && *value) + { + FREE (_rl_emacs_mode_str); + _rl_emacs_mode_str = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_emacs_mode_str, &_rl_emacs_modestr_len); + _rl_emacs_mode_str[_rl_emacs_modestr_len] = '\0'; + return 0; + } + else if (value) + { + FREE (_rl_emacs_mode_str); + _rl_emacs_mode_str = (char *)xmalloc (1); + _rl_emacs_mode_str[_rl_emacs_modestr_len = 0] = '\0'; + return 0; + } + else if (value == 0) + { + FREE (_rl_emacs_mode_str); + _rl_emacs_mode_str = 0; /* prompt_modestr does the right thing */ + _rl_emacs_modestr_len = 0; + return 0; + } + return 1; +} + +static int +sv_viins_modestr (const char *value) +{ + if (value && *value) + { + FREE (_rl_vi_ins_mode_str); + _rl_vi_ins_mode_str = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_vi_ins_mode_str, &_rl_vi_ins_modestr_len); + _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len] = '\0'; + return 0; + } + else if (value) + { + FREE (_rl_vi_ins_mode_str); + _rl_vi_ins_mode_str = (char *)xmalloc (1); + _rl_vi_ins_mode_str[_rl_vi_ins_modestr_len = 0] = '\0'; + return 0; + } + else if (value == 0) + { + FREE (_rl_vi_ins_mode_str); + _rl_vi_ins_mode_str = 0; /* prompt_modestr does the right thing */ + _rl_vi_ins_modestr_len = 0; + return 0; + } + return 1; +} + +static int +sv_vicmd_modestr (const char *value) +{ + if (value && *value) + { + FREE (_rl_vi_cmd_mode_str); + _rl_vi_cmd_mode_str = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_vi_cmd_mode_str, &_rl_vi_cmd_modestr_len); + _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0'; + return 0; + } + else if (value) + { + FREE (_rl_vi_cmd_mode_str); + _rl_vi_cmd_mode_str = (char *)xmalloc (1); + _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len = 0] = '\0'; + return 0; + } + else if (value == 0) + { + FREE (_rl_vi_cmd_mode_str); + _rl_vi_cmd_mode_str = 0; /* prompt_modestr does the right thing */ + _rl_vi_cmd_modestr_len = 0; + return 0; + } + return 1; +} + /* Return the character which matches NAME. For example, `Space' returns ' '. */ @@ -1770,8 +2397,7 @@ static const assoc_list name_key_alist[] = { }; static int -glean_key_from_name (name) - char *name; +glean_key_from_name (char *name) { register int i; @@ -1783,10 +2409,12 @@ glean_key_from_name (name) } /* Auxiliary functions to manage keymaps. */ -static const struct { - const char * const name; +struct name_and_keymap { + char *name; Keymap map; -} keymap_names[] = { +}; + +static struct name_and_keymap builtin_keymap_names[] = { { "emacs", emacs_standard_keymap }, { "emacs-standard", emacs_standard_keymap }, { "emacs-meta", emacs_meta_keymap }, @@ -1800,45 +2428,116 @@ static const struct { { (char *)0x0, (Keymap)0x0 } }; -Keymap -rl_get_keymap_by_name (name) - const char *name; +/* -1 for NULL entry */ +#define NUM_BUILTIN_KEYMAPS (sizeof (builtin_keymap_names) / sizeof (builtin_keymap_names[0]) - 1) + +static struct name_and_keymap *keymap_names = builtin_keymap_names; + +static int +_rl_get_keymap_by_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); + return (i); + return -1; } -char * -rl_get_keymap_name (map) - Keymap map; +Keymap +rl_get_keymap_by_name (const char *name) +{ + int i; + + i = _rl_get_keymap_by_name (name); + return ((i >= 0) ? keymap_names[i].map : (Keymap) NULL); +} + +static int +_rl_get_keymap_by_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); + return (i); + return -1; } - + +char * +rl_get_keymap_name (Keymap map) +{ + int i; + + i = _rl_get_keymap_by_map (map); + return ((i >= 0) ? keymap_names[i].name : (char *)NULL); +} + +int +rl_set_keymap_name (const char *name, Keymap map) +{ + int i, ni, mi; + + /* First check whether or not we're trying to rename a builtin keymap */ + mi = _rl_get_keymap_by_map (map); + if (mi >= 0 && mi < NUM_BUILTIN_KEYMAPS) + return -1; + + /* Then reject attempts to set one of the builtin names to a new map */ + ni = _rl_get_keymap_by_name (name); + if (ni >= 0 && ni < NUM_BUILTIN_KEYMAPS) + return -1; + + /* Renaming a keymap we already added */ + if (mi >= 0) /* XXX - could be >= NUM_BUILTIN_KEYMAPS */ + { + xfree (keymap_names[mi].name); + keymap_names[mi].name = savestring (name); + return mi; + } + + /* Associating new keymap with existing name */ + if (ni >= 0) + { + keymap_names[ni].map = map; + return ni; + } + + for (i = 0; keymap_names[i].name; i++) + ; + + if (keymap_names == builtin_keymap_names) + { + keymap_names = xmalloc ((i + 2) * sizeof (struct name_and_keymap)); + memcpy (keymap_names, builtin_keymap_names, i * sizeof (struct name_and_keymap)); + } + else + keymap_names = xrealloc (keymap_names, (i + 2) * sizeof (struct name_and_keymap)); + + keymap_names[i].name = savestring (name); + keymap_names[i].map = map; + + keymap_names[i+1].name = NULL; + keymap_names[i+1].map = NULL; + + return i; +} + void -rl_set_keymap (map) - Keymap map; +rl_set_keymap (Keymap map) { if (map) _rl_keymap = map; } Keymap -rl_get_keymap () +rl_get_keymap (void) { return (_rl_keymap); } void -rl_set_keymap_from_edit_mode () +rl_set_keymap_from_edit_mode (void) { if (rl_editing_mode == emacs_mode) _rl_keymap = emacs_standard_keymap; @@ -1849,7 +2548,7 @@ rl_set_keymap_from_edit_mode () } char * -rl_get_keymap_name_from_edit_mode () +rl_get_keymap_name_from_edit_mode (void) { if (rl_editing_mode == emacs_mode) return "emacs"; @@ -1874,7 +2573,7 @@ rl_get_keymap_name_from_edit_mode () /* Print the names of functions known to Readline. */ void -rl_list_funmap_names () +rl_list_funmap_names (void) { register int i; const char **funmap_names; @@ -1891,8 +2590,7 @@ rl_list_funmap_names () } static char * -_rl_get_keyname (key) - int key; +_rl_get_keyname (int key) { char *keyname; int i, c; @@ -1952,6 +2650,15 @@ _rl_get_keyname (key) keyname[i++] = (c / 8) + '0'; c = (c % 8) + '0'; } + /* These characters are valid UTF-8; convert them into octal escape + sequences as well. This changes C. */ + else if (c >= 160) + { + keyname[i++] = '\\'; + keyname[i++] = '0' + ((((unsigned char)c) >> 6) & 0x07); + keyname[i++] = '0' + ((((unsigned char)c) >> 3) & 0x07); + c = (c % 8) + '0'; + } /* Now, if the character needs to be quoted with a backslash, do that. */ if (c == '\\' || c == '"') @@ -1967,9 +2674,7 @@ _rl_get_keyname (key) /* 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; +rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) { register int key; char **result; @@ -2036,20 +2741,22 @@ rl_invoking_keyseqs_in_map (function, map) 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'; + int c = key, l = 0; + if (CTRL_CHAR (c) || c == RUBOUT) + { + keyname[l++] = '\\'; + keyname[l++] = 'C'; + keyname[l++] = '-'; + c = (c == RUBOUT) ? '?' : _rl_to_lower (UNCTRL (c)); + } + + if (c == '\\' || c == '"') + keyname[l++] = '\\'; + + keyname[l++] = (char) c; + keyname[l++] = '\0'; } strcat (keyname, seqs[i]); @@ -2076,8 +2783,7 @@ rl_invoking_keyseqs_in_map (function, map) /* 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; +rl_invoking_keyseqs (rl_command_func_t *function) { return (rl_invoking_keyseqs_in_map (function, _rl_keymap)); } @@ -2086,8 +2792,7 @@ rl_invoking_keyseqs (function) 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; +rl_function_dumper (int print_readably) { register int i; const char **names; @@ -2150,14 +2855,15 @@ rl_function_dumper (print_readably) } } } + + xfree (names); } /* 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; +rl_dump_functions (int count, int key) { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); @@ -2167,10 +2873,7 @@ rl_dump_functions (count, key) } static void -_rl_macro_dumper_internal (print_readably, map, prefix) - int print_readably; - Keymap map; - char *prefix; +_rl_macro_dumper_internal (int print_readably, Keymap map, char *prefix) { register int key; char *keyname, *out; @@ -2182,7 +2885,7 @@ _rl_macro_dumper_internal (print_readably, map, prefix) { case ISMACR: keyname = _rl_get_keyname (key); - out = _rl_untranslate_macro_value ((char *)map[key].function); + out = _rl_untranslate_macro_value ((char *)map[key].function, 0); if (print_readably) fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "", @@ -2229,15 +2932,13 @@ _rl_macro_dumper_internal (print_readably, map, prefix) } void -rl_macro_dumper (print_readably) - int print_readably; +rl_macro_dumper (int print_readably) { _rl_macro_dumper_internal (print_readably, _rl_keymap, (char *)NULL); } int -rl_dump_macros (count, key) - int count, key; +rl_dump_macros (int count, int key) { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); @@ -2247,8 +2948,7 @@ rl_dump_macros (count, key) } static char * -_rl_get_string_variable_value (name) - const char *name; +_rl_get_string_variable_value (const char *name) { static char numbuf[32]; char *ret; @@ -2268,6 +2968,11 @@ _rl_get_string_variable_value (name) } 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-display-width") == 0) + { + sprintf (numbuf, "%d", _rl_completion_columns); + return (numbuf); + } else if (_rl_stricmp (name, "completion-prefix-display-length") == 0) { sprintf (numbuf, "%d", _rl_completion_prefix_display_length); @@ -2289,7 +2994,7 @@ _rl_get_string_variable_value (name) { if (_rl_isearch_terminators == 0) return 0; - ret = _rl_untranslate_macro_value (_rl_isearch_terminators); + ret = _rl_untranslate_macro_value (_rl_isearch_terminators, 0); if (ret) { strncpy (numbuf, ret, sizeof (numbuf) - 1); @@ -2307,13 +3012,23 @@ _rl_get_string_variable_value (name) ret = rl_get_keymap_name_from_edit_mode (); return (ret ? ret : "none"); } + else if (_rl_stricmp (name, "keyseq-timeout") == 0) + { + sprintf (numbuf, "%d", _rl_keyseq_timeout); + return (numbuf); + } + else if (_rl_stricmp (name, "emacs-mode-string") == 0) + return (_rl_emacs_mode_str ? _rl_emacs_mode_str : RL_EMACS_MODESTR_DEFAULT); + else if (_rl_stricmp (name, "vi-cmd-mode-string") == 0) + return (_rl_vi_cmd_mode_str ? _rl_vi_cmd_mode_str : RL_VI_CMD_MODESTR_DEFAULT); + else if (_rl_stricmp (name, "vi-ins-mode-string") == 0) + return (_rl_vi_ins_mode_str ? _rl_vi_ins_mode_str : RL_VI_INS_MODESTR_DEFAULT); else return (0); } void -rl_variable_dumper (print_readably) - int print_readably; +rl_variable_dumper (int print_readably) { int i; char *v; @@ -2344,8 +3059,7 @@ rl_variable_dumper (print_readably) 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; +rl_dump_variables (int count, int key) { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); @@ -2356,9 +3070,7 @@ rl_dump_variables (count, key) /* 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; +substring_member_of_array (const char *string, const char * const *array) { while (*array) { diff --git a/lib/readline/callback.c b/lib/readline/callback.c index 6c52ac0..69df77d 100644 --- a/lib/readline/callback.c +++ b/lib/readline/callback.c @@ -1,6 +1,6 @@ /* callback.c -- functions to use readline as an X `callback' mechanism. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 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. @@ -50,9 +50,17 @@ _rl_callback_func_t *_rl_callback_func = 0; _rl_callback_generic_arg *_rl_callback_data = 0; +/* Applications can set this to non-zero to have readline's signal handlers + installed during the entire duration of reading a complete line, as in + readline-6.2. This should be used with care, because it can result in + readline receiving signals and not handling them until it's called again + via rl_callback_read_char, thereby stealing them from the application. + By default, signal handlers are only active while readline is active. */ +int rl_persistent_signal_handlers = 0; + /* **************************************************************** */ /* */ -/* Callback Readline Functions */ +/* Callback Readline Functions */ /* */ /* **************************************************************** */ @@ -62,15 +70,17 @@ _rl_callback_generic_arg *_rl_callback_data = 0; 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. */ + text read in at each end of line. The terminal is kept prepped + all the time, except during calls to the user's function. Signal + handlers are only installed when the application calls back into + readline, so readline doesn't `steal' signals from the application. */ 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_callback_newline (void) { rl_initialize (); @@ -82,7 +92,8 @@ _rl_callback_newline () (*rl_prep_term_function) (_rl_meta_flag); #if defined (HANDLE_SIGNALS) - rl_set_signals (); + if (rl_persistent_signal_handlers) + rl_set_signals (); #endif } @@ -92,9 +103,7 @@ _rl_callback_newline () /* 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_callback_handler_install (const char *prompt, rl_vcpfunc_t *linefunc) { rl_set_prompt (prompt); RL_SETSTATE (RL_STATE_CALLBACK); @@ -102,9 +111,20 @@ rl_callback_handler_install (prompt, linefunc) _rl_callback_newline (); } +#if defined (HANDLE_SIGNALS) +#define CALLBACK_READ_RETURN() \ + do { \ + if (rl_persistent_signal_handlers == 0) \ + rl_clear_signals (); \ + return; \ + } while (0) +#else +#define CALLBACK_READ_RETURN() return +#endif + /* Read one character, and dispatch to the handler if it ends the line. */ void -rl_callback_read_char () +rl_callback_read_char (void) { char *line; int eof, jcode; @@ -116,16 +136,36 @@ rl_callback_read_char () abort (); } + eof = 0; + memcpy ((void *)olevel, (void *)_rl_top_level, sizeof (procenv_t)); +#if defined (HAVE_POSIX_SIGSETJMP) + jcode = sigsetjmp (_rl_top_level, 0); +#else jcode = setjmp (_rl_top_level); +#endif if (jcode) { (*rl_redisplay_function) (); _rl_want_redisplay = 0; memcpy ((void *)_rl_top_level, (void *)olevel, sizeof (procenv_t)); - return; + + /* If we longjmped because of a timeout, handle it here. */ + if (RL_ISSTATE (RL_STATE_TIMEOUT)) + { + RL_SETSTATE (RL_STATE_DONE); + rl_done = 1; + } + + CALLBACK_READ_RETURN (); } +#if defined (HANDLE_SIGNALS) + /* Install signal handlers only when readline has control. */ + if (rl_persistent_signal_handlers == 0) + rl_set_signals (); +#endif + do { RL_CHECK_SIGNALS (); @@ -135,13 +175,56 @@ rl_callback_read_char () if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) rl_callback_read_char (); - return; + CALLBACK_READ_RETURN (); } else if (RL_ISSTATE (RL_STATE_NSEARCH)) { eof = _rl_nsearch_callback (_rl_nscxt); - return; + + CALLBACK_READ_RETURN (); + } +#if defined (VI_MODE) + /* States that can occur while in state VIMOTION have to be checked + before RL_STATE_VIMOTION */ + else if (RL_ISSTATE (RL_STATE_CHARSEARCH)) + { + int k; + + k = _rl_callback_data->i2; + + eof = (*_rl_callback_func) (_rl_callback_data); + /* If the function `deregisters' itself, make sure the data is + cleaned up. */ + if (_rl_callback_func == 0) /* XXX - just sanity check */ + { + if (_rl_callback_data) + { + _rl_callback_data_dispose (_rl_callback_data); + _rl_callback_data = 0; + } + } + + /* Messy case where vi motion command can be char search */ + if (RL_ISSTATE (RL_STATE_VIMOTION)) + { + _rl_vi_domove_motion_cleanup (k, _rl_vimvcxt); + _rl_internal_char_cleanup (); + CALLBACK_READ_RETURN (); + } + + _rl_internal_char_cleanup (); + } + else if (RL_ISSTATE (RL_STATE_VIMOTION)) + { + eof = _rl_vi_domove_callback (_rl_vimvcxt); + /* Should handle everything, including cleanup, numeric arguments, + and turning off RL_STATE_VIMOTION */ + if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) + _rl_internal_char_cleanup (); + + CALLBACK_READ_RETURN (); } +#endif else if (RL_ISSTATE (RL_STATE_NUMERICARG)) { eof = _rl_arg_callback (_rl_argcxt); @@ -151,7 +234,7 @@ rl_callback_read_char () else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) _rl_internal_char_cleanup (); - return; + CALLBACK_READ_RETURN (); } else if (RL_ISSTATE (RL_STATE_MULTIKEY)) { @@ -168,7 +251,7 @@ rl_callback_read_char () { /* 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 + called when input is available. _rl_callback_data is a pointer to a struct that has the argument count originally passed to the registering function and space for any additional parameters. */ @@ -195,6 +278,13 @@ rl_callback_read_char () _rl_want_redisplay = 0; } + /* Make sure application hooks can see whether we saw EOF. */ + if (eof > 0) + { + rl_eof_found = eof; + RL_SETSTATE(RL_STATE_EOF); + } + if (rl_done) { line = readline_internal_teardown (eof); @@ -205,7 +295,8 @@ rl_callback_read_char () rl_clear_signals (); #endif in_handler = 0; - (*rl_linefunc) (line); + if (rl_linefunc) /* just in case */ + (*rl_linefunc) (line); /* If the user did not clear out the line, do it for him. */ if (rl_line_buffer[0]) @@ -218,11 +309,13 @@ rl_callback_read_char () } } while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT)); + + CALLBACK_READ_RETURN (); } /* Remove the handler, and make sure the terminal is in its normal state. */ void -rl_callback_handler_remove () +rl_callback_handler_remove (void) { rl_linefunc = NULL; RL_UNSETSTATE (RL_STATE_CALLBACK); @@ -239,8 +332,7 @@ rl_callback_handler_remove () } _rl_callback_generic_arg * -_rl_callback_data_alloc (count) - int count; +_rl_callback_data_alloc (int count) { _rl_callback_generic_arg *arg; @@ -252,10 +344,35 @@ _rl_callback_data_alloc (count) return arg; } -void _rl_callback_data_dispose (arg) - _rl_callback_generic_arg *arg; +void +_rl_callback_data_dispose (_rl_callback_generic_arg *arg) { xfree (arg); } +/* Make sure that this agrees with cases in rl_callback_read_char */ +void +rl_callback_sigcleanup (void) +{ + if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) + return; + + if (RL_ISSTATE (RL_STATE_ISEARCH)) + _rl_isearch_cleanup (_rl_iscxt, 0); + else if (RL_ISSTATE (RL_STATE_NSEARCH)) + _rl_nsearch_cleanup (_rl_nscxt, 0); + else if (RL_ISSTATE (RL_STATE_VIMOTION)) + RL_UNSETSTATE (RL_STATE_VIMOTION); + else if (RL_ISSTATE (RL_STATE_NUMERICARG)) + { + _rl_argcxt = 0; + RL_UNSETSTATE (RL_STATE_NUMERICARG); + } + else if (RL_ISSTATE (RL_STATE_MULTIKEY)) + RL_UNSETSTATE (RL_STATE_MULTIKEY); + if (RL_ISSTATE (RL_STATE_CHARSEARCH)) + RL_UNSETSTATE (RL_STATE_CHARSEARCH); + + _rl_callback_func = 0; +} #endif diff --git a/lib/readline/chardefs.h b/lib/readline/chardefs.h index e76c34b..24a25f1 100644 --- a/lib/readline/chardefs.h +++ b/lib/readline/chardefs.h @@ -1,6 +1,6 @@ /* chardefs.h -- Character definitions for readline. */ -/* Copyright (C) 1994-2009 Free Software Foundation, Inc. +/* Copyright (C) 1994-2021 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. @@ -26,9 +26,6 @@ #if defined (HAVE_CONFIG_H) # if defined (HAVE_STRING_H) -# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) -# include -# endif # include # endif /* HAVE_STRING_H */ # if defined (HAVE_STRINGS_H) @@ -66,45 +63,49 @@ #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) +#ifndef UCHAR_MAX +# define UCHAR_MAX 255 #endif - -#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) -# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +#ifndef CHAR_MAX +# define CHAR_MAX 127 #endif -#if defined (CTYPE_NON_ASCII) +/* use this as a proxy for C89 */ +#if defined (HAVE_STDLIB_H) && defined (HAVE_STRING_H) +# define IN_CTYPE_DOMAIN(c) 1 # define NON_NEGATIVE(c) 1 #else +# define IN_CTYPE_DOMAIN(c) ((c) >= 0 && (c) <= CHAR_MAX) # define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) #endif +#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus) +# define isxdigit(c) (isdigit((unsigned char)(c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +#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 ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum ((unsigned char)c)) +#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha ((unsigned char)c)) +#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit ((unsigned char)c)) +#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower ((unsigned char)c)) +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c)) +#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper ((unsigned char)c)) +#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit ((unsigned char)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_alphabetic_p(c) (NON_NEGATIVE(c) && ISALNUM(c)) #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)) +# 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 diff --git a/lib/readline/colors.c b/lib/readline/colors.c new file mode 100644 index 0000000..4212c64 --- /dev/null +++ b/lib/readline/colors.c @@ -0,0 +1,320 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2021 + 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include "rlconf.h" + +#if defined __TANDEM +# define _XOPEN_SOURCE_EXTENDED 1 +# define _TANDEM_SOURCE 1 +# include +# include +#endif + +#include + +#include "posixstat.h" // stat related macros (S_ISREG, ...) +#include // S_ISUID + +#ifndef S_ISDIR +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +// strlen() +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +// abort() +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "readline.h" +#include "rldefs.h" + +#ifdef COLOR_SUPPORT + +#include "xmalloc.h" +#include "colors.h" + +static bool is_colored (enum indicator_no type); +static void restore_default_color (void); + +#define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix" + +COLOR_EXT_TYPE *_rl_color_ext_list = 0; + +/* Output a color indicator (which may contain nulls). */ +void +_rl_put_indicator (const struct bin_str *ind) +{ + fwrite (ind->string, ind->len, 1, rl_outstream); +} + +static bool +is_colored (enum indicator_no colored_filetype) +{ + size_t len = _rl_color_indicator[colored_filetype].len; + char const *s = _rl_color_indicator[colored_filetype].string; + return ! (len == 0 + || (len == 1 && strncmp (s, "0", 1) == 0) + || (len == 2 && strncmp (s, "00", 2) == 0)); +} + +static void +restore_default_color (void) +{ + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); +} + +void +_rl_set_normal_color (void) +{ + if (is_colored (C_NORM)) + { + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (&_rl_color_indicator[C_NORM]); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + } +} + +static struct bin_str * +_rl_custom_readline_prefix (void) +{ + size_t len; + COLOR_EXT_TYPE *ext; + + len = strlen (RL_COLOR_PREFIX_EXTENSION); + for (ext = _rl_color_ext_list; ext; ext = ext->next) + if (ext->ext.len == len && STREQN (ext->ext.string, RL_COLOR_PREFIX_EXTENSION, len)) + return (&ext->seq); + return (NULL); +} + +bool +_rl_print_prefix_color (void) +{ + struct bin_str *s; + + /* What do we want to use for the prefix? Let's try cyan first, see colors.h */ + s = _rl_custom_readline_prefix (); + if (s == 0) + s = &_rl_color_indicator[C_PREFIX]; + if (s->string != NULL) + { + if (is_colored (C_NORM)) + restore_default_color (); + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (s); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + return 0; + } + else + return 1; +} + +/* Returns whether any color sequence was printed. */ +bool +_rl_print_color_indicator (const char *f) +{ + enum indicator_no colored_filetype; + COLOR_EXT_TYPE *ext; /* Color extension */ + size_t len; /* Length of name */ + + const char* name; + char *filename; + struct stat astat, linkstat; + mode_t mode; + int linkok; /* 1 == ok, 0 == dangling symlink, -1 == missing */ + int stat_ok; + + name = f; + + /* This should already have undergone tilde expansion */ + filename = 0; + if (rl_filename_stat_hook) + { + filename = savestring (f); + (*rl_filename_stat_hook) (&filename); + name = filename; + } + +#if defined (HAVE_LSTAT) + stat_ok = lstat(name, &astat); +#else + stat_ok = stat(name, &astat); +#endif + if (stat_ok == 0) + { + mode = astat.st_mode; +#if defined (HAVE_LSTAT) + if (S_ISLNK (mode)) + { + linkok = stat (name, &linkstat) == 0; + if (linkok && strncmp (_rl_color_indicator[C_LINK].string, "target", 6) == 0) + mode = linkstat.st_mode; + } + else +#endif + linkok = 1; + } + else + linkok = -1; + + /* Is this a nonexistent file? If so, linkok == -1. */ + + if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL) + colored_filetype = C_MISSING; + else if (linkok == 0 && _rl_color_indicator[C_ORPHAN].string != NULL) + colored_filetype = C_ORPHAN; /* dangling symlink */ + else if(stat_ok != 0) + { + static enum indicator_no filetype_indicator[] = FILETYPE_INDICATORS; + colored_filetype = filetype_indicator[normal]; //f->filetype]; + } + else + { + if (S_ISREG (mode)) + { + colored_filetype = C_FILE; + +#if defined (S_ISUID) + if ((mode & S_ISUID) != 0 && is_colored (C_SETUID)) + colored_filetype = C_SETUID; + else +#endif +#if defined (S_ISGID) + if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) + colored_filetype = C_SETGID; + else +#endif + if (is_colored (C_CAP) && 0) //f->has_capability) + colored_filetype = C_CAP; + else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) + colored_filetype = C_EXEC; + else if ((1 < astat.st_nlink) && is_colored (C_MULTIHARDLINK)) + colored_filetype = C_MULTIHARDLINK; + } + else if (S_ISDIR (mode)) + { + colored_filetype = C_DIR; + +#if defined (S_ISVTX) + if ((mode & S_ISVTX) && (mode & S_IWOTH) + && is_colored (C_STICKY_OTHER_WRITABLE)) + colored_filetype = C_STICKY_OTHER_WRITABLE; + else +#endif + if ((mode & S_IWOTH) != 0 && is_colored (C_OTHER_WRITABLE)) + colored_filetype = C_OTHER_WRITABLE; +#if defined (S_ISVTX) + else if ((mode & S_ISVTX) != 0 && is_colored (C_STICKY)) + colored_filetype = C_STICKY; +#endif + } +#if defined (S_ISLNK) + else if (S_ISLNK (mode)) + colored_filetype = C_LINK; +#endif + else if (S_ISFIFO (mode)) + colored_filetype = C_FIFO; +#if defined (S_ISSOCK) + else if (S_ISSOCK (mode)) + colored_filetype = C_SOCK; +#endif +#if defined (S_ISBLK) + else if (S_ISBLK (mode)) + colored_filetype = C_BLK; +#endif + else if (S_ISCHR (mode)) + colored_filetype = C_CHR; + else + { + /* Classify a file of some other type as C_ORPHAN. */ + colored_filetype = C_ORPHAN; + } + } + + /* Check the file's suffix only if still classified as C_FILE. */ + ext = NULL; + if (colored_filetype == C_FILE) + { + /* Test if NAME has a recognized suffix. */ + len = strlen (name); + name += len; /* Pointer to final \0. */ + for (ext = _rl_color_ext_list; ext != NULL; ext = ext->next) + { + if (ext->ext.len <= len + && strncmp (name - ext->ext.len, ext->ext.string, + ext->ext.len) == 0) + break; + } + } + + free (filename); /* NULL or savestring return value */ + + { + const struct bin_str *const s + = ext ? &(ext->seq) : &_rl_color_indicator[colored_filetype]; + if (s->string != NULL) + { + /* Need to reset so not dealing with attribute combinations */ + if (is_colored (C_NORM)) + restore_default_color (); + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (s); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + return 0; + } + else + return 1; + } +} + +void +_rl_prep_non_filename_text (void) +{ + if (_rl_color_indicator[C_END].string != NULL) + _rl_put_indicator (&_rl_color_indicator[C_END]); + else + { + _rl_put_indicator (&_rl_color_indicator[C_LEFT]); + _rl_put_indicator (&_rl_color_indicator[C_RESET]); + _rl_put_indicator (&_rl_color_indicator[C_RIGHT]); + } +} +#endif /* COLOR_SUPPORT */ diff --git a/lib/readline/colors.h b/lib/readline/colors.h new file mode 100644 index 0000000..6561ad9 --- /dev/null +++ b/lib/readline/colors.h @@ -0,0 +1,126 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015 + 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#ifndef _COLORS_H_ +#define _COLORS_H_ + +#include // size_t + +#if defined(__TANDEM) && defined(HAVE_STDBOOL_H) && (__STDC_VERSION__ < 199901L) +typedef int _Bool; +#endif + +#if defined (HAVE_STDBOOL_H) +# include // bool +#else +typedef int _rl_bool_t; + +#ifdef bool +# undef bool +#endif +#define bool _rl_bool_t + +#ifndef true +# define true 1 +# define false 0 +#endif + +#endif /* !HAVE_STDBOOL_H */ + +/* Null is a valid character in a color indicator (think about Epson + printers, for example) so we have to use a length/buffer string + type. */ +struct bin_str + { + size_t len; + const char *string; + }; + +/* file type indicators (dir, sock, fifo, ...) + Default value is initialized in parse-colors.c. + It is then modified from the values of $LS_COLORS. */ +extern struct bin_str _rl_color_indicator[]; + +/* The LS_COLORS variable is in a termcap-like format. */ +typedef struct _color_ext_type + { + struct bin_str ext; /* The extension we're looking for */ + struct bin_str seq; /* The sequence to output when we do */ + struct _color_ext_type *next; /* Next in list */ + } COLOR_EXT_TYPE; + +/* file extensions indicators (.txt, .log, .jpg, ...) + Values are taken from $LS_COLORS in rl_parse_colors(). */ +extern COLOR_EXT_TYPE *_rl_color_ext_list; + +#define FILETYPE_INDICATORS \ + { \ + C_ORPHAN, C_FIFO, C_CHR, C_DIR, C_BLK, C_FILE, \ + C_LINK, C_SOCK, C_FILE, C_DIR \ + } + +/* Whether we used any colors in the output so far. If so, we will + need to restore the default color later. If not, we will need to + call prep_non_filename_text before using color for the first time. */ + +enum indicator_no + { + C_LEFT, C_RIGHT, C_END, C_RESET, C_NORM, C_FILE, C_DIR, C_LINK, + C_FIFO, C_SOCK, + C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_DOOR, C_SETUID, C_SETGID, + C_STICKY, C_OTHER_WRITABLE, C_STICKY_OTHER_WRITABLE, C_CAP, C_MULTIHARDLINK, + C_CLR_TO_EOL + }; + + +#if !S_IXUGO +# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) +#endif + +enum filetype + { + unknown, + fifo, + chardev, + directory, + blockdev, + normal, + symbolic_link, + sock, + whiteout, + arg_directory + }; + +/* Prefix color, currently same as socket */ +#define C_PREFIX C_SOCK + +extern void _rl_put_indicator (const struct bin_str *ind); +extern void _rl_set_normal_color (void); +extern bool _rl_print_prefix_color (void); +extern bool _rl_print_color_indicator (const char *f); +extern void _rl_prep_non_filename_text (void); + +#endif /* !_COLORS_H_ */ diff --git a/lib/readline/compat.c b/lib/readline/compat.c index 2af5120..fc2a48f 100644 --- a/lib/readline/compat.c +++ b/lib/readline/compat.c @@ -1,6 +1,6 @@ /* compat.c -- backwards compatibility functions. */ -/* Copyright (C) 2000-2009 Free Software Foundation, Inc. +/* Copyright (C) 2000-2021 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. @@ -30,84 +30,77 @@ #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 void rl_free_undo_list (void); +extern int rl_maybe_save_line (void); +extern int rl_maybe_unsave_line (void); +extern int rl_maybe_replace_line (void); -extern int rl_crlf PARAMS((void)); -extern int rl_ding PARAMS((void)); -extern int rl_alphabetic PARAMS((int)); +extern int rl_crlf (void); +extern int rl_ding (void); +extern int rl_alphabetic (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 char **rl_completion_matches (const char *, rl_compentry_func_t *); +extern char *rl_username_completion_function (const char *, int); +extern char *rl_filename_completion_function (const char *, int); /* Provide backwards-compatible entry points for old function names. */ void -free_undo_list () +free_undo_list (void) { rl_free_undo_list (); } int -maybe_replace_line () +maybe_replace_line (void) { return rl_maybe_replace_line (); } int -maybe_save_line () +maybe_save_line (void) { return rl_maybe_save_line (); } int -maybe_unsave_line () +maybe_unsave_line (void) { return rl_maybe_unsave_line (); } int -ding () +ding (void) { return rl_ding (); } int -crlf () +crlf (void) { return rl_crlf (); } int -alphabetic (c) - int c; +alphabetic (int c) { return rl_alphabetic (c); } char ** -completion_matches (s, f) - const char *s; - rl_compentry_func_t *f; +completion_matches (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; +username_completion_function (const char *s, int i) { return rl_username_completion_function (s, i); } char * -filename_completion_function (s, i) - const char *s; - int i; +filename_completion_function (const char *s, int i) { return rl_filename_completion_function (s, i); } diff --git a/lib/readline/complete.c b/lib/readline/complete.c index ad9ca05..2daac8c 100644 --- a/lib/readline/complete.c +++ b/lib/readline/complete.c @@ -1,6 +1,6 @@ /* complete.c -- filename completion for readline. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 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. @@ -21,16 +21,25 @@ #define READLINE_LIBRARY +#if defined (__TANDEM) +# define _XOPEN_SOURCE_EXTENDED 1 +#endif + #if defined (HAVE_CONFIG_H) # include #endif #include +#if defined (__TANDEM) +# include +#endif #include #if defined (HAVE_SYS_FILE_H) # include #endif +#include + #if defined (HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ @@ -64,6 +73,10 @@ extern int errno; #include "xmalloc.h" #include "rlprivate.h" +#if defined (COLOR_SUPPORT) +# include "colors.h" +#endif + #ifdef __STDC__ typedef int QSFUNC (const void *, const void *); #else @@ -82,7 +95,7 @@ typedef int QSFUNC (); /* Most systems don't declare getpwent in if _POSIX_SOURCE is defined. */ #if defined (HAVE_GETPWENT) && (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE)) -extern struct passwd *getpwent PARAMS((void)); +extern struct passwd *getpwent (void); #endif /* HAVE_GETPWENT && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */ /* If non-zero, then this is the address of a function to call when @@ -94,36 +107,51 @@ extern struct passwd *getpwent PARAMS((void)); 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 (VISIBLE_STATS) || defined (COLOR_SUPPORT) # if !defined (X_OK) # define X_OK 1 # endif -static int stat_char PARAMS((char *)); #endif -static int path_isdir PARAMS((const char *)); +#if defined (VISIBLE_STATS) +static int stat_char (char *); +#endif -static char *rl_quote_filename PARAMS((char *, int, char *)); +#if defined (COLOR_SUPPORT) +static int colored_stat_start (const char *); +static void colored_stat_end (void); +static int colored_prefix_start (void); +static void colored_prefix_end (void); +#endif + +static int path_isdir (const char *); + +static char *rl_quote_filename (char *, int, char *); + +static void _rl_complete_sigcleanup (int, void *); -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 void set_completion_defaults (int); +static int get_y_or_n (int); +static int _rl_internal_pager (int); +static char *printable_part (char *); +static int fnwidth (const char *); +static int fnprint (const char *, int, const char *); +static int print_filename (char *, char *, int); -static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int)); +static char **gen_completion_matches (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 **remove_duplicate_matches (char **); +static void insert_match (char *, int, int, char *); +static int append_to_match (char *, int, int, int); +static void insert_all_matches (char **, int, char *); +static int complete_fncmp (const char *, int, const char *, int); +static void display_matches (char **); +static int compute_lcd_of_matches (char **, int, const char *); +static int postprocess_matches (char ***, int); +static int compare_match (char *, const char *); +static int complete_get_screenwidth (void); -static char *make_quoted_replacement PARAMS((char *, int, char *)); +static char *make_quoted_replacement (char *, int, char *); /* **************************************************************** */ /* */ @@ -154,13 +182,17 @@ int _rl_complete_mark_symlink_dirs = 0; int _rl_print_completions_horizontally; /* Non-zero means that case is not significant in filename completion. */ -#if defined (__MSDOS__) && !defined (__DJGPP__) +#if (defined (__MSDOS__) && !defined (__DJGPP__)) || (defined (_WIN32) && !defined (__CYGWIN__)) int _rl_completion_case_fold = 1; #else -int _rl_completion_case_fold; +int _rl_completion_case_fold = 0; #endif -/* If non-zero, don't match hidden files (filenames beginning with a `.' on +/* Non-zero means that `-' and `_' are equivalent when comparing filenames + for completion. */ +int _rl_completion_case_map = 0; + +/* If zero, don't match hidden files (filenames beginning with a `.' on Unix) when doing filename completion. */ int _rl_match_hidden_files = 1; @@ -170,6 +202,30 @@ int _rl_match_hidden_files = 1; display prefix replaced with an ellipsis. */ int _rl_completion_prefix_display_length = 0; +/* The readline-private number of screen columns to use when displaying + matches. If < 0 or > _rl_screenwidth, it is ignored. */ +int _rl_completion_columns = -1; + +#if defined (COLOR_SUPPORT) +/* Non-zero means to use colors to indicate file type when listing possible + completions. The colors used are taken from $LS_COLORS, if set. */ +int _rl_colored_stats = 0; + +/* Non-zero means to use a color (currently magenta) to indicate the common + prefix of a set of possible word completions. */ +int _rl_colored_completion_prefix = 0; +#endif + +/* 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, menu completion displays the common prefix first in the + cycle of possible completions instead of the last. */ +int _rl_menu_complete_prefix_first = 0; + /* Global variables available to applications using readline. */ #if defined (VISIBLE_STATS) @@ -179,12 +235,6 @@ int _rl_completion_prefix_display_length = 0; 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. */ @@ -192,6 +242,8 @@ rl_icppfunc_t *rl_directory_completion_hook = (rl_icppfunc_t *)NULL; rl_icppfunc_t *rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; +rl_icppfunc_t *rl_filename_stat_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 @@ -252,7 +304,7 @@ 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; +const char *rl_completer_word_break_characters = 0; /* Hook function to allow an application to set the completion word break characters before readline breaks up the line. Allows @@ -362,10 +414,13 @@ int rl_sort_completion_matches = 1; /* Local variable states what happened during the last completion attempt. */ static int completion_changed_buffer; +static int last_completion_failed = 0; /* The result of the query to the user about displaying completion matches */ static int completion_y_or_n; +static int _rl_complete_display_matches_interrupt = 0; + /*************************************/ /* */ /* Bindable completion functions */ @@ -376,14 +431,17 @@ static int completion_y_or_n; 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_complete (int ignore, int 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) +#if 0 + else if (rl_last_func == rl_complete && completion_changed_buffer == 0 && last_completion_failed == 0) +#else + else if (rl_last_func == rl_complete && completion_changed_buffer == 0) +#endif return (rl_complete_internal ('?')); else if (_rl_complete_show_all) return (rl_complete_internal ('!')); @@ -395,16 +453,14 @@ rl_complete (ignore, invoking_key) /* List the possible completions. See description of rl_complete (). */ int -rl_possible_completions (ignore, invoking_key) - int ignore, invoking_key; +rl_possible_completions (int ignore, int invoking_key) { rl_completion_invoking_key = invoking_key; return (rl_complete_internal ('?')); } int -rl_insert_completions (ignore, invoking_key) - int ignore, invoking_key; +rl_insert_completions (int ignore, int invoking_key) { rl_completion_invoking_key = invoking_key; return (rl_complete_internal ('*')); @@ -416,8 +472,7 @@ rl_insert_completions (ignore, invoking_key) an application-specific completion function to honor the show-all-if-ambiguous readline variable. */ int -rl_completion_mode (cfunc) - rl_command_func_t *cfunc; +rl_completion_mode (rl_command_func_t *cfunc) { if (rl_last_func == cfunc && !completion_changed_buffer) return '?'; @@ -435,19 +490,28 @@ rl_completion_mode (cfunc) /* */ /************************************/ -/* Reset readline state on a signal or other event. */ +/* Reset public readline state on a signal or other event. */ void -_rl_reset_completion_state () +_rl_reset_completion_state (void) { rl_completion_found_quote = 0; rl_completion_quote_character = 0; } +static void +_rl_complete_sigcleanup (int sig, void *ptr) +{ + if (sig == SIGINT) /* XXX - for now */ + { + _rl_free_match_list ((char **)ptr); + _rl_complete_display_matches_interrupt = 1; + } +} + /* 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; +set_completion_defaults (int what_to_do) { /* Only the completion entry function can change these. */ rl_filename_completion_desired = 0; @@ -458,15 +522,25 @@ set_completion_defaults (what_to_do) /* The completion entry function may optionally change this. */ rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs; + + /* Reset private state. */ + _rl_complete_display_matches_interrupt = 0; } /* The user must press "y" or "n". Non-zero return means "y" pressed. */ static int -get_y_or_n (for_pager) - int for_pager; +get_y_or_n (int for_pager) { int c; + /* For now, disable pager in callback mode, until we later convert to state + driven functions. Have to wait until next major version to add new + state definition, since it will change value of RL_STATE_DONE. */ +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + return 1; +#endif + for (;;) { RL_SETSTATE(RL_STATE_MOREINPUT); @@ -488,8 +562,7 @@ get_y_or_n (for_pager) } static int -_rl_internal_pager (lines) - int lines; +_rl_internal_pager (int lines) { int i; @@ -506,8 +579,7 @@ _rl_internal_pager (lines) } static int -path_isdir (filename) - const char *filename; +path_isdir (const char *filename) { struct stat finfo; @@ -524,11 +596,12 @@ path_isdir (filename) `%' for character special devices `#' for block special devices */ static int -stat_char (filename) - char *filename; +stat_char (char *filename) { struct stat finfo; int character, r; + char *f; + const char *fn; /* Short-circuit a //server on cygwin, since that will always behave as a directory. */ @@ -537,14 +610,27 @@ stat_char (filename) return '/'; #endif + f = 0; + if (rl_filename_stat_hook) + { + f = savestring (filename); + (*rl_filename_stat_hook) (&f); + fn = f; + } + else + fn = filename; + #if defined (HAVE_LSTAT) && defined (S_ISLNK) - r = lstat (filename, &finfo); + r = lstat (fn, &finfo); #else - r = stat (filename, &finfo); + r = stat (fn, &finfo); #endif if (r == -1) - return (0); + { + xfree (f); + return (0); + } character = 0; if (S_ISDIR (finfo.st_mode)) @@ -571,13 +657,56 @@ stat_char (filename) #endif else if (S_ISREG (finfo.st_mode)) { +#if defined (_WIN32) && !defined (__CYGWIN__) + char *ext; + + /* Windows doesn't do access and X_OK; check file extension instead */ + ext = strrchr (fn, '.'); + if (ext && (_rl_stricmp (ext, ".exe") == 0 || + _rl_stricmp (ext, ".cmd") == 0 || + _rl_stricmp (ext, ".bat") == 0 || + _rl_stricmp (ext, ".com") == 0)) + character = '*'; +#else if (access (filename, X_OK) == 0) character = '*'; +#endif } + + xfree (f); return (character); } #endif /* VISIBLE_STATS */ +#if defined (COLOR_SUPPORT) +static int +colored_stat_start (const char *filename) +{ + _rl_set_normal_color (); + return (_rl_print_color_indicator (filename)); +} + +static void +colored_stat_end (void) +{ + _rl_prep_non_filename_text (); + _rl_put_indicator (&_rl_color_indicator[C_CLR_TO_EOL]); +} + +static int +colored_prefix_start (void) +{ + _rl_set_normal_color (); + return (_rl_print_prefix_color ()); +} + +static void +colored_prefix_end (void) +{ + colored_stat_end (); /* for now */ +} +#endif + /* 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 @@ -587,8 +716,7 @@ stat_char (filename) 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; +printable_part (char *pathname) { char *temp, *x; @@ -596,13 +724,15 @@ printable_part (pathname) return (pathname); temp = strrchr (pathname, '/'); -#if defined (__MSDOS__) +#if defined (__MSDOS__) || defined (_WIN32) if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':') temp = pathname + 1; #endif if (temp == 0 || *temp == '\0') return (pathname); + else if (temp[1] == 0 && temp == pathname) + 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 @@ -620,15 +750,14 @@ printable_part (pathname) /* Compute width of STRING when displayed on screen by print_filename */ static int -fnwidth (string) - const char *string; +fnwidth (const char *string) { int width, pos; #if defined (HANDLE_MULTIBYTE) mbstate_t ps; int left, w; size_t clen; - wchar_t wc; + WCHAR_T wc; left = strlen (string) + 1; memset (&ps, 0, sizeof (mbstate_t)); @@ -645,7 +774,7 @@ fnwidth (string) else { #if defined (HANDLE_MULTIBYTE) - clen = mbrtowc (&wc, string + pos, left - pos, &ps); + clen = MBRTOWC (&wc, string + pos, left - pos, &ps); if (MB_INVALIDCH (clen)) { width++; @@ -657,7 +786,7 @@ fnwidth (string) else { pos += clen; - w = wcwidth (wc); + w = WCWIDTH (wc); width += (w >= 0) ? w : 1; } #else @@ -673,31 +802,41 @@ fnwidth (string) #define ELLIPSIS_LEN 3 static int -fnprint (to_print, prefix_bytes) - const char *to_print; - int prefix_bytes; +fnprint (const char *to_print, int prefix_bytes, const char *real_pathname) { int printed_len, w; const char *s; + int common_prefix_len, print_len; #if defined (HANDLE_MULTIBYTE) mbstate_t ps; const char *end; size_t tlen; int width; - wchar_t wc; + WCHAR_T wc; - end = to_print + strlen (to_print) + 1; + print_len = strlen (to_print); + end = to_print + print_len + 1; memset (&ps, 0, sizeof (mbstate_t)); +#else + print_len = strlen (to_print); #endif - printed_len = 0; + printed_len = common_prefix_len = 0; /* Don't print only the ellipsis if the common prefix is one of the - possible completions */ - if (to_print[prefix_bytes] == '\0') + possible completions. Only cut off prefix_bytes if we're going to be + printing the ellipsis, which takes precedence over coloring the + completion prefix (see print_filename() below). */ + if (_rl_completion_prefix_display_length > 0 && prefix_bytes >= print_len) prefix_bytes = 0; - if (prefix_bytes) +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats && (prefix_bytes == 0 || _rl_colored_completion_prefix <= 0)) + colored_stat_start (real_pathname); +#endif + + if (prefix_bytes && _rl_completion_prefix_display_length > 0 && + prefix_bytes > _rl_completion_prefix_display_length) { char ellipsis; @@ -706,6 +845,15 @@ fnprint (to_print, prefix_bytes) putc (ellipsis, rl_outstream); printed_len = ELLIPSIS_LEN; } +#if defined (COLOR_SUPPORT) + else if (prefix_bytes && _rl_colored_completion_prefix > 0) + { + common_prefix_len = prefix_bytes; + prefix_bytes = 0; + /* XXX - print color indicator start here */ + colored_prefix_start (); + } +#endif s = to_print + prefix_bytes; while (*s) @@ -733,7 +881,7 @@ fnprint (to_print, prefix_bytes) else { #if defined (HANDLE_MULTIBYTE) - tlen = mbrtowc (&wc, s, end - s, &ps); + tlen = MBRTOWC (&wc, s, end - s, &ps); if (MB_INVALIDCH (tlen)) { tlen = 1; @@ -744,7 +892,7 @@ fnprint (to_print, prefix_bytes) break; else { - w = wcwidth (wc); + w = WCWIDTH (wc); width = (w >= 0) ? w : 1; } fwrite (s, 1, tlen, rl_outstream); @@ -756,8 +904,25 @@ fnprint (to_print, prefix_bytes) printed_len++; #endif } + if (common_prefix_len > 0 && (s - to_print) >= common_prefix_len) + { +#if defined (COLOR_SUPPORT) + /* printed bytes = s - to_print */ + /* printed bytes should never be > but check for paranoia's sake */ + colored_prefix_end (); + if (_rl_colored_stats) + colored_stat_start (real_pathname); /* XXX - experiment */ +#endif + common_prefix_len = 0; + } } +#if defined (COLOR_SUPPORT) + /* XXX - unconditional for now */ + if (_rl_colored_stats) + colored_stat_end (); +#endif + return printed_len; } @@ -766,21 +931,26 @@ fnprint (to_print, prefix_bytes) 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; +print_filename (char *to_print, char *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 (COLOR_SUPPORT) + /* Defer printing if we want to prefix with a color indicator */ + if (_rl_colored_stats == 0 || rl_filename_completion_desired == 0) +#endif + printed_len = fnprint (to_print, prefix_bytes, to_print); + if (rl_filename_completion_desired && ( #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) + rl_visible_stats || +#endif +#if defined (COLOR_SUPPORT) + _rl_colored_stats || #endif + _rl_complete_mark_directories)) { /* If to_print != full_pathname, to_print is the basename of the path passed. In this case, we try to expand the directory @@ -818,7 +988,6 @@ print_filename (to_print, full_pathname, prefix_bytes) slen--; else new_full_pathname[slen] = '/'; - new_full_pathname[slen] = '/'; strcpy (new_full_pathname + slen + 1, to_print); #if defined (VISIBLE_STATS) @@ -826,10 +995,27 @@ print_filename (to_print, full_pathname, prefix_bytes) extension_char = stat_char (new_full_pathname); else #endif - if (path_isdir (new_full_pathname)) - extension_char = '/'; + if (_rl_complete_mark_directories) + { + dn = 0; + if (rl_directory_completion_hook == 0 && rl_filename_stat_hook) + { + dn = savestring (new_full_pathname); + (*rl_filename_stat_hook) (&dn); + xfree (new_full_pathname); + new_full_pathname = dn; + } + if (path_isdir (new_full_pathname)) + extension_char = '/'; + } + + /* Move colored-stats code inside fnprint() */ +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats) + printed_len = fnprint (to_print, prefix_bytes, new_full_pathname); +#endif - free (new_full_pathname); + xfree (new_full_pathname); to_print[-1] = c; } else @@ -840,11 +1026,17 @@ print_filename (to_print, full_pathname, prefix_bytes) extension_char = stat_char (s); else #endif - if (path_isdir (s)) + if (_rl_complete_mark_directories && path_isdir (s)) extension_char = '/'; + + /* Move colored-stats code inside fnprint() */ +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats) + printed_len = fnprint (to_print, prefix_bytes, s); +#endif } - free (s); + xfree (s); if (extension_char) { putc (extension_char, rl_outstream); @@ -856,10 +1048,7 @@ print_filename (to_print, full_pathname, prefix_bytes) } static char * -rl_quote_filename (s, rtype, qcp) - char *s; - int rtype; - char *qcp; +rl_quote_filename (char *s, int rtype, char *qcp) { char *r; @@ -887,11 +1076,11 @@ rl_quote_filename (s, rtype, qcp) the value of the delimiter character that caused a word break. */ char -_rl_find_completion_word (fp, dp) - int *fp, *dp; +_rl_find_completion_word (int *fp, int *dp) { int scan, end, found_quote, delimiter, pass_next, isbrk; - char quote_char, *brkchars; + char quote_char; + const char *brkchars; end = rl_point; found_quote = delimiter = 0; @@ -1020,11 +1209,7 @@ _rl_find_completion_word (fp, dp) } 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; +gen_completion_matches (char *text, int start, int end, rl_compentry_func_t *our_func, int found_quote, int quote_char) { char **matches; @@ -1036,10 +1221,13 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char) 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 (RL_SIG_RECEIVED()) + { + _rl_free_match_list (matches); + matches = 0; + RL_CHECK_SIGNALS (); + } if (matches || rl_attempted_completion_over) { @@ -1050,15 +1238,22 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char) /* XXX -- filename dequoting moved into rl_filename_completion_function */ + /* rl_completion_matches will check for signals as well to avoid a long + delay while reading a directory. */ matches = rl_completion_matches (text, our_func); + if (RL_SIG_RECEIVED()) + { + _rl_free_match_list (matches); + matches = 0; + RL_CHECK_SIGNALS (); + } return matches; } /* Filter out duplicates in MATCHES. This frees up the strings in MATCHES. */ static char ** -remove_duplicate_matches (matches) - char **matches; +remove_duplicate_matches (char **matches) { char *lowest_common; int i, j, newlen; @@ -1081,7 +1276,7 @@ remove_duplicate_matches (matches) { if (strcmp (matches[i], matches[i + 1]) == 0) { - free (matches[i]); + xfree (matches[i]); matches[i] = (char *)&dead_slot; } else @@ -1099,7 +1294,7 @@ remove_duplicate_matches (matches) temp_array[j] = (char *)NULL; if (matches[0] != (char *)&dead_slot) - free (matches[0]); + xfree (matches[0]); /* Place the lowest common denominator back in [0]. */ temp_array[0] = lowest_common; @@ -1109,7 +1304,7 @@ remove_duplicate_matches (matches) insert. */ if (j == 2 && strcmp (temp_array[0], temp_array[1]) == 0) { - free (temp_array[1]); + xfree (temp_array[1]); temp_array[1] = (char *)NULL; } return (temp_array); @@ -1118,18 +1313,17 @@ remove_duplicate_matches (matches) /* 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; +compute_lcd_of_matches (char **match_list, int matches, const char *text) { register int i, c1, c2, si; int low; /* Count of max-matched characters. */ + int lx; char *dtext; /* dequoted TEXT, if needed */ #if defined (HANDLE_MULTIBYTE) int v; + size_t v1, v2; mbstate_t ps1, ps2; - wchar_t wc1, wc2; + WCHAR_T wc1, wc2; #endif /* If only one match, just use that. Otherwise, compare each @@ -1151,44 +1345,33 @@ compute_lcd_of_matches (match_list, matches, text) memset (&ps2, 0, sizeof (mbstate_t)); } #endif - if (_rl_completion_case_fold) + for (si = 0; (c1 = match_list[i][si]) && (c2 = match_list[i + 1][si]); si++) { - 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) + if (_rl_completion_case_fold) { - 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; + c1 = _rl_to_lower (c1); + c2 = _rl_to_lower (c2); } - 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)) + v1 = MBRTOWC (&wc1, match_list[i]+si, strlen (match_list[i]+si), &ps1); + v2 = MBRTOWC (&wc2, match_list[i+1]+si, strlen (match_list[i+1]+si), &ps2); + if (MB_INVALIDCH (v1) || MB_INVALIDCH (v2)) + { + if (c1 != c2) /* do byte comparison */ + break; + continue; + } + if (_rl_completion_case_fold) + { + wc1 = towlower (wc1); + wc2 = towlower (wc2); + } + if (wc1 != wc2) break; - else if ((v = _rl_get_char_len (&match_list[i][si], &ps_back)) > 1) - si += v - 1; + else if (v1 > 1) + si += v1 - 1; } else #endif @@ -1239,24 +1422,24 @@ compute_lcd_of_matches (match_list, matches, text) } /* sort the list to get consistent answers. */ - qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare); + if (rl_sort_completion_matches) + 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); + lx = (si <= low) ? si : low; /* check shorter of text and matches */ + /* Try to preserve the case of what the user typed in the presence of + multiple matches: check each match for something that matches + what the user typed taking case into account; use it up to common + length of matches if one is found. If not, just use first match. */ + for (i = 1; i <= matches; i++) + if (strncmp (match_list[i], text, lx) == 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); FREE (dtext); } @@ -1270,9 +1453,7 @@ compute_lcd_of_matches (match_list, matches, text) } static int -postprocess_matches (matchesp, matching_filenames) - char ***matchesp; - int matching_filenames; +postprocess_matches (char ***matchesp, int matching_filenames) { char *t, **matches, **temp_matches; int nmatch, i; @@ -1283,12 +1464,12 @@ postprocess_matches (matchesp, matching_filenames) 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 + to ignore duplicate possibilities. 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); + xfree (matches); matches = temp_matches; } @@ -1325,16 +1506,31 @@ postprocess_matches (matchesp, matching_filenames) return (1); } +static int +complete_get_screenwidth (void) +{ + int cols; + char *envcols; + + cols = _rl_completion_columns; + if (cols >= 0 && cols <= _rl_screenwidth) + return cols; + envcols = getenv ("COLUMNS"); + if (envcols && *envcols) + cols = atoi (envcols); + if (cols >= 0 && cols <= _rl_screenwidth) + return cols; + return _rl_screenwidth; +} + /* 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; +rl_display_match_list (char **matches, int len, int max) { - int count, limit, printed_len, lines; + int count, limit, printed_len, lines, cols; int i, j, k, l, common_length, sind; char *temp, *t; @@ -1344,23 +1540,42 @@ rl_display_match_list (matches, len, max) if (_rl_completion_prefix_display_length > 0) { t = printable_part (matches[0]); - temp = strrchr (t, '/'); + /* check again in case of /usr/src/ */ + temp = rl_filename_completion_desired ? strrchr (t, '/') : 0; common_length = temp ? fnwidth (temp) : fnwidth (t); sind = temp ? strlen (temp) : strlen (t); + if (common_length > max || sind > max) + common_length = sind = 0; if (common_length > _rl_completion_prefix_display_length && common_length > ELLIPSIS_LEN) max -= common_length - ELLIPSIS_LEN; - else + else if (_rl_colored_completion_prefix <= 0) common_length = sind = 0; } +#if defined (COLOR_SUPPORT) + else if (_rl_colored_completion_prefix > 0) + { + t = printable_part (matches[0]); + temp = rl_filename_completion_desired ? strrchr (t, '/') : 0; + common_length = temp ? fnwidth (temp) : fnwidth (t); + sind = temp ? RL_STRLEN (temp+1) : RL_STRLEN (t); /* want portion after final slash */ + if (common_length > max || sind > max) + common_length = sind = 0; + } +#endif /* How many items of MAX length can we fit in the screen window? */ + cols = complete_get_screenwidth (); max += 2; - limit = _rl_screenwidth / max; - if (limit != 1 && (limit * max == _rl_screenwidth)) + limit = cols / max; + if (limit != 1 && (limit * max == cols)) limit--; - /* Avoid a possible floating exception. If max > _rl_screenwidth, + /* If cols == 0, limit will end up -1 */ + if (cols < _rl_screenwidth && limit < 0) + limit = 1; + + /* Avoid a possible floating exception. If max > cols, limit will be 0 and a divide-by-zero fault will result. */ if (limit == 0) limit = 1; @@ -1394,12 +1609,23 @@ rl_display_match_list (matches, len, max) printed_len = print_filename (temp, matches[l], sind); if (j + 1 < limit) - for (k = 0; k < max - printed_len; k++) - putc (' ', rl_outstream); + { + if (max <= printed_len) + putc (' ', rl_outstream); + else + for (k = 0; k < max - printed_len; k++) + putc (' ', rl_outstream); + } } l += count; } rl_crlf (); +#if defined (SIGWINCH) + if (RL_SIG_RECEIVED () && RL_SIGWINCH_RECEIVED() == 0) +#else + if (RL_SIG_RECEIVED ()) +#endif + return; lines++; if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count) { @@ -1417,9 +1643,15 @@ rl_display_match_list (matches, len, max) temp = printable_part (matches[i]); printed_len = print_filename (temp, matches[i], sind); /* Have we reached the end of this line? */ +#if defined (SIGWINCH) + if (RL_SIG_RECEIVED () && RL_SIGWINCH_RECEIVED() == 0) +#else + if (RL_SIG_RECEIVED ()) +#endif + return; if (matches[i+1]) { - if (i && (limit > 1) && (i % limit) == 0) + if (limit == 1 || (i && (limit > 1) && (i % limit) == 0)) { rl_crlf (); lines++; @@ -1430,6 +1662,8 @@ rl_display_match_list (matches, len, max) return; } } + else if (max <= printed_len) + putc (' ', rl_outstream); else for (k = 0; k < max - printed_len; k++) putc (' ', rl_outstream); @@ -1451,8 +1685,7 @@ rl_display_match_list (matches, len, max) 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; +display_matches (char **matches) { int len, max, i; char *temp; @@ -1518,11 +1751,9 @@ display_matches (matches) rl_display_fixed = 1; } +/* qc == pointer to quoting character, if any */ static char * -make_quoted_replacement (match, mtype, qc) - char *match; - int mtype; - char *qc; /* Pointer to quoting character, if any */ +make_quoted_replacement (char *match, int mtype, char *qc) { int should_quote, do_replace; char *replacement; @@ -1564,10 +1795,7 @@ make_quoted_replacement (match, mtype, qc) } static void -insert_match (match, start, mtype, qc) - char *match; - int start, mtype; - char *qc; +insert_match (char *match, int start, int mtype, char *qc) { char *replacement, *r; char oqc; @@ -1608,7 +1836,7 @@ insert_match (match, start, mtype, qc) else _rl_replace_text (replacement, start, end); if (replacement != match) - free (replacement); + xfree (replacement); } } @@ -1624,11 +1852,9 @@ insert_match (match, start, mtype, qc) 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; +append_to_match (char *text, int delimiter, int quote_char, int nontrivial_match) { - char temp_string[4], *filename; + char temp_string[4], *filename, *fn; int temp_string_index, s; struct stat finfo; @@ -1647,6 +1873,13 @@ append_to_match (text, delimiter, quote_char, nontrivial_match) if (rl_filename_completion_desired) { filename = tilde_expand (text); + if (rl_filename_stat_hook) + { + fn = savestring (filename); + (*rl_filename_stat_hook) (&fn); + xfree (filename); + filename = fn; + } s = (nontrivial_match && rl_completion_mark_symlink_dirs == 0) ? LSTAT (filename, &finfo) : stat (filename, &finfo); @@ -1666,8 +1899,7 @@ append_to_match (text, delimiter, quote_char, nontrivial_match) #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)) + else if (s == 0 && S_ISLNK (finfo.st_mode) && path_isdir (filename)) ; #endif else @@ -1675,7 +1907,7 @@ append_to_match (text, delimiter, quote_char, nontrivial_match) if (rl_point == rl_end && temp_string_index) rl_insert_text (temp_string); } - free (filename); + xfree (filename); } else { @@ -1687,10 +1919,7 @@ append_to_match (text, delimiter, quote_char, nontrivial_match) } static void -insert_all_matches (matches, point, qc) - char **matches; - int point; - char *qc; +insert_all_matches (char **matches, int point, char *qc) { int i; char *rp; @@ -1711,7 +1940,7 @@ insert_all_matches (matches, point, qc) rl_insert_text (rp); rl_insert_text (" "); if (rp != matches[i]) - free (rp); + xfree (rp); } } else @@ -1720,14 +1949,13 @@ insert_all_matches (matches, point, qc) rl_insert_text (rp); rl_insert_text (" "); if (rp != matches[0]) - free (rp); + xfree (rp); } rl_end_undo_group (); } void -_rl_free_match_list (matches) - char **matches; +_rl_free_match_list (char **matches) { register int i; @@ -1735,8 +1963,28 @@ _rl_free_match_list (matches) return; for (i = 0; matches[i]; i++) - free (matches[i]); - free (matches); + xfree (matches[i]); + xfree (matches); +} + +/* Compare a possibly-quoted filename TEXT from the line buffer and a possible + MATCH that is the product of filename completion, which acts on the dequoted + text. */ +static int +compare_match (char *text, const char *match) +{ + char *temp; + int r; + + if (rl_filename_completion_desired && rl_filename_quoting_desired && + rl_completion_found_quote && rl_filename_dequoting_function) + { + temp = (*rl_filename_dequoting_function) (text, rl_completion_quote_character); + r = strcmp (temp, match); + xfree (temp); + return r; + } + return (strcmp (text, match)); } /* Complete the word at or before point. @@ -1749,17 +1997,19 @@ _rl_free_match_list (matches) `@' 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; +rl_complete_internal (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; + int tlen, mlen, saved_last_completion_failed; RL_SETSTATE(RL_STATE_COMPLETING); + saved_last_completion_failed = last_completion_failed; + set_completion_defaults (what_to_do); saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL; @@ -1781,16 +2031,35 @@ rl_complete_internal (what_to_do) text = rl_copy_text (start, end); matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); + /* If TEXT contains quote characters, it will be dequoted as part of + generating the matches, and the matches will not contain any quote + characters. We need to dequote TEXT before performing the comparison. + Since compare_match performs the dequoting, and we only want to do it + once, we don't call compare_matches after dequoting TEXT; we call + strcmp directly. */ /* 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 (rl_filename_completion_desired && rl_filename_quoting_desired && + rl_completion_found_quote && rl_filename_dequoting_function) + { + char *t; + t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character); + xfree (text); + text = t; + nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; + } + else + nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; + if (what_to_do == '!' || what_to_do == '@') + tlen = strlen (text); + xfree (text); if (matches == 0) { rl_ding (); FREE (saved_line_buffer); completion_changed_buffer = 0; + last_completion_failed = 1; RL_UNSETSTATE(RL_STATE_COMPLETING); _rl_reset_completion_state (); return (0); @@ -1806,19 +2075,35 @@ rl_complete_internal (what_to_do) rl_ding (); FREE (saved_line_buffer); completion_changed_buffer = 0; + last_completion_failed = 1; RL_UNSETSTATE(RL_STATE_COMPLETING); _rl_reset_completion_state (); return (0); } + if (matches && matches[0] && *matches[0]) + last_completion_failed = 0; + switch (what_to_do) { case TAB: case '!': case '@': /* Insert the first match with proper quoting. */ - if (*matches[0]) + if (what_to_do == TAB) + { + if (*matches[0]) + insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + } + else if (*matches[0] && matches[1] == 0) + /* should we perform the check only if there are multiple matches? */ insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + else if (*matches[0]) /* what_to_do != TAB && multiple matches */ + { + mlen = *matches[0] ? strlen (matches[0]) : 0; + if (mlen >= tlen) + insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_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. @@ -1854,7 +2139,31 @@ rl_complete_internal (what_to_do) break; case '?': + /* Let's try to insert a single match here if the last completion failed + but this attempt returned a single match. */ + if (saved_last_completion_failed && matches[0] && *matches[0] && matches[1] == 0) + { + insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); + append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); + break; + } + + if (rl_completion_display_matches_hook == 0) + { + _rl_sigcleanup = _rl_complete_sigcleanup; + _rl_sigcleanarg = matches; + _rl_complete_display_matches_interrupt = 0; + } display_matches (matches); + if (_rl_complete_display_matches_interrupt) + { + matches = 0; /* already freed by rl_complete_sigcleanup */ + _rl_complete_display_matches_interrupt = 0; + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); /* XXX */ + } + _rl_sigcleanup = 0; + _rl_sigcleanarg = 0; break; default: @@ -1862,6 +2171,7 @@ rl_complete_internal (what_to_do) rl_ding (); FREE (saved_line_buffer); RL_UNSETSTATE(RL_STATE_COMPLETING); + _rl_free_match_list (matches); _rl_reset_completion_state (); return 1; } @@ -1872,11 +2182,13 @@ rl_complete_internal (what_to_do) if (saved_line_buffer) { completion_changed_buffer = strcmp (rl_line_buffer, saved_line_buffer) != 0; - free (saved_line_buffer); + xfree (saved_line_buffer); } RL_UNSETSTATE(RL_STATE_COMPLETING); _rl_reset_completion_state (); + + RL_CHECK_SIGNALS (); return 0; } @@ -1899,10 +2211,10 @@ rl_complete_internal (what_to_do) when there are no more matches. */ char ** -rl_completion_matches (text, entry_function) - const char *text; - rl_compentry_func_t *entry_function; +rl_completion_matches (const char *text, rl_compentry_func_t *entry_function) { + register int i; + /* Number of slots in match_list. */ int match_list_size; @@ -1920,18 +2232,36 @@ rl_completion_matches (text, entry_function) 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) + if (RL_SIG_RECEIVED ()) + { + /* Start at 1 because we don't set matches[0] in this function. + Only free the list members if we're building match list from + rl_filename_completion_function, since we know that doesn't + free the strings it returns. */ + if (entry_function == rl_filename_completion_function) + { + for (i = 1; match_list[i]; i++) + xfree (match_list[i]); + } + xfree (match_list); + match_list = 0; + match_list_size = 0; + matches = 0; + RL_CHECK_SIGNALS (); + } + + if (matches + 1 >= match_list_size) match_list = (char **)xrealloc (match_list, ((match_list_size += 10) + 1) * sizeof (char *)); + if (match_list == 0) + return (match_list); + 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]. */ @@ -1939,7 +2269,7 @@ rl_completion_matches (text, entry_function) compute_lcd_of_matches (match_list, matches, text); else /* There were no matches. */ { - free (match_list); + xfree (match_list); match_list = (char **)NULL; } return (match_list); @@ -1949,9 +2279,7 @@ rl_completion_matches (text, entry_function) TEXT contains a partial username preceded by a random character (usually `~'). */ char * -rl_username_completion_function (text, state) - const char *text; - int state; +rl_username_completion_function (const char *text, int state) { #if defined (__WIN32__) || defined (__OPENNT) return (char *)NULL; @@ -1970,7 +2298,9 @@ rl_username_completion_function (text, state) username = savestring (&text[first_char_loc]); namelen = strlen (username); +#if defined (HAVE_GETPWENT) setpwent (); +#endif } #if defined (HAVE_GETPWENT) @@ -2005,14 +2335,141 @@ rl_username_completion_function (text, state) #endif /* !__WIN32__ && !__OPENNT */ } +/* Return non-zero if CONVFN matches FILENAME up to the length of FILENAME + (FILENAME_LEN). If _rl_completion_case_fold is set, compare without + regard to the alphabetic case of characters. If + _rl_completion_case_map is set, make `-' and `_' equivalent. CONVFN is + the possibly-converted directory entry; FILENAME is what the user typed. */ +static int +complete_fncmp (const char *convfn, int convlen, const char *filename, int filename_len) +{ + register char *s1, *s2; + int d, len; +#if defined (HANDLE_MULTIBYTE) + size_t v1, v2; + mbstate_t ps1, ps2; + WCHAR_T wc1, wc2; +#endif + +#if defined (HANDLE_MULTIBYTE) + memset (&ps1, 0, sizeof (mbstate_t)); + memset (&ps2, 0, sizeof (mbstate_t)); +#endif + + if (filename_len == 0) + return 1; + if (convlen < filename_len) + return 0; + + len = filename_len; + s1 = (char *)convfn; + s2 = (char *)filename; + + /* Otherwise, if these match up to the length of filename, then + it is a match. */ + if (_rl_completion_case_fold && _rl_completion_case_map) + { + /* Case-insensitive comparison treating _ and - as equivalent */ +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + do + { + v1 = MBRTOWC (&wc1, s1, convlen, &ps1); + v2 = MBRTOWC (&wc2, s2, filename_len, &ps2); + if (v1 == 0 && v2 == 0) + return 1; + else if (MB_INVALIDCH (v1) || MB_INVALIDCH (v2)) + { + if (*s1 != *s2) /* do byte comparison */ + return 0; + else if ((*s1 == '-' || *s1 == '_') && (*s2 == '-' || *s2 == '_')) + return 0; + s1++; s2++; len--; + continue; + } + wc1 = towlower (wc1); + wc2 = towlower (wc2); + s1 += v1; + s2 += v1; + len -= v1; + if ((wc1 == L'-' || wc1 == L'_') && (wc2 == L'-' || wc2 == L'_')) + continue; + if (wc1 != wc2) + return 0; + } + while (len != 0); + } + else +#endif + { + do + { + d = _rl_to_lower (*s1) - _rl_to_lower (*s2); + /* *s1 == [-_] && *s2 == [-_] */ + if ((*s1 == '-' || *s1 == '_') && (*s2 == '-' || *s2 == '_')) + d = 0; + if (d != 0) + return 0; + s1++; s2++; /* already checked convlen >= filename_len */ + } + while (--len != 0); + } + + return 1; + } + else if (_rl_completion_case_fold) + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + do + { + v1 = MBRTOWC (&wc1, s1, convlen, &ps1); + v2 = MBRTOWC (&wc2, s2, filename_len, &ps2); + if (v1 == 0 && v2 == 0) + return 1; + else if (MB_INVALIDCH (v1) || MB_INVALIDCH (v2)) + { + if (*s1 != *s2) /* do byte comparison */ + return 0; + s1++; s2++; len--; + continue; + } + wc1 = towlower (wc1); + wc2 = towlower (wc2); + if (wc1 != wc2) + return 0; + s1 += v1; + s2 += v1; + len -= v1; + } + while (len != 0); + return 1; + } + else +#endif + if ((_rl_to_lower (convfn[0]) == _rl_to_lower (filename[0])) && + (convlen >= filename_len) && + (_rl_strnicmp (filename, convfn, filename_len) == 0)) + return 1; + } + else + { + if ((convfn[0] == filename[0]) && + (convlen >= filename_len) && + (strncmp (filename, convfn, filename_len) == 0)) + return 1; + } + return 0; +} + /* 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; +rl_filename_completion_function (const char *text, int state) { static DIR *directory = (DIR *)NULL; static char *filename = (char *)NULL; @@ -2021,6 +2478,7 @@ rl_filename_completion_function (text, state) static int filename_len; char *temp, *dentry, *convfn; int dirlen, dentlen, convlen; + int tilde_dirname; struct dirent *entry; /* If we don't have any state, then do some initialization. */ @@ -2044,7 +2502,7 @@ rl_filename_completion_function (text, state) temp = strrchr (dirname, '/'); -#if defined (__MSDOS__) +#if defined (__MSDOS__) || defined (_WIN32) /* special hack for //X/... */ if (dirname[0] == '/' && dirname[1] == '/' && ISALPHA ((unsigned char)dirname[2]) && dirname[3] == '/') temp = strrchr (dirname + 3, '/'); @@ -2055,7 +2513,7 @@ rl_filename_completion_function (text, state) strcpy (filename, ++temp); *temp = '\0'; } -#if defined (__MSDOS__) +#if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN__)) /* searches from current directory on the drive */ else if (ISALPHA ((unsigned char)dirname[0]) && dirname[1] == ':') { @@ -2071,41 +2529,53 @@ rl_filename_completion_function (text, state) /* 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); + /* Save the version of the directory that the user typed, dequoting + it if necessary. */ + if (rl_completion_found_quote && rl_filename_dequoting_function) + users_dirname = (*rl_filename_dequoting_function) (dirname, rl_completion_quote_character); + else + users_dirname = savestring (dirname); + tilde_dirname = 0; if (*dirname == '~') { temp = tilde_expand (dirname); - free (dirname); + xfree (dirname); dirname = temp; + tilde_dirname = 1; } + /* We have saved the possibly-dequoted version of the directory name + the user typed. Now transform the directory name we're going to + pass to opendir(2). The directory rewrite hook modifies only the + directory name; the directory completion hook modifies both the + directory name passed to opendir(2) and the version the user + typed. Both the directory completion and rewrite hooks should perform + any necessary dequoting. The hook functions return 1 if they modify + the directory name argument. If either hook returns 0, it should + not modify the directory name pointer passed as an argument. */ 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)) + else if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname)) { - free (users_dirname); + xfree (users_dirname); users_dirname = savestring (dirname); } - else if (rl_completion_found_quote && rl_filename_dequoting_function) + else if (tilde_dirname == 0 && 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; + xfree (dirname); + dirname = savestring (users_dirname); } directory = opendir (dirname); - /* Now dequote a non-null filename. */ - if (filename && *filename && rl_completion_found_quote && rl_filename_dequoting_function) + /* Now dequote a non-null filename. FILENAME will not be NULL, but may + be empty. */ + if (*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); + xfree (filename); filename = temp; } filename_len = strlen (filename); @@ -2138,7 +2608,7 @@ rl_filename_completion_function (text, state) All other entries except "." and ".." match. */ if (filename_len == 0) { - if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name)) + if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn)) continue; if (convfn[0] != '.' || @@ -2147,22 +2617,8 @@ rl_filename_completion_function (text, state) } 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 (complete_fncmp (convfn, convlen, filename, filename_len)) + break; } } @@ -2175,17 +2631,17 @@ rl_filename_completion_function (text, state) } if (dirname) { - free (dirname); + xfree (dirname); dirname = (char *)NULL; } if (filename) { - free (filename); + xfree (filename); filename = (char *)NULL; } if (users_dirname) { - free (users_dirname); + xfree (users_dirname); users_dirname = (char *)NULL; } @@ -2219,13 +2675,13 @@ rl_filename_completion_function (text, state) temp[dirlen++] = '/'; } - strcpy (temp + dirlen, entry->d_name); + strcpy (temp + dirlen, convfn); } else temp = savestring (convfn); if (convfn != dentry) - free (convfn); + xfree (convfn); return (temp); } @@ -2241,8 +2697,7 @@ rl_filename_completion_function (text, state) 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_old_menu_complete (int count, int invoking_key) { rl_compentry_func_t *our_func; int matching_filenames, found_quote; @@ -2304,14 +2759,14 @@ rl_old_menu_complete (count, invoking_key) if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) { - rl_ding (); + 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); + completion_changed_buffer = 0; + RL_UNSETSTATE(RL_STATE_COMPLETING); + return (0); } RL_UNSETSTATE(RL_STATE_COMPLETING); @@ -2340,7 +2795,10 @@ rl_old_menu_complete (count, invoking_key) match_list_index += count; if (match_list_index < 0) - match_list_index += match_list_size; + { + while (match_list_index < 0) + match_list_index += match_list_size; + } else match_list_index %= match_list_size; @@ -2353,16 +2811,24 @@ rl_old_menu_complete (count, invoking_key) { insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); append_to_match (matches[match_list_index], delimiter, quote_char, - strcmp (orig_text, matches[match_list_index])); + compare_match (orig_text, matches[match_list_index])); } completion_changed_buffer = 1; return (0); } +/* The current version of menu completion. + The differences between this function and the original are: + +1. It honors the maximum number of completions variable (completion-query-items) +2. It appends to the word as usual if there is only one match +3. It displays the common prefix if there is one, and makes it the first menu + choice if the menu-complete-display-prefix option is enabled +*/ + int -rl_menu_complete (count, ignore) - int count, ignore; +rl_menu_complete (int count, int ignore) { rl_compentry_func_t *our_func; int matching_filenames, found_quote; @@ -2375,7 +2841,7 @@ rl_menu_complete (count, ignore) 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; + static int delimiter, cstate; /* The first time through, we generate the list of matches and set things up to insert them. */ @@ -2419,7 +2885,7 @@ rl_menu_complete (count, ignore) 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; + nontrivial_lcd = matches && compare_match (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 @@ -2428,14 +2894,14 @@ rl_menu_complete (count, ignore) if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) { - rl_ding (); + 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); + completion_changed_buffer = 0; + RL_UNSETSTATE(RL_STATE_COMPLETING); + return (0); } RL_UNSETSTATE(RL_STATE_COMPLETING); @@ -2476,6 +2942,11 @@ rl_menu_complete (count, ignore) full_completion = 1; return (0); } + else if (_rl_menu_complete_prefix_first) + { + rl_ding (); + return (0); + } } else if (match_list_size <= 1) { @@ -2483,6 +2954,11 @@ rl_menu_complete (count, ignore) full_completion = 1; return (0); } + else if (_rl_menu_complete_prefix_first && match_list_size > 1) + { + rl_ding (); + return (0); + } } /* Now we have the list of matches. Replace the text between @@ -2500,7 +2976,10 @@ rl_menu_complete (count, ignore) match_list_index += count; if (match_list_index < 0) - match_list_index += match_list_size; + { + while (match_list_index < 0) + match_list_index += match_list_size; + } else match_list_index %= match_list_size; @@ -2513,7 +2992,7 @@ rl_menu_complete (count, ignore) { insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); append_to_match (matches[match_list_index], delimiter, quote_char, - strcmp (orig_text, matches[match_list_index])); + compare_match (orig_text, matches[match_list_index])); } completion_changed_buffer = 1; @@ -2521,8 +3000,7 @@ rl_menu_complete (count, ignore) } int -rl_backward_menu_complete (count, key) - int count, key; +rl_backward_menu_complete (int count, int key) { /* Positive arguments to backward-menu-complete translate into negative arguments for menu-complete, and vice versa. */ diff --git a/lib/readline/display.c b/lib/readline/display.c index e4105ee..ad573f9 100644 --- a/lib/readline/display.c +++ b/lib/readline/display.c @@ -1,6 +1,6 @@ /* display.c -- readline redisplay facility. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 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. @@ -41,6 +41,10 @@ #include +#ifdef __MSDOS__ +# include +#endif + /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" @@ -59,21 +63,36 @@ 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)); +static void putc_face (int, int, char *); +static void puts_face (const char *, const char *, int); +static void norm_face (char *, int); + +static void update_line (char *, char *, char *, char *, int, int, int, int); +static void space_to_eol (int); +static void delete_chars (int); +static void insert_some_chars (char *, int, int); +static void open_some_spaces (int); +static void cr (void); +static void redraw_prompt (char *); +static void _rl_move_cursor_relative (int, const char *, const char *); + +/* Values for FLAGS */ +#define PMT_MULTILINE 0x01 + +static char *expand_prompt (char *, int, int *, int *, int *, int *); + +#define DEFAULT_LINE_BUFFER_SIZE 1024 /* State of visible and invisible lines. */ struct line_state { char *line; + char *lface; int *lbreaks; int lbsize; #if defined (HANDLE_MULTIBYTE) - int *wrapped_line; int wbsize; + int *wrapped_line; #endif }; @@ -91,10 +110,12 @@ static int line_structures_initialized = 0; #define vis_lbsize (line_state_visible->lbsize) #define visible_line (line_state_visible->line) +#define vis_face (line_state_visible->lface) #define invisible_line (line_state_invisible->line) +#define inv_face (line_state_invisible->lface) #if defined (HANDLE_MULTIBYTE) -static int _rl_col_width PARAMS((const char *, int, int, int)); +static int _rl_col_width (const char *, int, int, int); #else # define _rl_col_width(l, s, e, f) (((e) <= (s)) ? 0 : (e) - (s)) #endif @@ -108,10 +129,15 @@ static int _rl_col_width PARAMS((const char *, int, int, int)); 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. */ +/* XXX - only valid when tested against _rl_last_c_pos; buffer indices need + to use prompt_last_invisible directly. */ #define PROMPT_ENDING_INDEX \ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1) - +#define FACE_NORMAL '0' +#define FACE_STANDOUT '1' +#define FACE_INVALID ((char)1) + /* **************************************************************** */ /* */ /* Display stuff */ @@ -146,15 +172,26 @@ rl_voidfunc_t *rl_redisplay_function = rl_redisplay; /* 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; +/* Variables used to include the editing mode in the prompt. */ +char *_rl_emacs_mode_str; +int _rl_emacs_modestr_len; + +char *_rl_vi_ins_mode_str; +int _rl_vi_ins_modestr_len; + +char *_rl_vi_cmd_mode_str; +int _rl_vi_cmd_modestr_len; + /* Pseudo-global variables declared here. */ +/* Hints for other parts of readline to give to the display engine. */ +int _rl_suppress_redisplay = 0; +int _rl_want_redisplay = 0; + /* 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 @@ -163,12 +200,27 @@ char *rl_display_prompt = (char *)NULL; int _rl_last_c_pos = 0; int _rl_last_v_pos = 0; +/* Number of physical lines consumed by the current line buffer currently + on screen minus 1. */ +int _rl_vis_botlin = 0; + +static int _rl_quick_redisplay = 0; + +/* This is a hint update_line gives to rl_redisplay that it has adjusted the + value of _rl_last_c_pos *and* taken the presence of any invisible chars in + the prompt into account. rl_redisplay notes this and does not do the + adjustment itself. */ static int cpos_adjusted; + +/* The index into the line buffer corresponding to the cursor position */ static int cpos_buffer_position; + +/* A flag to note when we're displaying the first line of the prompt */ +static int displaying_prompt_first_line; +/* The number of multibyte characters in the prompt, if any */ static int prompt_multibyte_chars; -/* Number of lines currently on screen minus 1. */ -int _rl_vis_botlin = 0; +static int _rl_inv_botlin = 0; /* Variables used only in this file. */ /* The last left edge of text that was displayed. This is used when @@ -176,20 +228,29 @@ int _rl_vis_botlin = 0; static int last_lmargin; /* A buffer for `modeline' messages. */ -static char msg_buf[128]; +static char *msg_buf = 0; +static int msg_bufsiz = 0; /* 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; +static int line_size = 0; + +/* Set to a non-zero value if horizontal scrolling has been enabled + automatically because the terminal was resized to height 1. */ +static int horizontal_scrolling_autoset = 0; /* explicit initialization */ /* 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; +static int prompt_prefix_length; +/* Number of chars in the buffer that contribute to visible chars on the screen. + This might be different from the number of physical chars in the presence + of multibyte characters */ +static int prompt_visible_length; /* The number of invisible characters in the line currently being displayed on the screen. */ @@ -215,16 +276,26 @@ static int prompt_last_screen_line; static int prompt_physical_chars; +/* An array of indexes into the prompt string where we will break physical + screen lines. It's easier to compute in expand_prompt and use later in + rl_redisplay instead of having rl_redisplay try to guess about invisible + characters in the prompt or use heuristics about where they are. */ +static int *local_prompt_newlines; + /* 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; +static int line_totbytes; + /* 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_local_prompt_newlines; + static int saved_last_invisible; static int saved_visible_length; static int saved_prefix_length; @@ -232,13 +303,39 @@ static int saved_local_length; static int saved_invis_chars_first_line; static int saved_physical_chars; +/* Return a string indicating the editing mode, for use in the prompt. */ + +static char * +prompt_modestr (int *lenp) +{ + if (rl_editing_mode == emacs_mode) + { + if (lenp) + *lenp = _rl_emacs_mode_str ? _rl_emacs_modestr_len : RL_EMACS_MODESTR_DEFLEN; + return _rl_emacs_mode_str ? _rl_emacs_mode_str : RL_EMACS_MODESTR_DEFAULT; + } + else if (_rl_keymap == vi_insertion_keymap) + { + if (lenp) + *lenp = _rl_vi_ins_mode_str ? _rl_vi_ins_modestr_len : RL_VI_INS_MODESTR_DEFLEN; + return _rl_vi_ins_mode_str ? _rl_vi_ins_mode_str : RL_VI_INS_MODESTR_DEFAULT; /* vi insert mode */ + } + else + { + if (lenp) + *lenp = _rl_vi_cmd_mode_str ? _rl_vi_cmd_modestr_len : RL_VI_CMD_MODESTR_DEFLEN; + return _rl_vi_cmd_mode_str ? _rl_vi_cmd_mode_str : RL_VI_CMD_MODESTR_DEFAULT; /* vi command mode */ + } +} + /* 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. */ + into a character buffer. *VLP gets the number of physical characters in + the expanded prompt (visible length) */ /* Current implementation: \001 (^A) start non-visible characters @@ -247,37 +344,85 @@ static int saved_physical_chars; the returned string; all characters except those between \001 and \002 are assumed to be `visible'. */ +/* Possible values for FLAGS: + PMT_MULTILINE caller indicates that this is part of a multiline prompt +*/ + +/* This approximates the number of lines the prompt will take when displayed */ +#define APPROX_DIV(n, d) (((n) < (d)) ? 1 : ((n) / (d)) + 1) + static char * -expand_prompt (pmt, lp, lip, niflp, vlp) - char *pmt; - int *lp, *lip, *niflp, *vlp; +expand_prompt (char *pmt, int flags, int *lp, int *lip, int *niflp, int *vlp) { - char *r, *ret, *p, *igstart; + char *r, *ret, *p, *igstart, *nprompt, *ms; int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars; + int mlen, newlines, newlines_guess, bound, can_add_invis; + int mb_cur_max; - /* Short-circuit if we can. */ - if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0) + /* We only expand the mode string for the last line of a multiline prompt + (a prompt with embedded newlines). */ + ms = (((pmt == rl_prompt) ^ (flags & PMT_MULTILINE)) && _rl_show_mode_in_prompt) ? prompt_modestr (&mlen) : 0; + if (ms) { - 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); + nprompt = (char *)xmalloc (l + mlen + 1); + memcpy (nprompt, ms, mlen); + strcpy (nprompt + mlen, pmt); } + else + nprompt = pmt; + + can_add_invis = 0; + mb_cur_max = MB_CUR_MAX; + + if (_rl_screenwidth == 0) + _rl_get_screen_size (0, 0); /* avoid division by zero */ - l = strlen (pmt); + /* Short-circuit if we can. We can do this if we are treating the prompt as + a sequence of bytes and there are no invisible characters in the prompt + to deal with. Since we populate local_prompt_newlines, we have to run + through the rest of the function if this prompt looks like it's going to + be longer than one screen line. */ + if ((mb_cur_max <= 1 || rl_byte_oriented) && strchr (nprompt, RL_PROMPT_START_IGNORE) == 0) + { + l = strlen (nprompt); + if (l < (_rl_screenwidth > 0 ? _rl_screenwidth : 80)) + { + r = (nprompt == pmt) ? savestring (pmt) : nprompt; + if (lp) + *lp = l; + if (lip) + *lip = 0; + if (niflp) + *niflp = 0; + if (vlp) + *vlp = l; + + local_prompt_newlines = (int *) xrealloc (local_prompt_newlines, sizeof (int) * 2); + local_prompt_newlines[0] = 0; + local_prompt_newlines[1] = -1; + + return r; + } + } + + l = strlen (nprompt); /* XXX */ r = ret = (char *)xmalloc (l + 1); - invfl = 0; /* invisible chars in first line of prompt */ - invflset = 0; /* we only want to set invfl once */ + /* Guess at how many screen lines the prompt will take to size the array that + keeps track of where the line wraps happen */ + newlines_guess = (_rl_screenwidth > 0) ? APPROX_DIV(l, _rl_screenwidth) : APPROX_DIV(l, 80); + local_prompt_newlines = (int *) xrealloc (local_prompt_newlines, sizeof (int) * (newlines_guess + 1)); + local_prompt_newlines[newlines = 0] = 0; + for (rl = 1; rl <= newlines_guess; rl++) + local_prompt_newlines[rl] = -1; + + rl = physchars = 0; /* mode string now part of nprompt */ + invfl = 0; /* invisible chars in first line of prompt */ + invflset = 0; /* we only want to set invfl once */ + igstart = 0; /* we're not ignoring any characters yet */ - igstart = 0; - for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++) + for (ignoring = last = ninvis = 0, p = nprompt; p && *p; p++) { /* This code strips the invisible character string markers RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */ @@ -290,6 +435,19 @@ expand_prompt (pmt, lp, lip, niflp, vlp) else if (ignoring && *p == RL_PROMPT_END_IGNORE) { ignoring = 0; + /* If we have a run of invisible characters, adjust local_prompt_newlines + to add them, since update_line expects them to be counted before + wrapping the line. */ + if (can_add_invis) + { + local_prompt_newlines[newlines] = r - ret; + /* If we're adding to the number of invisible characters on the + first line of the prompt, but we've already set the number of + invisible characters on that line, we need to adjust the + counter. */ + if (invflset && newlines == 1) + invfl = ninvis; + } if (p != (igstart + 1)) last = r - ret - 1; continue; @@ -297,10 +455,10 @@ expand_prompt (pmt, lp, lip, niflp, vlp) else { #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + if (mb_cur_max > 1 && rl_byte_oriented == 0) { - pind = p - pmt; - ind = _rl_find_next_mbchar (pmt, pind, 1, MB_FIND_NONZERO); + pind = p - nprompt; + ind = _rl_find_next_mbchar (nprompt, pind, 1, MB_FIND_NONZERO); l = ind - pind; while (l--) *r++ = *p++; @@ -312,7 +470,7 @@ expand_prompt (pmt, lp, lip, niflp, vlp) 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); + physchars += _rl_col_width (nprompt, pind, ind, 0); } else ninvis += ind - pind; @@ -331,15 +489,40 @@ expand_prompt (pmt, lp, lip, niflp, vlp) ninvis++; /* invisible chars byte counter */ } - if (invflset == 0 && rl >= _rl_screenwidth) + if (invflset == 0 && physchars >= _rl_screenwidth) { invfl = ninvis; invflset = 1; } + + if (physchars >= (bound = (newlines + 1) * _rl_screenwidth) && local_prompt_newlines[newlines+1] == -1) + { + int new; + if (physchars > bound) /* should rarely happen */ + { +#if defined (HANDLE_MULTIBYTE) + *r = '\0'; /* need null-termination for strlen */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) + new = _rl_find_prev_mbchar (ret, r - ret, MB_FIND_ANY); + else +#endif + new = r - ret - (physchars - bound); /* XXX */ + } + else + new = r - ret; + local_prompt_newlines[++newlines] = new; + } + + /* What if a physical character of width >= 2 is split? There is + code that wraps before the physical screen width if the character + width would exceed it, but it needs to be checked against this + code and local_prompt_newlines[]. */ + if (ignoring == 0) + can_add_invis = (physchars == bound); } } - if (rl < _rl_screenwidth) + if (rl <= _rl_screenwidth) invfl = ninvis; *r = '\0'; @@ -351,21 +534,30 @@ expand_prompt (pmt, lp, lip, niflp, vlp) *niflp = invfl; if (vlp) *vlp = physchars; + + if (nprompt != pmt) + xfree (nprompt); + 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; +_rl_strip_prompt (char *pmt) { char *ret; - ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL); + ret = expand_prompt (pmt, 0, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL); return ret; } +void +_rl_reset_prompt (void) +{ + rl_visible_prompt_length = rl_expand_prompt (rl_prompt); +} + /* * Expand the prompt string into the various display components, if * necessary. @@ -377,15 +569,20 @@ _rl_strip_prompt (pmt) * prompt_visible_length = number of visible characters in local_prompt * prompt_prefix_length = number of visible characters in local_prompt_prefix * + * It also tries to keep track of the number of invisible characters in the + * prompt string, and where they are. + * * 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. + * of the (possibly multi-line) prompt. In this case, multi-line means + * there are embedded newlines in the prompt string itself, not that the + * number of physical characters exceeds the screen width and the prompt + * wraps. */ int -rl_expand_prompt (prompt) - char *prompt; +rl_expand_prompt (char *prompt) { char *p, *t; int c; @@ -403,13 +600,13 @@ rl_expand_prompt (prompt) return (0); p = strrchr (prompt, '\n'); - if (!p) + if (p == 0) { /* 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 = expand_prompt (prompt, 0, &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); @@ -418,55 +615,76 @@ rl_expand_prompt (prompt) { /* 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, + local_prompt_prefix = expand_prompt (prompt, PMT_MULTILINE, + &prompt_prefix_length, (int *)NULL, (int *)NULL, (int *)NULL); *t = c; + + local_prompt = expand_prompt (p, PMT_MULTILINE, + &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line, + &prompt_physical_chars); local_prompt_len = local_prompt ? strlen (local_prompt) : 0; return (prompt_prefix_length); } } +/* Allocate the various line structures, making sure they can hold MINSIZE + bytes. If the existing line size can accommodate MINSIZE bytes, don't do + anything. */ +static void +realloc_line (int minsize) +{ + int minimum_size; + int newsize, delta; + + minimum_size = DEFAULT_LINE_BUFFER_SIZE; + if (minsize < minimum_size) + minsize = minimum_size; + if (minsize <= _rl_screenwidth) /* XXX - for gdb */ + minsize = _rl_screenwidth + 1; + if (line_size >= minsize) + return; + + newsize = minimum_size; + while (newsize < minsize) + newsize *= 2; + + visible_line = (char *)xrealloc (visible_line, newsize); + vis_face = (char *)xrealloc (vis_face, newsize); + + invisible_line = (char *)xrealloc (invisible_line, newsize); + inv_face = (char *)xrealloc (inv_face, newsize); + + delta = newsize - line_size; + memset (visible_line + line_size, 0, delta); + memset (vis_face + line_size, FACE_NORMAL, delta); + memset (invisible_line + line_size, 1, delta); + memset (inv_face + line_size, FACE_INVALID, delta); + + line_size = newsize; +} + /* 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; +init_line_structures (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 (line_size > minsize) + minsize = line_size; } + realloc_line (minsize); if (vis_lbreaks == 0) { @@ -488,18 +706,71 @@ init_line_structures (minsize) line_structures_initialized = 1; } - -/* Basic redisplay algorithm. */ + +/* Convenience functions to add chars to the invisible line that update the + face information at the same time. */ +static void /* XXX - change this */ +invis_addc (int *outp, char c, char face) +{ + realloc_line (*outp + 1); + invisible_line[*outp] = c; + inv_face[*outp] = face; + *outp += 1; +} + +static void +invis_adds (int *outp, const char *str, int n, char face) +{ + int i; + + for (i = 0; i < n; i++) + invis_addc (outp, str[i], face); +} + +static void +invis_nul (int *outp) +{ + invis_addc (outp, '\0', 0); + *outp -= 1; +} + +static void +set_active_region (int *beg, int *end) +{ + if (rl_point >= 0 && rl_point <= rl_end && rl_mark >= 0 && rl_mark <= rl_end) + { + *beg = (rl_mark < rl_point) ? rl_mark : rl_point; + *end = (rl_mark < rl_point) ? rl_point : rl_mark; + } +} + +/* Do whatever tests are necessary and tell update_line that it can do a + quick, dumb redisplay on the assumption that there are so many + differences between the old and new lines that it would be a waste to + compute all the differences. + Right now, it just sets _rl_quick_redisplay if the current visible line + is a single line (so we don't have to move vertically or mess with line + wrapping). */ +void +_rl_optimize_redisplay (void) +{ + if (_rl_vis_botlin == 0) + _rl_quick_redisplay = 1; +} + +/* Basic redisplay algorithm. See comments inline. */ void -rl_redisplay () +rl_redisplay (void) { - register int in, out, c, linenum, cursor_linenum; - register char *line; + int in, out, c, linenum, cursor_linenum; int inv_botlin, lb_botlin, lb_linenum, o_cpos; int newlines, lpos, temp, n0, num, prompt_lines_estimate; char *prompt_this_line; + char cur_face; + int hl_begin, hl_end; + int mb_cur_max = MB_CUR_MAX; #if defined (HANDLE_MULTIBYTE) - wchar_t wc; + WCHAR_T wc; size_t wc_bytes; int wc_width; mbstate_t ps; @@ -514,6 +785,14 @@ rl_redisplay () _rl_block_sigint (); RL_SETSTATE (RL_STATE_REDISPLAYING); + cur_face = FACE_NORMAL; + /* Can turn this into an array for multiple highlighted objects in addition + to the region */ + hl_begin = hl_end = -1; + + if (rl_mark_active_p ()) + set_active_region (&hl_begin, &hl_end); + if (!rl_display_prompt) rl_display_prompt = ""; @@ -522,13 +801,26 @@ rl_redisplay () init_line_structures (0); rl_on_new_line (); } + else if (line_size <= _rl_screenwidth) + init_line_structures (_rl_screenwidth + 1); + + /* Enable horizontal scrolling automatically for terminals of height 1 + where wrapping lines doesn't work. Disable it as soon as the terminal + height is increased again if it was automatically enabled. */ + if (_rl_screenheight <= 1) + { + if (_rl_horizontal_scroll_mode == 0) + horizontal_scrolling_autoset = 1; + _rl_horizontal_scroll_mode = 1; + } + else if (horizontal_scrolling_autoset) + _rl_horizontal_scroll_mode = 0; /* 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 @@ -536,8 +828,8 @@ rl_redisplay () modmark = 0; if (_rl_mark_modified_lines && current_history () && rl_undo_list) { - line[out++] = '*'; - line[out] = '\0'; + invis_addc (&out, '*', cur_face); + invis_nul (&out); modmark = 1; } @@ -550,25 +842,19 @@ rl_redisplay () /* 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. */ + number of non-visible characters (bytes) in the prompt string. */ + /* This is where we output the characters in the prompt before the last + newline, if any. If there aren't any embedded newlines, we don't + write anything. Copy the last line of the prompt string into the line in + any case */ 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'; + invis_adds (&out, local_prompt, local_prompt_len, cur_face); + invis_nul (&out); wrap_offset = local_prompt_len - prompt_visible_length; } else @@ -591,20 +877,13 @@ rl_redisplay () } } - 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'; + prompt_physical_chars = pmtlen = strlen (prompt_this_line); /* XXX */ + invis_adds (&out, prompt_this_line, pmtlen, cur_face); + invis_nul (&out); wrap_offset = prompt_invis_chars_first_line = 0; } +#if defined (HANDLE_MULTIBYTE) #define CHECK_INV_LBREAKS() \ do { \ if (newlines >= (inv_lbsize - 2)) \ @@ -612,7 +891,22 @@ rl_redisplay () inv_lbsize *= 2; \ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ } \ + if (newlines >= (line_state_invisible->wbsize - 2)) \ + { \ + line_state_invisible->wbsize *= 2; \ + line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \ + } \ } while (0) +#else +#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) +#endif /* !HANDLE_MULTIBYTE */ #if defined (HANDLE_MULTIBYTE) #define CHECK_LPOS() \ @@ -626,7 +920,7 @@ rl_redisplay () inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ } \ inv_lbreaks[++newlines] = out; \ - if (newlines >= (line_state_invisible->wbsize - 1)) \ + if (newlines >= (line_state_invisible->wbsize - 2)) \ { \ line_state_invisible->wbsize *= 2; \ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \ @@ -654,6 +948,11 @@ rl_redisplay () /* inv_lbreaks[i] is where line i starts in the buffer. */ inv_lbreaks[newlines = 0] = 0; + /* lpos is a physical cursor position, so it needs to be adjusted by the + number of invisible characters in the prompt, per line. We compute + the line breaks in the prompt string in expand_prompt, taking invisible + characters into account, and if lpos exceeds the screen width, we copy + the data in the loop below. */ lpos = prompt_physical_chars + modmark; #if defined (HANDLE_MULTIBYTE) @@ -661,80 +960,55 @@ rl_redisplay () 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. */ + /* prompt_invis_chars_first_line is the number of invisible characters (bytes) + in the first physical line of the prompt. + wrap_offset - prompt_invis_chars_first_line is usually 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 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 */ -#if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0) + if (lpos >= _rl_screenwidth) + { + temp = 0; + + /* first copy the linebreaks array we computed in expand_prompt */ + while (local_prompt_newlines[newlines+1] != -1) { - 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); + temp = local_prompt_newlines[newlines+1]; + inv_lbreaks[++newlines] = temp; + } + + /* Now set lpos from the last newline */ + if (mb_cur_max > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0) + lpos = _rl_col_width (local_prompt, temp, local_prompt_len, 1) - (wrap_offset - prompt_invis_chars_first_line); else -#endif - lpos -= _rl_screenwidth; + lpos -= (_rl_screenwidth * newlines); } 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). + 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) + 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); + if (_rl_utf8locale && UTF8_SINGLEBYTE(rl_line_buffer[0])) + { + wc = (WCHAR_T)rl_line_buffer[0]; + wc_bytes = 1; + } + else + wc_bytes = MBRTOWC (&wc, rl_line_buffer, rl_end, &ps); } else wc_bytes = 1; @@ -743,10 +1017,15 @@ rl_redisplay () for (in = 0; in < rl_end; in++) #endif { + if (in == hl_begin) + cur_face = FACE_STANDOUT; + else if (in == hl_end) + cur_face = FACE_NORMAL; + c = (unsigned char)rl_line_buffer[in]; #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + if (mb_cur_max > 1 && rl_byte_oriented == 0) { if (MB_INVALIDCH (wc_bytes)) { @@ -761,20 +1040,12 @@ rl_redisplay () break; /* Found '\0' */ else { - temp = wcwidth (wc); + 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; @@ -789,23 +1060,33 @@ rl_redisplay () { if (_rl_output_meta_chars == 0) { - sprintf (line + out, "\\%o", c); + char obuf[5]; + int olen; - if (lpos + 4 >= _rl_screenwidth) + olen = sprintf (obuf, "\\%o", c); + + if (lpos + olen >= _rl_screenwidth) { temp = _rl_screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp; - lpos = 4 - temp; +#if defined (HANDLE_MULTIBYTE) + line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; +#endif + lpos = olen - temp; } else - lpos += 4; + lpos += olen; - out += 4; + for (temp = 0; temp < olen; temp++) + { + invis_addc (&out, obuf[temp], cur_face); + CHECK_LPOS (); + } } else { - line[out++] = c; + invis_addc (&out, c, cur_face); CHECK_LPOS(); } } @@ -814,11 +1095,7 @@ rl_redisplay () { 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) { @@ -826,36 +1103,42 @@ rl_redisplay () temp2 = _rl_screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp2; +#if defined (HANDLE_MULTIBYTE) + line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; +#endif lpos = temp - temp2; while (out < newout) - line[out++] = ' '; + invis_addc (&out, ' ', cur_face); } else { while (out < newout) - line[out++] = ' '; + invis_addc (&out, ' ', cur_face); lpos += temp; } } #endif else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { - line[out++] = '\0'; /* XXX - sentinel */ + invis_addc (&out, '\0', cur_face); CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out; +#if defined (HANDLE_MULTIBYTE) + line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; +#endif lpos = 0; } else if (CTRL_CHAR (c) || c == RUBOUT) { - line[out++] = '^'; + invis_addc (&out, '^', cur_face); CHECK_LPOS(); - line[out++] = CTRL_CHAR (c) ? UNCTRL (c) : '?'; + invis_addc (&out, CTRL_CHAR (c) ? UNCTRL (c) : '?', cur_face); CHECK_LPOS(); } else { #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + if (mb_cur_max > 1 && rl_byte_oriented == 0) { register int i; @@ -865,7 +1148,7 @@ rl_redisplay () for (i = lpos; i < _rl_screenwidth; i++) { /* The space will be removed in update_line() */ - line[out++] = ' '; + invis_addc (&out, ' ', cur_face); _rl_wrapped_multicolumn++; CHECK_LPOS(); } @@ -875,43 +1158,58 @@ rl_redisplay () lb_linenum = newlines; } for (i = in; i < in+wc_bytes; i++) - line[out++] = rl_line_buffer[i]; + invis_addc (&out, rl_line_buffer[i], cur_face); for (i = 0; i < wc_width; i++) CHECK_LPOS(); } else { - line[out++] = c; + invis_addc (&out, c, cur_face); CHECK_LPOS(); } #else - line[out++] = c; + invis_addc (&out, c, cur_face); CHECK_LPOS(); #endif } #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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); + if (_rl_utf8locale && UTF8_SINGLEBYTE(rl_line_buffer[in])) + { + wc = (WCHAR_T)rl_line_buffer[in]; + wc_bytes = 1; + memset (&ps, 0, sizeof (mbstate_t)); /* re-init state */ + } + else + wc_bytes = MBRTOWC (&wc, rl_line_buffer + in, rl_end - in, &ps); } else in++; #endif - } - line[out] = '\0'; + invis_nul (&out); + line_totbytes = out; if (cpos_buffer_position < 0) { cpos_buffer_position = out; lb_linenum = newlines; } - inv_botlin = lb_botlin = newlines; + /* If we are switching from one line to multiple wrapped lines, we don't + want to do a dumb update (or we want to make it smarter). */ + if (_rl_quick_redisplay && newlines > 0) + _rl_quick_redisplay = 0; + + inv_botlin = lb_botlin = _rl_inv_botlin = newlines; CHECK_INV_LBREAKS (); inv_lbreaks[newlines+1] = out; +#if defined (HANDLE_MULTIBYTE) + /* This should be 0 anyway */ + line_state_invisible->wrapped_line[newlines+1] = _rl_wrapped_multicolumn; +#endif cursor_linenum = lb_linenum; /* CPOS_BUFFER_POSITION == position in buffer where cursor should be placed. @@ -925,7 +1223,7 @@ rl_redisplay () /* 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. */ - + displaying_prompt_first_line = 1; if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { int nleft, pos, changed_screen_line, tx; @@ -939,9 +1237,11 @@ rl_redisplay () 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); +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0) + out = _rl_find_prev_mbchar (invisible_line, _rl_screenchars, MB_FIND_ANY); else +#endif out = _rl_screenchars - 1; } @@ -957,14 +1257,32 @@ rl_redisplay () #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_FACE(line) (vis_face + vis_lbreaks[line]) #define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line) +#define VIS_LINE_FACE(line) ((line) > _rl_vis_botlin) ? "" : VIS_FACE(line) #define INV_LINE(line) (invisible_line + inv_lbreaks[line]) +#define INV_LINE_FACE(line) (inv_face + 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) + + /* We don't want to highlight anything that's going to be off the top + of the display; if the current line takes up more than an entire + screen, just mark the lines that won't be displayed as having a + `normal' face. + It's imperfect, but better than display corruption. */ + if (rl_mark_active_p () && inv_botlin > _rl_screenheight) + { + int extra; + + extra = inv_botlin - _rl_screenheight; + for (linenum = 0; linenum <= extra; linenum++) + norm_face (INV_LINE_FACE(linenum), INV_LLEN (linenum)); + } + /* For each line in the buffer, do the updating display. */ for (linenum = 0; linenum <= inv_botlin; linenum++) { @@ -972,13 +1290,15 @@ rl_redisplay () 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, + update_line (VIS_LINE(linenum), VIS_LINE_FACE(linenum), + INV_LINE(linenum), INV_LINE_FACE(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 + is an absolute cursor position in a multibyte locale. We + choose to (mostly) compensate for that here, rather than 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 @@ -987,15 +1307,20 @@ rl_redisplay () 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()) + 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 && + else if (cpos_adjusted == 0 && + linenum == prompt_last_screen_line && + prompt_physical_chars > _rl_screenwidth && + (mb_cur_max > 1 && rl_byte_oriented == 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 > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) /* XXX - rethink this last one */ + /* This assumes that all the invisible characters are split + between the first and last lines of the prompt, if the + prompt consumes more than two lines. It's usually right */ + /* XXX - not sure this is ever executed */ _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 @@ -1007,7 +1332,7 @@ rl_redisplay () (wrap_offset > visible_wrap_offset) && (_rl_last_c_pos < visible_first_line_len)) { - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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; @@ -1015,19 +1340,35 @@ rl_redisplay () _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 + /* This segment is intended to handle the case where the old + visible prompt has invisible characters 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 && + out (e.g., when printing the i-search prompt): in general, + the case of the new line being shorter than the old. We need + to be at the end of the new line and the old line needs to be + longer than the current cursor position. It's not perfect, + since it uses the byte length of the first line, but this will + at worst result in some extra clear-to-end-of-lines. We can't + use the prompt length variables because they may not + correspond to the visible line (see printing the i-search + prompt above). The tests for differing numbers of invisible + characters may not matter and can probably be removed. */ + else if (linenum == 0 && + linenum == prompt_last_screen_line && _rl_last_c_pos == out && + _rl_last_c_pos < visible_first_line_len && + visible_wrap_offset && + visible_wrap_offset != wrap_offset) + { + 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); + } #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; @@ -1042,7 +1383,7 @@ rl_redisplay () { tt = VIS_CHARS (linenum); _rl_move_vert (linenum); - _rl_move_cursor_relative (0, tt); + _rl_move_cursor_relative (0, tt, VIS_FACE(linenum)); _rl_clear_to_eol ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth); } @@ -1059,34 +1400,29 @@ rl_redisplay () 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) + if ((mb_cur_max == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset) _rl_last_c_pos += wrap_offset; } + /* Now we move the cursor to where it needs to be. First, make + sure we are on the correct line (cursor_linenum). */ + /* 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. */ + /* XXX - why not use local_prompt_len? */ 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 + _rl_cr (); if (modmark) _rl_output_some_chars ("*", 1); _rl_output_some_chars (local_prompt, nleft); - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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; @@ -1095,8 +1431,8 @@ rl_redisplay () /* 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 == number of characters (bytes) 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 @@ -1104,13 +1440,14 @@ rl_redisplay () 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. */ + /* 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 + necessary */ 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) + 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; @@ -1125,13 +1462,13 @@ rl_redisplay () _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]); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + _rl_move_cursor_relative (nleft, &invisible_line[pos], &inv_face[pos]); else if (nleft != _rl_last_c_pos) - _rl_move_cursor_relative (nleft, &invisible_line[pos]); + _rl_move_cursor_relative (nleft, &invisible_line[pos], &inv_face[pos]); } } - else /* Do horizontal scrolling. */ + else /* Do horizontal scrolling. Much simpler */ { #define M_OFFSET(margin, offset) ((margin) == 0 ? offset : 0) int lmargin, ndisp, nleft, phys_c_pos, t; @@ -1179,32 +1516,35 @@ rl_redisplay () else lmargin = last_lmargin; + displaying_prompt_first_line = lmargin < nleft; + /* 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] = '<'; + invisible_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 (t > 0 && t < out) + invisible_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], + update_line (&visible_line[last_lmargin], &vis_face[last_lmargin], + &invisible_line[lmargin], &inv_face[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()) + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && + displaying_prompt_first_line && 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 @@ -1212,7 +1552,7 @@ rl_redisplay () 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) && + (_rl_last_c_pos == out) && displaying_prompt_first_line && t < visible_first_line_len) { nleft = _rl_screenwidth - t; @@ -1222,7 +1562,7 @@ rl_redisplay () if (visible_first_line_len > _rl_screenwidth) visible_first_line_len = _rl_screenwidth; - _rl_move_cursor_relative (cpos_buffer_position - lmargin, &invisible_line[lmargin]); + _rl_move_cursor_relative (cpos_buffer_position - lmargin, &invisible_line[lmargin], &inv_face[lmargin]); last_lmargin = lmargin; } } @@ -1243,22 +1583,64 @@ rl_redisplay () visible_wrap_offset = 0; else visible_wrap_offset = wrap_offset; + + _rl_quick_redisplay = 0; } RL_UNSETSTATE (RL_STATE_REDISPLAYING); _rl_release_sigint (); } +static void +putc_face (int c, int face, char *cur_face) +{ + char cf; + cf = *cur_face; + if (cf != face) + { + if (cf != FACE_NORMAL && cf != FACE_STANDOUT) + return; + if (face != FACE_NORMAL && face != FACE_STANDOUT) + return; + if (face == FACE_STANDOUT && cf == FACE_NORMAL) + _rl_region_color_on (); + if (face == FACE_NORMAL && cf == FACE_STANDOUT) + _rl_region_color_off (); + *cur_face = face; + } + if (c != EOF) + putc (c, rl_outstream); +} + +static void +puts_face (const char *str, const char *face, int n) +{ + int i; + char cur_face; + + for (cur_face = FACE_NORMAL, i = 0; i < n; i++) + putc_face ((unsigned char) str[i], face[i], &cur_face); + putc_face (EOF, FACE_NORMAL, &cur_face); +} + +static void +norm_face (char *face, int n) +{ + memset (face, FACE_NORMAL, n); +} + +#define ADJUST_CPOS(x) do { _rl_last_c_pos -= (x) ; cpos_adjusted = 1; } while (0) + /* 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 + /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 + ^ ^ ^ ^ + \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 @@ -1266,14 +1648,15 @@ new: eddie> Oh, my little buggy says to me, as lurgid as 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; +update_line (char *old, char *old_face, char *new, char *new_face, int current_line, int omax, int nmax, int inv_botlin) { - register char *ofd, *ols, *oe, *nfd, *nls, *ne; + char *ofd, *ols, *oe, *nfd, *nls, *ne; + char *ofdf, *nfdf, *olsf, *nlsf; int temp, lendiff, wsatend, od, nd, twidth, o_cpos; int current_invis_chars; int col_lendiff, col_temp; + int bytes_to_insert; + int mb_cur_max = MB_CUR_MAX; #if defined (HANDLE_MULTIBYTE) mbstate_t ps_new, ps_old; int new_offset, old_offset; @@ -1284,59 +1667,167 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) 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) + 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) { + /* We're going to wrap around by writing the first character of NEW to + the screen and dealing with changes to what's visible by modifying + OLD to match it. Complicated by the presence of multi-width + characters at the end of the line or beginning of the new one. */ + /* old is always somewhere in visible_line; new is always somewhere in + invisible_line. These should always be null-terminated. */ #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + if (mb_cur_max > 1 && rl_byte_oriented == 0) { - wchar_t wc; + WCHAR_T wc; mbstate_t ps; - int tempwidth, bytes; + int oldwidth, newwidth; + int oldbytes, newbytes; size_t ret; /* This fixes only double-column characters, but if the wrapped - character comsumes more than three columns, spaces will be + character consumes 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]); + /* XXX remember that we are working on the invisible line right now; + we don't swap visible and invisible until just before rl_redisplay + returns */ + /* This will remove the extra placeholder space we added with + _rl_wrapped_multicolumn */ + if (current_line < line_state_invisible->wbsize && line_state_invisible->wrapped_line[current_line] > 0) + _rl_clear_to_eol (line_state_invisible->wrapped_line[current_line]); + + /* 1. how many screen positions does first char in old consume? */ + memset (&ps, 0, sizeof (mbstate_t)); + ret = MBRTOWC (&wc, old, mb_cur_max, &ps); + oldbytes = ret; + if (MB_INVALIDCH (ret)) + { + oldwidth = 1; + oldbytes = 1; + } + else if (MB_NULLWCH (ret)) + oldwidth = 0; + else + oldwidth = WCWIDTH (wc); + if (oldwidth < 0) + oldwidth = 1; + /* 2. how many screen positions does the first char in new consume? */ memset (&ps, 0, sizeof (mbstate_t)); - ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps); + ret = MBRTOWC (&wc, new, mb_cur_max, &ps); + newbytes = ret; if (MB_INVALIDCH (ret)) { - tempwidth = 1; - ret = 1; + newwidth = 1; + newbytes = 1; } else if (MB_NULLWCH (ret)) - tempwidth = 0; + newwidth = 0; else - tempwidth = wcwidth (wc); + newwidth = WCWIDTH (wc); + if (newwidth < 0) + newwidth = 1; + + /* 3. if the new width is less than the old width, we need to keep + going in new until we have consumed at least that many screen + positions, and figure out how many bytes that will take */ + while (newbytes < nmax && newwidth < oldwidth) + { + int t; - if (tempwidth > 0) + ret = MBRTOWC (&wc, new+newbytes, mb_cur_max, &ps); + if (MB_INVALIDCH (ret)) + { + newwidth += 1; + newbytes += 1; + } + else if (MB_NULLWCH (ret)) + break; + else + { + t = WCWIDTH (wc); + newwidth += (t >= 0) ? t : 1; + newbytes += ret; + } + } + /* 4. If the new width is more than the old width, keep going in old + until we have consumed exactly that many screen positions, and + figure out how many bytes that will take. This is an optimization */ + while (oldbytes < omax && oldwidth < newwidth) { - int count, i; - bytes = ret; - for (count = 0; count < bytes; count++) - putc (new[count], rl_outstream); - _rl_last_c_pos = tempwidth; + int t; + + ret = MBRTOWC (&wc, old+oldbytes, mb_cur_max, &ps); + if (MB_INVALIDCH (ret)) + { + oldwidth += 1; + oldbytes += 1; + } + else if (MB_NULLWCH (ret)) + break; + else + { + t = WCWIDTH (wc); + oldwidth += (t >= 0) ? t : 1; + oldbytes += ret; + } + } + /* 5. write the first newbytes of new, which takes newwidth. This is + where the screen wrapping takes place, and we are now writing + characters onto the new line. We need to fix up old so it + accurately reflects what is on the screen after the + _rl_output_some_chars below. */ + if (newwidth > 0) + { + int count, i, j; + char *optr; + + puts_face (new, new_face, newbytes); + _rl_last_c_pos = newwidth; _rl_last_v_pos++; - memset (&ps, 0, sizeof (mbstate_t)); - ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps); - if (ret != 0 && bytes != 0) + + /* 5a. If the number of screen positions doesn't match, punt + and do a dumb update. + 5b. If the number of bytes is greater in the new line than + the old, do a dumb update, because there is no guarantee we + can extend the old line enough to fit the new bytes. */ + if (newwidth != oldwidth || newbytes > oldbytes) + { + oe = old + omax; + ne = new + nmax; + nd = newbytes; + nfd = new + nd; + ofdf = old_face + oldbytes; + nfdf = new_face + newbytes; + + goto dumb_update; + } + if (oldbytes != 0 && newbytes != 0) { - if (MB_INVALIDCH (ret)) - ret = 1; - memmove (old+bytes, old+ret, strlen (old+ret)); - memcpy (old, new, bytes); + /* We have written as many bytes from new as we need to + consume the first character of old. Fix up `old' so it + reflects the new screen contents. We use +1 in the + memmove call to copy the trailing NUL. */ + /* (strlen(old+oldbytes) == (omax - oldbytes - 1)) */ + + /* Don't bother trying to fit the bytes if the number of bytes + doesn't change. */ + if (oldbytes != newbytes) + { + memmove (old+newbytes, old+oldbytes, strlen (old+oldbytes) + 1); + memmove (old_face+newbytes, old_face+oldbytes, strlen (old+oldbytes) + 1); + } + memcpy (old, new, newbytes); + memcpy (old_face, new_face, newbytes); + j = newbytes - oldbytes; + omax += j; /* 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; + for (i = current_line+1; j != 0 && i <= inv_botlin+1 && i <=_rl_vis_botlin+1; i++) + vis_lbreaks[i] += j; } } else @@ -1345,66 +1836,128 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) _rl_last_c_pos = 1; _rl_last_v_pos++; if (old[0] && new[0]) - old[0] = new[0]; + { + old[0] = new[0]; + old_face[0] = new_face[0]; + } } } else #endif { if (new[0]) - putc (new[0], rl_outstream); + puts_face (new, new_face, 1); else putc (' ', rl_outstream); _rl_last_c_pos = 1; _rl_last_v_pos++; if (old[0] && new[0]) - old[0] = new[0]; + { + old[0] = new[0]; + old_face[0] = new_face[0]; + } } } - + /* We know that we are dealing with a single screen line here */ + if (_rl_quick_redisplay) + { + nfd = new; + nfdf = new_face; + ofd = old; + ofdf = old_face; + for (od = 0, oe = ofd; od < omax && *oe; oe++, od++); + for (nd = 0, ne = nfd; nd < nmax && *ne; ne++, nd++); + od = nd = 0; + _rl_move_cursor_relative (0, old, old_face); + + bytes_to_insert = ne - nfd; + if (bytes_to_insert < local_prompt_len) /* ??? */ + goto dumb_update; + + /* output the prompt, output the line contents, clear the rest */ + _rl_output_some_chars (nfd, local_prompt_len); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = prompt_physical_chars; + else + _rl_last_c_pos = local_prompt_len; + + bytes_to_insert -= local_prompt_len; + if (bytes_to_insert > 0) + { + puts_face (new+local_prompt_len, nfdf+local_prompt_len, bytes_to_insert); + if (mb_cur_max > 1 && rl_byte_oriented) + _rl_last_c_pos += _rl_col_width (new, local_prompt_len, ne-new, 1); + else + _rl_last_c_pos += bytes_to_insert; + } + + /* See comments at dumb_update: for an explanation of this heuristic */ + if (nmax < omax) + goto clear_rest_of_line; + else if ((nmax - W_OFFSET(current_line, wrap_offset)) < (omax - W_OFFSET (current_line, visible_wrap_offset))) + goto clear_rest_of_line; + else + return; + } + /* Find first difference. */ #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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 */ + if (memcmp (old, new, temp) == 0 && memcmp (old_face, new_face, temp) == 0) { + new_offset = old_offset = temp; /* adding at the end */ ofd = old + temp; + ofdf = old_face + temp; nfd = new + temp; + nfdf = new_face + temp; } else { memset (&ps_new, 0, sizeof(mbstate_t)); memset (&ps_old, 0, sizeof(mbstate_t)); - if (omax == nmax && STREQN (new, old, omax)) + /* Are the old and new lines the same? */ + if (omax == nmax && memcmp (new, old, omax) == 0 && memcmp (new_face, old_face, omax) == 0) { + old_offset = omax; + new_offset = nmax; ofd = old + omax; + ofdf = old_face + omax; nfd = new + nmax; + nfdf = new_face + nmax; } else { + /* Go through the line from the beginning and find the first + difference. We assume that faces change at (possibly multi- + byte) character boundaries. */ new_offset = old_offset = 0; - for (ofd = old, nfd = new; + for (ofd = old, ofdf = old_face, nfd = new, nfdf = new_face; (ofd - old < omax) && *ofd && - _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); ) + _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new) && + *ofdf == *nfdf; ) { 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; + ofdf = old_face + old_offset; nfd = new + new_offset; + nfdf = new_face + new_offset; } } } } else #endif - for (ofd = old, nfd = new; - (ofd - old < omax) && *ofd && (*ofd == *nfd); - ofd++, nfd++) + for (ofd = old, ofdf = old_face, nfd = new, nfdf = new_face; + (ofd - old < omax) && *ofd && (*ofd == *nfd) && (*ofdf == *nfdf); + ofd++, nfd++, ofdf++, nfdf++) ; /* Move to the end of the screen line. ND and OD are used to keep track @@ -1417,45 +1970,72 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) if (ofd == oe && nfd == ne) return; +#if defined (HANDLE_MULTIBYTE) + if (mb_cur_max > 1 && rl_byte_oriented == 0 && _rl_utf8locale) + { + WCHAR_T wc; + mbstate_t ps = { 0 }; + int t; + + /* If the first character in the difference is a zero-width character, + assume it's a combining character and back one up so the two base + characters no longer compare equivalently. */ + t = MBRTOWC (&wc, ofd, mb_cur_max, &ps); + if (t > 0 && UNICODE_COMBINING_CHAR (wc) && WCWIDTH (wc) == 0) + { + old_offset = _rl_find_prev_mbchar (old, ofd - old, MB_FIND_ANY); + new_offset = _rl_find_prev_mbchar (new, nfd - new, MB_FIND_ANY); + ofd = old + old_offset; /* equal by definition */ + ofdf = old_face + old_offset; + nfd = new + new_offset; + nfdf = new_face + new_offset; + } + } +#endif + wsatend = 1; /* flag for trailing whitespace */ #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + /* Find the last character that is the same between the two lines. This + bounds the region that needs to change. */ + if (mb_cur_max > 1 && rl_byte_oriented == 0) { ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY); + olsf = old_face + (ols - old); nls = new + _rl_find_prev_mbchar (new, ne - new, MB_FIND_ANY); + nlsf = new_face + (nls - new); + 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) + if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0 || + *olsf != *nlsf) break; if (*ols == ' ') wsatend = 0; ols = old + _rl_find_prev_mbchar (old, ols - old, MB_FIND_ANY); + olsf = old_face + (ols - old); nls = new + _rl_find_prev_mbchar (new, nls - new, MB_FIND_ANY); + nlsf = new_face + (nls - new); } } else { #endif /* HANDLE_MULTIBYTE */ ols = oe - 1; /* find last same */ + olsf = old_face + (ols - old); nls = ne - 1; - while ((ols > ofd) && (nls > nfd) && (*ols == *nls)) + nlsf = new_face + (nls - new); + while ((ols > ofd) && (nls > nfd) && (*ols == *nls) && (*olsf == *nlsf)) { if (*ols != ' ') wsatend = 0; - ols--; - nls--; + ols--; olsf--; + nls--; nlsf--; } #if defined (HANDLE_MULTIBYTE) } @@ -1464,31 +2044,35 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) if (wsatend) { ols = oe; + olsf = old_face + (ols - old); nls = ne; + nlsf = new_face + (nls - new); } #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 if (_rl_compare_chars (ols, 0, NULL, nls, 0, NULL) == 0 || *olsf != *nlsf) #else - else if (*ols != *nls) + else if (*ols != *nls || *olsf != *nlsf) #endif { if (*ols) /* don't step past the NUL */ { - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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) + if (mb_cur_max > 1 && rl_byte_oriented == 0) nls = new + _rl_find_next_mbchar (new, nls - new, 1, MB_FIND_ANY); else nls++; } + olsf = old_face + (ols - old); + nlsf = new_face + (nls - new); } /* count of invisible characters in the current invisible line. */ @@ -1496,7 +2080,16 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) 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) + /* We have moved up to a new screen line. This line may or may not have + invisible characters on it, but we do our best to recalculate + visible_wrap_offset based on what we know. */ + if (current_line == 0) + visible_wrap_offset = prompt_invis_chars_first_line; /* XXX */ +#if 0 /* XXX - not yet */ + else if (current_line == prompt_last_screen_line && wrap_offset > prompt_invis_chars_first_line) + visible_wrap_offset = wrap_offset - prompt_invis_chars_first_line +#endif + if ((mb_cur_max == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset) _rl_last_c_pos += visible_wrap_offset; } @@ -1507,71 +2100,220 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) string, then redraw the entire prompt string. We can only do this reliably if the terminal supports a `cr' capability. + This can also happen if the prompt string has changed, and the first + difference in the line is in the middle of the prompt string, after a + sequence of invisible characters (worst case) and before the end of + the prompt. In this case, we have to redraw the entire prompt string + so that the entire sequence of invisible characters is drawn. We need + to handle the worst case, when the difference is after (or in the middle + of) a sequence of invisible characters that changes the text color and + before the sequence that restores the text color to normal. Then we have + to make sure that the lines still differ -- if they don't, we can + return immediately. + 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; + if (lendiff > nmax) + lendiff = nmax; od = ofd - old; /* index of first difference in visible line */ + nd = nfd - new; /* nd, od are buffer indexes */ 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) + (((od > 0 || nd > 0) && (od <= prompt_last_invisible || nd <= prompt_last_invisible)) || + ((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 + _rl_cr (); if (modmark) _rl_output_some_chars ("*", 1); _rl_output_some_chars (local_prompt, lendiff); - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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; + /* If we just output the entire prompt string we can take advantage + of knowing the number of physical characters in the prompt. If + the prompt wraps lines (lendiff clamped at nmax), we can't. */ + if (lendiff == local_prompt_len) + _rl_last_c_pos = prompt_physical_chars + modmark; + else + /* 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; + + /* Now if we have printed the prompt string because the first difference + was within the prompt, see if we need to recompute where the lines + differ. Check whether where we are now is past the last place where + the old and new lines are the same and short-circuit now if we are. */ + if ((od <= prompt_last_invisible || nd <= prompt_last_invisible) && + omax == nmax && + lendiff > (ols-old) && lendiff > (nls-new)) + return; + + /* XXX - we need to fix up our calculations if we are now past the + old ofd/nfd and the prompt length (or line length) has changed. + We punt on the problem and do a dumb update. We'd like to be able + to just output the prompt from the beginning of the line up to the + first difference, but you don't know the number of invisible + characters in that case. + This needs a lot of work to be efficient, but it usually doesn't matter. */ + if ((od <= prompt_last_invisible || nd <= prompt_last_invisible)) + { + nfd = new + lendiff; /* number of characters we output above */ + nfdf = new_face + lendiff; + nd = lendiff; + + /* Do a dumb update and return */ +dumb_update: + temp = ne - nfd; + if (temp > 0) + { + puts_face (nfd, nfdf, temp); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + _rl_last_c_pos += _rl_col_width (new, nd, ne - new, 1); + /* Need to adjust here based on wrap_offset. Guess that if + this is the line containing the last line of the prompt + we need to adjust by + wrap_offset-prompt_invis_chars_first_line + on the assumption that this is the number of invisible + characters in the last line of the prompt. */ + if (wrap_offset > prompt_invis_chars_first_line && + current_line == prompt_last_screen_line && + prompt_physical_chars > _rl_screenwidth && + _rl_horizontal_scroll_mode == 0) + ADJUST_CPOS (wrap_offset - prompt_invis_chars_first_line); + + /* If we just output a new line including the prompt, and + the prompt includes invisible characters, we need to + account for them in the _rl_last_c_pos calculation, since + _rl_col_width does not. This happens when other code does + a goto dumb_update; */ + else if (current_line == 0 && + nfd == new && + prompt_invis_chars_first_line && + local_prompt_len <= temp && + wrap_offset >= prompt_invis_chars_first_line && + _rl_horizontal_scroll_mode == 0) + ADJUST_CPOS (prompt_invis_chars_first_line); + } + else + _rl_last_c_pos += temp; + } + /* This is a useful heuristic, but what we really want is to clear + if the new number of visible screen characters is less than the + old number of visible screen characters. If the prompt has changed, + we don't really have enough information about the visible line to + know for sure, so we use another heuristic calclulation below. */ + if (nmax < omax) + goto clear_rest_of_line; /* XXX */ + else if ((nmax - W_OFFSET(current_line, wrap_offset)) < (omax - W_OFFSET (current_line, visible_wrap_offset))) + goto clear_rest_of_line; + else + return; + } } 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 + cursor position in multibyte mode, but a buffer index when not in a multibyte locale. */ - _rl_move_cursor_relative (od, old); -#if 1 + _rl_move_cursor_relative (od, old, old_face); + #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 && + 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 + lendiff == difference in buffer (bytes) + col_lendiff == difference on screen (columns) 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); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + { + int newchars, newwidth, newind; + int oldchars, oldwidth, oldind; + + newchars = nls - new; + oldchars = ols - old; + + /* If we can do it, try to adjust nls and ols so that nls-new will + contain the entire new prompt string. That way we can use + prompt_physical_chars and not have to recompute column widths. + _rl_col_width adds wrap_offset and expects the caller to compensate, + which we do below, so we do the same thing if we don't call + _rl_col_width. + We don't have to compare, since we know the characters are the same. + The check of differing numbers of invisible chars may be extraneous. + XXX - experimental */ + if (current_line == 0 && nfd == new && newchars > prompt_last_invisible && + newchars <= local_prompt_len && + local_prompt_len <= nmax && + current_invis_chars != visible_wrap_offset) + { + while (newchars < nmax && oldchars < omax && newchars < local_prompt_len) + { +#if defined (HANDLE_MULTIBYTE) + newind = _rl_find_next_mbchar (new, newchars, 1, MB_FIND_NONZERO); + oldind = _rl_find_next_mbchar (old, oldchars, 1, MB_FIND_NONZERO); + + nls += newind - newchars; + ols += oldind - oldchars; + + newchars = newind; + oldchars = oldind; +#else + nls++; ols++; + newchars++; oldchars++; +#endif + } + newwidth = (newchars == local_prompt_len) ? prompt_physical_chars + wrap_offset + : _rl_col_width (new, 0, nls - new, 1); + /* if we changed nls and ols, we need to recompute lendiff */ + lendiff = (nls - nfd) - (ols - ofd); + + nlsf = new_face + (nls - new); + olsf = old_face + (ols - old); + } + else + newwidth = _rl_col_width (new, nfd - new, nls - new, 1); + + oldwidth = _rl_col_width (old, ofd - old, ols - old, 1); + + col_lendiff = newwidth - oldwidth; + } else col_lendiff = lendiff; + /* col_lendiff uses _rl_col_width(), which doesn't know about whether or not + the multibyte characters it counts are invisible, so unless we're printing + the entire prompt string (in which case we can use prompt_physical_chars) + the count is short by the number of bytes in the invisible multibyte + characters - the number of multibyte characters. + + We don't have a good way to solve this without moving to something like + a bitmap that indicates which characters are visible and which are + invisible. We fix it up (imperfectly) in the caller and by trying to use + the entire prompt string wherever we can. */ + /* 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 (current_line == 0 && current_invis_chars != visible_wrap_offset) { - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + if (mb_cur_max > 1 && rl_byte_oriented == 0) { lendiff += visible_wrap_offset - current_invis_chars; col_lendiff += visible_wrap_offset - current_invis_chars; @@ -1583,17 +2325,26 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) } } + /* We use temp as a count of the number of bytes from the first difference + to the end of the new line. col_temp is the corresponding number of + screen columns. A `dumb' update moves to the spot of first difference + and writes TEMP bytes. */ /* Insert (diff (len (old), len (new)) ch. */ temp = ne - nfd; - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + if (mb_cur_max > 1 && rl_byte_oriented == 0) col_temp = _rl_col_width (new, nfd - new, ne - new, 1); else col_temp = temp; + /* how many bytes from the new line buffer to write to the display */ + bytes_to_insert = nls - nfd; + + /* col_lendiff > 0 if we are adding characters to the line */ 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 @@ -1602,16 +2353,13 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) 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); + puts_face (nfd, nfdf, temp); + _rl_last_c_pos += col_temp; /* 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; - } + if (current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ return; } /* Sometimes it is cheaper to print the characters rather than @@ -1632,86 +2380,86 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) _rl_last_c_pos == 0 && lendiff > prompt_visible_length && current_invis_chars > 0) == 0) && - (((MB_CUR_MAX > 1 && rl_byte_oriented == 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; + open_some_spaces (col_lendiff); + puts_face (nfd, nfdf, bytes_to_insert); + if (mb_cur_max > 1 && rl_byte_oriented == 0) + _rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1); + else + _rl_last_c_pos += bytes_to_insert; } -#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) + 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; + puts_face (nfd, nfdf, temp); + _rl_last_c_pos += col_temp; + return; } - else + else /* just write from first difference to end of new line */ { - _rl_output_some_chars (nfd, temp); + puts_face (nfd, nfdf, 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; - } + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ return; } - /* Copy (new) chars to screen from first diff to last match. */ - temp = nls - nfd; - if ((temp - lendiff) > 0) + + if (bytes_to_insert > lendiff) { - _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; - } + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && current_line == 0 && displaying_prompt_first_line && wrap_offset && ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ } } else { /* cannot insert chars, write to EOL */ - _rl_output_some_chars (nfd, temp); + puts_face (nfd, nfdf, 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) && + /* The current_line*rl_screenwidth+prompt_invis_chars_first_line is a + crude attempt to compute how far into the new line buffer we are. + It doesn't work well in the face of multibyte characters and needs + to be rethought. XXX */ + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && current_line == prompt_last_screen_line && wrap_offset && + displaying_prompt_first_line && 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; - } + ((nfd-new) < (prompt_last_invisible-(current_line*_rl_screenwidth+prompt_invis_chars_first_line)))) + ADJUST_CPOS (wrap_offset - prompt_invis_chars_first_line); + + /* What happens if wrap_offset == prompt_invis_chars_first_line + and we are drawing the first line (current_line == 0), or if we + are drawing the first line and changing the number of invisible + characters in the line? If we're starting to draw before the last + invisible character in the prompt, we need to adjust by + _rl_last_c_pos -= prompt_invis_chars_first_line. This can happen + when we finish reading a digit argument (with the "(arg: N)" + prompt) and are switching back to displaying a line with a prompt + containing invisible characters, since we have to redraw the + entire prompt string. */ + if ((mb_cur_max > 1 && rl_byte_oriented == 0) && + current_line == 0 && wrap_offset && + displaying_prompt_first_line && + wrap_offset == prompt_invis_chars_first_line && + visible_wrap_offset != current_invis_chars && + visible_wrap_offset != prompt_invis_chars_first_line && + ((nfd-new) < prompt_last_invisible)) + ADJUST_CPOS (prompt_invis_chars_first_line); } } else /* Delete characters from line. */ @@ -1723,32 +2471,66 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) 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 && + displaying_prompt_first_line && -lendiff == visible_wrap_offset) col_lendiff = 0; + /* If we have moved lmargin and we're shrinking the line, we've + already moved the cursor to the first character of the new line, + so deleting -col_lendiff characters will mess up the cursor + position calculation */ + if (_rl_horizontal_scroll_mode && displaying_prompt_first_line == 0 && + col_lendiff && _rl_last_c_pos < -col_lendiff) + 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) + /* Copy (new) chars to screen from first diff to last match, + overwriting what is there. */ + if (bytes_to_insert > 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) + puts_face (nfd, nfdf, bytes_to_insert); + 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; - } + /* This still doesn't take into account whether or not the + characters that this counts are invisible. */ + _rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1); + if (current_line == 0 && wrap_offset && + displaying_prompt_first_line && + prompt_invis_chars_first_line && + _rl_last_c_pos >= prompt_invis_chars_first_line && + ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (prompt_invis_chars_first_line); + +#if 1 +#ifdef HANDLE_MULTIBYTE + /* If we write a non-space into the last screen column, + remove the note that we added a space to compensate for + a multibyte double-width character that didn't fit, since + it's only valid for what was previously there. */ + /* XXX - watch this */ + if (_rl_last_c_pos == _rl_screenwidth && + line_state_invisible->wrapped_line[current_line+1] && + nfd[bytes_to_insert-1] != ' ') + line_state_invisible->wrapped_line[current_line+1] = 0; +#endif +#endif } else - _rl_last_c_pos += temp; + _rl_last_c_pos += bytes_to_insert; + + /* XXX - we only want to do this if we are at the end of the line + so we move there with _rl_move_cursor_relative */ + if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new))) + { + _rl_move_cursor_relative (ne-new, new, new_face); + goto clear_rest_of_line; + } } } /* Otherwise, print over the existing material. */ @@ -1760,33 +2542,30 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) 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); + puts_face (nfd, nfdf, temp); _rl_last_c_pos += col_temp; /* XXX */ - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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; - } + if (current_line == 0 && wrap_offset && + displaying_prompt_first_line && + _rl_last_c_pos > wrap_offset && + ((nfd - new) <= prompt_last_invisible)) + ADJUST_CPOS (wrap_offset); /* XXX - prompt_invis_chars_first_line? */ } } +clear_rest_of_line: lendiff = (oe - old) - (ne - new); - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + 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 (col_lendiff && ((mb_cur_max == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth))) { if (_rl_term_autowrap && current_line < inv_botlin) space_to_eol (col_lendiff); @@ -1799,7 +2578,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) /* Tell the update routines that we have moved onto a new (empty) line. */ int -rl_on_new_line () +rl_on_new_line (void) { if (visible_line) visible_line[0] = '\0'; @@ -1812,12 +2591,38 @@ rl_on_new_line () return 0; } +/* Clear all screen lines occupied by the current readline line buffer + (visible line) */ +int +rl_clear_visible_line (void) +{ + int curr_line; + + /* Make sure we move to column 0 so we clear the entire line */ + _rl_cr (); + _rl_last_c_pos = 0; + + /* Move to the last screen line of the current visible line */ + _rl_move_vert (_rl_vis_botlin); + + /* And erase screen lines going up to line 0 (first visible line) */ + for (curr_line = _rl_last_v_pos; curr_line >= 0; curr_line--) + { + _rl_move_vert (curr_line); + _rl_clear_to_eol (_rl_screenwidth); + _rl_cr (); /* in case we use space_to_eol() */ + } + + 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. */ + (explicitly or implicitly). This still doesn't work exactly right; it + should use expand_prompt() */ int -rl_on_new_line_with_prompt () +rl_on_new_line_with_prompt (void) { int prompt_size, i, l, real_screenwidth, newlines; char *prompt_last_line, *lprompt; @@ -1873,36 +2678,47 @@ rl_on_new_line_with_prompt () /* Actually update the display, period. */ int -rl_forced_update_display () +rl_forced_update_display (void) { register char *temp; if (visible_line) - { - temp = visible_line; - while (*temp) - *temp++ = '\0'; - } + memset (visible_line, 0, line_size); + rl_on_new_line (); forced_display++; (*rl_redisplay_function) (); return 0; } +/* Redraw only the last line of a multi-line prompt. */ +void +rl_redraw_prompt_last_line (void) +{ + char *t; + + t = strrchr (rl_display_prompt, '\n'); + if (t) + redraw_prompt (++t); + else + rl_forced_update_display (); +} + /* 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; + the movement is being done. + DATA is always the visible line or the invisible line */ +static void +_rl_move_cursor_relative (int new, const char *data, const char *dataf) { register int i; int woff; /* number of invisible chars on current line */ int cpos, dpos; /* current and desired cursor positions */ int adjust; + int in_invisline; + int mb_cur_max = MB_CUR_MAX; woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); cpos = _rl_last_c_pos; @@ -1916,7 +2732,7 @@ _rl_move_cursor_relative (new, data) 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) + if (mb_cur_max > 1 && rl_byte_oriented == 0) { adjust = 1; /* Try to short-circuit common cases and eliminate a bunch of multibyte @@ -1938,14 +2754,31 @@ _rl_move_cursor_relative (new, data) else dpos = _rl_col_width (data, 0, new, 1); + if (displaying_prompt_first_line == 0) + adjust = 0; + + /* yet another special case: printing the last line of a prompt with + multibyte characters and invisible characters whose printable length + exceeds the screen width with the last invisible character + (prompt_last_invisible) in the last line. IN_INVISLINE is the + offset of DATA in invisible_line */ + in_invisline = 0; + if (data > invisible_line && data < invisible_line+inv_lbreaks[_rl_inv_botlin+1]) + in_invisline = data - invisible_line; + /* 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. */ + /* NEW is relative to the current displayed line, while + PROMPT_LAST_INVISIBLE is relative to the entire (wrapped) line. + Need a way to reconcile these two variables by turning NEW into a + buffer position relative to the start of the line */ if (adjust && ((new > prompt_last_invisible) || /* XXX - don't use woff here */ - (prompt_physical_chars >= _rl_screenwidth && + (new+in_invisline > prompt_last_invisible) || /* invisible line */ + (prompt_physical_chars >= _rl_screenwidth && /* visible line */ _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)))) + new > (prompt_last_invisible-(vis_lbreaks[_rl_last_v_pos])-wrap_offset)))) /* XXX last comparison might need to be >= */ { dpos -= woff; @@ -1967,7 +2800,7 @@ _rl_move_cursor_relative (new, data) of moving backwards. */ /* i == current physical cursor position. */ #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + if (mb_cur_max > 1 && rl_byte_oriented == 0) i = _rl_last_c_pos; else #endif @@ -1975,11 +2808,7 @@ _rl_move_cursor_relative (new, data) 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__ */ + _rl_cr (); cpos = _rl_last_c_pos = 0; } @@ -2002,7 +2831,7 @@ _rl_move_cursor_relative (new, data) 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 (mb_cur_max > 1 && rl_byte_oriented == 0) { if (_rl_term_forward_char) { @@ -2011,14 +2840,12 @@ _rl_move_cursor_relative (new, data) } else { - tputs (_rl_term_cr, 1, _rl_output_character_function); - for (i = 0; i < new; i++) - putc (data[i], rl_outstream); + _rl_cr (); + puts_face (data, dataf, new); } } else - for (i = cpos; i < new; i++) - putc (data[i], rl_outstream); + puts_face (data + cpos, dataf + cpos, new - cpos); } #if defined (HANDLE_MULTIBYTE) @@ -2035,8 +2862,7 @@ _rl_move_cursor_relative (new, data) /* PWP: move the cursor up or down. */ void -_rl_move_vert (to) - int to; +_rl_move_vert (int to) { register int delta, i; @@ -2047,18 +2873,23 @@ _rl_move_vert (to) { 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_cr (); _rl_last_c_pos = 0; } else { /* delta < 0 */ +#ifdef __DJGPP__ + int row, col; + + fflush (rl_outstream); + ScreenGetCursor (&row, &col); + ScreenSetCursor (row + delta, col); + i = -delta; +#else if (_rl_term_up && *_rl_term_up) for (i = 0; i < -delta; i++) tputs (_rl_term_up, 1, _rl_output_character_function); +#endif /* !__DJGPP__ */ } _rl_last_v_pos = to; /* Now TO is here */ @@ -2067,8 +2898,7 @@ _rl_move_vert (to) /* 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; +rl_show_char (int c) { int n = 1; if (META_CHAR (c) && (_rl_output_meta_chars == 0)) @@ -2095,8 +2925,7 @@ rl_show_char (c) } int -rl_character_len (c, pos) - register int c, pos; +rl_character_len (int c, int pos) { unsigned char uc; @@ -2136,6 +2965,9 @@ rl_message (va_alist) #if defined (PREFER_VARARGS) char *format; #endif +#if defined (HAVE_VSNPRINTF) + int bneed; +#endif #if defined (PREFER_STDARG) va_start (args, format); @@ -2144,11 +2976,28 @@ rl_message (va_alist) format = va_arg (args, char *); #endif + if (msg_buf == 0) + msg_buf = xmalloc (msg_bufsiz = 128); + #if defined (HAVE_VSNPRINTF) - vsnprintf (msg_buf, sizeof (msg_buf) - 1, format, args); + bneed = vsnprintf (msg_buf, msg_bufsiz, format, args); + if (bneed >= msg_bufsiz - 1) + { + msg_bufsiz = bneed + 1; + msg_buf = xrealloc (msg_buf, msg_bufsiz); + va_end (args); + +#if defined (PREFER_STDARG) + va_start (args, format); +#else + va_start (args); + format = va_arg (args, char *); +#endif + vsnprintf (msg_buf, msg_bufsiz - 1, format, args); + } #else vsprintf (msg_buf, format, args); - msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ + msg_buf[msg_bufsiz - 1] = '\0'; /* overflow? */ #endif va_end (args); @@ -2157,11 +3006,17 @@ rl_message (va_alist) rl_save_prompt (); msg_saved_prompt = 1; } + else if (local_prompt != saved_local_prompt) + { + FREE (local_prompt); + FREE (local_prompt_prefix); + local_prompt = (char *)NULL; + } 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 = expand_prompt (msg_buf, 0, &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) (); @@ -2173,8 +3028,11 @@ int rl_message (format, arg1, arg2) char *format; { + if (msg_buf == 0) + msg_buf = xmalloc (msg_bufsiz = 128); + sprintf (msg_buf, format, arg1, arg2); - msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ + msg_buf[msg_bufsiz - 1] = '\0'; /* overflow? */ rl_display_prompt = msg_buf; if (saved_local_prompt == 0) @@ -2182,10 +3040,16 @@ rl_message (format, arg1, arg2) 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); + else if (local_prompt != saved_local_prompt) + { + FREE (local_prompt); + FREE (local_prompt_prefix); + local_prompt = (char *)NULL; + } + local_prompt = expand_prompt (msg_buf, 0, &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) (); @@ -2196,7 +3060,7 @@ rl_message (format, arg1, arg2) /* How to clear things from the "echo-area". */ int -rl_clear_message () +rl_clear_message (void) { rl_display_prompt = rl_prompt; if (msg_saved_prompt) @@ -2209,7 +3073,7 @@ rl_clear_message () } int -rl_reset_line_state () +rl_reset_line_state (void) { rl_on_new_line (); @@ -2218,8 +3082,12 @@ rl_reset_line_state () return 0; } +/* Save all of the variables associated with the prompt and its display. Most + of the complexity is dealing with the invisible characters in the prompt + string and where they are. There are enough of these that I should consider + a struct. */ void -rl_save_prompt () +rl_save_prompt (void) { saved_local_prompt = local_prompt; saved_local_prefix = local_prompt_prefix; @@ -2229,22 +3097,28 @@ rl_save_prompt () saved_visible_length = prompt_visible_length; saved_invis_chars_first_line = prompt_invis_chars_first_line; saved_physical_chars = prompt_physical_chars; + saved_local_prompt_newlines = local_prompt_newlines; local_prompt = local_prompt_prefix = (char *)0; local_prompt_len = 0; + local_prompt_newlines = (int *)0; + prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0; prompt_invis_chars_first_line = prompt_physical_chars = 0; } void -rl_restore_prompt () +rl_restore_prompt (void) { FREE (local_prompt); FREE (local_prompt_prefix); + FREE (local_prompt_newlines); local_prompt = saved_local_prompt; local_prompt_prefix = saved_local_prefix; local_prompt_len = saved_local_length; + local_prompt_newlines = saved_local_prompt_newlines; + prompt_prefix_length = saved_prefix_length; prompt_last_invisible = saved_last_invisible; prompt_visible_length = saved_visible_length; @@ -2256,11 +3130,11 @@ rl_restore_prompt () saved_local_length = 0; saved_last_invisible = saved_visible_length = saved_prefix_length = 0; saved_invis_chars_first_line = saved_physical_chars = 0; + saved_local_prompt_newlines = 0; } char * -_rl_make_prompt_for_search (pchar) - int pchar; +_rl_make_prompt_for_search (int pchar) { int len; char *pmt, *p; @@ -2298,8 +3172,7 @@ _rl_make_prompt_for_search (pchar) /* Quick redisplay hack when erasing characters at the end of the line. */ void -_rl_erase_at_end_of_line (l) - int l; +_rl_erase_at_end_of_line (int l) { register int i; @@ -2313,99 +3186,105 @@ _rl_erase_at_end_of_line (l) } /* Clear to the end of the line. COUNT is the minimum - number of character spaces to clear, */ + number of character spaces to clear, but we use a terminal escape + sequence if available. */ void -_rl_clear_to_eol (count) - int count; +_rl_clear_to_eol (int count) { +#ifndef __MSDOS__ if (_rl_term_clreol) tputs (_rl_term_clreol, 1, _rl_output_character_function); - else if (count) - space_to_eol (count); + else +#endif + 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; +space_to_eol (int count) { register int i; for (i = 0; i < count; i++) - putc (' ', rl_outstream); + putc (' ', rl_outstream); _rl_last_c_pos += count; } void -_rl_clear_screen () +_rl_clear_screen (int clrscr) { +#if defined (__DJGPP__) + ScreenClear (); + ScreenSetCursor (0, 0); +#else if (_rl_term_clrpag) - tputs (_rl_term_clrpag, 1, _rl_output_character_function); + { + tputs (_rl_term_clrpag, 1, _rl_output_character_function); + if (clrscr && _rl_term_clrscroll) + tputs (_rl_term_clrscroll, 1, _rl_output_character_function); + } else rl_crlf (); +#endif /* __DJGPP__ */ } /* 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; +insert_some_chars (char *string, int count, int col) { -#if defined (__MSDOS__) || defined (__MINGW32__) + open_some_spaces (col); _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); +} + +/* Insert COL spaces, keeping the cursor at the same position. We follow the + ncurses documentation and use either im/ei with explicit spaces, or IC/ic + by itself. We assume there will either be ei or we don't need to use it. */ +static void +open_some_spaces (int col) +{ +#if !defined (__MSDOS__) && (!defined (__MINGW32__) || defined (NCURSES_VERSION)) + char *buffer; + register int i; /* 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 + else if (_rl_term_im && *_rl_term_im) { - 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. */ + tputs (_rl_term_im, 1, _rl_output_character_function); + /* just output the desired number of spaces */ + for (i = col; i--; ) + _rl_output_character_function (' '); + /* If there is a string to turn off insert mode, use it now. */ if (_rl_term_ei && *_rl_term_ei) tputs (_rl_term_ei, 1, _rl_output_character_function); + /* and move back the right number of spaces */ + _rl_backspace (col); + } + else if (_rl_term_ic && *_rl_term_ic) + { + /* If there is a special command for inserting characters, then + use that first to open up the space. */ + for (i = col; i--; ) + tputs (_rl_term_ic, 1, _rl_output_character_function); } -#endif /* __MSDOS__ || __MINGW32__ */ +#endif /* !__MSDOS__ && (!__MINGW32__ || NCURSES_VERSION)*/ } /* Delete COUNT characters from the display line. */ static void -delete_chars (count) - int count; +delete_chars (int count) { if (count > _rl_screenwidth) /* XXX */ return; -#if !defined (__MSDOS__) && !defined (__MINGW32__) +#if !defined (__MSDOS__) && (!defined (__MINGW32__) || defined (NCURSES_VERSION)) if (_rl_term_DC && *_rl_term_DC) { char *buffer; @@ -2418,13 +3297,16 @@ delete_chars (count) while (count--) tputs (_rl_term_dc, 1, _rl_output_character_function); } -#endif /* !__MSDOS__ && !__MINGW32__ */ +#endif /* !__MSDOS__ && (!__MINGW32__ || NCURSES_VERSION)*/ } void -_rl_update_final () +_rl_update_final (void) { - int full_lines; + int full_lines, woff, botline_length; + + if (line_structures_initialized == 0) + return; full_lines = 0; /* If the cursor is the only thing on an otherwise-blank last line, @@ -2436,44 +3318,46 @@ _rl_update_final () full_lines = 1; } _rl_move_vert (_rl_vis_botlin); + woff = W_OFFSET(_rl_vis_botlin, wrap_offset); + botline_length = VIS_LLEN(_rl_vis_botlin) - woff; /* 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)) + if (full_lines && _rl_term_autowrap && botline_length == _rl_screenwidth) { - char *last_line; - - last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; + char *last_line, *last_face; + + /* LAST_LINE includes invisible characters, so if you want to get the + last character of the first line, you have to take WOFF into account. + This needs to be done for both calls to _rl_move_cursor_relative, + which takes a buffer position as the first argument, and any direct + subscripts of LAST_LINE. */ + last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; /* = VIS_CHARS(_rl_vis_botlin); */ + last_face = &vis_face[vis_lbreaks[_rl_vis_botlin]]; /* = VIS_CHARS(_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_move_cursor_relative (_rl_screenwidth - 1 + woff, last_line, last_face); /* XXX */ _rl_clear_to_eol (0); - putc (last_line[_rl_screenwidth - 1], rl_outstream); + puts_face (&last_line[_rl_screenwidth - 1 + woff], + &last_face[_rl_screenwidth - 1 + woff], 1); } _rl_vis_botlin = 0; - rl_crlf (); + if (botline_length > 0 || _rl_last_c_pos > 0) + rl_crlf (); fflush (rl_outstream); rl_display_fixed++; } /* Move to the start of the current line. */ static void -cr () +cr (void) { - 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; - } + _rl_cr (); + _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; +redraw_prompt (char *t) { char *oldp; @@ -2481,7 +3365,8 @@ redraw_prompt (t) rl_save_prompt (); rl_display_prompt = t; - local_prompt = expand_prompt (t, &prompt_visible_length, + local_prompt = expand_prompt (t, PMT_MULTILINE, + &prompt_visible_length, &prompt_last_invisible, &prompt_invis_chars_first_line, &prompt_physical_chars); @@ -2496,7 +3381,7 @@ redraw_prompt (t) /* Redisplay the current line after a SIGWINCH is received. */ void -_rl_redisplay_after_sigwinch () +_rl_redisplay_after_sigwinch (void) { char *t; @@ -2506,32 +3391,16 @@ _rl_redisplay_after_sigwinch () 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 + rl_clear_visible_line (); if (_rl_last_v_pos > 0) _rl_move_vert (0); } else rl_crlf (); + if (_rl_screenwidth < prompt_visible_length) + _rl_reset_prompt (); /* update local_prompt_newlines array */ + /* Redraw only the last line of a multi-line prompt. */ t = strrchr (rl_display_prompt, '\n'); if (t) @@ -2541,11 +3410,12 @@ _rl_redisplay_after_sigwinch () } void -_rl_clean_up_for_exit () +_rl_clean_up_for_exit (void) { if (_rl_echoing_p) { - _rl_move_vert (_rl_vis_botlin); + if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */ + _rl_move_vert (_rl_vis_botlin); _rl_vis_botlin = 0; fflush (rl_outstream); rl_restart_output (1, 0); @@ -2553,7 +3423,7 @@ _rl_clean_up_for_exit () } void -_rl_erase_entire_line () +_rl_erase_entire_line (void) { cr (); _rl_clear_to_eol (0); @@ -2561,10 +3431,16 @@ _rl_erase_entire_line () fflush (rl_outstream); } +void +_rl_ttyflush (void) +{ + 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 () +_rl_current_display_line (void) { int ret, nleft; @@ -2583,26 +3459,30 @@ _rl_current_display_line () return ret; } +void +_rl_refresh_line (void) +{ + rl_clear_visible_line (); + rl_redraw_prompt_last_line (); + rl_keep_mark_active (); +} + #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; +_rl_col_width (const char *str, int start, int end, int flags) { - wchar_t wc; + 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"); + /* this can happen in some cases where it's inconvenient to check */ return (end - start); -} memset (&ps, 0, sizeof (mbstate_t)); @@ -2625,7 +3505,13 @@ _rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1"); while (point < start) { - tmp = mbrlen (str + point, max, &ps); + if (_rl_utf8locale && UTF8_SINGLEBYTE(str[point])) + { + memset (&ps, 0, sizeof (mbstate_t)); + tmp = 1; + } + else + 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 @@ -2654,7 +3540,13 @@ _rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1"); while (point < end) { - tmp = mbrtowc (&wc, str + point, max, &ps); + if (_rl_utf8locale && UTF8_SINGLEBYTE(str[point])) + { + tmp = 1; + wc = (WCHAR_T) str[point]; + } + else + 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 @@ -2676,7 +3568,7 @@ _rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1"); { point += tmp; max -= tmp; - tmp = wcwidth(wc); + tmp = WCWIDTH(wc); width += (tmp >= 0) ? tmp : 1; } } diff --git a/lib/readline/doc/._fdl.texi b/lib/readline/doc/._fdl.texi deleted file mode 100644 index 3dd8e43..0000000 Binary files a/lib/readline/doc/._fdl.texi and /dev/null differ diff --git a/lib/readline/doc/Makefile b/lib/readline/doc/Makefile index af5ee3e..2ad833a 100644 --- a/lib/readline/doc/Makefile +++ b/lib/readline/doc/Makefile @@ -18,7 +18,6 @@ # along with this program. If not, see . # - topdir = . srcdir = . VPATH = . @@ -49,6 +48,8 @@ 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 +DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE} +PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \ $(srcdir)/rltech.texi $(srcdir)/version.texi \ @@ -66,15 +67,25 @@ 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 +PDFOBJ = readline.pdf history.pdf rluserman.pdf INTERMEDIATE_OBJ = rlman.dvi -CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) +CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(PDFOBJ) + +.SUFFIXES: .ps .txt .dvi .html .pdf -.SUFFIXES: .ps .txt .dvi +.ps.pdf: + $(RM) $@ + -${PSPDF} $< -all: info dvi html ps +.dvi.pdf: + $(RM) $@ + -${DVIPDF} $< + +all: info dvi html ps nodvi: info html +pdf: $(PDFOBJ) readline.dvi: $(RLSRC) TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi @@ -123,14 +134,17 @@ dvi: $(DVIOBJ) ps: $(PSOBJ) html: $(HTMLOBJ) +readline.pdf: readline.dvi +history.pdf: history.dvi +rluserman.pdf: rluserman.dvi + clean: $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ - *.fns *.kys *.tps *.vrs *.o core + *.fns *.kys *.tps *.vrs *.bt *.bts *.o core *.core distclean: clean $(RM) $(CREATED_DOCS) $(RM) $(INTERMEDIATE_OBJ) - $(RM) Makefile mostlyclean: clean diff --git a/lib/readline/doc/history.texi b/lib/readline/doc/history.texi index afdb901..721118b 100644 --- a/lib/readline/doc/history.texi +++ b/lib/readline/doc/history.texi @@ -2,33 +2,25 @@ @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 +@c %**end of header (This is for running Texinfo on a region.) + @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. +Copyright @copyright{} 1988--2022 Free Software Foundation, Inc. @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.'' +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 quotation @end copying @@ -50,12 +42,6 @@ developing GNU and promoting software freedom.'' @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 diff --git a/lib/readline/doc/hstech.texi b/lib/readline/doc/hstech.texi index c4e5a75..da6417b 100644 --- a/lib/readline/doc/hstech.texi +++ b/lib/readline/doc/hstech.texi @@ -1,7 +1,7 @@ @ignore This file documents the user interface to the GNU History library. -Copyright (C) 1988-2007 Free Software Foundation, Inc. +Copyright (C) 1988-2022 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. Permission is granted to make and distribute verbatim copies of this manual @@ -48,7 +48,7 @@ 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 +A 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 @@ -62,7 +62,7 @@ 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 +The programmer can also use the Readline library, which includes some history manipulation by default, and has the added advantage of command line editing. @@ -166,6 +166,9 @@ 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}. +If the maximum number of history entries has been set using +@code{stifle_history()}, and the new number of history entries would exceed +that maximum, the oldest history entry is removed. @end deftypefun @deftypefun void add_history_time (const char *string) @@ -198,6 +201,7 @@ Clear the history list by deleting all the entries. @deftypefun void stifle_history (int max) Stifle the history list, remembering only the last @var{max} entries. +The history list will contain only @var{max} entries at a time. @end deftypefun @deftypefun int unstifle_history (void) @@ -234,14 +238,17 @@ 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. +Return the history entry at position @var{offset}. +The range of valid +values of @var{offset} starts at @code{history_base} and ends at +@var{history_length} - 1 (@pxref{History Variables}). +If there is no entry there, or if @var{offset} is outside the valid +range, 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}. +If the timestamp is missing or invalid, return 0. @end deftypefun @deftypefun int history_total_bytes (void) @@ -270,9 +277,11 @@ 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. +If the current history offset refers to a valid history entry, +increment the current history offset. +If the possibly-incremented history offset refers to a valid history +entry, return a pointer to that entry; +otherwise, return a @code{BNULL} pointer. @end deftypefun @node Searching the History List @@ -377,7 +386,7 @@ 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 +If an error occurred in expansion, then @var{output} contains a descriptive error message. @end deftypefun @@ -394,7 +403,7 @@ to the ``normal'' terminating characters. 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. +and shell quoting conventions are obeyed as described below. @end deftypefun @deftypefun {char *} history_arg_extract (int first, int last, const char *string) @@ -426,6 +435,10 @@ The maximum number of history entries. This must be changed using 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. + +The current timestamp format uses the value of @var{history_comment_char} +to delimit timestamp entries in the history file. If that variable does +not have a value (the default), timestamps will not be written. @end deftypevar @deftypevar char history_expansion_char @@ -463,8 +476,24 @@ 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. +If non-zero, the history expansion code implements shell-like quoting: +single-quoted words are not scanned for the history expansion +character or the history comment character, and double-quoted words may +have history expansion performed, since single quotes are not special +within double quotes. +The default value is 0. +@end deftypevar + +@deftypevar int history_quoting_state +An application may set this variable to indicate that the current line +being expanded is subject to existing quoting. If set to @samp{'}, the +history expansion function will assume that the line is single-quoted and +inhibit expansion until it reads an unquoted closing single quote; if set +to @samp{"}, history expansion will assume the line is double quoted until +it reads an unquoted closing double quote. If set to zero, the default, +the history expansion function will assume the line is not quoted and +treat quote characters within the line as described above. +This is only effective if @var{history_quotes_inhibit_expansion} is set. @end deftypevar @deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function diff --git a/lib/readline/doc/hsuser.texi b/lib/readline/doc/hsuser.texi index 87b3541..9081baf 100644 --- a/lib/readline/doc/hsuser.texi +++ b/lib/readline/doc/hsuser.texi @@ -1,7 +1,7 @@ @ignore This file documents the user interface to the GNU History library. -Copyright (C) 1988-2007 Free Software Foundation, Inc. +Copyright (C) 1988--2022 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. Permission is granted to make and distribute verbatim copies of this manual @@ -84,24 +84,25 @@ 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 +When a shell with history enabled 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. +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 unset, or set to null, a non-numeric value, or +a numeric value less than zero, the history file is not truncated. If the @env{HISTTIMEFORMAT} is set, the time stamp information associated with each history entry is written to the history file, 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. +as timestamps for the following history entry. The builtin command @code{fc} may be used to list or edit and re-execute a portion of the history list. @@ -123,7 +124,7 @@ 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}. +@xref{The Shopt Builtin}, for a description of @code{shopt}. @node Bash History Builtins @section Bash History Builtins @@ -141,13 +142,22 @@ history list and history file. @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 +The first form selects a range of commands from @var{first} to +@var{last} from the history list and displays or edits and re-executes +them. +Both @var{first} and @var{last} may be specified as a string (to locate the most recent command beginning with that string) or as a number (an index into the history list, where a negative number is used as an offset from the -current command number). If @var{last} is not specified it is set to -@var{first}. If @var{first} is not specified it is set to the previous +current command number). + +When listing, a @var{first} or @var{last} of 0 is equivalent to -1 +and -0 is equivalent to the current command (usually the @code{fc} +command); +otherwise 0 is equivalent to -1 and -0 is invalid. + +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 @@ -161,6 +171,7 @@ When editing is complete, the edited commands are echoed and executed. In the second form, @var{command} is re-executed after each instance of @var{pat} in the selected command is replaced by @var{rep}. +@var{command} is interpreted the same as @var{first} above. A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so that typing @samp{r cc} runs the last command beginning with @code{cc} @@ -172,6 +183,7 @@ and typing @samp{r} re-executes the last command (@pxref{Aliases}). history [@var{n}] history -c history -d @var{offset} +history -d @var{start}-@var{end} history [-anrw] [@var{filename}] history -ps @var{arg} @end example @@ -194,13 +206,23 @@ 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. +If @var{offset} is positive, it should be specified as it appears when +the history is displayed. +If @var{offset} is negative, it is interpreted as relative to one greater +than the last history position, so negative indices count back from the +end of the history, and an index of @samp{-1} refers to the current +@code{history -d} command. + +@item -d @var{start}-@var{end} +Delete the range of history entries between positions @var{start} and +@var{end}, inclusive. +Positive and negative values for @var{start} and @var{end} +are interpreted as described above. @item -a -Append the new -history lines (history lines entered since the beginning of the -current Bash session) to the history file. +Append the new history lines to the history file. +These are history lines entered since the beginning of the current +Bash session, but not already appended to the history file. @item -n Append the history lines not already read from the history file @@ -208,11 +230,11 @@ 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 +Read the history file and append its contents to the history list. @item -w -Write out the current history to the history file. +Write out the current history list to the history file. @item -p Perform history substitution on the @var{arg}s and display the result @@ -224,10 +246,15 @@ 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. +If a @var{filename} argument is supplied +when any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options +is used, Bash uses @var{filename} as the history file. +If not, then the value of the @env{HISTFILE} variable is used. + +The return value is 0 unless an invalid option is encountered, an +error occurs while reading or writing the history file, an invalid +@var{offset} or range is supplied as an argument to @option{-d}, or the +history expansion supplied as an argument to @option{-p} fails. @end table @end ifset @@ -245,6 +272,13 @@ 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. +@ifset BashFeatures +History expansion is performed immediately after a complete line +is read, before the shell breaks it into words, and is performed +on each line individually. Bash attempts to inform the history +expansion functions about quoting still in effect from previous lines. +@end ifset + 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 @@ -256,14 +290,26 @@ 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. + +History expansion implements shell-like quoting conventions: +a backslash can be used to remove the special handling for the next character; +single quotes enclose verbatim sequences of characters, and can be used to +inhibit history expansion; +and characters enclosed within double quotes may be subject to history +expansion, since backslash can escape the history expansion character, +but single quotes may not, since they are not treated specially within +double quotes. + @ifset BashFeatures -Only @samp{\} and @samp{'} may be used to escape the history expansion -character. +When using the shell, only @samp{\} and @samp{'} may be used to escape the +history expansion character, but the history expansion character is +also treated as quoted if it immediately precedes the closing double quote +in a double-quoted string. @end ifset @ifset BashFeatures Several shell options settable with the @code{shopt} -builtin (@pxref{Bash Builtins}) may be used to tailor +builtin (@pxref{The Shopt Builtin}) 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 @@ -299,6 +345,8 @@ writing the history file. An event designator is a reference to a command line entry in the history list. +Unless the reference is absolute, events are relative to the current +position in the history list. @cindex history events @table @asis @@ -324,17 +372,24 @@ Refer to the command @var{n} lines back. 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}. +Refer to the most recent command +preceding the current position in the history list +starting with @var{string}. @item @code{!?@var{string}[?]} -Refer to the most recent command containing @var{string}. The trailing +Refer to the most recent command +preceding the current position in the history list +containing @var{string}. +The trailing @samp{?} may be omitted if the @var{string} is followed immediately by a newline. +If @var{string} is missing, the string from the most recent search is used; +it is an error if there is no previous search string. @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}/}. +@code{!!:s^@var{string1}^@var{string2}^}. @item @code{!#} The entire command line typed so far. @@ -386,7 +441,8 @@ The first argument; that is, word 1. The last argument. @item % -The word matched by the most recent @samp{?@var{string}?} search. +The first word matched by the most recent @samp{?@var{string}?} search, +if the search string begins with a character that is part of a word. @item @var{x}-@var{y} A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}. @@ -401,6 +457,7 @@ Abbreviates @samp{@var{x}-$} @item @var{x}- Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word. +If @samp{x} is missing, it defaults to 0. @end table @@ -412,6 +469,7 @@ previous command is used as the event. After the optional word designator, you can add a sequence of one or more of the following modifiers, each preceded by a @samp{:}. +These modify, or edit, the word or words selected from the history event. @table @code @@ -438,15 +496,25 @@ 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. +The @samp{q} and @samp{x} modifiers are mutually exclusive; the last one +supplied is used. @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{/}. +event line. +Any character may be used as the delimiter 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 +the @samp{&}. +If @var{old} is null, it is set to the last @var{old} +substituted, or, if no previous history substitutions took place, +the last @var{string} +in a !?@var{string}@code{[?]} +search. +If @var{new} is null, each matching @var{old} is deleted. +The final delimiter is optional if it is the last character on the input line. @item & @@ -459,6 +527,7 @@ 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. +Apply the following @samp{s} or @samp{&} modifier once to each word +in the event. @end table diff --git a/lib/readline/doc/rlman.texi b/lib/readline/doc/rlman.texi index be24709..d046b87 100644 --- a/lib/readline/doc/rlman.texi +++ b/lib/readline/doc/rlman.texi @@ -2,34 +2,26 @@ @comment %**start of header (This is for running Texinfo on a region.) @setfilename readline.info @settitle GNU Readline Library +@include version.texi + @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. +Copyright @copyright{} 1988--2022 Free Software Foundation, Inc. @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.'' +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 quotation @end copying @@ -50,12 +42,6 @@ developing GNU and promoting software freedom.'' @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 @@ -67,6 +53,7 @@ USA @* 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. +The Readline home page is @url{http://www.gnu.org/software/readline/}. @menu * Command Line Editing:: GNU Readline User's Manual. diff --git a/lib/readline/doc/rltech.texi b/lib/readline/doc/rltech.texi index 04c8489..a93f77d 100644 --- a/lib/readline/doc/rltech.texi +++ b/lib/readline/doc/rltech.texi @@ -7,7 +7,7 @@ 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. +Copyright (C) 1988--2022 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -90,6 +90,12 @@ 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. +Readline performs some expansion on the @var{prompt} before it is +displayed on the screen. See the description of @code{rl_expand_prompt} +(@pxref{Redisplay}) for additional details, especially if @var{prompt} +will contain characters that do not consume physical screen space when +displayed. + 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. @@ -195,7 +201,7 @@ For Readline 4.2, for example, the value of @node Readline Typedefs @subsection Readline Typedefs -For readabilty, we declare a number of new object types, all pointers +For readability, 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 @@ -282,7 +288,7 @@ 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. +and a value greater than zero if some error occurs. This is the convention obeyed by all of the builtin Readline bindable command functions. @@ -317,6 +323,14 @@ and point define a @emph{region}. @deftypevar int rl_done Setting this to a non-zero value causes Readline to return the current line immediately. +Readline will set this variable when it has read a key sequence bound +to @code{accept-line} and is about to return the line to the caller. +@end deftypevar + +@deftypevar int rl_eof_found +Readline will set this variable when it has read an EOF character (e.g., the +stty @samp{EOF} character) on an empty line or encountered a read error and +is about to return a NULL line to the caller. @end deftypevar @deftypevar int rl_num_chars_to_read @@ -379,7 +393,7 @@ value 0x0402. @end deftypevar @deftypevar {int} rl_gnu_readline_p -Always set to 1, denoting that this is @sc{gnu} readline rather than some +Always set to 1, denoting that this is @sc{gnu} Readline rather than some emulation. @end deftypevar @@ -440,6 +454,40 @@ 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}). +In general, an application that sets @var{rl_getc_function} should consider +setting @var{rl_input_available_hook} as well. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_signal_event_hook +If non-zero, this is the address of a function to call if a read system +call is interrupted when Readline is reading terminal input. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_timeout_event_hook +If non-zero, this is the address of a function to call if Readline times +out while reading input. +@end deftypevar + +@deftypevar {rl_hook_func_t *} rl_input_available_hook +If non-zero, Readline will use this function's return value when it needs +to determine whether or not there is available input on the current input +source. +The default hook checks @code{rl_instream}; if an application is using a +different input source, it should set the hook appropriately. +Readline queries for available input when implementing intra-key-sequence +timeouts during input and incremental searches. +This may use an application-specific timeout before returning a value; +Readline uses the value passed to @code{rl_set_keyboard_input_timeout()} +or the value of the user-settable @var{keyseq-timeout} variable. +This is designed for use by applications using Readline's callback interface +(@pxref{Alternate Interface}), which may not use the traditional +@code{read(2)} and file descriptor interface, or other applications using +a different input mechanism. +If an application uses an input mechanism or hook that can potentially exceed +the value of @var{keyseq-timeout}, it should increase the timeout or set +this hook appropriately even when not using the callback interface. +In general, an application that sets @var{rl_getc_function} should consider +setting @var{rl_input_available_hook} as well. @end deftypevar @deftypevar {rl_voidfunc_t *} rl_redisplay_function @@ -467,7 +515,7 @@ By default, this is set to @code{rl_deprep_terminal} @deftypevar {Keymap} rl_executing_keymap This variable is set to the keymap (@pxref{Keymaps}) in which the -currently executing readline function was found. +currently executing Readline function was found. @end deftypevar @deftypevar {Keymap} rl_binding_keymap @@ -479,6 +527,19 @@ last key binding occurred. This variable is set to the text of any currently-executing macro. @end deftypevar +@deftypevar int rl_executing_key +The key that caused the dispatch to the currently-executing Readline function. +@end deftypevar + +@deftypevar {char *} rl_executing_keyseq +The full key sequence that caused the dispatch to the currently-executing +Readline function. +@end deftypevar + +@deftypevar int rl_key_sequence_length +The number of characters in @var{rl_executing_keyseq}. +@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 @@ -487,7 +548,7 @@ 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. +Readline has not yet been called, nor has it begun to initialize. @item RL_STATE_INITIALIZING Readline is initializing its internal data structures. @item RL_STATE_INITIALIZED @@ -540,6 +601,13 @@ 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. +@item RL_STATE_TIMEOUT +Readline has timed out (it did not receive a line or specified number of +characters before the timeout duration specified by @code{rl_set_timeout} +elapsed) and is returning that status to the caller. +@item RL_STATE_EOF +Readline has read an EOF character (e.g., the stty @samp{EOF} character) +or encountered a read error and is about to return a NULL line to the caller. @end table @end deftypevar @@ -580,6 +648,7 @@ means that vi mode is active. * 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. +* Alternate Interface Example:: An example program using the alternate interface. @end menu @node Function Naming @@ -645,6 +714,11 @@ Free all storage associated with @var{keymap}. This calls @code{rl_discard_keymap} to free subordindate keymaps and macros. @end deftypefun +@deftypefun int rl_empty_keymap (Keymap keymap) +Return non-zero if there are no keys bound to functions in @var{keymap}; +zero if there are any keys bound. +@end deftypefun + Readline has several internal keymaps. These functions allow you to change which keymap is active. @@ -666,6 +740,24 @@ 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 +@deftypefun int rl_set_keymap_name (const char *name, Keymap keymap) +Set the name of @var{keymap}. This name will then be "registered" and +available for use in a @code{set keymap} inputrc directive +@pxref{Readline Init File}). +The @var{name} may not be one of Readline's builtin keymap names; +you may not add a different name for one of Readline's builtin keymaps. +You may replace the name associated with a given keymap by calling this +function more than once with the same @var{keymap} argument. +You may associate a registered @var{name} with a new keymap by calling this +function more than once with the same @var{name} argument. +There is no way to remove a named keymap once the name has been +registered. +Readline will make a copy of @var{name}. +The return value is greater than zero unless @var{name} is one of +Readline's builtin keymap names or @var{keymap} is one of Readline's +builtin keymaps. +@end deftypefun + @node Binding Keys @subsection Binding Keys @@ -792,6 +884,25 @@ 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}). +It takes a "translated" key sequence and should not be used if the key sequence +can include NUL. +@end deftypefun + +@deftypefun {rl_command_func_t *} rl_function_of_keyseq_len (const char *keyseq, size_t len, Keymap map, int *type) +Return the function invoked by @var{keyseq} of length @var{len} +in keymap @var{map}. Equivalent to @code{rl_function_of_keyseq} with the +addition of the @var{len} parameter. +It takes a "translated" key sequence and should be used if the key sequence +can include NUL. +@end deftypefun + +@deftypefun {int} rl_trim_arg_from_keyseq (const char *keyseq, size_t len, Keymap map) +If there is a numeric argument at the beginning of @var{keyseq}, possibly +including digits, return the index of the first character in @var{keyseq} +following the numeric argument. +This can be used to skip over the numeric argument (which is available as +@code{rl_numeric_arg} while traversing the key sequence that invoked the +current command. @end deftypefun @deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function) @@ -805,7 +916,7 @@ 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 +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. @@ -908,7 +1019,7 @@ Readline thinks the screen display is correct. @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. +usually after outputting a newline. @end deftypefun @deftypefun int rl_on_new_line_with_prompt (void) @@ -920,6 +1031,10 @@ redisplay. It should be used after setting @var{rl_already_prompted}. @end deftypefun +@deftypefun int rl_clear_visible_line (void) +Clear the screen lines corresponding to the current line's contents. +@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. @@ -977,8 +1092,9 @@ It returns the number of visible characters on the last line of the 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. +and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h} as +@samp{\001} and @samp{\002}, respectively). +This may be used to embed terminal-specific escape sequences in prompts. @end deftypefun @deftypefun int rl_set_prompt (const char *prompt) @@ -1065,6 +1181,30 @@ The default waiting period is one-tenth of a second. Returns the old timeout value. @end deftypefun +@deftypefun int rl_set_timeout (unsigned int secs, unsigned int usecs) +Set a timeout for subsequent calls to @code{readline()}. If Readline does +not read a complete line, or the number of characters specified by +@code{rl_num_chars_to_read}, before the duration specified by @var{secs} +(in seconds) and @var{usecs} (microseconds), it returns and sets +@code{RL_STATE_TIMEOUT} in @code{rl_readline_state}. +Passing 0 for @code{secs} and @code{usecs} cancels any previously set +timeout; the convenience macro @code{rl_clear_timeout()} is shorthand +for this. +Returns 0 if the timeout is set successfully. +@end deftypefun + +@deftypefun int rl_timeout_remaining (unsigned int *secs, unsigned int *usecs) +Return the number of seconds and microseconds remaining in the current +timeout duration in @var{*secs} and @var{*usecs}, respectively. +Both @var{*secs} and @var{*usecs} must be non-NULL to return any values. +The return value is -1 on error or when there is no timeout set, +0 when the timeout has expired (leaving @var{*secs} and @var{*usecs} +unchanged), +and 1 if the timeout has not expired. +If either of @var{secs} and @var{usecs} is @code{NULL}, +the return value indicates whether the timeout has expired. +@end deftypefun + @node Terminal Management @subsection Terminal Management @@ -1093,6 +1233,14 @@ that the terminal editing characters are bound to @code{rl_insert}. The bindings are performed in @var{kmap}. @end deftypefun +@deftypefun int rl_tty_set_echoing (int value) +Set Readline's idea of whether or not it is echoing output to its output +stream (@var{rl_outstream}). If @var{value} is 0, Readline does not display +output to @var{rl_outstream}; any other value enables output. The initial +value is set when Readline initializes the terminal settings. +This function returns the previous value. +@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}). @@ -1157,6 +1305,9 @@ of strings, in argv format, such as a list of completion matches. 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}). +When displaying completions, this function sets the number of columns used +for display to the value of @code{completion-display-width}, the value of +the environment variable @env{COLUMNS}, or the screen width, in that order. @end deftypefun The following are implemented as macros, defined in @code{chardefs.h}. @@ -1207,7 +1358,7 @@ that it can be made part of an @code{inputrc} file and re-read. @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 +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 @@ -1218,7 +1369,7 @@ 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 +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. @@ -1238,21 +1389,54 @@ use all of a terminal's capabilities, and this function will return values for only those capabilities Readline uses. @end deftypefun +@deftypefun {void} rl_clear_history (void) +Clear the history list by deleting all of the entries, in the same manner +as the History library's @code{clear_history()} function. +This differs from @code{clear_history} because it frees private data +Readline saves in the history list. +@end deftypefun + +@deftypefun {void} rl_activate_mark (void) +Enable an @emph{active} mark. +When this is enabled, the text between point and mark (the @var{region}) is +displayed in the terminal's standout mode (a @var{face}). +This is called by various Readline functions that set the mark and insert +text, and is available for applications to call. +@end deftypefun + +@deftypefun {void} rl_deactivate_mark (void) +Turn off the active mark. +@end deftypefun + +@deftypefun {void} rl_keep_mark_active (void) +Indicate that the mark should remain active when the current Readline +function completes and after redisplay occurs. +In most cases, the mark remains active for only the duration of a single +bindable Readline function. +@end deftypefun + +@deftypefun {int} rl_mark_active_p (void) +Return a non-zero value if the mark is currently active; zero otherwise. +@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 +on various file descriptors. To accommodate 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 +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. +use as a handler function to call when a complete line of input has been +entered. +The handler function receives the text of the line as an argument. +As with @code{readline()}, the handler function should @code{free} the +line when it it finished with it. @end deftypefun @deftypefun void rl_callback_read_char (void) @@ -1260,20 +1444,29 @@ 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. +invoke the @var{lhandler} function installed 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, +and the line handler remains installed, the terminal settings are modified for Readline's use again. -@code{EOF} is indicated by calling @var{lhandler} with a +@code{EOF} is indicated by calling @var{lhandler} with a @code{NULL} line. @end deftypefun +@deftypefun void rl_callback_sigcleanup (void) +Clean up any internal state the callback interface uses to maintain state +between calls to rl_callback_read_char (e.g., the state of any active +incremental searches). This is intended to be used by applications that +wish to perform their own signal handling; Readline's internal signal handler +calls this when appropriate. +@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. +You may call this function 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 @@ -1347,12 +1540,132 @@ invert_case_line (count, key) @} @end example +@node Alternate Interface Example +@subsection Alternate Interface Example + +Here is a complete program that illustrates Readline's alternate interface. +It reads lines from the terminal and displays them, providing the +standard history and TAB completion functions. +It understands the EOF character or "exit" to exit the program. + +@example +/* Standard include files. stdio.h is required. */ +#include +#include +#include +#include + +/* Used for select(2) */ +#include +#include + +#include + +#include + +/* Standard readline include files. */ +#include +#include + +static void cb_linehandler (char *); +static void sighandler (int); + +int running; +int sigwinch_received; +const char *prompt = "rltest$ "; + +/* Handle SIGWINCH and window size changes when readline is not active and + reading a character. */ +static void +sighandler (int sig) +@{ + sigwinch_received = 1; +@} + +/* Callback function called for each line when accept-line executed, EOF + seen, or EOF character read. This sets a flag and returns; it could + also call exit(3). */ +static void +cb_linehandler (char *line) +@{ + /* Can use ^D (stty eof) or `exit' to exit. */ + if (line == NULL || strcmp (line, "exit") == 0) + @{ + if (line == 0) + printf ("\n"); + printf ("exit\n"); + /* This function needs to be called to reset the terminal settings, + and calling it from the line handler keeps one extra prompt from + being displayed. */ + rl_callback_handler_remove (); + + running = 0; + @} + else + @{ + if (*line) + add_history (line); + printf ("input line: %s\n", line); + free (line); + @} +@} + +int +main (int c, char **v) +@{ + fd_set fds; + int r; + + /* Set the default locale values according to environment variables. */ + setlocale (LC_ALL, ""); + + /* Handle window size changes when readline is not active and reading + characters. */ + signal (SIGWINCH, sighandler); + + /* Install the line handler. */ + rl_callback_handler_install (prompt, cb_linehandler); + + /* Enter a simple event loop. This waits until something is available + to read on readline's input stream (defaults to standard input) and + calls the builtin character read callback to read it. It does not + have to modify the user's terminal settings. */ + running = 1; + while (running) + @{ + FD_ZERO (&fds); + FD_SET (fileno (rl_instream), &fds); + + r = select (FD_SETSIZE, &fds, NULL, NULL, NULL); + if (r < 0 && errno != EINTR) + @{ + perror ("rltest: select"); + rl_callback_handler_remove (); + break; + @} + if (sigwinch_received) + @{ + rl_resize_terminal (); + sigwinch_received = 0; + @} + if (r < 0) + continue; + + if (FD_ISSET (fileno (rl_instream), &fds)) + rl_callback_read_char (); + @} + + printf ("rltest: Event loop has exited\n"); + 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, +exceptional events, like a user pressing the terminal's interrupt key, 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 @@ -1362,6 +1675,7 @@ 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{SIGHUP}, @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 @@ -1384,7 +1698,30 @@ 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. +terminal state. + +When an application is using the callback interface +(@pxref{Alternate Interface}), Readline installs signal handlers only for +the duration of the call to @code{rl_callback_read_char}. Applications +using the callback interface should be prepared to clean up Readline's +state if they wish to handle the signal before the line handler completes +and restores the terminal state. + +If an application using the callback interface wishes to have Readline +install its signal handlers at the time the application calls +@code{rl_callback_handler_install} and remove them only when a complete +line of input has been read, it should set the +@code{rl_persistent_signal_handlers} variable to a non-zero value. +This allows an application to defer all of the handling of the signals +Readline catches to Readline. +Applications should use this variable with care; it can result in Readline +catching signals and not acting on them (or allowing the application to react +to them) until the application calls @code{rl_callback_read_char}. This +can result in an application becoming less responsive to keyboard signals +like SIGINT. +If an application does not want or need to perform any signal handling, or +does not need to do any processing between calls to @code{rl_callback_read_char}, +setting this variable may be desirable. Readline provides two variables that allow application writers to control whether or not it will catch certain signals and act on them @@ -1394,25 +1731,48 @@ 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{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGHUP}, @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}. +If this variable is set to a non-zero value, +Readline will install a signal handler for @code{SIGWINCH}. The default value of @code{rl_catch_sigwinch} is 1. @end deftypevar +@deftypevar int rl_persistent_signal_handlers +If an application using the callback interface wishes Readline's signal +handlers to be installed and active during the set of calls to +@code{rl_callback_read_char} that constitutes an entire single line, +it should set this variable to a non-zero value. + +The default value of @code{rl_persistent_signal_handlers} is 0. +@end deftypevar + +@deftypevar int rl_change_environment +If this variable is set to a non-zero value, +and Readline is handling @code{SIGWINCH}, Readline will modify the +@var{LINES} and @var{COLUMNS} environment variables upon receipt of a +@code{SIGWINCH} + +The default value of @code{rl_change_environment} 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 int rl_pending_signal (void) +Return the signal number of the most recent signal Readline received but +has not yet handled, or 0 if there is no pending signal. +@end deftypefun + @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 @@ -1435,14 +1795,27 @@ handlers, depending on the values of @code{rl_catch_signals} and @code{rl_catch_sigwinch}. @end deftypefun +If an application wants to force Readline to handle any signals that +have arrived while it has been executing, @code{rl_check_signals()} +will call Readline's internal signal handler if there are any pending +signals. This is primarily intended for those applications that use +a custom @code{rl_getc_function} (@pxref{Readline Variables}) and wish +to handle signals received while waiting for input. + +@deftypefun void rl_check_signals (void) +If there are any pending signals, call Readline's internal signal handling +functions to process them. @code{rl_pending_signal()} can be used independently +to determine whether or not there are any pending signals. +@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. +Readline to update its idea of the terminal size when it receives +a @code{SIGWINCH}. @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 +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 @@ -1455,11 +1828,14 @@ Update Readline's internal screen size by reading values from the kernel. 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. +This is intended to tell Readline the physical dimensions of the terminal, +and is used internally to calculate the maximum number of characters that +may appear on a single line and on the screen. @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. +is still interested in the screen dimensions, it may query Readline's idea +of the screen size. @deftypefun void rl_get_screen_size (int *rows, int *cols) Return Readline's idea of the terminal's size in the @@ -1474,7 +1850,7 @@ 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{SIGTERM}, @code{SIGHUP}, @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 @@ -1608,7 +1984,7 @@ 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()} +Returns the appropriate 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. @@ -1714,38 +2090,56 @@ from the array must be freed. @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. +of filenames Readline completes. +It could be used to expand symbolic links or shell variables in pathnames. +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 modified value will be used 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()}. + +The directory completion hook returns an integer that should be non-zero if +the function modifies its directory argument. +The function should not modify the directory argument if it returns 0. @end deftypevar -@ignore -@deftypevar extern rl_icppfunc_t *rl_directory_rewrite_hook; +@deftypevar {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. +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()}. -I'm not happy with how this worksyet, so it's undocumented. +The directory rewrite hook returns an integer that should be non-zero if +the function modifies its directory argument. +The function should not modify the directory argument if it returns 0. +@end deftypevar + +@deftypevar {rl_icppfunc_t *} rl_filename_stat_hook +If non-zero, this is the address of a function for the completer to +call before deciding which character to append to a completed name. +This function modifies its filename name argument, and the modified value +is passed to @code{stat()} to determine the file's type and characteristics. +This function does not need to remove quote characters from the filename. + +The stat hook returns an integer that should be non-zero if +the function modifies its directory argument. +The function should not modify the directory argument if it returns 0. @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 +perform any necessary 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, @@ -1767,8 +2161,8 @@ 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. +that takes care of doing the display to Readline's output stream. +You may call that function from this hook. @end deftypevar @deftypevar {const char *} rl_basic_word_break_characters @@ -1819,9 +2213,10 @@ shell variables and hostnames. @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. +possible-completions call. After that, Readline asks the user for +confirmation before displaying them. +The default value is 100. A negative value +indicates that Readline should never ask for confirmation. @end deftypevar @deftypevar {int} rl_completion_append_character @@ -1832,6 +2227,8 @@ 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. +It is set to the default before any application-specific completion function +is called, and may only be changed within such a function. @end deftypevar @deftypevar int rl_completion_suppress_append @@ -1971,6 +2368,7 @@ history list. #include #include #include +#include #if defined (HAVE_STRING_H) # include @@ -2051,6 +2449,8 @@ main (argc, argv) @{ char *line, *s; + setlocale (LC_ALL, ""); + progname = argv[0]; initialize_readline (); /* Bind our completer. */ @@ -2329,7 +2729,7 @@ com_help (arg) if (!printed) @{ - printf ("No commands match `%s'. Possibilties are:\n", arg); + printf ("No commands match `%s'. Possibilities are:\n", arg); for (i = 0; commands[i].name; i++) @{ diff --git a/lib/readline/doc/rluser.texi b/lib/readline/doc/rluser.texi index 519c0de..cbcbb45 100644 --- a/lib/readline/doc/rluser.texi +++ b/lib/readline/doc/rluser.texi @@ -9,7 +9,7 @@ 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. +Copyright (C) 1988--2022 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. @@ -51,7 +51,7 @@ 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. +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 @@ -72,6 +72,8 @@ Line editing can be enabled at any time using the @option{-o emacs} or a specific command. * Programmable Completion Builtins:: Builtin commands to specify how to complete arguments for a particular command. +* A Programmable Completion Example:: An example shell function for + generating possible completions. @end ifset @end menu @@ -177,7 +179,7 @@ empty line. @end table @noindent -(Depending on your configuration, the @key{Backspace} key be set to +(Depending on your configuration, the @key{Backspace} key might 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.) @@ -244,7 +246,7 @@ 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 +Kill from the cursor to 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}. @@ -337,7 +339,8 @@ 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. +commands in an @dfn{inputrc} file, +conventionally in their home directory. The name of this @ifset BashFeatures file is taken from the value of the shell variable @env{INPUTRC}. If @@ -348,6 +351,11 @@ file is taken from the value of the environment variable @env{INPUTRC}. If 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}. +@ifset BashFeatures +The @w{@code{bind}} builtin command can also be used to set Readline +keybindings and variables. +@xref{Bash Builtins}. +@end ifset When a program which uses the Readline library starts up, the init file is read, and the key bindings are set. @@ -411,6 +419,32 @@ variables. @cindex variables, readline @table @code +@item active-region-start-color +@vindex active-region-start-color +A string variable that controls the text color and background when displaying +the text in the active region (see the description of +@code{enable-active-region} below). +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal before displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that puts the terminal in standout mode, +as obtained from the terminal's terminfo description. +A sample value might be @samp{\e[01;33m}. + +@item active-region-end-color +@vindex active-region-end-color +A string variable that "undoes" the effects of @code{active-region-start-color} +and restores "normal" terminal display appearance after displaying text +in the active region. +This string must not take up any physical character positions on the display, +so it should consist only of terminal escape sequences. +It is output to the terminal after displaying the text in the active region. +This variable is reset to the default value whenever the terminal type changes. +The default value is the string that restores the terminal from standout mode, +as obtained from the terminal's terminfo description. +A sample value might be @samp{\e[0m}. + @item bell-style @vindex bell-style Controls what happens when Readline wants to ring the terminal bell. @@ -421,9 +455,34 @@ 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. +If set to @samp{on} (the default), Readline attempts to bind the control +characters treated specially by the kernel's terminal driver to their +Readline equivalents. + +@item blink-matching-paren +@vindex blink-matching-paren +If set to @samp{on}, Readline attempts to briefly move the cursor to an +opening parenthesis when a closing parenthesis is inserted. The default +is @samp{off}. + +@item colored-completion-prefix +@vindex colored-completion-prefix +If set to @samp{on}, when listing completions, Readline displays the +common prefix of the set of possible completions using a different color. +The color definitions are taken from the value of the @env{LS_COLORS} +environment variable. +If there is a color definition in @env{LS_COLORS} for the custom suffix +@samp{readline-colored-completion-prefix}, Readline uses this color for +the common prefix instead of its default. +The default is @samp{off}. + +@item colored-stats +@vindex colored-stats +If set to @samp{on}, Readline displays possible completions using different +colors to indicate their file type. +The color definitions are taken from the value of the @env{LS_COLORS} +environment variable. +The default is @samp{off}. @item comment-begin @vindex comment-begin @@ -431,11 +490,28 @@ 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-display-width +@vindex completion-display-width +The number of screen columns used to display possible matches +when performing completion. +The value is ignored if it is less than 0 or greater than the terminal +screen width. +A value of 0 will cause matches to be displayed one per line. +The default value is -1. + @item completion-ignore-case +@vindex 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-map-case +@vindex completion-map-case +If set to @samp{on}, and @var{completion-ignore-case} is enabled, Readline +treats hyphens (@samp{-}) and underscores (@samp{_}) as equivalent when +performing case-insensitive filename matching and completion. +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 @@ -447,11 +523,12 @@ replaced with an ellipsis when displaying possible completions. @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. +If the number of possible completions is greater than or equal to this value, +Readline will ask whether or not the user wishes to view them; +otherwise, they are simply listed. +This variable must be set to an integer value greater than or equal to zero. +A zero value means Readline should never ask; negative values are +treated as zero. The default limit is @code{100}. @item convert-meta @@ -459,7 +536,12 @@ The default limit is @code{100}. 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}. +meta-prefixed key sequence. +The default value is @samp{on}, but +will be set to @samp{off} if the locale is one that contains +eight-bit characters. +This variable is dependent on the @code{LC_CTYPE} locale category, and +may change if the locale is changed. @item disable-completion @vindex disable-completion @@ -467,6 +549,12 @@ 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 echo-control-characters +@vindex 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 editing-mode @vindex editing-mode The @code{editing-mode} variable controls which default set of @@ -474,10 +562,42 @@ 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 emacs-mode-string +@vindex emacs-mode-string +If the @var{show-mode-in-prompt} variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when emacs editing mode is active. The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the @samp{\1} and @samp{\2} escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is @samp{@@}. + +@item enable-active-region +@vindex enable-active-region +The @dfn{point} is the current cursor position, and @dfn{mark} refers +to a saved cursor position (@pxref{Commands For Moving}). +The text between the point and mark is referred to as the @dfn{region}. +When this variable is set to @samp{On}, Readline allows certain commands +to designate the region as @dfn{active}. +When the region is active, Readline highlights the text in the region using +the value of the @code{active-region-start-color}, which defaults to the +string that enables +the terminal's standout mode. +The active region shows the text inserted by bracketed-paste and any +matching text found by incremental and non-incremental history searches. +The default is @samp{On}. + +@item enable-bracketed-paste +@vindex enable-bracketed-paste +When set to @samp{On}, Readline configures the terminal to insert each +paste into the editing buffer as a single string of characters, instead +of treating each character as if it had been read from the keyboard. +This is called putting the terminal into @dfn{bracketed paste mode}; +it prevents Readline from executing any editing commands bound to key +sequences appearing in the pasted text. +The default is @samp{On}. @item enable-keypad @vindex enable-keypad @@ -505,16 +625,23 @@ 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. +Set the maximum number of history entries saved in the history list. +If set to zero, any existing history entries are deleted and no new entries +are saved. +If set to a value less than zero, the number of history entries is not +limited. +By default, the number of history entries is not limited. +If an attempt is made to set @var{history-size} to a non-numeric value, +the maximum number of history entries will be set to 500. @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}. +of the screen, instead of wrapping onto a new screen line. +This variable is automatically set to @samp{on} for terminals of height 1. +By default, this variable is set to @samp{off}. @item input-meta @vindex input-meta @@ -522,8 +649,11 @@ this variable is set to @samp{off}. 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. +default value is @samp{off}, but Readline will set it to @samp{on} if the +locale contains eight-bit characters. +The name @code{meta-flag} is a synonym for this variable. +This variable is dependent on the @code{LC_CTYPE} locale category, and +may change if the locale is changed. @item isearch-terminators @vindex isearch-terminators @@ -535,7 +665,7 @@ If this variable has not been given a value, the characters @key{ESC} and @item keymap @vindex keymap Sets Readline's idea of the current keymap for key binding commands. -Acceptable @code{keymap} names are +Built-in @code{keymap} names are @code{emacs}, @code{emacs-standard}, @code{emacs-meta}, @@ -544,11 +674,29 @@ Acceptable @code{keymap} names are @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}. +@code{vi} is equivalent to @code{vi-command} (@code{vi-move} is also a +synonym); @code{emacs} is equivalent to @code{emacs-standard}. +Applications may add additional names. +The default value is @code{emacs}. The value of the @code{editing-mode} variable also affects the default keymap. +@item keyseq-timeout +Specifies the duration Readline will wait for a character when reading an +ambiguous key sequence (one that can form a complete key sequence using +the input read so far, or can take additional input to complete a longer +key sequence). +If no input is received within the timeout, Readline will use the shorter +but complete key sequence. +Readline uses this value to determine whether or not input is +available on the current input source (@code{rl_instream} by default). +The value is specified in milliseconds, so a value of 1000 means that +Readline will wait one second for additional input. +If this variable is set to a value less than or equal to zero, or to a +non-numeric value, Readline will wait until another key is pressed to +decide which key sequence to complete. +The default value is @code{500}. + @item mark-directories If set to @samp{on}, completed directory names have a slash appended. The default is @samp{on}. @@ -570,15 +718,26 @@ The default is @samp{off}. @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 +completion. +If set to @samp{off}, the leading @samp{.} must be supplied by the user in the filename to be completed. This variable is @samp{on} by default. +@item menu-complete-display-prefix +@vindex menu-complete-display-prefix +If set to @samp{on}, menu completion displays the common prefix of the +list of possible completions (which may be empty) before cycling through +the list. The default is @samp{off}. + @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}. +sequence. +The default is @samp{off}, but Readline will set it to @samp{on} if the +locale contains eight-bit characters. +This variable is dependent on the @code{LC_CTYPE} locale category, and +may change if the locale is changed. @item page-completions @vindex page-completions @@ -596,7 +755,7 @@ The default is @samp{off}. 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}. +calls to @code{readline()}. The default is @samp{off}. @item show-all-if-ambiguous @vindex show-all-if-ambiguous @@ -617,11 +776,18 @@ a common prefix) cause the matches to be listed immediately instead of ringing the bell. The default value is @samp{off}. +@item show-mode-in-prompt +@vindex show-mode-in-prompt +If set to @samp{on}, add a string to the beginning of the prompt +indicating the editing mode: emacs, vi command, or vi insertion. +The mode strings are user-settable (e.g., @var{emacs-mode-string}). +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 +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. @@ -631,6 +797,32 @@ rather than @samp{Makefilefile}, assuming there is a single possible completion. The default value is @samp{off}. +@item vi-cmd-mode-string +@vindex vi-cmd-mode-string +If the @var{show-mode-in-prompt} variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in command mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the @samp{\1} and @samp{\2} escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is @samp{(cmd)}. + +@item vi-ins-mode-string +@vindex vi-ins-mode-string +If the @var{show-mode-in-prompt} variable is enabled, +this string is displayed immediately before the last line of the primary +prompt when vi editing mode is active and in insertion mode. +The value is expanded like a +key binding, so the standard set of meta- and control prefixes and +backslash escape sequences is available. +Use the @samp{\1} and @samp{\2} escapes to begin and end sequences of +non-printing characters, which can be used to embed a terminal control +sequence into the mode string. +The default is @samp{(ins)}. + @item visible-stats @vindex visible-stats If set to @samp{on}, a character denoting a file's type @@ -655,12 +847,12 @@ 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 +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. +bindings in a format that can be put directly into an initialization file. @xref{Bash Builtins}. @end ifset @@ -673,7 +865,7 @@ Meta-Rubout: backward-kill-word Control-o: "> output" @end example -In the above example, @kbd{C-u} is bound to the function +In the example above, @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 @@ -788,8 +980,9 @@ of tests. There are four parser directives used. @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. +Readline. The text of the test, after any comparison operator, +extends to the end of the line; +unless otherwise noted, no characters are required to isolate it. @table @code @item mode @@ -809,6 +1002,27 @@ 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 version +The @code{version} test may be used to perform comparisons against +specific Readline versions. +The @code{version} expands to the current Readline version. +The set of comparison operators includes +@samp{=} (and @samp{==}), @samp{!=}, @samp{<=}, @samp{>=}, @samp{<}, +and @samp{>}. +The version number supplied on the right side of the operator consists +of a major version number, an optional decimal point, and an optional +minor version (e.g., @samp{7.1}). If the minor version is omitted, it +is assumed to be @samp{0}. +The operator may be separated from the string @code{version} and +from the version number argument by whitespace. +The following example sets a variable if the Readline version being used +is 7.0 or newer: +@example +$if version >= 7.0 +set show-mode-in-prompt on +$endif +@end example + @item application The @var{application} construct is used to include application-specific settings. Each program using the Readline @@ -823,6 +1037,23 @@ $if Bash "\C-xq": "\eb\"\ef\"" $endif @end example + +@item variable +The @var{variable} construct provides simple equality tests for Readline +variables and values. +The permitted comparison operators are @samp{=}, @samp{==}, and @samp{!=}. +The variable name must be separated from the comparison operator by +whitespace; the operator may be separated from the value on the right hand +side by whitespace. +Both string and boolean variables may be tested. Boolean variables must be +tested against the values @var{on} and @var{off}. +The following example is equivalent to the @code{mode=emacs} test described +above: +@example +$if editing-mode == emacs +set show-mode-in-prompt on +$endif +@end example @end table @item $endif @@ -857,7 +1088,7 @@ binding, variable assignment, and conditional syntax. # You can re-read the inputrc file with C-x C-r. # Lines beginning with '#' are comments. # -# First, include any systemwide bindings and variable +# First, include any system-wide bindings and variable # assignments from /etc/Inputrc $include /etc/Inputrc @@ -939,8 +1170,8 @@ set convert-meta off # 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 +# if there are 150 or more possible completions for a word, +# ask whether or not the user wants to see all of them set completion-query-items 150 # For FTP @@ -1003,17 +1234,36 @@ Move back to the start of the current or previous word. Words are composed of letters and digits. @ifset BashFeatures -@item shell-forward-word () +@item shell-forward-word (M-C-f) Move forward to the end of the next word. Words are delimited by non-quoted shell metacharacters. -@item shell-backward-word () +@item shell-backward-word (M-C-b) Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters. @end ifset +@item previous-screen-line () +Attempt to move point to the same physical screen column on the previous +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if point is not +greater than the length of the prompt plus the screen width. + +@item next-screen-line () +Attempt to move point to the same physical screen column on the next +physical screen line. This will not have the desired effect if the current +Readline line does not take up more than one physical line or if the length +of the current Readline line is not greater than the length of the prompt +plus the screen width. + +@item clear-display (M-C-l) +Clear the screen and, if possible, the terminal's scrollback buffer, +then redraw the current line, +leaving the current line at the top of the screen. + @item clear-screen (C-l) -Clear the screen and redraw the current line, +Clear the screen, +then redraw the current line, leaving the current line at the top of the screen. @item redraw-current-line () @@ -1059,31 +1309,52 @@ 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. +This command sets the region to the matched text and activates the mark. @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. +the history as necessary. This is an incremental search. +This command sets the region to the matched text and activates the mark. @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. +The search string may match anywhere in a history line. @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 +through the history as necessary using a non-incremental search for a string supplied by the user. +The search string may match anywhere in a history line. @item history-search-forward () Search forward through the history for the string of characters between the start of the current line and the point. +The search string must match at the beginning of a history line. 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. +between the start of the current line and the point. +The search string must match at the beginning of a history line. +This is a non-incremental search. +By default, this command is unbound. + +@item history-substring-search-forward () +Search forward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +This is a non-incremental search. +By default, this command is unbound. + +@item history-substring-search-backward () +Search backward through the history for the string of characters +between the start of the current line and the point. +The search string may match anywhere in a history line. +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 @@ -1097,24 +1368,47 @@ 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}. +previous history entry). +With a numeric 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. +list, inserting the last word (or the word specified by the argument to +the first call) of each line in turn. +Any numeric argument supplied to these successive calls determines +the direction to move through the history. A negative argument switches +the direction through the history (back or forward). The history expansion facilities are used to extract the last argument, as if the @samp{!$} history expansion had been specified. +@item operate-and-get-next (C-o) +Accept the current line for return to the calling application as if a +newline had been entered, +and fetch the next line relative to the current line from the history +for editing. +A numeric argument, if supplied, specifies the history entry to use instead +of the current line. + +@item fetch-history () +With a numeric argument, fetch that entry from the history list +and make it the current line. +Without an argument, move back to the first entry in the history list. + @end ftable @node Commands For Text @subsection Commands For Changing Text @ftable @code + +@item @i{end-of-file} (usually C-d) +The character indicating end-of-file as set, for example, by +@code{stty}. If this character is read when there are no characters +on the line, and point is at the beginning of the line, Readline +interprets it as the end of input and returns @sc{eof}. + @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}. +Delete the character at point. If this function is bound to the +same character as the tty @sc{eof} character, as @kbd{C-d} +commonly is, see above for the effects. @item backward-delete-char (Rubout) Delete the character behind the cursor. A numeric argument means @@ -1137,6 +1431,19 @@ Insert a tab character. @item self-insert (a, b, A, 1, !, @dots{}) Insert yourself. +@item bracketed-paste-begin () +This function is intended to be bound to the "bracketed paste" escape +sequence sent by some terminals, and such a binding is assigned by default. +It allows Readline to insert the pasted text as a single unit without treating +each character as if it had been read from the keyboard. The characters +are inserted as if each one was bound to @code{self-insert} instead of +executing any editing commands. + +Bracketed paste sets the region (the characters between point and the mark) +to the inserted text. It uses the concept of an @emph{active mark}: when the +mark is active, Readline redisplay uses the terminal's standout mode to +denote the region. + @item transpose-chars (C-t) Drag the character before the cursor forward over the character at the cursor, moving the @@ -1186,9 +1493,13 @@ By default, this command is unbound. @item kill-line (C-k) Kill the text from point to the end of the line. +With a negative numeric argument, kill backward from the cursor to the +beginning of the current line. @item backward-kill-line (C-x Rubout) -Kill backward to the beginning of the line. +Kill backward from the cursor to the beginning of the current line. +With a negative numeric argument, kill forward from the cursor to the +end of the current line. @item unix-line-discard (C-u) Kill backward from the cursor to the beginning of the current line. @@ -1207,16 +1518,24 @@ Kill the word behind point. Word boundaries are the same as @code{backward-word}. @ifset BashFeatures -@item shell-kill-word () +@item shell-kill-word (M-C-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{shell-forward-word}. -@item backward-kill-word () +@item shell-backward-kill-word () Kill the word behind point. Word boundaries are the same as @code{shell-backward-word}. @end ifset +@item shell-transpose-words (M-C-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. +Word boundaries are the same as @code{shell-forward-word} and +@code{shell-backward-word}. + @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. @@ -1270,7 +1589,7 @@ 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 +character that is neither a digit nor 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 @@ -1298,6 +1617,9 @@ The default is filename completion. @item possible-completions (M-?) List the possible completions of the text before point. +When displaying completions, Readline sets the number of columns used +for display to the value of @code{completion-display-width}, the value of +the environment variable @env{COLUMNS}, or the screen width, in that order. @item insert-completions (M-*) Insert all completions of the text before point that would have @@ -1405,6 +1727,10 @@ and save the definition. Re-execute the last keyboard macro defined, by making the characters in the macro appear as if typed at the keyboard. +@item print-last-kbd-macro () +Print the last keyboard macro defined in a format suitable for the +@var{inputrc} file. + @end ftable @node Miscellaneous Commands @@ -1420,9 +1746,10 @@ 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 do-lowercase-version (M-A, M-B, M-@var{x}, @dots{}) +If the metafied character @var{x} is upper case, run the command +that is bound to the corresponding metafied lower case character. +The behavior is undefined if @var{x} is already lower case. @item prefix-meta (@key{ESC}) Metafy the next character typed. This is for keyboards @@ -1454,11 +1781,11 @@ 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. +character. A negative argument 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 +of that character. A negative argument searches for subsequent occurrences. @item skip-csi-sequence () @@ -1466,7 +1793,7 @@ 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 +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-[. @@ -1505,6 +1832,11 @@ 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 spell-correct-word (C-x s) +Perform spelling correction on the current word, treating it as a directory +or filename, in the same way as the @code{cdspell} shell option. +Word boundaries are the same as those used by @code{shell-forward-word}. + @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 @@ -1546,12 +1878,7 @@ 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) +@item edit-and-execute-command (C-x C-e) Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke @@ -1579,7 +1906,7 @@ editing 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. +the @sc{posix} standard. @ifset BashFeatures In order to switch interactively between @code{emacs} and @code{vi} @@ -1622,6 +1949,9 @@ 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. +If there is no default compspec, Bash attempts alias expansion +on the command word as a final resort, and attempts to find a compspec +for the command word from any successful expansion Once a compspec has been found, it is used to generate the list of matching words. @@ -1646,7 +1976,9 @@ 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. +Shell quoting is honored within the string, in order to provide a +mechanism for the words to contain shell metacharacters or characters +in the value of @env{IFS}. Each word is then expanded using brace expansion, tilde expansion, parameter and variable expansion, command substitution, and arithmetic expansion, @@ -1663,10 +1995,11 @@ When the command or function is invoked, the @env{COMP_LINE}, 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 +When the function or command is invoked, the first argument ($1) 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. +second argument ($2) is the word being completed, and the third argument +($3) 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. @@ -1676,7 +2009,7 @@ 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. +variable, one per array element. Next, any command specified with the @option{-C} option is invoked in an environment equivalent to command substitution. @@ -1693,6 +2026,10 @@ 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. +If the @code{nocasematch} shell option +(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. 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 @@ -1733,7 +2070,7 @@ 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 +attempt to find a new 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. @@ -1744,17 +2081,18 @@ completion function would load completions dynamically: @example _completion_loader() @{ - . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 + . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 @} -complete -D -F _completion_loader +complete -D -F _completion_loader -o bashdefault -o default @end example @node Programmable Completion Builtins @section Programmable Completion Builtins @cindex completion builtins -Two builtin commands are available to manipulate the programmable completion -facilities. +Three builtin commands are available to manipulate the programmable completion +facilities: one to specify how the arguments to a particular command are to +be completed, and two to modify the completion as it is happening. @table @code @item compgen @@ -1784,10 +2122,10 @@ 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}] +@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-DEI] [-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{}]} +@code{complete -pr [-DEI] [@var{name} @dots{}]} @end example Specify how arguments to each @var{name} should be completed. @@ -1797,16 +2135,24 @@ 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 +The @option{-D} option indicates that other supplied 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 +The @option{-E} option indicates that other supplied options and actions should apply to ``empty'' command completion; that is, completion attempted on a blank line. +The @option{-I} option indicates that other supplied options and actions should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as @samp{;} or @samp{|}, which is usually command +name completion. +If multiple options are supplied, the @option{-D} option takes precedence +over @option{-E}, and both take precedence over @option{-I}. +If any of @option{-D}, @option{-E}, or @option{-I} are supplied, any other +@var{name} arguments are ignored; these completions only apply to the case +specified by the option. 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}. +is attempted is described above (@pxref{Programmable Completion}). Other options, if specified, have the following meanings. The arguments to the @option{-G}, @option{-W}, and @option{-X} options @@ -1836,11 +2182,18 @@ 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 +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 noquote +Tell Readline not to quote the completed words if they are filenames +(quoting filenames is the default). + +@item nosort +Tell Readline not to sort the list of possible completions alphabetically. + @item nospace Tell Readline not to append a space (the default) to words completed at the end of the line. @@ -1933,34 +2286,24 @@ User names. May also be specified as @option{-u}. 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. +Arguments are passed as with the @option{-F} option. @item -F @var{function} The shell function @var{function} is executed in the current shell environment. +When it is executed, $1 is the name of the command whose arguments are +being completed, $2 is the word being completed, and $3 is the word +preceding the word being completed, as described above +(@pxref{Programmable Completion}). 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 -G @var{globpat} +The filename expansion pattern @var{globpat} is expanded to generate +the possible completions. @item -P @var{prefix} @var{prefix} is added at the beginning of each possible completion @@ -1969,6 +2312,21 @@ 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. + +@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 -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. @end table The return value is true unless an invalid option is supplied, an option @@ -1980,23 +2338,28 @@ an error occurs adding a completion specification. @item compopt @btindex compopt @example -@code{compopt} [-o @var{option}] [-DE] [+o @var{option}] [@var{name}] +@code{compopt} [-o @var{option}] [-DEI] [+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 +@var{option}s, or for the currently-executing 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 +The @option{-D} option indicates that other supplied 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 +The @option{-E} option indicates that other supplied options should apply to ``empty'' command completion; that is, completion attempted on a blank line. +The @option{-I} option indicates that other supplied options should +apply to completion on the initial non-assignment word on the line, or after a +command delimiter such as @samp{;} or @samp{|}, which is usually command +name completion. -The @option{-D} option takes precedence over @option{-E}. +If multiple options are supplied, the @option{-D} option takes precedence +over @option{-E}, and both take precedence over @option{-I} 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 @@ -2004,4 +2367,122 @@ specification exists, or an output error occurs. @end table +@node A Programmable Completion Example +@section A Programmable Completion Example + +The most common way to obtain additional completion functionality beyond +the default actions @code{complete} and @code{compgen} provide is to use +a shell function and bind it to a particular command using @code{complete -F}. + +The following function provides completions for the @code{cd} builtin. +It is a reasonably good example of what shell functions must do when +used for completion. This function uses the word passed as @code{$2} +to determine the directory name to complete. You can also use the +@code{COMP_WORDS} array variable; the current word is indexed by the +@code{COMP_CWORD} variable. + +The function relies on the @code{complete} and @code{compgen} builtins +to do much of the work, adding only the things that the Bash @code{cd} +does beyond accepting basic directory names: +tilde expansion (@pxref{Tilde Expansion}), +searching directories in @var{$CDPATH}, which is described above +(@pxref{Bourne Shell Builtins}), +and basic support for the @code{cdable_vars} shell option +(@pxref{The Shopt Builtin}). +@code{_comp_cd} modifies the value of @var{IFS} so that it contains only +a newline to accommodate file names containing spaces and tabs -- +@code{compgen} prints the possible completions it generates one per line. + +Possible completions go into the @var{COMPREPLY} array variable, one +completion per array element. The programmable completion system retrieves +the completions from there when the function returns. + +@example +# A completion function for the cd builtin +# based on the cd completion function from the bash_completion package +_comp_cd() +@{ + local IFS=$' \t\n' # normalize IFS + local cur _skipdot _cdpath + local i j k + + # Tilde expansion, which also expands tilde to full pathname + case "$2" in + \~*) eval cur="$2" ;; + *) cur=$2 ;; + esac + + # no cdpath or absolute pathname -- straight directory completion + if [[ -z "$@{CDPATH:-@}" ]] || [[ "$cur" == @@(./*|../*|/*) ]]; then + # compgen prints paths one per line; could also use while loop + IFS=$'\n' + COMPREPLY=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + # CDPATH+directories in the current directory if not in CDPATH + else + IFS=$'\n' + _skipdot=false + # preprocess CDPATH to convert null directory names to . + _cdpath=$@{CDPATH/#:/.:@} + _cdpath=$@{_cdpath//::/:.:@} + _cdpath=$@{_cdpath/%:/:.@} + for i in $@{_cdpath//:/$'\n'@}; do + if [[ $i -ef . ]]; then _skipdot=true; fi + k="$@{#COMPREPLY[@@]@}" + for j in $( compgen -d -- "$i/$cur" ); do + COMPREPLY[k++]=$@{j#$i/@} # cut off directory + done + done + $_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") ) + IFS=$' \t\n' + fi + + # variable names if appropriate shell option set and no completions + if shopt -q cdable_vars && [[ $@{#COMPREPLY[@@]@} -eq 0 ]]; then + COMPREPLY=( $(compgen -v -- "$cur") ) + fi + + return 0 +@} +@end example + +We install the completion function using the @option{-F} option to +@code{complete}: + +@example +# Tell readline to quote appropriate and append slashes to directories; +# use the bash default completion for other arguments +complete -o filenames -o nospace -o bashdefault -F _comp_cd cd +@end example + +@noindent +Since we'd like Bash and Readline to take care of some +of the other details for us, we use several other options to tell Bash +and Readline what to do. The @option{-o filenames} option tells Readline +that the possible completions should be treated as filenames, and quoted +appropriately. That option will also cause Readline to append a slash to +filenames it can determine are directories (which is why we might want to +extend @code{_comp_cd} to append a slash if we're using directories found +via @var{CDPATH}: Readline can't tell those completions are directories). +The @option{-o nospace} option tells Readline to not append a space +character to the directory name, in case we want to append to it. +The @option{-o bashdefault} option brings in the rest of the "Bash default" +completions -- possible completions that Bash adds to the default Readline +set. These include things like command name completion, variable completion +for words beginning with @samp{$} or @samp{$@{}, completions containing pathname +expansion patterns (@pxref{Filename Expansion}), and so on. + +Once installed using @code{complete}, @code{_comp_cd} will be called every +time we attempt word completion for a @code{cd} command. + +Many more examples -- an extensive collection of completions for most of +the common GNU, Unix, and Linux commands -- are available as part of the +bash_completion project. This is installed by default on many GNU/Linux +distributions. Originally written by Ian Macdonald, the project now lives +at @url{https://github.com/scop/bash-completion/}. There are ports for +other systems such as Solaris and Mac OS X. + +An older version of the bash_completion package is distributed with bash +in the @file{examples/complete} subdirectory. + @end ifset diff --git a/lib/readline/doc/rluserman.texi b/lib/readline/doc/rluserman.texi index 49d9a2c..ae9ec6e 100644 --- a/lib/readline/doc/rluserman.texi +++ b/lib/readline/doc/rluserman.texi @@ -2,33 +2,25 @@ @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 +@comment %**end of header (This is for running Texinfo on a region.) + @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. +Copyright @copyright{} 1988--2022 Free Software Foundation, Inc. @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.'' +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 quotation @end copying @@ -49,12 +41,6 @@ developing GNU and promoting software freedom.'' @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 @@ -66,6 +52,7 @@ USA @* 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. +The Readline home page is @url{http://www.gnu.org/software/readline/}. @menu * Command Line Editing:: GNU Readline User's Manual. diff --git a/lib/readline/doc/version.texi b/lib/readline/doc/version.texi index 823b3ba..d310273 100644 --- a/lib/readline/doc/version.texi +++ b/lib/readline/doc/version.texi @@ -1,10 +1,11 @@ @ignore -Copyright (C) 1988-2009 Free Software Foundation, Inc. +Copyright (C) 1988-2022 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 EDITION 8.2 +@set VERSION 8.2 -@set LASTCHANGE Fri Oct 9 12:57:58 EDT 2009 +@set UPDATED 19 September 2022 +@set UPDATED-MONTH September 2022 + +@set LASTCHANGE Mon Sep 19 11:15:16 EDT 2022 diff --git a/lib/readline/emacs_keymap.c b/lib/readline/emacs_keymap.c index cb6e140..02597da 100644 --- a/lib/readline/emacs_keymap.c +++ b/lib/readline/emacs_keymap.c @@ -1,6 +1,6 @@ /* emacs_keymap.c -- the keymap for emacs_mode in readline (). */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2017 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. @@ -47,7 +47,7 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { { 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_operate_and_get_next }, /* Control-o */ { ISFUNC, rl_get_previous_history }, /* Control-p */ { ISFUNC, rl_quoted_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ @@ -327,7 +327,7 @@ KEYMAP_ENTRY_ARRAY emacs_meta_keymap = { { 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_clear_display }, /* 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 */ diff --git a/lib/readline/examples/excallback.c b/lib/readline/examples/excallback.c index 385492b..923c923 100644 --- a/lib/readline/examples/excallback.c +++ b/lib/readline/examples/excallback.c @@ -40,21 +40,28 @@ Copyright (C) 1999 Jeff Solomon #include #endif -#include #include #ifdef HAVE_UNISTD_H #include #endif +#include +#include #include /* xxx - should make this more general */ +#include + #ifdef READLINE_LIBRARY # include "readline.h" #else # include #endif +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#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, @@ -99,6 +106,8 @@ main() { fd_set fds; + setlocale (LC_ALL, ""); + /* Adjust the terminal slightly before the handler is installed. Disable * canonical mode processing and set the input character time flag to be * non-blocking. diff --git a/lib/readline/examples/fileman.c b/lib/readline/examples/fileman.c index f7eed8a..2a8b097 100644 --- a/lib/readline/examples/fileman.c +++ b/lib/readline/examples/fileman.c @@ -63,6 +63,12 @@ extern char *xmalloc PARAMS((size_t)); +void initialize_readline PARAMS((void)); +void too_dangerous PARAMS((char *)); + +int execute_line PARAMS((char *)); +int valid_argument PARAMS((char *, char *)); + /* The names of functions that actually do the manipulation. */ int com_list PARAMS((char *)); int com_view PARAMS((char *)); @@ -119,6 +125,7 @@ dupstr (s) return (r); } +int main (argc, argv) int argc; char **argv; @@ -241,6 +248,7 @@ 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. */ +void initialize_readline () { /* Allow conditional parsing of the ~/.inputrc file. */ @@ -317,6 +325,7 @@ command_generator (text, state) static char syscom[1024]; /* List the file(s) named in arg. */ +int com_list (arg) char *arg; { @@ -327,6 +336,7 @@ com_list (arg) return (system (syscom)); } +int com_view (arg) char *arg; { @@ -342,6 +352,7 @@ com_view (arg) return (system (syscom)); } +int com_rename (arg) char *arg; { @@ -349,6 +360,7 @@ com_rename (arg) return (1); } +int com_stat (arg) char *arg; { @@ -365,11 +377,11 @@ com_stat (arg) printf ("Statistics for `%s':\n", arg); - printf ("%s has %d link%s, and is %d byte%s in length.\n", + printf ("%s has %d link%s, and is %lu byte%s in length.\n", arg, finfo.st_nlink, (finfo.st_nlink == 1) ? "" : "s", - finfo.st_size, + (unsigned long)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)); @@ -377,6 +389,7 @@ com_stat (arg) return (0); } +int com_delete (arg) char *arg; { @@ -386,6 +399,7 @@ com_delete (arg) /* Print out help for ARG, or for all of the commands if ARG is not present. */ +int com_help (arg) char *arg; { @@ -403,7 +417,7 @@ com_help (arg) if (!printed) { - printf ("No commands match `%s'. Possibilties are:\n", arg); + printf ("No commands match `%s'. Possibilities are:\n", arg); for (i = 0; commands[i].name; i++) { @@ -425,6 +439,7 @@ com_help (arg) } /* Change to the directory ARG. */ +int com_cd (arg) char *arg; { @@ -439,6 +454,7 @@ com_cd (arg) } /* Print out the current working directory. */ +int com_pwd (ignore) char *ignore; { @@ -456,6 +472,7 @@ com_pwd (ignore) } /* The user wishes to quit using this program. Just set DONE non-zero. */ +int com_quit (arg) char *arg; { @@ -464,6 +481,7 @@ com_quit (arg) } /* Function which tells you that you can't do this. */ +void too_dangerous (caller) char *caller; { diff --git a/lib/readline/examples/histexamp.c b/lib/readline/examples/histexamp.c index 3b43674..309d769 100644 --- a/lib/readline/examples/histexamp.c +++ b/lib/readline/examples/histexamp.c @@ -27,8 +27,11 @@ # include #endif +#include +#include #include +int main (argc, argv) int argc; char **argv; diff --git a/lib/readline/examples/rl-callbacktest.c b/lib/readline/examples/rl-callbacktest.c new file mode 100644 index 0000000..7febacd --- /dev/null +++ b/lib/readline/examples/rl-callbacktest.c @@ -0,0 +1,115 @@ +/* Standard include files. stdio.h is required. */ +#include +#include +#include + +/* Used for select(2) */ +#include +#include + +#include + +#include +#include + +#include + +/* Standard readline include files. */ +#if defined (READLINE_LIBRARY) +# include "readline.h" +# include "history.h" +#else +# include +# include +#endif + +extern int errno; + +static void cb_linehandler (char *); +static void signandler (int); + +int running, sigwinch_received; +const char *prompt = "rltest$ "; + +/* Handle SIGWINCH and window size changes when readline is not active and + reading a character. */ +static void +sighandler (int sig) +{ + sigwinch_received = 1; +} + +/* Callback function called for each line when accept-line executed, EOF + seen, or EOF character read. This sets a flag and returns; it could + also call exit(3). */ +static void +cb_linehandler (char *line) +{ + /* Can use ^D (stty eof) or `exit' to exit. */ + if (line == NULL || strcmp (line, "exit") == 0) + { + if (line == 0) + printf ("\n"); + printf ("exit\n"); + /* This function needs to be called to reset the terminal settings, + and calling it from the line handler keeps one extra prompt from + being displayed. */ + rl_callback_handler_remove (); + + running = 0; + } + else + { + if (*line) + add_history (line); + printf ("input line: %s\n", line); + free (line); + } +} + +int +main (int c, char **v) +{ + fd_set fds; + int r; + + setlocale (LC_ALL, ""); + + /* Handle SIGWINCH */ + signal (SIGWINCH, sighandler); + + /* Install the line handler. */ + rl_callback_handler_install (prompt, cb_linehandler); + + /* Enter a simple event loop. This waits until something is available + to read on readline's input stream (defaults to standard input) and + calls the builtin character read callback to read it. It does not + have to modify the user's terminal settings. */ + running = 1; + while (running) + { + FD_ZERO (&fds); + FD_SET (fileno (rl_instream), &fds); + + r = select (FD_SETSIZE, &fds, NULL, NULL, NULL); + if (r < 0 && errno != EINTR) + { + perror ("rltest: select"); + rl_callback_handler_remove (); + break; + } + if (sigwinch_received) + { + rl_resize_terminal (); + sigwinch_received = 0; + } + if (r < 0) + continue; + + if (FD_ISSET (fileno (rl_instream), &fds)) + rl_callback_read_char (); + } + + printf ("rltest: Event loop has exited\n"); + return 0; +} diff --git a/lib/readline/examples/rl.c b/lib/readline/examples/rl.c index 845a4b1..39e5b8e 100644 --- a/lib/readline/examples/rl.c +++ b/lib/readline/examples/rl.c @@ -28,6 +28,7 @@ # include #endif +#include #include #include @@ -37,6 +38,10 @@ extern void exit(); #endif +#ifdef HAVE_LOCALE_H +# include +#endif + #if defined (READLINE_LIBRARY) # include "posixstat.h" # include "readline.h" @@ -92,6 +97,10 @@ main (argc, argv) else progname++; +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + /* defaults */ prompt = "readline$ "; fd = nch = 0; diff --git a/lib/readline/examples/rlcat.c b/lib/readline/examples/rlcat.c index fa9e06f..aabe0ca 100644 --- a/lib/readline/examples/rlcat.c +++ b/lib/readline/examples/rlcat.c @@ -45,6 +45,10 @@ extern void exit(); #endif +#ifdef HAVE_LOCALE_H +# include +#endif + #ifndef errno extern int errno; #endif @@ -79,6 +83,10 @@ main (argc, argv) char *temp; int opt, Vflag, Nflag; +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""): +#endif + progname = strrchr(argv[0], '/'); if (progname == 0) progname = argv[0]; @@ -137,7 +145,7 @@ fcopy(fp) if (vflag && isascii ((unsigned char)c) && isprint((unsigned char)c) == 0) { x = rl_untranslate_keyseq (c); - if (fputs (x, stdout) != 0) + if (fputs (x, stdout) == EOF) return 1; } else if (putchar (c) == EOF) diff --git a/lib/readline/examples/rltest.c b/lib/readline/examples/rltest.c index 78e2608..8b7c00c 100644 --- a/lib/readline/examples/rltest.c +++ b/lib/readline/examples/rltest.c @@ -36,6 +36,10 @@ extern void exit(); #endif +#ifdef HAVE_LOCALE_H +# include +#endif + #ifdef READLINE_LIBRARY # include "readline.h" # include "history.h" @@ -46,11 +50,16 @@ extern void exit(); extern HIST_ENTRY **history_list (); +int main () { char *temp, *prompt; int done; +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + temp = (char *)NULL; prompt = "readline$ "; done = 0; diff --git a/lib/readline/funmap.c b/lib/readline/funmap.c index cccddb6..8b1cb40 100644 --- a/lib/readline/funmap.c +++ b/lib/readline/funmap.c @@ -1,6 +1,6 @@ /* funmap.c -- attach names to functions. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 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. @@ -46,7 +46,7 @@ typedef int QSFUNC (const void *, const void *); typedef int QSFUNC (); #endif -extern int _rl_qsort_string_compare PARAMS((char **, char **)); +extern int _rl_qsort_string_compare (char **, char **); FUNMAP **funmap; static int funmap_size; @@ -68,10 +68,12 @@ static const FUNMAP default_funmap[] = { { "backward-word", rl_backward_word }, { "beginning-of-history", rl_beginning_of_history }, { "beginning-of-line", rl_beg_of_line }, + { "bracketed-paste-begin", rl_bracketed_paste_begin }, { "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-display", rl_clear_display }, { "clear-screen", rl_clear_screen }, { "complete", rl_complete }, { "copy-backward-word", rl_copy_backward_word }, @@ -91,6 +93,7 @@ static const FUNMAP default_funmap[] = { { "end-of-history", rl_end_of_history }, { "end-of-line", rl_end_of_line }, { "exchange-point-and-mark", rl_exchange_point_and_mark }, + { "fetch-history", rl_fetch_history }, { "forward-backward-delete-char", rl_rubout_or_delete }, { "forward-byte", rl_forward_byte }, { "forward-char", rl_forward_char }, @@ -98,6 +101,8 @@ static const FUNMAP default_funmap[] = { { "forward-word", rl_forward_word }, { "history-search-backward", rl_history_search_backward }, { "history-search-forward", rl_history_search_forward }, + { "history-substring-search-backward", rl_history_substr_search_backward }, + { "history-substring-search-forward", rl_history_substr_search_forward }, { "insert-comment", rl_insert_comment }, { "insert-completions", rl_insert_completions }, { "kill-whole-line", rl_kill_full_line }, @@ -107,17 +112,21 @@ static const FUNMAP default_funmap[] = { { "menu-complete", rl_menu_complete }, { "menu-complete-backward", rl_backward_menu_complete }, { "next-history", rl_get_next_history }, + { "next-screen-line", rl_next_screen_line }, { "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 }, + { "operate-and-get-next", rl_operate_and_get_next }, { "overwrite-mode", rl_overwrite_mode }, -#ifdef __CYGWIN__ +#if defined (_WIN32) { "paste-from-clipboard", rl_paste_from_clipboard }, #endif { "possible-completions", rl_possible_completions }, { "previous-history", rl_get_previous_history }, + { "previous-screen-line", rl_previous_screen_line }, + { "print-last-kbd-macro", rl_print_last_kbd_macro }, { "quoted-insert", rl_quoted_insert }, { "re-read-init-file", rl_re_read_init_file }, { "redraw-current-line", rl_refresh_line}, @@ -148,8 +157,10 @@ static const FUNMAP default_funmap[] = { { "vi-append-mode", rl_vi_append_mode }, { "vi-arg-digit", rl_vi_arg_digit }, { "vi-back-to-indent", rl_vi_back_to_indent }, + { "vi-backward-bigword", rl_vi_bWord }, + { "vi-backward-word", rl_vi_bword }, { "vi-bWord", rl_vi_bWord }, - { "vi-bword", rl_vi_bword }, + { "vi-bword", rl_vi_bword }, /* BEWARE: name matching is case insensitive */ { "vi-change-case", rl_vi_change_case }, { "vi-change-char", rl_vi_change_char }, { "vi-change-to", rl_vi_change_to }, @@ -160,16 +171,19 @@ static const FUNMAP default_funmap[] = { { "vi-delete-to", rl_vi_delete_to }, { "vi-eWord", rl_vi_eWord }, { "vi-editing-mode", rl_vi_editing_mode }, + { "vi-end-bigword", rl_vi_eWord }, { "vi-end-word", rl_vi_end_word }, { "vi-eof-maybe", rl_vi_eof_maybe }, - { "vi-eword", rl_vi_eword }, + { "vi-eword", rl_vi_eword }, /* BEWARE: name matching is case insensitive */ { "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-forward-bigword", rl_vi_fWord }, + { "vi-forward-word", rl_vi_fword }, + { "vi-fword", rl_vi_fword }, /* BEWARE: name matching is case insensitive */ { "vi-goto-mark", rl_vi_goto_mark }, { "vi-insert-beg", rl_vi_insert_beg }, - { "vi-insertion-mode", rl_vi_insertion_mode }, + { "vi-insertion-mode", rl_vi_insert_mode }, { "vi-match", rl_vi_match }, { "vi-movement-mode", rl_vi_movement_mode }, { "vi-next-word", rl_vi_next_word }, @@ -185,7 +199,10 @@ static const FUNMAP default_funmap[] = { { "vi-set-mark", rl_vi_set_mark }, { "vi-subst", rl_vi_subst }, { "vi-tilde-expand", rl_vi_tilde_expand }, + { "vi-undo", rl_vi_undo }, + { "vi-unix-word-rubout", rl_vi_unix_word_rubout }, { "vi-yank-arg", rl_vi_yank_arg }, + { "vi-yank-pop", rl_vi_yank_pop }, { "vi-yank-to", rl_vi_yank_to }, #endif /* VI_MODE */ @@ -193,9 +210,7 @@ static const FUNMAP default_funmap[] = { }; int -rl_add_funmap_entry (name, function) - const char *name; - rl_command_func_t *function; +rl_add_funmap_entry (const char *name, rl_command_func_t *function) { if (funmap_entry + 2 >= funmap_size) { @@ -215,7 +230,7 @@ static int funmap_initialized; /* Make the funmap contain all of the default entries. */ void -rl_initialize_funmap () +rl_initialize_funmap (void) { register int i; @@ -231,9 +246,9 @@ rl_initialize_funmap () /* 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. */ + You should free () the array when you done, but not the pointers. */ const char ** -rl_funmap_names () +rl_funmap_names (void) { const char **result; int result_size, result_index; diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c index 42498d2..8ab6809 100644 --- a/lib/readline/histexpand.c +++ b/lib/readline/histexpand.c @@ -1,6 +1,6 @@ /* histexpand.c -- history expansion. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2021 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. @@ -44,16 +44,20 @@ #include "history.h" #include "histlib.h" +#include "chardefs.h" #include "rlshell.h" #include "xmalloc.h" #define HISTORY_WORD_DELIMITERS " \t\n;&()|<>" #define HISTORY_QUOTE_CHARACTERS "\"'`" +#define HISTORY_EVENT_DELIMITERS "^$*%-" #define slashify_in_quotes "\\`\"$" -typedef int _hist_search_func_t PARAMS((const char *, int)); +#define fielddelim(c) (whitespace(c) || (c) == '\n') + +typedef int _hist_search_func_t (const char *, int); static char error_pointer; @@ -62,14 +66,18 @@ 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)); +/* Characters that delimit history event specifications and separate event + specifications from word designators. Static for now */ +static char *history_event_delimiter_chars = HISTORY_EVENT_DELIMITERS; + +static char *get_history_word_specifier (char *, char *, int *); +static int history_tokenize_word (const char *, int); +static char **history_tokenize_internal (const char *, int, int *); +static char *history_substring (const char *, int, int); +static void freewords (char **, int); +static char *history_find_word (char *, int); -static char *quote_breaks PARAMS((char *)); +static char *quote_breaks (char *); /* Variables exported by this file. */ /* The character that represents the start of a history expansion @@ -81,7 +89,7 @@ char history_expansion_char = '!'; 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 + of a word, then it, and all subsequent characters up to 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'; @@ -101,6 +109,8 @@ char *history_word_delimiters = HISTORY_WORD_DELIMITERS; particular history expansion should be performed. */ rl_linebuf_func_t *history_inhibit_expansion_function; +int history_quoting_state = 0; + /* **************************************************************** */ /* */ /* History Expansion */ @@ -112,7 +122,6 @@ rl_linebuf_func_t *history_inhibit_expansion_function; /* 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; @@ -127,10 +136,7 @@ static char *search_match; 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; +get_history_event (const char *string, int *caller_index, int delimiting_quote) { register int i; register char c; @@ -174,7 +180,7 @@ get_history_event (string, caller_index, delimiting_quote) } /* Hack case of numeric line specification. */ - if (string[i] == '-') + if (string[i] == '-' && _rl_digit_p (string[i+1])) { sign = -1; i++; @@ -224,9 +230,12 @@ get_history_event (string, caller_index, delimiting_quote) } #endif /* HANDLE_MULTIBYTE */ - if ((!substring_okay && (whitespace (c) || c == ':' || - (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || - string[i] == delimiting_quote)) || + if ((!substring_okay && + (whitespace (c) || c == ':' || + (i > local_index && history_event_delimiter_chars && c == '-') || + (c != '-' && history_event_delimiter_chars && member (c, history_event_delimiter_chars)) || + (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || + string[i] == delimiting_quote)) || string[i] == '\n' || (substring_okay && string[i] == '?')) break; @@ -245,7 +254,7 @@ get_history_event (string, caller_index, delimiting_quote) #define FAIL_SEARCH() \ do { \ - history_offset = history_length; free (temp) ; return (char *)NULL; \ + history_offset = history_length; xfree (temp) ; return (char *)NULL; \ } while (0) /* If there is no search string, try to use the previous search string, @@ -254,7 +263,7 @@ get_history_event (string, caller_index, delimiting_quote) { if (search_string) { - free (temp); + xfree (temp); temp = savestring (search_string); } else @@ -272,6 +281,8 @@ get_history_event (string, caller_index, delimiting_quote) if (local_index == 0 || substring_okay) { entry = current_history (); + if (entry == 0) + FAIL_SEARCH (); history_offset = history_length; /* If this was a substring search, then remember the @@ -285,7 +296,7 @@ get_history_event (string, caller_index, delimiting_quote) search_match = history_find_word (entry->line, local_index); } else - free (temp); + xfree (temp); return (entry->line); } @@ -308,9 +319,7 @@ get_history_event (string, caller_index, delimiting_quote) 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; +hist_string_extract_single_quoted (char *string, int *sindex, int flags) { register int i; @@ -324,8 +333,7 @@ hist_string_extract_single_quoted (string, sindex, flags) } static char * -quote_breaks (s) - char *s; +quote_breaks (char *s) { register char *p, *r; char *ret; @@ -366,9 +374,7 @@ quote_breaks (s) } static char * -hist_error(s, start, current, errtype) - char *s; - int start, current, errtype; +hist_error(char *s, int start, int current, int errtype) { char *temp; const char *emsg; @@ -405,7 +411,10 @@ hist_error(s, start, current, errtype) } temp = (char *)xmalloc (ll + elen + 3); - strncpy (temp, s + start, ll); + if (s[start]) + strncpy (temp, s + start, ll); + else + ll = 0; temp[ll] = ':'; temp[ll + 1] = ' '; strcpy (temp + ll + 2, emsg); @@ -425,9 +434,7 @@ hist_error(s, start, current, errtype) 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; +get_subst_pattern (char *str, int *iptr, int delimiter, int is_rhs, int *lenptr) { register int si, i, j, k; char *s; @@ -482,7 +489,7 @@ get_subst_pattern (str, iptr, delimiter, is_rhs, lenptr) } static void -postproc_subst_rhs () +postproc_subst_rhs (void) { char *new; int i, j, new_size; @@ -508,7 +515,7 @@ postproc_subst_rhs () } } new[j] = '\0'; - free (subst_rhs); + xfree (subst_rhs); subst_rhs = new; subst_rhs_len = j; } @@ -518,12 +525,9 @@ postproc_subst_rhs () 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. */ +/* need current line for !# */ 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 !# */ +history_expand_internal (char *string, int start, int qc, int *end_index_ptr, char **ret_string, char *current_line) { int i, n, starting_index; int substitute_globally, subst_bywords, want_quotes, print_only; @@ -557,35 +561,12 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) 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); - } + event = get_history_event (string, &i, qc); if (event == 0) { *ret_string = hist_error (string, start, i, EVENT_NOT_FOUND); - free (result); + xfree (result); return (-1); } @@ -599,7 +580,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) if (word_spec == (char *)&error_pointer) { *ret_string = hist_error (string, starting_index, i, BAD_WORD_SPEC); - free (result); + xfree (result); return (-1); } @@ -632,8 +613,8 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) { default: *ret_string = hist_error (string, i+1, i+2, BAD_MODIFIER); - free (result); - free (temp); + xfree (result); + xfree (temp); return -1; case 'q': @@ -648,7 +629,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) return an error state after adding this line to the history. */ case 'p': - print_only++; + print_only = 1; break; /* :t discards all but the last part of the pathname. */ @@ -658,7 +639,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) { tstr++; t = savestring (tstr); - free (temp); + xfree (temp); temp = t; } break; @@ -683,7 +664,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) if (tstr) { t = savestring (tstr); - free (temp); + xfree (temp); temp = t; } break; @@ -759,8 +740,8 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) if (subst_lhs_len == 0) { *ret_string = hist_error (string, starting_index, i, NO_PREV_SUBST); - free (result); - free (temp); + xfree (result); + xfree (temp); return -1; } @@ -769,8 +750,8 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) if (subst_lhs_len > l_temp) { *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); - free (result); - free (temp); + xfree (result); + xfree (temp); return (-1); } @@ -795,7 +776,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) the last time. */ if (subst_bywords && si > we) { - for (; temp[si] && whitespace (temp[si]); si++) + for (; temp[si] && fielddelim (temp[si]); si++) ; ws = si; we = history_tokenize_word (temp, si); @@ -811,7 +792,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) temp + si + subst_lhs_len, l_temp - (si + subst_lhs_len)); new_event[len] = '\0'; - free (temp); + xfree (temp); temp = new_event; failed = 0; @@ -847,14 +828,14 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) continue; /* don't want to increment i */ *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); - free (result); - free (temp); + xfree (result); + xfree (temp); return (-1); } } i += 2; } - /* Done with modfiers. */ + /* Done with modifiers. */ /* Believe it or not, we have to back the pointer up by one. */ --i; @@ -869,7 +850,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) else x = savestring (temp); - free (temp); + xfree (temp); temp = x; } @@ -877,7 +858,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) if (n >= result_len) result = (char *)xrealloc (result, n + 2); strcpy (result, temp); - free (temp); + xfree (temp); *end_index_ptr = i; *ret_string = result; @@ -894,7 +875,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) 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 + If an error occurred in expansion, then OUTPUT contains a descriptive error message. */ #define ADD_STRING(s) \ @@ -923,12 +904,10 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) while (0) int -history_expand (hstring, output) - char *hstring; - char **output; +history_expand (char *hstring, char **output) { register int j; - int i, r, l, passc, cc, modified, eindex, only_printing, dquote, flag; + int i, r, l, passc, cc, modified, eindex, only_printing, dquote, squote, flag; char *string; /* The output string, and its length. */ @@ -991,7 +970,22 @@ history_expand (hstring, output) /* `!' followed by one of the characters in history_no_expand_chars is NOT an expansion. */ - for (i = dquote = 0; string[i]; i++) + dquote = history_quoting_state == '"'; + squote = history_quoting_state == '\''; + + /* If the calling application tells us we are already reading a + single-quoted string, consume the rest of the string right now + and then go on. */ + i = 0; + if (squote && history_quotes_inhibit_expansion) + { + hist_string_extract_single_quoted (string, &i, 0); + squote = 0; + if (string[i]) + i++; + } + + for ( ; string[i]; i++) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) @@ -1012,6 +1006,7 @@ history_expand (hstring, output) 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 && + dquote == 0 && (i == 0 || member (string[i - 1], history_word_delimiters))) { while (string[i]) @@ -1022,6 +1017,13 @@ history_expand (hstring, output) { if (cc == 0 || member (cc, history_no_expand_chars)) continue; + /* DQUOTE won't be set unless history_quotes_inhibit_expansion + is set. The idea here is to treat double-quoted strings the + same as the word outside double quotes; in effect making the + double quote part of history_no_expand_chars when DQUOTE is + set. */ + else if (dquote && cc == '"') + 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, @@ -1064,16 +1066,38 @@ history_expand (hstring, output) if (string[i] != history_expansion_char) { - free (result); + xfree (result); *output = savestring (string); return (0); } } /* Extract and perform the substitution. */ - for (passc = dquote = i = j = 0; i < l; i++) + dquote = history_quoting_state == '"'; + squote = history_quoting_state == '\''; + + /* If the calling application tells us we are already reading a + single-quoted string, consume the rest of the string right now + and then go on. */ + i = j = 0; + if (squote && history_quotes_inhibit_expansion) { - int tchar = string[i]; + int c; + + hist_string_extract_single_quoted (string, &i, 0); + squote = 0; + for (c = 0; c < i; c++) + ADD_CHAR (string[c]); + if (string[i]) + { + ADD_CHAR (string[i]); + i++; + } + } + + for (passc = 0; i < l; i++) + { + int qc, tchar = string[i]; if (passc) { @@ -1130,8 +1154,14 @@ history_expand (hstring, output) case '\'': { /* If history_quotes_inhibit_expansion is set, single quotes - inhibit history expansion. */ - if (dquote == 0 && history_quotes_inhibit_expansion) + inhibit history expansion, otherwise they are treated like + double quotes. */ + if (squote) + { + squote = 0; + ADD_CHAR (tchar); + } + else if (dquote == 0 && history_quotes_inhibit_expansion) { int quote, slen; @@ -1144,7 +1174,12 @@ history_expand (hstring, output) strncpy (temp, string + quote, slen); temp[slen - 1] = '\0'; ADD_STRING (temp); - free (temp); + xfree (temp); + } + else if (dquote == 0 && squote == 0 && history_quotes_inhibit_expansion == 0) + { + squote = 1; + ADD_CHAR (string[i]); } else ADD_CHAR (string[i]); @@ -1152,12 +1187,13 @@ history_expand (hstring, output) } case -2: /* history_comment_char */ - if (i == 0 || member (string[i - 1], history_word_delimiters)) + if ((dquote == 0 || history_quotes_inhibit_expansion == 0) && + (i == 0 || member (string[i - 1], history_word_delimiters))) { temp = (char *)xmalloc (l - i + 1); strcpy (temp, string + i); ADD_STRING (temp); - free (temp); + xfree (temp); i = l; } else @@ -1171,12 +1207,36 @@ history_expand (hstring, output) 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))) + (dquote && cc == '"')) { ADD_CHAR (string[i]); break; } + /* If the application has defined a function to determine whether + or not a history expansion should be performed, call it here. */ + /* We check against what we've expanded so far, with the current + expansion appended, because that seems to be what csh does. We + decide to expand based on what we have to this point, not what + we started with. */ + if (history_inhibit_expansion_function) + { + int save_j, temp; + + save_j = j; + ADD_CHAR (string[i]); + ADD_CHAR (cc); + + temp = (*history_inhibit_expansion_function) (result, save_j); + if (temp) + { + result[--j] = '\0'; /* `unadd' cc, leaving ADD_CHAR(string[i]) */ + break; + } + else + result[j = save_j] = '\0'; + } + #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'. @@ -1190,20 +1250,20 @@ history_expand (hstring, output) temp = (char *)xmalloc (1 + strlen (result)); strcpy (temp, result); ADD_STRING (temp); - free (temp); + xfree (temp); } i++; break; } #endif - - r = history_expand_internal (string, i, &eindex, &temp, result); + qc = squote ? '\'' : (dquote ? '"' : 0); + r = history_expand_internal (string, i, qc, &eindex, &temp, result); if (r < 0) { *output = temp; - free (result); + xfree (result); if (string != hstring) - free (string); + xfree (string); return -1; } else @@ -1213,9 +1273,9 @@ history_expand (hstring, output) modified++; if (*temp) ADD_STRING (temp); - free (temp); + xfree (temp); } - only_printing = r == 1; + only_printing += r == 1; i = eindex; } break; @@ -1224,7 +1284,7 @@ history_expand (hstring, output) *output = result; if (string != hstring) - free (string); + xfree (string); if (only_printing) { @@ -1243,9 +1303,7 @@ history_expand (hstring, output) 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; +get_history_word_specifier (char *spec, char *from, int *caller_index) { register int i = *caller_index; int first, last; @@ -1326,6 +1384,11 @@ get_history_word_specifier (spec, from, caller_index) i++; last = '$'; } + else if (spec[i] == '^') + { + i++; + last = 1; + } #if 0 else if (!spec[i] || spec[i] == ':') /* check against `:' because there could be a modifier separator */ @@ -1351,9 +1414,7 @@ get_history_word_specifier (spec, from, caller_index) 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; +history_arg_extract (int first, int last, const char *string) { register int i, len; char *result; @@ -1405,34 +1466,48 @@ history_arg_extract (first, last, string) } for (i = 0; i < len; i++) - free (list[i]); - free (list); + xfree (list[i]); + xfree (list); return (result); } static int -history_tokenize_word (string, ind) - const char *string; - int ind; +history_tokenize_word (const char *string, int ind) { - register int i; - int delimiter; + register int i, j; + int delimiter, nestdelim, delimopen; i = ind; - delimiter = 0; + delimiter = nestdelim = 0; - if (member (string[i], "()\n")) + if (member (string[i], "()\n")) /* XXX - included \n, but why? been here forever */ { i++; return i; } - if (member (string[i], "<>;&|$")) + if (ISDIGIT (string[i])) + { + j = i; + while (string[j] && ISDIGIT (string[j])) + j++; + if (string[j] == 0) + return (j); + if (string[j] == '<' || string[j] == '>') + i = j; /* digit sequence is a file descriptor */ + else + { + i = j; + goto get_word; /* digit sequence is part of a word */ + } + } + + if (member (string[i], "<>;&|")) { int peek = string[i + 1]; - if (peek == string[i] && peek != '$') + if (peek == string[i]) { if (peek == '<' && string[i + 2] == '-') i++; @@ -1441,32 +1516,38 @@ history_tokenize_word (string, ind) i += 2; return i; } - else if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || - (peek == '>' && string[i] == '&') || - (peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) */ - (peek == '(' && string[i] == '$')) /* ) */ + else if (peek == '&' && (string[i] == '>' || string[i] == '<')) + { + j = i + 2; + while (string[j] && ISDIGIT (string[j])) /* file descriptor */ + j++; + if (string[j] =='-') /* <&[digits]-, >&[digits]- */ + j++; + return j; + } + else if ((peek == '>' && 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] != '$') + /* XXX - process substitution -- separated out for later -- bash-4.2 */ + else if (peek == '(' && (string[i] == '>' || string[i] == '<')) /*)*/ { - i++; - return i; + i += 2; + delimopen = '('; + delimiter = ')'; + nestdelim = 1; + goto get_word; } + + i++; + return i; } +get_word: /* Get word from string + i; */ - if (member (string[i], HISTORY_QUOTE_CHARACTERS)) + if (delimiter == 0 && member (string[i], HISTORY_QUOTE_CHARACTERS)) delimiter = string[i++]; for (; string[i]; i++) @@ -1484,16 +1565,41 @@ history_tokenize_word (string, ind) continue; } + /* delimiter must be set and set to something other than a quote if + nestdelim is set, so these tests are safe. */ + if (nestdelim && string[i] == delimopen) + { + nestdelim++; + continue; + } + if (nestdelim && string[i] == delimiter) + { + nestdelim--; + if (nestdelim == 0) + delimiter = 0; + continue; + } + if (delimiter && string[i] == delimiter) { delimiter = 0; continue; } - if (!delimiter && (member (string[i], history_word_delimiters))) + /* Command and process substitution; shell extended globbing patterns */ + if (nestdelim == 0 && delimiter == 0 && member (string[i], "<>$!@?+*") && string[i+1] == '(') /*)*/ + { + i += 2; + delimopen = '('; + delimiter = ')'; + nestdelim = 1; + continue; + } + + if (delimiter == 0 && (member (string[i], history_word_delimiters))) break; - if (!delimiter && member (string[i], HISTORY_QUOTE_CHARACTERS)) + if (delimiter == 0 && member (string[i], HISTORY_QUOTE_CHARACTERS)) delimiter = string[i]; } @@ -1501,9 +1607,7 @@ history_tokenize_word (string, ind) } static char * -history_substring (string, start, end) - const char *string; - int start, end; +history_substring (const char *string, int start, int end) { register int len; register char *result; @@ -1520,9 +1624,7 @@ history_substring (string, start, end) 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; +history_tokenize_internal (const char *string, int wind, int *indp) { char **result; register int i, start, result_index, size; @@ -1537,7 +1639,7 @@ history_tokenize_internal (string, wind, indp) for (i = result_index = size = 0, result = (char **)NULL; string[i]; ) { /* Skip leading whitespace. */ - for (; string[i] && whitespace (string[i]); i++) + for (; string[i] && fielddelim (string[i]); i++) ; if (string[i] == 0 || string[i] == history_comment_char) return (result); @@ -1575,31 +1677,26 @@ history_tokenize_internal (string, wind, indp) /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ char ** -history_tokenize (string) - const char *string; +history_tokenize (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; +freewords (char **words, int start) { register int i; for (i = start; words[i]; i++) - free (words[i]); + xfree (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; +history_find_word (char *line, int ind) { char **words, *s; int i, wind; @@ -1614,8 +1711,8 @@ history_find_word (line, ind) } s = words[wind]; for (i = 0; i < wind; i++) - free (words[i]); + xfree (words[i]); freewords (words, wind + 1); - free (words); + xfree (words); return s; } diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c index a75fc16..3bfec55 100644 --- a/lib/readline/histfile.c +++ b/lib/readline/histfile.c @@ -1,6 +1,6 @@ /* histfile.c - functions to manipulate the history file. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2019 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. @@ -26,6 +26,8 @@ #define READLINE_LIBRARY #if defined (__TANDEM) +# define _XOPEN_SOURCE_EXTENDED 1 +# include # include #endif @@ -35,6 +37,10 @@ #include +#if defined (HAVE_LIMITS_H) +# include +#endif + #include #if ! defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include @@ -75,6 +81,11 @@ #endif /* HISTORY_USE_MMAP */ +#if defined(_WIN32) +# define WIN32_LEAN_AND_MEAN +# include +#endif + /* 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 @@ -99,19 +110,46 @@ extern int errno; #include "rlshell.h" #include "xmalloc.h" +#if !defined (PATH_MAX) +# define PATH_MAX 1024 /* default */ +#endif + +/* history file version; currently unused */ +int history_file_version = 1; + /* If non-zero, we write timestamps to the history file in history_do_write() */ int history_write_timestamps = 0; +/* If non-zero, we assume that a history file that starts with a timestamp + uses timestamp-delimited entries and can include multi-line history + entries. Used by read_history_range */ +int history_multiline_entries = 0; + +/* Immediately after a call to read_history() or read_history_range(), this + will return the number of lines just read from the history file in that + call. */ +int history_lines_read_from_file = 0; + +/* Immediately after a call to write_history() or history_do_write(), this + will return the number of lines just written to the history file in that + call. This also works with history_truncate_file. */ +int history_lines_written_to_file = 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]) ) +#define HIST_TIMESTAMP_START(s) (*(s) == history_comment_char && isdigit ((unsigned char)(s)[1]) ) + +static char *history_backupfile (const char *); +static char *history_tempfile (const char *); +static int histfile_backup (const char *, const char *); +static int histfile_restore (const char *, const char *); +static int history_rename (const char *, const char *); /* 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; +history_filename (const char *filename) { char *return_val; const char *home; @@ -123,12 +161,13 @@ history_filename (filename) return (return_val); home = sh_get_env_value ("HOME"); +#if defined (_WIN32) + if (home == 0) + home = sh_get_env_value ("APPDATA"); +#endif if (home == 0) - { - home = "."; - home_len = 1; - } + return (NULL); else home_len = strlen (home); @@ -144,12 +183,78 @@ history_filename (filename) return (return_val); } +static char * +history_backupfile (const char *filename) +{ + const char *fn; + char *ret, linkbuf[PATH_MAX+1]; + size_t len; + ssize_t n; + struct stat fs; + + fn = filename; +#if defined (HAVE_READLINK) + /* Follow symlink to avoid backing up symlink itself; call will fail if + not a symlink */ + if ((n = readlink (filename, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + fn = linkbuf; + } +#endif + + len = strlen (fn); + ret = xmalloc (len + 2); + strcpy (ret, fn); + ret[len] = '-'; + ret[len+1] = '\0'; + return ret; +} + +static char * +history_tempfile (const char *filename) +{ + const char *fn; + char *ret, linkbuf[PATH_MAX+1]; + size_t len; + ssize_t n; + struct stat fs; + int pid; + + fn = filename; +#if defined (HAVE_READLINK) + /* Follow symlink so tempfile created in the same directory as any symlinked + history file; call will fail if not a symlink */ + if ((n = readlink (filename, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + fn = linkbuf; + } +#endif + + len = strlen (fn); + ret = xmalloc (len + 11); + strcpy (ret, fn); + + pid = (int)getpid (); + + /* filename-PID.tmp */ + ret[len] = '-'; + ret[len+1] = (pid / 10000 % 10) + '0'; + ret[len+2] = (pid / 1000 % 10) + '0'; + ret[len+3] = (pid / 100 % 10) + '0'; + ret[len+4] = (pid / 10 % 10) + '0'; + ret[len+5] = (pid % 10) + '0'; + strcpy (ret + len + 6, ".tmp"); + + return ret; +} + /* 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; +read_history (const char *filename) { return (read_history_range (filename, 0, -1)); } @@ -160,13 +265,11 @@ read_history (filename) 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; +read_history_range (const char *filename, int from, int to) { register char *line_start, *line_end, *p; char *input, *buffer, *bufend, *last_ts; - int file, current_line, chars_read; + int file, current_line, chars_read, has_timestamps, reset_comment_char; struct stat finfo; size_t file_size; #if defined (EFBIG) @@ -177,13 +280,25 @@ read_history_range (filename, from, to) int overflow_errno = EIO; #endif + history_lines_read_from_file = 0; + buffer = last_ts = (char *)NULL; input = history_filename (filename); - file = open (input, O_RDONLY|O_BINARY, 0666); + file = input ? open (input, O_RDONLY|O_BINARY, 0666) : -1; if ((file < 0) || (fstat (file, &finfo) == -1)) goto error_and_exit; + if (S_ISREG (finfo.st_mode) == 0) + { +#ifdef EFTYPE + errno = EFTYPE; +#else + errno = EINVAL; +#endif + goto error_and_exit; + } + file_size = (size_t)finfo.st_size; /* check for overflow on very large files */ @@ -193,6 +308,13 @@ read_history_range (filename, from, to) goto error_and_exit; } + if (file_size == 0) + { + xfree (input); + close (file); + return 0; /* don't waste time if we don't have to */ + } + #ifdef HISTORY_USE_MMAP /* We map read/write and private so we can change newlines to NULs without affecting the underlying object. */ @@ -239,9 +361,25 @@ read_history_range (filename, from, to) /* Start at beginning of file, work to end. */ bufend = buffer + chars_read; + *bufend = '\0'; /* null-terminate buffer for timestamp checks */ current_line = 0; + /* Heuristic: the history comment character rarely changes, so assume we + have timestamps if the buffer starts with `#[:digit:]' and temporarily + set history_comment_char so timestamp parsing works right */ + reset_comment_char = 0; + if (history_comment_char == '\0' && buffer[0] == '#' && isdigit ((unsigned char)buffer[1])) + { + history_comment_char = '#'; + reset_comment_char = 1; + } + + has_timestamps = HIST_TIMESTAMP_START (buffer); + history_multiline_entries += has_timestamps && history_write_timestamps; + /* Skip lines until we are at FROM. */ + if (has_timestamps) + last_ts = buffer; for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++) if (*line_end == '\n') { @@ -250,7 +388,18 @@ read_history_range (filename, from, to) line. We should check more extensively here... */ if (HIST_TIMESTAMP_START(p) == 0) current_line++; + else + last_ts = p; line_start = p; + /* If we are at the last line (current_line == from) but we have + timestamps (has_timestamps), then line_start points to the + text of the last command, and we need to skip to its end. */ + if (current_line >= from && has_timestamps) + { + for (line_end = p; line_end < bufend && *line_end != '\n'; line_end++) + ; + line_start = (*line_end == '\n') ? line_end + 1 : line_end; + } } /* If there are lines left to gobble, then gobble them now. */ @@ -267,7 +416,10 @@ read_history_range (filename, from, to) { if (HIST_TIMESTAMP_START(line_start) == 0) { - add_history (line_start); + if (last_ts == NULL && history_length > 0 && history_multiline_entries) + _hs_append_history_line (history_length - 1, line_start); + else + add_history (line_start); if (last_ts) { add_history_time (last_ts); @@ -289,6 +441,10 @@ read_history_range (filename, from, to) line_start = line_end + 1; } + history_lines_read_from_file = current_line; + if (reset_comment_char) + history_comment_char = '\0'; + FREE (input); #ifndef HISTORY_USE_MMAP FREE (buffer); @@ -299,23 +455,80 @@ read_history_range (filename, from, to) return (0); } +/* We need a special version for WIN32 because Windows rename() refuses to + overwrite an existing file. */ +static int +history_rename (const char *old, const char *new) +{ +#if defined (_WIN32) + return (MoveFileEx (old, new, MOVEFILE_REPLACE_EXISTING) == 0 ? -1 : 0); +#else + return (rename (old, new)); +#endif +} + +/* Save FILENAME to BACK, handling case where FILENAME is a symlink + (e.g., ~/.bash_history -> .histfiles/.bash_history.$HOSTNAME) */ +static int +histfile_backup (const char *filename, const char *back) +{ +#if defined (HAVE_READLINK) + char linkbuf[PATH_MAX+1]; + ssize_t n; + + /* Follow to target of symlink to avoid renaming symlink itself */ + if ((n = readlink (filename, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + return (history_rename (linkbuf, back)); + } +#endif + return (history_rename (filename, back)); +} + +/* Restore ORIG from BACKUP handling case where ORIG is a symlink + (e.g., ~/.bash_history -> .histfiles/.bash_history.$HOSTNAME) */ +static int +histfile_restore (const char *backup, const char *orig) +{ +#if defined (HAVE_READLINK) + char linkbuf[PATH_MAX+1]; + ssize_t n; + + /* Follow to target of symlink to avoid renaming symlink itself */ + if ((n = readlink (orig, linkbuf, sizeof (linkbuf) - 1)) > 0) + { + linkbuf[n] = '\0'; + return (history_rename (backup, linkbuf)); + } +#endif + return (history_rename (backup, orig)); +} + +/* Should we call chown, based on whether finfo and nfinfo describe different + files with different owners? */ + +#define SHOULD_CHOWN(finfo, nfinfo) \ + (finfo.st_uid != nfinfo.st_uid || finfo.st_gid != nfinfo.st_gid) + /* Truncate the history file FNAME, leaving only LINES trailing lines. - If FNAME is NULL, then use ~/.history. Returns 0 on success, errno - on failure. */ + If FNAME is NULL, then use ~/.history. Writes a new file and renames + it to the original name. Returns 0 on success, errno on failure. */ int -history_truncate_file (fname, lines) - const char *fname; - int lines; +history_truncate_file (const char *fname, int lines) { - char *buffer, *filename, *bp, *bp1; /* bp1 == bp+1 */ - int file, chars_read, rv; - struct stat finfo; + char *buffer, *filename, *tempname, *bp, *bp1; /* bp1 == bp+1 */ + int file, chars_read, rv, orig_lines, exists, r; + struct stat finfo, nfinfo; size_t file_size; + history_lines_written_to_file = 0; + buffer = (char *)NULL; filename = history_filename (fname); - file = open (filename, O_RDONLY|O_BINARY, 0666); - rv = 0; + tempname = 0; + file = filename ? open (filename, O_RDONLY|O_BINARY, 0666) : -1; + rv = exists = 0; /* Don't try to truncate non-regular files. */ if (file == -1 || fstat (file, &finfo) == -1) @@ -325,6 +538,10 @@ history_truncate_file (fname, lines) close (file); goto truncate_exit; } + exists = 1; + + nfinfo.st_uid = finfo.st_uid; + nfinfo.st_gid = finfo.st_gid; if (S_ISREG (finfo.st_mode) == 0) { @@ -356,6 +573,7 @@ history_truncate_file (fname, lines) buffer = (char *)malloc (file_size + 1); if (buffer == 0) { + rv = errno; close (file); goto truncate_exit; } @@ -369,6 +587,7 @@ history_truncate_file (fname, lines) goto truncate_exit; } + orig_lines = lines; /* 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 @@ -397,51 +616,95 @@ history_truncate_file (fname, lines) /* 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)) + if (bp <= buffer) { - write (file, bp, chars_read - (bp - buffer)); + rv = 0; + /* No-op if LINES == 0 at this point */ + history_lines_written_to_file = orig_lines - lines; + goto truncate_exit; + } -#if defined (__BEOS__) - /* BeOS ignores O_TRUNC. */ - ftruncate (file, chars_read - (bp - buffer)); -#endif + tempname = history_tempfile (filename); - close (file); + if ((file = open (tempname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0600)) != -1) + { + if (write (file, bp, chars_read - (bp - buffer)) < 0) + rv = errno; + + if (fstat (file, &nfinfo) < 0 && rv == 0) + rv = errno; + + if (close (file) < 0 && rv == 0) + rv = errno; } + else + rv = errno; truncate_exit: - FREE (buffer); - free (filename); + history_lines_written_to_file = orig_lines - lines; + + if (rv == 0 && filename && tempname) + rv = histfile_restore (tempname, filename); + + if (rv != 0) + { + rv = errno; + if (tempname) + unlink (tempname); + history_lines_written_to_file = 0; + } + +#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists && SHOULD_CHOWN (finfo, nfinfo)) + r = chown (filename, finfo.st_uid, finfo.st_gid); +#endif + + xfree (filename); + FREE (tempname); + return rv; } -/* Workhorse function for writing history. Writes NELEMENT entries +/* Workhorse function for writing history. Writes the last 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; +history_do_write (const char *filename, int nelements, int overwrite) { register int i; - char *output; - int file, mode, rv; + char *output, *tempname, *histname; + int file, mode, rv, exists; + struct stat finfo, nfinfo; #ifdef HISTORY_USE_MMAP size_t cursize; + history_lines_written_to_file = 0; + 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); + histname = history_filename (filename); + exists = histname ? (stat (histname, &finfo) == 0) : 0; + + tempname = (overwrite && exists && S_ISREG (finfo.st_mode)) ? history_tempfile (histname) : 0; + output = tempname ? tempname : histname; + + file = output ? open (output, mode, 0600) : -1; rv = 0; - if ((file = open (output, mode, 0600)) == -1) + if (file == -1) { - FREE (output); - return (errno); + rv = errno; + FREE (histname); + FREE (tempname); + return (rv); } #ifdef HISTORY_USE_MMAP @@ -462,15 +725,11 @@ history_do_write (filename, nelements, overwrite) 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 @@ -481,8 +740,11 @@ history_do_write (filename, nelements, overwrite) { mmap_error: rv = errno; - FREE (output); close (file); + if (tempname) + unlink (tempname); + FREE (histname); + FREE (tempname); return rv; } #else @@ -490,8 +752,11 @@ history_do_write (filename, nelements, overwrite) if (buffer == 0) { rv = errno; - FREE (output); close (file); + if (tempname) + unlink (tempname); + FREE (histname); + FREE (tempname); return rv; } #endif @@ -510,18 +775,42 @@ history_do_write (filename, nelements, overwrite) } #ifdef HISTORY_USE_MMAP - if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0) + if (msync (buffer, buffer_size, MS_ASYNC) != 0 || munmap (buffer, buffer_size) != 0) rv = errno; #else if (write (file, buffer, buffer_size) < 0) rv = errno; - free (buffer); + xfree (buffer); #endif } - close (file); + history_lines_written_to_file = nelements; + + if (close (file) < 0 && rv == 0) + rv = errno; + + if (rv == 0 && histname && tempname) + rv = histfile_restore (tempname, histname); + + if (rv != 0) + { + rv = errno; + if (tempname) + unlink (tempname); + history_lines_written_to_file = 0; + } + +#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists) + mode = chown (histname, finfo.st_uid, finfo.st_gid); +#endif - FREE (output); + FREE (histname); + FREE (tempname); return (rv); } @@ -529,9 +818,7 @@ history_do_write (filename, nelements, overwrite) /* 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; +append_history (int nelements, const char *filename) { return (history_do_write (filename, nelements, HISTORY_APPEND)); } @@ -540,8 +827,7 @@ append_history (nelements, filename) then write the history list to ~/.history. Values returned are as in read_history ().*/ int -write_history (filename) - const char *filename; +write_history (const char *filename) { return (history_do_write (filename, history_length, HISTORY_OVERWRITE)); } diff --git a/lib/readline/histlib.h b/lib/readline/histlib.h index c938a10..29fc4d2 100644 --- a/lib/readline/histlib.h +++ b/lib/readline/histlib.h @@ -1,6 +1,6 @@ /* histlib.h -- internal definitions for the history library. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2009,2021-2022 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. @@ -51,9 +51,9 @@ #endif #ifndef member -# ifndef strchr +# if !defined (strchr) && !defined (__STDC__) extern char *strchr (); -# endif +# endif /* !strchr && !__STDC__ */ #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) #endif @@ -69,14 +69,24 @@ extern char *strchr (); #define NO_PREV_SUBST 4 /* Possible definitions for history starting point specification. */ -#define ANCHORED_SEARCH 1 -#define NON_ANCHORED_SEARCH 0 +#define NON_ANCHORED_SEARCH 0 +#define ANCHORED_SEARCH 0x01 +#define PATTERN_SEARCH 0x02 /* 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; +/* internal extern function declarations used by other parts of the library */ + +/* histsearch.c */ +extern int _hs_history_patsearch (const char *, int, int); + +/* history.c */ +extern void _hs_replace_history_data (int, histdata_t *, histdata_t *); +extern int _hs_at_end_of_history (void); + +/* histfile.c */ +extern void _hs_append_history_line (int, const char *); #endif /* !_HISTLIB_H_ */ diff --git a/lib/readline/history.c b/lib/readline/history.c index 8e613bb..81d4c16 100644 --- a/lib/readline/history.c +++ b/lib/readline/history.c @@ -1,6 +1,6 @@ /* history.c -- standalone history library */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2021 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. @@ -43,15 +43,26 @@ # include #endif +#include + #include "history.h" #include "histlib.h" #include "xmalloc.h" +#if !defined (errno) +extern int errno; +#endif + +/* How big to make the_history when we first allocate it. */ +#define DEFAULT_HISTORY_INITIAL_SIZE 502 + +#define MAX_HISTORY_INITIAL_SIZE 8192 + /* The number of slots to increase the_history by. */ #define DEFAULT_HISTORY_GROW_SIZE 50 -static char *hist_inittime PARAMS((void)); +static char *hist_inittime (void); /* **************************************************************** */ /* */ @@ -86,7 +97,7 @@ int history_base = 1; /* Return the current HISTORY_STATE of the history. */ HISTORY_STATE * -history_get_history_state () +history_get_history_state (void) { HISTORY_STATE *state; @@ -104,8 +115,7 @@ history_get_history_state () /* Set the state of the current history array to STATE. */ void -history_set_history_state (state) - HISTORY_STATE *state; +history_set_history_state (HISTORY_STATE *state) { the_history = state->entries; history_offset = state->offset; @@ -118,7 +128,7 @@ history_set_history_state (state) /* Begin a session in which the history functions might be used. This initializes interactive variables. */ void -using_history () +using_history (void) { history_offset = history_length; } @@ -127,7 +137,7 @@ using_history () This just adds up the lengths of the_history->lines and the associated timestamps. */ int -history_total_bytes () +history_total_bytes (void) { register int i, result; @@ -140,7 +150,7 @@ history_total_bytes () /* Returns the magic number which says what history element we are looking at now. In this implementation, it returns history_offset. */ int -where_history () +where_history (void) { return (history_offset); } @@ -148,20 +158,26 @@ where_history () /* 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; +history_set_pos (int pos) { if (pos > history_length || pos < 0 || !the_history) return (0); history_offset = pos; return (1); } + +/* Are we currently at the end of the history list? */ +int +_hs_at_end_of_history (void) +{ + return (the_history == 0 || history_offset == history_length); +} /* 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 () +history_list (void) { return (the_history); } @@ -169,7 +185,7 @@ history_list () /* 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 () +current_history (void) { return ((history_offset == history_length) || the_history == 0) ? (HIST_ENTRY *)NULL @@ -180,7 +196,7 @@ current_history () a pointer to that entry. If there is no previous entry then return a NULL pointer. */ HIST_ENTRY * -previous_history () +previous_history (void) { return history_offset ? the_history[--history_offset] : (HIST_ENTRY *)NULL; } @@ -189,7 +205,7 @@ previous_history () a pointer to that entry. If there is no next entry then return a NULL pointer. */ HIST_ENTRY * -next_history () +next_history (void) { return (history_offset == history_length) ? (HIST_ENTRY *)NULL : the_history[++history_offset]; } @@ -197,8 +213,7 @@ next_history () /* 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; +history_get (int offset) { int local_index; @@ -209,9 +224,7 @@ history_get (offset) } HIST_ENTRY * -alloc_history_entry (string, ts) - char *string; - char *ts; +alloc_history_entry (char *string, char *ts) { HIST_ENTRY *temp; @@ -225,8 +238,7 @@ alloc_history_entry (string, ts) } time_t -history_get_time (hist) - HIST_ENTRY *hist; +history_get_time (HIST_ENTRY *hist) { char *ts; time_t t; @@ -236,12 +248,15 @@ history_get_time (hist) ts = hist->timestamp; if (ts[0] != history_comment_char) return 0; - t = (time_t) atol (ts + 1); /* XXX - should use strtol() here */ + errno = 0; + t = (time_t) strtol (ts + 1, (char **)NULL, 10); /* XXX - should use strtol() here */ + if (errno == ERANGE) + return (time_t)0; return t; } static char * -hist_inittime () +hist_inittime (void) { time_t t; char ts[64], *ret; @@ -261,10 +276,10 @@ hist_inittime () /* Place STRING at the end of the history list. The data field is set to NULL. */ void -add_history (string) - const char *string; +add_history (const char *string) { HIST_ENTRY *temp; + int new_length; if (history_stifled && (history_length == history_max_entries)) { @@ -279,19 +294,25 @@ add_history (string) 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]; + /* Copy the rest of the entries, moving down one slot. Copy includes + trailing NULL. */ + memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *)); + new_length = history_length; history_base++; } else { if (history_size == 0) { - history_size = DEFAULT_HISTORY_GROW_SIZE; + if (history_stifled && history_max_entries > 0) + history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE) + ? MAX_HISTORY_INITIAL_SIZE + : history_max_entries + 2; + else + history_size = DEFAULT_HISTORY_INITIAL_SIZE; the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *)); - history_length = 1; + new_length = 1; } else { @@ -301,24 +322,24 @@ add_history (string) the_history = (HIST_ENTRY **) xrealloc (the_history, history_size * sizeof (HIST_ENTRY *)); } - history_length++; + new_length = history_length + 1; } } - temp = alloc_history_entry (string, hist_inittime ()); + temp = alloc_history_entry ((char *)string, hist_inittime ()); - the_history[history_length] = (HIST_ENTRY *)NULL; - the_history[history_length - 1] = temp; + the_history[new_length] = (HIST_ENTRY *)NULL; + the_history[new_length - 1] = temp; + history_length = new_length; } /* Change the time stamp of the most recent history entry to STRING. */ void -add_history_time (string) - const char *string; +add_history_time (const char *string) { HIST_ENTRY *hs; - if (string == 0) + if (string == 0 || history_length < 1) return; hs = the_history[history_length - 1]; FREE (hs->timestamp); @@ -328,8 +349,7 @@ add_history_time (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; +free_history_entry (HIST_ENTRY *hist) { histdata_t x; @@ -338,13 +358,12 @@ free_history_entry (hist) FREE (hist->line); FREE (hist->timestamp); x = hist->data; - free (hist); + xfree (hist); return (x); } HIST_ENTRY * -copy_history_entry (hist) - HIST_ENTRY *hist; +copy_history_entry (HIST_ENTRY *hist) { HIST_ENTRY *ret; char *ts; @@ -366,10 +385,7 @@ copy_history_entry (hist) 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; +replace_history_entry (int which, const char *line, histdata_t data) { HIST_ENTRY *temp, *old_value; @@ -381,12 +397,45 @@ replace_history_entry (which, line, data) temp->line = savestring (line); temp->data = data; - temp->timestamp = savestring (old_value->timestamp); + temp->timestamp = old_value->timestamp ? savestring (old_value->timestamp) : 0; the_history[which] = temp; return (old_value); } +/* Append LINE to the history line at offset WHICH, adding a newline to the + end of the current line first. This can be used to construct multi-line + history entries while reading lines from the history file. */ +void +_hs_append_history_line (int which, const char *line) +{ + HIST_ENTRY *hent; + size_t newlen, curlen, minlen; + char *newline; + + hent = the_history[which]; + curlen = strlen (hent->line); + minlen = curlen + strlen (line) + 2; /* min space needed */ + if (curlen > 256) /* XXX - for now */ + { + newlen = 512; /* now realloc in powers of 2 */ + /* we recalcluate every time; the operations are cheap */ + while (newlen < minlen) + newlen <<= 1; + } + else + newlen = minlen; + /* Assume that realloc returns the same pointer and doesn't try a new + alloc/copy if the new size is the same as the one last passed. */ + newline = realloc (hent->line, newlen); + if (newline) + { + hent->line = newline; + hent->line[curlen++] = '\n'; + strcpy (hent->line + curlen, line); + } +} + /* 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 @@ -394,9 +443,7 @@ replace_history_entry (which, line, data) 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; +_hs_replace_history_data (int which, histdata_t *old, histdata_t *new) { HIST_ENTRY *entry; register int i, last; @@ -436,29 +483,76 @@ replace_history_data (which,old, new) element is returned to you so you can free the line, data, and containing structure. */ HIST_ENTRY * -remove_history (which) - int which; +remove_history (int which) { HIST_ENTRY *return_value; register int i; +#if 1 + int nentries; + HIST_ENTRY **start, **end; +#endif if (which < 0 || which >= history_length || history_length == 0 || the_history == 0) return ((HIST_ENTRY *)NULL); return_value = the_history[which]; +#if 1 + /* Copy the rest of the entries, moving down one slot. Copy includes + trailing NULL. */ + nentries = history_length - which; + start = the_history + which; + end = start + 1; + memmove (start, end, nentries * sizeof (HIST_ENTRY *)); +#else for (i = which; i < history_length; i++) the_history[i] = the_history[i + 1]; +#endif history_length--; return (return_value); } +HIST_ENTRY ** +remove_history_range (int first, int last) +{ + HIST_ENTRY **return_value; + register int i; + int nentries; + HIST_ENTRY **start, **end; + + if (the_history == 0 || history_length == 0) + return ((HIST_ENTRY **)NULL); + if (first < 0 || first >= history_length || last < 0 || last >= history_length) + return ((HIST_ENTRY **)NULL); + if (first > last) + return (HIST_ENTRY **)NULL; + + nentries = last - first + 1; + return_value = (HIST_ENTRY **)malloc ((nentries + 1) * sizeof (HIST_ENTRY *)); + if (return_value == 0) + return return_value; + + /* Return all the deleted entries in a list */ + for (i = first ; i <= last; i++) + return_value[i - first] = the_history[i]; + return_value[i - first] = (HIST_ENTRY *)NULL; + + /* Copy the rest of the entries, moving down NENTRIES slots. Copy includes + trailing NULL. */ + start = the_history + first; + end = the_history + last + 1; + memmove (start, end, (history_length - last) * sizeof (HIST_ENTRY *)); + + history_length -= nentries; + + return (return_value); +} + /* Stifle the history list, remembering only MAX number of lines. */ void -stifle_history (max) - int max; +stifle_history (int max) { register int i, j; @@ -486,7 +580,7 @@ stifle_history (max) number of history entries. The value is positive if the history was stifled, negative if it wasn't. */ int -unstifle_history () +unstifle_history (void) { if (history_stifled) { @@ -498,13 +592,13 @@ unstifle_history () } int -history_is_stifled () +history_is_stifled (void) { return (history_stifled); } void -clear_history () +clear_history (void) { register int i; @@ -516,4 +610,5 @@ clear_history () } history_offset = history_length = 0; + history_base = 1; /* reset history base to default */ } diff --git a/lib/readline/history.h b/lib/readline/history.h index 1257e66..5208f9a 100644 --- a/lib/readline/history.h +++ b/lib/readline/history.h @@ -1,6 +1,6 @@ /* history.h -- the names of functions that you can call in history. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2022 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. @@ -42,6 +42,11 @@ typedef void *histdata_t; typedef char *histdata_t; #endif +/* Let's not step on anyone else's define for now, since we don't use this yet. */ +#ifndef HS_HISTORY_VERSION +# define HS_HISTORY_VERSION 0x0802 /* History 8.2 */ +#endif + /* The structure used to store a history entry. */ typedef struct _hist_entry { char *line; @@ -68,93 +73,102 @@ typedef struct _hist_state { /* Begin a session in which the history functions might be used. This just initializes the interactive variables. */ -extern void using_history PARAMS((void)); +extern void using_history (void); /* Return the current HISTORY_STATE of the history. */ -extern HISTORY_STATE *history_get_history_state PARAMS((void)); +extern HISTORY_STATE *history_get_history_state (void); /* Set the state of the current history array to STATE. */ -extern void history_set_history_state PARAMS((HISTORY_STATE *)); +extern void history_set_history_state (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 *)); +extern void add_history (const char *); /* Change the timestamp associated with the most recent history entry to STRING. */ -extern void add_history_time PARAMS((const char *)); +extern void add_history_time (const char *); + +/* Remove an entry from the history list. WHICH is the magic number that + tells us which element to delete. The elements are numbered from 0. */ +extern HIST_ENTRY *remove_history (int); + +/* Remove a set of entries from the history list: FIRST to LAST, inclusive */ +extern HIST_ENTRY **remove_history_range (int, int); + +/* Allocate a history entry consisting of STRING and TIMESTAMP and return + a pointer to it. */ +extern HIST_ENTRY *alloc_history_entry (char *, 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)); +/* Copy the history entry H, but not the (opaque) data pointer */ +extern HIST_ENTRY *copy_history_entry (HIST_ENTRY *); /* Free the history entry H and return any application-specific data associated with it. */ -extern histdata_t free_history_entry PARAMS((HIST_ENTRY *)); +extern histdata_t free_history_entry (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)); +extern HIST_ENTRY *replace_history_entry (int, const char *, histdata_t); /* Clear the history list and start over. */ -extern void clear_history PARAMS((void)); +extern void clear_history (void); /* Stifle the history list, remembering only MAX number of entries. */ -extern void stifle_history PARAMS((int)); +extern void stifle_history (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)); +extern int unstifle_history (void); /* Return 1 if the history is stifled, 0 if it is not. */ -extern int history_is_stifled PARAMS((void)); +extern int history_is_stifled (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)); +extern HIST_ENTRY **history_list (void); /* Returns the number which says what history element we are now looking at. */ -extern int where_history PARAMS((void)); +extern int where_history (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)); +extern HIST_ENTRY *current_history (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)); +extern HIST_ENTRY *history_get (int); /* Return the timestamp associated with the HIST_ENTRY * passed as an argument */ -extern time_t history_get_time PARAMS((HIST_ENTRY *)); +extern time_t history_get_time (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)); +extern int history_total_bytes (void); /* Moving around the history list. */ /* Set the position in the history list to POS. */ -extern int history_set_pos PARAMS((int)); +extern int history_set_pos (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)); +extern HIST_ENTRY *previous_history (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)); +extern HIST_ENTRY *next_history (void); /* Searching the history list. */ @@ -164,45 +178,45 @@ extern HIST_ENTRY *next_history PARAMS((void)); 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)); +extern int history_search (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)); +extern int history_search_prefix (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)); +extern int history_search_pos (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 *)); +extern int read_history (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)); +extern int read_history_range (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 *)); +extern int write_history (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 *)); +extern int append_history (int, const char *); /* Truncate the history file, leaving only the last NLINES lines. */ -extern int history_truncate_file PARAMS((const char *, int)); +extern int history_truncate_file (const char *, int); /* History expansion. */ @@ -216,14 +230,14 @@ extern int history_truncate_file PARAMS((const char *, int)); -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 + If an error occurred in expansion, then OUTPUT contains a descriptive error message. */ -extern int history_expand PARAMS((char *, char **)); +extern int history_expand (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 *)); +extern char *history_arg_extract (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 @@ -231,26 +245,37 @@ extern char *history_arg_extract PARAMS((int, int, const char *)); 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)); +extern char *get_history_event (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 *)); +extern char **history_tokenize (const char *); /* Exported history variables. */ extern int history_base; extern int history_length; extern int history_max_entries; +extern int history_offset; + +extern int history_lines_read_from_file; +extern int history_lines_written_to_file; + 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_quoting_state; extern int history_write_timestamps; +/* These two are undocumented; the second is reserved for future use */ +extern int history_multiline_entries; +extern int history_file_version; + /* Backwards compatibility */ extern int max_input_history; diff --git a/lib/readline/histsearch.c b/lib/readline/histsearch.c index 1ad55d2..b62c06b 100644 --- a/lib/readline/histsearch.c +++ b/lib/readline/histsearch.c @@ -1,6 +1,6 @@ /* histsearch.c -- searching the history list. */ -/* Copyright (C) 1989, 1992-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1992-2009,2017,2021 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. @@ -39,14 +39,19 @@ # include #endif +#if defined (HAVE_FNMATCH) +# include +#endif + #include "history.h" #include "histlib.h" +#include "xmalloc.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)); +static int history_search_internal (const char *, int, int); /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else @@ -59,18 +64,22 @@ static int history_search_internal PARAMS((const char *, int, int)); returned. */ static int -history_search_internal (string, direction, anchored) - const char *string; - int direction, anchored; +history_search_internal (const char *string, int direction, int flags) { register int i, reverse; register char *line; register int line_index; - int string_len; + int string_len, anchored, patsearch; HIST_ENTRY **the_history; /* local */ i = history_offset; reverse = (direction < 0); + anchored = (flags & ANCHORED_SEARCH); +#if defined (HAVE_FNMATCH) + patsearch = (flags & PATTERN_SEARCH); +#else + patsearch = 0; +#endif /* Take care of trivial cases first. */ if (string == 0 || *string == '\0') @@ -98,7 +107,7 @@ history_search_internal (string, direction, anchored) line_index = strlen (line); /* If STRING is longer than line, no match. */ - if (string_len > line_index) + if (patsearch == 0 && (string_len > line_index)) { NEXT_LINE (); continue; @@ -107,6 +116,17 @@ history_search_internal (string, direction, anchored) /* Handle anchored searches first. */ if (anchored == ANCHORED_SEARCH) { +#if defined (HAVE_FNMATCH) + if (patsearch) + { + if (fnmatch (string, line, 0) == 0) + { + history_offset = i; + return (0); + } + } + else +#endif if (STREQN (string, line, string_len)) { history_offset = i; @@ -120,10 +140,21 @@ history_search_internal (string, direction, anchored) /* Do substring search. */ if (reverse) { - line_index -= string_len; + line_index -= (patsearch == 0) ? string_len : 1; while (line_index >= 0) { +#if defined (HAVE_FNMATCH) + if (patsearch) + { + if (fnmatch (string, line + line_index, 0) == 0) + { + history_offset = i; + return (line_index); + } + } + else +#endif if (STREQN (string, line + line_index, string_len)) { history_offset = i; @@ -141,6 +172,17 @@ history_search_internal (string, direction, anchored) while (line_index < limit) { +#if defined (HAVE_FNMATCH) + if (patsearch) + { + if (fnmatch (string, line + line_index, 0) == 0) + { + history_offset = i; + return (line_index); + } + } + else +#endif if (STREQN (string, line + line_index, string_len)) { history_offset = i; @@ -153,20 +195,73 @@ history_search_internal (string, direction, anchored) } } +int +_hs_history_patsearch (const char *string, int direction, int flags) +{ + char *pat; + size_t len, start; + int ret, unescaped_backslash; + +#if defined (HAVE_FNMATCH) + /* Assume that the string passed does not have a leading `^' and any + anchored search request is captured in FLAGS */ + len = strlen (string); + ret = len - 1; + /* fnmatch is required to reject a pattern that ends with an unescaped + backslash */ + if (unescaped_backslash = (string[ret] == '\\')) + { + while (ret > 0 && string[--ret] == '\\') + unescaped_backslash = 1 - unescaped_backslash; + } + if (unescaped_backslash) + return -1; + pat = (char *)xmalloc (len + 3); + /* If the search string is not anchored, we'll be calling fnmatch (assuming + we have it). Prefix a `*' to the front of the search string so we search + anywhere in the line. */ + if ((flags & ANCHORED_SEARCH) == 0 && string[0] != '*') + { + pat[0] = '*'; + start = 1; + len++; + } + else + { + start = 0; + } + + /* Attempt to reduce the number of searches by tacking a `*' onto the end + of a pattern that doesn't have one. Assume a pattern that ends in a + backslash contains an even number of trailing backslashes; we check + above */ + strcpy (pat + start, string); + if (pat[len - 1] != '*') + { + pat[len] = '*'; /* XXX */ + pat[len+1] = '\0'; + } +#else + pat = string; +#endif + + ret = history_search_internal (pat, direction, flags|PATTERN_SEARCH); + + if (pat != string) + xfree (pat); + return ret; +} + /* Do a non-anchored search for STRING through the history in DIRECTION. */ int -history_search (string, direction) - const char *string; - int direction; +history_search (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; +history_search_prefix (const char *string, int direction) { return (history_search_internal (string, direction, ANCHORED_SEARCH)); } @@ -175,9 +270,7 @@ history_search_prefix (string, direction) 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; +history_search_pos (const char *string, int dir, int pos) { int ret, old; diff --git a/lib/readline/input.c b/lib/readline/input.c index b5876da..68d418c 100644 --- a/lib/readline/input.c +++ b/lib/readline/input.c @@ -1,6 +1,6 @@ /* input.c -- character input functions for readline. */ -/* Copyright (C) 1994-2009 Free Software Foundation, Inc. +/* Copyright (C) 1994-2021 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. @@ -22,6 +22,8 @@ #define READLINE_LIBRARY #if defined (__TANDEM) +# define _XOPEN_SOURCE_EXTENDED 1 +# define _TANDEM_SOURCE 1 # include #endif @@ -45,7 +47,10 @@ # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ +#include + #include "posixselect.h" +#include "posixtime.h" #if defined (FIONREAD_IN_SYS_IOCTL) # include @@ -74,17 +79,94 @@ extern int errno; # define O_NDELAY O_NONBLOCK /* Posix style */ #endif +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) +extern sigset_t _rl_orig_sigset; +#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; +/* A function to call if a read(2) is interrupted by a signal. */ +rl_hook_func_t *rl_signal_event_hook = (rl_hook_func_t *)NULL; + +/* A function to call when readline times out after a time is specified. */ +rl_hook_func_t *rl_timeout_event_hook = (rl_hook_func_t *)NULL; + +/* A function to replace _rl_input_available for applications using the + callback interface. */ +rl_hook_func_t *rl_input_available_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)); +static int ibuffer_space (void); +static int rl_get_char (int *); +static int rl_gather_tyi (void); + +/* Windows isatty returns true for every character device, including the null + device, so we need to perform additional checks. */ +#if defined (_WIN32) && !defined (__CYGWIN__) +#include +#include +#define WIN32_LEAN_AND_MEAN 1 +#include + +int +win32_isatty (int fd) +{ + if (_isatty(fd)) + { + HANDLE h; + DWORD ignored; + + if ((h = (HANDLE) _get_osfhandle (fd)) == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return 0; + } + if (GetConsoleMode (h, &ignored) != 0) + return 1; + } + errno = ENOTTY; + return 0; +} + +#define isatty(x) win32_isatty(x) +#endif + +/* Readline timeouts */ + +/* I don't know how to set a timeout for _getch() in MinGW32, so we use + SIGALRM. */ +#if (defined (HAVE_PSELECT) || defined (HAVE_SELECT)) && !defined (__MINGW32__) +# define RL_TIMEOUT_USE_SELECT +#else +# define RL_TIMEOUT_USE_SIGALRM +#endif + +int rl_set_timeout (unsigned int, unsigned int); +int rl_timeout_remaining (unsigned int *, unsigned int *); + +int _rl_timeout_init (void); +int _rl_timeout_sigalrm_handler (void); +#if defined (RL_TIMEOUT_USE_SELECT) +int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *); +#endif + +static void _rl_timeout_handle (void); +#if defined (RL_TIMEOUT_USE_SIGALRM) +static int set_alarm (unsigned int *, unsigned int *); +static void reset_alarm (void); +#endif + +/* We implement timeouts as a future time using a supplied interval + (timeout_duration) from when the timeout is set (timeout_point). + That allows us to easily determine whether the timeout has occurred + and compute the time remaining until it does. */ +static struct timeval timeout_point; +static struct timeval timeout_duration; /* **************************************************************** */ /* */ @@ -99,15 +181,21 @@ static int ibuffer_len = sizeof (ibuffer) - 1; #define any_typein (push_index != pop_index) int -_rl_any_typein () +_rl_any_typein (void) { return any_typein; } +int +_rl_pushed_input_available (void) +{ + return (push_index != pop_index); +} + /* Return the amount of space available in the buffer for stuffing characters. */ static int -ibuffer_space () +ibuffer_space (void) { if (pop_index > push_index) return (pop_index - push_index - 1); @@ -117,10 +205,9 @@ ibuffer_space () /* 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. */ + Result is non-zero if there was a key, or 0 if there wasn't. */ static int -rl_get_char (key) - int *key; +rl_get_char (int *key) { if (push_index == pop_index) return (0); @@ -140,8 +227,7 @@ rl_get_char (key) Returns non-zero if successful, zero if there is no space left in the buffer. */ int -_rl_unget_char (key) - int key; +_rl_unget_char (int key) { if (ibuffer_space ()) { @@ -154,47 +240,48 @@ _rl_unget_char (key) 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 () +rl_gather_tyi (void) { int tty; register int tem, result; int chars_avail, k; char input; -#if defined(HAVE_SELECT) +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) fd_set readfds, exceptfds; struct timeval timeout; #endif chars_avail = 0; + input = 0; tty = fileno (rl_instream); -#if defined (HAVE_SELECT) +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) FD_ZERO (&readfds); FD_ZERO (&exceptfds); FD_SET (tty, &readfds); FD_SET (tty, &exceptfds); USEC_TO_TIMEVAL (_keyboard_input_timeout, timeout); +#if defined (RL_TIMEOUT_USE_SELECT) + result = _rl_timeout_select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout, NULL); +#else result = select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout); +#endif if (result <= 0) return 0; /* Nothing to read. */ #endif result = -1; -#if defined (FIONREAD) errno = 0; +#if defined (FIONREAD) result = ioctl (tty, FIONREAD, &chars_avail); if (result == -1 && errno == EIO) return -1; + if (result == -1) + chars_avail = 0; #endif #if defined (O_NDELAY) @@ -208,6 +295,8 @@ rl_gather_tyi () fcntl (tty, F_SETFL, tem); if (chars_avail == -1 && errno == EAGAIN) return 0; + if (chars_avail == -1 && errno == EIO) + return -1; if (chars_avail == 0) /* EOF */ { rl_stuff_char (EOF); @@ -262,8 +351,7 @@ rl_gather_tyi () } int -rl_set_keyboard_input_timeout (u) - int u; +rl_set_keyboard_input_timeout (int u) { int o; @@ -280,27 +368,33 @@ rl_set_keyboard_input_timeout (u) the user, it should use _rl_input_queued(timeout_value_in_microseconds) instead. */ int -_rl_input_available () +_rl_input_available (void) { -#if defined(HAVE_SELECT) +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) fd_set readfds, exceptfds; struct timeval timeout; #endif -#if !defined (HAVE_SELECT) && defined(FIONREAD) +#if !defined (HAVE_SELECT) && defined (FIONREAD) int chars_avail; #endif int tty; + if (rl_input_available_hook) + return (*rl_input_available_hook) (); + tty = fileno (rl_instream); -#if defined (HAVE_SELECT) +#if defined (HAVE_PSELECT) || 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; + USEC_TO_TIMEVAL (_keyboard_input_timeout, timeout); +# if defined (RL_TIMEOUT_USE_SELECT) + return (_rl_timeout_select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout, NULL) > 0); +# else return (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) > 0); +# endif #else #if defined (FIONREAD) @@ -319,8 +413,25 @@ _rl_input_available () } int -_rl_input_queued (t) - int t; +_rl_nchars_available () +{ + int chars_avail, fd, result; + + chars_avail = 0; + +#if defined (FIONREAD) + fd = fileno (rl_instream); + errno = 0; + result = ioctl (fd, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; +#endif + + return chars_avail; +} + +int +_rl_input_queued (int t) { int old_timeout, r; @@ -331,8 +442,7 @@ _rl_input_queued (t) } void -_rl_insert_typein (c) - int c; +_rl_insert_typein (int c) { int key, t, i; char *string; @@ -357,8 +467,7 @@ _rl_insert_typein (c) /* 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; +rl_stuff_char (int key) { if (ibuffer_space () == 0) return 0; @@ -382,8 +491,7 @@ rl_stuff_char (key) /* Make C be the next command to be executed. */ int -rl_execute_next (c) - int c; +rl_execute_next (int c) { rl_pending_input = c; RL_SETSTATE (RL_STATE_INPUTPENDING); @@ -392,13 +500,249 @@ rl_execute_next (c) /* Clear any pending input pushed with rl_execute_next() */ int -rl_clear_pending_input () +rl_clear_pending_input (void) { rl_pending_input = 0; RL_UNSETSTATE (RL_STATE_INPUTPENDING); return 0; } +/* **************************************************************** */ +/* */ +/* Timeout utility */ +/* */ +/* **************************************************************** */ + +#if defined (RL_TIMEOUT_USE_SIGALRM) +# if defined (HAVE_SETITIMER) + +static int +set_alarm (unsigned int *secs, unsigned int *usecs) +{ + struct itimerval it; + + timerclear (&it.it_interval); + timerset (&it.it_value, *secs, *usecs); + return setitimer (ITIMER_REAL, &it, NULL); +} + +static void +reset_alarm () +{ + struct itimerval it; + + timerclear (&it.it_interval); + timerclear (&it.it_value); + setitimer (ITIMER_REAL, &it, NULL); +} +# else +static int +set_alarm (unsigned int *secs, unsigned int *usecs) +{ + if (*secs == 0 || *usecs >= USEC_PER_SEC / 2) + (*secs)++; + *usecs = 0; + + return alarm (*secs); +} +static void +reset_alarm () +{ + alarm (0); +} +# endif +#endif + +/* Set a timeout which will be used for the next call of `readline + ()'. When (0, 0) are specified the timeout is cleared. */ +int +rl_set_timeout (unsigned int secs, unsigned int usecs) +{ + timeout_duration.tv_sec = secs + usecs / USEC_PER_SEC; + timeout_duration.tv_usec = usecs % USEC_PER_SEC; + + return 0; +} + +/* Start measuring the time. Returns 0 on success. Returns -1 on + error. */ +int +_rl_timeout_init (void) +{ + unsigned int secs, usecs; + + /* Clear the timeout state of the previous edit */ + RL_UNSETSTATE(RL_STATE_TIMEOUT); + timerclear (&timeout_point); + + /* Return 0 when timeout is unset. */ + if (timerisunset (&timeout_duration)) + return 0; + + /* Return -1 on gettimeofday error. */ + if (gettimeofday(&timeout_point, 0) != 0) + { + timerclear (&timeout_point); + return -1; + } + + secs = timeout_duration.tv_sec; + usecs = timeout_duration.tv_usec; + +#if defined (RL_TIMEOUT_USE_SIGALRM) + /* If select(2)/pselect(2) is unavailable, use SIGALRM. */ + if (set_alarm (&secs, &usecs) < 0) + return -1; +#endif + + timeout_point.tv_sec += secs; + timeout_point.tv_usec += usecs; + if (timeout_point.tv_usec >= USEC_PER_SEC) + { + timeout_point.tv_sec++; + timeout_point.tv_usec -= USEC_PER_SEC; + } + + return 0; +} + +/* Get the remaining time until the scheduled timeout. Returns -1 on + error or no timeout set with secs and usecs unchanged. Returns 0 + on an expired timeout with secs and usecs unchanged. Returns 1 + when the timeout has not yet expired. The remaining time is stored + in secs and usecs. When NULL is specified to either of the + arguments, just the expiration is tested. */ +int +rl_timeout_remaining (unsigned int *secs, unsigned int *usecs) +{ + struct timeval current_time; + + /* Return -1 when timeout is unset. */ + if (timerisunset (&timeout_point)) + { + errno = 0; + return -1; + } + + /* Return -1 on error. errno is set by gettimeofday. */ + if (gettimeofday(¤t_time, 0) != 0) + return -1; + + /* Return 0 when timeout has already expired. */ + /* could use timercmp (&timeout_point, ¤t_time, <) here */ + if (current_time.tv_sec > timeout_point.tv_sec || + (current_time.tv_sec == timeout_point.tv_sec && + current_time.tv_usec >= timeout_point.tv_usec)) + return 0; + + if (secs && usecs) + { + *secs = timeout_point.tv_sec - current_time.tv_sec; + *usecs = timeout_point.tv_usec - current_time.tv_usec; + if (timeout_point.tv_usec < current_time.tv_usec) + { + (*secs)--; + *usecs += USEC_PER_SEC; + } + } + + return 1; +} + +/* This should only be called if RL_TIMEOUT_USE_SELECT is defined. */ + +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) +int +_rl_timeout_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout, const sigset_t *sigmask) +{ + int result; +#if defined (HAVE_PSELECT) + struct timespec ts; +#else + sigset_t origmask; + struct timeval tv; +#endif + int tmout_status; + struct timeval tmout; + unsigned int sec, usec; + + /* When the remaining time for rl_timeout is shorter than the + keyboard input timeout, replace `timeout' with the remaining time + for `rl_timeout' and set `tmout_status = 1'. */ + tmout_status = rl_timeout_remaining (&sec, &usec); + tmout.tv_sec = sec; + tmout.tv_usec = usec; + + if (tmout_status == 0) + _rl_timeout_handle (); + else if (tmout_status == 1) + { + if (timeout == NULL || timercmp (&tmout, timeout, <)) + timeout = &tmout; + else + tmout_status = -1; + } + +#if defined (HAVE_PSELECT) + if (timeout) + { + TIMEVAL_TO_TIMESPEC (timeout, &ts); + result = pselect (nfds, readfds, writefds, exceptfds, &ts, sigmask); + } + else + result = pselect (nfds, readfds, writefds, exceptfds, NULL, sigmask); +#else + if (sigmask) + sigprocmask (SIG_SETMASK, sigmask, &origmask); + + if (timeout) + { + tv.tv_sec = timeout->tv_sec; + tv.tv_usec = timeout->tv_usec; + result = select (nfds, readfds, writefds, exceptfds, &tv); + } + else + result = select (nfds, readfds, writefds, exceptfds, NULL); + + if (sigmask) + sigprocmask (SIG_SETMASK, &origmask, NULL); +#endif + + if (tmout_status == 1 && result == 0) + _rl_timeout_handle (); + + return result; +} +#endif + +static void +_rl_timeout_handle () +{ + if (rl_timeout_event_hook) + (*rl_timeout_event_hook) (); + + RL_SETSTATE(RL_STATE_TIMEOUT); + _rl_abort_internal (); +} + +int +_rl_timeout_handle_sigalrm () +{ +#if defined (RL_TIMEOUT_USE_SIGALRM) + if (timerisunset (&timeout_point)) + return -1; + + /* Reset `timeout_point' to the current time to ensure that later + calls of `rl_timeout_pending ()' return 0 (timeout expired). */ + if (gettimeofday(&timeout_point, 0) != 0) + timerclear (&timeout_point); + + reset_alarm (); + + _rl_timeout_handle (); +#endif + return -1; +} /* **************************************************************** */ /* */ /* Character Input */ @@ -407,43 +751,49 @@ rl_clear_pending_input () /* Read a key, including pending input. */ int -rl_read_key () +rl_read_key (void) { - int c; - - rl_key_sequence_length++; + int c, r; if (rl_pending_input) { - c = rl_pending_input; + c = rl_pending_input; /* XXX - cast to unsigned char if > 0? */ rl_clear_pending_input (); } else { /* If input is coming from a macro, then use that. */ if (c = _rl_next_macro_key ()) - return (c); + return ((unsigned char)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) + while (rl_event_hook) { - (*rl_event_hook) (); - RL_CHECK_SIGNALS (); - if (rl_done) /* XXX - experimental */ - return ('\n'); - if (rl_gather_tyi () < 0) /* XXX - EIO */ + if (rl_get_char (&c) != 0) + break; + + if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ { rl_done = 1; - return ('\n'); + RL_SETSTATE (RL_STATE_DONE); + return (errno == EIO ? (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF) : '\n'); } + else if (r > 0) /* read something */ + continue; + + RL_CHECK_SIGNALS (); + if (rl_done) /* XXX - experimental */ + return ('\n'); + (*rl_event_hook) (); } } else { if (rl_get_char (&c) == 0) c = (*rl_getc_function) (rl_instream); +/* fprintf(stderr, "rl_read_key: calling RL_CHECK_SIGNALS: _rl_caught_signal = %d\r\n", _rl_caught_signal); */ RL_CHECK_SIGNALS (); } } @@ -452,21 +802,45 @@ rl_read_key () } int -rl_getc (stream) - FILE *stream; +rl_getc (FILE *stream) { int result; unsigned char c; + int fd; +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + sigset_t empty_set; + fd_set readfds; +#endif + fd = fileno (stream); while (1) { RL_CHECK_SIGNALS (); + /* We know at this point that _rl_caught_signal == 0 */ + #if defined (__MINGW32__) - if (isatty (fileno (stream))) - return (getch ()); + if (isatty (fd) + return (_getch ()); /* "There is no error return." */ +#endif + result = 0; +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + /* At this point, if we have pselect, we're using select/pselect for the + timeouts. We handled MinGW above. */ + FD_ZERO (&readfds); + FD_SET (fd, &readfds); +# if defined (HANDLE_SIGNALS) + result = _rl_timeout_select (fd + 1, &readfds, NULL, NULL, NULL, &_rl_orig_sigset); +# else + sigemptyset (&empty_set); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &empty_set); + result = _rl_timeout_select (fd + 1, &readfds, NULL, NULL, NULL, &empty_set); +# endif /* HANDLE_SIGNALS */ + if (result == 0) + _rl_timeout_handle (); /* check the timeout */ #endif - result = read (fileno (stream), &c, sizeof (unsigned char)); + if (result >= 0) + result = read (fd, &c, sizeof (unsigned char)); if (result == sizeof (unsigned char)) return (c); @@ -495,7 +869,7 @@ rl_getc (stream) if (errno == X_EWOULDBLOCK || errno == X_EAGAIN) { - if (sh_unset_nodelay_mode (fileno (stream)) < 0) + if (sh_unset_nodelay_mode (fd) < 0) return (EOF); continue; } @@ -503,24 +877,62 @@ rl_getc (stream) #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. */ +/* fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); */ + +handle_error: + /* If the error that we received was EINTR, then try again, + this is simply an interrupted system call to read (). We allow + the read to be interrupted if we caught SIGHUP, SIGTERM, or any + of the other signals readline treats specially. If the + application sets an event hook, call it for other signals. + Otherwise (not EINTR), some error occurred, also signifying EOF. */ if (errno != EINTR) return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); + /* fatal signals of interest */ +#if defined (SIGHUP) + else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM) +#else + else if (_rl_caught_signal == SIGTERM) +#endif + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); + /* keyboard-generated signals of interest */ +#if defined (SIGQUIT) + else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT) +#else + else if (_rl_caught_signal == SIGINT) +#endif + RL_CHECK_SIGNALS (); +#if defined (SIGTSTP) + else if (_rl_caught_signal == SIGTSTP) + RL_CHECK_SIGNALS (); +#endif + /* non-keyboard-generated signals of interest */ +#if defined (SIGWINCH) + else if (_rl_caught_signal == SIGWINCH) + RL_CHECK_SIGNALS (); +#endif /* SIGWINCH */ +#if defined (SIGALRM) + else if (_rl_caught_signal == SIGALRM +# if defined (SIGVTALRM) + || _rl_caught_signal == SIGVTALRM +# endif + ) + RL_CHECK_SIGNALS (); +#endif /* SIGALRM */ + + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); } } #if defined (HANDLE_MULTIBYTE) /* read multibyte char */ int -_rl_read_mbchar (mbchar, size) - char *mbchar; - int size; +_rl_read_mbchar (char *mbchar, int size) { int mb_len, c; size_t mbchar_bytes_length; - wchar_t wc; + WCHAR_T wc; mbstate_t ps, ps_back; memset(&ps, 0, sizeof (mbstate_t)); @@ -529,16 +941,14 @@ _rl_read_mbchar (mbchar, size) mb_len = 0; while (mb_len < size) { - RL_SETSTATE(RL_STATE_MOREINPUT); - c = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); + c = (mb_len == 0) ? _rl_bracketed_read_key () : rl_read_key (); if (c < 0) break; mbchar[mb_len++] = c; - mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); + 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)) @@ -565,12 +975,9 @@ _rl_read_mbchar (mbchar, size) 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; +_rl_read_mbstring (int first, char *mb, int mlen) { - int i, c; + int i, c, n; mbstate_t ps; c = first; @@ -579,7 +986,8 @@ _rl_read_mbstring (first, mb, mlen) { mb[i] = (char)c; memset (&ps, 0, sizeof (mbstate_t)); - if (_rl_get_char_len (mb, &ps) == -2) + n = _rl_get_char_len (mb, &ps); + if (n == -2) { /* Read more for multibyte character */ RL_SETSTATE (RL_STATE_MOREINPUT); diff --git a/lib/readline/isearch.c b/lib/readline/isearch.c index f3f46a7..c2d4d23 100644 --- a/lib/readline/isearch.c +++ b/lib/readline/isearch.c @@ -6,7 +6,7 @@ /* */ /* **************************************************************** */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 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. @@ -59,14 +59,10 @@ 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 (int, int); -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)); +static _rl_search_cxt *_rl_isearch_init (int); +static void _rl_isearch_fini (_rl_search_cxt *); /* 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. */ @@ -79,8 +75,7 @@ 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_scxt_alloc (int type, int flags) { _rl_search_cxt *cxt; @@ -104,10 +99,13 @@ _rl_scxt_alloc (type, flags) cxt->save_undo_list = 0; + cxt->keymap = _rl_keymap; + cxt->okeymap = _rl_keymap; + cxt->history_pos = 0; cxt->direction = 0; - cxt->lastc = 0; + cxt->prevc = cxt->lastc = 0; cxt->sline = 0; cxt->sline_len = cxt->sline_index = 0; @@ -118,9 +116,7 @@ _rl_scxt_alloc (type, flags) } void -_rl_scxt_dispose (cxt, flags) - _rl_search_cxt *cxt; - int flags; +_rl_scxt_dispose (_rl_search_cxt *cxt, int flags) { FREE (cxt->search_string); FREE (cxt->allocated_line); @@ -132,8 +128,7 @@ _rl_scxt_dispose (cxt, flags) /* 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; +rl_reverse_search_history (int sign, int key) { return (rl_search_history (-sign, key)); } @@ -141,8 +136,7 @@ rl_reverse_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; +rl_forward_search_history (int sign, int key) { return (rl_search_history (sign, key)); } @@ -153,16 +147,14 @@ rl_forward_search_history (sign, key) 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; +rl_display_search (char *search_string, int flags, int where) { char *message; int msglen, searchlen; searchlen = (search_string && *search_string) ? strlen (search_string) : 0; - message = (char *)xmalloc (searchlen + 33); + message = (char *)xmalloc (searchlen + 64); msglen = 0; #if defined (NOTDEF) @@ -175,7 +167,13 @@ rl_display_search (search_string, reverse_p, where) message[msglen++] = '('; - if (reverse_p) + if (flags & SF_FAILED) + { + strcpy (message + msglen, "failed "); + msglen += 7; + } + + if (flags & SF_REVERSE) { strcpy (message + msglen, "reverse-"); msglen += 8; @@ -184,22 +182,26 @@ rl_display_search (search_string, reverse_p, where) strcpy (message + msglen, "i-search)`"); msglen += 10; - if (search_string) + if (search_string && *search_string) { strcpy (message + msglen, search_string); msglen += searchlen; } + else + _rl_optimize_redisplay (); strcpy (message + msglen, "': "); rl_message ("%s", message); xfree (message); +#if 0 + /* rl_message calls this */ (*rl_redisplay_function) (); +#endif } static _rl_search_cxt * -_rl_isearch_init (direction) - int direction; +_rl_isearch_init (int direction) { _rl_search_cxt *cxt; register int i; @@ -212,7 +214,7 @@ _rl_isearch_init (direction) 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. */ + /* Create an array of pointers to the lines that we want to search. */ hlist = history_list (); rl_maybe_replace_line (); i = 0; @@ -255,15 +257,17 @@ _rl_isearch_init (direction) _rl_iscxt = cxt; /* save globally */ + /* experimental right now */ + _rl_init_executing_keyseq (); + return cxt; } static void -_rl_isearch_fini (cxt) - _rl_search_cxt *cxt; +_rl_isearch_fini (_rl_search_cxt *cxt) { /* First put back the original state. */ - strcpy (rl_line_buffer, cxt->lines[cxt->save_line]); + rl_replace_line (cxt->lines[cxt->save_line], 0); rl_restore_prompt (); @@ -272,6 +276,8 @@ _rl_isearch_fini (cxt) last_isearch_string = cxt->search_string; last_isearch_string_len = cxt->search_string_index; cxt->search_string = 0; + cxt->search_string_size = 0; + cxt->search_string_index = 0; if (cxt->last_found_line < cxt->save_line) rl_get_previous_history (cxt->save_line - cxt->last_found_line, 0); @@ -288,18 +294,24 @@ _rl_isearch_fini (cxt) else cxt->sline_index = strlen (rl_line_buffer); rl_mark = cxt->save_mark; + rl_deactivate_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. */ + and rl_get_next_history take care of it. + If we want to highlight the search string, this is where to set the + point and mark to do it. */ + _rl_fix_point (0); + rl_deactivate_mark (); +/* _rl_optimize_redisplay (); */ rl_clear_message (); } +/* XXX - we could use _rl_bracketed_read_mbstring () here. */ int -_rl_search_getchar (cxt) - _rl_search_cxt *cxt; +_rl_search_getchar (_rl_search_cxt *cxt) { int c; @@ -309,22 +321,29 @@ _rl_search_getchar (cxt) RL_UNSETSTATE(RL_STATE_MOREINPUT); #if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + /* This ends up with C (and LASTC) being set to the last byte of the + multibyte character. In most cases c == lastc == mb[0] */ + if (c >= 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) c = cxt->lastc = _rl_read_mbstring (cxt->lastc, cxt->mb, MB_LEN_MAX); #endif + RL_CHECK_SIGNALS (); return c; } +#define ENDSRCH_CHAR(c) \ + ((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G'))) + /* 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; +_rl_isearch_dispatch (_rl_search_cxt *cxt, int c) { - int n, wstart, wlen, limit, cval; + int n, wstart, wlen, limit, cval, incr; + char *paste; + size_t pastelen; + int j; rl_command_func_t *f; f = (rl_command_func_t *)NULL; @@ -336,10 +355,81 @@ _rl_isearch_dispatch (cxt, c) return -1; } + _rl_add_executing_keyseq (c); + + /* XXX - experimental code to allow users to bracketed-paste into the search + string even when ESC is one of the isearch-terminators. Not perfect yet. */ + if (_rl_enable_bracketed_paste && c == ESC && strchr (cxt->search_terminators, c) && (n = _rl_nchars_available ()) > (BRACK_PASTE_SLEN-1)) + { + j = _rl_read_bracketed_paste_prefix (c); + if (j == 1) + { + cxt->lastc = -7; /* bracketed paste, see below */ + goto opcode_dispatch; + } + else if (_rl_pushed_input_available ()) /* eat extra char we pushed back */ + c = cxt->lastc = rl_read_key (); + else + c = cxt->lastc; /* last ditch */ + } + + /* If we are moving into a new keymap, modify cxt->keymap and go on. + This can be a problem if c == ESC and we want to terminate the + incremental search, so we check */ + if (c >= 0 && cxt->keymap[c].type == ISKMAP && strchr (cxt->search_terminators, cxt->lastc) == 0) + { + /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued + takes microseconds, so multiply by 1000. If we don't get any + additional input and this keymap shadows another function, process + that key as if it was all we read. */ + if (_rl_keyseq_timeout > 0 && + RL_ISSTATE (RL_STATE_CALLBACK) == 0 && + RL_ISSTATE (RL_STATE_INPUTPENDING) == 0 && + _rl_pushed_input_available () == 0 && + ((Keymap)(cxt->keymap[c].function))[ANYOTHERKEY].function && + _rl_input_queued (_rl_keyseq_timeout*1000) == 0) + goto add_character; + + cxt->okeymap = cxt->keymap; + cxt->keymap = FUNCTION_TO_KEYMAP (cxt->keymap, c); + cxt->sflags |= SF_CHGKMAP; + /* XXX - we should probably save this sequence, so we can do + something useful if this doesn't end up mapping to a command we + interpret here. Right now we just save the most recent character + that caused the index into a new keymap. */ + cxt->prevc = c; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + if (cxt->mb[1] == 0) + { + cxt->pmb[0] = c; /* XXX should be == cxt->mb[0] */ + cxt->pmb[1] = '\0'; + } + else + memcpy (cxt->pmb, cxt->mb, sizeof (cxt->pmb)); + } +#endif + return 1; + } + +add_character: + /* Translate the keys we do something with to opcodes. */ - if (c >= 0 && _rl_keymap[c].type == ISFUNC) + if (c >= 0 && cxt->keymap[c].type == ISFUNC) { - f = _rl_keymap[c].function; + /* If we have a multibyte character, see if it's bound to something that + affects the search. */ +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && cxt->mb[1]) + f = rl_function_of_keyseq (cxt->mb, cxt->keymap, (int *)NULL); + else +#endif + { + f = cxt->keymap[c].function; + if (f == rl_do_lowercase_version) + f = cxt->keymap[_rl_to_lower (c)].function; + } if (f == rl_reverse_search_history) cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2; @@ -347,19 +437,82 @@ _rl_isearch_dispatch (cxt, c) cxt->lastc = (cxt->sflags & SF_REVERSE) ? -2 : -1; else if (f == rl_rubout) cxt->lastc = -3; - else if (c == CTRL ('G')) + else if (c == CTRL ('G') || f == rl_abort) cxt->lastc = -4; - else if (c == CTRL ('W')) /* XXX */ + else if (c == CTRL ('W') || f == rl_unix_word_rubout) /* XXX */ cxt->lastc = -5; - else if (c == CTRL ('Y')) /* XXX */ + else if (c == CTRL ('Y') || f == rl_yank) /* XXX */ cxt->lastc = -6; + else if (f == rl_bracketed_paste_begin) + cxt->lastc = -7; + } + + /* If we changed the keymap earlier while translating a key sequence into + a command, restore it now that we've succeeded. */ + if (cxt->sflags & SF_CHGKMAP) + { + cxt->keymap = cxt->okeymap; + cxt->sflags &= ~SF_CHGKMAP; + /* If we indexed into a new keymap, but didn't map to a command that + affects the search (lastc > 0), and the character that mapped to a + new keymap would have ended the search (ENDSRCH_CHAR(cxt->prevc)), + handle that now as if the previous char would have ended the search + and we would have read the current character. */ + /* XXX - should we check cxt->mb? */ + if (cxt->lastc > 0 && ENDSRCH_CHAR (cxt->prevc)) + { + rl_stuff_char (cxt->lastc); + rl_execute_next (cxt->prevc); + /* XXX - do we insert everything in cxt->pmb? */ + return (0); + } + /* Otherwise, if the current character is mapped to self-insert or + nothing (i.e., not an editing command), and the previous character + was a keymap index, then we need to insert both the previous + character and the current character into the search string. */ + else if (cxt->lastc > 0 && cxt->prevc > 0 && + cxt->keymap[cxt->prevc].type == ISKMAP && + (f == 0 || f == rl_insert)) + { + /* Make lastc be the next character read */ + /* XXX - do we insert everything in cxt->mb? */ + rl_execute_next (cxt->lastc); + /* Dispatch on the previous character (insert into search string) */ + cxt->lastc = cxt->prevc; +#if defined (HANDLE_MULTIBYTE) + /* Have to overwrite cxt->mb here because dispatch uses it below */ + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + if (cxt->pmb[1] == 0) + { + cxt->mb[0] = cxt->lastc; /* == cxt->prevc */ + cxt->mb[1] = '\0'; + } + else + memcpy (cxt->mb, cxt->pmb, sizeof (cxt->mb)); + } +#endif + cxt->prevc = 0; + } + else if (cxt->lastc > 0 && cxt->prevc > 0 && f && f != rl_insert) + { + _rl_term_executing_keyseq (); /* should this go in the caller? */ + + _rl_pending_command.map = cxt->keymap; + _rl_pending_command.count = 1; /* XXX */ + _rl_pending_command.key = cxt->lastc; + _rl_pending_command.func = f; + _rl_command_to_execute = &_rl_pending_command; + + return (0); + } } /* 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)) + if (cxt->lastc > 0 && 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 @@ -370,14 +523,11 @@ _rl_isearch_dispatch (cxt, c) 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 ()) + if (cxt->lastc == ESC && (_rl_pushed_input_available () || _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) { @@ -399,6 +549,9 @@ _rl_isearch_dispatch (cxt, c) return (0); } + _rl_init_executing_keyseq (); + +opcode_dispatch: /* Now dispatch on the character. `Opcodes' affect the search string or state. Other characters are added to the string. */ switch (cxt->lastc) @@ -413,12 +566,13 @@ _rl_isearch_dispatch (cxt, c) 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); + rl_display_search (cxt->search_string, cxt->sflags, -1); break; } + /* XXX - restore keymap here? */ return (1); } - else if (cxt->sflags & SF_REVERSE) + else if ((cxt->sflags & SF_REVERSE) && cxt->sline_index >= 0) cxt->sline_index--; else if (cxt->sline_index != cxt->sline_len) cxt->sline_index++; @@ -443,17 +597,31 @@ _rl_isearch_dispatch (cxt, c) do until we have a real isearch-undo. */ if (cxt->search_string_index == 0) rl_ding (); - else + else if (MB_CUR_MAX == 1 || rl_byte_oriented) cxt->search_string[--cxt->search_string_index] = '\0'; + else + { + wstart = _rl_find_prev_mbchar (cxt->search_string, cxt->search_string_index, MB_FIND_NONZERO); + if (wstart >= 0) + cxt->search_string[cxt->search_string_index = wstart] = '\0'; + else + cxt->search_string[cxt->search_string_index = 0] = '\0'; + } + + if (cxt->search_string_index == 0) + rl_ding (); + 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_deactivate_mark (); rl_restore_prompt(); rl_clear_message (); + _rl_fix_point (1); /* in case save_line and save_point are out of sync */ return -1; case -5: /* C-W */ @@ -510,29 +678,64 @@ _rl_isearch_dispatch (cxt, c) cxt->search_string[cxt->search_string_index] = '\0'; break; + case -7: /* bracketed paste */ + paste = _rl_bracketed_text (&pastelen); + if (paste == 0 || *paste == 0) + { + xfree (paste); + break; + } + if (_rl_enable_active_region) + rl_activate_mark (); + if (cxt->search_string_index + pastelen + 1 >= cxt->search_string_size) + { + cxt->search_string_size += pastelen + 2; + cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); + } + memcpy (cxt->search_string + cxt->search_string_index, paste, pastelen); + cxt->search_string_index += pastelen; + cxt->search_string[cxt->search_string_index] = '\0'; + xfree (paste); + break; + /* Add character to search string and continue search. */ default: - if (cxt->search_string_index + 2 >= cxt->search_string_size) +#if defined (HANDLE_MULTIBYTE) + wlen = (cxt->mb[0] == 0 || cxt->mb[1] == 0) ? 1 : RL_STRLEN (cxt->mb); +#else + wlen = 1; +#endif + if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size) { - cxt->search_string_size += 128; + cxt->search_string_size += 128; /* 128 much greater than MB_CUR_MAX */ 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++]; + int j; + + if (cxt->mb[0] == 0 || cxt->mb[1] == 0) + cxt->search_string[cxt->search_string_index++] = cxt->mb[0]; + else + for (j = 0; j < wlen; ) + 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++] = cxt->lastc; /* XXX - was c instead of lastc */ cxt->search_string[cxt->search_string_index] = '\0'; break; } for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; ) { + if (cxt->search_string_index == 0) + { + cxt->sflags |= SF_FAILED; + break; + } + limit = cxt->sline_len - cxt->search_string_index + 1; /* Search the current line. */ @@ -545,6 +748,12 @@ _rl_isearch_dispatch (cxt, c) } else cxt->sline_index += cxt->direction; + + if (cxt->sline_index < 0) + { + cxt->sline_index = 0; + break; + } } if (cxt->sflags & SF_FOUND) break; @@ -572,17 +781,27 @@ _rl_isearch_dispatch (cxt, c) (cxt->search_string_index > cxt->sline_len)); if (cxt->sflags & SF_FAILED) - break; + { + /* XXX - reset sline_index if < 0 */ + if (cxt->sline_index < 0) + cxt->sline_index = 0; + break; + } /* Now set up the line for searching... */ cxt->sline_index = (cxt->sflags & SF_REVERSE) ? cxt->sline_len - cxt->search_string_index : 0; } + /* reset the keymaps for the next time through the loop */ + cxt->keymap = cxt->okeymap = _rl_keymap; + if (cxt->sflags & SF_FAILED) { /* We cannot find the search string. Ding the bell. */ rl_ding (); cxt->history_pos = cxt->last_found_line; + rl_deactivate_mark (); + rl_display_search (cxt->search_string, cxt->sflags, (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos); return 1; } @@ -593,18 +812,20 @@ _rl_isearch_dispatch (cxt, c) { cxt->prev_line_found = cxt->lines[cxt->history_pos]; rl_replace_line (cxt->lines[cxt->history_pos], 0); + if (_rl_enable_active_region) + rl_activate_mark (); rl_point = cxt->sline_index; + if (rl_mark_active_p () && cxt->search_string_index > 0) + rl_mark = rl_point + cxt->search_string_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); + rl_display_search (cxt->search_string, cxt->sflags, (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; +int +_rl_isearch_cleanup (_rl_search_cxt *cxt, int r) { if (r >= 0) _rl_isearch_fini (cxt); @@ -621,8 +842,7 @@ _rl_isearch_cleanup (cxt, r) 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_history (int direction, int invoking_key) { _rl_search_cxt *cxt; /* local for now, but saved globally */ int c, r; @@ -630,7 +850,7 @@ rl_search_history (direction, invoking_key) RL_SETSTATE(RL_STATE_ISEARCH); cxt = _rl_isearch_init (direction); - rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1); + rl_display_search (cxt->search_string, cxt->sflags, -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. */ @@ -660,8 +880,7 @@ rl_search_history (direction, invoking_key) 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; +_rl_isearch_callback (_rl_search_cxt *cxt) { int c, r; diff --git a/lib/readline/keymaps.c b/lib/readline/keymaps.c index 9379dec..4ade30b 100644 --- a/lib/readline/keymaps.c +++ b/lib/readline/keymaps.c @@ -1,6 +1,6 @@ /* keymaps.c -- Functions and keymaps for the GNU Readline library. */ -/* Copyright (C) 1988,1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1988,1989-2009,2017 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. @@ -54,7 +54,7 @@ /* Return a new, empty keymap. Free it with free() when you are done. */ Keymap -rl_make_bare_keymap () +rl_make_bare_keymap (void) { register int i; Keymap keymap; @@ -77,11 +77,25 @@ rl_make_bare_keymap () return (keymap); } +/* A convenience function that returns 1 if there are no keys bound to + functions in KEYMAP */ +int +rl_empty_keymap (Keymap keymap) +{ + int i; + + for (i = 0; i < ANYOTHERKEY; i++) + { + if (keymap[i].type != ISFUNC || keymap[i].function) + return 0; + } + return 1; +} + /* 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; +rl_copy_keymap (Keymap map) { register int i; Keymap temp; @@ -99,7 +113,7 @@ rl_copy_keymap (map) the uppercase Meta characters bound to run their lowercase equivalents, and the Meta digits bound to produce numeric arguments. */ Keymap -rl_make_keymap () +rl_make_keymap (void) { register int i; Keymap newmap; @@ -125,8 +139,7 @@ rl_make_keymap () /* Free the storage associated with MAP. */ void -rl_discard_keymap (map) - Keymap map; +rl_discard_keymap (Keymap map) { int i; @@ -142,11 +155,11 @@ rl_discard_keymap (map) case ISKMAP: rl_discard_keymap ((Keymap)map[i].function); - free ((char *)map[i].function); + xfree ((char *)map[i].function); break; case ISMACR: - free ((char *)map[i].function); + xfree ((char *)map[i].function); break; } } @@ -154,9 +167,8 @@ rl_discard_keymap (map) /* Convenience function that discards, then frees, MAP. */ void -rl_free_keymap (map) - Keymap map; +rl_free_keymap (Keymap map) { rl_discard_keymap (map); - free ((char *)map); + xfree ((char *)map); } diff --git a/lib/readline/keymaps.h b/lib/readline/keymaps.h index 6c4611d..2903814 100644 --- a/lib/readline/keymaps.h +++ b/lib/readline/keymaps.h @@ -1,6 +1,6 @@ /* keymaps.h -- Manipulation of readline keymaps. */ -/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1987, 1989, 1992-2021 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. @@ -52,11 +52,6 @@ typedef struct _keymap_entry { #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; @@ -70,30 +65,33 @@ 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)); +extern Keymap rl_make_bare_keymap (void); /* Return a new keymap which is a copy of MAP. */ -extern Keymap rl_copy_keymap PARAMS((Keymap)); +extern Keymap rl_copy_keymap (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)); +extern Keymap rl_make_keymap (void); /* Free the storage associated with a keymap. */ -extern void rl_discard_keymap PARAMS((Keymap)); +extern void rl_discard_keymap (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 *)); +extern Keymap rl_get_keymap_by_name (const char *); /* Return the current keymap. */ -extern Keymap rl_get_keymap PARAMS((void)); +extern Keymap rl_get_keymap (void); /* Set the current keymap to MAP. */ -extern void rl_set_keymap PARAMS((Keymap)); +extern void rl_set_keymap (Keymap); + +/* Set the name of MAP to NAME */ +extern int rl_set_keymap_name (const char *, Keymap); #ifdef __cplusplus } diff --git a/lib/readline/kill.c b/lib/readline/kill.c index a4d6d14..4cf933b 100644 --- a/lib/readline/kill.c +++ b/lib/readline/kill.c @@ -1,6 +1,6 @@ /* kill.c -- kill ring management. */ -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994-2021 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. @@ -70,16 +70,15 @@ 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)); +static int _rl_copy_to_kill_ring (char *, int); +static int region_kill_internal (int); +static int _rl_copy_word_as_kill (int, int); +static int rl_yank_nth_arg_internal (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; +rl_set_retained_kills (int num) { return 0; } @@ -89,15 +88,13 @@ rl_set_retained_kills (num) 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; +_rl_copy_to_kill_ring (char *text, int append) { char *old, *new; int slot; /* First, find the slot to work with. */ - if (_rl_last_command_was_kill == 0) + if (_rl_last_command_was_kill == 0 || rl_kill_ring == 0) { /* Get a new slot. */ if (rl_kill_ring == 0) @@ -122,7 +119,7 @@ _rl_copy_to_kill_ring (text, append) else { slot = rl_kill_ring_length += 1; - rl_kill_ring = (char **)xrealloc (rl_kill_ring, slot * sizeof (char *)); + rl_kill_ring = (char **)xrealloc (rl_kill_ring, (slot + 1) * sizeof (char *)); } rl_kill_ring[--slot] = (char *)NULL; } @@ -131,7 +128,7 @@ _rl_copy_to_kill_ring (text, append) 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) + if (_rl_last_command_was_kill && rl_kill_ring[slot] && rl_editing_mode != vi_mode) { old = rl_kill_ring[slot]; new = (char *)xmalloc (1 + strlen (old) + strlen (text)); @@ -147,7 +144,7 @@ _rl_copy_to_kill_ring (text, append) strcat (new, old); } xfree (old); - free (text); + xfree (text); rl_kill_ring[slot] = new; } else @@ -163,8 +160,7 @@ _rl_copy_to_kill_ring (text, append) 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; +rl_kill_text (int from, int to) { char *text; @@ -198,8 +194,7 @@ rl_kill_text (from, to) /* Delete the word at point, saving the text in the kill ring. */ int -rl_kill_word (count, key) - int count, key; +rl_kill_word (int count, int key) { int orig_point; @@ -222,17 +217,16 @@ rl_kill_word (count, key) /* Rubout the word before point, placing it on the kill ring. */ int -rl_backward_kill_word (count, ignore) - int count, ignore; +rl_backward_kill_word (int count, int key) { int orig_point; if (count < 0) - return (rl_kill_word (-count, ignore)); + return (rl_kill_word (-count, key)); else { orig_point = rl_point; - rl_backward_word (count, ignore); + rl_backward_word (count, key); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); @@ -246,17 +240,16 @@ rl_backward_kill_word (count, ignore) /* 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; +rl_kill_line (int direction, int key) { int orig_point; if (direction < 0) - return (rl_backward_kill_line (1, ignore)); + return (rl_backward_kill_line (1, key)); else { orig_point = rl_point; - rl_end_of_line (1, ignore); + rl_end_of_line (1, key); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; @@ -269,21 +262,20 @@ rl_kill_line (direction, ignore) /* 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; +rl_backward_kill_line (int direction, int key) { int orig_point; if (direction < 0) - return (rl_kill_line (1, ignore)); + return (rl_kill_line (1, key)); else { - if (!rl_point) + if (rl_point == 0) rl_ding (); else { orig_point = rl_point; - rl_beg_of_line (1, ignore); + rl_beg_of_line (1, key); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); if (rl_editing_mode == emacs_mode) @@ -295,8 +287,7 @@ rl_backward_kill_line (direction, ignore) /* Kill the whole line, no matter where point is. */ int -rl_kill_full_line (count, ignore) - int count, ignore; +rl_kill_full_line (int count, int key) { rl_begin_undo_group (); rl_point = 0; @@ -313,8 +304,7 @@ rl_kill_full_line (count, ignore) /* 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; +rl_unix_word_rubout (int count, int key) { int orig_point; @@ -332,7 +322,7 @@ rl_unix_word_rubout (count, key) rl_point--; while (rl_point && (whitespace (rl_line_buffer[rl_point - 1]) == 0)) - rl_point--; + rl_point--; /* XXX - multibyte? */ } rl_kill_text (orig_point, rl_point); @@ -346,8 +336,7 @@ rl_unix_word_rubout (count, key) /* 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; +rl_unix_filename_rubout (int count, int key) { int orig_point, c; @@ -362,6 +351,30 @@ rl_unix_filename_rubout (count, key) while (count--) { c = rl_line_buffer[rl_point - 1]; + + /* First move backwards through whitespace */ + while (rl_point && whitespace (c)) + { + rl_point--; + c = rl_line_buffer[rl_point - 1]; + } + + /* Consume one or more slashes. */ + if (c == '/') + { + int i; + + i = rl_point - 1; + while (i > 0 && c == '/') + c = rl_line_buffer[--i]; + if (i == 0 || whitespace (c)) + { + rl_point = i + whitespace (c); + continue; /* slashes only */ + } + c = '/'; + } + while (rl_point && (whitespace (c) || c == '/')) { rl_point--; @@ -370,7 +383,7 @@ rl_unix_filename_rubout (count, key) while (rl_point && (whitespace (c) == 0) && c != '/') { - rl_point--; + rl_point--; /* XXX - multibyte? */ c = rl_line_buffer[rl_point - 1]; } } @@ -390,8 +403,7 @@ rl_unix_filename_rubout (count, key) 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; +rl_unix_line_discard (int count, int key) { if (rl_point == 0) rl_ding (); @@ -408,8 +420,7 @@ rl_unix_line_discard (count, key) /* 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; +region_kill_internal (int delete) { char *text; @@ -421,37 +432,35 @@ region_kill_internal (delete) _rl_copy_to_kill_ring (text, rl_point < rl_mark); } + _rl_fix_point (1); _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; +rl_copy_region_to_kill (int count, int key) { return (region_kill_internal (0)); } /* Kill the text between the point and mark. */ int -rl_kill_region (count, ignore) - int count, ignore; +rl_kill_region (int count, int key) { int r, npoint; npoint = (rl_point < rl_mark) ? rl_point : rl_mark; r = region_kill_internal (1); - _rl_fix_point (1); rl_point = npoint; + _rl_fix_point (1); 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; +_rl_copy_word_as_kill (int count, int dir) { int om, op, r; @@ -479,8 +488,7 @@ _rl_copy_word_as_kill (count, dir) } int -rl_copy_forward_word (count, key) - int count, key; +rl_copy_forward_word (int count, int key) { if (count < 0) return (rl_copy_backward_word (-count, key)); @@ -489,8 +497,7 @@ rl_copy_forward_word (count, key) } int -rl_copy_backward_word (count, key) - int count, key; +rl_copy_backward_word (int count, int key) { if (count < 0) return (rl_copy_forward_word (-count, key)); @@ -500,13 +507,12 @@ rl_copy_backward_word (count, key) /* Yank back the last killed text. This ignores arguments. */ int -rl_yank (count, ignore) - int count, ignore; +rl_yank (int count, int key) { if (rl_kill_ring == 0) { _rl_abort_internal (); - return -1; + return 1; } _rl_set_mark_at_pos (rl_point); @@ -519,8 +525,7 @@ rl_yank (count, ignore) 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; +rl_yank_pop (int count, int key) { int l, n; @@ -528,7 +533,7 @@ rl_yank_pop (count, key) !rl_kill_ring) { _rl_abort_internal (); - return -1; + return 1; } l = strlen (rl_kill_ring[rl_kill_index]); @@ -546,15 +551,57 @@ rl_yank_pop (count, key) else { _rl_abort_internal (); - return -1; + return 1; } } +#if defined (VI_MODE) +int +rl_vi_yank_pop (int count, int key) +{ + int l, n, origpoint; + + if (((rl_last_func != rl_vi_yank_pop) && (rl_last_func != rl_vi_put)) || + !rl_kill_ring) + { + _rl_abort_internal (); + return 1; + } + + l = strlen (rl_kill_ring[rl_kill_index]); +#if 0 /* TAG:readline-8.3 8/29/2022 matteopaolini1995@gmail.com */ + origpoint = rl_point; + n = rl_point - l + 1; +#else + n = rl_point - l; +#endif + if (n >= 0 && STREQN (rl_line_buffer + n, rl_kill_ring[rl_kill_index], l)) + { +#if 0 /* TAG:readline-8.3 */ + rl_delete_text (n, n + l); /* remember vi cursor positioning */ + rl_point = origpoint - l; +#else + rl_delete_text (n, rl_point); + rl_point = n; +#endif + rl_kill_index--; + if (rl_kill_index < 0) + rl_kill_index = rl_kill_ring_length - 1; + rl_vi_put (1, 'p'); + return 0; + } + else + { + _rl_abort_internal (); + return 1; + } +} +#endif /* VI_MODE */ + /* 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; +rl_yank_nth_arg_internal (int count, int key, int history_skip) { register HIST_ENTRY *entry; char *arg; @@ -575,7 +622,7 @@ rl_yank_nth_arg_internal (count, ignore, history_skip) if (entry == 0) { rl_ding (); - return -1; + return 1; } arg = history_arg_extract (count, count, entry->line); @@ -583,7 +630,7 @@ rl_yank_nth_arg_internal (count, ignore, history_skip) { rl_ding (); FREE (arg); - return -1; + return 1; } rl_begin_undo_group (); @@ -593,15 +640,15 @@ rl_yank_nth_arg_internal (count, ignore, history_skip) #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) + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap) { - rl_vi_append_mode (1, ignore); + rl_vi_append_mode (1, key); rl_insert_text (" "); } #endif /* VI_MODE */ rl_insert_text (arg); - free (arg); + xfree (arg); rl_end_undo_group (); return 0; @@ -609,18 +656,16 @@ rl_yank_nth_arg_internal (count, ignore, history_skip) /* Yank the COUNTth argument from the previous history line. */ int -rl_yank_nth_arg (count, ignore) - int count, ignore; +rl_yank_nth_arg (int count, int key) { - return (rl_yank_nth_arg_internal (count, ignore, 0)); + return (rl_yank_nth_arg_internal (count, key, 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; +rl_yank_last_arg (int count, int key) { static int history_skip = 0; static int explicit_arg_p = 0; @@ -640,7 +685,7 @@ rl_yank_last_arg (count, key) { if (undo_needed) rl_do_undo (); - if (count < 1) + if (count < 0) /* XXX - was < 1 */ direction = -direction; history_skip += direction; if (history_skip < 0) @@ -656,13 +701,174 @@ rl_yank_last_arg (count, key) return retval; } -/* A special paste command for users of Cygnus's cygwin32. */ -#if defined (__CYGWIN__) +/* Having read the special escape sequence denoting the beginning of a + `bracketed paste' sequence, read the rest of the pasted input until the + closing sequence and return the pasted text. */ +char * +_rl_bracketed_text (size_t *lenp) +{ + int c; + size_t len, cap; + char *buf; + + len = 0; + buf = xmalloc (cap = 64); + buf[0] = '\0'; + + RL_SETSTATE (RL_STATE_MOREINPUT); + while ((c = rl_read_key ()) >= 0) + { + if (RL_ISSTATE (RL_STATE_MACRODEF)) + _rl_add_macro_char (c); + + if (c == '\r') /* XXX */ + c = '\n'; + + if (len == cap) + buf = xrealloc (buf, cap *= 2); + + buf[len++] = c; + if (len >= BRACK_PASTE_SLEN && c == BRACK_PASTE_LAST && + STREQN (buf + len - BRACK_PASTE_SLEN, BRACK_PASTE_SUFF, BRACK_PASTE_SLEN)) + { + len -= BRACK_PASTE_SLEN; + break; + } + } + RL_UNSETSTATE (RL_STATE_MOREINPUT); + + if (c >= 0) + { + if (len == cap) + buf = xrealloc (buf, cap + 1); + buf[len] = '\0'; + } + + if (lenp) + *lenp = len; + return (buf); +} + +/* Having read the special escape sequence denoting the beginning of a + `bracketed paste' sequence, read the rest of the pasted input until the + closing sequence and insert the pasted text as a single unit without + interpretation. Temporarily highlight the inserted text. */ +int +rl_bracketed_paste_begin (int count, int key) +{ + int retval, c; + size_t len, cap; + char *buf; + + buf = _rl_bracketed_text (&len); + rl_mark = rl_point; + retval = rl_insert_text (buf) == len ? 0 : 1; + if (_rl_enable_active_region) + rl_activate_mark (); + + xfree (buf); + return (retval); +} + +int +_rl_read_bracketed_paste_prefix (int c) +{ + char pbuf[BRACK_PASTE_SLEN+1], *pbpref; + int key, ind, j; + + pbpref = BRACK_PASTE_PREF; /* XXX - debugging */ + if (c != pbpref[0]) + return (0); + pbuf[ind = 0] = c; + while (ind < BRACK_PASTE_SLEN-1 && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued (0)) + { + key = rl_read_key (); /* XXX - for now */ + if (key < 0) + break; + pbuf[++ind] = key; + if (pbuf[ind] != pbpref[ind]) + break; + } + + if (ind < BRACK_PASTE_SLEN-1) /* read incomplete sequence */ + { + while (ind >= 0) + _rl_unget_char (pbuf[ind--]); + return (key < 0 ? key : 0); + } + return (key < 0 ? key : 1); +} + +/* Get a character from wherever we read input, handling input in bracketed + paste mode. If we don't have or use bracketed paste mode, this can be + used in place of rl_read_key(). */ +int +_rl_bracketed_read_key () +{ + int c, r; + char *pbuf; + size_t pblen; + + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (c < 0) + return -1; + + /* read pasted data with bracketed-paste mode enabled. */ + if (_rl_enable_bracketed_paste && c == ESC && (r = _rl_read_bracketed_paste_prefix (c)) == 1) + { + pbuf = _rl_bracketed_text (&pblen); + if (pblen == 0) + { + xfree (pbuf); + return 0; /* XXX */ + } + c = (unsigned char)pbuf[0]; + if (pblen > 1) + { + while (--pblen > 0) + _rl_unget_char ((unsigned char)pbuf[pblen]); + } + xfree (pbuf); + } + + return c; +} + +/* Get a character from wherever we read input, handling input in bracketed + paste mode. If we don't have or use bracketed paste mode, this can be + used in place of rl_read_key(). */ +int +_rl_bracketed_read_mbstring (char *mb, int mlen) +{ + int c, r; + + c = _rl_bracketed_read_key (); + 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); + else +#endif + mb[0] = c; + mb[mlen] = '\0'; /* just in case */ + + return c; +} + +/* A special paste command for Windows users. */ +#if defined (_WIN32) #include int -rl_paste_from_clipboard (count, key) - int count, key; +rl_paste_from_clipboard (int count, int key) { char *data, *ptr; int len; @@ -691,4 +897,4 @@ rl_paste_from_clipboard (count, key) } return (0); } -#endif /* __CYGWIN__ */ +#endif /* _WIN32 */ diff --git a/lib/readline/macro.c b/lib/readline/macro.c index c2fac8a..231a24b 100644 --- a/lib/readline/macro.c +++ b/lib/readline/macro.c @@ -1,6 +1,6 @@ /* macro.c -- keyboard macros for readline. */ -/* Copyright (C) 1994-2009 Free Software Foundation, Inc. +/* Copyright (C) 1994-2009,2017 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. @@ -49,6 +49,8 @@ #include "rlprivate.h" #include "xmalloc.h" +#define MAX_MACRO_LEVEL 16 + /* **************************************************************** */ /* */ /* Hacking Keyboard Macros */ @@ -83,13 +85,24 @@ struct saved_macro { /* The list of saved macros. */ static struct saved_macro *macro_list = (struct saved_macro *)NULL; +static int macro_level = 0; + /* 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_with_macro_input (char *string) { - _rl_push_executing_macro (); + if (macro_level > MAX_MACRO_LEVEL) + { + _rl_errmsg ("maximum macro execution nesting level exceeded"); + _rl_abort_internal (); + return; + } + +#if 0 + if (rl_executing_macro) /* XXX - later */ +#endif + _rl_push_executing_macro (); rl_executing_macro = string; executing_macro_index = 0; RL_SETSTATE(RL_STATE_MACROINPUT); @@ -98,7 +111,7 @@ _rl_with_macro_input (string) /* Return the next character available from a macro, or 0 if there are no macro characters. */ int -_rl_next_macro_key () +_rl_next_macro_key (void) { int c; @@ -117,13 +130,40 @@ _rl_next_macro_key () _rl_pop_executing_macro (); return c; #else + /* XXX - consider doing the same as the callback code, just not testing + whether we're running in callback mode */ return (rl_executing_macro[executing_macro_index++]); #endif } +int +_rl_peek_macro_key (void) +{ + if (rl_executing_macro == 0) + return (0); + if (rl_executing_macro[executing_macro_index] == 0 && (macro_list == 0 || macro_list->string == 0)) + return (0); + if (rl_executing_macro[executing_macro_index] == 0 && macro_list && macro_list->string) + return (macro_list->string[0]); + return (rl_executing_macro[executing_macro_index]); +} + +int +_rl_prev_macro_key (void) +{ + if (rl_executing_macro == 0) + return (0); + + if (executing_macro_index == 0) + return (0); + + executing_macro_index--; + return (rl_executing_macro[executing_macro_index]); +} + /* Save the currently executing macro on a stack of saved macros. */ void -_rl_push_executing_macro () +_rl_push_executing_macro (void) { struct saved_macro *saver; @@ -133,12 +173,14 @@ _rl_push_executing_macro () saver->string = rl_executing_macro; macro_list = saver; + + macro_level++; } /* Discard the current macro, replacing it with the one on the top of the stack of saved macros. */ void -_rl_pop_executing_macro () +_rl_pop_executing_macro (void) { struct saved_macro *macro; @@ -155,14 +197,15 @@ _rl_pop_executing_macro () xfree (macro); } + macro_level--; + 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; +_rl_add_macro_char (int c) { if (current_macro_index + 1 >= current_macro_size) { @@ -177,7 +220,7 @@ _rl_add_macro_char (c) } void -_rl_kill_kbd_macro () +_rl_kill_kbd_macro (void) { if (current_macro) { @@ -200,13 +243,12 @@ _rl_kill_kbd_macro () 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; +rl_start_kbd_macro (int ignore1, int ignore2) { if (RL_ISSTATE (RL_STATE_MACRODEF)) { _rl_abort_internal (); - return -1; + return 1; } if (rl_explicit_arg) @@ -225,16 +267,17 @@ rl_start_kbd_macro (ignore1, ignore2) 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; +rl_end_kbd_macro (int count, int ignore) { if (RL_ISSTATE (RL_STATE_MACRODEF) == 0) { _rl_abort_internal (); - return -1; + return 1; } - current_macro_index -= rl_key_sequence_length - 1; + current_macro_index -= rl_key_sequence_length; + if (current_macro_index < 0) + current_macro_index = 0; current_macro[current_macro_index] = '\0'; RL_UNSETSTATE(RL_STATE_MACRODEF); @@ -245,8 +288,7 @@ rl_end_kbd_macro (count, ignore) /* 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; +rl_call_last_kbd_macro (int count, int ignore) { if (current_macro == 0) _rl_abort_internal (); @@ -263,9 +305,30 @@ rl_call_last_kbd_macro (count, ignore) return 0; } +int +rl_print_last_kbd_macro (int count, int ignore) +{ + char *m; + + if (current_macro == 0) + { + rl_ding (); + return 0; + } + m = _rl_untranslate_macro_value (current_macro, 1); + rl_crlf (); + printf ("%s", m); + fflush (stdout); + rl_crlf (); + FREE (m); + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; +} + void -rl_push_macro_input (macro) - char *macro; +rl_push_macro_input (char *macro) { _rl_with_macro_input (macro); } diff --git a/lib/readline/mbutil.c b/lib/readline/mbutil.c index eeb7e55..47e9100 100644 --- a/lib/readline/mbutil.c +++ b/lib/readline/mbutil.c @@ -1,6 +1,6 @@ /* mbutil.c -- readline multibyte character utility functions */ -/* Copyright (C) 2001-2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 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. @@ -64,6 +64,9 @@ int rl_byte_oriented = 0; int rl_byte_oriented = 1; #endif +/* Ditto */ +int _rl_utf8locale = 0; + /* **************************************************************** */ /* */ /* Multibyte Character Utility Functions */ @@ -72,15 +75,85 @@ int rl_byte_oriented = 1; #if defined(HANDLE_MULTIBYTE) +/* **************************************************************** */ +/* */ +/* UTF-8 specific Character Utility Functions */ +/* */ +/* **************************************************************** */ + +/* Return the length in bytes of the possibly-multibyte character beginning + at S. Encoding is UTF-8. */ +static int +_rl_utf8_mblen (const char *s, size_t n) +{ + unsigned char c, c1, c2, c3; + + if (s == 0) + return (0); /* no shift states */ + if (n <= 0) + return (-1); + + c = (unsigned char)*s; + if (c < 0x80) + return (c != 0); + if (c >= 0xc2) + { + c1 = (unsigned char)s[1]; + if (c < 0xe0) + { + if (n == 1) + return -2; + if (n >= 2 && (c1 ^ 0x80) < 0x40) + return 2; + } + else if (c < 0xf0) + { + if (n == 1) + return -2; + if ((c1 ^ 0x80) < 0x40 + && (c >= 0xe1 || c1 >= 0xa0) + && (c != 0xed || c1 < 0xa0)) + { + if (n == 2) + return -2; + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + return 3; + } + } + else if (c < 0xf4) + { + if (n == 1) + return -2; + if (((c1 ^ 0x80) < 0x40) + && (c >= 0xf1 || c1 >= 0x90) + && (c < 0xf4 || (c == 0xf4 && c1 < 0x90))) + { + if (n == 2) + return -2; + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + { + if (n == 3) + return -2; + c3 = (unsigned char)s[3]; + if ((c3 ^ 0x80) < 0x40) + return 4; + } + } + } + } + /* invalid or incomplete multibyte character */ + return -1; +} + static int -_rl_find_next_mbchar_internal (string, seed, count, find_non_zero) - char *string; - int seed, count, find_non_zero; +_rl_find_next_mbchar_internal (char *string, int seed, int count, int find_non_zero) { size_t tmp, len; mbstate_t ps; int point; - wchar_t wc; + WCHAR_T wc; tmp = 0; @@ -91,6 +164,11 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) return seed; point = seed + _rl_adjust_point (string, seed, &ps); + /* if _rl_adjust_point returns -1, the character or string is invalid. + treat as a byte. */ + if (point == seed - 1) /* invalid */ + return seed + 1; + /* 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. */ @@ -102,7 +180,14 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) len = strlen (string + point); if (len == 0) break; - tmp = mbrtowc (&wc, string+point, len, &ps); + if (_rl_utf8locale && UTF8_SINGLEBYTE(string[point])) + { + tmp = 1; + wc = (WCHAR_T) string[point]; + memset(&ps, 0, sizeof(mbstate_t)); + } + else + tmp = MBRTOWC (&wc, string+point, len, &ps); if (MB_INVALIDCH ((size_t)tmp)) { /* invalid bytes. assume a byte represents a character */ @@ -119,7 +204,7 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) point += tmp; if (find_non_zero) { - if (wcwidth (wc) == 0) + if (WCWIDTH (wc) == 0) continue; else count--; @@ -131,26 +216,87 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) 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) + 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); + tmp = MBRTOWC (&wc, string + point, strlen (string + point), &ps); } } return point; } +static inline int +_rl_test_nonzero (char *string, int ind, int len) +{ + size_t tmp; + WCHAR_T wc; + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + tmp = MBRTOWC (&wc, string + ind, len - ind, &ps); + /* treat invalid multibyte sequences as non-zero-width */ + return (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp) || WCWIDTH (wc) > 0); +} + +/* experimental -- needs to handle zero-width characters better */ static int -_rl_find_prev_mbchar_internal (string, seed, find_non_zero) - char *string; - int seed, find_non_zero; +_rl_find_prev_utf8char (char *string, int seed, int find_non_zero) +{ + char *s; + unsigned char b; + int save, prev; + size_t len; + + if (find_non_zero) + len = RL_STRLEN (string); + + prev = seed - 1; + while (prev >= 0) + { + b = (unsigned char)string[prev]; + if (UTF8_SINGLEBYTE (b)) + return (prev); + + save = prev; + + /* Move back until we're not in the middle of a multibyte char */ + if (UTF8_MBCHAR (b)) + { + while (prev > 0 && (b = (unsigned char)string[--prev]) && UTF8_MBCHAR (b)) + ; + } + + if (UTF8_MBFIRSTCHAR (b)) + { + if (find_non_zero) + { + if (_rl_test_nonzero (string, prev, len)) + return (prev); + else /* valid but WCWIDTH (wc) == 0 */ + prev = prev - 1; + } + else + return (prev); + } + else + return (save); /* invalid utf-8 multibyte sequence */ + } + + return ((prev < 0) ? 0 : prev); +} + +/*static*/ int +_rl_find_prev_mbchar_internal (char *string, int seed, int find_non_zero) { mbstate_t ps; int prev, non_zero_prev, point, length; size_t tmp; - wchar_t wc; + WCHAR_T wc; + + if (_rl_utf8locale) + return (_rl_find_prev_utf8char (string, seed, find_non_zero)); memset(&ps, 0, sizeof(mbstate_t)); length = strlen(string); @@ -163,10 +309,17 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) prev = non_zero_prev = point = 0; while (point < seed) { - tmp = mbrtowc (&wc, string + point, length - point, &ps); + if (_rl_utf8locale && UTF8_SINGLEBYTE(string[point])) + { + tmp = 1; + wc = (WCHAR_T) string[point]; + memset(&ps, 0, sizeof(mbstate_t)); + } + else + tmp = MBRTOWC (&wc, string + point, length - point, &ps); if (MB_INVALIDCH ((size_t)tmp)) { - /* in this case, bytes are invalid or shorted to compose + /* in this case, bytes are invalid or too short to compose multibyte char, so assume that the first byte represents a single character anyway. */ tmp = 1; @@ -184,7 +337,7 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) { if (find_non_zero) { - if (wcwidth (wc) != 0) + if (WCWIDTH (wc) != 0) prev = point; } else @@ -203,16 +356,23 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) 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; +_rl_get_char_len (char *src, mbstate_t *ps) { - size_t tmp; + size_t tmp, l; + int mb_cur_max; - tmp = mbrlen((const char *)src, (size_t)strlen (src), ps); + /* Look at no more than MB_CUR_MAX characters */ + l = (size_t)strlen (src); + if (_rl_utf8locale && l > 0 && UTF8_SINGLEBYTE(*src)) + tmp = (*src != 0) ? 1 : 0; + else + { + mb_cur_max = MB_CUR_MAX; + tmp = mbrlen((const char *)src, (l < mb_cur_max) ? l : mb_cur_max, ps); + } if (tmp == (size_t)(-2)) { - /* shorted to compose multibyte char */ + /* too short to compose multibyte char */ if (ps) memset (ps, 0, sizeof(mbstate_t)); return -2; @@ -234,13 +394,7 @@ _rl_get_char_len (src, ps) /* 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; +_rl_compare_chars (char *buf1, int pos1, mbstate_t *ps1, char *buf2, int pos2, mbstate_t *ps2) { int i, w1, w2; @@ -260,18 +414,16 @@ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) /* 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), + if point is invalid (point < 0 || more than string length), it returns -1 */ int -_rl_adjust_point(string, point, ps) - char *string; - int point; - mbstate_t *ps; +_rl_adjust_point (char *string, int point, mbstate_t *ps) { - size_t tmp = 0; - int length; - int pos = 0; + size_t tmp; + int length, pos; + tmp = 0; + pos = 0; length = strlen(string); if (point < 0) return -1; @@ -280,10 +432,13 @@ _rl_adjust_point(string, point, ps) while (pos < point) { - tmp = mbrlen (string + pos, length - pos, ps); + if (_rl_utf8locale && UTF8_SINGLEBYTE(string[pos])) + tmp = 1; + else + tmp = mbrlen (string + pos, length - pos, ps); if (MB_INVALIDCH ((size_t)tmp)) { - /* in this case, bytes are invalid or shorted to compose + /* in this case, bytes are invalid or too short to compose multibyte char, so assume that the first byte represents a single character anyway. */ pos++; @@ -302,11 +457,7 @@ _rl_adjust_point(string, point, ps) } int -_rl_is_mbchar_matched (string, seed, end, mbchar, length) - char *string; - int seed, end; - char *mbchar; - int length; +_rl_is_mbchar_matched (char *string, int seed, int end, char *mbchar, int length) { int i; @@ -319,25 +470,27 @@ _rl_is_mbchar_matched (string, seed, end, mbchar, length) return 1; } -wchar_t -_rl_char_value (buf, ind) - char *buf; - int ind; +WCHAR_T +_rl_char_value (char *buf, int ind) { size_t tmp; - wchar_t wc; + WCHAR_T wc; mbstate_t ps; int l; if (MB_LEN_MAX == 1 || rl_byte_oriented) - return ((wchar_t) buf[ind]); + return ((WCHAR_T) buf[ind]); + if (_rl_utf8locale && UTF8_SINGLEBYTE(buf[ind])) + return ((WCHAR_T) buf[ind]); l = strlen (buf); if (ind >= l - 1) - return ((wchar_t) buf[ind]); + return ((WCHAR_T) buf[ind]); + if (l < ind) /* Sanity check */ + l = strlen (buf+ind); memset (&ps, 0, sizeof (mbstate_t)); - tmp = mbrtowc (&wc, buf + ind, l - ind, &ps); + tmp = MBRTOWC (&wc, buf + ind, l - ind, &ps); if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp)) - return ((wchar_t) buf[ind]); + return ((WCHAR_T) buf[ind]); return wc; } #endif /* HANDLE_MULTIBYTE */ @@ -347,9 +500,7 @@ _rl_char_value (buf, ind) characters. */ #undef _rl_find_next_mbchar int -_rl_find_next_mbchar (string, seed, count, flags) - char *string; - int seed, count, flags; +_rl_find_next_mbchar (char *string, int seed, int count, int flags) { #if defined (HANDLE_MULTIBYTE) return _rl_find_next_mbchar_internal (string, seed, count, flags); @@ -363,9 +514,7 @@ _rl_find_next_mbchar (string, seed, count, flags) 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; +_rl_find_prev_mbchar (char *string, int seed, int flags) { #if defined (HANDLE_MULTIBYTE) return _rl_find_prev_mbchar_internal (string, seed, flags); diff --git a/lib/readline/misc.c b/lib/readline/misc.c index 12ae4a5..4bca9c5 100644 --- a/lib/readline/misc.c +++ b/lib/readline/misc.c @@ -1,6 +1,6 @@ /* misc.c -- miscellaneous bindable readline functions. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 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. @@ -50,14 +50,12 @@ #include "history.h" #include "rlprivate.h" +#include "histlib.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 *)); +static int rl_digit_loop (void); +static void _rl_history_set_point (void); /* If non-zero, rl_get_previous_history and rl_get_next_history attempt to preserve the value of rl_point from line to line. */ @@ -76,7 +74,7 @@ int _rl_history_saved_point = -1; /* **************************************************************** */ int -_rl_arg_overflow () +_rl_arg_overflow (void) { if (rl_numeric_arg > 1000000) { @@ -92,7 +90,7 @@ _rl_arg_overflow () } void -_rl_arg_init () +_rl_arg_init (void) { rl_save_prompt (); _rl_argcxt = 0; @@ -100,7 +98,7 @@ _rl_arg_init () } int -_rl_arg_getchar () +_rl_arg_getchar (void) { int c; @@ -116,9 +114,7 @@ _rl_arg_getchar () 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; +_rl_arg_dispatch (_rl_arg_cxt cxt, int c) { int key, r; @@ -126,7 +122,7 @@ _rl_arg_dispatch (cxt, 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 (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument) { if ((cxt & NUM_SAWDIGITS) == 0) { @@ -140,9 +136,7 @@ _rl_arg_dispatch (cxt, c) } else { - RL_SETSTATE(RL_STATE_MOREINPUT); - key = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); + key = _rl_bracketed_read_key (); rl_restore_prompt (); rl_clear_message (); RL_UNSETSTATE(RL_STATE_NUMERICARG); @@ -193,7 +187,7 @@ _rl_arg_dispatch (cxt, c) /* Handle C-u style numeric args, as well as M--, and M-digits. */ static int -rl_digit_loop () +rl_digit_loop (void) { int c, r; @@ -220,7 +214,7 @@ rl_digit_loop () /* Create a default argument. */ void -_rl_reset_argument () +_rl_reset_argument (void) { rl_numeric_arg = rl_arg_sign = 1; rl_explicit_arg = 0; @@ -229,8 +223,7 @@ _rl_reset_argument () /* Start a numeric argument with initial value KEY */ int -rl_digit_argument (ignore, key) - int ignore, key; +rl_digit_argument (int ignore, int key) { _rl_arg_init (); if (RL_ISSTATE (RL_STATE_CALLBACK)) @@ -250,8 +243,7 @@ rl_digit_argument (ignore, key) 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_universal_argument (int count, int key) { _rl_arg_init (); rl_numeric_arg *= 4; @@ -260,12 +252,13 @@ rl_universal_argument (count, key) } int -_rl_arg_callback (cxt) - _rl_arg_cxt cxt; +_rl_arg_callback (_rl_arg_cxt cxt) { int c, r; c = _rl_arg_getchar (); + if (c < 0) + return (1); /* EOF */ if (_rl_argcxt & NUM_READONE) { @@ -278,12 +271,14 @@ _rl_arg_callback (cxt) } r = _rl_arg_dispatch (cxt, c); + if (r > 0) + rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); return (r != 1); } /* What to do when you abort reading an argument. */ int -rl_discard_argument () +rl_discard_argument (void) { rl_ding (); rl_clear_message (); @@ -308,19 +303,18 @@ 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 () +_rl_start_using_history (void) { using_history (); if (_rl_saved_line_for_history) - _rl_free_history_entry (_rl_saved_line_for_history); - + _rl_free_saved_history_line (); _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + _rl_history_search_pos = -99; /* some random invalid history position */ } /* Free the contents (and containing structure) of a HIST_ENTRY. */ void -_rl_free_history_entry (entry) - HIST_ENTRY *entry; +_rl_free_history_entry (HIST_ENTRY *entry) { if (entry == 0) return; @@ -328,12 +322,12 @@ _rl_free_history_entry (entry) FREE (entry->line); FREE (entry->timestamp); - free (entry); + xfree (entry); } /* Perhaps put back the current line if it has changed. */ int -rl_maybe_replace_line () +rl_maybe_replace_line (void) { HIST_ENTRY *temp; @@ -342,16 +336,16 @@ rl_maybe_replace_line () 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); + xfree (temp->line); FREE (temp->timestamp); - free (temp); + xfree (temp); } return 0; } /* Restore the _rl_saved_line_for_history if there is one. */ int -rl_maybe_unsave_line () +rl_maybe_unsave_line (void) { if (_rl_saved_line_for_history) { @@ -359,6 +353,8 @@ rl_maybe_unsave_line () 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; + + /* Doesn't free `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 */ @@ -370,7 +366,7 @@ rl_maybe_unsave_line () /* Save the current line in _rl_saved_line_for_history. */ int -rl_maybe_save_line () +rl_maybe_save_line (void) { if (_rl_saved_line_for_history == 0) { @@ -384,10 +380,20 @@ rl_maybe_save_line () } int -_rl_free_saved_history_line () +_rl_free_saved_history_line (void) { + UNDO_LIST *orig; + if (_rl_saved_line_for_history) { + if (rl_undo_list && rl_undo_list == (UNDO_LIST *)_rl_saved_line_for_history->data) + rl_undo_list = 0; + /* Have to free this separately because _rl_free_history entry can't: + it doesn't know whether or not this has application data. Only the + callers that know this is _rl_saved_line_for_history can know that + it's an undo list. */ + if (_rl_saved_line_for_history->data) + _rl_free_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; } @@ -395,7 +401,7 @@ _rl_free_saved_history_line () } static void -_rl_history_set_point () +_rl_history_set_point (void) { rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1) ? _rl_history_saved_point @@ -413,9 +419,7 @@ _rl_history_set_point () } void -rl_replace_from_history (entry, flags) - HIST_ENTRY *entry; - int flags; /* currently unused */ +rl_replace_from_history (HIST_ENTRY *entry, int flags) { /* 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. */ @@ -439,7 +443,7 @@ rl_replace_from_history (entry, flags) 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 () +_rl_revert_previous_lines (void) { int hpos; HIST_ENTRY *entry; @@ -459,6 +463,7 @@ _rl_revert_all_lines () 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 */ + entry->data = 0; /* entry->data is now current undo list */ /* Undo all changes to this history entry */ while (rl_undo_list) rl_do_undo (); @@ -466,7 +471,6 @@ _rl_revert_all_lines () the timestamp. */ FREE (entry->line); entry->line = savestring (rl_line_buffer); - entry->data = 0; } entry = previous_history (); } @@ -480,9 +484,53 @@ _rl_revert_all_lines () _rl_set_the_line (); /* and clean up */ - free (lbuf); + xfree (lbuf); } +/* Revert all lines in the history by making sure we are at the end of the + history before calling _rl_revert_previous_lines() */ +void +_rl_revert_all_lines (void) +{ + int pos; + + pos = where_history (); + using_history (); + _rl_revert_previous_lines (); + history_set_pos (pos); +} + +/* Free the history list, including private readline data and take care + of pointer aliases to history data. Resets rl_undo_list if it points + to an UNDO_LIST * saved as some history entry's data member. This + should not be called while editing is active. */ +void +rl_clear_history (void) +{ + HIST_ENTRY **hlist, *hent; + register int i; + UNDO_LIST *ul, *saved_undo_list; + + saved_undo_list = rl_undo_list; + hlist = history_list (); /* direct pointer, not copy */ + + for (i = 0; i < history_length; i++) + { + hent = hlist[i]; + if (ul = (UNDO_LIST *)hent->data) + { + if (ul == saved_undo_list) + saved_undo_list = 0; + _rl_free_undo_list (ul); + hent->data = 0; + } + _rl_free_history_entry (hent); + } + + history_offset = history_length = 0; + rl_undo_list = saved_undo_list; /* should be NULL */ +} + /* **************************************************************** */ /* */ /* History Commands */ @@ -491,16 +539,14 @@ _rl_revert_all_lines () /* Meta-< goes to the start of the history. */ int -rl_beginning_of_history (count, key) - int count, key; +rl_beginning_of_history (int count, int 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_end_of_history (int count, int key) { rl_maybe_replace_line (); using_history (); @@ -510,8 +556,7 @@ rl_end_of_history (count, key) /* Move down to the next history line. */ int -rl_get_next_history (count, key) - int count, key; +rl_get_next_history (int count, int key) { HIST_ENTRY *temp; @@ -549,15 +594,15 @@ rl_get_next_history (count, key) /* 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; +rl_get_previous_history (int count, int key) { HIST_ENTRY *old_temp, *temp; + int had_saved_line; if (count < 0) return (rl_get_next_history (-count, key)); - if (count == 0) + if (count == 0 || history_list () == 0) return 0; /* either not saved by rl_newline or at end of line, so set appropriately. */ @@ -565,6 +610,7 @@ rl_get_previous_history (count, key) _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; /* If we don't have a line saved, then save this one. */ + had_saved_line = _rl_saved_line_for_history != 0; rl_maybe_save_line (); /* If the current line has changed, save the changes. */ @@ -587,7 +633,11 @@ rl_get_previous_history (count, key) temp = old_temp; if (temp == 0) - rl_ding (); + { + if (had_saved_line == 0) + _rl_free_saved_history_line (); + rl_ding (); + } else { rl_replace_from_history (temp, 0); @@ -597,6 +647,82 @@ rl_get_previous_history (count, key) return 0; } +/* With an argument, move back that many history lines, else move to the + beginning of history. */ +int +rl_fetch_history (int count, int c) +{ + int wanted, nhist; + + /* 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) + { + nhist = history_base + where_history (); + /* Negative arguments count back from the end of the history list. */ + wanted = (count >= 0) ? nhist - count : -count; + + if (wanted <= 0 || wanted >= nhist) + { + /* In vi mode, we don't change the line with an out-of-range + argument, as for the `G' command. */ + if (rl_editing_mode == vi_mode) + rl_ding (); + else + rl_beginning_of_history (0, 0); + } + else + rl_get_previous_history (wanted, c); + } + else + rl_beginning_of_history (count, 0); + + return (0); +} + +/* The equivalent of the Korn shell C-o operate-and-get-next-history-line + editing command. */ + +/* This could stand to be global to the readline library */ +static rl_hook_func_t *_rl_saved_internal_startup_hook = 0; +static int saved_history_logical_offset = -1; + +#define HISTORY_FULL() (history_is_stifled () && history_length >= history_max_entries) + +static int +set_saved_history () +{ + int absolute_offset, count; + + if (saved_history_logical_offset >= 0) + { + absolute_offset = saved_history_logical_offset - history_base; + count = where_history () - absolute_offset; + rl_get_previous_history (count, 0); + } + saved_history_logical_offset = -1; + _rl_internal_startup_hook = _rl_saved_internal_startup_hook; + + return (0); +} + +int +rl_operate_and_get_next (int count, int c) +{ + /* Accept the current line. */ + rl_newline (1, c); + + saved_history_logical_offset = rl_explicit_arg ? count : where_history () + history_base + 1; + + _rl_saved_internal_startup_hook = _rl_internal_startup_hook; + _rl_internal_startup_hook = set_saved_history; + + return 0; +} + /* **************************************************************** */ /* */ /* Editing Modes */ @@ -604,8 +730,7 @@ rl_get_previous_history (count, key) /* **************************************************************** */ /* How to toggle back and forth between editing modes. */ int -rl_vi_editing_mode (count, key) - int count, key; +rl_vi_editing_mode (int count, int key) { #if defined (VI_MODE) _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */ @@ -617,19 +742,21 @@ rl_vi_editing_mode (count, key) } int -rl_emacs_editing_mode (count, key) - int count, key; +rl_emacs_editing_mode (int count, int 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; + + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); + 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; +_rl_set_insert_mode (int im, int force) { #ifdef CURSOR_MODE _rl_set_cursor (im, force); @@ -641,8 +768,7 @@ _rl_set_insert_mode (im, force) /* 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; +rl_overwrite_mode (int count, int key) { if (rl_explicit_arg == 0) _rl_set_insert_mode (rl_insert_mode ^ 1, 0); diff --git a/lib/readline/nls.c b/lib/readline/nls.c index 7f10f01..8c027d6 100644 --- a/lib/readline/nls.c +++ b/lib/readline/nls.c @@ -1,6 +1,6 @@ /* nls.c -- skeletal internationalization code. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2022 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. @@ -43,12 +43,22 @@ # include #endif +#if defined (HAVE_LANGINFO_CODESET) +# include +#endif + #include #include "rldefs.h" #include "readline.h" #include "rlshell.h" #include "rlprivate.h" +#include "xmalloc.h" + +static int utf8locale (char *); + +#define RL_DEFAULT_LOCALE "C" +static char *_rl_current_locale = 0; #if !defined (HAVE_SETLOCALE) /* A list of legal values for the LANG or LC_CTYPE environment variables. @@ -68,18 +78,19 @@ static char *legal_lang_values[] = "iso88599", "iso885910", "koi8r", + "utf8", 0 }; -static char *normalize_codeset PARAMS((char *)); -static char *find_codeset PARAMS((char *, size_t *)); +static char *normalize_codeset (char *); #endif /* !HAVE_SETLOCALE */ -static char *_rl_get_locale_var PARAMS((const char *)); +static char *find_codeset (char *, size_t *); + +static char *_rl_get_locale_var (const char *); static char * -_rl_get_locale_var (v) - const char *v; +_rl_get_locale_var (const char *v) { char *lspec; @@ -91,17 +102,31 @@ _rl_get_locale_var (v) 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 () + +static int +utf8locale (char *lspec) { -/* 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; + char *cp; + size_t len; + +#if HAVE_LANGINFO_CODESET + cp = nl_langinfo (CODESET); + return (STREQ (cp, "UTF-8") || STREQ (cp, "utf8")); +#else + cp = find_codeset (lspec, &len); + + if (cp == 0 || len < 4 || len > 5) + return 0; + return ((len == 5) ? strncmp (cp, "UTF-8", len) == 0 : strncmp (cp, "utf8", 4) == 0); +#endif +} + +/* Query the right environment variables and call setlocale() to initialize + the C library locale settings. */ +char * +_rl_init_locale (void) +{ + char *ret, *lspec; /* Set the LC_CTYPE locale category from environment variables. */ lspec = _rl_get_locale_var ("LC_CTYPE"); @@ -110,32 +135,65 @@ _rl_init_eightbit () 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 defined (HAVE_SETLOCALE) if (lspec == 0 || *lspec == 0) lspec = setlocale (LC_CTYPE, (char *)NULL); if (lspec == 0) lspec = ""; - t = setlocale (LC_CTYPE, lspec); + ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */ + if (ret == 0 || *ret == 0) + ret = setlocale (LC_CTYPE, (char *)NULL); + if (ret == 0 || *ret == 0) + ret = RL_DEFAULT_LOCALE; +#else + ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec; +#endif + + _rl_utf8locale = (ret && *ret) ? utf8locale (ret) : 0; + + _rl_current_locale = savestring (ret); + return ret; +} - if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0)) +/* If we have setlocale(3), just check the current LC_CTYPE category + value (passed as LOCALESTR), and go into eight-bit mode if it's not "C" + or "POSIX". If FORCE is non-zero, we reset the locale variables to values + appropriate for the C locale if the locale is "C" or "POSIX". FORCE is 0 + when this is called from _rl_init_eightbit, since we're modifying the + default initial values and don't need to change anything else. If we + don't have setlocale(3), we check the codeset portion of LOCALESTR against + a set of known values and go into eight-bit mode if it matches one of those. + Returns 1 if we set eight-bit (multibyte) mode. */ +static int +_rl_set_localevars (char *localestr, int force) +{ +#if defined (HAVE_SETLOCALE) + if (localestr && *localestr && (localestr[0] != 'C' || localestr[1]) && (STREQ (localestr, "POSIX") == 0)) { _rl_meta_flag = 1; _rl_convert_meta_chars_to_ascii = 0; _rl_output_meta_chars = 1; return (1); } + else if (force) + { + /* Default "C" locale settings. */ + _rl_meta_flag = 0; + _rl_convert_meta_chars_to_ascii = 1; + _rl_output_meta_chars = 0; + return (0); + } else return (0); #else /* !HAVE_SETLOCALE */ - char *lspec, *t; + char *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) + if (localestr == 0 || (t = normalize_codeset (localestr)) == 0) return (0); for (i = 0; t && legal_lang_values[i]; i++) if (STREQ (t, legal_lang_values[i])) @@ -145,16 +203,40 @@ _rl_init_eightbit () _rl_output_meta_chars = 1; break; } - free (t); - return (legal_lang_values[i] ? 1 : 0); + if (force && legal_lang_values[i] == 0) /* didn't find it */ + { + /* Default "C" locale settings. */ + _rl_meta_flag = 0; + _rl_convert_meta_chars_to_ascii = 1; + _rl_output_meta_chars = 0; + } + + _rl_utf8locale = *t ? STREQ (t, "utf8") : 0; + + xfree (t); + return (legal_lang_values[i] ? 1 : 0); #endif /* !HAVE_SETLOCALE */ } +/* 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 (void) +{ + char *t, *ol; + + ol = _rl_current_locale; + t = _rl_init_locale (); /* resets _rl_current_locale, returns static pointer */ + xfree (ol); + + return (_rl_set_localevars (t, 0)); +} + #if !defined (HAVE_SETLOCALE) static char * -normalize_codeset (codeset) - char *codeset; +normalize_codeset (char *codeset) { size_t namelen, i; int len, all_digits; @@ -197,12 +279,11 @@ normalize_codeset (codeset) return retval; } +#endif /* !HAVE_SETLOCALE */ /* Isolate codeset portion of locale specification. */ static char * -find_codeset (name, lenp) - char *name; - size_t *lenp; +find_codeset (char *name, size_t *lenp) { char *cp, *language, *result; @@ -249,4 +330,19 @@ find_codeset (name, lenp) return result; } -#endif /* !HAVE_SETLOCALE */ + +void +_rl_reset_locale (void) +{ + char *ol, *nl; + + /* This should not be NULL; _rl_init_eightbit sets it on the first call to + readline() or rl_initialize(). */ + ol = _rl_current_locale; + nl = _rl_init_locale (); /* resets _rl_current_locale */ + + if ((ol == 0 && nl) || (ol && nl && (STREQ (ol, nl) == 0))) + (void)_rl_set_localevars (nl, 1); + + xfree (ol); +} diff --git a/lib/readline/parens.c b/lib/readline/parens.c index 9c98488..57ce704 100644 --- a/lib/readline/parens.c +++ b/lib/readline/parens.c @@ -1,6 +1,6 @@ /* parens.c -- implementation of matching parentheses feature. */ -/* Copyright (C) 1987, 1989, 1992-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987, 1989, 1992-2015, 2017, 2021 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. @@ -53,41 +53,51 @@ extern char *strchr (), *strrchr (); #include "readline.h" #include "rlprivate.h" -static int find_matching_open PARAMS((char *, int, int)); +static int find_matching_open (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; +_rl_enable_paren_matching (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); + +#if defined (VI_MODE) + /* ([{ */ + rl_bind_key_in_map (')', rl_insert_close, vi_insertion_keymap); + rl_bind_key_in_map (']', rl_insert_close, vi_insertion_keymap); + rl_bind_key_in_map ('}', rl_insert_close, vi_insertion_keymap); +#endif } 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); + +#if defined (VI_MODE) + /* ([{ */ + rl_bind_key_in_map (')', rl_insert, vi_insertion_keymap); + rl_bind_key_in_map (']', rl_insert, vi_insertion_keymap); + rl_bind_key_in_map ('}', rl_insert, vi_insertion_keymap); +#endif } } int -rl_set_paren_blink_timeout (u) - int u; +rl_set_paren_blink_timeout (int u) { int o; @@ -98,8 +108,7 @@ rl_set_paren_blink_timeout (u) } int -rl_insert_close (count, invoking_key) - int count, invoking_key; +rl_insert_close (int count, int invoking_key) { if (rl_explicit_arg || !rl_blink_matching_paren) _rl_insert_char (count, invoking_key); @@ -117,7 +126,7 @@ rl_insert_close (count, invoking_key) /* Emacs might message or ring the bell here, but I don't. */ if (match_point < 0) - return -1; + return 1; FD_ZERO (&readfds); FD_SET (fileno (rl_instream), &readfds); @@ -126,7 +135,11 @@ rl_insert_close (count, invoking_key) orig_point = rl_point; rl_point = match_point; (*rl_redisplay_function) (); +# if defined (RL_TIMEOUT_USE_SELECT) + ready = _rl_timeout_select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer, NULL); +# else ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer); +# endif rl_point = orig_point; #else /* !HAVE_SELECT */ _rl_insert_char (count, invoking_key); @@ -136,9 +149,7 @@ rl_insert_close (count, invoking_key) } static int -find_matching_open (string, from, closer) - char *string; - int from, closer; +find_matching_open (char *string, int from, int closer) { register int i; int opener, level, delimiter; diff --git a/lib/readline/parse-colors.c b/lib/readline/parse-colors.c new file mode 100644 index 0000000..05ec9bc --- /dev/null +++ b/lib/readline/parse-colors.c @@ -0,0 +1,440 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2017 + 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include + +// strdup() / strcpy() +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +// abort() +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "rldefs.h" // STREQ, savestring +#include "readline.h" +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +#include "colors.h" +#include "parse-colors.h" + +#if defined (COLOR_SUPPORT) + +static bool get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count); + +struct bin_str _rl_color_indicator[] = + { + { LEN_STR_PAIR ("\033[") }, // lc: Left of color sequence + { LEN_STR_PAIR ("m") }, // rc: Right of color sequence + { 0, NULL }, // ec: End color (replaces lc+no+rc) + { LEN_STR_PAIR ("0") }, // rs: Reset to ordinary colors + { 0, NULL }, // no: Normal + { 0, NULL }, // fi: File: default + { LEN_STR_PAIR ("01;34") }, // di: Directory: bright blue + { LEN_STR_PAIR ("01;36") }, // ln: Symlink: bright cyan + { LEN_STR_PAIR ("33") }, // pi: Pipe: yellow/brown + { LEN_STR_PAIR ("01;35") }, // so: Socket: bright magenta + { LEN_STR_PAIR ("01;33") }, // bd: Block device: bright yellow + { LEN_STR_PAIR ("01;33") }, // cd: Char device: bright yellow + { 0, NULL }, // mi: Missing file: undefined + { 0, NULL }, // or: Orphaned symlink: undefined + { LEN_STR_PAIR ("01;32") }, // ex: Executable: bright green + { LEN_STR_PAIR ("01;35") }, // do: Door: bright magenta + { LEN_STR_PAIR ("37;41") }, // su: setuid: white on red + { LEN_STR_PAIR ("30;43") }, // sg: setgid: black on yellow + { LEN_STR_PAIR ("37;44") }, // st: sticky: black on blue + { LEN_STR_PAIR ("34;42") }, // ow: other-writable: blue on green + { LEN_STR_PAIR ("30;42") }, // tw: ow w/ sticky: black on green + { LEN_STR_PAIR ("30;41") }, // ca: black on red + { 0, NULL }, // mh: disabled by default + { LEN_STR_PAIR ("\033[K") }, // cl: clear to end of line + }; + +/* Parse a string as part of the LS_COLORS variable; this may involve + decoding all kinds of escape characters. If equals_end is set an + unescaped equal sign ends the string, otherwise only a : or \0 + does. Set *OUTPUT_COUNT to the number of bytes output. Return + true if successful. + + The resulting string is *not* null-terminated, but may contain + embedded nulls. + + Note that both dest and src are char **; on return they point to + the first free byte after the array and the character that ended + the input string, respectively. */ + +static bool +get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count) { + char num; /* For numerical codes */ + size_t count; /* Something to count with */ + enum { + ST_GND, ST_BACKSLASH, ST_OCTAL, ST_HEX, ST_CARET, ST_END, ST_ERROR + } state; + const char *p; + char *q; + + p = *src; /* We don't want to double-indirect */ + q = *dest; /* the whole darn time. */ + + count = 0; /* No characters counted in yet. */ + num = 0; + + state = ST_GND; /* Start in ground state. */ + while (state < ST_END) + { + switch (state) + { + case ST_GND: /* Ground state (no escapes) */ + switch (*p) + { + case ':': + case '\0': + state = ST_END; /* End of string */ + break; + case '\\': + state = ST_BACKSLASH; /* Backslash scape sequence */ + ++p; + break; + case '^': + state = ST_CARET; /* Caret escape */ + ++p; + break; + case '=': + if (equals_end) + { + state = ST_END; /* End */ + break; + } + /* else fall through */ + default: + *(q++) = *(p++); + ++count; + break; + } + break; + + case ST_BACKSLASH: /* Backslash escaped character */ + switch (*p) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + state = ST_OCTAL; /* Octal sequence */ + num = *p - '0'; + break; + case 'x': + case 'X': + state = ST_HEX; /* Hex sequence */ + num = 0; + break; + case 'a': /* Bell */ + num = '\a'; + break; + case 'b': /* Backspace */ + num = '\b'; + break; + case 'e': /* Escape */ + num = 27; + break; + case 'f': /* Form feed */ + num = '\f'; + break; + case 'n': /* Newline */ + num = '\n'; + break; + case 'r': /* Carriage return */ + num = '\r'; + break; + case 't': /* Tab */ + num = '\t'; + break; + case 'v': /* Vtab */ + num = '\v'; + break; + case '?': /* Delete */ + num = 127; + break; + case '_': /* Space */ + num = ' '; + break; + case '\0': /* End of string */ + state = ST_ERROR; /* Error! */ + break; + default: /* Escaped character like \ ^ : = */ + num = *p; + break; + } + if (state == ST_BACKSLASH) + { + *(q++) = num; + ++count; + state = ST_GND; + } + ++p; + break; + + case ST_OCTAL: /* Octal sequence */ + if (*p < '0' || *p > '7') + { + *(q++) = num; + ++count; + state = ST_GND; + } + else + num = (num << 3) + (*(p++) - '0'); + break; + + case ST_HEX: /* Hex sequence */ + switch (*p) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + num = (num << 4) + (*(p++) - '0'); + break; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + num = (num << 4) + (*(p++) - 'a') + 10; + break; + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + num = (num << 4) + (*(p++) - 'A') + 10; + break; + default: + *(q++) = num; + ++count; + state = ST_GND; + break; + } + break; + + case ST_CARET: /* Caret escape */ + state = ST_GND; /* Should be the next state... */ + if (*p >= '@' && *p <= '~') + { + *(q++) = *(p++) & 037; + ++count; + } + else if (*p == '?') + { + *(q++) = 127; + ++count; + } + else + state = ST_ERROR; + break; + + default: + /* should we ? */ + /* abort (); no, we should not */ + state = ST_ERROR; + break; + } + } + + *dest = q; + *src = p; + *output_count = count; + + return state != ST_ERROR; +} +#endif /* COLOR_SUPPORT */ + +void _rl_parse_colors(void) +{ +#if defined (COLOR_SUPPORT) + const char *p; /* Pointer to character being parsed */ + char *buf; /* color_buf buffer pointer */ + int state; /* State of parser */ + int ind_no; /* Indicator number */ + char label[3]; /* Indicator label */ + COLOR_EXT_TYPE *ext; /* Extension we are working on */ + + p = sh_get_env_value ("LS_COLORS"); + if (p == 0 || *p == '\0') + { + _rl_color_ext_list = NULL; + return; + } + + ext = NULL; + strcpy (label, "??"); + + /* This is an overly conservative estimate, but any possible + LS_COLORS string will *not* generate a color_buf longer than + itself, so it is a safe way of allocating a buffer in + advance. */ + buf = color_buf = savestring (p); + + state = 1; + while (state > 0) + { + switch (state) + { + case 1: /* First label character */ + switch (*p) + { + case ':': + ++p; + break; + + case '*': + /* Allocate new extension block and add to head of + linked list (this way a later definition will + override an earlier one, which can be useful for + having terminal-specific defs override global). */ + + ext = (COLOR_EXT_TYPE *)xmalloc (sizeof *ext); + ext->next = _rl_color_ext_list; + _rl_color_ext_list = ext; + + ++p; + ext->ext.string = buf; + + state = (get_funky_string (&buf, &p, true, &ext->ext.len) + ? 4 : -1); + break; + + case '\0': + state = 0; /* Done! */ + break; + + default: /* Assume it is file type label */ + label[0] = *(p++); + state = 2; + break; + } + break; + + case 2: /* Second label character */ + if (*p) + { + label[1] = *(p++); + state = 3; + } + else + state = -1; /* Error */ + break; + + case 3: /* Equal sign after indicator label */ + state = -1; /* Assume failure... */ + if (*(p++) == '=')/* It *should* be... */ + { + for (ind_no = 0; indicator_name[ind_no] != NULL; ++ind_no) + { + if (STREQ (label, indicator_name[ind_no])) + { + _rl_color_indicator[ind_no].string = buf; + state = (get_funky_string (&buf, &p, false, + &_rl_color_indicator[ind_no].len) + ? 1 : -1); + break; + } + } + if (state == -1) + { + _rl_errmsg ("LS_COLORS: unrecognized prefix: %s", label); + /* recover from an unrecognized prefix */ + while (p && *p && *p != ':') + p++; + if (p && *p == ':') + state = 1; + else if (p && *p == 0) + state = 0; + } + } + break; + + case 4: /* Equal sign after *.ext */ + if (*(p++) == '=') + { + ext->seq.string = buf; + state = (get_funky_string (&buf, &p, false, &ext->seq.len) + ? 1 : -1); + } + else + state = -1; + /* XXX - recover here as with an unrecognized prefix? */ + if (state == -1 && ext->ext.string) + _rl_errmsg ("LS_COLORS: syntax error: %s", ext->ext.string); + break; + } + } + + if (state < 0) + { + COLOR_EXT_TYPE *e; + COLOR_EXT_TYPE *e2; + + _rl_errmsg ("unparsable value for LS_COLORS environment variable"); + free (color_buf); + for (e = _rl_color_ext_list; e != NULL; /* empty */) + { + e2 = e; + e = e->next; + free (e2); + } + _rl_color_ext_list = NULL; + _rl_colored_stats = 0; /* can't have colored stats without colors */ + } +#else /* !COLOR_SUPPORT */ + ; +#endif /* !COLOR_SUPPORT */ +} diff --git a/lib/readline/parse-colors.h b/lib/readline/parse-colors.h new file mode 100644 index 0000000..aef86f7 --- /dev/null +++ b/lib/readline/parse-colors.h @@ -0,0 +1,46 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 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 . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#ifndef _PARSE_COLORS_H_ +#define _PARSE_COLORS_H_ + +#include "readline.h" + +#define LEN_STR_PAIR(s) sizeof (s) - 1, s + +void _rl_parse_colors (void); + +static const char *const indicator_name[]= + { + "lc", "rc", "ec", "rs", "no", "fi", "di", "ln", "pi", "so", + "bd", "cd", "mi", "or", "ex", "do", "su", "sg", "st", + "ow", "tw", "ca", "mh", "cl", NULL + }; + +/* Buffer for color sequences */ +static char *color_buf; + +#endif /* !_PARSE_COLORS_H_ */ diff --git a/lib/readline/posixdir.h b/lib/readline/posixdir.h index bd33694..b737bd7 100644 --- a/lib/readline/posixdir.h +++ b/lib/readline/posixdir.h @@ -1,6 +1,6 @@ /* posixdir.h -- Posix directory reading includes and defines. */ -/* Copyright (C) 1987,1991 Free Software Foundation, Inc. +/* Copyright (C) 1987,1991,2012,2019,2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -46,16 +46,26 @@ # define D_NAMLEN(d) ((d)->d_namlen) #endif /* !HAVE_DIRENT_H */ +/* The bash code fairly consistently uses d_fileno; make sure it's available */ #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. */ +#if !defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO) # define REAL_DIR_ENTRY(dp) 1 #else # define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) #endif /* _POSIX_SOURCE */ +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (BROKEN_DIRENT_D_INO) +# define D_INO_AVAILABLE +#endif + +/* Signal the rest of the code that it can safely use dirent.d_fileno */ +#if defined (D_INO_AVAILABLE) || defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define D_FILENO_AVAILABLE 1 +#endif + #endif /* !_POSIXDIR_H_ */ diff --git a/lib/readline/posixjmp.h b/lib/readline/posixjmp.h index 49bfecf..9c7e99e 100644 --- a/lib/readline/posixjmp.h +++ b/lib/readline/posixjmp.h @@ -1,6 +1,6 @@ /* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ -/* Copyright (C) 1987,1991 Free Software Foundation, Inc. +/* Copyright (C) 1987,1991-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,14 +27,20 @@ #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 */ + +# define setjmp_nosigs(x) sigsetjmp((x), 0) +# define setjmp_sigs(x) sigsetjmp((x), 1) + +# define _rl_longjmp(x, n) siglongjmp((x), (n)) +# define sh_longjmp(x, n) siglongjmp((x), (n)) #else # define procenv_t jmp_buf + +# define setjmp_nosigs setjmp +# define setjmp_sigs setjmp + +# define _rl_longjmp(x, n) longjmp((x), (n)) +# define sh_longjmp(x, n) longjmp((x), (n)) #endif #endif /* _POSIXJMP_H_ */ diff --git a/lib/readline/posixstat.h b/lib/readline/posixstat.h index 3eb7f29..b607786 100644 --- a/lib/readline/posixstat.h +++ b/lib/readline/posixstat.h @@ -1,7 +1,7 @@ /* posixstat.h -- Posix stat(2) definitions for systems that don't have them. */ -/* Copyright (C) 1987,1991 Free Software Foundation, Inc. +/* Copyright (C) 1987-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -132,6 +132,26 @@ # 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) +#else /* !S_IRWXU */ + /* S_IRWXU is defined, but "group" and "other" bits might not be + (happens in certain versions of MinGW). */ +# if !defined (S_IRGRP) +# define S_IRGRP (S_IREAD >> 3) /* read, group */ +# define S_IWGRP (S_IWRITE >> 3) /* write, group */ +# define S_IXGRP (S_IEXEC >> 3) /* execute, group */ +# endif /* !S_IRGRP */ + +# if !defined (S_IROTH) +# 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_IROTH */ +# if !defined (S_IRWXG) +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +# endif +# if !defined (S_IRWXO) +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +# endif #endif /* !S_IRWXU */ /* These are non-standard, but are used in builtins.c$symbolic_umask() */ diff --git a/lib/readline/posixtime.h b/lib/readline/posixtime.h new file mode 100644 index 0000000..e70ebec --- /dev/null +++ b/lib/readline/posixtime.h @@ -0,0 +1,84 @@ +/* posixtime.h -- wrapper for time.h, sys/times.h mess. */ + +/* Copyright (C) 1999-2021 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#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 rather than + sys/time.h */ +#if defined (HAVE_SYS_TIME_H) +# include +#endif +#include + +#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 */ + +#if !HAVE_TIMEVAL +struct timeval +{ + time_t tv_sec; + long int tv_usec; +}; +#endif + +#if !HAVE_GETTIMEOFDAY +extern int gettimeofday PARAMS((struct timeval *, void *)); +#endif + +/* These exist on BSD systems, at least. */ +#if !defined (timerclear) +# define timerclear(tvp) do { (tvp)->tv_sec = 0; (tvp)->tv_usec = 0; } while (0) +#endif +#if !defined (timerisset) +# define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) +#endif +#if !defined (timercmp) +# define timercmp(a, b, CMP) \ + (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) \ + : ((a)->tv_sec CMP (b)->tv_sec)) +#endif + +/* These are non-standard. */ +#if !defined (timerisunset) +# define timerisunset(tvp) ((tvp)->tv_sec == 0 && (tvp)->tv_usec == 0) +#endif +#if !defined (timerset) +# define timerset(tvp, s, u) do { tvp->tv_sec = s; tvp->tv_usec = u; } while (0) +#endif + +#ifndef TIMEVAL_TO_TIMESPEC +# define TIMEVAL_TO_TIMESPEC(tv, ts) \ + do { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ + } while (0) +#endif + +#endif /* _POSIXTIME_H_ */ diff --git a/lib/readline/readline.c b/lib/readline/readline.c index c0e78d4..9d42a8d 100644 --- a/lib/readline/readline.c +++ b/lib/readline/readline.c @@ -1,7 +1,7 @@ /* readline.c -- a general facility for reading lines of input with emacs style editing and completion. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 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. @@ -72,28 +72,34 @@ extern int errno; #include "rlshell.h" #include "xmalloc.h" +#if defined (COLOR_SUPPORT) +# include "parse-colors.h" +#endif + #ifndef RL_LIBRARY_VERSION -# define RL_LIBRARY_VERSION "5.1" +# define RL_LIBRARY_VERSION "8.1" #endif #ifndef RL_READLINE_VERSION -# define RL_READLINE_VERSION 0x0501 +# define RL_READLINE_VERSION 0x0801 #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 char *readline_internal (void); +static void readline_initialize_everything (void); + +static void run_startup_hooks (void); -static void bind_arrow_keys_internal PARAMS((Keymap)); -static void bind_arrow_keys PARAMS((void)); +static void bind_arrow_keys_internal (Keymap); +static void bind_arrow_keys (void); -static void readline_default_bindings PARAMS((void)); -static void reset_default_bindings PARAMS((void)); +static void bind_bracketed_paste_prefix (void); -static int _rl_subseq_result PARAMS((int, Keymap, int, int)); -static int _rl_subseq_getchar PARAMS((int)); +static void readline_default_bindings (void); +static void reset_default_bindings (void); + +static int _rl_subseq_result (int, Keymap, int, int); +static int _rl_subseq_getchar (int); /* **************************************************************** */ /* */ @@ -112,7 +118,6 @@ int rl_gnu_readline_p = 1; 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; @@ -145,7 +150,7 @@ static int running_in_emacs; #endif /* Flags word encapsulating the current readline state. */ -int rl_readline_state = RL_STATE_NONE; +unsigned long rl_readline_state = RL_STATE_NONE; /* The current offset in the current input line. */ int rl_point; @@ -159,6 +164,9 @@ int rl_end; /* Make this non-zero to return the current input_line. */ int rl_done; +/* If non-zero when readline_internal returns, it means we found EOF */ +int rl_eof_found = 0; + /* The last function executed by readline. */ rl_command_func_t *rl_last_func = (rl_command_func_t *)NULL; @@ -193,6 +201,10 @@ int rl_key_sequence_length = 0; before readline_internal_setup () prints the first prompt. */ rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *)NULL; +/* Any readline function can set this and have it run just before the user's + rl_startup_hook. */ +rl_hook_func_t *_rl_internal_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. */ @@ -216,7 +228,7 @@ 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; +int _rl_mark_modified_lines = 0; /* The style of `bell' notification preferred. This can be set to NO_BELL, AUDIBLE_BELL, or VISIBLE_BELL. */ @@ -228,6 +240,9 @@ char *_rl_comment_begin; /* Keymap holding the function currently being executed. */ Keymap rl_executing_keymap; +/* The function currently being executed. */ +rl_command_func_t *_rl_executing_func; + /* Keymap we're currently using to dispatch. */ Keymap _rl_dispatching_keymap; @@ -236,15 +251,37 @@ 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; +int rl_num_chars_to_read = 0; -/* Line buffer and maintenence. */ +/* Line buffer and maintenance. */ char *rl_line_buffer = (char *)NULL; int rl_line_buffer_len = 0; /* Key sequence `contexts' */ _rl_keyseq_cxt *_rl_kscxt = 0; +int rl_executing_key; +char *rl_executing_keyseq = 0; +int _rl_executing_keyseq_size = 0; + +struct _rl_cmd _rl_pending_command; +struct _rl_cmd *_rl_command_to_execute = (struct _rl_cmd *)NULL; + +/* Timeout (specified in milliseconds) when reading characters making up an + ambiguous multiple-key sequence */ +int _rl_keyseq_timeout = 500; + +#define RESIZE_KEYSEQ_BUFFER() \ + do \ + { \ + if (rl_key_sequence_length + 2 >= _rl_executing_keyseq_size) \ + { \ + _rl_executing_keyseq_size += 16; \ + rl_executing_keyseq = xrealloc (rl_executing_keyseq, _rl_executing_keyseq_size); \ + } \ + } \ + while (0); + /* Forward declarations used by the display, termcap, and history code. */ /* **************************************************************** */ @@ -279,6 +316,16 @@ int _rl_revert_all_at_newline = 0; characters corresponding to keyboard-generated signals. */ int _rl_echo_control_chars = 1; +/* Non-zero means to prefix the displayed prompt with a character indicating + the editing mode: @ for emacs, : for vi-command, + for vi-insert. */ +int _rl_show_mode_in_prompt = 0; + +/* Non-zero means to attempt to put the terminal in `bracketed paste mode', + where it will prefix pasted text with an escape sequence and send + another to mark the end of the paste. */ +int _rl_enable_bracketed_paste = BRACKETED_PASTE_DEFAULT; +int _rl_enable_active_region = BRACKETED_PASTE_DEFAULT; + /* **************************************************************** */ /* */ /* Top Level Functions */ @@ -291,8 +338,7 @@ 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; +rl_set_prompt (const char *prompt) { FREE (rl_prompt); rl_prompt = prompt ? savestring (prompt) : (char *)NULL; @@ -305,8 +351,7 @@ rl_set_prompt (prompt) /* 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; +readline (const char *prompt) { char *value; #if 0 @@ -352,9 +397,24 @@ readline (prompt) RL_SETSTATE (RL_STATE_CALLBACK); #endif +#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT) + if (value) + _rl_audit_tty (value); +#endif + return (value); } +static void +run_startup_hooks (void) +{ + if (rl_startup_hook) + (*rl_startup_hook) (); + + if (_rl_internal_startup_hook) + (*_rl_internal_startup_hook) (); +} + #if defined (READLINE_CALLBACKS) # define STATIC_CALLBACK #else @@ -362,15 +422,29 @@ readline (prompt) #endif STATIC_CALLBACK void -readline_internal_setup () +readline_internal_setup (void) { char *nprompt; _rl_in_stream = rl_instream; _rl_out_stream = rl_outstream; - if (rl_startup_hook) - (*rl_startup_hook) (); + /* Enable the meta key only for the duration of readline(), if this + terminal has one and the terminal has been initialized */ + if (_rl_enable_meta & RL_ISSTATE (RL_STATE_TERMPREPPED)) + _rl_enable_meta_key (); + + run_startup_hooks (); + + rl_deactivate_mark (); + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + rl_vi_insertion_mode (1, 'i'); /* don't want to reset last */ + else +#endif /* VI_MODE */ + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); /* 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 @@ -382,7 +456,7 @@ readline_internal_setup () nprompt = _rl_strip_prompt (rl_prompt); fprintf (_rl_out_stream, "%s", nprompt); fflush (_rl_out_stream); - free (nprompt); + xfree (nprompt); } } else @@ -394,11 +468,6 @@ readline_internal_setup () (*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) (); @@ -406,27 +475,32 @@ readline_internal_setup () } STATIC_CALLBACK char * -readline_internal_teardown (eof) - int eof; +readline_internal_teardown (int eof) { char *temp; HIST_ENTRY *entry; RL_CHECK_SIGNALS (); + if (eof) + RL_SETSTATE (RL_STATE_EOF); /* XXX */ + /* 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 (); + /* We don't want to do this if we executed functions that call + history_set_pos to set the history offset to the line containing the + non-incremental search string. */ 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); + xfree (temp); } if (_rl_revert_all_at_newline) @@ -437,6 +511,11 @@ readline_internal_teardown (eof) if (rl_undo_list) rl_free_undo_list (); + /* Disable the meta key, if this terminal has one and we were told to use it. + The check whether or not we sent the enable string is in + _rl_disable_meta_key(); the flag is set in _rl_enable_meta_key */ + _rl_disable_meta_key (); + /* Restore normal cursor, if available. */ _rl_set_insert_mode (RL_IM_INSERT, 0); @@ -444,8 +523,13 @@ readline_internal_teardown (eof) } void -_rl_internal_char_cleanup () +_rl_internal_char_cleanup (void) { + if (_rl_keep_mark_active) + _rl_keep_mark_active = 0; + else if (rl_mark_active_p ()) + rl_deactivate_mark (); + #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. */ @@ -475,29 +559,42 @@ _rl_internal_char_cleanup () STATIC_CALLBACK int #if defined (READLINE_CALLBACKS) -readline_internal_char () +readline_internal_char (void) #else -readline_internal_charloop () +readline_internal_charloop (void) #endif { static int lastc, eof_found; - int c, code, lk; + int c, code, lk, r; - lastc = -1; - eof_found = 0; + lastc = EOF; #if !defined (READLINE_CALLBACKS) + eof_found = 0; while (rl_done == 0) { #endif lk = _rl_last_command_was_kill; +#if defined (HAVE_POSIX_SIGSETJMP) + code = sigsetjmp (_rl_top_level, 0); +#else code = setjmp (_rl_top_level); +#endif if (code) { (*rl_redisplay_function) (); _rl_want_redisplay = 0; + + /* If we longjmped because of a timeout, handle it here. */ + if (RL_ISSTATE (RL_STATE_TIMEOUT)) + { + RL_SETSTATE (RL_STATE_DONE); + rl_done = 1; + return 1; + } + /* 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 @@ -510,7 +607,7 @@ readline_internal_charloop () { /* Then initialize the argument and number of keys read. */ _rl_reset_argument (); - rl_key_sequence_length = 0; + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; } RL_SETSTATE(RL_STATE_READCMD); @@ -519,39 +616,84 @@ readline_internal_charloop () /* 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. */ + a newline; assume that rl_read_key has already called the signal + handler. */ if (c == READERR) { #if defined (READLINE_CALLBACKS) RL_SETSTATE(RL_STATE_DONE); return (rl_done = 1); #else + RL_SETSTATE(RL_STATE_EOF); eof_found = 1; break; #endif } - /* EOF typed to a non-blank line is a . */ + /* EOF typed to a non-blank line is ^D the first time, EOF the second + time in a row. This won't return any partial line read from the tty. + If we want to change this, to force any existing line to be returned + when read(2) reads EOF, for example, this is the place to change. */ if (c == EOF && rl_end) - c = NEWLINE; + { + if (RL_SIG_RECEIVED ()) + { + RL_CHECK_SIGNALS (); + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); /* XXX */ + } + + /* XXX - reading two consecutive EOFs returns EOF */ + if (RL_ISSTATE (RL_STATE_TERMPREPPED)) + { + if (lastc == _rl_eof_char || lastc == EOF) + rl_end = 0; + else + c = _rl_eof_char; + } + else + 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) + previous character is interpreted as EOF. This doesn't work when + READLINE_CALLBACKS is defined, so hitting a series of ^Ds will + erase all the chars on the line and then return EOF. */ + if (((c == _rl_eof_char && lastc != c) || c == EOF) && rl_end == 0) { #if defined (READLINE_CALLBACKS) RL_SETSTATE(RL_STATE_DONE); return (rl_done = 1); #else + RL_SETSTATE(RL_STATE_EOF); eof_found = 1; break; #endif } lastc = c; - _rl_dispatch ((unsigned char)c, _rl_keymap); + r = _rl_dispatch ((unsigned char)c, _rl_keymap); RL_CHECK_SIGNALS (); + if (_rl_command_to_execute) + { + (*rl_redisplay_function) (); + + rl_executing_keymap = _rl_command_to_execute->map; + rl_executing_key = _rl_command_to_execute->key; + + _rl_executing_func = _rl_command_to_execute->func; + + rl_dispatching = 1; + RL_SETSTATE(RL_STATE_DISPATCHING); + r = (*(_rl_command_to_execute->func)) (_rl_command_to_execute->count, _rl_command_to_execute->key); + _rl_command_to_execute = 0; + RL_UNSETSTATE(RL_STATE_DISPATCHING); + rl_dispatching = 0; + + 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. */ @@ -571,7 +713,7 @@ readline_internal_charloop () #if defined (READLINE_CALLBACKS) static int -readline_internal_charloop () +readline_internal_charloop (void) { int eof = 1; @@ -585,17 +727,15 @@ readline_internal_charloop () the global rl_outstream. If rl_prompt is non-null, then that is our prompt. */ static char * -readline_internal () +readline_internal (void) { - int eof; - readline_internal_setup (); - eof = readline_internal_charloop (); - return (readline_internal_teardown (eof)); + rl_eof_found = readline_internal_charloop (); + return (readline_internal_teardown (rl_eof_found)); } void -_rl_init_line_state () +_rl_init_line_state (void) { rl_point = rl_end = rl_mark = 0; the_line = rl_line_buffer; @@ -603,14 +743,14 @@ _rl_init_line_state () } void -_rl_set_the_line () +_rl_set_the_line (void) { the_line = rl_line_buffer; } #if defined (READLINE_CALLBACKS) _rl_keyseq_cxt * -_rl_keyseq_cxt_alloc () +_rl_keyseq_cxt_alloc (void) { _rl_keyseq_cxt *cxt; @@ -626,14 +766,13 @@ _rl_keyseq_cxt_alloc () } void -_rl_keyseq_cxt_dispose (cxt) - _rl_keyseq_cxt *cxt; +_rl_keyseq_cxt_dispose (_rl_keyseq_cxt *cxt) { - free (cxt); + xfree (cxt); } void -_rl_keyseq_chain_dispose () +_rl_keyseq_chain_dispose (void) { _rl_keyseq_cxt *cxt; @@ -647,8 +786,7 @@ _rl_keyseq_chain_dispose () #endif static int -_rl_subseq_getchar (key) - int key; +_rl_subseq_getchar (int key) { int k; @@ -665,8 +803,7 @@ _rl_subseq_getchar (key) #if defined (READLINE_CALLBACKS) int -_rl_dispatch_callback (cxt) - _rl_keyseq_cxt *cxt; +_rl_dispatch_callback (_rl_keyseq_cxt *cxt) { int nkey, r; @@ -694,7 +831,8 @@ _rl_dispatch_callback (cxt) r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ)); RL_CHECK_SIGNALS (); - if (r == 0) /* success! */ + /* We only treat values < 0 specially to simulate recursion. */ + if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */ { _rl_keyseq_chain_dispose (); RL_UNSETSTATE (RL_STATE_MULTIKEY); @@ -716,19 +854,14 @@ _rl_dispatch_callback (cxt) 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_dispatch (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; +_rl_dispatch_subseq (register int key, Keymap map, int got_subseq) { int r, newkey; char *macro; @@ -743,9 +876,10 @@ _rl_dispatch_subseq (key, map, got_subseq) { if (RL_ISSTATE (RL_STATE_MACRODEF)) _rl_add_macro_char (ESC); + RESIZE_KEYSEQ_BUFFER (); + rl_executing_keyseq[rl_key_sequence_length++] = ESC; map = FUNCTION_TO_KEYMAP (map, ESC); key = UNMETA (key); - rl_key_sequence_length += 2; return (_rl_dispatch (key, map)); } else @@ -765,20 +899,32 @@ _rl_dispatch_subseq (key, map, got_subseq) { /* Special case rl_do_lowercase_version (). */ if (func == rl_do_lowercase_version) - return (_rl_dispatch (_rl_to_lower (key), map)); + /* Should we do anything special if key == ANYOTHERKEY? */ + return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map)); rl_executing_keymap = map; + rl_executing_key = key; + + _rl_executing_func = func; + + RESIZE_KEYSEQ_BUFFER(); + rl_executing_keyseq[rl_key_sequence_length++] = key; + rl_executing_keyseq[rl_key_sequence_length] = '\0'; rl_dispatching = 1; RL_SETSTATE(RL_STATE_DISPATCHING); - (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); + r = (*func) (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 defined (VI_MODE) + if (rl_pending_input == 0 && map[key].function != rl_digit_argument && map[key].function != rl_vi_arg_digit) +#else if (rl_pending_input == 0 && map[key].function != rl_digit_argument) +#endif rl_last_func = map[key].function; RL_CHECK_SIGNALS (); @@ -788,7 +934,12 @@ _rl_dispatch_subseq (key, map, got_subseq) /* 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); + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; return -2; } else if (got_subseq) @@ -797,7 +948,12 @@ _rl_dispatch_subseq (key, map, got_subseq) 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); + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; return -1; } else @@ -820,18 +976,43 @@ _rl_dispatch_subseq (key, map, got_subseq) 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) + away. This is essentially an input test with a zero timeout (by + default) or a timeout determined by the value of `keyseq-timeout' */ + /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued + takes microseconds, so multiply by 1000 */ + if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0) return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key))); + /* This is a very specific test. It can possibly be generalized in + the future, but for now it handles a specific case of ESC being + the last character in a keyboard macro. */ + if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap && + (RL_ISSTATE (RL_STATE_INPUTPENDING) == 0) && + (RL_ISSTATE (RL_STATE_MACROINPUT) && _rl_peek_macro_key () == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0) + return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key))); #endif - rl_key_sequence_length++; + RESIZE_KEYSEQ_BUFFER (); + rl_executing_keyseq[rl_key_sequence_length++] = key; _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 defined (VI_MODE) + /* If we're redoing a vi mode command and we know there is a shadowed + function corresponding to this key, just call it -- all the redoable + vi mode commands already have all the input they need, and rl_vi_redo + assumes that one call to rl_dispatch is sufficient to complete the + command. */ + if (_rl_vi_redoing && RL_ISSTATE (RL_STATE_CALLBACK) && + map[ANYOTHERKEY].function != 0) + return (_rl_subseq_result (-2, map, key, got_subseq)); +# endif if (RL_ISSTATE (RL_STATE_CALLBACK)) { /* Return 0 only the first time, to indicate success to @@ -855,6 +1036,22 @@ _rl_dispatch_subseq (key, map, got_subseq) } #endif + /* Tentative inter-character timeout for potential multi-key + sequences? If no input within timeout, abort sequence and + act as if we got non-matching input. */ + /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued + takes microseconds, so multiply by 1000 */ + if (_rl_keyseq_timeout > 0 && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_dispatching_keymap[ANYOTHERKEY].function && + _rl_input_queued (_rl_keyseq_timeout*1000) == 0) + { + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; + return (_rl_subseq_result (-2, map, key, got_subseq)); + } + newkey = _rl_subseq_getchar (key); if (newkey < 0) { @@ -867,7 +1064,7 @@ _rl_dispatch_subseq (key, map, got_subseq) } else { - _rl_abort_internal (); + _rl_abort_internal (); /* XXX */ return -1; } break; @@ -875,15 +1072,18 @@ _rl_dispatch_subseq (key, map, got_subseq) case ISMACR: if (map[key].function != 0) { + rl_executing_keyseq[rl_key_sequence_length] = '\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_dispatching_keymap == vi_movement_keymap && _rl_vi_textmod_command (key)) _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); #endif @@ -892,10 +1092,7 @@ _rl_dispatch_subseq (key, map, got_subseq) } static int -_rl_subseq_result (r, map, key, got_subseq) - int r; - Keymap map; - int key, got_subseq; +_rl_subseq_result (int r, Keymap map, int key, int got_subseq) { Keymap m; int type, nt; @@ -912,37 +1109,52 @@ _rl_subseq_result (r, map, key, got_subseq) 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) + r = _rl_dispatch (_rl_to_lower ((unsigned char)key), map); + else if (type == ISFUNC) { - /* 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. */ + /* If we shadowed a function, whatever it is, we somehow need a + keymap with map[key].func == shadowed-function. + Let's use this one. Then we can dispatch using the original + key, since there are commands (e.g., in vi mode) for which it + matters. */ nt = m[key].type; nf = m[key].function; m[key].type = type; m[key].function = func; - r = _rl_dispatch (key, m); + /* Don't change _rl_dispatching_keymap, set it here */ + _rl_dispatching_keymap = map; /* previous map */ + r = _rl_dispatch_subseq (key, m, 0); m[key].type = nt; m[key].function = nf; } else + /* We probably shadowed a keymap, so keep going. */ r = _rl_dispatch (ANYOTHERKEY, m); } - else if (r && map[ANYOTHERKEY].function) + else if (r < 0 && 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); + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; _rl_dispatching_keymap = map; return -2; } - else if (r && got_subseq) + else if (r < 0 && got_subseq) /* XXX */ { /* OK, back up the chain. */ - _rl_unget_char (key); + if (RL_ISSTATE (RL_STATE_MACROINPUT)) + _rl_prev_macro_key (); + else + _rl_unget_char (key); + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; _rl_dispatching_keymap = map; return -1; } @@ -958,11 +1170,14 @@ _rl_subseq_result (r, map, key, got_subseq) /* Initialize readline (and terminal if not already). */ int -rl_initialize () +rl_initialize (void) { + /* Initialize the timeout first to get the precise start time. */ + _rl_timeout_init (); + /* If we have never been called before, initialize the terminal and data structures. */ - if (!rl_initialized) + if (rl_initialized == 0) { RL_SETSTATE(RL_STATE_INITIALIZING); readline_initialize_everything (); @@ -970,13 +1185,15 @@ rl_initialize () rl_initialized++; RL_SETSTATE(RL_STATE_INITIALIZED); } + else + _rl_reset_locale (); /* check current locale and set locale variables */ - /* Initalize the current line information. */ + /* Initialize 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); + RL_UNSETSTATE(RL_STATE_DONE|RL_STATE_TIMEOUT|RL_STATE_EOF); /* Tell the history routines what is going on. */ _rl_start_using_history (); @@ -1004,7 +1221,7 @@ rl_initialize () #if 0 #if defined (__EMX__) static void -_emx_build_environ () +_emx_build_environ (void) { TIB *tibp; PIB *pibp; @@ -1029,7 +1246,7 @@ _emx_build_environ () /* Initialize the entire state of the world. */ static void -readline_initialize_everything () +readline_initialize_everything (void) { #if 0 #if defined (__EMX__) @@ -1091,21 +1308,30 @@ readline_initialize_everything () /* 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 (); + /* Bind the bracketed paste prefix assuming that the user will enable + it on terminals that support it. */ + bind_bracketed_paste_prefix (); /* 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 (rl_completer_word_break_characters == 0) + rl_completer_word_break_characters = rl_basic_word_break_characters; + +#if defined (COLOR_SUPPORT) + if (_rl_colored_stats || _rl_colored_completion_prefix) + _rl_parse_colors (); +#endif + + rl_executing_keyseq = malloc (_rl_executing_keyseq_size = 16); + if (rl_executing_keyseq) + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; } /* 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 () +readline_default_bindings (void) { if (_rl_bind_stty_chars) rl_tty_set_default_bindings (_rl_keymap); @@ -1114,7 +1340,7 @@ readline_default_bindings () /* 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 () +reset_default_bindings (void) { if (_rl_bind_stty_chars) { @@ -1125,8 +1351,7 @@ reset_default_bindings () /* Bind some common arrow key sequences in MAP. */ static void -bind_arrow_keys_internal (map) - Keymap map; +bind_arrow_keys_internal (Keymap map) { Keymap xkeymap; @@ -1154,11 +1379,34 @@ bind_arrow_keys_internal (map) rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line); rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line); + /* Key bindings for control-arrow keys */ + rl_bind_keyseq_if_unbound ("\033[1;5C", rl_forward_word); + rl_bind_keyseq_if_unbound ("\033[1;5D", rl_backward_word); + rl_bind_keyseq_if_unbound ("\033[3;5~", rl_kill_word); + + /* Key bindings for alt-arrow keys */ + rl_bind_keyseq_if_unbound ("\033[1;3C", rl_forward_word); + rl_bind_keyseq_if_unbound ("\033[1;3D", rl_backward_word); + #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); + rl_bind_keyseq_if_unbound ("\340G", rl_beg_of_line); + rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line); + rl_bind_keyseq_if_unbound ("\340S", rl_delete); + rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode); + + /* These may or may not work because of the embedded NUL. */ + rl_bind_keyseq_if_unbound ("\\000H", rl_get_previous_history); + rl_bind_keyseq_if_unbound ("\\000P", rl_get_next_history); + rl_bind_keyseq_if_unbound ("\\000M", rl_forward_char); + rl_bind_keyseq_if_unbound ("\\000K", rl_backward_char); + rl_bind_keyseq_if_unbound ("\\000G", rl_beg_of_line); + rl_bind_keyseq_if_unbound ("\\000O", rl_end_of_line); + rl_bind_keyseq_if_unbound ("\\000S", rl_delete); + rl_bind_keyseq_if_unbound ("\\000R", rl_overwrite_mode); #endif _rl_keymap = xkeymap; @@ -1168,7 +1416,7 @@ bind_arrow_keys_internal (map) 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 (void) { bind_arrow_keys_internal (emacs_standard_keymap); @@ -1182,6 +1430,25 @@ bind_arrow_keys () #endif } +static void +bind_bracketed_paste_prefix (void) +{ + Keymap xkeymap; + + xkeymap = _rl_keymap; + + _rl_keymap = emacs_standard_keymap; + rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_bracketed_paste_begin); + +#if defined (VI_MODE) + _rl_keymap = vi_insertion_keymap; + rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_bracketed_paste_begin); + /* XXX - is there a reason to do this in the vi command keymap? */ +#endif + + _rl_keymap = xkeymap; +} + /* **************************************************************** */ /* */ /* Saving and Restoring Readline's state */ @@ -1189,8 +1456,7 @@ bind_arrow_keys () /* **************************************************************** */ int -rl_save_state (sp) - struct readline_state *sp; +rl_save_state (struct readline_state *sp) { if (sp == 0) return -1; @@ -1210,6 +1476,7 @@ rl_save_state (sp) sp->lastfunc = rl_last_func; sp->insmode = rl_insert_mode; sp->edmode = rl_editing_mode; + sp->kseq = rl_executing_keyseq; sp->kseqlen = rl_key_sequence_length; sp->inf = rl_instream; sp->outf = rl_outstream; @@ -1219,12 +1486,17 @@ rl_save_state (sp) sp->catchsigs = rl_catch_signals; sp->catchsigwinch = rl_catch_sigwinch; + sp->entryfunc = rl_completion_entry_function; + sp->menuentryfunc = rl_menu_completion_entry_function; + sp->ignorefunc = rl_ignore_some_completions_function; + sp->attemptfunc = rl_attempted_completion_function; + sp->wordbreakchars = rl_completer_word_break_characters; + return (0); } int -rl_restore_state (sp) - struct readline_state *sp; +rl_restore_state (struct readline_state *sp) { if (sp == 0) return -1; @@ -1244,6 +1516,7 @@ rl_restore_state (sp) rl_last_func = sp->lastfunc; rl_insert_mode = sp->insmode; rl_editing_mode = sp->edmode; + rl_executing_keyseq = sp->kseq; rl_key_sequence_length = sp->kseqlen; rl_instream = sp->inf; rl_outstream = sp->outf; @@ -1253,5 +1526,50 @@ rl_restore_state (sp) rl_catch_signals = sp->catchsigs; rl_catch_sigwinch = sp->catchsigwinch; + rl_completion_entry_function = sp->entryfunc; + rl_menu_completion_entry_function = sp->menuentryfunc; + rl_ignore_some_completions_function = sp->ignorefunc; + rl_attempted_completion_function = sp->attemptfunc; + rl_completer_word_break_characters = sp->wordbreakchars; + + rl_deactivate_mark (); + return (0); } + +/* Functions to manage the string that is the current key sequence. */ + +void +_rl_init_executing_keyseq (void) +{ + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; +} + +void +_rl_term_executing_keyseq (void) +{ + rl_executing_keyseq[rl_key_sequence_length] = '\0'; +} + +void +_rl_end_executing_keyseq (void) +{ + if (rl_key_sequence_length > 0) + rl_executing_keyseq[--rl_key_sequence_length] = '\0'; +} + +void +_rl_add_executing_keyseq (int key) +{ + RESIZE_KEYSEQ_BUFFER (); + rl_executing_keyseq[rl_key_sequence_length++] = key; +} + +/* `delete' the last character added to the executing key sequence. Use this + before calling rl_execute_next to avoid keys being added twice. */ +void +_rl_del_executing_keyseq (void) +{ + if (rl_key_sequence_length > 0) + rl_key_sequence_length--; +} diff --git a/lib/readline/readline.h b/lib/readline/readline.h index 7a4ffaa..cac269f 100644 --- a/lib/readline/readline.h +++ b/lib/readline/readline.h @@ -1,6 +1,6 @@ /* Readline.h -- the names of functions callable from within readline. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2022 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. @@ -39,9 +39,9 @@ extern "C" { #endif /* Hex-encoded Readline version number. */ -#define RL_READLINE_VERSION 0x0600 /* Readline 6.0 */ -#define RL_VERSION_MAJOR 6 -#define RL_VERSION_MINOR 0 +#define RL_READLINE_VERSION 0x0802 /* Readline 8.2 */ +#define RL_VERSION_MAJOR 8 +#define RL_VERSION_MINOR 2 /* Readline data structures. */ @@ -79,199 +79,212 @@ extern FUNMAP **funmap; /* **************************************************************** */ /* Bindable commands for numeric arguments. */ -extern int rl_digit_argument PARAMS((int, int)); -extern int rl_universal_argument PARAMS((int, int)); +extern int rl_digit_argument (int, int); +extern int rl_universal_argument (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)); +extern int rl_forward_byte (int, int); +extern int rl_forward_char (int, int); +extern int rl_forward (int, int); +extern int rl_backward_byte (int, int); +extern int rl_backward_char (int, int); +extern int rl_backward (int, int); +extern int rl_beg_of_line (int, int); +extern int rl_end_of_line (int, int); +extern int rl_forward_word (int, int); +extern int rl_backward_word (int, int); +extern int rl_refresh_line (int, int); +extern int rl_clear_screen (int, int); +extern int rl_clear_display (int, int); +extern int rl_skip_csi_sequence (int, int); +extern int rl_arrow_keys (int, int); + +extern int rl_previous_screen_line (int, int); +extern int rl_next_screen_line (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)); +extern int rl_insert (int, int); +extern int rl_quoted_insert (int, int); +extern int rl_tab_insert (int, int); +extern int rl_newline (int, int); +extern int rl_do_lowercase_version (int, int); +extern int rl_rubout (int, int); +extern int rl_delete (int, int); +extern int rl_rubout_or_delete (int, int); +extern int rl_delete_horizontal_space (int, int); +extern int rl_delete_or_show_completions (int, int); +extern int rl_insert_comment (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)); +extern int rl_upcase_word (int, int); +extern int rl_downcase_word (int, int); +extern int rl_capitalize_word (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)); +extern int rl_transpose_words (int, int); +extern int rl_transpose_chars (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)); +extern int rl_char_search (int, int); +extern int rl_backward_char_search (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)); +extern int rl_beginning_of_history (int, int); +extern int rl_end_of_history (int, int); +extern int rl_get_next_history (int, int); +extern int rl_get_previous_history (int, int); +extern int rl_operate_and_get_next (int, int); +extern int rl_fetch_history (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)); +extern int rl_set_mark (int, int); +extern int rl_exchange_point_and_mark (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)); +extern int rl_vi_editing_mode (int, int); +extern int rl_emacs_editing_mode (int, int); /* Bindable commands to change the insert mode (insert or overwrite) */ -extern int rl_overwrite_mode PARAMS((int, int)); +extern int rl_overwrite_mode (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)); +extern int rl_re_read_init_file (int, int); +extern int rl_dump_functions (int, int); +extern int rl_dump_macros (int, int); +extern int rl_dump_variables (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)); +extern int rl_complete (int, int); +extern int rl_possible_completions (int, int); +extern int rl_insert_completions (int, int); +extern int rl_old_menu_complete (int, int); +extern int rl_menu_complete (int, int); +extern int rl_backward_menu_complete (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)); +extern int rl_kill_word (int, int); +extern int rl_backward_kill_word (int, int); +extern int rl_kill_line (int, int); +extern int rl_backward_kill_line (int, int); +extern int rl_kill_full_line (int, int); +extern int rl_unix_word_rubout (int, int); +extern int rl_unix_filename_rubout (int, int); +extern int rl_unix_line_discard (int, int); +extern int rl_copy_region_to_kill (int, int); +extern int rl_kill_region (int, int); +extern int rl_copy_forward_word (int, int); +extern int rl_copy_backward_word (int, int); +extern int rl_yank (int, int); +extern int rl_yank_pop (int, int); +extern int rl_yank_nth_arg (int, int); +extern int rl_yank_last_arg (int, int); +extern int rl_bracketed_paste_begin (int, int); +/* Not available unless _WIN32 is defined. */ +#if defined (_WIN32) +extern int rl_paste_from_clipboard (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)); +extern int rl_reverse_search_history (int, int); +extern int rl_forward_search_history (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)); +extern int rl_start_kbd_macro (int, int); +extern int rl_end_kbd_macro (int, int); +extern int rl_call_last_kbd_macro (int, int); +extern int rl_print_last_kbd_macro (int, int); /* Bindable undo commands. */ -extern int rl_revert_line PARAMS((int, int)); -extern int rl_undo_command PARAMS((int, int)); +extern int rl_revert_line (int, int); +extern int rl_undo_command (int, int); /* Bindable tilde expansion commands. */ -extern int rl_tilde_expand PARAMS((int, int)); +extern int rl_tilde_expand (int, int); /* Bindable terminal control commands. */ -extern int rl_restart_output PARAMS((int, int)); -extern int rl_stop_output PARAMS((int, int)); +extern int rl_restart_output (int, int); +extern int rl_stop_output (int, int); /* Miscellaneous bindable commands. */ -extern int rl_abort PARAMS((int, int)); -extern int rl_tty_status PARAMS((int, int)); +extern int rl_abort (int, int); +extern int rl_tty_status (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)); +extern int rl_history_search_forward (int, int); +extern int rl_history_search_backward (int, int); +extern int rl_history_substr_search_forward (int, int); +extern int rl_history_substr_search_backward (int, int); +extern int rl_noninc_forward_search (int, int); +extern int rl_noninc_reverse_search (int, int); +extern int rl_noninc_forward_search_again (int, int); +extern int rl_noninc_reverse_search_again (int, int); /* Bindable command used when inserting a matching close character. */ -extern int rl_insert_close PARAMS((int, int)); +extern int rl_insert_close (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)); +extern void rl_callback_handler_install (const char *, rl_vcpfunc_t *); +extern void rl_callback_read_char (void); +extern void rl_callback_handler_remove (void); +extern void rl_callback_sigcleanup (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)); +extern int rl_vi_redo (int, int); +extern int rl_vi_undo (int, int); +extern int rl_vi_yank_arg (int, int); +extern int rl_vi_fetch_history (int, int); +extern int rl_vi_search_again (int, int); +extern int rl_vi_search (int, int); +extern int rl_vi_complete (int, int); +extern int rl_vi_tilde_expand (int, int); +extern int rl_vi_prev_word (int, int); +extern int rl_vi_next_word (int, int); +extern int rl_vi_end_word (int, int); +extern int rl_vi_insert_beg (int, int); +extern int rl_vi_append_mode (int, int); +extern int rl_vi_append_eol (int, int); +extern int rl_vi_eof_maybe (int, int); +extern int rl_vi_insertion_mode (int, int); +extern int rl_vi_insert_mode (int, int); +extern int rl_vi_movement_mode (int, int); +extern int rl_vi_arg_digit (int, int); +extern int rl_vi_change_case (int, int); +extern int rl_vi_put (int, int); +extern int rl_vi_column (int, int); +extern int rl_vi_delete_to (int, int); +extern int rl_vi_change_to (int, int); +extern int rl_vi_yank_to (int, int); +extern int rl_vi_yank_pop (int, int); +extern int rl_vi_rubout (int, int); +extern int rl_vi_delete (int, int); +extern int rl_vi_back_to_indent (int, int); +extern int rl_vi_unix_word_rubout (int, int); +extern int rl_vi_first_print (int, int); +extern int rl_vi_char_search (int, int); +extern int rl_vi_match (int, int); +extern int rl_vi_change_char (int, int); +extern int rl_vi_subst (int, int); +extern int rl_vi_overstrike (int, int); +extern int rl_vi_overstrike_delete (int, int); +extern int rl_vi_replace (int, int); +extern int rl_vi_set_mark (int, int); +extern int rl_vi_goto_mark (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 int rl_vi_check (void); +extern int rl_vi_domove (int, int *); +extern int rl_vi_bracktype (int); -extern void rl_vi_start_inserting PARAMS((int, int, int)); +extern void rl_vi_start_inserting (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)); +extern int rl_vi_fWord (int, int); +extern int rl_vi_bWord (int, int); +extern int rl_vi_eWord (int, int); +extern int rl_vi_fword (int, int); +extern int rl_vi_bword (int, int); +extern int rl_vi_eword (int, int); /* **************************************************************** */ /* */ @@ -281,99 +294,115 @@ extern int rl_vi_eword PARAMS((int, int)); /* Readline functions. */ /* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */ -extern char *readline PARAMS((const char *)); +extern char *readline (const char *); -extern int rl_set_prompt PARAMS((const char *)); -extern int rl_expand_prompt PARAMS((char *)); +extern int rl_set_prompt (const char *); +extern int rl_expand_prompt (char *); -extern int rl_initialize PARAMS((void)); +extern int rl_initialize (void); /* Undocumented; unused by readline */ -extern int rl_discard_argument PARAMS((void)); +extern int rl_discard_argument (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 *)); +extern int rl_add_defun (const char *, rl_command_func_t *, int); +extern int rl_bind_key (int, rl_command_func_t *); +extern int rl_bind_key_in_map (int, rl_command_func_t *, Keymap); +extern int rl_unbind_key (int); +extern int rl_unbind_key_in_map (int, Keymap); +extern int rl_bind_key_if_unbound (int, rl_command_func_t *); +extern int rl_bind_key_if_unbound_in_map (int, rl_command_func_t *, Keymap); +extern int rl_unbind_function_in_map (rl_command_func_t *, Keymap); +extern int rl_unbind_command_in_map (const char *, Keymap); +extern int rl_bind_keyseq (const char *, rl_command_func_t *); +extern int rl_bind_keyseq_in_map (const char *, rl_command_func_t *, Keymap); +extern int rl_bind_keyseq_if_unbound (const char *, rl_command_func_t *); +extern int rl_bind_keyseq_if_unbound_in_map (const char *, rl_command_func_t *, Keymap); +extern int rl_generic_bind (int, const char *, char *, Keymap); + +extern char *rl_variable_value (const char *); +extern int rl_variable_bind (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)); +extern int rl_set_key (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)); +extern int rl_macro_bind (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 int rl_translate_keyseq (const char *, char *, int *); +extern char *rl_untranslate_keyseq (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 rl_command_func_t *rl_named_function (const char *); +extern rl_command_func_t *rl_function_of_keyseq (const char *, Keymap, int *); +extern rl_command_func_t *rl_function_of_keyseq_len (const char *, size_t, Keymap, int *); +extern int rl_trim_arg_from_keyseq (const char *, size_t, Keymap); -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_list_funmap_names (void); +extern char **rl_invoking_keyseqs_in_map (rl_command_func_t *, Keymap); +extern char **rl_invoking_keyseqs (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 void rl_function_dumper (int); +extern void rl_macro_dumper (int); +extern void rl_variable_dumper (int); -extern int rl_read_init_file PARAMS((const char *)); -extern int rl_parse_and_bind PARAMS((char *)); +extern int rl_read_init_file (const char *); +extern int rl_parse_and_bind (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)); +extern Keymap rl_make_bare_keymap (void); +extern int rl_empty_keymap (Keymap); +extern Keymap rl_copy_keymap (Keymap); +extern Keymap rl_make_keymap (void); +extern void rl_discard_keymap (Keymap); +extern void rl_free_keymap (Keymap); + +extern Keymap rl_get_keymap_by_name (const char *); +extern char *rl_get_keymap_name (Keymap); +extern void rl_set_keymap (Keymap); +extern Keymap rl_get_keymap (void); + +extern int rl_set_keymap_name (const char *, Keymap); + /* 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)); +extern void rl_set_keymap_from_edit_mode (void); +extern char *rl_get_keymap_name_from_edit_mode (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)); +extern int rl_add_funmap_entry (const char *, rl_command_func_t *); +extern const char **rl_funmap_names (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)); +extern void rl_initialize_funmap (void); /* Utility functions for managing keyboard macros. */ -extern void rl_push_macro_input PARAMS((char *)); +extern void rl_push_macro_input (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)); +extern void rl_add_undo (enum undo_code, int, int, char *); +extern void rl_free_undo_list (void); +extern int rl_do_undo (void); +extern int rl_begin_undo_group (void); +extern int rl_end_undo_group (void); +extern int rl_modifying (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)); +extern void rl_redisplay (void); +extern int rl_on_new_line (void); +extern int rl_on_new_line_with_prompt (void); +extern int rl_forced_update_display (void); +extern int rl_clear_visible_line (void); +extern int rl_clear_message (void); +extern int rl_reset_line_state (void); +extern int rl_crlf (void); + +/* Functions to manage the mark and region, especially the notion of an + active mark and an active region. */ +extern void rl_keep_mark_active (void); + +extern void rl_activate_mark (void); +extern void rl_deactivate_mark (void); +extern int rl_mark_active_p (void); #if defined (USE_VARARGS) && defined (PREFER_STDARG) extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); @@ -381,90 +410,106 @@ extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, extern int rl_message (); #endif -extern int rl_show_char PARAMS((int)); +extern int rl_show_char (int); /* Undocumented in texinfo manual. */ -extern int rl_character_len PARAMS((int, int)); +extern int rl_character_len (int, int); +extern void rl_redraw_prompt_last_line (void); /* Save and restore internal prompt redisplay information. */ -extern void rl_save_prompt PARAMS((void)); -extern void rl_restore_prompt PARAMS((void)); +extern void rl_save_prompt (void); +extern void rl_restore_prompt (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)); +extern void rl_replace_line (const char *, int); +extern int rl_insert_text (const char *); +extern int rl_delete_text (int, int); +extern int rl_kill_text (int, int); +extern char *rl_copy_text (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 void rl_prep_terminal (int); +extern void rl_deprep_terminal (void); +extern void rl_tty_set_default_bindings (Keymap); +extern void rl_tty_unset_default_bindings (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 int rl_tty_set_echoing (int); +extern int rl_reset_terminal (const char *); +extern void rl_resize_terminal (void); +extern void rl_set_screen_size (int, int); +extern void rl_get_screen_size (int *, int *); +extern void rl_reset_screen_size (void); -extern char *rl_get_termcap PARAMS((const char *)); +extern char *rl_get_termcap (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)); +extern int rl_stuff_char (int); +extern int rl_execute_next (int); +extern int rl_clear_pending_input (void); +extern int rl_read_key (void); +extern int rl_getc (FILE *); +extern int rl_set_keyboard_input_timeout (int); + +/* Functions to set and reset timeouts. */ +extern int rl_set_timeout (unsigned int, unsigned int); +extern int rl_timeout_remaining (unsigned int *, unsigned int *); + +#undef rl_clear_timeout +#define rl_clear_timeout() rl_set_timeout (0, 0) /* `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 *)); +extern void rl_extend_line_buffer (int); +extern int rl_ding (void); +extern int rl_alphabetic (int); +extern void rl_free (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 int rl_set_signals (void); +extern int rl_clear_signals (void); +extern void rl_cleanup_after_signal (void); +extern void rl_reset_after_signal (void); +extern void rl_free_line_state (void); + +extern int rl_pending_signal (void); +extern void rl_check_signals (void); -extern void rl_echo_signal_char PARAMS((int)); +extern void rl_echo_signal_char (int); -extern int rl_set_paren_blink_timeout PARAMS((int)); +extern int rl_set_paren_blink_timeout (int); + +/* History management functions. */ + +extern void rl_clear_history (void); /* 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)); +extern int rl_maybe_save_line (void); +extern int rl_maybe_unsave_line (void); +extern int rl_maybe_replace_line (void); /* Completion functions. */ -extern int rl_complete_internal PARAMS((int)); -extern void rl_display_match_list PARAMS((char **, int, int)); +extern int rl_complete_internal (int); +extern void rl_display_match_list (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 char **rl_completion_matches (const char *, rl_compentry_func_t *); +extern char *rl_username_completion_function (const char *, int); +extern char *rl_filename_completion_function (const char *, int); -extern int rl_completion_mode PARAMS((rl_command_func_t *)); +extern int rl_completion_mode (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)); +extern void free_undo_list (void); +extern int maybe_save_line (void); +extern int maybe_unsave_line (void); +extern int maybe_replace_line (void); + +extern int ding (void); +extern int alphabetic (int); +extern int crlf (void); + +extern char **completion_matches (char *, rl_compentry_func_t *); +extern char *username_completion_function (const char *, int); +extern char *filename_completion_function (const char *, int); #endif /* **************************************************************** */ @@ -481,7 +526,7 @@ extern int rl_readline_version; /* e.g., 0x0402 */ extern int rl_gnu_readline_p; /* Flags word encapsulating the current readline state. */ -extern int rl_readline_state; +extern unsigned long rl_readline_state; /* Says which editing mode readline is currently using. 1 means emacs mode; 0 means vi mode. */ @@ -517,6 +562,10 @@ extern int rl_mark; line and should return it. */ extern int rl_done; +/* Flag to indicate that readline has read an EOF character or read has + returned 0 or error, and is returning a NULL line as a result. */ +extern int rl_eof_found; + /* If set to a character value, that will be the next keystroke read. */ extern int rl_pending_input; @@ -560,6 +609,15 @@ extern rl_hook_func_t *rl_pre_input_hook; awaiting character input, or NULL, for no event handling. */ extern rl_hook_func_t *rl_event_hook; +/* The address of a function to call if a read is interrupted by a signal. */ +extern rl_hook_func_t *rl_signal_event_hook; + +extern rl_hook_func_t *rl_timeout_event_hook; + +/* The address of a function to call if Readline needs to know whether or not + there is data available from the current input source. */ +extern rl_hook_func_t *rl_input_available_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; @@ -573,6 +631,10 @@ extern rl_voidfunc_t *rl_deprep_term_function; extern Keymap rl_executing_keymap; extern Keymap rl_binding_keymap; +extern int rl_executing_key; +extern char *rl_executing_keyseq; +extern int rl_key_sequence_length; + /* 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 @@ -603,6 +665,10 @@ extern int rl_catch_signals; to do that. */ extern int rl_catch_sigwinch; +/* If non-zero, the readline SIGWINCH handler will modify LINES and + COLUMNS in the environment. */ +extern int rl_change_environment; + /* Completion variables. */ /* Pointer to the generator function for completion_matches (). NULL means to use rl_filename_completion_function (), the default @@ -611,7 +677,7 @@ 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; +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 @@ -638,7 +704,7 @@ 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; +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 @@ -666,18 +732,33 @@ extern const char *rl_special_prefixes; 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. */ + or inserted. The directory completion hook should perform + any necessary dequoting. This function should return 1 if it modifies + the directory name pointer passed as an argument. If the directory + completion hook returns 0, it should not modify the directory name + pointer passed as an argument. */ 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. */ + when the possible completions are printed or inserted. If set, it takes + precedence over rl_directory_completion_hook. The directory rewrite + hook should perform any necessary dequoting. This function has the same + return value properties as the directory_completion_hook. + + I'm not happy with how this works yet, so it's undocumented. I'm trying + it in bash to see how well it goes. */ extern rl_icppfunc_t *rl_directory_rewrite_hook; +/* If non-zero, this is the address of a function for the completer to call + before deciding which character to append to a completed name. It should + modify the directory name passed as an argument if appropriate, and return + non-zero if it modifies the name. This should not worry about dequoting + the filename; that has already happened by the time it gets here. */ +extern rl_icppfunc_t *rl_filename_stat_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 @@ -788,6 +869,14 @@ extern int rl_ignore_completion_duplicates; completion character will be inserted as any other. */ extern int rl_inhibit_completion; +/* Applications can set this to non-zero to have readline's signal handlers + installed during the entire duration of reading a complete line, as in + readline-6.2. This should be used with care, because it can result in + readline receiving signals and not handling them until it's called again + via rl_callback_read_char, thereby stealing them from the application. + By default, signal handlers are only active while readline is active. */ +extern int rl_persistent_signal_handlers; + /* 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) @@ -805,32 +894,35 @@ extern int rl_inhibit_completion; /* 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_STATE_INITIALIZING 0x0000001 /* initializing */ +#define RL_STATE_INITIALIZED 0x0000002 /* initialization done */ +#define RL_STATE_TERMPREPPED 0x0000004 /* terminal is prepped */ +#define RL_STATE_READCMD 0x0000008 /* reading a command key */ +#define RL_STATE_METANEXT 0x0000010 /* reading input after ESC */ +#define RL_STATE_DISPATCHING 0x0000020 /* dispatching to a command */ +#define RL_STATE_MOREINPUT 0x0000040 /* reading more input in a command function */ +#define RL_STATE_ISEARCH 0x0000080 /* doing incremental search */ +#define RL_STATE_NSEARCH 0x0000100 /* doing non-inc search */ +#define RL_STATE_SEARCH 0x0000200 /* doing a history search */ +#define RL_STATE_NUMERICARG 0x0000400 /* reading numeric argument */ +#define RL_STATE_MACROINPUT 0x0000800 /* getting input from a macro */ +#define RL_STATE_MACRODEF 0x0001000 /* defining keyboard macro */ +#define RL_STATE_OVERWRITE 0x0002000 /* overwrite mode */ +#define RL_STATE_COMPLETING 0x0004000 /* doing completion */ +#define RL_STATE_SIGHANDLER 0x0008000 /* in readline sighandler */ +#define RL_STATE_UNDOING 0x0010000 /* doing an undo */ +#define RL_STATE_INPUTPENDING 0x0020000 /* rl_execute_next called */ +#define RL_STATE_TTYCSAVED 0x0040000 /* tty special chars saved */ +#define RL_STATE_CALLBACK 0x0080000 /* using the callback interface */ +#define RL_STATE_VIMOTION 0x0100000 /* reading vi motion arg */ +#define RL_STATE_MULTIKEY 0x0200000 /* reading multiple-key command */ +#define RL_STATE_VICMDONCE 0x0400000 /* entered vi command mode at least once */ +#define RL_STATE_CHARSEARCH 0x0800000 /* vi mode char search */ +#define RL_STATE_REDISPLAYING 0x1000000 /* updating terminal display */ + +#define RL_STATE_DONE 0x2000000 /* done; accepted line */ +#define RL_STATE_TIMEOUT 0x4000000 /* done; timed out */ +#define RL_STATE_EOF 0x8000000 /* done; got eof on read */ #define RL_SETSTATE(x) (rl_readline_state |= (x)) #define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) @@ -841,8 +933,8 @@ struct readline_state { int point; int end; int mark; - char *buffer; int buflen; + char *buffer; UNDO_LIST *ul; char *prompt; @@ -855,10 +947,12 @@ struct readline_state { rl_command_func_t *lastfunc; int insmode; int edmode; + char *kseq; int kseqlen; + + int pendingin; FILE *inf; FILE *outf; - int pendingin; char *macro; /* signal state */ @@ -868,15 +962,22 @@ struct readline_state { /* search state */ /* completion state */ + rl_compentry_func_t *entryfunc; + rl_compentry_func_t *menuentryfunc; + rl_compignore_func_t *ignorefunc; + rl_completion_func_t *attemptfunc; + const char *wordbreakchars; /* options state */ + /* hook 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 *)); +extern int rl_save_state (struct readline_state *); +extern int rl_restore_state (struct readline_state *); #ifdef __cplusplus } diff --git a/lib/readline/rlconf.h b/lib/readline/rlconf.h index 39f94db..b6d6a2f 100644 --- a/lib/readline/rlconf.h +++ b/lib/readline/rlconf.h @@ -1,6 +1,6 @@ /* rlconf.h -- readline configuration definitions */ -/* Copyright (C) 1992-2009 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 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. @@ -28,8 +28,12 @@ /* Define this to get an indication of file type when listing completions. */ #define VISIBLE_STATS +/* Define this to get support for colors when listing completions and in + other places. */ +#define COLOR_SUPPORT + /* 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. */ +/* If on, then readline handles signals in a way that doesn't suck. */ #define HANDLE_SIGNALS /* Ugly but working hack for binding prefix meta. */ @@ -38,7 +42,7 @@ /* 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. */ +/* The ultimate last-ditch filename for an init file -- system-wide. */ #define SYS_INPUTRC "/etc/inputrc" /* If defined, expand tabs to spaces. */ @@ -58,4 +62,18 @@ /* Define this if you want the cursor to indicate insert or overwrite mode. */ /* #define CURSOR_MODE */ +/* Define this if you want to enable code that talks to the Linux kernel + tty auditing system. */ +/* #define ENABLE_TTY_AUDIT_SUPPORT */ + +/* Defaults for the various editing mode indicators, inserted at the beginning + of the last (maybe only) line of the prompt if show-mode-in-prompt is on */ +#define RL_EMACS_MODESTR_DEFAULT "@" +#define RL_EMACS_MODESTR_DEFLEN 1 + +#define RL_VI_INS_MODESTR_DEFAULT "(ins)" +#define RL_VI_INS_MODESTR_DEFLEN 5 +#define RL_VI_CMD_MODESTR_DEFAULT "(cmd)" +#define RL_VI_CMD_MODESTR_DEFLEN 5 + #endif /* _RLCONF_H_ */ diff --git a/lib/readline/rldefs.h b/lib/readline/rldefs.h index 0257754..98577a6 100644 --- a/lib/readline/rldefs.h +++ b/lib/readline/rldefs.h @@ -2,7 +2,7 @@ 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. +/* Copyright (C) 1987-2021 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. @@ -79,14 +79,14 @@ extern char *strchr (), *strrchr (); #define _rl_stricmp strcasecmp #define _rl_strnicmp strncasecmp #else -extern int _rl_stricmp PARAMS((char *, char *)); -extern int _rl_strnicmp PARAMS((char *, char *, int)); +extern int _rl_stricmp (const char *, const char *); +extern int _rl_strnicmp (const char *, const 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 *)); +extern char *_rl_strpbrk (const char *, const char *); #endif #if !defined (emacs_mode) @@ -148,6 +148,10 @@ extern char *_rl_strpbrk PARAMS((const char *, const char *)); : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) #endif +#if !defined (RL_STRLEN) +# define RL_STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) +#endif + #if !defined (FREE) # define FREE(x) if (x) free (x) #endif diff --git a/lib/readline/rlmbutil.h b/lib/readline/rlmbutil.h index 7716a70..d906057 100644 --- a/lib/readline/rlmbutil.h +++ b/lib/readline/rlmbutil.h @@ -1,6 +1,6 @@ /* rlmbutil.h -- utility functions for multibyte characters. */ -/* Copyright (C) 2001-2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 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. @@ -28,7 +28,7 @@ /* check multibyte capability for I18N code */ /************************************************/ -/* For platforms which support the ISO C amendement 1 functionality we +/* For platforms which support the ISO C amendment 1 functionality we support user defined character classes. */ /* Solaris 2.5 has a bug: must be included before . */ #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) @@ -81,6 +81,19 @@ /* end of multibyte capability checks for I18N */ /************************************************/ +/* + * wchar_t doesn't work for 32-bit values on Windows using MSVC + */ +#ifdef WCHAR_T_BROKEN +# define WCHAR_T char32_t +# define MBRTOWC mbrtoc32 +# define WCRTOMB c32rtomb +#else /* normal systems */ +# define WCHAR_T wchar_t +# define MBRTOWC mbrtowc +# define WCRTOMB wcrtomb +#endif + /* * Flags for _rl_find_prev_mbchar and _rl_find_next_mbchar: * @@ -91,22 +104,22 @@ #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)); +extern int _rl_find_prev_mbchar (char *, int, int); +extern int _rl_find_next_mbchar (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_compare_chars (char *, int, mbstate_t *, char *, int, mbstate_t *); +extern int _rl_get_char_len (char *, mbstate_t *); +extern int _rl_adjust_point (char *, int, mbstate_t *); -extern int _rl_read_mbchar PARAMS((char *, int)); -extern int _rl_read_mbstring PARAMS((int, char *, int)); +extern int _rl_read_mbchar (char *, int); +extern int _rl_read_mbstring (int, char *, int); -extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int)); +extern int _rl_is_mbchar_matched (char *, int, int, char *, int); -extern wchar_t _rl_char_value PARAMS((char *, int)); -extern int _rl_walphabetic PARAMS((wchar_t)); +extern WCHAR_T _rl_char_value (char *, int); +extern int _rl_walphabetic (WCHAR_T); #define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc)) #define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc)) @@ -123,6 +136,58 @@ extern int _rl_walphabetic PARAMS((wchar_t)); #define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) #define MB_NULLWCH(x) ((x) == 0) +/* Try and shortcut the printable ascii characters to cut down the number of + calls to a libc wcwidth() */ +static inline int +_rl_wcwidth (WCHAR_T wc) +{ + switch (wc) + { + case ' ': case '!': case '"': case '#': case '%': + case '&': case '\'': case '(': case ')': case '*': + case '+': case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': + case '?': + case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': + case 'K': case 'L': case 'M': case 'N': case 'O': + case 'P': case 'Q': case 'R': case 'S': case 'T': + case 'U': case 'V': case 'W': case 'X': case 'Y': + case 'Z': + case '[': case '\\': case ']': case '^': case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': + case 'z': case '{': case '|': case '}': case '~': + return 1; + default: + return wcwidth (wc); + } +} + +/* Unicode combining characters range from U+0300 to U+036F */ +#define UNICODE_COMBINING_CHAR(x) ((x) >= 768 && (x) <= 879) + +#if defined (WCWIDTH_BROKEN) +# define WCWIDTH(wc) ((_rl_utf8locale && UNICODE_COMBINING_CHAR(wc)) ? 0 : _rl_wcwidth(wc)) +#else +# define WCWIDTH(wc) _rl_wcwidth(wc) +#endif + +#if defined (WCWIDTH_BROKEN) +# define IS_COMBINING_CHAR(x) (WCWIDTH(x) == 0 && iswcntrl(x) == 0) +#else +# define IS_COMBINING_CHAR(x) (WCWIDTH(x) == 0) +#endif + +#define UTF8_SINGLEBYTE(c) (((c) & 0x80) == 0) +#define UTF8_MBFIRSTCHAR(c) (((c) & 0xc0) == 0xc0) +#define UTF8_MBCHAR(c) (((c) & 0xc0) == 0x80) + #else /* !HANDLE_MULTIBYTE */ #undef MB_LEN_MAX @@ -147,6 +212,12 @@ extern int _rl_walphabetic PARAMS((wchar_t)); #define MB_INVALIDCH(x) (0) #define MB_NULLWCH(x) (0) +#define UTF8_SINGLEBYTE(c) (1) + +#if !defined (HAVE_WCHAR_T) && !defined (wchar_t) +# define wchar_t int +#endif + #endif /* !HANDLE_MULTIBYTE */ extern int rl_byte_oriented; diff --git a/lib/readline/rlprivate.h b/lib/readline/rlprivate.h index 819f127..d87d07a 100644 --- a/lib/readline/rlprivate.h +++ b/lib/readline/rlprivate.h @@ -1,10 +1,10 @@ /* 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. +/* Copyright (C) 1999-2022 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. + 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 @@ -26,6 +26,7 @@ #include "rlconf.h" /* for VISIBLE_STATS */ #include "rlstdc.h" #include "posixjmp.h" /* defines procenv_t */ +#include "rlmbutil.h" /* for HANDLE_MULTIBYTE */ /************************************************************************* * * @@ -42,6 +43,13 @@ if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ } while (0) +#define RL_SIG_RECEIVED() (_rl_caught_signal != 0) +#define RL_SIGINT_RECEIVED() (_rl_caught_signal == SIGINT) +#define RL_SIGWINCH_RECEIVED() (_rl_caught_signal == SIGWINCH) + +#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) +#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) + /************************************************************************* * * * Global structs undocumented in texinfo manual and not in readline.h * @@ -56,6 +64,9 @@ #define SF_REVERSE 0x01 #define SF_FOUND 0x02 #define SF_FAILED 0x04 +#define SF_CHGKMAP 0x08 +#define SF_PATTERN 0x10 +#define SF_NOCASE 0x20 /* unused so far */ typedef struct __rl_search_context { @@ -67,7 +78,7 @@ typedef struct __rl_search_context int search_string_size; char **lines; - char *allocated_line; + char *allocated_line; int hlen; int hindex; @@ -79,12 +90,17 @@ typedef struct __rl_search_context UNDO_LIST *save_undo_list; + Keymap keymap; /* used when dispatching commands in search string */ + Keymap okeymap; /* original keymap */ + int history_pos; int direction; + int prevc; int lastc; #if defined (HANDLE_MULTIBYTE) char mb[MB_LEN_MAX]; + char pmb[MB_LEN_MAX]; #endif char *sline; @@ -94,6 +110,15 @@ typedef struct __rl_search_context char *search_terminators; } _rl_search_cxt; +struct _rl_cmd { + Keymap map; + int count; + int key; + rl_command_func_t *func; +}; +extern struct _rl_cmd _rl_pending_command; +extern struct _rl_cmd *_rl_command_to_execute; + /* Callback data for reading numeric arguments */ #define NUM_SAWMINUS 0x01 #define NUM_SAWDIGITS 0x02 @@ -112,24 +137,48 @@ typedef struct __rl_keyseq_context int flags; int subseq_arg; int subseq_retval; /* XXX */ - Keymap dmap; + int okey; + Keymap dmap; Keymap oldmap; - int okey; + struct __rl_keyseq_context *ocxt; int childval; } _rl_keyseq_cxt; - /* fill in more as needed */ +/* vi-mode commands that use result of motion command to define boundaries */ +#define VIM_DELETE 0x01 +#define VIM_CHANGE 0x02 +#define VIM_YANK 0x04 + +/* various states for vi-mode commands that use motion commands. reflects + RL_READLINE_STATE */ +#define VMSTATE_READ 0x01 +#define VMSTATE_NUMARG 0x02 + +typedef struct __rl_vimotion_context +{ + int op; + int state; + int flags; /* reserved */ + _rl_arg_cxt ncxt; + int numeric_arg; + int start, end; /* rl_point, rl_end */ + int key, motion; /* initial key, motion command */ +} _rl_vimotion_cxt; + +/* fill in more as needed */ /* `Generic' callback data and functions */ -typedef struct __rl_callback_generic_arg +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 *)); +typedef int _rl_callback_func_t (_rl_callback_generic_arg *); + +typedef void _rl_sigcleanup_func_t (int, void *); /************************************************************************* * * @@ -148,12 +197,15 @@ extern int rl_complete_with_tilde_expansion; #if defined (VISIBLE_STATS) extern int rl_visible_stats; #endif /* VISIBLE_STATS */ +#if defined (COLOR_SUPPORT) +extern int _rl_colored_stats; +extern int _rl_colored_completion_prefix; +#endif /* 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 */ @@ -164,21 +216,21 @@ extern int rl_blink_matching_paren; /************************************************************************* * * - * Global functions and variables unsed and undocumented * + * Global functions and variables unused and undocumented * * * *************************************************************************/ /* kill.c */ -extern int rl_set_retained_kills PARAMS((int)); +extern int rl_set_retained_kills (int); /* terminal.c */ -extern void _rl_set_screen_size PARAMS((int, int)); +extern void _rl_set_screen_size (int, int); /* undo.c */ -extern int _rl_fix_last_undo_of_type PARAMS((int, int, int)); +extern int _rl_fix_last_undo_of_type (int, int, int); /* util.c */ -extern char *_rl_savestring PARAMS((const char *)); +extern char *_rl_savestring (const char *); /************************************************************************* * * @@ -198,142 +250,199 @@ extern char *_rl_savestring PARAMS((const char *)); #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 void readline_internal_setup (void); +extern char *readline_internal_teardown (int); +extern int readline_internal_char (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 _rl_keyseq_cxt *_rl_keyseq_cxt_alloc (void); +extern void _rl_keyseq_cxt_dispose (_rl_keyseq_cxt *); +extern void _rl_keyseq_chain_dispose (void); + +extern int _rl_dispatch_callback (_rl_keyseq_cxt *); -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 *)); +extern _rl_callback_generic_arg *_rl_callback_data_alloc (int); +extern void _rl_callback_data_dispose (_rl_callback_generic_arg *); #endif /* READLINE_CALLBACKS */ /* bind.c */ +extern char *_rl_untranslate_macro_value (char *, int); /* 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 **)); +extern void _rl_reset_completion_state (void); +extern char _rl_find_completion_word (int *, int *); +extern void _rl_free_match_list (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)); +extern char *_rl_strip_prompt (char *); +extern void _rl_reset_prompt (void); +extern void _rl_move_vert (int); +extern void _rl_save_prompt (void); +extern void _rl_restore_prompt (void); +extern char *_rl_make_prompt_for_search (int); +extern void _rl_erase_at_end_of_line (int); +extern void _rl_clear_to_eol (int); +extern void _rl_clear_screen (int); +extern void _rl_update_final (void); +extern void _rl_optimize_redisplay (void); +extern void _rl_redisplay_after_sigwinch (void); +extern void _rl_clean_up_for_exit (void); +extern void _rl_erase_entire_line (void); +extern int _rl_current_display_line (void); +extern void _rl_refresh_line (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)); +extern int _rl_any_typein (void); +extern int _rl_input_available (void); +extern int _rl_nchars_available (void); +extern int _rl_input_queued (int); +extern void _rl_insert_typein (int); +extern int _rl_unget_char (int); +extern int _rl_pushed_input_available (void); + +extern int _rl_timeout_init (void); +extern int _rl_timeout_handle_sigalrm (void); +#if defined (_POSIXSELECT_H_) +/* use as a sentinel for fd_set, struct timeval, and sigset_t definitions */ +extern int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *); +#endif /* isearch.c */ -extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int)); -extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int)); +extern _rl_search_cxt *_rl_scxt_alloc (int, int); +extern void _rl_scxt_dispose (_rl_search_cxt *, int); + +extern int _rl_isearch_dispatch (_rl_search_cxt *, int); +extern int _rl_isearch_callback (_rl_search_cxt *); +extern int _rl_isearch_cleanup (_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 (_rl_search_cxt *); -extern int _rl_search_getchar PARAMS((_rl_search_cxt *)); +/* kill.c */ +#ifndef BRACKETED_PASTE_DEFAULT +# define BRACKETED_PASTE_DEFAULT 1 /* XXX - for now */ +#endif + +#define BRACK_PASTE_PREF "\033[200~" +#define BRACK_PASTE_SUFF "\033[201~" + +#define BRACK_PASTE_LAST '~' +#define BRACK_PASTE_SLEN 6 + +#define BRACK_PASTE_INIT "\033[?2004h" +#define BRACK_PASTE_FINI "\033[?2004l\r" + +extern int _rl_read_bracketed_paste_prefix (int); +extern char *_rl_bracketed_text (size_t *); +extern int _rl_bracketed_read_key (void); +extern int _rl_bracketed_read_mbstring (char *, int); /* 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)); +extern void _rl_with_macro_input (char *); +extern int _rl_peek_macro_key (void); +extern int _rl_next_macro_key (void); +extern int _rl_prev_macro_key (void); +extern void _rl_push_executing_macro (void); +extern void _rl_pop_executing_macro (void); +extern void _rl_add_macro_char (int); +extern void _rl_kill_kbd_macro (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 int _rl_arg_overflow (void); +extern void _rl_arg_init (void); +extern int _rl_arg_getchar (void); +extern int _rl_arg_callback (_rl_arg_cxt); +extern void _rl_reset_argument (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_start_using_history (void); +extern int _rl_free_saved_history_line (void); +extern void _rl_set_insert_mode (int, int); -extern void _rl_revert_all_lines PARAMS((void)); +extern void _rl_revert_previous_lines (void); +extern void _rl_revert_all_lines (void); /* nls.c */ -extern int _rl_init_eightbit PARAMS((void)); +extern char *_rl_init_locale (void); +extern int _rl_init_eightbit (void); +extern void _rl_reset_locale (void); /* parens.c */ -extern void _rl_enable_paren_matching PARAMS((int)); +extern void _rl_enable_paren_matching (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)); +extern void _rl_init_line_state (void); +extern void _rl_set_the_line (void); +extern int _rl_dispatch (int, Keymap); +extern int _rl_dispatch_subseq (int, Keymap, int); +extern void _rl_internal_char_cleanup (void); + +extern void _rl_init_executing_keyseq (void); +extern void _rl_term_executing_keyseq (void); +extern void _rl_end_executing_keyseq (void); +extern void _rl_add_executing_keyseq (int); +extern void _rl_del_executing_keyseq (void); + +extern rl_command_func_t *_rl_executing_func; /* rltty.c */ -extern int _rl_disable_tty_signals PARAMS((void)); -extern int _rl_restore_tty_signals PARAMS((void)); +extern int _rl_disable_tty_signals (void); +extern int _rl_restore_tty_signals (void); /* search.c */ -extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *)); +extern int _rl_nsearch_callback (_rl_search_cxt *); +extern int _rl_nsearch_cleanup (_rl_search_cxt *, int); /* signals.c */ -extern void _rl_signal_handler PARAMS((int)); +extern void _rl_signal_handler (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)); +extern void _rl_block_sigint (void); +extern void _rl_release_sigint (void); +extern void _rl_block_sigwinch (void); +extern void _rl_release_sigwinch (void); /* terminal.c */ -extern void _rl_get_screen_size PARAMS((int, int)); -extern int _rl_init_terminal_io PARAMS((const char *)); +extern void _rl_get_screen_size (int, int); +extern void _rl_sigwinch_resize_terminal (void); +extern int _rl_init_terminal_io (const char *); #ifdef _MINIX -extern void _rl_output_character_function PARAMS((int)); +extern void _rl_output_character_function (int); #else -extern int _rl_output_character_function PARAMS((int)); +extern int _rl_output_character_function (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)); +extern void _rl_cr (void); +extern void _rl_output_some_chars (const char *, int); +extern int _rl_backspace (int); +extern void _rl_enable_meta_key (void); +extern void _rl_disable_meta_key (void); +extern void _rl_control_keypad (int); +extern void _rl_set_cursor (int, int); +extern void _rl_standout_on (void); +extern void _rl_standout_off (void); +extern int _rl_reset_region_color (int, const char *); +extern void _rl_region_color_on (void); +extern void _rl_region_color_off (void); /* 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)); +extern void _rl_fix_point (int); +extern void _rl_fix_mark (void); +extern int _rl_replace_text (const char *, int, int); +extern int _rl_forward_char_internal (int); +extern int _rl_backward_char_internal (int); +extern int _rl_insert_char (int, int); +extern int _rl_overwrite_char (int, int); +extern int _rl_overwrite_rubout (int, int); +extern int _rl_rubout_char (int, int); #if defined (HANDLE_MULTIBYTE) -extern int _rl_char_search_internal PARAMS((int, int, char *, int)); +extern int _rl_char_search_internal (int, int, char *, int); #else -extern int _rl_char_search_internal PARAMS((int, int, int)); +extern int _rl_char_search_internal (int, int, int); #endif -extern int _rl_set_mark_at_pos PARAMS((int)); +extern int _rl_set_mark_at_pos (int); /* undo.c */ -extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *)); -extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *)); +extern UNDO_LIST *_rl_copy_undo_entry (UNDO_LIST *); +extern UNDO_LIST *_rl_copy_undo_list (UNDO_LIST *); +extern void _rl_free_undo_list (UNDO_LIST *); /* util.c */ #if defined (USE_VARARGS) && defined (PREFER_STDARG) @@ -345,27 +454,37 @@ 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)); +extern void _rl_audit_tty (char *); + +extern int _rl_tropen (void); + +extern int _rl_abort_internal (void); +extern int _rl_null_function (int, int); +extern char *_rl_strindex (const char *, const char *); +extern int _rl_qsort_string_compare (char **, char **); +extern int (_rl_uppercase_p) (int); +extern int (_rl_lowercase_p) (int); +extern int (_rl_pure_alphabetic) (int); +extern int (_rl_digit_p) (int); +extern int (_rl_to_lower) (int); +extern int (_rl_to_upper) (int); +extern int (_rl_digit_value) (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)); +extern void _rl_vi_initialize_line (void); +extern void _rl_vi_reset_last (void); +extern void _rl_vi_set_last (int, int, int); +extern int _rl_vi_textmod_command (int); +extern int _rl_vi_motion_command (int); +extern void _rl_vi_done_inserting (void); +extern int _rl_vi_domove_callback (_rl_vimotion_cxt *); +extern int _rl_vi_domove_motion_cleanup (int, _rl_vimotion_cxt *); + +/* Use HS_HISTORY_VERSION as the sentinel to see if we've included history.h + and so can use HIST_ENTRY */ +#if defined (HS_HISTORY_VERSION) +extern void _rl_free_history_entry (HIST_ENTRY *); +#endif /************************************************************************* * Undocumented private variables * @@ -385,11 +504,14 @@ 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_completion_columns; extern int _rl_print_completions_horizontally; extern int _rl_completion_case_fold; +extern int _rl_completion_case_map; extern int _rl_match_hidden_files; extern int _rl_page_completions; extern int _rl_skip_completed_text; +extern int _rl_menu_complete_prefix_first; /* display.c */ extern int _rl_vis_botlin; @@ -397,6 +519,13 @@ extern int _rl_last_c_pos; extern int _rl_suppress_redisplay; extern int _rl_want_redisplay; +extern char *_rl_emacs_mode_str; +extern int _rl_emacs_modestr_len; +extern char *_rl_vi_ins_mode_str; +extern int _rl_vi_ins_modestr_len; +extern char *_rl_vi_cmd_mode_str; +extern int _rl_vi_cmd_modestr_len; + /* isearch.c */ extern char *_rl_isearch_terminators; @@ -411,6 +540,9 @@ extern int _rl_history_saved_point; extern _rl_arg_cxt _rl_argcxt; +/* nls.c */ +extern int _rl_utf8locale; + /* readline.c */ extern int _rl_echoing_p; extern int _rl_horizontal_scroll_mode; @@ -422,6 +554,11 @@ 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 int _rl_show_mode_in_prompt; +extern int _rl_enable_bracketed_paste; +extern int _rl_enable_active_region; +extern char *_rl_active_region_start_color; +extern char *_rl_active_region_end_color; extern char *_rl_comment_begin; extern unsigned char _rl_parsing_conditionalized_out; extern Keymap _rl_keymap; @@ -431,14 +568,22 @@ extern int _rl_last_command_was_kill; extern int _rl_eof_char; extern procenv_t _rl_top_level; extern _rl_keyseq_cxt *_rl_kscxt; +extern int _rl_keyseq_timeout; + +extern int _rl_executing_keyseq_size; + +extern rl_hook_func_t *_rl_internal_startup_hook; /* search.c */ extern _rl_search_cxt *_rl_nscxt; +extern int _rl_history_search_pos; /* signals.c */ -extern int _rl_interrupt_immediately; extern int volatile _rl_caught_signal; +extern _rl_sigcleanup_func_t *_rl_sigcleanup; +extern void *_rl_sigcleanarg; + extern int _rl_echoctl; extern int _rl_intr_char; @@ -450,6 +595,7 @@ extern int _rl_enable_keypad; extern int _rl_enable_meta; extern char *_rl_term_clreol; extern char *_rl_term_clrpag; +extern char *_rl_term_clrscroll; extern char *_rl_term_im; extern char *_rl_term_ic; extern char *_rl_term_ei; @@ -465,11 +611,23 @@ extern int _rl_screenchars; extern int _rl_terminal_can_insert; extern int _rl_term_autowrap; +/* text.c */ +extern int _rl_optimize_typeahead; +extern int _rl_keep_mark_active; + /* undo.c */ extern int _rl_doing_an_undo; extern int _rl_undo_group_level; /* vi_mode.c */ extern int _rl_vi_last_command; +extern int _rl_vi_redoing; +extern _rl_vimotion_cxt *_rl_vimvcxt; + +/* Use HS_HISTORY_VERSION as the sentinel to see if we've included history.h + and so can use HIST_ENTRY */ +#if defined (HS_HISTORY_VERSION) +extern HIST_ENTRY *_rl_saved_line_for_history; +#endif #endif /* _RL_PRIVATE_H_ */ diff --git a/lib/readline/rlshell.h b/lib/readline/rlshell.h index 3e17d8b..6055b14 100644 --- a/lib/readline/rlshell.h +++ b/lib/readline/rlshell.h @@ -1,6 +1,6 @@ /* rlshell.h -- utility functions normally provided by bash. */ -/* Copyright (C) 1999-2009 Free Software Foundation, Inc. +/* Copyright (C) 1999-2021 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. @@ -24,10 +24,10 @@ #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)); +extern char *sh_single_quote (char *); +extern void sh_set_lines_and_columns (int, int); +extern char *sh_get_env_value (const char *); +extern char *sh_get_home_dir (void); +extern int sh_unset_nodelay_mode (int); #endif /* _RL_SHELL_H_ */ diff --git a/lib/readline/rlstdc.h b/lib/readline/rlstdc.h index a6d2394..2aaa30b 100644 --- a/lib/readline/rlstdc.h +++ b/lib/readline/rlstdc.h @@ -42,4 +42,16 @@ # endif #endif +/* Moved from config.h.in because readline.h:rl_message depends on these + defines. */ +#if defined (__STDC__) && defined (HAVE_STDARG_H) +# define PREFER_STDARG +# define USE_VARARGS +#else +# if defined (HAVE_VARARGS_H) +# define PREFER_VARARGS +# define USE_VARARGS +# endif +#endif + #endif /* !_RL_STDC_H_ */ diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c index 0dd5d10..882a3d4 100644 --- a/lib/readline/rltty.c +++ b/lib/readline/rltty.c @@ -1,10 +1,10 @@ /* rltty.c -- functions to prepare and restore the terminal for readline's use. */ -/* Copyright (C) 1992-2005 Free Software Foundation, Inc. +/* Copyright (C) 1992-2022 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. + 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 @@ -37,11 +37,11 @@ #include "rldefs.h" -#if defined (GWINSZ_IN_SYS_IOCTL) -# include -#endif /* GWINSZ_IN_SYS_IOCTL */ - #include "rltty.h" +#if defined (HAVE_SYS_IOCTL_H) +# include /* include for declaration of ioctl */ +#endif + #include "readline.h" #include "rlprivate.h" @@ -52,7 +52,7 @@ extern int 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)); +static void set_winsize (int); /* **************************************************************** */ /* */ @@ -60,7 +60,13 @@ static void set_winsize PARAMS((int)); /* */ /* **************************************************************** */ -/* Non-zero means that the terminal is in a prepped state. */ +/* Non-zero means that the terminal is in a prepped state. There are several + flags that are OR'd in to denote whether or not we have sent various + init strings to the terminal. */ +#define TPX_PREPPED 0x01 +#define TPX_BRACKPASTE 0x02 +#define TPX_METAKEY 0x04 + static int terminal_prepped; static _RL_TTY_CHARS _rl_tty_chars, _rl_last_tty_chars; @@ -113,19 +119,18 @@ 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 save_tty_chars (TIOTYPE *); +static int _get_tty_settings (int, TIOTYPE *); +static int get_tty_settings (int, TIOTYPE *); +static int _set_tty_settings (int, TIOTYPE *); +static int set_tty_settings (int, TIOTYPE *); -static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); +static void prepare_terminal_settings (int, TIOTYPE, TIOTYPE *); -static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t)); +static void set_special_char (Keymap, TIOTYPE *, int, rl_command_func_t *); static void -save_tty_chars (tiop) - TIOTYPE *tiop; +save_tty_chars (TIOTYPE *tiop) { _rl_last_tty_chars = _rl_tty_chars; @@ -162,9 +167,7 @@ save_tty_chars (tiop) } static int -get_tty_settings (tty, tiop) - int tty; - TIOTYPE *tiop; +get_tty_settings (int tty, TIOTYPE *tiop) { set_winsize (tty); @@ -194,9 +197,7 @@ get_tty_settings (tty, tiop) } static int -set_tty_settings (tty, tiop) - int tty; - TIOTYPE *tiop; +set_tty_settings (int tty, TIOTYPE *tiop) { if (tiop->flags & SGTTY_SET) { @@ -233,9 +234,7 @@ set_tty_settings (tty, tiop) } static void -prepare_terminal_settings (meta_flag, oldtio, tiop) - int meta_flag; - TIOTYPE oldtio, *tiop; +prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop) { _rl_echoing_p = (oldtio.sgttyb.sg_flags & ECHO); _rl_echoctl = (oldtio.sgttyb.sg_flags & ECHOCTL); @@ -333,16 +332,16 @@ prepare_terminal_settings (meta_flag, oldtio, tiop) 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 save_tty_chars (TIOTYPE *); +static int _get_tty_settings (int, TIOTYPE *); +static int get_tty_settings (int, TIOTYPE *); +static int _set_tty_settings (int, TIOTYPE *); +static int set_tty_settings (int, TIOTYPE *); -static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); +static void prepare_terminal_settings (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)); +static void set_special_char (Keymap, TIOTYPE *, int, rl_command_func_t *); +static void _rl_bind_tty_special_chars (Keymap, TIOTYPE); #if defined (FLUSHO) # define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO) @@ -351,8 +350,7 @@ static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE)); #endif static void -save_tty_chars (tiop) - TIOTYPE *tiop; +save_tty_chars (TIOTYPE *tiop) { _rl_last_tty_chars = _rl_tty_chars; @@ -397,8 +395,7 @@ save_tty_chars (tiop) #if defined (_AIX) || defined (_AIX41) /* Currently this is only used on AIX */ static void -rltty_warning (msg) - char *msg; +rltty_warning (char *msg) { _rl_errmsg ("warning: %s", msg); } @@ -406,8 +403,7 @@ rltty_warning (msg) #if defined (_AIX) void -setopost(tp) -TIOTYPE *tp; +setopost (TIOTYPE *tp) { if ((tp->c_oflag & OPOST) == 0) { @@ -418,9 +414,7 @@ TIOTYPE *tp; #endif static int -_get_tty_settings (tty, tiop) - int tty; - TIOTYPE *tiop; +_get_tty_settings (int tty, TIOTYPE *tiop) { int ioctl_ret; @@ -451,9 +445,7 @@ _get_tty_settings (tty, tiop) } static int -get_tty_settings (tty, tiop) - int tty; - TIOTYPE *tiop; +get_tty_settings (int tty, TIOTYPE *tiop) { set_winsize (tty); @@ -469,9 +461,7 @@ get_tty_settings (tty, tiop) } static int -_set_tty_settings (tty, tiop) - int tty; - TIOTYPE *tiop; +_set_tty_settings (int tty, TIOTYPE *tiop) { while (SETATTR (tty, tiop) < 0) { @@ -483,9 +473,7 @@ _set_tty_settings (tty, tiop) } static int -set_tty_settings (tty, tiop) - int tty; - TIOTYPE *tiop; +set_tty_settings (int tty, TIOTYPE *tiop) { if (_set_tty_settings (tty, tiop) < 0) return -1; @@ -512,10 +500,11 @@ set_tty_settings (tty, tiop) } static void -prepare_terminal_settings (meta_flag, oldtio, tiop) - int meta_flag; - TIOTYPE oldtio, *tiop; +prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop) { + int sc; + Keymap kmap; + _rl_echoing_p = (oldtio.c_lflag & ECHO); #if defined (ECHOCTL) _rl_echoctl = (oldtio.c_lflag & ECHOCTL); @@ -528,10 +517,10 @@ prepare_terminal_settings (meta_flag, oldtio, tiop) #if defined (USE_XON_XOFF) #if defined (IXANY) - tiop->c_iflag &= ~(IXON | IXOFF | IXANY); + tiop->c_iflag &= ~(IXON | IXANY); #else /* `strict' Posix systems do not define IXANY. */ - tiop->c_iflag &= ~(IXON | IXOFF); + tiop->c_iflag &= ~IXON; #endif /* IXANY */ #endif /* USE_XON_XOFF */ @@ -572,6 +561,20 @@ prepare_terminal_settings (meta_flag, oldtio, tiop) tiop->c_cc[VDSUSP] = _POSIX_VDISABLE; #endif + /* Conditionally disable some other tty special characters if there is a + key binding for them in the current keymap. Readline ordinarily doesn't + bind these characters, but an application or user might. */ +#if defined (VI_MODE) + kmap = (rl_editing_mode == vi_mode) ? vi_insertion_keymap : _rl_keymap; +#else + kmap = _rl_keymap; +#endif +#if defined (VDISCARD) + sc = tiop->c_cc[VDISCARD]; + if (sc != _POSIX_VDISABLE && kmap[(unsigned char)sc].type == ISFUNC) + tiop->c_cc[VDISCARD] = _POSIX_VDISABLE; +#endif /* VDISCARD */ + #endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */ } #endif /* !NEW_TTY_DRIVER */ @@ -579,23 +582,21 @@ prepare_terminal_settings (meta_flag, oldtio, tiop) /* 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_prep_terminal (int meta_flag) { _rl_echoing_p = 1; } void -rl_deprep_terminal () +rl_deprep_terminal (void) { } #else /* ! NO_TTY_DRIVER */ void -rl_prep_terminal (meta_flag) - int meta_flag; +rl_prep_terminal (int meta_flag) { - int tty; + int tty, nprep; TIOTYPE tio; if (terminal_prepped) @@ -604,7 +605,7 @@ rl_prep_terminal (meta_flag) /* Try to keep this function from being INTerrupted. */ _rl_block_sigint (); - tty = fileno (rl_instream); + tty = rl_instream ? fileno (rl_instream) : fileno (stdin); if (get_tty_settings (tty, &tio) < 0) { @@ -642,7 +643,7 @@ rl_prep_terminal (meta_flag) /* 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); + _rl_bind_tty_special_chars (vi_insertion_keymap, tio); else #endif _rl_bind_tty_special_chars (_rl_keymap, tio); @@ -659,8 +660,16 @@ rl_prep_terminal (meta_flag) if (_rl_enable_keypad) _rl_control_keypad (1); + nprep = TPX_PREPPED; + + if (_rl_enable_bracketed_paste) + { + fprintf (rl_outstream, BRACK_PASTE_INIT); + nprep |= TPX_BRACKPASTE; + } + fflush (rl_outstream); - terminal_prepped = 1; + terminal_prepped = nprep; RL_SETSTATE(RL_STATE_TERMPREPPED); _rl_release_sigint (); @@ -668,17 +677,28 @@ rl_prep_terminal (meta_flag) /* Restore the terminal's normal settings and modes. */ void -rl_deprep_terminal () +rl_deprep_terminal (void) { int tty; - if (!terminal_prepped) + if (terminal_prepped == 0) return; /* Try to keep this function from being interrupted. */ _rl_block_sigint (); - tty = fileno (rl_instream); + tty = rl_instream ? fileno (rl_instream) : fileno (stdin); + + if (terminal_prepped & TPX_BRACKPASTE) + { + fprintf (rl_outstream, BRACK_PASTE_FINI); + /* Since the last character in BRACK_PASTE_FINI is \r */ + _rl_last_c_pos = 0; + if (rl_eof_found && (RL_ISSTATE (RL_STATE_TIMEOUT) == 0)) + fprintf (rl_outstream, "\n"); + else if (_rl_echoing_p == 0) + fprintf (rl_outstream, "\n"); + } if (_rl_enable_keypad) _rl_control_keypad (0); @@ -697,6 +717,18 @@ rl_deprep_terminal () _rl_release_sigint (); } #endif /* !NO_TTY_DRIVER */ + +/* Set readline's idea of whether or not it is echoing output to the terminal, + returning the old value. */ +int +rl_tty_set_echoing (int u) +{ + int o; + + o = _rl_echoing_p; + _rl_echoing_p = u; + return o; +} /* **************************************************************** */ /* */ @@ -705,8 +737,7 @@ rl_deprep_terminal () /* **************************************************************** */ int -rl_restart_output (count, key) - int count, key; +rl_restart_output (int count, int key) { #if defined (__MINGW32__) return 0; @@ -743,8 +774,7 @@ rl_restart_output (count, key) } int -rl_stop_output (count, key) - int count, key; +rl_stop_output (int count, int key) { #if defined (__MINGW32__) return 0; @@ -792,11 +822,7 @@ rl_stop_output (count, key) #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; +set_special_char (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; @@ -807,9 +833,7 @@ set_special_char (kmap, tiop, sc, func) kmap[(unsigned char)c].function = rl_insert; static void -_rl_bind_tty_special_chars (kmap, ttybuff) - Keymap kmap; - TIOTYPE ttybuff; +_rl_bind_tty_special_chars (Keymap kmap, TIOTYPE ttybuff) { if (ttybuff.flags & SGTTY_SET) { @@ -828,11 +852,7 @@ _rl_bind_tty_special_chars (kmap, ttybuff) #else /* !NEW_TTY_DRIVER */ static void -set_special_char (kmap, tiop, sc, func) - Keymap kmap; - TIOTYPE *tiop; - int sc; - rl_command_func_t *func; +set_special_char (Keymap kmap, TIOTYPE *tiop, int sc, rl_command_func_t *func) { unsigned char uc; @@ -847,9 +867,7 @@ set_special_char (kmap, tiop, sc, func) kmap[uc].function = rl_insert; static void -_rl_bind_tty_special_chars (kmap, ttybuff) - Keymap kmap; - TIOTYPE ttybuff; +_rl_bind_tty_special_chars (Keymap kmap, TIOTYPE ttybuff) { SET_SPECIAL (VERASE, rl_rubout); SET_SPECIAL (VKILL, rl_unix_line_discard); @@ -859,6 +877,11 @@ _rl_bind_tty_special_chars (kmap, ttybuff) # endif /* VLNEXT && TERMIOS_TTY_DRIVER */ # if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) +# if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + SET_SPECIAL (VWERASE, rl_vi_unix_word_rubout); + else +# endif SET_SPECIAL (VWERASE, rl_unix_word_rubout); # endif /* VWERASE && TERMIOS_TTY_DRIVER */ } @@ -868,8 +891,7 @@ _rl_bind_tty_special_chars (kmap, ttybuff) /* 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; +rltty_set_default_bindings (Keymap kmap) { #if !defined (NO_TTY_DRIVER) TIOTYPE ttybuff; @@ -885,8 +907,7 @@ rltty_set_default_bindings (kmap) /* New public way to set the system default editing chars to their readline equivalents. */ void -rl_tty_set_default_bindings (kmap) - Keymap kmap; +rl_tty_set_default_bindings (Keymap kmap) { rltty_set_default_bindings (kmap); } @@ -896,8 +917,7 @@ rl_tty_set_default_bindings (kmap) chars with save_tty_chars(). This only works on POSIX termios or termio systems. */ void -rl_tty_unset_default_bindings (kmap) - Keymap kmap; +rl_tty_unset_default_bindings (Keymap kmap) { /* Don't bother before we've saved the tty special chars at least once. */ if (RL_ISSTATE(RL_STATE_TTYCSAVED) == 0) @@ -919,13 +939,13 @@ rl_tty_unset_default_bindings (kmap) #if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER) int -_rl_disable_tty_signals () +_rl_disable_tty_signals (void) { return 0; } int -_rl_restore_tty_signals () +_rl_restore_tty_signals (void) { return 0; } @@ -935,7 +955,7 @@ static TIOTYPE sigstty, nosigstty; static int tty_sigs_disabled = 0; int -_rl_disable_tty_signals () +_rl_disable_tty_signals (void) { if (tty_sigs_disabled) return 0; @@ -956,7 +976,7 @@ _rl_disable_tty_signals () } int -_rl_restore_tty_signals () +_rl_restore_tty_signals (void) { int r; diff --git a/lib/readline/rltypedefs.h b/lib/readline/rltypedefs.h index 60f29a1..1636549 100644 --- a/lib/readline/rltypedefs.h +++ b/lib/readline/rltypedefs.h @@ -1,6 +1,6 @@ /* rltypedefs.h -- Type declarations for readline functions. */ -/* Copyright (C) 2000-2009 Free Software Foundation, Inc. +/* Copyright (C) 2000-2021 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. @@ -26,15 +26,22 @@ extern "C" { #endif -/* Old-style */ +/* Old-style, attempt to mark as deprecated in some way people will notice. */ #if !defined (_FUNCTION_DEF) # define _FUNCTION_DEF +#if defined(__GNUC__) || defined(__clang__) +typedef int Function () __attribute__((deprecated)); +typedef void VFunction () __attribute__((deprecated)); +typedef char *CPFunction () __attribute__((deprecated)); +typedef char **CPPFunction () __attribute__((deprecated)); +#else typedef int Function (); typedef void VFunction (); typedef char *CPFunction (); typedef char **CPPFunction (); +#endif #endif /* _FUNCTION_DEF */ @@ -44,45 +51,45 @@ typedef char **CPPFunction (); # define _RL_FUNCTION_TYPEDEF /* Bindable functions */ -typedef int rl_command_func_t PARAMS((int, int)); +typedef int rl_command_func_t (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_compentry_func_t (const char *, int); +typedef char **rl_completion_func_t (const char *, int, int); -typedef char *rl_quote_func_t PARAMS((char *, int, char *)); -typedef char *rl_dequote_func_t PARAMS((char *, int)); +typedef char *rl_quote_func_t (char *, int, char *); +typedef char *rl_dequote_func_t (char *, int); -typedef int rl_compignore_func_t PARAMS((char **)); +typedef int rl_compignore_func_t (char **); -typedef void rl_compdisp_func_t PARAMS((char **, int, int)); +typedef void rl_compdisp_func_t (char **, int, int); /* Type for input and pre-read hook functions like rl_event_hook */ -typedef int rl_hook_func_t PARAMS((void)); +typedef int rl_hook_func_t (void); /* Input function type */ -typedef int rl_getc_func_t PARAMS((FILE *)); +typedef int rl_getc_func_t (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)); +typedef int rl_linebuf_func_t (char *, int); /* `Generic' function pointer typedefs */ -typedef int rl_intfunc_t PARAMS((int)); +typedef int rl_intfunc_t (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 **)); +typedef int rl_icpfunc_t (char *); +typedef int rl_icppfunc_t (char **); + +typedef void rl_voidfunc_t (void); +typedef void rl_vintfunc_t (int); +typedef void rl_vcpfunc_t (char *); +typedef void rl_vcppfunc_t (char **); + +typedef char *rl_cpvfunc_t (void); +typedef char *rl_cpifunc_t (int); +typedef char *rl_cpcpfunc_t (char *); +typedef char *rl_cpcppfunc_t (char **); #endif /* _RL_FUNCTION_TYPEDEF */ diff --git a/lib/readline/savestring.c b/lib/readline/savestring.c index 63f467a..f4bb6aa 100644 --- a/lib/readline/savestring.c +++ b/lib/readline/savestring.c @@ -1,6 +1,6 @@ /* savestring.c - function version of savestring for backwards compatibility */ -/* Copyright (C) 1998,2003 Free Software Foundation, Inc. +/* Copyright (C) 1998,2003,2017 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. @@ -30,8 +30,11 @@ /* Backwards compatibility, now that savestring has been removed from all `public' readline header files. */ char * -savestring (s) - const char *s; +savestring (const char *s) { - return ((char *)strcpy ((char *)xmalloc (1 + strlen (s)), (s))); + char *ret; + + ret = (char *)xmalloc (strlen (s) + 1); + strcpy (ret, s); + return ret; } diff --git a/lib/readline/search.c b/lib/readline/search.c index 82984f1..eea2301 100644 --- a/lib/readline/search.c +++ b/lib/readline/search.c @@ -1,6 +1,6 @@ /* search.c - code for non-incremental searching in emacs and vi modes. */ -/* Copyright (C) 1992-2009 Free Software Foundation, Inc. +/* Copyright (C) 1992-2022 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. @@ -43,6 +43,7 @@ #include "readline.h" #include "history.h" +#include "histlib.h" #include "rlprivate.h" #include "xmalloc.h" @@ -54,40 +55,44 @@ _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 int _rl_history_search_len; +/*static*/ int _rl_history_search_pos; +static int _rl_history_search_flags; + 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 void make_history_line_current (HIST_ENTRY *); +static int noninc_search_from_pos (char *, int, int, int, int *); +static int noninc_dosearch (char *, int, int); +static int noninc_search (int, int); +static int rl_history_search_internal (int, int); +static void rl_history_search_reinit (int); -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)); +static _rl_search_cxt *_rl_nsearch_init (int, int); +static void _rl_nsearch_abort (_rl_search_cxt *); +static int _rl_nsearch_dispatch (_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; +make_history_line_current (HIST_ENTRY *entry) { + UNDO_LIST *xlist; + + xlist = _rl_saved_line_for_history ? (UNDO_LIST *)_rl_saved_line_for_history->data : 0; + /* At this point, rl_undo_list points to a private search string list. */ + if (rl_undo_list && rl_undo_list != (UNDO_LIST *)entry->data && rl_undo_list != xlist) + rl_free_undo_list (); + + /* Now we create a new undo list with a single insert for this text. + WE DON'T CHANGE THE ORIGINAL HISTORY ENTRY UNDO LIST */ _rl_replace_text (entry->line, 0, rl_end); _rl_fix_point (1); #if defined (VI_MODE) @@ -99,6 +104,11 @@ make_history_line_current (entry) rl_free_undo_list (); #endif + /* This will need to free the saved undo list associated with the original + (pre-search) line buffer. + XXX - look at _rl_free_saved_history_line and consider calling it if + rl_undo_list != xlist (or calling rl_free_undo list directly on + _rl_saved_line_for_history->data) */ if (_rl_saved_line_for_history) _rl_free_history_entry (_rl_saved_line_for_history); _rl_saved_line_for_history = (HIST_ENTRY *)NULL; @@ -110,11 +120,10 @@ make_history_line_current (entry) 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; +noninc_search_from_pos (char *string, int pos, int dir, int flags, int *ncp) { - int ret, old; + int ret, old, sflags; + char *s; if (pos < 0) return -1; @@ -124,12 +133,28 @@ noninc_search_from_pos (string, pos, dir) return -1; RL_SETSTATE(RL_STATE_SEARCH); - if (*string == '^') + /* These functions return the match offset in the line; history_offset gives + the matching line in the history list */ + if (flags & SF_PATTERN) + { + s = string; + sflags = 0; /* Non-anchored search */ + if (*s == '^') + { + sflags |= ANCHORED_SEARCH; + s++; + } + ret = _hs_history_patsearch (s, dir, sflags); + } + else if (*string == '^') ret = history_search_prefix (string + 1, dir); else ret = history_search (string, dir); RL_UNSETSTATE(RL_STATE_SEARCH); + if (ncp) + *ncp = ret; /* caller will catch -1 to indicate no-op */ + if (ret != -1) ret = where_history (); @@ -141,11 +166,9 @@ noninc_search_from_pos (string, pos, dir) 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; +noninc_dosearch (char *string, int dir, int flags) { - int oldpos, pos; + int oldpos, pos, ind; HIST_ENTRY *entry; if (string == 0 || *string == '\0' || noninc_history_pos < 0) @@ -154,7 +177,7 @@ noninc_dosearch (string, dir) return 0; } - pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir); + pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir, flags, &ind); if (pos == -1) { /* Search failed, current history position unchanged. */ @@ -169,7 +192,8 @@ noninc_dosearch (string, dir) oldpos = where_history (); history_set_pos (noninc_history_pos); - entry = current_history (); + entry = current_history (); /* will never be NULL after successful search */ + #if defined (VI_MODE) if (rl_editing_mode != vi_mode) #endif @@ -177,16 +201,26 @@ noninc_dosearch (string, dir) make_history_line_current (entry); - rl_point = 0; - rl_mark = rl_end; + if (_rl_enable_active_region && ((flags & SF_PATTERN) == 0) && ind > 0 && ind < rl_end) + { + rl_point = ind; + rl_mark = ind + strlen (string); + if (rl_mark > rl_end) + rl_mark = rl_end; /* can't happen? */ + rl_activate_mark (); + } + else + { + 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_nsearch_init (int dir, int pchar) { _rl_search_cxt *cxt; char *p; @@ -194,6 +228,10 @@ _rl_nsearch_init (dir, pchar) cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0); if (dir < 0) cxt->sflags |= SF_REVERSE; /* not strictly needed */ +#if defined (VI_MODE) + if (VI_COMMAND_MODE() && (pchar == '?' || pchar == '/')) + cxt->sflags |= SF_PATTERN; +#endif cxt->direction = dir; cxt->history_pos = cxt->save_line; @@ -210,8 +248,8 @@ _rl_nsearch_init (dir, pchar) rl_end = rl_point = 0; p = _rl_make_prompt_for_search (pchar ? pchar : ':'); - rl_message ("%s", p, 0); - free (p); + rl_message ("%s", p); + xfree (p); RL_SETSTATE(RL_STATE_NSEARCH); @@ -220,10 +258,8 @@ _rl_nsearch_init (dir, pchar) return cxt; } -static int -_rl_nsearch_cleanup (cxt, r) - _rl_search_cxt *cxt; - int r; +int +_rl_nsearch_cleanup (_rl_search_cxt *cxt, int r) { _rl_scxt_dispose (cxt, 0); _rl_nscxt = 0; @@ -234,14 +270,14 @@ _rl_nsearch_cleanup (cxt, r) } static void -_rl_nsearch_abort (cxt) - _rl_search_cxt *cxt; +_rl_nsearch_abort (_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_clear_message (); + _rl_fix_point (1); RL_UNSETSTATE (RL_STATE_NSEARCH); } @@ -250,10 +286,13 @@ _rl_nsearch_abort (cxt) 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; +_rl_nsearch_dispatch (_rl_search_cxt *cxt, int c) { + int n; + + if (c < 0) + c = CTRL ('C'); + switch (c) { case CTRL('W'): @@ -284,6 +323,28 @@ _rl_nsearch_dispatch (cxt, c) _rl_nsearch_abort (cxt); return -1; + case ESC: + /* XXX - experimental code to allow users to bracketed-paste into the + search string. Similar code is in isearch.c:_rl_isearch_dispatch(). + The difference here is that the bracketed paste sometimes doesn't + paste everything, so checking for the prefix and the suffix in the + input queue doesn't work well. We just have to check to see if the + number of chars in the input queue is enough for the bracketed paste + prefix and hope for the best. */ + if (_rl_enable_bracketed_paste && ((n = _rl_nchars_available ()) >= (BRACK_PASTE_SLEN-1))) + { + if (_rl_read_bracketed_paste_prefix (c) == 1) + rl_bracketed_paste_begin (1, c); + else + { + c = rl_read_key (); /* get the ESC that got pushed back */ + _rl_insert_char (1, c); + } + } + else + _rl_insert_char (1, c); + break; + default: #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) @@ -295,6 +356,7 @@ _rl_nsearch_dispatch (cxt, c) } (*rl_redisplay_function) (); + rl_deactivate_mark (); return 1; } @@ -303,8 +365,7 @@ _rl_nsearch_dispatch (cxt, c) using _rl_nsearch_cleanup (). Returns 1 if the search was successful, 0 otherwise. */ static int -_rl_nsearch_dosearch (cxt) - _rl_search_cxt *cxt; +_rl_nsearch_dosearch (_rl_search_cxt *cxt) { rl_mark = cxt->save_mark; @@ -337,7 +398,7 @@ _rl_nsearch_dosearch (cxt) } rl_restore_prompt (); - return (noninc_dosearch (noninc_search_string, cxt->direction)); + return (noninc_dosearch (noninc_search_string, cxt->direction, cxt->sflags&SF_PATTERN)); } /* Search non-interactively through the history list. DIR < 0 means to @@ -346,9 +407,7 @@ _rl_nsearch_dosearch (cxt) 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; +noninc_search (int dir, int pchar) { _rl_search_cxt *cxt; int c, r; @@ -364,6 +423,12 @@ noninc_search (dir, pchar) { c = _rl_search_getchar (cxt); + if (c < 0) + { + _rl_nsearch_abort (cxt); + return 1; + } + if (c == 0) break; @@ -381,8 +446,7 @@ noninc_search (dir, pchar) /* 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; +rl_noninc_forward_search (int count, int key) { return noninc_search (1, (key == '?') ? '?' : 0); } @@ -390,54 +454,68 @@ rl_noninc_forward_search (count, key) /* 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; +rl_noninc_reverse_search (int count, int 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. */ + for. If there is no saved search string, abort. If the vi-mode code + calls this, KEY will be `N'. */ int -rl_noninc_forward_search_again (count, key) - int count, key; +rl_noninc_forward_search_again (int count, int key) { int r; if (!noninc_search_string) { rl_ding (); - return (-1); + return (1); } - r = noninc_dosearch (noninc_search_string, 1); +#if defined (VI_MODE) + if (VI_COMMAND_MODE() && key == 'N') + r = noninc_dosearch (noninc_search_string, 1, SF_PATTERN); + else +#endif + r = noninc_dosearch (noninc_search_string, 1, 0); return (r != 1); } /* Reverse search in the history list for the last string searched - for. If there is no saved search string, abort. */ + for. If there is no saved search string, abort. If the vi-mode code + calls this, KEY will be `n'. */ int -rl_noninc_reverse_search_again (count, key) - int count, key; +rl_noninc_reverse_search_again (int count, int key) { int r; if (!noninc_search_string) { rl_ding (); - return (-1); + return (1); } - r = noninc_dosearch (noninc_search_string, -1); +#if defined (VI_MODE) + if (VI_COMMAND_MODE() && key == 'n') + r = noninc_dosearch (noninc_search_string, -1, SF_PATTERN); + else +#endif + r = noninc_dosearch (noninc_search_string, -1, 0); return (r != 1); } #if defined (READLINE_CALLBACKS) int -_rl_nsearch_callback (cxt) - _rl_search_cxt *cxt; +_rl_nsearch_callback (_rl_search_cxt *cxt) { int c, r; c = _rl_search_getchar (cxt); + if (c <= 0) + { + if (c < 0) + _rl_nsearch_abort (cxt); + return 1; + } r = _rl_nsearch_dispatch (cxt, c); if (r != 0) return 1; @@ -448,29 +526,34 @@ _rl_nsearch_callback (cxt) #endif static int -rl_history_search_internal (count, dir) - int count, dir; +rl_history_search_internal (int count, int dir) { HIST_ENTRY *temp; - int ret, oldpos; + int ret, oldpos, newcol; + int had_saved_line; + char *t; + had_saved_line = _rl_saved_line_for_history != 0; 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. */ + /* Search COUNT times through the history for a line matching + history_search_string. If history_search_string[0] == '^', the + line must match from the start; otherwise any substring can match. + 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); + RL_CHECK_SIGNALS (); + ret = noninc_search_from_pos (history_search_string, _rl_history_search_pos + dir, dir, 0, &newcol); if (ret == -1) break; /* Get the history entry we found. */ - rl_history_search_pos = ret; + _rl_history_search_pos = ret; oldpos = where_history (); - history_set_pos (rl_history_search_pos); - temp = current_history (); + history_set_pos (_rl_history_search_pos); + temp = current_history (); /* will never be NULL after successful search */ history_set_pos (oldpos); /* Don't find multiple instances of the same line. */ @@ -483,20 +566,21 @@ rl_history_search_internal (count, dir) /* If we didn't find anything at all, return. */ if (temp == 0) { + /* XXX - check had_saved_line here? */ 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) + if (rl_point > _rl_history_search_len) { - rl_point = rl_end = 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_point = _rl_history_search_len; /* rl_maybe_unsave_line changes it */ rl_mark = rl_end; #endif return 1; @@ -505,47 +589,64 @@ rl_history_search_internal (count, dir) /* Copy the line we found into the current line buffer. */ make_history_line_current (temp); - rl_point = rl_history_search_len; + /* decide where to put rl_point -- need to change this for pattern search */ + if (_rl_history_search_flags & ANCHORED_SEARCH) + rl_point = _rl_history_search_len; /* easy case */ + else + { +#if 0 + t = strstr (rl_line_buffer, history_search_string); /* XXX */ + rl_point = t ? (int)(t - rl_line_buffer) + _rl_history_search_len : rl_end; +#else + rl_point = (newcol >= 0) ? newcol : rl_end; +#endif + } rl_mark = rl_end; return 0; } static void -rl_history_search_reinit () +rl_history_search_reinit (int flags) { - rl_history_search_pos = where_history (); - rl_history_search_len = rl_point; + int sind; + + _rl_history_search_pos = where_history (); + _rl_history_search_len = rl_point; + _rl_history_search_flags = flags; + prev_line_found = (char *)NULL; if (rl_point) { - if (rl_history_search_len >= history_string_size - 2) + /* Allocate enough space for anchored and non-anchored searches */ + if (_rl_history_search_len >= history_string_size - 2) { - history_string_size = rl_history_search_len + 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'; + sind = 0; + if (flags & ANCHORED_SEARCH) + history_search_string[sind++] = '^'; + strncpy (history_search_string + sind, rl_line_buffer, rl_point); + history_search_string[rl_point + sind] = '\0'; } - _rl_free_saved_history_line (); + _rl_free_saved_history_line (); /* XXX rl_undo_list? */ } /* 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. */ + search. The search is anchored to the beginning of the history line. */ int -rl_history_search_forward (count, ignore) - int count, ignore; +rl_history_search_forward (int count, int 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 (); + rl_history_search_reinit (ANCHORED_SEARCH); - if (rl_history_search_len == 0) + if (_rl_history_search_len == 0) return (rl_get_next_history (count, ignore)); return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1)); } @@ -554,17 +655,53 @@ rl_history_search_forward (count, ignore) 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; +rl_history_search_backward (int count, int 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 (); + rl_history_search_reinit (ANCHORED_SEARCH); + + if (_rl_history_search_len == 0) + return (rl_get_previous_history (count, ignore)); + return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1)); +} + +/* 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. The search succeeds if the search string is present anywhere + in the history line. */ +int +rl_history_substr_search_forward (int count, int ignore) +{ + if (count == 0) + return (0); + + if (rl_last_func != rl_history_substr_search_forward && + rl_last_func != rl_history_substr_search_backward) + rl_history_search_reinit (NON_ANCHORED_SEARCH); + + 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_substr_search_backward (int count, int ignore) +{ + if (count == 0) + return (0); + + if (rl_last_func != rl_history_substr_search_forward && + rl_last_func != rl_history_substr_search_backward) + rl_history_search_reinit (NON_ANCHORED_SEARCH); - if (rl_history_search_len == 0) + 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 index 18b4f03..36c9148 100644 --- a/lib/readline/shell.c +++ b/lib/readline/shell.c @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1997-2009,2017,2021 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. @@ -59,10 +59,12 @@ #include "rlstdc.h" #include "rlshell.h" +#include "rldefs.h" + #include "xmalloc.h" #if defined (HAVE_GETPWUID) && !defined (HAVE_GETPW_DECLS) -extern struct passwd *getpwuid PARAMS((uid_t)); +extern struct passwd *getpwuid (uid_t); #endif /* HAVE_GETPWUID && !HAVE_GETPW_DECLS */ #ifndef NULL @@ -90,8 +92,7 @@ extern struct passwd *getpwuid PARAMS((uid_t)); /* Does shell-like quoting using single quotes. */ char * -sh_single_quote (string) - char *string; +sh_single_quote (char *string) { register int c; char *result, *r, *s; @@ -120,54 +121,60 @@ sh_single_quote (string) /* Set the environment variables LINES and COLUMNS to lines and cols, respectively. */ +static char setenv_buf[INT_STRLEN_BOUND (int) + 1]; +static char putenv_buf1[INT_STRLEN_BOUND (int) + 6 + 1]; /* sizeof("LINES=") == 6 */ +static char putenv_buf2[INT_STRLEN_BOUND (int) + 8 + 1]; /* sizeof("COLUMNS=") == 8 */ + void -sh_set_lines_and_columns (lines, cols) - int lines, cols; +sh_set_lines_and_columns (int lines, int 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); + sprintf (setenv_buf, "%d", lines); + setenv ("LINES", setenv_buf, 1); + + sprintf (setenv_buf, "%d", cols); + setenv ("COLUMNS", setenv_buf, 1); #else /* !HAVE_SETENV */ # if defined (HAVE_PUTENV) - b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1); - sprintf (b, "LINES=%d", lines); - putenv (b); + sprintf (putenv_buf1, "LINES=%d", lines); + putenv (putenv_buf1); - b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1); - sprintf (b, "COLUMNS=%d", cols); - putenv (b); + sprintf (putenv_buf2, "COLUMNS=%d", cols); + putenv (putenv_buf2); # endif /* HAVE_PUTENV */ #endif /* !HAVE_SETENV */ } char * -sh_get_env_value (varname) - const char *varname; +sh_get_env_value (const char *varname) { return ((char *)getenv (varname)); } char * -sh_get_home_dir () +sh_get_home_dir (void) { - char *home_dir; + static char *home_dir = (char *)NULL; struct passwd *entry; + if (home_dir) + return (home_dir); + home_dir = (char *)NULL; #if defined (HAVE_GETPWUID) +# if defined (__TANDEM) + entry = getpwnam (getlogin ()); +# else entry = getpwuid (getuid ()); +# endif if (entry) - home_dir = entry->pw_dir; + home_dir = savestring (entry->pw_dir); +#endif + +#if defined (HAVE_GETPWENT) + endpwent (); /* some systems need this */ #endif + return (home_dir); } @@ -178,8 +185,7 @@ sh_get_home_dir () #endif int -sh_unset_nodelay_mode (fd) - int fd; +sh_unset_nodelay_mode (int fd) { #if defined (HAVE_FCNTL) int flags, bflags; diff --git a/lib/readline/signals.c b/lib/readline/signals.c index 4fbc019..9df365e 100644 --- a/lib/readline/signals.c +++ b/lib/readline/signals.c @@ -1,6 +1,6 @@ /* signals.c -- signal handling support for readline. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 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. @@ -48,23 +48,11 @@ #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 +#define SIGHANDLER_RETURN return /* This typedef is equivalent to the one for Function; it allows us to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ -typedef RETSIGTYPE SigHandler (); +typedef void SigHandler (int); #if defined (HAVE_POSIX_SIGNALS) typedef struct sigaction sighandler_cxt; @@ -78,16 +66,17 @@ typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt # 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 SigHandler *rl_set_sighandler (int, SigHandler *, sighandler_cxt *); +static void rl_maybe_set_sighandler (int, SigHandler *, sighandler_cxt *); +static void rl_maybe_restore_sighandler (int, sighandler_cxt *); -static RETSIGTYPE rl_signal_handler PARAMS((int)); -static RETSIGTYPE _rl_handle_signal PARAMS((int)); +static void rl_signal_handler (int); +static void _rl_handle_signal (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. */ + SIGINT, SIGTERM, SIGHUP, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */ int rl_catch_signals = 1; /* If non-zero, readline will install a signal handler for SIGWINCH. */ @@ -98,7 +87,6 @@ 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 everywhere */ /* If non-zero, print characters corresponding to received signals as long as @@ -112,13 +100,17 @@ int _rl_susp_char = 0; static int signals_set_flag; static int sigwinch_set_flag; +#if defined (HAVE_POSIX_SIGNALS) +sigset_t _rl_orig_sigset; +#endif /* !HAVE_POSIX_SIGNALS */ + /* **************************************************************** */ /* */ /* Signal Handling */ /* */ /* **************************************************************** */ -static sighandler_cxt old_int, old_term, old_alrm, old_quit; +static sighandler_cxt old_int, old_term, old_hup, old_alrm, old_quit; #if defined (SIGTSTP) static sighandler_cxt old_tstp, old_ttou, old_ttin; #endif @@ -126,39 +118,56 @@ static sighandler_cxt old_tstp, old_ttou, old_ttin; static sighandler_cxt old_winch; #endif +_rl_sigcleanup_func_t *_rl_sigcleanup; +void *_rl_sigcleanarg; + /* Readline signal handler functions. */ -/* Called from RL_CHECK_SIGNALS() macro */ -RETSIGTYPE -_rl_signal_handler (sig) +/* Called from RL_CHECK_SIGNALS() macro to run signal handling code. */ +void +_rl_signal_handler (int 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)) +#if defined (SIGWINCH) + if (sig == SIGWINCH) { - _rl_interrupt_immediately = 0; - _rl_handle_signal (sig); + RL_SETSTATE(RL_STATE_SIGHANDLER); + + rl_resize_terminal (); + /* XXX - experimental for now */ + /* Call a signal hook because though we called the original signal handler + in rl_sigwinch_handler below, we will not resend the signal to + ourselves. */ + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); + + RL_UNSETSTATE(RL_STATE_SIGHANDLER); } else - _rl_caught_signal = sig; +#endif + _rl_handle_signal (sig); SIGHANDLER_RETURN; } -static RETSIGTYPE -_rl_handle_signal (sig) - int sig; +static void +rl_signal_handler (int sig) { + _rl_caught_signal = sig; + SIGHANDLER_RETURN; +} + +/* This is called to handle a signal when it is safe to do so (out of the + signal handler execution path). Called by _rl_signal_handler for all the + signals readline catches except SIGWINCH. */ +static void +_rl_handle_signal (int sig) +{ + int block_sig; + #if defined (HAVE_POSIX_SIGNALS) - sigset_t set; + sigset_t set, oset; #else /* !HAVE_POSIX_SIGNALS */ # if defined (HAVE_BSD_SIGNALS) long omask; @@ -180,37 +189,98 @@ _rl_handle_signal (sig) rl_set_sighandler (sig, SIG_IGN, &dummy_cxt); #endif /* !HAVE_BSD_SIGNALS && !HAVE_POSIX_SIGNALS */ + /* If there's a sig cleanup function registered, call it and `deregister' + the cleanup function to avoid multiple calls */ + if (_rl_sigcleanup) + { + (*_rl_sigcleanup) (sig, _rl_sigcleanarg); + _rl_sigcleanup = 0; + _rl_sigcleanarg = 0; + } + +#if defined (HAVE_POSIX_SIGNALS) + /* Get the current set of blocked signals. If we want to block a signal for + the duration of the cleanup functions, make sure to add it to SET and + set block_sig = 1 (see the SIGHUP case below). */ + block_sig = 0; /* sentinel to block signals with sigprocmask */ + sigemptyset (&set); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); +#endif + switch (sig) { case SIGINT: + /* We will end up blocking SIGTTOU while we are resetting the tty, so + watch out for this if it causes problems. We could prevent this by + setting block_sig to 1 without modifying SET. */ _rl_reset_completion_state (); rl_free_line_state (); +#if defined (READLINE_CALLBACKS) + rl_callback_sigcleanup (); +#endif + /* FALLTHROUGH */ - case SIGTERM: #if defined (SIGTSTP) case SIGTSTP: - case SIGTTOU: case SIGTTIN: + case SIGTTOU: +# if defined (HAVE_POSIX_SIGNALS) + /* Block SIGTTOU so we can restore the terminal settings to something + sane without stopping on SIGTTOU if we have been placed into the + background. Even trying to get the current terminal pgrp with + tcgetpgrp() will generate SIGTTOU, so we don't bother. We still do + this even if we've been stopped on SIGTTOU, since we handle signals + when we have returned from the signal handler and the signal is no + longer blocked. */ + if (block_sig == 0) + { + sigaddset (&set, SIGTTOU); + block_sig = 1; + } +# endif #endif /* SIGTSTP */ + /* Any signals that should be blocked during cleanup should go here. */ +#if defined (SIGHUP) + case SIGHUP: +# if defined (_AIX) + if (block_sig == 0) + { + sigaddset (&set, sig); + block_sig = 1; + } +# endif // _AIX +#endif + /* Signals that don't require blocking during cleanup should go here. */ + case SIGTERM: #if defined (SIGALRM) case SIGALRM: + if (sig == SIGALRM) + _rl_timeout_handle_sigalrm (); #endif #if defined (SIGQUIT) case SIGQUIT: #endif + +#if defined (HAVE_POSIX_SIGNALS) + if (block_sig) + sigprocmask (SIG_BLOCK, &set, &oset); +#endif + rl_echo_signal_char (sig); rl_cleanup_after_signal (); + /* At this point, the application's signal handler, if any, is the + current handler. */ + #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 */ + /* Unblock any signal(s) blocked above */ + if (block_sig) + sigprocmask (SIG_UNBLOCK, &oset, (sigset_t *)NULL); +#endif + + /* We don't have to bother unblocking the signal because we are not + running in a signal handler context. */ #if defined (__EMX__) signal (sig, SIG_ACK); @@ -222,16 +292,10 @@ _rl_handle_signal (sig) 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 */ + /* We don't need to modify the signal mask now that this is not run in + a signal handler context. */ - rl_reset_after_signal (); + rl_reset_after_signal (); } RL_UNSETSTATE(RL_STATE_SIGHANDLER); @@ -239,9 +303,8 @@ _rl_handle_signal (sig) } #if defined (SIGWINCH) -static RETSIGTYPE -rl_sigwinch_handler (sig) - int sig; +static void +rl_sigwinch_handler (int sig) { SigHandler *oh; @@ -256,7 +319,7 @@ rl_sigwinch_handler (sig) #endif RL_SETSTATE(RL_STATE_SIGHANDLER); - rl_resize_terminal (); + _rl_caught_signal = sig; /* If another sigwinch handler has been installed, call it. */ oh = (SigHandler *)old_winch.sa_handler; @@ -272,9 +335,7 @@ rl_sigwinch_handler (sig) #if !defined (HAVE_POSIX_SIGNALS) static int -rl_sigaction (sig, nh, oh) - int sig; - sighandler_cxt *nh, *oh; +rl_sigaction (int sig, sighandler_cxt *nh, sighandler_cxt *oh) { oh->sa_handler = signal (sig, nh->sa_handler); return 0; @@ -285,10 +346,7 @@ rl_sigaction (sig, nh, oh) 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; +rl_set_sighandler (int sig, SigHandler *handler, sighandler_cxt *ohandler) { sighandler_cxt old_handler; #if defined (HAVE_POSIX_SIGNALS) @@ -316,23 +374,38 @@ rl_set_sighandler (sig, handler, ohandler) return (ohandler->sa_handler); } +/* Set disposition of SIG to HANDLER, returning old state in OHANDLER. Don't + change disposition if OHANDLER indicates the signal was ignored. */ static void -rl_maybe_set_sighandler (sig, handler, ohandler) - int sig; - SigHandler *handler; - sighandler_cxt *ohandler; +rl_maybe_set_sighandler (int sig, SigHandler *handler, sighandler_cxt *ohandler) { sighandler_cxt dummy; SigHandler *oh; sigemptyset (&dummy.sa_mask); + dummy.sa_flags = 0; oh = rl_set_sighandler (sig, handler, ohandler); if (oh == (SigHandler *)SIG_IGN) rl_sigaction (sig, ohandler, &dummy); } +/* Set the disposition of SIG to HANDLER, if HANDLER->sa_handler indicates the + signal was not being ignored. MUST only be called for signals whose + disposition was changed using rl_maybe_set_sighandler or for which the + SIG_IGN check was performed inline (e.g., SIGALRM below). */ +static void +rl_maybe_restore_sighandler (int sig, sighandler_cxt *handler) +{ + sighandler_cxt dummy; + + sigemptyset (&dummy.sa_mask); + dummy.sa_flags = 0; + if (handler->sa_handler != SIG_IGN) + rl_sigaction (sig, handler, &dummy); +} + int -rl_set_signals () +rl_set_signals (void) { sighandler_cxt dummy; SigHandler *oh; @@ -348,6 +421,9 @@ rl_set_signals () sigaddset (&bset, SIGINT); sigaddset (&bset, SIGTERM); +#if defined (SIGHUP) + sigaddset (&bset, SIGHUP); +#endif #if defined (SIGQUIT) sigaddset (&bset, SIGQUIT); #endif @@ -370,12 +446,15 @@ rl_set_signals () if (rl_catch_signals && signals_set_flag == 0) { #if defined (HAVE_POSIX_SIGNALS) - sigemptyset (&oset); - sigprocmask (SIG_BLOCK, &bset, &oset); + sigemptyset (&_rl_orig_sigset); + sigprocmask (SIG_BLOCK, &bset, &_rl_orig_sigset); #endif rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int); rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term); +#if defined (SIGHUP) + rl_maybe_set_sighandler (SIGHUP, rl_signal_handler, &old_hup); +#endif #if defined (SIGQUIT) rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit); #endif @@ -409,7 +488,14 @@ rl_set_signals () signals_set_flag = 1; #if defined (HAVE_POSIX_SIGNALS) - sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); + sigprocmask (SIG_SETMASK, &_rl_orig_sigset, (sigset_t *)NULL); +#endif + } + else if (rl_catch_signals == 0) + { +#if defined (HAVE_POSIX_SIGNALS) + sigemptyset (&_rl_orig_sigset); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &_rl_orig_sigset); #endif } @@ -425,33 +511,39 @@ rl_set_signals () } int -rl_clear_signals () +rl_clear_signals (void) { 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); + /* Since rl_maybe_set_sighandler doesn't override a SIG_IGN handler, + we should in theory not have to restore a handler where + old_xxx.sa_handler == SIG_IGN. That's what rl_maybe_restore_sighandler + does. Fewer system calls should reduce readline's per-line + overhead */ + rl_maybe_restore_sighandler (SIGINT, &old_int); + rl_maybe_restore_sighandler (SIGTERM, &old_term); +#if defined (SIGHUP) + rl_maybe_restore_sighandler (SIGHUP, &old_hup); +#endif #if defined (SIGQUIT) - rl_sigaction (SIGQUIT, &old_quit, &dummy); + rl_maybe_restore_sighandler (SIGQUIT, &old_quit); #endif #if defined (SIGALRM) - rl_sigaction (SIGALRM, &old_alrm, &dummy); + rl_maybe_restore_sighandler (SIGALRM, &old_alrm); #endif #if defined (SIGTSTP) - rl_sigaction (SIGTSTP, &old_tstp, &dummy); + rl_maybe_restore_sighandler (SIGTSTP, &old_tstp); #endif /* SIGTSTP */ #if defined (SIGTTOU) - rl_sigaction (SIGTTOU, &old_ttou, &dummy); + rl_maybe_restore_sighandler (SIGTTOU, &old_ttou); #endif /* SIGTTOU */ #if defined (SIGTTIN) - rl_sigaction (SIGTTIN, &old_ttin, &dummy); + rl_maybe_restore_sighandler (SIGTTIN, &old_ttin); #endif /* SIGTTIN */ signals_set_flag = 0; @@ -472,7 +564,7 @@ rl_clear_signals () /* Clean up the terminal and readline state after catching a signal, before resending it to the calling application. */ void -rl_cleanup_after_signal () +rl_cleanup_after_signal (void) { _rl_clean_up_for_exit (); if (rl_deprep_term_function) @@ -483,7 +575,7 @@ rl_cleanup_after_signal () /* Reset the terminal and readline state after a signal handler returns. */ void -rl_reset_after_signal () +rl_reset_after_signal (void) { if (rl_prep_term_function) (*rl_prep_term_function) (_rl_meta_flag); @@ -495,7 +587,7 @@ rl_reset_after_signal () numeric arguments in process) after catching a signal, before calling rl_cleanup_after_signal(). */ void -rl_free_line_state () +rl_free_line_state (void) { register HIST_ENTRY *entry; @@ -510,6 +602,17 @@ rl_free_line_state () _rl_reset_argument (); } +int +rl_pending_signal (void) +{ + return (_rl_caught_signal); +} + +void +rl_check_signals (void) +{ + RL_CHECK_SIGNALS (); +} #endif /* HANDLE_SIGNALS */ /* **************************************************************** */ @@ -534,59 +637,35 @@ static int sigwinch_blocked; /* Cause SIGINT to not be delivered until the corresponding call to release_sigint(). */ void -_rl_block_sigint () +_rl_block_sigint (void) { 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 () +_rl_release_sigint (void) { 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; + RL_CHECK_SIGNALS (); } /* Cause SIGWINCH to not be delivered until the corresponding call to release_sigwinch(). */ void -_rl_block_sigwinch () +_rl_block_sigwinch (void) { if (sigwinch_blocked) return; +#if defined (SIGWINCH) + #if defined (HAVE_POSIX_SIGNALS) sigemptyset (&sigwinch_set); sigemptyset (&sigwinch_oset); @@ -602,16 +681,20 @@ _rl_block_sigwinch () # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ +#endif /* SIGWINCH */ + sigwinch_blocked = 1; } /* Allow SIGWINCH to be delivered. */ void -_rl_release_sigwinch () +_rl_release_sigwinch (void) { if (sigwinch_blocked == 0) return; +#if defined (SIGWINCH) + #if defined (HAVE_POSIX_SIGNALS) sigprocmask (SIG_SETMASK, &sigwinch_oset, (sigset_t *)NULL); #else @@ -624,6 +707,8 @@ _rl_release_sigwinch () # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ +#endif /* SIGWINCH */ + sigwinch_blocked = 0; } @@ -633,8 +718,7 @@ _rl_release_sigwinch () /* */ /* **************************************************************** */ void -rl_echo_signal_char (sig) - int sig; +rl_echo_signal_char (int sig) { char cstr[3]; int cslen, c; diff --git a/lib/readline/tcap.h b/lib/readline/tcap.h index 9d09b7a..859e6ee 100644 --- a/lib/readline/tcap.h +++ b/lib/readline/tcap.h @@ -1,6 +1,6 @@ /* tcap.h -- termcap library functions and variables. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2015 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. @@ -31,6 +31,8 @@ # include "rltty.h" # endif # include +#elif defined (HAVE_NCURSES_TERMCAP_H) +# include #else /* On Solaris2, sys/types.h #includes sys/reg.h, which #defines PC. diff --git a/lib/readline/terminal.c b/lib/readline/terminal.c index ee13092..9997161 100644 --- a/lib/readline/terminal.c +++ b/lib/readline/terminal.c @@ -1,6 +1,6 @@ /* terminal.c -- controlling the terminal with termcap. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2022 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. @@ -51,11 +51,14 @@ /* System-specific feature definitions and include files. */ #include "rldefs.h" -#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) -# include -#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ +#ifdef __MSDOS__ +# include +#endif #include "rltty.h" +#if defined (HAVE_SYS_IOCTL_H) +# include /* include for declaration of ioctl */ +#endif #include "tcap.h" /* Some standard library routines. */ @@ -70,42 +73,46 @@ # include # include -static void _win_get_screensize PARAMS((int *, int *)); +static void _win_get_screensize (int *, int *); #endif #if defined (__EMX__) -static void _emx_get_screensize PARAMS((int *, int *)); +static void _emx_get_screensize (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. */ +/* 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; +/* If this is non-zero, readline will set LINES and COLUMNS in the + environment when it handles SIGWINCH. */ +int rl_change_environment = 1; + /* **************************************************************** */ /* */ /* Terminal and Termcap */ /* */ /* **************************************************************** */ +#ifndef __MSDOS__ static char *term_buffer = (char *)NULL; static char *term_string_buffer = (char *)NULL; +#endif static int tcap_initialized; -#if !defined (__linux__) +#if !defined (__linux__) && !defined (NCURSES_VERSION) # if defined (__EMX__) || defined (NEED_EXTERN_PC) extern # endif /* __EMX__ || NEED_EXTERN_PC */ char PC, *BC, *UP; -#endif /* __linux__ */ +#endif /* !__linux__ && !NCURSES_VERSION */ /* Some strings to control terminal actions. These are output by tputs (). */ char *_rl_term_clreol; char *_rl_term_clrpag; +char *_rl_term_clrscroll; char *_rl_term_cr; char *_rl_term_backspace; char *_rl_term_goto; @@ -125,6 +132,7 @@ char *_rl_term_IC; char *_rl_term_dc; char *_rl_term_DC; +/* How to move forward a char, non-destructively */ char *_rl_term_forward_char; /* How to go up a line. */ @@ -144,6 +152,10 @@ static int term_has_meta; static char *_rl_term_mm; static char *_rl_term_mo; +/* The sequences to enter and exit standout mode. */ +static char *_rl_term_so; +static char *_rl_term_se; + /* The key sequences output by the arrow keys, if this terminal has any. */ static char *_rl_term_ku; static char *_rl_term_kd; @@ -165,11 +177,33 @@ static char *_rl_term_kD; /* Insert key */ static char *_rl_term_kI; +/* Page up and page down keys */ +static char *_rl_term_kP; +static char *_rl_term_kN; + /* Cursor control */ static char *_rl_term_vs; /* very visible */ static char *_rl_term_ve; /* normal */ -static void bind_termcap_arrow_keys PARAMS((Keymap)); +/* User-settable color sequences to begin and end the active region. Defaults + are rl_term_so and rl_term_se on non-dumb terminals. */ +char *_rl_active_region_start_color = NULL; +char *_rl_active_region_end_color = NULL; + +/* It's not clear how HPUX is so broken here. */ +#ifdef TGETENT_BROKEN +# define TGETENT_SUCCESS 0 +#else +# define TGETENT_SUCCESS 1 +#endif +#ifdef TGETFLAG_BROKEN +# define TGETFLAG_SUCCESS 0 +#else +# define TGETFLAG_SUCCESS 1 +#endif +#define TGETFLAG(cap) (tgetflag (cap) == TGETFLAG_SUCCESS) + +static void bind_termcap_arrow_keys (Keymap); /* Variables that hold the screen dimensions, used by the display code. */ int _rl_screenwidth, _rl_screenheight, _rl_screenchars; @@ -182,8 +216,7 @@ int _rl_enable_meta = 1; #if defined (__EMX__) static void -_emx_get_screensize (swp, shp) - int *swp, *shp; +_emx_get_screensize (int *swp, int *shp) { int sz[2]; @@ -198,8 +231,7 @@ _emx_get_screensize (swp, shp) #if defined (__MINGW32__) static void -_win_get_screensize (swp, shp) - int *swp, *shp; +_win_get_screensize (int *swp, int *shp) { HANDLE hConOut; CONSOLE_SCREEN_BUFFER_INFO scr; @@ -221,8 +253,7 @@ _win_get_screensize (swp, shp) 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; +_rl_get_screen_size (int tty, int ignore_env) { char *ss; #if defined (TIOCGWINSZ) @@ -264,7 +295,10 @@ _rl_get_screen_size (tty, ignore_env) if (_rl_screenwidth <= 0) _rl_screenwidth = wc; -#if !defined (__DJGPP__) +#if defined (__DJGPP__) + if (_rl_screenwidth <= 0) + _rl_screenwidth = ScreenCols (); +#else if (_rl_screenwidth <= 0 && term_string_buffer) _rl_screenwidth = tgetnum ("co"); #endif @@ -280,7 +314,10 @@ _rl_get_screen_size (tty, ignore_env) if (_rl_screenheight <= 0) _rl_screenheight = wr; -#if !defined (__DJGPP__) +#if defined (__DJGPP__) + if (_rl_screenheight <= 0) + _rl_screenheight = ScreenRows (); +#else if (_rl_screenheight <= 0 && term_string_buffer) _rl_screenheight = tgetnum ("li"); #endif @@ -296,7 +333,8 @@ _rl_get_screen_size (tty, ignore_env) /* 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_change_environment) + sh_set_lines_and_columns (_rl_screenheight, _rl_screenwidth); if (_rl_term_autowrap == 0) _rl_screenwidth--; @@ -305,8 +343,7 @@ _rl_get_screen_size (tty, ignore_env) } void -_rl_set_screen_size (rows, cols) - int rows, cols; +_rl_set_screen_size (int rows, int cols) { if (_rl_term_autowrap == -1) _rl_init_terminal_io (rl_terminal_name); @@ -325,15 +362,13 @@ _rl_set_screen_size (rows, cols) } void -rl_set_screen_size (rows, cols) - int rows, cols; +rl_set_screen_size (int rows, int cols) { _rl_set_screen_size (rows, cols); } void -rl_get_screen_size (rows, cols) - int *rows, *cols; +rl_get_screen_size (int *rows, int *cols) { if (rows) *rows = _rl_screenheight; @@ -342,17 +377,27 @@ rl_get_screen_size (rows, cols) } void -rl_reset_screen_size () +rl_reset_screen_size (void) { _rl_get_screen_size (fileno (rl_instream), 0); } - + void -rl_resize_terminal () +_rl_sigwinch_resize_terminal (void) { - if (_rl_echoing_p) + _rl_get_screen_size (fileno (rl_instream), 1); +} + +void +rl_resize_terminal (void) +{ + int width, height; + + width = _rl_screenwidth; + height = _rl_screenheight; + _rl_get_screen_size (fileno (rl_instream), 1); + if (_rl_echoing_p && (width != _rl_screenwidth || height != _rl_screenheight)) { - _rl_get_screen_size (fileno (rl_instream), 1); if (CUSTOM_REDISPLAY_FUNC ()) rl_forced_update_display (); else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0) @@ -371,6 +416,7 @@ static const struct _tc_string tc_strings[] = { { "@7", &_rl_term_at7 }, { "DC", &_rl_term_DC }, + { "E3", &_rl_term_clrscroll }, { "IC", &_rl_term_IC }, { "ce", &_rl_term_clreol }, { "cl", &_rl_term_clrpag }, @@ -382,6 +428,8 @@ static const struct _tc_string tc_strings[] = { "kD", &_rl_term_kD }, /* delete */ { "kH", &_rl_term_kH }, /* home down ?? */ { "kI", &_rl_term_kI }, /* insert */ + { "kN", &_rl_term_kN }, /* page down */ + { "kP", &_rl_term_kP }, /* page up */ { "kd", &_rl_term_kd }, { "ke", &_rl_term_ke }, /* end keypad mode */ { "kh", &_rl_term_kh }, /* home */ @@ -394,6 +442,8 @@ static const struct _tc_string tc_strings[] = { "mo", &_rl_term_mo }, { "nd", &_rl_term_forward_char }, { "pc", &_rl_term_pc }, + { "se", &_rl_term_se }, + { "so", &_rl_term_so }, { "up", &_rl_term_up }, { "vb", &_rl_visible_bell }, { "vs", &_rl_term_vs }, @@ -405,8 +455,7 @@ static const struct _tc_string tc_strings[] = /* 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; +get_term_capabilities (char **bp) { #if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */ register int i; @@ -418,20 +467,42 @@ get_term_capabilities (bp) } int -_rl_init_terminal_io (terminal_name) - const char *terminal_name; +_rl_init_terminal_io (const char *terminal_name) { const char *term; char *buffer; - int tty, tgetent_ret; + int tty, tgetent_ret, dumbterm, reset_region_colors; term = terminal_name ? terminal_name : sh_get_env_value ("TERM"); - _rl_term_clrpag = _rl_term_cr = _rl_term_clreol = (char *)NULL; + _rl_term_clrpag = _rl_term_cr = _rl_term_clreol = _rl_term_clrscroll = (char *)NULL; tty = rl_instream ? fileno (rl_instream) : 0; if (term == 0) term = "dumb"; + dumbterm = STREQ (term, "dumb"); + + reset_region_colors = 1; + +#ifdef __MSDOS__ + _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_mm = _rl_term_mo = (char *)NULL; + _rl_terminal_can_insert = term_has_meta = _rl_term_autowrap = 0; + _rl_term_cr = "\r"; + _rl_term_backspace = (char *)NULL; + _rl_term_goto = _rl_term_pc = _rl_term_ip = (char *)NULL; + _rl_term_ks = _rl_term_ke =_rl_term_vs = _rl_term_ve = (char *)NULL; + _rl_term_kh = _rl_term_kH = _rl_term_at7 = _rl_term_kI = (char *)NULL; + _rl_term_kN = _rl_term_kP = (char *)NULL; + _rl_term_so = _rl_term_se = (char *)NULL; +#if defined(HACK_TERMCAP_MOTION) + _rl_term_forward_char = (char *)NULL; +#endif + + _rl_get_screen_size (tty, 0); +#else /* !__MSDOS__ */ /* 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). */ @@ -452,7 +523,7 @@ _rl_init_terminal_io (terminal_name) tgetent_ret = tgetent (term_buffer, term); } - if (tgetent_ret <= 0) + if (tgetent_ret != TGETENT_SUCCESS) { FREE (term_string_buffer); FREE (term_buffer); @@ -487,11 +558,22 @@ _rl_init_terminal_io (terminal_name) _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_kN = _rl_term_kP = (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_term_so = _rl_term_se = (char *)NULL; _rl_terminal_can_insert = term_has_meta = 0; + /* Assume generic unknown terminal can't handle the enable/disable + escape sequences */ + _rl_enable_bracketed_paste = 0; + + /* No terminal so/se capabilities. */ + _rl_enable_active_region = 0; + _rl_reset_region_color (0, NULL); + _rl_reset_region_color (1, NULL); + /* 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... */ @@ -510,10 +592,10 @@ _rl_init_terminal_io (terminal_name) BC = _rl_term_backspace; UP = _rl_term_up; - if (!_rl_term_cr) + if (_rl_term_cr == 0) _rl_term_cr = "\r"; - _rl_term_autowrap = tgetflag ("am") && tgetflag ("xn"); + _rl_term_autowrap = TGETFLAG ("am") && TGETFLAG ("xn"); /* Allow calling application to set default height and width, using rl_set_screen_size */ @@ -528,9 +610,10 @@ _rl_init_terminal_io (terminal_name) /* 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; + term_has_meta = TGETFLAG ("km"); if (term_has_meta == 0) _rl_term_mm = _rl_term_mo = (char *)NULL; +#endif /* !__MSDOS__ */ /* Attempt to find and bind the arrow keys. Do not override already bound keys in an overzealous attempt, however. */ @@ -542,13 +625,23 @@ _rl_init_terminal_io (terminal_name) bind_termcap_arrow_keys (vi_insertion_keymap); #endif /* VI_MODE */ + /* There's no way to determine whether or not a given terminal supports + bracketed paste mode, so we assume a terminal named "dumb" does not. */ + if (dumbterm) + _rl_enable_bracketed_paste = _rl_enable_active_region = 0; + + if (reset_region_colors) + { + _rl_reset_region_color (0, _rl_term_so); + _rl_reset_region_color (1, _rl_term_se); + } + return 0; } /* Bind the arrow key sequences from the termcap description in MAP. */ static void -bind_termcap_arrow_keys (map) - Keymap map; +bind_termcap_arrow_keys (Keymap map) { Keymap xkeymap; @@ -564,13 +657,16 @@ bind_termcap_arrow_keys (map) rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete); + rl_bind_keyseq_if_unbound (_rl_term_kI, rl_overwrite_mode); /* Insert */ + + rl_bind_keyseq_if_unbound (_rl_term_kN, rl_history_search_forward); /* Page Down */ + rl_bind_keyseq_if_unbound (_rl_term_kP, rl_history_search_backward); /* Page Up */ _rl_keymap = xkeymap; } char * -rl_get_termcap (cap) - const char *cap; +rl_get_termcap (const char *cap) { register int i; @@ -587,8 +683,7 @@ rl_get_termcap (cap) /* Re-initialize the terminal considering that the TERM/TERMCAP variable has changed. */ int -rl_reset_terminal (terminal_name) - const char *terminal_name; +rl_reset_terminal (const char *terminal_name) { _rl_screenwidth = _rl_screenheight = 0; _rl_init_terminal_io (terminal_name); @@ -598,15 +693,13 @@ rl_reset_terminal (terminal_name) /* A function for the use of tputs () */ #ifdef _MINIX void -_rl_output_character_function (c) - int c; +_rl_output_character_function (int c) { putc (c, _rl_out_stream); } #else /* !_MINIX */ int -_rl_output_character_function (c) - int c; +_rl_output_character_function (int c) { return putc (c, _rl_out_stream); } @@ -614,24 +707,23 @@ _rl_output_character_function (c) /* Write COUNT characters from STRING to the output stream. */ void -_rl_output_some_chars (string, count) - const char *string; - int count; +_rl_output_some_chars (const char *string, int count) { fwrite (string, 1, count, _rl_out_stream); } /* Move the cursor back. */ int -_rl_backspace (count) - int count; +_rl_backspace (int count) { register int i; +#ifndef __MSDOS__ if (_rl_term_backspace) for (i = 0; i < count; i++) tputs (_rl_term_backspace, 1, _rl_output_character_function); else +#endif for (i = 0; i < count; i++) putc ('\b', _rl_out_stream); return 0; @@ -639,7 +731,7 @@ _rl_backspace (count) /* Move to the start of the next line. */ int -rl_crlf () +rl_crlf (void) { #if defined (NEW_TTY_DRIVER) || defined (__MINT__) if (_rl_term_cr) @@ -649,9 +741,19 @@ rl_crlf () return 0; } +void +_rl_cr (void) +{ +#if defined (__MSDOS__) + putc ('\r', rl_outstream); +#else + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif +} + /* Ring the terminal bell. */ int -rl_ding () +rl_ding (void) { if (_rl_echoing_p) { @@ -663,7 +765,11 @@ rl_ding () case VISIBLE_BELL: if (_rl_visible_bell) { +#ifdef __DJGPP__ + ScreenVisualBell (); +#else tputs (_rl_visible_bell, 1, _rl_output_character_function); +#endif break; } /* FALLTHROUGH */ @@ -677,24 +783,125 @@ rl_ding () return (-1); } +/* **************************************************************** */ +/* */ +/* Entering and leaving terminal standout mode */ +/* */ +/* **************************************************************** */ + +void +_rl_standout_on (void) +{ +#ifndef __MSDOS__ + if (_rl_term_so && _rl_term_se) + tputs (_rl_term_so, 1, _rl_output_character_function); +#endif +} + +void +_rl_standout_off (void) +{ +#ifndef __MSDOS__ + if (_rl_term_so && _rl_term_se) + tputs (_rl_term_se, 1, _rl_output_character_function); +#endif +} + +/* **************************************************************** */ +/* */ +/* Controlling color for a portion of the line */ +/* */ +/* **************************************************************** */ + +/* Reset the region color variables to VALUE depending on WHICH (0 == start, + 1 == end). This is where all the memory allocation for the color variable + strings is performed. We might want to pass a flag saying whether or not + to translate VALUE like a key sequence, but it doesn't really matter. */ +int +_rl_reset_region_color (int which, const char *value) +{ + int len; + + if (which == 0) + { + xfree (_rl_active_region_start_color); + if (value && *value) + { + _rl_active_region_start_color = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_active_region_start_color, &len); + _rl_active_region_start_color[len] = '\0'; + } + else + _rl_active_region_start_color = NULL; + } + else + { + xfree (_rl_active_region_end_color); + if (value && *value) + { + _rl_active_region_end_color = (char *)xmalloc (2 * strlen (value) + 1); + rl_translate_keyseq (value, _rl_active_region_end_color, &len); + _rl_active_region_end_color[len] = '\0'; + } + else + _rl_active_region_end_color = NULL; + } + + return 0; +} + +void +_rl_region_color_on (void) +{ +#ifndef __MSDOS__ + if (_rl_active_region_start_color && _rl_active_region_end_color) + tputs (_rl_active_region_start_color, 1, _rl_output_character_function); +#endif +} + +void +_rl_region_color_off (void) +{ +#ifndef __MSDOS__ + if (_rl_active_region_start_color && _rl_active_region_end_color) + tputs (_rl_active_region_end_color, 1, _rl_output_character_function); +#endif +} + /* **************************************************************** */ /* */ /* Controlling the Meta Key and Keypad */ /* */ /* **************************************************************** */ +static int enabled_meta = 0; /* flag indicating we enabled meta mode */ + void -_rl_enable_meta_key () +_rl_enable_meta_key (void) { #if !defined (__DJGPP__) if (term_has_meta && _rl_term_mm) - tputs (_rl_term_mm, 1, _rl_output_character_function); + { + tputs (_rl_term_mm, 1, _rl_output_character_function); + enabled_meta = 1; + } +#endif +} + +void +_rl_disable_meta_key (void) +{ +#if !defined (__DJGPP__) + if (term_has_meta && _rl_term_mo && enabled_meta) + { + tputs (_rl_term_mo, 1, _rl_output_character_function); + enabled_meta = 0; + } #endif } void -_rl_control_keypad (on) - int on; +_rl_control_keypad (int on) { #if !defined (__DJGPP__) if (on && _rl_term_ks) @@ -715,9 +922,9 @@ _rl_control_keypad (on) 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; +_rl_set_cursor (int im, int force) { +#ifndef __MSDOS__ if (_rl_term_ve && _rl_term_vs) { if (force || im != rl_insert_mode) @@ -728,4 +935,5 @@ _rl_set_cursor (im, force) tputs (_rl_term_ve, 1, _rl_output_character_function); } } +#endif } diff --git a/lib/readline/text.c b/lib/readline/text.c index fc39189..8f092f5 100644 --- a/lib/readline/text.c +++ b/lib/readline/text.c @@ -1,6 +1,6 @@ /* text.c -- text handling commands for readline. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 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. @@ -59,18 +59,20 @@ #include "xmalloc.h" /* Forward declarations. */ -static int rl_change_case PARAMS((int, int)); -static int _rl_char_search PARAMS((int, int, int)); +static int rl_change_case (int, int); +static int _rl_char_search (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 *)); +static int _rl_insert_next_callback (_rl_callback_generic_arg *); +static int _rl_char_search_callback (_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 +int _rl_optimize_typeahead = 1; /* rl_insert tries to read typeahead */ + /* **************************************************************** */ /* */ /* Insert and Delete */ @@ -81,10 +83,10 @@ static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *)); 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; +rl_insert_text (const char *string) { - register int i, l; + register int i; + size_t l; l = (string && *string) ? strlen (string) : 0; if (l == 0) @@ -95,6 +97,7 @@ rl_insert_text (string) 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. */ @@ -119,8 +122,7 @@ rl_insert_text (string) /* 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; +rl_delete_text (int from, int to) { register char *text; register int diff, i; @@ -150,10 +152,11 @@ rl_delete_text (from, to) if (_rl_doing_an_undo == 0) rl_add_undo (UNDO_DELETE, from, to, text); else - free (text); + xfree (text); rl_end -= diff; rl_line_buffer[rl_end] = '\0'; + _rl_fix_mark (); return (diff); } @@ -170,22 +173,25 @@ rl_delete_text (from, to) } while (0) void -_rl_fix_point (fix_mark_too) - int fix_mark_too; +_rl_fix_point (int fix_mark_too) { _RL_FIX_POINT (rl_point); if (fix_mark_too) _RL_FIX_POINT (rl_mark); } + +void +_rl_fix_mark (void) +{ + _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; +_rl_replace_text (const char *text, int start, int end) { int n; @@ -204,9 +210,7 @@ _rl_replace_text (text, start, end) /* 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; +rl_replace_line (const char *text, int clear_undo) { int len; @@ -240,7 +244,7 @@ rl_replace_line (text, clear_undo) 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 first is a count: the numeric arg passed to this command. The second is the key which invoked this command. */ @@ -257,19 +261,20 @@ rl_replace_line (text, clear_undo) /* Move forward COUNT bytes. */ int -rl_forward_byte (count, key) - int count, key; +rl_forward_byte (int count, int key) { if (count < 0) return (rl_backward_byte (-count, key)); if (count > 0) { - int end = rl_point + count; + int end, lend; + + end = rl_point + count; #if defined (VI_MODE) - int lend = rl_end > 0 ? rl_end - (VI_COMMAND_MODE()) : rl_end; + lend = rl_end > 0 ? rl_end - (VI_COMMAND_MODE()) : rl_end; #else - int lend = rl_end; + lend = rl_end; #endif if (end > lend) @@ -287,11 +292,61 @@ rl_forward_byte (count, key) return 0; } +int +_rl_forward_char_internal (int count) +{ + int point; + +#if defined (HANDLE_MULTIBYTE) + 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_end < 0) + rl_end = 0; +#else + point = rl_point + count; +#endif + + if (point > rl_end) + point = rl_end; + return (point); +} + +int +_rl_backward_char_internal (int count) +{ + int point; + + point = rl_point; +#if defined (HANDLE_MULTIBYTE) + if (count > 0) + { + while (count > 0 && point > 0) + { + point = _rl_find_prev_mbchar (rl_line_buffer, point, MB_FIND_NONZERO); + count--; + } + if (count > 0) + return 0; /* XXX - rl_ding() here? */ + } +#else + if (count > 0) + point -= count; +#endif + + if (point < 0) + point = 0; + return (point); +} + #if defined (HANDLE_MULTIBYTE) /* Move forward COUNT characters. */ int -rl_forward_char (count, key) - int count, key; +rl_forward_char (int count, int key) { int point; @@ -309,28 +364,19 @@ rl_forward_char (count, key) 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 + point = _rl_forward_char_internal (count); 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; +rl_forward_char (int count, int key) { return (rl_forward_byte (count, key)); } @@ -338,16 +384,14 @@ rl_forward_char (count, key) /* Backwards compatibility. */ int -rl_forward (count, key) - int count, key; +rl_forward (int count, int key) { return (rl_forward_char (count, key)); } /* Move backward COUNT bytes. */ int -rl_backward_byte (count, key) - int count, key; +rl_backward_byte (int count, int key) { if (count < 0) return (rl_forward_byte (-count, key)); @@ -372,8 +416,7 @@ rl_backward_byte (count, key) #if defined (HANDLE_MULTIBYTE) /* Move backward COUNT characters. */ int -rl_backward_char (count, key) - int count, key; +rl_backward_char (int count, int key) { int point; @@ -405,8 +448,7 @@ rl_backward_char (count, key) } #else int -rl_backward_char (count, key) - int count, key; +rl_backward_char (int count, int key) { return (rl_backward_byte (count, key)); } @@ -414,16 +456,14 @@ rl_backward_char (count, key) /* Backwards compatibility. */ int -rl_backward (count, key) - int count, key; +rl_backward (int count, int 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_beg_of_line (int count, int key) { rl_point = 0; return 0; @@ -431,8 +471,7 @@ rl_beg_of_line (count, key) /* Move to the end of the line. */ int -rl_end_of_line (count, key) - int count, key; +rl_end_of_line (int count, int key) { rl_point = rl_end; return 0; @@ -440,8 +479,7 @@ rl_end_of_line (count, key) /* Move forward a word. We do what Emacs does. Handles multibyte chars. */ int -rl_forward_word (count, key) - int count, key; +rl_forward_word (int count, int key) { int c; @@ -450,6 +488,8 @@ rl_forward_word (count, key) while (count) { + if (rl_point > rl_end) + rl_point = rl_end; if (rl_point == rl_end) return 0; @@ -469,6 +509,8 @@ rl_forward_word (count, key) } } + if (rl_point > rl_end) + rl_point = rl_end; if (rl_point == rl_end) return 0; @@ -489,8 +531,7 @@ rl_forward_word (count, key) /* Move backward a word. We do what Emacs does. Handles multibyte chars. */ int -rl_backward_word (count, key) - int count, key; +rl_backward_word (int count, int key) { int c, p; @@ -539,21 +580,10 @@ rl_backward_word (count, key) /* Clear the current line. Numeric argument to C-l does this. */ int -rl_refresh_line (ignore1, ignore2) - int ignore1, ignore2; +rl_refresh_line (int ignore1, int 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_refresh_line (); rl_display_fixed = 1; - return 0; } @@ -561,8 +591,7 @@ rl_refresh_line (ignore1, ignore2) 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; +rl_clear_screen (int count, int key) { if (rl_explicit_arg) { @@ -570,7 +599,8 @@ rl_clear_screen (count, key) return 0; } - _rl_clear_screen (); /* calls termcap function to clear screen */ + _rl_clear_screen (0); /* calls termcap function to clear screen */ + rl_keep_mark_active (); rl_forced_update_display (); rl_display_fixed = 1; @@ -578,8 +608,35 @@ rl_clear_screen (count, key) } int -rl_skip_csi_sequence (count, key) - int count, key; +rl_clear_display (int count, int key) +{ + _rl_clear_screen (1); /* calls termcap function to clear screen and scrollback buffer */ + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; +} + +int +rl_previous_screen_line (int count, int key) +{ + int c; + + c = _rl_term_autowrap ? _rl_screenwidth : (_rl_screenwidth + 1); + return (rl_backward_char (c, key)); +} + +int +rl_next_screen_line (int count, int key) +{ + int c; + + c = _rl_term_autowrap ? _rl_screenwidth : (_rl_screenwidth + 1); + return (rl_forward_char (c, key)); +} + +int +rl_skip_csi_sequence (int count, int key) { int ch; @@ -589,18 +646,19 @@ rl_skip_csi_sequence (count, key) while (ch >= 0x20 && ch < 0x40); RL_UNSETSTATE (RL_STATE_MOREINPUT); - return 0; + return (ch < 0); } int -rl_arrow_keys (count, c) - int count, c; +rl_arrow_keys (int count, int key) { int ch; RL_SETSTATE(RL_STATE_MOREINPUT); ch = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (ch < 0) + return (1); switch (_rl_to_upper (ch)) { @@ -647,10 +705,13 @@ static mbstate_t ps = {0}; /* 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. */ + then insert the multibyte char into the line buffer. + If C == 0, we immediately insert any pending partial multibyte character, + assuming that we have read a character that doesn't map to self-insert. + This doesn't completely handle characters that are part of a multibyte + character but map to editing functions. */ int -_rl_insert_char (count, c) - int count, c; +_rl_insert_char (int count, int c) { register int i; char *string; @@ -662,19 +723,45 @@ _rl_insert_char (count, c) static int stored_count = 0; #endif +#if !defined (HANDLE_MULTIBYTE) if (count <= 0) return 0; +#else + if (count < 0) + return 0; + if (count == 0) + { + if (pending_bytes_length == 0) + return 0; + if (stored_count <= 0) + stored_count = count; + else + count = stored_count; -#if defined (HANDLE_MULTIBYTE) - if (MB_CUR_MAX == 1 || rl_byte_oriented) + memcpy (incoming, pending_bytes, pending_bytes_length); + incoming[pending_bytes_length] = '\0'; + incoming_length = pending_bytes_length; + pending_bytes_length = 0; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + incoming[0] = c; + incoming[1] = '\0'; + incoming_length = 1; + } + else if (_rl_utf8locale && (c & 0x80) == 0) { + if (pending_bytes_length) + _rl_insert_char (0, 0); + incoming[0] = c; incoming[1] = '\0'; incoming_length = 1; } else { - wchar_t wc; + WCHAR_T wc; size_t ret; if (stored_count <= 0) @@ -684,7 +771,7 @@ _rl_insert_char (count, c) ps_back = ps; pending_bytes[pending_bytes_length++] = c; - ret = mbrtowc (&wc, pending_bytes, pending_bytes_length, &ps); + ret = MBRTOWC (&wc, pending_bytes, pending_bytes_length, &ps); if (ret == (size_t)-2) { @@ -702,7 +789,8 @@ _rl_insert_char (count, c) incoming[1] = '\0'; incoming_length = 1; pending_bytes_length--; - memmove (pending_bytes, pending_bytes + 1, pending_bytes_length); + if (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)); @@ -716,6 +804,12 @@ _rl_insert_char (count, c) effect of mbstate is undefined. */ memset (&ps, 0, sizeof (mbstate_t)); } + else if (ret == 1) + { + incoming[0] = pending_bytes[0]; + incoming[incoming_length = 1] = '\0'; + pending_bytes_length = 0; + } else { /* We successfully read a single multibyte character. */ @@ -738,8 +832,13 @@ _rl_insert_char (count, c) i = 0; while (i < string_size) { - strncpy (string + i, incoming, incoming_length); - i += incoming_length; + if (incoming_length == 1) + string[i++] = *incoming; + else + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } } incoming_length = 0; stored_count = 0; @@ -752,9 +851,13 @@ _rl_insert_char (count, c) string[i] = '\0'; rl_insert_text (string); - free (string); + xfree (string); +#if defined (HANDLE_MULTIBYTE) + return (pending_bytes_length != 0); +#else return 0; +#endif } if (count > TEXT_COUNT_MAX) @@ -767,8 +870,13 @@ _rl_insert_char (count, c) i = 0; while (i < string_size) { - strncpy (string + i, incoming, incoming_length); - i += incoming_length; + if (incoming_length == 1) + string[i++] = *incoming; + else + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } } while (count) @@ -779,9 +887,11 @@ _rl_insert_char (count, c) count -= decreaser; } - free (string); + xfree (string); incoming_length = 0; stored_count = 0; + + return (pending_bytes_length != 0); #else /* !HANDLE_MULTIBYTE */ char str[TEXT_COUNT_MAX+1]; @@ -795,9 +905,9 @@ _rl_insert_char (count, c) rl_insert_text (str); count -= decreaser; } -#endif /* !HANDLE_MULTIBYTE */ return 0; +#endif /* !HANDLE_MULTIBYTE */ } if (MB_CUR_MAX == 1 || rl_byte_oriented) @@ -805,8 +915,9 @@ _rl_insert_char (count, c) /* 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 ()) + them all. Don't do this if we're current reading input from + a macro. */ + if ((RL_ISSTATE (RL_STATE_MACROINPUT) == 0) && _rl_pushed_input_available ()) _rl_insert_typein (c); else { @@ -824,17 +935,18 @@ _rl_insert_char (count, c) rl_insert_text (incoming); stored_count = 0; } -#endif - + + return (pending_bytes_length != 0); +#else return 0; +#endif } /* 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; +_rl_overwrite_char (int count, int c) { int i; #if defined (HANDLE_MULTIBYTE) @@ -842,8 +954,11 @@ _rl_overwrite_char (count, c) int k; /* Read an entire multibyte character sequence to insert COUNT times. */ + k = 1; if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX); + if (k < 0) + return 1; #endif rl_begin_undo_group (); @@ -867,17 +982,62 @@ _rl_overwrite_char (count, c) } int -rl_insert (count, c) - int count, c; +rl_insert (int count, int c) { - return (rl_insert_mode == RL_IM_INSERT ? _rl_insert_char (count, c) - : _rl_overwrite_char (count, c)); + int r, n, x; + + r = (rl_insert_mode == RL_IM_INSERT) ? _rl_insert_char (count, c) : _rl_overwrite_char (count, c); + + /* XXX -- attempt to batch-insert pending input that maps to self-insert */ + x = 0; + n = (unsigned short)-2; + while (_rl_optimize_typeahead && + rl_num_chars_to_read == 0 && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued (0) && + (n = rl_read_key ()) > 0 && + _rl_keymap[(unsigned char)n].type == ISFUNC && + _rl_keymap[(unsigned char)n].function == rl_insert) + { + r = (rl_insert_mode == RL_IM_INSERT) ? _rl_insert_char (1, n) : _rl_overwrite_char (1, n); + /* _rl_insert_char keeps its own set of pending characters to compose a + complete multibyte character, and only returns 1 if it sees a character + that's part of a multibyte character but too short to complete one. We + can try to read another character in the hopes that we will get the + next one or just punt. Right now we try to read another character. + We don't want to call rl_insert_next if _rl_insert_char has already + stored the character in the pending_bytes array because that will + result in doubled input. */ + n = (unsigned short)-2; + x++; /* count of bytes of typeahead read, currently unused */ + if (r == 1) /* read partial multibyte character */ + continue; + if (rl_done || r != 0) + break; + } + + /* If we didn't insert n and there are pending bytes, we need to insert + them if _rl_insert_char didn't do that on its own. */ + if (r == 1 && rl_insert_mode == RL_IM_INSERT) + r = _rl_insert_char (0, 0); /* flush partial multibyte char */ + + if (n != (unsigned short)-2) /* -2 = sentinel value for having inserted N */ + { + /* setting rl_pending_input inhibits setting rl_last_func so we do it + ourselves here */ + rl_last_func = rl_insert; + _rl_reset_argument (); + rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; + r = rl_execute_next (n); + } + + return r; } /* Insert the next typed character verbatim. */ static int -_rl_insert_next (count) - int count; +_rl_insert_next (int count) { int c; @@ -886,7 +1046,10 @@ _rl_insert_next (count) RL_UNSETSTATE(RL_STATE_MOREINPUT); if (c < 0) - return -1; + return 1; + + if (RL_ISSTATE (RL_STATE_MACRODEF)) + _rl_add_macro_char (c); #if defined (HANDLE_SIGNALS) if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) @@ -898,25 +1061,40 @@ _rl_insert_next (count) #if defined (READLINE_CALLBACKS) static int -_rl_insert_next_callback (data) - _rl_callback_generic_arg *data; +_rl_insert_next_callback (_rl_callback_generic_arg *data) { - int count; + int count, r; count = data->count; + r = 0; + + if (count < 0) + { + data->count++; + r = _rl_insert_next (1); + _rl_want_redisplay = 1; + /* If we should keep going, leave the callback function installed */ + if (data->count < 0 && r == 0) + return r; + count = 0; /* data->count == 0 || r != 0; force break below */ + } /* Deregister function, let rl_callback_read_char deallocate data */ _rl_callback_func = 0; _rl_want_redisplay = 1; - + + if (count == 0) + return r; + return _rl_insert_next (count); } #endif int -rl_quoted_insert (count, key) - int count, key; +rl_quoted_insert (int count, int key) { + int r; + /* Let's see...should the callback interface futz with signal handling? */ #if defined (HANDLE_SIGNALS) if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) @@ -931,14 +1109,26 @@ rl_quoted_insert (count, key) return (0); } #endif - - return _rl_insert_next (count); + + /* A negative count means to quote the next -COUNT characters. */ + if (count < 0) + { + do + r = _rl_insert_next (1); + while (r == 0 && ++count < 0); + } + else + r = _rl_insert_next (count); + + if (r == 1) + _rl_insert_char (0, 0); /* insert partial multibyte character */ + + return r; } /* Insert a tab character. */ int -rl_tab_insert (count, key) - int count, key; +rl_tab_insert (int count, int key) { return (_rl_insert_char (count, '\t')); } @@ -947,9 +1137,15 @@ rl_tab_insert (count, key) 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_newline (int count, int key) { + if (rl_mark_active_p ()) + { + rl_deactivate_mark (); + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + } + rl_done = 1; if (_rl_history_preserve_point) @@ -981,18 +1177,16 @@ rl_newline (count, key) 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; +rl_do_lowercase_version (int ignore1, int ignore2) { - return 0; + return 99999; /* prevent from being combined with _rl_null_function */ } /* 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; +_rl_overwrite_rubout (int count, int key) { int opoint; int i, l; @@ -1034,8 +1228,7 @@ _rl_overwrite_rubout (count, key) /* Rubout the character behind point. */ int -rl_rubout (count, key) - int count, key; +rl_rubout (int count, int key) { if (count < 0) return (rl_delete (-count, key)); @@ -1043,7 +1236,7 @@ rl_rubout (count, key) if (!rl_point) { rl_ding (); - return -1; + return 1; } if (rl_insert_mode == RL_IM_OVERWRITE) @@ -1053,8 +1246,7 @@ rl_rubout (count, key) } int -_rl_rubout_char (count, key) - int count, key; +_rl_rubout_char (int count, int key) { int orig_point; unsigned char c; @@ -1066,7 +1258,7 @@ _rl_rubout_char (count, key) if (rl_point == 0) { rl_ding (); - return -1; + return 1; } orig_point = rl_point; @@ -1080,7 +1272,7 @@ _rl_rubout_char (count, key) 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) + if (rl_point == rl_end && ISPRINT ((unsigned char)c) && _rl_last_c_pos) { int l; l = rl_character_len (c, rl_point); @@ -1099,8 +1291,7 @@ _rl_rubout_char (count, key) /* Delete the character under the cursor. Given a numeric argument, kill that many characters instead. */ int -rl_delete (count, key) - int count, key; +rl_delete (int count, int key) { int xpoint; @@ -1110,7 +1301,7 @@ rl_delete (count, key) if (rl_point == rl_end) { rl_ding (); - return -1; + return 1; } if (count > 1 || rl_explicit_arg) @@ -1137,8 +1328,7 @@ rl_delete (count, key) 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; +rl_rubout_or_delete (int count, int key) { if (rl_end != 0 && rl_point == rl_end) return (_rl_rubout_char (count, key)); @@ -1148,8 +1338,7 @@ rl_rubout_or_delete (count, key) /* Delete all spaces and tabs around point. */ int -rl_delete_horizontal_space (count, ignore) - int count, ignore; +rl_delete_horizontal_space (int count, int ignore) { int start; @@ -1177,8 +1366,7 @@ rl_delete_horizontal_space (count, ignore) 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; +rl_delete_or_show_completions (int count, int key) { if (rl_end != 0 && rl_point == rl_end) return (rl_possible_completions (count, key)); @@ -1193,8 +1381,7 @@ rl_delete_or_show_completions (count, key) /* 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; +rl_insert_comment (int count, int key) { char *rl_comment_text; int rl_comment_len; @@ -1232,24 +1419,21 @@ rl_insert_comment (count, key) /* Uppercase the word at point. */ int -rl_upcase_word (count, key) - int count, key; +rl_upcase_word (int count, int key) { return (rl_change_case (count, UpCase)); } /* Lowercase the word at point. */ int -rl_downcase_word (count, key) - int count, key; +rl_downcase_word (int count, int key) { return (rl_change_case (count, DownCase)); } /* Upcase the first letter, downcase the rest. */ int -rl_capitalize_word (count, key) - int count, key; +rl_capitalize_word (int count, int key) { return (rl_change_case (count, CapCase)); } @@ -1260,13 +1444,13 @@ rl_capitalize_word (count, key) 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; +rl_change_case (int count, int op) { int start, next, end; - int inword, c, nc, nop; + int inword, nc, nop; + WCHAR_T c; #if defined (HANDLE_MULTIBYTE) - wchar_t wc, nwc; + WCHAR_T wc, nwc; char mb[MB_LEN_MAX+1]; int mlen; size_t m; @@ -1280,7 +1464,7 @@ rl_change_case (count, op) if (op != UpCase && op != DownCase && op != CapCase) { rl_ding (); - return -1; + return 1; } if (count < 0) @@ -1314,7 +1498,10 @@ rl_change_case (count, op) } else nop = op; - if (MB_CUR_MAX == 1 || rl_byte_oriented || isascii (c)) + /* Can't check isascii here; some languages (e.g, Turkish) have + multibyte upper and lower case equivalents of single-byte ascii + characters */ + if (MB_CUR_MAX == 1 || rl_byte_oriented) { nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c); rl_line_buffer[start] = nc; @@ -1322,19 +1509,56 @@ rl_change_case (count, op) #if defined (HANDLE_MULTIBYTE) else { - m = mbrtowc (&wc, rl_line_buffer + start, end - start, &mps); + m = MBRTOWC (&wc, rl_line_buffer + start, end - start, &mps); if (MB_INVALIDCH (m)) - wc = (wchar_t)rl_line_buffer[start]; + 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); + char *s, *e; + mbstate_t ts; + + memset (&ts, 0, sizeof (mbstate_t)); + mlen = WCRTOMB (mb, nwc, &ts); + if (mlen < 0) + { + nwc = wc; + memset (&ts, 0, sizeof (mbstate_t)); + mlen = WCRTOMB (mb, nwc, &ts); + if (mlen < 0) /* should not happen */ + strncpy (mb, rl_line_buffer + start, mlen = m); + } if (mlen > 0) mb[mlen] = '\0'; - /* Assume the same width */ - strncpy (rl_line_buffer + start, mb, mlen); + /* what to do if m != mlen? adjust below */ + /* m == length of old char, mlen == length of new char */ + s = rl_line_buffer + start; + e = rl_line_buffer + rl_end; + if (m == mlen) + memcpy (s, mb, mlen); + else if (m > mlen) + { + memcpy (s, mb, mlen); + memmove (s + mlen, s + m, (e - s) - m); + next -= m - mlen; /* next char changes */ + end -= m - mlen; /* end of word changes */ + rl_end -= m - mlen; /* end of line changes */ + rl_line_buffer[rl_end] = 0; + } + else if (m < mlen) + { + rl_extend_line_buffer (rl_end + mlen + (e - s) - m + 2); + s = rl_line_buffer + start; /* have to redo this */ + e = rl_line_buffer + rl_end; + memmove (s + mlen, s + m, (e - s) - m); + memcpy (s, mb, mlen); + next += mlen - m; /* next char changes */ + end += mlen - m; /* end of word changes */ + rl_end += mlen - m; /* end of line changes */ + rl_line_buffer[rl_end] = 0; + } } } #endif @@ -1355,12 +1579,14 @@ rl_change_case (count, op) /* 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; +rl_transpose_words (int count, int key) { char *word1, *word2; int w1_beg, w1_end, w2_beg, w2_end; - int orig_point = rl_point; + int orig_point, orig_end; + + orig_point = rl_point; + orig_end = rl_end; if (!count) return 0; @@ -1380,7 +1606,7 @@ rl_transpose_words (count, key) { rl_ding (); rl_point = orig_point; - return -1; + return 1; } /* Get the text of the words. */ @@ -1404,11 +1630,12 @@ rl_transpose_words (count, key) /* This is exactly correct since the text before this point has not changed in length. */ rl_point = w2_end; + rl_end = orig_end; /* just make sure */ /* I think that does it. */ rl_end_undo_group (); - free (word1); - free (word2); + xfree (word1); + xfree (word2); return 0; } @@ -1416,8 +1643,7 @@ rl_transpose_words (count, key) /* 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; +rl_transpose_chars (int count, int key) { #if defined (HANDLE_MULTIBYTE) char *dummy; @@ -1433,7 +1659,7 @@ rl_transpose_chars (count, key) if (!rl_point || rl_end < 2) { rl_ding (); - return -1; + return 1; } rl_begin_undo_group (); @@ -1467,7 +1693,7 @@ rl_transpose_chars (count, key) rl_end_undo_group (); #if defined (HANDLE_MULTIBYTE) - free (dummy); + xfree (dummy); #endif return 0; @@ -1481,13 +1707,9 @@ rl_transpose_chars (count, key) int #if defined (HANDLE_MULTIBYTE) -_rl_char_search_internal (count, dir, smbchar, len) - int count, dir; - char *smbchar; - int len; +_rl_char_search_internal (int count, int dir, char *smbchar, int len) #else -_rl_char_search_internal (count, dir, schar) - int count, dir, schar; +_rl_char_search_internal (int count, int dir, int schar) #endif { int pos, inc; @@ -1495,6 +1717,9 @@ _rl_char_search_internal (count, dir, schar) int prepos; #endif + if (dir == 0) + return 1; + pos = rl_point; inc = (dir < 0) ? -1 : 1; while (count) @@ -1502,7 +1727,7 @@ _rl_char_search_internal (count, dir, schar) if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end)) { rl_ding (); - return -1; + return 1; } #if defined (HANDLE_MULTIBYTE) @@ -1548,8 +1773,7 @@ _rl_char_search_internal (count, dir, schar) 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; +_rl_char_search (int count, int fdir, int bdir) { char mbchar[MB_LEN_MAX]; int mb_len; @@ -1557,7 +1781,7 @@ _rl_char_search (count, fdir, bdir) mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX); if (mb_len <= 0) - return -1; + return 1; if (count < 0) return (_rl_char_search_internal (-count, bdir, mbchar, mb_len)); @@ -1566,17 +1790,13 @@ _rl_char_search (count, fdir, bdir) } #else /* !HANDLE_MULTIBYTE */ static int -_rl_char_search (count, fdir, bdir) - int count, fdir, bdir; +_rl_char_search (int count, int fdir, int bdir) { int c; - RL_SETSTATE(RL_STATE_MOREINPUT); - c = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - + c = _rl_bracketed_read_key (); if (c < 0) - return -1; + return 1; if (count < 0) return (_rl_char_search_internal (-count, bdir, c)); @@ -1598,8 +1818,7 @@ _rl_char_search_callback (data) #endif int -rl_char_search (count, key) - int count, key; +rl_char_search (int count, int key) { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) @@ -1616,8 +1835,7 @@ rl_char_search (count, key) } int -rl_backward_char_search (count, key) - int count, key; +rl_backward_char_search (int count, int key) { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) @@ -1641,11 +1859,10 @@ rl_backward_char_search (count, key) /* Set the mark at POSITION. */ int -_rl_set_mark_at_pos (position) - int position; +_rl_set_mark_at_pos (int position) { - if (position > rl_end) - return -1; + if (position < 0 || position > rl_end) + return 1; rl_mark = position; return 0; @@ -1653,27 +1870,62 @@ _rl_set_mark_at_pos (position) /* A bindable command to set the mark. */ int -rl_set_mark (count, key) - int count, key; +rl_set_mark (int count, int 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; +rl_exchange_point_and_mark (int count, int key) { if (rl_mark > rl_end) rl_mark = -1; - if (rl_mark == -1) + if (rl_mark < 0) { rl_ding (); - return -1; + rl_mark = 0; /* like _RL_FIX_POINT */ + return 1; } else - SWAP (rl_point, rl_mark); + { + SWAP (rl_point, rl_mark); + rl_activate_mark (); + } return 0; } + +/* Active mark support */ + +/* Is the region active? */ +static int mark_active = 0; + +/* Does the current command want the mark to remain active when it completes? */ +int _rl_keep_mark_active; + +void +rl_keep_mark_active (void) +{ + _rl_keep_mark_active++; +} + +void +rl_activate_mark (void) +{ + mark_active = 1; + rl_keep_mark_active (); +} + +void +rl_deactivate_mark (void) +{ + mark_active = 0; +} + +int +rl_mark_active_p (void) +{ + return (mark_active); +} diff --git a/lib/readline/tilde.c b/lib/readline/tilde.c index 088ff15..d678a31 100644 --- a/lib/readline/tilde.c +++ b/lib/readline/tilde.c @@ -1,6 +1,6 @@ /* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */ -/* Copyright (C) 1988-2009 Free Software Foundation, Inc. +/* Copyright (C) 1988-2020 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. @@ -57,10 +57,10 @@ static void *xmalloc (), *xrealloc (); #if !defined (HAVE_GETPW_DECLS) # if defined (HAVE_GETPWUID) -extern struct passwd *getpwuid PARAMS((uid_t)); +extern struct passwd *getpwuid (uid_t); # endif # if defined (HAVE_GETPWNAM) -extern struct passwd *getpwnam PARAMS((const char *)); +extern struct passwd *getpwnam (const char *); # endif #endif /* !HAVE_GETPW_DECLS */ @@ -79,8 +79,8 @@ extern struct passwd *getpwnam PARAMS((const char *)); /* 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 *)); +extern char *sh_get_home_dir (void); +extern char *sh_get_env_value (const char *); /* The default value of tilde_additional_prefixes. This is set to whitespace preceding a tilde so that simple programs which do not @@ -116,18 +116,16 @@ char **tilde_additional_prefixes = (char **)default_prefixes; `:' 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)); +static int tilde_find_prefix (const char *, int *); +static int tilde_find_suffix (const char *); +static char *isolate_tilde_prefix (const char *, int *); +static char *glue_prefix_and_suffix (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; +tilde_find_prefix (const char *string, int *len) { register int i, j, string_len; register char **prefixes; @@ -160,8 +158,7 @@ tilde_find_prefix (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; +tilde_find_suffix (const char *string) { register int i, j, string_len; register char **suffixes; @@ -189,8 +186,7 @@ tilde_find_suffix (string) /* Return a new string which is the result of tilde expanding STRING. */ char * -tilde_expand (string) - const char *string; +tilde_expand (const char *string) { char *result; int result_size, result_index; @@ -236,7 +232,11 @@ tilde_expand (string) string += end; expansion = tilde_expand_word (tilde_word); - xfree (tilde_word); + + if (expansion == 0) + expansion = tilde_word; + else + xfree (tilde_word); len = strlen (expansion); #ifdef __CYGWIN__ @@ -263,9 +263,7 @@ tilde_expand (string) 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; +isolate_tilde_prefix (const char *fname, int *lenp) { char *ret; int i; @@ -289,9 +287,7 @@ isolate_tilde_prefix (fname, lenp) 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; +tilde_find_word (const char *fname, int flags, int *lenp) { int x; char *r; @@ -319,10 +315,7 @@ tilde_find_word (fname, flags, lenp) /* 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; +glue_prefix_and_suffix (char *prefix, const char *suffix, int suffind) { char *ret; int plen, slen; @@ -340,8 +333,7 @@ glue_prefix_and_suffix (prefix, suffix, suffind) 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; +tilde_expand_word (const char *filename) { char *dirname, *expansion, *username; int user_len; @@ -360,6 +352,10 @@ tilde_expand_word (filename) { /* Prefix $HOME to the rest of the string. */ expansion = sh_get_env_value ("HOME"); +#if defined (_WIN32) + if (expansion == 0) + expansion = sh_get_env_value ("APPDATA"); +#endif /* If there is no HOME variable, look up the directory in the password database. */ @@ -378,7 +374,7 @@ tilde_expand_word (filename) { dirname = glue_prefix_and_suffix (expansion, filename, user_len); xfree (username); - free (expansion); + xfree (expansion); return (dirname); } } @@ -401,7 +397,7 @@ tilde_expand_word (filename) if (expansion) { dirname = glue_prefix_and_suffix (expansion, filename, user_len); - free (expansion); + xfree (expansion); } } /* If we don't have a failure hook, or if the failure hook did not @@ -426,9 +422,7 @@ tilde_expand_word (filename) #undef NULL #include -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { char *result, line[512]; int done = 0; @@ -456,11 +450,10 @@ main (argc, argv) exit (0); } -static void memory_error_and_abort (); +static void memory_error_and_abort (void); static void * -xmalloc (bytes) - size_t bytes; +xmalloc (size_t bytes) { void *temp = (char *)malloc (bytes); @@ -470,9 +463,7 @@ xmalloc (bytes) } static void * -xrealloc (pointer, bytes) - void *pointer; - int bytes; +xrealloc (void *pointer, int bytes) { void *temp; @@ -488,7 +479,7 @@ xrealloc (pointer, bytes) } static void -memory_error_and_abort () +memory_error_and_abort (void) { fprintf (stderr, "readline: out of virtual memory\n"); abort (); diff --git a/lib/readline/tilde.h b/lib/readline/tilde.h index e26dd04..bc8022a 100644 --- a/lib/readline/tilde.h +++ b/lib/readline/tilde.h @@ -1,6 +1,6 @@ /* tilde.h: Externally available variables and function in libtilde.a. */ -/* Copyright (C) 1992-2009 Free Software Foundation, Inc. +/* Copyright (C) 1992-2009,2021 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 @@ -27,19 +27,7 @@ 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 *)); +typedef char *tilde_hook_func_t (char *); /* If non-null, this contains the address of a function that the application wants called before trying the standard tilde expansions. The function @@ -64,14 +52,14 @@ extern char **tilde_additional_prefixes; extern char **tilde_additional_suffixes; /* Return a new string which is the result of tilde expanding STRING. */ -extern char *tilde_expand PARAMS((const char *)); +extern char *tilde_expand (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 *)); +extern char *tilde_expand_word (const char *); /* Find the portion of the string beginning with ~ that should be expanded. */ -extern char *tilde_find_word PARAMS((const char *, int, int *)); +extern char *tilde_find_word (const char *, int, int *); #ifdef __cplusplus } diff --git a/lib/readline/undo.c b/lib/readline/undo.c index eb042b2..e4c457d 100644 --- a/lib/readline/undo.c +++ b/lib/readline/undo.c @@ -1,7 +1,6 @@ -/* readline.c -- a general facility for reading lines of input - with emacs style editing and completion. */ +/* undo.c - manage list of changes to lines, offering opportunity to undo them */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 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. @@ -50,7 +49,7 @@ #include "rlprivate.h" #include "xmalloc.h" -extern void replace_history_data PARAMS((int, histdata_t *, histdata_t *)); +#include "histlib.h" /* Non-zero tells rl_delete_text and rl_insert_text to not add to the undo list. */ @@ -69,10 +68,7 @@ UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL; /* **************************************************************** */ static UNDO_LIST * -alloc_undo_entry (what, start, end, text) - enum undo_code what; - int start, end; - char *text; +alloc_undo_entry (enum undo_code what, int start, int end, char *text) { UNDO_LIST *temp; @@ -89,10 +85,7 @@ alloc_undo_entry (what, start, end, text) /* 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; +rl_add_undo (enum undo_code what, int start, int end, char *text) { UNDO_LIST *temp; @@ -101,30 +94,38 @@ rl_add_undo (what, start, end, text) rl_undo_list = temp; } -/* Free the existing undo list. */ +/* Free an UNDO_LIST */ void -rl_free_undo_list () +_rl_free_undo_list (UNDO_LIST *ul) { - UNDO_LIST *release, *orig_list; + UNDO_LIST *release; - orig_list = rl_undo_list; - while (rl_undo_list) + while (ul) { - release = rl_undo_list; - rl_undo_list = rl_undo_list->next; + release = ul; + ul = ul->next; if (release->what == UNDO_DELETE) xfree (release->text); xfree (release); } +} + +/* Free the existing undo list. */ +void +rl_free_undo_list (void) +{ + UNDO_LIST *release, *orig_list; + + orig_list = rl_undo_list; + _rl_free_undo_list (rl_undo_list); rl_undo_list = (UNDO_LIST *)NULL; - replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL); + _hs_replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL); } UNDO_LIST * -_rl_copy_undo_entry (entry) - UNDO_LIST *entry; +_rl_copy_undo_entry (UNDO_LIST *entry) { UNDO_LIST *new; @@ -134,8 +135,7 @@ _rl_copy_undo_entry (entry) } UNDO_LIST * -_rl_copy_undo_list (head) - UNDO_LIST *head; +_rl_copy_undo_list (UNDO_LIST *head) { UNDO_LIST *list, *new, *roving, *c; @@ -164,10 +164,11 @@ _rl_copy_undo_list (head) /* 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 () +rl_do_undo (void) { - UNDO_LIST *release; + UNDO_LIST *release, *search; int waiting_for_begin, start, end; + HIST_ENTRY *cur, *temp; #define TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i))) @@ -193,6 +194,7 @@ rl_do_undo () /* Undoing deletes means inserting some text. */ case UNDO_DELETE: rl_point = start; + _rl_fix_point (1); rl_insert_text (rl_undo_list->text); xfree (rl_undo_list->text); break; @@ -201,6 +203,7 @@ rl_do_undo () case UNDO_INSERT: rl_delete_text (start, end); rl_point = start; + _rl_fix_point (1); break; /* Undoing an END means undoing everything 'til we get to a BEGIN. */ @@ -222,7 +225,42 @@ rl_do_undo () release = rl_undo_list; rl_undo_list = rl_undo_list->next; - replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list); + release->next = 0; /* XXX */ + + /* If we are editing a history entry, make sure the change is replicated + in the history entry's line */ + cur = current_history (); + if (cur && cur->data && (UNDO_LIST *)cur->data == release) + { + temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list); + xfree (temp->line); + FREE (temp->timestamp); + xfree (temp); + } + + /* Make sure there aren't any history entries with that undo list */ + _hs_replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list); + + /* And make sure this list isn't anywhere in the saved line for history */ + if (_rl_saved_line_for_history && _rl_saved_line_for_history->data) + { + /* Brute force; no finesse here */ + search = (UNDO_LIST *)_rl_saved_line_for_history->data; + if (search == release) + _rl_saved_line_for_history->data = rl_undo_list; + else + { + while (search->next) + { + if (search->next == release) + { + search->next = rl_undo_list; + break; + } + search = search->next; + } + } + } xfree (release); } @@ -233,8 +271,7 @@ rl_do_undo () #undef TRANS int -_rl_fix_last_undo_of_type (type, start, end) - int type, start, end; +_rl_fix_last_undo_of_type (int type, int start, int end) { UNDO_LIST *rl; @@ -252,7 +289,7 @@ _rl_fix_last_undo_of_type (type, start, end) /* Begin a group. Subsequent undos are undone as an atomic operation. */ int -rl_begin_undo_group () +rl_begin_undo_group (void) { rl_add_undo (UNDO_BEGIN, 0, 0, 0); _rl_undo_group_level++; @@ -261,7 +298,7 @@ rl_begin_undo_group () /* End an undo group started with rl_begin_undo_group (). */ int -rl_end_undo_group () +rl_end_undo_group (void) { rl_add_undo (UNDO_END, 0, 0, 0); _rl_undo_group_level--; @@ -270,8 +307,7 @@ rl_end_undo_group () /* Save an undo entry for the text from START to END. */ int -rl_modifying (start, end) - int start, end; +rl_modifying (int start, int end) { if (start > end) { @@ -291,8 +327,7 @@ rl_modifying (start, end) /* Revert the current line to its previous state. */ int -rl_revert_line (count, key) - int count, key; +rl_revert_line (int count, int key) { if (rl_undo_list == 0) rl_ding (); @@ -311,8 +346,7 @@ rl_revert_line (count, key) /* Do some undoing of things that were done. */ int -rl_undo_command (count, key) - int count, key; +rl_undo_command (int count, int key) { if (count < 0) return 0; /* Nothing to do. */ diff --git a/lib/readline/util.c b/lib/readline/util.c index 6bb64c2..2e986db 100644 --- a/lib/readline/util.c +++ b/lib/readline/util.c @@ -1,6 +1,6 @@ /* util.c -- readline utility functions */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2017 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. @@ -55,6 +55,7 @@ #include "rlprivate.h" #include "xmalloc.h" +#include "rlshell.h" /* **************************************************************** */ /* */ @@ -69,10 +70,9 @@ int _rl_allow_pathname_alphabetic_chars = 0; static const char * const pathname_alphabetic_chars = "/-_=~.#$"; int -rl_alphabetic (c) - int c; +rl_alphabetic (int c) { - if (ALPHABETIC (c)) + if (_rl_alphabetic_p (c)) return (1); return (_rl_allow_pathname_alphabetic_chars && @@ -81,7 +81,7 @@ rl_alphabetic (c) #if defined (HANDLE_MULTIBYTE) int -_rl_walphabetic (wchar_t wc) +_rl_walphabetic (WCHAR_T wc) { int c; @@ -96,39 +96,41 @@ _rl_walphabetic (wchar_t wc) /* How to abort things. */ int -_rl_abort_internal () +_rl_abort_internal (void) { - rl_ding (); + if (RL_ISSTATE (RL_STATE_TIMEOUT) == 0) + rl_ding (); /* Don't ring the bell on a timeout */ rl_clear_message (); _rl_reset_argument (); rl_clear_pending_input (); + rl_deactivate_mark (); - RL_UNSETSTATE (RL_STATE_MACRODEF); while (rl_executing_macro) _rl_pop_executing_macro (); + _rl_kill_kbd_macro (); + + RL_UNSETSTATE (RL_STATE_MULTIKEY); /* XXX */ rl_last_func = (rl_command_func_t *)NULL; - longjmp (_rl_top_level, 1); + + _rl_longjmp (_rl_top_level, 1); return (0); } int -rl_abort (count, key) - int count, key; +rl_abort (int count, int key) { return (_rl_abort_internal ()); } int -_rl_null_function (count, key) - int count, key; +_rl_null_function (int count, int key) { return 0; } int -rl_tty_status (count, key) - int count, key; +rl_tty_status (int count, int key) { #if defined (TIOCSTAT) ioctl (1, TIOCSTAT, (char *)0); @@ -142,8 +144,7 @@ rl_tty_status (count, key) /* 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; +rl_copy_text (int from, int to) { register int length; char *copy; @@ -162,8 +163,7 @@ rl_copy_text (from, to) /* Increase the size of RL_LINE_BUFFER until it has enough space to hold LEN characters. */ void -rl_extend_line_buffer (len) - int len; +rl_extend_line_buffer (int len) { while (len >= rl_line_buffer_len) { @@ -177,8 +177,7 @@ rl_extend_line_buffer (len) /* A function for simple tilde expansion. */ int -rl_tilde_expand (ignore, key) - int ignore, key; +rl_tilde_expand (int ignore, int key) { register int start, end; char *homedir, *temp; @@ -194,12 +193,14 @@ rl_tilde_expand (ignore, key) xfree (homedir); return (0); } - else if (rl_line_buffer[start] != '~') + else if (start >= 0 && rl_line_buffer[start] != '~') { - for (; !whitespace (rl_line_buffer[start]) && start >= 0; start--) + for (; start >= 0 && !whitespace (rl_line_buffer[start]); start--) ; start++; } + else if (start < 0) + start = 0; end = start; do @@ -318,8 +319,7 @@ _rl_errmsg (format, arg1, arg2) /* 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; +_rl_strindex (const char *s1, const char *s2) { register int i, l, len; @@ -333,8 +333,7 @@ _rl_strindex (s1, s2) /* 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; +_rl_strpbrk (const char *string1, const char *string2) { register const char *scan; #if defined (HANDLE_MULTIBYTE) @@ -366,48 +365,61 @@ _rl_strpbrk (string1, string2) #if !defined (HAVE_STRCASECMP) /* Compare at most COUNT characters from string1 to string2. Case - doesn't matter. */ + doesn't matter (strncasecmp). */ int -_rl_strnicmp (string1, string2, count) - char *string1, *string2; - int count; +_rl_strnicmp (const char *string1, const char *string2, int count) { - register char ch1, ch2; + register const char *s1; + register const char *s2; + register int d; - while (count) + if (count <= 0 || (string1 == string2)) + return 0; + + s1 = string1; + s2 = string2; + do { - ch1 = *string1++; - ch2 = *string2++; - if (_rl_to_upper(ch1) == _rl_to_upper(ch2)) - count--; - else + d = _rl_to_lower (*s1) - _rl_to_lower (*s2); /* XXX - cast to unsigned char? */ + if (d != 0) + return d; + if (*s1++ == '\0') break; + s2++; } - return (count); + while (--count != 0); + + return (0); } -/* strcmp (), but caseless. */ +/* strcmp (), but caseless (strcasecmp). */ int -_rl_stricmp (string1, string2) - char *string1, *string2; +_rl_stricmp (const char *string1, const char *string2) { - register char ch1, ch2; + register const char *s1; + register const char *s2; + register int d; + + s1 = string1; + s2 = string2; + + if (s1 == s2) + return 0; - while (*string1 && *string2) + while ((d = _rl_to_lower (*s1) - _rl_to_lower (*s2)) == 0) { - ch1 = *string1++; - ch2 = *string2++; - if (_rl_to_upper(ch1) != _rl_to_upper(ch2)) - return (1); + if (*s1++ == '\0') + return 0; + s2++; } - return (*string1 - *string2); + + return (d); } #endif /* !HAVE_STRCASECMP */ /* Stupid comparison routine for qsort () ing strings. */ int -_rl_qsort_string_compare (s1, s2) - char **s1, **s2; +_rl_qsort_string_compare (char **s1, char **s2) { #if defined (HAVE_STRCOLL) return (strcoll (*s1, *s2)); @@ -423,7 +435,7 @@ _rl_qsort_string_compare (s1, s2) } /* Function equivalents for the macros defined in chardefs.h. */ -#define FUNCTION_FOR_MACRO(f) int (f) (c) int c; { return f (c); } +#define FUNCTION_FOR_MACRO(f) int (f) (int c) { return f (c); } FUNCTION_FOR_MACRO (_rl_digit_p) FUNCTION_FOR_MACRO (_rl_digit_value) @@ -436,8 +448,7 @@ 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; +rl_free (void *mem) { if (mem) free (mem); @@ -447,12 +458,12 @@ rl_free (mem) all `public' readline header files. */ #undef _rl_savestring char * -_rl_savestring (s) - const char *s; +_rl_savestring (const char *s) { return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s))); } +#if defined (DEBUG) #if defined (USE_VARARGS) static FILE *_rl_tracefp; @@ -486,20 +497,27 @@ _rl_trace (va_alist) } int -_rl_tropen () +_rl_tropen (void) { - char fnbuf[128]; + char fnbuf[128], *x; if (_rl_tracefp) fclose (_rl_tracefp); - sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid()); +#if defined (_WIN32) && !defined (__CYGWIN__) + x = sh_get_env_value ("TEMP"); + if (x == 0) + x = "."; +#else + x = "/var/tmp"; +#endif + snprintf (fnbuf, sizeof (fnbuf), "%s/rltrace.%ld", x, (long)getpid()); unlink(fnbuf); _rl_tracefp = fopen (fnbuf, "w+"); return _rl_tracefp != 0; } int -_rl_trclose () +_rl_trclose (void) { int r; @@ -508,4 +526,52 @@ _rl_trclose () return r; } +void +_rl_settracefp (FILE *fp) +{ + _rl_tracefp = fp; +} +#endif +#endif /* DEBUG */ + + +#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT) +#include +#include +#include +#include + +/* Report STRING to the audit system. */ +void +_rl_audit_tty (char *string) +{ + struct audit_message req; + struct sockaddr_nl addr; + size_t size; + int fd; + + fd = socket (PF_NETLINK, SOCK_RAW, NETLINK_AUDIT); + if (fd < 0) + return; + size = strlen (string) + 1; + + if (NLMSG_SPACE (size) > MAX_AUDIT_MESSAGE_LENGTH) + return; + + memset (&req, 0, sizeof(req)); + req.nlh.nlmsg_len = NLMSG_SPACE (size); + req.nlh.nlmsg_type = AUDIT_USER_TTY; + req.nlh.nlmsg_flags = NLM_F_REQUEST; + req.nlh.nlmsg_seq = 0; + if (size && string) + memcpy (NLMSG_DATA(&req.nlh), string, size); + memset (&addr, 0, sizeof(addr)); + + addr.nl_family = AF_NETLINK; + addr.nl_pid = 0; + addr.nl_groups = 0; + + sendto (fd, &req, req.nlh.nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr)); + close (fd); +} #endif diff --git a/lib/readline/vi_keymap.c b/lib/readline/vi_keymap.c index ba5a27b..045258b 100644 --- a/lib/readline/vi_keymap.c +++ b/lib/readline/vi_keymap.c @@ -1,6 +1,6 @@ /* vi_keymap.c -- the keymap for vi_mode in readline (). */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2017 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. @@ -55,7 +55,7 @@ KEYMAP_ENTRY_ARRAY vi_movement_keymap = { { 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_vi_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 */ @@ -309,7 +309,6 @@ KEYMAP_ENTRY_ARRAY vi_movement_keymap = { #endif /* KEYMAP_SIZE > 128 */ }; - KEYMAP_ENTRY_ARRAY vi_insertion_keymap = { /* The regular control keys come first. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ @@ -335,7 +334,7 @@ KEYMAP_ENTRY_ARRAY vi_insertion_keymap = { { 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_vi_unix_word_rubout }, /* Control-w */ { ISFUNC, rl_insert }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, rl_insert }, /* Control-z */ diff --git a/lib/readline/vi_mode.c b/lib/readline/vi_mode.c index 2a120c0..3a033ba 100644 --- a/lib/readline/vi_mode.c +++ b/lib/readline/vi_mode.c @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1987-2021 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. @@ -63,8 +63,28 @@ #define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0) #endif +/* Increment START to the next character in RL_LINE_BUFFER, handling multibyte chars */ +#if defined (HANDLE_MULTIBYTE) +#define INCREMENT_POS(start) \ + do { \ + if (MB_CUR_MAX == 1 || rl_byte_oriented) \ + start++; \ + else \ + start = _rl_find_next_mbchar (rl_line_buffer, start, 1, MB_FIND_ANY); \ + } while (0) +#else /* !HANDLE_MULTIBYTE */ +#define INCREMENT_POS(start) (start)++ +#endif /* !HANDLE_MULTIBYTE */ + +/* This is global so other parts of the code can check whether the last + command was a text modification command. */ int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */ +_rl_vimotion_cxt *_rl_vimvcxt = 0; + +/* Non-zero indicates we are redoing a vi-mode command with `.' */ +int _rl_vi_redoing; + /* Non-zero means enter insertion mode. */ static int _rl_vi_doing_insert; @@ -94,42 +114,57 @@ static int _rl_vi_last_search_mblen; #else static int _rl_vi_last_search_char; #endif -static int _rl_vi_last_replacement; +static char _rl_vi_last_replacement[MB_LEN_MAX+1]; /* reserve for trailing NULL */ 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_replace_insert (int); +static void _rl_vi_save_replace (void); +static void _rl_vi_stuff_insert (int); +static void _rl_vi_save_insert (UNDO_LIST *); -static void _rl_vi_backup PARAMS((void)); +static void vi_save_insert_buffer (int, int); -static int _rl_vi_arg_dispatch PARAMS((int)); -static int rl_digit_loop1 PARAMS((void)); +static inline void _rl_vi_backup (void); -static int _rl_vi_set_mark PARAMS((void)); -static int _rl_vi_goto_mark PARAMS((void)); +static int _rl_vi_arg_dispatch (int); +static int rl_digit_loop1 (void); -static void _rl_vi_append_forward PARAMS((int)); +static int _rl_vi_set_mark (void); +static int _rl_vi_goto_mark (void); -static int _rl_vi_callback_getchar PARAMS((char *, int)); +static inline int _rl_vi_advance_point (void); +static inline int _rl_vi_backup_point (void); + +static void _rl_vi_append_forward (int); + +static int _rl_vi_callback_getchar (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 *)); +static int _rl_vi_callback_set_mark (_rl_callback_generic_arg *); +static int _rl_vi_callback_goto_mark (_rl_callback_generic_arg *); +static int _rl_vi_callback_change_char (_rl_callback_generic_arg *); +static int _rl_vi_callback_char_search (_rl_callback_generic_arg *); #endif +static int rl_domove_read_callback (_rl_vimotion_cxt *); +static int rl_domove_motion_callback (_rl_vimotion_cxt *); +static int rl_vi_domove_getchar (_rl_vimotion_cxt *); + +static int vi_change_dispatch (_rl_vimotion_cxt *); +static int vi_delete_dispatch (_rl_vimotion_cxt *); +static int vi_yank_dispatch (_rl_vimotion_cxt *); + +static int vidomove_dispatch (_rl_vimotion_cxt *); + void -_rl_vi_initialize_line () +_rl_vi_initialize_line (void) { register int i, n; @@ -141,7 +176,7 @@ _rl_vi_initialize_line () } void -_rl_vi_reset_last () +_rl_vi_reset_last (void) { _rl_vi_last_command = 'i'; _rl_vi_last_repeat = 1; @@ -150,8 +185,7 @@ _rl_vi_reset_last () } void -_rl_vi_set_last (key, repeat, sign) - int key, repeat, sign; +_rl_vi_set_last (int key, int repeat, int sign) { _rl_vi_last_command = key; _rl_vi_last_repeat = repeat; @@ -161,24 +195,43 @@ _rl_vi_set_last (key, repeat, 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_start_inserting (int key, int repeat, int sign) { _rl_vi_set_last (key, repeat, sign); + rl_begin_undo_group (); /* ensure inserts aren't concatenated */ rl_vi_insertion_mode (1, key); } /* Is the command C a VI mode text modification command? */ int -_rl_vi_textmod_command (c) - int c; +_rl_vi_textmod_command (int c) { return (member (c, vi_textmod)); } +int +_rl_vi_motion_command (int c) +{ + return (member (c, vi_motion)); +} + +static void +_rl_vi_replace_insert (int count) +{ + int nchars; + + nchars = strlen (vi_insert_buffer); + + rl_begin_undo_group (); + while (count--) + /* nchars-1 to compensate for _rl_replace_text using `end+1' in call + to rl_delete_text */ + _rl_replace_text (vi_insert_buffer, rl_point, rl_point+nchars-1); + rl_end_undo_group (); +} + static void -_rl_vi_stuff_insert (count) - int count; +_rl_vi_stuff_insert (int count) { rl_begin_undo_group (); while (count--) @@ -190,19 +243,18 @@ _rl_vi_stuff_insert (count) 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; +rl_vi_redo (int count, int c) { int r; - if (!rl_explicit_arg) + if (rl_explicit_arg == 0) { rl_numeric_arg = _rl_vi_last_repeat; rl_arg_sign = _rl_vi_last_arg_sign; } r = 0; - vi_redoing = 1; + _rl_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) @@ -212,6 +264,13 @@ rl_vi_redo (count, c) if (rl_point > 0) _rl_vi_backup (); } + else if (_rl_vi_last_command == 'R' && vi_insert_buffer && *vi_insert_buffer) + { + _rl_vi_replace_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) @@ -239,32 +298,36 @@ rl_vi_redo (count, c) if (rl_point > 0) _rl_vi_backup (); } + else if (_rl_vi_last_command == '.' && _rl_keymap == vi_movement_keymap) + { + rl_ding (); + r = 0; + } else r = _rl_dispatch (_rl_vi_last_command, _rl_keymap); - vi_redoing = 0; + + _rl_vi_redoing = 0; return (r); } /* A placeholder for further expansion. */ int -rl_vi_undo (count, key) - int count, key; +rl_vi_undo (int count, int 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; +rl_vi_yank_arg (int count, int 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); + rl_yank_nth_arg (count - 1, key); else - rl_yank_nth_arg ('$', 0); + rl_yank_nth_arg ('$', key); return (0); } @@ -272,33 +335,14 @@ rl_vi_yank_arg (count, key) /* 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; +rl_vi_fetch_history (int count, int 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); + return (rl_fetch_history (count, c)); } /* Search again for the last thing searched for. */ int -rl_vi_search_again (count, key) - int count, key; +rl_vi_search_again (int count, int key) { switch (key) { @@ -315,8 +359,7 @@ rl_vi_search_again (count, key) /* Do a vi style search. */ int -rl_vi_search (count, key) - int count, key; +rl_vi_search (int count, int key) { switch (key) { @@ -339,14 +382,13 @@ rl_vi_search (count, key) /* Completion, from vi's point of view. */ int -rl_vi_complete (ignore, key) - int ignore, key; +rl_vi_complete (int ignore, int 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++; + _rl_vi_advance_point (); } if (key == '*') @@ -366,8 +408,7 @@ rl_vi_complete (ignore, key) /* Tilde expansion for vi mode. */ int -rl_vi_tilde_expand (ignore, key) - int ignore, key; +rl_vi_tilde_expand (int ignore, int key) { rl_tilde_expand (0, key); rl_vi_start_inserting (key, 1, rl_arg_sign); @@ -376,8 +417,7 @@ rl_vi_tilde_expand (ignore, key) /* Previous word in vi mode. */ int -rl_vi_prev_word (count, key) - int count, key; +rl_vi_prev_word (int count, int key) { if (count < 0) return (rl_vi_next_word (-count, key)); @@ -398,8 +438,7 @@ rl_vi_prev_word (count, key) /* Next word in vi mode. */ int -rl_vi_next_word (count, key) - int count, key; +rl_vi_next_word (int count, int key) { if (count < 0) return (rl_vi_prev_word (-count, key)); @@ -417,15 +456,77 @@ rl_vi_next_word (count, key) return (0); } +static inline int +_rl_vi_advance_point (void) +{ + int point; + + point = rl_point; + if (rl_point < rl_end) +#if defined (HANDLE_MULTIBYTE) + { + if (MB_CUR_MAX == 1 || rl_byte_oriented) + rl_point++; + else + { + point = rl_point; + rl_point = _rl_forward_char_internal (1); + if (point == rl_point || rl_point > rl_end) + rl_point = rl_end; + } + } +#else + rl_point++; +#endif + + return point; +} + +/* Move the cursor back one character. */ +static inline void +_rl_vi_backup (void) +{ + 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--; +} + +/* Move the point back one character, returning the starting value and not + doing anything at the beginning of the line */ +static inline int +_rl_vi_backup_point (void) +{ + int point; + + point = rl_point; + if (rl_point > 0) +#if defined (HANDLE_MULTIBYTE) + { + if (MB_CUR_MAX == 1 || rl_byte_oriented) + rl_point--; + else + { + point = rl_point; + rl_point = _rl_backward_char_internal (1); + if (rl_point < 0) + rl_point = 0; /* XXX - not really necessary */ + } + } +#else + rl_point--; +#endif + return point; +} + /* Move to the end of the ?next? word. */ int -rl_vi_end_word (count, key) - int count, key; +rl_vi_end_word (int count, int key) { if (count < 0) { rl_ding (); - return -1; + return 1; } if (_rl_uppercase_p (key)) @@ -437,25 +538,23 @@ rl_vi_end_word (count, key) /* Move forward a word the way that 'W' does. */ int -rl_vi_fWord (count, ignore) - int count, ignore; +rl_vi_fWord (int count, int ignore) { while (count-- && rl_point < (rl_end - 1)) { /* Skip until whitespace. */ while (!whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) - rl_point++; + _rl_vi_advance_point (); /* Now skip whitespace. */ while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) - rl_point++; + _rl_vi_advance_point (); } return (0); } int -rl_vi_bWord (count, ignore) - int count, ignore; +rl_vi_bWord (int count, int ignore) { while (count-- && rl_point > 0) { @@ -466,141 +565,177 @@ rl_vi_bWord (count, ignore) rl_point--; while (rl_point > 0 && whitespace (rl_line_buffer[rl_point])) - rl_point--; + _rl_vi_backup_point (); if (rl_point > 0) { - while (--rl_point >= 0 && !whitespace (rl_line_buffer[rl_point])); - rl_point++; + do + _rl_vi_backup_point (); + while (rl_point > 0 && !whitespace (rl_line_buffer[rl_point])); + if (rl_point > 0) /* hit whitespace */ + rl_point++; + + if (rl_point < 0) + rl_point = 0; } } return (0); } int -rl_vi_eWord (count, ignore) - int count, ignore; +rl_vi_eWord (int count, int ignore) { + int opoint; + while (count-- && rl_point < (rl_end - 1)) { - if (!whitespace (rl_line_buffer[rl_point])) - rl_point++; + if (whitespace (rl_line_buffer[rl_point]) == 0) + _rl_vi_advance_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++; + _rl_vi_advance_point (); if (rl_point && rl_point < rl_end) { + opoint = rl_point; + /* Skip whitespace. */ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) - rl_point++; + opoint = _rl_vi_advance_point (); /* XXX - why? */ /* Skip until whitespace. */ while (rl_point < rl_end && !whitespace (rl_line_buffer[rl_point])) - rl_point++; + opoint = _rl_vi_advance_point (); /* Move back to the last character of the word. */ - rl_point--; + rl_point = opoint; } } return (0); } int -rl_vi_fword (count, ignore) - int count, ignore; +rl_vi_fword (int count, int ignore) { + int opoint; + 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++; + _rl_vi_advance_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++; + _rl_vi_advance_point (); } + opoint = rl_point; + /* Move past whitespace. */ while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) - rl_point++; + opoint = _rl_vi_advance_point (); } return (0); } int -rl_vi_bword (count, ignore) - int count, ignore; +rl_vi_bword (int count, int ignore) { + int opoint; + while (count-- && rl_point > 0) { - int last_is_ident; + int prev_is_ident, cur_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 (--rl_point == 0) + break; /* 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--; + cur_is_ident = _rl_isident (rl_line_buffer[rl_point]); + opoint = _rl_vi_backup_point (); + prev_is_ident = _rl_isident (rl_line_buffer[rl_point]); + if ((cur_is_ident && !prev_is_ident) || (!cur_is_ident && prev_is_ident)) + ; /* leave point alone, we backed it up one character */ + else + rl_point = opoint; while (rl_point > 0 && whitespace (rl_line_buffer[rl_point])) - rl_point--; + _rl_vi_backup_point (); if (rl_point > 0) { + opoint = rl_point; if (_rl_isident (rl_line_buffer[rl_point])) - while (--rl_point >= 0 && _rl_isident (rl_line_buffer[rl_point])); + do + opoint = _rl_vi_backup_point (); + while (rl_point > 0 && _rl_isident (rl_line_buffer[rl_point])); else - while (--rl_point >= 0 && !_rl_isident (rl_line_buffer[rl_point]) && + do + opoint = _rl_vi_backup_point (); + while (rl_point > 0 && !_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point])); - rl_point++; + + if (rl_point > 0) + rl_point = opoint; + + if (rl_point < 0) + rl_point = 0; } } return (0); } int -rl_vi_eword (count, ignore) - int count, ignore; +rl_vi_eword (int count, int ignore) { - while (count-- && rl_point < rl_end - 1) + int opoint; + + while (count-- && rl_point < (rl_end - 1)) { - if (!whitespace (rl_line_buffer[rl_point])) - rl_point++; + if (whitespace (rl_line_buffer[rl_point]) == 0) + _rl_vi_advance_point (); while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) - rl_point++; + _rl_vi_advance_point (); + opoint = 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])); + do + { + opoint = _rl_vi_advance_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]) + do + { + opoint = _rl_vi_advance_point (); + } + while (rl_point < rl_end && !_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point])); } - rl_point--; + rl_point = opoint; } return (0); } int -rl_vi_insert_beg (count, key) - int count, key; +rl_vi_insert_beg (int count, int key) { rl_beg_of_line (1, key); rl_vi_insert_mode (1, key); @@ -608,28 +743,13 @@ rl_vi_insert_beg (count, key) } static void -_rl_vi_append_forward (key) - int key; +_rl_vi_append_forward (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; - } - } + _rl_vi_advance_point (); } int -rl_vi_append_mode (count, key) - int count, key; +rl_vi_append_mode (int count, int key) { _rl_vi_append_forward (key); rl_vi_start_inserting (key, 1, rl_arg_sign); @@ -637,8 +757,7 @@ rl_vi_append_mode (count, key) } int -rl_vi_append_eol (count, key) - int count, key; +rl_vi_append_eol (int count, int key) { rl_end_of_line (1, key); rl_vi_append_mode (1, key); @@ -647,8 +766,7 @@ rl_vi_append_eol (count, key) /* What to do in the case of C-d. */ int -rl_vi_eof_maybe (count, c) - int count, c; +rl_vi_eof_maybe (int count, int c) { return (rl_newline (1, '\n')); } @@ -658,25 +776,66 @@ rl_vi_eof_maybe (count, c) /* Switching from one mode to the other really just involves switching keymaps. */ int -rl_vi_insertion_mode (count, key) - int count, key; +rl_vi_insertion_mode (int count, int key) { _rl_keymap = vi_insertion_keymap; _rl_vi_last_key_before_insert = key; + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); return (0); } int -rl_vi_insert_mode (count, key) - int count, key; +rl_vi_insert_mode (int count, int key) { rl_vi_start_inserting (key, 1, rl_arg_sign); return (0); } static void -_rl_vi_save_insert (up) - UNDO_LIST *up; +vi_save_insert_buffer (int start, int len) +{ + /* Same code as _rl_vi_save_insert below */ + 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'; +} + +static void +_rl_vi_save_replace (void) +{ + int len, start, end; + UNDO_LIST *up; + + up = rl_undo_list; + if (up == 0 || up->what != UNDO_END || vi_replace_count <= 0) + { + if (vi_insert_buffer_size >= 1) + vi_insert_buffer[0] = '\0'; + return; + } + /* Let's try it the quick and easy way for now. This should essentially + accommodate every UNDO_INSERT and save the inserted text to + vi_insert_buffer */ + end = rl_point; + start = end - vi_replace_count + 1; + len = vi_replace_count + 1; + + if (start < 0) + { + len = end + 1; + start = 0; + } + + vi_save_insert_buffer (start, len); +} + +static void +_rl_vi_save_insert (UNDO_LIST *up) { int len, start, end; @@ -690,30 +849,30 @@ _rl_vi_save_insert (up) 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'; + + vi_save_insert_buffer (start, len); } void -_rl_vi_done_inserting () +_rl_vi_done_inserting (void) { if (_rl_vi_doing_insert) { - /* The `C', `s', and `S' commands set this. */ - rl_end_undo_group (); + /* The `c', `s', `S', and `R' commands set this. */ + rl_end_undo_group (); /* for the group in rl_vi_start_inserting */ /* 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; + if (_rl_vi_last_key_before_insert == 'R') + _rl_vi_save_replace (); /* Half the battle */ + else + _rl_vi_save_insert (rl_undo_list->next); + /* sanity check, should always be >= 1 here */ + if (_rl_undo_group_level > 0) + rl_end_undo_group (); /* for the group in the command (change or replace) */ } else { @@ -721,19 +880,20 @@ _rl_vi_done_inserting () _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); + _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; } + + /* Sanity check, make sure all the undo groups are closed before we leave + insert mode */ + while (_rl_undo_group_level > 0) + rl_end_undo_group (); } int -rl_vi_movement_mode (count, key) - int count, key; +rl_vi_movement_mode (int count, int key) { if (rl_point > 0) rl_backward_char (1, key); @@ -746,13 +906,15 @@ rl_vi_movement_mode (count, key) if (RL_ISSTATE (RL_STATE_VICMDONCE) == 0) rl_free_undo_list (); + if (_rl_show_mode_in_prompt) + _rl_reset_prompt (); + RL_SETSTATE (RL_STATE_VICMDONCE); return (0); } int -rl_vi_arg_digit (count, c) - int count, c; +rl_vi_arg_digit (int count, int c) { if (c == '0' && rl_numeric_arg == 1 && !rl_explicit_arg) return (rl_beg_of_line (1, c)); @@ -763,10 +925,9 @@ rl_vi_arg_digit (count, c) /* Change the case of the next COUNT characters. */ #if defined (HANDLE_MULTIBYTE) static int -_rl_vi_change_mbchar_case (count) - int count; +_rl_vi_change_mbchar_case (int count) { - wchar_t wc; + WCHAR_T wc; char mb[MB_LEN_MAX+1]; int mlen, p; size_t m; @@ -777,11 +938,11 @@ _rl_vi_change_mbchar_case (count) count--; while (count-- && rl_point < rl_end) { - m = mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps); + 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]; + wc = (WCHAR_T)rl_line_buffer[rl_point]; else if (MB_NULLWCH (m)) - wc = L'\0'; + wc = L'\0'; if (iswupper (wc)) wc = towlower (wc); else if (iswlower (wc)) @@ -797,19 +958,19 @@ _rl_vi_change_mbchar_case (count) if (wc) { p = rl_point; - mlen = wcrtomb (mb, wc, &ps); + 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_vi_advance_point (); rl_insert_text (mb); rl_end_undo_group (); rl_vi_check (); } else - rl_forward_char (1, 0); + rl_forward_char (1, 0); } return 0; @@ -817,8 +978,7 @@ _rl_vi_change_mbchar_case (count) #endif int -rl_vi_change_case (count, ignore) - int count, ignore; +rl_vi_change_case (int count, int ignore) { int c, p; @@ -856,7 +1016,7 @@ rl_vi_change_case (count, ignore) _rl_insert_char (1, c); rl_end_undo_group (); rl_vi_check (); - } + } else rl_forward_char (1, c); } @@ -864,8 +1024,7 @@ rl_vi_change_case (count, ignore) } int -rl_vi_put (count, key) - int count, key; +rl_vi_put (int count, int 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); @@ -877,143 +1036,26 @@ rl_vi_put (count, 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--; -} - +/* Move the cursor back one character if you're at the end of the line */ int -rl_vi_check () +rl_vi_check (void) { 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--; - } + _rl_vi_backup (); return (0); } +/* Move to the character position specified by COUNT */ int -rl_vi_column (count, key) - int count, key; +rl_vi_column (int count, int 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++; - } + rl_point = 0; + rl_point = _rl_forward_char_internal (count - 1); } - - if (rl_mark < rl_point) - SWAP (rl_point, rl_mark); - return (0); } @@ -1021,8 +1063,7 @@ rl_vi_domove (key, nextkey) 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; +_rl_vi_arg_dispatch (int c) { int key; @@ -1042,13 +1083,13 @@ _rl_vi_arg_dispatch (c) else rl_numeric_arg = _rl_digit_value (c); rl_explicit_arg = 1; - return 1; + return 1; /* keep going */ } else { rl_clear_message (); rl_stuff_char (key); - return 0; + return 0; /* done */ } } @@ -1056,7 +1097,7 @@ _rl_vi_arg_dispatch (c) Don't recognize minus sign? Should this do rl_save_prompt/rl_restore_prompt? */ static int -rl_digit_loop1 () +rl_digit_loop1 (void) { int c, r; @@ -1076,66 +1117,332 @@ rl_digit_loop1 () return (0); } -int -rl_vi_delete_to (count, key) - int count, key; +/* This set of functions is basically to handle the commands that take a + motion argument while in callback mode: read the command, read the motion + command modifier, find the extent of the text to affect, and dispatch the + command for execution. */ +static void +_rl_mvcxt_init (_rl_vimotion_cxt *m, int op, int key) { - int c, start_pos; - - if (_rl_uppercase_p (key)) - rl_stuff_char ('$'); - else if (vi_redoing) - rl_stuff_char (_rl_vi_last_motion); + m->op = op; + m->state = m->flags = 0; + m->ncxt = 0; + m->numeric_arg = -1; + m->start = rl_point; + m->end = rl_end; + m->key = key; + m->motion = -1; +} - start_pos = rl_point; +static _rl_vimotion_cxt * +_rl_mvcxt_alloc (int op, int key) +{ + _rl_vimotion_cxt *m; - if (rl_vi_domove (key, &c)) - { - rl_ding (); - return -1; - } + m = xmalloc (sizeof (_rl_vimotion_cxt)); + _rl_mvcxt_init (m, op, key); + return m; +} +static void +_rl_mvcxt_dispose (_rl_vimotion_cxt *m) +{ + xfree (m); +} + +static int +rl_domove_motion_callback (_rl_vimotion_cxt *m) +{ + int c; + + _rl_vi_last_motion = c = m->motion; + + /* Append a blank character temporarily so that the motion routines + work right at the end of the line. Original value of rl_end is saved + as m->end. */ + rl_extend_line_buffer (rl_end + 1); + rl_line_buffer[rl_end++] = ' '; + rl_line_buffer[rl_end] = '\0'; + + _rl_dispatch (c, _rl_keymap); + +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + /* Messy case where char search can be vi motion command; see rest of + details in callback.c. vi_char_search and callback_char_search just + set and unset the CHARSEARCH state. This is where any vi motion + command that needs to set its own state should be handled, with any + corresponding code to manage that state in callback.c */ + if (RL_ISSTATE (RL_STATE_CHARSEARCH)) + return 0; + else + return (_rl_vi_domove_motion_cleanup (c, m)); + } +#endif + + return (_rl_vi_domove_motion_cleanup (c, m)); +} + +int +_rl_vi_domove_motion_cleanup (int c, _rl_vimotion_cxt *m) +{ + int r; + + /* Remove the blank that we added in rl_domove_motion_callback. */ + rl_end = m->end; + rl_line_buffer[rl_end] = '\0'; + _rl_fix_point (0); + + /* No change in position means the command failed. */ + if (rl_mark == rl_point) + { + /* 'c' and 'C' enter insert mode after the delete even if the motion + didn't delete anything, as long as the motion command is valid. */ + if (_rl_to_upper (m->key) == 'C' && _rl_vi_motion_command (c)) + return (vidomove_dispatch (m)); + RL_UNSETSTATE (RL_STATE_VIMOTION); + 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--; /* XXX */ + + /* 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 (m->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_vi_advance_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_vi_advance_point (); + } + } + + if (rl_mark < rl_point) + SWAP (rl_point, rl_mark); + +#if defined (READLINE_CALLBACKS) + if (RL_ISSTATE (RL_STATE_CALLBACK)) + (*rl_redisplay_function)(); /* make sure motion is displayed */ +#endif + + r = vidomove_dispatch (m); + + return (r); +} + +#define RL_VIMOVENUMARG() (RL_ISSTATE (RL_STATE_VIMOTION) && RL_ISSTATE (RL_STATE_NUMERICARG)) + +static int +rl_domove_read_callback (_rl_vimotion_cxt *m) +{ + int c, save; + + c = m->motion; + + if (member (c, vi_motion)) + { +#if defined (READLINE_CALLBACKS) + /* If we just read a vi-mode motion command numeric argument, turn off + the `reading numeric arg' state */ + if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG()) + RL_UNSETSTATE (RL_STATE_NUMERICARG); +#endif + /* Should do everything, including turning off RL_STATE_VIMOTION */ + return (rl_domove_motion_callback (m)); + } + else if (m->key == c && (m->key == 'd' || m->key == 'y' || m->key == 'c')) + { + rl_mark = rl_end; + rl_beg_of_line (1, c); + _rl_vi_last_motion = c; + RL_UNSETSTATE (RL_STATE_VIMOTION); + return (vidomove_dispatch (m)); + } +#if defined (READLINE_CALLBACKS) + /* XXX - these need to handle rl_universal_argument bindings */ + /* Reading vi motion char continuing numeric argument */ + else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG()) + { + return (_rl_vi_arg_dispatch (c)); + } + /* Readine vi motion char starting numeric argument */ + else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_VIMOTION) && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)) + { + RL_SETSTATE (RL_STATE_NUMERICARG); + return (_rl_vi_arg_dispatch (c)); + } +#endif + else if (_rl_digit_p (c)) + { + /* This code path taken when not in callback mode */ + save = rl_numeric_arg; + rl_numeric_arg = _rl_digit_value (c); + rl_explicit_arg = 1; + RL_SETSTATE (RL_STATE_NUMERICARG); + rl_digit_loop1 (); + rl_numeric_arg *= save; + c = rl_vi_domove_getchar (m); + if (c < 0) + { + m->motion = 0; + return -1; + } + m->motion = c; + return (rl_domove_motion_callback (m)); + } + else + { + RL_UNSETSTATE (RL_STATE_VIMOTION); + RL_UNSETSTATE (RL_STATE_NUMERICARG); + return (1); + } +} + +static int +rl_vi_domove_getchar (_rl_vimotion_cxt *m) +{ + return (_rl_bracketed_read_key ()); +} + +#if defined (READLINE_CALLBACKS) +int +_rl_vi_domove_callback (_rl_vimotion_cxt *m) +{ + int c, r; + + m->motion = c = rl_vi_domove_getchar (m); + if (c < 0) + return 1; /* EOF */ + r = rl_domove_read_callback (m); + + return ((r == 0) ? r : 1); /* normalize return values */ +} +#endif + +/* This code path is taken when not in callback mode. */ +int +rl_vi_domove (int x, int *ignore) +{ + int r; + _rl_vimotion_cxt *m; + + m = _rl_vimvcxt; + *ignore = m->motion = rl_vi_domove_getchar (m); + + if (m->motion < 0) + { + m->motion = 0; + return -1; + } + + return (rl_domove_read_callback (m)); +} + +static int +vi_delete_dispatch (_rl_vimotion_cxt *m) +{ /* These are the motion commands that do not require adjusting the mark. */ - if (((strchr (" l|h^0bBFT`", c) == 0) && (rl_point >= start_pos)) && + if (((strchr (" l|h^0bBFT`", m->motion) == 0) && (rl_point >= m->start)) && (rl_mark < rl_end)) - rl_mark++; + INCREMENT_POS (rl_mark); rl_kill_text (rl_point, rl_mark); return (0); } int -rl_vi_change_to (count, key) - int count, key; +rl_vi_delete_to (int count, int key) { - int c, start_pos; + int c, r; + _rl_vimotion_cxt *savecxt; - if (_rl_uppercase_p (key)) - rl_stuff_char ('$'); - else if (vi_redoing) - rl_stuff_char (_rl_vi_last_motion); + savecxt = 0; + if (_rl_vi_redoing) + { + savecxt = _rl_vimvcxt; + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_DELETE, key); + } + else if (_rl_vimvcxt) + _rl_mvcxt_init (_rl_vimvcxt, VIM_DELETE, key); + else + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_DELETE, key); - start_pos = rl_point; + _rl_vimvcxt->start = rl_point; - if (rl_vi_domove (key, &c)) + rl_mark = rl_point; + if (_rl_uppercase_p (key)) + { + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing) /* handle redoing `dd' here */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + rl_mark = rl_end; + rl_beg_of_line (1, key); + RL_UNSETSTATE (RL_STATE_VIMOTION); + r = vidomove_dispatch (_rl_vimvcxt); + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + RL_SETSTATE (RL_STATE_VIMOTION); + return (0); + } +#endif + else + r = rl_vi_domove (key, &c); + + if (r < 0) { rl_ding (); - return -1; + r = -1; } + _rl_mvcxt_dispose (_rl_vimvcxt); + _rl_vimvcxt = savecxt; + + return r; +} + +static int +vi_change_dispatch (_rl_vimotion_cxt *m) +{ /* 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)) && + if (((strchr (" l|hwW^0bBFT`", m->motion) == 0) && (rl_point >= m->start)) && (rl_mark < rl_end)) - rl_mark++; + INCREMENT_POS (rl_mark); /* The cursor never moves with c[wW]. */ - if ((_rl_to_upper (c) == 'W') && rl_point < start_pos) - rl_point = start_pos; + if ((_rl_to_upper (m->motion) == 'W') && rl_point < m->start) + rl_point = m->start; - if (vi_redoing) + if (_rl_vi_redoing) { if (vi_insert_buffer && *vi_insert_buffer) rl_begin_undo_group (); @@ -1151,49 +1458,181 @@ rl_vi_change_to (count, key) 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); + if (_rl_uppercase_p (m->key) == 0) + _rl_vi_doing_insert = 1; + /* XXX -- TODO -- use m->numericarg? */ + rl_vi_start_inserting (m->key, rl_numeric_arg, rl_arg_sign); } return (0); } int -rl_vi_yank_to (count, key) - int count, key; +rl_vi_change_to (int count, int key) { - int c, start_pos; + int c, r; + _rl_vimotion_cxt *savecxt; - if (_rl_uppercase_p (key)) - rl_stuff_char ('$'); + savecxt = 0; + if (_rl_vi_redoing) + { + savecxt = _rl_vimvcxt; + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_CHANGE, key); + } + else if (_rl_vimvcxt) + _rl_mvcxt_init (_rl_vimvcxt, VIM_CHANGE, key); + else + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_CHANGE, key); + _rl_vimvcxt->start = rl_point; - start_pos = rl_point; + rl_mark = rl_point; + if (_rl_uppercase_p (key)) + { + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing) /* handle redoing `cc' here */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + rl_mark = rl_end; + rl_beg_of_line (1, key); + RL_UNSETSTATE (RL_STATE_VIMOTION); + r = vidomove_dispatch (_rl_vimvcxt); + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + RL_SETSTATE (RL_STATE_VIMOTION); + return (0); + } +#endif + else + r = rl_vi_domove (key, &c); - if (rl_vi_domove (key, &c)) + if (r < 0) { rl_ding (); - return -1; + r = -1; /* normalize return value */ } + _rl_mvcxt_dispose (_rl_vimvcxt); + _rl_vimvcxt = savecxt; + + return r; +} + +static int +vi_yank_dispatch (_rl_vimotion_cxt *m) +{ /* These are the motion commands that do not require adjusting the mark. */ - if (((strchr (" l|h^0%bBFT`", c) == 0) && (rl_point >= start_pos)) && + if (((strchr (" l|h^0%bBFT`", m->motion) == 0) && (rl_point >= m->start)) && (rl_mark < rl_end)) - rl_mark++; + INCREMENT_POS (rl_mark); rl_begin_undo_group (); rl_kill_text (rl_point, rl_mark); rl_end_undo_group (); rl_do_undo (); - rl_point = start_pos; + rl_point = m->start; + + _rl_fix_point (1); return (0); } int -rl_vi_rubout (count, key) - int count, key; +rl_vi_yank_to (int count, int key) +{ + int c, r; + _rl_vimotion_cxt *savecxt; + + savecxt = 0; + if (_rl_vi_redoing) + { + savecxt = _rl_vimvcxt; + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_YANK, key); + } + else if (_rl_vimvcxt) + _rl_mvcxt_init (_rl_vimvcxt, VIM_YANK, key); + else + _rl_vimvcxt = _rl_mvcxt_alloc (VIM_YANK, key); + _rl_vimvcxt->start = rl_point; + + rl_mark = rl_point; + if (_rl_uppercase_p (key)) + { + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + else if (_rl_vi_redoing) /* handle redoing `yy' here */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + rl_mark = rl_end; + rl_beg_of_line (1, key); + RL_UNSETSTATE (RL_STATE_VIMOTION); + r = vidomove_dispatch (_rl_vimvcxt); + } +#if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + RL_SETSTATE (RL_STATE_VIMOTION); + return (0); + } +#endif + else + r = rl_vi_domove (key, &c); + + if (r < 0) + { + rl_ding (); + r = -1; + } + + _rl_mvcxt_dispose (_rl_vimvcxt); + _rl_vimvcxt = savecxt; + + return r; +} + +static int +vidomove_dispatch (_rl_vimotion_cxt *m) +{ + int r; + + switch (m->op) + { + case VIM_DELETE: + r = vi_delete_dispatch (m); + break; + case VIM_CHANGE: + r = vi_change_dispatch (m); + break; + case VIM_YANK: + r = vi_yank_dispatch (m); + break; + default: + _rl_errmsg ("vidomove_dispatch: unknown operator %d", m->op); + r = 1; + break; + } + + RL_UNSETSTATE (RL_STATE_VIMOTION); + return r; +} + +int +rl_vi_rubout (int count, int key) { int opoint; @@ -1203,7 +1642,7 @@ rl_vi_rubout (count, key) if (rl_point == 0) { rl_ding (); - return -1; + return 1; } opoint = rl_point; @@ -1223,8 +1662,7 @@ rl_vi_rubout (count, key) } int -rl_vi_delete (count, key) - int count, key; +rl_vi_delete (int count, int key) { int end; @@ -1234,7 +1672,7 @@ rl_vi_delete (count, key) if (rl_end == 0) { rl_ding (); - return -1; + return 1; } if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) @@ -1253,9 +1691,63 @@ rl_vi_delete (count, key) return (0); } +/* This does what Posix specifies vi-mode C-w to do: using whitespace and + punctuation characters as the word boundaries. */ + +#define vi_unix_word_boundary(c) (whitespace(c) || ispunct(c)) + int -rl_vi_back_to_indent (count, key) - int count, key; +rl_vi_unix_word_rubout (int count, int key) +{ + int orig_point; + + if (rl_point == 0) + rl_ding (); + else + { + orig_point = rl_point; + if (count <= 0) + count = 1; + + while (count--) + { + /* This isn't quite what ksh93 does but it seems to match what the + Posix description of sh specifies, with a few accommodations + for sequences of whitespace characters between words and at + the end of the line. */ + + /* Skip over whitespace at the end of the line as a special case */ + if (rl_point > 0 && (rl_line_buffer[rl_point] == 0) && + whitespace (rl_line_buffer[rl_point - 1])) + while (--rl_point > 0 && whitespace (rl_line_buffer[rl_point])) + ; + + /* If we're at the start of a word, move back to word boundary so we + move back to the `preceding' word */ + if (rl_point > 0 && (vi_unix_word_boundary (rl_line_buffer[rl_point]) == 0) && + vi_unix_word_boundary (rl_line_buffer[rl_point - 1])) + rl_point--; + + /* If we are at a word boundary (whitespace/punct), move backward + past a sequence of word boundary characters. If we are at the + end of a word (non-word boundary), move back to a word boundary */ + if (rl_point > 0 && vi_unix_word_boundary (rl_line_buffer[rl_point])) + while (rl_point && vi_unix_word_boundary (rl_line_buffer[rl_point - 1])) + rl_point--; + else if (rl_point > 0 && vi_unix_word_boundary (rl_line_buffer[rl_point]) == 0) + while (rl_point > 0 && (vi_unix_word_boundary (rl_line_buffer[rl_point - 1]) == 0)) + _rl_vi_backup_point (); + } + + rl_kill_text (orig_point, rl_point); + } + + return 0; +} + + +int +rl_vi_back_to_indent (int count, int key) { rl_beg_of_line (1, key); while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) @@ -1264,8 +1756,7 @@ rl_vi_back_to_indent (count, key) } int -rl_vi_first_print (count, key) - int count, key; +rl_vi_first_print (int count, int key) { return (rl_vi_back_to_indent (1, key)); } @@ -1274,8 +1765,7 @@ 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; +_rl_vi_callback_char_search (_rl_callback_generic_arg *data) { int c; #if defined (HANDLE_MULTIBYTE) @@ -1287,7 +1777,10 @@ _rl_vi_callback_char_search (data) #endif if (c <= 0) - return -1; + { + RL_UNSETSTATE (RL_STATE_CHARSEARCH); + return -1; + } #if !defined (HANDLE_MULTIBYTE) _rl_vi_last_search_char = c; @@ -1295,6 +1788,7 @@ _rl_vi_callback_char_search (data) _rl_callback_func = 0; _rl_want_redisplay = 1; + RL_UNSETSTATE (RL_STATE_CHARSEARCH); #if defined (HANDLE_MULTIBYTE) return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_mbchar, _rl_vi_last_search_mblen)); @@ -1305,8 +1799,7 @@ _rl_vi_callback_char_search (data) #endif int -rl_vi_char_search (count, key) - int count, key; +rl_vi_char_search (int count, int key) { int c; #if defined (HANDLE_MULTIBYTE) @@ -1317,40 +1810,53 @@ rl_vi_char_search (count, key) #endif if (key == ';' || key == ',') - _rl_cs_dir = (key == ';') ? _rl_cs_orig_dir : -_rl_cs_orig_dir; + { + if (_rl_cs_orig_dir == 0) + return 1; +#if defined (HANDLE_MULTIBYTE) + if (_rl_vi_last_search_mblen == 0) + return 1; +#else + if (_rl_vi_last_search_char == 0) + return 1; +#endif + _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 = FTO; + break; - case 'T': - _rl_cs_orig_dir = _rl_cs_dir = BTO; - 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 = FFIND; + break; - case 'F': - _rl_cs_orig_dir = _rl_cs_dir = BFIND; - break; - } + case 'F': + _rl_cs_orig_dir = _rl_cs_dir = BFIND; + break; + } - if (vi_redoing) + if (_rl_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); - } + { + _rl_callback_data = _rl_callback_data_alloc (count); + _rl_callback_data->i1 = _rl_cs_dir; + _rl_callback_data->i2 = key; + _rl_callback_func = _rl_vi_callback_char_search; + RL_SETSTATE (RL_STATE_CHARSEARCH); + return (0); + } #endif else { @@ -1386,8 +1892,7 @@ rl_vi_char_search (count, key) /* Match brackets */ int -rl_vi_match (ignore, key) - int ignore, key; +rl_vi_match (int ignore, int key) { int count = 1, brack, pos, tmp, pre; @@ -1401,7 +1906,7 @@ rl_vi_match (ignore, key) pre = rl_point; rl_forward_char (1, key); if (pre == rl_point) - break; + break; } } else @@ -1413,7 +1918,7 @@ rl_vi_match (ignore, key) { rl_point = pos; rl_ding (); - return -1; + return 1; } } @@ -1430,7 +1935,7 @@ rl_vi_match (ignore, key) { pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); if (tmp == pos) - pos--; + pos--; } if (pos >= 0) { @@ -1443,7 +1948,7 @@ rl_vi_match (ignore, key) else { rl_ding (); - return -1; + return 1; } } } @@ -1467,7 +1972,7 @@ rl_vi_match (ignore, key) else { rl_ding (); - return -1; + return 1; } } } @@ -1476,8 +1981,7 @@ rl_vi_match (ignore, key) } int -rl_vi_bracktype (c) - int c; +rl_vi_bracktype (int c) { switch (c) { @@ -1492,9 +1996,7 @@ rl_vi_bracktype (c) } static int -_rl_vi_change_char (count, c, mb) - int count, c; - char *mb; +_rl_vi_change_char (int count, int c, char *mb) { int p; @@ -1507,7 +2009,7 @@ _rl_vi_change_char (count, c, mb) p = rl_point; rl_vi_delete (1, c); if (rl_point < p) /* Did we retreat at EOL? */ - rl_point++; + _rl_vi_append_forward (c); #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_insert_text (mb); @@ -1525,40 +2027,30 @@ _rl_vi_change_char (count, c, mb) } static int -_rl_vi_callback_getchar (mb, mlen) - char *mb; - int mlen; +_rl_vi_callback_getchar (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; + return (_rl_bracketed_read_mbstring (mb, mlen)); } #if defined (READLINE_CALLBACKS) static int -_rl_vi_callback_change_char (data) - _rl_callback_generic_arg *data; +_rl_vi_callback_change_char (_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); + char mb[MB_LEN_MAX+1]; + c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); if (c < 0) return -1; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX); + else +#endif + _rl_vi_last_replacement[0] = c; + _rl_vi_last_replacement[MB_LEN_MAX] = '\0'; /* XXX */ + _rl_callback_func = 0; _rl_want_redisplay = 1; @@ -1567,17 +2059,16 @@ _rl_vi_callback_change_char (data) #endif int -rl_vi_change_char (count, key) - int count, key; +rl_vi_change_char (int count, int key) { int c; - char mb[MB_LEN_MAX]; + char mb[MB_LEN_MAX+1]; - if (vi_redoing) + if (_rl_vi_redoing) { - c = _rl_vi_last_replacement; - mb[0] = c; - mb[1] = '\0'; + strncpy (mb, _rl_vi_last_replacement, MB_LEN_MAX); + c = (unsigned char)_rl_vi_last_replacement[0]; /* XXX */ + mb[MB_LEN_MAX] = '\0'; } #if defined (READLINE_CALLBACKS) else if (RL_ISSTATE (RL_STATE_CALLBACK)) @@ -1588,7 +2079,18 @@ rl_vi_change_char (count, key) } #endif else - _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); + { + c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); + if (c < 0) + return -1; +#ifdef HANDLE_MULTIBYTE + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX); + else +#endif + _rl_vi_last_replacement[0] = c; + _rl_vi_last_replacement[MB_LEN_MAX] = '\0'; /* just in case */ + } if (c < 0) return -1; @@ -1597,19 +2099,17 @@ rl_vi_change_char (count, key) } int -rl_vi_subst (count, key) - int count, key; +rl_vi_subst (int count, int key) { /* If we are redoing, rl_vi_change_to will stuff the last motion char */ - if (vi_redoing == 0) + if (_rl_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; +rl_vi_overstrike (int count, int key) { if (_rl_vi_doing_insert == 0) { @@ -1619,7 +2119,8 @@ rl_vi_overstrike (count, key) if (count > 0) { - _rl_overwrite_char (count, key); + if (_rl_overwrite_char (count, key) != 0) + return (1); vi_replace_count += count; } @@ -1627,8 +2128,7 @@ rl_vi_overstrike (count, key) } int -rl_vi_overstrike_delete (count, key) - int count, key; +rl_vi_overstrike_delete (int count, int key) { int i, s; @@ -1642,7 +2142,7 @@ rl_vi_overstrike_delete (count, key) s = rl_point; if (rl_do_undo ()) - vi_replace_count--; + vi_replace_count--; /* XXX */ if (rl_point == s) rl_backward_char (1, key); @@ -1657,35 +2157,127 @@ rl_vi_overstrike_delete (count, key) return (0); } +static int +rl_vi_overstrike_kill_line (int count, int key) +{ + int r, end; + + end = rl_end; + r = rl_unix_line_discard (count, key); + vi_replace_count -= end - rl_end; + return r; +} + +static int +rl_vi_overstrike_kill_word (int count, int key) +{ + int r, end; + + end = rl_end; + r = rl_vi_unix_word_rubout (count, key); + vi_replace_count -= end - rl_end; + return r; +} + +static int +rl_vi_overstrike_yank (int count, int key) +{ + int r, end; + + end = rl_end; + r = rl_yank (count, key); + vi_replace_count += rl_end - end; + return r; +} + +/* Read bracketed paste mode pasted text and insert it in overwrite mode */ +static int +rl_vi_overstrike_bracketed_paste (int count, int key) +{ + int r; + char *pbuf; + size_t pblen; + + pbuf = _rl_bracketed_text (&pblen); + if (pblen == 0) + { + xfree (pbuf); + return 0; + } + r = pblen; + while (--r >= 0) + _rl_unget_char ((unsigned char)pbuf[r]); + xfree (pbuf); + + while (_rl_pushed_input_available ()) + { + key = rl_read_key (); + r = rl_vi_overstrike (1, key); + } + + return r; +} + int -rl_vi_replace (count, key) - int count, key; +rl_vi_replace (int count, int key) { int i; vi_replace_count = 0; - if (!vi_replace_map) + if (vi_replace_map == 0) { vi_replace_map = rl_make_bare_keymap (); + for (i = 0; i < ' '; i++) + if (vi_insertion_keymap[i].type == ISFUNC) + vi_replace_map[i].function = vi_insertion_keymap[i].function; + for (i = ' '; i < KEYMAP_SIZE; i++) vi_replace_map[i].function = rl_vi_overstrike; vi_replace_map[RUBOUT].function = rl_vi_overstrike_delete; + + /* Make sure these are what we want. */ 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. */ + 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; + /* Same for ^U and unix-line-discard. */ + if (vi_insertion_keymap[CTRL ('U')].type == ISFUNC && + vi_insertion_keymap[CTRL ('U')].function == rl_unix_line_discard) + vi_replace_map[CTRL ('U')].function = rl_vi_overstrike_kill_line; + + /* And for ^W and unix-word-rubout. */ + if (vi_insertion_keymap[CTRL ('W')].type == ISFUNC && + vi_insertion_keymap[CTRL ('W')].function == rl_vi_unix_word_rubout) + vi_replace_map[CTRL ('W')].function = rl_vi_overstrike_kill_word; + + /* And finally for ^Y and yank. */ + if (vi_insertion_keymap[CTRL ('Y')].type == ISFUNC && + vi_insertion_keymap[CTRL ('Y')].function == rl_yank) + vi_replace_map[CTRL ('Y')].function = rl_vi_overstrike_yank; + + /* Make sure this is the value we need. */ + vi_replace_map[ANYOTHERKEY].type = ISFUNC; + vi_replace_map[ANYOTHERKEY].function = (rl_command_func_t *)NULL; } + + rl_vi_start_inserting (key, 1, rl_arg_sign); + + _rl_vi_last_key_before_insert = 'R'; /* in case someone rebinds it */ _rl_keymap = vi_replace_map; + + if (_rl_enable_bracketed_paste) + rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_vi_overstrike_bracketed_paste); + return (0); } @@ -1694,7 +2286,7 @@ rl_vi_replace (count, key) the previous character. A space matches everything. Word delimiters are space and ;. */ int -rl_vi_possible_completions() +rl_vi_possible_completions (void) { int save_pos = rl_point; @@ -1702,7 +2294,7 @@ rl_vi_possible_completions() { while (rl_point < rl_end && rl_line_buffer[rl_point] != ' ' && rl_line_buffer[rl_point] != ';') - rl_point++; + _rl_vi_advance_point (); } else if (rl_line_buffer[rl_point - 1] == ';') { @@ -1719,7 +2311,7 @@ rl_vi_possible_completions() /* Functions to save and restore marks. */ static int -_rl_vi_set_mark () +_rl_vi_set_mark (void) { int ch; @@ -1730,7 +2322,7 @@ _rl_vi_set_mark () if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ { rl_ding (); - return -1; + return 1; } ch -= 'a'; vi_mark_chars[ch] = rl_point; @@ -1739,8 +2331,7 @@ _rl_vi_set_mark () #if defined (READLINE_CALLBACKS) static int -_rl_vi_callback_set_mark (data) - _rl_callback_generic_arg *data; +_rl_vi_callback_set_mark (_rl_callback_generic_arg *data) { _rl_callback_func = 0; _rl_want_redisplay = 1; @@ -1750,8 +2341,7 @@ _rl_vi_callback_set_mark (data) #endif int -rl_vi_set_mark (count, key) - int count, key; +rl_vi_set_mark (int count, int key) { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) @@ -1766,7 +2356,7 @@ rl_vi_set_mark (count, key) } static int -_rl_vi_goto_mark () +_rl_vi_goto_mark (void) { int ch; @@ -1777,28 +2367,29 @@ _rl_vi_goto_mark () if (ch == '`') { rl_point = rl_mark; + _rl_fix_point (1); return 0; } else if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ { rl_ding (); - return -1; + return 1; } ch -= 'a'; if (vi_mark_chars[ch] == -1) { rl_ding (); - return -1; + return 1; } rl_point = vi_mark_chars[ch]; + _rl_fix_point (1); return 0; } #if defined (READLINE_CALLBACKS) static int -_rl_vi_callback_goto_mark (data) - _rl_callback_generic_arg *data; +_rl_vi_callback_goto_mark (_rl_callback_generic_arg *data) { _rl_callback_func = 0; _rl_want_redisplay = 1; @@ -1808,8 +2399,7 @@ _rl_vi_callback_goto_mark (data) #endif int -rl_vi_goto_mark (count, key) - int count, key; +rl_vi_goto_mark (int count, int key) { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) diff --git a/lib/readline/xfree.c b/lib/readline/xfree.c new file mode 100644 index 0000000..c199b29 --- /dev/null +++ b/lib/readline/xfree.c @@ -0,0 +1,49 @@ +/* xfree.c -- safe version of free that ignores attempts to free NUL */ + +/* Copyright (C) 1991-2010,2017 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 . +*/ + +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +#include +#endif + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include "xmalloc.h" + +/* **************************************************************** */ +/* */ +/* Memory Deallocation. */ +/* */ +/* **************************************************************** */ + +/* Use this as the function to call when adding unwind protects so we + don't need to know what free() returns. */ +void +xfree (PTR_T string) +{ + if (string) + free (string); +} diff --git a/lib/readline/xmalloc.c b/lib/readline/xmalloc.c index 97d8f2e..5d01d75 100644 --- a/lib/readline/xmalloc.c +++ b/lib/readline/xmalloc.c @@ -1,6 +1,6 @@ /* xmalloc.c -- safe versions of malloc and realloc */ -/* Copyright (C) 1991-2009 Free Software Foundation, Inc. +/* Copyright (C) 1991-2017 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. @@ -42,8 +42,7 @@ /* **************************************************************** */ static void -memory_error_and_abort (fname) - char *fname; +memory_error_and_abort (char *fname) { fprintf (stderr, "%s: out of virtual memory\n", fname); exit (2); @@ -53,8 +52,7 @@ memory_error_and_abort (fname) 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; +xmalloc (size_t bytes) { PTR_T temp; @@ -65,9 +63,7 @@ xmalloc (bytes) } PTR_T -xrealloc (pointer, bytes) - PTR_T pointer; - size_t bytes; +xrealloc (PTR_T pointer, size_t bytes) { PTR_T temp; @@ -77,13 +73,3 @@ xrealloc (pointer, bytes) 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 index f40d7a5..0fb9df9 100644 --- a/lib/readline/xmalloc.h +++ b/lib/readline/xmalloc.h @@ -1,6 +1,6 @@ /* xmalloc.h -- memory allocation that aborts on errors. */ -/* Copyright (C) 1999-2009 Free Software Foundation, Inc. +/* Copyright (C) 1999-2009,2010-2021 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. @@ -38,8 +38,8 @@ #endif /* !PTR_T */ -extern PTR_T xmalloc PARAMS((size_t)); -extern PTR_T xrealloc PARAMS((void *, size_t)); -extern void xfree PARAMS((void *)); +extern PTR_T xmalloc (size_t); +extern PTR_T xrealloc (void *, size_t); +extern void xfree (void *); #endif /* _XMALLOC_H_ */ diff --git a/lib/sh/Makefile.in b/lib/sh/Makefile.in index 80f6cc5..8c42c73 100644 --- a/lib/sh/Makefile.in +++ b/lib/sh/Makefile.in @@ -2,7 +2,7 @@ # Makefile for the Bash library # # -# Copyright (C) 1998-2009 Free Software Foundation, Inc. +# Copyright (C) 1998-2022 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 @@ -26,7 +26,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_VERSION = @PACKAGE_VERSION@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ @@ -57,6 +57,7 @@ SHELL = @MAKE_SHELL@ CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} +STYLE_CFLAGS = @STYLE_CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @@ -67,8 +68,8 @@ 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) +CCFLAGS = ${ADDON_CFLAGS} ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) \ + $(LOCAL_CFLAGS) $(STYLE_CFLAGS) $(CFLAGS) $(CPPFLAGS) GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ -Wcast-align -Wstrict-prototypes -Wconversion \ @@ -91,7 +92,9 @@ CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.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 + casemod.c dprintf.c input_avail.c mbscasecmp.c fnxform.c \ + strchrnul.c unicode.c wcswidth.c wcsnwidth.c shmbchar.c strdup.c \ + strvis.c utf8.c random.c gettimeofday.c timers.c # The header files for this library. HSOURCES = @@ -105,7 +108,8 @@ OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.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} + input_avail.o mbscasecmp.o fnxform.o unicode.o shmbchar.o strvis.o \ + utf8.o random.o gettimeofday.o timers.o wcsnwidth.o ${LIBOBJS} SUPPORT = Makefile @@ -144,7 +148,7 @@ casemod.o: casemod.c clktck.o: clktck.c clock.o: clock.c eaccess.o: eaccess.c -fdprintf.o: fdprintf.c +dprintf.o: dprintf.c fmtullong.o: fmtullong.c fmtulong.o: fmtulong.c fmtumax.o: fmtumax.c @@ -152,12 +156,14 @@ fnxform.o: fnxform.c fpurge.o: fpurge.c getcwd.o: getcwd.c getenv.o: getenv.c +gettimeofday.o: gettimeofday.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 +mbschr.o: mbschr.c mbscmp.o: mbscmp.c memset.o: memset.c mktime.o: mktime.c @@ -166,13 +172,17 @@ netopen.o: netopen.c oslib.o: oslib.c pathcanon.o: pathcanon.c pathphys.o: pathphys.c +random.o: random.c rename.o: rename.c setlinebuf.o: setlinebuf.c +shmatch.o: shmatch.c +shmbchar.o: shmbchar.c shquote.o: shquote.c shtty.o: shtty.c snprintf.o: snprintf.c spell.o: spell.c strcasecmp.o: strcasecmp.c +strchrnul.o: strchrnul.c strerror.o: strerror.c strftime.o: strftime.c strcasestr.o: strcasestr.c @@ -188,14 +198,20 @@ strtoul.o: strtoul.c strtoull.o: strtoull.c strtoumax.o: strtoumax.c strtrans.o: strtrans.c +strvis.o: strvis.c +timers.o: timers.c times.o: times.c timeval.o: timeval.c tmpfile.o: tmpfile.c uconvert.o: uconvert.c ufuncs.o: ufuncs.c +unicode.o: unicode.c +utf8.o: utf8.c vprint.o: vprint.c wcsdup.o: wcsdup.c -mbschr.o: mbschr.c +wcsnwidth.o: wcsnwidth.c +wcswidth.o: wcswidth.c +winsize.o: winsize.c zcatfd.o: zcatfd.c zmapfd.o: zmapfd.c zgetline.o: zgetline.c @@ -214,7 +230,7 @@ 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 +dprintf.o: ${BUILD_DIR}/config.h fmtullong.o: ${BUILD_DIR}/config.h fmtulong.o: ${BUILD_DIR}/config.h fmtumax.o: ${BUILD_DIR}/config.h @@ -222,12 +238,14 @@ fnxform.o: ${BUILD_DIR}/config.h fpurge.o: ${BUILD_DIR}/config.h getcwd.o: ${BUILD_DIR}/config.h getenv.o: ${BUILD_DIR}/config.h +gettimeofday.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 +mbschr.o: ${BUILD_DIR}/config.h mbscmp.o: ${BUILD_DIR}/config.h memset.o: ${BUILD_DIR}/config.h mktime.o: ${BUILD_DIR}/config.h @@ -236,13 +254,17 @@ netopen.o: ${BUILD_DIR}/config.h oslib.o: ${BUILD_DIR}/config.h pathcanon.o: ${BUILD_DIR}/config.h pathphys.o: ${BUILD_DIR}/config.h +random.o: ${BUILD_DIR}/config.h rename.o: ${BUILD_DIR}/config.h setlinebuf.o: ${BUILD_DIR}/config.h +shmatch.o: ${BUILD_DIR}/config.h +shmbchar.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 +strchrnul.o: ${BUILD_DIR}/config.h strerror.o: ${BUILD_DIR}/config.h strftime.o: ${BUILD_DIR}/config.h strcasestr.o: ${BUILD_DIR}/config.h @@ -258,14 +280,20 @@ strtoul.o: ${BUILD_DIR}/config.h strtoull.o: ${BUILD_DIR}/config.h strtoumax.o: ${BUILD_DIR}/config.h strtrans.o: ${BUILD_DIR}/config.h +strvis.o: ${BUILD_DIR}/config.h +timers.o: ${BUILD_DIR}/config.h times.o: ${BUILD_DIR}/config.h timeval.o: ${BUILD_DIR}/config.h -tmpfile.o: ${BUILD_DIR}/config.h +tmpfile.o: ${BUILD_DIR}/config.h ${topdir}/config-top.h uconvert.o: ${BUILD_DIR}/config.h ufuncs.o: ${BUILD_DIR}/config.h +unicode.o: ${BUILD_DIR}/config.h +utf8.o: ${BUILD_DIR}/config.h vprint.o: ${BUILD_DIR}/config.h wcsdup.o: ${BUILD_DIR}/config.h -mbschr.o: ${BUILD_DIR}/config.h +wcsnwidth.o: ${BUILD_DIR}/config.h +wcswidth.o: ${BUILD_DIR}/config.h +winsize.o: ${BUILD_DIR}/config.h zcatfd.o: ${BUILD_DIR}/config.h zgetline.o: ${BUILD_DIR}/config.h zmapfd.o: ${BUILD_DIR}/config.h @@ -286,7 +314,7 @@ 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 +#getenv.o: ${BUILD_DIR}/version.h inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h inet_aton.o: ${BASHINCDIR}/stdc.h @@ -298,7 +326,8 @@ itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir 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 +itos.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#itos.o: ${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 @@ -307,7 +336,8 @@ makepath.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to 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 +makepath.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#makepath.o: ${BUILD_DIR}/version.h netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h netconn.o: ${topdir}/bashtypes.h @@ -319,8 +349,9 @@ netopen.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${top 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: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h netopen.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +#netopen.o: ${BUILD_DIR}/version.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 @@ -329,9 +360,10 @@ oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdi 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: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h oslib.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +#oslib.o: ${BUILD_DIR}/version.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 @@ -340,9 +372,10 @@ pathcanon.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${t 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: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h pathcanon.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h pathcanon.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +#pathcanon.o: ${BUILD_DIR}/version.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 @@ -351,9 +384,14 @@ pathphys.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to 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: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h pathphys.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h pathphys.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +#pathphys.o: ${BUILD_DIR}/version.h + +random.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h +random.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +random.o: ${BASHINCDIR}/filecntl.h rename.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h rename.o: ${BASHINCDIR}/posixstat.h @@ -372,16 +410,29 @@ eaccess.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${top 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 +eaccess.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#eaccess.o: ${BUILD_DIR}/version.h + +shmatch.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h +shmatch.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h +shmatch.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +shmatch.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +shmatch.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +shmatch.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +shmatch.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +shmatch.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +shmatch.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h shquote.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h shquote.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h +shquote.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.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}/shmbutil.h ${BASHINCDIR}/shmbchar.h snprintf.o: ${BASHINCDIR}/typemax.h spell.o: ${topdir}/bashtypes.h @@ -398,7 +449,8 @@ strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to 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 +strerror.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#strerror.o: ${BUILD_DIR}/version.h strcasestr.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h strcasestr.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h @@ -410,7 +462,8 @@ stringlist.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.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 +stringlist.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#stringlist.o: ${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 @@ -419,7 +472,8 @@ stringvec.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${t 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 +stringvec.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +#stringvec.o: ${BUILD_DIR}/version.h strnlen.o: ${BASHINCDIR}/stdc.h @@ -456,18 +510,42 @@ strtrans.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to 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 +strtrans.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h +strtrans.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +#strtrans.o: ${BUILD_DIR}/version.h + +strvis.o: ${topdir}/bashansi.h +strvis.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h +strvis.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h +strvis.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h times.o: ${BASHINCDIR}/systimes.h times.o: ${BASHINCDIR}/posixtime.h timeval.o: ${BASHINCDIR}/posixtime.h +gettimeofday.o: ${BASHINCDIR}/posixtime.h tmpfile.o: ${topdir}/bashtypes.h +tmpfile.o: ${BASHINCDIR}/chartypes.h tmpfile.o: ${BASHINCDIR}/posixstat.h tmpfile.o: ${BASHINCDIR}/filecntl.h +tmpfile.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +tmpfile.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +tmpfile.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +tmpfile.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +tmpfile.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +tmpfile.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +tmpfile.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h uconvert.o: ${topdir}/bashtypes.h +uconvert.o: ${BASHINCDIR}/chartypes.h +uconvert.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +uconvert.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +uconvert.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +uconvert.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +uconvert.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +uconvert.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +uconvert.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ufuncs.o: ${topdir}/bashtypes.h @@ -505,9 +583,15 @@ wcsdup.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h wcsdup.o: ${BASHINCDIR}/stdc.h wcsdup.o: ${topdir}/xmalloc.h +wcsnwidth.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +wcsnwidth.o: ${BASHINCDIR}/stdc.h + +wcswidth.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +wcswidth.o: ${BASHINCDIR}/stdc.h + mbschr.o: ${topdir}/bashansi.h mbschr.o: ${BASHINCDIR}/ansi_stdlib.h -mbschr.o: ${BASHINCDIR}/shmbutil.h +mbschr.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h zgetline.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h zgetline.o: ${BASHINCDIR}/stdc.h @@ -526,10 +610,10 @@ 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: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h casemod.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h -fdprintf.o: ${BASHINCDIR}/stdc.h +dprintf.o: ${BASHINCDIR}/stdc.h input_avail.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h input_avail.o: ${BASHINCDIR}/stdc.h @@ -542,3 +626,32 @@ 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 + +shmbchar.o: ${BASHINCDIR}/shmbchar.h +shmbchar.o: ${BASHINCDIR}/shmbutil.h + +timers.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +timers.o: ${BASHINCDIR}/stdc.h +timers.o: ${topdir}/xmalloc.h ${topdir}/sig.h +timers.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/stat-time.h +timers.o: ${BASHINCDIR}/posixselect.h +timers.o: ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +timers.o: ${BASHINCDIR}/timer.h + +unicode.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +unicode.o: ${BASHINCDIR}/stdc.h +unicode.o: ${topdir}/xmalloc.h + +utf8.o: ${topdir}/bashansi.h +utf8.o: ${BASHINCDIR}/ansi_stdlib.h +utf8.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h + +winsize.o: ${BASHINCDIR}/stdc.h +winsize.o: ${topdir}/xmalloc.h +winsize.o: ${topdir}/bashtypes.h + +zmapfd.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +zmapfd.o: ${BASHINCDIR}/stdc.h +zmapfd.o: ${topdir}/command.h +zmapfd.o: ${topdir}/general.h +zmapfd.o: ${topdir}/bashtypes.h ${BASHINCDIR}/chartypes.h ${topdir}/xmalloc.h diff --git a/lib/sh/casemod.c b/lib/sh/casemod.c index d85549a..0403f91 100644 --- a/lib/sh/casemod.c +++ b/lib/sh/casemod.c @@ -1,6 +1,6 @@ /* casemod.c -- functions to change case of strings */ -/* Copyright (C) 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 2008-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,8 +36,10 @@ #include #include +#include #include #include +#include #include @@ -45,9 +47,9 @@ #define _to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc)) #if !defined (HANDLE_MULTIBYTE) -# define cval(s, i) ((s)[(i)]) +# define cval(s, i, l) ((s)[(i)]) # define iswalnum(c) (isalnum(c)) -# define TOGGLE(x) (ISUPPER (x) ? tolower (x) : (TOUPPER (x))) +# define TOGGLE(x) (ISUPPER (x) ? tolower ((unsigned char)x) : (TOUPPER (x))) #else # define TOGGLE(x) (iswupper (x) ? towlower (x) : (_to_wupper(x))) #endif @@ -65,22 +67,24 @@ #define CASE_USEWORDS 0x1000 /* modify behavior to act on words in passed string */ -extern char *substring __P((char *, int, int)); +extern char *substring PARAMS((char *, int, int)); + +#ifndef UCHAR_MAX +# define UCHAR_MAX TYPE_MAXIMUM(unsigned char) +#endif #if defined (HANDLE_MULTIBYTE) static wchar_t -cval (s, i) +cval (s, i, l) char *s; - int i; + int i, l; { size_t tmp; wchar_t wc; - int l; mbstate_t mps; - if (MB_CUR_MAX == 1) + if (MB_CUR_MAX == 1 || is_basic (s[i])) return ((wchar_t)s[i]); - l = strlen (s); if (i >= (l - 1)) return ((wchar_t)s[i]); memset (&mps, 0, sizeof (mbstate_t)); @@ -99,10 +103,11 @@ sh_modcase (string, pat, flags) char *pat; int flags; { - int start, next, end; + int start, next, end, retind; int inword, c, nc, nop, match, usewords; char *ret, *s; wchar_t wc; + int mb_cur_max; #if defined (HANDLE_MULTIBYTE) wchar_t nwc; char mb[MB_LEN_MAX+1]; @@ -111,15 +116,23 @@ sh_modcase (string, pat, flags) mbstate_t state; #endif + if (string == 0 || *string == 0) + { + ret = (char *)xmalloc (1); + ret[0] = '\0'; + return ret; + } + #if defined (HANDLE_MULTIBYTE) memset (&state, 0, sizeof (mbstate_t)); #endif start = 0; end = strlen (string); + mb_cur_max = MB_CUR_MAX; - ret = (char *)xmalloc (end + 1); - strcpy (ret, string); + ret = (char *)xmalloc (2*end + 1); + retind = 0; /* See if we are supposed to split on alphanumerics and operate on each word */ usewords = (flags & CASE_USEWORDS); @@ -128,24 +141,23 @@ sh_modcase (string, pat, flags) inword = 0; while (start < end) { - wc = cval (ret, start); + wc = cval ((char *)string, start, end); if (iswalnum (wc) == 0) - { - inword = 0; - ADVANCE_CHAR (ret, end, start); - continue; - } + inword = 0; if (pat) { next = start; - ADVANCE_CHAR (ret, end, next); - s = substring (ret, start, next); + ADVANCE_CHAR (string, end, next); + s = substring ((char *)string, start, next); match = strmatch (pat, s, FNM_EXTMATCH) != FNM_NOMATCH; free (s); if (match == 0) { + /* copy unmatched portion */ + memcpy (ret + retind, string + start, next - start); + retind += next - start; start = next; inword = 1; continue; @@ -195,50 +207,65 @@ sh_modcase (string, pat, flags) else nop = flags; - if (MB_CUR_MAX == 1 || isascii (wc)) + /* Can't short-circuit, some locales have multibyte upper and lower + case equivalents of single-byte ascii characters (e.g., Turkish) */ + if (mb_cur_max == 1) { +singlebyte: 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; + { + 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[retind++] = nc; } #if defined (HANDLE_MULTIBYTE) else { m = mbrtowc (&wc, string + start, end - start, &state); + /* Have to go through wide case conversion even for single-byte + chars, to accommodate single-byte characters where the + corresponding upper or lower case equivalent is multibyte. */ if (MB_INVALIDCH (m)) - wc = (wchar_t)string[start]; + { + wc = (unsigned char)string[start]; + goto singlebyte; + } 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 */ + { + default: + case CASE_NOOP: nwc = wc; break; + case CASE_UPPER: nwc = _to_wupper (wc); break; + case CASE_LOWER: nwc = _to_wlower (wc); break; + case CASE_TOGGLEALL: + case CASE_TOGGLE: nwc = TOGGLE (wc); break; + } + + /* We don't have to convert `wide' characters that are in the + unsigned char range back to single-byte `multibyte' characters. */ + if ((int)nwc <= UCHAR_MAX && is_basic ((int)nwc)) + ret[retind++] = nwc; + else { mlen = wcrtomb (mb, nwc, &state); if (mlen > 0) mb[mlen] = '\0'; - /* Assume the same width */ - strncpy (ret + start, mb, mlen); + /* Don't assume the same width */ + strncpy (ret + retind, mb, mlen); + retind += mlen; } } #endif - /* This assumes that the upper and lower case versions are the same width. */ - ADVANCE_CHAR (ret, end, start); + ADVANCE_CHAR (string, end, start); } + ret[retind] = '\0'; return ret; } diff --git a/lib/sh/clktck.c b/lib/sh/clktck.c index 096ce06..8b9b5b3 100644 --- a/lib/sh/clktck.c +++ b/lib/sh/clktck.c @@ -21,7 +21,9 @@ #include #include -#include +#if defined (HAVE_SYS_PARAM_H) +# include +#endif #if defined (HAVE_UNISTD_H) # include diff --git a/lib/sh/clock.c b/lib/sh/clock.c index 84cdbc5..c6c52bf 100644 --- a/lib/sh/clock.c +++ b/lib/sh/clock.c @@ -32,7 +32,13 @@ #include #include -extern long get_clk_tck __P((void)); +#include + +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#endif + +extern long get_clk_tck PARAMS((void)); void clock_t_to_secs (t, sp, sfp) @@ -76,6 +82,6 @@ print_clock_t (fp, t) minutes = timestamp / 60; seconds = timestamp % 60; - fprintf (fp, "%ldm%d.%03ds", minutes, seconds, seconds_fraction); + fprintf (fp, "%ldm%d%c%03ds", minutes, seconds, locale_decpoint(), seconds_fraction); } #endif /* HAVE_TIMES */ diff --git a/lib/sh/fdprintf.c b/lib/sh/dprintf.c similarity index 88% rename from lib/sh/fdprintf.c rename to lib/sh/dprintf.c index 27d3a4b..b3b5d64 100644 --- a/lib/sh/fdprintf.c +++ b/lib/sh/dprintf.c @@ -1,6 +1,6 @@ -/* fdprintf -- printf to a file descriptor */ +/* dprintf -- printf to a file descriptor */ -/* Copyright (C) 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 2008-2010 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,9 +38,9 @@ int #if defined (PREFER_STDARG) -fdprintf(int fd, const char *format, ...) +dprintf(int fd, const char *format, ...) #else -fdprintf(fd, format, va_alist) +dprintf(fd, format, va_alist) int fd; const char *format; va_dcl diff --git a/lib/sh/eaccess.c b/lib/sh/eaccess.c index 989bc22..c3043ec 100644 --- a/lib/sh/eaccess.c +++ b/lib/sh/eaccess.c @@ -1,6 +1,6 @@ /* eaccess.c - eaccess replacement for the shell, plus other access functions. */ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,10 +52,10 @@ extern int errno; #define F_OK 0 #endif /* R_OK */ -static int path_is_devfd __P((const char *)); -static int sh_stataccess __P((char *, int)); +static int path_is_devfd PARAMS((const char *)); +static int sh_stataccess PARAMS((const char *, int)); #if HAVE_DECL_SETREGID -static int sh_euidaccess __P((char *, int)); +static int sh_euidaccess PARAMS((const char *, int)); #endif static int @@ -82,6 +82,8 @@ sh_stat (path, finfo) const char *path; struct stat *finfo; { + static char *pbuf = 0; + if (*path == '\0') { errno = ENOENT; @@ -89,7 +91,9 @@ sh_stat (path, finfo) } if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0) { -#if !defined (HAVE_DEV_FD) + /* If stating /dev/fd/n doesn't produce the same results as fstat of + FD N, then define DEV_FD_STAT_BROKEN */ +#if !defined (HAVE_DEV_FD) || defined (DEV_FD_STAT_BROKEN) intmax_t fd; int r; @@ -106,7 +110,7 @@ sh_stat (path, finfo) 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]; + pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8)); strcpy (pbuf, DEV_FD_PREFIX); strcat (pbuf, path + 8); return (stat (pbuf, finfo)); @@ -133,7 +137,7 @@ sh_stat (path, finfo) executable. This version uses stat(2). */ static int sh_stataccess (path, mode) - char *path; + const char *path; int mode; { struct stat st; @@ -170,7 +174,7 @@ sh_stataccess (path, mode) the effective and real uid and gid as appropriate. */ static int sh_euidaccess (path, mode) - char *path; + const char *path; int mode; { int r, e; @@ -195,14 +199,25 @@ sh_euidaccess (path, mode) int sh_eaccess (path, mode) - char *path; + const char *path; int mode; { + int ret; + if (path_is_devfd (path)) return (sh_stataccess (path, mode)); -#if defined (HAVE_EACCESS) /* FreeBSD */ - return (eaccess (path, mode)); +#if (defined (HAVE_FACCESSAT) && defined (AT_EACCESS)) || defined (HAVE_EACCESS) +# if defined (HAVE_FACCESSAT) && defined (AT_EACCESS) + ret = faccessat (AT_FDCWD, path, mode, AT_EACCESS); +# else /* HAVE_EACCESS */ /* FreeBSD */ + ret = eaccess (path, mode); /* XXX -- not always correct for X_OK */ +# endif /* HAVE_EACCESS */ +# if defined (__FreeBSD__) || defined (SOLARIS) || defined (_AIX) + if (ret == 0 && current_user.euid == 0 && mode == X_OK) + return (sh_stataccess (path, mode)); +# endif /* __FreeBSD__ || SOLARIS || _AIX */ + return ret; #elif defined (EFF_ONLY_OK) /* SVR4(?), SVR4.2 */ return access (path, mode|EFF_ONLY_OK); #else @@ -215,7 +230,14 @@ sh_eaccess (path, mode) # endif if (current_user.uid == current_user.euid && current_user.gid == current_user.egid) - return (access (path, mode)); + { + ret = access (path, mode); +#if defined (__FreeBSD__) || defined (SOLARIS) + if (ret == 0 && current_user.euid == 0 && mode == X_OK) + return (sh_stataccess (path, mode)); +#endif + return ret; + } return (sh_stataccess (path, mode)); #endif diff --git a/lib/sh/fmtullong.c b/lib/sh/fmtullong.c index 97a1dc1..46eaf50 100644 --- a/lib/sh/fmtullong.c +++ b/lib/sh/fmtullong.c @@ -20,7 +20,7 @@ #include -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT #define LONG long long #define UNSIGNED_LONG unsigned long long diff --git a/lib/sh/fmtulong.c b/lib/sh/fmtulong.c index 214b146..0ccc22b 100644 --- a/lib/sh/fmtulong.c +++ b/lib/sh/fmtulong.c @@ -1,6 +1,6 @@ /* fmtulong.c -- Convert unsigned long int to string. */ -/* Copyright (C) 1998-2002 Free Software Foundation, Inc. +/* Copyright (C) 1998-2011 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -98,8 +98,9 @@ fmtulong (ui, base, buf, len, flags) if (base < 2 || base > 64) { #if 1 + /* XXX - truncation possible with long translation */ strncpy (buf, _("invalid base"), len - 1); - buf[len] = '\0'; + buf[len-1] = '\0'; errno = EINVAL; return (p = buf); #else diff --git a/lib/sh/fnxform.c b/lib/sh/fnxform.c index d95274f..35d7e73 100644 --- a/lib/sh/fnxform.c +++ b/lib/sh/fnxform.c @@ -1,6 +1,6 @@ /* fnxform - use iconv(3) to transform strings to and from "filename" format */ -/* Copyright (C) 2009 Free Software Foundation, Inc. +/* Copyright (C) 2009-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,9 +35,9 @@ #endif #if defined (HAVE_LOCALE_CHARSET) -extern const char *locale_charset __P((void)); +extern const char *locale_charset PARAMS((void)); #else -extern char *get_locale_var __P((char *)); +extern char *get_locale_var PARAMS((char *)); #endif #if defined (HAVE_ICONV) @@ -49,9 +49,9 @@ static iconv_t conv_tofs = (iconv_t)-1; 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 PARAMS((void)); +static void init_tofs PARAMS((void)); +static void init_fromfs PARAMS((void)); static char * curencoding () @@ -72,7 +72,7 @@ curencoding () mod = strchr (dot, '@'); if (mod) *mod = '\0'; - return dot; + return ++dot; #endif } diff --git a/lib/sh/fpurge.c b/lib/sh/fpurge.c index f9e1b9d..8cd4e36 100644 --- a/lib/sh/fpurge.c +++ b/lib/sh/fpurge.c @@ -1,6 +1,6 @@ /* fpurge - Flushing buffers of a FILE stream. */ -/* Copyright (C) 2007 Free Software Foundation, Inc. +/* Copyright (C) 2007-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -29,13 +29,97 @@ #if HAVE_FPURGE # define fpurge _bash_fpurge #endif -extern int fpurge __P((FILE *stream)); +extern int fpurge PARAMS((FILE *stream)); #if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ # include #endif #include +/* Inline contents of gnulib:stdio-impl.h */ + +/* Many stdio implementations have the same logic and therefore can share + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + +/* BSD stdio derived implementations. */ + +#if defined __NetBSD__ /* NetBSD */ +/* Get __NetBSD_Version__. */ +# include +#endif + +#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ + +# if defined __DragonFly__ /* DragonFly */ + /* See . */ +# define fp_ ((struct { struct __FILE_public pub; \ + struct { unsigned char *_base; int _size; } _bf; \ + void *cookie; \ + void *_close; \ + void *_read; \ + void *_seek; \ + void *_write; \ + struct { unsigned char *_base; int _size; } _ub; \ + int _ur; \ + unsigned char _ubuf[3]; \ + unsigned char _nbuf[1]; \ + struct { unsigned char *_base; int _size; } _lb; \ + int _blksize; \ + fpos_t _offset; \ + /* More fields, not relevant here. */ \ + } *) fp) + /* See . */ +# define _p pub._p +# define _flags pub._flags +# define _r pub._r +# define _w pub._w +# else +# define fp_ fp +# endif + +# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ + /* See + and */ + struct __sfileext + { + struct __sbuf _ub; /* ungetc buffer */ + /* More fields, not relevant here. */ + }; +# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub +# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */ +# define fp_ub fp_->_ub +# endif + +# define HASUB(fp) (fp_ub._base != NULL) + +#endif + +/* SystemV derived implementations. */ + +#if defined _IOERR + +# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ +# define fp_ ((struct { unsigned char *_ptr; \ + unsigned char *_base; \ + unsigned char *_end; \ + long _cnt; \ + int _file; \ + unsigned int _flag; \ + } *) fp) +# else +# define fp_ fp +# endif + +# if defined _SCO_DS /* OpenServer */ +# define _cnt __cnt +# define _ptr __ptr +# define _base __base +# define _flag __flag +# endif + +#endif + int fpurge (FILE *fp) { @@ -45,7 +129,7 @@ fpurge (FILE *fp) /* The __fpurge function does not have a return value. */ return 0; -#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X */ +#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */ /* Call the system's fpurge function. */ # undef fpurge @@ -59,10 +143,10 @@ fpurge (FILE *fp) 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 + currently reading, 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; + if ((fp_->_flags & __SRD) != 0) + fp_->_w = 0; # endif return result; @@ -101,7 +185,7 @@ fpurge (FILE *fp) fp->_wcount = 0; fp->_ungetc_count = 0; return 0; -# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */ +# elif defined _IOERR || defined __TANDEM /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */ fp->_ptr = fp->_base; if (fp->_ptr != NULL) fp->_cnt = 0; diff --git a/lib/sh/getcwd.c b/lib/sh/getcwd.c index 07eb817..d7bd241 100644 --- a/lib/sh/getcwd.c +++ b/lib/sh/getcwd.c @@ -48,7 +48,7 @@ #include -#if defined (BROKEN_DIRENT_D_INO) +#if !defined (D_FILENO_AVAILABLE) # include "command.h" # include "general.h" # include "externs.h" @@ -71,7 +71,7 @@ extern int errno; /* 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) +#if !defined (D_FILENO_AVAILABLE) static int _path_checkino (dotp, name, thisino) char *dotp; @@ -206,7 +206,7 @@ getcwd (buf, size) (d->d_name[1] == '\0' || (d->d_name[1] == '.' && d->d_name[2] == '\0'))) continue; -#if !defined (BROKEN_DIRENT_D_INO) +#if defined (D_FILENO_AVAILABLE) if (mount_point || d->d_fileno == thisino) #else if (mount_point || _path_checkino (dotp, d->d_name, thisino)) diff --git a/lib/sh/getenv.c b/lib/sh/getenv.c index 8b5e340..1e682ae 100644 --- a/lib/sh/getenv.c +++ b/lib/sh/getenv.c @@ -69,7 +69,7 @@ getenv (name) if (var && exported_p (var)) return (value_cell (var)); } - else + else if (environ) { register int i, len; diff --git a/lib/sh/gettimeofday.c b/lib/sh/gettimeofday.c new file mode 100644 index 0000000..b654c15 --- /dev/null +++ b/lib/sh/gettimeofday.c @@ -0,0 +1,35 @@ +/* gettimeofday.c - gettimeofday replacement using time() */ + +/* Copyright (C) 2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include "config.h" + +#if !defined (HAVE_GETTIMEOFDAY) + +#include "posixtime.h" + +/* A version of gettimeofday that just sets tv_sec from time(3) */ +int +gettimeofday (struct timeval *tv, void *tz) +{ + tv->tv_sec = (time_t) time ((time_t *)0); + tv->tv_usec = 0; + return 0; +} +#endif diff --git a/lib/sh/inet_aton.c b/lib/sh/inet_aton.c index 4b48456..e377178 100644 --- a/lib/sh/inet_aton.c +++ b/lib/sh/inet_aton.c @@ -67,7 +67,9 @@ static char rcsid[] = "$Id: inet_addr.c,v 1.5 1996/08/14 03:48:37 drepper Exp $" #if !defined (HAVE_INET_ATON) && defined (HAVE_NETWORK) && defined (HAVE_NETINET_IN_H) && defined (HAVE_ARPA_INET_H) #include +#if defined (HAVE_SYS_PARAM_H) #include +#endif #include #include diff --git a/lib/sh/input_avail.c b/lib/sh/input_avail.c index ac157a9..9110bfb 100644 --- a/lib/sh/input_avail.c +++ b/lib/sh/input_avail.c @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 2008,2009-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -33,6 +33,8 @@ # include #endif /* HAVE_SYS_FILE_H */ +#include + #if defined (HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ @@ -82,10 +84,8 @@ input_avail (fd) 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); @@ -96,3 +96,64 @@ input_avail (fd) return 0; } + +/* Wait until NCHARS are available for reading on file descriptor FD. + This can wait indefinitely. Return -1 on error. */ +int +nchars_avail (fd, nchars) + int fd; + int nchars; +{ + int result, chars_avail; +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + fd_set readfds, exceptfds; + sigset_t set, oset; +#endif + + if (fd < 0 || nchars < 0) + return -1; + if (nchars == 0) + return (input_avail (fd)); + + chars_avail = 0; + +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + FD_ZERO (&readfds); + FD_ZERO (&exceptfds); + FD_SET (fd, &readfds); + FD_SET (fd, &exceptfds); + sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); +# ifdef SIGCHLD + sigaddset (&set, SIGCHLD); +# endif + sigemptyset (&oset); +#endif + + while (1) + { + result = 0; +#if defined (HAVE_PSELECT) + /* XXX - use pselect(2) to block SIGCHLD atomically */ + result = pselect (fd + 1, &readfds, (fd_set *)NULL, &exceptfds, (struct timespec *)NULL, &set); +#elif defined (HAVE_SELECT) + sigprocmask (SIG_BLOCK, &set, &oset); + result = select (fd + 1, &readfds, (fd_set *)NULL, &exceptfds, (struct timeval *)NULL); + sigprocmask (SIG_BLOCK, &oset, (sigset_t *)NULL); +#endif + if (result < 0) + return -1; + +#if defined (FIONREAD) + errno = 0; + result = ioctl (fd, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; + if (chars_avail >= nchars) + break; +#else + break; +#endif + } + + return 0; +} diff --git a/lib/sh/itos.c b/lib/sh/itos.c index 12e9398..cd36ef3 100644 --- a/lib/sh/itos.c +++ b/lib/sh/itos.c @@ -50,6 +50,18 @@ itos (i) return (savestring (p)); } +/* Integer to string conversion. This conses the string using strdup; + caller should free it and be prepared to deal with NULL return. */ +char * +mitos (i) + intmax_t i; +{ + char *p, lbuf[INT_STRLEN_BOUND(intmax_t) + 1]; + + p = fmtumax (i, 10, lbuf, sizeof(lbuf), 0); + return (strdup (p)); +} + char * uinttostr (i, buf, len) uintmax_t i; diff --git a/lib/sh/mailstat.c b/lib/sh/mailstat.c index 2b2ac0e..bd5c25f 100644 --- a/lib/sh/mailstat.c +++ b/lib/sh/mailstat.c @@ -28,7 +28,7 @@ #include #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif @@ -60,7 +60,7 @@ mailstat(path, st) struct stat st_ret, st_tmp; DIR *dd; struct dirent *fn; - char dir[PATH_MAX * 2], file[PATH_MAX * 2]; + char dir[PATH_MAX * 2], file[PATH_MAX * 2 + 1]; int i, l; time_t atime, mtime; diff --git a/lib/sh/makepath.c b/lib/sh/makepath.c index 43dbab2..ab46c96 100644 --- a/lib/sh/makepath.c +++ b/lib/sh/makepath.c @@ -1,6 +1,6 @@ /* makepath.c - glue PATH and DIR together into a full pathname. */ -/* Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,7 +45,7 @@ # define MP_IGNDOT 0x08 #endif -extern char *get_working_directory __P((char *)); +extern char *get_working_directory PARAMS((char *)); static char *nullpath = ""; @@ -94,7 +94,7 @@ sh_makepath (path, dir, flags) MAKEDOT(); } else if ((flags & MP_IGNDOT) && path[0] == '.' && (path[1] == '\0' || - path[1] == '/' && path[2] == '\0')) + (path[1] == '/' && path[2] == '\0'))) { xpath = nullpath; pathlen = 0; diff --git a/lib/sh/mbscasecmp.c b/lib/sh/mbscasecmp.c index 3828164..0ab9560 100644 --- a/lib/sh/mbscasecmp.c +++ b/lib/sh/mbscasecmp.c @@ -1,6 +1,6 @@ /* mbscasecmp - case-insensitive multibyte string comparison. */ -/* Copyright (C) 2009 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,17 +35,18 @@ mbscasecmp (mbs1, mbs2) const char *mbs1; const char *mbs2; { - int len1, len2; + int len1, len2, mb_cur_max; wchar_t c1, c2, l1, l2; len1 = len2 = 0; /* Reset multibyte characters to their initial state. */ (void) mblen ((char *) NULL, 0); + mb_cur_max = MB_CUR_MAX; do { - len1 = mbtowc (&c1, mbs1, MB_CUR_MAX); - len2 = mbtowc (&c2, mbs2, MB_CUR_MAX); + len1 = mbtowc (&c1, mbs1, mb_cur_max); + len2 = mbtowc (&c2, mbs2, mb_cur_max); if (len1 == 0) return len2 == 0 ? 0 : -1; diff --git a/lib/sh/mbschr.c b/lib/sh/mbschr.c index 5143d64..639962d 100644 --- a/lib/sh/mbschr.c +++ b/lib/sh/mbschr.c @@ -27,8 +27,13 @@ #include "bashansi.h" #include "shmbutil.h" +extern int locale_mb_cur_max; +extern int locale_utf8locale; + #undef mbschr +extern char *utf8_mbschr (const char *, int); /* XXX */ + /* 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. */ @@ -47,11 +52,14 @@ mbschr (s, c) mbstate_t state; size_t strlength, mblength; + if (locale_utf8locale && c < 0x80) + return (utf8_mbschr (s, c)); /* XXX */ + /* 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) + if ((unsigned char)c >= '0' && locale_mb_cur_max > 1) { pos = (char *)s; memset (&state, '\0', sizeof(mbstate_t)); @@ -59,9 +67,14 @@ mbschr (s, c) while (strlength > 0) { - mblength = mbrlen (pos, strlength, &state); - if (mblength == (size_t)-2 || mblength == (size_t)-1 || mblength == (size_t)0) + if (is_basic (*pos)) mblength = 1; + else + { + 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; diff --git a/lib/sh/mbscmp.c b/lib/sh/mbscmp.c index e0eae5d..c7c8443 100644 --- a/lib/sh/mbscmp.c +++ b/lib/sh/mbscmp.c @@ -1,6 +1,6 @@ /* mbscmp - multibyte string comparison. */ -/* Copyright (C) 1995 Free Software Foundation, Inc. +/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,23 +26,28 @@ #include #include +extern int locale_utf8locale; + +extern int utf8_mbscmp (const char *, const char *); + /* Compare MBS1 and MBS2. */ int mbscmp (mbs1, mbs2) const char *mbs1; const char *mbs2; { - int len1, len2; + int len1, len2, mb_cur_max; wchar_t c1, c2; len1 = len2 = 0; /* Reset multibyte characters to their initial state. */ (void) mblen ((char *) NULL, 0); + mb_cur_max = MB_CUR_MAX; do { - len1 = mbtowc (&c1, mbs1, MB_CUR_MAX); - len2 = mbtowc (&c2, mbs2, MB_CUR_MAX); + len1 = mbtowc (&c1, mbs1, mb_cur_max); + len2 = mbtowc (&c2, mbs2, mb_cur_max); if (len1 == 0) return len2 == 0 ? 0 : -1; diff --git a/lib/sh/mktime.c b/lib/sh/mktime.c index 7257400..9ee675b 100644 --- a/lib/sh/mktime.c +++ b/lib/sh/mktime.c @@ -1,6 +1,6 @@ /* mktime - convert struct tm to a time_t value */ -/* Copyright (C) 1993-2002 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Contributed by Paul Eggert (eggert@twinsun.com). @@ -41,8 +41,6 @@ #ifndef VMS #include /* Some systems define `time_t' here. */ -#else -#include #endif #include @@ -52,19 +50,19 @@ #include "bashansi.h" -#if DEBUG +#if DEBUG_MKTIME #include /* Make it work even if the system's libc has its own mktime routine. */ #define mktime my_mktime -#endif /* DEBUG */ +#endif /* DEBUG_MKTIME */ -#ifndef __P +#ifndef PARAMS #if defined (__GNUC__) || (defined (__STDC__) && __STDC__) -#define __P(args) args +#define PARAMS(args) args #else -#define __P(args) () +#define PARAMS(args) () #endif /* GCC. */ -#endif /* Not __P. */ +#endif /* Not PARAMS. */ #ifndef CHAR_BIT #define CHAR_BIT 8 @@ -77,12 +75,27 @@ #define INT_MAX (~0 - INT_MIN) #endif +/* True if the arithmetic type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* The maximum and minimum values for the integer type T. These + macros have undefined behavior if T is signed and has padding bits. + If this is a problem for you, please let us know how to fix it for + your host. */ +#define TYPE_MINIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) 0 \ + : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + #ifndef TIME_T_MIN -#define TIME_T_MIN (0 < (time_t) -1 ? (time_t) 0 \ - : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1)) +# define TIME_T_MIN TYPE_MINIMUM (time_t) #endif #ifndef TIME_T_MAX -#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) +# define TIME_T_MAX TYPE_MAXIMUM (time_t) #endif #define TM_YEAR_BASE 1900 @@ -104,13 +117,13 @@ const unsigned short int __mon_yday[2][13] = { 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 *, +static time_t ydhms_tm_diff PARAMS ((int, int, int, int, int, const struct tm *)); +time_t __mktime_internal PARAMS ((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 PARAMS ((const time_t *, struct tm *)); static struct tm * my_localtime_r (t, tp) const time_t *t; @@ -180,7 +193,7 @@ mktime (tp) time_t __mktime_internal (tp, convert, offset) struct tm *tp; - struct tm *(*convert) __P ((const time_t *, struct tm *)); + struct tm *(*convert) PARAMS ((const time_t *, struct tm *)); time_t *offset; { time_t t, dt, t0; @@ -305,7 +318,7 @@ __mktime_internal (tp, convert, offset) weak_alias (mktime, timelocal) #endif -#if DEBUG +#if DEBUG_MKTIME static int not_equal_tm (a, b) @@ -416,7 +429,7 @@ main (argc, argv) return status; } -#endif /* DEBUG */ +#endif /* DEBUG_MKTIME */ /* Local Variables: diff --git a/lib/sh/netconn.c b/lib/sh/netconn.c index 36e5bf5..e20f104 100644 --- a/lib/sh/netconn.c +++ b/lib/sh/netconn.c @@ -44,7 +44,7 @@ int isnetconn (fd) int fd; { -#if defined (HAVE_GETPEERNAME) && !defined (SVR4_2) && !defined (__BEOS__) +#if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && !defined (SVR4_2) && !defined (__BEOS__) int rv; socklen_t l; struct sockaddr sa; @@ -52,7 +52,7 @@ isnetconn (fd) 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); + return ((rv < 0 && (errno == ENOTSOCK || errno == ENOTCONN || errno == EINVAL || errno == EBADF)) ? 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. */ diff --git a/lib/sh/netopen.c b/lib/sh/netopen.c index 736d413..ee0baf6 100644 --- a/lib/sh/netopen.c +++ b/lib/sh/netopen.c @@ -5,7 +5,7 @@ * chet@ins.CWRU.Edu */ -/* Copyright (C) 1987-2002 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -63,18 +63,18 @@ extern int errno; #endif #if !defined (HAVE_INET_ATON) -extern int inet_aton __P((const char *, struct in_addr *)); +extern int inet_aton PARAMS((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)); +static int _getaddr PARAMS((char *, struct in_addr *)); +static int _getserv PARAMS((char *, int, unsigned short *)); +static int _netopen4 PARAMS((char *, char *, int)); #else /* HAVE_GETADDRINFO */ -static int _netopen6 __P((char *, char *, int)); +static int _netopen6 PARAMS((char *, char *, int)); #endif -static int _netopen __P((char *, char *, int)); +static int _netopen PARAMS((char *, char *, int)); #ifndef HAVE_GETADDRINFO /* Stuff the internet address corresponding to HOST into AP, in network @@ -304,6 +304,7 @@ netopen (path) if (t == 0) { internal_error (_("%s: bad network path specification"), path); + free (np); return -1; } *t++ = '\0'; diff --git a/lib/sh/oslib.c b/lib/sh/oslib.c index d47f9dc..edc5c6f 100644 --- a/lib/sh/oslib.c +++ b/lib/sh/oslib.c @@ -1,6 +1,6 @@ /* oslib.c - functions present only in some unix versions. */ -/* Copyright (C) 1995 Free Software Foundation, Inc. +/* Copyright (C) 1995,2010 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,7 +21,7 @@ #include #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif @@ -37,6 +37,10 @@ #include #include +#if !defined (HAVE_KILLPG) +# include +#endif + #include #include #include @@ -120,7 +124,7 @@ dup2 (fd1, fd2) /* * Return the total number of available file descriptors. * - * On some systems, like 4.2BSD and its descendents, there is a system call + * On some systems, like 4.2BSD and its descendants, 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. * @@ -163,8 +167,8 @@ getdtablesize () # endif void bcopy (s,d,n) - char *d, *s; - int n; + void *d, *s; + size_t n; { FASTCOPY (s, d, n); } @@ -176,8 +180,8 @@ bcopy (s,d,n) # endif void bzero (s, n) - char *s; - int n; + void *s; + size_t n; { register int i; register char *r; @@ -193,7 +197,7 @@ bzero (s, n) int gethostname (name, namelen) char *name; - int namelen; + size_t namelen; { int i; struct utsname ut; @@ -209,7 +213,8 @@ gethostname (name, namelen) # else /* !HAVE_UNAME */ int gethostname (name, namelen) - int name, namelen; + char *name; + size_t namelen; { strncpy (name, "unknown", namelen); name[namelen] = '\0'; @@ -232,7 +237,7 @@ killpg (pgrp, sig) int mkfifo (path, mode) char *path; - int mode; + mode_t mode; { #if defined (S_IFIFO) return (mknod (path, (mode | S_IFIFO), 0)); diff --git a/lib/sh/pathcanon.c b/lib/sh/pathcanon.c index 98e41ce..7d0df9f 100644 --- a/lib/sh/pathcanon.c +++ b/lib/sh/pathcanon.c @@ -21,7 +21,7 @@ #include #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif #include @@ -90,7 +90,7 @@ _path_isdir (path) /* Canonicalize PATH, and return a new path. The new path differs from PATH in that: - Multple `/'s are collapsed to a single `/'. + Multiple `/'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 @@ -227,7 +227,7 @@ sh_canonpath (path, flags) if (result[2] == '\0') /* short-circuit for bare `//' */ result[1] = '\0'; else - strcpy (result, result + 1); + memmove (result, result + 1, strlen (result + 1) + 1); } return (result); diff --git a/lib/sh/pathphys.c b/lib/sh/pathphys.c index 15fcd25..95b72f1 100644 --- a/lib/sh/pathphys.c +++ b/lib/sh/pathphys.c @@ -1,6 +1,6 @@ /* pathphys.c -- return pathname with all symlinks expanded. */ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,7 +21,7 @@ #include #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif #include @@ -46,7 +46,7 @@ extern int errno; #endif /* !errno */ -extern char *get_working_directory __P((char *)); +extern char *get_working_directory PARAMS((char *)); static int _path_readlink (path, buf, bufsiz) @@ -245,7 +245,7 @@ sh_physpath (path, flags) if (result[2] == '\0') /* short-circuit for bare `//' */ result[1] = '\0'; else - strcpy (result, result + 1); + memmove (result, result + 1, strlen (result + 1) + 1); } return (result); @@ -269,7 +269,7 @@ sh_realpath (pathname, resolved) wd = get_working_directory ("sh_realpath"); if (wd == 0) return ((char *)NULL); - tdir = sh_makepath ((char *)pathname, wd, 0); + tdir = sh_makepath (wd, (char *)pathname, 0); free (wd); } else diff --git a/lib/sh/random.c b/lib/sh/random.c new file mode 100644 index 0000000..1eaa71a --- /dev/null +++ b/lib/sh/random.c @@ -0,0 +1,240 @@ +/* random.c -- Functions for managing 16-bit and 32-bit random numbers. */ + +/* Copyright (C) 2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" + +#if defined (HAVE_SYS_RANDOM_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif +#include "filecntl.h" + +#include +#include "bashansi.h" + +#include "shell.h" + +extern time_t shell_start_time; + +extern int last_random_value; + +static u_bits32_t intrand32 PARAMS((u_bits32_t)); +static u_bits32_t genseed PARAMS((void)); + +static u_bits32_t brand32 PARAMS((void)); +static void sbrand32 PARAMS((u_bits32_t)); +static void perturb_rand32 PARAMS((void)); + +/* The random number seed. You can change this by setting RANDOM. */ +static u_bits32_t rseed = 1; + +/* Returns a 32-bit pseudo-random number. */ +static u_bits32_t +intrand32 (last) + u_bits32_t last; +{ + /* Minimal Standard generator 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. + + x(n+1) = 16807 * x(n) mod (m). + + We split up the calculations to avoid overflow. + + h = last / q; l = x - h * q; t = a * l - h * r + m = 2147483647, a = 16807, q = 127773, r = 2836 + + There are lots of other combinations of constants to use; look at + https://www.gnu.org/software/gsl/manual/html_node/Other-random-number-generators.html#Other-random-number-generators */ + + bits32_t h, l, t; + u_bits32_t ret; + + /* Can't seed with 0. */ + ret = (last == 0) ? 123459876 : last; + h = ret / 127773; + l = ret - (127773 * h); + t = 16807 * l - 2836 * h; + ret = (t < 0) ? t + 0x7fffffff : t; + + return (ret); +} + +static u_bits32_t +genseed () +{ + struct timeval tv; + u_bits32_t iv; + + gettimeofday (&tv, NULL); + iv = (u_bits32_t)seedrand; /* let the compiler truncate */ + iv = tv.tv_sec ^ tv.tv_usec ^ getpid () ^ getppid () ^ current_user.uid ^ iv; + return (iv); +} + +#define BASH_RAND_MAX 32767 /* 0x7fff - 16 bits */ + +/* Returns a pseudo-random number between 0 and 32767. */ +int +brand () +{ + unsigned int ret; + + rseed = intrand32 (rseed); + if (shell_compatibility_level > 50) + ret = (rseed >> 16) ^ (rseed & 65535); + else + ret = rseed; + return (ret & BASH_RAND_MAX); +} + +/* Set the random number generator seed to SEED. */ +void +sbrand (seed) + unsigned long seed; +{ + rseed = seed; + last_random_value = 0; +} + +void +seedrand () +{ + u_bits32_t iv; + + iv = genseed (); + sbrand (iv); +} + +static u_bits32_t rseed32 = 1073741823; +static int last_rand32; + +static int urandfd = -1; + +#define BASH_RAND32_MAX 0x7fffffff /* 32 bits */ + +/* Returns a 32-bit pseudo-random number between 0 and 4294967295. */ +static u_bits32_t +brand32 () +{ + u_bits32_t ret; + + rseed32 = intrand32 (rseed32); + return (rseed32 & BASH_RAND32_MAX); +} + +static void +sbrand32 (seed) + u_bits32_t seed; +{ + last_rand32 = rseed32 = seed; +} + +void +seedrand32 () +{ + u_bits32_t iv; + + iv = genseed (); + sbrand32 (iv); +} + +static void +perturb_rand32 () +{ + rseed32 ^= genseed (); +} + +/* Force another attempt to open /dev/urandom on the next call to get_urandom32 */ +void +urandom_close () +{ + if (urandfd >= 0) + close (urandfd); + urandfd = -1; +} + +#if !defined (HAVE_GETRANDOM) +/* Imperfect emulation of getrandom(2). */ +#ifndef GRND_NONBLOCK +# define GRND_NONBLOCK 1 +# define GRND_RANDOM 2 +#endif + +static ssize_t +getrandom (buf, len, flags) + void *buf; + size_t len; + unsigned int flags; +{ + int oflags; + ssize_t r; + static int urand_unavail = 0; + +#if HAVE_GETENTROPY + r = getentropy (buf, len); + return (r == 0) ? len : -1; +#endif + + if (urandfd == -1 && urand_unavail == 0) + { + oflags = O_RDONLY; + if (flags & GRND_NONBLOCK) + oflags |= O_NONBLOCK; + urandfd = open ("/dev/urandom", oflags, 0); + if (urandfd >= 0) + SET_CLOSE_ON_EXEC (urandfd); + else + { + urand_unavail = 1; + return -1; + } + } + if (urandfd >= 0 && (r = read (urandfd, buf, len)) == len) + return (r); + return -1; +} +#endif + +u_bits32_t +get_urandom32 () +{ + u_bits32_t ret; + + if (getrandom ((void *)&ret, sizeof (ret), GRND_NONBLOCK) == sizeof (ret)) + return (last_rand32 = ret); + +#if defined (HAVE_ARC4RANDOM) + ret = arc4random (); +#else + if (subshell_environment) + perturb_rand32 (); + do + ret = brand32 (); + while (ret == last_rand32); +#endif + return (last_rand32 = ret); +} diff --git a/lib/sh/setlinebuf.c b/lib/sh/setlinebuf.c index 6473ddf..dd76e9f 100644 --- a/lib/sh/setlinebuf.c +++ b/lib/sh/setlinebuf.c @@ -1,6 +1,6 @@ /* setlinebuf.c - line-buffer a stdio stream. */ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997,2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,36 +25,39 @@ #include #if defined (USING_BASH_MALLOC) -# define LBUF_BUFSIZE 1008 +# define LBUF_BUFSIZE 2016 #else # define LBUF_BUFSIZE BUFSIZ #endif +static char *stdoutbuf = 0; +static char *stderrbuf = 0; + /* 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 (HAVE_SETVBUF) + char *local_linebuf; + #if defined (USING_BASH_MALLOC) - local_linebuf = (char *)xmalloc (LBUF_BUFSIZE); + if (stream == stdout && stdoutbuf == 0) + local_linebuf = stdoutbuf = (char *)xmalloc (LBUF_BUFSIZE); + else if (stream == stderr && stderrbuf == 0) + local_linebuf = stderrbuf = (char *)xmalloc (LBUF_BUFSIZE); + else + local_linebuf = (char *)NULL; /* let stdio handle it */ #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 */ +#else /* !HAVE_SETVBUF */ setlinebuf (stream); return (0); diff --git a/lib/sh/shmatch.c b/lib/sh/shmatch.c index 6de1dc1..a717d45 100644 --- a/lib/sh/shmatch.c +++ b/lib/sh/shmatch.c @@ -2,7 +2,7 @@ * shmatch.c -- shell interface to posix regular expression matching. */ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -41,6 +41,10 @@ extern int glob_ignore_case, match_ignore_case; +#if defined (ARRAY_VARS) +extern SHELL_VAR *builtin_find_indexed_array (char *, int); +#endif + int sh_regmatch (string, pattern, flags) const char *string; @@ -62,9 +66,9 @@ sh_regmatch (string, pattern, flags) #if defined (ARRAY_VARS) rematch = (SHELL_VAR *)NULL; #endif - + rflags = REG_EXTENDED; - if (glob_ignore_case || match_ignore_case) + if (match_ignore_case) rflags |= REG_ICASE; #if !defined (ARRAY_VARS) rflags |= REG_NOSUB; @@ -79,7 +83,8 @@ sh_regmatch (string, pattern, flags) matches = NULL; #endif - if (regexec (®ex, string, regex.re_nsub + 1, matches, 0)) + /* man regexec: NULL PMATCH ignored if NMATCH == 0 */ + if (regexec (®ex, string, matches ? regex.re_nsub + 1 : 0, matches, 0)) result = EXECUTION_FAILURE; else result = EXECUTION_SUCCESS; /* match */ @@ -91,11 +96,16 @@ sh_regmatch (string, pattern, flags) /* 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"); +#if 1 + unbind_global_variable_noref ("BASH_REMATCH"); rematch = make_new_array_variable ("BASH_REMATCH"); - amatch = array_cell (rematch); +#else + /* TAG:bash-5.3 */ + rematch = builtin_find_indexed_array ("BASH_REMATCH", 1); +#endif + amatch = rematch ? array_cell (rematch) : (ARRAY *)0; - if ((flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str) + if (matches && amatch && (flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str) { for (subexp_ind = 0; subexp_ind <= regex.re_nsub; subexp_ind++) { @@ -106,7 +116,9 @@ sh_regmatch (string, pattern, flags) } } +#if 0 VSETATTR (rematch, att_readonly); +#endif free (subexp_str); free (matches); diff --git a/lib/sh/shmbchar.c b/lib/sh/shmbchar.c new file mode 100644 index 0000000..f2f2582 --- /dev/null +++ b/lib/sh/shmbchar.c @@ -0,0 +1,137 @@ +/* Copyright (C) 2001, 2006, 2009, 2010, 2012, 2015-2018 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 . */ + + +#include + +#if defined (HANDLE_MULTIBYTE) +#include +#include + +#include + +#include +#include + +#ifndef errno +extern int errno; +#endif + +#if IS_BASIC_ASCII + +/* Bit table of characters in the ISO C "basic character set". */ +const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = +{ + 0x00001a00, /* '\t' '\v' '\f' */ + 0xffffffef, /* ' '...'#' '%'...'?' */ + 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ + 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ + /* The remaining bits are 0. */ +}; + +#endif /* IS_BASIC_ASCII */ + +extern int locale_utf8locale; + +extern char *utf8_mbsmbchar (const char *); +extern int utf8_mblen (const char *, size_t); + +/* Count the number of characters in S, counting multi-byte characters as a + single character. */ +size_t +mbstrlen (s) + const char *s; +{ + size_t clen, nc; + mbstate_t mbs = { 0 }, mbsbak = { 0 }; + int f, mb_cur_max; + + nc = 0; + mb_cur_max = MB_CUR_MAX; + while (*s && (clen = (f = is_basic (*s)) ? 1 : mbrlen(s, mb_cur_max, &mbs)) != 0) + { + if (MB_INVALIDCH(clen)) + { + clen = 1; /* assume single byte */ + mbs = mbsbak; + } + + if (f == 0) + mbsbak = mbs; + + s += clen; + nc++; + } + return nc; +} + +/* Return pointer to first multibyte char in S, or NULL if none. */ +/* XXX - if we know that the locale is UTF-8, we can just check whether or + not any byte has the eighth bit turned on */ +char * +mbsmbchar (s) + const char *s; +{ + char *t; + size_t clen; + mbstate_t mbs = { 0 }; + int mb_cur_max; + + if (locale_utf8locale) + return (utf8_mbsmbchar (s)); /* XXX */ + + mb_cur_max = MB_CUR_MAX; + for (t = (char *)s; *t; t++) + { + if (is_basic (*t)) + continue; + + if (locale_utf8locale) /* not used if above code active */ + clen = utf8_mblen (t, mb_cur_max); + else + clen = mbrlen (t, mb_cur_max, &mbs); + + if (clen == 0) + return 0; + if (MB_INVALIDCH(clen)) + continue; + + if (clen > 1) + return t; + } + return 0; +} + +int +sh_mbsnlen(src, srclen, maxlen) + const char *src; + size_t srclen; + int maxlen; +{ + int count; + int sind; + DECLARE_MBSTATE; + + for (sind = count = 0; src[sind]; ) + { + count++; /* number of multibyte characters */ + ADVANCE_CHAR (src, srclen, sind); + if (sind > maxlen) + break; + } + + return count; +} +#endif diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c index a267d38..26fe018 100644 --- a/lib/sh/shquote.c +++ b/lib/sh/shquote.c @@ -1,6 +1,6 @@ /* shquote - functions to quote and dequote strings */ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -28,10 +28,61 @@ #endif #include +#include #include "syntax.h" #include +#include "shmbchar.h" +#include "shmbutil.h" + +extern char *ansic_quote PARAMS((char *, int, int *)); +extern int ansic_shouldquote PARAMS((const char *)); + +/* Default set of characters that should be backslash-quoted in strings */ +static const char bstab[256] = + { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 0, 0, 0, 0, /* TAB, NL */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 1, 1, 1, 0, 1, 0, 1, 1, /* SPACE, !, DQUOTE, DOL, AMP, SQUOTE */ + 1, 1, 1, 0, 1, 0, 0, 0, /* LPAR, RPAR, STAR, COMMA */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 1, 1, /* SEMI, LESSTHAN, GREATERTHAN, QUEST */ + + 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, 1, 1, 1, 1, 0, /* LBRACK, BS, RBRACK, CARAT */ + + 1, 0, 0, 0, 0, 0, 0, 0, /* BACKQ */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, /* LBRACE, BAR, RBRACE */ + + 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, + }; + /* **************************************************************** */ /* */ /* Functions for quoting strings to be re-read as input */ @@ -42,13 +93,23 @@ Used by alias and trap, among others. */ char * sh_single_quote (string) - char *string; + const char *string; { register int c; - char *result, *r, *s; + char *result, *r; + const char *s; result = (char *)xmalloc (3 + (4 * strlen (string))); r = result; + + if (string[0] == '\'' && string[1] == 0) + { + *r++ = '\\'; + *r++ = '\''; + *r++ = 0; + return result; + } + *r++ = '\''; for (s = string; s && (c = *s); s++) @@ -72,10 +133,18 @@ sh_single_quote (string) /* Quote STRING using double quotes. Return a new string. */ char * sh_double_quote (string) - char *string; + const char *string; { register unsigned char c; - char *result, *r, *s; + int mb_cur_max; + char *result, *r; + size_t slen; + const char *s, *send; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + mb_cur_max = MB_CUR_MAX; result = (char *)xmalloc (3 + (2 * strlen (string))); r = result; @@ -86,9 +155,19 @@ sh_double_quote (string) /* 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 '\\'? */ +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (c) == 0)) + { + COPY_CHAR_P (r, s, send); + s--; /* compensate for auto-increment in loop above */ + continue; + } +#endif + + /* Assume that the string will not be further expanded, so no need to + add CTLESC to protect CTLESC or CTLNUL. */ *r++ = c; } @@ -106,16 +185,29 @@ sh_mkdoublequoted (s, slen, flags) int slen, flags; { char *r, *ret; - int rlen; + const char *send; + int rlen, mb_cur_max; + DECLARE_MBSTATE; + send = s + slen; + mb_cur_max = flags ? MB_CUR_MAX : 1; rlen = (flags == 0) ? slen + 3 : (2 * slen) + 1; ret = r = (char *)xmalloc (rlen); - + *r++ = '"'; while (*s) { if (flags && *s == '"') *r++ = '\\'; + +#if defined (HANDLE_MULTIBYTE) + if (flags && ((locale_utf8locale && (*s & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (*s) == 0))) + { + COPY_CHAR_P (r, s, send); + continue; + } +#endif *r++ = *s++; } *r++ = '"'; @@ -161,79 +253,102 @@ sh_un_double_quote (string) 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. */ + quoting characters. TABLE, if set, points to a map of the ascii code + set with char needing to be backslash-quoted if table[char]==1. FLAGS, + if 1, causes tildes to be quoted as well. If FLAGS&2, backslash-quote + other shell blank characters. */ + char * -sh_backslash_quote (string) +sh_backslash_quote (string, table, flags) char *string; + char *table; + int flags; { - int c; - char *result, *r, *s; + int c, mb_cur_max; + size_t slen; + char *result, *r, *s, *backslash_table, *send; + DECLARE_MBSTATE; - result = (char *)xmalloc (2 * strlen (string) + 1); + slen = strlen (string); + send = string + slen; + result = (char *)xmalloc (2 * slen + 1); + + backslash_table = table ? table : (char *)bstab; + mb_cur_max = MB_CUR_MAX; for (r = result, s = string; s && (c = *s); s++) { - switch (c) +#if defined (HANDLE_MULTIBYTE) + /* XXX - isascii, even if is_basic(c) == 0 - works in most cases. */ + if (c >= 0 && c <= 127 && backslash_table[(unsigned char)c] == 1) { - 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; + continue; } + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (c) == 0)) + { + COPY_CHAR_P (r, s, send); + s--; /* compensate for auto-increment in loop above */ + continue; + } +#endif + if (backslash_table[(unsigned char)c] == 1) + *r++ = '\\'; + else if (c == '#' && s == string) /* comment char */ + *r++ = '\\'; + else if ((flags&1) && c == '~' && (s == string || s[-1] == ':' || s[-1] == '=')) + /* Tildes are special at the start of a word or after a `:' or `=' + (technically unquoted, but it doesn't make a difference in practice) */ + *r++ = '\\'; + else if ((flags&2) && shellblank((unsigned char)c)) + *r++ = '\\'; + *r++ = c; } *r = '\0'; return (result); } -#if defined (PROMPT_STRING_DECODE) +#if defined (PROMPT_STRING_DECODE) || defined (TRANSLATABLE_STRINGS) /* Quote characters that get special treatment when in double quotes in STRING - using backslashes. Return a new string. */ + using backslashes. FLAGS is reserved for future use. Return a new string. */ char * -sh_backslash_quote_for_double_quotes (string) +sh_backslash_quote_for_double_quotes (string, flags) char *string; + int flags; { unsigned char c; - char *result, *r, *s; - - result = (char *)xmalloc (2 * strlen (string) + 1); + char *result, *r, *s, *send; + size_t slen; + int mb_cur_max; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + mb_cur_max = MB_CUR_MAX; + result = (char *)xmalloc (2 * slen + 1); for (r = result, s = string; s && (c = *s); s++) { - if (sh_syntaxtab[c] & CBSDQUOTE) + /* Backslash-newline disappears within double quotes, so don't add one. */ + if ((sh_syntaxtab[c] & CBSDQUOTE) && c != '\n') *r++ = '\\'; - /* I should probably add flags for these to sh_syntaxtab[] */ + /* I should probably use the CSPECL flag for these in sh_syntaxtab[] */ else if (c == CTLESC || c == CTLNUL) *r++ = CTLESC; /* could be '\\'? */ +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (c) == 0)) + { + COPY_CHAR_P (r, s, send); + s--; /* compensate for auto-increment in loop above */ + continue; + } +#endif + *r++ = c; } @@ -242,11 +357,36 @@ sh_backslash_quote_for_double_quotes (string) } #endif /* PROMPT_STRING_DECODE */ +char * +sh_quote_reusable (s, flags) + char *s; + int flags; +{ + char *ret; + + if (s == 0) + return s; + else if (*s == 0) + { + ret = (char *)xmalloc (3); + ret[0] = ret[1] = '\''; + ret[2] = '\0'; + } + else if (ansic_shouldquote (s)) + ret = ansic_quote (s, 0, (int *)0); + else if (flags) + ret = sh_backslash_quote (s, 0, 1); + else + ret = sh_single_quote (s); + + return ret; +} + int sh_contains_shell_metas (string) - char *string; + const char *string; { - char *s; + const char *s; for (s = string; s && *s; s++) { @@ -276,3 +416,17 @@ sh_contains_shell_metas (string) return (0); } + +int +sh_contains_quotes (string) + const char *string; +{ + const char *s; + + for (s = string; s && *s; s++) + { + if (*s == '\'' || *s == '"' || *s == '\\') + return 1; + } + return 0; +} diff --git a/lib/sh/snprintf.c b/lib/sh/snprintf.c index d681b16..1f0f4c7 100644 --- a/lib/sh/snprintf.c +++ b/lib/sh/snprintf.c @@ -9,7 +9,7 @@ Unix snprintf implementation. derived from inetutils/libinetutils/snprintf.c Version 1.1 - Copyright (C) 2001,2006 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,7 +26,7 @@ You should have received a copy of the GNU General Public License along with Bash. If not, see . - Revision History: + Original (pre-bash) Revision History: 1.1: * added changes from Miles Bader @@ -50,7 +50,6 @@ * 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 */ @@ -71,7 +70,7 @@ #endif #if defined(DRIVER) && !defined(HAVE_CONFIG_H) -#define HAVE_LONG_LONG +#define HAVE_LONG_LONG_INT #define HAVE_LONG_DOUBLE #ifdef __linux__ #define HAVE_PRINTF_A_FORMAT @@ -130,8 +129,8 @@ # 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)); +extern char *fmtulong PARAMS((unsigned long int, int, char *, size_t, int)); +extern char *fmtullong PARAMS((unsigned long long int, int, char *, size_t, int)); #endif #ifndef FREE @@ -143,9 +142,11 @@ extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int)); 302 / 1000 is log10 (2) rounded up; add one for integer division truncation; add one more for a minus sign if t is signed. */ +#ifndef INT_STRLEN_BOUND #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \ + 1 + TYPE_SIGNED (t)) +#endif /* conversion flags */ #define PF_ALTFORM 0x00001 /* # */ @@ -270,51 +271,70 @@ struct DATA /* 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 **)); +static double pow_10 PARAMS((int)); +static int log_10 PARAMS((double)); +static double integral PARAMS((double, double *)); +static char *numtoa PARAMS((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 *)); +static void init_data PARAMS((struct DATA *, char *, size_t, const char *, int)); +static void init_conv_flag PARAMS((struct DATA *)); /* for the format */ #ifdef FLOATING_POINT -static void floating __P((struct DATA *, double)); -static void exponent __P((struct DATA *, double)); +static void floating PARAMS((struct DATA *, double)); +static void exponent PARAMS((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)); +static void number PARAMS((struct DATA *, unsigned long, int)); +#ifdef HAVE_LONG_LONG_INT +static void lnumber PARAMS((struct DATA *, unsigned long long, int)); #endif -static void pointer __P((struct DATA *, unsigned long)); -static void strings __P((struct DATA *, char *)); +static void pointer PARAMS((struct DATA *, unsigned long)); +static void strings PARAMS((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)); +static void ldfallback PARAMS((struct DATA *, const char *, const char *, long double)); # endif -static void dfallback __P((struct DATA *, const char *, const char *, double)); +static void dfallback PARAMS((struct DATA *, const char *, const char *, double)); #endif -static char *groupnum __P((char *)); +static char *groupnum PARAMS((char *)); -#ifndef HAVE_ISINF_IN_LIBC -static int isinf __P((double)); +#if defined (HAVE_LONG_DOUBLE) +# define LONGDOUBLE long double +#else +# define LONGDOUBLE double #endif -#ifndef HAVE_ISNAN_IN_LIBC -static int isnan __P((double)); + +#ifndef isnan + static inline int isnan_f (float x) { return x != x; } + static inline int isnan_d (double x) { return x != x; } + static inline int isnan_ld (LONGDOUBLE x) { return x != x; } + # define isnan(x) \ + (sizeof (x) == sizeof (LONGDOUBLE) ? isnan_ld (x) \ + : sizeof (x) == sizeof (double) ? isnan_d (x) \ + : isnan_f (x)) +#endif + +#ifndef isinf + static inline int isinf_f (float x) { return !isnan (x) && isnan (x - x); } + static inline int isinf_d (double x) { return !isnan (x) && isnan (x - x); } + static inline int isinf_ld (LONGDOUBLE x) { return !isnan (x) && isnan (x - x); } + # define isinf(x) \ + (sizeof (x) == sizeof (LONGDOUBLE) ? isinf_ld (x) \ + : sizeof (x) == sizeof (double) ? isinf_d (x) \ + : isinf_f (x)) #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 *)); +static void *xmalloc PARAMS((size_t)); +static void *xrealloc PARAMS((void *, size_t)); +static void xfree PARAMS((void *)); #else # include #endif @@ -371,7 +391,7 @@ static void xfree __P((void *)); while (0) #define PUT_PLUS(d, p, zero) \ - if ((d) > zero && (p)->justify == RIGHT) \ + if (((p)->flags & PF_PLUS) && (d) > zero) \ PUT_CHAR('+', p) #define PUT_SPACE(d, p, zero) \ @@ -431,9 +451,9 @@ static void xfree __P((void *)); if (lv) \ { \ if (lv->decimal_point && lv->decimal_point[0]) \ - (d) = lv->decimal_point[0]; \ + (d) = lv->decimal_point[0]; \ if (lv->thousands_sep && lv->thousands_sep[0]) \ - (t) = lv->thousands_sep[0]; \ + (t) = lv->thousands_sep[0]; \ (g) = lv->grouping ? lv->grouping : ""; \ if (*(g) == '\0' || *(g) == CHAR_MAX || (t) == -1) (g) = 0; \ } \ @@ -574,7 +594,7 @@ integral(real, ip) /* * 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 + * the container for the fraction and the integral part or statically * declare with fix size */ static char * @@ -586,10 +606,9 @@ numtoa(number, base, precision, fract) register int i, j; double ip, fp; /* integer and fraction part */ double fraction; - int digits = MAX_INT - 1; + int digits, sign; static char integral_part[MAX_INT]; static char fraction_part[MAX_FRACT]; - double sign; int ch; /* taking care of the obvious case: 0.0 */ @@ -607,8 +626,12 @@ numtoa(number, base, precision, fract) return integral_part; } + /* -0 is tricky */ + sign = (number == -0.) ? '-' : ((number < 0.) ? '-' : '+'); + digits = MAX_INT - 1; + /* for negative numbers */ - if ((sign = number) < 0.) + if (sign == '-') { number = -number; digits--; /* sign consume one digit */ @@ -643,7 +666,7 @@ numtoa(number, base, precision, fract) integral_part[i] = '9'; /* put the sign ? */ - if (sign < 0.) + if (sign == '-') integral_part[i++] = '-'; integral_part[i] = '\0'; @@ -682,9 +705,13 @@ number(p, d, base) long sd; int flags; - /* An explicit precision turns off the zero-padding flag. */ + /* An explicit precision turns off the zero-padding flag and sets the + pad character back to space. */ if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT)) - p->flags &= ~PF_ZEROPAD; + { + p->flags &= ~PF_ZEROPAD; + p->pad = ' '; + } sd = d; /* signed for ' ' padding in base 10 */ flags = 0; @@ -698,10 +725,11 @@ number(p, d, base) { GETLOCALEDATA(decpoint, thoussep, grouping); if (grouping && (t = groupnum (tmp))) - tmp = t; + tmp = t; } - p->width -= strlen(tmp); + /* need to add one for any `+', but we only add one in base 10 */ + p->width -= strlen(tmp) + (base == 10 && d > 0 && (p->flags & PF_PLUS)); PAD_RIGHT(p); if ((p->flags & PF_DOT) && p->precision > 0) @@ -739,7 +767,7 @@ number(p, d, base) FREE (t); } -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT /* * identical to number() but works for `long long' */ @@ -753,9 +781,13 @@ lnumber(p, d, base) long long sd; int flags; - /* An explicit precision turns off the zero-padding flag. */ + /* An explicit precision turns off the zero-padding flag and sets the + pad character back to space. */ if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT)) - p->flags &= ~PF_ZEROPAD; + { + p->flags &= ~PF_ZEROPAD; + p->pad = ' '; + } 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; @@ -768,10 +800,11 @@ lnumber(p, d, base) { GETLOCALEDATA(decpoint, thoussep, grouping); if (grouping && (t = groupnum (tmp))) - tmp = t; + tmp = t; } - p->width -= strlen(tmp); + /* need to add one for any `+', but we only add one in base 10 */ + p->width -= strlen(tmp) + (base == 10 && d > 0 && (p->flags & PF_PLUS)); PAD_RIGHT(p); if ((p->flags & PF_DOT) && p->precision > 0) @@ -875,11 +908,11 @@ wstrings(p, tmp) { 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) { @@ -919,32 +952,6 @@ wchars (p, wc) #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. */ @@ -1002,19 +1009,35 @@ floating(p, d) { /* smash the trailing zeros unless altform */ for (i = strlen(tmp2) - 1; i >= 0 && tmp2[i] == '0'; i--) - tmp2[i] = '\0'; + tmp2[i] = '\0'; if (tmp2[0] == '\0') p->precision = 0; } /* calculate the padding. 1 for the dot */ p->width = p->width - + /* XXX - should this be d>0. && (p->flags & PF_PLUS) ? */ +#if 0 ((d > 0. && p->justify == RIGHT) ? 1:0) - +#else + ((d > 0. && (p->flags & PF_PLUS)) ? 1:0) - +#endif ((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.); + + if (p->pad == ' ') + { + PAD_RIGHT(p); + PUT_PLUS(d, p, 0.); + } + else + { + if (*tmp == '-') + PUT_CHAR(*tmp++, p); + PUT_PLUS(d, p, 0.); + PAD_RIGHT(p); + } PUT_SPACE(d, p, 0.); while (*tmp) @@ -1058,14 +1081,30 @@ exponent(p, d) tmp = dtoa(d, p->precision, &tmp2); /* 1 for unit, 1 for the '.', 1 for 'e|E', - * 1 for '+|-', 2 for 'exp' */ + * 1 for '+|-', 2 for 'exp' (but no `.' if precision == 0 */ /* calculate how much padding need */ p->width = p->width - + /* XXX - should this be d>0. && (p->flags & PF_PLUS) ? */ +#if 0 ((d > 0. && p->justify == RIGHT) ? 1:0) - - ((p->flags & PF_SPACE) ? 1:0) - p->precision - 6; +#else + ((d > 0. && (p->flags & PF_PLUS)) ? 1:0) - +#endif + (p->precision != 0 || (p->flags & PF_ALTFORM)) - + ((p->flags & PF_SPACE) ? 1:0) - p->precision - 5; - PAD_RIGHT(p); - PUT_PLUS(d, p, 0.); + if (p->pad == ' ') + { + PAD_RIGHT(p); + PUT_PLUS(d, p, 0.); + } + else + { + if (*tmp == '-') + PUT_CHAR(*tmp++, p); + PUT_PLUS(d, p, 0.); + PAD_RIGHT(p); + } PUT_SPACE(d, p, 0.); while (*tmp) @@ -1163,7 +1202,7 @@ groupnum (s) else if (*g == CHAR_MAX) { do - *--re = *--se; + *--re = *--se; while (se > s); break; } @@ -1223,7 +1262,7 @@ vsnprintf_internal(data, string, length, format, args) long double ld; /* for later */ #endif unsigned long ul; -#ifdef HAVE_LONG_LONG +#ifdef HAVE_UNSIGNED_LONG_LONG_INT unsigned long long ull; #endif int state, i, c, n; @@ -1295,10 +1334,6 @@ vsnprintf_internal(data, string, length, format, args) 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; @@ -1322,13 +1357,25 @@ vsnprintf_internal(data, string, length, format, args) if ((data->flags & PF_DOT) == 0) { data->flags |= PF_PLUS; - data->justify = RIGHT; + if ((data->flags & PF_LADJUST) == 0) + data->justify = RIGHT; } continue; case '\'': data->flags |= PF_THOUSANDS; continue; + case '0': + /* If we're not specifying precision (in which case we've seen + a `.') and we're not performing left-adjustment (in which + case the `0' is ignored), a `0' is taken as the zero-padding + flag. */ + if ((data->flags & (PF_DOT|PF_LADJUST)) == 0) + { + data->flags |= PF_ZEROPAD; + data->pad = '0'; + continue; + } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': @@ -1410,8 +1457,9 @@ vsnprintf_internal(data, string, length, format, args) else { /* reduce precision by 1 because of leading digit before - decimal point in e format. */ - data->precision--; + decimal point in e format, unless specified as 0. */ + if (data->precision > 0) + data->precision--; exponent(data, d); } state = 0; @@ -1438,7 +1486,7 @@ vsnprintf_internal(data, string, length, format, args) /* FALLTHROUGH */ case 'u': STAR_ARGS(data); -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT if (data->flags & PF_LONGLONG) { ull = GETARG (unsigned long long); @@ -1458,7 +1506,7 @@ vsnprintf_internal(data, string, length, format, args) case 'd': /* decimal */ case 'i': STAR_ARGS(data); -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT if (data->flags & PF_LONGLONG) { ull = GETARG (long long); @@ -1474,7 +1522,7 @@ vsnprintf_internal(data, string, length, format, args) break; case 'o': /* octal */ STAR_ARGS(data); -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT if (data->flags & PF_LONGLONG) { ull = GETARG (unsigned long long); @@ -1491,7 +1539,7 @@ vsnprintf_internal(data, string, length, format, args) case 'x': case 'X': /* hexadecimal */ STAR_ARGS(data); -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT if (data->flags & PF_LONGLONG) { ull = GETARG (unsigned long long); @@ -1554,7 +1602,7 @@ vsnprintf_internal(data, string, length, format, args) state = 0; break; case 'n': -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT if (data->flags & PF_LONGLONG) *(GETARG (long long *)) = data->counter; else @@ -2034,7 +2082,7 @@ main() printf("<%s>\n", holder); printf("<%s>\n\n", h); -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT 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); diff --git a/lib/sh/spell.c b/lib/sh/spell.c index d0394c2..cdf465b 100644 --- a/lib/sh/spell.c +++ b/lib/sh/spell.c @@ -1,6 +1,6 @@ /* spell.c -- spelling correction for pathnames. */ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,7 +30,7 @@ #include #include #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) #include #endif @@ -40,8 +40,8 @@ #include #include -static int mindist __P((char *, char *, char *)); -static int spdist __P((char *, char *)); +static int mindist PARAMS((char *, char *, char *)); +static int spdist PARAMS((char *, char *)); /* * `spname' and its helpers are inspired by the code in "The UNIX diff --git a/lib/sh/strcasecmp.c b/lib/sh/strcasecmp.c index 5542f71..70d0551 100644 --- a/lib/sh/strcasecmp.c +++ b/lib/sh/strcasecmp.c @@ -32,7 +32,7 @@ int strncasecmp (string1, string2, count) const char *string1; const char *string2; - int count; + size_t count; { register const char *s1; register const char *s2; diff --git a/lib/sh/strchrnul.c b/lib/sh/strchrnul.c new file mode 100644 index 0000000..00cb88c --- /dev/null +++ b/lib/sh/strchrnul.c @@ -0,0 +1,35 @@ +/* Searching in a string. + Copyright (C) 2012 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 . */ + +#include +#include + +/* Specification. */ +#include + +/* Find the first occurrence of C in S or the final NUL byte. */ +char * +strchrnul (s, c_in) + const char *s; + int c_in; +{ + char c; + register char *s1; + + for (c = c_in, s1 = (char *)s; s1 && *s1 && *s1 != c; s1++) + ; + return (s1); +} diff --git a/lib/sh/strdup.c b/lib/sh/strdup.c new file mode 100644 index 0000000..3d35f7c --- /dev/null +++ b/lib/sh/strdup.c @@ -0,0 +1,41 @@ +/* strdup - return a copy of a string in newly-allocated memory. */ + +/* Copyright (C) 2013 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include + +/* Get specification. */ +#include +#include + +/* Duplicate S, returning an identical malloc'd string. */ +char * +strdup (s) + const char *s; +{ + size_t len; + void *new; + + len = strlen (s) + 1; + if ((new = malloc (len)) == NULL) + return NULL; + + memcpy (new, s, len); + return ((char *)new); +} diff --git a/lib/sh/strerror.c b/lib/sh/strerror.c index 4081e9c..bf63926 100644 --- a/lib/sh/strerror.c +++ b/lib/sh/strerror.c @@ -23,7 +23,7 @@ #if !defined (HAVE_STRERROR) #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif diff --git a/lib/sh/strftime.c b/lib/sh/strftime.c index 572baae..60bee79 100644 --- a/lib/sh/strftime.c +++ b/lib/sh/strftime.c @@ -24,9 +24,6 @@ * 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 @@ -39,6 +36,9 @@ * Updated July, 1997 * Updated October, 1999 * Updated September, 2000 + * Updated December, 2001 + * Updated January, 2011 + * Updated April, 2012 * * Fixes from ado@elsie.nci.nih.gov, * February 1991, May 1992 @@ -54,18 +54,17 @@ * July 1997 * Moved to C99 specification. * September 2000 + * Fixes from Tanaka Akira + * December 2001 */ #include -#ifndef GAWK +#include + #include #include -#include -#endif -#if defined(TM_IN_SYS_TIME) -#include -#include -#endif +#include +#include #include #include @@ -74,12 +73,15 @@ #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 +#define POSIX_2008 1 /* flag and fw for C, F, G, Y formats */ #undef strchr /* avoid AIX weirdness */ +#if !defined (errno) +extern int errno; +#endif + #if defined (SHELL) extern char *get_string_value (const char *); #endif @@ -98,18 +100,21 @@ static int iso8601wknum(const struct tm *timeptr); #define range(low, item, hi) max(low, min(item, hi)) -#if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME) +/* Whew! This stuff is a mess. */ +#if !defined(OS2) && !defined(MSDOS) && !defined(__CYGWIN__) && 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) +# if defined (HPUX) || defined(__hpux) extern long int timezone; # else +# if !defined(__CYGWIN__) extern int timezone, altzone; -# endif /* !HPUX */ -#endif /* !SOLARIS && !mips && !M_UNIX */ +# endif +# endif +#endif #endif #undef min /* just in case */ @@ -132,6 +137,34 @@ max(int a, int b) return (a > b ? a : b); } +#ifdef POSIX_2008 +/* iso_8601_2000_year --- format a year per ISO 8601:2000 as in 1003.1 */ + +static void +iso_8601_2000_year(char *buf, int year, size_t fw) +{ + int extra; + char sign = '\0'; + + if (year >= -9999 && year <= 9999) { + sprintf(buf, "%0*d", (int) fw, year); + return; + } + + /* now things get weird */ + if (year > 9999) { + sign = '+'; + } else { + sign = '-'; + year = -year; + } + + extra = year / 10000; + year %= 10000; + sprintf(buf, "%c_%04d_%d", sign, extra, year); +} +#endif /* POSIX_2008 */ + /* strftime --- produce formatted time */ size_t @@ -141,7 +174,8 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) char *start = s; auto char tbuf[100]; long off; - int i, w, y; + int i, w, oerrno; + long y; static short first = 1; #ifdef POSIX_SEMANTICS static char *savetz = NULL; @@ -151,12 +185,19 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) #ifndef HAVE_TM_ZONE #ifndef HAVE_TM_NAME #ifndef HAVE_TZNAME +#ifndef __CYGWIN__ extern char *timezone(); struct timeval tv; struct timezone zone; +#endif /* __CYGWIN__ */ #endif /* HAVE_TZNAME */ #endif /* HAVE_TM_NAME */ #endif /* HAVE_TM_ZONE */ +#ifdef POSIX_2008 + int pad; + size_t fw; + char flag; +#endif /* POSIX_2008 */ /* various tables, useful in North America */ static const char *days_a[] = { @@ -178,6 +219,8 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) }; static const char *ampm[] = { "AM", "PM", }; + oerrno = errno; + if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0) return 0; @@ -230,6 +273,40 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) *s++ = *format; continue; } +#ifdef POSIX_2008 + pad = '\0'; + fw = 0; + flag = '\0'; + switch (*++format) { + case '+': + flag = '+'; + /* fall through */ + case '0': + pad = '0'; + format++; + break; + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + break; + + default: + format--; + goto again; + } + for (; isdigit(*format); format++) { + fw = fw * 10 + (*format - '0'); + } + format--; +#endif /* POSIX_2008 */ + again: switch (*++format) { case '\0': @@ -281,8 +358,19 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) break; case 'C': +#ifdef POSIX_2008 + if (pad != '\0' && fw > 0) { + size_t min_fw = (flag ? 3 : 2); + + fw = max(fw, min_fw); + sprintf(tbuf, flag + ? "%+0*ld" + : "%0*ld", (int) fw, + (timeptr->tm_year + 1900L) / 100); + } else +#endif /* POSIX_2008 */ century: - sprintf(tbuf, "%02d", (timeptr->tm_year + 1900) / 100); + sprintf(tbuf, "%02ld", (timeptr->tm_year + 1900L) / 100); break; case 'd': /* day of the month, 01 - 31 */ @@ -303,7 +391,30 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) goto again; case 'F': /* ISO 8601 date representation */ + { +#ifdef POSIX_2008 + /* + * Field width for %F is for the whole thing. + * It must be at least 10. + */ + char m_d[10]; + strftime(m_d, sizeof m_d, "-%m-%d", timeptr); + size_t min_fw = 10; + + if (pad != '\0' && fw > 0) { + fw = max(fw, min_fw); + } else { + fw = min_fw; + } + + fw -= 6; /* -XX-XX at end are invariant */ + + iso_8601_2000_year(tbuf, timeptr->tm_year + 1900, fw); + strcat(tbuf, m_d); +#else strftime(tbuf, sizeof tbuf, "%Y-%m-%d", timeptr); +#endif /* POSIX_2008 */ + } break; case 'g': @@ -319,16 +430,28 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) */ w = iso8601wknum(timeptr); if (timeptr->tm_mon == 11 && w == 1) - y = 1900 + timeptr->tm_year + 1; + y = 1900L + timeptr->tm_year + 1; else if (timeptr->tm_mon == 0 && w >= 52) - y = 1900 + timeptr->tm_year - 1; + y = 1900L + timeptr->tm_year - 1; else - y = 1900 + timeptr->tm_year; - - if (*format == 'G') - sprintf(tbuf, "%d", y); + y = 1900L + timeptr->tm_year; + + if (*format == 'G') { +#ifdef POSIX_2008 + if (pad != '\0' && fw > 0) { + size_t min_fw = 4; + + fw = max(fw, min_fw); + sprintf(tbuf, flag + ? "%+0*ld" + : "%0*ld", (int) fw, + y); + } else +#endif /* POSIX_2008 */ + sprintf(tbuf, "%ld", y); + } else - sprintf(tbuf, "%02d", y % 100); + sprintf(tbuf, "%02ld", y % 100); break; case 'h': /* abbreviated month name */ @@ -387,7 +510,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) strftime(tbuf, sizeof tbuf, "%H:%M", timeptr); break; -#if defined(HAVE_MKTIME) || defined(GAWK) +#if defined(HAVE_MKTIME) case 's': /* time as seconds since the Epoch */ { struct tm non_const_timeptr; @@ -396,7 +519,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) sprintf(tbuf, "%ld", mktime(& non_const_timeptr)); break; } -#endif /* defined(HAVE_MKTIME) || defined(GAWK) */ +#endif /* defined(HAVE_MKTIME) */ case 'S': /* second, 00 - 60 */ i = range(0, timeptr->tm_sec, 60); @@ -451,8 +574,18 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) break; case 'Y': /* year with century */ - fullyear: - sprintf(tbuf, "%d", 1900 + timeptr->tm_year); +#ifdef POSIX_2008 + if (pad != '\0' && fw > 0) { + size_t min_fw = 4; + + fw = max(fw, min_fw); + sprintf(tbuf, flag + ? "%+0*ld" + : "%0*ld", (int) fw, + 1900L + timeptr->tm_year); + } else +#endif /* POSIX_2008 */ + sprintf(tbuf, "%ld", 1900L + timeptr->tm_year); break; /* @@ -492,11 +625,12 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) * Systems with tzname[] probably have timezone as * secs west of GMT. Convert to mins east of GMT. */ -# ifdef HPUX +# if defined(__hpux) || defined (HPUX) || defined(__CYGWIN__) off = -timezone / 60; # else + /* ADR: 4 August 2001, fixed this per gazelle@interaccess.com */ off = -(daylight ? altzone : timezone) / 60; -# endif /* !HPUX */ +# endif #else /* !HAVE_TZNAME */ gettimeofday(& tv, & zone); off = -zone.tz_minuteswest; @@ -509,10 +643,10 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) } else { tbuf[0] = '+'; } - sprintf(tbuf+1, "%02d%02d", off/60, off%60); + sprintf(tbuf+1, "%02ld%02ld", off/60, off%60); break; - case 'Z': /* time zone name or abbrevation */ + case 'Z': /* time zone name or abbreviation */ #ifdef HAVE_TZNAME i = (daylight && timeptr->tm_isdst > 0); /* 0 or 1 */ strcpy(tbuf, tzname[i]); @@ -558,10 +692,10 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) #ifdef VMS_EXT case 'v': /* date as dd-bbb-YYYY */ - sprintf(tbuf, "%2d-%3.3s-%4d", + sprintf(tbuf, "%2d-%3.3s-%4ld", range(1, timeptr->tm_mday, 31), months_a[range(0, timeptr->tm_mon, 11)], - timeptr->tm_year + 1900); + timeptr->tm_year + 1900L); for (i = 3; i < 6; i++) if (islower(tbuf[i])) tbuf[i] = toupper(tbuf[i]); @@ -586,6 +720,8 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) out: if (s < endp && *format == '\0') { *s = '\0'; + if (s == start) + errno = oerrno; return (s - start); } else return 0; @@ -594,7 +730,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) /* isleap --- is a year a leap year? */ static int -isleap(int year) +isleap(long year) { return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0); } @@ -677,7 +813,7 @@ iso8601wknum(const struct tm *timeptr) 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); + dec31ly.tm_yday = 364 + isleap(dec31ly.tm_year + 1900L); weeknum = iso8601wknum(& dec31ly); #endif } @@ -809,7 +945,7 @@ static char *array[] = "(%%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", + "(%%N) Emperor/Era Name %N", "(%%O) Locale extensions (ignored) %O", "(%%R) time, 24-hour (%%H:%%M) %R", "(%%S) second (00..60) %S", @@ -830,7 +966,7 @@ static char *array[] = "(%%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", + "(%%o) Emperor/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", diff --git a/lib/sh/stringlist.c b/lib/sh/stringlist.c index b0c272a..3f28b63 100644 --- a/lib/sh/stringlist.c +++ b/lib/sh/stringlist.c @@ -1,6 +1,6 @@ /* stringlist.c - functions to handle a generic `list of strings' structure */ -/* Copyright (C) 2000-2002 Free Software Foundation, Inc. +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -255,7 +255,7 @@ strlist_sort (sl) { if (sl == 0 || sl->list_len == 0 || sl->list == 0) return; - strvec_sort (sl->list); + strvec_sort (sl->list, 0); } STRINGLIST * diff --git a/lib/sh/stringvec.c b/lib/sh/stringvec.c index b0ed416..8600042 100644 --- a/lib/sh/stringvec.c +++ b/lib/sh/stringvec.c @@ -40,6 +40,14 @@ strvec_create (n) return ((char **)xmalloc ((n) * sizeof (char *))); } +/* Allocate an array of strings with room for N members. */ +char ** +strvec_mcreate (n) + int n; +{ + return ((char **)malloc ((n) * sizeof (char *))); +} + char ** strvec_resize (array, nsize) char **array; @@ -48,6 +56,14 @@ strvec_resize (array, nsize) return ((char **)xrealloc (array, nsize * sizeof (char *))); } +char ** +strvec_mresize (array, nsize) + char **array; + int nsize; +{ + return ((char **)realloc (array, nsize * sizeof (char *))); +} + /* Return the length of ARRAY, a NULL terminated array of char *. */ int strvec_len (array) @@ -106,7 +122,6 @@ strvec_remove (array, name) 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 @@ -121,7 +136,6 @@ strvec_search (array, name) return (-1); } -#endif /* Allocate and return a new copy of ARRAY and its contents. */ char ** @@ -142,6 +156,28 @@ strvec_copy (array) return (ret); } +/* Comparison routine for use by qsort that conforms to the new Posix + requirements (http://austingroupbugs.net/view.php?id=1070). + + Perform a bytewise comparison if *S1 and *S2 collate equally. */ +int +strvec_posixcmp (s1, s2) + register char **s1, **s2; +{ + int result; + +#if defined (HAVE_STRCOLL) + result = strcoll (*s1, *s2); + if (result != 0) + return result; +#endif + + if ((result = **s1 - **s2) == 0) + result = strcmp (*s1, *s2); + + return (result); +} + /* Comparison routine for use with qsort() on arrays of strings. Uses strcoll(3) if available, otherwise it uses strcmp(3). */ int @@ -162,10 +198,14 @@ strvec_strcmp (s1, s2) /* Sort ARRAY, a null terminated array of pointers to strings. */ void -strvec_sort (array) +strvec_sort (array, posix) char **array; + int posix; { - qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_strcmp); + if (posix) + qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_posixcmp); + else + qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_strcmp); } /* Cons up a new array of words. The words are taken from LIST, diff --git a/lib/sh/strpbrk.c b/lib/sh/strpbrk.c index 4439986..8cce830 100644 --- a/lib/sh/strpbrk.c +++ b/lib/sh/strpbrk.c @@ -29,7 +29,7 @@ #include -/* Find the first ocurrence in S of any character in ACCEPT. */ +/* Find the first occurrence in S of any character in ACCEPT. */ char * strpbrk (s, accept) register const char *s; diff --git a/lib/sh/strtod.c b/lib/sh/strtod.c index 851d99b..55e1154 100644 --- a/lib/sh/strtod.c +++ b/lib/sh/strtod.c @@ -49,6 +49,10 @@ extern int errno; # define HUGE_VAL HUGE #endif +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#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 @@ -62,6 +66,7 @@ strtod (nptr, endptr) /* The number so far. */ double num; + int radixchar; int got_dot; /* Found a decimal point. */ int got_digit; /* Seen any digits. */ @@ -85,6 +90,7 @@ strtod (nptr, endptr) if (*s == '-' || *s == '+') ++s; + radixchar = locale_decpoint (); num = 0.0; got_dot = 0; got_digit = 0; @@ -113,7 +119,7 @@ strtod (nptr, endptr) if (got_dot) --exponent; } - else if (!got_dot && *s == '.') + else if (!got_dot && *s == radixchar) /* Record that we have found the decimal point. */ got_dot = 1; else diff --git a/lib/sh/strtoimax.c b/lib/sh/strtoimax.c index a4170f0..584fa0b 100644 --- a/lib/sh/strtoimax.c +++ b/lib/sh/strtoimax.c @@ -1,6 +1,6 @@ /* strtoimax - convert string representation of a number into an intmax_t value. */ -/* Copyright 1999-2009 Free Software Foundation, Inc. +/* Copyright 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,14 +45,14 @@ "this configure-time declaration test was not run" #endif #if !HAVE_DECL_STRTOL -extern long strtol __P((const char *, char **, int)); +extern long strtol PARAMS((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)); +#if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG_INT +extern long long strtoll PARAMS((const char *, char **, int)); #endif #ifdef strtoimax @@ -65,7 +65,7 @@ strtoimax (ptr, endptr, base) char **endptr; int base; { -#if HAVE_LONG_LONG +#if HAVE_LONG_LONG_INT verify(size_is_that_of_long_or_long_long, (sizeof (intmax_t) == sizeof (long) || sizeof (intmax_t) == sizeof (long long))); @@ -86,20 +86,20 @@ main () { char *p, *endptr; intmax_t x; -#if HAVE_LONG_LONG +#if HAVE_LONG_LONG_INT long long y; #endif long z; printf ("sizeof intmax_t: %d\n", sizeof (intmax_t)); -#if HAVE_LONG_LONG +#if HAVE_LONG_LONG_INT 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 +#if HAVE_LONG_LONG_INT y = strtoll("42", &endptr, 10); #else y = -1; diff --git a/lib/sh/strtol.c b/lib/sh/strtol.c index 8aa7478..c839a97 100644 --- a/lib/sh/strtol.c +++ b/lib/sh/strtol.c @@ -20,7 +20,7 @@ #include -#if !defined (HAVE_STRTOL) +#if !HAVE_STRTOL #include #include diff --git a/lib/sh/strtoll.c b/lib/sh/strtoll.c index f6060ee..f90300b 100644 --- a/lib/sh/strtoll.c +++ b/lib/sh/strtoll.c @@ -20,11 +20,11 @@ #include -#if defined (HAVE_LONG_LONG) && !defined (HAVE_STRTOLL) +#if defined (HAVE_LONG_LONG_INT) && !HAVE_STRTOLL #define QUAD 1 #undef HAVE_STRTOL #include "strtol.c" -#endif /* HAVE_LONG_LONG && !HAVE_STRTOLL */ +#endif /* HAVE_LONG_LONG_INT && !HAVE_STRTOLL */ diff --git a/lib/sh/strtoull.c b/lib/sh/strtoull.c index 02ddebb..fe6592e 100644 --- a/lib/sh/strtoull.c +++ b/lib/sh/strtoull.c @@ -20,7 +20,7 @@ #include -#if defined (HAVE_LONG_LONG) && !defined (HAVE_STRTOULL) +#if defined (HAVE_UNSIGNED_LONG_LONG_INT) && !HAVE_STRTOULL #define QUAD 1 #define UNSIGNED 1 @@ -28,4 +28,4 @@ #include "strtol.c" -#endif /* HAVE_LONG_LONG && !HAVE_STRTOULL */ +#endif /* HAVE_UNSIGNED_LONG_LONG_INT && !HAVE_STRTOULL */ diff --git a/lib/sh/strtoumax.c b/lib/sh/strtoumax.c index 09423ad..2e26efc 100644 --- a/lib/sh/strtoumax.c +++ b/lib/sh/strtoumax.c @@ -1,6 +1,6 @@ /* strtoumax - convert string representation of a number into an uintmax_t value. */ -/* Copyright 1999-2009 Free Software Foundation, Inc. +/* Copyright 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,14 +45,14 @@ "this configure-time declaration test was not run" #endif #if !HAVE_DECL_STRTOUL -extern unsigned long strtoul __P((const char *, char **, int)); +extern unsigned long strtoul PARAMS((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)); +#if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG_INT +extern unsigned long long strtoull PARAMS((const char *, char **, int)); #endif #ifdef strtoumax @@ -65,7 +65,7 @@ strtoumax (ptr, endptr, base) char **endptr; int base; { -#if HAVE_UNSIGNED_LONG_LONG +#if HAVE_UNSIGNED_LONG_LONG_INT verify (size_is_that_of_unsigned_long_or_unsigned_long_long, (sizeof (uintmax_t) == sizeof (unsigned long) || sizeof (uintmax_t) == sizeof (unsigned long long))); @@ -86,20 +86,20 @@ main () { char *p, *endptr; uintmax_t x; -#if HAVE_UNSIGNED_LONG_LONG +#if HAVE_UNSIGNED_LONG_LONG_INT unsigned long long y; #endif unsigned long z; printf ("sizeof uintmax_t: %d\n", sizeof (uintmax_t)); -#if HAVE_UNSIGNED_LONG_LONG +#if HAVE_UNSIGNED_LONG_LONG_INT 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 +#if HAVE_LONG_LONG_INT y = strtoull("42", &endptr, 10); #else y = 0; diff --git a/lib/sh/strtrans.c b/lib/sh/strtrans.c index 355a306..b2b1acc 100644 --- a/lib/sh/strtrans.c +++ b/lib/sh/strtrans.c @@ -1,6 +1,6 @@ /* strtrans.c - Translate and untranslate strings with ANSI-C escape sequences. */ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,6 +30,9 @@ #include "shell.h" +#include "shmbchar.h" +#include "shmbutil.h" + #ifdef ESC #undef ESC #endif @@ -51,16 +54,44 @@ ansicstr (string, len, flags, sawc, rlen) { int c, temp; char *ret, *r, *s; + unsigned long v; + size_t clen; + int b, mb_cur_max; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc; +#endif if (string == 0 || *string == '\0') return ((char *)NULL); + mb_cur_max = MB_CUR_MAX; +#if defined (HANDLE_MULTIBYTE) + temp = 4*len + 4; + if (temp < 12) + temp = 12; /* ensure enough for eventual u32cesc */ + ret = (char *)xmalloc (temp); +#else ret = (char *)xmalloc (2*len + 1); /* 2*len for possible CTLESC */ +#endif for (r = ret, s = string; s && *s; ) { c = *s++; if (c != '\\' || *s == '\0') - *r++ = c; + { + clen = 1; +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 0 && is_basic (c) == 0)) + { + clen = mbrtowc (&wc, s - 1, mb_cur_max, 0); + if (MB_INVALIDCH (clen)) + clen = 1; + } +#endif + *r++ = c; + for (--clen; clen > 0; clen--) + *r++ = *s++; + } else { switch (c = *s++) @@ -69,7 +100,7 @@ ansicstr (string, len, flags, sawc, rlen) case 'a': c = '\a'; break; case 'v': c = '\v'; break; #else - case 'a': c = '\007'; break; + case 'a': c = (int) 0x07; break; case 'v': c = (int) 0x0B; break; #endif case 'b': c = '\b'; break; @@ -128,6 +159,29 @@ ansicstr (string, len, flags, sawc, rlen) } c &= 0xFF; break; +#if defined (HANDLE_MULTIBYTE) + case 'u': + case 'U': + temp = (c == 'u') ? 4 : 8; /* \uNNNN \UNNNNNNNN */ + for (v = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++) + v = (v * 16) + HEXVALUE (*s); + if (temp == ((c == 'u') ? 4 : 8)) + { + *r++ = '\\'; /* c remains unchanged */ + break; + } + else if (v <= 0x7f) /* <= 0x7f translates directly */ + { + c = v; + break; + } + else + { + temp = u32cconv (v, r); + r += temp; + continue; + } +#endif case '\\': break; case '\'': case '"': case '?': @@ -143,9 +197,13 @@ ansicstr (string, len, flags, sawc, rlen) *rlen = r - ret; return ret; } + else if ((flags & 1) == 0 && *s == 0) + ; /* pass \c through */ else if ((flags & 1) == 0 && (c = *s)) { s++; + if ((flags & 2) && c == '\\' && c == *s) + s++; /* Posix requires $'\c\\' do backslash escaping */ c = TOCTRL(c); break; } @@ -176,6 +234,11 @@ ansic_quote (str, flags, rlen) char *r, *ret, *s; int l, rsize; unsigned char c; + size_t clen; + int b; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc; +#endif if (str == 0 || *str == 0) return ((char *)0); @@ -187,10 +250,11 @@ ansic_quote (str, flags, rlen) *r++ = '$'; *r++ = '\''; - for (s = str, l = 0; *s; s++) + for (s = str; c = *s; s++) { - c = *s; - l = 1; /* 1 == add backslash; 0 == no backslash */ + b = l = 1; /* 1 == add backslash; 0 == no backslash */ + clen = 1; + switch (c) { case ESC: c = 'E'; break; @@ -198,7 +262,7 @@ ansic_quote (str, flags, rlen) case '\a': c = 'a'; break; case '\v': c = 'v'; break; #else - case '\007': c = 'a'; break; + case 0x07: c = 'a'; break; case 0x0b: c = 'v'; break; #endif @@ -211,7 +275,14 @@ ansic_quote (str, flags, rlen) case '\'': break; default: +#if defined (HANDLE_MULTIBYTE) + b = is_basic (c); + /* XXX - clen comparison to 0 is dicey */ + if ((b == 0 && ((clen = mbrtowc (&wc, s, MB_CUR_MAX, 0)) < 0 || MB_INVALIDCH (clen) || iswprint (wc) == 0)) || + (b == 1 && ISPRINT (c) == 0)) +#else if (ISPRINT (c) == 0) +#endif { *r++ = '\\'; *r++ = TOCHAR ((c >> 6) & 07); @@ -222,9 +293,20 @@ ansic_quote (str, flags, rlen) l = 0; break; } + if (b == 0 && clen == 0) + break; + if (l) *r++ = '\\'; - *r++ = c; + + if (clen == 1) + *r++ = c; + else + { + for (b = 0; b < (int)clen; b++) + *r++ = (unsigned char)s[b]; + s += clen - 1; /* -1 because of the increment above */ + } } *r++ = '\''; @@ -234,6 +316,36 @@ ansic_quote (str, flags, rlen) return ret; } +#if defined (HANDLE_MULTIBYTE) +int +ansic_wshouldquote (string) + const char *string; +{ + const wchar_t *wcs; + wchar_t wcc; + wchar_t *wcstr = NULL; + size_t slen; + + slen = mbstowcs (wcstr, string, 0); + + if (slen == (size_t)-1) + return 1; + + wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (slen + 1)); + mbstowcs (wcstr, string, slen + 1); + + for (wcs = wcstr; wcc = *wcs; wcs++) + if (iswprint(wcc) == 0) + { + free (wcstr); + return 1; + } + + free (wcstr); + return 0; +} +#endif + /* return 1 if we need to quote with $'...' because of non-printing chars. */ int ansic_shouldquote (string) @@ -246,8 +358,14 @@ ansic_shouldquote (string) return 0; for (s = string; c = *s; s++) - if (ISPRINT (c) == 0) - return 1; + { +#if defined (HANDLE_MULTIBYTE) + if (is_basic (c) == 0) + return (ansic_wshouldquote (s)); +#endif + if (ISPRINT (c) == 0) + return 1; + } return 0; } diff --git a/lib/sh/strvis.c b/lib/sh/strvis.c new file mode 100644 index 0000000..7a11d57 --- /dev/null +++ b/lib/sh/strvis.c @@ -0,0 +1,154 @@ +/* strvis.c - make unsafe graphical characters in a string visible. */ + +/* Copyright (C) 2022 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +/* This is a stripped-down version suitable for the shell's use. */ +#include + +#include + +#include "bashansi.h" +#include + +#include "chartypes.h" +#include "bashintl.h" +#include "shmbutil.h" + +#define SAFECHAR(c) ((c) == ' ' || (c) == '\t') + +#ifndef RUBOUT +#define RUBOUT 0x7f +#endif + +#ifndef CTRL_CHAR +#define CTRL_CHAR(c) ((c) < 0x20) +#endif + +#ifndef META_CHAR +#define META_CHAR(c) ((c) > 0x7f && (c) <= UCHAR_MAX) +#endif + +#ifndef UNCTRL +#define UNCTRL(c) (TOUPPER ((c) | 0x40)) +#endif + +#ifndef UNMETA +#define UNMETA(c) ((c) & 0x7f) +#endif + +int +sh_charvis (s, sindp, slen, ret, rindp) + const char *s; + size_t *sindp; + size_t slen; + char *ret; + size_t *rindp; +{ + unsigned char c; + size_t si, ri; + const char *send; + DECLARE_MBSTATE; + + si = *sindp; + ri = *rindp; + c = s[*sindp]; + +#if defined (HANDLE_MULTIBYTE) + send = (locale_mb_cur_max > 1) ? s + slen : 0; +#else + send = 0; +#endif + + if (SAFECHAR (c)) + { + ret[ri++] = c; + si++; + } + else if (c == RUBOUT) + { + ret[ri++] = '^'; + ret[ri++] = '?'; + si++; + } + else if (CTRL_CHAR (c)) + { + ret[ri++] = '^'; + ret[ri++] = UNCTRL (c); + si++; + } +#if defined (HANDLE_MULTIBYTE) + else if (locale_utf8locale && (c & 0x80)) + COPY_CHAR_I (ret, ri, s, send, si); + else if (locale_mb_cur_max > 1 && is_basic (c) == 0) + COPY_CHAR_I (ret, ri, s, send, si); +#endif + else if (META_CHAR (c)) + { + ret[ri++] = 'M'; + ret[ri++] = '-'; + ret[ri++] = UNMETA (c); + si++; + } + else + ret[ri++] = s[si++]; + + *sindp = si; + *rindp = ri; + + return si; +} + +/* Return a new string with `unsafe' non-graphical characters in S rendered + in a visible way. */ +char * +sh_strvis (string) + const char *string; +{ + size_t slen, sind; + char *ret; + size_t retind, retsize; + unsigned char c; + DECLARE_MBSTATE; + + if (string == 0) + return 0; + if (*string == '\0') + { + if ((ret = (char *)malloc (1)) == 0) + return 0; + ret[0] = '\0'; + return ret; + } + + slen = strlen (string); + retsize = 3 * slen + 1; + + ret = (char *)malloc (retsize); + if (ret == 0) + return 0; + + retind = 0; + sind = 0; + + while (string[sind]) + sind = sh_charvis (string, &sind, slen, ret, &retind); + + ret[retind] = '\0'; + return ret; +} diff --git a/lib/sh/timers.c b/lib/sh/timers.c new file mode 100644 index 0000000..69b754c --- /dev/null +++ b/lib/sh/timers.c @@ -0,0 +1,262 @@ +/* timers - functions to manage shell timers */ + +/* Copyright (C) 2021 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include "config.h" + +#include "bashtypes.h" +#include "posixtime.h" + +#if defined (HAVE_UNISTD_H) +#include +#endif + +#if defined (HAVE_SELECT) +# include "posixselect.h" +# include "stat-time.h" +#endif + +#include "sig.h" +#include "bashjmp.h" +#include "xmalloc.h" + +#include "timer.h" + +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#ifndef FREE +#define FREE(s) do { if (s) free (s); } while (0) +#endif + +extern unsigned int falarm (unsigned int, unsigned int); + +static void shtimer_zero (sh_timer *); + +static void +shtimer_zero (sh_timer *t) +{ + t->tmout.tv_sec = 0; + t->tmout.tv_usec = 0; + + t->fd = -1; + t->flags = t->alrmflag = 0; + + t->alrm_handler = t->old_handler = 0; + + memset (t->jmpenv, '\0', sizeof (t->jmpenv)); + + t->tm_handler = 0; + t->data = 0; +} + +sh_timer * +shtimer_alloc (void) +{ + sh_timer *t; + + t = (sh_timer *)xmalloc (sizeof (sh_timer)); + shtimer_zero (t); + return t; +} + +void +shtimer_flush (sh_timer *t) +{ + /* The caller can manage t->data arbitrarily as long as it frees and sets + t->data to 0 before calling this function. Otherwise, we do what we can + to avoid memleaks. */ + FREE (t->data); + shtimer_zero (t); +} + +void +shtimer_dispose (sh_timer *t) +{ + free (t); +} + +/* We keep the timer as an offset into the future from the time it's set. */ +void +shtimer_set (sh_timer *t, time_t sec, long usec) +{ + struct timeval now; + + if (t->flags & SHTIMER_ALARM) + { + t->alrmflag = 0; /* just paranoia */ + t->old_handler = set_signal_handler (SIGALRM, t->alrm_handler); + t->flags |= SHTIMER_SIGSET; + falarm (t->tmout.tv_sec = sec, t->tmout.tv_usec = usec); + t->flags |= SHTIMER_ALRMSET; + return; + } + + if (gettimeofday (&now, 0) < 0) + timerclear (&now); + + t->tmout.tv_sec = now.tv_sec + sec; + t->tmout.tv_usec = now.tv_usec + usec; + if (t->tmout.tv_usec > USEC_PER_SEC) + { + t->tmout.tv_sec++; + t->tmout.tv_usec -= USEC_PER_SEC; + } +} + +void +shtimer_unset (sh_timer *t) +{ + t->tmout.tv_sec = 0; + t->tmout.tv_usec = 0; + + if (t->flags & SHTIMER_ALARM) + { + t->alrmflag = 0; + if (t->flags & SHTIMER_ALRMSET) + falarm (0, 0); + if (t->old_handler && (t->flags & SHTIMER_SIGSET)) + { + set_signal_handler (SIGALRM, t->old_handler); + t->flags &= ~SHTIMER_SIGSET; + t->old_handler = 0; + } + } +} + +void +shtimer_cleanup (sh_timer *t) +{ + shtimer_unset (t); +} + +void +shtimer_clear (sh_timer *t) +{ + shtimer_unset (t); + shtimer_dispose (t); +} + +int +shtimer_chktimeout (sh_timer *t) +{ + struct timeval now; + int r; + + /* Use the flag to avoid returning sigalrm_seen here */ + if (t->flags & SHTIMER_ALARM) + return t->alrmflag; + + /* Could check a flag for this */ + if (t->tmout.tv_sec == 0 && t->tmout.tv_usec == 0) + return 0; + + if (gettimeofday (&now, 0) < 0) + return 0; + r = ((now.tv_sec > t->tmout.tv_sec) || + (now.tv_sec == t->tmout.tv_sec && now.tv_usec >= t->tmout.tv_usec)); + + return r; +} + +#if defined (HAVE_SELECT) || defined (HAVE_PSELECT) +int +shtimer_select (sh_timer *t) +{ + int r, nfd; + sigset_t blocked_sigs, prevmask; + struct timeval now, tv; + fd_set readfds; +#if defined (HAVE_PSELECT) + struct timespec ts; +#endif + + /* We don't want a SIGCHLD to interrupt this */ + sigemptyset (&blocked_sigs); +# if defined (SIGCHLD) + sigaddset (&blocked_sigs, SIGCHLD); +# endif + + if (gettimeofday (&now, 0) < 0) + { + if (t->flags & SHTIMER_LONGJMP) + sh_longjmp (t->jmpenv, 1); + else + return -1; + } + + /* If the timer has already expired, return immediately */ + if ((now.tv_sec > t->tmout.tv_sec) || + (now.tv_sec == t->tmout.tv_sec && now.tv_usec >= t->tmout.tv_usec)) + { + if (t->flags & SHTIMER_LONGJMP) + sh_longjmp (t->jmpenv, 1); + else if (t->tm_handler) + return ((*t->tm_handler) (t)); + else + return 0; + } + + /* compute timeout */ + tv.tv_sec = t->tmout.tv_sec - now.tv_sec; + tv.tv_usec = t->tmout.tv_usec - now.tv_usec; + if (tv.tv_usec < 0) + { + tv.tv_sec--; + tv.tv_usec += USEC_PER_SEC; + } + +#if defined (HAVE_PSELECT) + ts.tv_sec = tv.tv_sec; + ts.tv_nsec = tv.tv_usec * 1000; +#else + sigemptyset (&prevmask); +#endif /* !HAVE_PSELECT */ + + nfd = (t->fd >= 0) ? t->fd + 1 : 0; + FD_ZERO (&readfds); + if (t->fd >= 0) + FD_SET (t->fd, &readfds); + +#if defined (HAVE_PSELECT) + r = pselect(nfd, &readfds, (fd_set *)0, (fd_set *)0, &ts, &blocked_sigs); +#else + sigprocmask (SIG_SETMASK, &blocked_sigs, &prevmask); + r = select(nfd, &readfds, (fd_set *)0, (fd_set *)0, &tv); + sigprocmask (SIG_SETMASK, &prevmask, NULL); +#endif + + if (r < 0) + return r; /* caller will handle */ + else if (r == 0 && (t->flags & SHTIMER_LONGJMP)) + sh_longjmp (t->jmpenv, 1); + else if (r == 0 && t->tm_handler) + return ((*t->tm_handler) (t)); + else + return r; +} +#endif /* !HAVE_TIMEVAL || !HAVE_SELECT */ + +int +shtimer_alrm (sh_timer *t) +{ + return 0; +} diff --git a/lib/sh/times.c b/lib/sh/times.c index 47ddf57..2423078 100644 --- a/lib/sh/times.c +++ b/lib/sh/times.c @@ -1,6 +1,6 @@ /* times.c - times(3) library function */ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,7 +30,7 @@ # include #endif /* HAVE_SYS_RESOURCE_H && HAVE_GETRUSAGE */ -extern long get_clk_tck __P((void)); +extern long get_clk_tck PARAMS((void)); #define CONVTCK(r) (r.tv_sec * clk_tck + r.tv_usec / (1000000 / clk_tck)) @@ -58,7 +58,7 @@ times(tms) tms->tms_cutime = CONVTCK(ru.ru_utime); tms->tms_cstime = CONVTCK(ru.ru_stime); - if (gettimeofday(&tv, (struct timezone *) 0) < 0) + if (gettimeofday(&tv, NULL) < 0) return ((clock_t)-1); rv = (clock_t)(CONVTCK(tv)); #else /* !HAVE_GETRUSAGE */ diff --git a/lib/sh/timeval.c b/lib/sh/timeval.c index 7bd9df8..f2ca762 100644 --- a/lib/sh/timeval.c +++ b/lib/sh/timeval.c @@ -25,6 +25,13 @@ #include #include +#include +#include + +#ifndef locale_decpoint +extern int locale_decpoint PARAMS((void)); +#endif + #include struct timeval * @@ -60,6 +67,32 @@ addtimeval (d, t1, t2) return d; } +struct timeval * +multimeval (d, m) + struct timeval *d; + int m; +{ + time_t t; + + t = d->tv_usec * m; + d->tv_sec = d->tv_sec * m + t / 1000000; + d->tv_usec = t % 1000000; + return d; +} + +struct timeval * +divtimeval (d, m) + struct timeval *d; + int m; +{ + time_t t; + + t = d->tv_sec; + d->tv_sec = t / m; + d->tv_usec = (d->tv_usec + 1000000 * (t % m)) / m; + return d; +} + /* Do "cpu = ((user + sys) * 10000) / real;" with timevals. Barely-tested code from Deven T. Corzine . */ int @@ -140,6 +173,7 @@ print_timeval (fp, tvp) minutes = timestamp / 60; seconds = timestamp % 60; - fprintf (fp, "%ldm%d.%03ds", minutes, seconds, seconds_fraction); + fprintf (fp, "%ldm%d%c%03ds", minutes, seconds, locale_decpoint (), seconds_fraction); } + #endif /* HAVE_TIMEVAL */ diff --git a/lib/sh/tmpfile.c b/lib/sh/tmpfile.c index a87c254..ef8b067 100644 --- a/lib/sh/tmpfile.c +++ b/lib/sh/tmpfile.c @@ -2,7 +2,7 @@ * tmpfile.c - functions to create and safely open temp files for the shell. */ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -31,6 +31,8 @@ # include #endif +#include + #include #include @@ -40,15 +42,20 @@ extern int errno; #endif -#define BASEOPENFLAGS (O_CREAT | O_TRUNC | O_EXCL) +#define BASEOPENFLAGS (O_CREAT | O_TRUNC | O_EXCL | O_BINARY) #define DEFAULT_TMPDIR "." /* bogus default, should be changed */ #define DEFAULT_NAMEROOT "shtmp" +/* Use ANSI-C rand() interface if random(3) is not available */ +#if !HAVE_RANDOM +#define random() rand() +#endif + extern pid_t dollar_dollar_pid; -static char *get_sys_tmpdir __P((void)); -static char *get_tmpdir __P((int)); +static char *get_sys_tmpdir PARAMS((void)); +static char *get_tmpdir PARAMS((int)); static char *sys_tmpdir = (char *)NULL; static int ntmpfiles; @@ -107,6 +114,23 @@ get_tmpdir (flags) return tdir; } +static void +sh_seedrand () +{ +#if HAVE_RANDOM + int d; + static int seeded = 0; + if (seeded == 0) + { + struct timeval tv; + + gettimeofday (&tv, NULL); + srandom (tv.tv_sec ^ tv.tv_usec ^ (getpid () << 16) ^ (uintptr_t)&d); + seeded = 1; + } +#endif +} + char * sh_mktmpname (nameroot, flags) char *nameroot; @@ -115,27 +139,37 @@ sh_mktmpname (nameroot, flags) char *filename, *tdir, *lroot; struct stat sb; int r, tdlen; + static int seeded = 0; filename = (char *)xmalloc (PATH_MAX + 1); tdir = get_tmpdir (flags); tdlen = strlen (tdir); lroot = nameroot ? nameroot : DEFAULT_NAMEROOT; + if (nameroot == 0) + flags &= ~MT_TEMPLATE; + + if ((flags & MT_TEMPLATE) && strlen (nameroot) > PATH_MAX) + flags &= ~MT_TEMPLATE; #ifdef USE_MKTEMP - sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); + if (flags & MT_TEMPLATE) + strcpy (filename, nameroot); + else + sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); if (mktemp (filename) == 0) { free (filename); filename = NULL; } #else /* !USE_MKTEMP */ + sh_seedrand (); 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++); + (unsigned long) ((flags & MT_USERANDOM) ? random () : ntmpfiles++); sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum); if (tmpnamelen > 0 && tmpnamelen < 32) filename[tdlen + 1 + tmpnamelen] = '\0'; @@ -160,15 +194,23 @@ sh_mktmpfd (nameroot, flags, 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; + if (nameroot == 0) + flags &= ~MT_TEMPLATE; + + if ((flags & MT_TEMPLATE) && strlen (nameroot) > PATH_MAX) + flags &= ~MT_TEMPLATE; #ifdef USE_MKSTEMP - sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); + if (flags & MT_TEMPLATE) + strcpy (filename, nameroot); + else + sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); fd = mkstemp (filename); if (fd < 0 || namep == 0) { @@ -179,12 +221,13 @@ sh_mktmpfd (nameroot, flags, namep) *namep = filename; return fd; #else /* !USE_MKSTEMP */ + sh_seedrand (); do { filenum = (filenum << 1) ^ (unsigned long) time ((time_t *)0) ^ (unsigned long) dollar_dollar_pid ^ - (unsigned long) ((flags & MT_USERANDOM) ? get_random_number () : ntmpfiles++); + (unsigned long) ((flags & MT_USERANDOM) ? random () : ntmpfiles++); sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum); if (tmpnamelen > 0 && tmpnamelen < 32) filename[tdlen + 1 + tmpnamelen] = '\0'; @@ -218,3 +261,51 @@ sh_mktmpfp (nameroot, flags, namep) close (fd); return fp; } + +char * +sh_mktmpdir (nameroot, flags) + char *nameroot; + int flags; +{ + char *filename, *tdir, *lroot, *dirname; + int fd, tdlen; + +#ifdef USE_MKDTEMP + filename = (char *)xmalloc (PATH_MAX + 1); + tdir = get_tmpdir (flags); + tdlen = strlen (tdir); + + lroot = nameroot ? nameroot : DEFAULT_NAMEROOT; + if (nameroot == 0) + flags &= ~MT_TEMPLATE; + + if ((flags & MT_TEMPLATE) && strlen (nameroot) > PATH_MAX) + flags &= ~MT_TEMPLATE; + + if (flags & MT_TEMPLATE) + strcpy (filename, nameroot); + else + sprintf (filename, "%s/%s.XXXXXX", tdir, lroot); + dirname = mkdtemp (filename); + if (dirname == 0) + { + free (filename); + filename = NULL; + } + return dirname; +#else /* !USE_MKDTEMP */ + filename = (char *)NULL; + do + { + filename = sh_mktmpname (nameroot, flags); + fd = mkdir (filename, 0700); + if (fd == 0) + break; + free (filename); + filename = (char *)NULL; + } + while (fd < 0 && errno == EEXIST); + + return (filename); +#endif /* !USE_MKDTEMP */ +} diff --git a/lib/sh/uconvert.c b/lib/sh/uconvert.c index 3d656df..457552e 100644 --- a/lib/sh/uconvert.c +++ b/lib/sh/uconvert.c @@ -1,7 +1,7 @@ /* uconvert - convert string representations of decimal numbers into whole number/fractional value pairs. */ -/* Copyright (C) 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 2008,2009,2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,16 +23,7 @@ #include "bashtypes.h" -#if defined (TIME_WITH_SYS_TIME) -# include -# include -#else -# if defined (HAVE_SYS_TIME_H) -# include -# else -# include -# endif -#endif +#include "posixtime.h" #if defined (HAVE_UNISTD_H) #include @@ -50,6 +41,7 @@ do { \ if (ip) *ip = ipart * mult; \ if (up) *up = upart; \ + if (ep) *ep = p; \ return (x); \ } while (0) @@ -61,12 +53,14 @@ 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. + EP, if non-null, gets the address of the character where conversion stops. Return 1 if value converted; 0 if invalid integer for either whole or fractional parts. */ int -uconvert(s, ip, up) +uconvert(s, ip, up, ep) char *s; long *ip, *up; + char **ep; { int n, mult; long ipart, upart; @@ -102,7 +96,14 @@ uconvert(s, ip, up) for (n = 0; n < 6 && p[n]; n++) { if (DIGIT(p[n]) == 0) - RETURN(0); + { + if (ep) + { + upart *= multiplier[n]; + p += n; /* To set EP */ + } + RETURN(0); + } upart = (upart * 10) + (p[n] - '0'); } @@ -112,5 +113,12 @@ uconvert(s, ip, up) if (n == 6 && p[6] >= '5' && p[6] <= '9') upart++; /* round up 1 */ + if (ep) + { + p += n; + while (DIGIT(*p)) + p++; + } + RETURN(1); } diff --git a/lib/sh/ufuncs.c b/lib/sh/ufuncs.c index ed526fe..4dc4853 100644 --- a/lib/sh/ufuncs.c +++ b/lib/sh/ufuncs.c @@ -1,6 +1,6 @@ /* ufuncs - sleep and alarm functions that understand fractional values */ -/* Copyright (C) 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 2008,2009-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,21 +22,24 @@ #include "bashtypes.h" -#if defined (TIME_WITH_SYS_TIME) -# include -# include -#else -# if defined (HAVE_SYS_TIME_H) -# include -# else -# include -# endif -#endif +#include "posixtime.h" #if defined (HAVE_UNISTD_H) #include #endif +#include +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if defined (HAVE_SELECT) +# include "posixselect.h" +# include "quit.h" +# include "trap.h" +# include "stat-time.h" +#endif + /* A version of `alarm' using setitimer if it's available. */ #if defined (HAVE_SETITIMER) @@ -80,17 +83,50 @@ falarm (secs, usecs) /* 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) +#if defined (HAVE_TIMEVAL) && (defined (HAVE_SELECT) || defined (HAVE_PSELECT)) int fsleep(sec, usec) unsigned int sec, usec; { + int e, r; + sigset_t blocked_sigs, prevmask; +#if defined (HAVE_PSELECT) + struct timespec ts; +#else struct timeval tv; +#endif + sigemptyset (&blocked_sigs); +# if defined (SIGCHLD) + sigaddset (&blocked_sigs, SIGCHLD); +# endif + +#if defined (HAVE_PSELECT) + ts.tv_sec = sec; + ts.tv_nsec = usec * 1000; +#else + sigemptyset (&prevmask); tv.tv_sec = sec; tv.tv_usec = usec; +#endif /* !HAVE_PSELECT */ + + do + { +#if defined (HAVE_PSELECT) + r = pselect(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &ts, &blocked_sigs); +#else + sigprocmask (SIG_SETMASK, &blocked_sigs, &prevmask); + r = select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv); + sigprocmask (SIG_SETMASK, &prevmask, NULL); +#endif + e = errno; + if (r < 0 && errno == EINTR) + return -1; /* caller will handle */ + errno = e; + } + while (r < 0 && errno == EINTR); - return select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv); + return r; } #else /* !HAVE_TIMEVAL || !HAVE_SELECT */ int diff --git a/lib/sh/unicode.c b/lib/sh/unicode.c new file mode 100644 index 0000000..d781353 --- /dev/null +++ b/lib/sh/unicode.c @@ -0,0 +1,339 @@ +/* unicode.c - functions to convert unicode characters */ + +/* Copyright (C) 2010-2020 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include + +#if defined (HANDLE_MULTIBYTE) + +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +#if HAVE_ICONV +# include +#endif + +#include + +#ifndef USHORT_MAX +# ifdef USHRT_MAX +# define USHORT_MAX USHRT_MAX +# else +# define USHORT_MAX ((unsigned short) ~(unsigned short)0) +# endif +#endif + +#if !defined (STREQ) +# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp ((a), (b)) == 0) +#endif /* !STREQ */ + +#if defined (HAVE_LOCALE_CHARSET) +extern const char *locale_charset PARAMS((void)); +#else +extern char *get_locale_var PARAMS((char *)); +#endif + +extern int locale_utf8locale; + +static int u32init = 0; +static int utf8locale = 0; +#if defined (HAVE_ICONV) +static iconv_t localconv; +#endif + +#ifndef HAVE_LOCALE_CHARSET +static char charsetbuf[40]; + +static char * +stub_charset () +{ + char *locale, *s, *t; + + locale = get_locale_var ("LC_CTYPE"); + if (locale == 0 || *locale == 0) + { + strcpy (charsetbuf, "ASCII"); + return charsetbuf; + } + s = strrchr (locale, '.'); + if (s) + { + strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1); + charsetbuf[sizeof (charsetbuf) - 1] = '\0'; + t = strchr (charsetbuf, '@'); + if (t) + *t = 0; + return charsetbuf; + } + strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1); + charsetbuf[sizeof (charsetbuf) - 1] = '\0'; + return charsetbuf; +} +#endif + +void +u32reset () +{ +#if defined (HAVE_ICONV) + if (u32init && localconv != (iconv_t)-1) + { + iconv_close (localconv); + localconv = (iconv_t)-1; + } +#endif + u32init = 0; + utf8locale = 0; +} + +/* u32toascii ? */ +int +u32tochar (x, s) + unsigned long x; + char *s; +{ + int l; + + l = (x <= UCHAR_MAX) ? 1 : ((x <= USHORT_MAX) ? 2 : 4); + + if (x <= UCHAR_MAX) + s[0] = x & 0xFF; + else if (x <= USHORT_MAX) /* assume unsigned short = 16 bits */ + { + s[0] = (x >> 8) & 0xFF; + s[1] = x & 0xFF; + } + else + { + s[0] = (x >> 24) & 0xFF; + s[1] = (x >> 16) & 0xFF; + s[2] = (x >> 8) & 0xFF; + s[3] = x & 0xFF; + } + s[l] = '\0'; + return l; +} + +int +u32tocesc (wc, s) + u_bits32_t wc; + char *s; +{ + int l; + + if (wc < 0x10000) + l = sprintf (s, "\\u%04X", wc); + else + l = sprintf (s, "\\U%08X", wc); + return l; +} + +/* Convert unsigned 32-bit int to utf-8 character string */ +int +u32toutf8 (wc, s) + u_bits32_t wc; + char *s; +{ + int l; + + if (wc < 0x0080) + { + s[0] = (char)wc; + l = 1; + } + else if (wc < 0x0800) + { + s[0] = (wc >> 6) | 0xc0; + s[1] = (wc & 0x3f) | 0x80; + l = 2; + } + else if (wc < 0x10000) + { + /* Technically, we could return 0 here if 0xd800 <= wc <= 0x0dfff */ + s[0] = (wc >> 12) | 0xe0; + s[1] = ((wc >> 6) & 0x3f) | 0x80; + s[2] = (wc & 0x3f) | 0x80; + l = 3; + } + else if (wc < 0x200000) + { + s[0] = (wc >> 18) | 0xf0; + s[1] = ((wc >> 12) & 0x3f) | 0x80; + s[2] = ((wc >> 6) & 0x3f) | 0x80; + s[3] = (wc & 0x3f) | 0x80; + l = 4; + } + /* Strictly speaking, UTF-8 doesn't have characters longer than 4 bytes */ + else if (wc < 0x04000000) + { + s[0] = (wc >> 24) | 0xf8; + s[1] = ((wc >> 18) & 0x3f) | 0x80; + s[2] = ((wc >> 12) & 0x3f) | 0x80; + s[3] = ((wc >> 6) & 0x3f) | 0x80; + s[4] = (wc & 0x3f) | 0x80; + l = 5; + } + else if (wc < 0x080000000) + { + s[0] = (wc >> 30) | 0xfc; + s[1] = ((wc >> 24) & 0x3f) | 0x80; + s[2] = ((wc >> 18) & 0x3f) | 0x80; + s[3] = ((wc >> 12) & 0x3f) | 0x80; + s[4] = ((wc >> 6) & 0x3f) | 0x80; + s[5] = (wc & 0x3f) | 0x80; + l = 6; + } + else + l = 0; + + s[l] = '\0'; + return l; +} + +/* Convert a 32-bit unsigned int (unicode) to a UTF-16 string. Rarely used, + only if sizeof(wchar_t) == 2. */ +int +u32toutf16 (c, s) + u_bits32_t c; + wchar_t *s; +{ + int l; + + l = 0; + if (c < 0x0d800 || (c >= 0x0e000 && c <= 0x0ffff)) + { + s[0] = (wchar_t) (c & 0xFFFF); + l = 1; + } + else if (c >= 0x10000 && c <= 0x010ffff) + { + c -= 0x010000; + s[0] = (wchar_t)((c >> 10) + 0xd800); + s[1] = (wchar_t)((c & 0x3ff) + 0xdc00); + l = 2; + } + s[l] = 0; + return l; +} + +/* convert a single unicode-32 character into a multibyte string and put the + result in S, which must be large enough (at least max(10,MB_LEN_MAX) bytes) */ +int +u32cconv (c, s) + unsigned long c; + char *s; +{ + wchar_t wc; + wchar_t ws[3]; + int n; +#if HAVE_ICONV + const char *charset; + char obuf[25], *optr; + size_t obytesleft; + const char *iptr; + size_t sn; +#endif + +#if __STDC_ISO_10646__ + wc = c; + if (sizeof (wchar_t) == 4 && c <= 0x7fffffff) + n = wctomb (s, wc); + else if (sizeof (wchar_t) == 2 && c <= 0x10ffff && u32toutf16 (c, ws)) + n = wcstombs (s, ws, MB_LEN_MAX); + else + n = -1; + if (n != -1) + return n; +#endif + +#if HAVE_ICONV + /* this is mostly from coreutils-8.5/lib/unicodeio.c */ + if (u32init == 0) + { + utf8locale = locale_utf8locale; + localconv = (iconv_t)-1; + if (utf8locale == 0) + { +#if HAVE_LOCALE_CHARSET + charset = locale_charset (); +#elif HAVE_NL_LANGINFO + charset = nl_langinfo (CODESET); +#else + charset = stub_charset (); +#endif + localconv = iconv_open (charset, "UTF-8"); + if (localconv == (iconv_t)-1) + /* We assume ASCII when presented with an unknown encoding. */ + localconv = iconv_open ("ASCII", "UTF-8"); + } + u32init = 1; + } + + /* NL_LANGINFO and locale_charset used when setting locale_utf8locale */ + + /* If we have a UTF-8 locale, convert to UTF-8 and return converted value. */ + n = u32toutf8 (c, s); + if (utf8locale) + return n; + + /* If the conversion is not supported, even the ASCII requested above, we + bail now. Currently we return the UTF-8 conversion. We could return + u32tocesc(). */ + if (localconv == (iconv_t)-1) + return n; + + optr = obuf; + obytesleft = sizeof (obuf); + iptr = s; + sn = n; + + iconv (localconv, NULL, NULL, NULL, NULL); + + if (iconv (localconv, (ICONV_CONST char **)&iptr, &sn, &optr, &obytesleft) == (size_t)-1) + { + /* You get ISO C99 escape sequences if iconv fails */ + n = u32tocesc (c, s); + return n; + } + + *optr = '\0'; + + /* number of chars to be copied is optr - obuf if we want to do bounds + checking */ + strcpy (s, obuf); + return (optr - obuf); +#endif /* HAVE_ICONV */ + + if (locale_utf8locale) + n = u32toutf8 (c, s); + else + n = u32tocesc (c, s); /* fallback is ISO C99 escape sequences */ + return n; +} +#else +void +u32reset () +{ +} +#endif /* HANDLE_MULTIBYTE */ diff --git a/lib/sh/utf8.c b/lib/sh/utf8.c new file mode 100644 index 0000000..fed2522 --- /dev/null +++ b/lib/sh/utf8.c @@ -0,0 +1,196 @@ +/* utf8.c - UTF-8 character handling functions */ + +/* Copyright (C) 2018 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include + +#ifdef HAVE_STDLIB_H +# include +#endif + +#include "bashansi.h" +#include "shmbutil.h" + +extern int locale_mb_cur_max; +extern int locale_utf8locale; + +#if defined (HANDLE_MULTIBYTE) + +char * +utf8_mbschr (s, c) + const char *s; + int c; +{ + return strchr (s, c); /* for now */ +} + +int +utf8_mbscmp (s1, s2) + const char *s1, *s2; +{ + /* Use the fact that the UTF-8 encoding preserves lexicographic order. */ + return strcmp (s1, s2); +} + +char * +utf8_mbsmbchar (str) + const char *str; +{ + register char *s; + + for (s = (char *)str; *s; s++) + if ((*s & 0xc0) == 0x80) + return s; + return (0); +} + +int +utf8_mbsnlen(src, srclen, maxlen) + const char *src; + size_t srclen; + int maxlen; +{ + register int sind, count; + + for (sind = count = 0; src[sind] && sind <= maxlen; sind++) + { + if ((src[sind] & 0xc0) != 0x80) + count++; + } + return (count); +} + +/* Adapted from GNU gnulib. Handles UTF-8 characters up to 4 bytes long */ +int +utf8_mblen (s, n) + const char *s; + size_t n; +{ + unsigned char c, c1, c2, c3; + + if (s == 0) + return (0); /* no shift states */ + if (n <= 0) + return (-1); + + c = (unsigned char)*s; + if (c < 0x80) + return (c != 0); + if (c >= 0xc2) + { + c1 = (unsigned char)s[1]; + if (c < 0xe0) + { + if (n == 1) + return -2; + + /* + * c c1 + * + * U+0080..U+07FF C2..DF 80..BF + */ + + if (n >= 2 && (c1 ^ 0x80) < 0x40) /* 0x80..0xbf */ + return 2; + } + else if (c < 0xf0) + { + if (n == 1) + return -2; + + /* + * c c1 c2 + * + * U+0800..U+0FFF E0 A0..BF 80..BF + * U+1000..U+CFFF E1..EC 80..BF 80..BF + * U+D000..U+D7FF ED 80..9F 80..BF + * U+E000..U+FFFF EE..EF 80..BF 80..BF + */ + + if ((c1 ^ 0x80) < 0x40 + && (c >= 0xe1 || c1 >= 0xa0) + && (c != 0xed || c1 < 0xa0)) + { + if (n == 2) + return -2; /* incomplete */ + + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + return 3; + } + } + else if (c <= 0xf4) + { + if (n == 1) + return -2; + + /* + * c c1 c2 c3 + * + * U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + * U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + * U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + */ + if (((c1 ^ 0x80) < 0x40) + && (c >= 0xf1 || c1 >= 0x90) + && (c < 0xf4 || (c == 0xf4 && c1 < 0x90))) + { + if (n == 2) + return -2; /* incomplete */ + + c2 = (unsigned char)s[2]; + if ((c2 ^ 0x80) < 0x40) + { + if (n == 3) + return -2; + + c3 = (unsigned char)s[3]; + if ((c3 ^ 0x80) < 0x40) + return 4; + } + } + } + } + /* invalid or incomplete multibyte character */ + return -1; +} + +/* We can optimize this if we know the locale is UTF-8, but needs to handle + malformed byte sequences. */ +size_t +utf8_mbstrlen(s) + const char *s; +{ + size_t clen, nc; + int mb_cur_max; + + nc = 0; + mb_cur_max = MB_CUR_MAX; + while (*s && (clen = (size_t)utf8_mblen(s, mb_cur_max)) != 0) + { + if (MB_INVALIDCH(clen)) + clen = 1; /* assume single byte */ + + s += clen; + nc++; + } + return nc; +} + +#endif diff --git a/lib/sh/wcsnwidth.c b/lib/sh/wcsnwidth.c new file mode 100644 index 0000000..9c7e7cc --- /dev/null +++ b/lib/sh/wcsnwidth.c @@ -0,0 +1,56 @@ +/* wcsnwidth.c - compute display width of wide character string, up to max + specified width, return length. */ + +/* Copyright (C) 2012 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include + +#if defined (HANDLE_MULTIBYTE) + +#include +#include +#include + +/* Return the number of wide characters that will be displayed from wide string + PWCS. If the display width exceeds MAX, return the number of wide chars + from PWCS required to display MAX characters on the screen. */ +int +wcsnwidth(pwcs, n, max) + const wchar_t *pwcs; + size_t n, max; +{ + wchar_t wc, *ws; + int len, l; + + len = 0; + ws = (wchar_t *)pwcs; + while (n-- > 0 && (wc = *ws++) != L'\0') + { + l = wcwidth (wc); + if (l < 0) + return (-1); + else if (l == max - len) + return (ws - pwcs); + else if (l > max - len) + return (--ws - pwcs); + len += l; + } + return (ws - pwcs); +} +#endif diff --git a/lib/sh/wcswidth.c b/lib/sh/wcswidth.c new file mode 100644 index 0000000..1a30d9f --- /dev/null +++ b/lib/sh/wcswidth.c @@ -0,0 +1,46 @@ +/* wcswidth.c - compute display width of wide character string */ + +/* Copyright (C) 2010 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#include + +#if defined (HANDLE_MULTIBYTE) && !defined (HAVE_WCSWIDTH) + +#include +#include +#include + +int +wcswidth(pwcs, n) + const wchar_t *pwcs; + size_t n; +{ + wchar_t wc; + int len, l; + + len = 0; + while (n-- > 0 && (wc = *pwcs++) != L'\0') + { + if ((l = wcwidth(wc)) < 0) + return (-1); + len += l; + } + return (len); +} +#endif diff --git a/lib/sh/winsize.c b/lib/sh/winsize.c index 64a9858..846fcd5 100644 --- a/lib/sh/winsize.c +++ b/lib/sh/winsize.c @@ -1,6 +1,6 @@ /* winsize.c - handle window size changes and information. */ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -32,9 +32,11 @@ /* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ +#if 0 #if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) # include #endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ +#endif #if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) # include @@ -66,9 +68,14 @@ extern int errno; extern int shell_tty; #if defined (READLINE) -extern void rl_set_screen_size __P((int, int)); +/* Let's not call readline, forcing readline to initialize the termcap/terminfo + variables it needs, unless we have to. */ +extern int interactive_shell; +extern int no_line_editing; +extern int bash_readline_initialized; +extern void rl_set_screen_size PARAMS((int, int)); #endif -extern void sh_set_lines_and_columns __P((int, int)); +extern void sh_set_lines_and_columns PARAMS((int, int)); void get_new_window_size (from_sig, rp, cp) @@ -85,12 +92,13 @@ get_new_window_size (from_sig, rp, cp) { 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 ((interactive_shell && no_line_editing == 0) || bash_readline_initialized) + rl_set_screen_size (win.ws_row, win.ws_col); +#endif 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 index bdbcd91..aa8199f 100644 --- a/lib/sh/zcatfd.c +++ b/lib/sh/zcatfd.c @@ -1,6 +1,6 @@ /* zcatfd - copy contents of file descriptor to another */ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -34,8 +34,12 @@ extern int errno; #endif -extern ssize_t zread __P((int, char *, size_t)); -extern int zwrite __P((int, char *, ssize_t)); +#ifndef ZBUFSIZ +# define ZBUFSIZ 4096 +#endif + +extern ssize_t zread PARAMS((int, char *, size_t)); +extern int zwrite PARAMS((int, char *, ssize_t)); /* Dump contents of file descriptor FD to OFD. FN is the filename for error messages (not used right now). */ @@ -46,7 +50,7 @@ zcatfd (fd, ofd, fn) { ssize_t nr; int rval; - char lbuf[128]; + char lbuf[ZBUFSIZ]; rval = 0; while (1) diff --git a/lib/sh/zgetline.c b/lib/sh/zgetline.c index 33ac830..5e1ef72 100644 --- a/lib/sh/zgetline.c +++ b/lib/sh/zgetline.c @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 2008-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -34,13 +34,13 @@ 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 *)); +extern ssize_t zread PARAMS((int, char *, size_t)); +extern ssize_t zreadc PARAMS((int, char *)); +extern ssize_t zreadintr PARAMS((int, char *, size_t)); +extern ssize_t zreadcintr PARAMS((int, char *)); -typedef ssize_t breadfunc_t __P((int, char *, size_t)); -typedef ssize_t creadfunc_t __P((int, char *)); +typedef ssize_t breadfunc_t PARAMS((int, char *, size_t)); +typedef ssize_t creadfunc_t PARAMS((int, char *)); /* Initial memory allocation for automatic growing buffer in zreadlinec */ #define GET_LINE_INITIAL_ALLOCATION 16 @@ -48,9 +48,12 @@ typedef ssize_t creadfunc_t __P((int, char *)); /* 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 + (1) using file descriptor instead of FILE *; + (2) the order of arguments: the file descriptor comes first; + (3) the addition of a fourth argument, DELIM; sets the delimiter to + be something other than newline if desired. If setting DELIM, + the next argument should be 1; and + (4) the addition of a fifth 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. @@ -58,13 +61,15 @@ typedef ssize_t creadfunc_t __P((int, char *)); Returns number of bytes read or -1 on error. */ ssize_t -zgetline (fd, lineptr, n, unbuffered_read) +zgetline (fd, lineptr, n, delim, unbuffered_read) int fd; char **lineptr; size_t *n; + int delim; int unbuffered_read; { - int nr, retval; + int retval; + size_t nr; char *line, c; if (lineptr == 0 || n == 0 || (*lineptr == 0 && *n != 0)) @@ -110,7 +115,7 @@ zgetline (fd, lineptr, n, unbuffered_read) line[nr] = c; nr++; - if (c == '\n') + if (c == delim) { line[nr] = '\0'; break; diff --git a/lib/sh/zmapfd.c b/lib/sh/zmapfd.c index 4000c4a..9ff50a4 100644 --- a/lib/sh/zmapfd.c +++ b/lib/sh/zmapfd.c @@ -1,6 +1,6 @@ /* zmapfd - read contents of file descriptor into a newly-allocated buffer */ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,7 +36,11 @@ extern int errno; #endif -extern ssize_t zread __P((int, char *, size_t)); +#ifndef ZBUFSIZ +# define ZBUFSIZ 4096 +#endif + +extern ssize_t zread PARAMS((int, char *, size_t)); /* Dump contents of file descriptor FD to *OSTR. FN is the filename for error messages (not used right now). */ @@ -48,12 +52,12 @@ zmapfd (fd, ostr, fn) { ssize_t nr; int rval; - char lbuf[128]; + char lbuf[ZBUFSIZ]; char *result; - int rsize, rind; + size_t rsize, rind; rval = 0; - result = (char *)xmalloc (rsize = 64); + result = (char *)xmalloc (rsize = ZBUFSIZ); rind = 0; while (1) @@ -66,14 +70,13 @@ zmapfd (fd, ostr, fn) } else if (nr < 0) { - rval = -1; free (result); if (ostr) *ostr = (char *)NULL; - break; + return -1; } - RESIZE_MALLOCED_BUFFER (result, rind, nr, rsize, 128); + RESIZE_MALLOCED_BUFFER (result, rind, nr, rsize, ZBUFSIZ); memcpy (result+rind, lbuf, nr); rind += nr; } diff --git a/lib/sh/zread.c b/lib/sh/zread.c index 0fd1199..dafb7f6 100644 --- a/lib/sh/zread.c +++ b/lib/sh/zread.c @@ -1,6 +1,6 @@ /* zread - read data from file descriptor into buffer with retries */ -/* Copyright (C) 1999-2002 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,6 +26,7 @@ # include #endif +#include #include #if !defined (errno) @@ -36,6 +37,17 @@ extern int errno; # define SEEK_CUR 1 #endif +#ifndef ZBUFSIZ +# define ZBUFSIZ 4096 +#endif + +extern int executing_builtin; + +extern void check_signals_and_traps (void); +extern void check_signals (void); +extern int signal_is_trapped (int); +extern int read_builtin_timeout (int); + /* Read LEN bytes from FD into BUF. Retry the read on EINTR. Any other error causes the loop to break. */ ssize_t @@ -46,8 +58,23 @@ zread (fd, buf, len) { ssize_t r; - while ((r = read (fd, buf, len)) < 0 && errno == EINTR) - ; + check_signals (); /* check for signals before a blocking read */ + /* should generalize into a mechanism where different parts of the shell can + `register' timeouts and have them checked here. */ + while (((r = read_builtin_timeout (fd)) < 0 || (r = read (fd, buf, len)) < 0) && + errno == EINTR) + { + int t; + t = errno; + /* XXX - bash-5.0 */ + /* We check executing_builtin and run traps here for backwards compatibility */ + if (executing_builtin) + check_signals_and_traps (); /* XXX - should it be check_signals()? */ + else + check_signals (); + errno = t; + } + return r; } @@ -90,6 +117,7 @@ zreadintr (fd, buf, len) char *buf; size_t len; { + check_signals (); return (read (fd, buf, len)); } @@ -97,7 +125,7 @@ zreadintr (fd, buf, len) 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 char lbuf[ZBUFSIZ]; static size_t lind, lused; ssize_t @@ -148,6 +176,34 @@ zreadcintr (fd, cp) return 1; } +/* Like zreadc, but read a specified number of characters at a time. Used + for `read -N'. */ +ssize_t +zreadn (fd, cp, len) + int fd; + char *cp; + size_t len; +{ + ssize_t nr; + + if (lind == lused || lused == 0) + { + if (len > sizeof (lbuf)) + len = sizeof (lbuf); + nr = zread (fd, lbuf, len); + lind = 0; + if (nr <= 0) + { + lused = 0; + return nr; + } + lused = nr; + } + if (cp) + *cp = lbuf[lind++]; + return 1; +} + void zreset () { @@ -160,14 +216,13 @@ void zsyncfd (fd) int fd; { - off_t off; - int r; + off_t off, r; off = lused - lind; r = 0; if (off > 0) r = lseek (fd, -off, SEEK_CUR); - if (r >= 0) + if (r != -1) lused = lind = 0; } diff --git a/lib/termcap/Makefile.in b/lib/termcap/Makefile.in index aeee47f..66dd7c1 100644 --- a/lib/termcap/Makefile.in +++ b/lib/termcap/Makefile.in @@ -20,7 +20,7 @@ # along with this program. If not, see . srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ diff --git a/lib/termcap/termcap.c b/lib/termcap/termcap.c index 7311349..87fae05 100644 --- a/lib/termcap/termcap.c +++ b/lib/termcap/termcap.c @@ -52,15 +52,18 @@ extern char *realloc (); #else /* not HAVE_CONFIG_H */ -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H #include -#include #else char *getenv (); char *malloc (); char *realloc (); #endif +#ifdef HAVE_STRING_H +#include +#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)) @@ -309,7 +312,7 @@ static int speeds[] = }; __private_extern__ -void +int tputs (str, nlines, outfun) register char *str; int nlines; @@ -335,7 +338,7 @@ tputs (str, nlines, outfun) #endif if (!str) - return; + return -1; while (*str >= '0' && *str <= '9') { @@ -372,6 +375,8 @@ tputs (str, nlines, outfun) while (padcount-- > 0) (*outfun) (PC); + + return 0; } /* Finding the termcap entry in the termcap data base. */ diff --git a/lib/termcap/termcap.h b/lib/termcap/termcap.h index 5d71595..b0e3061 100644 --- a/lib/termcap/termcap.h +++ b/lib/termcap/termcap.h @@ -29,7 +29,7 @@ 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 int tputs (const char *string, int nlines, int (*outfun) (int)); extern char *tparam (const char *ctlstring, char *buffer, int size, ...); diff --git a/lib/tilde/Makefile.in b/lib/tilde/Makefile.in index d5506c5..e61c671 100644 --- a/lib/tilde/Makefile.in +++ b/lib/tilde/Makefile.in @@ -4,7 +4,7 @@ # # #################################################################### -# Copyright (C) 1996-2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 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 @@ -20,7 +20,7 @@ # along with this program. If not, see . srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ @@ -42,6 +42,7 @@ PROFILE_FLAGS = @PROFILE_FLAGS@ CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ +STYLE_CFLAGS = @STYLE_CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @@ -52,8 +53,8 @@ BASHINCDIR = ${topdir}/include INCLUDES = -I. -I../.. -I$(topdir) -I${BASHINCDIR} -I$(topdir)/lib -CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) \ - ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS) +CCFLAGS = ${ASAN_CFLAGS} $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) \ + ${INCLUDES} $(STYLE_CFLAGS) $(LOCAL_CFLAGS) $(CFLAGS) .c.o: $(CC) -c $(CCFLAGS) $< diff --git a/lib/tilde/shell.c b/lib/tilde/shell.c index 40a95b6..9805a92 100644 --- a/lib/tilde/shell.c +++ b/lib/tilde/shell.c @@ -1,7 +1,7 @@ /* 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. +/* Copyright (C) 1998-2017 Free Software Foundation, Inc. This file is part of the GNU Tilde Library. @@ -49,21 +49,31 @@ extern struct passwd *getpwuid (); #endif /* !HAVE_GETPW_DECLS */ char * -get_env_value (varname) - char *varname; +get_env_value (char *varname) { return ((char *)getenv (varname)); } +/* If we're not using $HOME, assume that the passwd file information won't + change while this shell instance is running. */ char * -get_home_dir () +get_home_dir (void) { - char *home_dir; + static char *home_dir = (char *)NULL; struct passwd *entry; - home_dir = (char *)NULL; + if (home_dir) + return (home_dir); + +#if defined (HAVE_GETPWUID) entry = getpwuid (getuid ()); if (entry) - home_dir = entry->pw_dir; + home_dir = savestring (entry->pw_dir); +#endif + +#if defined (HAVE_GETPWENT) + endpwent (); /* some systems need this */ +#endif + return (home_dir); } diff --git a/lib/tilde/tilde.c b/lib/tilde/tilde.c index 088ff15..d678a31 100644 --- a/lib/tilde/tilde.c +++ b/lib/tilde/tilde.c @@ -1,6 +1,6 @@ /* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */ -/* Copyright (C) 1988-2009 Free Software Foundation, Inc. +/* Copyright (C) 1988-2020 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. @@ -57,10 +57,10 @@ static void *xmalloc (), *xrealloc (); #if !defined (HAVE_GETPW_DECLS) # if defined (HAVE_GETPWUID) -extern struct passwd *getpwuid PARAMS((uid_t)); +extern struct passwd *getpwuid (uid_t); # endif # if defined (HAVE_GETPWNAM) -extern struct passwd *getpwnam PARAMS((const char *)); +extern struct passwd *getpwnam (const char *); # endif #endif /* !HAVE_GETPW_DECLS */ @@ -79,8 +79,8 @@ extern struct passwd *getpwnam PARAMS((const char *)); /* 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 *)); +extern char *sh_get_home_dir (void); +extern char *sh_get_env_value (const char *); /* The default value of tilde_additional_prefixes. This is set to whitespace preceding a tilde so that simple programs which do not @@ -116,18 +116,16 @@ char **tilde_additional_prefixes = (char **)default_prefixes; `:' 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)); +static int tilde_find_prefix (const char *, int *); +static int tilde_find_suffix (const char *); +static char *isolate_tilde_prefix (const char *, int *); +static char *glue_prefix_and_suffix (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; +tilde_find_prefix (const char *string, int *len) { register int i, j, string_len; register char **prefixes; @@ -160,8 +158,7 @@ tilde_find_prefix (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; +tilde_find_suffix (const char *string) { register int i, j, string_len; register char **suffixes; @@ -189,8 +186,7 @@ tilde_find_suffix (string) /* Return a new string which is the result of tilde expanding STRING. */ char * -tilde_expand (string) - const char *string; +tilde_expand (const char *string) { char *result; int result_size, result_index; @@ -236,7 +232,11 @@ tilde_expand (string) string += end; expansion = tilde_expand_word (tilde_word); - xfree (tilde_word); + + if (expansion == 0) + expansion = tilde_word; + else + xfree (tilde_word); len = strlen (expansion); #ifdef __CYGWIN__ @@ -263,9 +263,7 @@ tilde_expand (string) 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; +isolate_tilde_prefix (const char *fname, int *lenp) { char *ret; int i; @@ -289,9 +287,7 @@ isolate_tilde_prefix (fname, lenp) 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; +tilde_find_word (const char *fname, int flags, int *lenp) { int x; char *r; @@ -319,10 +315,7 @@ tilde_find_word (fname, flags, lenp) /* 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; +glue_prefix_and_suffix (char *prefix, const char *suffix, int suffind) { char *ret; int plen, slen; @@ -340,8 +333,7 @@ glue_prefix_and_suffix (prefix, suffix, suffind) 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; +tilde_expand_word (const char *filename) { char *dirname, *expansion, *username; int user_len; @@ -360,6 +352,10 @@ tilde_expand_word (filename) { /* Prefix $HOME to the rest of the string. */ expansion = sh_get_env_value ("HOME"); +#if defined (_WIN32) + if (expansion == 0) + expansion = sh_get_env_value ("APPDATA"); +#endif /* If there is no HOME variable, look up the directory in the password database. */ @@ -378,7 +374,7 @@ tilde_expand_word (filename) { dirname = glue_prefix_and_suffix (expansion, filename, user_len); xfree (username); - free (expansion); + xfree (expansion); return (dirname); } } @@ -401,7 +397,7 @@ tilde_expand_word (filename) if (expansion) { dirname = glue_prefix_and_suffix (expansion, filename, user_len); - free (expansion); + xfree (expansion); } } /* If we don't have a failure hook, or if the failure hook did not @@ -426,9 +422,7 @@ tilde_expand_word (filename) #undef NULL #include -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { char *result, line[512]; int done = 0; @@ -456,11 +450,10 @@ main (argc, argv) exit (0); } -static void memory_error_and_abort (); +static void memory_error_and_abort (void); static void * -xmalloc (bytes) - size_t bytes; +xmalloc (size_t bytes) { void *temp = (char *)malloc (bytes); @@ -470,9 +463,7 @@ xmalloc (bytes) } static void * -xrealloc (pointer, bytes) - void *pointer; - int bytes; +xrealloc (void *pointer, int bytes) { void *temp; @@ -488,7 +479,7 @@ xrealloc (pointer, bytes) } static void -memory_error_and_abort () +memory_error_and_abort (void) { fprintf (stderr, "readline: out of virtual memory\n"); abort (); diff --git a/lib/tilde/tilde.h b/lib/tilde/tilde.h index e26dd04..bc8022a 100644 --- a/lib/tilde/tilde.h +++ b/lib/tilde/tilde.h @@ -1,6 +1,6 @@ /* tilde.h: Externally available variables and function in libtilde.a. */ -/* Copyright (C) 1992-2009 Free Software Foundation, Inc. +/* Copyright (C) 1992-2009,2021 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 @@ -27,19 +27,7 @@ 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 *)); +typedef char *tilde_hook_func_t (char *); /* If non-null, this contains the address of a function that the application wants called before trying the standard tilde expansions. The function @@ -64,14 +52,14 @@ extern char **tilde_additional_prefixes; extern char **tilde_additional_suffixes; /* Return a new string which is the result of tilde expanding STRING. */ -extern char *tilde_expand PARAMS((const char *)); +extern char *tilde_expand (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 *)); +extern char *tilde_expand_word (const char *); /* Find the portion of the string beginning with ~ that should be expanded. */ -extern char *tilde_find_word PARAMS((const char *, int, int *)); +extern char *tilde_find_word (const char *, int, int *); #ifdef __cplusplus } diff --git a/locale.c b/locale.c index 2f2e9fc..fabf7b1 100644 --- a/locale.c +++ b/locale.c @@ -1,6 +1,6 @@ /* locale.c - Miscellaneous internationalization functions. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2009,2012,2016-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -26,6 +26,10 @@ # include #endif +#if HAVE_LANGINFO_CODESET +# include +#endif + #include "bashintl.h" #include "bashansi.h" #include @@ -39,6 +43,12 @@ extern int errno; #endif +int locale_utf8locale; +int locale_mb_cur_max; /* value of MB_CUR_MAX for current locale (LC_CTYPE) */ +int locale_shiftstates = 0; + +int singlequote_translations = 0; /* single-quote output of $"..." */ + extern int dump_translatable_strings, dump_po_strings; /* The current locale when the program begins */ @@ -58,9 +68,10 @@ 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 int reset_locale_vars PARAMS((void)); -static void locale_setblanks __P((void)); +static void locale_setblanks PARAMS((void)); +static int locale_isutf8 PARAMS((char *)); /* Set the value of default_locale and make the current locale the system default locale. This should be called very early in main(). */ @@ -71,9 +82,19 @@ set_default_locale () default_locale = setlocale (LC_ALL, ""); if (default_locale) default_locale = savestring (default_locale); +#else + default_locale = savestring ("C"); #endif /* HAVE_SETLOCALE */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + + locale_mb_cur_max = MB_CUR_MAX; + locale_utf8locale = locale_isutf8 (default_locale); +#if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +#else + locale_shiftstates = 0; +#endif } /* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC and @@ -92,6 +113,16 @@ set_default_locale_vars () { setlocale (LC_CTYPE, lc_all); locale_setblanks (); + locale_mb_cur_max = MB_CUR_MAX; + locale_utf8locale = locale_isutf8 (lc_all); + +# if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +# else + locale_shiftstates = 0; +# endif + + u32reset (); } # endif @@ -126,10 +157,8 @@ set_default_locale_vars () { 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 + if (default_dir && *default_dir) + bindtextdomain (default_domain, default_dir); } val = get_string_value ("TEXTDOMAINDIR"); @@ -157,10 +186,8 @@ set_locale_var (var, value) { 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 + if (default_dir && *default_dir) + bindtextdomain (default_domain, default_dir); return (1); } else if (var[0] == 'T') /* TEXTDOMAINDIR */ @@ -194,6 +221,16 @@ set_locale_var (var, value) internal_warning(_("setlocale: LC_ALL: cannot change locale (%s): %s"), lc_all, strerror (errno)); } locale_setblanks (); + locale_mb_cur_max = MB_CUR_MAX; + /* if LC_ALL == "", reset_locale_vars has already called this */ + if (*lc_all && x) + locale_utf8locale = locale_isutf8 (lc_all); +# if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +# else + locale_shiftstates = 0; +# endif + u32reset (); return r; #else return (1); @@ -208,6 +245,16 @@ set_locale_var (var, value) { x = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")); locale_setblanks (); + locale_mb_cur_max = MB_CUR_MAX; + /* if setlocale() returns NULL, the locale is not changed */ + if (x) + locale_utf8locale = locale_isutf8 (x); +#if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +#else + locale_shiftstates = 0; +#endif + u32reset (); } # endif } @@ -267,7 +314,7 @@ set_lang (var, value) lang = (char *)xmalloc (1); lang[0] = '\0'; } - + return ((lc_all == 0 || *lc_all == 0) ? reset_locale_vars () : 0); } @@ -297,7 +344,7 @@ get_locale_var (var) locale = lc_all; if (locale == 0 || *locale == 0) - locale = get_string_value (var); + locale = get_string_value (var); /* XXX - no mem leak */ if (locale == 0 || *locale == 0) locale = lang; if (locale == 0 || *locale == 0) @@ -315,15 +362,16 @@ get_locale_var (var) static int reset_locale_vars () { - char *t; + char *t, *x; #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; + x = 0; # if defined (LC_CTYPE) - t = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")); + x = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")); # endif # if defined (LC_COLLATE) t = setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE")); @@ -339,11 +387,20 @@ reset_locale_vars () # endif locale_setblanks (); - + locale_mb_cur_max = MB_CUR_MAX; + if (x) + locale_utf8locale = locale_isutf8 (x); +# if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); +# else + locale_shiftstates = 0; +# endif + u32reset (); #endif return 1; } +#if defined (TRANSLATABLE_STRINGS) /* 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 @@ -458,7 +515,7 @@ mk_msgstr (string, foundnlp) by the caller. The length of the translated string is returned in LENP, if non-null. */ char * -localeexpand (string, start, end, lineno, lenp) +locale_expand (string, start, end, lineno, lenp) char *string; int start, end, lineno, *lenp; { @@ -511,6 +568,7 @@ localeexpand (string, start, end, lineno, lenp) return (temp); } } +#endif /* Set every character in the character class to be a shell break character for the lexical analyzer when the locale changes. */ @@ -521,7 +579,7 @@ locale_setblanks () for (x = 0; x < sh_syntabsiz; x++) { - if (isblank (x)) + if (isblank ((unsigned char)x)) sh_syntaxtab[x] |= CSHBRK|CBLANK; else if (member (x, shell_break_chars)) { @@ -532,3 +590,56 @@ locale_setblanks () sh_syntaxtab[x] &= ~(CSHBRK|CBLANK); } } + +/* Parse a locale specification + language[_territory][.codeset][@modifier][+special][,[sponsor][_revision]] + and return TRUE if the codeset is UTF-8 or utf8 */ +static int +locale_isutf8 (lspec) + char *lspec; +{ + char *cp, *encoding; + +#if HAVE_LANGINFO_CODESET + cp = nl_langinfo (CODESET); + return (STREQ (cp, "UTF-8") || STREQ (cp, "utf8")); +#elif HAVE_LOCALE_CHARSET + cp = locale_charset (); + return (STREQ (cp, "UTF-8") || STREQ (cp, "utf8")); +#else + /* Take a shot */ + for (cp = lspec; *cp && *cp != '@' && *cp != '+' && *cp != ','; cp++) + { + if (*cp == '.') + { + for (encoding = ++cp; *cp && *cp != '@' && *cp != '+' && *cp != ','; cp++) + ; + /* The encoding (codeset) is the substring between encoding and cp */ + if ((cp - encoding == 5 && STREQN (encoding, "UTF-8", 5)) || + (cp - encoding == 4 && STREQN (encoding, "utf8", 4))) + return 1; + else + return 0; + } + } + return 0; +#endif +} + +#if defined (HAVE_LOCALECONV) +int +locale_decpoint () +{ + struct lconv *lv; + + lv = localeconv (); + return (lv && lv->decimal_point && lv->decimal_point[0]) ? lv->decimal_point[0] : '.'; +} +#else +# undef locale_decpoint +int +locale_decpoint () +{ + return '.'; +} +#endif diff --git a/logging.c b/logging.c index 82ade9c..8a5a9d0 100644 --- a/logging.c +++ b/logging.c @@ -29,6 +29,7 @@ #include #include +#include "logging.h" #include "logmessage.h" /* diff --git a/logging.h b/logging.h new file mode 100644 index 0000000..dbb41f8 --- /dev/null +++ b/logging.h @@ -0,0 +1,10 @@ + +#if !defined(_LOGGING_H_) +#define _LOGGING_H_ + +#include "jobs.h" + +extern void initialize_logging (); +extern void log_process_exit (PROCESS *child); + +#endif diff --git a/m4/codeset.m4 b/m4/codeset.m4 new file mode 100644 index 0000000..280f556 --- /dev/null +++ b/m4/codeset.m4 @@ -0,0 +1,24 @@ +# codeset.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[char* cs = nl_langinfo(CODESET); return !cs;]])], + [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 and nl_langinfo(CODESET).]) + fi +]) diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 new file mode 100644 index 0000000..ec9f221 --- /dev/null +++ b/m4/extern-inline.m4 @@ -0,0 +1,114 @@ +dnl 'extern inline' a la ISO C99. + +dnl Copyright 2012-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_EXTERN_INLINE], +[ + AH_VERBATIM([extern_inline], +[/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif]) +]) diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4 new file mode 100644 index 0000000..6ab3387 --- /dev/null +++ b/m4/fcntl-o.m4 @@ -0,0 +1,139 @@ +# fcntl-o.m4 serial 6 +dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Paul Eggert. + +AC_PREREQ([2.60]) + +# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. +# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. +# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. +AC_DEFUN([gl_FCNTL_O_FLAGS], +[ + dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CHECK_FUNCS_ONCE([symlink]) + AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + ]], + [[ + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result;]])], + [gl_cv_header_working_fcntl_h=yes], + [case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac], + [case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac + ]) + ]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], + [Define to 1 if O_NOATIME works.]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], + [Define to 1 if O_NOFOLLOW works.]) +]) diff --git a/m4/gettext.m4 b/m4/gettext.m4 new file mode 100644 index 0000000..8231ce0 --- /dev/null +++ b/m4/gettext.m4 @@ -0,0 +1,419 @@ +# gettext.m4 serial 69 (gettext-0.19.9) +dnl Copyright (C) 1995-2014, 2016, 2018-2019, 2021 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006, 2008-2010. +dnl +dnl Modified for bash use by Chet Ramey , 2021 + +dnl Macro to add for using GNU gettext. + +dnl Usage: BASH_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 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([BASH_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], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + 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 { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "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 not documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + 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. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#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 +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "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_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_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_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 { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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 $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + 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 -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + 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 { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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 { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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. + INTLOBJS= + 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 gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + + +dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) diff --git a/m4/glibc2.m4 b/m4/glibc2.m4 new file mode 100644 index 0000000..17a7004 --- /dev/null +++ b/m4/glibc2.m4 @@ -0,0 +1,31 @@ +# glibc2.m4 serial 3 +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2019 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Test for the GNU C Library, version 2.0 or newer. +# From Bruno Haible. + +AC_DEFUN([gt_GLIBC2], + [ + AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], + [ac_cv_gnu_library_2], + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif +#endif + ], + [ac_cv_gnu_library_2=yes], + [ac_cv_gnu_library_2=no]) + ] + ) + AC_SUBST([GLIBC2]) + GLIBC2="$ac_cv_gnu_library_2" + ] +) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 new file mode 100644 index 0000000..0ab0f23 --- /dev/null +++ b/m4/glibc21.m4 @@ -0,0 +1,34 @@ +# glibc21.m4 serial 5 +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2019 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Test for the GNU C Library, version 2.1 or newer, or uClibc. +# From Bruno Haible. + +AC_DEFUN([gl_GLIBC21], + [ + AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], + [ac_cv_gnu_library_2_1], + [AC_EGREP_CPP([Lucky], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif +#ifdef __UCLIBC__ + Lucky user +#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" + ] +) diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4 new file mode 100644 index 0000000..4407296 --- /dev/null +++ b/m4/host-cpu-c-abi.m4 @@ -0,0 +1,644 @@ +# host-cpu-c-abi.m4 serial 11 +dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[4567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h < +#include + ]], + [[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_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[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_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + 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]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) +gl_iconv_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_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || 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([ + $am_cv_proto_iconv]) + else + dnl When compiling GNU libiconv on a system that does not have iconv yet, + dnl pick the POSIX compliant declaration without 'const'. + am_cv_proto_iconv_arg1="" + fi + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) +]) diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4 new file mode 100644 index 0000000..40dd43b --- /dev/null +++ b/m4/intdiv0.m4 @@ -0,0 +1,87 @@ +# intdiv0.m4 serial 6 (gettext-0.18.2) +dnl Copyright (C) 2002, 2007-2008, 2010-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +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, + [ + gt_cv_int_divbyzero_sigfpe= +changequote(,)dnl + case "$host_os" in + macos* | darwin[6-9]* | darwin[1-9][0-9]*) + # On Mac OS X 10.2 or newer, just assume the same as when cross- + # compiling. If we were to perform the real test, 1 Crash Report + # dialog window would pop up. + case "$host_cpu" in + i[34567]86 | x86_64) + gt_cv_int_divbyzero_sigfpe="guessing yes" ;; + esac + ;; + esac +changequote([,])dnl + if test -z "$gt_cv_int_divbyzero_sigfpe"; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include + +static void +sigfpe_handler (int sig) +{ + /* 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 xnan; + +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; + xnan = y / y; + exit (2); +} +]])], + [gt_cv_int_divbyzero_sigfpe=yes], + [gt_cv_int_divbyzero_sigfpe=no], + [ + # Guess based on the CPU. +changequote(,)dnl + case "$host_cpu" in + alpha* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac +changequote([,])dnl + ]) + fi + ]) + 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.]) +]) diff --git a/m4/intl-thread-locale.m4 b/m4/intl-thread-locale.m4 new file mode 100644 index 0000000..3ecba86 --- /dev/null +++ b/m4/intl-thread-locale.m4 @@ -0,0 +1,183 @@ +# intl-thread-locale.m4 serial 4 +dnl Copyright (C) 2015-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Check how to retrieve the name of a per-thread locale (POSIX locale_t). +dnl Sets gt_nameless_locales. +AC_DEFUN([gt_INTL_THREAD_LOCALE_NAME], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade Solaris to define 'locale_t'. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl Test whether uselocale() exists and works at all. + gt_FUNC_USELOCALE + + dnl On OpenBSD >= 6.2, the locale_t type and the uselocale(), newlocale(), + dnl duplocale(), freelocale() functions exist but are effectively useless, + dnl because the locale_t value depends only on the LC_CTYPE category of the + dnl locale and furthermore contains only one bit of information (it + dnl distinguishes the "C" locale from the *.UTF-8 locales). See + dnl . + dnl In the setlocale() implementation they have thought about the programs + dnl that use the API ("Even though only LC_CTYPE has any effect in the + dnl OpenBSD base system, store complete information about the global locale, + dnl such that third-party software can access it"), but for uselocale() + dnl they did not think about the programs. + dnl In this situation, even the HAVE_NAMELESS_LOCALES support does not work. + dnl So, define HAVE_FAKE_LOCALES and disable all locale_t support. + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CHECK_HEADERS_ONCE([xlocale.h]) + AC_CACHE_CHECK([for fake locale system (OpenBSD)], + [gt_cv_locale_fake], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + locale_t loc1, loc2; + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; + if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; + loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); + loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); + return !(loc1 == loc2); +}]])], + [gt_cv_locale_fake=yes], + [gt_cv_locale_fake=no], + [dnl Guess the locale system is fake only on OpenBSD. + case "$host_os" in + openbsd*) gt_cv_locale_fake="guessing yes" ;; + *) gt_cv_locale_fake="guessing no" ;; + esac + ]) + ]) + ;; + *) gt_cv_locale_fake=no ;; + esac + case "$gt_cv_locale_fake" in + *yes) + AC_DEFINE([HAVE_FAKE_LOCALES], [1], + [Define if the locale_t type contains insufficient information, as on OpenBSD.]) + ;; + esac + + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CACHE_CHECK([for Solaris 11.4 locale system], + [gt_cv_locale_solaris114], + [case "$host_os" in + solaris*) + dnl Test whether defines locale_t as a typedef of + dnl 'struct _LC_locale_t **' (whereas Illumos defines it as a + dnl typedef of 'struct _locale *'). + dnl Another possible test would be to include + dnl and test whether it defines the _LC_core_data_locale_t type. + dnl This type was added in Solaris 11.4. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + struct _LC_locale_t *x; + locale_t y; + ]], + [[*y = x;]])], + [gt_cv_locale_solaris114=yes], + [gt_cv_locale_solaris114=no]) + ;; + *) gt_cv_locale_solaris114=no ;; + esac + ]) + ;; + *) gt_cv_locale_solaris114=no ;; + esac + if test $gt_cv_locale_solaris114 = yes; then + AC_DEFINE([HAVE_SOLARIS114_LOCALES], [1], + [Define if the locale_t type is as on Solaris 11.4.]) + fi + + dnl Solaris 12 will maybe provide getlocalename_l. If it does, it will + dnl improve the implementation of gl_locale_name_thread(), by removing + dnl the use of undocumented structures. + case "$gt_cv_func_uselocale_works" in + *yes) + AC_CHECK_FUNCS([getlocalename_l]) + ;; + esac + + dnl This code is for future use, in case we some day have to port to a + dnl platform where the locale_t type does not provide access to the name of + dnl each locale category. This code has the drawback that it requires the + dnl gnulib overrides of 'newlocale', 'duplocale', 'freelocale', which is a + dnl problem for GNU libunistring. Therefore try hard to avoid enabling this + dnl code! + gt_nameless_locales=no + if false; then + gt_nameless_locales=yes + AC_DEFINE([HAVE_NAMELESS_LOCALES], [1], + [Define if the locale_t type does not contain the name of each locale category.]) + fi +]) + +dnl Tests whether uselocale() exists and is usable. +dnl Sets gt_cv_func_uselocale_works. Defines HAVE_WORKING_USELOCALE. +AC_DEFUN([gt_FUNC_USELOCALE], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade Solaris to define 'locale_t'. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_FUNCS_ONCE([uselocale]) + + dnl On AIX 7.2, the uselocale() function is not documented and leads to + dnl crashes in subsequent setlocale() invocations. + if test $ac_cv_func_uselocale = yes; then + AC_CHECK_HEADERS_ONCE([xlocale.h]) + AC_CACHE_CHECK([whether uselocale works], + [gt_cv_func_uselocale_works], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_XLOCALE_H +# include +#endif +int main () +{ + uselocale (NULL); + setlocale (LC_ALL, "en_US.UTF-8"); + return 0; +}]])], + [gt_cv_func_uselocale_works=yes], + [gt_cv_func_uselocale_works=no], + [# Guess no on AIX, yes otherwise. + case "$host_os" in + aix*) gt_cv_func_uselocale_works="guessing no" ;; + *) gt_cv_func_uselocale_works="guessing yes" ;; + esac + ]) + ]) + else + gt_cv_func_uselocale_works=no + fi + case "$gt_cv_func_uselocale_works" in + *yes) + AC_DEFINE([HAVE_WORKING_USELOCALE], [1], + [Define if the uselocale function exists any may safely be called.]) + ;; + esac +]) diff --git a/m4/intl.m4 b/m4/intl.m4 new file mode 100644 index 0000000..b481c50 --- /dev/null +++ b/m4/intl.m4 @@ -0,0 +1,312 @@ +# intl.m4 serial 34 (gettext-0.19.9) +dnl Copyright (C) 1995-2014, 2016-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2009. + +AC_PREREQ([2.60]) + +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([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([gt_GLIBC2])dnl + AC_REQUIRE([gl_VISIBILITY])dnl + AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl + AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl + AC_REQUIRE([gt_TYPE_WCHAR_T])dnl + AC_REQUIRE([gt_TYPE_WINT_T])dnl + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gt_TYPE_INTMAX_T]) + AC_REQUIRE([gt_PRINTF_POSIX]) + AC_REQUIRE([gl_GLIBC21])dnl + AC_REQUIRE([gl_XSIZE])dnl + AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl + AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME]) + AC_REQUIRE([gt_INTL_MACOSX])dnl + AC_REQUIRE([gl_EXTERN_INLINE])dnl + AC_REQUIRE([gt_GL_ATTRIBUTE])dnl + AC_REQUIRE([AC_C_FLEXIBLE_ARRAY_MEMBER])dnl + + dnl In projects that use gnulib, use gl_PROG_AR_RANLIB. + dnl The '][' hides this use from 'aclocal'. + m4_ifdef([g][l_PROG_AR_RANLIB], + [AC_REQUIRE([g][l_PROG_AR_RANLIB])], + [AC_REQUIRE([AC_PROG_RANLIB]) + dnl Use Automake-documented default values for AR and ARFLAGS, but prefer + dnl ${host}-ar over ar (useful for cross-compiling). + AC_CHECK_TOOL([AR], [ar], [ar]) + if test -z "$ARFLAGS"; then + ARFLAGS='cr' + fi + AC_SUBST([AR]) + AC_SUBST([ARFLAGS]) + ]) + + dnl Support for automake's --enable-silent-rules. + case "$enable_silent_rules" in + yes) INTL_DEFAULT_VERBOSITY=0;; + no) INTL_DEFAULT_VERBOSITY=1;; + *) INTL_DEFAULT_VERBOSITY=1;; + esac + AC_SUBST([INTL_DEFAULT_VERBOSITY]) + + AC_CHECK_TYPE([ptrdiff_t], , + [AC_DEFINE([ptrdiff_t], [long], + [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) + ]) + AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h]) + AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ + snprintf strnlen uselocale wcslen wcsnlen mbrtowc wcrtomb]) + + dnl Use the _snprintf function only if it is declared (because on NetBSD it + dnl is defined as a weak alias of snprintf; we prefer to use the latter). + AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include ]) + + dnl Use the *_unlocked functions only if they are declared. + dnl (because some of them were defined without being declared in Solaris + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built + dnl on Solaris 2.5.1 to run on Solaris 2.6). + AC_CHECK_DECLS([getc_unlocked], , , [#include ]) + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + AC_SUBST([HAVE_POSIX_PRINTF]) + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + AC_SUBST([HAVE_ASPRINTF]) + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + AC_SUBST([HAVE_SNPRINTF]) + if test "$ac_cv_func_newlocale" = yes; then + HAVE_NEWLOCALE=1 + else + HAVE_NEWLOCALE=0 + fi + AC_SUBST([HAVE_NEWLOCALE]) + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi + AC_SUBST([HAVE_WPRINTF]) + + AM_LANGINFO_CODESET + gt_LC_MESSAGES + + if test $gt_nameless_locales = yes; then + HAVE_NAMELESS_LOCALES=1 + else + HAVE_NAMELESS_LOCALES=0 + fi + AC_SUBST([HAVE_NAMELESS_LOCALES]) + + dnl Compilation on mingw and Cygwin needs special Makefile rules, because + dnl 1. when we install a shared library, we must arrange to export + dnl auxiliary pointer variables for every exported variable, + dnl 2. when we install a shared library and a static library simultaneously, + dnl the include file specifies __declspec(dllimport) and therefore we + dnl must arrange to define the auxiliary pointer variables for the + dnl exported variables _also_ in the static library. + if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac + else + is_woe32dll=no + fi + WOE32DLL=$is_woe32dll + AC_SUBST([WOE32DLL]) + + dnl On mingw and Cygwin, we can activate special Makefile rules which add + dnl version information to the shared libraries and executables. + case "$host_os" in + mingw* | cygwin*) is_woe32=yes ;; + *) is_woe32=no ;; + esac + WOE32=$is_woe32 + AC_SUBST([WOE32]) + if test $WOE32 = yes; then + dnl Check for a program that compiles Windows resource files. + AC_CHECK_TOOL([WINDRES], [windres]) + fi + + dnl Rename some macros and functions used for locking. + AH_BOTTOM([ +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock +#define glthread_in_use libintl_thread_in_use +#define glthread_lock_init_func libintl_lock_init_func +#define glthread_lock_lock_func libintl_lock_lock_func +#define glthread_lock_unlock_func libintl_lock_unlock_func +#define glthread_lock_destroy_func libintl_lock_destroy_func +#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded +#define glthread_rwlock_init_func libintl_rwlock_init_func +#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded +#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func +#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded +#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func +#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded +#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func +#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded +#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func +#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded +#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func +#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded +#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func +#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded +#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func +#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded +#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func +#define glthread_once_func libintl_once_func +#define glthread_once_singlethreaded libintl_once_singlethreaded +#define glthread_once_multithreaded libintl_once_multithreaded +]) +]) + + +dnl Checks for the core files of the intl subdirectory: +dnl dcigettext.c +dnl eval-plural.h +dnl explodename.c +dnl finddomain.c +dnl gettextP.h +dnl gmo.h +dnl hash-string.h hash-string.c +dnl l10nflist.c +dnl libgnuintl.h.in (except the *printf stuff) +dnl loadinfo.h +dnl loadmsgcat.c +dnl localealias.c +dnl log.c +dnl plural-exp.h plural-exp.c +dnl plural.y +dnl Used by libglocale. +AC_DEFUN([gt_INTL_SUBDIR_CORE], +[ + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + AC_REQUIRE([gl_LOCK])dnl + + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], + [[]])], + [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], + [Define to 1 if the compiler understands __builtin_expect.])]) + + AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ + stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ + argz_next __fsetlocking]) + + dnl ADDED FOR BASH + AC_CHECK_FUNCS([localeconv]) + + dnl Use the *_unlocked functions only if they are declared. + dnl (because some of them were defined without being declared in Solaris + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built + dnl on Solaris 2.5.1 to run on Solaris 2.6). + AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include ]) + + AM_ICONV + + 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-2.7 for %define api.pure. + 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;; + 2.[7-9]* | [3-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 Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from +dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib. +AC_DEFUN([gt_GL_ATTRIBUTE], [ + m4_ifndef([gl_[]COMMON], + AH_VERBATIM([gt_gl_attribute], +[/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#ifndef _GL_UNUSED +# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +# else +# define _GL_UNUSED +# endif +#endif + +/* The __pure__ attribute was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif +]))]) diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4 new file mode 100644 index 0000000..7a47427 --- /dev/null +++ b/m4/intlmacosx.m4 @@ -0,0 +1,72 @@ +# intlmacosx.m4 serial 6 (gettext-0.19.9) +dnl Copyright (C) 2004-2014, 2016, 2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on Mac OS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in Mac OS X 10.4. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + [gt_cv_func_CFPreferencesCopyAppValue], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFPreferencesCopyAppValue(NULL, NULL)]])], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Check for API introduced in Mac OS X 10.5. + AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyCurrent();]])], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyPreferredLanguages();]])], + [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], + [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyCurrent = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) diff --git a/m4/intmax.m4 b/m4/intmax.m4 new file mode 100644 index 0000000..2f4b450 --- /dev/null +++ b/m4/intmax.m4 @@ -0,0 +1,36 @@ +# intmax.m4 serial 6 (gettext-0.18.2) +dnl Copyright (C) 2002-2005, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether the system has the 'intmax_t' type, but don't attempt to +dnl find a replacement if it is lacking. + +AC_DEFUN([gt_TYPE_INTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + ]], + [[intmax_t x = -1; + return !x;]])], + [gt_cv_c_intmax_t=yes], + [gt_cv_c_intmax_t=no])]) + if test $gt_cv_c_intmax_t = yes; then + AC_DEFINE([HAVE_INTMAX_T], [1], + [Define if you have the 'intmax_t' type in or .]) + fi +]) diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 new file mode 100644 index 0000000..38fe118 --- /dev/null +++ b/m4/inttypes-pri.m4 @@ -0,0 +1,42 @@ +# inttypes-pri.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1997-2002, 2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.53]) + +# Define PRI_MACROS_BROKEN if 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_CHECK_HEADERS([inttypes.h]) + if test $ac_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + [gt_cv_inttypes_pri_broken], + [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#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 exists and defines unusable PRI* macros.]) + PRI_MACROS_BROKEN=1 + else + PRI_MACROS_BROKEN=0 + fi + AC_SUBST([PRI_MACROS_BROKEN]) +]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 new file mode 100644 index 0000000..c58a1be --- /dev/null +++ b/m4/inttypes.m4 @@ -0,0 +1,159 @@ +# inttypes.m4 serial 27 +dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Derek Price, Bruno Haible. +dnl Test whether is supported or must be substituted. + +AC_DEFUN([gl_INTTYPES_H], +[ + AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) + gl_INTTYPES_PRI_SCN +]) + +AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], +[ + AC_REQUIRE([gl_STDINT_H]) + AC_CHECK_HEADERS_ONCE([inttypes.h]) + + dnl Override always, so that the portability warnings work. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([inttypes.h]) + + AC_REQUIRE([gl_MULTIARCH]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [imaxabs imaxdiv strtoimax strtoumax]) +]) + +# Ensure that the PRI* and SCN* macros are defined appropriately. +AC_DEFUN([gl_INTTYPES_PRI_SCN], +[ + AC_REQUIRE([gt_INTTYPES_PRI]) + + PRIPTR_PREFIX= + if test -n "$STDINT_H"; then + dnl Using the gnulib . It always defines intptr_t to 'long'. + PRIPTR_PREFIX='"l"' + else + dnl Using the system's . + for glpfx in '' l ll I64; do + case $glpfx in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + I64) gltype1='__int64';; + esac + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + extern intptr_t foo; + extern $gltype1 foo;]])], + [PRIPTR_PREFIX='"'$glpfx'"']) + test -n "$PRIPTR_PREFIX" && break + done + fi + AC_SUBST([PRIPTR_PREFIX]) + + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT32_MAX_LT_INTMAX_MAX], + [defined INT32_MAX && defined INTMAX_MAX], + [INT32_MAX < INTMAX_MAX], + [sizeof (int) < sizeof (long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT64_MAX_EQ_LONG_MAX], + [defined INT64_MAX], + [INT64_MAX == LONG_MAX], + [sizeof (long long int) == sizeof (long int)]) + else + INT64_MAX_EQ_LONG_MAX=-1 + fi + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT32_MAX_LT_UINTMAX_MAX], + [defined UINT32_MAX && defined UINTMAX_MAX], + [UINT32_MAX < UINTMAX_MAX], + [sizeof (unsigned int) < sizeof (unsigned long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT64_MAX_EQ_ULONG_MAX], + [defined UINT64_MAX], + [UINT64_MAX == ULONG_MAX], + [sizeof (unsigned long long int) == sizeof (unsigned long int)]) + else + UINT64_MAX_EQ_ULONG_MAX=-1 + fi +]) + +# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. +# If $2 is true, the condition is $3; otherwise if long long int is supported +# approximate the condition with $4; otherwise, assume the condition is false. +# The condition should work on all C99 platforms; the approximations should be +# good enough to work on all practical pre-C99 platforms. +# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. +AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], +[ + AC_CACHE_CHECK([whether $3], + [gl_cv_test_$1], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if $2 + #define CONDITION ($3) + #elif HAVE_LONG_LONG_INT + #define CONDITION ($4) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1];]])], + [gl_cv_test_$1=yes], + [gl_cv_test_$1=no])]) + if test $gl_cv_test_$1 = yes; then + $1=1; + else + $1=0; + fi + AC_SUBST([$1]) +]) + +AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_INTTYPES_H_DEFAULTS], +[ + GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) + GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) + GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) + GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) + HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) + HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) + HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) + HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T]) + REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) + REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) + INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) + INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) + PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) + PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX]) + UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX]) + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX]) +]) diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 new file mode 100644 index 0000000..d20422a --- /dev/null +++ b/m4/inttypes_h.m4 @@ -0,0 +1,29 @@ +# inttypes_h.m4 serial 10 +dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[uintmax_t i = (uintmax_t) -1; return !i;]])], + [gl_cv_header_inttypes_h=yes], + [gl_cv_header_inttypes_h=no])]) + if test $gl_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4 new file mode 100644 index 0000000..8d32e10 --- /dev/null +++ b/m4/lcmessage.m4 @@ -0,0 +1,35 @@ +# lcmessage.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995. + +# Check whether LC_MESSAGES is available in . + +AC_DEFUN([gt_LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[return LC_MESSAGES]])], + [gt_cv_val_LC_MESSAGES=yes], + [gt_cv_val_LC_MESSAGES=no])]) + if test $gt_cv_val_LC_MESSAGES = yes; then + AC_DEFINE([HAVE_LC_MESSAGES], [1], + [Define if your file defines LC_MESSAGES.]) + fi +]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 new file mode 100644 index 0000000..a187196 --- /dev/null +++ b/m4/lib-ld.m4 @@ -0,0 +1,168 @@ +# lib-ld.m4 serial 9 +dnl Copyright (C) 1996-2003, 2009-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. + +dnl From libtool-2.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 lds only accept -v. +case `$LD -v 2>&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +if test -n "$LD"; then + AC_MSG_CHECKING([for ld]) +elif test "$GCC" = yes; then + AC_MSG_CHECKING([for ld used by $CC]) +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + AC_CACHE_VAL([acl_cv_path_LD], + [ + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + fi + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + 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 variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_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_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +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. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + 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_ARG_WITH(PACK[-prefix], +[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]PACKLIBS[ 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/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && test ! -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + 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= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]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= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + 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/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; 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 "$acl_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 "$acl_hardcode_libdir_flag_spec" && test "$acl_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 "$acl_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 $acl_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 + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + 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* | gnu* | k*bsd*-gnu) 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/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) 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 "$acl_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:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_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=\"$acl_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 + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +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 +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 new file mode 100644 index 0000000..8adb17b --- /dev/null +++ b/m4/lib-prefix.m4 @@ -0,0 +1,249 @@ +# lib-prefix.m4 serial 14 +dnl Copyright (C) 2001-2005, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +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_MULTILIB]) + 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_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/$acl_libdirstem" + 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* | gnu* | k*bsd*-gnu) 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/$acl_libdirstem"; 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/$acl_libdirstem"; 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" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) + + case "$host_os" in + solaris*) + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _LP64 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_solaris_64bit=yes], + [gl_cv_solaris_64bit=no]) + ]);; + esac + + dnl Allow the user to override the result by setting acl_cv_libdirstems. + AC_CACHE_CHECK([for the common suffixes of directories in the library search path], + [acl_cv_libdirstems], + [acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + dnl If $CC generates code for a 32-bit ABI, the libraries are + dnl surely under $prefix/lib, not $prefix/lib64. + if test "$HOST_CPU_C_ABI_32BIT" != yes; then + dnl The result is a property of the system. However, non-system + dnl compilers sometimes have odd library search paths. Therefore + dnl prefer asking /usr/bin/gcc, if available, rather than $CC. + searchpath=`(if test -f /usr/bin/gcc \ + && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ + LC_ALL=C /usr/bin/gcc -print-search-dirs; \ + else \ + LC_ALL=C $CC -print-search-dirs; \ + fi) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + ]) + # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` +]) diff --git a/m4/lock.m4 b/m4/lock.m4 new file mode 100644 index 0000000..93b76fa --- /dev/null +++ b/m4/lock.m4 @@ -0,0 +1,47 @@ +# lock.m4 serial 14 +dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([gl_LOCK], +[ + AC_REQUIRE([gl_THREADLIB]) + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + has_rwlock=false + AC_CHECK_TYPE([pthread_rwlock_t], + [has_rwlock=true + AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], + [Define if the POSIX multithreading library has read/write locks.])], + [], + [#include ]) + if $has_rwlock; then + gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER + fi + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [[#include ]], + [[ +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif + ]])], + [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], + [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) + fi + gl_PREREQ_LOCK +]) + +# Prerequisites of lib/glthread/lock.c. +AC_DEFUN([gl_PREREQ_LOCK], [:]) diff --git a/m4/nls.m4 b/m4/nls.m4 new file mode 100644 index 0000000..b62f614 --- /dev/null +++ b/m4/nls.m4 @@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +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]) +]) diff --git a/m4/po.m4 b/m4/po.m4 new file mode 100644 index 0000000..ce72d01 --- /dev/null +++ b/m4/po.m4 @@ -0,0 +1,441 @@ +# po.m4 serial 24a +dnl Copyright (C) 1995-2014, 2016, 2018-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.60]) + +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([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_SED])dnl + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) + + 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 >&]AS_MESSAGE_LOG_FD[ 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 Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + 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 >&]AS_MESSAGE_LOG_FD[ 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 Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + 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 >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + 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 + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + 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" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES 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" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + 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|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|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, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # 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 + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" < +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +}]])], + [gt_cv_func_printf_posix=yes], + [gt_cv_func_printf_posix=no], + [ + AC_EGREP_CPP([notposix], [ +#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif + ], + [gt_cv_func_printf_posix="guessing no"], + [gt_cv_func_printf_posix="guessing yes"]) + ]) + ]) + case $gt_cv_func_printf_posix in + *yes) + AC_DEFINE([HAVE_POSIX_PRINTF], [1], + [Define if your printf() function supports format strings with positions.]) + ;; + esac +]) diff --git a/m4/progtest.m4 b/m4/progtest.m4 new file mode 100644 index 0000000..5f186b1 --- /dev/null +++ b/m4/progtest.m4 @@ -0,0 +1,91 @@ +# progtest.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1996-2003, 2005, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file 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 is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +AC_PREREQ([2.50]) + +# 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 + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# 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 + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + 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 +]) diff --git a/m4/pthread_rwlock_rdlock.m4 b/m4/pthread_rwlock_rdlock.m4 new file mode 100644 index 0000000..3c1d645 --- /dev/null +++ b/m4/pthread_rwlock_rdlock.m4 @@ -0,0 +1,165 @@ +# pthread_rwlock_rdlock.m4 serial 2 +dnl Copyright (C) 2017-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Inspired by +dnl https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c +dnl by Intel Corporation. + +dnl Test whether in a situation where +dnl - an rwlock is taken by a reader and has a writer waiting, +dnl - an additional reader requests the lock, +dnl - the waiting writer and the requesting reader threads have the same +dnl priority, +dnl the requesting reader thread gets blocked, so that at some point the +dnl waiting writer can acquire the lock. +dnl Without such a guarantee, when there a N readers and each of the readers +dnl spends more than 1/Nth of the time with the lock held, there is a high +dnl probability that the waiting writer will not get the lock in a given finite +dnl time, a phenomenon called "writer starvation". +dnl Without such a guarantee, applications have a hard time avoiding writer +dnl starvation. +dnl +dnl POSIX:2017 makes this requirement only for implementations that support TPS +dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO +dnl and SCHED_RR, see +dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html +dnl but this test verifies the guarantee regardless of TPS and regardless of +dnl scheduling policy. +dnl Glibc currently does not provide this guarantee, see +dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701 +AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], +[ + AC_REQUIRE([gl_THREADLIB_EARLY]) + AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader], + [gl_cv_pthread_rwlock_rdlock_prefer_writer], + [save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#include + +#define SUCCEED() exit (0) +#define FAILURE() exit (1) +#define UNEXPECTED(n) (exit (10 + (n))) + +/* The main thread creates the waiting writer and the requesting reader threads + in the default way; this guarantees that they have the same priority. + We can reuse the main thread as first reader thread. */ + +static pthread_rwlock_t lock; +static pthread_t reader1; +static pthread_t writer; +static pthread_t reader2; +static pthread_t timer; +/* Used to pass control from writer to reader2 and from reader2 to timer, + as in a relay race. + Passing control from one running thread to another running thread + is most likely faster than to create the second thread. */ +static pthread_mutex_t baton; + +static void * +timer_func (void *ignored) +{ + /* Step 13 (can be before or after step 12): + The timer thread takes the baton, then waits a moment to make sure + it can tell whether the second reader thread is blocked at step 12. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (13); + usleep (100000); + /* By the time we get here, it's clear that the second reader thread is + blocked at step 12. This is the desired behaviour. */ + SUCCEED (); +} + +static void * +reader2_func (void *ignored) +{ + int err; + + /* Step 8 (can be before or after step 7): + The second reader thread takes the baton, then waits a moment to make sure + the writer thread has reached step 7. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (8); + usleep (100000); + /* Step 9: The second reader thread requests the lock. */ + err = pthread_rwlock_tryrdlock (&lock); + if (err == 0) + FAILURE (); + else if (err != EBUSY) + UNEXPECTED (9); + /* Step 10: Launch a timer, to test whether the next call blocks. */ + if (pthread_create (&timer, NULL, timer_func, NULL)) + UNEXPECTED (10); + /* Step 11: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (11); + /* Step 12: The second reader thread requests the lock. */ + err = pthread_rwlock_rdlock (&lock); + if (err == 0) + FAILURE (); + else + UNEXPECTED (12); +} + +static void * +writer_func (void *ignored) +{ + /* Step 4: Take the baton, so that the second reader thread does not go ahead + too early. */ + if (pthread_mutex_lock (&baton)) + UNEXPECTED (4); + /* Step 5: Create the second reader thread. */ + if (pthread_create (&reader2, NULL, reader2_func, NULL)) + UNEXPECTED (5); + /* Step 6: Release the baton. */ + if (pthread_mutex_unlock (&baton)) + UNEXPECTED (6); + /* Step 7: The writer thread requests the lock. */ + if (pthread_rwlock_wrlock (&lock)) + UNEXPECTED (7); + return NULL; +} + +int +main () +{ + reader1 = pthread_self (); + + /* Step 1: The main thread initializes the lock and the baton. */ + if (pthread_rwlock_init (&lock, NULL)) + UNEXPECTED (1); + if (pthread_mutex_init (&baton, NULL)) + UNEXPECTED (1); + /* Step 2: The main thread acquires the lock as a reader. */ + if (pthread_rwlock_rdlock (&lock)) + UNEXPECTED (2); + /* Step 3: Create the writer thread. */ + if (pthread_create (&writer, NULL, writer_func, NULL)) + UNEXPECTED (3); + /* Job done. Go to sleep. */ + for (;;) + { + sleep (1); + } +} +]])], + [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes], + [gl_cv_pthread_rwlock_rdlock_prefer_writer=no], + [gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"]) + LIBS="$save_LIBS" + ]) + case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in + *yes) + AC_DEFINE([HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [1], + [Define if the 'pthread_rwlock_rdlock' function prefers a writer to a reader.]) + ;; + esac +]) diff --git a/m4/size_max.m4 b/m4/size_max.m4 new file mode 100644 index 0000000..ab79052 --- /dev/null +++ b/m4/size_max.m4 @@ -0,0 +1,75 @@ +# size_max.m4 serial 11 +dnl Copyright (C) 2003, 2005-2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.61]) + +AC_DEFUN([gl_SIZE_MAX], +[ + AC_CHECK_HEADERS([stdint.h]) + dnl First test whether the system already has SIZE_MAX. + AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ + gl_cv_size_max= + AC_EGREP_CPP([Found it], [ +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif +], [gl_cv_size_max=yes]) + if test -z "$gl_cv_size_max"; then + dnl Define it ourselves. Here we assume that the type 'size_t' is not wider + dnl than the type 'unsigned long'. Try hard to find a definition that can + dnl be used in a preprocessor #if, i.e. doesn't contain a cast. + AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], + [#include +#include ], [size_t_bits_minus_1=]) + AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], + [#include ], [fits_in_uint=]) + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + dnl Even though SIZE_MAX fits in an unsigned int, it must be of type + dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + extern size_t foo; + extern unsigned long foo; + ]], + [[]])], + [fits_in_uint=0]) + fi + dnl We cannot use 'expr' to simplify this expression, because 'expr' + dnl works only with 'long' integers in the host environment, while we + dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + dnl Shouldn't happen, but who knows... + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi + ]) + if test "$gl_cv_size_max" != yes; then + AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], + [Define as the maximum value of type 'size_t', if the system doesn't define it.]) + fi + dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after + dnl . Remember that the #undef in AH_VERBATIM gets replaced with + dnl #define by AC_DEFINE_UNQUOTED. + AH_VERBATIM([SIZE_MAX], +[/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +# undef SIZE_MAX +#endif]) +]) diff --git a/m4/stat-time.m4 b/m4/stat-time.m4 new file mode 100644 index 0000000..f5d67a1 --- /dev/null +++ b/m4/stat-time.m4 @@ -0,0 +1,61 @@ +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software +# Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. +dnl Modified by Chet Ramey for bash. + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + +AC_DEFUN([BASH_STAT_TIME], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + + AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], + [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + ]], + [[ + st.st_atim = ts; + ]])], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], + [Define to 1 if the type of the st_atim member of a struct stat is + struct timespec.]) + fi], + [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 new file mode 100644 index 0000000..6d5f1af --- /dev/null +++ b/m4/stdint_h.m4 @@ -0,0 +1,27 @@ +# stdint_h.m4 serial 9 +dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include ]], + [[uintmax_t i = (uintmax_t) -1; return !i;]])], + [gl_cv_header_stdint_h=yes], + [gl_cv_header_stdint_h=no])]) + if test $gl_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 new file mode 100644 index 0000000..d311c9d --- /dev/null +++ b/m4/strtoimax.m4 @@ -0,0 +1,35 @@ +dnl Copyright (C) 2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Make sure we replace strtoimax if we don't have a declaration +dnl We can use this as a template for future function checks + +AC_DEFUN([BASH_FUNC_STRTOIMAX], [ +AC_MSG_CHECKING([for usable strtoimax]) +AC_CACHE_VAL(bash_cv_func_strtoimax, +[ + HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0 + + AC_CHECK_FUNCS([strtoimax]) + AC_CHECK_DECLS([strtoimax]) + + if test "$ac_cv_func_strtoimax" = "yes" ; then + HAVE_STRTOIMAX=1 + fi + if test "$ac_cv_have_decl_strtoimax" = "yes" ; then + HAVE_DECL_STRTOIMAX=1 + fi + + if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then + bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1 + else + bash_cv_func_strtoimax=yes + fi +]) +AC_MSG_RESULT($bash_cv_func_strtoimax) +if test $bash_cv_func_strtoimax = no; then +AC_LIBOBJ(strtoimax) +fi +]) diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 new file mode 100644 index 0000000..60e4197 --- /dev/null +++ b/m4/threadlib.m4 @@ -0,0 +1,393 @@ +# threadlib.m4 serial 16 +dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.60]) + +dnl gl_THREADLIB +dnl ------------ +dnl Tests for a multithreading library to be used. +dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO +dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the +dnl default is 'no', otherwise it is system dependent. In both cases, the user +dnl can change the choice through the options --enable-threads=choice or +dnl --disable-threads. +dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, +dnl USE_PTH_THREADS, USE_WINDOWS_THREADS +dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use +dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with +dnl libtool). +dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for +dnl programs that really need multithread functionality. The difference +dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak +dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not. +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. + +AC_DEFUN([gl_THREADLIB_EARLY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) +]) + +dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_EARLY_BODY], +[ + dnl Ordering constraints: This macro modifies CPPFLAGS in a way that + dnl influences the result of the autoconf tests that test for *_unlocked + dnl declarations, on AIX 5 at least. Therefore it must come early. + AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl + AC_BEFORE([$0], [gl_ARGP])dnl + + AC_REQUIRE([AC_CANONICAL_HOST]) + dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + dnl Check for multithreading. + m4_ifdef([gl_THREADLIB_DEFAULT_NO], + [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], + [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) + AC_ARG_ENABLE([threads], +AS_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ +AS_HELP_STRING([--disable-threads], [build without multithread safety])]), + [gl_use_threads=$enableval], + [if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else +changequote(,)dnl + case "$host_os" in + dnl Disable multithreading by default on OSF/1, because it interferes + dnl with fork()/exec(): When msgexec is linked with -lpthread, its + dnl child process gets an endless segmentation fault inside execvp(). + dnl Disable multithreading by default on Cygwin 1.5.x, because it has + dnl bugs that lead to endless loops or crashes. See + dnl . + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac +changequote([,])dnl + fi + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using : + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd* | midnightbsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + fi +]) + +dnl The guts of gl_THREADLIB. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_BODY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + dnl Check whether the compiler and linker support weak declarations. + AC_CACHE_CHECK([whether imported symbols can be declared weak], + [gl_cv_have_weak], + [gl_cv_have_weak=no + dnl First, test whether the compiler accepts it syntactically. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[extern void xyzzy (); +#pragma weak xyzzy]], + [[xyzzy();]])], + [gl_cv_have_weak=maybe]) + if test $gl_cv_have_weak = maybe; then + dnl Second, test whether it actually works. On Cygwin 1.7.2, with + dnl gcc 4.3, symbols declared weak always evaluate to the address 0. + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +}]])], + [gl_cv_have_weak=yes], + [gl_cv_have_weak=no], + [dnl When cross-compiling, assume that only ELF platforms support + dnl weak symbols. + AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_have_weak="guessing yes"], + [gl_cv_have_weak="guessing no"]) + ]) + fi + dnl But when linking statically, weak symbols don't work. + case " $LDFLAGS " in + *" -static "*) gl_cv_have_weak=no ;; + esac + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + AC_CHECK_HEADER([pthread.h], + [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + ]], + [[pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma);]])], + [gl_have_pthread=yes + LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread + LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread]) + LIBS=$save_LIBS + test -n "$gl_have_pthread" && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + AC_CHECK_LIB([pthread], [pthread_kill], + [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) + AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], + [Define if the pthread_in_use() detection is hard.]) + esac + ]) + elif test -z "$gl_have_pthread"; then + # Some library is needed. Try libpthread and libc_r. + AC_CHECK_LIB([pthread], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + AC_CHECK_LIB([c_r], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + AC_DEFINE([USE_POSIX_THREADS], [1], + [Define if the POSIX multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], + [Define if references to the POSIX multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[thr_self();]])], + [gl_have_solaristhread=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_SOLARIS_THREADS], [1], + [Define if the old Solaris multithreading library can be used.]) + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], + [Define if references to the old Solaris multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_LINKFLAGS([pth]) + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[pth_self();]])], + [gl_have_pth=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_PTH_THREADS], [1], + [Define if the GNU Pth multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_PTH_THREADS_WEAK], [1], + [Define if references to the GNU Pth multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + AC_DEFINE([USE_WINDOWS_THREADS], [1], + [Define if the native Windows multithreading API can be used.]) + fi + ;; + esac + fi + fi + AC_MSG_CHECKING([for multithread API to use]) + AC_MSG_RESULT([$gl_threads_api]) + AC_SUBST([LIBTHREAD]) + AC_SUBST([LTLIBTHREAD]) + AC_SUBST([LIBMULTITHREAD]) + AC_SUBST([LTLIBMULTITHREAD]) +]) + +AC_DEFUN([gl_THREADLIB], +[ + AC_REQUIRE([gl_THREADLIB_EARLY]) + AC_REQUIRE([gl_THREADLIB_BODY]) +]) + + +dnl gl_DISABLE_THREADS +dnl ------------------ +dnl Sets the gl_THREADLIB default so that threads are not used by default. +dnl The user can still override it at installation time, by using the +dnl configure option '--enable-threads'. + +AC_DEFUN([gl_DISABLE_THREADS], [ + m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) +]) + + +dnl Survey of platforms: +dnl +dnl Platform Available Compiler Supports test-lock +dnl flavours option weak result +dnl --------------- --------- --------- -------- --------- +dnl Linux 2.4/glibc posix -lpthread Y OK +dnl +dnl GNU Hurd/glibc posix +dnl +dnl Ubuntu 14.04 posix -pthread Y OK +dnl +dnl FreeBSD 5.3 posix -lc_r Y +dnl posix -lkse ? Y +dnl posix -lpthread ? Y +dnl posix -lthr Y +dnl +dnl FreeBSD 5.2 posix -lc_r Y +dnl posix -lkse Y +dnl posix -lthr Y +dnl +dnl FreeBSD 4.0,4.10 posix -lc_r Y OK +dnl +dnl NetBSD 1.6 -- +dnl +dnl OpenBSD 3.4 posix -lpthread Y OK +dnl +dnl Mac OS X 10.[123] posix -lpthread Y OK +dnl +dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK +dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK +dnl +dnl HP-UX 11 posix -lpthread N (cc) OK +dnl Y (gcc) +dnl +dnl IRIX 6.5 posix -lpthread Y 0.5 +dnl +dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK +dnl +dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK +dnl -lpthread (gcc) Y +dnl +dnl Cygwin posix -lpthread Y OK +dnl +dnl Any of the above pth -lpth 0.0 +dnl +dnl Mingw windows N OK +dnl +dnl BeOS 5 -- +dnl +dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is +dnl turned off: +dnl OK if all three tests terminate OK, +dnl 0.5 if the first test terminates OK but the second one loops endlessly, +dnl 0.0 if the first test already loops endlessly. diff --git a/m4/timespec.m4 b/m4/timespec.m4 new file mode 100644 index 0000000..3643b47 --- /dev/null +++ b/m4/timespec.m4 @@ -0,0 +1,71 @@ +# Configure checks for struct timespec + +# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Original written by Paul Eggert and Jim Meyering. +# Modified by Chet Ramey for bash + +dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared +dnl in time.h, sys/time.h, or pthread.h. + +AC_DEFUN([BASH_CHECK_TYPE_STRUCT_TIMESPEC], +[ + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CACHE_CHECK([for struct timespec in ], + [bash_cv_sys_struct_timespec_in_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [bash_cv_sys_struct_timespec_in_time_h=yes], + [bash_cv_sys_struct_timespec_in_time_h=no])]) + + HAVE_STRUCT_TIMESPEC=0 + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $bash_cv_sys_struct_timespec_in_time_h = yes; then + AC_DEFINE([HAVE_STRUCT_TIMESPEC]) + AC_DEFINE([TIME_H_DEFINES_STRUCT_TIMESPEC]) + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + AC_CACHE_CHECK([for struct timespec in ], + [bash_cv_sys_struct_timespec_in_sys_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [bash_cv_sys_struct_timespec_in_sys_time_h=yes], + [bash_cv_sys_struct_timespec_in_sys_time_h=no])]) + if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + AC_DEFINE([HAVE_STRUCT_TIMESPEC]) + AC_DEFINE([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) + else + AC_CACHE_CHECK([for struct timespec in ], + [bash_cv_sys_struct_timespec_in_pthread_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [bash_cv_sys_struct_timespec_in_pthread_h=yes], + [bash_cv_sys_struct_timespec_in_pthread_h=no])]) + if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + AC_DEFINE([HAVE_STRUCT_TIMESPEC]) + AC_DEFINE([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) + fi + fi + fi + AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) + +]) diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 new file mode 100644 index 0000000..2926bea --- /dev/null +++ b/m4/uintmax_t.m4 @@ -0,0 +1,30 @@ +# uintmax_t.m4 serial 12 +dnl Copyright (C) 1997-2004, 2007-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +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 or . + +AC_DEFUN([gl_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + test $ac_cv_type_unsigned_long_long_int = 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 and don't define.]) + else + AC_DEFINE([HAVE_UINTMAX_T], [1], + [Define if you have the 'uintmax_t' type in or .]) + fi +]) diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4 new file mode 100644 index 0000000..58b5334 --- /dev/null +++ b/m4/ulonglong.m4 @@ -0,0 +1,5 @@ +# ulonglong.m4 serial 10 +dnl Copyright (C) 1999-2007, 2009-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/visibility.m4 b/m4/visibility.m4 new file mode 100644 index 0000000..8c266a8 --- /dev/null +++ b/m4/visibility.m4 @@ -0,0 +1,77 @@ +# visibility.m4 serial 6 +dnl Copyright (C) 2005, 2008, 2010-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl Mac OS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN([gl_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + dnl First, check whether -Werror can be added to the command line, or + dnl whether it leads to an error because of some other option that the + dnl user has put into $CC $CFLAGS $CPPFLAGS. + AC_CACHE_CHECK([whether the -Werror option is usable], + [gl_cv_cc_vis_werror], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS" + ]) + dnl Now check whether visibility declarations are supported. + AC_CACHE_CHECK([for simple visibility declarations], + [gl_cv_cc_visibility], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS" + ]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + AC_SUBST([CFLAG_VISIBILITY]) + AC_SUBST([HAVE_VISIBILITY]) + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 new file mode 100644 index 0000000..5db5815 --- /dev/null +++ b/m4/wchar_t.m4 @@ -0,0 +1,24 @@ +# wchar_t.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2002-2003, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether has the 'wchar_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WCHAR_T], +[ + AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + wchar_t foo = (wchar_t)'\0';]], + [[]])], + [gt_cv_c_wchar_t=yes], + [gt_cv_c_wchar_t=no])]) + if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) + fi +]) diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 new file mode 100644 index 0000000..61e8a23 --- /dev/null +++ b/m4/wint_t.m4 @@ -0,0 +1,74 @@ +# wint_t.m4 serial 7 +dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether has the 'wint_t' type and whether gnulib's +dnl or would, if present, override 'wint_t'. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WINT_T], +[ + AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0';]], + [[]])], + [gt_cv_c_wint_t=yes], + [gt_cv_c_wint_t=no])]) + if test $gt_cv_c_wint_t = yes; then + AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) + + dnl Determine whether gnulib's or would, if present, + dnl override 'wint_t'. + AC_CACHE_CHECK([whether wint_t is too small], + [gl_cv_type_wint_t_too_small], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +#endif +#include + int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; + ]])], + [gl_cv_type_wint_t_too_small=no], + [gl_cv_type_wint_t_too_small=yes])]) + if test $gl_cv_type_wint_t_too_small = yes; then + GNULIB_OVERRIDES_WINT_T=1 + else + GNULIB_OVERRIDES_WINT_T=0 + fi + else + GNULIB_OVERRIDES_WINT_T=0 + fi + AC_SUBST([GNULIB_OVERRIDES_WINT_T]) +]) + +dnl Prerequisites of the 'wint_t' override. +AC_DEFUN([gl_TYPE_WINT_T_PREREQ], +[ + AC_CHECK_HEADERS_ONCE([crtdefs.h]) + if test $ac_cv_header_crtdefs_h = yes; then + HAVE_CRTDEFS_H=1 + else + HAVE_CRTDEFS_H=0 + fi + AC_SUBST([HAVE_CRTDEFS_H]) +]) diff --git a/m4/xsize.m4 b/m4/xsize.m4 new file mode 100644 index 0000000..f2898ba --- /dev/null +++ b/m4/xsize.m4 @@ -0,0 +1,12 @@ +# xsize.m4 serial 5 +dnl Copyright (C) 2003-2004, 2008-2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_XSIZE], +[ + dnl Prerequisites of lib/xsize.h. + AC_REQUIRE([gl_SIZE_MAX]) + AC_CHECK_HEADERS([stdint.h]) +]) diff --git a/mailcheck.c b/mailcheck.c index bd95f0d..4a11143 100644 --- a/mailcheck.c +++ b/mailcheck.c @@ -1,6 +1,6 @@ /* mailcheck.c -- The check is in the mail... */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,7 +23,7 @@ #include #include "bashtypes.h" #include "posixstat.h" -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif #if defined (HAVE_UNISTD_H) @@ -43,7 +43,7 @@ extern time_t shell_start_time; -extern int mailstat __P((const char *, struct stat *)); +extern int mailstat PARAMS((const char *, struct stat *)); typedef struct _fileinfo { char *name; @@ -66,19 +66,19 @@ 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 int find_mail_file PARAMS((char *)); +static void init_mail_file PARAMS((int)); +static void update_mail_file PARAMS((int)); +static int add_mail_file PARAMS((char *, char *)); -static FILEINFO *alloc_mail_file __P((char *, char *)); -static void dispose_mail_file __P((FILEINFO *)); +static FILEINFO *alloc_mail_file PARAMS((char *, char *)); +static void dispose_mail_file PARAMS((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 int file_mod_date_changed PARAMS((int)); +static int file_access_date_changed PARAMS((int)); +static int file_has_grown PARAMS((int)); -static char *parse_mailpath_spec __P((char *)); +static char *parse_mailpath_spec PARAMS((char *)); /* Returns non-zero if it is time to check mail. */ int @@ -267,7 +267,10 @@ file_mod_date_changed (i) file = mailfiles[i]->name; mtime = mailfiles[i]->mod_time; - if ((mailstat (file, &finfo) == 0) && (finfo.st_size > 0)) + if (mailstat (file, &finfo) != 0) + return (0); + + if (finfo.st_size > 0) return (mtime < finfo.st_mtime); if (finfo.st_size == 0 && mailfiles[i]->file_size > 0) @@ -288,7 +291,10 @@ file_access_date_changed (i) file = mailfiles[i]->name; atime = mailfiles[i]->access_time; - if ((mailstat (file, &finfo) == 0) && (finfo.st_size > 0)) + if (mailstat (file, &finfo) != 0) + return (0); + + if (finfo.st_size > 0) return (atime < finfo.st_atime); return (0); diff --git a/mailcheck.h b/mailcheck.h index 3ca8440..e930124 100644 --- a/mailcheck.h +++ b/mailcheck.h @@ -1,6 +1,6 @@ /* mailcheck.h -- variables and function declarations for mail checking. */ -/* Copyright (C) 1987,1991,2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,13 +22,13 @@ #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)); +extern int time_to_check_mail PARAMS((void)); +extern void reset_mail_timer PARAMS((void)); +extern void reset_mail_files PARAMS((void)); +extern void free_mail_files PARAMS((void)); +extern char *make_default_mailpath PARAMS((void)); +extern void remember_mail_dates PARAMS((void)); +extern void init_mail_dates PARAMS((void)); +extern void check_mail PARAMS((void)); #endif /* _MAILCHECK_H */ diff --git a/make_cmd.c b/make_cmd.c index 2eb4fda..98151a4 100644 --- a/make_cmd.c +++ b/make_cmd.c @@ -1,7 +1,7 @@ /* make_cmd.c -- Functions for making instances of the various parser constructs. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -34,19 +34,11 @@ #include "bashintl.h" +#include "shell.h" +#include "execute_cmd.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" @@ -54,21 +46,20 @@ #include "shmbutil.h" -extern int line_number, current_command_line_count, parser_state; -extern int last_command_exit_value; +int here_doc_first_line = 0; /* Object caching */ sh_obj_cache_t wdcache = {0, 0, 0}; sh_obj_cache_t wlcache = {0, 0, 0}; -#define WDCACHESIZE 60 -#define WLCACHESIZE 60 +#define WDCACHESIZE 128 +#define WLCACHESIZE 128 -static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int)); +static COMMAND *make_for_or_select PARAMS((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int)); #if defined (ARITH_FOR_COMMAND) -static WORD_LIST *make_arith_for_expr __P((char *)); +static WORD_LIST *make_arith_for_expr PARAMS((char *)); #endif -static COMMAND *make_until_or_while __P((enum command_type, COMMAND *, COMMAND *)); +static COMMAND *make_until_or_while PARAMS((enum command_type, COMMAND *, COMMAND *)); void cmd_init () @@ -244,7 +235,7 @@ make_select_command (name, map_list, action, lineno) #if defined (SELECT_COMMAND) return (make_for_or_select (cm_select, name, map_list, action, lineno)); #else - last_command_exit_value = 2; + set_exit_status (2); return ((COMMAND *)NULL); #endif } @@ -260,7 +251,7 @@ make_arith_for_expr (s) 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 */ + wd->flags |= W_NOGLOB|W_NOSPLIT|W_QUOTED|W_NOTILDE|W_NOPROCSUB; /* no word splitting or globbing */ result = make_word_list (wd, (WORD_LIST *)NULL); return result; } @@ -280,7 +271,7 @@ make_arith_for_command (exprs, action, lineno) ARITH_FOR_COM *temp; WORD_LIST *init, *test, *step; char *s, *t, *start; - int nsemi; + int nsemi, i; init = test = step = (WORD_LIST *)NULL; /* Parse the string into the three component sub-expressions. */ @@ -292,10 +283,10 @@ make_arith_for_command (exprs, action, lineno) s++; start = s; /* skip to the semicolon or EOS */ - while (*s && *s != ';') - s++; + i = skip_to_delim (start, 0, ";", SD_NOJMP|SD_NOPROCSUB); + s = start + i; - t = (s > start) ? substring (start, 0, s - start) : (char *)NULL; + t = (i > 0) ? substring (start, 0, i) : (char *)NULL; nsemi++; switch (nsemi) @@ -324,7 +315,10 @@ make_arith_for_command (exprs, action, lineno) else parser_error (lineno, _("syntax error: `;' unexpected")); parser_error (lineno, _("syntax error: `((%s))'"), exprs->word->word); - last_command_exit_value = 2; + free (init); + free (test); + free (step); + set_exit_status (2); return ((COMMAND *)NULL); } @@ -340,7 +334,7 @@ make_arith_for_command (exprs, action, lineno) return (make_command (cm_arith_for, (SIMPLE_COM *)temp)); #else dispose_words (exprs); - last_command_exit_value = 2; + set_exit_status (2); return ((COMMAND *)NULL); #endif /* ARITH_FOR_COMMAND */ } @@ -450,7 +444,7 @@ make_arith_command (exp) return (command); #else - last_command_exit_value = 2; + set_exit_status (2); return ((COMMAND *)NULL); #endif } @@ -493,7 +487,7 @@ make_cond_command (cond_node) return (command); #else - last_command_exit_value = 2; + set_exit_status (2); return ((COMMAND *)NULL); #endif } @@ -578,12 +572,19 @@ make_here_document (temp, lineno) kill_leading = temp->instruction == r_deblank_reading_until; - document = (char *)NULL; + full_line = document = (char *)NULL; document_index = document_size = 0; + delim_unquoted = (temp->redirectee.filename->flags & W_QUOTED) == 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); + /* "If any part of word is quoted, the delimiter shall be formed by + performing quote removal on word." */ + if (delim_unquoted == 0) + redir_word = string_quote_removal (temp->redirectee.filename->word, 0); + else + redir_word = savestring (temp->redirectee.filename->word); /* redirection_expand will return NULL if the expansion results in multiple words or no words. Check for that here, and just abort @@ -610,12 +611,12 @@ make_here_document (temp, lineno) /* 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; + here_doc_first_line = 0; line = full_line; line_number++; @@ -630,7 +631,7 @@ make_here_document (temp, lineno) 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; + break; while (*line == '\t') line++; @@ -640,7 +641,15 @@ make_here_document (temp, lineno) continue; if (STREQN (line, redir_word, redir_len) && line[redir_len] == '\n') - goto document_done; + break; + + /* Backwards compatibility here */ + if (STREQN (line, redir_word, redir_len) && (parser_state & PST_EOFTOKEN) && shell_eof_token && strchr (line+redir_len, shell_eof_token)) + { + shell_ungets (line + redir_len); + full_line = 0; + break; + } len = strlen (line); if (len + document_index >= document_size) @@ -667,6 +676,7 @@ make_here_document (temp, lineno) document[0] = '\0'; } temp->redirectee.filename->word = document; + here_doc_first_line = 0; } /* Generate a REDIRECT from SOURCE, DEST, and INSTRUCTION. @@ -689,6 +699,7 @@ make_redirection (source, instruction, dest_and_filename, flags) /* First do the common cases. */ temp->redirector = source; temp->redirectee = dest_and_filename; + temp->here_doc_eof = 0; temp->instruction = instruction; temp->flags = 0; temp->rflags = flags; @@ -786,11 +797,18 @@ make_function_def (name, command, lineno, lstart) if (bash_source_a && array_num_elements (bash_source_a) > 0) temp->source_file = array_reference (bash_source_a, 0); #endif + /* Assume that shell functions without a source file before the shell is + initialized come from the environment. Otherwise default to "main" + (usually functions being defined interactively) */ + if (temp->source_file == 0) + temp->source_file = shell_initialized ? "main" : "environment"; + #if defined (DEBUGGER) - bind_function_def (name->word, temp); + bind_function_def (name->word, temp, 0); #endif - temp->source_file = 0; + temp->source_file = temp->source_file ? savestring (temp->source_file) : 0; + return (make_command (cm_function_def, (SIMPLE_COM *)temp)); } @@ -803,6 +821,7 @@ make_subshell_command (command) temp = (SUBSHELL_COM *)xmalloc (sizeof (SUBSHELL_COM)); temp->command = command; temp->flags = CMD_WANT_SUBSHELL; + temp->line = line_number; return (make_command (cm_subshell, (SIMPLE_COM *)temp)); } diff --git a/make_cmd.h b/make_cmd.h index f17774d..bf1fb00 100644 --- a/make_cmd.h +++ b/make_cmd.h @@ -1,6 +1,6 @@ /* make_cmd.h -- Declarations of functions found in make_cmd.c */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2009,2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,48 +23,50 @@ #include "stdc.h" -extern void cmd_init __P((void)); +extern int here_doc_first_line; -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 void cmd_init PARAMS((void)); -extern WORD_LIST *make_word_list __P((WORD_DESC *, WORD_LIST *)); +extern WORD_DESC *alloc_word_desc PARAMS((void)); +extern WORD_DESC *make_bare_word PARAMS((const char *)); +extern WORD_DESC *make_word_flags PARAMS((WORD_DESC *, const char *)); +extern WORD_DESC *make_word PARAMS((const char *)); +extern WORD_DESC *make_word_from_token PARAMS((int)); + +extern WORD_LIST *make_word_list PARAMS((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)); +extern COMMAND *make_command PARAMS((enum command_type, SIMPLE_COM *)); +extern COMMAND *command_connect PARAMS((COMMAND *, COMMAND *, int)); +extern COMMAND *make_for_command PARAMS((WORD_DESC *, WORD_LIST *, COMMAND *, int)); +extern COMMAND *make_group_command PARAMS((COMMAND *)); +extern COMMAND *make_case_command PARAMS((WORD_DESC *, PATTERN_LIST *, int)); +extern PATTERN_LIST *make_pattern_list PARAMS((WORD_LIST *, COMMAND *)); +extern COMMAND *make_if_command PARAMS((COMMAND *, COMMAND *, COMMAND *)); +extern COMMAND *make_while_command PARAMS((COMMAND *, COMMAND *)); +extern COMMAND *make_until_command PARAMS((COMMAND *, COMMAND *)); +extern COMMAND *make_bare_simple_command PARAMS((void)); +extern COMMAND *make_simple_command PARAMS((ELEMENT, COMMAND *)); +extern void make_here_document PARAMS((REDIRECT *, int)); +extern REDIRECT *make_redirection PARAMS((REDIRECTEE, enum r_instruction, REDIRECTEE, int)); +extern COMMAND *make_function_def PARAMS((WORD_DESC *, COMMAND *, int, int)); +extern COMMAND *clean_simple_command PARAMS((COMMAND *)); + +extern COMMAND *make_arith_command PARAMS((WORD_LIST *)); + +extern COMMAND *make_select_command PARAMS((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 *)); +extern COND_COM *make_cond_node PARAMS((int, WORD_DESC *, COND_COM *, COND_COM *)); +extern COMMAND *make_cond_command PARAMS((COND_COM *)); #endif -extern COMMAND *make_arith_for_command __P((WORD_LIST *, COMMAND *, int)); +extern COMMAND *make_arith_for_command PARAMS((WORD_LIST *, COMMAND *, int)); -extern COMMAND *make_subshell_command __P((COMMAND *)); -extern COMMAND *make_coproc_command __P((char *, COMMAND *)); +extern COMMAND *make_subshell_command PARAMS((COMMAND *)); +extern COMMAND *make_coproc_command PARAMS((char *, COMMAND *)); -extern COMMAND *connect_async_list __P((COMMAND *, COMMAND *, int)); +extern COMMAND *connect_async_list PARAMS((COMMAND *, COMMAND *, int)); #endif /* !_MAKE_CMD_H */ diff --git a/mksyntax.c b/mksyntax.c index 56ade2e..0385686 100644 --- a/mksyntax.c +++ b/mksyntax.c @@ -380,7 +380,7 @@ main(argc, argv) #if !defined (HAVE_STRERROR) #include -#ifndef _MINIX +#if defined (HAVE_SYS_PARAM_H) # include #endif diff --git a/nojobs.c b/nojobs.c index b73e3d6..b7504cd 100644 --- a/nojobs.c +++ b/nojobs.c @@ -3,7 +3,7 @@ /* 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. +/* Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -46,10 +46,12 @@ #include "shell.h" #include "jobs.h" #include "execute_cmd.h" +#include "trap.h" #include "builtins/builtext.h" /* for wait_builtin */ +#include "builtins/common.h" -#define DEFAULT_CHILD_MAX 32 +#define DEFAULT_CHILD_MAX 4096 #if defined (_POSIX_VERSION) || !defined (HAVE_KILLPG) # define killpg(pg, sig) kill(-(pg),(sig)) @@ -72,19 +74,13 @@ 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; +extern void set_original_signal PARAMS((int, SigHandler *)); + +volatile pid_t last_made_pid = NO_PID; +volatile pid_t last_asynchronous_pid = NO_PID; -pid_t last_made_pid = NO_PID; -pid_t last_asynchronous_pid = NO_PID; +static int queue_sigchld; /* dummy declaration */ +int waiting_for_child; /* Call this when you start making children. */ int already_making_children = 0; @@ -94,7 +90,12 @@ 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; +int check_window_size = CHECKWINSIZE_DEFAULT; + +/* We don't have job control. */ +int job_control = 0; + +int running_in_background = 0; /* can't tell without job control */ /* STATUS and FLAGS are only valid if pid != NO_PID STATUS is only valid if (flags & PROC_RUNNING) == 0 */ @@ -120,32 +121,32 @@ 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)); +static void alloc_pid_list PARAMS((void)); +static int find_proc_slot PARAMS((pid_t)); +static int find_index_by_pid PARAMS((pid_t)); +static int find_status_by_pid PARAMS((pid_t)); +static int process_exit_status PARAMS((WAIT)); +static int find_termsig_by_pid PARAMS((pid_t)); +static int get_termsig PARAMS((WAIT)); +static void set_pid_status PARAMS((pid_t, WAIT)); +static void set_pid_flags PARAMS((pid_t, int)); +static void unset_pid_flags PARAMS((pid_t, int)); +static int get_pid_flags PARAMS((pid_t)); +static void add_pid PARAMS((pid_t, int)); +static void mark_dead_jobs_as_notified PARAMS((int)); + +static sighandler wait_sigint_handler PARAMS((int)); +static char *j_strsignal PARAMS((int)); #if defined (HAVE_WAITPID) -static void reap_zombie_children __P((void)); +static void reap_zombie_children PARAMS((void)); #endif #if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS) -static int siginterrupt __P((int, int)); +static int siginterrupt PARAMS((int, int)); #endif -static void restore_sigint_handler __P((void)); +static void restore_sigint_handler PARAMS((void)); /* Allocate new, or grow existing PID_LIST. */ static void @@ -159,18 +160,22 @@ alloc_pid_list () /* 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; + { + pid_list[i].pid = NO_PID; + pid_list[i].status = pid_list[i].flags = 0; + } } /* 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 () +find_proc_slot (pid) + pid_t pid; { register int i; for (i = 0; i < pid_list_size; i++) - if (pid_list[i].pid == NO_PID) + if (pid_list[i].pid == NO_PID || pid_list[i].pid == pid) return (i); if (i == pid_list_size) @@ -261,6 +266,12 @@ set_pid_status (pid, status) coproc_pidchk (pid, status); #endif +#if defined (PROCESS_SUBSTITUTION) + if ((slot = find_procsub_child (pid)) >= 0) + set_procsub_status (slot, pid, WSTATUS (status)); + /* XXX - also saving in list below */ +#endif + slot = find_index_by_pid (pid); if (slot == NO_PID) return; @@ -326,7 +337,7 @@ add_pid (pid, async) { int slot; - slot = find_proc_slot (); + slot = find_proc_slot (pid); pid_list[slot].pid = pid; pid_list[slot].status = -1; @@ -387,8 +398,9 @@ cleanup_dead_jobs () for (i = 0; i < pid_list_size; i++) { - if ((pid_list[i].flags & PROC_RUNNING) == 0 && - (pid_list[i].flags & PROC_NOTIFIED)) + if (pid_list[i].pid != NO_PID && + (pid_list[i].flags & PROC_RUNNING) == 0 && + (pid_list[i].flags & PROC_NOTIFIED)) pid_list[i].pid = NO_PID; } @@ -407,6 +419,7 @@ reap_dead_jobs () } /* Initialize the job control mechanism, and set up the tty stuff. */ +int initialize_job_control (force) int force; { @@ -414,6 +427,7 @@ initialize_job_control (force) if (interactive) get_tty_state (); + return 0; } /* Setup this shell to handle C-C, etc. */ @@ -439,14 +453,21 @@ reap_zombie_children () WAIT status; CHECK_TERMSIG; + CHECK_WAIT_INTR; while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0) set_pid_status (pid, status); # endif /* WNOHANG */ CHECK_TERMSIG; + CHECK_WAIT_INTR; } #endif /* WAITPID */ #if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS) + +#if !defined (SA_RESTART) +# define SA_RESTART 0 +#endif + static int siginterrupt (sig, flag) int sig, flag; @@ -469,17 +490,19 @@ siginterrupt (sig, flag) 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) +make_child (command, flags) char *command; - int async_p; + int flags; { pid_t pid; - int forksleep; + int async_p, forksleep; + sigset_t set, oset; /* Discard saved memory. */ if (command) free (command); + async_p = (flags & FORK_ASYNC); start_pipeline (); #if defined (BUFFERED_INPUT) @@ -491,11 +514,23 @@ make_child (command, async_p) sync_buffered_stream (default_buffered_input); #endif /* BUFFERED_INPUT */ + /* Block SIGTERM here and unblock in child after fork resets the + set of pending signals */ + if (interactive_shell) + { + sigemptyset (&set); + sigaddset (&set, SIGTERM); + sigemptyset (&oset); + sigprocmask (SIG_BLOCK, &set, &oset); + set_signal_handler (SIGTERM, SIG_DFL); + } + /* 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. */ @@ -509,9 +544,17 @@ make_child (command, async_p) forksleep <<= 1; } + if (pid != 0) + if (interactive_shell) + { + set_signal_handler (SIGTERM, SIG_IGN); + sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); + } + if (pid < 0) { sys_error ("fork"); + last_command_exit_value = EX_NOEXEC; throw_to_top_level (); } @@ -521,10 +564,10 @@ make_child (command, async_p) unset_bash_input (0); #endif /* BUFFERED_INPUT */ -#if defined (HAVE_POSIX_SIGNALS) + CLRINTERRUPT; /* XXX - children have their own interrupt state */ + /* Restore top-level signal mask. */ - sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL); -#endif + restore_sigmask (); #if 0 /* Ignore INT and QUIT in asynchronous children. */ @@ -532,6 +575,8 @@ make_child (command, async_p) last_asynchronous_pid = getpid (); #endif + subshell_environment |= SUBSHELL_IGNTRAP; + default_tty_job_signals (); } else @@ -562,28 +607,64 @@ 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); + if (signal_is_trapped (SIGTSTP) == 0 && signal_is_hard_ignored (SIGTSTP)) + set_signal_handler (SIGTSTP, SIG_IGN); + else + set_signal_handler (SIGTSTP, SIG_DFL); + if (signal_is_trapped (SIGTTIN) == 0 && signal_is_hard_ignored (SIGTTIN)) + set_signal_handler (SIGTTIN, SIG_IGN); + else + set_signal_handler (SIGTTIN, SIG_DFL); + if (signal_is_trapped (SIGTTOU) == 0 && signal_is_hard_ignored (SIGTTOU)) + set_signal_handler (SIGTTOU, SIG_IGN); + else + set_signal_handler (SIGTTOU, SIG_DFL); +#endif +} + +/* Called once in a parent process. */ +void +get_original_tty_job_signals () +{ + static int fetched = 0; + + if (fetched == 0) + { +#if defined (SIGTSTP) + if (interactive_shell) + { + set_original_signal (SIGTSTP, SIG_DFL); + set_original_signal (SIGTTIN, SIG_DFL); + set_original_signal (SIGTTOU, SIG_DFL); + } + else + { + get_original_signal (SIGTSTP); + get_original_signal (SIGTTIN); + get_original_signal (SIGTTOU); + } #endif + fetched = 1; + } } /* Wait for a single pid (PID) and return its exit status. Called by the wait builtin. */ int -wait_for_single_pid (pid) +wait_for_single_pid (pid, flags) pid_t pid; + int flags; { pid_t got_pid; WAIT status; - int pstatus, flags; + int pstatus; 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); + return (257); } if (pstatus != PROC_STILL_ALIVE) @@ -597,6 +678,7 @@ wait_for_single_pid (pid) while ((got_pid = WAITPID (pid, &status, 0)) != pid) { CHECK_TERMSIG; + CHECK_WAIT_INTR; if (got_pid < 0) { if (errno != EINTR && errno != ECHILD) @@ -618,28 +700,45 @@ wait_for_single_pid (pid) siginterrupt (SIGINT, 0); QUIT; + CHECK_WAIT_INTR; 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 () +int +wait_for_background_pids (ps) + struct procstat *ps; { pid_t got_pid; WAIT status; + int njobs; /* 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. */ + njobs = 0; siginterrupt (SIGINT, 1); /* Wait for ECHILD */ + waiting_for_child = 1; while ((got_pid = WAITPID (-1, &status, 0)) != -1) - set_pid_status (got_pid, status); + { + waiting_for_child = 0; + njobs++; + set_pid_status (got_pid, status); + if (ps) + { + ps->pid = got_pid; + ps->status = process_exit_status (status); + } + waiting_for_child = 1; + CHECK_WAIT_INTR; + } + waiting_for_child = 0; if (errno != EINTR && errno != ECHILD) { @@ -649,9 +748,17 @@ wait_for_background_pids () siginterrupt (SIGINT, 0); QUIT; + CHECK_WAIT_INTR; mark_dead_jobs_as_notified (1); cleanup_dead_jobs (); + + return njobs; +} + +void +wait_sigint_cleanup () +{ } /* Make OLD_SIGINT_HANDLER the SIGINT signal handler. */ @@ -683,20 +790,11 @@ wait_sigint_handler (sig) signal_is_trapped (SIGINT) && ((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler)) { - last_command_exit_value = EXECUTION_FAILURE; + last_command_exit_value = 128+SIGINT; 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; + SIGRETURN (0); } wait_sigint_received = 1; @@ -723,8 +821,9 @@ j_strsignal (s) /* 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) +wait_for (pid, flags) pid_t pid; + int flags; { int return_val, pstatus; pid_t got_pid; @@ -748,9 +847,13 @@ wait_for (pid) if (interactive_shell == 0) old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + waiting_for_child = 1; + CHECK_WAIT_INTR; while ((got_pid = WAITPID (-1, &status, 0)) != pid) /* XXX was pid now -1 */ { + waiting_for_child = 0; CHECK_TERMSIG; + CHECK_WAIT_INTR; if (got_pid < 0 && errno == ECHILD) { #if !defined (_POSIX_VERSION) @@ -764,7 +867,9 @@ wait_for (pid) programming_error ("wait_for(%ld): %s", (long)pid, strerror(errno)); else if (got_pid > 0) set_pid_status (got_pid, status); + waiting_for_child = 1; } + waiting_for_child = 0; if (got_pid > 0) set_pid_status (got_pid, status); @@ -774,6 +879,9 @@ wait_for (pid) reap_zombie_children (); #endif /* HAVE_WAITPID */ + CHECK_TERMSIG; + CHECK_WAIT_INTR; + if (interactive_shell == 0) { SigHandler *temp_handler; @@ -801,13 +909,17 @@ wait_for (pid) 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)) +#if defined (DONT_REPORT_SIGPIPE) && defined (DONT_REPORT_SIGTERM) +# define REPORTSIG(x) ((x) != SIGINT && (x) != SIGPIPE && (x) != SIGTERM) +#elif !defined (DONT_REPORT_SIGPIPE) && !defined (DONT_REPORT_SIGTERM) +# define REPORTSIG(x) ((x) != SIGINT) +#elif defined (DONT_REPORT_SIGPIPE) +# define REPORTSIG(x) ((x) != SIGINT && (x) != SIGPIPE) #else - if ((WIFSTOPPED (status) == 0) && WIFSIGNALED (status) && - (WTERMSIG (status) != SIGINT) && (WTERMSIG (status) != SIGPIPE)) +# define REPORTSIG(x) ((x) != SIGINT && (x) != SIGTERM) #endif + + if ((WIFSTOPPED (status) == 0) && WIFSIGNALED (status) && REPORTSIG(WTERMSIG (status))) { fprintf (stderr, "%s", j_strsignal (WTERMSIG (status))); if (WIFCORED (status)) @@ -822,6 +934,8 @@ wait_for (pid) else get_tty_state (); } + else if (interactive_shell == 0 && subshell_environment == 0 && check_window_size) + get_new_window_size (0, (int *)0, (int *)0); return (return_val); } @@ -848,6 +962,7 @@ static TTYSTRUCT shell_tty_info; static int got_tty_state; /* Fill the contents of shell_tty_info with the current tty info. */ +int get_tty_state () { int tty; @@ -860,6 +975,7 @@ get_tty_state () 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. */ @@ -879,10 +995,12 @@ set_tty_state () } /* Give the terminal to PGRP. */ +int give_terminal_to (pgrp, force) pid_t pgrp; int force; { + return 0; } /* Stop a pipeline. */ @@ -907,10 +1025,19 @@ stop_making_children () already_making_children = 0; } +/* The name is kind of a misnomer, but it's what the job control code uses. */ +void +without_job_control () +{ + stop_making_children (); + last_made_pid = NO_PID; /* XXX */ +} + int -get_job_by_pid (pid, block) +get_job_by_pid (pid, block, ignore) pid_t pid; int block; + PROCESS **ignore; { int i; @@ -926,11 +1053,23 @@ describe_pid (pid) fprintf (stderr, "%ld\n", (long) pid); } +int +freeze_jobs_list () +{ + return 0; +} + void unfreeze_jobs_list () { } +void +set_jobs_list_frozen (s) + int s; +{ +} + int count_all_jobs () { diff --git a/parse.y b/parse.y index c046920..51d8da8 100644 --- a/parse.y +++ b/parse.y @@ -1,6 +1,6 @@ /* parse.y - Yacc grammar for bash. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,6 +45,8 @@ #define NEED_STRFTIME_DECL /* used in externs.h */ #include "shell.h" +#include "execute_cmd.h" +#include "typemax.h" /* SIZE_MAX if needed */ #include "trap.h" #include "flags.h" #include "parser.h" @@ -68,6 +70,8 @@ #if defined (JOB_CONTROL) # include "jobs.h" +#else +extern int cleanup_dead_jobs PARAMS((void)); #endif /* JOB_CONTROL */ #if defined (ALIAS) @@ -91,6 +95,8 @@ typedef void *alias_t; #define RE_READ_TOKEN -99 #define NO_EXPANSION -100 +#define END_ALIAS -2 + #ifdef DEBUG # define YYDEBUG 1 #else @@ -108,27 +114,29 @@ typedef void *alias_t; # define MBTEST(x) ((x)) #endif +#define EXTEND_SHELL_INPUT_LINE_PROPERTY() \ +do { \ + if (shell_input_line_len + 2 > shell_input_line_propsize) \ + { \ + shell_input_line_propsize = shell_input_line_len + 2; \ + shell_input_line_property = (char *)xrealloc (shell_input_line_property, \ + shell_input_line_propsize); \ + } \ +} while (0) + #if defined (EXTENDED_GLOB) -extern int extended_glob; +extern int extended_glob, extglob_flag; #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; +#if defined (TRANSLATABLE_STRINGS) 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 singlequote_translations; +#endif /* TRANSLATABLE_STRINGS */ +#if !defined (errno) extern int errno; +#endif + /* **************************************************************** */ /* */ /* "Forward" declarations */ @@ -136,86 +144,87 @@ extern int errno; /* **************************************************************** */ #ifdef DEBUG -static void debug_parser __P((int)); +static void debug_parser PARAMS((int)); #endif -static int yy_getc __P((void)); -static int yy_ungetc __P((int)); +static int yy_getc PARAMS((void)); +static int yy_ungetc PARAMS((int)); #if defined (READLINE) -static int yy_readline_get __P((void)); -static int yy_readline_unget __P((int)); +static int yy_readline_get PARAMS((void)); +static int yy_readline_unget PARAMS((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 yy_string_get PARAMS((void)); +static int yy_string_unget PARAMS((int)); +static int yy_stream_get PARAMS((void)); +static int yy_stream_unget PARAMS((int)); -static int shell_getc __P((int)); -static void shell_ungetc __P((int)); -static void discard_until __P((int)); +static int shell_getc PARAMS((int)); +static void shell_ungetc PARAMS((int)); +static void discard_until PARAMS((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 void push_string PARAMS((char *, int, alias_t *)); +static void pop_string PARAMS((void)); +static void free_string_list PARAMS((void)); + +static char *read_a_line PARAMS((int)); -static char *read_a_line __P((int)); +static int reserved_word_acceptable PARAMS((int)); +static int yylex PARAMS((void)); -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)); +static void push_heredoc PARAMS((REDIRECT *)); +static char *mk_alexpansion PARAMS((char *)); +static int alias_expand_token PARAMS((char *)); +static int time_command_acceptable PARAMS((void)); +static int special_case_tokens PARAMS((char *)); +static int read_token PARAMS((int)); +static char *parse_matched_pair PARAMS((int, int, int, int *, int)); +static char *parse_comsub PARAMS((int, int, int, int *, int)); #if defined (ARRAY_VARS) -static char *parse_compound_assignment __P((int *)); +static char *parse_compound_assignment PARAMS((int *)); #endif #if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) -static int parse_dparen __P((int)); -static int parse_arith_cmd __P((char **, int)); +static int parse_dparen PARAMS((int)); +static int parse_arith_cmd PARAMS((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)); +static void cond_error PARAMS((void)); +static COND_COM *cond_expr PARAMS((void)); +static COND_COM *cond_or PARAMS((void)); +static COND_COM *cond_and PARAMS((void)); +static COND_COM *cond_term PARAMS((void)); +static int cond_skip_newlines PARAMS((void)); +static COMMAND *parse_cond_command PARAMS((void)); #endif #if defined (ARRAY_VARS) -static int token_is_assignment __P((char *, int)); -static int token_is_ident __P((char *, int)); +static int token_is_assignment PARAMS((char *, int)); +static int token_is_ident PARAMS((char *, int)); #endif -static int read_token_word __P((int)); -static void discard_parser_constructs __P((int)); +static int read_token_word PARAMS((int)); +static void discard_parser_constructs PARAMS((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 char *error_token_from_token PARAMS((int)); +static char *error_token_from_text PARAMS((void)); +static void print_offending_line PARAMS((void)); +static void report_syntax_error PARAMS((char *)); -static void handle_eof_input_unit __P((void)); -static void prompt_again __P((void)); +static void handle_eof_input_unit PARAMS((void)); +static void prompt_again PARAMS((int)); #if 0 -static void reset_readline_prompt __P((void)); +static void reset_readline_prompt PARAMS((void)); #endif -static void print_prompt __P((void)); +static void print_prompt PARAMS((void)); #if defined (HANDLE_MULTIBYTE) -static void set_line_mbstate __P((void)); +static void set_line_mbstate PARAMS((void)); static char *shell_input_line_property = NULL; +static size_t shell_input_line_propsize = 0; #else # define set_line_mbstate() #endif -extern int yyerror __P((const char *)); +extern int yyerror PARAMS((const char *)); #ifdef DEBUG extern int yydebug; @@ -228,6 +237,9 @@ char *secondary_prompt = SPROMPT; /* PROMPT_STRING_POINTER points to one of these, never to an actual string. */ char *ps1_prompt, *ps2_prompt; +/* Displayed after reading a command but before executing it in an interactive shell */ +char *ps0_prompt; + /* Handle on the current prompt string. Indirectly points through ps1_ or ps2_prompt. */ char **prompt_string_pointer = (char **)NULL; @@ -250,6 +262,9 @@ int extended_quote = 1; /* The number of lines read from input while creating the current command. */ int current_command_line_count; +/* The number of lines in a command saved while we run parse_and_execute */ +int saved_command_line_count; + /* The token that currently denotes the end of parse. */ int shell_eof_token; @@ -261,25 +276,15 @@ 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; +static REDIRECT *redir_stack[HEREDOC_MAX]; int need_here_doc; -/* Pushes REDIR onto redir_stack, resizing it as needed. */ -static void push_redir_stack (REDIRECT *redir) -{ - /* Guard against oveflow. */ - if (need_here_doc + 1 > INT_MAX / sizeof (*redir_stack)) - abort (); - redir_stack = xrealloc (redir_stack, (need_here_doc + 1) * sizeof (*redir_stack)); - redir_stack[need_here_doc++] = redir; -} - /* 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) */ +static size_t shell_input_line_index; +static size_t shell_input_line_size; /* Amount allocated for shell_input_line. */ +static size_t shell_input_line_len; /* strlen (shell_input_line) */ /* Either zero or EOF. */ static int shell_input_line_terminator; @@ -313,7 +318,7 @@ static int global_extglob; 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_lineno[MAX_CASE_NEST+1]; static int word_top = -1; /* If non-zero, it is the token that we want read_token to return @@ -325,6 +330,9 @@ static WORD_DESC *word_desc_to_read; static REDIRECTEE source; static REDIRECTEE redir; + +static FILE *yyoutstream; +static FILE *yyerrstream; %} %union { @@ -343,7 +351,7 @@ static REDIRECTEE redir; 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 +%token IN BANG TIME TIMEOPT TIMEIGN /* More general tokens. yylex () knows how to make these. */ %token WORD ASSIGNMENT_WORD REDIR_WORD @@ -355,16 +363,20 @@ static REDIRECTEE redir; %token LESS_LESS_MINUS AND_GREATER AND_GREATER_GREATER LESS_GREATER %token GREATER_BAR BAR_AND +/* Special; never created by yylex; only set by parse_comsub and xparse_dolparen */ +%token DOLPAREN + /* The types that the various syntactical units return. */ %type inputunit command pipeline pipeline_command -%type list list0 list1 compound_list simple_list simple_list1 +%type list0 list1 compound_list simple_list simple_list1 %type simple_command shell_command %type for_command select_command case_command group_command %type arith_command %type cond_command %type arith_for_command %type coproc +%type comsub %type function_def function_body if_command elif_clause subshell %type redirection redirection_list %type simple_command_element @@ -391,6 +403,14 @@ inputunit: simple_list simple_list_terminator parser_state |= PST_EOFTOKEN; YYACCEPT; } + | comsub + { + /* This is special; look at the production and how + parse_comsub sets token_to_read */ + global_command = $1; + eof_encountered = 0; + YYACCEPT; + } | '\n' { /* Case of regular command, but not a very @@ -415,6 +435,38 @@ inputunit: simple_list simple_list_terminator YYABORT; } } + | error yacc_EOF + { + /* EOF after an error. Do ignoreeof or not. Really + only interesting in non-interactive shells */ + global_command = (COMMAND *)NULL; + if (last_command_exit_value == 0) + last_command_exit_value = EX_BADUSAGE; /* force error return */ + if (interactive && parse_and_execute_level == 0) + { + handle_eof_input_unit (); + YYACCEPT; + } + else + { + YYABORT; + } + } + | error YYEOF + { + global_command = (COMMAND *)NULL; + if (last_command_exit_value == 0) + last_command_exit_value = EX_BADUSAGE; /* force error return */ + if (interactive && parse_and_execute_level == 0) + { + handle_eof_input_unit (); + YYACCEPT; + } + else + { + YYABORT; + } + } | yacc_EOF { /* Case of EOF seen by itself. Do ignoreeof or @@ -526,42 +578,42 @@ redirection: '>' WORD source.dest = 0; redir.filename = $2; $$ = make_redirection (source, r_reading_until, redir, 0); - push_redir_stack ($$); + push_heredoc ($$); } | NUMBER LESS_LESS WORD { source.dest = $1; redir.filename = $3; $$ = make_redirection (source, r_reading_until, redir, 0); - push_redir_stack ($$); + push_heredoc ($$); } | REDIR_WORD LESS_LESS WORD { source.filename = $1; redir.filename = $3; $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN); - push_redir_stack ($$); + push_heredoc ($$); } | LESS_LESS_MINUS WORD { source.dest = 0; redir.filename = $2; $$ = make_redirection (source, r_deblank_reading_until, redir, 0); - push_redir_stack ($$); + push_heredoc ($$); } | NUMBER LESS_LESS_MINUS WORD { source.dest = $1; redir.filename = $3; $$ = make_redirection (source, r_deblank_reading_until, redir, 0); - push_redir_stack ($$); + push_heredoc ($$); } | REDIR_WORD LESS_LESS_MINUS WORD { source.filename = $1; redir.filename = $3; $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN); - push_redir_stack ($$); + push_heredoc ($$); } | LESS_LESS_LESS WORD { @@ -741,14 +793,14 @@ command: simple_command COMMAND *tc; tc = $1; - if (tc->redirects) + if (tc && tc->redirects) { register REDIRECT *t; for (t = tc->redirects; t->next; t = t->next) ; t->next = $2; } - else + else if (tc) tc->redirects = $2; $$ = $1; } @@ -827,55 +879,69 @@ for_command: FOR WORD newline_list DO compound_list DONE 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 ($$ == 0) YYERROR; 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 ($$ == 0) YYERROR; if (word_top > 0) word_top--; } | FOR ARITH_FOR_EXPRS DO compound_list DONE { $$ = make_arith_for_command ($2, $4, arith_for_lineno); + if ($$ == 0) YYERROR; if (word_top > 0) word_top--; } | FOR ARITH_FOR_EXPRS '{' compound_list '}' { $$ = make_arith_for_command ($2, $4, arith_for_lineno); + if ($$ == 0) YYERROR; if (word_top > 0) word_top--; } ; -select_command: SELECT WORD newline_list DO list DONE +select_command: SELECT WORD newline_list DO compound_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 '}' + | SELECT WORD newline_list '{' compound_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 + | SELECT WORD ';' newline_list DO compound_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 '}' + | SELECT WORD ';' newline_list '{' compound_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 + | SELECT WORD newline_list IN word_list list_terminator newline_list DO compound_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 '}' + | SELECT WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' { $$ = 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 list_terminator newline_list DO compound_list DONE + { + $$ = make_select_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD newline_list IN list_terminator newline_list '{' compound_list '}' + { + $$ = make_select_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); + if (word_top > 0) word_top--; + } ; case_command: CASE WORD newline_list IN newline_list ESAC @@ -897,12 +963,12 @@ case_command: CASE WORD newline_list IN newline_list ESAC 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 WORD function_body + { $$ = make_function_def ($2, $3, function_dstart, function_bstart); } + | FUNCTION WORD '\n' newline_list function_body + { $$ = make_function_def ($2, $5, function_dstart, function_bstart); } ; function_body: shell_command @@ -925,14 +991,14 @@ function_body: shell_command redirection. The two are semantically equivalent, though -- the only difference is in how the command printing code displays the redirections. */ - if (tc->redirects) + if (tc && tc->redirects) { register REDIRECT *t; for (t = tc->redirects; t->next; t = t->next) ; t->next = $2; } - else + else if (tc) tc->redirects = $2; $$ = $1; } @@ -945,6 +1011,16 @@ subshell: '(' compound_list ')' } ; +comsub: DOLPAREN compound_list ')' + { + $$ = $2; + } + | DOLPAREN newline_list ')' + { + $$ = (COMMAND *)NULL; + } + ; + coproc: COPROC shell_command { $$ = make_coproc_command ("COPROC", $2); @@ -955,14 +1031,14 @@ coproc: COPROC shell_command COMMAND *tc; tc = $2; - if (tc->redirects) + if (tc && tc->redirects) { register REDIRECT *t; for (t = tc->redirects; t->next; t = t->next) ; t->next = $3; } - else + else if (tc) tc->redirects = $3; $$ = make_coproc_command ("COPROC", $2); $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; @@ -977,14 +1053,14 @@ coproc: COPROC shell_command COMMAND *tc; tc = $3; - if (tc->redirects) + if (tc && tc->redirects) { register REDIRECT *t; for (t = tc->redirects; t->next; t = t->next) ; t->next = $4; } - else + else if (tc) tc->redirects = $4; $$ = make_coproc_command ($2->word, $3); $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL; @@ -1065,15 +1141,12 @@ pattern: WORD It must end with a newline or semicolon. Lists are used within commands such as if, for, while. */ -list: newline_list list0 +compound_list: newline_list list0 { $$ = $2; - if (need_here_doc) + if (need_here_doc && last_read_token == '\n') gather_here_documents (); } - ; - -compound_list: list | newline_list list1 { $$ = $2; @@ -1106,7 +1179,12 @@ list1: list1 AND_AND newline_list list1 | list1 ';' newline_list list1 { $$ = command_connect ($1, $4, ';'); } | list1 '\n' newline_list list1 - { $$ = command_connect ($1, $4, ';'); } + { + if (parser_state & PST_CMDSUBST) + $$ = command_connect ($1, $4, '\n'); + else + $$ = command_connect ($1, $4, ';'); + } | pipeline_command { $$ = $1; } ; @@ -1137,12 +1215,14 @@ simple_list: simple_list1 { $$ = $1; if (need_here_doc) - gather_here_documents (); + gather_here_documents (); /* XXX */ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) { +INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 -> simple_list")); global_command = $1; eof_encountered = 0; - rewind_input_string (); + if (bash_input.type == st_string) + rewind_input_string (); YYACCEPT; } } @@ -1153,12 +1233,14 @@ simple_list: simple_list1 else $$ = command_connect ($1, (COMMAND *)NULL, '&'); if (need_here_doc) - gather_here_documents (); + gather_here_documents (); /* XXX */ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) { +INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 '&' -> simple_list")); global_command = $1; eof_encountered = 0; - rewind_input_string (); + if (bash_input.type == st_string) + rewind_input_string (); YYACCEPT; } } @@ -1166,12 +1248,14 @@ simple_list: simple_list1 { $$ = $1; if (need_here_doc) - gather_here_documents (); + gather_here_documents (); /* XXX */ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) { +INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 ';' -> simple_list")); global_command = $1; eof_encountered = 0; - rewind_input_string (); + if (bash_input.type == st_string) + rewind_input_string (); YYACCEPT; } } @@ -1196,31 +1280,19 @@ simple_list1: simple_list1 AND_AND newline_list simple_list1 ; pipeline_command: pipeline - { $$ = $1; } - | BANG pipeline + { $$ = $1; } + | BANG pipeline_command { if ($2) - $2->flags |= CMD_INVERT_RETURN; + $2->flags ^= CMD_INVERT_RETURN; /* toggle */ $$ = $2; } - | timespec pipeline + | timespec pipeline_command { 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; @@ -1237,8 +1309,31 @@ pipeline_command: pipeline /* XXX - let's cheat and push a newline back */ if ($2 == '\n') token_to_read = '\n'; + else if ($2 == ';') + token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ + } + | BANG list_terminator + { + ELEMENT x; + + /* This is just as unclean. Posix says that `!' + by itself should be equivalent to `false'. + 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 |= CMD_INVERT_RETURN; + /* XXX - let's cheat and push a newline back */ + if ($2 == '\n') + token_to_read = '\n'; + if ($2 == ';') + token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ } - ; pipeline: pipeline '|' newline_list pipeline @@ -1274,6 +1369,10 @@ timespec: TIME { $$ = CMD_TIME_PIPELINE; } | TIME TIMEOPT { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } + | TIME TIMEIGN + { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } + | TIME TIMEOPT TIMEIGN + { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } ; %% @@ -1302,6 +1401,8 @@ debug_parser (i) { #if YYDEBUG != 0 yydebug = i; + yyoutstream = stdout; + yyerrstream = stderr; #endif } #endif @@ -1422,9 +1523,9 @@ yy_readline_get () int line_len; unsigned char c; - if (!current_readline_line) + if (current_readline_line == 0) { - if (!bash_readline_initialized) + if (bash_readline_initialized == 0) initialize_readline (); #if defined (JOB_CONTROL) @@ -1432,22 +1533,21 @@ yy_readline_get () give_terminal_to (shell_pgrp, 0); #endif /* JOB_CONTROL */ - old_sigint = (SigHandler *)NULL; + old_sigint = IMPOSSIBLE_TRAP_HANDLER; if (signal_is_ignored (SIGINT) == 0) { old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler); - interrupt_immediately++; } - terminate_immediately = 1; + sh_unset_nodelay_mode (fileno (rl_instream)); /* just in case */ current_readline_line = readline (current_readline_prompt ? current_readline_prompt : ""); - terminate_immediately = 0; - if (signal_is_ignored (SIGINT) == 0 && old_sigint) + CHECK_TERMSIG; + if (signal_is_ignored (SIGINT) == 0) { - interrupt_immediately--; - set_signal_handler (SIGINT, old_sigint); + if (old_sigint != IMPOSSIBLE_TRAP_HANDLER) + set_signal_handler (SIGINT, old_sigint); } #if 0 @@ -1501,6 +1601,16 @@ with_input_from_stdin () } } +/* Will we be collecting another input line and printing a prompt? This uses + different conditions than SHOULD_PROMPT(), since readline allows a user to + embed a newline in the middle of the line it collects, which the parser + will interpret as a line break and command delimiter. */ +int +parser_will_prompt () +{ + return (current_readline_line == 0 || current_readline_line[current_readline_line_index] == 0); +} + #else /* !READLINE */ void @@ -1559,7 +1669,7 @@ with_input_from_string (string, name) 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 +void rewind_input_string () { int xchars; @@ -1571,7 +1681,7 @@ rewind_input_string () 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 + 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. */ @@ -1589,9 +1699,9 @@ rewind_input_string () /* 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. */ + installs most of its signal handlers without the SA_RESTART flag, some + signals received during a read(2) will not cause the read to be restarted. + We will need to restart it ourselves. */ static int yy_stream_get () @@ -1601,17 +1711,9 @@ yy_stream_get () result = EOF; if (bash_input.location.file) { - if (interactive) - { - interrupt_immediately++; - terminate_immediately++; - } + /* XXX - don't need terminate_immediately; getc_with_restart checks + for terminating signals itself if read returns < 0 */ result = getc_with_restart (bash_input.location.file); - if (interactive) - { - interrupt_immediately--; - terminate_immediately--; - } } return (result); } @@ -1646,6 +1748,9 @@ typedef struct stream_saver { /* The globally known line number. */ int line_number = 0; +/* The line number offset set by assigning to LINENO. Not currently used. */ +int line_number_base = 0; + #if defined (COND_COMMAND) static int cond_lineno; static int cond_token; @@ -1773,8 +1878,6 @@ restore_token_state (ts) * everything between a `;;' and the next `)' or `esac' */ -#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) - #define END_OF_ALIAS 0 /* @@ -1786,6 +1889,11 @@ restore_token_state (ts) * implement alias expansion on a per-token basis. */ +#define PSH_ALIAS 0x01 +#define PSH_DPAREN 0x02 +#define PSH_SOURCE 0x04 +#define PSH_ARRAY 0x08 + typedef struct string_saver { struct string_saver *next; int expand_alias; /* Value to set expand_alias to when string is popped. */ @@ -1793,7 +1901,9 @@ typedef struct string_saver { #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; + size_t saved_line_size, saved_line_index, saved_line_len; + int saved_line_terminator; + int flags; } STRING_SAVER; STRING_SAVER *pushed_string_list = (STRING_SAVER *)NULL; @@ -1817,10 +1927,14 @@ push_string (s, expand, ap) temp->expand_alias = expand; temp->saved_line = shell_input_line; temp->saved_line_size = shell_input_line_size; + temp->saved_line_len = shell_input_line_len; temp->saved_line_index = shell_input_line_index; temp->saved_line_terminator = shell_input_line_terminator; + temp->flags = 0; #if defined (ALIAS) temp->expander = ap; + if (ap) + temp->flags = PSH_ALIAS; #endif temp->next = pushed_string_list; pushed_string_list = temp; @@ -1831,7 +1945,7 @@ push_string (s, expand, ap) #endif shell_input_line = s; - shell_input_line_size = strlen (s); + shell_input_line_size = shell_input_line_len = STRLEN (s); shell_input_line_index = 0; shell_input_line_terminator = '\0'; #if 0 @@ -1856,12 +1970,15 @@ pop_string () 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_len = pushed_string_list->saved_line_len; shell_input_line_terminator = pushed_string_list->saved_line_terminator; +#if defined (ALIAS) if (pushed_string_list->expand_alias) parser_state |= PST_ALEXPNEXT; else parser_state &= ~PST_ALEXPNEXT; +#endif t = pushed_string_list; pushed_string_list = pushed_string_list->next; @@ -1895,8 +2012,6 @@ free_string_list () pushed_string_list = (STRING_SAVER *)NULL; } -#endif /* ALIAS || DPAREN_ARITHMETIC */ - void free_pushed_string_input () { @@ -1905,6 +2020,58 @@ free_pushed_string_input () #endif } +int +parser_expanding_alias () +{ + return (expanding_alias ()); +} + +void +parser_save_alias () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + push_string ((char *)NULL, 0, (alias_t *)NULL); + pushed_string_list->flags = PSH_SOURCE; /* XXX - for now */ +#else + ; +#endif +} + +void +parser_restore_alias () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + if (pushed_string_list) + pop_string (); +#else + ; +#endif +} + +#if defined (ALIAS) +/* Before freeing AP, make sure that there aren't any cases of pointer + aliasing that could cause us to reference freed memory later on. */ +void +clear_string_list_expander (ap) + alias_t *ap; +{ + register STRING_SAVER *t; + + for (t = pushed_string_list; t; t = t->next) + { + if (t->expander && t->expander == ap) + t->expander = 0; + } +} +#endif + +void +clear_shell_input_line () +{ + if (shell_input_line) + shell_input_line[shell_input_line_index = 0] = '\0'; +} + /* 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 \ pairs. This is used by @@ -1934,12 +2101,7 @@ read_a_line (remove_quoted_newline) /* Ignore null bytes in input. */ if (c == 0) - { -#if 0 - internal_warning ("read_a_line: ignored null byte in input"); -#endif - continue; - } + continue; /* If there is no more input, then we return NULL. */ if (c == EOF) @@ -1951,7 +2113,8 @@ read_a_line (remove_quoted_newline) c = '\n'; } - /* `+2' in case the final character in the buffer is a newline. */ + /* `+2' in case the final character in the buffer is a newline or we + have to handle CTLESC or CTLNUL. */ RESIZE_MALLOCED_BUFFER (line_buffer, indx, 2, buffer_size, 128); /* IF REMOVE_QUOTED_NEWLINES is non-zero, we are reading a @@ -1967,6 +2130,7 @@ read_a_line (remove_quoted_newline) } else if (c == '\\' && remove_quoted_newline) { + QUIT; peekc = yy_getc (); if (peekc == '\n') { @@ -1981,7 +2145,14 @@ read_a_line (remove_quoted_newline) } } else - line_buffer[indx++] = c; + { + /* remove_quoted_newline is non-zero if the here-document delimiter + is unquoted. In this case, we will be expanding the lines and + need to make sure CTLESC and CTLNUL in the input are quoted. */ + if (remove_quoted_newline && (c == CTLESC || c == CTLNUL)) + line_buffer[indx++] = CTLESC; + line_buffer[indx++] = c; + } if (c == '\n') { @@ -2004,16 +2175,16 @@ read_secondary_line (remove_quoted_newline) int n, c; prompt_string_pointer = &ps2_prompt; - if (SHOULD_PROMPT()) - prompt_again (); + if (SHOULD_PROMPT ()) + prompt_again (0); 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. + /* To make adding 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++; @@ -2068,6 +2239,7 @@ STRING_INT_ALIST word_token_alist[] = { /* other tokens that can be returned by read_token() */ STRING_INT_ALIST other_token_alist[] = { /* Multiple-character tokens with special values */ + { "--", TIMEIGN }, { "-p", TIMEOPT }, { "&&", AND_AND }, { "||", OR_OR }, @@ -2149,12 +2321,14 @@ static struct dstack temp_dstack = { (char *)NULL, 0, 0 }; shell_ungetc when we're at the start of a line. */ static int eol_ungetc_lookahead = 0; +static int unquoted_backslash = 0; + static int shell_getc (remove_quoted_newline) int remove_quoted_newline; { register int i; - int c; + int c, truncating, last_was_backslash; unsigned char uc; char *history_buf = NULL; @@ -2163,6 +2337,7 @@ shell_getc (remove_quoted_newline) QUIT; + last_was_backslash = 0; if (sigwinch_received) { sigwinch_received = 0; @@ -2189,15 +2364,23 @@ shell_getc (remove_quoted_newline) { line_number++; + /* Let's not let one really really long line blow up memory allocation */ + if (shell_input_line && shell_input_line_size >= 32768) + { + free (shell_input_line); + shell_input_line = 0; + shell_input_line_size = 0; + } + restart_read: /* Allow immediate exit if interrupted during input. */ QUIT; - i = 0; + i = truncating = 0; shell_input_line_terminator = 0; - /* If the shell is interatctive, but not currently printing a prompt + /* If the shell is interactive, 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. */ @@ -2224,7 +2407,7 @@ shell_getc (remove_quoted_newline) if (bash_input.type == st_stream) clearerr (stdin); - int no_escape = 0; + int no_escape = 0; while (1) { c = yy_getc (); @@ -2234,13 +2417,43 @@ shell_getc (remove_quoted_newline) if (c == '\0') { -#if 0 - internal_warning ("shell_getc: ignored null byte in input"); -#endif + /* If we get EOS while parsing a string, treat it as EOF so we + don't just keep looping. Happens very rarely */ + if (bash_input.type == st_string) + { + if (i == 0) + shell_input_line_terminator = EOF; + shell_input_line[i] = '\0'; + c = EOF; + break; + } continue; } - RESIZE_MALLOCED_BUFFER (shell_input_line, i, 2, shell_input_line_size, 256); + /* Theoretical overflow */ + /* If we can't put 256 bytes more into the buffer, allocate + everything we can and fill it as full as we can. */ + /* XXX - we ignore rest of line using `truncating' flag */ + if (shell_input_line_size > (SIZE_MAX - 256)) + { + size_t n; + + n = SIZE_MAX - i; /* how much more can we put into the buffer? */ + if (n <= 2) /* we have to save 1 for the newline added below */ + { + if (truncating == 0) + internal_warning(_("shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated"), shell_input_line_size, (unsigned long)SIZE_MAX); + shell_input_line[i] = '\0'; + truncating = 1; + } + if (shell_input_line_size < SIZE_MAX) + { + shell_input_line_size = SIZE_MAX; + shell_input_line = xrealloc (shell_input_line, shell_input_line_size); + } + } + else + RESIZE_MALLOCED_BUFFER (shell_input_line, i, 2, shell_input_line_size, 256); if (c == EOF) { @@ -2254,55 +2467,55 @@ shell_getc (remove_quoted_newline) break; } + //need to fix terminating special character ';' + //vyatta + if (interactive && + shell_input_line) { + char *string = shell_input_line; - //need to fix terminating special character ';' - //vyatta - if (interactive && - shell_input_line) { + while (*string && (whitespace (*string) || *string == '\n')) + string++; - char *string = shell_input_line; + int pos = string - shell_input_line; - while (*string && (whitespace (*string) || *string == '\n')) - string++; - - int pos = string - shell_input_line; - - //find where string starts (skipping whitespace) - if (strncmp(&shell_input_line[pos],"set ",4) == 0 || - strncmp(&shell_input_line[pos],"delete ",7) == 0) { - if (c == '"' || c == '\'') { - //this suppresses a quoted string - if (no_escape == 1) { - no_escape = 0; - } - else { - no_escape = 1; - } - } - else if ((c == ';' || - c == '&' || - c == '(' || - c == ')' || - c == '>' || - c == '<' || - c == '|' || - c == '`') && - shell_input_line[i-1] != '\\') { - if (no_escape == 0) { - shell_input_line[i++] = '\\'; - - history_buf = realloc(history_buf,i+1); - register int j; - for (j = history_start; j < i-1; ++j) { - history_buf[history_index++] = shell_input_line[j]; - } - history_start = i; + //find where string starts (skipping whitespace) + if (strncmp(&shell_input_line[pos],"set ",4) == 0 || + strncmp(&shell_input_line[pos],"delete ",7) == 0) { + if (c == '"' || c == '\'') { + //this suppresses a quoted string + if (no_escape == 1) { + no_escape = 0; + } + else { + no_escape = 1; + } + } + else if ((c == ';' || + c == '&' || + c == '(' || + c == ')' || + c == '>' || + c == '<' || + c == '|' || + c == '`') && + shell_input_line[i-1] != '\\') { + if (no_escape == 0) { + shell_input_line[i++] = '\\'; + + history_buf = realloc(history_buf,i+1); + register int j; + for (j = history_start; j < i-1; ++j) { + history_buf[history_index++] = shell_input_line[j]; + } + history_start = i; + } + } + } } - } - } - } - shell_input_line[i++] = c; + + if (truncating == 0 || c == '\n') + shell_input_line[i++] = c; if (c == '\n') { @@ -2310,6 +2523,8 @@ shell_getc (remove_quoted_newline) current_command_line_count++; break; } + + last_was_backslash = last_was_backslash == 0 && c == '\\'; } shell_input_line_index = 0; @@ -2322,16 +2537,20 @@ shell_getc (remove_quoted_newline) { 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; + history_quoting_state = '\''; + else if (current_delimiter (dstack) == '"') + history_quoting_state = '"'; + else + history_quoting_state = 0; # endif - //vyatta + /* Calling with a third argument of 1 allows remember_on_history to + determine whether or not the line is saved to the history list */ + // expansions = pre_process_line (shell_input_line, 1, 1); + //vyatta int flag = 0; if (history_index > 0) { history_buf = realloc(history_buf,i+1); @@ -2349,7 +2568,7 @@ shell_getc (remove_quoted_newline) flag = expansions != shell_input_line; } # if defined (BANG_HISTORY) - history_expansion_inhibited = old_hist; + history_quoting_state = 0; # endif if (flag) { @@ -2357,7 +2576,7 @@ shell_getc (remove_quoted_newline) shell_input_line = expansions; shell_input_line_len = shell_input_line ? strlen (shell_input_line) : 0; - if (!shell_input_line_len) + if (shell_input_line_len == 0) current_command_line_count--; /* We have to force the xrealloc below because we don't know @@ -2382,7 +2601,7 @@ shell_getc (remove_quoted_newline) else { char *hdcs; - hdcs = history_delimiting_chars (); + hdcs = history_delimiting_chars (shell_input_line); if (hdcs && hdcs[0] == ';') maybe_add_history (shell_input_line); } @@ -2393,9 +2612,14 @@ shell_getc (remove_quoted_newline) if (shell_input_line) { /* Lines that signify the end of the shell's input should not be - echoed. */ + echoed. We should not echo lines while parsing command + substitutions with recursive calls into the parsing engine; those + should only be echoed once when we read the word. That is the + reason for the test against shell_eof_token, which is set to a + right paren when parsing the contents of command substitutions. */ if (echo_input_at_read && (shell_input_line[0] || - shell_input_line_terminator != EOF)) + shell_input_line_terminator != EOF) && + shell_eof_token == 0) fprintf (stderr, "%s\n", shell_input_line); } else @@ -2403,7 +2627,7 @@ shell_getc (remove_quoted_newline) shell_input_line_size = 0; prompt_string_pointer = ¤t_prompt_string; if (SHOULD_PROMPT ()) - prompt_again (); + prompt_again (0); goto restart_read; } @@ -2411,21 +2635,41 @@ shell_getc (remove_quoted_newline) not already end in an EOF character. */ if (shell_input_line_terminator != EOF) { - if (shell_input_line_len + 3 > shell_input_line_size) + if (shell_input_line_size < SIZE_MAX-3 && (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'; + /* Don't add a newline to a string that ends with a backslash if we're + going to be removing quoted newlines, since that will eat the + backslash. Add another backslash instead (will be removed by + word expansion). */ + if (bash_input.type == st_string && expanding_alias() == 0 && last_was_backslash && c == EOF && remove_quoted_newline) + shell_input_line[shell_input_line_len] = '\\'; + else + shell_input_line[shell_input_line_len] = '\n'; shell_input_line[shell_input_line_len + 1] = '\0'; - set_line_mbstate (); +#if defined (HANDLE_MULTIBYTE) + /* This is kind of an abstraction violation, but there's no need to + go through the entire shell_input_line again with a call to + set_line_mbstate(). */ + EXTEND_SHELL_INPUT_LINE_PROPERTY(); + shell_input_line_property[shell_input_line_len] = 1; +#endif } } +next_alias_char: + if (shell_input_line_index == 0) + unquoted_backslash = 0; + uc = shell_input_line[shell_input_line_index]; if (uc) - shell_input_line_index++; + { + unquoted_backslash = unquoted_backslash == 0 && 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 @@ -2433,38 +2677,121 @@ shell_getc (remove_quoted_newline) 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. */ + /* If pushed_string_list != 0 but pushed_string_list->expander == 0 (not + currently tested) and the flags value is not PSH_SOURCE, we are not + parsing an alias, we have just saved one (push_string, when called by + the parse_dparen code) In this case, just go on as well. The PSH_SOURCE + case is handled below. */ + + /* If we're at the end of an alias expansion add a space to make sure that + the alias remains marked as being in use while we expand its last word. + This makes sure that pop_string doesn't mark the alias as not in use + before the string resulting from the alias expansion is tokenized and + checked for alias expansion, preventing recursion. At this point, the + last character in shell_input_line is the last character of the alias + expansion. We test that last character to determine whether or not to + return the space that will delimit the token and postpone the pop_string. + This set of conditions duplicates what used to be in mk_alexpansion () + below, with the addition that we don't add a space if we're currently + reading a quoted string or in a shell comment. */ +#ifndef OLD_ALIAS_HACK + if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE && + pushed_string_list->flags != PSH_DPAREN && + (parser_state & PST_COMMENT) == 0 && + (parser_state & PST_ENDALIAS) == 0 && /* only once */ + shell_input_line_index > 0 && + shellblank (shell_input_line[shell_input_line_index-1]) == 0 && + shell_input_line[shell_input_line_index-1] != '\n' && + unquoted_backslash == 0 && + shellmeta (shell_input_line[shell_input_line_index-1]) == 0 && + (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"')) + { + parser_state |= PST_ENDALIAS; + /* We need to do this to make sure last_shell_getc_is_singlebyte returns + true, since we are returning a single-byte space. */ + if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0) + { +#if 0 + EXTEND_SHELL_INPUT_LINE_PROPERTY(); + shell_input_line_property[shell_input_line_len++] = 1; + /* extend shell_input_line to accommodate the shell_ungetc that + read_token_word() will perform, since we're extending the index */ + RESIZE_MALLOCED_BUFFER (shell_input_line, shell_input_line_index, 2, shell_input_line_size, 16); + shell_input_line[++shell_input_line_index] = '\0'; /* XXX */ +#else + shell_input_line_property[shell_input_line_index - 1] = 1; +#endif + } + return ' '; /* END_ALIAS */ + } +#endif + pop_alias: - if (!uc && (pushed_string_list != (STRING_SAVER *)NULL)) +#endif /* ALIAS || DPAREN_ARITHMETIC */ + /* This case works for PSH_DPAREN as well as the shell_ungets() case that uses + push_string */ + if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE) { + parser_state &= ~PST_ENDALIAS; 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 (); + prompt_again (0); 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) */ + + /* What do we do here if we're expanding an alias whose definition + includes an escaped newline? If that's the last character in the + alias expansion, we just pop the pushed string list (recall that + we inhibit the appending of a space if newline is the last + character). If it's not the last character, we need to consume the + quoted newline and move to the next character in the expansion. */ +#if defined (ALIAS) if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0') { uc = 0; goto pop_alias; } -#endif - - goto restart_read; + else if (expanding_alias () && shell_input_line[shell_input_line_index+1] != '\0') + { + shell_input_line_index++; /* skip newline */ + goto next_alias_char; /* and get next character */ + } + else +#endif + goto restart_read; } - if (!uc && shell_input_line_terminator == EOF) + if (uc == 0 && shell_input_line_terminator == EOF) return ((shell_input_line_index != 0) ? '\n' : EOF); +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + /* We already know that we are not parsing an alias expansion because of the + check for expanding_alias() above. This knows how parse_and_execute + handles switching to st_string input while an alias is being expanded, + hence the check for pushed_string_list without pushed_string_list->expander + and the check for PSH_SOURCE as pushed_string_list->flags. + parse_and_execute and parse_string both change the input type to st_string + and place the string to be parsed and executed into location.string, so + we should not stop reading that until the pointer is '\0'. + The check for shell_input_line_terminator may be superfluous. + + This solves the problem of `.' inside a multi-line alias with embedded + newlines executing things out of order. */ + if (uc == 0 && bash_input.type == st_string && *bash_input.location.string && + pushed_string_list && pushed_string_list->flags == PSH_SOURCE && + shell_input_line_terminator == 0) + { + shell_input_line_index = 0; + goto restart_read; + } +#endif + return (uc); } @@ -2483,29 +2810,93 @@ shell_ungetc (c) 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; +/* Push S back into shell_input_line; updating shell_input_line_index */ +void +shell_ungets (s) + char *s; { - int c; + size_t slen, chars_left; - while ((c = shell_getc (0)) != EOF && c != character) - ; + slen = strlen (s); - if (c != EOF) - shell_ungetc (c); + if (shell_input_line[shell_input_line_index] == '\0') + { + /* Easy, just overwrite shell_input_line. This is preferred because it + saves on set_line_mbstate () and other overhead like push_string */ + if (shell_input_line_size <= slen) + RESIZE_MALLOCED_BUFFER (shell_input_line, shell_input_line_index, slen + 1, shell_input_line_size, 64); + strcpy (shell_input_line, s); + shell_input_line_index = 0; + shell_input_line_len = slen; + shell_input_line_terminator = 0; + } + else if (shell_input_line_index >= slen) + { + /* Just as easy, just back up shell_input_line_index, but it means we + will re-process some characters in set_line_mbstate(). Need to + watch pushing back newlines here. */ + while (slen > 0) + shell_input_line[--shell_input_line_index] = s[--slen]; + } + else if (s[slen - 1] == '\n') + { + push_string (savestring (s), 0, (alias_t *)NULL); + /* push_string does set_line_mbstate () */ + return; + } + else + { + /* Harder case: pushing back input string that's longer than what we've + consumed from shell_input_line so far. */ + INTERNAL_DEBUG (("shell_ungets: not at end of shell_input_line")); + + chars_left = shell_input_line_len - shell_input_line_index; + if (shell_input_line_size <= (slen + chars_left)) + RESIZE_MALLOCED_BUFFER (shell_input_line, shell_input_line_index, chars_left + slen + 1, shell_input_line_size, 64); + memmove (shell_input_line + slen, shell_input_line + shell_input_line_index, shell_input_line_len - shell_input_line_index); + strcpy (shell_input_line, s); + shell_input_line_index = 0; + shell_input_line_len = strlen (shell_input_line); /* chars_left + slen? */ + } + +#if defined (HANDLE_MULTIBYTE) + set_line_mbstate (); /* XXX */ +#endif +} + +char * +parser_remaining_input () +{ + if (shell_input_line == 0) + return 0; + if ((int)shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len) + return ""; /* XXX */ + return (shell_input_line + shell_input_line_index); +} + +#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 @@ -2520,7 +2911,7 @@ execute_variable_command (command, vname) if (last_lastarg) last_lastarg = savestring (last_lastarg); - parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST); + parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE); restore_parser_state (&ps); bind_variable ("_", last_lastarg, 0); @@ -2530,12 +2921,23 @@ execute_variable_command (command, vname) token_to_read = 0; } +void +push_token (x) + int x; +{ + two_tokens_ago = token_before_that; + token_before_that = last_read_token; + last_read_token = current_token; + + current_token = x; +} + /* 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; +static size_t token_buffer_size; /* Command to read_token () explaining what we want it to do. */ #define READ 0 @@ -2554,7 +2956,7 @@ yylex () 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 ()) + if (prompt_is_ps1 && parse_and_execute_level == 0 && time_to_check_mail ()) { check_mail (); reset_mail_timer (); @@ -2563,7 +2965,7 @@ yylex () /* 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 (); + prompt_again (0); } two_tokens_ago = token_before_that; @@ -2573,11 +2975,16 @@ yylex () if ((parser_state & PST_EOFTOKEN) && current_token == shell_eof_token) { - current_token = yacc_EOF; - if (bash_input.type == st_string) - rewind_input_string (); + /* placeholder for any special handling. */ + return (current_token); } - parser_state &= ~PST_EOFTOKEN; + + if (current_token < 0) +#if defined (YYERRCODE) && !defined (YYUNDEF) + current_token = EOF_Reached ? YYEOF : YYERRCODE; +#else + current_token = EOF_Reached ? YYEOF : YYUNDEF; +#endif return (current_token); } @@ -2586,29 +2993,68 @@ yylex () which allow ESAC to be the next one read. */ static int esacs_needed_count; +/* When non-zero, we can read IN as an acceptable token, regardless of how + many newlines we read. */ +static int expecting_in_token; + +static void +push_heredoc (r) + REDIRECT *r; +{ + if (need_here_doc >= HEREDOC_MAX) + { + last_command_exit_value = EX_BADUSAGE; + need_here_doc = 0; + report_syntax_error (_("maximum here-document count exceeded")); + reset_parser (); + exit_shell (last_command_exit_value); + } + redir_stack[need_here_doc++] = r; +} + void gather_here_documents () { int r; r = 0; - while (need_here_doc) + here_doc_first_line = 1; + while (need_here_doc > 0) { parser_state |= PST_HEREDOC; make_here_document (redir_stack[r++], line_number); parser_state &= ~PST_HEREDOC; need_here_doc--; + redir_stack[r - 1] = 0; /* XXX */ } + here_doc_first_line = 0; /* just in case */ } /* When non-zero, an open-brace used to create a group is awaiting a close brace partner. */ static int open_brace_count; +/* In the following three macros, `token' is always last_read_token */ + +/* Are we in the middle of parsing a redirection where we are about to read + a word? This is used to make sure alias expansion doesn't happen in the + middle of a redirection, even though we're parsing a simple command. */ +#define parsing_redirection(token) \ + (token == '<' || token == '>' || \ + token == GREATER_GREATER || token == GREATER_BAR || \ + token == LESS_GREATER || token == LESS_LESS_MINUS || \ + token == LESS_LESS || token == LESS_LESS_LESS || \ + token == LESS_AND || token == GREATER_AND || token == AND_GREATER) + +/* Is `token' one that will allow a WORD to be read in a command position? + We can read a simple command name on which we should attempt alias expansion + or we can read an assignment statement. */ #define command_token_position(token) \ - (((token) == ASSIGNMENT_WORD) || (parser_state&PST_REDIRLIST) || \ + (((token) == ASSIGNMENT_WORD) || \ + ((parser_state&PST_REDIRLIST) && parsing_redirection(token) == 0) || \ ((token) != SEMI_SEMI && (token) != SEMI_AND && (token) != SEMI_SEMI_AND && reserved_word_acceptable(token))) +/* Are we in a position where we can read an assignment statement? */ #define assignment_acceptable(token) \ (command_token_position(token) && ((parser_state & PST_CASEPAT) == 0)) @@ -2627,9 +3073,14 @@ static int open_brace_count; break; \ if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \ break; \ - if (word_token_alist[i].token == ESAC) \ + if ((parser_state & PST_CASEPAT) && last_read_token == '|' && word_token_alist[i].token == ESAC) \ + break; /* Posix grammar rule 4 */ \ + if ((parser_state & PST_CASEPAT) && last_read_token == '(' && word_token_alist[i].token == ESAC) /*)*/ \ + break; /* phantom Posix grammar rule 4 */ \ + if (word_token_alist[i].token == ESAC) { \ parser_state &= ~(PST_CASEPAT|PST_CASESTMT); \ - else if (word_token_alist[i].token == CASE) \ + esacs_needed_count--; \ + } 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); \ @@ -2669,12 +3120,15 @@ mk_alexpansion (s) 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 +#ifdef OLD_ALIAS_HACK + /* If the last character in the alias is a newline, don't add a trailing + space to the expansion. Works with shell_getc above. */ + /* Need to do something about the case where the alias expansion contains + an unmatched quoted string, since appending this space affects the + subsequent output. */ + if (l > 0 && r[l - 1] != ' ' && r[l - 1] != '\n' && shellmeta(r[l - 1]) == 0) r[l++] = ' '; +#endif r[l] = '\0'; return r; } @@ -2686,8 +3140,12 @@ alias_expand_token (tokstr) char *expanded; alias_t *ap; +#if 0 if (((parser_state & PST_ALEXPNEXT) || command_token_position (last_read_token)) && (parser_state & PST_CASEPAT) == 0) +#else + if ((parser_state & PST_ALEXPNEXT) || assignment_acceptable (last_read_token)) +#endif { ap = find_alias (tokstr); @@ -2695,10 +3153,14 @@ alias_expand_token (tokstr) if (ap && (ap->flags & AL_BEINGEXPANDED)) return (NO_EXPANSION); +#ifdef OLD_ALIAS_HACK /* 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. */ + so the lookahead by the parser works right (the alias needs to remain + `in use' while parsing its last word to avoid alias recursion for + something like "alias echo=echo"). 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. */ +#endif expanded = ap ? mk_alexpansion (ap->value) : (char *)NULL; if (expanded) @@ -2718,19 +3180,46 @@ static int time_command_acceptable () { #if defined (COMMAND_TIMING) + int i; + + if (posixly_correct && shell_compatibility_level > 41) + { + /* Quick check of the rest of the line to find the next token. If it + begins with a `-', Posix says to not return `time' as the token. + This was interp 267. */ + i = shell_input_line_index; + while (i < shell_input_line_len && (shell_input_line[i] == ' ' || shell_input_line[i] == '\t')) + i++; + if (shell_input_line[i] == '-') + return 0; + } + switch (last_read_token) { case 0: case ';': case '\n': + if (token_before_that == '|') + return (0); + /* FALLTHROUGH */ case AND_AND: case OR_OR: case '&': + case WHILE: case DO: + case UNTIL: + case IF: case THEN: + case ELIF: case ELSE: case '{': /* } */ - case '(': /* ) */ + case '(': /* )( */ + case ')': /* only valid in case statement */ + case BANG: /* ! time pipeline */ + case TIME: /* time time pipeline */ + case TIMEOPT: /* time -p time pipeline */ + case TIMEIGN: /* time -p -- ... */ + case DOLPAREN: return 1; default: return 0; @@ -2757,6 +3246,7 @@ time_command_acceptable () `}' is recognized if there is an unclosed `{' present. `-p' is returned as TIMEOPT if the last read token was TIME. + `--' is returned as TIMEIGN if the last read token was TIME or TIMEOPT. ']]' is returned as COND_END if the parser is currently parsing a conditional expression ((parser_state & PST_CONDEXPR) != 0) @@ -2769,6 +3259,7 @@ static int special_case_tokens (tokstr) char *tokstr; { + /* Posix grammar rule 6 */ if ((last_read_token == WORD) && #if defined (SELECT_COMMAND) ((token_before_that == FOR) || (token_before_that == CASE) || (token_before_that == SELECT)) && @@ -2782,9 +3273,34 @@ special_case_tokens (tokstr) parser_state |= PST_CASEPAT; esacs_needed_count++; } + if (expecting_in_token) + expecting_in_token--; return (IN); } + /* XXX - leaving above code intact for now, but it should eventually be + removed in favor of this clause. */ + /* Posix grammar rule 6 */ + if (expecting_in_token && (last_read_token == WORD || last_read_token == '\n') && + (tokstr[0] == 'i' && tokstr[1] == 'n' && tokstr[2] == 0)) + { + if (parser_state & PST_CASESTMT) + { + parser_state |= PST_CASEPAT; + esacs_needed_count++; + } + expecting_in_token--; + return (IN); + } + /* Posix grammar rule 6, third word in FOR: for i; do command-list; done */ + else if (expecting_in_token && (last_read_token == '\n' || last_read_token == ';') && + (tokstr[0] == 'd' && tokstr[1] == 'o' && tokstr[2] == '\0')) + { + expecting_in_token--; + return (DO); + } + + /* for i do; command-list; done */ if (last_read_token == WORD && #if defined (SELECT_COMMAND) (token_before_that == FOR || token_before_that == SELECT) && @@ -2792,7 +3308,11 @@ special_case_tokens (tokstr) (token_before_that == FOR) && #endif (tokstr[0] == 'd' && tokstr[1] == 'o' && tokstr[2] == '\0')) - return (DO); + { + if (expecting_in_token) + expecting_in_token--; + return (DO); + } /* Ditto for ESAC in the CASE case. Specifically, this handles "case word in esac", which is a legal @@ -2802,9 +3322,9 @@ special_case_tokens (tokstr) the designers disagree. */ if (esacs_needed_count) { - esacs_needed_count--; - if (STREQ (tokstr, "esac")) + if (last_read_token == IN && STREQ (tokstr, "esac")) { + esacs_needed_count--; parser_state &= ~PST_CASEPAT; return (ESAC); } @@ -2842,13 +3362,12 @@ special_case_tokens (tokstr) /* 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 */ + /* Handle -- after `time'. */ + if (last_read_token == TIME && tokstr[0] == '-' && tokstr[1] == '-' && !tokstr[2]) + return (TIMEIGN); + /* Handle -- after `time -p'. */ + if (last_read_token == TIMEOPT && tokstr[0] == '-' && tokstr[1] == '-' && !tokstr[2]) + return (TIMEIGN); #endif #if defined (COND_COMMAND) /* [[ */ @@ -2869,17 +3388,21 @@ reset_parser () #if defined (EXTENDED_GLOB) /* Reset to global value of extended glob */ - if (parser_state & PST_EXTPAT) - extended_glob = global_extglob; + if (parser_state & (PST_EXTPAT|PST_CMDSUBST)) + extended_glob = extglob_flag; #endif + if (parser_state & (PST_CMDSUBST|PST_STRING)) + expand_aliases = expaliases_flag; parser_state = 0; + here_doc_first_line = 0; #if defined (ALIAS) || defined (DPAREN_ARITHMETIC) if (pushed_string_list) free_string_list (); #endif /* ALIAS || DPAREN_ARITHMETIC */ + /* This is where we resynchronize to the next newline on error/reset */ if (shell_input_line) { free (shell_input_line); @@ -2892,11 +3415,23 @@ reset_parser () eol_ungetc_lookahead = 0; + /* added post-bash-5.1 */ + need_here_doc = 0; + redir_stack[0] = 0; + esacs_needed_count = expecting_in_token = 0; + current_token = '\n'; /* XXX */ last_read_token = '\n'; token_to_read = '\n'; } +void +reset_readahead_token () +{ + if (token_to_read == '\n') + token_to_read = 0; +} + /* Read the next token. Command can be READ (normal operation) or RESET (to normalize state). */ static int @@ -2958,15 +3493,26 @@ read_token (command) return (yacc_EOF); } + /* If we hit the end of the string and we're not expanding an alias (e.g., + we are eval'ing a string that is an incomplete command), return EOF */ + if (character == '\0' && bash_input.type == st_string && expanding_alias() == 0) + { + INTERNAL_DEBUG (("shell_getc: bash_input.location.string = `%s'", bash_input.location.string)); + EOF_Reached = 1; + return (yacc_EOF); + } + if MBTEST(character == '#' && (!interactive || interactive_comments)) { /* A comment. Discard until EOL or EOF, and then return a newline. */ + parser_state |= PST_COMMENT; discard_until ('\n'); shell_getc (0); + parser_state &= ~PST_COMMENT; character = '\n'; /* this will take the next if statement and return. */ } - if (character == '\n') + if MBTEST(character == '\n') { /* If we're about to return an unquoted newline, we can go and collect the text of any pending here document. */ @@ -2986,7 +3532,7 @@ read_token (command) goto tokword; /* Shell meta-characters. */ - if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0)) + if MBTEST(shellmeta (character)) { #if defined (ALIAS) /* Turn off alias tokenization iff this character sequence would @@ -2997,8 +3543,17 @@ read_token (command) parser_state &= ~PST_ASSIGNOK; - peek_char = shell_getc (1); - if (character == peek_char) + /* If we are parsing a command substitution and we have read a character + that marks the end of it, don't bother to skip over quoted newlines + when we read the next token. We're just interested in a character + that will turn this into a two-character token, so we let the higher + layers deal with quoted newlines following the command substitution. */ + if ((parser_state & PST_CMDSUBST) && character == shell_eof_token) + peek_char = shell_getc (0); + else + peek_char = shell_getc (1); + + if MBTEST(character == peek_char) { switch (character) { @@ -3109,7 +3664,7 @@ read_token (command) #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 != '(')) /*)*/ + if MBTEST((character != '>' && character != '<') || peek_char != '(') /*)*/ #endif /* PROCESS_SUBSTITUTION */ return (character); } @@ -3135,25 +3690,32 @@ tokword: * 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 */ +#define P_FIRSTCLOSE 0x0001 +#define P_ALLOWESC 0x0002 +#define P_DQUOTE 0x0004 +#define P_COMMAND 0x0008 /* parsing a command, so look for comments */ +#define P_BACKQUOTE 0x0010 /* parsing a backquoted command substitution */ +#define P_ARRAYSUB 0x0020 /* parsing a [...] array subscript for assignment */ +#define P_DOLBRACE 0x0040 /* parsing a ${...} construct */ +#define P_ARITH 0x0080 /* parsing a $(( )) arithmetic expansion */ /* 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 LEX_WASDOL 0x0001 +#define LEX_CKCOMMENT 0x0002 +#define LEX_INCOMMENT 0x0004 +#define LEX_PASSNEXT 0x0008 +#define LEX_RESWDOK 0x0010 +#define LEX_CKCASE 0x0020 +#define LEX_INCASE 0x0040 +#define LEX_INHEREDOC 0x0080 +#define LEX_HEREDELIM 0x0100 /* reading here-doc delimiter */ +#define LEX_STRIPDOC 0x0200 /* <<- strip tabs from here doc delim */ +#define LEX_QUOTEDDOC 0x0400 /* here doc with quoted delim */ +#define LEX_INWORD 0x0800 +#define LEX_GTLT 0x1000 +#define LEX_CKESAC 0x2000 /* check esac after in -- for later */ +#define LEX_CASEWD 0x4000 /* word after case */ +#define LEX_PATLIST 0x8000 /* case statement pattern list */ #define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) == '|') @@ -3184,10 +3746,13 @@ parse_matched_pair (qc, open, close, lenp, flags) int open, close; int *lenp, flags; { - int count, ch, tflags; + int count, ch, prevch, tflags; int nestlen, ttranslen, start_lineno; char *ret, *nestret, *ttrans; int retind, retsize, rflags; + int dolbrace_state; + + dolbrace_state = (flags & P_DOLBRACE) ? DOLBRACE_PARAM : 0; /*itrace("parse_matched_pair[%d]: open = %c close = %c flags = %d", line_number, open, close, flags);*/ count = 1; @@ -3203,21 +3768,24 @@ parse_matched_pair (qc, open, close, lenp, flags) retind = 0; start_lineno = line_number; + ch = EOF; /* just in case */ while (count) { - ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0); + prevch = ch; + 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 */ + parser_state |= PST_NOERROR; /* avoid redundant error message */ return (&matched_pair_error); } /* Possible reprompting. */ - if (ch == '\n' && SHOULD_PROMPT ()) - prompt_again (); + if MBTEST(ch == '\n' && SHOULD_PROMPT ()) + prompt_again (0); /* Don't bother counting parens or doing anything else if in a comment or part of a case statement */ @@ -3227,7 +3795,7 @@ parse_matched_pair (qc, open, close, lenp, flags) RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); ret[retind++] = ch; - if (ch == '\n') + if MBTEST(ch == '\n') tflags &= ~LEX_INCOMMENT; continue; @@ -3242,7 +3810,8 @@ parse_matched_pair (qc, open, close, lenp, flags) if (tflags & LEX_PASSNEXT) /* last char was backslash */ { tflags &= ~LEX_PASSNEXT; - if (qc != '\'' && ch == '\n') /* double-quoted \ disappears. */ + /* XXX - PST_NOEXPAND? */ + if MBTEST(qc != '\'' && ch == '\n') /* double-quoted \ disappears. */ { if (retind > 0) retind--; /* swallow previously-added backslash */ @@ -3250,7 +3819,7 @@ parse_matched_pair (qc, open, close, lenp, flags) } RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); - if MBTEST(ch == CTLESC || ch == CTLNUL) + if MBTEST(ch == CTLESC) ret[retind++] = CTLESC; ret[retind++] = ch; continue; @@ -3298,14 +3867,43 @@ parse_matched_pair (qc, open, close, lenp, flags) if MBTEST(ch == '\\') /* backslashes */ tflags |= LEX_PASSNEXT; -#if 0 + /* Based on which dolstate is currently in (param, op, or word), + decide what the op is. We're really only concerned if it's % or + #, so we can turn on a flag that says whether or not we should + treat single quotes as special when inside a double-quoted + ${...}. This logic must agree with subst.c:extract_dollar_brace_string + since they share the same defines. */ + /* FLAG POSIX INTERP 221 */ + if (flags & P_DOLBRACE) + { + /* ${param%[%]word} */ + if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '%' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param#[#]word} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '#' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param/[/]pat/rep} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '/' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE2; /* XXX */ + /* ${param^[^]pat} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '^' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param,[,]pat} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == ',' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && strchr ("#%^,~:-=?+/", ch) != 0) + dolbrace_state = DOLBRACE_OP; + else if MBTEST(dolbrace_state == DOLBRACE_OP && strchr ("#%^,~:-=?+/", ch) == 0) + dolbrace_state = DOLBRACE_WORD; + } + /* The big hammer. Single quotes aren't special in double quotes. The - problem is that Posix says the single quotes are semi-special: + problem is that Posix used to say 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 == '\'') /* } */ + /* This was changed in Austin Group Interp 221 */ + if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2 && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'') continue; -#endif /* Could also check open == '`' if we want to parse grouping constructs inside old-style command substitution. */ @@ -3322,13 +3920,35 @@ parse_matched_pair (qc, open, close, lenp, flags) pop_delimiter (dstack); CHECK_NESTRET_ERROR (); - if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0)) + if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0 || dolbrace_state == DOLBRACE_QUOTE || dolbrace_state == DOLBRACE_QUOTE2)) { /* Translate $'...' here. */ + /* PST_NOEXPAND */ ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen); - xfree (nestret); + free (nestret); - if ((rflags & P_DQUOTE) == 0) + /* If we're parsing a double-quoted brace expansion and we are + not in a place where single quotes are treated specially, + make sure we single-quote the results of the ansi + expansion because quote removal should remove them later */ + /* FLAG POSIX INTERP 221 */ + if ((shell_compatibility_level > 42) && (rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_QUOTE2 || dolbrace_state == DOLBRACE_QUOTE) && (flags & P_DOLBRACE)) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } +#if 0 /* TAG:bash-5.3 */ + /* This single-quotes PARAM in ${PARAM OP WORD} when PARAM + contains a $'...' even when extended_quote is set. */ + else if ((rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_PARAM) && (flags & P_DOLBRACE)) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } +#endif + else if ((rflags & P_DQUOTE) == 0) { nestret = sh_single_quote (ttrans); free (ttrans); @@ -3336,28 +3956,56 @@ parse_matched_pair (qc, open, close, lenp, flags) } else { + /* Should we quote CTLESC here? */ nestret = ttrans; nestlen = ttranslen; } retind -= 2; /* back up before the $' */ } +#if defined (TRANSLATABLE_STRINGS) 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); + /* PST_NOEXPAND */ + ttrans = locale_expand (nestret, 0, nestlen - 1, start_lineno, &ttranslen); + free (nestret); - nestret = sh_mkdoublequoted (ttrans, ttranslen, 0); + /* If we're supposed to single-quote translated strings, + check whether the translated result is different from + the original and single-quote the string if it is. */ + if (singlequote_translations && + ((nestlen - 1) != ttranslen || STREQN (nestret, ttrans, ttranslen) == 0)) + { + if ((rflags & P_DQUOTE) == 0) + nestret = sh_single_quote (ttrans); + else if ((rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_QUOTE2) && (flags & P_DOLBRACE)) + nestret = sh_single_quote (ttrans); + else + /* single quotes aren't special, use backslash instead */ + nestret = sh_backslash_quote_for_double_quotes (ttrans, 0); + } + else + nestret = sh_mkdoublequoted (ttrans, ttranslen, 0); free (ttrans); - nestlen = ttranslen + 2; + nestlen = strlen (nestret); retind -= 2; /* back up before the $" */ } +#endif /* TRANSLATABLE_STRINGS */ APPEND_NESTRET (); FREE (nestret); } - else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ + else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ + goto parse_dollar_word; + else if ((flags & P_ARITH) && (tflags & LEX_WASDOL) && ch == '(') /*)*/ + /* $() inside $(( ))/$[ ] */ + goto parse_dollar_word; +#if defined (PROCESS_SUBSTITUTION) + /* XXX - technically this should only be recognized at the start of + a word */ + else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_GTLT) && (ch == '(')) /* ) */ goto parse_dollar_word; +#endif } /* Parse an old-style command substitution within double quotes as a single word. */ @@ -3380,16 +4028,22 @@ parse_dollar_word: if (ch == '(') /* ) */ nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE); else if (ch == '{') /* } */ - nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags); + nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags); else if (ch == '[') /* ] */ - nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags); + nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags|P_ARITH); CHECK_NESTRET_ERROR (); APPEND_NESTRET (); FREE (nestret); } - if MBTEST(ch == '$') +#if defined (PROCESS_SUBSTITUTION) + if MBTEST((ch == '<' || ch == '>') && (tflags & LEX_GTLT) == 0) + tflags |= LEX_GTLT; + else + tflags &= ~LEX_GTLT; +#endif + if MBTEST(ch == '$' && (tflags & LEX_WASDOL) == 0) tflags |= LEX_WASDOL; else tflags &= ~LEX_WASDOL; @@ -3402,444 +4056,263 @@ parse_dollar_word: 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. */ +#if defined (DEBUG) +static void +dump_tflags (flags) + int flags; +{ + int f; + + f = flags; + fprintf (stderr, "%d -> ", f); + if (f & LEX_WASDOL) + { + f &= ~LEX_WASDOL; + fprintf (stderr, "LEX_WASDOL%s", f ? "|" : ""); + } + if (f & LEX_CKCOMMENT) + { + f &= ~LEX_CKCOMMENT; + fprintf (stderr, "LEX_CKCOMMENT%s", f ? "|" : ""); + } + if (f & LEX_INCOMMENT) + { + f &= ~LEX_INCOMMENT; + fprintf (stderr, "LEX_INCOMMENT%s", f ? "|" : ""); + } + if (f & LEX_PASSNEXT) + { + f &= ~LEX_PASSNEXT; + fprintf (stderr, "LEX_PASSNEXT%s", f ? "|" : ""); + } + if (f & LEX_RESWDOK) + { + f &= ~LEX_RESWDOK; + fprintf (stderr, "LEX_RESWDOK%s", f ? "|" : ""); + } + if (f & LEX_CKCASE) + { + f &= ~LEX_CKCASE; + fprintf (stderr, "LEX_CKCASE%s", f ? "|" : ""); + } + if (f & LEX_CKESAC) + { + f &= ~LEX_CKESAC; + fprintf (stderr, "LEX_CKESAC%s", f ? "|" : ""); + } + if (f & LEX_INCASE) + { + f &= ~LEX_INCASE; + fprintf (stderr, "LEX_INCASE%s", f ? "|" : ""); + } + if (f & LEX_CASEWD) + { + f &= ~LEX_CASEWD; + fprintf (stderr, "LEX_CASEWD%s", f ? "|" : ""); + } + if (f & LEX_PATLIST) + { + f &= ~LEX_PATLIST; + fprintf (stderr, "LEX_PATLIST%s", f ? "|" : ""); + } + if (f & LEX_INHEREDOC) + { + f &= ~LEX_INHEREDOC; + fprintf (stderr, "LEX_INHEREDOC%s", f ? "|" : ""); + } + if (f & LEX_HEREDELIM) + { + f &= ~LEX_HEREDELIM; + fprintf (stderr, "LEX_HEREDELIM%s", f ? "|" : ""); + } + if (f & LEX_STRIPDOC) + { + f &= ~LEX_STRIPDOC; + fprintf (stderr, "LEX_WASDOL%s", f ? "|" : ""); + } + if (f & LEX_QUOTEDDOC) + { + f &= ~LEX_QUOTEDDOC; + fprintf (stderr, "LEX_QUOTEDDOC%s", f ? "|" : ""); + } + if (f & LEX_INWORD) + { + f &= ~LEX_INWORD; + fprintf (stderr, "LEX_INWORD%s", f ? "|" : ""); + } + + fprintf (stderr, "\n"); + fflush (stderr); +} +#endif + +/* Parse a $(...) command substitution. This reads input from the current + input stream. */ 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; + int peekc, r; + int start_lineno, local_extglob, was_extpat; + char *ret, *tcmd; + int retlen; + sh_parser_state_t ps; + STRING_SAVER *saved_strings; + COMMAND *saved_global, *parsed_command; - /* RFLAGS is the set of flags we want to pass to recursive calls. */ - rflags = (flags & P_DQUOTE); + /* Posix interp 217 says arithmetic expressions have precedence, so + assume $(( introduces arithmetic expansion and parse accordingly. */ + if (open == '(') /*)*/ + { + peekc = shell_getc (1); + shell_ungetc (peekc); + if (peekc == '(') /*)*/ + return (parse_matched_pair (qc, open, close, lenp, P_ARITH)); + } - ret = (char *)xmalloc (retsize = 64); - retind = 0; +/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/ + /*debug_parser(1);*/ start_lineno = line_number; - lex_rwlen = lex_wlen = 0; - heredelim = 0; - lex_firstind = -1; + save_parser_state (&ps); - while (count) + was_extpat = (parser_state & PST_EXTPAT); + + /* State flags we don't want to persist into command substitutions. */ + parser_state &= ~(PST_REGEXP|PST_EXTPAT|PST_CONDCMD|PST_CONDEXPR|PST_COMPASSIGN); + /* Could do PST_CASESTMT too, but that also affects history. Setting + expecting_in_token below should take care of the parsing requirements. + Unsetting PST_REDIRLIST isn't strictly necessary because of how we set + token_to_read below, but we do it anyway. */ + parser_state &= ~(PST_CASEPAT|PST_ALEXPNEXT|PST_SUBSHELL|PST_REDIRLIST); + /* State flags we want to set for this run through the parser. */ + parser_state |= PST_CMDSUBST|PST_EOFTOKEN|PST_NOEXPAND; + + /* leave pushed_string_list alone, since we might need to consume characters + from it to satisfy this command substitution (in some perverse case). */ + shell_eof_token = close; + + saved_global = global_command; /* might not be necessary */ + global_command = (COMMAND *)NULL; + + /* These are reset by reset_parser() */ + need_here_doc = 0; + esacs_needed_count = expecting_in_token = 0; + + /* We want to expand aliases on this pass if we're in posix mode, since the + standard says you have to take aliases into account when looking for the + terminating right paren. Otherwise, we defer until execution time for + backwards compatibility. */ + if (expand_aliases) + expand_aliases = posixly_correct != 0; +#if defined (EXTENDED_GLOB) + /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a + conditional command and have already set extended_glob appropriately. */ + if (shell_compatibility_level <= 51 && was_extpat == 0) { -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 \ disappears. */ - { - if (retind > 0) - retind--; /* swallow previously-added backslash */ - continue; - } + local_extglob = extended_glob; + extended_glob = 1; + } +#endif - RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); - if MBTEST(ch == CTLESC || ch == CTLNUL) - ret[retind++] = CTLESC; - ret[retind++] = ch; - continue; - } + current_token = '\n'; /* XXX */ + token_to_read = DOLPAREN; /* let's trick the parser */ - /* 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; - } - } + r = yyparse (); - /* Skip whitespace */ - if MBTEST(shellblank (ch) && lex_rwlen == 0) - { - /* Add this character. */ - RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64); - ret[retind++] = ch; - continue; - } + if (need_here_doc > 0) + { + internal_warning ("command substitution: %d unterminated here-document%s", need_here_doc, (need_here_doc == 1) ? "" : "s"); + gather_here_documents (); /* XXX check compatibility level? */ + } - /* 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; - } +#if defined (EXTENDED_GLOB) + if (shell_compatibility_level <= 51 && was_extpat == 0) + extended_glob = local_extglob; #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); - } - } + parsed_command = global_command; - /* 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);*/ -} - } + if (EOF_Reached) + { + shell_eof_token = ps.eof_token; + expand_aliases = ps.expand_aliases; - /* Might be the start of a here-doc delimiter */ - if MBTEST((tflags & LEX_INCOMMENT) == 0 && (tflags & LEX_CKCASE) && ch == '<') + /* yyparse() has already called yyerror() and reset_parser() */ + parser_state |= PST_NOERROR; + return (&matched_pair_error); + } + else if (r != 0) + { + /* parser_error (start_lineno, _("could not parse command substitution")); */ + /* Non-interactive shells exit on parse error in a command substitution. */ + if (last_command_exit_value == 0) + last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (last_command_exit_value); + if (interactive_shell == 0) + jump_to_top_level (FORCE_EOF); /* This is like reader_loop() */ + else { - /* 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; -} + shell_eof_token = ps.eof_token; + expand_aliases = ps.expand_aliases; - if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */ - { - RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); - ret[retind++] = CTLESC; - ret[retind++] = ch; - continue; + jump_to_top_level (DISCARD); /* XXX - return (&matched_pair_error)? */ } -#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 $" */ - } + if (current_token != shell_eof_token) + { +INTERNAL_DEBUG(("current_token (%d) != shell_eof_token (%c)", current_token, shell_eof_token)); + token_to_read = current_token; - 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); + /* If we get here we can check eof_encountered and if it's 1 but the + previous EOF_Reached test didn't succeed, we can assume that the shell + is interactive and ignoreeof is set. We might want to restore the + parser state in this case. */ + shell_eof_token = ps.eof_token; + expand_aliases = ps.expand_aliases; - CHECK_NESTRET_ERROR (); - APPEND_NESTRET (); + return (&matched_pair_error); + } - FREE (nestret); - } - if MBTEST(ch == '$') - tflags |= LEX_WASDOL; - else - tflags &= ~LEX_WASDOL; + /* We don't want to restore the old pushed string list, since we might have + used it to consume additional input from an alias while parsing this + command substitution. */ + saved_strings = pushed_string_list; + restore_parser_state (&ps); + pushed_string_list = saved_strings; + + tcmd = print_comsub (parsed_command); /* returns static memory */ + retlen = strlen (tcmd); + if (tcmd[0] == '(') /* ) need a space to prevent arithmetic expansion */ + retlen++; + ret = xmalloc (retlen + 2); + if (tcmd[0] == '(') /* ) */ + { + ret[0] = ' '; + strcpy (ret + 1, tcmd); } + else + strcpy (ret, tcmd); + ret[retlen++] = ')'; + ret[retlen] = '\0'; + + dispose_command (parsed_command); + global_command = saved_global; - FREE (heredelim); - ret[retind] = '\0'; if (lenp) - *lenp = retind; + *lenp = retlen; + /*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. */ +/* Recursively call the parser to parse a $(...) command substitution. This is + called by the word expansion code and so does not have to reset as much + parser state before calling yyparse(). */ char * xparse_dolparen (base, string, indp, flags) char *base; @@ -3848,51 +4321,119 @@ xparse_dolparen (base, string, indp, flags) int flags; { sh_parser_state_t ps; - int orig_ind, nc, sflags; - char *ret, *s, *ep, *ostring; + sh_input_line_state_t ls; + int orig_ind, nc, sflags, start_lineno, local_extglob; + char *ret, *ep, *ostring; - /*yydebug = 1;*/ +/*debug_parser(1);*/ orig_ind = *indp; ostring = string; + start_lineno = line_number; + + if (*string == 0) + { + if (flags & SX_NOALLOC) + return (char *)NULL; + + ret = xmalloc (1); + ret[0] = '\0'; + return ret; + } + +/*itrace("xparse_dolparen: size = %d shell_input_line = `%s' string=`%s'", shell_input_line_size, shell_input_line, string);*/ sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE; if (flags & SX_NOLONGJMP) sflags |= SEVAL_NOLONGJMP; + save_parser_state (&ps); + save_input_line_state (&ls); +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + pushed_string_list = (STRING_SAVER *)NULL; +#endif /*(*/ parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/ shell_eof_token = ')'; - parse_string (string, "command substitution", sflags, &ep); + if (flags & SX_COMPLETE) + parser_state |= PST_NOERROR; + + /* Don't expand aliases on this pass at all. Either parse_comsub() does it + at parse time, in which case this string already has aliases expanded, + or command_substitute() does it in the child process executing the + command substitution and we want to defer it completely until then. The + old value will be restored by restore_parser_state(). */ + expand_aliases = 0; +#if defined (EXTENDED_GLOB) + local_extglob = extended_glob; +#endif + + token_to_read = DOLPAREN; /* let's trick the parser */ + + nc = parse_string (string, "command substitution", sflags, (COMMAND **)NULL, &ep); + + /* Should we save and restore the bison/yacc lookahead token (yychar) here? + Or only if it's not YYEMPTY? */ + if (current_token == shell_eof_token) + yyclearin; /* might want to clear lookahead token unconditionally */ + reset_parser (); /* resets extended_glob too */ + /* reset_parser() clears shell_input_line and associated variables, including + parser_state, so we want to reset things, then restore what we need. */ + restore_input_line_state (&ls); restore_parser_state (&ps); - reset_parser (); - if (interactive) - token_to_read = 0; - /* Need to find how many characters parse_and_execute consumed, update +#if defined (EXTENDED_GLOB) + extended_glob = local_extglob; +#endif + token_to_read = 0; + + /* If parse_string returns < 0, we need to jump to top level with the + negative of the return value. We abandon the rest of this input line + first */ + if (nc < 0) + { + clear_shell_input_line (); /* XXX */ + if (bash_input.type != st_string) /* paranoia */ + parser_state &= ~(PST_CMDSUBST|PST_EOFTOKEN); + if ((flags & SX_NOLONGJMP) == 0) + jump_to_top_level (-nc); /* XXX */ + } + + /* Need to find how many characters parse_string() 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. */ + and return it. If flags & 1 (SX_NOALLOC) we can return NULL. */ /*(*/ if (ep[-1] != ')') { -#if DEBUG +#if 0 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 0 if (base[*indp] != ')') itrace("xparse_dolparen:%d: base[%d] != RPAREN (%d), base = `%s'", line_number, *indp, base[*indp], base); + if (*indp < orig_ind) + itrace("xparse_dolparen:%d: *indp (%d) < orig_ind (%d), orig_string = `%s'", line_number, *indp, orig_ind, ostring); #endif + if (base[*indp] != ')' && (flags & SX_NOLONGJMP) == 0) + { + /*(*/ + if ((flags & SX_NOERROR) == 0) + parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), ')'); + jump_to_top_level (DISCARD); + } + if (flags & SX_NOALLOC) return (char *)NULL; @@ -3907,6 +4448,75 @@ xparse_dolparen (base, string, indp, flags) return ret; } +/* Recursively call the parser to parse the string from a $(...) command + substitution to a COMMAND *. This is called from command_substitute() and + has the same parser state constraints as xparse_dolparen(). */ +COMMAND * +parse_string_to_command (string, flags) + char *string; + int flags; +{ + sh_parser_state_t ps; + sh_input_line_state_t ls; + int nc, sflags; + size_t slen; + char *ret, *ep; + COMMAND *cmd; + + if (*string == 0) + return (COMMAND *)NULL; + + ep = string; + slen = STRLEN (string); + +/*itrace("parse_string_to_command: size = %d shell_input_line = `%s' string=`%s'", shell_input_line_size, shell_input_line, string);*/ + + sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE; + if (flags & SX_NOLONGJMP) + sflags |= SEVAL_NOLONGJMP; + + save_parser_state (&ps); + save_input_line_state (&ls); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + pushed_string_list = (STRING_SAVER *)NULL; +#endif + if (flags & SX_COMPLETE) + parser_state |= PST_NOERROR; + + parser_state |= PST_STRING; + expand_aliases = 0; + + cmd = 0; + nc = parse_string (string, "command substitution", sflags, &cmd, &ep); + + reset_parser (); + /* reset_parser() clears shell_input_line and associated variables, including + parser_state, so we want to reset things, then restore what we need. */ + restore_input_line_state (&ls); + restore_parser_state (&ps); + + /* If parse_string returns < 0, we need to jump to top level with the + negative of the return value. We abandon the rest of this input line + first */ + if (nc < 0) + { + clear_shell_input_line (); /* XXX */ + if ((flags & SX_NOLONGJMP) == 0) + jump_to_top_level (-nc); /* XXX */ + } + + /* Need to check how many characters parse_string() consumed, make sure it's + the entire string. */ + if (nc < slen) + { + dispose_command (cmd); + return (COMMAND *)NULL; + } + + return cmd; +} + #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 @@ -3923,7 +4533,9 @@ parse_dparen (c) #if defined (ARITH_FOR_COMMAND) if (last_read_token == FOR) { - arith_for_lineno = line_number; + if (word_top < MAX_CASE_NEST) + word_top++; + arith_for_lineno = word_lineno[word_top] = line_number; cmdtyp = parse_arith_cmd (&wval, 0); if (cmdtyp == 1) { @@ -3947,13 +4559,14 @@ parse_dparen (c) { wd = alloc_word_desc (); wd->word = wval; - wd->flags = W_QUOTED|W_NOSPLIT|W_NOGLOB|W_DQUOTE; + wd->flags = W_QUOTED|W_NOSPLIT|W_NOGLOB|W_NOTILDE|W_NOPROCSUB; 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); + pushed_string_list->flags = PSH_DPAREN; if ((parser_state & PST_CASEPAT) == 0) parser_state |= PST_SUBSHELL; return (c); @@ -3981,7 +4594,7 @@ parse_arith_cmd (ep, adddq) int ttoklen; exp_lineno = line_number; - ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0); + ttok = parse_matched_pair (0, '(', ')', &ttoklen, P_ARITH); rval = 1; if (ttok == &matched_pair_error) return -1; @@ -4081,7 +4694,7 @@ cond_skip_newlines () while ((cond_token = read_token (READ)) == '\n') { if (SHOULD_PROMPT ()) - prompt_again (); + prompt_again (0); } return (cond_token); } @@ -4094,7 +4707,7 @@ cond_term () { WORD_DESC *op; COND_COM *term, *tleft, *tright; - int tok, lineno; + int tok, lineno, local_extglob; char *etext; /* Read a token. It can be a left paren, a `!', a unary operator, or a @@ -4131,9 +4744,9 @@ cond_term () dispose_word (yylval.word); /* not needed */ term = cond_term (); if (term) - term->flags |= CMD_INVERT_RETURN; + term->flags ^= CMD_INVERT_RETURN; } - else if (tok == WORD && yylval.word->word[0] == '-' && yylval.word->word[2] == 0 && test_unop (yylval.word->word)) + else if (tok == WORD && yylval.word->word[0] == '-' && yylval.word->word[1] && yylval.word->word[2] == 0 && test_unop (yylval.word->word)) { op = yylval.word; tok = read_token (READ); @@ -4163,6 +4776,7 @@ cond_term () tleft = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL); /* binop */ + /* tok = cond_skip_newlines (); ? */ tok = read_token (READ); if (tok == WORD && test_binop (yylval.word->word)) { @@ -4207,11 +4821,16 @@ cond_term () } /* rhs */ +#if defined (EXTENDED_GLOB) + local_extglob = extended_glob; if (parser_state & PST_EXTPAT) extended_glob = 1; +#endif tok = read_token (READ); +#if defined (EXTENDED_GLOB) if (parser_state & PST_EXTPAT) - extended_glob = global_extglob; + extended_glob = local_extglob; +#endif parser_state &= ~(PST_REGEXP|PST_EXTPAT); if (tok == WORD) @@ -4258,7 +4877,6 @@ parse_cond_command () { COND_COM *cexp; - global_extglob = extended_glob; cexp = cond_expr (); return (make_cond_command (cexp)); } @@ -4266,20 +4884,30 @@ parse_cond_command () #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. */ + in t beyond i. We use a buffer with room for the characters we add just + in case assignment() ends up doing something like parsing a command + substitution that will reallocate atoken. We don't want to write beyond + the end of an allocated buffer. */ static int token_is_assignment (t, i) char *t; int i; { - unsigned char c, c1; int r; + char *atoken; - 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; + atoken = xmalloc (i + 3); + memcpy (atoken, t, i); + atoken[i] = '='; + atoken[i+1] = '\0'; + + r = assignment (atoken, (parser_state & PST_COMPASSIGN) != 0); + + free (atoken); + + /* XXX - check that r == i to avoid returning false positive for + t containing `=' before t[i]. */ + return (r > 0 && r == i); } /* XXX - possible changes here for `+=' */ @@ -4324,7 +4952,7 @@ read_token_word (character) /* Non-zero means to ignore the value of the next character, and just to add it no matter what. */ - int pass_next_character; + int pass_next_character; /* The current delimiting character. */ int cd; @@ -4357,11 +4985,18 @@ read_token_word (character) double-quotes, quote some things inside of double-quotes. */ if MBTEST(character == '\\') { + if (parser_state & PST_NOEXPAND) + { + pass_next_character++; + quoted = 1; + goto got_character; + } + peek_char = shell_getc (0); /* Backslash-newline is ignored in all cases except when quoted with single quotes. */ - if (peek_char == '\n') + if MBTEST(peek_char == '\n') { character = '\n'; goto next_character; @@ -4371,7 +5006,7 @@ read_token_word (character) shell_ungetc (peek_char); /* If the next character is to be quoted, note it now. */ - if (cd == 0 || cd == '`' || + if MBTEST(cd == 0 || cd == '`' || (cd == '"' && peek_char >= 0 && (sh_syntaxtab[peek_char] & CBSDQUOTE))) pass_next_character++; @@ -4394,7 +5029,8 @@ read_token_word (character) strcpy (token + token_index, ttok); token_index += ttoklen; all_digit_token = 0; - quoted = 1; + if (character != '`') + quoted = 1; dollar_present |= (character == '"' && strchr (ttok, '$') != 0); FREE (ttok); goto next_character; @@ -4437,7 +5073,7 @@ read_token_word (character) pop_delimiter (dstack); if (ttok == &matched_pair_error) return -1; /* Bail immediately. */ - RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2, + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 3, token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); token[token_index++] = character; @@ -4455,15 +5091,15 @@ read_token_word (character) /* 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)) + if MBTEST(shellexp (character)) { peek_char = shell_getc (1); /* $(...), <(...), >(...), $((...)), ${...}, and $[...] constructs */ - if MBTEST(peek_char == '(' || \ + if MBTEST(peek_char == '(' || ((peek_char == '{' || peek_char == '[') && character == '$')) /* ) ] } */ { if (peek_char == '{') /* } */ - ttok = parse_matched_pair (cd, '{', '}', &ttoklen, P_FIRSTCLOSE); + ttok = parse_matched_pair (cd, '{', '}', &ttoklen, P_FIRSTCLOSE|P_DOLBRACE); else if (peek_char == '(') /* ) */ { /* XXX - push and pop the `(' as a delimiter for use by @@ -4476,10 +5112,10 @@ read_token_word (character) pop_delimiter (dstack); } else - ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0); + ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARITH); if (ttok == &matched_pair_error) return -1; /* Bail immediately. */ - RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2, + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 3, token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); token[token_index++] = character; @@ -4492,7 +5128,11 @@ read_token_word (character) goto next_character; } /* This handles $'...' and $"..." new-style quoted strings. */ +#if defined (TRANSLATABLE_STRINGS) else if MBTEST(character == '$' && (peek_char == '\'' || peek_char == '"')) +#else + else if MBTEST(character == '$' && peek_char == '\'') +#endif { int first_line; @@ -4506,6 +5146,7 @@ read_token_word (character) return -1; if (peek_char == '\'') { + /* PST_NOEXPAND */ ttrans = ansiexpand (ttok, 0, ttoklen - 1, &ttranslen); free (ttok); @@ -4517,20 +5158,29 @@ read_token_word (character) ttranslen = strlen (ttok); ttrans = ttok; } +#if defined (TRANSLATABLE_STRINGS) else { + /* PST_NOEXPAND */ /* Try to locale-expand the converted string. */ - ttrans = localeexpand (ttok, 0, ttoklen - 1, first_line, &ttranslen); + ttrans = locale_expand (ttok, 0, ttoklen - 1, first_line, &ttranslen); free (ttok); - /* Add the double quotes back */ - ttok = sh_mkdoublequoted (ttrans, ttranslen, 0); + /* Add the double quotes back (or single quotes if the user + has set that option). */ + if (singlequote_translations && + ((ttoklen - 1) != ttranslen || STREQN (ttok, ttrans, ttranslen) == 0)) + ttok = sh_single_quote (ttrans); + else + ttok = sh_mkdoublequoted (ttrans, ttranslen, 0); + free (ttrans); - ttranslen += 2; ttrans = ttok; + ttranslen = strlen (ttrans); } +#endif /* TRANSLATABLE_STRINGS */ - RESIZE_MALLOCED_BUFFER (token, token_index, ttranslen + 2, + RESIZE_MALLOCED_BUFFER (token, token_index, ttranslen + 1, token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); strcpy (token + token_index, ttrans); @@ -4544,17 +5194,13 @@ read_token_word (character) 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; + token[token_index++] = '$'; + token[token_index++] = peek_char; dollar_present = 1; all_digit_token = 0; - FREE (ttok); goto next_character; } else @@ -4624,24 +5270,26 @@ read_token_word (character) goto got_token; } - got_character: - - if (character == CTLESC || character == CTLNUL) - token[token_index++] = CTLESC; +got_character: + if MBTEST(character == CTLESC || character == CTLNUL) + { + RESIZE_MALLOCED_BUFFER (token, token_index, 2, token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = CTLESC; + } + else +got_escaped_character: + RESIZE_MALLOCED_BUFFER (token, token_index, 1, token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); - got_escaped_character: + token[token_index++] = 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 (); + prompt_again (0); /* We want to remove quoted newlines (that is, a \ pair) unless we are within single quotes or pass_next_character is @@ -4652,21 +5300,22 @@ read_token_word (character) got_token: + /* Calls to RESIZE_MALLOCED_BUFFER ensure there is sufficient room. */ 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 || \ + 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); + { + yylval.number = lvalue; + return (NUMBER); + } } /* Check for special case tokens. */ @@ -4698,7 +5347,7 @@ got_token: #endif CHECK_FOR_RESERVED_WORD (token); - the_word = (WORD_DESC *)xmalloc (sizeof (WORD_DESC)); + the_word = alloc_word_desc (); the_word->word = (char *)xmalloc (1 + token_index); the_word->flags = 0; strcpy (the_word->word, token); @@ -4716,7 +5365,11 @@ got_token: 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; + { + the_word->flags |= W_NOSPLIT; + if (parser_state & PST_COMPASSIGN) + the_word->flags |= W_NOGLOB; /* XXX - W_NOBRACE? */ + } } if (command_token_position (last_read_token)) @@ -4731,17 +5384,28 @@ got_token: yylval.word = the_word; - if (token[0] == '{' && token[token_index-1] == '}' && + /* should we check that quoted == 0 as well? */ + if MBTEST(token[0] == '{' && token[token_index-1] == '}' && (character == '<' || character == '>')) { /* can use token; already copied to the_word */ token[token_index-1] = '\0'; +#if defined (ARRAY_VARS) + if (legal_identifier (token+1) || valid_array_reference (token+1, 0)) +#else if (legal_identifier (token+1)) +#endif { strcpy (the_word->word, token+1); -/*itrace("read_token_word: returning REDIR_WORD for %s", the_word->word);*/ +/* itrace("read_token_word: returning REDIR_WORD for %s", the_word->word); */ + yylval.word = the_word; /* accommodate recursive call */ return (REDIR_WORD); } + else + /* valid_array_reference can call the parser recursively; need to + make sure that yylval.word doesn't change if we are going to + return WORD or ASSIGNMENT_WORD */ + yylval.word = the_word; } result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT)) @@ -4759,6 +5423,7 @@ got_token: if (word_top + 1 < MAX_CASE_NEST) word_top++; word_lineno[word_top] = line_number; + expecting_in_token++; break; } @@ -4782,8 +5447,10 @@ reserved_word_acceptable (toksym) case '{': case '}': /* XXX */ case AND_AND: + case ARITH_CMD: case BANG: case BAR_AND: + case COND_END: case DO: case DONE: case ELIF: @@ -4798,16 +5465,20 @@ reserved_word_acceptable (toksym) case THEN: case TIME: case TIMEOPT: + case TIMEIGN: case COPROC: case UNTIL: case WHILE: case 0: + case DOLPAREN: return 1; default: #if defined (COPROCESS_SUPPORT) if (last_read_token == WORD && token_before_that == COPROC) return 1; #endif + if (last_read_token == WORD && token_before_that == FUNCTION) + return 1; return 0; } } @@ -4825,6 +5496,14 @@ find_reserved_word (tokstr) return -1; } +/* An interface to let the rest of the shell (primarily the completion + system) know what the parser is expecting. */ +int +parser_in_command_position () +{ + return (command_token_position (last_read_token)); +} + #if 0 #if defined (READLINE) /* Called after each time readline is called. This insures that whatever @@ -4868,20 +5547,38 @@ static const int no_semi_successors[] = { /* 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. */ + history entry. LINE is the line we're about to add; it helps + make some more intelligent decisions in certain cases. */ char * -history_delimiting_chars () +history_delimiting_chars (line) + const char *line; { + static int last_was_heredoc = 0; /* was the last entry the start of a here document? */ register int i; + if ((parser_state & PST_HEREDOC) == 0) + last_was_heredoc = 0; + 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). */ + of the command). We also keep LAST_WAS_HEREDOC as a private sentinel + variable to note when we think we added the first line of a here doc + (the one with a "<<" somewhere in it) */ if (parser_state & PST_HEREDOC) - return (current_command_line_count == 2 ? "\n" : ""); + { + if (last_was_heredoc) + { + last_was_heredoc = 0; + return "\n"; + } + return (here_doc_first_line ? "\n" : ""); + } + + if (parser_state & PST_COMPASSIGN) + return (" "); /* First, handle some special cases. */ /*(*/ @@ -4898,12 +5595,22 @@ history_delimiting_chars () command lists. It's a suboptimal solution. */ else if (parser_state & PST_CASESTMT) /* case statement pattern */ return " "; - else + else return "; "; /* (...) subshell */ } else if (token_before_that == WORD && two_tokens_ago == FUNCTION) return " "; /* function def using `function name' without `()' */ + /* If we're not in a here document, but we think we're about to parse one, + and we would otherwise return a `;', return a newline to delimit the + line with the here-doc delimiter */ + else if ((parser_state & PST_HEREDOC) == 0 && current_command_line_count > 1 && last_read_token == '\n' && strstr (line, "<<")) + { + last_was_heredoc = 1; + return "\n"; + } + else if ((parser_state & PST_HEREDOC) == 0 && current_command_line_count > 1 && need_here_doc > 0) + return "\n"; else if (token_before_that == WORD && two_tokens_ago == FOR) { /* Tricky. `for i\nin ...' should not have a semicolon, but @@ -4923,6 +5630,12 @@ history_delimiting_chars () return (" "); } + /* Assume that by this point we are reading lines in a multi-line command. + If we have multiple consecutive blank lines we want to return only one + semicolon. */ + if (line_isblank (line)) + return (current_command_line_count > 1 && last_read_token == '\n' && token_before_that != '\n') ? "; " : ""; + return ("; "); } #endif /* HISTORY */ @@ -4930,7 +5643,8 @@ history_delimiting_chars () /* Issue a prompt, or prepare to issue a prompt when the next character is read. */ static void -prompt_again () +prompt_again (force) + int force; { char *temp_prompt; @@ -4940,6 +5654,8 @@ prompt_again () ps1_prompt = get_string_value ("PS1"); ps2_prompt = get_string_value ("PS2"); + ps0_prompt = get_string_value ("PS0"); + if (!prompt_string_pointer) prompt_string_pointer = &ps1_prompt; @@ -4991,6 +5707,31 @@ print_prompt () fflush (stderr); } +#if defined (HISTORY) + /* The history library increments the history offset as soon as it stores + the first line of a potentially multi-line command, so we compensate + here by returning one fewer when appropriate. */ +static int +prompt_history_number (pmt) + char *pmt; +{ + int ret; + + ret = history_number (); + if (ret == 1) + return ret; + + if (pmt == ps1_prompt) /* are we expanding $PS1? */ + return ret; + else if (pmt == ps2_prompt && command_oriented_history == 0) + return ret; /* not command oriented history */ + else if (pmt == ps2_prompt && command_oriented_history && current_command_first_line_saved) + return ret - 1; + else + return ret - 1; /* PS0, PS4, ${var@P}, PS2 other cases */ +} +#endif + /* Return a string which will be printed as a prompt. The string may contain special characters which are decoded as follows: @@ -5028,13 +5769,14 @@ decode_prompt_string (string) char *string; { WORD_LIST *list; - char *result, *t; + char *result, *t, *orig_string; struct dstack save_dstack; int last_exit_value, last_comsub_pid; #if defined (PROMPT_STRING_DECODE) - int result_size, result_index; + size_t result_size; + size_t result_index; int c, n, i; - char *temp, octal_string[4]; + char *temp, *t_host, octal_string[4]; struct tm *tm; time_t the_time; char timebuf[128]; @@ -5043,6 +5785,7 @@ decode_prompt_string (string) result = (char *)xmalloc (result_size = PROMPT_GROWTH); result[result_index = 0] = 0; temp = (char *)NULL; + orig_string = string; while (c = *string++) { @@ -5058,7 +5801,7 @@ decode_prompt_string (string) #if !defined (HISTORY) temp = savestring ("1"); #else /* HISTORY */ - temp = itos (history_number ()); + temp = itos (prompt_history_number (orig_string)); #endif /* HISTORY */ string--; /* add_string increments string again. */ goto add_string; @@ -5114,6 +5857,9 @@ decode_prompt_string (string) case 'A': /* Make the current time/date into a string. */ (void) time (&the_time); +#if defined (HAVE_TZSET) + sv_tz ("TZ"); /* XXX -- just make sure */ +#endif tm = localtime (&the_time); if (c == 'd') @@ -5165,7 +5911,7 @@ decode_prompt_string (string) /* 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); + temp = sh_backslash_quote_for_double_quotes (timebuf, 0); else temp = savestring (timebuf); goto add_string; @@ -5179,7 +5925,16 @@ decode_prompt_string (string) case 's': temp = base_pathname (shell_name); - temp = savestring (temp); + /* Try to quote anything the user can set in the file system */ + if (promptvars || posixly_correct) + { + char *t; + t = sh_strvis (temp); + temp = sh_backslash_quote_for_double_quotes (t, 0); + free (t); + } + else + temp = sh_strvis (temp); goto add_string; case 'v': @@ -5233,15 +5988,19 @@ decode_prompt_string (string) { t = strrchr (t_string, '/'); if (t) - strcpy (t_string, t + 1); + memmove (t_string, t + 1, strlen (t)); /* strlen(t) to copy NULL */ } } #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)); + { + /* polite_directory_format is guaranteed to return a string + no longer than PATH_MAX - 1 characters. */ + temp = polite_directory_format (t_string); + if (temp != t_string) + strcpy (t_string, temp); + } temp = trim_pathname (t_string, PATH_MAX - 1); /* If we're going to be expanding the prompt string later, @@ -5250,9 +6009,14 @@ decode_prompt_string (string) /* 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); + { + char *t; + t = sh_strvis (t_string); + temp = sh_backslash_quote_for_double_quotes (t, 0); + free (t); + } else - temp = savestring (t_string); + temp = sh_strvis (t_string); goto add_string; } @@ -5265,20 +6029,33 @@ decode_prompt_string (string) case 'h': case 'H': - temp = savestring (current_host_name); - if (c == 'h' && (t = (char *)strchr (temp, '.'))) + t_host = savestring (current_host_name); + if (c == 'h' && (t = (char *)strchr (t_host, '.'))) *t = '\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 (t_host, 0); + else + temp = savestring (t_host); + free (t_host); goto add_string; case '#': - temp = itos (current_command_number); + n = current_command_number; + /* If we have already incremented current_command_number (PS4, + ${var@P}), compensate */ + if (orig_string != ps0_prompt && orig_string != ps1_prompt && orig_string != ps2_prompt) + n--; + temp = itos (n); goto add_string; case '!': #if !defined (HISTORY) temp = savestring ("1"); #else /* HISTORY */ - temp = itos (history_number ()); + temp = itos (prompt_history_number (orig_string)); #endif /* HISTORY */ goto add_string; @@ -5358,6 +6135,10 @@ not_escape: else { RESIZE_MALLOCED_BUFFER (result, result_index, 3, result_size, PROMPT_GROWTH); + /* dequote_string should take care of removing this if we are not + performing the rest of the word expansions. */ + if (c == CTLESC || c == CTLNUL) + result[result_index++] = CTLESC; result[result_index++] = c; result[result_index] = '\0'; } @@ -5410,7 +6191,8 @@ int yyerror (msg) const char *msg; { - report_syntax_error ((char *)NULL); + if ((parser_state & PST_NOERROR) == 0) + report_syntax_error ((char *)NULL); reset_parser (); return (0); } @@ -5520,14 +6302,15 @@ static void report_syntax_error (message) char *message; { - char *msg; + char *msg, *p; 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; + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); return; } @@ -5536,13 +6319,20 @@ report_syntax_error (message) parser's complaining about by looking at current_token. */ if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token))) { + if (ansic_shouldquote (msg)) + { + p = ansic_quote (msg, 0, NULL); + free (msg); + msg = p; + } 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; + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); return; } @@ -5564,8 +6354,14 @@ report_syntax_error (message) } else { - msg = EOF_Reached ? _("syntax error: unexpected end of file") : _("syntax error"); - parser_error (line_number, "%s", msg); + if (EOF_Reached && shell_eof_token && current_token != shell_eof_token) + parser_error (line_number, _("unexpected EOF while looking for matching `%c'"), shell_eof_token); + 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. */ @@ -5573,7 +6369,8 @@ report_syntax_error (message) EOF_Reached = 0; } - last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE; + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); } /* ??? Needed function. ??? We have to be able to discard the constructs @@ -5626,26 +6423,29 @@ handle_eof_input_unit () { if (eof_encountered < eof_encountered_limit) { - char *vyatta_configure_mode = getenv ( "_OFR_CONFIGURE" ); - if (*vyatta_configure_mode != NULL) { - fprintf (stderr, _("Use \"%s\" to leave configuration mode.\n"), - login_shell ? "logout" : "exit"); - } else { - fprintf (stderr, _("Use \"%s\" to leave the shell.\n"), + char *vyatta_configure_mode = getenv ( "_OFR_CONFIGURE" ); + if (*vyatta_configure_mode != NULL) { + fprintf (stderr, _("Use \"%s\" to leave configuration mode.\n"), + login_shell ? "logout" : "exit"); + } else { + 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 (); + prompt_again (0); return; } } /* In this case EOF should exit the shell. Do it now. */ reset_parser (); + + last_shell_builtin = this_shell_builtin; + this_shell_builtin = exit_builtin; exit_builtin ((WORD_LIST *)NULL); } else @@ -5675,29 +6475,26 @@ parse_string_to_word_list (s, flags, whom) 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 + int tok, orig_current_token, orig_line_number; + int orig_parser_state; + sh_parser_state_t ps; + int ea; + + orig_line_number = line_number; + save_parser_state (&ps); #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 */ + if (ea = expanding_alias ()) + parser_save_alias (); + + /* WORD to avoid parsing reserved words as themselves and just parse them as + WORDs. */ + last_read_token = WORD; + current_command_line_count = 0; echo_input_at_read = expand_aliases = 0; @@ -5705,7 +6502,13 @@ parse_string_to_word_list (s, flags, whom) wl = (WORD_LIST *)NULL; if (flags & 1) - parser_state |= PST_COMPASSIGN|PST_REPARSE; + { + orig_parser_state = parser_state; /* XXX - not needed? */ + /* State flags we don't want to persist into compound assignments. */ + parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */ + /* State flags we want to set for this run through the tokenizer. */ + parser_state |= PST_COMPASSIGN|PST_REPARSE|PST_STRING; + } while ((tok = read_token (READ)) != yacc_EOF) { @@ -5731,29 +6534,26 @@ parse_string_to_word_list (s, flags, whom) 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; + if (ea) + parser_restore_alias (); - current_command_line_count = orig_line_count; - shell_input_line_terminator = orig_input_terminator; + restore_parser_state (&ps); if (flags & 1) - parser_state &= ~(PST_COMPASSIGN|PST_REPARSE); + parser_state = orig_parser_state; /* XXX - not needed? */ if (wl == &parse_string_error) { - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); + current_token = '\n'; /* XXX */ if (interactive_shell == 0 && posixly_correct) jump_to_top_level (FORCE_EOF); else - jump_to_top_level (DISCARD); + { + if (executing && parse_and_execute_level == 0) + top_level_cleanup (); + jump_to_top_level (DISCARD); + } } return (REVERSE_LIST (wl, WORD_LIST *)); @@ -5764,30 +6564,44 @@ 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; + int tok, orig_line_number, assignok, ea, restore_pushed_strings; + sh_parser_state_t ps; + char *ret; + STRING_SAVER *ss; - saved_token = token; - orig_token_size = token_buffer_size; orig_line_number = line_number; - orig_last_token = last_read_token; + save_parser_state (&ps); - last_read_token = WORD; /* WORD to allow reserved words here */ + /* WORD to avoid parsing reserved words as themselves and just parse them as + WORDs. Plus it means we won't be in a command position and so alias + expansion won't happen. */ + last_read_token = WORD; token = (char *)NULL; token_buffer_size = 0; + wl = (WORD_LIST *)NULL; /* ( */ assignok = parser_state&PST_ASSIGNOK; /* XXX */ - wl = (WORD_LIST *)NULL; /* ( */ + /* State flags we don't want to persist into compound assignments. */ + parser_state &= ~(PST_NOEXPAND|PST_CONDCMD|PST_CONDEXPR|PST_REGEXP|PST_EXTPAT); + /* State flags we want to set for this run through the tokenizer. */ parser_state |= PST_COMPASSIGN; + esacs_needed_count = expecting_in_token = 0; + + /* We're not pushing any new input here, we're reading from the current input + source. If that's an alias, we have to be prepared for the alias to get + popped out from underneath us. */ + ss = (ea = expanding_alias ()) ? pushed_string_list : (STRING_SAVER *)NULL; + restore_pushed_strings = 0; + while ((tok = read_token (READ)) != ')') { if (tok == '\n') /* Allow newlines in compound assignments */ { if (SHOULD_PROMPT ()) - prompt_again (); + prompt_again (0); continue; } if (tok != WORD && tok != ASSIGNMENT_WORD) @@ -5805,24 +6619,31 @@ parse_compound_assignment (retlenp) wl = make_word_list (yylval.word, wl); } - FREE (token); - token = saved_token; - token_buffer_size = orig_token_size; - - parser_state &= ~PST_COMPASSIGN; + /* Check whether or not an alias got popped out from underneath us and + fix up after restore_parser_state. */ + if (ea && ss && ss != pushed_string_list) + { + restore_pushed_strings = 1; + ss = pushed_string_list; + } + restore_parser_state (&ps); + if (restore_pushed_strings) + pushed_string_list = ss; if (wl == &parse_string_error) { - last_command_exit_value = EXECUTION_FAILURE; - last_read_token = '\n'; /* XXX */ + set_exit_status (EXECUTION_FAILURE); + last_read_token = current_token = '\n'; /* XXX */ if (interactive_shell == 0 && posixly_correct) jump_to_top_level (FORCE_EOF); else - jump_to_top_level (DISCARD); + { + if (executing && parse_and_execute_level == 0) + top_level_cleanup (); + jump_to_top_level (DISCARD); + } } - last_read_token = orig_last_token; /* XXX - was WORD? */ - if (wl) { rl = REVERSE_LIST (wl, WORD_LIST *); @@ -5851,10 +6672,6 @@ 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) @@ -5865,6 +6682,9 @@ save_parser_state (ps) ps->input_line_terminator = shell_input_line_terminator; ps->eof_encountered = eof_encountered; + ps->eol_lookahead = eol_ungetc_lookahead; + + ps->prompt_string_pointer = prompt_string_pointer; ps->current_command_line_count = current_command_line_count; @@ -5877,11 +6697,7 @@ save_parser_state (ps) 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; + ps->pipestatus = save_pipestatus_array (); #endif ps->last_shell_builtin = last_shell_builtin; @@ -5889,6 +6705,27 @@ save_parser_state (ps) ps->expand_aliases = expand_aliases; ps->echo_input_at_read = echo_input_at_read; + ps->need_here_doc = need_here_doc; + ps->here_doc_first_line = here_doc_first_line; + + ps->esacs_needed = esacs_needed_count; + ps->expecting_in = expecting_in_token; + + if (need_here_doc == 0) + ps->redir_stack[0] = 0; + else + memcpy (ps->redir_stack, redir_stack, sizeof (redir_stack[0]) * HEREDOC_MAX); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + ps->pushed_strings = pushed_string_list; +#endif + + ps->eof_token = shell_eof_token; + ps->token = token; + ps->token_buffer_size = token_buffer_size; + /* Force reallocation on next call to read_token_word */ + token = 0; + token_buffer_size = 0; return (ps); } @@ -5897,9 +6734,7 @@ void restore_parser_state (ps) sh_parser_state_t *ps; { -#if defined (ARRAY_VARS) - SHELL_VAR *v; -#endif + int i; if (ps == 0) return; @@ -5913,6 +6748,9 @@ restore_parser_state (ps) shell_input_line_terminator = ps->input_line_terminator; eof_encountered = ps->eof_encountered; + eol_ungetc_lookahead = ps->eol_lookahead; + + prompt_string_pointer = ps->prompt_string_pointer; current_command_line_count = ps->current_command_line_count; @@ -5925,12 +6763,7 @@ restore_parser_state (ps) 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); - } + restore_pipestatus_array (ps->pipestatus); #endif last_shell_builtin = ps->last_shell_builtin; @@ -5938,6 +6771,82 @@ restore_parser_state (ps) expand_aliases = ps->expand_aliases; echo_input_at_read = ps->echo_input_at_read; + need_here_doc = ps->need_here_doc; + here_doc_first_line = ps->here_doc_first_line; + + esacs_needed_count = ps->esacs_needed; + expecting_in_token = ps->expecting_in; + +#if 0 + for (i = 0; i < HEREDOC_MAX; i++) + redir_stack[i] = ps->redir_stack[i]; +#else + if (need_here_doc == 0) + redir_stack[0] = 0; + else + memcpy (redir_stack, ps->redir_stack, sizeof (redir_stack[0]) * HEREDOC_MAX); +#endif + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + pushed_string_list = (STRING_SAVER *)ps->pushed_strings; +#endif + + FREE (token); + token = ps->token; + token_buffer_size = ps->token_buffer_size; + shell_eof_token = ps->eof_token; +} + +sh_input_line_state_t * +save_input_line_state (ls) + sh_input_line_state_t *ls; +{ + if (ls == 0) + ls = (sh_input_line_state_t *)xmalloc (sizeof (sh_input_line_state_t)); + if (ls == 0) + return ((sh_input_line_state_t *)NULL); + + ls->input_line = shell_input_line; + ls->input_line_size = shell_input_line_size; + ls->input_line_len = shell_input_line_len; + ls->input_line_index = shell_input_line_index; + +#if defined (HANDLE_MULTIBYTE) + ls->input_property = shell_input_line_property; + ls->input_propsize = shell_input_line_propsize; +#endif + + /* force reallocation */ + shell_input_line = 0; + shell_input_line_size = shell_input_line_len = shell_input_line_index = 0; + +#if defined (HANDLE_MULTIBYTE) + shell_input_line_property = 0; + shell_input_line_propsize = 0; +#endif + + return ls; +} + +void +restore_input_line_state (ls) + sh_input_line_state_t *ls; +{ + FREE (shell_input_line); + shell_input_line = ls->input_line; + shell_input_line_size = ls->input_line_size; + shell_input_line_len = ls->input_line_len; + shell_input_line_index = ls->input_line_index; + +#if defined (HANDLE_MULTIBYTE) + FREE (shell_input_line_property); + shell_input_line_property = ls->input_property; + shell_input_line_propsize = ls->input_propsize; +#endif + +#if 0 + set_line_mbstate (); +#endif } /************************************************ @@ -5947,34 +6856,75 @@ restore_parser_state (ps) ************************************************/ #if defined (HANDLE_MULTIBYTE) + +/* We don't let the property buffer get larger than this unless the line is */ +#define MAX_PROPSIZE 32768 + static void set_line_mbstate () { - int i, previ, len, c; + int c; + size_t i, previ, len; mbstate_t mbs, prevs; size_t mbclen; + int ilen; 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); + len = STRLEN (shell_input_line); /* XXX - shell_input_line_len ? */ + if (len == 0) + return; + if (shell_input_line_propsize >= MAX_PROPSIZE && len < MAX_PROPSIZE>>1) + { + free (shell_input_line_property); + shell_input_line_property = 0; + shell_input_line_propsize = 0; + } + if (len+1 > shell_input_line_propsize) + { + shell_input_line_propsize = len + 1; + shell_input_line_property = (char *)xrealloc (shell_input_line_property, shell_input_line_propsize); + } + + if (locale_mb_cur_max == 1) + { + memset (shell_input_line_property, 1, len); + return; + } + + /* XXX - use whether or not we are in a UTF-8 locale to avoid calls to + mbrlen */ + if (locale_utf8locale == 0) + memset (&prevs, '\0', sizeof (mbstate_t)); - memset (&prevs, '\0', sizeof (mbstate_t)); for (i = previ = 0; i < len; i++) { - mbs = prevs; + if (locale_utf8locale == 0) + mbs = prevs; c = shell_input_line[i]; if (c == EOF) { - int j; + size_t 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 (locale_utf8locale) + { + if ((unsigned char)shell_input_line[previ] < 128) /* i != previ */ + mbclen = 1; + else + { + ilen = utf8_mblen (shell_input_line + previ, i - previ + 1); + mbclen = (ilen == -1) ? (size_t)-1 + : ((ilen == -2) ? (size_t)-2 : (size_t)ilen); + } + } + else + mbclen = mbrlen (shell_input_line + previ, i - previ + 1, &mbs); + if (mbclen == 1 || mbclen == (size_t)-1) { mbclen = 1; @@ -5986,12 +6936,12 @@ set_line_mbstate () { mbclen = 0; previ = i + 1; - prevs = mbs; + if (locale_utf8locale == 0) + prevs = mbs; } else { - /* XXX - what to do if mbrlen returns 0? (null wide character) */ - int j; + size_t j; for (j = i; j < len; j++) shell_input_line_property[j] = 1; break; diff --git a/parse.y.orig b/parse.y.orig new file mode 100644 index 0000000..78b4917 --- /dev/null +++ b/parse.y.orig @@ -0,0 +1,6862 @@ +/* parse.y - Yacc grammar for bash. */ + +/* Copyright (C) 1989-2022 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +%{ +#include "config.h" + +#include "bashtypes.h" +#include "bashansi.h" + +#include "filecntl.h" + +#if defined (HAVE_UNISTD_H) +# include +#endif + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include +#include "chartypes.h" +#include + +#include "memalloc.h" + +#include "bashintl.h" + +#define NEED_STRFTIME_DECL /* used in externs.h */ + +#include "shell.h" +#include "execute_cmd.h" +#include "typemax.h" /* SIZE_MAX if needed */ +#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 +#endif /* READLINE */ + +#if defined (HISTORY) +# include "bashhist.h" +# include +#endif /* HISTORY */ + +#if defined (JOB_CONTROL) +# include "jobs.h" +#else +extern int cleanup_dead_jobs PARAMS((void)); +#endif /* JOB_CONTROL */ + +#if defined (ALIAS) +# include "alias.h" +#else +typedef void *alias_t; +#endif /* ALIAS */ + +#if defined (PROMPT_STRING_DECODE) +# ifndef _MINIX +# include +# endif +# include +# if defined (TM_IN_SYS_TIME) +# include +# include +# endif /* TM_IN_SYS_TIME */ +# include "maxpath.h" +#endif /* PROMPT_STRING_DECODE */ + +#define RE_READ_TOKEN -99 +#define NO_EXPANSION -100 + +#define END_ALIAS -2 + +#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 + +#define EXTEND_SHELL_INPUT_LINE_PROPERTY() \ +do { \ + if (shell_input_line_len + 2 > shell_input_line_propsize) \ + { \ + shell_input_line_propsize = shell_input_line_len + 2; \ + shell_input_line_property = (char *)xrealloc (shell_input_line_property, \ + shell_input_line_propsize); \ + } \ +} while (0) + +#if defined (EXTENDED_GLOB) +extern int extended_glob, extglob_flag; +#endif + +#if defined (TRANSLATABLE_STRINGS) +extern int dump_translatable_strings, dump_po_strings; +extern int singlequote_translations; +#endif /* TRANSLATABLE_STRINGS */ + +#if !defined (errno) +extern int errno; +#endif + +/* **************************************************************** */ +/* */ +/* "Forward" declarations */ +/* */ +/* **************************************************************** */ + +#ifdef DEBUG +static void debug_parser PARAMS((int)); +#endif + +static int yy_getc PARAMS((void)); +static int yy_ungetc PARAMS((int)); + +#if defined (READLINE) +static int yy_readline_get PARAMS((void)); +static int yy_readline_unget PARAMS((int)); +#endif + +static int yy_string_get PARAMS((void)); +static int yy_string_unget PARAMS((int)); +static int yy_stream_get PARAMS((void)); +static int yy_stream_unget PARAMS((int)); + +static int shell_getc PARAMS((int)); +static void shell_ungetc PARAMS((int)); +static void discard_until PARAMS((int)); + +static void push_string PARAMS((char *, int, alias_t *)); +static void pop_string PARAMS((void)); +static void free_string_list PARAMS((void)); + +static char *read_a_line PARAMS((int)); + +static int reserved_word_acceptable PARAMS((int)); +static int yylex PARAMS((void)); + +static void push_heredoc PARAMS((REDIRECT *)); +static char *mk_alexpansion PARAMS((char *)); +static int alias_expand_token PARAMS((char *)); +static int time_command_acceptable PARAMS((void)); +static int special_case_tokens PARAMS((char *)); +static int read_token PARAMS((int)); +static char *parse_matched_pair PARAMS((int, int, int, int *, int)); +static char *parse_comsub PARAMS((int, int, int, int *, int)); +#if defined (ARRAY_VARS) +static char *parse_compound_assignment PARAMS((int *)); +#endif +#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) +static int parse_dparen PARAMS((int)); +static int parse_arith_cmd PARAMS((char **, int)); +#endif +#if defined (COND_COMMAND) +static void cond_error PARAMS((void)); +static COND_COM *cond_expr PARAMS((void)); +static COND_COM *cond_or PARAMS((void)); +static COND_COM *cond_and PARAMS((void)); +static COND_COM *cond_term PARAMS((void)); +static int cond_skip_newlines PARAMS((void)); +static COMMAND *parse_cond_command PARAMS((void)); +#endif +#if defined (ARRAY_VARS) +static int token_is_assignment PARAMS((char *, int)); +static int token_is_ident PARAMS((char *, int)); +#endif +static int read_token_word PARAMS((int)); +static void discard_parser_constructs PARAMS((int)); + +static char *error_token_from_token PARAMS((int)); +static char *error_token_from_text PARAMS((void)); +static void print_offending_line PARAMS((void)); +static void report_syntax_error PARAMS((char *)); + +static void handle_eof_input_unit PARAMS((void)); +static void prompt_again PARAMS((int)); +#if 0 +static void reset_readline_prompt PARAMS((void)); +#endif +static void print_prompt PARAMS((void)); + +#if defined (HANDLE_MULTIBYTE) +static void set_line_mbstate PARAMS((void)); +static char *shell_input_line_property = NULL; +static size_t shell_input_line_propsize = 0; +#else +# define set_line_mbstate() +#endif + +extern int yyerror PARAMS((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; + +/* Displayed after reading a command but before executing it in an interactive shell */ +char *ps0_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 number of lines in a command saved while we run parse_and_execute */ +int saved_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[HEREDOC_MAX]; +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 size_t shell_input_line_index; +static size_t shell_input_line_size; /* Amount allocated for shell_input_line. */ +static size_t 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+1]; +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; + +static FILE *yyoutstream; +static FILE *yyerrstream; +%} + +%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 TIMEIGN + +/* More general tokens. yylex () knows how to make these. */ +%token WORD ASSIGNMENT_WORD REDIR_WORD +%token NUMBER +%token ARITH_CMD ARITH_FOR_EXPRS +%token 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 + +/* Special; never created by yylex; only set by parse_comsub and xparse_dolparen */ +%token DOLPAREN + +/* The types that the various syntactical units return. */ + +%type inputunit command pipeline pipeline_command +%type list0 list1 compound_list simple_list simple_list1 +%type simple_command shell_command +%type for_command select_command case_command group_command +%type arith_command +%type cond_command +%type arith_for_command +%type coproc +%type comsub +%type function_def function_body if_command elif_clause subshell +%type redirection redirection_list +%type simple_command_element +%type word_list pattern +%type pattern_list case_clause_sequence case_clause +%type timespec +%type 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; + } + | comsub + { + /* This is special; look at the production and how + parse_comsub sets token_to_read */ + global_command = $1; + eof_encountered = 0; + 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; + } + } + | error yacc_EOF + { + /* EOF after an error. Do ignoreeof or not. Really + only interesting in non-interactive shells */ + global_command = (COMMAND *)NULL; + if (last_command_exit_value == 0) + last_command_exit_value = EX_BADUSAGE; /* force error return */ + if (interactive && parse_and_execute_level == 0) + { + handle_eof_input_unit (); + YYACCEPT; + } + else + { + YYABORT; + } + } + | error YYEOF + { + global_command = (COMMAND *)NULL; + if (last_command_exit_value == 0) + last_command_exit_value = EX_BADUSAGE; /* force error return */ + if (interactive && parse_and_execute_level == 0) + { + handle_eof_input_unit (); + 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); + push_heredoc ($$); + } + | NUMBER LESS_LESS WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_reading_until, redir, 0); + push_heredoc ($$); + } + | REDIR_WORD LESS_LESS WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN); + push_heredoc ($$); + } + | LESS_LESS_MINUS WORD + { + source.dest = 0; + redir.filename = $2; + $$ = make_redirection (source, r_deblank_reading_until, redir, 0); + push_heredoc ($$); + } + | NUMBER LESS_LESS_MINUS WORD + { + source.dest = $1; + redir.filename = $3; + $$ = make_redirection (source, r_deblank_reading_until, redir, 0); + push_heredoc ($$); + } + | REDIR_WORD LESS_LESS_MINUS WORD + { + source.filename = $1; + redir.filename = $3; + $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN); + push_heredoc ($$); + } + | 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 && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $2; + } + else if (tc) + 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 ($$ == 0) YYERROR; + 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 ($$ == 0) YYERROR; + if (word_top > 0) word_top--; + } + | FOR ARITH_FOR_EXPRS DO compound_list DONE + { + $$ = make_arith_for_command ($2, $4, arith_for_lineno); + if ($$ == 0) YYERROR; + if (word_top > 0) word_top--; + } + | FOR ARITH_FOR_EXPRS '{' compound_list '}' + { + $$ = make_arith_for_command ($2, $4, arith_for_lineno); + if ($$ == 0) YYERROR; + if (word_top > 0) word_top--; + } + ; + +select_command: SELECT WORD newline_list DO compound_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 '{' compound_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 compound_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 '{' compound_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 compound_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 '{' compound_list '}' + { + $$ = 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 list_terminator newline_list DO compound_list DONE + { + $$ = make_select_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); + if (word_top > 0) word_top--; + } + | SELECT WORD newline_list IN list_terminator newline_list '{' compound_list '}' + { + $$ = make_select_command ($2, (WORD_LIST *)NULL, $8, 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 function_body + { $$ = make_function_def ($2, $3, function_dstart, function_bstart); } + | FUNCTION WORD '\n' newline_list function_body + { $$ = make_function_def ($2, $5, 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 && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $2; + } + else if (tc) + tc->redirects = $2; + $$ = $1; + } + ; + +subshell: '(' compound_list ')' + { + $$ = make_subshell_command ($2); + $$->flags |= CMD_WANT_SUBSHELL; + } + ; + +comsub: DOLPAREN compound_list ')' + { + $$ = $2; + } + | DOLPAREN newline_list ')' + { + $$ = (COMMAND *)NULL; + } + ; + +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 && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $3; + } + else if (tc) + 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 && tc->redirects) + { + register REDIRECT *t; + for (t = tc->redirects; t->next; t = t->next) + ; + t->next = $4; + } + else if (tc) + 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. */ + +compound_list: newline_list list0 + { + $$ = $2; + if (need_here_doc && last_read_token == '\n') + gather_here_documents (); + } + | 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 + { + if (parser_state & PST_CMDSUBST) + $$ = command_connect ($1, $4, '\n'); + else + $$ = 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 (); /* XXX */ + if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) + { +INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 -> simple_list")); + global_command = $1; + eof_encountered = 0; + if (bash_input.type == st_string) + 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 (); /* XXX */ + if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) + { +INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 '&' -> simple_list")); + global_command = $1; + eof_encountered = 0; + if (bash_input.type == st_string) + rewind_input_string (); + YYACCEPT; + } + } + | simple_list1 ';' + { + $$ = $1; + if (need_here_doc) + gather_here_documents (); /* XXX */ + if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token) + { +INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 ';' -> simple_list")); + global_command = $1; + eof_encountered = 0; + if (bash_input.type == st_string) + 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_command + { + if ($2) + $2->flags ^= CMD_INVERT_RETURN; /* toggle */ + $$ = $2; + } + | timespec pipeline_command + { + if ($2) + $2->flags |= $1; + $$ = $2; + } + | 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'; + else if ($2 == ';') + token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ + } + | BANG list_terminator + { + ELEMENT x; + + /* This is just as unclean. Posix says that `!' + by itself should be equivalent to `false'. + 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 |= CMD_INVERT_RETURN; + /* XXX - let's cheat and push a newline back */ + if ($2 == '\n') + token_to_read = '\n'; + if ($2 == ';') + token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ + } + ; + +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; } + | TIME TIMEIGN + { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } + | TIME TIMEOPT TIMEIGN + { $$ = 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; + yyoutstream = stdout; + yyerrstream = stderr; +#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 == 0) + { + if (bash_readline_initialized == 0) + initialize_readline (); + +#if defined (JOB_CONTROL) + if (job_control) + give_terminal_to (shell_pgrp, 0); +#endif /* JOB_CONTROL */ + + old_sigint = IMPOSSIBLE_TRAP_HANDLER; + if (signal_is_ignored (SIGINT) == 0) + { + old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler); + } + + sh_unset_nodelay_mode (fileno (rl_instream)); /* just in case */ + current_readline_line = readline (current_readline_prompt ? + current_readline_prompt : ""); + + CHECK_TERMSIG; + if (signal_is_ignored (SIGINT) == 0) + { + if (old_sigint != IMPOSSIBLE_TRAP_HANDLER) + 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); + } +} + +/* Will we be collecting another input line and printing a prompt? This uses + different conditions than SHOULD_PROMPT(), since readline allows a user to + embed a newline in the middle of the line it collects, which the parser + will interpret as a line break and command delimiter. */ +int +parser_will_prompt () +{ + return (current_readline_line == 0 || current_readline_line[current_readline_line_index] == 0); +} + +#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. */ +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 most of its signal handlers without the SA_RESTART flag, some + signals received during a read(2) will not cause the read to be restarted. + We will need to restart it ourselves. */ + +static int +yy_stream_get () +{ + int result; + + result = EOF; + if (bash_input.location.file) + { + /* XXX - don't need terminate_immediately; getc_with_restart checks + for terminating signals itself if read returns < 0 */ + result = getc_with_restart (bash_input.location.file); + } + 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; + +/* The line number offset set by assigning to LINENO. Not currently used. */ +int line_number_base = 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' + */ + +#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. + */ + +#define PSH_ALIAS 0x01 +#define PSH_DPAREN 0x02 +#define PSH_SOURCE 0x04 +#define PSH_ARRAY 0x08 + +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 + size_t saved_line_size, saved_line_index, saved_line_len; + int saved_line_terminator; + int flags; +} 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_len = shell_input_line_len; + temp->saved_line_index = shell_input_line_index; + temp->saved_line_terminator = shell_input_line_terminator; + temp->flags = 0; +#if defined (ALIAS) + temp->expander = ap; + if (ap) + temp->flags = PSH_ALIAS; +#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 = shell_input_line_len = 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_len = pushed_string_list->saved_line_len; + shell_input_line_terminator = pushed_string_list->saved_line_terminator; + +#if defined (ALIAS) + if (pushed_string_list->expand_alias) + parser_state |= PST_ALEXPNEXT; + else + parser_state &= ~PST_ALEXPNEXT; +#endif + + 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; +} + +void +free_pushed_string_input () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + free_string_list (); +#endif +} + +int +parser_expanding_alias () +{ + return (expanding_alias ()); +} + +void +parser_save_alias () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + push_string ((char *)NULL, 0, (alias_t *)NULL); + pushed_string_list->flags = PSH_SOURCE; /* XXX - for now */ +#else + ; +#endif +} + +void +parser_restore_alias () +{ +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + if (pushed_string_list) + pop_string (); +#else + ; +#endif +} + +#if defined (ALIAS) +/* Before freeing AP, make sure that there aren't any cases of pointer + aliasing that could cause us to reference freed memory later on. */ +void +clear_string_list_expander (ap) + alias_t *ap; +{ + register STRING_SAVER *t; + + for (t = pushed_string_list; t; t = t->next) + { + if (t->expander && t->expander == ap) + t->expander = 0; + } +} +#endif + +void +clear_shell_input_line () +{ + if (shell_input_line) + shell_input_line[shell_input_line_index = 0] = '\0'; +} + +/* 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 \ 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) + 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 or we + have to handle CTLESC or CTLNUL. */ + 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) + { + QUIT; + peekc = yy_getc (); + if (peekc == '\n') + { + line_number++; + continue; /* Make the unquoted \ pair disappear. */ + } + else + { + yy_ungetc (peekc); + pass_next = 1; + line_buffer[indx++] = c; /* Preserve the backslash. */ + } + } + else + { + /* remove_quoted_newline is non-zero if the here-document delimiter + is unquoted. In this case, we will be expanding the lines and + need to make sure CTLESC and CTLNUL in the input are quoted. */ + if (remove_quoted_newline && (c == CTLESC || c == CTLNUL)) + line_buffer[indx++] = CTLESC; + 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 (0); + ret = read_a_line (remove_quoted_newline); +#if defined (HISTORY) + if (ret && remember_on_history && (parser_state & PST_HEREDOC)) + { + /* To make adding 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 */ + { "--", TIMEIGN }, + { "-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 unquoted_backslash = 0; + +static int +shell_getc (remove_quoted_newline) + int remove_quoted_newline; +{ + register int i; + int c, truncating, last_was_backslash; + unsigned char uc; + + QUIT; + + last_was_backslash = 0; + 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++; + + /* Let's not let one really really long line blow up memory allocation */ + if (shell_input_line && shell_input_line_size >= 32768) + { + free (shell_input_line); + shell_input_line = 0; + shell_input_line_size = 0; + } + + restart_read: + + /* Allow immediate exit if interrupted during input. */ + QUIT; + + i = truncating = 0; + shell_input_line_terminator = 0; + + /* If the shell is interactive, 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 we get EOS while parsing a string, treat it as EOF so we + don't just keep looping. Happens very rarely */ + if (bash_input.type == st_string) + { + if (i == 0) + shell_input_line_terminator = EOF; + shell_input_line[i] = '\0'; + c = EOF; + break; + } + continue; + } + + /* Theoretical overflow */ + /* If we can't put 256 bytes more into the buffer, allocate + everything we can and fill it as full as we can. */ + /* XXX - we ignore rest of line using `truncating' flag */ + if (shell_input_line_size > (SIZE_MAX - 256)) + { + size_t n; + + n = SIZE_MAX - i; /* how much more can we put into the buffer? */ + if (n <= 2) /* we have to save 1 for the newline added below */ + { + if (truncating == 0) + internal_warning(_("shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated"), shell_input_line_size, (unsigned long)SIZE_MAX); + shell_input_line[i] = '\0'; + truncating = 1; + } + if (shell_input_line_size < SIZE_MAX) + { + shell_input_line_size = SIZE_MAX; + shell_input_line = xrealloc (shell_input_line, shell_input_line_size); + } + } + else + 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; + } + + if (truncating == 0 || c == '\n') + shell_input_line[i++] = c; + + if (c == '\n') + { + shell_input_line[--i] = '\0'; + current_command_line_count++; + break; + } + + last_was_backslash = last_was_backslash == 0 && c == '\\'; + } + + 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) + /* 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. */ + if (current_delimiter (dstack) == '\'') + history_quoting_state = '\''; + else if (current_delimiter (dstack) == '"') + history_quoting_state = '"'; + else + history_quoting_state = 0; +# endif + /* Calling with a third argument of 1 allows remember_on_history to + determine whether or not the line is saved to the history list */ + expansions = pre_process_line (shell_input_line, 1, 1); +# if defined (BANG_HISTORY) + history_quoting_state = 0; +# 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 == 0) + 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 (shell_input_line); + 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. We should not echo lines while parsing command + substitutions with recursive calls into the parsing engine; those + should only be echoed once when we read the word. That is the + reason for the test against shell_eof_token, which is set to a + right paren when parsing the contents of command substitutions. */ + if (echo_input_at_read && (shell_input_line[0] || + shell_input_line_terminator != EOF) && + shell_eof_token == 0) + fprintf (stderr, "%s\n", shell_input_line); + } + else + { + shell_input_line_size = 0; + prompt_string_pointer = ¤t_prompt_string; + if (SHOULD_PROMPT ()) + prompt_again (0); + 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_size < SIZE_MAX-3 && (shell_input_line_len+3 > shell_input_line_size)) + shell_input_line = (char *)xrealloc (shell_input_line, + 1 + (shell_input_line_size += 2)); + + /* Don't add a newline to a string that ends with a backslash if we're + going to be removing quoted newlines, since that will eat the + backslash. Add another backslash instead (will be removed by + word expansion). */ + if (bash_input.type == st_string && expanding_alias() == 0 && last_was_backslash && c == EOF && remove_quoted_newline) + shell_input_line[shell_input_line_len] = '\\'; + else + shell_input_line[shell_input_line_len] = '\n'; + shell_input_line[shell_input_line_len + 1] = '\0'; + +#if defined (HANDLE_MULTIBYTE) + /* This is kind of an abstraction violation, but there's no need to + go through the entire shell_input_line again with a call to + set_line_mbstate(). */ + EXTEND_SHELL_INPUT_LINE_PROPERTY(); + shell_input_line_property[shell_input_line_len] = 1; +#endif + } + } + +next_alias_char: + if (shell_input_line_index == 0) + unquoted_backslash = 0; + + uc = shell_input_line[shell_input_line_index]; + + if (uc) + { + unquoted_backslash = unquoted_backslash == 0 && 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. */ + /* If pushed_string_list != 0 but pushed_string_list->expander == 0 (not + currently tested) and the flags value is not PSH_SOURCE, we are not + parsing an alias, we have just saved one (push_string, when called by + the parse_dparen code) In this case, just go on as well. The PSH_SOURCE + case is handled below. */ + + /* If we're at the end of an alias expansion add a space to make sure that + the alias remains marked as being in use while we expand its last word. + This makes sure that pop_string doesn't mark the alias as not in use + before the string resulting from the alias expansion is tokenized and + checked for alias expansion, preventing recursion. At this point, the + last character in shell_input_line is the last character of the alias + expansion. We test that last character to determine whether or not to + return the space that will delimit the token and postpone the pop_string. + This set of conditions duplicates what used to be in mk_alexpansion () + below, with the addition that we don't add a space if we're currently + reading a quoted string or in a shell comment. */ +#ifndef OLD_ALIAS_HACK + if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE && + pushed_string_list->flags != PSH_DPAREN && + (parser_state & PST_COMMENT) == 0 && + (parser_state & PST_ENDALIAS) == 0 && /* only once */ + shell_input_line_index > 0 && + shellblank (shell_input_line[shell_input_line_index-1]) == 0 && + shell_input_line[shell_input_line_index-1] != '\n' && + unquoted_backslash == 0 && + shellmeta (shell_input_line[shell_input_line_index-1]) == 0 && + (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"')) + { + parser_state |= PST_ENDALIAS; + /* We need to do this to make sure last_shell_getc_is_singlebyte returns + true, since we are returning a single-byte space. */ + if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0) + { +#if 0 + EXTEND_SHELL_INPUT_LINE_PROPERTY(); + shell_input_line_property[shell_input_line_len++] = 1; + /* extend shell_input_line to accommodate the shell_ungetc that + read_token_word() will perform, since we're extending the index */ + RESIZE_MALLOCED_BUFFER (shell_input_line, shell_input_line_index, 2, shell_input_line_size, 16); + shell_input_line[++shell_input_line_index] = '\0'; /* XXX */ +#else + shell_input_line_property[shell_input_line_index - 1] = 1; +#endif + } + return ' '; /* END_ALIAS */ + } +#endif + +pop_alias: +#endif /* ALIAS || DPAREN_ARITHMETIC */ + /* This case works for PSH_DPAREN as well as the shell_ungets() case that uses + push_string */ + if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE) + { + parser_state &= ~PST_ENDALIAS; + pop_string (); + uc = shell_input_line[shell_input_line_index]; + if (uc) + shell_input_line_index++; + } + + if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') + { + if (SHOULD_PROMPT ()) + prompt_again (0); + line_number++; + + /* What do we do here if we're expanding an alias whose definition + includes an escaped newline? If that's the last character in the + alias expansion, we just pop the pushed string list (recall that + we inhibit the appending of a space if newline is the last + character). If it's not the last character, we need to consume the + quoted newline and move to the next character in the expansion. */ +#if defined (ALIAS) + if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0') + { + uc = 0; + goto pop_alias; + } + else if (expanding_alias () && shell_input_line[shell_input_line_index+1] != '\0') + { + shell_input_line_index++; /* skip newline */ + goto next_alias_char; /* and get next character */ + } + else +#endif + goto restart_read; + } + + if (uc == 0 && shell_input_line_terminator == EOF) + return ((shell_input_line_index != 0) ? '\n' : EOF); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + /* We already know that we are not parsing an alias expansion because of the + check for expanding_alias() above. This knows how parse_and_execute + handles switching to st_string input while an alias is being expanded, + hence the check for pushed_string_list without pushed_string_list->expander + and the check for PSH_SOURCE as pushed_string_list->flags. + parse_and_execute and parse_string both change the input type to st_string + and place the string to be parsed and executed into location.string, so + we should not stop reading that until the pointer is '\0'. + The check for shell_input_line_terminator may be superfluous. + + This solves the problem of `.' inside a multi-line alias with embedded + newlines executing things out of order. */ + if (uc == 0 && bash_input.type == st_string && *bash_input.location.string && + pushed_string_list && pushed_string_list->flags == PSH_SOURCE && + shell_input_line_terminator == 0) + { + shell_input_line_index = 0; + goto restart_read; + } +#endif + + 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; +} + +/* Push S back into shell_input_line; updating shell_input_line_index */ +void +shell_ungets (s) + char *s; +{ + size_t slen, chars_left; + + slen = strlen (s); + + if (shell_input_line[shell_input_line_index] == '\0') + { + /* Easy, just overwrite shell_input_line. This is preferred because it + saves on set_line_mbstate () and other overhead like push_string */ + if (shell_input_line_size <= slen) + RESIZE_MALLOCED_BUFFER (shell_input_line, shell_input_line_index, slen + 1, shell_input_line_size, 64); + strcpy (shell_input_line, s); + shell_input_line_index = 0; + shell_input_line_len = slen; + shell_input_line_terminator = 0; + } + else if (shell_input_line_index >= slen) + { + /* Just as easy, just back up shell_input_line_index, but it means we + will re-process some characters in set_line_mbstate(). Need to + watch pushing back newlines here. */ + while (slen > 0) + shell_input_line[--shell_input_line_index] = s[--slen]; + } + else if (s[slen - 1] == '\n') + { + push_string (savestring (s), 0, (alias_t *)NULL); + /* push_string does set_line_mbstate () */ + return; + } + else + { + /* Harder case: pushing back input string that's longer than what we've + consumed from shell_input_line so far. */ + INTERNAL_DEBUG (("shell_ungets: not at end of shell_input_line")); + + chars_left = shell_input_line_len - shell_input_line_index; + if (shell_input_line_size <= (slen + chars_left)) + RESIZE_MALLOCED_BUFFER (shell_input_line, shell_input_line_index, chars_left + slen + 1, shell_input_line_size, 64); + memmove (shell_input_line + slen, shell_input_line + shell_input_line_index, shell_input_line_len - shell_input_line_index); + strcpy (shell_input_line, s); + shell_input_line_index = 0; + shell_input_line_len = strlen (shell_input_line); /* chars_left + slen? */ + } + +#if defined (HANDLE_MULTIBYTE) + set_line_mbstate (); /* XXX */ +#endif +} + +char * +parser_remaining_input () +{ + if (shell_input_line == 0) + return 0; + if ((int)shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len) + return ""; /* XXX */ + return (shell_input_line + shell_input_line_index); +} + +#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|SEVAL_NOOPTIMIZE); + + 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; +} + +void +push_token (x) + int x; +{ + two_tokens_ago = token_before_that; + token_before_that = last_read_token; + last_read_token = current_token; + + current_token = x; +} + +/* 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 size_t 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 && parse_and_execute_level == 0 && 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 (0); + } + + 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) + { + /* placeholder for any special handling. */ + return (current_token); + } + + if (current_token < 0) +#if defined (YYERRCODE) && !defined (YYUNDEF) + current_token = EOF_Reached ? YYEOF : YYERRCODE; +#else + current_token = EOF_Reached ? YYEOF : YYUNDEF; +#endif + + 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; + +/* When non-zero, we can read IN as an acceptable token, regardless of how + many newlines we read. */ +static int expecting_in_token; + +static void +push_heredoc (r) + REDIRECT *r; +{ + if (need_here_doc >= HEREDOC_MAX) + { + last_command_exit_value = EX_BADUSAGE; + need_here_doc = 0; + report_syntax_error (_("maximum here-document count exceeded")); + reset_parser (); + exit_shell (last_command_exit_value); + } + redir_stack[need_here_doc++] = r; +} + +void +gather_here_documents () +{ + int r; + + r = 0; + here_doc_first_line = 1; + while (need_here_doc > 0) + { + parser_state |= PST_HEREDOC; + make_here_document (redir_stack[r++], line_number); + parser_state &= ~PST_HEREDOC; + need_here_doc--; + redir_stack[r - 1] = 0; /* XXX */ + } + here_doc_first_line = 0; /* just in case */ +} + +/* When non-zero, an open-brace used to create a group is awaiting a close + brace partner. */ +static int open_brace_count; + +/* In the following three macros, `token' is always last_read_token */ + +/* Are we in the middle of parsing a redirection where we are about to read + a word? This is used to make sure alias expansion doesn't happen in the + middle of a redirection, even though we're parsing a simple command. */ +#define parsing_redirection(token) \ + (token == '<' || token == '>' || \ + token == GREATER_GREATER || token == GREATER_BAR || \ + token == LESS_GREATER || token == LESS_LESS_MINUS || \ + token == LESS_LESS || token == LESS_LESS_LESS || \ + token == LESS_AND || token == GREATER_AND || token == AND_GREATER) + +/* Is `token' one that will allow a WORD to be read in a command position? + We can read a simple command name on which we should attempt alias expansion + or we can read an assignment statement. */ +#define command_token_position(token) \ + (((token) == ASSIGNMENT_WORD) || \ + ((parser_state&PST_REDIRLIST) && parsing_redirection(token) == 0) || \ + ((token) != SEMI_SEMI && (token) != SEMI_AND && (token) != SEMI_SEMI_AND && reserved_word_acceptable(token))) + +/* Are we in a position where we can read an assignment statement? */ +#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 ((parser_state & PST_CASEPAT) && last_read_token == '|' && word_token_alist[i].token == ESAC) \ + break; /* Posix grammar rule 4 */ \ + if ((parser_state & PST_CASEPAT) && last_read_token == '(' && word_token_alist[i].token == ESAC) /*)*/ \ + break; /* phantom Posix grammar rule 4 */ \ + if (word_token_alist[i].token == ESAC) { \ + parser_state &= ~(PST_CASEPAT|PST_CASESTMT); \ + esacs_needed_count--; \ + } 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); +#ifdef OLD_ALIAS_HACK + /* If the last character in the alias is a newline, don't add a trailing + space to the expansion. Works with shell_getc above. */ + /* Need to do something about the case where the alias expansion contains + an unmatched quoted string, since appending this space affects the + subsequent output. */ + if (l > 0 && r[l - 1] != ' ' && r[l - 1] != '\n' && shellmeta(r[l - 1]) == 0) + r[l++] = ' '; +#endif + r[l] = '\0'; + return r; +} + +static int +alias_expand_token (tokstr) + char *tokstr; +{ + char *expanded; + alias_t *ap; + +#if 0 + if (((parser_state & PST_ALEXPNEXT) || command_token_position (last_read_token)) && + (parser_state & PST_CASEPAT) == 0) +#else + if ((parser_state & PST_ALEXPNEXT) || assignment_acceptable (last_read_token)) +#endif + { + ap = find_alias (tokstr); + + /* Currently expanding this token. */ + if (ap && (ap->flags & AL_BEINGEXPANDED)) + return (NO_EXPANSION); + +#ifdef OLD_ALIAS_HACK + /* mk_alexpansion puts an extra space on the end of the alias expansion, + so the lookahead by the parser works right (the alias needs to remain + `in use' while parsing its last word to avoid alias recursion for + something like "alias echo=echo"). 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. */ +#endif + 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) + int i; + + if (posixly_correct && shell_compatibility_level > 41) + { + /* Quick check of the rest of the line to find the next token. If it + begins with a `-', Posix says to not return `time' as the token. + This was interp 267. */ + i = shell_input_line_index; + while (i < shell_input_line_len && (shell_input_line[i] == ' ' || shell_input_line[i] == '\t')) + i++; + if (shell_input_line[i] == '-') + return 0; + } + + switch (last_read_token) + { + case 0: + case ';': + case '\n': + if (token_before_that == '|') + return (0); + /* FALLTHROUGH */ + case AND_AND: + case OR_OR: + case '&': + case WHILE: + case DO: + case UNTIL: + case IF: + case THEN: + case ELIF: + case ELSE: + case '{': /* } */ + case '(': /* )( */ + case ')': /* only valid in case statement */ + case BANG: /* ! time pipeline */ + case TIME: /* time time pipeline */ + case TIMEOPT: /* time -p time pipeline */ + case TIMEIGN: /* time -p -- ... */ + case DOLPAREN: + 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 TIMEIGN if the last read token was TIME or TIMEOPT. + + ']]' 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; +{ + /* Posix grammar rule 6 */ + 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++; + } + if (expecting_in_token) + expecting_in_token--; + return (IN); + } + + /* XXX - leaving above code intact for now, but it should eventually be + removed in favor of this clause. */ + /* Posix grammar rule 6 */ + if (expecting_in_token && (last_read_token == WORD || last_read_token == '\n') && + (tokstr[0] == 'i' && tokstr[1] == 'n' && tokstr[2] == 0)) + { + if (parser_state & PST_CASESTMT) + { + parser_state |= PST_CASEPAT; + esacs_needed_count++; + } + expecting_in_token--; + return (IN); + } + /* Posix grammar rule 6, third word in FOR: for i; do command-list; done */ + else if (expecting_in_token && (last_read_token == '\n' || last_read_token == ';') && + (tokstr[0] == 'd' && tokstr[1] == 'o' && tokstr[2] == '\0')) + { + expecting_in_token--; + return (DO); + } + + /* for i do; command-list; done */ + 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')) + { + if (expecting_in_token) + expecting_in_token--; + 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) + { + if (last_read_token == IN && STREQ (tokstr, "esac")) + { + esacs_needed_count--; + 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); + /* Handle -- after `time'. */ + if (last_read_token == TIME && tokstr[0] == '-' && tokstr[1] == '-' && !tokstr[2]) + return (TIMEIGN); + /* Handle -- after `time -p'. */ + if (last_read_token == TIMEOPT && tokstr[0] == '-' && tokstr[1] == '-' && !tokstr[2]) + return (TIMEIGN); +#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|PST_CMDSUBST)) + extended_glob = extglob_flag; +#endif + if (parser_state & (PST_CMDSUBST|PST_STRING)) + expand_aliases = expaliases_flag; + + parser_state = 0; + here_doc_first_line = 0; + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + if (pushed_string_list) + free_string_list (); +#endif /* ALIAS || DPAREN_ARITHMETIC */ + + /* This is where we resynchronize to the next newline on error/reset */ + 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; + + eol_ungetc_lookahead = 0; + + /* added post-bash-5.1 */ + need_here_doc = 0; + redir_stack[0] = 0; + esacs_needed_count = expecting_in_token = 0; + + current_token = '\n'; /* XXX */ + last_read_token = '\n'; + token_to_read = '\n'; +} + +void +reset_readahead_token () +{ + if (token_to_read == '\n') + token_to_read = 0; +} + +/* 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 we hit the end of the string and we're not expanding an alias (e.g., + we are eval'ing a string that is an incomplete command), return EOF */ + if (character == '\0' && bash_input.type == st_string && expanding_alias() == 0) + { + INTERNAL_DEBUG (("shell_getc: bash_input.location.string = `%s'", bash_input.location.string)); + EOF_Reached = 1; + return (yacc_EOF); + } + + if MBTEST(character == '#' && (!interactive || interactive_comments)) + { + /* A comment. Discard until EOL or EOF, and then return a newline. */ + parser_state |= PST_COMMENT; + discard_until ('\n'); + shell_getc (0); + parser_state &= ~PST_COMMENT; + character = '\n'; /* this will take the next if statement and return. */ + } + + if MBTEST(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)) + { +#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; + + /* If we are parsing a command substitution and we have read a character + that marks the end of it, don't bother to skip over quoted newlines + when we read the next token. We're just interested in a character + that will turn this into a two-character token, so we let the higher + layers deal with quoted newlines following the command substitution. */ + if ((parser_state & PST_CMDSUBST) && character == shell_eof_token) + peek_char = shell_getc (0); + else + peek_char = shell_getc (1); + + if MBTEST(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((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 0x0001 +#define P_ALLOWESC 0x0002 +#define P_DQUOTE 0x0004 +#define P_COMMAND 0x0008 /* parsing a command, so look for comments */ +#define P_BACKQUOTE 0x0010 /* parsing a backquoted command substitution */ +#define P_ARRAYSUB 0x0020 /* parsing a [...] array subscript for assignment */ +#define P_DOLBRACE 0x0040 /* parsing a ${...} construct */ +#define P_ARITH 0x0080 /* parsing a $(( )) arithmetic expansion */ + +/* Lexical state while parsing a grouping construct or $(...). */ +#define LEX_WASDOL 0x0001 +#define LEX_CKCOMMENT 0x0002 +#define LEX_INCOMMENT 0x0004 +#define LEX_PASSNEXT 0x0008 +#define LEX_RESWDOK 0x0010 +#define LEX_CKCASE 0x0020 +#define LEX_INCASE 0x0040 +#define LEX_INHEREDOC 0x0080 +#define LEX_HEREDELIM 0x0100 /* reading here-doc delimiter */ +#define LEX_STRIPDOC 0x0200 /* <<- strip tabs from here doc delim */ +#define LEX_QUOTEDDOC 0x0400 /* here doc with quoted delim */ +#define LEX_INWORD 0x0800 +#define LEX_GTLT 0x1000 +#define LEX_CKESAC 0x2000 /* check esac after in -- for later */ +#define LEX_CASEWD 0x4000 /* word after case */ +#define LEX_PATLIST 0x8000 /* case statement pattern list */ + +#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, prevch, tflags; + int nestlen, ttranslen, start_lineno; + char *ret, *nestret, *ttrans; + int retind, retsize, rflags; + int dolbrace_state; + + dolbrace_state = (flags & P_DOLBRACE) ? DOLBRACE_PARAM : 0; + +/*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; + ch = EOF; /* just in case */ + while (count) + { + prevch = ch; + 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 */ + parser_state |= PST_NOERROR; /* avoid redundant error message */ + return (&matched_pair_error); + } + + /* Possible reprompting. */ + if MBTEST(ch == '\n' && SHOULD_PROMPT ()) + prompt_again (0); + + /* 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 MBTEST(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; + /* XXX - PST_NOEXPAND? */ + if MBTEST(qc != '\'' && ch == '\n') /* double-quoted \ disappears. */ + { + if (retind > 0) + retind--; /* swallow previously-added backslash */ + continue; + } + + RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64); + if MBTEST(ch == CTLESC) + 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; + + /* Based on which dolstate is currently in (param, op, or word), + decide what the op is. We're really only concerned if it's % or + #, so we can turn on a flag that says whether or not we should + treat single quotes as special when inside a double-quoted + ${...}. This logic must agree with subst.c:extract_dollar_brace_string + since they share the same defines. */ + /* FLAG POSIX INTERP 221 */ + if (flags & P_DOLBRACE) + { + /* ${param%[%]word} */ + if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '%' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param#[#]word} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '#' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param/[/]pat/rep} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '/' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE2; /* XXX */ + /* ${param^[^]pat} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '^' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* ${param,[,]pat} */ + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == ',' && retind > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if MBTEST(dolbrace_state == DOLBRACE_PARAM && strchr ("#%^,~:-=?+/", ch) != 0) + dolbrace_state = DOLBRACE_OP; + else if MBTEST(dolbrace_state == DOLBRACE_OP && strchr ("#%^,~:-=?+/", ch) == 0) + dolbrace_state = DOLBRACE_WORD; + } + + /* The big hammer. Single quotes aren't special in double quotes. The + problem is that Posix used to say 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." */ + /* This was changed in Austin Group Interp 221 */ + if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2 && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'') + continue; + + /* 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 || dolbrace_state == DOLBRACE_QUOTE || dolbrace_state == DOLBRACE_QUOTE2)) + { + /* Translate $'...' here. */ + /* PST_NOEXPAND */ + ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen); + free (nestret); + + /* If we're parsing a double-quoted brace expansion and we are + not in a place where single quotes are treated specially, + make sure we single-quote the results of the ansi + expansion because quote removal should remove them later */ + /* FLAG POSIX INTERP 221 */ + if ((shell_compatibility_level > 42) && (rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_QUOTE2 || dolbrace_state == DOLBRACE_QUOTE) && (flags & P_DOLBRACE)) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } +#if 0 /* TAG:bash-5.3 */ + /* This single-quotes PARAM in ${PARAM OP WORD} when PARAM + contains a $'...' even when extended_quote is set. */ + else if ((rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_PARAM) && (flags & P_DOLBRACE)) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } +#endif + else if ((rflags & P_DQUOTE) == 0) + { + nestret = sh_single_quote (ttrans); + free (ttrans); + nestlen = strlen (nestret); + } + else + { + /* Should we quote CTLESC here? */ + nestret = ttrans; + nestlen = ttranslen; + } + retind -= 2; /* back up before the $' */ + } +#if defined (TRANSLATABLE_STRINGS) + else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0)) + { + /* Locale expand $"..." here. */ + /* PST_NOEXPAND */ + ttrans = locale_expand (nestret, 0, nestlen - 1, start_lineno, &ttranslen); + free (nestret); + + /* If we're supposed to single-quote translated strings, + check whether the translated result is different from + the original and single-quote the string if it is. */ + if (singlequote_translations && + ((nestlen - 1) != ttranslen || STREQN (nestret, ttrans, ttranslen) == 0)) + { + if ((rflags & P_DQUOTE) == 0) + nestret = sh_single_quote (ttrans); + else if ((rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_QUOTE2) && (flags & P_DOLBRACE)) + nestret = sh_single_quote (ttrans); + else + /* single quotes aren't special, use backslash instead */ + nestret = sh_backslash_quote_for_double_quotes (ttrans, 0); + } + else + nestret = sh_mkdoublequoted (ttrans, ttranslen, 0); + free (ttrans); + nestlen = strlen (nestret); + retind -= 2; /* back up before the $" */ + } +#endif /* TRANSLATABLE_STRINGS */ + + APPEND_NESTRET (); + FREE (nestret); + } + else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ + goto parse_dollar_word; + else if ((flags & P_ARITH) && (tflags & LEX_WASDOL) && ch == '(') /*)*/ + /* $() inside $(( ))/$[ ] */ + goto parse_dollar_word; +#if defined (PROCESS_SUBSTITUTION) + /* XXX - technically this should only be recognized at the start of + a word */ + else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_GTLT) && (ch == '(')) /* ) */ + goto parse_dollar_word; +#endif + } + /* 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|P_DOLBRACE|rflags); + else if (ch == '[') /* ] */ + nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags|P_ARITH); + + CHECK_NESTRET_ERROR (); + APPEND_NESTRET (); + + FREE (nestret); + } +#if defined (PROCESS_SUBSTITUTION) + if MBTEST((ch == '<' || ch == '>') && (tflags & LEX_GTLT) == 0) + tflags |= LEX_GTLT; + else + tflags &= ~LEX_GTLT; +#endif + if MBTEST(ch == '$' && (tflags & LEX_WASDOL) == 0) + 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; +} + +#if defined (DEBUG) +static void +dump_tflags (flags) + int flags; +{ + int f; + + f = flags; + fprintf (stderr, "%d -> ", f); + if (f & LEX_WASDOL) + { + f &= ~LEX_WASDOL; + fprintf (stderr, "LEX_WASDOL%s", f ? "|" : ""); + } + if (f & LEX_CKCOMMENT) + { + f &= ~LEX_CKCOMMENT; + fprintf (stderr, "LEX_CKCOMMENT%s", f ? "|" : ""); + } + if (f & LEX_INCOMMENT) + { + f &= ~LEX_INCOMMENT; + fprintf (stderr, "LEX_INCOMMENT%s", f ? "|" : ""); + } + if (f & LEX_PASSNEXT) + { + f &= ~LEX_PASSNEXT; + fprintf (stderr, "LEX_PASSNEXT%s", f ? "|" : ""); + } + if (f & LEX_RESWDOK) + { + f &= ~LEX_RESWDOK; + fprintf (stderr, "LEX_RESWDOK%s", f ? "|" : ""); + } + if (f & LEX_CKCASE) + { + f &= ~LEX_CKCASE; + fprintf (stderr, "LEX_CKCASE%s", f ? "|" : ""); + } + if (f & LEX_CKESAC) + { + f &= ~LEX_CKESAC; + fprintf (stderr, "LEX_CKESAC%s", f ? "|" : ""); + } + if (f & LEX_INCASE) + { + f &= ~LEX_INCASE; + fprintf (stderr, "LEX_INCASE%s", f ? "|" : ""); + } + if (f & LEX_CASEWD) + { + f &= ~LEX_CASEWD; + fprintf (stderr, "LEX_CASEWD%s", f ? "|" : ""); + } + if (f & LEX_PATLIST) + { + f &= ~LEX_PATLIST; + fprintf (stderr, "LEX_PATLIST%s", f ? "|" : ""); + } + if (f & LEX_INHEREDOC) + { + f &= ~LEX_INHEREDOC; + fprintf (stderr, "LEX_INHEREDOC%s", f ? "|" : ""); + } + if (f & LEX_HEREDELIM) + { + f &= ~LEX_HEREDELIM; + fprintf (stderr, "LEX_HEREDELIM%s", f ? "|" : ""); + } + if (f & LEX_STRIPDOC) + { + f &= ~LEX_STRIPDOC; + fprintf (stderr, "LEX_WASDOL%s", f ? "|" : ""); + } + if (f & LEX_QUOTEDDOC) + { + f &= ~LEX_QUOTEDDOC; + fprintf (stderr, "LEX_QUOTEDDOC%s", f ? "|" : ""); + } + if (f & LEX_INWORD) + { + f &= ~LEX_INWORD; + fprintf (stderr, "LEX_INWORD%s", f ? "|" : ""); + } + + fprintf (stderr, "\n"); + fflush (stderr); +} +#endif + +/* Parse a $(...) command substitution. This reads input from the current + input stream. */ +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 peekc, r; + int start_lineno, local_extglob, was_extpat; + char *ret, *tcmd; + int retlen; + sh_parser_state_t ps; + STRING_SAVER *saved_strings; + COMMAND *saved_global, *parsed_command; + + /* Posix interp 217 says arithmetic expressions have precedence, so + assume $(( introduces arithmetic expansion and parse accordingly. */ + if (open == '(') /*)*/ + { + peekc = shell_getc (1); + shell_ungetc (peekc); + if (peekc == '(') /*)*/ + return (parse_matched_pair (qc, open, close, lenp, P_ARITH)); + } + +/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/ + + /*debug_parser(1);*/ + start_lineno = line_number; + + save_parser_state (&ps); + + was_extpat = (parser_state & PST_EXTPAT); + + /* State flags we don't want to persist into command substitutions. */ + parser_state &= ~(PST_REGEXP|PST_EXTPAT|PST_CONDCMD|PST_CONDEXPR|PST_COMPASSIGN); + /* Could do PST_CASESTMT too, but that also affects history. Setting + expecting_in_token below should take care of the parsing requirements. + Unsetting PST_REDIRLIST isn't strictly necessary because of how we set + token_to_read below, but we do it anyway. */ + parser_state &= ~(PST_CASEPAT|PST_ALEXPNEXT|PST_SUBSHELL|PST_REDIRLIST); + /* State flags we want to set for this run through the parser. */ + parser_state |= PST_CMDSUBST|PST_EOFTOKEN|PST_NOEXPAND; + + /* leave pushed_string_list alone, since we might need to consume characters + from it to satisfy this command substitution (in some perverse case). */ + shell_eof_token = close; + + saved_global = global_command; /* might not be necessary */ + global_command = (COMMAND *)NULL; + + /* These are reset by reset_parser() */ + need_here_doc = 0; + esacs_needed_count = expecting_in_token = 0; + + /* We want to expand aliases on this pass if we're in posix mode, since the + standard says you have to take aliases into account when looking for the + terminating right paren. Otherwise, we defer until execution time for + backwards compatibility. */ + if (expand_aliases) + expand_aliases = posixly_correct != 0; +#if defined (EXTENDED_GLOB) + /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a + conditional command and have already set extended_glob appropriately. */ + if (shell_compatibility_level <= 51 && was_extpat == 0) + { + local_extglob = extended_glob; + extended_glob = 1; + } +#endif + + current_token = '\n'; /* XXX */ + token_to_read = DOLPAREN; /* let's trick the parser */ + + r = yyparse (); + + if (need_here_doc > 0) + { + internal_warning ("command substitution: %d unterminated here-document%s", need_here_doc, (need_here_doc == 1) ? "" : "s"); + gather_here_documents (); /* XXX check compatibility level? */ + } + +#if defined (EXTENDED_GLOB) + if (shell_compatibility_level <= 51 && was_extpat == 0) + extended_glob = local_extglob; +#endif + + parsed_command = global_command; + + if (EOF_Reached) + { + shell_eof_token = ps.eof_token; + expand_aliases = ps.expand_aliases; + + /* yyparse() has already called yyerror() and reset_parser() */ + parser_state |= PST_NOERROR; + return (&matched_pair_error); + } + else if (r != 0) + { + /* parser_error (start_lineno, _("could not parse command substitution")); */ + /* Non-interactive shells exit on parse error in a command substitution. */ + if (last_command_exit_value == 0) + last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (last_command_exit_value); + if (interactive_shell == 0) + jump_to_top_level (FORCE_EOF); /* This is like reader_loop() */ + else + { + shell_eof_token = ps.eof_token; + expand_aliases = ps.expand_aliases; + + jump_to_top_level (DISCARD); /* XXX - return (&matched_pair_error)? */ + } + } + + if (current_token != shell_eof_token) + { +INTERNAL_DEBUG(("current_token (%d) != shell_eof_token (%c)", current_token, shell_eof_token)); + token_to_read = current_token; + + /* If we get here we can check eof_encountered and if it's 1 but the + previous EOF_Reached test didn't succeed, we can assume that the shell + is interactive and ignoreeof is set. We might want to restore the + parser state in this case. */ + shell_eof_token = ps.eof_token; + expand_aliases = ps.expand_aliases; + + return (&matched_pair_error); + } + + /* We don't want to restore the old pushed string list, since we might have + used it to consume additional input from an alias while parsing this + command substitution. */ + saved_strings = pushed_string_list; + restore_parser_state (&ps); + pushed_string_list = saved_strings; + + tcmd = print_comsub (parsed_command); /* returns static memory */ + retlen = strlen (tcmd); + if (tcmd[0] == '(') /* ) need a space to prevent arithmetic expansion */ + retlen++; + ret = xmalloc (retlen + 2); + if (tcmd[0] == '(') /* ) */ + { + ret[0] = ' '; + strcpy (ret + 1, tcmd); + } + else + strcpy (ret, tcmd); + ret[retlen++] = ')'; + ret[retlen] = '\0'; + + dispose_command (parsed_command); + global_command = saved_global; + + if (lenp) + *lenp = retlen; + +/*itrace("parse_comsub:%d: returning `%s'", line_number, ret);*/ + return ret; +} + +/* Recursively call the parser to parse a $(...) command substitution. This is + called by the word expansion code and so does not have to reset as much + parser state before calling yyparse(). */ +char * +xparse_dolparen (base, string, indp, flags) + char *base; + char *string; + int *indp; + int flags; +{ + sh_parser_state_t ps; + sh_input_line_state_t ls; + int orig_ind, nc, sflags, start_lineno, local_extglob; + char *ret, *ep, *ostring; + +/*debug_parser(1);*/ + orig_ind = *indp; + ostring = string; + start_lineno = line_number; + + if (*string == 0) + { + if (flags & SX_NOALLOC) + return (char *)NULL; + + ret = xmalloc (1); + ret[0] = '\0'; + return ret; + } + +/*itrace("xparse_dolparen: size = %d shell_input_line = `%s' string=`%s'", shell_input_line_size, shell_input_line, string);*/ + + sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE; + if (flags & SX_NOLONGJMP) + sflags |= SEVAL_NOLONGJMP; + + save_parser_state (&ps); + save_input_line_state (&ls); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + pushed_string_list = (STRING_SAVER *)NULL; +#endif + /*(*/ + parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/ + shell_eof_token = ')'; + if (flags & SX_COMPLETE) + parser_state |= PST_NOERROR; + + /* Don't expand aliases on this pass at all. Either parse_comsub() does it + at parse time, in which case this string already has aliases expanded, + or command_substitute() does it in the child process executing the + command substitution and we want to defer it completely until then. The + old value will be restored by restore_parser_state(). */ + expand_aliases = 0; +#if defined (EXTENDED_GLOB) + local_extglob = extended_glob; +#endif + + token_to_read = DOLPAREN; /* let's trick the parser */ + + nc = parse_string (string, "command substitution", sflags, (COMMAND **)NULL, &ep); + + /* Should we save and restore the bison/yacc lookahead token (yychar) here? + Or only if it's not YYEMPTY? */ + if (current_token == shell_eof_token) + yyclearin; /* might want to clear lookahead token unconditionally */ + + reset_parser (); /* resets extended_glob too */ + /* reset_parser() clears shell_input_line and associated variables, including + parser_state, so we want to reset things, then restore what we need. */ + restore_input_line_state (&ls); + restore_parser_state (&ps); + +#if defined (EXTENDED_GLOB) + extended_glob = local_extglob; +#endif + token_to_read = 0; + + /* If parse_string returns < 0, we need to jump to top level with the + negative of the return value. We abandon the rest of this input line + first */ + if (nc < 0) + { + clear_shell_input_line (); /* XXX */ + if (bash_input.type != st_string) /* paranoia */ + parser_state &= ~(PST_CMDSUBST|PST_EOFTOKEN); + if ((flags & SX_NOLONGJMP) == 0) + jump_to_top_level (-nc); /* XXX */ + } + + /* Need to find how many characters parse_string() consumed, update + *indp, if flags != 0, copy the portion of the string parsed into RET + and return it. If flags & 1 (SX_NOALLOC) we can return NULL. */ + + /*(*/ + if (ep[-1] != ')') + { +#if 0 + 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 0 + if (base[*indp] != ')') + itrace("xparse_dolparen:%d: base[%d] != RPAREN (%d), base = `%s'", line_number, *indp, base[*indp], base); + if (*indp < orig_ind) + itrace("xparse_dolparen:%d: *indp (%d) < orig_ind (%d), orig_string = `%s'", line_number, *indp, orig_ind, ostring); +#endif + + if (base[*indp] != ')' && (flags & SX_NOLONGJMP) == 0) + { + /*(*/ + if ((flags & SX_NOERROR) == 0) + parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), ')'); + jump_to_top_level (DISCARD); + } + + 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; +} + +/* Recursively call the parser to parse the string from a $(...) command + substitution to a COMMAND *. This is called from command_substitute() and + has the same parser state constraints as xparse_dolparen(). */ +COMMAND * +parse_string_to_command (string, flags) + char *string; + int flags; +{ + sh_parser_state_t ps; + sh_input_line_state_t ls; + int nc, sflags; + size_t slen; + char *ret, *ep; + COMMAND *cmd; + + if (*string == 0) + return (COMMAND *)NULL; + + ep = string; + slen = STRLEN (string); + +/*itrace("parse_string_to_command: size = %d shell_input_line = `%s' string=`%s'", shell_input_line_size, shell_input_line, string);*/ + + sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE; + if (flags & SX_NOLONGJMP) + sflags |= SEVAL_NOLONGJMP; + + save_parser_state (&ps); + save_input_line_state (&ls); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + pushed_string_list = (STRING_SAVER *)NULL; +#endif + if (flags & SX_COMPLETE) + parser_state |= PST_NOERROR; + + parser_state |= PST_STRING; + expand_aliases = 0; + + cmd = 0; + nc = parse_string (string, "command substitution", sflags, &cmd, &ep); + + reset_parser (); + /* reset_parser() clears shell_input_line and associated variables, including + parser_state, so we want to reset things, then restore what we need. */ + restore_input_line_state (&ls); + restore_parser_state (&ps); + + /* If parse_string returns < 0, we need to jump to top level with the + negative of the return value. We abandon the rest of this input line + first */ + if (nc < 0) + { + clear_shell_input_line (); /* XXX */ + if ((flags & SX_NOLONGJMP) == 0) + jump_to_top_level (-nc); /* XXX */ + } + + /* Need to check how many characters parse_string() consumed, make sure it's + the entire string. */ + if (nc < slen) + { + dispose_command (cmd); + return (COMMAND *)NULL; + } + + return cmd; +} + +#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) + { + if (word_top < MAX_CASE_NEST) + word_top++; + arith_for_lineno = word_lineno[word_top] = 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_NOTILDE|W_NOPROCSUB; + 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); + pushed_string_list->flags = PSH_DPAREN; + 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, P_ARITH); + 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 (0); + } + 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, local_extglob; + 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[1] && 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 = cond_skip_newlines (); ? */ + 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 defined (EXTENDED_GLOB) + local_extglob = extended_glob; + if (parser_state & PST_EXTPAT) + extended_glob = 1; +#endif + tok = read_token (READ); +#if defined (EXTENDED_GLOB) + if (parser_state & PST_EXTPAT) + extended_glob = local_extglob; +#endif + 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; + + 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 use a buffer with room for the characters we add just + in case assignment() ends up doing something like parsing a command + substitution that will reallocate atoken. We don't want to write beyond + the end of an allocated buffer. */ +static int +token_is_assignment (t, i) + char *t; + int i; +{ + int r; + char *atoken; + + atoken = xmalloc (i + 3); + memcpy (atoken, t, i); + atoken[i] = '='; + atoken[i+1] = '\0'; + + r = assignment (atoken, (parser_state & PST_COMPASSIGN) != 0); + + free (atoken); + + /* XXX - check that r == i to avoid returning false positive for + t containing `=' before t[i]. */ + return (r > 0 && r == i); +} + +/* 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 == '\\') + { + if (parser_state & PST_NOEXPAND) + { + pass_next_character++; + quoted = 1; + goto got_character; + } + + peek_char = shell_getc (0); + + /* Backslash-newline is ignored in all cases except + when quoted with single quotes. */ + if MBTEST(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 MBTEST(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; + if (character != '`') + 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 + 3, + 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 MBTEST(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|P_DOLBRACE); + 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, P_ARITH); + if (ttok == &matched_pair_error) + return -1; /* Bail immediately. */ + RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 3, + 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. */ +#if defined (TRANSLATABLE_STRINGS) + else if MBTEST(character == '$' && (peek_char == '\'' || peek_char == '"')) +#else + else if MBTEST(character == '$' && peek_char == '\'') +#endif + { + 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 == '\'') + { + /* PST_NOEXPAND */ + 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; + } +#if defined (TRANSLATABLE_STRINGS) + else + { + /* PST_NOEXPAND */ + /* Try to locale-expand the converted string. */ + ttrans = locale_expand (ttok, 0, ttoklen - 1, first_line, &ttranslen); + free (ttok); + + /* Add the double quotes back (or single quotes if the user + has set that option). */ + if (singlequote_translations && + ((ttoklen - 1) != ttranslen || STREQN (ttok, ttrans, ttranslen) == 0)) + ttok = sh_single_quote (ttrans); + else + ttok = sh_mkdoublequoted (ttrans, ttranslen, 0); + + free (ttrans); + ttrans = ttok; + ttranslen = strlen (ttrans); + } +#endif /* TRANSLATABLE_STRINGS */ + + RESIZE_MALLOCED_BUFFER (token, token_index, ttranslen + 1, + 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 == '$') + { + RESIZE_MALLOCED_BUFFER (token, token_index, 3, + token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = '$'; + token[token_index++] = peek_char; + dollar_present = 1; + all_digit_token = 0; + 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 MBTEST(character == CTLESC || character == CTLNUL) + { + RESIZE_MALLOCED_BUFFER (token, token_index, 2, token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + token[token_index++] = CTLESC; + } + else +got_escaped_character: + RESIZE_MALLOCED_BUFFER (token, token_index, 1, token_buffer_size, + TOKEN_DEFAULT_GROW_SIZE); + + token[token_index++] = character; + + all_digit_token &= DIGIT (character); + dollar_present |= character == '$'; + + next_character: + if (character == '\n' && SHOULD_PROMPT ()) + prompt_again (0); + + /* We want to remove quoted newlines (that is, a \ 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: + + /* Calls to RESIZE_MALLOCED_BUFFER ensure there is sufficient room. */ + 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; + 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 = alloc_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 (parser_state & PST_COMPASSIGN) + the_word->flags |= W_NOGLOB; /* XXX - W_NOBRACE? */ + } + } + + 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; + + /* should we check that quoted == 0 as well? */ + if MBTEST(token[0] == '{' && token[token_index-1] == '}' && + (character == '<' || character == '>')) + { + /* can use token; already copied to the_word */ + token[token_index-1] = '\0'; +#if defined (ARRAY_VARS) + if (legal_identifier (token+1) || valid_array_reference (token+1, 0)) +#else + if (legal_identifier (token+1)) +#endif + { + strcpy (the_word->word, token+1); +/* itrace("read_token_word: returning REDIR_WORD for %s", the_word->word); */ + yylval.word = the_word; /* accommodate recursive call */ + return (REDIR_WORD); + } + else + /* valid_array_reference can call the parser recursively; need to + make sure that yylval.word doesn't change if we are going to + return WORD or ASSIGNMENT_WORD */ + yylval.word = the_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; + expecting_in_token++; + 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 ARITH_CMD: + case BANG: + case BAR_AND: + case COND_END: + 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 TIMEIGN: + case COPROC: + case UNTIL: + case WHILE: + case 0: + case DOLPAREN: + return 1; + default: +#if defined (COPROCESS_SUPPORT) + if (last_read_token == WORD && token_before_that == COPROC) + return 1; +#endif + if (last_read_token == WORD && token_before_that == FUNCTION) + return 1; + 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; +} + +/* An interface to let the rest of the shell (primarily the completion + system) know what the parser is expecting. */ +int +parser_in_command_position () +{ + return (command_token_position (last_read_token)); +} + +#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. LINE is the line we're about to add; it helps + make some more intelligent decisions in certain cases. */ +char * +history_delimiting_chars (line) + const char *line; +{ + static int last_was_heredoc = 0; /* was the last entry the start of a here document? */ + register int i; + + if ((parser_state & PST_HEREDOC) == 0) + last_was_heredoc = 0; + + 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). We also keep LAST_WAS_HEREDOC as a private sentinel + variable to note when we think we added the first line of a here doc + (the one with a "<<" somewhere in it) */ + if (parser_state & PST_HEREDOC) + { + if (last_was_heredoc) + { + last_was_heredoc = 0; + return "\n"; + } + return (here_doc_first_line ? "\n" : ""); + } + + if (parser_state & PST_COMPASSIGN) + return (" "); + + /* 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 `()' */ + + /* If we're not in a here document, but we think we're about to parse one, + and we would otherwise return a `;', return a newline to delimit the + line with the here-doc delimiter */ + else if ((parser_state & PST_HEREDOC) == 0 && current_command_line_count > 1 && last_read_token == '\n' && strstr (line, "<<")) + { + last_was_heredoc = 1; + return "\n"; + } + else if ((parser_state & PST_HEREDOC) == 0 && current_command_line_count > 1 && need_here_doc > 0) + return "\n"; + 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 (" "); + } + + /* Assume that by this point we are reading lines in a multi-line command. + If we have multiple consecutive blank lines we want to return only one + semicolon. */ + if (line_isblank (line)) + return (current_command_line_count > 1 && last_read_token == '\n' && token_before_that != '\n') ? "; " : ""; + + return ("; "); +} +#endif /* HISTORY */ + +/* Issue a prompt, or prepare to issue a prompt when the next character + is read. */ +static void +prompt_again (force) + int force; +{ + char *temp_prompt; + + if (interactive == 0 || expanding_alias ()) /* XXX */ + return; + + ps1_prompt = get_string_value ("PS1"); + ps2_prompt = get_string_value ("PS2"); + + ps0_prompt = get_string_value ("PS0"); + + 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); +} + +#if defined (HISTORY) + /* The history library increments the history offset as soon as it stores + the first line of a potentially multi-line command, so we compensate + here by returning one fewer when appropriate. */ +static int +prompt_history_number (pmt) + char *pmt; +{ + int ret; + + ret = history_number (); + if (ret == 1) + return ret; + + if (pmt == ps1_prompt) /* are we expanding $PS1? */ + return ret; + else if (pmt == ps2_prompt && command_oriented_history == 0) + return ret; /* not command oriented history */ + else if (pmt == ps2_prompt && command_oriented_history && current_command_first_line_saved) + return ret - 1; + else + return ret - 1; /* PS0, PS4, ${var@P}, PS2 other cases */ +} +#endif + +/* 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, *orig_string; + struct dstack save_dstack; + int last_exit_value, last_comsub_pid; +#if defined (PROMPT_STRING_DECODE) + size_t result_size; + size_t result_index; + int c, n, i; + char *temp, *t_host, 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; + orig_string = string; + + 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 (prompt_history_number (orig_string)); +#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); +#if defined (HAVE_TZSET) + sv_tz ("TZ"); /* XXX -- just make sure */ +#endif + 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, 0); + 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); + /* Try to quote anything the user can set in the file system */ + if (promptvars || posixly_correct) + { + char *t; + t = sh_strvis (temp); + temp = sh_backslash_quote_for_double_quotes (t, 0); + free (t); + } + else + temp = sh_strvis (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) + memmove (t_string, t + 1, strlen (t)); /* strlen(t) to copy NULL */ + } + } +#undef ROOT_PATH +#undef DOUBLE_SLASH_ROOT + else + { + /* polite_directory_format is guaranteed to return a string + no longer than PATH_MAX - 1 characters. */ + temp = polite_directory_format (t_string); + if (temp != t_string) + strcpy (t_string, temp); + } + + 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. */ + { + char *t; + t = sh_strvis (t_string); + temp = sh_backslash_quote_for_double_quotes (t, 0); + free (t); + } + else + temp = sh_strvis (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': + t_host = savestring (current_host_name); + if (c == 'h' && (t = (char *)strchr (t_host, '.'))) + *t = '\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 (t_host, 0); + else + temp = savestring (t_host); + free (t_host); + goto add_string; + + case '#': + n = current_command_number; + /* If we have already incremented current_command_number (PS4, + ${var@P}), compensate */ + if (orig_string != ps0_prompt && orig_string != ps1_prompt && orig_string != ps2_prompt) + n--; + temp = itos (n); + goto add_string; + + case '!': +#if !defined (HISTORY) + temp = savestring ("1"); +#else /* HISTORY */ + temp = itos (prompt_history_number (orig_string)); +#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); + /* dequote_string should take care of removing this if we are not + performing the rest of the word expansions. */ + if (c == CTLESC || c == CTLNUL) + result[result_index++] = CTLESC; + 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; +{ + if ((parser_state & PST_NOERROR) == 0) + 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, *p; + + if (message) + { + parser_error (line_number, "%s", message); + if (interactive && EOF_Reached) + EOF_Reached = 0; + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); + 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))) + { + if (ansic_shouldquote (msg)) + { + p = ansic_quote (msg, 0, NULL); + free (msg); + msg = p; + } + parser_error (line_number, _("syntax error near unexpected token `%s'"), msg); + free (msg); + + if (interactive == 0) + print_offending_line (); + + last_command_exit_value = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); + 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 + { + if (EOF_Reached && shell_eof_token && current_token != shell_eof_token) + parser_error (line_number, _("unexpected EOF while looking for matching `%c'"), shell_eof_token); + 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 = (executing_builtin && parse_and_execute_level) ? EX_BADSYNTAX : EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); +} + +/* ??? 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 (0); + return; + } + } + + /* In this case EOF should exit the shell. Do it now. */ + reset_parser (); + + last_shell_builtin = this_shell_builtin; + this_shell_builtin = exit_builtin; + 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; + int orig_parser_state; + sh_parser_state_t ps; + int ea; + + orig_line_number = line_number; + save_parser_state (&ps); + +#if defined (HISTORY) + bash_history_disable (); +#endif + + push_stream (1); + if (ea = expanding_alias ()) + parser_save_alias (); + + /* WORD to avoid parsing reserved words as themselves and just parse them as + WORDs. */ + last_read_token = WORD; + + 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) + { + orig_parser_state = parser_state; /* XXX - not needed? */ + /* State flags we don't want to persist into compound assignments. */ + parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */ + /* State flags we want to set for this run through the tokenizer. */ + parser_state |= PST_COMPASSIGN|PST_REPARSE|PST_STRING; + } + + 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 (ea) + parser_restore_alias (); + + restore_parser_state (&ps); + + if (flags & 1) + parser_state = orig_parser_state; /* XXX - not needed? */ + + if (wl == &parse_string_error) + { + set_exit_status (EXECUTION_FAILURE); + current_token = '\n'; /* XXX */ + if (interactive_shell == 0 && posixly_correct) + jump_to_top_level (FORCE_EOF); + else + { + if (executing && parse_and_execute_level == 0) + top_level_cleanup (); + 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, assignok; + sh_parser_state_t ps; + char *ret; + + orig_line_number = line_number; + save_parser_state (&ps); + + /* WORD to avoid parsing reserved words as themselves and just parse them as + WORDs. Plus it means we won't be in a command position and so alias + expansion won't happen. */ + last_read_token = WORD; + + token = (char *)NULL; + token_buffer_size = 0; + wl = (WORD_LIST *)NULL; /* ( */ + + assignok = parser_state&PST_ASSIGNOK; /* XXX */ + + /* State flags we don't want to persist into compound assignments. */ + parser_state &= ~(PST_NOEXPAND|PST_CONDCMD|PST_CONDEXPR|PST_REGEXP|PST_EXTPAT); + /* State flags we want to set for this run through the tokenizer. */ + parser_state |= PST_COMPASSIGN; + + esacs_needed_count = expecting_in_token = 0; + + while ((tok = read_token (READ)) != ')') + { + if (tok == '\n') /* Allow newlines in compound assignments */ + { + if (SHOULD_PROMPT ()) + prompt_again (0); + 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); + } + + restore_parser_state (&ps); + + if (wl == &parse_string_error) + { + set_exit_status (EXECUTION_FAILURE); + last_read_token = current_token = '\n'; /* XXX */ + if (interactive_shell == 0 && posixly_correct) + jump_to_top_level (FORCE_EOF); + else + { + if (executing && parse_and_execute_level == 0) + top_level_cleanup (); + jump_to_top_level (DISCARD); + } + } + + 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 (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->eol_lookahead = eol_ungetc_lookahead; + + ps->prompt_string_pointer = prompt_string_pointer; + + 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) + ps->pipestatus = save_pipestatus_array (); +#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; + ps->need_here_doc = need_here_doc; + ps->here_doc_first_line = here_doc_first_line; + + ps->esacs_needed = esacs_needed_count; + ps->expecting_in = expecting_in_token; + + if (need_here_doc == 0) + ps->redir_stack[0] = 0; + else + memcpy (ps->redir_stack, redir_stack, sizeof (redir_stack[0]) * HEREDOC_MAX); + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + ps->pushed_strings = pushed_string_list; +#endif + + ps->eof_token = shell_eof_token; + ps->token = token; + ps->token_buffer_size = token_buffer_size; + /* Force reallocation on next call to read_token_word */ + token = 0; + token_buffer_size = 0; + + return (ps); +} + +void +restore_parser_state (ps) + sh_parser_state_t *ps; +{ + int i; + + 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; + eol_ungetc_lookahead = ps->eol_lookahead; + + prompt_string_pointer = ps->prompt_string_pointer; + + 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) + restore_pipestatus_array (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; + need_here_doc = ps->need_here_doc; + here_doc_first_line = ps->here_doc_first_line; + + esacs_needed_count = ps->esacs_needed; + expecting_in_token = ps->expecting_in; + +#if 0 + for (i = 0; i < HEREDOC_MAX; i++) + redir_stack[i] = ps->redir_stack[i]; +#else + if (need_here_doc == 0) + redir_stack[0] = 0; + else + memcpy (redir_stack, ps->redir_stack, sizeof (redir_stack[0]) * HEREDOC_MAX); +#endif + +#if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + pushed_string_list = (STRING_SAVER *)ps->pushed_strings; +#endif + + FREE (token); + token = ps->token; + token_buffer_size = ps->token_buffer_size; + shell_eof_token = ps->eof_token; +} + +sh_input_line_state_t * +save_input_line_state (ls) + sh_input_line_state_t *ls; +{ + if (ls == 0) + ls = (sh_input_line_state_t *)xmalloc (sizeof (sh_input_line_state_t)); + if (ls == 0) + return ((sh_input_line_state_t *)NULL); + + ls->input_line = shell_input_line; + ls->input_line_size = shell_input_line_size; + ls->input_line_len = shell_input_line_len; + ls->input_line_index = shell_input_line_index; + +#if defined (HANDLE_MULTIBYTE) + ls->input_property = shell_input_line_property; + ls->input_propsize = shell_input_line_propsize; +#endif + + /* force reallocation */ + shell_input_line = 0; + shell_input_line_size = shell_input_line_len = shell_input_line_index = 0; + +#if defined (HANDLE_MULTIBYTE) + shell_input_line_property = 0; + shell_input_line_propsize = 0; +#endif + + return ls; +} + +void +restore_input_line_state (ls) + sh_input_line_state_t *ls; +{ + FREE (shell_input_line); + shell_input_line = ls->input_line; + shell_input_line_size = ls->input_line_size; + shell_input_line_len = ls->input_line_len; + shell_input_line_index = ls->input_line_index; + +#if defined (HANDLE_MULTIBYTE) + FREE (shell_input_line_property); + shell_input_line_property = ls->input_property; + shell_input_line_propsize = ls->input_propsize; +#endif + +#if 0 + set_line_mbstate (); +#endif +} + +/************************************************ + * * + * MULTIBYTE CHARACTER HANDLING * + * * + ************************************************/ + +#if defined (HANDLE_MULTIBYTE) + +/* We don't let the property buffer get larger than this unless the line is */ +#define MAX_PROPSIZE 32768 + +static void +set_line_mbstate () +{ + int c; + size_t i, previ, len; + mbstate_t mbs, prevs; + size_t mbclen; + int ilen; + + if (shell_input_line == NULL) + return; + len = STRLEN (shell_input_line); /* XXX - shell_input_line_len ? */ + if (len == 0) + return; + if (shell_input_line_propsize >= MAX_PROPSIZE && len < MAX_PROPSIZE>>1) + { + free (shell_input_line_property); + shell_input_line_property = 0; + shell_input_line_propsize = 0; + } + if (len+1 > shell_input_line_propsize) + { + shell_input_line_propsize = len + 1; + shell_input_line_property = (char *)xrealloc (shell_input_line_property, shell_input_line_propsize); + } + + if (locale_mb_cur_max == 1) + { + memset (shell_input_line_property, 1, len); + return; + } + + /* XXX - use whether or not we are in a UTF-8 locale to avoid calls to + mbrlen */ + if (locale_utf8locale == 0) + memset (&prevs, '\0', sizeof (mbstate_t)); + + for (i = previ = 0; i < len; i++) + { + if (locale_utf8locale == 0) + mbs = prevs; + + c = shell_input_line[i]; + if (c == EOF) + { + size_t j; + for (j = i; j < len; j++) + shell_input_line_property[j] = 1; + break; + } + + if (locale_utf8locale) + { + if ((unsigned char)shell_input_line[previ] < 128) /* i != previ */ + mbclen = 1; + else + { + ilen = utf8_mblen (shell_input_line + previ, i - previ + 1); + mbclen = (ilen == -1) ? (size_t)-1 + : ((ilen == -2) ? (size_t)-2 : (size_t)ilen); + } + } + else + 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; + if (locale_utf8locale == 0) + prevs = mbs; + } + else + { + size_t 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 index 13e8550..e69de29 100644 --- a/parser-built +++ b/parser-built @@ -1,162 +0,0 @@ -/* 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 index 9ff6576..cae3a35 100644 --- a/parser.h +++ b/parser.h @@ -1,7 +1,7 @@ /* parser.h -- Everything you wanted to know about the parser, but were afraid to ask. */ -/* Copyright (C) 1995, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1995-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,13 +30,13 @@ #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_DBLPAREN 0x000010 /* double-paren parsing - unused */ #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_ARITHFOR 0x000400 /* parsing an arithmetic for command - unused */ #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 */ @@ -45,8 +45,12 @@ #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 */ - +#define PST_REDIRLIST 0x080000 /* parsing a list of redirections preceding a simple command name */ +#define PST_COMMENT 0x100000 /* parsing a shell comment; used by aliases */ +#define PST_ENDALIAS 0x200000 /* just finished expanding and consuming an alias */ +#define PST_NOEXPAND 0x400000 /* don't expand anything in read_token_word; for command substitution */ +#define PST_NOERROR 0x800000 /* don't print error messages in yyerror */ +#define PST_STRING 0x1000000 /* parsing a string to a command or word list */ /* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */ struct dstack { @@ -61,4 +65,39 @@ struct dstack { int delimiter_space; }; +/* States we can be in while scanning a ${...} expansion. Shared between + parse.y and subst.c */ +#define DOLBRACE_PARAM 0x01 +#define DOLBRACE_OP 0x02 +#define DOLBRACE_WORD 0x04 + +#define DOLBRACE_QUOTE 0x40 /* single quote is special in double quotes */ +#define DOLBRACE_QUOTE2 0x80 /* single quote is semi-special in double quotes */ + +/* variable declarations from parse.y */ +extern struct dstack dstack; + +extern char *primary_prompt; +extern char *secondary_prompt; + +extern char *current_prompt_string; + +extern char *ps1_prompt; +extern char *ps2_prompt; +extern char *ps0_prompt; + +extern int expand_aliases; +extern int current_command_line_count; +extern int saved_command_line_count; +extern int shell_eof_token; +extern int current_token; +extern int parser_state; +extern int need_here_doc; + +extern int ignoreeof; +extern int eof_encountered; +extern int eof_encountered_limit; + +extern int line_number, line_number_base; + #endif /* _PARSER_H_ */ diff --git a/patchlevel.h b/patchlevel.h index b7bba6a..d8817d1 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1,6 +1,6 @@ /* patchlevel.h -- current bash patch level */ -/* Copyright (C) 2001-2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 48 +#define PATCHLEVEL 37 #endif /* _PATCHLEVEL_H_ */ diff --git a/pathexp.c b/pathexp.c index 851ab8f..379128e 100644 --- a/pathexp.c +++ b/pathexp.c @@ -1,6 +1,6 @@ /* pathexp.c -- The shell interface to the globbing library. */ -/* Copyright (C) 1995-2009 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,15 +38,11 @@ #include -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 -typedef int posix_glob_errfunc_t __P((const char *, int)); -#else -# include -#endif +static int glob_name_is_acceptable PARAMS((const char *)); +static void ignore_globbed_names PARAMS((char **, sh_ignore_func_t *)); +static char *split_ignorespec PARAMS((char *, int *)); + +#include /* Control whether * matches .files in globbing. */ int glob_dot_filenames; @@ -57,18 +53,21 @@ 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. */ +/* Return nonzero if STRING has any unquoted special globbing chars in it. + This is supposed to be called when pathname expansion is performed, so + it implements the rules in Posix 2.13.3, specifically that an unquoted + slash cannot appear in a bracket expression. */ int unquoted_glob_pattern_p (string) register char *string; { register int c; char *send; - int open; + int open, bsquote; DECLARE_MBSTATE; - open = 0; + open = bsquote = 0; send = string + strlen (string); while (c = *string++) @@ -84,10 +83,14 @@ unquoted_glob_pattern_p (string) continue; case ']': - if (open) + if (open) /* XXX - if --open == 0? */ return (1); continue; + case '/': + if (open) + open = 0; + case '+': case '@': case '!': @@ -95,8 +98,25 @@ unquoted_glob_pattern_p (string) return (1); continue; - case CTLESC: + /* A pattern can't end with a backslash, but a backslash in the pattern + can be special to the matching engine, so we note it in case we + need it later. */ case '\\': + if (*string != '\0' && *string != '/') + { + bsquote = 1; + string++; + continue; + } + else if (open && *string == '/') + { + string++; /* quoted slashes in bracket expressions are ok */ + continue; + } + else if (*string == 0) + return (0); + + case CTLESC: if (*string++ == '\0') return (0); } @@ -111,7 +131,12 @@ unquoted_glob_pattern_p (string) ADVANCE_CHAR_P (string, send - string); #endif } + +#if 0 + return (bsquote ? 2 : 0); +#else return (0); +#endif } /* Return 1 if C is a character that is `special' in a POSIX ERE and needs to @@ -141,6 +166,7 @@ ere_char (c) return (0); } +/* This is only used to determine whether to backslash-quote a character. */ int glob_char_p (s) const char *s; @@ -156,7 +182,7 @@ glob_char_p (s) case '+': case '@': case '!': - if (s[1] == '(') /*(*/ + if (s[1] == '(') /*(*/ return 1; break; } @@ -171,8 +197,11 @@ glob_char_p (s) 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. */ + QGLOB_CVTNULL. If flags includes QGLOB_CTLESC, we need to remove CTLESC + quoting CTLESC or CTLNUL (as if dequote_string were called). If flags + includes QGLOB_FILENAME, appropriate quoting to match a filename should be + performed. QGLOB_REGEXP means we're quoting for a Posix ERE (for + [[ string =~ pat ]]) and that requires some special handling. */ char * quote_string_for_globbing (pathname, qflags) const char *pathname; @@ -180,8 +209,10 @@ quote_string_for_globbing (pathname, qflags) { char *temp; register int i, j; + int cclass, collsym, equiv, c, last_was_backslash; + int savei, savej; - temp = (char *)xmalloc (strlen (pathname) + 1); + temp = (char *)xmalloc (2 * strlen (pathname) + 1); if ((qflags & QGLOB_CVTNULL) && QUOTED_NULL (pathname)) { @@ -189,28 +220,157 @@ quote_string_for_globbing (pathname, qflags) return temp; } + cclass = collsym = equiv = last_was_backslash = 0; for (i = j = 0; pathname[i]; i++) { - if (pathname[i] == CTLESC) + /* Fix for CTLESC at the end of the string? */ + if (pathname[i] == CTLESC && pathname[i+1] == '\0') { + temp[j++] = pathname[i++]; + break; + } + /* If we are parsing regexp, turn CTLESC CTLESC into CTLESC. It's not an + ERE special character, so we should just be able to pass it through. */ + else if ((qflags & (QGLOB_REGEXP|QGLOB_CTLESC)) && pathname[i] == CTLESC && (pathname[i+1] == CTLESC || pathname[i+1] == CTLNUL)) + { + i++; + temp[j++] = pathname[i]; + continue; + } + else if (pathname[i] == CTLESC) + { +convert_to_backslash: if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') continue; - if ((qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) + /* What to do if preceding char is backslash? */ + if (pathname[i+1] != CTLESC && (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) continue; temp[j++] = '\\'; i++; if (pathname[i] == '\0') break; } - else if (pathname[i] == '\\') + else if ((qflags & QGLOB_REGEXP) && (i == 0 || pathname[i-1] != CTLESC) && pathname[i] == '[') /*]*/ + { + temp[j++] = pathname[i++]; /* open bracket */ + savej = j; + savei = i; + c = pathname[i++]; /* c == char after open bracket */ + if (c == '^') /* ignore pattern negation */ + { + temp[j++] = c; + c = pathname[i++]; + } + if (c == ']') /* ignore right bracket if first char */ + { + temp[j++] = c; + c = pathname[i++]; + } + do + { + if (c == 0) + goto endpat; + else if (c == CTLESC) + { + /* skip c, check for EOS, let assignment at end of loop */ + /* pathname[i] == backslash-escaped character */ + if (pathname[i] == 0) + goto endpat; + temp[j++] = pathname[i++]; + } + else if (c == '[' && pathname[i] == ':') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + cclass = 1; + } + else if (cclass && c == ':' && pathname[i] == ']') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + cclass = 0; + } + else if (c == '[' && pathname[i] == '=') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + if (pathname[i] == ']') + temp[j++] = pathname[i++]; /* right brack can be in equiv */ + equiv = 1; + } + else if (equiv && c == '=' && pathname[i] == ']') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + equiv = 0; + } + else if (c == '[' && pathname[i] == '.') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + if (pathname[i] == ']') + temp[j++] = pathname[i++]; /* right brack can be in collsym */ + collsym = 1; + } + else if (collsym && c == '.' && pathname[i] == ']') + { + temp[j++] = c; + temp[j++] = pathname[i++]; + collsym = 0; + } + else + temp[j++] = c; + } + while (((c = pathname[i++]) != ']') && c != 0); + + /* If we don't find the closing bracket before we hit the end of + the string, rescan string without treating it as a bracket + expression (has implications for backslash and special ERE + chars) */ + if (c == 0) + { + i = savei - 1; /* -1 for autoincrement above */ + j = savej; + continue; + } + + temp[j++] = c; /* closing right bracket */ + i--; /* increment will happen above in loop */ + continue; /* skip double assignment below */ + } + else if (pathname[i] == '\\' && (qflags & QGLOB_REGEXP) == 0) { + /* XXX - if not quoting regexp, use backslash as quote char. Should + We just pass it through without treating it as special? That is + what ksh93 seems to do. */ + + /* If we want to pass through backslash unaltered, comment out these + lines. */ temp[j++] = '\\'; + i++; if (pathname[i] == '\0') break; + /* If we are turning CTLESC CTLESC into CTLESC, we need to do that + even when the first CTLESC is preceded by a backslash. */ + if ((qflags & QGLOB_CTLESC) && pathname[i] == CTLESC && (pathname[i+1] == CTLESC || pathname[i+1] == CTLNUL)) + i++; /* skip over the CTLESC */ + else if ((qflags & QGLOB_CTLESC) && pathname[i] == CTLESC) + /* A little more general: if there is an unquoted backslash in the + pattern and we are handling quoted characters in the pattern, + convert the CTLESC to backslash and add the next character on + the theory that the backslash will quote the next character + but it would be inconsistent not to replace the CTLESC with + another backslash here. We can't tell at this point whether the + CTLESC comes from a backslash or other form of quoting in the + original pattern. */ + goto convert_to_backslash; } + else if (pathname[i] == '\\' && (qflags & QGLOB_REGEXP)) + last_was_backslash = 1; temp[j++] = pathname[i]; } +endpat: temp[j] = '\0'; return (temp); @@ -218,10 +378,11 @@ quote_string_for_globbing (pathname, qflags) char * quote_globbing_chars (string) - char *string; + const char *string; { size_t slen; - char *temp, *s, *t, *send; + char *temp, *t; + const char *s, *send; DECLARE_MBSTATE; slen = strlen (string); @@ -234,7 +395,7 @@ quote_globbing_chars (string) *t++ = '\\'; /* Copy a single (possibly multibyte) character from s to t, - incrementing both. */ + incrementing both. */ COPY_CHAR_P (t, s, send); } *t = '\0'; @@ -243,63 +404,18 @@ quote_globbing_chars (string) /* Call the glob library to do globbing on PATHNAME. */ char ** -shell_glob_filename (pathname) +shell_glob_filename (pathname, qflags) const char *pathname; + int qflags; { -#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; + int gflags, quoted_pattern; noglob_dot_filenames = glob_dot_filenames == 0; - temp = quote_string_for_globbing (pathname, QGLOB_FILENAME); - results = glob_filename (temp, glob_star ? GX_GLOBSTAR : 0); + temp = quote_string_for_globbing (pathname, QGLOB_FILENAME|qflags); + gflags = glob_star ? GX_GLOBSTAR : 0; + results = glob_filename (temp, gflags); free (temp); if (results && ((GLOB_FAILED (results)) == 0)) @@ -307,7 +423,7 @@ shell_glob_filename (pathname) if (should_ignore_glob_matches ()) ignore_glob_matches (results); if (results && results[0]) - strvec_sort (results); + strvec_sort (results, 1); /* posix sort */ else { FREE (results); @@ -316,7 +432,6 @@ shell_glob_filename (pathname) } return (results); -#endif /* !USE_POSIX_GLOB_LIBRARY */ } /* Stuff for GLOBIGNORE. */ @@ -360,13 +475,21 @@ glob_name_is_acceptable (name) const char *name; { struct ign *p; + char *n; int flags; - /* . and .. are never matched */ - if (name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0'))) + /* . and .. are never matched. We extend this to the terminal component of a + pathname. */ + n = strrchr (name, '/'); + if (n == 0 || n[1] == 0) + n = (char *)name; + else + n++; + + if (n[0] == '.' && (n[1] == '\0' || (n[1] == '.' && n[2] == '\0'))) return (0); - flags = FNM_PATHNAME | FNMATCH_EXTFLAG; + flags = FNM_PATHNAME | FNMATCH_EXTFLAG | FNMATCH_NOCASEGLOB; for (p = globignore.ignores; p->val; p++) { if (strmatch (p->val, (char *)name, flags) != FNM_NOMATCH) @@ -428,6 +551,30 @@ ignore_glob_matches (names) ignore_globbed_names (names, glob_name_is_acceptable); } +static char * +split_ignorespec (s, ip) + char *s; + int *ip; +{ + char *t; + int n, i; + + if (s == 0) + return 0; + + i = *ip; + if (s[i] == 0) + return 0; + + n = skip_to_delim (s, i, ":", SD_NOJMP|SD_EXTGLOB|SD_GLOB); + t = substring (s, i, n); + + if (s[n] == ':') + n++; + *ip = n; + return t; +} + void setup_ignore_patterns (ivp) struct ignorevar *ivp; @@ -467,7 +614,11 @@ setup_ignore_patterns (ivp) numitems = maxitems = ptr = 0; +#if 0 while (colon_bit = extract_colon_unit (this_ignoreval, &ptr)) +#else + while (colon_bit = split_ignorespec (this_ignoreval, &ptr)) +#endif { if (numitems + 1 >= maxitems) { diff --git a/pathexp.h b/pathexp.h index 20d0baf..b96f92a 100644 --- a/pathexp.h +++ b/pathexp.h @@ -1,6 +1,6 @@ /* pathexp.h -- The shell interface to the globbing library. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,18 +21,17 @@ #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 +#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 */ +#define QGLOB_CTLESC 0x08 /* turn CTLESC CTLESC into CTLESC for BREs */ +#define QGLOB_DEQUOTE 0x10 /* like dequote_string but quote glob chars */ #if defined (EXTENDED_GLOB) /* Flags to OR with other flag args to strmatch() to enabled the extended @@ -43,13 +42,14 @@ extern char *glob_error_return; #endif /* !EXTENDED_GLOB */ #define FNMATCH_IGNCASE (match_ignore_case ? FNM_CASEFOLD : 0) +#define FNMATCH_NOCASEGLOB (glob_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 *)); +extern int unquoted_glob_pattern_p PARAMS((char *)); /* PATHNAME can contain characters prefixed by CTLESC; this indicates that the character is to be quoted. We quote it here in the style @@ -61,16 +61,18 @@ extern int unquoted_glob_pattern_p __P((char *)); 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 char *quote_string_for_globbing PARAMS((const char *, int)); -extern int glob_char_p __P((const char *)); -extern char *quote_globbing_chars __P((char *)); +extern int glob_char_p PARAMS((const char *)); +extern char *quote_globbing_chars PARAMS((const char *)); -/* Call the glob library to do globbing on PATHNAME. */ -extern char **shell_glob_filename __P((const char *)); +/* Call the glob library to do globbing on PATHNAME. FLAGS is additional + flags to pass to QUOTE_STRING_FOR_GLOBBING, mostly having to do with + whether or not we've already performed quote removal. */ +extern char **shell_glob_filename PARAMS((const char *, int)); /* Filename completion ignore. Used to implement the "fignore" facility of - tcsh and GLOBIGNORE (like ksh-93 FIGNORE). + tcsh, GLOBIGNORE (like ksh-93 FIGNORE), and EXECIGNORE. 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 @@ -83,20 +85,20 @@ struct ign { int len, flags; }; -typedef int sh_iv_item_func_t __P((struct ign *)); +typedef int sh_iv_item_func_t PARAMS((struct ign *)); struct ignorevar { - char *varname; /* FIGNORE or GLOBIGNORE */ + char *varname; /* FIGNORE, GLOBIGNORE, or EXECIGNORE */ 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_ignore_patterns PARAMS((struct ignorevar *)); -extern void setup_glob_ignore __P((char *)); -extern int should_ignore_glob_matches __P((void)); -extern void ignore_glob_matches __P((char **)); +extern void setup_glob_ignore PARAMS((char *)); +extern int should_ignore_glob_matches PARAMS((void)); +extern void ignore_glob_matches PARAMS((char **)); #endif diff --git a/pcomplete.c b/pcomplete.c index 49f2eb5..bd48ccd 100644 --- a/pcomplete.c +++ b/pcomplete.c @@ -1,6 +1,6 @@ /* pcomplete.c - functions to generate lists of matches for programmable completion. */ -/* Copyright (C) 1999-2009 Free Software Foundation, Inc. +/* Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -37,6 +37,8 @@ # include #endif +#include "posixtime.h" + #include #include "bashansi.h" #include "bashintl.h" @@ -56,8 +58,11 @@ # include "trap.h" #endif +#include "shmbutil.h" + #include "builtins.h" #include "builtins/common.h" +#include "builtins/builtext.h" #include #include @@ -66,8 +71,6 @@ #include #include -#define PCOMP_RETRYFAIL 256 - #ifdef STRDUP # undef STRDUP #endif @@ -76,10 +79,9 @@ typedef SHELL_VAR **SVFUNC (); #ifndef HAVE_STRPBRK -extern char *strpbrk __P((char *, char *)); +extern char *strpbrk PARAMS((char *, char *)); #endif -extern int array_needs_making; extern STRING_INT_ALIST word_token_alist[]; extern char *signal_names[]; @@ -89,55 +91,59 @@ static void debug_printf (const char *, ...) __attribute__((__format__ (printf, #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 *, +static int it_init_joblist PARAMS((ITEMLIST *, int)); + +static int it_init_aliases PARAMS((ITEMLIST *)); +static int it_init_arrayvars PARAMS((ITEMLIST *)); +static int it_init_bindings PARAMS((ITEMLIST *)); +static int it_init_builtins PARAMS((ITEMLIST *)); +static int it_init_disabled PARAMS((ITEMLIST *)); +static int it_init_enabled PARAMS((ITEMLIST *)); +static int it_init_exported PARAMS((ITEMLIST *)); +static int it_init_functions PARAMS((ITEMLIST *)); +static int it_init_helptopics PARAMS((ITEMLIST *)); +static int it_init_hostnames PARAMS((ITEMLIST *)); +static int it_init_jobs PARAMS((ITEMLIST *)); +static int it_init_running PARAMS((ITEMLIST *)); +static int it_init_stopped PARAMS((ITEMLIST *)); +static int it_init_keywords PARAMS((ITEMLIST *)); +static int it_init_signals PARAMS((ITEMLIST *)); +static int it_init_variables PARAMS((ITEMLIST *)); +static int it_init_setopts PARAMS((ITEMLIST *)); +static int it_init_shopts PARAMS((ITEMLIST *)); + +static int shouldexp_filterpat PARAMS((char *)); +static char *preproc_filterpat PARAMS((char *, const char *)); + +static void init_itemlist_from_varlist PARAMS((ITEMLIST *, SVFUNC *)); + +static STRINGLIST *gen_matches_from_itemlist PARAMS((ITEMLIST *, const char *)); +static STRINGLIST *gen_action_completions PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_globpat_matches PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_wordlist_matches PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_shell_function_matches PARAMS((COMPSPEC *, const char *, + 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_command_matches PARAMS((COMPSPEC *, const char *, + const char *, + char *, int, WORD_LIST *, + int, int)); -static STRINGLIST *gen_progcomp_completions __P((const char *, const char *, +static STRINGLIST *gen_progcomp_completions PARAMS((const char *, const char *, const char *, int, int, int *, int *, COMPSPEC **)); -static char *pcomp_filename_completion_function __P((const char *, int)); +static char *pcomp_filename_completion_function PARAMS((const char *, int)); #if defined (ARRAY_VARS) -static SHELL_VAR *bind_comp_words __P((WORD_LIST *)); +static SHELL_VAR *bind_comp_words PARAMS((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 *)); +static void bind_compfunc_variables PARAMS((char *, int, WORD_LIST *, int, int)); +static void unbind_compfunc_variables PARAMS((int)); +static WORD_LIST *build_arg_list PARAMS((char *, const char *, const char *, WORD_LIST *, int)); +static WORD_LIST *command_line_to_word_list PARAMS((char *, int, int, int *, int *)); #ifdef DEBUG static int progcomp_debug = 0; @@ -145,6 +151,10 @@ static int progcomp_debug = 0; int prog_completion_enabled = 1; +#ifdef ALIAS +int progcomp_alias = 0; /* unavailable to user code for now */ +#endif + /* 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 }; @@ -157,6 +167,7 @@ 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_helptopics = { 0, it_init_helptopics, (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 }; @@ -172,6 +183,10 @@ ITEMLIST it_variables = { LIST_DYNAMIC, it_init_variables, (STRINGLIST *)0 }; COMPSPEC *pcomp_curcs; const char *pcomp_curcmd; +const char *pcomp_curtxt; + +char *pcomp_line; +int pcomp_ind; #ifdef DEBUG /* Debugging code */ @@ -261,7 +276,7 @@ shouldexp_filterpat (s) static char * preproc_filterpat (pat, text) char *pat; - char *text; + const char *text; { char *ret; @@ -277,7 +292,8 @@ preproc_filterpat (pat, text) STRINGLIST * filter_stringlist (sl, filterpat, text) STRINGLIST *sl; - char *filterpat, *text; + char *filterpat; + const char *text; { int i, m, not; STRINGLIST *ret; @@ -288,13 +304,17 @@ filter_stringlist (sl, filterpat, text) npat = shouldexp_filterpat (filterpat) ? preproc_filterpat (filterpat, text) : filterpat; +#if defined (EXTENDED_GLOB) + not = (npat[0] == '!' && (extended_glob == 0 || npat[1] != '(')); /*)*/ +#else not = (npat[0] == '!'); +#endif 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); + m = strmatch (t, sl->list[i], FNMATCH_EXTFLAG | FNMATCH_IGNCASE); if ((not && m == FNM_NOMATCH) || (not == 0 && m != FNM_NOMATCH)) free (sl->list[i]); else @@ -368,6 +388,7 @@ it_init_aliases (itp) #else itp->slist = (STRINGLIST *)NULL; #endif + free (alias_list); return 1; } @@ -393,6 +414,7 @@ init_itemlist_from_varlist (itp, svfunc) sl->list[i] = savestring (vlist[i]->name); sl->list[sl->list_len = n] = (char *)NULL; itp->slist = sl; + free (vlist); } static int @@ -497,6 +519,24 @@ it_init_functions (itp) return 0; } +/* Like it_init_builtins, but includes everything the help builtin looks at, + not just builtins with an active implementing function. */ +static int +it_init_helptopics (itp) + ITEMLIST *itp; +{ + STRINGLIST *sl; + register int i, n; + + sl = strlist_create (num_shell_builtins); + for (i = n = 0; i < num_shell_builtins; i++) + 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_hostnames (itp) ITEMLIST *itp; @@ -692,17 +732,29 @@ pcomp_filename_completion_function (text, state) int state; { static char *dfn; /* dequoted filename */ - int qc; + int iscompgen, iscompleting; 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 + /* There are roughly three paths we can follow to get here: + 1. complete -f + 2. compgen -f "$word" from a completion function + 3. compgen -f "$word" from the command line + They all need to be handled. + + In the first two cases, readline will run the filename dequoting + function in rl_filename_completion_function if it found a filename + quoting character in the word to be completed + (rl_completion_found_quote). We run the dequoting function here + if we're running compgen, we're not completing, and the + rl_filename_completion_function won't dequote the filename + (rl_completion_found_quote == 0). */ + iscompgen = this_shell_builtin == compgen_builtin; + iscompleting = RL_ISSTATE (RL_STATE_COMPLETING); + if (iscompgen && iscompleting == 0 && rl_completion_found_quote == 0 + && rl_filename_dequoting_function) { /* Use rl_completion_quote_character because any single or double quotes have been removed by the time TEXT makes it @@ -710,6 +762,32 @@ pcomp_filename_completion_function (text, state) quoted strings. */ dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); } + /* Intended to solve a mismatched assumption by bash-completion. If + the text to be completed is empty, but bash-completion turns it into + a quoted string ('') assuming that this code will dequote it before + calling readline, do the dequoting. */ + else if (iscompgen && iscompleting && + pcomp_curtxt && *pcomp_curtxt == 0 && + text && (*text == '\'' || *text == '"') && text[1] == text[0] && text[2] == 0 && + rl_filename_dequoting_function) + dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); + /* Another mismatched assumption by bash-completion. If compgen is being + run as part of bash-completion, and the argument to compgen is not + the same as the word originally passed to the programmable completion + code, dequote the argument if it has quote characters. It's an + attempt to detect when bash-completion is quoting its filename + argument before calling compgen. */ + /* We could check whether gen_shell_function_matches is in the call + stack by checking whether the gen-shell-function-matches tag is in + the unwind-protect stack, but there's no function to do that yet. + We could simply check whether we're executing in a function by + checking variable_context, and may end up doing that. */ + else if (iscompgen && iscompleting && rl_filename_dequoting_function && + pcomp_curtxt && text && + STREQ (pcomp_curtxt, text) == 0 && + variable_context && + sh_contains_quotes (text)) /* guess */ + dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); else dfn = savestring (text); } @@ -752,6 +830,7 @@ gen_action_completions (cs, text) STRINGLIST *ret, *tmatches; char **cmatches; /* from rl_completion_matches ... */ unsigned long flags; + int t; ret = tmatches = (STRINGLIST *)NULL; flags = cs->actions; @@ -764,6 +843,7 @@ gen_action_completions (cs, text) 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_HELPTOPIC, &it_helptopics, 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); @@ -783,8 +863,15 @@ gen_action_completions (cs, text) /* And lastly, the special case for directories */ if (flags & CA_DIRECTORY) { + t = rl_filename_completion_desired; rl_completion_mark_symlink_dirs = 1; /* override user preference */ cmatches = bash_directory_completion_matches (text); + /* If we did not want filename completion before this, and there are + no matches, turn off rl_filename_completion_desired so whatever + matches we get are not treated as filenames (it gets turned on by + rl_filename_completion_function unconditionally). */ + if (t == 0 && cmatches == 0 && rl_filename_completion_desired == 1) + rl_filename_completion_desired = 0; tmatches = completions_to_stringlist (cmatches); ret = strlist_append (ret, tmatches); strvec_dispose (cmatches); @@ -798,16 +885,18 @@ gen_action_completions (cs, text) 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. */ + glob_filename (in which case we could use shell_glob_filename). */ static STRINGLIST * gen_globpat_matches (cs, text) COMPSPEC *cs; const char *text; { STRINGLIST *sl; + int gflags; sl = strlist_create (0); - sl->list = glob_filename (cs->globpat, 0); + gflags = glob_star ? GX_GLOBSTAR : 0; + sl->list = glob_filename (cs->globpat, gflags); if (GLOB_FAILED (sl->list)) sl->list = (char **)NULL; if (sl->list) @@ -833,7 +922,10 @@ gen_wordlist_matches (cs, text) /* 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. */ + only on the results of expansion. split_at_delims also handles embedded + quoted strings and preserves the quotes for the expand_words_shellexp + function call that follows. */ + /* XXX - this is where this function spends most of its time */ l = split_at_delims (cs->words, strlen (cs->words), (char *)NULL, -1, 0, (int *)NULL, (int *)NULL); if (l == 0) return ((STRINGLIST *)NULL); @@ -867,11 +959,15 @@ bind_comp_words (lwords) { SHELL_VAR *v; - v = find_variable ("COMP_WORDS"); + v = find_variable_noref ("COMP_WORDS"); if (v == 0) v = make_new_array_variable ("COMP_WORDS"); + if (nameref_p (v)) + VUNSETATTR (v, att_nameref); +#if 0 if (readonly_p (v)) VUNSETATTR (v, att_readonly); +#endif if (array_p (v) == 0) v = convert_var_to_array (v); v = assign_array_var_from_word_list (v, lwords, 0); @@ -891,6 +987,8 @@ bind_compfunc_variables (line, ind, lwords, cw, exported) char ibuf[INT_STRLEN_BOUND(int) + 1]; char *value; SHELL_VAR *v; + size_t llen; + int c; /* Set the variables that the function expects while it executes. Maybe these should be in the function environment (temporary_env). */ @@ -898,18 +996,23 @@ bind_compfunc_variables (line, ind, lwords, cw, exported) if (v && exported) VSETATTR(v, att_exported); - value = inttostr (ind, ibuf, sizeof(ibuf)); - v = bind_int_variable ("COMP_POINT", value); + /* Post bash-4.2: COMP_POINT is characters instead of bytes. */ + c = line[ind]; + line[ind] = '\0'; + llen = MB_STRLEN (line); + line[ind] = c; + value = inttostr (llen, ibuf, sizeof(ibuf)); + v = bind_int_variable ("COMP_POINT", value, 0); if (v && exported) VSETATTR(v, att_exported); value = inttostr (rl_completion_type, ibuf, sizeof (ibuf)); - v = bind_int_variable ("COMP_TYPE", value); + v = bind_int_variable ("COMP_TYPE", value, 0); if (v && exported) VSETATTR(v, att_exported); value = inttostr (rl_completion_invoking_key, ibuf, sizeof (ibuf)); - v = bind_int_variable ("COMP_KEY", value); + v = bind_int_variable ("COMP_KEY", value, 0); if (v && exported) VSETATTR(v, att_exported); @@ -920,7 +1023,7 @@ bind_compfunc_variables (line, ind, lwords, cw, exported) #ifdef ARRAY_VARS v = bind_comp_words (lwords); value = inttostr (cw, ibuf, sizeof(ibuf)); - bind_int_variable ("COMP_CWORD", value); + bind_int_variable ("COMP_CWORD", value, 0); #endif } else @@ -931,13 +1034,13 @@ static void unbind_compfunc_variables (exported) int exported; { - unbind_variable ("COMP_LINE"); - unbind_variable ("COMP_POINT"); - unbind_variable ("COMP_TYPE"); - unbind_variable ("COMP_KEY"); + unbind_variable_noref ("COMP_LINE"); + unbind_variable_noref ("COMP_POINT"); + unbind_variable_noref ("COMP_TYPE"); + unbind_variable_noref ("COMP_KEY"); #ifdef ARRAY_VARS - unbind_variable ("COMP_WORDS"); - unbind_variable ("COMP_CWORD"); + unbind_variable_noref ("COMP_WORDS"); + unbind_variable_noref ("COMP_CWORD"); #endif if (exported) array_needs_making = 1; @@ -953,11 +1056,12 @@ unbind_compfunc_variables (exported) 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. */ + make do with the COMP_LINE and COMP_POINT variables. */ static WORD_LIST * -build_arg_list (cmd, text, lwords, ind) +build_arg_list (cmd, cname, text, lwords, ind) char *cmd; + const char *cname; const char *text; WORD_LIST *lwords; int ind; @@ -968,13 +1072,13 @@ build_arg_list (cmd, text, lwords, ind) ret = (WORD_LIST *)NULL; w = make_word (cmd); - ret = make_word_list (w, (WORD_LIST *)NULL); + ret = make_word_list (w, (WORD_LIST *)NULL); /* $0 */ - w = (lwords && lwords->word) ? copy_word (lwords->word) : make_word (""); + w = make_word (cname); /* $1 */ cl = ret->next = make_word_list (w, (WORD_LIST *)NULL); w = make_word (text); - cl->next = make_word_list (w, (WORD_LIST *)NULL); + cl->next = make_word_list (w, (WORD_LIST *)NULL); /* $2 */ cl = cl->next; /* Search lwords for current word */ @@ -999,8 +1103,9 @@ build_arg_list (cmd, text, lwords, ind) 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) +gen_shell_function_matches (cs, cmd, text, line, ind, lwords, nw, cw, foundp) COMPSPEC *cs; + const char *cmd; const char *text; char *line; int ind; @@ -1041,7 +1146,7 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw, foundp) 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); + cmdlist = build_arg_list (funcname, cmd, text, lwords, cw); pps = &ps; save_parser_state (pps); @@ -1069,25 +1174,25 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw, foundp) v = find_variable ("COMPREPLY"); if (v == 0) return ((STRINGLIST *)NULL); - if (array_p (v) == 0) + if (array_p (v) == 0 && assoc_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)) + if (found == 0 || (found & PCOMP_RETRYFAIL) || a == 0 || array_p (v) == 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 = array_to_argv (a, 0); sl->list_len = sl->list_size = array_num_elements (a); } /* XXX - should we unbind COMPREPLY here? */ - unbind_variable ("COMPREPLY"); + unbind_variable_noref ("COMPREPLY"); return (sl); #endif @@ -1096,15 +1201,16 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw, foundp) /* 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 + $2 == word to be completed (possibly null) + $3 == previous word + and run it 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) +gen_command_matches (cs, cmd, text, line, ind, lwords, nw, cw) COMPSPEC *cs; + const char *cmd; const char *text; char *line; int ind; @@ -1118,7 +1224,7 @@ gen_command_matches (cs, text, line, ind, lwords, nw, cw) STRINGLIST *sl; bind_compfunc_variables (line, ind, lwords, cw, 1); - cmdlist = build_arg_list (cs->command, text, lwords, cw); + cmdlist = build_arg_list (cs->command, cmd, text, lwords, cw); /* Estimate the size needed for the buffer. */ n = strlen (cs->command); @@ -1146,9 +1252,10 @@ gen_command_matches (cs, text, line, ind, lwords, nw, cw) } cscmd[cmdlen] = '\0'; - tw = command_substitute (cscmd, 0); + tw = command_substitute (cscmd, 0, 0); csbuf = tw ? tw->word : (char *)NULL; - dispose_word_desc (tw); + if (tw) + dispose_word_desc (tw); /* Now clean up and destroy everything. */ dispose_words (cmdlist); @@ -1192,14 +1299,14 @@ command_line_to_word_list (line, llen, sentinel, nwp, cwp) int llen, sentinel, *nwp, *cwp; { WORD_LIST *ret; - char *delims; + const 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); + ret = split_at_delims (line, llen, delims, sentinel, SD_NOQUOTEDELIM|SD_COMPLETE, nwp, cwp); return (ret); } @@ -1217,6 +1324,7 @@ gen_compspec_completions (cs, cmd, word, start, end, foundp) char *line; int llen, nw, cw, found, foundf; WORD_LIST *lwords; + WORD_DESC *lw; COMPSPEC *tcs; found = 1; @@ -1280,14 +1388,22 @@ gen_compspec_completions (cs, cmd, word, start, end, foundp) /* 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); + line = substring (pcomp_line, 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); + line, llen, pcomp_ind - start, &nw, &cw); #endif - lwords = command_line_to_word_list (line, llen, rl_point - start, &nw, &cw); + lwords = command_line_to_word_list (line, llen, pcomp_ind - start, &nw, &cw); + /* If we skipped a NULL word at the beginning of the line, add it back */ + if (lwords && lwords->word && cmd[0] == 0 && lwords->word->word[0] != 0) + { + lw = make_bare_word (cmd); + lwords = make_word_list (lw, lwords); + nw++; + cw++; + } #ifdef DEBUG if (lwords == 0 && llen > 0) debug_printf ("ERROR: command_line_to_word_list returns NULL"); @@ -1306,7 +1422,7 @@ gen_compspec_completions (cs, cmd, word, start, end, foundp) if (cs->funcname) { foundf = 0; - tmatches = gen_shell_function_matches (cs, word, line, rl_point - start, lwords, nw, cw, &foundf); + tmatches = gen_shell_function_matches (cs, cmd, word, line, pcomp_ind - start, lwords, nw, cw, &foundf); if (foundf != 0) found = foundf; if (tmatches) @@ -1314,7 +1430,7 @@ gen_compspec_completions (cs, cmd, word, start, end, foundp) #ifdef DEBUG if (progcomp_debug) { - debug_printf ("gen_shell_function_matches (%p, %s, %p, %d, %d) -->", cs, word, lwords, nw, cw); + debug_printf ("gen_shell_function_matches (%p, %s, %s, %p, %d, %d) -->", cs, cmd, word, lwords, nw, cw); strlist_print (tmatches, "\t"); rl_on_new_line (); } @@ -1326,13 +1442,13 @@ gen_compspec_completions (cs, cmd, word, start, end, foundp) if (cs->command) { - tmatches = gen_command_matches (cs, word, line, rl_point - start, lwords, nw, cw); + tmatches = gen_command_matches (cs, cmd, word, line, pcomp_ind - 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); + debug_printf ("gen_command_matches (%p, %s, %s, %p, %d, %d) -->", cs, cmd, word, lwords, nw, cw); strlist_print (tmatches, "\t"); rl_on_new_line (); } @@ -1388,6 +1504,7 @@ gen_compspec_completions (cs, cmd, word, start, end, foundp) { tcs = compspec_create (); tcs->actions = CA_DIRECTORY; + FREE (ret); ret = gen_action_completions (tcs, word); compspec_dispose (tcs); } @@ -1415,6 +1532,12 @@ pcomp_set_readline_variables (flags, nval) /* If the user doesn't want a space appended, tell readline. */ if (flags & COPT_NOSPACE) rl_completion_suppress_append = nval; + /* The value here is inverted, since the default is on and the `noquote' + option is supposed to turn it off */ + if (flags & COPT_NOQUOTE) + rl_filename_quoting_desired = 1 - nval; + if (flags & COPT_NOSORT) + rl_sort_completion_matches = 1 - nval; } /* Set or unset FLAGS in the options word of the current compspec. @@ -1442,13 +1565,19 @@ gen_progcomp_completions (ocmd, cmd, word, start, end, foundp, retryp, lastcs) COMPSPEC **lastcs; { COMPSPEC *cs, *oldcs; - const char *oldcmd; + const char *oldcmd, *oldtxt; STRINGLIST *ret; cs = progcomp_search (ocmd); if (cs == 0 || cs == *lastcs) - return (NULL); + { +#if 0 + if (foundp) + *foundp = 0; +#endif + return (NULL); + } if (*lastcs) compspec_dispose (*lastcs); @@ -1459,14 +1588,17 @@ gen_progcomp_completions (ocmd, cmd, word, start, end, foundp, retryp, lastcs) oldcs = pcomp_curcs; oldcmd = pcomp_curcmd; + oldtxt = pcomp_curtxt; pcomp_curcs = cs; pcomp_curcmd = cmd; + pcomp_curtxt = word; ret = gen_compspec_completions (cs, cmd, word, start, end, foundp); pcomp_curcs = oldcs; pcomp_curcmd = oldcmd; + pcomp_curtxt = oldtxt; /* We need to conditionally handle setting *retryp here */ if (retryp) @@ -1484,50 +1616,125 @@ gen_progcomp_completions (ocmd, cmd, word, start, end, foundp, retryp, lastcs) /* 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. */ + bound the command currently being completed in pcomp_line (usually + rl_line_buffer). */ char ** programmable_completions (cmd, word, start, end, foundp) const char *cmd; const char *word; int start, end, *foundp; { - COMPSPEC *cs, *lastcs; + COMPSPEC *lastcs; STRINGLIST *ret; char **rmatches, *t; int found, retry, count; + char *ocmd; + int oend; +#if defined (ALIAS) + alias_t *al; +#endif lastcs = 0; found = count = 0; + pcomp_line = rl_line_buffer; + pcomp_ind = rl_point; + + ocmd = (char *)cmd; + oend = end; + do { retry = 0; if (!(in_vyatta_restricted_mode(OUTPUT) && strcmp(cmd, word) == 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); - } + /* We look at the basename of CMD if the full command does not have + an associated COMPSPEC. */ + ret = gen_progcomp_completions (ocmd, ocmd, word, start, oend, &found, &retry, &lastcs); + if (found == 0) + { + t = strrchr (ocmd, '/'); + if (t && *(++t)) + ret = gen_progcomp_completions (t, ocmd, word, start, oend, &found, &retry, &lastcs); + } } if (found == 0) - ret = gen_progcomp_completions (DEFAULTCMD, cmd, word, start, end, &found, &retry, &lastcs); + ret = gen_progcomp_completions (DEFAULTCMD, ocmd, word, start, oend, &found, &retry, &lastcs); + +#if defined (ALIAS) + /* Look up any alias for CMD, try to gen completions for it */ + /* Look up the alias, find the value, build a new line replacing CMD + with that value, offsetting PCOMP_IND and END appropriately, reset + PCOMP_LINE to the new line and OCMD with the new command name, then + call gen_progcomp_completions again. We could use alias_expand for + this, but it does more (and less) than we need right now. */ + if (found == 0 && retry == 0 && progcomp_alias && (al = find_alias (ocmd))) + { + char *ncmd, *nline, *ntxt; + int ind, lendiff; + size_t nlen, olen, llen; + + /* We found an alias for OCMD. Take the value and build a new line */ + ntxt = al->value; + nlen = strlen (ntxt); + if (nlen == 0) + break; + olen = strlen (ocmd); + lendiff = nlen - olen; /* can be negative */ + llen = strlen (pcomp_line); + + nline = (char *)xmalloc (llen + lendiff + 1); + if (start > 0) + strncpy (nline, pcomp_line, start); + strncpy (nline + start, ntxt, nlen); + strcpy (nline + start + nlen, pcomp_line + start + olen); + + /* Find the first word of the alias value and use that as OCMD. We + don't check the alias value to see whether it begins with a valid + command name, so this can be fooled. */ + ind = skip_to_delim (ntxt, 0, "()<>;&| \t\n", SD_NOJMP|SD_COMPLETE); + if (ind > 0) + ncmd = substring (ntxt, 0, ind); + else + { + free (nline); + break; /* will free pcomp_line and ocmd later */ + } + + /* Adjust PCOMP_IND and OEND appropriately */ + pcomp_ind += lendiff; + oend += lendiff; + + /* Set up values with new line. WORD stays the same. */ + if (ocmd != cmd) + free (ocmd); + if (pcomp_line != rl_line_buffer) + free (pcomp_line); + + ocmd = ncmd; + pcomp_line = nline; + + /* And go back and start over. */ + retry = 1; + } +#endif /* ALIAS */ count++; if (count > 32) { - internal_warning ("programmable_completion: %s: possible retry loop", cmd); + internal_warning (_("programmable_completion: %s: possible retry loop"), cmd); break; } } while (retry); + if (pcomp_line != rl_line_buffer) + free (pcomp_line); + if (ocmd != cmd) + free (ocmd); + if (ret) { rmatches = ret->list; @@ -1542,6 +1749,10 @@ programmable_completions (cmd, word, start, end, foundp) if (lastcs) /* XXX - should be while? */ compspec_dispose (lastcs); + /* XXX restore pcomp_line and pcomp_ind? */ + pcomp_line = rl_line_buffer; + pcomp_ind = rl_point; + return (rmatches); } diff --git a/pcomplete.h b/pcomplete.h index dacbcef..2a68e6a 100644 --- a/pcomplete.h +++ b/pcomplete.h @@ -1,7 +1,7 @@ /* pcomplete.h - structure definitions and other stuff for programmable completion. */ -/* Copyright (C) 1999-2009 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,6 +35,7 @@ typedef struct compspec { char *suffix; char *funcname; char *command; + char *lcommand; char *filterpat; } COMPSPEC; @@ -70,15 +71,23 @@ typedef struct compspec { #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) +#define COPT_NOQUOTE (1<<4) +#define COPT_NOSPACE (1<<5) +#define COPT_BASHDEFAULT (1<<6) +#define COPT_PLUSDIRS (1<<7) +#define COPT_NOSORT (1<<8) + +#define COPT_LASTUSER COPT_NOSORT + +#define PCOMP_RETRYFAIL (COPT_LASTUSER << 1) +#define PCOMP_NOTFOUND (COPT_LASTUSER << 2) + /* 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 */ + int (*list_getter) PARAMS((struct _list_of_items *)); /* function to call to get the list */ STRINGLIST *slist; @@ -98,9 +107,15 @@ typedef struct _list_of_items { #define EMPTYCMD "_EmptycmD_" #define DEFAULTCMD "_DefaultCmD_" +#define INITIALWORD "_InitialWorD_" extern HASH_TABLE *prog_completes; + +extern char *pcomp_line; +extern int pcomp_ind; + extern int prog_completion_enabled; +extern int progcomp_alias; /* Not all of these are used yet. */ extern ITEMLIST it_aliases; @@ -115,6 +130,7 @@ extern ITEMLIST it_exports; extern ITEMLIST it_files; extern ITEMLIST it_functions; extern ITEMLIST it_groups; +extern ITEMLIST it_helptopics; extern ITEMLIST it_hostnames; extern ITEMLIST it_jobs; extern ITEMLIST it_keywords; @@ -131,31 +147,31 @@ 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 COMPSPEC *compspec_create PARAMS((void)); +extern void compspec_dispose PARAMS((COMPSPEC *)); +extern COMPSPEC *compspec_copy PARAMS((COMPSPEC *)); -extern void progcomp_create __P((void)); -extern void progcomp_flush __P((void)); -extern void progcomp_dispose __P((void)); +extern void progcomp_create PARAMS((void)); +extern void progcomp_flush PARAMS((void)); +extern void progcomp_dispose PARAMS((void)); -extern int progcomp_size __P((void)); +extern int progcomp_size PARAMS((void)); -extern int progcomp_insert __P((char *, COMPSPEC *)); -extern int progcomp_remove __P((char *)); +extern int progcomp_insert PARAMS((char *, COMPSPEC *)); +extern int progcomp_remove PARAMS((char *)); -extern COMPSPEC *progcomp_search __P((const char *)); +extern COMPSPEC *progcomp_search PARAMS((const char *)); -extern void progcomp_walk __P((hash_wfunc *)); +extern void progcomp_walk PARAMS((hash_wfunc *)); /* Functions from pcomplete.c */ -extern void set_itemlist_dirty __P((ITEMLIST *)); +extern void set_itemlist_dirty PARAMS((ITEMLIST *)); -extern STRINGLIST *completions_to_stringlist __P((char **)); +extern STRINGLIST *completions_to_stringlist PARAMS((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 STRINGLIST *gen_compspec_completions PARAMS((COMPSPEC *, const char *, const char *, int, int, int *)); +extern char **programmable_completions PARAMS((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)); +extern void pcomp_set_readline_variables PARAMS((int, int)); +extern void pcomp_set_compspec_options PARAMS((COMPSPEC *, int, int)); #endif /* _PCOMPLETE_H_ */ diff --git a/pcomplib.c b/pcomplib.c index fc4fbe4..e8df62e 100644 --- a/pcomplib.c +++ b/pcomplib.c @@ -1,6 +1,6 @@ /* pcomplib.c - library functions for programmable completion. */ -/* Copyright (C) 1999-2009 Free Software Foundation, Inc. +/* Copyright (C) 1999-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -37,13 +37,13 @@ #include "shell.h" #include "pcomplete.h" -#define COMPLETE_HASH_BUCKETS 32 /* must be power of two */ +#define COMPLETE_HASH_BUCKETS 512 /* 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)); +static void free_progcomp PARAMS((PTR_T)); COMPSPEC * compspec_create () @@ -62,6 +62,7 @@ compspec_create () ret->suffix = (char *)NULL; ret->funcname = (char *)NULL; ret->command = (char *)NULL; + ret->lcommand = (char *)NULL; ret->filterpat = (char *)NULL; return ret; @@ -80,6 +81,7 @@ compspec_dispose (cs) FREE (cs->suffix); FREE (cs->funcname); FREE (cs->command); + FREE (cs->lcommand); FREE (cs->filterpat); free (cs); @@ -94,7 +96,7 @@ compspec_copy (cs) new = (COMPSPEC *)xmalloc (sizeof (COMPSPEC)); - new->refcount = cs->refcount; + new->refcount = 1; /* was cs->refcount, but this is a fresh copy */ new->actions = cs->actions; new->options = cs->options; @@ -104,6 +106,7 @@ compspec_copy (cs) new->suffix = STRDUP (cs->suffix); new->funcname = STRDUP (cs->funcname); new->command = STRDUP (cs->command); + new->lcommand = STRDUP (cs->lcommand); new->filterpat = STRDUP (cs->filterpat); return new; diff --git a/po/LINGUAS b/po/LINGUAS index 9ab66f1..27165b3 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,2 +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 +en@quot en@boldquot af bg ca cs da de el eo es et fi fr ga gl hr hu id it ja ko lt nb nl pl pt pt_BR ro ru sk sl sr sv tr uk vi zh_CN zh_TW diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 6730665..6f0abed 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -32,7 +32,7 @@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKINSTALLDIRS = $(top_srcdir)/support/mkinstalldirs mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) GMSGFMT = @GMSGFMT@ @@ -277,7 +277,7 @@ mostlyclean: clean: mostlyclean distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo + rm -f Makefile Makefile.in POTFILES *.mo stamp-po maintainer-clean: distclean @echo "This command is intended for maintainers to use;" diff --git a/po/af.gmo b/po/af.gmo index bf7d956..56f6b5a 100644 Binary files a/po/af.gmo and b/po/af.gmo differ diff --git a/po/af.po b/po/af.po index 1ae2aa3..d9e5f08 100644 --- a/po/af.po +++ b/po/af.po @@ -6,300 +6,333 @@ msgid "" msgstr "" "Project-Id-Version: bash 2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-30 08:25-0500\n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" "PO-Revision-Date: 2004-03-17 13:48+0200\n" "Last-Translator: Petri Jooste \n" "Language-Team: Afrikaans \n" +"Language: af\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 #, fuzzy msgid "bad array subscript" msgstr "Os/2 Biskaart Skikking" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" +msgid "%s: removing nameref attribute" msgstr "" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s: illegal option -- %c\n" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" msgstr "" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: kan nie %s skep nie" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "" -#: builtins/alias.def:132 +#: bashline.c:4733 #, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "%s: bevel nie gevind nie" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%s: illegal option -- %c\n" +msgstr "" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, fuzzy, c-format msgid "`%s': unknown function name" msgstr "%s: leesalleen-funksie" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "" -#: builtins/break.def:77 builtins/break.def:117 -#, fuzzy +#: builtins/bind.def:378 builtins/bind.def:395 +#, fuzzy, c-format +msgid "`%s': cannot unbind" +msgstr "%s: bevel nie gevind nie" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "Afteken" +msgstr "" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +#, fuzzy +msgid "too many arguments" +msgstr "te veel parameters" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "boonste l�ergids." + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "" -#: builtins/common.c:101 -#, fuzzy, c-format +#: builtins/common.c:96 +#, c-format msgid "line %d: " -msgstr "3d modus" +msgstr "" -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "besig om te skryf" +msgstr "" -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, fuzzy, c-format msgid "%s: option requires an argument" msgstr "%s: option `%s' requires an argument\n" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "" -#: builtins/common.c:205 +#: builtins/common.c:207 #, fuzzy, c-format msgid "%s: not found" msgstr "%s: bevel nie gevind nie" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, fuzzy, c-format msgid "%s: invalid option" msgstr "%s: illegal option -- %c\n" -#: builtins/common.c:221 +#: builtins/common.c:223 #, fuzzy, c-format msgid "%s: invalid option name" msgstr "%s: illegal option -- %c\n" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, fuzzy, c-format msgid "`%s': not a valid identifier" msgstr "Die datum is nie geldige!" -#: builtins/common.c:238 +#: builtins/common.c:240 #, fuzzy msgid "invalid octal number" msgstr "Die sein nommer wat was gevang het" -#: builtins/common.c:240 +#: builtins/common.c:242 #, fuzzy msgid "invalid hex number" msgstr "Die sein nommer wat was gevang het" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 #, fuzzy msgid "invalid number" msgstr "Die sein nommer wat was gevang het" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" msgstr "" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, fuzzy, c-format msgid "%s: readonly variable" msgstr "Veranderlike boom" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: kan nie %s skep nie" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 #, fuzzy msgid "argument" msgstr "argument verwag\n" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "" -#: builtins/common.c:290 +#: builtins/common.c:299 #, fuzzy, c-format msgid "%s: no job control" msgstr "geen taakbeheer in hierdie dop nie" -#: builtins/common.c:292 +#: builtins/common.c:301 #, fuzzy msgid "no job control" msgstr "geen taakbeheer in hierdie dop nie" -#: builtins/common.c:302 +#: builtins/common.c:311 #, fuzzy, c-format msgid "%s: restricted" msgstr "Die bediener be�indig Die verbinding." -#: builtins/common.c:304 -#, fuzzy +#: builtins/common.c:313 msgid "restricted" msgstr "" -"\n" -"Bevel be�indig\n" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "" -#: builtins/common.c:321 +#: builtins/common.c:330 #, fuzzy, c-format msgid "write error: %s" msgstr "pypfout: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" msgstr "" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, fuzzy, c-format msgid "%s: ambiguous job spec" msgstr "%s: dubbelsinnige herroetering" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, fuzzy, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: kan nie %s skep nie" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, fuzzy, c-format +msgid "%s: cannot unset" +msgstr "%s: kan nie %s skep nie" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "" @@ -312,122 +345,157 @@ msgstr "" msgid "warning: -C option may not work as you expect" msgstr "" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: leesalleen-funksie" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" msgstr "" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, fuzzy, c-format msgid "cannot open shared object %s: %s" msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" msgstr "" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: is 'n gids" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, fuzzy, c-format msgid "%s: not a regular file" msgstr "%s: kan nie 'n bin�re l�er uitvoer nie" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" msgstr "" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: kan nie 'n bin�re l�er uitvoer nie" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, fuzzy, c-format msgid "%s: cannot execute: %s" msgstr "%s: kan nie %s skep nie" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, fuzzy, c-format msgid "logout\n" msgstr "Afteken" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 #, fuzzy msgid "no command found" msgstr "%s: bevel nie gevind nie" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "" @@ -442,39 +510,44 @@ msgstr "%s: illegal option -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: option `%s' requires an argument\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, fuzzy, c-format msgid "hits\tcommand\n" msgstr "Bevelre�l" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" msgstr[0] "" msgstr[1] "" -#: builtins/help.def:168 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." msgstr "" -#: builtins/help.def:185 +#: builtins/help.def:223 #, fuzzy, c-format msgid "%s: cannot open: %s" msgstr "%s: kan nie %s skep nie" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -486,15 +559,21 @@ msgid "" "\n" msgstr "" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "" + +#: builtins/history.def:449 #, fuzzy, c-format msgid "%s: history expansion failed" msgstr "%s: heelgetal-uitdrukking is verwag\n" @@ -502,105 +581,123 @@ 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" +msgstr "Veranderlike boom" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" msgstr "" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "" -#: builtins/kill.def:263 +#: builtins/kill.def:274 #, fuzzy msgid "Unknown error" msgstr "Onbekende fout %d" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 #, fuzzy msgid "expression expected" msgstr "Bools uitdrukking verwag" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "Veranderlike boom" +msgstr "" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%s: illegal option -- %c\n" +msgstr "" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, fuzzy, c-format msgid "%s: invalid array origin" -msgstr "%s: illegal option -- %c\n" +msgstr "Os/2 Biskaart Skikking" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "Die sein nommer wat was gevang het" +msgstr "" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "Veranderlike boom" +msgstr "" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "" + +#: builtins/pushd.def:199 #, fuzzy msgid "no other directory" msgstr "boonste l�ergids." -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: option `%s' requires an argument\n" + +#: builtins/pushd.def:480 #, fuzzy msgid "" msgstr "Nuutste gebruik word werksaam gids" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "Stapel grootte verhoog" +msgstr "" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -624,7 +721,7 @@ msgid "" "\tdirs when invoked without options, starting with zero." msgstr "" -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -649,7 +746,7 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -670,54 +767,49 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "" -#: builtins/read.def:588 +#: builtins/read.def:827 #, fuzzy, c-format msgid "read error: %d: %s" msgstr "pypfout: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, fuzzy, c-format msgid "%s: not an array variable" msgstr "Veranderlike boom" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, fuzzy, c-format msgid "%s: not a function" msgstr "%s: leesalleen-funksie" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: kan nie %s skep nie" + +#: builtins/shift.def:72 builtins/shift.def:79 #, fuzzy msgid "shift count" msgstr "Shift" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "" @@ -726,477 +818,562 @@ msgstr "" msgid "filename argument required" msgstr "" -#: builtins/source.def:153 +#: builtins/source.def:154 #, fuzzy, c-format msgid "%s: file not found" msgstr "%s: bevel nie gevind nie" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 #, fuzzy msgid "cannot suspend a login shell" msgstr "Begin aanteken tolk" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "" -#: builtins/type.def:274 +#: builtins/type.def:275 #, fuzzy, c-format msgid "%s is a function\n" msgstr "%s: leesalleen-funksie" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, fuzzy, c-format msgid "`%c': bad command" msgstr "%s: illegal option -- %c\n" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, fuzzy, c-format msgid "%s: cannot get limit: %s" msgstr "%s: kan nie %s skep nie" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 #, fuzzy msgid "limit" msgstr "Filter beperk:" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, fuzzy, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: kan nie %s skep nie" -#: builtins/umask.def:118 +#: builtins/umask.def:115 #, fuzzy msgid "octal number" msgstr "Die sein nommer wat was gevang het" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" msgstr "" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr "" -#: error.c:165 +#: error.c:164 #, fuzzy, c-format msgid "last command: %s\n" msgstr "Bevelre�l" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "" -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "" + +#: error.c:488 #, fuzzy msgid "unknown command error" msgstr "Onbekende fout %d" -#: error.c:407 +#: error.c:489 #, fuzzy msgid "bad command type" msgstr "bevelnaam" -#: error.c:408 +#: error.c:490 #, fuzzy msgid "bad connector" msgstr "foutiewe verbinder`%d'" -#: error.c:409 +#: error.c:491 #, fuzzy msgid "bad jump" msgstr "Spring na:" -#: error.c:447 +#: error.c:529 #, fuzzy, c-format msgid "%s: unbound variable" msgstr "Veranderlike boom" -#: eval.c:181 -#, c-format -msgid "timed out waiting for input: auto-logout\n" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" msgstr "" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" msgstr "" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 #, fuzzy msgid "pipe error" msgstr "pypfout: %s" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: bevel nie gevind nie" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: kan nie 'n bin�re l�er uitvoer nie" + +#: execute_cmd.c:6000 #, fuzzy, c-format msgid "%s: %s: bad interpreter" msgstr "%s: is 'n gids" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kan nie 'n bin�re l�er uitvoer nie" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "" + +#: execute_cmd.c:6175 #, 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 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "" -#: expr.c:265 +#: expr.c:291 #, fuzzy msgid "recursion stack underflow" msgstr "Stapel grootte verhoog" -#: expr.c:379 +#: expr.c:478 #, fuzzy msgid "syntax error in expression" msgstr "Sintaks fout in patroon" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "Sintaks fout in patroon" + +#: expr.c:545 expr.c:912 #, fuzzy msgid "division by 0" msgstr "devisie by nul." -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "" -#: expr.c:513 +#: expr.c:647 #, fuzzy msgid "`:' expected for conditional expression" msgstr "Soek die l�er vir 'n uitdrukking" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "" -#: expr.c:854 +#: expr.c:1057 #, fuzzy msgid "missing `)'" msgstr "Ontbrekende '>'" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 #, fuzzy msgid "syntax error: operand expected" msgstr "Onverwagte einde van l�er tydens inlees van hulpbron." -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "" -#: expr.c:1202 +#: expr.c:1518 #, 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 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "" + +#: expr.c:1603 msgid "value too great for base" msgstr "waarde te groot vir basis" -#: expr.c:1329 +#: expr.c:1652 #, fuzzy, c-format msgid "%s: expression error\n" -msgstr "%s: heelgetal-uitdrukking is verwag\n" +msgstr "Pypfout.\n" -#: general.c:61 +#: general.c:70 #, fuzzy msgid "getcwd: cannot access parent directories" msgstr "Kan nie die program uitvoer nie:" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6208 +#, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "kan nie fd %d na fd 0 dupliseer nie: %s" +msgstr "" -#: input.c:258 +#: input.c:266 #, c-format msgid "cannot allocate new file descriptor for bash input from fd %d" msgstr "" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" msgstr "" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" msgstr "" -#: jobs.c:1110 +#: jobs.c:1397 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" +msgid "deleting stopped job %d with process group %ld" msgstr "" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" msgstr "" -#: jobs.c:1401 +#: jobs.c:1839 #, fuzzy, c-format msgid "describe_pid: %ld: no such pid" msgstr "E108: Geen veranderlike: \"%s\"" -#: jobs.c:1416 +#: jobs.c:1854 #, fuzzy, c-format msgid "Signal %d" msgstr "Sein kwaliteit:" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Klaar" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 #, fuzzy msgid "Stopped" msgstr "Op gehou" -#: jobs.c:1439 +#: jobs.c:1877 #, fuzzy, c-format msgid "Stopped(%s)" msgstr "Op gehou" -#: jobs.c:1443 +#: jobs.c:1881 #, fuzzy msgid "Running" msgstr "aktief" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Klaar(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Verlaat %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Onbekende status" -#: jobs.c:1549 +#: jobs.c:1990 #, fuzzy, c-format msgid "(core dumped) " msgstr "Kern Ontwikkelaar" -#: jobs.c:1568 +#: jobs.c:2009 #, fuzzy, c-format msgid " (wd: %s)" msgstr "Aktiveer nou dadelik" -#: jobs.c:1776 +#: jobs.c:2250 #, fuzzy, c-format msgid "child setpgid (%ld to %ld)" msgstr "Fout in die skryf van %s" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" msgstr "" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "" -#: jobs.c:2829 +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: kan nie %s skep nie" + +#: jobs.c:3558 #, fuzzy, c-format msgid "%s: job has terminated" msgstr "Die bediener be�indig Die verbinding." -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "3d modus" +msgstr "" -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, fuzzy, c-format msgid " (core dumped)" msgstr "Kern Ontwikkelaar" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, fuzzy, c-format msgid "(wd now: %s)\n" msgstr "Aktiveer nou dadelik" -#: jobs.c:3579 +#: jobs.c:4378 #, fuzzy msgid "initialize_job_control: getpgrp failed" msgstr "Inisialisering van OpenGL het misluk." -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "" -#: jobs.c:3649 +#: jobs.c:4460 #, fuzzy msgid "initialize_job_control: setpgid" msgstr "Inisialisering van OpenGL het misluk." -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "geen taakbeheer in hierdie dop nie" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "(onbekend)" +msgstr "onbekend" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" msgstr "" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" msgstr "" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" msgstr "" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "" @@ -1215,313 +1392,362 @@ msgstr "" msgid "%s: bad network path specification" msgstr "" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" msgstr "" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" msgstr "" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" msgstr "" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" msgstr "" -#: mailcheck.c:433 +#: mailcheck.c:439 #, fuzzy msgid "You have mail in $_" msgstr "Bevestig Pos In" -#: mailcheck.c:458 +#: mailcheck.c:464 #, fuzzy msgid "You have new mail in $_" msgstr "Wanneer nuwe pos arriveer in" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "" -#: make_cmd.c:323 +#: make_cmd.c:314 #, fuzzy msgid "syntax error: arithmetic expression required" msgstr "Sintaks fout in patroon" -#: make_cmd.c:325 +#: make_cmd.c:316 #, fuzzy msgid "syntax error: `;' unexpected" msgstr "Onverwagte einde van l�er tydens inlees van hulpbron." -#: make_cmd.c:326 +#: make_cmd.c:317 #, fuzzy, c-format msgid "syntax error: `((%s))'" msgstr "sintaksfout" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" msgstr "" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" msgstr "" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "" -#: parse.y:3960 +#: parse.y:4461 #, fuzzy msgid "syntax error in conditional expression" msgstr "Sintaks fout in patroon" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "" -#: parse.y:4042 +#: parse.y:4543 #, fuzzy msgid "expected `)'" msgstr "')' is verwag\n" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "" -#: parse.y:4120 +#: parse.y:4621 #, fuzzy, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "%s: bin�re operator is verwag\n" -#: parse.y:4124 +#: parse.y:4625 #, fuzzy msgid "conditional binary operator expected" msgstr "%s: bin�re operator is verwag\n" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "" -#: parse.y:4161 +#: parse.y:4662 #, fuzzy, c-format msgid "unexpected token `%c' in conditional command" msgstr "Soek die l�er vir 'n uitdrukking" -#: parse.y:4164 +#: parse.y:4665 #, fuzzy, c-format msgid "unexpected token `%s' in conditional command" msgstr "Soek die l�er vir 'n uitdrukking" -#: parse.y:4168 +#: parse.y:4669 #, fuzzy, c-format msgid "unexpected token %d in conditional command" msgstr "Soek die l�er vir 'n uitdrukking" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "" -#: parse.y:5477 +#: parse.y:6137 #, fuzzy, c-format msgid "syntax error near `%s'" msgstr "Sintaks fout in patroon" -#: parse.y:5487 +#: parse.y:6151 #, fuzzy msgid "syntax error: unexpected end of file" msgstr "Onverwagte einde van l�er tydens inlees van hulpbron." -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "sintaksfout" -#: parse.y:5549 +#: parse.y:6216 #, fuzzy, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Gebruik Kaart na Los Tronk" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" msgstr "" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "" -#: redir.c:166 +#: redir.c:205 #, fuzzy, c-format msgid "%s: ambiguous redirect" msgstr "%s: dubbelsinnige herroetering" -#: redir.c:170 +#: redir.c:209 #, fuzzy, c-format msgid "%s: cannot overwrite existing file" msgstr "Jy het gespesifiseer 'n bestaande l�er" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" msgstr "" -#: redir.c:184 +#: redir.c:223 #, fuzzy, c-format msgid "%s: cannot assign fd to variable" msgstr "Kan nie soek 'n handtekening in hierdie boodskap!" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 #, fuzzy msgid "redirection error: cannot duplicate fd" msgstr "Pypfout.\n" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 #, fuzzy, c-format msgid "%c%c: invalid option" msgstr "%s: illegal option -- %c\n" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: is 'n gids" + +#: shell.c:1907 msgid "I have no name!" msgstr "Ek het nie 'n naam nie!" -#: shell.c:1793 +#: shell.c:2061 #, fuzzy, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "bedryfstelselkernweergawe" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" "\t%s [GNU long option] [option] script-file ...\n" msgstr "" -#: shell.c:1796 +#: shell.c:2064 #, fuzzy msgid "GNU long options:\n" msgstr "Gnu C Saamsteller Opsies" -#: shell.c:1800 +#: shell.c:2068 #, 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" +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" msgstr "" -#: shell.c:1816 +#: shell.c:2088 #, fuzzy, c-format msgid "\t-%s or -o option\n" msgstr "" "Gebruik so: %s L�ER \n" " of: %s OPSIE\n" -#: shell.c:1822 +#: shell.c:2094 #, c-format msgid "Type `%s -c \"help set\"' for more information about shell options.\n" msgstr "" -#: shell.c:1823 +#: shell.c:2095 #, c-format msgid "Type `%s -c help' for more information about shell builtin commands.\n" msgstr "" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "" @@ -1602,7 +1828,9 @@ msgstr "w #: siglist.c:111 #, fuzzy msgid "Terminated" -msgstr "Gedruk: %s" +msgstr "" +"\n" +"Bevel be�indig\n" #: siglist.c:115 #, fuzzy @@ -1717,650 +1945,674 @@ msgstr "" msgid "Information request" msgstr "" -#: siglist.c:223 -#, fuzzy -msgid "Unknown Signal #" -msgstr "Sein kwaliteit:" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, fuzzy, c-format msgid "Unknown Signal #%d" msgstr "Sein kwaliteit:" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, fuzzy, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "--Geen re�ls in buffer--" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 #, fuzzy msgid "cannot make pipe for process substitution" msgstr "Woord Substitusie" -#: subst.c:4802 +#: subst.c:6124 #, fuzzy msgid "cannot make child for process substitution" msgstr "Woord Substitusie" -#: subst.c:4847 +#: subst.c:6198 #, fuzzy, c-format msgid "cannot open named pipe %s for reading" msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" -#: subst.c:4849 +#: subst.c:6200 #, fuzzy, c-format msgid "cannot open named pipe %s for writing" msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" -#: subst.c:4867 +#: subst.c:6223 #, fuzzy, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "Kan nie oopmaak vir skrip-afvoer nie: \"" -#: subst.c:5063 +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "--Geen re�ls in buffer--" + +#: subst.c:6533 #, fuzzy msgid "cannot make pipe for command substitution" msgstr "Woord Substitusie" -#: subst.c:5097 +#: subst.c:6580 #, fuzzy msgid "cannot make child for command substitution" msgstr "Woord Substitusie" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "Veranderlike boom" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, fuzzy, c-format msgid "%s: substring expression < 0" msgstr "ongeldige uitdrukking" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, fuzzy, c-format msgid "%s: bad substitution" msgstr "Woord Substitusie" -#: subst.c:7045 +#: subst.c:9678 #, fuzzy, c-format msgid "$%s: cannot assign in this way" msgstr "Kan nie soek 'n handtekening in hierdie boodskap!" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" -#: subst.c:7839 +#: subst.c:10795 #, fuzzy, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "--Geen re�ls in buffer--" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "" -#: test.c:146 +#: test.c:147 #, fuzzy msgid "argument expected" msgstr "argument verwag\n" -#: test.c:155 +#: test.c:156 #, fuzzy, c-format msgid "%s: integer expression expected" msgstr "%s: heelgetal-uitdrukking is verwag\n" -#: test.c:263 +#: test.c:265 #, fuzzy msgid "`)' expected" msgstr "')' is verwag\n" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, fuzzy, c-format msgid "%s: binary operator expected" msgstr "%s: bin�re operator is verwag\n" -#: test.c:811 +#: test.c:771 test.c:774 +#, fuzzy, c-format +msgid "%s: unary operator expected" +msgstr "%s: unit�re operator is verwag\n" + +#: test.c:896 #, fuzzy msgid "missing `]'" msgstr "Ontbrekende '>'" -#: trap.c:203 +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Onverwagte einde van l�er tydens inlees van hulpbron." + +#: trap.c:220 #, fuzzy msgid "invalid signal number" msgstr "Die sein nommer wat was gevang het" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" msgstr "" -#: trap.c:331 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" msgstr "" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "" -#: variables.c:3376 +#: variables.c:4757 #, c-format msgid "%s has null exportstr" msgstr "" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" msgstr "" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" msgstr "" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: kan nie %s skep nie" +msgstr "" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" msgstr "" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." msgstr "" -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." msgstr "" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." 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 \n" -msgstr "" - -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "" -#: xmalloc.c:93 +#: xmalloc.c:95 #, fuzzy, c-format msgid "%s: cannot allocate %lu bytes" msgstr "%s: kan nie %s skep nie" -#: xmalloc.c:163 +#: xmalloc.c:165 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "" -#: xmalloc.c:165 +#: xmalloc.c:167 #, fuzzy, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" msgstr "%s: kan nie %s skep nie" -#: builtins.c:43 +#: builtins.c:45 #, fuzzy msgid "alias [-p] [name[=value] ... ]" msgstr "E418: Ongeldige waarde: %s" -#: builtins.c:47 +#: builtins.c:49 #, fuzzy msgid "unalias [-a] name [name ...]" msgstr "Volle Naam:" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" msgstr "" -#: builtins.c:54 +#: builtins.c:56 #, fuzzy msgid "break [n]" msgstr "Breek" -#: builtins.c:56 +#: builtins.c:58 #, fuzzy msgid "continue [n]" msgstr "Gaan voort" -#: builtins.c:58 +#: builtins.c:60 #, fuzzy msgid "builtin [shell-builtin [arg ...]]" msgstr "Ontfouting %1 (met arg %2 %3)" -#: builtins.c:61 +#: builtins.c:63 #, fuzzy msgid "caller [expr]" msgstr "/Opsies/Toets" -#: builtins.c:64 +#: builtins.c:66 #, fuzzy -msgid "cd [-L|-P] [dir]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" msgstr "init_cache_dir %s... " -#: builtins.c:66 +#: builtins.c:68 #, 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 +#: builtins.c:76 #, fuzzy msgid "command [-pVv] command [arg ...]" msgstr "Gebruik so: %s [OPSIE] [BEVEL [ARG]...]\n" -#: builtins.c:76 +#: builtins.c:78 #, fuzzy -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" msgstr "E418: Ongeldige waarde: %s" -#: builtins.c:78 +#: builtins.c:80 #, fuzzy -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" msgstr "E418: Ongeldige waarde: %s" -#: builtins.c:80 +#: builtins.c:82 #, fuzzy msgid "local [option] name[=value] ..." msgstr "Name=Plaaslike Netwerk" -#: builtins.c:83 +#: builtins.c:85 #, fuzzy msgid "echo [-neE] [arg ...]" msgstr "Ontfouting %1 (met arg %2 %3)" -#: builtins.c:87 +#: builtins.c:89 #, fuzzy msgid "echo [-n] [arg ...]" msgstr "Konfigureer Eggo" -#: builtins.c:90 +#: builtins.c:92 #, fuzzy msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "Teruglus l�ernaam:" -#: builtins.c:92 +#: builtins.c:94 #, 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 "" +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "Kom ons begin!" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "" + +#: builtins.c:100 #, fuzzy msgid "exit [n]" msgstr "Verlaat" -#: builtins.c:100 +#: builtins.c:102 #, fuzzy msgid "logout [n]" msgstr "Afteken" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" msgstr "" -#: builtins.c:107 +#: builtins.c:109 #, fuzzy msgid "fg [job_spec]" msgstr "Kort Spesifikasie werkvoorbeeld" -#: builtins.c:111 +#: builtins.c:113 #, fuzzy msgid "bg [job_spec ...]" msgstr "Kort Spesifikasie werkvoorbeeld" -#: builtins.c:114 +#: builtins.c:116 #, fuzzy msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "Teruglus l�ernaam:" -#: builtins.c:117 +#: builtins.c:119 #, fuzzy msgid "help [-dms] [pattern ...]" msgstr "enige patroon" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" msgstr "" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" msgstr "" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" msgstr "" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" msgstr "" -#: builtins.c:134 +#: builtins.c:136 #, fuzzy msgid "let arg [arg ...]" msgstr "Kom ons begin!" -#: builtins.c:136 +#: builtins.c:138 msgid "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " "prompt] [-t timeout] [-u fd] [name ...]" msgstr "" -#: builtins.c:138 +#: builtins.c:140 #, fuzzy msgid "return [n]" msgstr "Terug Adres - 3/4 x 2\"" -#: builtins.c:140 +#: builtins.c:142 #, fuzzy -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" msgstr "Gebruik so: %s [OPSIE]... [-] [GEBRUIKER [ARG]...]\n" -#: builtins.c:142 +#: builtins.c:144 #, fuzzy -msgid "unset [-f] [-v] [name ...]" +msgid "unset [-f] [-v] [-n] [name ...]" msgstr "Volle Naam:" -#: builtins.c:144 +#: builtins.c:146 #, fuzzy msgid "export [-fn] [name[=value] ...] or export -p" msgstr "Bediener of domein naam:" -#: builtins.c:146 +#: builtins.c:148 #, fuzzy -msgid "readonly [-af] [name[=value] ...] or readonly -p" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" msgstr "Bediener of domein naam:" -#: builtins.c:148 +#: builtins.c:150 #, fuzzy msgid "shift [n]" -msgstr "Verlaat" +msgstr "Shift" -#: builtins.c:150 +#: builtins.c:152 #, fuzzy msgid "source filename [arguments]" msgstr "Kies L�ernaam" -#: builtins.c:152 +#: builtins.c:154 #, fuzzy msgid ". filename [arguments]" msgstr ". l�ernaam" -#: builtins.c:155 +#: builtins.c:157 #, fuzzy msgid "suspend [-f]" msgstr "|uitsit}\n" -#: builtins.c:158 +#: builtins.c:160 #, fuzzy msgid "test [expr]" msgstr "/Opsies/Toets" -#: builtins.c:160 +#: builtins.c:162 #, fuzzy msgid "[ arg... ]" msgstr "Arg %1" -#: builtins.c:162 -#, fuzzy -msgid "times" -msgstr "Herhaal %1 times " - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "" -#: builtins.c:166 +#: builtins.c:168 #, fuzzy msgid "type [-afptP] name [name ...]" msgstr "Tipe die naam van die %1 speler." -#: builtins.c:169 +#: builtins.c:171 #, fuzzy -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" msgstr "Grootte beperk (Kb):" -#: builtins.c:172 +#: builtins.c:174 #, fuzzy msgid "umask [-p] [-S] [mode]" msgstr "Belmetode" -#: builtins.c:175 +#: builtins.c:177 #, fuzzy -msgid "wait [id]" -msgstr "Wag:" +msgid "wait [-fn] [-p var] [id ...]" +msgstr "Konfigureer Eggo" -#: builtins.c:179 +#: builtins.c:181 #, fuzzy -msgid "wait [pid]" +msgid "wait [pid ...]" msgstr "Wag:" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" msgstr "" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "" -#: builtins.c:196 +#: builtins.c:198 #, fuzzy -msgid "until COMMANDS; do COMMANDS; done" +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "Bediener of domein naam:" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "" -#: builtins.c:200 +#: builtins.c:202 #, fuzzy msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "Bediener of domein naam:" -#: builtins.c:202 +#: builtins.c:204 #, fuzzy msgid "{ COMMANDS ; }" msgstr "Opdragte" -#: builtins.c:204 +#: builtins.c:206 #, fuzzy msgid "job_spec [&]" msgstr "Kort Spesifikasie werkvoorbeeld" -#: builtins.c:206 +#: builtins.c:208 #, fuzzy msgid "(( expression ))" msgstr "Bools uitdrukking verwag" -#: builtins.c:208 +#: builtins.c:210 #, fuzzy msgid "[[ expression ]]" msgstr "Bools uitdrukking verwag" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "" -#: builtins.c:213 +#: builtins.c:215 #, fuzzy msgid "pushd [-n] [+N | -N | dir]" msgstr "Tydelike gids:" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "" -#: builtins.c:224 +#: builtins.c:226 #, fuzzy msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "Volle Naam:" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" msgstr "" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 +#: builtins.c:239 #, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "Tipe die naam van die %1 speler." +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "Volle Naam:" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2372,7 +2624,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2380,17 +2632,17 @@ msgid "" " defined." msgstr "" -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2424,12 +2676,15 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2440,7 +2695,7 @@ msgid "" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2451,7 +2706,7 @@ msgid "" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2462,10 +2717,10 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2481,7 +2736,7 @@ msgid "" " is invalid." msgstr "" -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2504,23 +2759,35 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2530,7 +2797,7 @@ msgid "" " cannot be read." msgstr "" -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2540,7 +2807,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2548,7 +2815,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2556,7 +2823,7 @@ msgid "" " Always fails." msgstr "" -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2566,16 +2833,16 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2585,17 +2852,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2605,20 +2877,21 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2629,15 +2902,17 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2649,6 +2924,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2656,15 +2932,21 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2677,7 +2959,7 @@ msgid "" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2704,7 +2986,7 @@ msgid "" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2716,7 +2998,7 @@ msgid "" " Returns exit status of command or success if command is null." msgstr "" -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2749,15 +3031,15 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2768,8 +3050,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2780,7 +3062,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -2788,7 +3070,7 @@ msgid "" " is that of the last command executed." msgstr "" -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2797,7 +3079,7 @@ msgid "" " in a login shell." msgstr "" -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2827,7 +3109,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2839,7 +3121,7 @@ msgid "" " Status of command placed in foreground, or failure if an error occurs." msgstr "" -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2853,7 +3135,7 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -2862,22 +3144,22 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2889,17 +3171,17 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying 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 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2908,23 +3190,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -2933,7 +3216,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2942,8 +3225,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2957,7 +3240,7 @@ msgid "" " If -x is used, returns the exit status of COMMAND." msgstr "" -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2967,14 +3250,14 @@ msgid "" " 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" +" \t\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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2986,7 +3269,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2996,7 +3280,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3038,10 +3322,10 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" -#: builtins.c:966 +#: builtins.c:994 msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -3052,7 +3336,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3062,34 +3348,38 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3101,7 +3391,7 @@ msgid "" " Returns N, or failure if the shell is not executing a function or script." msgstr "" -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3167,9 +3457,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3183,7 +3477,7 @@ msgid "" " Returns success unless an invalid option is given." msgstr "" -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3192,6 +3486,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3203,7 +3499,7 @@ msgid "" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3222,7 +3518,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3234,7 +3530,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3242,7 +3539,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3253,7 +3550,7 @@ msgid "" " Returns success unless N is negative or greater than $#." msgstr "" -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3267,7 +3564,7 @@ msgid "" " FILENAME cannot be read." msgstr "" -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3281,14 +3578,17 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3342,6 +3642,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3358,7 +3661,7 @@ msgid "" " false or an invalid argument is given." msgstr "" -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -3366,7 +3669,7 @@ msgid "" " be a literal `]', to match the opening `['." msgstr "" -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3378,7 +3681,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3394,7 +3697,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3414,7 +3725,7 @@ msgid "" "given." msgstr "" -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3423,18 +3734,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3444,7 +3755,7 @@ msgid "" "found." msgstr "" -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -3462,6 +3773,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3473,6 +3785,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3488,7 +3805,7 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3506,38 +3823,54 @@ msgid "" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3550,7 +3883,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3567,7 +3900,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3587,7 +3920,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3603,7 +3936,7 @@ msgid "" " The return status is the return status of PIPELINE." msgstr "" -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3614,7 +3947,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3635,29 +3968,31 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1580 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3667,10 +4002,10 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3684,7 +4019,7 @@ msgid "" " Returns success unless NAME is readonly." msgstr "" -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3695,7 +4030,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3709,18 +4044,18 @@ msgid "" " Returns the status of the resumed job." msgstr "" -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3748,7 +4083,7 @@ msgid "" " 0 or 1 depending on value of EXPRESSION." msgstr "" -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3802,7 +4137,7 @@ msgid "" " \t\tcommands should be saved on the history list.\n" msgstr "" -#: builtins.c:1754 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3812,19 +4147,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3833,7 +4168,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3842,16 +4177,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3860,7 +4195,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3871,32 +4206,31 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3910,7 +4244,7 @@ msgid "" " given or OPTNAME is disabled." msgstr "" -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3927,12 +4261,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -3940,7 +4285,7 @@ msgid "" " error occurs." msgstr "" -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -3953,21 +4298,25 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -3980,13 +4329,13 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -3995,6 +4344,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4011,7 +4361,7 @@ msgid "" " have a completion specification defined." msgstr "" -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -4022,24 +4372,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -4051,7 +4403,7 @@ msgid "" " not an indexed array." msgstr "" -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -4059,19 +4411,8 @@ msgid "" 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 "Unknown Signal #" +#~ msgstr "Sein kwaliteit:" #~ msgid "Missing `}'" #~ msgstr "Ontbrekende `}'" @@ -4132,6 +4473,14 @@ msgstr "" #~ msgid "You have entered %d (%d) items. The distribution is:\n" #~ msgstr "Die wagwoord frase jy ingevoerde is ongeldige." +#, fuzzy +#~ msgid "slot %3d: " +#~ msgstr "3d modus" + +#, fuzzy +#~ msgid "" +#~ msgstr "(onbekend)" + #, fuzzy #~ msgid "%s: bg background job?" #~ msgstr "Druktaak gestuur." @@ -4152,14 +4501,14 @@ msgstr "" #~ 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 "writing" +#~ msgstr "besig om te skryf" + #, fuzzy #~ msgid "$%c: unbound variable" #~ msgstr "Veranderlike boom" @@ -4208,10 +4557,6 @@ msgstr "" #~ 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." @@ -4236,6 +4581,13 @@ msgstr "" #~ msgid "mkbuiltins: Out of virtual memory!\n" #~ msgstr "GenericName=Virtuele Geheue Statistieke" +#~ msgid ":" +#~ msgstr ":" + +#, fuzzy +#~ msgid "times" +#~ msgstr "Herhaal %1 times " + #, fuzzy #~ msgid "%[DIGITS | WORD] [&]" #~ msgstr "Woord oorvloei" @@ -4276,6 +4628,10 @@ msgstr "" #~ msgid "name only." #~ msgstr "Naam slegs" +#, fuzzy +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Verkeerde verklaring tipe" + #, fuzzy #~ msgid "\t\\a\talert (bell)" #~ msgstr "stelsel klok" @@ -4312,6 +4668,10 @@ msgstr "" #~ msgid "with the -E option." #~ msgstr "%s: illegal option -- %c\n" +#, fuzzy +#~ msgid "printed." +#~ msgstr "Gedruk: %s" + #, fuzzy #~ msgid "is set." #~ msgstr "Nie stel" diff --git a/po/bash.pot b/po/bash.pot index 68d33f8..767b0af 100644 --- a/po/bash.pot +++ b/po/bash.pot @@ -8,290 +8,325 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-30 08:25-0500\n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \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 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" +msgid "%s: removing nameref attribute" msgstr "" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" +msgid "%s: cannot convert indexed to associative array" msgstr "" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" msgstr "" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "" -#: builtins/alias.def:132 +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 #, c-format msgid "`%s': invalid alias name" msgstr "" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "" -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "" -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "" -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" msgstr "" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" msgstr "" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "" @@ -304,121 +339,156 @@ msgstr "" msgid "warning: -C option may not work as you expect" msgstr "" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" msgstr "" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" msgstr "" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, c-format msgid "%s: cannot delete: %s" msgstr "" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" msgstr "" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, c-format msgid "%s: cannot open temp file: %s" msgstr "" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "" @@ -433,39 +503,44 @@ msgstr "" msgid "%s: option requires an argument -- %c\n" msgstr "" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" msgstr[0] "" msgstr[1] "" -#: builtins/help.def:168 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." msgstr "" -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -477,15 +552,21 @@ msgid "" "\n" msgstr "" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "" @@ -499,93 +580,113 @@ msgstr "" msgid "no other options allowed with `-x'" msgstr "" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "" -#: builtins/mapfile.def:165 +#: builtins/mapfile.def:180 #, c-format msgid "%s: not an indexed array" msgstr "" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -609,7 +710,7 @@ msgid "" "\tdirs when invoked without options, starting with zero." msgstr "" -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -634,7 +735,7 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -655,53 +756,48 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format -msgid "%s: cannot unset: readonly %s" +msgid "%s: not an array variable" msgstr "" -#: builtins/set.def:823 +#: builtins/setattr.def:189 #, c-format -msgid "%s: not an array variable" +msgid "%s: not a function" msgstr "" -#: builtins/setattr.def:186 +#: builtins/setattr.def:194 #, c-format -msgid "%s: not a function" +msgid "%s: cannot export" msgstr "" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "" @@ -710,455 +806,540 @@ msgstr "" msgid "filename argument required" msgstr "" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" msgstr "" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr "" -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "" -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "" + +#: error.c:488 msgid "unknown command error" msgstr "" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" msgstr "" -#: eval.c:181 -#, c-format -msgid "timed out waiting for input: auto-logout\n" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" msgstr "" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" msgstr "" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "" + +#: expr.c:1603 msgid "value too great for base" msgstr "" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "" -#: input.c:258 +#: input.c:266 #, c-format msgid "cannot allocate new file descriptor for bash input from fd %d" msgstr "" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" msgstr "" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" msgstr "" -#: jobs.c:1110 +#: jobs.c:1397 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" +msgid "deleting stopped job %d with process group %ld" msgstr "" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" msgstr "" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr "" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" msgstr "" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "" -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr "" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" msgstr "" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" msgstr "" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" msgstr "" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "" @@ -1177,300 +1358,349 @@ msgstr "" msgid "%s: bad network path specification" msgstr "" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" msgstr "" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" msgstr "" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" msgstr "" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" msgstr "" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" msgstr "" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" msgstr "" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" msgstr "" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" msgstr "" -#: redir.c:184 +#: redir.c:223 #, c-format msgid "%s: cannot assign fd to variable" msgstr "" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "" + +#: shell.c:1907 msgid "I have no name!" msgstr "" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" "\t%s [GNU long option] [option] script-file ...\n" msgstr "" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" msgstr "" -#: shell.c:1801 -msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" msgstr "" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "" -#: shell.c:1822 +#: shell.c:2094 #, c-format msgid "Type `%s -c \"help set\"' for more information about shell options.\n" msgstr "" -#: shell.c:1823 +#: shell.c:2095 #, c-format msgid "Type `%s -c help' for more information about shell builtin commands.\n" msgstr "" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "" @@ -1635,592 +1865,616 @@ msgstr "" msgid "Information request" msgstr "" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" msgstr "" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" +msgid "%s: binary operator expected" msgstr "" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" +msgid "%s: unary operator expected" msgstr "" -#: test.c:811 +#: test.c:896 msgid "missing `]'" msgstr "" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "" + +#: trap.c:220 msgid "invalid signal number" msgstr "" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" msgstr "" -#: trap.c:331 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" msgstr "" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "" -#: variables.c:3376 +#: variables.c:4757 #, c-format msgid "%s has null exportstr" msgstr "" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" msgstr "" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" msgstr "" -#: variables.c:4678 +#: variables.c:6400 #, c-format msgid "%s: %s: cannot open as FILE" msgstr "" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" msgstr "" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." msgstr "" -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." msgstr "" -#: version2.c:87 -#, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." msgstr "" -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "" -#: xmalloc.c:93 +#: xmalloc.c:95 #, c-format msgid "%s: cannot allocate %lu bytes" msgstr "" -#: xmalloc.c:163 +#: xmalloc.c:165 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "" -#: xmalloc.c:165 +#: xmalloc.c:167 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" msgstr "" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" msgstr "" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" msgstr "" -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" - #: builtins.c:66 -msgid "pwd [-LP]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" 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 ...]" +msgid "pwd [-LP]" msgstr "" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" +msgid "command [-pVv] command [arg ...]" msgstr "" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" msgstr "" #: builtins.c:80 +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "" + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "" -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "" -#: builtins.c:90 -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" - #: builtins.c:92 -msgid "eval [arg ...]" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "" #: builtins.c:94 -msgid "getopts optstring name [arg]" +msgid "eval [arg ...]" msgstr "" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" +msgid "getopts optstring name [arg ...]" msgstr "" #: builtins.c:98 -msgid "exit [n]" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" msgstr "" #: builtins.c:100 +msgid "exit [n]" +msgstr "" + +#: builtins.c:102 msgid "logout [n]" msgstr "" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" msgstr "" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" msgstr "" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" msgstr "" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" msgstr "" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" msgstr "" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" msgstr "" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "" -#: builtins.c:136 +#: builtins.c:138 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 ...]" +msgid "return [n]" msgstr "" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" msgstr "" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" +msgid "unset [-f] [-v] [-n] [name ...]" msgstr "" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" msgstr "" #: builtins.c:148 -msgid "shift [n]" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" msgstr "" #: builtins.c:150 -msgid "source filename [arguments]" +msgid "shift [n]" msgstr "" #: builtins.c:152 -msgid ". filename [arguments]" +msgid "source filename [arguments]" msgstr "" -#: builtins.c:155 -msgid "suspend [-f]" +#: builtins.c:154 +msgid ". filename [arguments]" msgstr "" -#: builtins.c:158 -msgid "test [expr]" +#: builtins.c:157 +msgid "suspend [-f]" msgstr "" #: builtins.c:160 -msgid "[ arg... ]" +msgid "test [expr]" msgstr "" #: builtins.c:162 -msgid "times" +msgid "[ arg... ]" msgstr "" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" msgstr "" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "" -#: builtins.c:175 -msgid "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" msgstr "" -#: builtins.c:179 -msgid "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" msgstr "" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "" -#: builtins.c:192 +#: builtins.c:194 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" +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgid "coproc [NAME] command [redirections]" msgstr "" #: builtins.c:202 -msgid "{ COMMANDS ; }" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "" #: builtins.c:204 -msgid "job_spec [&]" +msgid "{ COMMANDS ; }" msgstr "" #: builtins.c:206 -msgid "(( expression ))" +msgid "job_spec [&]" msgstr "" #: builtins.c:208 -msgid "[[ expression ]]" +msgid "(( expression ))" msgstr "" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" msgstr "" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 ...]" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" msgstr "" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2232,7 +2486,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2240,17 +2494,17 @@ msgid "" " defined." msgstr "" -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2284,12 +2538,15 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2300,7 +2557,7 @@ msgid "" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2311,7 +2568,7 @@ msgid "" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2322,10 +2579,10 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2341,7 +2598,7 @@ msgid "" " is invalid." msgstr "" -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2364,23 +2621,35 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2390,7 +2659,7 @@ msgid "" " cannot be read." msgstr "" -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2400,7 +2669,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2408,7 +2677,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2416,7 +2685,7 @@ msgid "" " Always fails." msgstr "" -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2426,16 +2695,16 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2445,17 +2714,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2465,20 +2739,21 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2489,15 +2764,17 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2509,6 +2786,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2516,15 +2794,21 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2537,7 +2821,7 @@ msgid "" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2564,7 +2848,7 @@ msgid "" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2576,7 +2860,7 @@ msgid "" " Returns exit status of command or success if command is null." msgstr "" -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2609,15 +2893,15 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2628,8 +2912,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2640,7 +2924,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -2648,7 +2932,7 @@ msgid "" " is that of the last command executed." msgstr "" -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2657,7 +2941,7 @@ msgid "" " in a login shell." msgstr "" -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2687,7 +2971,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2699,7 +2983,7 @@ msgid "" " Status of command placed in foreground, or failure if an error occurs." msgstr "" -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2713,7 +2997,7 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -2722,22 +3006,22 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2749,17 +3033,17 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying 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 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2768,23 +3052,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -2793,7 +3078,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2802,8 +3087,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2817,7 +3102,7 @@ msgid "" " If -x is used, returns the exit status of COMMAND." msgstr "" -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2827,14 +3112,14 @@ msgid "" " 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" +" \t\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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2846,7 +3131,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2856,7 +3142,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -2898,10 +3184,10 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" -#: builtins.c:966 +#: builtins.c:994 msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -2912,7 +3198,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -2922,34 +3210,38 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -2961,7 +3253,7 @@ msgid "" " Returns N, or failure if the shell is not executing a function or script." msgstr "" -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3027,9 +3319,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3043,7 +3339,7 @@ msgid "" " Returns success unless an invalid option is given." msgstr "" -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3052,6 +3348,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3063,7 +3361,7 @@ msgid "" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3082,7 +3380,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3094,7 +3392,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3102,7 +3401,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3113,7 +3412,7 @@ msgid "" " Returns success unless N is negative or greater than $#." msgstr "" -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3127,7 +3426,7 @@ msgid "" " FILENAME cannot be read." msgstr "" -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3141,14 +3440,17 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3202,6 +3504,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3218,7 +3523,7 @@ msgid "" " false or an invalid argument is given." msgstr "" -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -3226,7 +3531,7 @@ msgid "" " be a literal `]', to match the opening `['." msgstr "" -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3238,7 +3543,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3254,7 +3559,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3274,7 +3587,7 @@ msgid "" "given." msgstr "" -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3283,18 +3596,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3304,7 +3617,7 @@ msgid "" "found." msgstr "" -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -3322,6 +3635,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3333,6 +3647,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3348,7 +3667,7 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3366,38 +3685,54 @@ msgid "" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3410,7 +3745,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3427,7 +3762,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3447,7 +3782,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3463,7 +3798,7 @@ msgid "" " The return status is the return status of PIPELINE." msgstr "" -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3474,7 +3809,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3495,29 +3830,31 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1580 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3527,10 +3864,10 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3544,7 +3881,7 @@ msgid "" " Returns success unless NAME is readonly." msgstr "" -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3555,7 +3892,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3569,18 +3906,18 @@ msgid "" " Returns the status of the resumed job." msgstr "" -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3608,7 +3945,7 @@ msgid "" " 0 or 1 depending on value of EXPRESSION." msgstr "" -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3662,7 +3999,7 @@ msgid "" " \t\tcommands should be saved on the history list.\n" msgstr "" -#: builtins.c:1754 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3672,19 +4009,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3693,7 +4030,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3702,16 +4039,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3720,7 +4057,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3731,32 +4068,31 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3770,7 +4106,7 @@ msgid "" " given or OPTNAME is disabled." msgstr "" -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3787,12 +4123,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -3800,7 +4147,7 @@ msgid "" " error occurs." msgstr "" -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -3813,21 +4160,25 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -3840,13 +4191,13 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -3855,6 +4206,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3871,7 +4223,7 @@ msgid "" " have a completion specification defined." msgstr "" -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -3882,24 +4234,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -3911,7 +4265,7 @@ msgid "" " not an indexed array." msgstr "" -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" diff --git a/po/bg.gmo b/po/bg.gmo index ecba6d2..8638773 100644 Binary files a/po/bg.gmo and b/po/bg.gmo differ diff --git a/po/bg.po b/po/bg.po index 8363cbf..68331a5 100644 --- a/po/bg.po +++ b/po/bg.po @@ -1,301 +1,342 @@ # Bulgarian translation of bash po-file. -# Copyright (C) 2007 Free Software Foundation, Inc. +# Copyright (C) 2007, 2010, 2012, 2013, 2014, 2015, 2016, 2018, 2020, 2022 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. -# Alexander Shopov , 2007. +# Alexander Shopov , 2007, 2010, 2012, 2013, 2014, 2015, 2016, 2018, 2020, 2022. # msgid "" msgstr "" -"Project-Id-Version: bash 3.2\n" +"Project-Id-Version: bash-5.2-rc1\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 \n" -"Language-Team: Bulgarian \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-18 14:33+0200\n" +"Last-Translator: Alexander Shopov \n" +"Language-Team: Bulgarian \n" +"Language: bg\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-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "неправилен индекс на масив" +msgstr "грешен индекс на масив" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: изтриване на атрибута за указател от променливата" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s: грешно име на действие" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: масивът не може да бъде преобразуван към речник" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: не може да се присвоява на нецифров индекс" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: при присвояване към речник трябва да се използва индекс" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: не може да се създаде: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "" "изпълнение на команда на Юникс от bash: не може да се открие подредбата на\n" "функциите на клавишите за командата" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: първият непразен знак не е „\"“" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "в %2$s липсва затварящ знак „%1$c“" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "%s: разделителят двоеточие липсва" +msgstr "%s: разделителят „:“ липсва" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: неуспешно премахне на присвояване в подредбата на функциите на клавишите" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "заместване на изразите с фигурни скоби: неуспешно заделяне на памет за „%s“" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "заместване на изразите с фигурни скоби: неуспешно заделяне на памет за %u елемента" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "заместване на изразите с фигурни скоби: неуспешно заделяне на памет за „%s“" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "„%s“: грешно име на подредбата на функциите на клавишите" +msgstr "„%s“: грешно име на синоним" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "редактирането на командния ред не е включено" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "„%s“: грешно име на подредбата на функциите на клавишите" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "„%s“: непознато име на функция" +msgstr "„%s“: име на непозната функция" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "%s не може да се зададе на никой клавиш.\n" +msgstr "%s не е зададена на никой клавиш.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s може да се извика чрез " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: не може да се премахне присвояване" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "" +msgstr "брой цикли" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "валидно само за циклите с „for“, „while“ и „until“" -#: builtins/caller.def:133 -#, fuzzy +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Връщане на контекста на текущото извикване на подпрограма.\n" +" \n" +" Без ИЗРАЗ връща „$line $filename“. С ИЗРАЗ връща\n" +" „$line $subroutine $filename“. Допълнителната информация може да се\n" +" използва за получаване на информация за състоянието на стека.\n" +" \n" +" Стойността на ИЗРАЗа показва за колко рамки спрямо текущата да се изведе\n" +" информация. Най-горната рамка е 0." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "Променливата $HOME не зададена" +msgstr "Променливата „HOME“ не е зададена" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "прекалено много аргументи" -#: builtins/cd.def:227 +#: builtins/cd.def:342 +msgid "null directory" +msgstr "нулева директория" + +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "Променливата $OLDPWD не е зададена" +msgstr "Променливата „OLDPWD“ не е зададена" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "" +msgstr "ред %d: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "%s: предупреждение: " +msgstr "предупреждение: " -#: builtins/common.c:153 -#, fuzzy, c-format +#: builtins/common.c:148 +#, c-format msgid "%s: usage: " -msgstr "%s: предупреждение: " +msgstr "%s: употреба: " -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "прекалено много аргументи" - -#: builtins/common.c:191 shell.c:499 shell.c:782 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: опцията изисква аргумент" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: изисква се числов аргумент" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: не е открит" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: грешна опция" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: грешно име на опция" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "„%s“: грешен идентификатор" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "неправилен номер на сигнал" +msgstr "грешно осмично число" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "грешно число" +msgstr "грешно шестнайсетично число" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "грешно число" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: грешно указване на сигнал" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "„%s“: неправилен идентификатор на процес или задача" +msgstr "„%s“: грешен идентификатор на процес или задача" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: променлива с права само за четене" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: не може да се присвои" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s е извън допустимия диапазон" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "аргументът" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s е извън допустимия диапазон" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: няма такава задача" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: няма управление на задачите" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "няма управление на задачите" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: ограничена обвивка" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "ограничена обвивка" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: не е команда вградена в обвивката" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "грешка при запис: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "грешка при задаване на атрибутите на терминала: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "грешка при получаване на атрибутите на терминала: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "%s: грешка при получаването на текущата директория: %s: %s\n" +msgstr "%s: грешка при получаване на текущата директория: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: нееднозначно указана задача" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "помощта не е включена в тази версия" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не може да се премахне: %s е само за четене" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не може да се премахне" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: грешно име на действие" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: не е указано дописване" @@ -308,121 +349,156 @@ msgstr "предупреждение: опцията „-F“ може да не msgid "warning: -C option may not work as you expect" msgstr "предупреждение: опцията „-C“ може да не работи според очакванията ви" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "в момента не се изпълнява функция за дописване" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "може да се използва само във функция" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "„-f“ не може да се използва за създаването на функции" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: функция с права само за четене" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: променливата-указател не може да е масив" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: променливата-указател не може да сочи към себе си" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: цикъл в променливите-указатели" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: неправилно име за променлива-указател" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "%s: променливите за масиви не могат да се унищожават така" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: речник не може да се преобразува в масив" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: съставното присвояване на масив чрез цитат е остаряло" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "липсва възможност за динамично зареждане" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" -msgstr "споделеният обект %s не може да бъде зареден: %s" +msgstr "споделеният обект „%s“ не може да бъде зареден: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "не може да се открие %s в споделения обект %s: %s" +msgstr "„%s“ не може да се открие в споделения обект %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: вградената команда вече е динамично заредена" -#: builtins/enable.def:459 +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "зареждащата функция за „%s“ върна грешка (%d): не е зареден" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: не е зареден динамично" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: е директория" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: не е обикновен файл" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: двоичният файл не може да бъде изпълнен" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: не може да се изпълни: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" -msgstr "" +msgstr "изход\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "това не е входна обвивка: използвайте „exit“" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Има спрени задачи.\n" -#: builtins/exit.def:122 -#, fuzzy, c-format +#: builtins/exit.def:123 +#, c-format msgid "There are running jobs.\n" -msgstr "Има спрени задачи.\n" +msgstr "Има изпълнявани задачи.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "не е открита команда" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "указване на историята" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, c-format msgid "%s: cannot open temp file: %s" msgstr "%s: не може да се отвори временен файл: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "текуща" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "задача %d е стартирана без управление на задачите" @@ -430,48 +506,54 @@ msgstr "задача %d е стартирана без управление на #: builtins/getopt.c:110 #, c-format msgid "%s: illegal option -- %c\n" -msgstr "%s: непозволена опция -- %c\n" +msgstr "%s: непозволена опция — %c\n" #: builtins/getopt.c:111 #, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "%s: опцията изисква аргумент -- %c\n" +msgstr "%s: опцията изисква аргумент — %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "хеширането е изключено" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: таблицата с хешове е празна\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "последна команда: %s\n" +msgstr "съвпад.\tкоманда\n" -#: builtins/help.def:130 -#, fuzzy, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" msgstr[0] "Команди на обвивката, които напасват на ключовата дума „" -msgstr[1] "Команди на обвивката, които напасват на ключовата дума „" +msgstr[1] "Команди на обвивката, които напасват на ключовите думи „" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" +msgstr "" +"“\n" +"\n" + +#: builtins/help.def:185 +#, 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 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: не може да се отвори: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -486,124 +568,146 @@ msgstr "" "Напишете „help“, за да видите списъка.\n" "Напишете „help ИМЕ_НА_ФУНКЦИЯ“ за повече информация за съответната функция.\n" "Напишете „info bash“ за повече информация за обвивката като цяло.\n" -"Напишете „man -k“ или „info“ за повече информация за командите извън " -"списъка.\n" +"Напишете „man -k“ или „info“ за повече информация за командите извън списъка.\n" "\n" "Знакът звездичка „*“ до името на команда означава, че тя е изключена.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "не може да се ползва едновременно повече от една от опциите -anrw" +msgstr "не може да се ползва едновременно повече от една от опциите „-anrw“" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "позиция в историята" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: грешна дата с време" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: неуспешно заместване чрез историята" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: неуспешно заместване чрез историята" +msgstr "%s: неуспешно извикване на inlib" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" msgstr "не е позволена друга опция с „-x“" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "%s: аргументите трябва да са идентификатори на процеси или задачи" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Неизвестна грешка" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "очаква се израз" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: не е променлива за масив" +msgstr "%s: не е масив" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: грешно указване на файловия дескриптор" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: грешен файлов дескриптор: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%s: грешна опция" +msgstr "%s: грешен номер на ред" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%s: грешна опция" +msgstr "%s: грешен начален индекс за масив" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "%s: грешно име на действие" +msgstr "%s: грешно количество редове за обработка" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: не е променлива за масив" +msgstr "празно име на променлива за масив" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "изисква се поддръжка на променливи за масиви" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "„%s“: липсва форматиращ знак" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: грешен формат на времето" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "„%c“: грешен форматиращ знак" -#: builtins/printf.def:578 -#, fuzzy, c-format +#: builtins/printf.def:734 +#, c-format msgid "warning: %s: %s" -msgstr "%s: предупреждение: " +msgstr "предупреждение: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "неуспешен анализ на форма̀та: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "липсва шестнадесетична цифра за \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "липсва цифра за Уникод за \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "няма друга директория" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: грешен аргумент" + +#: builtins/pushd.def:480 msgid "" msgstr "«няма текуща директория»" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "стекът с директории е празен" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "отрицателно препълване на стека за рекурсии" +msgstr "индекс за стека с директории" -#: builtins/pushd.def:683 -#, fuzzy +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -618,39 +722,32 @@ msgid "" " \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" +" +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" +" -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" +"Извежда списъка с текущо запомнените директории. Списъкът се попълва чрез\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 +" Опции:\n" +" -c изчиства стека на директориите като изтрива всички елементи.\n" +" -l кара командата „dirs“ да извежда пълните имена на директориите,\n" +" а не съкратените със тилда „~“.\n" +" -p поредово отпечатване на стека на директориите.\n" +" -v поредово отпечатване на стека на директориите заедно с номера в\n" +" стека.\n" +" \n" +" Аргументи: \n" +" +N извежда N-тия елемент отляво в списъка отпечатан от командата „dirs“,\n" +" когато е стартирана без опции. Брои се от 0.\n" +" \n" +" -N извежда N-тия елемент отдясно в списъка отпечатан от командата „dirs“,\n" +" когато е стартирана без опции. Брои се от 0." + +#: builtins/pushd.def:723 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" @@ -674,28 +771,29 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" -" Добавя директория в стека на директориите или превърта стека\n" +"Добавя директория в стека на директориите или превърта стека\n" " като най-горна директория става текущата директория. Без\n" " аргументи сменя най-горните две директории.\n" " \n" -" +N Превърта стека, така че N-тата директория (като се брои\n" -" от лявата страна на списъка, показан от командата „dirs“\n" -" като се почва от 0) да е най-отгоре.\n" +" Опции:\n" +" -n подтискане на нормалното преминаване към директория при добавянето на\n" +" директории към стека, така че се променя само той.\n" " \n" -" -N Превърта стека, така че N-тата директория (като се брои\n" -" от дясната страна на списъка, показан от командата „dirs“\n" -" като се почва от 0) да е най-отгоре.\n" +" Аргументи:\n" +" +N Превърта стека, така че N-тата директория (като се брои от лявата\n" +" страна на списъка, отпечатан от командата „dirs“ като се почва от 0)\n" +" да е най-отгоре.\n" " \n" -" -n подтискане на нормалното преминаване към директория при\n" -" добавянето на директории към стека, така че се променя само той.\n" -"\n" -" dir добавя ДИР най-отгоре в стека на директориите, като я прави\n" -" новата текуща работна директория.\n" +" -N Превърта стека, така че N-тата директория (като се брои от дясната\n" +" страна на списъка, отпечатан от командата „dirs“ като се почва от 0)\n" +" да е най-отгоре.\n" +" \n" +" dir Добавя ДИР най-отгоре в стека на директориите, като я прави новата\n" +" текуща работна директория.\n" " \n" " Можете да изведете стека на директорията с командата „dirs“." -#: builtins/pushd.def:730 -#, fuzzy +#: builtins/pushd.def:748 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" @@ -715,74 +813,66 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" -" Маха директории от стека с тях. Без аргументи\n" -" премахва последната директория в стека и влиза в новата\n" -" последна директория.\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“." +" Опции:\n" +" -n подтискане на нормалното преминаване към директория при махането на\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" +" Можете да изведете стека на директорията с командата „dirs“." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: грешно указване на изтичането на времето" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "грешка при четене: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "" -"„return“ е възможен само от функция или изпълнен в текущата обвивка скрипт" +msgstr "„return“ е възможен само от функция или изпълнен в текущата обвивка скрипт" -#: builtins/set.def:768 +#: builtins/set.def:869 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 е само за четене" +msgstr "не може едновременно да се премахват задаванията на функция и променлива" -#: builtins/set.def:823 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: не е променлива за масив" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: не е функция" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не може да се изнесе" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "брой на преместванията" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "" -"не може едновременно да се задават и да се премахват опции на обвивката" +msgstr "не може едновременно да се задават и да се премахват опции на обвивката" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: грешно име на опция на обвивката" @@ -791,406 +881,478 @@ msgstr "%s: грешно име на опция на обвивката" msgid "filename argument required" msgstr "изисква се аргумент име на файл" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: файлът не е открит" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "не може да бъде временно спряна" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "входната обвивка не може да бъде временно спряна" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s е синоним на „%s“\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "%s в ключова дума на обвивката\n" +msgstr "%s е ключова дума на обвивката\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s е функция\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s е специална, вградена команда в обвивката\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s е вградена команда в обвивката\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s е %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s е хеширан (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "%s: неправилен аргумент за ограничение" +msgstr "%s: грешен аргумент за ограничение" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "„%c“: неправилна команда" +msgstr "„%c“: грешна команда" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: ограничението не може да бъде получено: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" -msgstr "" +msgstr "ограничение" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: ограничението не може да бъде променено: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "осмично число" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "„%c“: неправилен оператор за описателен режим" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" msgstr "„%c“: неправилен знак за описателен режим" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " ред " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "последна команда: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Преустановяване…" -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ИНФОРМАЦИЯ: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "ПРЕДУПРЕЖДЕНИЕ: " + +#: error.c:488 msgid "unknown command error" msgstr "неизвестна грешка в команда" -#: error.c:407 +#: error.c:489 msgid "bad command type" -msgstr "неправилен вид команда" +msgstr "грешен вид команда" -#: error.c:408 +#: error.c:490 msgid "bad connector" -msgstr "лоша връзка" +msgstr "грешна връзка" -#: error.c:409 +#: error.c:491 msgid "bad jump" -msgstr "неправилен преход" +msgstr "грешен преход" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aвремето за изчакване на вход изтече: следва автоматично излизане от системата\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "стандартният вход от /dev/null не може да бъде пренасочен: %s" +msgstr "стандартният вход не може да бъде пренасочен от „/dev/null“: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "в променливата $TIMEFORMAT: „%c“: грешен форматиращ знак" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: копроцесът [%d:%s] все още съществува" + +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "грешка при запис: %s" +msgstr "грешка в програмен канал" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: превишено е максималното ниво на влагане на „eval“ (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: превишено е максималното ниво на влагане на код (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: превишено е максималното ниво на влагане на функции (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "" -"%s: ограничение: в имената на командите не може да присъства знакът „/“" +msgstr "%s: ограничение: в имената на командите не може да присъства знакът „/“" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: командата не е открита" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: не може да се изпълни — липсва необходим файл " + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: лош интерпретатор" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: двоичният файл не може да бъде изпълнен: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“ е вградена команда в обвивката" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "файловият дескриптор %d не може да се дублира като дескриптор %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "максималният брой нива за рекурсия в израз бяха преминати" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "отрицателно препълване на стека за рекурсии" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "синтактична грешка в израз" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "опит за присвояване на стойност на нещо, което не е променлива" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "синтактична грешка при присвояване на променлива" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "деление на 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "програмна грешка: неправилна лексема за присвояване на израз" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "за условен израз се изисква „:“" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "степента е по-малка от 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "очаква се идентификатор след предварително увеличаване или намаляване" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "липсва „)“" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "синтактична грешка: очаква се оператор" -#: expr.c:1178 -#, fuzzy +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "синтактична грешка: изисква се аритметичен израз" +msgstr "синтактична грешка: грешен аритметичен оператор" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "" +msgstr "%s%s%s: %s (грешната лексема е „%s“)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "грешна аритметична основа на бройна система" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "неправилна целочислена константа" + +#: expr.c:1603 msgid "value too great for base" msgstr "стойността е прекалено голяма за основата" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "%s: очаква се целочислен израз" +msgstr "%s: грешка в израза\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getcwd: родителските директории не могат да бъдат достъпени" +msgstr "getcwd: няма достъп до родителските директории" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "не може да се изчисти режимът без забавяне на файловия дескриптор %d" +msgstr "неуспешно изчистване на режима без забавяне на файловия дескриптор %d" -#: input.c:258 +#: input.c:266 #, c-format msgid "cannot allocate new file descriptor for bash input from fd %d" -msgstr "" -"не може да се задели нов файлов дескриптор за вход на bash от дескриптор %d" +msgstr "неуспешно заделяне на нов файлов дескриптор за вход на bash от дескриптор %d" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" -msgstr "" -"запазване на входа на bash: вече съществува буфер за новия файлов дескриптор " -"%d" +msgstr "запазване на входа на bash: вече съществува буфер за новия файлов дескриптор %d" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "" +"стартиране на програмен канал: не може да се комуникира с водача на канала\n" +"(pgrp pipe)" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: ЦИКЪЛ: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: ЦИКЪЛ: psi (%d) == storage[psi].bucket_next" -#: jobs.c:887 +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" -msgstr "" +msgstr "стартираният процес %d е в изпълняваната задача %d" -#: jobs.c:1005 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "добавяне на процес: процесът %5ld (%s) е отбелязан като още жив" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" -msgstr "" -"описателен идентификатор на процес: %ld: няма такъв идентификатор на процес" +msgstr "описателен идентификатор на процес: %ld: няма такъв идентификатор на процес" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" -msgstr "" +msgstr "Сигнал %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "" +msgstr "Завършен" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "" +msgstr "Спрян" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" -msgstr "" +msgstr "Спрян (%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "" +msgstr "Изпълняван" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "" +msgstr "Завършен (%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "" +msgstr "Изход %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "" +msgstr "Непознато състояние" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "" +msgstr "(паметта е разтоварена)" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr "" +msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" -msgstr "" +msgstr "дъщерният процес смени групата при изпълнение (от %ld на %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" msgstr "изчакване: процесът с идентификатор %ld не е дъщерен на тази обвивка" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "изчакване: липсват данни за процес с идентификатор %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "изчакване на задача: задачата %d е спряна" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: няма текуща задача" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: задачата е приключила" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: задача %d вече е във фонов режим" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" +"изчакване на дъщерен процес: включване на незабавното излизане от функцията\n" +"чрез WNOHANG, за да се избегне недефиниран блок" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "%s: предупреждение: " +msgstr "%s: ред %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr "" +msgstr " (паметта е разтоварена)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "" +msgstr "(работната директория е: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "" +msgstr "инициализация на контрола на задачите: неуспешно изпълнение на getpgrp" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "инициализация на контрола на задачите: няма управление на задачите във фонов режим" -#: jobs.c:3639 +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "" +msgstr "инициализация на контрола на задачите: дисциплина на линията" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "" +msgstr "инициализация на контрола на задачите: задаване на група при изпълнение (setpgid)" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "групата на процесите на терминала не може да бъде зададена (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "в тази обвивка няма управление на задачите" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "заделяне на памет: грешно предположение: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1199,67 +1361,72 @@ msgstr "" "\r\n" "заделяне на памет: %s:%d: предположението е отпечатано\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "%s: непознат хост" +msgstr "непознат" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" -"заделяне на памет: блок в списъка със свободни блокове е зает или неподходящ" +msgstr "заделяне на памет: блок в списъка със свободни блокове е зает или неподходящ" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" -"изчистване на памет: извикано е с блоков аргумент, който вече е изчистен" +msgstr "изчистване на памет: извикано е с блоков аргумент, който вече е изчистен" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "изчистване на памет: извикано е с незаделен блоков аргумент" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 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" +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" msgstr "" -"изчистване на памет: късовете на началната и крайната области се различават" +"изчистване на памет: открито е отрицателно препълване, неправилна стойност\n" +"за magic8" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "изчистване на памет: късовете на началната и крайната области се различават" + +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "презаделяне: извикано е с аргумент с незаделен блок" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "" "презаделяне: открито е отрицателно препълване с mh_nbytes извън допустимия\n" "диапазон" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "презаделяне: открито е отрицателно препълване, неправилна стойност за magic8" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "презаделяне: късовете на началната и крайната области се различават" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" -"регистриране на презаделяне: таблицата за заделянията е пълна с FIND_ALLOC?\n" +msgstr "регистриране на презаделяне: таблицата за заделянията е пълна с FIND_ALLOC?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" msgstr "регистриране на презаделяне: %p вече е в таблицата като заделен?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" msgstr "регистриране на свободни: %p вече е в таблицата като свободен?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "грешна основа на бройна система" @@ -1278,1090 +1445,1140 @@ msgstr "%s: неправилна услуга" msgid "%s: bad network path specification" msgstr "%s: неправилно указан мрежов път" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "не се поддържат мрежови операции" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: локалът не може да бъде сменен (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: локалът не може да бъде сменен (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "презаделяне на памет: %s:%d: %lu байта не могат да се заделят" +msgstr "setlocale: %s: локалът не може да бъде сменен (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "презаделяне на памет: %s:%d: %lu байта не могат да се заделят" +msgstr "setlocale: %s: локалът не може да бъде сменен (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Имате поща в $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Имате нова поща в $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Пощата в %s вече е прочетена\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "синтактична грешка: изисква се аритметичен израз" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "синтактична грешка: неочакван знак „;“" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "синтактична грешка: „((%s))“" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "вътрешен документ с „<<“: неправилен вид инструкция %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "вътрешният документ на ред %d е отделен със знак за нов ред (а трябва да е „%s“)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" -msgstr "" -"пренасочване: инструкцията за пренасочване „%d“ е извън допустимия диапазон" +msgstr "пренасочване: инструкцията за пренасочване „%d“ е извън допустимия диапазон" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) надвишава SIZE_MAX (%lu): редът е отрязан" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "превишен е максималният брой възможни вътрешни документи" -#: parse.y:3133 parse.y:3369 +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "" -"неочакван знак за край на файл „EOF“, а се очакваше съответстващ знак „%c“" +msgstr "неочакван знак за край на файл „EOF“, а се очакваше съответстващ знак „%c“" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "неочакван знак за край на файл „EOF“, а се очакваше „]]“" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "синтактична грешка в условен израз: неочаквана лексема „%s“" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "синтактична грешка в условен израз" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "неочаквана лексема „%s“, а се очакваше знакът „)“" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "очакваше се „)“" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "неочакван аргумент „%s“ за унарен условен оператор" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "неочакван аргумент за унарен условен оператор" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "неочаквана лексема „%s“, очакваше се бинарен условен оператор" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "очакваше се бинарен условен оператор" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "неочакван аргумент „%s“ за бинарен условен оператор" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "неочакван аргумент за бинарен условен оператор" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "неочаквана лексема „%c“ в условна команда" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "неочаквана лексема „%s“ в условна команда" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "неочаквана лексема %d в условна команда" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "синтактична грешка в близост до неочакваната лексема „%s“" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "синтактична грешка в близост до „%s“" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "синтактична грешка: неочакван край на файл" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "синтактична грешка" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Използвайте „%s“, за да излезете от обвивката.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "неочакван знак за край на файл „EOF“, очакваше се знакът „)“" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "дописване: функцията „%s“ не е открита" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: възможно зацикляне на повторните опити" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" -"вмъкване на завършване на команда: %s указване на команда, което е NULL" +msgstr "вмъкване на завършване на команда: %s указване на команда, което е NULL" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "команда за печат: лош конектор „%d“" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: грешен файлов дескриптор: %s" +msgstr "xtrace_set: %d: грешен файлов дескриптор" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: указател към файл – NULL" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "отпечатване: „%c“: неправилен форматиращ знак" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "файловият дескриптор е извън допустимия диапазон" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: двусмислено пренасочване" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: не може да се презапише съществуващ файл" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: поради ограничение изходът не може да се пренасочи" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, c-format msgid "cannot create temp file for here-document: %s" -msgstr "не може да се създаде временен файл за вътрешен документ с „<<“: %s" +msgstr "не може да се създаде временен файл за вътрешен документ: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: на член от масив не може да се присвои списък" +msgstr "%s: на променлива не може да се присвои файлов дескриптор" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "/dev/(tcp|udp)/host/port не се поддържа, ако няма поддръжка на мрежа" +msgstr "„/dev/(tcp|udp)/host/port“ не се поддържат, ако няма поддръжка на мрежа" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "грешка при пренасочване: файловият дескриптор не може да бъде дублиран" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "не е открита директорията /tmp. Създайте я!" +msgstr "не е открита директорията „/tmp“. Създайте я!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "/tmp трябва да е директория" +msgstr "„/tmp“ трябва да е директория" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "режимът за красив изход се игнорира при интерактивна работа" -#: shell.c:884 +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: неправилна опция" -#: shell.c:1651 -msgid "I have no name!" -msgstr "Не може да се получи името на текущия потребител!" +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" +"идентификаторът на потребител на процеса не може да се зададе да е %d,\n" +"ефективният идентификатор на потребител на процеса е %d" -#: shell.c:1793 +#: shell.c:1354 #, c-format -msgid "GNU bash, version %s-(%s)\n" +msgid "cannot set gid to %d: effective gid %d" msgstr "" +"идентификаторът на група на процеса не може да се зададе да е %d,\n" +"ефективният идентификатор на група на процеса е %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "режимът на изчистване на грешки е недостъпен, защото е изключен" -#: shell.c:1794 +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: е директория" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Не може да се получи името на текущия потребител!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, версия %s-(%s)\n" + +#: shell.c:2062 #, 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" +"Употреба: %s [дълга опция на GNU] [опция]…\n" +" %s [дълга опция на GNU] [опция] файл-скрипт…\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "Дълги опции на GNU:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr " -ilrsD или -c команда, или -O къса_опция (само при стартиране)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr " -%s или -o опция\n" -#: shell.c:1822 +#: shell.c:2094 #, c-format msgid "Type `%s -c \"help set\"' for more information about shell options.\n" -msgstr "" -"За повече информация за опциите на обвивката въведете „%s -c \"help set\"“.\n" +msgstr "За повече информация за опциите на обвивката въведете „%s -c \"help set\"“.\n" -#: shell.c:1823 +#: shell.c:2095 #, c-format msgid "Type `%s -c help' for more information about shell builtin commands.\n" -msgstr "" -"За повече информация за вградените в обвивката команди въведете „%s -c " -"help“.\n" +msgstr "За повече информация за вградените в обвивката команди въведете „%s -c help“.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "За да докладвате грешки използвайте командата „bashbug“.\n" +msgstr "За да докладвате грешки, използвайте командата „bashbug“.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Интернет страница на bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Обща помощ за програмите на GNU: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "маска за обработката на сигнали: %d: невалидна операция" +msgstr "маска за обработката на сигнали: %d: грешна операция" #: siglist.c:48 msgid "Bogus signal" -msgstr "" +msgstr "Фалшив сигнал" #: siglist.c:51 msgid "Hangup" -msgstr "" +msgstr "Прекъсване на връзката" #: siglist.c:55 msgid "Interrupt" -msgstr "" +msgstr "Прекъсване" #: siglist.c:59 msgid "Quit" -msgstr "" +msgstr "Спиране" #: siglist.c:63 msgid "Illegal instruction" -msgstr "" +msgstr "Неправилна инструкция" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "" +msgstr "Капан за авариен изход чрез BPT" #: siglist.c:75 msgid "ABORT instruction" -msgstr "" +msgstr "Инструкция за прекратяване" #: siglist.c:79 msgid "EMT instruction" -msgstr "" +msgstr "Капан с EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "" +msgstr "Изключение от плаваща запетая" #: siglist.c:87 msgid "Killed" -msgstr "" +msgstr "Убит" #: siglist.c:91 -#, fuzzy msgid "Bus error" -msgstr "синтактична грешка" +msgstr "Грешка в шината" #: siglist.c:95 msgid "Segmentation fault" -msgstr "" +msgstr "Грешка в разделянето" #: siglist.c:99 msgid "Bad system call" -msgstr "" +msgstr "Грешно системно извикване" #: siglist.c:103 msgid "Broken pipe" -msgstr "" +msgstr "Прекъснат програмен канал" #: siglist.c:107 msgid "Alarm clock" -msgstr "" +msgstr "Аларма" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "ограничена обвивка" +msgstr "Прекратен" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "" +msgstr "Спешно вх./изх. състояние" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "" +msgstr "Спрян (сигнал)" #: siglist.c:127 msgid "Continue" -msgstr "" +msgstr "Продължаване" #: siglist.c:135 msgid "Child death or stop" -msgstr "" +msgstr "Смърт или спиране на дъщерен процес" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "" +msgstr "Спиране (вход от tty)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "" +msgstr "Спиране (изход към tty)" #: siglist.c:147 msgid "I/O ready" -msgstr "" +msgstr "Готовност за вх./изх." #: siglist.c:151 msgid "CPU limit" -msgstr "" +msgstr "Ограничение на процесора" #: siglist.c:155 msgid "File limit" -msgstr "" +msgstr "Ограничение на файловете" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "" +msgstr "Аларма (виртуална)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "" +msgstr "Аларма (по профил)" #: siglist.c:167 msgid "Window changed" -msgstr "" +msgstr "Преоразмерен прозорец" #: siglist.c:171 msgid "Record lock" -msgstr "" +msgstr "Заключен запис" #: siglist.c:175 msgid "User signal 1" -msgstr "" +msgstr "Потребителски сигнал 1" #: siglist.c:179 msgid "User signal 2" -msgstr "" +msgstr "Потребителски сигнал 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "" +msgstr "Идват данни по конзола HFT" #: siglist.c:187 msgid "power failure imminent" -msgstr "" +msgstr "Предстои спиране на захранването" #: siglist.c:191 msgid "system crash imminent" -msgstr "" +msgstr "Предстои забиване на системата" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "" +msgstr "Преместване на процеса на друг процесор" #: siglist.c:199 msgid "programming error" -msgstr "" +msgstr "Програмна грешка" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "" +msgstr "Дадено право за управление чрез конзола HFT" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "" +msgstr "Отнето право за управление чрез конзола HFT" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "" +msgstr "Завършена звукова поредица през HFT" #: siglist.c:215 msgid "Information request" -msgstr "" - -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" +msgstr "Заявка за информация" -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "" +msgstr "Непознат сигнал #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "лошо заместване: липсва затварящ знак „%s“ в %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "%s: на член от масив не може да се присвои списък" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "не може да се създаде програмен канал за заместване на процеси" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "не може да се създаде дъщерен процес за заместване на процеси" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "именуваният програмен канал %s не може да се отвори за четене" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "именуваният програмен канал %s не може да се отвори за запис" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "" "именуваният програмен канал %s не може да се\n" "дублира като файловия дескриптор %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "заместване на команди: знакът „null“ във входа е прескочен" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "не може да се създаде програмен канал за заместване на команди" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "не може да се създаде дъщерен процес за заместване на команди" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "заместване на команди: каналът не може да се дублира като fd 1" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: неправилно име за променлива-указател" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: грешно непряко заместване" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "„%s“: грешно име на променлива" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: аргументът не е зададен" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: аргументът е null или не е зададен" +msgstr "%s: аргументът е „null“ или не е зададен" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: изразът от подниза е < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: лошо заместване" -#: subst.c:7045 +#: subst.c:9678 #, 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" +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" msgstr "" +"бъдещите версии на обвивката ще използват изчисляване като аритметично\n" +"заместване" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "лошо заместване: липсва затварящ знак „%s“ в %s" +msgstr "лошо заместване: липсва затварящ знак „`“ в %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "няма съвпадение: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "очаква се аргумент" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: очаква се целочислен израз" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "очаква се „)“" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: очаква се бинарен оператор" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: очаква се унарен оператор" + +#: test.c:896 msgid "missing `]'" msgstr "липсва „]“" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "синтактична грешка: неочакван знак/ци „%s“" + +#: trap.c:220 msgid "invalid signal number" msgstr "неправилен номер на сигнал" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: превишено е максималното ниво на влагане на „eval“ (%d)" + +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" msgstr "" -"стартиране на предстоящите капани: неправилна стойност в trap_list[%d]: %p" +"стартиране на предстоящите прихващания: неправилна стойност в\n" +"trap_list[%d]: %p" -#: trap.c:331 +#: trap.c:416 #, c-format -msgid "" -"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" msgstr "" -"стартиране на предстоящите капани: обработката на сигнали е SIG_DFL.\n" -"%d (%s) е преизпратено на текущата обвивка" +"стартиране на предстоящите прихващания: обработката на сигнали е SIG_DFL.\n" +"%d (%s) е преизпратен на текущата обвивка" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" -msgstr "обработка на капани: неправилен сигнал %d" +msgstr "обработка на прихващания: неправилен сигнал %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "грешка при внасянето на дефиницията на функция за „%s“" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "нивото на обвивката (%d) е прекалено голямо. Задава се да е 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "" -"създаване на локална променлива: липсва контекст на функция в текущата " -"област\n" +"създаване на локална променлива: липсва контекст на функция в текущата област\n" "на видимост" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: на тази променлива не може да се присвои стойност" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: не може да се наследи стойност от несъвместим вид" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: присвояване на число на променлива-указател" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "" "всички локални променливи: липсва контекст на функция в текущата област на\n" "видимост" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: аргументът е null или не е зададен" +msgstr "%s: аргументът за низа за изнасяне не трябва да е „null“" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "неправилен знак на позиция %d в низа за изнасяне за %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "липсва „=“ в низа за изнасяне за %s" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" msgstr "" -"изваждане на контекст на променливи: в началото на структурата за променливи " -"на\n" +"изваждане на контекст на променливи: в началото на структурата за променливи на\n" "обвивката (shell_variables) е нещо, което не е контекст на функция" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "" "изваждане на контекст на променливи: липсва контекст за глобални променливи\n" "(global_variables)" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" msgstr "" -"изваждане на област: последният елемент структурата за променливи на " -"обвивката\n" -"(shell_variables) не е временна област в обкръжението" +"изваждане на област: в началото на структурата за променливи на обвивката\n" +"(shell_variables) е нещо, което не е временна област в обкръжението" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: не може да се отвори: %s" +msgstr "%s: %s не може да се отвори като ФАЙЛ" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: грешен файлов дескриптор: %s" +msgstr "%s: %s: грешен файлов дескриптор за файла за трасиране" -#: version.c:46 -#, fuzzy -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Авторски права (C) 2005 Free Software Foundation, Inc.\n" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: е извън допустимия диапазон" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Авторски права © 2022 Free Software Foundation, Inc." -#: version.c:86 version2.c:83 +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Лиценз GPLv3+: ОПЛ на GNU, версия 3 или по-висока \n" + +#: version.c:86 version2.c:86 #, c-format msgid "GNU bash, version %s (%s)\n" -msgstr "" +msgstr "GNU bash, версия %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:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +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" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Няма НИКАКВИ ГАРАНЦИИ до степента позволена от закона." -#: version2.c:87 +#: xmalloc.c:93 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" - -#: xmalloc.c:91 -#, fuzzy, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" -"заделяне на памет: %lu байта не могат да се заделят (заделени са\n" -"%lu байта)" +msgstr "%s: не могат да се заделят %lu байта (заделени са %lu байта)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "заделяне на памет: %lu байта не могат да се заделят" +msgstr "%s: не могат да се заделят %lu байта" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" -"заделяне на памет: %s:%d: %lu байта не могат да се заделят (заделени са\n" -"%lu байта)" +msgstr "%s: %s:%d: не могат да се заделят %lu байта (заделени са %lu байта)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "заделяне на памет: %s:%d: %lu байта не могат да се заделят" +msgstr "%s: %s:%d: не могат да се заделят %lu байта" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "" +msgstr "alias [-p] [ИМЕ[=СТОЙНОСТ]…]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "" +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]" +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" msgstr "" +"bind [-lpsvPSVX] [-m ПОДРЕДБА_НА_КЛАВИАТУРАТА] [-f ИМЕ_НА_ФАЙЛ]\n" +" [-q ИМЕ] [-u ИМЕ] [-r ПОСЛЕДОВАТЕЛНОСТ_ОТ_КЛАВИШИ]\n" +" [-x ПОСЛЕДОВАТЕЛНОСТ_ОТ_КЛАВИШИ:КОМАНДА_НА_ОБВИВКАТА]\n" +" [ПОСЛЕДОВАТЕЛНОСТ_ОТ_КЛАВИШИ:КОМАНДА_НА_ОБВИВКАТА или КОМАНДА_НА_READLINE]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" -msgstr "" +msgstr "break [БРОЙ]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "" +msgstr "continue [БРОЙ]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "" +msgstr "builtin [ВГРАДЕНА_КОМАНДА [АРГУМЕНТ…]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" +msgstr "caller [ИЗРАЗ]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [ДИРЕКТОРИЯ]" #: 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 "" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "" +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] команда [АРГУМЕНТ…]" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "" +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [ИМЕ[=СТОЙНОСТ]…] или declare -p [-aAfFilnrtux] [ИМЕ…]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] ИМЕ[=СТОЙНОСТ]… или typeset -p [-aAfFilnrtux] [ИМЕ…]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "" +msgstr "local [ОПЦИЯ] ИМЕ[=СТОЙНОСТ]…" -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "" +msgstr "echo [-neE] [АРГУМЕНТ…]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" -msgstr "" - -#: builtins.c:90 -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" +msgstr "echo [-n] [АРГУМЕНТ…]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f ФАЙЛ] [АРГУМЕНТ…]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "" +msgid "eval [arg ...]" +msgstr "eval [АРГУМЕНТ…]" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "" +msgid "getopts optstring name [arg ...]" +msgstr "getopts НИЗ_С_ОПЦИИ ИМЕ [АРГУМЕНТ…]" #: builtins.c:98 -msgid "exit [n]" -msgstr "" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a ИМЕ] [КОМАНДА [АРГУМЕНТ…]] [ПРЕНАСОЧВАНЕ…]" #: builtins.c:100 +msgid "exit [n]" +msgstr "exit [ЦИФРОВ_КОД]" + +#: builtins.c:102 msgid "logout [n]" -msgstr "" +msgstr "logout [ЦИФРОВ_КОД]" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" -msgstr "" +msgstr "fc [-e РЕДАКТОР] [-lnr] [ПЪРВИ] [ПОСЛЕДЕН] или fc -s [ШАБЛОН=ЗАМЕСТИТЕЛ…] [КОМАНДА]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "" +msgstr "fg [ЗАДАЧА]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "" +msgstr "bg [ЗАДАЧА…]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "" +msgstr "hash [-lr] [-p ПЪТ] [-dt] [ИМЕ…]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "" +msgstr "help [-dms] [ШАБЛОН…]" -#: builtins.c:121 -msgid "" -"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " -"[arg...]" +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" msgstr "" +"history [-c] [-d ОТМЕСТВАНЕ] [БРОЙ] или \n" +"history -anrw [ИМЕ_НА_ФАЙЛ] или\n" +"history -ps АРГ [АРГ…]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "" - -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "" +msgstr "jobs [-lnprs] [ИД_ЗАДАЧА…] или jobs -x КОМАНДА [АРГУМЕНТИ]" -#: builtins.c:132 -msgid "" -"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " -"[sigspec]" -msgstr "" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [ИД_ЗАДАЧА… | ИД_ПРОЦЕС…]" #: builtins.c:134 -msgid "let arg [arg ...]" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" msgstr "" +"kill [-s СИГНАЛ | -n НОМЕР_НА_СИГНАЛ | -СИГНАЛ] ИД_ПРОЦЕС | ИД_ЗАДАЧА…\n" +"или\n" +"kill -l [СИГНАЛ]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let АРГУМЕНТ [АРГУМЕНТ…]" #: builtins.c:138 -msgid "return [n]" +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" msgstr "" +"read [-ers] [-a МАСИВ] [-d РАЗДЕЛИТЕЛ] [-i ТЕКСТ] [-n БРОЙ_ЗНАЦИ]\n" +" [-N БРОЙ_ЗНАЦИ] [-p ПОДСКАЗКА] [-t БРОЙ_ЗНАЦИ] [-u ФАЙЛОВ_ДЕСКРИПТОР]\n" +" [ИМЕ…]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "" +msgid "return [n]" +msgstr "return [ЦИФРОВ_КОД]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o ОПЦИЯ] [--] [АРГУМЕНТ…]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [ИМЕ…]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [ИМЕ[=СТОЙНОСТ]…] или export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "брой на преместванията" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [ИМЕ[=СТОЙНОСТ]…] или readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "изисква се аргумент име на файл" +msgid "shift [n]" +msgstr "shift [БРОЙ]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source ФАЙЛ [АРГУМЕНТИ]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr "изисква се аргумент име на файл" +msgstr ". ФАЙЛ [аргументи]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" -msgstr "" - -#: builtins.c:158 -msgid "test [expr]" -msgstr "" +msgstr "suspend [-f]" #: builtins.c:160 -msgid "[ arg... ]" -msgstr "" +msgid "test [expr]" +msgstr "test [ИЗРАЗ]" #: builtins.c:162 -msgid "times" -msgstr "" +msgid "[ arg... ]" +msgstr "[ АРГУМЕНТ…]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "" +msgstr "trap [-lp] [[АРГУМЕНТ] СИГНАЛ…]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "" +msgstr "type [-afptP] ИМЕ [ИМЕ…]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [ОГРАНИЧЕНИЕ]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "" - -#: builtins.c:175 -msgid "wait [id]" -msgstr "" +msgstr "umask [-p] [-S] [МАСКА]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p ПРОМЕНЛИВА] [ИД…]" -#: builtins.c:182 -msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [ИД_ПР…]" #: builtins.c:184 -msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "" +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for ИМЕ [in ДУМИ…] ; do КОМАНДИ; done" #: builtins.c:186 -msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "" +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( ИЗРАЗ_1; ИЗРАЗ_2; ИЗРАЗ_3 )); do КОМАНДИ; done" #: builtins.c:188 -msgid "time [-p] pipeline" -msgstr "" +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select ИМЕ [in ДУМИ…;] do КОМАНДИ; done" #: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "" +msgid "time [-p] pipeline" +msgstr "time [-p] ПРОГРАМЕН_КАНАЛ" #: builtins.c:192 -msgid "" -"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " -"COMMANDS; ] fi" -msgstr "" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case ДУМА in [ШАБЛОН [| ШАБЛОН]…) КОМАНДИ ;;]… esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "" +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if КОМАНДИ; then КОМАНДИ; [ elif КОМАНДИ; then КОМАНДИ; ]… [ else КОМАНДИ; ] fi" #: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while КОМАНДИ; do КОМАНДИ_2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until КОМАНДИ; do КОМАНДИ_2; done" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [ИМЕ] КОМАНДА [ПРЕНАСОЧВАНИЯ]" #: builtins.c:202 -msgid "{ COMMANDS ; }" -msgstr "" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { КОМАНДИ ; } или name () { КОМАНДИ ; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "" +msgid "{ COMMANDS ; }" +msgstr "{ КОМАНДИ ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "очаква се израз" +msgid "job_spec [&]" +msgstr "%ЗАДАЧА [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "очаква се израз" +msgid "(( expression ))" +msgstr "(( ИЗРАЗ ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ ИЗРАЗ ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "" +msgstr "variables имена и значение на някои от променливите на обвивката" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "" +msgstr "pushd [-n] [+N | -N | ДИР]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" -msgstr "" +msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "" +msgstr "shopt [-pqsu] [-o] [ОПЦИЯ…]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +msgstr "printf [-v ПРОМЕНЛИВА] ФОРМАТ [АРГУМЕНТИ]" -#: 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 ...]" +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o ОПЦИЯ] [-A ДЕЙСТВИЕ]\n" +" [-G ШАБЛОН] [-W ДУМИ] [-F ФУНКЦИЯ] [-C КОМАНДА] [-X ФИЛТЪР]\n" +" [-P ПРЕДСТАВКА] [-S НАСТАВКА] [ИМЕ…]" -#: 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]" +#: builtins.c:235 +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 ОПЦИЯ] [-A ДЕЙСТВИЕ] [-G ШАБЛОН]\n" +" [-W ДУМИ] [-F ФУНКЦИЯ] [-C КОМАНДА] [-X ФИЛТЪР] [-P ПРЕДСТАВКА]\n" +" [-S НАСТАВКА] [ДУМА]" -#: builtins.c:237 -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o ОПЦИЯ] [-DEI] [ИМЕ…]" -#: builtins.c:240 -msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +#: builtins.c:242 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" msgstr "" +"mapfile [-d РАЗДЕЛИТЕЛ] [-n БРОЙ] [-O НАЧАЛО] [-s БРОЙ] [-t]\n" +" [-u ФАЙЛ_ДЕСКР] [-C ФУНКЦИЯ] [-c КВАНТ] [МАСИВ]" -#: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" msgstr "" +"readarray [-d РАЗДЕЛИТЕЛ] [-n БРОЙ] [-O НАЧАЛО] [-s БРОЙ] [-t]\n" +" [-u ФАЙЛ_ДЕСКР] [-C ФУНКЦИЯ] [-c КВАНТ] [МАСИВ]" -#: builtins.c:254 -#, fuzzy +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2373,38 +2590,47 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" 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 +"Дефиниране или извеждане на синоними.\n" +" \n" +" „alias“ без аргументи или с опцията „-p“ отпечатва списъка със\n" +" синонимите във формат „ИМЕ=СТОЙНОСТ“ на стандартния изход.\n" +" \n" +" В противен случай за всяко ИМЕ, за което е зададена стойност, се\n" +" дефинира синоним. Интервал в края на СТОЙНОСТ-та предизвиква синонимно\n" +" заместване на следващата дума при заместването на синонима.\n" +" \n" +" Опции:\n" +" -p Извежда всички синоними във формат за последващо използване\n" +" \n" +" Изходен код:\n" +" alias връща 0, освен в случаите, когато се зададе ИМЕ, за което\n" +" не е дефиниран синоним." + +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" -" ИМЕната се премахват от списъка с дефинираните синоними. Ако е е дадена и\n" -" опцията „-a“ тогава се премахват всички синоними." +"Премахване на ИМЕната от списъка с дефинираните синоними.\n" +" \n" +" Опции:\n" +" -a премахване на всички синоними.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен в случаите, когато се зададе ИМЕ, за което\n" +" не е дефиниран синоним." -#: builtins.c:289 -#, fuzzy +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2416,80 +2642,74 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\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" +"Задаване на клавишни комбинации и променливи на readline.\n" +" \n" +" Присвояване на последователност от клавиши на функция или макрос от\n" +" readline или задаване на променлива на 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" +" \n" +" Опции:\n" +" -m ПОДРЕДБА \n" +" Използване на ПОДРЕДБАта като подредба на функциите на клавишите\n" +" докато командата се изпълнява. Валидни са следните имена:\n" +" „emacs“, „emacs-standard“, „emacs-meta“, „emacs-ctlx“, „vi“,\n" +" „vi-move“, „vi-command“ и „vi-insert“.\n" +" -l Списък с имената на функциите.\n" +" -P Списък с имената на функциите и присвояванията.\n" +" -p Списък с имената на функциите и присвояванията във вид, който може\n" +" да се използва за вход.\n" +" -S Списък с клавишните последователности, които извикват макроси и\n" +" стойностите им.\n" +" -s Списък с клавишните последователности, които извикват макроси и\n" +" стойностите им във вид, който може да се използва за вход.\n" +" -V Списък с имената на променливите и стойностите им.\n" +" -v Списък с имената на променливите и стойностите им във вид, който\n" +" може да се използва за вход.\n" " -q ИМЕ_НА_ФУНКЦИЯ\n" -" Проверка кои клавиши извикват функцията с това име.\n" +" Проверка кои клавиши извикват функцията с това име.\n" " -u ИМЕ_НА_ФУНКЦИЯ\n" -" Премахване на присвояванията към всички клавиши на\n" -" функцията с това име.\n" -" -V Списък с имената на променливите и стойностите им.\n" -" -v Списък с имената на променливите и стойностите им във " -"вид,\n" -" който може да се използва за вход.\n" -" -S Списък с клавишните последователности, които извикват\n" -" макроси и стойностите им.\n" -" -s Списък с клавишните последователности, които извикват\n" -" макроси и стойностите им във вид, който може да " -"се\n" -" използва за вход." - -#: builtins.c:326 -#, fuzzy +" Премахване на присвояванията към всички клавиши на функцията с\n" +" това име.\n" +" -r КЛАВИШНА_ПОСЛЕДОВАТЕЛНОСТ\n" +" Премахване на присвоената функция от КЛАВИШНАта_ПОСЛЕДОВАТЕЛНОСТ.\n" +" -f ФАЙЛ\n" +" Прочитане на присвояванията на клавиши от ФАЙЛа.\n" +" -x КЛАВИШНА_ПОСЛЕДОВАТЕЛНОСТ:КОМАНДА_НА_ОБВИВКАТА\n" +" Изпълнение на КОМАНДАта_НА_ОБВИВКАТА при въвеждането на\n" +" КЛАВИШНАта_ПОСЛЕДОВАТЕЛНОСТ.\n" +" -X Извеждане на клавишните комбинации зададени с „-x“ и свързаните с тях\n" +" команди във форма, която може да се ползва и за вход\n" +" \n" +" Изходен код:\n" +" bind връща 0, освен когато е зададена непозната опция или възникне грешка." + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2499,11 +2719,15 @@ msgid "" " 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-тия обхващащ цикъл." +"Изход от цикли чрез „for“, „while“ или „until“.\n" +" \n" +" Изход от цикли организирани чрез „for“, „while“ или „until“. Ако е зададен\n" +" БРОЙ се излиза от толкова на БРОЙ обхващащи цикли.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададен БРОЙ, който е по-малък от 1." -#: builtins.c:338 -#, fuzzy +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2513,25 +2737,39 @@ msgid "" " 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-тия обхващащ цикъл." +"Продължаване на цикъл чрез „for“, „while“ или „until“.\n" +" \n" +" Продължаване със следващата итерация от цикъл, организиран с „for“, „while“\n" +" или „until“. Ако е зададен БРОЙ, се продължава със следващата итерация\n" +" на обхващащия цикъл зададен с този БРОЙ.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададен БРОЙ, който е по-малък от 1." -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" +"Изпълнение на вградени команди.\n" +" \n" +" Изпълнение на ВГРАДЕНАта_КОМАНДА с АРГУМЕНТи, без да се търси нормална\n" +" команда. Това е полезно в случаите, когато искате да създадете вградена\n" +" команда като функция на обвивката, но във функцията искате да изпълните\n" +" вградената команда.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на ВГРАДЕНАта_КОМАНДА или лъжа, ако извиканата \n" +" ВГРАДЕНА_КОМАНДА всъщност не е вградена команда." -#: builtins.c:365 -#, fuzzy +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2546,71 +2784,94 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" -" Връща контекста на текущото извикване на подпрограма.\n" +"Връщане на контекста на текущото извикване на подпрограма.\n" " \n" " Без ИЗРАЗ връща „$line $filename“. С ИЗРАЗ връща\n" " „$line $subroutine $filename“. Допълнителната информация може да се\n" " използва за получаване на информация за състоянието на стека.\n" " \n" -" Стойността на ИЗРАЗа показва за колко рамки спрямо текущата да се " -"изведе\n" -" информация. Най-горната рамка е 0." +" Стойността на ИЗРАЗа показва за колко рамки спрямо текущата да се изведе\n" +" информация. Най-горната рамка е 0.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако обвивката изпълнява функция дефинирана в обвивката или\n" +" ИЗРАЗът е грешен." -#: builtins.c:383 -#, fuzzy +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\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 +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Смяна на работната директория на обвивката.\n" +" \n" +" Смяна на текущата директория да е ДИРЕКТОРИЯ. Променливата „HOME“ е\n" +" стандартната директория.\n" +" \n" +" Променливата „CDPATH“ определя пътя за търсене на директории, които могат да\n" +" съдържат ДИРЕКТОРИЯта. Директориите в „CDPATH“ са разделени с „:“. \n" +" Липсващо име на директория означава текущата директория, т.е. „.“. Ако името\n" +" на ДИРЕКТОРИЯта започва с наклонена черта „/“, „CDPATH“ не се ползва.\n" +" \n" +" Ако директорията не е открита, но е зададена опцията на обвивката\n" +" „cdable_vars“, то думата се пробва като име на променлива. Ако променливата\n" +" има стойност, то директорията се сменя към стойността на тази променлива.\n" +" \n" +" Опции:\n" +" -L налага следването на символните връзки. Символните връзки в\n" +" ДИРЕКТОРИЯта се обработват след указателите към горна директория „..“.\n" +" -P налага използването на фактическата подредба на директориите, вместо\n" +" да се следват символните връзки. Символните връзки в ДИРЕКТОРИЯта се\n" +" обработват след указателите към горна директория „..“.\n" +" -e ако е използвана опцията „-P“ и текущата директория не може да бъде\n" +" определена, командата завършва с ненулев изход.\n" +" -@ на системите с поддръжка на разширени атрибути файлът се представя\n" +" като директория, в която са атрибутите.\n" +" \n" +" Стандартно символните връзки се следват, все едно е зададена опцията „-L“\n" +" \n" +" Изходен код:\n" +" Връща 0 при смяна на директорията. Когато е зададена опцията „-P“, 0 се\n" +" връща при успешно задаване на променливата „PWD„. Във всички останали\n" +" случаи изходът е ненулев." + +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2619,9 +2880,20 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Извеждане на името на текущата работна директория.\n" +" \n" +" Опции:\n" +" -L извежда стойността на променливата „PWD“, ако тя съответства на\n" +" текущата директория\n" +" -P извежда физическата директория без символни връзки\n" +" \n" +" Стандартно поведението на „pwd“ без аргументи съответства на „-L“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е подадена неправилна опция или текущата директория не може да\n" +" бъде прочетена." -#: builtins.c:428 -#, fuzzy +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2629,45 +2901,72 @@ msgid "" " \n" " Exit Status:\n" " Always succeeds." -msgstr " Без ефект - командата нищо не прави. Връща се изходен код 0." +msgstr "" +"Нулева команда.\n" +" \n" +" Без ефект — командата нищо не прави.\n" +" \n" +" Изходен код:\n" +" Винаги завършва успешно." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Връщане на успешен резултат.\n" +" \n" +" Изходен код:\n" +" Винаги завършва успешно." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"Връщане на неуспешен резултат.\n" +" \n" +" Изходен код:\n" +" Винаги завършва неуспешно." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Изпълнение на нормална команда или извеждане на информация за команди.\n" +" \n" +" Изпълнение на КОМАНДАта с АРГументи, без тя да се търси като функция на\n" +" обвивката, или извеждане на информация за указаните КОМАНДи. Може да се\n" +" използва за изпълнението на външни команди, дори когато съществува функция\n" +" със същото име.\n" +" \n" +" Опции:\n" +" -p използване на стандартна стойност на PATH. Така могат да се открият\n" +" всички стандартни инструменти\n" +" -v извежда описание на КОМАНДАта подобно на вградената команда „type“\n" +" -V извежда по пълно описание на всяка КОМАНДА\n" +" \n" +" Изходен код:\n" +" Връща изходния код на КОМАНДАта или грешка, ако такава не е открита." -#: builtins.c:476 -#, fuzzy +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2677,17 +2976,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2695,52 +2999,67 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\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 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Задаване на стойности на променливите и атрибутите.\n" +" \n" +" Деклариране на променливи и задаване на атрибутите им. Ако не са дадени\n" +" ИМЕна се изобразяват атрибутите и стойностите на всички променливи.\n" +" \n" +" Опции:\n" +" -f Ограничаване на действието или извеждането до имената и дефинициите\n" +" на функциите\n" +" -F Ограничаване на извеждането само до имената на функциите, заедно с\n" +" номерата на редовете и изходните файлове при изчистване на грешките\n" +" -g Създаване на глобална променлива, когато опцията е употребена във\n" +" функция. В противен случай се пренебрегва\n" +" -I При създаването на локална променлива атрибутите и стойността ѝ да\n" +" се вземат от променливата със същото име в предишната област на\n" +" видимост\n" +" -p Извеждане на атрибутите и стойността на всяко ИМЕ\n" +" \n" +" Опции за задаването на атрибути:\n" +" -a ИМЕната да са на индексирани масиви (ако се поддържат)\n" +" -A ИМЕната да са асоциативни масиви (ако се поддържат)\n" +" -i ИМЕната да са с атрибут „цяло число“\n" +" -l При присвояване на стойност тя да се преобразува в малки букви\n" +" -n ИМЕто да е указател към променливата с име, което е дадено от\n" +" стойността\n" +" -r ИМЕната да са само за четене\n" +" -t ИМЕната да са с атрибут за трасиране\n" +" -u При присвояване на стойност тя да се преобразува в главни букви\n" +" -x ИМЕната да се изнасят към средата\n" +" \n" +" При използването на „+“ вместо „-“ атрибутът се изключва.\n" +" \n" +" При присвояването на стойност на променлива със зададен атрибут за цяло\n" +" число се извършва аритметично изчисляване (вижте командата „let“).\n" +" the `let' command).\n" +" \n" +" Когато се използва във функция, командата „declare“ прави ИМЕната локални,\n" +" все едно се изпълнява командата „local“. Опцията „-g“ предотвратява това\n" +" поведение.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или възникне грешка при задаването\n" +" на стойност на променлива." + +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Задаване на стойност и атрибути на променливи.\n" +" \n" +" Синоним на „declare“. Виж „help declare“." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2751,16 +3070,27 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Дефиниране на локални променливи.\n" +" \n" +" Създаване на локална променлива с това ИМЕ и зададената СТОЙНОСТ. ОПЦИЯта\n" +" може да е всяка приемана от вградената команда „declare“.\n" +" \n" +" Локалните променливи могат да се използват само във функция. Те са видими\n" +" само в нея и нейните наследници.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна ОПЦИЯ, възникне грешка при задаването на\n" +" стойност на променлива, или в момента не се изпълнява функция." -#: builtins.c:537 -#, fuzzy +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2772,6 +3102,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2779,34 +3110,57 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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 +"Извеждане на аргументите на стандартния изход.\n" +" \n" +" Извеждане на АРГУМЕНТите на стандартния изход разделени с интервали и\n" +" последвани от нов ред.\n" +" \n" +" Опции:\n" +" -n не се извежда знак за нов ред.\n" +" -e включва се интерпретирането на знаците, изброени по-долу, екранирани\n" +" с обратна наклонена черта — „\\“\n" +" -Е изрично се спира интерпретирането на долните знаци\n" +" \n" +" „echo“ поддържа следните екранирани знаци:\n" +" \\a системен звънец\n" +" \\b триене назад\n" +" \\c пропускане на знака за нов ред\n" +" \\e знак за екраниране\n" +" \\E знак за екраниране\n" +" \\f знак „Завършване на формуляра“ (form feed)\n" +" \\n знак за нов ред\n" +" \\r знак „Връщане на каретката“ (carriage return)\n" +" \\t хоризонтална табулация\n" +" \\v вертикална табулация\n" +" \\\\ обратно наклонена черта\n" +" \\0nnn\n" +" знакът с код в ASCII NNN (в осмична бройна система).\n" +" NNN може да се състои от 1 до 3 осмични цифри.\n" +" \\xHH\n" +" знакът с код в ASCII HH (в шестнайсетична бройна система).\n" +" HH може да се състои от 1 до 2 шестнайсетични цифри.\n" +" \\uHHHH\n" +" знакът с код в Unicode HHHH (в шестнайсетична бройна система).\n" +" HHHH може да се състои от 1 до 4 шестнайсетични цифри.\n" +" \\UHHHHHHHH\n" +" знакът с код в Unicode HHHHHHHH (в шестнайсетична бройна система).\n" +" HHHHHHHH може да се състои от 1 до 8 шестнайсетични цифри.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако не възникне грешка при извеждането." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2818,8 +3172,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Извеждане на аргументите на стандартния изход.\n" +" \n" +" Извеждане на АРГументите на стандартния изход последвани от знак за нов ред.\n" +" \n" +" Опции:\n" +" -n без извеждане на знак за нов ред\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако възникне грешка при извеждането." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2845,21 +3208,55 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Включване и изключване на вградените в обвивката команди.\n" +" \n" +" Включване и изключване на командите вградени в обвивката. Изключването\n" +" позволява извикването на външна команда със същото име като вградена без\n" +" използването на пълното име с пътя.\n" +" \n" +" Опции:\n" +" -a Извеждане на списъка с вградените команди заедно с това дали са\n" +" включени или не\n" +" -n Изключване на вградените команди с посочените ИМЕна. Ако не са\n" +" дадени ИМЕна, се извежда списъкът с изключените вътрешни команди\n" +" -p Извеждане на списъка с вътрешни команди във формат, който може да\n" +" се ползва като вход\n" +" -s Извеждане само на имената на специалните вградени команди според\n" +" POSIX\n" +" \n" +" Опции за динамичното зареждане:\n" +" -f Зареждане на вградена команда с това ИМЕ от споделения обект в\n" +" посочения ФАЙЛ\n" +" -d Премахване на вътрешна команда заредена с „-f“\n" +" \n" +" Ако не са зададени опции, всяка от вътрешните команди с такова ИМЕ бива\n" +" включена.\n" +" \n" +" За да ползвате командата „test“, която се намира в пътя за изпълнение $PATH,\n" +" вместо вградения в обвивката вариант изпълнете: „enable -n test“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако ИМЕто не е на вградена команда или не възникне грешка." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"Изпълнение на аргументите като команда на обвивката.\n" +" \n" +" Комбинира АРГументите в общ низ, който се подава като вход на обвивка,\n" +" която изпълнява получените команди.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на командата или код за успех, ако командата е нулева." -#: builtins.c:626 -#, fuzzy +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2892,112 +3289,122 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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" +" getopts се използва от процедурите на обвивката за анализа на позиционните\n" +" аргументи и опции.\n" " \n" -" НИЗът_С_ОПЦИИ съдържа знаците, които трябва да се разпознават като " -"опции.\n" -" Ако буквата е следвана от двоеточие, очаква се опцията да получава " -"аргумент,\n" +" НИЗът_С_ОПЦИИ съдържа знаците, които трябва да се разпознават като опции.\n" +" Ако буквата е следвана от двоеточие, очаква се опцията да получава аргумент,\n" " който да е разделен от нея с интервал(и).\n" " \n" -" При всяко извикване, „getopts“ поставя следващата опция в променливата " -"на\n" -" обвивката $name, като я инициализира, ако тя не съществува, а индексът " -"на\n" -" следващия аргумент, който трябва да се обработи, в променливата на " -"обвивката\n" -" $OPTIND. $OPTIND се инициализира да е 1 при всяко извикване на обвивка " -"или\n" -" скрипт. Когато опцията се нуждае от аргумент, той се поставя в " -"променливата\n" -" на обвивката $OPTARG.\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 +" „OPTSTRING“ е двоеточие, „getopts“ използва тихо докладване. В този режим\n" +" не се извеждат никакви съобщения за грешка. Ако се срещне неправилна опция,\n" +" „getopts“ слага срещнатия знак за опция в „OPTARG“. Ако липсва задължителен\n" +" аргумент, „getopts“ слага „:“ в променливата „ИМЕ“, а в „OPTARG“ — срещнатия\n" +" знак за опция. Когато „getopts“ не е в режим на тихо докладване и се срещне\n" +" неправилна опция, в променливата „ИМЕ“ се слага „?“, а „OPTARG“ се премахва,\n" +" а ако липсва задължителен аргумент, допълнително се изписва диагностично\n" +" съобщение.\n" +" \n" +" Ако променливата на обвивката „OPTERR“ е със стойност 0, „getopts“ изключва\n" +" извеждането на диагностични съобщения, дори първият знак в „OPTSTRING“ да не\n" +" е двоеточие. По подразбиране „OPTERR“ е със стойност 1.\n" +" \n" +" „getopts“ по принцип анализира позиционните аргументи, но ако аргументите са\n" +" дадени като стойности на АРГУМЕНТИТЕ, те биват анализирани вместо това.\n" +" \n" +" Изходен код:\n" +" Връща 0 при откриването на опция. Връща друга стойност при стигането на\n" +" последната опция или при възникването на грешка." + +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"Заместване на обвивката с дадената команда.\n" +" \n" +" Изпълняване на КОМАНДАта, като тя замества текущата обвивка. АРГУМЕНТите\n" +" се подават на КОМАНДАта. Ако не е дадена КОМАНДА, пренасочванията се\n" +" извършват в текущата обвивка.\n" +" \n" +" Опции:\n" +" -a ИМЕ ИМЕ-то се подава като нулевия аргумент на КОМАНДАта\n" +" -c изпълняване на КОМАНДАта в празна среда\n" +" -l поставяне на тире в нулевия аргумент на КОМАНДАта\n" +" \n" +" Ако КОМАНДАта не може да бъде изпълнена, трябва да съществува неинтерактивна\n" +" обвивка, освен ако не е зададена опцията на обвивката „execfail“.\n" +" \n" +" Изходен код:\n" +" 0, освен когато КОМАНДАта не е открита или възникне грешка при\n" +" пренасочването." -#: builtins.c:689 -#, fuzzy +#: builtins.c:715 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" -" последната изпълнена команда." +"Изход от обвивката.\n" +" \n" +" Изход от обвивката с този ЦИФРОВ_КОД. Ако той е изпуснат, то изходният код\n" +" е този на последната изпълнена команда." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"Изход от входната обвивка.\n" +" \n" +" Изход от входната обвивка с този ЦИФРОВ_КОД. Връща грешка, ако е изпълнена\n" +" в обвивка, която не е входна." -#: builtins.c:708 -#, fuzzy +#: builtins.c:734 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" +" 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" +" -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" @@ -3011,37 +3418,36 @@ msgid "" " 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" +" Returns success or status of executed command; non-zero if an error occurs." +msgstr "" +"Извеждане и/или изпълнение на команди от историята.\n" +" \n" +" fc се използва за изброяването или редактирането и повторното изпълнение на\n" +" команди от списъка на историята.\n" +" ПЪРВИ и ПОСЛЕДЕН са номера, които могат да указват допустимия диапазон. Ако\n" +" е зададен само ПЪРВИят аргумент, той задава низ, който е началото на\n" +" команда.\n" +" \n" +" Опции:\n" +" -e РЕДАКТОР\n" +" избор на текстов редактор, който да се използва. Стандартно е\n" +" указаният в променливата „FCEDIT“, след това се проверява „EDITOR“ и\n" +" в краен случай е „vi“.\n" +" -l редовете да се покажат вместо редактират.\n" +" -n номерата на редовете да не се отпечатват.\n" +" -r обратна подредба (отпред да е най-новият ред).\n" +" \n" +" При варианта „fc -s [ШАБЛОН=ЗАМЕСТИТЕЛ…] [КОМАНДА]“ командата се изпълнява, като\n" " всяка поява на ШАБЛона се заменя със ЗАМЕСТителя.\n" " \n" -" Удобен за използване синоним е „r='fc -s'“. По такъв начин, ако " -"напишете\n" -" „r cc“, ще се изпълни последната команда, която започва с „cc“, а " -"когато\n" -" се въведе само „-r“, ще се изпълни последната команда." +" Удобен за използване синоним е „r='fc -s'“. По такъв начин, ако напишете\n" +" „r cc“, ще се изпълни последната команда, която започва с „cc“, а когато\n" +" се въведе само „r“, ще се изпълни последната команда.\n" +" \n" +" Изходен код:\n" +" Връща 0 или изхода от последната команда, който не е 0 в случай на грешка." -#: builtins.c:738 -#, fuzzy +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3052,51 +3458,78 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" -" Изважда ЗАДАЧА от фонов режим и я прави текуща задача. Ако липсва\n" -" аргумент ЗАДАЧА, се използва текущата задача според обвивката." +"Задаване на задача да е текуща.\n" +" \n" +" Изважда ЗАДАЧА от фонов режим и я прави текуща задача. Ако липсва\n" +" аргумент ЗАДАЧА, се използва текущата задача според обвивката.\n" +" \n" +" Изходен код:\n" +" Изходът от командата, която е зададена да е текуща или грешка, ако при\n" +" поставянето на задачата от фонов към текущ режим възникне такава." -#: builtins.c:753 -#, fuzzy +#: builtins.c:779 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" +" 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" -" Ако липсва аргумент ЗАДАЧА, се използва текущата задача според обвивката." +"Поставяне на задачи във фонов режим.\n" +" \n" +" Поставя всяка ЗАДАЧА във фонов режим, все едно е била стартирана с „&“.\n" +" Ако липсва аргумент ЗАДАЧА, се използва текущата задача според обвивката.\n" +" \n" +" Изходен код:\n" +" 0, освен ако управлението на задачи е изключено или възникне грешка." -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"Запомняне или извеждане на местоположенията на програми.\n" +" \n" +" Определяне и запомняне на пълното име с пътя на всяко ИМЕ. Ако не са дадени\n" +" аргументи, се извежда информация за всички запомнени команди.\n" +" \n" +" Опции:\n" +" -d Забравяне на запомненото местоположение на всички ИМЕна\n" +" -l Извеждане във формат за преизползване като вход\n" +" -p ПЪТ\n" +" Използване на посочения ПЪТ като пълен път за ИМЕто\n" +" -r Забравяне на всички запомнени местоположения\n" +" -t Извеждане на запомнените местоположения на всички ИМЕна. Ако е\n" +" посочено повече от едно ИМЕ, всяко местоположение се предшества от\n" +" ИМЕто\n" +" Аргументи:\n" +" ИМЕ Всяко име се търси в пътя за изпълнение „PATH“ и при намирането му\n" +" се добавя в списъка със запомнени команди.\n" +" \n" +" Изходен код:\n" +" 0, освен ако ИМЕто не бъде открито или е дадена неправилна опция." -#: builtins.c:792 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3108,18 +3541,34 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" +"Извеждане на информация за вградените команди.\n" +" \n" +" Извежда кратка информация за вградените команди. Ако е указан ШАБЛОН, се\n" +" извежда информация за напасващите команди. В противен случай се изважда\n" +" информация за всички команди.\n" +" \n" +" Опции:\n" +" -d Извеждане на кратко описание на всяка тема\n" +" -m Извеждане във формат наподобяващ страница от ръководствата\n" +" -s Извеждане само на кратко обобщение за използването на всяка команда,\n" +" съвпадаща с ШАБЛОНа\n" +" \n" +" Аргументи:\n" +" ШАБЛОН Шаблон за имената на командите, за които да се изведе информация\n" +" \n" +" Изходен код:\n" +" 0, освен ако никоя вградена команда не съвпада с шаблона или е дадена\n" +" неправилна опция." -#: builtins.c:816 -#, fuzzy +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3128,66 +3577,65 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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" " отбелязани със знака „*“, са били променени. Аргументът N указва да се\n" -" извеждат само N на брой реда. Опцията „-c“ предизвиква изчистването на\n" -" списъка, като се изтриват всички елементи от него. Опцията „-d“ " -"изтрива\n" -" елемента в историята намиращ се посочената ПОЗИЦИЯ. Опцията „-w“ " -"записва\n" -" текущата история във файла за историята. Опцията „-r“ означава същият " -"файл\n" -" да се прочете, а съдържанието му да се добави към историята. Опцията „-" -"a“\n" -" добавя историята от текущата сесия към файла с историята. Опцията „-n“\n" -" предизвиква всички редове от файла с историята, които все още не са\n" -" прочетени от файла с историята, да се прочетат и добавят към текущата\n" -" история на командите.\n" +" извеждат само N на брой реда.\n" +" \n" +" Опции:\n" +" -c изчистване на списъка, като се изтриват всички елементи от него.\n" +" -d ПОЗИЦИЯ\n" +" изтрива елемента в историята намиращ се посочената ПОЗИЦИЯ.\n" +" Отрицателните позиции се броят от края на историята\n" +" -a добавя историята от текущата сесия към файла с историята.\n" +" -n прочитане на непрочетените редове от файла с историята и добавяне към\n" +" текущата история.\n" +" -r прочитане на файла с историята и добавяне на съдържанието към текущата\n" +" история.\n" +" -w записване на текущата история във файла за историята.\n" +" -p извършване на историческо заместване за всеки АРГУМЕНТ, а резултатът да\n" +" се изведе, без нищо да се записва в историята на командите.\n" +" -s аргументите, които не са опции, се добавят като един елемент към файла с\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 +" средата „HISTFILE“. В противен случай се ползва „~/.bash_history“.\n" +" \n" +" Ако променливата „HISTTIMEFORMAT“ е зададена и не е „null“, стойността ѝ се\n" +" използва като форматиращия низ за функцията „strftime“, за да се отбелязва\n" +" времето свързано с всеки елемент от историята. В противен случай времето не\n" +" се записва.\n" +" \n" +" Изходен код:\n" +" 0. Ако възникне грешка или е подадена неправилна опция връща грешка." + +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3196,8 +3644,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3210,24 +3658,29 @@ msgid "" " 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" -" аргументи, се заменят с идентификатора на водача на групата процеси." +"Извежда състоянието на задачите.\n" +" \n" +" Извежда списък с активните задачи. ЗАДАЧАта ограничава информацията до\n" +" себе си. Без опции се отпечатва състоянието на всички активни задачи.\n" +" \n" +" Опции:\n" +" -l включва и идентификатора на процесите заедно със стандартната\n" +" информация.\n" +" -n извеждат се само процесите с променено състояние от последното\n" +" извеждане на тази информация.\n" +" -p извежда само идентификаторите на процесите.\n" +" -r ограничаване на изхода само до изпълняваните задачи.\n" +" -s ограничаване на изхода само до спрените задачи.\n" +" \n" +" Ако е зададена опцията „-x“, КОМАНДАта се изпълнява, след като всички\n" +" ЗАДАЧи, които се появяват като АРГУМЕНТи, се заменят с идентификатора на\n" +" водача на групата процеси.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не е дадена неправилна опция или възникни грешка. Ако се\n" +" ползва „-x“, връща изходното състояние на КОМАНДАта." -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3237,15 +3690,27 @@ msgid "" " 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" +" \t\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 "" +"Премахване на ЗАДАЧи от текущата обвивка.\n" +" \n" +" Премахва всеки аргумент-задача от таблицата на активните задачи. Ако ЗАДАЧА\n" +" не е указана, се използва тази, която обвивката счита за текуща.\n" +" \n" +" Опции:\n" +" -a премахване на всички задачи, когато не е дадена ЗАДАЧА\n" +" -h предотвратяване на препращането на сигнал SIGHUP към задачата,\n" +" когато тази обвивка получи същия този сигнал\n" +" -r премахване само на стартираните задачи.\n" +" \n" +" Изходен код:\n" +" 0, освен когато е дадена неправилна опция или несъществуваща ЗАДАЧА." -#: builtins.c:898 -#, fuzzy +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3257,7 +3722,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3266,26 +3732,38 @@ msgid "" " 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 +"Изпращане на сигнал към задача.\n" +" \n" +" Изпращане на СИГНАЛа на процеса с такъв ИДЕНТИФИКАТОР_НА_ПРОЦЕС (или\n" +" задачата с такъв ИДЕНТИФИКАТОР_НА_ЗАДАЧА). Ако сигнал с такова име или\n" +" номер не съществува, се използва SIGTERM.\n" +" \n" +" Опции:\n" +" -s СИГНАЛ\n" +" СИГНАЛ се интерпретира като име на сигнал\n" +" -n СИГНАЛ\n" +" СИГНАЛ се интерпретира като номер на сигнал\n" +" -l изброява имената на сигналите. Ако към командата са добавени\n" +" аргументи, те се интерпретират като номера на сигналите чиито имена\n" +" да се изброят.\n" +" -L синоним на „-l“\n" +" \n" +" „kill“ е команда вградена в обвивката поради две причини: позволява да се\n" +" използват и идентификатори на задачи освен идентификатори на процеси, а и\n" +" ако сте пуснали максимално разрешения за вас брой процеси, няма да ви се\n" +" налага да пуснете още един процес, за да убиете друг.\n" +" \n" +" Изходен код:\n" +" 0. Ако възникне грешка или е подадена неправилна опция, връща грешка." + +#: builtins.c:949 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" +" 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" @@ -3319,132 +3797,142 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" -" Всеки аргумент е аритметичен израз, който се бъде изчислен. Изчисленията\n" +"Изчисляване на аритметичен израз.\n" +" \n" +" Всеки АРГУМЕНТ е аритметичен израз, който се бъде изчислен. Изчисленията\n" " се извършват в аритметика с целочислени стойности с постоянна широчина\n" " без проверка за препълване. Делението на 0 се прихваща и се отбелязва\n" -" грешка. Следващият списък на оператори е разделен на групи според\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 +" id++, id-- последващо увеличаване/намаляване на променлива\n" +" ++id, --id предварително увеличаване/намаляване на променлива\n" +" -, + унарни минус, плюс\n" +" !, ~ логическо и побитово отрицания\n" +" ** вдигане на степен\n" +" *, /, % умножение, деление, целочислен остатък\n" +" +, - събиране, изваждане\n" +" <<, >> побитово местене наляво и надясно\n" +" <=, >=, <, > сравнение\n" +" ==, != равно, различно\n" +" & побитово И\n" +" ^ побитово изключващо ИЛИ\n" +" | побитово ИЛИ\n" +" && логическо И\n" +" || логическо ИЛИ\n" +" ИЗРАЗ ? ИЗРАЗ : ИЗРАЗ\n" +" условен оператор\n" +" =, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |=\n" +" присвояване\n" +" \n" +" Разрешено е ползването на променливи на обвивката като операнди. Името на\n" +" променлива се замества с нейната стойност (която се преобразува до цяло\n" +" число с постоянна широчина) в израза. Не е необходимо променливата да е с\n" +" атрибут за целочисленост, за да се използва в израз.\n" +" \n" +" Операторите се изчисляват по приоритет. Подизразите в скоби се изчисляват\n" +" първи и могат да променят приоритета.\n" +" \n" +" Изходен код:\n" +" Ако последният АРГУМЕНТ се изчислява като 0, „let“ връща 1. В противен\n" +" случай — връща 0." + +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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 +"Изчитане на ред от стандартния вход и разделянето му по полета.\n" +" \n" +" От стандартния вход или от файловия дескриптор ФД, ако е използвана опцията\n" +" „-u“, се прочита един ред. Редът се разделя на полета — думи. Първата дума\n" +" се присвоява на първото ИМЕ, втората дума на второто ИМЕ и т.н., а на\n" +" последното ИМЕ се присвояват оставащите думи. Като разделители на думи се\n" +" използват само знаците указани в променливата „IFS“. Стандартно знакът „\\“\n" +" екранира разделителите и новите редове.\n" +"\n" +" Ако не са дадени ИМЕна, прочетеният ред се запазва в променливата „REPLY“.\n" +" \n" +" Опции:\n" +" -a прочетените думи се присвояват последователно на елементите на МАСИВа,\n" +" като индексът му започва от 0.\n" +" -d РАЗДЕЛИТЕЛ\n" +" четенето продължава до прочитането на първия знак, който присъства в\n" +" променливата „DELIM“, а не до минаването на нов ред.\n" +" -e за четене на реда се използва readline\n" +" -i ТЕКСТ\n" +" за първоначален текст в readline се ползва ТЕКСТ\n" +" -n БРОЙ_ЗНАЦИ\n" +" четенето завършва след прочитането на този БРОЙ_ЗНАЦИ, не се чака за\n" +" нов ред. Разделител в рамките на този БРОЙ_ЗНАЦИ се зачита.\n" +" -N БРОЙ_ЗНАЦИ\n" +" четенето завършва с прочитането на точно този БРОЙ_ЗНАЦИ, освен ако\n" +" не се появи EOF или времето за изчакване на въвеждане не изтече.\n" +" Всички разделители се пренебрегват.\n" +" -p ПОДСКАЗКА\n" +" извежда низа ПОДСКАЗКА без минаване на нов ред, преди да започне\n" +" четенето на знаци от входа.\n" +" -r заместването на екранираните с „\\“ знаци се изключва.\n" +" -s входът от терминал не се отпечатва на екрана.\n" +" -t БРОЙ_СЕКУНДИ\n" +" задава интервал от този БРОЙ_СЕКУНДИ, в който трябва да се въведе цял\n" +" ред. В противен случай read завършва с грешка. Ако е зададена,\n" +" стойността на променливата „TMOUT“ обозначава времето, за което трябва\n" +" да се въведе редът. За БРОЙ_СЕКУНДИ може да се ползва и нецяло число.\n" +" Ако БРОЙ_СЕКУНДИ e 0, read незабавно завършва работа, без да се опитва\n" +" да чете данни и връща код 0, само ако от указания файлов дескриптор\n" +" могат да се прочетат данни.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не се срещне знак за край на файл EOF, изтече време повече от\n" +" указаното в БРОЙ_СЕКУНДИ, при което кодът за изход е над 128, възникне\n" +" грешка при задаване на стойност на променлива или е зададен неправилен\n" +" файлов дескриптор като аргумент на -u." + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3455,9 +3943,17 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Връщане от функция на обвивката.\n" +" \n" +" Кара изпълняваната функция или скрипт да завършат работа със зададения\n" +" изходен ЦИФРОВ_КОД. Ако не е зададен ЦИФРОВ_КОД се използва изходния код на\n" +" последно изпълнената команда във функцията или скрипта.\n" +" \n" +" Изходен код:\n" +" Връща ЦИФРОВия_КОД или грешка, ако обвивката в момента не изпълнява функция\n" +" или скрипт." -#: builtins.c:1022 -#, fuzzy +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3500,8 +3996,7 @@ msgid "" " 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" +" 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" @@ -3523,9 +4018,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3538,94 +4036,90 @@ msgid "" " 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" +" \n" +" Промяна на стойностите на позиционните параметри и опции на обвивката,\n" +" Извеждане на имената и стойностите на променливите на обвивката.\n" +" \n" +" Опции:\n" +" -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" +" 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 +" posix промяна на поведението на „bash“ да отговаря по-добре\n" +" на стандарта POSIX\n" +" privileged същото като „-p“\n" +" verbose същото като „-v“\n" +" vi използване на интерфейс за редактиране подобен на „vi“\n" +" xtrace същото като „-x“\n" +" -p Опцията e включена, когато реалният и ефективният идентификатори на\n" +" процеси не съвпадат. Изключва обработката на файла посочен в\n" +" променливата „ENV“ и внасянето на функции на обвивката. Изключването\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“ и „RETURN“ да се наследява от функциите на\n" +" обвивката.\n" +" -- Оставащите аргументи да се тълкуват като позиционни. Ако няма повече\n" +" аргументи, се изтриват съответните позиционни.\n" +" - Оставащите аргументи да се тълкуват като позиционни. Опциите „-x“ и\n" +" „-v“ са изключени.\n" +" \n" +" Използването на „+“ вместо „-“ изключва опциите. Тези опции могат да се\n" +" използват и при стартирането на обвивката. Текущото им състояние се намира\n" +" в променливата „-“ (получава се с „$-“). Останалите АРГументи са позиционни\n" +" и се присвояват съответно на променливите с имена „1“, „2“,… „n“ (получават\n" +" се с „$1“, „$2“,… „${n}“). Ако не са зададени АРГументи, се извеждат\n" +" всички променливи на средата.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не е зададена неправилна опция." + +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3634,9 +4128,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3644,14 +4139,32 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Изтриване на стойностите и атрибутите на променливите и функциите на обвивката.\n" +" \n" +" За всяко ИМЕ изтрива съответната променлива или функция.\n" +" \n" +" Опции:\n" +" -f всяко ИМЕ се тълкува като функция на обвивката\n" +" -v всяко ИМЕ се тълкува като променлива на обвивката\n" +" -n всяко ИМЕ се тълкува като променлива-указател — трие се самата\n" +" променлива, а не тази, към която тя сочи\n" +" \n" +" Ако не са подадени опции, командата unset първо се опитва да изтрие\n" +" променлива и след това функция с това ИМЕ.\n" +" \n" +" Някои променливи не могат да бъдат изтрити. Вижте вградената команда\n" +" „readonly“ (само за четене).\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или някое от ИМЕната е само за\n" +" четене." -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3663,8 +4176,24 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Задаване на атрибута за изнасяне на променливите на обвивката.\n" +" \n" +" Обозначава всяко едно от ИМЕната за изнасяне в средата на изпълнение на\n" +" последващо изпълнените команди. Ако е дадена СТОЙНОСТ, тя се присвоява на\n" +" ИМЕто преди изнасянето.\n" +" \n" +" Опции:\n" +" -f ИМЕто е на функция на обвивката\n" +" -n Премахване на атрибута за изнасяне от всяко от ИМЕната\n" +" -p Извеждане на списък с имената на всички променливи и функции за\n" +" изнасяне\n" +" \n" +" Аргументът „--“ прекъсва по нататъшната обработка на опции.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или някое от ИМЕната е неправилно." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3676,15 +4205,33 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Задаване на променливи на обвивката като непроменливи константи.\n" +" \n" +" Отбелязване на всяко от ИМЕната само за четене. Тяхната стойност не може да\n" +" бъде променяна чрез последващо присвояване. Ако е дадена СТОЙНОСТ, тя се\n" +" задава на името преди задаването му като константно.\n" +" \n" +" Опции:\n" +" -a ИМЕната са на променливи-масиви\n" +" -A ИМЕната са на променливи-асоциативни масиви\n" +" -f ИМЕната са на функции на обвивката\n" +" -p Извеждане на имената на всички константни променливи или функции, в\n" +" зависимост дали е зададена опцията „-f“\n" +" \n" +" Аргументът „--“ прекъсва по нататъшната обработка на опции.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададена неправилна опция или някое от ИМЕната е неправилно." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3694,9 +4241,16 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Изместване на позиционните параметри.\n" +" \n" +" Преименуване на позиционните параметри „БРОЙ+1“, „БРОЙ+2“… на 1, 2…. Така\n" +" те стават достъпни не като ${БРОЙ+1}…, като „$1“…. Ако не е зададена\n" +" стойност БРОЙ, се използва 1.\n" +" \n" +" Изходен код:\n" +" 0, освен ако БРОят е отрицателно или по-голямо от стойността „$#“." -#: builtins.c:1176 builtins.c:1191 -#, fuzzy +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3709,14 +4263,18 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" -" Изчитане и изпълнение на командите от ФАЙЛа и изход. Директориите описани " -"в\n" -" променливата $PATH се използват за изпълнението на командите от ФАЙЛа. " -"Ако\n" +"Изпълняване на команди от файл в текущата обвивка\n" +" \n" +" Изчитане и изпълнение на командите от ФАЙЛа и изход. Директориите описани в\n" +" променливата „PATH“ се използват за изпълнението на командите от ФАЙЛа. Ако\n" " са зададени АРГУМЕНТИ, те се превръщат в позиционни аргументи при\n" -" изпълнението на ФАЙЛа." +" изпълнението на ФАЙЛа.\n" +" \n" +" Изходен код:\n" +" Връща състоянието на последно изпълнената команда във ФАЙЛа. Ако той не\n" +" може да бъде открит, изходът е грешка." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3729,16 +4287,29 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Временно спиране на изпълнението на обвивката.\n" +" \n" +" Спиране на работата на тази обвивка докато обвивката не получи сигнал\n" +" SIGCONT. Освен ако изрично не се зададе опция, входните обвивки не могат да\n" +" бъдат спрени по този начин.\n" +" \n" +" Опции:\n" +" -f Задължително спиране, дори и ако обвивката е входяща\n" +" \n" +" Изходен код:\n" +" 0, освен ако не възникне грешка или управлението на задачи е изключено." -#: builtins.c:1223 -#, fuzzy +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3762,8 +4333,7 @@ msgid "" " -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 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" @@ -3784,14 +4354,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3807,111 +4379,119 @@ msgid "" " 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" +" Изход с код 0 (истина) или 1 (лъжа) в зависимост от стойността на ИЗРАЗа.\n" +" Изразите могат да бъдат унарни или бинарни. Унарните най-често се използват\n" +" за проверка на състоянието на файл. Освен тях има и оператори за числови\n" " сравнения и низови оператори.\n" " \n" +" Поведението на тестовете зависи от броя на аргументите. За цялостно\n" +" описание прочетете страниците от ръководството на bash.\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" +" -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" +" -z НИЗ Истина, ако НИЗът е празен.\n" +" -n НИЗ Истина, ако НИЗът не е празен.\n" +" НИЗ Истина, ако НИЗът не е празен.\n" " \n" -" НИЗ_1 = НИЗ_2 Истина, ако низовете са равни.\n" -" НИЗ_1 != НИЗ_2 Истина, ако низовете не са равни.\n" -" НИЗ_1 < НИЗ_2 Истина, ако НИЗ_1 е лексикографски преди НИЗ_2.\n" -" НИЗ_1 > НИЗ_2 Истина, ако НИЗ_1 е лексикографски след НИЗ_2.\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 +" -o ОПЦИЯ Истина, ако ОПЦИЯта на обвивката е зададена.\n" +" -v ПРОМЕНЛИВА Истина, ако ПРОМЕНЛИВАта на обвивката е зададена.\n" +" -R ПРОМЕНЛИВА Истина, ако ПРОМЕНЛИВАта е зададена като променлива-\n" +" указател.\n" +" ! ИЗРАЗ Истина, ако ИЗРАЗът е лъжа.\n" +" ИЗРАЗ_1 -a ИЗРАЗ_2 Истина, ако и двата ИЗРАЗа са истина.\n" +" ИЗРАЗ_1 -o ИЗРАЗ_2 Истина, ако поне един от ИЗРАЗите е истина.\n" +" АРГ_1 ОПЕР АРГ_2 Аритметични тестове. Те връщат истина, ако се\n" +" изпълнява математическото условие на ОПЕРатора,\n" +" който е един от следните (значението е в скоби):\n" +" „-eq“ (=), „-ne“ (!=), „-lt“ (<), „-le“ (<=),\n" +" „-gt“ (>) , „-ge“ (>=).\n" +" \n" +" Аритметичните изрази завършват истинно, ако АРГумент_1 е съответно равен,\n" +" неравен, по-малък, по-малък или равен, по-голям, по-голям или равен на\n" +" АРГумент_2.\n" +" \n" +" Изходен код:\n" +" 0, ако ИЗРАЗът е верен. Грешка, когато ИЗРАЗът е неверен или е даден\n" +" неправилен аргумент." + +#: builtins.c:1344 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" -" задължително да е знакът „]“, който да съответства на отварящата скоба " -"„[“." +"Изчисляване на условен израз.\n" +" \n" +" Това е синоним на вградената команда „test“, но последният аргумент трябва\n" +" задължително да е знакът „]“, който да съответства на отварящата квадратна\n" +" скоба „[“." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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" +" \n" +" Отпечатва общото потребителско и системно време на работа на обвивката и\n" +" всичките ѝ дъщерни процеси.\n" +" \n" +" Изходен код:\n" +" Винаги 0." -#: builtins.c:1320 -#, fuzzy +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3920,48 +4500,63 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" Returns success unless a SIGSPEC is invalid or an invalid option is given." msgstr "" -" Командата АРГУМЕНТ ще бъде прочетена и изпълнена, когато обвивката получи\n" +"Прихващане на сигналите и другите събития.\n" +" \n" +" Дефинира и задейства функции за обработка, когато обвивката получи сигнал\n" +" или възникне друго събитие.\n" +" \n" +" Командата АРГУМЕНТ ще бъде прочетена и изпълнена, когато обвивката получи\n" " УКАЗАНия_СИГНАЛ(и). Ако АРГУМЕНТът липсва (и се подава единичен\n" -" УКАЗАН_СИГНАЛ) или е „-“, то всеки УКАЗАН_СИГНАЛ се връща към " -"първоначалната\n" -" си стойност. Ако АРГУМЕНТът е нулевия низ, всеки УКАЗАН_СИГНАЛ се\n" -" пренебрегва от обвивката и командите, които се стартират през нея. Ако\n" -" УКАЗАНият_СИГНАЛ е „EXIT (0)“, то командата АРГУМЕНТ се изпълнява от\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 +" изпълнява след всяка проста команда. Ако УКАЗАНият_СИГНАЛ е „RETURN“,\n" +" АРГУМЕНТът се изпълнява след всяко изпълнение на функция както и изпълнение\n" +" на скрипт чрез вградените команди „.“ и „source“. Ако УКАЗАНият_СИГНАЛ е\n" +" „ERR“, АРГУМЕНТът се изпълнява след всяка грешка, която би предизвикала\n" +" изход от обвивката при стартирането ѝ с опцията „-e“.\n" +" \n" +" Ако не са дадени аргументи, се отпечатват командите присвоени на всички\n" +" прихващания.\n" +" \n" +" Опции:\n" +" -l отпечатва списъка с имената на сигналите и съответстващите им номера.\n" +" -p извеждат се командите свързани с всеки УКАЗАН_СИГНАЛ.\n" +" \n" +" Всеки УКАЗАН_СИГНАЛ е или име на сигнал от файла „signal.h“ или номер на\n" +" сигнал.\n" +" Няма разлика между главни и малки букви в имената на сигнали, а представката\n" +" „SIG“ не е задължителна.\n" +" Сигнал може да бъде изпратен на обвивката с командата „kill -signal $$“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е зададен неправилен сигнал или опция." + +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3970,34 +4565,56 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 +" Returns success if all of the NAMEs are found; fails if any are not found." +msgstr "" +"Извеждане на информация за вида на командата подадена като аргумент.\n" +" \n" +" За всяко ИМЕ се извежда как ще се интерпретира, когато се използва като\n" +" команда.\n" +" \n" +" Опции:\n" +" -a Извеждане на всички местоположения, които съдържат изпълним файл с\n" +" това ИМЕ. Включва синонимите, вградените команди и функции на\n" +" обвивката, само когато не е използвана опцията „-p“\n" +" -f Без търсене във функциите дефинирани в обвивката\n" +" -P Търсене в пътя за изпълнение указан в PATH, дори и ако съществува\n" +" синоним, вградена команда или функция дефинирана в обвивката с това\n" +" ИМЕ\n" +" -p Връща или името на файла, който ще бъде изпълнен или нищо в\n" +" случаите, когато командата „type -t ИМЕ“ не би върнала „file“\n" +" -t Извеждане на една от думите „alias“ (синоним), „keyword“\n" +" (резервирана лексема в обвивката), „function“ (функция дефинирана в\n" +" обвивката), „builtin“ (вградена команда), „file“ (изпълним файл) или\n" +" „“, ако ИМЕто не е открито\n" +" \n" +" Аргументи:\n" +" ИМЕ Името, за което да се изведе информация.\n" +" \n" +" Изходен код:\n" +" 0, ако всички подадени ИМЕна са открити, неуспех, ако някое от тях липсва." + +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -4010,6 +4627,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4021,6 +4639,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4035,42 +4658,56 @@ msgid "" " 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" +" \n" +" Командата осъществява контрол върху ресурсите, които са достъпни на\n" +" процесите стартирани през обвивката върху системите, които поддържат такова\n" +" управление.\n" +" \n" +" Опции:\n" +" -S използване на „мекото“ ограничение на ресурс\n" +" -H използване на „твърдото“ ограничение на ресурс\n" +" -a извеждат се всички текущи ограничения\n" +" -b размер на буфера за програмните гнезда\n" +" -c максималният размер на създадените файлове със съдържание на\n" +" паметта (core)\n" +" -d максималният размер на сегмента на процес за данни\n" +" -e максималният приоритет (nice)\n" +" -f максималният размер на файловете създадени от обвивката и дъщерните\n" +" ѝ процеси\n" +" -i максималният брой на изчакващите сигнали\n" +" -l максималният размер памет, която процес може да заключи\n" +" -m максималният постоянно зареден в паметта сегмент\n" +" -n максималният брой дескриптори на отворени файлове\n" +" -p размер на буфера за програмни канали\n" +" -q максималният брой байтове в опашките за съобщения по POSIX\n" +" -r максималният приоритет за реално време\n" +" -s максималният размер на стека\n" +" -t максималното процесорно време в секунди\n" +" -u максималният брой потребителски процеси\n" +" -v размерът на виртуалната памет\n" +" -x максималният брой заключвания на файлове\n" +" -P максималният брой псевдотерминали\n" +" -R максималният брой процеси в реално време преди блокиране\n" +" -T максималният брой нишки\n" +" \n" +" Не всички ограничения са налични на всички платформи.\n" +" \n" +" Ако е зададено ОГРАНИЧЕНИЕ, то това е новата стойност на указания ресурс.\n" +" Специалните стойности „soft“, „hard“ и „unlimited“ означават текущите меко,\n" " твърдо и никакво ограничение съответно. В противен случай се извежда\n" -" текущата стойност на указания ресурс. Стойностите са в блокове от по " -"1024\n" -" байта, с изключение на:\n" -" - опцията „-p“, при която блоковете са от по 512 байта;\n" -" - опцията „-t“, при която стойността е в секунди;\n" -" - опцията „-u“, при която стойността е точният брой процеси." - -#: builtins.c:1428 +" текущата стойност на указания ресурс. Ако не е зададена опция, се приема,\n" +" че е зададена „-f“.\n" +" \n" +" Стойностите са в блокове от по 1024 байта, с изключение на:\n" +" ⁃ опцията „-t“, при която стойността е в секунди;\n" +" ⁃ опцията „-p“, при която блоковете са от по 512 байта;\n" +" ⁃ опцията „-u“, при която стойността е точният брой процеси.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не възникни грешка или е дадена неправилна опция." + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4087,48 +4724,100 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Извеждане или промяна на маската за достъпа до новосъздадени файлове.\n" +" \n" +" Задава МАСКАта за правата за достъп до новосъздадени файлове. Ако не е\n" +" зададена МАСКА, се извежда текущата ѝ стойност.\n" +" \n" +" Ако МАСКАта започва с цифра, тя се тълкува като осмично число. В противен\n" +" случай трябва да е низ, който би бил приет от командата chmod(1).\n" +" \n" +" Опции:\n" +" -p ако не е зададена МАСКА, изведеният низ може да бъде ползван за вход\n" +" -S изведената маска да е във вид на НИЗ. Без опцията изходът е осмично\n" +" число\n" +" \n" +" Изходен код:\n" +" 0, освен ако МАСКАта или някоя от зададените опции са неправилни." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Изчакване на завършването задача и връщане на изходния код.\n" +" \n" +" Изчакване на всички указани ИДентификатори, които могат да са номера на\n" +" процеси или указатели на задачи, и докладване на изходния код. Ако не е\n" +" зададен ИДентификатор, се изчакват всички активни дъщерни процеси, а\n" +" изходният код е 0. Ако ИДентификаторът е указател на задача, се изчакват\n" +" всички процеси в конвейера на задачата.\n" +" \n" +" Ако е зададена опцията „-n“, се изчаква края на работата на някоя от\n" +" задачите в списъка от указаните ИДентификатори, а ако такъв липсва — края на\n" +" следващата задача и се връща нейния изходен код.\n" +" \n" +" Ако е зададена опцията „-p“, номерът на процес или указателят на задача,\n" +" чийто изходени код се връща, се присвоява на ПРОМЕНЛИВАта, зададена като\n" +" аргумент. Преди първоначалното присвояване променливата няма да е зададена.\n" +" Това е полезно, само когато е използвана опцията „-n“.\n" +" \n" +" Ако е зададена опцията „-f“ и управлението на задачите е включено, се\n" +" изчаква завършването на процеса/задачата с указаните ИДентификатори вместо\n" +" да се изчаква смяната на състоянието им.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последната задача или процес. Ако е зададена\n" +" неправилна опция или неправилен ИДентификатор, връща грешка. Грешка се\n" +" връща и при задаването на опцията „-n“, а обвивката няма дъщерни процеси,\n" +" които не се чакат." -#: builtins.c:1466 -#, fuzzy +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." msgstr "" -" Изчакване на указания процес и докладване за изходния код. Ако не е " -"зададен N,\n" -" всички текущо активни дъщерни процеси се изчакват и изходният код е 0. " -"N\n" -" може да е идентификатор на процес или задача. Ако е задача, изчакват " -"се\n" -" всички процеси в програмния канал на задачата." - -#: builtins.c:1481 -#, fuzzy +"Изчакване на указания процес и докладване за изходния код.\n" +" \n" +" Изчакване на всички указани процеси и докладване за изходния код. Ако не е\n" +" зададен ИДентификатор_ПРоцeс, всички текущо активни дъщерни процеси се\n" +" изчакват и изходният код е 0. ИДентификатор_ПРоцeс трябва да съответства на\n" +" някой процес.\n" +" \n" +" Изходен код:\n" +" Изходния код на процеса с последния идентификатор. Грешка, ако е даден\n" +" неправилен идентификатор или е дадена неправилна опция." + +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4140,15 +4829,17 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -" Цикълът „for“ изпълнява последователност от команди за всеки член в списък " -"от\n" -" елементи. Ако блокът „в ДУМИ …“ не присъства, използва се „in \"$@\"“. " -"За\n" -" всеки елемент в ДУМИте, ИМЕто се задава да е елементът и се изпълняват\n" -" КОМАНДИте." - -#: builtins.c:1495 -#, fuzzy +"Изпълнение на команда за всеки член в списък от елементи\n" +" \n" +" Цикълът „for“ изпълнява последователност от команди за всеки член в списък\n" +" от елементи. Ако блокът „в ДУМИ…“ не присъства, използва се „in \"$@\"“.\n" +" За всеки елемент в ДУМИте, ИМЕто се задава да е елементът и се изпълняват\n" +" КОМАНДИте.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последно изпълнената команда." + +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4164,18 +4855,20 @@ msgid "" " 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 +"Аритметичен цикъл чрез „for“\n" +" Еквивалентно на:\n" +" (( ИЗРАЗ_1 ))\n" +" while (( ИЗРАЗ_2 )); do\n" +" КОМАНДИ\n" +" (( EXP_3 ))\n" +" done\n" +" ИЗРАЗ_1, ИЗРАЗ_2, и ИЗРАЗ_3 са аритметични изрази. Всеки изпуснат израз се\n" +" изчислява да е 1.\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последно изпълнената команда." + +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4194,26 +4887,24 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -" ДУМИте биват замествани, което води до създаването на списък с думи.\n" +"Избор на думи от списък и изпълнение на команди.\n" +" \n" +" ДУМИте биват замествани, което води до създаването на списък с думи.\n" " Наборът от заместените думи бива отпечатан на изхода за стандартната\n" -" грешка, като всяка от тях се предшества от номер. Ако клаузата „in " -"ДУМИ“\n" -" липсва, използва се „in \"$@\"“. В такива случа се отпечатва " -"подсказката PS3\n" -" и от стандартния вход се прочита ред. Ако редът се състои от номера, " -"който\n" -" съответства на някоя от показаните думи, ИМЕто се задава да е тази " -"дума.\n" -" Ако редът е празен, отново се отпечатват ДУМИте и подсказката. Ако се\n" -" прочете „EOF“, командата завършва. Всяка друга стойност присвоява " -"„null“ на\n" -" ИМЕ. Прочетеният ред „null“ се запазва в променливата REPLY. КОМАНДИте " -"се\n" +" грешка, като всяка от тях се предшества от номер. Ако клаузата „in ДУМИ“\n" +" липсва, използва се „in \"$@\"“. В такива случаи се отпечатва подсказката\n" +" „PS3“ и от стандартния вход се прочита ред. Ако редът се състои от номера,\n" +" който съответства на някоя от изведените думи, ИМЕто се задава да е тази\n" +" дума. Ако редът е празен, отново се отпечатват ДУМИте и подсказката. Ако\n" +" се прочете „EOF“, командата завършва. Всяка друга стойност присвоява „null“\n" +" на ИМЕ. Прочетеният ред се запазва в променливата REPLY. КОМАНДИте се\n" " изпълняват след всеки избор до изпълняването на команда за прекъсване\n" -" (break)." +" (break).\n" +" \n" +" Изходен код:\n" +" Връща изходния код на последно изпълнената команда." -#: builtins.c:1534 -#, fuzzy +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4228,16 +4919,22 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" -" Изпълнение на ПРОГРАМНия_КАНАЛ и отпечатване на обобщение за реалното,\n" +"Отпечатване на времето за изпълнение на програмен канал.\n" +" \n" +" Изпълнение на ПРОГРАМНия_КАНАЛ и отпечатване на обобщение за реалното,\n" " потребителското и системно процесорни времена, които изпълнението на\n" -" ПРОГРАМНия_КАНАЛ отнема. Изходният код е този на ПРОГРАМНия_КАНАЛ. " -"Опцията\n" -" „-p“ води до извеждане на статистиката за времето в различен формат - " -"според\n" -" стойността на променливата на средата $TIMEFORMAT." - -#: builtins.c:1551 -#, fuzzy +" ПРОГРАМНия_КАНАЛ отнема.\n" +" \n" +" Опции:\n" +" -p: извеждане на статистиката за времето във формат POSIX\n" +" \n" +" Стойността на променливата на средата „TIMEFORMAT“ определя изходния\n" +" формат.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на ПРОГРАМНия_КАНАЛ." + +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4247,77 +4944,81 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -" Избирателно се изпълняват КОМАНДИ на база ДУМА, която напасва на ШАБЛОН.\n" -" Шаблоните се разделят със знака „|“." +"Изпълнение на команди на базата на напасване по шаблон.\n" +" \n" +" Избирателно се изпълняват КОМАНДИ на база ДУМА, която напасва на ШАБЛОН.\n" +" Шаблоните се разделят със знака „|“.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." -#: builtins.c:1563 -#, fuzzy +#: builtins.c:1631 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" +" 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" +" `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 +"Изпълнение на команда на базата на условие.\n" +" \n" +" Първо се изпълняват командите в блока „if КОМАНДИ“. Ако изходният код е 0,\n" +" то се изпълнява блокът „then КОМАНДИ“. В противен случай последователно се\n" +" изпълнява всеки блок „elif КОМАНДИ“ — ако изходният код е 0, то се изпълнява\n" +" съответния блок „then КОМАНДИ“, след което завършва изпълнението на целия\n" +" блок „if“.\n" +" Ако изходният код на никой от блоковете „if“ и „elif“ не е бил 0,\n" +" изпълнява се блока „else КОМАНДИ“, стига такъв да присъства. Изходният код\n" +" от цялата конструкция е този на последната изпълнена команда или е 0, ако\n" +" никое тестово условие, не се е оценило като истина.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." + +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -" Заместване и изпълнение на КОМАНДИте докато последната команда в блока " -"„while“\n" -" е с изходен код, който е 0." +"Изпълнение на команда докато определен тест е успешен.\n" +" \n" +" Заместване и изпълнение на КОМАНДИ_2 докато последната команда в блока\n" +" КОМАНДИ е с изходен код, който е 0.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." -#: builtins.c:1592 -#, fuzzy +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -" Заместване и изпълнение на КОМАНДИте докато последната команда в блока " -"„until“\n" -" е с изходен код, който не е 0." +"Изпълнение на команда докато определен тест е неуспешен.\n" +" \n" +" Заместване и изпълнение на КОМАНДИ_2 докато последната команда в блока\n" +" КОМАНДИ е с изходен код, който не е 0.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4327,25 +5028,41 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Създаване на копроцес с даденото ИМЕ.\n" +" \n" +" Асинхронно изпълнение на КОМАНДАта, като стандартните вход и изход се\n" +" пренасочват от и към файловите дескриптори, които трябва да са с индекси\n" +" съответно 0 и 1 в променливата-масив ИМЕ в изпълняваната обвивка. Ако не е\n" +" дадено ИМЕ на променлива, стандартно се ползва „COPROC“.\n" +" \n" +" Изходен код:\n" +" Изходният код е 0." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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 "" +"Дефиниране на функция на обвивката.\n" +" \n" +" Създаване на функция на обвивката със зададеното ИМЕ. Когато се извика като\n" +" обикновена команда, КОМАНДИте се изпълняват в контекста на извикващата\n" +" обвивка. При извикването на ИМЕто, аргументите подадени на функцията са\n" +" достъпни като $1,… , $9, а името на функцията е достъпно като $FUNCNAME.\n" +" \n" +" Изходен код:\n" +" 0, освен ако ИМЕто не е само за четене." -#: builtins.c:1632 -#, fuzzy +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4355,12 +5072,15 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -" Изпълняване на цял набор от команди в група. Това е един от начините да " -"се\n" -" цял набор от команди." +"Изпълнение на група от команди.\n" +" \n" +" Изпълняване на цял набор от команди в група. Това е един от начините да се\n" +" пренасочи цял набор от команди.\n" +" \n" +" Изходен код:\n" +" Изходният код е този на последно изпълнената команда." -#: builtins.c:1644 -#, fuzzy +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4373,37 +5093,42 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" -" Еквивалентно на аргумента ЗАДАЧА на командата „fg“. Възобновява спряна\n" +"Възобновяване на заден фон на изпълнението на задача\n" +" \n" +" Еквивалентно на аргумента ЗАДАЧА на командата „fg“. Възобновява спряна\n" " задача или такава на заден фон. ЗАДАЧАта може да указва или име, или\n" " номер на задача. Ако след ЗАДАЧАта се въведе знакът „&“, задачата\n" " се изпълнява във фонов режим, все едно е била подадена като аргумент\n" -" на командата „bg“." +" на командата „bg“.\n" +" \n" +" Изходен код:\n" +" Изходният код е този възобновената задача." -#: builtins.c:1659 -#, fuzzy +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" -" ИЗРАЗът се изчислява според правилата на аритметичното оценяване.\n" -" Еквивалентно на „let ИЗРАЗ“." +"Изчисляване на аритметичен израз\n" +" \n" +" ИЗРАЗът се изчислява според правилата на аритметичното оценяване.\n" +" Еквивалентно на „let \"ИЗРАЗ\"“.\n" +" \n" +" Изходен код:\n" +" 1, ако резултатът на ИЗРАЗа е 0. В противен случай — 0." -#: builtins.c:1671 -#, fuzzy +#: builtins.c:1739 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" +" 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" @@ -4421,30 +5146,33 @@ msgid "" " 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" +" Връща състояние 0 или 1 в зависимост от оценката на условния ИЗРАЗ.\n" +" Изразите са съставени от същите примитиви, както вградената команда „test“\n" +" и могат да се съчетават чрез следните оператори:\n" +" \n" +" ( ИЗРАЗ ) Връща стойността на ИЗРАЗа\n" +" ! ИЗРАЗ Истина, ако ИЗРАЗ се оценя на лъжа, в останалите случаи е лъжа\n" +" ИЗРАЗ_1 && ИЗРАЗ_2\n" +" Истина, ако едновременно ИЗРАЗ_1 и ИЗРАЗ_2 са истина, в\n" +" останалите случаи е лъжа.\n" +" ИЗРАЗ_1 || ИЗРАЗ_2\n" +" Истина, ако поне единият от ИЗРАЗ_1 и ИЗРАЗ_2 е истина, в\n" +" останалите случаи е лъжа.\n" " \n" " Когато се използват операторите „==“ и „!=“, низът от дясната страна на\n" -" оператора се използва като шаблон и се извършва напасване. Операторите\n" -" „&&“ и „||“ не оценят ИЗРАЗ2, ако ИЗРАЗ1 е достатъчен за определяне на\n" -" стойността на израза." +" оператора се използва като шаблон и се извършва напасване. Когато се ползва\n" +" операторът „=~“, изразът от дясната му страна се тълкува като регулярен\n" +" израз.\n" +" \n" +" Операторите „&&“ и „||“ не оценят ИЗРАЗ_2, ако ИЗРАЗ_1 е достатъчен за\n" +" определяне на стойността на израза.\n" +" \n" +" Изходен код:\n" +" 0 или едно според стойността на ИЗРАЗа." -#: builtins.c:1697 -#, fuzzy +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4497,83 +5225,59 @@ msgid "" " 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" +"Често използване промени на обвивката\n" +" \n" +" BASH_VERSION Информация за версията на 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" +" търсят като аргументи за командата „cd“\n" +" GLOBIGNORE Списък с шаблони на файлови имена, разделени с двоеточие,\n" +" които да се игнорират от заместването на пътя\n" +" HISTFILE Името на файла, в който се съхранява историята на командите\n" +" HISTFILESIZE Максималният брой редове, които горният файл може да съдържа\n" +" HISTSIZE Максималният брой редове, които една работеща обвивка може\n" +" да достъпи\n" +" HOME Пълният път до домашната ви директория\n" +" HOSTNAME Името на текущата машина\n" +" HOSTTYPE Видът на процесора, под който работи текущата обвивка\n" +" IGNOREEOF Управлява действието на обвивката при срещането на единичен\n" +" знак за край на файл „EOF“. Ако променливата е зададена, тя\n" +" указва броя на знаците „EOF“, който могат да се срещнат\n" +" самостоятелно на един ред, преди обвивката да завърши работа\n" +" и излезе (стандартно е 10). Когато променливата не е\n" +" зададена, един „EOF“ означава край на входящите данни\n" +" MACHTYPE Низ, който описва текущата система, на която работи bash\n" +" MAILCHECK Колко често bash да проверява за нови писма (в секунди)\n" +" MAILPATH Списък с файлове, които bash проверява за нови писма\n" +" OSTYPE Версията на Юникс, на която работи bash\n" +" PATH Списък с директории, които да се претърсват за команди\n" +" PROMPT_COMMAND Команда, която да се изпълнява преди отпечатването на\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 +" двоеточие\n" +" TERM Името на текущия вид терминал\n" +" TIMEFORMAT Изходният формат за статистиката за времето за изпълнение на\n" +" команда, който се използва от запазената дума „time“\n" +" auto_resume Стойност, която не е „null“, означава, че командна дума,\n" +" която се появява самостоятелно на ред, първо се проверява в\n" +" списъка с текущо спрените задачи. Ако бъде открита там,\n" +" задачата се пуска и се слага на преден план. Стойност\n" +" „exact“ (строго съвпадение) означава, че командната дума,\n" +" трябва точно да съвпада с името на команда в списъка със\n" +" спрени задачи. Стойност „substring“ (съвпадение на подниз)\n" +" означава, че командната дума трябва да е подниз на задачата.\n" +" Всяка друга стойност означава, че командата думата трябва да\n" +" е началото на спряна задача\n" +" histchars Знаци, които определят бързото заместване и това по история.\n" +" Първият знак е за заместването по история, обикновено е „!“.\n" +" Вторият е за бързото заместване, обикновено е „^“. Третият\n" +" е за коментарите в историята, обикновено е „#“\n" +" HISTIGNORE Списък с шаблони, разделени с двоеточие, които указват кои\n" +" команди да не се запазват в историята\n" + +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -4583,19 +5287,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4603,28 +5307,35 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" -" Добавя директория в стека на директориите или превърта стека\n" +"Добавяне на директории в стека.\n" +" \n" +" Добавя директория в стека на директориите или превърта стека\n" " като най-горна директория става текущата директория. Без\n" " аргументи сменя най-горните две директории.\n" " \n" -" +N Превърта стека, така че N-тата директория (като се брои\n" -" от лявата страна на списъка, показан от командата „dirs“\n" -" като се почва от 0) да е най-отгоре.\n" +" -n подтискане на нормалното преминаване към директория при изваждането на\n" +" директория към стека, така че се променя само той.\n" " \n" -" -N Превърта стека, така че N-тата директория (като се брои\n" -" от дясната страна на списъка, показан от командата „dirs“\n" -" като се почва от 0) да е най-отгоре.\n" +" Аргументи:\n" +" +N Превърта стека, така че N-тата директория (като се брои от лявата \n" +" страна на списъка, изведен от командата „dirs“ като се почва от 0)\n" +" да е най-отгоре.\n" " \n" -" -n подтискане на нормалното преминаване към директория при\n" -" добавянето на директории към стека, така че се променя само той.\n" -"\n" -" dir добавя ДИР най-отгоре в стека на директориите, като я прави\n" -" новата текуща работна директория.\n" +" -N Превърта стека, така че N-тата директория (като се брои от дясната\n" +" страна на списъка, изведен от командата „dirs“ като се почва от 0)\n" +" да е най-отгоре.\n" " \n" -" Можете да изведете стека на директорията с командата „dirs“." +" \n" +" dir Добавя ДИРекторията най-отгоре в стека, като я прави новата текуща\n" +" работна директория.\n" +" \n" +" Можете да изведете стека на директорията с командата „dirs“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е подаден неправилен аргумент или не може да се премине към\n" +" съответната директория." -#: builtins.c:1788 -#, fuzzy +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -4633,16 +5344,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4650,26 +5361,32 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" -" Маха директории от стека с тях. Без аргументи\n" -" премахва последната директория в стека и влиза в новата\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“." +" Маха директории от стека с тях. Без аргументи премахва последната директория\n" +" в стека и влиза в новата последна директория.\n" +" \n" +" Опции:\n" +" -n подтискане на нормалното преминаване към директория при изваждането на\n" +" директория към стека, така че се променя само той.\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" +" Стекът с директориите се визуализира с командата „dirs“.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е подаден неправилен аргумент или не може да се премине към\n" +" съответната директория." -#: builtins.c:1818 -#, fuzzy +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -4680,54 +5397,52 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -" Показва списъка с текущо запомнените директории. Списъкът се попълва чрез\n" -" командата „pushd“. Можете да вадите директории от списъка с командата\n" +"Извеждане на стека на директориите.\n" +" \n" +" Отпечатва списъка с текущо запомнените директории. Списъкът се попълва чрез\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 +" Опции:\n" +" -c изчистване на стека на директориите като изтрива всички елементи\n" +" -l извеждане на пълните имена на директориите, а не съкратените спрямо\n" +" домашната директория имена („/homes/pesho/bin“, а не „~/bin“)\n" +" -p поредово отпечатване без поредния номер в стека\n" +" -v поредово отпечатване заедно с поредния номер в стека\n" +" \n" +" Аргументи: \n" +" +N извежда N-тия елемент отляво в списъка отпечатан от командата „dirs“,\n" +" когато е стартирана без опции. Брои се от 0.\n" +" -N извежда N-тия елемент отдясно в списъка отпечатан от командата „dirs“,\n" +" когато е стартирана без опции. Брои се от 0.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е дадена неправилна опция или възникне грешка." + +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -4740,9 +5455,24 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Включване и изключване на опции на обвивката.\n" +" \n" +" Превключване на състоянието на всяка от дадените ОПЦИи на обвивката. Ако не\n" +" не са зададени аргументи, се извежда списък от с дадените ОПЦИи или всички,\n" +" ако не са дадени такива, като се указва за всяка дали и включена или не.\n" +" \n" +" Опции:\n" +" -o ограничаване на опциите до определените за използване със „set -o“\n" +" -p извеждане на всяка опция с означение дали е включена или не\n" +" -q без извеждане на информация\n" +" -s включване на всяка от ОПЦИИте\n" +" -u изключване на всяка от ОПЦИИте\n" +" \n" +" Изходен код:\n" +" 0, ако ОПЦИЯта е включена, грешка, ако е зададена неправилна или изключена\n" +" ОПЦИЯ." -#: builtins.c:1868 -#, fuzzy +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -4750,107 +5480,147 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\n" +" Returns success unless an invalid option is given or a write or assignment\n" " error occurs." msgstr "" -" printf форматира и отпечатва АРГУМЕНТИте според управлението на ФОРМАТа.\n" +"Форматиране и отпечатване на АРГУМЕНТИте според управлението на ФОРМАТа.\n" +" \n" +" Опции:\n" +" -v ПРОМЕНЛИВА изходът се поставя в ПРОМЕНЛИВАта на обвивката, вместо да\n" +" се извежда на стандартния изход.\n" +" \n" " ФОРМАТът е последователност от знаци, която съдържа три вида обекти:\n" -" обикновени знаци, които биват отпечатани директно на стандартния изход;\n" -" екраниращи знакови последователности, които биват преобразувани и " -"отпечатани\n" -" на стандартния изход; и форматиращи знакови последователности, всяка от\n" -" които предизвиква отпечатването на следващ аргумент. Освен " -"стандартните\n" -" форматирания описани в ръководството на printf, „%b“ предизвиква " -"заместването\n" -" на екраниранията с обратно наклонени черти в съответния аргумент, а „%" -"q“\n" -" предизвиква цитирането на аргумента, така че да може да бъде използван " -"като\n" -" вход за обвивката. Ако е включена опцията „-v“, изходът се поставя в\n" -" променливата на обвивката VAR, вместо да се извежда на стандартния изход." - -#: builtins.c:1895 +" ⁃ обикновени знаци, които биват отпечатани директно на стандартния изход;\n" +" ⁃ екраниращи знакови последователности, които биват преобразувани и\n" +" отпечатани на стандартния изход;\n" +" ⁃ форматиращи знакови последователности, всяка от които предизвиква\n" +" отпечатването на следващ аргумент.\n" +" \n" +" Освен стандартните форматирания описани в ръководството на printf(1), printf\n" +" приема и следните инструкции:\n" +" %b предизвиква заместването на екраниранията с обратно наклонени\n" +" черти в съответния аргумент\n" +" %q предизвиква цитирането на аргумента, така че да може да бъде\n" +" използван като вход за обвивката\n" +" %Q подобно на „%q“, но се прилага някаква точност към нецитирания\n" +" аргумент преди цитирането му\n" +" %(fmt) отпечатване на низа при третиране на аргумента като дата и време\n" +" според strftime(3)\n" +" \n" +" Форматът се преизползва до приемането на всички аргументи. Ако има по-\n" +" малко аргументи от посочените във форма̀та, поведението на допълнителните е\n" +" все едно за аргумент да са подадени нулева стойност или празен низ.\n" +" \n" +" Изходен код:\n" +" 0, освен ако не е дадена неправилна опция или възникне грешка при\n" +" извеждането на резултата или при присвояването на стойността." + +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Указване на начина на автоматичното дописване на аргументите от Readline.\n" +" \n" +" За всяко ИМЕ се извежда начинът за дописване на аргументите. Ако не са\n" +" дадени никакви опции, се извеждат текущите инструкции за автоматично\n" +" дописване във формат, който може да се използва за вход.\n" +" \n" +" Опции:\n" +" -p Извеждане на текущите инструкции за автоматично дописване във формат,\n" +" който може да се използва за вход\n" +" -r Премахване на инструкциите за автоматично дописване на всяко ИМЕ, а\n" +" когато такова не е указано — всички инструкции\n" +" -D Прилагане на дописванията и действията като стандартните за командите,\n" +" без никакви специфични инструкции\n" +" -E Прилагане на дописванията и действията като тези на „празната“\n" +" команда — когато все още нищо не е написано на командния ред\n" +" -I Прилагане на дописванията и действията към първата дума (обикновено\n" +" това е командата)\n" +" \n" +" При извършване на автоматично дописване, действията се прилагат в реда на\n" +" опциите с главна буква дадени по-горе. Опцията „-D“ е с по-висок приоритет\n" +" от „-E“, която има по-висок приоритет от „-I“.\n" +" \n" +" Изходен код:\n" +" 0, освен когато е дадена неправилна опция или възникне грешка." -#: builtins.c:1923 -#, fuzzy +#: builtins.c:2004 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" +" 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" -" него." +"Извеждане на възможните дописвания.\n" +" \n" +" Целта е да се ползва в рамките функция на обвивката, която генерира\n" +" възможните дописвания. Ако е зададен незадължителният аргумент ДУМА,\n" +" генерират се напасванията с него.\n" +" \n" +" Изходен код:\n" +" 0, освен ако е дадена неправилна опция или възникне грешка." -#: builtins.c:1938 +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4866,729 +5636,109 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Променяне или извеждане на опциите за дописване.\n" +" \n" +" Променяне на опциите дописване за всяко ИМЕ, или когато не са указани\n" +" ИМЕна — дописването, което се изпълнява в момента. Ако не са зададени\n" +" ОПЦИи, извеждане на на опциите за дописване за всяко име или за текущо\n" +" изпълняваното дописване.\n" +" \n" +" Опции:\n" +" -o ОПЦИЯ\n" +" Задаване ОПЦИЯта за дописване за всяко зададено ИМЕ\n" +" -D Задаване на опциите за „стандартното“ дописване на команда\n" +" -E Задаване на опциите за дописването на „празната“ команда\n" +" -I Задаване на опциите за дописването на първата дума\n" +" Използването на „+o“ вместо „-o“ изключва дадената опция.\n" +" \n" +" Аргументи:\n" +" \n" +" Всяко ИМЕ указва команда, за която трябва предварително да е зададена\n" +" спецификация за дописване чрез вградената команда „complete“. Ако не са\n" +" зададени ИМЕна, командата „compopt“ трябва да бъде изпълнена от функция,\n" +" която генерира спецификациите за дописване. В този случай опциите за текущо\n" +" изпълнявания генератор на дописвания се променят.\n" +" \n" +" Изходен код:\n" +" 0, освен когато е дадена неправилна опция или липсват инструкции към ИМЕто\n" +" за автоматично дописване." -#: builtins.c:1968 +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" - -#: builtins.c:2001 +"Изчитане на редове от стандартния вход и запазване в променлива — индексиран\n" +" низ.\n" +" \n" +" Прочитане на редове от стандартния вход, които след това се запазват в\n" +" променливата МАСИВ. Когато е дадена опцията „-u“, се чете от\n" +" ФАЙЛов_ДЕСКРиптор. Стандартното име на променливата-масив е MAPFILE.\n" +" \n" +" Опции:\n" +" -d РАЗДЕЛИТЕЛ РАЗДЕЛяне на редовете с този знак, а не с нов ред\n" +" -n МАКС_РЕДА Изчитане на не повече от МАКСимум РЕДа. Ако е 0, се\n" +" прочитат всички редове\n" +" -O НАЧАЛО Присвояването да започне при индекс НАЧАЛО в МАСИВа\n" +" Стандартната стойност е 0\n" +" -s БРОЙ_ПРОП Прескачане на първите БРОЙ за ПРОПускане прочетени реда\n" +" -t Премахване на последващия знак-РАЗДЕЛител от всеки ред\n" +" (стандартно е знакът за нов ред)\n" +" -u ФАЙЛов_ДЕСКРиптор\n" +" Изчитане на редовете от ФАЙЛов_ДЕСКРиптор, а не стандартния\n" +" вход\n" +" -C ФУНКЦИЯ Функция, която се извиква при изчитането на всеки БРОЙ_РЕДА\n" +" -c БРОЙ_РЕДА Редове, които да се изчетат преди да се извика ФУНКЦИЯта\n" +" \n" +" Аргументи:\n" +" МАСИВ Име на променливата-масив\n" +" \n" +" Ако опцията „-C“ е зададена без „-c“, стандартния БРОЙ_РЕДА е 5000. При\n" +" извикването на ФУНКЦИЯта за аргументи ѝ се подават индекса на следващия\n" +" елемент от масива и реда, който се счита за стойност.\n" +" \n" +" Ако не е дадено изрично НАЧАЛО, командата „mapfile“ изчиства МАСИВа, преди\n" +" да започне присвояването към него.\n" +" \n" +" Изходен код:\n" +" Връща 0, освен ако е дадена неправилна опция или ако МАСИВът е променлива\n" +" само за четене или не е индексиран масив." + +#: builtins.c:2086 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" -#~ " ИМЕ, а ако не е дадено такова - махат се всички класове." +"Прочитане на редове от файл и поставяне в променлива – масив.\n" +" \n" +" Синоним на „mapfile“." diff --git a/po/ca.gmo b/po/ca.gmo index c34b446..c144d0e 100644 Binary files a/po/ca.gmo and b/po/ca.gmo differ diff --git a/po/ca.po b/po/ca.po index 14b2e1d..eb9791a 100644 --- a/po/ca.po +++ b/po/ca.po @@ -1,479 +1,562 @@ -# Catalan messages for the GNU bash-2.0 -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Montxo Vicente i Sempere , 2003. -# Jordi Mas i Hern?ndez , 2004 (correccions). -# +# Catalan messages for GNU bash. +# Copyright (C) 2022 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Montxo Vicente i Sempere , 2003 (traducció), 2010 (revisions). +# Jordi Mas i Hernàndez , 2004 (correccions). +# Ernest Adrogué i Calveras , 2014-2022. msgid "" msgstr "" -"Project-Id-Version: bash-2.0\n" +"Project-Id-Version: bash-5.2-rc1\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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-07-06 20:08+0200\n" +"Last-Translator: Ernest Adrogué Calveras \n" "Language-Team: Catalan \n" +"Language: ca\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "la matriu est? mal composta" +msgstr "subíndex erroni" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: s'elimina l'atribut «nameref»" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%c%c: opci? inv?lida" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: no és possible convertir un vector indexat en associatiu" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s: no es pot assignar a un ?ndex que no ?s num?ric" +msgstr "%s: no es pot assignar a un índex no-numèric" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: l'assignació en vectors associatius requereix un subíndex" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: no es pot crear: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" +msgstr "bash_execute_unix_command: no s'ha trobat el mapa de tecles per a l'ordre" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "" +msgstr "%s: el primer caràcter no-blanc no és «\"»" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "" +msgstr "falta un caràcter de tancament «%c» a %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "" +msgstr "%s: falta un caràcter «:» de separació" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: no es pot desvincular en el mapa de tecles de l'ordre" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansió de claus: no es pot assignar memòria per a %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansió de claus: ha fallat l'assignació de memòria per a %u elements" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansió de claus: ha fallat l'assignació de memòria per a «%s»" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%c%c: opci? inv?lida" +msgstr "«%s»: el nom de l'àlies no és valid" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "l'edició de línia no està habilitada" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "" +msgstr "«%s»: el nom del mapa de tecles no és vàlid" -#: builtins/bind.def:245 -#, fuzzy, c-format +#: builtins/bind.def:252 +#, 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" +msgstr "%s: no es pot llegir: %s" -#: builtins/bind.def:295 builtins/bind.def:325 -#, fuzzy, c-format +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format msgid "`%s': unknown function name" -msgstr "%s: funci? nom?s de lectura" +msgstr "«%s»: nom de funció desconegut" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "" +msgstr "%s no està vinculat a cap tecla.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "" +msgstr "%s pot ser invocat via " -#: builtins/break.def:77 builtins/break.def:117 -#, fuzzy +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: no es pot desvincular" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "fi de sessi?" +msgstr "nombre d'iteracions" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "" +msgstr "només té sentit en una iteració de tipus «for», «while» o «until»" -#: builtins/caller.def:133 +# help caller +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Retorna el context de la subrutina actual.\n" +"\n" +" Sense EXPR, torna \"$línia $nomfitxer\". Amb EXPR, torna \"$línia\n" +" $subrutina $nomfitxer\"; aquesta informació addicional es pot utilitzar\n" +" per a proporcionar un traçat de la pila.\n" +"\n" +" El valor de EXPR indica quants «frames» retrocedir des de l'actual; el\n" +" «frame» superior és el 0." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "" +msgstr "la variable HOME no està definida" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "sobren arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "directori nul" -#: builtins/cd.def:227 +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "" +msgstr "la variable OLDPWD no està definida" -#: builtins/common.c:101 -#, fuzzy, c-format +#: builtins/common.c:96 +#, c-format msgid "line %d: " -msgstr "encaix %3d:" +msgstr "línia %d: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "s'est? escrivint" +msgstr "atenció: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "" - -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "nombre excessiu de par?metres" +msgstr "%s: sintaxi: " -#: builtins/common.c:191 shell.c:499 shell.c:782 -#, fuzzy, c-format +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format msgid "%s: option requires an argument" -msgstr "cal un par?metre per a l'opci?: -" +msgstr "%s: l'opció requereix un argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "" +msgstr "%s: falta un argument numèric" -#: builtins/common.c:205 -#, fuzzy, c-format +#: builtins/common.c:207 +#, c-format msgid "%s: not found" -msgstr "%s: no s'ha trobat l'ordre" +msgstr "%s: no s'ha trobat" -#: builtins/common.c:214 shell.c:795 -#, fuzzy, c-format +#: builtins/common.c:216 shell.c:879 +#, c-format msgid "%s: invalid option" -msgstr "%c%c: opci? inv?lida" +msgstr "%s: l'opció no és vàlida" -#: builtins/common.c:221 -#, fuzzy, c-format +#: builtins/common.c:223 +#, c-format msgid "%s: invalid option name" -msgstr "%c%c: opci? inv?lida" +msgstr "%s: el nom de l'opció no és vàlid" -#: builtins/common.c:228 general.c:231 general.c:236 -#, fuzzy, c-format +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format msgid "`%s': not a valid identifier" -msgstr "'%s' no ?s un identificador v?lid" +msgstr "«%s»: no és un identificador vàlid" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "n?mero inv?lid de senyal" +msgstr "nombre octal no vàlid" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "n?mero inv?lid de senyal" +msgstr "nombre hexadecimal no vàlid" -#: builtins/common.c:242 expr.c:1256 -#, fuzzy +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "n?mero inv?lid de senyal" +msgstr "nombre no vàlid" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "" +msgstr "%s: especificació de senyal no vàlida" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "" +msgstr "«%s»: pid o especificació de feina no vàlids" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s: ?s una variable nom?s de lectura" +msgstr "%s: variable de només lectura" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: no es pot assignar" -#: builtins/common.c:272 +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" -msgstr "" +msgstr "%s: %s fora del domini" -#: builtins/common.c:272 builtins/common.c:274 -#, fuzzy +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" -msgstr "s'esperava un par?metre" +msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" -msgstr "" +msgstr "%s fora del domini" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "" +msgstr "%s: no existeix tal feina" -#: builtins/common.c:290 -#, fuzzy, c-format +#: builtins/common.c:299 +#, c-format msgid "%s: no job control" -msgstr "no hi ha cap tasca de control dins d'aquest int?rpret" +msgstr "%s: no hi ha control de feines" -#: builtins/common.c:292 -#, fuzzy +#: builtins/common.c:301 msgid "no job control" -msgstr "no hi ha cap tasca de control dins d'aquest int?rpret" +msgstr "no hi ha control de feines" -#: builtins/common.c:302 -#, fuzzy, c-format +# cd .. en un intèrpret restringit +#: builtins/common.c:311 +#, c-format msgid "%s: restricted" -msgstr "%s: s'ha finalitzat la tasca" +msgstr "%s: restringit" -#: builtins/common.c:304 -#, fuzzy +#: builtins/common.c:313 msgid "restricted" -msgstr "Terminat" +msgstr "restringit" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "" +msgstr "%s: no és una ordre interna de l'intèrpret" -#: builtins/common.c:321 -#, fuzzy, c-format +#: builtins/common.c:330 +#, c-format msgid "write error: %s" -msgstr "error del conducte: %s" +msgstr "error d'escriptura: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "error en establir els atributs del terminal: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "error en obtenir els atributs del terminal: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "" +msgstr "%s: error en obtenir el directori actual: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 -#, fuzzy, c-format +#: builtins/common.c:708 builtins/common.c:710 +#, c-format msgid "%s: ambiguous job spec" -msgstr "%s: Redirecci? ambigua" +msgstr "%s: l'especificació de feina és ambigua" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "aquesta versió no té ajuda disponible" + +# unset UID +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: no es pot suprimir: %s de només lectura" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: no es pot suprimir" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "" +msgstr "%s: nom d'acció no vàlid" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "" +msgstr "%s: no hi ha especificació de compleció" #: builtins/complete.def:696 msgid "warning: -F option may not work as you expect" -msgstr "" +msgstr "atenció: l'opció -F pot no funcionar com us espereu" #: builtins/complete.def:698 msgid "warning: -C option may not work as you expect" -msgstr "" +msgstr "atenció: l'opció -C pot no funcionar com us espereu" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "no s'està executant una funció de compleció" -#: builtins/declare.def:122 -#, fuzzy +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "" -"servir LOCAL dins d'una funci?; a?? restringir? la magnitud visible de la" +msgstr "només es pot utilitzar en una funció" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "" +msgstr "no és possible usar «-f» per convertir en funció" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s: funci? nom?s de lectura" +msgstr "%s: funció de només lectura" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: una variable referència no pot ser un vector" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: no es permeten autoreferències en variables referència" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: referència circular" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: la variable referència conté un nom de variable no vàlid" -#: builtins/declare.def:468 -#, fuzzy, c-format +#: builtins/declare.def:856 +#, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "$%s: no es pot assignar d'aquesta manera" +msgstr "%s: no és possible destruir variables vector d'aquesta manera" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: no és possible convertir un vector associatiu en indexat" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: es desaconsella l'assignació múltiple en vectors utilitzant cometes" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "" +msgstr "no es poden carregar biblioteques dinàmicament" -#: builtins/enable.def:312 -#, fuzzy, c-format +#: builtins/enable.def:376 +#, c-format msgid "cannot open shared object %s: %s" -msgstr "no es pot obrir el conducte anomenat %s per a %s: %s" +msgstr "no es pot obrir l'objecte compartit %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "" +msgstr "no s'ha trobat %s a l'objecte compartit %s: %s" + +# help enable +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ordre interna dinàmica ja carregada" -#: builtins/enable.def:459 +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "l'intent de carregar %s ha fallat (%d): no carregat" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "" +msgstr "%s: no s'ha carregat dinàmicament" -#: builtins/enable.def:474 -#, fuzzy, c-format +#: builtins/enable.def:577 +#, c-format msgid "%s: cannot delete: %s" -msgstr "%s: no es pot crear: %s" +msgstr "%s: no es pot eliminar: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" -msgstr "%s: ?s un directori" +msgstr "%s: és un directori" -#: builtins/evalfile.c:139 -#, fuzzy, c-format +#: builtins/evalfile.c:144 +#, c-format msgid "%s: not a regular file" -msgstr "%s: no es pot executar el fitxer binari" +msgstr "%s: no és un fitxer ordinari" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "" +msgstr "%s: el fitxer és massa gran" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: no es pot executar el fitxer binari" +msgstr "%s: no es poden executar fitxers binaris" -#: builtins/exec.def:212 -#, fuzzy, c-format +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format msgid "%s: cannot execute: %s" -msgstr "%s: no es pot crear: %s" +msgstr "%s: no es pot executar: %s" -#: builtins/exit.def:65 -#, fuzzy, c-format +#: builtins/exit.def:64 +#, c-format msgid "logout\n" -msgstr "fi de sessi?" +msgstr "desconnectat\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "" +msgstr "no és una sessió d'entrada: utilitzeu «exit»" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "" +msgstr "Hi ha feines aturades.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "" +msgstr "Hi ha feines en funcionament.\n" -#: builtins/fc.def:262 -#, fuzzy +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "%s: no s'ha trobat l'ordre" +msgstr "no s'ha trobat cap ordre" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "" +msgstr "especificació d'historial" -#: builtins/fc.def:370 -#, fuzzy, c-format +#: builtins/fc.def:444 +#, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: no es pot crear: %s" +msgstr "%s: no es pot obrir el fitxer temporal: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +# fg quan no hi ha cap feina en segon pla +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "actual" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "" +msgstr "la feina %d es va iniciar sense control de feines" #: builtins/getopt.c:110 -#, fuzzy, c-format +#, c-format msgid "%s: illegal option -- %c\n" -msgstr "opci? il�legal: -" +msgstr "%s: opció il·legal -- %c\n" #: builtins/getopt.c:111 -#, fuzzy, c-format +#, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "cal un par?metre per a l'opci?: -" +msgstr "%s: l'opció requereix un argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "" +msgstr "el «hashing» està deshabilitat" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "" +msgstr "%s: la taula «hash» és buida\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +# hash (sense arguments) +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "si s'escriu \"r\" s'executar? la darrera ordre." +msgstr "vegades\tordre\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Ordres de l'intèrpret coincidents amb '" +msgstr[1] "Ordres de l'intèrpret coincidents amb '" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" +"'\n" +"\n" #: builtins/help.def:185 -#, fuzzy, c-format +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "no hi ha ajuda sobre «%s». Proveu «help help», «man -k %s» o «info %s»." + +#: builtins/help.def:223 +#, c-format msgid "%s: cannot open: %s" -msgstr "%s: no es pot crear: %s" +msgstr "%s: no es pot obrir: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -484,121 +567,151 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" +"Aquestes ordres de l'intèrpret estan definides internament.\n" +"Feu «help» per a veure'n una llista. \n" +"Feu «help nom» per a obtenir informació sobre la funció «nom».\n" +"Feu «info bash» per a obtenir informació general sobre l'intèrpret.\n" +"Feu «man -k» o «info» per a obtenir informació sobre altres programes.\n" +"\n" +"Un asterisc (*) significa que l'ordre està deshabilitada.\n" +"\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "" +msgstr "no és possible usar més d'una opció d'entre -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "" +msgstr "posició a l'historial" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: la marca horària no és vàlida" -#: builtins/history.def:365 -#, fuzzy, c-format +#: builtins/history.def:449 +#, c-format msgid "%s: history expansion failed" -msgstr "%s: s'esperava una expressi? de nombre enter" +msgstr "%s: ha fallat l'expansió de l'historial" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: s'esperava una expressi? de nombre enter" +msgstr "%s: inlib ha fallat" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "" +msgstr "no es permeten altres opcions amb «-x»" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "" +msgstr "%s: els arguments han de ser ids de processos o feines" -#: builtins/kill.def:263 -#, fuzzy +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "Error desconegut %d" +msgstr "Error desconegut" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "s'esperava una expressi?" +msgstr "s'esperava una expressió" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: variable sense vincle" +msgstr "%s: no és un vector indexat" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "" +msgstr "%s: l'especificació de descriptor de fitxer no és vàlida" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "" +msgstr "%d: el descriptor de fitxer no és vàlid: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%c%c: opci? inv?lida" +msgstr "%s: el nombre de línies no és vàlid" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%c%c: opci? inv?lida" +msgstr "%s: l'origen del vector no és vàlid" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "n?mero inv?lid de senyal" +msgstr "%s: el quàntum de retorn no és vàlid" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: variable sense vincle" +msgstr "nom de variable vector en blanc" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "fa falta suport per a variables vector" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "" +msgstr "«%s»: falta un caràcter de format" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: l'especificació de format de temps no és vàlida" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "" +msgstr "«%c»: el caràcter de format no és vàlid" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" -msgstr "" +msgstr "atenció: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema en interpretar el format: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "" +msgstr "falta un dígit hexadecimal a \\x" -#: builtins/pushd.def:195 -#, fuzzy +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "falta un dígit Unicode a \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" -msgstr "seguent entrada de la pila (o sia, la nova primera entrada)." +msgstr "no hi ha més directoris" -#: builtins/pushd.def:462 -#, fuzzy +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: l'argument no és vàlid" + +#: builtins/pushd.def:480 msgid "" -msgstr "\taquest ser? el nou directori actual de treball." +msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "la pila de directoris està buida" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "S'ha desbordat la base de la pila." +msgstr "índex de la pila de directoris" -#: builtins/pushd.def:683 +# còpia parcial d'una altra cadena - l'original es troba més endavant +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -613,16 +726,35 @@ msgid "" " \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" +" +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" +" -N\tDisplays the Nth entry counting from the right of the list shown by\n" "\tdirs when invoked without options, starting with zero." msgstr "" +"Mostra la llista actual de directoris recordats. Els directoris són afegits\n" +" a la llista mitjançant l'ordre «pushd»; podeu recórrer la llista de\n" +" directoris cap enrere amb l'ordre «popd».\n" +"\n" +" Opcions:\n" +" -c neteja la pila, esborrant-ne tots els elements\n" +" -l no mostra les versions abreviades (amb el prefix ~) dels\n" +" directoris relatius al vostre directori personal\n" +" -p mostra la pila, una entrada per línia\n" +" -v mostra la pila, una entrada per línia indicant la posició a\n" +" la pila\n" +"\n" +" Arguments:\n" +" +N Mostra l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions, \n" +" començant des de zero.\n" +"\n" +" -N Mostra l'entrada N-èssima, comptant des de la dreta de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions,\n" +" començant des de zero." -#: builtins/pushd.def:705 +# còpia parcial d'una altra cadena - l'original es troba més endavant +#: builtins/pushd.def:723 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" @@ -646,8 +778,32 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Afegeix un directori al capdamunt de la pila de directoris, o fa girar la\n" +" llista, de manera que al capdamunt de la pila hi queda el directori de\n" +" treball corrent. Sense arguments, intercanvia els dos directoris de més\n" +" amunt.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'afegeixen directoris a la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +"\n" +" +N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de l'esquerra de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" -N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de la dreta de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" dir Afegeix DIR al capdamunt de la pila de directoris, i el\n" +" converteix en el nou directori de treball corrent.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs»." -#: builtins/pushd.def:730 +# còpia parcial d'una altra cadena - l'original es troba més endavant +#: builtins/pushd.def:748 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" @@ -667,916 +823,1041 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Elimina entrades de la pila de directoris. Sense arguments, elimina el\n" +" directori al capdamunt de la pila, i canvia al nou directori de dalt de\n" +" la pila.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'eliminen directoris de la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +" +N Elimina l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd +0» elimina el primer directori, i «popd +1»\n" +" el segon.\n" +"\n" +" -N Elimina l'entrada N-èssima, comptant des de la dreta de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd -0» elimina l'últim directori, i «popd -1» el\n" +" penúltim.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs»." -#: builtins/read.def:252 +# read -t -5 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "" +msgstr "%s: el límit de temps no és vàlid" -#: builtins/read.def:588 -#, fuzzy, c-format +#: builtins/read.def:827 +#, c-format msgid "read error: %d: %s" -msgstr "error del conducte: %s" +msgstr "error de lectura: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "" +msgstr "només es permet fer «return» des d'una funció o script" -#: builtins/set.def:768 -#, fuzzy +# unset -f -v foo +#: builtins/set.def:869 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" +msgstr "no és possible suprimir una funció i una variable alhora" -#: 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 +#: builtins/set.def:969 +#, c-format msgid "%s: not an array variable" -msgstr "%s: variable sense vincle" +msgstr "%s: no és una variable vector" -#: builtins/setattr.def:186 -#, fuzzy, c-format +#: builtins/setattr.def:189 +#, c-format msgid "%s: not a function" -msgstr "%s: funci? nom?s de lectura" +msgstr "%s: no és una funció" -#: builtins/shift.def:71 builtins/shift.def:77 -#, fuzzy +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: no es pot exportar" + +# shift -4 +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "shift [n]" +msgstr "nombre de «shifts»" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "" +msgstr "no es poden activar i desactivar opcions de forma simultània" -#: builtins/shopt.def:325 +# shopt -s foo +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "" +msgstr "%s: l'opció de l'intèrpret no és vàlida" +# source #: builtins/source.def:128 msgid "filename argument required" -msgstr "" +msgstr "fa falta un nom de fitxer" -#: builtins/source.def:153 -#, fuzzy, c-format +#: builtins/source.def:154 +#, c-format msgid "%s: file not found" -msgstr "%s: no s'ha trobat l'ordre" +msgstr "%s: no s'ha trobat el fitxer" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "no es pot suspendre" -#: builtins/suspend.def:111 -#, fuzzy +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "Finalitzar una sessi? de l'int?rpret d'ordres." +msgstr "no és possible suspendre un intèrpret d'entrada" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s és un àlies de «%s»\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "" +msgstr "%s és una paraula clau de l'intèrpret\n" -#: builtins/type.def:274 -#, fuzzy, c-format +#: builtins/type.def:275 +#, c-format msgid "%s is a function\n" -msgstr "%s: funci? nom?s de lectura" +msgstr "%s és una funció\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s és una ordre interna especial\n" -#: builtins/type.def:296 +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s és una ordre interna\n" -#: builtins/type.def:317 builtins/type.def:391 +# type dmesg +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" -msgstr "" +msgstr "%s és %s\n" -#: builtins/type.def:337 +# hash cp; type cp +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "%s és a la taula «hash» (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: el límit no és vàlid" -#: builtins/ulimit.def:398 -#, fuzzy, c-format +#: builtins/ulimit.def:426 +#, c-format msgid "`%c': bad command" -msgstr "%c%c: opci? inv?lida" +msgstr "«%c»: ordre errònia" -#: builtins/ulimit.def:427 -#, fuzzy, c-format +#: builtins/ulimit.def:464 +#, c-format msgid "%s: cannot get limit: %s" -msgstr "%s: no es pot crear: %s" +msgstr "%s: no es pot obtenir el límit: %s" -#: builtins/ulimit.def:453 -#, fuzzy +#: builtins/ulimit.def:490 msgid "limit" -msgstr "L?mit de la UCP" +msgstr "límit" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 -#, fuzzy, c-format +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s: no es pot crear: %s" +msgstr "%s: no es pot modificar el límit: %s" -#: builtins/umask.def:118 -#, fuzzy +#: builtins/umask.def:115 msgid "octal number" -msgstr "n?mero inv?lid de senyal" +msgstr "nombre octal" -#: builtins/umask.def:231 +# umask z=rwx +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "«%c»: l'operador de mode simbòlic no és vàlid" -#: builtins/umask.def:286 +# umask u=rwz +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "«%c»: el mode simbòlic conté caràcters no vàlids" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " línia " -#: error.c:165 -#, fuzzy, c-format +#: error.c:164 +#, c-format msgid "last command: %s\n" -msgstr "si s'escriu \"r\" s'executar? la darrera ordre." +msgstr "última ordre: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "" +msgstr "Avortant..." -#: error.c:406 -#, fuzzy +# prefix afegit als avisos infomatius interns (internal_inform) +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMACIÓ: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "atenció: " + +#: error.c:488 msgid "unknown command error" -msgstr "Error desconegut %d" +msgstr "error no identificat" -#: error.c:407 -#, fuzzy +#: error.c:489 msgid "bad command type" -msgstr "un nom d'una ordre." +msgstr "tipus d'ordre erroni" -#: error.c:408 -#, fuzzy +#: error.c:490 msgid "bad connector" -msgstr "connector inv?lid '%d'" +msgstr "connector erroni" -#: error.c:409 -#, fuzzy +#: error.c:491 msgid "bad jump" -msgstr "Salt incorrecte %d" +msgstr "salt erroni" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "%s: variable sense vincle" +msgstr "%s: variable no definida" -#: 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" +# SIGALRM +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atemps esgotat mentre s'esperaven dades: autodesconnexió\n" -#: execute_cmd.c:497 +# error intern +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "" +msgstr "no s'ha pogut redirigir l'entrada estàndard des de /dev/null: %s" -#: execute_cmd.c:1162 +# error intern +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "" +msgstr "TIMEFORMAT: «%c»: el caràcter de format no és vàlid" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: el coprocés [%d:%s] encara existeix" + +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "error del conducte: %s" +msgstr "error de canonada" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: excedit el nombre màxim d'avaluacions imbricades (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: excedit el nombre màxim d'imbricacions per a «source» (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: excedit el nombre màxim de funcions imbricades (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: restringit: no es pot especificar '/' en noms d'ordres" +msgstr "%s: restricció: no podeu especificar «/» en noms d'ordres" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: no s'ha trobat l'ordre" -#: execute_cmd.c:4827 -#, fuzzy, c-format +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: no es pot executar: no s'ha trobat un fitxer necessari" + +#: execute_cmd.c:6000 +#, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: ?s un directori" +msgstr "%s: %s: intèrpret erroni" + +# error intern +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: no es pot executar el fitxer binari: %s" -#: execute_cmd.c:4976 -#, fuzzy, c-format +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s»: és una ordre interna especial" + +#: execute_cmd.c:6175 +#, 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" +msgstr "no s'ha pogut duplicar l'fd %d com a fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "s'ha excedit el nivell de recursivitat de l'expressi?" +msgstr "excedit el nivell màxim de recursivitat per a expressions" -#: expr.c:265 -#, fuzzy +#: expr.c:291 msgid "recursion stack underflow" -msgstr "S'ha desbordat la base de la pila." +msgstr "«underflow» a la pila de recursivitat" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "error de sintaxi a l'expressi?" +msgstr "error de sintaxi a l'expressió" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "s'ha intentat assignar una variable inexistent" +msgstr "intent d'assignació a una no-variable" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "error de sintaxi en una assignació de variable" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "divisi? per 0" +msgstr "divisió per 0" -#: expr.c:471 -#, fuzzy +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "error de programaci?: pas incorrecte del senyal %d per a expassing()." +msgstr "bug: el component «expassign» és erroni" -#: expr.c:513 +# echo $((4 > 5 ? 0)) +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "s'esperava ':' per a l'expressi? condicional" +msgstr "falta un caràcter «:» a l'expressió condicional" -#: expr.c:781 +# echo $((4 ** -1)) +#: expr.c:973 msgid "exponent less than 0" -msgstr "" +msgstr "exponent menor que 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" +msgstr "fa falta un identificador després del pre-increment o pre-decrement" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "falta algun ')'" +msgstr "falta un caràcter «)»" -#: expr.c:897 expr.c:1176 -#, fuzzy +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "error de sintaxi: s'ha arribat inesperadament a la fi del fitxer" +msgstr "error de sintaxi: s'esperava un operand" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "" +msgstr "error de sintaxi: l'operador aritmètic no és vàlid" -#: expr.c:1202 -#, fuzzy, c-format +#: expr.c:1518 +#, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s: %s: %s (la prova d'error ?s \"%s\")\n" +msgstr "%s%s%s: %s (l'element erroni és «%s»)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "" +msgstr "la base aritmètica no és vàlida" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "nombre enter invàlid" -#: expr.c:1280 +#: expr.c:1603 msgid "value too great for base" -msgstr "valor massa gran per a la base de numeraci?" +msgstr "el valor de la base és massa gran" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "%s: s'esperava una expressi? de nombre enter" +msgstr "%s: expressió errònia\n" -#: general.c:61 -#, fuzzy +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getwd: no s'ha pogut accedir als directoris pares" +msgstr "getcwd: els directoris superiors són inaccessibles" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6208 +#, 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" +msgstr "no s'ha pogut restablir el mode «nodelay» per a l'fd %d" -#: input.c:258 -#, fuzzy, c-format +#: input.c:266 +#, 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" +msgstr "error en crear un fd nou a partir de l'fd %d" -#: input.c:266 -#, fuzzy, c-format +#: input.c:274 +#, 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" +msgstr "save_bash_input: ja existia un «buffer» per al nou fd %d" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: pgrp de la canonada" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" -msgstr "" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" -msgstr "" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "" +msgid "forked pid %d appears in running job %d" +msgstr "el pid bifurcat %d apareix a la feina en execució %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "s'elimina la feina aturada %d amb grup de procés %ld" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: el pid %5ld (%s) està marcat com a viu" -#: jobs.c:1401 -#, fuzzy, c-format +#: jobs.c:1839 +#, c-format msgid "describe_pid: %ld: no such pid" -msgstr "describe_pid: L'identificador de proc?s (pid) no existeix (%d)!\n" +msgstr "describe_pid: %ld: no existeix tal pid" -#: jobs.c:1416 -#, fuzzy, c-format +#: jobs.c:1854 +#, c-format msgid "Signal %d" -msgstr "Senyal desconeguda #%d" +msgstr "Senyal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Fet" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Aturat" -#: jobs.c:1439 -#, fuzzy, c-format +#: jobs.c:1877 +#, c-format msgid "Stopped(%s)" -msgstr "Aturat" +msgstr "Aturat(%s)" -#: jobs.c:1443 +# ha de tenir menys de 10 caràcters o no queda alineat +#: jobs.c:1881 msgid "Running" -msgstr "S'est? executant" +msgstr "Funcionant" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "Fet (%d)" +msgstr "Fet(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "Fi d'execuci? amb l'estat %d" +msgstr "Sortida %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Estat desconegut" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "(la imatge del nucli ha estat bolcada) " +msgstr "(s'ha bolcat la memòria)" -#: jobs.c:1568 -#, fuzzy, c-format +# wd = working directory +#: jobs.c:2009 +#, c-format msgid " (wd: %s)" -msgstr "(wd ara: %s)\n" +msgstr " (dt: %s)" -#: jobs.c:1776 -#, fuzzy, c-format +#: jobs.c:2250 +#, 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" +msgstr "setpgid (de %ld a %ld) per al procés inferior" -#: jobs.c:2104 nojobs.c:585 -#, fuzzy, c-format +#: jobs.c:2608 nojobs.c:666 +#, 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" +msgstr "wait: el pid %ld no és un fill d'aquest intèrpret" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "" +msgstr "wait_for: No hi ha constància del procés %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: la feina %d està aturada" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: no hi ha feines en curs" -#: jobs.c:2829 +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "%s: s'ha finalitzat la tasca" +msgstr "%s: la feina ha acabat" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: la feina %d ja es troba en segon pla" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: s'activa «WNOHANG» per a evitar un bloqueig indefinit" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "encaix %3d:" +msgstr "%s línia %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr " (bolcat de la imatge del nucli)" +msgstr " (s'ha bolcat la memòria)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "(wd ara: %s)\n" +msgstr "(dt ara: %s)\n" -#: jobs.c:3579 -#, fuzzy +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "initialize_jobs: getpgrp ha fallat: %s" +msgstr "initialize_job_control: getpgrp ha fallat" -#: jobs.c:3639 -#, fuzzy +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: no s'està executant el control de feines" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "initialize_jobs: disciplina de l?nia: %s" +msgstr "initialize_job_control: disciplina de línia" -#: jobs.c:3649 -#, fuzzy +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "initialize_jobs: getpgrp ha fallat: %s" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "no s'ha pogut establir el grup de procés del terminal (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "no hi ha cap tasca de control dins d'aquest int?rpret" +msgstr "aquesta sessió no té control de feines" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "" +msgstr "malloc: asserció fallida: %s\n" -#: lib/malloc/malloc.c:312 +# error intern i el \r provoca warnings +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" +"\\r\n" +"malloc: %s:%d: asserció mal executada\\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "" +msgstr "desconegut" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" +msgstr "malloc: bloc abatussat a la llista de disponibles" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" +msgstr "free: cridat amb un argument de bloc ja alliberat" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "" +msgstr "free: cridat amb un argument bloc no assignat" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "free: underflow detectat; mh_nbytes fora del domini" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow detectat; la variable magic8 està corrompuda" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "" +msgstr "free: les mides inicial i final del fragment difereixen" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "" +msgstr "realloc: cridat amb un argument de bloc no assignat" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "realloc: underflow detectat: mh_nbytes fora del domini" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow detectat: la variable magic8 està corrumpuda" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" +msgstr "realloc: les mides inicial i final del fragment difereixen" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" +msgstr "register_alloc: la taula «alloc» està plena de «FIND_ALLOC»?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "" +msgstr "register_alloc: %p ja es troba a la taula com a assignat?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "" +msgstr "register_free: %p ja es troba a la taula com a lliure?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "" +msgstr "base no vàlida" #: lib/sh/netopen.c:168 -#, fuzzy, c-format +#, c-format msgid "%s: host unknown" -msgstr "desconegut" +msgstr "%s: màquina desconeguda" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "" +msgstr "%s: el servei no és vàlid" #: lib/sh/netopen.c:306 #, c-format msgid "%s: bad network path specification" -msgstr "" +msgstr "%s: la ubicació remota no és vàlida" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "" +msgstr "les operacions de xarxa no estan suportades" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: no s'ha pogut canviar el local (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: no s'ha pogut canviar el local (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: no es poden reassignar %lu octets (%lu octets reassignats)" +msgstr "setlocale: %s: no s'ha pogut canviar el local (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: no es poden reassignar %lu octets (%lu octets reassignats)" +msgstr "setlocale: %s: no s'ha pogut canviar el local (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" -msgstr "Teniu correu en $_" +msgstr "Teniu correu a $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" -msgstr "Teniu correu nou en $_" +msgstr "Teniu correu nou a $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" -msgstr "S'ha llegit el correu a %s\n" +msgstr "El correu a %s ha estat llegit\n" -#: make_cmd.c:323 -#, fuzzy +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "error de sintaxi a l'expressi?" +msgstr "error de sintaxi: fa falta una expressió aritmètica" -#: make_cmd.c:325 -#, fuzzy +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "error de sintaxi: s'ha arribat inesperadament a la fi del fitxer" +msgstr "error de sintaxi: «;» inesperat" -#: make_cmd.c:326 -#, fuzzy, c-format +#: make_cmd.c:317 +#, c-format msgid "syntax error: `((%s))'" -msgstr "error de sintaxi" +msgstr "error de sintaxi: «((%s))»" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: el tipus d'instrucci? %d ?s incorrecte" +msgstr "make_here_document: tipus d'instrucció erroni %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "document literal a la línia %d delimitat per EOF (volia «%s»)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" -msgstr "" +msgstr "make_redirection: instrucció de redirecció «%d» fora del domini" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) excedeix «SIZE_MAX» (%lu): línia truncada" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "excedit el nombre màxim de documents literals" -#: parse.y:3133 parse.y:3369 -#, fuzzy, c-format +# "echo $(echo" en un script +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, 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'" +msgstr "EOF inesperat mentre es cercava «%c»" -#: parse.y:3951 -#, fuzzy +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "" -"s'ha arribat inesperadament a la fi del fitxer (EOF) mentre\n" -"es buscava per '%c'" +msgstr "EOF inesperat mentre es cercava «]]»" -#: parse.y:3956 -#, fuzzy, c-format +#: parse.y:4457 +#, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "hi ha un error inesperat de sintaxi prop del senyal '%s'" +msgstr "error de sintaxi a l'expressió condicional: element «%s» inesperat" -#: parse.y:3960 -#, fuzzy +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "error de sintaxi a l'expressi?" +msgstr "error de sintaxi a l'expressió condicional" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "" +msgstr "element «%s» inesperat, s'esperava «)»" -#: parse.y:4042 -#, fuzzy +#: parse.y:4543 msgid "expected `)'" -msgstr "s'esperava ')'" +msgstr "s'esperava «)»" -#: parse.y:4070 +# [[ -d ]] +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "" +msgstr "argument «%s» inesperat a un operador unari condicional" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" -msgstr "" +msgstr "argument inesperat a un operador unari condicional" -#: parse.y:4120 -#, fuzzy, c-format +#: parse.y:4621 +#, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "%s: s'esperava un operador binari" +msgstr "element «%s» inesperat, s'esperava un operador binari condicional" -#: parse.y:4124 -#, fuzzy +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "%s: s'esperava un operador binari" +msgstr "s'esperava un operador binari condicional" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "" +msgstr "argument inesperat «%s» a un operador binari condicional" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" -msgstr "" +msgstr "argument inesperat a un operador binari condicional" -#: parse.y:4161 -#, fuzzy, c-format +#: parse.y:4662 +#, c-format msgid "unexpected token `%c' in conditional command" -msgstr "s'esperava ':' per a l'expressi? condicional" +msgstr "element «%c» inesperat en una ordre condicional" -#: parse.y:4164 -#, fuzzy, c-format +#: parse.y:4665 +#, c-format msgid "unexpected token `%s' in conditional command" -msgstr "s'esperava ':' per a l'expressi? condicional" +msgstr "element «%s» inesperat en una ordre condicional" -#: parse.y:4168 -#, fuzzy, c-format +#: parse.y:4669 +#, c-format msgid "unexpected token %d in conditional command" -msgstr "s'esperava ':' per a l'expressi? condicional" +msgstr "element %d inesperat en una ordre condicional" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "hi ha un error inesperat de sintaxi prop del senyal '%s'" +msgstr "error de sintaxi a prop de l'element inesperat «%s»" -#: parse.y:5477 -#, fuzzy, c-format +#: parse.y:6137 +#, c-format msgid "syntax error near `%s'" -msgstr "hi ha un error inesperat de sintaxi prop del senyal '%s'" +msgstr "error de sintaxi a prop de «%s»" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "error de sintaxi: s'ha arribat inesperadament a la fi del fitxer" +msgstr "error de sintaxi: final de fitxer inesperat" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "error de sintaxi" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Utilitzeu ?%s? per a eixir de l'int?rpret d'ordres.\n" +msgstr "Useu \"%s\" per a abandonar l'intèrpret.\n" -#: parse.y:5711 -#, fuzzy +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "" -"s'ha arribat inesperadament a la fi del fitxer (EOF) mentre\n" -"es buscava per '%c'" +msgstr "EOF inesperat mentre es cercava un «)»" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "" +msgstr "completion: la funció «%s» no s'ha trobat" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possible reintent cíclic" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" +msgstr "progcomp_insert: %s: el paràmetre «COMPSPEC» és NUL" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: el connector '%d' ?s incorrecte" +msgstr "print_command: el connector «%d» és erroni" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "" +msgstr "xtrace_set: %d: el descriptor de fitxer no és vàlid" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: el punter de fitxer és NUL" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf: «%c»: el caràcter de format no és vàlid" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "" +msgstr "descriptor de fitxer fora del domini" -#: redir.c:166 -#, fuzzy, c-format +#: redir.c:205 +#, c-format msgid "%s: ambiguous redirect" -msgstr "%s: Redirecci? ambigua" +msgstr "%s: redirecció ambigua" -# No acabe d'entendre el significat de l'original "clobber" -#: redir.c:170 -#, fuzzy, c-format +# opció noclobber +#: redir.c:209 +#, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: No s'ha pogut sobreescriure el fitxer existent" +msgstr "%s: no es pot escriure sobre un fitxer existent" -#: redir.c:175 -#, fuzzy, c-format +#: redir.c:214 +#, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: restringit: no es pot especificar '/' en noms d'ordres" +msgstr "%s: restricció: no podeu redirigir la sortida" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, 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" +msgstr "no s'ha pogut crear el fitxer temporal per a un document literal: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: no es pot assignar la llista a un element de la matriu" +msgstr "%s: no és possible assignar un fd a una variable" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "" +msgstr "/dev/(tcp|udp)/host/port no està suportat si no hi ha xarxa" -#: redir.c:1101 -#, fuzzy +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "error de redirecci?" +msgstr "error de redirecció: no es pot duplicar l'fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "" +msgstr "no s'ha trobat el directori /tmp, sis-plau creeu-lo!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "" +msgstr "/tmp ha de ser un nom de directori vàlid" -#: shell.c:884 -#, fuzzy, c-format +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "el mode «pretty-printing» s'ignora en sessions interactives" + +#: shell.c:972 +#, c-format msgid "%c%c: invalid option" -msgstr "%c%c: opci? inv?lida" +msgstr "%c%c: l'opció no és vàlida" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "no s'ha pogut establir l'uid com a %d: uid effectiu %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "no s'ha pogut establir el gid com a %d: gid effectiu %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "no es pot iniciar el depurador; mode de depuració desactivat" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: És un directori" -#: shell.c:1651 +#: shell.c:1907 msgid "I have no name!" -msgstr "No tinc cap nom d'usuari!" +msgstr "No teniu nom!" -#: shell.c:1793 -#, fuzzy, c-format +#: shell.c:2061 +#, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "GNU %s, versi? %s\n" +msgstr "GNU bash, versió %s-(%s)\n" -#: shell.c:1794 +# +#: shell.c:2062 #, 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" +"Sintaxi: %s [opció GNU llarga] [opció] ...\n" +" %s [opció GNU llarga] [opció] fitxer-script ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "opcions de formes llargues de GNU:\n" +msgstr "Opcions GNU llargues:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "Opcions de l'int?rpret d'ordres:\n" +msgstr "Opcions de l'intèrpret:\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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD, o -c ordre, o bé -O opció_intèrpret\t(només invocació)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s o -o opci?\n" +msgstr "\t-%s, o bé -o opció\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Feu «%s -c \"help set\"» per a informació sobre les opcions de l'intèrpret.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "Feu «%s -c help» per a obtenir informació sobre les ordres internes.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "" +msgstr "Feu servir l'ordre «bashbug» per a informar de «bugs».\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "pàgina web de bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ajuda general per a programari GNU: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "" +msgstr "sigprocmask: %d: l'operació no és vàlida" #: siglist.c:48 msgid "Bogus signal" -msgstr "Senyal falsa" +msgstr "Senyal no fiable" +# Senyals POSIX #: siglist.c:51 msgid "Hangup" -msgstr "Penjar" +msgstr "Desconnexió" #: siglist.c:55 msgid "Interrupt" -msgstr "Interrumpeix" +msgstr "Interrupció" #: siglist.c:59 msgid "Quit" -msgstr "Eixir" +msgstr "Sortida" #: siglist.c:63 msgid "Illegal instruction" -msgstr "Instrucci? il�legal" +msgstr "Instrucció il·legal" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "BPT rastrejament/captura" +msgstr "Traçat/trampa BPT" #: siglist.c:75 msgid "ABORT instruction" -msgstr "Instrucci? d'avortament (ABORT)" +msgstr "Instrucció «ABORT»" #: siglist.c:79 msgid "EMT instruction" -msgstr "Instrucci? per a emular una captura EMT" +msgstr "Instrucció «EMT»" #: siglist.c:83 msgid "Floating point exception" -msgstr "Excepci? en operaci? amb coma flotant" +msgstr "Excepció de coma flotant" #: siglist.c:87 msgid "Killed" -msgstr "Finalitzat" +msgstr "Mort" #: siglist.c:91 msgid "Bus error" @@ -1584,33 +1865,27 @@ msgstr "Error de bus" #: siglist.c:95 msgid "Segmentation fault" -msgstr "Violaci? de segment" +msgstr "Violació de segment" #: siglist.c:99 msgid "Bad system call" -msgstr "Crida inv?lida del sistema" +msgstr "Crida de sistema errònia" #: siglist.c:103 msgid "Broken pipe" -msgstr "Conducte trencat" +msgstr "Canonada trencada" #: siglist.c:107 msgid "Alarm clock" -msgstr "Temporitzador" +msgstr "Alarma" #: 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." +msgstr "Finalitzat" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "Condici? urgent d'Entrada/Eixida (En/Ei)" +msgstr "Estat E/S urgent" #: siglist.c:119 msgid "Stopped (signal)" @@ -1622,27 +1897,27 @@ msgstr "Continua" #: siglist.c:135 msgid "Child death or stop" -msgstr "S'ha mort o s'ha aturat el proc?s fill" +msgstr "Procés inferior mort o aturat" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "Aturat (entrada per terminal)" +msgstr "Aturat (entrada tty)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "Aturat (eixida per terminal)" +msgstr "Aturat (sortida tty)" #: siglist.c:147 msgid "I/O ready" -msgstr "Entrada/Eixida preparades" +msgstr "E/S a punt" #: siglist.c:151 msgid "CPU limit" -msgstr "L?mit de la UCP" +msgstr "Limitació de CPU" #: siglist.c:155 msgid "File limit" -msgstr "L?mit de la grand?ria del fitxer" +msgstr "Limitació de fitxers" #: siglist.c:159 msgid "Alarm (virtual)" @@ -1650,723 +1925,660 @@ msgstr "Alarma (virtual)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "Alarma (entorn)" +msgstr "Alarma (perfil)" #: siglist.c:167 msgid "Window changed" -msgstr "S'ha canviat la finestra" +msgstr "Canvi de finestra" #: siglist.c:171 msgid "Record lock" -msgstr "Bloqueig de gravaci?" +msgstr "Bloqueig de registre" #: siglist.c:175 msgid "User signal 1" -msgstr "Senyal 1 definida per l'usuari" +msgstr "Senyal d'usuari 1" #: siglist.c:179 msgid "User signal 2" -msgstr "Senyal 2 definida per l'usuari" +msgstr "Senyal d'usuari 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "pendent de l'entrada de dades HFT" +msgstr "Dades HFT d'entrada pendents" #: siglist.c:187 msgid "power failure imminent" -msgstr "fallida imminent d'energia" +msgstr "fallada imminent de l'alimentació" #: siglist.c:191 msgid "system crash imminent" -msgstr "fallida imminent del sistema" +msgstr "fallada imminent del sistema" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "proc?s de migraci? cap a un altre UPC en curs" +msgstr "migració del procés a una altra CPU" #: siglist.c:199 msgid "programming error" -msgstr "error de programaci?" +msgstr "error de programació" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "S'ha concedit el mode de monitor HFT" +msgstr "mode de monitoratge HFT concedit" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "S'ha rebutjat el mode de monitor HFT" +msgstr "mode de monitoratge HFT retractat" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "S'ha completat la seq??ncia de so HFT" +msgstr "seqüència d'àudio HFT completada" #: siglist.c:215 msgid "Information request" -msgstr "" - -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Senyal desconeguda #" +msgstr "Petició d'informació" -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "Senyal desconeguda #%d" +msgstr "Senyal Desconegut #%d" -#: subst.c:1333 subst.c:1454 -#, fuzzy, c-format +# missatge similar a subst.c:75XX +#: subst.c:1480 subst.c:1670 +#, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "substituci? inv?lida: no existeix '%s' en %s" +msgstr "substitució errònia: falta un «%s» a %s" -#: subst.c:2735 +# foo[1]=(1 2 3) +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "%s: no es pot assignar la llista a un element de la matriu" +msgstr "%s: no és possible assignar llistes a l'element d'un vector" -#: subst.c:4754 subst.c:4770 -#, fuzzy +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "no es pot establir un conducte per a la substituci? del proc?s: %s" +msgstr "no s'ha pogut crear la canonada per a la substitució de procés" -#: subst.c:4802 -#, fuzzy +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "no es pot establir un proc?s fill per a la substituci? del proc?s: %s" +msgstr "no s'ha pogut crear el fill per a la substitució de procés" -#: subst.c:4847 -#, fuzzy, c-format +#: subst.c:6198 +#, c-format msgid "cannot open named pipe %s for reading" -msgstr "no es pot obrir el conducte anomenat %s per a %s: %s" +msgstr "no s'ha pogut obrir la canonada %s per a lectura" -#: subst.c:4849 -#, fuzzy, c-format +#: subst.c:6200 +#, c-format msgid "cannot open named pipe %s for writing" -msgstr "no es pot obrir el conducte anomenat %s per a %s: %s" +msgstr "no s'ha pogut obrir la canonada %s per a escriptura" -#: subst.c:4867 -#, fuzzy, c-format +#: subst.c:6223 +#, 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" +msgstr "no s'ha pogut duplicar la canonada %s com a fd %d" -#: subst.c:5063 -#, fuzzy +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "substitució d'ordre: s'ignora un octet nul en l'entrada" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "no es poden establir conductes per a la substituci? de l'ordre: %s" +msgstr "no s'ha pogut crear la canonada per a la substitució d'ordre" -#: subst.c:5097 -#, fuzzy +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "no es pot crear un proc?s fill per a la substituci? del proc?s: %s" +msgstr "no s'ha pogut crear un fill per a la substitució d'ordre" -#: subst.c:5114 -#, fuzzy +#: subst.c:6613 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" +msgstr "command_substitute: no s'ha pogut duplicar la canonada com a fd 1" + +# buscar context +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: el nom de la variable referenciada no és vàlid" -#: subst.c:5617 +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansió indirecta no vàlida" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nom de variable no vàlid" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: paràmetre no definit" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: par?metre nul o no ajustat" +msgstr "%s: paràmetre nul o no definit" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "%s: la sub-cadena de l'expressi? ?s < 0" +msgstr "%s: expressió de subcadena < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: substituci? inv?lida" +msgstr "%s: substitució errònia" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "$%s: no es pot assignar d'aquesta manera" +msgstr "$%s: no és possible assignar d'aquesta manera" -#: subst.c:7374 -msgid "" -"future versions of the shell will force evaluation as an arithmetic " -"substitution" -msgstr "" +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "en futures versions de bash s'avaluarà com a substitució aritmètica" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "substituci? inv?lida: no existeix '%s' en %s" +msgstr "subtitució errònia: falta un caràcter «`» final a %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "" +msgstr "cap coincidència: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "s'esperava un par?metre" +msgstr "s'esperava un argument" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s: s'esperava una expressi? de nombre enter" +msgstr "%s: s'esperava una expressió amb enters" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "s'esperava ')'" +msgstr "s'esperava «)»" -#: test.c:265 +#: test.c:267 #, 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" +msgstr "s'esperava «)», s'ha trobat %s" -#: test.c:449 test.c:736 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: s'esperava un operador binari" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: s'esperava un operador unari" + +#: test.c:896 msgid "missing `]'" -msgstr "s'ha perdut algun ']'" +msgstr "falta un «]»" -#: trap.c:203 -#, fuzzy +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "error de sintaxi: «%s» inesperat" + +#: trap.c:220 msgid "invalid signal number" -msgstr "n?mero inv?lid de senyal" +msgstr "el número de senyal no és vàlid" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: excedit el nivell màxim d'interceptació de senyals (%d)" -#: trap.c:327 +# internal warning +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" -msgstr "" +msgstr "run_pending_traps: valor incorrecte a trap_list[%d]: %p" -#: trap.c:331 +# internal warning +#: trap.c:416 #, c-format -msgid "" -"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" -msgstr "" +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: el gestor de senyal és SIG_DFL, em re-envio %d (%s) a mi mateix" -#: trap.c:380 -#, fuzzy, c-format +#: trap.c:509 +#, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler: Senyal inv?lida %d" +msgstr "trap_handler: senyal erroni %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "'%s': error en importar la definici? de la funci?" +msgstr "error en importar la definició de funció de «%s»" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "el nivell de l'intèrpret (%d) és massa elevat, es restableix a 1" -#: variables.c:1915 +# error intern +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "" +msgstr "make_local_variable: no existeix un context de funció en l'àmbit actual" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: no és possible assignar un valor a la variable" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: no es pot heretar un valor de tipus incompatible" + +# buscar context +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assignació numèrica a una variable referència" -#: variables.c:3159 +# error intern +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: no existeix un context de función en l'àmbit actual" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: par?metre nul o no ajustat" +msgstr "el paràmetre «exportstr» de la variable %s és nul" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "el caràcter %d en el paràmetre «exportstr» de %s no és vàlid" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "falta un «=» en el paràmetre «exportstr» de %s" -#: variables.c:3835 +# error intern +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" +msgstr "pop_var_context: la capçalera de shell_variables no és un context de funció" -#: variables.c:3848 +# error intern +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: no existeix un context de global_variables" -#: variables.c:3922 +# error intern +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" +msgstr "pop_scope: la capçaleras shell_variables no és un àmbit temporal d'entorn" -#: variables.c:4678 -#, fuzzy, c-format +# error intern +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: no es pot crear: %s" +msgstr "%s: %s: no s'ha pogut obrir com a FITXER" -#: variables.c:4683 +# error intern +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "" +msgstr "%s: %s: valor invàlid per a una traça de descriptor de fitxer" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: el valor de compatibilitat és fora del domini" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" +"Llicència GPLv3+: GNU GPL versió 3 o posterior\n" +" \n" -#: version.c:86 version2.c:83 -#, fuzzy, c-format +#: version.c:86 version2.c:86 +#, c-format msgid "GNU bash, version %s (%s)\n" -msgstr "GNU %s, versi? %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 "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Aquest programa és lliure; sou lliures de modificar-lo i redistribuir-lo." -#: version.c:92 version2.c:89 +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "No té CAP GARANTIA, fins a l'extrem permès per la llei." + +#: xmalloc.c:93 #, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: no s'han pogut assignar %lu octets (%lu octets assignats)" -#: version2.c:86 +#: xmalloc.c:95 #, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "" +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: no s'han pogut assignar %lu octets" -#: version2.c:87 +#: xmalloc.c:165 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: no s'han pogut assignar %lu octets (%lu octets assignats)" -#: 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 +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: no es poden assignar %lu octets (%lu octets assignats)" +msgstr "%s: %s:%d: no s'han pogut assignar %lu octets" -#: builtins.c:43 +# help alias +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "alias [-p] [nom[=valor] ... ]" +msgstr "alias [-p] [nom[=valor] ...]" -#: builtins.c:47 -#, fuzzy +# help unalias +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "unalias [-a] [nom ...]" +msgstr "unalias [-a] nom [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] " +# help bind +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m mapa] [-f fitxer] [-q nom] [-u nom] [-r tecles] [-x tecles:ordre-intèrpret] [tecles:funció-readline o ordre-readline]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [ordre-interna [arg ...]]" -#: builtins.c:61 -#, fuzzy +#: builtins.c:63 msgid "caller [expr]" -msgstr "test [expressi?]" - -#: builtins.c:64 -#, fuzzy -msgid "cd [-L|-P] [dir]" -msgstr "cd [-PL] [directori]" +msgstr "caller [expr]" #: builtins.c:66 -#, fuzzy -msgid "pwd [-LP]" -msgstr "pwd [-PL]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" #: 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 ...]" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -#, fuzzy -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "declare [-afFrxi] [-p] nom[=valor] ..." +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] ordre [arg ...]" #: builtins.c:78 -#, fuzzy -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "typeset [-afFrxi] [-p] nom[=valor] ..." +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [nom[=valor] ...] o declare -p [-aAfFilnrtux] [nom ...]" #: builtins.c:80 -#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] nom[=valor] ... o typeset -p [-aAfFilnrtux] [nom ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "local nom[=valor] ..." +msgstr "local [opció] nom[=valor] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "echo [-neE] [par?metre ...]" +msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 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 ...]" +msgstr "echo [-n] [arg ...]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "eval [par?metre ...]" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f fitxer] [nom ...]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "getopts cadena_opcions nom [par?metre]" +msgid "eval [arg ...]" +msgstr "eval [arg ...]" #: builtins.c:96 -#, fuzzy -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "exec [-cl] [-a nom] fitxer [redireccionament ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts cadena nom [arg ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nom] [ordre [argument ...]] [redirecció ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 -#, fuzzy +#: builtins.c:102 msgid "logout [n]" -msgstr "fi de sessi?" +msgstr "logout [n]" -#: builtins.c:103 -#, fuzzy +#: builtins.c:105 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]" +msgstr "fc [-e editor] [-lnr] [primer] [últim] o fc -s [pat=sub] [ordre]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "fg [id_tasca]" +msgstr "fg [feina]" -#: builtins.c:111 -#, fuzzy +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "bg [id_tasca]" +msgstr "bg [feina ...]" -#: builtins.c:114 -#, fuzzy +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "hash [-r] [-p cam?] [nom ...]" +msgstr "hash [-lr] [-p ubicació] [-dt] [nom ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [patr? ...]" +msgstr "help [-dms] [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:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d offset] [n] o history -anrw [fitxer] o history -ps arg [arg...]" -#: builtins.c:125 +#: builtins.c:127 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 ...]" +msgstr "jobs [-lnprs] [feina ...] o jobs -x ordre [args]" -#: 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [feina ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "let par?metres [par?metres ...]" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s senyal | -n númsenyal | -senyal] pid | feina ... o kill -l [senyal]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "return [n]" +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a vector] [-d delim] [-i text] [-n núm] [-N núm] [-p introd] [-t espera] [-u fd] [nom ...]" #: builtins.c:140 -#, fuzzy -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "set [--abefhkmnptuvxBCHP] [-o opci?] [par?metres ...]" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "unset [-f] [-v] [nom ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o nom-opció] [--] [-] [arg ...]" #: builtins.c:144 -#, fuzzy -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" -"export [-nf] [nom ...]\n" -"o\n" -"export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nom ...]" #: builtins.c:146 -#, fuzzy -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" -"readonly [-anf] [nom ...]\n" -"o\n" -"readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nom[=valor] ...] o bé export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "exit [n]" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nom[=valor] ...] o bé readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "nom del fitxer d'origen" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source fitxer [arguments]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr ". nom del fitxer" +msgstr ". fitxer [arguments]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 -msgid "test [expr]" -msgstr "test [expressi?]" - #: builtins.c:160 -msgid "[ arg... ]" -msgstr "[ par?metres... ]" +msgid "test [expr]" +msgstr "test [expr]" #: builtins.c:162 -msgid "times" -msgstr "times" +msgid "[ arg... ]" +msgstr "[ arg... ]" -#: builtins.c:164 -#, fuzzy +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "" -"trap [par?metres] [id_senyal], o \n" -"trap -l" +msgstr "trap [-lp] [[arg] senyal ...]" -#: builtins.c:166 -#, fuzzy +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "type [-apt] nom [nom ...]" +msgstr "type [-afptP] nom [nom ...]" -#: builtins.c:169 -#, fuzzy -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdfmstpnuv] [l?mit]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [límit]" -#: builtins.c:172 -#, fuzzy +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "umask [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" -#: builtins.c:175 -#, fuzzy -msgid "wait [id]" -msgstr "wait [n]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:179 -#, fuzzy -msgid "wait [pid]" -msgstr "wait [n]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" -#: builtins.c:182 -#, fuzzy +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for NOM [in PARAULES ... ;] do ORDRES; done" +msgstr "for NOM [in PARAULES ... ] ; do ORDRES; done" -#: builtins.c:184 -#, fuzzy +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "for NOM [in PARAULES ... ;] do ORDRES; done" +msgstr "for (( exp1; exp2; exp3 )); do ORDRES; done" -#: builtins.c:186 +#: builtins.c:188 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" +msgid "time [-p] pipeline" +msgstr "time [-p] canonada" #: 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" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PARAULA in [PATRÓ [| PATRÓ]...) ORDRES ;;]... esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "while ORDRES; do ORDRES; done" +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:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until ORDRES; do ORDRES; done" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while ORDRES; do ORDRES-2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until ORDRES; do ORDRES-2; done" #: builtins.c:200 -#, fuzzy -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "function NOM { ORDRES ; } or NOM () { ORDRES ; }" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOM] ordre [redireccions]" #: builtins.c:202 -#, fuzzy -msgid "{ COMMANDS ; }" -msgstr "{ ORDRES }" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nom { ORDRES ; } o bé nom () { ORDRES ; }" #: builtins.c:204 -#, fuzzy -msgid "job_spec [&]" -msgstr "fg [id_tasca]" +msgid "{ COMMANDS ; }" +msgstr "{ ORDRES ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "s'esperava una expressi?" +msgid "job_spec [&]" +msgstr "feina [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "s'esperava una expressi?" +msgid "(( expression ))" +msgstr "(( expressió ))" #: builtins.c:210 -#, fuzzy +msgid "[[ expression ]]" +msgstr "[[ expressió ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "Es permeten les variables de l'int?rpret d'ordres com a operands. El" +msgstr "variables - Nom i significat d'algunes variables de l'intèrpret" -#: builtins.c:213 -#, fuzzy +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "pushd [directori | +N | -N] [-n]" +msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 -#, fuzzy +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "popd [+N | -N] [-n]" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 -#, fuzzy +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o opci?_format_llarg] nom_opci? [nom_opci?...]" +msgstr "shopt [-pqsu] [-o] [opció ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +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 "" - -#: 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o opció] [-A acció] [-G patró] [-W paraules] [-F funció] [-C ordre] [-X patró] [-P prefix] [-S sufix] [nom ...]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "type [-apt] nom [nom ...]" +#: builtins.c:235 +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ó] [-A acció] [-G patró] [-W paraules] [-F funció] [-C ordre] [-X filtre] [-P prefix] [-S sufix] [paraula]" -#: builtins.c:240 -msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opció] [-DEI] [nom ...]" #: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d delim] [-n nombre] [-O origen] [-s nombre] [-t] [-u fd] [-C callback] [-c quàntum] [vector]" -#: builtins.c:254 +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d delim] [-n nombre] [-O origen] [-s nombre] [-t] [-u fd] [-C callback] [-c quàntum] [vector]" + +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2378,27 +2590,45 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" alias returns true unless a NAME is supplied for which no alias has been\n" " defined." msgstr "" +"Defineix o mostra àlies.\n" +"\n" +" Sense arguments «alias» mostra la llista d'àlies definits, en format\n" +" «alias NOM=VALOR», a la sortida estàndard.\n" +"\n" +" Altrament, defineix un àlies per a cada NOM per al qual existeix un\n" +" VALOR. Un espai al final de VALOR fa que la paraula següent sigui\n" +" susceptible de ser substituïda per un àlies quan s'expandeix aquest\n" +" àlies.\n" +"\n" +" Opcions:\n" +" -p Mostra tots els àlies definits en format reutilitzable\n" +"\n" +" Estat de sortida:\n" +" alias torna cert, excepte si NOM no correspon a cap àlies definit." -#: builtins.c:276 -#, fuzzy +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +"Esborra tots els NOMs de la llista d'àlies definits.\n" +"\n" +" Opcions:\n" +" -a esborra totes les definicions d'àlies.\n" +"\n" +" Torna cert, excepte si NOM no és un àlies existent." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2410,35 +2640,68 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" +"Estableix vincles de tecla i variables Readline.\n" +"\n" +" Vincula una seqüència de tecles a una funció o macro Readline, o bé\n" +" estableix una variable Readline. La sintaxi dels arguments no-opcions\n" +" és la mateixa que en el fitxer ~/.inputrc, però ha de consistir en un\n" +" únic argument: per exemple, bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +"\n" +" Opcions:\n" +" -m mapa Usa MAPA com a mapa de tecles mentre duri aquesta\n" +" ordre. Els noms de mapes acceptables són emacs, emacs-\n" +" standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command,\n" +" i vi-insert.\n" +" -l Mostra els noms de les funcions\n" +" -P Mostra els noms de les funcions i els vincles de tecla.\n" +" -p Mostra les funcions i els vincles en un format que es pot\n" +" reutilitzar com a entrada.\n" +" -S Mostra les seqüències de tecles que invoquen macros i els\n" +" seus valors respectius.\n" +" -s Mostra les seqüències de tecles que invoquen macros i els\n" +" seus valors respectius en un format que es pot reutilitzar\n" +" com a entrada.\n" +" -V Mostra els noms de les variables i els seus valors.\n" +" -v Mostra els noms de les variables i els seus respectius\n" +" valors en un format que es pot reutilitzar com a entrada.\n" +" -q funció Consulta quines tecles invoquen la funció especificada.\n" +" -u funció Desvincula les tecles vinculades a la funció especificada.\n" +" -r tecles Elimina el vincle associat a TECLES.\n" +" -f fitxer Obté els vincles de tecles de FITXER.\n" +" -x tecles:ordre Fa que s'executi ORDRE quan es prem TECLES.\n" +" -X Mostra les tecles amb les respectives ordres vinculades\n" +" amb l'opció -x, en un format reutilitzable com a entrada.\n" +"\n" +" Estat de sortida:\n" +" bind torna 0 excepte si passeu una opció no reconeguda o es produeix\n" +" un error." -#: builtins.c:326 -#, fuzzy +# help break +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2447,10 +2710,17 @@ msgid "" " \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." +msgstr "" +"Surt de bucles for, while o until.\n" +"\n" +" Surt d'un bucle FOR, WHILE o UNTIL. Si especifiqueu N, trenca N bucles\n" +" de la imbricació.\n" +"\n" +" Estat de sortida:\n" +" L'estat de sortida és 0 excepte si N és més petit que 1." -#: builtins.c:338 -#, fuzzy +# help continue +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2459,23 +2729,40 @@ msgid "" " \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." +msgstr "" +"Continua bucles for, while o until.\n" +"\n" +" Executa la següent iteració en un bucle FOR, WHILE o UNTIL. Si\n" +" especifiqueu N, continua el bucle N-èssim de la imbricació.\n" +"\n" +" Estat de sortida:\n" +" L'estat de sortida és 0 excepte si N és més petit que 1." -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" +"Executa ordres internes.\n" +"\n" +" Executa ORDRE-INTERNA amb ARG com a arguments sense fer una cerca de\n" +" l'ordre. Això és útil si voleu reimplementar una ordre interna de\n" +" l'intèrpret com a funció, però voleu executar l'ordre interna des de la\n" +" pròpia funció.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de ORDRE-INTERNA, o fals si ORDRE-INTERNA no és\n" +" una ordre interna." -#: builtins.c:365 +# help caller +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2490,47 +2777,98 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" +"Retorna el context de la subrutina actual.\n" +"\n" +" Sense EXPR, torna \"$línia $nomfitxer\". Amb EXPR, torna \"$línia\n" +" $subrutina $nomfitxer\"; aquesta informació addicional es pot utilitzar\n" +" per a proporcionar un traçat de la pila.\n" +"\n" +" El valor de EXPR indica quants «frames» retrocedir des de l'actual; el\n" +" «frame» superior és el 0.\n" +"\n" +" Estat de sortida:\n" +" Retorna 0 excepte si l'intèrpret no està executant una funció o si EXPR\n" +" no és una expressió vàlida." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." msgstr "" +"Canvia el directori de treball de l'intèrpret.\n" +"\n" +" Canvia el directori actual a DIR. Per defecte, DIR és el valor de la\n" +" variable HOME.\n" +"\n" +" La variable CDPATH defineix els camins de cerca per al directori que\n" +" conté DIR. Es poden especificar camins alternatius separats per dos\n" +" punts (:). Un nom de directori nul s'interpreta com al directori\n" +" actual. Si DIR comença amb una barra, aleshores no s'usa CDPATH.\n" +"\n" +" Si no es troba el directori, i l'opció de l'intèrpret «cdable_vars» està\n" +" activada, aleshores la paraula s'interpreta com a un nom de variable.\n" +" Si la variable especificada té algun valor, aquest valor s'usa en lloc\n" +" de DIR.\n" +"\n" +" Opcions:\n" +" -L força el seguiment d'enllaços simbòlics: resol els enllaços\n" +" simbòlics que conté DIR després de processar «..»\n" +" -P usa l'estructura de directoris física sense seguir possibles\n" +" enllaços simbòlics: resol els enllaços simbòlics que conté\n" +" DIR abans de processar «..»\n" +" -e amb l'opció -P, si no es pot determinar el directori de\n" +" treball actual amb èxit, surt amb un estat diferent de zero\n" +" -@ en sistemes que ho suporten, presenta fitxers amb atributs\n" +" estesos com a directoris que contenen els atributs del\n" +" fitxer\n" +"\n" +" Per defecte, se segueixen els enllaços simbòlics, com si especifiquéssiu\n" +" l'opció «-L». El component «..» es processa eliminant el component del\n" +" camí immediatament previ fins a la primera barra o fins al principi de\n" +" DIR.\n" +"\n" +" Estat de sortida:\n" +" Torna 0 si s'ha canviat de directori, i si $PWD s'ha establert de forma\n" +" satisfactòria quan s'utilitza -P; altrament un valor diferent de zero." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2539,9 +2877,20 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Mostra el nom del directori de treball actual.\n" +"\n" +" Opcions:\n" +" -L mostra el valor de $PWD si és el nom del directori de\n" +" treball actual\n" +" -P mostra el directori físic, sense cap enllaç simbòlic\n" +"\n" +" Per defecte, «pwd» es comporta com si haguéssiu especificat «-L».\n" +"\n" +" Estat de sortida:\n" +" Torna 0 excepte si heu especificat una opció no vàlida o no es pot\n" +" llegir el directori actual." -#: builtins.c:428 -#, fuzzy +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2549,44 +2898,74 @@ msgid "" " \n" " Exit Status:\n" " Always succeeds." -msgstr "Cap efecte; no es fa res. Es retorna amb el codi zero com a eixida." +msgstr "" +"Ordre nul·la.\n" +"\n" +" No té cap efecte; aquesta ordre no fa res.\n" +"\n" +" Estat de sortida:\n" +" Sempre reïx." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Torna un resultat reeixit.\n" +"\n" +" Estat de sortida:\n" +" Sempre reïx." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"Torna un resultat fallit.\n" +"\n" +" Estat de sortida:\n" +" Sempre falla." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Executa una ordre simple o mostra informació sobre ordres.\n" +"\n" +" Executa ORDRE amb ARGS sense cercar funcions de l'intèrpret amb aquest\n" +" nom, o bé mostra informació sobre l'ORDRE especificada. Es pot\n" +" utilitzar per a invocar programes en el disc, quan existeix una funció\n" +" amb el mateix nom.\n" +"\n" +" Opcions:\n" +" -p usa el valor per defecte de la variable PATH que garanteix\n" +" trobar totes les utilitats estàndards\n" +" -v mostra una descripció de l'ORDRE similar a la que mostra\n" +" l'ordre «type»\n" +" -V mostra una descripció més detallada per a cada ORDRE\n" +"\n" +" Estat de sortida:\n" +" Retorna l'estat de sortida de ORDRE, o fracàs si ORDRE no s'ha trobat." -#: builtins.c:476 +# help declare +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2596,17 +2975,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2614,22 +2998,64 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" +"Assigna valors i atributs a variables.\n" +"\n" +" Declara variables i els hi assigna atributs. Sense cap NOM, mostra el\n" +" valor i atributs de totes les variables.\n" +"\n" +" Opcions:\n" +" -f només té en compte noms i definicions de funcions\n" +" -F només mostra noms de funcions (a part del número de línia i\n" +" el nom del fitxer, en mode de depuració)\n" +" -g crea variables globals quan s'utilitza dins d'una funció,\n" +" altrament s'ignora\n" +" -I en crear una variable local, hereda els atributs i valor de \n" +" la variable del mateix nom d'un àmbit anterior\n" +" -p mostra els atributs i el valor de cada NOM\n" +"\n" +" Opcions que estableixen atributs:\n" +" -a per a fer NOMs vectors indexats (si estan suportats)\n" +" -A per a fer NOMs vectors associatius (si estan suportats)\n" +" -i per a assignar l'atribut de nombre enter a NOMs\n" +" -l per a convertir els valors de NOMs a minúscules en l'assignació\n" +" -n per a fer NOM una referència a la variable que té per nom\n" +" el seu valor\n" +" -r per a fer NOMs variables de només lectura\n" +" -t per a assignar l'atribut «traça» a NOMs\n" +" -u per a convertir els valors de NOMs a majúscules en l'assignació\n" +" -x per a exportar NOMs\n" +"\n" +" Si feu servir «+» en lloc de «-», elimina l'atribut.\n" +"\n" +" Les variables que tenen l'atribut de nombre enter s'avaluen\n" +" aritmèticament (vegeu l'ordre «let») quan s'assigna un valor a la\n" +" variable.\n" +"\n" +" Quan s'usa en una funció, «declare» converteix NOMs en variables locals,\n" +" igual que l'ordre «local». L'opció «-g» suprimeix aquest comportament.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si rep una opció invàlida o es produeix un error." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Assigna valors i atributs a variables.\n" +"\n" +" Sinònim de «declare». Vegeu «help declare»." -#: builtins.c:520 +# help local +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2640,15 +3066,28 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Defineix variables locals.\n" +"\n" +" Crea una variable local anomenada NOM i li assigna VALOR. OPCIÓ pot ser\n" +" qualsevol opció que «declare» admeti.\n" +"\n" +" Les variables locals només es poden utilitzar dins d'una funció; només\n" +" són visibles a dins de la funció on són definides i dins de les funcions\n" +" imbricades dins d'aquestes.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit excepte si heu especificat una opció no vàlida, es produeix\n" +" un error, o l'intèrpret no està executant una funció." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2660,6 +3099,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2667,15 +3107,52 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Escriu arguments a la sortida estàndard.\n" +"\n" +" Mostra els ARGs a la sortida estàndard, separats per un únic espai i\n" +" seguits d'un salt de línia.\n" +"\n" +" Opcions:\n" +" -n omet el caràcter de salt de línia.\n" +" -e activa la interpretació de seqüències d'escapada\n" +" -E desactiva la interpretació de seqüències d'escapada\n" +"\n" +" «echo» interpreta els següents caràcters escapats amb una barra inversa:\n" +" \\a alerta (campana)\n" +" \\b retrocés\n" +" \\c suprimeix tota sortida ulterior\n" +" \\e caràcter d'escapada\n" +" \\E caràcter d'escapada\n" +" \\f salt de pàgina\n" +" \\n salt de línia\n" +" \\r retorn de carro\n" +" \\t tabulació horitzontal\n" +" \\v tabulació vertical\n" +" \\\\ barra invertida\n" +" \\0nnn caràcter corresponent al codi ASCII número NNN, on NNN és un\n" +" número octal de 0 a 3 dígits.\n" +" \\xHH caràcter de 8 bits corresponent al valor HH, on HH és un\n" +" número hexadecimal d'1 o 2 dígits.\n" +" \\uHHHH caràcter Unicode corresponent al valor hexadecimal HHHH, on\n" +" HHHH pot tenir de 1 a 4 dígits.\n" +" \\uHHHHHHHH caràcter Unicode corresponent al valor hexadecimal HHHHHHHH,\n" +" on HHHHHHHH pot tenir de 1 a 8 dígits.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que es produeixi un error d'escriptura." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2687,8 +3164,18 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Escriu arguments a la sortida estàndard.\n" +"\n" +" Mostra els ARGs a la sortida estàndard seguits d'un salt de línia.\n" +"\n" +" Opcions:\n" +" -n omet el caràcter de salt de línia.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que es produeixi un error d'escriptura." -#: builtins.c:586 +# help enable +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2714,20 +3201,51 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Habilita o inhabilita ordres internes de l'intèrpret.\n" +"\n" +" Habilita o inhabilita ordres internes de l'intèrpret. Inhabilitar una\n" +" ordre interna permet executar una ordre que es troba en el disc i que té\n" +" el mateix nom que l'ordre interna, sense necessitat d'escriure'n la\n" +" ubicació completa.\n" +"\n" +" Opcions:\n" +" -a mostra una llista d'ordres internes indicant-ne l'estat\n" +" -n inhabilita NOM o bé mostra una llista de les ordres internes\n" +" que es troben inhabilitades\n" +" -p mostra la llista en format reutilitzable\n" +" -s mostra només les ordres internes «especials» Posix\n" +"\n" +" Opcions per a controlar l'enllaçat dinàmic:\n" +" -f carrega l'ordre interna NOM, de l'objecte compartit FITXER\n" +" -d esborra una ordre interna carregada amb l'opció -f\n" +"\n" +" Sense opcions, habilita cada un dels NOMs.\n" +"\n" +" Per a utilitzar el «test» que es troba al $PATH en lloc de la versió\n" +" interna de l'intèrpret, feu «enable -n test».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si NOM no és una ordre interna o té lloc un error." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"Executa els arguments com una ordre.\n" +"\n" +" Combina ARGs en una única cadena, utilitza el resultat com a entrada per\n" +" a l'intèrpret i executa les ordres resultants.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'ordre, o èxit si l'ordre és nul·la." -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2760,68 +3278,122 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 "" +"Processa arguments que representen opcions.\n" +"\n" +" getopts és utilitzat per les utilitats de bash per a processar els\n" +" paràmetres posicionals com a opcions.\n" +"\n" +" CADENA conté les lletres de les opcions a reconèixer; si una lletra va\n" +" seguida de dos punts, l'opció requereix un argument, que s'ha de separar\n" +" de l'opció amb un espai en blanc.\n" +"\n" +" Cada cop que s'invoca, getopts posa l'opció successiva a la variable\n" +" d'entorn $nom, inicialitzant nom si no existeix, i l'índex del següent\n" +" argument a la variable OPTIND. La variable OPTIND s'inicialitza a 1\n" +" cada cop que s'invoca l'intèrpret o un script. Quan una opció requereix\n" +" un argument, getopts col·loca l'argument a la variable OPTARG.\n" +"\n" +" getopts pot informar d'errors de dues maneres. Si el primer caràcter de\n" +" CADENA és un caràcter de dos punts (:), getopts entra en mode silenciós.\n" +" En aquest mode, no es mostra cap missatge d'error. Si es detecta una\n" +" opció no vàlida, getopts col·loca el caràcter de l'opció a OPTARG. Si\n" +" no es troba un argument requerit, getopts posa un ':' a NOM, i el\n" +" caràcter de l'opció trobada a OPTARG. Si getopts no es troba en mode\n" +" silenciós, i es detecta una opció no vàlida, getopts posa un '?' a NOM i\n" +" elimina la variable OPTARG. Si no troba un argument requerit, posa un\n" +" '?' a NOM, elimina OPTARG, i mostra un missatge de diagnòstic.\n" +"\n" +" Si la variable OPTERR té el valor 0, getopts evita mostrar missatges\n" +" d'error, encara que el primer caràcter de CADENA no siguin dos punts.\n" +" Per defecte, OPTERR té el valor 1.\n" +"\n" +" Normalment, getopts interpreta els paràmetres posicionals, però si\n" +" es proporcionen arguments com a valors ARG, s'intepreten aquests.\n" +"\n" +" Estat de sortida:\n" +" Retorna èxit si es troba alguna opció; falla si s'arriba al final de les\n" +" opcions o si es produeix un error." -#: builtins.c:668 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"Substitueix el procés de l'intèrpret per l'ordre especificada.\n" +"\n" +" Executa ORDRE, substituint aquest intèrpret pel programa especificat.\n" +" Es passen ARGUMENTS a l'ORDRE com a arguments. Si no especifiqueu cap\n" +" ORDRE, qualsevol redirecció té efectes a l'intèrpret actual.\n" +"\n" +" Opcions:\n" +" -a nom passa NOM a ORDRE com a argument número zero\n" +" -c executa ORDRE en un entorn buit\n" +" -t passa un guionet a ORDRE com a argument número zero\n" +"\n" +" Si l'ordre no es pot executar i la sessió és no-interactiva, l'intèrpret\n" +" surt, excepte si l'opció «execfail» està habilitada.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que ORDRE no es trobi o es produeixi un error de\n" +" redirecció." -#: builtins.c:689 -#, fuzzy +#: builtins.c:715 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," +msgstr "" +"Abandona l'intèrpret.\n" +"\n" +" Surt de l'intèrpret amb estat N. Si ometeu N, l'estat de sortida és el\n" +" de l'última ordre executada." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"Abandona una sessió d'entrada.\n" +"\n" +" Abandona una sessió d'entrada amb estat de sortida N. Torna un error si\n" +" no s'està executant en una sessió d'entrada." -#: builtins.c:708 +# help fc (hi ha un bug a la cadena original) +#: builtins.c:734 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" +" 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" +" -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" @@ -2835,12 +3407,34 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" Returns success or status of executed command; non-zero if an error occurs." msgstr "" +"Mostra o executa ordres de l'historial.\n" +"\n" +" fc s'utilitza per a mostrar o editar i re-executar ordres de\n" +" l'historial. PRIMER i ÚLTIM poden ser números que defineixen un\n" +" interval, o PRIMER pot ser una cadena, que significa l'ordre més recent\n" +" que comença amb aquesta cadena.\n" +"\n" +" Opcions:\n" +" -e EDITOR selecciona quin editor utilitzar. Per defecte és el valor\n" +" de la variable FCEDIT, després el valor de EDITOR, i\n" +" finalment vi\n" +" -l mostra les línies en lloc d'editar-les\n" +" -n omet els números de línia a l'hora de mostrar la llista\n" +" -r inverteix l'ordre de les línies (més recents primer)\n" +"\n" +" Amb el format «fc -s [pat=sub ...] [ordre]», ORDRE es re-executa després\n" +" d'haver fet la substitució PAT=SUB.\n" +"\n" +" Un àlies útil és r='fc -s', de manera que «r cc» executa l'última ordre\n" +" que comença per «cc» i «r» re-executa l'última ordre.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit o l'estat de l'última ordre executada; diferent de zero si es\n" +" produeix un error." -#: builtins.c:738 -#, fuzzy +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2850,47 +3444,83 @@ msgid "" " \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." +msgstr "" +"Porta una feina al primer pla.\n" +"\n" +" Mou la feina identificada per FEINA al primer pla, convertint-la en la\n" +" feina corrent. Si ometeu FEINA, s'utilitza la feina que l'intèrpret\n" +" considera com a corrent.\n" +"\n" +" Estat de sortida:\n" +" L'estat de l'ordre que es mou al primer pla, o fallada si es produeix un\n" +" error." -#: builtins.c:753 +#: builtins.c:779 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" +" 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 "" +"Mou feines al segon pla.\n" +"\n" +" Mou la feina identificada per FEINA al segon pla, com si s'hagués\n" +" iniciat amb un «&». Si ometeu FEINA, s'utilitza la feina que\n" +" l'intèrpret considera com a feina corrent.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si el control de feines no està habilitat o es\n" +" produeix un error." -#: builtins.c:767 +# help hash +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"Recorda o mostra la ubicació de programes.\n" +"\n" +" Determina i recorda la ubicació completa de cada NOM d'ordre. Sense\n" +" arguments, mostra informació sobre les ordres que s'han recordat.\n" +"\n" +" Opcions:\n" +" -d oblida la ubicació recordada per a cada NOM\n" +" -l utilitza un format que es pot reciclar com a entrada\n" +" -p ubicació utilitza UBICACIÓ com a ubicació completa per a NOM\n" +" -r oblida totes les ubicacions recordades\n" +" -t mostra la ubicació recordada per a cada NOM,\n" +" precedint cada ubicació amb el corresponent NOM, si\n" +" hi ha múltiples NOMs.\n" +" Arguments:\n" +" NOM Es busca NOM en el $PATH i s'afegeix a la llista\n" +" d'ordres recordades.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si NOM no es troba o passeu una opció invàlida." -#: builtins.c:792 +# help help +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2902,17 +3532,32 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" +"Mostra informació sobre ordres internes.\n" +"\n" +" Mostra ajuda sobre les ordres internes. Si s'especifica PATRÓ,\n" +" dóna informació detallada sobre aquelles ordres que coincideixen\n" +" amb PATRÓ, altrament mostra una llista amb temes d'ajuda.\n" +"\n" +" Opcions:\n" +" -d mostra una descripció curta de cada tema\n" +" -m mostra la forma d'ús en format de pseudo-pàgina de manual\n" +" -s mostra una sinopsi de cada tema corresponent a PATRÓ\n" +"\n" +" Arguments:\n" +" PATRÓ Patró que especifica un tema d'ajuda\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si PATRÓ no es troba o passeu una opció invàlida." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2921,32 +3566,62 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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 "" +"Mostra o manipula l'historial.\n" +"\n" +" Mostra l'historial amb números de línia, indicant les entrades\n" +" modificades amb «*». Amb l'argument N, només mostra les N últimes\n" +" entrades.\n" +"\n" +" Opcions:\n" +" -c esborra la llista d'entrades\n" +" -d offset esborra l'entrada de l'historial a la posició OFFSET\n" +" -a afegeix la sessió actual al fitxer de l'historial\n" +" -n llegeix el fitxer de l'historial i afegeix les línies\n" +" prèviament no llegides a la llista\n" +" -r llegeix el fitxer de l'historial i n'afegeix el contingut\n" +" sencer a la llista\n" +" -w escriu l'historial actual al fitxer de l'historial\n" +" -p expandeix cada ARG i mostra el resultat, sense desar-lo\n" +" a la llista\n" +" -s afegeix ARGs a la llista com una única entrada\n" +"\n" +" Si proporcioneu un nom de FITXER, s'utilitza com a fitxer d'historial.\n" +" En cas contrari, si $HISTFILE té algun valor, s'utilitza aquest, si no\n" +" s'utilitza ~/.bash_history.\n" +"\n" +" Si la variable HISTTIMEFORMAT està definida i no és nul·la, el seu valor\n" +" s'utilitza com a cadena de format strftime(3) per a mostrar l'hora\n" +" associada a cada entrada de l'historial. En cas contrari no es mostra\n" +" la marca horària.\n" +"\n" +" Estat de sortida: \n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2955,8 +3630,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2969,8 +3644,30 @@ msgid "" " Returns success unless an invalid option is given or an error occurs.\n" " If -x is used, returns the exit status of COMMAND." msgstr "" +"Mostra l'estat de feines.\n" +"\n" +" Mostra les feines actives. Si especifiqueu FEINA, es restringeix la\n" +" sortida a la feina especificada. Sense opcions, mostra l'estat de totes\n" +" les feines actives.\n" +"\n" +" Opcions:\n" +" -l mostra els IDs de procés a més de la informació normal\n" +" -n mostra només les feines l'estat de les quals ha\n" +" canviat des de l'última notificació\n" +" -p mostra només els IDs de procés\n" +" -r restringeix la sortida a les feines en execució\n" +" -s restringeix la sortida a les feines aturades\n" +"\n" +" Amb l'opció -x, s'executa ORDRE, després de substituir totes les\n" +" especificacions de feina per l'ID del procés del líder del grup de\n" +" processos d'aquella feina, a ARGS.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error.\n" +" Si utilitzeu -x, torna l'estat de sortida d'ORDRE." -#: builtins.c:879 +# help disown +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2980,14 +3677,28 @@ msgid "" " 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" +" \t\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 "" +"Deslliga feines vinculades a l'intèrpret actual.\n" +"\n" +" Suprimeix FEINA de la taula de feines actives. Si no especifiqueu\n" +" FEINA, s'interpreta que us referiu a la feina corrent.\n" +"\n" +" Opcions:\n" +" -a suprimeix totes les feines si no especifiqueu FEINA\n" +" -h marca FEINA per a no enviar-li un senyal SIGHUP si\n" +" l'intèrpret rep un SIGHUP\n" +" -r suprimeix totes les feines en execució\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció o FEINA invàlida." -#: builtins.c:898 +# help kill +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2999,7 +3710,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3008,16 +3720,35 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Envia un senyal a una feina.\n" +"\n" +" Envia el senyal SENYAL o NÚMSENYAL al procés corresponent a PID o FEINA.\n" +" Si no especifiqueu cap senyal, s'envia un SIGTERM.\n" +"\n" +" Opcions:\n" +" -s senyal SENYAL és el nom d'un senyal\n" +" -n númsenyal NÚMSENYAL és el número d'un senyal\n" +" -l mostra els noms dels senyals; si hi ha arguments \n" +" després de «-l» s'interpreten com a números de\n" +" senyals, els noms dels quals s'han de mostrar\n" +" -L sinònim de -l\n" +"\n" +" kill és una ordre interna per dues raons: perquè això permet usar IDs de\n" +" feina en lloc de IDs de procés, i perquè permet matar processos encara\n" +" que arribeu al límit de processos que se us permet crear.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." -#: builtins.c:921 +# help let +#: builtins.c:949 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" +" 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" @@ -3051,58 +3782,143 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" +"Avalua expressions aritmètiques.\n" +"\n" +" Avalua cada ARG com a expressió aritmètica. Les operacions es fan amb\n" +" enters d'amplada fixa sense comprovacions de desbordament, tot i que les\n" +" divisions per 0 es detecten i es marquen com a error. La següent llista\n" +" mostra els operadors, agrupats en nivells d'igual precedència. Els\n" +" nivells apareixen en ordre descendent de precedència.\n" +"\n" +" id++, id-- postincrement, postdecrement\n" +" ++id, --id preincrement, predecrement\n" +" -, + negatiu, positiu unaris\n" +" !, ~ negació lògica i a nivell de bits\n" +" ** exponenciació\n" +" *, /, % multiplicació, divisió, residu\n" +" +, - addició, subtracció\n" +" <<, >> desplaçament de bits a l'esquerra i a la dreta\n" +" <=, >=, <, > comparació\n" +" ==, != igualtat, desigualtat\n" +" & AND a nivell de bits\n" +" ^ XOR a nivell de bits\n" +" | OR a nivell de bits\n" +" && AND lògic\n" +" || OR lògic\n" +" expr ? expr : expr\n" +" operador condicional\n" +" =, *=, /=, %=,\n" +" +=, -=, <<=, >>=,\n" +" &=, ^=, |= assignació\n" +"\n" +" S'admeten variables de l'intèrpret com a operands. El nom de la\n" +" variable se substitueix pel seu valor (convertit en enter d'amplada\n" +" fixa). No cal que la variable tingui l'atribut d'enter perquè pugui\n" +" aparèixer en una expressió aritmètica.\n" +"\n" +" Els operadors s'avaluen en ordre de precedència. Les subexpressions\n" +" entre parèntesis s'avaluen primer, independentment de les regles de\n" +" precedència anteriors.\n" +"\n" +" Estat de sortida:\n" +" Si l'avaluació de l'últim ARG és 0, let torna 1; altrament torna 0." -#: builtins.c:966 +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" - -#: builtins.c:1009 +"Llegeix una línia a l'entrada estàndard i la divideix en camps.\n" +"\n" +" Llegeix una sola línia a l'entrada estàndard, o al descriptor de fitxer\n" +" FD si especifiqueu l'opció -u. La línia és dividida en camps, segons\n" +" les mateixes regles que en la separació de paraules, i la primera\n" +" paraula s'assigna al primer NOM, la segona al segon NOM, etc., mentre\n" +" que les paraules sobrants, si n'hi ha, s'assignen a l'últim NOM. Només\n" +" es reconeixen com a delimitadors de paraula els caràcters que conté la\n" +" variable $IFS.\n" +"\n" +" Si no especifiqueu cap NOM, la línia es desa a la variable REPLY.\n" +"\n" +" Opcions:\n" +" -a vector assigna les paraules llegides a VECTOR, de forma seqüencial\n" +" començant des de l'índex número 0.\n" +" -d delim continua llegint fins a trobar el caràcter DELIM, en lloc de\n" +" fins a trobar un salt de línia\n" +" -e si la sessió és interactiva, utilitza Readline per a obtenir\n" +" la línia\n" +" -i text Utilitza TEXT com a text inicial per a Readline\n" +" -n núm torna després de llegir exactament NÚM caràcters, o quan es\n" +" trobi el delimitador si apareix abans de NÚM caràcters\n" +" -N núm torna només després de llegir exactament NÚM caràcters,\n" +" excepte si es troba EOF o s'esgota el temps d'espera,\n" +" i ignora qualsevol delimitador\n" +" -p introd mostra la cadena INTROD sense cap caràcter de salt de línia\n" +" afegit, abans d'intentar llegir res\n" +" -r prohibeix escapar caràcters amb una barra invertida\n" +" -s suprimeix l'eco quan l'entrada està connectada a un terminal\n" +" -t temps surt si transcorre TEMPS (en segons) abans d'haver\n" +" aconseguit llegir una línia sencera. Per defecte, el límit\n" +" de temps és el valor de la variable TMOUT. TEMPS pot ser un\n" +" número amb decimals. Si TEMPS és 0, read torna\n" +" immediatament, sense intentar llegir cap dada, i torna èxit\n" +" només si hi ha dades disponibles en el descriptor de fitxer\n" +" FD especificat. Un estat de sortida més gran que 128 indica\n" +" que s'ha esgotat el temps d'espera.\n" +" -u fd llegeix dades al descriptor de fitxer FD, en lloc de a\n" +" l'entrada estàndard.\n" +"\n" +" Estat de sortida:\n" +" El codi de retorn és zero, excepte si es troba EOF (final de fitxer),\n" +" s'arriba al límit de temps (en aquest cas, retorna un número major que\n" +" 128), es produeix un error d'assignació de variable, o si heu\n" +" especificat un descriptor de fitxer invàlid amb l'opció -u." + +# help return +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3113,8 +3929,16 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Torna des d'una funció de l'intèrpret.\n" +"\n" +" Provoca que una funció o script executat amb «source» torni amb el valor\n" +" de retorn especificat per N. Si s'omet N, l'estat de retorn és aquell\n" +" de l'última ordre executada dins la funció o script.\n" +"\n" +" Estat de sortida:\n" +" Torna N, o fallada si l'intèrpret no està executant cap funció o script." -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3157,8 +3981,7 @@ msgid "" " 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" +" 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" @@ -3180,9 +4003,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3195,8 +4021,90 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" +"Estableix opcions de l'intèrpret i paràmetres posicionals.\n" +"\n" +" Modifica el valor d'atributs de l'intèrpret i de paràmetres posicionals,\n" +" o mostra els noms i valors de les variables de l'intèrpret.\n" +"\n" +" Opcions:\n" +" -a Exporta les variables que es creïn o es modifiquin.\n" +" -b Notifica immediatament la finalització de feines.\n" +" -e Surt immediatament si una ordre acaba amb estat diferent de zero.\n" +" -f Deshabilita la generació de noms de fitxers («globbing»).\n" +" -h Recorda la ubicació de les ordres que s'executen.\n" +" -k Afegeix tots els arguments en forma d'assignació a l'entorn de\n" +" l'ordre, no només aquells que precedeixen el nom de l'ordre.\n" +" -m Activa la gestió de feines.\n" +" -n Llegeix ordres, però sense executar-les.\n" +" -o opció\n" +" Estableix la variable corresponent a OPCIÓ:\n" +" allexport igual que -a\n" +" braceexpand igual que -B\n" +" emacs utilitza una interfície d'edició estil 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 l'historial\n" +" ignoreeof l'intèrpret no surt en cas de trobar EOF\n" +" interactive-comments\n" +" permet comentaris en ordres interactives\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 actualment aquesta opció no té cap efecte\n" +" notify igual que -b\n" +" nounset igual que -u\n" +" onecmd igual que -t\n" +" physical igual que -P\n" +" pipefail el valor retornat per una canonada és l'estat de\n" +" l'última ordre que ha acabat amb estat no-zero,\n" +" o zero si cap ordre ha acabat amb estat diferent\n" +" de zero\n" +" posix ajusta el comportament de bash a l'estàndard Posix\n" +" privileged igual que -p\n" +" verbose igual que -v\n" +" vi usa una interfície d'edició estil vi\n" +" xtrace igual que -x\n" +" -p S'activa automàticament sempre que els ids efectiu i real de\n" +" l'usuari no coincideixin. No processa el fitxer $ENV ni importa\n" +" funcions. Si desactiveu aquesta opció, els valors de l'uid i gid\n" +" reals s'assignen a l'uid i gid efectius.\n" +" -t Surt després de llegir i executar una única ordre.\n" +" -u Tracta les variables no definides com a error, en substitucions.\n" +" -v Escriu les línies de l'entrada a la sortida.\n" +" -x Escriu ordres i arguments a la sortida a mesura que s'executen.\n" +" -B Activa l'expansió de claudàtors ([])\n" +" -C Prohibeix la sobrescriptura de fitxers ordinaris mitjançant\n" +" redireccions.\n" +" -E Intercepta senyals ERR també durant l'execució de funcions.\n" +" -H Activa la substitució d'elements de l'historial. Aquesta opció\n" +" està activa per defecte si la sessió és interactiva.\n" +" -P Omet la resolució d'enllaços simbòlics a l'hora d'executar ordres\n" +" que canvien el directori corrent, tals com cd.\n" +" -T Intercepta senyals DEBUG i RETURN també durant l'execució de\n" +" funcions.\n" +"\n" +" -- Assigna els arguments restants a paràmetres posicionals. Si no\n" +" queda cap argument, suprimeix els paràmetres posicionals.\n" +" \n" +" - Assigna els arguments restants a paràmetres posicionals.\n" +" Desactiva les opcions -x i -v.\n" +"\n" +" Un signe + en lloc de - desactiva l'opció corresponent. Els arguments\n" +" que controlen les opcions es poden utilitzar a l'hora d'invocar\n" +" l'intèrpret. El conjunt d'opcions actives en aquest intèrpret es pot\n" +" trobar a $-. La resta d'arguments són paràmetres posicionals i\n" +" s'assignen per ordre a $1, $2, ... $n. Si no especifiqueu cap ARG, es\n" +" mostren totes les variables definides.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3205,9 +4113,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3215,14 +4124,32 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Suprimeix el valor i atributs de variables i funcions.\n" +"\n" +" Per a cada NOM, suprimeix la corresponent variable o funció.\n" +"\n" +" Opcions:\n" +" -f interpreta NOM com a funció\n" +" -v interpreta NOM com a variable\n" +" -n interpreta NOM com a referència a una altra variable, i\n" +" suprimeix aquesta variable, en lloc de la variable a què\n" +" es refereix\n" +"\n" +" Sense opcions, primer intenta suprimir una variable, i si això falla\n" +" intenta suprimir una funció.\n" +"\n" +" Algunes variables no poden ser suprimides; per ex., vegeu «readonly».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida o NOM és una\n" +" variable o funció de només lectura." -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3234,8 +4161,25 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Exporta variables de l'intèrpret.\n" +"\n" +" Exporta automàticament cada NOM a l'entorn de les ordres subsegüents.\n" +" Si especifiqueu VALOR, s'assigna VALOR a la variable abans\n" +" d'exportar-la.\n" +"\n" +" Opcions:\n" +" -f tracta NOM com a funció\n" +" -n suprimeix la propietat d'exportació per a NOM\n" +" -p mostra una llista amb totes les variables i funcions\n" +" exportades\n" +" \n" +" L'argument «--» atura el processament de més opcions.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida o NOM no és\n" +" vàlid." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3247,15 +4191,35 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 variables com a no modificables.\n" +"\n" +" Marca cada NOM com a variable o funció de només lectura; els valors\n" +" d'aquests NOMs es poden modificar en assignacions subseqüents. Si\n" +" especifiqueu VALOR, s'assigna VALOR a la variable o funció abans de\n" +" marcar-la com a només lectura.\n" +"\n" +" Opcions:\n" +" -a limita la sortida a vectors indexats\n" +" -A limita la sortida a vectors associatius\n" +" -f limita la sortida a funcions\n" +" -p mostra una llista amb totes les variables o funcions,\n" +" depenent de si heu especificat l'opció -f, de només lectura\n" +"\n" +" L'argument «--» atura el processament de més opcions.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si especifiqueu una opció no vàlida o NOM no és\n" +" vàlid." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3265,8 +4229,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Desplaça els paràmetres posicionals.\n" +"\n" +" Reanomena els paràmetres posicionals $N+1, $N+2 ... com a $1, $2 ... Si\n" +" ometeu N, s'assumeix que és 1.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si N és negatiu o més gran que $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3279,8 +4250,18 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"Executa les ordres d'un fitxer a l'intèrpret actual.\n" +"\n" +" Llegeix les ordres que hi ha a FITXER i les executa a l'intèrpret\n" +" actual. Les entrades a $PATH s'utilitzen per a localitzar el directori\n" +" que conté FITXER. Si especifiqueu qualsevol ARG, aquests arguments es\n" +" converteixen en paràmetres posicionals quan s'executa FITXER.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre a FITXER executada; falla si FITXER no\n" +" es pot llegir." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3293,15 +4274,28 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Suspèn l'execució de l'intèrpret.\n" +"\n" +" Suspèn l'execució d'aquest intèrpret fins a rebre un senyal SIGCONT. Si\n" +" no es força, les sessions d'entrada no es poden suspendre.\n" +"\n" +" Opcions:\n" +" -f força la suspensió, encara que sigui una sessió d'entrada\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si no hi ha control de feines o es produeix un error." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3325,8 +4319,7 @@ msgid "" " -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 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" @@ -3347,14 +4340,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3370,36 +4365,119 @@ msgid "" " Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" " false or an invalid argument is given." msgstr "" +"Avalua una expressió condicional.\n" +"\n" +" Surt amb estat 0 (cert) o 1 (fals) en funció de l'avaluació d'EXPR. Les\n" +" expressions poden ser unàries o binàries. Les expressions unàries\n" +" s'utilitzen sovint per a determinar l'estat de fitxers. També podeu\n" +" utilitzar operadors de cadenes, i operadors de comparació numèrica.\n" +"\n" +" El comportament de test depèn del nombre d'arguments. Podeu trobar\n" +" l'especificació completa a la plana del manual de bash.\n" +"\n" +" Operadors de fitxer:\n" +"\n" +" -a FITXER Cert si el fitxer existeix.\n" +" -b FITXER Cert si el fitxer és un fitxer especial de blocs.\n" +" -c FITXER Cert si el fitxer és un fitxer especial de caràcters.\n" +" -d FITXER Cert si el fitxer és un directori.\n" +" -e FITXER Cert si el fitxer existeix.\n" +" -f FITXER Cert si el fitxer existeix i és ordinari.\n" +" -g FITXER Cert si el bit «set-group-id» està activat.\n" +" -h FITXER Cert si el fitxer és un enllaç simbòlic.\n" +" -L FITXER Cert si el fitxer és un enllaç simbòlic.\n" +" -k FITXER Cert si el bit «sticky» està activat.\n" +" -p FITXER Cert si el fitxer és una canonada.\n" +" -r FITXER Cert si teniu permís per a llegir el fitxer.\n" +" -s FITXER Cert si el fitxer existeix i no està buit.\n" +" -S FITXER Cert si el fitxer és un «socket».\n" +" -t FD Cert si FD està obert i es refereix a un terminal.\n" +" -u FITXER Cert si el bit «set-user-id» està activat.\n" +" -w FITXER Cert si teniu permís per a escriure al fitxer.\n" +" -x FITXER Cert si teniu permís per a executar el fitxer.\n" +" -O FITXER Cert si el vostre usuari és propietari del fitxer.\n" +" -G FITXER Cert si el vostre grup és propietari del fitxer.\n" +" -N FITXER Cert si el fitxer ha canviat des de l'última lectura.\n" +"\n" +" FITXER1 -nt FITXER2 Cert si fitxer1 és més nou que fitxer2 (segons la\n" +" data de modificació).\n" +"\n" +" FITXER1 -ot FITXER2 Cert si fitxer1 és més antic que fitxer2.\n" +"\n" +" FITXER1 -ef FITXER2 Cert si fitxer1 és un enllaç dur a fitxer2.\n" +"\n" +" Operadors de cadena:\n" +"\n" +" -z CADENA Cert si la cadena és buida.\n" +"\n" +" -n CADENA Cert si la cadena no és buida.\n" +"\n" +" CADENA1 = CADENA2\n" +" Cert si les cadenes són iguals.\n" +" CADENA1 != CADENA2\n" +" Cert si les cadenes no són iguals.\n" +" CADENA1 < CADENA2\n" +" Cert si CADENA1 va primer alfabèticament.\n" +" CADENA1 > CADENA2\n" +" Cert si CADENA2 va primer alfabèticament.\n" +"\n" +" Altres operadors:\n" +"\n" +" -o OPCIÓ Cert si l'opció de l'intèrpret està activada.\n" +" -v VAR Cert si la variable VAR està definida.\n" +" -R VAR Cert si la variable VAR està definida i és una \n" +" referència a una altra variable.\n" +" ! EXPR Cert si expr és fals.\n" +" EXPR1 -a EXPR2 Cert si tant expr1 com expr2 són cert.\n" +" EXPR1 -o EXPR2 Cert si qualsevol de expr1 o expr2 són certes.\n" +"\n" +" arg1 OP arg2 Tests aritmètics. OP és un de -eq, -ne, -lt, -le, -gt,\n" +" o -ge.\n" +"\n" +" Els operadors aritmètics binaris tornen cert si ARG1 és igual, no\n" +" igual, més petit que, més petit que o igual, més gran que, o més gran\n" +" que o igual que ARG2, respectivament.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit si EXPR s'avalua com a cert; falla si EXPR s'avalua com a\n" +" fals o si especifiqueu un argument no vàlid." -#: builtins.c:1299 -#, fuzzy +#: builtins.c:1344 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 \"[\"." +"Avalua una expressió condicional.\n" +"\n" +" Aquesta ordre interna és un sinònim de \"test\", amb la diferència que\n" +" l'últim argument ha de ser un signe «]» que tanqui el «[» inicial." -#: builtins.c:1308 +# help times +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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 "" +"Mostra els temps d'execució.\n" +"\n" +" Mostra el temps d'execució d'usuari i sistema acumulat per l'intèrpret i\n" +" per tots els seus processos inferiors.\n" +"\n" +" Estat de sortida:\n" +" Sempre reïx." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3408,29 +4486,63 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" Returns success unless a SIGSPEC is invalid or an invalid option is given." msgstr "" +"Intercepta senyals i altres esdeveniments.\n" +"\n" +" Defineix i activa controladors de senyal, que són executats quan\n" +" l'intèrpret rep senyals o en altres circumstàncies.\n" +"\n" +" ARG és una ordre que es llegeix i s'executa quan l'intèrpret rep SENYAL.\n" +" Si ometeu ARG (i especifiqueu un únic SENYAL) o ARG és «-», cada senyal\n" +" és restablert al seu valor original. Si ARG és una cadena nul·la,\n" +" aleshores SENYAL és ignorat per l'intèrpret i per tots els programes\n" +" invocats per l'intèrpret.\n" +"\n" +" Si SENYAL és EXIT (0), ARG s'executa quan l'intèrpret surt. Si SENYAL\n" +" és DEBUG, ARG s'executa abans de cada ordre. Si SENYAL és RETURN, ARG\n" +" s'executa cada cop que una funció o script executat amb l'ordre «.» o\n" +" «source» finalitza l'execució. Si SENYAL és ERR, ARG s'executa en els\n" +" mateixos casos en què una ordre faria sortir l'intèrpret si l'opció -e\n" +" estigués activada.\n" +"\n" +" Si no especifiqueu cap argument, trap mostra una llista d'ordres\n" +" associades a cada senyal.\n" +"\n" +" Opcions:\n" +" -l mostra una llista amb els noms dels senyals i els números\n" +" corresponents\n" +" -p mostra els controladors de senyal associats a cada SENYAL\n" +"\n" +" Cada SENYAL és o bé un nom de senyal definit al fitxer o bé\n" +" un número de senyal. Els noms de senyal no són sensibles a les\n" +" majúscules i el prefix SIG és opcional. Podeu enviar un senyal a\n" +" l'intèrpret amb l'ordre «kill -senyal $$».\n" +"\n" +" Estat de sortida: \n" +" Torna èxit, excepte si algun SENYAL no és vàlid o especifiqueu una\n" +" ordre no vàlida." -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3439,33 +4551,57 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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." +" Returns success if all of the NAMEs are found; fails if any are not found." msgstr "" +"Mostra informació sobre el tipus d'ordre.\n" +"\n" +" Indica com seria interpretat NOM si s'utilitzés com a ordre.\n" +"\n" +" Opcions:\n" +" -a mostra totes les ubicacions que contenen un executable\n" +" anomenat NOM, incloent àlies, ordres internes i funcions si i\n" +" només si no s'usa conjuntament amb l'opció «-p»\n" +" -f omet la cerca de funcions\n" +" -P força una cerca al PATH per a cada NOM, encara que sigui un\n" +" àlies, ordre interna o funció, i torna el nom del fitxer que\n" +" s'executaria\n" +" -p torna o bé el nom del fitxer que s'executaria, o bé res, si\n" +" «type -t NOM» no indica «fitxer».\n" +" -t torna només una paraula, que és «àlies», «paraula clau»,\n" +" «funció», «ordre interna», «fitxer», o bé «», depenent de si\n" +" NOM és un àlies, una paraula reservada de l'intèrpret, una\n" +" funció, una ordre interna, un fitxer, o no es pot trobar,\n" +" respectivament.\n" +"\n" +" Arguments:\n" +" NOM El nom de l'ordre a interpretar.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit si es troben tots els NOMs; falla si n'hi ha algun que no es\n" +" pot trobar." -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -3478,6 +4614,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3489,6 +4626,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3503,8 +4645,55 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Modifica la limitació de recursos de l'intèrpret.\n" +"\n" +" Permet especificar la quantitat de recursos disponibles per a\n" +" l'intèrpret d'ordres i per als processos que aquest crea, en els\n" +" sistemes que permeten tal control.\n" +"\n" +" Opcions:\n" +" -S estableix una limitació «tova»\n" +" -H estableix una limitació «dura»\n" +" -a mostra tots els límits establerts\n" +" -b mida màxima de la memòria intermèdia per a «sockets»\n" +" -c mida màxima dels fitxers de bolcat de memòria\n" +" -d mida màxima del segment de dades d'un procés\n" +" -e prioritat màxima d'un procés («nice»)\n" +" -f mida màxima dels fitxers escrits per l'intèrpret i fills\n" +" -i nombre màxim de senyals pendents\n" +" -k nombre màxim de cues («kqueue») obertes per a aquest procés\n" +" -l quantitat màxima de memòria que un procés pot blocar\n" +" -m mida màxima del conjunt resident (RSS)\n" +" -n nombre màxim de descriptors de fitxers oberts\n" +" -p mida màxima de la memòria intermèdia per a canonades\n" +" -q nombre màxim d'octets a les cues de missatges POSIX\n" +" -r prioritat màxima de temps-real\n" +" -s mida màxima de la pila\n" +" -t quantitat màxima de temps de CPU en segons\n" +" -u nombre màxim de processos d'usuari\n" +" -v mida de la memòria virtual\n" +" -x nombre màxim de fitxers de bloqueig\n" +" -P nombre màxim de pseudoterminals\n" +" -R temps màxim d'execució per a processos de temps real\n" +" -T nombre màxim de fils d'execució\n" +"\n" +" Algunes opcions poden no estar disponibles en algunes plataformes.\n" +"\n" +" Si especifiqueu un LÍMIT, aquest s'utilitza com a nou valor per al\n" +" recurs indicat; els valors especials de LÍMIT són «soft», «hard» i\n" +" «unlimited», que signifiquen límit tou actual, límit dur actual, i sense\n" +" límit, respectivament. En cas contrari, es mostra el valor actual per\n" +" al recurs especificat. Si no especifiqueu cap opció, se suposa -f.\n" +"\n" +" Els valors s'indiquen en increments de 1024 octets, excepte en el cas de\n" +" l'opció -t, que és en segons, -p, que és en increments de 512 octets, i\n" +" -u, que és en nombre de processos.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, tret que especifiqueu una opció invàlida o es produeixi un\n" +" error." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3521,39 +4710,101 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Mostra o estableix la màscara de mode per a fitxers.\n" +"\n" +" Estableix la màscara de creació de fitxers en MODE. Si MODE s'omet,\n" +" mostra el valor actual de la màscara.\n" +"\n" +" Si MODE comença amb un dígit, s'interpreta com a número octal; en cas\n" +" contrari és una cadena de mode simbòlica com les que accepta chmod(1).\n" +"\n" +" Opcions:\n" +" -p sense MODE, mostra la sortida en un format que es pot\n" +" reciclar com a entrada\n" +" -S mostra la màscara en forma simbòlica; altrament produeix un\n" +" número octal\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si MODE no és vàlid o passeu una opció no vàlida." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Espera la finalització de feines i retorna l'estat de sortida.\n" +"\n" +" Espera que cada procés identificat per un ID, que pot ser l'ID del\n" +" procés o una especificació de feina, acabi d'executar-se, i informa de\n" +" l'estat de sortida. Si ometeu ID, espera que acabin d'executar-se tots\n" +" els processos inferiors, i surt amb estat zero. Si ID és una\n" +" especificació de feina, espera cada un dels processos a la canonada\n" +" d'aquella feina.\n" +"\n" +" Si especifiqueu l'opció -n, espera que finalitzi una única feina de la\n" +" llista d'IDs. Si no s'ha especificat cap ID, espera que finalitzi la\n" +" propera feina i en retorna l'estat de sortida.\n" +"\n" +" Si especifiqueu l'opció -p, el procés o l'identificador de la feina\n" +" s'assigna a la variable VAR. La variable inicialment serà esborrada,\n" +" abans de que es podueixi assignació. L'opció -p només és útil en\n" +" combinació amb l'opció -n.\n" +"\n" +" Si especifiqueu l'opció -f, i el control de feines està habilitat,\n" +" espera fins que les IDs especificades finalitzin, enlloc d'esperar fins\n" +" que canviïn d'estat.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ID; falla si ID no és vàlid o\n" +" passeu una opció no vàlida, o si s'ha especificat -n i l'intèrpret no té\n" +" processos inferiors que no s'estiguin esperant." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." msgstr "" +"Espera la finalització de processos i en retorna l'estat de sortida.\n" +"\n" +" Espera que cada procés, identificat per PID, acabi d'executar-se, i en\n" +" mostra l'estat de sortida. Si no especifiqueu PID, espera que acabin\n" +" d'executar-se tots els processos inferiors, i surt amb estat zero. PID\n" +" ha de ser un ID de procés.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'últim PID; falla si PID no és vàlid o es\n" +" passa una opció no vàlida." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3565,8 +4816,17 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Executa ordres per a cada element d'una llista.\n" +"\n" +" Els bucles «for» executen una seqüència d'ordres per a cada un dels\n" +" elements d'una llista. Si «in PARAULES ...;» s'omet, aleshores se\n" +" suposa «in \"$@\"». Per a cada element de la llista PARAULES, l'element\n" +" s'assigna a NOM, i les ORDRES s'executen.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3582,8 +4842,23 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Bucle «for» aritmètic.\n" +"\n" +" Equivalent a\n" +" (( EXP1 ))\n" +" while (( EXP2 )); do\n" +" ORDRES\n" +" (( EXP 3 ))\n" +" done\n" +"\n" +" EXP1, EXP2 i EXP3 són expressions aritmètiques. Si s'omet qualsevol de\n" +" les expressions, es comporta com si el resultat de l'avaluació de\n" +" l'expressió omesa fos 1.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3602,8 +4877,25 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Selecciona paraules d'una llista i executa ordres.\n" +"\n" +" Les PARAULES s'expandeixen i generen una llista de paraules. Les\n" +" paraules expandides s'envien a la sortida d'errors estàndard, cada una\n" +" precedida per un número. Si «in PARAULES» s'omet, se suposa «in \"$@\"».\n" +" Llavors, es mostra l'introductor PS3 i es llegeix una línia a l'entrada\n" +" estàndard. Si la línia correspon amb el número d'alguna de les paraules\n" +" mostrades, aleshores aquesta paraula s'assigna a NOM. Si la línia està\n" +" buida, les PARAULES i l'introductor es tornen a mostrar. Si es llegeix\n" +" EOF, l'ordre finalitza. Qualsevol altre valor llegit, fa que s'assigni\n" +" el valor nul a NOM. La línia llegida s'assigna a la variable REPLY.\n" +" Les ORDRES s'executen després de cada selecció fins a trobar una ordre\n" +" «break».\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." -#: builtins.c:1534 +# help time +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3618,9 +4910,21 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"Informa del temps transcorregut durant l'execució d'una canonada.\n" +"\n" +" Executa CANONADA i mostra un resum del temps real, el temps de CPU\n" +" d'usuari i el temps de CPU de sistema transcorregut durant l'execució de\n" +" CANONADA.\n" +"\n" +" Opcions:\n" +" -p mostra el resum de temps en format POSIX portable\n" +"\n" +" El valor de la variable TIMEFORMAT s'utilitza per formatar la sortida.\n" +"\n" +" Estat de sortida:\n" +" L'estat de sortida és l'estat de sortida de la CANONADA." -#: builtins.c:1551 -#, fuzzy +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3629,58 +4933,82 @@ msgid "" " \n" " Exit Status:\n" " Returns the status of the last command executed." -msgstr "Executa selectivament les ordres especificades en ORDRES seguint una " +msgstr "" +"Executa ordres segons la coincidència amb patrons.\n" +"\n" +" Executa ORDRES de forma selectiva en funció de si PARAULA coincideix amb\n" +" PATRÓ. El signe «|» serveix per a separar múltiples patrons.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." -#: builtins.c:1563 +#: builtins.c:1631 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" +" 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" +" `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 "" +"Executa ordres en funció d'una condició.\n" +"\n" +" Executa la llista «if ORDRES». Si l'estat de sortida és zero, llavors\n" +" també executa la llista «then ORDRES». En cas contrari cada una de les\n" +" llistes «elif ORDRES» és executada i en cas d'acabar amb estat de\n" +" sortida zero, també s'executa la corresponent llista «then ORDRES», i\n" +" l'ordre if finalitza. En cas contrari, la llista «else ORDRES»\n" +" s'executa, si és que existeix. L'estat de sortida la construcció\n" +" sencera és l'estat de sortida de l'última ordre executada, o zero si cap\n" +" de les condicions s'avalua com a certa.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre executada." -#: builtins.c:1580 -#, fuzzy +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +"Executa ordres repetidament mentre es compleixi una condició.\n" +"\n" +" Expandeix i executa ORDRES-2 repetidament mentre l'última ordre de\n" +" les ORDRES tingui estat de sortida igual a zero.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre executada." -#: builtins.c:1592 -#, fuzzy +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +"Executa ordres repetidament mentre no es compleixi una condició.\n" +"\n" +" Expandeix i executa ORDRES-2 repetidament mentre l'última ordre de\n" +" les ORDRES tingui estat de sortida diferent de zero.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de l'última ordre executada." -#: builtins.c:1604 +# help coproc +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3690,25 +5018,41 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Crea un coprocés anomenat NOM.\n" +"\n" +" Executa ORDRE de forma asincrònica, amb la sortida estàndard i l'entrada\n" +" estàndard de l'ordre connectades via canonada als descriptors de fitxer\n" +" assignats als índexs 0 i 1 de la variable vector NOM. Per defecte NOM\n" +" és \"COPROC\".\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida d'ORDRE." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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 "" +"Defineix una funció.\n" +"\n" +" Crea una funció de l'intèrpret anomenada NOM. Quan s'invoca com a ordre\n" +" simple, NOM executa ORDRES en el context de l'intèrpret de qui fa la\n" +" crida. Quan NOM s'invoca, els arguments es passen a la funció com a\n" +" $1...$n, i el nom de la funció es troba a $FUNCNAME.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si NOM és de només lectura." -#: builtins.c:1632 -#, fuzzy +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3717,9 +5061,16 @@ msgid "" " \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" +msgstr "" +"Agrupa ordres de manera que formin una unitat.\n" +"\n" +" Executa un conjunt d'ordres en un grup. Això permet redirigir la\n" +" sortida d'un grup sencer d'ordres.\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de l'última ordre executada." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3732,28 +5083,44 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" +"Reprèn una feina i la porta al primer pla.\n" +"\n" +" Equivalent a utilitzar FEINA com a argument en l'ordre «fg». Reprèn una\n" +" feina aturada o en segon pla. FEINA pot ser el nom d'una feina, o el\n" +" número d'una feina. Si es troba un «&» després de FEINA, llavors la\n" +" feina s'envia en un segon pla, com si l'especificació de feina\n" +" s'utilitzés com a argument en l'ordre «bg».\n" +"\n" +" Estat de sortida:\n" +" Torna l'estat de sortida de la feina represa." -#: builtins.c:1659 +# help '((' +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"Avalua una expressió aritmètica.\n" +"\n" +" EXPRESSIÓ s'avalua segons les normes d'avaluació aritmètica. És\n" +" equivalent a \"let EXPRESSIÓ\".\n" +"\n" +" Estat de sortida:\n" +" Si el resultat de l'avaluació és 0, torna 1; altrament torna 0." -#: builtins.c:1671 +# help '[[' +#: builtins.c:1739 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" +" 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" @@ -3771,8 +5138,31 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" +"Executa una ordre condicional.\n" +"\n" +" Torna un estat 0 o 1, depenent del resultat de l'avaluació de\n" +" l'expressió condicional EXPRESSIÓ. Les expressions es componen dels\n" +" mateixos elements que en l'ordre interna «test», i es poden combinar\n" +" usant els següents operadors.\n" +"\n" +" ( EXPRESSIÓ ) Torna el valor d'EXPRESSIÓ\n" +" ! EXPRESSIÓ Cert si EXPRESSIÓ és fals; altrament fals.\n" +" EXPR1 && EXPR2 Cert si tant EXPR1 com EXPR2 són cert; si no, fals.\n" +" EXPR1 || EXPR2 Cert si EXPR1 o EXPR2 és cert; si no, fals.\n" +"\n" +" Quan s'utilitzen els operadors «==» o «!=», el component de la dreta\n" +" s'interpreta com a un patró i es comprova si coincideix amb la cadena de\n" +" l'esquerra de l'operador. Quan s'utilitza l'operador «=~», el component\n" +" de la dreta de l'operador s'interpreta com a expressió regular i es\n" +" comprova si coincideix amb la cadena de l'esquerra de l'operador.\n" +"\n" +" Els operadors && i || no avaluen EXPR2 si EXPR1 és suficient per\n" +" determinar el valor de l'expressió.\n" +"\n" +" Estat de sortida:\n" +" 0 o 1, depenent del valor d'EXPRESSIÓ." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3825,8 +5215,67 @@ msgid "" " 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 +"Nom i ús de variables de l'intèrpret habituals.\n" +"\n" +" BASH_VERSION Informació de la versió de Bash.\n" +" CDPATH Llista de directoris separats per «:» on buscar\n" +" directoris passats com a arguments a «cd».\n" +" GLOBIGNORE Llista de patrons separats per «:» que indiquen noms\n" +" que s'ignoren en fer expansions de noms de fitxer.\n" +" HISTFILE Nom del fitxer on es desa l'historial d'ordres.\n" +" HISTFILESIZE Nombre màxim de línies que pot contenir el\n" +" fitxer de l'historial.\n" +" HISTSIZE Nombre màxim de línies de l'historial a què un\n" +" intèrpret té accés.\n" +" HOME Camí complet cap al vostre directori personal.\n" +" HOSTNAME Nom de la màquina actual.\n" +" HOSTTYPE Tipus de CPU de la màquina en què corre Bash.\n" +" IGNOREEOF Controla el comportament de l'intèrpret en trobar un\n" +" caràcter EOF (final de fitxer) com a únic caràcter.\n" +" Si la variable està definida, llavors el seu valor\n" +" és el nombre de caràcters EOF seguits que es poden\n" +" llegir en una línia buida abans que l'intèrpret\n" +" surti (per defecte: 10). Si no està definida, EOF\n" +" s'interpreta com el final de les dades d'entrada.\n" +" MACHTYPE Cadena que descriu el sistema en què corre Bash.\n" +" MAILCHECK Amb quina freqüència, en segons, Bash comprova si hi\n" +" ha correu nou.\n" +" MAILPATH Llista de fitxers separats per «:» que Bash comprova\n" +" si tenen correu nou.\n" +" OSTYPE La versió de Unix en què corre Bash.\n" +" PATH Llista de directoris separats per «:» on buscar quan\n" +" se cerquen ordres.\n" +" PROMPT_COMMAND Ordre que s'executa cada cop abans de mostrar\n" +" l'introductor de l'intèrpret.\n" +" PS1 Cadena de l'introductor principal.\n" +" PS2 Cadena de l'introductor secundari.\n" +" PWD Camí complet cap al directori corrent.\n" +" SHELLOPTS Llista d'opcions habilitades separades per «:».\n" +" TERM Nom del tipus de terminal actual.\n" +" TIMEFORMAT Format de sortida per a les estadístiques de temps\n" +" produïdes per l'ordre «time».\n" +" auto_resume No-nul·la significa que una ordre sola en una línia\n" +" es busca en primera instància a la llista actual de\n" +" feines aturades. Si es troba, aquella feina es\n" +" passa a primer pla. El valor «exact» significa que\n" +" l'ordre ha de coincidir exactament amb alguna ordre\n" +" de la llista de feines aturades. El valor\n" +" «substring» significa que l'ordre ha de coincidir\n" +" amb una subcadena de la feina. Qualsevol altre\n" +" valor significa que l'ordre ha de ser el prefix\n" +" d'una feina aturada.\n" +" histchars Caràcters que controlen l'expansió de l'historial i\n" +" les substitucions ràpides. El primer caràcter és el\n" +" caràcter de substitució de l'historial, habitualment\n" +" «!». El segon és el caràcter de «substitució\n" +" ràpida», normalment «^». El tercer és el caràcter\n" +" de «comentari d'historial», normalment «#».\n" +" HISTIGNORE Llista de patrons separats per «:» utilitzats per a\n" +" decidir si les ordres s'han de desar a l'historial.\n" + +# si modifiqueu aquesta cadena cal actualitzar la còpia que es troba més +# enrere en aquest fitxer +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3836,19 +5285,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3856,8 +5305,39 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Afegeix directoris a la pila.\n" +"\n" +" Afegeix un directori al capdamunt de la pila de directoris, o fa girar\n" +" la llista, de manera que al capdamunt de la pila hi queda el directori\n" +" de treball corrent. Sense arguments, intercanvia els dos directoris de\n" +" més amunt.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'afegeixen directoris a la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +"\n" +" +N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de l'esquerra de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" -N Gira la llista de manera tal que l'N-èssim directori\n" +" (comptant des de la dreta de la llista que mostra «dirs»,\n" +" començant des de zero) queda a dalt de tot.\n" +"\n" +" dir Afegeix DIR al capdamunt de la pila de directoris, i el\n" +" converteix en el nou directori de treball corrent.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si s'ha rebut un argument invàlid, o el canvi de\n" +" directori falla." -#: builtins.c:1788 +# si modifiqueu aquesta cadena cal actualitzar la còpia que es troba més +# enrere en aquest fitxer +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3866,16 +5346,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3883,8 +5363,36 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Treu directoris de la pila.\n" +"\n" +" Elimina entrades de la pila de directoris. Sense arguments, elimina el\n" +" directori al capdamunt de la pila, i canvia al nou directori de dalt de\n" +" la pila.\n" +"\n" +" Opcions:\n" +" -n Omet el canvi de directori quan s'eliminen directoris de la\n" +" pila, de manera que només canvia el contingut de la pila.\n" +"\n" +" Arguments:\n" +" +N Elimina l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd +0» elimina el primer directori, i «popd +1»\n" +" el segon.\n" +"\n" +" -N Elimina l'entrada N-èssima, comptant des de la dreta de la\n" +" llista que mostra «dirs», començant des de zero. Per\n" +" exemple: «popd -0» elimina l'últim directori, i «popd -1» el\n" +" penúltim.\n" +"\n" +" Podeu veure el contingut de la pila de directoris amb l'ordre «dirs».\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si es rep un argument invàlid o el canvi de\n" +" directori falla." -#: builtins.c:1818 +# si modifiqueu aquesta cadena cal actualitzar la còpia que es troba més +# enrere en aquest fitxer +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3895,32 +5403,57 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Mostra la pila de directoris.\n" +"\n" +" Mostra la llista actual de directoris recordats. Els directoris són\n" +" afegits a la llista mitjançant l'ordre «pushd»; podeu recórrer la llista\n" +" de directoris cap enrere amb l'ordre «popd».\n" +"\n" +" Opcions:\n" +" -c neteja la pila, esborrant-ne tots els elements\n" +" -l no mostra les versions abreviades (amb el prefix ~) dels\n" +" directoris relatius al vostre directori personal\n" +" -p mostra la pila, una entrada per línia\n" +" -v mostra la pila, una entrada per línia indicant la posició a\n" +" la pila\n" +"\n" +" Arguments:\n" +" +N Mostra l'entrada N-èssima, comptant des de l'esquerra de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions, \n" +" començant des de zero.\n" +"\n" +" -N Mostra l'entrada N-èssima, comptant des de la dreta de la\n" +" llista mostrada per «dirs» quan s'invoca sense opcions,\n" +" començant des de zero.\n" +"\n" +" Estat de sortida:\n" +" Retorna èxit, excepte si es rep una opció invàlida o es produeix un\n" +" error." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3933,8 +5466,25 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Activa i desactiva opcions de l'intèrpret.\n" +"\n" +" Canvia l'estat de cada OPCIÓ. Sense cap argument d'opció, mostra un\n" +" llistat amb cada OPCIÓ, o un llistat amb totes les opcions de\n" +" l'intèrpret si no s'ha especificat cap OPCIÓ, indicant si les opcions\n" +" estan activades o no.\n" +"\n" +" Opcions:\n" +" -o limita les opcions a les que es poden canviar amb «set -o»\n" +" -p mostra totes les opcions indicant-ne l'estat\n" +" -q suprimeix la sortida\n" +" -s activa OPCIÓ\n" +" -u desactiva OPCIÓ\n" +"\n" +" Estat de sortida:\n" +" Torna èxit si OPCIÓ està activada; falla si especifiqueu una opció\n" +" invàlida o OPCIÓ està desactivada." -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3942,83 +5492,148 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\n" +" Returns success unless an invalid option is given or a write or assignment\n" " error occurs." msgstr "" +"Formata i escriu ARGUMENTS d'acord amb FORMAT.\n" +"\n" +" Opcions:\n" +" -v var assigna la sortida a la variable VAR en lloc d'enviar-la a\n" +" la sortida estàndard\n" +"\n" +" FORMAT és una cadena de caràcters que conté tres tipus d'objectes:\n" +" caràcters normals, que simplement es copien a la sortida estàndard;\n" +" seqüències d'escapada, que es transformen i es copien a la sortida\n" +" estàndard; i especificacions de format, cada una de les quals provoca\n" +" que s'escrigui un argument successiu a la sortida estàndard.\n" +"\n" +" A banda de les especificacions de format estàndards descrites a\n" +" printf(1), printf també interpreta:\n" +"\n" +" %b expandeix seqüències d'escapada a l'argument corresponent\n" +" %q afegeix les cometes necessàries perquè l'argument pugui ser\n" +" utilitzat com a entrada de l'intèrpret\n" +" %Q com %q, però aplica qualsevol precisió a l'argument abans\n" +" d'afegir les cometes \n" +" %(fmt)T escriu la cadena resultant de passar FMT a strftime(3) com a\n" +" argument\n" +"\n" +" El format es reutilitza tant com sigui necessari fins a consumir tots\n" +" els arguments. Si hi ha menys arguments dels que el format requereix,\n" +" la resta d'especificacions de format funcionen com si s'hagués\n" +" especificat un valor de zero o una cadena nul·la, segons el cas.\n" +"\n" +" Estat de sortida:\n" +" Retorna èxit, excepte si es rep una opció invàlida o es produeix un\n" +" error d'assignació o d'escriptura." -#: builtins.c:1895 +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Especifica com Readline ha de completar arguments.\n" +"\n" +" Per a cada NOM, especifica com s'han de completar els arguments. Si no\n" +" s'indica cap opció, les especificacions de compleció existents es\n" +" mostren en un format que permet reutilitzar-les com a entrada.\n" +"\n" +" Opcions:\n" +" -p mostra les especificacions existents en format reciclable\n" +" -r suprimeix l'especificació de compleció per a NOM, o, si no\n" +" s'indica cap NOM, totes les especificacions de compleció\n" +" -D assigna les accions i complecions a totes les ordres que no\n" +" tenen definida una compleció específica\n" +" -E assigna les accions i complecions a ordres \"en blanc\", o\n" +" sigui, als intents de completar una línia en blanc\n" +" -I assigna les accions i complecions a la paraula inicial\n" +" (normalment una ordre)\n" +"\n" +" Quan s'intenta una compleció, s'apliquen primer les accions\n" +" especificades amb l'opció -D, seguides de les acciones especificades amb\n" +" l'opció -E, i l'opció -I (en aquest ordre). Si es proporcionen\n" +" múltiples opcions, l'opció -D té preferència sobre l'opció -E, i ambdues\n" +" opcions tenen preferència sobre l'opció -I.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." -#: builtins.c:1923 +#: builtins.c:2004 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" +" 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 "" +"Mostra possibles complecions en funció de les opcions.\n" +"\n" +" Aquesta ordre està pensada per a ser utilitzada en una funció que generi\n" +" possibles complecions. Si especifiqueu l'argument opcional PARAULA, es\n" +" limiten les complecions a aquelles que coincideixen amb PARAULA.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció invàlida o es produeix un error." -#: builtins.c:1938 +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4034,2454 +5649,136 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Modifica o mostra opcions de compleció.\n" +"\n" +" Modifica les opcions de compleció de NOM, o, si no especifiqueu cap NOM,\n" +" la compleció que s'està executant en el moment. Si no s'indica cap\n" +" OPCIÓ, mostra les opcions de compleció per a cada NOM o\n" +" l'especificació de compleció en ús.\n" +"\n" +" Opcions:\n" +" -o opció Activa OPCIÓ per a NOM\n" +" -D Canvia les opcions de compleció d'ordres per defecte\n" +" -E Canvia les opcions de compleció d'ordres «buides»\n" +" -I Canvia les opcions de compleció de la paraula inicial\n" +"\n" +" Si utilitzeu «+o» en lloc de «-o», desactiva l'opció especificada.\n" +"\n" +" Arguments:\n" +"\n" +" Cada NOM és el nom d'una ordre per la qual s'ha d'haver definit una\n" +" especificació de compleció amb l'ordre interna «complete». Si no\n" +" especifiqueu cap NOM, compopt s'ha de cridar des d'una funció generadora\n" +" de complecions, i les opcions que es modifiquen afecten la generació de\n" +" complecions que s'està executant en aquell moment.\n" +"\n" +" Estat de sortida: \n" +" Torna èxit, excepte si passeu alguna opció no vàlida o NOM no té\n" +" definida cap especificació de compleció." -#: builtins.c:1968 +# help readarray +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" +"Llegeix línies d'un fitxer cap a una variable vector.\n" +"\n" +" Llegeix línies de l'entrada estàndard cap a la variable VECTOR, o del\n" +" descriptor de fitxer FD si especifiqueu l'opció -u. La variable vector\n" +" per defecte és MAPFILE.\n" +"\n" +" Opcions:\n" +" -d delim Usa DELIM com delimitador de línies, en lloc del caràcter de\n" +" salt de línia\n" +" -n nombre Copia com a màxim NOMBRE línies. Si NOMBRE és 0, es copien\n" +" totes les línies.\n" +" -O origen Comença l'assignació a l'índex ORIGEN, per defecte 0.\n" +" -s nombre Descarta les primeres NOMBRE línies.\n" +" -t Estripa el caràcter de salt de línia de cada línia llegida.\n" +" -u fd Llegeix el descriptor de fitxer FD, en lloc de l'entrada\n" +" estàndard.\n" +" -C callback Avalua CALLBACK cada QUÀNTUM línies llegides.\n" +" -c quàntum Nombre de línies llegides abans de cridar CALLBACK\n" +"\n" +" Arguments:\n" +" VECTOR Nom de la variable vector per a les dades.\n" +"\n" +" Si especifiqueu l'opció -C sense -c, el quàntum per defecte és 5000.\n" +" Quan s'avalua la funció CALLBACK, se li passa l'índex del proper element\n" +" del vector i la línia que s'assigna a aquest element, com a arguments\n" +" addicionals.\n" +"\n" +" Si no especifiqueu un origen explícit, se suprimeix qualsevol valor\n" +" assignat a VECTOR abans d'assignar cap valor.\n" +"\n" +" Estat de sortida:\n" +" Torna èxit, excepte si passeu una opció no vàlida o VECTOR és de només\n" +" lectura o no és una variable vector." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +"Llegeix línies d'un fitxer cap a una variable vector.\n" +"\n" +" Un sinònim de «mapfile»." -#~ 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." +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: clau de vector associatiu no vàlida" -#, fuzzy -#~ msgid " zero) is at the top." -#~ msgstr "\tla dreta) ?s el primer." +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: procés %5ld (%s) a the_pipeline" -#, 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 " +#~ msgid "Unknown Signal #" +#~ msgstr "Senyal Desconegut #" -#, 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." +#~ msgid "Copyright (C) 2016 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2016 Free Software Foundation, Inc." #, 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 " -#~ 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 , 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 "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2013 Free Software Foundation, Inc." -#~ msgid "option restricts the OPTNAMEs to those defined for use with" -#~ msgstr "L'opci? \"o\" restringeix els OPTNAMEs d'aquells definits per a" +#~ msgid ":" +#~ msgstr ":" -#~ 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 "true" +#~ msgstr "true" -#~ 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 "false" +#~ msgstr "false" -#~ msgid "not each is set." -#~ msgstr "indicaci? si ja ho ?s o no." +#~ msgid "times" +#~ msgstr "times" diff --git a/po/cs.gmo b/po/cs.gmo index 5d92d8f..39e0b6c 100644 Binary files a/po/cs.gmo and b/po/cs.gmo differ diff --git a/po/cs.po b/po/cs.po index 579ba71..d2df43b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -1,304 +1,348 @@ # 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 , 2008, 2009. +# Petr Pisar , 2008, 2009, 2010, 2011, 2012, 2013, 2014. +# Petr Pisar , 2015, 2016, 2018, 2019, 2020, 2022. # +# alias → alias # subscript → podskript # subroutine → podprogram -# completition options → možnosti doplňování +# completion 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). +# Názvy signálů a stavů procesu by měly souhlasit se signal(7). msgid "" msgstr "" -"Project-Id-Version: bash 4.0\n" +"Project-Id-Version: bash 5.2-rc1\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" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-21 20:10+02:00\n" "Last-Translator: Petr Pisar \n" "Language-Team: Czech \n" +"Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "chybný podskript pole" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: číslované pole nezle převést na pole asociativní" +msgid "%s: removing nameref attribute" +msgstr "%s: odstraňuje se atribut odkazu na název" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: neplatný klíč asociativního pole" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: číslované pole nezle převést na pole asociativní" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: přes nečíselný indexu nelze dosadit" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: nelze vytvořit: %s" -#: bashline.c:3457 +#: bashline.c:4479 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 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: první nebílý znak není „\"“" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "ne zavírající „%c“ v %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: chybí dvojtečkový oddělovač" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: v mapě kláves příkazů nelze zrušit vazbu" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "závorková expanze: nelze alokovat paměť pro %s" + +# TODO: pluralize +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "závorková expanze: alokace paměti pro %u prvků selhala" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "závorková expanze: alokace paměti pro „%s“ selhala" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "„%s“: chybný název klávesové mapy" +msgstr "„%s“: chybný název aliasu" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "upravování řádku není povoleno" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "„%s“: chybný název klávesové mapy" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "„%s“: neznámé jméno funkce" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, 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 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s lze vyvolat přes " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nelze zrušit vazbu" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "počet smyček" -#: builtins/break.def:137 +#: builtins/break.def:139 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 +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Vrátí kontext volání 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 dodatečnou 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." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "není nestavena HOME" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "příliš mnoho argumentů" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "adresář s prázdným názvem" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "není nastaveno OLDPWD" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "řádek %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "varování: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: přepínač vyžaduje argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: vyžadován číselný argument" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: nenalezeno" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: chybný přepínač" -#: builtins/common.c:221 +#: builtins/common.c:223 #, 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 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "„%s“: není platným identifikátorem" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "neplatné osmičkové číslo" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "chybné šestnáctkové číslo" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "chybné číslo" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: chybné určení signálu" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: proměnná pouze pro čtení" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: nelze přiřadit" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s mimo rozsah" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s mimo rozsah" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: žádná taková úloha" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: žádné řízení úloh" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "žádné řízení úloh" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: omezeno" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "omezeno" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: není vestavěným příkazem shellu" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "chyba zápisu: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "chyba při nastavování vlastností terminálu: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "chyba při získávání vlastností terminálu: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: nejednoznačné určení úlohy" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "k této verzi není dostupná nápověda" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nelze zrušit: %s jen pro čtení" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nelze zrušit" + +#: builtins/complete.def:287 #, 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 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: žádné doplňování neurčeno" @@ -311,123 +355,158 @@ msgstr "varování: přepínač -F možná nebude dělat, co jste čekali" 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "doplňovací funkce se právě nevykonává" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "může být použito jen ve funkci" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "„-f“ nezle použít na výrobu funkce" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: funkce jen pro čtení" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: proměnná s odkazem nemůže být polem" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: proměnná s odkazem na název nemůže odkazovat sama na sebe" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: kruhový odkaz na název" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: neplatný název proměnné pro odkaz na název" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "%s: takto nelze likvidovat pole" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: přiřazení do složeného pole uzavřeného v uvozovkách je zastaralé" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynamické nahrávání není dostupné" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "sdílený objekt %s nelze otevřít: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: vestavěné příkazy již dynamicky zavedeny" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "zaváděcí funkce pro %s vrací chybu (%d): nezavedeno" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: není dynamicky nahráno" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: je adresářem" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: není obyčejný soubor" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: binární soubor nelze spustit" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, 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 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "odhlášení\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "toto není login shell: použijte „exit“" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "Jsou zde pozastavení úlohy.\n" +msgstr "Jsou zde pozastavené úlohy.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Jsou zde běžící úlohy.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "žádný příkaz nenalezen" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "určení historie" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "současný" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "úloha %d spuštěna bez správy úloh" @@ -442,42 +521,46 @@ msgstr "%s: chybný přepínač – %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: přepínač vyžaduje argument – %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hashování zakázáno" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: tabulka hashů je prázdná\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "zásahů\tpříkaz\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" -"žádné téma nápovědy se nehodí pro „%s“. Zkuste „help help“ nebo „man -k %s“ " -"nebo „info %s“." +"“\n" +"\n" #: builtins/help.def:185 #, 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:223 +#, c-format msgid "%s: cannot open: %s" msgstr "%s: nelze otevřít: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -497,15 +580,21 @@ msgstr "" "Hvězdička (*) vedle jména znamená, že příkaz je zakázán.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "nelze použít více jak jeden z -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "místo v historii" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: neplatný časový údaj" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: expanze historie selhala" @@ -519,93 +608,113 @@ msgstr "%s: inlib selhala" msgid "no other options allowed with `-x'" msgstr "s „-x“ nejsou dovoleny další přepínače" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, 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 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Neznámá chyba" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "očekáván výraz" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: není (proměnnou typu) pole" +msgstr "%s: není (proměnnou typu) indexované pole" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: chybné určení deskriptoru souboru" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: neplatný deskriptor souboru: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: chybný počet řádků" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: chybný počátek pole" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: neplatné množství mezi voláními" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "prázdný název proměnné typu pole" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "je vyžadována podpora proměnných typu pole" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "„%s“: postrádám formátovací znak" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: chybné určení časového limitu" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "„%c“: neplatný formátovací znak" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "varování: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "potíže s rozebráním formátovacího řetězce: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "u \\x chybí šestnáctková číslovka" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "u \\%c chybí unikódová číslovka" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "žádný další adresář" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: chybný argument" + +#: builtins/pushd.def:480 msgid "" msgstr "<žádný aktuální adresář>" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "prázdný zásobník adresářů" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "pořadí v zásobníku adresářů" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -620,12 +729,10 @@ msgid "" " \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" +" +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" +" -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" @@ -647,7 +754,7 @@ msgstr "" " -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 +#: builtins/pushd.def:723 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" @@ -692,7 +799,7 @@ msgstr "" " \n" " Zásobník adresářů si můžete prohlédnout příkazem „dirs“." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -724,60 +831,54 @@ msgstr "" " \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" +" -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 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: chybné určení časového limitu" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "chyba čtení: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: není (proměnnou typu) pole" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: není funkcí" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nelze exportovat" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "počet shiftů" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "přepínač shellu nelze zároveň nastavit a zrušit" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: chybný název přepínače shellu" @@ -786,399 +887,476 @@ msgstr "%s: chybný název přepínače shellu" msgid "filename argument required" msgstr "vyžadován argument s názvem souboru" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: soubor nenalezen" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "nelze pozastavit" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "login shell nelze pozastavit" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s je alias na „%s“\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s je klíčové slovo shellu\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s je funkce\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je zvláštní součást shellu\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s je součást shellu\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s je %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s je zahashován (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: chybný argument s limitou" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "„%c“: chybný příkaz" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: limit nelze zjistit: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "limit" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: limit nelze změnit: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "osmičkové číslo" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "„%c“: chybný operátor symbolických práv" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " řádek " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "poslední příkaz: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Ukončuji…" -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMACE: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "LADICÍ upozornění: " + +#: error.c:488 msgid "unknown command error" msgstr "chyba neznámého příkazu" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "chybný druh příkazu" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "chybný konektor" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "chybný skok" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\ačasový limit pro čekání na vstup vypršel: automatické odhlášení\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: „%c“: chybný formátovací znak" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: koproces [%d:%s] stále existuje" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "chyba v rouře" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximální úroveň zanoření funkce eval byla překročena (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximální úroveň zanoření funkce source byla překročena (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximální úroveň zanoření funkcí byla překročena (%d)" + +#: execute_cmd.c:5598 #, 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 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: příkaz nenalezen" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: nelze spustit: požadovaný soubor neexistuje" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: chybný interpretr" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: binární soubor nelze spustit: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“: je zvláštní vestavěný příkaz shellu" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "deskriptor souboru %d nelze duplikovat na deskriptor %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "úroveň rekurze výrazu byla překročena" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "zásobník rekurze podtekl" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "syntaktická chyba ve výrazu" -#: expr.c:419 +#: expr.c:522 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 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "syntaktická chyba v přiřazení do proměnné" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "dělení nulou" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "chyba: chybný expassing token" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "v podmíněném výrazu očekávána „:“" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "mocnitel menší než 0" -#: expr.c:826 +#: expr.c:1030 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 +#: expr.c:1057 msgid "missing `)'" msgstr "postrádám „)“" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "syntaktická chyba: očekáván operand" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "syntaktická chyba: chybný aritmetický operátor" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (chybný token je „%s“)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "chybný aritmetický základ" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "chybná celočíselná konstanta" + +#: expr.c:1603 msgid "value too great for base" msgstr "hodnot je pro základ příliš velká" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: chyba výrazu\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: rodičovské adresáře nejsou přístupné" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "na deskriptoru %d nelze resetovat režim nodelay" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp roury" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: SMYČKA: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: SMYČKA: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, 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 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: žádný takový PID" -#: jobs.c:1416 +#: jobs.c:1854 #, 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 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Dokončena" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Pozastavena" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Pozastavena (%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Běží" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Dokončena (%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Ukončena %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Stav neznámý" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(core dumped [obraz paměti uložen]) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (cwd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "setpgid na potomku (z %ld na %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" msgstr "wait: PID %ld není potomkem tohoto shellu" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: Žádný záznam o procesu %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: úloha %d je pozastavena" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: žádné současné úlohy" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: úloha skončila" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: úloha %d je již na pozadí" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: zapíná se WNOHANG, aby se zabránilo neurčitému zablokování" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: řádek %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (core dumped [obraz paměti uložen])" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(cwd nyní: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp selhalo" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: správa úloh nefunguje na pozadí" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: disciplína linky" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "nelze nastavit skupinu procesů terminálu (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "žádná správa úloh v tomto shellu" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: předpoklad nesplněn: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1187,58 +1365,66 @@ msgstr "" "\r\n" "malloc: %s:%d: zbabraný předpoklad\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "není známo" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: blok v seznamu uvolněných zbit" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: zavoláno s argumentem již uvolněného bloku" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: zavoláno s argumentem nenaalokovaného bloku" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 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 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: zjištěno podtečení, magic8 poškozeno" + +#: lib/malloc/malloc.c:1014 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 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: zavoláno s argumentem nenaalokovaného bloku" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 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 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: zjištěno podtečení, magic8 poškozeno" + +#: lib/malloc/malloc.c:1205 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 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "chybný základ" @@ -1257,264 +1443,302 @@ msgstr "%s: chybná služba" msgid "%s: bad network path specification" msgstr "%s: chybné určení síťové cesty" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "síťové operace nejsou podporovány" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: národní prostředí nelze změnit (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: národní prostředí nelze změnit (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: nelze alokovat %'lu bajtů" +msgstr "setlocale: %s: národní prostředí nelze změnit (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: nelze alokovat %'lu bajtů" +msgstr "setlocale: %s: národní prostředí nelze změnit (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "V $_ máte poštu" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "V $_ máte novou poštu" -#: mailcheck.c:474 +#: mailcheck.c:480 #, 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 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "chyba syntaxe: vyžadován aritmetický výraz" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "chyba syntaxe: neočekávaný „;“" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "chyba syntaxe: „((%s))“" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: chybný druh instrukce %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) přesahuje SIZE_MAX (%lu): řádek zkrácen" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "maximální počet here dokumentů překročen" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, 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 +#: parse.y:4452 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 +#: parse.y:4457 #, 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 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "chyba syntaxe ve výrazu podmínky" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "neočekávaný token „%s“, očekávána „)“" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "očekávána „)“" -#: parse.y:4070 +#: parse.y:4571 #, 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 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "neočekávaný argument u podmínkového unárního operátoru" -#: parse.y:4120 +#: parse.y:4621 #, 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 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "očekáván podmínkový binární operátor" -#: parse.y:4146 +#: parse.y:4647 #, 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 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "neočekávaný argument u podmínkového binárního operátoru" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "neočekávaný token „%c“ v podmínkovém příkazu" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "neočekávaný token „%s“ v podmínkovém příkazu" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "neočekávaný token %d v podmínkovém příkazu" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "chyba syntaxe poblíž neočekávaného tokenu „%s“" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "chyba syntaxe poblíž „%s“" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "chyba syntaxe: nenadálý konec souboru" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "chyba syntaxe" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Shell lze ukončit příkazem „%s“.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "nenadálý konec souboru při hledání odpovídající „)“" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "doplňování: funkce „%s“ nenalezena" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: možná smyčka opakování" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULLOVÝ COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: chybná propojka „%d“" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: neplatný deskriptor souboru: %s" +msgstr "xtrace_set: %d: neplatný deskriptor souboru" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: nullový ukazatel na soubor" -#: print_cmd.c:372 +# fd, fp a fileno jsou identifikátory v kódu +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace: fd (%d) != fileno fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: „%c“: chybný formátovací znak" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "deskriptor souboru mimo rozsah" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: nejednoznačné přesměrování" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: existující soubor nelze přepsat" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: omezeno: výstup nelze přesměrovat" -#: redir.c:180 +#: redir.c:219 #, 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 +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: seznam nelze přiřadit do prvku pole" +msgstr "%s: deskriptor souboru nelze přiřadit do proměnné" -#: redir.c:544 +#: redir.c:650 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 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "chyba přesměrování: deskriptor souboru nelze duplikovat" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "nelze nalézt /tmp, vytvořte jej, prosím!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp musí být platným názvem pro adresář" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "v interaktivních shellech se režim krásného výpisu nepoužije" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: chybný přepínač" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "UID nelze nastavit na %d: efektivní UID je %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "GID nelze nastavit na %d: efektivní GID je %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "debuger nelze spustit, ladicí režim zakázán" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Je adresářem" + +#: shell.c:1907 msgid "I have no name!" msgstr "Nemám žádné jméno!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, verze %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1523,43 +1747,51 @@ 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 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "Dlouhé GNU přepínače:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD nebo -c příkaz nebo -O shopt_přepínač\t(pouze při vyvolání)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s nebo -o přepínač\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Podrobnosti o přepínačích shellu získáte tím, že napíšete „%s -c \"help set\"“.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "Chyby nahlásíte příkazem „bashbug“.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Domovská stránka bashe: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Obecný návod na použití softwaru GNU: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: neplatná operace" @@ -1728,622 +1960,589 @@ msgstr "HFT zvuková posloupnost byla dokončena" msgid "Information request" msgstr "Požadavek o informaci" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Neznámé číslo signálu" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Neznámý signál č. %d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "chybná substituce: v %2$s chybí uzavírací „%1$s“" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "nelze vyrobit rouru za účelem substituce procesu" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "nelze vytvořit potomka za účelem substituce procesu" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "pojmenovanou rouru %s nelze otevřít pro čtení" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "pojmenovanou rouru %s nelze otevřít pro zápis" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "pojmenovanou rouru %s nelze zdvojit jako deskriptor %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "substituce příkazu: nulový bajt ve vstupu ignorován" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "nelze vytvořit rouru pro substituci příkazu" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "nelze vytvořit potomka pro substituci příkazu" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute: rouru nelze zdvojit jako deskriptor 1" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: neplatný název proměnné pro odkaz na název" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: chybná nepřímá expanze" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: chybný název proměnné" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametr nenastaven" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parametr null nebo nenastaven" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: výraz podřetězce < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: chybná substituce" -#: subst.c:7045 +#: subst.c:9678 #, 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:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "budoucá verze tohoto shellu budou vynucovat vyhodnocení jako aritmetickou substituci" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "chybná substituce: v %s chybí uzavírací „`“" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "žádná shoda: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "očekáván argument" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: očekáván celočíselný výraz" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "očekávána „)“" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: očekáván binární operátor" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: očekáván unární operátor" + +#: test.c:896 msgid "missing `]'" msgstr "postrádám „]“" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "chyba syntaxe: neočekávaný řetězec „%s“" + +#: trap.c:220 msgid "invalid signal number" msgstr "neplatné číslo signálu" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "obsluha signálů: maximální úroveň zanoření obsluhy signálů byla překročena (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, c-format -msgid "" -"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: chybný signál %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "chyba při importu definice „%s“" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "úroveň shellu (%d) příliš vysoká, resetuji na 1" -#: variables.c:1915 +#: variables.c:2642 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 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: hodnotu nelze do proměnné přiřadit" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: z nekompatibilního typu nelze hodnotu zdědit" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: přiřazení čísla odkazu na název" + +#: variables.c:4390 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 +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: parametr null nebo nenastaven" +msgstr "%s: má nullový exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "neplatný znak %d v exportstr pro %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "v exportstr pro %s chybí „=“" -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: chybí kontext global_variables" -#: variables.c:3922 +#: variables.c:5410 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 +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: nelze otevřít: %s" +msgstr "%s: %s: nelze otevřít jako SOUBOR" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: neplatný deskriptor souboru: %s" +msgstr "%s: %s: neplatná hodnota pro deskriptor trasovacího souboru" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright © 2009 Free Software Foundation, Inc." +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: hodnota kompatibility je mimo rozsah" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" -"Licence GPLv3+: GNU GPL verze 3 nebo novější \n" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright © 2022 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Licence GPLv3+: GNU GPL verze 3 nebo novější \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Toto je svobodné programové vybavení: máte právo jej měnit a šířit." -#: 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 \n" -msgstr "" -"Licence GPLv3+: GNU GPL verze 3 nebo novější \n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "VEŠKERÉ ZÁRUKY chybí, jak jen zákon dovoluje." -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc: nelze alokovat %'lu bajtů (%'lu bajtů alokováno)" +msgstr "%s: nelze alokovat %'lu bajtů (alokováno %'lu bajtů)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: nezle alokovat %'lu bajtů" +msgstr "%s: nezle alokovat %'lu bajtů" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: nelze alokovat %'lu bajtů (alokováno %'lu bajtů)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: nelze alokovat %'lu bajtů" +msgstr "%s: %s:%d: nelze alokovat %'lu bajtů" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [název[=hodnota] …]" -#: builtins.c:47 +#: builtins.c:49 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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-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 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [vestavěný-příkaz-shellu [argument…]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [adresář]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "true" - -#: builtins.c:72 -msgid "false" -msgstr "false" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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]…" +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [název[=hodnota]…] nebo declare [-p] [-aAfFilnrtux] [název…]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] název[=hodnota]… nebo typeset -p [-aAfFilnrtux] [název…]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [přepínač] název[=hodnota]…" -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [argument…]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [argument…]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f soubor] [název…]" -#: builtins.c:92 +#: builtins.c:94 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í…]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts řetězec_přepínačů název [argument…]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a název] [příkaz [argument…]] [přesměrování…]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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]" +msgstr "fc [-e enázev] [-lnr] [první] [poslední] nebo fc -s [vzor=náhrada] [příkaz]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [úloha]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [úloha…]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p název_cesty] [-dt] [název…]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [vzorek…]" +msgstr "help [-dms] [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:123 +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 +#: builtins.c:127 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [úloha… | PID…]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "let argument [argument…]" +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: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…]" +msgid "let arg [arg ...]" +msgstr "let argument [argument…]" #: builtins.c:138 -msgid "return [n]" -msgstr "return [n]" +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ů] [-N p_znaků] [-p výzva] [-t limit] [-u fd] [jméno…]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "set [--abefhkmnptuvxBCHP] [-o název_přepínače] [argument…]" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "unset [-f] [-v] [jméno…]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o název_přepínače] [--] [-] [argument…]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [název[=hodnota] …] nebo export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [jméno…]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [název[=hodnota] …] nebo readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [název[=hodnota]…] nebo export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [název[=hodnota]…] nebo readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source název_souboru [argumenty]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". název_souboru [argumenty]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [výraz]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ argument… ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[argument] signal_spec…]" -#: builtins.c:166 +#: builtins.c:168 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:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [mód]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p proměnná] [id…]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid…]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NÁZEV [in SLOVECH…] ; do PŘÍKAZY; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( výr1; výr2; výr3 )); do PŘÍKAZY; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NÁZEV [in SLOVA…;] do PŘÍKAZY; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] kolona" -#: builtins.c:190 +#: builtins.c:192 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" +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:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until PŘÍKAZY; do PŘÍKAZY; done" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while PŘÍKAZY; do PŘÍKAZY-2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "command [NÁZEV] příkaz [přesměrování]" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until PŘÍKAZY; do PŘÍKAZY-2; done" #: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NÁZEV] příkaz [přesměrování]" + +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function jméno { PŘÍKAZY ; } nebo jméno () { PŘÍKAZY ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ PŘÍKAZY ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "úloha [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( výraz ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ výraz ]]" # XXX: "variable" je literál na seznamy vestavěných příkazů -#: builtins.c:210 +#: builtins.c:212 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 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | adresář]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [název_volby…]" -#: builtins.c:226 +#: builtins.c:228 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-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:235 +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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o možnost] [-DEI] [název…]" #: 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]" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d oddělovač] [-n počet] [-O počátek] [-s počet] [-t] [-u FD] [-C volání] [-c množství] [pole]" -#: builtins.c:254 +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d oddělovač] [-n počet] [-O počátek] [-s počet] [-t] [-u FD] [-C volání] [-c množství] [pole]" + +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2355,47 +2554,44 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" 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" +" „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" +" 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" +" -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 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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." +" -a\todstraní všechny definice aliasů\n" +" Vrátí úspěch, pokud NÁZEV není neexistující alias." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2407,28 +2603,26 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." @@ -2443,39 +2637,35 @@ msgstr "" " 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" +" 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" +" -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á vyvolávají makra, a jejich hodnoty ve formátu,\n" +" který lze použít jako vstup.\n" +" -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" +" -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" +" -X Vypíše posloupnosti kláves a příkazy přidružené přes\n" +" přepínač -x ve formátu, který lze použít jako vstup.\n" " \n" " Návratový kód:\n" -" bind vrací 0, pokud není zadán nerozpoznaný přepínač nebo nedojde " -"k chybě." +" bind vrací 0, pokud není zadán nerozpoznaný přepínač nebo nedojde k chybě." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2493,7 +2683,7 @@ msgstr "" " Návratový kód:\n" " Návratový kód je 0, pokud N je větší nebo rovno 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2510,23 +2700,21 @@ msgstr "" " Návratový kód:\n" " Návratový kód je 0, pokud N je větší nebo rovno 1." -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" 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" +" 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" @@ -2535,7 +2723,7 @@ msgstr "" " 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 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2562,72 +2750,82 @@ msgstr "" " Návratový kód:\n" " Vrací 0, pokud shell provádí shellovou funkci a VÝRAZ je platný." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; 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" +" 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" +" 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" +" 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" +" -L vynutí následování symbolických odkazů: vyhodnotí symbolické\n" +" odkazy v ADR po zpracování všech výskytů „..“\n" +" -P nařizuje použít fyzickou adresářovou strukturu namísto\n" +" následování symbolických odkazů: vyhodnotí symbolické odkazy v ADR\n" +" před zpracováním všech výskytů „..“\n" +" -e je-li zadán přepínač -P a současný pracovní adresář nelze\n" +" zdárně zjistit, skončí s nenulovým návratovým kódem\n" +" -@ na systémech, které to podporují, vydává soubor s rozšířenými\n" +" atributy jako adresář obsahující atributy souboru\n" " \n" " Symbolické odkazy se implicitně následují, jako by bylo zadáno „-L“.\n" +" „..“ se zpracovávají tak, že se odstraní bezprostředně předcházející\n" +" část cesty až k lomítku nebo začátku ADR.\n" " \n" " Návratový kód:\n" -" Vrací 0, byl-li adresář změněn, jinak nenulovou hodnotu." +" Vrací 0, byl-li adresář změněn a, byl-li zadán -P, $PWD byla úspěšně\n" +" nastavena. Jinak vrací nenulovou hodnotu." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2639,9 +2837,9 @@ 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" +" -L vypíše hodnotu $PWD, pokud pojmenovává současný pracovní\n" +" adresář\n" +" -P vypíše fyzický adresář prostý všech symbolických odkazů\n" " \n" " Implicitně se „pwd“ chová, jako by bylo zadáno „-L“.\n" " \n" @@ -2649,7 +2847,7 @@ msgstr "" " 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 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2665,7 +2863,7 @@ msgstr "" " Návratový kód:\n" " Vždy uspěje." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2677,7 +2875,7 @@ msgstr "" " Návratový kód:\n" " Vždy uspěje." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2689,42 +2887,39 @@ msgstr "" " Návratový kód:\n" " Vždy selže." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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" +" 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" +" -p pro PATH bude použita implicitní hodnota, která zaručuje,\n" +" že budou nalezeny všechny standardní nástroje\n" +" -v zobrazí popis PŘÍKAZU podobný vestavěnému příkazu „type“\n" +" -V zobrazí 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 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2734,17 +2929,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2752,12 +2952,12 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" "Nastaví hodnoty a atributy proměnných.\n" " \n" @@ -2765,44 +2965,49 @@ msgstr "" " 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" +" -f omezí akci nebo výpis na názvy funkcí a deklarace\n" +" -F omezí výpis jen na názvy funkcí (a číslo řádku a název\n" +" zdrojového souboru, je-li zapnuto ladění)\n" +" -g vytváří globální proměnné, je-li voláno z funkce shellu,\n" +" jinak ignorováno\n" +" -I vytváří-li se lokální proměnná, zdědí atributy a hodnotu\n" +" od proměnné stejného jména v předchozím rozsahu platnosti\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" +" -a učiní NÁZVY číslovanými poli (je-li podporováno)\n" +" -A učiní NÁZVY asociativními poli (je-li podporováno)\n" +" -i přiřadí NÁZVŮM atribut „integer“ (celé číslo)\n" +" -l převede hodnotu každého NÁZVU na malá písmena v době přiřazení\n" +" -n učiní NÁZEV odkazem na proměnnou pojmenovanou podle své hodnoty\n" +" -r učiní NÁZVY jen pro čtení\n" +" -t přiřadí NÁZVŮM atribut „trace“ (sledování)\n" +" -u převede hodnotu každého NÁZVU na velká písmena v době přiřazení\n" +" -x vyexportuje 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" +" Je-li použito uvnitř funkce, učiní „declare“ NÁZVY lokálními stejně jako\n" +" příkaz „local“. Přepínač „-g“ toto chování potlačí.\n" " \n" " Návratový kód:\n" -" Vrací úspěch, pokud nebyl zadán neplatný přepínač a nedošlo k chybě." +" Vrací úspěch, pokud nebyl zadán neplatný přepínač a nedošlo k chybě při\n" +" přiřazování do proměnné." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -"Nastaví hodnoty a atributy proměnných\n" +"Nastaví hodnoty a atributy proměnných.\n" " \n" -" Příkaz je zastaralý. Vizte „help declare“." +" Synonymum pro „declare“. Vizte „help declare“." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2813,28 +3018,27 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, 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" +" Vytvoří lokální proměnnou pojmenovanou NÁZEV a přiřadí jí HODNOTU. PŘEPÍNAČ\n" +" smí 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" +" 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." +" Vrací úspěch, nebyl-li zadán neplatný přepínač, nenastala-li chyba při\n" +" přiřazování do proměnné a vykonává-li shell funkci." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2846,6 +3050,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2853,45 +3058,52 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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" +" Zobrazí své ARGUMENTY oddělené jednou mezerou a zakončené novým řádkem\n" +" na standardní výstup.\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 nepřipojuje nový řádek\n" +" -e zapne interpretování následujících znaků uvozených zpětným lomítkem\n" +" -E explicitně 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" +" \\a poplach (zvonek)\n" +" \\b backspace\n" +" \\c potlačí další výstup\n" +" \\e znak escapu\n" +" \\E znak escapu\n" +" \\f posun formuláře (form feed)\n" +" \\n nový řádek\n" +" \\r návrat vozíku\n" +" \\t vodorovný tabulátor\n" +" \\v svislý tabulátor\n" +" \\\\ zpětné lomítko\n" +" \\0nnn znak, jehož ASCII kód je NNN (osmičkově). NNN smí být\n" +" 0 až 3 osmičkové číslice\n" +" \\xHH osmibitový znak, jehož hodnota je HH (šestnáctkově). HH smí\n" +" být jedna nebo dvě šestnáctkové číslice\n" +" \\uHHHH unikódový znak, jehož šestnáctková hodnota je HHHH.\n" +" HHHH smí být jedna až čtyři šestnáctkové číslice\n" +" \\UHHHHHHHH unikódový znak, jehož šestnáctková hodnota je HHHHHHHH.\n" +" HHHHHHHH smí být jedna až osm šestnáctkových číslic.\n" " \n" " Návratový kód:\n" " Vrací úspěch, nedojde-li k chybě zápisu na výstup." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2912,7 +3124,7 @@ msgstr "" " \n" " Vrací úspěch, nedojte-li k chybě zápisu na výstup." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2945,8 +3157,7 @@ msgstr "" " 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" +" -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" @@ -2966,12 +3177,11 @@ msgstr "" " Vrací úspěch, je-li NÁZEV vestavěným příkazem shellu a nevyskytne-li\n" " se chyba." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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" @@ -2984,7 +3194,7 @@ msgstr "" " 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 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -3017,8 +3227,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3029,9 +3239,9 @@ msgstr "" " 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" +" ŘETĚZEC_PŘEPÍNAČŮ obsahuje písmena přepínačů, které mají být rozeznány.\n" +" Je-li písmeno následováno dvojtečkou, po přepínači se očekává argument,\n" +" který 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" @@ -3040,67 +3250,56 @@ msgstr "" " 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" +" getopts hlásí chyby jedním ze dvou způsobů. Pokud prvním znakem\n" +" ŘETĚZCE_PŘEPÍNAČŮ je dvojtečka, getopts hlásí chyby tichým způsobem.\n" +" V tomto režimu žádné chybové zprávy nejsou vypisovány. Když se narazí na\n" +" neplatný přepínač, getopts umístí tento znak do OPTARG. Pokud není nalezen\n" +" povinný argument, getopts umístí „:“ do NAME a OPTARG nastaví na znak\n" +" nalezeného přepínače. Pokud getopts nepracuje v tomto tichém režimu a je\n" +" nalezen neplatný přepínač, getopts umístí „?“ do NAME a zruší OPTARG. Když\n" +" nenajde povinný argument, je do NAME zapsán „?“, OPTARG zrušen a vytištěna\n" +" diagnostická 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" +" chybových zpráv, dokonce i když první znak ŘETĚZCE_PŘEPÍNAČŮ není\n" +" dvojtečka. Výchozí 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" +" Normálně getopts zpracovává poziční parametry, avšak jsou-li argumenty\n" +" zadány jako hodnoty ARG, 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" +" 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 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" 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" +" 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" +" -a název předá název jakožto nultý argument PŘÍKAZU\n" +" -c spustí PŘÍKAZ s prázdným prostředím\n" +" -t do 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" @@ -3108,7 +3307,7 @@ msgstr "" " 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 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3120,12 +3319,11 @@ msgstr "" " 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\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" @@ -3133,19 +3331,17 @@ msgstr "" " 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 +#: builtins.c:734 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" +" 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" +" -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" @@ -3159,14 +3355,12 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" 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" +" 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" @@ -3178,15 +3372,14 @@ msgstr "" " 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" +" 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 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3199,22 +3392,19 @@ msgid "" 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" +" 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 +#: builtins.c:779 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" +" 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" @@ -3229,24 +3419,23 @@ msgstr "" " 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 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3254,26 +3443,24 @@ msgid "" 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" +" 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" +" -d zapomene zapamatovaná umístění každého NÁZVU\n" +" -l vypíše v takové podobě, kterou lze opět použít jako vstup\n" +" -p cesta použije NÁZEV_CESTY jako plnou cestu k NÁZVU\n" +" -r zapomene všechna zapamatovaná umístění\n" +" -t vypíše zapamatované umístění každého NÁZVU a každému umístění\n" +" př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ÁZEV Každý NÁZEV je vyhledán v $PATH a přidán do seznamu\n" +" zapamatovaný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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3285,36 +3472,33 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" 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" +" 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" +" -d vypíše krátké pojednání na každé téma\n" +" -m zobrazí použití v jakoby manuálovém formátu\n" +" -s vypíše pouze krátký popis použití o každém příkazu odpovídajícímu\n" +" VZORKU\n" " \n" " Argumenty:\n" -" VZOREK\tVzorek určující téma nápovědy\n" +" VZOREK Vzorek 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 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3323,26 +3507,26 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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." @@ -3353,33 +3537,31 @@ msgstr "" " 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" +" -c vyprázdní seznam historie smazáním všech položek\n" +" -d pozice smaže položku ze seznamu historie na pozici POZICE. Záporné\n" +" pozice se počítají od konce seznamu historie.\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" +" -a připojí řádky historie z této relace do souboru historie\n" +" -n načte všechny řádky historie, které ještě nebyly načteny,\n" +" ze souboru historie a připojí je do seznamu historie\n" +" -r načte soubor historie a obsah připojí do seznamu historie\n" +" -w zapíš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" +" -p provede expanzi historie na každém ARGUMENTU a výsledek zobrazí,\n" +" aniž by cokoliv uložil do seznamu historie\n" +" -s př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" +" 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" +" 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" +" 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 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3388,8 +3570,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3408,23 +3590,20 @@ msgstr "" " 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" +" -l vypíše navíc ID procesů\n" +" -n vypíše pouze procesy, které od minulého oznámení změnily stav\n" +" -p vypíše pouze ID procesů\n" +" -r zúží výstup jen na běžící úlohy\n" +" -s zúží 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" +" 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" +" 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 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3434,7 +3613,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3446,15 +3625,15 @@ msgstr "" " 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" +" -a odstraní všechny úlohy, pokud nebyla žádná ÚLOHA určena\n" +" -h označí každou ÚLOHU tak, že jí nebude zaslán SIGHUP, až shell sám\n" +" obdrží tento signál\n" +" -r odstraní 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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3466,7 +3645,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3478,15 +3658,15 @@ 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" +" 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" +" -s sig SIG je název signálu\n" +" -n sig SIG je číslo signálu\n" +" -l vypíše čísla signálů; pokud „-l“ následují argumenty, má\n" +" se za to, že se jedná o čísla signálů, pro které se mají vyspat\n" +" jejich názvy.\n" +" -L synonymum pro -l\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" @@ -3495,15 +3675,14 @@ msgstr "" " 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 +#: builtins.c:949 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" +" 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" @@ -3537,7 +3716,7 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" "Vyhodnotí aritmetický výraz.\n" " \n" @@ -3569,10 +3748,8 @@ msgstr "" " \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" +" 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" @@ -3582,94 +3759,97 @@ msgstr "" " Pokud poslední ARGUMENT je vyhodnocen na 0, let vrátí 1. Jinak je\n" " navrácena 0." -#: builtins.c:966 -#, fuzzy +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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" +"Načte ze standardního vstupu jeden řádek a rozdělí jej na položky.\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" +" 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" +" oddělovače slov. Ve výchozím nastavení znak zpětného lomítka ruší\n" +" zvláštní význam znaků oddělovače a nového řádku.\n" " \n" -" Nejsou-li uvedeny žádná JMÉNA, načtený řádek bude uložen do proměnné " -"REPLY.\n" +" Nejsou-li uvedena žá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" +" -a pole načtená slova budou přiřazena do postupných prvků POLE\n" +" počínaje indexem nula\n" +" -d oddělovač pokračuje, dokud není načten první znak ODDĚLOVAČE\n" +" namísto nového řádku\n" +" -e načte řádek pomocí knihovny Readline\n" +" -i text použije TEXT jako prvotní text pro Readline\n" +" -n p_znaků vrátí řízení po načtení P_ZNAKŮ znaků, místo čekání na\n" +" nový řádek, avšak respektuje oddělovač, je-li méně než\n" +" P_ZNAKŮ\n" +" -N p_znaků vrátí řízení pouze po načtení přesně P_ZNAKŮ znaků,\n" +" pokud se neobjeví konec souboru nebo nevyprší limit,\n" +" ignoruje jakýkoliv oddělovač\n" +" -p výzva vypíše řetězec VÝZVA bez závěrečného nového řádku dříve,\n" +" než se zahájí načítání\n" +" -r nepovolí zpětná lomítka pro escapování jakýchkoliv znaků\n" +" -s vstup pocházející z terminálu nebude zobrazován\n" +" -t limit umožní vypršení časového limitu a vrácení chyby, pokud\n" +" nebude načten celý řádek do LIMIT sekund. Hodnota proměnné\n" +" TMOUT představuje implicitní limit. LIMIT smí být desetinné\n" +" číslo. Je-li LIMIT 0, read okamžitě skončí, aniž by zkusil\n" +" načíst jakákoliv data, a vrátí úspěch, jen bude-li na\n" +" zadaném deskriptoru souboru připraven vstup. Návratový\n" +" kód bude větší než 128, pokud časový limit bude překročen.\n" +" -u fd č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." +" pro čtení nevyprší (pak je větší než 128), nedojde k chybě při\n" +" přiřazování do proměnné, nebo není poskytnut neplatný deskriptor souboru\n" +" jako argument -u." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3682,16 +3862,14 @@ msgid "" 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" +" 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 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3734,8 +3912,7 @@ msgid "" " 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" +" 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" @@ -3757,9 +3934,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3774,8 +3954,7 @@ msgid "" 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" +" 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" @@ -3839,17 +4018,18 @@ msgstr "" " 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" +" -P Je-li nastaveno, nebudou vyhodnocová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" +" -T Je-li nastaveno, trap DEBUG (obsluha ladění) a RETURN (návrat\n" +" z podprogramu) bude děděn do funkcí shellu.\n" +" -- Přiřadí jakékoliv zbývající argumenty do pozičních parametrů.\n" +" Neexistují-li žádné zbývající argumenty, poziční parametry budou\n" +" odstraněny.\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" +" 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" @@ -3857,7 +4037,7 @@ msgstr "" " Návratový kód:\n" " Vrátí úspěch, pokud nebyl zadán neplatný argument." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3866,9 +4046,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3881,11 +4062,12 @@ msgstr "" " 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" +" -f považuje každé JMÉNO za funkci shellu\n" +" -v považuje každé JMÉNO za proměnnou shellu\n" +" -n považuje každé JMÉNO za odkaz na název a odstraní proměnnou samu\n" +" namísto proměnné, na kterou odkazuje\n" " \n" -" Bez těchto dvou příznaků unset nejprve zkusí zrušit proměnnou a pokud " -"toto\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" @@ -3894,13 +4076,12 @@ msgstr "" " Vrátí úspěch, pokud nebyl zadán neplatný přepínač a JMÉNO není jen pro\n" " čtení." -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3914,10 +4095,8 @@ msgid "" 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" +" 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" @@ -3929,7 +4108,7 @@ msgstr "" " Návratový kód:\n" " Vrátí úspěch, pokud nebyl zadán neplatný přepínač nebo NÁZEV." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3941,7 +4120,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3950,24 +4130,23 @@ msgid "" 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" +" 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" +" -a vztahuje se na proměnné typu číslované pole\n" +" -A vztahuje se na proměnné typu asociativní pole\n" +" -f vztahuje se funkce shellu\n" +" -p zobrazí seznam všech proměnných nebo funkcí jen pro čtení\n" +" v závislosti podle toho, zda-li byl zadán přepínač -f\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 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3985,7 +4164,7 @@ msgstr "" " 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 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3998,18 +4177,18 @@ msgid "" " 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" +"Vykoná příkazy 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" +" jsou použity k 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 vykonávání\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 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4033,14 +4212,17 @@ msgstr "" " Návratový kód:\n" " Vrací úspěch, pokud je správa úloh zapnuta a nevyskytla se chyba." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4064,8 +4246,7 @@ msgid "" " -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 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" @@ -4086,14 +4267,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4116,6 +4299,9 @@ msgstr "" " zjištění stavu souboru. Rovněž jsou k dispozici řetězcové operátory a\n" " operátory číselného porovnání.\n" " \n" +" Chování testu závisí na počtu argumentů. Úplnou specifikaci si lze\n" +" přečíst v manuálové stránce bashe.\n" +" \n" " Souborové operátory:\n" " \n" " -a SOUBOR Pravda, pokud soubor existuje.\n" @@ -4143,8 +4329,7 @@ msgstr "" " -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" +" Pravda, pokud je SOUBOR1 novější než SOUBOR2 (podle času\n" " změny obsahu).\n" " \n" " SOUBOR1 -ot SOUBOR2\n" @@ -4174,6 +4359,9 @@ msgstr "" " Další operátory:\n" " \n" " -o PŘEPÍNAČ Pravda, pokud je přepínač shellu PŘEPÍNAČ zapnut.\n" +" -v PROMĚNNÁ Pravda, pokud je proměnná shellu PROMĚNNÁ nastavena\n" +" -R PROMĚNNÁ Pravda, pokud je proměnná shellu PROMĚNNÁ nastavena a\n" +" jedná se odkaz na název.\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" @@ -4191,7 +4379,7 @@ msgstr "" " 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 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4203,12 +4391,11 @@ msgstr "" " 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 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\n" +" Prints the accumulated user and system times for the shell and all of its\n" " child processes.\n" " \n" " Exit Status:\n" @@ -4216,19 +4403,17 @@ msgid "" msgstr "" "Zobrazí časy procesu.\n" " \n" -" Vypíše celkovou dobu procesu shellu a všech jeho potomků, kterou " -"strávili\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 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -4237,26 +4422,26 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" 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" @@ -4264,37 +4449,34 @@ msgstr "" " 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" +" 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" +" 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" +" jednoduchým příkazem. Je-li SIGNAL_SPEC „RETURN“, bude ARGUMENT proveden\n" +" vždy, když skončí běh funkce shellu nebo skriptu spuštěného přes\n" +" vestavěný příkaz „.“ nebo „source“. SIGNAL_SPEC „ERR“ znamená, že\n" +" ARGUMENT bude proveden pokaždé, když by selhání příkazu způsobilo\n" +" ukončení shellu (je-li zapnut přepínač -e).\n" " \n" -" Nejsou-li poskytnuty žádné argumenty, trap vypíše seznam příkazů " -"navázaných\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 , nebo číslo " -"signálu.\n" -" U jmen signálů nezáleží na velikosti písmen a předpona SIG je " -"nepovinná.\n" +" Každý SIGNAL_SPEC je buďto jméno signálu ze , 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 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4303,25 +4485,24 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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." +" Returns success if all of the NAMEs are found; fails if any are not found." msgstr "" "Zobrazí informace o typu příkazu.\n" " \n" @@ -4329,33 +4510,32 @@ msgstr "" " 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" +" -a zobrazí všechna místa, kde se nalézá spustitelný program\n" +" pojmenovaný NÁZEV. To zahrnuje aliasy, vestavěné příkazy a funkce\n" +" jen a pouze tehdy, když není rovněž použit přepínač -p.\n" +" -f potlačí hledání mezi funkcemi shellu\n" +" -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\n" +" souboru na disku, který by byl spuštěn\n" +" -p buď vrátí jméno souboru na disku, který by byl spuštěn,\n" +" nebo nic, pokud „type -t NÁZEV“ by nevrátil „file“ (soubor)\n" +" -t vypíše jedno slovo z těchto: „alias“, „keyword“, „function“,\n" +" „builtin“, „file“ nebo „“, je-li NÁZEV alias, klíčové slovo\n" +" shellu, shellová funkce, vestavěný příkaz shellu, soubor na\n" +" disku nebo nenalezený příkaz\n" " \n" " Argumenty:\n" -" NÁZEV\tNázev příkazu určený k výkladu.\n" +" NÁZEV Ná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 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -4368,6 +4548,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4379,6 +4560,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4399,27 +4585,34 @@ msgstr "" " 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" +" -S použije se „měkké“ (soft) omezení zdroje\n" +" -H použije se „tvrdé“ (hard) omezení zdroje\n" +" -a nahlásí všechna současná omezení (limity)\n" +" -b velikost vyrovnávací paměti socketů\n" +" -c maximální velikost vytvářených core souborů (výpis paměti programu)\n" +" -d maximální velikost datového segmentu procesu\n" +" -e maximální plánovací priorita („nice“)\n" +" -f maximální velikost souborů zapsaných shellem a jeho potomky\n" +" -i maximální počet čekajících signálů\n" +" -k maximální počet jaderných front událostí („kqueue“) alokovaných\n" +" pro tento proces\n" +" -l maximální velikost paměti, kterou může proces zamknout\n" +" -m maximální velikost rezidentní paměti (resident set size)\n" +" -n maximální počet otevřených deskriptorů souboru\n" +" -p velikost vyrovnávací paměti rour\n" +" -q maximální počet bajtů ve frontě posixových zpráv\n" +" -r maximální priorita plánování v reálném čase\n" +" -s maximální velikost zásobníku\n" +" -t maximální množství procesorového času v sekundách\n" +" -u maximální počet procesů uživatele\n" +" -v velikost virtuální paměti\n" +" -x maximální počet zámků na souborech\n" +" -P maximální počet pseudoterminálů\n" +" -R maximální doba, po kterou proces plánovaný v reálném čase, může\n" +" běžet, než se zablokuje\n" +" -T maximální počet vláken\n" +" \n" +" Ne všechny přepínače jsou dostupné na všech platformách.\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" @@ -4428,13 +4621,12 @@ msgstr "" " 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" +" -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 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4467,59 +4659,80 @@ msgstr "" " Návratový kód\n" " Vrátí úspěch, pokud nebyl zadán neplatný MÓD nebo přepínač." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." 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" +" Počká na každý 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" +" identifikátorem úlohy, počká na všechny procesy z kolony dané úlohy.\n" +" \n" +" Je-li zadán přepínač -n, počká na ukončení jedné úlohy ze seznamu ID\n" +" nebo nebyla-li zadána žádná ID, počká na ukončení další úlohy a vrátí\n" +" její návratový kód.\n" +" \n" +" Je-li zadán přepínač -p, identifikátor procesu nebo úlohy, jehož\n" +" návratový kód se má vrátit, bude přiřazen do proměnné uvedené v argumentu\n" +" tohoto přepínače. Na začátku je před jakýmkoliv přiřazením je proměnná\n" +" zrušena. To je užitečné pouze spolu s přepínačem -n.\n" +" \n" +" Je-li zadán přepínač -f a je-li zapnuta správa úloh, počká na ukončení\n" +" ukončení zadaného ID, místo aby čekal na změnu jeho stavu.\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č." +" Vrátí kód posledního ID. Selže, pokud ID není platné nebo byl zadán\n" +" neplatný přepínač nebo byl použit přepínač -n a shell nemá žádné\n" +" nevyhodnocené potomky." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is 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" +" Počká na každý proces určený PID a nahlásí jeho návratový kód. Není-li\n" +" PID zadán, bude se čekat na všechny právě aktivní procesy potomků a\n" +" návratová hodnota 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č." +" Vrátí kód posledního PID. Selže, pokud PID není platný nebo byl zadán\n" +" neplatný přepínač." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4533,17 +4746,14 @@ msgid "" 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" +" 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 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4559,7 +4769,7 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Aritmetika smyček.\n" +"Aritmetická smyčka for.\n" " \n" " Ekvivalentní k\n" " \t(( VÝR1 ))\n" @@ -4572,7 +4782,7 @@ msgstr "" " Návratový kód:\n" " Vrátí kód naposledy vykonaného příkazu." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4593,20 +4803,13 @@ msgid "" 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" +" 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" @@ -4614,7 +4817,7 @@ msgstr "" " Návratový kód:\n" " Vrátí kód naposledy prováděného příkazu." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4632,20 +4835,18 @@ 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" +" 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" +" 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 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4663,21 +4864,16 @@ msgstr "" " Návratový kód:\n" " Vrátí kód naposledy provedeného příkazu." -#: builtins.c:1563 +#: builtins.c:1631 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" +" 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" +" `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" @@ -4686,56 +4882,53 @@ 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" +" 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" +" 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 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +" Expanduje a provádí PŘÍKAZY-2 tak dlouho, dokud poslední příkaz v PŘÍKAZECH\n" +" 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 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +" Expanduje a provádí PŘÍKAZY-2 tak dlouho, dokud poslední příkaz v PŘÍKAZECH\n" +" má nenulový návratový kód.\n" +" \n" " Návratový kód:\n" " Vrátí kód naposledy provedeného příkazu." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4745,25 +4938,23 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." 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" +" 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." +" Příkaz coproc vrací návratový kód 0." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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" @@ -4773,16 +4964,14 @@ 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" +" 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 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4799,7 +4988,7 @@ msgstr "" " Návratový kód:\n" " Vrátí kód naposledy spuštěného příkazu." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4815,21 +5004,19 @@ 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" +" 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 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4837,7 +5024,7 @@ msgstr "" "Vyhodnotí aritmetický výraz.\n" " \n" " VÝRAZ bude vyhodnocen podle pravidel aritmetického vyhodnocování.\n" -" Ekvivalentní k „let VÝRAZ“.\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." @@ -4846,16 +5033,13 @@ msgstr "" # 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 +#: builtins.c:1739 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" +" 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" @@ -4883,22 +5067,20 @@ msgstr "" " ! 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" +" 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" +" 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 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4956,8 +5138,7 @@ msgstr "" " 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" +" 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" @@ -5003,7 +5184,7 @@ msgstr "" " \t\trozlišení, které příkazy by měly být uloženy do seznamu\n" " \t\thistorie.\n" -#: builtins.c:1754 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -5013,19 +5194,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5040,19 +5221,19 @@ msgstr "" " 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 Potlačí obvyklou změnu adresáře, když se na zásobník přidávají\n" +" adresář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 Zrotuje zásobník tak, že N. adresář (počítáno zleva na seznamu\n" +" zobrazované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 Zrotuje zásobník tak, že N. adresář (počítáno zprava na seznamu\n" +" zobrazované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" +" ADRESÁŘ\n" +" Přidá ADRESÁŘ na vrchol zásobníku adresářů a učiní jej novým\n" +" současným pracovním adresářem.\n" " \n" " Zásobník adresářů si můžete prohlédnout příkazem „dirs“.\n" " \n" @@ -5060,7 +5241,7 @@ msgstr "" " Vrátí úspěch, pokud nebyl zadán neplatný argument a změna adresáře\n" " neselhala." -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5069,16 +5250,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5092,17 +5273,17 @@ msgstr "" " 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 Potlačí obvyklou změnu adresáře, když se ze zásobníku odebírají\n" +" adresář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 Odstraní N. položku počítáno zleva na seznamu zobrazovaném\n" +" pomocí „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 Odstraní N. položku počítáno zprava na seznamu zobrazovaném\n" +" pomocí „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" @@ -5110,7 +5291,7 @@ msgstr "" " Vrátí úspěch, pokud nebyl zadán neplatný argument nebo neselhala změna\n" " adresáře." -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5121,19 +5302,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5141,34 +5322,32 @@ 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" +" 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" +" -c vyprázdní zásobník adresářů tím, že smaže všechny jeho prvky\n" +" -l nevypíše vlnkou zkrácené verze adresářů, které jsou relativní\n" +" vašemu domovskému adresáři\n" +" -p vypíše zásobník adresářů po jedné položce na řádek\n" +" -v vypíše zásobník adresářů po jedné položce na řádek, přičemž\n" +" ná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 zobrazí N. položku počítáno zleva na seznamu, který zobrazuje\n" +" dirs, 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 zobrazí N. položku počítáno zprava na seznamu, který zobrazuje\n" +" dirs, 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 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5184,9 +5363,9 @@ 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" +" argumentů vypíše každý zadaný NÁZEV_VOLBY, nebo seznam všech přepínačů\n" +" shellu, nebyl-li zadán žádný NÁZEV_VOLBY, s příznakem, zda je, nebo\n" +" není přepínač 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" @@ -5199,7 +5378,7 @@ msgstr "" " 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 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5207,76 +5386,85 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\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" +" -v proměnná výstup umístí do proměnné shellu PROMĚNNÁ namísto\n" +" odeslá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" +" 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" +" 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" +" popsaných v printf(1) též:\n" +" \n" +" %b expanduje posloupnosti escapované zpětným lomítkem\n" +" v odpovídajícím argumentu\n" +" %q oescapuje argument takovým způsobem, že jej bude možné\n" +" použít jako vstup shellu\n" +" %Q jako %q, ale použije libovolnou přesnost na neescapovaný\n" +" argument před samotným escapováním\n" +" %(FORMÁT)T vypíše řetězec data-času tak, jako by to byl výstup\n" +" funkce strftime(3) s formátovacím řetězcem FORMÁT\n" +" \n" +" FORMÁT lze znovu použít podle potřeby ke zpracování všech argumentů. Je-li\n" +" zde méně argumentů, než FORMÁT vyžaduje, nadbytečné formátovací znaky\n" +" se budou chovat, jako by nulová hodnota nebo nulový řetězec, jak je třeba,\n" +" byly zadány.\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 +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5285,27 +5473,32 @@ msgstr "" " \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" +" v podobě vhodné pro jejich znovu užití jako vstup.\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" +" -p vypíše existující pravidla doplňování v znovu použitelném tvaru\n" +" -r odstraní pro každý NÁZEV doplňovací pravidlo, nebo není-li zadán\n" +" žádný NÁZEV, zruší všechna pravidla\n" +" -D použije pravidla doplňování a akce jako implicitní pro příkazy,\n" +" které nemají žádné určité pravidlo doplňování definováno\n" +" -E použije pravidla doplňování a akce na „prázdné“ příkazy –\n" +" pravidla doplňování se uplatní na prázdný řádek\n" +" -I použije pravidla doplňování a akce na první slovo (obvykle příkaz)\n" +" \n" +" Použije-li se doplňování, akce se uplatní v pořadí, v jakém jsou vypsány\n" +" přepínače psané velkými písmeny výše. Je-li zadáno více přepínačů,\n" +" přepínač -D bude upřednostněn před přepínačem -E. Oba přepínače přebíjejí\n" +" přepínač -I.\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 +#: builtins.c:2004 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" +" completions. If the optional WORD argument is supplied, matches against\n" " WORD are generated.\n" " \n" " Exit Status:\n" @@ -5320,22 +5513,19 @@ msgstr "" " 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 +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5355,106 +5545,99 @@ msgstr "" " \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" +" vypíše možnosti 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" +" \t-D\t\tZmění možnosti doplňování „implicitnímu“ příkazu\n" +" \t-E\t\tZmění možnosti doplňování „prázdnému“ příkazu\n" +" \t-I\t\tZmění možnosti doplňování prvnímu slovu\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" +" 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" +" 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 +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" 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" +"Načte řádky ze standardního vstupu do proměnné typu indexované 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" +" 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 indexované pole.\n" +" Implicitním POLEM 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" +" -d oddělovač Řádky zakončí ODDĚLOVAČEM namísto znakem nového řádku\n" +" -n počet Zkopíruje nejvýše POČET řádků. Je-li POČET 0,\n" +" zkopíruje všechny řádky\n" +" -O počátek Přiřazování do POLE začne na indexu POČÁTEK,\n" +" výchozí index je 0\n" +" -s počet Zahodí prvních POČET načtených řádků\n" +" -t Odstraní znak konce řádku z každého načteného řádku\n" +" -u fd Řádky čte z deskriptoru souboru FD namísto ze\n" +" standardního vstupu\n" +" -C volání Vyhodnotí VOLÁNÍ pokaždé, když je načteno MNOŽSTVÍ\n" +" řádků\n" +" -c množství Udává počet řádků, které je třeba přečíst, mezi\n" +" kaž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" +" POLE Název proměnné typu pole, do které budou přiřazena data\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" +" VOLÁNÍ budou jako dodatečné argumenty předány index prvku pole, do\n" +" kterého se má vzápětí přiřazovat, a řádek, který má být přiřazen do\n" +" tohoto prvku.\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í." +" Vrátí úspěch, pokud nebyl zadán neplatný přepínač, POLE nebylo jen pro\n" +" čtení a bylo indexovaným polem." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -5464,6 +5647,68 @@ msgstr "" " \n" " Synonymum pro „mapfile“." +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: neplatný klíč asociativního pole" + +#~ 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í " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: proces %5ld (%s) do the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Neznámé číslo signálu" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Copyright © 2018 Free Software Foundation, Inc." + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright © 2014 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Copyright © 2009 Free Software Foundation, Inc.\n" + +#~ msgid "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "Licence GPLv2+: GNU GPL verze 2 nebo novější \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". S VÝRAZEM vrátí\n" +#~ " " + +#~ 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 "" +#~ "; tato dodatečná informace může být\n" +#~ " použita jako výpis zásobníku volání.\n" +#~ " \n" +#~ " Hodnota VÝRAZU určuje, kolik rámců volání jít zpět před současný,\n" +#~ " vrcholový rámec je rámce 0." + #~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" #~ msgstr "xrealloc: nelze přealokovat %'lu bajtů (%'lu bajtů alokováno)" @@ -5471,8 +5716,7 @@ msgstr "" #~ 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)" +#~ msgstr "xrealloc: %s:%d: nelze přealokovat %'lu bajtů (%'lu bajtů alokováno)" #~ msgid " " #~ msgstr " " @@ -5486,8 +5730,7 @@ msgstr "" #~ 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" +#~ 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." @@ -5508,46 +5751,38 @@ msgstr "" #~ 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" +#~ 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" +#~ 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" +#~ 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" +#~ 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." +#~ 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" +#~ 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" +#~ 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," +#~ 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." @@ -5571,8 +5806,7 @@ msgstr "" #~ 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ářů" +#~ 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." @@ -5592,9 +5826,6 @@ msgstr "" #~ 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," @@ -5613,10 +5844,8 @@ msgstr "" #~ 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 "-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." @@ -5642,8 +5871,7 @@ msgstr "" #~ 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í." +#~ 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" @@ -5669,22 +5897,16 @@ 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" +#~ " 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" +#~ " „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 "" @@ -5696,8 +5918,7 @@ msgstr "" #~ " \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" +#~ " -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" @@ -5711,33 +5932,28 @@ msgstr "" #~ " 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" +#~ " 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" +#~ " 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" +#~ " -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" +#~ " 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ř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" @@ -5752,14 +5968,11 @@ msgstr "" #~ " 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" +#~ " 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 "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" @@ -5773,36 +5986,24 @@ msgstr "" #~ " 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." +#~ " 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" +#~ " 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" +#~ " 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)." +#~ 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 "" @@ -5816,14 +6017,11 @@ msgstr "" #~ " 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" +#~ " 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" +#~ " 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." @@ -5835,31 +6033,20 @@ msgstr "" #~ " 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" +#~ " 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." +#~ " 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" +#~ " 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." @@ -5871,27 +6058,20 @@ msgstr "" #~ " 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" +#~ " 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" +#~ " 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." +#~ " 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" +#~ " 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." @@ -5911,12 +6091,9 @@ msgstr "" #~ " 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" +#~ " 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 "" @@ -5929,12 +6106,9 @@ msgstr "" #~ " 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" +#~ " 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čů." @@ -5942,21 +6116,16 @@ msgstr "" #~ "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" +#~ " 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" +#~ " 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 "" @@ -5986,79 +6155,61 @@ msgstr "" #~ "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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " `-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" +#~ " 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" +#~ " 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" +#~ " 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 "" @@ -6068,8 +6219,7 @@ msgstr "" #~ " 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 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." @@ -6092,30 +6242,22 @@ msgstr "" #~ " 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" +#~ " ž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" +#~ " 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." +#~ " 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" +#~ " 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" +#~ " 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/da.gmo b/po/da.gmo new file mode 100644 index 0000000..46243f3 Binary files /dev/null and b/po/da.gmo differ diff --git a/po/da.po b/po/da.po new file mode 100644 index 0000000..d5334e2 --- /dev/null +++ b/po/da.po @@ -0,0 +1,6106 @@ +# Danish translation of bash. +# Copyright (C) 2008 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Kenneth Nielsen , 2009-2011. +# +# Oversættelseskonventioner: +# keymap -> tastetildeling +# child -> underproces +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2011-03-18 01:36+0100\n" +"Last-Translator: Kenneth Nielsen \n" +"Language-Team: Danish \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +# Den er jeg altså ikke helt sikker på +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "ugyldigt arrayindeks" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: kan ikke konvertere indekseret til associativt array" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: kan ikke tildele til ikkenumerisk indeks" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: et indeks skal bruges ved tildeling til associativt array" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: kan ikke oprette %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: kan ikke finde tastetildeling for kommando" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: første ikke-blank-tegn er ikke '\"'" + +# Kønnet her er et gæt, hvis det er parenteser eller anførselstegn passer det +# FEJLRAPPORT +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "ingen afsluttende \"%c\" i %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: manglende kolonseparator" + +#: bashline.c:4733 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "\"%s\": kan ikke løsne" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 +#, fuzzy, c-format +msgid "`%s': invalid alias name" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "linjeredigering ikke slået til" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: kan ikke læse: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "\"%s\": ukendt funktionsnavn" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s er ikke bundet til nogen taster.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s kan kaldes via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "\"%s\": kan ikke løsne" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "løkketæller" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "kun meningsfuld i en \"for\"-, \"while\"- eller \"until\"-løkke" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"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." +msgstr "" +"Returnerer konteksten af det nuværende underrutinekald.\n" +"\n" +" Uden UDTRYK returneres \"$line $filename\". Med UDTRYK returneres\n" +" \"$line $subroutine $filename\". Den ekstra information\n" +" kan bruges til at give at stakspor.\n" +"\n" +" Værdien af UDTRYK angiver hvor mange kalderammer der skal gås tilbage\n" +" fra den nuværende. Toprammen er ramme 0.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 med mindre skallen ikke eksekverer en skalfunktion eller " +"hvis\n" +" UDTRYK er ugyldigt." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME ikke indstillet" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "for mange argumenter" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "ingen anden mappe" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD ikke indstillet" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linje %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "advarsel: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: brug: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: tilvalg kræver et argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: numerisk argument påkrævet" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: ikke fundet" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: ugyldigt tilvalg" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ugyldigt tilvalgsnavn" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "\"%s\": ikke et gyldigt identificeringsnavn" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "ugyldigt oktaltal" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "ugyldigt heksadecimalt tal" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "ugyldigt tal" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: ugyldig signalspecifikation" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "\"%s\": ikke en pid eller gyldig job-spec" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: skrivebeskyttet variabel" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: kan ikke fjerne" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s udenfor rækkevidde" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s udenfor rækkevidde" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: intet sådant job" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: ingen jobkontrol" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "ingen jobkontrol" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: begrænset" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "begrænset" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ikke indbygget i skallen" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "skrivefejl: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "fejl ved indstilling af terminalattribut: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "fejl ved indhentning af terminalattribut: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: fejl ved indhentning af nuværende mappe: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: tvetydig job-spec" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: kan ikke fjerne: skrivebeskyttet %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: kan ikke fjerne" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: ugyldigt handlingsnavn" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ingen fuldførselsspecifikation" + +#: builtins/complete.def:696 +msgid "warning: -F option may not work as you expect" +msgstr "advarsel: tilvalget -F vil måske ikke virke, som du forventer" + +#: builtins/complete.def:698 +msgid "warning: -C option may not work as you expect" +msgstr "advarsel: tilvalget -C vil måske ikke virke, som du forventer" + +#: builtins/complete.def:846 +msgid "not currently executing completion function" +msgstr "ikke i gang med at eksekvere fuldførelsesfunktion" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "kan kun bruges i en funktion" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "kan ikke bruge \"-f\" til at lave funktioner" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: skrivebeskyttet funktion" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: kan ikke destruere arrayvariabel på denne måde" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: kan ikke konvertere associativt til indekseret array" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "dynamisk indlæsning ikke tilgængelig" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "kan ikke åbne delt objekt %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "kan ikke finde %s i delt objekt %s: %s" + +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ikke dynamisk indlæst" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: ikke dynamisk indlæst" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: kan ikke slette: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: er en mappe" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ikke en regulær fil" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: fil er for stor" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: kan ikke eksekvere binær fil" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: kan ikke eksekvere: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "log ud\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ikke en logind-skal: brug \"exit\"" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Der er stoppede job.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Der er kørende job.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "ingen kommando fundet" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "historikspecifikation" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: kan ikke åbne midl. fil: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "nuværende" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "job %d startet uden jobkontrol" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ugyldigt tilvalg -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: et argument er påkrævet til tilvalget -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing slået fra" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hash-tabel tom\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tkommando\n" + +# Jeg antager at det sidste ` er det første af et sæt af anførselstegn og +# det er derfor oversat til " +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Skalkommandoer som matcher nøgleordet \"" +msgstr[1] "Skal-kommandoer som matcher nøgleordene \"" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"ingen hjælpeemner matcher \"%s\". Prøv \"help help\" eller \"man -k %s\" " +"eller \"info %s\"." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: kan ikke åbne: %s" + +#: builtins/help.def:523 +#, 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 "" +"Disse skalkommandoer er defineret internt. Skriv \"help\" for at se denne " +"liste.\n" +"Skriv \"help navn\" for at finde ud af mere om kommandoen \"navn\".\n" +"Brug \"info bash\" for at få mere generel information om skallen.\n" +"Brug \"man -k\" eller \"info\" for at finde ud af mere om kommandoer som " +"ikke er \n" +"på listen.\n" +"\n" +"En stjerne (*) ved siden af et navn betyder at kommandoen er slået fra.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "kan ikke bruge mere end en af -anrw" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "historikposition" + +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ugyldigt tilvalgsnavn" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: historikudvidelse fejlede" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib fejlede" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "ingen andre tilvalg er tilladt sammen med \"-x\"" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenter skal være processer eller job-id'er" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Ukendt fejl" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "forventede et udtryk" + +#: builtins/mapfile.def:180 +#, fuzzy, c-format +msgid "%s: not an indexed array" +msgstr "%s: ikke en arrayvariabel" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: ugyldig filbeskrivelsesspecifikation" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: ugyldig filbeskrivelse: %s" + +# -c Specify the number of lines read between each call to callback. +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: ugyldigt antal linjer" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: ugyldig array-startindeks" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: ugyldigt tilbagekaldskvantum" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "tomt arrayvariabelnavn" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "understøttelse af arrayvariabel påkrævet" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "\"%s\": manglende formattegn" + +#: builtins/printf.def:485 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: ugyldig specifikation af tidsudløb" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "\"%c\": ugyldigt formattegn" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "advarsel: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "manglende heksciffer for \\x" + +#: builtins/printf.def:934 +#, fuzzy, c-format +msgid "missing unicode digit for \\%c" +msgstr "manglende heksciffer for \\x" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ingen anden mappe" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: ugyldigt grænseargument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "mappestak tom" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "mappestakindeks" + +#: builtins/pushd.def:701 +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 "" +"Viser listen af huskede mapper. Mapper tilføjes til listen med\n" +" \"pushd\"-kommandoen. Du kan komme tilbage i listen med \"popd\"-\n" +" kommandoen.\n" +"\n" +" Valgmuligheder:\n" +" -c\tryd mappestakken ved at slette alle elementerne\n" +" -l\tvis ikke \"tildepræfiksede\" versioner af mapper relativt\n" +" til din hjemmemappe\n" +" -p\tvis mappestakken med et element per linje\n" +" -v\tvis mappestakken med et element per linje, præfikset med\n" +" med dets position i stakken\n" +" \n" +" Argumenter:\n" +" +N\tViser det N'te element, talt fra venstre af og vist mappevis\n" +" når der ikke angives nogle valgmuligheder, startende fra 0.\n" +" \n" +" -N\tViser det N'te element, talt fra venstre af og vist mappevis\n" +" når der ikke angives nogle valgmuligheder, startende fra 0." + +# Jeg tror der er en fejl i den engelske, fejlrapport +#: builtins/pushd.def:723 +#, 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 "" +"Tilføjer en mappe til toppen af mappestakken, eller roterer stakken\n" +" således at den nye top bliver den aktuelle mappe. Uden\n" +" argumenter ombyttes de to øverste mapper.\n" +" \n" +" Valgmuligheder:\n" +" -n\tUndertrykker det normale mappeskift ved tilføjelse\n" +" \taf mapper til stakken, således at kun stakken manipuleres.\n" +" \n" +" Argumenter:\n" +" +N\tRoterer stakken således at det N'te element (talt\n" +" \tfra venstre af listen som vist af \"dirs\", startende med nul)\n" +" \tbliver placeret i toppen.\n" +" \n" +" -N\tRoterer stakken således at det N'te element (talt\n" +" \tfra højre af listen som vist af \"dirs\", startende med nul)\n" +" \tbliver placeret i toppen.\n" +" \n" +" dir\tTilføjer DIR til toppen af mappestakken, således at den\n" +" \tbliver den nye aktive mappe.\n" +" \n" +"Den indbyggede funktion \"dirs\" viser mappestakken." + +#: builtins/pushd.def:748 +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 "" +"Fjerner en mappe fra toppen af mappestakken. Uden argumenter fjernes\n" +" den øverste mappe fra stakken og der skiftes til den nye øverste mappe.\n" +" \n" +" Valgmuligheder:\n" +" -n\tUndertrykker det normale mappeskift ved fjernelse\n" +" \taf mapper fra stakken, således at kun stakken manipuleres.\n" +" \n" +" Argumenter:\n" +" +N\tFjerner det N'te element, talt fra venstre af listen\n" +" \tsom vist af \"dirs\", startende med nul. F.eks: vil \"popd +0\"\n" +" \tfjerne det øverste argument og \"popd +1\" det andet.\n" +" \n" +" -N\tFjerner det N'te element, talt fra højre af listen\n" +" \tsom vist af \"dirs\", startende med nul. F.eks: vil \"popd -0\"\n" +" \tfjerne det sidste argument og \"popd -1\" det andetsidste.\n" +" \n" +"Den indbyggede funktion \"dirs\" viser mappestakken." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: ugyldig specifikation af tidsudløb" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "læsefejl: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "kan kun udføre \"return\" fra en funktion eller indlæst skript" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "kan ikke fjerne en funktion og en variabel samtidig" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ikke en arrayvariabel" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ikke en funktion" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: kan ikke fjerne" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "skifttæller" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "kan ikke indstille og fjerne skaltilvalg samtidig" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ugyldigt navn for skaltilvalg" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "filnavnsargument påkrævet" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: fil ikke fundet" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "kan ikke sætte i hvile" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "kan ikke sætte en logindskal i hvile" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s er aliasset til \"%s\"\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s er et skalnøgleord\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s er en funktion\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s er indbygget i skallen\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s er indbygget i skallen\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s er %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s er hashet (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: ugyldigt grænseargument" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "\"%c\": ugyldig kommando" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: kan ikke indhente grænse: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "grænse" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: kan ikke modificere grænse: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktalt tal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "\"%c\": ugyldig symbolsk tilstandsoperator" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "\"%c\": ugyldigt symbolsk tilstandstegn" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " linje " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "sidste kommando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Afbryder..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "advarsel: " + +#: error.c:488 +msgid "unknown command error" +msgstr "ukendt kommandofejl" + +#: error.c:489 +msgid "bad command type" +msgstr "ugyldig kommandotype" + +#: error.c:490 +msgid "bad connector" +msgstr "dårligt mellemled" + +#: error.c:491 +msgid "bad jump" +msgstr "dårligt hop" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: ubundet variabel" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atidsudløb mens der ventedes på input: auto-logud\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "kan ikke videresende standardinput fra /dev/null: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: \"%c\": ugyldigt formateringstegn" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "datakanalfejl (pipe error)" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: begrænset: kan ikke specificere \"/\" i kommandonavne" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: kommando ikke fundet" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: kan ikke eksekvere binær fil" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: dårlig fortolker" + +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kan ikke eksekvere binær fil" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s er indbygget i skallen\n" + +# 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 out‐ +# put 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 pro‐ +# vide input for list. If the <(list) form is used, the file passed as +# an argument should be read to obtain the output of list. +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "kan ikke duplikere fd %d til fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "grænse for rekursion af udtryk overskredet" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "underløb i rekursionsstak" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "syntaksfejl i udtryk" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "forsøgte tildeling til ikke-variabel" + +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "syntaksfejl i udtryk" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "division med 0" + +# denne her streng er dårlig på så mange måder at det fatter man slet ikke. Skal bug oversætter og hvad er expassign. Jeg laver et bud og har fejlmeldt den +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "bug: dårligt expassign-udtryk" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "\":\" forventet for betingede udtryk" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "eksponent mindre end 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "identifikator forventet efter præforøgelse eller -formindskelse" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "manglende \")\"" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "syntaksfejl: operand forventet" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntaksfejl: ugyldig aritmetisk operator" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (fejlelement er \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "ugyldig aritmetisk grundtal" + +# -c Specify the number of lines read between each call to callback. +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: ugyldigt antal linjer" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "værdi for stor til grundtal" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: fejl i udtryk\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: kan ikke tilgå overliggende mapper" + +# Har ladet nodelay stå, idet jeg gætter på at det er et navn +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "kan ikke nulstille \"nodelay\"-tilstand for fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "kan ikke allokere ny fildeskriptor til bash-input fra fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer eksisterer allerede til ny fd %d" + +# ?? +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp-datakanal (pipe)" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "forgrenet pid %d figurerer i kørende job %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "sletter stoppet job %d med procesgruppe %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) markeret som stadig i live" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: ingen process med det pid" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Færdig" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Stoppet" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Stoppet(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Kører" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Færdig(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Afslut %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Ukendt status" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(smed kerne) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "underproces setpgid (%ld til %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld er ikke en underproces af denne skal" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Ingen optegnelse af proces %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: job %d er stoppet" + +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: intet sådant job" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: job er afbrudt" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: job %d er allerede i baggrunden" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linje %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (smed kerne)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd nu: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp fejlede" + +#: jobs.c:4434 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: linjedisciplin" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: linjedisciplin" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "kan ikke indstille terminal-procesgruppe (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "ingen jobkontrol i denne skal" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: forfejlet hævdelse: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: hævdelse forkludret\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "ukendt" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blok i fri liste tværet ud" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: kaldt med blokargument som allerede er fri" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: kaldt med ikke-allokeret blokargument" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: størrelse på start- og slut-bid afviger" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: kaldt med ikke-allokeret blokargument" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underløb detekteret, mh_nbytes uden for interval" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: størrelse på start- og slut-bid afviger" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: alloc-tabel er fyldt med FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p allerede i tabel som allokeret?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p allerede i tabel som fri?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "ugyldig base" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: vært ukendt" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: ugyldig tjeneste" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: dårlig specifikation for netværkssti" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "netværksoperation ikke understøttet" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" + +#: locale.c:294 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "xrealloc: %s:%d: kan ikke allokere %lu bytes" + +#: locale.c:296 +#, fuzzy, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "xrealloc: %s:%d: kan ikke allokere %lu bytes" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Du har post i $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Du har ny post i $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Posten i %s er blevet læst\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "syntaksfejl: aritmetisk udtryk påkrævet" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "syntaksfejl: \";\" uventet" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntaksfejl: \"((%s))\"" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: dårlig instruktionstype %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document ved linje %d er adskilt af slut-på-linje (ønskede \"%s\")" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_direction: videresendelsesinstruktion \"%d\" uden for interval" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "uventet EOF mens der ledtes efter samhørende \"%c\"" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "uventet EOF mens der ledtes efter \"]]\"" + +# word A sequence of characters considered as a single unit by the +# shell. Also known as a token. +# Jeg har valgt udtryk +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntaksfejl i betingelsesudtryk: uventet element \"%s\"" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "syntaksfejl i betingelsesudtryk" + +# word A sequence of characters considered as a single unit by the +# shell. Also known as a token. +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "uventet element \"%s\", forventede \")\"" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "forventede \")\"" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "uventet argument \"%s\" til unær betingelsesoperator" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "uventet argument til unær betingelsesoperator" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "uventet udtryk \"%s\", ventede binær betingelsesoperator" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "ventedet binær betingelsesoperator" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "uventet argument \"%s\" til binær betingelsesoperator" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "uventet argument til binær betingelsesoperator" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "uventet udtryk \"%c\" i betingelseskommando" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "uventet udtryk \"%s\" i betingelseskommando" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "uventet udtryk \"%d\" i betingelseskommando" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntaksfejl nær uventet udtryk \"%s\"" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntaksfejl nær \"%s\"" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "syntaksfejl: uventet slutning på fil" + +#: parse.y:6151 +msgid "syntax error" +msgstr "syntaksfejl" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Brug \"%s\" for at forlade skallen.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "uventet EOF mens der ledtes efter samhørende \")\"" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: funktion \"%s\" ikke fundet" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: dårligt mellemled \"%d\"" + +#: print_cmd.c:375 +#, fuzzy, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "%d: ugyldig filbeskrivelse: %s" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: \"%c\": ugyldigt formateringstegn" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "fil-deskriptor uden for interval" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: tvetydig videresendelse" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: kan ikke overskrive eksisterende fil" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: begrænset: kan ikke videresende output" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "kan ikke danne midlertidig fil til here-dokument: %s" + +#: redir.c:223 +#, fuzzy, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: kan ikke tildele liste til arrayelementer" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/vært/port ikke understøttet uden netværk" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "videresendelsesfejl: kan ikke duplikere fd" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "kan ikke finde /tmp, opret venligst mappen!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp skal være et gyldigt mappenavn" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: ugyldigt tilvalg" + +# Har ladet nodelay stå, idet jeg gætter på at det er et navn +#: shell.c:1343 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "kan ikke nulstille \"nodelay\"-tilstand for fd %d" + +# Har ladet nodelay stå, idet jeg gætter på at det er et navn +#: shell.c:1354 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "kan ikke nulstille \"nodelay\"-tilstand for fd %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: er en mappe" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Jeg har ikke noget navn!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, version %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Brug:\t%s [langt GNU-tilvalg] [tilvalg] ...\n" +"\t%s [langt GNU-tilvalg] [tilvalg] skript-fil ...\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "Lange GNU-tilvalg:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Skal-tilvalg:\n" + +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD eller -c kommando eller -O shopt_option\t\t(kun programkald)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\tTilvalg -%s eller -o\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Skriv \"%s -c \"help set\"\" for at få mere information om skaltilvalg.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Skriv \"%s -c help\" for at få mere information om indbyggede " +"skalkommandoer.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Brug kommandoen \"bashbug\" til at rapportere fejl.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: ugyldig handling" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Falsk signal" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Læg på" + +#: siglist.c:55 +msgid "Interrupt" +msgstr "Afbryd" + +#: siglist.c:59 +msgid "Quit" +msgstr "Afslut" + +#: siglist.c:63 +msgid "Illegal instruction" +msgstr "Ugyldig instruktion" + +#: siglist.c:67 +msgid "BPT trace/trap" +msgstr "BPT-spor/fang" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "ABORT-instruktion" + +#: siglist.c:79 +msgid "EMT instruction" +msgstr "EMT-instruktion" + +#: siglist.c:83 +msgid "Floating point exception" +msgstr "Kommatalsundtagelse" + +#: siglist.c:87 +msgid "Killed" +msgstr "Slået ihjel" + +#: siglist.c:91 +msgid "Bus error" +msgstr "Bus-fejl" + +#: siglist.c:95 +msgid "Segmentation fault" +msgstr "Segmenteringsfejl" + +#: siglist.c:99 +msgid "Bad system call" +msgstr "Ugyldigt systemkald" + +#: siglist.c:103 +msgid "Broken pipe" +msgstr "Ødelagt datakanal" + +#: siglist.c:107 +msgid "Alarm clock" +msgstr "Alarmklokke" + +#: siglist.c:111 +msgid "Terminated" +msgstr "Afsluttet" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "Presserende IO-forhold" + +#: siglist.c:119 +msgid "Stopped (signal)" +msgstr "Stoppet (signal)" + +#: siglist.c:127 +msgid "Continue" +msgstr "Fortsæt" + +#: siglist.c:135 +msgid "Child death or stop" +msgstr "Død eller stop af underproces" + +#: siglist.c:139 +msgid "Stopped (tty input)" +msgstr "Stoppet (tty-input)" + +#: siglist.c:143 +msgid "Stopped (tty output)" +msgstr "Stoppet (tty-output)" + +#: siglist.c:147 +msgid "I/O ready" +msgstr "I/O klar" + +#: siglist.c:151 +msgid "CPU limit" +msgstr "CPU-grænse" + +#: siglist.c:155 +msgid "File limit" +msgstr "Filgrænse" + +#: siglist.c:159 +msgid "Alarm (virtual)" +msgstr "Alarm (virtuel)" + +#: siglist.c:163 +msgid "Alarm (profile)" +msgstr "Alarm (profil)" + +#: siglist.c:167 +msgid "Window changed" +msgstr "Vindue ændret" + +# I fejlrapport for at få meningen +#: siglist.c:171 +msgid "Record lock" +msgstr "Optag lås" + +#: siglist.c:175 +msgid "User signal 1" +msgstr "Brugersignal 1" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Brugersignal 2" + +# Fejlrapport +#: siglist.c:183 +msgid "HFT input data pending" +msgstr "HFT-inputdata afventer" + +#: siglist.c:187 +msgid "power failure imminent" +msgstr "strømsvigt nært forestående" + +#: siglist.c:191 +msgid "system crash imminent" +msgstr "systemnedbrud nært forestående" + +#: siglist.c:195 +msgid "migrate process to another CPU" +msgstr "flyt proces til en anden CPU" + +#: siglist.c:199 +msgid "programming error" +msgstr "programmeringsfejl" + +#: siglist.c:203 +msgid "HFT monitor mode granted" +msgstr "HFT-skærmtilstand tildelt" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "HFT-skærmtilstand trukket tilbage" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "HFT-lydsekvens er afsluttet" + +#: siglist.c:215 +msgid "Information request" +msgstr "Informationsforespørgsel" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Ukendt signal #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "dårlig udskiftning: ingen lukkende \"%s\" i %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: kan ikke tildele liste til arrayelementer" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "kan ikke lave datakanal (pipe) til procesudskiftning" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "kan ikke danne underproces til procesudskiftning" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "kan ikke åbne navngiven datakanal (pipe) %s til læsning" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "kan ikke åbne navngiven datakanal (pipe) %s til skrivning" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "kan ikke duplikere navngiven datakanal (pipe) %s som %d" + +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "dårlig udskiftning: ingen lukkende \"`\" i %s" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "kan ikke danne datakanal (pipe) til kommandoudskiftning" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "kan ikke danne underproces til kommandoudskiftning" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: kan ikke duplikere datakanal (pipe) som fd 1" + +#: subst.c:7082 subst.c:10252 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%d: ugyldig filbeskrivelse: %s" + +# -c Specify the number of lines read between each call to callback. +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: ugyldigt antal linjer" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "\"%s\": ugyldigt tastetildelingsnavn" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter null eller ikke indstillet" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter null eller ikke indstillet" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: understreng-udtryk < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: dårlig udskiftning" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: kan ikke tildele på denne måde" + +#: subst.c:10111 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "dårlig udskiftning: ingen lukkende \"`\" i %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "intet match: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "argument forventet" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: heltalsudtryk forventet" + +#: test.c:265 +msgid "`)' expected" +msgstr "\")\" forventet" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "\")\" forventet, fandt %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: binær operator forventet" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unær operator forventet" + +#: test.c:896 +msgid "missing `]'" +msgstr "manglende \"]\"" + +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaksfejl: \";\" uventet" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "ugyldigt signalnummer" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: dårlig værdi i trap_list[%d]: %p" + +#: trap.c:416 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: signalhåndtering er SIG_DFL, gensender %d (%s) til mig " +"selv" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: ugyldigt signal %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "fejl under importering af funktionsdefinition for \"%s\"" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "skalniveau (%d) for højt, genindstiller til 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: ingen funktionskontekst ved nuværende navneområde" + +#: variables.c:2661 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: kan ikke tildele liste til arrayelementer" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: ingen funktionskontekst ved nuværende navneområde" + +#: variables.c:4757 +#, fuzzy, c-format +msgid "%s has null exportstr" +msgstr "%s: parameter null eller ikke indstillet" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "ugyldigt tegn %d i exportstr for %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "intet \"=\" i exportstr for %s" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: hoved af shell_variables er ikke en funktionskontekst" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: ingen global_variables-kontekst" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: hoved af shell_variables er ikke et midlertidigt miljønavnerum" + +#: variables.c:6400 +#, fuzzy, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: kan ikke åbne: %s" + +#: variables.c:6405 +#, fuzzy, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%d: ugyldig filbeskrivelse: %s" + +#: variables.c:6450 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s udenfor rækkevidde" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Ophavsret (C) 2009 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licens GPLv3+: GNU GPL version 3 eller senere \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, version %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Dette er fri software; du kan frit ændre eller redistribuere det.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Der er INGEN GARANTI i det omfang loven tillader.\n" + +#: xmalloc.c:93 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: kan ikke allokere %lu bytes (%lu bytes allokeret)" + +#: xmalloc.c:95 +#, fuzzy, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "xmalloc: kan ikke allokere %lu bytes" + +#: xmalloc.c:165 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "xmalloc: %s:%d: kan ikke allokere %lu bytes (%lu bytes allokeret)" + +#: xmalloc.c:167 +#, fuzzy, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "xmalloc: %s:%d: kan ikke allokere %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [navn[=værdi] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] navn [navn ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m tastetildeling] [-f filnavn] [-q navn] [-u navn] [-r " +"nøglesek] [-x nøglesek:skalkommando] [nøglesek:readline-funktion eller " +"readline-kommando]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|-P] [mappe]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] kommando [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFilrtux] [-p] [navn[=værdi] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFilrtux] [-p] navn[=værdi] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [tilvalg] navn[=værdi] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filnavn] [navn ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts tilvalgsstreng navn [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a navn] [kommando [argumenter ...]] [videresendelse ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +# pat=rep betyder højst sandsynligt mønster=regulært udtryk, men jeg kan ikke finde på nogen 3-bogstavsudtryk som jeg man bruge for de to ting, som jeg synes er let forståelige derfor har jeg ladet dem stå +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e ename] [-lnr] [første] [sidste] eller fc -s [pat=rep] [kommando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p stinavn] [-dt] [navn ...]" + +#: builtins.c:119 +#, fuzzy +msgid "help [-dms] [pattern ...]" +msgstr "help [-ds] [mønster ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d forskydning] [n] eller history -anrw [filnavn] eller " +"history -ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] eller jobs -x kommando [arger]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... eller kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +#, 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 adskil] [-i tekst] [-n ntegn] [-p prompt] [-t " +"tidsgrænse] [-u fd] [navn ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o tilvalgsnavn] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [navn ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [navn[=værdi] ...] eller export -p" + +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-af] [navn[=værdi] ...] eller readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filnavn [argumenter]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filnavn [argumenter]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [udtryk]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] navn [navn ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [grænse]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [tilstand]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAVN [in ORD ... ] ; do KOMMANDOER; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( udtryk1; udtryk2; udtryk3 )); do KOMMANDOER; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAVN [in ORD ... ;] do KOMMANDOER; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] datakanal" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case ORD in [MØNSTER [| MØNSTER]...) KOMMANDOER ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if KOMMANDOER; then KOMMANDOER; [ elif KOMMANDOER; then KOMMANDOER; ]... " +"[ else KOMMANDOER; ] fi" + +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while KOMMANDOER; do KOMMANDOER; done" + +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until KOMMANDOER; do KOMMANDOER; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAVN] kommando [videresendelser]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function navn { KOMMANDOER ; } eller navn () { KOMMANDOER ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMMANDOER ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( udtryk ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ udtryk ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Navn og betydning af nogle skalvariable" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | mappe]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [indstnavn ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [argumenter]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-o valgmuligheder] [-A handling] [-G " +"globmønst] [-W ordliste] [-F funktion] [-C kommando] [-X filtermønst] [-P " +"præfiks] [-S suffiks] [navn ...]" + +#: builtins.c:235 +#, fuzzy +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 valgmuligheder] [-A handling] [-G globmønst] [-" +"W ordliste] [-F funktion] [-C kommando] [-X filtermønst] [-P præfiks] [-S " +"suffiks] [ord]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o valgmulighed] [navn ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n antal] [-O oprindelse] [-s antal] [-t] [-u fd] [-C tilbagekald] " +"[-c kvantum] [array]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n antal] [-O oprindelse] [-s antal] [-t] [-u fd] [-C " +"tilbagekald] [-c kvantum] [array]" + +#: builtins.c:256 +#, 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 "" +"Definer eller vis aliasser.\n" +" \n" +" Uden argumenter vil \"alias\" udskrive en liste af aliasser på den\n" +" genanvendelige form alias NAVN=VÆRDI til standardoutput.\n" +" \n" +" Ellers vil der blive defineret et alias for hvert NAVN, som der er an-\n" +" givet en VÆRDI til. Et efterfølgende mellemrum i VÆRDI vil medføre,\n" +" at det næste ord vil blive kontrolleret for alias-udskiftning, når\n" +" aliasset udvides.\n" +" \n" +" Tilvalg:\n" +" -p\tUdskriver alle definerede aliasser i et genanvendelig format\n" +" \n" +" Afslutningsstatus:\n" +" alias returnerer sand med mindre der gives et NAVN som der ikke er\n" +" defineret noget alias for." + +#: builtins.c:278 +#, 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 "" +"Fjern hvert NAVN fra listen af definerede aliasser.\n" +" \n" +" Tilvalg:\n" +" -a\tfjern alle aliasdefinitioner.\n" +" \n" +" Returner succes med mindre et NAVN ikke er et eksisterende alias." + +#: builtins.c:291 +#, 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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Indstil Readline-tastebindinger og variable.\n" +"\n" +" Bind en tastsekvens til en Readline-funktion eller en makro, eller " +"indstil\n" +" en Readline-variabel. Syntaksen uden tilvalg er ækvivalent til den som\n" +" bruges i ~/.inputrc, men skal gives som et enkelt argument:\n" +" f.eks. bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Tilvalg:\n" +" -m tastetildel Brug TASTETILDEL som tastetildeling for hele \n" +" varigheden af denne kommando. Accepterede " +"tastetildel-\n" +" ingsnavne er emacs, emacs-standard, emacs-meta,\n" +" emacs-ctlx, vi, vi-move, vi-command og vi-insert.\n" +" -l Vis liste af funktioner.\n" +" -P Vis liste af funktionsnavne og bindinger.\n" +" -p Vis liste af funktionsnavne og bindinger på en " +"form\n" +" som kan genbruges som input.\n" +" -S Vis tastesekvenser som udfører makroer og deres " +"værdier\n" +" -s Vis tastesekvenser som udfører makroer og deres " +"værdier\n" +" på en form som kan genbruges som inddata.<\n" +" -V Vis variabelnavne og -værdier\n" +" -v Vis variabelnavne og -værdier på en form som kan \n" +" genbruges som inddata.\n" +" -q funktionsnavn Forespørg hvilke taster der udfører den navngivne \n" +" funktion.\n" +" -u funktionsnavn Løsn alle taster som er bundet til den navngivne\n" +" funktion.\n" +" -r tastesekv Fjern bindingen for TASTESEKV.\n" +" -f filnavn Indlæs tastetildeling fra FILNAVN.\n" +" -x tastesekv:skalkommando\tMedfører at SKALKOMMANDO udføres når \n" +" \t\t\t\tTASTESEKV trykkes.\n" +" \n" +" Afslutningsstatus:\n" +" bind returnerer 0 med mindre et ugenkendt tilvalg angives, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:330 +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 "" +"Afslut for-, while- eller until-løkker.\n" +" \n" +" Afslut en FOR, WHILE eller UNTIL-løkke. Hvis N er angivet, afbrydes N\n" +" indlejrede løkker.\n" +" \n" +" Afslutningsstatus:\n" +" Afslutningsstatussen er 0 med mindre N ikke er større end eller lig med " +"1." + +#: builtins.c:342 +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 "" +"Genoptag for-, while- eller until-løkke.\n" +" \n" +" Genoptager den næste iteration af den omsluttende FOR-, WHILE- eller \n" +" UNTIL-løkke. Hvis N er angivet, genoptages fra den N'te indesluttende " +"løkke.\n" +" \n" +" Afslutningsstatus:\n" +" Afslutningsstatussen er 0 med mindre N ikke er større end eller lig med " +"1." + +#: builtins.c:354 +#, fuzzy +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 "" +"Eksekver en skal-indbygget funktion.\n" +" \n" +" Eksekver en SKAL-INDBYGGET med argumenterne ARGer uden at udføre " +"kommando-\n" +" opslag. Dette er nyttigt, hvis du ønsker et reimplementere en skal-\n" +" indbygget som en skalfunktion, men har brug for at eksekvere den " +"indbyggede\n" +" inden i funktionen.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatussen for den SKAL-INDBYGGEDE, eller falsk " +"hvis\n" +" SKAL-INDBYGGET ikke er en skal-indbygget.." + +#: builtins.c:369 +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 "" +"Returnerer konteksten af det nuværende underrutinekald.\n" +"\n" +" Uden UDTRYK returneres \"$line $filename\". Med UDTRYK returneres\n" +" \"$line $subroutine $filename\". Den ekstra information\n" +" kan bruges til at give at stakspor.\n" +"\n" +" Værdien af UDTRYK angiver hvor mange kalderammer der skal gås tilbage\n" +" fra den nuværende. Toprammen er ramme 0.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 med mindre skallen ikke eksekverer en skalfunktion eller " +"hvis\n" +" UDTRYK er ugyldigt." + +#: builtins.c:387 +#, 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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Ændrer skallens aktuelle mappe.\n" +" \n" +" Ændrer den nuværende mappe til MAPPE. Variablen HOME er standardmappen.\n" +" Variablen CDPATH definerer søgestien for mappen som indeholder DIR.\n" +" \n" +" Variablen CDPATH definerer søgestien for den mappe som indeholder " +"MAPPE.\n" +" Alternative mappenavne i CDPATH er separeret af et kolon (:). Et\n" +" null-mappenavn er det samme som den nuværende mappe. Hvis MAPPE " +"begynder\n" +" med en skråstreg (/) bruges CDPATH ikke.\n" +"\n" +" Hvis mappen ikke findes og skalvariablen \"cdabel_vars\" er indstillet,\n" +" vil det blive antaget at ordet er et variabelnavn. Hvis variablen har " +"en\n" +" værdi, så bruges denne som MAPPE.\n" +"\n" +" Tilvalg:\n" +" -L\tgennemtving at symbolske lænker følges\n" +" -P\tbrug den fysiske mappestruktur uden at følge symbolske lænker\n" +" \n" +" Som standard følges symbolske lænker, som om \"-L\" var valgt.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 hvis mappen ændres, ellers noget forskellig fra 0." + +#: builtins.c:425 +#, fuzzy +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" +" \t\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 "" +"Udskriver navnet for den aktuelle mappe.\n" +" \n" +" Tilvalg:\n" +" -L\tudskriv værdien af $PWD hvis den indeholder den aktuelle mappe\n" +" -P\tudskriv den fysiske mappe uden nogen symbolske lænker\n" +" \n" +" Som standard vil \"pwd\" opføre sig som om \"-L\" var angivet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 0 med mindre der er angivet et ugyldigt tilvalg, eller hvis " +"den\n" +" aktuelle mappe ikke kan læses." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null-kommando.\n" +" \n" +" Ingen effekt, kommandoen gør intet.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes altid succesfuldt." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Returnerer et succesfuldt resultat.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes altid succesfuldt." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Returnerer et mislykket resultat.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes altid mislykket." + +#: builtins.c:471 +#, fuzzy +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Eksekverer en simpel kommando eller viser information om kommandoer.\n" +" \n" +" Kører KOMMANDO med ARGer med undertrykkelse af skalfunktionsopslag, " +"eller\n" +" vis information om de angivne KOMMANDOER. Kan bruges til at køre " +"kommandoer\n" +" fra disken, når en funktion af samme navn eksisterer.\n" +" \n" +" Tilvalg:\n" +" -p\tbrug en standardværdi for PATH som med garanti vil finde alle\n" +" \tstandardværktøjerne\n" +" -v\tudskriv en beskrivelse af KOMMANDO, i stil med den skal-\n" +" \tindbyggede \"type\"\n" +" -V\tUdskriv en større beskrivelse af hver kommando\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatus fra KOMMANDO eller mislykket hvis KOMMANDO\n" +" ikke findes." + +#: builtins.c:490 +#, 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Indstil variabelværdier og -attributter\n" +" \n" +" Erklær variable og giv dem attributter. Hvis der ikke angives nogen " +"NAVNE,\n" +" så angives attributter og værdier for alle variable.\n" +" \n" +" Tilvalg:\n" +" -f\tbegræns handling eller visning til funktionsnavne og\n" +" \tdefinitioner\n" +" -F\tbegræns visning til funktionsnavne (inklusive linjenummer og\n" +" \tkildekodefil under fejlsøgning)\n" +" -p\tvis attributter og værdi for hvert NAVN\n" +" \n" +" Tilvalg som indstiller attributter:\n" +" -a\tfor at gøre NAVNE til indekserede arrays (hvis understøttet)\n" +" -A\tfor at gøre NAVNE til associerede arrays (hvis understøttet)\n" +" -i\tfor at give NAVNE \"integer\"-attributten\n" +" -l\tkonverter NAVNE til små bogstaver ved tildeling\n" +" -t\tfor at give NAVNE \"trace\"-attributten\n" +" -u\tkonverter NAVNE til store bogstaver ved tildeling\n" +" -x\tfor at eksportere NAVNE\n" +" \n" +" Brug \"+\" i stedet for \"-\" for at slå den pågældende attribut fra.\n" +" \n" +" Der vil blive udført en aritmetisk evaluering (se \"let\"-kommandoen) " +"af \n" +" variable med integer-attributten, når de tildeles en værdi.\n" +" \n" +" Når de bliver brugt i en funktion, kan \"declare\" bruges til at gøre " +"NAVNE\n" +" lokale, ligesom med \"local\"-kommandoen.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Indstil variabelværdier og -attributter.\n" +" \n" +" Forældet. Læs i \"help declare\"." + +#: builtins.c:540 +#, fuzzy +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definer lokale variable.\n" +" \n" +" Opret en lokal variabel med navnet NAVN og tildel den en værdi. TILVALG " +"kan\n" +" være alle tilvalg som accepteres af \"declare\".\n" +" \n" +" Lokale variable kan kun bruges inden i en funktion; de er kun synlige, " +"for\n" +" den funktion de er defineret i og dens underfunktioner.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, hvis der\n" +" opstår en fejl, eller hvis skallen ikke eksekverer en funktion." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv argumenter til standardoutput.\n" +" \n" +" Vis ARGer fra standardoutput, efterfulgt af et nylinjetegn.\n" +" \n" +" Tilvalg:\n" +" -n vedhæft ikke nylinjetegn\n" +" -e aktiver fortolkning af de følgende undvigesekvenser med\n" +" omvendt skråstreg\n" +" -E\tundertryk eksplicit fortolkningen af undvigesekvenser med\n" +" \tomvendt skråstreg\n" +"\n" +" \"echo\" fortolker følgende undvigesekvenser med omvendt skråstreg\n" +" \\a\talarm (klokke)\n" +" \\b\ttilbageryk (backspace)\n" +" \\c\tundertryk yderligere output\n" +" \\e\tescape-tegn\n" +" \\f\tsideskift (form feed)\n" +" \\n\tny linje\n" +" \\r\tlinjeskift (carrige return)\n" +" \\t\thorisontalt tab\n" +" \\v\tvertikalt tab\n" +" \\\\\tomvendt skråstreg\n" +" \\0nnn\tdet tegn hvis ASCII-kode er NNN (oktalt). NNN kan have 0-3\n" +" \toktale cifre\n" +" \\xHH\tdet 8 bit tegn hvis værdi er HH (heksadecimalt). HH kan have\n" +" \tet eller to heksadecimale cifre\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der opstår en skrivefejl." + +#: builtins.c:597 +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 argumenter til standardoutput.\n" +" \n" +" Vis ARGer til standard output, efterfulgt af et nylinjetegn.\n" +" \n" +" Tilvalg:\n" +" -n\tvedhæft ikke et nylinjetegn\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der opstår en skrivefejl." + +#: builtins.c:612 +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 "" +"Aktiver og deaktiver skal-indbyggede.\n" +" \n" +" Aktiverer og deaktiverer indbyggede skalkommandoer. Deaktivering " +"tillader\n" +" dig at udføre diskkommandoer, som har det sammen navn som en skal-" +"indbygget\n" +" uden at bruge et fuldt stinavn.\n" +" \n" +" Tilvalg:\n" +" -a\tudskriver en liste over indbyggede, uanset om de er slået til\n" +" -n\tdeaktiver hvert NAVN eller vis en liste af deaktiverede funk-\n" +" \ttioner\n" +" -p\tudskriv en liste over indbyggede i et genanvendeligt format\n" +" -s\tudskriv kun navne for \"specielle\" Posix-indbyggede\n" +" \n" +" Tilvalg som kontrollerer dynamisk indlæsning:\n" +" -f\tIndlæs indbygget NAVN fra det delte objekt FILNAVN\n" +" -d\tFjern en indbygget indlæst med -f\n" +" \n" +" Uden tilvalg bliver hvert NAVN aktiveret. \n" +" \n" +" Skriv \"enable -n test\" for at bruge den \"test\" som findes i $PATH, i " +"stedet\n" +" for den indbyggede version.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre NAVN ikke er en skal-indbygget eller hvis\n" +" der opstår en fejl." + +#: builtins.c:640 +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 "" +"Eksekver argumenter som en skalkommando.\n" +" \n" +" Kombinerer ARGer til en enkelt streng, brug resultatet som input til " +"skallen\n" +" og udfør den resulterende kommando.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer kommandoens afslutningsstatus eller succes hvis kommandoen " +"er\n" +" null." + +#: builtins.c:652 +#, 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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Fortolkning af tilvalgsargumenter\n" +" \n" +" Getopts bruges af skalprocedurer til at tolke positionsparametre og\n" +" tilvalg.\n" +" \n" +" OPTSTRING indeholder de tilvalg, som skal genkendes. Hvis et bogstav\n" +" følges af et kolon, forventes det at tilvalget har et argument, som\n" +" skal adskilles fra tilvalget med et mellemrum.\n" +" \n" +" Hver gang getopts kaldes, vil den placere det næste tilvalg i skal-\n" +" variablen $name, og initialisere $name, hvis den ikke eksisterer, og\n" +" putte indekset for det næste argument, som skal behandles, ind i\n" +" skalvariablen OPTIND. OPTIND initialiseres til 1 hver gang skallen\n" +" eller et skalskript kaldes. Hvis tilvalget kræver et argument, vil\n" +" getopts placere argumentet i skalvariablen OPTARG.\n" +" \n" +" getopts rapporterer fejl på en af to forskellige måder. Hvis det\n" +" første tegn i OPTSTRENG er et kolon, vil getopts bruge stille fejl-\n" +" rapportering. I denne tilstand vil fejlbeskeder ikke blive\n" +" udskrevet. Hvis der angives et ugyldigt tilvalg, vil getopts placere\n" +" tilvalgstegnet i OPTARG. Hvis et påkrævet argument ikke bliver\n" +" fundet, vil getopts placere et \":\" i NAVN og sætte OPTARG til det\n" +" fundne tilvalgstegn. Hvis getopts ikke er i stille tilstand og der\n" +" angives et ugyldigt tilvalg, vil getopts placere \"?\" i NAVN og\n" +" fjerne (unset) OPTARG. Hvis et påkrævet argument ikke findes, vil\n" +" der blive placeret et \"?\" i NAVN og OPTARG vil blive fjernet\n" +" (unset) og en diagnosebesked vil blive udskrevet.\n" +" \n" +" Hvis skalvariablen OPTERR har værdien 0, vil udskrivningen af fejl-\n" +" beskeder blive slået fra i getopts, også selv om det første tegn i\n" +" OPTSTRING ikke er et kolon. OPTERR har værdien 1 som standard.\n" +" \n" +" Normalt vil getopts tolke de positionelle parametre ($0 - $9), men\n" +" hvis der angives flere argumenter end dette, vil de blive tolket i\n" +" stedet for.\n" +" \n" +" Afslutningsstatus\n" +" Returnerer succes hvis et tilvalg findes, fejler hvis afslutningen\n" +" af tilvalgene nås eller hvis der opstår en fejl." + +#: builtins.c:694 +#, fuzzy +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Erstat skallen med den angivne kommando.\n" +" \n" +" Eksekver KOMMANDO og erstat derved skallen med det angivne program.\n" +" ARGUMENTER bliver argumenter til KOMMANDO. Hvis KOMMANDO ikke angives " +"vil\n" +" alle omdirigeringer træde i kraft i den aktuelle skal.\n" +" \n" +" Tilvalg:\n" +" -a\tnavn\tangiv NAVN som det nulte argument til KOMMANDO\n" +" -c\t\teksekver KOMMANDO i et tomt miljø\n" +" -l\t\tbrug en bindestreg som det nulte argument til KOMMANDO\n" +" \n" +" Hvis kommandoen ikke kan eksekveres, vil ikke-interaktive skaller " +"afsluttes,\n" +" med mindre skal-tilvalget \"execfail\" angives\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes succesfuldt med mindre KOMMANDO ikke kan findes, eller hvis " +"der\n" +" opstår en omdirigeringsfejl." + +#: builtins.c:715 +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 "" +"Afslut skallen.\n" +" \n" +" Afslut skallen med status N. Hvis N udelades vil afslutningsstatus\n" +" blive den samme som sidst eksekverede kommando." + +#: builtins.c:724 +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 "" +"Afslut en logindskal.\n" +" \n" +" Afslutter en logindskal med afslutningsstatus N. Returnerer en fejl, " +"hvis\n" +" den ikke eksekveres i en logindskal." + +#: builtins.c:734 +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 "" +"Vis og eksekver kommandoer fra historiklisten.\n" +" \n" +" fc bruges til at vise, redigere og geneksekvere kommandoer fra " +"historikken.\n" +" FØRSTE og SIDSTE kan være numre som specificerer et interval, eller " +"FØRSTE\n" +" kan være en streng, hvilket vil resultere i den nyeste kommando som\n" +" begynder med den streng.\n" +" \n" +" Tilvalg: \n" +" -e ENAVN\tvælger hvilket tekstredigeringsprogram, der vil bliver " +"brugt.\n" +" Forvalget er FCEDIT, herefter EDITOR og til sidst \"vi\".\n" +" -l \tbetyder vis linjer i stedet for at redigere dem.\n" +" -n\tbetyder at linjenumre ikke vises.\n" +" -r\tbetyder at rækkefølgen af linjer vendes (så nye er først).\n" +" \n" +" Med \"fc -s [pat=rep ...] [command]\"-formatet vil kommandoen blive " +"gen-\n" +" eksekveret efter substitutionen GAMMEL=NY er foretaget.\n" +" \n" +" Et nyttigt alias er r=\\\"fc -s\\\", som vil medføre at den sidste " +"kommando\n" +" der begynder med \\\"cc\\\" vil afvikles, når der skrives \\\"r cc\\\", " +"og at\n" +" den seneste kommando afvikles, når der skrives \\\"r\\\".\n" +"\n" +" Afslutningsstatus.\n" +" Returnerer succes eller status af den eksekverede kommando, ikke-nul " +"hvis\n" +" der opstod en fejl." + +#: builtins.c:764 +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 "" +"Flyt jobs til forgrunden.\n" +" \n" +" Placer JOB_SPEC i forgrunden og gør det til det aktuelle job. Hvis\n" +" JOB_SPEC ikke findes, vil skallens opfattelse af, hvad der er det " +"nuværende\n" +" job, blive brugt.\n" +" \n" +" Afslutningsstatus:\n" +" Status af den kommando der placeres i forgrunden eller mislykket hvis " +"der\n" +" opstår fejl." + +#: builtins.c:779 +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 "" +"Flyt jobs til baggrunden\n" +" \n" +" Placer hvert enkelt JOB_SPEC i baggrunden, som om de var startet med \n" +" \"&\". Hvis JOB_SPEC ikke findes, vil skallen opfattelse af, hvad der " +"er\n" +" det nuværende job, blive brugt.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes succesfuldt medmindre jobkontrol ikke er slået til, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:793 +#, fuzzy +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Husk og vis programplaceringer.\n" +" \n" +" Afgør og husker det fulde stinavn for hver kommando-NAVN. Hvis der ikke\n" +" gives noget argument, vil information om huskede kommandoer blive vist.\n" +" \n" +" Tilvalg:\n" +" -d\t\tglem den huskede placering for hvert NAVN\n" +" -l\t\tvis i et format som kan genanvendes\n" +" -p stinavn\tbrug STINAVN som det fulde stinavn for NAVN\n" +" -r\t\tglem alle huskede placeringer\n" +" -t\t\tudskriv den huskede placering for hvert NAVN, med NAVNet\n" +" \t\tudskrevet foran placeringen hvis flere NAVNe er angivet.\n" +" Argumenter:\n" +" NAVN\t\tDer søges efter hvert navn i $PATH og de tilføjes til\n" +" \t\tlisten af huskede kommandoer.\n" +" \n" +" Afslutningsstatus:\n" +" Afsluttes succesfuldt med mindre NAVN ikke kan findes, eller hvis der " +"angives\n" +" et ugyldig tilvalg." + +#: builtins.c:818 +#, fuzzy +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Vis information om indbyggede kommandoer.\n" +" \n" +" Viser korte sammendrag om indbyggede kommandoer. Hvis MØNSTER er " +"angivet,\n" +" vil der blive givet en detaljeret hjælp, om alle de kommandoer som " +"matcher\n" +" MØNSTER, ellers vil der blive udskrevet en liste over hjælpeemner.\n" +" \n" +" Tilvalg:\n" +" -d\tudskriver kort beskrivelse for hvert emne\n" +" -m\tviser brugsinformation i pseudo-mansideformat\n" +" -s\tvis kun en kort synopsis for hvert emne som matcher MØNSTER\n" +" \n" +" Argumenter:\n" +" MØNSTER\tMønster som specificerer et hjælpeemne\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre MØNSTER ikke kan findes, eller hvis der\n" +" angives et ugyldigt tilvalg." + +#: builtins.c:842 +#, 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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 "" +"Vis eller manipuler med historiklisten.\n" +"\n" +" Vis historikken med linjenumre. Linjer som vises med \"*\" er blevet\n" +" ændret. Argumentet N gør at kun de N sidste linjer bliver vist.\n" +" \n" +" Tilvalg:\n" +" -c\trydder historiklisten ved at slette alle elementer i den.\n" +" -d forskydning\tsletter historik-elementet ved position FORSKYDNING.\n" +" -a\tvedhæfter historiklinjer fra denne session til historikfilen.\n" +" -n\tindlæser alle linjer fra historikfilen, som ikke allerede er\n" +" \tindlæst\n" +" -r\tindlæser historikfilen og føjer dens indhold til historiklisten\n" +" -w\tskriver den nuværende historik til historikfilen og vedhæft dem\n" +" \ttil historiklisten\n" +" \n" +" -p\tudfør en historikudvidelse på hvert enkelt ARG og udskriv\n" +" \tresultatet uden at tilføje det til historikken\n" +" -s\tvedhæft ARGer til historiklisten som et enkelt element\n" +" \n" +" Hvis FILENAVN er angivet, vil den blive brugt som historikfil,\n" +" ellers vil $HISTFILE blive brugt, hvis den har en værdi og ellers\n" +" vil ~/.bash_history blive brugt.\n" +" \n" +" Hvis variablen $HISTTIMEFORMAT er indstillet og ikke er \"null\", vil " +"dens\n" +" værdi blive brugt som formatstreng til strftime(3) til formatering af\n" +" tidspunkt for hvert historikelement. Ellers vil ingen tidsstempler " +"blive\n" +" skrevet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der er angivet et ugyldig tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:879 +#, 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\tlists only processes that have changed status since the last\n" +" \t\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 "" +"Viser status af jobs.\n" +" \n" +" Viser de aktive jobs. JOBSPEC begrænser output til dette job. Uden " +"tilvalg\n" +" vil status for alle aktive jobs blive vist.\n" +" \n" +" Tilvalg:\n" +" \n" +" -l\tvis også proces-id'er ud over den normale information\n" +" -n\tviser kun de processer, som har ændret status siden sidste\n" +" \tpåmindelse\n" +" -p\tviser udelukkende proces-id'er\n" +" -r\tbegrænser uddata til kørende jobs\n" +" -s\tbegrænser uddata til stoppede jobs\n" +" \n" +" Hvis -x er givet, vil KOMMANDO blive kørt efter at alle " +"jobspecifikationer\n" +" som står i ARGer er blevet erstattet med proces-id'et for dette jobs " +"proces-\n" +" gruppeleder.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre et ugyldigt tilvalg er angivet, eller hvis " +"der\n" +" opstår en fejl. Hvis -x bruges returneres afslutningsstatus for KOMMANDO." + +#: builtins.c:906 +#, fuzzy +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" +" \t\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 "" +"Fjern jobs fra den aktuelle skal.\n" +" \n" +" Fjerner hvert JOBSPEC-argument, fra tabellen over aktive jobs. Hvis der " +"ikke\n" +" angives nogen JOBSPEC bruges skallens opfattelse af det aktuelle job.\n" +" \n" +" Tilvalg:\n" +" -a\tfjern alle jobs hvis JOBSPEC ikke er angivet\n" +" -h\tmarker hvert JOBSPEC således at SIGHUP ikke sendes til jobbet\n" +" \thvis skallen modtager SIGHUP\n" +" -r\tfjern kun kørende jobs\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre et ugyldigt tilvalg eller JOBSPEC angives." + +#: builtins.c:925 +#, 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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 et signal til et job.\n" +" \n" +" Send signalet SIGSPEC eller SIGNUM til processen, som er angivet ved " +"PID\n" +" eller JOBSPEC. Hvis hverken SIGSPEC eller SIGNUM er angivet antages " +"SIGTERM.\n" +" \n" +" -s sig\tSIG er et signalnavn\n" +" -n sig\tSIG er et signalnummer\n" +" -l\tudskriver signalnavnene. Hvis der står argumenter efter \"-l\",\n" +" \tantages det, at de er signalnumre hvis tilhørende signalnavne skal\n" +" udskrives.\n" +" \n" +" Der er to grunde til at kill er en indbygget skal-kommando: Det " +"tillader\n" +" at der kan bruges job-id'er i stedet for proces-id'er og tillader at " +"stoppe\n" +" processer, selvom du har nået grænsen for, hvor mange processer du\n" +" kan oprette.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre et ugyldigt tilvalg er angivet, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:949 +#, 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 "" +"Evaluer aritmetiske udtryk.\n" +" \n" +" Hvert ARG er et aritmetisk udtryk som skal evalueres. Evalueringen\n" +" bliver foretaget i heltal med fast-bredde, uden check for overløb,\n" +" dog vil division med 0 blive fanget og markeret som en fejl. Den\n" +" følgende liste af operatorer er vist i grupper med samme evaluerings-\n" +" prioritet. Grupperne er vist med faldende prioritet.\n" +" \n" +" \tid++, id--\tpost-forøgelse og -formindskelse af variabel\n" +" \t++id, --id\tpræ-forøgelse og -formindskelse af variabel\n" +" \t-, +\t\tunær minus og plus\n" +" \t!, ~\t\tlogisk og bitvis negation\n" +" \t**\t\teksponentiering\n" +" \t*, /, %\t\tmultiplikation, division, rest\n" +" \t+, -\t\taddition, subtraktion\n" +" \t<<, >>\t\tvenstre og højre bitvis skift\n" +" \t<=, >=, <, >\tsammenligning\n" +" \t==, !=\t\tlighed, ulighed\n" +" \t&\t\tbitvis AND (OG)\n" +" \t^\t\tbitvis XOR (EKSKLUSIVT ELLER)\n" +" \t|\t\tbitvis OR (ELLER)\n" +" \t&&\t\tlogisk AND (OG)\n" +" \t||\t\tlogisk OR (ELLER)\n" +" \texpr ? expr : expr\n" +" \t\t\tbetingelsesoperator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\ttildeling\n" +" \n" +" Skalvariable er tilladt som operander. Variablens navn vil blive\n" +" erstattet af dens værdi (tilpasset så den er et heltal med fast-bredde)\n" +" indeni udtrykket. Variablen skal have sin heltals-attribut slået til\n" +" for, at den kan bruges i et udtryk.\n" +" \n" +" Operatorer vil blive evalueret efter prioritet. Underoperatorer i\n" +" parenteser bliver evalueret først og kan tilsidesætte de ovenstående\n" +" prioriteter.\n" +" \n" +" Afslutningsstatus:\n" +" Hvis det sidste ARG evalueres til 0, vil \"let\" returnere 1, ellers\n" +" returneres 0." + +#: builtins.c:994 +#, 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. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Læs en linje fra standardinput og del den op i felter.\n" +" \n" +" En linje vil blive læst fra standardinput, eller fra fildeskriptor FD " +"hvis\n" +" tilvalget -u er givet. Linjen vil blive delt ind i felter som med ord-\n" +" opdeling Det første ord blive tildelt det første NAVN, det andet ord " +"til \n" +" det andet NAVN osv. og de tilbageblivende ord vil blive tildelt det " +"sidste\n" +" NAVN. Kun de tegn som findes i $IFS vil blive genkendt som " +"ordadskillere.\n" +"\n" +" Hvis der ikke er angivet nogle NAVNe, vil linjen blive gemt i REPLY-\n" +" variablen.\n" +"\n" +" Tilvalg:\n" +" -a array\tde indlæste ord blive tildelt fortløbende indeks i\n" +" \t\tARRAY startende ved 0\n" +" -d adskil\tfortsæt indtil det første tegn i ADSKIL bliver læst, i " +"stedet\n" +" \t\tfor ved nylinjetegn\n" +" -e\tbrug Readline til at indhente linje fra en interaktiv skal\n" +" -i tekst\tBrug TEKST som den indledende tekst til Readline\n" +" -n ntegn\treturnerer efter at have læst NTEGN tegn i stedet for at " +"vente\n" +" \t\tpå et nylinjetegn\n" +" -p prompt\tudskriv strengen PROMPT, uden et nylinjetegn, før der " +"forsøges på\n" +" \t\tat læse\n" +" -r\ttillad ikke at omvendte skråstreger undviger tegn\n" +" -s\tudskriv (echo) ikke input som kommer fra en terminal\n" +" -t tidsgrænse\tindstil tidsudløb og returner fejl, hvis der ikke kan\n" +" \t\t\tlæses en komplet linje indenfor TIDSGRÆNSE sekunder.\n" +" \t\t\tVærdien af variablen TMOUT er standardtidsudløbet.\n" +" \t\t\tTIDSGRÆNSE kan være et kommatal. Hvis TIDSGRÆNSE er 0,\n" +" \t\t\tvil read kun returnere succes hvis der er input\n" +" \t\t\ttilgængelig ved den angivne fildeskriptor. Fejlstatus\n" +" \t\t\tvil være større end 128 hvis tidsudløb indtræffer.\n" +" -u fd\tlæs fra fildeskriptoren FD i stedet for standardinput\n" +" \n" +" Afslutningsstatus:\n" +" Returkoden vil være nul, med mindre slut-på-fil nås, tidsudløb " +"indtræffer,\n" +" eller hvis en ugyldig fildeskriptor gives som argument til -u." + +#: builtins.c:1042 +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 "" +"Returner fra en skalfunktion.\n" +" \n" +" Gør at en funktion eller et kildeskript afslutter med en returværdi, som " +"er\n" +" angivet med N. Hvis N udelades, vil returstatussen være den samme som " +"værdien\n" +" fra sidste kommande, som blev eksekveret inde i funktionen eller " +"skriptet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer N, eller fejl hvis skallen ikke er i færd med at eksekvere " +"en\n" +" funktion eller et skript." + +#: builtins.c:1055 +#, 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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"Indstiller eller afinitialiserer (unset) skaltilvalg og positionsparametre.\n" +" \n" +" Ændr værdien af skalattributter og positionsparametre, eller vis navne " +"og\n" +" værdier af skalvariable.\n" +"\n" +" Tilvalg:\n" +" -a Marker variable som er ændret eller oprettet til eksport.\n" +" -b Underret om jobafslutning øjeblikkeligt.\n" +" -e Afslut øjeblikkeligt hvis en kommando afslutter med en\n" +" afslutningsstatus som ikke er nul.\n" +" -f Slå filnavngenerering fra (globbing).\n" +" -h Husk kommandoers positionen mens de slås op.\n" +" -k Overfør alle opgavens argumenter til kommandoens miljø, ikke kun " +"de\n" +" som kommer før kommandonavnet.\n" +" -m Slå jobkontrol til.\n" +" -n Læs kommandoer men eksekver dem ikke.\n" +" -o tilvalgsnavn\n" +" Indstil variablen så den passer til tilvalgsnavn:\n" +" allexport samme som -a\n" +" braceexpand samme som -B\n" +" emacs brug en linjeredigerings-grænseflade som i emacs\n" +" errexit samme som -e\n" +" errtrace samme som -E\n" +" functrace samme som -T\n" +" hashall samme som -h\n" +" histexpand samme som -H\n" +" history slå kommandohistorik til\n" +" ignoreeof skallen vil ikke afslutte ved læsning af\n" +" slut-på-fil (EOF)\n" +" interactive-comments\n" +" vis også kommentarerer ved interaktive " +"kommandoer\n" +" keyword samme som -k\n" +" monitor samme som -m\n" +" noclobber samme som -C\n" +" noexec samme som -n\n" +" noglob samme som -f\n" +" nolog accepteres på nuværende tidspunkt men har ingen\n" +" virkning\n" +" notify samme som -b\n" +" nounset samme som -u\n" +" onecmd samme som -t\n" +" physical samme som -P\n" +" pipefail returværdien af en datakanal (pipeline) er\n" +" status af den sidste kommando, som afsluttedes " +"med en\n" +" status som er forskellig fra nul, eller nul hvis\n" +" ingen kommando afsluttedes med en status " +"forskellig\n" +" fra nul\n" +" posix ændrer den måde bash opfører sig på de steder " +"hvor\n" +" opførslen afviger fra 1003.2-standarden således " +"at\n" +" standarden følges\n" +" privileged samme som -p\n" +" verbose samme som -v\n" +" vi brug en linjeredigerings-grænseflade som i \"vi" +"\"\n" +" xtrace samme som -x\n" +" -p Slået til når den reelle og den faktiske brugers id'er ikke er " +"ens.\n" +" Deaktiverer behandling af $ENV-filen og import af skalfunktioner.\n" +" Deaktivering af denne valgmulighed vil sætte de faktiske\n" +" uid og gid til de reelle uid og gid.\n" +" -t Afslut efter af have læst og eksekveret en kommando.\n" +" -u Behandl afinitialiserede (unset) variable som en fejl ved " +"substitution.\n" +" -v Udskriv skal-inputlinjer når de læses.\n" +" -x Udskriv kommandoer og deres argumenter når de eksekveres.\n" +" -B Lad skallen udføre klammeudvidelse\n" +" -C Med dette tilvalg vil det ikke tillades at eksisterende regulære " +"filer\n" +" overskrives pga. videreførsel af output.\n" +" -E Med dette tilvalg vil ERR-fælden (trap) arves af skalfunktioner.\n" +" -H Aktiver !-stilhistoriksubstitution. Dette flag er aktiveret som\n" +" standard, når skallen er interaktiv.\n" +" -P Med dette tilvalg følges symbolske lænker ikke ved eksekvering af\n" +" kommandoer, som f.eks. cd, der ændrer den aktuelle mappe.\n" +" -T Med dette tilvalg vil DEBUG-fælden (trap) arves af " +"skalfunktioner.\n" +" - Tildel alle tilbageblevne argumenter til positionsparametrene.\n" +" Tilvalgene -x og -v er slået fra.\n" +" \n" +" Bruges + i stedet for - vil disse flag blive slået fra. Flagene kan " +"også\n" +" bruges ved kald af skallen. Flagene det aktuelt er i brug kan findes i " +"$-.\n" +" De tilbageblevne n ARGer er positionsparametre og vil blive tildelt i " +"række-\n" +" følge til $1, $2, .. $n. Hvis der ikke angives nogen ARGer, vil alle " +"skal-\n" +" variable blive udskrevet.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg." + +#: builtins.c:1140 +#, fuzzy +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Afinitialiserer (unset) værdier og attributter for skalvariable og " +"funktioner.\n" +" \n" +" Fjerner den tilsvarende variabel eller funktion for hvert NAVN.\n" +" \n" +" Tilvalg:\n" +" -f\tbehandl ethvert NAVN som en skalfunktion\n" +" -v\tbehandl ethvert NAVN som en skalvariable\n" +" \n" +" Uden tilvalg vil unset først prøve at afinitialisere en variabel og " +"hvis\n" +" det mislykkes, vil den prøve med en funktion.\n" +" \n" +" Nogle variable kan ikke afinitialiseres; læs under \"readonly\".\n" +" \n" +" Afslutningstatus:\n" +" Returnerer succes med mindre der gives et ugyldigt tilvalg eller hvis " +"et\n" +" givent navn er skrivebeskyttet." + +#: builtins.c:1162 +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 "" +"Indstil eksportattributten for skalvariable.\n" +" \n" +" Marker hvert NAVN til automatisk eksport til miljøet for de kommandoer " +"som\n" +" eksekveres efterfølgende. Hvis VÆRDI er angivet, vil den blive tildelt\n" +" variablen før eksportering.\n" +" \n" +" Tilvalg:\n" +" -f\treferer til skalfunktioner\n" +" -n\tfjern eksportegenskaben fra hvert NAVN\n" +" -p\tvis en liste over alle eksporterede variable og funktioner\n" +" \n" +" Argumentet \"--\" slår al efterfølgende behandling fra.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg eller hvis\n" +" NAVN er ugyldig." + +#: builtins.c:1181 +#, fuzzy +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Marker skalvariable som skrivebeskyttet.\n" +" \n" +" Marker hvert NAVN som skrivebeskyttet. Værdierne af disse navne kan\n" +" herefter ikke ændres ved efterfølgende tildeling. Hvis VÆRDI angives, " +"vil\n" +" denne blive tildelt variablen, før den markeres som skrivebeskyttet.\n" +" \n" +" Tilvalg:\n" +" -a\treferer til indekserede arrays\n" +" -A\treferer til associative arrayvariable\n" +" -f\treferer til skalfunktioner\n" +" -p\tvis en liste af alle skrivebeskyttede variable og funktioner\n" +" \n" +" Argumentet \"--\" slår al efterfølgende fra.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg eller hvis\n" +" NAVN er ugyldigt." + +#: builtins.c:1203 +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 "" +"Skift positionsparametre.\n" +" \n" +" Omdøb positionsparametrene $N+1,$N+2 ... til $1,$2 ... Hvis N ikke " +"angives,\n" +" antages værdien 1.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre N er negativ eller større end $#." + +#: builtins.c:1215 builtins.c:1230 +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 "" +"Eksekver kommandoer fra en fil i den aktuelle skal.\n" +" \n" +" Læs og eksekver kommandoer fra FILNAVN i den aktuelle skal. Elementerne " +"i\n" +" $PATH bruges til at finde den mappe som FILNAVN ligger i. Hvis der " +"angives\n" +" ARGUMENTER, omdannes de til positionsparametre når FILNAVN eksekveres.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer status fra den sidst eksekverede kommando i FILNAVN; fejler " +"hvis\n" +" FILNAVN ikke kan læses." + +#: builtins.c:1246 +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 "" +"Suspender skaleksekvering.\n" +" \n" +" Suspender eksekvering af denne skal indtil den modtager et SIGCONT-" +"signal.\n" +" Med mindre det gennemtvinges, kan en logindskal ikke suspenderes.\n" +" \n" +" Tilvalg:\n" +" -f\tgennemtving suspendering selvom skallen er en logindskal\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre jobkontrol ikke er slået til, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:1262 +#, 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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Evaluer betingelsesudtryk.\n" +" \n" +" Afslutter med status 0 (sand) eller 1 (falsk) afhængigt af evalueringen " +"af\n" +" UDTRYK. Udtrykket kan være unært eller binært. Unære udtryk bruges ofte " +"til\n" +" at undersøge filers status. Der findes også strengoperatorer såvel som\n" +" operatorer til numeriske sammenligninger.\n" +" \n" +" Filoperatorer:\n" +" \n" +" -a FIL Sand hvis filen eksisterer.\n" +" -b FIL Sand hvis filen er blokspeciel.\n" +" -c FIL Sand hvis filen er tegnspecial.\n" +" -d FIL Sand hvis filen er en mappe.\n" +" -e FIL Sand hvis filen eksisterer.\n" +" -f FIL Sand hvis filen eksisterer og er en regulær fil.\n" +" -g FIL Sand hvis filen er sæt-gruppe-id.\n" +" -h FIL Sand hvis filen er en symbolsk lænke.\n" +" -L FIL Sand hvis filen er en symbolsk lænke.\n" +" -k FIL Sand hvis filens klæbebit (sticky bit) er indstillet.\n" +" -p FIL Sand hvis filen er en navngiven datakanal (pipe).\n" +" -r FIL Sand hvis du kan læse filen.\n" +" -s FIL Sand hvis filen eksisterer og ikke er tom.\n" +" -S FIL Sand hvis filen er en sokkel.\n" +" -t FD Sand hvis FD blev åbnet på en terminal.\n" +" -u FIL Sand hvis filen er sæt-bruger-id.\n" +" -w FIL Sand hvis du kan skrive til filen.\n" +" -x FIL Sand hvis du kan eksekvere filen.\n" +" -O FIL Sand hvis filen effektivt er ejet af dig.\n" +" -G FIL Sand hvis filen effektivt er ejet af din gruppe.\n" +" -N FIL Sand hvis filen er blevet ændret siden den sidst blev " +"læst.\n" +" \n" +" FIL1 -nt FIL2 Sand hvis fil1 er nyere end fil2 (ifølge " +"modificerings-\n" +" datoen)\n" +" \n" +" FIL1 -ot FIL2 Sand hvis fil1 er ældre en fil2.\n" +" \n" +" FIL1 -ef FIL2 Sand hvis fil1 er en hård lænke til fil2.\n" +" \n" +" Strengoperatorer:\n" +" \n" +" -z STRENG Sand hvis strengen er tom.\n" +" \n" +" -n STRENG\n" +" STRENG Sand hvis strengen ikke er tom.\n" +" \n" +" STRENG1 = STRENG2\n" +" Sand hvis strengene er ens.\n" +" STRENG1 != STRENG2\n" +" Sand hvis strengene ikke er ens.\n" +" STRENG1 < STRENG2\n" +" Sand hvis STRENG1 sorteres før STRENG2 leksikografisk.\n" +" STRENG1 > STRENG2\n" +" Sand hvis STRENG1 sorteres efter STRENG2 " +"leksikografisk.\n" +" \n" +" Andre operatorer:\n" +" \n" +" -o TILVALG Sand hvis skaltilvalget TILVALG er slået til.\n" +" ! UDTRYK Sand hvis udtryk er falsk.\n" +" UDTR1 -a UDTR2 Sand hvis både udtr1 og udtr2 er sande.\n" +" UDTR1 -o UDTR2 Sand hvis enten udtr1 eller udtr2 er sand.\n" +" \n" +" arg1 OP arg2 Aritmetiske tests. OP er en af følgende: -eq, -ne,\n" +" -lt, -le, -gt, eller -ge.\n" +" \n" +" Binære aritmetiske operatorer returnerer sand hvis ARG1 er henholdsvis " +"lig,\n" +" ikke-lig, mindre-end, mindre-end-eller-lig, større-end, større-end-eller-" +"lig\n" +" ARG2.\n" +"\n" +" Afslutningsstatus:\n" +" Returnerer succes hvis UDTRYK evalueres til sand, og fejler hvis UDTRYK\n" +" evalueres til falsk eller hvis der gives et ugyldigt argument." + +#: builtins.c:1344 +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 "" +"Evaluer betingelsesudtryk.\n" +" \n" +" Dette er et synonym for den indbyggede funktion \"test\", dog skal det " +"sidste\n" +" argument skal være \"]\", for at den passer til den åbnende \"[\"." + +#: builtins.c:1353 +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 "" +"Vis procestid.\n" +" \n" +" Udskriver den akkumulerede bruger- og systemtid for skallen og alle " +"dens\n" +" underprocesser.\n" +" \n" +" Afslutningsstatus:\n" +" Lykkes altid." + +#: builtins.c:1365 +#, 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. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\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 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 "" +"Indfanger signaler og andre begivenheder.\n" +" \n" +" Definerer og aktiverer håndteringsenheder, som skal køres når skallen\n" +" modtager signaler eller under andre omstændigheder.\n" +" \n" +" ARG er en kommando som skal læses og eksekveres, når skallen modtager\n" +" signalet SIGNAL_SPEC. Hvis ARG ikke er angivet (og hvis der angives en\n" +" enkelt SIGNAL_SPEC) eller \"-\", vil hvert angivet signal blive " +"nulstillet\n" +" til dets oprindelige værdi. Hvis ARG er null-strengen, vil hvert\n" +" SIGNAL_SPEC bliver ignoreret af skallen og af de kommandoer som den\n" +" starter.\n" +" \n" +" Hvis en SIGNAL_SPEC er EXIT (0), vil ARG blive eksekveret ved " +"afslutning\n" +" af skallen. Hvis SIGNAL_SPEC er DEBUG, vil ARG blive eksekveret før " +"hver\n" +" simpel kommando.\n" +" \n" +" Hvis der ikke er angivet nogen argumenter, vil trap udskrive en liste " +"af\n" +" kommandoer som er associeret med hvert signal.\n" +" \n" +" Tilvalg:\n" +" -l\tudskriver en liste af signalnavne og deres tilhørende numre\n" +" -p\tvis de trap-kommandoer som er associeret med hvert SIGNAL_SPEC\n" +" \n" +" Hver SIGNAL_SPEC er enten et signalnavn i eller et signal-\n" +" nummer. Signalnavne er ikke versalfølsomme og præfikset SIG er " +"valgfrit.\n" +" Et signal kan sendes til skallen med \"kill -signal $$\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre SIGSPEC er ugyldig eller hvis der er " +"angivet\n" +" et ugyldigt tilvalg." + +#: builtins.c:1401 +#, fuzzy +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 "" +"Vis information om kommandoers type.\n" +" \n" +" Oplys for hvert NAVN, hvordan det ville blive tolket, hvis det blev " +"brugt\n" +" som en kommando.\n" +" \n" +" Tilvalg:\n" +" -a\tvis alle placeringer som indeholder en eksekverbar ved navn NAVN;\n" +" \tinkluder aliasser, indbyggede og funktioner, hvis og kun hvis " +"tilvalget\n" +" \t\"-p\" ikke også bruges\n" +" -f\tundertryk søgning efter skalfunktioner\n" +" -P\tgennemtving en stisøgning for hvert NAVN, selvom det er et\n" +" \talias, en indbygget eller en funktion og returner samme navne som den\n" +" \tdiskfil der ville blive eksekveret\n" +" -p\treturnerer enten navnet på den diskfil, som ville blive\n" +" \teksekveret, eller ingenting hvis \"type -t NAVN\" ikke ville have\n" +" \treturneret \"file\".\n" +" -t\treturner et enkelt ord, enten \"alias\", \"keyword\", \"function" +"\",\n" +" \t\"builtin\", \"file\" eller \"\", hvis NAVN er henholdsvis et alias,\n" +" skalreserveret ord, skalfunktion, skalindbygget, diskfil eller ikke " +"blev\n" +" fundet.\n" +" \n" +" Argumenter:\n" +" NAVN\tNavnet på den kommando der skal fortolkes.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes hvis alle NAVNe kan findes, og fejler hvis bare et " +"enkelt\n" +" ikke findes." + +#: builtins.c:1432 +#, 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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"Modificer grænser for skalressourcer.\n" +" \n" +" Giver kontrol over de ressourcer som er tilgængelige for skallen og de\n" +" processer den starter på systemer som tillader den slags kontrol.\n" +" \n" +" Tilvalg:\n" +" -S\tbrug den \"bløde\" ressourcegrænse\n" +" -H\tbrug den \"hårde\" ressourcegrænse\n" +" -a\talle aktuelle grænser rapporteres\n" +" -b\tstørrelse af sokkelbuffer\n" +" -c\tmaksimale størrelse af oprettede kernefiler\n" +" -d\tmaksimale størrelse af en proces' datasegment\n" +" -e\tmaksimale planlægningsprioritet (`nice')\n" +" -f\tmaksimale størrelse af filer skrevet af skallen og dens\n" +" \tunderprocesser\n" +" -i\tmaksimale antal af ventende signaler\n" +" -l\tmaksimale størrelse en proces må låse i hukommelse\n" +" -m\tmaksimale indstillede område (resident size)\n" +" -n\tmaksimale antal åbne fildeskriptorer\n" +" -p\tbufferstørrelse for datakanal (pipe)\n" +" -q\tmaksimale antal bytes i POSIX-beskedkøer\n" +" -r\tmaksimale realtids-planlægningsprioritet\n" +" -s\tmaksimal stakstørrelse\n" +" -t\tmaksimale mængde cpu-tid i sekunder\n" +" -u\tmaksimale antal brugerprocesser\n" +" -v\tstørrelsen af virtuel hukommelse\n" +" -x\tmaksimale antal fillåse\n" +" \n" +" Hvis GRÆNSE angives, er det den nye grænse for den specificerede " +"ressource\n" +" De specielle grænser, \"soft\", hard\" og \"unlimited\" står for " +"henholdsvis den\n" +" aktuelle bløde grænse, hårde grænse og ingen grænse. Ellers vil den\n" +" aktuelle grænse for den specificerede ressource blive udskrevet. Hvis " +"der\n" +" ikke angives noget tilvalg, antages \"-f\".\n" +" \n" +" Værdier angives i forøgelser af 1024 bytes, bortset fra -t som er i " +"sekunder,\n" +" -p som er i forøgelser af 512 bytes og -u som er et uskaleret antal af\n" +" processer.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:1483 +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 "" +"Vis eller indstil filmasketilstand.\n" +" \n" +" Indstiller brugeres filoprettelsesmaske til TILSTAND. Hvis TILSTAND " +"udelades,\n" +" udskrives den nuværende værdi af masken.\n" +" \n" +" Hvis TILSTAND begynder med et ciffer, bliver det fortolket som et " +"oktalt\n" +" tal, ellers er det en symbolsk tilstandsstreng, ligesom dem der angives\n" +" til chmod(1).\n" +" \n" +" Tilvalg:\n" +" -p\thvis TILSTAND udelades, udskrives der i en form der kan bruges\n" +" \tsom input\n" +" -S\tgør outputtet symbolsk, eller vil output være et oktalt tal\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre TILSTAND er ugyldig, eller hvis et " +"ugyldigt\n" +" tilvalg angives." + +#: builtins.c:1503 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Vent på færdiggørelse af job og returner afslutningsstatus.\n" +" \n" +" Venter på processen ID. ID kan enten være et proces-id eller en job-\n" +" specifikation, og rapporterer dets afslutningstatus. Hvis ID ikke " +"angives\n" +" ventes på alle aktuelle underprocesser og afslutningsstatussen vil være " +"0.\n" +" Hvis ID er en jobspecifikation ventes på alle processer i dette jobs\n" +" datakanal (pipe).\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer status af ID, fejler hvis ID er ugyldigt eller hvis der " +"angives\n" +" et ugyldigt tilvalg." + +#: builtins.c:1534 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Venter på færdiggørelse af proces og returnerer dens afslutningsstatus.\n" +" \n" +" Venter på den angivne proces og rapporterer dens afslutningsstatus. " +"Hvis\n" +" der ikke angives noget PID ventes på alle aktuelle underprocesser og\n" +" afslutningsstatussen er 0. PID skal være et proces-id.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen for ID, fejler hvis ID er ugyldig eller hvis der\n" +" angives et ugyldigt tilvalg." + +#: builtins.c:1549 +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 "" +"Eksekver kommandoer hvor hvert element i en liste.\n" +" \n" +" \"for\"-løkken eksekverer en sekvens af kommandoer for hvert element i " +"en\n" +" angivet liste af elementer. Hvis \"in ORD ...;\" ikke er tilstede, så " +"antages\n" +" \"in \"$@\"\". For hvert element i ORD, vil NAVN blive sat til det " +"element og\n" +" KOMMANDOER vil blive eksekveret.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen for den sidst eksekverede kommando." + +#: builtins.c:1563 +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-løkke.\n" +" \n" +" Ækvivalent til\n" +" \t(( UDTRYK ))\n" +" \twhile (( UDTRYK )); do\n" +" \t\tKOMMANDOER\n" +" \t\t(( UDTRYK3 ))\n" +" \tdone\n" +" UDTRYK1, UDTRYK2 og UDTRYK3 er aritmetisk udtryk. Hvis et af udtrykkene\n" +" mangler, vil resultatet være som om det evalueredes til 1.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatussen for den sidst eksekverede kommando." + +#: builtins.c:1581 +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ælg ord fra en liste og eksekver kommandoer.\n" +" \n" +" ORD vil blive udvidet, således at der genereres en liste af ord. Denne\n" +" liste af udvidede ord vil blive skrevet til standardfejl, hvert af dem\n" +" med at nummer hæftet foran. Hvis \"in ORD\" ikke er angivet, antages " +"\"in $@\".\n" +" Derefter vil en PS3-prompt blive vist og der vil blive læst en linje " +"fra\n" +" standardinput. Hvis linje består af et tal, som svarer til et af de\n" +" viste ord, så vil NAVN blive sat til det ord. Hvis linjen er tom, vil " +"ORD\n" +" og prompten blive vist igen. Hvis EOF bliver læst afsluttes kommandoen.\n" +" Hvis der læses en hvilken som helst anden værdi, vil NAVN blive sat til\n" +" null. Den læste linje vil bliver gemt i variablen REPLY. KOMMANDOER vil\n" +" blive eksekveret efter hvert valg indtil en break-kommando eksekveres.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1602 +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 "" +"Rapporterer tid brugt ved en datakanals (pipe) eksekvering.\n" +" \n" +" Eksekverer DATAKANAL og udskriv den brugte realtid, bruger-CPU-tid\n" +" og system-CPU-tid, når den er færdig.\n" +" \n" +" Tilvalg:\n" +" -p\tudskriver timingssammendrag i det flytbare (portable)\n" +" POSIX-format\n" +" \n" +" Værdien af variablen TIMEFORMAT bruges som outputformatet.\n" +" \n" +" Afslutningsstatus:\n" +" Afslutningsstatus er afslutningsstatus for DATAKANAL." + +#: builtins.c:1619 +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 "" +"Eksekver kommandoer baseret på mønstersammenligning.\n" +" \n" +" Eksekver selektivt KOMMANDOER når ORD passer til MØNSTER. \"|\" bruges " +"til at\n" +" adskille flere mønstre.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1631 +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 "" +"Eksekverer kommandoer baseret på betingelse.\n" +" \n" +" Listen \"if KOMMANDOER\" bliver eksekveret. Hvis dens afslutningsstatus " +"er\n" +" nul, så vil listen \"then KOMMANDOER\" blive eksekveret. Ellers vil " +"hver\n" +" \"elif KOMMANDOER\"-liste blive eksekveret og hvis de returnerer nul " +"vil\n" +" deres tilhørende \"then KOMMANDER\"-liste blive eksekveret og if-" +"kommandoen\n" +" fuldføres. Ellers vil \"else KOMMANDOER\"-listen blive eksekveret, hvis " +"en\n" +" sådan findes. Afslutningsstatus for hele strukturen er afslutnings-\n" +" statussen for den sidste kommando, eller nul hvis ingen betingelse var\n" +" sand.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1648 +#, fuzzy +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Eksekver kommandoer så længe en test evaluerer til sad.\n" +" \n" +" Udvid og eksekver KOMMANDOER så længe den sidste kommando i \"while\"\n" +" KOMMANDOER har en afslutningsstatus på nul.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1660 +#, fuzzy +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Eksekver kommandoer så længe en test ikke evaluerer til falsk.\n" +" \n" +" Udvid og eksekver KOMMANDOER så længe den sidste kommando i \"untill\"\n" +" KOMMANDOER har en afslutningsstatus som ikke er nul.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1672 +#, fuzzy +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Opret en coproces ved navn NAVN.\n" +" \n" +" Eksekver KOMMANDO asynkront, med standardoutput og standardinput\n" +" for kommandoen forbundet via en datakanal (pipe), til fildeskriptorerne\n" +" tildelt til indeks 0 og 1 i en arrayvariabel NAVN i den eksekverende " +"skal.\n" +" Standardnavnet NAVN er \"COPROC\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer afslutningsstatussen for KOMMANDO." + +#: builtins.c:1686 +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 "" +"Definer skalfunktion.\n" +" \n" +" Opret en skalfunktion ved navn NAVN. Når den køres som en simpel " +"kommando,\n" +" NAVN kører KOMMANDOer i den kaldende skals kontekst. Når NAVN kaldes, " +"bliver\n" +" argumenter sendt videre som $1..$n, og funktionens navn som $FUNCNAME.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre NAVN er skrivebeskyttet." + +#: builtins.c:1700 +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 "" +"Grupper kommandoer som en enhed.\n" +" \n" +" Kør et sæt af kommandoer i en gruppe. Dette er en måde at videresende\n" +" et sæt af kommandoer på.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen fra den sidst eksekverede kommando." + +#: builtins.c:1712 +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 "" +"Genoptag job i forgrunden.\n" +" \n" +" Ækvivalent til JOB_SPEC-argumentet til \"fg\"-kommandoen. Genoptag et " +"stoppet\n" +" job eller et job som ligger i baggrunden. JOB_SPEC kan specificere enten " +"et\n" +" jobnavn eller et jobnummer. Hvis JOB_SPEC efterfølges af en \"&\", vil " +"jobbet\n" +" blive placeret i baggrunden, som om jobspecifikationen var givet som et\n" +" argument til \"bg\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer statussen af det genoptagede job." + +#: builtins.c:1727 +#, 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 "" +"Evaluer aritmetisk udtryk.\n" +" \n" +" UDTRYK evalueres ifølge reglerne for aritmetisk evaluering. Ækvivalent " +"til\n" +" \"let UDTRYK\".\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer 1 hvis udtrykket evalueres til 0, ellers returneres 0." + +#: builtins.c:1739 +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 "" +"Eksekver betingelseskommando.\n" +" \n" +" Returnerer status 0 eller 1 afhængigt af evalueringen af betingelses-\n" +" udtrykket UDTRYK. Udtryk består af de samme primære elementer som " +"bliver\n" +" brugt i den indbyggede funktion \"test\" og kan kombineres ved brug af " +"følgende\n" +" operatorer:\n" +" \n" +" ( UDTRYK )\tReturnerer værdien af UDTRYK\n" +" ! UDTRYK\t\tSand hvis UDTRYK er falsk, ellers falsk\n" +" UDTR1 && UDTR2\tSand hvis både UDTR1 og UDTR2 er sande, ellers falsk\n" +" UDTR1 && UDTR2\tSand hvis enten UDTR1 eller UDTR2 er sand, ellers " +"falsk\n" +" \n" +" Når operatorerne \"==\" og \"!=\" bruges, vil strengen til højre for " +"operatoren\n" +" blive brugt som et mønster og der vil blive udført strengmatching. Når\n" +" operatoren \"=~\" bliver brugt, vil strengen til højre for operatoren " +"blive\n" +" matchet som et regulært udtryk.\n" +" \n" +" Operatorerne && og || vil ikke evaluere UDTR2, hvis UDTR1 er nok til at\n" +" afgøre udtrykkets værdi.\n" +"\n" +" Afslutningsstatus:\n" +" 0 eller 1 afhængigt af udtrykkets værdi." + +#: builtins.c:1765 +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 "" +"Navnene på almindelige skalvariable og deres brug.\n" +" \n" +" BASH_VERSION\tVersionsinformation for denne Bash.\n" +" CDPATH\tEn kolonsepareret liste af mapper som kan gennemsøges for at\n" +" \t\tfinde mapper som er givet som argument til cd.\n" +" GLOBIGNORE\tEn kolonsepareret liste af mønstre som beskriver filnavne " +"som\n" +" \t\tskal ignoreres ved stinavnsudvidelse.\n" +" HISTFILE\tNavnet på den fil hvori din kommandohistorik gemmes.\n" +" HISTFILESIZE\tDet maksimale antal linjer denne fil kan indeholde.\n" +" HISTSIZE\tDet maksimale antal linjer som en kørende skal kan tilgå.\n" +" HOME\tDet komplette stinavn til din logindmappe.\n" +" HOSTNAME\tNavnet på den aktuelle vært.\n" +" HOSTTYPE\tDen type af CPU som denne version af Bash kører under.\n" +" IGNOREEOF\tKontrollerer skallens handlinger hvis den modtager et EOF-" +"tegn\n" +" \t\tsom eneste input. Hvis den er indstillet, angiver den det antal\n" +" \t\tEOF-tegn som skal følge lige efter hinanden på en tom linje,\n" +" \t\tfør skallen afslutter (standardværdien er 10). Hvis den ikke er\n" +" indstillet vil EOF betyde slutningen af input.\n" +" MACHTYPE\tEn streng som beskriver det aktuelle system som Bash kører " +"på.\n" +" MAILCHECK\tHvor ofte Bash tjekker for ny post, i sekunder.\n" +" MAILPATH\tEn kolonsepareret liste af filnavne som Bash tjekker for ny\n" +" \t\tpost.\n" +" OSTYPE\tDen version af Unix som denne version af Bash kører på.\n" +" PATH\tEn kolonsepareret liste af mapper som der søges i efter " +"kommandoer.\n" +" PROMPT_COMMAND\tEn kommando som skal eksekveres før hver primære prompt\n" +" \t\tudskrives.\n" +" PS1\t\tStreng for den primære prompt.\n" +" PS2\t\tStreng for den sekundære prompt.\n" +" PWD\t\tDet fulde stinavn for den aktuelle mappe.\n" +" SHELLOPTS\tEn kolonsepareret liste af aktiverede skaltilvalg.\n" +" TERM\tNavnet på den aktuelle skaltype.\n" +" TIMEFORMAT\tOutputformatet for timingstatistik som vises ved hjælp af " +"det\n" +" \t\treserverede ord \"time\".\n" +" auto_resume\tIkke-null betyder at for et kommandoord, som optræder for " +"sig selv\n" +" \t\tpå en linje, vil der først blive kigget efter det i listen over\n" +" \t\taktuelt stoppede jobs. Hvis det findes der, vil dette job blive\n" +" bragt i forgrunden. Værdien \"exact\" betyder at " +"kommandoordet\n" +" skal matche et ord fra listen over stoppede jobs præcist.\n" +" Værdien \"substring\" betyder at kommandoordet skal matche " +"en\n" +" delstreng af jobbet. Enhver anden værdi betyder at " +"kommandoen\n" +" skal være et præfiks for et stoppet job.\n" +" histchars\tTegn som kontrollerer historikudvidelse og hurtig " +"substitution\n" +" \t\ti historik. Det første tegn er historik-substitutionstegnet, som\n" +" regel \"!\". Det andet tegn er hurtigsubstitutionstegnet, " +"som\n" +" \t\tregel \"^\". Det tredje tegn er historik-kommentartegnet, som\n" +" \t\tregel \"#\".\n" +" HISTIGNORE\tEn kolonsepareret liste af mønstre som bliver brugt til at\n" +" \t\tbestemme hvilke kommandoer der skal gemmes i historikken.\n" + +#: builtins.c:1822 +#, 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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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 "" +"Tilføjer mapper til stakken.\n" +" \n" +" Tilføjer en mappe til toppen af stakken, eller roterer stakken, således\n" +" at den nye top af stakken bliver den aktuelle mappe. Uden argumenter\n" +" ombyttes de to øverste mapper.\n" +" \n" +" Tilvalg:\n" +" -n\tUndertrykker det mappeskift der normalt følger med tilføjelse\n" +" \taf mapper til stakken, således at kun stakken ændres.\n" +" \n" +" Argumenter:\n" +" +N\tRoterer stakken således at den N'te mappe (talt fra venstre i\n" +" \tlisten som vises af \"dirs\", startende med nul) vil blive placeret i\n" +" \ttoppen.\n" +" \n" +" -N\tRoterer stakken således at den N'te mappe (talt fra højre i\n" +" \tlisten som vises af \"dirs\", startende med nul) vil blive placeret i\n" +" \ttoppen.\n" +" \n" +" mappe\tTilføjer MAPPE til toppen af mappestakken, således at den\n" +" \tbliver den aktuelle mappe.\n" +" \n" +" Den indbyggede \"dirs\" viser mappestakken.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" mappeskiftet mislykkes." + +#: builtins.c:1856 +#, 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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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 "" +"Fjerner mapper fra stakken.\n" +" \n" +" Fjerner en mappe fra stakken. Uden argumenter fjernes den øverste mappe " +"fra\n" +" stakken og der skiftes til den nye aktuelle mappe.\n" +" \n" +" Tilvalg:\n" +" -n\tUndertrykker det mappeskift der normalt følger med fjernelse\n" +" \taf mapper fra stakken, således at kun stakken ændres.\n" +" \n" +" Argumenter:\n" +" +N\tFjerner den N'te mappe, talt fra venstre i listen som vises af\n" +" \t\"dirs\", startende med nul. F.eks: vil \"popd +0\" fjerne den første " +"mappe\n" +" \tog \"popd +1\" den anden.\n" +" \n" +" -N\tFjerner den N'te mappe, talt fra højre i listen som vises af\n" +" \t\"dirs\", startende med nul. F.eks: vil \"popd -0\" fjerne den sidste " +"mappe\n" +" \tog \"popd -1\" den andensidste.\n" +" \n" +" Den indbyggede \"dirs\" viser mappestakken.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" mappeskiftet mislykkes." + +#: builtins.c:1886 +#, 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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Vis mappestakken.\n" +" \n" +" Vis listen af huskede mapper. Mapper tilføjes denne liste ved hjælp\n" +" af \"pushd\"-kommandoen. Du kan komme tilbage gennem listen med \"popd" +"\"-\n" +" kommandoen.\n" +" \n" +" Tilvalg:\n" +" -c\tryd mappestakken ved at slette alle dens elementer\n" +" -l\tudskriv ikke mapper relativt til din hjemmemappe med et\n" +" foranstillet tildetegn\n" +" -p\tudskriv mappestakken med et element per linje\n" +" -v\tudskriv mappestakken med et element per linje, med dets\n" +" \tposition i stakken foranstillet\n" +" \n" +" Argumenter:\n" +" +N\tViser det N'te element, talt fra venstre i listen som den vises\n" +" af \"dirs\" kørt uden argumenter, talt fra nul.\n" +" -N\tViser det N'te element, talt fra højre i listen som den vises af\n" +" \t\"dirs\" kørt uden argumenter, talt fra nul.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller hvis " +"der\n" +" opstår en fejl." + +#: builtins.c:1917 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"Indstil og afindstil (unset) skalvariable.\n" +" \n" +" Ændr indstillinger for hver skalvariabel INDSTNAVN. Uden argumenter " +"vises\n" +" en liste af skalvariable, sammen med information om hvorvidt de er\n" +" indstillet.\n" +" \n" +" Tilvalg:\n" +" -o\tbegræns INDSTNAVN til dem som er defineret til brug med \"set -o" +"\"\n" +" -p\tudskriv alle skalvariable sammen med en indikation af deres\n" +" \tstatus\n" +" -q\tundertryk output\n" +" -s\taktiver (set) hvert INDSTNAVN\n" +" -u\tdeaktiver (unset) hvert INDSTNAVN\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes hvis INDSTNAVN er aktiveret; fejler hvis der angives " +"et\n" +" ugyldigt tilvalg eller hvis INDSTNAVN er deaktiveret." + +#: builtins.c:1938 +#, 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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formaterer og udskriver ARGUMENTER formateret efter FORMAT.\n" +" \n" +" Tilvalg:\n" +" -v var\tsend output til skalvariablen VAR i stedet for at vise det " +"via\n" +" \t\tstandardoutput\n" +" \n" +" FORMAT er en tegnstreng som indeholder 3 typer af objekter: Almindelige " +"tegn,\n" +" som kopieres til standardoutput som de er; undvigetegn, som konverteres " +"og\n" +" kopieres til standardoutput; og formatspecifikationer, som hver især " +"fører\n" +" til udskrivningen af det næste argument.\n" +" \n" +" Ud over de standardformatspecifikationer som er beskrevet i printf(1) " +"og\n" +" printf(3), fortolker printf også følgende:\n" +" \n" +" %b\tudvid undvigesekvenser med omvendt skråstreg i det tilsvarende\n" +" \targument\n" +" %q\tciter argumenter på en måde så de kan genbruges som skalinput\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en skrive- eller tildelingsfejl." + +#: builtins.c:1974 +#, 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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specificer hvordan argumenter fuldføres af Readline.\n" +" \n" +" Specificer hvordan argumenter skal fuldføres for hvert NAVN. Hvis der\n" +" ikke er angivet nogen tilvalg, vil de eksisterende fuldførsels-\n" +" specifikationer blive udskrevet på en form der tillader dem at blive\n" +" genbrugt som input.\n" +" \n" +" Tilvalg:\n" +" -p\tudskriv eksisterende fuldførselsspecifikationer i et format\n" +" \tsom kan genbruges\n" +" -r\tfjern en fuldførselsspecifikation for hvert NAVN, eller,\n" +" \thvis der ikke er angivet nogle NAVNe, alle fuldførselsspecifikationer\n" +" \n" +" Når fuldførsel forsøges, vil handlinger blive anvendt i den rækkefølge,\n" +" som de tilvalg som har store bogstaver, står i.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +#: builtins.c:2004 +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 "" +"Vis mulige fuldførsler afhængigt af indstillingerne.\n" +" \n" +" Beregnet til brug i skalfunktioner som genererer de mulige " +"fuldførelser.\n" +" Hvis det valgfrie ORD angives, vil der blive genereret fuldførsler som\n" +" matcher ORD.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der opstår en fejl." + +# Fejlrapport +#: builtins.c:2019 +#, 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 being executed. If no OPTIONs are given, " +"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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"Ændr eller vis indstillinger for fuldførsel.\n" +" \n" +" Ændr fuldførselsindstillinger for hvert NAVN, eller, hvis der ikke er\n" +" angivet nogle NAVNe, fuldførslen der bliver eksekveret nu. Hvis der " +"ikke\n" +" er angivet nogle tilvalg, vil fuldførslen for hvert navn eller den\n" +" aktuelle fuldførsel blive udskrevet.\n" +" \n" +" Tilvalg:\n" +" \t-o indstilling\tIndstil fuldførselsindstillingen INDSTILLING for\n" +" \t\t\thvert NAVN.\n" +" Ved brug af \"+o\" i stedet for \"-o\" vil den specificerede indstilling " +"blive\n" +" slået fra.\n" +" \n" +" Argumenter:\n" +" \n" +" Hvert NAVN refererer til en kommando, for hvilken der tidligere er " +"blevet\n" +" angivet en fuldførselsspecifikation med den indbyggede \"complete\". " +"Hvis\n" +" der ikke er angivet nogle NAVNe, så skal compopt kaldes af den funktion " +"som\n" +" genererer fuldførsler nu og så vil indstillingerne for den aktuelt\n" +" kørende fuldførselsgenerator blive modificeret.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives et ugyldigt tilvalg, eller " +"hvis\n" +" der ikke er defineret en fuldførselsspecifikation for NAVN." + +#: builtins.c:2050 +#, 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 linjer ind i en arrayvariabel fra standardinput.\n" +" \n" +" Læs linjer ind i en arrayvariabel ARRAY fra standardinput, eller fra en\n" +" fildeskriptor FD, hvis tilvalget -u er givet. Variablen MAPFIL er " +"forvalgt\n" +" som ARRAY.\n" +" \n" +" Tilvalg:\n" +" -n antal\tKopier højst ANTAL linjer. Hvis ANTAL er 0 kopieres alle " +"linjer.\n" +" -O start\tBegynd at skrive til ARRAY ved indeks START. Standardværdien " +"er\n" +" \t0.\n" +" -s antal\tSmid de første ANTAL læste linjer væk.\n" +" -t \tFjern et efterfølgende nylinjetegn fra slutningen af hver linje.\n" +" -u fd\tLæs linjer fra fildeskriptoren FD i stedet for fra standard-\n" +" \t\tinput.\n" +" -C tilbagekald\tEvaluer TILBAGEKALD hver gang KVANTUM linjer er læst.\n" +" -c kvantum\tSpecificer antallet af linjer imellem hvert kald til\n" +" \t\t\tTILBAGEKALD\n" +" \n" +" Argumenter:\n" +" ARRAY\t\tNavn for arrayvariabel som skal bruges til fildata.\n" +" \n" +" Hvis -C er angivet uden -c er standardkvantum 5000. Når TILBAGEKALD\n" +" kaldes, vil den få det næste arrayindeks, som vil blive brugt som et " +"ekstra\n" +" argument.\n" +" \n" +" Med mindre et startpunkt i arrayet eksplicit angives, vil mapfile rydde\n" +" ARRAY, inden skrivning til den påbegyndes.\n" +" \n" +" Afslutningsstatus:\n" +" Returnerer succes med mindre der angives at ugyldigt tilvalg, eller " +"hvis\n" +" ARRAY er skrivebeskyttet." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Læs linjer fra en fil ind i en arrayvariabel.\n" +" \n" +" Et synonym for \"mapfile\"." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: ugyldig nøgle til associativt array" + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Ophavsret (C) 2009 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Returnerer konteksten af det nuværende underrutinekald.\n" +#~ " \n" +#~ " Når UDTRYK udelades returneres " + +# ?? +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: proces %5ld (%s) i the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Ukendt signal #" + +#, fuzzy +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licens GPLv3+: GNU GPL version 3 eller senere \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: kan ikke allokere %lu bytes (%lu bytes allokeret)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: kan ikke allokere %lu bytes" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xrealloc: %s:%d: kan ikke reallokere %lu bytes (%lu bytes allokeret)" diff --git a/po/de.gmo b/po/de.gmo index eadb264..388ad49 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index a532a09..c73aef4 100644 --- a/po/de.po +++ b/po/de.po @@ -1,429 +1,511 @@ -# German language file for GNU Bash 4.0 -# Copyright (C) 1996 Free Software Foundation, Inc. +# qerman language file for GNU Bash 5.0 +# Copyright (C) 2019 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. -# Nils Naumann , 1996, 2009. +# Roland Illig 2019 +# Nils Naumann , 1996-2021. +# msgid "" msgstr "" -"Project-Id-Version: bash 4.0\n" +"Project-Id-Version: bash 5.1\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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2021-12-29 22:04+0100\n" +"Last-Translator: Nils Naumann \n" "Language-Team: German \n" +"Language: de\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" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "Falscher Feldbezeichner." +msgstr "Falscher Feldindex." -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: Kann nicht das indizierte in ein assoziatives Array umwandeln." +msgid "%s: removing nameref attribute" +msgstr "%s: Entferne das Nameref Attribut." -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: Ungültiger Schlüssel für das assoziative Array." +msgid "%s: cannot convert indexed to associative array" +msgstr "" +"%s: Das indizierte Array kann in kein assoziatives Array umgewandelt werden." -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s: Kann nicht auf einen nicht-numerischen Index zuweisen." +msgstr "%s: Das Zuweisen auf einen nicht-numerischen Index ist nicht möglich." -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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." +"%s: %s: Ein Feldindex wird zum Zuweisen eines assoziativen Arrays benötigt." -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: Kann die Datei %s nicht erzeugen." -#: bashline.c:3457 +#: bashline.c:4479 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 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr " %s: Das erste nicht Leerzeichen ist nicht `\\'." +msgstr " %s: Das erste Zeichen ist nicht `\\'." -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "fehlende schließende `%c' in %s." -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: Fehlender Doppelpunkt." -#: builtins/alias.def:132 +#: bashline.c:4733 #, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "»%s«: Bindung kann nicht gelöst werden." + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "Klammererweiterung: Konnte keinen Speicher für %s zuweisen." + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "Klammererweiterung: Konnte keinen Speicher für %u Elemente zuweisen." + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "Klammererweiterung: Konnte keinen Speicher für »%s« zuweisen." + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "`%s': Ungültiger KEYMAP Name." +msgstr "»%s«: Ungültiger Aliasname." -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "Zeileneditierung ist nicht aktiviert." -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "`%s': Ungültiger KEYMAP Name." +msgstr "»%s«: Ungültiger Tastenzuordnungs-Name." -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "%s: Unbekannter Funktionsname." -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s ist keiner Taste zugeordnet.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s kann aufgerufen werden durch " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "»%s«: Bindung kann nicht gelöst werden." + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "Schleifen Zähler" +msgstr "Schleifenzähler" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "nur in einer `for', `while' oder `until' Schleife sinnvoll." +msgstr "nur in einer for-, while- oder until-Schleife sinnvoll." -# Problem mit Extraktion des Strings -#: builtins/caller.def:133 +# caller +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Gibt Informationen zum aktuellen Subroutinenaufruf aus.\n" +"\n" +" Ohne Argument wird die Zeilennummer und der Dateiname angezeigt. Mit\n" +" Argument werden Zeilennummer, Subroutinenname und Dateiname ausgegeben.\n" +" Mit diesen Informationen kann ein Stacktrace erzeugt werden.\n" +"\n" +" Das Argument gibt die angezeigte Position im Funktionsaufrufstapel an,\n" +" wobei 0 der aktuelle Funktionsaufruf ist." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME ist nicht zugewiesen." -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "Zu viele Argumente." + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "NULL Verzeichnis" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD ist nicht zugewiesen." # Debug Ausgabe -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "Zeile %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "Warnung: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "%s: Gebrauch: " - -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "Zu viele Argumente." +msgstr "%s: Aufruf: " -#: builtins/common.c:191 shell.c:499 shell.c:782 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" -msgstr "%s: Ein numerischer Paremeter ist erforderlich." +msgstr "%s: Die Option erfordert ein Argument." -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: Ein numerischer Parameter ist erforderlich." -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: Nicht gefunden." -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" -msgstr "%s: Ungültige Option" +msgstr "%s: Ungültige Option." -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: Ungültiger Optionsname." -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "`%s': Ist kein gültiger Bezeichner." +msgstr "»%s«: Ist kein gültiger Bezeichner." -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "Ungültige Oktalzahl." -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "Ungültige hexadezimale Zahl." -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "Ungültige Zahl." -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: Ungültige Signalbezeichnung." -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "`%s': Ist keine gültige Prozess- oder Jobbezeichnung." +msgstr "»%s«: Ist keine gültige Prozess-ID oder Jobbezeichnung." -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: Schreibgeschützte Variable." -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: »unset« nicht möglich." + +#: builtins/common.c:281 #, 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 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "Argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s ist außerhalb des Gültigkeitsbereiches." -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "%s: Kein solche Job." +msgstr "%s: Kein solcher Job." -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" -msgstr "%s: Keine Job Steuerung in dieser Shell." +msgstr "%s: Keine Jobsteuerung in dieser Shell." -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" -msgstr "Keine Job Steuerung in dieser Shell." +msgstr "Keine Jobsteuerung in dieser Shell." -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" -msgstr "%s: gesperrt" +msgstr "%s: eingeschränkt" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" -msgstr "gesperrt" +msgstr "eingeschränkt" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "%s: Ist kein Shell Kommando." +msgstr "%s: Ist kein eingebautes Shellkommando." -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "Schreibfehler: %s." -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "Fehler beim Setzen der Terminalattribute: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "Fehler beim Ermitteln der Terminalattribute: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "%s: Kann das nicht aktuelle Verzeichnis wiederfinden: %s: %s\n" +msgstr "%s: Kann das aktuelle Verzeichnis nicht wiederfinden: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" -msgstr "%s: Mehrdeutige Job Bezeichnung." +msgstr "%s: Mehrdeutige Jobbezeichnung." + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "In dieser Version ist keine Hilfe verfügbar." + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: »unset« nicht möglich: %s ist schreibgeschützt" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: »unset« nicht möglich." -#: builtins/complete.def:276 +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "%s: Ungültige Methode." +msgstr "%s: Ungültiger Aktionsname." -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, 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." +msgstr "Warnung: Die Option -F 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." +msgstr "Warnung: Die Option -C könnte unerwartete Ergebnisse liefern." -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "Gegenwärtig wird keine Komplettierungsfunktion ausgeführt." -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "kann nur innerhalb einer Funktion benutzt werden." +msgstr "Kann nur innerhalb einer Funktion benutzt werden." -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "Mit `-f' können keine Funktionen erzeugt werden." +msgstr "Mit »-f« können keine Funktionen erzeugt werden." -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: Schreibgeschützte Funktion." -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: Referenzvariable darf kein Array sein." + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: Zirkularbezug auf indirekte Variable." + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "»%s«: Ungültiger Name für indirekte Variablenreferenz." + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "Dynamisches Laden ist nicht verfügbar." -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" -msgstr "Kann die dynamische Bibiliothek nicht laden %s: %s" +msgstr "Kann die dynamische Bibliothek nicht laden %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "Kann %s nicht in der dynamischen Bibiliothek finden %s: %s" +msgstr "Kann %s nicht in der dynamischen Bibliothek finden %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: Ist bereits geladen." -#: builtins/enable.def:459 +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" +"Die Ladefunktion von %s lieferte einen Fehler (%d), daher nicht geladen." + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: Ist nicht dynamisch geladen." -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: ist ein Verzeichnis." -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: Ist keine normale Datei." -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: Kann die Datei nicht ausführen." -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: Kann nicht ausführen: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "Abgemeldet\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "Keine Login Shell: Mit exit abmelden." +msgstr "Keine Loginshell: Mit »exit« abmelden!" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Es gibt noch angehaltene Prozesse.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Es gibt noch laufende Prozesse.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "Kein Kommando gefunden." -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: Kann die tempräre Datei nicht öffnen: %s" +msgstr "%s: Kann die temporäre Datei nicht öffnen: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "gegenwärtig" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "Job %d wurde ohne Jobsteuerung gestartet." @@ -438,41 +520,49 @@ msgstr "%s: Ungültige Option -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: Diese Option erfordert ein Argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "Hashing deaktiviert." -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: Die Hashtabelle ist leer.\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "Treffer\tBefehl\n" -#: builtins/help.def:130 -#, c-format +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00022.html +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "Shell Kommandos auf die das Schlüsselwort zutrifft `" +msgstr[0] "Shellkommando, auf das das Schlüsselwort zutrifft `" msgstr[1] "Shell Kommandos auf die die Schlüsselwörter zutreffen `" -#: builtins/help.def:168 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 #, 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'." +"Kein passendes Hilfethema für »%s«. Probieren Sie »help help«, »man -k %s« " +"oder »info %s«." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: Kann die Datei nicht öffnen: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -483,24 +573,32 @@ msgid "" "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" +"Diese Shellkommandos sind intern definiert. Geben Sie »help« ein, um diese\n" +"Liste zu sehen. Geben Sie »help Name« ein, um die Beschreibung der Funktion\n" +"»Name« zu sehen. Geben Sie »info bash« ein, um die vollständige " +"Dokumentation\n" +"zu sehen. Geben Sie »man -k« oder »info« ein, um detaillierte " +"Beschreibungen\n" +"der Shellkommandos zu sehen.\n" "\n" "Ein Stern (*) neben dem Namen kennzeichnet deaktivierte Kommandos.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "Es darf nur eine Option aus -anrw angegeben werden." +msgstr "Es darf höchstens eine Option aus -anrw angegeben werden." -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "Kommandostapelposition." -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: Ungültiger Zeitstempel." + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: Kommandoersetzung gescheitert." @@ -514,94 +612,114 @@ msgstr "%s: inlib gescheitert." msgid "no other options allowed with `-x'" msgstr "Keine weiteren Optionen mit `-x' erlaubt." -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "%s: Die Argumente müssen Prozess- oder Jobbezeichnungen sein." +msgstr "%s: Die Argumente müssen Prozess- oder Job-IDs sein." -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Unbekannter Fehler." -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "Ausdruck erwartet." -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: Ist kein Array." +msgstr "%s: Ist kein indiziertes Array." -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "" +msgstr "%s: Ungültige Dateideskriptor-Angabe." -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "%d: Ungültiger Dateibezeichner: %s" +msgstr "%d: Ungültiger Dateideskriptor: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: Ungültige Zeilenanzahlangabe." -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" -msgstr "%s: Ungültiger Zeilenindex für den Array Beginn." +msgstr "%s: Ungültiger Arrayanfang." -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "Fehlender Name für die Array Variable." +msgstr "Fehlender Name für die Arrayvariable." -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "Die Array Variablen Unterstützung ist in dieser Shell nicht vorhanden." +msgstr "" +"Die Unterstützung für Arrayvariablen ist in dieser Shell nicht vorhanden." -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "`%s': Fehlendes Formatierungszeichen." +msgstr "»%s«: Fehlendes Formatierungszeichen." + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "»%c«: Ungültige Zeitformatangabe." -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "`%c': Ungültiges Formatierungszeichen." +msgstr "»%c«: Ungültiges Formatierungszeichen." -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "Warnung: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "Formatleseproblem: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "Fehlende hexadezimale Ziffer nach \\x." -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "Fehlende Unicode-Ziffer für \\%c." + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "kein anderes Verzeichnis" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: Ungültiges Argument." + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "Der Verzeichnisstapel ist leer." -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "" +msgstr "Verzeichnisstapelindex" -#: builtins/pushd.def:683 -#, fuzzy +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -624,16 +742,26 @@ msgid "" "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" +"Zeigt die Liste der gegenwärtig gespeicherten Verzeichnisse an. Durch\n" +" das Kommando »pushd« werden die Verzeichnisse auf den Stapel gelegt\n" +" und können durch das Kommando »popd« wieder vom Stapel entfernt\n" " werden.\n" "\n" " Optionen:\n" -" -c Verzeichnisstapel durch Löschen aller Einträge bereinigen.\n" -" -l " +"\t-c\tVerzeichnisstapel durch Löschen aller Einträge bereinigen.\n" +"\t-l\tDas Heimatverzeichnis wird nicht mit vorangestellter Tilde\n" +"\tausgegeben\n" +"\t-p\tDen Verzeichnisstapel zeilenweise ausgeben.\n" +"\t-v\tDen Verzeichnisstapel zeilenweise mit vorangestellter\n" +"\tPositionsnummer auseben.\n" +"\n" +" Argumente:\n" +"\t+N\tZeigt den N'ten Eintrag von links an, der von »dirs« ausgegeben\n" +"\twird, wenn es ohne Optionen aufgerufen wird, beginnend mit Null.\n" +"\t-N\tZeigt den N'ten Eintrag von rechts an, der von »dirs« ausgegeben\n" +"\twird, wenn es ohne Optionen aufgerufen wird, beginnend mit Null." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -657,8 +785,8 @@ msgid "" " \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" +"Legt einen 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" @@ -667,19 +795,19 @@ msgstr "" "\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" +"\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" +"\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." +" Das Kommando »dirs« Kommando zeigt den Verzeichnisstapel an." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -699,8 +827,8 @@ msgid "" " \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" +"Entfernt Einträge vom Stapel. Ohne Argumente wird der oberste Eintrag\n" +" gelöscht und anschließend in das das neue oben liegende Verzeichnis\n" " gewechselt.\n" " \n" " Optionen:\n" @@ -710,539 +838,623 @@ msgstr "" " 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" +"\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" +"\tentfernt z.B. »popd -0« den letzten und »popd +1« den vorletzten\n" "\tEintrag.\n" " \n" -" Das `dirs' Kommando zeigt den Verzeichnisstapel an." +" Das Kommando »dirs« zeigt den Verzeichnisstapel an." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: Ungültige Wartezeitangebe." -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "Lesefehler: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "" +"»Return« ist nur aus einer Funktion oder einem mit »source« ausgeführten " +"Skript möglich." -#: builtins/set.def:768 +#: builtins/set.def:869 msgid "cannot simultaneously unset a function and a variable" msgstr "" +"Gleichzeitiges »unset« einer Funktion und einer Variable ist nicht möglich." -#: 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" -msgstr "%s: Ist kein Array." +msgstr "%s: Ist keine Feldvariable." -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: Ist keine Funktion." -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: Exportieren nicht möglich." + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "" +msgstr "Verschiebeanzahl" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "Kann nicht Shell Optinen gleichzeitig aktivieren und deaktivieren." +msgstr "Kann nicht Shelloptionen gleichzeitig aktivieren und deaktivieren." -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "" +msgstr "%s: Ungültiger Name für Shelloption." #: builtins/source.def:128 msgid "filename argument required" -msgstr "Ein Dateiname wird as Argument benötigt." +msgstr "Ein Dateiname wird als Argument benötigt." -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: Datei nicht gefunden." -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "Kann die Shell nicht unterbrechen." # logout -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "Kann die Loginshell nicht unterbrechen." -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s ist ein Alias von »%s«.\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s Ist ein reserviertes Schlüsselwort der Shell.\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s ist eine Funktion.\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s ist eine spezielle eingebaute Funktion.\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s ist eine von der Shell mitgelieferte Funktion.\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s ist %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "%s ist gehasht (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: Ungültiges Grenzwertargument." -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "`%c': Falsches Kommando." -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: Kann die nicht Grenze setzen: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "Grenze" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: Kann die Grenze nicht ändern: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" -msgstr "" +msgstr "Oktalzahl" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "`%c': Ungültiger Operator für den symbolischen Modus." -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "`%c': Ungültiges Zeichen im symbolischen Modus." -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " Zeile " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "Letztes Kommando: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Abbruch..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFO: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "Warnung: " + +#: error.c:488 msgid "unknown command error" msgstr "Unbekanntes Kommando" -#: error.c:407 +#: error.c:489 msgid "bad command type" -msgstr "" +msgstr "Falscher Kommandotyp" # Programmierfehler -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "Falscher Sprung" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aZu lange keine Eingabe: Automatisch ausgeloggt.\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "TIMEFORMAT: `%c': Ungültiges Formatzeichen." +msgstr "TIMEFORMAT: »%c«: Ungültiges Formatzeichen." + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" -#: execute_cmd.c:2075 +#: execute_cmd.c:2524 msgid "pipe error" msgstr "Pipe-Fehler" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: Maximale Schachtelungstiefe überschritten (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: Maximale Quellcode-Schachtelungstiefe überschritten (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximale Schachtelungstiefe für Funktionen überschritten (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: Verboten: `/' ist in Kommandonamen unzulässig." +msgstr "%s: eingeschränkt: `/' ist in Kommandonamen unzulässig." -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: Kommando nicht gefunden." -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: Kann die Datei nicht ausführen." + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: Defekter Interpreter" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: Kann die Binärdatei nicht ausführen: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "»%s« ist eine spezielle eingebaute Funktion." + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "Kann fd %d nicht auf fd %d verdoppeln." -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "Zu viele Rekursionen in Ausdruck." -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "Rekursionsstapel leer." -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "Syntaxfehler im Ausdruck." -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "Zuweisung zu einer Nicht-Variablen versucht." +msgstr "Versuchte Zuweisung zu etwas, das keine Variable ist." -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "Syntaxfehler in der Variablenzuweisung." + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "Division durch 0." -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "Fehler: Falscher Zuweisungsoperator." -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "`:' erwartet für ein bedingten Ausdruck." +msgstr "»:« für ein bedingten Ausdruck erwartet." -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "Der Exponent ist kleiner als 0." -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "" "Nach einem Präinkrement oder Prädekrement wird ein Bezeichner erwartet." -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "Fehlende `)'" +msgstr "Fehlende »)«" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "Syntax Fehler: Operator erwartet." +msgstr "Syntaxfehler: Operator erwartet." -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "Syntaxfehler: Ungültiger arithmetischer Operator." -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s%s%s: %s (Fehlerverursachendes Zeichen ist \\\"%s\\\")." +msgstr "%s%s%s: %s (Fehlerverursachendes Zeichen ist \"%s\")." -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "Ungültige Basis." -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "Ungültige Ganzzahlenkonstante." + +#: expr.c:1603 msgid "value too great for base" -msgstr "Der Wert ist zu groß für die aktuelle Basis." +msgstr "Der Wert ist für die aktuelle Basis zu groß." -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: Fehler im Ausdruck.\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getwd: Kann nicht auf das übergeordnete Verzeichnis zugreifen." +msgstr "getcwd: Kann auf die übergeordneten Verzeichnisse nicht zugreifen." -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "Konnte den No-Delay Modus für fd %d nicht wieder herstellen." +msgstr "Konnte den No-Delay-Modus für fd %d nicht wiederherstellen." -#: input.c:258 +#: input.c:266 #, 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." +msgstr "Kann keinen neuen Dateideskriptor für die Eingabe von fd %d zuweisen." # Debug Ausgabe -#: input.c:266 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp pipe" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "" +msgid "forked pid %d appears in running job %d" +msgstr "Die geforkte PID %d erscheint im laufenden Prozess %d." -#: jobs.c:1113 +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "Lösche den gestoppten Prozess %d der Prozessgruppe %ld." + +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00024.html +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" msgstr "" # Programmierfehler -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" -msgstr "describe_pid: %ld: Prozeßnummer existiert nicht." +msgstr "describe_pid: %ld: Prozessnummer existiert nicht." -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Fertig" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Angehalten" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Angehalten(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Läuft" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Fertig(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Exit %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Unbekannter Status" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(Speicherabzug geschrieben) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr " (wd: %s)" +msgstr " (Verz.: %s)" # interner Fehler -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" -msgstr "wait: Prozeß %ld wurde nicht von dieser Shell gestartet." +msgstr "wait: Prozess %ld wurde nicht von dieser Shell gestartet." -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: Der Job %d ist gestoppt." -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: Kein aktueller Job." + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "%s: Programm ist beendet." +msgstr "%s: Der Job ist beendet." -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: Der Job %d läuft bereits im Hintergrund." -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" # Debug Ausgabe -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: Zeile %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (Speicherabzug geschrieben)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(gegenwärtiges Arbeitsverzeichnis ist: %s)\n" # interner Fehler -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "initialize_jobs: getpgrp war nicht erfolgreich." +msgstr "initialize_job_control: getpgrp war nicht erfolgreich." + +# interner Fehler +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: Keine Jobsteuerung im Hintergrund." # interner Fehler -#: jobs.c:3639 +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: line discipline" # interner Fehler -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "Kann die Prozessgruppe des Terminals nicht setzen (%d)." -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "Keine Job Steuerung in dieser Shell." +msgstr "Keine Jobsteuerung in dieser Shell." -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "malloc: Speicherzusicherung gescheitert: %s.\n" +msgstr "malloc: Zusicherung gescheitert: %s.\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" -"\\r\n" -"malloc: %s:%d: Speicherzusicherung verpfuscht\\r\n" +"\r\n" +"malloc: %s:%d: Zusicherung verpfuscht\\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "Unbekannt" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" -"Malloc: Ein frei gekennzeichneter Speicherbereich wurde überschrieben." +msgstr "Malloc: Ein internet Speicherbereich (free list) wurde überschrieben." -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "free: Wurde für bereits freigegebenen Speicherbereich aufgerufen." +msgstr "free: Wurde für bereits freigegebenen Speicherbereich aufgerufen." -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: Wurde für nicht zugeordneten Speicherbereich aufgerufen." -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 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 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: Underflow erkannt; magic8 beschädigt." + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free: Beginn und Ende Segmentgrößen sind unterschiedlich." -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: Mit nicht zugewiesenen Argument aufgerufen." -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 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 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: Underflow erkannt; magic8 beschädigt." + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "realloc: Beginn und Ende Segmentgrößen sind unterschiedlich.<" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "Ungültige Basis" @@ -1261,305 +1473,362 @@ msgstr "%s: unbekannter Dienst." msgid "%s: bad network path specification" msgstr "%s: Fehlerhafte Netzwerkspfadangabe." -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "Der Netzwerkbetrieb ist nicht unterstützt." -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: Kann die Regionseinstellungen nicht ändern (%s)." -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: Kann die Regionseinstellungen nicht ändern (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: Kann nicht %lu Bytes reservieren." +msgstr "setlocale: %s: Kann die Regionseinstellungen nicht ändern (%s)." -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: Kann nicht %lu Bytes reservieren." +msgstr "setlocale: %s: Kann die Regionseinstellungen nicht ändern (%s): %s" # Du oder Sie? -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Sie haben Post in $_." -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Sie haben neue Post in $_." -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Die Post in %s wurde bereits gelesen.\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "Syntaxfehler: Ein arithmetischer Ausdruck wird verlangt." +msgstr "Syntaxfehler: Es wird ein arithmetischer Ausdruck benötigt." -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "Syntax Fehler: unerwartetes `;'." -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "Syntax Fehler: `((%s))'." +msgstr "Syntaxfehler: »((%s))«." # interner Fehler -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: Falscher Befehlstyp %d." -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" msgstr "" +"Das in der Zeile %d beginnende Here-Dokument geht bis zum Dateiende " +"(erwartet wird »%s«)." -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" msgstr "" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "Dateiende beim Suchen nach `%c' erreicht." +msgstr "Dateiende beim Suchen nach »%c« erreicht." -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "Dateiende beim Suchen nach `]]' erreicht." +msgstr "Dateiende beim Suchen nach »]]« erreicht." -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "Syntaxfehler im bedingten Ausdruck: Unerwartetes Zeichen `%s'." +msgstr "Syntaxfehler im bedingten Ausdruck: Unerwartetes Symbol »%s«." -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "Syntaxfehler im bedingen Ausdruck." +msgstr "Syntaxfehler im bedingten Ausdruck." -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "Unerwartetes Zeichen: `%s' anstatt von `)'" +msgstr "Unerwartetes Zeichen: »%s« anstatt von »)«" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" -msgstr "`)' erwartet." +msgstr "»)« erwartet." -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "Syntaxfehler beim unerwarteten Wort `%s'" +msgstr "Syntaxfehler beim unerwarteten Symbol »%s«" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "Syntaxfehler beim unerwarteten Wort `%s'" +msgstr "Syntaxfehler bei »%s«" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "Syntax Fehler: Unerwartetes Dateiende." +msgstr "Syntaxfehler: Unerwartetes Dateiende." -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" -msgstr "Syntax Fehler" +msgstr "Syntaxfehler" # Du oder Sie? -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Benutze \"%s\" um die Shell zu verlassen.\n" +msgstr "Verwenden Sie »%s«, um die Shell zu verlassen.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "Dateiende beim Suchen nach passender `)' erreicht." +msgstr "Dateiende beim Suchen nach zugehöriger »)« erreicht." -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" +msgstr "completion: Funktion »%s« nicht gefunden." + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" msgstr "" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: Falsches Verbindungszeichen `%d'." +msgstr "print_command: Falsches Verbindungszeichen »%d«." -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: Ungültiger Dateibezeichner: %s" +msgstr "xtrace_set: %d: Ungültiger Dateideskriptor." -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf: »%c«: Ungültiges Formatsymbol." -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "" +msgstr "Dateideskriptor außerhalb des gültigen Bereichs." -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: Mehrdeutige Umlenkung." -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: Kann existierende Datei nicht überschreiben." -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: Gesperrt: Die Ausgabe darf nicht umgeleitet werden." +msgstr "%s: eingeschränkt: Die Ausgabe darf nicht umgeleitet werden." -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" -msgstr "" +msgstr "Kann die temporäre Datei für das Hier-Dokument nicht anlegen: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: Kann einem Feldelement keine Liste zuweisen." +msgstr "%s: Kann fd keiner Variable zuweisen." -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "/dev/(tcp|udp)/host/port Wird ohne Netzwerk nicht unterstützt" +msgstr "" +"Dateinamen der Form /dev/(tcp|udp)/host/port werden ohne Netzwerk nicht " +"unterstützt" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "" +msgstr "Umleitungsfehler: Verdoppeln des Dateibezeichners nicht möglich." -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "Konnte das /tmp Verzeichnis nicht finden, bitte anlegen." +msgstr "Konnte das Verzeichnis »/tmp« nicht finden, bitte anlegen." -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "/tmp muß ein gültiger Verzeichnisname sein." +msgstr "/tmp muss ein Verzeichnis sein." + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "Der hübsche Druckmodus wird in interaktiven Schells ignoriert." -#: shell.c:884 +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: Ungültige Option" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "Konnte die UID nicht in %d ändern: Die effektive UID ist %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "Konnte die GID nicht in %d ändern: Die effektive GID ist %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "Kann keinen Debugger starten. Der Debugmodus ist gesperrt." + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Ist ein Verzeichnis." + +#: shell.c:1907 msgid "I have no name!" msgstr "Ich habe keinen Benutzernamen!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, Version %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"Aufruf:\t%s [Lange GNU-Option] [Option] ...\n" +"\t%s [Lange GNU-Option] [Option] Script-Datei ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "Lange GNU Optionen:\n" +msgstr "Lange GNU-Optionen:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD oder -c Kommando oder -O shopt_option\t\t(Nur Aufruf)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s oder Option -o\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "" +"Geben Sie »%s -c \"help set\"« ein, um mehr über Shell-Optionen zu " +"erfahren.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "" +"Geben Sie »%s -c help« ein, um mehr über eingebaute Shellkommandos zu " +"erfahren.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "Mit dem `bashbug' Kommando können Fehler gemeldet werden.\n" +msgstr "Mit dem Kommando »bashbug« Kommando können Sie Fehler melden.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Bash-Homepage: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Allgemeine Hilfe für GNU-Software: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: Ungültige Operation" @@ -1638,11 +1907,11 @@ msgstr "Angehalten (Signal)" #: siglist.c:127 msgid "Continue" -msgstr "Prozeßbearbeitung wieder aufgenommen." +msgstr "Prozessbearbeitung wieder aufgenommen." #: siglist.c:135 msgid "Child death or stop" -msgstr "Kindprozeß abgebrochen oder gestoppt." +msgstr "Kindprozess abgebrochen oder gestoppt." #: siglist.c:139 msgid "Stopped (tty input)" @@ -1674,11 +1943,11 @@ msgstr "Alarm (Profil)" #: siglist.c:167 msgid "Window changed" -msgstr "Fenster geändert." +msgstr "Fenster geändert" #: siglist.c:171 msgid "Record lock" -msgstr "Datei blockiert." +msgstr "Datei blockiert" #: siglist.c:175 msgid "User signal 1" @@ -1690,19 +1959,19 @@ msgstr "Nutzersignal 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "HFT Eingabedaten ausstehend." +msgstr "HFT Eingabedaten ausstehend" #: siglist.c:187 msgid "power failure imminent" -msgstr "Spannungsausfall steht bevor." +msgstr "Spannungsausfall steht bevor" #: siglist.c:191 msgid "system crash imminent" -msgstr "Systemausfall steht bevor." +msgstr "Systemausfall steht bevor" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "Verlege den Prozeß auf einen anderen Prozessor." +msgstr "Verlege den Prozess auf einen anderen Prozessor" #: siglist.c:199 msgid "programming error" @@ -1710,225 +1979,290 @@ msgstr "Programmierfehler" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "HFT-Monitormodus erlaubt." +msgstr "HFT-Monitormodus erlaubt" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "HFT-Monitormodus abgeschaltet." +msgstr "HFT-Monitormodus abgeschaltet" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "HFT-Tonfolge beendet." +msgstr "HFT-Tonfolge beendet" #: siglist.c:215 msgid "Information request" msgstr "Informationsanforderung" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Unbekannte Signalnummer." - -#: siglist.c:225 +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00025.html +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Unbekanntes Signal Nr.: %d." -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "Falsche Ersetzung: Keine schließende `%s' in `%s' enthalten." +msgstr "Falsche Ersetzung: Kein schließendes »%s« in »%s« enthalten." -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "%s: Kann einem Feldelement keine Liste zuweisen." -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "Kann keine Pipe für die Prozeßersetzung erzeugen." +msgstr "Kann keine Pipe für die Prozessersetzung erzeugen." -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "Kann den Kindsprozess für die Prozeßersetzung nicht erzeugen." +msgstr "Kann den Kindsprozess für die Prozessersetzung nicht erzeugen." -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" -msgstr "Kann nicht die benannte Pipe %s zum lesen öffnen." +msgstr "Kann nicht die benannte Pipe %s zum Lesen öffnen." -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "Kann nicht die benannte Pipe %s zum schreiben öffnen." +msgstr "Kann nicht die benannte Pipe %s zum Schreiben öffnen." -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "Kann die benannte Pipe %s nicht auf fd %d." +msgstr "Kann die benannte Pipe %s nicht auf fd %d duplizieren." -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "Kommandoersetzung: NULL-Byte in der Eingabe ignoriert." + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "Kann keine Pipes für Kommandoersetzung erzeugen." -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "Kann keinen Unterprozess für die Kommandoersetzung erzeugen." # interner Fehler -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "Kommandoersetzung: Kann Pipe nicht als fd 1 duplizieren." +msgstr "command_substitute: Kann Pipe nicht als Dateideskriptor 1 duplizieren." + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: Ungültiger Variablenname für Namensreferenz." + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: Ungültige indirekte Expansion." + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: Ungültiger Variablenname." + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: Der Parameter ist nicht gesetzt." -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: Parameter ist Null oder nicht gesetzt." +msgstr "%s: Parameter ist leer oder nicht gesetzt." # interner Fehler -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: Teilstring-Ausdruck < 0." -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: Falsche Variablenersetzung." +msgstr "%s: Falsche Substitution." -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: Kann so nicht zuweisen." -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"Zukünftige Versionen dieser Shell werden das Auswerten arithmetischer " +"Ersetzungen erzwingen." -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "Falsche Ersetzung: Keine schließende \"`\" in %s." +msgstr "Falsche Ersetzung: Kein schließendes »`« in %s." -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "Keine Entsprechung: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "Argument erwartet." -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: Ganzzahliger Ausdruck erwartet." -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "`)' erwartet." +msgstr "»)« erwartet." -#: test.c:265 +#: test.c:267 #, 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." +msgstr "»)« erwartet, %s gefunden." -#: test.c:449 test.c:736 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: Zweistelliger (binärer) Operator erwartet." -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: Einstelliger (unärer) Operator erwartet." + +#: test.c:896 msgid "missing `]'" -msgstr "Fehlende `]'" +msgstr "Fehlende »]«" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Syntax Fehler: »%s« unerwartet." -#: trap.c:203 +#: trap.c:220 msgid "invalid signal number" msgstr "Ungültige Signalnummer." -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "Traphandler: Maximale Traphandler-Ebene überschritten (%d)" + +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" -msgstr "" +msgstr "run_pending_traps: Ungültiger Wert in trap_list[%d]: %p" -#: trap.c:331 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" msgstr "" # Programmierfehler -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: Falsches Signal %d." -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "Fehler beim Importieren der Funktionsdefinition für `%s'." +msgstr "Fehler beim Importieren der Funktionsdefinition für »%s«." -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "Der Shell-Level (%d) ist zu hoch und wird auf 1 zurückgesetzt." -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: no function context at current scope" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: Der Variable darf kein Wert zugewiesen werden." + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" msgstr "" -#: variables.c:3159 +# Interner Fehler +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assigning integer to name reference" + +# Interner Fehler +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: no function context at current scope" -#: variables.c:3376 -#, fuzzy, c-format +# Interner Fehler +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: Parameter ist Null oder nicht gesetzt." +msgstr "%s has null exportstr" -#: variables.c:3381 variables.c:3390 +# Interner Fehler +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "invalid character %d in exportstr for %s" -#: variables.c:3396 +# Interner Fehler +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "no `=' in exportstr for %s" -#: variables.c:3835 +# Interner Fehler +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" +msgstr "pop_var_context: head of shell_variables not a function context" -#: variables.c:3848 +# Interner Fehler +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: no global_variables context" -#: variables.c:3922 +# Interner Fehler +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" +msgstr "pop_scope: head of shell_variables not a temporary environment scope" -#: variables.c:4678 -#, fuzzy, c-format +# Interner Fehler +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: Kann die Datei nicht öffnen: %s" +msgstr "%s: %s: cannot open as FILE" -#: variables.c:4683 -#, fuzzy, c-format +# Interner Fehler +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: Ungültiger Dateibezeichner: %s" +msgstr "%s: %s: invalid value for trace file descriptor" + +# Interner Fehler +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibility value out of range" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright (C) 2009 Free Software Foundation, Inc." +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1936,181 +2270,160 @@ msgstr "" "Lizenz GPLv3+: GNU GPL Version 3 oder jünger \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Dies ist freie Software. Sie darf verändert und verteilt werden." -#: version.c:92 version2.c:89 +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Es wird keine Garantie gewährt, soweit das Gesetz es zulässt." + +#: xmalloc.c:93 #, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "Für dieses Programm besteht keinerlei Garantie.\n" +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: Konnte keine %lu Bytes reservieren (%lu bytes reserviert)." -#: version2.c:86 -#, fuzzy, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "Copyright (C) 2009 Free Software Foundation, Inc." +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: Konnte keine %lu Bytes reservieren." -#: version2.c:87 -#, fuzzy, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" -"Lizenz GPLv3+: GNU GPL Version 3 oder jünger \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 +#: xmalloc.c:165 +#, 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)." +msgstr "%s: %s:%d: Konnte keine %lu Bytes reservieren (%lu bytes reserviert)." -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: Kann nicht %lu Bytes reservieren." +msgstr "%s: %s:%d: Konnte keine %lu Bytes reservieren." -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [Name[=Wert] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] Name [Name ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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]" +"bind [-lpsvPSVX] [-m Tastaturtabelle] [-f Dateiname] [-q Name] [-u Name]\n" +"\t[-r Tastenfolge] [-x Tastenfolge:Shell Kommando]\n" +"\t[Tastenfolge:readline-Funktion oder -Kommando]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [Shellkommando [Argument ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [Verzeichnis]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "Wahr" - -#: builtins.c:72 -msgid "false" -msgstr "Falsch" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlrntux] [-p] [Name[=Wert] ...]" +# #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] Name[=Wert] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [Option] Name[=Wert] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [Argument ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [Argument ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f Dateiname] [Name ...]" -#: builtins.c:92 +#: builtins.c:94 msgid "eval [arg ...]" msgstr "eval [Argument ...]" -#: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "getopts Optionen Variable [Argumente]" - +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00026.html #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "exec [-cl] [-a Name] [Kommando [Argumente ...]] [Umleitung ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts Optionen [Argumente ...]" +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00026.html #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a Name] [Kommando [Argument ...]] [Umleitung ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [Jobbezeichnung]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [Jobbezeichnung ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p Pfadname] [-dt] [Name ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [Muster ...]" +msgstr "help [-dms] [Muster ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" @@ -2118,128 +2431,125 @@ msgstr "" "history [-c] [-d Offset] [n] oder history -anrw [Dateiname] oder history -ps " "Argument [Argument...]" -#: builtins.c:125 +#: builtins.c:127 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [Jobbezeichnung ... | pid ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" msgstr "" -"kill [-s Signalname | -n Signalnummer | -Signalname] [pid | job] ... oder " +"kill [-s Signalname | -n Signalnummer | -Signalname] pid | jobspec ... oder " "kill -l [Signalname]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let Argument [Argument ...]" -#: builtins.c:136 -#, fuzzy +#: builtins.c:138 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 ...]" +"read [-ers] [-a Feld] [-d Begrenzer] [-i Text] [-n Zeichenanzahl] [-N " +"Zeichenanzahl] [-p Prompt] [-t Zeitlimit] [-u fd] [Name ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o Option] [--] [Argument ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [Name[=Wert] ...] oder export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NAME ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [Name[=Wert] ...] oder readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [Name[=Wert] ...] oder export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [Name[=Wert] ...] oder readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source Dateiname [Argumente]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". Dateiname [Argumente]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [Ausdruck]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ Argument... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[Argument] Signalbezeichnung ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] Name [Name ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [Grenzwert]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [Grenze]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [Modus]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p Variable] [id ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for Name [in Wortliste ... ] ; do Kommandos; done" +msgstr "for Name [in Wort ... ] ; do Kommandos; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( Ausdr1; Ausdr2; Ausdr3 )); do Kommandos; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "select Name [in Wortliste ... ;] do Kommandos; done" +msgstr "select Name [in Wort ... ;] do Kommandos; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] Pipeline" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case Wort in [Muster [| Muster]...) Kommandos ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2247,100 +2557,108 @@ msgstr "" "if Kommandos; then Kommandos; [ elif Kommandos; then Kommandos; ]... [ else " "Kommandos; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while Kommandos; do Kommandos; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until Kommandos; do Kommandos; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [Name] Kommando [Umleitungen]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function Name { Kommandos ; } oder Name () { Kommandos ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ Kommandos ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "Jobbezeichnung [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( Ausdruck ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ Ausdruck ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "variables - Namen und Bedeutung einiger Shell Variablen" +msgstr "variables - Namen und Bedeutung einiger Shellvariablen" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | Verzeichnis]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [Optionsname ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v var] Format [Argumente]" -#: builtins.c:229 -#, fuzzy +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00027.html +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 ...]" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o Option] [-A Aktion] [-G " +"Suchmuster] [-W Wortliste] [-F Funktion] [-C Kommando] [-X Filtermuster] [-" +"P Prefix] [-S Suffix] [Name \n" +"...]" -#: builtins.c:233 +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00027.html +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 " +"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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o Option] [-DEI] [Name ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"mapfile [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t] [-u fd]\n" +" [-C Callback] [-c Menge] [Feldvariable]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"readarray [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t]\n" +" [-u fd] [-C Callback] [-c Menge] [Feldvariable]" -#: builtins.c:254 +# alias +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2352,7 +2670,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2360,38 +2678,41 @@ msgid "" " 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" +" Ohne Argumente wird die Liste der Aliase (Synonyme) in der Form\n" +" »alias Name=Wert« auf die Standardausgabe ausgegeben.\n" +"\n" +" Sonst wird ein Alias für jeden angegebenen Namen definiert, wenn\n" +" für diesen auch ein »Wert« angegeben wurde. Wenn »Wert« mit einem\n" +" Leerzeichen endet, dann wird auch das nächste Wort auf Aliase\n" +" überprüft.\n" +"\n" +" Optionen:\n" +" -p\tGibt alle definierten Aliase aus.\n" +"\n" " Rückgabewert:\n" -" Meldet Erfolg, außer wenn NAME nicht existiert." +" Meldet Erfolg, außer wenn ein »Name« angegeben worden ist, für den\n" +" kein Alias definiert wurde." -#: builtins.c:276 +# unalias +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +"Entfernt jeden angegebenen Namen von der Aliasliste.\n" +"\n" " Optionen:\n" -" -a\tEnferne alle Alias Definitionen.\n" -" \n" -" Gibt immer Erfolg zurück, wenn der Name existiert." +" -a\tEnfernt alle Alias-Definitionen.\n" +"\n" +" Gibt immer Erfolg zurück, außer wenn der Alias nicht existiert." -#: builtins.c:289 +# bind +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2425,12 +2746,71 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" +"Bestimmt Readline Tastenzuordnungen und Variablen.\n" +" \n" +" Weist eine Tastensequenz einer Readlinefunktion oder -makro zu\n" +" oder setzt eine Readlinevariable. Die Argumentsyntax ist zu\n" +" den Einträgen in ~/.inputrc äquivalent, aber sie müssen als\n" +" einzelnes Argument übergeben werden. Z.B: bind '\"\\C-x\\C-r\":\n" +" re-read-init-file'.\n" +" \n" +" Optionen:\n" +" -m Keymap Benutzt KEYMAP as Tastaturbelegung für die " +"Laufzeit\n" +" dieses Kommandos. Gültige Keymapnamen sind: " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command und vi-insert.\n" +" -l Listet Funktionsnamen auf.\n" +" -P Listet Funktionsnamen und Tastenzuordnungen auf.\n" +" -p Listet Funktionsnamen und Tastenzuordnungen so " +"auf,\n" +" dass sie direkt als Eingabe verwendet werden " +"können.\n" +" -S Listet Tastenfolgen und deren Werte auf, die " +"Makros \n" +" aufrufen.\n" +" -s Listet Tastenfolgen und deren Werte auf, die " +"Makros \n" +" aufrufen, dass sie als Eingabe wiederverwendet " +"werden\n" +" können.\n" +" -V Listet Variablennamen und Werte auf.\n" +" -v Listet Variablennamen und Werte so auf, dass sie " +"als\n" +" Eingabe verwendet werden können.\n" +" -q Funktionsname Sucht die Tastenfolgen, welche die angegebene\n" +" Funktion aufrufen.\n" +" -u Funktionsname Entfernt alle der Funktion zugeordneten " +"Tastenfolgen.\n" +" -r Tastenfolge Entfernt die Zuweisungen der angegebeben " +"Tastenfolge.\n" +" -f Dateiname Liest die Tastenzuordnungen aus der angegebenen " +"Datei.\n" +" -x Tastenfolge:Shellkommando\tWeist der Tastenfolge das " +"Shellkommando\n" +" \t\t\t\t\tzu.\n" +" -X Listet mit -x erzeugte\n" +" Tastenfolgen und deren Werte\n" +" auf, die Makros aufrufen, dass\n" +" sie als Eingabe wiederverwendet " +"werden\n" +" können.\n" +" \n" +" Rückgabewert: \n" +" Bind gibt 0 zurück, wenn keine unerkannte Option angegeben wurde\n" +" oder ein Fehler eintrat." -#: builtins.c:326 +# break +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2440,16 +2820,17 @@ msgid "" " 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" +"Verlässt for-, while- oder until-Schleifen.\n" +"\n" +" Break beendet eine »for«-, »while«- oder »until«- Schleife. Wenn »n«\n" +" angegeben ist, werden entsprechend viele geschachtelte Schleifen " +"beendet.\n" +"\n" " Rückgabewert:\n" -" Der Rückgabewert ist 0, es sei den N ist größer oder gleich 1." +" Der Rückgabewert ist 0, außer »n« ist nicht größer oder gleich 1." -#: builtins.c:338 +# continue +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2460,16 +2841,16 @@ msgid "" " 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" +"\n" +" Springt zum Schleifenanfang der aktuellen »for«, »while« oder »until«\n" +" Schleife. Wenn »n« angegeben ist, wird zum Beginn der »n«-ten\n" " übergeordneten Schleife gesprungen.\n" -" \n" +"\n" " Rückgabewert:\n" -" Der Rückgabewert ist 0, außer wenn N größer oder gleich 1 ist." +" Der Rückgabewert ist 0, außer wenn »n« nicht größer oder gleich 1 ist." -#: builtins.c:350 +# builtin +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2480,20 +2861,21 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" 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" +"Führt ein in der Shell definiertes Kommando aus.\n" +"\n" +" Führt ein in der Shell definiertes Kommando ohne vorherige\n" +" Befehlssuche aus. Dies ist dann nützlich, wenn das Kommando als\n" +" Shell-Funktion reimplementiert werden soll, aber das Kommando\n" +" innerhalb der neuen Funktion aufgerufen wird.\n" +"\n" " Rückgabewert: \n" -" Der Rückgabewert der eingebauten Schellfunkrion oder Falsch, wenn\n" -" diese nicht existiert." +" Der Rückgabewert des aufgerufenen Kommandos oder »falsch«, wenn\n" +" dieses nicht existiert." -#: builtins.c:365 +# caller +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2508,8 +2890,22 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" +"Gibt Informationen zum aktuellen Subroutinenaufruf aus.\n" +"\n" +" Ohne Argument wird die Zeilennummer und der Dateiname angezeigt. Mit\n" +" Argument werden Zeilennummer, Subroutinenname und Dateiname ausgegeben.\n" +" Mit diesen Informationen kann ein Stacktrace erzeugt werden.\n" +"\n" +" Das Argument gibt die angezeigte Position im Funktionsaufrufstapel an,\n" +" wobei 0 der aktuelle Funktionsaufruf ist.\n" +"\n" +" Rückgabewert:\n" +" Ist ungleich 0 wenn keine Shellfunktion ausgeführt wird oder das " +"Argument\n" +" ungültig ist, sonst 0." -#: builtins.c:383 +# cd +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2532,47 +2928,76 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; 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" +"\n" +" Wechselt in das angegebene Arbeitsverzeichnis. Ohne Angabe eines\n" +" Verzeichnisses wird in das in der Variable HOME definierte\n" +" Verzeichnis gewechselt.\n" +"\n" +" Die Variable CDPATH definiert den Suchpfad, in dem nach dem\n" +" angegebenen Verzeichnisnamen gesucht wird. Mehrere Pfade werden\n" +" durch Doppelpunkte »:« getrennt. Ein leerer Pfadname entspricht\n" +" dem aktuellen Verzeichnis. Mit einem vollständigen Pfadnamen wird\n" +" CDPATH nicht benutzt.\n" +"\n" +" Wird kein entsprechendes Verzeichnis gefunden und die Shelloption\n" +" »cdable_vars« ist gesetzt, dann wird der `Wert' als Variable\n" +" interpretiert. Dessen Inhalt wird dann als Verzeichnisname\n" +" 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" +" -L Erzwingt, dass symbolischen Links gefolgt wird.\n" +" Symbolische Links im aktuellen Verzeichnis werden nach\n" +" dem übergeordneten Verzeichnis aufgelöst.\n" +" -P Symbolische Links werden ignoriert. Symbolische\n" +" Links im aktuellen Verzeichnis werden vor dem\n" +" übergeordneten Verzeichnis aufgelöst.\n" +" -e Wenn mit der Option »-P« das aktuelle Arbeitsverzeichnis\n" +" nicht ermittelt werden kann, wird mit einem Rückgabewert\n" +" ungleich 0 abgebrochen.\n" +" -@ Wenn es das System unterstützt, wird eine Datei mit\n" +" erweiterten Attributen als ein Verzeichnis angezeigt,\n" +" welches die erweiterten Attribute enthält.\n" +"\n" +" Standardmäßig wird symbolischen Links gefolgt (Option -L).\n" +" Das übergeordnete Verzeichnis wird ermittelt, indem der\n" +" Dateiname am letzten Schrägstrich gekürzt wird, oder es wird der\n" +" Anfang von DIR verwendet.\n" +"\n" " Rückgabewert:\n" -" Wenn das Verzeichnic gewechselt wurde 0; sonst ungleich Null." +" Der Rückgabewert ist 0, wenn das Verzeichnis erfolgreich\n" +" gewechselt wurde, oder wenn die Option -P angegeben und $PWD\n" +" erfolgreich gesetzt werden konnte. Sonst ist er ungleich 0." -#: builtins.c:411 +# pwd +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2580,10 +3005,24 @@ msgid "" " 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 `['.<" +msgstr "" +"Gibt den Namen des aktuellen Arbeitsverzeichnisses aus.\n" +"\n" +" Optionen:\n" +" -L Gibt den Inhalt der Variable $PWD aus, wenn sie das " +"aktuelle\n" +" Arbeitsverzeichnis enthält.\n" +" -P Gibt den physischen Verzeichnispfad aus, ohne symbolische\n" +" Links.\n" +"\n" +" Standardmäßig wird immer die Option »-L« gesetzt.\n" +"\n" +" Rückgabewert:\n" +" Ist 0, außer wenn eine ungültige Option angegeben oder das aktuelle\n" +" Verzeichnis nicht lesbar ist." # colon -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2597,25 +3036,35 @@ msgstr "" " Leeranweisung; das Kommando hat keine Wirkung.\n" "\n" " Rückgabewert:\n" -" Das Kommando ist immer erfolgreich." +" Das Kommando ist immer »wahr«." -#: builtins.c:439 +# true +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Gibt »wahr« zurück.\n" +" \n" +" Rückgabewert:\n" +" Immer »wahr«." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"Gibt »falsch« zurück.\n" +" \n" +" Rückgabewert:\n" +" Immer »falsch«." -#: builtins.c:457 +# command +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2625,16 +3074,37 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Führt ein einfaches Kommando aus oder zeigt Informationen über Kommandos " +"an.\n" +"\n" +" Führt das Kommando mit den angegebenen Argumenten aus, ohne\n" +" Shell-Funktion nachzuschlagen oder zeigt Informationen über die\n" +" Kommandos an. Dadurch können auch dann Kommandos ausgeführt\n" +" werden, wenn eine Shell-Funktion gleichen Namens existiert.\n" +"\n" +" Optionen:\n" +" -p Es wird ein Standardwert für PATH verwendet, der " +"garantiert,\n" +" dass alle Standard-Dienstprogramme gefunden werden.\n" +" -v Beschreibung des Kommandos ausgeben.\n" +" Ähnlich dem eingebauten Kommando »type«.\n" +" -V Eine ausführlichere Beschreibung jedes Kommandos ausgeben.\n" +"\n" +" Rückgabewert:\n" +" Gibt den Rückgabewert des Kommandos zurück, oder eine Fehlermeldung, " +"wenn\n" +" das Kommando nicht gefunden wird." -#: builtins.c:476 +# declare +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2644,17 +3114,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2664,23 +3139,67 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" +"Setzt Variablenwerte und deren Attribute.\n" +"\n" +" Deklariert Variablen und weist ihnen Attribute zu. Wenn keine Namen\n" +" angegeben sind, werden die Attribute und Werte aller Variablen " +"ausgegeben.\n" +" \n" +" Optionen:\n" +" -f Schränkt Aktionen oder Anzeigen auf Funktionsnamen\n" +" und Definitionen ein.\n" +" -F Zeigt nur Funktionsnamen an (inklusive Zeilennummer\n" +" und Quelldatei beim Debuggen).\n" +" -g Deklariert globale Varieblen innerhalb einer\n" +" Shellfunktion; wird ansonsten ignoriert.\n" +" -I Eine neue lokale Variable erhält die Attribute und Werte " +"der\n" +" Variable mit gleichen Namen im vorherigen " +"Gültigkeitsbereich. \n" +" -p Zeigt die Attribute und Werte jeder angegebenen\n" +" Variable an.\n" +"\n" +" Attribute setzen:\n" +" -a\tDeklariert ein indiziertes Feld (wenn unterstützt).\n" +" -A\tDeklariert ein assoziatives Feld (wenn unterstützt).\n" +" -i\tDeklariert eine ganzzahlige Variable.\n" +" -l\tKonvertiert die übergebenen Werte zu Kleinbuchstaben.\n" +" -n\tDer Name wird als Variable interpretiert. \n" +" -r\tDeklariert nur lesbare Variablen.\n" +" -t\tWeist das Attribut »trace« zu.\n" +" -u\tKonvertiert die übergebenen Werte in Großbuchstaben.\n" +" -x\tExportiert die Variablen.\n" +"\n" +" Das Voranstellen von »+« anstelle von »-« schaltet die angegebenen\n" +" Attribute ab.\n" +"\n" +" Für ganzzahlige Variablen werden bei der Zuweisung arithmetische\n" +" Berechnungen durchgeführt (siehe »help let«).\n" +"\n" +" Innerhalb einer Funktion werden lokale Variablen erzeugt. Die\n" +" Option »-g« unterdrückt dieses Verhalten.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer eine ungültige Option wurde angegeben,\n" +" oder ein Fehler trat auf." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Setzt Variablen Werte und Eigenschaften\n" "\n" -" Veraltet. Siehe `help declare'." +" Synonym für »declare«. Siehe »help declare«." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2691,29 +3210,31 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, 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." +" Erzeugt eine lokale Variable Name und weist ihr den Wert Wert zu.\n" +" Option kann eine beliebige von »declare« akzeptierte Option sein.\n" +"\n" +" Lokale Variablen können nur innerhalb einer Funktion benutzt\n" +" werden. Sie sind nur in der sie erzeugenden Funktion und ihren\n" +" Kindern sichtbar.\n" +"\n" +" Rückgabewert: \n" +" Liefert 0 außer bei Angabe einer ungültigen Option, einer\n" +" fehlerhaften Variablenzuweisung oder dem Aufruf außerhalb einer\n" +" Funktion." -#: builtins.c:537 +# echo +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2725,6 +3246,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2732,15 +3254,50 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Ausgabe der Argumente auf die Standardausgabe.\n" +"\n" +" Zeigt die Argumente auf der Standardausgabe gefolgt von einem\n" +" Zeilenumbruch an.\n" +"\n" +" Optionen:\n" +" -n\tKeinen Zeilenumbruch anfügen\n" +" -e\tInterpretation der folgenden Escape-Sequenzen zulassen\n" +" -E\tKeine Interpretation der Escape-Sequenzen.\n" +"\n" +" »echo« interpretiert die folgenden Escape-Sequenzen:\n" +" \a\tAlarm (Glocke)\n" +" \\b\tRücktaste (Backspace)\n" +" \\c\tweitere Ausgabe unterdrücken\n" +" \\e\tEscape-Zeichen\n" +" \\E\tEscape-Zeichen\n" +" \\f\tSeitenvorschub\n" +" \\n\tZeilenvorschub\n" +" \\r\tWagenrücklauf\n" +" \\t\tHorizontaler Tabulator\n" +" \\v\tVertikaler Tabulator\n" +" \\\\tumgekehrter Schrägstrich (Backslash)\n" +" \\0nnn\tZeichen mit dem ASCII-Code »NNN« (oktal). »NNN« kann null\n" +" \t\tbis drei oktale Ziffern haben.\n" +" \\xHH\tAcht-Bit-Zeichen mit dem Wert »HH« (hexadezimal). »HH«\n" +" \t\tkann eine oder zwei hexadezimale Ziffern haben.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer ein Ausgabefehler tritt auf." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2752,8 +3309,19 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Ausgabe der Argumente auf die Standardausgabe.\n" +"\n" +" Zeigt die Argumente auf der Standardausgabe an, gefolgt von einem\n" +" Zeilenumbruch.\n" +"\n" +" Option:\n" +" -n\tkeinen Zeilenumbruch anfügen.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer nach einem Schreibfehler." -#: builtins.c:586 +# enable +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2779,8 +3347,37 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Eingebaute Shell-Kommandos aktivieren und deaktivieren.\n" +"\n" +" Aktiviert und deaktiviert eingebaute Shell-Kommandos. Die Deaktivierung\n" +" erlaubt Ihnen, eigene Kommandos mit demselben Namen wie die eingebauten\n" +" Kommandos zu nutzen, ohne den kompletten Pfad angeben zu müssen.\n" +"\n" +" Optionen:\n" +" -a\tGibt eine Liste der eingebauten Kommandos aus inklusive der\n" +" \tInformation, ob sie aktiv sind oder nicht.\n" +"\n" +" -n\tdeaktiviert jedes angegebene Kommando oder gibt eine\n" +" \tListe der deaktivierten eingebauten Kommandos aus.\n" +" -p\tGibt eine Liste der eingebauten Kommandos in einem\n" +" \twiederverwendbaren Format aus.\n" +" -s\tGibt nur die Namen der »speziellen« in POSIX eingebauten\n" +" \tKommandos aus.\n" +"\n" +" Optionen zum Beeinflussen des dynamischen Ladens:\n" +" -f\tLädt ein eingebautes Kommando aus der angegebenen Datei.\n" +" -d\tEntfernt ein mit »-f« geladenes Kommando.\n" +"\n" +" Ohne Optionen wird jedes angegebene Kommando aktiviert.\n" +"\n" +" Um das unter $PATH liegende Kommando »test« anstelle der eingebauten\n" +" Version zu nutzen, geben Sie »enable -n test« ein.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer Name ist kein eingebautes Kommando\n" +" oder ein Fehler tritt auf." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2791,8 +3388,17 @@ msgid "" " Exit Status:\n" " Returns exit status of command or success if command is null." msgstr "" +"Führt die Argumente als Shellkommando aus.\n" +"\n" +" Fügt die Argumente zu einer Zeichenkette zusammen und verwendet\n" +" das Ergebnis als Eingebe in eine Shell, welche die enthaltenen\n" +" Kommandos ausführt.\n" +"\n" +" Rückgabewert:\n" +" Der Status des Kommandos oder Erfolg, wenn das Kommando leer war." -#: builtins.c:626 +# getopts +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2825,15 +3431,56 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 "" +"Verarbeitet Optionsargumente.\n" +"\n" +" Getopts wird von Shellprozeduren verwendet, um die\n" +" Kommandozeilenoptionen auszuwerten.\n" +"\n" +" \"Optionen\" enthält die auszuwertenden Buchstaben. Ein Doppelpunkt\n" +" nach dem Buchstaben zeigt an, dass ein Argument erwartet wird,\n" +" welches durch ein Leerzeichen von der Option getrennt ist.\n" +"\n" +" Bei jedem Aufruf von »getopts« wird die nächste Option der\n" +" $Variable zugewiesen. Diese wird angelegt, falls sie noch\n" +" nicht existiert. Weiterhin wird der Index des nächsten zu\n" +" verarbeitenden Arguments der Shell-Variablen OPTIND\n" +" zugewiesen. OPTIND wird bei jedem Aufruf einer Shell oder eines\n" +" Shell-Skripts mit 1 initialisiert. Wenn eine Option ein Argument\n" +" benötigt, wird dieses OPTARG zugewiesen.\n" +"\n" +" Für Fehlermeldungen gibt es zwei Varianten. Wenn das erste\n" +" Zeichen des Optionsstrings ein Doppelpunkt ist, wird der stille\n" +" Fehlermodus von »getopts« verwendet. In diesem Modus wird keine\n" +" Fehlermeldung ausgegeben. Wenn eine ungültige Option erkannt wird,\n" +" wird das gefundene Optionenzeichen OPTARG zugewiesen. Wenn ein\n" +" benötigtes Argument fehlt, wird ein »:« der Variable zugewiesen\n" +" und OPTARG auf das gefundene Optionenzeichen gesetzt. Im anderen\n" +" Fehlermodus wird ein »?« der Variable zugewiesen, OPTARG geleert\n" +" und eine Fehlermeldung ausgegeben.\n" +"\n" +" Wenn die Shell-Variable OPTERR den Wert »0« hat, werden durch getopts\n" +" keine Fehlermeldungen ausgegeben, auch wenn das erste Zeichen\n" +" von OPTSTRING kein Doppelpunkt ist. OPTERR hat den Vorgabewert »1«.\n" +"\n" +" Wenn im Aufruf von »getops« die »Argumente« angegeben sind, werden " +"diese\n" +" verarbeitet. Ansonsten werden die von der Position abhängigen\n" +" Parameter ($1, $2, etc.) verarbeitet.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück wenn eine Option gefunden wird und\n" +" »gescheitert«, wenn das Ende der Optionen erreicht oder ein Fehler\n" +" aufgetreten ist." -#: builtins.c:668 +# exec +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2844,8 +3491,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2855,9 +3502,27 @@ msgid "" " Returns success unless COMMAND is not found or a redirection error " "occurs." msgstr "" +"Ersetzt die Shell durch das angegebene Kommando.\n" +"\n" +" Führt das angegebene Kommando einschließlich dessen Optionen an\n" +" Stelle der Shell aus. Wenn kein Kommando angegeben ist, wirken\n" +" alle Weiterleitungen für die aktuellen Shell.\n" +"\n" +" Optionen:\n" +" -a Name\tSetzt den Namen als nulltes Argument für das Kommando.\n" +" -c\tFührt das Kommando in einer leeren Umgebung aus.\n" +" -l\tSetzt einen Strich in das nullte Argument für das Kommando.\n" +"\n" +" Wenn das Kommando nicht ausgeführt werden kann, wird eine nicht\n" +" interaktive Shell beendet, außer die Shell-Option »execfail« ist\n" +" gesetzt.\n" +"\n" +" Rückgabewert:\n" +" Gibt »Erfolg« zurück, außer das Kommando wurde nicht gefunden oder\n" +" ein Weiterleitungsfehler trat auf." # exit -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -2866,11 +3531,12 @@ msgid "" 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." +" Beendet die aktuelle Shell mit dem Rückgabewert N. Wenn N nicht " +"angegeben\n" +" ist, wird der Rückgabewert des letzten ausgeführten Kommandos übernommen." -#: builtins.c:698 +# logout +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2878,8 +3544,14 @@ msgid "" "executed\n" " in a login shell." msgstr "" +"Beendet eine Login-Shell.\n" +"\n" +" Beendet eine Login-Shell mit dem Rückgabewert »n«. Wenn logout\n" +" nicht von einer Login-Shell aus ausgeführt wurde, wird ein Fehler\n" +" zurückgegeben." -#: builtins.c:708 +# fc +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2908,8 +3580,33 @@ msgid "" " Returns success or status of executed command; non-zero if an error " "occurs." msgstr "" +"Anzeigen oder Ausführen von Befehlen aus der History-Liste.\n" +" \n" +" fc wird verwendet, um Befehle aus der History-Liste aufzulisten,\n" +" zu bearbeiten und erneut auszuführen. FIRST und LAST können\n" +" Zahlen sein, die den Bereich angeben, oder FIRST kann eine\n" +" Zeichenkette sein, was bedeutet, dass der jüngste Befehl mit\n" +" dieser Zeichenfolge beginnt.\n" +" \n" +" Optionen:\n" +" -e ENAME Auswahl des zu verwendenden Editors. Standard sind FCEDIT,\n" +" dann EDITOR, dann vi.\n" +" -l Zeilen auflisten statt bearbeiten.\n" +" -n Zeilennummern beim Auflisten weglassen.\n" +" -r kehrt die Reihenfolge der Zeilen um (die neuesten Zeilen zuerst).\n" +" \n" +" Mit `fc -s [pat=rep ...] [command]' wird COMMAND erneut\n" +" ausgeführt, nachdem die Ersetzung OLD=NEW durchgeführt wurde.\n" +" \n" +" Ein nützlicher Alias ist r='fc -s', so dass die Eingabe von `r cc'\n" +" den letzten Befehl ausführt, der mit \"cc\" beginnt, und die Eingabe\n" +" von \"r\" den letzten Befehl erneut ausführt.\n" +" \n" +" Exit-Status:\n" +" Gibt den Erfolg oder den Status des ausgeführten Befehls zurück;\n" +" ungleich Null, wenn ein Fehler auftritt." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2920,8 +3617,16 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" +"Bringt einen Job in den Vordergrund.\n" +"\n" +" Bringt den mit JOB_SPEC bezeichneten Prozess als aktuellen Job in den\n" +" Vordergrund. Wenn JOB_SPEC nicht angegeben ist, wird der zuletzt\n" +" angehaltene Job verwendet.\n" +"\n" +" Rückgabewert:\n" +" Status des in den Vordergrund geholten Jobs oder Fehler." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2934,8 +3639,17 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Bringt einen Job in den Hintergrund.\n" +"\n" +" Bringt den mit JOB_SPEC bezeichneten Job in den Hintergrund,\n" +" als ob er mit »&« gestartet wurde.\n" +"\n" +" Rückgabewert:\n" +" Immer Erfolg, außer wenn die Jobsteuerung nicht verfügbar ist\n" +" oder ein Fehler auftritt." -#: builtins.c:767 +# hash +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -2944,22 +3658,48 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"Programpfade merken oder anzeigen.\n" +" \n" +" Ermittelt und speichert den vollständigen Pfadnamen jedes\n" +" Kommandos NAME. Wenn keine Argumente angegeben werden, werden\n" +" Informationen über gespeicherte Kommandod angezeigt.\n" +" \n" +" Optionen:\n" +" -d Vergessen des Speicherortes für jeden NAME\n" +" -l Anzeige in einem Format, das als Eingabe wiederverwendet werden " +"kann\n" +" -p Pfadname verwendet PATHNAME als den vollständigen Pfadnamen von " +"NAME\n" +" -r vergisst alle gespeicherten Pfade\n" +" \n" +" -t gibt den Speicherort jedes NAMENS aus, wobei jedem\n" +" Speicherort der entsprechende NAME vorangestellt wird,\n" +" wenn mehrere NAMEs angegeben sind\n" +" \n" +" Argumente:\n" +" NAME Jeder NAME wird in $PATH gesucht und in die Liste\n" +" der gespeicherten Befehle hinzugefügt.\n" +" \n" +" Exit-Status:\n" +" Gibt Erfolg zurück, es sei denn, NAME wird nicht gefunden oder es\n" +" wird eine ungültige Option angegeben." -#: builtins.c:792 +# help +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2971,17 +3711,37 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " "given." msgstr "" +"Informationen zu eingebauten Kommandos.\n" +"\n" +" Zeigt kurze Informationen zu eingebauten Kommandos an. Wenn ein\n" +" Muster angegeben ist, dann wird eine ausführliche Anleitung zu\n" +" allen Kommandos mit zutreffendem Muster angezeigt. Sonst wird die\n" +" Liste der Hilfethemen ausgegeben.\n" +"\n" +" Optionen:\n" +" -d\tKurzbeschreibung für jedes Thema\n" +" -m\tAnzeige im Manpage-Format.\n" +" -s\tGibt eine kurze Zusammenfassung für jedes angegebene\n" +" \tangegebene Thema aus\n" +"\n" +" Argumente:\n" +" Muster\tDas gesuchte Hilfetheme\n" +"\n" +" Rückgabestatus:\n" +" Erfolg, außer wenn das Muster nicht gefunden oder eine ungültige Option\n" +" angegeben wurde." -#: builtins.c:816 +# history +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2990,23 +3750,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3014,8 +3775,43 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Zeigt die Verlaufsliste an oder bearbeitet sie.\n" +" \n" +" Zeigt die Verlaufsliste mit Zeilennummern an und stellt jedem\n" +" geänderten Eintrag ein `*' vorangestellt. Ein Argument von N\n" +" listet nur die letzten N Einträge auf.\n" +" \n" +" Optionen:\n" +" -c Löscht die Verlaufsliste, indem alle Einträge gelöscht werden.\n" +" -d offset löscht den Verlaufseintrag an der Position\n" +" OFFSET. Negative Offsets zählen vom Verlaufslistenende\n" +" zurück.\n" +" -a Anhängen vom Verlauf dieser Sitzung an die Verlaufsdatei.\n" +" -n alle nicht bereits aus der Verlaufsdatei gelesenen.\n" +" Verlaufszeilen lesen und an die Verlaufsliste anhängen.\n" +" -r liest die Verlaufsdatei und hängt den Inhalt an die\n" +" Verlaufsliste an.\n" +" -w schreibt den aktuellen Verlauf in die Verlaufsdatei.\n" +" -p führt eine Verlaufserweiterung für jedes ARG durch und zeigt\n" +" das Ergebnis an, ohne es in der Verlaufslise einzutragen.\n" +" -s die ARGs als einen einzigen Eintrag an die History-Liste anhängen.\n" +" \n" +" Wenn FILENAME angegeben ist, wird dieser als History-Datei verwendet.\n" +" Andernfalls, wenn HISTFILE einen Wert hat, wird dieser verwendet,\n" +" sonst ~/.bash_history.\n" +" \n" +" Wenn die Variable HISTTIMEFORMAT gesetzt und nicht null ist, wird\n" +" ihr Wert verwendet als Formatierungszeichenfolge für strftime(3)\n" +" verwendet, um den Zeitstempel zu Zeitstempel für jeden angezeigten\n" +" History-Eintrag zu drucken. Andernfalls werden keine Zeitstempel\n" +" gedruckt.\n" +" \n" +" Rückgabewert:\n" +" Gibt einen Erfolg zurück, es sei denn, es wurde eine ungültige\n" +" Option angegeben oder es ist ein Fehler aufgetreten." -#: builtins.c:852 +# jobs +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3024,8 +3820,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3038,8 +3834,31 @@ msgid "" " Returns success unless an invalid option is given or an error occurs.\n" " If -x is used, returns the exit status of COMMAND." msgstr "" +"Auftragstatus anzeigen.\n" +" \n" +" Listet die aktiven Aufträge auf. JOBSPEC schränkt die Ausgabe auf\n" +" diesen Auftrag ein. Ohne Optionen werden die Status der aktiven\n" +" Aufträge angezeigt.\n" +" \n" +" Optionen:\n" +" -l zeigt zusätzlich auch die Prozessnummern an.\n" +" -n zeigt nur die Prozesse an, deren Status sich seit der letzten\n" +" Benachrichtigung geändert haben.\n" +" -p zeigt nur Prozessnummern an.\n" +" -r zeigt nur laufende Aufträge an.\n" +" -s zeigt nur gestoppte Aufträge an\n" +" \n" +" Mit der Option -x wird COMMAND ausgeführt, nachdem alle in ARGS\n" +" enthaltenen Auftragsspezifikationen durch die zugehörigen\n" +" Prozesnummern ersetzt worden sind.\n" +" \n" +" Rückgabewert:\n" +" Gibt einen Erfolg zurück, es sei denn, es wurde eine ungültige\n" +" Option angegeben oder es ist ein Fehler aufgetreten. Wenn -x\n" +" verwendet wird, wird der Rückgebewert von COMMAND zurückgegeben." -#: builtins.c:879 +# disown +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3049,14 +3868,30 @@ msgid "" " 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" +" \t\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 "" +"Entfernt Aufträge aus der aktuellen Shell.\n" +" \n" +" Entfernt jedes JOBSPEC-Argument aus der Tabelle der aktiven\n" +" Aufträge. Ohne JOBSPECs verwendet die Shell ihre Vorstellung vom\n" +" aktuellen Auftrag.\n" +" \n" +" Optionen:\n" +" -a entfernt alle Aufträge, wenn JOBSPEC nicht angegeben wird.\n" +" -h JOBSPEC maskieren, so dass der Auftrag kein SIGHUP erhält,\n" +" wenn die Shell ein SIGHUP empfängt.\n" +" -r entfernt nur laufende Aufträge.\n" +" \n" +" Beenden Status:\n" +" Gibt Erfolg zurück, außer wenn eine ungültige Option oder\n" +" JOBSPEC angegeben wurde." -#: builtins.c:898 +# kill +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3068,7 +3903,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3077,8 +3913,29 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" - -#: builtins.c:921 +"Sendet ein Signal an einen Auftrag.\n" +" \n" +" Sendet den durch PID oder JOBSPEC identifizierten Prozessen das\n" +" mit SIGSPEC oder SIGNUM anggebene Signal. Wenn weder SIGSPEC\n" +" noch SIGNUM angegeben sind, dann wird wird SIGTERM gesendet.\n" +" \n" +" Optionen:\n" +" -s sig SIG ist ein Signalname.\n" +" -n sig SIG ist eine Signalnummer.\n" +" -l listet die Signalnamen auf. Wenn Argumente auf `-l' folgen,\n" +" werden für diese Signalnummern die Namen aufgelistet.\n" +" -L Synonym für -l.\n" +" \n" +" Kill ist ein in die Shell eingebaute Funktion, da diese erlaubt,\n" +" Auftrags- statt Prozessnummern anzugeben. Weierhin kann Kill\n" +" Prozesse auch dann beenden, wenn die maximal erlaubte\n" +" Prozessanzahl erreicht ist.\n" +" \n" +" Exit-Status:\n" +" Gibt Erfolg zurück, es sei denn, es wurde eine ungültige Option\n" +" angegeben oder es ist ein Fehler aufgetreten." + +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3120,10 +3977,54 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." -msgstr "" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Auswerten arithmetischer Ausdrücke.\n" +" \n" +" Jedes ARG wird als arithmetischer Ausdruck ausgewertet. Die\n" +" Auswertung erfolgt in Ganzzahlen mit fester Breite ohne\n" +" Überprüfung auf Überlauf. Division durch 0 wird abgefangen und als\n" +" Fehler gekennzeichnet. Die folgende Liste von Operatoren ist in\n" +" abnehmender Präferenz nach gleichrangigen Operatoren gruppiert.\n" +" \n" +" \tid++, id-- Variable post-increment, post-decrement\n" +" \t++id, --id Variable pre-increment, pre-decrement\n" +" \t-, + unäres Minus, Plus\n" +" \t!, ~ logische und bitweise Negation\n" +" \t** Potenzierung\n" +" \t*, /, % Multiplikation, Division, Rest\n" +" \t+, - Addition, Subtraktion\n" +" \t<<, >> bitweise Links- und Rechtsverschiebung\n" +" \t<=, >=, <, > Vergleich\n" +" \t==, != Gleichheit, Ungleichheit\n" +" \t& bitweises UND\n" +" \t^ bitweises XOR\n" +" \t| bitweises ODER\n" +" \t&& logisches UND\n" +" \t|| logisches OR\n" +" \texpr ? expr : expr\n" +" Bedingte Ausführung\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |= Zuweisung\n" +" \n" +" Shell-Variablen sind als Operanden zulässig. Der Variablenname\n" +" wird innerhalb eines Ausdrucks durch seinen Wert (der in eine\n" +" Ganzzahl mit fester Breite umgewandelt wird) ersetzt. Das\n" +" Integer-Attribut der Variablen muss nicht eingeschaltet sein, um\n" +" in einem Ausdruck verwendet zu werden.\n" +" \n" +" Die Operatoren werden in der Reihenfolge ihres Vorrangs\n" +" ausgewertet. Unterausdrücke in Klammern werden zuerst ausgewertet\n" +" und können die obigen Rangfolge Regeln außer Kraft setzen.\n" +" \n" +" Rückgabewert:\n" +" Wenn der letzte ARG 0 ergibt, gibt let 1 zurück; andernfalls gibt let 0 " +"zurück." -#: builtins.c:966 +# read +#: builtins.c:994 +#, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -3134,7 +4035,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3144,34 +4047,83 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" +"Liest eine Zeile von der Standardeingabe und teilt sie in Felder auf.\n" +" \n" +" Liest eine einzelne Zeile aus der Standardeingabe oder vom\n" +" Dateideskriptor FD wenn die Option -u angegeben ist. Die Zeile\n" +" wird wie bei der Wortaufteilung in Felder aufgeteilt aufgeteilt,\n" +" und das erste Wort wird dem ersten NAME zugewiesen, das zweite\n" +" NAME zugewiesen, das zweite Wort dem zweiten NAME usw., wobei alle\n" +" verbleibenden Wörter dem dem letzten NAME zugeordnet werden. Die\n" +" in $IFS enthaltenen Zeichen werden als Worttrennzeichen verwendet.\n" +" \n" +" Wenn keine NAMEn angegeben werden, wird die gelesene Zeile in der\n" +" REPLY-Variablen gespeichert.\n" +" \n" +" Optionen:\n" +" -a array weist die gelesenen Wörter den aufeinanderfolgenden\n" +" Indizes der Array Variable ARRAY, beginnend bei Null.\n" +" -d delim fortfahren, bis das erste Zeichen von DELIM gelesen\n" +" wird, anstelle von statt Newline.\n" +" -e Readline verwenden, um die Zeile zu lesen.\n" +" -i text TEXT als Anfangstext für Readline verwenden.\n" +" -n nchars Liest maximal NCHARS Zeichen, ohne ein Zeilenumbruch\n" +" \t\tzu suchen. Worttrennzeichen werden ausgewertet.\n" +" -N nchars Liest genau NCHARS Zeichen, bis EOF oder einer\n" +" \t\tZeitüberschreitung. Worttrennzeichen werden ignoriert.\n" +" -p prompt Gibt vor dem Lesen die Zeichenkette PROMPT ohne einen\n" +" \t\tabschließenden Zeilenumbruch aus.\n" +" -r lässt keine Backslashes als Escape-Zeichen zu\n" +" -s keine Echo-Eingabe von einem Terminal\n" +" -t timeout\n" +" Zeitüberschreitung und Rückgabe eines Fehlers, wenn\n" +" \t\teine vollständige Eingabezeile nicht innerhalb von\n" +" \t\tTIMEOUT Sekunden gelesen wird. Die TMOUT Variable\n" +" \t\tenthält das Standard-Timeout. TIMEOUT kann als\n" +" \t\tBruchteil angegeben werden. Wenn TIMEOUT gleich 0\n" +" \t\tist, werden keine daten geleden und gibt Erfolg\n" +" \t\tzurück, wenn Daten dem angegebenen Dateideskriptor\n" +" \t\tverfügbar sind. Der Rückgabewert ist größer als 128,\n" +" \t\twenn die Zeitüberschreitung abgelaufen ist.\n" +" -u fd Lesen von Dateideskriptor FD statt von der Standardeingabe\n" +" \n" +" Rückgabewert: \n" +" Der Rückgabewert ist Null. Es sei denn, das Dateiende wurde\n" +" erreicht, die Lesezeit überschritten (in diesem Fall ist er größer\n" +" als 128), ein Variablenzuweisungsfehler tritt auf oder ein\n" +" ungültiger Dateideskriptor wurde als Argument von -u übergeben." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3182,8 +4134,19 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Rückkehr aus einer Shell-Funktion.\n" +" \n" +" Bewirkt, dass eine Funktion oder ein geladenes Skript mit dem\n" +" durch N angegebenen Rückgabewert beendet wird. Wenn N weggelassen\n" +" wird, wird als Rückgabewert der des zuletzt ausgeführten Befehls\n" +" verwendet.\n" +" \n" +" Rückgabewert:\n" +" Gibt N zurück, oder einen Fehler, wenn return außerhalb einer Funktion\n" +" oder Skript aufgerufen wird." -#: builtins.c:1022 +# set +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3249,9 +4212,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3264,8 +4231,99 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" +"Setzen oder Aufheben von Shell-Optionen und Positionsparametern.\n" +" \n" +" Den Wert von Shell-Attributen und Positionsparametern ändern, oder\n" +" die Namen und Werte von Shell-Variablen anzeigen.\n" +" \n" +" Optionen:\n" +" -a Markieren von Variablen die geändert oder erstellt wurden, für den " +"Export.\n" +" -b Sofortige Benachrichtigung über das Auftragsende.\n" +" -e Sofortiger Abbruch, wenn ein Befehl mit einem Status ungleich Null " +"beendet wird.\n" +" -f Deaktiviert das Generieren von Dateinamen (globbing).\n" +" -h Merkt sich den Speicherort von Befehlen, wenn sie nachgeschlagen " +"werden.\n" +" -k Alle Zuweisungsargumente werden in die Umgebung für einen\n" +" Befehl in die Umgebung aufgenommen, nicht nur diejenigen,\n" +" die dem Befehl vorangestellt sind.\n" +" -m Die Auftragskontrolle ist aktiviert.\n" +" -n Befehle lesen, aber nicht ausführen.\n" +" -o Optionsname\n" +" Setzt die Variable, die dem Optionsname entspricht:\n" +" allexport wie -a\n" +" braceexpand wie -B\n" +" emacs verwendet eine emacsähnliche Schnittstelle zur " +"Zeilenbearbeitung\n" +" errexit gleich wie -e\n" +" errtrace dasselbe wie -E\n" +" functrace dasselbe wie -T\n" +" hashall dasselbe wie -h\n" +" histexpand gleich wie -H\n" +" history Befehlshistorie aktivieren\n" +" ignoreeof die Shell wird beim Lesen von EOF nicht beendet\n" +" interaktive-Kommentare\n" +" erlaubt das Erscheinen von Kommentaren in " +"interaktiven Befehlen\n" +" keyword dasselbe wie -k\n" +" monitor gleich wie -m\n" +" noclobber dasselbe wie -C\n" +" noexec gleich wie -n\n" +" noglob gleich wie -f\n" +" nolog wird derzeit akzeptiert, aber ignoriert\n" +" notify gleich wie -b\n" +" nounset dasselbe wie -u\n" +" onecmd dasselbe wie -t\n" +" physical wie -P\n" +" pipefail der Rückgabewert einer Pipeline ist der Status\n" +" des des letzten Befehls, der mit einem Status\n" +" ungleich Null beendet wurde, oder Null, wenn\n" +" kein Befehl mit einem Status ungleich Null\n" +" beendet wurde.\n" +" posix Ändert das Verhalten von bash, wo die Standard\n" +" Operation vom Posix-Standard abweicht, um mit\n" +" dem Standard übereinstimmen.\n" +" privilegiert gleich wie -p\n" +" verbose dasselbe wie -v\n" +" vi eine vi-ähnliche Schnittstelle zur Zeilenbearbeitung " +"verwenden\n" +" xtrace dasselbe wie -x\n" +" -p Wird eingeschaltet, wenn die realen und effektiven\n" +" Benutzerkennungen nicht übereinstimmen. Deaktiviert die\n" +" Verarbeitung der $ENV-Datei und das Importieren von Shell\n" +" Funktionen. Wenn diese Option ausgeschalten ist, werden die\n" +" effektive uid und gid auf die reale uid und gid gesetzt. \n" +" -t Beenden nach dem Lesen und Ausführen eines Befehls.\n" +" -u Nicht gesetzte Variablen beim Substituieren als Fehler behandeln.\n" +" -v Shell-Eingabezeilen ausgeben, wenn sie gelesen werden.\n" +" -x Befehle und ihre Argumente ausgeben, wenn sie ausgeführt werden.\n" +" -B Die Shell führt eine Klammererweiterung durch\n" +" -C Dateien werden bei Ausgabeumleitung nicht überschrieben.\n" +" -E Wenn gesetzt, wird die Fehlerfalle (trap) an Shell-Funktionen " +"vererbt.\n" +" -H Aktiviert die !-Stil Verlaufsersetzung. Diese Option ist\n" +" bei einer interaktiven Shell standardmäßig aktiviert.\n" +" -P Symbolische Links werden nicht aufgelöst, wenn Befehle wie\n" +" z.B. cd, das aktuelle Verzeichnis ändern.\n" +" -T DEBUG und RETURN Fallen (trap) werden an Shellfunktionen vererbt.\n" +" -- Weist alle verbleibenden Argumente den Positionsparametern\n" +" zu. Sind keine Argumente verblieben, werden die\n" +" Positionsparameter nicht gesetzt.\n" +" - Weist alle verbleibenden Argumente den Positionsparametern zu.\n" +" Die Optionen -x und -v sind ausgeschaltet.\n" +" \n" +" Durch Verwenden von + anstelle von - werden Option ausgeschaltet.\n" +" Die Optionen können auch beim Shellaufruf verwendet werden. Die\n" +" aktuelle aktiven Optionen sind in $- gespeichert. Die restlichen\n" +" n ARGs sind positionale Parameter und werden der Reihe nach $1,\n" +" $2, ... $n zugewiesen. Wenn keine ARGs angegeben werden, werden\n" +" alle Shell-Variablen ausgegeben.\n" +" \n" +" Rückgabewert:\n" +" Gibt Erfolg zurück, es sei denn, eine ungültige Option wurde angegeben." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3274,6 +4332,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3285,7 +4345,7 @@ msgid "" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3304,7 +4364,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3316,7 +4376,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3324,7 +4385,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3335,7 +4396,7 @@ msgid "" " Returns success unless N is negative or greater than $#." msgstr "" -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3349,7 +4410,7 @@ msgid "" " FILENAME cannot be read." msgstr "" -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3363,14 +4424,17 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3424,6 +4488,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3440,19 +4507,22 @@ msgid "" " false or an invalid argument is given." msgstr "" -#: builtins.c:1299 +# [ +#: builtins.c:1344 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." +"Wertet einen bedingten Ausdruck aus.\n" +"\n" +" Dieses Kommando entspricht dem Kommando »test«. Jedoch muss das\n" +" letzte Argument ein »]« sein, welches die öffnende Klammer »[«\n" +" schließt." -#: builtins.c:1308 +# times +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3463,8 +4533,15 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" +"Zeigt den Zeitverbrauch an.\n" +"\n" +" Gibt den kumulierte Nutzer- und Systemzeitverbrauch der Shell und\n" +" aller von ihr gestarteten Prozesse aus.\n" +"\n" +" Rückgabewert:\n" +" Immer 0." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3480,7 +4557,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3500,7 +4585,7 @@ msgid "" "given." msgstr "" -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3509,18 +4594,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3530,7 +4615,7 @@ msgid "" "found." msgstr "" -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -3548,6 +4633,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3559,6 +4645,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3574,7 +4665,7 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3592,38 +4683,54 @@ msgid "" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3636,7 +4743,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3653,7 +4760,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3673,7 +4780,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3689,7 +4796,7 @@ msgid "" " The return status is the return status of PIPELINE." msgstr "" -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3700,7 +4807,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3721,29 +4828,31 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1580 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3753,10 +4862,10 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3770,7 +4879,7 @@ msgid "" " Returns success unless NAME is readonly." msgstr "" -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3781,7 +4890,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3795,18 +4904,27 @@ msgid "" " Returns the status of the resumed job." msgstr "" -#: builtins.c:1659 +# (( )) +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"Wertet arithmetische Ausdrücke aus.\n" +"\n" +" Der Ausdruck wird nach den Regeln für arithmetische Berechnungen\n" +" ausgewertet. Diese Schreibweise entspricht »let Ausdruck«.\n" +"\n" +" Rückgabewert:\n" +" Ist »1«, wenn der arithmetische Ausdruck 0 ergibt, sonst »0«." -#: builtins.c:1671 +# [[ +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3833,8 +4951,31 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" +"Erweiterte Vergleiche.\n" +" \n" +" Der Status 0 oder 1 wird abhängig vom Vergleichsergebnis zurückgegeben.\n" +" Es werden die gleichen Ausdrücke wie in der »test« Funktion " +"unterstützt,\n" +" die mit folgenden Operatoren verbunden werden können:\n" +" \n" +" ( AUSDRUCK )\tErgibt den Wert des AUSDRUCKs\n" +" ! Ausdruck\t\tNegiert den AUSDRUCK\n" +" AUSDR1 && AUSDR2\tUnd Verknüpfung der Ausdrücke\n" +" AUSDR1 || AUSDR2\tOder Verknüpfung der Ausdrücke\n" +" \n" +" Die `==' und `!=' Operatoren ermöglichen einen Mustervergleich mit dem\n" +" rechten Ausdruck als Muster.\n" +" Der `=~' Operator führt einen Vergleich mit dem regulären Ausdruck\n" +" in der rechten Seite aus.\n" +" \n" +" Die && und || Operatoren werten AUSDR2 nur aus, wenn nicht bereits\n" +" AUSDR1 das gesamte Ergebnis bestimt.\n" +" \n" +" Rückgabewert:\n" +" 0 oder 1 abhängig vom Wert des AUSDRUCKs." -#: builtins.c:1697 +# variable_help +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3887,8 +5028,66 @@ msgid "" " 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\tVersionsnummer der Bash.\n" +" CDPATH\tEine durch Doppelpunkte getrennte Liste von\n" +" Verzeichnissen, die durchsucht werden, wenn das\n" +" Argument von »cd« nicht im aktuellen Verzeichnis\n" +" gefunden wird.\n" +" GLOBIGNORE Eine durch Doppelpunkte getrennte Liste von\n" +" Dateinamenmustern, die für die Dateinamensergänzung\n" +" ignoriert werden.\n" +" HISTFILE\tDatei, die den Kommandozeilenspeicher enthält.\n" +" HISTFILESIZE\tMaximale Zeilenanzahl dieser Datei.\n" +" HISTSIZE\tMaximale Anzahl von Zeilen, auf die der\n" +" Historymechanismus der Shell zurückgreifen kann.\n" +" HOME\tHeimatverzeichnis des aktuellen Benutzers.\n" +" HOSTNAME Der aktuelle Rechnername.\n" +" HOSTTYPE\tCPU-Typ des aktuellen Rechners.\n" +" IGNOREEOF\tLegt die Reaktion der Shell auf ein EOF-Zeichen fest.\n" +" Wenn die Variable eine ganze Zahl enthält, wird diese\n" +" Anzahl EOF Zeichen (Ctrl-D) abgewartet, bis die Shell\n" +" verlassen wird. Der Vorgabewert ist 10. Ist IGNOREEOF\n" +" nicht gesetzt, signalisiert EOF das Ende der Eingabe.\n" +" MACHTYPE Eine Zeichenkette die das aktuell laufende System " +"beschreibt.\n" +" MAILCHECK\tZeit in Sekunden, nach der nach E-Mails gesehen wird.\n" +" MAILPATH\tEine durch Doppelpunkt getrennte Liste von Dateinamen,\n" +" die nach E-Mail durchsucht werden.\n" +" OSTYPE\tUnix Version, auf der die Bash gegenwärtig läuft.\n" +" PATH\tDurch Doppelpunkt getrennte Liste von Verzeichnissen,\n" +" die nach Kommandos durchsucht werden.\n" +" PROMPT_COMMAND\tKommando, das vor der Anzeige einer primären\n" +" Eingabeaufforderung (PS1) ausgeführt wird.\n" +" PS1 Zeichenkette, die die primäre\n" +" Eingabeaufforderung enthält.\n" +" PS2 Zeichenkette, die die sekundäre\n" +" Eingabeaufforderung enthält.\n" +" PWD Der vollständige aktuelle Verzeichnisname.\n" +" SHELLOPTS Durch Doppelpunkt getrennte Liste der aktiven\n" +" Shell-Optionen.\n" +" TERM\tName des aktuellen Terminaltyps.\n" +" auto_resume Ein Wert ungleich Null bewirkt, dass ein einzelnes\n" +" Kommando auf einer Zeile zunächst in der Liste\n" +" gegenwärtig gestoppter Jobs gesucht und dieser in den\n" +" Vordergrund geholt wird. »exact« bewirkt, dass das\n" +" Kommando genau dem Kommando in der Liste der\n" +" gestoppten Jobs entsprechen muss. Wenn die Variable den\n" +" Wert »substring« enthält, muss das Kommando einem\n" +" Substring der Jobbezeichnung entsprechen. Bei einem\n" +" anderen Wert müssen die ersten Zeichen übereinstimmen.\n" +" histchars Zeichen, die die Befehlswiederholung und die\n" +" Schnellersetzung steuern. An erster Stelle steht\n" +" das Befehlswiederholungszeichen (normalerweise\n" +" `!'); an zweiter das `Schnell-Ersetzen-Zeichen'\n" +" (normalerweise `^'). Das dritte Zeichen ist das\n" +" `Kommentarzeichen' (normalerweise `#').\n" +" HISTIGNORE Eine durch Doppelpunkt getrennte Liste von\n" +" Mustern, welche die in der\n" +" Befehlswiederholungsliste zu speichernden\n" +" Kommandos angibt.\n" -#: builtins.c:1754 +# pushd +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3898,19 +5097,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3918,8 +5117,33 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Fügt ein Verzeichnis dem Stapel hinzu.\n" +"\n" +" Legt einen Verzeichnisnamen auf den Verzeichnisstapel oder rotiert\n" +" diesen so, dass das aktuelle Arbeitsverzeichnis oben liegt. Ohne\n" +" Argumente werden die obersten zwei Verzeichnisse auf dem Stapel\n" +" vertauscht.\n" +"\n" +" Optionen: -n Es wird nur das angebene Verzeichnis dem Stapel\n" +" \thinzugefügt, aber nicht in das Verzeichnis gewechselt.\n" +"\n" +" Argumente: \n" +" +N\tRotiert den Stapel so, dass das N'te Verzeichnis (angezeigt\n" +" von `dirs', gezählt von links) oben auf dem Stapels liegt.\n" +"\n" +" -N\tRotiert den Stapel so, dass das N'te Verzeichnis (angezeigt\n" +" von `dirs', gezählt von rechts) sich an der Spitze des Stapels\n" +" \tbefindet.\n" +"\n" +" Der Verzeichnisstapel kann mit dem Kommando `dirs' angezeigt\n" +" werden.\n" +"\n" +" Rückgabewert: \n" +" Gibt Erfolg zurück, außer wenn ein ungültiges Argument angegeben\n" +" wurde oder der Verzeichniswechsel nicht erfolgreich war." -#: builtins.c:1788 +# popd +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3928,16 +5152,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3945,9 +5169,35 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Entfernt Einträge vom Verzeichnisstapel.\n" +"\n" +" Entfernt Einträge vom Verzeichnisstapel. Ohne Argumente wird der\n" +" oberste Eintrag entfernt und in das neue oberste Verzeichnis\n" +" gewechselt.\n" +"\n" +" Optionen:\n" +" -n\tEntfernt nur den Verzeichniseintrag und wechselt nicht\n" +" \tdas Verzeichnis.\n" +" \n" +" Argumente:\n" +" +N\tEntfernt den N-ten Eintrag von links, gezählt von\n" +" Null, aus der von »dirs« anzeigten Liste. Beispielsweise\n" +" entfernen »popd +0« den ersten und »popd +1« den zweiten\n" +" Verzeichniseintrag.\n" +"\n" +" -N\tEntfernt den N-ten Eintrag von rechts, gezählt von Null,\n" +" \taus der von »dirs« angeigten Liste. Beispielsweise entfernen\n" +" »popd -0« den letzten und »popd -1« den vorletzten\n" +" Verzeichniseintrag.\n" +"\n" +" Mit »dirs« kann der Verzeichnisstapel angezeigt werden.\n" +"\n" +" Rückgabewert:\n" +" Gibt 0 zurück, außer wenn ein ungültiges Argument angegeben\n" +" wurde oder der Verzeichniswechsel nicht erfolgreich war." # dirs -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3958,32 +5208,56 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Zeigt den Verzeichnisstapel an.\n" +"\n" +" Zeigt die Liste der gegenwärtig gespeicherten Verzeichnisse.\n" +" Diese werden mit dem `pushd' Kommando eingetragen und mit dem\n" +" `popd' Kommando ausgelesen.\n" +"\n" +" Optionen:\n" +" -c Löscht den Verzeichnisstapel.\n" +" -l Keine Abkürzung für das Heimatverzeichnis durch die\n" +" Tilde (~).\n" +" -p Ausgabe von einem Eintrag pro Zeile.\n" +" -v Ausgabe von einem Eintrag pro Zeile mit Angabe der\n" +" Position im Stapel<\n" +"\n" +" Argumente:\n" +" +N Gibt das N'te Element von links der Liste aus, die\n" +" ohne Argumente ausgegeben wird. Die Zählung beginnt\n" +" bei 0.\n" +" -N Gibt das N'te Element von rechts der Liste aus, die\n" +" ohne Argumente ausgegeben wird. Die Zählung beginnt\n" +" bei 0.\n" +"\n" +" Rückgabewert:\n" +" Gibt Erfolg zurück, außer bei einer ungültigen Option oder wenn\n" +" ein Fehler auftritt." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3996,8 +5270,28 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Setzt oder löscht Shell-Optionen.\n" +"\n" +" Ändert die in »Optionsnamen« genannten Shell-Optionen. Ohne\n" +" Argumente wird eine Liste der Shell-Optionen und deren Status\n" +" ausgegeben.\n" +"\n" +" Optionen:\n" +" -o Beschränkt die Optionsmanen auf die, welche mit \n" +" »set -o« definiert werden müssen.\n" +" -p Gibt alle Shelloptionen und deren Status aus.\n" +" -q Unterdrückt Ausgaben.\n" +" -s Setzt jede Option in »Optionsname.«\n" +" -u Deaktiviert jede Option in »Optionsname«.\n" +"\n" +" Rückgabewert:\n" +" Gibt Erfolg zurück, wenn eine Option gesetzt worden ist. Wenn\n" +" eine ungültige Option angegeben wurde oder eine Option deaktiviert\n" +" worden ist, wird ein Fehler zurückgegeben." -#: builtins.c:1868 +# printf +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -4014,20 +5308,65 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " "assignment\n" " error occurs." msgstr "" +"Formatierte Ausgabe der ARGUMENTE.\n" +"\n" +" Optionen:\n" +" -v var\tDie formatierte Ausgabe ver Variable var zuweisen statt\n" +" \tsie an die Standardausgebe zu senden.\n" +"\n" +" Die FORMAT-Zeichenkette kann einfache Zeichen enthalten, die " +"unverändert\n" +" an die Standardausgabe geschickt werden. Escape-Sequenzen werden " +"umgewandelt\n" +" und an die Standardausgabe geschickt sowie Formatanweisungen, welche " +"das \n" +" nachfolgende ARGUMENT auswerten und ausgeben.\n" +"\n" +" Gegenüber der in printf(1) beschriebenen Standardverion werden " +"zusätzliche\n" +" Formatanweisungen ausgewertet:\n" +"\n" +" %b\tWertet Escape-Sequenzen des zugehörigen Arguments aus.\n" +" %q\tBettet das Argument so ein, dass es als Shelleingabe\n" +" verwendet werden kann.\n" +" %(fmt)T\tAusgabe der aus FMT entstehende Datum-Zeit Zeichenkette, " +"dass\n" +" sie als Zeichenkette für strftime(3) verwendet werden kann.\n" +"\n" +" Die Formatangabe wird wiederverwendet, bis alle Argumente ausgewertet\n" +" sind. Wenn weniger Argumente als Formatangaben vorhanden sind, werden " +"für\n" +" die Argumente Nullwerte bzw. leere Zeichenketten eingesetzt.\n" +"\n" +" Rücgabewert:\n" +" Gibt Erfolg zurück, außer es wird eine ungültige Option angegeben oder " +"ein\n" +" Aus- bzw. Zuweisungsfehler auftritt." -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -4040,21 +5379,26 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1923 +# compgen +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -4066,14 +5410,23 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Zeigt mögliche Komplettierungen.\n" +"\n" +" Wird in Shellfunktionen benutzt, um mögliche Komplettierungen " +"anzuzeigen.\n" +" Wenn das optionale Wort-Argument angegeben ist, werden Komplettierungen\n" +" für dieses Wort erzeugt.\n" +" \n" +" Rückgabewert:\n" +" Falsche Optionen oder Fehler führen zu Rückgabewerten ungleich Null." -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -4082,6 +5435,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4098,7 +5452,7 @@ msgid "" " have a completion specification defined." msgstr "" -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -4109,24 +5463,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -4138,2442 +5494,21 @@ msgid "" " not an indexed array." msgstr "" -#: builtins.c:2001 +# readarray +#: builtins.c:2086 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" +"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 "" -#~ msgstr "" - -#~ 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" +" Ist ein Synonym für »mapfile«." -#~ 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 " -#~ 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" +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: Ungültiger Schlüssel für das assoziative Array." -#~ msgid "\tfrom the stack, so only the stack is manipulated." -#~ msgstr "\tvom Stapel entfernt werden, so daß nur der Stapel verändert wird." +# https://lists.gnu.org/archive/html/bug-bash/2019-09/msg00025.html +#~ msgid "Unknown Signal #" +#~ msgstr "Unbekannte Signalnummer" diff --git a/po/el.gmo b/po/el.gmo new file mode 100644 index 0000000..809aac8 Binary files /dev/null and b/po/el.gmo differ diff --git a/po/el.po b/po/el.po new file mode 100644 index 0000000..a84b8f0 --- /dev/null +++ b/po/el.po @@ -0,0 +1,4656 @@ +# translation of bash to Greek +# Copyright (C) 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Lefteris Dimitroulakis , 2013, 2016, 2017, 2021 +msgid "" +msgstr "" +"Project-Id-Version: bash-5.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2021-04-12 10:35+0300\n" +"Last-Translator: Lefteris Dimitroulakis \n" +"Language-Team: Greek \n" +"Language: el\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.3\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "λάθος δείκτης πίνακα" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: αφαίρεση του χαρακτηριστικού nameref" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: αδυναμία μετατροπής indexed πίνακα σε associative πίνακα" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: αδυναμία εκχώρησης σε μη αριθμητικό δείκτη" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: αδυναμία δημιουργίας: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: δεν μπορώ να βρω keymap για εντολή" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: ο πρώτος μη-λευκό διάστημα χαρακτήρας δεν είναι «\"»" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "όχι «%c» κλεισήματος σε %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: απουσιάζει ο διαχωριστής δίστιγμο" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: αδυναμία αποσύνδεσης" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: αδυναμία εκχώρησης μνήμης για %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: αδυναμία εκχώρησης μνήμης για %u στοιχεία" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: αδυναμία εκχώρησης μνήμης για «%s»" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: μη έγκυρο συνώνυμο" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "μη ενεργοποιημένο line editing" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: μη έγκυρο όνομα keymap" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: αδυναμία ανάγνωσης: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: άγνωστο όνομα συνάρτησης" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s δεν έχει συνδεθεί με κανένα πλήκτρο.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s μπορεί να κληθεί μέσω " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: αδυναμία αποσύνδεσης" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "αριθμός βρόχων" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "έχει μόνο νόημα σε ένα βρόχο «for», «while», ή «until»" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"Επιστρέφει το context της κλήσης της τρέχουσας υπορουτίνας.\n" +" \n" +" Χωρίς EXPR, επιστρέφει \"$line $filename\". Με EXPR, επιστρέφει\n" +" \"$line $subroutine $filename\", αυτή η έξτρα πληροφορία μπορεί να " +"χρησιμοποιηθει\n" +" για να δώσει ένα stack trace.\n" +" \n" +" Η τιμή του EXPR δηλώνει πόσα call frames να πας πίσω πριν\n" +" από το τρέχον, το ανώτατο είναι το frame 0." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME δεν έχει οριστεί" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "πάρα πολλά ορίσματα" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "κατάλογος nul" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD δεν έχει οριστεί" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "γραμμή %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "προειδοποίηση: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: χρήση: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: η επιλογή απαιτεί όρισμα" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: απαιτείται αριθμητικό όρισμα" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: δεν βρέθηκε" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: μη έγκυρη επιλογή" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: μη έγκυρο όνομα επιλογής" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: μή έγκυρο αναγνωριστικό" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "μη έγκυρος οκταδικός αριθμός" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "μη έγκυρος εξαδικός αριθμός" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "μη έγκυρος αριθμός" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: μη έγκυρη προδιαγραφή σήματος" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s»: όχι pid ή έγκυρο job spec" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: μεταβλητή μόνο για ανάγνωση" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: αδυναμία «unset»" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s εκτός ορίων" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "όρισμα" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s εκτός ορίων" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: δεν υπάρχει τέτοια εργασία" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: όχι έλεγχος εγασιών" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "όχι έλεγχος εργασιών" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: περιορισμένο" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "περιορισμένο" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: όχι ένα builtin κελύφους" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "σφάλμα εγγραφής: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "σφάλμα κατά τον ορισμό των χαρακτηριστικών τερματικού: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "σφάλμα κατά την λήψη των χαρακτηριστικών τερματικού: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: σφάλμα κατά την ανάκτηση τρέχοντος καταλόγου: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: ασαφείς προδιαγραφές εργασίας" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "βοήθεια μη διαθέσιμη σ' αυτήν την έκδοση" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: αδυναμία unset: %s μόνο για ανάγνωση" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: αδυναμία «unset»" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: μη έγκυρο όνομα ενέργειας" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, 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:846 +msgid "not currently executing completion function" +msgstr "η λειτουργία συμπλήρωσης δεν εκτελείται επί του παρόντος" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "μπορεί να χρησιμοποιηθεί μόνο μέσα σε συνάρτηση" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "" +"η επιλογή «-f» δεν μπορεί να χρησιμοποιηθεί για τη δημιουργία συναρτήσεων" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: συνάρτηση μόνο για ανάγνωση" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: η μεταβλητή αναφοράς δεν μπορεί να είναι πίνακας" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref αυτοαναφορά μεταβλητής δεν επιτρέπεται" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: κυκλική αναφορά ονόματος" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: μη έγκυρο όνομα μεταβλητής για όνομα αναφοράς" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: αδυναμία καταστροφής μεταβλητής πίνακα κατ' αυτόν τον τρόπο" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: αδυναμία μετατροπής associative πίνακα σε indexed πίνακα" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: η σύνθετη εκχώρηση πίνακα απορρίφθηκε" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "δυναμική φόρτωση μη διαθέσημη" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "αδυναμία ανοίγματος κοινόχρηστου αντικειμένου %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "αδυναμία εύρεσης %s στο κοινόχρηστο αντικείμενο %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: δυναμικό builtin ήδη φορτωμένο" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "h συνάρτηση φορτώματος του %s επιστρέφει λάθος (%d): δεν φορτώθηκε" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: δεν φορτώθηκε δυναμικά" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: αδυναμία διαγραφής: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: είναι κατάλογος" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: όχι κανονικό αρχείο" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: αρχείο πολύ μεγάλο" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: αδυναμία εκτέλεσης δυαδικού αρχείου" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: αδυναμία εκτέλεσης: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "όχι login shell: χρησιμοποίησε «exit»" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Υπάρχουν σταματημένες εργασίες.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Υπάρχουν εργασίες που τρέχουν.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "δεν βρέθηκε εντολή" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "history specification" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: αδυναμία ανοίγματος προσωρινού αρχείου: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "τρέχων" + +#: builtins/fg_bg.def:161 +#, 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:91 +msgid "hashing disabled" +msgstr "hashing απενεργοποιημένο" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: πίνακας hash κενός\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tcommand\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Εντολές κελύφους που ταιριάζουν στη λέξη-κλειδί `" +msgstr[1] "Εντολές κελύφους που ταιριάζουν στις λέξεις-κλειδί" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"ουδεμία βοήθεια ταιριάζει με «%s». Δοκιμάστε «help help» ή «man -k %s» ή " +"«info %s»." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: αδυναμία ανοίγματος: %s" + +#: builtins/help.def:523 +#, 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 "" +"Αυτές οι εντολές ορίζονται εσωτερικά. Δώσε «help» για να δεις την λίστα.\n" +"Δώσε «help name» για να δεις περισσότερα για την συνάρτηση «name».\n" +"Χρησιμοποίησε «info bash» για να βρεις περισσότερα σχετικά με το κέλυφος.\n" +"Χρησιμοποίησε «man -k» ή «info» για να βρεις περισσότερα για εντολές από την " +"λίστα.\n" +"\n" +"Αστερίσκος (*) δίπλα στο όνομα σημαίνει ότι η εντολή είναι " +"απενεργοποιημένη.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "δεν μπορώ να χρησιμοποιήσω περισσότερες της μιας από τις -anrw" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "θέση στο ιστορικό" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: μη έγκυρη χρονοσήμανση" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: η ανάπτυξη του ιστορικού σταμάτησε" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: αποτυχία inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "δεν επιτρέπονται άλλες επιλογές με την «-x»" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: ορίσματα πρέπει να είναι ID διεργασιών ή εργασιών" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Άγνωστο σφάλμα" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "αναμενόταν έκφραση" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: μη δικτοδοτημένος πίνακας" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: μη έγκυρη προδιαγραφή περιγραφέα αρχείου" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: μη έγκυρος περιγραφέας αρχείου: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: μη έγκυρος αριθμός γραμμής" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: μη έγκυρη αρχή πίνακα" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: μη έγκυρο κβάντο του callback" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "όνομα μεταβλητής πίνακα κενό" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "απαιτείται υποστήριξη μεταβλητής πίνακος" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: απουσία χαρακτήρα φορμαρίσματος" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: μη έγκυρη προδιαγραφή για φορμά χρόνου" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: μη έγκυρος χαρακτήρας φορμαρίσματος" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "προειδοποίηση: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "πρόβλημα ανάλυσης του format: %s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "απουσία hex ψηφίου για \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "απουσία ψηφίου unicode για \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "όχι άλλος κατάλογος" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: μη έγκυρο όρισμα" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<όχι τρέχων κατάλογος>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "κενή στίβα καταλόγου" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "δείκτης στοίβας καταλόγου" + +#: builtins/pushd.def:701 +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:723 +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:748 +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:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: μη έγκυρη προδιαγραφή timeout" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "σφάλμα ανάγνωσης: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "«επιστροφή» είναι μόνο δυνατή από συνάρτηση ή sourced script" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "«unset» δεν μπορεί να εφαρμοστεί συγχρόνως σε συνάρτηση και μεταβλητή" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: δεν είναι μεταβλητή πίνακα" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: δεν είναι συνάρτηση" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: αδυναμία εξαγωγής" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "αριθμός του « shift »" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "" +"οι επιλογές κελύφους δεν είναι δυνατόν συγχρόνως να ενεργοποιηθούν και " +"απενεργοποιηθούν" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: μη έγκυρο όνομα επιλογής" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "απαιτείται όνομα αρχείου για όρισμα" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: αρχείο δεν βρέθηκε" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "αναστολή αδύνατη" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "ένα κέλυφος σύνδεσης δεν μπορεί ν' ανασταλεί" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s είναι συνώνυμο του «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s αποτελεί δεσμευμένη λέξη του κελύφους\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s είναι συνάρτηση\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s είναι ένα ειδικό builtin\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s είναι ένα builtin κελύφους\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s είναι %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s is hashed (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: μη έγκυρο όρισμα ορίου" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: λάθος διαταγή" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: αδύνατον να πάρω το όριο: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "όριο" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: αδυναμία μεταβολής ορίου: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "οκταδικός αριθμός" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': μη έγκυρος τελεστής συμβολικού mode" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': μη έγκυρος χαρακτήρας συμβολικού mode" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " γραμμή " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "τελευταία εντολή: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Ακύρωση..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "προειδοποίηση: " + +#: error.c:488 +msgid "unknown command error" +msgstr "σφάλμα άγνωστης εντολής" + +#: error.c:489 +msgid "bad command type" +msgstr "λάθος τύπος εντολής" + +#: error.c:490 +msgid "bad connector" +msgstr "bad connector" + +#: error.c:491 +msgid "bad jump" +msgstr "κακό άλμα" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: μεταβλητή χωρίς σύνδεση" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aη αναμονή για δεδομένα έληξε: αυτόματη αποσύνδεση\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "αδυναμία ανακατεύθυνσης τυπικής εισόδου από /dev/null: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c»: μη έγκυρος χαρακτήρας μορφοποίησης" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] υφίσταται ακόμη" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "pipe error" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: μέγιστο επίπεδο φωλιάσματος eval ξεπεράστηκε (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: μέγιστο επίπεδο φωλιάσματος source ξεπεράστηκε (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: μέγιστο επίπεδο φωλιάσματος συνάρτησης ξεπεράστηκε (%d)" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: περιορισμός: δεν μπορεί να περιέχεται «/» σε όνομα εντολής" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: εντολή δεν βρέθηκε" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: αδυναμία εκτέλεσης δυαδικού αρχείου" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: κακός interpreter" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: αδυναμία εκτέλεσης δυαδικού αρχείου: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s»: είναι ειδικό builtin" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "αδυναμία αντιγραφής του fd %d στον fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "υπέρβαση του επιπέδου αναδρομικότητας στην έκφραση" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "αρνητική υπερχείλιση στοίβας" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "συντακτικό σφάλμα στην έκφραση" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "απόπειρα ανάθεσης σε μη-μεταβλητή" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "συντακτικό σφάλμα στην ανάθεση μεταβλητής" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "διαίρεση διά του 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "bug: κακό σύμβολο για expassign" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "«:» αναμενόταν για μια έκφραση υπό συνθήκη" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "εκθέτης μικρότερος του 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "αναγνωριστικό αναμενόταν μετά από pre-increment ή pre-decrement" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "λείπει «)»" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "syntax error: αναμενόταν τελεστέος" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntax error: μη έγκυρος αριθμητικός τελεστής" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (το λανθασμένο σύμβολο είναι \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "μη έγκυρη αριθμητική βάση" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "μη έγκυρη ακέραιη σταθερά" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "τιμή πολύ μεγάλη για βάση" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: σφάλμα έκφρασης\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: αδυναμία πρόσβασης στο γονικό κατάλογο" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "αδυναμία επανάταξης nodelay mode για fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"αδυναμία εκχώρησης νέου περιγραφέα αρχείου για είσοδο του bash από fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: ο buffer υπάρχει ήδη για νέο fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "η διεργασία κλώνος %d εμφανίζεται στην εργασία που τρέχει %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "διαγραφή σταματημένης εγασίας %d με ομάδα %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) μαρκαρισμένη ως ακόμα ζωντανή" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: δεν υπάρχει τέτοιο pid" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Σήμα %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Done" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Sταματημένο" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Σταματημένο(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Υπό εκτέλεση" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Done(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Έξοδος %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Άγνωστη κατάσταση" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(core dumped) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "child setpgid (%ld to %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: διεργασία %ld δεν αποτελεί θυγατρική αυτού του κελύφους" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Δεν υπάρχουν στοιχεία για διεργασία %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: η εργασία %d είναι σταματημένη" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: δεν υπάρχει τέτοια εργασία" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: η εργασία τερματίστηκε" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: εργασία %d ήδη στο παρασκήνιο" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: ενεργοποίηση WNOHANG ώστε ν' αποφευχθεί οριστικό μπλοκάρισμα" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: γραμμή %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (core dumped)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(τώρα wd: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: αποτυχία getpgrp" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: όχι έλεγχος εργασιών στο παρασκήνιο" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: line discipline" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "αδυναμία ρύθμισης της ομάδας της διεργασίας του τερματικού (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "δεν υπάρχει job control σ'αυτό το κέλυφος" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: αποτυχημένη assertion: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: αποτυχιμένη επιβεβαίωση\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "άγνωστο" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: μπλοκ στην ελεύθερη λίστα clobbered" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: κλήθηκε με όρισμα ήδη ελευθερωμένο μπλοκ" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: κλήθηκε με όρισμα ένα μη εκχωρημένο μπλοκ" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: εντοπίστηκε αρνητική υπερχείληση, mh_nbytes εκτός ορίου" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: εντοπίστηκε αρνητική υπερχείληση, magic8 corrupted" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: τα μεγέθη των κομματιών στην αρχή και το τέλος διαφέρουν" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: κλήθηκε με όρισμα ένα μη εκχωρημένο μπλοκ" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: εντοπίστηκε αρνητική υπερχείληση, mh_nbytes εκτός ορίου" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: εντοπίστηκε αρνητική υπερχείληση, magic8 αλλειωμένο" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: μεγέθη κομματιών σ' αρχή και τέλος διαφέρουν" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: πίνακας alloc γεμάτος με FIND_ALLOC;\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p ήδη στον πίνακα ως εκχωρισμένος;\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p ήδη στον πίνακα ως ελεύθερος;\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "μη έγκυρη βάση" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: άγνωστος host" + +#: 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:347 +msgid "network operations not supported" +msgstr "μη υποστηριζόμενες δικτιακές υπηρεσίες" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: αδυναμία μεταβολής locale (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: αδυναμία μεταβολής locale (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: αδυναμία μεταβολής locale (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: αδυναμία μεταβολής locale (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Έχεις μήνυμα στο $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Έχεις νέο μήνυμα στο $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Το μήνυμα στο %s διαβάστηκε\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "syntax error: απαιτείται αριθμητική έκφραση" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "συντακτικό σφάλμα: δεν αναμενόταν «;»" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "συντακτικό σφάλμα: «((%s))»" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: ο τύπος οδηγίας δεν είναι σωστός %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document στη γραμμή %d με όριο το τέλος του αρχείου (αντί του «%s»)" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: η οδηγία της ανακατεύθυνσης «%d» εκτός ορίων" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) υπερβαίνει το SIZE_MAX (%lu): γραμμή " +"κόπηκε" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "ο μέγιστος αριθμός here-document ξεπεράστηκε" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "μη αναμενόμενο EOF κατά την αναζήτηση «%c»" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "μη αναμενόμενο EOF ενώ έψαχνα για «]]»" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntax error in conditional expression: μη αναμενόμενο σύμβολο «%s»" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "συντακτικό σφάλμα σ' έκφραση υπό συνθήκη" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "μη αναμενόμενο σύμβολο «%s», αναμενόταν «)»" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "αναμενόταν «)»" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "απροσδόκητο όρισμα «%s» στον υπό αίρεση μοναδιαίο τελεστή" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "απροσδόκητο όρισμα για τον μοναδιαίο τελεστή" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "απροσδόκητο σύμβολο «%s» βρέθηκε αντί για δυαδικό τελεστή υπό αίρεση" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "αναμενόταν δυαδικός τελεστής υπό αίρεση" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "απροσδόκητο όρισμα «%s» για δυαδικό τελεστή υπό αίρεση" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "απροσδόκητο όρισμα για δυαδικό τελεστή υπό αίρεση" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "απροσδόκητο σύμβολο «%c» σε εντολή υπό αίρεση" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "απροσδόκητο σύμβολο «%s» σε εντολή υπό αίρεση" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "απροσδόκητο σύμβολο %d σε εντολή υπό αίρεση" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "συντακτικό σφάλμα κοντά στο μη αναμενόμενο σύμβολο «%s»" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "συντακτικό σφάλμα κοντά σε «%s»" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "syntax error: μη αναμενόμενο τέλος αρχείου" + +#: parse.y:6151 +msgid "syntax error" +msgstr "συντακτικό σφάλμα" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Χρήση «%s» για έξοδο από το κέλυφος.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "μη αναμενόμενο EOF ενώ έψαχνα «)»" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: η συνάρτηση «%s» δεν βρέθηκε" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: λάθος connector «%d»" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: μη έγκυρος περιγραφέας αρχείου" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL file pointer" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: μη έγκυρη μορφή χαρακτήρα" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "περιγραφέας αρχείου εκτός ορίων" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: ασαφής ανακατεύθυνση" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: αδυναμία εγγραφής πάνω σε υπάρχον αρχείο" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricted: αδυναμία ανακατεύθυνσης εξόδου" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "αδυναμία δημιουργίας προσωρινού αρχείου για here-document: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: αδυναμία ανάθεσης fd σε μεταβλητή" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port δεν υποστηρίζεται χωρίς δικτύωση" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "redirection error: ντουμπλάρισμα fd αδύνατον" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "δεν μπόρεσα να βρω /tmp, παρακαλώ να τον δημιουργήσετε!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp πρέπει να είναι ένα έγκυρο όνομα αρχείου" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" +"κατάσταση βελτιωμένης εμφάνισης δεδομένων παρακάμπτεται στο " +"αλληλοεπιδραστικό κέλυφος" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: μη έγκυρη επιλογή" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "αδυναμία ρύθμισης uid σε %d: effective uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "αδυναμί ρύθμισης gid σε %d: effective gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "αδυναμία εκκίνησης του debugger, debugging απενεργοποιημένο" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: είναι κατάλογος" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Δεν έχω όνομα!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, έκδοση %s-(%s)\n" + +#: shell.c:2062 +#, 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:2064 +msgid "GNU long options:\n" +msgstr "Μακρές επιλογές GNU:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Επιλογές κελύφους:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD ή -c εντολή ή -O shopt_option\t\t(invocation only)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ή επιλογή -o\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Πληκτρολόγησε «%s -c \"help set\"» για πληροφορίες επί των επιλογών " +"κελύφους.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Πληκτρολόγησε «%s -c help» για περισσότερες πληροφορίες σχετικά με τις " +"ενσωματομένες στο κέλυφος εντολές.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Χρησιμοποίησε την εντολή «bashbug» για αναφορά σφαλμάτων.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "σελίδα του bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Γενική βοήθεια για την χρήση του λογισμικού GNU: \n" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: μη έγκυρη λειτουργία" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Ψεύτικο σήμα" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Hangup" + +#: siglist.c:55 +msgid "Interrupt" +msgstr "Διακοπή" + +#: siglist.c:59 +msgid "Quit" +msgstr "Quit" + +#: siglist.c:63 +msgid "Illegal instruction" +msgstr "Μη έγκυρη οδηγία" + +#: siglist.c:67 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "Οδηγία ABORT" + +#: siglist.c:79 +msgid "EMT instruction" +msgstr "Οδηγία EMT" + +#: siglist.c:83 +msgid "Floating point exception" +msgstr "Εξαίρεση κινητής υποδιαστολής" + +#: siglist.c:87 +msgid "Killed" +msgstr "Killed" + +#: siglist.c:91 +msgid "Bus error" +msgstr "Bus error" + +#: 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 "Επείγουσα κατάσταση IO" + +#: siglist.c:119 +msgid "Stopped (signal)" +msgstr "Σταματημένο (σήμα)" + +#: siglist.c:127 +msgid "Continue" +msgstr "Συνέχεια" + +#: siglist.c:135 +msgid "Child death or stop" +msgstr "Child death or stop" + +#: 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 ready" + +#: siglist.c:151 +msgid "CPU limit" +msgstr "όριο CPU" + +#: siglist.c:155 +msgid "File limit" +msgstr "Όριο αρχείου" + +#: 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 "Παράθυρο άλλαξε" + +#: 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 "Κατάσταση επιτήρησης HFT δόθηκε" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "Κατάσταση επιτήρησης HFT αναιρέθηκε" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "Στιγμιότυπο ήχου HFT περατώθηκε." + +#: siglist.c:215 +msgid "Information request" +msgstr "Αίτηση για πληροφορίες" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Άγνωστο σήμα #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "κακή αντικατάσταση: όχι «%s» που κλείνει στο %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: αδυναμία εκχώρησης λίστας σε στοιχείο του πίνακα" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "αδυναμία δημιουργίας σωλήνα για αντικατάσταση διεργασίας" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "αδυναμία δημιουργίας θυγατρικής για αντικατάσταση διεργασίας" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "αδυναμία ανοίγματοε επώνυμης σωλήνας %s προς ανάγνωση" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "αδυναμία ανοίγματος επώνυμης σωλήνας %s προς εγγραφή" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "αδυναμία αναπαραγωγής named pipe %s ως fd %d" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "αντικατάσταση εντολής: null byte αγνοήθηκε στην είσοδο" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "αδυναμία δημιουργίας σωλήνα για αντικατάσταση εντολής" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "αδυναμία δημιουργίας θυγατρικής για αντικατάσταση εντολής" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: αδυναμία αναπαραγωγής σωλήνα ως fd 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: μη έγκυρο όνομα μεταβλητής ως όνομα αναφοράς" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: μη έγκυρη έμμεση επέκταση" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: μη έγκυρο όνομα μεταβλητής" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: παράμετρος δεν έχει οριστεί" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: παράμετρος κενή ή δεν έχει οριστεί" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: έκφραση αρνητική < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: κακή αντικατάσταση" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: αδύνατη ανάθεση κατ' αυτόν τον τρόπο" + +#: subst.c:10111 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"μελλοντικές εκδόσεις του κελύφους θα επιβάλουν την αποτίμηση ως μια " +"αριθμητική αντικατάσταση" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "κακή αντικατάσταση: δεν υπάρχει «`» που κλείνει στο %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "χωρίς ταίριασμα: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "αναμενόταν όρισμα" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: αναμενόταν ως έκφραση ακέραιος αριθμός" + +#: test.c:265 +msgid "`)' expected" +msgstr "αναμενόταν «)»" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "σναμενόταν «)», βρέθηκε %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: αναμενόταν δυαδικός τελεστής" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: αναμενόταν μοναδιαίος τελεστής" + +#: test.c:896 +msgid "missing `]'" +msgstr "απούσα «]»" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "συντακτικό σφάλμα: δεν αναμενόταν «%s»" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "μη έγκυρος αριθμός σήματος" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: μέγιστο επίπεδο φωλιάσματος ξεπεράστηκε (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: κακή τιμή στην trap_list[%d]: %p" + +#: trap.c:416 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: ο διαχειριστής σήματος είναι ο SIG_DFL, στέλνει %d (%s) " +"σε μένα" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: κακό σήμα %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "σφάλμα κατά την εισαγωγή του ορισμού της συνάρτησης «%s»" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "επίπεδο κελύφους (%d) πολύ υψηλό, επαναφορά στο 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: no function context at current scope" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: η μεταβλητή δεν μπορεί να δεχτεί τιμή" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s έχει κενό exportstr" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "ο χαρακτήρας %d δεν έίναι έγκυρος στην exportstr για %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "απουσία «=» στην exportstr για %s" + +#: variables.c:5317 +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:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: no global_variables context" + +#: variables.c:5410 +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:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: αδυναμία ανοίγματος ως ΑΡΧΕΙΟ" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: μη έγκυρη τιμή για trace file descriptor" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: τιμή συμβατότητας εκτός ορίου" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"License GPLv3+: GNU GPL έκδοση 3 ή νεώτερη \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, έκδοση %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: αδυναμία εκχώρησης %lu bytes (%lu bytes εκχωρήθηκαν)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: αδυναμία εκχώρησης %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: αδυναμία εκχώρησης %lu bytes (%lu bytes εκχωρήθηκαν)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: αδυναμία εκχώρησης %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [name[=value] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] name [name ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function ή readline-command]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-builtin [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [name[=value] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilnrtux] [-p] name[=value] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] name[=value] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filename] [name ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring όνομα [arg]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +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:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [pattern ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d offset] [n] ή history -anrw [filename] ή history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" + +#: builtins.c:134 +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:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +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:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] ή export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] ή readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filename [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". όνομα αρχείου [ορίσματα]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] name [name ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [mode]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" + +#: builtins.c:194 +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:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while COMMANDS; do COMMANDS; done" + +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until COMMANDS; do COMMANDS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAME] command [redirections]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMMANDS ; } ή name () { COMMANDS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expression ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Ονόματα και σημασία ορισμένων μεταβλητών του κελύφους" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [ορίσματα]" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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:235 +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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DE] [name ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-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:256 +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:278 +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" +" \n" +" Επιλογές:\n" +" -a\tαφαίρεση όλων των συνωνύμων.\n" +" \n" +" Επιστρέφει επιτυχία εκτός αν το ΟΝΟΜΑ δεν είναι υπαρκτό συνώνυμο." + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" + +#: builtins.c:330 +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:342 +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" +" Ξαναρχίζει την επόμενη επανάληψη του βρόχου FOR, WHILE ή UNTIL .\n" +" Αν N είναι ορισμένο, ξαναρχίζει το N-στο βρόχο.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Ο κωδικός εξόδου είναι 0 εκτός αν το N δεν είναι μαγαλύτερο ή ίσον του 1." + +#: builtins.c:354 +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:369 +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:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +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" +" \t\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 "" +"Εμφάνιση του ονόματος του τρέχοντος καταλόγου εργασίας.\n" +" \n" +" Επιλογές:\n" +" -L\tεμφάνιση της τιμής της $PWD if it names the current working\n" +" \tdirectory\n" +" -P\tεμφάνιση του φυσικού καταλόγου, χωρίς συμβολικούς συνδέσμους\n" +" \n" +" Από προεπιλογή, η «pwd» συμπεριφέρεται σαν να είχε δωθεί «-L» .\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει 0 εκτός αν δίνεται μη έγκυρη επιλογή ή ο τρέχων κατάλογος\n" +" δεν μπορεί να διαβαστεί." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Εντολή Null.\n" +" \n" +" Κανένα αποτέλεσμα, η εντολή δεν κάνει τίποτα.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Πάντα επιτυχία." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Επιστρέφει επιτυχημένο αποτέλεσμα.\n" +" \n" +" Κατάσταση Εξόδου:\n" +" Πάντοτε επιτυχία." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Επιστρέφει αποτυχημένο αποτέλεσμα.\n" +" \n" +" Κατάσταση Εξόδου:\n" +" Πάντοτε αποτυχία." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Καθορίζει τιμές και χαρακτηριστκά μεταβλητής.\n" +" \n" +" Συνώνημο με «declare». Βλέπε «help declare»." + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Γράφει ορίσματα στη κανονική έξοδο.\n" +" \n" +" Εμφανίζει τα ARG, χωρισμένα από χαρακτήρες απλού διαστήματος " +"ακολουθούμενα από\n" +" νέα γραμμή, στη τυπική έξοδο.\n" +" \n" +" Έπιλογές:\n" +" -n\tδεν επισυνάπτεται νέα γραμμή\n" +" -e\tενεργοποίηση ερμηνείας των παρακάτω backslash διαφυγής\n" +" -E\tρητή απενεργοποίηση ερμηνείας του backslash διαφυγής\n" +" \n" +" η «echo» ερμηνεύει τους επόμενους backslash-escaped χαρακτήρες:\n" +" \a\tσυναγερμός (κουδούνι)\n" +" \\b\tbackspace\n" +" \\c\tκαταστέλλει την παραπέρα έξοδο\n" +" \\e\tχαρακτήρας διαφυγής\n" +" \\E\tχαρακτήρας διαφυγής\n" +" \\f\tνέα σελίδα\n" +" \\n\tνέα γραμμή\n" +" \\r\tcarriage return\n" +" \\t\tοριζόντιο tab\n" +" \\v\tκατακόρυφο tab\n" +" \\\\\tbackslash\n" +" \\0nnn\tο χαρακτήρας με κωδικό ASCII NNN (οκταδικός), ο NNN μπορεί\n" +" \t\tνα είναι 0 έως 3 οκταδικά ψηφία\n" +" \\xHH\tο οκταδικός χαρακτήρας με τιμή HH (εξαδικός), ο HH\n" +" \t\tμπορεί να είναι ένα ή δύο εξαδικά ψηφία\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν συμβεί λάθος εγγραφής." + +#: builtins.c:597 +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 "" +"Γράφει ορίσματα στην κανονική έξοδο.\n" +" \n" +" Εμφανίζει στην κανονική έξοδο τα ARG ακολουθούμενα από μια νέα γραμμή.\n" +" \n" +" Επιλογή:\n" +" -n\tδεν επισυνάπτεις μια νέα γραμμή\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν συμβεί σφάλμα." + +#: builtins.c:612 +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:640 +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 "" +"Εκτελεί ορίσματα σαν να είναι εντολή κελύφους.\n" +" \n" +" Συνδιάζει ARGs σε μια μοναδική συμβολοσειρά, χρησιμοποιεί το αποτέλεσμα " +"ως είσοδο στο κέλυφος,\n" +" και εκτελεί τις εντολές που προκύπτουν.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει τον ίδιο κωδικό εξόδου με την εντολή ή επιτυχία αν ή εντολή " +"είναι κενή." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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:694 +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\texecute COMMAND with an empty environment\n" +" -l\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:715 +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. Αν το N παραληφθεί, η κατάσταση " +"εξόδου\n" +" είναι αυτή της τελευταίας εκτελεσμένης εντολής." + +#: builtins.c:724 +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 "" +"Τερματισμός ενός κελύφους σύνδεσης.\n" +" \n" +" Τερματίζει ένα κέλυφος σύνδεσης με κατάσταση εξόδου N. Επιστρέφει σφάλμα " +"αν δεν εκτελείται\n" +" σ' ένα κέλυφος σύνδεσης." + +#: builtins.c:734 +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:764 +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" +" \n" +" Βάζει την εργασία που ορίζεται από JOB_SPEC στο προσκήνιο, κάνοντάς την\n" +" την τρέχουσα εργασία. Αν δεν δίνεται η JOB_SPEC, τότε χρησιμοποιείται η " +"αντίληψη\n" +" που έχει το κέλυφος ως τρέχουσα εργασία.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Η κατάσταση της εργασίας που μπήκε στο προσκήνιο, ή κωδικός αποτυχίας " +"στην περίπτωση σφάλματος." + +#: builtins.c:779 +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" +" \n" +" Τοποθετεί τις εργασίες που ορίζονται από κάθε JOB_SPEC στο παρασκήνιο,\n" +" όπως αν άρχισαν με «&». Αν δεν δίνεται η JOB_SPEC, τότε χρησιμοποιείται " +"ή αντίληψη που έχει το κέλυφος\n" +" ως τρέχουσα εργασία.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφεται επιτυχία εκτός αν δεν έχει ενεργοποιηθεί job control ή έχει " +"συμβεί σφάλμα." + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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:879 +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\tlists only processes that have changed status since the last\n" +" \t\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:906 +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" +" \t\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 "" +"Αφαίρεση εργασιών από το τρέχον κέλυφος.\n" +" \n" +" Αφαιρεί κάθε όρισμα JOBSPEC από τον πίνακα ενεργών εργασιών. Στην " +"απουσία\n" +" JOBSPEC, τότε το κέλυφος χρησιμοποιεί την ιδέα που έχει περί της " +"τρέχουσας εργασίας.\n" +" \n" +" Επιλογές:\n" +" -a\tαφαιρεί όλες τις εργασίες αν δεν δοθεί JOBSPEC\n" +" -h\tσημαδεύει κάθε JOBSPEC έτσι ώστε το SIGHUP δεν στέλνεται στην " +"εργασία\n" +" \t\tαν το κέλυφος δεχτεί ένα σήμα SIGHUP\n" +" -r\tαφαιρεί μόνο εκτελούμενες εργασίες\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν έχει δοθεί μη έγκυρη επιλογή ή JOBSPEC." + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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:949 +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:994 +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. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1042 +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:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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:1162 +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:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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:1203 +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 "" +"Ολίσθηση θεσιακών παραμέτρων.\n" +" \n" +" Μετονομασία των θεσιακών παραμέτρων $N+1,$N+2 ... to $1,$2 ... Αν N\n" +" δεν δίνεται, υποτίθεται πως είναι 1.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία εκτός αν N είναι αρνητικός ή μαγαλύτερο; από $#." + +#: builtins.c:1215 builtins.c:1230 +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:1246 +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:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Αποτίμηση δυνητικής έκφρασης.\n" +" \n" +" Τερματίζεται με κωδικό 0 (αληθής) ή 1 (ψευδής) ανάλογα\n" +" με την αποτίμηση της EXPR. Η έκφραση μπορεί να είναι μοναδιαία ή " +"δυαδική. Μοναδιαίες\n" +" εκφράσεις χρησιμοποιούνται συχνά για την εξέταση της κατάστασης " +"αρχείου. Υπάρχουν\n" +" τελεστές αλφαριθμητικών όπως και συγκρίσεως αριθμών.\n" +" \n" +" Η συμπεριφορά των τεστ εξαρτάται από τον αριθμό των ορισμάτων. " +"Αναφερθείτε\n" +" στη σελίδα εγχειριδίου του bash για τις ολοκληρωμένες προδιαγραφές.\n" +" \n" +" Τελεστές αρχείων:\n" +" \n" +" -a ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει.\n" +" -b ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι ειδικό αρχείο μπλοκ.\n" +" -c ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι ειδικό αρχείο χαρακτήρων.\n" +" -d ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι κατάλογος.\n" +" -e ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει.\n" +" -f ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει και είναι κανονικό " +"αρχείο.\n" +" -g ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι «set-group-id».\n" +" -h ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι συμβολικός σύνδεσμος.\n" +" -L ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι συμβολικός σύνδεσμος.\n" +" -k ΑΡΧΕΙΟ Αληθής αν το αρχείο έχει ορισμένο το bit «sticky».\n" +" -p ΑΡΧΕΙΟ Αληθής αν το αρχείο μια named pipe.\n" +" -r ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι αναγνώσιμο από εσάς.\n" +" -s ΑΡΧΕΙΟ Αληθής αν το αρχείο υπάρχει και δεν είναι κενό.\n" +" -S ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι ένα socket.\n" +" -t FD Αληθής αν ο FD είναι ανοιγμένος σ' ενα τερματικό.\n" +" -u ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι «set-user-id».\n" +" -w ΑΡΧΕΙΟ Αληθής αν το αρχείο εγγράψιμο από εσάς.\n" +" -x ΑΡΧΕΙΟ Αληθής αν το αρχείο είναι εκτελέσιμο από εσάς.\n" +" -O ΑΡΧΕΙΟ Αληθής αν το αρχείο is effectively owned by you.\n" +" -G ΑΡΧΕΙΟ Αληθής αν το αρχείο is effectively owned by your " +"group.\n" +" -N ΑΡΧΕΙΟ Αληθής αν το αρχείο μεταβλήθηκε από την τελευταία " +"φορά που διαβάστηκε.\n" +" \n" +" ΑΡΧΕΙΟ1 -nt ΑΡΧΕΙΟ2 Αληθής αν το αρχείο1 είναι νεότερο από το αρχείο2 " +"(σύμφωνα\n" +" με την ημερομηνία τροποποίηση).\n" +" \n" +" ΑΡΧΕΙΟ1 -ot ΑΡΧΕΙΟ2 Αληθές αν αρχείο1 είναι παλαιότερο από το " +"αρχείο2.\n" +" \n" +" ΑΡΧΕΙΟ1 -ef ΑΡΧΕΙΟ2 Αληθές αν το αρχείο1 είναι hard link στο " +"αρχείο2.\n" +" \n" +" Τελεστές συμβολοσειράς:\n" +" \n" +" -z STRING Αληθές αν η συμβολοσειρά είναι κενή.\n" +" \n" +" -n STRING\n" +" STRING Αληθές αν η συμβολοσειρά δεν είναι κενή.\n" +" \n" +" STRING1 = STRING2\n" +" Αληθές αν οι συμβολοσειρές είναι ίσες.\n" +" STRING1 != STRING2\n" +" Αληθές αν οι συμβολοσειρές δεν είναι ίσες.\n" +" STRING1 < STRING2\n" +" Αληθές αν η STRING1 προηγείται λεξικογραφικά της " +"STRING2.\n" +" STRING1 > STRING2\n" +" Αληθές αν η STRING1 έπεται λεξικογραφικά της STRING2.\n" +" \n" +" Άλλοι τελεστές:\n" +" \n" +" -o OPTION Αληθές αν η επιλογή του κελύφους OPTION έχει " +"ενεργοποιηθεί.\n" +" -v VAR Αληθές αν η μεταβλητή VAR έχει οριστεί.\n" +" -R VAR Αληθές αν η μεταβλητή VAR έχει οριστεί και είναι όνομα\n" +" αναφοράς.\n" +" ! EXPR Αληθές αν η expr είναι ψευδής.\n" +" EXPR1 -a EXPR2 Αληθές αν αμφότερες οι expr1 ΚΑΙ expr2 είναι αληθείς.\n" +" EXPR1 -o EXPR2 Αληθές αν είτε η expr1 Ή η expr2 είναι αληθής.\n" +" \n" +" arg1 OP arg2 Αρηθμιτικά τεστ. OP είναι ένα από τα -eq, -ne,\n" +" -lt, -le, -gt, ή -ge.\n" +" \n" +" Αριθμητικοί δυαδικοί τελεστές επιστρέφουν αληθές αν ARG1 είναι ίσο, μη-" +"ίσο,\n" +" μικρότερο-από, μικρότερο-από-ή-ίσο, μεγαλύτερο-από, ή μεγαλύτερο-από-ή-" +"ίσο\n" +" από το ARG2.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει επιτυχία αν EXPR αποτιμάται σε αληθές, αποτυχία αν EXPR " +"αποτιμάται σε\n" +" ψευδές ή αν δίδεται ένα μη έγκυρο όρισμα." + +#: builtins.c:1344 +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 "" +"Αποτιμά δυνητική έκφραση.\n" +" \n" +" Συνώνυμο με το «test» builtin, αλλά το τελευταίο όρισμα πρέπει\n" +"να είναι ένα «]», ώστε να κλείνει το αντίστοιχο «[»." + +#: builtins.c:1353 +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" +" \n" +" Εμφανίζει το χρόνο του χρήστη και συστήματος για το κέλυφος και όλες " +"τις\n" +" θυγατρικές διεργασίες.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Πάντα επιτυχία." + +#: builtins.c:1365 +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. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\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 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:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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:1483 +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:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" + +#: builtins.c:1549 +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 "" +"Εκτέλεση εντολών για μέλος μιας λίστας.\n" +" \n" +" Ο βρόχος «for» εκτελεί μια αλληλουχία εντολών για κάθε μέλος\n" +" μιας λίστας. Αν «in ΛΕΞΕΙΣ ...;» δεν δίνεται, τότε υποτίθεται η «in \"$@" +"\"».\n" +" Για κάθε στοιχείο στις ΛΕΞΕΙΣ, ΟΝΟΜΑ ορίζεται σ' αυτό το στοιχείο, και\n" +" οι ΕΝΤΟΛΕΣ εκτελούνται.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει την κατάσταση της τελευταίας εκτελεσμένης εντολής." + +#: builtins.c:1563 +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 "" +"Αριθμητική βρόχου for.\n" +" \n" +" Ισοδύναμο με\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, και EXP3 είναι αριθμητικές εκφράσεις. Αν μια έκφραση\n" +" παραληφθεί, συμπεριφέρεται σαν να είχε αποτιμηθεί ίση με 1.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει τη κατάσταση της τελευταίας εκτελεσμένης εντολής." + +#: builtins.c:1581 +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:1602 +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:1619 +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:1631 +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:1648 +#, fuzzy +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ομαδοποιεί εντολές σαν να είναι μία.\n" +" \n" +" Τρέχει ένα σύνολο εντολών μιας ομάδας. Αυτό είναι ένας τρόπος " +"ανακατεύθυνσης\n" +" ενός συνόλου εντολών.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει την κατάσταση της τελευταίας εντολής που εκτελέστηκε." + +#: builtins.c:1660 +#, fuzzy +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ομαδοποιεί εντολές σαν να είναι μία.\n" +" \n" +" Τρέχει ένα σύνολο εντολών μιας ομάδας. Αυτό είναι ένας τρόπος " +"ανακατεύθυνσης\n" +" ενός συνόλου εντολών.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει την κατάσταση της τελευταίας εντολής που εκτελέστηκε." + +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" + +#: builtins.c:1686 +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:1700 +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" +" \n" +" Τρέχει ένα σύνολο εντολών μιας ομάδας. Αυτό είναι ένας τρόπος " +"ανακατεύθυνσης\n" +" ενός συνόλου εντολών.\n" +" \n" +" Κατάσταση εξόδου:\n" +" Επιστρέφει την κατάσταση της τελευταίας εντολής που εκτελέστηκε." + +#: builtins.c:1712 +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:1727 +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" +" \n" +" Η ΕΚΦΡΑΣΗ αποτιμάται σύμφωνα με τους κανόνες της αριθμητικής.\n" +" Ισοδύναμο με το `let \"ΕΚΦΡΑΣΗ\"'.\n" +" \n" +" Κωδικός εξόδου:\n" +" Επιστρέφει 1 αν η ΕΚΦΡΑΣΗ αποτιμάται σε 0, αλλιώς επιστρέφει 0." + +#: builtins.c:1739 +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:1765 +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:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2004 +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:2019 +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 being executed. If no OPTIONs are given, " +"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" +" \t-I\t\tChange options for completion on the initial word\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:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Διαβάζει γραμμές από αρχείο σε μεταβλητή τύπου πίνακα.\n" +" \n" +" Συνώνυμο του «mapfile»." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: μη έγκυρο κλειδί associative πίνακα" diff --git a/po/en@boldquot.gmo b/po/en@boldquot.gmo index 418ce9b..21505e3 100644 Binary files a/po/en@boldquot.gmo and b/po/en@boldquot.gmo differ diff --git a/po/en@boldquot.po b/po/en@boldquot.po index c5b1461..6b388ff 100644 --- a/po/en@boldquot.po +++ b/po/en@boldquot.po @@ -1,7 +1,7 @@ # English translations for GNU bash package. -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2020 Free Software Foundation, Inc. # This file is distributed under the same license as the GNU bash package. -# Automatically generated, 2009. +# Automatically generated, 2020. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation @@ -30,302 +30,336 @@ # msgid "" msgstr "" -"Project-Id-Version: GNU bash 4.1-release\n" +"Project-Id-Version: GNU bash 5.1-rc3\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" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2020-11-28 12:51-0500\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" +"Language: en\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 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "bad array subscript" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: cannot convert indexed to associative array" +msgid "%s: removing nameref attribute" +msgstr "%s: removing nameref attribute" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: invalid associative array key" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: cannot convert indexed to associative array" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: cannot assign to non-numeric index" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: cannot create: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "bash_execute_unix_command: cannot find keymap for command" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: first non-whitespace character is not ‘\"’" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "no closing ‘%c’ in %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: missing colon separator" -#: builtins/alias.def:132 +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "‘%s’: cannot unbind in command keymap" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: cannot allocate memory for %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: failed to allocate memory for %u elements" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: failed to allocate memory for ‘%s’" + +#: builtins/alias.def:131 variables.c:1817 #, c-format msgid "`%s': invalid alias name" msgstr "‘%s’: invalid alias name" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "line editing not enabled" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "‘%s’: invalid keymap name" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "‘%s’: unknown function name" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s is not bound to any keys.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s can be invoked via " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "‘%s’: cannot unbind" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "loop count" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" -"; this extra information can be used to\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." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME not set" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "too many arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null directory" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD not set" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "line %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "warning: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: option requires an argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: numeric argument required" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: not found" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: invalid option" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: invalid option name" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "‘%s’: not a valid identifier" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "invalid octal number" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "invalid hex number" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "invalid number" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: invalid signal specification" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: readonly variable" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: cannot unset" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s out of range" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s out of range" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: no such job" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: no job control" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "no job control" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: restricted" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "restricted" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: not a shell builtin" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "write error: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "error setting terminal attributes: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "error getting terminal attributes: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: ambiguous job spec" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "help not available in this version" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: cannot unset: readonly %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: cannot unset" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: invalid action name" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: no completion specification" @@ -338,121 +372,156 @@ msgstr "warning: -F option may not work as you expect" msgid "warning: -C option may not work as you expect" msgstr "warning: -C option may not work as you expect" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "not currently executing completion function" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "can only be used in a function" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "cannot use ‘-f’ to make functions" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: readonly function" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: reference variable cannot be an array" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref variable self references not allowed" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circular name reference" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "‘%s’: invalid variable name for name reference" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "%s: cannot destroy array variables in this way" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: quoted compound array assignment deprecated" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynamic loading not available" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "cannot open shared object %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" msgstr "cannot find %s in shared object %s: %s" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamic builtin already loaded" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "load function for %s returns failure (%d): not loaded" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: not dynamically loaded" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: is a directory" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: not a regular file" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: cannot execute binary file" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: cannot execute: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "logout\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "not login shell: use ‘exit’" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "There are stopped jobs.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "There are running jobs.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "no command found" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "history specification" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "current" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "job %d started without job control" @@ -467,28 +536,35 @@ msgstr "%s: illegal option -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: option requires an argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hashing disabled" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: hash table empty\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "hits\tcommand\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." @@ -496,12 +572,12 @@ msgstr "" "no help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ " "or ‘info %s’." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: cannot open: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -522,15 +598,21 @@ msgstr "" "A star (*) next to a name means that the command is disabled.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "cannot use more than one of -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "history position" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: invalid timestamp" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: history expansion failed" @@ -544,93 +626,113 @@ msgstr "%s: inlib failed" msgid "no other options allowed with `-x'" msgstr "no other options allowed with ‘-x’" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "%s: arguments must be process or job IDs" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Unknown error" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "expression expected" -#: builtins/mapfile.def:165 +#: builtins/mapfile.def:180 #, c-format msgid "%s: not an indexed array" msgstr "%s: not an indexed array" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: invalid file descriptor specification" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: invalid file descriptor: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: invalid line count" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: invalid array origin" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: invalid callback quantum" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "empty array variable name" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "array variable support required" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "‘%s’: missing format character" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "‘%c’: invalid time format specification" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "‘%c’: invalid format character" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "warning: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "format parsing problem: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "missing hex digit for \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "missing unicode digit for \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "no other directory" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: invalid argument" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "directory stack empty" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "directory stack index" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -675,7 +777,7 @@ msgstr "" "by\n" "\tdirs when invoked without options, starting with zero." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -721,7 +823,7 @@ msgstr "" " \n" " The ‘dirs’ builtin displays the directory stack." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -750,64 +852,59 @@ msgstr "" " \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" +" \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" -"[0m’\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 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: invalid timeout specification" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "read error: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "can only ‘return’ from a function or sourced script" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: not an array variable" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: not a function" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: cannot export" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "shift count" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "cannot set and unset shell options simultaneously" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: invalid shell option name" @@ -816,397 +913,474 @@ msgstr "%s: invalid shell option name" msgid "filename argument required" msgstr "filename argument required" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: file not found" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "cannot suspend" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "cannot suspend a login shell" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s is aliased to ‘%s’\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s is a shell keyword\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s is a function\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s is a special shell builtin\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s is a shell builtin\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s is %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s is hashed (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: invalid limit argument" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "‘%c’: bad command" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: cannot get limit: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "limit" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: cannot modify limit: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "octal number" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "‘%c’: invalid symbolic mode operator" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " line " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "last command: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Aborting..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "warning: " + +#: error.c:488 msgid "unknown command error" msgstr "unknown command error" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "bad command type" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "bad connector" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "bad jump" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atimed out waiting for input: auto-logout\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" msgstr "cannot redirect standard input from /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: ‘%c’: invalid format character" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] still exists" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "pipe error" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximum eval nesting level exceeded (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum source nesting level exceeded (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "%s: restricted: cannot specify ‘/’ in command names" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: command not found" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: cannot execute binary file" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: bad interpreter" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: cannot execute binary file: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "‘%s’: is a special builtin" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "cannot duplicate fd %d to fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "expression recursion level exceeded" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "recursion stack underflow" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "syntax error in expression" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "attempted assignment to non-variable" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "syntax error in variable assignment" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "division by 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "bug: bad expassign token" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "‘:’ expected for conditional expression" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "exponent less than 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "identifier expected after pre-increment or pre-decrement" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "missing ‘)’" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "syntax error: operand expected" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "syntax error: invalid arithmetic operator" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (error token is “%s”)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "invalid arithmetic base" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "invalid integer constant" + +#: expr.c:1603 msgid "value too great for base" msgstr "value too great for base" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: expression error\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: cannot access parent directories" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "cannot reset nodelay mode for fd %d" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp pipe" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" msgstr "forked pid %d appears in running job %d" -#: jobs.c:1005 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: no such pid" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Done" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Stopped" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Stopped(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Running" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Done(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Exit %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Unknown status" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(core dumped) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "child setpgid (%ld to %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: No record of process %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: job %d is stopped" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: no current jobs" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: job has terminated" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: job %d already in background" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "waitchld: turning on WNOHANG to avoid indefinite block" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: line %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (core dumped)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(wd now: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp failed" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: no job control in background" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: line discipline" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "cannot set terminal process group (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "no job control in this shell" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: failed assertion: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1215,58 +1389,66 @@ msgstr "" "\r\n" "malloc: %s:%d: assertion botched\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "unknown" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: block on free list clobbered" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: called with already freed block argument" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: called with unallocated block argument" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: underflow detected; mh_nbytes out of range" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free: start and end chunk sizes differ" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: called with unallocated block argument" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: underflow detected; mh_nbytes out of range" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "realloc: start and end chunk sizes differ" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "invalid base" @@ -1285,261 +1467,302 @@ msgstr "%s: invalid service" msgid "%s: bad network path specification" msgstr "%s: bad network path specification" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "network operations not supported" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" msgstr "setlocale: LC_ALL: cannot change locale (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" msgstr "setlocale: LC_ALL: cannot change locale (%s): %s" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" msgstr "setlocale: %s: cannot change locale (%s)" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" msgstr "setlocale: %s: cannot change locale (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "You have mail in $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "You have new mail in $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "The mail in %s has been read\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "syntax error: arithmetic expression required" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "syntax error: ‘;’ unexpected" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "syntax error: ‘((%s))’" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: bad instruction type %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "maximum here-document count exceeded" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "unexpected EOF while looking for matching ‘%c’" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "unexpected EOF while looking for ‘]]’" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "syntax error in conditional expression: unexpected token ‘%s’" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "syntax error in conditional expression" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "unexpected token ‘%s’, expected ‘)’" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "expected ‘)’" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "unexpected argument ‘%s’ to conditional unary operator" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "unexpected argument to conditional unary operator" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "unexpected token ‘%s’, conditional binary operator expected" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "conditional binary operator expected" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "unexpected argument ‘%s’ to conditional binary operator" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "unexpected argument to conditional binary operator" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "unexpected token ‘%c’ in conditional command" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "unexpected token ‘%s’ in conditional command" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "unexpected token %d in conditional command" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "syntax error near unexpected token ‘%s’" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "syntax error near ‘%s’" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "syntax error: unexpected end of file" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "syntax error" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Use “%s” to leave the shell.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "unexpected EOF while looking for matching ‘)’" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "completion: function ‘%s’ not found" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possible retry loop" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: bad connector ‘%d’" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" msgstr "xtrace_set: %d: invalid file descriptor" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "xtrace_set: NULL file pointer" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: ‘%c’: invalid format character" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "file descriptor out of range" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: ambiguous redirect" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: cannot overwrite existing file" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: restricted: cannot redirect output" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" msgstr "cannot create temp file for here-document: %s" -#: redir.c:184 +#: redir.c:223 #, c-format msgid "%s: cannot assign fd to variable" msgstr "%s: cannot assign fd to variable" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "/dev/(tcp|udp)/host/port not supported without networking" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "redirection error: cannot duplicate fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "could not find /tmp, please create!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp must be a valid directory name" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pretty-printing mode ignored in interactive shells" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: invalid option" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "cannot set uid to %d: effective uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "cannot set gid to %d: effective gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "cannot start debugger; debugging mode disabled" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Is a directory" + +#: shell.c:1907 msgid "I have no name!" msgstr "I have no name!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, version %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1548,42 +1771,52 @@ msgstr "" "Usage:\t%s [GNU long option] [option] ...\n" "\t%s [GNU long option] [option] script-file ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU long options:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s or -o option\n" -#: shell.c:1822 +#: shell.c:2094 #, 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 +#: shell.c:2095 #, 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 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "Use the ‘bashbug’ command to report bugs.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash home page: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "General help using GNU software: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: invalid operation" @@ -1748,81 +1981,101 @@ msgstr "HFT sound sequence has completed" msgid "Information request" msgstr "Information request" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Unknown Signal #" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Unknown Signal #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "bad substitution: no closing ‘%s’ in %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "%s: cannot assign list to array member" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "cannot make pipe for process substitution" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "cannot make child for process substitution" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "cannot open named pipe %s for reading" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "cannot open named pipe %s for writing" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "cannot duplicate named pipe %s as fd %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "command substitution: ignored null byte in input" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "cannot make pipe for command substitution" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "cannot make child for command substitution" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute: cannot duplicate pipe as fd 1" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: invalid variable name for name reference" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: invalid indirect expansion" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: invalid variable name" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter not set" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parameter null or not set" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: substring expression < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: bad substitution" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: cannot assign in this way" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" @@ -1830,129 +2083,160 @@ msgstr "" "future versions of the shell will force evaluation as an arithmetic " "substitution" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "bad substitution: no closing “`” in %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "no match: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "argument expected" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: integer expression expected" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "‘)’ expected" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: binary operator expected" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unary operator expected" + +#: test.c:896 msgid "missing `]'" msgstr "missing ‘]’" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntax error: ‘%s’ unexpected" + +#: trap.c:220 msgid "invalid signal number" msgstr "invalid signal number" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: maximum trap handler level exceeded (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: bad signal %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "error importing function definition for ‘%s’" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "shell level (%d) too high, resetting to 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "make_local_variable: no function context at current scope" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variable may not be assigned value" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assigning integer to name reference" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "all_local_variables: no function context at current scope" -#: variables.c:3376 +#: variables.c:4757 #, c-format msgid "%s has null exportstr" msgstr "%s has null exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "invalid character %d in exportstr for %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "no ‘=’ in exportstr for %s" -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: no global_variables context" -#: variables.c:3922 +#: variables.c:5410 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 +#: variables.c:6400 #, c-format msgid "%s: %s: cannot open as FILE" msgstr "%s: %s: cannot open as FILE" -#: variables.c:4683 +#: variables.c:6405 #, 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." +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibility value out of range" -#: version.c:47 +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1960,176 +2244,154 @@ msgstr "" "License GPLv3+: GNU GPL version 3 or later \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." -#: 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" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." -#: 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 \n" -msgstr "" -"License GPLv2+: GNU GPL version 2 or later \n" - -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "%s: cannot allocate %lu bytes (%lu bytes allocated)" -#: xmalloc.c:93 +#: xmalloc.c:95 #, c-format msgid "%s: cannot allocate %lu bytes" msgstr "%s: cannot allocate %lu bytes" -#: xmalloc.c:163 +#: xmalloc.c:165 #, 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 +#: xmalloc.c:167 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" msgstr "%s: %s:%d: cannot allocate %lu bytes" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [name[=value] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] name [name ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [shell-builtin [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "true" - -#: builtins.c:72 -msgid "false" -msgstr "false" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [option] name[=value] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f filename] [name ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [job_spec]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [job_spec ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" msgstr "help [-dms] [pattern ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" @@ -2137,15 +2399,15 @@ msgstr "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" -#: builtins.c:125 +#: builtins.c:127 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" @@ -2153,11 +2415,11 @@ msgstr "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let arg [arg ...]" -#: builtins.c:136 +#: builtins.c:138 msgid "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " "prompt] [-t timeout] [-u fd] [name ...]" @@ -2165,99 +2427,97 @@ msgstr "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " "prompt] [-t timeout] [-u fd] [name ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [name[=value] ...] or export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [name[=value] ...] or readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] or export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] or readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source filename [arguments]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". filename [arguments]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [expr]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[arg] signal_spec ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] name [name ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [limit]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [mode]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] pipeline" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2265,101 +2525,103 @@ msgstr "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while COMMANDS; do COMMANDS; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until COMMANDS; do COMMANDS; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NAME] command [redirections]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function name { COMMANDS ; } or name () { COMMANDS ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ COMMANDS ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "job_spec [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( expression ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ expression ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "variables - Names and meanings of some shell variables" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [optname ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v var] format [arguments]" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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]" +"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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [name ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-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]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-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]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2371,7 +2633,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2389,30 +2651,30 @@ msgstr "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2446,6 +2708,9 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." @@ -2482,11 +2747,14 @@ msgstr "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2504,7 +2772,7 @@ msgstr "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2522,7 +2790,7 @@ msgstr "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2533,7 +2801,7 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" "Execute shell builtins.\n" " \n" @@ -2544,9 +2812,9 @@ msgstr "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2575,7 +2843,7 @@ msgstr "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2598,14 +2866,26 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" "Change the shell working directory.\n" " \n" @@ -2628,23 +2908,35 @@ msgstr "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of ‘..’\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of ‘..’\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if ‘-L’ were " "specified.\n" +" ‘..’ is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2657,7 +2949,7 @@ msgstr "" " \n" " Options:\n" " -L\tprint the value of $PWD if it names the current working\n" -" \tdirectory\n" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, ‘pwd’ behaves as if ‘-L’ were specified.\n" @@ -2666,7 +2958,7 @@ msgstr "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2682,7 +2974,7 @@ msgstr "" " Exit Status:\n" " Always succeeds." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2694,7 +2986,7 @@ msgstr "" " Exit Status:\n" " Always succeeds." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2706,7 +2998,7 @@ msgstr "" " Exit Status:\n" " Always fails." -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2716,10 +3008,10 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2732,16 +3024,16 @@ msgstr "" " 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’ " +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the ‘type’ " "builtin\n" -" -V\tprint a more verbose description of each COMMAND\n" +" -V print 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 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2751,17 +3043,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2771,10 +3068,11 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" "Set variable values and attributes.\n" " \n" @@ -2784,17 +3082,22 @@ msgstr "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using ‘+’ instead of ‘-’ turns off the given attribute.\n" @@ -2805,22 +3108,23 @@ msgstr "" " \n" " When used in a function, ‘declare’ makes NAMEs local, as with the " "‘local’\n" -" command.\n" +" command. The ‘-g’ option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Set variable values and attributes.\n" " \n" -" Obsolete. See ‘help declare’." +" A synonym for ‘declare’. See ‘help declare’." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2831,8 +3135,8 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" "Define local variables.\n" " \n" @@ -2843,14 +3147,16 @@ msgstr "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2862,6 +3168,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2869,16 +3176,24 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2890,6 +3205,7 @@ msgstr "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2897,14 +3213,20 @@ msgstr "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2926,7 +3248,7 @@ msgstr "" " Exit Status:\n" " Returns success unless a write error occurs." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2976,7 +3298,7 @@ msgstr "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2996,7 +3318,7 @@ msgstr "" " Exit Status:\n" " Returns exit status of command or success if command is null." -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -3029,8 +3351,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3070,14 +3392,14 @@ msgstr "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -3088,8 +3410,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3108,8 +3430,8 @@ msgstr "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3119,7 +3441,7 @@ msgstr "" " Returns success unless COMMAND is not found or a redirection error " "occurs." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3131,7 +3453,7 @@ msgstr "" " 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -3145,7 +3467,7 @@ msgstr "" "executed\n" " in a login shell." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -3193,8 +3515,8 @@ msgstr "" " 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" +" 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" @@ -3203,7 +3525,7 @@ msgstr "" " Returns success or status of executed command; non-zero if an error " "occurs." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3223,7 +3545,7 @@ msgstr "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -3247,7 +3569,7 @@ msgstr "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -3256,15 +3578,15 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3277,21 +3599,21 @@ msgstr "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3303,10 +3625,10 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " @@ -3322,16 +3644,16 @@ msgstr "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " "given." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3340,23 +3662,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3372,23 +3695,24 @@ msgstr "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3396,7 +3720,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3405,8 +3729,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3426,8 +3750,8 @@ msgstr "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3440,7 +3764,7 @@ msgstr "" " 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 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3450,7 +3774,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3464,13 +3788,13 @@ msgstr "" " 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" +" \t\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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3482,7 +3806,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3501,7 +3826,8 @@ msgstr "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3510,7 +3836,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3552,7 +3878,7 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" "Evaluate arithmetic expressions.\n" " \n" @@ -3594,9 +3920,10 @@ msgstr "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." -#: builtins.c:966 +#: builtins.c:994 +#, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -3607,7 +3934,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3617,30 +3946,34 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\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" @@ -3662,33 +3995,37 @@ msgstr "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3708,7 +4045,7 @@ msgstr "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3774,9 +4111,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3853,9 +4194,13 @@ msgstr "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3868,7 +4213,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3877,6 +4222,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3894,6 +4241,8 @@ msgstr "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3904,7 +4253,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3938,7 +4287,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3950,7 +4299,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3967,14 +4317,15 @@ msgstr "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3992,7 +4343,7 @@ msgstr "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -4016,7 +4367,7 @@ msgstr "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4040,14 +4391,17 @@ msgstr "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4101,6 +4455,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4121,7 +4478,10 @@ msgstr "" " 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4175,6 +4535,9 @@ msgstr "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4190,7 +4553,7 @@ msgstr "" " Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" " false or an invalid argument is given." -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4203,7 +4566,7 @@ msgstr "" "must\n" " be a literal ‘]’, to match the opening ‘[’." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -4223,7 +4586,7 @@ msgstr "" " Exit Status:\n" " Always succeeds." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -4239,7 +4602,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4273,7 +4644,15 @@ msgstr "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4292,7 +4671,7 @@ msgstr "" " Returns success unless a SIGSPEC is invalid or an invalid option is " "given." -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4301,18 +4680,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4328,20 +4707,20 @@ msgstr "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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" +" \t\tor nothing if ‘type -t NAME’ would not return ‘file’\n" +" -t\toutput a single word which is one of ‘alias’, " +"‘keyword’,\n" +" \t\t‘function’, ‘builtin’, ‘file’ or ‘’, if NAME " +"is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4350,7 +4729,7 @@ msgstr "" " Returns success if all of the NAMEs are found; fails if any are not " "found." -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -4368,6 +4747,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4379,6 +4759,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4409,6 +4794,7 @@ msgstr "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4420,6 +4806,11 @@ msgstr "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\n" " \n" " If LIMIT is given, it is the new value of the specified resource; the\n" " special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ " @@ -4435,7 +4826,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4467,61 +4858,93 @@ msgstr "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4545,7 +4968,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4575,7 +4998,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4598,8 +5021,8 @@ msgstr "" " \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" +" 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" @@ -4612,7 +5035,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4640,7 +5063,7 @@ msgstr "" " Exit Status:\n" " The return status is the return status of PIPELINE." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4658,7 +5081,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -4696,12 +5119,14 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4714,12 +5139,14 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4732,7 +5159,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4742,7 +5169,7 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" "Create a coprocess named NAME.\n" " \n" @@ -4752,9 +5179,9 @@ msgstr "" " The default NAME is “COPROC”.\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -4778,7 +5205,7 @@ msgstr "" " Exit Status:\n" " Returns success unless NAME is readonly." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4796,7 +5223,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4821,12 +5248,12 @@ msgstr "" " Exit Status:\n" " Returns the status of the resumed job." -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4834,12 +5261,12 @@ msgstr "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to “let EXPRESSION”.\n" +" evaluation. Equivalent to ‘let “EXPRESSION”’.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -4893,7 +5320,7 @@ msgstr "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4997,7 +5424,7 @@ msgstr "" " 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 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -5007,19 +5434,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5035,19 +5462,19 @@ msgstr "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by ‘dirs’, starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by ‘dirs’, starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The ‘dirs’ builtin displays the directory stack.\n" " \n" @@ -5055,7 +5482,7 @@ msgstr "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5064,16 +5491,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5088,18 +5515,18 @@ msgstr "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd " +"+0’\n" +" \t\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" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd " +"-0’\n" +" \t\tremoves the last directory, ‘popd -1’ the next to last.\n" " \n" " The ‘dirs’ builtin displays the directory stack.\n" " \n" @@ -5107,7 +5534,7 @@ msgstr "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5118,19 +5545,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5145,31 +5572,30 @@ msgstr "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5185,9 +5611,8 @@ 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with ‘set -o’\n" @@ -5200,7 +5625,8 @@ msgstr "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5217,12 +5643,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -5244,19 +5681,28 @@ msgstr "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " "assignment\n" " error occurs." -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -5269,15 +5715,19 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5293,20 +5743,24 @@ msgstr "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to “empty” commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -5328,13 +5782,13 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5343,6 +5797,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5362,7 +5817,7 @@ msgstr "" " \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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5371,6 +5826,7 @@ msgstr "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using ‘+o’ instead of ‘-o’ turns off the specified option.\n" " \n" @@ -5387,7 +5843,7 @@ msgstr "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -5398,24 +5854,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5435,24 +5893,26 @@ msgstr "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5463,7 +5923,7 @@ msgstr "" "or\n" " not an indexed array." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -5472,3 +5932,7 @@ msgstr "" "Read lines from a file into an array variable.\n" " \n" " A synonym for ‘mapfile’." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: invalid associative array key" diff --git a/po/en@quot.gmo b/po/en@quot.gmo index dfd93eb..710a9d7 100644 Binary files a/po/en@quot.gmo and b/po/en@quot.gmo differ diff --git a/po/en@quot.po b/po/en@quot.po index 557d400..b7668e2 100644 --- a/po/en@quot.po +++ b/po/en@quot.po @@ -1,7 +1,7 @@ # English translations for GNU bash package. -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2020 Free Software Foundation, Inc. # This file is distributed under the same license as the GNU bash package. -# Automatically generated, 2009. +# Automatically generated, 2020. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation @@ -27,302 +27,335 @@ # msgid "" msgstr "" -"Project-Id-Version: GNU bash 4.1-release\n" +"Project-Id-Version: GNU bash 5.1-rc3\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" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2020-11-28 12:51-0500\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" +"Language: en\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 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "bad array subscript" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: cannot convert indexed to associative array" +msgid "%s: removing nameref attribute" +msgstr "%s: removing nameref attribute" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: invalid associative array key" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: cannot convert indexed to associative array" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: cannot assign to non-numeric index" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: cannot create: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "bash_execute_unix_command: cannot find keymap for command" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: first non-whitespace character is not ‘\"’" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "no closing ‘%c’ in %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: missing colon separator" -#: builtins/alias.def:132 +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "‘%s’: cannot unbind in command keymap" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: cannot allocate memory for %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: failed to allocate memory for %u elements" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: failed to allocate memory for ‘%s’" + +#: builtins/alias.def:131 variables.c:1817 #, c-format msgid "`%s': invalid alias name" msgstr "‘%s’: invalid alias name" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "line editing not enabled" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "‘%s’: invalid keymap name" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "‘%s’: unknown function name" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s is not bound to any keys.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s can be invoked via " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "‘%s’: cannot unbind" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "loop count" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" -"; this extra information can be used to\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." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME not set" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "too many arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null directory" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD not set" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "line %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "warning: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: option requires an argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: numeric argument required" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: not found" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: invalid option" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: invalid option name" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "‘%s’: not a valid identifier" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "invalid octal number" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "invalid hex number" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "invalid number" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: invalid signal specification" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: readonly variable" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: cannot unset" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s out of range" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s out of range" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: no such job" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: no job control" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "no job control" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: restricted" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "restricted" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: not a shell builtin" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "write error: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "error setting terminal attributes: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "error getting terminal attributes: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: ambiguous job spec" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "help not available in this version" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: cannot unset: readonly %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: cannot unset" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: invalid action name" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: no completion specification" @@ -335,121 +368,156 @@ msgstr "warning: -F option may not work as you expect" msgid "warning: -C option may not work as you expect" msgstr "warning: -C option may not work as you expect" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "not currently executing completion function" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "can only be used in a function" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "cannot use ‘-f’ to make functions" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: readonly function" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: reference variable cannot be an array" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref variable self references not allowed" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circular name reference" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "‘%s’: invalid variable name for name reference" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "%s: cannot destroy array variables in this way" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: quoted compound array assignment deprecated" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynamic loading not available" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "cannot open shared object %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" msgstr "cannot find %s in shared object %s: %s" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamic builtin already loaded" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "load function for %s returns failure (%d): not loaded" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: not dynamically loaded" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: is a directory" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: not a regular file" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: cannot execute binary file" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: cannot execute: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "logout\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "not login shell: use ‘exit’" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "There are stopped jobs.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "There are running jobs.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "no command found" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "history specification" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "current" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "job %d started without job control" @@ -464,40 +532,47 @@ msgstr "%s: illegal option -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: option requires an argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hashing disabled" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: hash table empty\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "hits\tcommand\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 #, 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 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: cannot open: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -516,15 +591,21 @@ msgstr "" "A star (*) next to a name means that the command is disabled.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "cannot use more than one of -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "history position" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: invalid timestamp" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: history expansion failed" @@ -538,93 +619,113 @@ msgstr "%s: inlib failed" msgid "no other options allowed with `-x'" msgstr "no other options allowed with ‘-x’" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "%s: arguments must be process or job IDs" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Unknown error" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "expression expected" -#: builtins/mapfile.def:165 +#: builtins/mapfile.def:180 #, c-format msgid "%s: not an indexed array" msgstr "%s: not an indexed array" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: invalid file descriptor specification" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: invalid file descriptor: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: invalid line count" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: invalid array origin" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: invalid callback quantum" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "empty array variable name" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "array variable support required" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "‘%s’: missing format character" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "‘%c’: invalid time format specification" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "‘%c’: invalid format character" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "warning: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "format parsing problem: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "missing hex digit for \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "missing unicode digit for \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "no other directory" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: invalid argument" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "directory stack empty" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "directory stack index" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -668,7 +769,7 @@ msgstr "" "by\n" "\tdirs when invoked without options, starting with zero." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -714,7 +815,7 @@ msgstr "" " \n" " The ‘dirs’ builtin displays the directory stack." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -752,53 +853,48 @@ msgstr "" " \n" " The ‘dirs’ builtin displays the directory stack." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: invalid timeout specification" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "read error: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "can only ‘return’ from a function or sourced script" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: not an array variable" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: not a function" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: cannot export" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "shift count" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "cannot set and unset shell options simultaneously" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: invalid shell option name" @@ -807,397 +903,474 @@ msgstr "%s: invalid shell option name" msgid "filename argument required" msgstr "filename argument required" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: file not found" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "cannot suspend" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "cannot suspend a login shell" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s is aliased to ‘%s’\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s is a shell keyword\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s is a function\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s is a special shell builtin\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s is a shell builtin\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s is %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s is hashed (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: invalid limit argument" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "‘%c’: bad command" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: cannot get limit: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "limit" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: cannot modify limit: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "octal number" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "‘%c’: invalid symbolic mode operator" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " line " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "last command: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Aborting..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "warning: " + +#: error.c:488 msgid "unknown command error" msgstr "unknown command error" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "bad command type" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "bad connector" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "bad jump" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atimed out waiting for input: auto-logout\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" msgstr "cannot redirect standard input from /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: ‘%c’: invalid format character" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] still exists" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "pipe error" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximum eval nesting level exceeded (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum source nesting level exceeded (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "%s: restricted: cannot specify ‘/’ in command names" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: command not found" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: cannot execute binary file" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: bad interpreter" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: cannot execute binary file: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "‘%s’: is a special builtin" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "cannot duplicate fd %d to fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "expression recursion level exceeded" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "recursion stack underflow" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "syntax error in expression" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "attempted assignment to non-variable" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "syntax error in variable assignment" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "division by 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "bug: bad expassign token" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "‘:’ expected for conditional expression" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "exponent less than 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "identifier expected after pre-increment or pre-decrement" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "missing ‘)’" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "syntax error: operand expected" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "syntax error: invalid arithmetic operator" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (error token is “%s”)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "invalid arithmetic base" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "invalid integer constant" + +#: expr.c:1603 msgid "value too great for base" msgstr "value too great for base" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: expression error\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: cannot access parent directories" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "cannot reset nodelay mode for fd %d" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp pipe" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" msgstr "forked pid %d appears in running job %d" -#: jobs.c:1005 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: no such pid" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Done" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Stopped" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Stopped(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Running" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Done(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Exit %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Unknown status" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(core dumped) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "child setpgid (%ld to %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: No record of process %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: job %d is stopped" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: no current jobs" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: job has terminated" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: job %d already in background" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "waitchld: turning on WNOHANG to avoid indefinite block" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: line %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (core dumped)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(wd now: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp failed" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: no job control in background" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: line discipline" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "cannot set terminal process group (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "no job control in this shell" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: failed assertion: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1206,58 +1379,66 @@ msgstr "" "\r\n" "malloc: %s:%d: assertion botched\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "unknown" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: block on free list clobbered" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: called with already freed block argument" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: called with unallocated block argument" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: underflow detected; mh_nbytes out of range" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free: start and end chunk sizes differ" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: called with unallocated block argument" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: underflow detected; mh_nbytes out of range" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow detected; magic8 corrupted" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "realloc: start and end chunk sizes differ" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "invalid base" @@ -1276,261 +1457,302 @@ msgstr "%s: invalid service" msgid "%s: bad network path specification" msgstr "%s: bad network path specification" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "network operations not supported" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" msgstr "setlocale: LC_ALL: cannot change locale (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" msgstr "setlocale: LC_ALL: cannot change locale (%s): %s" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" msgstr "setlocale: %s: cannot change locale (%s)" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" msgstr "setlocale: %s: cannot change locale (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "You have mail in $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "You have new mail in $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "The mail in %s has been read\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "syntax error: arithmetic expression required" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "syntax error: ‘;’ unexpected" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "syntax error: ‘((%s))’" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: bad instruction type %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "maximum here-document count exceeded" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "unexpected EOF while looking for matching ‘%c’" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "unexpected EOF while looking for ‘]]’" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "syntax error in conditional expression: unexpected token ‘%s’" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "syntax error in conditional expression" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "unexpected token ‘%s’, expected ‘)’" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "expected ‘)’" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "unexpected argument ‘%s’ to conditional unary operator" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "unexpected argument to conditional unary operator" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "unexpected token ‘%s’, conditional binary operator expected" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "conditional binary operator expected" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "unexpected argument ‘%s’ to conditional binary operator" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "unexpected argument to conditional binary operator" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "unexpected token ‘%c’ in conditional command" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "unexpected token ‘%s’ in conditional command" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "unexpected token %d in conditional command" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "syntax error near unexpected token ‘%s’" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "syntax error near ‘%s’" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "syntax error: unexpected end of file" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "syntax error" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Use “%s” to leave the shell.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "unexpected EOF while looking for matching ‘)’" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "completion: function ‘%s’ not found" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possible retry loop" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: bad connector ‘%d’" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" msgstr "xtrace_set: %d: invalid file descriptor" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "xtrace_set: NULL file pointer" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: ‘%c’: invalid format character" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "file descriptor out of range" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: ambiguous redirect" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: cannot overwrite existing file" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: restricted: cannot redirect output" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" msgstr "cannot create temp file for here-document: %s" -#: redir.c:184 +#: redir.c:223 #, c-format msgid "%s: cannot assign fd to variable" msgstr "%s: cannot assign fd to variable" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "/dev/(tcp|udp)/host/port not supported without networking" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "redirection error: cannot duplicate fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "could not find /tmp, please create!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp must be a valid directory name" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pretty-printing mode ignored in interactive shells" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: invalid option" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "cannot set uid to %d: effective uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "cannot set gid to %d: effective gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "cannot start debugger; debugging mode disabled" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Is a directory" + +#: shell.c:1907 msgid "I have no name!" msgstr "I have no name!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, version %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1539,39 +1761,49 @@ msgstr "" "Usage:\t%s [GNU long option] [option] ...\n" "\t%s [GNU long option] [option] script-file ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU long options:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s or -o option\n" -#: shell.c:1822 +#: shell.c:2094 #, 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 +#: shell.c:2095 #, 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 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "Use the ‘bashbug’ command to report bugs.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash home page: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "General help using GNU software: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: invalid operation" @@ -1736,81 +1968,101 @@ msgstr "HFT sound sequence has completed" msgid "Information request" msgstr "Information request" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Unknown Signal #" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Unknown Signal #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "bad substitution: no closing ‘%s’ in %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "%s: cannot assign list to array member" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "cannot make pipe for process substitution" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "cannot make child for process substitution" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "cannot open named pipe %s for reading" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "cannot open named pipe %s for writing" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "cannot duplicate named pipe %s as fd %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "command substitution: ignored null byte in input" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "cannot make pipe for command substitution" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "cannot make child for command substitution" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute: cannot duplicate pipe as fd 1" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: invalid variable name for name reference" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: invalid indirect expansion" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: invalid variable name" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter not set" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parameter null or not set" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: substring expression < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: bad substitution" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: cannot assign in this way" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" @@ -1818,129 +2070,160 @@ msgstr "" "future versions of the shell will force evaluation as an arithmetic " "substitution" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "bad substitution: no closing “`” in %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "no match: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "argument expected" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: integer expression expected" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "‘)’ expected" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: binary operator expected" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unary operator expected" + +#: test.c:896 msgid "missing `]'" msgstr "missing ‘]’" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntax error: ‘%s’ unexpected" + +#: trap.c:220 msgid "invalid signal number" msgstr "invalid signal number" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: maximum trap handler level exceeded (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: bad signal %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "error importing function definition for ‘%s’" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "shell level (%d) too high, resetting to 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "make_local_variable: no function context at current scope" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variable may not be assigned value" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: assigning integer to name reference" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "all_local_variables: no function context at current scope" -#: variables.c:3376 +#: variables.c:4757 #, c-format msgid "%s has null exportstr" msgstr "%s has null exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "invalid character %d in exportstr for %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "no ‘=’ in exportstr for %s" -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: no global_variables context" -#: variables.c:3922 +#: variables.c:5410 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 +#: variables.c:6400 #, c-format msgid "%s: %s: cannot open as FILE" msgstr "%s: %s: cannot open as FILE" -#: variables.c:4683 +#: variables.c:6405 #, 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." +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibility value out of range" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1948,176 +2231,154 @@ msgstr "" "License GPLv3+: GNU GPL version 3 or later \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." -#: version2.c:87 -#, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" -"License GPLv2+: GNU GPL version 2 or later \n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "%s: cannot allocate %lu bytes (%lu bytes allocated)" -#: xmalloc.c:93 +#: xmalloc.c:95 #, c-format msgid "%s: cannot allocate %lu bytes" msgstr "%s: cannot allocate %lu bytes" -#: xmalloc.c:163 +#: xmalloc.c:165 #, 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 +#: xmalloc.c:167 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" msgstr "%s: %s:%d: cannot allocate %lu bytes" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [name[=value] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] name [name ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [shell-builtin [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "true" - -#: builtins.c:72 -msgid "false" -msgstr "false" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [option] name[=value] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f filename] [name ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [job_spec]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [job_spec ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" msgstr "help [-dms] [pattern ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" @@ -2125,15 +2386,15 @@ msgstr "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" -#: builtins.c:125 +#: builtins.c:127 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" @@ -2141,11 +2402,11 @@ msgstr "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let arg [arg ...]" -#: builtins.c:136 +#: builtins.c:138 msgid "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " "prompt] [-t timeout] [-u fd] [name ...]" @@ -2153,99 +2414,97 @@ msgstr "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " "prompt] [-t timeout] [-u fd] [name ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [name[=value] ...] or export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [name[=value] ...] or readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] or export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] or readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source filename [arguments]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". filename [arguments]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [expr]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[arg] signal_spec ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] name [name ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [limit]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [mode]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] pipeline" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2253,101 +2512,103 @@ msgstr "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while COMMANDS; do COMMANDS; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until COMMANDS; do COMMANDS; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NAME] command [redirections]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function name { COMMANDS ; } or name () { COMMANDS ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ COMMANDS ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "job_spec [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( expression ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ expression ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "variables - Names and meanings of some shell variables" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [optname ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v var] format [arguments]" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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]" +"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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [name ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-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]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-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]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2359,7 +2620,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2376,30 +2637,30 @@ msgstr "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2433,6 +2694,9 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." @@ -2469,11 +2733,14 @@ msgstr "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2491,7 +2758,7 @@ msgstr "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2509,7 +2776,7 @@ msgstr "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2520,7 +2787,7 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" "Execute shell builtins.\n" " \n" @@ -2531,9 +2798,9 @@ msgstr "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2561,7 +2828,7 @@ msgstr "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2584,14 +2851,26 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" "Change the shell working directory.\n" " \n" @@ -2614,22 +2893,34 @@ msgstr "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of ‘..’\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of ‘..’\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if ‘-L’ were specified.\n" +" ‘..’ is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2642,7 +2933,7 @@ msgstr "" " \n" " Options:\n" " -L\tprint the value of $PWD if it names the current working\n" -" \tdirectory\n" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, ‘pwd’ behaves as if ‘-L’ were specified.\n" @@ -2651,7 +2942,7 @@ msgstr "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2667,7 +2958,7 @@ msgstr "" " Exit Status:\n" " Always succeeds." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2679,7 +2970,7 @@ msgstr "" " Exit Status:\n" " Always succeeds." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2691,7 +2982,7 @@ msgstr "" " Exit Status:\n" " Always fails." -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2701,10 +2992,10 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2717,15 +3008,15 @@ msgstr "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the ‘type’ builtin\n" +" -V print 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 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2735,17 +3026,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2755,10 +3051,11 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" "Set variable values and attributes.\n" " \n" @@ -2768,17 +3065,22 @@ msgstr "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using ‘+’ instead of ‘-’ turns off the given attribute.\n" @@ -2788,22 +3090,23 @@ msgstr "" " \n" " When used in a function, ‘declare’ makes NAMEs local, as with the " "‘local’\n" -" command.\n" +" command. The ‘-g’ option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Set variable values and attributes.\n" " \n" -" Obsolete. See ‘help declare’." +" A synonym for ‘declare’. See ‘help declare’." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2814,8 +3117,8 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" "Define local variables.\n" " \n" @@ -2826,14 +3129,16 @@ msgstr "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2845,6 +3150,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2852,16 +3158,24 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2873,6 +3187,7 @@ msgstr "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2880,14 +3195,20 @@ msgstr "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2909,7 +3230,7 @@ msgstr "" " Exit Status:\n" " Returns success unless a write error occurs." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2959,7 +3280,7 @@ msgstr "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2979,7 +3300,7 @@ msgstr "" " Exit Status:\n" " Returns exit status of command or success if command is null." -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -3012,8 +3333,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3050,14 +3371,14 @@ msgstr "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -3068,8 +3389,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3088,8 +3409,8 @@ msgstr "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3099,7 +3420,7 @@ msgstr "" " Returns success unless COMMAND is not found or a redirection error " "occurs." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3111,7 +3432,7 @@ msgstr "" " 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -3125,7 +3446,7 @@ msgstr "" "executed\n" " in a login shell." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -3181,7 +3502,7 @@ msgstr "" " Returns success or status of executed command; non-zero if an error " "occurs." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3201,7 +3522,7 @@ msgstr "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -3225,7 +3546,7 @@ msgstr "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -3234,15 +3555,15 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3255,21 +3576,21 @@ msgstr "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3281,10 +3602,10 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " @@ -3300,16 +3621,16 @@ msgstr "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " "given." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3318,23 +3639,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3349,23 +3671,24 @@ msgstr "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3373,7 +3696,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3382,8 +3705,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3403,8 +3726,8 @@ msgstr "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3417,7 +3740,7 @@ msgstr "" " 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 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3427,7 +3750,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3441,13 +3764,13 @@ msgstr "" " 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" +" \t\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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3459,7 +3782,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3478,7 +3802,8 @@ msgstr "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3487,7 +3812,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3529,7 +3854,7 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" "Evaluate arithmetic expressions.\n" " \n" @@ -3571,9 +3896,10 @@ msgstr "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." -#: builtins.c:966 +#: builtins.c:994 +#, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -3584,7 +3910,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3594,30 +3922,34 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\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" @@ -3639,33 +3971,37 @@ msgstr "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3685,7 +4021,7 @@ msgstr "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3751,9 +4087,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3830,9 +4170,13 @@ msgstr "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3845,7 +4189,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3854,6 +4198,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3871,6 +4217,8 @@ msgstr "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3881,7 +4229,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3915,7 +4263,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3927,7 +4275,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3944,14 +4293,15 @@ msgstr "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3969,7 +4319,7 @@ msgstr "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3993,7 +4343,7 @@ msgstr "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4017,14 +4367,17 @@ msgstr "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4078,6 +4431,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4098,7 +4454,10 @@ msgstr "" " 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4152,6 +4511,9 @@ msgstr "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4167,7 +4529,7 @@ msgstr "" " Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" " false or an invalid argument is given." -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4179,7 +4541,7 @@ msgstr "" " This is a synonym for the “test” builtin, but the last argument must\n" " be a literal ‘]’, to match the opening ‘[’." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -4199,7 +4561,7 @@ msgstr "" " Exit Status:\n" " Always succeeds." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -4215,7 +4577,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4248,7 +4618,15 @@ msgstr "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4267,7 +4645,7 @@ msgstr "" " Returns success unless a SIGSPEC is invalid or an invalid option is " "given." -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4276,18 +4654,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4303,18 +4681,18 @@ msgstr "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t‘function’, ‘builtin’, ‘file’ or ‘’, if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4323,7 +4701,7 @@ msgstr "" " Returns success if all of the NAMEs are found; fails if any are not " "found." -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -4341,6 +4719,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4352,6 +4731,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4382,6 +4766,7 @@ msgstr "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4393,6 +4778,11 @@ msgstr "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4407,7 +4797,7 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4439,61 +4829,93 @@ msgstr "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4515,7 +4937,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4545,7 +4967,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4581,7 +5003,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4609,7 +5031,7 @@ msgstr "" " Exit Status:\n" " The return status is the return status of PIPELINE." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4627,7 +5049,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -4665,12 +5087,14 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4683,12 +5107,14 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4701,7 +5127,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4711,7 +5137,7 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" "Create a coprocess named NAME.\n" " \n" @@ -4721,9 +5147,9 @@ msgstr "" " The default NAME is “COPROC”.\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -4747,7 +5173,7 @@ msgstr "" " Exit Status:\n" " Returns success unless NAME is readonly." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4765,7 +5191,7 @@ msgstr "" " Exit Status:\n" " Returns the status of the last command executed." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4789,12 +5215,12 @@ msgstr "" " Exit Status:\n" " Returns the status of the resumed job." -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4802,12 +5228,12 @@ msgstr "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to “let EXPRESSION”.\n" +" evaluation. Equivalent to ‘let “EXPRESSION”’.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -4859,7 +5285,7 @@ msgstr "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4963,7 +5389,7 @@ msgstr "" " 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 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -4973,19 +5399,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5001,19 +5427,19 @@ msgstr "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by ‘dirs’, starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by ‘dirs’, starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The ‘dirs’ builtin displays the directory stack.\n" " \n" @@ -5021,7 +5447,7 @@ msgstr "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5030,16 +5456,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5054,16 +5480,16 @@ msgstr "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd +0’\n" +" \t\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" +" \t\tshown by ‘dirs’, starting with zero. For example: ‘popd -0’\n" +" \t\tremoves the last directory, ‘popd -1’ the next to last.\n" " \n" " The ‘dirs’ builtin displays the directory stack.\n" " \n" @@ -5071,7 +5497,7 @@ msgstr "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5082,19 +5508,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5108,31 +5534,30 @@ msgstr "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5148,9 +5573,8 @@ 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with ‘set -o’\n" @@ -5163,7 +5587,8 @@ msgstr "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5180,12 +5605,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -5207,19 +5643,28 @@ msgstr "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " "assignment\n" " error occurs." -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -5232,15 +5677,19 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5256,20 +5705,24 @@ msgstr "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to “empty” commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -5291,13 +5744,13 @@ msgstr "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5306,6 +5759,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5325,7 +5779,7 @@ msgstr "" " \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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5334,6 +5788,7 @@ msgstr "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using ‘+o’ instead of ‘-o’ turns off the specified option.\n" " \n" @@ -5349,7 +5804,7 @@ msgstr "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -5360,24 +5815,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5397,24 +5854,26 @@ msgstr "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5425,7 +5884,7 @@ msgstr "" "or\n" " not an indexed array." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -5434,3 +5893,7 @@ msgstr "" "Read lines from a file into an array variable.\n" " \n" " A synonym for ‘mapfile’." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: invalid associative array key" diff --git a/po/eo.gmo b/po/eo.gmo index ce32da4..b0227e5 100644 Binary files a/po/eo.gmo and b/po/eo.gmo differ diff --git a/po/eo.po b/po/eo.po index 736734d..1e78109 100644 --- a/po/eo.po +++ b/po/eo.po @@ -1,313 +1,369 @@ -# -*- eval: (po-consider-source-path "../builtins/"); -*- # Esperanto language file for GNU Bash. -# Copyright (C) 1996 Free Software Foundation, Inc. +# Copyright (C) 2011 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. -# Sergio Pokrovskij , 1998, 2006, 2009. +# Sergio Pokrovskij , 1998, ... 2020. # +# -*- eval: (po-consider-source-path "~/Documents/Eo/Work/i18n/5.1/bash-5.1/builtins"); -*- +# -*- eval: (po-consider-source-path "~/Documents/Eo/Work/i18n/5.1/bash-5.1"); -*- # Stilaj notoj: -# Angulaj citiloj limigas «plurajn vortojn», +# La 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. +# La mesaĝojn pri internaj eraroj (markitajn per XXX) probable malnecesas traduki. # -# Glosaro: -# callback retrovoko -# to force ... pre superforto -# granted jesigita -# here-document tuj-dokumento (info "(bash)Redirections") +# ---- Glosaro: +# associative array asocitabelo (info "(bash)Arrays") +# brace expansion vinkulmalvolvo +# callback retrovoko +# compound array assignment tutopa tabelvalorizo +# extended file attributes kromatributoj (de dosiero) +# to force ... per superforto +# granted jesigita +# here-document tuj-dokumento (info "(bash)Redirections") +# indexed array entjerindica tabelo (info "(bash)Arrays") +# positional parameter numerparametro ($1 ...) (info "(bash)Positional Parameters") +# resolve (symbolic links) elnodigi +# special builtin speciala komando (info "(coreutils)Special built-in utilities") +# substitution anstataŭigo (info "(bash)Shell Expansions") +# unset malvalorizi (variablon); malaktivigi, malŝalti (opcion, nomon) msgid "" msgstr "" -"Project-Id-Version: GNU bash 4.0\n" +"Project-Id-Version: GNU bash 5.1\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" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2020-12-13 10:53+0700\n" "Last-Translator: Sergio Pokrovskij \n" "Language-Team: Esperanto \n" +"Language: eo\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "Misa tabel-indico" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: Maleblas konverti pozician tabelon en asocitabelon" +msgid "%s: removing nameref attribute" +msgstr "%s: ne plu nomreferenco (la atributo nameref forigitas)" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: Misa asocitabela ŝlosilo" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: Maleblas konverti entjerindican tabelon en asocitabelon" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: Valorizato havu nombran indicon" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" msgstr "%s: %s: Valorizante per asocitabelo uzu indicon" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: Ne prosperis krei: %s" # XXX: internal_error -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "bash_execute_unix_command: Mankas klavartabelo por komando" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: La unua ne-blankspaca signo ne estas „\"‟" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "Mankas ferma „%c‟ en %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: Mankas disiga dupunkto" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: Ne eblas malligi en komandaj klavaĵoj" + +# XXX: internal_error +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "vinkulmalvolvo: Maleblas memorhavigo por %s" + +# XXX: internal_error +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "vinkulmalvolvo: Fiaskis memorhavigo por %u elementoj" + +# XXX: internal_error +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "vinkulmalvolvo: Fiaskis memorhavigo por %s" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "„%s‟: Misa nomo por klavartabelo" +msgstr "%s: Maltaŭgas por uzi kiel alinomon" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "liniredaktado ne estas ebligita" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "„%s‟: Misa nomo por klavartabelo" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "%s: Nekonata funkcinomo" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s malhavas klavligon\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s vokeblas per " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "%s: Ne eblas malligi" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "iteracinombrilo" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "Sencas nur en iteracio „for‟, „while‟ aŭ „until‟" -#: builtins/caller.def:133 +# caller [expr] => +# caller [ESPRIMO] +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Liveras 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." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME malhavas valoron" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "Tro multe da argumentoj" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "NUL-dosierujo" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD malhavas valoron" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "linio %dª: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "Averto: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: La opcio bezonas argumenton" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: Necesas nombra argumento" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: Ne trovita" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: Misa opcio" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: Misa opcinomo" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "„%s‟ ne estas taŭga nomo" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "Misa okuma nombro" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "Misa 16uma nombro" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "Misa nombro" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: Misa signalindiko" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: Nurlega variablo" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: Malaktivigo fiaskis" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s estas ekster sia variejo" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argumento" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s estas ekster sia variejo" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: Ne estas tia laboro" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: Ĉi tiu ŝelo ne disponigas laborregadon" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "Laborregado ne disponeblas" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: Limigita" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "limigita" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "„%s‟ ne estas primitiva komando ŝela" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "Eraro ĉe skribo: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "Eraro ĉe agordado de terminalaj atributoj: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "Eraro ĉe akiro de terminalaj atributoj: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: Ambigua laborindiko" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "helpilo mankas en ĉi tiu versio" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: Malaktivigo fiaskis: nurlega %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: Malaktivigo fiaskis" + +#: builtins/complete.def:287 #, 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 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: Kompletigo ne estas specifita" @@ -320,121 +376,156 @@ msgstr "Averto: La opcio -F povas funkcii alie ol vi eble supozas" 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "Ni ne estas en plenumado de kompletiga funkcio" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "Uzeblas nur ene de funkcio" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "„-f‟ ne estas uzebla por fari funkciojn" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: Nurlega funkcio" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: Referenca variablo ne povas esti tabelo" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: Nomreferenca variablo ne referencu sin mem" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: Cikla nomreferenco" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: Misa variablonomo por nomreferenco" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "$%s: ĉi tiel ne eblas neniigi variablojn" +msgstr "%s: Ĉi tiel ne eblas neniigi tabelvariablojn" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "%s: Ne eblas konverti asocitabelon en pozician tabelon" +msgstr "%s: Ne eblas konverti asocitabelon en entjerindican tabelon" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: Tutopa tabelvalorizo citila estas evitinda" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "Rultempa ŝargo ne disponeblas" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "Ne malfermiĝis dinamika biblioteko %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" msgstr "Mankas %s en la dinamika biblioteko%s: %s" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: primitiva komando dinamika jam ŝargitas" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "Ŝarga funkcio por %s liveris fiaskon (%d): ne ŝargite" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: Ne ŝargita dinamike" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s estas dosierujo" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: Ne ordinara dosiero" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: Neplenumebla duuma dosiero" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: Maleblas plenumi: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "adiaŭ\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "La ŝelo ne estas saluta; eliru per «exit»" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Restas haltigitaj laboroj.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Restas rulataj laboroj.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "Komando ne trovita" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "Historia indiko" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "kuranta" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "La laboro %d estas lanĉita sen laborregado" @@ -449,29 +540,35 @@ msgstr "%s: Misa opcio -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: La opcio bezonas argumenton -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "Nomkonservado (haketado, «hashing») estas malŝaltita" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: Hakettabelo estas malplena\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "Trafoj\tKomando\n" -# ZZZ: aĉaj citiloj (fermita en la programo) -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 '" +msgstr[0] "Ŝelaj komandoj kongruaj kun la ŝlosilvorto «" +msgstr[1] "Ŝelaj komandoj kongruaj kun la ŝlosilvortoj «" -#: builtins/help.def:168 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"»\n" +"\n" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." @@ -479,12 +576,12 @@ msgstr "" "Helpaĵo pri „%s‟ malestas.\n" "Provu «help help» aŭ «man -k %s» aŭ «info %s»." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: Fiaskis malfermo de %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -503,15 +600,21 @@ msgstr "" "Steleto (*) tuj post nomo indikas, ke la komando estas malebligita.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "Ne pli ol unu el -anrw estas uzebla" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "pozicio en la historio" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: Maltaŭga tempomarko" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: Historia malvolvo fiaskis" @@ -525,95 +628,116 @@ msgstr "%s: inlib fiaskis" msgid "no other options allowed with `-x'" msgstr "La uzo de „-x‟ malebligas aliajn opciojn" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "%s: Argumento estu proceznumero aŭ laborindiko" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Nekonata eraro" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "Mankas esprimo" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: Ne tabela variablo" +msgstr "%s: ĝi ne estas entjerindica tabelo" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: Misa indiko de dosiernumero" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: Misa dosiernumero: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: Misa lininombro" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: Misa tabelbazo" # Supozeble callback => retrovoko ?? -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: Misa kvanto ĉe retrovoko" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "Mankas nomo de tabelvariablo" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "necesas subteno de tabelvariabloj" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "„%s‟: Mankas formata signo" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "%c: Misa tempoformato" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "„%c‟: Misa signo formata" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "Averto: %s: %s" -#: builtins/printf.def:757 +# XXX: internal_error +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "Miso ĉe analizado de formato: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "Mankas 16uma cifero por \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "Post „%c‟ mankas unikoda cifero" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "Ne estas alia dosierujo" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: Maltaŭga argumento" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "Dosierujstako malplenas" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "indico de dosierujstako" # dirs [-clpv] [+N] [-N] -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -656,7 +780,7 @@ msgstr "" "\tper „dirs‟ sen opcioj, numerante ekde 0." # pushd [dir | +N | -N] [-n] -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -702,7 +826,7 @@ msgstr "" " Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟." # popd [+N | -N] [-n] -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -741,54 +865,49 @@ msgstr "" "\n" " Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: Misa indiko de atendotempo" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "Lega (read) eraro: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: Ne tabela variablo" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: Ne funkcio" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: Ne eblas eksporti" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "Nombrilo de „shift‟" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "Maleblas samtempe ŝalti kaj malŝalti ŝelan opcion" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: Misa nomo de ŝela opcio" @@ -797,405 +916,486 @@ msgstr "%s: Misa nomo de ŝela opcio" msgid "filename argument required" msgstr "Necesas dosiernoma argumento" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: Dosiero ne trovita" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "Ne eblas halteti" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "Ne eblas haltetigi salutan ŝelon" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "„%s‟ alinomas jenon: «%s»\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "„%s‟ estas ŝlosilvorto de la ŝelo\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s estas funkcio\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "„%s‟ estas speciala primitiva ŝelkomando\n" + +#: builtins/type.def:301 #, 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 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "„%s‟ estas „%s‟\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "„%s‟ estas metita en hakettabelon (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: Maltaŭga argumento por limo" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "„%c‟: Misa komando" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: Fiaskis provo legi limon: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "limo" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: Malprosperis ŝanĝi limon: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "Okuma nombro" # Misa modifilo: «umask Z-w» aŭ «umask aZw» -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, 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 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " linio " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "La ĵusa komando: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Ĉesigado ..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMO: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "Averto: " + +#: error.c:488 msgid "unknown command error" msgstr "Nekonata komand-eraro" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "Misa komandotipo" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "Misa stir-operacio" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "Misa salto" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aTro longe sen enigo: Aŭtomata seancofino\n" # XXX: internal error: -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: „%c‟: Misa formatsigno" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: la kunprocezo [%d:%s] ankoraŭ ekzistas" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "Eraro en dukto" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: La ingado de „eval“oj superis sian maksimumon (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: La ingado de „source“oj superis sian maksimumon (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: La ingado de funkcioj superis sian maksimumon (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "%s: Malpermesitas uzi „/‟ en komandonomoj" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: Komando ne trovita" -#: execute_cmd.c:4827 +# XXX: internal error: +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: Neplenumebla duuma dosiero" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: Misa interpretilo" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: Neplenumebla duuma dosiero: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s‟ estas primitiva komando speciala" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "Ne eblas kunnomumi al dosiernumero %d la dosiernumeron %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "Tro profunda rekursio en esprimo" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "Rekursistako elĉerpita" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "Sintaksa eraro en esprimo" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "Provo valorizi ne-variablon" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "Sintaksa eraro en valorizo de variablo" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "Divido per 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "CIMO: Misa operacisigno en kombinita valorizsimbolo" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "„:‟ mankas kondiĉa esprimo" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "Negativa eksponento" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "Post antaŭkremento aperu nomo de variablo" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "Mankas „)‟" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "Sintaksa eraro: Mankas operando" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "Sintaksa eraro: Misa operacisimbolo aritmetika" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (misa simbolo estas „%s‟)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "Maltaŭga bazo nombrosistema" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "Maltaŭga konstanto entjera" + +#: expr.c:1603 msgid "value too great for base" msgstr "Tro granda valoro por bazo de nombrosistemo" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: Misa esprimo\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getwd: Ne eblas atingi patrajn dosierujojn" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "Ne eblas reŝalti senprokrastan reĝimon por dosiernumero %d" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: procezgrupo dukto" -#: jobs.c:887 +# ZZZ: internal_warning +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +# ZZZ: internal_warning +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" msgstr "Forke farita proceznumero %d aperas en rulata laboro %d" -#: jobs.c:1005 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: Ne estas tia proceznumero (%ld)!" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signalo %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Farite" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Haltigita" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Haltigita(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Rulata" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Farite(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Eliro %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Nekonata stato" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(nekropsio elŝutita)" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (labordosierujo: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, 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 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: Malestas informoj pri procezo %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: La laboro %d estas haltigita" -#: jobs.c:2829 +# XXX: internal_error +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: no current jobs" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: La laboro finiĝis" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: La laboro %d jam estas fona" -#: jobs.c:3059 +# XXX: internal warning: +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: WNOHANG iĝas ŝaltita por eviti nedifintan pendiĝon" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: linio %dª: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr "(nekropsio elŝutita)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(nun labordosierujo estas: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp fiaskis" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: laborregado ne funkcias en la fono" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: liniaranĝo" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid()" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "ne prosperis atribui grupon (%d) de terminala procezo" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "Ĉi tiu ŝelo ne disponigas laborregadon" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: Malveras la aserto: %s\n" # XXX: debug? -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1205,69 +1405,79 @@ msgstr "" "malloc: %s:%d: aserto sufokita\r\n" # XXX: internal error -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "nekonata" # XXX: debug? -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: Skribdifektita bloko en malokupa listo (free list)" # XXX: debug? -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: La argumento montras blokon jam malokupitan" # XXX: debug? -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: La argumento ne montras generitan memoron" # XXX: debug? -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 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 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: Okazis maltroo; «magic8» difektitas" + +# XXX: debug? +#: lib/malloc/malloc.c:1014 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 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: La argumento ne montras generitan memoron" # XXX: debug? -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 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 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: Okazis maltroo; «magic8» difektitas" + +# XXX: debug? +#: lib/malloc/malloc.c:1205 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 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "Misa bazo nombrosistema" @@ -1290,273 +1500,321 @@ msgid "%s: bad network path specification" msgstr "%s: Misa retvojo-indiko" # XXX: internal error -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "Reta funkciado ne disponeblas" -#: locale.c:192 +# XXX: internal warning: +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: Maleblas ŝanĝi lokaĵaron (%s)" -#: locale.c:194 +# XXX: internal warning: +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: Maleblas ŝanĝi lokaĵaron (%s): %s" # XXX: fatal_error -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: ne eblas reokupi %lu bajtojn" +msgstr "setlocale: %s: ne eblas ŝanĝi la lokaĵaron (%s)" # XXX: fatal_error -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: ne eblas reokupi %lu bajtojn" +msgstr "setlocale: %s: ne eblas ŝanĝi la lokaĵaron (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Vi havas poŝton en $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Nova poŝto en $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, 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 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "Sintaksa eraro: Necesas aritmetika esprimo" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "Sintaksa eraro: Neatendita „;‟" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "Sintaksa eraro: „((%s))‟" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: Misa ordontipo %d" # internal_warning(): -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 +#: make_cmd.c:769 #, 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 +# internal_warning(): +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) superas SIZE_MAX (%lu): la linio " +"tranĉita" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "La nombro de tuj-documentoj superis sian maksimumon" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "Neatendita dosierfino dum serĉo de responda „%c‟" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "Neatendita dosierfino dum serĉo de „]]‟" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "Sintaksa eraro en kondiĉa esprimo: Neatendita simbolo „%s‟" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "Sintaksa eraro en kondiĉa esprimo" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "Nekonvena simbolo „%s‟ anstataŭ „)‟" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "Mankas „)‟" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "La argumento „%s‟ ne konvenas por unuloka kondiĉa operacisimbolo" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "Maltaŭga argumento por unuloka kondiĉa operacisimbolo" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "Misa simbolo „%s‟ anstataŭ duloka kondiĉa operacisigno" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "ĉi tie devas esti duloka kondiĉa operacisigno" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "La argumento „%s‟ ne konvenas por duloka kondiĉa operacisimbolo" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "\n" +msgstr "" +"La hejmpaĝo de Baŝo (anglalingva): \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Ĝenerala helpilo pri uzo de GNUa programaro: \n" + # XXX: internal_error -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: Misa operacio" @@ -1803,219 +2073,277 @@ msgstr "HFT-sonsekvenco finiĝis" msgid "Information request" msgstr "Informmendo" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Nekonata signalnumero" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Nekonata signalo n-ro %d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "Misa anstataŭigo: Mankas ferma „%s‟ en %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "%s: Maleblas valorizi tabelanon per listo" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "Ne prosperis fari dukton por proceza anstataŭigo" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "Ne prosperis krei idon por proceza anstataŭigo" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "Ne prosperis malfermi nomitan dukton %s porlegan" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "Ne prosperis malfermi nomitan dukton %s por skribado" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "Ne prosperis kunnomumi nomhavan dukton %s kiel dosiernumeron %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "Komanda anstataŭigo: nul-bajto en enigaĵo, ignorita" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "Ne prosperis fari dukton por komanda anstataŭigo" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "Ne prosperis krei procezidon por komanda anstataŭigo" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute: Ne prosperis kunnomumi la dosiernumeron 1 al dukto" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: Misa variablonomo por nomreferenco" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: Misa malvolvo malrekta" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: Maltaŭga variablonomo" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: Parametro estas malaktiva" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: Parametro estas NUL aŭ malaktiva" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: subĉeno-esprimo < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: Misa anstataŭigo" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: ĉi tiel ne valorizebla" -#: subst.c:7374 +# XXX: internal warning: +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"Ontaj versioj de la ŝelo plenumos komputon kiel aritmetikan anstataŭigon" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "Misa anstataŭigo: Mankas ferma „`‟ en %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "Nenio kongrua: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "Mankas argumento" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: Mankas entjera esprimo" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "Mankas „)‟" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: Tie devas esti duloka operacisigno" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: Tie devas esti unuloka operacisigno" + +#: test.c:896 msgid "missing `]'" msgstr "Mankas „]‟" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Sintaksa eraro: Neatendita «%s»" + +#: trap.c:220 msgid "invalid signal number" msgstr "Misa signalnumero" +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" +"trap handler: La nivelo de kaptilotraktiloj superis sian maksimumon (%d)" + # XXX: internal_warning -#: trap.c:327 +#: trap.c:412 #, 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 +#: trap.c:416 #, 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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: Misa signalnumero %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "Eraro ĉe importo de funkcidifino por „%s‟" # XXX: internal_warning -#: variables.c:748 +#: variables.c:838 #, 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 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "make_local_variable: Malestas funkcia kunteksto en ĉi-regiono" +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: Variablo ne valorizebla" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: Nomreferenco valorizata per entjero" + # XXX: internal_error -#: variables.c:3159 +#: variables.c:4390 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 +# XXX: internal_error +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: Parametro estas NUL aŭ malaktiva" +msgstr "«exportstr» de %s estas NUL" # XXX: internal_error -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, 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 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "Mankas „=‟ en eksporta signoĉeno por „%s‟" # XXX: internal_error -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: Mankas kunteksto de „global_variables‟" # XXX: internal_error -#: variables.c:3922 +#: variables.c:5410 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 +# XXX: internal_error +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: Fiaskis malfermo de %s" +msgstr "%s: %s: Ne malfermeblas kiel DOSIERO" -#: variables.c:4683 -#, fuzzy, c-format +# XXX: internal_error +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: Misa dosiernumero: %s" +msgstr "%s: %s: Misa valoro por spurada dosiernumero (trace file descriptor)" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright (C) 2009 ĉe «Free Software Foundation, Inc.»" +# # XXX: internal_error +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s kongruo-nivelo estas ekster sia variejo" -#: version.c:47 +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 ĉe «Free Software Foundation, Inc.»" + +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -2023,203 +2351,178 @@ msgstr "" "La permesilo estas GPLv3+; t.e. GNU GPL, versio 3ª aŭ pli nova.\n" "La tekston vd ĉe \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ĉi tiu programo estas libera; vi rajtas libere ĝin ŝanĝi kaj pludoni." -#: version2.c:86 -#, fuzzy, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "Copyright (C) 2009 ĉe «Free Software Foundation, Inc.»" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "NENIA GARANTIO estas donita, tiom kiom tion permesas la leĝo." -#: version2.c:87 -#, fuzzy, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" -"La permesilo estas GPLv3+; t.e. GNU GPL, versio 3ª aŭ pli nova.\n" -"La tekston vd ĉe \n" - -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc(): Ne povas okupi %lu bajtojn (%lu bajtoj disponigitaj)" +msgstr "%s: Malsukcesis okupi %lu bajtojn (%lu bajtoj disponigitaj)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: Ne prosperis okupi %lu bajtojn" +msgstr "%s: Malsukcesis okupi %lu bajtojn" # XXX: fatal_error -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: Malsukcesis okupi %lu bajtojn (%lu bajtoj disponigitaj)" # XXX: fatal_error -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: ne eblas okupi %lu bajtojn" +msgstr "%s: %s:%d: Malsukcesis okupi %lu bajtojn" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [NOMO[=VALORO] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] NOMO [NOMO ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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" +"bind [-lpsvPSVX] [-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 +#: builtins.c:56 msgid "break [n]" msgstr "break [N]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [N]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [ŜELAĴO [ARG ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [DOSIERUJO]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "true" - -#: builtins.c:72 -msgid "false" -msgstr "false" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [NOMO[=VALORO] ...]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] NOMO[=VALORO] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [OPCIO] NOMO[=VALORO] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [ARG ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [ARG ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f DOSIERNOMO] [NOMO ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts OPCIĈENO NOMO [ARG ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a NOMO] [KOMANDO [ARGUMENTO ...]] [ALIDIREKTADO ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [N]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [N]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [LABORINDIKO]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [LABORINDIKO]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p VOJNOMO] [-dt] [NOMO ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [ŜABLONO ...]" +msgstr "help [-dms] [ŜABLONO ...]" -#: builtins.c:121 +#: builtins.c:123 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 [-c] [-d POZICIO] [n] aŭ\n" "history -awr [DOSIERNOMO] aŭ\n" "history -ps ARG [ARG...]" -#: builtins.c:125 +#: builtins.c:127 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [LABORINDIKO ... | PROCEZNUMERO ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" @@ -2227,112 +2530,110 @@ msgstr "" "kill [-s SIGSNOM | -n SIGNUM | -SIGNOM] [PN | LABORINDIKO] ... aŭ\n" "kill -l [SIGNOM]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let ARG [ARG ...]" -#: builtins.c:136 -#, fuzzy +#: builtins.c:138 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 ...]" +"read [-ers] [-a TABELO] [-d DISIG] [-i TEKSTO]\n" +" [-n NSIGN] [-N NSIGN] [-p INVIT] [-t TLIM]\n" +" [-u DN] [NOMO ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o OPCINOMO] [--] [ARG ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [NOMO[=VALORO] ...] aŭ export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NOMO ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-aAf] [NOMO[=VALORO] ...] aŭ readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [NOMO[=VALORO] ...] aŭ export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [NOMO[=VALORO] ...] aŭ readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [N]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source DOSIERNOMO [ARGUMENTOJ]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". DOSIERNOMO [ARGUMENTOJ]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [ESPRIMO]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ ARG... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[ARG] SIGNALINDIKO ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] NOMO [NOMO ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [LIMO]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [LIMO]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [REĜIMO]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [IND]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p VARIABLO] [IND ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [PN]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [PN ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NOMO [in VORTOJ ... ] ; do KOMANDOJ; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( ESPR1; ESPR2; ESPR3 )); do KOMANDOJ; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NONO [in VORTOJ ... ;] do KOMANDOJ; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] DUKTO" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case VORTO in [ŜABLONO [| ŜABLONO]...) KOMANDOJ ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2340,106 +2641,107 @@ msgstr "" "if KOMANDOJ; then KOMANDOJ; [ elif KOMANDOJ; then KOMANDOJ; ]... [ else " "KOMANDOJ; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while KOMANDOJ; do KOMANDOJ; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until KOMANDOJ; do KOMANDOJ; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NOMO] KOMANDO [ALIDIREKTADOJ]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function NOMO { KOMANDOJ ; } aŭ NOMO () { KOMANDOJ ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ KOMANDOJ ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "LABORINDIKO [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( ESPRIMO ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ ESPRIMO ]]" # Ĉu "variables" estas serĉa ŝlosilo ? # T.e. "help var" aŭ "help variabl", sed ne "nelp variabloj"? -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "var - Nomoj kaj signifo de kelkaj ŝelvariabloj" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | DOSIERUJO]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [OPCINOMO ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v VAR] FORMATO [ARGUMENTOJ]" -#: builtins.c:229 -#, fuzzy +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 ...]" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPCIO] [-A AGO] [-G ŜABLONO]\n" +" [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO]\n" +" [-P PREFIKSO] [-S SUFIKSO] [NOMO ...]" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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]" +"compgen [-abcdefgjksuv] [-o OPCIO] [-A AGO] [-G ŜABLONO]\n" +" [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO]\n" +" [-P PREFIKSO] [-S SUFIKSO] [VORTO]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "compopt [-o|+o OPCIO] [NOMO ...]" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o OPCIO] [-DEI] [NOMO ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-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]" +"mapfile [-d DISIG] [-n KIOM] [-O ORIGINO] [-s KIOM] [-t] [-u DN]\n" +" [-C RETROVOKO] [-c KVANTO] [TABELO]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-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]" +"readarray [-d DISIG] [-n KIOM] [-O ORIGINO] [-s KIOM] [-t]\n" +" [-u DN] [-C RETROVOKO] [-c KVANTO] [TABELO]" # alias: -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2451,7 +2753,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2468,33 +2770,34 @@ msgstr "" " alinome anstataŭigenda ĉe la komputo de la alinomo.\n" "\n" " Opcioj:\n" -" -p\tEligu ĉiujn difinitajn alinomojn en reuzebla formo.\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 +# unalias [-a] NOMO [NOMO ...] +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +"Forigu la NOMOjn el la listo de difinitaj alinomoj.\n" "\n" " Opcioj:\n" -" -a\tSe enestas la opcio „-a‟, ĉiujn alinomojn forigu.\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 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2528,6 +2831,9 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." @@ -2559,12 +2865,14 @@ msgstr "" " -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" +" -X Listigu klavosekvencojn ligitajn per „-x‟ kaj la\n" +" koncernajn komandojn en formo reuzebla por enigo.\n" +" \n" " Elirstato:\n" " 0, krom se nekonata opcio estas donita aŭ eraro okazis." # exit: -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2583,7 +2891,7 @@ msgstr "" " Ĝi estas 0, kondiĉe ke N estas pli granda ol aŭ egala al 1." # continue: -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2604,7 +2912,7 @@ msgstr "" # builtin [shell-builtin [arg ...]] # builtin [ŜELAĴO [ARG ...]] -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2615,7 +2923,7 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" "Rulu primitivan ŝelkomandon\n" "\n" @@ -2630,7 +2938,7 @@ msgstr "" # caller [expr] => # caller [ESPRIMO] -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2659,7 +2967,7 @@ msgstr "" " estas valida." # cd: -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2682,47 +2990,67 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; 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" +" La kuranta dosierujo iĝu DOSIERUJO -- aŭ, se DOSIERUJO malestas,\n" +" la valoro 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" +" entenanta DOSIERUJOn. En $CDPATH, dupunkto „:‟ apartigas\n" +" alternativajn dosierujojn, vakua dosierujnomo egalas la kurantan.\n" +" Se DOSIERUJO 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" +" ŝaltita, la vorto estas interpretata kiel variablonomo. Se tiu\n" +" variablo havas valoron, tiu valoro estas uzata kiel DOSIERUJO.\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" +" -L\tlaŭu simbolajn Ligilojn: en DOSIERUJO, traktu la aperojn de\n" +"\t„..“ antaŭ ol elnodigi la simbolajn ligilojn\n" +" -P\tuzu la Fizikan strukturon de dosierujoj, elnodiginte simbolajn\n" +"\tligilojn de DOSIERUJO antaŭ ol trakti la aperojn de „..“\n" +" -e\teliru kun nenula elirstato se „-P‟ ĉeestas kaj la\n" +"\tkuranta dosierujo ne estas determinebla\n" +" -@\tse la operaciumo tion ebligas, prezentu dosieron posedantan\n" +"\tkromatributojn kiel dosierujon entenatan la dosieratributojn\n" +"\n" +" Defaŭlte la simbolaj ligiloj estas laŭataj, kvazaŭ „-L‟ ĉeestus.\n" +" La traktado de „..“ konsistas en forigo de la ĵus-antaŭa vojnoma\n" +" ero retrodirekte ĝis la oblikvo „/“ aŭ la komenco de DOSIERUJO.\n" "\n" " Elirstato:\n" -" Ĝi estas 0, se la dosierujŝanĝo sukcesis; nenulo aliokaze." +" Ĝi estas 0, se la dosierujŝanĝo sukcesis, kaj se, ĉeeste de „-P‟,\n" +" $PWD sukcese valoriziĝis; nenulo aliokaze." # pwd [-LP] -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2745,7 +3073,7 @@ msgstr "" " 0, krom se aperas misa opcio aŭ la kuranta dosierujo estas\n" " nelegebla." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2762,7 +3090,7 @@ msgstr "" " Ĉiam sukcesa." # true -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2775,7 +3103,7 @@ msgstr "" " Ĉiam sukcesa." # false: -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2789,7 +3117,7 @@ msgstr "" # command [-pVv] command [arg ...] # command [-pVv] KOMANDO [ARG ...] -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2799,10 +3127,10 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2823,9 +3151,9 @@ msgstr "" " Elirstato:\n" " Tiu de KOMANDO; aŭ malsukceso, se KOMANDO ne troveblas." -# declare [-afFirtx] [-p] [name[=value] ...] -# declare [-aAfFilrtux] [-p] [NOMO[=VALORO] ...] -#: builtins.c:476 +# declare [-aAfFgilnrtux] [-p] [name[=value] ...] +# declare [-aAfFgilnrtux] [-p] [NOMO[=VALORO] ...] +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2835,17 +3163,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2855,56 +3188,64 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" -"Difinu valorojn aŭ atributojn de variabloj\n" +"Difinu valorojn aŭ atributojn de variabloj.\n" "\n" -" Deklaru variablojn aŭ valorizu ilin per atributoj.\tSe NOMOj\n" +" Deklaru variablojn aŭ atribuu al ili atributojn.\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" +" -g se uzita en ŝelfunkcio, kreu mallokan variablon;\n" +" aliokaze, ignoru\n" +" -I ĉe kreo de loka variblo, heredigu la atributojn kaj la valoron\n" +" de samnoma variablo el antaŭa regiono\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" +" -a\tla NOMOj estu entjerindicaj tabeloj (se realigite)\n" +" -A\tla NOMOj estu 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" +" -l\tminuskligu la valoron de ĉiu NOMO ĉe valorizo\n" +" -n NOMO estu referenco al variablo nomata per ĝia valoro\n" +" -r\tla variabloj NOMOj estu nurlegaj\n" " -t\thavigu al la NOMOj la atributon „trace‟ (spurata)\n" -" -u\tmajuskligu la NOMOjn ĉe valorizo\n" +" -u\tmajuskligu la valoron de ĉiu NOMO ĉ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" +" Por la variabloj posedantaj la atributon entjera, ĉe ĉiu valorizo\n" +" okazas aritmetika komputado (vd la komandon „let‟).\n" +" \n" +" Uzite en funkcio, „declare‟ faras la NOMOjn lokaj, samkiel la\n" +" komando „local‟. La opcio „-g‟ ĉi tiun efikon abolas.\n" "\n" " Eliistato:\n" -" Sukceso, krom se aperas misa opcio aŭ okazas eraro." +" Sukceso, krom se aperas misa opcio aŭ okazas eraro ĉe valorizo de " +"variablo." -# typeset [-aAfFilrtux] [-p] name[=value] ... -#: builtins.c:512 +# typeset [-aAfFgilrtux] [-p] name[=value] ... +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Difinu atributojn kaj valorojn de variabloj\n" "\n" -" Arkaika. Vd «help declare»." +" Sinonimo de „declare“. Vd «help declare»." # local [option] name[=value] ... # local [OPCIO] NOMO[=VALORO] ... -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2915,8 +3256,8 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" "Difinu lokajn variablojn\n" "\n" @@ -2927,15 +3268,17 @@ msgstr "" " 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." +" Sukceso, krom se aperas misa opcio, okazas valoriza eraro, aŭ la\n" +" ŝelo ne estas plenumanta funkcion." # echo: -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2947,6 +3290,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2954,21 +3298,28 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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" +" Eligu en la ĉefeligujon la ARGojn disigante ilin per po unu\n" +" spaceto, 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" +" -e\taktivigu interpretadon de la ĉi-subaj eskapaj deklivaĵoj\n" +" -E\tmalaktivigu interpretadon de la ĉi-subaj espapaj deklivaĵoj\n" "\n" " „echo‟ povas interpreti la sekvajn literojn prefiksitajn per\n" " deklivo (per la signo „\\‟):\n" @@ -2976,6 +3327,7 @@ msgstr "" "\t\\b\tretropaŝo\n" "\t\\c\tĉesigu pluan eligon\n" "\t\\e\teskapsigno\n" +"\t\\E\teskapsigno\n" "\t\\f\tpaĝ-avanco\n" "\t\\n\tlinifino\n" "\t\\r\tĉaretreveno\n" @@ -2984,14 +3336,20 @@ msgstr "" "\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\\xHH\tla signo kies 8-bita kodono estas HH (16-ume). HH\n" "\t\tpovas enteni unu aŭ du 16-umajn ciferojn\n" +" \\uHHHH la Unikoda signo kies kodono estas la 16-uma\n" +" nombro HHHH. HHHH povas enteni de unu ĝis kvar\n" +" 16-umajn ciferojn.\n" +" \\UHHHHHHHH la Unikoda signo kies kodono estas la 16-uma\n" +" nombro HHHHHHHH. HHHHHHHH povas enteni de unu ĝis\n" +" ok 16-umajn ciferojn.\n" "\n" " Elirstato:\n" " Sukcesa, krom se okazas elig-eraro." # echo [-n] [ARG ...] -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -3015,7 +3373,7 @@ msgstr "" # enable [-a] [-dnps] [-f filename] [name ...] # enable [-a] [-dnps] [-f DOSIERNOMO] [NOMO ...] -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -3067,7 +3425,7 @@ msgstr "" " eraro." # eval [ARG ...] -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -3088,7 +3446,7 @@ msgstr "" # getopts optstring name [arg] => # getopts OPCIĈENO NOMO [ARG] -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -3121,8 +3479,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3159,8 +3517,9 @@ msgstr "" " 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" +" Normale „getopts‟ analizas la numerparametrojn, sed okaze de\n" +" argumentoj donitaj kiel ARG-valoroj „getopts‟ anstataŭe analizas\n" +" ilin.\n" "\n" " Elirstato:\n" " Sukceso, se opcio estas trovita; malsukceso, se renkontiĝis\n" @@ -3168,7 +3527,7 @@ msgstr "" # exec [-cl] [-a name] [command [arguments ...]] [redirection ...] # exec [-cl] [-a NOMO] [KOMANDO [ARGUMENTOJ ...]] [ALIDIREKTADO ...] -#: builtins.c:668 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -3179,8 +3538,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3210,7 +3569,7 @@ msgstr "" " alirektado." # exit [n] -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3223,7 +3582,7 @@ msgstr "" " estas tiu de la plej ĵuse plenumita komando." # logout [N] -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -3240,7 +3599,7 @@ msgstr "" # fc -s [pat=rep] [command] => # fc [-e REDAKTILO] [-lnr] [UNUA] [LASTA] aŭ # fc -s [ŜABLONO=ANST] [KOMANDO] -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -3295,7 +3654,7 @@ msgstr "" " eraro." # fg [job_spec] => fg [LABORINDIKO] -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3316,7 +3675,7 @@ msgstr "" " Tiu de la dialogigita komando; aŭ malsukceso, se okazis eraro." # bg [job_spec] => bg [LABORINDIKO] -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -3340,7 +3699,7 @@ msgstr "" " eraro." # hash [-lr] [-p VOJNOMO] [-dt] [NOMO ...] -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -3349,15 +3708,15 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3386,7 +3745,7 @@ msgstr "" # help [-ds] [pattern ...] # help [-ds] [ŜABLONO ...] -#: builtins.c:792 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3398,10 +3757,10 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " @@ -3428,10 +3787,10 @@ msgstr "" # ZZZ history [-c] [-d offset] [n] or # history -awr [filename] or # history -ps arg [arg...] => -# history [-c] [-d DEŜOVO] [n] aŭ +# history [-c] [-d POZICIO] [n] aŭ # history -awr [DOSIERNOMO] aŭ # history -ps ARG [ARG...] -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3440,23 +3799,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3464,19 +3824,20 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" -"Eligu aŭ redaktu la historiliston\n" +"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" +" -c forviŝu la tutan historion (forigu ĉiujn erojn el la listo)\n" +" -d POZICIO forviŝu la linion kies numero estas POZICIO. Por\n" +" POZICIO negativa la numerado iras reen ekde la fino de la\n" +" historio \n" +" -a aldonu la historiliniojn de la kuranta seanco al la\n" " historidosiero\n" -" -n\tlegu ĉiujn ankoraŭ ne legitajn liniojn el la historidosiero\n" +" -n legu ĉ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" @@ -3489,10 +3850,10 @@ msgstr "" " 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, 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" +" 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" @@ -3504,7 +3865,7 @@ msgstr "" # jobs -x command [args] => # jobs [-lnprs] [LABORINDIKO ...] aŭ # jobs -x KOMANDO [ARGS] -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3513,8 +3874,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3550,7 +3911,7 @@ msgstr "" " Ĉe „-x‟, la elirstato de la KOMANDO." # disown [-h] [-ar] [jobspec ...] -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3560,7 +3921,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3586,7 +3947,7 @@ msgstr "" # kill -l [sigspec] => # kill [-s SIGSNOM | -n SIGNUM | -SIGNOM] PN | LABORINDIKO ... aŭ # kill -l [SIGNOM] -#: builtins.c:898 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3598,7 +3959,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3618,7 +3980,8 @@ msgstr "" " -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" +" ili respondaj signalnomoj estu eligataj\n" +" -L sinonimo por -l\n" "\n" " „kill‟ estas primitiva ŝelkomando pro du kaŭzoj:\n" " unue, ĝi ebligas uzi laborindikojn anstataŭ proceznumerojn;\n" @@ -3629,7 +3992,8 @@ msgstr "" " Sukceso, krom se enestas misa opcio aŭ okazis eraro." # let arg [arg ...] -#: builtins.c:921 +# let ARG [ARG ...] +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3671,15 +4035,15 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" 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" +" Ĉ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 da\n" +" operacioj la samprioritataj operacisimboloj aperas kune. La\n" +" grupoj estas aranĝitaj laŭ malkresko de ligforto.\n" "\n" "\tnomo++, nomo--\tpostkrementoj de variablo\n" "\t++nomo, --nomo\tantaŭkrementoj de variablo\n" @@ -3705,21 +4069,21 @@ msgstr "" " Ŝ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" +" atributon „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" +" 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 +# read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] +# [-p prompt] [-t timeout] [-u fd] [name ...] +# read [-ers] [-a TABELO] [-d DISIG] [-i TEKSTO] [-n NSIGN] [-N NSIGN] +# [-p INVIT] [-t TLIM] [-u DN] [NOMO ...] +#: builtins.c:994 #, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" @@ -3731,7 +4095,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3741,30 +4107,34 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\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" @@ -3784,11 +4154,13 @@ msgstr "" "\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" +" -e\t\tuzu Readline por akiri la linion\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\tlinifino), krom se disigilo aperas pli frue\n" +" -N NSIGN\tlegu ekzakte NSIGN da signoj (tra ĉiuj disigiloj), krom\n" +" se la dosierfino aŭ la tempolimo atingiĝos pli frue\n" +" -p INVIT\teligu la invitĉenon INVIT 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" @@ -3796,19 +4168,20 @@ msgstr "" "\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" +"\t\testi frakcio. Se TLIM estas 0,\t read tuj finiĝas sen\n" +" provi ion legi, sed sukcesas nur se engaĵo pretas\n" +" ĉe la indikita dosiernumero. La elirstato estas pli\n" +" granda ol 128 se la atendotempo estas 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." +" atingita (tiuokaze ĝi superas 128), aŭ okazas valoriza eraro, aŭ\n" +" -u indikas nevalidan dosiernumeron." # return [n] # return [N] -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3828,9 +4201,9 @@ msgstr "" " 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 +# set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] +# set [-abefhkmnptuvxBCHP] [-o OPCINOMO] [--] [ARG ...] +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3896,9 +4269,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3976,12 +4353,15 @@ msgstr "" "\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" +" -P\tLa simbolaj ligiloj estu travideblaj ĉe plenumo de komandoj\n" +"\tkiuj ŝanĝas la kurantan dosierujon („cd‟ ktp uzu «fizikan»\n" +"\tinterpreton de vojnomo).\n" +" -T\tSe aktiva, la ŝelaj funkcioj heredas la kaptilojn (Traps)\n" +"\tDEBUG kaj RETURN \n" +" --\tLa restantajn argumentojn uzu por valorizi la numerparametrojn.\n" +"\tSe tiaj argumentoj mankas, malvalorizu la numerparametrojn.\n" +" -\tLa restantajn argumentojn uzu por valorizi la numerparametrojn.\n" +"\tLa 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" @@ -3994,7 +4374,7 @@ msgstr "" # unset [-f] [-v] [name ...] # unset [-f] [-v] [NOMO ...] -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -4003,6 +4383,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -4013,26 +4395,27 @@ msgid "" " 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" +"Forviŝu valorojn kaj atributojn de ŝelaj funkcioj kaj variabloj\n" "\n" -" Por ĉiu NOMO, forigu la respondan variablon aŭ funkcion.\n" +" Por ĉiu NOMO, forviŝu la respondan variablon aŭ funkcion.\n" "\n" " Opcioj:\n" " -f\ttraktu ĉiun NOMOn kiel funkcion\n" " -v traktu ĉiun NOMOn kiel variablon\n" -"\n" +" -n traktu ĉiun NOMOn kiel nomreferencon, kaj senvalorigu ĝin mem\n" +" (kaj ne la referencatan 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" +" forviŝi variablon, kaj se tia ne troviĝos, funkcion.\n" "\n" -" Iujn variablojn ne eblas forigi. Vd ankaŭ la helpon pri\n" -" „readonly‟.\n" +" Iujn variablojn ne eblas forviŝi. Vd ankaŭ la helpon pri „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 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -4066,9 +4449,9 @@ msgstr "" " Elirstato:\n" " Sukceso, krom se aperis nevalida NOMO aŭ misa opcio." -# readonly [-af] [name[=value] ...] or readonly -p +# readonly [-aAf] [name[=value] ...] or readonly -p # readonly [-aAf] [NOMO[=VALORO] ...] aŭ readonly -p -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -4080,7 +4463,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -4094,10 +4478,11 @@ msgstr "" " 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" +" -a\ttemas pri entjerindica tabelo indikita per plursignifa NOMO\n" +" -A\ttemas pri la asocitabela signifo de plursignifa NOMO\n" +" -f\ttemas pri la ŝelfunkcia signifo de plursignifa NOMO\n" +" -p\teligu ĉiujn nurlegajn variablojn aŭ funkciojn, depende je\n" +" tio, ĉu la opcio „-f“ estas aldonita\n" "\n" " La opcio „--‟ ĉesigas pluan opcitraktadon.\n" "\n" @@ -4105,7 +4490,7 @@ msgstr "" " Sukceso, krom se aperas nevalida nomo aŭ misa opcio." # shift [n] -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -4122,7 +4507,7 @@ msgstr "" # source filename [arguments] # source DOSIERNOMO [ARGUMENTOJ] -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -4147,7 +4532,7 @@ msgstr "" " DOSIERNOMO ne legeblas." # suspend [-f] -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4173,14 +4558,17 @@ msgstr "" # test [expr] # test [ESPRIMO] -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4234,6 +4622,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4253,10 +4644,13 @@ msgstr "" "\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" +" dulokaj. La unulokaj plejparte servas por determini la statuson\n" +" de dosiero. Krome, estas operacioj super ĉenoj kaj la\n" " nombrokomparaj operacioj.\n" "\n" +" La konduto de test-komando dependas je la kiomo de ĝiaj argumentoj.\n" +" Plenan priskribon donas «man bash».\n" +"\n" " Operacioj super dosieroj:\n" "\n" "\t-a DOSIERO\tVera se DOSIERO ekzistas\n" @@ -4301,7 +4695,10 @@ msgstr "" " 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" +" -v VAR Vera se la ŝelvariablo VAR havas valoron\n" +" -R VAR Vera se la ŝelvariablo VAR havas valoron kaj\n" +" estas nomreferenco\n" +"\t! ESPR\t\tVera se la esprimo ESPR estas malvera\n" "\tESPR1 -a ESPR2\tVera se ambaŭ esprimoj estas veraj\n" "\tESPR1 -o ESPR2\tVera se ajna el la esprimoj estas vera\n" "\n" @@ -4318,7 +4715,7 @@ msgstr "" " argumento." # [ arg... ] -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4328,7 +4725,7 @@ msgstr "" "Ĉi tiu estas sinonimo de la primitivo „test‟; tamen la lasta\n" " argumento devas esti „]‟ fermanta la esprimon komencitan per „[‟." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -4349,7 +4746,7 @@ msgstr "" # trap [-lp] [[arg] signal_spec ...] # trap [-lp] [[ARG] SIGNALINDIKO ...] -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -4365,7 +4762,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4398,7 +4803,11 @@ msgstr "" "\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" +" estas „DEBUG‟, ARG plenumiĝos post ĉiu komando. Se en\n" +" SIGNALINDIKO estas „RETURN“, ARG plenumiĝos ĉiufoje kiam finiĝas\n" +" skripto rulata per komando „.“ aŭ „source“. La SIGNALINDIKO „ERR“\n" +" igas ARGon plenumiĝi ĉiufoje kiam malsukceso de komando kaŭzus\n" +" eliron el la ŝelo havanta la opcion „-e“ ŝaltita.\n" "\n" " Senargumente trap listigas komandojn plenumotajn laŭ ĉiu signalo.\n" "\n" @@ -4416,7 +4825,7 @@ msgstr "" # type [-afptP] name [name ...] # type [-afptP] NOMO [NOMO ...] -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4425,18 +4834,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4474,7 +4883,7 @@ msgstr "" # ulimit [-SHacdefilmnpqrstuvx] [limit] # ulimit [-SHacdefilmnpqrstuvx] [LIMO] -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -4492,6 +4901,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4503,6 +4913,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4517,31 +4932,39 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -"Ŝanĝu risurcolimaĵojn de la ŝelo\n" +"Ŝ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" +" la procezoj lanĉataj el la ŝelo (se la operaciumo ebligas tion).\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" +" -S ŝanĝebla („soft‟) limo\n" +" -H firma („hard‟) limo\n" +" -a eligu ĉiujn kurantajn risurcolimaĵojn\n" +" -b la kontaktoskatola bufrolongo\n" +" -c maksimuma longo de nekropsia dosiero („core‟)\n" +" -d maksimuma longo de datumsegmento de procezo\n" +" -e maksimuma viciga prioritato („nice‟)\n" +" -f maksimuma longo de dosieroj skribataj de la ŝelo kaj ĝiaj idoj\n" +" -i maksimuma longo de pendaj signaloj\n" +" -k maksimuma nombro de kernaj atendovicoj (kqueues) disponigeblaj\n" +" al la procezo \n" +" -l maksimuma longo de ŝlosebla procezmemoro (mlock)\n" +" -m maksimuma longo de rezida procezmemoro\n" +" -n maksimuma nombro de malfermitaj dosiernumeroj\n" +" -p longo de dukta bufro (pipe)\n" +" -q maksimuma nombro da bajtoj en atendovicoj de Poziksaj mesaĝoj\n" +" -r maksimuma prioritato realtempa\n" +" -s maksimuma longo de stako\n" +" -t maksimuma tempo ĉefprocesora (en sekundoj)\n" +" -u maksimuma nombro de procezoj de la uzanto\n" +" -v longo de la virtuala memoro\n" +" -x maksimuma nombro de dosierŝlosoj\n" +" -P maksimuma nombro de pseŭdoterminaloj\n" +" -R maksimuma daŭro de senblokiĝa rulo de realtempa procezo \n" +" -T maksimuma nombro de fadenoj\n" +"\n" +" Ne ĉiuj opcioj disponeblas sur ĉiuj komputilaj platformoj.\n" "\n" " Se LIMO estas indikita, ĝia valoro limigas la koncernan risurcon;\n" " la specialaj vortoj por LIMO: „soft‟, „hard‟, „unlimited‟\n" @@ -4558,7 +4981,7 @@ msgstr "" # umask [-p] [-S] [mode] # umask [-p] [-S] [REĜIMO] -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4591,64 +5014,93 @@ msgstr "" " Elirstato:\n" " Sukceso, krom se REĜIMO estas nevalida aŭ aperas misa opcio." -# wait [id] -# wait [IND] -#: builtins.c:1448 +# wait [-fn] [id ...] +# wait [-fn] [IND ...] +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -"Atendu ke laboro finiĝu, kaj liveru elirstaton\n" +"Atendu ke laboroj finiĝu, kaj liveru elirstaton.\n" "\n" -" Atendu finiĝon de la procezo indikita per IND (kiu povas esti\n" +" Atendu finiĝon de ĉiu 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" +" Kun la opcio „-n“: atendu finiĝon de unu el laboroj de la\n" +" IND-listo aŭ, se neniu IND estas donita, de la sekva laboro, kaj\n" +" liveru ĝian elirstaton.\n" +"\n" +" Kun la opcio „-p“: la procezo aŭ la laborindiko de la laboro kies\n" +" elirstato estas liverota valorizas la VARIABLOn indikitan per la\n" +" opcia argumento. Komence, antaŭ ajna valorizo, la variablo estos\n" +" malvalorizita. Tio utilas nur kune kun la opcio „-n“.\n" +"\n" +" Kun la opcio „-f“: se la laborregado estas ŝaltita, atendu finiĝon\n" +" de la donita IND (anstataŭ atendi ke ĝi ŝanĝu la staton)\n" +"\n" " Elirstato:\n" -" Tiu de IND; malsukceso, se IND estas nevalida aŭ se renkontiĝas\n" -" nevalida opcio.<" +" Tiu de la lasta IND; malsukceso, se IND estas nevalida aŭ se\n" +" renkontiĝas nevalida opcio, aŭ „-n“ estas donita kaj la ŝelo\n" +" malhavas neatendatajn idojn.<" -# wait [pid] -# wait [PN] -#: builtins.c:1466 +# wait [pid ...] +# wait [PN ...] +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" -"Atendu ke procezo finiĝu, kaj liveru elirstaton\n" +"Atendu ke procezoj finiĝu, kaj liveru elirstaton\n" "\n" -" Atendu finiĝon de la indikita procezo kaj liveru ĝian elirstaton.\n" +" Atendu finiĝon de ĉiu indikita procezoj 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." +" Tiu de la lasta PN; malsukceso, se PN estas nevalida aŭ se\n" +" renkontiĝas nevalida opcio." # for NAME [in WORDS ... ] ; do COMMANDS; done # for NOMO [in VORTOJ ... ] ; do KOMANDOJ; done -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4672,7 +5124,7 @@ msgstr "" # for (( exp1; exp2; exp3 )); do COMMANDS; done # for (( ESPR1; ESPR2; ESPR3 )); do KOMANDOJ; done -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4704,7 +5156,7 @@ msgstr "" # select NAME [in WORDS ... ;] do COMMANDS; done # select NONO [in VORTOJ ... ;] do KOMANDOJ; done -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4741,7 +5193,7 @@ msgstr "" # time [-p] PIPELINE # time [-p] DUKTO -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4772,7 +5224,7 @@ msgstr "" # case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac # case VORTO in [ŜABLONO [| ŜABLONO]...) KOMANDOJ ;;]... esac -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4794,7 +5246,7 @@ msgstr "" # [ else COMMANDS; ] fi # if KOMANDOJ; then KOMANDOJ;[ elif KOMANDOJ; then KOMANDOJ; ]... # [ else KOMANDOJ; ] fi -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -4826,12 +5278,14 @@ msgstr "" # while COMMANDS; do COMMANDS; done # while KOMANDOJ; do KOMANDOJ; done -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4846,12 +5300,14 @@ msgstr "" # until COMMANDS; do COMMANDS; done # until KOMANDOJ; do KOMANDOJ; done -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4866,7 +5322,7 @@ msgstr "" # coproc [NAME] command [redirections] # coproc [NOMO] KOMANDO [ALIDIREKTADOJ] -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4876,7 +5332,7 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" "Kreu kunprocezon nomotan NOMO\n" "\n" @@ -4886,11 +5342,11 @@ msgstr "" " „COPROC‟.\n" "\n" " Elirstato:\n" -" Tiu de KOMANDO." +" La komando coproc liveras la elirstaton 0." # function name { COMMANDS ; } or name () { COMMANDS ; } # function NOMO { KOMANDOJ ; } aŭ NOMO () { KOMANDOJ ; } -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -4915,7 +5371,7 @@ msgstr "" # grouping_braces: { COMMANDS ; } # { KOMANDOJ ; } -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4935,7 +5391,7 @@ msgstr "" # job_spec [&] # LABORINDIKO [&] -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4960,27 +5416,27 @@ msgstr "" # (( expression )) # (( ESPRIMO )) -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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" +" La ESPRIMO komputiĝas laŭ la aritmetikaj reguloj.\n" +" Ekvivalentas al «let \"ESPRIMO\"».\n" "\n" " Elirstato:\n" " 1, se la rezulto de la ESPRIMO estas 0; 0 aliokaze." # [[ expression ]] # [[ ESPRIMO ]] -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -5031,7 +5487,7 @@ msgstr "" # help var # variables - Names and meanings of some shell variables -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -5138,7 +5594,7 @@ msgstr "" # pushd [-n] [+N | -N | dir] # pushd [-n] [+N | -N | DOSIERUJO] -#: builtins.c:1754 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -5148,19 +5604,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5197,7 +5653,7 @@ msgstr "" " Sukceso, krom se aperas misa argumento aŭ se cd malsukcesas." # popd [-n] [+N | -N] -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5206,16 +5662,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5246,7 +5702,7 @@ msgstr "" " Sukceso, krom se aperas misa argumento aŭ se cd malsukcesas." # dirs [-clpv] [+N] [-N] -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5257,19 +5713,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5300,14 +5756,13 @@ msgstr "" # shopt [-pqsu] [-o] [optname ...] # shopt [-pqsu] [-o] [OPCINOMO ...] -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5322,8 +5777,9 @@ msgid "" 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" +" Ŝanĝu la staton de ĉiu el la OPCINOMOj. Sen opciaj argumentoj,\n" +" listigu ĉiujn doniajn OPCINOMOjn -- aŭ ĉiujn ŝelajn opciojn se\n" +" neniu OPCINOMO estas donita, -- indikante pri ĉiu el ili, ĉu ĝi\n" " estas ŝaltita.\n" "\n" " Opcioj:\n" @@ -5335,12 +5791,12 @@ msgstr "" "\n" " Elirstato:\n" " Sukceso, se OPCINOMO estas ŝaltita; malsukceso, se aperas misa\n" -" opcio, aŭ se OPCINOMO estas malŝaltita.\n" -" " +" opcio, aŭ se OPCINOMO estas malŝaltita." # printf [-v var] format [arguments] # printf [-v VAR] FORMATO [ARGUMENTOJ] -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5357,19 +5813,30 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\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" +"Aranĝu kaj eligu ARGUMENTOJn laŭ FORMATO.\n" "\n" " Opcio:\n" " -v VAR eligu en ŝelvariablon VAR anstataŭ en la ĉefeligujon\n" @@ -5379,19 +5846,26 @@ msgstr "" " 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" +" Aldone al la normaj specifiloj laŭ „printf(1)‟, printf komprenas:\n" +"\n" +" „%b‟ igas malvolvi deklivajn (\\) eskapsekvencojn en sia argumento;\n" +" „%q‟ encitiligu la argumenton en formon taŭgan por ŝela re-enigo;\n" +" „%(fmt)T‟ servas por eligi data-tempan signoĉenon kiel farus\n" +" „strftime(3)‟ laŭ la formatoĉeno fmt.\n" +"\n" +" La formato estas iteracie reuzata kiom necesas por konsumi ĉiujn\n" +" argumentojn. Se estas malpli da argumentoj ol la formato\n" +" bezonas, la kromaj specifoj estas interpretataj tiel, kvazaŭ la\n" +" mankantaj argumentoj estus nuloj aŭ vakuaj signoĉenoj (laŭokaze).\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 +# complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPCIO] [-A AGO] [-G ŜABLONO] +# [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO] +# [-P PREFIKSO] [-S SUFIKSO] [NOMO ...] +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -5404,32 +5878,44 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -"Difinu, kiel Readline kompletigu argumentojn\n" +"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" +" -p\teligu kompletigoregulojn en formo uzebla por enigo en la ŝelon\n" " -r\tforigu la kompletigoregulon por ĉiu NOMO, aŭ, se nenia NOMO\n" "\testas donita, ĉiujn kompletigoregulojn\n" +" -D apliku la indikitajn kompletigojn kaj agojn Defaŭlte por la\n" +" komandoj sen specifa kompletigo-difino\n" +" -E apliku la indikitajn kompletigojn kaj agojn al vakuaj (Empty)\n" +" komandoj (la kompletigoj provotaj en vakua komandolinio)\n" +" -I apliku la kompletigojn kaj agojn al la unua (kutime, la\n" +" komanda) vorto\n" "\n" " Ĉe provo kompletigi la agoj aplikiĝas laŭ la ordo de majusklaj\n" -" opcioj en la ĉi-supre listo.\n" +" opcioj en la ĉi-supra listo. Se pluraj opcioj estas donitaj, la\n" +" opcio „-D“ antaŭas la opcion „-E“, kaj ili ambaŭ antaŭas la\n" +" opcion „-I“.\n" "\n" " Elirstato:\n" " Sukceso, krom se misa opcio estas donita, aŭ eraro okazis." @@ -5437,10 +5923,10 @@ msgstr "" # 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 +# compgen [-abcdefgjksuv] [-o OPCIO] [-A AGO] [-G ŜABLONO] +# [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTRILO] +# [-P PREFIKSO] [-S SUFIKSO] [VORTO] +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -5460,16 +5946,14 @@ msgstr "" " 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 +# compopt [-o|+o OPCIO] [-DE] [NOMO ...] +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5478,6 +5962,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5502,8 +5987,11 @@ msgstr "" "\n" " Opcioj:\n" " -o OPCIO Ŝaltu kompletigan OPCIOn por ĉiu NOMO\n" +" -D Ŝanĝu opciojn por la Defaŭlta komandokompletigo\n" +" -E Ŝanĝu opciojn por la vakua (Empty) komandokompletigo\n" +" -I Ŝanĝu la kompletigajn opciojn por la unua vorto.\n" "\n" -" Uzante «+o» anstataŭ «-o» oni povas malŝalti la indikitan OPCIOn.\n" +" Uzante «+o» anstataŭ «-o» oni malŝaltas la indikitan OPCIOn.\n" "\n" " Argumentoj:\n" " Ĉiu NOMO indikas komandon, por kiu kompletiga regulo devas esti\n" @@ -5520,8 +6008,7 @@ msgstr "" # [-c quantum] [array] # mapfile [-n NOMBRILO] [-O ORIGINO] [-s NOMBRILO] [-t] [-u DN] [-C RETROVOKO] # [-c KVANTO] [TABELO] -#: builtins.c:1968 -#, fuzzy +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -5532,24 +6019,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5562,17 +6051,19 @@ msgid "" 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" +" Legu liniojn el la ĉefenigujo en la entjerindican variablon\n" +" TABELO, aŭ el la dosiernumero DN, se ĉeestas la opcio „-u‟.\n" +" Defaŭlte TABELO estas la variablo MAPFILE.\n" "\n" " Opcioj:\n" -" -n NOMBRILO Kopiu maksimume NOMBRILOn da linioj. Se NOMBRILO\n" +" -d DISIG Por fini liniojn uzu ne la linifinilon, sed DISIG\n" +" -n KIOM Kopiu maksimume KIOMon da linioj. Se KIOM\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" +" -s KIOM Ignoru KIOMon da unuaj linioj\n" +" -t Forigu la vostan DISIG el ĉiu legita linio (defaŭlte\n" +" la linifinilon)\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" @@ -5582,33 +6073,28 @@ msgstr "" "\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" +" valorizota tabelano kaj la en ĝin skribotan linion kiel kromajn\n" +" argumentojn.\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." +" Sukceso, krom se aperas misa opcio aŭ TABELO estas nurlega aŭ\n" +" ĝi ne estas entjerindica tabelo." # readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] # [-c quantum] [array] -#: builtins.c:2001 +#: builtins.c:2086 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" +"Legu liniojn el dosiero 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)" +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: Misa asocitabela ŝlosilo" diff --git a/po/es.gmo b/po/es.gmo index e626a6f..68edd53 100644 Binary files a/po/es.gmo and b/po/es.gmo differ diff --git a/po/es.po b/po/es.po index 2cad3cc..66ac8e6 100644 --- a/po/es.po +++ b/po/es.po @@ -1,481 +1,561 @@ -# 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. +# Mensajes en español para GNU bash +# Copyright (C) 2018, 2019, 2020 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. -# Cristian Oth�n Mart�nez Vera , 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009. +# Cristian Othón Martínez Vera , 2000 - 2011. +# Francisco Javier Serrador +# Antonio Ceballos Roa , 2018, 2019, 2020, 2022 # msgid "" msgstr "" -"Project-Id-Version: GNU bash 4.0\n" +"Project-Id-Version: GNU bash 5.2-rc1\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 \n" -"Language-Team: Spanish \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-09-21 08:56+0200\n" +"Last-Translator: Antonio Ceballos Roa \n" +"Language-Team: Spanish \n" +"Language: es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "sub�ndice de matriz incorrecto" +msgstr "subíndice de matriz incorrecto" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: no se puede convertir la matriz de indizada a asociativa" +msgid "%s: removing nameref attribute" +msgstr "%s: se elimina el atributo nameref" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: �ndice de matriz asociativa inv�lido" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: no se puede convertir la matriz indexada en asociativa" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s: no se puede asignar a un �ndice que no es num�rico" +msgstr "%s: no se puede asignar a un índice que no es numérico" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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" +msgstr "%s: %s: se debe usar un subíndice al asignar a una matriz asociativa" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: no se puede crear: %s" -#: bashline.c:3457 +#: bashline.c:4479 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" +msgstr "bash_execute_unix_command: no se puede encontrar la combinación de teclas para la orden" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "%s: el primer car�cter que no es espacio en blanco no es `\"'" +msgstr "%s: el primer carácter que no es espacio en blanco no es «\"»" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "no hay un `%c' que cierre en %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "%s: falta un `:' separador" +msgstr "%s: falta un «:» separador" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': no se puede borrar la asignación en la combinación de teclas de órdenes" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansión de llaves: no se puede asignar memoria a %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansión de llaves: fallo al asignar memoria a %u elementos" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansión de llaves: fallo al asignar memoria a «%s»" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "`%s': nombre de combinaci�n de teclas inv�lido" +msgstr "`%s': nombre de alias inválido" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "no se activ� la edici�n de l�nea" +msgstr "no se activó la edición de línea" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "`%s': nombre de combinaci�n de teclas inv�lido" +msgstr "`%s': nombre de combinación de teclas inválido" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "`%s': nombre de funci�n desconocido" +msgstr "`%s': nombre de función desconocido" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "%s no est� asignado a ninguna tecla.\n" +msgstr "%s no está asignado a ninguna tecla.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "%s se puede invocar a trav�s de " +msgstr "%s se puede invocar vía " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': no se puede borrar la asignación" -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "cuenta de ciclo" +msgstr "cuenta de bucle" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "s�lo tiene significado en un ciclo `for', `while' o `until'" +msgstr "solo tiene significado en un bucle `for', `while', o `until'" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." 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 proporcionar un volcado de pila.\n" +" \n" +" El valor de EXPR indica cuántos marcos de llamada hay que retroceder\n" +" antes del actual; el marco superior es el marco 0." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "HOME no est� definido" +msgstr "HOME no está definido" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "demasiados argumentos" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "directorio nulo" -#: builtins/cd.def:227 +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "OLDPWD no est� definido" +msgstr "OLDPWD no está establecido" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "l�nea %d: " +msgstr "línea %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "aviso: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "%s: uso: " - -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "demasiados argumentos" +msgstr "%s: modo de empleo: " -#: builtins/common.c:191 shell.c:499 shell.c:782 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" -msgstr "%s: la opci�n requiere un argumento" +msgstr "%s: la opción requiere un argumento" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "%s: se requiere un argumento num�rico" +msgstr "%s: se requiere un argumento numérico" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" -msgstr "%s: no se encontr�" +msgstr "%s: no encontrado" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" -msgstr "%s: opci�n inv�lida" +msgstr "%s: opción inválida" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" -msgstr "%s: nombre de opci�n inv�lido" +msgstr "%s: nombre de opción inválido" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "`%s': no es un identificador v�lido" +msgstr "`%s': no es un identificador válido" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "n�mero octal inv�lido" +msgstr "número octal inválido" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "n�mero hexadecimal inv�lido" +msgstr "número hexadecimal inválido" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "n�mero inv�lido" +msgstr "número inválido" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "%s: especificaci�n de se�al inv�lida" +msgstr "%s: la especificación de señal no es válida" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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" +msgstr "`%s': no es un pid o una especificación válida de trabajo" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s: variable de s�lo lectura" +msgstr "%s: variable de sólo lectura" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: no se puede asignar" -#: builtins/common.c:272 +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s fuera de rango" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argumento" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s fuera de rango" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: no existe ese trabajo" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: no hay control de trabajos" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "no hay control de trabajos" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: restringido" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "restringido" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "%s: no es una orden interna del shell" +msgstr "%s: no es una orden interna de shell" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "error de escritura: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "error al establecer los atributos de la terminal: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "error al obtener los atributos de la terminal: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" -msgstr "%s: especificaci�n de trabajo ambigua" +msgstr "%s: especificación de trabajo ambigua" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "ayuda no disponible en esta versión" -#: builtins/complete.def:276 +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: no se puede borrar: %s es de solo lectura" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: no se puede borrar" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "%s: nombre de acci�n inv�lido" +msgstr "%s: nombre de acción inválido" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "%s: no hay completado de especificaci�n" +msgstr "%s: no hay especificación para completado" #: 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" +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" +msgstr "aviso: es posible que la opción -C no funcione como se espera" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "no se est� ejecutando la funci�n de completado" +msgstr "no se está ejecutando la función de completado" -# s�lo se puede usar. sv +# sólo se puede usar. sv # De acuerdo. cfuga -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "s�lo se puede usar dentro de una funci�n" +msgstr "sólo se puede usar dentro de una función" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "no se puede usar `-f' para hacer funciones" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s: funci�n de s�lo lectura" +msgstr "%s: función de sólo lectura" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: referencia variable no puede ser una matriz" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: no se permiten las autoreferencias a variables nameref" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: referencia de nombre circular" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': nombre variable inválido para referencia de nombre" -#: builtins/declare.def:468 +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "%s: no se puede convertir una matriz asociativa a indizada" +msgstr "%s: no se puede convertir una matriz asociativa a indexada" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: asignación obsoleta de matriz compuesta entrecomillada" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "la carga din�mica no est� disponible" +msgstr "la carga dinámica no está disponible" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "no se puede abrir el objeto compartido %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: la orden interna dinámica ya está cargada" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "función de carga para %s devuelve fallo (%d): no se ha efectuado la carga" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "%s: no se carg� din�micamente" +msgstr "%s: no cargado dinámicamente" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: es un directorio" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: no es un fichero regular" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: no se puede ejecutar el fichero binario" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: no se puede ejecutar: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" -msgstr "logout\n" +msgstr "cerrar sesión\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "no es un shell de entrada: use `exit'" +msgstr "no es un shell de inicio de sesión: utilice `exit'" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Hay trabajos detenidos.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "Hay trabajos en ejecuci�n.\n" +msgstr "Hay trabajos en ejecución.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "no se encontr� la orden" +msgstr "no se ha encontrado ninguna orden" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "especificaci�n de historia" +msgstr "especificación de historia" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "actual" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "el trabajo %d inici� sin control de trabajo" +msgstr "trabajo %d iniciado sin control de trabajo" #: builtins/getopt.c:110 #, c-format msgid "%s: illegal option -- %c\n" -msgstr "%s: opci�n ilegal -- %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" +msgstr "%s: la opción requiere un argumento -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "asociaci�n desactivada" +msgstr "asociación desactivada" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "%s: tabla de asociaci�n vac�a\n" +msgstr "%s: tabla de asociación vacía\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "coinc\torden\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 `" +msgstr[0] "Órdenes de shell que coinciden con la palabra clave`" +msgstr[1] "Órdenes de shell que coinciden con las palabras claves`" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" -"no hay temas de ayuda que coincidan con `%s'. Pruebe `help help' o `man -k %" -"s' o `info %s'." +"'\n" +"\n" #: builtins/help.def:185 #, 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:223 +#, c-format msgid "%s: cannot open: %s" msgstr "%s: no se puede abrir: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -486,126 +566,151 @@ msgid "" "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" +"Estas órdenes de 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" +"Teclee `help nombre' para saber más sobre la función `nombre'.\n" +"Utilice `info bash' para saber más sobre la shell en general.\n" +"Utilice `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" +"Un asterisco (*) junto a un nombre significa que la orden está desactivada.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "no se puede usar m�s de uno de -anrw" +msgstr "no se puede usar más de uno de -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "posici�n en la historia" +msgstr "posición en la historia" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: marca de tiempo inválida" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" -msgstr "%s: fall� la expansi�n de la historia" +msgstr "%s: falló la expansión de la historia" #: builtins/inlib.def:71 #, c-format msgid "%s: inlib failed" -msgstr "%s: fall� inlib" +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 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "%s: los argumentos deben ser procesos o IDs de trabajos" +msgstr "%s: los argumentos deben ser IDs de procesos o trabajos" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Error desconocido" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "se esperaba una expresi�n" +msgstr "se esperaba una expresión" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: no es una variable de matriz" +msgstr "%s: no es una matriz indexada" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "%s: especificaci�n de descriptor de fichero inv�lida" +msgstr "%s: especificación de descriptor de fichero inválida" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "%d: descriptor de fichero inv�lido: %s" +msgstr "%d: descriptor de fichero inválido: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" -msgstr "%s: cuenta de l�neas inv�lida" +msgstr "%s: cuenta de líneas inválida" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" -msgstr "%s: origen de matriz inv�lido" +msgstr "%s: origen de matriz inválido" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" -msgstr "%s: quantum de llamada inv�lido" +msgstr "%s: quantum de llamada inválido" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "nombre de variable de matriz vac�o" +msgstr "nombre de variable matriz vacío" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "se requiere el soporte de variable de matriz" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "`%s': falta el car�cter de formato" +msgstr "`%s': falta el carácter de formato" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': especificación de formato de tiempo inválida" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "`%c': car�cter de formato inv�lido" +msgstr "`%c': carácter de formato inválido" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "aviso: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema con el análisis del formato: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "falta el d�gito hexadecimal para \\x" +msgstr "falta el dígito hexadecimal para \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "falta el dígito unicode para \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "no hay otro directorio" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argumento inválido" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "la pila de directorios est� vac�a" +msgstr "la pila de directorios está vacía" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "�ndice de la pila de directorios" +msgstr "índice de pilas de directorios" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -620,36 +725,32 @@ msgid "" " \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" +" +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" +" -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" +" encuentran 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" +" -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" +" \t\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\tMuestra la N-ésima entrada contando desde la izquierda de la lista\n" +" \tmostrada por dirs cuando se llama sin opciones, empezando en 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." +" -N\tMuestra la N-ésima entrada contando desde la derecha de la lista\n" +" \tmostrada por dirs cuando se llama sin opciones, empezando en cero." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -673,25 +774,29 @@ msgid "" " \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" +"Agrega un directorio a la parte superior de la pila de directorios\n" +" o rota la pila, haciendo que la nueva parte superior de la pila\n" +" sea el directorio de trabajo actual. Sin argumentos, intercambia\n" +" los dos directorios de la parte superior.\n" +" \n" +" Opciones:\n" +" -n\tSuprime el cambio normal de directorio al añadir directorios\n" +" \ta la pila, de forma que solo 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',\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\tRota la pila para que el N-ésimo directorio (contando\n" +" \tdesde la izquierda de la lista mostrada por `dirs',\n" +" \tcomenzando desde cero) esté en la parte superior.\n" +" -N\tRota la pila para que el N-ésimo directorio (contando\n" +" \tdesde la derecha de la lista mostrada por `dirs',\n" +" \tcomenzando desde cero) esté en la parte superior.\n" " \n" -" dir\tagrega DIR a la pila de directorios en el tope,\n" -" \thaci�ndolo el nuevo directorio de trabajo actual.\n" +" dir\tAñade DIR a la pila de directorios en la parte superior,\n" +" \thaciéndolo el nuevo directorio de trabajo actual.\n" " \n" " La orden interna `dirs' muestra la pila de directorios." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -711,894 +816,1011 @@ msgid "" " \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" +"Quita entradas de la pila de directorios. Sin argumentos, borra\n" +" el directorio superior de la pila, y cambia al nuevo directorio superior.\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\tSuprime el cambio normal de directorio cuando se borran\n" +" \tdirectorios de la pila, de modo que solo se manipula la pila.\n" " \n" " Argumentos:\n" -" +N\tBorra la N-�sima entrada contando de la izquierda de\n" +" +N\tBorra la N-ésima entrada contando desde 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\tBorra la N-ésima entrada contando desde la derecha de\n" +" \tla lista mostrada por `dirs', comenzando desde cero. Por\n" +" \tejemplo: `popd -0' borra el último directorio, `popd -1' el\n" +" \tpenúltimo.\n" " \n" " La orden interna `dirs' muestra la pila de directorios." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "%s: especificaci�n de tiempo de expiraci�n inv�lida" +msgstr "%s: especificación del tiempo de expiración inválida" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "error de lectura: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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'" +msgstr "sólo se puede usar `return' desde una función o un script leído con `source'" -#: builtins/set.def:768 +#: builtins/set.def:869 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" +msgstr "no se puede borrar al mismo tiempo una función y una variable" -#: builtins/set.def:823 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: no es una variable de matriz" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" -msgstr "%s: no es una funci�n" +msgstr "%s: no es una función" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: no se puede exportar" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "cuenta de shift" +msgstr "contador de desplazamiento" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "no se pueden activar y desactivar opciones del shell simult�neamente" +msgstr "no se pueden activar y desactivar opciones del shell simultáneamente" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "%s: nombre de opci�n del shell inv�lido" +msgstr "%s: nombre de opción de shell inválido" #: builtins/source.def:128 msgid "filename argument required" -msgstr "se requiere un argumento de nombre de fichero" +msgstr "argumento de nombre de fichero requerido" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" -msgstr "%s: no se encontr� el fichero" +msgstr "%s: no se encontró el fichero" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "no se puede suspender" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "no se puede suspender un shell de entrada" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s es un alias de `%s'\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s es una palabra clave del shell\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" -msgstr "%s: es una funci�n\n" +msgstr "%s: es una función\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s es una función interna de shell especial\n" + +#: builtins/type.def:301 #, 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 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s is %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "%s est� asociado (%s)\n" +msgstr "%s está asociado (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "%s: l�mite de argumento inv�lido" +msgstr "%s: límite de argumento inválido" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "`%c': orden err�nea" +msgstr "`%c': orden incorrecta" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" -msgstr "%s: no se puede obtener el l�mite: %s" +msgstr "%s: no se puede obtener el límite: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" -msgstr "l�mite" +msgstr "límite" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s: no se puede modificar el l�mite: %s" +msgstr "%s: no se puede modificar el límite: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" -msgstr "n�mero octal" +msgstr "número octal" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "`%c': operador de modo simb�lico inv�lido" +msgstr "`%c': operador de modo simbólico inválido" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "`%c': car�cter de modo simb�lico inv�lido" +msgstr "`%c': carácter de modo simbólico inválido" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr " l�nea " +msgstr " línea " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" -msgstr "�ltima orden: %s\n" +msgstr "última orden: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Abortando..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORME: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "DEBUG aviso: " + +#: error.c:488 msgid "unknown command error" -msgstr "error de orden desconocido" +msgstr "error de orden desconocida" -#: error.c:407 +#: error.c:489 msgid "bad command type" -msgstr "tipo de orden err�neo" +msgstr "tipo de orden incorrecto" -#: error.c:408 +#: error.c:490 msgid "bad connector" -msgstr "conector err�neo" +msgstr "conector erróneo" -#: error.c:409 +#: error.c:491 msgid "bad jump" -msgstr "salto err�neo" +msgstr "salto erróneo" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aha expirado mientras esperaba alguna entrada: auto-logout\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "no se puede redirigir la salida est�ndar desde /dev/null: %s" +msgstr "no se puede redirigir la entrada estándar desde /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "TIMEFORMAT: `%c': car�cter de formato inv�lido" +msgstr "TIMEFORMAT: `%c': carácter de formato inválido" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] aún existe" -#: execute_cmd.c:2075 +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "error de tuber�a" +msgstr "error de tubería" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: nivel máximo de anidamiento de evaluaciones excedido (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: nivel máximo de anidamiento de lecturas con `source' excedido (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: nivel máximo de anidamiento de funciones excedido (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: restringido: no se puede especificar `/' en nombres de �rdenes" +msgstr "%s: restringido: no se puede especificar `/' en nombres de órdenes" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s: no se encontr� la orden" +msgstr "%s: orden no encontrada" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +# file=fichero. archive=archivo. Si no, es imposible traducir tar. sv +# De acuerdo. Corregido en todo el fichero. cfuga +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: no se puede ejecutar: no se ha encontrado el fichero requerido" -#: execute_cmd.c:4827 +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: %s: int�rprete err�neo" +msgstr "%s: %s: intérprete erróneo" + +# file=fichero. archive=archivo. Si no, es imposible traducir tar. sv +# De acuerdo. Corregido en todo el fichero. cfuga +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: no se puede ejecutar fichero binario: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': es una orden interna especial" -#: execute_cmd.c:4976 +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "no se puede duplicar el df %d al df %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "se ha excedido el nivel de recursi�n de la expresi�n" +msgstr "se ha excedido el nivel de recursión de la expresión" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" -msgstr "desbordamiento de la base de la pila de recursi�n" +msgstr "desbordamiento de la pila de recursión" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "error sint�ctico en la expresi�n" +msgstr "error sintáctico en la expresión" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "se intent� asignar a algo que no es una variable" +msgstr "se intentó asignar a algo que no es una variable" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "error sintáctico en asignación de variable" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "divisi�n por 0" +msgstr "división por 0" -# token en bison fue traducido como terminal. �Lo traducimos igual aqu� +# token en bison fue traducido como terminal. ¿Lo traducimos igual aquí # o lo dejamos como 'unidad' o 'elemento'? cfuga -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "bicho: elemento de asignaci�n de expresi�n err�neo" +msgstr "defecto: elemento de asignación de expresión erróneo" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "se esperaba `:' para la expresi�n condicional" +msgstr "se esperaba `:' para la expresión condicional" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "exponente menor que 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" -"se esperaba un identificador despu�s del pre-incremento o pre-decremento" +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 +# mmmh, puede faltar más de un paréntesis cfuga +# tiene razón Enrique, es singular. cfuga +#: expr.c:1057 msgid "missing `)'" msgstr "falta un `)'" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "error sint�ctico: se esperaba un operando" +msgstr "error sintáctico: se esperaba un operando" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "error sint�ctico: operador aritm�tico inv�lido" +msgstr "error sintáctico: operador aritmético inválido" -#: expr.c:1202 +#: expr.c:1518 #, 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 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "base aritm�tica inv�lida" +msgstr "base aritmética inválida" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "constante entera inválida" -#: expr.c:1280 +#: expr.c:1603 msgid "value too great for base" msgstr "valor demasiado grande para la base" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" -msgstr "%s: error de expresi�n\n" +msgstr "%s: error de expresión\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: no se puede acceder a los directorios padre" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, 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 +#: input.c:266 #, 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" +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 +#: input.c:274 #, 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" +msgstr "save_bash_input: el almacenamiento intermedio ya existe para el nuevo df %d" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "start_pipeline: tuber�a de pgrp" +msgstr "start_pipeline: tubería de pgrp" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: BUCLE: psi (%d) == storage[psi].bucket_next" -#: jobs.c:887 +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: BUCLE: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" -msgstr "el pid `forked' %d aparece en el trabajo en ejecuci�n %d" +msgstr "el pid `forked' %d aparece en el trabajo en ejecución %d" -#: jobs.c:1005 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "add_process: pid %5ld (%s) se marca como vivo a�n" +msgstr "add_process: pid %5ld (%s) se marca como vivo aún" -# Cambiar�a 'hay' por 'existe' em+ -#: jobs.c:1401 +# Cambiaría 'hay' por 'existe' em+ +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: no existe tal pid" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" -msgstr "Se�al %d" +msgstr "Señal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Hecho" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Detenido" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Detenido(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Ejecutando" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Hecho(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Salida %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Estado desconocido" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(`core' generado) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr " (dir ahora: %s)" +msgstr " (da: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "setpgid hijo (%ld a %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: No hay un registro del proceso %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "wait_for_job: el trabajo %d est� detenido" +msgstr "wait_for_job: el trabajo %d está detenido" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: no hay trabajos actuales" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: el trabajo ha terminado" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "%s: el trabajo %d ya est� en segundo plano" +msgstr "%s: el trabajo %d ya está en segundo plano" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: se activa WNOHANG para evitar el bloque indefinido" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " -msgstr "%s: l�nea %d: " +msgstr "%s: línea %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (`core' generado)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(dir ahora: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "initialize_jobs_control: fall� getpgrp" +msgstr "initialize_job_control: falló getpgrp" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: no hay control de trabajos en segundo plano" -#: jobs.c:3639 +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "initialize_jobs_control: disciplina de l�nea" +msgstr "initialize_job_control: disciplina de línea" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "initialize_jobs_control: setpgid" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "no se puede establecer el grupo de proceso de terminal (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "no hay control de trabajos en este shell" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "malloc: fall� la aserci�n: %s\n" +msgstr "malloc: falló la aserción: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" "\r\n" -"malloc: %s:%d: aserci�n arruinada\r\n" +"malloc: %s:%d: aserción arruinada\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "desconocido" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: bloque en la lista libre sobreescrito" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "free: se llam� con un argumento de bloque previamente liberado" +msgstr "free: se llamó con un argumento de bloque previamente liberado" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "free: se llam� con un argumento de bloque sin asignar" +msgstr "free: se llamó con un argumento de bloque sin asignar" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "" -"free: se detect� un desbordamiento por debajo; mh_nbytes fuera de rango" +msgstr "free: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: se detectó un desbordamiento por debajo; magic8 corrupto" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "free: los tama�os de los pedazos de inicio y fin son diferentes" +msgstr "free: los tamaños de los fragmentos del inicio y del final son diferentes" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "realloc: se llam� con un argumento de bloque sin asignar" +msgstr "realloc: se llamó con un argumento de bloque sin asignar" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "" -"realloc: se detect� un desbordamiento por debajo; mh_nbytes fuera de rango" +msgstr "realloc: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: se detectó un desbordamiento por debajo; magic8 corrupto" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "realloc: los tama�os de los pedazos de inicio y fin son diferentes" +msgstr "realloc: los tamaños de los pedazos de inicio y fin son diferentes" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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" +msgstr "register_alloc: ¿la tabla alloc está llena con FIND_ALLOC?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "register_alloc: �%p ya est� en la tabla como asignado?\n" +msgstr "register_alloc: ¿%p ya está en la tabla como asignado?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "register_free: �%p ya est� en la tabla como libre?\n" +msgstr "register_free: ¿%p ya está en la tabla como libre?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "base inv�lida" +msgstr "base inválida" #: lib/sh/netopen.c:168 #, c-format msgid "%s: host unknown" -msgstr "%s: anfitri�n desconocido" +msgstr "%s: anfitrión desconocido" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "%s: servicio inv�lido" +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" +msgstr "%s: especificación de ruta de red errónea" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "no hay soporte para operaciones de red" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: no se puede cambiar el local (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: no se puede cambiar el local (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: no se pueden reasignar %lu bytes" +msgstr "setlocale: %s: no se puede cambiar el local (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: no se pueden reasignar %lu bytes" +msgstr "setlocale: %s: no se puede cambiar el local (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Tiene correo en $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Tiene correo nuevo en $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" -msgstr "El correo en %s fue le�do\n" +msgstr "El correo en %s fue leído\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "error sint�ctico: se requiere una expresi�n aritm�tica" +msgstr "error sintáctico: se requiere una expresión aritmética" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "error sint�ctico: `;' inesperado" +msgstr "error sintáctico: `;' inesperado" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "error sint�ctico: `((%s))'" +msgstr "error sintáctico: `((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: tipo de instrucci�n %d err�neo" +msgstr "make_here_document: tipo de instrucción %d erróneo" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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')" +msgstr "el documento-aquí en la línea %d está delimitado por fin-de-fichero (se esperaba `%s')" -#: make_cmd.c:756 +#: make_cmd.c:769 #, 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" +msgstr "make_redirection: la instrucción de redirección `%d' está fuera de rango" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) excede TAMAÑO_MAX (%lu): línea truncada" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "número máximo de documentos en «here--document» excedido" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "EOF inesperado mientras se buscaba un `%c' coincidente" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "EOF inesperado mientras se buscaba `]]'" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "error sint�ctico en la expresi�n condicional: elemento inesperado `%s'" +msgstr "error sintáctico en la expresión condicional: elemento inesperado `%s'" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "error sint�ctico en la expresi�n condicional" +msgstr "error sintáctico en la expresión condicional" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "elemento inesperado `%s', se esperaba `)'" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "se esperaba `)'" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "argumento inesperado `%s' para el operador unario condicional" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "argumento inesperado para el operador unario condicional" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "elemento inesperado `%s', se esperaba un operador binario condicional" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "se esperaba un operador binario condicional" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "argumento inesperado `%s' para el operador binario condicional" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "argumento inesperado para el operador binario condicional" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "elemento inesperado `%c' en la orden condicional" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "elemento inesperado `%s' en la orden condicional" -#: parse.y:4168 +#: parse.y:4669 #, 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 +# 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 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "error sint�ctico cerca del elemento inesperado `%s'" +msgstr "error sintáctico cerca del elemento inesperado `%s'" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "error sint�ctico cerca de `%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 +# 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 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "error sint�ctico: no se esperaba el final del fichero" +msgstr "error sintáctico: no se esperaba el final del fichero" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" -msgstr "error sint�ctico" +msgstr "error sintáctico" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Use \"%s\" para dejar el shell.\n" +msgstr "Utilice \"%s\" para dejar el shell.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "EOF inesperado mientras se buscaba un `)' coincidente" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "completion: no se encuentra la funci�n `%s'" +msgstr "completion: función `%s' no encontrada" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: posible bucle de reintento" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: COMPSPEC nulo" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: conector err�neo `%d'" +msgstr "print_command: conector erróneo `%d'" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: descriptor de fichero inv�lido: %s" +msgstr "xtrace_set: %d: descriptor de fichero inválido" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: puntero NULL a fichero" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != numfich xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "cprintf: `%c': car�cter de formato inv�lido" +msgstr "cprintf: `%c': carácter de formato inválido" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "descriptor de fichero fuera de rango" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: redireccionamiento ambiguo" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: no se puede sobreescribir un fichero existente" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: restringido: no se puede redirigir la salida" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" -msgstr "no se puede crear un fichero temporal para el documento-aqu�: %s" +msgstr "no se puede crear un fichero temporal para el documento-aquí: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: no se puede asignar una lista a un miembro de la matriz" +msgstr "%s: no se puede asignar el fd a la variable" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "no se admite /dev/(tcp|udp)/anfitrion/puerto sin red" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "error de redirecci�n: no se puede duplicar el df" +msgstr "error de redirección: no se puede duplicar el df" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "�no se puede encontrar /tmp, crear por favor!" +msgstr "¡no se puede encontrar /tmp, crear por favor!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "/tmp debe ser un nombre de directorio v�lido" +msgstr "/tmp debe ser un nombre de directorio válido" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "modo de impresión bonita desactivado en shells interactivos" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" -msgstr "%c%c: opci�n inv�lida" +msgstr "%c%c: opción inválida" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "no se puede establecer el uid %d: uid efectivo %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "no se puede establecer gid a %d: gid efectivo %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "no puede ejecutar el depurador; modo depurado desactivado" -# Yo pondr�a "no tengo ning�n nombre". sv -# Revis� el c�digo fuente de bash. Es un mensaje de error cuando no se +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: es un directorio" + +# 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 +#: shell.c:1907 msgid "I have no name!" -msgstr "�No tengo nombre de usuario!" +msgstr "¡No tengo nombre de usuario!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "GNU bash, versi�n %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 +# 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 +# como guión del shell , eso es seguro ... así que puede estar +# bien así , ya lo verán otros em+ +#: shell.c:2062 #, 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" +"Modo de empleo:\t%s [opción GNU larga] [opción] ...\n" +"\t%s [opción GNU larga] [opción] fichero de shell ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "Opciones GNU largas:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD o -c orden o -O opción_shopt\t\t(sólo invocación)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s o -o opci�n\n" +msgstr "\t-%s o -o opción\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Teclee `%s -c \"help set\"' para más información sobre las opciones del shell.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "Teclee `%s -c help' para más información sobre las órdenes internas del shell.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "Use la orden `bashbug' para reportar bichos.\n" +msgstr "Utilice la orden `bashbug' para reportar defectos.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "página inicial bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ayuda general utilizando software GNU: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "sigprocmask: %d: operaci�n inv�lida" +msgstr "sigprocmask: %d: operación inválida" #: siglist.c:48 msgid "Bogus signal" -msgstr "Se�al ambigua" +msgstr "Señal ambigua" #: siglist.c:51 msgid "Hangup" @@ -1614,7 +1836,7 @@ msgstr "Salir" #: siglist.c:63 msgid "Illegal instruction" -msgstr "Instrucci�n ilegal" +msgstr "Instrucción ilegal" #: siglist.c:67 msgid "BPT trace/trap" @@ -1622,15 +1844,15 @@ msgstr "BPT rastreo/captura" #: siglist.c:75 msgid "ABORT instruction" -msgstr "instrucci�n ABORT" +msgstr "instrucción ABORT" #: siglist.c:79 msgid "EMT instruction" -msgstr "instrucci�n EMT" +msgstr "instrucción EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "Excepci�n de coma flotante" +msgstr "Excepción de coma flotante" #: siglist.c:87 msgid "Killed" @@ -1638,26 +1860,26 @@ msgstr "Matado" #: siglist.c:91 msgid "Bus error" -msgstr "Error en el bus" +msgstr "Error del bus" #: siglist.c:95 msgid "Segmentation fault" -msgstr "Violaci�n de segmento" +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 +# 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" +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 +# (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" +msgstr "Tubería rota" #: siglist.c:107 msgid "Alarm clock" @@ -1669,19 +1891,19 @@ msgstr "Terminado" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "Condici�n de E/S urgente" +msgstr "Condición de E/S urgente" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "Detenido (se�al)" +msgstr "Detenido (señal)" #: siglist.c:127 msgid "Continue" -msgstr "Contin�a" +msgstr "Continúa" #: siglist.c:135 msgid "Child death or stop" -msgstr "El proceso hijo ha muerto o est� parado" +msgstr "El proceso hijo ha muerto o está parado" #: siglist.c:139 msgid "Stopped (tty input)" @@ -1697,11 +1919,11 @@ msgstr "E/S listas" #: siglist.c:151 msgid "CPU limit" -msgstr "L�mite de CPU" +msgstr "Límite de CPU" #: siglist.c:155 msgid "File limit" -msgstr "L�mite de ficheros" +msgstr "Límite de ficheros" #: siglist.c:159 msgid "Alarm (virtual)" @@ -1717,15 +1939,15 @@ msgstr "Ventana cambiada" #: siglist.c:171 msgid "Record lock" -msgstr "Bloqueo de grabaci�n" +msgstr "Bloqueo de registro" #: siglist.c:175 msgid "User signal 1" -msgstr "Se�al de usuario 1" +msgstr "Señal de usuario 1" #: siglist.c:179 msgid "User signal 2" -msgstr "Se�al de usuario 2" +msgstr "Señal de usuario 2" #: siglist.c:183 msgid "HFT input data pending" @@ -1733,15 +1955,15 @@ 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 +# 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" +msgstr "fallo de energía inminente" #: siglist.c:191 msgid "system crash imminent" -msgstr "ca�da del sistema inminente" +msgstr "caída del sistema inminente" #: siglist.c:195 msgid "migrate process to another CPU" @@ -1749,7 +1971,7 @@ msgstr "migrando el proceso a otra CPU" #: siglist.c:199 msgid "programming error" -msgstr "error de programaci�n" +msgstr "error de programación" #: siglist.c:203 msgid "HFT monitor mode granted" @@ -1761,650 +1983,610 @@ 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" +msgstr "la secuencia de sonido HFT ha sido completada" #: siglist.c:215 msgid "Information request" -msgstr "Solicitud de informaci�n" - -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Se�al Desconocida #" +msgstr "Solicitud de información" -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "Se�al Desconocida #%d" +msgstr "Señal Desconocida #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "sustituci�n err�nea: no hay un `%s' que cierre en %s" +msgstr "sustitución errónea: no hay un `%s' que cierre en %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "no se puede crear la tuber�a para la sustituci�n del proceso" +msgstr "no se puede crear la tubería para la sustitución del proceso" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "no se puede crear un proceso hijo para la sustituci�n del proceso" +msgstr "no se puede crear un proceso hijo para la sustitución del proceso" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" -msgstr "no se puede abrir la tuber�a llamada %s para lectura" +msgstr "no se puede abrir la tubería llamada %s para lectura" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "no se puede abrir la tuber�a llamada %s para escritura" +msgstr "no se puede abrir la tubería llamada %s para escritura" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "no se puede duplicar la tuber�a llamada %s como df %d" +msgstr "no se puede duplicar la tubería llamada %s como df %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "sustitución de orden: se ignora byte nulo en la entrada" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "no se pueden crear la tuber�a para la sustituci�n de la orden" +msgstr "no se puede crear la tubería para la sustitución de la orden" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "no se puede crear un proceso hijo para la sustituci�n de la orden" +msgstr "no se puede crear un proceso hijo para la sustitución de la orden" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "command_substitute: no se puede duplicar la tuber�a como df 1" +msgstr "command_substitute: no se puede duplicar la tubería como df 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nombre de variable inválido para referencia de nombre" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansión indirecta inválida" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nombre de variable inválido" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parámetro no establecido" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: par�metro nulo o no establecido" +msgstr "%s: parámetro nulo o no establecido" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "%s: expresi�n de subcadena < 0" +msgstr "%s: expresión de subcadena < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: sustituci�n err�nea" +msgstr "%s: sustitución errónea" -#: subst.c:7045 +#: subst.c:9678 #, 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:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "versiones futuras del intérprete obligarán la evaluación como una sustitución aritmética" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "sustituci�n err�nea: no hay una \"`\" que cierre en %s" +msgstr "sustitución errónea: no hay una \"`\" que cierre en %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "no hay coincidencia: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "se esperaba un argumento" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s: se esperaba una expresi�n entera" +msgstr "%s: se esperaba una expresión entera" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "se esperaba `)'" +msgstr "`)' esperado" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "se esperaba `)', se encontr� %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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: se esperaba un operador binario" +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: se esperaba un operador unario" + # Singular em+ -# Puede faltar m�s de un ] cfuga +# 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 +# Abreviando "falta [al menos] un `]'" saldría: "falta un `]'". +# ¿No es mejor "falta algún `]'"? cfuga +# Tiene razón Enrique: singular. cfuga +#: test.c:896 msgid "missing `]'" msgstr "falta un `]'" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "error sintáctico: `%s' inesperado" + +#: trap.c:220 msgid "invalid signal number" -msgstr "n�mero de se�al inv�lido" +msgstr "número de señal inválido" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "manejador de capturas: se ha excedido el nivel máximo de manejadores de capturas (%d)" -#: trap.c:327 +#: trap.c:412 #, 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" +msgstr "run_pending_traps: valor erróneo en trap_list[%d]: %p" -#: trap.c:331 +#: trap.c:416 #, 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" +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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler: se�al err�nea %d" +msgstr "trap_handler: señal errónea %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "error al importar la definici�n de la funci�n para `%s'" +msgstr "error al importar la definición de la función para `%s'" -#: variables.c:748 +#: variables.c:838 #, 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 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "make_local_variable: no hay contexto de funci�n en el �mbito actual" +msgstr "make_local_variable: no hay contexto de función en el ámbito actual" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variable quizá no es valor asignado" -#: variables.c:3159 +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: no se puede heredar un valor de un tipo incompatible" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: asignando entero a nombre referencia" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "all_local_variables: no hay contexto de funci�n en el �mbito actual" +msgstr "all_local_variables: no hay contexto de función en el ámbito actual" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: par�metro nulo o no establecido" +msgstr "%s tiene exportstr nulo" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "car�cter inv�lido %d en exportstr para %s" +msgstr "carácter inválido %d en exportstr para %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "no hay `=' en exportstr para %s" -#: variables.c:3835 +#: variables.c:5317 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" +msgstr "pop_var_context: la cabeza de shell_variables no es un contexto de función" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: no es un contexto global_variables" -#: variables.c:3922 +#: variables.c:5410 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" +msgstr "pop_scope: la cabeza de shell_variables no es un ámbito de entorno temporal" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: no se puede abrir: %s" +msgstr "%s: %s: no se puede abrir como FICHERO" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, 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 \n" -msgstr "" -"Licencia GPLv3+: GPL de GNU versi�n 3 o posterior \n" +msgstr "%s: %s: valor inválido para el descriptor de fichero de rastreo" -#: version.c:86 version2.c:83 +#: variables.c:6450 #, c-format -msgid "GNU bash, version %s (%s)\n" -msgstr "GNU bash, versi�n %s (%s)\n" +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: valor de compatibilidad fuera del rango" -#: 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:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Licencia GPLv3+: GPL de GNU versión 3 o posterior \n" -#: version.c:92 version2.c:89 +#: version.c:86 version2.c:86 #, 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" +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versión %s (%s)\n" -#: version2.c:86 -#, fuzzy, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "Copyright (C) 2009 Free Software Foundation, Inc." +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Esto es software libre, es libre para modificar y redistribuirlo." -#: version2.c:87 -#, fuzzy, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" -"Licencia GPLv3+: GPL de GNU versi�n 3 o posterior \n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "No hay NINGUNA GARANTÍA, a la extensión permitida por la ley." -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc: no se pueden asignar %lu bytes (%lu bytes asignados)" +msgstr "%s: no se pueden asignar %lu bytes (%lu bytes asignados)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: no se pueden asignar %lu bytes" +msgstr "%s: no se pueden asignar %lu bytes" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: no se pueden asignar %lu bytes (%lu bytes asignados)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: no se pueden asignar %lu bytes" +msgstr "%s: %s:%d: no se pueden asignar %lu bytes" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [nombre[=valor] ... ]" -#: builtins.c:47 +#: builtins.c:49 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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m comb_teclas] [-f fichero] [-q nombre] [-u nombre] [-r secteclas] [-x secteclas:orden-shell] [secteclas:función-leerlinea o orden-leerlinea]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [orden-interna-shell [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "caller [expresi�n]" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "cd [-L|-P] [directorio]" +msgstr "caller [expresión]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "pwd [-LP]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [dir]" #: builtins.c:68 -msgid ":" -msgstr ":" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:70 -msgid "true" -msgstr "true" - -#: builtins.c:72 -msgid "false" -msgstr "false" - -#: builtins.c:74 +#: builtins.c:76 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] ..." +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [nombre[=valor] ...] o declare -p [-aAfFilnrtux] [nombre ...]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] nombre[=valor] ... o typeset -p [-aAfFilnrtux] [nombre ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "local [opci�n] nombre[=valor] ..." +msgstr "local [opción] nombre[=valor] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f fichero] [nombre ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts cadena_opciones nombre [arg ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nombre] [orden [argumento ...]] [redirección ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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]" +msgstr "fc [-e nombre_e] [-lnr] [primero] [último] o fc -s [pat=rep] [orden]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [id_trabajo]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [id_trabajo ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p ruta] [-dt] [nombre ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [patr�n ...]" +msgstr "help [-dms] [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...]" +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d despl] [n] o history -anrw [fichero] o history -ps arg [arg...]" -# jobspec no es s�lo el pid del proceso, puede ser tambien +# 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 +# mucho. ¿Sugerencias? cfuga +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "jobs [-lnprs] [idtrabajo ...] � jobs -x orden [args]" +msgstr "jobs [-lnprs] [idtrabajo ...] o 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [idtrabajo ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "let arg [arg ...]" +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 ... o kill -l [id_señal]" #: 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 ...]" +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "return [n]" +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] [-N ncars] [-p prompt] [-t tiempo] [-u df] [nombre ...]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "set [--abefhkmnptuvxBCHP] [-o nombre-opci�n] [arg ...]" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "unset [-f] [-v] [nombre ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o nombre-opción] [--] [-] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [nombre[=valor] ...] � export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nombre ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [nombre[=valor] ...] � readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nombre[=valor] ...] ó export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nombre[=valor] ...] ó readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source fichero [argumentos]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". fichero [argumentos]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" -msgstr "test [expresi�n]" +msgstr "test [expresión]" -#: builtins.c:160 +#: builtins.c:162 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 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "trap [-lp] [[arg] id_se�al ...]" +msgstr "trap [-lp] [[arg] id_señal ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] nombre [nombre ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [l�mite]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [límite]" -#: builtins.c:172 +#: builtins.c:174 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:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:182 -msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for NOMBRE [in PALABRAS ... ] ; do �RDENES; done" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" #: builtins.c:184 -msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "for (( exp1; exp2; exp3 )); do �RDENES; done" +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOMBRE [in PALABRAS ... ] ; do ÓRDENES; done" #: builtins.c:186 -msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "select NOMBRE [in PALABRAS ... ;] do �RDENES; done" +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do ÓRDENES; done" #: builtins.c:188 -msgid "time [-p] pipeline" -msgstr "time [-p] tuber�a" +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOMBRE [in PALABRAS ... ;] do ÓRDENES; done" #: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "case PALABRA in [PATR�N [| PATR�N]...) �RDENES ;;]... esac" +msgid "time [-p] pipeline" +msgstr "time [-p] tubería" #: 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" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PALABRA in [PATRÓN [| PATRÓN]...) ÓRDENES ;;]... esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "while �RDENES; do �RDENES; done" +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:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until �RDENES; do �RDENES; done" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while ÓRDENES; do ÓRDENES-2; done" #: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until ÓRDENES; do ÓRDENES-2; done" + +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NOMBRE] orden [redirecciones]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "function nombre { �RDENES ; } � nombre () { �RDENES ; }" +msgstr "function nombre { ÓRDENES ; } o nombre () { ÓRDENES ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" -msgstr "{ �RDENES ; }" +msgstr "{ ÓRDENES ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "id_trabajo [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" -msgstr "(( expresi�n ))" +msgstr "(( expresión ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" -msgstr "[[ expresi�n ]]" +msgstr "[[ expresión ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "variables - Nombres y significados de algunas variables de shell" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | dir" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o] [nombre_opci�n...]" +msgstr "shopt [-pqsu] [-o] [nombre_opción...]" -#: builtins.c:226 +#: builtins.c:228 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o opción] [-A acción] [-G patglob] [-W listapalabras] [-F función] [-C orden] [-X patfiltro] [-P prefijo] [-S sufijo] [nombre ...]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "compopt [-o|+o opci�n] [nombre ...]" +#: builtins.c:235 +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: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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opción] [-DEI] [nombre ...]" #: 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]" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d delim] [-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 +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d delim] [-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 +# no alias -> ningún alias. sv # De acuerdo. cfuga -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2416,48 +2598,48 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" alias returns true unless a NAME is supplied for which no alias has been\n" " defined." msgstr "" -"Define o muestra aliases.\n" +"Define o muestra alias.\n" " \n" -" `alias' sin argumentos muestra la lista de aliases en la forma\n" -" reutilizable `alias NOMBRE=VALOR' en la salida est�ndar.\n" +" Sin argumentos `alias' muestra la lista de alias en el formato\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" +" En caso contrario, 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" +" 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" +" -p\tmuestra todos los alias definidos en un formato reutilizable\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." +" Estado de Salida:\n" +" alias devuelve verdadero a menos que se dé un NOMBRE para el cual\n" +" no se haya definido ningún alias." -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +"Quita cada NOMBRE de la lista de alias definidos.\n" " \n" " Opciones:\n" -" -a\telimina todas las definiciones de alias.\n" +" -a\tquita todas las definiciones de alias.\n" +" \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 +# Corregido. Además, es plural: lee las asignaciones... cfuga +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2469,79 +2651,69 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\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 secuencias de teclas y variables de Readline.\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" +" p.ej., 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" +" -m comb_teclas Usa COMB_TECLAS como la combinación de teclas durante el\n" +" que dure 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" +" -l Lista los nombres de las funciones.\n" +" -P Lista los nombres de las funciones y asignaciones.\n" +" -p Lista las funciones y asignaciones de tal forma que\n" +" se pueda ruutilizar como entrada.\n" +" -S Lista 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" +" -s Lista las secuencias de teclas que invocan macros\n" +" y sus valores en una forma que se pueden reutilizar 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" +" -V Lista los nombres de variables y valores.\n" +" -v Lista los nombres de variables y valores en una\n" +" forma que se pueden reutilizar como entrada.\n" +" -q nombre-función 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" +" Estado de Salida:\n" +" bind devuelve 0 a menos que se presente una opción desconocida o suceda\n" " un error." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2551,15 +2723,15 @@ msgid "" " 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" +"Termina bucles for, while o until.\n" " \n" -" Termina un ciclo FOR, WHILE o UNTIL. Si se especifica N, termina\n" -" N ciclos anidados.\n" +" Termina un bucle FOR, WHILE o UNTIL. Si se especifica N, termina\n" +" N bucles anidados.\n" " \n" -" Estado de salida:\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 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2569,41 +2741,38 @@ msgid "" " 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" +"Reanuda bucles 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" +" Reanuda la siguiente iteración del bucle FOR, WHILE o UNTIL\n" +" circundante. Si se especifica N, reanuda en el N-ésimo bucle 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 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" -"Ejecuta �rdenes internas del shell\n" +"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" +" Ejecuta la ORDEN-INTERNA-SHELL con los argumentos ARGs sin realizar la\n" +" búsqueda interna de órdenes. Esto es útil cuando se desea reimplementar\n" +" una orden interna de la shell como una función de shell, pero se 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 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2621,82 +2790,95 @@ 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" +" \"$linea $subrutina $nombrefichero\"; esta información adicional\n" +" se puede usar para proporcionar 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" +" El valor de EXPR indica cuántos marcos de llamada hay que retroceder\n" +" antes del actual; el marco superior 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." +" 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 +# Corregido en toda la traducción. cfuga +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." msgstr "" -"Cambia el directorio de trabajo del shell.\n" +"Modifica el directorio de trabajo del shell.\n" " \n" -" Cambia el directorio actual a DIR. DIR por defecto es el valor de la\n" +" Modifica 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" +" \n" +" La variable CDPATH define la ruta de búsqueda para 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" +" 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" +" 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 para DIR.\n" " \n" -" La acci�n por defecto es seguir los enlaces simb�licos, como si se\n" +" Opciones:\n" +" -L\tfuerza a seguir los enlaces simbólicos: resuelve los enlaces\n" +" \t\tsimbólicos en DIR después de procesar las instancias de `..'\n" +" -P\tusa la estructura física de directorios sin seguir los enlaces\n" +" \t\tsimbólicos: resuelve los enlaces simbólicos en DIR antes de procesar\n" +" \t\tlas instancias de `..'\n" +" -e\tsi se da la opción -P y el directorio actual de trabajo no se\n" +" \t\tpuede determinar con éxito, termina con un estado diferente de cero.\n" +" \n" +" La acción por defecto es seguir los enlaces simbólicos, como si se\n" " especificara `-L'.\n" +" `..' se procesa quitando la componente del nombre de la ruta inmediatamente\n" +" anterior hasta una barra inclinada o el comienzo de DIR.\n" " \n" -" Estado de salida:\n" -" Devuelve 0 si se cambia el directorio; de otra forma es diferente a cero." +" Estado de Salida:\n" +" Devuelve 0 si se cambia el directorio, y si $PWD está definido como\n" +" correcto cuando se emplee -P; de otra forma es diferente a cero." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2710,15 +2892,15 @@ msgstr "" " 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" +" -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" +" Devuelve 0 a menos que se de una opción inválida o no se pueda leer\n" " el directorio actual." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2732,71 +2914,68 @@ msgstr "" " Sin efecto; la orden no hace nada.\n" " \n" " Estado de Salida:\n" -" Siempre con �xito." +" Siempre correcto." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" -"Devuelve un resultado con �xito.\n" +"Devuelve un resultado correcto.\n" " \n" -" Estado de salida:\n" -" Siempre con �xito." +" Estado de Salida:\n" +" Siempre correcto." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" -"Devuelve un resultado sin �xito.\n" +"Devuelve un resultado incorrecto.\n" " \n" -" Estado de salida:\n" -" Siempre falla." +" Estado de Salida:\n" +" Siempre incorrecto." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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" +"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" +" Ejecuta la ORDEN con ARGumentos, suprimiendo la búsqueda de funciones\n" +" de shell, o muestra información sobre las ORDENes 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" +" -p utiliza un valor predeterminado de RUTA que garantiza que se\n" +" encuentren todas las utilidades comunes\n" +" -v muestra una descripción de la ORDEN similar a la orden\n" +" interna `type'\n" +" -V muestra 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" +" Devuelve el estado de salida de la ORDEN, o fallo si no se encuentra\n" " la ORDEN." -#: builtins.c:476 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2806,17 +2985,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2824,58 +3008,63 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment 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" +" 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" +" -f\trestringe la acción o la información a nombres y definiciones\n" +" \t\tde funciones\n" +" -F\trestringe la información a nombres de funciones únicamente (con\n" +" \t\tnúmero de línea y fichero fuente al depurar)\n" +" -g\tcrea variables globales cuando se usa en una función de shell;\n" +" \t\ten caso contrario, se descarta\n" +" -I\tsi se está creando una variable local, hereda los atributos y\n" +" \t\tel valor de una variable con igual nombre en un ámbito previo\n" +" -p\tmuestra los atributos y el 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 indexadas (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" +" -l\tconvierte el valor de cada NOMBRE a minúsculas en la asignación\n" +" -r\tcrea NOMBREs como de sólo lectura\n" +" -t\tcrea NOMBREs con el atributo `trace'\n" +" -u\tconvierte el valor de cada NOMBRE a mayúsculas en la asignación\n" +" -x\tcrea NOMBREs para exportar\n" " \n" -" Si usa `+' en lugar de `-' desactiva el atributo dado.\n" +" Si se usa `+' en lugar de `-', se desactiva el atributo dado.\n" " \n" -" Las variables con el atributo integer realizan evaluaci�n aritm�tica\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" +" Cuando se usa en una función, `declare' hace locales a los NOMBREs,\n" +" como sucede con la orden `local'. La opción `-g' suprime esta\n" +" conducta.\n" " \n" " Estado de Salida:\n" -" Devuelve con �xito a menos que se de una opci�n inv�lida o\n" -" suceda un error." +" Devuelve correcto a menos que se dé una opción inválida o\n" +" suceda un error de asignación de variable." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Establece valores de variables y atributos.\n" " \n" -" Obsoleto. Consulte `help declare'." +" Sinónimo de `declare'. Vea `help declare'." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2886,26 +3075,27 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, 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" +" 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" +" Las variables locales sólo pueden usarse dentro de funciones; son\n" +" visibles solo 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." +" Devuelve correcto a menos que se dé una opción inválida, suceda\n" +" un error de asignación, o el shell no esté ejecutando una función." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2917,6 +3107,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2924,45 +3115,54 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" -"Escribe argumentos en la salida est�ndar.\n" +"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" " \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 +" -n\tno agrega un carácter de fin de línea\n" +" -e\tactiva la interpretación de los siguientes caracteres de escape de\n" +" \t\tbarra invertida\n" +" -E\tdesactiva explícitamente la interpretación de caracteres de\n" +" \t\tescape de barra invertida\n" +" \n" +" `echo' interpreta los siguientes caracteres de escape de barra invertida:\n" +" \\a\talerta (timbre)\n" +" \\b\tborrado hacia atrás\n" +" \\c\tsuprime toda salida a continuación\n" +" \\e\tcarácter de escape\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\tcarácter cuyo código ASCII es NNN (octal). NNN puede ser\n" +" \t\tde 0 a 3 dígitos octales\n" +" \\xHH\tel de ocho bits cuyo valor es HH (hexadecimal). HH\n" +" \t\tpuede ser de uno o dos dígitos hexadecimales\n" +" \\uHHHH\tcarácter Unicode cuyo valor es el valor hexadecimal HHHH.\n" +" \t\tHHHH puede tener de uno a cuatro dígitos hexadecimales.\n" +" \\UHHHHHHHH carácter Unicode cuyo valor es el valor hexadecimal HHHHHHHH.\n" +" \t\tHHHHHHHH puede tener de uno a ocho dígitos hexadecimales.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a menos que suceda un error de escritura." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2974,17 +3174,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" -"Escribe argumentos en la salida est�ndar.\n" +"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" +" 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\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." +" Estado de Salida:\n" +" Devuelve correcto a menos que suceda un error de escritura." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -3010,41 +3210,37 @@ msgid "" " 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" +"Activa y desactiva las órdenes internas del shell.\n" " \n" -" Activa y desactiva las �rdenes internas del shell. El desactivar le\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" +" -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" +" \t\tdesactivadas\n" +" -p\tmuestra la lista de órdenes internas en una forma reusable\n" +" -s\tmuestra solo los nombres de las órdenes internas `especiales' Posix\n" +" \n" +" Opciones que controlan la carga dinámica:\n" +" -f\tCarga la función interna NOMBRE desde el 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" +" Para usar el `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" +" Devuelve correcto a menos que NOMBRE no sea una orden interna del shell\n" " o suceda un error." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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" @@ -3052,19 +3248,18 @@ msgid "" 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" +" 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." +" 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 +# "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 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -3097,95 +3292,91 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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" +"Decodifica argumentos de opción.\n" "\n" -" Getopts se usa en procedimientos del shell para decodificar par�metros\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" +" 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" +" 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" +" í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" +" 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" +" 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" +" 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" +" 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" +" 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" +" 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" +" Getopts normalmente compara los parámetros de posición, pero si se\n" +" especifican argumentos como valores ARG, se comparan estos en lugar\n" +" lugar de aquellos.\n" " \n" " Estado de Salida:\n" -" Devuelve con �xito si se encuentra una opci�n; falla si se encuentra\n" +" Devuelve correcto si se encuentra una opción; falla si se encuentra\n" " el final de las opciones o sucede un error." -#: builtins.c:668 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" 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" +" especifica la ORDEN, cualquier 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" +" -c\tejecuta la ORDEN en un entorno vacío\n" +" -l\tcoloca un guion 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" +" 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." +" Devuelve éxito a menos que no se encuentre la ORDEN o que suceda un\n" +" error de redirección." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3194,16 +3385,14 @@ msgid "" 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." +" 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\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" @@ -3211,19 +3400,17 @@ msgstr "" " 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 +#: builtins.c:734 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" +" 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" +" -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" @@ -3237,37 +3424,33 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" Returns success or status of executed command; non-zero if an error occurs." msgstr "" -"Muestra o ejecuta �rdenes de la lista de historia.\n" +"Muestra o ejecuta órdenes de la lista de la 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" +" fc se usa para listar o editar y reejecutar órdenes de la lista de la\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" +" -e NOMBRE_E\tselecciona el editor a usar. Por defecto es FCEDIT,\n" +" \t\tdespués EDITOR, después vi\n" +" -l \tlista laslíneas en lugar de editar\n" +" -n\tomite los números de línea al listar\n" +" -r\tinvierte 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" +" 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" +" Un alias útil para usar con esto es r='fc -s', tal que al teclear\n" +" `r cc' ejecuta la última orden que comience con `cc' y al teclear\n" +" `r' reejecuta la última orden.\n" " \n" " Estado de Salida:\n" -" Devuelve con �xito o el estado de la orden ejecutada; si sucede un " -"error\n" +" Devuelve correcto o el estado de la orden ejecutada; si sucede un error,\n" " es diferente de cero." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3280,22 +3463,19 @@ msgid "" 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" +" Ubica el trabajo identificado con IDTRABAJO en primer plano y\n" +" lo convierte en 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." +" El estado de la orden ubicada en primer plano, o falla si sucede un error." -#: builtins.c:753 +#: builtins.c:779 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" +" 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" @@ -3304,59 +3484,58 @@ 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" +" 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" +" Devuelve correcto a menos que el control de trabajos no esté activado o\n" " suceda un error." -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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" +"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" +" 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" +" -d\tolvida la ubicación almacenada de cada NOMBRE\n" +" -l\tmuestra en un formato que se puede reutilizar 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" +" -r\tolvida todas las ubicaciones almacenadas\n" +" -t\tmuestra la ubicación almacenada de cada NOMBRE,\n" +" \t\tcada ubicación precedida del NOMBRE correspondiente\n" +" \t\tsi se 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" +" NOMBRE\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." +" Devuelve correcto a menos que no se encuentre NOMBRE o se proporcione\n" +" una opción inválida." -#: builtins.c:792 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3368,36 +3547,35 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" -"Muestra informaci�n sobre �rdenes internas.\n" +"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" +" 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; en caso contrario, 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" +" -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" +" \t\tcoincida con el PATRÓN\n" " \n" " Argumentos:\n" -" PATR�N\tPatr�n que especifica un t�pico de ayuda\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." +" Devuelve correcto a menos que no se encuentre PATRÓN o se proporcione\n" +" una opción inválida." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3406,61 +3584,67 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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" +"Muestra o manipula la lista de la historia.\n" +" \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" +" -d despl\tborra la entrada de la historia en la posición DESPL. Los\n" +" \t\tdesplazamientos negativos se cuentan hacia atrás desde el final de\n" +" \t\tla lista de historia\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" +" -a\tagrega las líneas de historia 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" +" -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" +" \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" +" 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" +" 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." +" ninguna marca de tiempo de otra forma.\n" +" \n" +" Estado de Salida:\n" +" Devuelve correcto a no ser que se dé una opción inválida u ocurra un error." -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3469,8 +3653,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3486,27 +3670,26 @@ 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" +" esa trabajo. Sin opciones, se muestra el estado de todas 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" +" -l\tmuestra los IDs de los procesos, además de la información normal\n" +" -n\tsolo muestra los procesos que han cambiado de estado desde\n" +" \t\tla última notificación\n" +" -p\tsolo muestra los IDs de los procesos\n" +" -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" +" Si se especifica -x, la ORDEN se ejecuta después de que todas las\n" +" especificaciones de trabajo que aparecen en ARGS se hayan 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" +" Devuelve correcto a menos que se dé 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 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3516,28 +3699,28 @@ msgid "" " 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" +" \t\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" +"Quita 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" +" Quita cada argumento IDTRABAJO de la tabla de trabajos activos. Sin\n" +" ningú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" +" -a\tquita todas los trabajos si no se proporciona IDTRABAJO\n" +" -h\tmarca cada IDTRABAJO para que no se le envíe SIGHUP\n" +" \t\tsi el shell recibe un SIGHUP\n" +" -r\tquita 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." +" Devuelve correcto a menos que se proporcionen una opción o\n" +" un IDTRABAJO inválida." -#: builtins.c:898 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3549,7 +3732,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3558,44 +3742,43 @@ msgid "" " 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" +"Envía una señal a una 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" +" 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" +" -s sig\tSIG es un nombre de señal\n" +" -n sig\tSIG es un número de señal\n" +" -l\tlista los nombres de señales; si hay argumentos a continuación\n" +" \t\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" +" puedan utilizar IDs de trabajo en lugar de IDs de proceso y permite\n" +" matar procesos si se ha alcanzado el límite de procesos que se pueden\n" +" crear.\n" " \n" " Estado de Salida:\n" -" Devuelve con �xito a menos que se de una opci�n inv�lida o suceda un " -"error." +" Devuelve correcto a menos que se dé una opción inválida o suceda un error." -# "a ser evaluada" no est� en espa�ol. sv -# Cierto. �As� est� mejor? cfuga +# "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 +# 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 +#: builtins.c:949 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" +" 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" @@ -3629,140 +3812,144 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" -"Eval�a expresiones aritm�ticas.\n" +"Evalúa expresiones aritméticas.\n" " \n" -" Eval�a cada ARG como una expresi�n aritm�tica. La evaluaci�n se hace\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" +" 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. Los niveles se muestran 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\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 varios bit 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" +" \t&\t\tAND de varios bit\n" +" \t^\t\tXOR de varios bit\n" +" \t|\t\tOR de varios bit\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" +" \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" +" Se permiten las variables de shell como operandos. El nombre\n" +" de la variable se reemplaza por su valor (coercionado a un\n" +" entero de longitud fija) dentro de una expresión. La variable\n" +" no necesita tener activado su atributo entero para emplearse\n" +" en 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" +" 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." +" Estado de Salida:\n" +" Si el último ARGumento se evalúa como 0, ‘let’ devuelve 1; de\n" +" otra forma, ‘let’ devuelve 0." -#: builtins.c:966 -#, fuzzy +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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" +"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" +" Lo predefinido es que el carácter de barra inclinada inversa escape los\n" +" delimitadores de caracteres y las nuevas líneas.\n" " \n" -" Si no se proporciona ning�n NOMBRE, la l�nea le�da se guarda en la\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" +" -a matriz\tasigna las palabras leídas a índices secuenciales de\n" +" \t\tla variable matricial 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\tusa Readline para obtener la línea\n" +" -i texto\tEmplea el TEXTO como el texto inicial para Readline\n" +" -n ncars\tregresa tras leer NCARS caracteres en lugar de\n" +" \t\tesperar una línea nueva, pero honra a un delimitador si\n" +" \t\tse leen menos de NCARS caracteres antes del delimitador\n" +" -N ncars\tdevuelve sólo después de leer exactamente NCARS\n" +" \t\tcaracteres, a menos que se encuentre el fin del fichero\n" +" \t\to expire la lectura, descartando cualquier delimitador\n" +" -p prompt\tsale la cadena PROMPT sin un carácter 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 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\tes el tiempo de expiración por defecto. TIEMPO puede ser un\n" +" \t\tnúmero fraccionario. Si TIEMPO es 0, ‘read’ devuelve correcto\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" +" \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" +" \t\testándar\n" +" \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." +" El código de devolución es cero, a menos que se encuentre un final de\n" +" línea, el tiempo de lectura se agote, o se proporcione un descriptor\n" +" de fichero inválido como el argumento de -u." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3773,18 +3960,16 @@ msgid "" " 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" +"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" +" Causa que una función o un script leído termine con el valor devuelto\n" +" especificado por N. Si se omite N, el estado devuelto es el de la última\n" +" orden ejecutada dentro de la función o script.\n" " \n" " Estado de Salida:\n" -" Devuelve N, o falla si el shell no est� ejecutando una funci�n o un " -"gui�n." +" Devuelve N, o falla si el shell no está ejecutando una función o un script." -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3827,8 +4012,7 @@ msgid "" " 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" +" 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" @@ -3850,9 +4034,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3865,37 +4052,37 @@ msgid "" " 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" +"Establece o borra los valores de las opciones de shell y los parámetros\n" "posicionales.\n" " \n" +" Modifica el valor de los atributos de shell y los parámetros posicionales,\n" +" o muestra los nombres y valores de las variables de shell.\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" +" -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" +" -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" +" -n Lee órdenes pero no las ejecuta.\n" +" -o nombre-opción\n" +" Establece la variable correspondiente a nombre-opción:\n" " allexport igual que -a\n" " braceexpand igual que -B\n" -" emacs usa una interfaz de edici�n de l�nea estilo " -"emacs\n" +" emacs usa una interfaz de edición lineal 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" +" 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" +" permite que haya comentarios en órdenes interactivas\n" " keyword igual que -k\n" " monitor igual que -m\n" " noclobber igual que -C\n" @@ -3906,55 +4093,49 @@ msgstr "" " 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" +" pipefail el valor de retorno de una tubería es el estado\n" +" de la última orden que sale 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" +" posix modifica el comportamiento de bash donde la\n" +" operación por defecto difiere del estándar POSIX\n" +" para que 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" +" 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" +" 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" +" -t Termina después de leer y ejecutar una orden.\n" +" -u Trata las variables sin definir como un error al sustituir.\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" +" 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" +" -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" +" -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" +" -- Asigna cualquier argumento restante a los parámetros posicionales.\n" +" Si no restan argumentos, se desactivan los parámetros posicionales.\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" +" 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" +" 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." +" Devuelve correcto a menos que se proporcione una opción inválida." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3963,9 +4144,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3975,28 +4157,29 @@ msgid "" 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" +" 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" +" -f\ttrata cada NOMBRE como una función de shell\n" " -v\ttrata cada NOMBRE como una variable de shell\n" +" -n\ttrata cada NOMBRE como una referencia de nombre y desasigna\n" +" \t\tla propia variable, no aquella a la que hace referencia\n" " \n" " Sin opciones, unset primero trata de borrar una variable, y si falla,\n" -" trata de borrar una funci�n.\n" +" trata de borrar una función.\n" " \n" -" Algunas variables no se pueden borrar; tambi�n consulte `readonly'.\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." +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" un NOMBRE sea de sólo lectura." -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -4008,25 +4191,24 @@ msgid "" " 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" +"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" +" 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" +" -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." +" Devuelve correcto a menos que se proporcione una opción inválida o que\n" +" NOMBRE sea inválido." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -4038,34 +4220,34 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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" +"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" +" 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 indexada\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" +" -p\tmuestra una lista de todas las variables y funciones de sólo lectura,\n" +" \t\tdependiendo de si se pone o no la opción -f\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." +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" el NOMBRE sea inválido." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -4075,15 +4257,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" -"Desplaza los par�metros posicionales.\n" +"Desplaza los parámetros posicionales.\n" " \n" -" Renombra los par�metros posicionales $N+1,$N+2 ... a $1,$2 ... Si no\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 $#." +" Devuelve correcto a menos que N sea negativo o mayor que $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -4096,18 +4278,18 @@ msgid "" " 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" +"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" +" 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" +" Si se proporciona ARGUMENTOS, se convierten en los parámetros posicionales\n" " cuando se ejecuta el FICHERO.\n" +" \n" " Estado de Salida:\n" -" Devuelve el estado de la �ltima orden ejecutada del FICHERO; falla si\n" +" Devuelve el estado de la última orden ejecutada del FICHERO; falla si\n" " no se puede leer el FICHERO." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4120,27 +4302,29 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" -"Suspende la ejecuci�n del shell.\n" +"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" +" 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" +" -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" +" Devuelve correcto a menos que no esté activo el control de trabajos o\n" " suceda un error." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4164,8 +4348,7 @@ msgid "" " -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 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" @@ -4186,14 +4369,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4209,13 +4394,16 @@ msgid "" " 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" +"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" +" 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" +" de un fichero. Hay también operadores de cadenas, y operadores de\n" +" comparación numérica.\n" +" \n" +" El comportamiento de test depende del número de argumentos. Lea la página\n" +" de manual de bash para la especificación completa.\n" " \n" " Operadores de fichero:\n" " \n" @@ -4224,40 +4412,36 @@ msgstr "" " -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" +" -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 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" +" -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 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" +" 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" +" 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" +" -z CADENA Verdadero si la cadena está vacía.\n" " \n" " -n CADENA\n" -" CADENA Verdadero si la cadena no est� vac�a.\n" +" CADENA Verdadero si la cadena no está vacía.\n" " \n" " CADENA1 = CADENA2\n" " Verdadero si las cadenas son iguales.\n" @@ -4265,46 +4449,48 @@ msgstr "" " Verdadero si las cadenas no son iguales.\n" " CADENA1 < CADENA2\n" " Verdadero si STRING1 se ordena antes que STRING2\n" -" lexicogr�ficamente.\n" +" lexicográficamente.\n" " CADENA1 > CADENA2\n" -" Verdadero si STRING1 se ordena despu�s que STRING2\n" -" lexicogr�ficamente.\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" +" -o OPCIÓN Verdadero si la opción del shell OPCIÓN está activada.\n" +" -v VAR Verdadero si la variable de shell VAR está activada.\n" +" -R VAR Verdadero si la variable VAR está activada y es una\n" +" referencia de nombre\n" " ! EXPR Verdadero si expr es falso.\n" -" EXPR1 -a EXPR2 Verdadero si expr1 Y expr2 are son verdaderas.\n" +" EXPR1 -a EXPR2 Verdadero si expr1 Y expr2 son ambas 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" +" 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" +" 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." +" Devuelve correcto si EXPR evalúa a verdadero; falla si EXPR evalúa a\n" +" falso o se proporciona un argumento inválido." -#: builtins.c:1299 +#: builtins.c:1344 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" +"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." +" Este es un sinónimo para la orden interna \"test\", pero el último\n" +" argumento debe ser un `]' literal, que concuerde con el `[' inicial." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\n" +" Prints the accumulated user and system times for the shell and all of its\n" " child processes.\n" " \n" " Exit Status:\n" @@ -4312,19 +4498,17 @@ msgid "" msgstr "" "Muestra los tiempos de proceso.\n" " \n" -" Muestra los tiempos de usuario y sistema acumulados por el shell y " -"todos\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." +" Estado de Salida:\n" +" Siempre correcto." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -4333,62 +4517,65 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" Returns success unless a SIGSPEC is invalid or an invalid option is given." msgstr "" -"Atrapa se�ales y otros eventos.\n" +"Atrapa señales y otros eventos.\n" " \n" -" Define y activa manejadores a ejecutar cuando el shell recibe se�ales\n" +" Define y activa manejadores para 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" +" 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" +" 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" +" Si una ID_SEÑAL es EXIT (0) se ejecuta la orden ARG al salir del shell.\n" +" Si una ID_SEÑAL es DEBUG, se ejecuta ARG después de cada orden simple.\n" +" Si una ID_SEÑAL es RETURN, se ejecuta ARG cada vez que una función de\n" +" shell o un script ejecutado por las órdenes internas . o source termina\n" +" su ejecución. Una ID_SEÑAL de ERR conlleva que se ejecute ARG cada vez\n" +" que un fallo de una orden provocaría que el shell terminase si la\n" +" opción -e está activada.\n" " \n" -" Si no se proporcionan argumentos, trap muestra la lista de �rdenes\n" -" asociadas con cada se�al.\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" +" -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 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" +" Cada ID_SEÑAL es un nombre de señal en 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" +" \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." +" Devuelve correcto 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 +# palabras que muestra `type -t'. Por esta razón, se dejan en inglés. cfuga +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4397,61 +4584,57 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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." +" 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" +"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" +" Por cada NOMBRE, indica cómo se interpretaría si se utilizara como un\n" +" nombre 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" +" \t\tNOMBRE; incluye aliases, órdenes internas y funciones, si y solo si\n" +" \t\tno se utilizó 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, aun si hay un alias,\n" +" \t\torden interna o función, y devuelve el nombre del fichero en disco\n" +" \t\tque se ejecutaría\n" +" -p\tdevuelve el nombre del fichero en disco que se ejecutaría,\n" +" \t\to nada si `type -t NOMBRE' no devuelve `fichero'\n" +" -t\tsaca una sola palabra, que es una de entre `alias', `keyword',\n" +" \t\t`function', `builtin', `file' o `', si el NOMBRE es un alias,\n" +" \t\tpalabra reservada del shell, función del shell, orden interna del\n" +" \t\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." +" Devuelve correcto si se encuentran todos los NOMBREs; falla si alguno\n" +" no se encuentra." -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -4464,6 +4647,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4475,6 +4659,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4489,53 +4678,56 @@ msgid "" " 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" +"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" +" -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" +" -k\tel número máximo de kcolas ubicadas para este proceso\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" +" -P\tel número máximo de pseudoterminales\n" +" -R\tel tiempo máximo que un proceso de tiempo real puede correr antes de bloquearse\n" +" -T\tel número máximo de hilos\n" +" \n" +" No todas las opciones están disponibles en todas las plataformas.\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" +" 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" +" Estado de Salida:\n" +" Devuelve correcto a menos que se proporcione una opción inválida o suceda\n" " un error." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4552,75 +4744,100 @@ msgid "" " 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" +"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" +" 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" +" 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" +" -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." +" Devuelve correcto a menos que el MODO sea inválido o se proporcione\n" +" una opción inválida." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -"Espera la terminaci�n del trabajo y devuelve el estado de salida.\n" +"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" +" proceso o una especificación de trabajo e informa de su estado de salida.\n" +" Si no se proporciona un ID, espera a todos los procesos hijos 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" +" Si se proporciona la opción -n, espera por un único trabajo de la lista de\n" +" IDs o, si no se ha especificado ningún ID, espera a que termine el\n" +" siguiente trabajo y devuelve su estado de salida.\n" +" \n" +" Si se proporciona la opción -p, el identificador de proceso o trabajo del\n" +" trabajo cuyo estado de salida es devuelto se le asigna a la variable VAR\n" +" designada por el argumento de la opción. La variable se anulará inicialmente\n" +" antes de ninguna otra asignación. Esto es útil únicamente cuando se\n" +" proporciona la opción -n.\n" +" \n" +" Si se proporciona la opción -f y el control de trabajos está activado,\n" +" espera a que termine el ID especificado, en vez de esperar a que cambie de\n" +" estado.\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." +" Devuelve el estado de ID; falla si ID es inválido o se proporciona una\n" +" opción inválida o si proporciona -n y la shell no tiene ningún hijo al que\n" +" esperar." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." msgstr "" -"Espera la terminaci�n del trabajo y devuelve el estado de salida.\n" +"Espera la terminación del proceso 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" +" Espera a cada proceso especificado por un PID y reporta su\n" +" estado de salida. Si no se proporciona un PID, espera a todos los\n" +" procesos hijos activos, y el código de devolución es cero.\n" +" El 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." +" Devuelve el estado del último PID; falla si PID es inválido o se proporciona\n" +" una opción inválida." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4632,17 +4849,17 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Ejecuta �rdenes por cada miembro en una lista.\n" +"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" +" El bucle `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" +" 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." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4658,21 +4875,21 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Aritm�tica para un ciclo.\n" +"Aritmétical de bucle for.\n" " \n" " Equivalente a\n" " \t(( EXP1 ))\n" " \twhile (( EXP2 )); do\n" -" \t\t�RDENES\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" +" EXP1, EXP2, y EXP3 son expresiones aritméticas. Si se omite\n" +" cualquiera de ellas, se comporta como si se evaluara a 1.\n" " \n" " Estado de Salida:\n" -" Devuelve el estado de la �ltima orden ejecutada." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4691,25 +4908,25 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Selecciona palabras de una lista y ejecuta �rdenes.\n" +"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" +" 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" +" 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." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4724,19 +4941,19 @@ msgid "" " 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" +"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" +" 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" +" 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." +" El estado de devolución es el estado de devolución de la TUBERÍA." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4746,29 +4963,24 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Ejecuta �rdenes en base a la coincidencia de patrones.\n" +"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" +" 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." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1563 +#: builtins.c:1631 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" +" 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" +" `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" @@ -4776,57 +4988,55 @@ msgid "" 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" +" 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 del bloque entero es el estado saliente\n" +" 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." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1580 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +"Ejecuta órdenes mientras una prueba sea correcta.\n" " \n" -" Expande y ejecuta �RDENES mientras la orden final en las �RDENES\n" -" `while' tenga un estado de salida de cero.\n" +" Expande y ejecuta ÓRDENES-2 mientras la orden final en ÓRDENES\n" +" tenga un estado de salida de cero.\n" " \n" " Estado de Salida:\n" -" Devuelve el estado de la �ltima orden ejecutada." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +"Ejecuta órdenes mientras una prueba sea correcta.\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" +" Expande y ejecuta ÓRDENES-2 mientras la orden final en ÓRDENES\n" +" tenga un estado de salida que no sea cero.\n" " \n" " Estado de Salida:\n" -" Devuelve el estado de la �ltima orden ejecutada." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4836,44 +5046,42 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." 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" +" Ejecuta la ORDEN asíncronamente, con la salida y la entrada estándar\n" +" de la orden conectadas 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\n" +" NOMBRE en el shell en ejecución. El nombre por defecto es\n" +" \"COPROC\".\n" " \n" " Estado de Salida:\n" -" Devuelve el estado de salida de la ORDEN." +" La orden «coproc» devuelve un estado de salida de 0." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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" +"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" +" Crea una función de shell llamada NOMBRE. Cuando se invoca como una\n" +" orden simple, NOMBRE ejecuta ORDENes en el contexto del shell\n" +" que lo llamó. Cuando se invoca NOMBRE, los argumentos se pasan a la\n" +" funció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" +" Devuelve correcto a menos que NOMBRE sea de sólo lectura." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4883,15 +5091,15 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Agrupa �rdenes como una unidad.\n" +"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" +" Ejecuta un conjunto de órdenes en un grupo. Esta es una\n" +" forma de redirigir un conjunto completo de órdenes.\n" " \n" " Estado de Salida:\n" -" Devuelve el estado de la �ltima orden ejecutada." +" Devuelve el estado de la última orden ejecutada." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4908,42 +5116,39 @@ msgstr "" " \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 nombre de trabajo o un número de trabajo. Un `&' a continuación\n" +" de IDTRABAJO coloca a el 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 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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" +"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" +" Se evalúa 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." +" Devuelve 1 si la EXPRESIÓN evalúa a 0; devuelve 0 en caso contrario." -#: builtins.c:1671 +#: builtins.c:1739 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" +" 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" @@ -4963,31 +5168,29 @@ msgid "" 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" +" 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" +" ( EXPRESIÓN )\tDevuelve el valor de la EXPRESIÓN\n" +" ! EXPRESIÓN\t\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" +" 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" +" 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" +" 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." +" 0 o 1 dependiendo del valor de la EXPRESIÓN." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -5042,37 +5245,37 @@ msgid "" msgstr "" "Nombres de variables de shell comunes y su uso.\n" " \n" -" BASH_VERSION\tInformaci�n de versi�n para este Bash.\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\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\tde órdenes.\n" +" HISTFILESIZE\t El 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" +" HISTSIZE\t El número máximo de líneas de historia que un shell\n" +" \t\ten 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" +" HOSTNAME\tEl nombre del anfitrión actual.\n" +" HOSTTYPE\tEl tipo de CPU bajo el cual se ejecuta esta versión\n" +" \t\tde Bash.\n" +" IGNOREEOF\tControla la acción del shell al recibir un carácter\n" +" \t\tFDL como la única entrada. Si está definida, entonces su\n" +" \t\tvalor es el número de caracteres FDL 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" +" 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" +" \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" @@ -5081,28 +5284,28 @@ msgstr "" " 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" +" 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 +" auto_resume\tSi no es nulo significa que una palabra de orden\n" +" \t\tque aparece en una línea por sí sola se busca primero en la lista\n" +" \t\tactual de trabajos detenidos. Si se encuentra ahí, esetrabajo\n" +" \t\tse coloca en primer plano. Un valor `exact' significa que la\n" +" \t\tpalabra de orden debe coincidir exactamente con una\n" +" \t\torden de la lista de trabajos detenidos. Un valor\n" +" \t\t`substring' significa que la palabra de orden debe coincidir\n" +" \t\tcon una subcadena del trabajo. Cualquier otro valor significa\n" +" \t\tque la 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 carácter de\n" +" \t\tsustitución de historia, generalmente `!'. El segundo es el\n" +" \t\tcarácter de `sustitución rápida', generalmente `^'. El tercero\n" +" \n" +" \t\tes el carácter `comentario de historia', generalmente `#'.\n" +" HISTIGNORE\tUna lista separada por dos puntos de patrones\n" +" \t\tutilizados para decidir qué órdenes se deben guardar en\n" +" \t\tel listado histórico.\n" + +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -5112,19 +5315,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5134,34 +5337,34 @@ msgid "" 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" +" Agrega un directorio por la parte superior de la pila de directorios\n" +" o rota la pila, haciendo que el nuevo elemento superior de la pila sea el\n" " directorio de trabajo actual. Sin argumentos, intercambia\n" -" los dos directorios del tope.\n" +" los dos directorios de la parte superior.\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" +" \t\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\tRota la pila para que el N-ésimo directorio (contando\n" +" \t\tdesde la izquierda de la lista mostrada por `dirs', comenzando\n" +" \t\tdesde cero) esté en la parte superior.\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\tRota la pila para que el N-ésimo directorio (contando desde\n" +" \t\tla derecha de la lista mostrada por `dirs', comenzando\n" +" \t\tdesde cero) esté en la parte superior.\n" " \n" -" dir\tagrega DIR a la pila de directorios en el tope,\n" -" \thaci�ndolo el nuevo directorio de trabajo actual.\n" +" dir\tAgrega DIR la pila de directorios por la parte superior, haciendo\n" +" \t\tde él 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." +" Devuelve correcto a menos que se proporcione un argumento\n" +" inválido o falle el cambio de directorio." -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5170,16 +5373,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5190,32 +5393,32 @@ 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" +" borra el directorio del tope de la pila, y cambia al nuevo\n" +" 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\tSuprime el cambio normal de directorio cuando se borran\n" +" \t\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\tBorra la N-ésima entrada contando desde la izquierda de\n" +" \t\tla lista mostrada por `dirs', comenzando por cero. Por\n" +" \t\tejemplo: `popd +0' borra el primer directorio, `popd +1'\n" +" \t\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\tBorra la N-ésima entrada contando desde la derecha de\n" +" \t\tla lista mostrada por `dirs', comenzando por cero. Por\n" +" \t\tejemplo: `popd -0' borra el último directorio, `popd -1'\n" +" \t\tel penúltimo.\n" " \n" -" La orden interna `dirs' muestra el contenido de la pila.\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." +" Devuelve correcto a menos que se proporcione un\n" +" argumento inválido o falle el cambio de directorio." -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5226,19 +5429,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5250,35 +5453,33 @@ msgstr "" " 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" +" \t\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" +" \t\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" +" Argumentos:\n" +" +N\tmuestra la N-ésima entrada contando desde\n" +" \t\tla izquierda de la lista mostrada por dirs cuando se invoca sin\n" +" \t\topciones, empezando 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\tmuestra la N-ésima entrada contando desde la izquierda de la\n" +" \t\tlista mostrada por dirs cuando se invoca sin opciones, empezando\n" +" \t\tdesde cero.\n" " \n" " Estado de Salida:\n" -" Devuelve con �xito, a menos que se proporcione una opci�n inv�lida o\n" +" Devuelve correcto, a menos que se proporcione una opción inválida o\n" " suceda un error." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5293,22 +5494,24 @@ msgid "" 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" +" Cambia la configuración de cada opción de shell NOMBRE_OPCIÓN. Sin\n" +" ninguna opción como argumento, muestra cada NOMBRE_OPCIÓN\n" +" proporcionado o todas las opciones de shell si no se especifica\n" +" ningún NOMBRE_OPCIÓN, con una indicación de si está activa o no\n" +" cada una.\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" +" -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" +" -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." +" Devuelve correcto 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 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5316,106 +5519,125 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\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" +" \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" +" 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" +" Además de las especificaciones de formato estándar descritas en\n" " printf(1) y printf(3), printf interpreta:\n" +" \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" +" %q\tentrecomilla el argumento de tal forma que se pueda reutilizar\n" +" \t\tcomo entrada del shell.\n" +" %Q\tigual que %q, pero aplica la precisión al argumento sin\n" +" \t\tentrecomillar antes de entrecomillarlo\n" +" %(fmt)T muestra la cadena fecha hora resultante de usar FMT como\n" +" una cadena de formato para strftime(3)\n" +" \n" +" El formato se reutiliza según sea necesario para consumir todos los\n" +" argumentos. Si hay menos argumentos de los que el formato requiere,\n" +" las especificaciones de formato adicionales se comportan como si un valor\n" +" cero o una cadena nula, lo que sea apropiado, se hubiera proporcionado.\n" +" \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." +" Devuelve correcto 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 +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\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" +"Especifica cuántos argumentos deben ser completados por Readline.\n" " \n" -" Por cada NOMBRE, especifica cu�ntos argumentos se deben completar. Si\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" +" 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" +" \t\treusable\n" +" -r\tborra una especificación de completado para cada NOMBRE o,\n" +" \t\tsi no se proporcionan NOMBREs, todas las especificaciones\n" +" \t\tde completado\n" +" -D\taplica los completados y acciones por defecto para las órdenes\n" +" \t\tsin ninguna especificación de completado definida\n" +" -E\taplica los completados y acciones para órdenes \"vacías\" --\n" +" \t\tcuando se intenta completar en una línea en blanco\n" +" -I\taplica los completados a acciones a la palabra incial (habitualmente\n" +" \t\tla orden)\n" +" \n" +" Cuando se intenta el completado, las acciones se aplican en el orden\n" +" en que se listan las opciones de letra mayúscula antes indicadas. Si se\n" +" proporcionan varias opciones, la opción -D tiene precedencia sobre -E y,\n" +" ambas, sobre -I.\n" " \n" " Estado de Salida:\n" -" Devuelve con �xito a menos que se proporcione una opci�n inv�lida o\n" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" " suceda un error." -#: builtins.c:1923 +#: builtins.c:2004 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" +" completions. If the optional WORD argument is supplied, matches against\n" " WORD are generated.\n" " \n" " Exit Status:\n" @@ -5423,30 +5645,27 @@ msgid "" msgstr "" "Muestra los posibles complementos dependiendo de las opciones.\n" " \n" -" Sirve para usarse desde una funci�n de shell que genere complementos\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" +" Devuelve correcto a menos que se proporcione una opción inválida o\n" " suceda un error." -#: builtins.c:1938 -#, fuzzy +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5465,2982 +5684,121 @@ 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" +" proporcionan NOMBREs, el completado actualmente en ejecución. Si no\n" +" se proporcionan OPCIONes, muestra las opciones de completado para\n" +" cada NOMBRE o la especificación de completado actual.\n" +" \n" " Opciones:\n" -" \t-o opci�n\tEstablece la opci�n de completado OPCI�N\n" -" \t\tpara cada NOMBRE\n" +" \t-o opción\tEstablece la opción de completado OPCIÓN para cada NOMBRE\n" +" \t-D\t\tCambia las opciones para el completado de orden \"por defecto\"\n" +" \t-E\t\tCambia las opciones para el completado de orden \"vacía\"\n" +" \t-I\t\tCambia las opciones para el completado en la palabra inicial\n" " \n" -" Si usa `+o' en lugar de `-o' desactiva la opci�n especificada.\n" +" Si se 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" +" 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, se debe llamar a ‘compopt’ desde una\n" +" función que genere completados actualmente y se modifican las opciones\n" +" para ese generador de completados actualmente 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." +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" NOMBRE no tenga una especificación de completado definida." -#: builtins.c:1968 -#, fuzzy +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" 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" +"Lee líneas de un fichero y las guarda en una variable de matriz indexada.\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" +" Lee líneas de la entrada estándar y las guarda en la variable de matriz\n" +" indexada MATRIZ, o desde el descriptor de fichero DF si se proporciona\n" +" la opció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" +" -d delim\tUtiliza DELIM para finalizar las líneas en lugar de nueva línea\n" +" -n cuenta\tCopia hasta CUENTA líneas. Si CUENTA es 0, se copian todas\n" +" -O origen\tComienza a asignar a MATRIZ en el índice ORIGEN. El\n" +" \t\t\tíndice por defecto es 0.\n" +" -s cuenta\tDescarta las primeras CUENTA líneas leídas.\n" +" -t\tBorra el DELIM final de cada línea leída (nueva línea por defecto).\n" +" -u df\tLee líneas del descriptor de fichero DF en lugar de la\n" +" \t\t\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" +" \t\t\tllamada a LLAMADA.\n" " \n" " Argumentos:\n" -" MATRIZ\t\tNombre de variable de matriz a usar para guardar datos.\n" +" MATRIZ\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" +" 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" +" 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." +" Devuelve correcto a menos que se proporcione una opción inválida o\n" +" la MATRIZ sea de sólo lectura o no sea una matriz indexada." -#: builtins.c:2001 +#: builtins.c:2086 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" +"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" +" Sinónimo de `mapfile'." -#~ 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 "%s: invalid associative array key" +#~ msgstr "%s: clave de matriz asociativa no válida" #~ 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" +#~ "Returns the context of the current subroutine call.\n" #~ " \n" -#~ " The flags are:\n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Devuelve el contexto de la llamada a subrutina actual.\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 " -#~ msgstr "" -#~ "con cada n�mero de se�al. ID_SE�AL es un nombre de se�al en " - -#~ 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" +#~ " Sin EXPR, devuelve " -#~ 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 "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: el proceso %5ld (%s) en the_pipeline" -#~ msgid "not each is set." -#~ msgstr "o no activar cada una." +#~ msgid "Unknown Signal #" +#~ msgstr "Señal Desconocida #" diff --git a/po/et.gmo b/po/et.gmo index 779307f..ac47880 100644 Binary files a/po/et.gmo and b/po/et.gmo differ diff --git a/po/et.po b/po/et.po index 2fbdb4b..80c092e 100644 --- a/po/et.po +++ b/po/et.po @@ -6,292 +6,328 @@ msgid "" msgstr "" "Project-Id-Version: bash 3.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-30 08:25-0500\n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" "PO-Revision-Date: 2006-11-11 16:38+0200\n" "Last-Translator: Toomas Soome \n" "Language-Team: Estonian \n" +"Language: et\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8-bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "vigane massiivi indeks" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" +msgid "%s: removing nameref attribute" msgstr "" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s: vigane tegevuse nimi" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: mitte-numbrilisele indeksile ei saa omistada" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" msgstr "" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: ei saa luua: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: esimine mitte-t�hemik s�mbol pole `\"'" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "sulgev `%c' puudub %s sees" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: puudub eraldav koolon" -#: builtins/alias.def:132 +#: bashline.c:4733 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': ei saa lahti siduda" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 #, fuzzy, c-format msgid "`%s': invalid alias name" msgstr "%s: vigane tegevuse nimi" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "`%s': tundmatu funktsiooni nimi" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s ei ole seotud �hegi klahviga.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s saab kasutada l�bi " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': ei saa lahti siduda" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "" -#: builtins/break.def:137 +#: builtins/break.def:139 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 +#: builtins/caller.def:136 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" +" 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." msgstr "" -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME pole seatud" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "liiga palju argumente" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "teist kataloogi pole" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD pole seatud" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "" -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, fuzzy, c-format msgid "warning: " msgstr "%s: hoiatus: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: v�ti n�uab argumenti" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: n�utakse numbrilist argumenti" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: ei leitud" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: vigane v�ti" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: vigane v�tme nimi" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "`%s': ei ole lubatud identifikaator" -#: builtins/common.c:238 +#: builtins/common.c:240 #, fuzzy msgid "invalid octal number" msgstr "vigane signaali number" -#: builtins/common.c:240 +#: builtins/common.c:242 #, fuzzy msgid "invalid hex number" msgstr "vigane number" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "vigane number" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: vigane signaali spetsifikatsioon" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: mittemuudetav muutuja" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: ei saa eemaldada" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s on piiridest v�ljas" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s on piiridest v�ljas" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: sellist t��d pole" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: t��kontroll puudub" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "t��kontroll puudub" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: piiratud" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "piiratud" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: ei ole sisek�sk" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "kirjutamise viga: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" msgstr "" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: segane t��" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ei saa eemaldada: %s on ainult lugemiseks" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ei saa eemaldada" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: vigane tegevuse nimi" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "" @@ -304,121 +340,156 @@ msgstr "hoiatus: v 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "saab kasutada ainult funktsioonis" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "v�tit `-f' ei saa funktsiooni loomiseks kasutada" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: funktsioon ei ole muudetav" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "%s: masiivi muutujaid ei saa nii kustutada" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" msgstr "" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "d�naamilist laadimist et saa kasutada" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "jagatud objekti %s ei saa avada: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" msgstr "%s puudub jagatud objektis %s: %s" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: pole d�naamiliselt laetud" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: pole d�naamiliselt laetud" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: on kataloog" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: ei ole tavaline fail" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: kahendfaili ei �nnestu k�ivitada" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: ei saa k�ivitada: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "pole login shell: kasutage `exit'" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Teil on peatatud t�id.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, fuzzy, c-format msgid "There are running jobs.\n" msgstr "Teil on peatatud t�id.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "k�sku ei ole" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "" @@ -433,39 +504,44 @@ msgstr "%s: lubamatu v msgid "%s: option requires an argument -- %c\n" msgstr "%s: v�ti n�uab argumenti -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, fuzzy, c-format msgid "hits\tcommand\n" msgstr "viimane k�sklus: %s\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" msgstr[0] "" msgstr[1] "" -#: builtins/help.def:168 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." msgstr "" -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: ei saa avada: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -477,15 +553,21 @@ msgid "" "\n" msgstr "" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: vigane v�tme nimi" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "" @@ -499,94 +581,114 @@ msgstr "%s: vigane teenus" msgid "no other options allowed with `-x'" msgstr "" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Tundmatu viga" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "oodati avaldist" -#: builtins/mapfile.def:165 +#: builtins/mapfile.def:180 #, fuzzy, c-format msgid "%s: not an indexed array" msgstr "%s: pole massiiv" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, fuzzy, c-format msgid "%s: invalid line count" msgstr "%s: vigane v�ti" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, fuzzy, c-format msgid "%s: invalid array origin" msgstr "%s: vigane v�ti" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, fuzzy, c-format msgid "%s: invalid callback quantum" msgstr "%s: vigane tegevuse nimi" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 #, fuzzy msgid "empty array variable name" msgstr "%s: pole massiiv" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: vigane signaali spetsifikatsioon" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, fuzzy, c-format msgid "warning: %s: %s" msgstr "%s: hoiatus: " -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "teist kataloogi pole" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: vigane number" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -610,7 +712,7 @@ msgid "" "\tdirs when invoked without options, starting with zero." msgstr "" -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -635,7 +737,7 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -656,53 +758,48 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "viga lugemisel: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: pole massiiv" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: ei ole funktsioon" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: ei saa eemaldada" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "shift arv" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "" @@ -711,457 +808,544 @@ msgstr "" msgid "filename argument required" msgstr "" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: faili ei ole" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "peatamine ei �nnestu" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "login shelli ei saa peatada" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s on shelli v�tmes�na\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s: on funktsioon\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s on shelli sisek�sk\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s on shelli sisek�sk\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s on %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "`%c': halb k�sklus" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: ei �nnestu lugeda piirangut: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: ei �nnestu muuta piirangut: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "kaheksandnumber" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" msgstr "" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr "" -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "viimane k�sklus: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Katkestan..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "%s: hoiatus: " + +#: error.c:488 msgid "unknown command error" msgstr "tundmatu viga k�sus" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" msgstr "%s: sidumata muutuja" -#: eval.c:181 -#, c-format -msgid "timed out waiting for input: auto-logout\n" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" msgstr "" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" msgstr "" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 #, fuzzy msgid "pipe error" msgstr "kirjutamise viga: %s" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "%s: piiratud: k�skudes ei saa kasutada s�mboleid `/'" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: k�sku ei ole" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: kahendfaili ei �nnestu k�ivitada" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: halb interpretaator" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kahendfaili ei �nnestu k�ivitada" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s on shelli sisek�sk\n" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "avaldise rekursioon on liiga s�gav" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "s�ntaksi viga avaldises" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "�ritati omistada mitte-muutujale" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "s�ntaksi viga avaldises" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "nulliga jagamine" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "eksponent on v�iksem kui 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "puudub `)'" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "s�ntaksi viga: oodati operandi" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "s�ntaksi viga: vigane aritmeetiline operaator" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "vigane aritmeetiline baas" -#: expr.c:1280 +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: vigane v�ti" + +#: expr.c:1603 msgid "value too great for base" msgstr "v��rtus on baasiks liiga suur" -#: expr.c:1329 +#: expr.c:1652 #, fuzzy, c-format msgid "%s: expression error\n" msgstr "%s: oodati t�isarvude avaldist" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: vanemkataloogidele ei ole juurdep��su" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "" -#: input.c:258 +#: input.c:266 #, c-format msgid "cannot allocate new file descriptor for bash input from fd %d" msgstr "" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" msgstr "" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" +msgid "forked pid %d appears in running job %d" +msgstr "" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" msgstr "" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" msgstr "" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: pid puudub" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr "" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" msgstr "" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: t�� %d on peatatud" -#: jobs.c:2829 +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: sellist t��d pole" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: t�� on l�petatud" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: t�� %d on juba taustal" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" -#: jobs.c:3508 +#: jobs.c:4307 #, fuzzy, c-format msgid "%s: line %d: " msgstr "%s: hoiatus: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr "" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 #, fuzzy msgid "unknown" msgstr "%s: tundmatu masin" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" msgstr "" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" msgstr "" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" msgstr "" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "vigane baas" @@ -1180,261 +1364,300 @@ msgstr "%s: vigane teenus" msgid "%s: bad network path specification" msgstr "" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" msgstr "" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" msgstr "" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" msgstr "" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" msgstr "" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Teil on kiri kaustas $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Teil on uus kiri kaustas $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Kiri kaustas %s on loetud\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "s�ntaksi viga: n�utakse aritmeetilist avaldist" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "s�ntaksi viga: ootamatu `;'" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "s�ntaksi viga: `((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" msgstr "" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" msgstr "" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "s�ntaksi viga tingimuslikus avaldises" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "ootamatu m�rk `%s', oodati `)'" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "oodati `)'" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "s�ntaksi viga kohal `%s'" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "s�ntaksi viga: ootamatu failil�pp" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "s�ntaksi viga" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "K�suinterpretaatorist v�ljumiseks kasutage \"%s\".\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" msgstr "" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "faili deskriptor on piiridest v�ljas" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: segane �mbersuunamine" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: fail on olemas, ei kirjuta �le" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: piiratud: v�ljundit ei saa �mber suunata" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" msgstr "" -#: redir.c:184 +#: redir.c:223 #, fuzzy, c-format msgid "%s: cannot assign fd to variable" msgstr "$%s: sedasi ei saa omistada" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "viga �mbersuunamisel: fd duplikaadi loomine ei �nnestu" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "/tmp puudub, palun looge see!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp peab olema kataloogi nimi" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: vigane v�ti" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: on kataloog" + +#: shell.c:1907 msgid "I have no name!" msgstr "Mul ei ole nime!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1443,39 +1666,50 @@ 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 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU pikad v�tmed:\n" -#: shell.c:1800 +#: shell.c:2068 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" +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD 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 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s v�i -o v�ti\n" -#: shell.c:1822 +#: shell.c:2094 #, c-format msgid "Type `%s -c \"help set\"' for more information about shell options.\n" msgstr "" -#: shell.c:1823 +#: shell.c:2095 #, c-format msgid "Type `%s -c help' for more information about shell builtin commands.\n" msgstr "" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "Vigadest teatamiseks kasutage k�sku `bashbug'.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: vigane operatsioon" @@ -1542,9 +1776,8 @@ msgid "Alarm clock" msgstr "" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "piiratud" +msgstr "" #: siglist.c:115 msgid "Urgent IO condition" @@ -1642,598 +1875,622 @@ msgstr "" msgid "Information request" msgstr "" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: vigane v�ti" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "%s: vigane tegevuse nimi" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameeter on null v�i pole seatud" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parameeter on null v�i pole seatud" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: halb asendus" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: sedasi ei saa omistada" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" -#: subst.c:7839 +#: subst.c:10795 #, fuzzy, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "sulgev `%c' puudub %s sees" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "ei leitud: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "oodati argumenti" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: oodati t�isarvude avaldist" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "oodati `)'" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: eeldati binaarset operaatorit" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: eeldati unaarset operaatorit" + +#: test.c:896 msgid "missing `]'" msgstr "puudub `]'" -#: trap.c:203 +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "s�ntaksi viga: ootamatu `;'" + +#: trap.c:220 msgid "invalid signal number" msgstr "vigane signaali number" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: vigane signaal %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "" -#: variables.c:748 +#: variables.c:838 #, 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 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "make_local_variable: praegune skoop pole funktsiooni kontekst" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "all_local_variables: praegune skoop pole funktsiooni kontekst" -#: variables.c:3376 +#: variables.c:4757 #, fuzzy, c-format msgid "%s has null exportstr" msgstr "%s: parameeter on null v�i pole seatud" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" msgstr "" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: pole global_variables kontekst" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" msgstr "" -#: variables.c:4678 +#: variables.c:6400 #, fuzzy, c-format msgid "%s: %s: cannot open as FILE" msgstr "%s: ei saa avada: %s" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" msgstr "" -#: version.c:46 +#: variables.c:6450 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s on piiridest v�ljas" + +#: version.c:46 version2.c:46 #, fuzzy -msgid "Copyright (C) 2009 Free Software Foundation, Inc." +msgid "Copyright (C) 2022 Free Software Foundation, Inc." msgstr "Autori�igus � 2006 Free Software Foundation, Inc.\n" -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." msgstr "" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." 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 \n" -msgstr "" - -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "" -#: xmalloc.c:93 +#: xmalloc.c:95 #, fuzzy, c-format msgid "%s: cannot allocate %lu bytes" msgstr "%s: ei saa luua: %s" -#: xmalloc.c:163 +#: xmalloc.c:165 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" msgstr "" -#: xmalloc.c:165 +#: xmalloc.c:167 #, fuzzy, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" msgstr "%s: ei saa luua: %s" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" msgstr "" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" msgstr "" -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" - #: builtins.c:66 -msgid "pwd [-LP]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" 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 ...]" +msgid "pwd [-LP]" msgstr "" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" +msgid "command [-pVv] command [arg ...]" msgstr "" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" msgstr "" #: builtins.c:80 +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "" + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "" -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "" -#: builtins.c:90 -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" - #: builtins.c:92 -msgid "eval [arg ...]" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "" #: builtins.c:94 -msgid "getopts optstring name [arg]" +msgid "eval [arg ...]" msgstr "" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" +msgid "getopts optstring name [arg ...]" msgstr "" #: builtins.c:98 -msgid "exit [n]" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" msgstr "" #: builtins.c:100 +msgid "exit [n]" +msgstr "" + +#: builtins.c:102 msgid "logout [n]" msgstr "" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" msgstr "" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" msgstr "" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" msgstr "" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" msgstr "" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" msgstr "" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" msgstr "" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "" -#: builtins.c:136 +#: builtins.c:138 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 ...]" +msgid "return [n]" msgstr "" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" msgstr "" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" +msgid "unset [-f] [-v] [-n] [name ...]" msgstr "" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" msgstr "" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "" + +#: builtins.c:150 #, fuzzy msgid "shift [n]" msgstr "shift arv" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "" -#: builtins.c:152 +#: builtins.c:154 #, fuzzy msgid ". filename [arguments]" msgstr "liiga palju argumente" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "" -#: builtins.c:158 -msgid "test [expr]" -msgstr "" - #: builtins.c:160 -msgid "[ arg... ]" +msgid "test [expr]" msgstr "" #: builtins.c:162 -msgid "times" +msgid "[ arg... ]" msgstr "" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" msgstr "" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "" -#: builtins.c:175 -msgid "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" msgstr "" -#: builtins.c:179 -msgid "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" msgstr "" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "" -#: builtins.c:192 +#: builtins.c:194 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" +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgid "coproc [NAME] command [redirections]" msgstr "" #: builtins.c:202 -msgid "{ COMMANDS ; }" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "" #: builtins.c:204 -msgid "job_spec [&]" +msgid "{ COMMANDS ; }" msgstr "" #: builtins.c:206 +msgid "job_spec [&]" +msgstr "" + +#: builtins.c:208 #, fuzzy msgid "(( expression ))" msgstr "oodati avaldist" -#: builtins.c:208 +#: builtins.c:210 #, fuzzy msgid "[[ expression ]]" msgstr "oodati avaldist" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" msgstr "" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 ...]" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" msgstr "" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2245,7 +2502,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2253,17 +2510,17 @@ msgid "" " defined." msgstr "" -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2297,12 +2554,15 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2313,7 +2573,7 @@ msgid "" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2324,7 +2584,7 @@ msgid "" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2335,10 +2595,10 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2354,7 +2614,7 @@ msgid "" " is invalid." msgstr "" -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2377,23 +2637,35 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2403,7 +2675,7 @@ msgid "" " cannot be read." msgstr "" -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2413,7 +2685,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2421,7 +2693,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2429,7 +2701,7 @@ msgid "" " Always fails." msgstr "" -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2439,16 +2711,16 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2458,17 +2730,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2478,20 +2755,21 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2502,15 +2780,17 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2522,6 +2802,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2529,15 +2810,21 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2550,7 +2837,7 @@ msgid "" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2577,7 +2864,7 @@ msgid "" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2589,7 +2876,7 @@ msgid "" " Returns exit status of command or success if command is null." msgstr "" -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2622,15 +2909,15 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2641,8 +2928,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2653,7 +2940,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -2661,7 +2948,7 @@ msgid "" " is that of the last command executed." msgstr "" -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2670,7 +2957,7 @@ msgid "" " in a login shell." msgstr "" -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2700,7 +2987,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2712,7 +2999,7 @@ msgid "" " Status of command placed in foreground, or failure if an error occurs." msgstr "" -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2726,7 +3013,7 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -2735,22 +3022,22 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2762,17 +3049,17 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying 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 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2781,23 +3068,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -2806,7 +3094,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2815,8 +3103,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2830,7 +3118,7 @@ msgid "" " If -x is used, returns the exit status of COMMAND." msgstr "" -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2840,14 +3128,14 @@ msgid "" " 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" +" \t\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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2859,7 +3147,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2869,7 +3158,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -2911,10 +3200,10 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" -#: builtins.c:966 +#: builtins.c:994 msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -2925,7 +3214,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -2935,34 +3226,38 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -2974,7 +3269,7 @@ msgid "" " Returns N, or failure if the shell is not executing a function or script." msgstr "" -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3040,9 +3335,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3056,7 +3355,7 @@ msgid "" " Returns success unless an invalid option is given." msgstr "" -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3065,6 +3364,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3076,7 +3377,7 @@ msgid "" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3095,7 +3396,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3107,7 +3408,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3115,7 +3417,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3126,7 +3428,7 @@ msgid "" " Returns success unless N is negative or greater than $#." msgstr "" -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3140,7 +3442,7 @@ msgid "" " FILENAME cannot be read." msgstr "" -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3154,14 +3456,17 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3215,6 +3520,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3231,7 +3539,7 @@ msgid "" " false or an invalid argument is given." msgstr "" -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -3239,7 +3547,7 @@ msgid "" " be a literal `]', to match the opening `['." msgstr "" -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3251,7 +3559,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3267,7 +3575,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3287,7 +3603,7 @@ msgid "" "given." msgstr "" -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3296,18 +3612,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3317,7 +3633,7 @@ msgid "" "found." msgstr "" -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -3335,6 +3651,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3346,6 +3663,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3361,7 +3683,7 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3379,38 +3701,54 @@ msgid "" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3423,7 +3761,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3440,7 +3778,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3460,7 +3798,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3476,7 +3814,7 @@ msgid "" " The return status is the return status of PIPELINE." msgstr "" -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3487,7 +3825,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3508,29 +3846,31 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1580 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3540,10 +3880,10 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3557,7 +3897,7 @@ msgid "" " Returns success unless NAME is readonly." msgstr "" -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3568,7 +3908,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3582,18 +3922,18 @@ msgid "" " Returns the status of the resumed job." msgstr "" -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3621,7 +3961,7 @@ msgid "" " 0 or 1 depending on value of EXPRESSION." msgstr "" -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3675,7 +4015,7 @@ msgid "" " \t\tcommands should be saved on the history list.\n" msgstr "" -#: builtins.c:1754 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3685,19 +4025,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3706,7 +4046,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3715,16 +4055,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3733,7 +4073,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3744,32 +4084,31 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3783,7 +4122,7 @@ msgid "" " given or OPTNAME is disabled." msgstr "" -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3800,12 +4139,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -3813,7 +4163,7 @@ msgid "" " error occurs." msgstr "" -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -3826,21 +4176,25 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -3853,13 +4207,13 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -3868,6 +4222,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3884,7 +4239,7 @@ msgid "" " have a completion specification defined." msgstr "" -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -3895,24 +4250,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -3924,18 +4281,26 @@ msgid "" " not an indexed array." msgstr "" -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +#, fuzzy, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: vigane tegevuse nimi" + +#, fuzzy +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "Tagastab jooksva alamprotseduuri konteksti." + #~ msgid " " #~ msgstr " " -#~ msgid "%s: invalid number" -#~ msgstr "%s: vigane number" - #~ msgid "freed" #~ msgstr "vabastatud" diff --git a/po/fi.gmo b/po/fi.gmo index c0ee173..7f4b31d 100644 Binary files a/po/fi.gmo and b/po/fi.gmo differ diff --git a/po/fi.po b/po/fi.po index 29c4ea3..166fe27 100644 --- a/po/fi.po +++ b/po/fi.po @@ -9,296 +9,344 @@ msgid "" msgstr "" "Project-Id-Version: bash-4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-30 08:25-0500\n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" "PO-Revision-Date: 2009-05-09 15:13+0300\n" "Last-Translator: Pekka Niemi \n" "Language-Team: Finnish \n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 0.3\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "virheellinen taulukkoindeksi" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: indeksoitua taulukkoa ei voi muuttaa assosiatiiviseksi" +msgid "%s: removing nameref attribute" +msgstr "" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: virheellinen assosiatiivinen indeksi" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: indeksoitua taulukkoa ei voi muuttaa assosiatiiviseksi" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: ei voida sijoittaa epänumeeriseen indeksiin" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: ei voida luoda: %s" -#: bashline.c:3457 +#: bashline.c:4479 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 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: ensimmäinen ei-tyhjä merkki ei ole ”\"”" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "ei loppumerkkiä ”%c” rivissä %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: puuttuva kaksoispiste-erotin" -#: builtins/alias.def:132 +#: bashline.c:4733 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "”%s”: ei voida irrottaa" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 #, fuzzy, c-format msgid "`%s': invalid alias name" msgstr "”%s”: virheellinen näppäinkartan nimi" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "rivieditointi ei ole käytössä" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "”%s”: virheellinen näppäinkartan nimi" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "”%s”: tuntematon funktio" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, 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 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s voidaan käynnistää näppäinkomennolla " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "”%s”: ei voida irrottaa" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "toistolaskuri" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "voidaan käyttää vain ”for”-, ”while”- tai ”until”-silmukoissa" -#: builtins/caller.def:133 +#: builtins/caller.def:136 +#, fuzzy 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" +" 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." 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/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME-ympäristömuuttujaa ei ole asetettu" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "liian monta argumenttia" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "ei toista hakemistoa" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD-ympäristömuuttujaa ei ole asetettu" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "rivi %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "varoitus: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: valitsin vaatii argumentin" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: vaaditaan numeerinen argumentti" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: ei löytynyt" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: virheellinen valitsin" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: virheellinen valitsimen nimi" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "”%s”: virheellinen tunniste" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "virheellinen oktaaliluku" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "virheellinen heksadesimaaliluku" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "virheellinen luku" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: virheellinen signaalimääritys" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: kirjoitussuojattu muuttuja" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: ei voida poistaa" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s rajojen ulkopuolella" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argumentti" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s rajojen ulkopuolella" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: työtä ei löydy" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: ei työnohjausta" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "ei työnohjausta" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: rajoitettu" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "rajoitettu" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: ei ole komentotulkin sisäänrakennettu komento" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "kirjoitusvirhe: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "pääteasetuksia asetettaessa tapahtui virhe: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "pääteasetuksia luettaessa tapahtui virhe: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: ei ole yksiselitteinen työtunniste" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ei voida poistaa: kirjoitussuojattu %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ei voida poistaa" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: virheellinen toiminnon nimi" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: ei lavennusmääritystä" @@ -311,121 +359,156 @@ msgstr "varoitus: -F -valitsin ei ehkä toimi odotetusti" msgid "warning: -C option may not work as you expect" msgstr "varoitus: -C -valitsin ei ehkä toimi odotetusti" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "tällä hetkellä komennon lavennusfunktiota ei suoriteta" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "voidaan käyttää ainoastaan funktiossa" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "”-f”:ää ei voida käyttää funktioiden luomiseen" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: kirjoitussuojattu funktio" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "%s: taulukkomuuttujia ei voi tuhota näin" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynaaminen lataus ei ole käytettävissä" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "jaettua objektia %s ei voida avata: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ei dynaamisesti ladattu" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: ei dynaamisesti ladattu" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: on hakemisto" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: ei tavallinen tiedosto" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: binääritiedostoa ei voida suorittaa" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: ei voida suorittaa: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "lopetus\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "ei ole sisäänkirjautumiskomentotulkki: käytä komentoa ”exit”" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Töitä on pysäytettynä.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Töitä on ajossa.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "ei löytynyt komentoa" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "komentohistoriamääritys" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "nykyinen" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "työ %d käynnistyi ilman työnohjausta" @@ -440,28 +523,33 @@ msgstr "%s: virheellinen valitsin – %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: valitsin vaatii argumentin – %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hajautus kytketty pois" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: hajautustaulukko on tyhjä\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "osumia\tkomento\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." @@ -469,12 +557,12 @@ msgstr "" "Ohjeita kohteelle ”%s” ei löydy. Kokeile ”help help”, ”man -k %s” tai \n" "”info %s”." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: ei voida avata: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -495,15 +583,21 @@ msgstr "" "Asteriski (*) nimen vieressä tarkoittaa, että komennon käyttö on estetty.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "valitsimista -anrw voidaan käyttää vain yhtä" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "sijainti komentohistoriassa" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: virheellinen valitsimen nimi" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: historiaviittaus epäonnistui" @@ -517,93 +611,113 @@ msgstr "%s: inlib epäonnistui" msgid "no other options allowed with `-x'" msgstr "”-x”:n kanssa ei voida käyttää muita valitsimia" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "%s: argumenttien pitää olla prosessi- tai työtunnisteita" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Tuntematon virhe" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "odotettiin lauseketta" -#: builtins/mapfile.def:165 +#: builtins/mapfile.def:180 #, fuzzy, c-format msgid "%s: not an indexed array" msgstr "%s: ei ole taulukkomuuttuja" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: virheellinen tiedostokahvamääritys" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: virheellinen tiedostokahva: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: virheellinen rivimäärä" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: virheellinen taulukkoindeksi" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: virheellinen paluukutsumäärä" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "tyhjä taulukkomuuttujan nimi" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "vaaditaan tukea taulukkomuuttujille" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "”%s”: puuttuva muotoilumerkki" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: virheellinen aikakatkaisumääritys" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "”%c”: virheellinen muotoilumerkki" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "varoitus: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "\\x:stä puuttuu heksadesimaalinumero" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, fuzzy, c-format +msgid "missing unicode digit for \\%c" +msgstr "\\x:stä puuttuu heksadesimaalinumero" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "ei toista hakemistoa" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: virheellinen rajoitusargumentti" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "hakemistopino on tyhjä" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "hakemistopinon indeksi" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -645,7 +759,7 @@ msgstr "" " -N\tNäyttää listan N:nnen alkion (laskien oikealta dirs-komennon\n" " \tantamasta listasta). Valitsimetta kutsuttaessa aloitetaan nollasta." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -687,7 +801,7 @@ msgstr "" " \n" " Sisäänrakennettu ”dirs”-komento näyttää hakemistopinon." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -725,55 +839,50 @@ msgstr "" " \n" " Sisäänrakennettu ”dirs”-komento näyttää hakemistopinon sisällön." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: virheellinen aikakatkaisumääritys" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "lukuvirhe: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: ei ole taulukkomuuttuja" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: ei ole funktio" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: ei voida poistaa" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "siirtolaskuri" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 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 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: virheellinen komentotulkin valitsimen nimi" @@ -782,397 +891,477 @@ msgstr "%s: virheellinen komentotulkin valitsimen nimi" msgid "filename argument required" msgstr "vaaditaan tiedostonimi argumentiksi" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: tiedostoa ei löytynyt" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "ei voida keskeyttää" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "sisäänkirjautumiskomentotulkkia ei voi keskeyttää" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s on aliasioitu ”%s”\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s on komentotulkin avainsana\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s on funktio\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s on komentotulkin sisäänrakennettu komento\n" + +#: builtins/type.def:301 #, 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 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s on %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s on hajautettu (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: virheellinen rajoitusargumentti" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "”%c”: virheellinen komento" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: rajoitusta ei saada: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "rajoitus" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: rajoitusta ei voida muokata: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "oktaaliluku" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "”%c”: virheellinen symbolisen tilan operaattori" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " rivi " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "viimeinen komento: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Keskeytetään..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "varoitus: " + +#: error.c:488 msgid "unknown command error" msgstr "tuntematon komentovirhe" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "virheellinen komentotyyppi" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "virheellinen liittäjä" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "virheellinen hyppy" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aaikakatkaisu: automaattinen uloskirjautuminen\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "AJAN MUOTOMÄÄRITYS: ”%c”: virheellinen muotoilumerkki" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "putkitusvirhe" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "%s: rajoitettu: komentojen nimissä ei voi käyttää ”/”-merkkiä" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: komentoa ei löydy" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: binääritiedostoa ei voida suorittaa" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: virheellinen tulkki" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: binääritiedostoa ei voida suorittaa" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s on komentotulkin sisäänrakennettu komento\n" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "tiedostokahvaa %d ei voida kopioida kahvaksi %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "lausekkeen rekursiomäärä ylittyi" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "rekursiopinon alivuoto" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "lauseoppivirhe lausekkeessa" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "yritettiin sijoittaa objektiin, joka ei ole muuttuja" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "lauseoppivirhe lausekkeessa" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "jako nollalla" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "bugi: virheellinen sijoitusavainsana" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "”:”:ttä odotettiin ehdolliseen lausekkeeseen" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "eksponentti on pienempi kuin 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "odotettiin muuttujaa ++:n tai --:n jälkeen" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "puuttuva ”)”" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "lauseoppivirhe: odotettiin operandia" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "lauseoppivirhe: virheellinen aritmetiikkaoperaattori" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (virheellinen avainsana on ”%s”)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "virheellinen lukujärjestelmä" -#: expr.c:1280 +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: virheellinen rivimäärä" + +#: expr.c:1603 msgid "value too great for base" msgstr "liian iso luku lukujärjestelmälle" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: virhe lausekkeessa\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: ylempiin hakemistoihin ei päästä" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "nodelay-tilaa ei voida asettaa tiedostokahvalle %d" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp-putki" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 #, 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 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: prosessitunnusta ei löydy." -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signaali %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Valmis" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Pysäytetty" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Pysäytetty(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Ajossa" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Valmis(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Poistui %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Tuntematon tila" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(luotiin core-tiedosto)" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (työhakemisto: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "lapsiprosessin setpgid (%ld => %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: Prosessista %ld ei ole tietoja" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: työ %d on pysäytetty" -#: jobs.c:2829 +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: työtä ei löydy" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: työ on lopetettu" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: työ %d on jo taustalla" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: rivi %d:" -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (luotiin core-tiedosto)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(työhakemisto nyt: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp epäonnistui" -#: jobs.c:3639 +#: jobs.c:4434 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: vuonhallinta" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: vuonhallinta" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "päätteen prosessiryhmää ei voitu asettaa (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "tällä komentotulkilla ei ole työnohjausta" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: varmistus epäonnistui: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1181,58 +1370,68 @@ msgstr "" "\r\n" "malloc: %s:%d: varmistus epäonnistui\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "tuntematon" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: vapaitten listan lohko ylikirjoittui" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: kutsuttiin argumenttina jo vapautettu lohko" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: kutsuttuun argumenttina varaamaton lohko" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free: alku- ja loppulohkojen koot eroavat" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: kutsuargumentti on varaamaton lohko" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "realloc: alku- ja loppulohkojen koot eroavat" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "virheellinen lukujärjestelmä" @@ -1251,263 +1450,302 @@ msgstr "%s: virheellinen palvelu" msgid "%s: bad network path specification" msgstr "%s: virheellinen verkkopolkumääritys" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "verkko-operaatioita ei ole tuettu" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" msgstr "" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" msgstr "" -#: locale.c:247 +#: locale.c:294 #, fuzzy, c-format msgid "setlocale: %s: cannot change locale (%s)" msgstr "xrealloc: %s:%d: ei voida varata %lu tavua" -#: locale.c:249 +#: locale.c:296 #, fuzzy, c-format msgid "setlocale: %s: cannot change locale (%s): %s" msgstr "xrealloc: %s:%d: ei voida varata %lu tavua" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Sinulle on postia laatikossa $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Sinulla on uutta postia laatikossa $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Posti laatikossa %s on luettu\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "lauseoppivirhe: vaaditaan aritmeettinen lauseke" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "lauseoppivirhe: odottamaton ”;”" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "lauseoppivirhe: ”((%s))”" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: virheellinen käskytyyppi %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" msgstr "make_redirection: uudelleenohjaus ”%d” rajojen ulkopuolella" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "odottamaton EOF (tiedostonloppu) odotettaessa sulkevaa ”%c”" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "odottamaton EOF odotettaessa ”]]”" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "lauseoppivirhe ehdollisessa lausekkeessa: odottamaton avainsana ”%s”" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "lauseoppivirhe ehdollisessa lausekkeessa" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "odottamaton avainsana ”%s”, odotettiin ”)”" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "odototettiin ”)”" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "odottamaton argumentti ”%s” ehdolliselle unaariselle operaattorille" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "odottamaton argumentti ehdolliselle unaariselle operaattorille" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "" "odottamaton avainsana ”%s”, odotettiin ehdollista binääristä operaattoria" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "odotettiin ehdollista binääristä operaattoria" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "odottamaton argumentti ”%s” ehdolliselle binääriselle operaattorille" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "odottamaton argumentti ehdolliselle binääriselle operaattorille" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "odottamaton avainsana ”%c” ehdollisessa komennossa" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "odottamaton avainsana ”%s” ehdollisessa komennossa" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "odottamaton avainsana %d ehdollisessa komennossa" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "lauseoppivirhe lähellä odottamatonta avainsanaa ”%s”" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "lauseoppivirhe lähellä ”%s”" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "lauseoppivirhe: odottamaton tiedostonloppu" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "lauseoppivirhe" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Kirjoita ”%s” poistuaksesi komentotulkista.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "Odottamaton EOF odotettaessa vastaavaa ”)”" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "täydennys: funktiota ”%s” ei löytynyt" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: tyhjä COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: virheellinen yhdistin ”%d”" -#: print_cmd.c:363 +#: print_cmd.c:375 #, fuzzy, c-format msgid "xtrace_set: %d: invalid file descriptor" msgstr "%d: virheellinen tiedostokahva: %s" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: ”%c”: virheellinen muotoilumerkki" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "tiedostokahva rajojen ulkopuolella" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: epämääräinen uudelleenohjaus" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: olemassa olevan tiedoston päälle ei voida kirjoittaa" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: rajoitettu: tulostusta ei voida uudelleenohjata" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" msgstr "here-dokumentille ei voida luoda väliaikaistiedostoa: %s" -#: redir.c:184 +#: redir.c:223 #, fuzzy, c-format msgid "%s: cannot assign fd to variable" msgstr "%s: listaa ei voida sijoittaa taulukon alkioon" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "/dev/(tcp|udp)/host/port-muotoa ei tueta ilman tietoliikennettä" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "virhe uudelleenohjauksessa: tiedostokahvaa ei voida kopioida" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "/tmp-hakemistoa ei löytynyt, luo se!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp:n pitää olla kelvollinen hakemiston nimi" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: virheellinen valitsin" -#: shell.c:1651 +#: shell.c:1343 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nodelay-tilaa ei voida asettaa tiedostokahvalle %d" + +#: shell.c:1354 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nodelay-tilaa ei voida asettaa tiedostokahvalle %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: on hakemisto" + +#: shell.c:1907 msgid "I have no name!" msgstr "Minulla ei ole nimeä!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, versio %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1516,44 +1754,55 @@ msgstr "" "Käyttö:\t%s[GNU:n pitkä valitsin] [valitsin] ...\n" "\t%s [GNU:n pitkä valitsin] [valitsin] komentotiedosto ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU:n pitkät valitsimet:\n" -#: shell.c:1800 +#: shell.c:2068 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" +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD 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 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s tai -o -valitsin\n" -#: shell.c:1822 +#: shell.c:2094 #, 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 +#: shell.c:2095 #, 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 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "Raportoi virheet komennolla ”bashbug”.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: virheellinen operaatio" @@ -1718,138 +1967,169 @@ msgstr "HFT-äänisekvenssi on valmistunut" msgid "Information request" msgstr "Informaatiopyyntö" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Tuntematon signaali #" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Tuntematon signaali #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "virheellinen korvaus: ei sulkevaa ”%s” jonossa %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" msgstr "%s: listaa ei voida sijoittaa taulukon alkioon" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "putkea ei voida luoda prosessin korvaamista varten" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "lapsiprosessia ei voida luoda prosessin korvaamista varten" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "nimettyä putkea %s ei voida avata lukemista varten" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "nimettyä putkea %s ei voida avata kirjoitusta varten" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "nimettyä putkea %s ei voida kopioida tiedostokahvaksi %d" -#: subst.c:5063 +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "virheellinen korvaus: ei sulkevaa ”`” jonossa %s" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "putkea ei voida luoda komennon korvaamista varten" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "ei voida luoda lapsiprosessia komennon korvaamista varten" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute: putkea ei voida kopioida tiedostokahvaksi 1" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: virheellinen rivimäärä" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "%s: virheellinen toiminnon nimi" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametria ei ole tai sitä ei ole asetettu" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parametria ei ole tai sitä ei ole asetettu" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: alimerkkijonolauseke < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: virheellinen korvaus" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: ei voida asettaa näin" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "virheellinen korvaus: ei sulkevaa ”`” jonossa %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "ei osumia: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "odotettiin argumenttia" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: odotettiin kokonaislukuilmaisua" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "odotettiin ”)”" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: odotettiin binääristä operaattoria" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: odotettiin unaarista operaattoria" + +#: test.c:896 msgid "missing `]'" msgstr "puuttuva ”]”" -#: trap.c:203 +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "lauseoppivirhe: odottamaton ”;”" + +#: trap.c:220 msgid "invalid signal number" msgstr "virheellinen signaalinumero" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 #, 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 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" @@ -1857,73 +2137,94 @@ msgstr "" "run_pending_traps: signaalikäsittelijä on SIG_DFL, lähetän %d (%s) uudelleen " "itselleni" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: virheellinen signaali %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "virhe tuotaessa ”%s”:n funktiomääritystä" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "komentotulkkitaso (%d) liian korkea, palautetaan 1:ksi" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "make_local_variable: ei funktiokontekstia nykytilassa" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "all_local_variables: ei funktiokontekstia nykytilassa" -#: variables.c:3376 +#: variables.c:4757 #, fuzzy, c-format msgid "%s has null exportstr" msgstr "%s: parametria ei ole tai sitä ei ole asetettu" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "virheellinen merkki %d %s:n exportstr:ssä" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "ei =:ä kohteen %s exportstr:ssä" -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: ei global_variables-kontekstia" -#: variables.c:3922 +#: variables.c:5410 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 +#: variables.c:6400 #, fuzzy, c-format msgid "%s: %s: cannot open as FILE" msgstr "%s: ei voida avata: %s" -#: variables.c:4683 +#: variables.c:6405 #, 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." +#: variables.c:6450 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s rajojen ulkopuolella" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." msgstr "Copyright © 2009 Free Software Foundation, Inc." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1931,179 +2232,163 @@ msgstr "" "Lisenssi GPLv3+: GNU GPL versio 3 tai uudempi \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." 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" +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." 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 \n" -msgstr "" -"Lisenssi GPLv3+: GNU GPL versio 3 tai uudempi \n" - -#: xmalloc.c:91 +#: xmalloc.c:93 #, 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 +#: xmalloc.c:95 #, fuzzy, c-format msgid "%s: cannot allocate %lu bytes" msgstr "xmalloc: ei voitu varata %lu tavua" -#: xmalloc.c:163 +#: xmalloc.c:165 #, 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 +#: xmalloc.c:167 #, fuzzy, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" msgstr "xmalloc: %s:%d: ei voida varata %lu tavua" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [nimi[=arvo] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] nimi [nimi ...]" -#: builtins.c:51 +#: builtins.c:53 +#, fuzzy msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [sisäänrakennettu komento [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" msgstr "caller [expr]" -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" msgstr "cd [-L|-P] [dir]" -#: builtins.c:66 +#: builtins.c:68 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 +#: builtins.c:76 msgid "command [-pVv] command [arg ...]" msgstr "command [-pVv] komento [arg ...]" -#: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" msgstr "declare [-aAfFilrtux] [-p] [niemi[=arvo] ...]" -#: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" msgstr "typeset [-aAfFilrtux] [-p] nimi[=arvo] ..." -#: builtins.c:80 +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [valitsin] nimi[=arvo] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f tiedosto] [nimi ...]" -#: builtins.c:92 +#: builtins.c:94 msgid "eval [arg ...]" msgstr "eval [arg ...]" -#: builtins.c:94 -msgid "getopts optstring name [arg]" +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" msgstr "getopts valitsinmerkit nimi [arg]" -#: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" msgstr "exec [-cl] [-a nimi] [komento [argumentit ...]] [uudelleenohjaus ...]" -#: builtins.c:98 +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "lopetus [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [työtunniste]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [työtunniste ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p polku] [-dt] [nimi ...]" -#: builtins.c:117 +#: builtins.c:119 #, fuzzy msgid "help [-dms] [pattern ...]" msgstr "help [-ds] [malline ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" @@ -2111,15 +2396,16 @@ msgstr "" "history [-c] [-d erotus] [n] tai history -anrw [tiedosto] or history -ps arg " "[arg...]" -#: builtins.c:125 +#: builtins.c:127 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 ...]" +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" msgstr "disown [-h] [-ar] [työtunniste ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" @@ -2127,11 +2413,11 @@ msgstr "" "kill [-s signaalitunniste | -n signaalinumero | -signaalimäärite] prosessi-" "id | työtunniste ... tai kill -l [signaalimäärite]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let arg [arg ...]" -#: builtins.c:136 +#: builtins.c:138 #, fuzzy msgid "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " @@ -2140,99 +2426,101 @@ msgstr "" "read [-ers] [-a taulukko] [-d erotin] [-i teksti] [-n lkm] [-p kehote] [-t " "aikakatkaisu] [-u tiedostokahva] [nimi ...]" -#: builtins.c:138 +#: builtins.c:140 msgid "return [n]" msgstr "return [n]" -#: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" msgstr "set [--abefhkmnptuvxBCHP] [-o valitsinnimi] [arg ...]" -#: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" msgstr "unset [-f] [-v] [nimi ...]" -#: builtins.c:144 +#: builtins.c:146 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" +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" msgstr "readonly [-af] [nimi[=arvo] ...] tai readonly -p" -#: builtins.c:148 +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source tiedosto [argumentit]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". tiedosto [argumentit]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [lauseke]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[arg] signaalimäärite ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] nimi [nimi ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" msgstr "ulimit [-SHacdefilmnpqrstuvx] [raja]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [tila]" -#: builtins.c:175 -msgid "wait [id]" +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" msgstr "wait [id]" -#: builtins.c:179 -msgid "wait [pid]" +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" msgstr "wait [pid]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NIMI [in ARVOT ... ] ; do KOMENNOT; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( lause1; lause2; lause3 )); do KOMENNOT; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NIMI [in ARVOT ... ;] do KOMENNOT; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] komentoputki" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case SANA in [MALLINE [| MALLINE]...) KOMENNOT ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2240,105 +2528,111 @@ msgstr "" "if KOMENNOT; then KOMENNOT; [ elif KOMENNOT; then KOMENNOT; ]... [ else " "KOMENNOT; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while KOMENNOT; do KOMENNOT; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until KOMENNOT; do KOMENNOT; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NIMI] komento [uudelleenohjaukset]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function nimi { KOMENNOT ; } tai nimi () { KOMENNOT ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ KOMENNOT ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "työtunniste [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( lauseke ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ lauseke ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "muuttujat - eräiden komentotulkin muuttujien nimet ja merkitykset" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | hakemisto]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [valitsinnimi ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v muuttuja] muoto [argumentit]" -#: builtins.c:229 +#: builtins.c:231 #, fuzzy msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 +#: builtins.c:235 +#, fuzzy msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 +#: builtins.c:239 #, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" +msgid "compopt [-o|+o option] [-DEI] [name ...]" msgstr "compopt [-o|+o valitsin] [nimi ...]" -#: builtins.c:240 +#: builtins.c:242 +#, fuzzy msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-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 +#: builtins.c:244 +#, fuzzy msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-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 +#: builtins.c:256 +#, fuzzy msgid "" "Define or display aliases.\n" " \n" @@ -2350,7 +2644,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2374,12 +2668,13 @@ msgstr "" " alias palauttaa arvon tosi, mikäli parametriksi on annettu NIMI jonka\n" " aliasta ei ole määritelty." -#: builtins.c:276 +#: builtins.c:278 +#, fuzzy msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" @@ -2391,7 +2686,8 @@ msgstr "" " Palauttaa arvon tosi paitsi jos NIMI-nimistä aliasta\n" " ei ole." -#: builtins.c:289 +#: builtins.c:291 +#, fuzzy msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2425,6 +2721,9 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." @@ -2467,7 +2766,7 @@ msgstr "" "tapahtuu \n" " virhe." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2485,7 +2784,7 @@ msgstr "" " Paluuarvo:\n" " Paluuarvo on 0 jollei N ole suurempi tai yhtäsuuri kuin 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2503,7 +2802,8 @@ msgstr "" " Paluuarvo:\n" " Paluuarvo on 0 ellei N ole suurempi tai yhtäsuuri kuin 1." -#: builtins.c:350 +#: builtins.c:354 +#, fuzzy msgid "" "Execute shell builtins.\n" " \n" @@ -2514,7 +2814,7 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" "Suorita komentotulkin sisäänrakennettuja komentoja.\n" " \n" @@ -2526,7 +2826,7 @@ msgstr "" " Palauttaa KOMENNON paluuarvon, tai epätoden jos KOMENTO ei ole\n" " sisäänrakennettu komento." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2555,7 +2855,8 @@ msgstr "" " Palauttaa 0 ellei komentotulkki ole funktion ulkopuolella tai parametri\n" " on virheellinen." -#: builtins.c:383 +#: builtins.c:387 +#, fuzzy msgid "" "Change the shell working directory.\n" " \n" @@ -2578,14 +2879,26 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" "Vaihtaa työhakemistoa.\n" " \n" @@ -2614,13 +2927,14 @@ msgstr "" " Palauttaa 0, jos hakemistoa vaihdettiin, nollasta poikkeavan muussa \n" " tapauksessa." -#: builtins.c:411 +#: builtins.c:425 +#, fuzzy 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2642,7 +2956,7 @@ msgstr "" " Palauttaa 0 ellei ole annettu virheellistä valitsinta tai nykyistä \n" " hakemistoa ei voida lukea." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2658,7 +2972,7 @@ msgstr "" " Paluuarvo:\n" " Onnistuu aina." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2670,7 +2984,7 @@ msgstr "" " Paluuarvo:\n" " Onnistuu aina." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2682,7 +2996,8 @@ msgstr "" " Paluuarvo:\n" " Epäonnistuu aina." -#: builtins.c:457 +#: builtins.c:471 +#, fuzzy msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2692,10 +3007,10 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2717,7 +3032,8 @@ msgstr "" " Palauttaa KOMENNON paluuarvon, tai epäonnistumisen jos KOMENTOA ei \n" " löytynyt." -#: builtins.c:476 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2727,17 +3043,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2747,10 +3068,11 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" "Asettaa muuttujien arvot ja attribuutit.\n" " \n" @@ -2788,17 +3110,19 @@ msgstr "" "tule \n" " virhetilannetta." -#: builtins.c:512 +#: builtins.c:532 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Asettaa muuttujien arvoja ja attribuutteja.\n" " \n" " Vanhentunut. Katso ”help declare”." -#: builtins.c:520 +#: builtins.c:540 +#, fuzzy msgid "" "Define local variables.\n" " \n" @@ -2809,8 +3133,8 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" "Määrittele paikallisia muuttujia.\n" " \n" @@ -2825,11 +3149,14 @@ msgstr "" " Palauttaa onnistuneen, ellei ole annettu virheellistä valitsinta,\n" " tapahtuu virhe tai komentotulkki ei ole suorittamassa funktiota." -#: builtins.c:537 +#: builtins.c:557 +#, fuzzy msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2841,6 +3168,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2848,9 +3176,15 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." @@ -2884,7 +3218,7 @@ msgstr "" " Paluuarvo:\n" " Palauttaa onnistuneen ellei tapahdu virhettä." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2906,7 +3240,7 @@ msgstr "" " Paluuarvo:\n" " Palauttaa onnistuneen ellei tapahdu virhettä." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2960,7 +3294,7 @@ msgstr "" "sisäänrakennettu\n" " komento tai tapahtuu virhe." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2979,7 +3313,8 @@ msgstr "" " Paluuarvo:\n" " Palauttaa komennon paluuarvon tai onnistuneen jos komento on tyhjä." -#: builtins.c:626 +#: builtins.c:652 +#, fuzzy msgid "" "Parse option arguments.\n" " \n" @@ -3012,8 +3347,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3059,7 +3394,8 @@ msgstr "" "valitsimet\n" " loppuvat tai tapahtuu virhe." -#: builtins.c:668 +#: builtins.c:694 +#, fuzzy msgid "" "Replace the shell with the given command.\n" " \n" @@ -3070,8 +3406,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3101,7 +3437,7 @@ msgstr "" "uudelleenohjauksessa\n" " tapahtuu virhe." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3113,7 +3449,7 @@ msgstr "" " Poistuu komentotulkista paluuarvolla N. Jos N:ää ei anneta, paluuarvo\n" " on viimeisen komennon paluuarvo." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -3126,7 +3462,7 @@ msgstr "" " Poistuu sisäänkirjautumiskomentotulkista paluuarvolla N. Palauttaa\n" " virheen jos ei olla sisäänkirjautumiskomentotulkissa." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -3180,7 +3516,7 @@ msgstr "" " Palauttaa onnistuneen tai suoritetun komennon paluuarvon; nollasta\n" " poikkeava virhetilanteessa." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3201,7 +3537,7 @@ msgstr "" " Paluuarvo:\n" " Edustalle tuodun työn paluuarvo, tai epäonnistuminen virhetilanteessa." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -3227,7 +3563,8 @@ msgstr "" "tapahtuu\n" " virhe." -#: builtins.c:767 +#: builtins.c:793 +#, fuzzy msgid "" "Remember or display program locations.\n" " \n" @@ -3236,15 +3573,15 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3272,7 +3609,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos NIMEÄ ei löydy tai on annettu " "virheellinen valitsin." -#: builtins.c:792 +#: builtins.c:818 +#, fuzzy msgid "" "Display information about builtin commands.\n" " \n" @@ -3284,10 +3622,10 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " @@ -3313,7 +3651,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos MALLINETTA ei löydy tai valitsin on\n" " virheellinen." -#: builtins.c:816 +#: builtins.c:842 +#, fuzzy msgid "" "Display or manipulate the history list.\n" " \n" @@ -3322,23 +3661,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3378,7 +3718,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin " "tai tapahtuu virhe." -#: builtins.c:852 +#: builtins.c:879 +#, fuzzy msgid "" "Display status of jobs.\n" " \n" @@ -3387,8 +3728,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3422,7 +3763,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai \n" " tapahtuu virhe. Jos -x:ää on käytetty, palauttaa KOMENNON paluuarvon." -#: builtins.c:879 +#: builtins.c:906 +#, fuzzy msgid "" "Remove jobs from current shell.\n" " \n" @@ -3432,7 +3774,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3454,7 +3796,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos jokin valitsin tai TYÖTUNNISTE on " "virheellinen." -#: builtins.c:898 +#: builtins.c:925 +#, fuzzy msgid "" "Send a signal to a job.\n" " \n" @@ -3466,7 +3809,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3496,7 +3840,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai " "tapahtuu virhe." -#: builtins.c:921 +#: builtins.c:949 +#, fuzzy msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3538,7 +3883,7 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" "Laskee matemaattiset lausekkeet.\n" " \n" @@ -3584,7 +3929,7 @@ msgstr "" " Jos viimeinen ARGUMENTTI evaluoituu nollaksi, let palauttaa 1, muussa\n" " tapauksessa 0." -#: builtins.c:966 +#: builtins.c:994 #, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" @@ -3596,7 +3941,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3606,30 +3953,34 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" "Lukee rivin vakiosyötteestä ja jakaa sen kenttiin.\n" @@ -3671,7 +4022,7 @@ msgstr "" " Paluuarvo on nolla, ellei törmätä tiedoston loppumiseen, aikarajan\n" " ylitykseen tai mikäli -u:lle annetaan virheellinen tiedostokahva." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3695,7 +4046,8 @@ msgstr "" "suorittamassa\n" " funktiota tai skriptiä." -#: builtins.c:1022 +#: builtins.c:1055 +#, fuzzy msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3761,9 +4113,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3861,7 +4217,8 @@ msgstr "" " Paluuarvo:\n" " Palauttaa onnistumisen ellei ole annettu virheellistä valitsinta." -#: builtins.c:1104 +#: builtins.c:1140 +#, fuzzy msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3870,6 +4227,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3897,7 +4256,7 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" " tai NIMI on kirjoitussuojattu." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3931,7 +4290,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" " tai NIMI on virheellinen." -#: builtins.c:1143 +#: builtins.c:1181 +#, fuzzy msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3943,7 +4303,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3968,7 +4329,7 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" " tai NIMI on virheellinen." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3987,7 +4348,7 @@ msgstr "" " Paluuarvo:\n" " Palauttaa onnistuneen ellei N ole negatiivinen tai suurempi kuin $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -4012,7 +4373,7 @@ msgstr "" "epäonnistuu\n" " mikäli TIEDOSTOA ei voida lukea." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4039,14 +4400,18 @@ msgstr "" "tapahtuu\n" " virhe." -#: builtins.c:1223 +#: builtins.c:1262 +#, 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4100,6 +4465,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4195,7 +4563,7 @@ msgstr "" " Palauttaa onnistumisen jos LAUSEKE evaluoituu todeksi; epäonnistuu jos\n" " LAUSEKE evaluoituu vääräksi tai on annettu virheellinen argumentti." -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4207,7 +4575,7 @@ msgstr "" " Tämä on sisäänrakennetun ”test”-komennon synonyymi, mutta viimeisen\n" " argumentin pitää olla ”]”, joka sulkee avaavan ”[”:n." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -4227,7 +4595,8 @@ msgstr "" " Paluuarvo:\n" " Onnistuu aina." -#: builtins.c:1320 +#: builtins.c:1365 +#, fuzzy msgid "" "Trap signals and other events.\n" " \n" @@ -4243,7 +4612,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4300,7 +4677,8 @@ msgstr "" "annettu\n" " virheellinen valitsin." -#: builtins.c:1352 +#: builtins.c:1401 +#, fuzzy msgid "" "Display information about command type.\n" " \n" @@ -4309,18 +4687,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4356,7 +4734,8 @@ msgstr "" " Palauttaa onnistuneen mikäli kaikki NIMET löytyivät, muussa tapauksessa\n" " epäonnistuu." -#: builtins.c:1383 +#: builtins.c:1432 +#, fuzzy msgid "" "Modify shell resource limits.\n" " \n" @@ -4374,6 +4753,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4385,6 +4765,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4441,7 +4826,7 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" " tai tapahtuu virhe." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4476,21 +4861,37 @@ msgstr "" " Palauttaa onnistuneen ellei TILA ole virheellinen tai on annettu \n" " virheellinen valitsin." -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" "Odottaa työn valmistumista ja palauttaa paluuarvon.\n" " \n" @@ -4506,18 +4907,20 @@ msgstr "" " Palauttaa ID:n tilan; epäonnistuu jos ID on virheellinen tai on annettu\n" " virheellinen valitsin." -#: builtins.c:1466 +#: builtins.c:1534 +#, 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" "Odottaa työn valmistumista ja palauttaa paluuarvon.\n" " \n" @@ -4530,7 +4933,7 @@ msgstr "" " Palauttaa ID:n tilan; epäonnistuu jos ID on virheellinen tai on annettu\n" " virheellinen valitsin." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4552,7 +4955,7 @@ msgstr "" " Paluuarvo:\n" " Viimeisen suoritetun komennon paluuarvo." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4584,7 +4987,7 @@ msgstr "" " Paluuarvo:\n" " Viimeisen suoritetun komennon paluuarvo." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4621,7 +5024,7 @@ msgstr "" " Paluuarvo:\n" " Viimeisen suoritetun komennon paluuarvo." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4650,7 +5053,7 @@ msgstr "" " Paluuarvo:\n" " KOMENTOKETJUN paluuarvo." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4669,7 +5072,7 @@ msgstr "" " Paluuarvo:\n" " Viimeisen suoritetun komennon paluuarvo." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -4703,12 +5106,14 @@ msgstr "" " Paluuarvo:\n" " Viimeisen suoritetun komennon paluuarvo." -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4721,12 +5126,14 @@ msgstr "" " Paluuarvo:\n" " Viimeisen komennon paluuarvo." -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4739,7 +5146,8 @@ msgstr "" " Paluuarvo:\n" " Viimeisen suoritetun komennon paluuarvo." -#: builtins.c:1604 +#: builtins.c:1672 +#, fuzzy msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4749,7 +5157,7 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" "Luo NIMI-nimisen rinnakkaisprosessin.\n" " \n" @@ -4761,7 +5169,7 @@ msgstr "" " Paluuarvo:\n" " KOMENNON paluuarvo." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -4784,7 +5192,7 @@ msgstr "" " Paluuarvo:\n" " Onnistuu, ellei NIMI ole kirjoitussuojattu." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4803,7 +5211,7 @@ msgstr "" " Paluuarvo:\n" " Viimeisen suoritetun komennon paluuarvo." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4829,12 +5237,13 @@ msgstr "" " Paluuarvo:\n" " Työn tila." -#: builtins.c:1659 +#: builtins.c:1727 +#, fuzzy msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4847,7 +5256,7 @@ msgstr "" " Paluuarvo:\n" " Palauttaa 1, jos LAUSEKKEEN arvo on 0; muuten palauttaa 0." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -4901,7 +5310,7 @@ msgstr "" " Paluuarvo:\n" " 0 tai 1 riippuen LAUSEKKEEN arvosta." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -5004,7 +5413,8 @@ msgstr "" " HISTIGNORE\tKaksoispistein eroteltu lista mallineista, joita käytetään\n" " \t\tpäätettäessä komentojen tallentamisesta historialistaan.\n" -#: builtins.c:1754 +#: builtins.c:1822 +#, fuzzy msgid "" "Add directories to stack.\n" " \n" @@ -5014,19 +5424,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5062,7 +5472,8 @@ msgstr "" "tai\n" " hakemiston vaihtaminen epäonnistuu." -#: builtins.c:1788 +#: builtins.c:1856 +#, fuzzy msgid "" "Remove directories from stack.\n" " \n" @@ -5071,16 +5482,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5109,7 +5520,8 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen argumentti tai\n" " hakemiston vaihto epäonnistuu." -#: builtins.c:1818 +#: builtins.c:1886 +#, fuzzy msgid "" "Display directory stack.\n" " \n" @@ -5120,19 +5532,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5163,14 +5575,14 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n" " tai tapahtuu virhe." -#: builtins.c:1847 +#: builtins.c:1917 +#, fuzzy 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5201,7 +5613,8 @@ msgstr "" " 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 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5218,12 +5631,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -5251,7 +5675,7 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n" " tapahtuu kirjoitus- tai sijoitusvirhe." -#: builtins.c:1895 +#: builtins.c:1974 #, fuzzy msgid "" "Specify how arguments are to be completed by Readline.\n" @@ -5265,15 +5689,19 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5299,7 +5727,7 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai \n" " tapahtuu virhe." -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -5322,14 +5750,14 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n" " tapahtuu virhe." -#: builtins.c:1938 +#: builtins.c:2019 #, 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5338,6 +5766,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5376,7 +5805,7 @@ msgstr "" " Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n" " NIMELLE ei ole määritetty täydennysmääritystä." -#: builtins.c:1968 +#: builtins.c:2050 #, fuzzy msgid "" "Read lines from the standard input into an indexed array variable.\n" @@ -5388,24 +5817,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5448,7 +5879,7 @@ msgstr "" " tai TAULUKKO on kirjoitussuojattu." # Changed " characters into ”... -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -5458,6 +5889,25 @@ msgstr "" " \n" " ”mapfile”:n synonyymi." +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: virheellinen assosiatiivinen indeksi" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Palauttaa nykyisen alirutiinikutsun kontekstin.\n" +#~ " \n" +#~ " Ilman LAUSEKETTA palauttaa" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: prosessi %5ld (%s) putkijonossa" + +#~ msgid "Unknown Signal #" +#~ msgstr "Tuntematon signaali #" + #~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" #~ msgstr "xrealloc: ei voida uudelleenvarata %lu tavua (varattiin %lu tavua)" @@ -5467,3 +5917,15 @@ msgstr "" #~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" #~ msgstr "" #~ "xrealloc: %s:%d: ei voida uudelleenvarata %lu tavua (varattiin %lu tavua)" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/po/fr.gmo b/po/fr.gmo index 9fe681f..39d8520 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index 52d5e1f..2d503ed 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,434 +1,503 @@ # Messages français pour GNU concernant bash. -# Copyright © 2008 Free Software Foundation, Inc. +# Copyright (C) 2022 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. # Michel Robitaille , 2004 -# Christophe Combelles , 2008 -# +# Christophe Combelles , 2008, 2009, 2010, 2011 +# Frédéric Marchal , 2022 msgid "" msgstr "" -"Project-Id-Version: bash 3.2\n" +"Project-Id-Version: bash-5.2-rc1\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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-19 10:44+0200\n" +"Last-Translator: Frédéric Marchal \n" "Language-Team: French \n" +"Language: fr\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-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n >= 2);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "mauvais indice de tableau" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: retire l'attribut nameref" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s : nom d'action non valable" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s : impossible de convertir un tableau indexé en associatif" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s : impossible d'assigner à un index non numérique" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s : %s : l'assignation d'un tableau associatif doit se faire avec un indice" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s : impossible de créer : %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" -"bash_execute_unix_command : impossible de trouver le mappage clavier pour la " -"commande" +msgstr "bash_execute_unix_command : impossible de trouver le mappage clavier pour la commande" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "%s : le premier caractère non vide n'est pas « \" »" +msgstr "%s : le premier caractère non vide n'est pas « \" »" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "pas de « %c » de fermeture dans %s" +msgstr "pas de « %c » de fermeture dans %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "%s : virgule de séparation manquante" +msgstr "%s : virgule de séparation manquante" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "« %s » : impossible à délier dans la commande keymap" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansion des accolades : impossible d'allouer la mémoire pour %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansion des accolades : échec lors de l'allocation mémoire pour %u éléments" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansion des accolades : échec de l'allocation mémoire pour « %s »" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "« %s » : nom du mappage clavier invalide" +msgstr "« %s » : nom d'alias non valable" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "édition de ligne non activée" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "« %s » : nom du mappage clavier invalide" +msgstr "« %s » : nom du mappage clavier invalide" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "%s : nom de fonction inconnu" +msgstr "« %s » : nom de fonction inconnu" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s n'est lié à aucune touche.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s peut être appelé via " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "« %s » : impossible à délier" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "" +msgstr "nombre de boucles" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "ceci n'a un sens que dans une boucle « for », « while » ou « until »" +msgstr "ceci n'a un sens que dans une boucle « for », « while » ou « until »" -#: builtins/caller.def:133 -#, fuzzy +#: builtins/caller.def:136 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" +" 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." 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/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "« HOME » non défini" +msgstr "« HOME » non défini" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "trop d'arguments" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "répertoire nul" -#: builtins/cd.def:227 +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "« OLDPWD » non défini" +msgstr "« OLDPWD » non défini" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "" +msgstr "ligne %d : " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "%s : avertissement :" +msgstr "avertissement :" -#: builtins/common.c:153 -#, fuzzy, c-format +#: builtins/common.c:148 +#, c-format msgid "%s: usage: " -msgstr "%s : avertissement :" - -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "trop d'arguments" +msgstr "%s : utilisation :" -#: builtins/common.c:191 shell.c:499 shell.c:782 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s : l'option nécessite un argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s : argument numérique nécessaire" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s : non trouvé" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s : option non valable" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s : nom d'option non valable" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "« %s » : identifiant non valable" +msgstr "« %s » : identifiant non valable" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "Numéro de signal non valable" +msgstr "nombre octal non valable" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "nombre non valable" +msgstr "nombre hexadécimal non valable" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "nombre non valable" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s : indication de signal non valable" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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" +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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s : variable en lecture seule" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s : impossible d'assigner" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s : %s hors plage" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s hors plage" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s : tâche inexistante" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s : pas de contrôle de tâche" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "pas de contrôle de tâche" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s : restreint" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "restreint" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s : ceci n'est pas une primitive du shell" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "erreur d'écriture : %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "erreur lors de la définition de l'attribut du terminal : %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "erreur lors de la récupération de l'attribut du terminal : %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s : spécification de tâche ambiguë" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "l'aide n'est pas disponible dans cette version" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s : « unset » impossible : %s est en lecture seule" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s : « unset » impossible" + +#: builtins/complete.def:287 #, 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 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, 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" +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" +msgstr "avertissement : l'option « -C » peut fonctionner différemment de ce à quoi vous vous attendez" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "fonction de complétion actuellement non en cours d'exécution" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "utilisable seulement dans une fonction" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "« -f » ne peut pas être utilisé pour fabriquer des fonctions" +msgstr "« -f » ne peut pas être utilisé pour fabriquer des fonctions" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s : fonction en lecture seule" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s : la variable de référence ne peut pas être un tableau" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s : références bouclées sur la même variable interdites" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s : référence de nom circulaire" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "« %s » : nom de variable invalide pour une référence de nom" + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s : impossible de convertir un tableau indexé en tableau associatif" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s : l'assignation d'un tableau composé entre apostrophes est dépréciée" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "chargement dynamique non disponible" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "impossible d'ouvrir l'objet partagé %s : %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s : la primitive dynamique a déjà été chargée" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "la fonction de chargement de %s retourne un échec (%d) : pas chargé" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s : non chargé dynamiquement" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s : ceci est un répertoire" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s : ceci n'est pas un fichier régulier" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s : fichier binaire impossible à lancer" +msgstr "%s : ne peut exécuter le fichier binaire" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s : impossible d'exécuter : %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" -msgstr "" +msgstr "déconnexion\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "ce n'est pas un shell de connexion : utilisez « exit »" +msgstr "ce n'est pas un shell de connexion : utilisez « exit »" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, 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 +#: builtins/exit.def:123 +#, c-format msgid "There are running jobs.\n" -msgstr "Il y a des tâches stoppées.\n" +msgstr "Il y a des tâches en cours d'exécution.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "aucune commande trouvée" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "indication d'historique" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "courant" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "tâche %d démarrée sans contrôle de tâche" @@ -443,41 +512,45 @@ msgstr "%s : option non permise -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s : l'option nécessite un argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hachage désactivé" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s : table de hachage vide\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "dernière commande : %s\n" +msgstr "occurrences\tcommande\n" -#: builtins/help.def:130 -#, fuzzy, c-format +#: builtins/help.def:133 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é « " +msgstr[0] "Commandes du shell correspondant au mot-clé « " +msgstr[1] "Commandes du shell correspondant aux mots-clés « " -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" -"Aucune rubrique d'aide ne correspond à « %s ». Essayez « help help », « man -" -"k %s » ou « info %s »." +"'\n" +"\n" #: builtins/help.def:185 #, 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:223 +#, c-format msgid "%s: cannot open: %s" msgstr "%s : impossible d'ouvrir : %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -488,130 +561,150 @@ msgid "" "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" +"Ces commandes de shell sont définies de manière interne. Saisissez « 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 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "impossible d'utiliser plus d'une option parmi « -anrw »" +msgstr "impossible d'utiliser plus d'une option parmi « -anrw »" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "position dans l'historique" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s : horodatage non valable" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s : l'expansion de l'historique a échoué" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s : l'expansion de l'historique a échoué" +msgstr "%s : « inlib » a échoué" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "pas d'autre option permise avec « -x »" +msgstr "pas d'autre option permise avec « -x »" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, 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" +msgstr "%s : les arguments doivent être des identifiants de tâche ou de processus" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Erreur inconnue" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "une expression est attendue" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s : n'est pas une variable tableau" +msgstr "%s : n'est pas un tableau indexé" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, 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 +#: builtins/mapfile.def:284 builtins/read.def:343 #, 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 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%s : option non valable" +msgstr "%s : nombre de lignes non valable" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%s : option non valable" +msgstr "%s : origine de tableau non valable" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "%s : nom d'action non valable" +msgstr "%s : quantum de callback non valable" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s : n'est pas une variable tableau" +msgstr "nom de variable tableau vide" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "nécessité de prise en charge des variables tableaux" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "« %s » : caractère de format manquant" +msgstr "« %s » : caractère de format manquant" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "« %c » : spécification de format d'heure incorrecte" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "« %c » : caractère de format non permis" +msgstr "« %c » : caractère de format non permis" -#: builtins/printf.def:578 -#, fuzzy, c-format +#: builtins/printf.def:734 +#, c-format msgid "warning: %s: %s" -msgstr "%s : avertissement :" +msgstr "avertissement : %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problème d'analyse du format : %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "chiffre hexadécimal manquant pour \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "chiffre unicode manquant pour \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "pas d'autre répertoire" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s : argument non valable" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "pile de répertoire vide" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "Débordement négatif de la pile de récursivité" +msgstr "indice de pile de répertoire" -#: builtins/pushd.def:683 -#, fuzzy +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -626,42 +719,32 @@ msgid "" " \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" +" +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" +" -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 +" 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" +" Options :\n" +" -c\tefface la pile des répertoires en enlevant tous les éléments.\n" +" -l\tn'affiche pas les versions raccourcies (avec ~) des répertoires\n" +" \trelativement à votre répertoire personnel\n" +" -p\taffiche la pile des répertoires avec un élément par ligne\n" +" -v\taffiche la pile des répertoires avec un élément par ligne préfixé\n" +" \tavec la position dans la pile\n" +" \n" +" Arguments :\n" +" +N\tAffiche 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\tAffiche 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:723 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" @@ -686,28 +769,27 @@ msgid "" " 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" +" 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" +" Options :\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" +" Arguments :\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" +" \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" +" \ten comptant de zéro depuis la droite de la liste fournie par « dirs ».\n" " \n" -" dir\tajoute le répertoire DIR en haut de la pile, et en fait le nouveau\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 »." +" Vous pouvez voir la pile des répertoires avec la commande « dirs »." -#: builtins/pushd.def:730 -#, fuzzy +#: builtins/pushd.def:748 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" @@ -731,72 +813,63 @@ msgstr "" " 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" +" Options :\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" +" Arguments :\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" +" \tde la liste fournie par « dirs ». Par exemple : « popd +0 »\n" +" \tenlève le premier répertoire, « popd +1 » le deuxième.\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" +" \tde la liste fournie par « dirs ». Par exemple : « popd -0 »\n" +" \tenlève le dernier répertoire, « popd -1 » l'avant-dernier.\n" " \n" -" Vous pouvez voir la pile des répertoires avec la commande « dirs »." +" Vous pouvez voir la pile des répertoires avec la commande « dirs »." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s : spécification de délai d'expiration non valable" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" -msgstr "Erreur de lecture : %d : %s" +msgstr "erreur de lecture : %d : %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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 »" +msgstr "« return » n'est possible que depuis une fonction ou depuis un script exécuté par « source »" -#: builtins/set.def:768 +#: builtins/set.def:869 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" +msgstr "« unset » ne peut pas s'appliquer simultanément à une fonction et à une variable" -#: builtins/set.def:823 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s : n'est pas une variable tableau" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s : n'est pas une fonction" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s : impossible d'exporter" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "nombre de « shift »" +msgstr "nombre de « shift »" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 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" +msgstr "les options du shell ne peuvent pas être simultanément activées et désactivées" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s : nom d'option du shell non valable" @@ -805,463 +878,542 @@ msgstr "%s : nom d'option du shell non valable" msgid "filename argument required" msgstr "nom de fichier nécessaire en argument" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s : fichier introuvable" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "suspension impossible" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "un shell de connexion ne peut pas être suspendu" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "%s est un alias vers « %s »\n" +msgstr "%s est un alias vers « %s »\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s est un mot-clé du shell\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s est une fonction\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s est une primitive spéciale du shell\n" + +#: builtins/type.def:301 #, 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 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s est %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s est haché (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s : argument de limite non valable" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "« %c » : mauvaise commande" +msgstr "« %c » : mauvaise commande" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s : impossible d'obtenir la limite : %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" -msgstr "" +msgstr "limite" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s : impossible de modifier la limite : %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" -msgstr "Nombre octal" +msgstr "nombre octal" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "« %c » : opérateur de mode symbolique non valable" +msgstr "« %c » : opérateur de mode symbolique non valable" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "« %c » : caractère de mode symbolique non valable" +msgstr "« %c » : caractère de mode symbolique non valable" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " ligne " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "dernière commande : %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "Annulation..." +msgstr "Annulation…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM : " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "avertissement de DÉBOGAGE :" -#: error.c:406 +#: error.c:488 msgid "unknown command error" msgstr "erreur de commande inconnue" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "mauvais type de commande" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "mauvais connecteur" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "mauvais saut" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aattente de données expirée : déconnexion automatique\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "TIMEFORMAT : « %c » : caractère de format non valable" +msgstr "TIMEFORMAT : « %c » : caractère de format non valable" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] existe encore" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "erreur d'écriture : %s" +msgstr "erreur de tube" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval : dépassement de la profondeur maximum d'imbrication d'évaluations (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s : dépassement de la profondeur maximum d'imbrication de sources (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s : dépassement de la profondeur maximum d'imbrication de fonctions (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "" -"%s : restriction : « / » ne peut pas être spécifié dans un nom de commande" +msgstr "%s : restriction : « / » ne peut pas être spécifié dans un nom de commande" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s : commande introuvable" +msgstr "%s : commande introuvable" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s : %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s : ne peut exécuter : le fichier requis n'a pas été trouvé" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" -msgstr "%s : %s : mauvais interpréteur" +msgstr "%s : %s : mauvais interpréteur" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s : impossible d'exécuter le fichier binaire : %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "« %s » : est une primitive spéciale" -#: execute_cmd.c:4976 +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "Impossible de dupliquer le fd %d vers le fd %d" +msgstr "impossible de dupliquer le fd %d vers le fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "Dépassement du niveau de récursivité dans l'expression" +msgstr "dépassement du niveau de récursivité dans l'expression" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" -msgstr "Débordement négatif de la pile de récursivité" +msgstr "débordement négatif de la pile de récursivité" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "erreur de syntaxe dans l'expression" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "tentative d'affectation à une non-variable" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "erreur de syntaxe dans l'affectation d'une variable" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "division par 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "bogue : mauvais symbole pour expassign" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "« : » attendu pour une expression conditionnelle." +msgstr "« : » attendu pour une expression conditionnelle" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "exposant négatif" -#: expr.c:826 +#: expr.c:1030 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 +#: expr.c:1057 msgid "missing `)'" -msgstr "« ) » manquante" +msgstr "« ) » manquante" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "erreur de syntaxe : opérande attendue" +msgstr "erreur de syntaxe : opérande attendu" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "erreur de syntaxe : opérateur arithmétique non valable" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "" +msgstr "%s%s%s : %s (le symbole erroné est « %s »)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "base arithmétique non valable" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "constante entière invalide" + +#: expr.c:1603 msgid "value too great for base" msgstr "valeur trop grande pour la base" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "%s : nombre entier attendu comme expression" +msgstr "%s : erreur d'expression\n" -#: general.c:61 +#: general.c:70 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 +#: input.c:99 subst.c:6208 +#, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "Impossible de réinitialiser le mode « nodelay » pour le fd %d" +msgstr "impossible de réinitialiser le mode « nodelay » pour le fd %d" -#: input.c:258 +#: input.c:266 #, 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" +msgstr "impossible d'allouer un nouveau descripteur de fichier pour l'entrée de bash depuis le fd %d" -#: input.c:266 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline : pgrp pipe" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:887 +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, 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 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process : pid %5ld (%s) signalé toujours en vie" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid : %ld : n° de processus inexistant" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" -msgstr "" +msgstr "Signal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "" +msgstr "Fini" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "" +msgstr "Stoppé" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" -msgstr "" +msgstr "Stoppé(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "" +msgstr "En cours d'exécution" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "" +msgstr "Fini(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "" +msgstr "Termine %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "" +msgstr "État inconnu" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "" +msgstr "(core dumped)" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr "" +msgstr " (wd : %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" -msgstr "" +msgstr "fils setpgid (%ld à %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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." +msgstr "wait : le processus n°%ld n'est pas un fils de ce shell" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "wait_for : aucun enregistrement du processus n°%ld" +msgstr "wait_for : Aucun enregistrement du processus n°%ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job : la tâche %d est stoppée" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s : pas de tâche actuelle" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s : la tâche s'est terminée" -#: jobs.c:2838 +#: jobs.c:3567 #, 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 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld : activation de WNOHANG pour éviter un blocage définitif" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "%s : avertissement :" +msgstr "%s : ligne %d : " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr "" +msgstr " (core dumped)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "" +msgstr "(maintenant, wd : %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "" +msgstr "initialize_job_control : getpgrp a échoué" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control : pas de contrôle de tâche en tâche de fond" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "" +msgstr "initialize_job_control : discipline de ligne" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "" +msgstr "initialize_job_control : setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "impossible de régler le groupe de processus du terminal (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "pas de contrôle de tâche dans ce shell" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc : échec de l'assertion : %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" "\r\n" -"malloc : %s:%d : assertion manquée\r\n" +"malloc : %s:%d : assertion manquée\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "%s : hôte inconnu" +msgstr "inconnu" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "malloc : bloc écrasé sur liste libre" +msgstr "malloc : bloc écrasé sur liste libre" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "free : appelé avec un bloc déjà libéré comme argument" +msgstr "free : appelé avec un bloc déjà libéré comme argument" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "free : appelé avec un bloc non alloué comme argument" +msgstr "free : appelé avec un bloc non alloué comme argument" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "free : débordement négatif détecté ; « mh_nbytes » est hors plage" +msgstr "free : débordement négatif détecté ; « mh_nbytes » est hors plage" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free : débordement négatif détecté ; « magic8 » est hors plage" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "free : les tailles de fragment au début et à la fin sont différentes" +msgstr "free : les tailles de fragment au début et à la fin sont différentes" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "realloc : appelé avec un bloc non alloué comme argument" +msgstr "realloc : appelé avec un bloc non alloué comme argument" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "realloc : débordement négatif détecté ; « mh_nbytes » est hors plage" +msgstr "realloc : débordement négatif détecté ; « mh_nbytes » est hors plage" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc : débordement négatif détecté ; « magic8 » est hors plage" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" -"realloc : les tailles de fragment au début et à la fin sont différentes" +msgstr "realloc : les tailles de fragment au début et à la fin sont différentes" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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" +msgstr "register_alloc : la table d'allocation est pleine avec FIND_ALLOC ?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "base non valable" @@ -1280,270 +1432,298 @@ msgstr "%s: service non valable" msgid "%s: bad network path specification" msgstr "%s : mauvaise spécification de chemin réseau" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "opérations sur le réseau non prises en charge" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale : LC_ALL : impossible de changer le paramètre de langue (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale : LC_ALL : impossible de changer le paramètre de langue (%s) : %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc : %s:%d : impossible d'allouer %lu octets" +msgstr "setlocale : %s : impossible de changer le paramètre de langue (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc : %s:%d : impossible d'allouer %lu octets" +msgstr "setlocale : %s : impossible de changer le paramètre de langue (%s) : %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Vous avez du courrier dans $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Vous avez du nouveau courrier dans $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" -msgstr "Le courrier dans %s a été lu.\n" +msgstr "Le courrier dans %s a été lu\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "Erreur de syntaxe : expression arithmétique nécessaire" +msgstr "erreur de syntaxe : expression arithmétique nécessaire" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "Erreur de syntaxe : « ; » non attendu" +msgstr "erreur de syntaxe : « ; » non attendu" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "Erreur de syntaxe : « ((%s)) »" +msgstr "erreur de syntaxe : « ((%s)) »" -#: make_cmd.c:575 +#: make_cmd.c:569 #, 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 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "« here-document » à la ligne %d délimité par la fin du fichier (au lieu de « %s »)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" -msgstr "make_redirection : l'instruction de redirection « %d » est hors plage" +msgstr "make_redirection : l'instruction de redirection « %d » est hors plage" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) dépasse SIZE_MAX (%lu): ligne tronquée" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "nombre maximum de documents en ligne (« here-document ») dépassé" -#: parse.y:3133 parse.y:3369 +#: parse.y:3684 parse.y:4244 parse.y:6148 #, 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" +msgstr "fin de fichier (EOF) prématurée lors de la recherche du « %c » correspondant" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "" -"Caractère de fin de fichier (EOF) prématuré lors de la recherche de « ]] »" +msgstr "fin de fichier (EOF) prématurée lors de la recherche de « ]] »" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "" -"Erreur de syntaxe dans une expression conditionnelle : symbole « %s » " -"inattendu" +msgstr "erreur de syntaxe dans une expression conditionnelle : symbole « %s » inattendu" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "Erreur de syntaxe dans une expression conditionnelle" +msgstr "erreur de syntaxe dans une expression conditionnelle" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "Symbole inattendu « %s » au lieu de « ) »" +msgstr "symbole inattendu « %s » au lieu de « ) »" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" -msgstr "« ) » attendu" +msgstr "« ) » attendu" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "argument inattendu « %s » pour l'opérateur conditionnel à un argument" +msgstr "argument inattendu « %s » pour l'opérateur conditionnel à un argument" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "argument inattendu pour l'opérateur conditionnel à un argument" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "Symbole « %s » trouvé à la place d'un opérateur binaire conditionnel" +msgstr "symbole « %s » trouvé à la place d'un opérateur binaire conditionnel" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "opérateur binaire conditionnel attendu" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "argument « %s » inattendu pour l'opérateur binaire conditionnel" +msgstr "argument « %s » inattendu pour l'opérateur binaire conditionnel" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "argument inattendu pour l'opérateur binaire conditionnel" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" -msgstr "Symbole « %c » inattendu dans la commande conditionnelle" +msgstr "symbole « %c » inattendu dans la commande conditionnelle" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" -msgstr "Symbole « %s » inattendu dans la commande conditionnelle" +msgstr "symbole « %s » inattendu dans la commande conditionnelle" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" -msgstr "Symbole « %d » inattendu dans la commande conditionnelle" +msgstr "symbole « %d » inattendu dans la commande conditionnelle" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "Erreur de syntaxe près du symbole inattendu « %s »" +msgstr "erreur de syntaxe près du symbole inattendu « %s »" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "Erreur de syntaxe près de « %s »" +msgstr "erreur de syntaxe près de « %s »" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "Erreur de syntaxe : fin de fichier prématurée" +msgstr "erreur de syntaxe : fin de fichier prématurée" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" -msgstr "Erreur de syntaxe" +msgstr "erreur de syntaxe" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Utilisez « %s » pour quitter le shell.\n" +msgstr "Utilisez « %s » pour quitter le shell.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "" -"Caractère de fin de fichier (EOF) prématuré lors de la recherche d'un « ) » " -"correspondant" +msgstr "fin de fichier (EOF) prématurée lors de la recherche d'une « ) » correspondante" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "complètement : fonction « %s » non trouvée" +msgstr "complètement : fonction « %s » non trouvée" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: boucle de ré-essai possible" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert : %s : NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command : mauvais connecteur « %d »" +msgstr "print_command : mauvais connecteur « %d »" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d : descripteur de fichier non valable : %s" +msgstr "xtrace_set : %d : descripteur de fichier non valable" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set : pointeur de fichier NULL" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "cprintf : « %c » : caractère de format invalide" +msgstr "cprintf : « %c » : caractère de format invalide" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "descripteur de fichier hors plage" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s : redirection ambiguë" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s : impossible d'écraser le fichier existant" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s : restreint : impossible de rediriger la sortie" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, c-format msgid "cannot create temp file for here-document: %s" -msgstr "" -"impossible de créer un fichier temporaire pour le « here-document » : %s" +msgstr "impossible de créer un fichier temporaire pour le « here-document » : %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s : impossible d'affecter une liste à un élément de tableau" +msgstr "%s : impossible d'affecter le descripteur de fichier à la variable" -#: redir.c:544 +#: redir.c:650 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 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "" -"Erreur de redirection : impossible de dupliquer le descripteur de fichier" +msgstr "erreur de redirection : impossible de dupliquer le descripteur de fichier" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "« /tmp » introuvable, veuillez le créer !" +msgstr "« /tmp » introuvable, veuillez le créer !" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "« /tmp » doit être un nom de répertoire correct" +msgstr "« /tmp » doit être un nom de répertoire valable" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "le mode d'affichage amélioré est ignoré dans les shells interactifs" -#: shell.c:884 +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c : option non valable" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossible de changer le uid en %d : uid effectif %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossible de changer le gid en %d: gid effectif %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "impossible de démarrer le débogueur: mode déboguage désactivé" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s : Ceci est un répertoire" + +#: shell.c:1907 msgid "I have no name!" msgstr "Je n'ai pas de nom !" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "" +msgstr "GNU bash, version %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1552,811 +1732,795 @@ msgstr "" "Utilisation :\t%s [option longue GNU] [option] ...\n" "\t%s [option longue GNU] [option] fichier-script ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "Options longues GNU :\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD ou -c commande ou -O shopt_option\t\t(invocation seulement)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s ou -o option\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Pour en savoir plus sur les options du shell, saisissez « %s -c \"help set\" ».\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "Pour en savoir plus sur les primitives du shell, saisissez « %s -c help ».\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "Utilisez la commande « bashbug » pour faire un rapport de bogue.\n" +msgstr "Utilisez la commande « bashbug » pour faire un rapport de bogue.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "page d'accueil de bash : \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Aide générale sur l'utilisation de logiciels GNU : \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "sigprocmask : %d : operation non valable" +msgstr "sigprocmask : %d : opération non valable" #: siglist.c:48 msgid "Bogus signal" -msgstr "" +msgstr "Signal falsifié" #: siglist.c:51 msgid "Hangup" -msgstr "" +msgstr "Raccroche" #: siglist.c:55 msgid "Interrupt" -msgstr "" +msgstr "Interrompt" #: siglist.c:59 msgid "Quit" -msgstr "" +msgstr "Quitte" #: siglist.c:63 msgid "Illegal instruction" -msgstr "" +msgstr "Instruction incorrecte" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "" +msgstr "trace/trap BPT" #: siglist.c:75 msgid "ABORT instruction" -msgstr "" +msgstr "Instruction ABORT" #: siglist.c:79 msgid "EMT instruction" -msgstr "" +msgstr "Instruction EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "" +msgstr "Exception en virgule flottante" #: siglist.c:87 msgid "Killed" -msgstr "" +msgstr "Tué" #: siglist.c:91 -#, fuzzy msgid "Bus error" -msgstr "Erreur de syntaxe" +msgstr "Erreur de bus" #: siglist.c:95 msgid "Segmentation fault" -msgstr "" +msgstr "Erreur de segmentation" #: siglist.c:99 msgid "Bad system call" -msgstr "" +msgstr "Mauvais appel système" #: siglist.c:103 msgid "Broken pipe" -msgstr "" +msgstr "Tube brisé" #: siglist.c:107 msgid "Alarm clock" -msgstr "" +msgstr "Horloge d'alarme" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "restreint" +msgstr "Terminé" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "" +msgstr "Condition d'E/S urgente" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "" +msgstr "Stoppé (signal)" #: siglist.c:127 msgid "Continue" -msgstr "" +msgstr "Continue" #: siglist.c:135 msgid "Child death or stop" -msgstr "" +msgstr "Mort ou arrêt du fils" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "" +msgstr "Stoppé (entrée tty)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "" +msgstr "Stoppé (sortie tty)" #: siglist.c:147 msgid "I/O ready" -msgstr "" +msgstr "E/S prête" #: siglist.c:151 msgid "CPU limit" -msgstr "" +msgstr "Limite CPU" #: siglist.c:155 msgid "File limit" -msgstr "" +msgstr "Limite fichier" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "" +msgstr "Alarme (virtuelle)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "" +msgstr "Alarme (profile)" #: siglist.c:167 msgid "Window changed" -msgstr "" +msgstr "Fenêtre changée" #: siglist.c:171 msgid "Record lock" -msgstr "" +msgstr "Verrou d'enregistrement" #: siglist.c:175 msgid "User signal 1" -msgstr "" +msgstr "Signal utilisateur 1" #: siglist.c:179 msgid "User signal 2" -msgstr "" +msgstr "Signal utilisateur 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "" +msgstr "données d'entrée HFT en attente" #: siglist.c:187 msgid "power failure imminent" -msgstr "" +msgstr "coupure d'alimentation imminente" #: siglist.c:191 msgid "system crash imminent" -msgstr "" +msgstr "panne système imminente" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "" +msgstr "migration processus vers un autre CPU" #: siglist.c:199 msgid "programming error" -msgstr "" +msgstr "erreur de programmation" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "" +msgstr "Mode de surveillance HFT accordé" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "" +msgstr "Mode de surveillance HFT rétracté" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "" +msgstr "Séquence de son HFT terminée" #: siglist.c:215 msgid "Information request" -msgstr "" +msgstr "Demande d'information" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "" +msgstr "Signal n°%d inconnu" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "Mauvaise substitution : pas de « %s » de fermeture dans %s" +msgstr "Mauvaise substitution : pas de « %s » de fermeture dans %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "Impossible de fabriquer un tube pour une substitution de processus" +msgstr "impossible de fabriquer un tube pour une substitution de processus" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "Impossible de fabriquer un fils pour une substitution de processus" +msgstr "impossible de fabriquer un fils pour une substitution de processus" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" -msgstr "Impossible d'ouvrir le tube nommé « %s » en lecture" +msgstr "impossible d'ouvrir le tube nommé « %s » en lecture" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "Impossible d'ouvrir le tube nommé « %s » en écriture" +msgstr "impossible d'ouvrir le tube nommé « %s » en écriture" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "Impossible de dupliquer le tube nommé « %s » vers le fd %d" +msgstr "impossible de dupliquer le tube nommé « %s » vers le fd %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "substitution de commande: octet nul ignoré en entrée" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "Impossible de fabriquer un tube pour une substitution de commande" +msgstr "impossible de fabriquer un tube pour une substitution de commande" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "" -"Impossible de fabriquer un processus fils pour une substitution de commande" +msgstr "impossible de fabriquer un processus fils pour une substitution de commande" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute : impossible de dupliquer le tube vers le fd 1" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s : nom de variable invalide pour une référence de nom" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s : expansion indirecte invalide" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nom de variable invalide" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s : paramètre non défini" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s : paramètre vide ou non défini" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s : expression de sous-chaîne négative" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s : mauvaise substitution" -#: subst.c:7045 +#: subst.c:9678 #, 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:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "les versions futures du shell forceront l'évaluation comme une substitution arithmétique" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "Mauvaise substitution : pas de « %s » de fermeture dans %s" +msgstr "mauvais remplacement : pas de « ` » de fermeture dans %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "Pas de correspondance : %s" +msgstr "pas de correspondance : %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "argument attendu" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s : nombre entier attendu comme expression" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "« ) » attendue" +msgstr "« ) » attendue" -#: test.c:265 +#: test.c:267 #, 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" +msgstr "« ) » attendue au lieu de %s" -#: test.c:449 test.c:736 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s : opérateur binaire attendu" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s : opérateur unaire attendu" + +#: test.c:896 msgid "missing `]'" -msgstr "« ] » manquant" +msgstr "« ] » manquant" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "erreur de syntaxe : « %s » non attendu" + +#: trap.c:220 msgid "invalid signal number" -msgstr "Numéro de signal non valable" +msgstr "numéro de signal non valable" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "gestionnaire trap : dépassement de la profondeur maximum du gestionnaire « trap » (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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" +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, renvoi de %d (%s) à moi-même" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler : mauvais signal %d" +msgstr "trap_handler : mauvais signal %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "erreur lors de l'import de la définition de fonction pour « %s »" +msgstr "erreur lors de l'importation de la définition de fonction pour « %s »" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "niveau de shell trop élevé (%d), initialisation à 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "" -"make_local_variable : aucun contexte de fonction dans le champ d'application " -"actuel" +msgstr "make_local_variable : aucun contexte de fonction dans le champ d'application actuel" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s : la variable ne peut se voir assigner une valeur" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s : impossible d'hériter de la valeur d'un type incompatible" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s : assigne un entier à la référence de nom" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" -"all_local_variables : aucun contexte de fonction dans le champ d'application " -"actuel" +msgstr "all_local_variables : aucun contexte de fonction dans le champ d'application actuel" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s : paramètre vide ou non défini" +msgstr "%s a un « exportstr » nul" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "caractère %d non valable dans « exportstr » pour %s" +msgstr "caractère %d non valable dans « exportstr » pour %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "Pas de « = » dans « exportstr » pour %s" +msgstr "pas de « = » dans « exportstr » pour %s" -#: variables.c:3835 +#: variables.c:5317 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" +msgstr "pop_var_context : le début de « shell_variables » n'est pas un contexte de fonction" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "pop_var_context : aucun contexte à « global_variables »" +msgstr "pop_var_context : aucun contexte à « global_variables »" -#: variables.c:3922 +#: variables.c:5410 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" +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 +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s : impossible d'ouvrir : %s" +msgstr "%s : %s : impossible d'ouvrir comme FILE" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d : descripteur de fichier non valable : %s" +msgstr "%s : %s : valeur non valable pour un descripteur de fichier de trace" -#: version.c:46 -#, fuzzy -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright (C) 2006 Free Software Foundation, Inc.\n" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s : %s : valeur de compatibilité hors plage" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." -#: version.c:86 version2.c:83 +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Licence GPLv3+ : GNU GPL version 3 ou ultérieure \n" + +#: version.c:86 version2.c:86 #, c-format msgid "GNU bash, version %s (%s)\n" -msgstr "" +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 "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ceci est un logiciel libre ; vous être libre de le modifier et de le redistribuer." -#: 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" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "AUCUNE GARANTIE n'est fournie, dans les limites permises par la loi." -#: version2.c:87 +#: xmalloc.c:93 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \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)" +msgstr "%s : impossible d'allouer %lu octets (%lu octets alloués)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc : impossible d'allouer %lu octets" +msgstr "%s : impossible d'allouer %lu octets" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s : %s:%d : impossible d'allouer %lu octets (%lu octets alloués)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc : %s:%d : impossible d'allouer %lu octets" +msgstr "%s : %s:%d : impossible d'allouer %lu octets" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "" +msgstr "alias [-p] [nom[=valeur] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "" +msgstr "unalias [-a] nom [nom ...]" -#: 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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpvsPSVX] [-m keymap] [-f nomfichier] [-q nom] [-u nom] [-r seqtouche] [-x seqtouche:commande-shell] [seqtouche:fonction-readline ou commande-readline]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" -msgstr "" +msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "" +msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "" +msgstr "builtin [shell-builtin [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" +msgstr "caller [expr]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [rép]" #: 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 "" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "" +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] commande [arg ...]" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "" +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [nom[=valeur] ...] ou declare -p [-aAfFilnrtux] [nom ...]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] nom[=valeur] ... ou typeset -p [-aAfFilnrtux] [nom ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "" +msgstr "local [option] nom[=valeur] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "" +msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" -msgstr "" - -#: builtins.c:90 -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" +msgstr "echo [-n] [arg ...]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f nomfichier] [nom ...]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "" +msgid "eval [arg ...]" +msgstr "eval [arg ...]" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "" +msgid "getopts optstring name [arg ...]" +msgstr "getopts chaineopts nom [arg ...]" #: builtins.c:98 -msgid "exit [n]" -msgstr "" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nom] [commande [argument ...]] [redirection ...]" #: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 msgid "logout [n]" -msgstr "" +msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" -msgstr "" +msgstr "fc [-e ename] [-lnr] [premier] [dernier] ou fc -s [motif=nouveau] [commande]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "" +msgstr "fg [job_spec]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "" +msgstr "bg [job_spec ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "" +msgstr "hash [-lr] [-p nomchemin] [-dt] [nom ...]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "" +msgstr "help [-dms] [motif ...]" -#: builtins.c:121 -msgid "" -"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " -"[arg...]" -msgstr "" +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d décalage] [n] ou history -anrw [nomfichier] ou history -ps arg [arg...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "" +msgstr "jobs [-lnprs] [jobspec ...] ou jobs -x commande [args]" -#: 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... ou kill -l [sigspec]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "" +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a tableau] [-d delim] [-i texte] [-n ncars] [-N ncars] [-p prompt] [-t timeout] [-u fd] [nom ...]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o nom-option] [--] [-] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nom ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nom[=valeur] ...] ou export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "nombre de « shift »" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nom[=valeur] ...] ou readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "nom de fichier nécessaire en argument" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source nom_fichier [arguments]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr "nom de fichier nécessaire en argument" +msgstr ". nom_fichier [arguments]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" -msgstr "" - -#: builtins.c:158 -msgid "test [expr]" -msgstr "" +msgstr "suspend [-f]" #: builtins.c:160 -msgid "[ arg... ]" -msgstr "" +msgid "test [expr]" +msgstr "test [expr]" #: builtins.c:162 -msgid "times" -msgstr "" +msgid "[ arg... ]" +msgstr "[ arg... ]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "" +msgstr "trap [-lp] [[arg] signal_spec ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "" +msgstr "type [-afptP] nom [nom ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limite]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "" +msgstr "umask [-p] [-S] [mode]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "" - -#: builtins.c:182 -msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" #: builtins.c:184 -msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "" +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOM [in MOTS ... ] ; do COMMANDES; done" #: builtins.c:186 -msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "" +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDES; done" #: builtins.c:188 -msgid "time [-p] pipeline" -msgstr "" +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOM [in MOTS ... ;] do COMMANDES; done" #: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "" +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" #: builtins.c:192 -msgid "" -"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " -"COMMANDS; ] fi" -msgstr "" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case MOT in [MOTIF [| MOTIF]...) COMMANDES ;;]... esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "" +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if COMMANDES; then COMMANDES; [ elif COMMANDES; then COMMANDES; ]... [ else COMMANDES; ] fi" #: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while COMMANDES; do COMMANDES-2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until COMMANDES; do COMMANDES-2; done" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOM] commande [redirections]" #: builtins.c:202 -msgid "{ COMMANDS ; }" -msgstr "" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nom { COMMANDES ; } ou nom () { COMMANDES ; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "" +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDES ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "une expression est attendue" +msgid "job_spec [&]" +msgstr "job_spec [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "une expression est attendue" +msgid "(( expression ))" +msgstr "(( expression ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "" +msgstr "variables - Noms et significations de certaines variables du shell" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "" +msgstr "pushd [-n] [+N | -N | rép]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" -msgstr "" +msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "" +msgstr "shopt [-pqsu] [-o] [nom_opt ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +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 "" +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G motif_glob] [-W liste_mots] [-F fonction] [-C commande] [-X motif_filtre] [-P prefixe] [-S suffixe] [nom ...]" -#: 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:235 +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 motif_glob] [-W liste_mots] [-F fonction] [-C commande] [-X motif_filtre] [-P prefixe] [-S suffixe] [mot]" -#: builtins.c:240 -msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [nom ...]" #: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d délim] [-n nombre] [-O origine] [-s nombre] [-t] [-u fd] [-C callback] [-c quantum] [tableau]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d delim] [-n nombre] [-O origine] [-s nombre] [-t] [-u fd] [-C callback] [-c quantum] [tableau]" -#: builtins.c:254 -#, fuzzy +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2368,38 +2532,45 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" 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 +"Définit ou affiche des alias.\n" +" \n" +" Sans argument, « alias » affiche la liste des alias dans le format réutilisable\n" +" « alias NOM=VALEUR » sur la sortie standard.\n" +" \n" +" Sinon, un alias est défini pour chaque NOM dont la VALEUR est donnée.\n" +" Une espace à la fin de la VALEUR entraîne la vérification du mot suivant pour\n" +" déterminer si un alias doit être remplacé lorsque l'alias est développé.\n" +" \n" +" Options :\n" +" -p\tAffiche tous les alias actuels dans un format réutilisable\n" +" \n" +" Code de sortie :\n" +" « alias » renvoie la valeur vraie à moins que NOM ne soit fourni et que celui-ci n'aie\n" +" pas d'alias." + +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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." +"Enlève chaque NOM de la liste des alias actuels.\n" +" \n" +" Options :\n" +" -a\tretire toutes les définitions d'alias\n" +" \n" +" Renvoie le code de succès à moins que NOM ne soit pas un alias existant." -#: builtins.c:289 -#, fuzzy +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2411,74 +2582,67 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\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" +"Définit les associations de touches et les variables de « Readline ».\n" +" \n" +" Associe une séquence de touches à une fonction « Readline » ou une macro, ou définit une\n" +" variable « Readline ». La syntaxe des arguments non-options est équivalente à celle\n" +" du fichier ~/.inputrc, mais doivent être transmis comme arguments uniques :\n" +" ex : bind '\"\\C-x\\C-r\" : re-read-init-file'.\n" +" \n" +" Options :\n" +" -m keymap Utilise KEYMAP comme mappage clavier pendant la\n" +" durée de cette commande. Des noms de mappage valables\n" +" 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" +" -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" +" -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.\n" " -V Affiche les noms et valeurs des variables\n" -" -v Affiche les noms et valeurs des variables dans une " -"forme qui peut\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 +" -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" +" -r seqtouche Enlève l'association pour « seqtouche ».\n" +" -f nomfichier Lit l'association de touches depuis NOMFICHIER.\n" +" -x seqtouche:commande-shell\tEntraîne l'exécution de la commande-shell\n" +" \t\t\t\tlorsque « seqtouche » est entrée.\n" +" -X Liste les séquences de touches liées à -x et les commandes associées\n" +" sous une forme qui peut être réutilisée comme entrée.\n" +" \n" +" Code de sortie :\n" +" « bind » renvoie 0 à moins qu'une option non reconnue ne soit donnée ou qu'une erreur survienne." + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2488,12 +2652,15 @@ msgid "" " 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." +"Sort des boucles for, while, ou until.\n" +" \n" +" Sort d'une boucle FOR, WHILE ou UNTIL. Si N est spécifié, sort de N boucles\n" +" imbriquées.\n" +" \n" +" Code de retour :\n" +" Le code de retour est 0 à moins que N ne soit pas supérieur ou égal à 1." -#: builtins.c:338 -#, fuzzy +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2503,26 +2670,38 @@ msgid "" " 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." +"Reprend l'exécution des boucles for, while ou until.\n" +" \n" +" Reprend l'itération suivante de la boucle FOR, WHILE ou UNTIL de niveau supérieur.\n" +" Si N est précisé, reprend à la N-ième boucle supérieure.\n" +" \n" +" Code de sortie :\n" +" Le code de sortie est 0 à moins que N ne soit pas supérieur ou égale à 1." -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" +"Exécute des commandes shell intégrées.\n" +" \n" +" Exécute SHELL-BUILTIN avec les arguments ARGs sans effectuer de recherche\n" +" de commande. Ceci est utile lorsque vous souhaitez remplacer une commande\n" +" intégrée par une fonction shell, mais nécessite d'exécuter la commande intégrée\n" +" dans la fonction.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de retour de SHELL-BUILTIN, ou false si SHELL-BUILTIN n'est\n" +" pas une commande intégrée." -#: builtins.c:365 -#, fuzzy +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2539,75 +2718,93 @@ msgid "" 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" +" 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." +" 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.\n" +" \n" +" Code de sortie :\n" +" Renvoie 0 à moins que le shell ne soit pas en train d'exécuter une fonction ou que EXPR\n" +" ne soit pas valable." -#: builtins.c:383 -#, fuzzy +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\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 +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Change le répertoire de travail du shell.\n" +" \n" +" Change le répertoire actuel vers DIR. Le répertoire DIR par défaut\n" +" est donné par la variable « HOME » du shell.\n" +" \n" +" La variable CDPATH définit le chemin de recherche du répertoire contenant\n" +" DIR. Les noms de répertoires alternatifs dans CDPATH sont séparés par un deux-point « : ».\n" +" Un nom de répertoire vide est identique au répertoire actuel. Si DIR commence\n" +" avec une barre oblique « / », alors CDPATH n'est pas utilisé.\n" +" \n" +" Si le répertoire n'est pas trouvé et que l'option « cdable_vars » du shell est définie,\n" +" alors le mot est supposé être un nom de variable. Si la variable possède une valeur,\n" +" alors cette valeur est utilisée pour DIR.\n" +" \n" +" Options :\n" +" -L\tforce le suivi des liens symboliques : résout les liens symboliques dans\n" +" \t\tDIR après le traitement des instances de « .. »\n" +" -P\tutilise la structure physique des répertoires sans suivre les liens\n" +" \t\tsymboliques : résout les liens symboliques dans DIR avant le traitement des\n" +" \t\tinstances de « .. »\n" +" -e\tsi l'option -P est fournie et que le répertoire de travail actuel ne peut pas\n" +" \t\têtre déterminé avec succès, alors sort avec un code de retour non nul\n" +" -@ sur les systèmes qui le supporte, présente un fichier avec des attributs\n" +" \t\tétendus comme un répertoire contenant les attributs du fichier\n" +" \n" +" Le comportement par défaut est de suivre les liens symboliques, comme si « -L » était précisé.\n" +" « .. » est traité en retirant le composant immédiatement avant dans le chemin jusqu'à\n" +" la barre oblique ou le début de DIR.\n" +" \n" +" Code de sortie :\n" +" Renvoie 0 si le répertoire est changé et si $PWD est correctement défini\n" +" quand -P est utilisé ; sinon autre chose que 0." + +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2616,9 +2813,20 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Affiche le nom du répertoire de travail courant.\n" +" \n" +" Options :\n" +" -L\taffiche la valeur de $PWD s'il nomme le répertoire de travail\n" +" \t\tcourant\n" +" -P\taffiche le répertoire physique, sans aucun lien symbolique\n" +" \n" +" Par défaut, « pwd » se comporte comme si « -L » était spécifié.\n" +" \n" +" Code de retour :\n" +" Renvoie 0 à moins qu'une option non valable ne soit donnée ou que le\n" +" répertoire courant ne peut pas être lu." -#: builtins.c:428 -#, fuzzy +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2627,46 +2835,72 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" -"Sans effet : la commande ne fait rien. Le code de sortie zéro est renvoyé." +"Commande vide.\n" +" \n" +" Sans effet : la commande ne fait rien.\n" +" \n" +" Code de retour :\n" +" Renvoie toujours le code de succès." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Renvoie un résultat de succès.\n" +" \n" +" Code de retour :\n" +" Succès." -#: builtins.c:448 -#, fuzzy +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." -msgstr "Renvoie un résultat d'échec" +msgstr "" +"Renvoie un résultat d'échec.\n" +" \n" +" Code de sortie :\n" +" Toujours l'échec." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Exécute une simple commande ou affiche des informations sur les commandes.\n" +" \n" +" Lance la COMMANDE avec des ARGS en court-circuitant la recherche de commande,\n" +" ou affiche des informations sur les COMMANDEs spécifiées. Ceci peut être\n" +" utilisé pour invoquer des commandes sur le disque lorsqu'il y a conflit\n" +" avec une fonction portant le même nom.\n" +" \n" +" Options :\n" +" -p utilise une valeur par défaut pour CHEMIN qui garantit de trouver\n" +" tous les utilitaires standards\n" +" -v affiche une description de la COMMANDE similaire à la commande intégrée\n" +" « type »\n" +" -V affiche une description plus détaillée de chaque COMMANDE\n" +" \n" +" Code de retour :\n" +" Renvoie le code de sortie de la COMMANDE, ou le code d'échec si la COMMANDE est introuvable." -#: builtins.c:476 -#, fuzzy +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2676,17 +2910,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2694,50 +2933,61 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\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 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Définit les valeurs et les attributs des variables.\n" +" \n" +" Déclare des variables et leur assigne des attributs. Si aucun NOM n'est donné,\n" +" affiche les attributs et les valeurs de toutes les variables.\n" +" \n" +" Options :\n" +" -f\trestreint l'action ou l'affichage aux noms et définitions de fonctions\n" +" -F\trestreint l'affichage aux noms des fonctions uniquement (avec le numéro de ligne\n" +" \t\tet le fichier source lors du débogage)\n" +" -g\tcrée des variables globales lorsqu'utilisée dans une fonction shell ; ignoré sinon\n" +" -I\tlors de la création d'une variable, hérite des attributs et valeur d'une variable\n" +" \t\tportant le même nom dans une portée précédente\n" +" -p\taffiche les attributs et la valeur de chaque NOM\n" +" \n" +" Options qui définissent des attributs :\n" +" -a\tpour faire de NOMs des tableaux indexés (si pris en charge)\n" +" -A\tpour faire de NOMs des tableaux associatifs (si pris en charge)\n" +" -i\tpour assigner l'attribut « integer » aux NOMs\n" +" -l\tpour convertir la valeur de chaque NOM en minuscules lors de l'affectation\n" +" -n\ttransforme NOM en une référence vers une variable nommée d'après sa valeur\n" +" -r\tpour mettre les NOMs en lecture seule\n" +" -t\tpour permettre aux NOMs d'avoir l'attribut « trace »\n" +" -u\tpour convertir les NOMs en majuscules lors de l'affectation\n" +" -x\tpour permettre aux NOMs de s'exporter\n" +" \n" +" Utiliser « + » au lieu de « - » pour désactiver l'attribut.\n" +" \n" +" Les variables avec l'attribut « integer » ont une évaluation arithmétique (voir\n" +" la commande « let ») effectuée lorsqu'une valeur est affectée à la variable.\n" +" \n" +" Lorsqu'utilisée dans une fonction, « declare » permet aux NOMs d'être locaux,\n" +" comme avec la commande « local ». L'option « -g » supprime ce comportement.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable soit fournie ou qu'une\n" +" erreur survienne lors de l'assignation d'une variable." + +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Définit des valeurs et des attributs de variables.\n" +" \n" +" Un synonyme de « déclare ». Consultez « help declare »." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2748,16 +2998,29 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Définit des variables locales.\n" +" \n" +" Crée une variable locale nommée NOM, avec une valeur VALEUR. OPTION peut\n" +" être n'importe quelle option acceptée par « declare ».\n" +" \n" +" Les variables locales peuvent seulement être utilisées à l'intérieur d'une\n" +" fonction; elles ne sont visibles que dans les fonctions où elles ont été\n" +" définies et dans leurs fonctions filles.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit fournie,\n" +" qu'une erreur survienne lors de l'assignation d'une variable, ou que le shell\n" +" n'exécute pas une fonction." -#: builtins.c:537 -#, fuzzy +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2769,6 +3032,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2776,37 +3040,51 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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" +"Écrit les arguments sur la sortie standard.\n" +" \n" +" Affiche les ARGs, séparés par une espace, sur la sortie standard, suivis\n" +" d'un retour à la ligne.\n" +" \n" +" Options :\n" +" -n\tn'ajoute pas de saut de ligne\n" +" -e\tactive l'interprétation des barres contre-obliques d'échappement ci-dessous\n" +" -E\tsupprime explicitement l'interprétation des barres contre-obliques d'échappement\n" +" \n" +" « echo » interprète les caractères suivants comme des séquences d'échappement :\n" +" \\a\talerte (cloche)\n" +" \\b\tretour arrière\n" +" \\c\tsupprime la suite de la sortie\n" +" \\e\tcaractère échap.\n" +" \\E\tcaractère échap.\n" +" \\f\tsaut de page\n" +" \\n\tsaut de ligne\n" +" \\r\tretour chariot\n" +" \\t\ttabulation horizontale\n" +" \\v\ttabulation verticale\n" +" \\\\\tbarre contre-oblique\n" +" \\0nnn\tle caractère dont le code ASCII est NNN (en octal). NNN peut être\n" " \t\tlong de 0 à 3 chiffres octaux\n" +" \\xHH\tle caractère sur 8 bits dont la valeur est HH (hexadécimal). HH\n" +" \t\tpeut être composé de 1 ou 2 chiffres hexadécimaux\n" +" \t\tHHHH peut être composé de un à quatre chiffres hexadécimaux.\n" +" \\UHHHHHHHH le caractère Unicode dont la valeur est la valeur hexadécimale\n" +" \t\tHHHHHHHH. HHHHHHHH peut avoir un à huit chiffres hexadécimaux.\n" " \n" -" Vous pouvez désactiver de manière explicite l'interprétation des " -"caractères ci-dessus\n" -" avec l'option « -E »." +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une erreur d'écriture survienne." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2818,8 +3096,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Écrit des arguments sur la sortie standard.\n" +" \n" +" Affiche les ARGs sur la sortie standard, suivis d'un retour à la ligne.\n" +" \n" +" Options :\n" +" -n\tpas de retour à la ligne\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une erreur d'écriture survienne." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2845,21 +3132,49 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Active et désactive les commandes intégrées.\n" +" \n" +" Active et désactive les commandes intégrées du shell. Les désactiver vous permet\n" +" d'exécuter une commande du disque ayant le même nom qu'une commande du shell\n" +" sans utiliser le chemin complet vers le fichier.\n" +" \n" +" Options :\n" +" -a\taffiche la liste des commandes intégrées et leur état d'activation\n" +" -n\tdésactive chaque NOM ou affiche la liste des commandes désactivées\n" +" -p\taffiche la liste des commandes dans un format réutilisable\n" +" -s\taffiche seulement les noms des commandes Posix de type « special »\n" +" \n" +" Options contrôlant le chargement dynamique :\n" +" -f\tCharge la commande intégrée NOM depuis la bibliothèque partagée FILENAME\n" +" -d\tDécharge une commande chargée avec « -f »\n" +" \n" +" S'il n'y a pas d'option, chaque commande NOM est activée.\n" +" \n" +" Pour utiliser le « test » trouvé dans $PATH au lieu de celui intégré au shell,\n" +" saisissez « enable -n test ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que NOM ne soit pas une commande intégrée ou qu'une erreur ne survienne." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"Exécute des arguments comme s'ils étaient une commande du shell.\n" +" \n" +" Combine des ARGs en une chaîne unique, utilise le résultat comme entrée du shell,\n" +" puis exécute la commande résultante.\n" +" \n" +" Code de sortie :\n" +" Renvoie le même code de sortie que la commande, ou le code de succès si la commande est vide." -#: builtins.c:626 -#, fuzzy +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2892,118 +3207,123 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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" +"Analyse les options en arguments.\n" +" \n" +" « 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" +" À chaque fois qu'elle est appelée, « getopts » place l'option suivante\n" +" dans la variable de shell « $nom », en l'initialisant 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" +" « getopts » signale les erreurs de deux manières. 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 NOM 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\n" +" diagnostic 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." +" « getopts » analyse habituellement les paramètres de position, mais si des arguments\n" +" sont fournis par des valeurs ARG, ils sont analysés à la place.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès si une option est trouvée, le code d'échec si la fin des options\n" +" est rencontrée ou si une erreur survient." -#: builtins.c:668 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"Remplace le shell par la commande fournie.\n" +" \n" +" Exécute la COMMANDE, en remplaçant ce shell par le programme spécifié.\n" +" Les ARGUMENTS deviennent ceux de la COMMANDE. Si la COMMANDE n'est pas fournie,\n" +" les redirections prennent effet dans le shell courant.\n" +" \n" +" Options :\n" +" -a nom\tpasse NOM comme argument numéro 0 à la COMMANDE\n" +" -c\texécute la COMMANDE avec un environnement vide\n" +" -l\tplace un tiret comme argument numéro 0 de la COMMANDE\n" +" \n" +" Si la commande ne peut pas être exécutée, un shell non-interactif se termine,\n" +" à moins que l'option « execfail » ne soit définie.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que la COMMANDE ne soit pas trouvée ou\n" +" qu'une erreur de redirection ne survienne." -#: builtins.c:689 -#, fuzzy +#: builtins.c:715 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." +"Termine le shell.\n" +" \n" +" Termine 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"Termine un shell de connexion.\n" +" \n" +" Termine un shell de connexion avec le code de sortie N. Renvoie une erreur\n" +" s'il n'est pas exécuté dans un shell de connexion." -#: builtins.c:708 -#, fuzzy +#: builtins.c:734 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" +" 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" +" -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" @@ -3017,33 +3337,34 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" 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 +"Affiche ou exécute des commandes issues de l'historique.\n" +" \n" +" « fc » est utilisé pour afficher ou modifier puis ré-exécuter les commandes\n" +" de l'historique des commandes. PREMIER et DERNIER peuvent être des nombres\n" +" indiquant la plage ou PREMIER peut être une chaîne donnant le début de la\n" +" commande la plus récente recherchée.\n" +" \n" +" Options :\n" +" -e ENAME\tdéfinit quel éditeur utiliser. Par défaut il s'agit de « FCEDIT »\n" +" \t\tpuis « EDITOR », puis « vi »\n" +" -l\taffiche les lignes au lieu de les éditer\n" +" -n\tn'affiche pas les numéros de ligne\n" +" -r\tinverse l'ordre des lignes (les plus récentes en premier)\n" +" \n" +" En tapant « fc -s [motif=rempl ...] [commande] », la commande est ré-exécutée\n" +" après avoir effectué le remplacement ANCIEN=NOUVEAU.\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.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès ou le code de sortie de la commande exécutée ; autre\n" +" chose que 0 si une erreur survient." + +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3054,54 +3375,81 @@ msgid "" " 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" +"Déplace une tâche au premier plan.\n" +" \n" +" 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." +" de tâche actuelle.\n" +" \n" +" Code de sortie :\n" +" Celui de la commande placée au premier plan ou le code d'échec si une erreur survient." -#: builtins.c:753 -#, fuzzy +#: builtins.c:779 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" +" 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" +"Déplace des tâches vers l'arrière plan.\n" +" \n" +" 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." +" de tâche actuelle.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que le contrôle de tâche ne soit pas activé\n" +" ou qu'une erreur ne survienne." -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +"Mémorise ou affiche l'emplacement des programmes.\n" +" \n" +" Détermine et mémorise le chemin complet de chaque commande NOM. Si\n" +" aucun argument n'est donné, une information sur les commandes mémorisées est\n" +" affichée.\n" +" \n" +" Options :\n" +" -d\toublie l'emplacement mémorisé de chaque NOM\n" +" -l\taffiche dans un format qui peut être réutilisé comme entrée\n" +" -p nomchemin\tutilise NOMCHEMIN comme le chemin complet de NOM\n" +" -r\toublie tous les emplacements mémorisés\n" +" -t\taffiche l'emplacement mémorisé de chaque NOM, en précédant\n" +" \t\tchaque emplacement du NOM correspondant si plusieurs NOMS\n" +" \t\tsont donnés\n" +" Arguments :\n" +" NOM\tChaque NOM est recherché dans $PATH et ajouté à la liste\n" +" \t\tdes commandes mémorisée.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que le NOM ne soit pas trouvé ou\n" +" qu'une option non valable ne soit donnée." + +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3113,18 +3461,34 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" +"Affiche des informations sur les commandes intégrées.\n" +" \n" +" Affiche de courts résumés des commandes intégrées. Si MOTIF est\n" +" spécifié, une aide détaillée de toutes les commandes correspondantes\n" +" au MOTIF est affichée, sinon la liste des sujets d'aide est affichée.\n" +" \n" +" Options :\n" +" -d\taffiche une courte description pour chaque sujet\n" +" -m\taffiche l'aide dans un format proche des pages de man(uel)\n" +" -s\tn'affiche qu'une courte aide pour chaque sujet correspondant au\n" +" \t\tMOTIF\n" +" \n" +" Arguments :\n" +" MOTIF\tMotif spécifiant un sujet d'aide\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que le MOTIF ne soit pas trouvé ou qu'une\n" +" option non valable ne soit donnée." -#: builtins.c:816 -#, fuzzy +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3133,66 +3497,62 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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 +"Affiche ou manipule l'historique.\n" +" \n" +" Affiche l'historique avec les numéros de lignes en préfixant chaque élément\n" +" modifié d'un « * ». Un argument égal à N limite la liste aux N derniers éléments.\n" +" \n" +" Options :\n" +" -c\tefface la liste d'historique en supprimant tous les éléments\n" +" -d offset\tefface l'élément d'historique à l'emplacement OFFSET. Un offset négatif\n" +" \t\tcompte à partir de la fin de la liste de l'historique\n" +" \n" +" -a\tajoute les lignes d'historique de cette session au fichier d'historique\n" +" -n\tlit toutes les lignes d'historique non déjà lues depuis le fichier d'historique\n" +" \t\tet les ajoute à la liste de l'historique\n" +" -r\tlit le fichier d'historique et ajoute le contenu à la liste d'historique\n" +" -w\técrit l'historique actuelle dans le fichier d'historique\n" +" \n" +" -p\teffectue un développement de l'historique sur chaque ARG et affiche le résultat\n" +" \t\tsans le stocker dans la liste d'historique\n" +" -s\tajoute les ARGs à la liste d'historique comme entrée unique\n" +" \n" +" Si NOMFICHIER est donné, il est utilisé comme fichier d'historique. Sinon,\n" +" si HISTFILE contient une valeur, celle-ci est utilisée, sinon ~/.bash_history.\n" +" \n" +" Si la variable HISTTIMEFORMAT est définie et n'est pas vide, sa valeur est utilisée\n" +" comme chaîne de format pour que strftime(3) affiche l'horodatage associé\n" +" à chaque entrée d'historique. Sinon, aucun horodatage n'est affiché.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable soit donnée ou\n" +" qu'une erreur ne survienne." + +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3201,8 +3561,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3215,23 +3575,30 @@ msgid "" " 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." +"Affiche l'état des tâches.\n" +" \n" +" Affiche la liste des tâches actives. JOBSPEC restreint l'affichage à\n" +" cette tâche. S'il n'y a pas d'option, l'état de toutes les tâches actives\n" +" est affiché.\n" +" \n" +" Options :\n" +" -l\taffiche les IDs de processus en plus des informations normales\n" +" -n\taffiche seulement les processus dont l'état a changé depuis la\n" +" \t\tdernière notification\n" +" -p\taffiche seulement les IDs de processus\n" +" -r\trestreint l'affichage aux tâches en cours d'exécution\n" +" -s\trestreint l'affichage aux tâches stoppées\n" +" \n" +" Si « -x » est fournie, la COMMANDE est lancée après que toutes les\n" +" spécifications qui apparaissent dans ARGs ont été remplacées par l'ID de\n" +" processus du leader de groupe de processus de cette tâche.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit donnée\n" +" ou qu'une erreur ne survienne. Si « -x » est utilisée, le code de sortie de\n" +" la COMMANDE est renvoyé." -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3241,15 +3608,28 @@ msgid "" " 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" +" \t\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 "" +"Retire des tâches du shell courant.\n" +" \n" +" Retire chaque argument JOBSPEC de la table des tâches actives. Sans\n" +" JOBSPEC, le shell utilise sa propre notion de tâche courante.\n" +" \n" +" Options :\n" +" -a\tretire toutes les tâches si JOBSPEC n'est pas fourni\n" +" -h\tmarque chaque JOBSPEC de façon que SIGHUP ne soit pas envoyé à la tâche\n" +" \t\tsi le shell reçoit un SIGHUP\n" +" -r\tretire seulement les tâches en cours de fonctionnement\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option ou un JOBSPEC non\n" +" valable ne soit donné." -#: builtins.c:898 -#, fuzzy +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3261,7 +3641,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3270,27 +3651,37 @@ msgid "" " 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 +"Envoie un signal à une tâche.\n" +" \n" +" Envoie le signal nommé par SIGSPEC ou SIGNUM au processus identifié par\n" +" PID ou JOBSPEC. Si SIGSPEC et SIGNUM ne sont pas donnés, alors SIGTERM est\n" +" envoyé.\n" +" \n" +" Options :\n" +" -s sig\tSIG est un nom de signal\n" +" -n sig\tSIG est un numéro de signal\n" +" -l\taffiche la liste des noms de signaux ; si des arguments suivent « -l »,\n" +" \t\tils sont supposés être des numéros de signaux pour lesquels les noms doivent\n" +" \t\têtre affichés\n" +" -L\tsynonyme de -l\n" +" \n" +" « kill » est une commande intégrée pour deux raisons : elle permet aux IDs de\n" +" tâches d'être utilisés à la place des IDs de processus et elle permet aux\n" +" processus d'être tués si la limite du nombre de processus que vous pouvez créer\n" +" est atteinte.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable soit donnée ou qu'une\n" +" erreur ne survienne." + +#: builtins.c:949 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" +" 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" @@ -3324,9 +3715,11 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" 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" +"Évalue des expressions arithmétiques.\n" +" \n" +" 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" @@ -3335,7 +3728,8 @@ msgstr "" " \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\tmoins unaire, plus unaire\n" +" \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" @@ -3354,110 +3748,108 @@ msgstr "" " \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 +" variable est remplacé par sa valeur (contrainte à un entier de largeur\n" +" fixe) à l'intérieur d'une expression. La variable n'a pas besoin d'avoir\n" +" son attribut 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\n" +" entre parenthèses sont évaluées en premier et peuvent être prioritaires sur\n" +" les règles ci-dessus.\n" +" \n" +" Code de sortie :\n" +" Si le dernier ARG est évalué à 0, « let » renvoie 1, sinon 0 est renvoyé." + +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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 +"Lit une ligne depuis l'entrée standard et la découper en morceaux.\n" +" \n" +" Lit une simple ligne depuis l'entrée standard ou depuis le descripteur de\n" +" fichier FD si l'option « -u » est fournie. La ligne est découpée en morceaux\n" +" comme des mots, et le premier mot est assigné au premier NOM, le deuxième mot\n" +" au deuxième NOM, et ainsi de suite, le dernier NOM récupérant la liste des mots\n" +" restants. Seuls les caractères trouvés dans $IFS sont reconnus comme délimiteurs\n" +" de mots. Par défaut, la barre oblique inverse échappe les caractères délimiteurs\n" +" et les sauts de ligne.\n" +" \n" +" Si aucun NOM n'est fourni, la ligne lue est stockée dans la variable REPLY.\n" +" \n" +" Options :\n" +" -a tableau\taffecte les mots lus séquentiellement aux indices de la variable\n" +" \t\ttableau ARRAY en commençant à 0\n" +" -d délim\tcontinue jusqu'à ce que le premier caractère de DELIM soit lu,\n" +" \t\tau lieu du retour à la ligne\n" +" -e\t\tutilise « Readline » pour obtenir la ligne\n" +" -i texte\tUtilise TEXTE comme texte initial pour « Readline »\n" +" -n n\ttermine après avoir lu N caractères plutôt que d'attendre\n" +" \t\tun retour à la ligne, mais obéi à un délimiteur si moins de N caractères\n" +" \t\tsont lus avant le délimiteur\n" +" -N n\ttermine seulement après avoir lu exactement N caractères, à moins\n" +" \t\tque le caractère EOF soit rencontré ou que le délai de lecture n'expire.\n" +" \t\tLes délimiteurs sont ignorés\n" +" -p prompt\taffiche la chaîne PROMPT sans retour à la ligne final, avant de\n" +" \t\ttenter une lecture\n" +" -r\tne pas permettre aux barres obliques inverses de se comporter comme\n" +" \t\tdes caractères d'échappement\n" +" -s\tne pas répéter l'entrée provenant d'un terminal\n" +" -t timeout\texpire et renvoie un code d'échec si une ligne d'entrée complète\n" +" \t\tn'est pas lue en moins de TIMEOUT secondes. La valeur de la variable TIMEOUT\n" +" \t\test le délai d'expiration par défaut. TIMEOUT peut être un nombre décimal.\n" +" \t\tSi TIMEOUT est à zéro, la lecture se termine immédiatement sans essayer de\n" +" \t\tlire la moindre donnée mais elle renvoie un code de succès seulement\n" +" \t\tsi l'entrée est disponible sur le descripteur de fichier. Le code\n" +" \t\tde sortie est supérieur à 128 si le délai a expiré\n" +" -u fd\tlit depuis le descripteur de fichier FD plutôt que l'entrée standard\n" +" \n" +" Code de sortie :\n" +" Le code de retour est 0, à moins qu'une fin de fichier ne survienne, que le délai expire\n" +" (auquel cas, il est plus grand que 128), une erreur d'affectation à une variable survient\n" +" ou qu'un descripteur de fichier non valable ne soit fourni comme argument à « -u »." + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3468,9 +3860,18 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Termine depuis une fonction du shell.\n" +" \n" +" Entraîne l'arrêt d'une fonction ou d'un script sourcé, avec le code\n" +" de retour spécifié par N. Si N est omis, le code de retour est celui\n" +" de la dernière commande exécutée à l'intérieur de la fonction ou du\n" +" script\n" +" \n" +" Code de retour :\n" +" Renvoie N ou le code d'échec si le shell n'est pas en train d'exécuter\n" +" une fonction ou un script." -#: builtins.c:1022 -#, fuzzy +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3513,8 +3914,7 @@ msgid "" " 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" +" 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" @@ -3536,9 +3936,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3551,34 +3954,35 @@ msgid "" " 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" +"Définit ou invalide des valeurs d'options et des paramètres de position du shell.\n" +" \n" +" Change la valeur des attributs du shell et des paramètres de position, ou\n" +" affiche les noms et valeurs des variables du shell.\n" +" \n" +" Options :\n" +" -a Marque pour l'export toutes les variables qui sont modifiées ou créées.\n" +" -b Averti immédiatement de la fin d'une tâche.\n" +" -e Termine immédiatement si une commande s'arrête avec un code de retour non nul.\n" +" -f Désactive la génération de nom de fichier (globbing).\n" +" -h Mémorise l'emplacement des commandes après leur recherche.\n" +" -k Place 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" +" -m Active le contrôle de tâche.\n" +" -n Lit les commandes, mais ne les exécute pas.\n" " -o nom-option\n" -" Définir la variable correspondant à nom-option :\n" +" Défini la variable correspondant à nom-option :\n" " allexport identique à -a\n" " braceexpand identique à -B\n" -" emacs utiliser une édition de ligne façon « emacs »\n" +" emacs utilise 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" +" history active l'historique des commandes\n" +" ignoreeof ne termine pas le shell à la lecture d'un « EOF »\n" " interactive-comments\n" -" permet aux commentaires d'apparaître dans les " -"commandes interactives\n" +" permet aux commentaires d'apparaître dans les commandes interactives\n" " keyword identique à -k\n" " monitor identique à -m\n" " noclobber identique à -C\n" @@ -3589,60 +3993,49 @@ msgstr "" " 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" +" 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" +" ou zéro si aucune commande ne s'est arrêtée avec un code non nul.\n" +" posix modifie le comportement de « bash » où les opérations par défaut\n" +" sont différentes du standard Posix de manière à correspondre au\n" +" standard\n" " privileged identique à -p\n" " verbose identique à -v\n" -" vi utiliser une édition de ligne façon « vi »\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" +" -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'importation des\n" +" fonctions du shell. Désactiver cette option permet de définir les uid et gid\n" +" effectifs aux valeurs des uid et gid réels.\n" +" -t Termine après la lecture et l'exécution d'une commande.\n" +" -u Traite les variables non définies comme des erreurs lors de la substitution.\n" +" -v Affiche les lignes d'entrée du shell à leur lecture.\n" +" -x Affiche les commandes et leurs arguments au moment de leur exécution.\n" +" -B Effectue l'expansion des accolades\n" +" -C Si défini, 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" +" -E Si défini, l'interception ERR est héritée par les fonctions du shell.\n" +" -H Active 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 +" -P Si défini, 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éfini, l'interception de DEBUG et RETURN est héritée par les fonctions du shell.\n" +" -- Affecte tous les arguments restants aux paramètres de position.\n" +" S'il n'y a plus d'argument, les paramètres de position sont\n" +" indéfinis.\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.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit donnée." + +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3651,9 +4044,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3661,14 +4055,31 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Annule des valeurs ou des attributs de variables et de fonctions du shell.\n" +" \n" +" Pour chaque NOM, annule la variable ou fonction correspondante.\n" +" \n" +" Options :\n" +" -f\ttraite chaque NOM comme une fonction du shell\n" +" -v\ttraite chaque NOM comme une variable du shell\n" +" -n\ttraite chaque NOM comme une référence nommée et annule la variable\n" +" \t\telle-même plutôt que la variable à laquelle elle fait référence\n" +" \n" +" Sans option, « unset » essaye d'abord d'annuler une variable et, \n" +" en cas d'échec, essaye d'annuler la fonction.\n" +" \n" +" Certaines variables ne peuvent pas être annulées ; consultez aussi « readonly ».\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" donnée ou que NOM soit en lecture seule." -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3680,8 +4091,24 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Définit l'attribut « export » pour des variables du shell.\n" +" \n" +" Marque chaque NOM pour exportation automatique vers l'environnement des\n" +" commandes exécutées ultérieurement. Si VALEUR est fournie, affecte la VALEUR\n" +" avant l'exportation.\n" +" \n" +" Options :\n" +" -f\tse référer aux fonctions du shell\n" +" -n\tenlève la propriété d'exportation de chaque NOM\n" +" -p\taffiche une liste de toutes les variables et fonctions exportées\n" +" \n" +" L'argument « -- » désactive tout traitement postérieur d'options.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit données\n" +" ou que NOM ne soit pas valable." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3693,15 +4120,34 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Marque des variables du shell comme non modifiables.\n" +" \n" +" Marque chaque NOM comme étant en lecture seule ; les valeurs de ces NOMs\n" +" ne peuvent plus être modifiées par des affectations ultérieures. Si VALEUR\n" +" est fournie, lui affecter la VALEUR avant le passage en lecture seule.\n" +" \n" +" Options :\n" +" -a\tse réfère à des variables étant des tableaux indexés\n" +" -A\tse réfère à des variables étant des tableaux associatifs\n" +" -f\tse réfère à des fonctions du shell\n" +" -p\taffiche une liste des toutes les fonctions et variables en lecture seule\n" +" \t\tselon que l'option -f est fournie ou non\n" +" \n" +" Un argument « -- » désactive tout traitement postérieur d'options.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" donnée ou que NOM ne soit pas valable." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3711,9 +4157,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Décale des paramètres de position.\n" +" \n" +" Renomme les paramètres de position $N+1,$N+2 ... à $1,$2 ... Si N n'est pas\n" +" donné, il est supposé égal à 1.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que N soit négatif ou supérieur à $#." -#: builtins.c:1176 builtins.c:1191 -#, fuzzy +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3726,14 +4178,18 @@ msgid "" " 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 +"Exécute des commandes depuis un fichier dans le shell actuel.\n" +" \n" +" Lit et exécute des commandes depuis NOMFICHIER dans le shell actuel. Les\n" +" éléments dans $PATH sont utilisés pour trouver le répertoire contenant NOMFICHIER.\n" +" Si des ARGUMENTS sont fournis, ils deviennent les paramètres de position\n" +" lorsque NOMFICHIER est exécuté.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée dans NOMFICHIER, ou le code\n" +" d'échec si NOMFICHIER ne peut pas être lu." + +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3746,16 +4202,29 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Suspend l'exécution du shell.\n" +" \n" +" Suspend l'exécution de ce shell jusqu'à ce qu'il reçoive un signal SIGCONT.\n" +" À moins que ce soit forcé, les shell de connexion ne peuvent pas être suspendus.\n" +" \n" +" Options :\n" +" -f\tforce la suspension, même si le shell est un shell de connexion\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que le contrôle de tâche ne soit pas activé\n" +" ou qu'une erreur survienne." -#: builtins.c:1223 -#, fuzzy +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3779,8 +4248,7 @@ msgid "" " -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 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" @@ -3801,14 +4269,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3824,107 +4294,118 @@ msgid "" " 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" +"Évalue une expression conditionnelle.\n" +" \n" +" 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" +" \n" +" Le comportement de test dépend du nombre d'arguments. Consultez la page\n" +" de manuel de bash pour connaître les spécifications complètes.\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" +" -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" +" \n" +" FICHIER1 -nt FICHIER2 Vrai si le fichier1 est plus récent que le fichier2 (selon la date\n" +" de modification).\n" +" \n" +" FICHIER1 -ot FICHIER2 Vrai si le fichier1 est plus vieux que le fichier2.\n" +" \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" +" -z CHAÎNE Vrai si la chaîne est vide.\n" +" \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" +" -o OPTION Vrai si l'OPTION du shell est activée.\n" +" -v VAR Vrai si la variable de shell VAR est définie.\n" +" -R VAR Vrai is la variable VAR est définie est une référence nommé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" +" 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." +" 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.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès si EXPR est vraie, le code d'échec si EXPR est fausse ou si\n" +" un argument non valable est donné." -#: builtins.c:1299 -#, fuzzy +#: builtins.c:1344 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." +"Évalue une expression conditionnelle.\n" +" \n" +" 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 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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 "" +"Affiche les temps des processus.\n" +" \n" +" Affiche le cumul des temps utilisateur et système pour le shell et\n" +" tous ses processus fils.\n" +" \n" +" Code de retour :\n" +" Toujours le code de succès." -#: builtins.c:1320 -#, fuzzy +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3933,53 +4414,62 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" 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 " -"\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 +"Intercepter des signaux et d'autres événements.\n" +" \n" +" Définit et active des gestionnaires à lancer lorsque le shell reçoit des signaux\n" +" ou sous d'autres conditions.\n" +" \n" +" 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és 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'ils appellent.\n" +" \n" +" Si SIGNAL_SPEC 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. Si\n" +" un SIGNAL_SPEC est RETURN, ARG est exécuté à chaque fois qu'une fonction shell ou\n" +" qu'un script lancé avec . ou source se termine. Un SIGNAL_SPEC\n" +" valant ERR permet d'exécuter ARG à chaque fois qu'un échec d'une commande engendrerait\n" +" la sortie du shell lorsque l'option -e est activée.\n" +" \n" +" Si aucun argument n'est fourni, « trap » affiche la liste des commandes associées\n" +" à chaque signal.\n" +" \n" +" Options :\n" +" -l\taffiche la liste des noms de signaux et leur numéro correspondant\n" +" -p\taffiche les commandes de « trap » associées à chaque SIGNAL_SPEC\n" +" \n" +" Chaque SIGNAL_SPEC est soit un nom de signal dans \n" +" ou un numéro de signal. Les noms de signaux sont insensibles à la casse et\n" +" le préfixe « SIG » est facultatif. Un signal peut être envoyé au\n" +" shell avec « kill -signal $$ ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins que SIGSPEC ne soit pas valable ou qu'une\n" +" option non valable ne soit donnée." + +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3988,34 +4478,58 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 +" Returns success if all of the NAMEs are found; fails if any are not found." +msgstr "" +"Affiche des informations sur le type de commande.\n" +" \n" +" Pour chaque NOM, indique comment il serait interprété s'il était\n" +" utilisé comme un nom de commande.\n" +" \n" +" Options :\n" +" -a\taffiche tous les emplacements contenant un exécutable nommé NOM;\n" +" \t\ty compris les alias, les commandes intégrées et les fonctions si et seulement si\n" +" \t\tl'option « -p » n'est pas utilisée\n" +" -f\tdésactive la recherche de fonctions du shell\n" +" -P\tforce une recherche de CHEMIN pour chaque NOM, même si c'est un alias,\n" +" \t\tune commande intégrée ou une fonction et renvoie le nom du fichier du disque\n" +" \t\tqui serait exécuté\n" +" -p\trenvoie le nom du fichier du disque qui serait exécuté sauf si\n" +" \t\t« type -t NOM » aurait renvoyé autre chose que « file » auquel cas, rien\n" +" \t\tn'est renvoyé.\n" +" -t\taffiche un mot unique parmi « alias », « keyword »,\n" +" \t\t« function », « builtin », « file » or « », si NOM est respectivement un alias,\n" +" \t\tun mot réservé du shell, une fonction du shell, une commande intégrée,\n" +" \t\tun fichier du disque ou un nom inconnu\n" +" \n" +" Arguments :\n" +" NOM\tNom de commande à interpréter.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès si tous les NOMs sont trouvés, le code d'échec si l'un\n" +" d'entre eux n'est pas trouvé." + +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -4028,6 +4542,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4039,6 +4554,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4053,21 +4573,24 @@ msgid "" " 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" +"Modifie les limites de ressources du shell.\n" +" \n" +" Fournit un contrôle sur les ressources disponibles au shell et aux processus\n" +" qu'il crée, sur les systèmes qui permettent un tel contrôle. \n" " \n" -" -S\tutiliser la limite de ressources « soft »\n" -" -H\tutiliser la limite de ressources « hard »\n" +" Options :\n" +" -S\tutilise la limite de ressources « soft »\n" +" -H\tutilise 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" +" -b\tla taille du tampon de socket\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" +" -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" +" -k\tle nombre maximal de kqueues allouées pour ce processus\n" " -l\tla taille maximale qu'un processus peut verrouiller en mémoire\n" -" -m\tla taille maximale de « set » résident\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" @@ -4077,22 +4600,28 @@ msgstr "" " -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" +" -P\tle nombre maximal de pseudo terminaux\n" +" -R\tle temps maximum qu'un processus en temps réel est autorisé à fonctionner\n" +" \tavant d'être bloqué\n" +" -T\tle nombre maximal de threads\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 +" Toutes les options ne sont pas disponibles sur toutes les plates-formes.\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.\n" +" \n" +" Les valeurs sont des multiples de 1024 octets, sauf pour « -t » qui prend des\n" +" secondes, « -p » qui prend un multiple de 512 octets et « -u » qui prend un nombre\n" +" de processus sans unité.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit fournie ou\n" +" qu'une erreur ne survienne." + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4109,46 +4638,97 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Affiche ou définit le masque de mode de fichier.\n" +" \n" +" Définit le masque de création de fichier comme étant MODE. Si MODE est omis,\n" +" affiche la valeur courante du MASQUE.\n" +" \n" +" Si MODE commence par un chiffre, il est interprété comme un nombre octal ;\n" +" sinon comme une chaîne de symboles de mode comme ceux acceptés par chmod(1).\n" +" \n" +" Options :\n" +" -p\tsi MODE est omis, affiche sous une forme réutilisable en entrée\n" +" -S\taffiche sous forme symbolique, sinon la sortie octale est utilisée\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que MODE ne soit pas valable ou qu'une\n" +" option non valable ne soit donnée." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Attend la fin d'une tâche et renvoie le code de retour.\n" +" \n" +" Attend la fin du processus identifié par ID, qui peut être un ID de processus\n" +" ou une spécification de tâche, et renvoie son code de retour. Si ID n'est\n" +" pas donné, la commande attend la fin de tous les processus actifs en cours et\n" +" le code de retour est zéro. Si ID est une spécification de tâche, la commande\n" +" attend tous les processus dans le pipeline de la tâche.\n" +" \n" +" Si l'option -n est fournie, attend la fin d'une seule tâche de la liste des ID,\n" +" ou, si aucun ID est fourni, attend la fin de la prochaine tâche et retourne\n" +" son code de retour.\n" +" \n" +" Si l'option -p est fournie, l'identificateur du processus ou de la tâche de la\n" +" tâche pour laquelle un code de statut est retourné est assigné à la variable VAR\n" +" nommée par l'argument de l'option. La variable est purgée initialement avant\n" +" \n" +" Si l'option -f est fournie et que le contrôle de tâche est activé, attends que\n" +" le ID spécifié soit terminé au lieu d'attendre qu'il change de statut.\n" +" \n" +" Code de retour :\n" +" Renvoie le même code que celui d'ID ; ou échoue si ID n'est pas valable\n" +" ou si une option non valable et fournie ou si -n est employé et que le shell\n" +" n'a aucun enfant sur lequel attendre." -#: builtins.c:1466 -#, fuzzy +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is 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 +"Attend la fin d'un processus et renvoie le code de sortie.\n" +" \n" +" Attend la fin de chaque processus spécifié par un PID et donne son code de\n" +" retour. Si PID n'est pas mentionné, la fin de tous les processus fils\n" +" actuellement actifs est attendue et le code de retour est zéro. PID doit être\n" +" un ID de processus.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de retour du dernier PID. Échoue si PID n'est pas valable ou\n" +" si une option non valable est donnée." + +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4160,14 +4740,17 @@ msgid "" " 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 +"Exécute des commandes pour chaque membre d'une liste.\n" +" \n" +" La boucle « for » exécute une suite de commandes pour chaque membre d'une\n" +" liste d'éléments. Si « in MOTS ...; » n'est pas fourni, « in \"$@\" » est\n" +" utilisé. Pour chaque élément dans MOTS, NOM est défini à cet élément,\n" +" et les COMMANDES sont exécutées.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4183,18 +4766,21 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Équivalent à\n" +"Boucle « for » arithmétique.\n" +" \n" +" É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." +" EXP1, EXP2, and EXP3 sont des expressions arithmétiques. Si une expression\n" +" est omise, elle se comporte comme si elle était évaluée à 1.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." -#: builtins.c:1513 -#, fuzzy +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4213,20 +4799,24 @@ msgid "" " 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" +"Sélectionne des mots d'une liste et exécute des commandes.\n" +" \n" +" 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" +" é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." +" commande « break » soit exécutée.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." -#: builtins.c:1534 -#, fuzzy +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4241,14 +4831,21 @@ msgid "" " 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" +"Signale le temps passé pendant l'exécution d'un tube de commandes.\n" +" \n" +" 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." +" lorsque celui-ci se termine.\n" +" \n" +" Options :\n" +" -p\taffiche le résumé dans le format portable Posix.\n" +" \n" +" La valeur de la variable TIMEFORMAT est utilisée comme format de sortie.\n" +" \n" +" Code de sortie :\n" +" Le code de retour est celui du PIPELINE." -#: builtins.c:1551 -#, fuzzy +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4258,77 +4855,81 @@ msgid "" " 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." +"Exécute des commandes selon une correspondance de motif.\n" +" \n" +" Exécute de manière sélective les COMMANDES selon la correspondance du MOT\n" +" au MOTIF. Le caractère « | » est utilisé pour séparer les différents motifs.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." -#: builtins.c:1563 -#, fuzzy +#: builtins.c:1631 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" +" 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" +" `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 +"Exécute des commandes selon une condition.\n" +" \n" +" La liste « if COMMANDES » est exécutée. Si elle se termine avec le code zéro,\n" +" alors la liste « then COMMANDES » est exécutée. Sinon, chaque liste\n" +" « elif COMMANDES » est exécutée à son tour et si son code de retour est zéro,\n" +" la liste « then COMMANDES » correspondante est exécutée et la commande « if »\n" +" se termine. Sinon, la liste « else COMMANDES » 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.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." + +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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." +"Exécute des commandes aussi longtemps qu'elles réussissent.\n" +" \n" +" Effectue une expansion et exécute les COMMANDES-2 aussi longtemps\n" +" que la commande finale de COMMANDES se termine avec un code de retour\n" +" à zéro.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." -#: builtins.c:1592 -#, fuzzy +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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." +"Exécute des commandes aussi longtemps qu'un test échoue.\n" +" \n" +" Effectue une expansion et exécute les commandes COMMANDES-2\n" +" aussi longtemps que la commande finale de COMMANDES se termine\n" +" avec un code de retour différent de zéro.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4338,25 +4939,41 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Crée un coprocessus nommé NOM.\n" +" \n" +" Exécute la COMMANDE de manière asynchrone, en connectant la sortie et\n" +" l'entrée standard de la commande par un tube aux descripteurs de fichiers\n" +" affectés aux indices 0 et 1 d'une variable tableau NOM dans le shell en\n" +" cours d'exécution. Le NOM par défaut est « COPROC ».\n" +" \n" +" Code de retour :\n" +" La commande coproc renvoie le code de sortie 0." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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 "" +"Définit une fonction du shell.\n" +" \n" +" Crée une fonction du shell nommée NOM. Lorsqu'appelée comme une simple commande,\n" +" NOM lance la COMMANDE dans le contexte du shell qui l'appelle. Lorsque NOM est appelé,\n" +" les arguments sont transmis à la fonction comme $1...$n, et le nom de la fonction\n" +" est $FUNCNAME.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins que NOM ne soit en lecture seule." -#: builtins.c:1632 -#, fuzzy +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4366,11 +4983,15 @@ msgid "" " 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." +"Groupe plusieurs commandes en une seule.\n" +" \n" +" Lance un ensemble de commandes d'un groupe. Ceci est une façon de\n" +" rediriger tout un ensemble de commandes.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la dernière commande exécutée." -#: builtins.c:1644 -#, fuzzy +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4383,39 +5004,42 @@ msgid "" " 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" +"Reprend une tâche en arrière plan.\n" +" \n" +" É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 +" 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 ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de la commande reprise." + +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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 »." +"Évalue une expression arithmétique.\n" +" \n" +" L'EXPRESSION est évaluée selon les règles d'évaluation arithmétique.\n" +" C'est équivalent à « let \"EXPRESSION\" ».\n" +" \n" +" Code de sortie :\n" +" Renvoie 1 si EXPRESSION est évaluée à 0, sinon renvoie 0." -#: builtins.c:1671 -#, fuzzy +#: builtins.c:1739 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" +" 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" @@ -4433,26 +5057,29 @@ msgid "" " 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" +"Exécute une commande conditionnelle.\n" +" \n" +" Renvoie le code de retour 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." +" Lorsque les opérateurs « == » et « != » sont utilisés, la chaîne à droite de\n" +" l'opérateur est utilisée comme motif, et une mise en correspondance est effectuée.\n" +" Lorsque l'opérateur « =~ » est utilisé, la chaîne à droite de l'opérateur\n" +" est mise en correspondance comme une expression rationnelle.\n" +" \n" +" Les opérateurs « && » et « || » n'évaluent pas EXPR2 si\n" +" EXPR1 est suffisant pour déterminer la valeur de l'expression.\n" +" \n" +" Code de sortie :\n" +" 0 ou 1 selon la valeur de l'EXPRESSION." -#: builtins.c:1697 -#, fuzzy +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4505,77 +5132,58 @@ msgid "" " 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" +"Nom et usage de variable shell courantes.\n" +" \n" +" 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" +" \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 fichiers à 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" +" HOSTTYPE\tLe type de processeur sur lequel 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\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" +" 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" +" PS1\t\tL'invite de commande principal.\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" +" 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" +" 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 +" \t\ttâches stoppées. Si elle est trouvée, la tâche est remise en avant-plan.\n" +" \t\tLa valeur « exact » signifie que le mot de commande doit correspondre\n" +" \t\texactement à la commande dans la liste des tâches stoppées. La valeur\n" +" \t\t« substring » signifie que le mot de commande doit correspondre à une\n" +" \t\tsous-chaîne de la tâche. Une autre valeur signifie que la commande doit\n" +" \t\tê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:1822 msgid "" "Add directories to stack.\n" " \n" @@ -4585,19 +5193,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4605,29 +5213,34 @@ msgid "" " 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" +"Ajoute un répertoire à la pile.\n" +" \n" +" 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" +" Options :\n" +" -n\tNe change pas de répertoire de travail lorsque des répertoires\n" +" \t\tsont ajoutés à la pile, de façon que seule la pile soit manipulée\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" +" Arguments :\n" +" +N\tPermute la pile de façon que le Nième répertoire se place en haut,\n" +" \t\ten comptant de zéro depuis la gauche 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\tPermute la pile de façon que le Nième répertoire se place en haut,\n" +" \t\ten comptant de zéro depuis la droite de la liste fournie par « dirs ».\n" " \n" -" dir\tajoute le répertoire DIR en haut de la pile, et en fait le nouveau\n" -" \trépertoire de travail.\n" +" dir\tAjoute le répertoire DIR en haut de la pile, et en fait le nouveau\n" +" \t\trépertoire de travail.\n" " \n" -" Vous pouvez voir la pile des répertoires avec la commande « dirs »." +" Vous pouvez voir la pile des répertoires avec la commande « dirs ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'un argument non valable ne soit fourni\n" +" ou que le changement de répertoire n'échoue." -#: builtins.c:1788 -#, fuzzy +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -4636,16 +5249,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4653,25 +5266,32 @@ msgid "" " 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" +"Enlève des répertoires de la pile.\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" +" 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é et le\n" +" nouveau sommet de la pile devient le répertoire de travail.\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" +" Options :\n" +" -n\tNe change pas de répertoire de travail lorsque des répertoires\n" +" \t\tsont enlevés de la pile, de façon que seule la pile soit manipulée\n" +" \n" +" Arguments :\n" +" +N\tEnlève le Nième répertoire, en comptant de zéro depuis la gauche\n" +" \t\tde la liste fournie par « dirs ». Par exemple : « popd +0 »\n" +" \t\tenlève le premier répertoire, « popd +1 » le deuxième.\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\tEnlève le Nième répertoire, en comptant de zéro depuis la droite\n" +" \t\tde la liste fournie par « dirs ». Par exemple : « popd -0 »\n" +" \t\tenlève le dernier répertoire, « popd -1 » l'avant-dernier.\n" " \n" -" Vous pouvez voir la pile des répertoires avec la commande « dirs »." +" Vous pouvez voir la pile des répertoires avec la commande « dirs ».\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'un argument non valable ne soit donné\n" +" ou que le changement de répertoire n'échoue." -#: builtins.c:1818 -#, fuzzy +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -4682,57 +5302,55 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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 +"Affiche la pile de répertoire.\n" +" \n" +" 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" +" Options:\n" +" -c\tefface la pile des répertoires en effaçant tous les éléments\n" +" -l\tn'affiche pas la version raccourcie (avec ~) des répertoires\n" +" \t\trelativement à votre dossier personnel\n" +" -p\taffiche la pile des répertoires avec un élément par ligne\n" +" -v\taffiche la pile des répertoires avec un élément par ligne,\n" +" \t\ten préfixant avec sa position dans la pile\n" +" \n" +" Arguments :\n" +" +N\tAffiche le Nième élément en comptant de zéro depuis la gauche de la\n" +" \t\tliste affichée par « dirs » lorsque celle-ci est appelée sans option.\n" +" \n" +" -N\tAffiche le Nième élément en comptant de zéro depuis la droite de la\n" +" \t\tliste affichée par « dirs » lorsque celle-ci est appelée sans option.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" fournie ou qu'une erreur ne survienne." + +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -4745,9 +5363,24 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Active ou désactive des options du shell.\n" +" \n" +" Change la valeur de chaque option du shell NOMOPT. S'il n'y a pas d'argument\n" +" à l'option, liste chaque NOMOPT fourni ou toutes les options du shell si aucun\n" +" NOMOPT est donné, avec une indication montrant si chacun est actif ou non.\n" +" \n" +" Options :\n" +" -o\trestreint les NOMOPT à ceux définis pour être utilisés avec « set -o »\n" +" -p\taffiche chaque option du shell en indiquant son état\n" +" -q\tsupprime l'affichage\n" +" -s\tactive (set) chaque NOMOPT\n" +" -u\tdésactive (unset) chaque NOMOPT\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès si NOMOPT est active ; échec si une option non valable\n" +" est donnée ou si NOMOPT est inactive." -#: builtins.c:1868 -#, fuzzy +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -4755,110 +5388,147 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\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 +"Formate et affiche des ARGUMENTS en contrôlant le FORMAT.\n" +" \n" +" Options :\n" +" -v var\taffecte la sortie à la variable VAR du shell plutôt que de l'afficher\n" +" \t\tsur la sortie standard\n" +" \n" +" Le FORMAT 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.\n" +" \n" +" En plus des formats standards décrits dans printf(1), « printf » interprète :\n" +" \n" +" %b\tdéveloppe les séquences d'échappement à contre-oblique dans l'argument correspondant\n" +" %q\tprotège les arguments avec des guillemets de façon qu'ils puissent être réutilisés\n" +" comme entrée du shell.\n" +" %Q\tcomme %q mais applique une éventuelle précision à l'argument sans guillemets avant\n" +" d'ajouter les guillemets.\n" +" %(fmt)T\trenvoie la chaîne date-heure résultant de l'utilisation de FMT comme\n" +" \t chaîne de format pour strftime(3)\n" +" \n" +" Le format est réutilisé si nécessaire pour consommer tous les arguments. S'il y a\n" +" moins d'arguments qu'exigé par le format, les spécificateurs de format surnuméraires\n" +" se comportent comme si la valeur zéro ou une chaîne nulle avait été fournies (selon\n" +" ce qui est approprié).\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit donnée ou qu'une\n" +" erreur d'écriture ou d'affectation ne survienne." + +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1923 -#, fuzzy +"Spécifie la façon dont Readline complète les arguments.\n" +" \n" +" Pour chaque NOM, la commande spécifie la façon dont les arguments sont complétés\n" +" S'il n'y a pas d'option, le réglage actuel est affiché d'une manière\n" +" réutilisable comme une entrée.\n" +" \n" +" Options :\n" +" -p\taffiche le réglage d'auto-complètement actuel dans un format réutilisable\n" +" -r\tretire un réglage d'auto-complètement de chaque NOM ou, si aucun NOM\n" +" \t\tn'est fourni, retire tous les réglages\n" +" -D\tapplique les auto-complètements et actions comme valeurs par défaut aux\n" +" \t\tcommandes ne possédant aucun auto-complètement spécifique\n" +" -E\tapplique les auto-complètements et actions aux commandes vides\n" +" \t\t(auto-complètement tenté sur une ligne vide)\n" +" -I\tapplique les auto-complètements et actions au mot initial (habituellement\n" +" \t\tla commande)\n" +" \n" +" Lorsqu'un auto-complètement est tenté, les actions sont appliquées dans l'ordre\n" +" dans lequel les options en majuscule ci-dessus sont listées. Si plusieurs\n" +" options sont fournies, l'option « -D » est prioritaire sur -E et les deux sont\n" +" prioritaires sur -I.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit fournie ou\n" +" qu'une erreur ne survienne." + +#: builtins.c:2004 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" +" 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." +"Affiche les possibilités de complètement dépendant des options.\n" +" \n" +" Ceci est destiné à être utilisé depuis une fonction de shell générant\n" +" des auto-complètements possibles. Si le MOT optionnel est fourni,\n" +" des correspondances avec « MOT » sont générées.\n" +" \n" +" Code de sortie :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit\n" +" fournie ou qu'une erreur ne survienne." -#: builtins.c:1938 +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4874,83 +5544,183 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Modifie ou affiche les options d'auto-complètement.\n" +" \n" +" Modifie les options d'auto-complètement pour chaque NOM ou, si aucun NOM n'est\n" +" fourni, pour l'auto-complètement actuellement exécuté. Si aucune OPTION n'est\n" +" donnée, affiche les options d'auto-complètement de chaque NOM ou le réglage\n" +" actuel d'auto-complètement.\n" +" \n" +" Options :\n" +" \t-o option\tDéfini l'option d'auto-complètement OPTION pour chaque NOM\n" +" \t-D\t\tChange les options pour l'auto-complètement de commande par défaut\n" +" \t-E\t\tChange les options pour l'auto-complètement de commande vide\n" +" \t-I\t\tChange les options pour l'auto-complètement du mot initial\n" +" \n" +" Utiliser « +o » au lieu de « -o » désactive l'option spécifiée.\n" +" \n" +" Arguments :\n" +" \n" +" Chaque NOM correspond à une commande pour laquelle un réglage d'auto-complètement\n" +" doit déjà avoir été défini grâce à la commande intégrée « complete ». Si aucun\n" +" NOM n'est fourni, « compopt » doit être appelée par une fonction générant\n" +" des auto-complètements ; ainsi les options de ce générateur d'auto-complètement\n" +" en cours d'exécution seront modifiées.\n" +" \n" +" Code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit fournie\n" +" ou que NOM n'ait aucun réglage d'auto-complètement." -#: builtins.c:1968 +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" +"Lit des lignes depuis l'entrée standard vers une variable tableau indexé.\n" +" \n" +" Lit des lignes depuis l'entrée standard vers la variable tableau indexé TABLEAU ou\n" +" depuis le descripteur de fichier FD si l'option « -u » est utilisée. La variable\n" +" MAPFILE est le TABLEAU par défaut.\n" +" \n" +" Options :\n" +" -d delim\tUtilise DELIM pour terminer les lignes au lieu du saut de ligne\n" +" -n nombre\tCopie au maximum NOMBRE lignes. Si NOMBRE est 0, toutes les lignes sont copiées.\n" +" -O origine\tCommence l'affectation au TABLEAU à l'indice ORIGINE. L'indice par défaut est 0.\n" +" -s nombre\tSaute les NOMBRE premières lignes lues.\n" +" -t\tRetire les retours à la ligne de chaque ligne lue.\n" +" -u fd\tLit les lignes depuis le descripteur de fichier FD au lieu de l'entrée standard.\n" +" -C callback\tÉvalue CALLBACK à chaque fois que QUANTUM lignes sont lues.\n" +" -c quantum\tIndique le nombre de lignes lues entre chaque appel au CALLBACK.\n" +" \n" +" Arguments :\n" +" TABLEAU\tNom de la variable tableau à utiliser pour les données.\n" +" \n" +" Si l'option « -C » est fournie sans option « -c », le quantum par défaut est 5000.\n" +" Lorsque CALLBACK est évalué, l'indice du prochain élément de tableau qui sera affecté\n" +" lui est transmis comme argument additionnel.\n" +" \n" +" Si la commande « mapfile » n'est pas appelée avec une origine explicite, le tableau est\n" +" vidé avant affectation.\n" +" \n" +" code de retour :\n" +" Renvoie le code de succès à moins qu'une option non valable ne soit donnée ou que\n" +" le TABLEAU soit en lecture seule ou ne soit pas un tableau indexé." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +"Lit des lignes depuis un fichier vers une variable tableau.\n" +" \n" +" Synonyme de « mapfile »." -#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" -#~ msgstr "xrealloc : impossible de réallouer %lu octets (%lu octets alloués)" +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s : clé non valable pour le tableau associatif" -#~ msgid "xrealloc: cannot allocate %lu bytes" -#~ msgstr "xrealloc : impossible d'allouer %lu octets" +#~ 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.\n" +#~ " \n" +#~ " Sans EXPR, renvoie" -#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process : processus %5ld (%s) dans le_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "N° de signal inconnu" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2014 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n" + +#~ msgid "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "Licence GPLv2+ : GNU GPL version 2 ou ultérieure \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". Avec EXPR, renvoie\n" +#~ " " + +#~ 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 "" -#~ "xrealloc : %s:%d : impossible de réallouer %lu octets (%lu octets alloués)" +#~ "; ces informations supplémentaires peuvent être utilisées pour\n" +#~ " fournir une trace d'appels\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." #~ msgid " " #~ msgstr " " #~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," -#~ msgstr "Sans « EXPR », renvoie « $ligne $nomfichier ». Avec « 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" +#~ 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 "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." @@ -4959,120 +5729,85 @@ msgstr "" #~ msgstr "%s : nombre non valable" #~ msgid "Shell commands matching keywords `" -#~ msgstr "Commandes du shell correspondant aux mots-clés « " +#~ 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" +#~ 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" +#~ 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 »." +#~ 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 "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 "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 »" +#~ 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," +#~ 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 "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 "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 "+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." +#~ 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 "-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" +#~ 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." +#~ 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." +#~ 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" +#~ 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" +#~ 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 »)." +#~ 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" +#~ 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" +#~ 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 " +#~ 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" +#~ 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 »." +#~ 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," @@ -5080,32 +5815,26 @@ msgstr "" #~ 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 »" +#~ 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." +#~ 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 »" +#~ 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." +#~ 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 "-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." @@ -5126,7 +5855,16 @@ msgstr "" #~ msgstr "bogue : opération inconnue" #~ msgid "malloc: watch alert: %p %s " -#~ msgstr "malloc : alerte de « watch » : %p %s " +#~ msgstr "malloc : alerte de « watch » : %p %s " + +#~ 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 "" #~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" @@ -5140,20 +5878,17 @@ msgstr "" #~ " 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." +#~ "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." +#~ "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" @@ -5161,46 +5896,83 @@ 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" +#~ " 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" +#~ "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 "" +#~ "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 "" +#~ "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 »." + #~ msgid "Obsolete. See `declare'." -#~ msgstr "Obsolète. Consulter « 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." +#~ "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 "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" @@ -5214,39 +5986,25 @@ msgstr "" #~ " 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." +#~ " 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" +#~ " 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 "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" @@ -5258,16 +6016,14 @@ msgstr "" #~ " 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" +#~ "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" +#~ " 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" +#~ " pas interactif, alors le shell se termine, à moins que l'option « execfail »\n" #~ " ne soit définie." #~ msgid "Logout of a login shell." @@ -5278,36 +6034,22 @@ msgstr "" #~ " 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" +#~ " 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." +#~ " 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" +#~ "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 "" @@ -5318,40 +6060,75 @@ msgstr "" #~ " 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" +#~ " 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" +#~ " 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" +#~ " 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." +#~ " 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" +#~ "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 "" +#~ "One line is read from the standard input, or from file descriptor FD if the\n" +#~ " -u option is supplied, and the first word is assigned to the first NAME,\n" +#~ " the second word to the second NAME, and so on, with leftover words assigned\n" +#~ " to the last NAME. Only the characters found in $IFS are recognized as word\n" +#~ " delimiters. If no NAMEs are supplied, the line read is stored in the REPLY\n" +#~ " variable. If the -r option is given, this signifies `raw' input, and\n" +#~ " backslash escaping is disabled. The -d option causes read to continue\n" +#~ " until the first character of DELIM is read, rather than newline. If the -p\n" +#~ " option is supplied, the string PROMPT is output without a trailing newline\n" +#~ " before attempting to read. If -a is supplied, the words read are assigned\n" +#~ " to sequential indices of ARRAY, starting at zero. If -e is supplied and\n" +#~ " the shell is interactive, readline is used to obtain the line. If -n is\n" +#~ " supplied with a non-zero NCHARS argument, read returns after NCHARS\n" +#~ " characters have been read. The -s option causes input coming from a\n" +#~ " terminal to not be echoed.\n" +#~ " \n" +#~ " The -t option causes read to time out and return failure if a complete line\n" +#~ " of input is not read within TIMEOUT seconds. If the TMOUT variable is set,\n" +#~ " its value is the default timeout. The return code is zero, unless end-of-file\n" +#~ " is encountered, read times out, or an invalid file descriptor is supplied as\n" +#~ " 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 »." + #~ 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" +#~ "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 "" @@ -5362,14 +6139,11 @@ msgstr "" #~ " 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 ». " +#~ " 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" @@ -5381,39 +6155,27 @@ msgstr "" #~ " 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." +#~ " 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" +#~ " 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" +#~ "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 "" @@ -5428,10 +6190,8 @@ msgstr "" #~ " 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" +#~ "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 "" @@ -5445,86 +6205,61 @@ msgstr "" #~ "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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ "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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " 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" +#~ " `-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" +#~ " 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) »." +#~ "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" @@ -5556,38 +6291,23 @@ msgstr "" #~ " 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." +#~ "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." +#~ " 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." +#~ " 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 index 531788b..88309c9 100644 Binary files a/po/ga.gmo and b/po/ga.gmo differ diff --git a/po/ga.po b/po/ga.po index de7f03c..d625261 100644 --- a/po/ga.po +++ b/po/ga.po @@ -1,303 +1,353 @@ -# translation of bash4.po to Irish -# Copyright (C) 2009 Free Software Foundation, Inc. +# translation of bash.po to Irish +# Copyright (C) 2017 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. # -# Séamus Ó Ciardhuáin , 2009. +# Séamus Ó Ciardhuáin , 2009, 2017, 2018, 2019. msgid "" msgstr "" -"Project-Id-Version: bash 4.0\n" +"Project-Id-Version: bash 5.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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2019-01-16 21:05+0000\n" +"Last-Translator: Séamus Ó Ciardhuáin \n" "Language-Team: Irish \n" +"Language: ga\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" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :" +"(n>6 && n<11) ? 3 : 4;\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "droch-fhoscript eagair" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: aitreabúid nameref (tagairt athróga) á baint" + +#: arrayfunc.c:496 builtins/declare.def:868 #, 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 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: ní féidir sannadh go hinnéacs neamhuimhriúil." -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: ní féidir cruthú: %s" -#: bashline.c:3457 +#: bashline.c:4479 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 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "%s: ní \" é an chéad charachtar nach spás bán é." +msgstr "%s: ní \" an chéad charachtar nach spás bán é." -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "Níl \"%c\" dúnta i %s" +msgstr "Níl '%c' dúnta i %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: deighilteoir idirstaid ar iarraidh" -#: builtins/alias.def:132 +#: bashline.c:4733 #, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "'%s': ní féidir dícheangail" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "fairsingiú lúibíní: ní féidir cuimhne a leithdháileadh le haghaidh %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"fairsingiú lúibíní: theip ar leithdháileadh cuimhne le haghaidh %u eilimint" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "fairsingiú lúibíní: theip ar leithdháileadh cuimhne le haghaidh '%s'" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "\"%s\": ainm neamhbhailí ar mhapa eochrach " +msgstr "'%s': ainm neamhbhailí ar mhapa eochrach" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "níl eagarthóireacht líne cumasaithe" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "\"%s\": ainm neamhbhailí ar mhapa eochrach " +msgstr "'%s': ainm neamhbhailí ar mhapa eochrach " -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "\"%s\": ainm feidhme neamhaithnid" +msgstr "'%s': ainm feidhme neamhaithnid" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, 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 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "Is féidir %s a ghlaoigh trí " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "'%s': ní féidir dícheangail" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "comhaireamh lúibe" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "Gan chiall ach i lúb \"for\", \"while\" nó \"until\"" +msgstr "Gan chiall ach i lúb 'for', 'while' nó 'until'" -#: builtins/caller.def:133 +#: builtins/caller.def:136 +#, fuzzy 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" +" 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." msgstr "" +"Aischuir comhthéacs an ghlaoigh reatha fhoghnáthaimh.\n" +" \n" +" Gan SLONN, aischuirtear '$líne $ainm_comhaid'. Le SLONN, aischuirtear\n" +" '$líne $foghnáthamh $ainm_comhaid'; is féidir lorg cruaiche a sholáthar " +"leis an\n" +" fhaisnéis bhreise seo.\n" +" \n" +" Taispeánann an luach atá ag SLONN líon na bhfrá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/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "Níl HOME socruithe" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "An iomarca argóintí" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "comhadlann neamhnitheach" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "Níl OLDPWD socruithe" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "líne %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "rabhadh: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: tá argóint riachtanach don rogha" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: argóint uimhriúil de dhíth" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: gan aimsiú" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: rogha neamhbhailí" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: ainm neamhbhailí rogha" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "\"%s\": ní aitheantóir bailí é" +msgstr "'%s': ní aitheantóir bailí é" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "uimhir ochtnártha neamhbhailí" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "uimhir heicsidheachúlach neamhbhailí" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "uimhir neamhbhailí" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: sonrú neamhbhailí comhartha" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "\"%s\": ní aitheantas próisis nó sonrú jab bailí é" +msgstr "'%s': ní aitheantas próisis nó sonrú taisc bailí é" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: athróg inléite amháin" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: ní féidir díshocrú" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s as raon" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argóint" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s as raon" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "%s: níl a léithéid de jab ann." +msgstr "%s: níl a léithéid de tasc ann." -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" -msgstr "%s: gan rialú jabanna." +msgstr "%s: gan rialú tascanna." -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" -msgstr "Gan rialú jabanna." +msgstr "Gan rialú tascanna." -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: srianta" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "srianta" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: ní ordú ionsuite blaoisce é." -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "earráid scríofa: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "earráid agus airíonna teirminéil á socrú: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "earráid agus airíonna teirminéil á fáil: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" -msgstr "%s: sonrú jab athbhríoch" +msgstr "%s: sonrú taisc athbhríoch" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "Níl cabhair ar fáil sa leagan seo." -#: builtins/complete.def:276 +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ní féidir díshocrú: %s inléite amháin" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ní féidir díshocrú" + +#: builtins/complete.def:287 #, 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 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: níl sonrú iomlánaithe ann." @@ -312,125 +362,163 @@ 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "níl an fheidhm chomhlánaithe á rith faoi láthair" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "Inúsáidte i bhfeidhmeanna amháin. " -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "Ní féidir \"-f\" a úsáid chun feidhmeanna a dhéanamh" +msgstr "Ní féidir '-f' a úsáid chun feidhmeanna a dhéanamh" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: feidhm inléite amháin" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: ní féidir le athróg thagartha bheith ina h-eagar" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" +"%s: ní cheadaítear tagairtí don athróg féin i nameref (tagairt athróga)" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: tagairt ainm ciorclach" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "'%s': ainm neamhbhailí athróige le haghaidh tagairt ainm" + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: cáintear sannadh na gcomheagar athfhriotail" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "Níl luchtú dinimiciúil ar fáil" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, 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 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: níl sé luchtaithe go dinimiciúil" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" +"Theip ar an ngníomh luchtála le haghaidh %s (aiscuireadh %d): níor " +"luchtáladh é" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: níl sé luchtaithe go dinimiciúil" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: is comhadlann é" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: ní gnáthchomhad é" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: ní féidir comhad dénártha a rith" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: ní féidir rith: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "logout\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "Ní blaosc logála isteach é seo: úsáid \"exit\"" +msgstr "Ní blaosc logála isteach é seo: úsáid 'exit'" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "Tá jabanna stoptha ann.\n" +msgstr "Tá tascanna stoptha ann.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "Tá jabanna ag rith.\n" +msgstr "Tá tascanna ag rith.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "Níor aimsíodh ordú" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "Sonrú staire" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "reatha" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "Thosaigh jab %d gan rialú jabanna." +msgstr "Tosaíodh tasc %d gan rialú tascanna." #: builtins/getopt.c:110 #, c-format @@ -442,29 +530,36 @@ msgstr "%s: rogha neamhdhleathach -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: tá argóint riachtanach don rogha -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "Tá haiseáil díchumasaithe." -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: tá an tábla haiseála folamh.\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "amais\tordú\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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[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 '" +msgstr[3] "Ordaithe blaoisce a mheaitseálann na lorgfhocail '" +msgstr[4] "Ordaithe blaoisce a mheaitseálann na lorgfhocail '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" -#: builtins/help.def:168 +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." @@ -472,12 +567,12 @@ 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 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: ní féidir oscailt: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -497,15 +592,21 @@ msgstr "" "Ciallaíonn réalt (*) ar ainm go bhfuil an t-ordú díchumasaithe.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 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 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "suíomh staire" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: stampa ama neamhbhailí" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: theip ar fhairsingiú staire." @@ -517,95 +618,115 @@ msgstr "%s: theip ar inlib" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "Níl roghanna eile ceadaithe le \"-x\"" +msgstr "Níl roghanna eile ceadaithe le '-x'" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, 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" +msgstr "%s: is gá le argóintí bheith ina aitheantais phróisis nó taisc" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Earráid neamhaithnid" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "Ag súil le slonn" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: ní athróg eagair é" +msgstr "%s: ní eagar innéacsaithe é" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: sonrú neamhbhailí tuairisceora comhaid" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: tuairisceoir comhaid neamhbhailí: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: comhaireamh neamhbhailí línte" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: bunphointe neamhbhailí eagair" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: candam neamhbhailí aisghlaoigh" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "ainm folamh athróga eagair" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "tacaíocht le hathróga eagair de dhíth" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "\"%s\": carachtar formáide ar iarraidh." +msgstr "'%s': carachtar formáide ar iarraidh." + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "'%c': sonrú neamhbhailí formáide ama" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "\"%c\": carachtar formáide neamhbhailí." +msgstr "'%c': carachtar formáide neamhbhailí." -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "rabhadh: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "fadhb i bpársáil formáide: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "digit heicsidheachúlach ar iarraidh le haghaidh \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "digit Unicode ar iarraidh le haghaidh \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "Níl comhadlann eile ann" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argóint neamhbhailí" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "cruach fholamh chomhadlainne" +msgstr "cruach chomhadlainne fholamh" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "innéacs cruaiche comhadlainne" +msgstr "innéacs chruach na gcomhadlann" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -628,8 +749,29 @@ msgid "" "by\n" "\tdirs when invoked without options, starting with zero." msgstr "" - -#: builtins/pushd.def:705 +"Taispeáin liosta na gcomhadlann a bhfuil cuimhne orthu faoi láthair.\n" +" Cuirtear comhadlanna ar an liosta leis an ordú \"pushd\". Is féidir dul\n" +" siar trín liosta leis an ordú \"popd\".\n" +" \n" +" Roghanna:\n" +" -c\tglantar cruach na gcomhadlann trí gach mhír a bhaint de\n" +" -l\tná priontáiltear na comhadlanna i gcoibhneas le do chomhadlann " +"bhaile\n" +" \tagus le tilde rompu\n" +" -p\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne\n" +" -v\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne agus\n" +" \ta háit sa chruach roimpi\n" +" \n" +" Argóintí:\n" +" +N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó thaobh " +"clé\n" +" \tan liosta a thaispeántar le \"dirs\" rite gan argóintí, ag tosú ó " +"náid. -N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó " +"thaobh deas\n" +" \tan liosta a thaispeántar le \"dirs\" rite gan argóintí, ag tosú ó " +"náid." + +#: builtins/pushd.def:723 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" @@ -653,8 +795,32 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Cuireann \"pushd\" comhadlann ar bharr na cruaiche comhadlanna, nó " +"rothlaíonn\n" +" sé an chruach, ag cur barr nua na cruaiche mar an chomhadlann oibrithe\n" +" reatha. Gan argóintí, malartaítear an dá chomhadlann ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh clé an liosta a thaispeánann \"dirs\" agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" -N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh deas an liosta a thaispeánann 'dirs' agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" COMHADLANN\tCuirtear COMHADLANN ar bharr na cruaiche, agus socraítear\n" +" \tí mar an chomhadlann oibrithe reatha.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -674,55 +840,70 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Baineann \"popd\" comhadlanna ón gcruach comhadlanna. Gan argóintí, baintear " +"an\n" +" chomhadlann ó bharr na cruaiche, agus téann sé go dtí an chomhadlann\n" +" atá ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh clé an liosta\n" +" \ta thaispeánann \"dirs\" agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd +0\" an chéad chomhadlann, agus \"popd +1\" an dara cheann.\n" +" \n" +" -N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh deas an liosta\n" +" \ta thaispeánann 'dirs' agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd -0\" an chomhadlann dheireanach, agus \"popd -1\" an ceann\n" +" \tleathdheireanach.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: sonrú neamhbhailí teorann ama" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" -msgstr "earráid léite: %d: %s" +msgstr "Earráid léite: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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\"" +"Ní féidir \"return\" a dhéanamh ach ó fheidhm nó ó script rite le \"source\"" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: ní athróg eagair é" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: ní feidhm é." -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: ní féidir easpórtáil" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "comhaireamh iomlaoide" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 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 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: ainm neamhbhailí ar rogha blaoisce" @@ -731,404 +912,482 @@ msgstr "%s: ainm neamhbhailí ar rogha blaoisce" msgid "filename argument required" msgstr "Is gá don argóint bheith ina ainm comhaid." -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: níor aimsíodh an comhad" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "Ní féidir cur ar fionraí." -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "Ní féidir blaosc logála isteach a chur ar fionraí." -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "Tá %s ailiasáilte go \"%s\".\n" +msgstr "Tá %s ailiasáilte go '%s'.\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "Is eochairfhocal blaoisce é %s.\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "Is feidhm é %s.\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "Is ordú ionsuite blaoisce speisialta é %s\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "Is ordú ionsuite blaoisce é %s\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "Tá %s %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "Tá %s haiseáilte (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: argóint teorann neamhbhailí" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "\"%c\": droch-ordú" +msgstr "'%c': droch-ordú" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: ní féidir teorainn a fháil: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "teorainn" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: ní féidir teorainn a athrú: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "uimhir ochtnártha" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "\"%c\": oibreoir neamhbhailí móid shiombalaigh" +msgstr "'%c': oibreoir neamhbhailí móid shiombalaigh" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "\"%c\": carachtar neamhbhailí móid shiombalaigh" +msgstr "'%c': carachtar neamhbhailí móid shiombalaigh" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " líne " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "Ordú deireanach: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Ag tobscor..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "EOLAS: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "rabhadh: " + +#: error.c:488 msgid "unknown command error" msgstr "earráid ordaithe neamhaithnid" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "droch-chineál ordaithe" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "drochnascóir" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "drochléim" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aImithe thar am ag feitheamh le hionchur: logáil amach uathoibríoch\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "FORMÁID_AMA: \"%c\": carachtar formáide neamhbhaií." +msgstr "FORMÁID_AMA: '%c': carachtar formáide neamhbhaií." + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: tá an comhphróiseas [%d:%s] fós ann" -#: execute_cmd.c:2075 +#: execute_cmd.c:2524 msgid "pipe error" msgstr "earráid phíopa" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: imithe thar uasleibhéal neadaithe eval (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: imithe thar uasleibhéal neadaithe foinse (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: imithe thar uasleibhéal neadaithe feidhme (%d)" + +#: execute_cmd.c:5598 #, 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 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: níor aimsíodh an t-ordú" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: ní féidir comhad dénártha a rith" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: drochléirmhínitheoir" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: ní féidir comhad dénártha a rith: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "Is ordú ionsuite speisialta é '%s'" + +#: execute_cmd.c:6175 #, 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 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "imithe thar leibhéal athchursála sloinn" +msgstr "Imithe thar leibhéal athchursála sloinn" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" -msgstr "gannsreabhadh na cruaiche athchúrsála" +msgstr "Gannsreabhadh na cruaiche athchúrsála" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "Earráid chomhréire sa slonn." -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "Deineadh iarracht sannadh go rud nach athróg é." -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "Earráid chomhréire i sannadh athróige." + +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "roinnt ar 0" +msgstr "Roinnt ar 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "fabht: droch-chomhartha expassign" +msgstr "Fabht: droch-chomhartha expassign" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "Bhíothas ag súil le \":\" le haghaidh sloinn choinníollaigh." -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "Easpónant níos lú ná 0." -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "ag súil le aitheantóir tar éis réamhincriminte nó réamhdeicriminte" +msgstr "Ag súil le aitheantóir tar éis réamhincriminte nó réamhdeicriminte" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "\")\" ar iarraidh" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "Earráid chomhréire: bhíothas ag súil le hoibreann." -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "earráid chomhréire: oibreoir neamhbhailí uimhríochta" +msgstr "Earráid chomhréire: oibreoir neamhbhailí uimhríochta" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s%s%s: %s (comhartha earráide \"%s\")" +msgstr "%s%s%s: %s (comhartha earráide '%s')" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "Bonnuimhir uimhríochtúil neamhbhailí." -#: expr.c:1280 +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: comhaireamh neamhbhailí línte" + +#: expr.c:1603 msgid "value too great for base" msgstr "Tá an luach rómhór don bhonnuimhir." -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: earráid sloinn\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: ní féidir na máthairchomhadlanna a rochtain." -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, 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 " +"Ní féidir an mód gan mhoill a athshocrú le haghaidh an tuairisceora chomhaid " "%d" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp píopa" -#: jobs.c:887 +#: jobs.c:907 #, 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" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, 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." +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "add_process: próiseas %5ld (%s) sa phíblíne" +msgid "forked pid %d appears in running job %d" +msgstr "Tá aitheantas an phróisis ghabhlaithe %d sa tasc %d atá ag rith" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "Tá an tasc stoptha %d leis an ngrúpa próisis %ld á scrios." -#: jobs.c:1113 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, 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 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Comhartha %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Déanta" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Stoptha" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Stoptha(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Ag Rith" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Déanta(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Scoir %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Stádas neamhaithnid" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(cuimhne dumpáilte)" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (comhadlann oibre: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "setpgid macphróisis (%ld go %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: níl taifead den phróiseas %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "wait_for_job: tá an jab %d stoptha." +msgstr "wait_for_job: tá an tasc %d stoptha." + +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: níl a léithéid de tasc ann." -#: jobs.c:2829 +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "%s: tá an jab críochnaithe." +msgstr "%s: tá an tasc críochnaithe." -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "%s: tá an jab %d sa chúlra cheana." +msgstr "%s: tá an tasc %d sa chúlra cheana." -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: ag cumasú WNOHANG chun stad éiginnte a sheachaint" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: líne %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (cuimhne dumpáilte)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(comhadlann oibre anois: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: theip ar getpgrp" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: níl rialú jabanna ar fáil sa chúlra" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: araíonacht líne" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "ní féidir grúpa próisis teirminéil a shocrú (%d)" +msgstr "ní féidir an grúpa próisis teirminéil a athrú (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "Níl rialú jabanna sa bhlaosc seo." +msgstr "Níl rialú tascanna sa bhlaosc seo." -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: dearbhú teipthe: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1137,59 +1396,69 @@ msgstr "" "\r\n" "malloc: %s:%d: dearbhú ina phraiseach\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "neamhaithnid" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: bloc ar an liosta saor scriosta" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: glaoite le argóint bhloic á saoradh cheana" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: glaoite le argóint bhloic nár leithdháileadh" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: gannsreabhadh; tá mh_nbytes as raon" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: gannsreabhadh; tá mh_nbytes as raon" + +#: lib/malloc/malloc.c:1014 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 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: glaoite le argóint bhloic nár leithdháileadh" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: gannsreabhadh; tá mh_nbytes as raon" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: gannsreabhadh; tá mh_nbytes as raon" + +#: lib/malloc/malloc.c:1205 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 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "Bonn neamhbhailí" @@ -1208,267 +1477,313 @@ msgstr "%s: seirbhís neamhbhailí" msgid "%s: bad network path specification" msgstr "%s: drochshonrú conaire líonra" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "Ní thacaítear le oibríochtaí líonra." -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: ní féidir an logchaighdeán a athrú (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: ní féidir an logchaighdeán a athrú (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: ní féidir %lu beart a leithdháileadh" +msgstr "setlocale: %s: ní féidir an logchaighdeán a athrú (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: ní féidir %lu beart a leithdháileadh" +msgstr "setlocale: %s: ní féidir an logchaighdeán a athrú (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Tá ríomhphost agat i $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Tá ríomhphost nua agat i $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, 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 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "Earráid chomhréire: tá slonn uimhríochtúil de dhith." -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "Earráid chomhréire: \";\" gan súil leis." +msgstr "Earráid chomhréire: ';' gan súil leis." -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "Earráid chomhréire: \"((%s))\"" +msgstr "Earráid chomhréire: '((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: drochchineál ordaithe %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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\" á " +"Cáipéis leabaithe ag líne %d teormharcáilte le deireadh comhaid (\"%s\" á " "lorg)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: tá méid an líne ionchuir blaoisce (%zu) níos mó ná SIZE_MAX " +"(%lu): líne giorraithe" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "Imithe thar uasfhad na cáipéise-anseo" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, 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 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "Deireadh comhaid gan súil leis agus \"]]\" á lorg." -#: parse.y:3956 +#: parse.y:4457 #, 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 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "Earráid chomhréire i slonn coinníollach." -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "Comhartha \"%s\" gan súil leis; ag súil le \")\"." +msgstr "Comhartha '%s' gan súil leis; ag súil le ')'." -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "Ag súil le \")\"" -#: parse.y:4070 +#: parse.y:4571 #, 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 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "Argóint gan súil lei go hoibreoir coinníollach aonártha ." -#: parse.y:4120 +#: parse.y:4621 #, 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 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "Bhíothas ag súil le hoibreoir coinníollach dénártha." -#: parse.y:4146 +#: parse.y:4647 #, 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." +msgstr "Argóint '%s' gan súil lei go hoibreoir dénártha coinníollach." -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "Argóint gan súil lei go hoibreoir dénártha coinníollach." -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" -msgstr "Comhartha \"%c\" gan súil leis in ordú coinníollach." +msgstr "Comhartha '%c' gan súil leis in ordú coinníollach." -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "Comhartha \"%s\" gan súil leis in ordú coinníollach." -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "Comhartha %d gan súil leis in ordú coinníollach." -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "" -"Earráid chomhréire in aice comhartha \"%s\" nach rabhthas ag súil leis." +msgstr "Earráid chomhréire in aice comhartha '%s' nach rabhthas ag súil leis." -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "Earráid chomhréire in aice \"%s\"" +msgstr "Earráid chomhréire in aice '%s'" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "Earráid chomhréire: deireadh comhaid gan súil leis." -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "Earráid chomhréire" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Úsáid \"%s\" le scoir den mblaosc.\n" +msgstr "Úsáid '%s' le scoir den mblaosc.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "Deireadh comhaid gan súil leis agus \")\" á lorg le meaitseáil." +msgstr "Deireadh comhaid gan súil leis agus ')' á lorg le meaitseáil." -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "Iomlánú: níor aimsíodh an fheidhm \"%s\"." +msgstr "Iomlánú: níor aimsíodh an fheidhm '%s'." + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "críochnú in-ríomhchláraithe: %s: d'fhéadfadh lúb atriail a bheith ann" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: tá COMPSPEC neamhnitheach" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: drochnascóir \"%d\"" +msgstr "print_command: drochnascóir '%d'" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: tuairisceoir comhaid neamhbhailí: %s" +msgstr "xtrace_set: %d: tuairisceoir comhaid neamhbhailí" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: pointeoir folamh comhaid" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "cprintf: \"%c\": carachtar formáide neamhbhailí" +msgstr "cprintf: '%c': carachtar formáide neamhbhailí" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "tuairisceoir comhaid as raon" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: atreorú athbhríoch" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: ní féidir comhad atá ann cheana a fhorscríobh." -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: srianta: ní féidir aschur a atreorú." -#: redir.c:180 +#: redir.c:219 #, 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 +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: ní féidir liosta a shannadh go ball eagair." +msgstr "%s: ní féidir tuairisceoir comhaid a shannadh go hathróg." -#: redir.c:544 +#: redir.c:650 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 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "Earráid atreoraithe: ní féidir an tuairisceoir comhaid a dhúbailt." -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "Níorbh fhéidir /tmp a aimsiú. Cruthaigh é le do thoil!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "Caithfidh /tmp bheith ina ainm comhadlainne bailí." -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" +"Tabharfar neamhaird ar an mód deaphriontála i mblaoscanna idirghníomhacha." + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: rogha neamhbhailí" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "" +"Ní féidir an t-aitheantóir úsáideora (uid) a athrú go %d: aitheantóir " +"éifeachtach %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "" +"Ní féidir an t-aitheantóir grúpa (gid) a athrú go %d: aitheantóir " +"éifeachtach %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" +"Ní féidir an dífhabhtóir a thosú; tá an mód dífhabhtaithe díchumasaithe." + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: is comhadlann é" + +#: shell.c:1907 msgid "I have no name!" msgstr "Níl ainm orm!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, leagan %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1477,43 +1792,52 @@ msgstr "" "Úsáid:\t%s [rogha fada GNU] [rogha] ...\n" "\t%s [rogha fada GNU] [rogha] comhad_scripte ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "Roghanna fada GNU:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD nó -c ordú nó -O rogha_shopt\t\t(glaoch amháin)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s nó -o rogha\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +"Úsáid %s -c 'help set' le haghaidh tuilleadh eolais faoi roghanna blaoisce.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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 " +"Úsáid '%s -c help' le haghaidh tuilleadh eolais faoi orduithe ionsuite " "blaoisce.\n" -#: shell.c:1824 +#: shell.c:2096 #, 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" +msgstr "Úsáid an t-ordú 'bashbug' le tuarascáil a sheoladh faoi fhabht.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "leathanach baile bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Cabhair ghinearálta le bogearraí GNU: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: oibríocht neamhbhailí" @@ -1678,141 +2002,173 @@ msgstr "seicheamh fuaime HFT críochnaithe" msgid "Information request" msgstr "Iarratas faisnéise" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Comhartha neamhaithnid #" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Comhartha neamhaithnid #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "Drochionadú: níl \"%s\" dúnta i %s" +msgstr "Drochionadú: níl '%s' dúnta i %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 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 +#: subst.c:6124 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 +#: subst.c:6198 #, 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 +#: subst.c:6200 #, 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 +#: subst.c:6223 #, 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 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "ionadú orduithe: tugadh neamhaird ar ghiotán neamhnitheach san ionchur" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "Ní féidir píopa a dhéanamh le haghaidh ionadú ordaithe." -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadú ordaithe." -#: subst.c:5114 +#: subst.c:6613 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 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "'%s': ainm neamhbhailí athróige le haghaidh tagairt ainm" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: fairsingiú neamhbhailí indíreach" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: ainm neamhbhailí athróige" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: paraiméadar gan socrú." + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: paraiméadar neamhnitheach nó gan socrú." -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: slonn fotheaghráin < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: drochionadú" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: ní féidir sannadh mar seo." -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"i leaganacha den bhlaosc amach anseo, beidh luachálú mar ionadú uimhríochta " +"éigeantach" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "drochionadú: níl \"`\" dúnta i %s" +msgstr "drochionadú: níl '`' dúnta i %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "gan meaitseáil: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "Bhíothas ag súil le hargóint." -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: ag súil le slonn slánuimhreach." -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "Ag súil le \")\"" +msgstr "Ag súil le ')'" -#: test.c:265 +#: test.c:267 #, 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." +msgstr "Ag súil le ')', ach fuarthas %s." -#: test.c:449 test.c:736 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: ag súil le hoibreoir dénártha." -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: ag súil le hoibreoir aonártha." + +#: test.c:896 msgid "missing `]'" -msgstr "\"]\" ar iarraidh" +msgstr "']' ar iarraidh" + +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "Earráid chomhréire: ';' gan súil leis." -#: trap.c:203 +#: trap.c:220 msgid "invalid signal number" msgstr "Uimhir chomhartha neamhbhailí" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: imithe thar uasleibhéal na láimhseálaithe gaistí (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" @@ -1820,71 +2176,92 @@ msgstr "" "run_pending_traps: is SIG_DFL an láimhseálaí comharthaí; %d (%s) á " "athsheoladh chugam féin." -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: droch-chomhartha %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "Earráid agus sainmhíniú na feidhme \"%s\" á iompórtáil." +msgstr "Earráid agus sainmhíniú na feidhme '%s' á iompórtáil." -#: variables.c:748 +#: variables.c:838 #, 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 +#: variables.c:2642 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 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: ní féidir luach a shannadh ar an athróg" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: slánuimhir a sannadh go tagairt ainm" + +#: variables.c:4390 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 +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: paraiméadar neamhnitheach nó gan socrú." +msgstr "Tá teaghrán easpórtála neamhnitheach ag %s" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, 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 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "Níl \"=\" sa teaghrán easpórtála le haghaidh %s." +msgstr "Níl '=' sa teaghrán easpórtála le haghaidh %s." -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: níl comhthéacs global_variables ann" -#: variables.c:3922 +#: variables.c:5410 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 +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: ní féidir oscailt: %s" +msgstr "%s: %s: ní féidir a oscailt mar CHOMHAD" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: tuairisceoir comhaid neamhbhailí: %s" +msgstr "%s: %s: luach neamhbhailí le haghaidh tuairisceoir comhaid rianaithe" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: luach comhoiriúnachta as raon" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Cóipcheart © 2009 Free Software Foundation, Inc." +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Cóipcheart © 2012 Free Software Foundation, Inc." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1892,179 +2269,160 @@ msgstr "" "Ceadúnas GPLv3+: GNU GPL leagan 3 nó níos déanaí \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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." +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Is saorbhogearra é seo; tá cead agat é a athrú agus é a athdháileadh." -#: version2.c:87 -#, fuzzy, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." msgstr "" -"Ceadúnas GPLv3+: GNU GPL leagan 3 nó níos déanaí \n" +"Ní ghabhann baránta ar bith leis, sa mhéid is atá sin ceadaithe de réir dlí." -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, 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)" +msgstr "%s: ní féidir %lu beart a leithdháileadh (%lu beart leithdháilte)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: ní féidir %lu beart a leithdháileadh" +msgstr "%s: ní féidir %lu beart a leithdháileadh" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +"%s: %s:%d: ní féidir %lu beart a leithdháileadh (%lu beart leithdháilte)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: ní féidir %lu beart a leithdháileadh" +msgstr "%s: %s:%d: ní féidir %lu beart a leithdháileadh" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [ainm[=luach] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] ainm [ainm ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" msgstr "" +"bind [-lpsvPSVX] [-m MAPA_EOCHRACH] [-f AINM_CHOMHAID] [-q AINM] [-u AINM] [-" +"r SRAITH_EOCHRACHA] [-x SRAITH_EOCHRACHA:ORDÚ_BLAOISCE] [SRAITH_EOCHRACHA:" +"GNÍOMH_readline nó ORDÚ_readline]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [N]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [N]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [ORDÚ-IONSUITE-BLAOISCE [ARGÓINT ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [comhadlann]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "true" - -#: builtins.c:72 -msgid "false" -msgstr "false" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [AINM[=LUACH] ...]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilnrtux] [-p] AINM[=LUACH] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [ROGHA] AINM[=LUACH] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [ARGÓINT ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [ARGÓINT ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f comhadainm] [ainm ...]" -#: builtins.c:92 +#: builtins.c:94 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ú ...]" +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts teaghrán_roghanna ainm [argóint]" #: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a AINM] [ORDÚ [ARGÓINTÍ ...]] [ATREORÚ ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [N]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "fg [SONRÚ_JAB]" +msgstr "fg [SONRÚ_TAISC]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "bg [SONRÚ_JAB ...]" +msgstr "bg [SONRÚ_TAISC ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p CONAIR] [-dt] [AINM ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [PATRÚN ...]" +msgstr "help [-dms] [PATRÚN ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" @@ -2072,128 +2430,127 @@ msgstr "" "history [-c] [-d SEACH_CHUR] [n] nó history -anrw [COMHADAINM] nó history -" "ps ARGÓINT [ARGÓINT...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "jobs [-lnprs] [SONRÚ_JAB ...] nó jobs -x ORDÚ [ARGÓINTÍ]" +msgstr "jobs [-lnprs] [SONRÚ_TAISC ...] nó jobs -x ORDÚ [ARGÓINTÍ]" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "disown [-h] [-ar] [SONRÚ_JAB ...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [SONRÚ_TAISC ... | AITHEANTAS_PRÓISIS ...]" -#: builtins.c:132 +#: builtins.c:134 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]" +"kill [-s SONRÚ_COMHARTHA | -n UIMHIR_CHOMHARTHA | -SONRÚ_COMHARTHA] " +"AITHEANTAS_PRÓISIS | SONRÚ_TAISC ... nó kill -l [SONRÚ_COMHARTHA]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let argóint [argóint ...]" -#: builtins.c:136 -#, fuzzy +#: builtins.c:138 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 ...]" +"read [-ers] [-a eagar] [-d teormharcóir] [-i téacs] [-n líon_carachtar] [-N " +"líon_carachtar] [-p leid] [-t teorainn_ama] [-u tuairisceoir_comhaid] " +"[ainm ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o AINM-ROGHA] [--] [ARGÓINT ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [ainm[=luach] ...] nó export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [AINM ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [ainm[=luach] ...] nó readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [AINM[=LUACH] ...] nó export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [ainm[=luach] ...] nó readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" -msgstr "source comhadainm [argóintí]" +msgstr "source AINM_COMHAID [ARGÓINTÍ]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". comhadainm [argóintí]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [slonn]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ argóint... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[argóint] sonrú_comhartha ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] ainm [ainm ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [teorainn]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [teorainn]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "umask [-p] [-S] [mód]" +msgstr "umask [-p] [-S] [MÓD]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [aitheantas]" +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [AITHEANTAS ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [aitheantas_próisis]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [AITHEANTAS_PRÓISIS ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for AINM [in FOCAIL ... ] ; do ORDUITHE; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( slonn1; slonn2; slonn3 )); do ORDUITHE; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select AINM [in FOCAIL ... ;] do ORDUITHE; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" -msgstr "time [-p] píblíne" +msgstr "time [-p] PÍBLÍNE" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case FOCAL in [PATRÚN [| PATRÚN]...) ORDUITHE ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2201,100 +2558,106 @@ 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" +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while ORDUITHE1; do ORDUITHE2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "coproc [AINM] ordú [atreoruithe]" +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until ORDUITHE; do ORDUITHE; done" #: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [AINM] ORDÚ [ATREORUITHE]" + +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function AINM { ORDUITHE ; } nó AINM () { ORDUITHE ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ ORDUITHE ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" -msgstr "sonrú_jab [&]" +msgstr "SONRÚ_TAISC [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( slonn ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ slonn ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "Athróga - ainmneacha agus mínithe ar fathróga áirithe blaoisce" +msgstr "athróga - ainmneacha agus mínithe ar athróga áirithe blaoisce" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | comhadlann]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o] [ainm_rogha ...]" +msgstr "shopt [-pqsu] [-o] [AINM_ROGHA ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v athróg] formáid [argóintí]" -#: builtins.c:229 +#: builtins.c:231 #, fuzzy msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 ...]" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 +#: builtins.c:235 +#, fuzzy msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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]" +"iarmhír] [focal]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "compopt [-o|+o rogha] [ainm ...]" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o ROGHA] [-DEI] [AINM ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "a" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d TEORMHARCÓIR] [-n COMHAIREAMH] [-O BUNÚS] [-s COMHAIREAMH] [-t] " +"[-u TC] [-C AISGHLAOCH] [-c CANDAM] [EAGAR]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "t" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d TEORMHARCÓIR] [-n COMHAIREAMH] [-O BUNÚS] [-s COMHAIREAMH] [-" +"t] [-u TUAIRISCEOIR_COMHAID] [-C AISGHLAOCH] [-c CANDAM] [EAGAR]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2306,7 +2669,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2315,37 +2678,36 @@ msgid "" 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" +" Gan argóintí, priontáiltear an liosta ailiasanna san fhoirm\n" +" ath-inúsáidte 'alias AINM=LUACH' 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" +" -p\tPriontáiltear gach ailias sainithe i bhfoirm ath-inúsáidte.\n" " \n" " Stádas Scortha:\n" -" Aischuirtear an luach true mura thugtar AINM nach bhfuil\n" -" ailias sainithe dó." +" Aischuirtear fíor mura dtugtar AINM nach bhfuil ailias sainithe dó." -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +" -a\tbaintear gach sainiú ailias.\n" " \n" " Aischuirtear rath ach sa chás nach bhfuil AINM ann." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2379,12 +2741,15 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2396,13 +2761,13 @@ msgid "" 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" +" 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 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2414,14 +2779,14 @@ msgid "" 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" +" 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 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2432,21 +2797,21 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" 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" +" Ritear ORDÚ-IONSUITE-BLAOISCE leis na hargóintí ARGÓINTÍ gan cuardach\n" +" ordaithe a dhéanamh. Tá sé seo úsáideach más mian 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." +" Aischuirtear stádas scortha ORDÚ-IONSUITE-BLAOISCE, nó falsa sa chás " +"nach\n" +" bhfuil ORDÚ-IONSUITE-BLAOISCE ina ordú ionsuite blaoisce." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2463,12 +2828,12 @@ msgid "" 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 " +" Gan SLONN, aischuirtear '$líne $ainm_comhaid'. Le SLONN, aischuirtear\n" +" '$líne $foghnáthamh $ainm_comhaid'; 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" +" Taispeánann an luach atá ag SLONN líon na bhfrámaí glaoigh le dul siar\n" " roimh an ceann reatha; fráma 0 an ceann atá ar barr.\n" " \n" " Stádas Scortha:\n" @@ -2476,7 +2841,7 @@ msgstr "" "blaoisce, nó\n" " sa chás go bhfuil SLONN neamhbhailí." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2499,23 +2864,77 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" +"Athraigh comhadlann oibre na blaoisce.\n" +" \n" +" Athraíonn \"cd\" an chomhadlann reatha go COMHADLANN. Is é luach na " +"hathróige\n" +" blaoisce HOME an réamhshocrú le haghaidh COMHADLANN.\n" +" \n" +" Sainmhíníonn an athróg CDPATH an chonair chuardaigh don chomhadlann ina\n" +" bhfuil COMHADLANN. Cuirtear idirstad (:) idir ainmneacha malartacha\n" +" comhadlainne i CDPATH.\n" +" Is ionann ainm comhadlainne folamh agus an chomhadlann reatha. Má " +"thosaíonn\n" +" COMHADLANN le slaiste (/), ní usáidtear CDPATH.\n" +" \n" +" Mura aimsítear an chomhadlann, agus má ta an athróg bhlaoisce " +"\"cdable_vars\"\n" +" socruithe, glactar leis an bhfocal mar ainm athróige. Má tá luach ag an " +"athróg\n" +" sin, úsáidtear a luach i gcomhair COMHADLANN.\n" +" \n" +" Roghanna:\n" +" -L\tLean naisc shiombalaigh. Taifigh naisc shiombalaigh i COMHADLANN\n" +" \t\ttar éis gach \"..\" a phróiseáil. -P\tÚsáid an chomhadlann " +"fhisiciúil gan naisc shiombalaigh a leanúint.\n" +" \t\tTaifigh naisc shiombalaigh i COMHADLANN roimh \"..\" a " +"phróiseáil.\n" +" -e\tMá tá an rogha -P ann, agus mura féidir an chomhadlann oibre " +"reatha\n" +" \t\ta dhéanamh amach i gceart, scoir le stádas nach náid é.\n" +" -@\tMá thacaíonn an córas leis, taispeáin comhad le haitreabúidí " +"bhreisithe\n" +" \t\tmar chomhadlann ina bhfuil na haitreabúidí bhreisithe.\n" +" \n" +" Leantar naisc shiombalaigh ar bhonn réamhshocraithe, mar a bheadh -L " +"ann.\n" +" Chun \"..\" a phróiseáil, baintear páirt na conaire díreach roimhe siar " +"go\n" +" slaiste (/) nó go tús COMHADLANN.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear 0 má athraíodh an chomhadlann, agus má d'éirigh le socrú " +"$PWD\n" +" nuair a úsáidtear -P; i gcásanna eile aischuirtear luach nach náid é." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2528,16 +2947,17 @@ msgstr "" " \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" +" \toibre reatha.\n" +" -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" +" 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" +" Aischuirtear luach de 0 ach sa chás go dtugtar rogha neamhbhailí nó nach " +"féidir\n" " an chomhadlann reatha a léamh." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2553,7 +2973,7 @@ msgstr "" " Stadas Scortha:\n" " Éiríonn leis i gcónaí." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2565,7 +2985,7 @@ msgstr "" " Stádas Scortha:\n" " Éiríonn leis i gcónaí." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2577,7 +2997,7 @@ msgstr "" " Stádas Scortha:\n" " Teipeann air i gcónaí." -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2587,33 +3007,34 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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" +"Ritheann \"command\" ordú simplí nó taispeánann eolas maidir le horduithe.\n" " \n" -" Ritheann ORDÚ le hARGÓINTÍ gan cuardach feidhme blaoisce, nó " -"taispeánann\n" +" Ritear ORDÚ le hARGÓINTÍ gan cuardach feidhme blaoisce, nó taispeántar\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 " +" -p\túsáidtear 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" +" -v\ttaispeántar cur síos ar ORDÚ cosúil leis an ordú ionsuite 'type'\n" +" -V\ttaispeántar cur síos níos faide ar gach ORDÚ\n" " \n" " Stádas Scortha:\n" -" Aischuirtear an stádas scortha ó ORDÚ, nó teip mura aimsítear ORDÚ." +" Aischuirtear an stádas scortha ó ORDÚ, nó teip sa chás nach n-aimsítear " +"ORDÚ." -#: builtins.c:476 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2623,17 +3044,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2643,23 +3069,65 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" +"Socraíonn \"declare\" luachanna agus airíonna athróige.\n" +" \n" +" Fograíonn \"declare\" athróga agus tugann sé aitreabúidí dóibh. Gan\n" +" AINMneacha, taispeántar a luach agus a haitreabúidí le haghaidh gach " +"athróg.\n" +" \n" +" Roghanna:\n" +" -f\tGníomh nó taispeáint srianta le hainmneacha feidhmeanna agus " +"sainithe.\n" +" -F\tGníomh le hainmneacha feidhmeanna amháin (móide uimhir líne agus\n" +" \t\tcomhad foinse le linn dífhabhtaithe).\n" +" -g\tCruthaítear athróga comhchoiteanna nuair a úsáidtear é laistigh " +"de\n" +" \t\tfheidhm bhlaoisce; déantar neamhaird de i gcásanna eile.\n" +" -p\tTaispeántar a luach agus a haitreabúidí le haghaidh gach AINM.\n" +" \n" +" Roghanna a shocraíonn aitreabúidí:\n" +" -a\tAINMneacha mar eagair innéacsaithe (má thacaítear leo)\n" +" -A\tAINMneacha mar eagair chomhthiomsaitheacha (má thacaítear leo)\n" +" -i\tCuirtear an aitreabúid \"integer\" (.i. slonnuimhir) le " +"hAINMneacha.\n" +" -l\tTiontaítear luach gach AINM go cás íochtair agus é á shannadh.\n" +" -n\tBíodh AINM ina thagairt don athróg ainmnithe ag a luach.\n" +" -r\tBíodh AINMneacha inléite amháin.\n" +" -t\tCuirtear an aitreabúid \"trace\" (.i. lorg) le hAINMneacha.\n" +" -u\tTiontaítear luach gach AINM go cás uachtair agus é á shannadh.\n" +" -x\tEaspórtálfar na hAINMneacha as seo amach.\n" +" \n" +" Le \"+\" in áit \"-\", múchtar an aitreabúid shonraithe.\n" +" \n" +" Má tá an aitreabúid \"integer\" ag athróg, déantar luacháil " +"uimhríochtuil\n" +" (feic an t-ordú \"let\") nuair a shanntar leis an athróg.\n" +" \n" +" Nuair a úsáidtear \"declare\" laistigh de fheidhm, beidh na hAINMneacha\n" +" logánta, mar a bheadh leis an t-ordú \"local\". Stopann an rogha \"-g\" " +"é seo.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí, nó go\n" +" dtarlaíonn earráid shannta." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -"Socraigh luachanna agus airíonna athróg.\n" +"Socraíonn \"typeset\" luachanna agus airíonna athróige.\n" " \n" -" Imithe i léig. Feic \"help declare\"." +" Comhchiallach le \"declare\". Feic \"help declare\"." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2670,30 +3138,32 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" -"Sainigh athróga logánta.\n" +"Sainíonn \"local\" 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" +" Cruthaítear athróg logánta darbh ainm AINM, agus cuirtear LUACH leis.\n" +" Is féidir ceann ar bith de na roghanna a ghlacann \"declare\" leo a " +"úsáid\n" +" mar ROGHA.\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." +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí, nó go " +"dtarlaíonn earráid,\n" +" nó go bhfuil an bhlaosc ag rith feidhme." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2705,6 +3175,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2712,26 +3183,35 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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" +"Scríobhann \"echo\" 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" +" Taispeántar na hARGÓINTÍ ar an ngnáthaschur le carachtair spáis eatarthu " +"agus\n" +" 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" +" -n\tní hiarcheanglaítear líne nua\n" +" -e\tcumasaítear na héaluithe cúlslaise thíos\n" +" -E\tdíchumasaítear 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" +" \\E\tcaractar éalaithe\n" " \\f\tfotha foirme\n" " \\n\tlíne nua\n" " \\r\taisfhilleadh carráiste\n" @@ -2740,15 +3220,21 @@ msgstr "" " \\\\\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" +" \t\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" +" \t\tféidir le HH bheith 1 nó 2 digit heicsidheachúlach ar fhad.\n" +" \\uHHHH\tan carachtar Unicode leis an luach heicsidheachúlach HHHH.\n" +" \t\tIs féidir le HHHH bheith ó 1 go 8 digit heicsidheachúlach ar fhad.\n" +" \\UHHHHHHHHan carachtar Unicode leis an luach heicsidheachúlach " +"HHHHHHHH.\n" +" \t\tIs féidir le HHHHHHHH bheith ó 1 go 8 digit heicsidheachúlach ar " +"fhad.\n" " \n" " Stádas Scortha:\n" " Aischuirtear rath ach i gcás earráide scríofa." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2770,7 +3256,7 @@ msgstr "" " Stádas Scortha:\n" " Aischuirtear rath ach i gcás earráide scríofa." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2797,7 +3283,7 @@ msgid "" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2817,7 +3303,7 @@ msgstr "" " Aischuirtear stádas scortha an ordaithe, nó rath más ordú neamhnitheach " "é." -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2850,15 +3336,15 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2869,8 +3355,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2880,8 +3366,27 @@ msgid "" " Returns success unless COMMAND is not found or a redirection error " "occurs." msgstr "" +"Cuir an t-ordú sonraithe in áit na blaoisce.\n" +" \n" +" Ritear ORDÚ, agus an ríomhchlár sonraithe curtha in áit na blaoisce " +"seo.\n" +" Úsáidtear na hARGÓINTÍ mar argóintí don ORDÚ. Gan ÓRDÚ, cuirtear\n" +" atreoruithe i bhfeidhm sa bhlaosc reatha.\n" +" \n" +" Roghanna:\n" +" -a AINM\túsáidtear AINM mar argóint uimhir a náid don ORDÚ.\n" +" -c\tritear ORDÚ le timpeallacht fholamh\n" +" -l\tcuirtear fleiscín mar argóint uimhir a náid don ORDÚ.\n" +" \n" +" Sa chás nach féidir an t-ordú a rith, scoirfidh blaosc " +"neamhidirghníomhach,\n" +" mura bhfuil an rogha blaoisce 'execfail' socruithe.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás nach bhfaightear ORDÚ nó go dtarlaíonn\n" +" earráid atreoraithe." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -2893,7 +3398,7 @@ msgstr "" " 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2906,7 +3411,7 @@ msgstr "" " 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 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2951,17 +3456,18 @@ msgstr "" " -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" +" 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" +" 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." +" Stádas Scortha:\n" +" Aischuirtear rath nó stádas an ordaithe rite; neamh-nialas má tharlaíonn " +"earráid." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2972,17 +3478,18 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" -"Bog jab go dtí an tulra.\n" +"Bog tasc go dtí an tulra.\n" " \n" -" Cuir an jab a shonraítear le SONRÚ_JAB sa tulra agus é mar an jab " +" Cuirtear an tasc a shonraítear le SONRÚ_TASC sa tulra agus é mar an tasc " "reatha.\n" -" Mura bhfuil SONRÚ_JAB ann, úsáidtear cibé jab atá reatha de réir na " +" Mura bhfuil SONRÚ_TASC ann, úsáidtear cibé tasc 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." +" Aischuirtear stádas an ordaithe a cuireadh sa tulra, nó teip má " +"tharlaíonn earráid." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2995,18 +3502,18 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" -"Bog jabanna go dtí an cúlra.\n" +"Bog tascanna 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 " +" Cuirtear an tasc a shonraítear le SONRÚ_TASC sa chúlra cosúil le é a " +"thosú le '&'.\n" +" Mura bhfuil SONRÚ_TASC ann, úsáidtear cibé tasc 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." +" Aischuirtear rath ach sa chás go dtarlaíonn earráid nó nach bhfuil\n" +" rialú tascanna cumasaithe." -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -3015,22 +3522,44 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"Cuimhnigh ar nó taispeáin suíomhanna ríomhchláracha.\n" +" \n" +" Faigh agus cuimhnigh ar an gconair iomlán le haghaidh gach AINM.\n" +" Gan argóintí, taispeántar eolas maidir le orduithe a bhfuil cuimhne " +"orthu.\n" +" \n" +" Roghanna:\n" +" -d\tDéantar dearmad ar shuíomh gach AINM.\n" +" -l\tTaispeáintear i bhformáid atá inúsáidte mar ionchur.\n" +" -p CONAIR\tÚsáidtear CONAIR mar an gconair iomlán le haghaidh AINM.\n" +" -r\tDéantar dearmad ar gach shuíomh atá coinnithe i gcuimhne.\n" +" -t\tPriontáiltear an suíomh atá i gcuimhne le haghaidh gach AINM, " +"agus\n" +" \t\tcuirtear AINM roimh a shuíomh má thugtar níos mó ná AINM amháin. " +"Argóintí:\n" +" AINM\tLorgaítear gach AINM i $PATH agus cuirtear le liosta na n-" +"orduithe\n" +" \t\tatá coinnithe i gcuimhne é.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás nach n-aimsítear AINM, nó go bhfuil\n" +" rogha neamhbhailí ann." -#: builtins.c:792 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3042,10 +3571,10 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " @@ -3059,9 +3588,10 @@ msgstr "" " 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" +" -d\ttaispeántar cur síos gairid ar gach ábhar\n" +" -m\ttaispeántar úsáid i bhformáid cosúil leis an lámhleabhar man(1)\n" +" -s\tní thaispeántar ach achoimre gairid úsáide le haghaidh gach ábhair " +"a\n" " \tmheatseálann PATRÚN\n" " \n" " Argóintí:\n" @@ -3071,7 +3601,7 @@ msgstr "" " Aischuirtear rath ach sa chás nach n-aimsítear PATRÚN nó go dtugtar\n" " rogha neamhbhailí." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3080,23 +3610,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3105,7 +3636,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3114,8 +3645,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3128,8 +3659,31 @@ msgid "" " 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 +"Taispeáin stádas tascanna.\n" +" \n" +" Liostáiltear na tascanna gníomhacha. Le SONRÚ_TAISC, ní thaispeántar ach " +"an tasc sin.\n" +" Gan roghanna, taispeántar stádas gach tasc gníomhach.\n" +" \n" +" Roghanna:\n" +" -l\tliostáiltear aitheantais na bpróiseas chomh maith leis an ngnáth-" +"eolas.\n" +" -n\tní liostáiltear ach na próisis le stádas athruithe ón chéad fógra " +"roimhe seo\n" +" -p\tliostáiltear aitheantais na bpróiseas amháin\n" +" -r\tní liostáiltear ach tascanna atá ag rith\n" +" -s\tní liostáiltear ach tascanna atá stoptha\n" +" \n" +" Le -x, ritear ORDÚ tar éis gach SONRÚ_TAISC atá in ARGÓINTÍ a athrú go " +"aitheantas\n" +" próisis an phríomh-phróisis i ngrúpa próiseas an taisc sin.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbailí nó go " +"dtarlaíonn earráid.\n" +" Má úsáidtear -x, aischuirtear an stádas scortha ó ORDÚ. " + +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3139,28 +3693,29 @@ msgid "" " 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" +" \t\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" +"Bain tascanna 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" +" Baintear gach SONRÚ_TAISC den tábla de tascanna gníomhacha. Gan\n" +" SONRÚ_TAISC ar bith úsáidtear an tasc 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" +" -a\tbaintear gach tasc mura sholáraítear SONRÚ_TAISC\n" +" -h\tmarcáiltear gach SONRÚ_TAISC sa chaoi nach seolfar SIGHUP chuige " +"má\n" " \tfhaigheann an bhlaosc féin SIGHUP\n" -" -r\tná bain ach jabanna atá ag rith\n" +" -r\tní bhaintear ach tascanna atá ag rith\n" " \n" " Stádas Scortha:\n" -" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí\n" -" nó SONRÚ_JAB neamhbhailí." +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí nó " +"SONRÚ_TAISC neamhbhailí." -#: builtins.c:898 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3172,7 +3727,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3181,8 +3737,36 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Seol comhartha chuig tasc.\n" +" \n" +" Seoltar an comhartha ainmnithe ag SONRÚ_COMHARTHA nó UIMHIR_CHOMHARTHA " +"go dti\n" +" an tasc sonraithe le AITHEANTAS_PRÓISIS nó SONRÚ_TAISC. Mura bhfuil " +"SONRÚ_COMHARTHA\n" +" nó UIMHIR_CHOMHARTHA ann, úsáidtear SIGTERM.\n" +" \n" +" Roghanna:\n" +" -s SONRÚ_COMHARTHA\n" +"Is ainm comhartha é SONRÚ_COMHARTHA\n" +" -n UIMHIR_COMHARTHA\n" +"Is uimhir chomhartha é SONRÚ_COMHARTHA\n" +" -l\tLiostáiltear ainmneacha na gcomharthaí. Má tá argóintí i ndiadh \"-" +"l\",\n" +" \t\tglactar leo mar uimhreacha comharthaí agus taispeántar a n-" +"ainmneacha.\n" +" -L\tMar an gcéanna le \"-l\"\n" +" \n" +" Tá \"kill\" ina ordú ionsuite blaoisce ar dhá chúis: is féidir " +"aitheantais\n" +" tascanna a úsáid in ionad aitheantais próiseas, agus is féidir próisis a " +"stopadh\n" +" fiú má tá uasmhéid na bpróiseas a bhfuil cead agat a chruthú sroichte " +"agat.\n" +" Stádas Scortha:\n" +" Aischuirtear rath muna bhfuil rogha neamhbhailí ann nó muna tharla " +"earráid." -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3224,10 +3808,10 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" -#: builtins.c:966 +#: builtins.c:994 msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -3238,7 +3822,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3248,34 +3834,38 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3297,7 +3887,7 @@ msgstr "" " Aischuirtear N, nó teip sa chás nach bhfuil an bhlaosc ag rith feidhme " "nó scripte." -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3363,9 +3953,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3379,7 +3973,7 @@ msgid "" " Returns success unless an invalid option is given." msgstr "" -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3388,6 +3982,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3399,7 +3995,7 @@ msgid "" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3417,8 +4013,25 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Socraíonn \"export\" an aitreabúid easpórtála le haghaidh athróga blaoisce.\n" +" \n" +" Marcáiltear gach AINM le haghaidh easpórtáil uathoibríoch go dtí " +"timpeallacht\n" +" na n-orduithe a ritear ina dhiaidh sin. Má sonraítear LUACH, sann LUACH\n" +" roimh easpórtáil.\n" +" \n" +" Roghanna:\n" +" -f\tcuirtear an aitreabúid i bhfeidhm ar feidhmeanna blaoisce\n" +" -n\tbaintear an aitreabúid ó gach AINM\n" +" -p\tpriontáiltear liosta de athróga agus feidhmeanna easpórtáilte\n" +" \n" +" Cuireann argóint de '--' deireadh le próiseáil na hargóintí.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí nó go bhfuil " +"AINM neamhbhailí." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3430,7 +4043,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3438,7 +4052,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3448,8 +4062,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Iomlaoidigh paraiméadair ionaid.\n" +" \n" +" Athainmnítear na paraiméadair ionaid $N+1,$N+2 ... mar $1,$2 ...\n" +" Gan N, glactar leis mar 1.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go bhfuil N diúltach, nó níos mó ná $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3462,8 +4083,19 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"Rith orduithe ó chomhad sa bhlaosc reatha.\n" +" \n" +" Léitear agus ritear orduithe ó AINM_CHOMHAID sa bhlaosc reatha.\n" +" Úsáidtear na hiontrálacha i $PATH chun an chomhadlann ina bhfuil\n" +" AINM_CHOMHAID a aimsiú. Má shonraítear ARGÓINTÍ, cuirtear iad mar\n" +" paraiméadair ionaid agus AINM_CHOMHAID á rith.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh in " +"AINM_COMHAID.\n" +" Teipeann air sa chás nach féidir AINM_CHOMHAID a léamh." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3476,15 +4108,31 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Cuir rith na blaoisce ar fionraí.\n" +" \n" +" Cuirtear rith na blaoisce seo ar fionraí go dtí go bhfaigheann sí\n" +" comhartha SIGCONT. Gan iallach, ní féidir blaosc logála isteach a\n" +" chur ar fionraí.\n" +" \n" +" Roghanna:\n" +" -f\tcuirtear iallach ar an t-ordú, fiú más blaosc logála isteach atá " +"ann.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás nach bhfuil rialú tascanna cumasaithe,\n" +" nó go dtarlaíonn earráid." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3538,6 +4186,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3554,7 +4205,7 @@ msgid "" " false or an invalid argument is given." msgstr "" -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -3567,7 +4218,7 @@ msgstr "" " 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 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3587,7 +4238,7 @@ msgstr "" " Stádas Scortha:\n" " Éiríonn leis i gcónaí." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3603,7 +4254,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3623,7 +4282,7 @@ msgid "" "given." msgstr "" -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3632,18 +4291,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3653,7 +4312,7 @@ msgid "" "found." msgstr "" -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -3671,6 +4330,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3682,6 +4342,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3697,7 +4362,7 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3714,39 +4379,108 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Taispeáin nó socraigh masc mhód na gcomhad.\n" +" \n" +" Athraítear masc cruthaithe comhaid an úsáideora go MÓD. Gan MÓD,\n" +" taispeántar luach reatha an mhaisc.\n" +" \n" +" Ma thosaíonn MÓD le digit, glactar leis mar uimhir ochtnártha;\n" +" i gcásanna eile is teaghrán móid shiombalaigh é cosúil leis na cinn\n" +" a ghlacann chmod(1) leo.\n" +" \n" +" Roghanna:\n" +" -p\tgan mód, bíodh an aschur i bhformáid atá inúsáidte mar ionchur\n" +" -S\taschur siombalach; seachas sin aschuirfear uimhir ochtnártha\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go bhfuil MÓD neamhbhailí\n" +" nó go sonraítear rogha neamhbhailí." -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Fanann \"wait\" go gcríochnaíonn tasc agus aischuireann a stádas scortha.\n" +" \n" +" Fantar le gach próiseas ata sonraithe le AITHEANTAS, a d'fhéadann a " +"bheith\n" +" ina aitheantas próisis nó sonrú taisc, agus tuairiscítear a stádas " +"críochnaithe.\n" +" Gan AITHEANTAS, fantar le gach macphróiseas gníomhach reatha, agus " +"aischuirtear 0.\n" +" Más sonrú taisc atá in AITHEANTAS, fantar le gach próiseas i bpíblíne an " +"taisc sin.\n" +" \n" +" Má sonraítear an rogha -n, fantar leis an gcéad tasc eile a stopann " +"agus\n" +" aischuirtear a stádas scortha.\n" +" \n" +" Má sonraítear an rogha -f agus má tá rialú jabanna cumasaithe, fantar go " +"dtí\n" +" go stopann an AITHEANTAS sonraithe, in áit fanadh le athrú stádais sa " +"tasc sin.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an AITHEANTAIS dheireanaigh. Teipeann ar an ordú má " +"tá\n" +" AITHEANTAS neamhbhailí nó má sonraítear rogha neamhbhailí." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" +"Fanann \"wait\" go gcríochnaíonn próiseas agus aischuireann an stádas " +"scortha.\n" +" \n" +" Fantar le gach próiseas atá sonraithe le AITHEANTAS_PRÓISIS, agus\n" +" tuairiscítear a stádais chríochnaithe. Gan AITHEANTAS_PRÓISIS, fantar\n" +" le gach macphróiseas gníomhach reatha, agus aischuirtear 0.\n" +" Ní mór d'AITHEANTAS_PRÓISIS bheith ina aitheantas próisis.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an AITHEANTAIS dheireanaigh. Teipeann ar an\n" +" ordú má tá AITHEANTAS_PRÓISIS neamhbhailí nó má shonraítear\n" +" rogha neamhbhailí." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3758,8 +4492,17 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Rith orduithe le haghaidh gach mír i liosta.\n" +" \n" +" Ritheann an lúb 'for' sraith ordaithe le haghaidh gach mír i liosta\n" +" míreanna. Gan 'in WORDS ...;', úsáidtear 'in \"$@\"'.\n" +" Le haghaidh gach eilimint i bhFOCAIL, tugtar an luach sin do AINM agus\n" +" ritear na hORDUITHE.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3780,7 +4523,7 @@ msgstr "" " Mar an gcéanna le\n" " \t(( SLONN1 ))\n" " \twhile (( SLONN2 )); do\n" -" \t\tORDAITHE\n" +" \t\tORDUITHE\n" " \t\t(( SLONN3 ))\n" " \tdone\n" " Is sloinn uimhreachtúla iad SLONN1, SLONN2 agus SLONN3.\n" @@ -3790,7 +4533,7 @@ msgstr "" " Stádas Scortha:\n" " Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3810,7 +4553,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3825,8 +4568,21 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"Tuairscíonn \"time\" tréimhse rite píblíne.\n" +" \n" +" Ritear PÍBLÍNE agus taispeántar achoimre den fhíor-am, am LAP\n" +" an úsáideora agus am LAP an chórais a chaitheadh ag rith PÍBLÍNE\n" +" nuair a stopann sí.\n" +" \n" +" Roghanna:\n" +" -p\tTaispeántar an achoimre sa bhformáid iniompartha POSIX.\n" +" \n" +" Úsáidtear luach na hathróige TIMEFORMAT don fhormáid aschuir.\n" +" \n" +" Stádas Scortha:\n" +" Is é stadas aischuir PÍBLÍNE an stádas aischuir ó \"time\"." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3836,8 +4592,15 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Rith orduithe de réir mheaitseála patrún.\n" +" \n" +" Ritear ORDUITHE de réir mar a mheaitseálann FOCAL an PATRÚN.\n" +" Úsáidtear '|' chun na patrúin a dheighilt.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3857,30 +4620,62 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Ritheann \"if\" orduithe de réir na sloinn choinníllocha.\n" +" \n" +" Ritear an liosta \"if ORDUITHE\". Má tá stádas scortha de náid aige,\n" +" ritear an liosta \"then ORDUITHE\". Le stádais eile, ritear gach liosta\n" +" \"elif ORDUITHE\" ceann ar cheann, agus má tá stádas scortha de náid ag\n" +" ceann acu ritear an liosta \"then ORDUITHE\" cuí agus ansin tá deireadh\n" +" leis an ordú \"if\".\n" +" I gcásanna eile, ritear an liosta \"else ORDUITHE\", más ann dó.\n" +" Is é stádas an chomhstruchtúir iomláin stádas scortha an ordaithe\n" +" dheireanaigh a ritheadh, nó náid sa chás nach raibh coinníoll\n" +" ar bith fíor.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas scortha an ordaithe dheireanaigh a ritheadh." -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" - -#: builtins.c:1592 +"Rith orduithe chomh fada agus a éiríonn le tástáil.\n" +" \n" +" Fairsingítear agus ritear ORDUITHE2 chomh fada agus atá stádas scortha\n" +" de náid ag an t-ordú deireanach sna hORDUITHE1 a leanann 'while'.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe deireanach a ritheadh." + +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" - -#: builtins.c:1604 +"Rith orduithe chomh fada agus a theipeann ar tástáil.\n" +" \n" +" Fairsingítear agus ritear ORDUITHE chomh fada agus atá stádas scortha\n" +" nach náid é ag an t-ordú deireanach sna hORDUITHE 'until'.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an ordaithe deireanach a ritheadh." + +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3890,10 +4685,19 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Cruthaíonn \"coproc\" comhphróiseas ainmnithe AINM.\n" +" \n" +" Ritear ORDÚ go haisioncronach. Beidh gnáthaschur agus gnáthionchur\n" +" an ordaithe ceangailte trí phíopa le tuairisceoirí comhaid a bheidh\n" +" sannta do innéacsanna 0 agus 1 de eagar athróga ainmnithe AINM sa\n" +" bhlaosc atá ag rith. Is é \"COPROC\" an tAINM réamhshocraithe.\n" +" \n" +" Stádas Scortha:\n" +" Aischuireann an t-ordú \"coproc\" stádas scortha de 0." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3917,7 +4721,7 @@ msgstr "" " Stádas Scortha:\n" " Aischuirtear rath mura bhfuil AINM inléite amháin." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3935,7 +4739,7 @@ msgstr "" " Stádas Scortha:\n" " Aischuirtear stádas an ordaithe dheireanaigh a ritheadh." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3948,19 +4752,38 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" - -#: builtins.c:1659 +"Tosaigh tasc arís sa tulra.\n" +"\n" +" Is ionann é seo agus an argóint SONRÚ_TAISC don ordú 'fg'.\n" +" Atosaítear tasc atá stoptha nó sa chúlra. Sonraíonnn SONRÚ_TAISC\n" +" ainm nó uimhir taisc. Má leanann '&' SONRÚ_TAISC, ritear an tasc sa\n" +" chúlra, cosúil leis an tasc a chur mar argóint le 'bg'.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear stádas an taisc atosaithe." + +#: builtins.c:1727 +#, fuzzy msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"Faigh luach sloinn uimhríochtúil.\n" +" \n" +" Faightear luach an tSLOINN de réir na rialacha a bhaineann le\n" +" luacháil uimhríochtúil. Tá an t-ordú seo mar an gcéanna le\n" +" \"let SLONN\".\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear 1 más 0 an luach atá ag SLONN; aischuirtear 0 i gcásanna " +"eile." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3988,7 +4811,7 @@ msgid "" " 0 or 1 depending on value of EXPRESSION." msgstr "" -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4041,8 +4864,60 @@ msgid "" " 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 +"Ainmneacha na n-athróg coitianta agus a n-úsáid. \n" +" BASH_VERSION\tEolas maidir le leagan an Bash seo.\n" +" CDPATH\tLiosta deighilte le hidirstaid de chomhadlanna ina dhéanfar\n" +" \t\tcuardach ar chomhadlanna a shonraítear mar argóintí do \"cd\".\n" +" GLOBIGNORE\tLiosta deighilte le hidirstaid de phatrúin a dhéanann cur\n" +" \t\tsíos ar ainmneacha na gcomhad a thabharfar neamhaird orthu.\n" +" HISTFILE\tAinm an chomhaid ina bhfuil stair do chuid orduithe.\n" +" HISTFILESIZE\tUasmhéid na línte don chomhad staire.\n" +" HISTSIZE\tUasmhéid na línte staire atá ar fáil do bhlaosc atá ag rith.\n" +" HOME\tConair iomlán do chomhadlann logála isteach.\n" +" HOSTNAME\tAinm an ríomhaire reatha.\n" +" HOSTTYPE\tCineál an LAP ar a bhfuil an Bash seo ag rith.\n" +" IGNOREEOF\tRialaíonn sé seo cad a dhéanfaidh an bhlaosc nuair\n" +" \t\ta fhaigheann sí carachtar EOF mar an t-aon ionchur.\n" +" \t\tMá tá sé socraithe, glactar leis a luach mar líon na\n" +" \t\tgcarachtar EOF atá ceadaithe i ndiaidh a chéile ar líne folamh\n" +" \t\tsula scoirfidh an bhlaosc (10 mar réamhshocrú). Mura\n" +" \t\tbhfuil sé socruithe, cialaíonn EOF deireadh an ionchuir.\n" +" MACHTYPE\tTeaghrán ina bhfuil cur síos ar an gcóras ar a bhfuil\n" +" \t\tan Bash seo ag rith.\n" +" MAILCHECK\tCé chomh minic, i soicind, a chuardaíonn Bash ríomhphost " +"nua.\n" +" MAILPATH\tLiosta deighilte le hidirstaid de chomhadainmneacha a\n" +" \t\tsheiceálann Bash le haghaidh ríomhphost nua.\n" +" OSTYPE\tLeagan Unix ar a bhfuil an bhlaosc seo ag rith.\n" +" PATH\tLiosta deighilte le hidirstaid de chomhadlanna a chuardaíonn Bash\n" +" \t\tagus orduithe á lorg aige.\n" +" PROMPT_COMMAND\tOrdú atá le rith roimh priontáil gach phríomhleide.\n" +" PS1\t\tTeaghrán na príomhleide.\n" +" PS2\t\tTeaghrán na leide tánaistí.\n" +" PWD\t\tConair iomlán na comhadlainne reatha.\n" +" SHELLOPTS\tLiosta deighilte le hidirstaid de na roghanna blaoisce\n" +" \t\tatá cumasaithe.\n" +" TERM\tCineál an teirminéil reatha.\n" +" TIMEFORMAT\tAn fhormáid aschuir le haghaidh na staitisticí ama a\n" +" \t\tthaispeánann an focal coimeádta \"time\".\n" +" auto_resume\tCialaíonn neamhnialais go gcuardaítear focal ordaithe\n" +" \t\tatá ar líne leis féin sa liosta reatha de tascanna stoptha\n" +" \t\tar dtús. Más ann dó, cuirtear an tasc sin sa tulra.\n" +" \t\tCialaíonn luach de \"exact\" go bhfuil meaitseáil dhíreach le\n" +" \t\thordú sa liosta reatha de tascanna stoptha riachtanach.\n" +" \t\tCialaíonn luach de \"substring\" go bhfuil meaitseáil le\n" +" \t\tfo-theaghrán den tasc riachtanach.\n" +" \t\tCialaíonn luach ar bith eile go gaithfidh an t-ordu bheith\n" +" \t\tina réimír de tasc stoptha.\n" +" histchars\tNa carachtair a rialaíonn fairsingiú staire agus\n" +" \t\tionadú mear. Is é an chéad charactar an ceann le haghaidh\n" +" \t\tfairsingiú staire, \"!\" de ghnáth. Is é an dara charactar an\n" +" \t\tceann le haghaidh ionadú mear, \"^\" de ghnáth. Is é an triú\n" +" \t\tceann an carachtar \"nóta tráchta staire\", \"#\" de ghnáth.\n" +" HISTIGNORE\tLiosta deighilte le hidirstaid de phatrúin a shonraíonn\n" +" \t\tna horduithe a chuirfear leis an liosta staire.\n" + +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -4052,19 +4927,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4072,8 +4947,36 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Cuir comhadlanna ar an gcruach.\n" +" \n" +" Cuireann comhadlann ar bharr na cruaiche comhadlanna, nó rothlaíonn\n" +" an chruach, ag cur barr nua na cruaiche mar an chomhadlann oibrithe\n" +" reatha. Gan argóintí, malartaítear an dá chomhadlann ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh clé an liosta a thaispeánann \"dirs\" agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" -N\tRothlaítear an chruach sa chaoi go mbeidh an Nú chomhadlann (ag\n" +" \tcomhaireamh ó thaobh deas an liosta a thaispeánann \"dirs\" agus ag " +"tosú\n" +" \tó náid) ar bharr.\n" +" \n" +" COMHADLANN\tCuirtear COMHADLANN ar bharr na cruaiche, agus socraítear\n" +" \tí mar an chomhadlann oibrithe reatha.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann. \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go sonraítear argóint neamhbhailí, nó\n" +" go dteipeann ar an athrú comhadlainne." -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -4082,16 +4985,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4099,8 +5002,37 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Bain comhadlanna ón gcruach.\n" +" \n" +" Baintear comhadlanna ón gcruach comhadlanna. Gan argóintí, baintear an\n" +" chomhadlann ó bharr na cruaiche, agus téann go dtí an chomhadlann\n" +" atá ar bharr.\n" +" \n" +" Roghanna:\n" +" -n\tNá déantar an gnáthathrú comhadlainne agus comhadlanna á gcur\n" +" \tleis an gcruach; ní athraítear ach an chruach.\n" +" \n" +" Argóintí:\n" +" +N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh clé an liosta\n" +" \ta thaispeánann \"dirs\" agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd +0\" an chéad chomhadlann, agus \"popd +1\" an dara cheann.\n" +" \n" +" -N\tBaintear an Nú chomhadlann ag comhaireamh ó thaobh deas an liosta\n" +" \ta thaispeánann \"dirs\" agus ag tosú ó náid. Mar shampla, baineann\n" +" \t\"popd -0\" an chomhadlann dheireanach, agus \"popd -1\" an ceann\n" +" \tleathdheireanach.\n" +" \n" +" \n" +" COMHADLANN\tCuirtear COMHADLANN ar bharr na cruaiche, agus socraítear\n" +" \tí mar an chomhadlann oibrithe reatha.\n" +" \n" +" Taispeánann an t-ordú ionsuite \"dirs\" cruach na gcomhadlann.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go sonraítear argóint neamhbhailí, nó\n" +" go dteipeann ar an athrú comhadlainne." -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -4111,32 +5043,59 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Taispeáin cruach na gcomhadlann.\n" +" \n" +" Taispeáin liosta na gcomhadlann a bhfuil cuimhne orthu faoi láthair.\n" +" Cuirtear comhadlanna ar an liosta leis an ordú 'pushd'. Is féidir dul\n" +" siar trín liosta leis an ordú 'popd'.\n" +" \n" +" Roghanna:\n" +" -c\tglantar cruach na gcomhadlann trí gach mhír a bhaint de\n" +" -l\tná priontáiltear na comhadlanna i gcoibhneas le do chomhadlann " +"bhaile\n" +" \tagus le tilde rompu\n" +" -p\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne\n" +" -v\tpriontáiltear cruach na gcomhadlann, mír amháin ar gach líne agus\n" +" \ta háit sa chruach roimpi\n" +" \n" +" Argóintí:\n" +" +N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó thaobh " +"clé\n" +" \tan liosta a thaispeántar le 'dirs' rite gan argóintí, ag tosú ó " +"náid.\n" +" -N\tTaispeántar mír N, agus uimhrithe curtha ar na míreanna ó thaobh " +"deas\n" +" \tan liosta a thaispeántar le 'dirs' rite gan argóintí, ag tosú ó " +"náid.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath muna bhfuil rogha neamhbhailí ann nó muna tharla " +"earráid." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -4149,8 +5108,27 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Socraigh agus díshocraigh roghanna na blaoisce.\n" +" \n" +" Athraítear socrú gach rogha blaoisce AINM_ROGHA. Gan argóintí roghnacha " +"ar bith,\n" +" liostáiltear gach AINM_ROGHA, nó gach rogha blaoisce mura bhfuil " +"AINM_ROGHA\n" +" ann, lena stádas socruithe nó díshocraithe.\n" +" \n" +" Roghanna:\n" +" -o\tbíodh AINM_ROGHA srianta dóibh siúd atá inúsáidte le 'set -o'\n" +" -p\tpriontáiltear gach rogha blaoisce le comhartha dá stádas\n" +" -q\tcuir cosc ar aschur\n" +" -s\tcumasaigh (socraigh) gach AINM_ROGHA\n" +" -u\tdíchumasaigh (díshocraigh) gach AINM_ROGHA\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath má tá AINM_ROGHA cumasaithe. Teipeann ar shopt má " +"thugtar\n" +" rogha neamhbhailí, nó má tá AINM_ROGHA díchumasaithe." -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -4167,12 +5145,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -4180,7 +5169,7 @@ msgid "" " error occurs." msgstr "" -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -4193,21 +5182,25 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -4221,22 +5214,22 @@ msgid "" 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 " +" Tá sé seo ceaptha le húsáid i bhfeidmeanna blaoisce a dhéanann " "iomlánaithe.\n" -" Má thugtar an argóint roghnach FOCAL, cruthaítear iomlánaithe\n" -" atá comhoiriúnach le FOCAL.\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." +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí nó go " +"dtarlaíonn earráid." -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -4245,6 +5238,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4260,8 +5254,36 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Athraíonn nó taispeánann \"compopt\" na roghanna iomlánaithe.\n" +" \n" +" Athraítear na roghanna iomlánaithe le haghaidh gach AINM,\n" +" nó gan AINMneacha taispeántar an t-iomlánú atá á dhéanamh faoi láthair.\n" +" Gan ROGHA ar bith, taispeántar na hiomlánaithe le haghaidh gach AINM\n" +" nó an mionsonrú iomlánaithe reatha.\n" +" \n" +" Roghanna:\n" +" \t-o ROGHA\tSocraítear an rogha iomlánaithe ROGHA le haghaidh gach " +"AINM.\n" +" \t-D\t\tAthraítear roghanna don iomlánú ordaithe \"réamhshocraithe\".\n" +" \t-E\t\tAthraítear roghanna don iomlánú ordaithe \"folamh\".\n" +" \t-I\t\tAthraítear roghanna don iomlánú ar an gcéad focal.\n" +" \n" +" Le \"+o+ in áit \"-o\", múchtar an rogha shonraithe.\n" +" \n" +" Argóintí:\n" +" \n" +" Tagraíonn gach AINM do ordú a bhfuil mionsonrú iomlánaithe sainmhínithe\n" +" dó roimh ré leis an ordú ionsuite \"complete\". Gan AINM, ní mór " +"\"compopt\"\n" +" a ghlaoigh ó fheidhm atá ag déanamh iomlánaithe ag an am, agus " +"athraítear\n" +" na roghanna don déantóir iomlánaithe sin atá ag rith.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí, nó nach\n" +" bhfuil sonrú iomlánaithe ann le haghaih AINM." -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -4272,24 +5294,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -4300,17 +5324,97 @@ msgid "" "or\n" " not an indexed array." msgstr "" +"Léann \"mapfile\" línte ón ngnáthionchur agus cuireann in athróg eagair " +"innéacsaithe iad.\n" +" \n" +" Léann línte ón ngnáthionchur agus cuireann san athróg eagair " +"innéacsaithe\n" +" EAGAR iad, nó léann ón dtuairisceoir comhaid TC má shonraítear -u. Is í " +"an\n" +" athróg MAPFILE an eagar réamhshocraithe.\n" +" \n" +" Roghanna:\n" +" -d TEORMHARCÓIR\tÚsáidtear TEORMHARCÓIR chun deireadh a chur le " +"línte.\n" +" -n COMHAIREAMH\tCóipeáiltear COMHAIREAMH líne ar a mhéid. Más 0 é " +"COMHAIREAMH,\n" +" \t\tcóipeáiltear gach líne.\n" +" -O BUNÚS\tTosaítear ag sannadh go EAGAR ag an innéacs BUNÚS. Is é 0 an " +"BUNÚS\n" +" \t\tréamhshocraithe.\n" +" -s COMHAIREAMH\tDéantar neamhaird de na chéad COMHAIREAMH líne a " +"léitear.\n" +" -t\tBaintear TEORMHARCÓIR ó deireadh gach líne (carachtar líne nua\n" +" réamhshocraithe).\n" +" -u TC\tLéitear línte ón dtuairisceoir comhad TC in áit an " +"ghnáthionchuir.\n" +" -C AISGHLAOCH\tLuacháiltear AISGHLAOCH tar éis gach CANDAM líne a " +"léitear.\n" +" -c CANDAM\tLíon na línte atá le léamh idir glaoanna ar AISGHLAOCH.\n" +" \n" +" Argóintí:\n" +" EAGAR\tAinm an athróige eagair atá le húsáid le haghaidh sonraí " +"comhaid.\n" +" \n" +" Má shonráitear -C gan -c, is é 5000 an CANDAM réamhshocraithe. Agus " +"AISGHLAOCH\n" +" á luacháil, tugtar dó innéacs na céad eiliminte eile atá le sannadh " +"agus\n" +" an líne atá le sannadh don eilimint sin mar argóintí breise.\n" +" \n" +" Gan BUNÚS sonraithe go soiléir, glanfaidh \"mapfile\" EAGAR roimh faic " +"a\n" +" shannadh dó.\n" +" \n" +" Stádas Scortha:\n" +" Aischuirtear rath ach sa chás go sonraítear rogha neamhbhailí, nó go " +"bhfuil\n" +" EAGAR inléite amháin, nó nach eagar innéacsaithe é EAGAR." -#: builtins.c:2001 +#: builtins.c:2086 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" +"Léann línte ó chomhad agus cuireann in athróg eagair iad.\n" " \n" " Comhchiallach le \"mapfile\"." +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: eochair neamhbhailí eagair chomhthiomsaithigh" + +#~ 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 " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: próiseas %5ld (%s) sa phíblíne" + +#~ msgid "Unknown Signal #" +#~ msgstr "Comhartha neamhaithnid #" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Cóipcheart © 2018 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + #~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" #~ msgstr "" #~ "xrealloc: ní féidir %lu beart a athleithdháileadh (%lu beart leithdháilte)" diff --git a/po/gl.gmo b/po/gl.gmo new file mode 100644 index 0000000..ba7923d Binary files /dev/null and b/po/gl.gmo differ diff --git a/po/gl.po b/po/gl.po new file mode 100644 index 0000000..4f1cd40 --- /dev/null +++ b/po/gl.po @@ -0,0 +1,4839 @@ +# Galician translation for bash package. +# Copyright (C) 2011 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Leandro Regueiro , 2011. +# Francisco Diéguez , 2012. +# Fran Dieguez , 2012. +# +# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas +# colaborar connosco, podes atopar máis información en +# +msgid "" +msgstr "" +"Project-Id-Version: bash 4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2012-02-23 14:38+0100\n" +"Last-Translator: Leandro Regueiro \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "subíndice de matriz incorrecto" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: non é posíbel converter a matriz de indizada a asociativa" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: non é posíbel asignar a un índice que non é numérico" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: se debe usar un subíndice ao asignar a unha matriz asociativa" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: non foi posíbel crear: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: non foi posíbel atopar a combinación de teclas " +"para a orde" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: o primeiro carácter que non é espazo en branco non é `\"'" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "no hai un `%c' que peche en %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: falta un `:' separador" + +#: bashline.c:4733 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "%s: non se pode borrar a asignación" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': nome de alias non válido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "no se activó a edición de liña" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': nome de combinación de teclas non válido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: non se pode leer: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': nome de función descoñecido" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s non está asignado a ningunha tecla.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s pódese invocar a través de " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "%s: non se pode borrar a asignación" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "contía de ciclo" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "só ten significado nun ciclo `for', `while' ou `until'" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"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." +msgstr "" +"Devolve o contexto da chamada a subrutina actual.\n" +" \n" +" Sen EXPR, devolve \"$liña $nomeficheiro\". Con EXPR, devolve\n" +" \"$liña $subrutina $nomeficheiro\"; esta información adicional\n" +" pódese usar para fornecer un volcado de pila.\n" +" \n" +" O valor de EXPR indica cantos marcos de chamada se debe retroceder\n" +" antes do actual; o marco inicial é o marco 0.\n" +" \n" +" Estado de Saída:\n" +" Devolve 0 a menos que o shell non estea executando unha función de " +"shell\n" +" ou EXPR sexa non válida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME non está definido" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "demasiados argumentos" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "non hai outro directorio" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD non está definido" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "liña %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "aviso: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uso: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: a opción require un argumento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: requírese un argumento numérico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: non se atopou" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opción non válida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nome de opción non válido" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': non é un identificador válido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "número octal non válido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "número hexadecimal non válido" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "número non válido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: especificación de sinal non válida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': no é un pid ou unha especificación válida de traballo" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variábel de só lectura" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: non é posíbel borrar" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fóra de rango" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "argumento" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s fóra de rango" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: non existe ese traballo" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: no hai control de traballos" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "no ha control de traballos" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: restrinxido" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "restrinxido" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: no é una orde interna do shell" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "erro de escritura: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "erro ao estabelecer os atributos da terminal: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "erro ao obtener os atributos da terminal: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: erro ao obtener o directorio actual: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: especificación de traballo ambigüa" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: non é posíbel borrar: %s é de só lectura" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: non é posíbel borrar" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nome de acción non válido" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: non hai completado de especificación" + +#: builtins/complete.def:696 +msgid "warning: -F option may not work as you expect" +msgstr "aviso: é posíbel que a opción -F non funcione como se espera" + +#: builtins/complete.def:698 +msgid "warning: -C option may not work as you expect" +msgstr "aviso: é posíbel que a opción -C non funcione como se espera" + +#: builtins/complete.def:846 +msgid "not currently executing completion function" +msgstr "non se está executando a función de completado" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "só se pode usar dentro dunha función" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "non se pode use `-f' para facer funcións" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: función de só lectura" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': nome de alias non válido" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: non é posíbel destruír variábeis de matriz desta forma" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: non é posíbel converter unha matriz asociativa a indizada" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "a carga dinámica non está dispoñíbel" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "non é posíbel abrir o obxecto compartido %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "non é posíbel atopar %s no obxecto compartido %s: %s" + +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: non foi cargado dinamicamente" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: non foi cargado dinamicamente" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: non foi posíbel eliminar: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: é un directorio" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: non é un ficheiro regular" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: o ficheiro é demasiado grande" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: non é posíbel executar o ficheiro binario" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: non foi posíbel executar: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "non é un shell de entrada: use `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Hai traballos pendentes.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Hay traballos en execución.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "non foi posíbel atopar a orde" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "especificación de historial" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: non é posíbel abrir o ficheiro temporal: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "actual" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "o traballo %d iniciou sen control de traballo" + +#: 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: a opción require un argumento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "asociación desactivada" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: táboa de asociación baleira\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "coinc\torde\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Orde do shell que coincide coa palabra `" +msgstr[1] "Orde do shell que coincide coas palabras `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"non hai temas de axuda que coincidan con «%s». Probe «help help» ou «man -k " +"%s» ou «info %s»" + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: non foi posíbel abrir: %s" + +#: builtins/help.def:523 +#, 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 ordes do shell están definidas internamente. Teclee `help' para\n" +"ver esta lista.\n" +"Teclee `help nome' para saber máis sobre a función `nome'.\n" +"Use `info bash' para saber máis sobre o shell en xeral.\n" +"Use `man -k' o `info' para saber máis sobre as órdenes que non están nesta " +"lista.\n" +"\n" +"Un asterisco (*) xunto a un nome significa que a orde está desactivada.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "non foi posíbel usar máis dun de -anrw" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "posición no historial" + +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nome de opción non válido" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: fallou a expansión do historial" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: fallou inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "non se permiten outras opcións con «-x»" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: os argumentos deben ser procesos ou IDs de traballos" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Erro descoñecido" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "agardábase unha expresión" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: non é unha matriz indizada" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: especificación de descritor de ficheiro non válida" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descritor de ficheiro non válido: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: conta de liñas non válida" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: orixe de matriz non válido" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: quantum de chamada non válido" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "nome de variábel de matriz baleiro" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "requírese a compatibilidade de variábel de matriz" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': falta o carácter de formato" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': especificación de formato de tempo non válida" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': carácter de formato non válido" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "aviso: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "falta o díxito hexadecimal para \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "falta o díxito unicode para \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "non hai outro directorio" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: límite de argumento non válido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "a pila de directorios está baleira" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "índice da pila de directorios" + +#: builtins/pushd.def:701 +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 "" +"Mostra a lista de directorios actualmente gravados. Os directorios\n" +" gárdanse na lista coa orde `pushd'; pode ir saíndo da\n" +" lista coa orde `popd'.\n" +" \n" +" Opcións:\n" +" -c\tlimpa a pila de directorios, eliminando todos os elementos\n" +" -l\tnon mostra as versións con prefixo de til dos directorios\n" +" \trelativos ao seu directorio inicial\n" +" -p\tmostra a pila de directorios cunha entrada por liña\n" +" -v\tmuestra a pila de directorios cunha entrada por liña coa\n" +" \tsúa posición na pila como prefixo\n" +" \n" +" Argumentos:\n" +" +N\tMostra a N-ésima entrada contando desde a esquerda da\n" +" \tlista mostrada por dirs cando se chama sen opcións,\n" +" \tcomezando desde cero.\n" +" \n" +" -N\tMostra a N-ésima entrada contando desde a dereita da\n" +"\tlista mostrada por dirs cando se chama sen opcións,\n" +"\tcomezando desde cero." + +#: builtins/pushd.def:723 +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 "" +"Engade un directorio ao tope da rima de directorios, ou rota\n" +" a pila, facendo que o novo tope da rima sexa o\n" +" directorio de trabajo actual. Sen argumentos, intercambia\n" +" os dous directorios do tope.\n" +" \n" +" Argumentos:\n" +" +N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda izquierda da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" -N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda derecha da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" \n" +" dir\tagrega DIR á rima de directorios no tope,\n" +" \tfacéndoo o novo directorio de traballo actual.\n" +" \n" +" A orde interna `dirs' mostra a rima de directorios." + +#: builtins/pushd.def:748 +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 da pila de directorios. Sen argumentos, borra\n" +" directorio do tope da pila, e cambia ao novo directorio tope.\n" +" \n" +" Opcións:\n" +" -n\tsuprime o cambio normal de directorio cando se borra\n" +" \tdirectorios da pila, así só se manipula a pila.\n" +" \n" +" Argumentos:\n" +" +N\tBorra a N-ésima entrada contando da esquerda da\n" +" \tlista mostrada por `dirs', comenzando desde cero.\n" +" \tPor exemplo: `popd +0' borra o primeiro directorio, `popd +1'\n" +" \to segundo.\n" +" \n" +" -N\tBorra a N-ésima entrada contando da derecha da\n" +" \tlista mostrada por `dirs', comezando desde cero.\n" +" \tPor exemplo: `popd -0' borra o último directorio, `popd -1'\n" +" \to penúltimo.\n" +" \n" +" A orde interna `dirs' mostra a pila de directorios." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: especificación de tempo de expiración non válida" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "erro de lectura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "só se pode usar «return» nunha función ou guión lido con «source»" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "non é posíbel borrar ao mesmo tempo unha función e unha variábel" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: non é unha variábel de matriz" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: non é unha función" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: non é posíbel borrar" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "conta de shift" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "non é posíbel activar e desactivar opcións do shell simultaneamente" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nome de opción do shell non válido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "requírese un argumento de nome de ficheiro" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: non se atopou o ficheiro" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "non é posíbel suspender" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "non é posíbel suspender un shell de entrada" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s é un alias de `%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s é unha palabra chave do shell\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s é unha función\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s é unha orde interna do shell\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s é unha orde interna do shell\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s é %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s está asociado (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: límite de argumento non válido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': orde errónea" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: non é posíbel obter o límite: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "límite" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: non é posíbel modificar o límite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "número octal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': operador de modo simbólico non válido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': carácter de modo simbólico non válido" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " liña " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "última orde: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Abortando…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "aviso: " + +#: error.c:488 +msgid "unknown command error" +msgstr "erro de orde descoñecido" + +#: error.c:489 +msgid "bad command type" +msgstr "tipo de orde erróneo" + +#: error.c:490 +msgid "bad connector" +msgstr "conector erróneo" + +#: error.c:491 +msgid "bad jump" +msgstr "salto erróneo" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variable sen asignar" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aexpirou mentres agardaba algunha entrada: auto-logout\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "non é posíbel redirixir a saída estándar desde /dev/null: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': carácter de formato non válido" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "erro de canalización" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restrinxido: non se pode especificar `/' en nomes de ordes" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: non se atopou a orde" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: non é posíbel executar o ficheiro binario" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: intérprete erróneo" + +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: non é posíbel executar o ficheiro binario" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s é unha orde interna do shell\n" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "no se pode duplicar o df %d ao df %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "excedeuse o nivel de recursión da expresión" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "desbordamento da base da pila de recursión" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "erro de sintaxe na expresión" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "tentouse asignar a algo que non é unha variábel" + +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "erro de sintaxe na expresión" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "división entre 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "erro: elemento de asignación de expresión erróneo" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "agardábase `:' para a expresión condicional" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "expoñente menor que 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" +"agardábase un identificador despois do pre-incremento ou pre-decremento" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "falta un `)'" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "erro de sintaxe: agardábase un operando" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "erro de sintaxe: operador aritmético non válido" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (o elemento de erro é \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "base aritmética non válida" + +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: conta de liñas non válida" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "valor demasiado grande para a base" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: erro de expresión\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: non é posíbel acceder aos directorios pai" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "non é posíbel restabelecer o modo nodelay para o df %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"non é posíbel asignar un novo descritor de ficheiros para a entrada de bash " +"desde o fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" +"save_bash_input: o almacenamento intermedio xa existe para o novo fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: tubería de pgrp" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "o pid `forked' %d aparece no traballo en execución %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "borrando o trabajo detido %d con grupo de proceso %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) márcase como vivo aínda" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: non existe tal pid" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Sinal %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Feito" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Detido" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Detido(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "En execución" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Feito(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Saída %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Estado descoñecido" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(«core» xerado) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (dir agora: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid fillo (%ld a %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld non é un proceso fillo desta shell" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Non hai un rexistro do proceso %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: o traballo %d está detido" + +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: non existe ese traballo" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: o traballo rematou" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: o trabajo %d xa está en segundo plano" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: actívase WNOHANG para evitar o bloque indefinido" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: liña %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " («core» generado)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(dir agora: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_jobs_control: fallou getpgrp" + +#: jobs.c:4434 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_jobs_control: disciplina de liña" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_jobs_control: disciplina de liña" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_jobs_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "non é posíbel estabelecer o grupo de procesos de terminal (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "non hai control de trabalos nesta shell" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: fallou a aserción: %s\n" + +#: lib/malloc/malloc.c:383 +#, 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:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "descoñecido" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloque na lista libre sobreescrito" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: chamouse cun argumento de bloque previamente liberado" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: chamouse cun argumento de bloque sen asignar" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: os tamaños dos anacos de inicio e fin son diferentes" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: chamouse cun argumento de bloque sen asignar" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" +"realloc: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "" +"realloc: detectouse un desbordamento por embaixo; mh_nbytes fóra de rango" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: os tamaños dos anacos de inicio e fin son diferentes" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: a táboa alloc está chea con FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p xa está na táboa como asignado?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p xa está na táboa como libre?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base non válida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: anfitrión descoñecido" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: servizo non válido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: especificación de ruta de rede errónea" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "non hai compatibilidade para operacións de rede" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL non se pode cambiar a configuración rexional (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "" +"setlocale: LC_ALL: non se pode cambiar a configuración rexional (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: non se pode cambiar a configuración rexional (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: non se pode cambiar a configuración rexional (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Ten mensaxes en $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Ten unha nova mensaxe en $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "O correo en %s foi lido\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "error de sintaxe: requírese unha expresión aritmética" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "error sintáctico: `;' non esperado" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "erro de sintaxe: `((%s))'" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo de instrución %d erróneo" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"o documento-aquí na liña %d está delimitado por fin-de-fichero (agardábase `" +"%s')" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: a instrucción de redirección `%d' está fóra de rango" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF inesperado mentres se buscaba un `%c' coincidente" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF inesperado mentres se buscaba `]]'" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "error de sintaxe na expresión condicional: elemento inesperado `%s'" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "error sintáctico na expresión condicional" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "elemento inesperado `%s', agardábase `)'" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "agardábase `)'" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argumento inesperado `%s' para o operador unario condicional" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "argumento inesperado para o operador unario condicional" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "elemento inesperado `%s', agardábase un operador binario condicional" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "agardábase un operador binario condicional" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argumento inesperado `%s' para o operador binario condicional" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "argumento inesperado para o operador binario condicional" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "elemento inesperado `%c' na orde condicional" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "elemento inesperado `%s' na orde condicional" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "elemento inesperado %d na orde condicional" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "error de sintaxe perto do elemento inesperado `%s'" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "erro de sintaxe cerca de «%s»" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "error de sintaxe: non se agardaba o final do fichero" + +#: parse.y:6151 +msgid "syntax error" +msgstr "erro de sintaxe" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Use «%s» para deixar o shell.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF non agardado mentres se buscaba un «)» coincidente" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: non se atopa a función `%s'" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: COMPSPEC nulo" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: conector erróneo `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descriptor de fichero non válido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: punteiro a ficheiro NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != numfich xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': carácter de formato non válido" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "descritor de ficheiro fóra de rango" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redireccionamento ambigüo" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: non se pode sobreescribir un fichero existente" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restrinxido: no se pode redirixir a saída" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "non se pode crear un fichero temporal para o documento-aquí: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: non é posíbel asignar o gd á variábel" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "non se admite /dev/(tcp|udp)/anfitrion/porto sen rede" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "erro de redirección: non é posíbel duplicar o fd" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "non é posíbel atopar /tmp, por favor creeo!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp debe ser un nome de directorio válido" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opción non válida" + +#: shell.c:1343 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "non é posíbel restabelecer o modo nodelay para o df %d" + +#: shell.c:1354 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "non é posíbel restabelecer o modo nodelay para o df %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: é un directorio" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Non teño nome!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versión %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uso:\t%s [opción GNU longa] [opción] ...\n" +"\t%s [opción GNU longa] [opción] guión-do-shell\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "Opcións GNU longas:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Opcións do shell:\n" + +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD o -c orde ou -O opcion_shopt\t\t(só invocación)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ou -o opción\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Escriba `%s -c \"help set\"' para máis información sobre as opcións do " +"shell.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Escriba `%s -c help' para máis información sobre as ordes internas do " +"shell.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Use a orden `bashbug' para reportar erros.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operación non válida" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Sinal ambigüa" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Colgar" + +#: siglist.c:55 +msgid "Interrupt" +msgstr "Interromper" + +#: siglist.c:59 +msgid "Quit" +msgstr "Saír" + +#: siglist.c:63 +msgid "Illegal instruction" +msgstr "Instrución ilegal" + +#: siglist.c:67 +msgid "BPT trace/trap" +msgstr "BPT rastreo/captura" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "instrución ABORT" + +#: siglist.c:79 +msgid "EMT instruction" +msgstr "instrució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 "Erro no bus" + +#: siglist.c:95 +msgid "Segmentation fault" +msgstr "Violación de segmento" + +#: siglist.c:99 +msgid "Bad system call" +msgstr "Chamada ao sistema errónea" + +#: siglist.c:103 +msgid "Broken pipe" +msgstr "Tubería rota" + +#: siglist.c:107 +msgid "Alarm clock" +msgstr "Temporizador" + +#: siglist.c:111 +msgid "Terminated" +msgstr "Rematado" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "Condicón de E/s urxente" + +#: siglist.c:119 +msgid "Stopped (signal)" +msgstr "Detido (sinal)" + +#: siglist.c:127 +msgid "Continue" +msgstr "Continúa" + +#: siglist.c:135 +msgid "Child death or stop" +msgstr "O proceso fillo morreu ou está parado" + +#: siglist.c:139 +msgid "Stopped (tty input)" +msgstr "Detido (entrada pola terminal)" + +#: siglist.c:143 +msgid "Stopped (tty output)" +msgstr "Detido (saída pola 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 ficheiros" + +#: siglist.c:159 +msgid "Alarm (virtual)" +msgstr "Alarma (virtual)" + +#: siglist.c:163 +msgid "Alarm (profile)" +msgstr "Alarma (contorno)" + +#: siglist.c:167 +msgid "Window changed" +msgstr "Xanela cambiada" + +#: siglist.c:171 +msgid "Record lock" +msgstr "Bloqueo de gravación" + +#: siglist.c:175 +msgid "User signal 1" +msgstr "Sinal de usuario 1" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Sinal de usuario 2" + +#: siglist.c:183 +msgid "HFT input data pending" +msgstr "entrada de datos HFT pendente" + +#: siglist.c:187 +msgid "power failure imminent" +msgstr "fallo de enerxía inminente" + +#: siglist.c:191 +msgid "system crash imminent" +msgstr "caída do sistema inminente" + +#: siglist.c:195 +msgid "migrate process to another CPU" +msgstr "migrando o proceso a outra CPU" + +#: siglist.c:199 +msgid "programming error" +msgstr "erro de programación" + +#: siglist.c:203 +msgid "HFT monitor mode granted" +msgstr "o modo monitor HFT foi concedido" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "o modo monitor HTF foi retirado" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "a secuencia de son HFT foi completada" + +#: siglist.c:215 +msgid "Information request" +msgstr "Solicitude de información" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Sinal descoñecido #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "susbtitución errónea: non hai un `%s' que peche en %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: no é posíbel asignar unha lista a un membro da matriz" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "non é posíbel crear a tubería para a sustitución do proceso" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "non é posíbel crear un proceso fillo para a substitución do proceso" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "non é posíbel abrir a tubería chamada %s para lectura" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "non é posíbel abrir a tubería chamada %s para escritura" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "non é posíbel duplicar a tubería chamada %s como df %d" + +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "substitución errónea: non hai unha \"`\" que peche en %s" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "non é posíble crear a tubería para a substitución da orde" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "non é posíbel crear un proceso fillo para a substitución da orde" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: non é posíbel duplicar a tubería como fd 1" + +#: subst.c:7082 subst.c:10252 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: valor non válido para o descitor de ficheiro de rastreo" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: conta de liñas non válida" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "`%s': nome de alias non válido" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parámetro nulo ou non estabelecido" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parámetro nulo ou non estabelecido" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expresión de subcadea < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: substitución errónea" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: non é posíbel asignar de esta forma" + +#: subst.c:10111 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"versiones futuras do intérprete obligarán a evaluación como unha " +"substitución aritmética" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "substitución errónea: non hai unha \"`\" que peche en %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "non hai concidencia: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "agardábase un argumento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: agardábase unha expresión enteira" + +#: test.c:265 +msgid "`)' expected" +msgstr "agardábase `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "`)' agardábase, atopouse %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: agardábase un operador binario" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: agardábase un operador unario" + +#: test.c:896 +msgid "missing `]'" +msgstr "falta un «]»" + +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "error sintáctico: `;' non esperado" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "número de sinal non válido" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 +#, 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:416 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: o manexador de sinal é SIG_DFL, reenviando %d (%s) a sí " +"mesmo" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: sinal errónea %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "erro ao importar a definición da función para «%s»" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "o nivel de shell (%d) é demasiado alto, restabelécese a 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: non hai contexto de función no ámbito actual" + +#: variables.c:2661 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: non é posíbel asignar o gd á variábel" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: non hai contexto de función no ámbito actual" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s ten exportstr nulo" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "carácter non válido %d en exportsrt para %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "non hai «=» en exportstr para %s" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: a cabezak de shell_variables non é un contexto de función" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: non é un contexto global_variables " + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: a cabeza de shell_variables non é un ámbito de ambiente temporal" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: non é posíbel abrir como FICHEIRO" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valor non válido para o descitor de ficheiro de rastreo" + +#: variables.c:6450 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s fóra de rango" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licenza GPLv3+: GPL de GNU versión 3 ou posterior \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versión %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Isto é software libre; vostede é libre de cambialo e redistribuilo.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Non hai GARANTÍA, á extensión permitida pola ley.\n" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: non é posíbel asignar %lu bytes (%lu bytes asignados)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: non é posíbel asignar %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: non é posíbel asignar %lu bytes (%lu bytes asignados)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: non é posíbel asignar %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nome[=valor] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nome [nome ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-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 ficheiro] [-q nome] [-u nome] [-r " +"secteclas] [-x secteclas:orde-shell] [keyseq:función-readline ou función-" +"readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [orde-interna-shell [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expresión]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [directorio]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] orde [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilrtux] [-p] [nome[=valor] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilrtux] [-p] nome[=valor] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [option] nome[=valor] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f nomeficheiro] [nome ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts cadena_opcións nome [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a ome] [orde [argumentos ...]] [redirección ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e nome_e] [-lnr] [primeiro] [último] ou fc -s [pat=rep] [orde]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [id_traballo]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [id_traballo ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ruta] [-dt] [nome ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [patrón ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d desprazamento] [n] ou history -anrw [ficheiro] ou history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [idtraballo ...] ou jobs -x orde [args]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [id_traballo ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s id_sinal | -n num_sinal | -id_sinal] pid | id_traballo ... ou kill -" +"l [id_sinal]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +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] [-N ncars] [-p " +"prompt] [-t timeout] [-u fd] [nome ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nome-opción] [--] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [nome ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nome[=valor] ...] ou export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nome[=valor] ...] ou readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ficheiro [arguments]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ficheiro [argumentos]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expresión]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] id_sinal ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nome [nome ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [límite]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modo]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOME [in PALABRAS ... ] ; do ORDES; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do ORDES; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOME [in PALABRAS ... ;] do ORDES; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PALABRA in [PATRÓN [| PATRÓN]...) ORDES ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "if ORDES; then ORDES; [ elif ORDES; then ORDES; ]...[ else ORDES; ] fi" + +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while ORDES; do ORDES; done" + +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until ORDES; do ORDES; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOME] orden [redireccións]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nome { ORDES ; } ou nome () { ORDES ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ ORDES ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expresión ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expresión ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - Nomes e significados de algunhas variábeis de shell" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nome_opción ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formato [argumentos]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 opción] [-A acción] [-G patglob] [-" +"W listapalabras] [-F función] [-C orde] [-X patfiltro] [-P prefixo] [-S " +"sufixo] [nome ...]" + +#: builtins.c:235 +#, fuzzy +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 orde] [-X patfiltro] [-P prefixo] [-S " +"sufixo] [palabra]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opción] [-DE] [nome ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n conta] [-O orixe] [-s conta] [-t] [-u df] [-C chamada] [-c " +"quantum] [matriz]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n conta] [-O orixe] [-s conta] [-t] [-u df] [-C chamada] [-c " +"quantum] [matriz]" + +#: builtins.c:256 +#, 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 "" +"Define ou mostra aliases.\n" +" \n" +" `alias' sen argumentos mostra a lista de aliases na forma\n" +" reutilizábel `alias NOMBRE=VALOR' na saída estándar.\n" +" \n" +" De outra maneira, defínese un alias por cada NOME cuxo VALOR se\n" +" forneza. Un espazo final en VALOR causa que se revise\n" +" a seguinte palabra para substitución de alias cando se expande\n" +" o 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:278 +#, 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 "" +"Borra cada NOME da lista de alias definidos.\n" +" \n" +" Opcións:\n" +" -a\telimina todas as definicións de alias.\n" +" Devovle verdadero a menos que un NOME non sexa un alias existente." + +#: builtins.c:291 +#, 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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Estabelece secuencias de teclas Readline e variábeis.\n" +"\n" +" Asigna unha secuencia de teclas a unha función Readline ou a unha macro, " +"ou\n" +" estabelece unha variábel Readline. A sintaxe dos argumentos que\n" +" non son opcións é equivalente á que se encontra en ~/.inputrc,\n" +" pero débese pasar como un só argumento:\n" +" p.e., bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" opcións:\n" +" \n" +" -m comb_teclas Usa COMB_TECLAS como a combinación de teclas pola\n" +" duración desta orde. Os nomes de combinacións\n" +" de teclas aceptábeis son emacs, emacs-standard,\n" +" emacs-meta, emacs-ctlx, vi, vi-move, vi-command e\n" +" vi-insert.\n" +" -l Enlista os nomes das funcións.\n" +" -P Enlista os nomes das funcións e asignacións.\n" +" -p Enlista as funcións e asignacións nunha forma que\n" +" se pode reusar como entrada.\n" +" -S Enlista as secuencias de teclas que invocan macros\n" +" e os seus valores.\n" +" -s Enlista as secuencias de teclas que invocan macros\n" +" e os seus valores nunha forma que se poden reusar " +"como\n" +" entrada.\n" +" -V Enlista os nomes de variábeis e valores.\n" +" -v Enlista os nomes de variábeis e valores nunha\n" +" forma que se pode reusar como entrada.\n" +" -q nome-funcion Pregunta qué teclas invocan a función nomeada.\n" +" -u nome-función Borra todas as teclas que están ligadas\n" +" á función nomeada.\n" +" -r secteclas Borra a asignación para a SECTECLAS.\n" +" -f fichero Lee as asignacións de teclas do FICHERO.\n" +" -x secteclas:orde-shell\tCausa que se execute a ORDE-SHELL cando\n" +" \t\t\t\tse introduce a SECTECLAS.\n" +" \n" +" Estado de saída:\n" +" bind devolve 0 a menos que se presente unha opción descoñecida ou se\n" +" se produza un erro." + +#: builtins.c:330 +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. Se se especifica N, remata\n" +" N ciclos anidados.\n" +" \n" +" Estado de saída:\n" +" O estado de saída é 0 a menos que N non sexa maior ou igual a 1." + +#: builtins.c:342 +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 iteracións for, while o until\n" +" \n" +" Continúa a seguinte iteración do ciclo FOR, WHILE ou UNTIL\n" +" circundante. Se se especifica N, retoma no N-ésimo ciclo circundante.\n" +" \n" +" Estado de Saída:\n" +" O estado de salida é 0 a menos que N non sexa maior ou igual a 1." + +#: builtins.c:354 +#, fuzzy +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 "" +"Executa ordes internas do shell\n" +" \n" +" Executa a ORDEN-INTERNA-SHELL cos argumentos ARGs sen realizar\n" +" a busca interna de ordes. Isto é útil cando desexa reimplementar\n" +" unha orde interna do shell como unha función de shell, pero necesita\n" +" executar a orde interna dentro da función.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado de saída da ORDE-INTERNA-SHELL, ou falso se a\n" +" ORDE-INTERNA-SHELL non é unha orde interna de shell." + +#: builtins.c:369 +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 "" +"Devolve o contexto da chamada a subrutina actual.\n" +" \n" +" Sen EXPR, devolve \"$liña $nomeficheiro\". Con EXPR, devolve\n" +" \"$liña $subrutina $nomeficheiro\"; esta información adicional\n" +" pódese usar para fornecer un volcado de pila.\n" +" \n" +" O valor de EXPR indica cantos marcos de chamada se debe retroceder\n" +" antes do actual; o marco inicial é o marco 0.\n" +" \n" +" Estado de Saída:\n" +" Devolve 0 a menos que o shell non estea executando unha función de " +"shell\n" +" ou EXPR sexa non válida." + +#: builtins.c:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" + +#: builtins.c:425 +#, fuzzy +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" +" \t\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 "" +"Mostra o nome do directorio de traballo actual.\n" +" \n" +" Opcións:\n" +" -L\tmostra o valor de $PWD se nomea ao directorio de\n" +" \ttraballo actual\n" +" -P\tmostra o directorio físico, sen ligazóns simbólicas\n" +" \n" +" Por defecto, `pwd' comportase como se se especificara `-L'.\n" +" \n" +" Estado de Saída:\n" +" Devolve 0 a menos que se dea unha opción non válida ou non se poida " +"leer\n" +" o directorio actual." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Orde nula.\n" +" \n" +" Sen efecto; a orde non fai nada.\n" +" \n" +" Estado de Saída:\n" +" Sempre con éxito." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Devolve un resultado con éxito.\n" +" \n" +" Estado de salida:\n" +" Sempre con éxito." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Devolve un resultado sen éxito.\n" +" \n" +" Estado de saída:\n" +" Sempre falla." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Estabelece valores de variábeis e atributos.\n" +" \n" +" Obsoleto. Consulte `help declare'." + +#: builtins.c:540 +#, fuzzy +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define variábeis locais.\n" +" \n" +" Crea unha variábel local chamada NOME, e dalle un VALOR. OPCIÓN pode\n" +" ser calquera opción aceptada por `declare'.\n" +" \n" +" As variábeis locais só se pueden usar nunha función; son visibles\n" +" só na función onde se definen e os seus fillos.\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito a menos que se dea unha opción non válida, se produza\n" +" un erro, ou o shell non estea executando unha función." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" + +#: builtins.c:597 +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:612 +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:640 +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 "" +"Executa argumentos como unha orde de shell.\n" +" \n" +" Combina os ARGumentos nunha soa cadena, usa o resultado como entrada\n" +" para o shell, e executa as órdenes resultantes.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado de saida da orde ou éxito se a orde é nula." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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:694 +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\texecute COMMAND with an empty environment\n" +" -l\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:715 +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 "" +"Remata a shell.\n" +" \n" +" Termina o shell cun estado de N. Se se omite N, o estado de saída\n" +" é o mismo da última orde executada." + +#: builtins.c:724 +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 cun estado de saída de N. Devolve un\n" +" erro se non se executa nunha shell de entrada." + +#: builtins.c:734 +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:764 +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 o trabañño ao primeiro plano.\n" +" \n" +" Localiza o traballo identificado con IDTRABALLO no primeiro plano, e\n" +" faino o traballo actual. Se IDTRABALLO non está presente, úsase\n" +" a noción do shell do traballo actual.\n" +" \n" +" Estado de Saída:\n" +" O estado da orde localizada en primeiro plano, ou falla se sucede un " +"erro." + +#: builtins.c:779 +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:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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:879 +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\tlists only processes that have changed status since the last\n" +" \t\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:906 +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" +" \t\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:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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:949 +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:994 +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. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" + +#: builtins.c:1042 +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:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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:1162 +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:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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:1203 +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:1215 builtins.c:1230 +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:1246 +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 a execución do shell.\n" +" \n" +" Suspende a execución deste shell até que recibe un sinal SIGCONT.\n" +" Os shells de entrada non se poden suspender, a menos que sexan " +"forzados.\n" +" \n" +" Opcións:\n" +" -f\tforza a suspensión, aínda se o shell é un shell de entrada\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito a menos que non estea activo o control de traballos o\n" +" se produza un erro." + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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:1344 +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 unha expresión condicional.\n" +" \n" +" Este é un sinónimo para a orde interna \"test\", pero o último\n" +" argumento debe ser un `]' literal, que coincida co `[' inicial." + +#: builtins.c:1353 +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 "" +"Mostra os tempos de proceso.\n" +" \n" +" Mostra os tempos de usuario e sistema acumulados polo shell e todos\n" +" os seus procesos fillos.\n" +" \n" +" Estado de saída:\n" +" Sempre con éxito." + +#: builtins.c:1365 +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. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\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 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:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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:1483 +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:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" + +#: builtins.c:1534 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Agarda a terminación do traballo e devolve o estado de saída.\n" +" \n" +" Espera ao proceso especificado e reporta o seu estado de saída. Se\n" +" non se fornece un PID, agarda a todos os procesos fillo activos,\n" +" e o código de devolución é cero. PID debe ser un ID de proceso.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado de ID; falla se ID non é válido ou se se fornece unha\n" +" opción non válida." + +#: builtins.c:1549 +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 "" +"Executa ordes por cada membro nunha lista.\n" +" \n" +" O ciclo `for' executa unha secuencia de ordes para cada membro nunha\n" +" lista de elementos. Se `in PALABRAS ...;' non está presente,\n" +" entón asúmese `in \"$@\"'. Para cada elemento en PALABRAS,\n" +" defínese NOME como ese elemento, e execútanse as ÓRDENES.\n" +" \n" +" Estado de Saída:\n" +" Devuelve o estado da última orden executada." + +#: builtins.c:1563 +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\tORDES\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, e EXP3 son expresións aritméticas. Se se omite\n" +" calquera expresión, compórtase como se se evaluara a 1.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1581 +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:1602 +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:1619 +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 ordes en base á coincidencia de patróns.\n" +" \n" +" Executa ÓRDENES selectivamente baseado en coincidencias da PALABRA\n" +" co PATRÓN. Emprégase `|' para separar patróns múltiples.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1631 +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:1648 +#, fuzzy +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Ejecuta ordes mentres unha proba teña éxito.\n" +" \n" +" Expande e executa ORDES mentres a orde final nas ÓRDENES\n" +" `while' teña un estado de saída de cero.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1660 +#, fuzzy +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa ordes mentres unha proba non teña éxito.\n" +" \n" +" Expande e executa ORDES mentres a orde final nas ORDES\n" +" `until' teña un estado de saída que non sexa cero.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1672 +#, fuzzy +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Crea un coproceso chamado NOME.\n" +" \n" +" Executa a ORDE asíncronamente, coa saída estándar e a entrada\n" +" estándar da orde contectada a través dunha tubería aos descritores\n" +" de ficheiro asignados aos índices 0 e 1 dunha variábel de matriz NOME\n" +" no shell en execución. O nome por omisión é \"COPROC\".\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado de saída da ORDE." + +#: builtins.c:1686 +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:1700 +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 ordes como unha unidade.\n" +" \n" +" Executa un conxunto de ordes nun grupo. Esta é unha forma de\n" +" redirixir un conxunto completo de ordes.\n" +" \n" +" Estado de Saída:\n" +" Devolve o estado da última orde executada." + +#: builtins.c:1712 +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:1727 +#, 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 "" +"Avalí unha expresión aritmética.\n" +" \n" +" Avalíase a EXPRESIÓN de acordo ás regras de evaluación\n" +" aritmética. Equivalente a \"let EXPRESIÓN\".\n" +" \n" +" Estado de Saída:\n" +" Devolve 1 se a EXPRESIÓN avalía a 0; devovle 0 de outra maneira." + +#: builtins.c:1739 +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:1765 +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:1822 +#, 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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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 "" +"Engade un directorio ao tope da rima de directorios, ou rota\n" +" a pila, facendo que o novo tope da rima sexa o\n" +" directorio de trabajo actual. Sen argumentos, intercambia\n" +" os dous directorios do tope.\n" +" \n" +" Argumentos:\n" +" +N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda izquierda da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" -N\tRota a pila para que o N-ésimo directorio (contando\n" +" \tda derecha da lista mostrada por `dirs',\n" +" \tcomezando desde cero) estea no tope.\n" +" \n" +" dir\tagrega DIR á rima de directorios no tope,\n" +" \tfacéndoo o novo directorio de traballo actual.\n" +" \n" +" A orde interna `dirs' mostra a rima de directorios." + +#: builtins.c:1856 +#, 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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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 entradas da pila de directorios. Sen argumentos, borra\n" +" directorio do tope da pila, e cambia ao novo directorio tope.\n" +" \n" +" Opcións:\n" +" -n\tsuprime o cambio normal de directorio cando se borra\n" +" \tdirectorios da pila, así só se manipula a pila.\n" +" \n" +" Argumentos:\n" +" +N\tBorra a N-ésima entrada contando da esquerda da\n" +" \tlista mostrada por `dirs', comenzando desde cero.\n" +" \tPor exemplo: `popd +0' borra o primeiro directorio, `popd +1'\n" +" \to segundo.\n" +" \n" +" -N\tBorra a N-ésima entrada contando da derecha da\n" +" \tlista mostrada por `dirs', comezando desde cero.\n" +" \tPor exemplo: `popd -0' borra o último directorio, `popd -1'\n" +" \to penúltimo.\n" +" \n" +" A orde interna `dirs' mostra a pila de directorios." + +#: builtins.c:1886 +#, 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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostra a lista de directorios actualmente gravados. Os directorios\n" +" gárdanse na lista coa orde `pushd'; pode ir saíndo da\n" +" lista coa orde `popd'.\n" +" \n" +" Opcións:\n" +" -c\tlimpa a pila de directorios, eliminando todos os elementos\n" +" -l\tnon mostra as versións con prefixo de til dos directorios\n" +" \trelativos ao seu directorio inicial\n" +" -p\tmostra a pila de directorios cunha entrada por liña\n" +" -v\tmuestra a pila de directorios cunha entrada por liña coa\n" +" \tsúa posición na pila como prefixo\n" +" \n" +" Argumentos:\n" +" +N\tMostra a N-ésima entrada contando desde a esquerda da\n" +" \tlista mostrada por dirs cando se chama sen opcións,\n" +" \tcomezando desde cero.\n" +" \n" +" -N\tMostra a N-ésima entrada contando desde a dereita da\n" +"\tlista mostrada por dirs cando se chama sen opcións,\n" +"\tcomezando desde cero." + +#: builtins.c:1917 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 e desactiva opcións de shell.\n" +" \n" +" Cambia a configuración de cada opción de shell NOME_OPCIÓN. Sen\n" +" algunha opción como argumento, mostra todas as opcións de shell cunha\n" +" indicación se está activa ou non.\n" +" \n" +" Opcións:\n" +" -o\trestrinxe NOME_OPCIÓN a aqueles definidos con `set -o'\n" +" -p\tmostra cada opción de shell cun indicador do seu estado\n" +" -q\tsuprime a saída\n" +" -s\tactiva (estabelece) cada NOME_OPCIÓN\n" +" -u\tdesactiva (borra) cada NOME_OPCIÓN\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito se se activa NOME_OPCIÓN; falla se se fornece\n" +" unha opción non válida ou NOME_OPCIÓN está desactivado." + +#: builtins.c:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" + +#: builtins.c:2004 +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 "" +"Mostra os posíbeis completados dependendo das opcións.\n" +" \n" +" Serve para usarse desde unha función de shell que xere completados\n" +" posíbeis. Se se fornece o argumento opcional PALABRA, xéranse\n" +" as coincidencias contra PALABRA.\n" +" \n" +" Estado de Saída:\n" +" Devolve con éxito a menos que se forneza unha opción non válida o\n" +" se produza un erro." + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, " +"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" +" \t-I\t\tChange options for completion on the initial word\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:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lee liñas dun fichero nunha variábel de matriz.\n" +" \n" +" Un sinónimo de `mapfile'." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: índice de matriz asociativa non válido" + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2011 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Devolve o contexto da chamada a subrutina actual.\n" +#~ " \n" +#~ " Sen EXPR, devovle " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: o proceso %5ld (%s) en the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Sinal descoñecido #" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licenza GPLv2+: GPL de GNU versión 2 ou posterior \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/po/hr.gmo b/po/hr.gmo new file mode 100644 index 0000000..228b369 Binary files /dev/null and b/po/hr.gmo differ diff --git a/po/hr.po b/po/hr.po new file mode 100644 index 0000000..624e0d0 --- /dev/null +++ b/po/hr.po @@ -0,0 +1,5560 @@ +# Translation of bash to Croatian. +# Copyright © 2018 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Tomislav Krznar , 2012, 2013. +# Božidar Putanec , 2018, 2019, 2020, 2021, 2022. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.2-rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-17 11:19-0700\n" +"Last-Translator: Božidar Putanec \n" +"Language-Team: Croatian \n" +"Language: hr\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%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Lokalize 22.07.70\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "loši indeks polja" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: uklanjamo atribut nameref" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nije moguće pretvoriti indeksirano polje u asocijativno polje" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: nenumerički indeks nije moguć" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: indeks je nužan pri dodjeli asocijativnom polju" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: nije moguće stvoriti: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: nije moguće pronaći prečac (keymap) za naredbu" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: prvi nebijeli znak nije „\"“" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "nema zaključnog „%c“ u %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: nedostaje separator (dvotočka)" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: nije moguće razvezati prečac (keymap) za naredbu" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "zamjena vitičastih zagrada: nema dovoljno memorije za %s" + +# Brace expansion is a mechanism by which arbitrary strings may be generated +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "zamjena vitičastih zagrada: nema dovoljno memorije za %u elemenata" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "zamjena vitičastih zagrada: nema dovoljno memorije za „%s“" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: ime aliasa nije valjano" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "nije omogućeno uređivanje redaka" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: nevaljano ime za prečac (keymap)" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: nije moguće pročitati: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: nepoznato ime funkcije" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s nije vezan na nijednu tipku.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s se može pozvati s prečacem " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nije moguće razvezati" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "broj ponavljanja petlje" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "ima smisla samo u „for“, „while“ ili „until“ petljama" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"Vrati kontekst trenutnog poziva funkciji.\n" +"\n" +" Bez IZRAZA, vrati „$line $filename“. S IZRAZOM, vrati\n" +" „$line $subroutine $filename“; ovi dodatni podaci mogu poslužiti\n" +" za „stack trace“.\n" +"\n" +" Vrijednost IZRAZA pokazuje koliko se razina poziva treba vratiti unatrag od\n" +" trenutne pozicije, s time da je pozicija 0 trenutna pozicija." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME nije definiran" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "previše argumenata" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null-direktorij" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD nije definiran" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "redak %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "upozorenje: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uporaba: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: opcija zahtijeva argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: nužan je numerički argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: nije nađeno" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: nevaljana opcija" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nevaljano ime za opciju" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s“: nije valjano ime" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "nevaljan oktalni broj" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "nevaljan heksadecimalni broj" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "nevaljan broj" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: nevaljana specifikacija signala" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: nije PID ili nije valjana oznaka posla" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: je samo-za-čitanje varijabla" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: nije moguće pridružiti" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s je izvan raspona" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s je izvan raspona" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: nema takvog posla" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: nema upravljanja poslovima" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "nema upravljanja poslovima" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: ograničeni način rada" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "ograničeni način rada" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: nije ugrađena naredba ljuske" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "greška pisanja: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "greška pri postavljanju svojstava terminala: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "greška pri preuzimanju svojstava terminala: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: greška u određivanju trenutnog direktorija: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: oznaka posla nije jednoznačna" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "u ovoj inačici pomoć nije dostupna" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nije moguće izbrisati: %s je samo-za-čitanje" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nije moguće izbrisati" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nevaljano ime za akciju" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: nema specifikacije za dovršavanje" + +#: builtins/complete.def:696 +msgid "warning: -F option may not work as you expect" +msgstr "upozorenje: opcija -F možda neće raditi prema očekivanju" + +#: builtins/complete.def:698 +msgid "warning: -C option may not work as you expect" +msgstr "upozorenje: opcija -C možda neće raditi prema očekivanju" + +#: builtins/complete.def:846 +msgid "not currently executing completion function" +msgstr "funkcija dovršavanja trenutno ne radi" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "može se koristiti samo u funkciji" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "„-f“ se ne može koristiti za definiranje funkcija" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: je samo-za-čitanje funkcija" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: referentna varijabla ne može biti polje (array)" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref varijablu nije dopušteno samoreferencirati" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: kružna referencija imena" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: nevaljano ime varijable za referenciju imena" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: nije moguće uništiti varijable polja na ovaj način" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: nije moguće pretvoriti asocijativno u indeksirano polje" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: dodjela vrijednosti u navodnicima složenom polju je zastarjela" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "dinamičko učitavanje nije dostupno" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "nije moguće otvoriti dijeljeni objekt %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "nije moguće pronaći %s u dijeljenom objektu %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dinamički učitljiva ugrađena naredba već je učitana" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "funkcija učitavanja za %s završila je s greškom (%d): nije učitano" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: nije dinamički učitan" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: nije moguće izbrisati: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: je direktorij" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: nije obična datoteka" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: datoteka je prevelika" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: nije moguće izvršiti binarnu datoteku" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: nije moguće izvršiti: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "odjavljen\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "nije prijavna ljuska; koristite „exit“" + +# stopped > pauzirano ili zaustavljeno +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Ima zaustavljenih poslova.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Ima pokrenutih poslova.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "nijedna naredba nije nađena" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "specifikacija povijesti" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: Nije moguće otvoriti privremenu datoteku: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "trenutno" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "posao %d započet je bez upravljanja poslovima" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: neispravna opcija -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opcija zahtijeva argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hash-iranje (memoriranje) nije omogućeno" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: hash tablica je prazna\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "pogodci\tnaredba\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Naredbe ljuske koja podudara riječ„" +msgstr[1] "Naredbe ljuske koje podudaraju riječi'" +msgstr[2] "Naredbe ljuske koje podudaraju riječi'" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"”\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"Nema pomoći za „%s“.\n" +"Pokušajte s „help help“, „man -k %s“ ili „info %s“." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: Nije moguće otvoriti: %s" + +#: builtins/help.def:523 +#, 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 "" +"Ove bash naredbe su interno definirane. Utipkajte (bez navodnika) „help“\n" +"da vidite popis tih naredbi.\n" +"Utipkajte „help ime“ za više uputa o naredbi „ime“.\n" +"Koristite „info bash“ za detaljnije informacije i upute o ljusci.\n" +"Koristite „man -k ...“ ili „info ...“ za više podataka o ostalim naredbama.\n" +"\n" +"Zvjezdica (*) pokraj imena znači da je naredba onemogućena.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "moguć je samo jedan od -a, -n, -r ili -w" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "pozicija u povijesti" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nevaljan vremenski žig" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: proširenje povijesti nije uspjelo" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: „inlib” nije uspio" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "uz „-x“ nije dopuštena nijedna druga opcija" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenti moraju biti ID-ovi procesa ili ID-ovi posla" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Nepoznata greška" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "očekivan je izraz" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: nije indeksirano polje" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: nevaljana specifikacija deskriptora datoteke" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: nevaljan deskriptor datoteke: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: nevaljan broj (količina) redaka" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: nevaljan početak polja (nevaljan indeks polja)" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: nevaljana količina (redaka između poziva)" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "prazno ime varijable polja" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "nužna je podrška za varijable (vrsta) polje" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: nedostaje znak u specifikaciji formata" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: nevaljana specifikacija za format vremena" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: nevaljan znak u specifikaciji formata" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "upozorenje: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problem s raščlanjivanjem formata: %s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "nedostaje heksadecimalna znamenka za \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "nedostaje unikodna (unicode) znamenka za \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nema drugog direktorija" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: nevaljan argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "stȏg direktorija je prazan" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "indeks stȏga direktorija" + +#: builtins/pushd.def:701 +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 "" +"Pokaže popis trenutno zapamćenih direktorija. Direktoriji se unose\n" +" na popis pomoću naredbe „pushd“, a s naredbom „popd“ se uklanjaju.\n" +"\n" +" Opcije:\n" +" -c ukloni stȏg direktorija brisanjem svih elemenata\n" +" -l ispiše apsolutne staze direktorija u odnosu na vaš vlastiti\n" +" direktorij (ne skraćuje staze upotrebom tilde)\n" +" -p ispiše sadržaj stȏga po jedan direktorij po retku\n" +" -v kao „-p“, ali s prefiksom koji pokazuje\n" +" poziciju direktorija u stȏgu\n" +"\n" +" Argumenti:\n" +" +N Pokaže N-ti direktorij iz stȏga, brojeći od od nule s\n" +" lijeve strane popisa kad se „dirs“ pokrene bez opcija.\n" +" -N Pokaže N-ti direktorij iz stȏga, brojeći od nule s\n" +" desne strane popisa kad se „dirs“ pokrene bez opcija." + +#: builtins/pushd.def:723 +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 "" +"Doda direktorij na vrh stȏga direktorija ili zarotira stȏg tako da\n" +" učini novi vrh stȏga trenutnim radnim direktorijem. Bez argumenata\n" +" razmijeni pozicije dvama direktorijima na vrhu stȏga.\n" +"\n" +" Opcije:\n" +" -n spriječi uobičajenu promjenu direktorija kad dodaje\n" +" direktorije u stȏg, odnosno samo manipulira sa stȏgom\n" +"\n" +" Argumenti:\n" +" +N Zarotira stȏg tako, da N-ti direktorij u stȏgu (brojeći od nule s\n" +" lijeve strane popisa pokazanog s „dirs“) postane novi vrh stȏga.\n" +" -N Zarotira stȏg tako, da N-ti direktorij u stȏgu (brojeći od nule s\n" +" desne strane popisa pokazanog s „dirs“) postane novi vrh stȏga.\n" +" DIREKTORIJ Doda DIREKTORIJ na vrh stȏga direktorija i\n" +" učini ga novim trenutnim radnim direktorijem.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj stȏga direktorija." + +#: builtins/pushd.def:748 +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 "" +"Ukloni zapise iz stȏga direktorija. Bez argumenata, ukloni direktorij na\n" +" vrhu stȏga i učini da je trenutni radni direktorij jednak novom direktoriju\n" +" na vrhu stȏga.\n" +"\n" +" Opcije:\n" +" -n spriječi uobičajenu promjenu direktorija kad uklanja\n" +" direktorije iz stȏga, odnosno samo manipulira sa stȏgom\n" +"\n" +" Argumenti:\n" +" +N Ukloni da N-ti direktorij iz stȏga brojeći od nule s lijeve\n" +" strane popisa pokazanog s „dirs“. Na primjer: „popd +0“\n" +" ukloni prvi, a „popd +1“ ukloni drugi direktorij.\n" +" +N Ukloni da N-ti direktorij iz stȏga brojeći od nule s desne\n" +" strane popisa pokazanog s „dirs“. Na primjer.: „popd -0“\n" +" ukloni zadnji, a „popd -1“ ukloni predzadnji direktorij.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj stȏga direktorija." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: nevaljana specifikacija za istek vremena (timeout)" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "greška čitanja: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "„return“ je moguć samo iz funkcije ili iz skripte pokrenute sa „source”" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "nije moguće istovremeno poništiti funkciju i varijablu" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: nije varijabla (vrste) polja" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: nije funkcija" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: Nije moguće izvesti (export)" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "broj (veličina) pomaka" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "nije moguće istovremeno postaviti i poništiti opcije ljuske" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nevaljano ime za opciju ljuske" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "ime datoteke je nužno kao argument" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: datoteka nije pronađena" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "obustava nije moguća" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "nije moguće obustaviti prijavnu ljusku" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s je alias za „%s“\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s je ključna riječ ljuske\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s je funkcija\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je specijalna ugrađena funkcija ljuske\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s je ugrađena funkcija ljuske\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s je %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s je zapamćen (hashed) (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: nevaljan argument za ograničenje" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c“: loša naredba" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: nije moguće odrediti vrijednost ograničenja: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "ograničenje" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: nije moguće promijeniti ograničenja: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktalni broj" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: nevaljan operator u simboličkom načinu" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: nevaljan znak u simboličkom načinu" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " redak " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "zadnja naredba: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Prekidamo..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "informacija: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "Dijagnostičko upozorenje: " + +#: error.c:488 +msgid "unknown command error" +msgstr "nepoznata greška naredbe" + +#: error.c:489 +msgid "bad command type" +msgstr "loša vrsta naredbe" + +#: error.c:490 +msgid "bad connector" +msgstr "loš konektor" + +#: error.c:491 +msgid "bad jump" +msgstr "loš skok" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: nevezana varijabla" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\avrijeme čekanja na ulaz je isteklo: automatska-odjava\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "nije moguće preusmjeriti standardni ulaz iz /dev/null: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: „%c“: nevaljan znak za format" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc(): coproc [%d:%s] još uvijek postoji" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "greška cijevi" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: prekoračena je dopuštena razina (dubina) gniježđenja eval (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: prekoračena je dopuštena razina gniježđenja source (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: prekoračena je dopuštena razina gniježđenja funkcije (%d)" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: ograničenje : znak „/“ nije dopušten u imenima naredba" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: naredba nije pronađena" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: nije moguće izvršiti: potrebna datoteka nije nađena" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: loš interpreter" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: binarnu datoteku %s nije moguće pokrenuti/izvršiti" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“ je specijalna funkcija ugrađena u ljusku" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "nije moguće duplicirati deskriptor datoteke %d u deskriptor datoteke %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "prekoračena je dopuštena razina rekurzija izraza" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "podlijevanje stȏga rekurzija (prazni stȏg)" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "sintaktička greška u izrazu" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "pokušaj dodjeljivanja ne-varijabli (objektu koji nije varijabla)" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "sintaktička greška u dodjeljivanju varijabli" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "dijeljenje s 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "**interna greška** : loš simbol u izrazu za dodjelu" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "znak „:“ je nužan u uvjetnom izrazu" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "eksponent je manji od 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "očekivalo se ime nakon pre-increment ili pre-decrement" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "nedostaje „)“" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "sintaktička greška: očekivan je operand" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "sintaktička greška: nevaljan aritmetički operator" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (simbol greške je „%s“)" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "nevaljana aritmetička baza" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "%s: nevaljana cijelo brojna (integer) konstanta" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "vrijednost baze je prevelika" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: greška u izrazu\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd(): nije moguće pristupiti nadređenim direktorijima" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "nije moguće onemogućiti „nodelay” način za deskriptor datoteke %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "nije moguće rezervirati novi datotečni deskriptor za bash ulaz iz datotečnog deskriptora %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input(): međuspremnik već postoji za novi datotečni deskriptor %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline(): pgrp pipe (procesna skupina cijevi)" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: PETLJA: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: PETLJA: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "račvani PID %d pripada tekućem poslu %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "uklanjamo zaustavljeni posao %d sa skupinom procesa %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process(): PID %5ld (%s) označen kao još uvijek aktivan" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid(): %ld: PID ne postoji" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Gotovo" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Zaustavljeno" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Zaustavljeno(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Pokrenuto" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Gotovo(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Izlaz %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Nepoznata izlazna vrijednost (izlazni kȏd)Nepoznato" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(snimka (core dump) memorije je spremljena!) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "promijeni skupinu potomka (% ld u% ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: PID %ld nije potomak ove ljuske" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: proces %ld nije nigdje registriran" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: posao %d je zaustavljen" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: nema tekućih poslova" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: posao je završen" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: posao %d je već u pozadini" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld(): WNOHANG je omogućen kako bi se izbjeglo neograničeno blokiranje" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: redak %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (snimka (core dump) memorije je spremljena!)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(radni direktorij je sada: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp() nije uspješna" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: nema upravljanja poslom u pozadini" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina retka (protokol realizacije stringova/redaka)" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid()" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "nije moguće postaviti procesnu skupinu (%d) terminala" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "nema upravljanja poslom u ovoj ljusci" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc(): neuspješni kontrolni test: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc(): %s:%d: loše provedeni kontrolni test\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "nepoznato" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc(): zauzeti blok na popisu slobodnih blokova" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free(): pozvana s argumentom bloka koji je već slobodan" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free(): pozvana s argumentom bloka koji se ne koristi" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free(): otkriveno je podlijevanje, mh_nbytes izvan raspona" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free(): otkriveno je podlijevanje; magic8 je oštećen" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free(): veličine početnog i zaključnog (dijela) bloka su različite" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc(): je pozvana s nekorištenim blokom kao argument (blok još nije odabran)" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc(): otkriveno je podlijevanje, mh_nbytes izvan raspona" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc(): otkriveno je podlijevanje; magic8 je oštećen" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc(): veličine početnog i zaključnog (dijela) bloka su različite" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc(): rezervacijska tablica je popunjena s FIND_ALLOC??\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc(): %p je već rezerviran u tablici??\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free(): %p je već slobodan u tablici??\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "nevaljana baza" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: nepoznati host" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: nevaljana usluga" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: loša specifikacija za mrežnu stazu" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "mrežne operacije nisu podržane" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale(): LC_ALL: nije moguće promijeniti jezično područje (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale(): LC_ALL: nije moguće promijeniti jezično područje (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale(): %s: nije moguće promijeniti jezično područje (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale(): %s: nije moguće promijeniti jezično područje (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Imate poštu u $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Imate novu poštu u $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Pošta u %s je već pročitana\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "sintaktička greška: nužan je aritmetički izraz" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "sintaktička greška: neočekivan „;“ znak" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "sintaktička greška: „((%s))“" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document(): loša vrsta instrukcije %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document u retku %d završava sa znakom kraj datoteke (očekivan je „%s“)" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection(): instrukcija za preusmjeravanje „%d“ je izvan raspona" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "" +"shell_getc(): shell_input_line_size (%zu) veća je od SIZE_MAX (%lu):\n" +" redak je skraćen" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "maksimalna broj (količina) here-document-a je premašena" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "neočekivan kraj-datoteke (EOF) pri traženju odgovarajućeg „%c“" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "neočekivan kraj datoteke (EOF) pri traženju „]]“" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "sintaktička greška u uvjetnom izrazu: neočekivan simbol „%s“" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "sintaktička greška u uvjetnom izrazu" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "neočekivan simbol „%s“; očekivana je „)“" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "očekivana je „)“" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "neočekivan argument „%s“ za uvjetni unarni operator" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "neočekivan argument za uvjetni unarni operator" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "neočekivani simbol „%s“; očekivan je uvjetni binarni operator" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "očekivan je uvjetni binarni operator" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "neočekivan argument „%s“ uvjetnom binarnom operatoru" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "neočekivan argument uvjetnom binarnom operatoru" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "neočekivan simbol „%c“ u uvjetnoj naredbi" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "neočekivan simbol „%s“ u uvjetnoj naredbi" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "neočekivan simbol %d u uvjetnoj naredbi" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "sintaktička greška blizu neočekivanog simbola „%s“" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "sintaktička greška blizu „%s“" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "sintaktička greška: neočekivani kraj datoteke" + +#: parse.y:6151 +msgid "syntax error" +msgstr "sintaktička greška" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Koristite \"%s\" za izlaz iz ljuske.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "neočekivani kraj datoteke pri traženju odgovarajuće „)“" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion(): funkcija „%s“ nije pronađena" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion(): %s: moguća ponovljena petlja" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert(): %s: prazni COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command(): loš konektor „%d“" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set(): %d: nevaljan deskriptor datoteke" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set(): pointer datoteke je NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "deskriptor datoteke xtrace (%d) != broju datoteke u pointeru datoteke xtrace (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf(): „%c“: nevaljan znak za format" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "deskriptor datoteke je izvan raspona" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: preusmjeravanje nije jednoznačno" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: nije moguće pisati preko postojeće datoteke" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ograničeno: nije moguće preusmjeriti izlaz" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "nije moguće stvoriti privremenu datoteku za here-document: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: nije moguće dodijeliti deskriptor datoteke varijabli" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port nije podržan bez umrežavanja" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "greška preusmjeravanja: nije moguće duplicirati deskriptor datoteke" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "nije moguće pronaći /tmp; stvorite taj direktorij!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp mora biti valjano ime direktorija" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "u interaktivnoj ljusci pretty-printing se zanemaruje" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: nevaljana opcija" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nije moguće postaviti UID na %d: efektivni UID je %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nije moguće postaviti GID na %d: efektivni GID je %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "nije moguće pokrenuti debugger; dijagnostika je onemogućena" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: to je direktorij" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Nemam ime!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, inačica %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uporaba: %s [GNU dugačka opcija] [opcija]...\n" +" %s [GNU dugačka opcija] [opcija] skripta...\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "GNU dugačke opcije:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Kratke opcije:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD ili -c NAREDBA ili -O SHOPT-OPCIJA (samo za pozivanje)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ili -o opcija (može se promijeniti sa „set”)\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Utipkajte „%s -c \"help set\"“ za dodatne obavijesti o opcijama ljuske.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Utipkajte „%s -c help set“ za dodatne obavijesti o ugrađenim naredbama ljuske.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Koristite naredbu „bashbug“ za prijavljivanje grešaka.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Početna mrežna bash stranica: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Općenita pomoć za korištenje GNU softvera: \n" +"Prijavite primjedbe i greške u prijevodu na lokalizacija@linux.hr/\n" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask(): %d: nevaljana operacija" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Nepostojeći signal" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Poklopi" + +#: siglist.c:55 +msgid "Interrupt" +msgstr "Prekini" + +#: siglist.c:59 +msgid "Quit" +msgstr "Završi" + +#: siglist.c:63 +msgid "Illegal instruction" +msgstr "Nedopuštena instrukcija" + +#: siglist.c:67 +msgid "BPT trace/trap" +msgstr "BPT trag/zamka instrukcija (Trace/Breakpoint trap)" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "ABORT instrukcija" + +#: siglist.c:79 +msgid "EMT instruction" +msgstr "EMT instrukcija" + +#: siglist.c:83 +msgid "Floating point exception" +msgstr "Iznimka (broja) s pomičnim zarezom" + +#: siglist.c:87 +msgid "Killed" +msgstr "Ubijen" + +#: siglist.c:91 +msgid "Bus error" +msgstr "Greška sabirnice" + +#: siglist.c:95 +msgid "Segmentation fault" +msgstr "Segmentacijska greška" + +#: siglist.c:99 +msgid "Bad system call" +msgstr "Loš sustavski poziv" + +#: siglist.c:103 +msgid "Broken pipe" +msgstr "Potrgana cijev" + +#: siglist.c:107 +msgid "Alarm clock" +msgstr "Budilica" + +#: siglist.c:111 +msgid "Terminated" +msgstr "Završeno" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "Žurno U/I stanje" + +#: siglist.c:119 +msgid "Stopped (signal)" +msgstr "Zaustavljeno (signalom)" + +#: siglist.c:127 +msgid "Continue" +msgstr "Nastavljanje" + +#: siglist.c:135 +msgid "Child death or stop" +msgstr "Potomak mrtav ili zaustavljen" + +#: siglist.c:139 +msgid "Stopped (tty input)" +msgstr "Zaustavljen (ulaz u terminal)" + +#: siglist.c:143 +msgid "Stopped (tty output)" +msgstr "Zaustavljen (izlaz iz terminala)" + +#: siglist.c:147 +msgid "I/O ready" +msgstr "U/I je spreman" + +#: siglist.c:151 +msgid "CPU limit" +msgstr "Ograničenje (vremena) procesora" + +#: siglist.c:155 +msgid "File limit" +msgstr "Ograničenje (veličine) datoteke" + +#: siglist.c:159 +msgid "Alarm (virtual)" +msgstr "Alarm (virtualni)" + +#: siglist.c:163 +msgid "Alarm (profile)" +msgstr "Alarm (profil)" + +#: siglist.c:167 +msgid "Window changed" +msgstr "Prozor je promijenjen" + +#: siglist.c:171 +msgid "Record lock" +msgstr "Zapis je zaključan" + +#: siglist.c:175 +msgid "User signal 1" +msgstr "Korisnički signal 1" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Korisnički signal 2" + +#: siglist.c:183 +msgid "HFT input data pending" +msgstr "HFT ulazni podaci čekaju" + +#: siglist.c:187 +msgid "power failure imminent" +msgstr "neizbježan prekid napajanja" + +#: siglist.c:191 +msgid "system crash imminent" +msgstr "neizbježni pad sustava" + +#: siglist.c:195 +msgid "migrate process to another CPU" +msgstr "preseli proces na drugi procesor" + +#: siglist.c:199 +msgid "programming error" +msgstr "programska greška" + +#: siglist.c:203 +msgid "HFT monitor mode granted" +msgstr "HFT nadzor je dopušten" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "HFT nadzor je oduzet" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "HFT sekvencija zvukova je završena" + +#: siglist.c:215 +msgid "Information request" +msgstr "Zahtjev za obavijestima" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Nepoznati signal #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "loša supstitucija: nema zaključnog „%s“ u %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: nije moguće dodijeliti popis elementu polja" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "nije moguće napraviti cijev za zamjenu procesa" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "nije moguće napraviti potomka za zamjenu procesa" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "nije moguće otvoriti imenovanu cijev %s za čitanje" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "nije moguće otvoriti imenovanu cijev %s za pisanje" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "nije moguće duplicirati imenovanu cijev %s kao deskriptor datoteke %d" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "nevaljana supstitucija: zanemaren prazni (nula) bajt u ulazu" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "nije moguće napraviti cijev za zamjenu naredbi" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "nije moguće napraviti potomka za zamjenu naredbi" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute(): nije moguće duplicirati cijev kao deskriptor datoteke 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nevaljano ime varijable za ime referencije" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: nevaljana neizravna ekspanzija" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "„%s“: nevaljano ime varijable" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametar nije postavljen" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametar je prazan ili nedefiniran" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: rezultat od dijela stringa (substring) < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: loša supstitucija" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: nije moguće dodijeliti na ovaj način" + +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "buduće inačice ljuske prisilit će vrednovanje kao aritmetičku supstituciju" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "loša supstitucija: nema zaključnog znaka \"`\" u %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "nema podudaranja: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "očekivan je argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: očekivan je cjelobrojni izraz" + +#: test.c:265 +msgid "`)' expected" +msgstr "očekivana je „)“" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "očekivana je „)“, a nađen je %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: očekivan je binarni operator" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: očekivan je unarni operator" + +#: test.c:896 +msgid "missing `]'" +msgstr "nedostaje „]“" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "sintaktička greška: neočekivan „%s“" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "nevaljani broj za signal" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: prekoračena je dopuštena razina gniježđenja (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps(): loša vrijednost u trap_list[%d]: %p" + +#: trap.c:416 +#, c-format +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: signalom rukuje SIG_DFL, opet šalje %d (%s) samom sebi" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler(): loš signal %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "greška pri uvozu definicije funkcije za „%s“" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "razina ljuske (%d) je previsoka, vraćamo ju na 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable(): u trenutnom opsegu nema konteksta funkcije" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: varijabli se ne može dodijeliti vrijednost" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: nije moguće naslijediti vrijednost od nekompatibilne vrste" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: nazivu referencije se dodjeljuje cijeli broj" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables(): u trenutnom opsegu nema konteksta funkcije" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "*** %s ima prazni string za izvoz" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "*** nevaljani znak %d u izvoznom stringu za %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "*** nema „=“ u izvoznom stringu za %s" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context(): glava „shell_variables“ nije funkcijski kontekst" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context(): nije „global_variables“ kontekst" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope(): vrh od „shell_variables“ nije privremeni raspon valjanosti" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: nije moguće otvoriti kao DATOTEKU" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: nevaljana vrijednost za „trace” deskriptora datoteke" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s vrijednost za kompatibilnost je izvan raspona" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licencija:\n" +"GPLv3+: GNU GPL inačica 3 ili novija \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, inačica %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ovo je slobodan softver: slobodno ga mijenjajte i dijelite." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "NEMA JAMSTVA do granica dopuštenih zakonom." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: nije moguće rezervirati %lu bajtova (rezervirano je %lu bajtova)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: nije moguće rezervirati %lu bajtova" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: nije moguće rezervirati %lu bajtova (rezervirano je %lu bajtova)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: nije moguće rezervirati %lu bajtova" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [IME[=ZAMJENA]... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] IME [IME...]" + +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m MAPA_TIPAKA] [-f DATOTEKA] [-q FUNKCIJA]\n" +" [-u FUNKCIJA] [-r PREČAC] [-x PREČAC:SHELL-NAREDBA]\n" +" [PREČAC:READLINE-FUNKCIJA | READLINE-NAREDBA]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [N]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [N]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [UGRAĐENA_SHELL_FUNKCIJA [ARGUMENT...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [IZRAZ]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [DIREKTORIJ]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] NAREDBA [ARGUMENT...]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [aAfFgiIlnrtux] [IME[=VRIJEDNOST]...] ili declare -p [-aAfFilnrtux] [IME...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] IME[=VRIJEDNOST]… ili typeset -p [-aAfFilnrtux] [IME...]" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [OPCIJA] IME[=VRIJEDNOST ]..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [ARGUMENT...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [ARGUMENT...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f DATOTEKA] [IME...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [ARGUMENT...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts STRING_OPCIJA IME [ARGUMENT...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a IME] [NAREDBA [ARGUMENT...]] [PREUSMJERAVANJE...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [N]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [N]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e EDITOR] [-lnr] [PRVA] [ZADNJA]\n" +"ili: fc -s [UZORAK=ZAMJENA] [NAREDBA]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [SPECIFIKACIJA_POSLA]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [SPECIFIKACIJA_POSLA...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p STAZA] [-dt] [IME...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [UZORAK...]" + +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "" +"history [-c] [-d POZICIJA] [N]\n" +" ili: history -anrw [DATOTEKA]\n" +" ili: history -ps ARGUMENT..." + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "" +"jobs [-lnprs] [SPECIFIKACIJA_POSLA...]\n" +" ili: jobs -x NAREDBA [ARGUMENT...]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [SPECIFIKACIJA_POSLA... | PID...]" + +#: builtins.c:134 +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "" +"kill [-s SIGNAL_IME | -n SIGNAL_BROJ | -SIGNAL] PID | SPECIFIKACIJA_POSLA\n" +" ili: kill -l [SIGNAL]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let ARGUMENT..." + +#: builtins.c:138 +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a POLJE] [-d MEĐA] [-i TEKST] [-p PROMPT]\n" +" [-n BROJ_ZNAKOVA] [-N BROJ_ZNAKOVA] [-t SEKUNDA]\n" +" [-u FD] [IME...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [N]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o IME_OPCIJE] [--] [-] [ARGUMENT...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [IME...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "" +"export [-fn] [IME[=VRIJEDNOST]...]\n" +" ili: export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "" +"readonly [-aAf] [IME[=VRIJEDNOST]...]\n" +" ili: readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [N]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source DATOTEKA [ARGUMENTI]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". DATOTEKA [ARGUMENTI]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [IZRAZ]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ ARGUMENT... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[ARGUMENT] SIGNAL_SPEC...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] IME..." + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [LIMIT]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [MODE]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p VAR] [ID...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [PID...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for IME [in RIJEČIMA...].; do NAREDBE; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( IZRAZ1; IZRAZ2; IZRAZ3 )); do NAREDBE; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select IME [in RIJEČI... ;] do NAREDBE; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] CJEVOVOD" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case RIJEČ in [UZORAK [| UZORAK]...) NAREDBE;;]... esac" + +#: builtins.c:194 +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if NAREDBE; then NAREDBE; [ elif NAREDBE; then NAREDBE; ]... [ else NAREDBE; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while NAREDBE; do NAREDBE-2; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until NAREDBE; do NAREDBE-2; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [IME] NAREDBA [PREUSMJERAVANJA]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "" +"function IME { NAREDBE ; }\n" +" ili: IME () { NAREDBE ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ NAREDBE; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "SPECIFIKACIJA_POSLA [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( IZRAZ ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ IZRAZ ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "var — imena i značenje nekih varijabla ljuske" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | DIREKTORIJ]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [IME_OPCIJE...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v VARIJABLA] FORMAT [ARGUMENTI]" + +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPCIJA] [-A AKCIJA] [-C NAREDBA]\n" +" [-F FUNCIJA] [-G GLOB_UZORAK] [-P PREFIKS] [-S SUFIKS]\n" +" [-W POPIS_RIJEČI] [-X FILTAR_UZORAKA] [IME...]" + +#: builtins.c:235 +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 OPCIJA] [-A AKCIJA] [-C NAREDBA] [-F FUNCIJA]\n" +" [-G GLOB_UZORAK] [-P PREFIKS] [-S SUFIKS]\n" +" [-W POPIS_RIJEČI] [-X FILTAR_UZORAKA] [IME...]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o OPCIJA] [-DEI] [IME...]" + +#: builtins.c:242 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d MEĐA] [-n KOLIČINA [-O POČETAK] [-s BROJ] [-t] [-u FD]\n" +" [-C FUNKCIJA] [-c TOLIKO] [POLJE]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "" +"readarray [-d MEĐA] [-n KOLIČINA] [-O POČETAK] [-s BROJ] [-t] [-u FD]\n" +" [-C FUNKCIJA] [-c TOLIKO] [POLJE]" + +#: builtins.c:256 +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 "" +"Definira ili prikaže aliase.\n" +"\n" +" Bez argumenata (ili s opcijom -p), „alias“ ispiše popis aliasa na\n" +" standardni izlaz u upotrebljivom formatu: alias IME='ZAMJENA'.\n" +" S argumentima, alias je definiran za svako IME za koje je navedena ZAMJENA.\n" +" Zaostali razmak (bjelina) u ZAMJENI čini da „alias“ prilikom ekspanzije\n" +" provjerava je li i sljedeća riječ zamjenska.\n" +"\n" +" Options:\n" +" -p ispiše sve definirane aliase u upotrebljivom formatu\n" +"\n" +" Završi s uspjehom osim ako alias nije definiran za dano IME." + +#: builtins.c:278 +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 "" +"Ukloni svako navedeno IME iz popisa definiranih aliasa.\n" +"\n" +" S opcijom „-a“ izbriše sve definirane aliase.\n" +"\n" +" Završi s uspjehom osim ako IME nije postojeći alias." + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Prikaže i postavlja „Readline“ prečace (key binding) i varijable.\n" +"\n" +" Veže sekvenciju tipki (key sequence, prečac) na „Readline“\n" +" funkciju ili na makro ili na „Readline“ varijablu. Sintaksa za argumente\n" +" koji nisu opcija je ista kao za ~/.inputrc, ali moraju biti proslijeđeni\n" +" kao jedan argument; primjer: bind '\"\\C-x\\C-r\": re-read-init-file'\n" +"\n" +" Opcije:\n" +" -f DATOTEKA pročita prečace (bindings, key sequences) iz DATOTEKE\n" +" -l izlista imena svih poznatih funkcija\n" +" -m MAPA_TIPAKA koristi MAPU_TIPAKA (keymap) dok traje ova naredba;\n" +" moguće MAPE_TIPAKA su jedna od emacs, emacs-standard,\n" +" emacs-meta, emacs-ctlx, vi, vi-move, vi-command,\n" +" i vi-insert.\n" +" -P izlista imena funkcija i prečaca\n" +" -p ispiše imena funkcija i prečaca u obliku\n" +" koji se može iskoristiti kao ulaz\n" +" -r PREČAC razveže PREČAC (ukloni sekvenciju tipki za prečac)\n" +" -q FUNKCIJA ispita i ispiše tipke koje pozivaju tu FUNKCIJU\n" +" -S izlista prečace (sekvencije tipki) koje pozivaju makroe\n" +" s njihovim vrijednostima\n" +" -s ispiše sekvencije tipki poje pozivaju makroe s\n" +" njihovim vrijednostima u obliku koji se može\n" +" iskoristiti kao ulaz\n" +" -u FUNKCIJA razveže sve prečace vezane na tu FUNKCIJU\n" +" -V izlista imena varijabli s njihovim vrijednostima\n" +" -v ispiše imena varijabli s njihovim vrijednostima\n" +" u formatu koji se može iskoristiti kao ulaz\n" +" -x PREČAC:SHELL-NAREDBA izvrši SHELL-NAREDBU svaki put kad se unese\n" +" PREČAC (sekvencija tipki)\n" +" -X ispiše prečace (sekvencije tipki) vezane s „-x“ i\n" +" njima pridružene naredbe u obliku koji se može\n" +" iskoristiti kao ulaz\n" +"\n" +" Završi s uspjehom osim ako je dana neprepoznata opcija ili se je\n" +" dogodila greška." + +#: builtins.c:330 +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 "" +"Iziđe iz for, while ili until petlji.\n" +"\n" +" Ako je dan N, ukine N ugnježđenih petlji.\n" +"\n" +" Završi s uspjehom osim ako je N manji od 1." + +#: builtins.c:342 +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 "" +"Nastavlja sljedeću iteraciju ugnježđenih for, while ili until petlji.\n" +" Ako je dan N, nastavlja na N-tom ugnježđenom petljom.\n" +"\n" +" Završi s uspjehom osim ako je N manji od 1." + +#: builtins.c:354 +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 "" +"Izvrši ugrađenu funkciju ljuske (shell builtins).\n" +"\n" +" Izvrši danu UGRAĐENU_SHELL_FUNKCIJU s navedenim ARGUMENTIMA.\n" +" To je korisno ako želite redefinirati implementaciju ugrađene shell\n" +" funkcije kao vlastitu shell funkciju (skriptu s istim imenom kao ugrađena\n" +" shell funkcija), a potrebna vam je funkcionalnost te ugrađene shell\n" +" funkcije unutar vaše vlastite skripte.\n" +"\n" +" Završi s kȏdom UGRAĐENE_SHELL_FUNKCIJE ili s kȏdom 1 ako\n" +" UGRAĐENA_SHELL_FUNKCIJA nije ugrađene funkcija ljuske." + +#: builtins.c:369 +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 "" +"Vrati kontekst trenutnog poziva funkciji.\n" +"\n" +" Bez IZRAZA, vrati „$line $filename“. Ako je dan IZRAZ, onda vrati\n" +" „$line $subroutine $filename“; ova dodatna informacija može poslužiti za\n" +" stvaranje „stack trace“.\n" +"\n" +" Vrijednost IZRAZA naznačuje koliko ciklusa se treba vratiti\n" +" unatrag od trenutne pozicije; trenutni ciklus ima vrijednost 0.\n" +"\n" +" Završi s uspjehom osim ako ljuska ne izvršava ljuskinu funkciju\n" +" ili je IZRAZ nevaljan." + +#: builtins.c:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Promjeni trenutni direktorij.\n" +"\n" +" Promijeni trenutni direktorij u navedeni DIREKTORIJ. Ako DIREKTORIJ nije\n" +" naveden, za DIREKTORIJ se koristi vrijednost varijable HOME.\n" +"\n" +" Varijabla CDPATH definira staze (direktorije) po kojima se\n" +" traži DIREKTORIJ.\n" +"\n" +" Nazivi direktorija (staza) u CDPATH su razdvojeni s dvotočkom (:);\n" +" prazni naziv za direktorij je isto što i trenutni direktorij (.)\n" +" CDPATH se ne koristi ako DIREKTORIJ započinje s kosom crtom (/)\n" +"\n" +" Ako se direktorij ne pronađe, a omogućena je opcija „cdable_vars“,\n" +" tada se dana riječ uzme kao ime varijable; ako ta varijabla sadrži\n" +" naziv, „cd“ prijeđe u direktorij s tim nazivom.\n" +"\n" +" Opcije:\n" +" -L slijedi simboličke veze; simboličke veze u DIREKTORIJU razriješi\n" +" nakon obrade instance „..“\n" +" -P rabi fizičku strukturu direktorija umjesto da slijedi simboličke\n" +" veze; simboličke veze u DIREKTORIJU razriješi prije obrade\n" +" instance „..“\n" +" -e ako je dana s opcijom „-P“, i trenutni radni direktorij nije\n" +" moguće uspješno odrediti nakon uspješne promjene direktorija,\n" +" „cd“ završi s kȏdom različitim od 0.\n" +" -@ opiše proširene atribute povezane s datotekom kao direktorij\n" +" koji sadrži atribute datoteke (ako sustav to podržava)\n" +"\n" +" Zadano, simboličke poveznice se slijede kao da je navedena opcija -L.\n" +" „..“ (ako se pojavi u DIREKTORIJU) obradi se uklanjanjem komponente\n" +" staze koja mu neposredno prethodi unatrag do kose crte „/“ ili do početka\n" +" DIREKTORIJA.\n" +"\n" +" Završi s uspjehom ako je direktorij promijenjen i ako je\n" +" varijabla okoline PWD uspješno postavljena kad je dana opcija „-P“;\n" +" u suprotnom završi s kȏdom 1." + +#: builtins.c:425 +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" +" \t\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 "" +"Ispiše ime trenutnog radnog direktorija.\n" +"\n" +" Opcije:\n" +" -L ispiše vrijednost od $PWD ako sadrži trenutni radni direktorij\n" +" -P ispiše stvarnu fizičku stazu do direktorija bez simboličkih veza\n" +"\n" +" Bez opcija, „pwd“ se ponaša kao da je navedena opcija „-L“\n" +"\n" +" Završi s uspjehom osim ako nije dana nevaljana opcija\n" +" ili se trenutni radni direktorij ne može pročitati." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "Naredba nema nikakvog efekta, ne radi ništa; uvijek završi uspješno." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "Uvijek završi uspješno s kȏdom 0." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "Uvijek završi neuspješno s kȏdom 1." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Izvrši jednostavnu naredbu ili prikaže informacije o naredbama.\n" +"\n" +" Izvrši danu NAREDBU s navedenim ARGUMENTIMA zanemarujući pritom bilo\n" +" koju funkciju ljuske s istim imenom (naredba). Može se koristiti da\n" +" pokrenete naredbu na disku i onda kad postoji funkcija s istim imenom.\n" +"\n" +" Opcije:\n" +" -p rabi zadanu vrijednost za PATH kao garanciju\n" +" pronalaženja svih standardnih programa\n" +" -v pokaže ime naredbe koja bi se izvršila\n" +" -V == „-v” ali opširnije\n" +"\n" +" Završi s izlaznim kȏdom NAREDBE\n" +" ili s 1 ako NAREDBA nije pronađena." + +#: builtins.c:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Postavlja vrijednosti i atribute varijablama.\n" +"\n" +" Deklarira varijable i dodjeljuje im atribute. Ako IMENA nisu dana,\n" +" prikaže atribute i vrijednosti svih varijabli.\n" +"\n" +" Opcije:\n" +" -f prikaže samo definirane funkcije (ne prikaže varijable)\n" +" -F prikaže samo imena funkcija bez definicija\n" +" -g stvori globalne varijable samo za upotrebu u funkciji ljuske;\n" +" inače su zanemarene\n" +" -I ako stvori lokalnu varijablu, neka naslijedi atribute i vrijednost\n" +" varijable s istim imenom u prethodnom opsegu\n" +" -p prikaže atribute i vrijednost za svako dano IME\n" +"\n" +" Opcije koje postavljaju atribute:\n" +" -a učini od navedenih IMENA indeksirana polja (ako je to podržano)\n" +" -A učini od navedenih IMENA asocijativna polja (ako je to podržano)\n" +" -i učini da navedena IMENA dobiju „integer“ svojstva\n" +" -l pretvori slova navedenih IMENA u mala slova prilikom upotrebe\n" +" -n učini da dano IME referira na varijablu imenovanu\n" +" sa svojom vrijednosti\n" +" -r učini navedena IMENA readonly\n" +" -t učini da navedena IMENA dobiju „trace“ svojstva\n" +" -u pretvori slova navedenih IMENA u velika slova prilikom upotrebe\n" +" -x označi navedena IMENA za ekport\n" +"\n" +" „+“ umjesto „-“ isključi dani atribut.\n" +"\n" +" Varijable s „integer“ atributom obavljaju aritmetičke operacije tijekom\n" +" izvođenja i upotrebe (pogledajte „let“ naredbu).\n" +"\n" +" Unutar funkcije „declare“ učini navedena IMENA lokalnima, slično kao\n" +" naredba „local“. Opcija „-g“ spriječi takvo ponašanje.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija\n" +" ili se dogodila greška prilikom zadavanja varijabli." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Postavi vrijednosti i svojstva varijabli.\n" +"\n" +" Sinonim za „declare“. Za detalje utipkajte (bez navodnika) „help declare“." + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definira lokalne varijable.\n" +"\n" +" Stvori lokalnu varijablu IME i dodijeli joj vrijednost. OPCIJA može biti\n" +" bilo koja od opcija koju prihvaća naredba „declare“.\n" +"\n" +" Lokalne varijable mogu se koristiti samo unutar funkcije i vidljive su\n" +" samo toj funkciji i njezinim potomcima.\n" +"\n" +" Završi s uspjehom osim ako su navedene nevaljane opcije, ili se dogodila\n" +" greška pri dodijeli ili ljuska ne izvrši funkciju." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Navedene argumente ispiše na standardni izlaz.\n" +"\n" +" Ispiše navedene argumente na standardni izlaz međusobno\n" +" odvojene s jednim znakom za razmak i završi s novim retkom.\n" +"\n" +" Opcije:\n" +" -n ne pripaja znak novog retka (LF)\n" +" -e interpretira sljedeće backslash (\\) kontrolne kȏdove\n" +" -E ne interpretira sljedeće backslash (\\) kontrolne kȏdove\n" +"\n" +" „echo“ interpretira ove kontrolne kȏdove:\n" +" \\a alert (zvučni signal)\n" +" \\b backspace\n" +" \\c spriječi daljni izlaz\n" +" \\e znak za escape (ESC)\n" +" \\E znak za escape (ESC)\n" +" \\f nova stranica (znak za FF, form feed)\n" +" \\n novi redak (znak za LF, line feed)\n" +" \\r na početak novog retka (Enter, znak za CR, carriage return)\n" +" \\t horizontalni tabulator\n" +" \\v vertikalni tabulator\n" +" \\\\ backslash (\\)\n" +" \\0NNN znak s ASCII kȏdom NNN (oktalni, 1 do 3 oktalne znamenke)\n" +" \\xHH osmobitni znak čija je vrijednost HH (heksadecimalna)\n" +" \\uHHHH unikodni znak čija je vrijednost HHHH (heksadecimalna)\n" +" HHHH može biti od 1 do 4 heksadecimalne znamenke\n" +" \\UHHHHHHHH unikodni znak čija je vrijednost HHHH (heksadecimalna)\n" +" HHHHHHHH može biti od 1 do 8 heksadecimalnih znamenki\n" +"\n" +" Završi s uspjehom osim ako se ne dogodi greška pri pisanju." + +#: builtins.c:597 +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 "" +"Ispiše argumente na standardni izlaz.\n" +"\n" +" Prikaže ARGUMENTE na standardnom izlazu (pripoji im znak za novi redak).\n" +" Opcijom „-n“ može se isključiti pripajanje znaka za novi redak.\n" +"\n" +" Završi s uspjehom osim ako se ne dogodi greška pri pisanju." + +#: builtins.c:612 +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 "" +"Omogući ili onemogući ugrađene funkcije ljuske.\n" +"\n" +" Omogućuje i onemogućuje ugrađene naredbe ljuske. Onemogućavanje\n" +" dopušta pokretanje datoteke na disku s istim imenom kao ugrađena\n" +" naredba, a bez potrebe specificiranja kompletne staze.\n" +"\n" +" Opcije:\n" +" -a ispiše ugrađene naredbe i prikaže jesu li o(ne)mogućene\n" +" -n onemogući IMENOVANE naredbe ili izlista onemogućene naredbe\n" +" -p generira izlaz koji se može koristi za ulaz (zadano)\n" +" -s ispiše samo imena specijalnih POSIX ugrađenih naredbi\n" +"\n" +" Opcije koje upravljaju dinamičko učitavanje:\n" +" -f učita ugrađenu naredbu IME iz dijeljenog objekta DATOTEKA\n" +" -d ukloni ugrađenu naredbu učitanu s „-f“\n" +"\n" +" Bez opcija, omogućena su sva navedena IMENA. Bez imena pokazane su\n" +" omogućene naredbe (ili s „-n“ onemogućene).\n" +"\n" +" Primjer: da koristite binarnu datoteku „test“ koja se nalazi na stazi\n" +" pretraživanja PATH, umjesto ugrađene (test) naredbe, utipkajte\n" +" (bez navodnika) „enable -n test“.\n" +"\n" +" Završi s uspjehom osim ako IME nije ugrađena naredba ili se nije\n" +" dogodila greška." + +#: builtins.c:640 +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 "" +"Izvrši argumente kao naredbu ljuske.\n" +"\n" +" Združi argumente u jedinstveni string, upotrijebi ga kao ulaz za ljusku\n" +" i izvrši rezultirajuću naredbu.\n" +"\n" +" Završi s kȏdom naredbe ili uspješno ako je naredba prazna." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Raščlamba argumenata opcija.\n" +"\n" +" „getopts” se može koristiti u skriptama za raščlanjivanje\n" +" pozicijskih parametara kao opcija.\n" +"\n" +" STRING_OPCIJA sadrži slova opcije koje treba prepoznati; ako iza\n" +" slova slijedi dvotočka, očekuje se da opcija ima argument koji treba\n" +" biti bjelinom odvojen od opcije.\n" +"\n" +" Svaki put kad se pozove, getopts će smjestiti sljedeću opciju u ljuskinu\n" +" varijablu IME (ako IME ne postoji, getopts ga inicijalizira), a indeks\n" +" sljedećeg argumenta koji treba procesirati u ljuskinu varijablu OPTIND.\n" +" OPTIND je inicijaliziran na 1 pri svakom pozivanju ljuske ili ljuskine\n" +" skripte. Ako opcija zahtijeva argument, getopts smjesti taj argument u\n" +" ljuskinu varijablu OPTARG.\n" +"\n" +" getopts javlja greške na jedan od dva načina. Ako je dvotočka prvi znaku\n" +" u STRINGU_OPCIJA, getopts tiho prijavi grešku, tj. ne ispisuje poruke o\n" +" greškama. Ako naiđe na nevaljanu opciju, getopts smjesti nađeni znak opcije\n" +" u OPTARG. Ako zahtijevani argument nije pronađen, getopts smjesti „:“ u IME\n" +" i postavi OPTARG na pronađeni znak opcije. Ako getopts ne radi tiho i naiđe\n" +" na nevaljanu opciju, getopts smjesti „?“ u IME i poništi OPTARG.\n" +" Ako zahtijevani argument nije pronađen, getopts smjesti „?“ u IME, poništi\n" +" OPTARG i ispiše poruku o greškama.\n" +"\n" +" Ako ljuskina varijabla OPTERR ima vrijednost 0, getopts onemogući ispis\n" +" poruka o greškama, čak i kad prvi znak u STRINGU_OPCIJA nije dvotočka.\n" +" Zadano, OPTERR ima vrijednost 1.\n" +"\n" +" Getopts obično analizira pozicijske parametre, a ako su\n" +" argumenti navedeni kao ARG vrijednosti, onda njih analizira.\n" +"\n" +" Završi s uspjehom ako pronađe opciju; ako naiđe na kraj opcija\n" +" ili ako se dogodi greška, završi s neuspjehom." + +#: builtins.c:694 +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Zamjeni ljusku s danom naredbom.\n" +"\n" +" Izvrši danu NAREDBU, zamjenjujući ovu ljusku s ovim programom.\n" +" Eventualni ARGUMENTI postanu argumenti NAREDBE. Ako NAREDBA nije\n" +" specificirana, sva preusmjeravanja se dogode u trenutnoj ljusci.\n" +"\n" +" Opcije:\n" +" -a IME dȁde IME kao nulti argument NAREDBI\n" +" -c izvrši NAREDBU u praznoj okolini\n" +" -l proslijedi crticu („-“) kao nulti argument NAREDBE\n" +"\n" +" Ako se naredba ne može izvršiti, ne-interaktivna ljuska završi,\n" +" osim ako je aktivna opcija ljuske „execfail“.\n" +"\n" +" Završi s uspjehom, osim ako NAREDBA nije pronađena ili se dogodila\n" +" greška preusmjeravanja." + +#: builtins.c:715 +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 "" +"Izlaz iz ljuske.\n" +"\n" +" Završi s kȏdom N. Bez N završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:724 +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 "" +"Izlaz iz prijavne ljuske.\n" +"\n" +" Završi s kȏdom N. Završi s greškom ako to nije prijavna ljuska." + +#: builtins.c:734 +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 "" +"Prikaže ili izvrši naredbe iz popisa povijesti.\n" +"\n" +" Koristi se za pokazivanje dosadašnjih, za uređivanje ili za ponovno\n" +" pokretanje naredbi. PRVA i ZADNJA mogu biti brojevi koji specificiraju\n" +" raspon ili PRVA može biti string s koji specificira najnoviju naredbu\n" +" koja započinje s tim slovima.\n" +"\n" +" Opcije:\n" +" -e EDITOR ime EDITORA koji će se koristi; zadano, koristi se FCEDIT,\n" +" zatim EDITOR ili konačno „vi“\n" +" -l izlista popis naredbi (umjesto uređivanja)\n" +" -n popis bez brojeva\n" +" -r popis s obrnutim redoslijedom (najnovija prva)\n" +"\n" +" U obliku „fc -s [UZORAK=ZAMJENA...] [NAREDBA]”,\n" +" „fc” nakon provedenih naznačenih supstitucija ponovno izvrši NAREDBU.\n" +"\n" +" Prikladni alias s ovom funkcijom je r='fc -s'. Tako, utipkani „r“ izvrši\n" +" ponovno posljednju naredbu, a utipkani „r cc“ izvrši posljednju naredbu\n" +" koja započinje s „cc“.\n" +" \n" +" Završi s kȏdom izvršene naredbe, a različito od 0 ako se dogodi greška." + +#: builtins.c:764 +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 "" +"Premjesti posao u prednji plan.\n" +"\n" +" Premjesti specificirani posao u prednji plan i učini ga trenutnim poslom.\n" +" Bez navedene specifikacije posla, premjesti u prednji plan posao koji\n" +" ljuska smatra trenutnim.\n" +"\n" +" Završi s kȏdom trenutne naredbe u prednjem planu ili s neuspjehom ako se\n" +" dogodi greška." + +#: builtins.c:779 +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 "" +"Premjesti poslove u pozadinu.\n" +"\n" +" Premjesti specificirane poslove u pozadinu, kao da su pokrenuti s „&“\n" +" Ako nije navedena nijedna SPECIFIKACIJA_POSLA, premjesti u pozadinu\n" +" posao koji ljuska smatra trenutnim.\n" +"\n" +" Završi s uspjehom osim ako upravljanje poslovima nije omogućeno\n" +" ili se dogodila greška." + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Zapamti ili prikaže lokacije programa.\n" +"\n" +" Odredi i zapamti apsolutnu stazu za svaku navedenu naredbu IME. Bez\n" +" argumenata prikaže podatke o zapamćenim naredbama.\n" +"\n" +" Opcije:\n" +" -d zaboravi zapamćene lokacije za svako navedeno IME\n" +" -l generira izlaz u obliku koji se može koristi kao ulaz\n" +" -p STAZA rabi STAZU kao kao apsolutnu stazu za naredbu IME\n" +" -r zaboravi sve zapamćene lokacije\n" +" -t ispiše zapamćene lokacije za svako navedeno IME\n" +" (s prefiksom IME ako je navedeno više IMENA)\n" +"\n" +" Svako navedeno IME traži se u $PATH i doda se popisu zapamćenih\n" +" naredbi.\n" +"\n" +" Završi s uspjehom osim ako nije pronađeno IME ili je dana nevaljana opcija." + +#: builtins.c:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is given." +msgstr "" +"Prikaže podatke o ugrađenim (builtins) naredbama.\n" +"\n" +" Prikaže kratke sažetke o ugrađenim naredbama. Ako je specificiran\n" +" UZORAK, prikaže detaljnu pomoć za sve naredbe koje podudaraju UZORAK;\n" +" inače ispiše popis tema za koje možete potražiti detalje.\n" +"\n" +" Opcije:\n" +" -d ukratko opisano djelovanje naredbe\n" +" -m prikaže uporabu u pseudo manpage formatu\n" +" -s prikaže samo sažetak uporabe za svaku naredbu koja podudara UZORAK\n" +"\n" +" Završi s uspjehom osim ako UZORAK nije pronađen, ili je dana nevaljana\n" +" opcija." + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 "" +"Prikaže ili manipulira povijest naredbi.\n" +"\n" +" Prikaže numerirani popis izvršenih naredbi (povijest); ispred\n" +" modificiranih stavki stoji prefiks „*“. S argumentom N\n" +" ispiše samo N posljednjih redaka povijesti.\n" +"\n" +" Opcije:\n" +" -c izbriše povijest iz memorije; zaboravi sve izvršene naredbe\n" +" -d POZICIJA izbriše redak povijesti na toj POZICIJI. Negativna\n" +" POZICIJA odbrojava od kraja popisa.\n" +"\n" +" -a doda trenutnu povijest „povijesnoj“ datoteci\n" +" -n doda sve nepročitane retke povijesne datoteke\n" +" trenutnom popisu povijesti\n" +" -r pročita i doda povijesnu datoteku\n" +" trenutnom popisu povijesti\n" +" -w trenutnu povijest zapiše u povijesnu datoteku\n" +"\n" +" -p proširi povijest na svakom ARGUMENTU i prikaže rezultat\n" +" bez spremanja u povijesni popis\n" +" -s doda ARGUMENTE kao jednu stavku popisu povijesti\n" +"\n" +" Ako je dana, DATOTEKA se koristi se kao povijesna datoteka; ako nije dana,\n" +" koristi se varijabla HISTFILE (ako ima vrijednost). Inače se koristi\n" +" ~/.bash_history.\n" +"\n" +" Ako HISTTIMEFORMAT varijabla postoji i nije nula, njezinu vrijednost\n" +" koristi strftime(3) kao format string za ispis vremenskih oznaka\n" +" povijesnih stavki; inače, vremenske oznake se ne ispisuju.\n" +"\n" +" Završi s uspjehom osim ako nije dana nevaljana opcija ili se dogodila\n" +" greška." + +#: builtins.c:879 +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\tlists only processes that have changed status since the last\n" +" \t\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 "" +"Prikaže stanje poslova.\n" +"\n" +" Izlista aktivne poslove. SPECIFIKACIJA_POSLA ograniči izlaz samo za\n" +" taj posao. Bez opcija, prikaže status svih aktivnih poslova.\n" +"\n" +" Opcije:\n" +" -l prikaže i ID-ove procesa uz uobičajene obavijesti\n" +" -n prikaže samo procese koji su se promijenili od zadnjeg izvješća\n" +" -p prikaže samo ID-ove procesa\n" +" -r ograniči izlaz samo na trenutno pokrenute poslove\n" +" -s ograniči izlaz samo na zaustavljene poslove\n" +"\n" +" Ako je navedena opcija '-x', dana NAREDBA će se izvršiti tek nakon\n" +" zatvaranja svih navedenih poslova u ARGUMENTIMA (tj. njihov ID procesa je\n" +" zamijenjen s ID-om njima nadređenog procesa).\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili se dogodila greška.\n" +" Ako je dana opcija -x, završi sa izlaznim kȏdom NAREDBE." + +#: builtins.c:906 +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" +" \t\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 "" +"Uklanja poslove iz trenutne ljuske.\n" +"\n" +" Ukloni svaki specificirani posao iz tablice aktivnih poslova.\n" +" Ako nije navedena nijedna SPECIFIKACIJA_POSLA, ukloni posao\n" +" koji ljuska smatra trenutnim.\n" +"\n" +" Opcije:\n" +" -a ukloni sve poslove (ako nije specificiran nijedan posao)\n" +" -h ne ukloni, ali označi svaku SPECIFIKACIJU_POSLA tako da se\n" +" poslu ne pošalje SIGHUP ako (ili kad) ljuska primi SIGHUP\n" +" -r ukloni samo trenutne poslove\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili nije\n" +" navedena SPECIFIKACIJA_POSLA." + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"Pošalje signal poslu.\n" +"\n" +" Procesima označenim s PID-om ili sa SPECIFIKACIJOM_POSLA pošalje signal\n" +" naveden brojem ili imenom. Ako nije naveden ni broj ni ime, „kill” pošalje\n" +" SIGTERM.\n" +"\n" +" Opcije:\n" +" -s IME IME je ime signala koji se šalje\n" +" -n BROJ BROJ je broj signala koji se šalje\n" +" -l izlista imena dostupnih signala; ako su dani argumenti\n" +" iza „-l“, to su brojevi signala čija odgovarajuća\n" +" imena treba ispisati\n" +" -L == -l\n" +"\n" +" „kill“ je ugrađena ljuskina naredba iz dva razloga: dopušta korištenje\n" +" ID posla umjesto ID procesa i također dopušta ubiti procese iako\n" +" ste dostigli vaše ograničenje za broj procesa koje možete stvoriti;\n" +" tj. ne morate pokrenuti novi proces da ubijete prekobrojne procese.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili se dogodila greška." + +#: builtins.c:949 +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 "" +"Vrednuje aritmetičke izraze.\n" +"\n" +" Vrednuje svaki ARGUMENT kao aritmetički izraz. Vrednovanje se\n" +" obavlja za cijele brojeve fiksne širine bez provjere prelijevanja.\n" +" Ipak, dijeljenje s nulom se detektira i prijavi kao greška.\n" +"\n" +" Popis koji slijedi opisuje operatore s jednakom prednošću u istom retku,\n" +" a redci su poredani po opadajućoj prednosti.\n" +"\n" +" var++, var-- post-inkrement, post-dekrement varijable\n" +" ++var, --var pre-inkrement, pre-dekrement varijable\n" +" -, + unarni minus, unarni plus\n" +" !, ~ logička i bitwise negacija\n" +" ** potenciranje\n" +" *, /, % množenje, dijeljenje, ostatak dijeljenja\n" +" +, - zbrajanje, oduzimanje\n" +" <<, >> bitwise pomak ulijevo, udesno\n" +" <=, >=, <, > usporedba\n" +" ==, != jednako, nejednako\n" +" & bitwise AND\n" +" ^ bitwise XOR\n" +" | bitwise OR\n" +" && logički AND\n" +" || logički OR\n" +"\n" +" expr ? expr : expr uvjetni izraz\n" +"\n" +" =, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |= pridruživanje\n" +"\n" +" Varijable ljuske su dopuštene kao parametri. Ime varijable se zamijeni\n" +" s njezinom vrijednošću (ako treba, pretvori se u cijeli broj).\n" +" Varijable, za upotrebu u izrazima, ne moraju imati atribut cijelog broja.\n" +"\n" +" Operatori se vrednuju prema pravilima prednosti. Najprije se\n" +" vrednuju pod-izrazi u zagradama i tako mogu prevagnuti nad gore\n" +" opisanim pravilima prednosti.\n" +"\n" +" Ako je vrednovanje zadnjeg ARGUMENTA nula (0), „let“ završi s kȏdom 1;\n" +" inače završi s uspjehom." + +#: builtins.c:994 +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. By default, the backslash character escapes delimiter characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Pročita redak iz standardnog ulaza i razdijeli ga na polja.\n" +"\n" +" Pročita jedan redak iz standardnog ulaza (ili navedenog deskriptora\n" +" datoteke FD ako je dana opcija „-u“) i dodijeli prvu riječ prvom IMENU,\n" +" drugu riječ drugom IMENU, i tako dalje; preostale riječi dodijeli zadnjem\n" +" IMENU. Samo se znakovi sadržani u varijabli $IFS prepoznaju kao MEĐA\n" +" (separator riječi). Zadano, obratna kosa crta (backslash) maskira znakove\n" +" za separator i znak za novi redak.\n" +"\n" +" Ako nije navedeno nijedno IME, pročitani redak se spremi u varijablu REPLY.\n" +"\n" +" Opcije:\n" +" -a POLJE pročitane riječi dodijeli sekvencijalnim indeksima POLJA\n" +" počevši od nule\n" +" -d MEĐA nastavi čitati sve dok ne pročita prvu MEĐU (umjesto LF znaka)\n" +" -e rabi „Readline“ za dobaviti redak\n" +" -i TEKST rabi TEKST kao početni tekst za „Readline“\n" +" -n BROJ zaustavi čitanje nakon pročitanih ne više od BROJ znakova\n" +" ili nakon LF znaka (umjesto da uvijek čeka na LF znak)\n" +" -N BROJ zaustavi čitanje samo nakon pročitanih ne više od BROJ\n" +" znakova ili nakon EOF znaka ili nakon isteka „t SEKUNDA\n" +" -p PROMPT ispiše taj string kao prompt (bez LF) prije početka čitanja\n" +" -r backslash je doslovno kosa crta (nema posebno značenje)\n" +" -s ne odjekuje (echo) ulaz koji dolazi iz terminala\n" +" -t BROJ nakon isteka BROJA sekundi prestane čekati na ulaz i završi\n" +" s kȏdom većim od 128; zadano, broj sekundi čekanja je\n" +" vrijednost varijable TMOUT; BROJ može biti i realni broj;\n" +" Ako je BROJ = 0, „read“ završi odmah bez da išta čita, a\n" +" samo ako je ulaz dostupni na specificiranom deskriptoru\n" +" datoteke Završi s uspjehom\n" +"\n" +" -u FD čita iz deskriptora datoteke FD umjesto iz standardnog ulaza\n" +"\n" +" Završi s uspjehom osim ako ne naiđe na konac datoteke (EOF) ili je\n" +" isteklo vrijeme čekanja ili se dogodila greška pri dodjeli ili je\n" +" naveden nevaljani deskriptor datoteke kao argument opciji „-u“." + +#: builtins.c:1042 +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 "" +"Vračanje iz funkcije ljuske.\n" +"\n" +" Učini da funkcija ili pokrenuta skripta završi sa izlaznom vrijednošću\n" +" specificiranom s N. Ako N nije dan, završi s kȏdom zadnje naredbe\n" +" izvršene unutar funkcije ili skripte.\n" +"\n" +" Vrati vrijednost N ili 1 ako ljuska ne izvrši funkciju ili skriptu." + +#: builtins.c:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"Postavlja ili uklanja vrijednosti opcija ljuske i pozicijskih parametara.\n" +"\n" +" Mijenja svojstva ljuske i vrijednosti pozicijskih parametara.\n" +" Bez opcija ili argumenata „set” ispiše imena i vrijednosti svih definiranih\n" +" varijabli i funkcija u obliku koji se može iskoristiti kao ulaz.\n" +" Dostupne su sljedeće opcije („+“ umjesto „-“ onemogući navedenu opciju):\n" +"\n" +" -a automatski izveze nove ili modificirane varijable i funkcije\n" +" -B izvrši zamjenu vitičastih zagrada (brace expansion), zadano;\n" +" -b odmah prijavi prekid posla (ne čeka da završi trenutna naredba)\n" +" -C onemogući da preusmjereni izvoz piše preko regularnih datoteka\n" +" -E omogući da bilo koji ERR „trap“ naslijede funkcije ljuske i potomci\n" +" -e završi odmah ako naredba završi s kȏdom različitim od nula\n" +" -f onemogući zamjenske znakove za imena datoteka (isključi „globbing“)\n" +" -H omogući upotrebu znaka „!“ za pozivanje naredbi iz povijesti (zadano)\n" +" -h pamti (apsolutne) lokacije izvršenih naredbi (zadano)\n" +" -k sve argumente dodijeljene varijablama smjesti u okolinu\n" +" (a ne samo one argumente koji prethode imenu naredbe)\n" +" -m upravljanje poslovima je omogućeno (zadano)\n" +" -n pročita, ali ne izvrši naredbe\n" +" -o IME_OPCIJE omogući tu opciju (v. niže dugačke nazive za IME_OPCIJE)\n" +" -P ne razriješi simboličke veze pri izvršavanju naredbi poput „cd“\n" +" koje promjene trenutni direktorij\n" +" -p uključi privilegirani način: datoteke BASH_ENV i ENV se zanemare,\n" +" funkcije ljuske se ne uvoze iz okoline, a zanemari se i\n" +" sve SHELLOPTS; taj način se automatski aktivira kad god se stvarni\n" +" i efektivni UID i GID ne podudaraju. Isključivanje ove opcije\n" +" učini da je efektivni UID i GID isti kao i stvarni UID i GID.\n" +" -T DEBUG i RETURN „trap“ naslijede funkcije ljuske i potomci\n" +" -t završi nakon čitanja i izvršenja jedne naredbe\n" +" -u tretira korištenje nepostojećih varijabli kao grešku pri supstituciji\n" +" -v ispisuje ulaz (odjekuje ih) istovremeno dok čitam\n" +" -x ispisuje naredbe s argumentima istovremeno dok izvršava\n" +" -- dodijeli sve preostale argumente pozicijskim parametrima; ako nema\n" +" preostalih argumenata, postojeći pozicijski argumenti se brišu\n" +" - isključi opcije -v i -x; argumenti koji slijede su pozicijski\n" +" parametri (ali ako ih nema, postojeći pozicijski argumenti\n" +" se ne brišu)\n" +"\n" +" Opcije se također mogu koristiti pri pokretanju ljuske. Trenutno stanje\n" +" svojstva može se naći u $-. Podrazumijeva se da su svi dodatni argumenti\n" +" pozicijski i dodijeljeni su u $1, $2, .. $N.\n" +"\n" +" Dugački nazivi za IME_OPCIJE koji se koriste s opcijom -o (ili +o)\n" +" allexport == -a\n" +" braceexpand == -B (zamjena vitičastih zagrada)\n" +" emacs za uređivanje redaka koristi sučelje u „emacs“ stilu\n" +" errexit == -e\n" +" errtrace == -E\n" +" functrace == -T\n" +" hashall == -h\n" +" histexpand == -H\n" +" history omogući naredbu „history“\n" +" ignoreeof zanemari Ctrl-D; ne završi (ne iziđe iz) ljusku na EOF\n" +" interactive-comments dopusti komentiranje u interaktivnim naredbama\n" +" keyword == -k\n" +" monitor == -m\n" +" noclobber == -C\n" +" noexec == -n\n" +" noglob == -f\n" +" nolog (prepoznata, ali je zanemarena)\n" +" notify == -b\n" +" nounset == -u\n" +" onecmd == -t\n" +" physical == -P\n" +" pipefail cjevovod vrati vrijednost izlaznog koda zadnje neuspješne\n" +" naredbe ili 0 ako su svi poslovi uspješno završeni\n" +" posix striktno poštuje POSIX standard\n" +" privileged == -p\n" +" verbose == -v\n" +" vi za uređivanje redaka koristi sučelje u „vi“ stilu\n" +" xtrace == -x\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija." + +#: builtins.c:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Ukloni vrijednosti i atribute varijabli i funkcija ljuske.\n" +"\n" +" Za svako IME ukloni odgovarajuću varijablu ili funkciju\n" +"\n" +" Opcije:\n" +" -f tretira svako IME kao funkciju ljuske\n" +" -v tretira svako IME kao varijablu ljuske\n" +" -n tretira svako IME kao referenciju na neki objekt i ukloni\n" +" samu varijablu IME umjesto referiranog objekta\n" +"\n" +" Bez opcija, „unset“ prvo pokuša ukloniti varijablu, a ako to\n" +" ne uspije, onda pokuša ukloniti funkciju. Neke varijable nije moguće\n" +" ukloniti; pogledajte „readonly.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili IME je\n" +" „samo-za-čitanje“. (bez navodnika)" + +#: builtins.c:1162 +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 "" +"Postavi izvozni atribut na varijable ljuske.\n" +"\n" +" Označi svako navedeno IME za automatski izvoz u okolinu za naknadno\n" +" izvršavanje naredbi. Ako je dana VRIJEDNOST, dodijeli VRIJEDNOST\n" +" prije izvoza.\n" +"\n" +" Opcije:\n" +" -f navedena IMENA se odnose samo na funkcije\n" +" -n ukloni izvezeni atribut iz svakog IMENA \n" +" -p izlista popis svih izvezenih varijabli i funkcija\n" +"\n" +" Argument „--“ spriječi daljnje procesiranje opcija.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili nije navedeno\n" +" valjano IME." + +#: builtins.c:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 varijable ljuske kao nepromjenjive.\n" +"\n" +" Označi svako IME kao nepromjenjivo (readonly), tako da se vrijednosti\n" +" ovih IMENA ne mogu promijeniti kasnijim operacijama. Ako je dana\n" +" VRIJEDNOST, prvo mu dodijeli VRIJEDNOST, a zatim ga označi nepromjenjivim.\n" +"\n" +" Opcije:\n" +" -a svako IME se odnosi na varijable indeksiranog polja\n" +" -A svako IME se odnosi na varijable asocijativnog polja\n" +" -f svako IME se odnosi na funkcije ljuske\n" +" -p prikaže popis svih nepromjenjivih varijabli ili funkcija\n" +" ovisno o opciji „-f“ (je li ili nije dana).\n" +"\n" +" Argument „--“ onemogući daljnje obrađivanje opcija.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili je IME nevaljano." + +#: builtins.c:1203 +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 "" +"Pomakne pozicijske parametre.\n" +"\n" +" Preimenuje pozicijske parametre $N+1,$N+2,... u $1,$2,...\n" +" Ako nije naveden N, uzima se da je N = 1.\n" +"\n" +" Završi s uspjehom osim ako je N negativni ili veći od $#." + +#: builtins.c:1215 builtins.c:1230 +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 "" +"Izvrši naredbe iz datoteke u trenutnoj ljusci.\n" +"\n" +" Čita i izvrši naredbe iz DATOTEKE u trenutnoj ljusci.\n" +" Direktorij s DATOTEKOM traži se po stazama sadržanim u varijabli\n" +" PATH. Ako su dani bilo koji ARGUMENTI, oni postanu pozicijski parametri\n" +" tijekom izvršavanja DATOTEKE.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe iz DATOTEKE ili s kȏdom 1 ako se\n" +" DATOTEKA ne može pročitati." + +#: builtins.c:1246 +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 "" +"Obustavi rad ljuske.\n" +"\n" +" Obustavi rad u ovoj ljusci sve dok ne primi SIGCONT signal.\n" +" Osim ako nije prisiljena, prijavna ljuska ne može se obustaviti.\n" +"\n" +" Opcije:\n" +" -f prisili obustavu, čak i ako je to prijavna ljuska\n" +"\n" +" Završi s uspjehom osim ako upravljanje poslovima nije omogućeno\n" +" ili se dogodila greška." + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Vrednuje uvjetni izraz.\n" +"\n" +" Vrednuje IZRAZ; ovisno o rezultatu vrednovanja, završi s izlaznim\n" +" kȏdom 0 (istina) ili 1 (neistina, laž). Izrazi mogu biti unarni\n" +" ili binarni. Unarni izrazi se često koriste za ispitivanje stanja\n" +" datoteke. Također postoje operatori za usporedbu stringova i brojeva.\n" +"\n" +" Ponašanje od „test“ ovisi o broju argumenata. Potražite u „bash“\n" +" uputama detalje za uporabu.\n" +"\n" +" Operatori za datoteke:\n" +" -a DATOTEKA istina ako datoteka postoji\n" +" -b DATOTEKA istina ako je datoteka blok uređaj\n" +" -c DATOTEKA istina ako je datoteka znakovni uređaj\n" +" -d DATOTEKA istina ako je datoteka direktorij\n" +" -e DATOTEKA istina ako datoteka postoji\n" +" -f DATOTEKA istina ako je datoteka regularna datoteka\n" +" -G DATOTEKA istina ako je datoteka efektivno vlasništvo vaše skupine\n" +" -g DATOTEKA istina ako je datoteka SETGUID\n" +" -h DATOTEKA istina ako je datoteka simbolička veza\n" +" -k DATOTEKA istina ako datoteka ima postavljeni \"sticky\" bit\n" +" -L DATOTEKA istina ako je datoteka simbolička veza\n" +" -N DATOTEKA istina ako se datoteka promijenila od zadnjeg čitanja\n" +" -O DATOTEKA istina ako je datoteka efektivno vaše vlasništvo\n" +" -p DATOTEKA istina ako je datoteka imenovana cijev\n" +" -r DATOTEKA istina ako vi možete čitati datoteku\n" +" -S DATOTEKA istina ako je datoteka utičnica\n" +" -s DATOTEKA istina ako datoteka nije prazna\n" +" -t DESKRIPTOR istina ako je deskriptor datoteke otvoren u terminalu\n" +" -u DATOTEKA istina ako je datoteka SETUID\n" +" -w DATOTEKA istina ako vi možete pisati datoteku\n" +" -x DATOTEKA istina ako vi možete izvršiti datoteku\n" +"\n" +" DTEKA1 -nt DTEKA2 istina ako je prva datoteka promijenjena\n" +" kasnije od druge\n" +" DTEKA1 -ot DTEKA2 istina ako je prva datoteka promijenjena\n" +" ranije od druge\n" +" DTEKA1 -ef DTEKA2 istina ako je prva datoteka čvrsta veza na drugu\n" +"\n" +" Operatori za stringove:\n" +" -z STRING istina ako je string prazni\n" +" -n STRING istina ako string nije prazni\n" +" STRING istina ako string nije prazni\n" +" STRING1 = STRING2 istina ako su stringovi jednaki\n" +" STRING1 != STRING2 istina ako stringovi nisu jednaki\n" +" STRING1 < STRING2 istina ako se leksikografski prvi string\n" +" razvrsta ispred drugog\n" +" STRING1 > STRING2 istina ako se leksikografski prvi string\n" +" razvrsta iza drugog\n" +"\n" +" Ostali operatori:\n" +" -o OPCIJA istina ako je ova OPCIJA ljuske omogućena\n" +" -v VARIJABLA istina ako ova VARIJABLA ima vrijednost\n" +" -R VARIJABLA istina ako je ova VARIJABLA referencija (nameref) \n" +" ! IZRAZ istina ako IZRAZ neistinit\n" +" IZRAZ1 -a IZRAZ2 istina ako su oba izraza istinita\n" +" IZRAZ1 -o IZRAZ2 laž ako su oba izraza neistinita\n" +" ARG1 OP ARG2 istina ako je aritmetika valjana; operator OP je\n" +" jedan od: -eq, -ne, -lt, -le, -gt ili -ge;\n" +" koji znače: jednako, nejednako, manje od, manje,\n" +" ili jednako, veće od, veće ili jednako.\n" +"\n" +" Završi s uspjehom ako je IZRAZ istinit, 1 ako je IZRAZ neistinit,\n" +" ili 2 ako je dan nevaljan argument." + +#: builtins.c:1344 +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 "" +"Provjeri uvjetni izraz.\n" +"\n" +" To je sinonim za ugrađenu funkciju „test“, ali zadnji argument\n" +" mora biti zagrada „]“ kao par zagradi „[“ na početku." + +#: builtins.c:1353 +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 "" +"Prikaže potrošnju vremena procesa.\n" +" \n" +" Prikaže ukupno potrošeno vrijeme korisnikom i sustavom; prvo, vrijeme\n" +" potrošeno samom ljuskom, a zatim svim potomcima pokrenutih ljuskom.\n" +"\n" +" Završi uvijek s kȏdom 0." + +#: builtins.c:1365 +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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\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 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 "" +"Prikupljanje (hvatanje) signala i drugih događaja.\n" +"\n" +" Definira i aktivira postupke rukovanja koji se pokrenu kad ljuska\n" +" primi signal ili se dogodi neki drugi slučaj.\n" +"\n" +" ARGUMENT je naredba koja se pročita i izvrši kad ljuska primi jedan od\n" +" specificiranih signala (SIGNAL_SPEC). Ako nema ARGUMENTA (i dan je samo\n" +" jedan signal) ili ARGUMENT je „-“, specificirani signal zadobije svoju\n" +" originalnu vrijednost (koju je imao na startu ove ljuske). Ako je ARGUMENT\n" +" prazni string, ljuska i njezini potomci zanemare svaki SIGNAL_SPEC.\n" +"\n" +" Ako je SIGNAL_SPEC 0 ili EXIT, ARGUMENT se izvrši kad zatvorite\n" +" (exit) ljusku. Ako je SIGNAL_SPEC DEBUG, ARGUMENT se izvrši prije\n" +" svake jednostavne naredbe. Ako je SIGNAL_SPEC RETURN, ARGUMENT se\n" +" izvrši svaki put kad funkcija ljuske ili skripta izvršena s . ili\n" +" „ugrađeni source“ završi izvršavanje. SIGNAL_SPEC ERR znači da se\n" +" ARGUMENT izvrši nakon neuspješne naredbe koja bi uzrokovala da ljuska\n" +" završi (exit) kad je opcija „-e“ omogućena.\n" +"\n" +" Bez argumenta, „trap“ izlista popis koji prikaže asocijaciju\n" +" između naredbi i signala.\n" +"\n" +" Opcije:\n" +" -l popis imena signala i njihov odgovarajući broj\n" +" -p prikaže koja naredba je povezana sa svakim signalom\n" +"\n" +" Svaki je SIGNAL_SPEC ili ime signala iz ili broj signala.\n" +" Signal se može poslati ljusci s „kill -signal $$“.\n" +"\n" +" Završi s uspjehom osim ako SIGNAL_SPEC nije valjan ili je dana\n" +" nevaljana opcija." + +#: builtins.c:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 "" +"Prikaže informacije o vrsti naredbe.\n" +"\n" +" Pokaže, kako bi se interpretiralo svako dano IME kad bi se IME koristilo\n" +" kao naredba.\n" +"\n" +" Opcije:\n" +" -a prikaže sve lokacije koje sadrže izvršnu datoteku IME; ako nije\n" +" dana opcija „-p“ prikaže i aliase, ugrađene naredbe ljuske,\n" +" funkcije, ključne riječi, i datoteke na disku\n" +" -f zanemari funkcije ljuske (ne traži ih, slično naredbi „command”)\n" +" -P traži svako navedeno IME po stazama u PATH, čak i ako je IME\n" +" alias, ugrađena naredba ljuske ili funkcija i vrati ime izvršne\n" +" datoteke na disku\n" +" -p ispiše ime izvršne datoteke na disku ili ništa ako je IME alias,\n" +" ugrađena naredba ljuske, funkcija ili ključna riječ\n" +" -t ispiše samo vrstu navedenih IMENA: „alias“, „builtin“, „file“,\n" +" „function“ ili „keyword“, ovisno o tome je li riječ o aliasu,\n" +" ugrađenoj funkciji (builtin), datoteci na disku, definiranoj\n" +" funkciji ili ključnoj riječi; ili ništa, ako je ime nepoznato\n" +"\n" +" Završi s uspjehom ako se pronađu sva IMENA, inače s 1." + +#: builtins.c:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"Modificira ograničenja ljuskinih resursa.\n" +"\n" +" Omogući upravljanje s resursima koji su dostupni ovoj ljusci i\n" +" procesima koje stvara -- na sustavima koji to dopuštaju.\n" +"\n" +" Opcije:\n" +" -S rabi „mekano“ (soft) ograničenje resursa\n" +" -H rabi „tvrdo“ (hard) ograničenje resursa\n" +" -a popis svih trenutnih ograničenja\n" +" -b maks. veličina međuspremnika utičnice\n" +" -c maks. veličina „core“ datoteka (u kB)\n" +" -d maks. veličina segmenta s procesnim podacima (in kB)\n" +" -e maks. prednost raspoređivanja („nice“ vrijednost)\n" +" -f maks. veličina datoteka ljuska i njeni potomci mogu zapisati\n" +" -i maks. broj signala koji može biti na čekanju\n" +" -l maks. veličina koju proces može zaključati u memoriju\n" +" -k maks. broj rezerviranih/dodijeljenih „kqueues“ za taj proces\n" +" -m maks. iznos fizičke memorije procesa (in kB)\n" +" -n maks. broj otvorenih deskriptora datoteka\n" +" -p maks. veličina međuspremnika cijevi\n" +" -q maks. broj bajtova za red POSIX poruka\n" +" -r maks. prednost raspoređivanja u stvarnom vremenu\n" +" -s maks. veličina stȏga (stack) (u kB)\n" +" -t maks. iznos CPU vremena (u sekundama)\n" +" -u maks. broj korisničkih procesa\n" +" -v maks. veličina virtualne memorije (u kB)\n" +" -x maks. broj datotečnih brava (lokota, locks)\n" +" -P maks. broj pseudo terminala\n" +" -R maks. trajanje rada procesa u stvarnom vremenu do blokiranja\n" +" -T maks. broj dretvi\n" +"\n" +" Nisu sve opisane opcije dostupne na svim platformama.\n" +"\n" +" Ako je specificirani, LIMIT postane nova vrijednost za specificirani\n" +" resurs, inače se prikažu trenutne vrijednosti. Specijalne vrijednosti,\n" +" „soft“, „hard“, i „unlimited“ su trenutni soft limit, trenutni hard\n" +" limit i unlimited. Ako nijedna opcija nije specificirana, podrazumijeva\n" +" se da je aktivna „-f“ opcija.\n" +"\n" +" Vrijednosti su višekratnik od 1024 bajta, osim za „-t“ koji je\n" +" u sekundama, „-p“ koji je višekratnik od 512 bajta i „-u“ je apsolutni\n" +" broj procesa.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:1483 +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 "" +"Prikaže ili postavi masku prilikom stvaranja datoteke.\n" +"\n" +" Postavi masku datoteke koju stvori korisnik na MODE.\n" +" Ako MODE nije naveden, ispiše trenutnu vrijednost maske.\n" +"\n" +" Ako MODE počinje sa znamenkom, interpretira se kao oktalni broj;\n" +" inače to je simbolički mode string kakav prihvaća chmod(1).\n" +"\n" +" Opcije:\n" +" -p ako nije naveden MODE, generira izlaz u obliku\n" +" koji se može iskoristiti kao ulaz\n" +" -S napravi simbolički izlaz; inače izlaz je oktalni broj\n" +"\n" +" Završi s uspjehom osim ako MODE nije valjan ili je dana nevaljana opcija." + +#: builtins.c:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Čeka da posao završi i vrati njegov izlazni kȏd.\n" +"\n" +" Čeka na svaki posao identificirani s ID — to jest indikatorom posla ili\n" +" indikatorom procesa — i izvijesti njegov završni status. Ako nije dan\n" +" ID, čeka na sve trenutno aktivne potomke, a završni status je nula.\n" +" Ako je ID specifikacija posla, čeka na sve procese u cjevovodu tog posla.\n" +"\n" +" Ako je dana opcija „-n“, čeka na svršetak jednog posla iz popisa ID-ova\n" +" ili ako nije dan nijedan ID, čeka da završi sljedeći posao i vrati\n" +" njegov izlazni kȏd.\n" +"\n" +" Ako je dana opcija „-f“ i upravljanje poslovima je omogućeno, čeka dok\n" +" specificirani ID ne završi, umjesto da promijeni status.\n" +"\n" +" Završi s kȏdom zadnjeg ID-a; s kȏdom 1 ako je ID nevaljan ili je dana\n" +" nevaljana opcija ili ako je -n dan, a ljuska nema neočekivane potomke." + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." +msgstr "" +"Čeka da proces završi i vrati njegov izlazni kȏd.\n" +"\n" +" Čeka na svaki proces identificirani s PID i izvijesti njegov završni\n" +" status. Ako nije naveden PID, čeka na sve trenutno aktivne potomke,\n" +" a završni status je nula. PID mora biti proces ID.\n" +"\n" +" Završi s kȏdom zadnjeg PID-a, s kȏdom 1 ako je PID nevaljan,\n" +" ili s 2 ako je dana nevaljana opcija." + +#: builtins.c:1549 +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 "" +"Izvrši naredbe za svakog člana u popisu.\n" +"\n" +" Petlja „for“ izvrši sekvenciju naredbi za svakog člana u popisu stavki.\n" +" Ako nema operanda „in RIJEČIMA...; podrazumijeva se operand\n" +" „in \"$@\"“. Svakom elementu u RIJEČIMA, IME se postavi na taj element\n" +" i NAREDBE se izvrše.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1563 +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 "" +"Aritmetička „for“ petlja.\n" +"\n" +" Isto kao:\n" +"\n" +" (( EXP1 )); while (( EXP2 )); do NAREDBE; (( EXP3 )); done\n" +"\n" +" EXP1, EXP2, EXP3 su aritmetički izrazi. Ako bilo koji izraz nije\n" +" naveden, uzima se da mu je vrijednost jednaka 1.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1581 +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 "" +"Pripremi izbornik i izvrši izabrane naredbe.\n" +"\n" +" Proširenjem RIJEČI, „select“ generira i prikaže izbornik na standardnom\n" +" izlazu za greške s brojem ispred svake riječi. Ako operand „u RIJEČIMA“\n" +" nije naveden, podrazumijeva se operand „in \"$@\"“.\n" +" Nakon izbornika prikaže se PS3 prompt i redak se čita iz standardnog\n" +" ulaza; ako se redak sastoji od broja koji odgovara jednoj od pokazanih\n" +" riječi, onda varijabla IME dobije vrijednost te riječi; ako je redak\n" +" prazan, RIJEČI i prompt se ponovno prikažu; ako se pročita EOF (Ctrl-D)\n" +" „select“ naredba završi. Bilo koja druga pročitana vrijednost učini da se\n" +" IME isprazni (nulira). Pročitani redak se spremi u varijablu REPLY.\n" +" NAREDBE se izvršavaju nakon svakog izbora, tako dugo dok „break“ naredba\n" +" ne prekine posao.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1602 +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 "" +"Prikaže vrijeme potrošeno cjevovodom.\n" +"\n" +" Nakon završetka izvršavanja CJEVOVODA prikaže sažetak statistike\n" +" trošenja vremena: ukupno potrošeno vrijeme, CPU vrijeme potrošeno\n" +" korisnikom i CPU vrijeme potrošeno sustavom za izvršavanje naredbi.\n" +"\n" +" Izlazni format se može prilagoditi s varijablom okoline TIMEFORMAT.\n" +" Opcija „-p“ zanemari TIMEFORMAT i ispiše izlaz u prenosivom POSIX\n" +" formatu.\n" +"\n" +" Završi s izlaznim kȏdom CJEVOVODA." + +#: builtins.c:1619 +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 "" +"Izvrši naredbe ovisno o podudaranju s uzorkom.\n" +"\n" +" Izvrši onu NAREDBU koja odgovara prvom UZORKU podudarnom s RIJEČI.\n" +" Znak „|“ rabi se za razdvajanje više uzoraka.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1631 +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 "" +"Izvrši naredbe u skladu s uvjetima.\n" +"\n" +" Izvrši naredbe iza „if“; ako to završi s kȏdom 0, izvrši naredbe\n" +" iza prvog „then“; inače, izvrši naredbe iza sljedećeg „elif“\n" +" (ako postoji) ili „else“ (ako postoji). Ako „elif“ završi s kȏdom\n" +" nula, izvrši naredbe iza odgovarajućeg „then“. Ako nema više „elif“,\n" +" ili „else“ ili nakon izvršenih naredbi iza „then“, „if“ naredba završi.\n" +"\n" +" „if“ završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1648 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvršava naredbe tako dugo dok je test uspješan.\n" +"\n" +" Proširi i izvrši NAREDBE-2 tako dugo dok zadnja naredba u NAREDBAMA\n" +" završi s kȏdom 0.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1660 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvršava naredbe tako dugo dok test ne uspije.\n" +"\n" +" Proširi i izvrši NAREDBE-2 tako dugo dok zadnja naredba u NAREDBAMA\n" +" završi s kȏdom različitim od 0.\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Stvori koproces nazvan IME.\n" +"\n" +" Izvrši NAREDBU asinkrono, sa standardnim izlazom i standardnim ulazom\n" +" naredbe spojene preko cijevi na deskriptore datoteke dodijeljene\n" +" indeksima 0 i 1 varijable polja IME u izvršnoj ljusci.\n" +" Zadano, IME je \"COPROC\".\n" +"\n" +" Naredba coproc završi s kȏdom 0." + +#: builtins.c:1686 +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 "" +"Definira funkciju ljuske.\n" +"\n" +" Stvori funkciju ljuske nazvanu IME. Kad se pokrene kao jednostavna\n" +" naredba, IME izvrši NAREDBE unutar konteksta pozivne ljuske.\n" +" Kad se IME pozove, argumenti se proslijede funkciji kao $1...$N,\n" +" a ime funkcije je $FUNCNAME.\n" +"\n" +" Završi s uspjehom osim ako je IME readonly (samo-za-čitanje)." + +#: builtins.c:1700 +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 "" +"Skupi naredbe u jednu jedinicu.\n" +"\n" +" Izvrši skup naredbi u skupini (kao da je jedna). To je jedan\n" +" od načina za preusmjeravanje čitavog skupa naredbi\n" +"\n" +" Završi s kȏdom zadnje izvršene naredbe." + +#: builtins.c:1712 +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 "" +"Nastavi posao u interaktivnom načinu.\n" +"\n" +" Nastavi zaustavljeni ili pozadinski posao u interaktivnom modu\n" +" To je ekvivalentno naredbi „fg“. SPECIFIKACIJU_POSLA može specificirati\n" +" ili ime posla ili broj posla. Ako „&“ slijedi iza SPECIFIKACIJE_POSLA\n" +" onda posao prelazi u pozadinu. To je ekvivalentno naredbi „bg“\n" +"\n" +" Završi s kȏdom nastavljenog posla." + +#: builtins.c:1727 +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 "" +"Izračuna aritmetički izraz.\n" +"\n" +" IZRAZ se izračuna po aritmetičkim pravilima.\n" +" To je isto kao „let \"IZRAZ\"”.\n" +"\n" +" Završi s kȏdom 1 ako je rezultat IZRAZA jednak 0;\n" +" inače završi s uspjehom." + +#: builtins.c:1739 +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 "" +"Izvrši uvjetnu naredbu.\n" +"\n" +" Vrednuje dani uvjetni IZRAZ; ovisno o rezultatu evaluacije završi s\n" +" izlaznim kȏdom 0 (istina) ili 1 (neistina, laž). Izrazi koriste iste\n" +" osnovne komponente koje koristi ugrađena naredba (builtin) „test“,\n" +" i mogu se kombinirati sa sljedećim operatorima:\n" +"\n" +" ( IZRAZ ) vrati vrijednost danog IZRAZA\n" +" ! IZRAZ istina ako je IZRAZ istina, inače laž\n" +" IZRAZ1 && IZRAZ2 istina ako su oba izraza istinita, inače laž\n" +" IZRAZ1 || IZRAZ2 laž ako su oba izraza neistinita, inače istina\n" +"\n" +" Ako se rabe operatori „==“ ili „!=“, onda se string desno od operatora\n" +" smatra za uzorak i provodi se podudaranje uzoraka.\n" +" Ako se rabi operator „=~“, onda se string na desno od operatora podudara\n" +" kao regularni izraz.\n" +"\n" +" Operatori „&&“ i „|| ne vrednuju IZRAZ2 ako je IZRAZ1 dovoljan za\n" +" određivanje konačnog rezurlata.\n" +"\n" +" Završi s uspjehom ili 1 ovisno o IZRAZU." + +#: builtins.c:1765 +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 "" +"Značenje i upotreba standardnih varijabli ljuske.\n" +"\n" +" U nastavku je opis brojnih varijabli od kojih neke sadrže popis\n" +" elemenata. U svakom od tih popisa elementi su razdvojeni dvotočkama.\n" +"\n" +" BASH_VERSION inačica ovog „bash“ programa\n" +" CDPATH popis direktorija u kojima se traži direktorij\n" +" kad argument od „cd“ (direktorij) nije u\n" +" trenutnom radnom direktoriju\n" +" GLOBIGNORE popis uzoraka koji opisuju imena datoteka koje\n" +" su zanemarene prilikom ekspanzije imena staza\n" +" HISTFILE ime datoteke koja sadrži povijest vaših naredbi\n" +" HISTFILESIZE maksimalni broj redaka datoteke s povijesti naredba\n" +" HISTIGNORE popis uzoraka koji opisuju naredbe koje ne treba zapisati\n" +" u datoteku koja sadrži povijest vaših naredbi\n" +" HISTSIZE maksimalni broj redaka koje trenutna ljuska može dosegnuti\n" +" HOME puni naziv staze do vašega vlastitog direktorija\n" +" HOSTNAME ime računala na kojem se izvršava „bash“\n" +" HOSTTYPE vrsta CPU-a na kojem se izvršava „bash“\n" +" IGNOREEOF broj zanemarenih Ctrl-D (EOF) prije zatvaranja ljuske\n" +" MACHTYPE vrsta računala na kojem se izvršava „bash“\n" +" MAILCHECK kako često (u sekundama) „bash“ gleda ima li nove pošte\n" +" MAILPATH popis datoteka koje „bash“ provjeri za novu poštu\n" +" OSTYPE distribucija Unix-a no kojem se izvršava ovaj „bash“\n" +" PATH popis direktorija u kojima se traže naredbe\n" +" PROMPT_COMMAND naredba koja se izvrši prije ispisa primarnog prompta\n" +" PS1 string koji opisuje primarni prompt\n" +" PS2 string koji opisuje sekundarni prompt (zadano, „>“)\n" +" PWD puni naziv staze trenutnog radnog direktorija\n" +" SHELLOPTS popis svih omogućenih opcija ljuske\n" +" TERM naziv vrste trenutnog terminala\n" +" TIMEFORMAT pravilo za format ispisa „time“ statistika\n" +" auto_resume ako nije prazan, učini da se naredbena riječ na naredbenom\n" +" retku prvo potraži na popisu zaustavljenih poslova,\n" +" i ako se tamo pronađe, taj se posao premjesti u\n" +" interaktivni način; vrijednost „exact“ znači da naredbena\n" +" riječ mora strikno podudariti naredbu iz popisa;\n" +" vrijednost „substring“ znači da naredbena riječ mora\n" +" podudariti podstring naredbe iz popisa; bilo koja druga\n" +" vrijednost znači da naredbena riječ mora biti prefiks\n" +" zaustavljene naredbe\n" +" histchars znakovi koje upravljaju s proširenjem i brzom supstitucijom\n" +" povijesti; prvi znak je znak za „supstituciju\n" +" povijesti“, obično „!“; drugi znak je „znak brze\n" +" supstitucije“, obično „^“; treći znak je „komentar\n" +" povijesti“, obično „#“.\n" + +#: builtins.c:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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 "" +"Doda direktorije na stȏg.\n" +"\n" +" Doda direktorij na vrh stȏga direktorija ili zarotira stȏg tako da\n" +" učini novi vrh stȏga trenutnim radnim direktorijem. Bez argumenata\n" +" razmijeni pozicije dvama direktorijima na vrhu stȏga.\n" +"\n" +" Opcije:\n" +" -n izostavi uobičajenu promjenu direktorija kad dodaje\n" +" direktorije u stȏg, odnosno samo manipulira sa stȏgom\n" +"\n" +" Argumenti:\n" +" DIREKTORIJ Doda DIREKTORIJ na vrh stȏga direktorija i\n" +" učini ga novim trenutnim radnim direktorijem.\n" +" +N Zarotira stȏg tako, da N-ti direktorij u stȏgu (brojeći od nule s\n" +" lijeve strane popisa pokazanog s „dirs“) postane novi vrh stȏga.\n" +" -N Zarotira stȏg tako, da N-ti direktorij u stȏgu (brojeći od nule s\n" +" desne strane popisa pokazanog s „dirs“) postane novi vrh stȏga.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj stȏga direktorija.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili promjena\n" +" direktorija nije uspjela" + +#: builtins.c:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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 "" +"Ukloni direktorije iz stȏga.\n" +"\n" +" Ukloni zapise iz stȏga direktorija. Bez argumenata, ukloni direktorij na\n" +" vrhu stȏga i učini da je trenutni radni direktorij jednak novom direktoriju\n" +" na vrhu stȏga.\n" +"\n" +" Opcije:\n" +" -n izostavi uobičajenu promjenu direktorija kad uklanja\n" +" direktorije iz stȏga, odnosno samo manipulira sa stȏgom\n" +"\n" +" Argumenti:\n" +" +N Ukloni da N-ti direktorij iz stȏga brojeći od nule s lijeve\n" +" strane popisa pokazanog s „dirs“. Na primjer: „popd +0“\n" +" ukloni prvi, a „popd +1“ ukloni drugi direktorij.\n" +" +N Ukloni da N-ti direktorij iz stȏga brojeći od nule s desne\n" +" strane popisa pokazanog s „dirs“. Na primjer.: „popd -0“\n" +" ukloni zadnji, a „popd -1“ ukloni predzadnji direktorij.\n" +"\n" +" Naredba „dirs“ prikaže trenutni sadržaj stȏga direktorija.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili promjena\n" +" direktorija nije uspjela." + +#: builtins.c:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Ispiše sadržaj stȏga direktorija.\n" +"\n" +" Pokaže popis trenutno zapamćenih direktorija. Direktoriji se unose\n" +" na popis pomoću naredbe „pushd“, a s naredbom „popd“ se uklanjaju.\n" +" \n" +" Opcije:\n" +" -c počisti stȏg direktorija brisanjem svih elemenata\n" +" -l ispiše apsolutne staze direktorija u odnosu na osobni\n" +" direktorij (ne skraćuje staze upotrebom tilde)\n" +" -p ispiše sadržaj stȏga po jedan direktorij po retku\n" +" -v kao „-p“, ali s prefiksom koji pokazuje\n" +" poziciju direktorija stȏgu\n" +"\n" +" Argumenti:\n" +" +N Pokaže N-ti direktorij iz stȏga, brojeći od od nule s\n" +" lijeve strane popisa kad se „dirs“ pokrene bez opcija.\n" +" -N Pokaže N-ti direktorij iz stȏga, brojeći od nule s\n" +" desne strane popisa kad se „dirs“ pokrene bez opcija.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili se dogodila greška." + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"Omogući ili onemogući opcije ljuske.\n" +"\n" +" Promjeni postavku svakoj opciji IME_OPCIJE ljuske. Bez ikakvih opcija i\n" +" argumenta, „shopt“ izlista sve opcije ljuske pokazujući je ili nije\n" +" uključena.\n" +"\n" +" Opcije:\n" +" -o ograniči IME_OPCIJE na ona koja su definirana\n" +" za upotrebu sa „set -o“\n" +" -p generira izlaz koji se može koristi za ulaz\n" +" -q izostavi izlaz (ništa ne ispisuje)\n" +" -s omogući (uključi) sve navedene IME_OPCIJE\n" +" -u onemogući (isključi) sve navedene IME_OPCIJE\n" +"\n" +" Bez opcija (ili samo s opcijom „-q“) završi s uspjehom ako je IME_OPCIJE\n" +" omogućeno, a s 1 ako je onemogućeno. Završi također s 1 ako je dano\n" +" nevaljano IME_OPCIJE, a završi s 2 ako je dana nevaljana opcija." + +#: builtins.c:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or assignment\n" +" error occurs." +msgstr "" +"Oblikuje i ispiše ARGUMENTE po uputama FORMATA.\n" +"\n" +" Ispiše navedene ARGUMENTE u danom FORMATU.\n" +"\n" +" Opcije:\n" +" -v VARIJABLA preusmjeri (dodijeli) izlaz (ispis) u VARIJABLU\n" +" umjesto na standardni izlaz\n" +"\n" +" FORMAT je znakovni string koji sadrži tri vrste objekta:\n" +" obične znakove koji se jednostavno kopiraju na izlaz; kontrolne znakove\n" +" koji se pretvore i kopiraju na izlaz; specifikacije formata od kojih\n" +" svaka uzrokuje ispisivanje sljedećeg sukcesivnog argumenta.\n" +"\n" +" Pored standardnih simbola „diouxXfeEgGcs” za format opisanih u printf(1),\n" +" „printf” dodatno interpretira:\n" +" %b proširi backslash (\\) kontrolne znakove u odgovarajuće\n" +" argumente\n" +" %q citira argument tako, da se može iskoristiti kao ulaz za ljusku\n" +" %Q kao %q, ali primijeni bilo kakvu preciznost na necitirani\n" +" argument prije citiranja\n" +" %(fmt)T koristeći FMT, ispiše date-time string u obliku format stringa\n" +" za strftime(3)\n" +"\n" +" Dani format se koristi sve dok se ne potroše svi argumenti. Ako ima\n" +" manje argumenata nego što format treba, suvišne format specifikacije\n" +" se ponašaju kao da im dana vrijednost nula ili prazni string.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili se dogodila greška\n" +" u pisanju ili greška pri dodijeli." + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specificira kako „Readline“ treba kompletirati argumente.\n" +"\n" +" Za svako navedeno IME specificira kako se kompletiraju argumenti. Bez\n" +" opcija ispiše postojeće specifikacije koje se mogu ponovno\n" +" iskoristiti kao ulaz.\n" +"\n" +" Opcije:\n" +" -p ispiše postojeće specifikacije kompletiranja u formatu\n" +" upotrebljivom za ulaz\n" +" -r ukloni specifikaciju kompletiranja za svako navedeno IME\n" +" ili ukloni sve specifikacije ako nisu navedena IMENA\n" +" -D na naredbe koje nemaju vlastitu specifikaciju za kompletiranje\n" +" primjeni „zadano“ ponašanje specifikacija i akcija\n" +" -E primjeni zadano ponašanje specifikacija i akcija i na „prazne“\n" +" naredbe --; pokuša kompletirati prazni redak\n" +" -I primjeni zadano ponašanje specifikacija i akcija i na početnu\n" +" (obično naredbu) riječ\n" +"\n" +" Redoslijed akcija pri pokušaju kompletiranja slijedi gore dan poredak\n" +" opcija pisanih u verzalu. Ako je navedeno više opcija, opcija „-D“ ima veću\n" +" prednost od opcije „-E“, a obje imaju veću prednost od opcije „-I“\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija\n" +" ili se dogodila greška." + +#: builtins.c:2004 +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 "" +"Prikaže moguća kompletiranja ovisno o opcijama.\n" +"\n" +" „compgen“ je namijenjen za upotrebu unutar funkcije koja generira\n" +" moguća kompletiranja. Ako je dana neobvezna opcija RIJEČ (word)\n" +" generira odgovarajuća kompletiranja podudarna s RIJEČI.\n" +"\n" +" Završi s uspjehom osim ako je dana nevaljana opcija ili se dogodila greška." + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"Promijeni ili pokaže opcije za kompletiranje.\n" +"\n" +" Promijeni opcije kompletiranja za svako IME u skladu s opcijama,\n" +" ili za kompletiranje koje se trenutno vrši ako nisu navedena IMENA.\n" +" Ako nema opcija, ispiše opcije kompletiranja za svako IME ili za\n" +" trenutno kompletiranje.\n" +"\n" +" Opcije:\n" +" -o OPCIJA omogući ovu OPCIJU kompletiranja za svako IME\n" +" -D promijeni opcije za „zadano” kompletiranje\n" +" -E promijeni opcije za kompletiranje „prazne“ naredbe\n" +" -I promijeni opcije za kompletiranje na početnu riječ\n" +"\n" +" „+“ umjesto „-“ isključi odgovarajuću opciju.\n" +"\n" +" Svako IME ukazuje na naredbu za koju specifikacija kompletiranja mora\n" +" već prije biti definirana pomoću ugrađene naredbe „complete“. Ako nije\n" +" dano nijedno IME, funkcija koja trenutno generira kompletiranja mora\n" +" pozvati „compopt“; time se onda promjene opcije za taj generator koji\n" +" trenutno izvršava kompletiranja.\n" +"\n" +" Završi s uspjehom osim ako nije dana nevaljana opcija ili nije definirana\n" +" specifikacija za kompletiranje IMENA." + +#: builtins.c:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"Pročitane retke iz standardnog ulaza upiše u varijablu indeksirano polje.\n" +"\n" +" Pročitane retke iz standardnog ulaza (ili ako je navedena opcija -u, iz\n" +" deskriptora datoteke FD) upiše u indeksiranu varijablu POLJE. Ako argument\n" +" POLJE nije dan, za POLJE se (zadano) koristi varijabla MAPFILE\n" +"\n" +" Opcije:\n" +" -d MEĐA prvi znak u MEĐI (umjesto LF) je znak za kraj retka\n" +" -n KOLIČINA kopira ne više od KOLIČINE redaka (0 kopira sve retke)\n" +" -O POČETAK upisivanje u POLJE započinje od indeksa POČETAK (zadano 0)\n" +" -s BROJ preskoči (izostavi) prvih BROJ redaka\n" +" -t ukloni zaostalu MEĐU (zadano LF) iz svakog učitanog retka\n" +" -u FD čita retke iz deskriptora datoteke FD umjesto iz\n" +" standardnog ulaza\n" +" -C FUNKCIJA vrednuje FUNKCIJU svaki put nakon TOLIKO pročitanih redaka\n" +" -c TOLIKO svaki put nakon TOLIKO pročitanih redaka pozove FUNKCIJU\n" +"\n" +" Argument:\n" +" POLJE ime varijable polja u koju se upisuju pročitani redci\n" +"\n" +" Ako je opcija „-C“ navedena bez opcije „-c“, TOLIKO je 5000 (zadano).\n" +" Kad FUNKCIJA vrednuje — dobiva indeks sljedećeg elementa polja koji se\n" +" upisuje i redak koji će biti dodijeljen tom elementu kao dodatne argumente.\n" +"\n" +" Ako nije dan eksplicitni POČETAK, „mapfile“ počisti POLJE\n" +" prije početka upisivanja.\n" +"\n" +" Završi s uspjehom osim ako je POLJE readonly (samo-za-čitanje) ili nije\n" +" polje ili je dana nevaljana opcija." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Učita retke iz datoteke u varijablu indeksirano polje.\n" +"\n" +" Sinonim za „mapfile“." + +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: nevaljan ključ asocijativnog polja" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Vraća kontekst od trenutnog poziva funkciji.\n" +#~ " \n" +#~ " Bez EXPR, rezultati " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process(): proces %5ld (%s) u cjevovodu" + +#~ msgid "Unknown Signal #" +#~ msgstr "Nepoznati signal #" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#~ msgid "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "Licenca GPLv2+: GNU GPL inačica 2 ili novija \n" + +#~ msgid ":" +#~ msgstr ":" diff --git a/po/hu.gmo b/po/hu.gmo index 8421414..cfc7843 100644 Binary files a/po/hu.gmo and b/po/hu.gmo differ diff --git a/po/hu.po b/po/hu.po index 6435e67..c6d8388 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1,478 +1,567 @@ -# Hungarian translation of the GNU bash. -# Copyright (C) 2002 Free Software Foundation, Inc. -# G�bor Istv�n , 2002. +# Hungarian translation for bash. +# Copyright (C) 2010, 2016, 2017, 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. # +# Mate Ory , 2010, 2016. +# Gabor Kelemen , 2016. +# Balázs Úr , 2017, 2019. msgid "" msgstr "" -"Project-Id-Version: bash 2.0\n" +"Project-Id-Version: bash 5.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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2019-11-16 17:58+0100\n" +"Last-Translator: Balázs Úr \n" "Language-Team: Hungarian \n" +"Language: hu\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 0.9.5\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 19.04.3\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "hib�s t�mb a t�mbindexben" +msgstr "hibás tömbindex" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: névhivatkozás attribútum eltávolítása" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%c%c: rossz opci�" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nem lehetséges az indexelt tömb asszociatívvá alakítása" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s: nem lehet hozz�rendelni nem sz�m indexet" +msgstr "%s: a nem-szám indexnek való értékadás nem lehetséges" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: asszociatív tömbhöz való értékadásnál meg kell adni az indexet" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: nem hozható létre: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "" +"bash_execute_unix_command: nem található billentyűkiosztás a parancshoz" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "" +msgstr "%s: az első nem szóközkarakter nem „\"”" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "" +msgstr "nincs záró „%c” a következőben: %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "" +msgstr "%s: hiányzó kettőspont-elválasztó" -#: builtins/alias.def:132 +#: bashline.c:4733 #, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s”: nem lehetséges a kötés megszüntetése" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "szögleteszárójel-kiegészítés: Nem foglalható memória ehhez: %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" +"szögleteszárójel-kiegészítés: nem sikerült a memóriafoglalás %u elem számára" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" +"szögleteszárójel-kiegészítés: nem sikerült a memóriafoglalás „%s” számára" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%c%c: rossz opci�" +msgstr "„%s”: érvénytelen alias-név" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "nincs engedélyezve a sorszerkesztés" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "" +msgstr "„%s”: érvénytelen billentyűkiosztás-név" -#: builtins/bind.def:245 -#, fuzzy, c-format +#: builtins/bind.def:252 +#, 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�" +msgstr "%s: nem olvasható a következő: %s" -#: builtins/bind.def:295 builtins/bind.def:325 -#, fuzzy, c-format +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format msgid "`%s': unknown function name" -msgstr "%s Csak olvashat� funkci�" +msgstr "„%s”: ismeretlen függvénynév" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "" +msgstr "%s nincs kötve egy billentyűhöz sem.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "" +msgstr "%s a következő módon hajtható végre: " -#: builtins/break.def:77 builtins/break.def:117 -#, fuzzy +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s”: nem lehetséges a kötés megszüntetése" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "logout" +msgstr "ciklusszám" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "" +msgstr "csak „for”, „while” és „until” ciklusokban értelmezhető" -#: builtins/caller.def:133 +#: builtins/caller.def:136 +#, 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" +" 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." msgstr "" +"Az aktuális szubrutinhívás környezetének visszaadása.\n" +" \n" +" KIF nélkül \"$sor $fájlnév\" formátumú eredményt ad. A KIF-fel pedig\n" +" \"$sor $szubrutin $fájlnév\" formátumút; ez hasznos lehet stack trace\n" +" kiírásához.\n" +" \n" +" Az EXPR értéke azt adja meg, hogy a jelenlegihez képest milyen mélyre\n" +" lépjen vissza; a verem tetején a 0-s keret van.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, ha érvényes a KIF és valóban függvényt hajt végre a\n" +" parancsértelmező." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "" +msgstr "Nincs beállítva HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "túl sok argumentum" -#: builtins/cd.def:227 +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null könyvtár" + +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "" +msgstr "Nincs beállítva OLDPWD" -#: builtins/common.c:101 -#, fuzzy, c-format +#: builtins/common.c:96 +#, c-format msgid "line %d: " -msgstr "foglalat %3d: " +msgstr "%d. sor: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "�r�s" +msgstr "figyelmeztetés: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "" - -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "t�l sok argumentum" +msgstr "%s: használat: " -#: builtins/common.c:191 shell.c:499 shell.c:782 -#, fuzzy, c-format +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format msgid "%s: option requires an argument" -msgstr "az opci� param�tert ig�nyel:-" +msgstr "%s: a kapcsolónak kötelező argumentuma van" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "" +msgstr "%s: a kötelező argumentum egy szám" -#: builtins/common.c:205 -#, fuzzy, c-format +#: builtins/common.c:207 +#, c-format msgid "%s: not found" -msgstr "%s: parancs nem tal�lhat�" +msgstr "%s: nem található" -#: builtins/common.c:214 shell.c:795 -#, fuzzy, c-format +#: builtins/common.c:216 shell.c:879 +#, c-format msgid "%s: invalid option" -msgstr "%c%c: rossz opci�" +msgstr "%s: érvénytelen kapcsoló" -#: builtins/common.c:221 -#, fuzzy, c-format +#: builtins/common.c:223 +#, c-format msgid "%s: invalid option name" -msgstr "%c%c: rossz opci�" +msgstr "%s: érvénytelen kapcsolónév" -#: builtins/common.c:228 general.c:231 general.c:236 -#, fuzzy, c-format +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format msgid "`%s': not a valid identifier" -msgstr "`%s' nem �rv�nyes azonos�t�" +msgstr "„%s”: érvénytelen azonosító" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "rossz jel(signal) sz�m" +msgstr "érvénytelen oktális szám" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "rossz jel(signal) sz�m" +msgstr "érvénytelen hexadecimális szám" -#: builtins/common.c:242 expr.c:1256 -#, fuzzy +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "rossz jel(signal) sz�m" +msgstr "érvénytelen szám" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "" +msgstr "%s: érvénytelen szignálmegadás" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "" +msgstr "„%s”: nem pid vagy munkaazonosító" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s Csak olvashat� v�ltoz�" +msgstr "%s: csak olvasható változó" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: nem szüntethető meg" -#: builtins/common.c:272 +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" -msgstr "" +msgstr "%s: %s kívül esik a tartományon" -#: builtins/common.c:272 builtins/common.c:274 -#, fuzzy +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" -msgstr "param�ter sz�ks�ges" +msgstr "argumentum" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" -msgstr "" +msgstr "%s kívül esik a tartományon" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "" +msgstr "%s: nincs ilyen munka" -#: builtins/common.c:290 -#, fuzzy, c-format +#: builtins/common.c:299 +#, c-format msgid "%s: no job control" -msgstr "nincs munkafolyamat ellen�rz�s ezen a parancs�rtelmez�n" +msgstr "%s: nincs munkakezelés" -#: builtins/common.c:292 -#, fuzzy +#: builtins/common.c:301 msgid "no job control" -msgstr "nincs munkafolyamat ellen�rz�s ezen a parancs�rtelmez�n" +msgstr "nincs munkakezelés" -#: builtins/common.c:302 -#, fuzzy, c-format +#: builtins/common.c:311 +#, c-format msgid "%s: restricted" -msgstr "%s: munkafolyamat megszakadt" +msgstr "%s: korlátozott" -#: builtins/common.c:304 -#, fuzzy +#: builtins/common.c:313 msgid "restricted" -msgstr "F�lbeszak�tva" +msgstr "korlátozott" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "" +msgstr "%s: nem beépített parancs" -#: builtins/common.c:321 -#, fuzzy, c-format +#: builtins/common.c:330 +#, c-format msgid "write error: %s" -msgstr "Cs� (pipe)hiba %s" +msgstr "írási hiba: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "hiba a terminálattribútum beállításakor: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "hiba a terminálattribútum lekérdezésekor: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "" +msgstr "%s: hiba a munkakönyvtár lekérdezésekor: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 -#, fuzzy, c-format +#: builtins/common.c:708 builtins/common.c:710 +#, c-format msgid "%s: ambiguous job spec" -msgstr "%s: Nem egy�rtelm� �tir�ny�t�s" +msgstr "%s: kétértelmű munkamegadás" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "ebben a verzióban nem érhető el súgó" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nem szüntethető meg: csak olvasható %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nem szüntethető meg" -#: builtins/complete.def:276 +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "" +msgstr "%s: érvénytelen műveletnév" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "" +msgstr "%s: nincs kiegészítés meghatározva" #: builtins/complete.def:696 msgid "warning: -F option may not work as you expect" -msgstr "" +msgstr "figyelmeztetés: a -F kapcsoló nem a várt módon működhet" #: builtins/complete.def:698 msgid "warning: -C option may not work as you expect" -msgstr "" +msgstr "figyelmeztetés: a -C kapcsoló nem a várt módon működhet" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "jelenleg nincs kiegészítési függvény végrehajtás alatt" -#: builtins/declare.def:122 -#, fuzzy +#: builtins/declare.def:137 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" +msgstr "csak függvényben használható" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "" +msgstr "nem használható a „-f” függvény létrehozására" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s Csak olvashat� funkci�" +msgstr "%s: csak olvasható függvény" -#: builtins/declare.def:468 -#, fuzzy, c-format +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: a referenciaváltozó nem lehet tömb" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: a névhivatkozás változó önhivatkozása nem engedélyezett" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: körkörös névhivatkozás" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s”: érvénytelen változónév a névhivatkozáshoz" + +#: builtins/declare.def:856 +#, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "$%s �gy nem lehet hozz�rendelni" +msgstr "%s: ilyen módon nem lehet tömböt megszüntetni" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: nem lehetséges az asszociatív tömb indexeltté alakítása" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: az idézőjelezett összetett tömb értékadása elavult" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "" +msgstr "a dinamikus betöltés nem érhető el" -#: builtins/enable.def:312 -#, fuzzy, c-format +#: builtins/enable.def:376 +#, c-format msgid "cannot open shared object %s: %s" -msgstr "nem lehet l�trehozni a %s \"named pipe\"-ot a %s-nek: %s" +msgstr "megosztott objektumfájl megnyitása sikertelen: %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "" +msgstr "%s nem található a(z) %s megosztott objektumfájlban: %s" + +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nem dinamikusan van betöltve" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "%s betöltési függvénye hibát ad vissza (%d): nincs betöltve" -#: builtins/enable.def:459 +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "" +msgstr "%s: nem dinamikusan van betöltve" -#: builtins/enable.def:474 -#, fuzzy, c-format +#: builtins/enable.def:577 +#, c-format msgid "%s: cannot delete: %s" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: nem törölhető: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" -msgstr "%s: egy k�nyvt�r" +msgstr "%s egy könyvtár" -#: builtins/evalfile.c:139 -#, fuzzy, c-format +#: builtins/evalfile.c:144 +#, c-format msgid "%s: not a regular file" -msgstr "%s: nem futtathat� bin�ris f�jl" +msgstr "%s: nem normál fájl" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "" +msgstr "%s: a fájl túl nagy" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: nem futtathat� bin�ris f�jl" +msgstr "%s: bináris nem hajtható végre" -#: builtins/exec.def:212 -#, fuzzy, c-format +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format msgid "%s: cannot execute: %s" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: nem hajtható végre: %s" -#: builtins/exit.def:65 -#, fuzzy, c-format +#: builtins/exit.def:64 +#, c-format msgid "logout\n" -msgstr "logout" +msgstr "kijelentkezés\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "" +msgstr "nem bejelentkező parancsértelmező: használja az „exit”-et" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "" +msgstr "Vannak leállított munkák.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "" +msgstr "Vannak futó munkák.\n" -#: builtins/fc.def:262 -#, fuzzy +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "%s: parancs nem tal�lhat�" +msgstr "nincs ilyen parancs" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "" +msgstr "előzményválasztás" -#: builtins/fc.def:370 -#, fuzzy, c-format +#: builtins/fc.def:444 +#, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: az átmeneti fájl nem nyitható meg: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "aktuális" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "" +msgstr "a(z) %d. munka munkakezelés nélkül indult" #: builtins/getopt.c:110 -#, fuzzy, c-format +#, c-format msgid "%s: illegal option -- %c\n" -msgstr "�rv�nytelen opci�: -" +msgstr "%s: érvénytelen kapcsoló – %c\n" #: builtins/getopt.c:111 -#, fuzzy, c-format +#, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "az opci� param�tert ig�nyel:-" +msgstr "%s: a kapcsolónak kötelező argumentuma van – %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "" +msgstr "a hashelés le van tiltva" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "" +msgstr "%s: a hashtábla üres\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "�jra futtathatja az utols� parancsot." +msgstr "t.szám\tparancs\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "A következő kifejezésre illeszkedő parancsok: „" +msgstr[1] "A következő kifejezésekre illeszkedő parancsok: „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" -#: builtins/help.def:168 +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." msgstr "" +"nem illeszkedik egy szócikk sem a következőre: „%s”.\n" +"A „help help”, „man -k '%s'” vagy „info '%s'” parancsok segíthetnek." -#: builtins/help.def:185 -#, fuzzy, c-format +#: builtins/help.def:223 +#, c-format msgid "%s: cannot open: %s" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: nem nyitható meg: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -483,121 +572,149 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" +"Ezek a parancsok be vannak építve a parancsértelmezőbe. A „help” parancs\n" +"listázza őket. A „help név” a „név” parancsról tájékoztat. Az „info bash”\n" +"paranccsal általános információt kap a parancsértelmezőről. A listán nem\n" +"található parancsokról a „man -k” vagy az „info” adhat felvilágosítást.\n" +"\n" +"A parancs nevét követő csillag (*) azt jelzi, hogy le van tiltva.\n" +"\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "" +msgstr "a következő kapcsolók kizárják egymást: -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "" +msgstr "előzménypozíció" -#: builtins/history.def:365 -#, fuzzy, c-format +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: érvénytelen időbélyeg" + +#: builtins/history.def:449 +#, c-format msgid "%s: history expansion failed" -msgstr "%s eg�sz sz�m sz�ks�ges" +msgstr "%s: sikertelen előzményből való kiegészítés" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s eg�sz sz�m sz�ks�ges" +msgstr "%s: sikertelen inlib" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "" +msgstr "a „-x” mellett nem használható más kapcsoló" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "" +msgstr "%s: az argumentumok folyamat- vagy munkaazonosítók lehetnek" -#: builtins/kill.def:263 -#, fuzzy +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "Ismeretlen hiba %d" +msgstr "Ismeretlen hiba" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "v�rhat� kifejez�s" +msgstr "az értelmező kifejezést várt" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s felszabad�tott v�ltoz�" +msgstr "%s: nem egy indexelt tömb" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "" +msgstr "%s: érvénytelen fájlleíró-megadás" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "" +msgstr "%d: érvénytelen fájlleíró: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%c%c: rossz opci�" +msgstr "%s: sorok száma érvénytelen" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%c%c: rossz opci�" +msgstr "%s: érvénytelen tömbkezdet" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "rossz jel(signal) sz�m" +msgstr "%s: érvénytelen parancshívási távolság" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s felszabad�tott v�ltoz�" +msgstr "üres tömbváltozó-név" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "a tömbök használata nincs támogatva" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "" +msgstr "„%s”: hiányzó formátumkarakter" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c”: érvénytelen időformátum-megadás" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "" +msgstr "„%c”: érvénytelen formátumkarakter" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" -msgstr "" +msgstr "figyelmeztetés: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "formátumfeldolgozási probléma: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "" +msgstr "hiányzó hexadecimális számjegy a következőhöz: \\x" -#: builtins/pushd.def:195 -#, fuzzy +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "hiányzó unicode számjegy a következőhöz: \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" -msgstr "k�nyvt�rba." +msgstr "nincs másik könyvtár" -#: builtins/pushd.def:462 -#, fuzzy +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: érvénytelen argumentum" + +#: builtins/pushd.def:480 msgid "" -msgstr "\tlesz az aktu�lis munkak�nyvt�r." +msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "a könyvtárverem üres" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "Rekurzi�s verem t�lcsordult" +msgstr "könyvtárveremindex" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -620,8 +737,24 @@ msgid "" "by\n" "\tdirs when invoked without options, starting with zero." msgstr "" +"Megjeleníti a jelenleg megjegyzett könyvtárakat. A könyvtárakat a\n" +" „pushd” paranccsal lehet a verembe rakni; és a „popd” paranccsal " +"kivenni.\n" +" \n" +" Kapcsolók:\n" +" -c\ta könyvtárverem törlése az összes elem eltávolításával\n" +" -l\ta saját könyvtárat ne rövidítse a listázáskor egy tilde (~)\n" +" -p\ta könyvtárverem kiírása soronként egy elemmel\n" +" -v\ta könyvtárverem kiírása soronként egy elemmel, a vermen\n" +" \tbelüli pozíció jelölésével\n" +" \n" +" Argumentumok:\n" +" +N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \táltal megjelenített listán balról számolva, nullától kezdve.\n" +" -N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \táltal megjelenített listán jobbról számolva, nullától kezdve." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -645,8 +778,29 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Egy könyvtárat tesz a könyvtárverem tetejére, vagy forgatja a vermet,\n" +" az új felső elemmé a jelenlegi munkakönyvtárat téve. Argumentumok\n" +" nélkül hívva a két felső könyvtárat cseréli meg.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat hozzáadáskor, vagyis csak a\n" +" \tvermet változtassa.\n" +" \n" +" Argumentumok:\n" +" +N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \tkezdve, a „dirs” által kiírt listán balról számolva)\n" +" \tkerüljön a verem tetejére.\n" +" \n" +" -N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \tkezdve, a „dirs” által kiírt listán jobbról számolva)\n" +" \tkerüljön a verem tetejére.\n" +" \n" +" dir\tA verem tetejére helyezi KTÁR könyvtárat, és ugyanezt\n" +" \tállítja be új munkakönyvtárnak.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -666,1562 +820,1691 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Elemeket vesz ki a könyvtárveremből. Argumentumok nélkül kiveszi a\n" +" legfelső elemet, és a kivett elemre állítja az új munkakönyvtárat.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat eltávolításkor, vagyis csak a vermet\n" +" \tváltoztassa.\n" +" \n" +" Argumentumok:\n" +" +N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \tnullától, balról számolva. Pl. a „popd +0” az első, míg a\n" +" \t„popd +1” a második könyvtárat távolítja el.\n" +" -N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \tnullától, jobbról számolva. Pl. a „popd -0” az utolsó,\n" +" \ta „popd -1” az utolsó előtti könyvtárat távolítja el.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "" +msgstr "%s: érvénytelen időkorlát-megadás" -#: builtins/read.def:588 -#, fuzzy, c-format +#: builtins/read.def:827 +#, c-format msgid "read error: %d: %s" -msgstr "Cs� (pipe)hiba %s" +msgstr "olvasási hiba: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "" +"csak függvényből vagy source-olt parancsfájlból lehet „return”-nel " +"visszatérni" -#: builtins/set.def:768 -#, fuzzy +#: builtins/set.def:869 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" +msgstr "nem lehet egyszerre függvényt és változót megszüntetni" -#: builtins/set.def:823 -#, fuzzy, c-format +#: builtins/set.def:969 +#, c-format msgid "%s: not an array variable" -msgstr "%s felszabad�tott v�ltoz�" +msgstr "%s: nem egy tömbváltozó" -#: builtins/setattr.def:186 -#, fuzzy, c-format +#: builtins/setattr.def:189 +#, c-format msgid "%s: not a function" -msgstr "%s Csak olvashat� funkci�" +msgstr "%s: nem függvény" -#: builtins/shift.def:71 builtins/shift.def:77 -#, fuzzy +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nem exportálható" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "shift [n]" +msgstr "shift-szám" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "" +"nem lehet egyszerre beállítani és törölni parancsértelmező-beállításokat" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "" +msgstr "%s: érvénytelen parancsértelmezőkapcsoló-név" #: builtins/source.def:128 msgid "filename argument required" -msgstr "" +msgstr "fájlnévargumentum szükséges" -#: builtins/source.def:153 -#, fuzzy, c-format +#: builtins/source.def:154 +#, c-format msgid "%s: file not found" -msgstr "%s: parancs nem tal�lhat�" +msgstr "%s: a fájl nem található" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "nem lehet szüneteltetni" -#: builtins/suspend.def:111 -#, fuzzy +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "Kil�p�s a parancs�rtelmez�b�l." +msgstr "nem lehet bejelentkező parancsértelmezőt szüneteltetni" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s egy alias a következőre: „%s”\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "" +msgstr "%s egy parancsértelmező-kulcsszó\n" -#: builtins/type.def:274 -#, fuzzy, c-format +#: builtins/type.def:275 +#, c-format msgid "%s is a function\n" -msgstr "%s Csak olvashat� funkci�" +msgstr "%s egy függvény\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s egy speciális beépített parancs\n" -#: builtins/type.def:296 +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s egy beépített parancs\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" -msgstr "" +msgstr "%s: %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "%s hashelve van (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: érvénytelen korlátérték" -#: builtins/ulimit.def:398 -#, fuzzy, c-format +#: builtins/ulimit.def:426 +#, c-format msgid "`%c': bad command" -msgstr "%c%c: rossz opci�" +msgstr "„%c”: érvénytelen parancs" -#: builtins/ulimit.def:427 -#, fuzzy, c-format +#: builtins/ulimit.def:464 +#, c-format msgid "%s: cannot get limit: %s" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: nem kérdezhető le a korlát: %s" -#: builtins/ulimit.def:453 -#, fuzzy +#: builtins/ulimit.def:490 msgid "limit" -msgstr "CPU hat�r" +msgstr "korlát" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 -#, fuzzy, c-format +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: nem módosítható a korlát: %s" -#: builtins/umask.def:118 -#, fuzzy +#: builtins/umask.def:115 msgid "octal number" -msgstr "rossz jel(signal) sz�m" +msgstr "oktális szám" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "„%c”: érvénytelen szimbolikus módoperátor" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "„%c”: érvénytelen szimbolikus módkarakter" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " sor: " -#: error.c:165 -#, fuzzy, c-format +#: error.c:164 +#, c-format msgid "last command: %s\n" -msgstr "�jra futtathatja az utols� parancsot." +msgstr "utolsó parancs: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "" +msgstr "Megszakítás..." -#: error.c:406 -#, fuzzy +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "figyelmeztetés: " + +#: error.c:488 msgid "unknown command error" -msgstr "Ismeretlen hiba %d" +msgstr "hiba: érvénytelen parancs" -#: error.c:407 -#, fuzzy +#: error.c:489 msgid "bad command type" -msgstr "parancsk�nt haszn�lja." +msgstr "hibás parancstípus" -#: error.c:408 -#, fuzzy +#: error.c:490 msgid "bad connector" -msgstr "rossz csatlakoz�s `%d'" +msgstr "hibás csatlakozó" -#: error.c:409 -#, fuzzy +#: error.c:491 msgid "bad jump" -msgstr "Rossz ugr�s %d" +msgstr "hibás ugrás" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "%s felszabad�tott v�ltoz�" +msgstr "%s: kötetlen 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aidőtúllépés bemenetre várva: automatikus kijelentkezés\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "" +msgstr "szabványos bemenet /dev/null-ra állítása sikertelen: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "" +msgstr "IDŐFORMÁTUM: „%c”: érvénytelen formátumkarakter" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: a coproc [%d:%s] még mindig létezik" + +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "Cs� (pipe)hiba %s" +msgstr "hibás csővezeték" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: a maximális eval beágyazási szint túllépve (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: a maximális source beágyazási szint túllépve (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: a maximális függvénybeágyazási szint túllépve (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: fenntartva: parancs nem tartalmazhat '/' karaktert" +msgstr "%s: korlátozott: nem adható meg „/” a parancsok nevében" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s: parancs nem tal�lhat�" +msgstr "%s: parancs nem található" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" -#: execute_cmd.c:4827 +#: execute_cmd.c:5975 #, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: bináris nem hajtható végre" + +#: execute_cmd.c:6000 +#, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: egy k�nyvt�r" +msgstr "%s: %s: rossz parancsértelmező" -#: execute_cmd.c:4976 -#, fuzzy, c-format +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: a bináris nem hajtható végre: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s”: egy speciális beépített parancs" + +#: execute_cmd.c:6175 +#, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "nem m�solhat� a fd %d fd 0: %s-re" +msgstr "nem lehet duplikálni a(z) %d. fájlleírót a(z) %d. helyre" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "kifejez�s t�ll�pte a megengedett rekurz�v szintet" +msgstr "a kifejezés rekurziókorlátot" -#: expr.c:265 -#, fuzzy +#: expr.c:291 msgid "recursion stack underflow" -msgstr "Rekurzi�s verem t�lcsordult" +msgstr "alulcsordult a rekurziós verem" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "szintaktikai hiba a kifelyez�sben" +msgstr "szintaktikai hiba a kifejezésben" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "nem v�ltoz�hoz pr�b�lt hozz�rendelni" +msgstr "nem változóhoz próbált értéket rendelni" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "szintaktikai hiba a változó-értékadásban" + +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "null�val val� oszt�s" +msgstr "0-val osztás" -#: expr.c:471 -#, fuzzy +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "Hiba:rossz vez�rjel %d" +msgstr "bug: rossz expassign token" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "`:' t�ll�pte a kifelyez�s felt�teleit" +msgstr "„:” egy feltételkifejezés szükséges" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" -msgstr "" +msgstr "0-nál kisebb kitevő" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" +msgstr "prefix növelés vagy csökkentés után azonosító kell következzen" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "rossz ')'" +msgstr "hiányzó „)”" -#: expr.c:897 expr.c:1176 -#, fuzzy +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "szintaktikai hiba: v�ratlan f�jl v�g" +msgstr "szintaktikai hiba: operandus kell következzen" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "" +msgstr "szintaktikai hiba: érvénytelen aritmetikai operátor" -#: expr.c:1202 -#, fuzzy, c-format +#: expr.c:1518 +#, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s: %s: %s (a hiba jele \"%s\")\n" +msgstr "%s%s%s: %s (hibás token: „%s”)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "" +msgstr "érvénytelen számrendszer" + +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: sorok száma érvénytelen" -#: expr.c:1280 +#: expr.c:1603 msgid "value too great for base" -msgstr "az �rt�k t�l nagy" +msgstr "túl nagy érték a számrendszerhez" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "%s eg�sz sz�m sz�ks�ges" +msgstr "%s: hibás kifejezés\n" -#: general.c:61 -#, fuzzy +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getwd: nem el�rhet� a sz�l� k�nyvt�r" +msgstr "getcwd: nem érhetőek el a szülőkönyvtárak" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6208 +#, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "nem m�solhat� a fd %d fd 0: %s-re" +msgstr "nem lehet újraindítani a nodelay módot a(z) %d. fájlleíróhoz" -#: input.c:258 -#, fuzzy, c-format +#: input.c:266 +#, 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" +"nem lehet új fájlleírót foglalni a bash bemenetéhez a(z) %d. fájlleíróból" -#: input.c:266 -#, fuzzy, c-format +#: input.c:274 +#, 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" +msgstr "save_bash_input: már van puffer a(z) %d. fájlleíróhoz" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: pgrp csővezeték" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "" +msgid "forked pid %d appears in running job %d" +msgstr "a(z) %d számú forkolt pid a(z) %d számú munkában jelent meg" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "%d. számú megállított munka törlése a %ld számú folyamatcsoporttal" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: %5ld. folyamat (%s) még élőként van jelölve" -#: jobs.c:1401 -#, fuzzy, c-format +#: jobs.c:1839 +#, c-format msgid "describe_pid: %ld: no such pid" -msgstr "describe_pid: Nem l�tez� pid (%d)!\n" +msgstr "describe_pid: %ld: nincs ilyen pid" -#: jobs.c:1416 -#, fuzzy, c-format +#: jobs.c:1854 +#, c-format msgid "Signal %d" -msgstr "Ismeretlen #%d Szign�l" +msgstr "%d. szignál" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "K�sz" +msgstr "Kész" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "Meg�ll�tva" +msgstr "Megállítva" -#: jobs.c:1439 -#, fuzzy, c-format +#: jobs.c:1877 +#, c-format msgid "Stopped(%s)" -msgstr "Meg�ll�tva" +msgstr "Megállítva(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "Fut�" +msgstr "Fut" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "K�sz (%d)" +msgstr "Kész(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "Kil�p�s %d" +msgstr "Kilépett(%d)" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "Ismeretlen �llapot" +msgstr "Ismeretlen állapot" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "(mem�ria ki�r�s)" +msgstr "(core készült) " -#: jobs.c:1568 -#, fuzzy, c-format +#: jobs.c:2009 +#, c-format msgid " (wd: %s)" -msgstr "(wd most: %s)\n" +msgstr " (mk: %s)" -#: jobs.c:1776 -#, fuzzy, c-format +#: jobs.c:2250 +#, c-format msgid "child setpgid (%ld to %ld)" -msgstr "gyermek-folyamat setpgid (%d -r�l %d-ra) hiba %d: %s\n" +msgstr "gyermek setpgid (innen: %ld ide: %ld)" -#: jobs.c:2104 nojobs.c:585 -#, fuzzy, c-format +#: jobs.c:2608 nojobs.c:666 +#, 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" +msgstr "wait: %ld. számú folyamat nem gyermeke ennek a parancsértelmezőnek" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "" +msgstr "wait_for: Nincs bejegyzés %ld. számú folyamatról" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: %d. számú munka le lett állítva" + +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: nincs ilyen munka" -#: jobs.c:2829 +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "%s: munkafolyamat megszakadt" +msgstr "%s: a munka be lett fejezve" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: %d. számú munka már a háttérben van" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: WNOHANG bekapcsolása a korlátlan blokk elkerülésére" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "foglalat %3d: " +msgstr "%s: %d. sor: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr "(mem�ria ki�r�s)" +msgstr " (core készült)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "(wd most: %s)\n" +msgstr "(mk most: %s)\n" -#: jobs.c:3579 -#, fuzzy +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "initialize_jobs: getpgrp sikertelen: %s" +msgstr "initialize_job_control: getpgrp sikertelen" -#: jobs.c:3639 -#, fuzzy +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: nincs munkakezelés a háttérben" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "initialize_jobs: sor fegyelem %s" +msgstr "initialize_job_control: line discipline" -#: jobs.c:3649 -#, fuzzy +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "initialize_jobs: getpgrp sikertelen: %s" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "nem állítható be a terminál folyamatcsoportja (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "nincs munkafolyamat ellen�rz�s ezen a parancs�rtelmez�n" +msgstr "nincsen munkakezelés ebben a parancsértelmezőben" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "" +msgstr "malloc: nem teljesülő feltételezés: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" +"\r\n" +"malloc: %s:%d: téves feltételezés\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "" +msgstr "ismeretlen" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" +msgstr "malloc: a szabadlistán lévő blokk felülírva" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" +msgstr "free: már felszabadított blokkal lett hívva" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "" +msgstr "free: nem lefoglalt blokkal lett hívva" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "free: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" + +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "" +msgstr "free: kezdő- és záródarab mérete eltér" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "" +msgstr "realloc: nem lefoglalt blokkal lett hívva" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "realloc: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" + +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: alulcsordulást érzékelt; mh_nbytes kívül esik a tartományon" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" +msgstr "realloc: kezdő- és záródarab mérete eltér" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" +msgstr "register_alloc: foglalótábla tele van FIND_ALLOC-kal?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "" +msgstr "register_alloc: %p már a táblában lefoglaltként?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "" +msgstr "register_free: %p már a táblában szabadként?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "" +msgstr "érvénytelen számrendszer" #: lib/sh/netopen.c:168 -#, fuzzy, c-format +#, c-format msgid "%s: host unknown" -msgstr "ismeretlen" +msgstr "%s: ismeretlen gépnév" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "" +msgstr "%s: érvénytelen szolgáltatás" #: lib/sh/netopen.c:306 #, c-format msgid "%s: bad network path specification" -msgstr "" +msgstr "%s: hibás hálózatiútvonal-megadás" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "" +msgstr "a hálózati műveletek nincsenek támogatva" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: nem lehet területi beállításokat váltani (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: nem lehet területi beállításokat váltani (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xmalloc: nem lehet lefoglalni %lu b�jtot (%lu b�jt lefoglalva)" +msgstr "setlocale: %s: nem lehet területi beállításokat váltani (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xmalloc: nem lehet lefoglalni %lu b�jtot (%lu b�jt lefoglalva)" +msgstr "setlocale: %s: nem lehet területi beállításokat váltani (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" -msgstr "�nnek levele van $_ -ben" +msgstr "Levél a következőben: $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" -msgstr "�nnek �j levele �rkezett a $_ -ra" +msgstr "Új levél a következőben: $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" -msgstr "A %s levelet m�r elolvasta\n" +msgstr "A(z) „%s” helyen lévő levél el van olvasva\n" -#: make_cmd.c:323 -#, fuzzy +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "szintaktikai hiba a kifelyez�sben" +msgstr "szintaktikai hiba: aritmetikai kifejezés szükséges" -#: make_cmd.c:325 -#, fuzzy +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "szintaktikai hiba: v�ratlan f�jl v�g" +msgstr "szintaktikai hiba: váratlan „;”" -#: make_cmd.c:326 -#, fuzzy, c-format +#: make_cmd.c:317 +#, c-format msgid "syntax error: `((%s))'" -msgstr "szintaktikai hiba" +msgstr "szintaktikai hiba: „((%s))”" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: rossz utas�t�s t�pus %d" +msgstr "make_here_document: hibás utasítástípus: %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "a(z) %d. sorban kezdett heredocot EOF zárja („%s” helyett)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: %d. átirányító utasítás kívül esik a tartományon" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" msgstr "" +"shell_getc: a shell_input_line_size (%zu) meghaladja a MÉRET_MAXIMUM értékét " +"(%lu): a sor csonkolva" -#: parse.y:3133 parse.y:3369 -#, fuzzy, c-format +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "a maximális here-document szám túllépve" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "v�ratlan EOF am�g vizsg�ltam a `%c'-t" +msgstr "váratlan EOF „%c” helyett" -#: parse.y:3951 -#, fuzzy +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "v�ratlan EOF am�g vizsg�ltam a `%c'-t" +msgstr "váratlan EOF „]]” helyett" -#: parse.y:3956 -#, fuzzy, c-format +#: parse.y:4457 +#, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "szintaktikai hiba a v�ratlan %s vez�rjel k�r�l" +msgstr "szintaktikai hiba a feltételben: váratlan token: „%s”" -#: parse.y:3960 -#, fuzzy +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "szintaktikai hiba a kifelyez�sben" +msgstr "szintaktikai hiba a feltételben" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "" +msgstr "váratlan token (%s) „)” helyett" -#: parse.y:4042 -#, fuzzy +#: parse.y:4543 msgid "expected `)'" -msgstr "')' sz�ks�ges" +msgstr "„)” szükséges" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "" +msgstr "váratlan argumentum (%s) feltételes egyoperandusú operátorhoz" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" -msgstr "" +msgstr "váratlan argumentum feltételes egyoperandusú operátorhoz" -#: parse.y:4120 -#, fuzzy, c-format +#: parse.y:4621 +#, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "%s:bin�ris m�velet sz�ks�ges" +msgstr "váratlan token (%s), feltételes kétoperandusú operátor szükséges" -#: parse.y:4124 -#, fuzzy +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "%s:bin�ris m�velet sz�ks�ges" +msgstr "feltételes kétoperandusú operátor szükséges" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "" +msgstr "váratlan argumentum (%s) feltételes kétoperandusú operátorhoz" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" -msgstr "" +msgstr "váratlan argumentum feltételes kétoperandusú operátorhoz" -#: parse.y:4161 -#, fuzzy, c-format +#: parse.y:4662 +#, c-format msgid "unexpected token `%c' in conditional command" -msgstr "`:' t�ll�pte a kifelyez�s felt�teleit" +msgstr "váratlan token (%c) feltételes parancsban" -#: parse.y:4164 -#, fuzzy, c-format +#: parse.y:4665 +#, c-format msgid "unexpected token `%s' in conditional command" -msgstr "`:' t�ll�pte a kifelyez�s felt�teleit" +msgstr "váratlan token (%s) feltételes parancsban" -#: parse.y:4168 -#, fuzzy, c-format +#: parse.y:4669 +#, c-format msgid "unexpected token %d in conditional command" -msgstr "`:' t�ll�pte a kifelyez�s felt�teleit" +msgstr "váratlan token (%d) feltételes parancsban" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "szintaktikai hiba a v�ratlan %s vez�rjel k�r�l" +msgstr "szintaktikai hiba „%s” váratlan token közelében" -#: parse.y:5477 -#, fuzzy, c-format +#: parse.y:6137 +#, c-format msgid "syntax error near `%s'" -msgstr "szintaktikai hiba a v�ratlan %s vez�rjel k�r�l" +msgstr "szintaktikai hiba „%s” közelében" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "szintaktikai hiba: v�ratlan f�jl v�g" +msgstr "szintaktikai hiba: váratlan fájlvége" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "szintaktikai hiba" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Haszn�lja \"%s\" a parancs�rtelmez� elhagy�s�hoz.\n" +msgstr "„%s” használatával lehet elhagyni a parancsértelmezőt.\n" -#: parse.y:5711 -#, fuzzy +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "v�ratlan EOF am�g vizsg�ltam a `%c'-t" +msgstr "váratlan EOF „)” helyett" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "" +msgstr "kiegészítés: nem található „%s” függvény" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: lehetséges újrapróbálási hurok" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" +msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: rossz csatlakoz�s `%d'" +msgstr "print_command: hibás csatlakozó (%d)" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "" +msgstr "xtrace_set: %d: érvénytelen fájlleíró" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: NULL fájlmutató" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf: „%c”: érvénytelen formátumkarakter" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "" +msgstr "fájlleíró kívül esik a tartományon" -#: redir.c:166 -#, fuzzy, c-format +#: redir.c:205 +#, c-format msgid "%s: ambiguous redirect" -msgstr "%s: Nem egy�rtelm� �tir�ny�t�s" +msgstr "%s: kétértelmű átirányítás" -#: redir.c:170 -#, fuzzy, c-format +#: redir.c:209 +#, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: Nem lehet megsemmis�teni l�tez� f�jlt�" +msgstr "%s: nem lehet felülírni létező fájlt" -#: redir.c:175 -#, fuzzy, c-format +#: redir.c:214 +#, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: fenntartva: parancs nem tartalmazhat '/' karaktert" +msgstr "%s: korlátozott: nem lehet átirányítani a kimenetet" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, c-format msgid "cannot create temp file for here-document: %s" -msgstr "nem lehet l�trehozni a pipe-ot feladat behelyettes�t�shez: %s" +msgstr "nem lehet a heredocnak átmeneti fájlt létrehozni: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: nem lehet a list�hoz rendelni az elemet" +msgstr "%s: nem lehet változóhoz fájlleírót rendelni" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "" +msgstr "/dev/(tcp|udp)/host/port nincs támogatva hálózat nélkül" -#: redir.c:1101 -#, fuzzy +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "�tir�ny�t�si hiba" +msgstr "átirányítási hiba: nem lehet duplikálni a fájlleírót" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "" +msgstr "nem található /tmp, hozza létre!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "" +msgstr "/tmp érvényes könyvtárnév kell legyen" -#: shell.c:884 -#, fuzzy, c-format +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "a csinos kiírási mód mellőzve van interaktív az parancsértelmezőkben" + +#: shell.c:972 +#, c-format msgid "%c%c: invalid option" -msgstr "%c%c: rossz opci�" +msgstr "%c%c: érvénytelen kapcsoló" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "az uid nem állítható be %d értékre: a hatásos uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "a gid nem állítható be %d értékre: a hatásos gid %d" -#: shell.c:1651 +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "nem indítható el a hibakereső; a hibakeresési mód letiltva" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: ez egy könyvtár" + +#: shell.c:1907 msgid "I have no name!" msgstr "Nincs nevem!" -#: shell.c:1793 -#, fuzzy, c-format +#: shell.c:2061 +#, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "GNU %s, verzi� %s\n" +msgstr "GNU bash, %s-(%s) verzió\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"Használat:\t%s [GNU hosszú kapcsoló] [kapcsoló] ...\n" +"\t%s [GNU hosszú kapcsoló] [kapcsoló] parancsfájl ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "GNU hossz� opci�k:\n" +msgstr "GNU hosszú kapcsolók:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "Parancs�rtelmez� opci�k:\n" +msgstr "Parancsértelmező-kapcsoló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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD vagy -c parancs vagy -O shopt_option\t\t(csak hívás)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s vagy -o opci�k\n" +msgstr "\t-%s vagy -o kapcsoló\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +"A „%s -c \"help set\"” további információt ad a parancsértelmező-" +"beállításokról.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "A „%s -c help” további információt ad a beépített parancsokról.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" +msgstr "A „bashbug” paranccsal jelenthet hibákat.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "a bash honlapja: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" msgstr "" +"Általános segítség a GNU szoftverek használatához: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "" +msgstr "sigprocmask: %d: érvénytelen művelet" #: siglist.c:48 msgid "Bogus signal" -msgstr "Hamis jel" +msgstr "Hibás szignál" #: siglist.c:51 msgid "Hangup" -msgstr "Bont�s" +msgstr "Bontás" #: siglist.c:55 msgid "Interrupt" -msgstr "Megszak�t�s" +msgstr "Megszakítás" #: siglist.c:59 msgid "Quit" -msgstr "Kil�p�s" +msgstr "Abbahagyás" #: siglist.c:63 msgid "Illegal instruction" -msgstr "�rv�nytelen utas�t�s" +msgstr "Érvénytelen utasítás" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "BPT nyomk�vet�s/csapda" +msgstr "BPT trace/trap" #: siglist.c:75 msgid "ABORT instruction" -msgstr "Utas�t�s MEGSZAK�T�SA" +msgstr "ABORT utasítás" #: siglist.c:79 msgid "EMT instruction" -msgstr "EMT utas�t�s" +msgstr "EMT utasítás" #: siglist.c:83 msgid "Floating point exception" -msgstr "Lebeg� pontos esem�ny" +msgstr "Lebegőpontos kivétel" #: siglist.c:87 msgid "Killed" -msgstr "Kil�ve" +msgstr "Kilőve" #: siglist.c:91 msgid "Bus error" -msgstr "Busz hiba" +msgstr "Buszhiba" #: siglist.c:95 msgid "Segmentation fault" -msgstr "Szegmens hiba" +msgstr "Szegmenshiba" #: siglist.c:99 msgid "Bad system call" -msgstr "Rossz rendszerh�v�s" +msgstr "Rossz rendszerhívás" #: siglist.c:103 msgid "Broken pipe" -msgstr "T�r�tt cs� (pipe)" +msgstr "Törött csővezeték" #: siglist.c:107 msgid "Alarm clock" -msgstr "Eml�keztet�s" +msgstr "Ébresztés" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "ki." +msgstr "Befejezve" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "S�rg�s IO felt�tel" +msgstr "Sürgős IO körülmény" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "Meg�ll�tva (jellel)" +msgstr "Megállítva (szignál)" #: siglist.c:127 msgid "Continue" -msgstr "Folytat�s" +msgstr "Folytatás" #: siglist.c:135 msgid "Child death or stop" -msgstr "Gyermek objektum meghalt vagy meg�llt" +msgstr "Gyermek halála vagy megállítása" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "Meg�ll�tva (tty bemenet)" +msgstr "Megállítva (konzolbemenet)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "Meg�ll�tva (tty kimenet)" +msgstr "Megállítva (konzolkimenet)" #: siglist.c:147 msgid "I/O ready" -msgstr "I/O k�sz" +msgstr "IO kész" #: siglist.c:151 msgid "CPU limit" -msgstr "CPU hat�r" +msgstr "CPU-korlátozás" #: siglist.c:155 msgid "File limit" -msgstr "F�jl hat�r" +msgstr "Fájlkorlátozás" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "Eml�keztet�s (virtu�lis)" +msgstr "Ébresztés (virtuális)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "Eml�keztet�s (profil)" +msgstr "Ébresztés (profilozás)" #: siglist.c:167 msgid "Window changed" -msgstr "Ablak megv�ltozott" +msgstr "Ablak változott" #: siglist.c:171 msgid "Record lock" -msgstr "Felv�tel z�rolva" +msgstr "Elveszett zárolás" #: siglist.c:175 msgid "User signal 1" -msgstr "Felhaszn�l�i jel 1" +msgstr "Felhasználói 1." #: siglist.c:179 msgid "User signal 2" -msgstr "Felhaszn�l�i jel 2" +msgstr "Felhasználói 2." #: siglist.c:183 msgid "HFT input data pending" -msgstr "HFT bemeneti adat f�gg�ben" +msgstr "HFT bemeneti adat vár" #: siglist.c:187 msgid "power failure imminent" -msgstr "�ram kimarad�s v�rhat�" +msgstr "táphiba fenyeget" #: siglist.c:191 msgid "system crash imminent" -msgstr "rendszer s�r�l�s v�rhat�" +msgstr "rendszerleállás fenyeget" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "feladat �tad�sa m�sik CPU-nak" +msgstr "folyamat átvitele másik CPU-ra" #: siglist.c:199 msgid "programming error" -msgstr "programoz�si hiba" +msgstr "programozási hiba" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "HFT fel�gyel� m�d enged�lyezve" +msgstr "HFT monitor mód megadva" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "HFT fel�gyel� m�d visszavonva" +msgstr "HFT monitor mód visszavonva" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "HFT hangsorozat behelyezve" +msgstr "HFT hangfolyamat befejezve" #: siglist.c:215 msgid "Information request" -msgstr "" +msgstr "Információkérés" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Ismeretlen # Szign�l" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "Ismeretlen #%d Szign�l" +msgstr "%d. számú ismeretlen szignál" -#: subst.c:1333 subst.c:1454 -#, fuzzy, c-format +#: subst.c:1480 subst.c:1670 +#, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "rossz behelyettes�t�s: ne a %s be a %s-t" +msgstr "hibás helyettesítés: nincs záró „%s” a következőben: %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "%s: nem lehet a list�hoz rendelni az elemet" +msgstr "%s: lista nem adható tömbelemnek értékül" -#: subst.c:4754 subst.c:4770 -#, fuzzy +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "nem lehet l�trehozni a pipe-ot feladat behelyettes�t�shez: %s" +msgstr "nem hozható létre a csővezeték a folyamatbehelyettesítéshez" -#: subst.c:4802 -#, fuzzy +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "" -"nem lehet l�trehozni a gyermekfolyamatott feladat behelyettes�t�shez: %s" +msgstr "nem hozható létre a gyermek a folyamatbehelyettesítéshez" -#: subst.c:4847 -#, fuzzy, c-format +#: subst.c:6198 +#, c-format msgid "cannot open named pipe %s for reading" -msgstr "nem lehet l�trehozni a %s \"named pipe\"-ot a %s-nek: %s" +msgstr "nem nyitható meg olvasásra a(z) %s csővezeték" -#: subst.c:4849 -#, fuzzy, c-format +#: subst.c:6200 +#, c-format msgid "cannot open named pipe %s for writing" -msgstr "nem lehet l�trehozni a %s \"named pipe\"-ot a %s-nek: %s" +msgstr "nem nyitható meg írásra a(z) %s csővezeték" -#: subst.c:4867 -#, fuzzy, c-format +#: subst.c:6223 +#, 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" +msgstr "nem duplikálható a(z) %s csővezeték %d. fájlleíróként" -#: subst.c:5063 -#, fuzzy +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "parancshelyettesítés: figyelmen kívül hagyott null bájt a bemeneten" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "nem lehet l�trehozni a \"pipe\"-ot parancs behelyettes�t�s�hez: %s" +msgstr "nem hozható létre csővezeték a parancsbehelyettesítéshez" -#: subst.c:5097 -#, fuzzy +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "" -"nem lehet l�trehozni a gyermekfolyamatot a parancs behelyettes�t�s�hez: %s" +msgstr "nem hozható létre gyermek a parancsbehelyettesítéshez" -#: subst.c:5114 -#, fuzzy +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "command_substitute: nem lehet m�solni a \"pipe\"-ot mint fd 1: %s" +msgstr "command_substitute: nem duplikálható a csővezeték 1. fájlleíróként" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: érvénytelen változóérték a névhivatkozáshoz" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: az indirekt kiegészítés érvénytelen" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: érvénytelen változónév" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: a paraméter nincs beállítva" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s param�ter semmis vagy nincs be�ll�tva" +msgstr "%s: a paraméter null vagy nincs beállítva" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "%s sz�vegr�sz kifejez�s < 0" +msgstr "%s: részkarakterlánc-kifejezés < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s rossz behelyettes�t�s" +msgstr "%s: rossz helyettesítés" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "$%s �gy nem lehet hozz�rendelni" +msgstr "$%s: nem lehet így értéket adni" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"a parancsértelmező későbbi verziói kötelezővé teszik majd az aritmetikai " +"kiértékelést" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "rossz behelyettes�t�s: ne a %s be a %s-t" +msgstr "hibás helyettesítés: nincs záró „`” a következőben: %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "" +msgstr "nincs találat: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "param�ter sz�ks�ges" +msgstr "argumentum szükséges" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s eg�sz sz�m sz�ks�ges" +msgstr "%s: egész kifejezés szükséges" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "')' sz�ks�ges" +msgstr "„)” szükséges" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "')' sz�ks�ges, %s-t tal�ltam" +msgstr "„)” szükséges %s helyett" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" -msgstr "%s un�ris m�velet sz�ks�ges" +msgid "%s: binary operator expected" +msgstr "%s: kétoperandusú operátor szükséges" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" -msgstr "%s:bin�ris m�velet sz�ks�ges" +msgid "%s: unary operator expected" +msgstr "%s: egyoperandusú operátor szükséges" -#: test.c:811 +#: test.c:896 msgid "missing `]'" -msgstr "hi�nyz� ']'" +msgstr "hiányzó „]”" -#: trap.c:203 -#, fuzzy +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "szintaktikai hiba: váratlan „;”" + +#: trap.c:220 msgid "invalid signal number" -msgstr "rossz jel(signal) sz�m" +msgstr "érvénytelen szignálszám" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "elfogáskezelő: a legnagyobb elfogáskezelő-szint túllépve (%d)" -#: trap.c:327 +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" -msgstr "" +msgstr "run_pending_traps: rossz érték a trap_list[%d]-ban: %p" -#: trap.c:331 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" msgstr "" +"run_pending_traps: szignálkezelő a SIG_DFL, %d (%s) újraküldése önmagunknak" -#: trap.c:380 -#, fuzzy, c-format +#: trap.c:509 +#, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler: Rossz jel(signal) %d" +msgstr "trap_handler: rossz szignál: %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "hiba a %s funkci� defin�ci� import�l�sakor" +msgstr "hiba a függvénydefiníció betöltésekor: „%s”" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "a parancsértelmező szintje (%d) túl magas, visszaállítás 1-re" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: nincs függvénykörnyezet az aktuális látókörben" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: nem lehet a változóhoz értéket rendelni" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" msgstr "" -#: variables.c:3159 +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: egész szám hozzárendelése a névhivatkozáshoz" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: nincs függvénykörnyezet az aktuális látókörben" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s param�ter semmis vagy nincs be�ll�tva" +msgstr "%s exportstr-je null" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "érvénytelen karakter (%d) %s exportstr-jében" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "nincs „=” %s exportstr-jében" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" +msgstr "pop_var_context: shell_variables feje nem egy függvénykörnyezet" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: nincs global_variables környezet" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" +msgstr "pop_scope: shell_variables feje nem egy átmeneti környezeti látókör" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: nem lehet l�trehozni: %s" +msgstr "%s: %s: nem nyitható meg FILE-ként" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "" +msgstr "%s: %s: érvénytelen érték a trace fájlleíróhoz" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: a kompatibilitási érték kívül esik a tartományon" -#: version.c:47 +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2018 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" +"A licenc GPLv3+: a GNU GPL 3. vagy újabb változata\n" +"\n" -#: 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 +#: version.c:86 version2.c:86 #, c-format -msgid "This is free software; you are free to change and redistribute it.\n" -msgstr "" +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, %s (%s) verzió\n" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ez egy szabad szoftver, terjesztheti és/vagy módosíthatja." -#: version2.c:86 -#, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "NINCS GARANCIA, a törvény által engedélyezett mértékig." -#: version2.c:87 +#: xmalloc.c:93 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \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)" +msgstr "%s: nem lehetséges %lu byte foglalása (%lu byte lett foglalva)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: nem lehet �jra lefoglalni %lu b�jtot (%lu b�jt lefoglalva)" +msgstr "%s: nem lehetséges %lu byte foglalása" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d nem lehetséges %lu byte foglalása (%lu byte lett foglalva)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: nem lehet �jra lefoglalni %lu b�jtot (%lu b�jt lefoglalva)" +msgstr "%s: %s:%d nem lehetséges %lu byte foglalása" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "alias [-p] [n�v[=�rt�k] ... ]" +msgstr "alias [-p] [név[=érték] ... ]" -#: builtins.c:47 -#, fuzzy +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "unalias [-a] [n�v ...]" +msgstr "unalias [-a] név [név ...]" -#: builtins.c:51 -#, fuzzy +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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�]" +"bind [-lpsvPSVX] [-m kiosztás] [-f fájlnév] [-q név] [-u név] [-r billkomb] " +"[-x billkomb:shell-parancs] [billkomb:readline-függvény vagy readline-" +"parancs]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [shell-builtin [arg ...]]" -#: builtins.c:61 -#, fuzzy +#: builtins.c:63 msgid "caller [expr]" -msgstr "test [kifelyez�s]" - -#: builtins.c:64 -#, fuzzy -msgid "cd [-L|-P] [dir]" -msgstr "cd [-PL] [k�nyvt�r]" +msgstr "caller [kif]" #: builtins.c:66 -#, fuzzy -msgid "pwd [-LP]" -msgstr "pwd [-PL]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [ktár]" #: 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 ...]" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -#, fuzzy -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "declare [-afFrxi] [-p] n�v[=�rt�k] ..." +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] parancs [arg ...]" #: builtins.c:78 #, fuzzy -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "typeset [-afFrxi] [-p] n�v[=�rt�k] ..." +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [név[=érték] ...]" #: builtins.c:80 #, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilnrtux] [-p] név[=érték] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "local name[=�rt�k] ..." +msgstr "local [kapcsoló] név[=érték] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 -#, fuzzy +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "enable [-pnds] [-a] [-f f�jln�v] [n�v ...]" +msgstr "enable [-a] [-dnps] [-f fájlnév] [név ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts opciók név [arg]" #: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a név] [parancs [argumentumok ...]] [átirányítás ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 -#, fuzzy +#: builtins.c:102 msgid "logout [n]" -msgstr "logout" +msgstr "logout [n]" -#: builtins.c:103 -#, fuzzy +#: builtins.c:105 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]" +msgstr "" +"fc [-e ename] [-lnr] [első] [utolsó] vagy fc -s [minta=csere] [parancs]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "fg [munka_folyamat]" +msgstr "fg [munkaszám]" -#: builtins.c:111 -#, fuzzy +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "bg [munka_folyamat]" +msgstr "bg [munkaszám ...]" -#: builtins.c:114 -#, fuzzy +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "hash [-r] [-p �tvonal] [n�v ...]" +msgstr "hash [-lr] [-p útvonal] [-dt] [név ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [minta ...]" +msgstr "help [-dms] [minta ...]" -#: builtins.c:121 -#, fuzzy +#: builtins.c:123 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...]" +"history [-c] [-d szám] [n] vagy history -anrw [fájlnév] vagy history -ps arg " +"[arg...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "jobs [-lnprs] [munkafolyamat ...] vagy jobs -x parancs [args]" +msgstr "jobs [-lnprs] [munkaszám ...] vagy jobs -x parancs [args]" -#: builtins.c:129 -#, fuzzy -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "disown [munka folyamat ...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [munkaszám ... | pid ...]" -#: builtins.c:132 -#, fuzzy +#: builtins.c:134 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)]" +"kill [-s szignál | -n szignálszám | -szignál] pid | munkaszám ... vagy kill -" +"l [szignál]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let arg [arg ...]" -#: builtins.c:136 +#: builtins.c:138 msgid "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " "prompt] [-t timeout] [-u fd] [name ...]" msgstr "" +"read [-ers] [-a tömb] [-d elválasztó] [-i szöveg] [-n szám] [-N szám] [-p " +"prompt] [-t időkeret] [-u fd] [név ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o beállításnév] [--] [arg ...]" #: builtins.c:144 -#, fuzzy -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-nf] [n�v ...] vagy export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [név ...]" #: builtins.c:146 -#, fuzzy -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-anf] [n�v ...] vagy readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [név[=érték] ...] vagy export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "exit [n]" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [név[=érték] ...] vagy readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "forr�s f�jlneve" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source fájlnév [argumentumok]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr "f�jln�v" +msgstr ". fájlnév [argumentumok]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" -msgstr "test [kifelyez�s]" +msgstr "test [kifejezés]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 -#, fuzzy +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "trap [arg] [signal_spec] vagy trap -l" +msgstr "trap [-lp] [[arg] szignál ...]" -#: builtins.c:166 -#, fuzzy +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "type [-apt] n�v [n�v ...]" +msgstr "type [-afptP] név [név ...]" -#: builtins.c:169 +#: builtins.c:171 #, fuzzy -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdfmstpnuv] [hat�r]" +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [korlát]" -#: builtins.c:172 -#, fuzzy +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "mask [-S] [m�d]" +msgstr "umask [-p] [-S] [mód]" -#: builtins.c:175 +#: builtins.c:177 #, fuzzy -msgid "wait [id]" -msgstr "wait [n]" +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [id ...]" -#: builtins.c:179 -#, fuzzy -msgid "wait [pid]" -msgstr "wait [n]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" -#: builtins.c:182 -#, fuzzy +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for N�V [in SZAVAK ... ;] do PARANCSOK; done" +msgstr "for NÉV [in SZAVAK ... ] ; do PARANCSOK; done" -#: builtins.c:184 -#, fuzzy +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "for N�V [in SZAVAK ... ;] do PARANCSOK; done" +msgstr "for (( kif1; kif2; kif3 )); do PARANCSOK; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "select N�V [in SZAVAK ... ;] do PARANCSOK; done" +msgstr "select NÉV [in SZAVAK ... ;] do PARANCSOK; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" -msgstr "" +msgstr "time [-p] csővezeték" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "case SZ� in [MINTA [| MINTA]...) PARANCSOK ;;]... esac" +msgstr "case SZÓ in [MINTA [| MINTA]...) PARANCSOK ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2229,103 +2512,106 @@ msgstr "" "if PARANCSOK; then PARANCSOK; [ elif PARANCSOK; then PARANCSOK; ]... [ else " "PARANCSOK; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while PARANCSOK; do PARANCSOK; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until PARANCSOK; do PARANCSOK; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" -msgstr "" +msgstr "coproc [NÉV] parancs [átirányítások]" -#: builtins.c:200 -#, fuzzy +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "function N�V { PARANCSOK ; } vagy N�V () { PARANCSOK ; }" +msgstr "function név { PARANCSOK ; } vagy név () { PARANCSOK ; }" -#: builtins.c:202 -#, fuzzy +#: builtins.c:204 msgid "{ COMMANDS ; }" -msgstr "{ PARANCSOK }" +msgstr "{ PARANCSOK ; }" -#: builtins.c:204 -#, fuzzy +#: builtins.c:206 msgid "job_spec [&]" -msgstr "fg [munka_folyamat]" +msgstr "munkaszám [&]" -#: builtins.c:206 -#, fuzzy +#: builtins.c:208 msgid "(( expression ))" -msgstr "v�rhat� kifejez�s" +msgstr "(( kifejezés ))" -#: builtins.c:208 -#, fuzzy +#: builtins.c:210 msgid "[[ expression ]]" -msgstr "v�rhat� kifejez�s" +msgstr "[[ kifejezés ]]" -#: builtins.c:210 -#, fuzzy +#: builtins.c:212 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" +msgstr "variables - Néhány parancsértelmező-változó neve és jelentése" -#: builtins.c:213 -#, fuzzy +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "pushd [k�nyvt�r | +N | -N] [-n]" +msgstr "pushd [-n] [+N | -N | ktár]" -#: builtins.c:217 -#, fuzzy +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "popd [+N | -N] [-n]" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 -#, fuzzy +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o hossz� opci�k] optn�v [optn�v...]" +msgstr "shopt [-pqsu] [-o] [optnév ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +msgstr "printf [-v változó] formátum [argumentumok]" -#: builtins.c:229 +#: builtins.c:231 +#, fuzzy msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o beállítás] [-A művelet] [-G " +"globminta] [-W szólista] [-F függvény] [-C parancs] [-X szűrőminta] [-P " +"prefixum] [-S szuffixum] [név ...]" -#: builtins.c:233 +#: builtins.c:235 +#, fuzzy msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 beállítás] [-A művelet] [-G globminta] [-W " +"szólista] [-F függvény] [-C parancs] [-X szűrőminta] [-P prefixum] [-S " +"szuffixum] [szó]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "type [-apt] n�v [n�v ...]" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o beállítás] [-DEI] [név ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"mapfile [-d elválasztó] [-n szám] [-O kezdet] [-s szám] [-t] [-u fd] [-C " +"parancs] [-c távolság] [tömb]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"readarray [-d elválasztó] [-n szám] [-O kezdet] [-s szám] [-t] [-u fd] [-C " +"parancs] [-c távolság] [tömb]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2337,26 +2623,46 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 "" +"Aliasok definiálása vagy kiírása.\n" +" \n" +" Argumentumok nélkül az „alias” kiír egy újrahasználható listát a " +"meglévő\n" +" aliasokról „alias NÉV=ÉRTÉK' formában a szabványos kimenetre.\n" +" \n" +" Különben egy NÉV nevű aliast definiál ÉRTÉK értékkel. Az ÉRTÉK végén a\n" +" záró szóköz lehetővé teszi a következő szó számára is az\n" +" aliashelyettesítést.\n" +" \n" +" Kapcsolók:\n" +" -p\tkiír minden aliast a fenti formában\n" +" \n" +" Kilépési kód:\n" +" igazzal tér vissza, kivéve ha nincs megadott NÉV nevű alias definiálva." -#: builtins.c:276 -#, fuzzy +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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�" +msgstr "" +"Minden NÉV eltávolítása a definiált aliasok közül.\n" +" \n" +" Kapcsolók:\n" +" -a\tminden definíció törlése\n" +" \n" +" Sikeresen tér vissza, kivéve ha nincs megadott NÉV nevű alias." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2390,13 +2696,56 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" - -#: builtins.c:326 -#, fuzzy +"Readline billentyűkötések és változók beállítása.\n" +" \n" +" Egy billentyűsorozat hozzárendelése Readline függvényhez vagy makróhoz,\n" +" vagy Readline változó beállítása. A beállítás nélküli szintaxis " +"megegyezik\n" +" az ~/.inputrc-ben találhatóval, de kell legyen egy argumentuma:\n" +" pl. bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Kapcsolók:\n" +" -m kiosztás A KIOSZTÁS használata kiosztásként a parancs " +"hatásának\n" +" idejére. Elfogadható kiosztásnevek: emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-\n" +" move, vi-command és vi-insert.\n" +" -l Nevek és függvények listázása.\n" +" -P Függvénynevek és kötések listázása.\n" +" -p Függvények és kötések listázása újrahasználható\n" +" formában.\n" +" -S Makrókat végrehajtó billentyűkombinációk és " +"értékeik\n" +" listázása.\n" +" -s Makrókat végrehajtó billentyűkombinációk és " +"értékeik\n" +" listázása újrahasználható formában.\n" +" -V Változónevek és értékek listázása.\n" +" -v Változónevek és értékek listázása újrahasználható\n" +" formában.\n" +" -q függvénynév A függvényhez tartozó billentyűkombináció " +"lekérése.\n" +" -u függvénynév Össze adott függvényhez tartozó " +"billentyűkombináció\n" +" törlése.\n" +" -r billkomb A BILLKOMB-hoz tartozó kötések törlése.\n" +" -f fájlnév Kötések olvasása FÁJLNÉV fájlból.\n" +" -x billkomb:shell-parancs\tSHELL-PARANCS végrehajtása BILLKOMB-ra.\n" +" -X A -x használatával kötött billentyűkombinációk\n" +" és a társított parancsok kiírása, bemenetként\n" +" újrahasználható formában.\n" +" \n" +" Kilépési kód:\n" +" a bind 0-val tér vissza, ha nincs ismeretlen kapcsoló vagy hiba." + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2406,11 +2755,15 @@ msgid "" " 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." +"Kilépés a for, while vagy until ciklusokból.\n" +" \n" +" Kilépés egy FOR, WHILE vagy UNTIL ciklusból. Ha N meg van adva, akkor N\n" +" egymásba ágyazott ciklusból lép ki.\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód 0, ha N >= 1." -#: builtins.c:338 -#, fuzzy +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2420,10 +2773,15 @@ msgid "" " 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." +"A for, while vagy until ciklus újrakezdése.\n" +" \n" +" A következő iterációtól folytatja a FOR, WHILE vagy UNTIL ciklust.\n" +" Ha N meg van adva, akkor N egymásba ágyazott ciklusból lép ki.\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód 0, ha N >= 1." -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2434,10 +2792,19 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" +"Beépített parancsok végrehajtása.\n" +" \n" +" Végrehajtja SHELL-BUILTIN-t ARG argumentumokkal parancskeresés nélkül.\n" +" Ez akkor hasznos, ha felül szeretne definiálni egy beépített parancsot\n" +" függvényként, de ebből meg szeretné hívni az eredeti parancsot.\n" +" \n" +" Kilépési kód:\n" +" Továbbadja a SHELL-BUILTIN kilépési kódját vagy hamissal tér vissza,\n" +" ha nincs ilyen parancs." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2452,8 +2819,20 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" +"Az aktuális szubrutinhívás környezetének visszaadása.\n" +" \n" +" KIF nélkül \"$sor $fájlnév\" formátumú eredményt ad. A KIF-fel pedig\n" +" \"$sor $szubrutin $fájlnév\" formátumút; ez hasznos lehet stack trace\n" +" kiírásához.\n" +" \n" +" Az EXPR értéke azt adja meg, hogy a jelenlegihez képest milyen mélyre\n" +" lépjen vissza; a verem tetején a 0-s keret van.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, ha érvényes a KIF és valóban függvényt hajt végre a\n" +" parancsértelmező." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2476,23 +2855,71 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." -msgstr "" - -#: builtins.c:411 +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"A parancsértelmező munkakönyvtárának váltása.\n" +" \n" +" A munkakönyvtár átváltása a KTÁR-ra. Elhagyása esetén a HOME környezeti\n" +" változóban lévő könyvtárra vált.\n" +" \n" +" A CDPATH környezeti változó adja meg a KTÁR keresési útvonalait. Az\n" +" útvonalakat kettőspont (:) választja el. Egy üres könyvtárnév az " +"aktuális\n" +" könyvtárat jelenti. Ha a KTÁR „/” jellel kezdődik, a CDPATH értéke\n" +" nincs figyelembe véve.\n" +" \n" +" Ha a könyvtár nem létezik, és a „cdable_vars” parancsértelmező-" +"beállítás\n" +" aktív, a KTÁR változónévként lesz használva. Ha a változónak van\n" +" értéke, az lesz KTÁR-értékként használva.\n" +" \n" +" Kapcsolók:\n" +" -L\tszimbolikus linkek szigorú követése\n" +" -P\ta fizikai könyvtárfa használata a szimbolikus linkek követése\n" +" helyett: szimbolikus linkek feloldása a KTÁR-ban a „..” \n" +" \t\telőfordulásainak feldolgozása előtt\n" +" -e\tha a -P kapcsoló meg van adva, és az aktuális munkakönyvtár\n" +" \t\tnem határozható meg sikeresen, kilépés nem nulla állapottal\n" +" -@\taz azt támogató rendszereken a kibővített attribútumokkal\n" +" \t\trendelkező fájlok megjelenítése a fájlattribútumokat tartalmazó\n" +" \t\tkönyvtárként\n" +" \n" +" Az alapértelmezett a szimbolikus linkek követése, mintha „-L” lenne\n" +" megadva.\n" +" A „..” feldolgozása a közvetlenül előtte lévő útvonalnév-összetevő\n" +" eltávolításával történik, visszamenve egy osztásjelig vagy a KTÁR " +"kezdetéig.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, ha könyvtárat váltott és ha a -P használatakor a $PWD\n" +" sikeresen beállításra kerül; más értéket különben." + +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2501,9 +2928,20 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Az aktuális munkakönyvtár útvonalának kiírása.\n" +" \n" +" Kapcsolók:\n" +" -L\t$PWD értékének kiírása, ha az a munkakönyvtár érvényes neve\n" +" -P\ta fizikai könyvtár kiírása, szimbolikus linkek nélkül\n" +" \n" +" Az alapértelmezett a szimbolikus linkek követése, mintha „-L” lenne\n" +" megadva.\n" +" \n" +" Kilépési kód:\n" +" 0-val tér vissza, kivéve ha érvénytelen kapcsolót kapott vagy nem lehet\n" +" olvasni a munkakönyvtárat." -#: builtins.c:428 -#, fuzzy +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2511,25 +2949,39 @@ msgid "" " \n" " Exit Status:\n" " Always succeeds." -msgstr "Nem csin�l semmit ez a parancs. A visszat�r�si �rt�ke 0." +msgstr "" +"Nincs művelet.\n" +" \n" +" Nincs hatása, a parancs nem csinál semmit.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikeres." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Sikeres visszatérés.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikeres." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"Sikertelen visszatérés.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikertelen." -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2539,16 +2991,34 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Parancs végrehajtása vagy információk megjelenítése róla.\n" +" \n" +" Végrehajtja a PARANCS parancsot ARGUMENTUMOK argumentumokkal a\n" +" függvényfeloldás végrehajtása nélkül; vagy információt jelenít meg a\n" +" parancsról. Használható programok futtatására, ha azonos nevű függvény\n" +" létezik.\n" +" \n" +" Kapcsolók:\n" +" -p alapértelmezett érték használata PATH helyett, amely\n" +" garantáltan megtalál minden szabványos eszközt\n" +" -v egy leírást ad a PARANCS parancsról a „type” beépített\n" +" parancshoz hasonló módon\n" +" -V részletesebb leírást ad minden PARANCSRÓL\n" +" \n" +" Kilépési kód:\n" +" A PARANCS kilépési kódjával tér vissza, vagy hibát jelez, ha nem\n" +" található a PARANCS." -#: builtins.c:476 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2558,17 +3028,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2578,20 +3053,61 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." -msgstr "" - -#: builtins.c:512 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Változóértékek és attribútumok beállítása.\n" +" \n" +" Változók deklarálása és attribútumok megadása. Ha nincs NÉV megadva,\n" +" kiírja az összes változó attribútumait és értékét.\n" +" \n" +" Kapcsolók:\n" +" -f\tművelet és megjelenítés korlátozása függvénynevekre és\n" +" \t\t-definíciókra\n" +" -F\tmegjelenítés korlátozása függvénynevekre (és sor számára,\n" +" \t\tvalamint a forrásfájl nevére hibakereséskor)\n" +" -g\tglobális változók létrehozása parancsértelmező-függvényben való\n" +" \t\thasználatkor, egyébként figyelmen kívül marad\n" +" -p\tminden NÉV attribútumainak és értékének kiírása\n" +" \n" +" Attribútumokat állító kapcsolók:\n" +" -a\tNÉV indexelt tömbbé alakítása (ha támogatott)\n" +" -A\tNÉV asszociatív tömbbé alakítása (ha támogatott)\n" +" -i\tminden NÉV kapjon „integer” attribútumot\n" +" -l\tminden NÉV értékének kisbetűssé konvertálása értékadáskor\n" +" -n\ta NÉV hivatkozás legyen az értékében megadott változóra\n" +" -r\tminden NÉV legyen csak olvasható\n" +" -t\tminden NÉV kapjon „trace” attribútumot\n" +" -u\tminden NÉV értékének nagybetűssé konvertálása értékadáskor\n" +" -x\tminden NÉV exportálása\n" +" \n" +" A „-” helyett „+” használata kikapcsolja az adott attribútumot.\n" +" \n" +" Az integer attribútummal rendelkező változókhoz való értékadáskor\n" +" aritmetikai kiértékelés történik (lásd a „let” parancsot).\n" +" \n" +" Függvénytörzsben „declare”-t használva minden NÉV helyi lesz, hasonlóan\n" +" a „local” parancshoz. A „-g” kapcsoló elnyomja ezt a viselkedést.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap, vagy " +"értékadási\n" +" hiba történik." + +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Változóértékek és attribútumok beállítása.\n" +" \n" +" A „declare” szinonimája. Lásd: „help declare”." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2602,15 +3118,28 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Helyi változók definiálása.\n" +" \n" +" Egy NÉV nevű helyi változót hoz létre, és ÉRTÉK értéket ad neki.\n" +" A KAPCSOLÓ tetszőleges, a „declare” által elfogadott kapcsoló lehet.\n" +" \n" +" A helyi változók csak a függvényen belül használhatóak, nem láthatóak\n" +" az őket definiáló függvényen és annak gyermekein kívül.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap, értékadási\n" +" hiba történik, vagy nem függvényben lett hívva." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2622,6 +3151,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2629,15 +3159,53 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" - -#: builtins.c:571 +"Argumentumok szabványos kimenetre írása.\n" +" \n" +" Argumentumok és egy újsor kiírása a szabványos kimenetre.\n" +" \n" +" Kapcsolók:\n" +" -n\tne fűzzön hozzá újsort\n" +" -e\taz alábbi escape-szekvenciák értelmezése\n" +" -E\tescape-szekvenciák értelmezésének tiltása\n" +" \n" +" Az „echo”a következő visszaper-escape-karaktereket értelmezi:\n" +" \\a\tterminálcsengő\n" +" \\b\tvisszatörlés (backspace)\n" +" \\c\ttovábbi kimenet elnyelése\n" +" \\e\tescape-karakter\n" +" \\E\tescape-karakter\n" +" \\f\tlapdobás-karakter\n" +" \\n\tújsor-karakter\n" +" \\r\tkocsivissza-karakter\n" +" \\t\tvízszintes tabulátor\n" +" \\v\tfüggőleges tabulátor\n" +" \\\\\tvisszaper (\\)\n" +" \\0nnn\taz oktális NNN ASCII-kódú karakter. NNN 0–3\n" +" \t\toktális számjegy lehet\n" +" \\xHH\taz a 8 bites karakter, amelynek értéke HH\n" +" \t\t(hexadecimálisan). HH egy vagy két hexaszámjegy lehet\n" +" \\uHHHH\ta Unicode karakter, amely értéke a HHHH hexadecimális\n" +" \t\térték. A HHHH 1-4 hexaszámjegy lehet.\n" +" \\UHHHHHHHH a Unicode karakter, amely értéke a HHHHHHHH hexadecimális\n" +" \t\térték. A HHHHHHHH 1-8 hexaszámjegy lehet.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve írási hiba esetén." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2649,8 +3217,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Argumentumok szabványos kimenetre írása.\n" +" \n" +" Argumentumok és egy újsor kiírása a szabványos kimenetre.\n" +" \n" +" Kapcsolók:\n" +" -n\tne fűzzön hozzá újsort\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve írási hiba esetén." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2676,8 +3253,33 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Parancsértelmező beépített parancsainak engedélyezése és tiltása.\n" +" \n" +" Beépített parancsokat engedélyez és tilt. Egy parancs letiltásával az\n" +" elérési út beírása nélkül lehet beépített paranccsal megegyező nevű\n" +" programot futtatni.\n" +" \n" +" Kapcsolók:\n" +" -a\ta beépített parancsok és azok állapotának listázása\n" +" -n\tminden NÉV tiltása vagy a tiltott parancsok listázása\n" +" -p\ta beépített parancsokat listázza újrahasználható formában\n" +" -s\tcsak a Posix „special” beépített parancsokat listázza\n" +" \n" +" Dinamikus betöltést szabályozó kapcsolók:\n" +" -f\tNÉV nevű beépített parancs betöltése a FÁJLNÉV megosztott\n" +" \t\tobjektumfájlból\n" +" -d\tegy -f kapcsolóval betöltött parancs eltávolítása\n" +" \n" +" Kapcsolók nélkül minden NÉV engedélyezésre kerül\n" +" \n" +" A beépített parancs helyett a $PATH-ban található „test” használatához\n" +" használja az „enable -n test” parancsot.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a NÉV nem egy beépített parancs, vagy\n" +" hiba történt." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2688,8 +3290,16 @@ msgid "" " Exit Status:\n" " Returns exit status of command or success if command is null." msgstr "" +"Argumentumok végrehajtása parancsként.\n" +" \n" +" Az argumentumokat összefűzi, és az eredményt egy parancssorként hajtja\n" +" végre a parancsértelmező.\n" +" \n" +" Kilépési kód:\n" +" A parancs kilépési kódjával tér vissza, vagy sikerrel, ha üres a parancs." -#: builtins.c:626 +#: builtins.c:652 +#, fuzzy msgid "" "Parse option arguments.\n" " \n" @@ -2722,15 +3332,52 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +"Kapcsolók értelmezése.\n" +" \n" +" A getopts parancsot arra használják az eljárások, hogy pozicionális\n" +" paramétereket kapcsolókként értelmezzenek.\n" +" \n" +" A KAPCSOLÓK azokat a betűket tartalmazza, amelyeket fel kell ismerni.\n" +" Ha egy kapcsolót kettőspont követ, a kapcsoló kötelező paramétert vár.\n" +" Ezt a paramétert szóközzel kell elválasztani a kapcsolótól.\n" +" \n" +" Minden végrehajtáskor a getopts a $név változóba helyezi a következő\n" +" kapcsolót (szükség esetén inicializálva a változót). A kapcsoló indexe\n" +" az OPTIND változóba kerül. Az OPTIND változót a parancsértelmező " +"induláskor\n" +" 1-re inicializálja. Ha a kapcsolónak paramétere van, ennek értéke\n" +" az OPTARG változóba kerül.\n" +" \n" +" A getopts két módon tud hibát jelezni. Elnémítható a hibajelzés az " +"OPCIÓK\n" +" kettősponttal való kezdésével. Ebben a módban nem kerül kiírásra\n" +" hibaüzenet. Ha a getopts érvénytelen opciót talál, ezt az OPTARG\n" +" változóba írja. Ha hiányzik egy kötelező paraméter, a $név változóba " +"egy\n" +" kettőspont kerül, és a talált karakter az OPTARG-ba kerül.\n" +" Ha a getopts nincs néma módban, és érvénytelen kapcsolót talál, $NÉV-be\n" +" egy kérdőjel kerül, az OPTARG törlésre kerül, és hibaüzenetet ír ki.\n" +" \n" +" Ha az OPTERR változó 0-ra van állítva, a getopts letiltja a " +"hibaüzenetet,\n" +" akkor is, ha nem kettősponttal kezdődik az OPCIÓK. Az OPTERR alapértéke " +"1.\n" +" \n" +" A getopts alapvetően a pozicionális paramétereket értelmezi ($0–$9), de\n" +" több argumentum esetén mindet kezeli.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha kapcsolót talált, sikertelenül, ha elfogytak a\n" +" kapcsolók, vagy hiba történt." + +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2741,8 +3388,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2752,17 +3399,40 @@ msgid "" " Returns success unless COMMAND is not found or a redirection error " "occurs." msgstr "" +"A parancsértelmező felváltása a megadott paranccsal.\n" +" \n" +" A PARANCS végrehajtása, kicserélve a parancsértelmezőt a megadott\n" +" programmal. Az ARGUMENTUMOK lesznek a PARANCS argumentumai. Ha nincs\n" +" PARANCS megadva, a futó parancsértelmezőben kerülnek érvényesítésre\n" +" az átirányítások.\n" +" \n" +" Kapcsolók:\n" +" -a név\ta NÉV átadása a PARANCSNAK $0-ként\n" +" -c\ta PARANCS végrehajtása üres környezettel\n" +" -l\ta PARANCSNAK egy „-” átadása $0-ként\n" +" \n" +" Ha a parancs nem hajtható végre, a nem interaktív parancsértelmező " +"kilép,\n" +" kivéve, ha az „execfail” parancsértelmező-beállítás él.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve, ha a PARANCS nem található vagy sikertelen\n" +" az átirányítás." -#: builtins.c:689 -#, fuzzy +#: builtins.c:715 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 " +msgstr "" +"Kilépés a parancsértelmezőből.\n" +" \n" +" Kilép a parancsértelmezőből N kilépési kóddal. Ha az N hiányzik, az " +"utolsó\n" +" parancs kilépési kódjával lép ki." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2770,8 +3440,12 @@ msgid "" "executed\n" " in a login shell." msgstr "" +"Kilépés a bejelentkező parancsértelmezőből.\n" +" \n" +" Kilép a bejelentkező parancsértelmezőből az N kilépési kóddal. Hibával\n" +" tér vissza, ha nem bejelentkező parancsértelmezőből hívják." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2800,9 +3474,36 @@ msgid "" " Returns success or status of executed command; non-zero if an error " "occurs." msgstr "" +"Parancsok megjelenítése vagy végrehajtása az előzményből.\n" +" \n" +" Az fc segítségével lehet korábbi parancsokat kiírni, módosítani és " +"újból\n" +" végrehajtani.\n" +" Az ELSŐ és UTOLSÓ lehetnek egy tartományt meghatározó számok, vagy az " +"ELSŐ\n" +" lehet egy karakterlánc, amely az utolsó így kezdődő parancsot jelöli.\n" +" \n" +" Kapcsolók:\n" +" -e ENAME\tszerkesztő kiválasztása. Az alapértelmezett az FCEDIT,\n" +" \t\tmajd EDITOR, végül a vi\n" +" -l\tszerkesztés helyett a sorok listázása\n" +" -n\tsorok számának elhagyása listázáskor\n" +" -r\tsorrend megcserélése (legújabbakkal kezdi a listázást)\n" +" \n" +" Az „fc -s [minta=csere] [parancs]” formával PARANCS... újból " +"végrehajtásra\n" +" kerül, miután a régi=új behelyettesítés megtörtént.\n" +" \n" +" Hasznos lehet az „alias r='fc -s'” használata, mivel így pl. az „r cc”\n" +" parancs végrehajtja az utolsó „cc”-vel kezdődő parancsot, míg „r” meg-\n" +" ismétli az utolsó parancsot.\n" +" \n" +" Kilépési kód:\n" +" Sikert vagy a végrehajtott parancs kilépési kódját adja; nullától " +"eltérőt\n" +" hiba esetén." -#: builtins.c:738 -#, fuzzy +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2813,10 +3514,18 @@ msgid "" " 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." +"Munka előtérbe hozása.\n" +" \n" +" A MUNKASZÁM által meghatározott munkát az előtérbe hozza, az aktuális\n" +" munkává téve azt. Ha nincs MUNKASZÁM, a parancsértelmező által " +"megjegyzett\n" +" aktuális munkára vonatkozik a parancs.\n" +" \n" +" Kilépési kód:\n" +" Az előtérbe hozott parancs állapota (annak kilépésekor), vagy nem nulla\n" +" hiba esetén." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2829,8 +3538,18 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Munka háttérbe küldése.\n" +" \n" +" A MUNKASZÁM által meghatározott munkákat háttérbe küldi, mintha „&”\n" +" jellel a parancs végén lettek volna indítva. Ha nincs MUNKASZÁM, a\n" +" parancsértelmező által megjegyzett aktuális munkára vonatkozik a " +"parancs.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a munkakezelés le van tiltva, vagy\n" +" hiba történt." -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -2839,23 +3558,42 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"Programok helyének megjegyzése vagy megjelenítése.\n" +" \n" +" Meghatározza és megjegyzi minden megadott NÉV parancs teljes útvonalát.\n" +" Ha nincs NÉV megadva, az összes megjegyzett parancsot listázza.\n" +" \n" +" Kapcsolók:\n" +" -d\tminden megjegyzett NÉV helyének elfelejtése\n" +" -l\tbemenetként újrahasználható formátumban listázzon\n" +" -p útvonal\taz ÚTVONAL használata a NÉV teljes útvonalaként\n" +" -r\tminden megjegyzett hely elfelejtése\n" +" -t\tminden megadott NÉV megjegyzett helyének kiírása,\n" +" \t\ttöbb név esetén a helyek előtt a NÉV kiírása\n" +" Argumentumok:\n" +" NÉV\tMinden NÉV megkeresése a $PATH-ban, és hozzáadása a\n" +" \t\tmegjegyzettek listájához.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve, ha a NÉV nem található vagy érvénytelen\n" +" kapcsolót kap." + +#: builtins.c:818 +msgid "" "Display information about builtin commands.\n" " \n" " Displays brief summaries of builtin commands. If PATTERN is\n" @@ -2866,17 +3604,34 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " "given." msgstr "" +"Tájékoztatás megjelenítése beépített parancsokról.\n" +" \n" +" Rövid leírásokat jelenít meg a beépített parancsokról. Ha MINTA meg\n" +" van adva, részletes segítséget ad az összes illeszkedő parancsról,\n" +" különben a témákat listázza.\n" +" \n" +" Kapcsolók:\n" +" -d\tminden témáról rövid leírás listázása\n" +" -m\tman-szerű formátum használata\n" +" -s\tcsak rövid használati útmutató kiírása minden, a MINTÁNAK\n" +" \t\tmegfelelő témáról\n" +" \n" +" Argumentumok:\n" +" MINTA\tTémakört meghatározó minta\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha nincs találat vagy hibás kapcsolót kap." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2885,23 +3640,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -2909,8 +3665,42 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Az előzmények megjelenítése vagy módosítása.\n" +" \n" +" Megjeleníti az előzménylistát sorszámokkal, minden módosított " +"bejegyzést\n" +" az elején „*”-gal megjelölve. N megadása esetén az utolsó N\n" +" bejegyzést listázza.\n" +" \n" +" Kapcsolók:\n" +" -c\taz előzménylista törlése az összes bejegyzésének törlésével\n" +" -d eltolás\taz ELTOLÁS pozícióban lévő előzménybejegyzés törlése,\n" +" \t\ta negatív eltolások az előzménylista végétől számolnak vissza\n" +" -a\ta munkamenet előzménysorainak hozzáfűzése az előzményfájlhoz\n" +" -n\tminden olyan előzménysor beolvasása, amelyek még nem lettek\n" +" \t\tbeolvasva az előzményfájlból, és azok hozzáfűzése az\n" +" \t\telőzménylistához\n" +" -r\telőzményfájl beolvasása, és a tartalom hozzáfűzése az\n" +" \t\telőzménylistához\n" +" -w\taz aktuális előzmények előzményfájlba írása\n" +" \n" +" -p\telőzménykiegészítés végrehajtása minden ARGUMENTUMON, és az\n" +" \t\teredmény megjelenítése előzménylistán való tárolás nélkül\n" +" -s\tARGUMENTUMOK hozzáfűzése egyetlen bejegyzésként a listához\n" +" \n" +" Ha FÁJLNÉV is meg van adva, az lesz előzményfájlként használva. " +"Különben\n" +" a HISTFILE értéke, vagy ennek híján ~/.bash_history.\n" +" \n" +" Ha a HISTTIMEFORMAT változó be van állítva, és nem üres, akkor értéke\n" +" lesz használva az strftime(3) formátumparamétereként a kijelzett\n" +" bejegyzések időbélyegeinek megjelenítéséhez. Különben nem ír ki időt.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap, vagy hiba\n" +" történik." -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2919,8 +3709,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2933,8 +3723,29 @@ msgid "" " Returns success unless an invalid option is given or an error occurs.\n" " If -x is used, returns the exit status of COMMAND." msgstr "" +"Munkák állapotának megjelenítése.\n" +" \n" +" Listáz minden aktív munkát. MUNKASZÁM megadása esetén csak az adott\n" +" munka jelenik meg, különben az összes aktív.\n" +" \n" +" Kapcsolók:\n" +" -l\tfolyamatazonosítók megjelenítése a többi adaton túl\n" +" -n\tcsak azon folyamatok listázása, amelyek állapota változott\n" +" \t\taz utolsó értesítés óta\n" +" -p\tcsak folyamatazonosítók listázása\n" +" -r\tcsak a futó munkák megjelenítése\n" +" -s\tcsak a megállított munkák megjelenítése\n" +" \n" +" Ha -x meg van adva, PARANCS kerül futtatásra úgy, hogy minden " +"argumentum\n" +" a meghatározott munkához tartozó folyamatcsoport vezetőjének PID-jére\n" +" cserélődik.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha nem kap érvénytelen kapcsolót, és nem történik\n" +" hiba. -x használata esetén a PARANCS kilépési kódjával tér vissza." -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2944,14 +3755,29 @@ msgid "" " 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" +" \t\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 "" +"Munkák eltávolítása az aktuális parancsértelmezőből.\n" +" \n" +" Eltávolít minden MUNKASZÁM munkát az aktív munkák táblájából. A " +"MUNKASZÁM\n" +" megadása nélkül a parancsértelmező által megjegyzett aktuális\n" +" munkát távolítja el.\n" +" \n" +" Kapcsolók:\n" +" -a\tminden munka eltávolítása, ha nincs MUNKASZÁM megadva\n" +" -h\tminden MUNKASZÁM megjelölése úgy, hogy nem kell továbbadni\n" +" \t\tnekik a parancsértelmező által kapott SIGHUP-ot\n" +" -r\tcsak futó munkák eltávolítása\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha nem kap érvénytelen kapcsolót vagy MUNKASZÁMOT" -#: builtins.c:898 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2963,7 +3789,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2972,8 +3799,30 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Szignál küldése munkának.\n" +" \n" +" PID vagy MUNKASZÁM által meghatározott folyamatoknak a SZIGNÁL vagy\n" +" SZIGNÁLSZÁM szignál küldése. Ha sem a SZIGNÁL, sem a SZIGNÁLSZÁM nincs\n" +" megadva, akkor a SIGTERM az alapértelmezés.\n" +" \n" +" Kapcsolók:\n" +" -s sig\ta SIG egy szignálnév\n" +" -n sig\ta SIG egy szignálszám\n" +" -l\ta szignálnevek listázása; ha argumentumok követik a -l kapcsolót,\n" +" \t\takkor azok szignálszámoknak lesznek tekintve ahhoz, hogy mely\n" +" \t\tneveket kell listázni\n" +" -L\ta -l szinonimája\n" +" \n" +" A kill két okból beépített parancs: így lehetővé teszi munkaazonosítók\n" +" használatát folyamatazonosítók helyett, továbbá lehetségessé válik a\n" +" folyamatok kilövése, ha a folyamatok számának korlátja elérve.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha nem kap érvénytelen kapcsolót, vagy nem " +"történik\n" +" hiba." -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3015,10 +3864,49 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." -msgstr "" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Aritmetikai kifejezés kiértékelése.\n" +" \n" +" Minden ARGUMENTUM kiértékelése aritmetikai kifejezésként. A kiértékelés\n" +" fix szélességű egészek esetén túlcsordulás-ellenőrzés nélkül történik,\n" +" de a nullával való osztás hibát okoz. Az alábbi operátorok soronként\n" +" azonos precedenciaszinten vannak. A precedencia az alábbi sorrendben\n" +" csökken:\n" +" \n" +" \tid++, id--\tváltozó postfix-növelése, -csökkentése\n" +" \t++id, --id\tváltozó prefix-növelése, -csökkentése\n" +" \t-, +\t\tmínusz, plusz előjel\n" +" \t!, ~\t\tlogikai és bitenkénti negált\n" +" \t**\t\thatványozás\n" +" \t*, /, %\t\tszorzás, osztás, maradék\n" +" \t+, -\t\tösszeadás, kivonás\n" +" \t<<, >>\t\tbitenkénti eltolás balra, jobb\n" +" \t<=, >=, <, >\tösszehasonlítás\n" +" \t==, !=\t\tegyenlőség, egyenlőtlenség\n" +" \t&\t\tbitenkénti ÉS\n" +" \t^\t\tbitenkénti kizáró vagy (XOR)\n" +" \t|\t\tbitenkénti VAGY\n" +" \t&&\t\tlogikai ÉS\n" +" \t||\t\tlogikai VAGY\n" +" \tkif ? kif : kif\n" +" \t\t\tfeltételes operátor\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |= értékadás\n" +" \n" +" Parancsértelmező-változók is lehetnek operandusok. A változók nevének\n" +" helyére értékük kerül (fix szélességű egészként) a kifejezésben. Nem\n" +" kell a változók „integer” jellemzőjét beállítani a használathoz.\n" +" \n" +" Az operátorok a fenti precedencia szerint hajtódnak végre. A zárójeles\n" +" kifejezések precedenciája a legmagasabb – ez felülírja a szabályokat.\n" +" \n" +" Kilépési kód:\n" +" Ha az utolsó argumentum 0, a let 1-gyel tér vissza, különben 0-val." -#: builtins.c:966 +#: builtins.c:994 +#, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -3029,7 +3917,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3039,34 +3929,75 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" - -#: builtins.c:1009 +"Egy sor beolvasása a szabványos bemenetről, és mezőkre osztása.\n" +" \n" +" Egy sor beolvasása a szabványos bemenetről, vagy az FD fájlleíróból, ha\n" +" meg van adva a -u kapcsoló. A sor mezőkre lesz osztva a szódarabolás\n" +" szabályai szerint. Az első szó az első NÉV nevű változó értéke lesz, a\n" +" második a másodiké stb. A szóelválasztó karaktereket az $IFS adja meg.\n" +" \n" +" Ha nincs NÉV megadva, a beolvasott sor a REPLY változóba kerül.\n" +" \n" +" Kapcsolók:\n" +" -a tömb\ta beolvasott szavak TÖMB tömb 0-tól kezdve egymást követő\n" +" \t\tindexű elemeibe kerülnek\n" +" -d elválasztó\taz ELVÁLASZTÓ első karakteréig olvasson az újsor\n" +" \t\thelyett\n" +" -e\ta Readline használata a sor megszerzéséhez\n" +" -i szöveg\ta SZÖVEG használata kezdeti szövegként (Readline-hoz)\n" +" -n szám\tSZÁM karakter beolvasása után térjen vissza, ne várjon\n" +" \t\tújsorra, de vegye figyelembe az elválasztót, ha kevesebb\n" +" \t\tmint SZÁM karaktert olvasott be az elválasztóig\n" +" -N szám\tpontosan akkor térjen vissza, ha SZÁM karaktert olvasott\n" +" \t\tbe, kivéve az EOF elérését és az időtúllépést, az\n" +" \t\telválasztókat figyelmen kívül hagyva\n" +" -p prompt\tírja ki a PROMPT értékét olvasás előtt a sor elejére,\n" +" \t\tzáró újsor nélkül\n" +" -r\ttiltsa le a „\\” kezdetű escape-ek használatát\n" +" -s\tterminálról érkező bemenet ne visszhangozzon\n" +" -t idő\tIDŐ leteltével jelezzen hibát, ha nem tudott egy teljes\n" +" \t\tsort beolvasni. A $TMOUT változó értéke az alapértelmezett\n" +" \t\tidőkorlát. Az IDŐ lehet tizedestört is. Ha idő 0, csak akkor\n" +" \t\tlesz sikeres a beolvasás, ha az adott fájlleírón már\n" +" \t\tolvasható a bemenet. Időtúllépés esetén a kilépési kód >128\n" +" -u fd\tfájl beolvasása az FD. fájlleíróból a szabványos bemenet\n" +" \t\thelyett\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód nulla, kivéve ha EOF-ot ér a beolvasás, időtúllépéskor\n" +" (ekkor > 128) vagy érvénytelen fájlleíró megadásakor a -u kapcsolónak." + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3077,8 +4008,18 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Visszatér egy függvényből.\n" +" \n" +" Egy függvény vagy egy „source”-olt parancsfájl adott N kilépési kóddal\n" +" való visszatérését okozza. Ha N nincs megadva, az utolsó parancs " +"kilépési\n" +" kódjával tér vissza.\n" +" \n" +" Kilépési kód:\n" +" N-nel tér vissza, kivéve ha nem függvényből vagy parancsfájlból akar\n" +" visszatérni – ekkor sikertelenséget jelez." -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3144,9 +4085,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3159,8 +4104,92 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" - -#: builtins.c:1104 +"Parancsértelmező-beállítások és pozicionális paraméterek állítása, törlése.\n" +" \n" +" Parancsértelmező-attribútumok és pozicionális paraméterek értékeinek\n" +" módosítása, parancsértelmező-változók neveinek és értékeinek kiírása.\n" +" \n" +" Kapcsolók:\n" +" -a A módosított vagy létrehozott változó exportálásra jelölése\n" +" -b Munka befejezéséről azonnali értesítés\n" +" -e Azonnali kilépés, ha egy parancs nem nullával lép ki\n" +" -f Fájlnév-generálás (globbing) tiltása\n" +" -h Parancsok helyének megjegyzése használatkor\n" +" -k Minden értékadó argumentum a parancs környezetébe kerül, nem\n" +" csak a parancsot megelőzők\n" +" -m Munkakezelés engedélyezése\n" +" -n Parancsok beolvasása végrehajtás nélkül\n" +" -o kapcsolónév\n" +" Kapcsolónév szerinti változóállítás:\n" +" allexport mint -a\n" +" braceexpand mint -B\n" +" emacs emacs-szerű sorszerkesztés\n" +" errexit mint -e\n" +" errtrace mint -E\n" +" functrace mint -T\n" +" hashall mint -h\n" +" histexpand mint -H\n" +" history előzmények tárolásának engedélyezése\n" +" ignoreeof EOF esetén nem lép ki a parancsértelmező\n" +" interactive-comments\n" +" interaktív parancsokban is lehetnek megjegyzések\n" +" keyword mint -k\n" +" monitor mint -m\n" +" noclobber mint -C\n" +" noexec mint -n\n" +" noglob mint -f\n" +" nolog jelenleg elfogadott, de mellőzött\n" +" notify mint -b\n" +" nounset mint -u\n" +" onecmd mint -t\n" +" physical mint -P\n" +" pipefail egy csővezeték-parancs kilépési kódja az utolsó\n" +" nem nullával kilépett parancs kilépési kódja,\n" +" vagy 0, ha nem volt ilyen\n" +" posix a bash viselkedésének megváltoztatása, ha az\n" +" alapértelmezett nem felel meg a Posix\n" +" szabványnak\n" +" privileged mint -p\n" +" verbose mint -v\n" +" vi vi-szerű sorszerkesztés\n" +" xtrace mint -x\n" +" -p Mindig be van kapcsolva, ha a valós és effektív felhasználó nem\n" +" egyezik. Letiltja az $ENV fájl értelmezését és a " +"parancsértelmező-\n" +" függvények betöltését. A kapcsoló kikapcsolása az effektív\n" +" uid és gid valósra állítását okozza\n" +" -t Egyetlen parancs beolvasása és végrehajtás után kilépés\n" +" -u Nem létező változók behelyettesítése legyen hiba\n" +" -v Beolvasott parancsok kiírása olvasáskor (értelmezés előtt).\n" +" -x Parancsok kiírása végrehajtáskor (értelmezés után).\n" +" -B Szögleteszárójel-kiegészítés végrehajtása\n" +" -C Létező normál fájlok felülírásának tiltása kimenetátirányításnál\n" +" -E Az ERR csapdát öröklik a függvények\n" +" -H Felkiáltójeles előzményhelyettesítés engedélyezése. Interaktív\n" +" parancsértelmezőnél alapértelmezés\n" +" -P Parancsok végrehajtásánál szimbolikus linkek követésének tiltása\n" +" (például cd esetében)\n" +" -T A DEBUG és RETURN csapdát öröklik a függvények\n" +" -- A további argumentumok hozzárendelése a pozicionális " +"paraméterekhez.\n" +" Ha nincsenek további argumentumok, akkora a pozicionális " +"paraméterek\n" +" törlésre kerülnek.\n" +" - A további argumentumok pozicionális paraméterekhez rendelése\n" +" A -x és -v kapcsolók ki vannak kapcsolva.\n" +" \n" +" „-” helyett „+” használatával a kapcsolók tilthatóak. A kapcsolók a\n" +" parancsértelmező indításakor is állíthatóak. Az érvényben lévő " +"kapcsolók\n" +" a $- változóban vannak. A záró nem értelmezhető argumentumok " +"pozicionális\n" +" paraméterek lesznek (rendre $1, $2 ... $n). Ha nincs ARG, minden\n" +" parancsértelmező-változó kiírásra kerül.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót kap." + +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3169,6 +4198,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3179,8 +4210,28 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Parancsértelmező-változók és -függvények értékeinek és jellemzőinek " +"törlése.\n" +" \n" +" Minden NÉV nevű függvény vagy változó törlése.\n" +" \n" +" Kapcsolók:\n" +" -f\tminden NÉV függvény\n" +" -v\tminden NÉV változó\n" +" -n\tminden NÉV névhivatkozás, és a változó törlése az általa\n" +" \t\thivatkozott változó helyett\n" +" \n" +" Kapcsolók nélkül az unset először változót, sikertelenség esetén " +"függvényt\n" +" próbál törölni.\n" +" \n" +" Néhány változót nem lehet törölni, lásd „readonly”.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha hibás kapcsolót kap, vagy egy NÉV csak\n" +" olvasható." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3198,8 +4249,23 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Parancsértelmező-változók exportálás attribútumának beállítása.\n" +" \n" +" Minden NÉV automatikus környezeti változóvá exportálásra jelölése. Így\n" +" minden ezután kiadott parancs környezetében megjelenik. Ha az ÉRTÉK is\n" +" meg van adva, értékadás is történik.\n" +" \n" +" Kapcsolók:\n" +" -f\tparancsértelmező-függvényekre vonatkozzon\n" +" -n\texport attribútum eltávolítása minden NÉVRŐL\n" +" -p\tösszes exportált változó és függvény listázása\n" +" \n" +" Egy „--” argumentum letiltja a további kapcsolóértelmezést.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót vagy NEVET kap." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3211,15 +4277,33 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Parancsértelmező-változó változtathatatlannak jelölése.\n" +" \n" +" Minden NÉV csak olvashatóvá állítása. A továbbiakban a NEVEK értéke\n" +" értékadással nem változtatható. Ha ÉRTÉK is van megadva, az írásvédelem\n" +" bekapcsolása előtt értékadás is történik.\n" +" \n" +" Kapcsolók:\n" +" -a\tindexelt tömbváltozókra vonatkozik\n" +" -A\tasszociatív tömbváltozókra vonatkozik\n" +" -f\tfüggvényekre vonatkozik\n" +" -p\taz összes csak olvasható változó vagy függvény listázása\n" +" \t\taz -f kapcsoló megadásától függően\n" +" \n" +" Egy „--” argumentum letiltja a további kapcsolóértelmezést.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha érvénytelen kapcsolót vagy NEVET kap." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3229,8 +4313,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Pozicionális paraméterek eltolása.\n" +" \n" +" Az $N+1, $N+2... pozicionális paraméterek átnevezése $1, $2... névre.\n" +" Ha nincs N megadva, értéke 1 lesz.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha N negatív vagy nagyobb mint $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3243,8 +4334,19 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"Parancsok végrehajtása fájlból a futó parancsértelmezőben.\n" +" \n" +" A FÁJLNÉV fájlból a parancsok beolvasása és végrehajtása. A fájlnév\n" +" megtalálásához a $PATH által felsorolt könyvtárakban keres. Az " +"ARGUMENTUMOK\n" +" pozicionális paraméterek lesznek a FÁJLNÉV végrehajtásakor.\n" +" \n" +" Kilépési kód:\n" +" A FÁJLNÉV utolsó parancsának kilépési kódjával tér vissza; " +"sikertelenül,\n" +" ha a FÁJLNÉV nem olvasható." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3257,15 +4359,30 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Parancsvégrehajtás felfüggesztése.\n" +" \n" +" A futó parancsértelmező végrehajtásának felfüggesztése SIGCONT szignál\n" +" érkezéséig. Ha nincs erőltetve, bejelentkezési parancsértelmező nem\n" +" függeszthető fel.\n" +" \n" +" Kapcsolók:\n" +" -f\tfelfüggesztés erőltetése bejelentkezési parancsértelmezőn is\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a munkakezelés nem támogatott vagy hiba\n" +" történt." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3319,6 +4436,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3334,18 +4454,98 @@ msgid "" " 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 +"Feltételes kifejezések kiértékelése.\n" +" \n" +" 0-val (igaz) vagy 1-gyel (hamis) lép ki a KIFEJEZÉS értékétől függően.\n" +" A kifejezéseknek egy vagy két operandusa lehet. Az egyoperandusú " +"kifejezések\n" +" többnyire fájlok állapotát vizsgálják. Karakterláncokat és\n" +" számokat is lehet összehasonlítani.\n" +" \n" +" Fájloperátorok:\n" +" \n" +" -a FÁJL Igaz, ha a fájl létezik.\n" +" -b FÁJL Igaz, ha a fájl blokkeszköz.\n" +" -c FÁJL Igaz, ha a fájl karakteres eszköz.\n" +" -d FÁJL Igaz, ha a fájl könyvtár.\n" +" -e FÁJL Igaz, ha a fájl létezik.\n" +" -f FÁJL Igaz, ha a fájl létezik és normál fájl.\n" +" -g FÁJL Igaz, ha a fájl SETGID jogosultságú.\n" +" -h FÁJL Igaz, ha a fájl szimbolikus link.\n" +" -L FÁJL Igaz, ha a fájl szimbolikus link.\n" +" -k FÁJL Igaz, ha a fájlnak „sticky” bitje (t-bitje) van.\n" +" -p FÁJL Igaz, ha a fájl egy elnevezett csővezeték.\n" +" -r FÁJL Igaz, ha a fájl olvasható a felhasználó számára.\n" +" -s FÁJL Igaz, ha a fájl létezik és nem üres.\n" +" -S FÁJL Igaz, ha a fájl egy foglalat (socket).\n" +" -t FD Igaz, ha a fájlleíró egy terminál.\n" +" -u FÁJL Igaz, ha a fájl SETUID jogosultságú.\n" +" -w FÁJL Igaz, ha a fájl írható a felhasználó számára.\n" +" -x FÁJL Igaz, ha a fájl végrehajtható a felhasználó számára.\n" +" -O FÁJL Igaz, ha a fájl effektíven a felhasználó tulajdona.\n" +" -G FÁJL Igaz, ha a fájl effektíven a csoport tulajdona.\n" +" -N FÁJL Igaz, ha a fájl módosult utolsó olvasása óta.\n" +" \n" +" FÁJL1 -nt FÁJL2 Igaz, ha fájl1 újabb fájl2-nél (a módosítási dátum\n" +" alapján).\n" +" \n" +" FÁJL1 -ot FÁJL2 Igaz, ha fájl1 régebbi fájl2-nél.\n" +" \n" +" FÁJL1 -ef FÁJL2 Igaz, ha fájl1 hard link fájl2-re.\n" +" \n" +" Karakterlánc-operátorok:\n" +" \n" +" -z SZÖVEG Igaz, ha SZÖVEG üres.\n" +" \n" +" -n SZÖVEG Igaz, ha SZÖVEG nem üres.\n" +" \n" +" SZÖVEG1 = SZÖVEG2\n" +" Igaz, ha a két SZÖVEG egyezik.\n" +" SZÖVEG1 != SZÖVEG2\n" +" Igaz, ha a két SZÖVEG nem egyezik.\n" +" SZÖVEG1 < SZÖVEG2\n" +" Igaz, ha SZÖVEG1 SZÖVEG2 előtt van a betűrendben.\n" +" SZÖVEG1 > SZÖVEG2\n" +" Igaz, ha SZÖVEG1 SZÖVEG2 után van a betűrendben.\n" +" \n" +" További operátorok:\n" +" \n" +" -o BEÁLLÍTÁS Igaz, ha a parancsértelmező-beállítás engedélyezve\n" +" van.\n" +" -v VÁLT Igaz, ha a VÁLT parancsértelmező-változó be van " +"állítva.\n" +" -R VÁLT Igaz, ha a VÁLT parancsértelmező-változó be van " +"állítva,\n" +" és névhivatkozás.\n" +" ! KIF Igaz, ha KIF hamis.\n" +" KIF1 -a KIF2 Igaz, ha KIF1 ÉS KIF2 is igaz.\n" +" KIF1 -o KIF2 Igaz, ha KIF1 VAGY KIF2 igaz.\n" +" \n" +" arg1 OP arg2 Aritmetikai összehasonlítások. OP lehet: -eq, -ne,\n" +" -lt, -le, -gt vagy -ge.\n" +" \n" +" A kétoperandusú aritmetikai operátorok igazat adnak, ha ARG1 rendre\n" +" egyenlő, nem egyenlő, kisebb, kisebb vagy egyenlő, nagyobb, nagyobb\n" +" vagy egyenlő, mint ARG2.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha a KIF igaz; sikertelenséggel, ha a KIF hamis, " +"vagy\n" +" érvénytelen argumentumokat kap." + +#: builtins.c:1344 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." +"Feltételes kifejezések kiértékelése.\n" +" \n" +" Ez a „test” beépített parancs szinonimája, de annyiban eltér tőle,\n" +" hogy az utolsó argumentuma „]” kell legyen – a nyitó „]”-lel összhangban." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3356,8 +4556,15 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" +"Végrehajtási idők kiírása.\n" +" \n" +" Megjeleníti a kumulált felhasználói- és rendszergépidőt, amelyet a\n" +" parancsértelmező és gyermekfolyamatai használtak.\n" +" \n" +" Kilépési kód:\n" +" Mindig sikeres." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3373,7 +4580,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3392,8 +4607,47 @@ msgid "" " Returns success unless a SIGSPEC is invalid or an invalid option is " "given." msgstr "" - -#: builtins.c:1352 +"Szignálok és más események elfogása.\n" +" \n" +" Meghatároz és aktivál eseménykezelőket, amelyek szignálok érkezésekor\n" +" vagy más körülmények bekövetkezésekor futnak.\n" +" \n" +" Az ARG az a parancs, amelyet a parancsértelmező beolvas és végrehajt a\n" +" SZIGNÁLOK bekövetkezésekor. Ha az ARG hiányzik (és egy SZIGNÁL van\n" +" megadva) vagy az ARG egy „-”, akkor minden szignálkezelő visszaáll az\n" +" alapértelmezett viselkedésre. Ha az ARG üres, akkor a megadott " +"SZIGNÁLOK\n" +" bekövetkezésekor nem történik semmi a parancsértelmezőben és új\n" +" gyermekfolyamataiban.\n" +" \n" +" Ha a SZIGNÁL értéke EXIT (0), az ARG a parancsértelmezőből való " +"kilépéskor\n" +" fut. Ha értéke DEBUG, az ARG minden parancs előtt fut. Ha a SZIGNÁL " +"értéke\n" +" RETURN, az ARG a . vagy source kulcsszó használatával futtatott " +"függvény\n" +" vagy parancsfájl befejeződésekor fut le. Ha az érték ERR, akkor az ARG " +"a\n" +" parancsok olyan hibáikor fut le, amikor a parancsértelmező kilépne a -e\n" +" kapcsoló használatakor.\n" +" \n" +" Argumentumok nélkül a trap kilistázza az összes szignált és parancsot.\n" +" \n" +" Kapcsolók:\n" +" -l\ta rendszeren érvényes szignálnevek és sorszámaik kilistázása\n" +" -p\tkilistázza a trap által beállított eseménykezelőket\n" +" \n" +" A SZIGNÁL értéke a -ban megtalálható szignálnév vagy szám.\n" +" A szignálnevek kis- és nagybetűkre érzéketlenek, a SIG előtag " +"elhagyható.\n" +" Szignált a parancsértelmezőnek a „kill -szignál $$” paranccsal\n" +" lehet küldeni.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a SZIGNÁL érvénytelen, vagy érvénytelen\n" +" kapcsolót kap." + +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3402,18 +4656,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3422,8 +4676,31 @@ msgid "" " Returns success if all of the NAMEs are found; fails if any are not " "found." msgstr "" +"Tájékoztatás egy parancs típusáról.\n" +" \n" +" Minden NÉV esetén kiírja, hogy hogy lenne értelmezve parancsnévként.\n" +" \n" +" Kapcsolók:\n" +" -a\tminden NÉVRE illeszkedő futtatható parancs felsorolása,\n" +" \t\tbeleértve az aliasokat, beépített parancsokat, és a\n" +" \t\tfüggvényeket (ha „-p” nem tiltja)\n" +" -f\tfüggvényeket ne keressen\n" +" -P\tcsak a PATH-ban keresse a NEVET, akkor is, ha van ilyen nevű\n" +" \t\talias, parancs vagy függvény\n" +" -p\ta végrehajtható fájl nevét írja ki, ha amely végrehajtódna\n" +" \t\ta parancs kiadásakor. Ha ez nem fájl lenne, nem ír ki semmit\n" +" -t\tegyetlen szót ír ki, amely NÉV típusát jelzi: „alias”,\n" +" \t\t„keyword” (kulcsszó), „function” (függvény), „builtin”\n" +" \t\t(beépített parancs), „file” (fájl) vagy „” (nem található)\n" +" \n" +" Kapcsolók:\n" +" NÉV\tÉrtelmezendő parancsnév.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, ha minden NÉV megtalálható, sikertelenül, ha nem." -#: builtins.c:1383 +#: builtins.c:1432 +#, fuzzy msgid "" "Modify shell resource limits.\n" " \n" @@ -3441,6 +4718,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3452,6 +4730,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3466,8 +4749,54 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1428 +"Parancsértelmező erőforráskorlátjainak beállítása.\n" +" \n" +" Szabályozási lehetőséget ad a parancsértelmező által elérhető " +"erőforrások\n" +" korlátozásához, ha a rendszer támogatja.\n" +" \n" +" Kapcsolók:\n" +" -S\ta puha (soft) korlátozás használata\n" +" -H\ta kemény (hard) korlátozás használata\n" +" -a\taz összes aktuális korlátozás kilistázása\n" +" -b\tfoglalatok (socket) puffermérete\n" +" -c\tcore fájlok maximális mérete (0 tiltja)\n" +" -d\tfolyamatok maximális adatszegmens-mérete\n" +" -e\ta maximális ütemezési prioritás (nice)\n" +" -f\ta parancsértelmező és gyermekei által írható legnagyobb fájl\n" +" -i\tvárakozó szignálok maximális száma\n" +" -k\ta folyamathoz lefoglalt kqueue-k maximális száma\n" +" -l\tfolyamatonként foglalható memória maximális mérete\n" +" -m\ta maximálisan operatív memóriában tartható terület mérete\n" +" -n\tnyitott fájlleírók maximális száma\n" +" -p\ta csővezetékpuffer mérete\n" +" -q\ta POSIX üzenetsorokban tartható byte-ok száma\n" +" -r\ta maximális valós idejű ütemezési prioritás\n" +" -s\tmaximális veremméret\n" +" -t\tmaximális processzoridő másodpercekben\n" +" -u\tfelhasználói folyamatok maximális száma\n" +" -v\tvirtuális memória mérete\n" +" -x\tfájlzárolások maximális száma\n" +" -P\tpszeudoterminálok maximális száma\n" +" -T\tszálak maximális száma\n" +" \n" +" Nem minden kapcsoló érhető el minden platformon.\n" +" \n" +" Ha a KORLÁT meg van adva, az lesz az új értéke a megadott erőforrásnak.\n" +" Speciális KORLÁT-értékek: „hard” (jelenlegi kemény korlát értéke),\n" +" „soft” (jelenlegi puha korlát értéke) és „unlimited” (korlátozás " +"nélkül).\n" +" Ha nincs kapcsoló megadva, -f az alapértelmezett.\n" +" \n" +" Az értékek 1024 byte-os egységekben értendőek, kivéve a -t, amely\n" +" másodpercekben, a -p, amely 512 byte-okban, valamint a -u, amely " +"darabban\n" +" értendő.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen kapcsoló vagy hiba esetében." + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3484,39 +4813,103 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"A fájlmódmaszk kiírása vagy beállítása.\n" +" \n" +" Beállítja a fájllétrehozási maszkot a MÓDRA. Ha a MÓD hiányzik, az\n" +" aktuális értékét írja ki.\n" +" Fájlok létrehozásakor az alapértelmezett jogokból ki lesznek maszkolva\n" +" az itt megadott bitek. Ez nem akadályozza meg, hogy a program vagy a\n" +" felhasználó később megváltoztassa a fájl jogait.\n" +" \n" +" Ha a MÓD számjeggyel kezdődik, oktális számként lesz értelmezve; " +"egyébként\n" +" a chmod(1) által használt szimbolikus formátumban.\n" +" \n" +" Kapcsolók:\n" +" -p\tha a MÓD hiányzik, a kimenet újrahasználható formátumban legyen\n" +" -S\ta kimenet használja a szimbolikus formát (különben oktálisat)\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, kivéve ha a MÓD vagy egy kapcsoló érvénytelen." -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Munka befejezésének megvárása, és a kilépési kód visszaadása.\n" +" \n" +" Az ID számú folyamat befejezésére vár, majd jelzi a kilépési kódját.\n" +" Az ID lehet egy PID vagy egy %MUNKASZÁM. Ha az ID nincs megadva, minden\n" +" aktív gyermekfolyamat befejezését bevárja, és nullával tér vissza. Ha " +"az\n" +" ID munkaszám, a csővezeték összes folyamatát bevárja.\n" +" \n" +" Ha a -n kapcsoló meg van adva, megvárja a következő feladat " +"befejezését,\n" +" és annak kilépési kódját adja vissza.\n" +" \n" +" Ha a -f kapcsoló meg van adva és a munkakezelés engedélyezve van, akkor\n" +" megvárja a megadott azonosító befejezését, ahelyett hogy arra várna az\n" +" az állapot megváltoztatásához.\n" +" \n" +" Kilépési kód:\n" +" ID kilépési kódjával tér vissza; érvénytelen ID vagy kapcsoló esetén\n" +" sikertelenül." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" +"Folyamat befejezésének megvárása, és a kilépési kód visszaadása.\n" +" \n" +" A PID számú folyamat befejezésére vár, majd jelzi a kilépési kódját.\n" +" Ha nincs megadva PID, minden aktív gyermekfolyamatot bevár, és nullával\n" +" tér vissza. A PID egy folyamatazonosító kell legyen.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó PID kilépési kódjával tér vissza; érvénytelen PID vagy " +"kapcsoló\n" +" esetén sikertelenül." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3528,8 +4921,17 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Egy lista minden elemére parancs végrehajtása.\n" +" \n" +" A „for” ciklus végrehajt egy parancssorozatot a megadott listán. Ha az\n" +" „in SZAVAK ...;” rész hiányzik, „in \"$@\"” az alapértelmezés. Minden\n" +" iterációnál a NÉV értéke a SZAVAK lista megfelelő elemére lesz állítva,\n" +" és így futnak le a PARANCSOK.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3545,8 +4947,22 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Aritmetikai for-ciklus.\n" +" \n" +" Ekvivalens a következővel:\n" +" \t(( KIF1 ))\n" +" \twhile (( KIF2 )); do\n" +" \t\tPARANCSOK\n" +" \t\t(( KIF3 ))\n" +" \tdone\n" +" A KIF1, KIF2 és KIF3 aritmetikai kifejezések. Ha valamelyik el van " +"hagyva,\n" +" akkor úgy működik, mintha értéke 1 lenne.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3565,8 +4981,24 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Szavak kiválasztása egy listából, és egy parancs végrehajtása rá.\n" +" \n" +" A SZAVAK kiértékelésre kerülnek, és egy szólistát képeznek. A szavak a\n" +" szabványos hibakimenetre kerülnek soronként, sorszámozva. Ha az\n" +" „in SZAVAK ...;” rész hiányzik, „in \"$@\"” az alapértelmezés. Ezután\n" +" megjelenik a PS3 prompt, és egy sorszámot vár a szabványos bemeneten.\n" +" Érvényes sorszám megadásakor a PARANCSOKAT végrehajtja úgy, hogy a NÉV\n" +" a megfelelő sorszámú elem értékét kapja. Ha a sor üres, újból " +"megjelennek\n" +" a SZAVAK és a prompt, és újból lehet választani. A parancs EOF bemenet\n" +" esetén fejeződik be. Bármely más érték beolvasásakor a NÉV null lesz.\n" +" A beolvasott sor a REPLY változóba kerül. A PARANCSOK minden választás\n" +" után végrehajtásra kerülnek egy break parancs végrehajtásáig.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3581,9 +5013,22 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"A csővezeték végrehajtási idejének kiírása.\n" +" \n" +" A CSŐVEZETÉK végrehajtása és egy összefoglaló kiírása a végrehajtás " +"közben\n" +" eltelt valós időről, a használt felhasználói- és rendszergépidőkről\n" +" a CSŐVEZETÉK befejeződésekor.\n" +" \n" +" Kapcsolók:\n" +" -p\taz összefoglaló megjelenítése a hordozható POSIX formában\n" +" \n" +" A TIMEFORMAT változó értéke felhasználásra kerül a kimenet formázásakor\n" +" \n" +" Kilépési kód:\n" +" A kilépési kód a CSŐVEZETÉK kilépési kódja lesz." -#: builtins.c:1551 -#, fuzzy +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3592,9 +5037,18 @@ msgid "" " \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" +msgstr "" +"Parancsok végrehajtása mintaillesztés alapján.\n" +" \n" +" A PARANCSOK végrehajtása azon SZAVAKON, amelyek illeszkednek a MINTÁRA.\n" +" Több mintát „|” jellel lehet elválasztani. A minták a fájlnév-" +"helyettesítés\n" +" formátumát használják.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3614,32 +5068,62 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Parancsok végrehajtása feltételesen.\n" +" \n" +" Az „if PARANCSOK” lista végrehajtásra kerül. Ha kilépési kódja nulla,\n" +" akkor a „then PARANCSOK” lista kerül végrehajtásra. Ha nem, akkor az\n" +" első nullával kilépő „elif PARANCSOK” listához tartozó „then PARANCSOK”\n" +" lista kerül végrehajtásra. Ha egyik sem teljesül, az „else\n" +" PARANCSOK” lista kerül végrehajtásra. Az egész szerkezet kilépési kódja\n" +" az utoljára végrehajtott parancs kilépési kódja, vagy nulla, ha nem\n" +" teljesült egyik feltétel sem.\n" +" \n" +" Kilépési kód:\n" +" Az utoljára végrehajtott parancs kilépési kódja." -#: builtins.c:1580 +#: builtins.c:1648 #, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" 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 " +msgstr "" +"Parancsok végrehajtása amíg a feltétel teljesül.\n" +" \n" +" A PARANCSOK végrehajtása addig, amíg a „while PARANCSOK” utolsó " +"parancsa\n" +" nullával lép ki.\n" +" \n" +" Kilépési kód:\n" +" Az utolsónak végrehajtott parancs kilépési kódja." -#: builtins.c:1592 +#: builtins.c:1660 #, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" 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 " +msgstr "" +"Parancsok végrehajtása amíg a feltétel nem teljesül.\n" +" \n" +" A PARANCSOK értelmezése és végrehajtása addig, amíg az „until " +"PARANCSOK”\n" +" utolsó parancsa nem nullával lép ki.\n" +" \n" +" Kilépési kód:\n" +" Az utolsónak végrehajtott parancs kilépési kódja." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3649,10 +5133,19 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Egy NÉV nevű társfolyamat létrehozása.\n" +" \n" +" PARANCS aszinkron végrehajtása, a parancs szabványos ki- és bemenetének\n" +" átirányításával egy-egy csővezetékbe, amelyek fájlleírói a NÉV tömb-\n" +" változó 0-s és 1-es elemeibe kerülnek a végrehajtó parancsértelmezőben.\n" +" Az alapértelmezett NÉV: „COPROC”.\n" +" \n" +" Kilépési kód:\n" +" A coproc parancs 0-s kilépési kóddal tér vissza." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3665,9 +5158,18 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is readonly." msgstr "" +"Parancsértelmező-függvény definiálása.\n" +" \n" +" Létrehoz egy NÉV nevű függvényt. Ha a NÉV parancsként végrehajtásra\n" +" kerül, a PARANCSOK futnak a hívó parancsértelmező környezetében. A NÉV\n" +" hívásakor az argumentumok a függvényből $1...$n néven érhetőek el, míg " +"a\n" +" függvény neve $FUNCNAME-ként.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha a NÉV csak olvasható." -#: builtins.c:1632 -#, fuzzy +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3676,9 +5178,16 @@ msgid "" " \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" +msgstr "" +"Parancsok csoportosítása egy egységgé.\n" +" \n" +" Egy csoportként hajt végre egy parancssorozatot. Ez egy módja a ki- és\n" +" bemenetek parancshalmazba való átirányításának.\n" +" \n" +" Kilépési kód:\n" +" Az utolsó parancs kilépési kódját adja vissza." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3691,19 +5200,37 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" +"Egy munka előtérbe hozása.\n" +" \n" +" Megegyezik az „fg” parancs MUNKASZÁM argumentumával. Egy megszakított\n" +" vagy háttérben futó munkát hoz előtérbe. A MUNKASZÁM lehet munkanév " +"vagy\n" +" munkaazonosító is. Egy záró „&” megadása a munkát háttérbe küldi, mint\n" +" a „bg” parancs.\n" +" \n" +" Kilépési kód:\n" +" A visszaállított parancs kilépési kódjával lép ki." -#: builtins.c:1659 +#: builtins.c:1727 +#, fuzzy msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"Aritmetikai kifejezések kiértékelése.\n" +" \n" +" A KIFEJEZÉS az aritmetikai kiértékelés szabályai szerint kerül\n" +" kiértékelésre. Megegyezik a „let KIFEJEZÉS” paranccsal.\n" +" \n" +" Kilépési kód:\n" +" 1-gyel tér vissza, ha KIFEJEZÉS értéke 0, különben 0-val." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3730,8 +5257,29 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" +"Feltételes parancs végrehajtása.\n" +" \n" +" 0 vagy 1 kilépési kódot ad a KIFEJEZÉS kiértékelésének eredményétől\n" +" függően. A kifejezések a „test” parancs által használt primitívekből\n" +" épülnek fel, és a következő operátorokkal keverhetőek.\n" +" \n" +" ( KIFEJEZÉS )\tA KIFEJEZÉS értékét adja vissza\n" +" ! KIFEJEZÉS\tIgaz, ha a KIFEJEZÉS hamis\n" +" KIF1 && KIF2\tIgaz, ha KIF1 és KIF2 is igaz\n" +" KIF1 || KIF2\tIgaz, ha KIF1 vagy KIF2 igaz\n" +" \n" +" Az „==” és „!=” operátorok használatánál a jobbérték mintaként\n" +" értelmeződik, és fájlnévillesztés történik. A hasonlóan működő „=~”\n" +" operátor használatakor a jobbérték reguláris kifejezésként kerül\n" +" illesztésre.\n" +" \n" +" Az „&&” és „||” operátorok rövidzár tulajdonságúak, vagyis KIF2-t nem\n" +" értékelik ki, ha KIF1-ből is megállapítható a kifejezés értéke.\n" +" \n" +" Kilépési kód:\n" +" 0 vagy 1 a KIFEJEZÉSTŐL függően." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3784,8 +5332,55 @@ msgid "" " 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 +"Közös parancsértelmező-változók és használatuk.\n" +" \n" +" BASH_VERSION\tVerzióadatok erről a Bash-ről\n" +" CDPATH\tKettőspontokkal elválasztott könyvtárlista, amelyekben a\n" +" \t\t„cd” keres\n" +" GLOBIGNORE\tKettőspontokkal elválasztott mintalista, amelyekre\n" +" \t\tilleszkedő nevű fájlok nem kerülnek útvonal-kiegészítésre\n" +" HISTFILE\tA parancselőzményeket tároló fájl neve\n" +" HISTFILESIZE\tAz előzményfájl maximális hossza sorokban\n" +" HISTSIZE\tA parancsértelmező által kezelt előzménysorok maximális\n" +" \t\tszáma\n" +" HOME\tA saját könyvtár teljes abszolút útvonala\n" +" HOSTNAME\tA parancsértelmezőt futtató gép neve\n" +" HOSTTYPE\tA Bash-t futtató CPU típusa\n" +" IGNOREEOF\tA parancsértelmező viselkedését állítja, hogy mit tegyen,\n" +" \t\tha egy sor elején EOF karaktert kap bemenetén. Ha ez a változó\n" +" \t\tlétezik, az értékében megadott számú EOF karaktert nem\n" +" \t\tvesz figyelembe (alapértelmezetten 10). Ha nincs beállítva,\n" +" \t\tEOF-ra kilép a parancsértelmező\n" +" MACHTYPE\tA Bash-t futtató gépet leíró karakterlánc\n" +" MAILCHECK\tMegadott számú másodpercenként keres a Bash új leveleket\n" +" MAILPATH\tKettőspontokkal elválasztott fájlnévlista, ahol a Bash\n" +" \t\túj leveleket keres\n" +" OSTYPE\tA Bash-t futtató gépen futó UNIX-változat neve (verziója)\n" +" PATH\tKettőspontokkal elválasztott könyvtárlista, amelyekben a\n" +" \t\tBash futtatható programokat keres parancsvégrehajtáskor\n" +" PROMPT_COMMAND\tAz elsődleges prompt kiírása előtt végrehajtandó\n" +" \t\t\tparancs\n" +" PS1\t\tAz elsődleges prompt\n" +" PS2\t\tA másodlagos prompt\n" +" PWD\t\tAz aktuális könyvtár teljes útvonala\n" +" SHELLOPTS\tAz engedélyezett parancsértelmező-beállítások " +"kettőspontokkal\n" +" \t\telválasztott listája\n" +" TERM\tAz aktuális termináltípus neve\n" +" TIMEFORMAT\tA „time” parancs által használt időformátum\n" +" auto_resume\tNem üres érték esetén egy egy szóból álló parancs először\n" +" \t\ta megszakított munkák nevei között lesz keresve. Találat\n" +" \t\tesetén a munka előtérbe kerül. „exact” érték esetén\n" +" \t\tpontosan megegyező nevet keres, „substring” esetén tetszőleges\n" +" \t\tegyezést, minden más érték esetén a szó elején keres\n" +" histchars\tElőzménykiegészítést és gyors cserét vezérlő karaktereket\n" +" \t\tad meg. Az első karakter az előzménybehelyettesítő karakter\n" +" \t\t(általában „!”), a második a gyorscsere-karakter (általában\n" +" \t\t„^”), a harmadik pedig az előzménymegjegyzés (általában „#”)\n" +" HISTIGNORE\tKettőspontokkal elválasztott mintalista, amely mintákra\n" +" \t\tilleszkedő parancsok nem kerülnek az előzmények közé\n" + +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3795,19 +5390,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3815,8 +5410,35 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Könyvtárak verembe tétele.\n" +" \n" +" Egy könyvtárat tesz a könyvtárverem tetejére, vagy forgatja a vermet,\n" +" az új felső elemmé a jelenlegi munkakönyvtárat téve. Argumentumok\n" +" nélkül hívva a két felső könyvtárat cseréli meg.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat hozzáadáskor, vagyis csak a\n" +" \t\tvermet változtassa.\n" +" \n" +" Argumentumok:\n" +" +N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \t\tkezdve, a „dirs” által kiírt listán balról számolva)\n" +" \t\tkerüljön a verem tetejére.\n" +" \n" +" -N\tÚgy forgatja a vermet, hogy az N-edik könyvtár (0-tól\n" +" \t\tkezdve, a „dirs” által kiírt listán jobbról számolva)\n" +" \t\tkerüljön a verem tetejére.\n" +" \n" +" ktár\tA verem tetejére helyezi KTÁR könyvtárat, és ugyanezt\n" +" \t\tállítja be új munkakönyvtárnak.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen argumentum vagy könyvtárváltás\n" +" során történő hiba esetén." -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3825,16 +5447,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3842,8 +5464,30 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Könyvtárak eltávolítása a veremből.\n" +" \n" +" Elemeket vesz ki a könyvtárveremből. Argumentumok nélkül kiveszi a\n" +" legfelső elemet, és a kivett elemre állítja az új munkakönyvtárat.\n" +" \n" +" Kapcsolók:\n" +" -n\tNe váltson könyvtárat eltávolításkor, vagyis csak a vermet\n" +" \t\tváltoztassa.\n" +" \n" +" Argumentumok:\n" +" +N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \t\tnullától, balról számolva. Pl. a „popd +0” az első, míg a\n" +" \t\t„popd +1” a második könyvtárat távolítja el.\n" +" -N\tEltávolítja az N-edik elemet a „dirs” által kiírt listán,\n" +" \t\tnullától, jobbról számolva. Pl. a „popd -0” az utolsó,\n" +" \t\ta „popd -1” az utolsó előtti könyvtárat távolítja el.\n" +" \n" +" A „dirs” beépített parancs listázza a könyvtárvermet.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen argumentum vagy könyvtárváltás\n" +" során történő hiba esetén." -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3854,32 +5498,52 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"A könyvtárverem megjelenítése.\n" +" \n" +" Megjeleníti a jelenleg megjegyzett könyvtárakat. A könyvtárakat a\n" +" „pushd” paranccsal lehet a verembe rakni; és a „popd” paranccsal " +"kivenni.\n" +" \n" +" Kapcsolók:\n" +" -c\ta könyvtárverem törlése az összes elem eltávolításával\n" +" -l\ta saját könyvtárat ne rövidítse a listázáskor egy tilde (~)\n" +" -p\ta könyvtárverem kiírása soronként egy elemmel\n" +" -v\ta könyvtárverem kiírása soronként egy elemmel, a vermen\n" +" \t\tbelüli pozíció jelölésével\n" +" \n" +" Argumentumok:\n" +" +N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \t\táltal megjelenített listán balról számolva, nullától kezdve.\n" +" -N\tN darab bejegyzést jelenít meg az argumentum nélkül a dirs\n" +" \t\táltal megjelenített listán jobbról számolva, nullától kezdve.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen argumentum vagy hiba esetén." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3892,8 +5556,26 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Parancsételmező-kapcsolók beállítása és törlése.\n" +" \n" +" Minden megadott OPTNÉV kapcsoló beállítása. Argumentumok nélkül hívva\n" +" felsorol minden megadott OPTNEVET – vagy az összes parancsértelmező\n" +" kapcsolót, ha nincsenek OPTNEVEK megadva – annak jelzésével, hogy be\n" +" vannak-e állítva vagy sem.\n" +" \n" +" Kapcsolók:\n" +" -o\tOPTNEVEK korlátozása a „set -o”-val használtakra\n" +" -p\tminden kapcsoló kilistázása az állapotuk jelzésével\n" +" -q\tkimenet elnyelése\n" +" -s\tminden OPTNÉV engedélyezése\n" +" -u\tminden OPTNÉV tiltása\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, ha az OPTNÉV engedélyezve van; sikertelenül, ha\n" +" hibás kapcsolókat kap vagy az OPTNÉV tiltva van." -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3910,20 +5592,63 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " "assignment\n" " error occurs." msgstr "" +"FORMÁTUM alapján az ARGUMENTUMOK kiírása.\n" +" \n" +" Kapcsolók:\n" +" -v változó\ta kimenet VÁLTOZÓ nevű változóba írása a szabványos\n" +" \t\t\tkimenet helyett\n" +" \n" +" A FORMÁTUM egy karakterlánc, amely három fajta primitívből áll:\n" +" egyszerű karakterek, amelyeket a parancs a kimenetre másol; escape-\n" +" karaktersorozatok, amelyeket átalakítva másol a kimenetre; valamint\n" +" formátumjelzők, amelyek rendre a következő argumentum kiírását\n" +" szabályozzák.\n" +" \n" +" A printf(1) által használt szokásos jelzőkön túl a\n" +" következőket ismeri a printf parancs:\n" +" \n" +" %b\tkarakterlánc kiírása az escape-szekvenciák értelmezése után\n" +" %q\targumentum idézőjelezése olyan módon, hogy parancsértelmező\n" +" \t\tbemeneteként használható legyen\n" +" %(fmt)T\tdátum-idő karakterlánc kiírása az FMT mint strftime(3)\n" +" \t\tformátum-karakterlánc használatával\n" +" \n" +" A formátum szükség szerint újrafelhasználásra kerül az összes " +"argumentum\n" +" elfogyasztásához. Ha kevesebb argumentum van a formátumnak " +"szükségesnél,\n" +" az extra formátumjelzők úgy viselkednek, mintha nulla érték vagy null\n" +" karakterlánc lett volna megadva.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve ha hibás kapcsolókat kap, vagy az írás/\n" +" értékadás hibával járt." -#: builtins.c:1895 +#: builtins.c:1974 +#, fuzzy msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -3936,21 +5661,49 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Megadja, hogy a Readline hogyan egészítse ki az argumentumokat.\n" +" \n" +" Minden NÉVHEZ megadja, hogyan egészítse ki a Readline az " +"argumentumokat.\n" +" Ha nincsenek kapcsolók megadva, a jelenlegi érték kerül kiírásra,\n" +" újrafelhasználható módon.\n" +" \n" +" Kapcsolók:\n" +" -p\tmeglévő kiegészítésmegadások listázása újrahasználható módon\n" +" -r\tkiegészítésmegadások törlése minden NÉVTŐL; vagy ha nincs\n" +" \t\tNÉV megadva, az összes törlése\n" +" -D\tkiegészítések és műveletek alkalmazása alapértelmezésben, ha\n" +" \t\taz adott parancshoz nincs kiegészítés megadva\n" +" -E\tkiegészítések és műveletek alkalmazása az „üres” parancsokra,\n" +" \t\tvagyis a sor elején\n" +" -I\tkiegészítések és műveletek alkalmazása a kezdeti (általában a\n" +" \t\tparancs) szóra\n" +" \n" +" Kiegészítéskor a műveletek a nagybetűs kapcsolók felsorolásának\n" +" sorrendjében kísérli meg a Readline. A -D elsőbbséget élvez a -E-vel\n" +" szemben.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen kapcsoló és hiba esetén." -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -3962,14 +5715,23 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Lehetséges kiegészítések megjelenítése a kapcsolóktól függően.\n" +" \n" +" Függvényben való használatra szolgál a lehetséges kiegészítések " +"generálása\n" +" céljából. Ha az elhagyható SZÓ argumentum is meg van adva, a SZÓRA\n" +" elölről illeszkedő találatok jelennek csak meg.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, kivéve érvénytelen kapcsoló vagy hiba esetén." -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -3978,6 +5740,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3993,8 +5756,35 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Kiegészítési beállítások módosítása vagy kiírása.\n" +" \n" +" Kiegészítési beállítások listázása minden NÉVHEZ, vagy ha nincs NÉV\n" +" megadva, akkor az éppen zajló kiegészítésre. Ha nincs KAPCSOLÓ megadva,\n" +" kiírja a kiegészítési beállításokat minden NÉVHEZ vagy az aktuális\n" +" kiegészítéshez.\n" +" \n" +" Kapcsolók:\n" +" \t-o kapcsoló\ta KAPCSOLÓ kiegészítési beállítás megadása minden NÉVHEZ\n" +" \t-D\t\tAz alapértelmezett kiegészítés beállításainak módosítása\n" +" \t-E\t\tAz üres kiegészítés beállításainak módosítása\n" +" \t-I\t\tA kezdeti szón történő kiegészítés beállításainak módosítása\n" +" \n" +" A „-o” helyett „+o” használatával a beállítás kikapcsolható.\n" +" \n" +" Argumentumok:\n" +" \n" +" Minden NÉV egy parancsra vonatkozik, amelyhez egy kiegészítést előzőleg\n" +" meg kell adni a „complete” paranccsal. Ha nincs NÉV megadva, a compopt-" +"ot\n" +" egy éppen kiegészítéseket generáló függvényből kell hívni, és a zajló\n" +" generálásra fog vonatkozni.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel lép ki, kivéve ha érvénytelen kapcsolókat kap, vagy a NÉV " +"nincs\n" +" még megadva." -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -4005,24 +5795,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -4033,2270 +5825,63 @@ msgid "" "or\n" " not an indexed array." msgstr "" +"Sorok beolvasása a szabványos bemenetről egy indexelt tömbbe.\n" +" \n" +" Sorok beolvasása a szabványos bemenetről – vagy a -u megadása esetén az " +"FD\n" +" fájlleíróból – egy megadott nevű TÖMBBE (elhagyása esetén az ARRAY-be).\n" +" \n" +" Kapcsolók:\n" +" -d elvál\tAz ELVÁL használata sorlezáróként újsor helyett\n" +" -n szám\tLegfeljebb SZÁM sor másolása. Ha a SZÁM 0, minden sor\n" +" \t\tmásolásra kerül\n" +" -O kezdet\tKEZDET számú indextől kezdje a TÖMB-be másolást.\n" +" \t\tAlapértelmezés: 0\n" +" -s szám\tAz első SZÁM sor eldobása olvasáskor\n" +" -t\tA sorok végéről a záró ELVÁL (alapesetben: újsor) eltávolítása\n" +" -u fd\tSzabványos bemenet helyett az FD fájlleíróból olvasson\n" +" -C parancs\tA PARANCS végrehajtása minden TÁVOLSÁG sor után\n" +" -c távolság\tA PARANCS végrehajtásai között beolvasott sorok száma\n" +" \n" +" Argumentumok:\n" +" TÖMB\tBeolvasáshoz használt tömb neve\n" +" \n" +" Ha a -C -c nélkül van megadva, az alapértelmezett távolság 5000.\n" +" A PARANCS végrehajtásakor utolsó argumentumként a parancs megkapja a\n" +" következő beolvasandó elem indexét.\n" +" \n" +" Ha nincs KEZDET megadva, a mapfile törli a TÖMB tömböt olvasás előtt.\n" +" \n" +" Kilépési kód:\n" +" Sikerrel tér vissza, kivéve érvénytelen kapcsoló vagy csak olvasható,\n" +" vagy nem indexelt TÖMB megadása esetén." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +"Sorok olvasása egy tömbváltozóba.\n" +" \n" +" A „mapfile” szinonimája." -#~ 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." +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: érvénytelen asszociatívtömb-index" -#, fuzzy +# see $ help caller #~ 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 " -#~ msgstr "" -#~ "�sszes jel sz�m�val. A SIGNAL_SPEC elfogadja a -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" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " #~ msgstr "" -#~ "a 'set -o' haszn�lhatjuk. Opci�k n�lk�l vagy a 'p' opci� kilist�zza az " -#~ "�sszes" +#~ "Az aktuális szubrutinhívás helyével tér vissza.\n" +#~ " \n" +#~ " EXPR nélkül a " -#~ 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 "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: %5ld. folyamat (%s) a the_pipeline-ban" -#~ msgid "not each is set." -#~ msgstr "azokat amik nincsenek be�ll�tva." +#~ msgid "Unknown Signal #" +#~ msgstr "Ismeretlen szignál #" diff --git a/po/id.gmo b/po/id.gmo index 53df6ad..ca3c6fe 100644 Binary files a/po/id.gmo and b/po/id.gmo differ diff --git a/po/id.po b/po/id.po index 4084842..272e143 100644 --- a/po/id.po +++ b/po/id.po @@ -1,299 +1,346 @@ # 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 , 2008, 2009. +# Arif E. Nugroho , 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021. # msgid "" msgstr "" -"Project-Id-Version: bash 4.0\n" +"Project-Id-Version: bash 5.1\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" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2021-09-17 19:30+0700\n" "Last-Translator: Arif E. Nugroho \n" "Language-Team: Indonesian \n" +"Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "array subscript buruk" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: tidak dapat mengubah index ke array yang berassosiasi" +msgid "%s: removing nameref attribute" +msgstr "%s: menghapus atribut nameref" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: kunci array assosiasi tidak valid" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: tidak dapat mengubah index ke array yang berassosiasi" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: tidak dapat mengassign ke index tidak-numeric" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: tidak dapat membuat: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "bash_execute_unix_command: tidak dapat menemukan keymap untuk perintah" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: bukan karakter whitespace (spasi) pertama ditemukan `\"'" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "tidak menutup '%c' dalam %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: hilang pemisah colon" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "'%s': tidak dapat melepaskan dalam peta perintah" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace expansion: cannot allocate memory for %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace expansion: failed to allocate memory for %u elements" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace expansion: failed to allocate memory for `%s'" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "'%s': nama keymap tidak valid" +msgstr "`%s': nama alias tidak valid" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "pengubahan baris tidak aktif" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "'%s': nama keymap tidak valid" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "'%s': nama fungsi tidak dikenal" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s tidak terikat ke kunci apapun.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s dapat dipanggil melalui " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "'%s': tidak dapat melepaskan" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "jumlah loop" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "hanya berarti dalam sebuah `for', `while', atau `until'loop" -#: builtins/caller.def:133 +#: builtins/caller.def:136 +#, fuzzy 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" +" 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." 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/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME tidak diset" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "terlalu banyak argumen" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null direktori" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD tidak diset" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "baris %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "peringatan: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: pilihan membutuhkan sebuah argumen" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: argumen numeric dibutuhkan" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: tidak ditemukan" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: pilihan tidak valid" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: nama pilihan tidak valid" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "`%s': bukan sebuah identifier yang valid" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "nomor oktal tidak valid" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "nomor hexa tidak valid" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "nomor tidak valid" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: spesifikasi sinyal tidak valid" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: variabel baca-saja" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: tidak dapat unset" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s diluar jangkauan" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argumen" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s diluar jangkauan" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: tidak ada pekerjaan seperti itu" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: tidak ada pengontrol kerja" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "tidak ada pengontrol kerja" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: terbatas" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "terbatas" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: bukan sebuah builtin shell" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "gagal menulis: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "error menentukan atribut terminal: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "error mendapatkan atribut terminal: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: spesifikasi pekerjaan ambigu" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "bantuan tidak tersedia di versi ini" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: tidak dapat unset: baca-saja %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: tidak dapat unset" + +#: builtins/complete.def:287 #, 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 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: tidak ada spesifikasi completion" @@ -308,121 +355,156 @@ 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "saat ini sedang tidak menjalankan fungsi completion" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "hanya dapat digunakan dalam sebuah fungsi" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "tidak dapat menggunakan `-f' untuk membuat fungsi" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: fungsi baca-saja" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: reference variable cannot be an array" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref variable self references not allowed" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circular name reference" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': nilai dari berkas pendeskripsi penelusur tidak valid" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" msgstr "%s: tidak dapat menghapus variabel array secara ini" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: quoted compound array assignment ditinggalkan" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynamic loading tidak tersedia" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "tidak dapat membuka object shared %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamic builtin telah dimuat" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "muat fungsi untuk %s mengembalikan kegagalan (%d): tidak dimuat" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: bukan dinamically loaded" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: bukan sebuah direktori" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: bukan sebuah file umum" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: tidak dapat menjalankan berkas binary" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: tidak dapat menjalankan: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "logout\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "bukan sebuah login shell: gunakan `exit'" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Ada pekerjaan yang terhenti.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Ada pekerjaan yang sedang berjalan.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "perintah tidak ditemukan" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "spesifikasi sejarah" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "sekarang" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "pekerjaan %d dimulai tanpa pengontrol pekerjaan" @@ -437,28 +519,35 @@ msgstr "%s: pilihan tidak legal -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: pilihan membutuhkan sebuah argumen -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hashing dinonaktifkan" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: tabel hash kosong\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "tekan\tperintah\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." @@ -466,12 +555,12 @@ msgstr "" "tidak ada topik bantuan yang cocok dengan `%s'. Coba `help help' atau 'man -" "k %s' atau `info %s'." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: tidak dapat membuka: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -494,15 +583,21 @@ msgstr "" "aktif.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "tidak dapat menggunakan lebih dari satu pilihan dari -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "posisi sejarah" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: penanda waktu tidak valid" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: expansi sejarah gagal" @@ -516,93 +611,113 @@ msgstr "%s: inlib gagal" msgid "no other options allowed with `-x'" msgstr "tidak ada pilihan lain yang diperbolehkan dengan `-x'" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "%s: argumen harus diproses atau ID pekerjaan" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Kesalahan tidak diketahui" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "diduga sebuah ekspresi" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: bukan sebuah variabel array" +msgstr "%s: bukan sebuah indeks array" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: spesifikasi file deskripsi tidak valid" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: file deskriptor %s tidak valid" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: jumlah baris tidak valid" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: asal array tidak valid" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: nama aksi tidak valid" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "nama variabel array kosong" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "bantuan array variabel dibutuhkan" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "`%s': hilang karakter format" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': spesifikasi timeout tidak valid" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "`%c': karakter format tidak valid" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "peringatan: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "format parsing problem: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "hilang digit hexa untuk \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "hilang digit hexa untuk \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "tidak ada direktori lain" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argumen limit tidak valid" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "direktori stack kosong" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "index direktori stack" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -647,7 +762,7 @@ msgstr "" "ditampilkan oleh\n" " \tdirs ketika dipanggil tanpa pilihan, dimulai dari nol." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -694,7 +809,7 @@ msgstr "" " \n" " Builtin `dirs' menampilkan direktori stack." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -730,53 +845,48 @@ msgstr "" " \n" " Builtin `dirs' menampilkan direktori stack." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: spesifikasi timeout tidak valid" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "error baca: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: bukan sebuah variabel array" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: bukan sebuah fungsi" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: tidak dapat export" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "shift terhitung" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "tidak dapat menset dan menunset pilihan shell secara bersamaan" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: nama pilihan shell tidak valid" @@ -785,400 +895,477 @@ msgstr "%s: nama pilihan shell tidak valid" msgid "filename argument required" msgstr "argumen nama file dibutuhkan" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: berkas tidak ditemukan" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "tidak dapat suspend" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "tidak dapat suspend sebuah login shell" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s sudah dialiasi ke `%s'\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s adalah sebuah shell dengan kata kunci\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s adalah sebuah fungsi\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s adalah sebuah shell builtin spesial\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s adalah sebuah shell builtin\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s adalah %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s memiliki hash (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: argumen limit tidak valid" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "`%c': perintah buruk" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: tidak dapat get limit: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "batas" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: tidak dapat memodifikasi batas: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "nomor oktal" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "`%c': operator mode symbolic tidak valid" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " baris " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "perintah terakhir: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "membatalkan..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "BERI TAHU: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "peringatan: " + +#: error.c:488 msgid "unknown command error" msgstr "perintah error tidak diketahui" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "tipe perintah buruk" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "konektor buruk" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "lompat buruk" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" msgstr "kehabisan waktu menunggu masukan: otomatis-keluar\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: `%c': karakter format tidak valid" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] masih ada" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "pipe error" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximum eval nesting level exceeded (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum source nesting level exceeded (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum function nesting level exceeded (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "" "%s: dibatasi: tidak dapat menspesifikasikan '/' dalam nama nama perintah" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: perintah tidak ditemukan" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: tidak dapat menjalankan berkas binary" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: interpreter buruk" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: tidak dapat menjalankan berkas binary: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': adalah sebuah shell builtin" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "tidak dapat menduplikasikan fd %d ke fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "expresi level rekursi terlewati" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "rekursi stack underflow" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "syntax error dalam expresi" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "mencoba menempatkan ke bukan sebuah variabel" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "syntax error dalam menempatkan variabel" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "dibagi oleh 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "bug: tanda expassign buruk" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "`:' diharapkan untuk sebuah pernyataan kondisional" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "eksponen kurang dari 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "idenfier diharapkan setelah pre-increment atau pre-decrement" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "hilang `)'" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "syntax error: operand diharapkan" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "syntax error: operator arithmetic tidak valid" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (error token adalah \"%s\")" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "basis arithmetic tidak valid" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "konstanta bulat tidak valid" + +#: expr.c:1603 msgid "value too great for base" msgstr "nilai terlalu besar untuk basis" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: expresi error\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: tidak dapat mengakses direktori orang tua" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "tidak dapat mereset mode nodelay untuk fd %d" -#: input.c:258 +#: input.c:266 #, 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" +"tidak dapat mengalokasikan berkas deskripsi bari untuk masukan bash dari fd " +"%d" -#: input.c:266 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp pipe" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, 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 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: tidak ada pid seperti itu" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "sinyal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Selesai" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Terhenti" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Terhenti(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Berjalan" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Selesai(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Keluar %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Status tidak diketahui" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(core didump) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "anak setpgid (%ld ke %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: Tidak ada catatan untuk proses %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: pekerjaan %d terhenti" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: tidak ada pekerjaan sekarang" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: pekerjaan telah selesai" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: pekerjaan %d sudah berjalan di belakang (background)" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: mengaktifkan WNOHANG untuk menghindari blok tak terhingga" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: baris %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (core didump)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(wd sekarang: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp gagal" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: tidak ada kontrol pekerjaan di belakang" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: baris disiplin" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "tidak dapat menset terminal proses grup (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "tidak ada pengontrol pekerjaan dalam shell ini" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: gagal assertion: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1187,59 +1374,67 @@ msgstr "" "\r\n" "malloc: %s:%d: assertion rusak\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "tidak diketahui" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: blok dalam daftar bebas clobbered" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: dipanggil dengan argumen blok yang sudah dibebaskan" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: dipanggil dengan argumen blok yang tidak dialokasikan" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: underflow terdeteksi; mh_nbytes diluar dari jangkauan" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underflow terdeteksi; magic8 terkorupsi" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free: awal dan akhir dari ukuran potongan berbeda" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: dipanggil dengan argumen blok yang tidak teralokasikan" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: underflow terdeteksi; my_nbytes diluar dari jangkauan" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflow terdeteksi; magic8 terkorupsi" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "realloc: awal dan akhir dari ukuran potongan berbeda" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "basis tidak valid" @@ -1258,262 +1453,303 @@ msgstr "%s: layanan tidak valid" msgid "%s: bad network path specification" msgstr "%s: spesifikasi jalur network buruk" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "operasi jaringan tidak dilayani" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: tidak dapat mengubah lokal (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: tidak dapat mengubah local (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: tidak dapat mengalokasikan %lu bytes" +msgstr "setlocale: %s: tidak dapat mengubah lokal (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: tidak dapat mengalokasikan %lu bytes" +msgstr "setlocale: %s: tidak dapat mengubah lokal (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Anda memiliki surat dalam $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Anda memiliki surat baru dalam $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Surat dalam %s telah dibaca\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "syntax error: membutuhkan ekspresi arithmetic" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "syntax error: `;' tidak terduga" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "syntax error: `((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: tipe instruksi buruk %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"shell_getc: shell_input_line_size (%zu) terlampaui SIZE_MAX (%lu): baris " +"terpotong" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "jumlah maksimal dokumen disini tercapai" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "EOF tidak terduga ketika mencari untuk pencocokan `%c'" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "EOF tidak terduga ketika mencari untuk `]]'" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "syntax error dalam ekspresi kondisional: tanda `%s' tidak terduga" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "syntax error dalam ekspresi kondisional" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "tanda `%s' tidak terduga, diduga `)'" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "diduga `)'" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "argumen tidak terduga `%s' ke operator kondisional unary" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "argumen tidak terduga untuk operasi unary kondisional" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "tanda `%s' tidak terduga, operator binary kondisional diduga" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "operator binary kondisional diduga" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "argumen `%s' tidak terduga ke operator binary kondisional" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "argumen tidak terduga ke operasi binary kondisional" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "tanda `%c' tidak terduga dalam perintah kondisional" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "tanda `%s' tidak terduga dalam perintah kondisional" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "tanda %d tidak terduga dalam perintah kondisional" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "syntax error didekat tanda `%s' yang tidak terduga" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "syntax error didekat `%s'" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "syntax error: tidak terduga diakhir dari berkas" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "syntax error" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Gunakan \"%s\" untuk meninggalkan shell.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "EOF tidak terduga ketika mencari untuk pencocokan ')'" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "completion: fungsi `%s' tidak ditemukan" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: kemungkinan retry loop" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: konektor buruk `%d'" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: file deskriptor %s tidak valid" +msgstr "xtrace_set: %d: berkas pendeskripsi tidak valid" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: berkas penunjuk KOSONG" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: '%c': format karakter tidak valid" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "berkas deskripsi diluar dari jangkauan" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: redirect ambigu" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: tidak dapat menulis berkas yang sudah ada" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: restricted: tidak dapat meredirect keluaran" -#: redir.c:180 +#: redir.c:219 #, 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 +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: tidak dapat meng-assign daftar kedalam anggoya array" +msgstr "%s: tidak dapat meng-'assign' fd ke variabel" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "/dev/(tcp|udp)/host/port tidak dilayani tanpa jaringan" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "redirection error: tidak dapat menduplikasi fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "tidak dapat menemukan /tmp, tolong buat!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp harus berupa sebuah nama direktori yang valid" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "mode pretty-printing diabaikan dalam shells interactive" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: pilihan tidak valid" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "tidak dapat menset uid ke %d: uid efektif %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "tidak dapat menset gid ke %d: gid efektif %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "tidak dapat menjalankan debugger; mode debugging tidak aktif" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Direktori" + +#: shell.c:1907 msgid "I have no name!" msgstr "Aku tidak memiliki nama!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, versi %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1522,43 +1758,55 @@ msgstr "" "Penggunaan:\t%s [GNU pilihan panjang] [pilihan] ...\n" "\t%s [GNU pilihan panjang] [pilihan] berkas-script ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU pilihan panjang:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" +"\t-ilrsD atau -c perintah atau -O shopt_option\t\t(hanya pemanggilan)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s atau pilihan -o\n" -#: shell.c:1822 +#: shell.c:2094 #, 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 +#: shell.c:2095 #, 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 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "Gunakan perintah 'bashbug' untuk melaporkan bugs.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash halaman rumah: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Bantuan umum menggunakan aplikasi GNU: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: operasi tidak valid" @@ -1723,213 +1971,266 @@ msgstr "HFTP sound sequence telah selesai" msgid "Information request" msgstr "Permintaan informasi" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Sinyal tidak diketahui #" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Sinyal tidak diketahui #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "substitusi buruk: tidak ada penutupan `%s' dalam %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "tidak dapat membuat pipe untuk proses substitusi" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "tidak dapat membuat anak untuk proses substitusi" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "tidak dapat membuka named pipe %s untuk membaca" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "tidak dapat membukan named pipe %s untuk menulis" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "tidak dapat menduplikasi nama pipe %s sebagai fd %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "substitusi perintah: mengabaikan byte kosong dalam masukan" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "tidak dapat membuat pipe untuk perintah substitusi" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "tidak dapat membuat anak untuk perintah substitusi" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute: tidak dapat menduplikasikan pipe sebagi fd 1" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nilai dari berkas pendeskripsi penelusur tidak valid" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: ekspansi tidak langsung tidak valid" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "`%s': nama variabel tidak valid" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter tidak diset" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parameter kosong atau tidak diset" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: substring expresi < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: substitusi buruk" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: tidak dapat meng-assign dengan cara ini" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"versi selanjutnya dari shell akan memaksa evaluasi dari sebuah penggantian " +"aritmetika" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "substitusi buruk: tidak ada penutupan \"\" dalam %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "tidak cocok: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "argumen diharapkan" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: expresi integer diduga" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "')' diduga" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: operator binary diduga" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: operator unary diduga" + +#: test.c:896 msgid "missing `]'" msgstr "hilang `]'" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntax error: `%s' tidak terduga" + +#: trap.c:220 msgid "invalid signal number" msgstr "nomor sinyal tidak valid" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: maximum trap handler level exceeded (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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" +"run_pending_traps: sinyal handler adalah SIG_DFL, mengirimkan kembali %d " +"(%s) kediri sendiri" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: sinyal buruk %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "error mengimpor definisi fungsi untuk `%s'" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "level shell (%d) terlalu tinggi, mereset ke 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "make_local_variable: tidak ada context fungsi di scope ini" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: tidak dapat meng-'assign' fd ke variabel" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: memberikan integer ke berkas pendeskripsi penelusur" + +#: variables.c:4390 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 +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: parameter kosong atau tidak diset" +msgstr "%s memiliki exportstr kosong" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "karakter %d tidak valid dalam exporstr untuk %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "bukan `=' dalam exportstr untuk %s" -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: bukan global_variable context" -#: variables.c:3922 +#: variables.c:5410 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 +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: tidak dapat membuka: %s" +msgstr "%s: %s: tidak dapat membuka sebagai BERKAS" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: file deskriptor %s tidak valid" +msgstr "%s: %s: nilai dari berkas pendeskripsi penelusur tidak valid" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Hak Cipta (C) 2009 Free Software Foundation, Inc." +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: diluar jangkauan" -#: version.c:47 +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Hak Cipta (C) 2020 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1937,181 +2238,158 @@ msgstr "" "Lisensi GPLv3+: GNU GPL versi 3 atau sesudahnya \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." msgstr "" "Ini adalah perangkat lunak bebas; anda bebas untuk mengubah dan " -"mendistribusikannya.\n" +"mendistribusikannya." -#: 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" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "TIDAK ADA GARANSI, selama masih diijinkan oleh hukum yang berlaku." -#: 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 \n" -msgstr "" -"Lisensi GPLv3+: GNU GPL versi 3 atau sesudahnya \n" - -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc: tidak dapat mengalokasikan %lu bytes (%lu bytes teralokasi)" +msgstr "%s: tidak dapat mengalokasikan %lu bytes (%lu bytes teralokasi)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: tidak dapat mengalokasikan %lu bytes" +msgstr "%s: tidak dapat mengalokasikan %lu bytes" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: tidak dapat mengalokasikan %lu bytes (%lu bytes teralokasi)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s: %d: tidak dapat teralokasi %lu bytes" +msgstr "%s: %s: %d: tidak dapat teralokasi %lu bytes" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [name[=nilai] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] name [nama ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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]" +"bind [-lpvsPVSX] [-m keymap] [-f nama berkas] [-q nama] [-u nama] [-r " +"keyseq] [-x keyseq:perintah-shell] [keyseq:readline-function atau readline-" +"command]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [shell-builtin [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [direktori]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "benar" - -#: builtins.c:72 -msgid "false" -msgstr "salah" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [name[=nilai] ...]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] name[=nilai] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [pilihan] name[=nilai] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f nama berkas] [name ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts nama optstring [arg ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nama] [perintah [argumen ...]] [redireksi ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [spesifikasi pekerjaan]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [spesifikasi pekerjaan ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p nama jalur] [-dt] [nama ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "bantuan [-ds] [pola ...]" +msgstr "bantuan [-dms] [pola ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" @@ -2119,15 +2397,15 @@ msgstr "" "sejarah [-c] [-d ofset] [n] atau history -anrw [nama berkas] atau history -" "ps arg [arg...]" -#: builtins.c:125 +#: builtins.c:127 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [spesifikasi pekerjaan ... | pid ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" @@ -2135,112 +2413,109 @@ msgstr "" "kill [-s spesifikasi sinyal | -n nomor sinyal | -sigspec] pid | jobsepc ... " "atau kill -l [sigspec]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "biarkan arg [argumen ...]" -#: builtins.c:136 -#, fuzzy +#: builtins.c:138 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 ...]" +"read [-ers] [-a array] [-d pembatas] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nama-pilihan] [--] [argumen ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [name[=nilai] ...] atau export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [name[=nilai] ...] atau readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=nilai] ...] atau export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=nilai] ...] atau readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source nama berkas [argumen]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". nama berkas [argumen]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [expr]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "kali" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[arg] spesifikasi sinyal ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] nama [name ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [batas]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [batas]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [mode]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NAMA [in WORDS ...] ; do PERINTAH; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( exp1; exp2; exp3 )); do PERINTAH; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NAMA [ in WORDS ... ;] do PERINTAH; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] pipeline" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case WORD in [POLA [| POLA]...) PERINTAH ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2248,103 +2523,104 @@ msgstr "" "if PERINTAH; then PERINTAH; [ elif PERINTAH; then PERINTAH; ]... [ else " "PERINTAH; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while PERINTAH; do PERINTAH; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until PERINTAH; do PERINTAH; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NAMA] perintah [redireksi]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function name { PERINTAH; } atau name () { PERINTAH ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ PERINTAH ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "job_spec [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( expressi ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ expressi ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "variabel - Nama dan arti dari beberapa shell variabel" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [optname ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v var] format [argumen]" -#: builtins.c:229 -#, fuzzy +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o pilihan] [-A action] [-G globpat] " +"[-W daftar kata] [-F fungsi] [-C perintah] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o pilihan] [-DEI] [nama ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-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]" +"mapfile [-d pembatas] [-n jumlah] [-O asal] [-s jumlah] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-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]" +"readarray [-d pembatas] [-n jumlah] [-O asal] [-s jumlah] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" -#: builtins.c:254 +#: builtins.c:256 +#, fuzzy msgid "" "Define or display aliases.\n" " \n" @@ -2356,7 +2632,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2383,23 +2659,24 @@ msgstr "" "ada alias yang\n" " terdefinisi." -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +" -a\thapus semua definisi alias\n" " \n" " Mengembalikan sukses kecuali sebuah NAMA bukan alias yang sudah ada." -#: builtins.c:289 +#: builtins.c:291 +#, fuzzy msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2433,6 +2710,9 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." @@ -2480,7 +2760,7 @@ msgstr "" " bind memberikan kembalian 0 kecuali sebuah pilihan tidak dikenal " "diberikan atau sebuah error terjadi." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2499,7 +2779,7 @@ msgstr "" " Status Keluar:\n" " Status keluar adalah 0 kecuali N tidak lebih besar atau sama dengan 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2518,7 +2798,7 @@ msgstr "" " Status Keluar:\n" " Status keluar adalah 0 kecuali N tidak lebih besar atau sama dengan 1." -#: builtins.c:350 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2529,7 +2809,7 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" "Menjalankan shell builtins.\n" " \n" @@ -2543,9 +2823,9 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status keluar dari SHELL-BUILTIN, atau salah jika SHELL-" "BUILTIN adalah\n" -" bukan sebuah shell builtin.." +" bukan sebuah shell builtin." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2574,7 +2854,8 @@ msgstr "" "shell atau EXPR\n" " tidak valid." -#: builtins.c:383 +#: builtins.c:387 +#, fuzzy msgid "" "Change the shell working directory.\n" " \n" @@ -2597,14 +2878,26 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" "Pindah direktori kerja shell.\n" " \n" @@ -2634,13 +2927,13 @@ msgstr "" " Status Keluar:\n" " Mengembalikan 0 jika direktori berubah; bukan nol jika tidak." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2653,7 +2946,7 @@ msgstr "" " \n" " Pilihan:\n" " -L\tmenampilkan nilai dari $PWD jika ini nama dari direktori\n" -" \tyang digunakan sekarang\n" +" \t\tyang digunakan sekarang\n" " -P\tmenampilkan direktori pisik, tanpa link simbolik apapun\n" " \n" " Secara default, `pwd' berlaku seperi jika pilihan `-L' " @@ -2664,7 +2957,7 @@ msgstr "" "direktori sekarang\n" " tidak bisa dibaca." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2680,7 +2973,7 @@ msgstr "" " Status Keluar:\n" " Selalu sukses." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2692,7 +2985,7 @@ msgstr "" " Status Keluar:\n" " Selalu sukses." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2704,7 +2997,7 @@ msgstr "" " Status Keluar:\n" " Selalu gagal." -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2714,10 +3007,10 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2732,17 +3025,18 @@ msgstr "" " dalam disk ketika sebuah fungsi dengan nama yang sama ada.\n" " \n" " Pilihan:\n" -" -p\tgunakan sebuah nilai default untuk PATH yang menjamin untuk " +" -p gunakan 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" +" penggunaan stadar\n" +" -v menampilkan deskripsi dari PERINTAH sama dengan `type' builtin\n" +" -V menampilkan 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 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2752,17 +3046,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2772,10 +3071,11 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" "Menset nilai variabel dan atribut.\n" " \n" @@ -2811,17 +3111,17 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "sebuah error terjadi." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Menset nilai variabel dan atribut.\n" " \n" -" Kadaluarsa. Lihat `help declare'." +" Sama dengan `declare'. Lihat `help declare'." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2832,8 +3132,8 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" "Mendefinisikan variabel lokal.\n" " \n" @@ -2849,11 +3149,14 @@ msgstr "" "sebuah error terjadi.\n" " atau shell tidak menjalankan sebuah fungsi." -#: builtins.c:537 +#: builtins.c:557 +#, fuzzy msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2865,6 +3168,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2872,9 +3176,15 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." @@ -2907,7 +3217,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan sukses kecuali sebuah penulisan error terjadi." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2929,7 +3239,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan sukses kecuali sebuah penulisan error terjadi." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2985,7 +3295,7 @@ msgstr "" " Mengembalikan sukses kecuali NAMA bukan sebuah shell builtin atau sebuah " "error terjadi." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -3006,7 +3316,8 @@ msgstr "" " Mengembalikan status keluar dari perintah atau sukses jika perintah " "adalah kosong." -#: builtins.c:626 +#: builtins.c:652 +#, fuzzy msgid "" "Parse option arguments.\n" " \n" @@ -3039,8 +3350,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3092,7 +3403,8 @@ msgstr "" "dari pilihan\n" " ditemui atau sebuah error terjadi." -#: builtins.c:668 +#: builtins.c:694 +#, fuzzy msgid "" "Replace the shell with the given command.\n" " \n" @@ -3103,8 +3415,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3135,7 +3447,7 @@ msgstr "" " Mengembalikan sukses kecuali PERINTAH tidak ditemukan atau sebuah " "redireksi error terjadi." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3148,7 +3460,7 @@ msgstr "" "keluaran\n" " adalah status dari perintah terakhir yang dijalankan." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -3162,7 +3474,7 @@ msgstr "" "error jika tidak dijalankan\n" " dalam sebuah login shell." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -3221,7 +3533,7 @@ msgstr "" " Mengembalikan sukses atau status dari perintah yang dijalankan; tidak-" "nol jika sebuah error terjadi." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3242,7 +3554,7 @@ msgstr "" " Status dari perintah yang ditempatkan di foreground, atau gagal jika " "sebuah error terjadi." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -3266,7 +3578,8 @@ msgstr "" " Mengembalikan sukses kecuali pengontrol pekerjaan tidak aktif atau " "sebuah error terjadi." -#: builtins.c:767 +#: builtins.c:793 +#, fuzzy msgid "" "Remember or display program locations.\n" " \n" @@ -3275,15 +3588,15 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3312,7 +3625,8 @@ msgstr "" " Mengembalikan sukses kecuali NAMA tidak ditemukan atau sebuah pilihan " "tidak valid telah diberikan." -#: builtins.c:792 +#: builtins.c:818 +#, fuzzy msgid "" "Display information about builtin commands.\n" " \n" @@ -3324,10 +3638,10 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " @@ -3353,7 +3667,8 @@ msgstr "" " Mengembalikan sukses kecuali POLA tidak ditemukan atau pilihan tidak " "valid diberikan." -#: builtins.c:816 +#: builtins.c:842 +#, fuzzy msgid "" "Display or manipulate the history list.\n" " \n" @@ -3362,23 +3677,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3428,7 +3744,8 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "sebuah error terjadi." -#: builtins.c:852 +#: builtins.c:879 +#, fuzzy msgid "" "Display status of jobs.\n" " \n" @@ -3437,8 +3754,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3476,7 +3793,7 @@ msgstr "" "sebuah error terjadi.\n" " Jika -x digunakan, mengembalikan status keluar dari PERINTAH." -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3486,7 +3803,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3501,14 +3818,15 @@ msgstr "" " -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" +" \t\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 +#: builtins.c:925 +#, fuzzy msgid "" "Send a signal to a job.\n" " \n" @@ -3520,7 +3838,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3551,7 +3870,7 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "sebuah error terjadi." -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3593,7 +3912,7 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" "Evaluasi ekspresi arithmetic.\n" " \n" @@ -3639,7 +3958,7 @@ msgstr "" " Jika ARG terakhir dievaluasi ke 0, membiarkan kembali ke 1; 0 " "dikembalikan Jika tidak." -#: builtins.c:966 +#: builtins.c:994 #, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" @@ -3651,7 +3970,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3661,30 +3982,34 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" "Membaca sebuah baris dari standar masukan dan membaginya dalam bagian " @@ -3714,6 +4039,10 @@ msgstr "" " -n nchars\tkembali setelah membaca NCHARS characters daripada " "menunggu\n" " \t\tuntuk sebuah baris baru\n" +" -N nchars\thanya kembali setelah membaca tepat NCHARS karakter, " +"kecuali\n" +" \t\tEOF ditemui atau waktu habis dalam pembacaan, abaikan pembatas " +"apapun\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" @@ -3734,7 +4063,7 @@ msgstr "" " atau sebuah berkas deskripsi disupply sebagai sebuah argumen ke pilihan -" "u." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3756,7 +4085,8 @@ msgstr "" " Mengembalikan N, atau gagal jika shell tidak menjalan sebuah fungsi atau " "script." -#: builtins.c:1022 +#: builtins.c:1055 +#, fuzzy msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3822,9 +4152,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3928,7 +4262,8 @@ msgstr "" " Status Keluar:\n" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan." -#: builtins.c:1104 +#: builtins.c:1140 +#, fuzzy msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3937,6 +4272,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3965,7 +4302,7 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "sebuah NAMA adalah baca-saja." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -4000,7 +4337,8 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "NAMA tidak valid." -#: builtins.c:1143 +#: builtins.c:1181 +#, fuzzy msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -4012,7 +4350,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -4039,7 +4378,7 @@ msgstr "" " Mengembalikan sukses kecual sebuah pilihan tidak valid diberikan atau " "NAMA tidak valid." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -4057,7 +4396,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan sukses kecuali N adalah negatif atau lebih besar dari $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -4083,7 +4422,7 @@ msgstr "" "BERKAS; gagal jika\n" " NAMA BERKAS tidak dapat dibaca." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4109,14 +4448,18 @@ msgstr "" " Mengembalikan sukses kecuali pengontrol pekerjaan tidak aktif atau " "sebuah error terjadi." -#: builtins.c:1223 +#: builtins.c:1262 +#, 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4170,6 +4513,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4269,7 +4615,7 @@ msgstr "" "EXPR mengevaluasi ke\n" " salah atau sebuah argumen tidak valid diberikan." -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4281,7 +4627,7 @@ msgstr "" " Ini sinonim untuk \"test\" builtin, tetapi argumen terakhir\n" " harus berupa sebuah literal `]', untuk mencocokan dengan pembukaan `['." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -4301,7 +4647,7 @@ msgstr "" " Status Keluar:\n" " Selalu sukses." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -4317,7 +4663,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4374,7 +4728,8 @@ msgstr "" " Mengembalikan sukses kecuali sebuah SIGSPEC adalah tidak valid atau " "sebuah pilihan tidak valid diberikan." -#: builtins.c:1352 +#: builtins.c:1401 +#, fuzzy msgid "" "Display information about command type.\n" " \n" @@ -4383,18 +4738,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4436,7 +4791,8 @@ msgstr "" " Mengembalikan sukses jika seluruh dari NAMA ditemukan; gagal jika ada " "yang tidak ditemukan." -#: builtins.c:1383 +#: builtins.c:1432 +#, fuzzy msgid "" "Modify shell resource limits.\n" " \n" @@ -4454,6 +4810,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4465,6 +4822,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4524,7 +4886,7 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "sebuah error terjadi." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4562,21 +4924,37 @@ msgstr "" " Mengembalikan sukses kecuali MODE tidak valid atau sebuah pilihan tidak " "valid diberikan." -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" "Tunggu untuk penyelesaian pekerjaan dan kembalikan status keluar.\n" " \n" @@ -4594,18 +4972,19 @@ msgstr "" "pilihan tidak\n" " valid diberikan." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" "Tunggu untuk penyelesaian proses dan kembalikan status keluar.\n" " \n" @@ -4619,7 +4998,7 @@ msgstr "" "pilihan tidak valid\n" " diberikan." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4643,7 +5022,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari perintah terakhir yang dijalankan." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4673,7 +5052,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari perintah terakhir yang dijalankan." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4710,7 +5089,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari perintah terakhir yang dijalankan." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4738,7 +5117,7 @@ msgstr "" " Status Keluar:\n" " Status kembali adalah status kembali dari PIPELINE." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4756,7 +5135,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan setatus dari perintah terakhir yang dijalankan." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -4794,12 +5173,14 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari perintah terakhir yang dijalankan." -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4812,12 +5193,14 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari perintah terakhir yang dijalankan." -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4829,7 +5212,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari perintah terakhir yang dijalankan." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4839,7 +5222,7 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" "Buat sebuah koproses dengan nama NAMA.\n" " \n" @@ -4850,9 +5233,9 @@ msgstr "" " Nama baku adalah \"COPROC\".\n" " \n" " Status Keluar:\n" -" Mengembalikan status keluar dari PERINTAH." +" Perintah coproc mengembalikan status keluar 0." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -4877,7 +5260,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan sukses kecuali NAMA adalah baca-saja." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4896,7 +5279,7 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari perintah terakhir yang dieksekusi." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4923,12 +5306,12 @@ msgstr "" " Status Keluar:\n" " Mengembalikan status dari pekerjaan yang dilanjutkan." -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4936,12 +5319,12 @@ msgstr "" "Evaluasi ekspresi arithmetic.\n" " \n" " EXPRESI dievaluasi berdasarkan dalam aturan evaluasi\n" -" arithmetic. Sama dengan \"let EXPRESI\".\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 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -4998,7 +5381,7 @@ msgstr "" " Status Keluar:\n" " 0 atau 1 tergantun dari nilai dari EKSPRESI." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -5112,7 +5495,8 @@ msgstr "" "digunakan untuk menentukan dimana\n" " \t\tperintah seharusnya disimpan dalam daftar sejarah.\n" -#: builtins.c:1754 +#: builtins.c:1822 +#, fuzzy msgid "" "Add directories to stack.\n" " \n" @@ -5122,19 +5506,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5172,7 +5556,8 @@ msgstr "" "atau pemindahan\n" " direktori gagal." -#: builtins.c:1788 +#: builtins.c:1856 +#, fuzzy msgid "" "Remove directories from stack.\n" " \n" @@ -5181,16 +5566,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5216,8 +5601,8 @@ msgstr "" " \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" +" \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" @@ -5227,7 +5612,8 @@ msgstr "" "atau pemindahan\n" " direktori gagal." -#: builtins.c:1818 +#: builtins.c:1886 +#, fuzzy msgid "" "Display directory stack.\n" " \n" @@ -5238,19 +5624,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5283,14 +5669,14 @@ msgstr "" " Mengembalikan sukses kecuali ada sebuah pilihan tidak valid diberikan " "atau sebuah error terjadi." -#: builtins.c:1847 +#: builtins.c:1917 +#, fuzzy 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5322,7 +5708,8 @@ msgstr "" "tidak valid diberikan\n" " atau OPTNAME dinonaktifkan." -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5339,12 +5726,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -5377,7 +5775,7 @@ msgstr "" "sebuah penulisan atau penempatan\n" " error terjadi." -#: builtins.c:1895 +#: builtins.c:1974 #, fuzzy msgid "" "Specify how arguments are to be completed by Readline.\n" @@ -5391,15 +5789,19 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5418,6 +5820,11 @@ msgstr "" " -r\thapus sebuah spesifikasi penyelesaian untuk setiap NAMA, atau jika " "tidak ada\n" " \tNAMA yang diberikan, seluruh spesifikasi penyelesaian\n" +" -D\taplikasikan pelengkapan dan aksi sebagai perintah baku tanpa " +"pelengkapan\n" +" \tspesifik yang didefinisikan\n" +" -E\taplikasikan pelengkapan dan aksi ke perintah \"empty\" --\n" +" \tpelengkapan dilakukan di baris kosong\n" " \n" " Ketika penyelesaian dicoba, aksi yang dilakukan dalam urutan\n" " huruf besar pilihan yang ditampilkan diatas.\n" @@ -5426,7 +5833,7 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "sebuah error terjadi." -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -5449,14 +5856,14 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "sebuah error terjadi." -#: builtins.c:1938 +#: builtins.c:2019 #, 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5465,6 +5872,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5491,6 +5899,8 @@ msgstr "" " \n" " Pilihan:\n" " \t-o option\tSet pilihan penyelesaian OPSI untuk setiap NAMA\n" +" \t-D\t\tUbah pilihan untuk perintah pelengkapan \"default\"\n" +" \t-E\t\tUbah pilihan untuk perintah pelengkapan \"empty\"\n" " \n" " Gunakan `+o' daripada `-o' matikan pilihan yang dispesifikasikan.\n" " \n" @@ -5510,7 +5920,7 @@ msgstr "" "NAMA tidak memiliki\n" " spesifikasi penyelesaian yang terdefinisi." -#: builtins.c:1968 +#: builtins.c:2050 #, fuzzy msgid "" "Read lines from the standard input into an indexed array variable.\n" @@ -5522,24 +5932,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5554,12 +5966,12 @@ msgstr "" " \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" +" ARRAY baku.\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 " +" -O origin\tAwal penempatan ke ARRAY di index ORIGIN. Indeks baku " "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" @@ -5573,7 +5985,10 @@ msgstr "" " Argumen:\n" " ARRAY\t\tNama variabel array yang digunakan untuk berkas data.\n" " \n" -" Jika -C Diberikan tanpa -c, default quantum adalah 5000.\n" +" Jika -C Diberikan tanpa -c, default quantum adalah 5000. Ketika " +"CALLBACK\n" +" dievaluasi , ini diberikan ke indeks dari element 'array' selanjutnya\n" +" untuk di-'assign' sebagai sebuah argumen tambahan.\n" " \n" " Jika tidak diberikan dengan asal secara eksplisit, berkas peta akan " "menghapus ARRAY sebelum\n" @@ -5583,7 +5998,7 @@ msgstr "" " Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau " "ARRAY adalah baca-saja." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -5593,6 +6008,72 @@ msgstr "" " \n" " Sebuah sinonim untuk `mapfile'." +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: kunci array assosiasi tidak valid" + +#~ 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 " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: process %5ld (%s) dalam the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Sinyal tidak diketahui #" + +#~ msgid "Copyright (C) 2013 Free Software Foundation, Inc." +#~ msgstr "Hak Cipta (C) 2013 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "benar" + +#~ msgid "false" +#~ msgstr "salah" + +#~ msgid "times" +#~ msgstr "kali" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". Dengan EXPR, kembali\n" +#~ " " + +#~ 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 "" +#~ "; informasi tambahan ini dapat digunakan untuk\n" +#~ " menyediakan penelusuran 'stack'.\n" +#~ " \n" +#~ " Nilai dari EXPR mengindikasikan berapa banyak panggilan 'frame' untuk " +#~ "kembali\n" +#~ " sebelum saat ini; 'frame' paling atas adalah 'frame' 0." + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Hak Cipta (C) 2009 Free Software Foundation, Inc.\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Lisensi GPLv2+: GNU GPL versi 2 atau sesudahnya \n" + #~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" #~ msgstr "" #~ "xrealloc: tidak dapat menrealokasikan %lu bytes (%lu bytes teralokasikan)" @@ -5741,9 +6222,6 @@ msgstr "" #~ 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" diff --git a/po/it.gmo b/po/it.gmo new file mode 100644 index 0000000..f23813b Binary files /dev/null and b/po/it.gmo differ diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..ec0ebc4 --- /dev/null +++ b/po/it.po @@ -0,0 +1,6170 @@ +# Italian translation for bash +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Sergio Zanchetta , 2010, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2011-10-17 09:14+0200\n" +"Last-Translator: Sergio Zanchetta \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural= (n != 1)\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "indice dell'array errato" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: impossibile convertire un array indicizzato in uno associativo" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: impossibile assegnare a un indice non numerico" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "" +"%s: %s: deve essere usato un indice nell'assegnazione di un array associativo" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: impossibile creare: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: impossibile trovare una mappatura per il comando" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: il primo carattere non spazio non è \"\"\"" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "carattere di chiusura \"%c\" non presente in %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: separatore di tipo due punti mancante" + +#: bashline.c:4733 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "\"%s\": impossibile eliminare l'associazione" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "\"%s\": nome alias non valido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "modifica delle righe non abilitata" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "\"%s\": nome della mappatura non valido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: impossibile leggere: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "\"%s\" nome della funzione sconosciuto" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s non è associato ad alcun tasto.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s può essere invocato tramite " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "\"%s\": impossibile eliminare l'associazione" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "numero di cicli" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "significativo solo in un ciclo \"for\", \"while\" o \"until\"" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"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." +msgstr "" +"Restituisce il contesto della chiamata alla subroutine corrente.\n" +" \n" +" Senza ESPR, restituisce \"$riga $nomefile\". Con ESPR, restituisce\n" +" \"$riga $subroutine $nomefile\"; questa informazione aggiuntiva può " +"essere usata\n" +" per fornire uno stack trace.\n" +" \n" +" Il valore dell'ESPR indica di quanti frame di chiamata tornare indietro " +"rispetto\n" +" a quello attuale; in cima c'è il frame 0.\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 a meno che non sia in esecuzione una funzione di shell o " +"che l'ESPR\n" +" non sia valida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME non impostata" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "troppi argomenti" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "nessun'altra directory" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD non impostata" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "riga %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "attenzione: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uso: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: l'opzione richiede un argomento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: è necessario un argomento numerico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: non trovata" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opzione non valida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nome dell'opzione non valido" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "\"%s\": non è un identificatore valido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "numero ottale non valido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "numero esadecimale non valido" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "numero non valido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: specifica di segnale non valida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "\"%s\": non è un pid o un numero di job valido" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variabile in sola lettura" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: impossibile azzerare" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fuori dall'intervallo" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "argomento" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s fuori dall'intervallo" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: job inesistente" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: nessun controllo dei job" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "nessun controllo dei job" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: limitato" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "limitato" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: non è un comando interno di shell" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "errore in scrittura: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "errore nell'impostazione degli attributi del terminale: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "errore nel recupero degli attributi del terminale: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: errore nel recupero della directory corrente: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: specifica di job ambigua" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: impossibile azzerare: %s in sola lettura" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: impossibile azzerare" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nome azione non valido" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: nessun completamento specificato" + +#: builtins/complete.def:696 +msgid "warning: -F option may not work as you expect" +msgstr "attenzione: l'opzione -F potrebbe non funzionare come previsto" + +#: builtins/complete.def:698 +msgid "warning: -C option may not work as you expect" +msgstr "attenzione: l'opzione -C potrebbe non funzionare come previsto" + +#: builtins/complete.def:846 +msgid "not currently executing completion function" +msgstr "funzione di completamento attualmente non in esecuzione" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "può essere usato solo in una funzione" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "impossibile usare \"-f\" per creare funzioni" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funzione in sola lettura" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": nome alias non valido" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: impossibile eliminare variabili array in questo modo" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: impossibile convertire un array associativo in uno indicizzato" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "caricamento dinamico non disponibile" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "impossibile aprire l'oggetto condiviso %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "impossibile trovare %s nell'oggetto condiviso %s: %s" + +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: non caricato dinamicamente" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: non caricato dinamicamente" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: impossibile eliminare: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: è una directory" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: non è un file regolare" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: file troppo grande" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: impossibile eseguire il file binario" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: impossibile eseguire: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "non è una shell di login: utilizzare \"exit\"" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Sono presenti job interrotti.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Ci sono job in esecuzione.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "nessun comando trovato" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "specifica della cronologia" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: impossibile aprire il file temp: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "attuale" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "job %d avviato senza controllo dei job" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opzione illecita -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'opzione richiede un argomento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing disabilitato" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s tabella di hash vuota\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "rich.\tcomando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Comandi di shell corrispondenti alla parola chiave \"" +msgstr[1] "Comandi di shell corrispondenti alle parole chiave \"" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nessun argomento della guida corrisponde a \"%s\". Provare \"help help\" o " +"\"man -k %s\" o \"info %s\"." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: impossibile aprire: %s" + +#: builtins/help.def:523 +#, 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 "" +"Questi comandi della shell sono definiti internamente. Digitare \"help\" per " +"consultare questa lista.\n" +"Digitare \"help nome\" per saperne di più sulla funzione \"nome\".\n" +"Usare \"info bash\" per saperne di più sulla shell in generale.\n" +"Usare \"man -k\" o \"info\" per saperne di più su comandi non presenti nella " +"lista.\n" +"\n" +"Un asterisco (*) vicino a un nome significa che il comando è disabilitato.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "impossibile usare più di uno tra -anrw" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "posizione nella cronologia" + +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nome dell'opzione non valido" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: espansione della cronologia non riuscita" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib non riuscito" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "nessuna altra opzione permessa con \"-x\"" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: gli argomenti devono essere ID di processo o di job" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Errore sconosciuto" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "attesa espressione" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: non è un array indicizzato" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: specifica di descrittore di file non valida" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descrittore di file non valido: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: numero di righe non valido" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: origine dell'array non valida" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: quantum di callback non valido" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "nome della variabile array vuoto" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "necessario il supporto alla variabile array" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "\"%s\": manca il carattere di formato" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "\"%c\": specifica di formato dell'orario non valida" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "\"%c\": carattere di formato non valido" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "attenzione: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "cifra esadecimale mancante in \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "cifra unicode mancante in \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nessun'altra directory" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: argomento di limite non valido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "stack delle directory vuoto" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "indice dello stack delle directory" + +#: builtins/pushd.def:701 +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 "" +"Visualizza l'elenco delle directory attualmente in memoria. Le directory\n" +" vengono inserite nell'elenco con il comando \"pushd\"; è possibile\n" +" andare a ritroso nell'elenco con il comando \"popd\".\n" +" \n" +" Opzioni:\n" +" -c\tPulisce lo stack delle directory eliminandone tutti gli elementi\n" +" -l\tNon stampa la tilde come prefisso per le directory relative alla\n" +" \tpropria directory home\n" +" -p\tStampa lo stack delle directory una voce per riga\n" +" -v\tStampa lo stack delle directory una voce per riga usando la\n" +" \tposizione nello stack stesso come prefisso\n" +" \n" +" Argomenti:\n" +" +N\tVisualizza l'N-sima voce contando a partire da sinistra " +"dell'elenco\n" +" \tmostrato da dirs quando invocato senza opzioni, iniziando da zero.\n" +" \n" +" -N\tVisualizza l'N-sima voce contando a partire da destra dell'elenco\n" +"\tmostrato da dirs quando invocato senza opzioni, iniziando da zero." + +#: builtins/pushd.def:723 +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 "" +"Aggiunge una directory in cima allo stack delle directory o ruota lo\n" +" stack stesso, mettendo come primo elemento l'attuale directory\n" +" di lavoro. Senza argomenti scambia le prime due directory in cima.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono aggiunte\n" +" \tdirectory allo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da sinistra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" -N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da destra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" dir\tAggiunge DIR in cima allo stack delle directory, facendone la\n" +" \tdirectory di lavoro corrente.\n" +" \n" +" Il comando interno \"dirs\" visualizza lo stack delle directory." + +#: builtins/pushd.def:748 +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 "" +"Rimuove voci dallo stack delle directory. Senza argomenti, rimuove\n" +" la directory in cima allo stack e passa alla nuova prima directory.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono rimosse\n" +" \tdirectory dallo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRimuove l'N-sima voce contando a partire da sinistra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd +0\"\n" +" \trimuove la prima directory, \"popd +1\" la seconda.\n" +" \n" +" -N\tRimuove l'N-sima voce contando a partire da destra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd -0\"\n" +" \trimuove l'ultima directory, \"popd -1\" la penultima.\n" +" \n" +" Il comando interno \"dirs\" visualizza lo stack delle directory." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: specifica di timeout non valida" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "errore in lettura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "" +"è possibile eseguire \"return\" solo da una funzione o da uno script chiamato" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "impossibile azzerare contemporaneamente una funzione e una variabile" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: non è una variabile array" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: non è una funzione" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: impossibile azzerare" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "numero di scorrimenti" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "impossibile impostare e azzerare opzioni di shell contemporaneamente" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nome dell'opzione di shell non valido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "necessario un nome file come argomento" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: file non trovato" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "impossibile sospendere" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "impossibile sospendere una shell di login" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s ha \"%s\" come alias\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s è una parola chiave di shell\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s è una funzione\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s è un comando interno di shell\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s è un comando interno di shell\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s è %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "hash effettuato su %s (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: argomento di limite non valido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "\"%c\": comando errato" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: impossibile recuperare il limite: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "limite" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: impossibile modificare il limite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "numero ottale" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "\"%c\": operatore di modo simbolico non valido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "\"%c\": carattere di modo simbolico non valido" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " riga " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "ultimo comando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Interruzione..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "attenzione: " + +#: error.c:488 +msgid "unknown command error" +msgstr "errore di comando sconosciuto" + +#: error.c:489 +msgid "bad command type" +msgstr "tipo di comando errato" + +#: error.c:490 +msgid "bad connector" +msgstr "connettore errato" + +#: error.c:491 +msgid "bad jump" +msgstr "salto errato" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variabile non assegnata" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atempo di attesa scaduto per l'input: auto-logout\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "impossibile redirigere lo standard input da /dev/null: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: \"%c\": carattere di formato non valido" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "errore della pipe" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: limitato: impossibile specificare \"/\" nei nomi dei comandi" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: comando non trovato" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: impossibile eseguire il file binario" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: interprete errato" + +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: impossibile eseguire il file binario" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s è un comando interno di shell\n" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "impossibile duplicare fd %d su fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "superato il livello di ricorsione dell'espressione" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "underflow dello stack di ricorsione" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "errore di sintassi nell'espressione" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "tentata un'assegnazione a una non variabile" + +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "errore di sintassi nell'espressione" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "divisione per 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "bug: token di expassign errato" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "atteso \":\" per l'espressione condizionale" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "esponente minore di 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "atteso identificatore dopo un pre-incremento o un pre-decremento" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "\")\" mancante" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "errore di sintassi: atteso un operando" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "errore di sintassi: operatore aritmetico non valido" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (il token dell'errore è \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "base aritmetica non valida" + +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: numero di righe non valido" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "valore troppo grande per la base" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: errore di espressione\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: impossibile accedere alle directory padre" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "impossibile reimpostare il modo nodelay per fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"impossibile allocare un nuovo descrittore di file per l'input della bash da " +"fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer già esistente per il nuovo fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pipe pgrp" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "il pid %d del fork appare nel job in esecuzione %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "eliminazione del job %d interrotto con il gruppo di processi %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) segnato come ancora in vita" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: pid inesistente" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Segnale %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Completato" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Fermato" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Fermato(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "In esecuzione" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Eseguito(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Uscita %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Stato sconosciuto" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(core dump creato) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (dir: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid del figlio (%ld a %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: il pid %ld non è un figlio di questa shell" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: nessun record del processo %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: il job %d è fermo" + +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: job inesistente" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: il job è terminato" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: il job %d è già in background" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: attivato WNOHANG per evitare blocchi indefiniti" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: riga %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (core dump creato)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(dir ora: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp non riuscita" + +#: jobs.c:4434 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: disciplina di linea" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina di linea" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "impossibile impostare il gruppo di processi del terminale (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "nessun controllo dei job in questa shell" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: asserzione non riuscita: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: asserzione non riuscita\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "sconosciuto" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: blocco eliminato nell'elenco dei disponibili" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: chiamata con un argomento di blocco già liberato" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: chiamata con un argomento di blocco non allocato" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: dimensioni diverse dei blocchi di inizio e di fine" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: chiamata con un argomento di blocco non allocato" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: riscontrato un underflow; mh_nbytes fuori intervallo" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: dimensioni diverse dei blocchi di inizio e di fine" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" +"register_alloc: forse la tavola di allocazione è piena con FIND_ALLOC\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: forse %p è già come allocato nella tabella\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_alloc: forse %p è già come libero nella tabella\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base non valida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: host sconosciuto" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: servizio non valido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: specifica del percorso di rete errata" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "operazione di rete non supportata" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: impossibile cambiare la localizzazione (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: impossibile cambiare la localizzazione (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: impossibile cambiare la localizzazione (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: impossibile cambiare la localizzazione (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "È presente della posta in $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "È presente della nuova posta in $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "La posta in %s è stata letta\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "errore di sintassi: richiesta espressione aritmetica" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "errore di sintassi: \";\" non atteso" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "errore di sintassi: \"((%s))\"" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo di istruzione errata %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document alla riga %d è delimitato da un EOF (era richiesto \"%s\")" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: istruzione di reindirizzamento \"%d\" fuori dell'intervallo" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF non atteso durante la ricerca di \"%c\"" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF non atteso durante la ricerca di \"]]\"" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" +"errore di sintassi nell'espressione condizionale: token non atteso \"%s\"" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "errore di sintassi nell'espressione condizionale" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "token non atteso \"%s\", era atteso \")\"" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "atteso \")\"" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argomento non atteso \"%s\" per l'operatore unario condizionale" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "argomento non atteso per l'operatore unario condizionale" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "token non atteso \"%s\", era atteso un operatore binario condizionale" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "atteso operatore binario condizionale" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argomento non atteso \"%s\" per l'operatore binario condizionale" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "argomento non atteso per l'operatore binario condizionale" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "token non atteso \"%c\" nel comando condizionale" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "token non atteso \"%s\" nel comando condizionale" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "token non atteso %d nel comando condizionale" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "errore di sintassi vicino al token non atteso \"%s\"" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "errore di sintassi vicino a \"%s\"" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "errore di sintassi: EOF non atteso" + +#: parse.y:6151 +msgid "syntax error" +msgstr "errore di sintassi" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Usare \"%s\" per uscire dalla shell.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF non atteso durante la ricerca di \")\"" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: funzione \"%s\" non trovata" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: COMPSPEC NULL" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: connettore errato \"%d\"" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descrittore di file non valido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: puntatore a file NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != numfile xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: \"%c\": carattere di formato non valido" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "descrittore di file fuori dell'intervallo" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redirezione ambigua" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: impossibile sovrascrivere il file esistente" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: limitato: impossibile redirigere l'output" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "impossibile creare un file temporaneo per here-document: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: impossibile assegnare fd a una variabile" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port non supportata senza rete" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "errore di reindirizzamento: impossibile duplicare fd" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "impossibile trovare /tmp, è necessario crearla" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp deve essere un nome di directory valido" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opzione non valida" + +#: shell.c:1343 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossibile reimpostare il modo nodelay per fd %d" + +#: shell.c:1354 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossibile reimpostare il modo nodelay per fd %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: è una directory" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Manca il nome" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versione %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uso:\t%s [opzione lunga GNU] [opzione] ...\n" +"\t%s [opzione lunga GNU] [opzione] file-script ...\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "Opzioni lunghe GNU:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Opzioni di shell:\n" + +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD o -c comando o -O opzione_shopt\t\t(solo invocazione)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\topzione -%s oppure -o\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Digitare «%s -c \"help set\"» per ulteriori informazioni sulle opzioni di " +"shell.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Digitare \"%s -c help\" per ulteriori informazioni sui comandi interni di " +"shell.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Usare il comando \"bashbug\" per segnalare i bug.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operazione non valida" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Segnale inesistente" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Chiusura" + +#: siglist.c:55 +msgid "Interrupt" +msgstr "Interruzione" + +#: siglist.c:59 +msgid "Quit" +msgstr "Uscita (con core dump)" + +#: siglist.c:63 +msgid "Illegal instruction" +msgstr "Istruzione non consentita" + +#: siglist.c:67 +msgid "BPT trace/trap" +msgstr "Rilevato trace/breakpoint" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "Istruzione ABORT" + +#: siglist.c:79 +msgid "EMT instruction" +msgstr "Istruzione EMT" + +#: siglist.c:83 +msgid "Floating point exception" +msgstr "Eccezione in virgola mobile" + +#: siglist.c:87 +msgid "Killed" +msgstr "Ucciso" + +#: siglist.c:91 +msgid "Bus error" +msgstr "Errore di bus" + +#: siglist.c:95 +msgid "Segmentation fault" +msgstr "Errore di segmentazione" + +#: siglist.c:99 +msgid "Bad system call" +msgstr "Chiamata di sistema errata" + +#: siglist.c:103 +msgid "Broken pipe" +msgstr "Pipe interrotta" + +#: siglist.c:107 +msgid "Alarm clock" +msgstr "Sveglia" + +#: siglist.c:111 +msgid "Terminated" +msgstr "Terminato" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "Condizione di I/O urgente" + +#: siglist.c:119 +msgid "Stopped (signal)" +msgstr "Fermato (segnale)" + +#: siglist.c:127 +msgid "Continue" +msgstr "Continuato" + +#: siglist.c:135 +msgid "Child death or stop" +msgstr "Processo figlio concluso o fermato" + +#: siglist.c:139 +msgid "Stopped (tty input)" +msgstr "Fermato (input da terminale)" + +#: siglist.c:143 +msgid "Stopped (tty output)" +msgstr "Fermato (output da terminale)" + +#: siglist.c:147 +msgid "I/O ready" +msgstr "I/O pronto" + +#: siglist.c:151 +msgid "CPU limit" +msgstr "Limite di CPU" + +#: siglist.c:155 +msgid "File limit" +msgstr "Limite di file" + +#: siglist.c:159 +msgid "Alarm (virtual)" +msgstr "Timer (virtuale)" + +#: siglist.c:163 +msgid "Alarm (profile)" +msgstr "Timer (profilo)" + +#: siglist.c:167 +msgid "Window changed" +msgstr "Finestra modificata" + +#: siglist.c:171 +msgid "Record lock" +msgstr "Blocco del record" + +#: siglist.c:175 +msgid "User signal 1" +msgstr "Segnale 1 dell'utente" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Segnale 2 dell'utente" + +#: siglist.c:183 +msgid "HFT input data pending" +msgstr "Dati di input HTF in sospeso" + +#: siglist.c:187 +msgid "power failure imminent" +msgstr "mancanza di alimentazione imminente" + +#: siglist.c:191 +msgid "system crash imminent" +msgstr "crash di sistema imminente" + +#: siglist.c:195 +msgid "migrate process to another CPU" +msgstr "processo spostato su un'altra CPU" + +#: siglist.c:199 +msgid "programming error" +msgstr "errore di programmazione" + +#: siglist.c:203 +msgid "HFT monitor mode granted" +msgstr "Modalità di monitoraggio HFT concessa" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "Modalità di monitoraggio HFT revocata" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "la sequenza sonora HFT è stata completata" + +#: siglist.c:215 +msgid "Information request" +msgstr "Richiesta di informazioni" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Segnale sconosciuto n° %d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "sostituzione errata: nessuna chiusura di \"%s\" in %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: impossibile assegnare una lista a un membro di un array" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "impossibile creare una pipe per la sostituzione del processo" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "impossibile creare un figlio per la sostituzione del processo" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "impossibile aprire la pipe con nome %s in lettura" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "impossibile aprire la pipe con nome %s in scrittura" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "impossibile duplicare una pipe con nome %s come fd %d" + +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "sostituzione errata: manca «\"» di chiusura in %s" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "impossibile creare una pipe per la sostituzione del comando" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "impossibile creare un figlio per la sostituzione del comando" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: impossibile duplicare la pipe come fd 1" + +#: subst.c:7082 subst.c:10252 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: valore non valido per il descrittore del file di traccia" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: numero di righe non valido" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "\"%s\": nome alias non valido" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametro nullo o non impostato" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parametro nullo o non impostato" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expressione di sottostringa < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: sostituzione errata" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: impossibile assegnare in questo modo" + +#: subst.c:10111 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"le versioni future della shell forzeranno la valutazione come fosse una " +"sostituzione aritmetica" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "sostituzione errata: manca «\"» di chiusura in %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "nessuna corrispondenza: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "atteso argomento" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: attesa espressione intera" + +#: test.c:265 +msgid "`)' expected" +msgstr "atteso \")\"" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "atteso \")\", trovato %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: atteso operatore binario" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: atteso operatore unario" + +#: test.c:896 +msgid "missing `]'" +msgstr "\"]\" mancante" + +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "errore di sintassi: \";\" non atteso" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "numero di segnale non valido" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valore errato in trap_list[%d]: %p" + +#: trap.c:416 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: il gestore dei segnali è SIG_DFL, viene inviato " +"nuovamente %d (%s)" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: segnale errato %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "errore nell'importazione della definizione di funzione per \"%s\"" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "livello di shell (%d) troppo alto, reimpostato a 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: nessun contesto di funzione nell'ambito corrente" + +#: variables.c:2661 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: impossibile assegnare fd a una variabile" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: nessun contesto di funzione nell'ambito corrente" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s ha exportstr null" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "carattere non valido %d in exportstr per %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "nessun \"=\" in exportstr per %s" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" +"pop_var_context: la prima parte di shell_variables non è un contesto di " +"funzione" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: nessun contesto global_variables" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: la prima parte di shell_variables non è un ambito temporaneo " +"d'ambiente" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: impossibile aprire come FILE" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valore non valido per il descrittore del file di traccia" + +#: variables.c:6450 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s fuori dall'intervallo" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright © 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licenza GPLv3+: GNU GPL versione 3 o successiva \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versione %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "Questo è software libero; è possibile modificarlo e ridistribuirlo.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Non c'è ALCUNA GARANZIA, nei limiti permessi dalla legge.\n" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: impossibile allocare %lu byte (%lu byte allocati)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: impossibile allocare %lu byte" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: impossibile allocare %lu byte (%lu byte allocati)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: impossibile allocare %lu byte" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nome[=valore] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nome [nome ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m mappatura] [-f nomefile] [-q nome] [-u nome] [-r " +"seqtasti] [-x seqtasti:comando-shell] [seqtasti:funzione-readline o comando-" +"readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [comandoint-shell [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [espr]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [dir]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] comando [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilrtux] [-p] [nome[=valore] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilrtux] [-p] nome[=valore] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [opzione] nome[=valore] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f nome_file] [nome ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts stringaopz nome [arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nome] [comando [argomenti ...]] [redirezione ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [primo] [ultimo] oppure fc -s [pat=rep] [comando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [spec_job]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [spec_job ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p nomepercorso] [-dt] [nome ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [modello ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d posiz] [n] oppure history -anrw [nomefile] oppure history -" +"ps arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [specjob ...] oppure jobs -x comando [argomenti]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [specjob ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s specsegn | -n numsegn | -specsegn] pid | specjob ... oppure kill -l " +"[specsegn]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +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 testo] [-n ncaratt] [-N ncaratt] [-p " +"stringa] [-t secondi] [-u fd] [nome ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nome-opzione] [--] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [nome ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nome[=valore] ...] oppure export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nome[=valore] ...] oppure readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source nomefile [argomenti]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". nomefile [argomenti]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [espr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] spec_segnale ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nome [nome ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [limite]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modo]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [pid]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOME [in PAROLE ... ] ; do COMANDI; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( espr1; espr2; espr3 )); do COMANDI; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOME [in PAROLE ... ;] do COMANDI; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PAROLA in [MODELLO [| MODELLO]...) COMANDI ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if COMANDI; then COMANDI; [ elif COMANDI; then COMANDI; ]... [ else " +"COMANDI; ] fi" + +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while COMANDI; do COMANDI; done" + +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until COMANDI; do COMANDI; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOME] comando [redirezioni]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMANDI ; } oppure name () { COMANDI ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMANDI ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "spec_job [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( espressione ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ espressione ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variabili - nomi e significati di alcune variabili di shell" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | dir]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nomeopz ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formato [argomenti]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 opzione] [-A azione] [-G modglob] [-" +"W elencoparole] [-F funzione] [-C comando] [-X modfiltro] [-P prefisso] [-S " +"suffisso] [nome ...]" + +#: builtins.c:235 +#, fuzzy +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 opzione] [-A azione] [-G modglob] [-W " +"elencoparole] [-F funzione] [-C comando] [-X modfiltro] [-P prefisso] [-S " +"suffisso] [parola]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opzione] [-DE] [nome ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n numero] [-O origine] [-s numero] [-t] [-u fd] [-C callback] [-c " +"quantità] [array]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n numero] [-O origine] [-s numero] [-t] [-u fd] [-C callback] [-" +"c quantità] [array]" + +#: builtins.c:256 +#, 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 "" +"Definisce o visualizza alias.\n" +" \n" +" Senza argomenti, \"alias\" stampa l'elenco degli alias nella forma\n" +" riusabile \"alias NOME=VALORE\" sullo standard output.\n" +" \n" +" Altrimenti, un alias è definito per ogni NOME a cui è fornito un " +"VALORE.\n" +" Uno spazio finale in VALORE determina un controllo della parola " +"successiva\n" +" che andrà a sostituire l'alias quando viene espanso.\n" +" \n" +" Opzioni:\n" +" -p\tStampa tutti gli alias definiti in un formato riusabile\n" +" \n" +" Stato di uscita:\n" +" alias restituisce vero a meno che non venga fornito un NOME per il " +"quale\n" +" non sia stato definito alcun alias." + +#: builtins.c:278 +#, 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 "" +"Rimuove ogni NOME dall'elenco degli alias definiti.\n" +" \n" +" Opzioni:\n" +" -a\tRimuove tutte le definizioni di alias.\n" +" \n" +" Restituisce successo a meno che NOME non sia un alias esistente." + +#: builtins.c:291 +#, 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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Imposta le associazioni di tasti e le variabili di Readline.\n" +" \n" +" Associa una sequenza di tasti a una funzione o a una macro Readline, " +"oppure imposta una\n" +" variabile di Readline. La sintassi di argomento senza opzione è " +"equivalente a quella\n" +" trovata in ~/.inputrc, ma deve essere passata come singolo argomento:\n" +" es., bind '\"\\C-x\\C-r\": ri-leggi-file-init'.\n" +" \n" +" Opzioni:\n" +" -m mappatura Usa MAPPATURA come la mappatura per la durata di " +"questo\n" +" comando. Nomi accettabili per la mappatura sono " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command e vi-insert.\n" +" -l Elenca i nomi delle funzioni.\n" +" -P Elenca i nomi delle funzioni e le associazioni.\n" +" -p Elenca le funzioni e le associazioni in una forma " +"che\n" +" possa essere riusata come input.\n" +" -S Elenca le sequenze di tasti che invocano le macro e " +"i loro valori.\n" +" -s Elenca le sequenze di tasti che invocano le macro e " +"i loro valori\n" +" in una forma che possa essere riusata come input.\n" +" -V Elenca i nomi e i valori delle variabili.\n" +" -v Elenca i nomi e i valori delle variabili in una " +"forma che possa\n" +" essere riusata come input.\n" +" -q nome-funzione Identifica il tasto che invoca la funzione " +"nominata.\n" +" -u nome-funzione Rimuove l'associazione tra la funzione nominata e " +"tutti i tasti associati.\n" +" -r seqtasti Rimuove l'associazione per la SEQTASTI.\n" +" -f nomefile Legge le associazioni di tasti da NOMEFILE.\n" +" -x seqtasti:comando-shell\tEsegue il COMANDO-SHELL quando viene " +"inserita\n" +" \t\t\t\t\tla SEQTASTI.\n" +" \n" +" Stato di uscita:\n" +" bind restituisce 0 a meno che non sia fornita una opzione non " +"riconosciuta o si riscontri un errore." + +#: builtins.c:330 +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 "" +"Esce da cicli for, while o until.\n" +" \n" +" Esce da un ciclo FOR, WHILE o UNTIL. Se è specificato N, interrompe N " +"cicli\n" +" racchiusi.\n" +" \n" +" Stato di uscita:\n" +" Lo stato di uscita è 0 a meno che N non sia maggiore o uguale a 1." + +#: builtins.c:342 +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 "" +"Riprende cicli for, while o until.\n" +" \n" +" Riprende l'iterazione successiva del ciclo chiuso FOR, WHILE o UNTIL.\n" +" Se è specificato N, riprende l'N-simo ciclo chiuso.\n" +" \n" +" Stato di uscita:\n" +" Lo stato di uscita è 0 a meno che N non sia maggiore o uguale a 1." + +#: builtins.c:354 +#, fuzzy +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 "" +"Esegue comandi interni di shell.\n" +" \n" +" Esegue il COMINTERNO-SHELL con ARGOMENTI senza portare a termine una " +"ricerca\n" +" comandi. Ciò è utile quando si desidera reimplementare un comando " +"interno come una\n" +" funzione di shell, ma è necessario eseguire il comando all'interno della " +"funzione.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del COMINTERNO-SHELL, o falso se il " +"COMINTERNO-SHELL\n" +" non è un comando interno di shell." + +#: builtins.c:369 +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 "" +"Restituisce il contesto della chiamata alla subroutine corrente.\n" +" \n" +" Senza ESPR, restituisce \"$riga $nomefile\". Con ESPR, restituisce\n" +" \"$riga $subroutine $nomefile\"; questa informazione aggiuntiva può " +"essere usata\n" +" per fornire uno stack trace.\n" +" \n" +" Il valore dell'ESPR indica di quanti frame di chiamata tornare indietro " +"rispetto\n" +" a quello attuale; in cima c'è il frame 0.\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 a meno che non sia in esecuzione una funzione di shell o " +"che l'ESPR\n" +" non sia valida." + +#: builtins.c:387 +#, 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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Cambia la directory di lavoro della shell.\n" +" \n" +" Cambia la directory corrente a DIR. La DIR predefinita è il valore della " +"variabile\n" +" HOME della shell.\n" +" \n" +" La variabile CDPATH definisce il percorso di ricerca per la directory " +"che contiene\n" +" DIR. I nomi di directory alternative in CDPATH sono separati da un due " +"punti (:).\n" +" Una nome nullo di directory corrisponde alla directory corrente. Se DIR " +"inizia\n" +" con uno slash (/), CDPATH non viene usato.\n" +" \n" +" Se la directory non viene trovata e l'opzione di shell \"cdable_vars\" è " +"impostata,\n" +" si assume che la parola sia un nome di variabile. Se questa variabile ha " +"un valore,\n" +" viene usato per DIR.\n" +" \n" +" Opzioni:\n" +" -L\tForza a seguire i collegamenti simbolici\n" +" -P\tUsa la struttura fisica della directory senza seguire i " +"collegamenti\n" +" \tsimbolici\n" +" -e\tSe viene fornita l'opzione -P e non può essere determinata con " +"successo\n" +" \tla directory di lavoro corrente, esce con uno stato diverso da zero\n" +" \n" +" Il valore predefinito è seguire i collegamenti simbolici, come se fosse " +"specificato \"-L\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 se viene cambiata la directory o se $PWD è impostata con " +"successo quando\n" +" viene usato -P; altrimenti un valore diverso da zero." + +#: builtins.c:425 +#, fuzzy +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" +" \t\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 "" +"Stampa il nome della directory di lavoro corrente.\n" +" \n" +" Opzioni:\n" +" -L\tStampa il valore di $PWD se contiene il nome della directory\n" +" \tdi lavoro corrente\n" +" -P\tStampa la directory fisica senza alcun collegamento simbolico\n" +" \n" +" In maniera predefinita \"pwd\" si comporta come se fosse specificato \"-L" +"\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce 0 a meno che non venga fornita una opzione non valida o che " +"la\n" +" directory corrente non possa essere letta." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Comando nullo.\n" +" \n" +" Nessun effetto; il comando non esegue nulla.\n" +" \n" +" Stato di uscita:\n" +" ha sempre successo." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Restituisce successo come risultato.\n" +" \n" +" Stato di uscita:\n" +" ha sempre successo." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Restituisce un risultato di insuccesso.\n" +" \n" +" Stato di uscita:\n" +" Sempre un insuccesso." + +#: builtins.c:471 +#, fuzzy +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Esegue un comando semplice o visualizza informazioni sui comandi.\n" +" \n" +" Esegue il COMANDO con gli ARGOMENTI ignorando la ricerca delle funzioni " +"di shell o\n" +" visualizza informazioni sui COMANDI specificati. Può essere usato per " +"invocare comandi\n" +" sul disco quando esiste una funzione con lo stesso nome.\n" +" \n" +" Opzioni:\n" +" -p\tUsa un valore predefinito per il PERCORSO che garantisce che " +"vengano trovate tutte\n" +" \tle utilità standard\n" +" -v\tStampa una descrizione del COMANDO simile al comando interno \"type" +"\"\n" +" -V\tStampa una descrizione più prolissa di ciascun COMANDO\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del COMANDO o insuccesso se il COMANDO " +"non viene trovato." + +#: builtins.c:490 +#, 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Imposta i valori e gli attributi delle variabili.\n" +" \n" +" Dichiara le variabili e fornisce loro attributi. Se non vengono forniti " +"NOMI,\n" +" visualizza gli attributi e i valori di tutte le variabili.\n" +" \n" +" Opzioni:\n" +" -f\tLimita l'azione o la visualizzazione ai nomi e alle definizioni di " +"funzione\n" +" -F\tLimita la visualizzazione ai soli nomi di funzione (più numero di " +"riga e\n" +" \tfile sorgente durante il debug)\n" +" -g\tCrea variabili globali quando usato in una funzione di shell; " +"altrimenti\n" +" \tè ignorato\n" +" -p\tVisualizza gli attributi e i valori di ciascun NOME\n" +" \n" +" Opzioni che impostano gli attributi:\n" +" -a\tRende i NOMI array indicizzati (se supportata)\n" +" -A\tRende i NOMI array associativi (se supportata)\n" +" -i\tFornisce ai NOMI l'attributo \"integer\"\n" +" -l\tConverte i NOMI in lettere minuscole in fase di assegnazione\n" +" -r\tImposta i NOMI in sola lettura\n" +" -t\tFornisce ai NOMI l'attributo \"trace\"\n" +" -u\tConverte i NOMI in lettere maiuscole in fase di assegnazione\n" +" -x\tImposta i NOMI come esportabili\n" +" \n" +" Usando \"+\" al posto di \"-\" disattiva l'attributo fornito.\n" +" \n" +" Le variabili con attributo intero vengono valutate aritmeticamente " +"(vedere\n" +" il comando \"let\") quando alla variabile è assegnato un valore.\n" +" \n" +" Quando viene usato in una funzione, \"declare\" rende locali i NOMI, " +"come con\n" +" il comando \"local\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Imposta valori e attributi di variabile.\n" +" \n" +" Obsoleto. Vedere \"help declare\"." + +#: builtins.c:540 +#, fuzzy +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definisce variabili locali.\n" +" \n" +" Crea una variabile locale chiamata NOME fornendogli un VALORE. L'OPZIONE " +"può\n" +" essere una qualsiasi opzione accettata da \"declare\".\n" +" \n" +" Le variabili locali possono essere usate solo all'interno di una " +"funzione; sono\n" +" visibili solo alla funzione nella quale sono definite e ai relativi " +"figli.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita un'opzione non valida, " +"non si\n" +" riscontri un errore o la shell non stia eseguendo una funzione." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Scrive argomenti sullo standard output.\n" +" \n" +" Visualizza gli ARG sullo standard output seguiti da un ritorno a capo.\n" +" \n" +" Opzioni:\n" +" -n\tNon accoda un carattere di ritorno a capo\n" +" -e\tAbilita l'interpretazione dei seguenti caratteri backslash di " +"escape\n" +" -E\tDisabilita esplicitamente l'interpretazione dei caratteri " +"backslash di escape\n" +" \n" +" \"echo\" interpreta i seguenti caratteri backslash di escape:\n" +" \\a\tavviso (campanello)\n" +" \\b\tbackspace\n" +" \\c\telimina ulteriore output\n" +" \\e\tcarattere di escape\n" +" \\f\tavanzamento pagina\n" +" \\n\tritorno a capo\n" +" \\r\tritorno carrello\n" +" \\t\ttabulazione orizzontale\n" +" \\v\ttabulazione verticale\n" +" \\\\\tbackslash\n" +" \\0nnn\til carattere il cui codice ASCII è NNN (ottale). NNN può " +"avere\n" +" \tda 0 a 3 cifre ottali\n" +" \\xHH\til carattere otto bit il cui valore è HH (esadecimale). HH " +"può\n" +" \tavere una o due cifre esadecimali\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga riscontrato un errore di " +"scrittura." + +#: builtins.c:597 +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 "" +"Scrive argomenti sullo standard output.\n" +" \n" +" Visualizza gli ARG sullo standard output seguiti da un ritorno a capo.\n" +" \n" +" Opzioni:\n" +" -n\tNon accoda un ritorno a capo\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga riscontrato un errore di " +"scrittura." + +#: builtins.c:612 +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 "" +"Abilita o disabilita comandi interni di shell.\n" +" \n" +" Abilita o disabilita comandi interni di shell. La disabilitazione " +"permette di\n" +" eseguire un comando su disco che abbia lo stesso nome del comando " +"interno\n" +" di shell senza dover usare un nome di percorso completo.\n" +" \n" +" Opzioni:\n" +" -a\tStampa un elenco di comandi interni mostrando se sono abilitati o " +"meno\n" +" -n\tDisabilita ogni NOME o visualizza un elenco di comandi interni " +"disabilitati\n" +" -p\tStampa l'elenco dei comandi interni in un formato riusabile\n" +" -s\tStampa solo i nomi dei comandi interni \"speciali\" Posix\n" +" \n" +" Opzioni che controllano il caricamento dinamico:\n" +" -f\tCarica il comando interno NOME dall'oggetto condiviso NOMEFILE\n" +" -d\tRimuove un comando interno caricato con -f\n" +" \n" +" Senza opzioni viene abilitato ogni NOME.\n" +" \n" +" Per usare il comando \"test\" trovato in $PATH invece di quello interno " +"della\n" +" shell, digitare \"enable -n test\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che NOME non sia un comando interno di shell " +"o si riscontri un errore." + +#: builtins.c:640 +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 "" +"Esegue argomenti come un comando di shell.\n" +" \n" +" Combina gli ARGOMENTI dentro una singola stringa usando il risultato\n" +" come input per la shell ed esegue i comandi risultanti.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del comando o successo se il comando è " +"nullo." + +#: builtins.c:652 +#, 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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Analizza gli argomenti di opzione.\n" +" \n" +" Getopts è usato dalle procedure di shell per analizzare i parametri\n" +" posizionali come opzioni.\n" +" \n" +" STRINGAOPZ contiene le lettere di opzione da riconoscere; se una " +"lettera\n" +" è seguita da un due punti, ci si aspetta che l'opzione abbia un " +"argomento,\n" +" che dovrebbe essere separato da uno spazio.\n" +" \n" +" Ogni volta che viene evocato getopts posiziona l'opzione successiva\n" +" nella variabile di shell $nome inizializzando il nome, se non esiste,\n" +" e l'indice dell'argomento successivo da elaborare nella variabile di\n" +" shell OPTIND. OPTIND è inizializzata a 1 ogni volta che viene invocata\n" +" la shell o uno script di shell. Quando una opzione richiede un " +"argomento,\n" +" getopts posiziona tale argomento nella variabile di shell OPTARG.\n" +" \n" +" getopts riporta gli errori in uno o due modi. Se il primo carattere " +"della\n" +" STRINGAOPZ è un due punti, riporta gli errori in silenzio. In questa\n" +" modalità non vengono stampati messaggi di errore. Se viene riscontrata " +"una\n" +" opzione non valida, getopts posiziona il carattere di opzione trovato " +"in\n" +" ARGOPZ. Se un argomento richiesto non viene trovato, getopts posiziona\n" +" un \":\" nel NOME e imposta ARGOPZ al carattere di opzione trovato. Se " +"getopts\n" +" non è in modalità silenziosa e viene riscontrata una opzione non valida, " +"getopts\n" +" posiziona \"?\" nel NOME e azzera ARGOPZ. Se un argomento richiesto non " +"viene\n" +" trovato, viene posizionato un \"?\" nel NOME, ARGOPZ viene azzerato e " +"viene stampato\n" +" un messaggio diagnostico.\n" +" \n" +" Se il valore della variabile di shell ERROPZ è pari a 0, getopts " +"disabilita\n" +" la stampa dei messaggi di errore anche se il primo carattere della " +"STRINGAOPZ\n" +" non è un due punti. Il valore predefinito di ERROPZ è pari a 1.\n" +" \n" +" Getopts normalmente analizza i parametri posizionali ($0 - $9), ma se\n" +" vengono forniti più argomenti, vengono analizzati questi ultimi.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se viene trovata una opzione, insuccesso se viene " +"raggiunta\n" +" la fine delle opzioni o viene riscontrato un errore." + +#: builtins.c:694 +#, fuzzy +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Sostituisce la shell con il comando fornito.\n" +" \n" +" Esegue il COMANDO, sostituendo questa shell con il programma " +"specificato.\n" +" Gli ARGOMENTI diventano gli argomenti per il COMANDO. Se il COMANDO non " +"è specificato,\n" +" ogni redirezione avrà effetto nella shell corrente.\n" +" \n" +" Opzioni:\n" +" -a nome\tPassa NOME come l'argomento zero per il COMANDO\n" +" -c\t\tEsegue il COMANDO con un ambiente vuoto\n" +" -l\t\tPosiziona un trattino nell'argomento zero per il COMANDO\n" +" \n" +" Se il comando non può essere eseguito una shell non interattiva esce, a " +"meno che\n" +" non venga impostata l'opzione di shell \"execfail\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia trovato il COMANDO o si " +"riscontri un errore di ridirezione." + +#: builtins.c:715 +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 "" +"Esce dalla shell.\n" +" \n" +" Esce dalla shell con uno stato N. Se N è omesso lo stato di uscita\n" +" è quello dell'ultimo comando eseguito." + +#: builtins.c:724 +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 "" +"Esce da una shell di login.\n" +" \n" +" Esce da una shell di login con stato di uscita N. Restituisce un errore " +"se non eseguito\n" +" in una shell di login." + +#: builtins.c:734 +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 "" +"Visualizza o esegue comandi dall'elenco della cronologia.\n" +" \n" +" fc è usato per elencare, modificare e rieseguire comandi dall'elenco " +"della cronologia.\n" +" PRIMO e ULTIMO possono essere numeri che specificano l'intervallo oppure " +"PRIMO può\n" +" essere una stringa, nel qual caso significa il comando più recente che " +"inizia con\n" +" quella stringa.\n" +" \n" +" Opzioni:\n" +" -e EDITOR\tSeleziona l'editor da usare. Il predefinito è FCEDIT, " +"quindi EDITOR,\n" +" \t\tinfine vi\n" +" -l \tElenca le righe invece di modificarle\n" +" -n\tOmette i numeri di riga nell'elencare i comandi\n" +" -r\tInverte l'ordine delle righe (elenca prima le più recenti)\n" +" \n" +" Con il formato \"fc -s [pat=rep ...] [comando]\", il COMANDO è\n" +" rieseguito dopo aver effettuato la sostituzione VECCHIO=NUOVO.\n" +" \n" +" Un alias utile da usare insieme è r=\"fc -s\", in modo che digitando \"r " +"cc\"\n" +" viene eseguito l'ultimo comando che inizia con \"cc\" e digitando \"r\" " +"riesegue\n" +" l'ultimo comando.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo o lo stato del comando eseguito, non zero se si " +"riscontra un errore." + +#: builtins.c:764 +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 "" +"Sposta i job in primo piano.\n" +" \n" +" Mette il job identificato da SPEC_JOB in primo piano, rendendolo il\n" +" job corrente. Se SPEC_JOB non è presente, viene usata la nozione di\n" +" job corrente della shell.\n" +" \n" +" Stato di uscita:\n" +" Stato del comando messo in primo piano, o insuccesso se si riscontra un " +"errore." + +#: builtins.c:779 +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 "" +"Sposta i job sullo sfondo.\n" +" \n" +" Mette il jobs identificato da ogni SPEC_JOB sullo sfondo, come se " +"fossero\n" +" stati avviati con \"&\". Se SPEC_JOB non è presente, viene usata la " +"nozione\n" +" di job corrente della shell.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che il controllo dei job non sia abilitato o " +"si riscontri un errore." + +#: builtins.c:793 +#, fuzzy +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Ricorda o visualizza le posizioni dei programmi.\n" +" \n" +" Determina e ricorda il nome completo di percorso per ogni comando NOME. " +"Se non\n" +" viene fornito alcun argomento, sono visualizzate le informazioni sui " +"comandi memorizzati.\n" +" \n" +" Opzioni:\n" +" -d\t\tDimentica la posizione memorizzata di ogni NOME\n" +" -l\t\tVisualizza in un formato che può essere riusato come input\n" +" -p nomepercorso\tUsa NOMEPERCORSO come il nome completo di percorso " +"per NOME\n" +" -r\t\tDimentica tutte le posizioni memorizzate\n" +" -t\t\tStampa la posizione memorizzata di ogni NOME, facendo\n" +" \t\tprecedere ciascuna posizione con il NOME corrispondente se vengono\n" +" \t\tforniti valori NOME multipli\n" +" Argomenti:\n" +" NOME\t\tOgni NOME è ricercato in $PATH e aggiunto all'elenco\n" +" \t\tdei comandi memorizzati.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia trovato NOME o sia fornita una " +"opzione non valida." + +#: builtins.c:818 +#, fuzzy +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Visualizza informazioni sui comandi interni.\n" +" \n" +" Visualizza un breve sommario dei comandi interni. Se viene specificato " +"il\n" +" MODELLO fornisce un aiuto dettagliato su tutti i comandi corrispondenti " +"al\n" +" MODELLO, altrimenti viene stampato l'elenco degli argomenti di aiuto.\n" +" \n" +" Opzioni:\n" +" -d\tVisualizza una breve descrizione per ciascun argomento\n" +" -m\tVisualizza l'uso in formato pseudo manpage\n" +" -s\tVisualizza solo una breve sintassi sull'uso per ciascun argomento " +"che\n" +" \tcorrisponde al MODELLO\n" +" \n" +" Argomenti:\n" +" MODELLO\tModello che specifica un argomento di aiuto\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga trovato il MODELLO o sia " +"fornita una opzione non valida." + +#: builtins.c:842 +#, 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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 "" +"Visualizza o manipola l'elenco della cronologia.\n" +" \n" +" Visualizza l'elenco della cronologia con i numeri di riga, aggiungendo a " +"ciascuna voce\n" +" modificata il prefisso \"*\". Un argomento pari a N elenca solo le " +"ultime N voci.\n" +" \n" +" Opzioni:\n" +" -c\tPulisce la cronologia eliminando tutte le voci\n" +" -d posiz\tElimina la voce della cronologia alla posizione POSIZ.\n" +" \n" +" -a\tAccoda righe al file della cronologia relative alla sessione " +"attuale\n" +" -n\tLegge tutte le righe non ancora lette dal file della cronologia\n" +" -r\tLegge il file della cronologia e ne accoda il contenuto all'elenco " +"della\n" +" \t\tcronologia\n" +" -w\tScrive la cronologia corrente nel file della cronologia\n" +" \t\te ne accoda le voci all'elenco della cronologia\n" +" \n" +" -p\tEffettua l'espansione della cronologia su ciascun ARG e visualizza " +"il\n" +" \t\trisultato senza memorizzarlo nell'elenco della cronologia\n" +" -s\tAccoda gli ARG all'elenco della cronologia come una voce singola\n" +" \n" +" Se viene fornito il NOMEFILE, viene usato come file della cronologia. " +"Altrimenti,\n" +" se presente, viene usato il valore di $HISTFILE, in alternativa ~/." +"bash_history.\n" +" \n" +" Se la variabile $HISTTIMEFORMAT è impostata e non è nulla, il suo valore " +"viene usato\n" +" come una stringa di formato per strftime(3) per stampare l'orario " +"associato a ciascuna\n" +" voce di cronologia visualizzata. Altrimenti non viene stampato alcun " +"orario.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:879 +#, 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\tlists only processes that have changed status since the last\n" +" \t\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 "" +"Visualizza lo stato dei job.\n" +" \n" +" Elenca i job attivi. SPECJOB limita l'output a quei job.\n" +" Senza opzioni, è visualizzato lo stato di tutti i job attivi.\n" +" \n" +" Opzioni:\n" +" -l\tElenca gli ID dei processi in aggiunta alle normali informazioni\n" +" -n\tElenca solo i processi che hanno cambiato stato dall'ultima\n" +" \tnotifica\n" +" -p\tElenca solo l'ID dei processi\n" +" -r\tLimita l'output ai job in esecuzione\n" +" -s\tLimita l'output ai processi fermati\n" +" \n" +" Se viene fornito -x, il COMANDO è eseguito dopo che tutte le specifiche " +"dei job che\n" +" appaiono in ARGOMENTI sono state rimpiazzate con l'ID del processo " +"leader nel gruppo di\n" +" quel job.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore.\n" +" Se viene usato -x, restituisce lo stato di uscita del COMANDO." + +#: builtins.c:906 +#, fuzzy +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" +" \t\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 "" +"Rimuove job dalla shell corrente.\n" +" \n" +" Rimuove ciascun argomento SPECJOB dalla tabella dei job attivi. Senza " +"alcun\n" +" SPECJOB, la shell usa la sua nozione del job corrente.\n" +" \n" +" Opzioni:\n" +" -a\tRimuove tutti i job se non viene fornito uno SPECJOB\n" +" -h\tMarca ciascun SPECJOB in modo che non venga inviato un SIGHUP al " +"job se la\n" +" \tshell lo riceve\n" +" -r\tRimuove solo i job in esecuzione\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o uno SPECJOB." + +#: builtins.c:925 +#, 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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"Invia un segnale a un job.\n" +" \n" +" Invia il segnale chiamato dallo SPECSEGN o dal NUMSEGN ai processi " +"identificati\n" +" dal PID o dallo SPECJOB. Se non è presente né lo SPECSEGN né il " +"NUMSEGN, viene\n" +" allora considerato SIGTERM.\n" +" \n" +" Opzioni:\n" +" -s segn\tSEGN è il nome di un segnale\n" +" -n segn\tSEGN è il numero di un segnale\n" +" -l\tElenca i nomi dei segnali; Se ci sono argomenti dopo \"-l\"\n" +" \tvengono valutati come numeri di segnale di cui elencare i nomi\n" +" \n" +" Kill è un comando interno di shell per due ragioni: permette di usare " +"gli ID\n" +" dei job invece degli ID dei processi e permette di uccidere quei " +"processi che\n" +" abbiano raggiunto un numero limite prefissato di processi creabili.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:949 +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 "" +"Valuta espressioni aritmetiche.\n" +" \n" +" Valuta ciascun ARG come una espressione aritmetica. La valutazione è " +"effettuata con\n" +" interi a larghezza fissa senza alcun controllo per overflow, sebbene la " +"divisione\n" +" per 0 sia bloccata e contrassegnata come un errore. Il seguente elenco " +"di operatori\n" +" è raggruppato per livelli di operatore di uguale precedenza. I livelli " +"sono elencati\n" +" in ordine di precedenza decrescente.\n" +" \n" +" \tid++, id--\tIncremento e decremento successivo di variabile\n" +" \t++id, --id\tIncremento e decremento precedente di variabile\n" +" \t-, +\t\tMeno e più unari\n" +" \t!, ~\t\tNegazione logica e bit a bit\n" +" \t**\t\tEsponenziazione\n" +" \t*, /, %\t\tMoltiplicazione, divisione, resto\n" +" \t+, -\t\tAddizione, sottrazione\n" +" \t<<, >>\t\tScorrimento bit a bit sinistro e destro\n" +" \t<=, >=, <, >\tComparazione\n" +" \t==, !=\t\tUguaglianza, disuguaglianza\n" +" \t&\t\tAND bit a bit\n" +" \t^\t\tXOR bit a bit\n" +" \t|\t\tOR bit a bit\n" +" \t&&\t\tAND logico\n" +" \t||\t\tOR logico\n" +" \tespr ? espr : espr\n" +" \t\t\tOperatore condizionale\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tAssegnazione\n" +" \n" +" Le variabili di shell sono ammesse come operandi. Il nome della " +"variabile è\n" +" sostituito dal suo valore (forzato a un intero a larghezza fissa) " +"all'interno\n" +" di una espressione. Non è necessario che la variabile abbia il proprio " +"attributo\n" +" intero abilitato per essere usata in una espressione.\n" +" \n" +" Gli operatori sono valutati in ordine di precedenza. Le " +"sottoespressioni tra\n" +" parentesi sono valutate per prime e possono avere la precedenza sulle " +"regole\n" +" sopradescritte.\n" +" \n" +" Stato di uscita:\n" +" Se l'ultimo ARG viene valutato pari a 0 restituisce 1, altrimenti " +"restituisce 0." + +#: builtins.c:994 +#, 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. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Legge una riga dallo standard input e la divide in campi.\n" +" \n" +" Legge una singola riga dallo standard input o, se viene fornita " +"l'opzione -u,\n" +" dal descrittore di file FD. La riga è divisa in campi corrispondenti a\n" +" parole dove la prima parola è assegnata al primo NOME, la seconda " +"parola\n" +" al secondo NOME e così via, con ciascuna parola rimanente assegnata al\n" +" corrispondente ultimo NOME. Sono riconosciuti come delimitatori di " +"parola\n" +" solo quelli presenti in $IFS.\n" +" \n" +" Se non viene fornito alcun NOME, la riga letta è memorizzata nella " +"variabile REPLY.\n" +" \n" +" Opzioni:\n" +" -a array\tAssegna le parole lette agli indici sequenziali della " +"variabile\n" +" \t\tdi ARRAY, iniziando da zero\n" +" -d delim\tContinua fino alla lettura del primo carattere di DELIM, " +"invece\n" +" \t\tdi un ritorno a capo \n" +" -e\t\tUsa Readline per ottenere la riga in una shell interattiva\n" +" -i testo\tUsa TESTO come testo iniziale per Readline\n" +" -n ncarat\tRitorna dopo la lettura di NCARAT caratteri invece di " +"attendere\n" +" \t\tun a capo, ma rispetta un delimitatore se vengono letti meno di\n" +" \t\tNCARAT caratteri prima del delimitatore stesso\n" +" -N ncarat\tRitorna solo dopo la lettura di NCARAT caratteri esatti, a " +"meno che non si\n" +" \t\triscontri un EOF o un time out di lettura, ignorando qualsiasi " +"delimitatore\n" +" -p stringa\tVisualizza la stringa PROMPT senza un a capo finale prima\n" +" \t\tdel tentativo di lettura\n" +" -r\t\tNon ammette backslash per fare l'escape dei caratteri\n" +" -s\t\tNon fa l'echo dell'input proveniente da un terminale\n" +" -t secondi\tVa in timeout e restituisce insuccesso se non viene letta " +"una\n" +" \t\triga di input completa entro i SECONDI forniti. Il valore della\n" +" \t\tvariabile TMOUT è il timeout predefinito. SECONDI può essere\n" +" \t\tuna frazione. Se SECONDI è pari a 0, la lettura restituisce " +"successo\n" +" \t\tsolo se l'input è disponibile sul descrittore di file specificato. " +"Lo\n" +" \t\tstato di uscita è maggiore di 128 se viene superato il timeout\n" +" -u fd\t\tLegge dal descrittore di file FD invece che dallo standard " +"input\n" +" \n" +" Stato di uscita:\n" +" Il codice restituito è zero a meno che non sia riscontrato un EOF, un " +"timeout in lettura\n" +" o venga fornito un descrittore di file non valido come argomento per -u." + +#: builtins.c:1042 +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 "" +"Ritorna da una funzione di shell.\n" +" \n" +" Causa l'uscita da una funzione o da uno script sorgente con il valore " +"di\n" +" ritorno specificato da N. Se N è omesso, lo stato di ritorno è quello\n" +" dell'ultimo comando eseguito all'interno della funzione o dello script.\n" +" \n" +" Stato di uscita:\n" +" Restituisce N, oppure insuccesso se la shell non sta eseguendo una " +"funzione o uno script." + +#: builtins.c:1055 +#, 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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"Imposta o azzera i valori delle opzioni di shell e dei parametri " +"posizionali.\n" +" \n" +" Cambia il valore degli attributi di shell e dei parametri posizionali, " +"o\n" +" visualizza i nomi e i valori delle variabili di shell.\n" +" \n" +" Opzioni:\n" +" -a Marca le variabili che sono modificate o create per " +"l'esportazione.\n" +" -b Notifica immediatamente della terminazione di un job.\n" +" -e Esce immediatamente se un comando esce con uno stao diverso da " +"zero.\n" +" -f Disabilita la generazione dei nomi file (globbing).\n" +" -h Ricorda la posizione dei comandi quando vengono cercati.\n" +" -k Tutte le assegnazioni degli argomenti sono posizionate " +"nell'ambiente per un\n" +" comando, non solo quelle che precedono il nome del comando " +"stesso.\n" +" -m Abilita il controllo dei job.\n" +" -n Legge i comandi senza eseguirli.\n" +" -o nome-opzione\n" +" Imposta la variabile corrispondente al nome dell'opzione:\n" +" allexport Uguale a -a\n" +" braceexpand Uguale a -B\n" +" emacs Usa una interfaccia di modifica righe di stile " +"emacs\n" +" errexit Uguale a -e\n" +" errtrace Uguale a -E\n" +" functrace Uguale a -T\n" +" hashall Uguale a -h\n" +" histexpand Uguale a -H\n" +" history Abilita la cronologia comandi\n" +" ignoreeof Non esce dalla shell dopo aver raggiunto EOF\n" +" interactive-comments\n" +" Permette ai commenti di comparire nei comandi " +"interattivi\n" +" keyword Uguale a -k\n" +" monitor Uguale a -m\n" +" noclobber Uguale a -C\n" +" noexec Uguale a -n\n" +" noglob Uguale a -f\n" +" nolog Accettato al momento ma ignorato\n" +" notify Uguale a -b\n" +" nounset Uguale a -u\n" +" onecmd Uguale a -t\n" +" physical Uguale a -P\n" +" pipefail Il valore restituito da una pipeline è lo stato\n" +" dell'ultimo comando che esce con uno stato " +"diverso da zero,\n" +" oppure zero se nessun comando esce con uno stato " +"diverso da zero\n" +" posix Modifica il comportamento di bash dove " +"l'operazione\n" +" predefinita è diversa dallo standard Posix per " +"rispettare\n" +" lo standard stesso\n" +" privileged Uguale a -p\n" +" verbose Uguale a -v\n" +" vi Usa un'editor di riga stile vi\n" +" xtrace Uguale a -x\n" +" -p Abilitato ogni qualvolta gli id utente reali non corrispondono a " +"quelli effettivi.\n" +" Disabilita l'analisi del file $ENV e l'importazione delle funzioni " +"di\n" +" shell. Disabilitare questa opzione comporta l'impostazione degli\n" +" uid e gid effettivi a uid e gid reali.\n" +" -t Esce dopo la lettura e l'esecuzione di un comando.\n" +" -u Tratta le variabili non impostate come un errore durante la " +"sostituzione.\n" +" -v Stampa le righe di input della shell mentre vengono lette.\n" +" -x Stampa i comandi e i loro argomenti mentre vengono eseguiti.\n" +" -B La shell effettua l'espansione delle parentesi graffe\n" +" -C Se impostata, non permette la sovrascrittura dei file regolari " +"esistenti\n" +" da parte della redirezione dell'output.\n" +" -E Se impostata, la trap ERR è ereditata dalle funzioni di shell.\n" +" -H Abilita la sostituzione per la cronologia stile !. Questo flag è " +"abilitato\n" +" in modo predefinito quando la shell è interattiva.\n" +" -P Se impostata, non segue i link simbolici quando vengono eseguiti " +"dei comandi\n" +" come cd, il quale cambia la directory corrente.\n" +" -T Se impostata, la trap DEBUG è ereditata dalle funzioni di shell.\n" +" -- Assegna tutti gli argomenti rimasti ai parametri posizionali.\n" +" Se non sono rimasti argomenti, i parametri posizionali\n" +" vengono azzerati.\n" +" - Assegna tutti gli argomenti rimasti ai parametri posizionali.\n" +" Le opzioni -x e -v sono disabilitate.\n" +" \n" +" Usando + al posto di - questi flag vengono disabilitati. I\n" +" flag possono anche essere usati subito dopo l'invocazione della shell. " +"Il set corrente\n" +" dei flag può essere trovato in $-. I restanti n ARG sono parametri\n" +" posizionali e vengono assegnati, in ordine, a $1, $2, .. $n. Se non\n" +" vengono forniti ARG, vengono stampate tutte le variabili di shell.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida." + +#: builtins.c:1140 +#, fuzzy +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Azzera i valori e gli attributi delle variabili e delle funzioni di shell.\n" +" \n" +" Per ciascun NOME, rimuove la corrispondente variabile o funzione.\n" +" \n" +" Opzioni:\n" +" -f\tConsidera ciascun NOME come una funzione di shell\n" +" -v\tConsidera ciascun NOME come una variabile di shell\n" +" \n" +" Senza opzioni, unset prova prima ad azzerare una variabile e, in caso di " +"insuccesso,\n" +" prova ad azzerare una funzione.\n" +" \n" +" Alcune variabili non possono essere azzerate; vedere anche \"readonly" +"\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"NOME sia in sola lettura." + +#: builtins.c:1162 +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 "" +"Imposta l'attributo di esportazione per le variabili di shell.\n" +" \n" +" Marca ciascun NOME per l'esportazione automatica all'ambiente dei " +"comandi\n" +" eseguiti successivi. Se è fornito un VALORE, lo assegna prima " +"dell'esportazione.\n" +" \n" +" Opzioni:\n" +" -f\tRimanda alle funzioni di shell\n" +" -n\tRimuove la proprietà di esportazione da ciascun NOME\n" +" -p\tVisualizza un elenco di tutte le variabili e funzioni esportate\n" +" \n" +" L'argomento \"--\" disabilita l'elaborazione di ulteriori opzioni.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"il NOME non sia valido." + +#: builtins.c:1181 +#, fuzzy +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 la variabili di shell come non modificabili.\n" +" \n" +" Marca ciascun NOME in sola lettura; i valori di questi NOMI non possono\n" +" essere modificati da un assegnamento successivo. Se viene fornito il\n" +" VALORE, lo assegna prima di marcarlo in sola lettura.\n" +" \n" +" Opzioni:\n" +" -a\tRimanda alle variabili degli array indicizzati\n" +" -A\tRimanda alle variabili degli array associativi\n" +" -f\tRimanda alle funzioni di shell\n" +" -p\tVisualizza un elenco di tutte le variabili e le funzioni in sola " +"lettura\n" +" \n" +" Un argomento pari a \"--\" disabilita ulteriori analisi delle opzioni.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o NOME non sia valido." + +#: builtins.c:1203 +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 "" +"Sposta i parametri posizionali.\n" +" \n" +" Rinomina i parametri posizionali $N+1,$N+2 ... a $1,$2 ... Se N non\n" +" è fornito, viene assunto a 1.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che N non sia negativo o maggiore di $#." + +#: builtins.c:1215 builtins.c:1230 +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 "" +"Esegue comandi da un file nella shell corrente.\n" +" \n" +" Legge ed esegue comandi da NOMEFILE nella shell corrente. Le voci\n" +" in $PATH sono usate per trovare la directory contenente il NOMEFILE.\n" +" Se vengono forniti ARGOMENTI, essi diventano i parametri di posizione\n" +" quando viene eseguito NOMEFILE.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito in NOMEFILE; " +"insuccesso se\n" +" il NOMEFILE non può essere letto." + +#: builtins.c:1246 +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 "" +"Sospende l'esecuzione della shell.\n" +" \n" +" Sospende l'esecuzione di questa shell fino a che non riceve un segnale " +"SIGCONT.\n" +" A meno di forzature, le shell di login non possono essere sospese.\n" +" \n" +" Opzioni:\n" +" -f\tForza la sospensione, anche se in presenza di una shell di login\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia abilitato il controllo job o si " +"riscontri un errore." + +#: builtins.c:1262 +#, 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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Analizza espressioni condizionali.\n" +" \n" +" Esce con stato 0 (vero) o 1 (falso) in base all'analisi\n" +" dell'ESPR. Le espressioni possono essere unarie o binarie. Le\n" +" espressioni unarie sono spesso usate per esaminare lo stato di un file.\n" +" Esistono anche operatori di stringa e di comparazione numerica.\n" +" \n" +" Il comportamento del test dipende dal numero degli argomenti. Leggere\n" +" la pagina di manuale di bash per le specifiche complete.\n" +" \n" +" Operatori su file:\n" +" \n" +" -a FILE Vero se il file esiste.\n" +" -b FILE Vero se è un file speciale a blocchi.\n" +" -c FILE Vero se è un file speciale a caratteri.\n" +" -d FILE Vero se il file è una directory.\n" +" -e FILE Vero se il file esiste.\n" +" -f FILE Vero se il file esiste ed è un file regolare.\n" +" -g FILE Vero se il file è un set-group-id.\n" +" -h FILE Vero se il file è un link simbolico.\n" +" -L FILE Vero se il file è un link simbolico.\n" +" -k FILE Vero se il file ha il suo bit \"sticky\" impostato.\n" +" -p FILE Vero se il file è una pipe con nome.\n" +" -r FILE Vero se il file è leggibile dall' utente corrente.\n" +" -s FILE Vero se il file esiste e non è vuoto.\n" +" -S FILE Vero se il file è un socket.\n" +" -t FD Vero se il descrittore di file è aperto su un " +"terminale.\n" +" -u FILE Vero se il file è un set-user-id.\n" +" -w FILE Vero se il file è scrivibile dall'utente corrente.\n" +" -x FILE Vero se il file è eseguibile dall'utente corrente.\n" +" -O FILE Vero se l'utente corrente è il reale proprietario del " +"file.\n" +" -G FILE Vero se il gruppo dell'utente corrente è il reale " +"proprietario del file.\n" +" -N FILE Vero se il file è stato modificato dall'ultima volta " +"che è stato letto.\n" +" \n" +" FILE1 -nt FILE2 Vero se il file1 è più recente del file2 (in accordo " +"con la\n" +" data di modifica).\n" +" \n" +" FILE1 -ot FILE2 Vero se il file1 è più vecchio del file2.\n" +" \n" +" FILE1 -ef FILE2 Vero se il file1 è un link hardware al file2.\n" +" \n" +" Operatori di stringa:\n" +" \n" +" -z STRINGA Vero se la stringa e vuota.\n" +" \n" +" -n STRINGA\n" +" STRINGA Vero se la stringa non è vuota.\n" +" \n" +" STRINGA1 = STRINGA2\n" +" Vero se le stringhe sono uguali.\n" +" STRINGA1 != STRINGA2\n" +" Vero se le stringhe non sono uguali.\n" +" STRINGA1 < STRINGA2\n" +" Vero se la STRINGA1 viene ordinata lessicograficamente " +"prima della STRINGA2.\n" +" STRINGA1 > STRINGA2\n" +" Vero se la STRINGA1 viene ordinata lessicograficamente " +"dopo la STRINGA2.\n" +" \n" +" Altri operatori:\n" +" \n" +" -o OPZIONE Vero se l'OPZIONE di shell è abilitata.\n" +" -v VAR\t Vero se la variabile di shell VAR è impostata.\n" +" ! ESPR Vero se l'ESPR è falsa.\n" +" ESPR1 -a ESPR2 Vero se entrambe le espressioni espr1 E espr2 sono " +"vere.\n" +" ESPR1 -o ESPR2 Vero se sono vere le espressioni espr1 O espr2.\n" +" \n" +" arg1 OP arg2 Test aritmetici. OP è uno tra -eq, -ne,\n" +" -lt, -le, -gt oppure -ge.\n" +" \n" +" Gli operatori aritmetici binari restituiscono vero se ARG1 è uguale, non " +"uguale,\n" +" più piccolo di, più piccolo o uguale, più grande di o più grande o " +"uguale\n" +" ad ARG2.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se l'ESPR viene valutata vera; insuccesso se l'ESPR " +"viene valutata\n" +" falsa o viene fornito un argomento non valido." + +#: builtins.c:1344 +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 "" +"Valuta l'espressione condizionale.\n" +" \n" +" Questo è un sinonimo del comando interno \"test\", ma l'ultimo argomento " +"deve\n" +" essere un \"]\" letterale per corrispondere al \"[\" di apertura." + +#: builtins.c:1353 +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 "" +"Visualizza le durate dei processi.\n" +" \n" +" Stampa i tempi utente e di sistema accumulati per la shell e per tutti " +"i\n" +" relativi processi figli.\n" +" \n" +" Stato di uscita:\n" +" Sempre successo." + +#: builtins.c:1365 +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. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\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 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 "" +"Esegue il trap dei segnali e di altri eventi.\n" +" \n" +" Definisce e attiva i gestori da eseguire quando la shell riceve segnali\n" +" o altre condizioni.\n" +" \n" +" ARG è un comando da leggere ed eseguire quando la shell riceve il o i\n" +" segnali SPEC_SEGNALE. Se ARG o \"-\" non sono presenti (e viene " +"fornito\n" +" un singolo SPEC_SEGNALE), ciascun segnale specificato è riportato\n" +" al suo valore originario. Se ARG è pari a null, ogni SPEC_SEGNALE è\n" +" ignorato dalla shell e dai comandi che invoca.\n" +" \n" +" Se uno SPEC_SEGNALE è EXIT (0) ARG viene eseguito all'uscita dalla " +"shell. Se\n" +" lo SPEC_SEGNALE è DEBUG, ARG viene eseguito prima di ogni comando " +"semplice. Se\n" +" uno SPEC_SEGNALE è RETURN, ARG viene eseguito al termine di ogni " +"esecuzione\n" +" di una funzione di shell o di uno script avviato dai comandi interni . o " +"source.\n" +" Un SPEC_SEGNALE di ERR significa eseguire ARG ogni volta che un errore " +"di comando\n" +" causi l'uscita della shell quando è abilitata l'opzione -e.\n" +" \n" +" Se non vengono forniti argomenti, trap stampa l'elenco di comandi " +"associati\n" +" a ciascun segnale.\n" +" \n" +" Ozioni:\n" +" -l\tStampa un elenco di nomi di segnale e i loro corrispondenti " +"numeri\n" +" -p\tVisualizza i comandi trap associati a ciascun SPEC_SEGNALE\n" +" \n" +" Ciascun SPEC_SEGNALE è un nome di segnale in oppure un numero " +"di segnale.\n" +" I nomi di segnale sono case insensitive e il prefisso SIG è opzionale. " +"Per\n" +" inviare un segnale alla shell usare \"kill -signal $$\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che SPEC_SEGNALE non sia valido o si " +"fornisca una opzione non valida." + +#: builtins.c:1401 +#, fuzzy +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 "" +"Visualizza informazioni sul tipo di comando.\n" +" \n" +" Per ciascun NOME, indica come sarebbe interpretato se fosse usato come\n" +" un nome di comando.\n" +" \n" +" Opzioni:\n" +" -a\tVisualizza tutte le posizioni contenenti un eseguibile chiamato " +"NOME,\n" +" \tincludendo alias, comandi interni e funzioni se e solo se\n" +" \tnon viene usata anche l'opzione \"-p\"\n" +" -f\tNon esegue la ricerca delle funzioni di shell\n" +" -P\tForza una ricerca del PERCORSO per ciascun NOME anche se è un " +"alias,\n" +" \tun comando interno o una funzione, e restituisce il nome del file su " +"disco\n" +" \tche sarebbe eseguito\n" +" -p\tRestituisce o il nome del file su disco che sarebbe eseguito,\n" +" \toppure niente se \"type -t NOME\" non restituisce \"file\".\n" +" -t\tVisualizza una singola parola che è una tra \"alias\", \"keyword" +"\",\n" +" \t\"function\", \"builtin\", \"file\" or \"\", se il NOME è " +"rispettivamente un alias,\n" +" \tuna parola riservata di shell, una funzione di shell, un comando " +"interno di shell,\n" +" \tun file su disco o non trovato\n" +" \n" +" Argomenti:\n" +" NOME\tIl nome del comando da interpretare.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se tutti i NOMI vengono trovati; insuccesso in caso " +"contrario." + +#: builtins.c:1432 +#, 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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 i limiti delle risorse di shell.\n" +" \n" +" Fornisce il controllo sulle risorse disponibili per la shell e per i " +"processi\n" +" che crea, sui sistemi che permettono tale controllo.\n" +" \n" +" Opzioni:\n" +" -S\tUsa il limite di risorse \"leggero\"\n" +" -H\tUsa il limite di risorse \"pesante\"\n" +" -a\tRiporta tutti i limiti correnti\n" +" -b\tLa dimensione del buffer del socket\n" +" -c\tLa dimensione massima dei file di core creati\n" +" -d\tLa dimensione massima di un segmento di dati di processo\n" +" -e\tLa priorità massima di scheduling (\"nice\")\n" +" -f\tLa dimensione massima dei file scritti dalla shell e dai suoi " +"figli\n" +" -i\tIl numero massimo di segnali pendenti\n" +" -l\tLa dimensione massima di memoria che un processo può impegnare\n" +" -m\tIl numero massimo di set residenti\n" +" -n\tIl numero massimo di descrittori di file aperti\n" +" -p\tLa dimensione del buffer della pipe\n" +" -q\tIl numero massimo di byte nelle code messaggi POSIX\n" +" -r\tLa priorità massima di scheduling in tempo reale\n" +" -s\tLa dimensione massima dello stack\n" +" -t\tLa quantità massima di tempo CPU in secondi\n" +" -u\tIl numero massimo di processi utente\n" +" -v\tLa dimensione della memoria virtuale\n" +" -x\tIl numero massimo di lock dei file\n" +" \n" +" Se viene fornito un LIMITE, sarà il nuovo valore della risorsa " +"specificata;\n" +" I valori LIMITE speciali \"soft\", \"hard\" e \"unlimited\" " +"corrispondono\n" +" rispettivamente agli attuali limiti leggero, pesante e senza limite.\n" +" Altrimenti viene stampato il valore attuale della risorsa specificata. " +"Se\n" +" non viene fornita alcuna opzione, viene assunta -f.\n" +" \n" +" I valori sono ad incrementi di 1024-byte, ad eccezione di -t che è in " +"secondi,\n" +" -p che è ad incrementi di 512 byte e -u che è un numero di processi non\n" +" scalato.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o venga riscontrato un errore." + +#: builtins.c:1483 +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 "" +"Visualizza o imposta la maschera del modo file.\n" +" \n" +" Imposta la maschera di creazione file dell'utente su MODO. Se MODO " +"viene omesso, stampa\n" +" il valore corrente della maschera.\n" +" \n" +" Se MODO inizia con una cifra, è interpretato con un numero ottale;\n" +" altrimenti come una stringa di modo simbolico come quella accettata da " +"chmod(1).\n" +" \n" +" Opzioni:\n" +" -p\tSe MODO viene omesso, mostra in una forma che possa essere riusata " +"come input\n" +" -S\tRende simbolico l'output; altrimenti viene mostrato un numero " +"ottale\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che MODO non sia valido o venga fornita una " +"opzione non valida." + +#: builtins.c:1503 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Attende il completamento del job restituendo lo stato di uscita.\n" +" \n" +" Attende il processo identificato dall'ID, che può essere un ID di " +"processo o\n" +" una specifica di job, riportando il suo stato di termine. Se non è\n" +" fornito un ID, attende tutti i processi figlio correntemente attivi, " +"restituendo\n" +" zero come stato. Se l'ID è una specifica di job, attende tutti i " +"processi\n" +" presenti nella pipeline del job.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ID; insuccesso se l'ID non è valido o viene " +"fornita una\n" +" opzione non valida." + +#: builtins.c:1534 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Attende il completamento del processo e restituisce lo stato di uscita.\n" +" \n" +" Attende per il processo specificato e riporta il suo stato di " +"terminazione. Se non\n" +" viene fornito il PID, l'attesa comprende tutti i processi figlio " +"correntemente attivi\n" +" e il codice restituito è zero. Il PID deve essere un ID di processo.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ID; insuccesso se l'ID non è valido o viene " +"fornita una opzione non\n" +" valida." + +#: builtins.c:1549 +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 "" +"Esegue comandi per ciascun membro di un elenco.\n" +" \n" +" Il ciclo \"for\" esegue una sequenza di comandi per ciascun membro di " +"un\n" +" elenco di voci. Se \"in PAROLE ...;\" non è presente, allora viene " +"assunto\n" +" \"in \"$@\"\". Per ciascun elemento in PAROLE, NOME è impostato a " +"quell'elemento e\n" +" i COMANDI vengono eseguiti.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1563 +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 "" +"Ciclo \"for\" aritmetico.\n" +" \n" +" Equivalente a\n" +" \t(( ESPR1 ))\n" +" \twhile (( ESPR2 )); do\n" +" \t\tCOMANDI\n" +" \t\t(( ESPR3 ))\n" +" \tdone\n" +" ESPR1, ESPR2 e ESPR3 sono espressioni aritmetiche. Se viene omessa " +"qualche\n" +" espressione, si comporta come se valesse 1.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1581 +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 "" +"Seleziona le parole da un elenco ed esegue i comandi.\n" +" \n" +" Le PAROLE vengono estese, generando un elenco di parole. L'insieme\n" +" di parole estese viene stampato sullo standard error, ognuna delle\n" +" quali preceduta da un numero. Se non è presente \"in PAROLE\", viene\n" +" assunto `in \"$@\". Viene poi visualizzato il prompt PS3 e viene letta\n" +" una riga dallo standard input. Se la riga è composta dal numero che\n" +" corrisponde a una delle parole visualizzate, NOME è impostato a quella\n" +" parola. Se la riga è vuota, Le PAROLE e il prompt vengono " +"rivisualizzati.\n" +" Se viene letto EOF, il comando termina. Se vengono letti altri valori\n" +" NOME viene impostato a null. La riga letta viene salvata nella " +"variabile\n" +" REPLY. I COMANDI vengono eseguiti dopo ogni selezione finché non viene\n" +" eseguito un comando di interruzione.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita dell'ultimo comando eseguito." + +#: builtins.c:1602 +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 "" +"Riporta il tempo speso nell'esecuzione della pipeline.\n" +" \n" +" Esegue la PIPELINE e stampa, quando termina, un sommario del tempo " +"reale, tempo utente della CPU\n" +" e tempo di sistema della CPU dedicato all'esecuzione della PIPELINE.\n" +" \n" +" Opzioni:\n" +" -p\tStampa il riepilogo dei tempi nel formato portabile Posix format\n" +" \n" +" Il valore della variabile TIMEFORMAT è usato come formato di output.\n" +" \n" +" Stato di uscita:\n" +" Viene restituito lo stato della PIPELINE." + +#: builtins.c:1619 +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 "" +"Esegue comandi basati sulla corrispondenza di modello.\n" +" \n" +" Esegue in modo selettivo COMANDI basati sulla PAROLA corrispondente al " +"MODELLO. Il\n" +" carattere \"|\" è usato per separare modelli multipli.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1631 +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 "" +"Esegue comandi basati su condizioni.\n" +" \n" +" Viene eseguito l'elenco degli \"if COMANDI\". Se lo stato di uscita è " +"zero\n" +" viene eseguito l'elenco \"then COMANDI\", altrimenti viene eseguito " +"l'elenco\n" +" degli \"elif COMANDI\" e, se il loro stato è zero, viene eseguito " +"l'elenco dei\n" +" \"then COMANDI\" corrispondente e viene completato l'\"if COMANDO\". " +"Altrimenti,\n" +" viene eseguito l'elenco \"else COMANDI\", se presente. Lo stato di " +"uscita\n" +" dell'intero costrutto corrisponde a quello dell'ultimo comando eseguito, " +"o\n" +" zero se nessuna condizione provata è vera.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1648 +#, fuzzy +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Esegue i comandi finché un test ha successo.\n" +" \n" +" Espande ed esegue i COMANDI fino a quando il comando finale nei\n" +" COMANDI \"while\" ha uno stato di uscita pari a zero.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1660 +#, fuzzy +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Esegue i comandi finché un test non ha successo.\n" +" \n" +" Espande ed esegue i COMANDI fino a quando il comando finale nei\n" +" COMANDI \"until\" ha uno stato di uscita diverso da zero.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1672 +#, fuzzy +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Crea un coprocesso chiamato NOME.\n" +" \n" +" Esegue il COMANDO in modo asincrono, con lo standard output e lo " +"standard\n" +" input del comando connessi attraverso una pipe ai descrittori di file " +"assegnati\n" +" agli indici 0 e 1 di una variabile di array NOME nella shell in " +"esecuzione.\n" +" Il NOME predefinito è \"COPROC\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato di uscita del COMANDO." + +#: builtins.c:1686 +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 "" +"Definisce una funzione di shell.\n" +" \n" +" Crea una funzione di shell chiamata NOME. Quando invocato come un " +"semplice comando,\n" +" NOME esegue i COMANDI nel contesto delle chiamate di shell. Quando " +"viene invocato NOME,\n" +" gli argomenti sono passati alla funzione come $1...$n e il nome della " +"funzione si trova\n" +" in $FUNCNAME.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che il NOME non sia in sola lettura." + +#: builtins.c:1700 +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 "" +"Raggruppa i comandi come un'unità.\n" +" \n" +" Esegue un set di comandi in un gruppo. Questo è un modo per " +"reindirizzare un\n" +" intero set di comandi.\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato dell'ultimo comando eseguito." + +#: builtins.c:1712 +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 "" +"Ripristina un job in primo piano.\n" +" \n" +" Equivale all'argomento SPEC_JOB per il comando \"fg\". Ripristina\n" +" un job fermato o sullo sfondo. SPEC_JOB può specificare un nome\n" +" job o un numero di job. SPEC_JOB seguito da \"&\" mette il job\n" +" sullo sfondo, come se la specifica del job fosse stata fornita\n" +" come argomento per \"bg\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce lo stato del job ripristinato." + +#: builtins.c:1727 +#, 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 "" +"Valuta espressioni aritmetiche.\n" +" \n" +" L'ESPRESSIONE è valutata seguendo le regole di valutazione\n" +" aritmetica. Equivalente a \"let ESPRESSIONE\".\n" +" \n" +" Stato di uscita:\n" +" Restituisce 1 se ESPRESSIONE è valutata 0, altrimenti restituisce 0." + +#: builtins.c:1739 +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 "" +"Esegue comandi condizionali.\n" +" \n" +" Resituisce uno stato di 0 o 1 a seconda della valutazione " +"dell'espressione\n" +" condizionale ESPRESSIONE. Le espressioni sono composte dalle stesse " +"basilari usate\n" +" dal comando interno \"test\", e possono essere combinate usando i " +"seguenti operatori:\n" +" \n" +" ( ESPRESSIONE )\tRestituisce il valore dell'ESPRESSIONE\n" +" ! ESPRESSIONE\t\tVero se l'ESPRESSIONE è falsa; falso in caso " +"contrario\n" +" ESPR1 && ESPR2\tVero se sia ESPR1 che ESPR2 sono vere; falso in caso " +"contrario\n" +" ESPR1 || ESPR2\tVero se una tra ESPR1 ed ESPR2 è vera; falso in caso " +"contrario\n" +" \n" +" Quando vengono usati gli operatori \"==\" e \"!=\", la stringa a destra " +"dell'operatore\n" +" è usata come un modello e ne viene effettuata la corrispondenza.\n" +" Quando viene usato l'operatore \"=~\", la stringa a destra " +"dell'operatore è valutata\n" +" corrispondente a un'espressione regolare.\n" +" \n" +" Gli operatori && e || non valutano ESPR2 se ESPR1 è sufficiente a\n" +" determinare il valore dell'espressione.\n" +" \n" +" Stato di uscita:\n" +" 0 o 1 a seconda del valore dell'ESPRESSIONE." + +#: builtins.c:1765 +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 "" +"Nomi e usi comuni delle variabili di shell.\n" +" \n" +" BASH_VERSION\tInformazioni sulla versione di Bash.\n" +" CDPATH\tUn elenco di directory da cercare separate da un due punti\n" +" \tfornite come argomenti per \"cd\".\n" +" GLOBIGNORE\tUn elenco di modelli separato da un due punti che descrivono " +"i nomi\n" +" \t\tdi file che devono essere ignorati dall'espansione di percorso.\n" +" HISTFILE\tIl nome del file in cui è memorizzata la cronologia dei " +"comandi.\n" +" HISTFILESIZE\tIl numero massimo di righe che può contenere questo file.\n" +" HISTSIZE\tIl numero massimo di righe di cronologia a cui può accedere\n" +" \t\tuna shell in esecuzione.\n" +" HOME\tIl nome completo del percorso della propria directory di login.\n" +" HOSTNAME\tIl nome dell'host corrente.\n" +" HOSTTYPE\tIl tipo di CPU sulla quale è in esecuzione questa versione di " +"bash.\n" +" IGNOREEOF\tControlla il comportamento della shell quando riceve un " +"carattere EOF\n" +" \t\tcome unico input. Se impostato, il suo valore corrisponde al " +"numero\n" +" \t\tdi caratteri EOF che si possono trovare in una fila in una riga " +"vuota\n" +" \t\tprima che la shell esca (predefinito 10). Quando viene azzerato, " +"EOF\n" +" \t\tindica la fine dell'input.\n" +" MACHTYPE\tUna stringa che descrive l'attuale sistema dove è in " +"esecuzione bash.\n" +" MAILCHECK\tQuanto spesso, in secondi, Bash controlla la presenza di " +"nuova posta.\n" +" MAILPATH\tUn elenco di nomi di file separati da un due punti usati da " +"Bash per\n" +" \t\tcontrollare la presenza di nuova posta.\n" +" OSTYPE\tLa versione di Unix sulla quale è in esecuzione questa versione " +"di bash.\n" +" PATH\tUn elenco di directory, separato da un due punti, da analizzare " +"quando\n" +" \t\tsi cercano i comandi.\n" +" PROMPT_COMMAND\tUn comando da eseguire prima della stampa di ciascun " +"prompt\n" +" \t\tprimario.\n" +" PS1\t\tLa stringa del prompt primario.\n" +" PS2\t\tLa stringa del prompt secondario.\n" +" PWD\t\tIl nome completo del percorso della directory corrente.\n" +" SHELLOPTS\tUn elenco di opzioni di shell abilitate, separate da un due " +"punti.\n" +" TERM\tIl nome del tipo di terminale corrente.\n" +" TIMEFORMAT\tIl formato di output per le statistiche temporali " +"visualizzato dalla\n" +" \t\tparola riservata \"time\".\n" +" auto_resume\tNon null significa che una parola di un comando che compare " +"da\n" +" \t\taol in una riga viene prima cercata nell'elenco dei job correnti\n" +" \t\tfermati. Se trovato, questo job viene messo in primo piano.\n" +" \t\tUn valore pari a \"exact\" significa che la parola del comando deve\n" +" \t\tcorrispondere esattamente a un comando nell'elenco dei job fermati. " +"Un\n" +" \t\tvalore pari a \"substring\" significa che la parola del comando " +"deve\n" +" \t\tcorrispondere a una sottostringa del job. Qualsiasi altro valore " +"significa\n" +" \t\tche il comando deve essere un prefisso di un lavoro fermato.\n" +" histchars\tCaratteri che controllano l'espansione della cronologia e la " +"sostituzione\n" +" \t\trapida. Il primo carattere è quello di sostituzione della " +"cronologia,\n" +" \t\tsolitamente \"!\". Il secondo è il carattere di \"sostituzione " +"rapida\",\n" +" \t\tsolitamente \"^\". Il terzo è il carattere di \"commento della " +"cronologia\",\n" +" \t\tsolitamente \"#\".\n" +" HISTIGNORE\tUn elenco di modelli separato da un due punti usato per " +"decidere quale\n" +" \t\tcomando dovrebbe essere salvato nell'elenco della cronologia.\n" + +#: builtins.c:1822 +#, 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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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 "" +"Aggiunge directory allo stack.\n" +" \n" +" Aggiunge una directory in cima allo stack delle directory o ruota lo\n" +" stack stesso, mettendo come primo elemento la directory di lavoro\n" +" corrente. Senza argomenti scambia le prime due directory in cima.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono aggiunte\n" +" \tdirectory allo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da sinistra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" -N\tRuota lo stack in modo che l'N-sima directory (contando\n" +" \ta partire da destra dell'elenco mostrato da \"dirs\", iniziando da\n" +" \tzero) sia in cima.\n" +" \n" +" dir\tAggiunge DIR in cima allo stack delle directory, facendone la\n" +" \tdirectory di lavoro corrente.\n" +" \n" +" Il comando interno \"dirs\" mostra lo stack delle directory.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornito un argomento valido o " +"non abbia\n" +" successo il cambio di directory." + +#: builtins.c:1856 +#, 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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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 "" +"Rimuove directory dallo stack.\n" +" \n" +" Rimuove voci dallo stack delle directory. Senza argomenti, rimuove\n" +" la directory in cima allo stack e cambia alla nuova prima directory.\n" +" \n" +" Opzioni:\n" +" -n\tEvita il normale cambio di directory quando vengono rimosse\n" +" \tdirectory dallo stack, così da manipolare solo lo stack stesso.\n" +" \n" +" Argomenti:\n" +" +N\tRimuove l'N-sima voce contando a partire da sinistra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd +0\"\n" +" \trimuove la prima directory, \"popd +1\" la seconda.\n" +" \n" +" -N\tRimuove l'N-sima voce contando a partire da destra dell'elenco\n" +" \tmostrato da \"dirs\", iniziando da zero. Per esempio: \"popd -0\"\n" +" \trimuove l'ultima directory, \"popd -1\" la penultima.\n" +" \n" +" Il comando interno \"dirs\" mostra lo stack delle directory.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornito un argomento non " +"valido o non\n" +" abbia successo il cambio di directory." + +#: builtins.c:1886 +#, 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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Visualizza lo stack delle directory.\n" +" \n" +" Visualizza l'elenco delle directory ricordate attualmente. Le directory\n" +" vengono inserite nell'elenco con il comando \"pushd\"; è possibile\n" +" andare a ritroso nell'elenco con il comando \"popd\".\n" +" \n" +" Opzioni:\n" +" -c\tPulisce lo stack delle directory eliminandone tutti gli elementi\n" +" -l\tNon stampa le directory con prefisso tilde relative alla propria\n" +" \tdirectory home\n" +" -p\tStampa lo stack delle directory una voce per riga\n" +" -v\tStampa lo stack delle directory una voce per riga usando come\n" +" \tprefisso la posizione nello stack\n" +" \n" +" Argomenti:\n" +" +N\tMostra l'N-sima voce contando a partire da sinistra dell'elenco\n" +" \tmostrato da dirs quando invocato senza opzioni, iniziando da zero.\n" +" \n" +" -N\tMostra l'N-sima voce contando a partire da destro dell'elenco\n" +" \tmostrato da dirs quando invocato senza opzioni, iniziando da zero.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita un'opzione non valida o " +"si riscontri un errore." + +#: builtins.c:1917 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"Imposta le opzioni della shell.\n" +" \n" +" Cambia le impostazioni di ciascuna opzione di shell NOMEOPZ. Senza " +"argomenti\n" +" per le opzioni, elenca tutte le opzioni di shell indicando se sono o non " +"sono\n" +" impostate.\n" +" \n" +" Opzioni:\n" +" -o\tLimita i NOMEOPZ a quelli definiti per essere usati con \"set -o" +"\"\n" +" -p\tStampa ogni opzione di shell indicando il relativo stato\n" +" -q\tNon stampa l'output\n" +" -s\tAbilita (imposta) ciascun NOMEOPZ\n" +" -u\tDisabilita (elimina) ciascun NOMEOPZ\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo se NOMEOPZ è abilitato; insuccesso se viene " +"fornita\n" +" una opzione non valida o NOMEOPZ è disabilitato." + +#: builtins.c:1938 +#, 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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formatta e stampa gli ARGOMENTI come indicato dal FORMATO.\n" +" \n" +" Opzioni:\n" +" -v var\tAssegna l'output alla variabile di shell VAR invece\n" +" \t\tdi visualizzarlo sullo standard output\n" +" \n" +" FORMATO è una stringa di caratteri che contiene tre tipi di oggetto: " +"caratteri\n" +" semplici, che sono semplicemente copiati sullo standard output; sequenze " +"di escape\n" +" dei caratteri, che sono convertite e copiate sullo standard output;\n" +" specifiche di formato, ognuna delle quali provoca la stampa del " +"successivo argomento\n" +" consecutivo.\n" +" \n" +" In aggiunta alle specifiche di formato standard descritte in printf(1)\n" +" e printf(3), printf interpreta:\n" +" \n" +" %b\tEspande le sequenze di escape di backslash nell'argomento " +"corrispondente\n" +" %q\tQuota l'argomento in modo che possa essere riusato come input per " +"la shell\n" +" %(fmt)T Visualizza la stringa della data/ora risultante dall'uso di " +"FMT come stringa\n" +" di formato per strftime(3)\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o si riscontri\n" +" un errore di scrittura o assegnazione." + +#: builtins.c:1974 +#, 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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Specifica come gli argomenti debbano essere completati da Readline.\n" +" \n" +" Per ciascun NOME, specifica come gli argomenti debbano essere " +"completati. Se non\n" +" vengono fornite opzioni, le specifiche di completamento esistenti sono " +"stampate in modo\n" +" che possano essere riusate come input.\n" +" \n" +" Opzioni:\n" +" -p\tStampa le specifiche di completamento esistenti in un formato " +"riusabile\n" +" -r\tRimuove una specifica di completamento per ciascun NOME, oppure " +"tutte\n" +" \tse non viene fornito alcun NOME\n" +" -D\tApplica i completamenti e le azioni come predefiniti per i " +"comandi\n" +" \tsenza alcun completamento definito specifico\n" +" -E\tApplica i completamenti e le azioni ai comandi \"vuoti\" --\n" +" \tcompletamenti tentati su una riga vuota\n" +" \n" +" Quando viene tentato un completamento, le azioni sono applicate " +"nell'ordine\n" +" in cui sono sopra elencate le opzioni a lettera maiuscola.\n" +" L'opzione -D ha precedenza su -E.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:2004 +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 "" +"Visualizza i possibili completamenti a seconda delle opzioni.\n" +" \n" +" È pensata per essere usata all'interno di una funzione di shell per " +"generare\n" +" dei possibili completamenti. Se viene fornito l'argomento opzionale " +"PAROLA,\n" +" vengono generate le corrispondenze relative a PAROLA.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non sia fornita una opzione non valida o " +"si riscontri un errore." + +#: builtins.c:2019 +#, 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 being executed. If no OPTIONs are given, " +"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" +" \t-I\t\tChange options for completion on the initial word\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 visualizza le opzioni di completamento.\n" +" \n" +" Modifica le opzioni di completamento per ciascun NOME, oppure, se non " +"viene fornito alcun NOME,\n" +" il completamento attualmente in esecuzione. Con nessuna OPZIONE " +"fornita, stampa\n" +" le opzioni di completamento per ciascun NOME o le specifiche di " +"completamento correnti.\n" +" \n" +" Opzioni:\n" +" \t-o opzione\tImposta l'OPZIONE di completamento per ciascun NOME\n" +" \t-D\t\tCambia le opzioni per il completamento di comando \"predefinito" +"\"\n" +" \t-E\t\tCambia le opzioni per il completamento di comando \"vuoto\"\n" +" \n" +" Usando \"+o\" al posto di \"-o\" disabilita l'opzione specificata.\n" +" \n" +" Argomenti:\n" +" \n" +" Ciascun NOME si riferisce a un comando per il quale deve essere stata " +"precedentemente\n" +" definita una specifica di completamento con il comando interno \"complete" +"\". Se non viene fornito\n" +" alcun NOME, compopt deve essere richiamato da una funzione che generi " +"attualmente\n" +" completamenti, e le opzioni per questo generatore di completamenti " +"attualmente\n" +" in esecuzione sono modificate\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non valida " +"o NOME non\n" +" abbia una specifica di completamento definita." + +#: builtins.c:2050 +#, 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"Legge righe dallo standard input in una variabile di array indicizzato.\n" +" \n" +" Legge righe dallo standard input nella variabile di ARRAY indicizzato, " +"oppure\n" +" dal descrittore di file FD se viene fornita l'opzione -u. La variabile " +"MAPFILE\n" +" è l'ARRAY predefinito.\n" +" \n" +" Opzioni:\n" +" -n numero\t\tCopia al massimo un NUMERO di righe. Se NUMERO è 0, " +"vengono copiate tutte.\n" +" -O origine\tInizia assegnando all'ARRAY all'indice ORIGINE. L'indice " +"predefinito è 0.\n" +" -s numero \tScarta le prime NUMERO righe lette.\n" +" -t\t\tRimuove un ritorno a capo finale da ciascuna riga letta.\n" +" -u fd\t\tLegge le righe da un descrittore di file FD invece che dallo " +"standard input.\n" +" -C callback\tEsamina CALLBACK ogni volta che vengono lette un numero " +"QUANTO di righe.\n" +" -c quantità\tSpecifica il numero di righe lette tra ciascuna chiamata " +"a CALLBACK.\n" +" \n" +" Argomenti:\n" +" ARRAY\t\tNome della variabile di array da usare per i dati dei file.\n" +" \n" +" Se viene fornito -C senza -c, il quanto predefinito è 5000. Quando\n" +" viene analizzata CALLBACK, viene fornito l'indice dell'elemento di\n" +" array successivo da assegnare e la riga da attribuire a quell'elemento\n" +" come argomenti aggiuntivi.\n" +" \n" +" Se non viene fornito con una origine esplicita, il file di mappa " +"azzererà l'ARRAY\n" +" prima della relativa assegnazione.\n" +" \n" +" Stato di uscita:\n" +" Restituisce successo a meno che non venga fornita una opzione non " +"valida, ARRAY sia\n" +" in sola lettura oppure non indicizzato." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Legge le righe da un file in una variabile di array.\n" +" \n" +" Sinonimo per \"mapfile\"." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: chiave dell'array associativo non valida" + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright © 2011 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Restituisce il contesto della chiamata alla subroutine corrente.\n" +#~ " \n" +#~ " Senza ESPR, restituisce " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: processo %5ld (%s) in the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Numero di segnale sconosciuto" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licenza GPLv2+: GNU GPL versione 2 o successive \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "vero" + +#~ msgid "false" +#~ msgstr "falso" + +#~ msgid "times" +#~ msgstr "times" diff --git a/po/ja.gmo b/po/ja.gmo index 7def4d7..0314f9e 100644 Binary files a/po/ja.gmo and b/po/ja.gmo differ diff --git a/po/ja.po b/po/ja.po index 18dec23..332efa3 100644 --- a/po/ja.po +++ b/po/ja.po @@ -1,476 +1,557 @@ -# Japanese message for GNU bash 2.0 -# Copyright (C) 1999 Free Software Foundation, Inc. +# Japanese messages for GNU bash +# Copyright (C) 1999, 2010, 2011, 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. # Kyoichi Ozaki , 2000. -# +# Takeshi Hamasaki , 2011, 2013. +# Yasuaki Taniguchi , 2011, 2014, 2017. +# Hiroshi Takekawa , , 2020. msgid "" msgstr "" -"Project-Id-Version: GNU bash 2.0\n" +"Project-Id-Version: GNU bash 5.2-rc1\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 \n" -"Language-Team: Japanese \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-19 23:10+0900\n" +"Last-Translator: Hiroshi Takekawa \n" +"Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=EUC-JP\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 2.0.2\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "" +msgstr "誤った配列の添字" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: 名前参照属性を削除します" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%c%c: �������ץ����" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: インデックス配列から連想配列に変換することはできません" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "" +msgstr "%s: 配列の添字に非数字を設定できません" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: 連想配列を設定するときには添字をつけなければいけません" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: %s を作成できません" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" +msgstr "bash_execute_unix_command: コマンドのキーマップがありません" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "" +msgstr "%s: 最初の非空白類文字が `\"' ではありません" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "" +msgstr "閉じる `%c' が %s にありません" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "" +msgstr "%s: 区切り文字コロン(:)がありません" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': コマンドキーマップの割り当てを解除できません" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "中括弧展開: %s へメモリを割り当てられません" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "中括弧展開: %u 個の要素のメモリの割り当てに失敗しました" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "中括弧展開: `%s' へのメモリ割り当てに失敗しました" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%c%c: �������ץ����" +msgstr "`%s': 無効なエイリアス名です" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "行編集が有効になっていません" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "" +msgstr "`%s': 無効なキーマップ名です" -#: builtins/bind.def:245 -#, fuzzy, c-format +#: builtins/bind.def:252 +#, c-format msgid "%s: cannot read: %s" -msgstr "%s: %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 +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format msgid "`%s': unknown function name" -msgstr "%s: �ɤ߹��ߤΤߤδؿ�" +msgstr "`%s': 不明な関数名です" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "" +msgstr "%s はどのキーにも割り当てられていません。\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "" +msgstr "%s は次を通して起動します " -#: builtins/break.def:77 builtins/break.def:117 -#, fuzzy +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': 割り当て解除できません" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "����������" +msgstr "ループ回数" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "" +msgstr "`for'、`while' または `until' ループでのみ意味があります" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" +"現在のサブルーチン呼び出しのコンテキストを返します。\n" +" \n" +" EXPR が無い場合 \"$line $filename\" を返します。 EXPR がある場合、\n" +" \"$line $subroutine $filename\" を返します。この追加の情報はスタックトレース\n" +" を提供する時に利用します。\n" +" \n" +" EXPR の値は現在のフレームに戻るまでに何回フレームが呼び出されているかを\n" +" 意味します。最上位のフレームは 0 です。" -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "" +msgstr "HOME が設定されていません" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "引数が多すぎます" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "空のディレクトリ" + +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "" +msgstr "OLDPWD が設定されていません" -#: builtins/common.c:101 -#, fuzzy, c-format +#: builtins/common.c:96 +#, c-format msgid "line %d: " -msgstr "�����å� %3d: " +msgstr "%d 行: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "�񤭹�����" +msgstr "警告: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "" - -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "������¿�����ޤ�" +msgstr "%s: 使用法: " -#: builtins/common.c:191 shell.c:499 shell.c:782 -#, fuzzy, c-format +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format msgid "%s: option requires an argument" -msgstr "���ץ����ˤϰ�����ɬ��: -" +msgstr "%s: オプションには引数が必要です" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "" +msgstr "%s: 数字の引数が必要です" -#: builtins/common.c:205 -#, fuzzy, c-format +#: builtins/common.c:207 +#, c-format msgid "%s: not found" -msgstr "%s: ���ޥ�ɤ����Ĥ���ޤ���" +msgstr "%s: 見つかりません" -#: builtins/common.c:214 shell.c:795 -#, fuzzy, c-format +#: builtins/common.c:216 shell.c:879 +#, c-format msgid "%s: invalid option" -msgstr "%c%c: �������ץ����" +msgstr "%s: 無効なオプションです" -#: builtins/common.c:221 -#, fuzzy, c-format +#: builtins/common.c:223 +#, c-format msgid "%s: invalid option name" -msgstr "%c%c: �������ץ����" +msgstr "%s: 無効なオプション名です" -#: builtins/common.c:228 general.c:231 general.c:236 -#, fuzzy, c-format +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format msgid "`%s': not a valid identifier" -msgstr "`%s' ��ͭ���ʳ�ǧ�ǤϤʤ�" +msgstr "`%s': 有効な識別子ではありません" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "���������ʥ��ֹ�" +msgstr "無効な八進数です" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "���������ʥ��ֹ�" +msgstr "無効な十六進数です" -#: builtins/common.c:242 expr.c:1256 -#, fuzzy +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "���������ʥ��ֹ�" +msgstr "無効な数字です" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "" +msgstr "%s: 無効なシグナル指定です" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "" +msgstr "`%s': pid または有効なジョブ指定ではありません" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s: �ɤ߹��ߤΤߤ��ѿ�" +msgstr "%s: 読み取り専用の変数です" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: 割り当てできません" -#: builtins/common.c:272 +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" -msgstr "" +msgstr "%s: %s が範囲外です" -#: builtins/common.c:272 builtins/common.c:274 -#, fuzzy +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" -msgstr "���������" +msgstr "引数" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" -msgstr "" +msgstr "%s が範囲外です" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "" +msgstr "%s: そのようなジョブはありません" -#: builtins/common.c:290 -#, fuzzy, c-format +#: builtins/common.c:299 +#, c-format msgid "%s: no job control" -msgstr "���Υ�����ˤϥ�������椬����ޤ���" +msgstr "%s: ジョブ制御が無効になっています" -#: builtins/common.c:292 -#, fuzzy +#: builtins/common.c:301 msgid "no job control" -msgstr "���Υ�����ˤϥ�������椬����ޤ���" +msgstr "ジョブ制御が無効になっています" -#: builtins/common.c:302 -#, fuzzy, c-format +#: builtins/common.c:311 +#, c-format msgid "%s: restricted" -msgstr "%s: ����֤Ͻ�λ���ޤ���" +msgstr "%s: 制限されています" -#: builtins/common.c:304 -#, fuzzy +#: builtins/common.c:313 msgid "restricted" -msgstr "��λ���ޤ���" +msgstr "制限されています" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "" +msgstr "%s: シェルのビルトイン関数ではありません" -#: builtins/common.c:321 -#, fuzzy, c-format +#: builtins/common.c:330 +#, c-format msgid "write error: %s" -msgstr "�ѥ��ץ��顼: %s" +msgstr "書き込みエラー: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "ターミナル属性の設定時にエラーが発生しました : %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "ターミナル属性の取得時にエラーが発生しました : %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "" +msgstr "%s: カレントディレクトリの取得時にエラーが発生しました : %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 -#, fuzzy, c-format +#: builtins/common.c:708 builtins/common.c:710 +#, c-format msgid "%s: ambiguous job spec" -msgstr "%s: �����ޤ��ʥ�����쥯��" +msgstr "%s: 曖昧なジョブ指定です" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "このバージョンではヘルプが利用できません" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: 消去できません: %s は読み取り専用です" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: 消去できません" -#: builtins/complete.def:276 +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "" +msgstr "%s: 無効なアクション名です" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "" +msgstr "%s: 補完指定がありません" #: builtins/complete.def:696 msgid "warning: -F option may not work as you expect" -msgstr "" +msgstr "警告: -F オプションは期待通りに動作しないかもしれません" #: builtins/complete.def:698 msgid "warning: -C option may not work as you expect" -msgstr "" +msgstr "警告: -C オプションは期待通りに動作しないかもしれません" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "補完機能は現在実行されていません" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "" +msgstr "関数の中でのみ使用できます" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "" +msgstr "関数作成時に `-f' を使用できません" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s: �ɤ߹��ߤΤߤδؿ�" +msgstr "%s: 読み取り専用関数です" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: 参照変数は配列であってはいけません" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: 自身を参照する名前参照変数は許可されていません" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: 循環名前参照です" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': 名前参照として無効な変数です" -#: builtins/declare.def:468 -#, fuzzy, c-format +#: builtins/declare.def:856 +#, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "$%s: ���Τ褦�˻���Ǥ��ޤ���" +msgstr "%s: この方法で配列変数を消去することはできません" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" +msgstr "%s: 連想配列からインデックス配列に変換することはできません" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" msgstr "" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "" +msgstr "動的ロードは利用できません" -#: builtins/enable.def:312 -#, fuzzy, c-format +#: builtins/enable.def:376 +#, c-format msgid "cannot open shared object %s: %s" -msgstr "named pipe %s �� %s �س����ޤ���: %s" +msgstr "共有オブジェクト %s を開くことができません : %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "" +msgstr "%s が共有オブジェクト %s に存在しません: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: 動的ビルトインはロード済です" -#: builtins/enable.def:459 +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "関数 %s のロードが失敗を返しました(%d): ロードされませんでした" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "" +msgstr "%s: 動的にロードされていません" -#: builtins/enable.def:474 -#, fuzzy, c-format +#: builtins/enable.def:577 +#, c-format msgid "%s: cannot delete: %s" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: 削除できません: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" -msgstr "%s: �ϥǥ��쥯�ȥ�Ǥ�" +msgstr "%s: ディレクトリです" -#: builtins/evalfile.c:139 -#, fuzzy, c-format +#: builtins/evalfile.c:144 +#, c-format msgid "%s: not a regular file" -msgstr "%s: �Х��ʥ�ե������¹ԤǤ��ޤ���" +msgstr "%s: 通常ファイルではありません" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "" +msgstr "%s: ファイルが大きすぎます" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: �Х��ʥ�ե������¹ԤǤ��ޤ���" +msgstr "%s: バイナリファイルを実行できません" -#: builtins/exec.def:212 -#, fuzzy, c-format +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format msgid "%s: cannot execute: %s" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: 実行できません: %s" -#: builtins/exit.def:65 -#, fuzzy, c-format +#: builtins/exit.def:64 +#, c-format msgid "logout\n" -msgstr "����������" +msgstr "ログアウト\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "" +msgstr "ログインシェルではありません: `exit' を使用してください" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "" +msgstr "停止しているジョブがあります。\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "" +msgstr "動作中のジョブがあります。\n" -#: builtins/fc.def:262 -#, fuzzy +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "%s: ���ޥ�ɤ����Ĥ���ޤ���" +msgstr "コマンドが見つかりません" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "" +msgstr "ヒストリ指定" -#: builtins/fc.def:370 -#, fuzzy, c-format +#: builtins/fc.def:444 +#, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: 一時ファイルを開くことができません: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "カレント" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "" +msgstr "ジョブ %d がジョブ制御なしで開始されました" #: builtins/getopt.c:110 -#, fuzzy, c-format +#, c-format msgid "%s: illegal option -- %c\n" -msgstr "�����ʥ��ץ����: -" +msgstr "%s: 不正なオプションです -- %c\n" #: builtins/getopt.c:111 -#, fuzzy, c-format +#, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "���ץ����ˤϰ�����ɬ��: -" +msgstr "%s: オプションには引数が必要です -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "" +msgstr "ハッシュが無効になっています" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "" +msgstr "%s: ハッシュテーブルが空です\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" -msgstr "" +msgstr "hits\tcommand\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "キーワードに一致したシェルコマンド `" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" +"'\n" +"\n" #: builtins/help.def:185 -#, fuzzy, c-format +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "`%s' に一致するヘルプ項目がありません。`help help'、`man -k %s' または `info %s' を試してください" + +#: builtins/help.def:223 +#, c-format msgid "%s: cannot open: %s" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: 開くことができません: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -481,120 +562,149 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" +"これらのシェルコマンドは内部で定義されています。`help' と入力して一覧を参照してください。\n" +"`help 名前' と入力すると `名前' という関数のより詳しい説明が得られます。\n" +"'info bash' を使用するとシェル全般のより詳しい説明が得られます。\n" +"`man -k' または info を使用すると一覧にないコマンドのより詳しい説明が得られます。\n" +"\n" +"名前の後にアスタリスク (*) がある場合はそのコマンドが無効になっていることを意味します。\n" +"\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "" +msgstr "-anrw を2つ以上一緒に使用することはできません" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "" +msgstr "ヒストリ位置" -#: builtins/history.def:365 -#, fuzzy, c-format +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: 無効なタイムスタンプです" + +#: builtins/history.def:449 +#, c-format msgid "%s: history expansion failed" -msgstr "%s: �ؿ���ɽ�������" +msgstr "%s: ヒストリの展開に失敗しました" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: �ؿ���ɽ�������" +msgstr "%s: inlib が失敗しました" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "" +msgstr "`-x' は他のオプションを同時に使用できません" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "" +msgstr "%s: 引数はプロセスIDかジョブIDでなければいけません" -#: builtins/kill.def:263 -#, fuzzy +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "̤�ΤΥ��顼 %d" +msgstr "不明なエラーです" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "ɽ������Ԥ��Ƥޤ�" +msgstr "式が予期されます" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: Ÿ������Ƥ��ʤ��ѿ�" +msgstr "%s: インデックス配列ではありません" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "" +msgstr "%s: 無効なファイル記述子指定です" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "" +msgstr "%d: 無効なファイル記述子: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%c%c: �������ץ����" +msgstr "%s: 無効な行数です" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%c%c: �������ץ����" +msgstr "%s: 無効な配列の原点です" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "���������ʥ��ֹ�" +msgstr "%s: コールバックの quantum が無効です" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: Ÿ������Ƥ��ʤ��ѿ�" +msgstr "空の配列変数名です" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "配列変数のサポートが必要です" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "" +msgstr "`%s': 書式指定文字がありません" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': 無効な時間書式指定です" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "" +msgstr "`%c': 無効な書式指定文字です" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" -msgstr "" +msgstr "警告: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "書式解析問題です: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "" +msgstr "\\x 用の十六進数字がありません" -#: builtins/pushd.def:195 -#, fuzzy +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "\\%c 用のユニコード数値がありません" + +#: builtins/pushd.def:199 msgid "no other directory" -msgstr "%s: �ϥǥ��쥯�ȥ�Ǥ�" +msgstr "他のディレクトリはありません" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: 無効な引数です" -#: builtins/pushd.def:462 +#: builtins/pushd.def:480 msgid "" -msgstr "" +msgstr "<カレントディレクトリがありません>" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "ディレクトリスタックが空です" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "Recursion stack underflow" +msgstr "ディレクトリスタックのインデックス" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -609,16 +719,32 @@ msgid "" " \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" +" +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" +" -N\tDisplays the Nth entry counting from the right of the list shown by\n" "\tdirs when invoked without options, starting with zero." msgstr "" +"現在記憶されているディレクトリスタックを表示します。ディレクトリは `pushd'\n" +" コマンドによってスタックの一番上に保存されます。`popd'コマンドによって\n" +" スタックから取り戻すことができます。\n" +" \n" +" オプション:\n" +" -c\tディレクトリスタックからすべての要素を取り除き空にする\n" +" -l\tホームディレクトリからの相対パスを ~ を利用した形式で\n" +" \t表示しない\n" +" -p\tディレクトリスタックの要素を1行毎に表示する\n" +" -v\tディレクトリスタックの要素を1行ごとに番号をつけて\n" +" \t表示する\n" +" \n" +" 引数:\n" +" +N\tオプションなしで起動された場合にリストの先頭から数えて\n" +" \tN番目の要素を表示します。開始番号は0です。\n" +" \n" +" -N\tオプションなしで起動された場合にリストの末尾から数えて\n" +"\tN番目の要素を表示します。開始番号は0です。" -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -642,8 +768,27 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"ディレクトリスタックの先頭にディレクトリを追加します。またはディレクトリ\n" +" スタックを回転します。新しいスタックの先頭がカレントディレクトリにな\n" +" ります。引数なしで起動された場合、先頭の2つのディレクトリを交換します。\n" +" \n" +" オプション:\n" +" -n\tスタックにディレクトリを追加した時に通常のディレクトリ変更\n" +" \tを抑止します。よって、スタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\t先頭がN番目のディレクトリになるように回転します(`dirs'で\n" +" \t表示されるスタックの先頭から数えた数です。開始番号は0です)。\n" +" \n" +" -N\t先頭がN番目のディレクトリになるように回転します(`dirs'で\n" +" \t表示されるスタックの末尾から数えた数です。開始番号は0です)。\n" +" \n" +" ディレクトリ\tディレクトリをスタックの先頭に加え、そのディレク\n" +" \tトリを新しいカレントディレクトリにします。\n" +" \n" +" `dirs' ビルトインコマンドでディレクトリスタックを表示します。" -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -663,1649 +808,1717 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"ディレクトリスタックから要素を削除します。引数が無い場合スタックの先頭から\n" +" 削除し、新しいスタックの先頭ディレクトリに移動します。\n" +" \n" +" オプション:\n" +" -n\tスタックからディレクトリを削除した時に通常のディレクトリ変更\n" +" \tを抑止します。よって、スタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\tディレクトリスタック(`dirs' で表示される)の先頭から数えて\n" +" \t N 番目の要素を削除します。開始番号は 0 です。例: `popd +0'\n" +" \tは最初のディレクトリを削除します。`popd +1' は2番目です。\n" +" \n" +" -N\tディレクトリスタック(`dirs' で表示される)の最後から数えて\n" +" \t N 番目の要素を削除します。開始番号は 0 です。例: `popd +0'\n" +" \tは最後のディレクトリを削除します。`popd +1' は最後から2番目です。\n" +" \n" +" `dirs' ビルトインコマンドでディレクトリスタックを表示します。" -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "" +msgstr "%s: 無効なタイムアウト指定です" -#: builtins/read.def:588 -#, fuzzy, c-format +#: builtins/read.def:827 +#, c-format msgid "read error: %d: %s" -msgstr "�ѥ��ץ��顼: %s" +msgstr "読み込みエラー: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "" +msgstr "`return' は関数または source されたスクリプト内のみで利用できます" -#: builtins/set.def:768 +#: builtins/set.def:869 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 ������Ǥ��ޤ���" +msgstr "変数と関数を同時に消去することはできません" -#: builtins/set.def:823 -#, fuzzy, c-format +#: builtins/set.def:969 +#, c-format msgid "%s: not an array variable" -msgstr "%s: Ÿ������Ƥ��ʤ��ѿ�" +msgstr "%s: 配列変数ではありません" -#: builtins/setattr.def:186 -#, fuzzy, c-format +#: builtins/setattr.def:189 +#, c-format msgid "%s: not a function" -msgstr "%s: �ɤ߹��ߤΤߤδؿ�" +msgstr "%s: 関数ではありません" -#: builtins/shift.def:71 builtins/shift.def:77 -#, fuzzy +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: export できません" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "shift [n]" +msgstr "シフト回数" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "" +msgstr "シェルオプションを同時に有効かつ無効にできません" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "" +msgstr "%s: 無効なシェルオプション名です" #: builtins/source.def:128 msgid "filename argument required" -msgstr "" +msgstr "ファイル名が引数として必要です" -#: builtins/source.def:153 -#, fuzzy, c-format +#: builtins/source.def:154 +#, c-format msgid "%s: file not found" -msgstr "%s: ���ޥ�ɤ����Ĥ���ޤ���" +msgstr "%s: ファイルが見つかりません" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "中断できません" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "" +msgstr "ログインシェルを中断できません" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s は `%s' のエイリアスです\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "" +msgstr "%s はシェルの予約語です\n" -#: builtins/type.def:274 -#, fuzzy, c-format +#: builtins/type.def:275 +#, c-format msgid "%s is a function\n" -msgstr "%s: �ɤ߹��ߤΤߤδؿ�" +msgstr "%s は関数です\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s は特殊シェル組み込み関数です\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s はシェル組み込み関数です\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" -msgstr "" +msgstr "%s は %s です\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "%s はハッシュされています (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: limit の無効な引数です" -#: builtins/ulimit.def:398 -#, fuzzy, c-format +#: builtins/ulimit.def:426 +#, c-format msgid "`%c': bad command" -msgstr "%c%c: �������ץ����" +msgstr "`%c': 誤ったコマンドです" -#: builtins/ulimit.def:427 -#, fuzzy, c-format +#: builtins/ulimit.def:464 +#, c-format msgid "%s: cannot get limit: %s" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: limit を取得できません: %s" -#: builtins/ulimit.def:453 -#, fuzzy +#: builtins/ulimit.def:490 msgid "limit" -msgstr "CPU ����" +msgstr "limit" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 -#, fuzzy, c-format +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: limit を変更できません : %s" -#: builtins/umask.def:118 -#, fuzzy +#: builtins/umask.def:115 msgid "octal number" -msgstr "���������ʥ��ֹ�" +msgstr "八進数" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "`%c': 無効なシンボリックモード演算子です" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "`%c': 無効なシンボリックモード文字です" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " 行 " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" -msgstr "" +msgstr "最後のコマンド: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "" +msgstr "中止しています..." -#: error.c:406 -#, fuzzy +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "情報: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "デバッグ 警告: " + +#: error.c:488 msgid "unknown command error" -msgstr "̤�ΤΥ��顼 %d" +msgstr "不明なコマンドエラーです" -#: error.c:407 -#, fuzzy +#: error.c:489 msgid "bad command type" -msgstr "print_command: �������ޥ�ɥ����� `%d'" +msgstr "誤ったコマンドタイプです" -#: error.c:408 -#, fuzzy +#: error.c:490 msgid "bad connector" -msgstr "�������Ϥ� `%d'" +msgstr "誤った接続です" -#: error.c:409 -#, fuzzy +#: error.c:491 msgid "bad jump" -msgstr "���� jump %d" +msgstr "誤ったジャンプです" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "%s: Ÿ������Ƥ��ʤ��ѿ�" +msgstr "%s: 未割り当ての変数です" -#: eval.c:181 -#, fuzzy, c-format -msgid "timed out waiting for input: auto-logout\n" -msgstr "%c�������Ԥ����饿���ॢ���Ȥ��ޤ���: ��ư����������\n" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a入力待ちがタイムアウトしました: 自動ログアウト\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "" +msgstr "/dev/null から標準入力に対してリダイレクトできません: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': 無効な書式文字です" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" msgstr "" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "�ѥ��ץ��顼: %s" +msgstr "パイプエラー" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: eval の入れ子レベルの最大値を超えています (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: source の入れ子レベルの最大値を超えています (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: 関数の入れ子レベルの最大値を超えています (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: ����: `/' �򥳥ޥ��̾�˵��ҤǤ��ޤ���" +msgstr "%s: 制限されています: `/' をコマンド名の中に指定できません" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s: ���ޥ�ɤ����Ĥ���ޤ���" +msgstr "%s: コマンドが見つかりません" -#: execute_cmd.c:4827 -#, fuzzy, c-format +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: 実行できません: 必要なファイルがありません" + +#: execute_cmd.c:6000 +#, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: �ϥǥ��쥯�ȥ�Ǥ�" +msgstr "%s: %s: 誤ったインタプリタです" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: バイナリファイルを実行できません: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': 特殊シェル組み込み関数です" -#: execute_cmd.c:4976 -#, fuzzy, c-format +#: execute_cmd.c:6175 +#, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "fd %d �� fd 0 ��ʣ���Ǥ��ޤ���: %s" +msgstr "fd %d を fd %d に複製できません" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "ɽ���κƵ���ǽ��٥��ۤ��ޤ���" +msgstr "式の再帰可能レベルを越えました" -#: expr.c:265 -#, fuzzy +#: expr.c:291 msgid "recursion stack underflow" -msgstr "Recursion stack underflow" +msgstr "再帰スタックがアンダーフローしました" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "ɽ���˥��󥿥å������顼" +msgstr "式に構文エラーがあります" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "���ѿ��˳�����Ƥ�Ԥ����Ȥ��Ƥޤ�" +msgstr "非変数に割り当てを行おうとしてます" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "変数の割り当てに構文エラーがあります" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "0 �γ任" +msgstr "0 による除算です" -#: expr.c:471 -#, fuzzy +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "bug: bad expassign token' %d" +msgstr "バグ: 誤った式のトークンです" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "`:' �����ɽ���Τ�����Ԥ��Ƥޤ�" +msgstr "条件式には `:' が予期されます" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" -msgstr "" +msgstr "0より小さい指数部です" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" +msgstr "識別子は前置インクリメントまたは前置デクリメントが予期されます" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "`)' ������ޤ���" +msgstr "`)' がありません" -#: expr.c:897 expr.c:1176 -#, fuzzy +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "���󥿥å��� ���顼: ���Ԥ��Ƥʤ��ե�����ν�λ" +msgstr "構文エラー: オペランドが予期されます" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "" +msgstr "構文エラー: 無効な計算演算子です" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "" +msgstr "%s%s%s: %s (エラーのあるトークンは \"%s\")" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "" +msgstr "無効な基底の数値です" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "無効な整数定数です" -#: expr.c:1280 +#: expr.c:1603 msgid "value too great for base" -msgstr "�١������ͤˤ��礭�����ޤ�" +msgstr "基底の値が大きすぎます" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "%s: �ؿ���ɽ�������" +msgstr "%s: 式のエラー\n" -#: general.c:61 -#, fuzzy +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getwd: ��̥ǥ��쥯�ȥ�˥��������Ǥ��ޤ���" +msgstr "getcwd: 親ディレクトリにアクセスできません" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6208 +#, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "fd %d �� fd 0 ��ʣ���Ǥ��ޤ���: %s" +msgstr "ファイル記述子(fd) %d を無遅延モードに再設定できません" -#: input.c:258 +#: input.c:266 #, c-format msgid "cannot allocate new file descriptor for bash input from fd %d" -msgstr "" +msgstr "新規ファイル記述子(fd) %d を bash の入力として割り当てられません" -#: input.c:266 -#, fuzzy, c-format +#: input.c:274 +#, c-format msgid "save_bash_input: buffer already exists for new fd %d" -msgstr "check_bash_input: fd %d �Τ���ΥХåե��ϴ���¸�ߤ��ޤ�" +msgstr "save_bash_input: 新規 fd %d のバッファはすでに存在します" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: pgrp pipe" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" -msgstr "" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" -msgstr "" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "" +msgid "forked pid %d appears in running job %d" +msgstr "実行中のジョブ %2$d で fork した pid %1$d が出現しました" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "プロセスグループ %2$ld のジョブ %1$d を削除しています" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: pid %5ld (%s) はまだ存在しているとマークされています" -#: jobs.c:1401 -#, fuzzy, c-format +#: jobs.c:1839 +#, c-format msgid "describe_pid: %ld: no such pid" -msgstr "describe_pid: �ץ�����ID(%d)��¸�ߤ��ޤ���!\n" +msgstr "describe_pid: %ld: そのような pid は存在しません" -#: jobs.c:1416 -#, fuzzy, c-format +#: jobs.c:1854 +#, c-format msgid "Signal %d" -msgstr "̤�ΤΥ����ʥ� #%d" +msgstr "シグナル %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "��λ" +msgstr "終了" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "���" +msgstr "停止" -#: jobs.c:1439 -#, fuzzy, c-format +#: jobs.c:1877 +#, c-format msgid "Stopped(%s)" -msgstr "���" +msgstr "停止 (%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "�¹���" +msgstr "実行中" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "��λ(%d)" +msgstr "終了(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "��λ %d" +msgstr "終了 %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "̤�ΤΥ��ơ�����" +msgstr "不明なステータス" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "(���������) " +msgstr "(コアダンプ) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr "" +msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" -msgstr "" +msgstr "子プロセス setpgid (%ld から %ld)" -#: jobs.c:2104 nojobs.c:585 -#, fuzzy, c-format +#: jobs.c:2608 nojobs.c:666 +#, c-format msgid "wait: pid %ld is not a child of this shell" -msgstr "�Ե�: pid %d ���Υ�����λҥץ������ǤϤ���ޤ���" +msgstr "wait: pid %ld はこのシェルの子プロセスではありません" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "" +msgstr "wait_for: プロセス %ld の記録がありません" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: ジョブ %d は停止しています" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: カレントジョブがありません" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "%s: ����֤Ͻ�λ���ޤ���" +msgstr "%s: ジョブは終了しました" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: ジョブ %d はすでにバックグラウンドで動作しています" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: 不定のブロックを避けるために WNOHANG をオンにしました。" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "�����å� %3d: " +msgstr "%s: %d 行: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr " (���������)" +msgstr " (コアダンプ)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "" +msgstr "(wd now: %s)\n" -#: jobs.c:3579 -#, fuzzy +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "initialize_jobs: getpgrp ����: %s" +msgstr "initialize_job_control: getpgrp が失敗しました" -#: jobs.c:3639 -#, fuzzy +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: バックグラウンドにジョブコントロールがありません" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "initialize_jobs: �饤�� discipline: %s" +msgstr "initialize_job_control: line discipline" -#: jobs.c:3649 -#, fuzzy +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "initialize_jobs: getpgrp ����: %s" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "端末プロセスグループを設定できません (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "���Υ�����ˤϥ�������椬����ޤ���" +msgstr "このシェルではジョブ制御が無効になっています" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "" +msgstr "malloc: 失敗したアサーション: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" +"\r\n" +"malloc: %s:%d: アサーション失敗\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "<̤��>" +msgstr "不明" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" +msgstr "malloc: free ブロックリストが壊れています" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" +msgstr "free: 既に free されたブロックを引数として呼び出されました" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "" +msgstr "free: 未割当のブロックを引数として呼び出されました" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "free: アンダーフローを検出しました。 mh_nbytes が範囲外です" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: アンダーフローを検出しました。magic8 壊れています" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "" +msgstr "free: 開始と終了の塊の大きさが異なっています" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "" +msgstr "realloc: 未割当のブロックを引数として呼び出されました" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "realloc: アンダーフローを検出しました。 mh_nbytes が範囲外です" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: アンダーフローを検出しました。magic8 が壊れています" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" +msgstr "realloc: 開始と終了の塊の大きさが異なっています" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" +msgstr "register_alloc: FIND_ALLOC で割り当てテーブルがいっぱいです\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "" +msgstr "register_alloc: %p 既にテーブル上では割り当てられています\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "" +msgstr "register_free: %p テーブル上では既に解放されています\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "" +msgstr "無効な基底" #: lib/sh/netopen.c:168 -#, fuzzy, c-format +#, c-format msgid "%s: host unknown" -msgstr "̤��" +msgstr "%s: 不明なホストです" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "" +msgstr "%s: 無効なサービスです" #: lib/sh/netopen.c:306 #, c-format msgid "%s: bad network path specification" -msgstr "" +msgstr "%s: ネットワークパス指定に誤りがあります" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "" +msgstr "ネットワーク操作はサポートされていません" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: ロケールを変更できません (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: ロケールを変更できません (%s): %s" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: %s: ロケールを変更できません (%s)" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: %s: ロケールを変更できません (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" -msgstr "�᡼�뤬 $_ �ˤ���ޤ�" +msgstr "メールが $_ にあります" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" -msgstr "�������᡼�뤬 $_ �ˤ���ޤ�" +msgstr "新しいメールが $_ にあります" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" -msgstr "%s �Υ᡼��ϴ����ɤޤ�Ƥޤ�\n" +msgstr "%s のメールは既読です\n" -#: make_cmd.c:323 -#, fuzzy +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "ɽ���˥��󥿥å������顼" +msgstr "構文エラー: 数値の式が必要です" -#: make_cmd.c:325 -#, fuzzy +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "���󥿥å��� ���顼: ���Ԥ��Ƥʤ��ե�����ν�λ" +msgstr "構文エラー: 予期しない `;' です" -#: make_cmd.c:326 -#, fuzzy, c-format +#: make_cmd.c:317 +#, c-format msgid "syntax error: `((%s))'" -msgstr "���󥿥å������顼" +msgstr "構文エラー: `((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: �����ؼ������� %d" +msgstr "make_here_document: 誤った指定の種類 %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "ヒアドキュメントの %d 行目でファイル終了 (EOF) に達しました (`%s' が必要)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: リダイレクト指定 `%d' は範囲外です" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" msgstr "" -#: parse.y:3133 parse.y:3369 -#, fuzzy, c-format +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "ヒアドキュメントの最大数を超えました" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "���Ԥ��Ƥʤ��ե�����ν�λ(EOF)��`%c'���դ���ޤ���ȯ��" +msgstr "対応する `%c' を探索中に予期しないファイル終了 (EOF) です" -#: parse.y:3951 -#, fuzzy +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "���Ԥ��Ƥʤ��ե�����ν�λ(EOF)��`%c'���դ���ޤ���ȯ��" +msgstr "`]]' を探索中に予期しないファイル終了 (EOF) です" -#: parse.y:3956 -#, fuzzy, c-format +#: parse.y:4457 +#, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "���Ԥ��Ƥʤ� token `%s' �Τ�����˥��󥿥å������顼" +msgstr "条件式に構文エラー: 予期しないトークン `%s' です" -#: parse.y:3960 -#, fuzzy +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "ɽ���˥��󥿥å������顼" +msgstr "条件式に構文エラーがあります" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "" +msgstr "予期しないトークン `%s' です。`)' が予期されます" -#: parse.y:4042 -#, fuzzy +#: parse.y:4543 msgid "expected `)'" -msgstr "`)' �����" +msgstr "`)' が予期されます" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "" +msgstr "条件単項演算子に予期しない引数 `%s' です" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" -msgstr "" +msgstr "条件単項演算子に予期しない引数です" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "" +msgstr "`%s` は予期しないトークンです。条件二項演算子が予期されます" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "" +msgstr "条件二項演算子が予期されます" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "" +msgstr "条件二項演算子に予期しない引数 `%s' です" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" -msgstr "" +msgstr "条件二項演算子に予期しない引数です" -#: parse.y:4161 -#, fuzzy, c-format +#: parse.y:4662 +#, c-format msgid "unexpected token `%c' in conditional command" -msgstr "`:' �����ɽ���Τ�����Ԥ��Ƥޤ�" +msgstr "条件コマンドに予期しないトークン `%c' があります" -#: parse.y:4164 -#, fuzzy, c-format +#: parse.y:4665 +#, c-format msgid "unexpected token `%s' in conditional command" -msgstr "`:' �����ɽ���Τ�����Ԥ��Ƥޤ�" +msgstr "条件コマンドに予期しないトークン `%s' があります" -#: parse.y:4168 -#, fuzzy, c-format +#: parse.y:4669 +#, c-format msgid "unexpected token %d in conditional command" -msgstr "`:' �����ɽ���Τ�����Ԥ��Ƥޤ�" +msgstr "条件コマンドに予期しないトークン %d があります" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "���Ԥ��Ƥʤ� token `%s' �Τ�����˥��󥿥å������顼" +msgstr "予期しないトークン `%s' 周辺に構文エラーがあります" -#: parse.y:5477 -#, fuzzy, c-format +#: parse.y:6137 +#, c-format msgid "syntax error near `%s'" -msgstr "���Ԥ��Ƥʤ� token `%s' �Τ�����˥��󥿥å������顼" +msgstr "`%s' 周辺に構文エラーがあります" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "���󥿥å��� ���顼: ���Ԥ��Ƥʤ��ե�����ν�λ" +msgstr "構文エラー: 予期しないファイル終了 (EOF) です" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" -msgstr "���󥿥å������顼" +msgstr "構文エラー" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "�����뤫��æ�Ф���Τ� \"%s\" ��Ȥ��ʤ���.\n" +msgstr "シェルから脱出するには \"%s\" を使用してください。\n" -#: parse.y:5711 -#, fuzzy +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "���Ԥ��Ƥʤ��ե�����ν�λ(EOF)��`%c'���դ���ޤ���ȯ��" +msgstr "対応する `)' を探索中に予期しないファイル終了(EOF)です" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" +msgstr "completion: 関数 `%s' が見つかりません" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" msgstr "" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" +msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: ������³ `%d'" +msgstr "print_command: 誤った接続 `%d'" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "" +msgstr "xtrace_set: %d: 無効なファイル記述子です" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: NULL ファイルポインタです" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf: `%c': 無効な書式文字です" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "" +msgstr "ファイル記述子が範囲外です" -#: redir.c:166 -#, fuzzy, c-format +#: redir.c:205 +#, c-format msgid "%s: ambiguous redirect" -msgstr "%s: �����ޤ��ʥ�����쥯��" +msgstr "%s: 曖昧なリダイレクトです" -#: redir.c:170 -#, fuzzy, c-format +#: redir.c:209 +#, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: ¸�ߤ���ե�������񤭤Ǥ��ޤ���" +msgstr "%s: 存在するファイルを上書きできません" -#: redir.c:175 -#, fuzzy, c-format +#: redir.c:214 +#, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: ����: `/' �򥳥ޥ��̾�˵��ҤǤ��ޤ���" +msgstr "%s: 制限されています: 出力をリダイレクト出来ません" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, c-format msgid "cannot create temp file for here-document: %s" -msgstr "�ץ������������˥ѥ��פ�����Ǥ��ޤ���: %s" +msgstr "ヒアドキュメント用一時ファイルを作成できません: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: �ꥹ�Ȥ�������С��˳�����Ƥ��ޤ���" +msgstr "%s: ファイル記述子 (fd) を変数に設定することはできません" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "" +msgstr "ネットワークが無効な場合 /dev/(tcp|udp)/host/port はサポートされません" -#: redir.c:1101 -#, fuzzy +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "������쥯����󥨥顼" +msgstr "リダイレクトエラー: ファイル記述子を複製できません" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "" +msgstr "/tmp が見つかりません。作成してください!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "" +msgstr "/tmp は有効なディレクトリ名でなければいけません" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pretty-printing モードはインタラクティブシェルでは無視されます" -#: shell.c:884 -#, fuzzy, c-format +#: shell.c:972 +#, c-format msgid "%c%c: invalid option" -msgstr "%c%c: �������ץ����" +msgstr "%c%c: 無効なオプション" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "uidを %d に設定できません: 実効uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "gidを %d に設定できません: 実効gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "デバッガを開始できません。デバッガモードが無効になっています" -#: shell.c:1651 +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: ディレクトリです" + +#: shell.c:1907 msgid "I have no name!" -msgstr "���̾��������ޤ���!" +msgstr "私は名前がありません!" -#: shell.c:1793 -#, fuzzy, c-format +#: shell.c:2061 +#, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "GNU %s, �С������ %s\n" +msgstr "GNU bash, バージョン %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"使用法:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "GNU Ĺ�����ץ����:\n" +msgstr "GNU 形式の長いオプション:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "������ ���ץ����:\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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD, -c command または -O shopt_option\t\t(起動時のみ)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s ���� -o ���ץ����\n" +msgstr "\t-%s または -o option\n" -#: shell.c:1822 +#: shell.c:2094 #, c-format msgid "Type `%s -c \"help set\"' for more information about shell options.\n" -msgstr "�����륪�ץ����ξܺ٤ˤĤ��Ƥ� `%s -c \"help set\"'������.\n" +msgstr "シェルオプションの詳細については `%s -c \"help set\"'と入力してください。\n" -#: shell.c:1823 +#: shell.c:2095 #, c-format msgid "Type `%s -c help' for more information about shell builtin commands.\n" -msgstr "�Ȥ߹��ߥ��ޥ�ɤˤĤ��Ƥ� `%s -c help'������ .\n" +msgstr "シェル組み込みコマンドについては `%s -c help' と入力してください。\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "" +msgstr "バグ報告をする場合は `bashbug' コマンドを使用してください。\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bashホームページ: \n" -#: sig.c:626 +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "GNUソフトウェアを使用する時の一般的なヘルプ : \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "" +msgstr "sigprocmask: %d: 無効な操作です" #: siglist.c:48 msgid "Bogus signal" -msgstr "���������ʥ�" +msgstr "悪いシグナル" #: siglist.c:51 msgid "Hangup" -msgstr "���" +msgstr "停止" #: siglist.c:55 msgid "Interrupt" -msgstr "������" +msgstr "割り込み" #: siglist.c:59 msgid "Quit" -msgstr "��λ" +msgstr "終了" #: siglist.c:63 msgid "Illegal instruction" -msgstr "�����ؼ�" +msgstr "不正な指定" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "" +msgstr "BPT trace/trap" #: siglist.c:75 msgid "ABORT instruction" -msgstr "�ؼ������" +msgstr "ABORT 指定" #: siglist.c:79 msgid "EMT instruction" -msgstr "EMT �ؼ�" +msgstr "EMT 指定" #: siglist.c:83 msgid "Floating point exception" -msgstr "��ư�����㳰" +msgstr "浮動小数点例外" #: siglist.c:87 msgid "Killed" -msgstr "�����ޤ���" +msgstr "Killed" #: siglist.c:91 msgid "Bus error" -msgstr "�Х����顼" +msgstr "バスエラー" #: siglist.c:95 msgid "Segmentation fault" -msgstr "�������ơ������ե����" +msgstr "セグメンテーションフォルト" #: siglist.c:99 msgid "Bad system call" -msgstr "���������ƥॳ����" +msgstr "誤ったシステムコール" #: siglist.c:103 msgid "Broken pipe" -msgstr "�ѥ��פ��ڤ�ޤ���" +msgstr "パイプが切れました" #: siglist.c:107 msgid "Alarm clock" -msgstr "���顼�����" +msgstr "アラーム時計" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "��λ���ޤ���" +msgstr "Terminated" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "�ޤ��� IO ����" +msgstr "急ぎの IO 状態" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "��� (�����ʥ�)" +msgstr "停止 (シグナル)" #: siglist.c:127 msgid "Continue" -msgstr "³��" +msgstr "続行" #: siglist.c:135 msgid "Child death or stop" -msgstr "�Ҥν�λ������� " +msgstr "子プロセスの死亡または停止 " #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "��� (tty ����)" +msgstr "停止 (tty 入力)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "��� (tty ����)" +msgstr "停止 (tty 出力)" #: siglist.c:147 msgid "I/O ready" -msgstr "I/O �Ѱդ��Ǥ��Ƥ��ޤ�" +msgstr "I/O 用意ができています" #: siglist.c:151 msgid "CPU limit" -msgstr "CPU ����" +msgstr "CPU limit" #: siglist.c:155 msgid "File limit" -msgstr "�ե��������" +msgstr "ファイル limit" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "���� (����)" +msgstr "警報 (仮想)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "���� (�ץ��ե�����)" +msgstr "警報 (プロファイル)" #: siglist.c:167 msgid "Window changed" -msgstr "�뤬�ѹ�����ޤ���" +msgstr "ウィンドウが変更されました" #: siglist.c:171 msgid "Record lock" -msgstr "��Ͽ�Υ��å�" +msgstr "記録のロック" #: siglist.c:175 msgid "User signal 1" -msgstr "�桼�������ʥ� 1" +msgstr "ユーザシグナル 1" #: siglist.c:179 msgid "User signal 2" -msgstr "�桼�������ʥ� 2" +msgstr "ユーザシグナル 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "HFT ̤������ϥǡ���" +msgstr "HFT 未決の入力データ" #: siglist.c:187 msgid "power failure imminent" -msgstr "�Ÿ��ξ�δ���" +msgstr "電源故障の危険" #: siglist.c:191 msgid "system crash imminent" -msgstr "�����ƥ९��å���δ���" +msgstr "システムクラッシュの危険" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "�ץ�������㤦CPU�˰�ư" +msgstr "プロセスを別のCPUに移動" #: siglist.c:199 msgid "programming error" -msgstr "�ץ�����ߥ󥰥��顼" +msgstr "プログラミングエラー" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "HTF monitor�⡼�ɤ�Ϳ�����ޤ���" +msgstr "HFT monitorモードが与えられました" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "HFT monitor�⡼�ɤ�å���ޤ���" +msgstr "HFT monitorモードが奪われました" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "" +msgstr "HFT サウンドシーケンスが完了しました" #: siglist.c:215 msgid "Information request" -msgstr "" - -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "̤�ΤΥ����ʥ� #" +msgstr "情報要求" -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "̤�ΤΥ����ʥ� #%d" +msgstr "不明なシグナル番号 %d" -#: subst.c:1333 subst.c:1454 -#, fuzzy, c-format +#: subst.c:1480 subst.c:1670 +#, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "��������: `%s' �� %s �ˤϤ���ޤ���" +msgstr "誤った代入: 閉じる `%s' が %s に存在しません" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "%s: �ꥹ�Ȥ�������С��˳�����Ƥ��ޤ���" +msgstr "%s: リストを配列要素に割り当てできません" -#: subst.c:4754 subst.c:4770 -#, fuzzy +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "�ץ������������˥ѥ��פ�����Ǥ��ޤ���: %s" +msgstr "プロセス代入ではパイプを作成できません" -#: subst.c:4802 -#, fuzzy +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "�ץ������������˻Ҥ�����Ǥ��ޤ���: %s" +msgstr "プロセス代入では子プロセスを作成できません" -#: subst.c:4847 -#, fuzzy, c-format +#: subst.c:6198 +#, c-format msgid "cannot open named pipe %s for reading" -msgstr "named pipe %s �� %s �س����ޤ���: %s" +msgstr "名前付きパイプ %s を読み込み用に開けません" -#: subst.c:4849 -#, fuzzy, c-format +#: subst.c:6200 +#, c-format msgid "cannot open named pipe %s for writing" -msgstr "named pipe %s �� %s �س����ޤ���: %s" +msgstr "名前付きパイプ %s を書き込み用に開けません" -#: subst.c:4867 -#, fuzzy, c-format +#: subst.c:6223 +#, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "named pipe %s �� fd %d �Τ����ʣ�����뤳�ȤϤǤ��ޤ���: %s" +msgstr "名前付きパイプ %s をファイル記述子(fd) %d として複製できません" -#: subst.c:5063 -#, fuzzy +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "コマンド代入: 入力のヌルバイトを無視しました" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "�������ޥ�ɤ˥ѥ��פ�����Ǥ��ޤ���: %s" +msgstr "コマンド代入ではパイプを作成できません" -#: subst.c:5097 -#, fuzzy +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "�������ޥ�ɤ˻Ҥ�����Ǥ��ޤ���: %s" +msgstr "コマンド代入では子プロセスを作成できません" -#: subst.c:5114 -#, fuzzy +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "command_substitute: �ѥ��פ� fd 1 �Ȥ���ʣ���Ǥ��ޤ���: %s" +msgstr "command_substitute: パイプを fd 1 として複製できません" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: 名前参照として無効な変数です" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: 無効な間接展開です" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: 無効な変数名です" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: パラメータが設定されていません" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: �ѥ�᡼�����̥����ϥ��åȤ���Ƥ��ޤ���" +msgstr "%s: パラメータが null または設定されていません" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "" +msgstr "%s: substring expression < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: ��������" +msgstr "%s: 誤った代入です" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "$%s: ���Τ褦�˻���Ǥ��ޤ���" +msgstr "$%s: この方法で割当はできません" -#: subst.c:7374 -msgid "" -"future versions of the shell will force evaluation as an arithmetic " -"substitution" -msgstr "" +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "将来のバージョンのシェルでは強制的に数値代入として評価されます" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "��������: `%s' �� %s �ˤϤ���ޤ���" +msgstr "誤った代入: %s に閉じる \"`\" がありません" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "" +msgstr "一致しません: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "���������" +msgstr "引数が予期されます" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s: �ؿ���ɽ�������" +msgstr "%s: 整数の式が予期されます" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "`)' �����" +msgstr "`)' が予期されます" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "`)', �����, �����Τ� %s" +msgstr "`)' が予期されますが、見つかったのは %s です" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" -msgstr "" +msgid "%s: binary operator expected" +msgstr "%s: 二項演算子が予期されます" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" -msgstr "" +msgid "%s: unary operator expected" +msgstr "%s: 単項演算子が予期されます" -#: test.c:811 +#: test.c:896 msgid "missing `]'" -msgstr "`]'��ȴ���Ƥޤ�" +msgstr "`]'がありません" -#: trap.c:203 -#, fuzzy +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "構文エラー: 予期しない `%s' です" + +#: trap.c:220 msgid "invalid signal number" -msgstr "���������ʥ��ֹ�" +msgstr "無効なシグナル番号" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: trap handler の最大レベルを超えています (%d)" + +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" -msgstr "" +msgstr "run_pending_traps: trap_list[%d] に誤った値があります: %p" -#: trap.c:331 +#: trap.c:416 #, c-format -msgid "" -"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" -msgstr "" +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: シグナルハンドラーは SIG_DFLです。, %d (%s) を自身に再送します。" -#: trap.c:380 -#, fuzzy, c-format +#: trap.c:509 +#, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler: ���������ʥ� %d" +msgstr "trap_handler: 誤ったシグナル %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "" +msgstr "`%s' の関数定義をインポート中にエラーが発生しました" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "シェルレベル (%d) は高すぎます。1に再設定されました" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "" +msgstr "make_local_variable: 現在のスコープは関数コンテキストではありません" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: 変数が初期化されていないかもしれません" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: 互換性のないタイプからは継承できません" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: 名前参照に整数を代入しようとしています" -#: variables.c:3159 +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: 現在のスコープは関数コンテキストではありません" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: �ѥ�᡼�����̥����ϥ��åȤ���Ƥ��ޤ���" +msgstr "%s は null の exportstr を持っています" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "%2$s に対する exportstr で %1$d は無効な文字です" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "%s に対する exportstr に `=' がありません" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" +msgstr "pop_var_context: shell_variables の先頭です。関数コンテキストではありません" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: global_variables コンテキストではありません" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" +msgstr "pop_scope: shell_variables の先頭です。一時環境スコープではありません" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: %s: ファイルとして開くことができません" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "" +msgstr "%s: %s: トレースファイル記述子として無効な値です" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: 値の互換性が範囲外です" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." -#: version.c:86 version2.c:83 -#, fuzzy, c-format -msgid "GNU bash, version %s (%s)\n" -msgstr "GNU %s, �С������ %s\n" +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "ライセンス GPLv3+: GNU GPL バージョン 3 またはそれ以降 \n" -#: version.c:91 version2.c:88 +#: version.c:86 version2.c:86 #, c-format -msgid "This is free software; you are free to change and redistribute it.\n" -msgstr "" +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, バージョン %s (%s)\n" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "This is free software; you are free to change and redistribute it." -#: version2.c:86 -#, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "There is NO WARRANTY, to the extent permitted by law." -#: version2.c:87 -#, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" - -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" +msgstr "%s: %lu バイトを割当できません (%lu バイトを割当済み)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: %lu バイトを割当できません" -#: xmalloc.c:163 +#: xmalloc.c:165 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" +msgstr "%s: %s:%d: %lu バイトを割当できません (%lu バイトを割当済み)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "%s: %s ������Ǥ��ޤ���" +msgstr "%s: %s:%d: %lu バイトを割当できません" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "alias [-p] [̾��[=��] ... ]" +msgstr "alias [-p] [name[=value] ... ]" -#: builtins.c:47 -#, fuzzy +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "unalias [-a] [̾�� ...]" +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 "" +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function または readline-command]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" -msgstr "���� [n]" +msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "³�� [n]" +msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 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 ":" +msgstr "builtin [shell-builtin [arg ...]]" -#: builtins.c:70 -msgid "true" -msgstr "" +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" -#: builtins.c:72 -msgid "false" -msgstr "" +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" -#: builtins.c:74 -msgid "command [-pVv] command [arg ...]" -msgstr "command [-pVv] ���ޥ�� [���� ...]" +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -#, fuzzy -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "declare [-afFrxi] [-p] ̾��[=��] ..." +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" #: builtins.c:78 -#, fuzzy -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "typeset [-afFrxi] [-p] ̾��[=��] ..." +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" #: builtins.c:80 -#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "local ̾��[=��] ..." +msgstr "local [option] name[=value] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "echo [-neE] [���� ...]" +msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" -msgstr "echo [-n] [���� ...]" - -#: builtins.c:90 -#, fuzzy -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "enable [-pnds] [-a] [-f �ե�����̾] [̾�� ...]" +msgstr "echo [-n] [arg ...]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "eval [���� ...]" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filename] [name ...]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "getopts optstring ̾�� [����]" +msgid "eval [arg ...]" +msgstr "eval [arg ...]" #: builtins.c:96 -#, fuzzy -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "exec [-cl] [-a ̾��] �ե����� [������쥯����� ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg ...]" #: builtins.c:98 -msgid "exit [n]" -msgstr "��λ [n]" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" #: builtins.c:100 -#, fuzzy +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 msgid "logout [n]" -msgstr "����������" +msgstr "logout [n]" -#: builtins.c:103 -#, fuzzy +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" -msgstr "fc [-e ename] [-nlr] [�ǽ�] [�Ǹ�] of fc -s [�ѥ�����=rep] [���ޥ��]" +msgstr "fc [-e ename] [-lnr] [first] [last] または fc -s [pat=rep] [command]" -#: builtins.c:107 -#, fuzzy +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "disown [jobspec ...]" +msgstr "fg [job_spec]" -#: builtins.c:111 -#, fuzzy +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "disown [jobspec ...]" +msgstr "bg [job_spec ...]" -#: builtins.c:114 -#, fuzzy +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "hash [-r] [-p �ѥ�̾] [̾�� ...]" +msgstr "hash [-lr] [-p pathname] [-dt] [name ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [�ѥ����� ...]" +msgstr "help [-dms] [pattern ...]" -#: 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:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d offset] [n] または history -anrw [filename] または history -ps arg [arg...]" -#: builtins.c:125 +#: builtins.c:127 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 ...]" +msgstr "jobs [-lnprs] [jobspec ...] または jobs -x command [args]" -#: 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "let ���� [���� ...]" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... または kill -l [sigspec]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let 引数 [引数 ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "return [n]" +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:140 -#, fuzzy -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "set [--abefhkmnptuvxBCHP] [-o ���ץ����] [���� ...]" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "unset [-f] [-v] [̾�� ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" #: builtins.c:144 -#, fuzzy -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-nf] [̾�� ...] ���� export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [name ...]" #: builtins.c:146 -#, fuzzy -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-anf] [̾�� ...] ���� readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [name[=value] ...] または export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "��λ [n]" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [name[=value] ...] または readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "source �ե�����̾" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source filename [arguments]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr ". �ե�����̾" +msgstr ". filename [arguments]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 -msgid "test [expr]" -msgstr "test [ɽ��]" - #: builtins.c:160 -msgid "[ arg... ]" -msgstr "[ ����... ]" +msgid "test [expr]" +msgstr "test [expr]" #: builtins.c:162 -msgid "times" -msgstr "times" +msgid "[ arg... ]" +msgstr "[ arg... ]" -#: builtins.c:164 -#, fuzzy +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "trap [����] [signal_spec] ���� trap -l" +msgstr "trap [-lp] [[arg] signal_spec ...]" -#: builtins.c:166 -#, fuzzy +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "type [-apt] ̾�� [̾�� ...]" +msgstr "type [-afptP] name [name ...]" -#: builtins.c:169 -#, fuzzy -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdfmstpnuv] [���]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" -#: builtins.c:172 -#, fuzzy +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "umask [-S] [�⡼��]" - -#: builtins.c:175 -#, fuzzy -msgid "wait [id]" -msgstr "wait [n]" +msgstr "umask [-p] [-S] [mode]" -#: builtins.c:179 -#, fuzzy -msgid "wait [pid]" -msgstr "wait [n]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:182 -#, fuzzy -msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for ̾�� [in ���� ... ;] do ���ޥ�ɷ�; done" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" #: builtins.c:184 -#, fuzzy -msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "for ̾�� [in ���� ... ;] do ���ޥ�ɷ�; done" +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done" #: builtins.c:186 -msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "select ̾�� [in ���� ... ;] do ���ޥ�ɷ�; done" +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done" #: builtins.c:188 -msgid "time [-p] pipeline" -msgstr "" +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in WORDS ... ;] do COMMANDS; done" #: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "case ���� in [�ѥ����� [| �ѥ�����]...) ���ޥ�ɷ� ;;]... esac" +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" #: builtins.c:192 -msgid "" -"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " -"COMMANDS; ] fi" -msgstr "" -"if ���ޥ�ɷ�; then ���ޥ�ɷ�; [ elif ���ޥ�ɷ�; then ���ޥ�ɷ�; ]... " -"[ else ���ޥ�ɷ�; ] fi" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "while ���ޥ�ɷ�; do ���ޥ�ɷ�; done" +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:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until ���ޥ�ɷ�; do ���ޥ�ɷ�; done" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while COMMANDS; do COMMANDS-2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until COMMANDS; do COMMANDS-2; done" #: builtins.c:200 -#, fuzzy -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "function ̾�� { ���ޥ�ɷ� ; } or ̾�� () { ���ޥ�ɷ� ; } " +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAME] command [redirections]" #: builtins.c:202 -#, fuzzy -msgid "{ COMMANDS ; }" -msgstr "{ ���ޥ�ɷ� }" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { COMMANDS ; } または name () { COMMANDS ; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "" +msgid "{ COMMANDS ; }" +msgstr "{ COMMANDS ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "ɽ������Ԥ��Ƥޤ�" +msgid "job_spec [&]" +msgstr "job_spec [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "ɽ������Ԥ��Ƥޤ�" +msgid "(( expression ))" +msgstr "(( expression ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expression ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "" +msgstr "変数 - 変数の名前とその意味" -#: builtins.c:213 -#, fuzzy +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "pushd [�ǥ��쥯�ȥ� | +N | -N ] [-n]" +msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 -#, fuzzy +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "popd [+N | -N] [-n]" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 -#, fuzzy +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o Ĺ�����ץ����] optname [optname...]" +msgstr "shopt [-pqsu] [-o] [optname ...]" -#: builtins.c:226 +#: builtins.c:228 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 "" +msgstr "printf [-v var] format [arguments]" -#: 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "type [-apt] ̾�� [̾�� ...]" +#: builtins.c:235 +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:240 -msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o option] [-DEI] [name ...]" #: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2317,28 +2530,44 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" alias returns true unless a NAME is supplied for which no alias has been\n" " defined." msgstr "" +"エイリアスを定義または表示します。\n" +" \n" +" 引数がない場合、`alias` はエイリアス一覧を `alias 名前=値' という再使用可能な\n" +" 形式で標準出力に表示します。\n" +" \n" +" そうでなければ、与えられた名前と値でエイリアスを定義します。値の後続に空白\n" +" が存在する場合は次の語はエイリアス展開時にエイリアス代入対象として確認され\n" +" ます。\n" +"\n" +" オプション:\n" +" -p\tすべての定義されたエイリアスを再利用可能な形式で表示します\n" +" \n" +" 終了ステータス:\n" +" alias は与えられた名前でエイリアスが定義されなかった場合を除き true を返します。" -#: builtins.c:276 -#, fuzzy +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" -"[̾��]���������Ƥ��륨���ꥢ�����������ʤ������⤷��-a ���ץ�������ꤷ" -"���ʤ顢" +"定義されたエイリアス一覧から各名前のエイリアスを削除します。\n" +" \n" +" Options:\n" +" -a\tすべてのエイリアス定義を削除します。\n" +" \n" +" 名前がエイリアスに存在しない場合を除き true を返します。" -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2350,34 +2579,65 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" - -#: builtins.c:326 +"Readline のキー割り当てと変数を設定します。\n" +" \n" +" キーシーケンスを Readline 関数またはマクロに割り当てを行うか、Readline\n" +" 変数を設定します。オプションが無い引数の構文は ~/.inputrc の構文と\n" +" 同じです。しかし、単一の引数として与えなければなりません。\n" +" 例: bind '\"\\C-x\\C-r\": re-read-init-file'\n" +"\n" +" オプション:\n" +" -m keymap このコマンドの間のキーマップとして KEYMAP を使用する。\n" +" 利用可能なキーマップ名は emacs, emacs-standard, emacs-meta,\n" +" emacs-ctlx, vi, vi-move, vi-command, および vi-insertです。\n" +" -l 関数名一覧を表示する。\n" +" -P 関数名およびキー割り当て一覧を表示する。\n" +" -p 入力として再利用可能な形式で、関数名とキー割り当てを一覧\n" +" 表示する\n" +" -S マクロを起動するキーシーケンスとその値を一覧表示する\n" +" -s 入力として再利用可能な形式で、マクロを起動する\n" +" キーシーケンスとその値を一覧表示する\n" +" -V 変数名と値の一覧を表示する\n" +" -v 入力として再利用可能な形式で、変数名と値を一覧\n" +" 表示する\n" +" -q function-name 関数名がどのキーによって起動されるか探索する\n" +" -u function-name 関数名にバインドされたすべてのキーを解除する\n" +" -r keyseq KEYSEQ に対する割り当てを解除する\n" +" -f filename FILENAME からキーバインドを読み込む\n" +" -x keyseq:shell-command\tKEYSEQ が入力された時に SHELL-COMMAND \n" +" \t\t\t\tが実行されるようにする\n" +" -X\t\t 入力として再利用可能な形式で -x によって割り当て\n" +" られたキーシーケンスとコマンドを一覧表示する\n" +" \n" +" 終了ステータス:\n" +" bind は解釈できないオプションが渡された場合およびエラーが発生した場合\n" +" を除き 0 を返します。" + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2387,8 +2647,15 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"for、 while、または until ループを脱出します。\n" +" \n" +" FOR、 WHILE、または UNTIL ループを脱出します もし N が指定されている場合、\n" +" N階層のループを終了します。\n" +" \n" +" 終了ステータス:\n" +" N が1未満の場合を除き、終了ステータスは 0 です。" -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2398,22 +2665,37 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"for, while, または until ループを再開します。\n" +" \n" +" FOR, WHILE または UNTIL ループの次の繰り返しを再開します。\n" +" もし N が指定された場合、N 階層のループを再開します。\n" +" \n" +" 終了ステータス:\n" +" N が1未満の場合を除き、終了ステータスは 0 です。" -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" +"シェル組み込みコマンドを実行します。\n" +" \n" +" コマンドを検索しないでシェル組み込みコマンドを ARG をつけて実行し\n" +" ます。これはシェル組み込みコマンドをシェル関数として実装するが、関数\n" +" 内で組み込みコマンドを実行する必要がある場合に役に立ちます。\n" +" \n" +" 終了ステータス:\n" +" シェル組み込みコマンドの終了ステータスを返します。シェル組み込みコマ\n" +" ンドが無い場合は false を返します。" -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2428,47 +2710,93 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" +"現在のサブルーチン呼び出しのコンテキストを返します。\n" +" \n" +" EXPR が無い場合 \"$line $filename\" を返します。 EXPR がある場合、\n" +" \"$line $subroutine $filename\" を返します。この追加の情報はスタックトレース\n" +" を提供する時に利用します。\n" +" \n" +" EXPR の値は現在のフレームに戻るまでに何回フレームが呼び出されているかを\n" +" 意味します。最上位のフレームは 0 です。\n" +" \n" +" 終了ステータス:\n" +" シェルが関数を実行できないか式 EXPR が無効な場合を除き 0 を返します。" -#: builtins.c:383 +#: builtins.c:387 +#, fuzzy msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." msgstr "" +"シェルの作業ディレクトリを変更します。\n" +" \n" +" カレントディレクトリを DIR へ変更します。DIR のデフォルトは HOME シェル\n" +" 変数の値です。\n" +" \n" +" 変数 CDPATH は DIR を含んでいる検索パスを定義します。CDPATH にはコロン(:)\n" +" で区切られた代替ディレクトリ名を指定します。\n" +" 値がないディレクトリ名はカレントディレクトリと同義です。 DIR が\n" +" スラッシュ (/) から始まる場合は CDPATH は使用されません。\n" +" \n" +" ディレクトリが見つからなく、かつ `cdabl_vars' シェルオプションが設定されて\n" +" いる場合、引数は変数名として扱われます。その変数に値がある場合、その値が\n" +" DIR として扱われます。\n" +" \n" +" オプション:\n" +" -L\tシンボリックリンクを強制的にたどります: '..' を処理後、\n" +" DIR のシンボリックリンクを解決します。\n" +" -P\tシンボリックリンクをたどらず物理構造を利用します: '..' を処理前に\n" +" DIR のシンボリックリンクを解決します。\n" +" -e\t-P オプションが与えられ、かつ、現在の作業ディレクトリが正しく\n" +" 決定できない場合、終了ステータスが 0 以外で終了します\n" +" -@\tサポートしているシステムでは、\n" +" 拡張属性のファイルをファイル属性つきのディレクトリとして表示します。\n" +" \n" +" デフォルトでは `-L' が指定された場合と同様シンボリックリンクをたどります。\n" +" `..' はその前のパスコンポーネント(ディレクトリ)を'/'か DIRの最初まで削除します。\n" +" \n" +" 終了ステータス:\n" +" ディレクトリを変更した場合、および -P が使用されている時に $PWD が正しく\n" +" 設定された場合は 0、それ以外は 0 以外の値です。" -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2477,8 +2805,20 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"カレントディレクトリの名前を表示します。\n" +" \n" +" オプション:\n" +" -L\t$PWD がカレントディレクトリの名前を指している場合は $PWD\n" +" \tを表示する\n" +" -P\tシンボリックリンクを辿った物理的なディレクトリを表示する\n" +" \n" +" デフォルトでは `pwd' は `-L' が指定されたように動作します。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションまたはカレントディレクトリを読み込めない場合を除き\n" +" 0を返します。" -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2487,43 +2827,71 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" +"何もしないコマンド\n" +" \n" +" 何も効果がありません。コマンドは何も行いません\n" +" \n" +" 終了ステータス:\n" +" 常に成功です。" -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"結果として成功を返します。\n" +" \n" +" 終了ステータス:\n" +" 常に成功です。" -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"結果として失敗を返します。\n" +" \n" +" 終了ステータス:\n" +" 常に失敗です。" -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"単純なコマンドを実行するかコマンドに関する情報を表示します。\n" +" \n" +" シェル関数の探索を抑止して COMMAND を引数 ARGS で実行します。または\n" +" 指定した COMMANDs の情報を表示します。シェル関数と同じ名前のコマンド\n" +" がディスク上に存在する時に使用します。\n" +" \n" +" オプション:\n" +" -p\t全ての標準ユーティリティが見つかると保証される PATH を\n" +" \tデフォルトの値として使用する\n" +" -v\t`type'組み込み関数と同様に COMMAND の説明を表示する\n" +" -V\tCOMMAND に対してより冗長な説明を表示する\n" +" \n" +" 終了ステータス:\n" +" COMMAND の終了ステータスを返します。または COMMAND が見つからない時に失敗を返します。" -#: builtins.c:476 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2533,17 +2901,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2551,22 +2924,59 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." -msgstr "" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"変数の値および属性を設定します。\n" +" \n" +" 変数を宣言し、それに属性を与えます。NAME を指定しない場合\n" +" すべての変数に関する属性と値を表示します。\n" +" \n" +" オプション:\n" +" -f\t関数名と関数定義に表示を制限する\n" +" -F\t関数名のみ表示するように制限する (デバッグ中は行番号と\n" +" \tソースファイルも追加される)\n" +" -g\tシェル関数内で使用された時に大域変数を作成する。それ以\n" +" \t外の場合は無視される\n" +" -p\t各 NAME の属性と値を表示する\n" +" \n" +" 属性を設定するオプション:\n" +" -a\tNAME をインデックス型配列にする(サポートされている場合)\n" +" -A\tNAME を連想配列にする(サポートされている場合)\n" +" -i\tNAME に`整数型'の属性を設定する\n" +" -l\tNAME の設定時に値を小文字に変換する\n" +" -n\tNAME の値が変数名の参照となるようにする\n" +" -r\tNAME を読み取り専用にする\n" +" -t\tNAME に `trace' 属性を設定する\n" +" -u\tNAME 設定時に値を大文字に設定する\n" +" -x\tNAME をエクスポートする\n" +" \n" +" `-' の代わりに `+' を使用すると与えられた属性を無効にします。\n" +" \n" +" 整数属性を与えられた変数は値を割り当てられた時に、数値として評価され\n" +" ます。(`let' コマンド参照してください。)\n" +"\n" +" 関数内で使用された場合は `local' コマンドを使用した時と同様に `declare' \n" +" は NAME をローカル変数にします。`-g' オプションはこの動作を抑止します。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられたかエラーが発生しない限り成功を返します。" -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"変数の値および属性を設定します。\n" +" \n" +" declare の同義語です。`help declare'を参照してください。" -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2577,15 +2987,28 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"ローカル変数を定義します。\n" +" \n" +" NAME という名前のローカル変数を定義し値を VALUE に設定します。OPTION は\n" +" `declare'と同じすべてのオプションを受け付けます。\n" +" \n" +" 局所変数はシェル関数の中でのみ使用できます。宣言された関数の中およびその\n" +" 子関数のみで参照できます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられる、エラーが発生する、またはシェルが関数を実行できない\n" +" 場合を除き成功を返します。" -#: builtins.c:537 +#: builtins.c:557 +#, fuzzy msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2597,6 +3020,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2604,15 +3028,45 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"引数を標準出力に書き出します。\n" +" \n" +" 引数 ARG を単一空白文字で区切り、最後に改行を加えて標準出力に表示します。\n" +" \n" +" オプション:\n" +" -n\t最後に改行を加えない\n" +" -e\t下記に示すバックスラッシュエスケープの解釈を有効にする\n" +" -E\tバックスラッシュエスケープの解釈を明示的に無効にする\n" +" \n" +" `echo' では下記のバックスラッシュエスケープ文字を解釈します:\n" +" \\a\tアラート (bell)\n" +" \\b\tバックスペース\n" +" \\c\t以降の出力を抑止\n" +" \\e\tエスケープ文字\n" +" \\E\tエスケープ文字\n" +" \\f\tフォームフィード\n" +" \\n\t改行\n" +" \\r\tキャリッジリターン\n" +" \\t\t水平タブ\n" +" \\v\t垂直タブ\n" +" \\\\\tバックスラッシュ\n" +" \\0nnn\tASCII コードが NNN (8進数) の文字。 NNN は0から3個の8進数字\n" +" \\xHH\t値が HH (16進数) の8ビット文字。HH は 1 または2個の16進数字\n" +"\n" +" 終了ステータス:\n" +" 書き込みエラーが発生しない限り成功を返します。" -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2624,8 +3078,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"引数を標準出力に書き出します。\n" +" \n" +" 引数 ARG を最後に改行を加えて標準出力に表示します。\n" +" \n" +" オプション:\n" +" -n\t最後に改行を加えない\n" +" \n" +" 終了ステータス:\n" +" 書き込みエラーが発生しない限り成功を返します。" -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2651,20 +3114,51 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"シェル組み込み関数を有効または無効にします。\n" +" \n" +" シェル組み込み関数を有効または無効にします。シェル組み込み関数を無効にすると\n" +" ディスク上に存在するシェル組み込み関数と同じ名前のコマンドをフルパスを指定す\n" +" ることなく実行することが出来ます。\n" +" \n" +" オプション:\n" +" -a\t組み込み関数の一覧をそれぞれが有効か否かを含めて表示します\n" +" -n\tNAME を無効にするか、または無効な組み込み関数一覧を表示します\n" +" -p\t組み込み関数一覧を再利用可能な形式で表示します\n" +" -s\tPosix で定義されている組み込み関数のみ表示します\n" +" \n" +" 動的ロードを制御するオプション:\n" +" -f\t共有オブジェクト FILENAME から組み込み関数 NAME を読み込みます\n" +" -d\t-f で読み込まれた組み込み関数を削除します\n" +" \n" +" オプション無しで起動された場合、各 NAME は有効になります。\n" +" \n" +" $PATH 上に存在する `test' をシェル組み込み関数の代わりに利用する場合は\n" +" `enable -n test'と入力してください。\n" +" \n" +" 終了ステータス:\n" +" NAME が組み込み関数ではないかエラーが発生しない限り成功を返します。" -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"引数をシェルコマンドとして実行します。\n" +" \n" +" 引数を一つの文字列に連結し、その結果をシェルへの入力として使用し、\n" +" その結果をコマンドとして実行します。\n" +" \n" +" 終了ステータス:\n" +" コマンドの終了ステータスを返します。コマンドが null の場合は成功を\n" +" 返します。" -#: builtins.c:626 +#: builtins.c:652 +#, fuzzy msgid "" "Parse option arguments.\n" " \n" @@ -2697,67 +3191,122 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 "" +"オプション引数を解析します。\n" +" \n" +" getopts は位置パラメーターをオプションとして解析する際にシェルによっ\n" +" て使用される手続です。\n" +" \n" +" OPTSTRING には認識されるオプションの文字が含まれます。文字の後に\n" +" コロン(:)が続く場合は、オプションは空白文字でオプションから区切\n" +" られた引数を持つと予期されます。\n" +" \n" +" getopts は起動されるたびに、次のオプションをシェル変数 $name に保存\n" +" します。name が存在しない場合は初期化されます。そして処理する必要が\n" +" ある次の引数の位置をシェル変数 OPTIND に保存します。OPTIND はシェル\n" +" またはシェルスクリプトが起動するたびに 1 に初期化されます。オプショ\n" +" ンに引数が要求される場合、getopt は引数をシェル変数 OPTARG に保存し\n" +" ます。\n" +" \n" +" getopts はエラーを2つの方法のいずれかで報告します。OPTSTRINGの最初\n" +" の文字がコロン (:) の場合、getopts はサイレントエラー報告を使用し\n" +" ます。このモードではエラーメッセージは表示されません。無効なオプシ\n" +" ョンを見つけた時、 getopts はオプションの文字を OPTARG に設定しま\n" +" す。必要なオプション引数が見つからない場合は、getopts は NAME に\n" +" ':' を設定し、OPTARG にオプションの文字を設定します。getopts が\n" +" サイレントモードで無い場合、無効なオプションを見つけた時、getopts \n" +" は NAME に '?' を設定し、OPTARG を未定義状態にします。そして\n" +" 診断メッセージを表示します。\n" +" \n" +" シェル変数 OPTERR の値が 0 の場合、getopts は OPTSTRING の最初が\n" +" コロン (:) か否かにかかわらずエラーメッセージの表示を抑止します。\n" +" OPTERR のデフォルト値は 1 です。\n" +" \n" +" getopts では通常位置パラメーター ($0 - $9) を解析します。しかし\n" +" 他の引数が与えられた場合、それらが解析されます。\n" +" \n" +" 終了ステータス:\n" +" オプションが見つかった場合に成功を返します。オプションの終わり\n" +" に到達するかエラーが発生した時に失敗を返します。" -#: builtins.c:668 +#: builtins.c:694 +#, fuzzy 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"シェルを与えられたコマンドで置換します。\n" +" \n" +" 指定したプログラムでシェルを置換して COMMAND を実行します。ARGUMENTS は\n" +" COMMAND の引数となります。もし COMMAND が指定されない場合は、現在のシェル\n" +" に対する全てのリダイレクトが行われます。\n" +" \n" +" オプション:\n" +" -a name\tNAME を COMMAND の 0 番目の引数として与えます\n" +" -c\t\tCOMMAND を環境変数なしで実行します\n" +" -l\t\tdash(-) を COMMAND の 0 番目の引数とします\n" +" \n" +" もしコマンドが実行できない場合、非対話的なシェルは終了し、対話的なシェルは\n" +" オプション `execfail' が設定されます。\n" +" \n" +" 終了ステータス:\n" +" COMMAND が見つからないかリダイレクトエラーが発生しない限り成功を返します。" -#: builtins.c:689 +#: builtins.c:715 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 でシェルを終了します。 N を指定しない場合は\n" +" 最後に実行したコマンドの終了ステータスになります。" -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"ログインシェルを終了します。\n" +" \n" +" 終了ステータス N でログインシェルを終了します。実行したのがログインシェル\n" +" 内で無い場合はエラーを返します。" -#: builtins.c:708 +#: builtins.c:734 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" +" 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" +" -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" @@ -2771,11 +3320,33 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" Returns success or status of executed command; non-zero if an error occurs." msgstr "" +"ヒストリ一覧からコマンドを表示または実行します。\n" +" \n" +" fc はヒストリ一覧を表示または編集してコマンドを再実行するために使用します。\n" +" FIRST および LAST は範囲を指定する数値です。FIRST は文字列を指定することも\n" +" できます。その場合はその文字列で始まる直近に実行したコマンドを表します。\n" +" \n" +" オプション:\n" +" -e ENAME\t使用するエディタを選択します。デフォルトは FCEDIT で、次は EDITOR、\n" +" \t\tそして vi の順です。\n" +" -l \t編集ではなく行を一覧表示します\n" +" -n\t一覧表示時に行番号を表示しません\n" +" -r\t行を逆順にします (最新のコマンドを最初にする)\n" +" \n" +" `fc -s [pat=rep ...] [command]' 形式を使用すると、COMMAND は\n" +" OLD=NEW の置換が行われた後に再実行されます。\n" +" \n" +" これを使った使いやすいエイリアスは r='fc -s' です。これで `r cc' を実行する\n" +" と最後に実行した cc で始まるコマンドが実行されます。`r' で直前のコマンドが\n" +" 実行されます。\n" +" \n" +" 終了ステータス:\n" +" 実行したコマンドのステータスまたは成功が帰ります。エラーが発生した場合は 0 \n" +" 以外の値になります。" -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2786,46 +3357,81 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" +"ジョブをフォアグランドにします。\n" +" \n" +" JOB_SPEC で識別されたジョブをフォアグランドにして、現在のジョブにします。\n" +" もし JOB_SPEC が存在しない場合、シェルが現在のレントジョブとして考えている\n" +" ものが利用されます。\n" +" \n" +" \n" +" 終了ステータス:\n" +" フォアグラウンドになったコマンドのステータスを返します。または、エラーが\n" +" 発生した時に失敗を返します。" -#: builtins.c:753 +#: builtins.c:779 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" +" 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" +" \n" +" JOB_SPEC で識別されるジョブを `&' と共に始めた時のようにバックグラウンドに\n" +" します。もし JOB_SPEC が存在しない場合、シェルが現在のジョブとして考えてい\n" +" るものが利用されます。\n" +" \n" +" 終了ステータス:\n" +" ジョブ制御が有効になっていないかエラーが発生しない限り成功を返します。" -#: builtins.c:767 +#: builtins.c:793 +#, fuzzy 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"プログラムの位置を記憶または表示します。\n" +" \n" +" 各コマンド NAME のフルパスを決定し記憶します。もし引数が与えられなかった場合、\n" +" 記憶しているコマンドの情報が表示されます。\n" +" \n" +" オプション:\n" +" -d\t\t各 NAME に対して記憶している情報を消去します\n" +" -l\t\t入力として再可能な形式で表示します\n" +" -p pathname\tNAME のフルパス名として PATHNAME を使用します\n" +" -r\t\t全ての記憶している位置情報を消去します\n" +" -t\t\t各 NAME に対して記憶している位置を表示します。複数の NAME\n" +" \t\tが与えられた場合、位置を表示する前に対象となる NAME を表示します。\n" +" 引数:\n" +" NAME\t\t各 NAME は $PATH の中を探索され、記録されたコマンド一覧に\n" +" \t\t追加されます。\n" +" \n" +" 終了ステータス:\n" +" NAME が見つからないか、無効なオプションが与えられない限り成功を返します。" -#: builtins.c:792 +#: builtins.c:818 +#, fuzzy msgid "" "Display information about builtin commands.\n" " \n" @@ -2837,17 +3443,34 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" +"組み込みコマンドの情報を表示します。\n" +" \n" +" 組み込みコマンドに関する簡潔な要約を表示します。もし PATTERN が\n" +" 指定された場合は、PATTERN に一致する全てのコマンドに対する詳細な\n" +" ヘルプを表示します。それ以外はヘルプトピックを表示します。\n" +" \n" +" オプション:\n" +" -d\t各ヘルプトピックに対して短い説明を出力します\n" +" -m\t使用法を擬似的な man ページ形式で表示します\n" +" -s\t一致した各トピックに対して簡単な使用法のみを表示します\n" +" \tPATTERN\n" +" \n" +" 引数:\n" +" PATTERN\tヘルプトピックを指定するパターン\n" +" \n" +" 終了ステータス:\n" +" PATTERN が見つからないか無効なオプションが与えられない限り成功を返します。" -#: builtins.c:816 +#: builtins.c:842 +#, fuzzy msgid "" "Display or manipulate the history list.\n" " \n" @@ -2856,32 +3479,62 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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 がある場合は最後の N 個の項目のみを表示します。\n" +" \n" +" オプション:\n" +" -c\tヒストリ一覧から全ての項目を削除します。\n" +" -d offset\tOFFSET 番目のヒストリ項目を削除します。\n" +" \n" +" -a\tこのセッションからヒストリファイルに行を追加します\n" +" -n\tヒストリファイルからまだ読み込まれていない行を全て読み込みます\n" +" -r\tヒストリファイルを読み込み、内容をヒストリ一覧に追加します\n" +" -w\t現在のヒストリをヒストリファイルに書き込みます。そしてそれらを\n" +" \tヒストリ一覧に追加します\n" +" \n" +" -p\t各 ARG に対してヒストリ展開を実行し、結果をヒストリ一覧に追加し\n" +" \tしないで表示します\n" +" -s\tARG を単一の項目としてヒストリ一覧に追加します\n" +" \n" +" FILENAME を与えた場合、FILENAME がヒストリファイルをして使用されます。それが\n" +" 無く、$HISTFILE に値がある場合その値が使用されます。そうでなければ \n" +" ~/.bash_history が使用されます。\n" +"\n" +" もし $HISTTIMEFORMAT 変数が設定され、NULL で無ければ、strftime(3) の書式\n" +" 文字列として各ヒストリ項目の時刻を表示する際に使用されます。それ以外は\n" +" 時刻は表示されません。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" -#: builtins.c:852 +#: builtins.c:879 +#, fuzzy msgid "" "Display status of jobs.\n" " \n" @@ -2890,8 +3543,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2904,8 +3557,27 @@ msgid "" " 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" +" \n" +" アクティブなジョブを一覧表示します。JOBSPEC はジョブの出力を制限します。\n" +" オプションがない場合全てのアクティブなジョブのステータスが表示されます。\n" +" \n" +" オプション:\n" +" -l\t通常の情報に加えてプロセスIDを一覧表示する\n" +" -n\t最後の通知からステータスが変更になったプロセスのみ一覧表示\n" +" \tする\n" +" -p\tプロセスIDのみを一覧表示する\n" +" -r\t実行中のジョブの出力を制限する\n" +" -s\t停止中のジョブの出力を制限する\n" +" \n" +" -x が指定された場合、 COMMAND は ARGS に現れるジョブをプロセスグルー\n" +" プリーダーのプロセス ID に置き換えた全てのジョブ指定の後に実行されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。\n" +" もし -x が使用された場合、COMMAND の終了ステータスを返します。" -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2915,14 +3587,28 @@ msgid "" " 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" +" \t\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 "" +"現在のシェルからジョブを削除します。\n" +" \n" +" アクティブなジョブのテーブルから各引数の JOBSPEC を削除します。JOBSPEC が指定\n" +" されない場合、シェルが現在のジョブと考えているものが使用されます。\n" +" \n" +" オプション:\n" +" -a\tJOBSPEC が与えられない時に全てのジョブを削除する\n" +" -h\tシェルが SIGHUP を受け取った時に各 JOBSPEC のジョブに対して SIGHUP \n" +" \tが送られないようにマークする\n" +" -r\t実行中のジョブのみ削除する\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションか JOBSPEC が与えられない限り成功を返します。" -#: builtins.c:898 +#: builtins.c:925 +#, fuzzy msgid "" "Send a signal to a job.\n" " \n" @@ -2934,7 +3620,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2943,16 +3630,33 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"ジョブにシグナルを送ります。\n" +" \n" +" PID または JOBSPEC で識別されるプロセスに SIGSPEC または SIGNUM で名付けら\n" +" れるシグナルを送ります。もし SIGSPEC も SIGNUM も指定されない場合、SIGTERM\n" +" と見なされます。\n" +" \n" +" オプション:\n" +" -s sig\tSIG をシグナル名とする\n" +" -n sig\tSIG をシグナル番号とする\n" +" -l\tシグナル名を一覧表示する。-l の後に引数が続いた場合、\n" +" \tそれらは一覧表示されるべきシグナル番号であると見なされる\n" +" \n" +" Kill は次の2つの理由からシェル組み込み関数です。一つはプロセスIDの代わりに\n" +" ジョブIDを使用できるようにするためです。もう一つは作成したプロセスが制限に\n" +" 達した時にプロセスを kill することができるようにするためです。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" -#: builtins.c:921 +#: builtins.c:949 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" +" 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" @@ -2986,58 +3690,133 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." -msgstr "" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"数式を評価します。\n" +" \n" +" 各 ARG を数式として評価します。評価は固定長の整数として行われ、桁溢れは\n" +" 検査されません。しかし、0 による除算は捕捉されエラーとしてフラグが\n" +" 立ちます。次の演算子一覧は同一優先順位の演算子ごとにグループ化されてい\n" +" ます。優先順位は降順になっています。\n" +" \n" +" \tid++, id--\t変数の後置インクリメント、デクリメント\n" +" \t++id, --id\t変数の前置インクリメント、デクリメント\n" +" \t-, +\t\t単項マイナス、プラス\n" +" \t!, ~\t\t論理およびビット否定\n" +" \t**\t\t指数演算\n" +" \t*, /, %\t\t乗算、除算、剰余演算\n" +" \t+, -\t\t加算、減算\n" +" \t<<, >>\t\t左および右ビットシフト\n" +" \t<=, >=, <, >\t比較\n" +" \t==, !=\t\t等価、不等価\n" +" \t&\t\tビット論理積\n" +" \t^\t\tビット排他的論理和\n" +" \t|\t\tビット論理和\n" +" \t&&\t\t論理積\n" +" \t||\t\t論理和\n" +" \texpr ? expr : expr\n" +" \t\t\t条件演算子\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\t代入\n" +" \n" +" シェル変数は被演算子として使用できます。変数名は数式内で (強制的に固定長\n" +" 整数の) 値に置き換えられます。変数は数式内で使用する時には必ずしも\n" +" 整数属性を持っている必要はありません。\n" +"\n" +" 演算子は優先順位の順に評価されます。小括弧でくくられた数式は先に評価され、\n" +" 上記の優先順位を上書きするかもしれません。\n" +" \n" +" 終了ステータス:\n" +" ARG の最終的な評価値が 0 の場合 let は 1 を返します。それ以外の場合は\n" +" let は 0 を返します。" -#: builtins.c:966 +#: builtins.c:994 +#, 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" - -#: builtins.c:1009 +"標準入力から一行読み込みフィールド毎に分割します。\n" +" \n" +" 標準入力から一行読み込みます。または -u が指定されている場合はファイル記述子\n" +" FD から読み込みます。行は単語分割によってフィールドに分割され、最初の単語が\n" +" 最初の NAME に、2番目の単語が2番目に NAME にという順で割り当てられます。残っ\n" +" た単語は全て最後の NAME に割り当てられます。変数 $IFS に設定された文字のみが\n" +" 単語の区切りとして認識されます。\n" +" \n" +" もし NAME を指定しなかった場合、行は REPLY 変数に保存されます。\n" +" \n" +" オプション:\n" +" -a array\t読み込んだ単語をインデックス型配列 ARRAY に順番に割り当てます。\n" +" \t\t開始番号は 0 です。\n" +" -d delim\t改行ではなく文字 DELIM が最初に現れるまで読み込みを続けます\n" +" -e\t\t対話的シェルで行を得るのに Readline を使用します\n" +" -i text\tReadline の初期テキストとして TEXT を使用します\n" +" -n nchars\t改行が無くても文字数 NCHARS を読み込んだら復帰します。NCHARS\n" +" \t\tより前に区切り文字 (DELIMITER) が現れた場合は区切り文字が\n" +" \t\t優先されます\n" +" -N nchars\t厳密に文字数 NCHARS を読み込み復帰します。ただし、ファイル終\n" +" \t\t了(EOF) になるか読み込みタイムアウトが発生した場合は除きます。\n" +" \t\t区切り文字 (DELIMITER) は無視されます\n" +" -p prompt\t読み込み前に文字列 PROMPT を後ろに改行を付けないで表示します\n" +" -r\t\tバックスペースで文字をエスケープすることを禁止します\n" +" -s\t\t端末から読み込まれる文字をエコーバックしません\n" +" -t timeout\tTIMEOUT 秒以内に入力行が完全に読み込まれなかった場合\n" +" \t\tタイムアウトを発生させ失敗として復帰します。TMOUT 変数の値が\n" +" \t\tデフォルトのタイムアウトです。TIMEOUT を小数にすることもでき\n" +" \t\tます。もし TIMEOUT が 0 の場合、read は何のデータも読み込ま\n" +" \t\tずに直ちに終了し、指定したファイル記述子で入力が使用可能な場\n" +" \t\t合のみ成功返します。タイムアウト発生時の終了ステータスは128\n" +" \t\tより大きくなります\n" +" -u fd\t\t読み込みに標準入力ではなくファイル記述子 FD を使用します\n" +" \n" +" 終了ステータス:\n" +" ファイル終了(EOF)、読み込みタイムアウト(この場合は128以上)、変数への代入エ\n" +" ラーが発生、 -u に無効なファイル記述子が与えられた場合を除き0を返します。" + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3048,8 +3827,18 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"シェル関数から復帰します。\n" +" \n" +" N で指定した値を戻り値として関数または source されたスクリプトを終了します。\n" +" N が指定されない場合、関数またはスクリプトで最後に実行したコマンドの戻り値\n" +" が使用されます。\n" +" \n" +" 終了ステータス:\n" +" 戻り値 N、またはシェルが関数またはスクリプトを実行していない場合は失敗を\n" +" 返します。" -#: builtins.c:1022 +#: builtins.c:1055 +#, fuzzy msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3092,8 +3881,7 @@ msgid "" " 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" +" 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" @@ -3115,9 +3903,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3130,8 +3921,87 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" - -#: builtins.c:1104 +"シェルオプションや位置パラメーターの値を設定・消去します\n" +" \n" +" シェル属性や位置パラメーターの値を変更、またはシェル変数の名前と値\n" +" を表示します。\n" +" \n" +" オプション:\n" +" -a 変数を変更または変更してエクスポートするようにマークする\n" +" -b ジョブ終了を即時通知する\n" +" -e コマンドの終了ステータスが 0 以外の場合は即時終了する\n" +" -f ファイル名生成 (globbing) を無効にする\n" +" -h 検索したコマンドの位置を記憶する\n" +" -k 全ての値を設定する引数がコマンド実行時の環境に配置される。コ\n" +" マンド名の前にあるものに限らない\n" +" -m ジョブ制御を有効にする\n" +" -n コマンドを読み込むが実行しない\n" +" -o option-name\n" +" option-name に対応した変数を設定する:\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 ファイル終了 (EOF) 読み込み時にシェルを終了\n" +" しない\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 パイプラインの戻り値を最後に 0 以外で終了したコマ\n" +" ンドの終了ステータスにする。0 以外のステータスで\n" +" 終了したコマンドが無い場合には 0 にする。\n" +" posix Posix 標準とデフォルト動作が異なる bash の動作を\n" +" Posix と一致するようにする\n" +" privileged -p と同様\n" +" verbose -v と同様\n" +" vi vi スタイルの行編集インターフェースを使用する\n" +" xtrace -x と同様\n" +" -p 実 uid と実効 uid が異なる時に常にオンになる。$ENV ファイルの処理\n" +" およびシェル関数のインポートが無効になる。このオプションをオフに\n" +" すると実効 uid, gid が実 uid, gid と同じに設定される\n" +" -t 一つのコマンドを読み込み、実行した後に終了する\n" +" -u 代入時に変数を未設定にするとエラーとして扱う\n" +" -v シェルの入力行を読み込んだ通りに表示する\n" +" -x 実行されるコマンドと引数をその通りに表示する\n" +" -B 中括弧の展開をシェルで行う\n" +" -C 設定した場合、リダイレクトで既存の通常ファイルを上書きすることを\n" +" 禁止する\n" +" -E 設定した場合 ERR トラップがシェル関数に継承される\n" +" -H ! スタイルのヒストリ置換を有効にする。このフラグは対話的シェルで\n" +" はデフォルトでオンになる\n" +" -P 設定した場合、 cd などのカレントディレクトリを変更するコマンドを\n" +" 実行した時にシンボリックリンクを辿らない\n" +" -T 設定した場合、 DEBUG トラップがシェル関数に継承される\n" +" -- これ以降の引数を位置パラメーターとして割り当てる。もしこれ以降の\n" +" 引数が無い場合は位置パラメーターは設定解除される\n" +" - これ以降の引数を位置パラメーターとして割り当てる。-x と -v \n" +" オプションはオフになる\n" +" \n" +" - の代わりに + を使用すると、フラグがオフになります。フラグはシェルの起\n" +" 動時にも使用することもできます。現在の設定されているフラグの組は $- で\n" +" 得られます。残りの n 個の引数 ARG は位置パラメータとして$1, $2, .. $n\n" +" の順に設定されます。もし引数 ARG が与えられない場合、全てのシェル変数が\n" +" 表示されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられない限り成功を返します。" + +#: builtins.c:1140 +#, fuzzy msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3140,9 +4010,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3150,14 +4021,30 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"シェル変数および関数の値・属性を消去します。\n" +" \n" +" 各 NAMEに対して関連する値または関数を削除します。\n" +" \n" +" オプション:\n" +" -f\t各 NAME をシェル関数として扱う\n" +" -v\t各 NAME をシェル変数として扱う\n" +" -n\t各 NAME を名前参照として扱い、変数自身を消去する。参照として\n" +"\t\t評価はしない。 \n" +" \n" +" オプションが無い場合、最初に変数を消去しようと試みます。失敗した場合には\n" +" 関数を消去しようと試みます。\n" +" \n" +" いくつかの変数は消去できません。`readonly' も参照してください。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか NAME が読み取り専用の場合を除き成功を返します。" -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3169,8 +4056,25 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"シェル変数に export 属性を設定します。\n" +" \n" +" 各 NAME に対して後に続けて実行されるコマンドの環境変数として自動的に\n" +" エクスポートされるようにマークします。VALUE が与えられた場合はエクス\n" +" ポートする前に値を設定します。\n" +"\n" +" オプション:\n" +" -f\tシェル関数を参照します\n" +" -n\t各 NAME に対してエクスポート属性を削除します\n" +" -p\t全てのエクスポートされた変数・関数一覧を表示します\n" +" \n" +" 引数 `--' 以降はオプションとして処理されません。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか、無効な NAME が与えられない限り成功\n" +" を返します。" -#: builtins.c:1143 +#: builtins.c:1181 +#, fuzzy msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3182,15 +4086,34 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"シェル変数を変更不可にします。\n" +" \n" +" 各 NAME を読み取り専用にします。これらの NAME の値はこれ以降の代入で\n" +" 変更ができなくなります。VALUE が与えられた場合、読み取り専用にする前\n" +" に値が設定されます。\n" +" \n" +" オプション:\n" +" -a\tインデックス型配列変数を示します\n" +" -A\t連想配列変数を示します\n" +" -f\tシェル関数を示します\n" +" -p\t全ての読み取り専用変数・関数の一覧を表示します。-fオプシ\n" +"\t\t ョンがあるかないかで動作が変わります。\n" +" \n" +" 引数 `--' は以降のオプション処理を無効にします\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか、与えられた NAME が無効な場合を除き成功\n" +" を返します。" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3200,8 +4123,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"位置パラメーターをシフトします。\n" +" \n" +" 位置パラメーター名 $N+1,$N+2 ... を $1,$2 ... に変更します。 \n" +" N が与えられなかった場合、1 と見なされます。\n" +" \n" +" 終了ステータス:\n" +" Nが負の値または $# より大きい場合を除き成功を返します。" -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3214,8 +4144,19 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"ファイルを読み込み現在のシェルでコマンドを実行します。\n" +" \n" +" FILENAME を読み込み現在のシェルでコマンドを実行します。$PATH の項目が\n" +" FILENAME が含まれるディレクトリを見つけるために使用されます。引数\n" +" ARGUMENTS が与えられた場合 FILENAME を実行する際の位置パラメーターと\n" +" して使用されます。\n" +" \n" +" 終了ステータス:\n" +" FILENAME で最後に実行したコマンドのステータスを返します。FILENAME が\n" +" 読み込めなかった場合は失敗を返します。" -#: builtins.c:1207 +#: builtins.c:1246 +#, fuzzy msgid "" "Suspend shell execution.\n" " \n" @@ -3228,15 +4169,29 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"シェルの実行を一時停止します。\n" +" \n" +" SIGCONT シグナルを受け取るまでこのシェルの実行を一時停止します。強制\n" +" オプションが無い限りログインシェルは一時停止できません。\n" +" \n" +" オプション:\n" +" -f\tシェルがログインシェルだとしても強制的に一時停止する\n" +" \n" +" 終了ステータス:\n" +" ジョブ制御が有効でないかエラーが発生しない限り成功を返します。" -#: builtins.c:1223 +#: builtins.c:1262 +#, 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3260,8 +4215,7 @@ msgid "" " -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 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" @@ -3282,14 +4236,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3305,33 +4261,115 @@ msgid "" " Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" " false or an invalid argument is given." msgstr "" +"条件式を評価します。\n" +" \n" +" 式 EXPR の結果に応じて 0 (真、true) または 1 (偽、false) を返します。\n" +" 式は単項演算子または二項演算子です。単項演算子はファイルのステータス\n" +" を評価するために使用されます。文字列演算子と数値比較演算子も加えて\n" +" 存在します。\n" +" \n" +" ファイル演算子:\n" +" \n" +" -a FILE ファイルが存在する時に真(true)\n" +" -b FILE ファイルがブロック特殊デバイスの時に真(true)\n" +" -c FILE ファイルがキャラクタ特殊デバイスの時に真(true)\n" +" -d FILE ファイルがディレクトリの時に真(true)\n" +" -e FILE ファイルが存在する時に真(true)\n" +" -f FILE ファイルが存在し、通常ファイルの時に真(true)\n" +" -g FILE ファイルに setgid が設定されている時に真(true)\n" +" -h FILE ファイルがシンボリックリンクの時に真(true)\n" +" -L FILE ファイルがシンボリックリンクの時に真(true)\n" +" -k FILE ファイルに sticky ビットが設定されている時に真(true)\n" +" -p FILE ファイルが名前付きパイプの時に真(true)\n" +" -r FILE ファイルがユーザに対して読み込み可能な時に真(true)\n" +" -s FILE ファイルが存在し、かつ空ファイルでない場合に真(true)\n" +" -S FILE ファイルがソケットの場合に真(true)\n" +" -t FD FD(ファイル識別子) が端末に開いている時に真(true)\n" +" -u FILE ファイルに setuid が設定されている時に真(true)\n" +" -w FILE ファイルがユーザに対して書き込み可能な時に真(true)\n" +" -x FILE ファイルがユーザに対して実行可能な時に真(true)\n" +" -O FILE ファイルをユーザが実効的に所有されている時に真(true)\n" +" -G FILE ファイルのグループにユーザが実効的に所属している時に真(true)\n" +" -N FILE ファイルを最後に読み込んだ以降に変更されている時に真(true)\n" +" \n" +" FILE1 -nt FILE2 file1 が file2 より新しい時(更新時間に基づく)に真(true)\n" +" \n" +" \n" +" FILE1 -ot FILE2 file1 が file2 より古い時に真(true)\n" +" \n" +" FILE1 -ef FILE2 file1 が file2 に対するハードリンクの時に真(true)\n" +" \n" +" 文字列演算子:\n" +" \n" +" -z STRING 文字列が空の時に真(true)\n" +" \n" +" -n STRING\n" +" STRING 文字列が空でない時に真(true)\n" +" \n" +" STRING1 = STRING2\n" +" 文字列が同一の時に真(true)\n" +" STRING1 != STRING2\n" +" 文字列が同一でない時に真(true)\n" +" STRING1 < STRING2\n" +" 辞書順で STRING1 が STRING2 より前の時に真(true)\n" +" STRING1 > STRING2\n" +" 辞書順で STRING1 が STRING2 より後の時に真(true)\n" +" \n" +" その他演算子:\n" +" \n" +" -o OPTION シェルオプション OPTION が有効な時に真(true)\n" +" -v VAR シェル変数 VAR が設定されている時に真(true)\n" +" -R VAR シェル変数 VAR が設定され、名前参照の時に真(true)\n" +" ! EXPR 式 expr が偽(fales)の時に真(true)\n" +" EXPR1 -a EXPR2 式 expr1 および expr2 の両方とも真(true)の時に真(true)\n" +" EXPR1 -o EXPR2 式 expr1 または expr2 のいずれかが真(true)の時に真(true)\n" +" \n" +" arg1 OP arg2 数値比較演算を行なう。OP は -eq, -ne, -lt, -le, -gt,\n" +" または -ge のいずれかとなる。\n" +" \n" +" 数値演算二項演算子は ARG1 と ARG2 の関係がそれぞれ、等しい(-eq)、\n" +" 等しくない(-ne)、より小さい(-lt)、以下(-le)、より大きい(-gt)、または\n" +" 以上(-ge)の時に真(true)を返します。\n" +" \n" +" 終了ステータス:\n" +" 式 EXPR の評価値が真(true)の時に成功を返します。EXPR の評価値が偽(false) または\n" +" 引数が無効な場合に失敗を返します。" -#: builtins.c:1299 +#: builtins.c:1344 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 "" +"条件式を評価します。\n" +" \n" +" これは test 組み込み関数と同義語です。ただし、最後の引数に開始の`['と一致\n" +" するように文字`]'を与えなければいけません。" -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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" +" \n" +" シェルとその子プロセスが使用したユーザー時間とシステム時間それぞれの累積を\n" +" 表示します。\n" +" \n" +" 終了ステータス:\n" +" 常に成功を返します。" -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3340,29 +4378,61 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" Returns success unless a SIGSPEC is invalid or an invalid option is given." msgstr "" +"シグナルまたは他のイベントをトラップします。\n" +" \n" +" シェルがシグナルを受け取るか他の条件が発生した時に実行されるハンドラーを\n" +" 定義および有効化します。\n" +" \n" +" ARG はシグナル SIGNAL_SPEC を受け取った時に読み込まれ実行されるコマンド\n" +" です。もし ARG が無い (かつシグナル SIGNAL_SPEC が与えられた場合) または\n" +" `-' の場合、各指定したシグナルはオリジナルの値にリセットされます。\n" +" ARG が NULL 文字列の場合、各シグナル SIGNAL_SPEC はシェルにおよび起動さ\n" +" れたコマンドによって無視されます。\n" +" \n" +" もし SIGNAL_SPEC が EXIT (0) の場合、ARG がシェルの終了時に実行されます。\n" +" もし SIGNAL_SPEC が DEBUG の場合 ARG は単に毎回コマンドの前に実行されます。\n" +" もし SIGNAL_SPEC が RETURN の場合 ARG はシェル関数または . か source に\n" +" よって実行されたスクリプトが終了した時に実行されます。 SIGNAL_SPEC が ERR\n" +" の場合、-e オプションが有効な場合にシェルが終了するようなコマンド失敗が発\n" +" 生するたびに実行されます。\n" +" \n" +" もし引数が与えられない場合、 trap は各シグナルに割り当てられたコマンドの\n" +" 一覧を表示します。\n" +" \n" +" オプション:\n" +" -l\tシグナル名とシグナル番号の対応一覧を表示します\n" +" -p\t各 SIGNAL_SPEC に関連づけられた trap コマンドを表示します\n" +" \n" +" 各 SIGNAL_SPEC は にあるシグナル名かシグナル番号です。シグ\n" +" ナル名は大文字小文字を区別しません。また SIG 接頭辞はオプションです。\n" +" シグナルはシェルに対して \"kill -signal $$\" で送ることができます。\n" +" \n" +" 終了ステータス:\n" +" SIGSPEC が無効か、無効なオプションを与えられない限り成功を返します。" -#: builtins.c:1352 +#: builtins.c:1401 +#, fuzzy msgid "" "Display information about command type.\n" " \n" @@ -3371,33 +4441,58 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 +" Returns success if all of the NAMEs are found; fails if any are not found." +msgstr "" +"コマンドの種類に関する情報を表示します。\n" +" \n" +" 各 NAME に対してコマンド名として使われた時にどのように解釈されるかを\n" +" 示します。\n" +" \n" +" オプション:\n" +" -a\tNAME という名前になっている実行可能なものの全ての位置を表示し\n" +" \tます。これには `-p' が同時に指定されていない場合に限ってエイリアス、\n" +" \t組み込み関数、シェル関数も含みます\n" +" -f\tシェル関数の検索を抑止します\n" +" -P\t各 NAME に対して PATH 探索を強制します。エイリアス、組み込み\n" +" \t関数、シェル関数があったとしても実行されるディスク上のファイル名を\n" +" \t返します\n" +" -p\t実行されるディスク上のファイル名を返します。`type -t NAME'\n" +" \tが `file' を返さない場合、何も返しません。\n" +" -t\t次のいずれかの単語を返します。`alias', `keyword', `function',\n" +" \t `builtin', `file' or `'。それぞれ NAME がエイリアス、シェル予約語、\n" +" \tシェル関数、シェル組み込み関数、ディスク上のファイル、何も見つからない\n" +" \tに対応します。\n" +" \n" +" 引数:\n" +" NAME\t解釈するコマンドの名前です。\n" +" \n" +" 終了ステータス:\n" +" 全ての NAME が見つかった場合に成功を返します。どれかが見つからなかった場合\n" +" は失敗を返します。" + +#: builtins.c:1432 +#, fuzzy msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -3410,6 +4505,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3421,6 +4517,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3435,8 +4536,49 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1428 +"シェルの資源制限を変更します。\n" +" \n" +" システムがシェルの資源制御を提供している場合、シェル、およびシェルが生成\n" +" するプロセスに対する資源の制御を行います。\n" +" \n" +" オプション:\n" +" -S\t緩い (soft) 資源制御を使用する\n" +" -H\t厳しい (hard) 資源制御を使用する\n" +" -a\t現在の制限を表示する\n" +" -b\tソケットの大きさ\n" +" -c\t作成されるコアファイルの最大サイズ\n" +" -d\tプロセスのデータセグメントの最大サイズ\n" +" -e\tスケジューリング優先度 (`nice') の最大値\n" +" -f\tシェルおよびその子プロセスが書き込める最大ファイルサイズ\n" +" -i\tシグナル抑制の最大数\n" +" -l\tメモリ内に固定できるプロセスの最大サイズ\n" +" -m\tthe maximum resident set size\n" +" -n\t開けるファイル記述子の最大数\n" +" -p\tパイプのバッファサイズ\n" +" -q\tPOSIX メッセージキュー内の最大バイト数\n" +" -r\tリアルタイムスケジューリング優先度の最大値\n" +" -s\t最大スタックサイズ\n" +" -t\tCPU時間量の最大値 (単位:秒)\n" +" -u\tユーザプロセスの最大数\n" +" -v\t仮想メモリの最大サイズ\n" +" -x\tファイルロックの最大数\n" +" -T\tスレッドの最大数\n" +" \n" +" すべてのプラットフォームですべてのオプションが利用可能とは限りません。\n" +" \n" +" LIMIT を指定した場合、指定した資源に新しい値が設定されます。`soft', \n" +" `hard' および `unlimited' という特別な値は現在の緩やかな制限、現在の\n" +" 厳しい制限、および無制限を意味します。\n" +" LIMIT を指定しない場合、指定した資源の現在の値を表示します。オプションを\n" +" 指定しない場合、-f と見なされます。\n" +" \n" +" -t は秒単位、-p は 512バイトごと、-u はプロセス数であり、それ以外は\n" +" 1024 バイト単位です。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションを与えるか、エラーが発生しない限り、成功を返します。" + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3453,39 +4595,83 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"ファイルのモードマスクを表示または設定します。\n" +" \n" +" ユーザーがファイル作成時のマスクを MODE に設定します。MODE が指定されない場合\n" +" 現在のマスクの値を表示します。\n" +" \n" +" MODE が数値で開始した場合8進数として解釈されます。それ以外は chmod(1) で受け\n" +" 入れられるシンボルモードの文字列として扱われます。\n" +" \n" +" オプション:\n" +" -p\tMODE が指定されない場合、入力として再利用可能な形式で表示します\n" +" -S\tシンボルモードで出力します。それ以外は8進数で出力します\n" +" \n" +" 終了ステータス:\n" +" MODE が無効か、無効なオプションが与えられない限り成功を返します。" -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"ジョブの実行完了を待ち、終了ステータスを返します。\n" +" \n" +" ID で識別される各プロセス (プロセスID または ジョブ指定) を待ち、その終了\n" +" ステータスを返します。ID が与えられない場合、現在アクティブな全ての子プ\n" +" ロセスを待ち 0 を返します。ID がジョブ指定の場合ジョブのパイプラインに\n" +" ある全てのプロセスを待ちます。\n" +" \n" +" 終了ステータス:\n" +" 最後の ID の終了ステータスを返します。IDが無効であるか、無効なオプ\n" +" ションが与えられた場合には失敗を返します。" -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." msgstr "" +"プロセスの実行完了を待ち、終了ステータスを返します。\n" +" \n" +" PIDで指定された各プロレスを待ち、その終了ステータスを返します。PID が与えられ\n" +" ない場合、現在アクティブな全ての子プロセスを待ち、0 を返します。PID は\n" +" プロセスIDでなければいけません。\n" +" \n" +" 終了ステータス:\n" +" 最後の PID の終了ステータスを返します。PIDが無効か、無効なオプションが与えられた\n" +" 場合は失敗します。" -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3497,8 +4683,16 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"リストの各要素に対してコマンドを実行します。\n" +" \n" +" `for' ループではリストの各要素に対して一連のコマンドを実行します。\n" +" `in WORDS ...;' が存在しない場合、`in \"$@\"' であると見なされます。\n" +" WORDS の要素が NAME の値として代入され COMMANDS が実行されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3514,8 +4708,21 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"算術 for ループ\n" +" \n" +" 以下と等価です。\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1、EXP2、および EXP3 は数式です。いずれかの数式を省略した場合、\n" +" 値が 1 であるとして評価されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3534,8 +4741,23 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"一覧から項目を選択し、COMMANDS を実行します。\n" +" \n" +" WORDS が展開され、項目の一覧が生成されます。展開された項目\n" +" の組は標準エラー出力に表示されます。各項目の前には数値が付け\n" +" られます。`in WORDS' が存在しない場合、`in \"$@\"' と仮定されます。\n" +" 次に PS3 プロンプトが表示され、標準入力から 1 行読み込まれます。\n" +" 行が表示した項目の一つに関連づけられた数値で構成されていた場合、\n" +" NAME に項目が設定されます。空行の場合、プロンプトが再度表示され\n" +" ます。ファイル終了(EOF) が読み込まれた場合、コマンドが終了します。\n" +" それ以外の場合は NAME に null が設定されます。読み込んだ行は変数\n" +" REPLY に保存されます。行が読み込まれるごとに break コマンドが実\n" +" 行されるまで COMMANDS が繰り返し実行されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3550,8 +4772,20 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"パイプラインを実行する時に消費された時間を報告します。\n" +" \n" +" PIPELINE を実行し、終了時に PIPELINE を実行するために費やされた実\n" +" 時間、ユーザー CPU 時間、およびシステム CPU 時間の要約を表示します。\n" +" \n" +" オプション:\n" +" -p\t移植性のある Posix 形式で時間の要約を表示します\n" +" \n" +" 変数 TIMEFORMAT の値が出力の形式として使用されます。\n" +" \n" +" 終了ステータス:\n" +" PIPELINE の戻り値が終了ステータスとなります。" -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3561,51 +4795,81 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"パターン一致の結果に基づいてコマンドを実行します。\n" +" \n" +" WORD が PATTERN に一致するかどうかに基づいて選択的に COMMANDS を実行します。\n" +" 複数のパターンを区切るために `|' が使用されます。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" -#: builtins.c:1563 +#: builtins.c:1631 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" +" 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" +" `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 "" +"条件に従ってコマンドを実行します。\n" +" \n" +" `if COMMANDS' を実行します。この終了ステータスが 0 の場合、`then COMMANDS'\n" +" を実行します。そうでない場合は、各 `elif COMMANDS' を順番に実行し、その\n" +" 終了ステータスが 0 の場合に、関連した `then COMMANDS' を実行し、if 文が\n" +" 完了します。それ以外の場合、 `else COMMANDS' が存在する場合には実行され\n" +" ます。文全体の終了ステータスは、最後に実行したコマンドの終了ステータスか、\n" +" または、テストした条件に true となるものが無い場合は 0 です。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドの終了ステータスを返します。" -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"テストが成功する限りコマンドを実行します。\n" +" \n" +" `while' COMMANDS にある最後のコマンドの終了ステータスが 0 である間 \n" +" COMMANDS を展開して実行します。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"テストが失敗する限りコマンドを実行します。\n" +" \n" +" `until' COMMANDS にある最後のコマンドの終了ステータスが 0 でない間\n" +" COMMANDS を展開して実行します。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" -#: builtins.c:1604 +#: builtins.c:1672 +#, fuzzy msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3615,24 +4879,41 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"NAME という名前の非同期プロセスを作成します。\n" +" \n" +" COMMAND を非同期で実行します。コマンドの標準出力および標準入力は実行\n" +" しているシェルのインデックス型配列変数 NAME の要素添字 0、1 に設定\n" +" されるファイル記述子へのパイプとして接続されます。\n" +" デフォルトの NAME は \"COPROC\" です。\n" +" \n" +" 終了ステータス:\n" +" COMMAND の終了ステータスを返します。" -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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 "" +"シェル関数を定義します。\n" +" \n" +" NAME という名前のシェル関数を作成します。単にコマンドとして起動された時は\n" +" NAME は COMMANDs をシェルのコンテキスト内で呼び出します。NAME を起動した\n" +" 時に引数は関数に $1...$n という位置パラメーターで、関数名は $FUNCNAME\n" +" 変数として渡されます。\n" +" \n" +" 終了ステータス:\n" +" NAME が読み取り専用でない限り成功を返します。" -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3642,8 +4923,15 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"複数のコマンドを一つにグループ化します。\n" +" \n" +" 複数のコマンドをグループにして1セットとして実行します。これはコマンド\n" +" のセット全体をリダイレクトする一つの方法です。\n" +" \n" +" 終了ステータス:\n" +" 最後に実行したコマンドのステータスを返します。" -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3656,28 +4944,41 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" +"ジョブをフォアグラウンドで再開します。\n" +" \n" +" `fg' コマンドの引数として与える JOB_SPEC と等価です。停止または\n" +" バックグラウンドのジョブを再開します。JOB_SPEC はジョブ名または\n" +" ジョブ番号で指定します。JOB_SPEC の後に `&' を続けると、`bg' の\n" +" 引数として与えられたようにジョブをバックグラウンドにします。\n" +" \n" +" 終了ステータス:\n" +" 再開されたジョブの終了ステータスを返します。" -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"算術式を評価します。\n" +" \n" +" 算術式の規定に基づいて EXPRESSION を評価します。\"let EXPRESSION\"\n" +" と等価です。\n" +" \n" +" 終了ステータス:\n" +" EXPRESSION の評価値が 0 の場合は 1、それ以外は 0 を返します。" -#: builtins.c:1671 +#: builtins.c:1739 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" +" 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" @@ -3695,8 +4996,32 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" +"条件式のコマンドを実行します。\n" +" \n" +" 条件式 EXPRESSION の評価結果に基づいて 0 または 1 を返します。\n" +" 条件式は test 組み込み関数と同じ優先順位で組み合わされます。また、\n" +" 次の演算子とも組み合わされます。\n" +" \n" +" ( EXPRESSION )\tEXPRESSION の値を返します\n" +" ! EXPRESSION\t\tEXPRESSION が true の時 false を返します。それ\n" +" \t\t以外は false を返します\n" +" EXPR1 && EXPR2\tEXPR1 および EXPR2 の両方が true の時 true を返します。\n" +" \tそれ以外は false を返します。\n" +" EXPR1 || EXPR2\tEXPR1 および EXPR2 のいずれかが true の時 true を返し\n" +" \tます。それ以外は false を返します。\n" +" \n" +" `==' および `!=' 演算子が使用された場合、演算子の右側の文字列をパターンと\n" +" した左側の文字列に対するパターン一致処理が行われます。\n" +" `=~' 演算子が使用された場合、演算子の右側の文字列が正規表現として扱われま\n" +" す。\n" +" \n" +" && および || 演算子は EXPR1 で式の値を決定するのに十分な場合は EXPR2 を\n" +" 評価しません。\n" +" \n" +" 終了ステータス:\n" +" EXPRESSION の値に基づいて 0 または 1 を返します。" -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3749,8 +5074,56 @@ msgid "" " 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 +"通常の変数名とその使用法。\n" +" \n" +" BASH_VERSION\tBashのバージョン情報。\n" +" CDPATH\t`cd`の引数として与えられたディレクトリを検索する際に\n" +" \t\t使用されるコロン (:) で区切られたディレクトリの一覧。\n" +" GLOBIGNORE\tパス名を展開する時に無視されるコロン (:) で区切られた\n" +" \t\tファイル名パターンの一覧。\n" +" HISTFILE\tコマンドヒストリが保存されるファイル名。\n" +" HISTFILESIZE\tヒストリファイルに保存することができる最大行数。\n" +" HISTSIZE\t実行中のシェルがアクセスできる最大ヒストリ行数。\n" +" HOME\tログインディレクトリの完全パス名。\n" +" HOSTNAME\t現在のホスト名。\n" +" HOSTTYPE\tこのバージョンの Bash を実行している CPU の種類。\n" +" IGNOREEOF\tシェルがファイル終了 (EOF) 文字を単一の入力として受け\n" +" \t\t取った時の動作を制御します。設定されている場合、空白行\n" +" \t\tで EOF 文字をその数連続して受け取った時にシェルを終了\n" +" \t\tします (デフォルト 10)。設定が解除された場合、EOF で\n" +" \t\t入力が終了することを意味します。\n" +" MACHTYPE\tBash が実行されている現在のシステムを表す文字列。\n" +" MAILCHECK\tBash がメールを確認する頻度 (秒単位)。\n" +" MAILPATH\tBash が新規メールを確認するコロン (:) で区切られた\n" +" \t\tファイル名の一覧。\n" +" OSTYPE\tこのバージョンの Bash を実行している OS のバージョン。\n" +" PATH\tコマンドを検索する際に使用されるコロン (:) で区切ら\n" +" \t\tれたディレクトリの一覧。\n" +" PROMPT_COMMAND\tプライマリプロンプトが表示される前に毎回実行\n" +" \t\tされるコマンド。\n" +" PS1\t\tプライマリプロンプト文字列。\n" +" PS2\t\tセカンダリプロンプト文字列。\n" +" PWD\t\t現在のディレクトリの完全パス名。\n" +" SHELLOPTS\tコロン (:) で区切られた有効なシェルオプション一覧。\n" +" TERM\t現在の端末種類名。\n" +" TIMEFORMAT\t`time' 予約語による時間統計情報の表示書式。\n" +" auto_resume\tnull で無い場合、その行に現れたコマンドは、まず現在停止\n" +" \t\tされているジョブから検索されます。それで見つかった場合、\n" +" \t\tジョブがフォアグランドになります。値が `exact' の場合、\n" +" \t\tコマンドが停止しているジョブの一覧と厳密に一致していなけ\n" +" \t\tればなりません。値が `substring' の場合、コマンドがジョ\n" +" \t\tブの部分文字列に一致しなければなりません。その他の値の\n" +" \t\t場合はコマンドが停止しているジョブの先頭部分に一致しな\n" +" \t\tければなりません。\n" +" histchars\tヒストリ展開とクイック置換を制御する文字。最初の文字が\n" +" \t\tヒストリ展開の文字で通常は `!' です。二番目がクイック\n" +" \t\t置換で通常は `^' です。三番目がヒストリのコメントで\n" +" \t\t通常は `#' です。\n" +" HISTIGNORE\tヒストリ一覧に保存されるコマンドを決める時に使用される\n" +" \t\tコロン (:) で区切られたパターンの一覧。\n" + +#: builtins.c:1822 +#, fuzzy msgid "" "Add directories to stack.\n" " \n" @@ -3760,19 +5133,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3780,8 +5153,37 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"ディレクトリをディレクトリスタックに加えます。\n" +" \n" +" ディレクトリをディレクトリスタックの先頭に加える、またはディレ\n" +" クトリを回転してカレントディレクトリがスタックの先頭になるよう\n" +" にします。引数がない場合、先頭の二つのディレクトリを入れ替えま\n" +" す。\n" +" \n" +" オプション:\n" +" -n\tスタックに加えた時、通常のディレクトリ変更を抑止し\n" +" \tます。よってスタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\tN 番目のディレクトリが先頭になるようスタックを回転\n" +" \tします (`dirs' で表示される一覧の左から数えます。開始番号\n" +" \tは 0 です)。\n" +" \n" +" -N\tN 番目のディレクトリが先頭になるようスタックを回転\n" +" \tします (`dirs' で表示される一覧の右から数えます。開始番号\n" +" \tは 0 です)。\n" +" \n" +" dir\tDIR をディレクトリスタックの先頭に加え、カレント\n" +" \tディレクトリにします。\n" +" \n" +" `dirs' 組み込み関数でディレクトリスタックを表示します。\n" +" \n" +" 終了ステータス:\n" +" 無効な引数が与えられるかディレクトリ変更が失敗しない限り成功を\n" +" 返します。" -#: builtins.c:1788 +#: builtins.c:1856 +#, fuzzy msgid "" "Remove directories from stack.\n" " \n" @@ -3790,16 +5192,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3807,8 +5209,32 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"ディレクトリスタックからディレクトリを削除します。\n" +" \n" +" ディレクトリスタックから要素を削除します。引数がない場合、ディレクトリ\n" +" スタックの先頭から削除し、新しいスタック先頭のディレクトリに移動します。\n" +" \n" +" オプション:\n" +" -n\tスタックからディレクトリを削除した時、通常のディレクトリ変\n" +" \t更を抑止します。よってスタックのみ操作されます。\n" +" \n" +" 引数:\n" +" +N\t`dirs' で表示される一覧の左から数えて N 番目の要素を削除し\n" +" \tます。開始番号は 0 です。例えば、`popd +0' は先頭のディレクトリを\n" +" \t削除します。`popd +1' は二番目です。\n" +" \n" +" -N\t`dirs' で表示される一覧の右から数えて N 番目の要素を削除し\n" +" \tます。開始番号は 0 です。例えば、`popd -0' は最後のディレクトリを\n" +" \t削除します。`popd -1' は最後から二番目です。\n" +" \n" +" `dirs' 組み込み関数でディレクトリスタックを表示します。\n" +" \n" +" 終了ステータス:\n" +" 無効な引数が与えられるかディレクトリ変更が失敗しない限り成功を\n" +" 返します。" -#: builtins.c:1818 +#: builtins.c:1886 +#, fuzzy msgid "" "Display directory stack.\n" " \n" @@ -3819,32 +5245,55 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"ディレクトリスタックを表示します。\n" +" \n" +" 現在記憶されているディレクトリ一覧を表示します。ディレクトリは `pushd'\n" +" コマンドを使用して一覧に追加され、`popd' コマンドを通して一覧から取り\n" +" 戻されます。\n" +" \n" +" オプション:\n" +" -c\t全ての要素を削除してディレクトリスタックを空にします\n" +" -l\tホームディレクトリからの相対パスを ~ を先頭にした形式で\n" +" \t表示しません\n" +" -p\t一行に一つのディレクトリスタック要素を表示します\n" +" -v\t一行に一つのディレクトリスタック要素を位置に関する番号\n" +" \tをつけて表示します\n" +" \n" +" 引数:\n" +" +N\tdirs を引数無しで実行した時の一覧で左から数えて N 番目の\n" +" \t要素のみを表示します。開始番号は 0 です。\n" +" \n" +" -N\tdirs を引数無しで実行した時の一覧で右から数えて N 番目の\n" +" \t要素のみを表示します。開始番号は 0 です。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" -#: builtins.c:1847 +#: builtins.c:1917 +#, fuzzy 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3857,8 +5306,24 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"シェルオプションを設定、および設定解除します。\n" +" \n" +" 各シェルオプション OPTNAME の設定を変更します。引数がない場合、シェル\n" +" オプション全てを、それぞれ設定されているか否かを含めて表示します。\n" +" \n" +" オプション:\n" +" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" +" -p\tそれぞれのシェルオプションを、状態を含めて表示します\n" +" -q\t出力を抑止します\n" +" -s\tOPTNAME をそれぞれ有効 (設定) にします\n" +" -u\tOPTNAME をそれぞれ無効 (非設定) にします\n" +" \n" +" 終了ステータス:\n" +" OPTNAME が有効な場合は成功を返します。無効なオプションが与えられた場合\n" +" または OPTNAME が無効な場合は失敗を返します。" -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3866,83 +5331,135 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\n" +" Returns success unless an invalid option is given or a write or assignment\n" " error occurs." msgstr "" +"ARGUMENTS を FORMAT で書式整形して表示します。\n" +" \n" +" オプション:\n" +" -v var\t標準出力に表示するのではなく、出力をシェル変数 VAR に代入します\n" +" \n" +" FORMAT は次の3種類のオブジェクトを含む文字列です。一つ目は普通の文字で単に\n" +" 標準出力にコピーされます。二つ目はエスケープ文字で変換された後標準出力に\n" +" コピーされます。三つ目は書式指定文字で、各文字は後に続く引数を表示します。\n" +" \n" +" printf(1) に記述される標準の書式指定に加えて、printf は次の文字を解釈します。\n" +" \n" +" %b\t対応する引数のバックスラッシュエスケープ文字を展開する\n" +" %q\tシェル入力として引数をクオートする\n" +" %(fmt)T FMT を strftime(3) 用の書式文字列として日付と時間の文字列を出力する\n" +" \n" +" FORMAT はすべての ARGUMENTS を使い切る必要があります。FORMATが必要とする\n" +" ARGUMENTS より少ない場合、残りの書式指定は値が 0 または null 文字列が適切\n" +" に与えられているかのように動作します。\n" +"\n" +" 終了ステータス:\n" +" 無効な引数が与えられるか、書き込み、代入エラーが発生しない限り成功を返します。" -#: builtins.c:1895 +#: builtins.c:1974 +#, 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"引数が Readline によってどのように補完されるかを指定します。\n" +" \n" +" 各 NAME に対してどのように引数が補完されるかを指定します。オプションが与え\n" +" られない場合、既存の補完指定が入力として再利用可能な形式で表示されます。\n" +" \n" +" \n" +" オプション:\n" +" -p\t既存の補完指定を再利用可能な形式で表示する\n" +" -r\t補完指定 NAME を削除します。NAME が与えられない場合、全ての\n" +" \t補完指定を削除する\n" +" -D\t補完指定が定義されていない時のコマンドに対するデフォルトの\n" +" \t補完と動作を適用する\n" +" -E\t\"空\" コマンドに対する補完 (空行に対する補完の試み) と動作\n" +" \tを適用する\n" +" \n" +" 補完が試みられた時、上記オプションのうち大文字のオプションの動作が\n" +" 行われます。-D オプションは -E オプションより優先されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" -#: builtins.c:1923 +#: builtins.c:2004 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" +" 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" +" オプション引数 WORD が与えられた場合、WORD に対して一致した候補が生成\n" +" されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるかエラーが発生しない限り成功を返します。" -#: builtins.c:1938 +#: builtins.c:2019 +#, 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3958,238 +5475,99 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"補完オプションを編集または表示します。\n" +" \n" +" 各 NAME に対して補完オプションを変更します。NAME が与えられない場合、\n" +" 補完が直ちに実行されます。もし OPTION が与えられない場合、各 NAME \n" +" または現在の補完に対する補完オプションを表示します。\n" +" \n" +" オプション:\n" +" \t-o option\t各 NAME に対して補完オプション OPTION を設定する\n" +" \t-D\t\t\"デフォルト\" コマンド補完オプションを変更する\n" +" \t-E\t\t\"空\" コマンド補完オプションを変更する\n" +" \n" +" `-o' の代わりに `+o' を使用すると指定したオプションをオフにします。\n" +" \n" +" 引数:\n" +" \n" +" 各 NAME は `complete' 組み込み関数を使って事前に定義された補完指定をコマ\n" +" ンドを指し示さなければなりません。NAME が与えられない場合、compopt は\n" +" 補完をこれから生成する関数から呼び出されなければいけません。そして\n" +" 補完をこれから生成する関数に対するオプションが変更されます。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられるか、 NAME が補完指定として定義されていない場合\n" +" を除き、成功を返します。" -#: builtins.c:1968 +#: builtins.c:2050 +#, 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" +"標準入力から行を読み込みインデックス型配列に代入します。\n" +" \n" +" 標準入力、-u オプションが与えられた場合はファイル記述子 FD から行を読み込み、\n" +" インデックス型配列変数 ARRAY に代入します。変数 ARRAY のデフォルトは MAPFILE\n" +" です。\n" +" \n" +" オプション:\n" +" -n count\t最大 COUNT 行をコピーする。COUNT が 0 の場合、全ての行をコピーする\n" +" -O origin\t配列の開始番号を ORIGIN にする。デフォルトは 0\n" +" -s count \t最初の COUNT 行の読み込みを破棄する\n" +" -t\t\t各行を読み込んだ時に最後の改行を削除する\n" +" -u fd\t\t標準入力ではなくファイル記述子 FD から行を読み込む\n" +" -C callback\tQUANTUM 行を読み込む毎に CALLBACK を評価する\n" +" -c quantum\tCALLBACK を何行読み込む毎に実行するかを指定する\n" +" \n" +" 引数:\n" +" ARRAY\t\tデータを保存するために使用する配列変数名\n" +" \n" +" もし -c が指定されずに -C が与えられた場合、デフォルトの quantum は 5000 です。\n" +" CALLBACK が評価された時、代入される配列の次要素のインデックスと、要素に代入さ\n" +" れる行が追加の引数として渡されます。\n" +" \n" +" 明示的に開始番号が与えられない場合、mapfile は代入前に ARRAY を空にします。\n" +" \n" +" 終了ステータス:\n" +" 無効なオプションが与えられる、配列が読み取り専用、またはインデックス型配列で無い\n" +" 場合を除き成功を返します。" -#: builtins.c:2001 +#: builtins.c:2086 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 "������������:" +"ファイルから行を読み込み配列変数に代入します。\n" +" \n" +" `mapfile'の別名です。" diff --git a/po/ko.gmo b/po/ko.gmo new file mode 100644 index 0000000..11fe7d2 Binary files /dev/null and b/po/ko.gmo differ diff --git a/po/ko.po b/po/ko.po new file mode 100644 index 0000000..4b3fbc6 --- /dev/null +++ b/po/ko.po @@ -0,0 +1,5541 @@ +# Korean Translation for bash +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# SooHyun Kim , 2019. +# Seong-ho Cho , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.2-rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-25 01:50+0900\n" +"Last-Translator: Seong-ho Cho \n" +"Language-Team: Korean \n" +"Language: ko\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 2.3.1\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "잘못된 배열 첨자" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: 이름 참조 속성을 지우는 중" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: 색인 배열을 연관 배열로 변환할 수 없음" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: 숫자가 아닌 인덱스에 할당할 수 없음" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: 연관 배열을 할당하려면 반드시 첨자를 사용해야 함" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: 생성할 수 없음: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: 명령의 keymap을 찾을 수 없음" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: 공백이 아닌 첫 문자가 `\"'가 아님" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "%2$s에 닫는 `%1$c' 없음" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: 콜론 구분자 없음" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': 명령 keymap의 바인딩을 해제할 수 없음" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "괄호 확장: %s의 메모리를 할당할 수 없음" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "괄호 확장: 요소 %u개에서 메모리 할당 실패" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "괄호 확장: `%s'의 메모리 할당 실패" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': 부적절한 별명" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "줄 편집 기능 꺼짐" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': 부적절한 keymap 이름" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: %s을(를) 읽을 수 없음" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': 알 수 없는 함수 이름" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s은(는) 어떤 키에도 바인딩하지 않음.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s은(는) 다음을 통해 호출될 수 있음 " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': 바인딩 해제 불가" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "반복 횟수" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "'for', 'while', 'until' 반복문에서만 의미 있음" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"현재 하위루틴 호출의 컨텍스트를 반환합니다.\n" +" \n" +" <표현식>을 지정하지 않으면 \"$line $filename\"을 반환합니다.\n" +" <표현식>을 지정하면 \"$line $subroutine $filename\"을 반환합니다.\n" +" 추가 정보는 스택 추적을 제공할 때 활용할 수 있습니다.\n" +" \n" +" <표현식>의 값은 현재 호출 프레임에서 얼마나 뒤로 돌아가야 하는지를\n" +" 나타냅니다. 최상단 호출 프레임은 프레임 0번입니다." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME 설정하지 않음" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "인자가 너무 많음" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "디렉터리 값이 비어있음" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD 설정하지 않음" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "행 %d번: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "경고: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: 사용법: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: 옵션에 인자가 필요함" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: 숫자 인자가 필요함" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: 찾을 수 없음" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: 부적절한 옵션" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: 부적절한 옵션 이름" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': 적절한 식별자 아님" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "부적절한 8진수" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "부적절한 16진수" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "부적절한 숫자" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: 부적절한 시그널 정의" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': PID가 아니거나 적절한 작업 명세 없음" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: 읽기 전용 변수임" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: 할당할 수 없음" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s이(가) 범위를 벗어남" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "인자" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s이(가) 범위를 벗어남" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: 그런 작업이 없음" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: 작업 컨트롤 없음" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "작업 컨트롤 없음" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: 제한됨" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "제한됨" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: 셸 내장 명령이 아님" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "쓰기 오류: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "터미널 속성 설정 오류: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "터미널 속성 읽기 오류: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: 현재 디렉터리 가져오는 중 오류 발생: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: 모호한 작업 명세" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "이 버전에는 도움말이 없습니다" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: 설정 해제할 수 없음: %s이(가) 읽기 전용임" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: 설정 해제할 수 없음" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: 부적절한 액션 이름" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, 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:846 +msgid "not currently executing completion function" +msgstr "완성 함수를 현재 실행하고 있지 않음" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "함수에서만 사용할 수 있음" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "함수 구성에 `-f' 옵션을 사용할 수 없음" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: 읽기 전용 함수" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: 참조 변수로 배열이 올 수 없음" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: 이름 참조 변수의 자가 참조를 허용하지 않음" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: 순환 이름 참조" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': 이름 참조의 부적절한 변수 이름" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: 이 방법으로 배열 변수를 해체할 수 없음" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: 참조 배열을 색인 배열로 변환할 수 없음" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: 따옴표를 이용한 복합 배열 할당은 향후 제거 예정" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "동적 불러오기 불가" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "%s 공유 객체를 열 수 없음: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "%2$s 공유 객체에서 %1$s을(를) 찾을 수 없음: %3$s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: 동적 내장 명령을 이미 불러왔습니다" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "%s에 대한 함수 불러오기 중 실패 반환 (%d): 불러오지 않음" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: 동적으로 불러오지 않음" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: 삭제할 수 없음: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: 디렉터리임" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: 일반 파일이 아님" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: 파일이 너무 큼" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: 이진 파일을 실행할 수 없음" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: 실행할 수 없음: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "로그아웃\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "로그인 셸이 아님: `exit'를 사용하십시오" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "멈춘 작업이 있습니다.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "실행 중인 작업이 있습니다.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "명령을 찾을 수 없음" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "기록 명세" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: 임시 파일을 열 수 없음: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "현재" + +#: builtins/fg_bg.def:161 +#, 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:91 +msgid "hashing disabled" +msgstr "해싱 비활성화됨" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: 해시 테이블이 비어있음\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "hits\tcommand\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "다음 키워드에 일치하는 셸 명령어 '" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "`%s'에 해당하는 도움말 주제가 없습니다. `man -k %s' 또는 `info %s' 명령을 입력하십시오." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: 열 수 없음: %s" + +#: builtins/help.def:523 +#, 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 "" +"이 셸 명령어는 내부에 지정했습니다. 목록을 보려면 `help'를 입력하십시오.\n" +"`help name'을 입력하면 함수 `name'의 정보를 더 확인할 수 있습니다.\n" +"셸에 대한 일반적인 정보를 더 확인하려면 `info bash'를 사용하십시오.\n" +"이 목록에 없는 명령어에 대해 더 알아보려면 `man -k' 또는 `info'를 사용하십시오.\n" +"\n" +"명령어 이름 다음의 별(*) 표시는 해당 명령어의 비활성 상태을 의미합니다.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "-anrw를 한 개 이상 사용할 수 없음" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "기록 위치" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: 부적절한 타임스탬프" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: 기록 확장 실패" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib 실패" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "`-x'와 다른 옵션을 같이 사용할 수 없음" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: 인자는 반드시 프로세스 또는 작업 ID이어야 함" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "알 수 없는 오류" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "표현식이 필요합니다" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: 색인 배열이 아님" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: 부적절한 파일 서술자 명세" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: 부적절한 파일 서술자: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: 부적절한 줄 수" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: 부적절한 배열의 시작" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: 부적절한 콜백 양자" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "빈 배열 변수 이름" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "배열 변수 지원이 필요함" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': 서식 문자 없음" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': 부적절한 시간 포맷 사양" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': 부적절한 서식 문자" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "경고: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "형식 해석 문제: %s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "\\x에 16진수 숫자 없음" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "\\%c에 유니코드 문자 없음" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "다른 디렉터리 없음" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: 부적절한 인자" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<현재 디렉터리 없음>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "디렉터리 스택이 비어있음" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "디렉터리 스택 색인" + +#: builtins/pushd.def:701 +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' 명령으로 목록에 경로를 저장할 수 있고 'popd' \n" +" 명령으로 거슬러 올라갈 수 있습니다.\n" +" \n" +" 옵션:\n" +" -c\t원소를 전부 삭제하여 디렉터리 스택을 초기화합니다\n" +" -l\t홈 디렉터리까지 ~ 축약 상대경로를 표시하지 않습니다\n" +" -p\t한 줄에 하나씩 디렉터리 스택을 표시합니다\n" +" -v\t한 줄에 하나씩 스택의 위치와 디렉터리 스택을 표시합니다\n" +" \n" +" 인자:\n" +" +N\t인자 없이 실행할 때 dirs에서 보여주는 목록의 왼쪽부터 N번째\n" +" \t항목을 보여줍니다. 세는 수는 0부터 시작합니다.\n" +" \n" +" -N\t인자 없이 실행할 때 dirs에서 보여주는 목록의 오른쪽부터 N번째\n" +" \t 항목을 보여줍니다. 세는 수는 0부터 시작합니다." + +#: builtins/pushd.def:723 +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\t스택에 디렉터리를 추가할 때 디렉터리 일반 변경 동작을\n" +" \t억제해서 스택만 바뀌게 합니다.\n" +" \n" +" 인자:\n" +" +N\tN번째 디렉터리가 최상단이 되도록(0부터 시작해서\n" +" \t`dirs' 내장 명령 목록 왼쪽부터 갯수를 셈) 스택을 뒤집습니다.\n" +" \n" +" -N\tN 번째 디렉터리가 최상단이 되도록(0부터 시작해서\n" +" \t`dirs' 내장 명령 목록 오른쪽부터 갯수를 셈) 스택을 뒤집습니다.\n" +" \n" +" dir\t새 현재 작업 디렉터리로 만들 DIR을 상단 디렉터리\n" +" \t 스택에 추가합니다.\n" +" \n" +" `dirs' 내장 명령은 디렉터리 스택을 보여줍니다." + +#: builtins/pushd.def:748 +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\t스택에 디렉터리를 제거할 때 디렉터리 일반 변경 동작을\n" +" \t억제해서 스택만 바뀌게 합니다.\n" +" \n" +" 인자:\n" +" +N\t0부터 시작해서 `dirs' 내장 명령 목록 왼쪽부터 갯수를 세어\n" +" \tN번째 항목을 제거합니다. 예: `popd +0'는 첫번째 디렉터리를, \n" +" \t`popd +1'는 두번째 디렉터리를 제거합니다.\n" +" \n" +" -N\t0부터 시작해서 `dirs' 내장 명령 목록 오른쪽부터 갯수를 세어\n" +" \tN번째 항목을 제거합니다. 예: `popd -0'는 마지막 디렉터리를, \n" +" \t`popd -1'는 마지막의 그 전 디렉터리를 제거합니다.\n" +" \n" +" `dirs' 내장 명령은 디렉터리 스택을 나타냅니다." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: 부적절한 타임아웃 정의" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "읽기 오류: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "함수 또는 원본 참조 스크립트에서만 'return' 할 수 있음" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "함수와 변수를 동시에 설정 해제할 수 없음" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: 배열 변수가 아님" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: 함수가 아님" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: 환경으로 내보낼 수 없음" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "시프트 횟수" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "셸 옵션을 동시에 설정 및 설정 해제할 수 없음" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: 부적절한 셸 옵션 이름" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "인자로 파일 이름이 반드시 필요함" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: 파일을 찾을 수 없음" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "일시 정지할 수 없음" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "로그인 셸을 일시 정지할 수 없음" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s은(는) `%s'의 별칭임\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s은(는) 셸 키워드임\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s은(는) 함수임\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s은(는) 특수 셸 내장 명령임\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s은(는) 셸 내장임\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s은(는) %s 임\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s은(는) 해시됨 (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: 부적절한 제한 인자" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': 잘못된 명령어" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: 제한을 읽을 수 없음: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "제한" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: 제한을 바꿀 수 없음: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "8진수" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': 부적절한 심볼릭 모드 연산자" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': 부적절한 심볼릭 모드 문자" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " 줄 " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "마지막 명령: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "취소중..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "정보: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "디버깅 경고: " + +#: error.c:488 +msgid "unknown command error" +msgstr "알 수 없는 명령 오류" + +#: error.c:489 +msgid "bad command type" +msgstr "잘못된 명령 형식" + +#: error.c:490 +msgid "bad connector" +msgstr "잘못된 커넥터" + +#: error.c:491 +msgid "bad jump" +msgstr "잘못된 점프" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: 바인딩 해제한 변수" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a입력 대기중 시간 초과: 자동으로 로그아웃\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "표준 입력을 /dev/null에서 방향재지정 처리할 수 없음: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': 부적절한 서식 문자" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] 가 여전히 존재" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "파이프 오류" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: 최대 eval 중첩 레벨 초과 (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: 최대 소스 중첩 레벨 초과 (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: 최대 함수 중첩 레벨 초과 (%d)" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: 제한됨: 명령 이름에 '/'를 지정할 수 없음" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: 명령어를 찾을 수 없음" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: 실행할 수 없음: 필요한 파일이 없습니다" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: 잘못된 인터프리터" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: 이진 파일을 실행할 수 없음: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': 특수한 내장 명령임" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "파일 서술자 %d번을 파일 서술자 %d번으로 복제할 수 없음" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "표현식 재귀 레벨 초과" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "재귀 스택 언더플로우" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "표현식 문법 오류" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "비 변수에 할당 시도" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "변수 할당 문법 오류" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "0으로 나눔" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "버그: 잘못된 표현식 토큰" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "조건문에 ':' 필요함" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "지수가 0보다 작음" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "전위 증가 또는 후위 감소 후에 식별자가 필요함" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "')' 빠짐" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "문법 오류: 피연산자 필요함" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "문법 오류: 부적절한 산술 연산자" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (오류 토큰은 \"%s\" 임)" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "부적절한 진법" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "부적절한 정수 상수" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "해당 진법에서 표현할 수 없는 값" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: 표현식 오류\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: 상위 디렉터리에 접근할 수 없음" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "파일 서술자 %d번에 nodelay 모드를 초기화할 수 없음" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "파일 서술자 %d번에서 bash 입력용 새 파일 서술자를 할당할 수 없음" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: 새 파일 서술자 %d번의 버퍼가 이미 존재함" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "포크한 PID %d번이 실행중인 작업 %d에 나타남" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "프로세스 그룹 %2$ld번의 멈춘 작업 %1$d번을 삭제중" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s)이(가) 여전히 살아있다고 나타남" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: 그런 pid가 없음" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "시그널 %d번" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "완료" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "멈춤" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "멈춤(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "실행중" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "완료(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "나감 %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "알 수 없는 상태" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(코어 덤프됨) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "child setpgid (%ld에서 %ld(으)로)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld번은 이 셸의 자식이 아님" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: 프로세스 %ld번의 기록 없음" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: 작업 %d번이 멈춤" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: 현재 작업이 없음" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: 작업이 종료됨" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: 작업 %d번은 이미 백그라운드에 있음" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: 미지정 차단 동작 회피 목적으로 WNOHANG를 켜는 중" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: 줄 %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (코어 덤프됨)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd now: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp 실패" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: 백그라운드에 작업 컨트롤 없음" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: 라인 제어" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "터미털 프로세스 그룹(%d)을 설정할 수 없음" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "이 셸에 작업 제어 없음" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: assertion 실패: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: assertion 망가짐\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "알 수 없음" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: 해제 목록 처리중 중단" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: 이미 해제된 블록 인자를 가지고 호출됨" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: 할당되지 않은 블록 인자와 호출됨" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: 언더플로우 감지! mh_nbytes가 범위를 벗어남" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: 언더플로우 감지! magic8 손상" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: 시작과 끝의 청크 사이즈가 다름" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: 할당되지 않은 블록 인자를 가지고 호출됨" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: 언더플로우 감지! mh_nbytes가 범위를 벗어남" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: 언더플로우 감지! magic8 손상" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: 시작과 끝의 청크 사이즈가 다름" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: FIND_ALLOC이 할당 테이블이 가득참?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p이(가) 할당한 테이블에 있음?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p이(가) 이미 해제한 테이블에 있음?\n" + +#: lib/sh/fmtulong.c:102 +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:347 +msgid "network operations not supported" +msgstr "네트워크 작업은 지원되지 않음" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: 로캘을 바꿀 수 없음 (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: 로캘을 바꿀 수 없음 (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: 로캘을 바꿀 수 없음 (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: 로캘을 바꿀 수 없음 (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "$_에 메일이 있습니다" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "$_에 새로운 메일이 있습니다" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "%s의 메일을 읽었습니다\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "문법 오류: 산술 표현식이 필요함" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "문법 오류: ';' 필요하지 않음" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "문법 오류: `((%s))'" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: 잘못된 명령어 형식 %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document가 %d번 행에서 파일의 끝으로 구분함 (`%s'아(가) 필요함)" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: 방향재지정 처리 명령어 `%d' 범위 벗어남" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size(%zu)가 SIZE_MAX(%lu)를 초과함: 줄 잘림" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "최대 here-document 카운트 초과" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "`%c'을(를) 찾는 도중 예상치 못한 파일의 끝" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "']]'를 찾던 도중 예상치 못한 파일의 끝" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "조건 표현식에 문법 오류: 예상치 못한 토큰 `%s'" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "조건 표현식에 문법 오류" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "예상치 못한 토큰 `%s', ')' 필요함" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "')' 필요함" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "조건 단항 연산자에 예기치 않은 인자 `%s'" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "조건 단항 연산자에 예기치 않은 인자" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "예기치 않은 토큰 `%s', 조건 이항 연산자 필요함" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "조건 이항 연산자 필요함" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "조건 이항 연산자에 대해 예기치 않은 인자 `%s'" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "조건 이항 연산자에 대해 예기치 않은 인자" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "조건 명령어에서 예기치 않은 토큰 `%c'" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "조건 명령어에서 예기치 않은 토큰 `%s'" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "조건 명령어에서 예기치 않은 토큰 %d" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "예기치 않은 토큰 `%s' 근처에서 문법 오류" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "`%s' 근처에서 문법 오류" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "문법 오류: 예기치 않은 파일의 끝" + +#: parse.y:6151 +msgid "syntax error" +msgstr "문법 오류" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "셸을 나가려면 \"%s\" 명령을 사용하십시오.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "맞는 ')'를 찾던 도중 예기치 않은 파일의 끝" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: `%s' 함수를 찾을 수 없음" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: 가능한 재시도 루프" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: 잘못된 커넥터 `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: 부적절한 파일 서술자" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: NULL 파일 포인터" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': 잘못된 서식 문자" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "파일 서술자 범위 벗어남" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: 모호한 리다이렉트" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: 이미 있는 파일을 덮어쓸 수 없음" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: 제한됨: 출력을 방향 재지정할 수 없음" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "here-document를 위한 임시 파일을 생성할 수 없음: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: 파일 서술자를 변수에 할당할 수 없음" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port는 네트워킹 없이 지원하지 않음" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "방향재지정 처리 오류: 파일 서술자를 복제할 수 없음" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "/tmp를 찾을 수 없음, 만드십시오!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp는 반드시 적절한 디렉터리 이름이어야 함" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "대화형 셸에서는 정돈 출력 모드를 무시함" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: 부적절한 옵션" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "uid를 %d번으로 설정할 수 없음: 효력상 사용자 ID %d번" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "gid를 %d번으로 설정할 수 없음: 효력상 그룹 ID %d번" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "디버거를 시작할 수 없음! 디버깅 모드 꺼짐" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: 디렉터리임" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "이름 없음!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU 배시, 버전 %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"사용법:\t%s [] [<옵션>] ...\n" +"\t%s [] [<옵션>] <스크립트파일> ...\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "GNU 긴 옵션:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "셸 옵션:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD 또는 -c <명령> 또는 -O shopt_option\t\t(invocation 전용)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s 또는 -o 옵션\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "`%s -c \"help set\"' 명령을 사용하면 셸 옵션에 관해 더 많은 정보를 확인할 수 있습니다.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "`%s -c help' 명령을 사용하면 셸 내장 명령어에 관해 더 많은 정보를 확인할 수 있습니다.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "버그를 보고하려면 'bashbug' 명령을 사용하십시오.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash 홈페이지: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "GNU 소프트웨어 사용자 일반 도움말: \n" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: 부적절한 작업" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "가짜 시그널" + +#: siglist.c:51 +msgid "Hangup" +msgstr "수행 중단(Hangup)" + +#: 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 "BPT 추적/중단" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "ABORT 명령" + +#: 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 +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 "멈춤 (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 "HFT 모니터 모드 승인함" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "HFT 모니터 모드 철회함" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "HFT 사운드 시퀀스가 끝남" + +#: siglist.c:215 +msgid "Information request" +msgstr "정보 요청" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "알 수 없는 시그널 #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "잘못된 대체: %2$s에 닫는 `%1$s' 없음" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: 리스트를 배열 멤버로 할당할 수 없음" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "프로세스 대체용 파이프를 만들 수 없음" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "프로세스 대체용 하위 요소를 만들 수 없음" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "읽기용 명명 파이프 %s을(를) 열 수 없음" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "쓰기용 명명 파이프 %s을(를) 열 수 없음" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "명명된 파이프 %s을(를) 파일 서술자 %d번으로 복제할 수 없음" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "command substitution: 입력의 null 바이트 무시" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "명령어 대체용 파이프를 만들 수 없음" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "명령어 대체용 하위 요소를 만들 수 없음" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: 파이프를 파일 서술자 1번으로 복제할 수 없음" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: 이름 참조에 부적절한 변수 이름" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: 부적절한 간접 확장" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: 부적절한 변수 이름" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: 매개변수값 설정 안함" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: 매개변수 값이 null 이거나 설정하지 않음" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: 부분 문자열 표현식 < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: 잘못된 대체" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: 이 방법으로 할당할 수 없음" + +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "향후 버전의 셸에서는 산술 대체로 연산이 강제됩니다" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "잘못된 대체: %s에 닫는 \"`\" 없음" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "일치 없음: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "인자 필요함" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: 정수 표현식 필요함" + +#: test.c:265 +msgid "`)' expected" +msgstr "`)'가 필요함" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "`)'가 있어야 하지만, %s이(가) 있습니다" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: 이항 연산자가 필요합니다" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: 단항 연산자가 필요합니다" + +#: test.c:896 +msgid "missing `]'" +msgstr "']' 빠짐" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "문법 오류: `%s' 필요하지 않음" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "부적절한 시그널 번호" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: 최대 트랩 핸들러 레벨 초과 (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: trap_list[%d]에 잘못된 값: %p" + +#: trap.c:416 +#, c-format +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: 시그널 핸들러는 SIG_DFL 이고, %d (%s)를 자신에게 다시 보내는 중" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: 잘못된 시그널 %d번" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "`%s'의 함수 정의 가져오기 오류" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "셸 레벨 (%d)이 너무 높습니다, 1로 재설정합니다" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: 현재 범위에서 함수 컨텍스트 없음" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: 변수는 할당 값이 아님" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: 비호환 형식의 값을 가져올 수 없음" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: 이름 참조에 정수를 할당하고 있음" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: 현재 범위에서 함수 컨텍스트 없음" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s이(가) null exportstr을 가짐" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%2$s의 exportstr에서 부적절한 문자 %1$d" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s의 exportstr에 '=' 없음" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: shell_variables의 시작이 함수의 컨텍스트가 아님" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: 컨텍스트에 global_variables 없음" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: shell_variables의 시작이 임시 환경 범위가 아님" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: <파일>로 열 수 없음" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: 추척 파일 서술자에 부적절한 값" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: 호환 값이 범위를 벗어남" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "라이선스 GPLv3+: GNU GPL 버전 3 이상 \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, 버전 %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "이 프로그램은 자유 소프트웨어입니다. 자유롭게 바꾸고 재배포할 수 있습니다." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "법률이 허용하는 모든 범위내의 보증은 없습니다." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %lu 바이트를 할당할 수 없음 (%lu 바이트 할당함)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: %lu 바이트를 할당할 수 없음" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: %lu 바이트를 할당할 수 없음 (%lu 바이트 할당함)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: %lu 바이트를 할당할 수 없음" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [<이름>[=<값>] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] <이름> [<이름> ...]" + +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m <키매핑>] [-f <파일이름>] [-q <이름>] [-u <이름>] [-r <키시퀀스>] [-x <키시퀀스>:<셸명령>] [<키시퀀스>:<행읽기함수> 또는 <행읽기명령>]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [<번호>]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [<번호>]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [<셸내장명령> [<인자> ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [<표현식>]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [<디렉터리>]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "<명령> [-pVv] <명령> [<인자> ...]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [<이름>[=<값>] ...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgilnrtux] [-p] <이름>[=<값>] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [<옵션>] <이름>[=<값>] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [<인자> ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [<인자> ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f <파일이름>] [<이름> ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [인자 ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [<인자> ...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a <이름>] [<명령> [<인자> ...]] [<방향재지정> ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [<번호>]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [<번호>]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e <편집기이름>] [-lnr] [<처음>] [<종결>] 또는 fc -s [<패턴>=<대체>] [<명령>]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg []" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [ ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p <경로이름>] [-dt] [<이름> ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [<패턴> ...]" + +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d <오프셋>] [n] 또는 history -anrw [<파일이름>] 또는 history -ps <인자> [<인자>...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobspec ...] 또는 jobs -x command [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [ ... | ...]" + +#: builtins.c:134 +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s <시그널명세> | -n <시그널번호> | -<시그널명세>] | ... 또는 kill -l [<시그널명세>]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let <인자> [<인자> ...]" + +#: builtins.c:138 +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a <배열>] [-d <구분자>] [-i <텍스트>] [-n <문자수>] [-N <문자수>] [-p <프롬프트>] [-t <제한시간>] [-u <파일서술자>] [<이름> ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o <옵션-이름>] [--] [<인자> ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [<이름> ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [<이름>[=<값>] ...] 또는 export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [<이름>[=<값>] ...] 또는 readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source <파일이름> [<인자>]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". <파일이름> [<인자>]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [<표현식>]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ <인자>... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[<인자>] <시그널_명세> ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] <이름> [<이름> ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [<한계값>]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [<모드>]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [ ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [ ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for <이름> [in <여러단어> ... ] ; do <명령>; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( <조건식1>; <조건식2>; <조건식3> )); do <명령>; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select <이름> [in <여러단어> ... ;] do <명령>; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] <파이프라인>" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case <단어> in [<패턴> [| <패턴>]...) <명령> ;;]... esac" + +#: builtins.c:194 +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if <명령>; then <명령>; [ elif <명령>; then <명령>; ]... [ else <명령>; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while <명령>; do <명령-2>; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until <명령>; do <명령-2>; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [<이름>] <명령> [<방향재지정>]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function <이름> { <명령> ; } 또는 <이름> () { <명령> ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ <명령> ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( <표현식> ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ <표현식> ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - 이름이자 일부 셸 변수를 의미합니다" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+<갯수> | -<갯수> | <디렉터리>]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+<갯수> | -<갯수>]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+<갯수>] [-<갯수>]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [<옵션이름>...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v <변수>] <출력형식> [<인자>]" + +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o <옵션>] [-A <동작>] [-G <글롭패턴>] [-W <단어목록>] [-F <함수>] [-C <명령>] [-X <필터패턴>] [-P <접두어>] [-S <접미어>] [<이름> ...]" + +#: builtins.c:235 +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 <옵션>] [-A <동작>] [-G <글롭패턴>] [-W <단어목록>] [-F <함수>] [-C <명령>] [-X <필터패턴>] [-P <접두어>] [-S <접미어>] [<단어>]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o <옵션>] [-DEI] [<이름> ...]" + +#: builtins.c:242 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d <구분자>] [-n <갯수>] [-O <시작>] [-s <갯수>] [-t] [-u <파일서술자>] [-C <콜백>] [-c <양자>] [<배열>]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d <구분자>] [-n <갯수>] [-O <시작>] [-s <갯수>] [-t] [-u <파일서술자>] [-C <콜백>] [-c <양자>] [<배열>]" + +#: builtins.c:256 +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" +" \n" +" 인자가 없다면, `alias'는 `alias <이름>=<값>' 형식으로 표준 출력에\n" +" 별칭 목록을 출력합니다.\n" +" \n" +" 그렇지 않으면 <값>을 부여한 각 <이름>을 지정합니다.\n" +" <값>에 공백 문자를 덧붙이면 별칭을 확장할 때 별칭 대체 대상\n" +" 문자열의 다음 단어를 확인합니다.\n" +" \n" +" 옵션:\n" +" -p\t재사용 형식으로 지정한 모든 별칭을 출력합니다\n" +" \n" +" 종료 상태:\n" +" 별칭으로 지정한 <이름>을 확인하면 참을 반환합니다." + +#: builtins.c:278 +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" +" \n" +" 옵션:\n" +" -a\t모든 별칭 지정 항목을 제거합니다.\n" +" \n" +" <이름>이 기존 별칭일 경우 성공을 반환합니다." + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"readline 키 바인딩과 값을 설정합니다.\n" +" \n" +" 키 시퀀스를 readline 함수 또는 매크로에 바인딩하거나, readline\n" +" 변수에 설정합니다. 옵션을 지정하지 않은 인자 문법은 ~/.inputrc\n" +" 에서 찾을 수 있는 문법과 동일합니다만 단일 인자로 전달해야 합니다.\n" +" 예: bind '\"\\C-x\\C-r\": re-read-init-file'\n" +" \n" +" 옵션:\n" +" -m <키매핑> <키매핑>을 이 명령 실행동안 사용하는 키매핑\n" +" 으로 활용합니다. 허용할 수 있는 키매핑 이름은 emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,\n" +" vi-command, vi-insert가 있습니다.\n" +" -l 함수 이름 목록.\n" +" -P 함수 이름 및 바인딩 목록.\n" +" -p 입력에 다시 활용할 수 있는 형식의 함수 이름과 바인딩 목록.\n" +" -S 매크로와 값을 실행하는 키 시퀀스 목록\n" +" -s 입력으로 다시 활용할 수 있는 매크로와 값을 실행하는\n" +" 키 시퀀스 목록.\n" +" -V 변수 이름과 값 목록\n" +" -v 입력으로 다시 활용할 수 있는 변수 이름과 값 목록.\n" +" -q <함수이름> 어떤 키가 명명 함수를 실행하는지 요청.\n" +" -u <함수이름> 명명 함수에 바인딩한 모든 키의 바인딩 해제.\n" +" -r <키시퀀스> <키시퀀스>의 바인딩 제거.\n" +" -f <파일이름> <파일이름>의 키 바인딩 읽기.\n" +" -x <키시퀀스>:<셸명령>\t<키시퀀스>를 입력하면 <셸명령>을\n" +" \t\t\t\t실행하게 합.\n" +" -X 입력으로 다시 활용할 수 있는 -x로 지정한 키 시퀀스\n" +" 및 관련 명령 목록\n" +" \n" +" 종료 상태:\n" +" 알 수 없는 옵션을 지정하지 않았거나 오류가 없으면 0을 반환합니다." + +#: builtins.c:330 +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" +" FOR, WHILE, UNTIL 반복문을 나갑니다. <횟수>를 지정하면,\n" +" 반복 <횟수>에 도달했을 때 중단합니다.\n" +" \n" +" 종료 상태:\n" +" <횟수>가 1보다 크거나 같으면 0입니다." + +#: builtins.c:342 +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" +" FOR, WHILE, UNTIL 반복문의 다음 반복 실행을 진행합니다.\n" +" <횟수>를 지정하면 <횟수> 만큼 다시 실행합니다.\n" +" \n" +" 종료 상태:\n" +" <횟수>가 1보다 크거나 같으면 0입니다." + +#: builtins.c:354 +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 "" +"셸 내장 명령을 실행합니다.\n" +" \n" +" <셸내장명령>을 명령 검색 동작 없이 <인자>를 지정하여 실행합니다.\n" +" 셸 내장 명령을 셸 함수로 재구현할 때 쓸만합니다만, 내장 명령은\n" +" 함수 안에서 실행해야합니다.\n" +" \n" +" 종료 상태:\n" +" <셸내장명령>의 종료 상태를 반환하거나 <셸내장명령>이 내장\n" +" 명령이 아닐 경우 거짓을 반환합니다." + +#: builtins.c:369 +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:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"셸 작업 디렉터리를 바꿉니다.\n" +" \n" +" 현재 디렉터리를 <디렉터리>로 바꿉니다. 기본 <디렉터리>는 HOME 셸 변수\n" +" 값입니다.\n" +" \n" +" CDPATH 변수에는 <디렉터리> 값이 들어간 디렉터리 검색 경로를 지정합니다.\n" +" CDPATH의 대안 디렉터리 이름은 콜론으로 구분합니다. 널 디렉터리 이름은 \n" +" 현재 디렉터리와 같습니다. <디렉터리> 값이 슬래시 문자(/)로 시작하면, \n" +" CDPATH 변수를 사용하지 않습니다.\n" +" \n" +" 디렉터리가 없고, `cdable_vars' 셸 옵션을 설정했다면, 단어를 변수 이름으로\n" +" 가정합니다. 변수에 값이 들어가있다면, 해당 값을 <디렉터리> 값으로 활용\n" +" 합니다.\n" +" \n" +" 옵션:\n" +" -L\t강제로 심볼릭 링크를 따라갑니다. <디렉터리>의 심볼릭 링크를\n" +" \t\t`..' 인스턴스를 처리한 다음에 해석합니다.\n" +" -P\t심볼릭 링크를 따르지 않고 실제 디렉터리 구조를 활용합니다.\n" +" \t\t`..' 인스턴스를 처리하기 전에 <디렉터리>의 심볼릭 링크를\n" +" \t\t해석합니다.\n" +" -e\t-P 옵션을 지정하고, 현재 디렉터리를 제대로 식별하지 못하면\n" +" \t\t0이 아닌 상태 값으로 나갑니다\n" +" -@\t이 옵션을 지원하는 시스템에서는 파일 속성이 들어간\n" +" \t\t디렉터리처럼 확장 속성을 가진 파일을 나타냅니다\n" +" \n" +" `-L' 옵션을 지정했을 때와 같이 심볼릭 링크를 따라가는게 기본 동작입니다.\n" +" `..'은 이전 경로 이름 요소를 즉시 제거하여 슬래시 경로로 돌아가거나\n" +" <디렉터리>의 시작점으로 돌아갑니댜.\n" +" \n" +" 종료 상태:\n" +" 디렉터리가 바뀌었고 -P 옵션을 사용했을 때 $PWD 값을 제대로 설정하면\n" +" 0 값을 반환하며, 그렇지 않으면 0이 아닌 값을 반환합니다." + +#: builtins.c:425 +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" +" \t\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 "" +"현재 작업 디렉터리의 이름을 출력합니다.\n" +" \n" +" 옵션:\n" +" -L\t$PWD값의 이름이 현재 작업 디렉터리일 경우 값을 출력\n" +" -P\t심볼릭 링크가 아닌 물리 디렉터리를 출력\n" +" \n" +" 기본적으로 `pwd'에는 `-L' 옵션이 붙어있습니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션이 붙었거나 현재 디렉터리를 읽을 수 있다면 0을 반환합니다." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null 명령.\n" +" \n" +" 효과 없음. 아무것도 하지 않습니다.\n" +" \n" +" 종료 상태:\n" +" 항상 성공합니다." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"성공 결과를 반환합니다.\n" +" \n" +" 종료 상태:\n" +" 항상 성공합니다." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"실패 결과를 반환합니다.\n" +" \n" +" 종료 상태:\n" +" 항상 실패합니다." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"간단한 명령을 실행하거나 명령 정보를 표시합니다.\n" +" \n" +" 셸 함수 탐색을 억제하는 <인자>로 <명령>을 실행하거나, 지정 <명령>의 정보를\n" +" 나타냅니다. 동일한 이름을 가진 함수가 있을 때 디스크의 명령을 실행할 경우\n" +" 활용할 수 있습니다.\n" +" \n" +" 옵션:\n" +" -p 표준 유틸리티를 전부 찾을 수 있다고 보장하는\n" +" PATH 기본값을 사용합니다.\n" +" -v `type' 내장 명령과 비슷하게 <명령>의 설명을 보여줍니다\n" +" -V 각 <명령>의 더 자세한 정보를 보여줍니다\n" +" \n" +" 종료 상태:\n" +" <명령>의 실행 결과를 반환하거나 <명령>이 없을 경우 오류를 반환합니다." + +#: builtins.c:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"변수 값과 속성을 설정합니다.\n" +" \n" +" 변수를 선언하고 속성을 부여합니다. <이름>을 정하지 않으면,\n" +" 속성과 모든 변수 값을 나타냅니다.\n" +" \n" +" 옵션:\n" +" -f\t함수 이름과 정의로 동작과 표시를 제한합니다\n" +" -F\t함수 이름만 표시를 제한합니다 (디버깅할 때는 행 번호와\n" +" \t\t소스 파일 포함)\n" +" -g\t셸 함수에서 사용할 때 전역 변수를 만듭니다. 아니면 무시\n" +" -I\t지역 변수를 만들 때, 이전 범위의 같은 이름을 가진 속성과\n" +" \t\t변수값을 이어받습니다\n" +" -p\t속성과 각 <이름>의 값을 표시합니다\n" +" \n" +" 속성을 설정하는 옵션:\n" +" -a\t<이름>을 색인 배열로 만듬 (지원할 경우)\n" +" -A\t<이름>을 연관 배열로 만듬 (지원할 경우)\n" +" -i\t<이름>을 `정수' 속성을 가지게 함\n" +" -l\t각 <이름>의 할당 값을 소문자로 변환\n" +" -n\t<이름> 값으로 지정한 이름을 참조하게 함\n" +" -r\t<이름>을 읽기 전용으로 설정\n" +" -t\t<이름>에 `trace' 속성을 가지게 함\n" +" -u\t각 <이름>의 할당 값을 대문자로 변환\n" +" -x\t<이름>을 내보냄\n" +" \n" +" 주어진 속성을 사용하려면 `+'를 끄려면 `-'를 사용합니다.\n" +" \n" +" 정수 속성 변수는 변수에 값을 할당하면 산술 연산을 수행\n" +" 합니다 (`let' 명령 참고).\n" +" \n" +" 함수에서 사용할 때, `declare' 명령은 `local' 명령처럼\n" +" <이름>을 로컬 변수로 만듭니다. `-g' 옵션은 이 동작을\n" +" 억제합니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 설정했거나 변수 할당 오류가 없다면\n" +" 성공을 반환합니다." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"변수의 값과 속성을 설정합니다.\n" +" \n" +" `declare'의 동의어 입니다. `help declare'를 보십시오." + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"지역 변수를 지정합니다.\n" +" \n" +" <이름> 지역 변수를 만들고 <값>을 부여합니다. <옵션>은 `declare'\n" +" 로 받아들일 수 있는 어떤 옵션도 가능합니다.\n" +" \n" +" 지역 변수는 함수 내에서만 활용할 수 있습니다. 하위 요소에서 지정했다면,\n" +" 역시 하위 함수에서만 볼 수 있습니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 지정했거나, 변수 할당에 오류가 없거나,\n" +" 셸에서 함수를 실행하면 성공을 반환합니다." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"표준 출력에 인자를 기록합니다.\n" +" \n" +" 단일 공백문자로 구분하며 개행 문자가 따라오는 <인자>를\n" +" 표준 출력에 나타냅니다.\n" +" \n" +" 옵션:\n" +" -n\t개행 문자 추가 안함\n" +" -e\t추가 백슬래시 탈출 문자 처리 활성\n" +" -E\t백슬래시 탈출 문자 처리를 명백하게 무시\n" +" \n" +" `echo' 명령은 다음 백슬래시 탈출 문자를 처리합니다:\n" +" \a\t경고 (알림음)\n" +" \\b\t백스페이스\n" +" \\c\t이후 출력 무시\n" +" \\e\t탈출 문자\n" +" \\E\t탈출 문자\n" +" \\f\t폼 피드\n" +" \\n\t개행 문자\n" +" \\r\t캐리지 리턴\n" +" \\t\t수평 탭\n" +" \\v\t수직탭\n" +" \\\\\t백슬래시\n" +" \\0nnn\t8진수 ASCII 코드 문자. NNN은 최대 3자리 8진수\n" +" \\xHH\t16진수 8비트 문자. HH는 2자리 16진수\n" +" \\uHHHH\t16진수 유니코드 문자. HHHH는 4자리 16진수\n" +" \\UHHHHHHHH 16진수 유니코드 문자. HHHHHHHH는 8자리 16진수\n" +" \n" +" 종료 상태:\n" +" 기록 오류가 없으면 성공을 반환합니다." + +#: builtins.c:597 +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 "" +"표준 출력에 인자를 기록합니다.\n" +" \n" +" <인자> 값과 줄바꿈을 표준 출력에 나타냅니다.\n" +" \n" +" 옵션:\n" +" -n\t개행 문자 추가 안함\n" +" \n" +" 종료 상태:\n" +" 기록 오류가 없다면 성공을 반환합니다." + +#: builtins.c:612 +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 "" +"셸 내장 명령을 사용 혹은 미사용처리 합니다.\n" +" \n" +" 내장 셸 명령을 사용/미사용 처리합니다. 미사용 처리하면 전체 경로 이름을\n" +" 지정하지 않고도 셸 내장명령처럼 동일한 이름을 가진 디스크 명령을 실행할\n" +" 수 있습니다\n" +" \n" +" 옵션:\n" +" -a\t내장 명령의 활성 여부를 나타내는 목록을 출력합니다\n" +" -n\t각 <이름>을 미사용 처리하거나 미사용 내장 명령 목록을 출력합니다\n" +" -p\t재활용 형식으로 내장 명령 목록을 출력합니다\n" +" -s\tPOSIX `특수' 내장 명령 이름만 출력합니다\n" +" \n" +" 동적 불러오기를 제어하는 옵션은 다음과 같습니다:\n" +" -f\t<파일이름> 공유 객체의 내장 <이름>을 불러옵니다\n" +" -d\t-f로 불러온 내장 명령을 제거합니다\n" +" \n" +" 옵션을 지정하지 않으면, 각 <이름>을 사용합니다.\n" +" \n" +" 셸 내장 버전 대신 $PATH에서 찾은 `test'를 활용하려면,\n" +" `enable -n test'를 입력하십시오.\n" +" \n" +" 종료 상태:\n" +" <이름>이 셸 내장 명령이고 오류가 없으면 성공을 반환합니다." + +#: builtins.c:640 +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 "" +"인자를 셸 명령으로 실행합니다.\n" +" \n" +" <인자>를 단일 문자열에 결합하여 셸 입력 결과로 할용한 다음,\n" +" 결과를 내는 명령으로 실행합니다.\n" +" \n" +" 종료 상태:\n" +" 명령 값이 있다면 종료 상태를, null 이라면 성공을 반환합니다." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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 "" +"옵션 인자를 해석합니다.\n" +" \n" +" getopts는 위치 매개변수를 옵션으로 해석하는 셸 프로시저에서\n" +" 활용합니다.\n" +" \n" +" <옵션문자열>에는 식별할 옵션 문자가 들어갑니다. 문자에 콜론이\n" +" 뒤따라 붙을 경우, 옵션에 공백 문자로 구분한 인자가 뒤따라오는\n" +" 것으로 간주합니다.\n" +" \n" +" 실행할 때마다, getopts에서 $name 셸 변수의 다음 옵션을 확인하여\n" +" 해당 옵션이 없을 경우 이름을 초기화하고 OPTIND 셸 변수에 다음\n" +" 인자의 색인을 처리합니다. OPTIND는 셸 또는 셸 스크립트를 실행\n" +" 할 때마다 1로 초기화합니다. 옵션에 인자가 필요하면, getopts에서\n" +" 해당 인자를 OPTARG 셸 변수에 넣습니다.\n" +" \n" +" getopts는 두가지 방법으로 오류를 나타냅니다. OPTSTRING의 첫번째\n" +" 문자가 콜론이면, getopts에서는 오류 보고시 조용한 상태로 바뀝니다.\n" +" 이 때, 어떤 오류 메시지도 나타나지 않습니다. 그런데 부적절한 옵션이\n" +" 나타나면, getopts에서 OPTARG의 잘못된 옵션 문자를 찾아 가리킵니다.\n" +" 필요한 인자가 없다면, getopts는 콜론을 <이름>에 대입하고, OPTARG \n" +" 변수에는 찾은 옵션 문자를 할당합니다. getopts가 미출력 상태가 아니고,\n" +" 부적절한 옵션을 확인했다면, getopts는 '?' 값을 <이름>에 대입하고, \n" +" OPTARG 설정을 해제합니다. 필요한 인자가 없다면 '?' 값이 <이름>에\n" +" 들어가고, OPTARG 변수 설정을 해제하며, 진단 메시지를 출력합니다.\n" +" \n" +" OPTERR 셸 변수값이 0이면, getopts에서는 오류 메시지 출력을 하지\n" +" 않습니다. OPTSTRING 첫번째 문자가 콜론이 아니더라도, 기본적으로\n" +" OPTERR 셸 변수값에는 1이 들어가 있습니다.\n" +" \n" +" getopts는 보통 위치 매개변수를 해석하지만, <인자> 값처럼 인자를\n" +" 지정하면, 해당 값을 먼저 해석합니다.\n" +" \n" +" 종료 상태:\n" +" 옵션을 찾으면 성공을 반환합니다.옵션의 끝에 도달했거나, 오류가\n" +" 나타나면 실패를 반환합니다." + +#: builtins.c:694 +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"셸을 주어진 명령으로 대체합니다.\n" +" \n" +" 이 셸을 지정 프로그램으로 대체하는 <명령>을 실행합니다.\n" +" <인자>는 <명령>을 따라갑니다. <명령>을 지정하지 않으면,\n" +" 현재 셸의 어떤 방향재지정 명령이든 결과가 나타납니다.\n" +" \n" +" 옵션:\n" +" -a <이름>\t<이름>을 <명령>의 0번째 인자로 전달합니다\n" +" -c\t빈 환경에서 <명령>을 실행합니다\n" +" -l\t<명령>의 0번째 인자로 대시 문자를 둡니다\n" +" \n" +" 명령을 실행할 수 없다면, `execfail' 셸 옵션을 설정하지 않았을 경우,\n" +" 비대화식 셸을 나갑니다.\n" +" \n" +" 종료 상태:\n" +" <명령>이 있거나 방향재지정 실행시 오류가 없다면 성공을 반환합니다." + +#: builtins.c:715 +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:724 +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 "" +"로그인 셸을 나갑니다.\n" +" \n" +" 종료 상태 N으로 로그인 셸을 나갑니다. 로그인 셸에서 실행되지 않는 경우\n" +" 에러가 발생합니다." + +#: builtins.c:734 +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" +" \n" +" fc는 기록 목록의 명령을 보여주거나 편집하고 다시 실행할 때 사용합니다.\n" +" <처음>과 <종결>은 범위 지정 숫자이며, <처음>은 문자열일 수도 있습니다.\n" +" 이는, 최근 명령이 <처음>에 지정한 문자열로 시작함을 의미합니다.\n" +" \n" +" 옵션:\n" +" -e <편집기이름>\t사용할 편집기를 선택합니다. 기본은 FCEDIT, EDITOR, \n" +" \t\t그 다음은 vi입니다\n" +" -l \t편집하지 않고 목록 행을 보여줍니다\n" +" -n\t목록을 나타낼 때 번호를 생략합니다\n" +" -r\t행 순서를 뒤집습니다 (최신 항목을 먼저)\n" +" \n" +" `fc -s [<패턴>=<대체> ...] [<명령>]' 형식에서, <명령> 은\n" +" <이전>=<최신> 대체 동작을 수행한 다음 다시 실행합니다.\n" +" \n" +" r='fc -s'(으)로 쓸만한 별칭을 만들어 쓸 수 있는데, `r cc'를 입력하면\n" +" `cc'로 시작하는 최근 명령을 실행하고 `r'을 입력하면 직전에 입력한\n" +" 최근 명령을 다시 실행할 수 있습니다.\n" +" \n" +" 종료 상태:\n" +" 성공 또는 실행 명령 상태를 반환합니다. 오류가 있다면 0이 아닌 값을 반환합니다." + +#: builtins.c:764 +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" +" \n" +" JOB_SPEC으로 식별하는 작업을 포그라운드에 두어, 현재 작업으로\n" +" 전환합니다. JOB_SPEC이 현재 작업이 아니면, 셸의 개념상 현재 작업을\n" +" 활용합니다.\n" +" \n" +" 종료 상태:\n" +" 포그라운드에 있는 명령의 상태를 반환합니다. 오류가 있다면 실패를 반환합니다." + +#: builtins.c:779 +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" +" \n" +" `&'로 시작했을 때와 마찬가지로, 각 JOB_SPEC으로 식별하는 작업을\n" +" 백그라운드에 둡니다. JOB_SPEC이 없다면, 셸의 개념상 현재 작업을\n" +" 활용합니다.\n" +" \n" +" 종료 상태:\n" +" 작업 컨트롤이 있고 오류가 없다면 성공을 반환합니다." + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"프로그램 위치를 기억하거나 표시합니다.\n" +" \n" +" 명령 <이름>의 전체 경로 이름을 판단하거나 기억합니다. 어떤 인자도\n" +" 설정하지 않으면, 기억한 명령의 정보를 표시합니다.\n" +" \n" +" 옵션:\n" +" -d\t각 <이름>의 기억 위치를 소거합니다\n" +" -l\t입력으로 재활용할 형식을 표시합니다\n" +" -p <경로이름>\t<이름> 의 전체 경로 이름으로 <경로이름>을 활용합니다\n" +" -r\t기억한 모든 위치를 소거합니다\n" +" -t\t각 <이름>의 기억 위치를 출력하며 여러 <이름>을 지정했을 경우,\n" +" \t\t<이름>에 해당하는 각 위치를 우선 나타냅니다\n" +" 인자:\n" +" <이름>\t각 <이름>은 $PATH에서 검색하며 기억 명령에 대해 목록에\n" +" \t\t추가합니다.\n" +" \n" +" 종료 상태:\n" +" <이름>을 찾았거나 적절한 옵션을 지정했다면 성공을 반환합니다." + +#: builtins.c:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is given." +msgstr "" +"내장 명령 정보를 표시합니다.\n" +" \n" +" 내장 명령 요약 정보를 표시합니다. <패턴>을 지정하면 <패턴>에 일치\n" +" 하는 모든 명령의 자세한 내용을 나타내며, 그렇지 않으면 도움말 주제 \n" +" 목록을 나타냅니다.\n" +" \n" +" 옵션:\n" +" -d\t각 주제의 간단한 설명을 출력합니다\n" +" -m\t유사 맨 페이지 형식으로 사용법을 출력합니다.\n" +" -s\t<패턴>에 일치하는 주제의 간단한 개요만 출력합니다\n" +" \n" +" 인자:\n" +" <패턴>\t도움말 주제를 지정합니다\n" +" \n" +" 종료 상태:\n" +" <패턴>에 일치하는 주제를 찾았거나 적절한 옵션을 지정하면 성공을 반환합니다." + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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은 최근 항목 N개만 나타냄을 의미합니다.\n" +" \n" +" 옵션:\n" +" -c\t모든 항목을 삭제하여 기록 목록을 지웁니다\n" +" -d <오프셋>\t<오프셋> 포지션에 있는 항목을 삭제합니다. 음수\n" +" \t\t오프셋은 기록 목록 끝부터 거꾸로 셉니다\n" +" \n" +" -a\t이 세선의 기록 파일에 기록 행을 추가합니다\n" +" -n\t기록 파일에서 이미 읽은 부분은 읽지 않고 모든 기록 항목을\n" +" \t\t읽어 기록 목록에 추가합니다\n" +" -r\t기록 파일을 읽고 기록 목록에 내용을 추가합니다\n" +" -w\t현재 기록을 기록 파일에 기록합니다\n" +" \n" +" -p\t각 <인자>의 기록 확장을 수행한 후 기록 목록에 저장하지\n" +" \t\t않고 결과를 표시합니다\n" +" -s\t<인자>를 기록 목록에 단일 항목으로 추가합니다\n" +" \n" +" <파일이름>을 지정하면 기록 파일로 사용합니다. 아니면,\n" +" HISTFILE 변수에 값을 지정했다면 해당 값을 사용하고, \n" +" 아니면 ~/.bash_history를 활용합니다.\n" +" \n" +" HISTTIMEFORMAT 변수에 값을 설정하여 널 상태가 아니라면 해당 값을\n" +" 앞으로 표시할 각 기록 항목에 대한 타임스탬프를 출력할 때 strftime(3)의\n" +" 형식 문자열로 활용합니다. 그렇지 않으면 타임스탬프를 출력하지 않습니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 설정했거나 오류가 없다면 성공을 반환합니다." + +#: builtins.c:879 +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\tlists only processes that have changed status since the last\n" +" \t\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" +" \n" +" 활성 작업을 나타냅니다. JOBSPEC에는 해당 작업의 출력을\n" +" 제한합니다. 옵션을 지정하지 않으면 모든 활성 작업 상태를\n" +" 나타냅니다.\n" +" \n" +" 옵션:\n" +" -l\t일반 정보 및 프로세스 ID를 보여줍니다.\n" +" -n\t최근 알림 이후 상태가 바뀐 프로세스만 보여줍니다.\n" +" -p\t프로세스 ID만 보여줍니다\n" +" -r\t출력 대상을 실행 작업으로 제한합니다\n" +" -s\t출력 대상을 멈춘 작업으로 제한합니다\n" +" \n" +" -x 옵션을 지정하면 <인자>에 나타난 모든 작업 명세가 프로세스 그룹의\n" +" 리더 프로세스 ID로 바뀐 후 <명령> 을 실행합니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 설정했거나 오류가 없다면 성공을 반환합니다.\n" +" -x 옵션을 사용했다면 <명령>의 종료 상태를 반환합니다." + +#: builtins.c:906 +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" +" \t\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 "" +"현재 셸에서 작업을 제거합니다.\n" +" \n" +" 각 인자를 활성 작업 테이블에서 제거합니다. 어떤 도\n" +" 지정하지 않으면, 현재 작업을 지정한 것으로 간주합니다.\n" +" \n" +" 옵션:\n" +" -a\t를 지정하지 않으면 모든 작업을 제거합니다\n" +" -h\t각 을 마킹해서 셸에서 SIGHUP 시그널을 받았다면\n" +" \t\t작업에 해당 시그널을 보내지 않게 합니다.\n" +" -r\t실행 작업만 제거합니다\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 지정하고 주어진 값이 올바를 경우 성공을 반환합니다." + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"작업에 시그널을 보냅니다..\n" +" \n" +" 또는 으로 식별하는 프로세스에 SIGSPEC 또는\n" +" SIGNUM으로 이름이 붙은 시그널을 보냅니다. SIGSPEC, SIGNUM \n" +" 돌 다 없을 경우, SIGTERM을 고려합니다.\n" +" \n" +" 옵션:\n" +" -s <시그널>\t<시그널>은 시그널 이름입니다\n" +" -n <시그널>\t<시그널>은 시그널 번호입니다\n" +" -l\t시그널 이름 목록을 나타냅니다. 인자에 `-l'을 붙이면 나타낼 이름에\n" +" \t\t대한 시그널 번호를 나타내라는 의미입니다\n" +" -L\t-l과 동일한 의미\n" +" \n" +" 두가지 이유로 kill은 셸 내장 명령입니다: 프로세스 ID 대신 작업 ID를\n" +" 허용하며, 만들 수 있는 프로세스 수의 한계에 도달했을 때 강제로 끝내야\n" +" 할 프로세스를 강제로 끝낼 수 있습니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 설정했거나 오류가 없다면 성공을 반환합니다." + +#: builtins.c:949 +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" +" 각 <인자>의 산술 연산을 처리합니다. 오버플로우를 검사하지 않고\n" +" 고정 길이 정수로 처리하며, 0나누기 동작은 잡혀서 오류로 표시합니다.\n" +" 다음 연산자 목록은 동일한 우선순위별로 묶었습니다. 우선순위 수준은\n" +" 우선순위가 감소하는 순서대로 나열했습니다.\n" +" \n" +" \tid++, id--\t변수의 후위 증가, 후위 감소\n" +" \t++id, --id\t변수의 전위 증가, 전위 감소\n" +" \t-, +\t\t음, 양 부호\n" +" \t!, ~\t\t논리, 비트 반전\n" +" \t**\t\t지수 연산\n" +" \t*, /, %\t\t곱하기, 나누기, 나머지\n" +" \t+, -\t\t더하기, 빼기\n" +" \t<<, >>\t\t좌측, 우측 비트 이동\n" +" \t<=, >=, <, >\t비교\n" +" \t==, !=\t\t동등, 상이\n" +" \t&\t\t비트 논리곱\n" +" \t^\t\t비트 배타합\n" +" \t|\t\t비트 논리합\n" +" \t&&\t\t논리 논리곱\n" +" \t||\t\t논리 논리합\n" +" \t<수식> ? <수식> : <수식>\n" +" \t\t\t3항 조건 연산자\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\t할당\n" +" \n" +" 셸 변수를 피연산자로 활용할 수 있습니다. 수식 내 변수 이름은 값으로 \n" +" 바뀝니다(고정 길이 정수로 강제 변환) 변수는 수식에서 활용할 정수 \n" +" 속성을 가질 필요는 없습니다.\n" +" \n" +" 연산자는 우선순위 순서대로 처리합니다. 괄호 내 하위 연산을 우선\n" +" 처리하며, 이 또한 위의 우선순위 규칙을 따릅니다.\n" +" \n" +" 종료 상태:\n" +" <인자>가 0을 계산하면 1을 반환하고 그렇지 않으면 0을 반환합니다." + +#: builtins.c:994 +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. By default, the backslash character escapes delimiter characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"표준 입력에서 행을 읽고 필드 단위로 분리합니다.\n" +" \n" +" 표준 입력 또는 -u 옵션을 지정했을 경우 파일 서술자에서 단일 행을\n" +" 읽습니다. 행은 단어를 분리할 때처럼 필드로 분리하며, 첫번째 단어는\n" +" 처음 <이름>으로, 두번째 단어는 두번째 <이름>으로 이런 식으로 할당\n" +" 하여 나머지 단어에서도 역시 그 다음 <이름>으로 할당합니다. 오직 $IFS\n" +" 의 문자만 단어 구분자로 인식합니다. 기본적으로 백슬래시 문자는 구분\n" +" 문자와 개행 문자를 이스케이핑합니다.\n" +" \n" +" <이름>을 지정하지 않으면, 해당 행을 REPLY 변수에 저장합니다.\n" +" \n" +" 옵션:\n" +" -a <배열>\t0부터 시작하는 ARRAY 배열 변수의 순차 색인을 읽을\n" +" \t\t단어를 할당합니다\n" +" -d <구분>\t개행 문자가 아닌 DELIM의 첫 글자를 읽을 때까지 계속합니다\n" +" -e\t행 읽기에 readline을 활용합니다\n" +" -i <텍스트>\treadline 초기 텍스트 값으로 TEXT를 활용합니다.\n" +" -n <문자수>\t개행 문자를 기다리기 보다는 <문자수> 만큼의 문자를 읽은 다음\n" +" \t\t반환합니다만, 구분 문자가 나타나기 전에 <문자수> 만큼 읽었을 때 개행 문자가\n" +" \t\t먼저 오면 구분 문자보다 개행 문자를 우선 처리합니다.\n" +" -N <문자수>\tEOF가 나타났거나, 읽기 시간 초과가 있지 않은 한,\n" +" \t\t<문자수> 만큼 문자를 읽은 다음 구분자를 무시하고 값을 반환합니다.\n" +" -p <프롬프트>\t읽기 전, 개행 문자를 제외하고 PROMPT 문자열을 출력합니다\n" +" -r\t문자를 이스케이핑하는 백슬래시 문자를 허용하지 않습니다\n" +" -s\t터미널의 입력에 대해 반향 출력 처리하지 않습니다\n" +" -t <제한시간>\tTIIMEOUT 초 이내에 입력 행을 완전히 읽지 않으면 실패를\n" +" \t\t반환합니다. TMOUT 변수 기본 값은 기본 제한시간입니다. TIMEOUT은\n" +" \t\t분수 값입니다. 이 값을 0으로 지정하면, 어떤 결과를 읽으려 시도하지 않고\n" +" \t\t읽은 결과를 바로 반환하며, 지정 파일 서술자에 입력이 있을 경우에만\n" +" \t\t성공을 반환합니다. 시간을 초과하면 종료 상태값은 128보다 큽니다.\n" +" -u <파일서술자>\t표준 입력 대신 파일 서술자에서 읽습니다.\n" +" \n" +" 종료 상태:\n" +" EOF가 나타나지 않았다거나, 읽기 시간을 초과하지 않았다거나(초과하면 \n" +" 128보다 큰 수 반환), 변수 할당 오류가 없었다거나, -u 옵션에 잘못된 파일\n" +" 서술자를 지정하지 않았다면 0 값을 반환합니다." + +#: builtins.c:1042 +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" +" \n" +" 함수 또는 소싱 스크립트로 하여금 반환 값을 내놓도록 합니다.\n" +" <횟수>로 지정합니다. <횟수> 값을 생략하면, 반환 상태는\n" +" 스크립트 함수 내 최종 명령 실행 결과에 따릅니다.\n" +" \n" +" 종료 상태:\n" +" <횟수>를 반환하거나, 셸에서 함수 또는 스크립트를\n" +" 실행하지 않으면 실패를 반환합니다." + +#: builtins.c:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"셸 옵션과 위치 매개변수를 설정 또는 설정 해제합니다.\n" +" \n" +" 셸 속성 값 및 위치 매개변수를 바꾸거나, 셸 변수의 이름과 값을\n" +" 표시합니다.\n" +" \n" +" 옵션:\n" +" -a 환경으로 내보내려 수정하거나 만든 변수를 표시합니다.\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 이맥스 방식 행 편집 인터페이스 활용\n" +" errexit -e와 동일\n" +" errtrace -E와 동일\n" +" functrace -T와 동일\n" +" hashall -h와 동일\n" +" histexpand -H와 동일\n" +" history 명령 기록 사용\n" +" ignoreeof EOF를 읽고 나서 셸을 나가지 않음\n" +" interactive-comments\n" +" interactive commands에 나타난 주석 허용\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 파이프라인 반환 값은 최종 명령의 0이 아닌\n" +" 종료 상태이거나, 0이 아닌 종료 상태를 반환한 명령이\n" +" 없다면 0 값을 반환함\n" +" posix 배시 동작을 바꾸어 POSIX 표준과 다른 기본 동작\n" +" 부분을 표준에 맞춤\n" +" privileged -p와 동일\n" +" verbose -v와 동일\n" +" vi vi 방식 행 종결 인터페이스\n" +" xtrace -x와 동일\n" +" -p 실제 ID와 효력상 ID가 일치하지 않을 때라도 켭니다.\n" +" $ENV 파일의 처리와 셸 함수 가져오기 동작을 끕니다.\n" +" 이 옵션을 끄면 효력상 사용자 ID와 그룹 ID를 실제\n" +" 사용자 ID와 그룹 ID로 설정합니다.\n" +" -t 명령하나를 읽고 실행한 후 나갑니다.\n" +" -u 설정 해제한 변수를 대체할 때 오류로 간주.\n" +" -v 셸 입력 행을 읽는대로 출력합니다.\n" +" -x 명령과 인자를 실행하는 대로 출력합니다.\n" +" -B 셸에 중괄호 확장을 수행하게 합니다\n" +" -C 이 옵션을 설정하면, 기존 일반 파일에 출력 방향 재지정을 통한\n" +" 내용 덮어쓰기를 허용하지 않습니다.\n" +" -E 이 옵션을 설정하면, ERR 트랩을 셸 함수에서 승계합니다.\n" +" -H ! 방식 기록 대체를 활성화합니다. 이 플래그는 셸이 대화모드일 떄\n" +" 기본적으로 사용 상태입니다..\n" +" -P 이 옵션을 설정하면, 현재 디렉터리를 바꾸는 cd 명령과 같은 그련\n" +" 명령을 실행할 때 심볼릭 링크를 해석하지 않습니다.\n" +" -T 이 옵션을 설정하면, DEBUG와 RETURN을 셸 함수에서 계승합니다..\n" +" -- 남은 인자를 위치 매개변수로 할당합니다. 남은 인자가 없으면\n" +" 위치 매개변수를 삭제합니다.\n" +" - 남은 인자를 위치 매개변수로 할당합니다. -x 옵션과 -v 옵션을 끕니다.\n" +" \n" +" 플래그를 사용하려면 + 를, 아니면 - 기호를 씁니다. 플래그는 셸 실행애\n" +" 활용할 수도 있습니다. 현재 플래그 셋은 $-에 있습니다. 남은 <인자>는\n" +" $1, $2, ... $n 순으로 할당한 위치 매개변수입니다. 지정 <인자>가 없으면\n" +" 모든 셸 변수를 출력합니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 지정하면 성공을 반환합니다." + +#: builtins.c:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"셸 변수와 함수의 값과 속성 설정을 해제합니다.\n" +" \n" +" 각 <이름>에 대해 관련 변수 또는 함수를 제거합니다.\n" +" \n" +" 옵션:\n" +" -f\t각 <이름>을 셸 함수로 취급합니다.\n" +" -v\t각 <이름>을 셸 변수로 취급합니다.\n" +" -n\t각 <이름>을 이름 참조자로 활용하며, 이름을 참조하는 변수가 아닌\n" +" \t\t변수 자체를 참조하는 이름 설정을 해제합니다\n" +" \n" +" 옵션을 지정하지 않으면, 변수를 우선 설정 해제하려고 하며, 실패했다면,\n" +" 함수 설정 해제를 시도합니다.\n" +" \n" +" 일부 변수는 설정을 해제할 수 없습니다. `readonly' 참조.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 지정했거나 <이름>이 읽기 전용이 아니면 성공을 반환합니다." + +#: builtins.c:1162 +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 "" +"셸 변수 속성을 내보내기 설정합니다.\n" +" \n" +" 각 <이름>은 명령을 계속 실행해나가면서 환경에 내보내기(export)처리 합니다.\n" +" <값>을 지정했다면 내보내기(export) 전, <값>을 할당합니다.\n" +" \n" +" 옵션:\n" +" -f\t셸 함수를 참조합니다\n" +" -n\t각 <이름>의 내보내기 속성을 제거합니다\n" +" -p\t환경에 내보낸 변수와 함수 목록을 나타냅니다\n" +" \n" +" `--' 인자는 이후 옵션 처리를 막습니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 설정했거나 <이름>이 올바르면 성공을 반환합니다." + +#: builtins.c:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"셸 변수를 바꾸지 못하게 합니다.\n" +" \n" +" 각 <이름>을 읽기 전용으로 만듭니다. 이 <이름>의 값은 앞으로의 할당\n" +" 동작에서 바뀌지 않습니다. <값>을 지정했다면 읽기 전용으로 지정하기 전\n" +" <값>부터 할당합니다.\n" +" \n" +" 옵션:\n" +" -a\t색인 배열 변수를 참조합니다\n" +" -A\t연관 배열 변수를 참조합니다\n" +" -f\t셸 함수를 참조합니다\n" +" -p\t-f 옵션의 지정 여부에 따라 모든 읽기 전용 변수\n" +" \t\t또는 함수를 표시합니다\n" +" \n" +" `--' 인자는 이후 옵션 처리를 중단합니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 지정했거나 <이름>이 올바르면 성공을 반환합니다." + +#: builtins.c:1203 +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 "" +"위치 매개변수를 이동합니다.\n" +" \n" +" <초기횟수> 값을 지정하지 않으면 , $<초기횟수>+1, $<초기횟수>+2,\n" +" ... $1, $2 ... 로 위치 매개변수 이름을 바꾸며, <초기횟수> 값은 1로 가정합니다.\n" +" \n" +" 종료 상태:\n" +" <횟수>가 양수거나 $# 보다 작거나 같으면 성공을 반환합니다." + +#: builtins.c:1215 builtins.c:1230 +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" +" \n" +" 현제 셸의 <파일이름>에서 명령을 읽고 실행합니다. $PATH 항목은 <파일\n" +" 이름>에 있는 디렉터리를 찾을 때 활용합니다. <인자>를 지정했다면, \n" +" <파일이름>을 실행할 때 위치 매개 변수가 따라옵니다.\n" +" \n" +" 종료 상태:\n" +" <파일이름>의 마지막 명령 실행 상태를 반환합니다. <파일이름>을\n" +" 읽지 못하면, 실패를 반환합니다." + +#: builtins.c:1246 +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 "" +"셸 실행을 잠시 멈춥니다.\n" +" \n" +" SIGCONT 시그널를 받을 때 까지 셸의 실행을 일시 정지합니다.\n" +" 강제 옵션이 없는 경우 로그인 셸은 일시 정지될 수 없습니다.\n" +" \n" +" 옵션:\n" +" -f\t로그인 셸의 경우에도 일시 정지를 강제합니다.\n" +" \n" +" 종료 상태:\n" +" 작업 컨트롤이 동작하거나 오류가 없으면 성공을 반환합니다." + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"조건식을 처리합니다.\n" +" \n" +" <표현식>의 계산 결과에 따라 0(참) 또는 1(거짓) 상태 값을\n" +" 내며 빠져나옵니다. 수식은 단항 수식 또는 이항 수식일 수 있습니다.\n" +" 단항 수식은 보통 파일 상태를 확인할 때 사용합니다. 숫자 비교 \n" +" 연산자와 마찬가지로 문자열 연산자도 있습니다.\n" +" \n" +" 테스트 동작은 인자 갯수에 따릅니다. 완전한 내용을 알아보려면,\n" +" 배시 설명서 페이지를 읽어보십시오.\n" +" \n" +" 파일 연산자:\n" +" \n" +" -a <파일> 파일이 있으면 참.\n" +" -b <파일> 블록 특수 파일이면 참.\n" +" -c <파일> 문자 특수 파일이면 참.\n" +" -d <파일> 파일이 디렉터리면 참.\n" +" -e <파일> 파일이 있으면 참.\n" +" -f <파일> 일반 파일이 있으면 참.\n" +" -g <파일> 파일이 그룹 ID 모음이면 참.\n" +" -h <파일> 파일이 심볼릭 링크면 참.\n" +" -L <파일> 파일이 심볼릭 링크면 참.\n" +" -k <파일> 파일에 `끈적이' 비트 설정이 있으면 참.\n" +" -p <파일> 파일이 명명 파이프면 참.\n" +" -r <파일> 파일을 읽을 수 잇으면 참.\n" +" -s <파일> 비아있지 않은 파일이 있으면 참.\n" +" -S <파일> 소켓 파일이면 참.\n" +" -t <파일서술자> <파일서술자>를 터미널에서 열면 참.\n" +" -u <파일> 파일이 사용자 ID 세트면 참.\n" +" -w <파일> 파일을 기록할 수 있으면 참.\n" +" -x <파일> 파일을 실행할 수 있으면 참.\n" +" -O <파일> 파일을 명백히 소유하면 참.\n" +" -G <파일> 파일을 명백시 소속 그룹에서 소유하면 참.\n" +" -N <파일> 파일을 읽은 후 수정했다면 참.\n" +" \n" +" <파일1> -nt <파일2> 파일1이 파일2보다 최신이면\n" +" (수정일자에 따라)참.\n" +" \n" +" <파일1> -ot <파일2> 파일2가 파일1보다 최신이면 참.\n" +" \n" +" <파일1> -ef <파일2> 파일1이 파일2의 하드링크라면 참.\n" +" \n" +" 문자열 연산자:\n" +" \n" +" -z <문자열> 문자열이 비었으면 참.\n" +" \n" +" -n <문자열>\n" +" <문자열> 문자열이 있으면 참.\n" +" \n" +" <문자열1> = <문자열2>\n" +" 문자열이 같으면 참.\n" +" <문자열1> != <문자열2>\n" +" 문자열이 다르면 참.\n" +" <문자열1> < <문자열2>\n" +" 문자열1이 문자열2보다 문자 순서상 먼저일 경우 참.\n" +" <문자열1> > <문자열2>\n" +" 문자열1이 문자열2보다 문자 순서상 나중일 경우 참.\n" +" \n" +" 기타 연산:\n" +" \n" +" -o <옵션> 셸 <옵션>을 사용할 수 있으면 참.\n" +" -v <변수> 셸 <변수>를 설정하면 참.\n" +" -R <변수> 셸 <변수>를 이름 참조로 설정하면 참.\n" +" \n" +" ! <표현식> 표현식이 거짓이면 참.\n" +" <표현식1> -a <표현식2> <표현식1>, <표현식2>가 모두 참이면 참.\n" +" <표현식1> -o <표현식2> <표현식1> 또는 <표현식2> 둘 중 하나가 참이면 참.\n" +" \n" +" <변수1> <연산자> <변수2> 산술 시험. <연산자>는 -eq, -ne,\n" +" -lt, -le, -gt, or -ge 중 하나.\n" +" \n" +" 산술 이진 연산자는 <인자1>과 <인자2>가 같거나, 다르거나, 작거나, 작고\n" +" 같거나, 크거나, 크고 같을 경우 참을 반환합니다\n" +" \n" +" 종료 상태:\n" +" <표현식>이 참이면 성공을 반환합니다. <표현식>이 거짓을 결과로 냈거나\n" +" 부적절한 인자를 대입하면 실패를 반환합니다." + +#: builtins.c:1344 +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 "" +"조건식을 처리합니다.\n" +" \n" +" \"test\" 내장 명령의 동의 명령입니다만, 마지막 인자는 반드시\n" +" `]' 문자로 마무리하여 열기 괄호 `['와 일치해야합니다." + +#: builtins.c:1353 +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" +" \n" +" 셸의 사용자 및 시스템 누적 시간, 하위 프로세스의 누적 시간을\n" +" 나타냅니다.\n" +" \n" +" 종료 상태:\n" +" 항상 성공." + +#: builtins.c:1365 +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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\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 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" +" <인자>는 <시그널명세>의 시그널을 셸에서 받았을 때 읽고 실행할 명령\n" +" 입니다. <인자>값이 빠지면 (그리고 단일 <시그널명세> 값을 지정하면)\n" +" 또는 값이 `-'으로 설정했다면, 각 지정 시그널을 원래 값으로 되돌립니다.\n" +" <인자>에 널 문자열이 들어갔다면, 각 <시그널명세> 값은 셸과 실행 명령\n" +" 에서 무시합니다.\n" +" \n" +" <시그널명세>가 EXIT(0) 이면 <인자>는 셸을 빠져나갈 떄 실행합니다.\n" +" <시그널명세>가 DEBUG면, 모든 단순 명령을 실행하기 전에 <인자>를\n" +" 실행 합니다. <시그널명세>가 RETURN이면, <인자>는 . 또는 원시 내장 \n" +" 명령 실행을 끝내는 셸 함수 또는 스크립트를 실행할 때마다 실행합니다.\n" +" <오류> <시그널명세> 는 -e 옵션을 넣었을 때, 셸을 빠져나오게 하는 \n" +" 명령 실패를 겪을 때마다 <인자>를 실행합니다.\n" +" \n" +" 어떤 인자도 지정하지 않으면 trap에서 각 시그널 별로 실행하는 명령\n" +" 목록을 출력합니다.\n" +" \n" +" 옵션:\n" +" -l\t시그널 이름과 관련 숫자 목록을 출력합니다\n" +" -p\t각 <시그널명세> 관련 처리 명령을 표시합니다\n" +" \n" +" 각 <시그널명세>는 에 지정한 시그널 이름이거나 시그널\n" +" 번호입니다. 시그널 이름은 대소문자 무관하며, SIG 접두사는 선택사항\n" +" 입니다. 시그널은 \"kill -signal $$\" 처럼 셸에 보낼 수 있습니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 <시그널명세> 또는 옵션을 지정했다면 성공을 반환합니다." + +#: builtins.c:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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" +" \n" +" 각 <이름>에 대해 명령 이름으로 활용할 때 어떻게 해석하는지\n" +" 나타냅니다.\n" +" \n" +" 옵션:\n" +" -a\t<이름>이 들어간 모든 실행 파일 보관 위치를 나타냅니다.\n" +" \t\t별칭, 내장명령, 함수가 해당하며, `-p' 옵션은 사용하지\n" +" \t\t 말아야합니다.\n" +" -f\t셸 함수 찾기 동작을 멈춥니다\n" +" -P\t각 <이름>별로 별칭, 내장 명령, 함수로 해도 PATH 검색을 강제\n" +" \t\t시행하며, 실행 파일 디스크 이름을 반환합니다\n" +" -p\t실행할 디스크 파일 이름을 반환하거나 , `type -t <이름>'을\n" +" \t\t`file'로 반환하지 않으면 아무것도 반환하지 않습니다.\n" +" -t\t<이름>이 별칭, 셸 예약 단어, 셸 함수, 셸 내장 명령, 디스크 파일\n" +" \t\t 또는 없음 여부에 따라 `alias', `keyword', `function', `builtin',\n" +" \t\t `file', `' 중 하나를 반환합니다.\n" +" \n" +" 인자:\n" +" <이름>\t해석할 명령 이름.\n" +" \n" +" 종료 상태:\n" +" 모든 <이름>을 찾으면 성공을 반환, 그렇지 않으면 실패를 반환합니다." + +#: builtins.c:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"셸 자원 제한을 조정합니다.\n" +" \n" +" 셸과 생성 프로세스를 제어하는 시스템에서 사용할 수 있는 자원의\n" +" 제어 전반을 제공합니다.\n" +" \n" +" 옵션:\n" +" -S\t`soft' 자원 제한을 활용합니다\n" +" -H\t`hard' 자원 제한을 활용합니다\n" +" -a\t현재 모든 제한 현황을 보고합니다\n" +" -b\t소켓 버퍼 킂기\n" +" -c\t생성 핵심 파일 최대 크기\n" +" -d\t프로세스 데이터 세그먼트 최대 크기\n" +" -e\t최대 스케쥴링 우선순위 (`nice')\n" +" -f\t셸과 하위 프로세스에서 작성한 파일의 최대 크기\n" +" -i\t최대 대기 시그널 수\n" +" -k\t프로세스에 할당한 커널 큐 최대 수\n" +" -l\t메모리에서 잠글 프로세스 최대 수\n" +" -m\t최대 점유 설정 크기\n" +" -n\t파일 서술자 개방 최대 갯수\n" +" -p\t파이프 버퍼 크기\n" +" -q\tPOSIX 메시지 큐 최대 바이트 단위 크기\n" +" -r\t최대 실시간 스케쥴링 우선순위\n" +" -s\t최대 스택 크기\n" +" -t\t초단위 최대 CPU 시간\n" +" -u\t최대 사용자 프로세스 수\n" +" -v\t가상 메모리 크기\n" +" -x\t최대 파일 잠금 수\n" +" -P\t가상 터미널 최대 갯수\n" +" -R\t블로킹 전 실시간 프로세스 최대 실행 가능 시간\n" +" -T\t최대 스레드 수\n" +" \n" +" 모든 플랫폼에서 모든 옵션을 활용할 수 있는건 아닙니다.\n" +" \n" +" <한계>값이 주어지면, 지정 자원의 새 값이 됩니다. `soft', `hard', \n" +" `unlimited' <한계> 값은 현재 soft 한계, hard 한계, 한계 없음을 각각\n" +" 의미합니다. 아니면, 지정 자원의 현재 값을 출력합니다. 옵션을 지정\n" +" 하지 않으면, -f 옵션을 설정한 걸로 간주합니다.\n" +" \n" +" 초 단위를 취급하는 -t 옵션과 512 바이트 단위로 증가하는 -p 옵션,\n" +" 그리고 크기를 갖지 않는 프로세스 수를 취급하는 -u 옵션을 제외하고,\n" +" 1024 바이트씩 값을 증가합니다.\n" +" \n" +" 종료 상태:\n" +" 옵션을 올바르게 설정했거나 오류가 없다면 성공을 반환합니다." + +#: builtins.c:1483 +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" +" \n" +" 사용자 파일 생성 마스크를 <모드>로 설정합니다. <모드>를 생략하면,\n" +" 마스크 현재 값을 출력합니다.\n" +" \n" +" <모드>를 숫자로 시작하면, 8진수로 해석합니다. 그렇지 않으면 chmod(1)\n" +" 에서 인식하는 심볼릭 모드 문자열이 됩니다.\n" +" \n" +" 웁션:\n" +" -p\t<모드>를 생략하면 입력으로 재활용할 형식으로 출력합니다\n" +" -S\t출력 심볼릭을 만듭니다. 그렇지 않으면 8진수로 출력합니다\n" +" \n" +" 종료 상태:\n" +" <모드>가 올바르거나 옵션을 적절하게 설정하면 성공을 반환합니다." + +#: builtins.c:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"작업 완료를 기다리며 종료 상태를 반환합니다.\n" +" \n" +" 프로세스 ID 또는 작업 명세가 될 ID로 식별하는 각 프로세스를 \n" +" 기다리며, 중단 상태를 보고합니다. ID가 주어지지 않으면 현재의\n" +" 모든 활성 하위 프로세스를 기다리며, 반환 상태 값은 0입니다.\n" +" ID가 작업 명세라면 작업 파이프라인의 모든 프로세스를 기다립니다.\n" +" \n" +" -n 옵션을 지정하면 ID 목록의 단일 작업을 기다리며, ID를 지정하지\n" +" 않으면, 다음 작업 완료시까지 기다리고 해당 작업의 종료 상태를 반환\n" +" 합니다.\n" +" \n" +" -p 옵션을 지정하면 종료 상태를 반환할 작업의 프로세스 또는 작업\n" +" 식별자룰 옵션 인자가 명명한 <변수>에 할당합니다. 변수는 할당 전\n" +" 설정을 해제할 수 있습니다. 보통 -n 옵션을 지정할 때만 쓸만합니다.\n" +" \n" +" -f 옵션을 지정하고 작업 컨트롤을 사용하면 지정 ID의 상태가 바뀌기를\n" +" 기다리기보다는, 중단 시기를 기다립니다.\n" +" \n" +" 종료 상태:\n" +" 최종 ID의 상태를 반환합니다. ID가 잘못되었거나 잘못된 옵션을 지정\n" +" 했다든지, -n 옵션을 지정하고 셸에서 하위 프로세스를 기다리지 않는\n" +" 다면 실패를 반환합니다." + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." +msgstr "" +"프로세스 처리 완료를 기다리고 종료 상태를 반환합니다.\n" +" \n" +" 지정 의 각 프로세스를 기다리며, 종료 상태를 보고합니다.\n" +" 를 지정하지 않으면 모든 현재 하위 활성 프로세스를 기다리며,\n" +" 반환 상태는 0이 됩니다. 는 프로세스 ID여야 합니다.\n" +" \n" +" 종료 상태:\n" +" 최종 PID의 상태를 반환합니다. PID 값이 잘못되었거나,\n" +" 부적절한 옵션을 지정하면 실패를 반환합니다." + +#: builtins.c:1549 +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 "" +"목록 각 구성 요소의 명령을 실행합니다.\n" +" \n" +" `for' 반복문은 항목 목록 각 구성요소의 명령 목록을 실행합니다.\n" +" `in <단어> ...;' 식으로 나타나지 않으면, `in $@\"'으로 가정합니다.\n" +" <단어>의 각 요소에 대해 <이름>을 해당 요소에 설정하고,\n" +" <명령>을 실행합니다.\n" +" \n" +" 종료 상태:\n" +" 최종 명령 실행 상태를 반환합니다." + +#: builtins.c:1563 +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" +" \n" +" 다음과 동일합니다\n" +" \t(( <표현식1> ))\n" +" \twhile (( <표현식2> )); do\n" +" \t\t <명령>\n" +" \t\t (( 표현식3 ))\n" +" \tdone\n" +" <표현식1>, <표현식2>, <표현식3> 은 산술 수식입니다. 어떤 수식이든 생략하면\n" +" 1 값을 계산한걸로 간주합니다.\n" +" \n" +" 종료 상태:\n" +" 최종 명령 실행 상태를 반환합니다." + +#: builtins.c:1581 +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" +" <단어>는 단어 목록을 만들 때 확장합니다. 확장 단어는 표준 오류에\n" +" 출력하며, 출력행에 숫자가 붙습니다. 각 `in <단어>'가 없다면 `in \"$@\"'\n" +" 를 고려합니다. 그 다음 PS3 프롬프트를 나타내고 표준 입력에서 \n" +" 읽습니다. 표시 단어 중 하나의 숫자로 행을 구성했다면, <이름>\n" +" 을 해당 단어에 설정합니다. 행이 비어있으면, <단어>와 프롬프트는\n" +" 다시 나타납니다. EOF (파일 끝)을 읽으면, 명령 실행이 끝납니다.\n" +" 다른 값을 읽으면 <이름>을 null로 설정할 수도 있습니다. 읽은 행은\n" +" REPLY 변수에 저장합니다. <명령>은 break 명령을 실행하기 전까지\n" +" 각 선택 때마다 실행합니다.\n" +" \n" +" 종료 상태:\n" +" 마지막 명령 실행 상태를 반환합니다." + +#: builtins.c:1602 +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" +" 걸린 실제 시간, 사용자 CPU 시간, 시스템 CPU 시간 요약 내용을 출력합니다.\n" +" \n" +" 옵션:\n" +" -p\t이식성이 있는 POSIX 형식의 타이밍 요약 내용을 출력합니다.\n" +" \n" +" TIMEFORMAT 변수의 값은 출력 형식에 활용합니다.\n" +" \n" +" 종료 상태:\n" +" <파이프라인>의 반환 상태가 곧 반환 상태 입니다." + +#: builtins.c:1619 +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" +" \n" +" <패턴>에 일치하는 <단어> 기반으로 <명령>을 별도로 실행합니다.\n" +" `|' 문자로 여러 패턴을 나눌 수 있습니다.\n" +" \n" +" 종료 상태:\n" +" 최종 명령 실행 상태를 반환합니다." + +#: builtins.c:1631 +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 "" +"조건 기반으로 명령을 실행합니다.\n" +" \n" +" `if <명령>' 목록을 실행합니다. 종료 상태값이 0이면, `then <명령>'\n" +" 목록도 실행합니다. 아니면, `elif <명령>' 목록도 실행하며, 종료 상태\n" +" 값이 0이면 관련 `then <명령>' 목록을 실행하여 if 명령의 처리가 끝\n" +" 납니다. 위 과정에 만족하지 않으면 `else <명령>' 목록이 있을 경우\n" +" 실행합니다. 전체 명령 구성의 종료 상태 값은 최종 명령 실행 종료\n" +" 상태값이며, 또는 어떤 조건에서도 참이 아닌 경우 0이 됩니다.\n" +" \n" +" 종료 상태:\n" +" 최종 명령 실행 상태 값을 반환합니다." + +#: builtins.c:1648 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"테스트에 성공하는 동안 명령을 실행합니다.\n" +" \n" +" <명령>의 최종 명령 종료 상태가 0인 동안 <명령-2>로 확장 실행합니다.\n" +" \n" +" 종료 상태:\n" +" 최종 명령 상태를 반환합니다." + +#: builtins.c:1660 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"테스트에 실패하는 동안 명령을 실행합니다.\n" +" \n" +" <명령>의 최종 명령 종료 상태가 0이 아니면 <명령-2>로 확장 실행합니다.\n" +" \n" +" 종료 상태:\n" +" 최종 명령 실행 상태를 반환합니다." + +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" +"<이름>으로 병행 프로세스를 만듭니다.\n" +" \n" +" <명령>을 비동기 실행합니다. 명령의 표준 출력과 표준 입력은 실행하는 \n" +" 셸에서 배열 변수 <이름>의 색인 0번과 1번에 할당한 파일 서술자와\n" +" 파이프로 연결합니다. 기본 <이름>은 \"COPROC\" 입니다.\n" +" \n" +" 종료 상태:\n" +" coproc 명령이 종료 상태 0을 반환합니다." + +#: builtins.c:1686 +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 "" +"셸 함수를 정의합니다.\n" +" \n" +" <이름>을 가진 셸 함수를 만듭니다. 단순 명령으로 실행할 경우, <이름>은\n" +" 셸 컨텍스트를 호출할 때 <명령>을 실행합니다. <이름>을 실행하면, 함수에\n" +" 전달하는 인자는 $1,...$N 이며, 함수 이름은 $FUNCNAME이 됩니다.\n" +" \n" +" 종료 상태:\n" +" <이름>이 읽기 전용이 아니라면 참을 반환합니다." + +#: builtins.c:1700 +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" +" \n" +" 여러 명령을 그룹 하나로 묶어 실행합니다. 명령 전체를 방향재지정\n" +" 처리하는 방법 중 하나입니다.\n" +" \n" +" 종료 상태:\n" +" 최종 명령 실행 상태를 반환합니다." + +#: builtins.c:1712 +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 "" +"포그라운드의 작업을 재개합니다.\n" +" \n" +" `fg' 명령의 JOB_SPEC 인자와 동일합니다. 멈춘 작업 또는 백그라운드\n" +" 작업을 재개합니다. JOB_SPEC은 작업 이름 또는 작업 번호를 지정할 수\n" +" 있습니다. JOB_SPEC 다음에 `&'를 입력하여 백그라운드에서 실행하게\n" +" 합니다. `bg' 인자로 지정할 때처럼 작업 명세를 지정합니다.\n" +" \n" +" 종료 상태:\n" +" 재개한 작업의 상태를 반환합니다." + +#: builtins.c:1727 +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" +" \n" +" <표현식>은 산술 연산 규칙에 따라 실행합니다. `let \"<표현식>\"'과 동일합니다.\n" +" \n" +" 종료 상태:\n" +" <표현식> 결과가 0이면 1을 반환하고 그렇지 않으면 0을 반환합니다." + +#: builtins.c:1739 +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 "" +"조건 명령을 수행합니다.\n" +" \n" +" <표현식>의 조건문 수행의 처리 결과에 따라 상태값을 0 또는 1로 반환합니다.\n" +" 표현식은 `test' 내장 명령에서 활용하는 동일한 규칙에 따라 작성하며,\n" +" 다음 연산자로 결합합니다:\n" +" ( <표현식> )\t<표현식>의 값을 반환\n" +" ! <표현식>\t\t <표현식> 결과가 거짓이면 참을, 그렇지 않으면 거짓을 반환\n" +" <표현식1> && <표현식2>\t\t<표현식1>과 <표현식2>가 모두 참이면 참을\n" +" \t\t\t\t그렇지 않으면 거짓을 반환\n" +" <표현식1> || <표현식2>\t\t<표현식1> 또는 <표현식2> 둘 중 하나가 참이면 참을\n" +" \t\t\t\t그렇지 않으면 거짓을 반환\n" +" \n" +" `=='과 `!=' 연산자를 사용한다면 우항의 문자열은 패턴으로 활용하며, 패턴 검사를\n" +" 수행합니다. `=~' 연산자를 사용할 때는 우항의 문자열은 정규표현식으로 간주합니다.\n" +" \n" +" && 연산자와 || 연산자는 <표현식1>이 표현식 값을 내는데 충분하다면 <표현식2>를\n" +" 처리하지는 않습니다.\n" +" \n" +" 종료 상태:\n" +" <표현식> 값에 따라 0 또는 1을 반환합니다." + +#: builtins.c:1765 +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" +" \n" +" BASH_VERSION\t배시 버전 정보입니다.\n" +" CDPATH\t`cd' 인자처럼 디렉터리 검색에 주어지는 콜론으로 구분한\n" +" \t\t디렉터리 목록입니다.\n" +" GLOBIGNORE\t경로 이름을 확장하여 무시할 콜론 이름으로 구분한 파일 이름\n" +" \t\t특징 패턴 목록입니다.\n" +" HISTFILE\t명령을 기록에 저장하는 파일 이름입니다.\n" +" HISTFILESIZE\t파일에 넣을 수 있는 최대 줄 수 입니다.\n" +" HISTSIZE\t동작 중인 셸에서 접근할 수 있는 최대 기록 줄 수 입니다.\n" +" HOME\t로그인 후 접근하는 완전한 경로 이름입니다.\n" +" HOSTNAME\t현재 호스트 이름입니다.\n" +" HOSTTYPE\t이 배시 버전이 실행하고 있는 시스템의 CPU 형식입니다.\n" +" IGNOREEOF\n" +"EOF 문자 입력을 유일한 입력으로 받는 셸의 동작을\n" +" \t\t제어합니다. 설정하면, 이 변수의 값은 셸을 나가기\n" +" \t\t전 빈 줄에 한줄로 나타낼 EOF 문자 수 입니다 (기본 10개).\n" +" \t\t설정을 해제하면, EOF는 입력 끝을 나타냅니다.\n" +" MACHTYPE\t현재 배시를 실행하고 있는 시스템을 설명하는 문자열입니다.\n" +" MAILCHECK\t배시에서 새 메일을 확인하는 초단위 빈도 시간입니다.\n" +" MAILPATH\t배시에서 새 메일을 확인할 콜론 구분 파일 목록입니다.\n" +" OSTYPE\t이 배시 버전을 실행하고 있는 유닉스 버전입니다.\n" +" PATH\t명령을 찾을 때 검색할 콜론 구분 디렉터리 목록입니다.\n" +" PROMPT_COMMAND\t각 기본 프롬프트를 출력하기 전에 실행할\n" +" \t\t명령입니다.\n" +" PS1\t\t기본 프롬프트 문자열입니다.\n" +" PS2\t\t2차 프롬프트 문자열입니다.\n" +" PWD\t\t현재 디렉터리의 전체 경로 이름 입니다.\n" +" SHELLOPTS\t콜론으로 구분한 활성 셸 옵션 목록입니다.\n" +" TERM\t현재 터미널 형식 이름입니다.\n" +" TIMEFORMAT\t`time' 역방향 단어로 표시하는 시간 통계의\n" +" \t\t출력 형식입니다.\n" +" <자동_재개>\tnull 값이 아니라면 자체에서 나타내는 명령행을\n" +" \t\t먼저 나타내고, 현재 멈춘 작업 목록의 첫번째 확인 요소임을\n" +" \t\t의미합니다. 이 상태가 나타나면 작업을 포 그라운드에서\n" +" \t\t실행헙니다. `exact' 값은 명령 단어가 멈춘 작업 목록의\n" +" \t\t명령과 정확히 일치해야 함을 의미합니다.\n" +" \t\t`substring' 값은 명령 단어가 작업의 부분 문자열과\n" +" \t\t일치해야 하는 의미를 담고 있습니다. 다른 값은\n" +" \t\t명령이 멈춘 작업의 접두어여야 하는 의미를 담고 있습니다.\n" +" <기록 문자>\t기록 확장과 빠른 대체를 제어하는 문자입니다.\n" +" \t\t첫번째는 기록 제거 문자로, 보통 `!'을 활용합니다.\n" +" \t\t두번째는 보통 `^'으로 표기하는 `빠른 대체문자' 입니다.\n" +" \t\t세번째는 `기록 주석' 문자로 보통 `#'으로 표기합니다.\n" +" HISTIGNORE\t어떤 명령을 기록 목록에 저장해야 하는지 판단할 때\n" +" \t\t활용하는 콜론 구분 패턴 목록입니다.\n" + +#: builtins.c:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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" +" -n\t스택에 디렉터리를 추가할 때 디렉터리 일반 변경 동작을\n" +" \t\t막은 상태에서, 스택만 다루게 합니다.\n" +" \n" +" 인자:\n" +" +N\t`dirs' 내장 명령에 나타난 항목을 0부터 시작해서 왼쪽부터\n" +" \t\t세어 N번째 항목을 스택의 최상단에 오도록 회전합니다.\n" +" \n" +" -N\t`dirs' 내장 명령에 나타난 항목을 0부터 시작해서 오른쪽부터\n" +" \t\t세어 N번째 항목을 스택의 최상단에 오도록 회전합니다.\n" +" \n" +" <디렉터리>\t<디렉터리>를 스택 상단에 추가하여 새 현재 작업\n" +" \t\t디렉터리로 지정합니다.\n" +" \n" +" `dirs' 내장 명령은 디렉터리 스택을 표시합니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 인자를 지정하고 디렉터리 변경에 성공하면 성공을 반환\n" +" 합니다." + +#: builtins.c:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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\t스택에서 디렉터리를 제거할 때 디렉터리 일반 변경동작을\n" +" \t\t막아 스택만 처리하게합니다.\n" +" \n" +" 인자:\n" +" +N\t0부터 시작해서 `dirs' 내장 명령에 나타난 항목을 왼쪽부터\n" +" \t\t세어 N번째 항목을 제거합니다. 예를 들어 `popd +0' 명령은\n" +" \t\t처음 디렉터리를 `popd +1' 명령은 두번째 디렉터리를\n" +" \t\t제거합니다.\n" +" -N\t0부터 시작해서 `dirs' 내장 명령에 나타난 항목을 오른쪽부터\n" +" \t\t세어 N번째 항목을 제거합니다. 예를 들어 `popd -0' 명령은\n" +" \t\t마지막 디렉터리를 `popd -1' 명령은 마지막에서 두번째의\n" +" \t\t디렉터리를 제거합니다.\n" +" \n" +" `dirs' 내장 명령은 디렉터리 스택을 보여줍니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 인자를 지정했거나 디렉터리를 제대로 이동했다면\n" +" 성공을 반환합니다.전" + +#: builtins.c:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"디렉터리 스택을 표시합니다.\n" +" \n" +" 현재 기억한 디렉터리 목록을 보여줍니다. 디렉터리는\n" +" `pushd' 명령으로 목록에 경로를 저장할 수 있고, 'popd' \n" +" 명령으로 거슬러 올라갈 수 있습니다.\n" +" \n" +" 옵션:\n" +" -c\t원소를 전부 삭제함으로써 디렉터리 스택을 초기화합니다\n" +" -l\t홈 디렉터리까지 ~로 축약된 상대경로를 표시하지 않습니다\n" +" -p\t한 줄에 하나씩 디렉터리 스택을 표시합니다\n" +" -v\t한 줄에 하나씩 스택의 위치 및 디렉터리 스택을 표시합니다\n" +" \n" +" 인자:\n" +" +N\t인자 없이 실행될 때 보여지는 목록의 왼쪽부터 N번째 항목을 보여줍니다.\n" +" \t세는 수는 0부터 시작합니다.\n" +" \n" +" -N\t인자 없이 실행될 때 보여지는 목록의 오른쪽부터 N번째 항목을 보여줍니다.\n" +"\t세는 수는 0부터 시작합니다.\n" +" 종료 상태:\n" +" 부적절한 옵션이 주어지거나 오류가 발생하지 않는다면 성공을 반환합니다." + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"셸 옵션을 설정 또는 해제합니다.\n" +" \n" +" <옵션이름> 셸 옵션의 설정을 바꿉니다. 어떤 옵션 인자도 지정하지 않으면\n" +" <옵션이름>에 지정한 항목을 보여주거나, <옵션이름>이 없을 경우 모든\n" +" 셸 옵션을 보여주든지 설정 여부를 함께 나타냅니다.\n" +" \n" +" 옵션:\n" +" -o\t`set -o'로 지정한 <옵션이름>으로 제한합니다\n" +" -p\t각 셸 옵션과 상태를 출력합니다\n" +" -q\t출력을 끕니다\n" +" -s\t각 <옵션이름>을 사용합니다 (설정)\n" +" -u\t각 <옵션이름>을 사용하지 않습니다 (설정해제)\n" +" \n" +" 종료 상태:\n" +" <옵션이름>을 활성화했다면 성공을 반환합니다. 부적절한 옵션을\n" +" 지정했거나 <옵션이름>을 사용하지 않으면 실패를 반환합니다." + +#: builtins.c:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or assignment\n" +" error occurs." +msgstr "" +"<형식>에 따라 <인자>를 구성하고 출력합니다.\n" +" \n" +" 옵션:\n" +" -v <변수>\t표준 출력에 나타내는 대신 셸 <변수>에 할당합니다.\n" +" \n" +" <형식>은 세가지 형식의 객체가 들어간 문자열입니다. 표준 출력에 그냥\n" +" 복사하는 일반 문자, 표준 출력에 변환하여 복사하는 문자 이스케이핑 시퀀스,\n" +" 그리고 다음 뒤따라오는 인자를 형식에 맞춰 출력하는 형식 지정자가 바로\n" +" 세가지 형식 입니다.\n" +" \n" +" 게다가 printf(1)에 표준 형식 지정자에서 printf는 다음과 같이 해석합니다:\n" +" \n" +" %b\t관련 인자의 백슬래시 이스케이프 시퀀스를 확장합니다\n" +" %q\t셸 입력으로 다시 사용할 수 있도록 변수를 따옴표 처리합니다\n" +" %Q\t%q와 비슷하지만, 따옴표 처리하기 전의 인자에 정빌도를 적용합니다\n" +" %(fmt)T\tstrftime(3)의 형식 문자열로 <형식>을 사용하도록 날짜-시간\n" +" \t 문자열을 출력합니다\n" +" \n" +" 형식은 모든 인자에 대해 필요한대로 재활용합니다. 필요한 형식보다\n" +" 적은 인자를 지정했다면, 추가 형식 지정 부분에 대해 적당하게 널 문자열\n" +" 이 들어간 것처럼 처리해줍니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 설정했거나 기록, 할당 오류가 나타나지 않으면 성공을\n" +" 반환합니다." + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"readline에서 인자를 어떻게 완성 처리할 지 지정합니다.\n" +" \n" +" 각 <이름>에 대해 인자를 어떻게 완성할 지 지정합니다. 옵션을 지정하지\n" +" 않으면, 입력할 때 다시 활용할 수 있게 하는 방식으로 기존 완성 명세를\n" +" 출력합니다.\n" +" \n" +" 옵션:\n" +" -p\t기존 완성 명세를 재사용 형식으로 출력합니다\n" +" -r\t각 <이름>별 완성 명세를 제거하거나, <이름>을 지정하지 않았다면\n" +" \t\t모든 완성 명세를 제거합니다\n" +" -D\t어떤 개별 완성 명세 없이 명령에 대해 기본 완성 명세와 동작을\n" +" \t\t적용합니다\n" +" -E\t\"빈\" 명령에 대해 완성 명세와 동작을 적용합니다 -- 빈 줄 상태에서\n" +" \t\t완성 동작을 시도합니다\n" +" -I\t초기 단어(보통 명령) 완성 명세와 동작을 적용합니다\n" +" \n" +" 완성 동작을 시도할 때 상단에 대문자 옵션 순서대로 동작을 적용합니다. 여러\n" +" 옵션을 지정하면 -D 옵션은 -E 옵션보다 우선하며, 두 옵션은 -I 옵션보다\n" +" 우선합니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 지정했거나 오류가 발생하지 않으면 성공을 반환합니다." + +#: builtins.c:2004 +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" +" 추가 <단어> 인자를 지정하면, <단어>에 일치하는 항목을 만듭니다.\n" +" \n" +" 종료 상태:\n" +" 적절한 옵션을 지정했거나 오류가 없으면 성공을 반환합니다." + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"자동 완성 옵션을 수정하거나 표시합니다.\n" +"\n" +" 각 <이름> 별로 자동 완성 옵션을 수정하거나, 지정 <이름>이 없다면,\n" +" 현재 실행하는 명령의 자동완성 옵션을 수정합니다. 주어진 <옵션>이 없다면\n" +" 각 <이름> 별 자동 완성 옵션을 출력하거나 현재 자동 완성 명세를 출력합니다.\n" +" \n" +" 옵션:\n" +" \t-o <옵션>\t각 <이름>별 <옵션>을 설정합니다\n" +" \t-D\t\t\"기본\" 명령 자동 완성 옵션을 바꿉니다\n" +" \t-E\t\t\"빈\" 명령 자동 완성 옵션을 바꿉니다\n" +" \t-I\t\t초기 단어의 자동 완성 옵션을 바꿉니다\n" +" \n" +" 지정 옵션을 끄는 `-o' 대신 `+o'를 사용하십시오.\n" +" \n" +" 인자:\n" +" \n" +" 각 <이름>은 `complete' 내장 명령으로 앞서 지정해야 하는 자동 완성\n" +" 명세 명령을 참조합니다. <이름>이 없다면 현재 자동 완성 규칙을 생성하는\n" +" compopt를 호출해야 하며, 현재 실행하는 자동 완성 생성자의 옵션도\n" +" 역시 마찬가지로 수정해야합니다.\n" +" \n" +" 종료 상태:\n" +" 부적절한 옵션을 지정하지 않았거나 <이름>에 자동 완성 명세를 지정했다면\n" +" 성공을 반환합니다." + +#: builtins.c:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"표준 입력을 읽어 색인 배열 변수에 대입합니다.\n" +" \n" +" 표준 입력에서 행을 읽어 색인 <배열> 변수에 넣거나 -u 옵션을 지정하여\n" +" <파일서술자>에서 행을 읽어 색인 <배열> 변수에 넣습니다. <매핑파일>\n" +" 변수는 기본적으로 <배열> 취급합니다.\n" +" \n" +" 옵션:\n" +" -d <구분자>\t개행 문자 대신 <구분자>로 행을 끊습니다.\n" +" -n <갯수>\t\t<갯수>만큼 행을 읽습니다. <갯수> 값이 0이면\n" +" \t\t 모든 행을 복사합니다.\n" +" -O <시작>\t\t<시작> 인덱스에 <배열> 할당을 시작합니다.\n" +" \t\t기본 인덱스는 0 입니다.\n" +" -s <갯수>\t\t처음 <갯수>만큼 읽은 행을 무시합니다\n" +" -t\t\t읽은 각 행 끝에 뒤다라오는 <구분자>를 제거합니다\n" +" \t\t(기본 값은 개행 문자)\n" +" -u <파일서술자>\t표준 입력 대신 <파일서술자>에서 행을 읽습니다\n" +" -C <콜백>\t\t<양자> 행을 읽을 때마다 실행할 <콜백> 입니다\n" +" -c <양자>\t\t<콜백>을 실행할 때마다 읽을 행 갯수를 지정합니다\n" +" \n" +" 인자:\n" +" <배열>\t파일 데이터에 활용할 배열 변수 이름\n" +" \n" +" -c 옵션 없이 -C를 지정하면, 기본 양자 수는 5000입니다. <콜백>을\n" +" 실행하면, 다음 배열 요소의 색인 번호를 할당하고, 해당 요소에 할당할 행을\n" +" 추가 인자로 지정합니다.\n" +" \n" +" <시작> 색인 번호를 제대로 지정하지 않으면, mapfile에서 <배열>에\n" +" 할당하기 전에 <배열>값을 삭제합니다.\n" +" \n" +" 종료 상태:\n" +" 부적절한 옵션을 주지 않았거나 <배열>을 읽기 전용으로 두지 않았거나\n" +" 색인 배열로 올바르게 지정했다면 성공을 반환합니다." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"파일에서 줄을 읽어 배열 변수에 넣습니다.\n" +" \n" +" `mapfile'의 동의어." diff --git a/po/lt.gmo b/po/lt.gmo index a3be0fa..59b4292 100644 Binary files a/po/lt.gmo and b/po/lt.gmo differ diff --git a/po/lt.po b/po/lt.po index d0000ec..6bcc068 100644 --- a/po/lt.po +++ b/po/lt.po @@ -7,293 +7,338 @@ msgid "" msgstr "" "Project-Id-Version: bash-4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-30 08:25-0500\n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" "PO-Revision-Date: 2009-03-25 16:49+0200\n" "Last-Translator: Gintautas Miliauskas \n" "Language-Team: Lithuanian \n" +"Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\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" +"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 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "blogas masyvo indeksas" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" +msgid "%s: removing nameref attribute" msgstr "" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s: netaisyklingas veiksmo pavadinimas" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: nepavyko priskirti prie neskaitinio indekso" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" msgstr "" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: nepavyko sukurti: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "bash_execute_unix_command: nepavyko rasti keymapo komandai" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: pirmas ne tarpo simbolis nėra „\"“" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "nėra uždarančiojo „%c“ %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: trūksta dvitaškio skirtuko" -#: builtins/alias.def:132 +#: bashline.c:4733 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: nepavyko atjungti (unbind)" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 #, fuzzy, c-format msgid "`%s': invalid alias name" msgstr "„%s“: netaisyklingas keymap'o pavadinimas" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "eilutės redagavimas neįgalintas" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "„%s“: netaisyklingas keymap'o pavadinimas" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "„%s“: nežinomas funkcijos pavadinimas" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s nėra priskirtas jokiam klavišui.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s gali būti iškviestas su " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nepavyko atjungti (unbind)" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" msgstr "prasminga tik „for“, „while“ arba „until“ cikle" -#: builtins/caller.def:133 +#: builtins/caller.def:136 #, 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" +" 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." 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/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME nenustatytas" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "per daug argumentų" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "steko viršūnėje esančiu." + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD nenustatytas" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "eilutė %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "įspėjimas: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: parametrui reikia argumento" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: reikia skaitinio argumento" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: nerasta" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: negalimas parametras" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: netaisyklingas parametro vardas" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "`%s': netaisyklingas identifikatorius" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "netaisyklingas aštuonetainis skaičius" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "netaisyklingas šešioliktainis skaičius" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "netaisyklingas skaičius" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: netaisyklinga signalo specifikacija" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: kintamasis tik skaitymui" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: nepavyko ištrinti" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s išėjo už ribų" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argumentas" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s už ribų" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: nėra tokio darbo" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: nėra darbų valdymo" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "nėra darbų valdymo" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: apribota" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "apribota" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: ne vidinė aplinkos komanda" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "rašymo klaida: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: dviprasmis darbo aprašymas" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nepavyko ištrinti: %s tik skaitymui" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nepavyko ištrinti" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: netaisyklingas veiksmo pavadinimas" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: nėra baigimo specifikacijos" @@ -306,121 +351,156 @@ msgstr "įspėjimas: parametras -F gali neveikti taip, kaip tikitės" 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "galima naudoti tik funkcijoje" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" msgstr "negalima naudoti „-f“ funkcijoms kurti" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: funkcija tik skaitymui" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "" + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" msgstr "" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dinaminis įkrovimas negalimas" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "nepavyko atverti bendrojo objekto %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" msgstr "nepavyko rasti %s bendrajame objekte %s: %s" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nedinamiškai įkrauta" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: nedinamiškai įkrauta" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: aplankas" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: ne paprastas failas" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: negalima vykdyti dvejetainių failų" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: nepavyko paleisti: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "ne prisijungimo aplinka: naudokite „exit“" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Yra sustabdytų darbų.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Yra veikiančių darbų.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "komandų nerasta" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "istorijos specifikacija" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "darbas %d pradėtas be darbų valdymo" @@ -435,29 +515,35 @@ msgstr "%s: neleistinas parametras -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: parametrui reikia argumento -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "maiša išjungta" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: maišos lentelė tuščia\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, fuzzy, c-format msgid "hits\tcommand\n" msgstr "paskutinė komanda: %s\n" -#: builtins/help.def:130 -#, fuzzy, c-format +#: builtins/help.def:133 +#, fuzzy 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 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." @@ -465,12 +551,12 @@ msgstr "" "nėra žinyno temų, atitinkančių „%s“. Bandykite „help help“, „man -k %s“ arba " "„info %s“." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: nepavyko atverti: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -491,15 +577,21 @@ msgstr "" "Žvaigždutė (*) prie vardo reiškia, kad komanda išjungta.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "negalima naudoti daugiau negu vieno parametro iš -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "istorijos pozicija" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: netaisyklingas parametro vardas" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: istorijos išskleidimas nesėkmingas" @@ -513,95 +605,115 @@ msgstr "%s: istorijos išskleidimas nesėkmingas" msgid "no other options allowed with `-x'" msgstr "su „-x“ neleidžiama naudoti kitų parametrų" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, 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 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Nežinoma klaida" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "tikėtasi išraiškos" -#: builtins/mapfile.def:165 +#: builtins/mapfile.def:180 #, fuzzy, c-format msgid "%s: not an indexed array" msgstr "%s: ne masyvo kintamasis" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: netaisyklinga failo deskriptoriaus specifikacija" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: netaisyklingas failo deskriptorius: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, fuzzy, c-format msgid "%s: invalid line count" msgstr "%s: nesamas parametras" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, fuzzy, c-format msgid "%s: invalid array origin" msgstr "%s: nesamas parametras" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, fuzzy, c-format msgid "%s: invalid callback quantum" msgstr "%s: netaisyklingas veiksmo pavadinimas" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 #, fuzzy msgid "empty array variable name" msgstr "%s: ne masyvo kintamasis" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "„%s“: trūksta formato simbolio" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, fuzzy, c-format +msgid "`%c': invalid time format specification" +msgstr "%s: klaidinga laiko ribos (timeout) specifikacija" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "„%c“: netaisyklingas formato simbolis" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "įspėjimas: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "trūksta šešioliktainio skaitmens išraiškoje \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, fuzzy, c-format +msgid "missing unicode digit for \\%c" +msgstr "trūksta šešioliktainio skaitmens išraiškoje \\x" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "nėra kito aplanko" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: netaisyklingas limito argumentas" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 #, fuzzy msgid "directory stack index" msgstr "rekursijos steko atvirkštinis perpildymas" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -625,7 +737,7 @@ msgid "" "\tdirs when invoked without options, starting with zero." msgstr "" -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -650,7 +762,7 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -671,53 +783,48 @@ msgid "" " The `dirs' builtin displays the directory stack." msgstr "" -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: klaidinga laiko ribos (timeout) specifikacija" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "skaitymo klaida: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "galima grįžti (return) tik iš funkcijos ar scenarijaus" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: ne masyvo kintamasis" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: ne funkcija" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: nepavyko ištrinti" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "postūmių skaičius" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "negalima aplinkos nuostatos vienu metu įjungti ir išjungti" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: netaisyklingas aplinkos nuostatos pavadinimas" @@ -726,399 +833,478 @@ msgstr "%s: netaisyklingas aplinkos nuostatos pavadinimas" msgid "filename argument required" msgstr "reikia failo pavadinimo argumento" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: failas nerastas" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "nepavyko sustabdyti" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "nepavyko sustabdyti prisijungimo aplinkos" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s yra „%s“ sinonimas\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s yra aplinkos raktinis žodis\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s yra funkcija\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s yra aplinkos vidinė komanda\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s yra aplinkos vidinė komanda\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s yra %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s yra hešuotas (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: netaisyklingas limito argumentas" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "`%c': bloga komanda" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: nepavyko gauti limito: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "riba" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: nepavyko pakeisti limito: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "aštuntainis skaičius" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "„%c“: netaisyklingas simbolinės veiksenos operatorius" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " eilutė " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "paskutinė komanda: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Nutraukiama..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "įspėjimas: " + +#: error.c:488 msgid "unknown command error" msgstr "nežinoma komandos klaida" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "blogas komandos tipas" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "blogas jungtukas" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "blogas šuolis" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\alaukiant įvedimo baigėsi laikas: automatiškai atsijungta\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" msgstr "nepavyko peradresuoti standartinio įvedimo iš /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: „%c“: netaisyklingas formato simbolis" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 #, fuzzy msgid "pipe error" msgstr "rašymo klaida: %s" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "%s: apribota: negalima naudoti „/“ komandų pavadinimuose" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: komanda nerasta" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: negalima vykdyti dvejetainių failų" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: blogas interpretatorius" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: negalima vykdyti dvejetainių failų" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s yra aplinkos vidinė komanda\n" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "nepavyko dublikuoti fd %d į fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "viršytas išraiškos rekursijos lygis" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "rekursijos steko atvirkštinis perpildymas" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "sintaksės klaida išraiškoje" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "bandymas priskirti ne kintamajam" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "sintaksės klaida išraiškoje" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "dalyba iš 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "klaida: bloga expassign leksema" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "sąlygos išraiškoje tikėtasi „:“" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "eksponentė mažesnis už 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "" "po prieš-didinimo ar prieš-mažinimo operatoriaus tikėtasi identifikatoriaus" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "Trūksta „)“" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "sintaksės klaida: tikėtasi operando" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "sintaksės klaida: netaisyklingas aritmetinis operatorius" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "netaisyklingas aritmetinis pagrindas" -#: expr.c:1280 +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: nesamas parametras" + +#: expr.c:1603 msgid "value too great for base" msgstr "per didelė pagrindo reikšmė" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: išraiškos klaida\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: nepavyko pasiekti aukštesnių aplankų" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, fuzzy, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "nepavyko dublikuoti fd %d į fd %d" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" -msgstr "trinamas sustabdytas darbas %d procesų grupėje %ld" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" +msgid "forked pid %d appears in running job %d" msgstr "" -#: jobs.c:1113 +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "trinamas sustabdytas darbas %d procesų grupėje %ld" + +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" msgstr "" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: tokio pid nėra" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signalas %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Atlikta" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Atlikta(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Nežinoma būsena" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr "" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: nėra proceso %ld įrašo" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: darbas %d yra sustabdytas" -#: jobs.c:2829 +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: nėra tokio darbo" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: darbas užsibaigė" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: darbas %d jau fone" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: %d eilutė: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr "" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "šioje aplinkoje nėra darbų valdymo" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: pažeista prielaida: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1127,58 +1313,68 @@ msgstr "" "\r\n" "malloc: %s:%d: prielaida pažeista\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "nežinoma" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: blokas iš laisvų blokų sąrašo sugadintas" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: iškviestas su jau atlaisvintu bloku" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: iškviestas su nerezervuotu bloku" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free: pradžios ir pabaigos blokų (chunk) dydžiai skiriasi" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: iškviestas su nerezervuotu bloku" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: atvirkštinis perpildymas (underflow); mh_nbytes už ribos" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "realloc: pradžios ir pabaigos blokų (chunk) dydžiai skiriasi" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "netaisyklingas pagrindas" @@ -1197,261 +1393,300 @@ msgstr "%s: netaisyklinga tarnyba" msgid "%s: bad network path specification" msgstr "%s: netaisyklingas tinklo kelias" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "tinklo operacijos nepalaikomos" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" msgstr "" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" msgstr "" -#: locale.c:247 +#: locale.c:294 #, fuzzy, c-format msgid "setlocale: %s: cannot change locale (%s)" msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų" -#: locale.c:249 +#: locale.c:296 #, fuzzy, c-format msgid "setlocale: %s: cannot change locale (%s): %s" msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Turite laiškų $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Turite naujų laiškų $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Paštas %s perskaitytas\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "sintaksės klaida: reikia aritmetinės išraiškos" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "sintaksės klaida: netikėtas „;“" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "sintaksės klaida: „((%s))“" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: blogas instrukcijos tipas %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" msgstr "" -#: make_cmd.c:756 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "netikėta failo pabaiga ieškant atitinkamo „%c“" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "netikėta failo pabaiga ieškant „]]“" -#: parse.y:3956 +#: parse.y:4457 #, 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 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "sintaksės klaida sąlygos išraiškoje" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "netikėta leksema „%s“, tikėtasi „)“" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "tikėtasi „)“" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "netikėtas argumentas „%s“ sąlygos unariniam operatoriui" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "netikėtas argumentas sąlygos unariniam operatoriui" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "netikėta leksema „%s“, tikėtasi sąlyginio binarinio operatoriaus" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "tikėtasi sąlygos binarinio operatoriaus" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "netikėtas argumentas „%s“ sąlygos binariniam operatoriui" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "netikėtas argumentas sąlygos binariniam operatoriui" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "netikėta leksema „%c“ sąlygos komandoje" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "netikėta leksema „%s“ sąlygos komandoje" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "netikėta leksema %d sąlygos komandoje" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "sintaksės klaida prie netikėtos leksemos: „%s“" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "sintaksės klaida prie „%s“" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "sintaksės klaida: netikėta failo pabaiga" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "sintaksės klaida" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Naudokite „%s“, jei norite išeiti iš ap.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "netikėta failo pabaiga ieškant atitinkamo „)“" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "completion: funkcija „%s“ nerasta" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: blogas jungtukas  „%d“" -#: print_cmd.c:363 +#: print_cmd.c:375 #, fuzzy, c-format msgid "xtrace_set: %d: invalid file descriptor" msgstr "%d: netaisyklingas failo deskriptorius: %s" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" msgstr "" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" msgstr "" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: „%c“: netaisyklingas formato simbolis" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "failo deskriptorius už ribų" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: ambiguous redirect" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: negalima perrašyti egzistuojančio failo" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: apribota: negalima peradresuoti išvedimo" -#: redir.c:180 +#: redir.c:219 #, fuzzy, c-format msgid "cannot create temp file for here-document: %s" msgstr "nepavyko sukurti laikino failo „here“ dokumentui: %s" -#: redir.c:184 +#: redir.c:223 #, fuzzy, c-format msgid "%s: cannot assign fd to variable" msgstr "%s: negalima priskirti sąrašo masyvo elementui" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "/dev/(tcp|udp)/serveris/prievadas nepalaikoma be tinklo" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "nukreipimo klaida: nepavyko dublikuoti fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "nepavyko rasti /tmp, sukurkite šį aplanką!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp turi būti taisyklingas aplanko pavadinimas" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: netaisyklingas parametras" -#: shell.c:1651 +#: shell.c:1343 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nepavyko dublikuoti fd %d į fd %d" + +#: shell.c:1354 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nepavyko dublikuoti fd %d į fd %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: aplankas" + +#: shell.c:1907 msgid "I have no name!" msgstr "Neturiu vardo!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, versija %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1460,42 +1695,53 @@ msgstr "" "Naudojimas:\t%s [GNU ilgas parametras] [parametras] ...\n" "\t%s [GNU ilgas parametras] [parametras] scenarijaus-failas ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU ilgi parametrai:\n" -#: shell.c:1800 +#: shell.c:2068 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" +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD 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 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s arba -o nustatymas\n" -#: shell.c:1822 +#: shell.c:2094 #, 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 +#: shell.c:2095 #, 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 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "Naudokite komandą „bashbug“ klaidoms pranešti.\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: netaisyklinga operacija" @@ -1661,208 +1907,260 @@ msgstr "" msgid "Information request" msgstr "Informacijos užklausa" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Nežinomas signalas #" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Nežinomas signalas #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "blogas keitinys: trūksta „%s“ %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "" -#: subst.c:5063 +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "blogas keitinys: trūksta „%s“ %s" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "" -#: subst.c:5617 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: nesamas parametras" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "%s: netaisyklingas veiksmo pavadinimas" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parametras tuščias arba nenustatytas" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parametras tuščias arba nenustatytas" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: posekio išraiška < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: blogas keitinys" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: negalima tokiu būdu priskirti" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" -#: subst.c:7839 +#: subst.c:10795 #, fuzzy, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "blogas keitinys: trūksta „%s“ %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "nėra atitikmenų: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "tikėtasi argumento" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: tikėtasi skaitinės išraiškos" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "tikėtasi „)“" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: tikėtasi binarinio operatoriaus" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: tikėtasi unarinio operatoriaus" + +#: test.c:896 msgid "missing `]'" msgstr "trūksta „]“" -#: trap.c:203 +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "sintaksės klaida: netikėtas „;“" + +#: trap.c:220 msgid "invalid signal number" msgstr "netaisyklingas signalo numeris" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: blogas signalas %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "klaida importuojant funkcijos apibrėžimą „%s“" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "aplinkos lygmuo (%d) per aukštas, nustatoma į 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" msgstr "" -#: variables.c:3376 +#: variables.c:4757 #, fuzzy, c-format msgid "%s has null exportstr" msgstr "%s: parametras tuščias arba nenustatytas" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "netaisyklingas simbolis %d %s exportstr'e" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "%s exportstr'e trūksta „=“" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" msgstr "" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: nėra global_variables konteksto" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" msgstr "" -#: variables.c:4678 +#: variables.c:6400 #, fuzzy, c-format msgid "%s: %s: cannot open as FILE" msgstr "%s: nepavyko atverti: %s" -#: variables.c:4683 +#: variables.c:6405 #, 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." +#: variables.c:6450 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s išėjo už ribų" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." msgstr "Autorinės teisės (C) 2009 Free Software Foundation, Inc." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1870,191 +2168,174 @@ msgstr "" "Licencija GPLv3+: GNU GPL versija 3 arba naujesnė \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." 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" +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." 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 \n" -msgstr "" -"Licencija GPLv3+: GNU GPL versija 3 arba naujesnė \n" - -#: xmalloc.c:91 +#: xmalloc.c:93 #, 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 +#: xmalloc.c:95 #, fuzzy, c-format msgid "%s: cannot allocate %lu bytes" msgstr "xmalloc: nepavyko išskirti %lu baitų" -#: xmalloc.c:163 +#: xmalloc.c:165 #, 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 +#: xmalloc.c:167 #, fuzzy, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" msgstr "xmalloc: %s:%d: nepavyko išskirti %lu baitų" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [pavadinimas[=reikšmė] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] pavadinimas [pavadinimas ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" msgstr "" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [aplinkos-komanda [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" msgstr "caller [išraiška]" -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" msgstr "cd [-L|-P] [aplankas]" -#: builtins.c:66 +#: builtins.c:68 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 +#: builtins.c:76 msgid "command [-pVv] command [arg ...]" msgstr "command [-pVv] komanda [arg ...]" -#: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" msgstr "declare [-aAfFilrtux] [-p] [pavadinimas[=reikšmė] ...]" -#: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" msgstr "typeset [-aAfFilrtux] [-p] pavadinimas[=reikšmė] ..." -#: builtins.c:80 +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [option] pavadinimas[=reikšmė] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f failopavadinimas] [pavadinimas ...]" -#: builtins.c:92 +#: builtins.c:94 msgid "eval [arg ...]" msgstr "eval [arg ...]" -#: builtins.c:94 -msgid "getopts optstring name [arg]" +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" msgstr "getopts optsekos pavadinimas [arg]" -#: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" msgstr "" "exec [-cl] [-a pavadinimas] [komanda [argumentai ...]] [nukreipimas ...]" -#: builtins.c:98 +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "" -#: builtins.c:117 +#: builtins.c:119 #, fuzzy msgid "help [-dms] [pattern ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" msgstr "" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" msgstr "" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" msgstr "" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" @@ -2062,109 +2343,111 @@ msgstr "" "kill [-s sigspec | -n signum | -sigspec] pid | darbospec ... arba kill -l " "[sigspec]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let arg [arg ...]" -#: builtins.c:136 +#: builtins.c:138 msgid "" "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " "prompt] [-t timeout] [-u fd] [name ...]" msgstr "" -#: builtins.c:138 +#: builtins.c:140 msgid "return [n]" msgstr "return [n]" -#: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" msgstr "set [--abefhkmnptuvxBCHP] [-o nustatymas] [arg ...]" -#: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" msgstr "unset [-f] [-v] [pavadinimas ...]" -#: builtins.c:144 +#: builtins.c:146 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" +#: builtins.c:148 +#, fuzzy +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" msgstr "readonly [-af] [pavadinimas[=vertė] ...] arba readonly -p" -#: builtins.c:148 +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source failopavadinimas [argumentai]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". failopavadinimas [argumentai]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [išrk]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[arg] signalo_spec ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] pavadinimas [pavadinimas ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" msgstr "ulimit [-SHacdefilmnpqrstuvx] [riba]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [režimas]" -#: builtins.c:175 -msgid "wait [id]" +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" msgstr "wait [id]" -#: builtins.c:179 -msgid "wait [pid]" +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" msgstr "wait [pid]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for PAVADINIMAS [in ŽODŽIAI ... ] ; do KOMANDOS; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( išrk1; išrk2; išrk3 )); do KOMANDOS; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select PAVADINIMAS [in ŽODŽIAI ... ;] do KOMANDOS; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2172,93 +2455,95 @@ msgstr "" "if KOMANDOS; then KOMANDOS; [ elif KOMANDOS; then KOMANDOS; ]... [ else " "KOMANDOS; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while KOMANDOS; do KOMANDOS; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until KOMANDOS; do KOMANDOS; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "funkcijos pavadinimas { KOMANDOS ; } arba name () { KOMANDOS ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ KOMANDOS ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "darbo_spec [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( išraiška ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ išraiška ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "kintamieji – Kai kurių aplinkos kintamųjų pavadinimai ir reikšmės" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [optvardas ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v kint] formatas [argumentai]" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" msgstr "" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 +#: builtins.c:239 #, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" +msgid "compopt [-o|+o option] [-DEI] [name ...]" msgstr "shopt [-pqsu] [-o] [optvardas ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" -#: builtins.c:254 +#: builtins.c:256 #, fuzzy msgid "" "Define or display aliases.\n" @@ -2271,7 +2556,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2287,20 +2572,20 @@ msgstr "" " išskleidžiamas. „alias“ grąžina „true“, nebent duotas VARDAS, kuriam\n" " neaprašytas joks alternatyvusis vardas." -#: builtins.c:276 +#: builtins.c:278 #, fuzzy msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2334,12 +2619,15 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2350,7 +2638,7 @@ msgid "" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" -#: builtins.c:338 +#: builtins.c:342 #, fuzzy msgid "" "Resume for, while, or until loops.\n" @@ -2364,7 +2652,7 @@ 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 +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2375,10 +2663,10 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" -#: builtins.c:365 +#: builtins.c:369 #, fuzzy msgid "" "Return the context of the current subroutine call.\n" @@ -2403,7 +2691,7 @@ msgstr "" " IŠRAIŠKOS reikšmė nurodo, per kiek kvietimo freimų grįžti nuo\n" " esamo; viršutinis freimas yra 0." -#: builtins.c:383 +#: builtins.c:387 #, fuzzy msgid "" "Change the shell working directory.\n" @@ -2427,14 +2715,26 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" "Pakeisti esamą aplanką į DIR. Kintamasis $HOME yra\n" " numatytasis DIR. Kintamasis CDPATH nurodo aplankus, kuriuose bus\n" @@ -2448,13 +2748,13 @@ msgstr "" " užuot sekus simbolines nuorodas; parametras -L nurodo, kad turi būti\n" " sekama simbolinėmis nuorodomis." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2464,7 +2764,7 @@ msgid "" " cannot be read." msgstr "" -#: builtins.c:428 +#: builtins.c:442 #, fuzzy msgid "" "Null command.\n" @@ -2475,7 +2775,7 @@ msgid "" " Always succeeds." msgstr "Jokio efekto; komanda nieko nedaro. Grąžinamas klaidos kodas 0." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2483,7 +2783,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:448 +#: builtins.c:462 #, fuzzy msgid "" "Return an unsuccessful result.\n" @@ -2492,7 +2792,7 @@ msgid "" " Always fails." msgstr "Grąžinti nesėkmingą rezultatą." -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2502,16 +2802,16 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2521,17 +2821,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2541,20 +2846,21 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2565,15 +2871,17 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2585,6 +2893,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2592,15 +2901,21 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2613,7 +2928,7 @@ msgid "" " Returns success unless a write error occurs." msgstr "" -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2640,7 +2955,7 @@ msgid "" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2652,7 +2967,7 @@ msgid "" " Returns exit status of command or success if command is null." msgstr "" -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2685,15 +3000,15 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2704,8 +3019,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2716,7 +3031,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:689 +#: builtins.c:715 #, fuzzy msgid "" "Exit the shell.\n" @@ -2728,7 +3043,7 @@ msgstr "" "nustatomas\n" " paskutinės vykdytos komandos klaidos kodas." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2737,7 +3052,7 @@ msgid "" " in a login shell." msgstr "" -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2767,7 +3082,7 @@ msgid "" "occurs." msgstr "" -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2779,7 +3094,7 @@ msgid "" " Status of command placed in foreground, or failure if an error occurs." msgstr "" -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2793,7 +3108,7 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -2802,22 +3117,22 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2829,17 +3144,17 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying 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 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2848,23 +3163,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -2873,7 +3189,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2882,8 +3198,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2897,7 +3213,7 @@ msgid "" " If -x is used, returns the exit status of COMMAND." msgstr "" -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2907,14 +3223,14 @@ msgid "" " 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" +" \t\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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2926,7 +3242,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2936,7 +3253,7 @@ msgid "" " Returns success unless an invalid option is given or an error occurs." msgstr "" -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -2978,10 +3295,10 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" -#: builtins.c:966 +#: builtins.c:994 msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -2992,7 +3309,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3002,34 +3321,38 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3041,7 +3364,7 @@ msgid "" " Returns N, or failure if the shell is not executing a function or script." msgstr "" -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3107,9 +3430,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3123,7 +3450,7 @@ msgid "" " Returns success unless an invalid option is given." msgstr "" -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3132,6 +3459,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3143,7 +3472,7 @@ msgid "" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3162,7 +3491,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3174,7 +3503,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3182,7 +3512,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3193,7 +3523,7 @@ msgid "" " Returns success unless N is negative or greater than $#." msgstr "" -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 #, fuzzy msgid "" "Execute commands from a file in the current shell.\n" @@ -3212,7 +3542,7 @@ msgstr "" " Jei nurodyta ARGUMENTŲ, jie tampa poziciniais parametrais iškvietus\n" " FAILĄ." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3226,14 +3556,17 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3287,6 +3620,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3303,7 +3639,7 @@ msgid "" " false or an invalid argument is given." msgstr "" -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -3311,7 +3647,7 @@ msgid "" " be a literal `]', to match the opening `['." msgstr "" -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3323,7 +3659,7 @@ msgid "" " Always succeeds." msgstr "" -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3339,7 +3675,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3359,7 +3703,7 @@ msgid "" "given." msgstr "" -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3368,18 +3712,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3389,7 +3733,7 @@ msgid "" "found." msgstr "" -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -3407,6 +3751,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3418,6 +3763,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3433,7 +3783,7 @@ msgid "" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3451,38 +3801,54 @@ msgid "" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3495,7 +3861,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3512,7 +3878,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3532,7 +3898,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3548,7 +3914,7 @@ msgid "" " The return status is the return status of PIPELINE." msgstr "" -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3559,7 +3925,7 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3580,13 +3946,14 @@ msgid "" " Returns the status of the last command executed." msgstr "" -#: builtins.c:1580 +#: builtins.c:1648 #, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -3594,13 +3961,14 @@ msgstr "" "Išskleisti ir vykdyti KOMANDAS tol, kol galutinė komanda iš\n" " „while“ komandų grąžina klaidos kodą 0." -#: builtins.c:1592 +#: builtins.c:1660 #, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -3608,7 +3976,7 @@ msgstr "" "Išskleisti ir vykdyti KOMANDAS tol, kol galutinė komanda iš\n" " „until“ komandų grąžina klaidos kodą, nelygų 0." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3618,10 +3986,10 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3635,7 +4003,7 @@ msgid "" " Returns success unless NAME is readonly." msgstr "" -#: builtins.c:1632 +#: builtins.c:1700 #, fuzzy msgid "" "Group commands as a unit.\n" @@ -3649,7 +4017,7 @@ msgstr "" "Vykdyti eilę komandų grupėje. Tai yra vienas iš būdų nukreipti\n" " visos eilės komandų įvedimą/išvedimą." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3663,18 +4031,18 @@ msgid "" " Returns the status of the resumed job." msgstr "" -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3702,7 +4070,7 @@ msgid "" " 0 or 1 depending on value of EXPRESSION." msgstr "" -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3756,7 +4124,7 @@ msgid "" " \t\tcommands should be saved on the history list.\n" msgstr "" -#: builtins.c:1754 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3766,19 +4134,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3787,7 +4155,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3796,16 +4164,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3814,7 +4182,7 @@ msgid "" " change fails." msgstr "" -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3825,32 +4193,31 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3864,7 +4231,7 @@ msgid "" " given or OPTNAME is disabled." msgstr "" -#: builtins.c:1868 +#: builtins.c:1938 #, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" @@ -3882,12 +4249,23 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is given or a write or " @@ -3906,7 +4284,7 @@ msgstr "" " Jei pateiktas parametras -v, išvedimas įrašomas į aplinkos kintamąjį\n" " KINT, užuot spausdinus į standartinį išvedimą." -#: builtins.c:1895 +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -3919,21 +4297,25 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1923 +#: builtins.c:2004 #, fuzzy msgid "" "Display possible completions depending on the options.\n" @@ -3951,13 +4333,13 @@ msgstr "" " Jei pateiktas nebūtinasis ŽODŽIO argumentas, išvedami įrašai,\n" " atitinkantys ŽODĮ." -#: builtins.c:1938 +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -3966,6 +4348,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3982,7 +4365,7 @@ msgid "" " have a completion specification defined." msgstr "" -#: builtins.c:1968 +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -3993,24 +4376,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -4022,13 +4407,27 @@ msgid "" " not an indexed array." msgstr "" -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +#, fuzzy, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: netaisyklingas veiksmo pavadinimas" + +#, fuzzy +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "Grąžina esamos procedūros kontekstą." + +#~ msgid "Unknown Signal #" +#~ msgstr "Nežinomas signalas #" + #~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" #~ msgstr "xrealloc: nepavyko išskirti %lu baitų (išskirta %lu baitų)" @@ -4038,6 +4437,18 @@ msgstr "" #~ 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 "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + #~ msgid " " #~ msgstr " " @@ -4154,9 +4565,6 @@ msgstr "" #~ 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“" diff --git a/po/nb.gmo b/po/nb.gmo new file mode 100644 index 0000000..8d59f1d Binary files /dev/null and b/po/nb.gmo differ diff --git a/po/nb.po b/po/nb.po new file mode 100644 index 0000000..1a2da59 --- /dev/null +++ b/po/nb.po @@ -0,0 +1,5577 @@ +# Norwegian (bokmål) translation of GNU Bash +# Copyright (C) 2019 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Johnny A. Solbu , 2022. +# Åka Sikrom , 2015-2019. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.2-rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-07-03 20:40+0200\n" +"Last-Translator: Johnny A. Solbu \n" +"Language-Team: Norwegian Bokmaal \n" +"Language: nb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.2.3\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "feil i tabell-underskript" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: fjerner navnref-egenskap" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: indeksert tabell kan ikke konverteres til assosiativ tabell" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: kan ikke tildeles ikke-numerisk indeks" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: underskript må brukes ved tildeling av assosiative tabeller" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: klarte ikke å opprette: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: fant ikke tastaturoppsett for kommando" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: første ikke-blanktegn må være «\"»" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "avsluttende «%c» mangler i %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: kolon-skilletegn mangler" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: kan ikke oppheve bindingen i kommandotastaturet" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "brace-utvidelse: klarte ikke å tildele minne for %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "brace-utvidelse: klarte ikke å tildele minne for %u elementer" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "brace-utvidelse: klarte ikke å tildele minne for «%s»" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: ugyldig alias" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "linjeredigering er ikke slått på" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: ugyldig navn på tastaturoppsett" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: klarte ikke å lese: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: ukjent funksjonsnavn" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s er ikke tilknyttet en knapp.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s kan startes via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: klarte ikke å fjerne tildeling" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "antall sløyfer" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "gir bare mening i «for»-, «while»- og «until»-sløyfer" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"Vis konteksten for gjeldende underrutine-kall.\n" +" Uten EXPR, returnerer \"$line $filnavn\". Med EXPR, returnerer\n" +" \"$line $subrutine $filename denne ekstra informasjonen kan brukes til å\n" +" gi en stabelsporing.\n" +" \n" +" Verdien til EXPR indikerer hvor mange anropsrammer som skal gå tilbake før\n" +" nåværende; topprammen er ramme 0." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME har ingen verdi" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "for mange argumenter" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null-mappe" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD har ingen verdi" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linje %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "advarsel: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: bruk: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: valget krever et argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: valget krever et tall-argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "fant ikke %s" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: ugyldig valg" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ugyldig valgnavn" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: ugyldig navn" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "ugyldig oktal-tall" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "ugldig heksadesimalt tall" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "ugyldig tall" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: ugyldig signalspesifikasjon" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s» er hverken hverken et PID eller en gyldig jobbspesifikasjon" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: skrivebeskyttet variabel" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: kan ikke tildele" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s er utenfor rekkevidde" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s er utenfor rekkevidde" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: jobben finnes ikke" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: ingen jobbkontroll" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "ingen jobbkontroll" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: begrenset" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "begrenset" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ikke innebygd i skall" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "skrivefeil: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "feil under endring av terminal-egenskaper: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "feil under henting av terminal-egenskaper: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: feil under henting av gjeldende mappe: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: flertydig jobbspesifikasjon" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "hjelp er ikke tilgjengelig for denne versjonen" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: klarte ikke å fjerne verdi fra skrivebeskyttet %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: klarte ikke å fjerne verdi" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: ugyldig handlingsnavn" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ingen spesifikasjon for fullføring" + +#: builtins/complete.def:696 +msgid "warning: -F option may not work as you expect" +msgstr "advarsel: valget «-F» virker kanskje ikke slik du forventer" + +#: builtins/complete.def:698 +msgid "warning: -C option may not work as you expect" +msgstr "advarsel: valget «-C» virker kanskje ikke slik du forventer" + +#: builtins/complete.def:846 +msgid "not currently executing completion function" +msgstr "fullføringsfunksjon kjøres ikke nå" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "kan bare brukes i funksjoner" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "valget«-f» kan ikke brukes til å lage funksjoner" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: skrivebeskyttet funksjon" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: referansevariabler kan ikke være tabeller (arrays)" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: navnref.-variabler kan ikke referere til seg selv" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: sirkulær navnreferanse" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: ugyldig variabelnavn for navnreferanse" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: tabellvariabler kan ikke ødelegges på denne måten" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: assosiative tabeller kan ikke konverteres til indekserte tabeller" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: sammensatt tabell-tideling i hermetegn er utgått" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "dynamisk innlasting er ikke tilgjengelig" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "klarte ikke å åpne delt objekt %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "fant ikke %s i delt objekt %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamisk innebygd allerede lastet" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "innlastingsfunksjon for %s førte til feilkode (%d). Ikke lastet inn" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: ikke dynamisk innlastet" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: klarte ikke å slette: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: er en mappe" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ikke en vanlig fil" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: fila er for stor" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: klarte ikke å kjøre binærfil" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: klarte ikke å kjøre: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logg ut\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ikke innloggingsskall. Bruk «exit»" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Bakgrunnsjobb(er) venter.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Bakgrunnsjobb(er) kjører.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "fant ingen kommando" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "historikk-spesifikasjon" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: klarte ikke å åpne midlertidig fil: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "gjeldende" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "jobb %d startet uten jobbkontroll" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: -- %c er et ugyldig valg\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: -- %c krever et argument\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "nøkkelsummering er slått av" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: kontrollsum-tabell er tom\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "treff\tkommando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Skallkommandoer som samsvarer med nøkkelordet `" +msgstr[1] "Skallkommandoer som samsvarer med nøkkelordene `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "ingen hjelpeemner samsvarer med «%s». Prøv «help help», «man -k %s» eller «info %s»." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: klarte ikke å åpne: %s" + +#: builtins/help.def:523 +#, 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 "" +"Disse skallkommandoene er internt definert. Skriv «help» for å se denne lista.\n" +"Skriv «help name» for å finne ut mer om funksjonen «name».\n" +"Bruk «info bash» for å finne generell info om skallet.\n" +"Bruk «man -k» eller «info» for å finne ut mer om kommandoer som ikke er på denne lista.\n" +"\n" +"Stjerne (*) ved siden av et kommandonavn betyr at gjeldende kommando er slått av.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "du kan ikke bruke flere enn ett av valgene -anrw på én gang" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "historikkposisjon" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ugyldig tidsstempel" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: historikk-utvidelse mislyktes" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib mislyktes" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "valget «-x» kan ikke brukes i kombinasjon med andre valg" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenter må være prosess- eller jobb-ID-er" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Ukjent feil" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "forventet uttrykk" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: ikke en indeksert tabell" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: ugyldig spesifikasjon av fildeskriptor" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: ugyldig fildeskriptor: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: ugyldig linjeantall" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: ugyldig tabellopphav" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: ugyldig tilbakekallsmengde" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "tomt navn på tabellvariabel" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "støtte for tabellvariabler kreves" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: formattegn mangler" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: ugyldig spesifikasjon av tidsformat" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: ugyldig formattegn" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "advarsel: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problem med tolkning av format: %s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "heks-siffer mangler for \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "unicode-siffer mangler for \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ingen annen mappe" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: ugyldig argument" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "mappestabel er tom" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "mappestabel-indeks" + +#: builtins/pushd.def:701 +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 "" +"Vis liste over mapper som blir husket. Mapper\n" +" havner på denne lista med kommandoen «pushd». Du kan gå\n" +" tilbake i lista med kommandoen «popd».\n" +" \n" +" Valg:\n" +" -c\ttøm mappestabel ved å slette alle elementer\n" +" -l\tikke legg til tildeprefiks på stier som er relative\n" +" \ttil gjeldende hjemmemappe\n" +" -p\tskriv ut mappetsabel med ett element per linje\n" +" -v\tskriv ut mappestabel med ett element per linje som har\n" +" \tstabelposisjon som prefiks\n" +" \n" +" Argumenter:\n" +" +N\tVis N-te mappe talt fra null\n" +" \tpå venstre side av lista (gjelder når programmet kjøres uten valg).\n" +" \n" +" -N\tVis N-te mappe talt fra null\n" +"\tpå høyre side av lista (gjelder når programmet kjøres uten valg)." + +#: builtins/pushd.def:723 +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 "" +"Legger til en mappe i toppen av mappestabelen, eller rullerer\n" +" stabelen slik at øverste mappe blir gjeldende arbeidsmappe.\n" +" Hvis ingen argumenter er valgt, bytter de to øverste mappene plass.\n" +" \n" +" Valg:\n" +" -n\tLar være å bytte mappe når mapper legges til i stabelen,\n" +" \tslik at kun selve stabelen blir endret.\n" +" \n" +" Argumenter:\n" +" +N\tRullerer stabelen slik at N-te mappe - talt fra\n" +" \tnull til venstre i lista etter «dirs» - havner øverst.\n" +" \n" +" -N\tRullerer stabelen slik at N-te mappe - talt fra\n" +" \tnull til høyre i lista etter «dirs» - havner øverst\n" +" \n" +" dir\tLegger til DIR i toppen av mappestabelen, og tar den\n" +" \ti bruk som gjeldende arbeidsmappe.\n" +" \n" +" Den innebygde funksjonen «dirs» viser mappestabelen." + +#: builtins/pushd.def:748 +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 "" +"Fjerner mapper fra mappestabelen. Hvis ingen argumenter brukes,\n" +" fjerner programmet øverste mappe fra stabelen og bytter til det som deretter er øverste mappe.\n" +" \n" +" Valg:\n" +" -n\tLar være å bytte mappe når mapper fjernes fra stabelen,\n" +" \tslik at bare stabelen blir endret.\n" +" \n" +" Argumenter:\n" +" +N\tFjerner N-te oppføring - talt fra null til venstre i lista\n" +" \tetter «dirs». For eksempel fjerner «popd +0»\n" +" \tførste mappe, og «popd +1» den andre.\n" +" \n" +" -N\tFjerner N-te oppføring - talt fra null til høyre i lista\n" +" \tetter «dirs». For eksempel fjerner «popd -0»\n" +" \tsiste mappe, og «popd -1» den nest siste.\n" +" \n" +" Den innebygde funksjonen «dirs» viser mappestabelen." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: ugyldig spesifikasjon av tidsavbrudd" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "lesefeil: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "du kan bare «return» fra en funksjon eller kildeskript" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "du kan ikke utføre «unset» (tømme både en funksjon og en variabel for verdier) samtidig" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ikke en tabellvariabel" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ikke en funksjon" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: klarte ikke å eksportere" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "shift-antall" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "du kan ikke både definere og fjerne skallvalg samtidig" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ugyldig navn på skallvalg" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "filnavn-argument kreves" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: fant ikke fil" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "klarte ikke å sette i hvilemodus" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "klarte ikke å sette et innloggingsskall i hvilemodus" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s har alias «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s er et skall-nøkkelord\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s er en funksjon\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s er en innebygd skallkommando\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s er en innebygget skallfunksjon\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s er %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s er nøkkelsummert («hashed») (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: ugyldig grenseargument" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: ugyldig kommando" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: klarte ikke å hente grense: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "grense" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: klarte ikke å endre grense: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "oktalt tall" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "«%c»: ugyldig symbolsk modus-operatør" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "«%c»: ugyldig symbolsk modustegn" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " linje " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "forrige kommando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Avbryter …" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "DEBUG-advarsel: " + +#: error.c:488 +msgid "unknown command error" +msgstr "ukjent kommandofeil" + +#: error.c:489 +msgid "bad command type" +msgstr "ugyldig kommandotype" + +#: error.c:490 +msgid "bad connector" +msgstr "ugyldig tilkobling" + +#: error.c:491 +msgid "bad jump" +msgstr "ugyldig hopp" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: utildelt variabel" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atidsavbrudd for inndata: auto-utlogging\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "klarte ikke å videresende standard inndata fra «/dev/null». %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c» er et ugyldig formattegn" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] finnes fremdeles" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "datarør-feil" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: grensa for nivåer av eval-funksjoner (%d) er overskredet" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: grensa for nivåer av kilder i kilder (%d) er overskredet" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: grensa for nivåer av funksjoner i funksjoner (%d) er overskredet" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: ikke tillatt: kommandonavn kan ikke inneholde «/»" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "fant ikke kommando %s" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: kan ikke kjøres: den nødvendige filen ble ikke funnet" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: ugyldig tolk" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: klarte ikke å kjøre binærfil: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s» er en innebygd spesialfunksjon" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "klarte ikke å duplisere fd %d til fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "grensa for rekursjonsnivåer i uttrykk er overskredet" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "rekursjonsstabelen er tom" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "uttrykk inneholder syntaksfeil" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "du forsøkte å tilordne en verdi til noe som ikke er en variabel" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "variabeltildeling inneholder syntaksfeil" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "forsøkte å dele på 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "programfeil: ugyldig expassign-symbol" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "forventet «:» for betinget uttrykk" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "eksponent er lavere enn 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "forventet identifikator etter pre-økning eller pre-forminskelse" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "mangler «)»" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "syntaksfeil: forventet operand" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "syntaksfeil: ugyldig aritmetisk operatør" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (feilaktig symbol er «%s»)" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "ugyldig aritmetisk grunntall" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "ugyldig heltallskonstant" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "verdien er for høy for grunntallet" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: feil i uttrykk\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: fikk ikke tilgang til foreldermapper" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "klarte ikke å tilbakestille nodelay-modus for fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "klarte ikke å knytte ny fildeskriptor til bash-inndata fra fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: mellomlager for ny fd %d finnes allerede" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp-datarør" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "kopiert pid %d finnes i kjørende jobb %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "sletter ventende bakgrunnsjobb %d med prosessgruppe %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: markert PID %5ld (%s) som levende" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: pid-en finnes ikke" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Ferdig" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Venter" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Venter(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Kjører" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Ferdig(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Avsluttet %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Ukjent status" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(kjerne lagret i fil) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "underprosess setpgid (%ld til %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld er ikke en underprosess av dette skallet" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Ingen kjennskap til prosess %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: prosess %d venter" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: ingen aktuelle jobber" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: jobben er avsluttet" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: jobb %d kjører allerede i bakgrunnen" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: slår på WNOHANG for å unngå kronisk blokkering" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linje %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (kjerne lagret i fil)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd nå: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp mislyktes" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: ingen jobbkontroll i bakgrunn" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: linjeregler" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "klarte ikke å velge terminal-prosessgruppe (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "ingen jobbkontroll i dette skallet" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: mislykket premiss: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: urimelig premiss\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "ukjent" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: rotete blokk på befrielsesliste" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: ble bedt om å behandle blokk som allerede er ledig" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: ble bedt om å behandle blokk som ikke er tildelt" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: tomt. mh_nbytes er utenfor rekkevidde" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "fri: underflyt oppdaget; magic8 er skadet" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: start- og sluttdel er av ulik størrelse" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: ble bedt om å behandle blokk som ikke er tildelt" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: tomt. mh_nbytes er utenfor rekkevidde" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underflyt oppdaget; magic8 er skadet" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: start- og sluttdel er av ulik størrelse" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tildelingstabell er full med FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: finnes %p allerede i tabellen som tildelt?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: finnes %p allerede i tabellen som ledig?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "ugyldig grunntall" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: ukjent vert" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: ugyldig tjeneste" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: ugyldig spesifikasjon av nettverkssti" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "nettverkshandlinger støttes ikke" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: klarte ikke å bytte region (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: klarte ikke å bytte region (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: klarte ikke å bytte region (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: klarte ikke å bytte region (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Du har e-post i $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Du har ny e-post i $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Posten i %s er lest\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "syntaksfeil: aritmetisk uttrykk kreves" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "syntaksfeil: uforventet «;»" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "syntaksfeil: «((%s))»" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: %d er en ugyldig instrukstype" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-dokument ved linje %d adskilt av slutt på fil (forventet «%s»)" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: videresendinginstruks «%d» er utenfor tillatt rekkevidde" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: «shell_input_line_size» (%zu) overskrider SIZE_MAX (%lu): linja er forkortet" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "grensa for maksimalt antall here-dokumenter er overskredet" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "uforventet slutt på fil (EOF) under søk etter «%c»" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "uforventet slutt på fil (EOF) under søk etter «]]»" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "syntaksfeil i betinget uttrykk: forventet ikke symbolet «%s»" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "syntaksfeil i betinget uttrykk" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "forventet ikke symbolet «%s», men «)»" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "forventet «)»" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "«%s» er et uforventet argument for betinget unær operatør" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "uforventet argument for betinget unær operatør" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "«%s» er et uforventet symbol. Forventet betinget binær operatør" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "forventet betinget binæroperatør" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "«%s» er et uforventet argument for betinget binæroperatør" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "uforventet argument for betinget binæroperatør" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "«%c» er et uforventet symbol i en betinget kommando" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "«%s» er et uforventet symbol i en betinget kommando" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "«%d» er et uforventet symbol i en betinget kommando" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "syntaksfeil ved «%s», som er et uforventet symbol" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "syntaksfeil ved «%s»" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "syntaksfeil: uforventet slutt på fil" + +#: parse.y:6151 +msgid "syntax error" +msgstr "syntaksfeil" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Bruk «%s» for å gå ut av skallet.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "uforventet slutt på fil (EOF) under søk etter «)»" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "fullføring: fant ikke funksjonen «%s»" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: mulig løkke av nye forsøk" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: «%d» er en ugyldig tilkobling" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: ugyldig fildeskriptor" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: filpeker er NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: ugyldig formattegn" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "fildeskriptor er utenfor tillatt rekkevidde" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: flertydig videresending" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: klarte ikke å overskrive fil" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ikke tillatt: klarte ikke å videresende utdata" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "klarte ikke å lage midlertidig fil for here-dokument: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: klarte ikke å knytte fd til variabel" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port støttes ikke uten nettverkstilkobling" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "videresendingsfeil: klarte ikke å duplisere fd" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "fant ikke «/tmp». Opprett denne mappa!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "«/tmp» må være et gyldig mappenavn" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pen utskriftsmodus blir ignorert i interaktive skall" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: ugyldig valg" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "klarte ikke å velge %d som uid. Effektiv uid: %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "klarte ikke å velge %d som gid. Effektiv gid: %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "klarte ikke å starte feilsøkingsverktøy. Feilsøkingsmodus slått av" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: er en mappe" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Jeg manger navn!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versjon %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Bruk:\t%s [langt GNU-valg] [valg] …\n" +"\t%s [langt GNU-valg] [valg] skriptfil …\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "Lange GNU-valg:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Skallvalg:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t«-ilrsD», «-c kommando» eller «-O kortvalg_valg»\t\t(kun programkall)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t«-%s» eller «-o»\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Skriv «%s -c \"help set\"» for mer informasjon om skallvalg.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Skriv «%s -c help» for mer informasjon om innebygde skallkommandoer.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Bruk kommandoen «bashbug» for å rapportere programfeil.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash-nettside: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Generell hjelp til bruk av GNU-programvare: \n" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: ugyldig handling" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Ugyldig signal" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Legg på" + +#: siglist.c:55 +msgid "Interrupt" +msgstr "Forstyrr" + +#: siglist.c:59 +msgid "Quit" +msgstr "Avslutt" + +#: siglist.c:63 +msgid "Illegal instruction" +msgstr "Ugyldig instruks" + +#: siglist.c:67 +msgid "BPT trace/trap" +msgstr "BPT-sporing/-fanging" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "ABORT-instruks" + +#: siglist.c:79 +msgid "EMT instruction" +msgstr "EMT-instruks" + +#: siglist.c:83 +msgid "Floating point exception" +msgstr "Flyttallsfeil" + +#: siglist.c:87 +msgid "Killed" +msgstr "Drept" + +#: siglist.c:91 +msgid "Bus error" +msgstr "Bussfeil" + +#: siglist.c:95 +msgid "Segmentation fault" +msgstr "Segmenteringsfeil" + +#: siglist.c:99 +msgid "Bad system call" +msgstr "Ugyldig systemkall" + +#: siglist.c:103 +msgid "Broken pipe" +msgstr "Ødelagt datarør" + +#: siglist.c:107 +msgid "Alarm clock" +msgstr "Alarmklokke" + +#: siglist.c:111 +msgid "Terminated" +msgstr "Avsluttet" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "Hastende IO-tilstand" + +#: siglist.c:119 +msgid "Stopped (signal)" +msgstr "Stoppet (signal)" + +#: siglist.c:127 +msgid "Continue" +msgstr "Fortsett" + +#: siglist.c:135 +msgid "Child death or stop" +msgstr "Død eller stans av underprosess" + +#: siglist.c:139 +msgid "Stopped (tty input)" +msgstr "Stoppet (tty-inndata)" + +#: siglist.c:143 +msgid "Stopped (tty output)" +msgstr "Stoppet (tty-utdata)" + +#: siglist.c:147 +msgid "I/O ready" +msgstr "I/O klar" + +#: siglist.c:151 +msgid "CPU limit" +msgstr "CPU-grense" + +#: siglist.c:155 +msgid "File limit" +msgstr "Filgrense" + +#: 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 "Vindu endret" + +#: siglist.c:171 +msgid "Record lock" +msgstr "Husk lås" + +#: siglist.c:175 +msgid "User signal 1" +msgstr "Brukersignal 1" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Brukersignal 2" + +#: siglist.c:183 +msgid "HFT input data pending" +msgstr "HFT-inndata venter" + +#: siglist.c:187 +msgid "power failure imminent" +msgstr "strømstans er nærliggende" + +#: siglist.c:191 +msgid "system crash imminent" +msgstr "systemkræsj er nærliggende" + +#: siglist.c:195 +msgid "migrate process to another CPU" +msgstr "flytt prosess til annen CPU" + +#: siglist.c:199 +msgid "programming error" +msgstr "programmeringsfeil" + +#: siglist.c:203 +msgid "HFT monitor mode granted" +msgstr "HFT-skjermmodus tildelt" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "HFT-skjermmodus tilbaketrukket" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "HFT-lydsekvens er fullført" + +#: siglist.c:215 +msgid "Information request" +msgstr "Informasjonsforespørsel" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "#%d er et ukjent signal" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "ugyldig substitutt: %2$s mangler avsluttende «%1$s»" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: klarte ikke å knytte liste til tabellmedlem" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "klarte ikke å lage datarør for substitusjon av prosess" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "klarte ikke å lage underprosess for substitusjon av prosess" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "klarte ikke å åpne navngitt datarør %s for lesing" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "klarte ikke å åpne navngitt datarør %s for skriving" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "klarte ikke å duplisere navngitt datarør %s som fd %d" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "kommandosubstitusjon: null-byte i inndata ignorert" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "klarte ikke å lage datarør for substitusjon av kommando" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "klarte ikke å lage underprosess for substitusjon av kommando" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: klarte ikke å duplisere datarør som fd 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: ugyldig variabelnavn for navnreferanse" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: ugyldig indirekte utvidelse" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: ugyldig variabelnavn" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter har ingen verdi" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter har null-verdi eller står tomt" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: understreng-uttrykk < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: ugyldig substitusjon" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: du kan ikke tildele på denne måten" + +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "fremtidige versjoner av skallet skal tvinge evaluering som en aritmetisk substitusjon" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "ugyldig substitusjon. %s mangler avsluttende «`»" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "ingen treff på %s" + +#: test.c:147 +msgid "argument expected" +msgstr "forventet argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: forventet heltallsuttrykk" + +#: test.c:265 +msgid "`)' expected" +msgstr "forventet «)»" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "forventet «)», men fant %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: forventet binær operatør" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: forventet unær operatør" + +#: test.c:896 +msgid "missing `]'" +msgstr "«]» mangler" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaksfeil: uforventet «%s»" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "ugyldig signalnummer" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "fellehåndtering: øvre grense for fellehåndteringsnivå (%d) er overskredet" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: ugyldig verdi i «trap_list[%d]»: %p" + +#: trap.c:416 +#, c-format +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: SIG_DFL er signalbehandler. Sender %d (%s) til meg selv på nytt" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: %d er et ugyldig signal" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "feil under importering av definisjonen av funksjonen «%s»" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "skallnivået (%d) er for høyt. Tilbakestiller til 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: ingen funksjonskontekst i gjeldende virkefelt" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variabel kan ikke tilknyttes verdi" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: kan ikke arve verdi fra inkompatibel type" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: knytter heltall til navnreferanse" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: ingen funksjonskontekst i gjeldende virkefelt" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s har exportstr som er null" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%d er et ugyldig tegn i exportstr for %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "exportstr for %s mangler «=»" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: toppen av «shell_variables» er ikke en funksjonskontekst" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: kontekst for «global_variables» mangler" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: toppen av «shell_variables» er ikke et midlertidig miljøfelt" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: klarte ikke å åpne som FIL" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: ugyldig verdi for sporing av fildeskriptor" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: samspill-verdi er utenfor tillatt rekkevidde" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Opphavsrett (C) 2022 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Lisens GPLv3+: GNU GPL versjon 3 eller nyere \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versjon %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Dette er fri programvare. Du står fritt til å endre og dele den videre." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Det stilles INGEN GARANTI, i den grad dette tillates av gjeldende lovverk." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: klarte ikke å tildele %lu byte (%lu byte tildelt)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: klarte ikke å tildele %lu byte" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: klarte ikke å tildele %lu byte (%lu byte tildelt)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: klarte ikke å tildele %lu byte" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [navn[=verdi] … ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] navn [navn …]" + +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m tastaturoppsett] [-f filnavn] [-q navn] [-u navn] [-r knappesekv] [-x knappesekv:skallkommando] [knappesekv:readline-funksjon eller readline-kommando]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [innebygd-skallfunksjon [arg …]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [uttr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [mappe]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg …]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [navn[=verdi] …] eller deklarer -p [-aAfFilnrtux] [navn ...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgilnrtux] [-p] navn[=verdi] … eller typesett -p [-aAfFilnrtux] [navn ...]" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [valg] navn[=verdi] …" + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg …]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg …]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f filnavn] [navn …]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg …]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts valgstreng navn [arg ...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a navn] [kommando [argument …]] [videresending …]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e enavn] [-lnr] [første] [siste] eller fc -s [pat=rep] [kommando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [jobbspes]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [jobbspes …]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p stinavn] [-dt] [navn …]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [mønster …]" + +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d posisjon] [n] eller history -anrw [filnavn] eller history -ps arg [arg …]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [jobbspes …] eller jobs -x kommando [arg]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobbspes … | pid …]" + +#: builtins.c:134 +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s sigspes | -n signum | -sigspes] pid | jobbspes … eller kill -l [sigspes]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg …]" + +#: builtins.c:138 +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a tabell] [-d adskill] [-i tekst] [-n ntegn] [-N ntegn] [-p ledetekst] [-t tidsavbrudd] [-u fd] [navn …]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o valgnavn] [--] [arg …]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [navn …]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [navn[=verdi] …] eller export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [navn[=verdi] …] eller readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source filnavn [argumenter]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". filnavn [argumenter]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [uttr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg … ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signalspes …]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] navn [navn …]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT [grense]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modus]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id …]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid …]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAVN [in ORD … ] ; do KOMMANDOER; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( uttr1; uttr2; uttr3 )); do KOMMANDOER; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAVN [in ORD … ;] do KOMMANDOER; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] kommandokø" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case ORD in [MØNSTER [| MØNSTER] …) KOMMANDOER ;;] … esac" + +#: builtins.c:194 +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if KOMMANDOER; then KOMMANDOER; [ elif KOMMANDOER; then KOMMANDOER; ] … [ else KOMMANDOER; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while KOMMANDOER; do KOMMANDOER-2; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until KOMMANDOER; do KOMMANDOER-2; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAVN] kommando [videresendinger]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function navn { KOMAMNDOER ; } eller navn () { KOMMANDOER ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ KOMMANDOER ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( uttrykk ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ uttrykk ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variabler - Navn og betydninger av enkelte skallvariabler" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | mappe]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [valgnavn …]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] format [argumenter]" + +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o valg] [-A handling] [-G globpat] [-W ordliste] [-F funksjon] [-C kommando] [-X filterpat] [-P prefiks] [-S suffiks] [navn …]" + +#: builtins.c:235 +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 valg] [-A handling] [-G globpat] [-W ordliste] [-F funksjon] [-C kommando] [-X filtersti] [-P prefiks] [-S suffiks] [ord]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o valg] [-DEI] [navn …]" + +#: builtins.c:242 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d skilletegn] [-n antall] [-O opphav] [-s antall] [-t] [-u fd] [-C tilbakekall] [-c mengde] [tabell]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d skilletegn] [-n antall] [-O opphav] [-s antall] [-t] [-u fd] [-C tilbakekall] [-c mengde] [tabell]" + +#: builtins.c:256 +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 "" +"Definer eller vis alias.\n" +" \n" +" Hvis ingen argumenter er gitt, skriver programmet ut en liste over\n" +" gjeldende alias i form av «alias NAVN=verdi» til standardutdata.\n" +" \n" +" Ellers defineres et alias per NAVN med en VERDI.\n" +" Avsluttende mellomrom i VERDI fører til at neste ord kontrolleres for\n" +" alias-substitusjon når aliaset utvides.\n" +" \n" +" Valg:\n" +" -p\tSkriv ut alle definerte alias i brukbart format\n" +" \n" +" Avslutningsstatus:\n" +" alias avslutter med positiv verdi («true»), med mindre bruker skriver inn et NAVN\n" +" som mangler definert alias." + +#: builtins.c:278 +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 "" +"Fjern hvert NAVN fra lista over definerte alias.\n" +" \n" +" Valg:\n" +" -a\tfjern alle alias-definisjoner.\n" +" \n" +" Programmet avslutter som vellykket med mindre bruker velger et aliasNAVN som ikke finnes." + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Velg hurtigtaster og variabler for Readline.\n" +" \n" +" Knytt en knappekombinasjon til en Readline-funksjon eller makro, eller gi\n" +" verdi til en Readline-variabel. Argumentsyntaksen tilsvarer det som finnes\n" +" i «~/.inputrc», men må oppgis som ett argument.\n" +" F.eks.: bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Valg:\n" +" -m OPPSETT Bruk valgt tastaturOPPSETT under kjøring av denne kommandoen.\n" +" Gyldige oppsettsnavn er «emacs», «emacs-standard»,\n" +" «emacs-meta», «emacs-ctlx», «vi», «vi-move»,\n" +" «vi-command» og «vi-insert».\n" +" -l Vis funksjonsnavn.\n" +" -P Vis funksjonsnavn og tildelinger.\n" +" -p Vis funksjoner og tildelinger i et format som kan gjenbrukes\n" +" som inndata.\n" +" -S Vis knappekombinasjoner som kaller makroer og tilhørende verdier\n" +" -s Tilsvarer «-S», men i et format som kan gjenbrukes i inndata.\n" +" -V Vis variabelnavn og verdier\n" +" -v Tilsvarer «-V», men i et format som kan gjenbrukes i inndata.\n" +" -q function-name Spør hvilke knapper som kaller aktuell funksjon.\n" +" -u function-name Fjern alle knappekombinasjoner som er tilknyttet aktuell funksjon.\n" +" -r KOMB Fjern tildeling av valgt knappeKOMBinasjon.\n" +" -f FILNAVN Les knappekombinasjoner fra FILNAVN.\n" +" -x KOMB:KOMMANDO\tGjør slik at valgt skallKOMMANDO kjøres når\n" +" \t\t\t\tvalgt knappeKOMBinasjon trykkes.\n" +" -X Vis knappekombinasjoner som er tildelt med «-x», og aktuelle kommandoer \n" +" i et format som kan gjenbrukes i inndata.\n" +" \n" +" Avslutningsstatus:\n" +" bind avslutter med 0, med mindre bruker tar et ukjent valg eller det oppstår feil." + +#: builtins.c:330 +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 "" +"Gå ut av en «FOR»-, «WHILE»- eller «UNTIL»-løkke.\n" +" \n" +" Hvis N er valgt, brytes N antall underløkker.\n" +" \n" +" Avslutningsstatus:\n" +" Statuskoden er 0, med mindre N er mindre enn 1." + +#: builtins.c:342 +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 "" +"Fortsett neste runde av gjeldende FOR-, WHILE- eller WHILE-løkke..\n" +" \n" +" Hvis N er valgt, fortsetter N-te løkke.\n" +" \n" +" Avslutningsstatus:\n" +" Statuskoden er 0, med mindre N er mindre enn 1." + +#: builtins.c:354 +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 "" +"Kjør innebygde skallfunksjoner.\n" +" \n" +" Kjør SKALLFUNKSJON med valgte ARGumenter uten å slå opp\n" +" kommandonavn. Dette er nyttig når du vil re-implementere en innebygd\n" +" skallkommando som en funksjon, samtidig som du kjører den innenfor en skallfunksjon.\n" +" \n" +" Avslutningsstatus:\n" +" Statuskoden er den samme som aktuell SKALLFUNKSJON gir, eller\n" +" negativ («false») hvis SKALLFUNKSJON ikke er en innebygd skallkommando." + +#: builtins.c:369 +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 "" +"Vis konteksten for gjeldende underrutine-kall.\n" +" \n" +" Hvis UTTRykk ikke er valgt, vises «$line $filename». Med UTTRykk vises\n" +" «$line $subroutine $filename». Denne ekstrainformasjonen kan brukes\n" +" til stabelsporing.\n" +" \n" +" Verdien av UTTRykk viser hvor mange kall-rammer programmet skal bevege seg\n" +" gjennom tilbake fra gjeldende ramme. Øverste ramme er 0.\n" +" \n" +" Avslutningsstatus:\n" +" Status er 0, med mindre skallet ikke kjører en skallfunksjon eller\n" +" valgt UTTRykk er ugyldig." + +#: builtins.c:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Bytt arbeidsmappe for skallet.\n" +" \n" +" Bytt gjeldende mappe til MAP. Standard MAPpe er verdien av\n" +" skallvariabelen HOME.\n" +" \n" +" Variabelen CDPATH bestemmer søkestien for mapper som inneholder\n" +" MAP. Alternative mappenavn i CDPATH er adskilt med «:».\n" +" Et null-mappenavn er det samme som gjeldende mappe. Hvis MAP begynner\n" +" med skråstrek (/), brukes ikke CDPATH.\n" +" \n" +" Hvis valgt mappe ikke finnes, og skallvalget «cdable_vars» har en verdi,\n" +" antas ordet å være et variabelnavn. Hvis den variabelen har en verdi,\n" +" brukes denne verdien som MAP.\n" +" \n" +" Valg:\n" +" -L\ttving følging av symbolske lenker. Følg symbolske lenker i\n" +" \tMAP etter å ha behandlet forekomster av «..»\n" +" -P\tbruk fysisk mappestruktur uten å følge symbolske\n" +" \tlenker. Følg lenker i MAP før forekomster av «..» behandles.\n" +" -e\thvis «-P» er valgt, og det er uklart hva som er gjeldende\n" +" \tarbeidsmappe, avslutt med en annen status enn 0\n" +" -@ hvis systemet støtter det, vis en fil med utvidede attributter\n" +" som en mappe med attributtene som innhold\n" +" \n" +" Standard for symbolske lenker er at de følges, som om «-L» er valgt.\n" +" «..» behandles ved at den nå tidligere stinavn-komponenten fjernes\n" +" én skråstrek tilbake eller til begynnelsen av MAP.\n" +" \n" +" Avslutningsstatus:\n" +" Status er 0 hvis skallet har byttet mappe, og hvis $PWD er valgt uten problemer\n" +" ved bruk av «-P». Ellers er status noe annet enn 0." + +#: builtins.c:425 +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" +" \t\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 ut navn på gjeldende arbeidsmappe.\n" +" \n" +" Valg:\n" +" -L\tskriv ut verdien av $PWD hvis dette er navnet på\n" +" \tgjeldende arbeidsmappe\n" +" -P\tskriv ut fysisk mappe, uten symbolske lenker\n" +" \n" +" «pwd» kjører med valget «-L» som standard.\n" +" \n" +" Avslutningsstatus:\n" +" Status er 0, med mindre bruker tar et ugyldig valg eller\n" +" programmet ikke klarer å lese gjeldende mappe." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Null-kommando.\n" +" \n" +" Dette har ingen effekt. Kommandoen gjør ingenting.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid vellykket." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Gi et vellykket resultat.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid vellykket." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Gi et mislykket resultat.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid mislykket." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Kjør en enkel kommando, eller vis informasjon om kommandoer.\n" +" \n" +" Kjører valgt KOMMANDO med ARG uten oppslag av skallfunksjoner, eller viser\n" +" informasjon om valgte KOMMANDOer. Dette kan brukes til å kalle kommandoer\n" +" på disk når det finens en funksjon med samme navn.\n" +" \n" +" Valg:\n" +" -p\tbruk en standardverdi for STI som garantert finner alle\n" +" \tstandardverktøyene\n" +" -v\tskriv ut en beskrivelse av KOMMANDO i «type»-stil\n" +" -V\tskriv ut en mer detaljert beskrivelse av hver KOMMANDO\n" +" \n" +" Avslutningsstatus:\n" +" Samme som statuskoden fra KOMMANDO, eller mislykket hvis KOMMANDO ikke finnes." + +#: builtins.c:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Gi verdier og attributter til variabler.\n" +" \n" +" Lag variabler og gi dem attributter. Hvis ingen NAVN er valgt,\n" +" vises attributter og verdier av alle variabler.\n" +" \n" +" Valg:\n" +" -f\tbegrens handling eller visning til funksjonsnavn og definisjoner\n" +" -F\tbegrens visning til funksjonsnavn (linjenummer og\n" +" \tkildefil kommer i tillegg ved feilsøking)\n" +" -g\tlag globale variabler ved bruk innenfor en skallfunksjon\n" +" \t(ignoreres ved annen bruk)\n" +" -I\thvis du oppretter en lokal variabel, arv attributtene og verdien\n" +" -p\tvis attributter og verdi av hvert valgt NAVN\n" +" \n" +" Valg som justerer attributter:\n" +" -a\tgjør valgte NAVN til indekserte tabeller (hvis det støttes)\n" +" -A\tgjør valgte NAVN til assosiative tabeller (hvis det støttes)\n" +" -i\tgi valgte NAVN attributten «integer» (heltall)\n" +" -l\tkonverter valgte NAVN til små bokstaver\n" +" -n\tgjør valgt NAVN til en referanse til variabelen med egen verdi som navn\n" +" -r\tskrivebeskytt valgte NAVN\n" +" -t\tgi valgte NAVN attirbutten «trace»\n" +" -u\tkonverter valgte NAVN til store bokstaver\n" +" -x\tgjør valgte NAVN eksporterbare\n" +" \n" +" Bruk «+» i stedet for «-» for å slå av aktuell attributt.\n" +" \n" +" Variabler med heltallsattributt blir evaluert aritmetisk (se\n" +" kommandoen «let») når de får en verdi.\n" +" \n" +" Ved bruk innenfor funksjoner gjør «declare» valgte NAVN lokale, som med\n" +" kommandoen «local». Valget «-g» slår av denne oppførselen.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller\n" +" det oppstår en variabel-tildelingsfeil." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Gi verdier og attributter til variabler.\n" +" \n" +" Dette er synonymt med «declare» (se «help declare»)." + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definer lokale variabler.\n" +" \n" +" Lag en lokal variabel med valgt NAVN og VERDI. Du kan foreta\n" +" VALG i henhold til kommandoen «declare».\n" +" \n" +" Lokale variabler kan bare brukes innenfor en funksjon. De er kun synlige\n" +" for funksjonen de lages innenfor, samt underfunksjoner.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg, det oppstår\n" +" en feil under variabeltildeling eller skallet ikke kjører en funksjon." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Skriv argumenter til standardutdata.\n" +" \n" +" Vis ARGumenter, adskilt med enkelt mellomromtegn og\n" +" etterfulgt av linjeskift, på standardutdata. \n" +" \n" +" Valg:\n" +" -n\tikke legg til linjeskift\n" +" -e\tslå på tolkning av skråstrek-skiftetegn\n" +" -E\tslå uttrykkelig av tolkning av skåstrek-skiftetegn\n" +" \n" +" «echo» tolker følgende skiftetegn:\n" +" \a\tsystemvarsel\n" +" \\b\trettetast\n" +" \\c\tignorer videre utdata\n" +" \\e\tskiftetegn\n" +" \\E\tskiftetegn\n" +" \\f\tsideskift\n" +" \\n\tny linje\n" +" \\r\tlinjeskift-tegn\n" +" \\t\thorisontal tabulator\n" +" \\v\tvertikal tabulator\n" +" \\\\\tomvendt skråstrek\n" +" \\0nnn\ttegn med ASCII-kode NNN (oktal). NNN kan bestå av\n" +" \t0 til 3 oktale sifre\n" +" \\xHH\t8-bit-tegn med verdi HH (heksadesimal). HH\n" +" \tkan bestå av ett eller to hex-sifre\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre det oppstår en skrivefeil." + +#: builtins.c:597 +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 ut argumenter til standardutdata.\n" +" \n" +" Vis ARGumenter på standardutdata, etterfulgt av linjeskift.\n" +" \n" +" Valg:\n" +" -n\tikke ta med linjeskift\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre det oppstår en skrivefeil." + +#: builtins.c:612 +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 "" +"Slå på og av innebygde skallfunksjoner.\n" +" \n" +" Slår av og på innebygde skallkommandoer. Ved å slå av kan du\n" +" kjøre en kommando på disk med samme navnet som en skallkommando\n" +" uten å måtte bruke fullstendig filsti.\n" +" \n" +" Valg:\n" +" -a\tskriv ut en liste som viser hvilke kommandoer som er slått på\n" +" -n\tslå av hvert valgt NAVN, eller vis en liste over kommandoer som er slått av\n" +" -p\tskriv ut liste over kommandoer i et gjenbrukbart format\n" +" -s\tbare skriv ut navn på innebygde Posix-spesialkommandoer\n" +" \n" +" Valg for dynamisk innlasting:\n" +" -f\tHent NAVN fra delt objekt-FILNAVN\n" +" -d\tFjern en kommando som er lastet inn med -f\n" +" \n" +" Hvis du ikke tar noen valg, blir hvert NAVN slått på.\n" +" \n" +" Bruk «enable -n test» for å bruke «test» i $PATH i stedet for\n" +" versjonen som er innebygd i skallet.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre valgt NAVN ikke er innebygd eller det oppstår feil." + +#: builtins.c:640 +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 "" +"Kjør argumenter som en skallkommando.\n" +" \n" +" Kombiner ARGumenter i én streng, bruk resultatet som inndata i skallet,\n" +" og kjør dette som kommando(er).\n" +" \n" +" Avslutningsstatus:\n" +" Samme som valgt kommando, eller vellykket hvis kommando er null." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Tolk valg-argumenter.\n" +" \n" +" Getopts brukes av skallprosedyrer til å tolke posisjonsparametre\n" +" som valg.\n" +" \n" +" VALGSTRENG inneholder bokstaver som skal behandles som valg.\n" +" Hvis en bokstav etterfølges av kolon, forventer valget et argument.\n" +" Argumentet holdes adskilt fra valget med blanktegn.\n" +" \n" +" getopts plasserer neste valg i skallvariabelen $name hver gang det\n" +" kalles, laster inn navnet hvis det ikke finnes, og\n" +" indeks for neste argument som skal behandles i skallvariabelen OPTIND.\n" +" OPTIND lastes inn til 1 hver gang skallet eller et skallskript kjøres.\n" +" Når et valg krever et argument plasseres argumentet i skallvariabelen OPTARG.\n" +" \n" +" getopts rapporterer feil på én av to måter. Hvis første tegn i VALGSTRENG\n" +" er kolon, rapporteres feil uten direkte feilmeldinger til bruker.\n" +" Hvis getopts ser et ugyldig valg, plasseres aktuelt valgtegn i OPTARG.\n" +" Hvis et obligatorisk argument ikke er gitt, legger getopts et «:» i NAVN og\n" +" bruker oppdaget valgtegn som OPTARG. Hvis getopts ikke er i stillemodus,\n" +" og ser et ugyldig valg, brukes «?» som NAVN, og OPTARG tømmes.\n" +" Hvis et obligatorisk argument ikke er gitt, legger getopts et «?»\n" +" i NAVN, tømmer OPTARG og skriver ut en feilmelding.\n" +" \n" +" Hvis skallvariabelen OPTERR har verdien 0, slår getopts av utskrift\n" +" av feilmeldinger, selv hvis første tegn i VALGSTRENG ikke er kolon.\n" +" OPTERR har verdien 1 som standard.\n" +" \n" +" Getopts tolker vanligvis posisjonsparametre, men hvis\n" +" flere argumenter er gitt, blir disse tolket i stedet.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis et valg finnes, og mislykket hvis et valg ikke finnes\n" +" eller det oppstår en annen feil." + +#: builtins.c:694 +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Erstatt skallet med valgt kommando.\n" +" \n" +" Kjør KOMMANDO, og erstatt dette skallet med valgt program.\n" +" ARGUMENTER sendes videre til valgt KOMMANDO. Hvis KOMMANDO ikke er valgt,\n" +" blir videresendinger brukt i gjeldende skall.\n" +" \n" +" Valg:\n" +" -a name\tsend NAVN som argument nummer null for KOMMANDO\n" +" -c\t\tkjør valgt KOMMANDO med et tomt miljø\n" +" -l\t\tbruk bindestrek som argument nummer null for COMMAND\n" +" \n" +" Hvis kommandoen ikke kan kjøres, avsluttes ikke-interaktivt skall, med mindre\n" +" skallvalget «execfail» er brukt.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre valgt KOMMANDO ikke finnes eller det oppstår en videresendingsfeil." + +#: builtins.c:715 +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 "" +"Avslutt skallet.\n" +" \n" +" Avslutt skallet med status N. Hvis N utelates, er statuskoden\n" +" den samme som forrige kjørte kommando." + +#: builtins.c:724 +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 "" +"Avslutt et innloggingsskall.\n" +" \n" +" Avslutter et innloggingsskall med status N. Dette gir feilmelding hvis det\n" +" ikke kjøres i et innloggingsskall." + +#: builtins.c:734 +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 "" +"Vis eller kjør kommandoer fra historikklista.\n" +" \n" +" fc brukes til å vise list eller redigere og kjøre kommandoer på nytt fra historikklista.\n" +" FØRSTE og SISTE kan være tall som angir rekkevidde. FØRSTE kan også være en\n" +" streng, som betyr nyeste kommando som begynner med denne strengen.\n" +" \n" +" Valg:\n" +" -e ENAME\tvelg hvilket redigeringsprogram som skal brukes. Standard er FCEDIT, evt. EDITOR\n" +" \t\teller vi\n" +" -l \tvis linjer i stedet for å redigere\n" +" -n\tikke vis linjenumre\n" +" -r\tvis linjer i omvendt rekkefølge (nyeste linjer øverst)\n" +" \n" +" I formatet «fc -s [pat=rep …] [kommando]» kjøres KOMMANDO\n" +" på nytt etter at GAMMEL=NY er utført.\n" +" \n" +" Et nyttig alias for dette er r='fc -s'. Slik blir «r cc» ensbetydende\n" +" med å kjøre forrige kommando med navn som begynner på «cc», og «r»\n" +" betyr å kjøre forrige kommando.\n" +" \n" +" Avslutningsstatus:\n" +" Enten vellykket, samme som kjørt kommando eller noe annet enn null hvis det oppstår feil." + +#: builtins.c:764 +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 "" +"Flytt jobb til forgrunnen.\n" +" \n" +" Plasser jobb med id-en JOB_SPEC i forgrunnen, slik at den blir\n" +" gjeldende jobb. Hvis JOB_SPEC ikke er oppgitt, brukes jobben som\n" +" allerede oppfattes som gjeldende i skallet.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som kommandoen som legges i forgrunnen, eller mislykket hvis det oppstår feil." + +#: builtins.c:779 +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 "" +"Flytt jobber til bakgrunnen.\n" +" \n" +" Plasser jobber med id-er JOB_SPEC i bakgrunnen, som om de\n" +" ble startet med «&». Hvis JOB_SPEC ikke er oppgitt, brukes jobben som allerede\n" +" som gjeldende i skallet.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre jobbkontroll er slått av eller det oppstår feil." + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Husk eller vis programplasseringer.\n" +" \n" +" Finn ut og husk fullstendige stinavn på hvert kommandoNAVN. Hvis\n" +" ingen argumenter er gitt, viser programmet lagrede programplasseringer.\n" +" \n" +" Valg:\n" +" -d\t\tglem lagret plassering av valgt(e) NAVN\n" +" -l\t\tskriv ut i gjenbrukbart format\n" +" -p stinavn\tbruk valgt STINAVN som fullstendig stinavn på valgt NAVN\n" +" -r\t\tglem alle lagrede plasseringer\n" +" -t\t\tskriv ut lagret plassering av valgt(e) NAVN, med\n" +" \t\tNAVN foran aktuell plassering hvis flere NAVN er valgt\n" +" Argumenter:\n" +" NAVN\t\tProgrammet søker etter hvert NAVN i $PATH og legger det til i lista\n" +" \t\tover lagrede kommandoer.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre NAVN ikke finnes eller bruker tar et ugyldig valg." + +#: builtins.c:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is given." +msgstr "" +"Vis informasjon om innebygde kommandoer.\n" +" \n" +" Vis kort sammendrag om innebygde kommandoer. Hvis MØNSTER er\n" +" valgt, vises detaljert hjelp til bruk av alle kommandoer som samsvarer\n" +" med MØNSTER. Ellers vises en liste over hjelpeemner.\n" +" \n" +" Valg:\n" +" -d\tskriv ut en kort beskrivelse av hvert emne\n" +" -m\tetterlikn «manpage»-format i bruksdata\n" +" -s\tbare vis et kort brukssammendrag per emne som samsvarer\n" +" \t\tmed MØNSTER\n" +" \n" +" Argumenter:\n" +" MØNSTER\tVelger hjelpeemne\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre et MØNSTER ikke finnes eller bruker tar et ugyldig valg." + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 "" +"Vis eller gjør endringer i kommandohistorikk.\n" +" \n" +" Vis historikk som en liste med linjenumre, og legg til «*» foran\n" +" endrede oppføringer. Argumentet N viser siste N antall oppføringer.\n" +" \n" +" Valg:\n" +" -c\ttøm historikk ved å slette alle oppføringer\n" +" -d posisjon\tslett historikkoppføring ved valgt posisjon.\n" +"\t\tNegativ posisjon teller fra slutten.\n" +" \n" +" -a\tlegg til linjer fra gjeldende økt i historikkfil\n" +" -n\tles alle historikklinjer som ikke allerede er lest inn fra historikkfil\n" +" -r\tles historikkfil og legg til innhold i historikkliste\n" +" -w\tlagre gjeldende historikk i historikkfil\n" +" \n" +" -p\tutfør historikkutvidelse per ARGument og vis resultatet\n" +" \tuten å lagre det i historikkliste\n" +" -s\tlegg til ARGumenter i historikkliste som én enkelt oppføring\n" +" \n" +" Hvis FILNAVN er valgt, brukes dette som historikkfil. Ellers brukes\n" +" $HISTFILE hvis den har en verdi. Ellers brukes «~/.bash_history».\n" +" \n" +" Hvis $HISTTIMEFORMAT har en verdi som ikke er null, brukes denne\n" +" verdien som formatstreng for strftime(3) for å skriv ut tidsstempelet i\n" +" hver historikkoppføring. Ellers skrives ingen tidsstempler ut.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:879 +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\tlists only processes that have changed status since the last\n" +" \t\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 "" +"Vis status for bakgrunnsjobber.\n" +" \n" +" Vis aktive bakgrunnsjobber. JOBBSPES begrenser utskrift til valgt jobb.\n" +" Hvis ingenting er valgt, vises status for alle aktive jobber.\n" +" \n" +" Valg:\n" +" -l\tvis prosess-ID-er i tillegg til vanlig informasjon\n" +" -n\tbare vis prosesser som har endret stattus siden forrige\n" +" \tvarsling\n" +" -p\tbare vis prosess-ID-er\n" +" -r\tbare skriv ut kjørende jobber\n" +" -s\tbare skriv ut ventende jobber\n" +" \n" +" Hvis «-x» er valgt, kjøres KOMMANDO straks alle ARGumenterte\n" +" jobber er erstattet med prosess-ID-en til gjeldende prosessgruppeleder.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil.\n" +" Hvis «-x» er valgt, hentes statuskode fra aktuell KOMMANDO." + +#: builtins.c:906 +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" +" \t\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 "" +"Fjern jobber fra gjeldende skall.\n" +" \n" +" Fjerner hvert JOBBSPES-argument fra tabellen med aktive jobber.\n" +" Hvis ingen JOBBSPES er valgt, brukes jobben som regnes som gjeldende.\n" +" \n" +" Valg:\n" +" -a\tfjern alle jobber hvis JOBBSPES ikke er angitt\n" +" -h\tmarker hver JOBBSPES slik at SIGHUP ikke sendes til jobben hvis skallet\n" +" \tmottar et SIGHUP\n" +" -r\tbare fjern kjørende jobber\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar ugyldig(e) valg eller JOBBSPES." + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 signal til en jobb.\n" +" \n" +" Gi prosesser (valgt med PID eller JOBBSPES) et signal\n" +" (valgt med SIGSPES eller SIGNUM). Hvis hverken SIGSPES eller SIGNUM er valgt,\n" +" brukes SIGTERM.\n" +" \n" +" Valg:\n" +" -s sig\tSIG er et signalnavn\n" +" -n sig\tSIG er et signalnummer\n" +" -l\tvis signalnavn. Hvis «-l» etterfølges av argumenter,\n" +" \tantas disse å være signalnumre som det skal vises navn på\n" +" -L\ttilsvarer «-l»\n" +" \n" +" Kill er en innebygget skallkommando av to grunner: den tillater bruk av jobb-ID\n" +" i stedet for prosess-ID, og lar bruker drepe prosesser hvis grensa for\n" +" antall tillatte prosesser er nådd.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:949 +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 "" +"Kontroller aritmetiske uttrykk.\n" +" \n" +" Kontroller hvert ARGument som et aritmetisk uttrykk. Kontroll utføres i\n" +" breddefaste heltall uten overflodssjekk, men deling på 0 fanges opp\n" +" og markeres som en feil. Følgende liste over operatører er\n" +" sortert gruppevis på presedensnivå, som vises i synkende rekkefølge.\n" +" \n" +" \tid++, id--\tvariabel post-inkrement, post-dekrement\n" +" \t++id, --id\tvariabel pre-inkrement, pre-dekrement\n" +" \t-, +\t\tunær minus, pluss\n" +" \t!, ~\t\tlogisk og bitvis negasjon\n" +" \t**\t\teksponentiasjon\n" +" \t*, /, %\t\tmultiplikasjon, divisjon, rest\n" +" \t+, -\t\taddisjon, subtraksjon\n" +" \t<<, >>\t\tvenstre og høyre bitvis bytte\n" +" \t<=, >=, <, >\tsammenlikning\n" +" \t==, !=\t\tlikhet, ulikhet\n" +" \t&\t\tbitvis AND\n" +" \t^\t\tbitvis XOR\n" +" \t|\t\tbitvis OR\n" +" \t&&\t\tlogisk AND\n" +" \t||\t\tlogisk OR\n" +" \texpr ? expr : expr\n" +" \t\t\tbetinget operatør\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\toppgave\n" +" \n" +" Skallvariabler tillates som operand. Variabelens navn erstattes med\n" +" verdien (tvunget til et breddefast heltall) i et uttrykk.\n" +" Variabelen behøver ikke heltallsattributt for å kunne brukes i et uttrykk.\n" +" \n" +" Operatører regnes ut etter presedens. Underuttrykk i parentes\n" +" regnes ut først, og kan overstyre overnevnte presedensregler.\n" +" \n" +" Avslutningsstatus:\n" +" Hvis siste ARGument blir 0, er status 1. Ellers er statuskoden 0." + +#: builtins.c:994 +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. By default, the backslash character escapes delimiter characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Les en linje fra standard inndata og del den opp i felt.\n" +" \n" +" Leser en enkeltlinje fra standard inndata, eller fra fildeskriptor FD\n" +" hvis «-u» er valgt. Linja deles opp i felt på samme måte som orddeling.\n" +" Første ord tildeles første NAVN, ord nummer to til NAVN nummer to,\n" +" og så videre. Eventuelle restrerende ord tildeles siste NAVN.\n" +" Bare tegn som finnes i $IFS regnes som ord-skilletegn.\n" +" \n" +" Hvis ingen NAVN er oppgitt, legges lest linje i variabelen REPLY.\n" +" \n" +" Valg:\n" +" -a tabell\tknytt leste ord til sekvens-indekser i \n" +" \t\ttabellvariabelen TABELL, talt fra null\n" +" -d skill\tfortsett frem til første SKILLetegn, i stedet for frem til linjeskift\n" +" -e\t\tbruk Readline til å hente linje\n" +" -i tekst\tBruk valgt TEKST med Readline\n" +" -n n\tgå tilbake etter å ha lest N antall tegn i stedet for å vente på ny linje,\n" +" \t\tmen bruk skilletegn hvis linja er kortere enn N\n" +" \t\tles tegn før skilletegn\n" +" -N N\tgå tilbake etter å ha lest nøyaktig N antall tegn, med mindre\n" +" \t\tEOF eller tidsavbrudd oppstår (skilletegn ignoreres)\n" +" -p ledet\tskriv ut valgt LEDETekst uten å legge til linjeskift før lesing\n" +" -r\t\tikke tillat bruk av skråstrek som skiftetegn\n" +" -s\t\tikke skriv ut inndata som kommer fra en terminal\n" +" -t tidsav\tavbryt og avslutt med feil hvis en hel linje med inndata\n" +" \t\tikke blir lest ferdig innen valgt TIDSAVbrudd (i sekunder).\n" +" \t\tStandard avbruddstid hentes fra variabelen TMOUT. TIDSAVbrudd kan være\n" +" \t\tet brøktall. Hvis TIDSAV er 0, går read tilbake umiddelbart,\n" +" \t\tog prøver ikke å lese data. I sistnevnte tilfelle avslutter read bare\n" +" \t\tvellykket hvis inndata er tilgjengelig på valgt fildeskriptor.\n" +" \t\tAvslutningsstatus er større enn 128 ved tidsavbrudd\n" +" -u fd\t\tles fra fildeskriptor FD i stedet for standard inndata\n" +" \n" +" Avslutningsstatus:\n" +" Null (vellykket), med mindre programmet møter EOF, får tidsavbrudd\n" +" (i så fall er verdien høyere enn 128), det oppstår en variabel-tidelingsfeil,\n" +" eller valget «-u» argumenteres med en ugyldig fildeskriptor." + +#: builtins.c:1042 +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 "" +"Gå ut av en skallfunksjon.\n" +" \n" +" Avslutter en funksjon eller kildeskript med status N.\n" +" Hvis N er utelatt, brukes statuskoden fra forrige kommando\n" +" i funksjonen eller skriptet.\n" +" \n" +" Avslutningsstatus:\n" +" N, eller mislykket hvis skallet ikke kjører en funksjon eller et skript." + +#: builtins.c:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"Legg til eller fjern verdier for skallvalg og posisjonsparametre.\n" +" \n" +" Endre verdier av skall-attributter og posisjonsparametre, eller\n" +" vis navn og verdier av skallvariabler.\n" +" \n" +" Valg:\n" +" -a Marker variabler som er endret eller laget for eksportering.\n" +" -b Varsle jobbavbrudd umiddelbart.\n" +" -e Avslutt hvis en kommando avslutter med annen status enn null.\n" +" -f Slå av generering av filnavn («globbing»).\n" +" -h Husk plassering av kommandoer ved oppslag.\n" +" -k Legg alle tildelingsargumenter for en kommando i miljøet,\n" +" og ikke bare de som kommer før kommandonavnet.\n" +" -m Slå på jobbkontroll.\n" +" -n Les kommandoer, men ikke kjør dem.\n" +" -o valgnavn\n" +" Gi verdi til variabelen som samsvarer med valgnavn:\n" +" allexport tilsvarer «-a»\n" +" braceexpand tilsvarer «-B»\n" +" emacs rediger linjer med et emacs-aktig grensesnitt\n" +" errexit tilsvarer «-e»\n" +" errtrace tilsvarer «-E»\n" +" functrace tilsvarer «-T»\n" +" hashall tilsvarer «-h»\n" +" histexpand tilsvarer «-H»\n" +" history slå på kommandohistorikk\n" +" ignoreeof ikke avslutt skall ved lesing av EOF\n" +" interactive-comments\n" +" tillat kommentarer i interaktive kommandoer\n" +" keyword tilsvarer «-k»\n" +" monitor tilsvarer «-m»\n" +" noclobber tilsvarer «-C»\n" +" noexec tilsvarer «-n»\n" +" noglob tilsvarer «-f»\n" +" nolog godtas, men ignoreres\n" +" notify tilsvarer «-b»\n" +" nounset tilsvarer «-u»\n" +" onecmd tilsvarer «-t»\n" +" physical tilsvarer «-P»\n" +" pipefail returverdi av en kommandokø er statusen for\n" +" siste kommando som avslutter med en annen status enn null,\n" +" eller null hvis alle kommandoer avsluttet med null\n" +" posix endre bash-oppførsel hvor standardoppførselen er\n" +" annerledes enn Posix-standarden, slik at bash\n" +" samsvarer med Posix\n" +" privileged tilsvarer «-p»\n" +" verbose tilsvarer «-v»\n" +" vi rediger linjer med et vi-aktig grensesnitt\n" +" xtrace tilsvarer «-x»\n" +" -p Slått på når virkelig og effektiv bruker-ID ikke er like.\n" +" Dette slår av behandling av fila $ENV og importering av\n" +" skallfunksjoner. Hvis du slår av dette valget, blir effektiv uid og\n" +" gid det samme som virkelig uid og gid.\n" +" -t Avslutt når én kommando er lest og kjørt.\n" +" -u Behandle udefinerte variabler som en feil.\n" +" -v Skriv ut skall-inndatalinjer når de leses.\n" +" -x Skriv ut kommandoer og argumenter når de kjøres.\n" +" -B utfør «brace»-utvidelse\n" +" -C Ikke tillat overskriving av vanlige filer ved\n" +" videresending av utdata.\n" +" -E Gi ERR-felle videre til skallfunksjoner.\n" +" -H Slå på historikk-subsidiering i «!»-stil. Dette er slått på\n" +" som standard i interaktive skall.\n" +" -P Ikke følg symbolske lenker ved kjøring av kommandoer\n" +" som «cd».\n" +" -T Gi DEBUG-felle videre til skallfunksjoner.\n" +" -- Tildel gjenstående argumenter til posisjonsparametre.\n" +" Hvis ingen argumenter gjenstår, tømmes posisjonsparametrene.\n" +" - Knytt gjenstående argumenter til posisjonsparametre.\n" +" Valgene «-x» og «-v» er slått av.\n" +" \n" +" Bruk «+» i stedet for «-» for å slå av disse valgene.\n" +" De kan også brukes når skallet kalles. Gjeldende valgsett finnes\n" +" i «$-». Gjenstående antall ARGumenter er posisjonsparametre,\n" +" og tildeles i rekkefølge til $1, $2, … $n. Hvis ingen\n" +" ARGumenter er brukt, skrives alle skallvariabler ut.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg." + +#: builtins.c:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Fjern verdier og attributter fra skallvariabler og funksjoner.\n" +" \n" +" Fjern variabel og funksjon per oppgitt NAVN.\n" +" \n" +" Valg:\n" +" -f\tbehandle hvert NAVN som en skallfunksjon\n" +" -v\tbehandle hvert NAVN som en skallvariabel\n" +" -n\tbehandle hvert NAVN som en navnreferanse, og tilbakestill selve variabelen\n" +" \ti stedet for variabelen den refererer til\n" +" \n" +" Hvis ingen valg er tatt, prøver programmet først å tømme en variabel.\n" +" Hvis dette mislykkes, prøver programmet å tømme en funksjon.\n" +" \n" +" Enkelte variabler kan ikke tømmes. Se også «readonly».\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller et NAVN er skrivebeskyttet." + +#: builtins.c:1162 +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 "" +"Gi skallvariabler eksport-attributt.\n" +" \n" +" Markerer hvert valgt NAVN for automatisk eksportering til miljøet ved etterfølgende\n" +" kjørte kommandoer. Hvis VERDI er oppgitt, tildeles VERDI før eksportering.\n" +" \n" +" Valg:\n" +" -f\thenvis til skallfunksjoner\n" +" -n\tfjern eksport-attributt fra valgt(e) NAVN\n" +" -p\tvis en liste over alle eksporterte variabler og funksjoner\n" +" \n" +" Bruk argumentet«--» for å slå av videre behandling av valg.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg, eller et NAVN er ugyldig." + +#: builtins.c:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Marker skallvariabler som skrivebeskyttet.\n" +" \n" +" Marker hvert valgt NAVN som skrivebeskyttet. Verdier av NAVN kan ikke endres\n" +" av etterfølgende tildeling. Hvis VERDI er oppgitt, tildeles denne før\n" +" variabelen markeres som skrivebeskyttet.\n" +" \n" +" Valg:\n" +" -a\thenvis til indekserte tabellvariabler\n" +" -A\thenvis til assosiative tabellvariabler\n" +" -f\thenvis til skallfunksjoner\n" +" -p\tvis en liste over alle skrivebeskyttede variabler eller funksjoner,\n" +" avhengig av hvorvidt «-f» er valgt\n" +" \n" +" Bruk argumentet «--» for å slå av videre behandling av valg.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller NAVN." + +#: builtins.c:1203 +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 "" +"Flytt posisjonsparametre.\n" +" \n" +" Gi parametrene $N+1,$N+2 osv. nye navn som $1,$2 osv. Hvis N er\n" +" utelatt, brukes verdien 1.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre N er negativ eller større enn $#." + +#: builtins.c:1215 builtins.c:1230 +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 "" +"Kjør kommandoer fra en fil i gjeldende skall.\n" +" \n" +" Les og kjør kommandoer fra valgt FILNAVN i gjeldende kall.\n" +" Elementene i $PATH brukes til å finne mappa med valgt FILNAVN.\n" +" Hvis ARGUMENTER brukes, bruke disse som posisjonsparametre\n" +" når valgt FILNAVN kjøres.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som siste kommando som ble kjørt via FILNAVN, eller\n" +" mislykket hvis FILNAVN ikke kan leses." + +#: builtins.c:1246 +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 "" +"Sett skallkjøring på pause.\n" +" \n" +" Sett kjøring av dette skallet på pause inntil det mottar et SIGCONT-signal.\n" +" Innloggingsskall kan ikke settes på pause med mindre du tvinger det fram.\n" +" \n" +" Valg:\n" +" -f\ttving skallpause, selv hvis skallet er et innloggingsskall\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre jobbkontroll er slått av eller det oppstår feil." + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Kontroller betinget uttrykk.\n" +" \n" +" Avslutter med status 0 (positiv, «true») eller 1 (negativ, «false»)\n" +" i henhold til resultatet av valgt UTTRykk. Uttrykk kan være unære eller binære.\n" +" Unære uttrykk brukes ofte for å undersøke status for en fil.\n" +" Streng- og tallkontroll-valg kan også brukes.\n" +" \n" +" Test endrer oppførsel i henhold til antall argumenter.\n" +" Se bash-bruksanvisninga for en fullstendig spesifikasjon.\n" +" \n" +" Filvalg:\n" +" \n" +" -a FIL Positiv hvis FIL finnes.\n" +" -b FIL Positiv hvis FIL er blokk-spesialfil.\n" +" -c FIL Positiv hvis FIL er tegn-spesialfil.\n" +" -d FIL Positiv hvis FIL er en mappe.\n" +" -e FIL Positiv hvis FIL finnes.\n" +" -f FIL Positiv hvis FIL finnes og er en vanlig fil.\n" +" -g FIL Positiv hvis FIL er «set-group-id».\n" +" -h FIL Positiv hvis FIL er en symbolsk lenke.\n" +" -L FIL Positiv hvis FIL er en symbolsk lenke.\n" +" -k FIL Positiv hvis FIL er «sticky».\n" +" -p FIL Positiv hvis FIL er et navngitt datarør.\n" +" -r FIL Positiv hvis FIL kan leses av deg.\n" +" -s FIL Positiv hvis FIL finnes og ikke er tom.\n" +" -S FIL Positiv hvis FIL er en sokkel.\n" +" -t FD Positiv hvis FD er åpen i en terminal.\n" +" -u FIL Positiv hvis FIL er «set-user-id».\n" +" -w FIL Positiv hvis FIL kan overskrives av deg.\n" +" -x FIL Positiv hvis FIL kan kjøres av deg.\n" +" -O FIL Positiv hvis FIL har deg som effektiv eier.\n" +" -G FIL Positiv hvis FIL har din gruppe som effektiv gruppetilhørighet.\n" +" -N FIL Positiv hvis FIL er blitt endret siden den ble lest sist.\n" +" \n" +" FIL1 -nt FIL2 Positiv hvis FIL1 er nyere enn FIL2 (i følge\n" +" endringsdato).\n" +" \n" +" FIL1 -ot FIL2 Positiv hvis FIL1 er eldre enn FIL2.\n" +" \n" +" FIL1 -ef FIL2 Positiv hvis FIL1 er en hard lenke til FIL2.\n" +" \n" +" Strengvalg:\n" +" \n" +" -z STRENG Positiv hvis STRENG er tom.\n" +" \n" +" -n STRENG\n" +" STRENG Positiv hvis STRENG ikke er tom.\n" +" \n" +" STRENG1 = STRENG2\n" +" Positiv hvis STRENGene er like.\n" +" STRENG1 != STRENG2\n" +" Positiv hvis STRENGene ikke er like.\n" +" STRENG1 < STRENG2\n" +" Positiv hvis STRENG1 havner over STRENG2 når de sorteres leksikografisk.\n" +" STRENG1 > STRENG2\n" +" Positiv hvis STRENG1 havner under STRENG2 når de sorteres leksikografisk.\n" +" \n" +" Andre valg:\n" +" \n" +" -o VALG Positiv hvis skallvalget OPTION er slått på.\n" +" -v VAR\t Positiv hvis skallvariabelen VAR har en verdi\n" +" -R VAR\t Positiv hvis skallvariabelen VAR har en verdi, og er en navnreferanse.\n" +" ! UTTR Positiv hvis UTTR er usant.\n" +" UTTR1 -a UTTR2 Positiv hvis både UTTR1 og UTTR2 er sanne.\n" +" UTTR1 -o UTTR2 Positiv hvis enten UTTR1 eller UTTR2 er sanne.\n" +" \n" +" arg1 OP arg2 Aritmetiske tester. OP må være enten «-eq», «-ne»,\n" +" «-lt», «-le», «-gt» eller «-ge».\n" +" \n" +" Aritmetiske binærvalg gir positiv verdi hvis ARG1 er lik, ulik, mindre enn,\n" +" lik-eller-mindre-enn, større enn eller større-enn-eller-lik ARG2.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis UTTR gir positiv verdi, og mislykket hvis det gir negativ verdi eller\n" +" bruker skriver inn et ugyldig argument." + +#: builtins.c:1344 +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 "" +"Kontroller betinget uttrykk.\n" +" \n" +" Dette er synonymt med den innebygde kommandoen «test», men\n" +" siste argument må være «]» for å samsvare med «[»." + +#: builtins.c:1353 +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 "" +"Vis prosesstider.\n" +" \n" +" Skriver ut oppsamlet bruker- og systemtid for skallet og alle underprosesser.\n" +" \n" +" Avslutningsstatus:\n" +" Alltid vellykket." + +#: builtins.c:1365 +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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\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 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 "" +"Fang signaler og andre hendelser.\n" +" \n" +" Definerer og slår på brytere som skal kjøres når skallet mottar signaler\n" +" eller havner i andre tilstander.\n" +" \n" +" ARG er en kommando som skal leses og kjøres når skallet mottar signalet/-ene\n" +" i henhold til SIGNALSPES. Hvis ARG er enten utelatt eller «-»,\n" +" og én SIGNALSPES er brukt, tilbakestilles valgt(e) signal(er) til\n" +" opprinnelig verdi. Hvis ARG er null, ignoreres SIGNALSPES av skallet\n" +" og kommandoene det kjører.\n" +" \n" +" Hvis en SIGNALSPES er EXIT (0), kjøres ARG når skallet avslutter.\n" +" Hvis en SIGNALSPES er DEBUG, kjøres ARG før hver kommando.\n" +" Hvis en SIGNALSPES er RETURN, kjøres ARG hver gang en skallfunksjon, skript\n" +" eller innebygd kommando har kjørt ferdig. Hvis en SIGNALSPES\n" +" er ERR, kjøres ARG hver gang en feilkjørt kommando ville ført til at skallet\n" +" avsluttes når «-e» er valgt.\n" +" \n" +" Hvis ingen argumenter er brukt, skriver trap ut en liste over kommandoer\n" +" som er tilknyttet hvert signal.\n" +" \n" +" Valg:\n" +" -l\tskriv ut en liste over signalnavn og tilknyttede numre\n" +" -p\tvis trap-kommandoer som er tilknyttet hver SIGNALSPESifikasjon\n" +" \n" +" Hver SIGNALSPES er enten et signalnavn fra eller et signalnummer.\n" +" Signalnavn skiller mellom små og store bokstaver. Prefikset «SIG» er valgfritt.\n" +" Du kan sende et signal til skallet med «kill -signal $$».\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre en SIGNALSPES eller et valg er ugyldig." + +#: builtins.c:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 "" +"Vis informasjon om kommandotype.\n" +" \n" +" Vis hvordan hvert NAVN ville blitt tolket hvis det ble brukt som\n" +" et kommandonavn.\n" +" \n" +" Valg:\n" +" -a\tvis alle plasseringer som inneholder en kjørbar fil med oppgitt NAVN.\n" +" \tHer inngår alle alias, innebygde kommandoer og funksjoner, med mindre\n" +" \t«-p» er valgt i tillegg\n" +" -f\tikke slå opp skallfunksjoner\n" +" -P\ttving et søk i STI etter NAVN, selv hvis det er et alias,\n" +" \tinnebygd kommando eller en funksjon, og vis navn på fila\n" +" \tsom ville blitt kjørt\n" +" -p\tvis enten navn på fila som ville blitt kjørt, eller ingenting hvis\n" +" \t«type -t NAVN» ikke fører til «file».\n" +" -t\tbeskriv NAVN som enten «alias», «keyword» (nøkkelord),\n" +" \t«function» (funksjon), «builtin» (innebygd kommando), «file» (fil) eller \n" +" \t«'» (ikke funnet), if NAME is an alias, shell\n" +" \n" +" Argumenter:\n" +" NAVN\tKommandonavn som skal tolkes.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis alle NAVN finnes, og mislykket hvis ett eller flere ikke finnes." + +#: builtins.c:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"Endre grenser for skallressurser.\n" +" \n" +" Lar deg kontrollere mengden ressurser som skal være tilgjengelig for skall og\n" +" prosessene det lager på systemer som tillater det.\n" +" \n" +" Valg:\n" +" -S\tbruk myk («soft») ressursgrense\n" +" -H\tbruk «hard» ressursgrense\n" +" -a\tvis alle gjeldende grenser\n" +" -b\tstørrelse på sokkel-mellomlager\n" +" -c\tmaksimal størrelse på opprettede kjernefiler\n" +" -d\tmaksimal størrelse på datasegment av en prosess\n" +" -e\tmaksimal prioritet («nice»-verdi)\n" +" -f\tmaksimal størrelse på filer som skrives av skallet og underprosesser\n" +" -i\tmaksimalt antall ventende signaler\n" +" -k\tmaksimalt antall k-køer som er tildelt denne prosessen\n" +" -l\tmaksimal minnemengde en prosess kan låse\n" +" -m\tmaksimal «resident set»-størrelse\n" +" -n\tmaksimalt antall åpne fildeskriptorer\n" +" -p\tstørrelse på mellomlager for datarør\n" +" -q\tmaksimalt antall byte i POSIX-meldingskøer\n" +" -r\tmaksimal sanntidsprioritet\n" +" -s\tmaksimal stabelstørrelse\n" +" -t\tmaksimal cpu-tid (i sekunder)\n" +" -u\tmaksimalt antall brukerprosesser\n" +" -v\tstørrelsen på virtuelt minne\n" +" -x\tmaksimalt antall fillåser\n" +" -P\tmaksimalt antall pseudoterminaler\n" +" -R\tden maksimale tiden en sanntidsprosess kan kjøre før blokkering\n" +" -T\tmaksimalt antall tråder\n" +" \n" +" Det er ikke alle valg som støttes på alle plattformer.\n" +" \n" +" Hvis GRENSE er oppgitt, brukes denne som ny verdi for valgt ressurs.\n" +" Du kan også bruke spesialverdiene «soft» (myk), «hard», og «unlimited» (ubegrenset).\n" +" Ellers skriver programmet ut gjeldende verdi av valgt ressurs. Hvis ingenting\n" +" er valgt, brukes «-f».\n" +" \n" +" Verdier oppgis i 1024-byte-enheter, bortsett fra «-t» som oppgis i sekunder,\n" +" «-p» som oppgis i 512-byte-enheter og «-u» som er et uskalert antall prosesser.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:1483 +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 "" +"Vis eller endre filmodus-maske.\n" +" \n" +" Endrer brukers standardmaske for nye filer til valgt MODUS. Hvis ingen\n" +" MODUS er valgt, skrives gjeldende maskeverdi ut.\n" +" \n" +" Hvis MODUS begynner med et siffer, tolkes den som et oktalt tall,\n" +" og ellers som en symbolsk modusstreng av typen som brukes av chmod(1).\n" +" \n" +" Valg:\n" +" -p\tskriv ut i et format som kan gjenbrukes som inndata hvis ingen MODUS er valgt\n" +" -S\tgjør utdata symbolsk (ikke skriv ut oktaltall)\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre MODUS er ugyldig eller bruker tar et ugyldig valg." + +#: builtins.c:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Vent på fullføring av jobb, og skriv ut avslutningsstatus.\n" +" \n" +" \n" +" Vent på valgt(e) prosess(er) (valgt med ID, som kan være prosess-ID eller\n" +" jobbspesifikasjon), og skriv ut statuskode. Hvis ID ikke er valgt,\n" +" venter programmet på alle aktive underprosesser, og avslutter\n" +" med kode null. Hvis ID er en jobbspesifikasjon, venter programmet på alle\n" +" prosesser i kommandokøen for valgt jobb.\n" +" \n" +" Hvis «-n» er valgt, venter på en enkelt jobb fra listen over IDer,\n" +" eller, hvis ingen IDer er oppgitt skriver programmet ut avslutningsstatus for neste jobb.\n" +" \n" +" Hvis «f» er valgt og jobbkontroll er slått på, venter programmet på at\n" +" valgt ID skal avslutte i stedet for å vente på statusendring.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som siste ID: mislykket hvis enten ID er ugyldig eller\n" +" bruker tar et ugyldig valg, eller hvis «-n» er oppgitt og \n" +" skallet ikke har noen uventede barne-prosesser." + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." +msgstr "" +"Vent på ferdigstillelse av prosess, og rapporter avslutningsstatus.\n" +" \n" +" Venter på hver prosess som er valgt med PID, og rapporterer avsluttende statuskode.\n" +" Hvis PID ikke er valgt, venter kommandoen på alle aktive underprosesser,\n" +" og avslutter med null-status. PID må være en prosess-ID.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som siste PID. Mislykket hvis PID er ugyldig, eller hvis\n" +" bruker tar et ugyldig valg." + +#: builtins.c:1549 +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 "" +"Kjør kommandoer for hvert medlem i en liste.\n" +" \n" +" Løkka «for» kjører en rekke kommandoer per medlem i en liste\n" +" over elementer. Hvis «in ORD …;» ikke er angitt, brukes«in \"$@\"».\n" +" NAVN gis til hvert element i ORD, og KOMMANDOER kjøres.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1563 +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»-løkke.\n" +" \n" +" Tilsvarer\n" +" \t(( UTTR1 ))\n" +" \twhile (( UTTR2 )); do\n" +" \t\tKOMMANDOER\n" +" \t\t(( UTTR3 ))\n" +" \tdone\n" +" UTTR1, UTTR2 og UTTR3 er aritmetiske uttrykk. Hvis et uttrykk\n" +" utelates, oppfører programmet seg som om uttrykket er lik 1.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1581 +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 "" +"Velg ord fra en liste og kjør kommandoer.\n" +" \n" +" Utvid og lag en liste av valgt(e) ORD.\n" +" Utvidede ord skrive ut på standard feilkanal, anledet av et tall.\n" +" Hvis «in ORD» ikke er valgt, brukes «in \"$@\"». Deretter vises\n" +" PS3-ledetekst, og en linje leses fra standard inndata. Hvis linja\n" +" består av et tall som tilsvarer antall ord, endres NAVN slik at det\n" +" tilsvarer dette tallet. Hvis linja er tom, vises ORD og ledetekst på\n" +" nytt. Hvis programmet møter EOF, avslutter kommandoen. Andre\n" +" verdier fører til at NAVN endres til null. Lest linje lagres i variabelen\n" +" REPLY. KOMMANDOER kjøres etter hvert utvalg frem til programmet\n" +" støter på en bruddkommando.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørt kommando." + +#: builtins.c:1602 +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 "" +"Rapporter medgått tid i kommandokø-kjøring.\n" +" \n" +" Kjør valgt DATARØR og skriv ut en oppsummering av reell tid, bruker-CPU-tid\n" +" og system-CPU-tid som er medgått ved kjøring av DATARØR idet det avsluttes.\n" +" \n" +" Valg:\n" +" -p\tkjør tidsoppsummering i gjenbrukbart Posix-format.\n" +" \n" +" Verdien av variabelen «TIMEFORMAT» brukes som utdata-format.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som statuskoden fra valgt DATARØR." + +#: builtins.c:1619 +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 "" +"Kjør kommandoer basert på mønster-søk.\n" +" \n" +" Kjør KOMMANDOER som samsvarer med ORD og MØNSTER.\n" +" Tegnet «|» brukes til å holde mønstre adskilt.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørte kommando." + +#: builtins.c:1631 +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 "" +"Kjør kommandoer på gitte betingelser.\n" +" \n" +" Kjør lista «if KOMMANDOER». Hvis avslutningsstatus er null, kjøres\n" +" «then KOMMANDOER». Ellers kjøres hver «elif KOMMANDOER»-liste\n" +" etter tur. Hvis status er null ved sistnevnte, kjøres tilhørende «then KOMMANDOER»\n" +" og if-kommandoen avslutter. Ellers kjøres evt. lista «else KOMMANDOER».\n" +" Avslutningsstatus for hele betingelsesuttrykket er statuskoden fra sist kjørt kommando,\n" +" eller null hvis ingen tilstand er sann.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørt kommando." + +#: builtins.c:1648 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kjør kommandoer så lenge en test lykkes.\n" +" \n" +" Utvid og kjør KOMMANDOER-2 så lenge siste kommando i\n" +" «while» avslutter med null-status.\n" +" \n" +" Avslutningsstatus:\n" +" Returnerer statusen til den siste kommandoen som ble kjørt." + +#: builtins.c:1660 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Kjør kommandoer så lenge en test mislykkes.\n" +" \n" +" Utvid og kjør KOMMANDOER-2 så lenge siste kommando i\n" +" «until» avslutter med en annen statuskode enn null.\n" +" \n" +" Avslutningsstatus:\n" +" Returnerer statusen til den siste kommandoen som ble kjørt." + +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Lag medprosess med valgt NAVN.\n" +" \n" +" Kjør valgt KOMMANDO synkront, med standard inn- og utdata for kommandoen\n" +" som er tilkoblet via et datarør til fildeskriptorer med indeks 0 og 1 i en tabellvariabel \n" +" med oppgitt NAVN i kjørende skall.\n" +"\v StandardNAVN er «COPROC».\n" +" \n" +" coproc avslutter med kode 0." + +#: builtins.c:1686 +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 "" +"Definer en skallfunksjon.\n" +" \n" +" Lag en skallfunksjon med valgt NAVN. NAVN kjører KOMMANDOer i gjeldende skallkontekst\n" +" når det kjøres som en enkel kommando, og argumenter videresendes til funksjonen som\n" +" $1…$n. Funksjonens navn ligger i $FUNCNAME.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre valgt NAVN er skrivebeskyttet." + +#: builtins.c:1700 +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 "" +"Organiser kommandoer i grupper.\n" +" \n" +" Kjør en rekke kommandoer som en gruppe. Slik kan du videresende\n" +" et helt kommandosett.\n" +" \n" +" Avslutningsstatus:\n" +" Samme som sist kjørt kommando." + +#: builtins.c:1712 +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 "" +"Gjenoppta jobb i forgrunnen.\n" +" \n" +" Tilsvarer argumentet «JOBBSPES» for kommandoen «fg». Gjenoppta\n" +" en jobb som venter eller kjører i bakgrunnen. «JOBBSPES» kan\n" +" enten være et jobbnavn eller -nummer. Bruk «&» etter JOBBSPES for å\n" +" legge jobben i bakgrunnen, som om jobbspesifikasjonen var et argument for «bg».\n" +" \n" +" Avslutningsstatus:\n" +" Samme som statuskoden for gjenopptatt jobb." + +#: builtins.c:1727 +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 "" +"Gå gjennom aritmetisk uttrykk.\n" +" \n" +" Valgt UTTRYKK prøves i henhold til regler for aritmetisk utregning.\n" +" Tilsvarer «let UTTRYKK».\n" +" \n" +" Avslutningsstatus:\n" +" 1 hvis UTTRYKK blir 0, og ellers 0." + +#: builtins.c:1739 +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 "" +"Kjør betinget kommando.\n" +" \n" +" Gir statuskode 0 eller 1, avhengig av utfallet av betinget UTTRYKK.\n" +" Uttrykk bygges opp på samme måte som i den innebygde kommandoen «test»,\n" +" og kan kombineres som følger:\n" +" \n" +" ( UTTRYKK )\tViser verdien av UTTRYKK\n" +" ! UTTRYKK\t\tPositiv hvis UTTRYKK er usant, ellers negativ\n" +" UTTR1 && UTTR2\tPositiv hvis både UTTR1 og UTTR2 er sant, ellers negativ\n" +" UTTR1 || UTTR2\tPositiv hvis enten UTTR1 eller UTTR2 er sant, ellers negativ\n" +" \n" +" Ved bruk av «==» og «!=» brukes etterfølgende streng som\n" +" et mønster, og programmet utfører mønsterutlikning.\n" +" Ved bruk av «=~» utliknes etterfølgende streng som\n" +" et regulært uttrykk.\n" +" \n" +" Valgene «&&» og «||» kontrollerer ikke UTTR2 hvis UTTR1 allerede\n" +" har gitt svar på uttrykkets verdi.\n" +" \n" +" Avslutningsstatus:\n" +" 0 eller 1, avhengig av UTTRYKKets verdi." + +#: builtins.c:1765 +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 "" +"Vanlige skallvariabel-navn og bruk.\n" +" \n" +" BASH_VERSION\tInformasjon om Bash-versjon.\n" +" CDPATH\tEn kolondelt liste over mapper som skal gjennomsøkes\n" +" \t\tfor mapper som er brukt som argumenter for «cd».\n" +" GLOBIGNORE\tEn kolondelt liste over mønstre som beskriver filnavn\n" +" \t\tsom skal ignoreres av stinavn-utvidelse.\n" +" HISTFILE\tNavn på fil hvor kommandohistorikk for gjeldende bruker er lagret.\n" +" HISTFILESIZE\tMaksimalt antall linjer denne fila kan inneholde.\n" +" HISTSIZE\tMaksimalt antall historikklinjer et kjørende skall har tilgang til.\n" +" HOME\tFullstendig sti til gjeldende brukers hjemmemappe.\n" +" HOSTNAME\tNavn på gjeldende vert.\n" +" HOSTTYPE\tType prosessor denne versjonen av Bash kjører på.\n" +" IGNOREEOF\tKontrollerer skallets handling ved mottak av\n" +" \t\tEOF-tegn som eneste inndata. Hvis denne har en verdi, er verdien\n" +" \t\tgjeldende antall EOF-tegn som kan dukke opp på rad på en tom linje\n" +" \t\tfør skallet avslutter (standard: 10). Hvis denne ikke har en verdi,\n" +" \t\ttolkes EOF som slutt på inndata.\n" +" MACHTYPE\tEn streng som beskriver systemet Bash kjører på nå.\n" +" MAILCHECK\tHvor ofte (i sekunder) Bash skal se etter ny e-post.\n" +" MAILPATH\tEn kolondelt liste over filnavn som Bash skal gjennomsøke\n" +" \t\tfor ny e-post.\n" +" OSTYPE\tVersjonen av Unix som denne versjonen av Bash kjører på.\n" +" PATH\tEn kolondelt liste over mapper som skal gjennomsøkes\n" +" \t\tved søk etter kommandoer.\n" +" PROMPT_COMMAND\tEn kommando som skal kjøres før utskrift av\n" +" \t\tprimær ledetekst.\n" +" PS1\t\tPrimær ledetekst-streng.\n" +" PS2\t\tSekundær ledetekst-streng.\n" +" PWD\t\tFullstendig sti til gjeldende mappe.\n" +" SHELLOPTS\tEn kolondelt liste over skallvalg som er i bruk.\n" +" TERM\tNavn på gjeldende terminaltype.\n" +" TIMEFORMAT\tUtdata-format for tidsstatistikk som vises av\n" +" \t\tdet reserverte ordet «time».\n" +" auto_resume\tEt kommandoord som dukker opp alene på en linje\n" +" \t\tblir kontrollert mot lista over ventende jobber. Hvis kommandoen finnes\n" +" \t\ti lista, flyttes den til forgrunnen.\n" +" \t\tVerdien «exact» betyr at kommandoen må være helt lik\n" +" \t\tet kommandonavn i lista over ventende jobber.\n" +" \t\t«substring» betyr at kommandoen må samsvare med en del\n" +" \t\tav navnet. Andre verdier betyr at kommandoen må\n" +" \t\tvære et prefiks av en ventende jobb.\n" +" histchars\tTegn som styrer historikkutvidelse og hurtig-subsidiering.\n" +" \t\tFørste tegn er historikk-subsidieringstegnet (vanligvis «!»),\n" +" \t\tdet andre er hurtig-subsidieringstegnet (vanligvis «^»), og\n" +" \t\tdet tredje er historikk-kommentar-tegnet (vanligvis «#»).\n" +" HISTIGNORE\tEn kolondelt liste over mønstre som bestemmer\n" +" \t\thvilke kommandoer som skal lagres i historikklista.\n" + +#: builtins.c:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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 "" +"Legg til mapper i stabel.\n" +" \n" +" Legg til en mappe i toppen av mappestabelen, eller roter\n" +" stabelen og gjør toppen av stabelen til gjeldende arbeidsmappe.\n" +" Hvis ingen argumenter er gitt, bytter de to øverste mappene plass..\n" +" \n" +" Valg:\n" +" -n\tIkke bytt mappe når mapper legges til i stabelen\n" +" \t(bare endre stabelen).\n" +" \n" +" Argumenter:\n" +" +N\tRoter stabelen og legg N-te mappe (talt fra\n" +" \tnull til venstre, etter «dirs») i toppen.\n" +" \n" +" -N\tRoter stabelen og legg N-te mappe (talt fra\n" +" \tnull til høyre, etter «dirs») i toppen.\n" +" \n" +" dir\tLegg til MAP i toppen av mappestabelen, og ta den i bruk\n" +" \tsom arbeidsmappe.\n" +" \n" +" Bruk kommandoen «dirs» for å vise mappestabelen.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre et ugyldig argument er brukt eller\n" +" mappebytte mislykkes." + +#: builtins.c:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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 "" +"Fjern mapper fra stabelen.\n" +" \n" +" Fjern oppføringer fra mappestabelen. Hvis ingen argumenter er gitt,\n" +" fjernes øverste mappe fra stabelen, og tar i bruk ny toppmappe som arbeidsmappe.\n" +" \n" +" Valg:\n" +" -n\tIkke bytt mappe når mapper fjernes fra stabelen\n" +" \t(bare endre stabelen).\n" +" \n" +" Argumenter:\n" +" +N\tFjern N-te mappe (talt fra null til venstre, etter «dirs»).\n" +" F.eks.: «popd +0» fjerner første mappe, og «popd +1» mappe nr. 2.\n" +" \n" +" -N\tFjern N-te mappe (talt fra null til høyre, etter «dirs»).\n" +" F.eks.: «popd -0» fjerner siste mappe, og «popd -1» nest siste mappe.\n" +" \n" +" Bruk kommandoen «dirs» for å vise mappestabelen.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre et ugyldig argument er brukt eller\n" +" mappebytte mislykkes." + +#: builtins.c:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Vis mappestabel.\n" +" \n" +" Vis liste over hurtiglagrede mapper som er hurtiglagret med\n" +" kommandoen «pushd». Du kan gå opp igjen med kommandoen «popd». \n" +" Valg:\n" +" -c\ttøm mappestabel ved å slette alle elementer\n" +" -l\tikke skriv ut undermapper av brukers hjemmemappe som\n" +" \trelative stier med tilde-prefiks\n" +" -p\tskriv ut mappestabel med én oppføring per linje\n" +" -v\ttilsvarer «-p», men med stabelposisjon som prefiks\n" +" \n" +" Argumenter:\n" +" +N\tVis N-te oppføring (talt fra null til venstre, etter «dirs»).\n" +" -N\tVis N-te oppføring (talt fra null til høyre, etter «dirs»).\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"Juster og tilbakestill skallvalg.\n" +" \n" +" Endre innstilling for hvert VALGNAVN. Hvis ingen valg/argumenter er brukt,\n" +" skriver programmet ut alle oppgitte VALGNAVN og viser hvorvidt de har en verdi.\n" +" Hvis ingen VALGNAVN er oppgitt, skriver programmet ut alle skallvalg.\n" +" \n" +" Valg:\n" +" -o\tbegrense VALGNAVN til det som er definert med «set -o»\n" +" -p\tskriv ut hvert skallvalg og vis status\n" +" -q\tikke skriv ut noe\n" +" -s\tslå på (gi verdi til) hvert VALGNAVN\n" +" -u\tslå av (tilbakestill) hvert VALGNAVN\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket hvis VALGNAVN er slått på, og mislykket hvis enten bruker \n" +" tar et ugyldig valg eller VALGNAVN er slått av." + +#: builtins.c:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or assignment\n" +" error occurs." +msgstr "" +"Formaterer og skriver ut ARGUMENTER på FORMATets premisser.\n" +" \n" +" Valg:\n" +" -v var\tlegg utdata i valgt VARiabel i stedet for å\n" +" \t\tvise den på standardutdata\n" +" \n" +" FORMAT er en tegnstreng som inneholder tre typer objekter:\n" +" - rene tegn (som kopieres til standardutdata),\n" +" - skiftetegn (som konverteres og kopieres til standardutdata), og\n" +" - formatspesifikasjoner (som skriver ut påfølgende argument).\n" +" \n" +" Printf tolker følgende standard-formatspes. i tillegg til de som står beskrevet i printf(1):\n" +" \n" +" %b\tutvid omvendt skråstrek-skiftesekvenser i gjeldende argument\n" +" %q\tgi argumentet anførselstegn slik at det kan brukes som skall-inndata\n" +" %Q\tsom %q, men bruk hvilken som helst presisjon på argumentet uten anførselstegn før\n" +" \t\tsitering\n" +" %(fmt)T skriv ut «date-time»-streng etter bruk av FMT som formatstreng\n" +" med strftime(3)\n" +" \n" +" Formatet gjenbrukes etter nødvendighet for å bruke opp alle argumentene.\n" +" Hvis det finnes færre argumenter enn formatet krever, oppfører overflødige\n" +" formatstrenger seg som om de var 0-verdier eller null-strenger.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår en\n" +" skrive- eller tidelingsfeil." + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Velg hvordan argumenter skal fullføres av Readline.\n" +" \n" +" Velg hvordan argumenter skal fullføres per NAVN.\n" +" Hvis brukeren ikke tar noen valg, blir gjeldende fullføringsspesifikasjoner\n" +" skrevet ut i et format som egner seg til gjenbruk.\n" +" \n" +" Valg:\n" +" -p\tskriv ut gjeldende fullføringsoppsett i et gjenbrukbart format (standard)\n" +" -r\tfjern en fullføringsspesifikasjon per NAVN\n" +" \t(eller fra alle spesifikasjoner hvis ingen NAVN er valgt)\n" +" -D\tbruk fullføringer og handlinger som standard for kommandoer uten\n" +" \tspesifikke definisjoner av fullføring\n" +" -E\tbruk fullføringer og handlinger på «tomme» kommandoer\n" +" -I\tbruk fullføringer og handlinger på første (kommando-) ord\n" +" \n" +" Handlinger tas i bruk i samme rekkefølge som valgene med\n" +" store bokstaver ovenfor. Valget «-D» har høyere prioritet\n" +" enn «-E», og begge har høyere prioritet enn «-I».\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:2004 +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 "" +"Vis mulige fullføringer basert på valgene.\n" +" \n" +" Dette er ment for å brukes i en skallfunksjon som genererer mulige\n" +" fullføringer. Hvis argumentet ORD brukes, genererer programmet\n" +" søketreff på ORD.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller det oppstår feil." + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"Endre eller vis fullføringsvalg.\n" +" \n" +" Endre fullføringsvalg per NAVN, eller kjørende fullføringsprosess hvis ingen\n" +" NAVN er valgt. Hvis ingen VALG er brukt, skriv enten ut fullføringsvalg per NAVN,\n" +" eller gjeldende fullføringsoppsett.\n" +" \n" +" Valg:\n" +" \t-o option\tEndre fullføringsVALG per NAVN\n" +" \t-D\t\tEndre valg for kommandofullføringa «default»\n" +" \t-E\t\tEndre valg for kommandofullføringa «empty»\n" +" \t-I\t\tEndre valg for fullføring av første ord\n" +" \n" +" Bruk «+o» i stedet for «-o» for å slå av valg.\n" +" \n" +" Argumenter:\n" +" \n" +" Hvert NAVN henviser til en kommando som må ha en fullføringsspesifikasjon\n" +" definert med den innebyde kommandoen «complete». Hvis ingen NAVN\n" +" er valgt, må compopt brukes av en funksjon som genererer fullføringer.\n" +" Valgene for den aktuelle fullføringsgeneratoren blir i så fall endret.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller NAVN\n" +" mangler fullføringsoppsett." + +#: builtins.c:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"Legg linjer fra standard inndata i en indeksert tabellvariabel.\n" +" \n" +" Legg linjer fra standard inndata i indeksert tabellvariabel TABELL, eller\n" +" fra fildeskriptor FD ved bruk av «-u». Variabelen MAPFILE er\n" +" standard TABELL.\n" +" \n" +" Valg:\n" +" -d skill\tBruk SKILLetegn til å avslutte linjer (i stedet for linjeskift)\n" +" -n antall\tIkke kopier flere enn valgt ANTALL linjer. Hvis ANTALL er 0, kopieres alle linjer.\n" +" -O oppr\tTildel til TABELL ved indeks-OPPRinnelse. Standard indeks er 0.\n" +" -s antall \tForkast valgt ANTALL linjer i starten.\n" +" -t\t\tFjern etterfølgende linjeskift fra hver lest linje.\n" +" -u fd\t\tLes linjer fra fildeskriptor FD i stedet for standard inndata.\n" +" -C tilbakekall\tVurder TILBAKEKALL hver gang valgt ANTALL linjer er lest.\n" +" -c antall\tVelg antall linjer som skal leses mellom hvert TILBAKEKALL.\n" +" \n" +" Argumenter:\n" +" ARRAY\t\tTabellvariabel-navn som skal brukes i fildata.\n" +" \n" +" Hvis «-C» er valgt men ikke «-c», brukes standardantallet 5000. Når\n" +" TILBAKEKALL vurderes, argumenteres det i tillegg med indeks av neste tabellelement\n" +" samt linjenummeret som skal tildeles aktuelt element.\n" +" \n" +" Hvis ingen eksplisitt opprinnelse er gitt, tømmes TABELL før den får tildelt noe.\n" +" \n" +" Avslutningsstatus:\n" +" Vellykket, med mindre bruker tar et ugyldig valg eller TABELL enten er\n" +" skrivebeskyttet eller en ikke-indeksert tabell." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Legg linjer fra en fil inn i en tabellvariabel.\n" +" \n" +" Dette er synonymt med «mapfile»." + +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: ugyldig nøkkel for assosiativ tabell" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Viser kontekst for kall av gjeldende underrutine.\n" +#~ " \n" +#~ " Hvis EXPR mangler, vises" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: prosess %5ld (%s) i _kommandokø" + +#~ msgid "Unknown Signal #" +#~ msgstr "Ukjent signal #" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Opphavsrett (C) 2018 Free Software Foundation, Inc." + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Opphavsrett (C) 2014 Free Software Foundation, Inc." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/po/nl.gmo b/po/nl.gmo index 9ff8b25..86de738 100644 Binary files a/po/nl.gmo and b/po/nl.gmo differ diff --git a/po/nl.po b/po/nl.po index 48b382f..f80f247 100644 --- a/po/nl.po +++ b/po/nl.po @@ -1,319 +1,359 @@ -# Dutch translations for bash -# Copyright (C) 2009 Free Software Foundation, Inc. +# Dutch translations for GNU bash. +# Copyright (C) 2022 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. # +# «Lernfähiger Software! Ich lach mich kaputt!» +# # 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 +# de onbepaalde wijs, maar het begin van de gedetailleerde 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. +# zou dus "Stilstand" kunnen zijn. # # Erick Branderhorst , 1996. # Julie Vermeersch , 2004. -# Benno Schulenberg , 2006, 2008. # Erwin Poeze , 2009. +# Benno Schulenberg , 2006, 2008, 2010, 2011, 2013, 2014. +# Benno Schulenberg , 2015, 2016, 2019, 2020, 2022. msgid "" msgstr "" -"Project-Id-Version: bash-4.0\n" +"Project-Id-Version: bash-5.2-rc1\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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-23 10:18+0200\n" +"Last-Translator: Benno Schulenberg \n" "Language-Team: Dutch \n" +"Language: nl\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" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "ongeldige array-index" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: kan geïndexeerd array niet omzetten naar associatief array" +msgid "%s: removing nameref attribute" +msgstr "%s: 'nameref'-eigenschap wordt verwijderd" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: ongeldige sleutel voor associatief array" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: kan geïndexeerd array niet omzetten naar associatief array" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: niet-numerieke index is niet mogelijk" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "Kan %s niet aanmaken: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" -"bash_execute_unix_command(): kan voor opdracht geen toetsenkaart vinden" +msgstr "bash_execute_unix_command(): kan voor opdracht geen toetsenkaart vinden" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: eerste teken dat geen witruimte is is niet '\"'" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "geen sluit-'%c' in %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: ontbrekend scheidingsteken (dubbele punt)" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "Kan '%s' niet losmaken in toetsenkaart" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "accoladevervanging: onvoldoende geheugen beschikbaar voor %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "accoladevervanging: onvoldoende geheugen beschikbaar voor %u elementen" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "accoladevervanging: onvoldoende geheugen beschikbaar voor '%s'" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "'%s': ongeldige naam voor toetsenkaart" +msgstr "'%s': ongeldige naam voor alias" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "bewerken van regels niet ingeschakeld" +msgstr "regelbewerking is niet ingeschakeld" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "'%s': ongeldige naam voor toetsenkaart" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "'%s': onbekende functienaam" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s is aan geen enkele toets gebonden\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s kan worden aangeroepen via " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "Kan %s niet losmaken" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "herhalingsaantal" -#: builtins/break.def:137 +#: builtins/break.def:139 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 +#: builtins/caller.def:136 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" +" 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." 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.\n" +"\n" +" De waarde van het argument geeft aan hoeveel frames er teruggegaan\n" +" moet worden vanaf de huidige; het bovenste frame heeft nummer 0." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME is niet gedefinieerd" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "te veel argumenten" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null-map" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD is niet gedefinieerd" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "regel %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "waarschuwing: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "%s: gebruik: " +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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: optie vereist een argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: vereist een numeriek argument" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: niet gevonden" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: ongeldige optie" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: ongeldige optienaam" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "'%s': is geen geldige naam" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "ongeldig octaal getal" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "ongeldig hexadecimaal getal" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "ongeldig getal" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: ongeldige signaalaanduiding" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: is een alleen-lezen variabele" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: kan niet toewijzen" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s valt buiten bereik" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s valt buiten bereik" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: taak bestaat niet" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: geen taakbesturing" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "geen taakbesturing" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: beperkte modus" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "beperkte modus" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: is geen ingebouwde opdracht van de shell" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "schrijffout: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "Instellen terminalattributen is mislukt: %s" +msgstr "fout tijdens instellen van terminaleigenschappen: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "Ophalen terminalattributen is mislukt: %s" +msgstr "fout tijdens verkrijgen van terminaleigenschappen: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: taakaanduiding is niet eenduidig" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "hulp is niet beschikbaar in deze versie" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "Kan '%s' niet verwijderen: %s is alleen-lezen" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "Kan '%s' niet verwijderen" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: ongeldige actienaam" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: is geen completerings-aanduiding" @@ -326,121 +366,156 @@ msgstr "waarschuwing: optie -F functioneert mogelijk niet zoals verwacht" msgid "warning: -C option may not work as you expect" msgstr "waarschuwing: optie -C functioneert mogelijk niet zoals verwacht" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "er wordt momenteel geen completeringsfunctie uitgevoerd" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "kan alleen worden gebruikt binnen een functie" -#: builtins/declare.def:360 +#: builtins/declare.def:437 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 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: is een alleen-lezen functie" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: verwijzingsvariabele mag geen array zijn" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: zelfverwijzing door naamsverwijzingsvariabele is niet toegestaan" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: circulaire naamsverwijzing" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "'%s': ongeldige variabelenaam voor naamsverwijzing" + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: aangehaalde samengesteld-array-toekenning is verouderd" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynamisch-laden is niet beschikbaar" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "kan gedeeld object %s niet openen: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamische ingebouwde functie is reeds geladen" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "laadfunctie voor %s geeft foutcode (%d): is niet geladen" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: is niet dynamisch geladen" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: is een map" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: is geen normaal bestand" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: kan een binair bestand niet uitvoeren" +msgstr "%s: kan binair bestand niet uitvoeren" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "Kan %s niet uitvoeren: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "uitgelogd\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "geen login-shell; gebruik 'exit'" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Er zijn nog gepauzeerde taken.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Er zijn nog draaiende taken.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "geen opdracht gevonden" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "geschiedenisaanduiding" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "huidige" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "taak %d is gestart zonder taakbesturing" @@ -455,41 +530,47 @@ msgstr "%s: ongeldige optie -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: optie vereist een argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hashen is uitgeschakeld" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: de hash-tabel is leeg\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "treffers commando\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, 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 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "Kan %s niet openen: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -503,23 +584,27 @@ 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" +"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" +"(Een sterretje (*) naast een naam betekent dat de functie uitgeschakeld is.)\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" msgstr "slechts één van '-a', '-n', '-r' of '-w' is mogelijk" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "geschiedenispositie" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ongeldig tijdsstempel" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: geschiedenisexpansie is mislukt" @@ -533,95 +618,115 @@ msgstr "%s: 'inlib' is mislukt" msgid "no other options allowed with `-x'" msgstr "bij '-x' zijn geen andere opties toegestaan" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, 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 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Onbekende fout" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "uitdrukking werd verwacht" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: is geen array-variabele" +msgstr "%s: is geen geïndexeerd array" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" msgstr "%s: ongeldige aanduiding van bestandsdescriptor" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: ongeldige bestandsdescriptor: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: ongeldig regelaantal" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, 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 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: ongeldige hoeveelheid" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "lege naam van array-variabele" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "ondersteuning van arrayvariabelen is vereist" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "'%s': ontbrekend opmaakteken" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "'%c': ongeldige aanduiding van tijdsopmaak" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "'%c': ongeldig opmaakteken" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "waarschuwing: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "probleem bij ontleden van opmaak: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "ontbrekend hexadecimaal cijfer bij \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "ontbrekend Unicode-cijfer bij \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "geen andere map" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: ongeldig argument" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "mappenstapel is leeg" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "mappenstapelindex" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -636,12 +741,10 @@ msgid "" " \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" +" +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" +" -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" @@ -661,7 +764,7 @@ msgstr "" " -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 +#: builtins/pushd.def:723 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" @@ -698,12 +801,12 @@ msgstr "" " 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" +" MAP Voegt deze map toe aan de top van de mappenstapel, en maakt het\n" +" de nieuwe werkmap.\n" "\n" " De opdracht 'dirs' toont de huidige mappenstapel." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -741,55 +844,48 @@ msgstr "" "\n" " De opdracht 'dirs' toont de huidige mappenstapel." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: ongeldige aanduiding van tijdslimiet" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "leesfout: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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'" +msgstr "kan alleen een 'return' doen uit een functie of een uit script aangeroepen met 'source'" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: is geen array-variabele" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: is geen functie" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "Kan '%s' niet exporteren" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "shift-aantal" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "kan shell-opties niet tegelijk inschakelen en uitschakelen" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: ongeldige shell-optienaam" @@ -798,400 +894,474 @@ msgstr "%s: ongeldige shell-optienaam" msgid "filename argument required" msgstr "vereist een bestandsnaam als argument" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: bestand niet gevonden" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "kan niet pauzeren" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "kan een inlog-shell niet pauzeren" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s is een alias voor '%s'\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s is een shell-sleutelwoord\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s is een functie\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s is een speciale ingebouwde shell-functie\n" + +#: builtins/type.def:301 #, 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 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s is %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s is gehasht (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: ongeldige limietwaarde" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "'%c': ongeldige opdracht" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: kan de limiet niet bepalen: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "limiet" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: kan de limiet niet wijzigen: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "octaal getal" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "'%c': ongeldige operator in symbolische modus" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " regel " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "laatste opdracht: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Afbreken..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "informatie: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "DEBUG-waarschuwing: " + +#: error.c:488 msgid "unknown command error" msgstr "onbekende opdrachtfout" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "ongeldig opdrachttype" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "ongeldige verbinder" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "ongeldige sprong" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\awachten op invoer duurde te lang -- automatisch afgemeld\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" msgstr "kan standaardinvoer niet omleiden vanaf /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: '%c': ongeldig opmaakteken" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc(): coproc [%d:%s] bestaat nog steeds" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "pijpfout" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximum 'eval'-nestingsniveau is overschreden (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximum 'source'-nestingsniveau is overschreden (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximum functie-nestingsniveau is overschreden (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "%s: beperkte modus: '/' in opdrachtnamen is niet toegestaan" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: opdracht niet gevonden" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: kan niet uitvoeren: vereist bestand is niet gevonden" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: ongeldige interpreter" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: kan binair bestand %s niet uitvoeren" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "'%s' is een speciale ingebouwde shell-functie" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "kan bestandsdescriptor %d niet dupliceren naar bestandsdescriptor %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "recursieniveau van expressies is overschreden" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "recursiestapel-onderloop" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "syntaxfout in expressie" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "poging tot toewijzing aan een niet-variabele" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "syntaxfout in toewijzing aan variabele" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "deling door nul" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "**interne fout**: onjuist symbool in toewijzingsexpressie" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "':' werd verwacht voor een voorwaardelijke expressie" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "exponent is kleiner dan 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "naam verwacht na pre-increment of pre-decrement" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "ontbrekend ')'" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "syntaxfout: operator verwacht" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "syntaxfout: ongeldige rekenkundige operator" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (het onjuiste symbool is \"%s\")" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "ongeldige rekenkundige basis" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "ongeldige integerconstante" + +#: expr.c:1603 msgid "value too great for base" msgstr "waarde is te groot voor basis" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: expressiefout\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getwd(): kan geen geen toegang verkrijgen tot bovenliggende mappen" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "kan 'nodelay'-modus niet uitschakelen voor bestandsdescriptor %d" -#: input.c:258 +#: input.c:266 #, 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" +msgstr "kan geen nieuwe bestandsdescriptor reserveren voor bash-invoer vanuit bestandsdescriptor %d" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" -msgstr "" -"check_bash_input(): buffer bestaat al voor nieuwe bestandsdescriptor %d" +msgstr "check_bash_input(): buffer bestaat al voor nieuwe bestandsdescriptor %d" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline(): procesgroep van pijp" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LUS: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LUS: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" msgstr "afgesplitst PID %d hoort bij draaiende taak %d" -#: jobs.c:1005 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid(): PID %ld bestaat niet" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signaal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Klaar" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Gepauzeerd" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Gepauzeerd(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Wordt uitgevoerd" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Klaar(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Exit %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Onbekende afsluitwaarde" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(geheugendump gemaakt) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (werkmap: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "instellen van procesgroep %2$ld van dochter %1$ld" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for(): proces %ld is nergens geregistreerd" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job(): taak %d is gepauzeerd" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: geen lopende taken" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: taak is afgesloten" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: taak %d draait al op de achtergrond" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld(): WNOHANG wordt ingeschakeld om een onbegrensde blokkering te vermijden" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: regel %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (geheugendump gemaakt)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(werkmap is nu: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp() is mislukt" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: geen taakbesturing in de achtergrond" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: lijnprotocol" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid()" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "kan procesgroep (%d) van terminal niet instellen" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "er is geen taakbesturing in deze shell" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc(): controletest is mislukt: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1200,58 +1370,66 @@ msgstr "" "\r\n" "malloc(): %s:%d: controletest is mislukt\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "onbekend" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc(): een pointer op de lijst van vrije blokken is overschreven" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 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 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free(): aangeroepen met als argument een ongebruikt blok" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free(): onderloop: 'mh_nbytes' valt buiten bereik" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free(): onderloop: 'magic8' is beschadigd" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free(): blokgroottes van begin en eind zijn verschillend" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc(): aangeroepen met als argument een ongebruikt blok" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc(): onderloop: 'mh_nbytes' valt buiten bereik" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc(): onderloop: 'magic8' is beschadigd" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" msgstr "realloc(): blokgroottes van begin en eind zijn verschillend" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "ongeldige basis" @@ -1270,264 +1448,298 @@ msgstr "%s: ongeldige service" msgid "%s: bad network path specification" msgstr "%s: ongeldige aanduiding van netwerkpad" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "netwerkoperaties worden niet ondersteund" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale(): LC_ALL: kan niet van taalregio veranderen (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale(): LC_ALL: kan niet van taalregio veranderen (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc(): %s:%d: kan %lu bytes niet opnieuw reserveren" +msgstr "setlocale(): %s: kan niet van taalregio veranderen (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc(): %s:%d: kan %lu bytes niet opnieuw reserveren" +msgstr "setlocale(): %s: kan niet van taalregio veranderen (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "U hebt post in $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "U hebt nieuwe post in $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "De post in %s is gelezen.\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "syntaxfout: een rekenkundige uitdrukking is vereist" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "syntaxfout: onverwachte ';'" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "syntaxfout: '((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document(): ongeldig instructietype %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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')" +msgstr "regel %d van \"hier\"-document eindigt met einde van bestand (verwachtte '%s')" -#: make_cmd.c:756 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc(): lengte van invoerregel (%zu) overschrijdt SIZE_MAX (%lu): regel is afgekapt" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "maximum aantal \"hier\"-documenten is overschreden" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" msgstr "onverwacht bestandseinde tijdens zoeken naar bijpassende '%c'" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "onverwacht bestandseinde tijdens zoeken naar ']]'" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" msgstr "syntaxfout in conditionele expressie: onverwacht symbool '%s'" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "syntaxfout in conditionele expressie" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "onverwacht symbool '%s'; ')' werd verwacht" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "')' werd verwacht" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "onverwacht argument '%s' bij eenzijdige conditionele operator" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "onverwacht argument bij eenzijdige conditionele operator" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "" -"onverwacht symbool '%s'; tweezijdige conditionele operator werd verwacht" +msgstr "onverwacht symbool '%s'; tweezijdige conditionele operator werd verwacht" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "tweezijdige conditionele operator werd verwacht" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "onverwacht argument '%s' bij tweezijdige conditionele operator" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "onverwacht argument bij tweezijdige conditionele operator" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "onverwacht symbool '%c' in conditionele opdracht" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "onverwacht symbool '%s' in conditionele opdracht" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "onverwacht symbool %d in conditionele opdracht" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "syntaxfout nabij onverwacht symbool '%s'" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "syntaxfout nabij '%s'" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "syntaxfout: onverwacht bestandseinde" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "syntaxfout" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Gebruik \"%s\" om de shell te verlaten.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "onverwacht bestandseinde tijdens zoeken naar bijpassende ')'" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "completion(): functie '%s' niet gevonden" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion(): %s: mogelijke herprobeerlus" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert(): %s: lege COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command(): ongeldige verbinder '%d'" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: ongeldige bestandsdescriptor: %s" +msgstr "xtrace_set(): %d: ongeldige bestandsdescriptor" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set(): bestandspointer is NIL" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace-bestandsdescriptor (%d) != bestandsnummer van xtrace-bestandspointer (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf(): '%c': ongeldig opmaakteken" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "bestandsdescriptor valt buiten bereik" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: omleiding is niet eenduidig" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: kan bestaand bestand niet overschrijven" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: beperkte modus: omleiden van uitvoer is niet toegestaan" -#: redir.c:180 +#: redir.c:219 #, 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 +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: kan geen lijst toewijzen aan een array-element" +msgstr "%s: kan bestandsdescriptor niet toewijzen aan variabele" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "/dev/(tcp|udp)/host/port is niet mogelijk zonder netwerk" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "omleidingsfout: kan bestandsdescriptor niet dupliceren" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "Kan /tmp niet vinden; maak deze aan!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp dient een geldige mapnaam te zijn" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "pretty-printing-modus wordt genegeerd in interactieve shells" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: ongeldige optie" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "kan UID niet op %d instellen; effectieve UID is %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "kan GID niet op %d instellen; effectieve GID is %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "kan debugger niet starten; debugging-modus is uitgeschakeld" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: is een map" + +#: shell.c:1907 msgid "I have no name!" msgstr "Ik heb geen naam!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, versie %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1536,40 +1748,49 @@ msgstr "" "Gebruik: %s [opties]\n" " %s [opties] scriptbestand...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "Lange opties:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD, of -c OPDRACHT, of -O SHOPT-OPTIE (enkel bij aanroep)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s, of -o optie (veranderbaar via 'set')\n" -#: shell.c:1822 +#: shell.c:2094 #, 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 +#: shell.c:2095 #, 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" +msgstr "Typ '%s -c help' voor meer informatie over ingebouwde shell-functies.\n" -#: shell.c:1824 +#: shell.c:2096 #, 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 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Webpagina van 'bash': \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Algemene hulp bij gebruik van GNU-software: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask(): %d: ongeldige operatie" @@ -1588,9 +1809,10 @@ msgstr "Opgehangen" msgid "Interrupt" msgstr "Onderbroken" +# Verleden tijd, "Afgesloten", net als de andere actiesignaalnamen. #: siglist.c:59 msgid "Quit" -msgstr "Afsluiten" +msgstr "Afgesloten" #: siglist.c:63 msgid "Illegal instruction" @@ -1610,7 +1832,7 @@ msgstr "EMT-instructie" #: siglist.c:83 msgid "Floating point exception" -msgstr "Drijvende-komma-berekeningsfout" +msgstr "Drijvendekomma-berekeningsfout" #: siglist.c:87 msgid "Killed" @@ -1634,15 +1856,15 @@ msgstr "Gebroken pijp" #: siglist.c:107 msgid "Alarm clock" -msgstr "Alarmklok" +msgstr "Wekker" #: siglist.c:111 msgid "Terminated" -msgstr "Afgesloten" +msgstr "Beëindigd" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "Spoedeisende I/O-toestand" +msgstr "Urgente in-/uitvoertoestand" #: siglist.c:119 msgid "Stopped (signal)" @@ -1658,11 +1880,11 @@ msgstr "Dochter is geëlimineerd of gestopt" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "Gepauzeerd (tty-invoer)" +msgstr "Gepauzeerd (terminalinvoer)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "Gepauzeerd (tty-uitvoer)" +msgstr "Gepauzeerd (terminaluitvoer)" #: siglist.c:147 msgid "I/O ready" @@ -1736,634 +1958,612 @@ msgstr "HFT-geluidssequentie is afgespeeld" msgid "Information request" msgstr "Verzoek om informatie" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Onbekend signaalnummer" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Onbekend signaal #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "ongeldige vervanging: geen sluit-'%s' in %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "kan geen pijp maken voor procesvervanging" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "kan geen dochterproces maken voor procesvervanging" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" msgstr "kan pijp genaamd %s niet openen om te lezen" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" msgstr "kan pijp genaamd %s niet openen om te schrijven" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "kan pijp genaamd %s niet dupliceren als bestandsdescriptor %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "opdrachtsubstitutie: null-byte in invoer is genegeerd" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "kan geen pijp maken voor opdrachtvervanging" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "kan geen dochterproces maken voor opdrachtvervanging" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "" -"command_substitute(): kan pijp niet dupliceren als bestandsdescriptor 1" +msgstr "command_substitute(): kan pijp niet dupliceren als bestandsdescriptor 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: ongeldige variabelenaam voor naamsverwijzing" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: ongeldige indirecte expansie" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: ongeldige variabelenaam" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter is niet ingesteld" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: lege parameter, of niet ingesteld" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: resultaat van deeltekenreeks is kleiner dan nul" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: ongeldige vervanging" -#: subst.c:7045 +#: subst.c:9678 #, 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:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "toekomstige versies van de shell zullen dit als een rekenkundige vervanging evalueren" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" msgstr "ongeldige vervanging: geen afsluitende '`' in %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "geen overeenkomst: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "argument werd verwacht" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: een geheel-getaluitdrukking werd verwacht" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "')' werd verwacht" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "tweezijdige operator werd verwacht, %s gevonden" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "eenzijdige operator werd verwacht, %s gevonden" + +#: test.c:896 msgid "missing `]'" msgstr "ontbrekende ']'" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaxfout: onverwachte '%s'" + +#: trap.c:220 msgid "invalid signal number" msgstr "ongeldig signaalnummer" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: maximum 'trap-handler'-niveau is overschreden (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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..." +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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler(): ongeldig signaal %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "fout tijdens importeren van functiedefinitie voor '%s'" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" msgstr "shell-niveau is te hoog (%d); teruggezet op 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "" -"make_local_variable(): er is geen functiecontext in huidige geldigheidsbereik" +msgstr "make_local_variable(): er is geen functiecontext in huidige geldigheidsbereik" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: aan variabele mag geen waarde toegewezen worden" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: kan geen waarde overerven van incompatibel type" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: toekenning van geheel getal aan naamsverwijzing" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" -"all_local_variables(): er is geen functiecontext in huidige geldigheidsbereik" +msgstr "all_local_variables(): er is geen functiecontext in huidige geldigheidsbereik" -#: variables.c:3376 +#: variables.c:4757 #, c-format msgid "%s has null exportstr" -msgstr "" +msgstr "*** %s heeft lege export-tekenreeks" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "ongeldig teken '%d' in export-tekenreeks voor %s" +msgstr "*** ongeldig teken '%d' in export-tekenreeks voor %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "geen '=' in export-tekenreeks voor %s" +msgstr "*** geen '=' in export-tekenreeks voor %s" -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context(): er is geen 'global_variables'-context" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" -"pop_scope(): top van 'shell_variables' is geen tijdelijk geldigheidsbereik" +msgstr "pop_scope(): top van 'shell_variables' is geen tijdelijk geldigheidsbereik" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "Kan %s niet openen: %s" +msgstr "%s: Kan %s niet openen als BESTAND" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: ongeldige bestandsdescriptor: %s" +msgstr "%s: ongeldige waarde %s voor 'trace'-bestandsdescriptor" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright (C) 2009 Free Software Foundation, Inc." +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: compatibiliteitswaarde valt buiten bereik" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \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 +#: version.c:86 version2.c:86 #, 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:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Dit is vrije software; u mag het vrijelijk wijzigen en verder verspreiden." -#: 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" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Er is GEEN GARANTIE, voor zover de wet dit toestaat." -#: 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 \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 +#: xmalloc.c:93 +#, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc(): kan geen %lu bytes reserveren (%lu bytes gereserveerd)" +msgstr "%s: kan geen %lu bytes reserveren (%lu bytes gereserveerd)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc(): kan geen %lu bytes reserveren" +msgstr "%s: kan geen %lu bytes reserveren" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: kan geen %lu bytes reserveren (%lu bytes gereserveerd)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc(): %s:%d: kan geen %lu bytes reserveren" +msgstr "%s: %s:%d: kan geen %lu bytes reserveren" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [NAAM[=WAARDE] ... ]" -#: builtins.c:47 +#: builtins.c:49 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]" +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-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]" +"bind [-lpvsPSVX] [-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 +#: builtins.c:56 msgid "break [n]" msgstr "break [N]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [N]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [INGEBOUWDE_SHELLFUNCTIE [ARGUMENT...]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" msgstr "caller [EXPRESSIE]" -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "cd [-L|-P] [MAP]" - +# XXX FIXME is this right? +# can -@ only combine with -P, not with -L? #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "pwd [-LP]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|(-P [-e])] [-@] [MAP]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "waar" - -#: builtins.c:72 -msgid "false" -msgstr "onwaar" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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]..." +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [NAAM[=WAARDE] ...] of declare -p [-aAfFilnrtux] [NAAM ...]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] NAAM[=WAARDE] ... of typeset -p [-aAfFilnrtux] [NAAM ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [OPTIE] NAAM[=WAARDE]..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [ARGUMENT...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [ARGUMENT...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f BESTANDSNAAM] [NAAM...]" -#: builtins.c:92 +#: builtins.c:94 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...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts OPTIETEKENREEKS NAAM [ARGUMENT...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a NAAM] [OPDRACHT [ARGUMENT...]] [OMLEIDING...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [N]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [N]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [TAAKAANDUIDING]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [TAAKAANDUIDING...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p PADNAAM] [-dt] [NAAM...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [PATROON...]" +msgstr "help [-dms] [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:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d POSITIE] [N] of: history -anrw [BESTANDSNAAM] of: history -ps ARGUMENT..." -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "" -"jobs [-lnprs] [TAAKAANDUIDING...] of jobs -x OPDRACHT [ARGUMENT...]" +msgstr "jobs [-lnprs] [TAAKAANDUIDING...] of: jobs -x OPDRACHT [ARGUMENT...]" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "disown [-h] [-ar] [TAAKAANDUIDING...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [TAAKAANDUIDING... | PID...] " -#: builtins.c:132 -msgid "" -"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " -"[sigspec]" +#: builtins.c:134 +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 +#: builtins.c:136 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 ...]" +#: builtins.c:138 +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...]" +"read [-ers] [-a ARRAY] [-d SCHEIDINGSTEKEN] [-i TEKST] [-p PROMPT]\n" +" [-n AANTAL_TEKENS] [-N AANTAL_TEKENS] [-t TIJDSLIMIET]\n" +" [-u BESTANDSDESCRIPTOR] [NAAM...]" -#: builtins.c:138 +#: builtins.c:140 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...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o OPTIENAAM] [--] [-] [ARGUMENT...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [NAAM[=WAARDE] ...] of export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NAAM...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [NAAM[=WAARDE] ...] of readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [NAAM[=WAARDE] ...] of: export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [NAAM[=WAARDE] ...] of: readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [N]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source BESTANDSNAAM [ARGUMENTEN]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". BESTANDSNAAM [ARGUMENTEN]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [EXPRESSIE]" -#: builtins.c:160 -msgid "[ arg... ]" -msgstr "[ ARGUMENT... ]" - #: builtins.c:162 -msgid "times" -msgstr "times" +msgid "[ arg... ]" +msgstr "[ EXPRESSIE... ]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[ARGUMENT] SIGNAALAANDUIDING...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] NAAM..." -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [GRENSWAARDE]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [GRENSWAARDE]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [MODUS]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [ID]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p VAR] [ID ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [PID]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [-n] [PID ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NAAM [in WOORDEN...] ; do OPDRACHTEN; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( EXPR1; EXPR2; EXPR3 )); do OPDRACHTEN; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NAAM [in WOORDEN... ;] do OPDRACHTEN; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] PIJPLIJN" -#: builtins.c:190 +#: builtins.c:192 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" +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if OPDRACHTEN; then OPDRACHTEN; [elif OPDRACHTEN; then OPDRACHTEN;]... [else OPDRACHTEN;] fi" #: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until OPDRACHTEN; do OPDRACHTEN; done" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while OPDRACHTEN; do OPDRACHTEN2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "coproc [NAAM] opdracht [verwijzingen]" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until OPDRACHTEN; do OPDRACHTEN2; done" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "function NAAM { OPDRACHTEN ; } of NAAM () { OPDRACHTEN ; }" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAAM] OPDRACHT [OMLEIDINGEN]" #: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function NAAM { OPDRACHTEN ; } of: NAAM () { OPDRACHTEN ; }" + +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ OPDRACHTEN ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "TAAKAANDUIDING [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( EXPRESSIE ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ EXPRESSIE ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "variables - enkele shell-variabelen" +msgstr "var - namen en betekenissen van enkele shell-variabelen" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | MAP]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [OPTIENAAM...]" -#: builtins.c:226 +#: builtins.c:228 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 ...]" +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-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...]" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o OPTIE] [-A ACTIE] [-C OPDRACHT]\n" +" [-F FUNCTIE] [-G PATROON] [-P PREFIX] [-S SUFFIX]\n" +" [-W WOORDENLIJST] [-X FILTERPATROON] [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]" +#: builtins.c:235 +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]" +"compgen [-abcdefgjksuv] [-o OPTIE] [-A ACTIE] [-C OPDRACHT] [-F FUNCTIE]\n" +" [-G PATROON] [-P PREFIX] [-S SUFFIX]\n" +" [-W WOORDENLIJST] [-X FILTERPATROON] [WOORD]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "compopt [-o|+o OPTIE] [NAAM...]" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o OPTIE] [-DEI] [NAAM...]" -#: builtins.c:240 -msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +#: builtins.c:242 +msgid "mapfile [-d delim] [-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]" +"mapfile [-d SCHEIDINGSTEKEN] [-n AANTAL] [-O BEGIN] [-s AANTAL] [-t]\n" +" [-u BESTANDSDESCRIPTOR] [-C FUNCTIE] [-c HOEVEELHEID] [ARRAY]" -#: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +#: builtins.c:244 +msgid "readarray [-d delim] [-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]" +"readarray [-d SCHEIDINGSTEKEN] [-n AANTAL] [-O BEGIN] [-s AANTAL] [-t]\n" +" [-u BESTANDSDESCRIPTOR] [-C FUNCTIE] [-c HOEVEELHEID] [ARRAY]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2375,11 +2575,10 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" alias returns true unless a NAME is supplied for which no alias has been\n" " defined." msgstr "" "Aliassen definiëren of tonen.\n" @@ -2387,30 +2586,29 @@ msgstr "" " 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 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." +" De afsluitwaarde is 0, tenzij er een NAAM gegeven is waarvoor geen alias\n" +" gedefinieerd is." -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +" Met optie '-a' worden alle gedefinieerde aliassen verwijderd.\n" "\n" " De afsluitwaarde is 0, tenzij NAAM geen bestaande alias is." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2422,39 +2620,35 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\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" +" Verbindt een toetsenreeks aan een 'readline'-functie of aan een macro,\n" +" of stelt een 'readline'-variabele in. 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" @@ -2465,28 +2659,26 @@ msgstr "" " '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" +" -p functienamen en hun bindingen tonen, in een vorm die\n" +" hergebruikt kan worden 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" +" vorm die hergebruikt kan worden 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 +" -v variabelenamen en hun waarden tonen, in een vorm die\n" +" hergebruikt kan worden als invoer\n" +" -x TOETSENREEKS:SHELL-OPDRACHT deze shell-opdracht uitvoeren als deze\n" +" toetsenreeks ingevoerd wordt\n" +" -X met '-x' gebonden toetsenreeksen en opdrachten tonen\n" +" in een vorm die hergebruikt kan worden als invoer\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" fout optrad." + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2497,10 +2689,12 @@ msgid "" " 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" +"\n" " Als N gegeven is, dan worden N niveaus van lussen beëindigd.\n" +"\n" " De afsluitwaarde is 0, tenzij N kleiner dan 1 is." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2511,26 +2705,25 @@ msgid "" " 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." +" Als N gegeven is, dan wordt N niveaus hoger doorgegaan.\n" +"\n" +" De afsluitwaarde is 0, tenzij N kleiner dan 1 is." -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" "Een ingebouwde shell-functie uitvoeren.\n" "\n" -" Voert de gegeven ingebouwde shell-functie met de gegeven argumenten " -"uit.\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" @@ -2538,7 +2731,7 @@ msgstr "" " 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 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2564,37 +2757,41 @@ msgstr "" " De afsluitwaarde is 0, tenzij de shell momenteel geen functie uitvoert\n" " of EXPRESSIE ongeldig is." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." msgstr "" "De huidige map wijzigen.\n" "\n" @@ -2611,20 +2808,31 @@ msgstr "" " 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 +" Opties:\n" +" -L symbolische koppelingen volgen; symbolische koppelingen in MAP\n" +" worden herleid ná verwerking van instantiaties van '..'\n" +" -P de fysieke mappenstructuur gebruiken zonder symbolische koppelingen\n" +" te volgen; symbolische koppelingen in MAP worden herleid vóór\n" +" verwerking van instantiaties van '..'\n" +" -e als optie '-P' gegeven is en de huidige map kan niet bepaald worden,\n" +" dan afsluiten met een niet-nul waarde\n" +" -@ een bestand met uitgebreide kenmerken presenteren als een map die\n" +" deze bestandskenmerken bevat (op systemen die het ondersteunen)\n" +"\n" +" Standaard worden symbolische koppelingen gevolgd, alsof '-L' gegeven is.\n" +" Een '..' wordt verwerkt door het verwijderen van de direct voorafgaande\n" +" padcomponent terug tot een slash of tot het begin van MAP.\n" +"\n" +" De afsluitwaarde is 0 als de gewenste map ingesteld kon worden, en als ook\n" +" omgevingsvariabele PWD ingesteld kon worden als '-P' gegeven is, anders 1." + +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2636,16 +2844,15 @@ 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" +" -L de waarde van $PWD tonen (als het de huidige werkmap aangeeft)\n" +" -P het werkelijke, fysieke pad tonen, zonder symbolische koppelingen\n" +"\n" +" Zonder opties wordt optie '-L' aangenomen.\n" "\n" -" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd\n" -" of de huidige map niet bepaald kon worden." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of de\n" +" huidige map niet bepaald kon worden." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2655,36 +2862,35 @@ msgid "" " Always succeeds." msgstr "Doet niets; de opdracht heeft geen effect; de afsluitwaarde is 0." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." -msgstr "Geeft afsluitwaarde 0, horend bij \"gelukt\"." +msgstr "Geeft altijd afsluitwaarde 0, horend bij \"gelukt\"." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." -msgstr "Geeft afsluitwaarde 1, horend bij \"mislukt\"." +msgstr "Geeft altijd afsluitwaarde 1, horend bij \"mislukt\"." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2705,7 +2911,7 @@ msgstr "" " De afsluitwaarde is die van de uitgevoerde OPDRACHT,\n" " of 1 als de OPDRACHT niet gevonden is." -#: builtins.c:476 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2715,17 +2921,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2733,58 +2944,63 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" -"Waarden en attributen van variabelen instellen.\n" +"Waarden en eigenschappen van variabelen instellen.\n" "\n" -" Declareert de gegeven variabelen en/of kent hen attributen toe.\n" +" Declareert de gegeven variabelen en/of kent hen eigenschappen 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" +" -g globale variabelen aanmaken wanneer gebruikt in een shell-functie;\n" +" elders genegeerd\n" +" -I bij aanmaken van lokale variabele, de eigenschappen en waarde van\n" +" variabele met dezelfde naam uit vorig geldigheidsbereik overerven\n" +" -p van elke gegeven variabele de eigenschappen en waarde tonen\n" "\n" -" Attributen:\n" +" Eigenschappen:\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" +" -A van gegeven variabelen associatieve arrays maken (indien mogelijk)\n" +" -i aan gegeven variabelen de 'geheel getal'-eigenschap toekennen\n" +" -l waarde van variabelen bij toekenning omzetten naar kleine letters\n" +" -n de gegeven variabele een verwijzing maken naar de variabele die\n" +" gegeven is als waarde\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" +" -t aan gegeven variabelen de 'trace'-eigenschap toekennen\n" +" -u waarde van 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" +" Een '+' in plaats van een '-' voor de letter schakelt de betreffende\n" +" eigenschap uit.\n" "\n" -" Bij variabelen met het 'geheel getal'-attribuut wordt bij toewijzingen\n" +" Bij variabelen met de 'geheel getal'-eigenschap 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" +" naam lokaal, net zoals de opdracht 'local'. Optie '-g' onderdrukt dit.\n" "\n" -" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " -"een\n" -" fout optreedt." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" toekenningsfout optrad." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -"Waarden en attributen van variabelen instellen.\n" -" Verouderd. Zie 'help declare'." +"Waarden en eigenschappen van variabelen instellen.\n" +"\n" +" Een synoniem van 'declare'. Zie 'help declare'." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2795,8 +3011,8 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" "Lokale variabelen definiëren.\n" "\n" @@ -2806,14 +3022,16 @@ msgstr "" " '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" +"\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." +" toekenningsfout optrad, of de shell geen functie aan het uitvoeren is." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2825,6 +3043,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2832,23 +3051,32 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\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, elke twee gescheiden\n" +" door een spatie en aan het eind gevolgd door een nieuwe regel.\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" +" 'echo' kent de volgende stuurcodes:\n" +" \\a geluidssignaal\n" " \\b backspace\n" " \\c geen verdere uitvoer produceren\n" +" \\e escapecode\n" " \\E escapecode\n" " \\f nieuwe pagina (FF-teken)\n" " \\n nieuwe regel (LF-teken)\n" @@ -2858,10 +3086,14 @@ msgstr "" " \\\\ 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" +" \\uHHHH het Unicode-teken met code HHHH\n" +" (hexadecimaal, 1 tot 4 cijfers)\n" +" \\UHHHHHHHH het Unicode-teken met code HHHHHHHH\n" +" (hexadecimaal, 1 tot 8 cijfers)\n" "\n" -" De afsluitwaarde is 0, tenzij een schrijffout optreedt." +" De afsluitwaarde is 0, tenzij een schrijffout optrad." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2875,12 +3107,12 @@ msgid "" 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" +" Schrijft de gegeven argumenten naar standaarduitvoer, gevolgd door een\n" +" nieuwe regel. Optie '-n' onderdrukt deze afsluitende nieuwe regel.\n" "\n" -" De afsluitwaarde is 0, tenzij een schrijffout optreedt." +" De afsluitwaarde is 0, tenzij een schrijffout optrad." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2908,40 +3140,34 @@ msgid "" msgstr "" "Ingebouwde shell-opdrachten in- of uitschakelen.\n" "\n" -" Schakelt ingebouwde opdrachten in of uit. Dit laatste maakt het " -"mogelijk\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" +" -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" +" 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." +"  er een fout optreedt." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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" @@ -2949,15 +3175,13 @@ msgid "" msgstr "" "Argumenten uitvoeren als een shell-opdracht.\n" "\n" -" Combineert de gegeven argumenten tot een enkele tekenreeks, gebruikt " -"deze\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" +" De afsluitwaarde is die van de uitgevoerde opdracht, of 0 als de opdracht\n" " leeg is." -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2990,8 +3214,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -2999,8 +3223,7 @@ msgid "" msgstr "" "Opties ontleden.\n" "\n" -" 'getopts' kan door shell-scripts gebruikt worden om positionele " -"parameters\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" @@ -3030,30 +3253,30 @@ msgstr "" " 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." +" Normaliter ontleedt 'getopts' de positionele parameters, maar als\n" +" er argumenten gegeven worden, dan worden deze ontleed.\n" +"\n" +" De afsluitwaarde is 0 als er een optie gevonden werd, of niet-nul als\n" +" het einde van de opties bereikt werd of als er een fout optrad." -#: builtins.c:668 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" "De shell vervangen door de gegeven opdracht.\n" "\n" @@ -3067,14 +3290,13 @@ msgstr "" " -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" +" 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 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3086,12 +3308,11 @@ msgstr "" " Beëindigt de shell met een afsluitwaarde van N. Zonder N is de\n" " afsluitwaarde die van de laatst uitgevoerde opdracht." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\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" @@ -3099,19 +3320,17 @@ msgstr "" " 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 +#: builtins.c:734 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" +" 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" +" -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" @@ -3125,22 +3344,19 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" 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" +" 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" +" -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" @@ -3151,10 +3367,10 @@ msgstr "" " '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." +" De afsluitwaarde is die van de uitgevoerde opdracht, of 0 als er niets\n" +" uitgevoerd werd, of niet-nul als er een fout optrad." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3167,24 +3383,19 @@ msgid "" 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" +" 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" +" De afsluitwaarde is die van de in voorgrond geplaatste taak, of 1 als er\n" " een fout optreedt." -#: builtins.c:753 +#: builtins.c:779 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" +" 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" @@ -3192,33 +3403,30 @@ msgid "" 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" +" 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" +" De afsluitwaarde is 0, tenzij taakbeheer uitgeschakeld is of er een fout\n" " optreedt." -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3243,7 +3451,7 @@ msgstr "" " De afsluitwaarde is 0, tenzij NAAM niet gevonden wordt of een ongeldige\n" " optie gegeven werd." -#: builtins.c:792 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3255,14 +3463,13 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" "Informatie tonen over ingebouwde opdrachten.\n" "\n" @@ -3276,11 +3483,10 @@ msgstr "" " -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" +" De afsluitwaarde is 0, tenzij niets aan PATROON voldoet of een ongeldige\n" " optie gegeven werd." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3289,26 +3495,26 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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." @@ -3320,33 +3526,34 @@ msgstr "" " 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" +" -c huidige geschiedenis wissen: alle uitgevoerde opdrachten vergeten\n" +" -d POSITIE het geschiedenisitem op deze positie verwijderen; een\n" +" negatieve POSITIE telt terug vanaf het einde van de lijst\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" +" en toevoegen aan het einde van huidige geschiedenis\n" +" -r het geschiedenisbestand lezen en toevoegen aan het einde van\n" +" huidige geschiedenis\n" +" -w huidige geschiedenis naar het geschiedenisbestand schrijven\n" +"\n" +" -p geschiedenisopzoeking uitvoeren voor elk ARGUMENT en het resultaat\n" +" tonen zonder dit in de geschiedenis op te slaan\n" +" -s de ARGUMENTen als één enkel item aan de geschiedenis toevoegen\n" +"\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" +"\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 +" tijdsstempel bij elk geschiedenisitem weer te geven. Anders worden geen\n" +" tijdsstempels getoond.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" fout optrad." + +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3355,8 +3562,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3371,27 +3578,24 @@ msgid "" 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" +" 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" +" -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" +"\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." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" fout optrad. Met optie '-x' is de afsluitwaarde die van OPDRACHT." -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3401,7 +3605,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3415,15 +3619,14 @@ msgstr "" "\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" +" -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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3435,7 +3638,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3452,31 +3656,27 @@ msgstr "" " 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" +" -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" +" -L synoniem van '-l'\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" +" '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." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" fout optrad." -#: builtins.c:921 +#: builtins.c:949 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" +" 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" @@ -3510,7 +3710,7 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." msgstr "" "Rekenkundige uitdrukkingen evalueren.\n" "\n" @@ -3518,8 +3718,7 @@ msgstr "" " 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" +" 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" @@ -3542,12 +3741,9 @@ msgstr "" "\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" +" 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'-eigenschap te hebben om gebruikt te\n" " kunnen worden in een expressie.\n" "\n" " Operatoren worden geëvalueerd in volgorde van voorrang. Subexpressies\n" @@ -3557,95 +3753,92 @@ msgstr "" " Als het laatste ARGUMENT evalueert tot 0, dan is de afsluitwaarde van\n" " 'let' 1; anders 0." -#: builtins.c:966 -#, fuzzy +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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" +" 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. Standaard ontdoet een\n" +" backslash scheidingstekens en het nieuweregelteken van hun betekenis.\n" +"\n" +" Als er geen namen gegeven zijn, dan wordt de gelezen regel opgeslagen in\n" +" 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" +" -a ARRAY de gelezen woorden toekennen aan de opeenvolgende posities\n" +" van het genoemde array, beginnend bij index nul\n" +" -d TEKEN doorgaan met lezen tot TEKEN gelezen wordt (i.p.v. LF-teken)\n" +" -e 'readline' gebruiken om de regel in te lezen\n" +" -i TEKST door 'readline' te gebruiken begintekst\n" +" -n AANTAL stoppen na maximaal dit aantal tekens gelezen te hebben, of\n" +" na een LF-teken (i.p.v. altijd te wachten op een LF-teken)\n" +" -N AANTAL alleen stoppen na dit aantal tekens gelezen te hebben, of na\n" +" EOF of tijdsoverschrijding, elk scheidingsteken negerend\n" +" -p PROMPT deze tekenreeks tonen als prompt (zonder afsluitende nieuwe\n" +" regel) alvorens te beginnen met lezen\n" +" -r backslash-codes niet omzetten naar hun betekenis\n" +" -s invoer die van een terminal komt niet echoën\n" +" -t AANTAL na dit aantal seconden stoppen met wachten op invoer en\n" +" afsluiten met een code groter dan 128; de waarde van de\n" +" variabele TMOUT is de standaardwaarde voor het aantal te\n" +" wachten seconden; het aantal mag drijvendepuntgetal zijn;\n" +" als AANTAl 0 is, dan keert 'read' onmiddellijk terug zonder\n" +" enige data te lezen, maar is alleen succesvol als er op de\n" +" betreffende bestandsdescriptor invoer beschikbaar is\n" +" -u BS.DS. van 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." +" de tijdslimiet overschreden werd, er een toekenningsfout optrad, of een\n" +" ongeldige bestandsdescriptor als argument van '-u' gegeven werd." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3666,7 +3859,7 @@ msgstr "" " uitvoeren is." # Voor de duidelijkheid is de tekstvolgorde veranderd. -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3709,8 +3902,7 @@ msgid "" " 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" +" 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" @@ -3732,9 +3924,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3749,63 +3944,45 @@ msgid "" 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" +" Schakelt shell-eigenschappen in/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 de betreffende eigenschap _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" +" -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" +" -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" +" -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" +" -o OPTIENAAM deze optie inschakelen (zie verderop voor de lange namen)\n" +" -P geen symbolische koppelingen herleiden bij opdrachten als 'cd' die\n" +" de huidige map wijzigen\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 een 'trap' op DEBUG of RETURN door laten werken in functies en\n" +" 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" +" -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" +" De huidige toestand van de eigenschappen 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" @@ -3819,8 +3996,7 @@ msgstr "" " 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" +" 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" @@ -3829,14 +4005,11 @@ msgstr "" " 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" +" 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" +" 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" @@ -3846,7 +4019,7 @@ msgstr "" "\n" " De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3855,9 +4028,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3872,21 +4046,22 @@ msgstr "" " Opties:\n" " -f elke NAAM als een shell-functie begrijpen\n" " -v elke NAAM als een shell-variabele begrijpen\n" +" -n elke NAAM als een naamsverwijzing begrijpen en de variabele zelf\n" +" verwijderen in plaats de variabele waar naar verwezen wordt\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" +" 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 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3898,11 +4073,11 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -"Het export-attribuut van shell-variabelen instellen.\n" +"De export-eigenschap 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" +" van latere opdrachten. Als een WAARDE gegeven is, dan wordt deze WAARDE\n" +" toegekend alvorens te exporteren.\n" "\n" " Opties:\n" " -f gegeven namen verwijzen alleen naar functies\n" @@ -3913,7 +4088,7 @@ msgstr "" "\n" " De afsluitwaarde is 0, tenzij een ongeldige optie of NAAM gegeven werd." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3925,7 +4100,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3935,21 +4111,21 @@ 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" +" 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" +" -p een lijst tonen van alle onveranderbare variabelen of functies,\n" +" al naar gelang optie '-f' gegeven is\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 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3966,7 +4142,7 @@ msgstr "" "\n" " De afsluitwaarde is 0 tenzij N negatief is of groter dan $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3981,17 +4157,15 @@ msgid "" 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" +" 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" +" 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 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4013,17 +4187,20 @@ msgstr "" " 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" +" De afsluitwaarde is 0, tenzij taakbeheer uitgeschakeld is of er een fout\n" " optreedt." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4047,8 +4224,7 @@ msgid "" " -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 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" @@ -4069,14 +4245,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4100,6 +4278,9 @@ msgstr "" " gebruikt om de toestand van een bestand te inspecteren. Er zijn ook\n" " operatoren voor tekenreeksen en voor getalsmatige vergelijkingen.\n" "\n" +" Het gedrag van 'test' is afhankelijk van het aantal argumenten.\n" +" Lees de handleiding van 'bash' voor een complete beschrijving.\n" +"\n" " Bestandsoperatoren:\n" " -a BESTAND waar als bestand bestaat\n" " -b BESTAND waar als bestand een blok-apparaat is\n" @@ -4118,18 +4299,14 @@ msgstr "" " -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" +" -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" +" 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" @@ -4137,14 +4314,14 @@ msgstr "" " 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" +" 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" +" -o OPTIE waar als deze shell-optie ingeschakeld is\n" +" -v VARIABELE waar als deze variabele een waarde heeft\n" +" -R VARIABELE waar als deze variabele een naamsverwijzing is\n" +" ! EXPRESSIE waar als EXPRESSIE 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" @@ -4155,7 +4332,7 @@ msgstr "" " 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 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4167,12 +4344,11 @@ msgstr "" " 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 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\n" +" Prints the accumulated user and system times for the shell and all of its\n" " child processes.\n" " \n" " Exit Status:\n" @@ -4186,12 +4362,11 @@ msgstr "" "\n" " De afsluitwaarde is altijd 0." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -4200,73 +4375,63 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" 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" +" 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" +" 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" +" 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" +" de mislukking van een opdracht de shell zou beëindigen als optie '-e'\n" +" gegeven was.\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" +" 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" +" '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 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4275,25 +4440,24 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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." +" Returns success if all of the NAMEs are found; fails if any are not found." msgstr "" "Informatie tonen over een opdracht.\n" "\n" @@ -4307,23 +4471,22 @@ msgstr "" " -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" +" -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" +" als de naam onbekend is\n" +"\n" " De afsluitwaarde is 0 als elke NAAM gevonden werd, anders 1." -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -4336,6 +4499,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4347,6 +4511,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4363,8 +4532,7 @@ msgid "" msgstr "" "Grenzen van hulpbronnen aanpassen.\n" "\n" -" Begrenst de beschikbare hulpbronnen voor processen gestart door deze " -"shell\n" +" Begrenst de beschikbare hulpbronnen voor processen gestart door deze shell\n" " -- op systemen die zulke begrenzing toestaan.\n" "\n" " Opties:\n" @@ -4375,11 +4543,10 @@ msgstr "" " -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" +" -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" +" -l de maximum hoeveelheid geheugen die een proces mag vastpinnen (kB)\n" +" -k het maximum aantal gereserveerde kqueues voor dit proces\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" @@ -4390,6 +4557,11 @@ msgstr "" " -u het maximum aantal gebruikersprocessen\n" " -v de maximum hoeveelheid virtueel geheugen van een proces (in kB)\n" " -x het maximum aantal bestandsvergrendelingen\n" +" -P het maximum aantal pseudoterminals\n" +" -R de maximum looptijd van een realtime-proces alvorens te blokkeren\n" +" -T het maximum aantal threads\n" +"\n" +" Niet alle opties zijn beschikbaar op alle platformen.\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" @@ -4398,14 +4570,13 @@ msgstr "" " 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" +" 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." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" fout optrad." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4424,77 +4595,93 @@ msgid "" 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" +" 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" +" 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" +" -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 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." 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" +" Wacht op elk proces aangeduid door een ID -- dat een taakaanduiding of\n" +" een 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." +" Als optie '-n' gegeven is, dan wordt gewacht op de eerstvolgende voltooiing\n" +" van een taak en wordt diens afsluitwaarde geretourneerd.\n" +"\n" +" Als optie '-p' gegeven is, dan wordt het proces- of taaknummer van de taak\n" +" waarop gewacht werd toegekend aan de gegeven variabele VAR. De variabele\n" +" is ongedefinieerd voordat de waarde toegekend wordt. Deze optie is alleen\n" +" nuttig samen met optie '-n'.\n" +"\n" +" Als optie '-f' gegeven is, en taakbesturing is ingeschakeld, dan wordt\n" +" gewacht tot de taak met de gegeven ID beëindigd is, in plaats van te\n" +" wachten op een toestandswijziging.\n" +"\n" +" De afsluitwaarde is die van de laatste ID; of niet-nul als ID ongeldig is,\n" +" of als een ongeldige optie gegeven werd, of als '-n' gegeven werd maar de\n" +" shell geen dochters heeft waarop gewacht wordt." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is 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" +" Wacht op elk proces aangeduid door een PID en rapporteert diens\n" +" afsluitwaarde. Als geen PID gegeven is, dan wordt er gewacht op alle\n" +" momenteel actieve dochterprocessen, en is de afsluitwaarde van 'wait'\n" +" automatisch 0. PID 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." +" De afsluitwaarde is die van de laatste PID, 1 als PID ongeldig is,\n" +" of 2 als een ongeldige optie gegeven werd." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4511,10 +4698,11 @@ msgstr "" " 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" +" dat element en worden de OPDRACHTEN uitgevoerd.\n" +"\n" " De afsluitwaarde is die van de laatst uitgevoerde opdracht." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4541,7 +4729,7 @@ msgstr "" "\n" " De afsluitwaarde is die van de laatst uitgevoerde opdracht." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4574,11 +4762,11 @@ msgstr "" " 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" +" 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 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4603,9 +4791,10 @@ msgstr "" " 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" +"\n" " De afsluitwaarde is die van de PIJPLIJN." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4623,21 +4812,16 @@ msgstr "" "\n" " De afsluitwaarde is die van de laatst uitgevoerde opdracht." -#: builtins.c:1563 +#: builtins.c:1631 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" +" 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" +" `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" @@ -4648,51 +4832,49 @@ msgstr "" " 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" +" (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" +" 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 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +" Voert de tweede reeks opdrachten uit zolang de laatste opdracht van\n" +" de eerste reeks een afsluitwaarde van 0 heeft.\n" "\n" " De afsluitwaarde is die van de laatst uitgevoerde opdracht." -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +" Voert de tweede reeks opdrachten uit zolang de laatste opdracht van\n" +" de eerste reeks een afsluitwaarde ongelijk aan 0 heeft.\n" "\n" " De afsluitwaarde is die van de laatst uitgevoerde opdracht." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4702,26 +4884,23 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." 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" +"\n" +" Voert OPDRACHT asynchroon uit, met standaardinvoer en -uitvoer via\n" +" een pijp verbonden met bestandsdescriptors die toegewezen zijn aan\n" +" indices 0 en 1 van array-variabele NAAM in de uitvoerende shell.\n" " De standaard-NAAM is \"COPROC\".\n" -" \n" -" Afsluitstatus:\n" -" Geeft de afsluitwaarde van OPDRACHT." +"\n" +" De afsluitwaarde van coproc is 0." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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" @@ -4737,7 +4916,7 @@ msgstr "" "\n" " De afsluitwaarde is 0, tenzij NAAM onveranderbaar is." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4754,7 +4933,7 @@ msgstr "" "\n" " De afsluitwaarde is die van de laatst uitgevoerde opdracht." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4778,12 +4957,12 @@ msgstr "" "\n" " De afsluitwaarde is die van de hervatte taak." -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4791,20 +4970,17 @@ msgstr "" "Een rekenkundige uitdrukking evalueren.\n" "\n" " Evalueert de gegeven expressie als een rekenkundige uitdrukking.\n" -" Dit is equivalent aan 'let EXPRESSIE'.\n" +" Dit is equivalent aan 'let \"EXPRESSIE\"'.\n" "\n" " De afsluitwaarde is 1 als de EXPRESSIE tot 0 evalueert; anders 0." -#: builtins.c:1671 +#: builtins.c:1739 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" +" 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" @@ -4822,36 +4998,29 @@ msgid "" " 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" +"Een voorwaardelijke opdracht uitvoeren.\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" +" 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" +" tekenreeks als patroon begrepen en wordt patroonherkenning uitgevoerd.\n" +" 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" +" 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 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4910,62 +5079,46 @@ msgstr "" " 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" +" 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" +" 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" +" 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" +" 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" +" 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" +" 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" +" 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" +" 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" +" 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" +" 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" +" vervangingsteken, gewoonlijk '^'; het derde teken is het\n" " geschiedeniscommentaarteken, gewoonlijk '#'\n" -#: builtins.c:1754 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -4975,19 +5128,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5013,13 +5166,12 @@ msgstr "" " -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" +" De 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." +" mapwijziging mislukte." -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5028,16 +5180,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5063,12 +5215,12 @@ msgstr "" " 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" +" De 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 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5079,19 +5231,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5105,8 +5257,7 @@ msgstr "" " -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" +" -v als '-p', maar met elk item voorafgegeaan wordt door zijn positie\n" " in de stapel\n" "\n" " Argumenten:\n" @@ -5115,18 +5266,16 @@ msgstr "" " -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." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" fout optrad." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5141,28 +5290,25 @@ msgid "" 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" +" Stelt de waarde in van elke gegeven OPTIENAAM -- van een shell-optie\n" +" die bepaald shell-gedrag beïnvloedt. Zonder opties wordt elke gegeven\n" +" OPTIENAAM getoond, of alle shell-opties als geen OPTIENAAM gegeven is,\n" +" met bij elke optie de vermelding of deze al dan niet ingeschakeld is.\n" "\n" " Opties:\n" -" -o de verzameling mogelijke OPTIENAMEN naar diegene die " -"gedefinieerd\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." +" Zonder opties (of met alleen '-q') is de afsluitwaarde 0 indien OPTIENAAM\n" +" ingeschakeld is, 1 indien uitgeschakeld. De afsluitwaarde is ook 1 als\n" +" een ongeldige optienaam gegeven werd, en de afsluitwaarde is 2 als een\n" +" ongeldige optie gegeven werd." -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5170,25 +5316,29 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\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" @@ -5208,35 +5358,41 @@ msgstr "" " 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" +" kan worden. %Q is als %q, maar een precisie wordt toegepast op het\n" +" onaangehaalde argument vóór het aanhalen. Verder betekent %(OPMAAK)T\n" +" dat datum-plus-tijd getoond moet worden door deze opmaak aan strftime(3)\n" +" mee te geven.\n" "\n" -" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " -"een\n" -" fout optreedt." +" De gegeven opmaak wordt zo vaak hergebruikt als nodig is om alle argumenten\n" +" te consumeren. Als er minder argumenten zijn dan de opmaak verwacht, dan\n" +" gedragen de overtollige opmaakspecificaties zich alsof (al naar gelang) de\n" +" waarde nul of een lege tekenreeks gegeven werd.\n" +"\n" +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" schrijf- of toekenningsfout optrad." -#: builtins.c:1895 -#, fuzzy +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5244,29 +5400,33 @@ 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" +" 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" +" -D de gegeven completeringen en acties als standaard nemen voor\n" +" opdrachten die geen specifieke eigen completering hebben\n" +" -E de gegeven completeringen en acties als standaard nemen voor\n" +" lege opdrachten -- de completering van een lege regel\n" +" -I de gegeven completeringen en acties als standaard nemen voor\n" +" het beginwoord (gewoonlijk een opdracht)\n" "\n" -" Als completering geprobeerd wordt, dan worden de acties toegepast in de\n" -" volgorde van de bovenstaande hoofdletteropties.\n" +" Als completering geprobeerd wordt, dan worden de acties toegepast in\n" +" de volgorde van bovenstaande hoofdletteropties. Als meerdere opties\n" +" gegeven zijn, dan gaat '-D' voor '-E', en beide gaan voor '-I'\n" "\n" -" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er " -"een\n" -" fout optreedt." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er\n" +" een fout optrad." -#: builtins.c:1923 +#: builtins.c:2004 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" +" completions. If the optional WORD argument is supplied, matches against\n" " WORD are generated.\n" " \n" " Exit Status:\n" @@ -5278,26 +5438,22 @@ msgstr "" " 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." +" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er een\n" +" fout optrad." -#: builtins.c:1938 -#, fuzzy +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5316,140 +5472,131 @@ 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" +" 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" +" Opties:\n" " -o OPTIE deze completeringsoptie inschakelen voor elke gegeven NAAM\n" +" -D opties wijzigen voor de standaardcompletering\n" +" -E opties wijzigen voor de completering van een lege opdracht\n" +" -I opties wijzigen voor de completering van initieel woord\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" +" 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." +" NAAM geen completeringsvoorschrift gedefinieerd is." -#: builtins.c:1968 -#, fuzzy +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" 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" +"Regels inlezen in een geïndexeerde array-variabele.\n" +"\n" +" Leest regels van standaardinvoer in in de array-variabele ARRAY.\n" +" De variabele MAPFILE wordt gebruikt als geen ARRAY gegeven is.\n" +"\n" +" Opties:\n" +" -d TEKEN dit teken (i.p.v. LF) gebruiken als einde van regel\n" +" -n AANTAL maximaal dit aantal regels kopiëren (0 = alles)\n" +" -O BEGIN met toekennen beginnen bij deze index (standaard 0)\n" +" -s AANTAL dit aantal regels overslaan\n" +" -t nieuweregelteken aan eind van elke gelezen regel verwijderen\n" +" -u BES.DES. uit deze bestandsdescriptor lezen i.p.v. uit standaardinvoer\n" +" -C FUNCTIE deze functie evalueren na elke HOEVEELHEID regels\n" +" -c HOEVEELHEID het aantal te lezen regels voor elke aanroep van FUNCTIE\n" +"\n" +" Argument:\n" +" ARRAY naam van array-variabele waarin regels ingelezen moeten worden\n" +"\n" +" Als '-C' gegeven is zonder '-c', is de standaard-HOEVEELHEID 5000.\n" +" Wanneer FUNCTIE aangeroepen wordt, dan wordt hieraan de index van het\n" +" volgende array-element en de daaraan toe te kennen regel als extra\n" +" argumenten meegegeven.\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." +"\n" +" De afsluitwaarde is 0, tenzij ARRAY alleen-lezen is of geen array is, of\n" +" een ongeldige optie gegeven werd." -#: builtins.c:2001 +#: builtins.c:2086 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)" +"Regels inlezen vanuit een bestand in een array-variabele.\n" +"\n" +" Een synoniem voor 'mapfile'." -#~ msgid "xrealloc: cannot allocate %lu bytes" -#~ msgstr "xrealloc(): kan %lu bytes niet opnieuw reserveren" +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: ongeldige sleutel voor associatief array" -#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " #~ msgstr "" -#~ "xrealloc(): %s:%d: kan %lu bytes niet opnieuw reserveren (%lu bytes " -#~ "gereserveerd)" +#~ "De context geven van de huidige functie-aanroep.\n" +#~ "\n" +#~ " Zonder EXPR, resulteert " -#~ msgid "%s: invalid number" -#~ msgstr "%s: ongeldig getal" +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process(): proces %5ld (%s) in de pijplijn" -#~ msgid "allocated" -#~ msgstr "gereserveerd" +#~ msgid "Unknown Signal #" +#~ msgstr "Onbekend signaalnummer" -#~ msgid "freed" -#~ msgstr "vrijgegeven" +# Dit is een commandonaam. +#~ msgid "true" +#~ msgstr "true" -#~ msgid "requesting resize" -#~ msgstr "verzoek tot grootteverandering" +# Dit is een commandonaam. +#~ msgid "false" +#~ msgstr "false" -#~ msgid "just resized" -#~ msgstr "juist van grootte veranderd" +# Dit is een commandonaam. +#~ msgid "times" +#~ msgstr "times" -#~ msgid "bug: unknown operation" -#~ msgstr "**interne fout**: onbekende operatie" - -#~ msgid "" -#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgid "License GPLv2+: GNU GPL version 2 or later \n" #~ 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." +#~ "De licentie is GPLv2+: GNU GPL versie 2 of later.\n" +#~ "Zie http://gnu.org/licenses/gpl.html voor de volledige tekst.\n" diff --git a/po/pl.gmo b/po/pl.gmo index 6501d1c..4adbed0 100644 Binary files a/po/pl.gmo and b/po/pl.gmo differ diff --git a/po/pl.po b/po/pl.po index 98f0a29..b8bd94a 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1,434 +1,509 @@ # Polish translation of bash -# Copyright (C) 2007 Free Software Foundation, Inc. +# Copyright (C) 2007, 2010, 2011, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2022 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. # Andrzej M. Krzysztofowicz 2006,2007. +# Jakub Bogusz 2010-2022. # msgid "" msgstr "" -"Project-Id-Version: bash 3.2\n" +"Project-Id-Version: bash 5.2-rc1\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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-19 22:15+0200\n" +"Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" +"Language: pl\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "nieprawid�owy indeks tablicy" +msgstr "nieprawidłowy indeks tablicy" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: usuwanie atrybutu nameref" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s: nieprawid�owa nazwa akcji" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nie można przekształcić tablicy indeksowanej na asocjacyjną" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s: nie mo�na przypisa� do nienumerycznego indeksu" +msgstr "%s: nie można przypisać do nienumerycznego indeksu" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: przy przypisaniu do tablicy asocjacyjnej należy użyć nawiasów" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" -msgstr "%s: nie mo�na utworzy�: %s" +msgstr "%s: nie można utworzyć: %s" # ??? -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" -"bash_execute_unix_command: nie mo�na znale�� mapy klawiszy dla polecenia" +msgstr "bash_execute_unix_command: nie można znaleźć mapy klawiszy dla polecenia" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: pierwszym drukowalnym znakiem nie jest `\"'" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "brak zamykaj�cego `%c' w %s" +msgstr "brak zamykającego `%c' w %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "%s: brak separuj�cego dwukropka" +msgstr "%s: brak separującego dwukropka" -# ??? -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': nie można usunąć dowiązania w mapie poleceń" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "rozwijanie nawiasów: nie można przydzielić pamięci dla %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "rozwijanie nawiasów: nie udało się przydzielić pamięci dla elementów w liczbie %u" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "rozwijanie nawiasów: nie udało się przydzielić pamięci dla `%s'" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "`%s': nieprawid�owa nazwa mapy klawiszy" +msgstr "`%s': błędna nazwa aliasu" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "edycja wiersza nie została włączona" # ??? -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "`%s': nieprawid�owa nazwa mapy klawiszy" +msgstr "`%s': nieprawidłowa nazwa mapy klawiszy" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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" +msgstr "%s: nie można odczytać: %s" -#: builtins/bind.def:295 builtins/bind.def:325 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "`%s': nie znana nazwa funkcji" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "%s nie jest przypisany do �adnego klawisza.\n" +msgstr "%s nie jest przypisany do żadnego klawisza.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "%s mo�e by� wywo�any przez " +msgstr "%s może być wywołany przez " + +# ??? +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': nie można usunąć dowiązania" -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "" +msgstr "licznik pętli" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "ma sens tylko w p�tli `for', `while' lub `until'" +msgstr "ma sens tylko w pętli `for', `while' lub `until'" -# ??? -#: builtins/caller.def:133 -#, fuzzy +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Zwrócenie kontekstu wywołania bieżącej procedury.\n" +" \n" +" Bez WYRAŻENIA zwracane jest \"$linia $plik\". Z WYRAŻENIEM zwracane jest\n" +" \"$linia $procedura $plik\"; dodatkowe informacje służą do udostępnienia\n" +" śladu stosu.\n" +" \n" +" Wartość WYRAŻENIA określa o ile ramek wywołań względem bieżącej ramki\n" +" należy się cofnąć; numer najwyższej ramki to 0." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "Nie ustawiono HOME" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "za dużo argumentów" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "zerowy katalog" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "Nie ustawiono OLDPWD" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "" +msgstr "linia %d: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "%s: uwaga: " +msgstr "uwaga: " -#: builtins/common.c:153 -#, fuzzy, c-format +#: builtins/common.c:148 +#, c-format msgid "%s: usage: " -msgstr "%s: uwaga: " +msgstr "%s: składnia: " -#: 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: opcja wymaga argumentu" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: wymagany argument numeryczny" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: nie znaleziono" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" -msgstr "%s: nieprawid�owa opcja" +msgstr "%s: nieprawidłowa opcja" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" -msgstr "%s: nieprawid�owa nazwa opcji" +msgstr "%s: nieprawidłowa nazwa opcji" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "`%s': nieprawid�owy identyfikator" +msgstr "`%s': nieprawidłowy identyfikator" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "nieprawid�owy numer sygna�u" +msgstr "błędna liczba ósemkowa" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "nieprawid�owa liczba" +msgstr "błędna liczba szesnastkowa" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "nieprawid�owa liczba" +msgstr "nieprawidłowa liczba" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "%s: nieprawid�owo okre�lony sygna�" +msgstr "%s: nieprawidłowo określony sygnał" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "`%s': nie jest to nr PID ani prawid�owe okre�lenie zadania" +msgstr "`%s': nie jest to nr PID ani prawidłowe określenie zadania" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: zmienna tylko do odczytu" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: nie można przypisać" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s poza zakresem" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s poza zakresem" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: brak takiego zadania" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" -msgstr "%s: brak kontroli zada�" +msgstr "%s: brak kontroli zadań" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" -msgstr "brak kontroli zada�" +msgstr "brak kontroli zadań" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: ograniczony" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "ograniczony" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "%s: nie jest to polecenie pow�oki" +msgstr "%s: nie jest to polecenie powłoki" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" -msgstr "b��d zapisu: %s" +msgstr "błąd zapisu: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "błąd podczas ustawiania atrybutów terminala: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "błąd podczas pobierania atrybutów terminala: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "%s: b��d przy okre�laniu katalogu bie��cego: %s: %s\n" +msgstr "%s: błąd przy określaniu katalogu bieżącego: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" -msgstr "%s: niejednoznaczne okre�lenie zadania" +msgstr "%s: niejednoznaczne określenie zadania" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "pomoc nie jest dostępna w tej wersji" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nie można anulować definicji: %s jest tylko do odczytu" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nie można anulować definicji" -#: builtins/complete.def:276 +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "%s: nieprawid�owa nazwa akcji" +msgstr "%s: nieprawidłowa nazwa akcji" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "%s: brak definicji dla uzupe�nienia" +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" +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" +msgstr "uwaga: opcja -C może działać inaczej niż oczekiwano" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "aktualnie nie jest wykonywana funkcja dopełniania" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "mo�na u�ywa� tylko w funkcji" +msgstr "można używać tylko w funkcji" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "nie mo�na u�ywa� `-f' do tworzenia funkcji" +msgstr "nie można używać `-f' do tworzenia funkcji" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: funkcja tylko do odczytu" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: zmienna referencyjna nie może być tablicą" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: zmienna referencyjna nie może wskazywać na siebie" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: cykliczne odwołanie do nazwy" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': błędna nazwa zmiennej przy odwołaniu do nazwy" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "%s: nie mo�na w ten spos�b unicestwi� zmiennej tablicowej" +msgstr "%s: nie można w ten sposób unicestwić zmiennej tablicowej" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: nie można przekształcić tablicy asocjacyjnej na indeksowaną" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: przypisanie złożonej tablicy z cytowaniem jest przestarzałe" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "�adowanie dynamiczne nie jest dost�pne" +msgstr "ładowanie dynamiczne nie jest dostępne" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" -msgstr "nie mo�na otworzy� obiektu wsp�dzielonego %s: %s" +msgstr "nie można otworzyć obiektu współdzielonego %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "nie mo�na znale�� %s w obiekcie wsp�dzielonym %s: %s" +msgstr "nie można znaleźć %s w obiekcie współdzielonym %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: dynamiczne polecenie wbudowane już załadowane" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "funkcja ładująca dla %s zwraca niepowodzenie (%d): nie załadowano" -#: builtins/enable.def:459 +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "%s: nie jest �adowany dynamicznie" +msgstr "%s: nie jest ładowany dynamicznie" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, c-format msgid "%s: cannot delete: %s" -msgstr "%s: nie mo�na usun��: %s" +msgstr "%s: nie można usunąć: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: jest katalogiem" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" -msgstr "%s: nie jest zwyk�ym plikiem" +msgstr "%s: nie jest zwykłym plikiem" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "%s: plik jest za du�y" +msgstr "%s: plik jest za duży" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: nie mo�na uruchomi� pliku binarnego" +msgstr "%s: nie można uruchomić pliku binarnego" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" -msgstr "%s: nie mo�na uruchomi�: %s" +msgstr "%s: nie można uruchomić: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" -msgstr "" +msgstr "wylogowanie\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "to nie jest pow�oka logowania: u�yj `exit'" +msgstr "to nie jest powłoka logowania: użyj `exit'" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "Istniej� zatrzymane zadania.\n" +msgstr "Istnieją zatrzymane zadania.\n" -#: builtins/exit.def:122 -#, fuzzy, c-format +#: builtins/exit.def:123 +#, c-format msgid "There are running jobs.\n" -msgstr "Istniej� zatrzymane zadania.\n" +msgstr "Istnieją działające zadania.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "nie znaleziono polecenia" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "specyfikacja historii" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: nie uda�o si� otworzy� pliku tymczasowego: %s" +msgstr "%s: nie udało się otworzyć pliku tymczasowego: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "bieżące" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "zadanie %d uruchomiono bez kontroli zada�" +msgstr "zadanie %d uruchomiono bez kontroli zadań" #: builtins/getopt.c:110 #, c-format @@ -440,41 +515,48 @@ msgstr "%s: niedozwolona opcja -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: opcja wymaga argumentu -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "zapami�tywanie �cie�ek polece� w tablicy asocjacyjnej wy��czone" +msgstr "zapamiętywanie ścieżek poleceń w tablicy asocjacyjnej wyłączone" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: tablica asocjacyjna pusta\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "ostatnie polecenie: %s\n" +msgstr "trafienia\tpolecenie\n" -#: builtins/help.def:130 -#, fuzzy, c-format +#: builtins/help.def:133 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 `" +msgstr[0] "Polecenia powłoki pasujące do słowa kluczowego `" +msgstr[1] "Polecenia powłoki pasujące do słów kluczowych `" +msgstr[2] "Polecenia powłoki pasujące do słów kluczowych `" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" -"�aden temat pomocy nie pasuje do `%s'. Spr�buj `help help', `man -k %s'\n" -"lub `info %s'." +"'\n" +"\n" #: builtins/help.def:185 #, 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:223 +#, c-format msgid "%s: cannot open: %s" -msgstr "%s: nie mo�na otworzy�: %s" +msgstr "%s: nie można otworzyć: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -485,129 +567,151 @@ msgid "" "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" +"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" +"Gwiazdka (*) po nazwie oznacza, że dane polecenie jest wyłączone.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "nie mo�na u�ywa� wi�cej ni� jednego spo�r�d -anrw" +msgstr "nie można używać więcej niż jednego spośród -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "pozycja historii" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: nieprawidłowy znacznik czasu" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" -msgstr "%s: rozwini�cie wg historii nie powiod�o si�" +msgstr "%s: rozwinięcie wg historii nie powiodło się" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: rozwini�cie wg historii nie powiod�o si�" +msgstr "%s: inlib 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'" +msgstr "nie można używać innych opcji przy `-x'" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "%s: argumentami musz� by� numery proces�w lub zada�" +msgstr "%s: argumentami muszą być numery procesów lub zadań" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "Nieznany b��d" +msgstr "Nieznany błąd" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "spodziewano si� wyra�enia" +msgstr "spodziewano się wyrażenia" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: nie jest zmienn� tablicow�" +msgstr "%s: nie jest tablicą indeksowaną" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "%s: nieprawid�owo okre�lony deskryptor pliku" +msgstr "%s: nieprawidłowo określony deskryptor pliku" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "%d: nieprawid�owy deskryptor pliku: %s" +msgstr "%d: nieprawidłowy deskryptor pliku: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%s: nieprawid�owa opcja" +msgstr "%s: błędna liczba linii" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%s: nieprawid�owa opcja" +msgstr "%s: błędny początek tablicy" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "%s: nieprawid�owa nazwa akcji" +msgstr "%s: błędna liczba linii między wywołaniami" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: nie jest zmienn� tablicow�" +msgstr "pusta nazwa zmiennej tablicowej" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "wymagana obsługa zmiennych tablicowych" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "`%s': brak znaku formatuj�cego" +msgstr "`%s': brak znaku formatującego" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': błędne określenie formatu czasu" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "`%c': nieprawid�owy znak formatuj�cy" +msgstr "`%c': nieprawidłowy znak formatujący" -#: builtins/printf.def:578 -#, fuzzy, c-format +#: builtins/printf.def:734 +#, c-format msgid "warning: %s: %s" -msgstr "%s: uwaga: " +msgstr "uwaga: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problem z analizą formatu: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "brak cyfry szesnastkowej dla \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "brak cyfry unikodowej dla \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "brak innego katalogu" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: nieprawidłowy argument" + +#: builtins/pushd.def:480 msgid "" -msgstr "" +msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "pusty stos katalogów" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "niedomiar stosu rekursji" +msgstr "indeks stosu katalogów" -#: builtins/pushd.def:683 -#, fuzzy +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -622,36 +726,32 @@ msgid "" " \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" +" +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" +" -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 +"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" +" Opcje:\n" +" -c\twyczyszczenie stosu katalogów poprzez usunięcie wszystkich elementów\n" +" -l\tniewypisywanie katalogów względem kat. domowego użytkownika\n" +" \tw postaci skróconej z tyldą\n" +" -p\twypisanie stosu katalogów po jednym wpisie w linii\n" +" -v\twypisanie stosu katalogów po jednym wpisie w linii, poprzedzonych\n" +" \tpozycją na stosie\n" +" \n" +" Argumenty:\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:723 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" @@ -675,26 +775,27 @@ msgid "" " \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" +"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" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas umieszczania katalogów na\n" +" \tstosie tak, że zmieniany jest tylko stos.\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" +" Argumenty:\n" +" +N\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \tod lewej 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\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \tod prawej strony listy wypisywanej przez `dirs', począwszy od zera).\n" " \n" -" dir\tUmieszczenie DIR na wierzcho�ku stosu i uczynienie go nowym\n" -" \tbie��cym katalogiem roboczym.\n" +" katalog\tUmieszczenie KATALOGU na wierzchołku stosu i uczynienie go\n" +" \tnowym bieżącym katalogiem roboczym.\n" " \n" -" Zawarto�� stosu katalog�w mo�na zobaczy� za pomoc� polecenia `dirs'." +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'." -#: builtins/pushd.def:730 -#, fuzzy +#: builtins/pushd.def:748 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" @@ -714,540 +815,616 @@ msgid "" " \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" +"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" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas usuwania katalogów ze stosu\n" +" \ttak, że zmieniany jest tylko stos.\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" +" Argumenty:\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\tPomini�cie zmiany katalogu podczas usuwania katalog�w ze stosu tak,\n" -" \t�e zmieniany jest tylko stos.\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 ostatni katalog, `popd -1' usuwa poprzedni.\n" " \n" -" Zawarto�� stosu katalog�w mo�na zobaczy� za pomoc� polecenia `dirs'." +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "%s: nieprawid�owo okre�lony timeout" +msgstr "%s: nieprawidłowo określony limit czasu" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" -msgstr "b��d odczytu: %d: %s" +msgstr "błąd odczytu: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "wyj�cie przez `return' mo�liwe tylko z funkcji lub skryptu" +msgstr "wyjście przez `return' możliwe tylko z funkcji lub skryptu" -# ??? -#: builtins/set.def:768 +#: builtins/set.def:869 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" +msgstr "nie można jednocześnie anulować definicji funkcji i zmiennej" -# ??? -#: 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" -msgstr "%s: nie jest zmienn� tablicow�" +msgstr "%s: nie jest zmienną tablicową" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" -msgstr "%s: nie jest funkcj�" +msgstr "%s: nie jest funkcją" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nie można wyeksportować" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "licznik przesuni�cia" +msgstr "licznik przesunięcia" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "nie mo�na opcji pow�oki jednocze�nie ustawi� i uniewa�ni�" +msgstr "nie można opcji powłoki jednocześnie ustawić i unieważnić" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "%s: nieprawid�owa nazwa opcji pow�oki" +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 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: nie znaleziono pliku" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "nie mo�na wstrzyma�" +msgstr "nie można wstrzymać" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "nie mo�na wstrzyma� pow�oki logowania" +msgstr "nie można wstrzymać powłoki logowania" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s jest aliasem do %s'\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "%s jest s�owem kluczowym pow�oki\n" +msgstr "%s jest słowem kluczowym powłoki\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" -msgstr "%s jest funkcj�\n" +msgstr "%s jest funkcją\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s jest specjalnym wewnętrznym poleceniem powłoki\n" -#: builtins/type.def:296 +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "%s jest wewn�trznym poleceniem pow�oki\n" +msgstr "%s jest wewnętrznym poleceniem powłoki\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s jest %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "�cie�ka do %s jest zapami�tana (%s)\n" +msgstr "ścieżka do %s jest zapamiętana (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "%s: nieprawid�owy argument stanowi�cy ograniczenie" +msgstr "%s: nieprawidłowy argument stanowiący ograniczenie" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "`%c': z�e polecenie" +msgstr "`%c': złe polecenie" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" -msgstr "%s: nie mo�na odczyta� ograniczenia: %s" +msgstr "%s: nie można odczytać ograniczenia: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" -msgstr "" +msgstr "ograniczenie" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s: nie mo�na zmieni� ograniczenia: %s" +msgstr "%s: nie można zmienić ograniczenia: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" -msgstr "liczba �semkowa" +msgstr "liczba ósemkowa" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "`%c': nieprawid�owy operator trybu symbolicznego" +msgstr "`%c': nieprawidłowy operator trybu symbolicznego" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "`%c': nieprawid�owy znak trybu symbolicznego" +msgstr "`%c': nieprawidłowy znak trybu symbolicznego" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " linia " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "ostatnie polecenie: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Przerywanie..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "DIAGNOSTYCZNE ostrzeżenie: " + +#: error.c:488 msgid "unknown command error" -msgstr "nieznany b��d polecenia" +msgstr "nieznany błąd polecenia" -#: error.c:407 +#: error.c:489 msgid "bad command type" -msgstr "z�y rodzaj polecenia" +msgstr "zły rodzaj polecenia" -#: error.c:408 +#: error.c:490 msgid "bad connector" -msgstr "z�y ��cznik" +msgstr "zły łącznik" -#: error.c:409 +#: error.c:491 msgid "bad jump" -msgstr "z�y skok" +msgstr "zły skok" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aprzekroczony czas oczekiwania na dane wejściowe: auto-wylogowanie\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "nie mo�na przekierowa� standardowego wej�cia z /dev/null: %s" +msgstr "nie można przekierować standardowego wejścia z /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "TIMEFORMAT: `%c': nieprawid�owy znak formatuj�cy" +msgstr "TIMEFORMAT: `%c': nieprawidłowy znak formatujący" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: koproces [%d:%s] nadal istnieje" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "b��d zapisu: %s" +msgstr "błąd potoku" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: przekroczono maksymalny poziom zagnieżdżenia polecenia eval (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: przekroczono maksymalny poziom zagnieżdżenia polecenia source (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: przekroczono maksymalny poziom zagnieżdżenia funkcji (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: ograniczony: nie mo�na podawa� `/' w nazwach polece�" +msgstr "%s: ograniczony: nie można podawać `/' w nazwach poleceń" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: nie znaleziono polecenia" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: nie można uruchomić: nie znaleziono wymaganego pliku" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: %s: z�y interpreter" +msgstr "%s: %s: zły interpreter" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: nie można uruchomić pliku binarnego: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s' jest specjalnym poleceniem wewnętrznym" -#: execute_cmd.c:4976 +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "nie mo�na skopiowa� deskryptora pliku %d do %d" +msgstr "nie można skopiować deskryptora pliku %d do %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "przekroczone ograniczenie poziomu rekursji dla wyra�enia" +msgstr "przekroczone ograniczenie poziomu rekursji dla wyrażenia" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "niedomiar stosu rekursji" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "b��d sk�adniowy w wyra�eniu" +msgstr "błąd składniowy w wyrażeniu" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "pr�ba przypisania do nie-zmiennej" +msgstr "próba przypisania do nie-zmiennej" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "błąd składniowy w przypisaniu zmiennej" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "dzielenie przez 0" # ??? -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "b��d: z�y prefiks operatora przypisuj�cego" +msgstr "błąd: zły prefiks operatora przypisującego" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "spodziewano si� `:' w wyra�eniu warunkowym" +msgstr "spodziewano się `:' w wyrażeniu warunkowym" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" -msgstr "wyk�adnik mniejszy ni� 0" +msgstr "wykładnik mniejszy niż 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" -"spodziewany identyfikator po operatorze preinkrementacji lub predekrementacji" +msgstr "spodziewany identyfikator po operatorze preinkrementacji lub predekrementacji" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "brakuj�cy `)'" +msgstr "brakujący `)'" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "b��d sk�adni: spodziewany argument" +msgstr "błąd składni: spodziewany argument" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "b��d sk�adni: nieprawid�owy operator arytmetyczny" +msgstr "błąd składni: nieprawidłowy operator arytmetyczny" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "" +msgstr "%s%s%s: %s (błędny znacznik to \"%s\")" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "nieprawid�owa podstawa arytmetyczna" +msgstr "nieprawidłowa podstawa arytmetyczna" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "błędna stała całkowita" + +#: expr.c:1603 msgid "value too great for base" -msgstr "warto�� za du�a na podstaw�" +msgstr "wartość za duża na podstawę" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "%s: oczekiwano wyra�enia ca�kowitego" +msgstr "%s: błąd w wyrażeniu\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getcwd: niemo�liwy dost�p do katalog�w nadrz�dnych" +msgstr "getcwd: niemożliwy dostęp do katalogów nadrzędnych" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6208 +#, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "nie mo�na wy��czy� trybu nieblokuj�cego dla deskryptora %d" +msgstr "nie można wyłączyć trybu nieblokującego dla deskryptora %d" -#: input.c:258 +#: input.c:266 #, 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" +msgstr "nie można przydzielić nowego deskryptora pliku dla wejścia basha z %d" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" -msgstr "save_bash_input: bufor dla nowego deskryptora %d ju� istnieje" +msgstr "save_bash_input: bufor dla nowego deskryptora %d już istnieje" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: PĘTLA: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: PĘTLA: psi (%d) == storage[psi].bucket_next" # ??? -#: jobs.c:887 +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" -msgstr "proces o PID %d wyst�puje w dzia�aj�cym zadaniu %d" +msgstr "proces o PID %d występuje w działającym zadaniu %d" -#: jobs.c:1005 +#: jobs.c:1397 #, c-format msgid "deleting stopped job %d with process group %ld" -msgstr "usuwanie zatrzymanego zadania %d z grup� proces�w %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 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: pid %5ld (%s) oznaczony jako nadal żywy" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: brak takiego PID-u" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" -msgstr "" +msgstr "Sygnał %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "" +msgstr "Zakończono" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "" +msgstr "Zatrzymano" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" -msgstr "" +msgstr "Zatrzymano(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "" +msgstr "Działa" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "" +msgstr "Zakończono(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "" +msgstr "Kod wyjścia %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "" +msgstr "Stan nieznany" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "" +msgstr "(zrzut pamięci) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr "" +msgstr " (katalog: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" -msgstr "" +msgstr "setpgid potomka (%ld na %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" -msgstr "wait: PID %ld nie jest potomkiem tej pow�oki" +msgstr "wait: PID %ld nie jest potomkiem tej powłoki" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: Brak rekordu dla procesu %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: zadanie %d jest zatrzymane" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: brak bieżących zadań" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "%s: zadanie zosta�o przerwane" +msgstr "%s: zadanie zostało przerwane" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "%s: zadanie %d ju� pracuje w tle" +msgstr "%s: zadanie %d już pracuje w tle" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: wyłączanie WNOHANG w celu uniknięcia nieskończonego oczekiwania" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "%s: uwaga: " +msgstr "%s: linia %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr "" +msgstr " (zrzut pamięci)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "" +msgstr "(katalog: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "" +msgstr "initialize_job_control: getpgrp nie powiodło się" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: brak kontroli zadań w tle" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "" +msgstr "initialize_job_control: dyscyplina linii" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "nie można ustawić grupy procesów terminala (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "w tej pow�oce nie ma kontroli zada�" +msgstr "w tej powłoce nie ma kontroli zadań" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "malloc: za�o�enie, �e %s nie jest spe�nione\n" +msgstr "malloc: założenie, że %s nie jest spełnione\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" "\r\n" -"malloc: %s:%d: spartaczone za�o�enie\r\n" +"malloc: %s:%d: spartaczone założenie\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "%s: nieznany host" +msgstr "nieznany" # ??? -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "malloc: nieprawid�owy blok na li�cie wolnych blok�w" +msgstr "malloc: nieprawidłowy blok na liście wolnych bloków" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "free: wywo�ane dla bloku, kt�ry ju� zosta� zwolniony" +msgstr "free: wywołane dla bloku, który już został zwolniony" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "free: wywo�ane dla bloku, kt�ry nie zosta� przydzielony" +msgstr "free: wywołane dla bloku, który nie został przydzielony" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: wykryto niedomiar; mh_nbytes poza zakresem" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: wykryto niedomiar; uszkodzenie magic8" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "free: rozmiar pocz�tkowy i ko�cowy fragmentu s� r�ne" +msgstr "free: rozmiar początkowy i końcowy fragmentu są różne" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "realloc: wywo�ane dla bloku, kt�ry nie zosta� przydzielony" +msgstr "realloc: wywołane dla bloku, który nie został przydzielony" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: wykryto niedomiar; mh_nbytes poza zakresem" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: wykryto niedomiar; uszkodzenie magic8" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "realloc: rozmiar pocz�tkowy i ko�cowy fragmentu s� r�ne" +msgstr "realloc: rozmiar początkowy i końcowy fragmentu są różne" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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" +msgstr "register_alloc: tablica alokacji jest pełna podczas FIND_ALLOC?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "register_alloc: %p ju� znajduje si� w tablicy jako przydzielony?\n" +msgstr "register_alloc: %p już znajduje się w tablicy jako przydzielony?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "register_free: %p ju� znajduje si� w tablicy jako wolny?\n" +msgstr "register_free: %p już znajduje się w tablicy jako wolny?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "nieprawid�owa podstawa" +msgstr "nieprawidłowa podstawa" #: lib/sh/netopen.c:168 #, c-format @@ -1257,1075 +1434,1104 @@ msgstr "%s: nieznany host" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "%s: nieznana us�uga" +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" +msgstr "%s: źle określona ścieżka sieciowa" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "operacje sieciowe nie s� wspierane" +msgstr "operacje sieciowe nie są wspierane" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: nie można zmienić lokalizacji (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: nie można zmienić lokalizacji (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: nie mo�na przydzieli� %lu bajt�w" +msgstr "setlocale: %s: nie można zmienić lokalizacji (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: nie mo�na przydzieli� %lu bajt�w" +msgstr "setlocale: %s: nie można zmienić lokalizacji (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" -msgstr "Masz poczt� w $_" +msgstr "Masz pocztę w $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" -msgstr "Masz now� poczt� w $_" +msgstr "Masz nową pocztę w $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Poczta w %s jest przeczytana\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "b��d sk�adni: oczekiwano wyra�enia arytmetycznego" +msgstr "błąd składni: oczekiwano wyrażenia arytmetycznego" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "b��d sk�adni: oczekiwany `;'" +msgstr "błąd składni: oczekiwany `;'" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "b��d sk�adni: `((%s))'" +msgstr "błąd składni: `((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: z�y rodzaj instrukcji %d" +msgstr "make_here_document: zły rodzaj instrukcji %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "dokument miejscowy w linii %d ograniczony końcem pliku (oczekiwano `%s')" -#: make_cmd.c:756 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) przekracza SIZE_MAX (%lu): linia skrócona" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "przekroczono maksymalną liczbę dokumentów w miejscu" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "nieoczekiwany EOF podczas poszukiwania pasuj�cego `%c'" +msgstr "nieoczekiwany EOF podczas poszukiwania pasującego `%c'" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "nieoczekiwany EOF podczas poszukiwania `]]'" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "b��d sk�adni w wyra�eniu warunkowym: nieoczekiwany znacznik `%s'" +msgstr "błąd składni w wyrażeniu warunkowym: nieoczekiwany znacznik `%s'" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "b��d sk�adni w wyra�eniu warunkowym" +msgstr "błąd składni w wyrażeniu warunkowym" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "nieoczekiwany znacznik `%s', oczekiwano `)'" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "oczekiwano `)'" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "nieoczekiwany argument `%s' jednoargumentowego operatora warunkowego" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "nieoczekiwany argument jednoargumentowego operatora warunkowego" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" msgstr "nieoczekiwany argument `%s', oczekiwano dwuarg. operatora warunkowego" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "oczekiwano dwuargumentowego operatora warunkowego" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "nieoczekiwany argument `%s' dwuargumentowego operatora warunkowego" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "nieoczekiwany argument dwuargumentowego operatora warunkowego" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "nieoczekiwany znacznik `%c' w poleceniu warunkowym" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "nieoczekiwany znacznik `%s' w poleceniu warunkowym" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "nieoczekiwany znacznik %d w poleceniu warunkowym" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "b��d sk�adni przy nieoczekiwanym znaczniku `%s'" +msgstr "błąd składni przy nieoczekiwanym znaczniku `%s'" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "b��d sk�adni przy `%s'" +msgstr "błąd składni przy `%s'" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "b��d sk�adni: nieoczekiwany koniec pliku" +msgstr "błąd składni: nieoczekiwany koniec pliku" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" -msgstr "b��d sk�adni" +msgstr "błąd składni" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "U�yj \"%s\", aby opu�ci� t� pow�ok�.\n" +msgstr "Użyj \"%s\", aby opuścić tę powłokę.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "nieoczekiwany EOF podczas poszukiwania pasuj�cego `)'" +msgstr "nieoczekiwany EOF podczas poszukiwania pasującego `)'" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "uzupe�nienie: nie znaleziono funkcji `%s'" +msgstr "uzupełnienie: nie znaleziono funkcji `%s'" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: możliwe zapętlenie wznowień" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: z�y ��cznik `%d'" +msgstr "print_command: zły łącznik `%d'" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: nieprawid�owy deskryptor pliku: %s" +msgstr "xtrace_set: %d: nieprawidłowy deskryptor pliku" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: pusty wskaźnik pliku" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "cprintf: `%c': nieprawid�owy znak formatuj�cy" +msgstr "cprintf: `%c': nieprawidłowy znak formatujący" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "deskryptor pliku poza zakresem" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" -msgstr "%s: nieojednoznaczne przekierowanie" +msgstr "%s: niejednoznaczne przekierowanie" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: nie mo�na nadpisa� istniej�cego pliku" +msgstr "%s: nie można nadpisać istniejącego pliku" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: ograniczony: nie mo�na przekierowa� wyj�cia" +msgstr "%s: ograniczony: nie można przekierować wyjścia" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, c-format msgid "cannot create temp file for here-document: %s" -msgstr "nie mo�na utworzy� pliku tymczasowego dla dokumentu miejscowego: %s" +msgstr "nie można utworzyć pliku tymczasowego dla dokumentu miejscowego: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: nie mo�na przypisa� listy do elementu tablicy" +msgstr "%s: nie można przypisać deskryptora pliku do zmiennej" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "/dev/(tcp|udp)/host/port nie s� wspierane bez sieci" +msgstr "/dev/(tcp|udp)/host/port nie są wspierane bez sieci" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "b��d przekierowania: nie mo�na powieli� deskryptora pliku" +msgstr "błąd przekierowania: nie można powielić deskryptora pliku" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "nie mo�na znale�� /tmp, prosz� o utworzenie!" +msgstr "nie można znaleźć /tmp, proszę o utworzenie!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "/tmp musi by� prawid�ow� nazw� katalogu" +msgstr "/tmp musi być prawidłową nazwą katalogu" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "tryb ładnego wypisywania jest ignorowany w powłokach interaktywnych" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" -msgstr "%c%c: nieprawid�owa opcja" +msgstr "%c%c: nieprawidłowa opcja" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nie można ustawić uid-a na %d: efektywny uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nie można ustawić gid-a na %d: efektywny gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "nie można uruchomić debuggera; tryb diagnostyczny wyłączony" -#: shell.c:1651 +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: jest katalogiem" + +#: shell.c:1907 msgid "I have no name!" msgstr "Nie mam nazwy!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "" +msgstr "GNU bash, wersja %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"Użycie:\t%s [długa opcja GNU] [opcja] ...\n" +"\t%s [długa opcja GNU] [opcja] plik-skryptu ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "D�ugie opcje GNU:\n" +msgstr "Długie opcje GNU:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "Opcje pow�oki:\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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD lub -c polecenie lub -O shopt_option\t\t(tylko wywołanie)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s lub -o opcja\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Aby uzyskać więcej informacji o opcjach powłoki, napisz `%s -c \"help set\"'.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +"Aby uzyskać więcej informacji o poleceniach wewnętrznych powłoki,\n" "napisz `%s -c help'.\n" -#: shell.c:1824 +#: shell.c:2096 #, 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" +msgstr "Do zgłaszania błędów należy używać polecenia `bashbug'.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "strona domowa basha: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ogólna pomoc przy użytkowaniu oprogramowania GNU: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "sigprocmask: %d: nieprawid�owa operacja" +msgstr "sigprocmask: %d: nieprawidłowa operacja" #: siglist.c:48 msgid "Bogus signal" -msgstr "" +msgstr "Błędny sygnał" #: siglist.c:51 msgid "Hangup" -msgstr "" +msgstr "Rozłączenie" #: siglist.c:55 msgid "Interrupt" -msgstr "" +msgstr "Przerwanie" #: siglist.c:59 msgid "Quit" -msgstr "" +msgstr "Wyjście" #: siglist.c:63 msgid "Illegal instruction" -msgstr "" +msgstr "Niedozwolona instrukcja" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "" +msgstr "Pułapka debuggera/breakpoint" #: siglist.c:75 msgid "ABORT instruction" -msgstr "" +msgstr "Instrukcja ABORT" #: siglist.c:79 msgid "EMT instruction" -msgstr "" +msgstr "Pułapka EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "" +msgstr "Błąd w obliczeniach zmiennoprzecinkowych" #: siglist.c:87 msgid "Killed" -msgstr "" +msgstr "Unicestwiony" #: siglist.c:91 -#, fuzzy msgid "Bus error" -msgstr "b��d sk�adni" +msgstr "Błąd szyny" #: siglist.c:95 msgid "Segmentation fault" -msgstr "" +msgstr "Naruszenie ochrony pamięci" #: siglist.c:99 msgid "Bad system call" -msgstr "" +msgstr "Błędne wywołanie systemowe" #: siglist.c:103 msgid "Broken pipe" -msgstr "" +msgstr "Przerwany potok" #: siglist.c:107 msgid "Alarm clock" -msgstr "" +msgstr "Budzik" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "ograniczony" +msgstr "Zakończony" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "" +msgstr "Nagłe żądanie we/wy" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "" +msgstr "Zatrzymany (sygnał)" #: siglist.c:127 msgid "Continue" -msgstr "" +msgstr "Kontynuacja" #: siglist.c:135 msgid "Child death or stop" -msgstr "" +msgstr "Śmierć lub zatrzymanie potomka" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "" +msgstr "Zatrzymany (wejście z tty)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "" +msgstr "Zatrzymany (wyjście na tty)" #: siglist.c:147 msgid "I/O ready" -msgstr "" +msgstr "We/wy gotowe" #: siglist.c:151 msgid "CPU limit" -msgstr "" +msgstr "Przekroczony limit procesora" #: siglist.c:155 msgid "File limit" -msgstr "" +msgstr "Przekroczony limit pliku" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "" +msgstr "Alarm (wirtualny)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "" +msgstr "Alarm (profiler)" #: siglist.c:167 msgid "Window changed" -msgstr "" +msgstr "Okno zmienione" #: siglist.c:171 msgid "Record lock" -msgstr "" +msgstr "Zasoby utracone" #: siglist.c:175 msgid "User signal 1" -msgstr "" +msgstr "Sygnał użytkownika 1" #: siglist.c:179 msgid "User signal 2" -msgstr "" +msgstr "Sygnał użytkownika 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "" +msgstr "Dane wejściowe HFT" #: siglist.c:187 msgid "power failure imminent" -msgstr "" +msgstr "Bliska awaria zasilania" #: siglist.c:191 msgid "system crash imminent" -msgstr "" +msgstr "Bliska awaria systemu" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "" +msgstr "Przeniesienie procesu na inny procesor" #: siglist.c:199 msgid "programming error" -msgstr "" +msgstr "Błąd programowania" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "" +msgstr "Nadany tryb monitora HFT" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "" +msgstr "Wycofany tryb monitora HFT" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "" +msgstr "Sekwencja dźwiękowa HFT zakończona" #: siglist.c:215 msgid "Information request" -msgstr "" +msgstr "Żądanie informacji" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "" +msgstr "Nieznany sygnał #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "z�e podstawienie: brak zamykaj�cego `%s' w %s" +msgstr "złe podstawienie: brak zamykającego `%s' w %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "%s: nie mo�na przypisa� listy do elementu tablicy" +msgstr "%s: nie można przypisać listy do elementu tablicy" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "nie mo�na utworzy� potoku dla podstawienia procesu" +msgstr "nie można utworzyć potoku dla podstawienia procesu" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "nie mo�na utworzy� procesu potomnego dla podstawienia procesu" +msgstr "nie można utworzyć procesu potomnego dla podstawienia procesu" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" -msgstr "nie mo�na otworzy� nazwanego potoku %s do odczytu" +msgstr "nie można otworzyć nazwanego potoku %s do odczytu" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "nie mo�na otworzy� nazwanego potoku %s do zapisu" +msgstr "nie można otworzyć nazwanego potoku %s do zapisu" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "nie mo�na powieli� nazwanego potoku %s jako deskryptor %d" +msgstr "nie można powielić nazwanego potoku %s jako deskryptor %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "podstawienie polecenia: zignorowano zerowy bajt na wejściu" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "nie mo�na utworzy� potoku dla podstawienia polecenia" +msgstr "nie można utworzyć potoku dla podstawienia polecenia" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "nie mo�na utworzy� procesu potomnego dla podstawienia polecenia" +msgstr "nie można utworzyć procesu potomnego dla podstawienia polecenia" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "command_substitute: nie mo�na powieli� potoku jako deskryptora 1" +msgstr "command_substitute: nie można powielić potoku jako deskryptora 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nieprawidłowa nazwa zmiennej przy odwołaniu do nazwy" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: błędne rozwinięcie niebezpośrednie" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "`%s': błędna nazwa zmiennej" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametr nieustawiony" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parametr pusty lub nieustawiony" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "%s: wyra�enie dla pod�a�cucha < 0" +msgstr "%s: wyrażenie dla podłańcucha < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: z�e podstawienie" +msgstr "%s: złe podstawienie" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "$%s: nie mo�na przypisywa� w ten spos�b" +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:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "przyszłe wersje powłoki będą wymuszać obliczenie jako podstawienie arytmetyczne" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "z�e podstawienie: brak zamykaj�cego `%s' w %s" +msgstr "złe podstawienie: brak zamykającego \"`\" w %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "brak pasuj�cego: %s" +msgstr "brak pasującego: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "oczekiwano argumentu" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s: oczekiwano wyra�enia ca�kowitego" +msgstr "%s: oczekiwano wyrażenia całkowitego" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "oczekiwano `)'" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: oczekiwano operatora dwuargumentowego" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: oczekiwano operatora jednoargumentowego" + +#: test.c:896 msgid "missing `]'" -msgstr "brakuj�cy `]'" +msgstr "brakujący `]'" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "błąd składni: oczekiwano `%s'" + +#: trap.c:220 msgid "invalid signal number" -msgstr "nieprawid�owy numer sygna�u" +msgstr "nieprawidłowy numer sygnału" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "obsługa pułapki: przekroczono maksymalny poziom obsługi pułapek (%d)" -#: trap.c:327 +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" -msgstr "run_pending_traps: z�a warto�� trap_list[%d]: %p" +msgstr "run_pending_traps: zła wartość trap_list[%d]: %p" -#: trap.c:331 +#: trap.c:416 #, 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" +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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler: z�y sygna� %d" +msgstr "trap_handler: zły sygnał %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "b��d importu definicji funkcji dla `%s'" +msgstr "błąd importu definicji funkcji dla `%s'" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "poziom pow�oki (%d) jest za du�y, ustawiono na 1" +msgstr "poziom powłoki (%d) jest za duży, ustawiono na 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "make_local_variable: brak kontekstu funkcji w bie��cym zakresie" +msgstr "make_local_variable: brak kontekstu funkcji w bieżącym zakresie" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: nie można przypisać wartości do zmiennej" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: nie można odziedziczyć wartości z niezgodnego typu" -#: variables.c:3159 +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: przypisanie wartości całkowitej przy odwołaniu do nazwy" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "all_local_variables: brak kontekstu funkcji w bie��cym zakresie" +msgstr "all_local_variables: brak kontekstu funkcji w bieżącym zakresie" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: parametr pusty lub nieustawiony" +msgstr "%s ma pusty exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "nieprawid�owy znak %d w exportstr dla %s" +msgstr "nieprawidłowy znak %d w exportstr dla %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "brak `=' w exportstr dla %s" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "pop_var_context: nag��wek shell_variables poza kontekstem funkcji" +msgstr "pop_var_context: nagłówek shell_variables poza kontekstem funkcji" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: brak kontekstu global_variables" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" -"pop_scope: nag��wek shell_variables poza zakresem tymczasowego �rodowiska" +msgstr "pop_scope: nagłówek shell_variables poza zakresem tymczasowego środowiska" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: nie mo�na otworzy�: %s" +msgstr "%s: %s: nie można otworzyć jako PLIK" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: nieprawid�owy deskryptor pliku: %s" +msgstr "%s: %s: nieprawidłowa wartość dla deskryptora pliku do śledzenia" -#: version.c:46 -#, fuzzy -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright (C) 2006 Free Software Foundation, Inc.\n" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: wartość zgodności poza zakresem" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 Free Software Foundation, Inc." -#: version.c:86 version2.c:83 -#, c-format -msgid "GNU bash, version %s (%s)\n" -msgstr "" +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Licencja GPLv3+: GNU GPL wersja 3 lub późniejsza \n" -#: version.c:91 version2.c:88 +#: version.c:86 version2.c:86 #, c-format -msgid "This is free software; you are free to change and redistribute it.\n" -msgstr "" +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, wersja %s (%s)\n" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "To oprogramowanie jest wolnodostępne; można je swobodnie zmieniać i rozpowszechniać." -#: version2.c:86 -#, fuzzy, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "Copyright (C) 2006 Free Software Foundation, Inc.\n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Nie ma ŻADNEJ GWARANCJI w granicach dopuszczanych przez prawo." -#: version2.c:87 +#: xmalloc.c:93 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \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)" +msgstr "%s: nie można przydzielić %lu bajtów (przydzielono %lu)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: nie mo�na przydzieli� %lu bajt�w" +msgstr "%s: nie można przydzielić %lu bajtów" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: nie można przydzielić %lu bajtów (przydzielono %lu)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: nie mo�na przydzieli� %lu bajt�w" +msgstr "%s: %s:%d: nie można przydzielić %lu bajtów" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "" +msgstr "alias [-p] [nazwa[=wartość] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "" +msgstr "unalias [-a] nazwa [nazwa ...]" -#: 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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpvsPVSX] [-m mapa] [-f plik] [-q nazwa] [-u nazwa] [-r sekwencja] [-x sekwencja:polecenie-powłoki] [sekwencja:funkcja-readline lub polecenie-readline]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" -msgstr "" +msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "" +msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "" +msgstr "builtin [polecenie-wbudowane [arg ... ]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" +msgstr "caller [wyrażenie]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [katalog]" #: 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 "" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "" +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] polecenie [arg ...]" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "" +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [nazwa[=wartość] ...] lub declare -p [-aAfFilnrtux] [nazwa ...]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] nazwa[=wartość] ... lub typeset -p [-aAfFilnrtux] [nazwa ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "" +msgstr "local [opcja] nazwa[=wartość] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "" +msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" -msgstr "" - -#: builtins.c:90 -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" +msgstr "echo [-n] [arg ...]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f plik] [nazwa ...]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "" +msgid "eval [arg ...]" +msgstr "eval [arg ...]" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "" +msgid "getopts optstring name [arg ...]" +msgstr "getopts łańcuch-opcji nazwa [arg ...]" #: builtins.c:98 -msgid "exit [n]" -msgstr "" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nazwa] [polecenie [argument ...]] [przekierowanie ...]" #: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 msgid "logout [n]" -msgstr "" +msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" -msgstr "" +msgstr "fc [-e nazwa-ed] [-lnr] [pierwszy] [ostatni] lub fc -s [wz=zam] [polecenie]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "" +msgstr "fg [zadanie]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "" +msgstr "bg [zadanie ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "" +msgstr "hash [-lr] [-p ścieżka] [-dt] [nazwa ...]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "" +msgstr "help [-dms] [wzorzec ...]" -#: builtins.c:121 -msgid "" -"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " -"[arg...]" -msgstr "" +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d offset] [n] lub history -anrw [plik] lub history -ps arg [arg ...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "" - -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "" +msgstr "jobs [-lnprs] [zadanie ...] lub jobs -x polecenie [argumenty]" -#: builtins.c:132 -msgid "" -"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " -"[sigspec]" -msgstr "" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [zadanie ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s sygnał | -n numer-sygnału | -sygnał] pid | zadanie ... lub kill -l [sygnał]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "" +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a tablica] [-d separator] [-i tekst] [-n liczba] [-N liczba] [-p zachęta] [-t czas] [-u fd] [nazwa ...]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o nazwa-opcji] [--] [-] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nazwa ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nazwa[=wartość] ...] lub export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "licznik przesuni�cia" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [aAf] [nazwa[=wartość] ...] lub readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "wymagany argument w postaci nazwy pliku" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source plik [argumenty]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr "wymagany argument w postaci nazwy pliku" +msgstr ". plik [argumenty]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" -msgstr "" - -#: builtins.c:158 -msgid "test [expr]" -msgstr "" +msgstr "suspend [-f]" #: builtins.c:160 -msgid "[ arg... ]" -msgstr "" +msgid "test [expr]" +msgstr "test [wyrażenie]" #: builtins.c:162 -msgid "times" -msgstr "" +msgid "[ arg... ]" +msgstr "[ arg... ]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "" +msgstr "trap [-lp] [[arg] sygnał ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "" +msgstr "type [-afptP] nazwa [nazwa ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [ograniczenie]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "" +msgstr "umask [-p] [-S] [uprawnienia]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p zmienna] [id ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "" - -#: builtins.c:182 -msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" #: builtins.c:184 -msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "" +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NAZWA [in SŁOWA ... ] ; do POLECENIA; done" #: builtins.c:186 -msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "" +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( wyr1; wyr2; wyr3 )); do POLECENIA; done" #: builtins.c:188 -msgid "time [-p] pipeline" -msgstr "" +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAZWA [in SŁOWA ... ;] do POLECENIA; done" #: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "" +msgid "time [-p] pipeline" +msgstr "time [-p] potok" #: builtins.c:192 -msgid "" -"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " -"COMMANDS; ] fi" -msgstr "" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case SŁOWO in [WZORZEC [| WZORZEC]...) POLECENIA ;;]... esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "" +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if POLECENIA; then POLECENIA; [ elif POLECENIA; then POLECENIA; ]... [ else POLECENIA; ] fi" #: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while POLECENIA; do POLECENIA-2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until POLECENIA; do POLECENIA-2; done" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NAZWA] polecenie [przekierowania]" #: builtins.c:202 -msgid "{ COMMANDS ; }" -msgstr "" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nazwa { POLECENIA ; } lub nazwa () { POLECENIA ; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "" +msgid "{ COMMANDS ; }" +msgstr "{ POLECENIA ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "spodziewano si� wyra�enia" +msgid "job_spec [&]" +msgstr "zadanie [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "spodziewano si� wyra�enia" +msgid "(( expression ))" +msgstr "(( wyrażenie ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ wyrażenie ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "" +msgstr "zmienne - nazwy i znaczenie niektórych zmiennych powłoki" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "" +msgstr "pushd [-n] [+N | -N | katalog]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" -msgstr "" +msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "" +msgstr "shopt [-pqsu] [-o] [nazwa-opcji ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +msgstr "printf [-v var] format [argumenty]" -#: 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o opcja] [-A akcja] [-G wzorzec-glob] [-W lista-słów] [-F funkcja] [-C polecenie] [-X wzorzec-filtra] [-P przedrostek] [-S przyrostek] [nazwa ...]" -#: 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:235 +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 opcja] [-A akcja] [-G wzorzec-glob] [-W lista-słów] [-F funkcja] [-C polecenie] [-X wzorzec-filtra] [-P przedrostek ] [-S przyrostek] [słowo]" -#: 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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opcja] [-DEI] [nazwa ...]" #: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d separator] [-n liczba] [-O początek] [-s liczba] [-t] [-u fd] [-C wywołanie] [-c co-ile] [tablica]" -#: builtins.c:254 -#, fuzzy +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d ogranicznik] [-n liczba] [-O początek] [-s liczba] [-t] [-u fd] [-C wywołanie] [-c krok] [tablica]" + +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2337,36 +2543,47 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" 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 +"Definiowanie i wyświetlanie aliasów.\n" +" \n" +" Bez argumentów `alias' wypisuje na standardowym wyjściu listę aliasów\n" +" w postaci alias NAZWA=WARTOŚĆ.\n" +" \n" +" W przeciwnym przypadku definiowany jest alias dla każdej NAZWY, dla której\n" +" podano WARTOŚĆ. Spacja na końcu WARTOŚCI powoduje, że podczas rozwijania\n" +" tego aliasu podstawienie aliasów będzie przeprowadzone także dla\n" +" następnego słowa.\n" +" \n" +" Opcje:\n" +" -p\twypisanie wszystkich zdefiniowanych aliasów w formacie do\n" +" \tponownego użycia\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie alias zwraca prawdę, chyba że poda się NAZWĘ, dla której nie\n" +" zdefiniowano aliasu." + +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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." +"Usuwa wszystkich NAZW z listy zdefiniowanych aliasów.\n" +" \n" +" Opcje:\n" +" -a\tusunięcie wszystkich definicji aliasów\n" +" \n" +" Zwracana jest prawda, chyba że NAZWA nie jest istniejącym aliasem." -#: builtins.c:289 -#, fuzzy +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2378,71 +2595,69 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\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" +"Ustawianie przypisań klawiszy i zmiennych Readline.\n" +" \n" +" Przypisanie sekwencji klawiszy do funkcji Readline lub makra albo\n" +" ustawienie zmiennej Readline. Składnia pozbawiona opcji jest równoważna\n" +" stosowanej w ~/.inputrc, ale musi być przekazana jako jeden argument, np.:\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" +" \n" +" Opcje:\n" +" -m MAPA Użycie MAPY 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 +" -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" +" -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.\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" +" -q nazwa-funkcji Określenie, które klawisze wywołują zadaną funkcję.\n" +" -u nazwa-funkcji Anulowanie wszystkich dowiązań dla klawiszy\n" +" przypisanych do funkcji o podanej nazwie.\n" +" -r sekwencja Usunięcie dowiązania dla SEKWENCJI klawiszy.\n" +" -f plik Odczyt dowiązań dla klawiszy z podanego PLIKU.\n" +" -x sekwencja:polecenie-powłoki\tPowoduje uruchomienie POLECENIA-POWŁOKI\n" +" \t\t\t\tgdy wprowadzona zostanie podana SEKWENCJA klawiszy.\n" +" -X Lista sekwencji klawiszy przypisanych przez -x oraz\n" +" powiązane polecenia w postaci nadającej się do użycia\n" +" jako dane wejściowe.\n" +" \n" +" Stan wyjściowy:\n" +" bind zwraca 0, chyba że podano nieznaną opcję lub wystąpi błąd." + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2452,11 +2667,15 @@ msgid "" " 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." +"Wyjście z pętli for, while lub until.\n" +" \n" +" Wyjście z pętli FOR, WHILE lub UNTIL. Jeśli podano N, sterowanie wychodzi\n" +" za N-tą zagnieżdżoną pętlę.\n" +" \n" +" Stan wyjściowy:\n" +" Instrukcja zwraca prawdę, chyba że N jest mniejsze niż 1." -#: builtins.c:338 -#, fuzzy +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2466,25 +2685,38 @@ msgid "" " 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." +"Wznowienie pętli for, while lub until.\n" +" \n" +" Wznowienie następnej iteracji otaczającej pętli FOR, WHILE lub UNTIL.\n" +" Jeśli podano N, to wznawiana jest N-ta otaczająca pętla.\n" +" \n" +" Stan wyjściowy:\n" +" Instrukcja zwraca 0, chyba że N jest mniejsze niż 1." -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" +"Wywołanie polecenia wbudowanego powłoki.\n" +" \n" +" Wywołanie POLECENIA-WBUDOWANEGO z argumentami ARG bez wykonywania\n" +" wyszukiwania polecenia. Jest to przydatne w przypadku ponownego\n" +" implementowania polecenia wbudowanego jako funkcji powłoki i wywoływania\n" +" polecenia wbudowanego z wewnątrz tej funkcji.\n" +" \n" +" Stan wyjściowy:\n" +" Instrukcja zwraca stan wyjściowy POLECENIA-WBUDOWANEGO lub fałsz, jeśli\n" +" POLECENIE-WBUDOWANE nie jest poleceniem wbudowanym powłoki." -#: builtins.c:365 -#, fuzzy +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2499,68 +2731,97 @@ msgid "" " 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" +"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" +" Bez WYRAŻENIA zwracane jest \"$linia $plik\". Z WYRAŻENIEM zwracane jest\n" +" \"$linia $procedura $plik\"; dodatkowe informacje służą do udostępnienia\n" +" ś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." +" Wartość WYRAŻENIA określa o ile ramek wywołań względem bieżącej ramki\n" +" należy się cofnąć; numer najwyższej ramki to 0.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca 0, chyba że powłoka nie wykonuje funkcji lub WYRAŻENIE\n" +" jest nieprawidłowe." -#: builtins.c:383 -#, fuzzy +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; 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" +"Zmiana bieżącego katalogu powłoki.\n" +" \n" +" Zmiana bieżącego katalogu na KATALOG. Domyślnym KATALOGIEM jest wartość\n" +" zmiennej powłoki HOME.\n" +" \n" +" Zmienna CDPATH określa ścieżkę przeszukiwania w poszukiwaniu katalogu\n" +" zawierającego KATALOG. 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 +" bieżący. Jeśli KATALOG zaczyna się od ukośnika (/), to CDPATH nie\n" +" nie jest używane.\n" +" \n" +" Gdy katalog nie zostanie znaleziony, a ustawiona jest zmienna powłoki\n" +" `cdable_vars', to następuje próba użycia podanej nazwy jako nazwy zmiennej.\n" +" Jeśli zmienna ta ma wartość, to jako KATALOG jest używana jej wartość.\n" +" \n" +" Opcje:\n" +" -L\twymuszenie śledzenia dowiązań symbolicznych: rozwiązanie\n" +" \t\tdowiązań w KATALOGU po przetworzeniu wszystkich `..'\n" +" -P\tkorzystanie z fizycznej struktury katalogów zamiast śledzenia\n" +" \t\tdowiązań symbolicznych: rozwiązanie dowiązań w KATALOGU przed\n" +" \t\tprzetworzeniem wszystkich `..'\n" +" -e\tjeśli podano opcję -P, a nie można określić bieżącego katalogu,\n" +" \t\tpolecenie kończy się stanem niezerowym\n" +" -@ na systemach obsługujących je, zaprezentowanie pliku mającego\n" +" \t\trozszerzone atrybuty jako katalogu zawierającego atrybuty pliku\n" +" \n" +" Domyślne jest śledzenie dowiązań symbolicznych, jak z opcją `-L'.\n" +" `..' jest przetwarzane przez usunięcie bezpośredniego poprzedniego\n" +" elementu ścieżki przed ukośnikiem lub początkiem KATALOGU.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca 0 jeśli katalog został zmieniony oraz $PWD zostało\n" +" zmienione pomyślnie w przypadku użycia -P; w przeciwnym razie zwraca\n" +" wartość niezerową." + +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2569,9 +2830,19 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Wypisanie nazwy bieżącego katalogu roboczego.\n" +" \n" +" Opcje:\n" +" -L\twypisanie wartości $PWD jeśli określa bieżący katalog roboczy\n" +" -P\twypisanie katalogu fizycznego, bez dowiązań symbolicznych\n" +" \n" +" Domyślnie `pwd' zachowuje się tak, jak z opcją `-L'.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca 0, chyba że podano nieprawidłową opcję lub katalog\n" +" bieżący nie może być odczytany." -#: builtins.c:428 -#, fuzzy +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2580,47 +2851,71 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" -"�adnego efektu; polecenie nic nie robi. Jako kod zako�czenia\n" -" zwracane jest zero." +"Polecenie puste.\n" +" \n" +" Żadnego efektu; polecenie nic nie robi.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze zwracana jest prawda." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Zwrócenie wyniku pozytywnego.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze zwracana jest prawda." -#: builtins.c:448 -#, fuzzy +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." -msgstr "Zwracany jest niepomy�lny wynik zako�czenia." +msgstr "" +"Zwrócenie wyniku negatywnego.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze zwracany jest fałsz." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Wywołanie prostego polecenia lub wyświetlenie informacji o poleceniach.\n" +" \n" +" Uruchomienie POLECENIA z ARGUMENTAMI z pominięciem wyszukiwania funkcji\n" +" powłoki lub wyświetlenie informacji o podanych POLECENIACH. Może być użyte\n" +" do wywołania poleceń z dysku jeśli już istnieje funkcja o danej nazwie.\n" +" \n" +" Opcje:\n" +" -p\tużycie domyślnej wartości PATH, pod którą powinny być wszystkie\n" +" \t\tstandardowe narzędzia\n" +" -v\twypisanie opisu POLECENIA w sposób podobny do polecenia `type'\n" +" -V\twypisanie szczegółowego opisu każdego POLECENIA\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca stan POLECENIA lub fałsz, jeśli POLECENIE nie zostało\n" +" znalezione." -#: builtins.c:476 -#, fuzzy +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2630,17 +2925,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2648,47 +2948,61 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\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 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Ustawienie wartości i atrybutów zmiennej.\n" +" \n" +" Deklaracja zmiennych i nadanie im wartości. Jeśli nie podano NAZW,\n" +" wyświetlane są atrybuty i wartości wszystkich zmiennych.\n" +" \n" +" Opcje:\n" +" -f\tograniczenie akcji lub wyświetlania do nazw i definicji funkcji\n" +" -F\tograniczenie wyświetlania tylko do nazw funkcji (oraz numeru\n" +" \t\tlinii i pliku źródłowego w przypadku diagnostyki)\n" +" -g\ttworzenie zmiennych globalnych w przypadku użycia w funkcji\n" +" \t\tpowłoki; w przeciwnym wypadku ignorowane\n" +" -I\tprzy tworzeniu zmiennej lokalnej, dziedziczy ona atrybuty oraz\n" +" \t\twartość zmiennej o tej samej nazwie z poprzedniego zakresu\n" +" -p\twyświetlenie atrybutów i wartości dla każdej NAZWY\n" +" \n" +" Opcje ustawiające atrybuty:\n" +" -a\tczyni NAZWĘ tablicą indeksowaną (jeśli są one obsługiwane)\n" +" -A\tczyni NAZWĘ tablicą asocjacyjną (jeśli są one obsługiwane)\n" +" -i\tnadaje NAZWIE atrybut `integer' (zmiennej całkowitej)\n" +" -l\tprzekształca wartość każdej NAZWY na małe litery przy przypisaniu\n" +" -n\tczyni NAZWĘ odwołaniem do zmiennej o nazwie wskazanej przez wartość\n" +" -r\tczyni NAZWĘ tylko do odczytu\n" +" -t\tnadaje NAZWIE atrybut `trace'\n" +" -u\tprzekształca wartość każdej NAZWY na wielkie litery przy przypisaniu\n" +" -x\teksportuje NAZWĘ\n" +" \n" +" Użycie `+' zamiast `-' wyłącza podany atrybut.\n" +" \n" +" Zmienne z atrybutem `integer' mają obliczaną wartość arytmetyczną\n" +" (jak w poleceniu `let') podczas przypisywania wartości.\n" +" \n" +" W przypadku użycia w funkcji `declare' czyni NAZWĘ lokalną, podobnie\n" +" jak polecenie `local'. Opcja `-g' zmienia to zachowanie.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca prawdę, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Ustawienie wartości i atrybutów zmiennej.\n" +" \n" +" Synonim `declare' - p. `help declare'." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2699,16 +3013,27 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Definiowanie zmiennych lokalnych.\n" +" \n" +" Utworzenie zmiennej lokalnej o podanej NAZWIE i nadanie jej WARTOŚCI.\n" +" OPCJA może być dowolną opcją przyjmowaną przez `declare'.\n" +" \n" +" Zmienne lokalne mogą być używane tylko w funkcji; są widoczne wyłącznie\n" +" w funkcji, w której zostały zdefiniowanej, oraz jej potomkach.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję, wystąpi błąd przy\n" +" przypisaniu zmiennej lub powłoka nie wykonuje żadnej funkcji." -#: builtins.c:537 -#, fuzzy +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2720,6 +3045,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2727,33 +3053,54 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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 +"Wypisanie argumentów na standardowym wyjściu.\n" +" \n" +" Wypisanie na standardowym wyjściu argumentów ARG oddzielonych pojedynczymi\n" +" spacjami oraz znaku końca linii.\n" +" \n" +" Opcje:\n" +" -n\tniedołączanie znaku końca linii\n" +" -e\twłączenie interpretowania poniższych znaków poprzedzonych\n" +" \todwrotnym ukośnikiem\n" +" -E\twyłączenie interpretowania poniższych znaków poprzedzonych\n" +" \todwrotnym ukośnikiem\n" +" \n" +" `echo' interpretuje następujące znaki poprzedzone odwrotnym ukośnikiem:\n" +" \\a\talarm (dzwonek)\n" +" \\b\tcofnięcie\n" +" \\c\tpominięcie dalszego wyjścia (w tym znaku nowego wiersza)\n" +" \\e\tznak ESCAPE\n" +" \\E\tznak ESCAPE\n" +" \\f\twysuw strony\n" +" \\n\tnowy wiersz\n" +" \\r\tpowrót karetki\n" +" \\t\ttabulacja pozioma\n" +" \\v\ttabulacja pionowa\n" +" \\\\\todwrotny ukośnik\n" +" \\0nnn\tznak o kodzie ASCII NNN (ósemkowo). NNN może stanowić od\n" +" \t\t0 do 3 cyfr ósemkowych\n" +" \\xHH\tznak ośmiobitowy o wartości HH (szesnastkowo). HH może być\n" +" \t\tjedną lub dwiema cyframi szesnastkowymi\n" +" \\uHHHH\tznak Unicode o wartości HHHH (szesnastkowo). HHHH może mieć\n" +" \t\tod jednej do czterech cyfr szesnastkowych.\n" +" \\UHHHHHHHH znak Unicode o wartości HHHHHHHH (szesnastkowo). HHHHHHHH\n" +" \t\tmoże mieć od jednej do ośmiu cyfr szesnastkowych.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że wystąpi błąd zapisu." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2765,8 +3112,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Wypisanie argumentów na standardowym wyjściu.\n" +" \n" +" Wypisanie na standardowym wyjściu argumentów ARG i znaku końca linii.\n" +" \n" +" Opcje:\n" +" -n\tniedołączanie znaku końca linii\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że wystąpi błąd zapisu." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2792,20 +3148,51 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Włączanie i wyłączanie poleceń wbudowanych powłoki.\n" +" \n" +" Włączanie i wyłączanie poleceń wbudowanych powłoki. Wyłączenie pozwala\n" +" na wykonanie polecenia z dysku, mającego tę samą nazwę, co polecenie\n" +" wbudowane bez używania pełnej ścieżki.\n" +" \n" +" Opcje:\n" +" -a\twypisanie listy poleceń wbudowanych z informacją, które są włączone\n" +" -n\twyłączenie każdej NAZWY lub wypisanie listy wyłączonych poleceń\n" +" -p\twypisanie listy poleceń w formacie do ponownego użycia\n" +" -s\twypisanie tylko nazw posiksowych \"specjalnych\" poleceń wbudowanych\n" +" \n" +" Opcje sterujące dynamicznym ładowaniem:\n" +" -f\tWczytanie polecenia wbudowanego NAZWA z obiektu współdzielonego PLIK\n" +" -d\tUsunięcie polecenia wczytanego przez -f\n" +" \n" +" Bez opcji włączana jest każda NAZWA.\n" +" \n" +" Aby użyć polecenia `test' z $PATH zamiast wersji wbudowanej, należy\n" +" wykonać `enable -n test'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że NAZWA nie jest poleceniem wbudowanym lub\n" +" wystąpi błąd." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"Wykonanie argumentów jako polecenia powłoki.\n" +" \n" +" Połączenie argumentów ARG w pojedynczy łańcuch, użycie rezultatu jako\n" +" wejścia dla powłoki i wykonanie wynikowych poleceń.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan wyjściowy polecenia lub prawdę, jeśli polecenie jest\n" +" puste." -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2838,71 +3225,123 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +"Analiza opcji z argumentów.\n" +" \n" +" Polecenie getopts jest używane przez procedury powłoki przy analizowaniu\n" +" parametrów pozycyjnych jako opcji.\n" +" \n" +" ŁAŃCUCH-OPCJI zawiera litery opcji, które mają być rozpoznane; jeśli po\n" +" literze następuje dwukropek, opcja wymaga argumentu, który powinien być\n" +" oddzielony od opcji spacją.\n" +" \n" +" Przy każdym wywołaniu getopts umieszcza następną opcję w zmiennej powłoki\n" +" $nazwa, inicjując ją, jeśli nie istnieje; natomiast indeks następnego\n" +" argumentu do przetworzenia jest umieszczany w zmiennej powłoki OPTIND\n" +" OPTIND jest inicjowany wartością 1 przy każdym wywołaniu powłoki lub\n" +" skryptu powłoki. Jeśli opcja wymaga argumentu, getopts umieszcza ten\n" +" argument w zmiennej powłoki OPTARG.\n" +" \n" +" getopts zgłasza błędy na jeden z dwóch sposobów. Jeśli pierwszy znak\n" +" ŁAŃCUCHA-OPCJI jest dwukropkiem, getopts wykorzystuje ciche zgłaszanie\n" +" błędów. W tym trybie komunikaty błędów nie są wypisywane. Jeśli napotkana\n" +" zostanie błędna opcja, getopts umieszcza znak opcji w OPTARG. Jeśli\n" +" nie znaleziono wymaganego argumentu, getopts umieszcza znak ':' w NAZWIE\n" +" i ustawia OPTARG na napotkany znak opcji. Jeśli getopts nie jest w trybie\n" +" cichym i napotkana zostanie błędna opcja, getopts umieszcza znak '?'\n" +" w NAZWIE i anuluje OPTARG. Jeśli nie znaleziono wymaganego argumentu,\n" +" w NAZWIE umieszczany jest znak '?', OPTARG jest anulowany i wypisywany\n" +" jest komunikat diagnostyczny.\n" +" \n" +" Jeśli zmienna powłoki OPTERR ma wartość 0, getopts wyłącza wypisywanie\n" +" komunikatów błędów, nawet jeśli pierwszym znakiem ŁAŃCUCHA-OPCJI nie jest\n" +" dwukropek. OPTERR domyślnie ma wartość 1.\n" +" \n" +" Polecenie getopts normalnie przetwarza parametry pozycyjne, ale jeśli\n" +" podano argumenty jako wartości ARG, są one przetwarzane zamiast nich.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, jeśli napotkano opcję; fałsz, jeśli wystąpi koniec\n" +" opcji lub błąd." + +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"Zastąpienie powłoki podanym poleceniem.\n" +" \n" +" Wywoływane jest POLECENIE, zastępując tę powłokę podanym programem.\n" +" ARGUMENTY stają się argumentami POLECENIA. Jeśli nie podano POLECENIA,\n" +" wszystkie podane przekierowania odnoszą skutek dla bieżącej powłoki.\n" +" \n" +" Opcje:\n" +" -a nazwa\tprzekazanie NAZWY jako zerowego argumentu POLECENIA\n" +" -c\twywołanie POLECENIA z pustym środowiskiem\n" +" -l\tumieszczenie kreski w zerowym argumencie POLECENIA\n" +" \n" +" Jeśli polecenia nie można wywołać, powłoka nieinteraktywna kończy się,\n" +" chyba że ustawiona jest opcja powłoki `execfail'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że nie uda się znaleźć POLECENIA lub wystąpi\n" +" błąd przekierowania." -#: builtins.c:689 -#, fuzzy +#: builtins.c:715 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." +"Opuszczenie powłoki.\n" +" \n" +" 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"Opuszczenie powłoki logowania.\n" +" \n" +" Opuszczenie powłoki logowania z kodem zakończenia N. Zwraca błąd, jeśli\n" +" powłoka nie jest powłoką logowania." -#: builtins.c:708 -#, fuzzy +#: builtins.c:734 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" +" 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" +" -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" @@ -2916,33 +3355,35 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" 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 +"Wyświetlanie lub wykonywanie poleceń z listy historii.\n" +" \n" +" fc służy do wypisywania, edycji i ponownego uruchamiania poleceń z listy\n" +" historii. PIERWSZY i OSTATNI jako liczby określają zakres lub PIERWSZY\n" +" jako napis oznacza najpóźniej wykonywane polecenie zaczynające się od tego\n" +" napisu.\n" +" \n" +" Opcje:\n" +" -e NAZWA-ED\tokreśla edytor, który ma być używany. Domyślnymi\n" +" \twartościami są: najpierw FCEDIT, potem EDITOR, a na końcu vi\n" +" -l\twypisywanie wierszy zamiast ich edycji\n" +" -n\tniewypisywanie numerów wierszy\n" +" -r\todwrócenie kolejności wierszy (czyniąc najnowsze wypisane\n" +" \tpolecenie pierwszym)\n" +" \n" +" Przy wywołaniu polecenia w postaci `fc -s [wz=zam ...] [polecenie]',\n" +" jest ono wywoływane ponownie po wykonaniu podstawienia WZ=ZAM.\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.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda lub stan wykonanego polecenia; wartość niezerowa\n" +" w przypadku błędu." + +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2953,53 +3394,81 @@ msgid "" " 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" +"Przeniesienie zadania na pierwszy plan.\n" +" \n" +" Umieszczenie ZADANIA na pierwszym planie oraz uczynienie go bieżącym\n" +" zadaniem. Jeśli nie określono ZADANIA, użyte zostanie zadanie bieżące\n" +" w rozumieniu powłoki.\n" +" \n" +" Stan wyjściowy:\n" +" Stan zadania umieszczonego na pierwszym planie lub fałsz, jeśli wystąpi\n" +" błąd." -#: builtins.c:753 -#, fuzzy +#: builtins.c:779 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" +" 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" +"Przeniesienie zadań w tło.\n" +" \n" +" Umieszczenie wszystkich ZADAŃ w tle tak, jakby zostały uruchomione\n" +" z `&'. Jeśli nie określono ZADAŃ, użyte zostanie zadanie bieżące\n" +" w rozumieniu powłoki.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że sterowanie zadaniami nie jest włączone\n" +" lub wystąpi błąd." -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"Zapamiętanie lub wypisanie położenia programów.\n" +" \n" +" Określenie i zapamiętanie pełnej ścieżki każdego polecenia NAZWA. Jeśli\n" +" nie podano argumentów, wyświetlane są informacje o zapamiętanych\n" +" poleceniach.\n" +" \n" +" Opcje:\n" +" -d\tzapomnienie położenia każdej NAZWY\n" +" -l\twypisanie w formacie do wykorzystania jako wejście\n" +" -p ścieżka\tużycie ŚCIEŻKI jako pełnej ścieżki NAZWY\n" +" -r\tzapomnienie wszystkich pamiętanych położeń\n" +" -t\twypisanie pamiętanych położeń każdej NAZWY poprzedzając\n" +" \t\tkażde położenie odpowiednią NAZWĄ, jeśli podano wiele NAZW\n" +" Argumenty:\n" +" NAZWA\tKażda nazwa jest wyszukiwana w $PATH i dodawana do listy\n" +" \t\tpamiętanych poleceń.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że nie znaleziono NAZWY lub podano błędną\n" +" opcję." -#: builtins.c:792 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3011,17 +3480,34 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" +"Wyświetlenie informacji o poleceniach wbudowanych.\n" +" \n" +" Wyświetlenie krótkiego przeglądu poleceń wbudowanych. Jeśli podano\n" +" WZORZEC, wypisywany jest szczegółowy opis wszystkich poleceń pasujących do\n" +" WZORCA, w przeciwnym wypadku - lista tematów.\n" +" \n" +" Opcje:\n" +" -d\twypisanie krótkiego opisu każdego tematu\n" +" -m\twyświetlenie sposobu użycia w formacie zbliżonym do stron man\n" +" -s\twypisanie tylko krótkiej informacji o składni dla każdego\n" +" \t\ttematu pasującego do WZORCA\n" +" \n" +" Argumenty:\n" +" WZORZEC\tWzorzec określający temat pomocy\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że WZORCA nie znaleziono lub podano błędną\n" +" opcję." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3030,33 +3516,65 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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 "" +"Wyświetlanie i modyfikowanie listy historii.\n" +" \n" +" Wyświetlanie listy historii z numerami linii z oznaczeniem każdej\n" +" zmodyfikowanej linii przedrostkiem `*'. Podanie argumentu N wypisuje\n" +" tylko ostatnich N wpisów.\n" +" \n" +" Opcje:\n" +" -c\twyczyszczenie listy historii poprzez usunięcie wszystkich wpisów\n" +" -d offset\tusunięcie wpisu historii o podanym OFFSECIE. Ujemne offsety\n" +" \t\tliczą się wstecz od końca listy historii\n" +" \n" +" -a\tdołączenie linii historii z tej sesji do pliku historii\n" +" -n\todczyt wszystkich jeszcze nie przeczytanych linii z pliku\n" +" \t\thistorii i dołączenie ich do listy historii\n" +" -r\todczyt pliku historii i dołączenie zawartości do listy historii\n" +" -w\tzapis bieżącej historii do pliku historii\n" +" \n" +" -p\trozwinięcie wg historii każdego ARG i wypisanie wyniku bez\n" +" \t\tzapisywania go na liście historii\n" +" -s\tdołączenie wszystkich ARG do listy historii jako pojedynczych\n" +" \t\twpisów\n" +" \n" +" Jeśli podano PLIK, jest używany jako plik historii. W przeciwnym wypadku\n" +" używany jest $HISTFILE, a jeśli ta zmienna nie jest ustawiona -\n" +" ~/.bash_history.\n" +" \n" +" Jeśli zmienna $HISTTIMEFORMAT jest ustawiona i niepusta, jej wartość jest\n" +" używana jako łańcuch formatujący dla strftime(3) do wypisywania momentu\n" +" czasu powiązanego z każdym wypisywanym wpisem. W przeciwnym wypadku czas\n" +" nie jest wypisywany.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." -#: builtins.c:852 -#, fuzzy +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3065,8 +3583,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3079,20 +3597,28 @@ msgid "" " 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." +"Wyświetlenie stanu zadań.\n" +" \n" +" Wypisanie aktywnych zadań. ZADANIE ogranicza wyjście tylko do tego zadania.\n" +" Bez opcji wypisywany jest stan wszystkich aktywnych zadań.\n" +" \n" +" Opcje:\n" +" -l\twypisanie dodatkowo numerów PID procesów\n" +" -n\twypisanie tylko procesów, które zmieniły stan od ostatniego\n" +" \t\tpowiadomienia\n" +" -p\twypisanie tylko numerów PID procesów\n" +" -r\tograniczenie wyjścia do zadań działających\n" +" -s\tograniczenie wyjścia do zadań zatrzymanych\n" +" \n" +" Przy podaniu -x, uruchamiane jest podane POLECENIE po zastąpieniu\n" +" każdej z występujących w argumentach ARG specyfikacji zadań numerem PID\n" +" procesu wiodącego danego zadania.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd.\n" +" Jeśli użyto -x, zwracany jest stan wyjściowy POLECENIA." -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3102,15 +3628,27 @@ msgid "" " 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" +" \t\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 "" +"Usunięcie poleceń z bieżącej powłoki.\n" +" \n" +" Usunięcie każdego podanego ZADANIA z tablicy aktywnych zadań. Bez\n" +" podania ZADANIA powłoka używa pojęcia bieżącego zadania.\n" +" \n" +" Opcje:\n" +" -a\tusunięcie wszystkich zadań, jeśli nie podano ZADANIA\n" +" -h\toznaczenie każdego zadania tak, że SIGHUP nie jest wysyłany do\n" +" \t\tzadania, jeśli powłoka otrzyma SIGHUP\n" +" -r\tusunięcie tylko działających zadań\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub ZADANIE." -#: builtins.c:898 -#, fuzzy +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3122,7 +3660,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3131,25 +3670,35 @@ msgid "" " 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 +"Wysłanie sygnału do zadania.\n" +" \n" +" Wysłanie do procesów określonych przez PID lub ZADANIE sygnału o nazwie\n" +" SYGNAŁ lub NUMERZE-SYGNAŁU. Jeśli nie podano SYGNAŁU ani NUMERU-SYGNAŁU,\n" +" przyjmowany jest SIGTERM.\n" +" \n" +" Opcje:\n" +" -s SYG\tSYG jest nazwą sygnału\n" +" -n SYG\tSYG jest numerem sygnału\n" +" -l\tlista nazw sygnałów; jeśli `-l' występuje z argumentami, są one\n" +" \t\ttraktowane jako numery sygnałów, dla których mają być wypisane nazwy\n" +" -L\tsynonim -l\n" +" \n" +" Kill jest poleceniem wewnętrznym z dwóch powodów: umożliwia korzystanie\n" +" z identyfikatorów zadań zamiast numerów PID oraz, w przypadku osiągnięcia\n" +" ograniczenia na liczbę procesów, nie powoduje potrzeby uruchamiania\n" +" dodatkowego procesu, aby jakiś zabić.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest sukces, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:949 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" +" 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" @@ -3183,26 +3732,27 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" 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" +"Obliczanie wyrażeń arytmetycznych.\n" +" \n" +" Obliczenie każdego argumentu ARG jako wyrażenia arytmetycznego. 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. Poniższa lista operatorów jest pogrupowana na poziomy\n" +" operatorów o jednakowym priorytecie. Poziomy są wypisane w kolejności\n" +" 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\tpotęgowanie\n" +" \t*, /, %\t\tmnożenie, dzielenie, 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\tprzesunięcie bitowe w lewo i w prawo\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" @@ -3214,92 +3764,109 @@ msgstr "" " \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" +" 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" +" 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." +" Stan wyjściowy:\n" +" Jeśli wartością ostatniego argumentu jest 0, let zwraca 1;\n" +" w pozostałych przypadkach zwracane jest 0." -#: builtins.c:966 -#, fuzzy +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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 +"Odczyt wiersza ze standardowego wejścia i podział go na pola.\n" +" \n" +" Odczytanie wiersza ze standardowego wejścia lub deskryptora FD (jeśli\n" +" podano opcję -u). Wiersz jest dzielony na pola wg reguł podziału na słowa,\n" +" pierwsze słowo jest przypisywane pierwszej NAZWIE, drugie - drugiej NAZWIE\n" +" itd.; wszystkie pozostałe słowa są przypisywane ostatniej NAZWIE. Jako\n" +" ograniczniki słów są rozpoznawane tylko znaki ze zmiennej $IFS. Domyślnie\n" +" znak odwrotnego ukośnika chroni znaki ograniczników i nowej linii.\n" +" \n" +" Jeśli nie podano NAZW, odczytany wiersz jest zapisywany w zmiennej REPLY.\n" +" \n" +" Opcje:\n" +" -a tablica\tprzypisanie odczytanych słów do indeksów sekwencyjnych\n" +" \t\tzmiennej tablicowej TABLICA, począwszy od zera\n" +" -d ogr\tkontynuacja do odczytu pierwszego znaku OGR zamiast znaku nowej\n" +" \t\tlinii\n" +" -e\tużycie Readline'a do odczytania wiersza\n" +" -o tekst\tużycie TEKSTU jako początkowego tekstu dla Readline'a\n" +" -n liczba\tpowrót po odczycie LICZBY znaków zamiast oczekiwania na\n" +" \t\tznak nowej linii; ogranicznik jest honorowany, jeśli odczytano mniej\n" +" \t\tniż podana LICZBA znaków przed ogranicznikiem\n" +" -N liczba\tpowrót tylko po odczycie dokładnie podanej LICZBY znaków,\n" +" \t\tchyba że zostanie napotkany EOF lub opłynie czas; ograniczniki są\n" +" \t\tignorowane\n" +" -p zachęta\twypisanie łańcucha ZACHĘTY bez końcowego znaku nowej linii\n" +" \t\tprzed próbą odczytu\n" +" -r\twyłączenie interpretowania odwrotnych ukośników jako przedrostka\n" +" \t\tznaków specjalnych\n" +" -s\tbez wypisywania wejścia pochodzącego z terminala\n" +" -t czas\tzakończenie i zwrócenie niepowodzenia, jeśli nie zostanie\n" +" \t\todczytany cały wiersz przed upłynięciem podanego CZASU (w sekundach).\n" +" \t\tWartość zmiennej TMOUT jest domyślnym limitem czasu. CZAS może być\n" +" \t\tułamkowy. Przy wartości 0 odczyt powiedzie się tylko wtedy, gdy\n" +" \t\twejście jest dostępne na podanym deskryptorze. Kod (stan) wyjściowy\n" +" \t\tw przypadku osiągnięcia limitu czasu jest większy niż 128\n" +" -u fd\todczyt z deskryptora pliku FD zamiast ze standardowego wejścia\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest wartość 0, chyba że zostanie napotkany koniec pliku,\n" +" osiągnięty limit czasu (w tym przypadku jest większy niż 128), wystąpi\n" +" błąd przypisania zmiennej albo podano nieprawidłowy deskryptor dla\n" +" argumentu -u." + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3310,9 +3877,17 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Powrót z funkcji powłoki.\n" +" \n" +" Polecenie powoduje, że funkcja lub włączony skrypt kończy się zwracając\n" +" wartość podaną jako N. Jeśli pominięto N, stanem wyjściowym będzie stan\n" +" ostatniego polecenia wykonanego w funkcji lub skrypcie.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracane jest N lub niepowodzenie, jeśli powłoka nie wykonuje żadnej\n" +" funkcji ani skryptu." -#: builtins.c:1022 -#, fuzzy +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3355,8 +3930,7 @@ msgid "" " 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" +" 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" @@ -3378,9 +3952,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3393,93 +3970,95 @@ msgid "" " 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 +"Ustawianie lub anulowanie opcji powłoki i parametrów pozycyjnych.\n" +" \n" +" Zmiana wartości atrybutów powłoki i parametrów pozycyjnych lub\n" +" wyświetlenie nazw i wartości zmiennych powłoki.\n" +" \n" +" Opcje:\n" +" -a Oznaczenie zmiennych, które zostały zmodyfikowane lub utworzone\n" +" jako eksportowane.\n" +" -b Natychmiastowe powiadomienie o zakończeniu zadania.\n" +" -e Natychmiastowe zakończenie, gdy polecenie zakończy się z\n" +" niezerowym stanem (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\n" +" o postaci przypisania, nie tylko tych, które poprzedzają nazwę\n" +" polecenia.\n" +" -m Włączenie kontroli zadań.\n" +" -n Czytanie poleceń bez wykonywania 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 niekończenie powłoki po odczytaniu EOF\n" +" interactive-comments\n" +" zezwolenie na wystąpienie komentarzy\n" +" w poleceniach interaktywnych\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" +" POSIX 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 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, niepozwalanie 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 interaktywnej.\n" +" -P Gdy ustawione, nierozwiązywanie dowiązań symbolicznych podczas\n" +" uruchamiania poleceń takich, jak cd, które zmieniają katalog\n" +" bieżący.\n" +" -T Gdy ustawione, dziedziczenie pułapek DEBUG i RETURN przez funkcje.\n" +" -- Przypisanie pozostałych argumentów do parametrów pozycyjnych.\n" +" Jeśli nie ma więcej argumentów, parametry pozycyjne są anulowane.\n" +" - Przypisanie pozostałych 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 nich\n" +" także korzystać przy uruchomieniu powłoki. Aktualny zestaw opcji można\n" +" znaleźć w $-. Pozostałe n argumentów staje się parametrami pozycyjnymi\n" +" i są one przypisane, kolejno, do $1, $2, .. $n. Gdy nie zostaną podane\n" +" żadne argumenty, wypisywane są wszystkie zmienne powłoki.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano nieprawidłową opcję." + +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3488,9 +4067,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3498,14 +4078,31 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Anulowanie wartości i atrybutów zmiennych i funkcji powłoki.\n" +" \n" +" Usunięcie zmiennych i funkcji o podanych NAZWACH.\n" +" \n" +" Opcje:\n" +" -f\tpotraktowanie wszystkich NAZW jako funkcji powłoki\n" +" -v\tpotraktowanie wszystkich NAZW jako zmiennych powłoki\n" +" -n\tpotraktowanie wszystkich NAZW jako referencji do nazw\n" +" \t\ti anulowanie samej zmiennej zamiast tej, do której się odnosi\n" +" \n" +" Bez opcji unset próbuje najpierw anulować definicję zmiennej, a jeśli to\n" +" się nie powiedzie, próbuje anulować definicję funkcji.\n" +" \n" +" Niektórych zmiennych nie można usunąć - p. `readonly'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub NAZWA jest tylko do\n" +" odczytu." -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3517,8 +4114,23 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Ustawienie atrybutu eksportowania dla zmiennych powłoki.\n" +" \n" +" Zaznaczenie każdej NAZWY do automatycznego eksportowania do środowiska\n" +" później wywoływanych poleceń. Jeśli podano WARTOŚĆ, jest ona przypisywana\n" +" przed eksportowaniem.\n" +" \n" +" Opcje:\n" +" -f\tdziałanie na funkcjach powłoki\n" +" -n\tusunięcie atrybutu eksportowania z każdej NAZWY\n" +" -p\twyświetlenie listy wszystkich eksportowanych zmiennych i funkcji\n" +" \n" +" Argument `--' kończy dalsze przetwarzanie opcji.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano nieprawidłową opcję lub NAZWĘ." -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3530,15 +4142,33 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Oznaczenie zmiennych powłoki jako niezmiennych.\n" +" \n" +" Oznaczenie każdej NAZWY jako tylko do odczytu; wartości tych NAZW nie mogą\n" +" być zmieniane przez późniejsze podstawienia. Jeśli podano WARTOŚĆ, jest\n" +" ona przypisywana przed oznaczeniem jako tylko do odczytu.\n" +" \n" +" Opcje:\n" +" -a\tdziałanie na zmiennych tablicowych indeksowanych\n" +" -A\tdziałanie na zmiennych tablicowych asocjacyjnych\n" +" -f\tdziałanie na funkcjach powłoki\n" +" -p\twyświetlenie listy wszystkich zmiennych lub funkcji tylko do odczytu,\n" +" \t\tw zależności od tego, czy podano opcję -f\n" +" \n" +" Argument `--' wyłącza dalsze przetwarzanie opcji.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano nieprawidłową opcję lub NAZWĘ." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3548,9 +4178,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Przesunięcie argumentów pozycyjnych.\n" +" \n" +" Zmiana nazw argumentów pozycyjnych $N+1,$N+2 ... na $1,$2 ...\n" +" Jeśli nie podano N, przyjmuje się 1.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że N jest ujemne lub większe niż $#." -#: builtins.c:1176 builtins.c:1191 -#, fuzzy +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3563,12 +4199,18 @@ msgid "" " 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." +"Wykonanie poleceń z pliku w bieżącej powłoce.\n" +" \n" +" Odczytanie i uruchomienie poleceń z PLIKU w bieżącej powłoce. Do\n" +" znalezienia katalogu zawierającego PLIK używane są ścieżki zawarte\n" +" w $PATH. Jeśli podane zostaną jakiekolwiek ARGUMENTY, stają się\n" +" parametrami pozycyjnymi podczas uruchomienia PLIKU.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan ostatnio wykonanego polecenia z PLIKU lub błąd, jeśli\n" +" PLIKU nie udało się odczytać." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3581,16 +4223,30 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Wstrzymanie wykonywania powłoki.\n" +" \n" +" Wstrzymanie wykonywania danego skryptu do czasu otrzymania sygnału\n" +" SIGCONT. Jeśli nie podano opcji wymuszenia, powłoki logowania nie można\n" +" wstrzymać.\n" +" \n" +" Opcje:\n" +" -f\twymuszenie wstrzymania, nawet jeśli powłoka jest powłoką logowania\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że kontrola zadań jest wyłączona lub wystąpi\n" +" błąd." -#: builtins.c:1223 -#, fuzzy +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3614,8 +4270,7 @@ msgid "" " -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 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" @@ -3636,14 +4291,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3659,114 +4316,126 @@ msgid "" " 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" +"Obliczenie wyrażenia warunkowego.\n" +" \n" +" Polecenie zwracające kod 0 (prawda) lub 1 (fałsz) w zależności od wyniku\n" +" obliczenia WYRAŻENIA. Wyrażenia mogą mieć postać jedno- lub dwuargumentową.\n" +" Jednoargumentowe wyrażenia służą zwykle do badania stanu pliku. Istnieją\n" +" również operatory działające na łańcuchach tekstowych, jak też operatory\n" +" numerycznego porównania.\n" +" \n" +" Zachowanie polecenia test zależy od liczby argumentów. Pełną specyfikację\n" +" można znaleźć w podręczniku man do basha.\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" +" -a PLIK Prawda, gdy PLIK istnieje.\n" +" -b PLIK Prawda, gdy PLIK jest plikiem specjalnym urządzenia\n" +" blokowego.\n" +" -c PLIK Prawda, gdy PLIK jest plikiem specjalnym urządzenia\n" +" znakowego.\n" +" -d PLIK Prawda, gdy PLIK jest katalogiem.\n" +" -e PLIK Prawda, gdy PLIK istnieje.\n" +" -f PLIK Prawda, gdy PLIK istnieje i jest zwykłym plikiem.\n" +" -g PLIK Prawda, gdy PLIK ma ustawiony bit SGID.\n" +" -h PLIK Prawda, gdy PLIK jest dowiązaniem symbolicznym.\n" +" -L PLIK Prawda, gdy PLIK jest dowiązaniem symbolicznym.\n" +" -k PLIK Prawda, gdy PLIK ma ustawiony bit `sticky'.\n" +" -p PLIK Prawda, gdy PLIK jest nazwanym potokiem.\n" +" -r PLIK Prawda, gdy PLIK jest odczytywalny przez użytkownika.\n" +" -s PLIK Prawda, gdy PLIK istnieje i jest niepusty.\n" +" -S PLIK Prawda, gdy PLIK jest gniazdem.\n" +" -t FD Prawda, gdy deskryptor FD jest otwarty na terminalu.\n" +" -u FILE Prawda, gdy PLIK ma ustawiony bit SUID.\n" +" -w FILE Prawda, gdy PLIK jest zapisywalny przez użytkownika.\n" +" -x FILE Prawda, gdy PLIK jest uruchamialny przez użytkownika.\n" +" -O FILE Prawda, gdy użytkownik jest efektywnym właścicielem PLIKU.\n" +" -G FILE Prawda, grupa użytkownika jest efektywnym właścicielem\n" +" PLIKU.\n" +" -N FILE Prawda, gdy PLIK został zmodyfikowany po ostatnim\n" +" odczycie.\n" +" \n" +" PLIK1 -nt PLIK2 Prawda, gdy PLIK1 jest nowszy niż PLIK2 (porównując\n" " czas ostatniej modyfikacji).\n" " \n" -" FILE1 -ot FILE2 Prawda, gdy FILE1 jest starszy ni� FILE2.\n" +" PLIK1 -ot PLIK2 Prawda, gdy PLIK1 jest starszy niż PLIK2.\n" " \n" -" FILE1 -ef FILE2 Prawda, gdy FILE1 jest twardym dowi�zaniem do FILE2.\n" +" PLIK1 -ef PLIK2 Prawda, gdy PLIK1 jest twardym dowiązaniem do PLIK2.\n" " \n" -" Operatory �a�cuchowe:\n" +" Operatory łańcuchowe:\n" " \n" -" -z STRING Prawda, gdy STRING jest pusty.\n" +" -z ŁAŃCUCH Prawda, gdy ŁAŃCUCH jest pusty.\n" " \n" -" -n STRING\n" -" STRING Prawda, gdy STRING nie jest pusty.\n" +" -n ŁAŃCUCH\n" +" ŁAŃCUCH Prawda, gdy ŁAŃCUCH 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" +" ŁAŃCUCH1 = ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 i ŁAŃCUCH2 są równe.\n" +" ŁAŃCUCH1 != ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 i ŁAŃCUCH2 nie są równe.\n" +" ŁAŃCUCH1 < ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 znajduje się w porządku\n" +" leksykograficznym przed ŁAŃCUCHEM2.\n" +" ŁAŃCUCH1 > ŁAŃCUCH2\n" +" Prawda, gdy ŁAŃCUCH1 znajduje się w porządku\n" +" leksykograficznym po ŁAŃCUCHU2.\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" +" -o OPCJA Prawda, gdy podana OPCJA powłoki jest włączona.\n" +" -v ZMIENNA Prawda, gdy ZMIENNA powłoki jest ustawiona\n" +" -R ZMIENNA Prawda, gdy zmienna powłoki jest ustawiona i jest\n" +" referencją do nazwy\n" +" ! WYRAŻENIE Prawda, gdy WYRAŻENIE jest fałszywe.\n" +" WYR1 -a WYR2 Prawda, gdy zarówno WYR1, jak i WYR2 są prawdziwe.\n" +" WYR1 -o WYR2 Prawda, gdy WYR1 lub WYR2 jest prawdziwe.\n" " \n" -" arg1 OP arg2 Testy arytmetyczne. OP jest jednym z -eq, -ne, -lt,\n" -" -le, -gt lub -ge.\n" +" arg1 OP arg2 Testy arytmetyczne. OP jest jednym z operatorów:\n" +" -eq, -ne, -lt, -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." +" 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.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, jeśli wartością WYRAŻENIA jest prawda; fałsz, gdy\n" +" wartością WYRAŻENIA jest fałsz lub podano błędny argument." -#: builtins.c:1299 -#, fuzzy +#: builtins.c:1344 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 `['." +"Obliczenie wyrażenia warunkowego.\n" +" \n" +" Jest to synonim dla wbudowanego polecenia \"test\", ale wymagający, by\n" +" ostatnim argumentem był `]' pasujący do początkowego `['." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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 "" +"Wyświetlenie czasów procesu.\n" +" \n" +" Wypisanie łącznych czasów w przestrzeni użytkownika i systemu dla powłoki\n" +" i wszystkich procesów potomnych.\n" +" \n" +" Stan wyjściowy:\n" +" Zawsze prawda." -#: builtins.c:1320 -#, fuzzy +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3775,48 +4444,63 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" 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. 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 +"Przechwytywanie sygnałów i innych zdarzeń.\n" +" \n" +" Polecenie definiujące i włączające daną akcję w przypadku, kiedy powłoka\n" +" otrzyma sygnał lub pod innymi warunkami.\n" +" \n" +" Gdy powłoka otrzyma podany SYGNAŁ (lub sygnały), odczytywane i uruchamiane\n" +" jest polecenie podane jako argument ARG. W razie braku argumentu (i podaniu\n" +" pojedynczego SYGNAŁU) lub gdy argumentem jest `-', każdemu z podanych\n" +" sygnałów jest przywracane pierwotne zachowanie. Jeśli ARG jest pustym\n" +" łańcuchem, każdy SYGNAŁ jest ignorowany przez powłokę i wywołane przez nią\n" +" polecenia.\n" +" \n" +" Jeżeli jako SYGNAŁ podano EXIT (0), polecenie ARG jest uruchamiane przy\n" +" opuszczaniu powłoki. Jeśli jako SYGNAŁ podano DEBUG, ARG jest uruchamiane\n" +" po każdym poleceniu prostym. Jeśli jako SYGNAŁ podano RETURN, ARG jest\n" +" uruchamiane przy każdym zakończeniu funkcji powłoki lub skryptu\n" +" uruchamianego przez polecenia wbudowane . lub source. Jeśli jako SYGNAŁ\n" +" podano ERR, ARG jest uruchamiane za każdym razem, kiedy niepowodzenie\n" +" polecenia spowodowałoby zakończenie powłoki w przypadku włączenia opcji -e.\n" +" \n" +" Jeśli nie podano argumentów, trap wypisuje listę poleceń przypisanych do\n" +" każdego sygnału.\n" +" \n" +" Opcje:\n" +" -l\twypisanie listy nazw sygnałów i ich numerów\n" +" -p\twypisanie poleceń trap powiązanych z każdym SYGNAŁEM\n" +" \n" +" Każdy podawany SYGNAŁ może być nazwą sygnału wg. lub numerem\n" +" sygnału. Nazwy sygnałów są niewrażliwe na wielkość liter, a prefiks SIG\n" +" jest opcjonalny. Sygnał do powłoki można wysłać poleceniem\n" +" \"kill -sygnał $$\".\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędny SYGNAŁ lub błędną opcję." + +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3825,34 +4509,57 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 +" Returns success if all of the NAMEs are found; fails if any are not found." +msgstr "" +"Wyświetlenie informacji o rodzaju polecenia.\n" +" \n" +" Określenie, w jaki sposób byłaby interpretowana każda NAZWA w przypadku\n" +" użycia jako polecenie.\n" +" \n" +" Opcje:\n" +" -a\twyświetlenie wszystkich położeń zawierających program wykonywalny\n" +" \t\to podanej NAZWIE; obejmuje aliasy, polecenia wbudowane i funkcje\n" +" \t\ttylko jeśli nie podano dodatkowo opcji `-p'\n" +" -f\tpominięcie wyszukiwania funkcji powłoki\n" +" -P\twymuszenie wyszukiwania w PATH każdej nazwy, nawet jeśli jest\n" +" \t\taliasem, poleceniem wbudowanym lub funkcją i zwrócenie nazwy pliku\n" +" \t\tna dysku\n" +" -p\tzwrócenie nazwy pliku na dysku lub niczego, jeśli `type -t NAZWA'\n" +" \t\tnie zwróciłoby `file'.\n" +" -t\tzwrócenie pojedynczego słowa: `alias', `keyword', `function',\n" +" \t\t`builtin', `file' lub `', jeśli nazwa jest odpowiednio: aliasem,\n" +" \t\tzarezerwowanym słowem kluczowym powłoki, funkcją powłoki, poleceniem\n" +" \t\twbudowanym powłoki, plikiem na dysku lub nie zostanie znaleziona\n" +" \n" +" Argumenty:\n" +" NAZWA\tNazwa polecenia do zinterpretowania.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, jeśli każda NAZWA zostanie znaleziona; fałsz, jeśli\n" +" którakolwiek nie zostanie znaleziona." + +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -3865,6 +4572,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3876,6 +4584,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3890,44 +4603,52 @@ msgid "" " 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 +"Modyfikowanie limitów zasobów powłoki.\n" +" \n" +" Ulimit zapewnia kontrolę ilości zasobów udostępnionych powłoce i procesom\n" +" w systemach, które taką kontrolę umożliwiają.\n" +" \n" +" Opcje:\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" +" -b\trozmiar bufora dla gniazd\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 potomków\n" +" -i\tmaksymalna liczba oczekujących sygnałów\n" +" -k\tmaksymalna liczba kolejek jądra (kqueue) przydzielonych dla procesu\n" +" -l\tmaksymalny rozmiar pamięci, którą proces może zablokować\n" +" -m\tmaksymalny rozmiar obszaru rezydentnego 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 rzeczywistego\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" +" -P\tmaksymalna liczba pseudoterminali\n" +" -R\tmaksymalny czas, jaki proces real-time może działać bez blokowania\n" +" -T\tmaksymalna liczba wątków\n" +" \n" +" Nie wszystkie opcje są dostępne na wszystkich platformach.\n" +" \n" +" Gdy podano wartość LIMITU, stanowi ona nową wartość ograniczenia dla\n" +" danego zasobu; specjalne wartości LIMITU: `soft', `hard' i `unlimited'\n" +" oznaczają, odpowiednio, aktualne ograniczenie miękkie, sztywne i brak\n" +" ograniczenia. W przeciwnym przypadku wypisywana jest aktualna wartość\n" +" podanego ograniczenia. Gdy nie podano opcji, przyjmuje się, że podano -f.\n" +" \n" +" Wartości są podawane w jednostkach 1024-bajtowych, za wyjątkiem -t, które\n" +" jest w sekundach, -p, które jest w jednostkach 512-bajtowych oraz -u, które\n" +" jest bezwymiarową liczbą procesów.\n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3944,46 +4665,97 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Wyświetlanie i ustawianie maski uprawnień plików.\n" +" \n" +" Ustawienie maski uprawnień tworzonych plików na UPRAWNIENIA. Jeśli\n" +" pominięto UPRAWNIENIA, wypisywana jest aktualna wartość maski.\n" +" \n" +" Jeśli UPRAWNIENIA zaczynają się od cyfry, są interpretowane jako liczba\n" +" ósemkowa; w przeciwnym wypadku jako łańcuch symbolicznych uprawnień,\n" +" jak w poleceniu chmod(1).\n" +" \n" +" Opcje:\n" +" -p\tjeśli pominięto UPRAWNIENIA, wypisywanie w formie nadającej się\n" +" \tdo ponownego użycia jako wejście\n" +" -S\twyjście w postaci symbolicznej; bez tej opcji jest ósemkowe\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędne uprawnienia lub błędną opcję." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Oczekiwanie na zakończenie zadania i zwrócenie stanu (kodu) wyjścia.\n" +" \n" +" Oczekiwanie na każdy proces o podanym identyfikatorze ID, który może być\n" +" numerem PID lub określeniem zadania i zgłoszenie jego stanu (kodu)\n" +" zakończenia. Jeśli nie podano ID, polecenie oczekuje na wszystkie aktualnie\n" +" aktywne procesy potomne i zwraca prawdę. Jeśli ID jest określeniem zadania,\n" +" oczekuje na wszystkie procesy w potoku przetwarzania danego zadania.\n" +" \n" +" Jeśli podano opcję -n, oczekiwanie na zakończenie następnego zadania\n" +" i zwrócenie jego kodu zakończenia.\n" +" \n" +" Jeśli podano opcję -p, identyfikator procesu lub zadania, dla którego\n" +" zwracany jest stan wyjścia, przypisywany jest do ZMIENNEJ, której nazwa\n" +" jest podana jako argument opcji. Zmienna początkowo jest kasowana. Jest\n" +" to przydatne tylko w przypadku podania opcji -n.\n" +" \n" +" Jeśli podano opcję -f, a kontrola zadań jest włączona, oczekiwanie na\n" +" zakończenie podanego ID zamiast czekania na zmianę jego stanu.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan zakończenia ID; niepowodzenie, jeśli ID jest\n" +" nieprawidłowe lub podano błędną opcję." -#: builtins.c:1466 -#, fuzzy +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is 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 +"Oczekiwanie na zakończenie procesu i zwrócenie stanu (kodu) wyjścia.\n" +" \n" +" Oczekiwanie na każdy z procesów podany przez PID i zgłoszenie jego statusu\n" +" zakończenia. Gdy nie zostanie podany PID, oczekiwanie dotyczy wszystkich\n" +" aktualnie aktywnych procesów potomnych, a kodem powrotu jest zero. PID musi\n" +" być identyfikatorem procesu.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status ID lub niepowodzenie, jeśli ID jest błędny lub podano\n" +" nieprawidłową opcję." + +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3995,14 +4767,16 @@ msgid "" " 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 +"Wykonanie poleceń dla każdego elementu z listy.\n" +" \n" +" Pętla `for' uruchamia ciąg poleceń dla każdego elementu podanej listy. Gdy\n" +" nie zostanie podane `in SŁOWA ...;', zakłada się, że podano `in \"$@\"'.\n" +" Dla każdego elementu SŁÓW, NAZWA jest ustawiana na ten element\n" +" i uruchamiane są POLECENIA. \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4018,17 +4792,20 @@ msgid "" " 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" +"Arytmetyczna pętla for.\n" +" \n" +" Równoważne\n" +" \t(( WYR1 ))\n" +" \twhile (( WYR2 )); do\n" +" \t\tPOLECENIA\n" +" \t\t(( WYR3 ))\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." +" WYR1, WYR2 i WYR3 są wyrażeniami arytmetycznymi. Jeśli któreś z wyrażeń\n" +" zostanie pominięte, zachowanie jest takie, jakby miało ono wartość 1. \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." -#: builtins.c:1513 -#, fuzzy +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4047,21 +4824,22 @@ msgid "" " 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 +"Wybór słów z listy i wykonanie poleceń.\n" +" SŁOWA są rozwijane, co tworzy listę słów. Zbiór rozwiniętych słów\n" +" wypisywany jest na standardowym wyjściu diagnostycznym, a każde słowo jest\n" +" poprzedzone przez liczbę. Gdy nie zostanie podane `in SŁOWA', 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 NAZWA jest\n" +" ustawiana na to słowo. Gdy wiersz jest pusty, SŁOWA i tekst zachęty są\n" +" wyświetlane ponownie. Gdy odczytany zostanie EOF, polecenie się kończy.\n" +" Każda inna wartość powoduje przypisanie NAZWIE wartości pustej. Odczytany\n" +" wiersz jest zachowywany w zmiennej REPLY. Po każdym wyborze uruchamiane\n" +" są POLECENIA aż do polecenia break. \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4076,19 +4854,21 @@ msgid "" " 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 +"Zgłoszenie czasu zajętego przez wykonanie potoku poleceń.\n" +" \n" +" Uruchomienie POTOKU poleceń i wypisanie podsumowania zawierającego czas\n" +" rzeczywisty, czas procesora w trybie użytkownika oraz czas procesora\n" +" w trybie systemu, jakie spędził POTOK poleceń do chwili zakończenia.\n" +" \n" +" Opcje:\n" +" -p\twypisanie podsumowania czasów w przenośnym formacie POSIX\n" +" \n" +" Jako format danych wyjściowych używana jest wartość zmiennej TIMEFORMAT.\n" +" \n" +" Stan wyjściowy:\n" +" Polecenie zwraca status zakończenia POTOKU poleceń." + +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4098,70 +4878,81 @@ msgid "" " 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." +"Wykonanie poleceń w oparciu o dopasowanie do wzorców.\n" +" \n" +" Wybiórcze uruchamianie POLECEŃ w zależności od tego, czy SŁOWO pasuje\n" +" do WZORCA. Znak `|' służy do rozdzielania wielu wzorców.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." -#: builtins.c:1563 -#, fuzzy +#: builtins.c:1631 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" +" 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" +" `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" +"Wykonanie poleceń w zależności od spełnienia warunku.\n" +" \n" +" Uruchamiana jest lista `if POLECENIA'. Gdy jej kod powrotu jest zerem,\n" +" uruchamiana jest lista `then POLECENIA'. W przeciwnym przypadku\n" +" uruchamiane są poszczególne listy `elif POLECENIA' 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 +" `then POLECENIA', po czym polecenie if się kończy. W przeciwnym przypadku\n" +" uruchamiana jest lista `else POLECENIA', 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.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." + +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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." +"Wykonywanie poleceń dopóki test kończy się powodzeniem.\n" +" \n" +" Rozwijanie i uruchamianie POLECEŃ-2 dopóki ostatnie polecenie\n" +" w POLECENIACH kończy się z kodem zerowym.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." -#: builtins.c:1592 -#, fuzzy +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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." +"Wykonywanie poleceń dopóki test nie kończy się powodzeniem.\n" +" \n" +" Rozwijanie i uruchamianie POLECEŃ-2 dopóki ostatnie polecenie\n" +" w POLECENIACH kończy się z kodem niezerowym.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4171,25 +4962,40 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Utworzenie koprocesu o podanej NAZWIE.\n" +" \n" +" Asynchroniczne wykonanie POLECENIA ze standardowym wyjściem i standardowym\n" +" wejściem polecenia połączonych potokiem z deskryptorami plików\n" +" przypisanymi do indeksów 0 i 1 zmiennej tablicowej NAZWA w powłoce.\n" +" Domyślną NAZWĄ jest \"COPROC\".\n" +" Stan wyjściowy:\n" +" Polecenie coproc zwraca status wyjścia 0." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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 "" +"Zdefiniowanie funkcji powłoki.\n" +" \n" +" Utworzenie funkcji powłoki o podanej NAZWIE. Przy wywołaniu jako zwykłego\n" +" polecenia NAZWA uruchamia POLECENIA w kontekście powłoki wywołującej.\n" +" Przy wywoływaniu NAZWY, argumenty są przekazywane do funkcji jako $1...$n,\n" +" a nazwa funkcji w $FUNCNAME.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest sukces, chyba że NAZWA jest tylko do odczytu." -#: builtins.c:1632 -#, fuzzy +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4199,11 +5005,15 @@ msgid "" " 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�." +"Grupowanie poleceń jako jednostki.\n" +" \n" +" Uruchomienie zbioru poleceń jako grupy. W ten sposób można przekierować\n" +" cały zbiór poleceń.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest status zakończenia ostatniego wykonanego polecenia." -#: builtins.c:1644 -#, fuzzy +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4216,38 +5026,41 @@ msgid "" " 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 +"Wznowienie zadania jako pierwszoplanowego.\n" +" \n" +" Równoważne argumentowi ZADANIE polecenia `fg'. Wznowienie zatrzymanego lub\n" +" działającego w tle zadania. ZADANIE może określać nazwę zadania albo jego\n" +" numer. Umieszczenie `&' po ZADANIU umieszcza zadanie w tle tak, jak to się\n" +" dzieje po podaniu specyfikacji zadania jako argumentu dla `bg'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracany jest stan wznowionego zadania." + +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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\"." +"Obliczenie wyrażenia arytmetycznego.\n" +" \n" +" Obliczenie WYRAŻENIA zgodnie z zasadami obliczania wyrażeń arytmetycznych.\n" +" Równoważne `let \"WYRAŻENIE\"'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracane jest 1, jeśli wartością WYRAŻENIA jest 0; 0 w przeciwnym wypadku." -#: builtins.c:1671 -#, fuzzy +#: builtins.c:1739 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" +" 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" @@ -4265,28 +5078,32 @@ msgid "" " 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 +"Wykonanie polecenia warunkowego.\n" +" \n" +" Zwracany jest status wynoszący 0 lub 1 w zależności od wyniku WYRAŻENIA\n" +" warunkowego. Wyrażenia są tworzone na tych samych zasadach, co w poleceniu\n" +" `test' i mogą być łączone za pomocą następujących operatorów:\n" +" \n" +" ( WYRAŻENIE )\tzwraca wartość WYRAŻENIA\n" +" ! WYRAŻENIE\tprawdziwe, gdy WYRAŻENIE jest fałszywe; fałszywe\n" +" \t\t\tw innym przypadku\n" +" WYR1 && WYR2\tPrawdziwe, gdy zarówno WYR1 jak i WYR2 są prawdziwe;\n" +" \t\t\tfałszywe w innym przypadku\n" +" WYR1 || WYR2\tPrawdziwe, gdy WYR1 lub WYR2 jest prawdziwe;\n" +" \t\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. W przypadku użycia operatora `=~' łańcuch po prawej stronie\n" +" operatora jest dopasowywany jako wyrażenie regularne.\n" +" \n" +" Operatory && i || nie obliczają WYR2, jeśli obliczenie WYR1 wystarcza do\n" +" określenia wartości wyrażenia.\n" +" \n" +" Stan wyjściowy:\n" +" 0 lub 1 w zależności od wartości WYRAŻENIA." + +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4339,9 +5156,61 @@ msgid "" " 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 +"Popularne zmienne powłoki i ich zastosowanie.\n" +" \n" +" BASH_VERSION\tInformacja o wersji tego Basha.\n" +" CDPATH\tRozdzielona dwukropkami lista katalogów do wyszukiwania\n" +" \t\tkatalogów podanych jako argumenty `cd'.\n" +" GLOBIGNORE\tRozdzielona dwukropkami lista wzorców nazw plików\n" +" \t\tdo ignorowania przy rozwijaniu ścieżek.\n" +" HISTFILE\tNazwa pliku, w którym zapisywana jest historia poleceń.\n" +" HISTFILESIZE\tMaksymalna liczba linii w tym pliku.\n" +" HISTSIZE\tMaksymalna liczba linii historii, do której ma dostęp\n" +" \t\tdziałająca powłoka.\n" +" HOME\tPełna ścieżka do katalogu logowania.\n" +" HOSTNAME\tNazwa bieżącego hosta.\n" +" HOSTTYPE\tRodzaj procesora, na jakim działa ta wersja Basha.\n" +" IGNOREEOF\tSterowanie akcją powłoki w przypadku odebrania znaku\n" +" \t\tEOF jako jedynego wejścia. Jeśli zmienna jest ustawiona,\n" +" \t\tjej wartością jest liczba znaków EOF, które mogą wystąpić\n" +" \t\tw pustym wierszu przed zakończeniem powłoki (domyślnie 10).\n" +" \t\tJeśli nie jest ustawiona, EOF oznacza koniec wejścia.\n" +" MACHTYPE\tŁańcuch opisujący bieżący system, na jakim działa Bash.\n" +" MAILCHECK\tOkreślenie jak często (w sekundach) Bash ma sprawdzać\n" +" \t\tobecność nowej poczty.\n" +" MAILPATH\tRozdzielona dwukropkami lista nazw plików, w których\n" +" \t\tBash ma sprawdzać obecność nowej poczty.\n" +" OSTYPE\tWersja Uniksa, na której działa ta wersja Basha.\n" +" PATH\tRozdzielona dwukropkami lista katalogów do przeszukiwania\n" +" \t\tprzy wyszukiwaniu poleceń.\n" +" PROMPT_COMMAND\tPolecenie do wykonania przed wypisaniem każdego\n" +" \t\tgłównego napisu zachęty.\n" +" PS1\t\tGłówny napis zachęty.\n" +" PS2\t\tDrugorzędny napis zachęty.\n" +" PWD\t\tPełna ścieżka do bieżącego katalogu.\n" +" SHELLOPTS\tRozdzielona dwukropkami lista włączonych opcji powłoki.\n" +" TERM\tNazwa typu bieżącego terminala.\n" +" TIMEFORMAT\tFormat wyjściowy do statystyk czasu wyświetlanych przez\n" +" \t\tpolecenie wbudowane `time'.\n" +" auto_resume\tWartość niepusta oznacza, że słowo polecenia występujące\n" +" \t\tw linii jako jedyne jest najpierw wyszukiwane na liście aktualnie\n" +" \t\tzatrzymanych zadań. Jeśli tam zostanie znalezione, to zadanie\n" +" \t\tjest wznawiane jako pierwszoplanowe. Wartość `exact' oznacza, że\n" +" \t\tsłowo polecenia musi dokładnie pasować do polecenia na liście\n" +" \t\tzadań zatrzymanych. Wartość `substring' oznacza, że słowo\n" +" \t\tpolecenia musi pasować do podciągu zadania. Każda inna wartość\n" +" \t\toznacza, że polecenie musi być przedrostkiem zatrzymanego\n" +" \t\tzadania.\n" +" histchars\tZnaki sterujące rozwijaniem wg historii i szybkim\n" +" \t\tpodstawianiem. Pierwszy znak jest znakiem podstawiania\n" +" \t\thistorii, zwykle `!'. Drugi jest znakiem \"szybkiego podstawienia\",\n" +" \t\tzwykle `^'. Trzeci znak jest znakiem \"komentarza historii\",\n" +" \t\tzwykle `#'.\n" +" HISTIGNORE\tRozdzielona dwukropkami lista wzorców używanych przy\n" +" \t\tdecydowaniu, które polecenia powinny być zapisywane na liście\n" +" \t\thistorii.\n" + +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -4351,19 +5220,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4371,26 +5240,33 @@ msgid "" " 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" +"Dodanie katalogów do stosu.\n" +" \n" +" Dodanie katalogu na wierzchołku stosu katalogów lub rotacja stosu\n" +" czyniąca 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" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas umieszczania katalogów na\n" +" \t\tstosie tak, że zmieniany jest tylko stos.\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" +" Argumenty:\n" +" +N\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \t\tod lewej 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\tRotacja stosu czyniąca jego wierzchołkiem N-ty katalog (licząc\n" +" \t\tod prawej strony listy wypisywanej przez `dirs', począwszy od zera).\n" " \n" -" dir\tUmieszczenie DIR na wierzcho�ku stosu i uczynienie go nowym\n" -" \tbie��cym katalogiem roboczym.\n" +" KATALOG\tUmieszczenie KATALOGU na wierzchołku stosu i uczynienie go\n" +" \t\tnowym bieżącym katalogiem roboczym.\n" " \n" -" Zawarto�� stosu katalog�w mo�na zobaczy� za pomoc� polecenia `dirs'." +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędny argument lub zmiana katalogu\n" +" się nie powiedzie." -#: builtins.c:1788 -#, fuzzy +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -4399,16 +5275,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4416,25 +5292,32 @@ msgid "" " 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" +"Usunięcie katalogów ze 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" +" 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" +" Opcje:\n" +" -n\tPominięcie zmiany katalogu podczas usuwania katalogów ze stosu\n" +" \t\ttak, że zmieniany jest tylko stos.\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" +" Argumenty:\n" +" +N\tUsunięcie ze stosu N-tej pozycji licząc od lewej strony listy\n" +" \t\twypisywanej przez `dirs', począwszy od zera. Na przykład: `popd +0'\n" +" \t\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\tUsunięcie ze stosu N-tej pozycji licząc od prawej strony listy\n" +" \t\twypisywanej przez `dirs', począwszy od zera. Na przykład: `popd -0'\n" +" \t\tusuwa pierwszy katalog, `popd -1' usuwa drugi.\n" " \n" -" Zawarto�� stosu katalog�w mo�na zobaczy� za pomoc� polecenia `dirs'." +" Zawartość stosu katalogów można zobaczyć za pomocą polecenia `dirs'.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędny argument lub zmiana katalogu\n" +" się nie powiedzie." -#: builtins.c:1818 -#, fuzzy +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -4445,51 +5328,55 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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 +"Wypisanie stosu katalogów.\n" +" \n" +" 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" +" Opcje:\n" +" -c\twyczyszczenie stosu katalogów poprzez usunięcie wszystkich jego\n" +" \t\telementów\n" +" -l\tnieużywanie wersji skróconej wersji z tyldą przy wypisywaniu\n" +" \t\tkatalogów względem katalogu domowego\n" +" -p\twypisanie katalogów ze stosu w osobnych wierszach\n" +" -v\twypisanie katalogów ze stosu w osobnych wierszach, poprzedzając\n" +" \t\tkażdy jego pozycją na stosie\n" +" \n" +" Argumenty:\n" +" +N\tWypisanie N-tej pozycji licząc od lewej strony listy wypisywanej\n" +" \t\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" +" \t\tprzez dirs wywołane bez opcji, począwszy od zera.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." + +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -4502,8 +5389,24 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Ustawianie i anulowanie opcji powłoki.\n" +" \n" +" Zmiana ustawienia każdej z NAZWY-OPCJI. Bez argumentów będących opcjami,\n" +" wypisywane są wszystkie podane NAZWY-OPCJI, lub wszystkie opcje powłoki,\n" +" jeśli nie podano NAZW-OPCJI, wraz z zaznaczeniem włączonych.\n" +" \n" +" Opcje:\n" +" -o\tograniczenie NAZW-OPCJI do używanych z `set -o'\n" +" -p\twypisanie opcji powłoki z określeniem stanu\n" +" -q\tpominięcie wyjścia\n" +" -s\twłączenie (ustawienie) każdej NAZWY-OPCJI\n" +" -u\twyłączenie (anulowanie) każdej NAZWY-OPCJI\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda jeśli NAZWA-OPCJI jest włączona; niepowodzenie, jeśli\n" +" podano błędną opcję lub NAZWA-OPCJI jest wyłączona." -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -4511,88 +5414,146 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\n" +" Returns success unless an invalid option is given or a write or assignment\n" " error occurs." msgstr "" +"Formatowanie i wypisanie ARGUMENTÓW zgodnie z FORMATEM.\n" +" \n" +" Opcje:\n" +" -v ZMIENNA\tprzypisanie wyjścia do podanej ZMIENNEJ powłoki zamiast\n" +" \t\twypisywania na standardowym wyjściu\n" +" \n" +" FORMAT jest łańcuchem znakowym zawierającym trzy rodzaje obiektów:\n" +" zwykłe znaki, które są kopiowane na standardowe wyjście; znaki sekwencji\n" +" sterujących, które są przekształcane i kopiowane na standardowe wyjście;\n" +" oraz sekwencje formatujące, z których każda powoduje wypisanie kolejnego\n" +" argumentu.\n" +" \n" +" Poza standardowymi sekwencjami formatującymi opisanymi w printf(1) oraz\n" +" printf(3), printf interpretuje:\n" +" \n" +" %b\trozwinięcie sekwencji z odwrotnym ukośnikiem w odpowiadającym\n" +" \t\targumencie\n" +" %q\tcytowanie argumentu w sposób umożliwiający użycie na wejściu\n" +" \t\tpowłoki\n" +" %Q\tjak %q, ale zastosowanie precyzji na wejściu przed cytowaniem\n" +" %(fmt)T\twypisanie łańcucha daty-czasu otrzymanego z użycia FMT jako\n" +" \t łańcucha formatującego dla strftime(3)\n" +" \n" +" Format jest używany ponownie w razie potrzeby w celu pochłonięcia\n" +" wszystkich argumentów. Jeśli argumentów jest mniej, niż wymaga format,\n" +" nadmiarowe sekwencje zachowują się tak, jakby podano wartość zerową lub\n" +" łańcuch pusty.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub zapis albo\n" +" przypisanie zakończy się niepowodzeniem." -#: builtins.c:1895 +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Określenie sposobu dopełniania argumentów przez Readline.\n" +" \n" +" Określenie dla każdej NAZWY sposobu dopełniania argumentów. Jeśli nie\n" +" podano opcji, wypisywane są istniejące specyfikacje dopełniania w sposób\n" +" pozwalający na ich ponowne użycie jako wejście.\n" +" \n" +" Opcje:\n" +" -p\twypisanie istniejących dopełnień w formacie do ponownego użycia\n" +" -r\tusunięcie specyfikacji dopełniania dla każdej NAZWY lub, jeśli\n" +" \t\tnie podano NAZW, wszystkich specyfikacji dopełniania\n" +" -D\tstosowanie dopełniania i akcji domyślnie dla poleceń bez\n" +" \t\tokreślonych żadnych konkretnych reguł dopełniania\n" +" -E\tstosowanie dopełniania i akcji dla \"pustych\" poleceń -\n" +" \t\tpróby dopełnienia w pustej linii\n" +" -I\tstosowanie dopełniania i akcji do początkowego słowa (zwykle\n" +" \t\tpolecenia)\n" +" \n" +" Przy próbie dopełnienia akcje są wykonywane w kolejności takiej, jak\n" +" wielkie litery wymienione powyżej. Jeśli podano wiele opcji, opcja -D\n" +" ma priorytet nad -E, a obie mają priorytet nad -I.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." -#: builtins.c:1923 -#, fuzzy +#: builtins.c:2004 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" +" 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." +"Wypisanie możliwych uzupełnień w zależności od opcji.\n" +" \n" +" Przeznaczone do wykorzystania w funkcjach powłoki generujących możliwe\n" +" uzupełnienia. Gdy podany jest opcjonalny argument SŁOWO, generowane są\n" +" uzupełnienia pasujące do SŁOWA.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub wystąpi błąd." -#: builtins.c:1938 +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4608,601 +5569,104 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Zmiana lub wyświetlenie opcji dopełniania.\n" +" \n" +" Zmiana opcji dopełniania dla każdej NAZWY lub, jeśli nie podano NAZW,\n" +" aktualnie wykonywanego dopełniania. Jeśli nie podano OPCJI, wypisanie\n" +" opcji dopełniania dla każdej NAZWY lub bieżącej specyfikacji dopełniania.\n" +" \n" +" Opcje:\n" +" \t-o opcja\tUstawienie podanej OPCJI dopełniania dla każdej NAZWY\n" +" \t-D\t\tZmiana opcji dla \"domyślnego\" dopełniania polecenia\n" +" \t-E\t\tZmiana opcji dla dopełniania \"pustego\" polecenia\n" +" \t-I\t\tZmiana opcji dla dopełniania dla początkowego słowa\n" +" \n" +" Użycie `+o' zamiast `-o' wyłącza podaną opcję.\n" +" \n" +" Argumenty:\n" +" \n" +" Każda NAZWA odnosi się do polecenia, dla którego specyfikacja dopełniania\n" +" musi być wcześniej zdefiniowana przy użyciu polecenia wbudowanego\n" +" `complete'. Jeśli nie podano NAZW, compopt musi być wywołane z funkcji\n" +" aktualnie generującej dopełnienia, wtedy zmieniane są opcje dla aktualnie\n" +" wykonywanego generatora dopełnień.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub NAZWA nie ma\n" +" zdefiniowanej specyfikacji dopełniania." -#: builtins.c:1968 +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" +"Odczyt linii ze standardowego wejścia do zmiennej tablicowej indeksowanej.\n" +" \n" +" Odczyt linii ze standardowego wejścia (lub deskryptora FD, jeśli podano\n" +" opcję -u) do zmiennej tablicowej indeksowanej TABLICA. Zmienna MAPFILE\n" +" jest domyślną TABLICĄ.\n" +" \n" +" Opcje:\n" +" -d ogr\tUżycie OGRanicznika do kończenia linii zamiast znaku nowej linii\n" +" -n liczba\tSkopiowanie maksymalnie podanej LICZBY linii. Jeśli LICZBA\n" +" \t\t\twynosi 0, kopiowane są wszystkie linie.\n" +" -O początek\tRozpoczęcie wpisywania do TABLICY od indeksu POCZĄTKU.\n" +" \t\t\tDomyślny indeks wynosi 0.\n" +" -s liczba\tPominięcie pierwszych LICZBA odczytanych linii.\n" +" -t\tUsunięcie końcowego znaku końca linii z każdej wczytanej linii.\n" +" -u fd\tOdczyt linii z deskryptora FD zamiast standardowego wejścia.\n" +" -C wywołanie\tObliczenie WYWOŁANIA po odczycie każdego CO-ILE linii.\n" +" -c co-ile\tLiczba linii do wczytania między każdym WYWOŁANIEM.\n" +" \n" +" Argumenty:\n" +" TABLICA\tNazwa zmiennej tablicowej do użycia na dane z pliku.\n" +" \n" +" Jeśli podano -C bez -c, domyślnym krokiem jest 5000. Podczas obliczania\n" +" WYWOŁANIA jest przekazywany indeks do następnego elementu tablicy, który\n" +" ma być przypisany oraz - jako kolejne argumenty - linia do przypisania.\n" +" \n" +" Jeśli nie podano jawnie początku, mapfile czyści TABLICĘ przed\n" +" przypisywaniem.\n" +" \n" +" Stan wyjściowy:\n" +" Zwracana jest prawda, chyba że podano błędną opcję lub TABLICA jest tylko\n" +" do odczytu, lub nie jest tablicą indeksowaną." -#: builtins.c:2001 +#: builtins.c:2086 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�." +"Odczyt linii z pliku do zmiennej tablicowej.\n" +" \n" +" Synonim polecenia `mapfile'." diff --git a/po/pt.gmo b/po/pt.gmo new file mode 100644 index 0000000..0f516ee Binary files /dev/null and b/po/pt.gmo differ diff --git a/po/pt.po b/po/pt.po new file mode 100644 index 0000000..d093359 --- /dev/null +++ b/po/pt.po @@ -0,0 +1,6034 @@ +# Bash - Bourne Again Shell. +# Copyright (C) 2020 Free Software Foundation, Inc. +# This file is distributed under the same license as the Bash package. +# Pedro Albuquerque , 2018, 2019, 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2020-12-08 03:20+0000\n" +"Last-Translator: Pedro Albuquerque \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Geany / PoHelper 1.37\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "subscrito de matriz inválido" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: a remover atributo nameref" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: impossível converter matriz indexada para associativa" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: impossível atribuir a índice não numérico" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: tem de usar subscrito ao atribuir a matriz associativa" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: impossível criar: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: impossível encontrar mapa de teclado para o " +"comando" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: o 1º carácter não-espaço não é \"\"\"" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "sem \"%c\" de fecho em %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: separador dois pontos em falta" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "\"%s\": impossível desassociar no mapa de teclado do comando" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansão: impossível alocar memória para %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansão: falha ao alocar memória para %u elementos" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansão: falha ao alocar memória para \"%s\"" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "\"%s\": aliás inválido" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "Edição de linha não activada" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "\"%s\": mapa de teclado inválido" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: impossível ler: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "\"%s\": nome de função desconhecido" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s: não tem associação a qualquer tecla.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s pode ser chamado via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "\"%s\": impossível desassociar" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "total de ciclos" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "só tem significado num ciclo \"for\", \"while\" ou \"until\"" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"Devolve o contexto da actual chamada a sub-rotina.\n" +" \n" +" Sem EXPR, devolve \"$linha $nomefich\". Com EXPR, devolve\n" +" \"$linha $sub-rotina $nomefich\"; esta informação extra pode ser usada\n" +" para obter um rasto da pilha.\n" +" \n" +" O valor de EXPR indica quantas chamadas deve recuar antes da\n" +" actual; a chamada superior é a chamada 0.\n" +" Estado de saída:\n" +" Devolve 0 a não ser que a consola não esteja a executar uma função ou " +"EXPR\n" +" seja inválida." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME não definida" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "demasiados argumentos" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "pasta nula" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD não definida" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "linha %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "aviso: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uso: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: a opção requer um argumento" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: requer um argumento numérico" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: não encontrado" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: opção inválida" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: nome de opção inválido" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "\"%s\": identificador inválido" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "número octal inválido" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "número hexadecimal inválido" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "número inválido" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: especificação de sinal inválida" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "\"%s\": especificação de pid ou tarefa inválida" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: variável só de leitura" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: impossível desactivar" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s fora do intervalo" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "argumento" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s fora do intervalo" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: tarefa inexistente" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: sem controlo da tarefa" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "sem controlo da tarefa" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: restrita" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "restrita" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: não é interno da consola" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "erro de escrita: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "erro ao definir atributos do terminal: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "erro ao obter atributos do terminal: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: erro ao obter a pasta actual: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: especificação de tarefa ambígua" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "ajuda indisponível nesta versão" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: impossível desactivar: %s só de leitura" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: impossível desactivar" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nome de acção inválido" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: sem especificação de conclusão" + +#: builtins/complete.def:696 +msgid "warning: -F option may not work as you expect" +msgstr "aviso: a opção -F pode não resultar como esperado" + +#: builtins/complete.def:698 +msgid "warning: -C option may not work as you expect" +msgstr "aviso: a opção -C pode não resultar como esperado" + +#: builtins/complete.def:846 +msgid "not currently executing completion function" +msgstr "a função de conclusão não está em execução" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "só pode ser usado numa função" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "impossível usar \"-f\" para fazer funções" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: função só de leitura" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: variável de referência não pode ser uma matriz" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: não são permitidas auto-referências de nameref" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: referência circular de nome" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": nome de variável inválido para referência de nome" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: impossível destruir variáveis de matriz assim" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: impossível converter matriz associativa em indexada" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: atribuição de matriz composta citada obsoleta" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "carregamento dinâmico indisponível" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "impossível abrir objecto partilhado %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "impossível encontrar %s no objecto partilhado %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: interno dinâmico já carregado" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "carregamento da função %s devolve falha (%d): não carregada" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: não carregada dinamicamente" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: impossível eliminar: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: é uma pasta" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: não é um ficheiro normal" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: ficheiro muito grande" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: impossível executar o binário" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: impossível executar: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "logout\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "não é consola de sessão: use \"exit\"" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Há tarefas interrompidas.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Há tarefas em curso.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "sem comando encontrado" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "especificação de histórico" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: impossível abrir ficheiro temporário: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "actual" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "tarefa %d começou sem controlo de tarefa" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opção ilegal -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a opção requer um argumento -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "hashing desactivado" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: tabela de hash vazia\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "sucessos\tcomando\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Comandos de consola correspondentes à palavra-chave \"" +msgstr[1] "Comandos de consola correspondentes a palavras-chave \"" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nenhum tópico de ajuda para \"%s\". Tente \"help help\", \"man -k %s\" ou " +"\"info %s\"." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: impossível abrir: %s" + +#: builtins/help.def:523 +#, 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 "" +"Estes comandos de consola são definidos internamente. Insira \"help\" para " +"ver a lista.\n" +"Insira \"help nome\" para saber mais sobre a função \"nome\".\n" +"Use \"info bash\" para saber mais sobre a consola em geral.\n" +"Use \"man -k ou \"info\" para saber mais sobre comandos não listados.\n" +"\n" +"Um asterisco (*) junto a um nome significa que o comando está inactivo.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "impossível usar mais de um -anrw" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "posição do histórico" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: datação inválida" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: falha na expansão do histórico" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: falha inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "não são permitidas mais opções com \"-x\"" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: os argumentos têm de ser IDs de processos ou tarefas" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Erro desconhecido" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "esperada expressão" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: não é uma matriz indexada" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: especificação de descritor de ficheiro inválida" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: descritor de ficheiro inválido: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: total de linhas inválido" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: origem de matriz inválida" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: callback inválida" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "nome de variável de matriz vazio" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "requerido suporte a variáveis de matriz" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "%s: carácter de formato em falta" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "\"%c\": especificação de formato de hora inválida" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "\"%c\": carácter de formato inválido" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "aviso: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema de análise de formato: %s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "dígito hex em falta para \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "dígito unicode em falta para \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "nenhuma outra pasta" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: argumento inválido" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "pilha de pastas vazia" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "índice da pilha de pastas" + +#: builtins/pushd.def:701 +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 "" +"Mostrar a lista de pastas actualmente lembradas. As pastas\n" +" entram na lista com o comando \"pushd\"; pode recuar\n" +" na lista com o comando \"popd\".\n" +" \n" +" Opções:\n" +" -c\tlimpar a pilha de pastas eliminando todos os elementos\n" +" -l\tnão imprimir versões com prefixo til de pastas relativas\n" +" \tà sua pasta home\n" +" -p\timprimir a pilha de pastas com uma entrada por linha\n" +" -v\timprimir a pilha de pastas com uma entrada por linha com a sua\n" +" \tposição na pilha como prefixo\n" +" \n" +" Argumentos:\n" +" +N\tmostra a N entrada a contar da esquerda da lista mostrada por\n" +" \tpastas quando chamada sem opções, começando com zero.\n" +" \n" +" -N\tmostra a N entrada a contar da direita da lista mostrada por\n" +" \tpastas quando chamada sem opções, começando com zero." + +#: builtins/pushd.def:723 +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 "" +"Adiciona uma pasta ao cimo da pilha de pastas ou roda a pilha\n" +" tornando a pasta actual o novo cimo da pilha.\n" +" Sem argumentos, troca as duas pastas superiores.\n" +" \n" +" Opções:\n" +" -n\tSuprime a troca normal de pastas ao adicionar\n" +" \tpastas à pilha, só a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRoda a pilha de forma a que a N pasta (contando\n" +" \tda esquerda da lista mostrada por pastas, começando com\n" +" \tzero) fique no topo.\n" +" \n" +" -N\tRoda a pilha de forma a que a N pasta (contando\n" +" \tda direita da lista mostrada por pastas, começando com\n" +" \tzero) fique no topo.\n" +" \n" +" PST\tAdiciona PST ao cimo da pilha de pastas, tornando-a a\n" +" \tnova pasta de trabalho actual.\n" +" \n" +" O \"dirs\" interno mostra a pilha de pastas." + +#: builtins/pushd.def:748 +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 "" +"Remove entradas da pilha de pastas. Sem argumentos, remove\n" +" a pasta superior da pilha e muda para a nova pasta de topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a troca normal de pastas ao remover\n" +" \tpastas da pilha, só a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a N pasta contando da esquerda da lista\n" +" \tmostrada por pastas, começando com zero Por exemplo: \"popd +0\"\n" +" \tremove a primeira pasta, \"popd +1\" a segunda.\n" +" \n" +" -N\tRemove a N pasta contando da direita da lista\n" +" \tmostrada por pastas, começando com zero Por exemplo: \"popd +0\"\n" +" \tremove a última pasta, \"popd +1\" a penúltima.\n" +" \n" +" O \"dirs\" interno mostra a pilha de pastas." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: especificação de inacção inválida" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "erro de leitura: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "só pode usar \"return\" a partir de uma função ou script baseado" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "impossível desactivar simultaneamente uma função e uma variável" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: não é variável de matriz" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: não é função" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: impossível exportar" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "total de trocas" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "impossível definir e desactivar opções da consola em simultâneo" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: nome de opção da consola inválido" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "requerido argumento de nome de ficheiro" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: ficheiro não encontrado" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "impossível suspender" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "impossível suspender uma consola de sessão" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s usa o aliás \"%s\"\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s é palavra-chave da consola\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s é uma função\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s é opção interna especial da consola\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s é opção interna da consola\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s é %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s tem hash (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: argumento de limite inválido" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "\"%c\": comando errado" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: impossível obter limite: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "limite" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: impossível modificar limite: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "número octal" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "\"%c\": operador de modo simbólico inválido" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "\"%c\": carácter de modo simbólico inválido" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " linha " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "último comando: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "A abortar..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM.: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "aviso: " + +#: error.c:488 +msgid "unknown command error" +msgstr "erro de comando desconhecido" + +#: error.c:489 +msgid "bad command type" +msgstr "tipo de comando errado" + +#: error.c:490 +msgid "bad connector" +msgstr "conector errado" + +#: error.c:491 +msgid "bad jump" +msgstr "salto errado" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: variável desassociada" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aDemasiada inacção à espera de entrada: sessão terminada\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "impossível redireccionar entrada padrão de /dev/null: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "FORMATOHORA: \"%c\": carácter de formato inválido" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] ainda existe" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "erro de pipe" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: nível máximo de aninhamento de eval excedido (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: nível máximo de aninhamento de fonte excedido (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: nível máximo de aninhamento de função excedido (%d)" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: restrito: impossível especificar \"/\" em nomes de comando" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: comando não encontrado" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: impossível executar o binário" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: interpretador errado" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: impossível executar binário: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "%s: é uma opção interna especial" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "impossível duplicar fd %d para fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "nível de recursão da expressão excedido" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "sub-fluxo da pilha de recursividade" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "erro de sintaxe na expressão" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "tentativa de atribuição a não-variável" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "erro de sintaxe na atribuição de variável" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "divisão por 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "problema: símbolo expassign errado" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "\":\" esperados para expressão condicional" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "expoente menor que 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "identificador esperado após pré-incremento ou pré-decremento" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "\")\" em falta" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "erro de sintaxe: operando esperado" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "erro de sintaxe: operador aritmético inválido" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (símbolo de erro é \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "base aritmética inválida" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "constante inteira inválida" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "valor muito grande para a base" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: erro de expressão\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: impossível aceder a pastas-mãe" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "impossível repor modo nodelay para fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" +"impossível alocar novo descritor de ficheiro para entrada bash de fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: buffer já existe para o novo fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pipe pgrp" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "pid %d aparece em tarefa em execução %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "a eliminar tarefa interrompida %d com grupo de processo %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) marcado como ainda activo" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: pid não existente" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Sinal %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Feito" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Interrompido" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Interrompido(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Em execução" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Feito(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Sair de %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Estado desconhecido" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(núcleo despejado) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "setpgid filho (%ld para %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld não é um filho desta consola" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: sem registo do processo %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_tarefa: tarefa %d está interrompida" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: sem tarefas actuais" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: tarefa terminada" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: tarefa %d já em 2º plano" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: a ligar WNOHANG para evitar bloquieo indefinido" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: linha %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (núcleo despejado)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd agora: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp falhou" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: sem controlo de tarefa em 2º plano" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: disciplina de linha" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "impossível definir grupo de processo do terminal (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "não há controlo de tarefa nesta consola" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: asserção falhada: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: asserção frustrada\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "desconhecido" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: bloqueio na lista livre clobbered" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: chamado com argumento de bloco já liberto" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: chamado com argumento de bloco não alocado" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: sub-fluxo detectado; mh_nbytes fora do intervalo" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: sub-fluxo detectado; magic8 corrompido" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: tamanho dos pontos inicial e final difere" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: chamado com argumento de bloco não alocado" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: sub-fluxo detectado; mh_nbytes fora do intervalo" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: sub-fluxo detectado; magic8 corrompido" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: tamanho dos pontos inicial e final difere" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: tabela de alocação cheia com FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p já na tabela como alocado?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p já na tabela como livre?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "base inválida" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: anfitrião desconhecido" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: serviço inválido" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: especificação de caminho de rede errada" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "operações de rede não suportadas" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: não pode alterar o idioma (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: não pode alterar o idioma (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: não pode alterar o idioma (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: não pode alterar o idioma (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Tem correio em $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Tem novo correio em $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "O correio em %s já foi lido\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "erro de sintaxe: requerida expressão aritmética" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "erro de sintaxe: \";\" inesperado" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "erro de sintaxe: \"((%s))\"" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: tipo de instrução %d errado" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "" +"here-document na linha %d delimitado por fim-de-ficheiro (desejado \"%s\")" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" +"make_redirection: instrução de redireccionamento \"%d\" fora do intervalo" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" +"consola_getc: consola_input_line_size (%zu) excede SIZE_MAX (%lu): linha " +"truncada" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "total here-document máximo excedido" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "EOF inesperado ao procurar \"%c\" correspondentes" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "EOF inesperado ao procurar \"]]\"" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "erro de sintaxe em expressão condicional: símbolo inesperado \"%s\"" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "erro de sintaxe em expressão condicional" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "símbolo inesperado \"%s\", esperado \")\"" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "esperado \")\"" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "argumento \"%s\" inesperado para operador unário condicional" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "argumento inesperado para operador unário condicional" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "símbolo \"%s\" inesperado, esperado operador binário condicional" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "esperado operador binário condicional" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "argumento \"%s\" inesperado para operador binário condicional" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "argumento inesperado para operador binário condicional" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "símbolo \"%c\" inesperado em comando condicional" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "símbolo \"%s\" inesperado em comando condicional" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "símbolo %d inesperado em comando condicional" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "erro de sintaxe junto a símbolo \"%s\" inesperado" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "erro de sintaxe junto a \"%s\"" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "erro de sintaxe: fim de ficheiro inesperado" + +#: parse.y:6151 +msgid "syntax error" +msgstr "erro de sintaxe" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Use \"%s\" para sair da consola.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "EOF inesperado ao procurar o \")\" correspondente" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "completion: função \"%s\" não encontrada" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possível ciclo de repetição" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: conector \"%d\" errado" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: descritor de ficheiro inválido" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: ponteiro de ficheiro NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: \"%c\": carácter de formato inválido" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "descritor de ficheiro fora de alcance" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: redireccionamento ambíguo" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: impossível sobrescrever ficheiro existente" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: restricto: impossível redireccionar saída" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "impossível criar ficheiro temporário para here-document: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: impossível atribuir fd a variável" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port não suportado em trabalho de rede" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "erro de redireccionamento: impossível duplicar fd" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "impossível encontrar /tmp, por favor crie-a!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp tem de ser um nome de pasta válido" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "modo pretty-printing ignorado em consolas interactivas" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: opção inválida" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossível definir uid como %d: uid efectiva %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossível definir gid como %d: gid efectiva %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "impossível iniciar o depurador; modo de depuração desactivado" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: é uma pasta" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Não tenho nome!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, versão %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uso:\t%s [opção longa GNU] [opção] ...\n" +"\t%s [opção longa GNU] [opção] script-file ...\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "Opções longas GNU:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Opções da consola:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\tcomando -ilrsD ou -c ou -O shopt_option\t\t(só chamada)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\topção -%s ou -o\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" +"Insira \"%s -c \"help set\"\" para mais informação sobre opções da consola.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" +"Insira \"%s -c help\" para mais informação sobre comandos internos da " +"consola.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Use o comando \"bashbug\" para reportar erros.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Página inicial do bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ajuda geral para usar programas GNU: \n" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: operação inválida" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Sinal falso" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Desligar" + +#: 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 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 "Excepção de vírgula flutuante" + +#: siglist.c:87 +msgid "Killed" +msgstr "Morto" + +#: siglist.c:91 +msgid "Bus error" +msgstr "Erro de bus" + +#: siglist.c:95 +msgid "Segmentation fault" +msgstr "Falha de segmentação" + +#: siglist.c:99 +msgid "Bad system call" +msgstr "Chamada de sistema errada" + +#: siglist.c:103 +msgid "Broken pipe" +msgstr "Pipe quebrado" + +#: siglist.c:107 +msgid "Alarm clock" +msgstr "Alarme" + +#: siglist.c:111 +msgid "Terminated" +msgstr "Terminado" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "Condição IO urgente" + +#: 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 "Morte ou paragem do filho" + +#: 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 "I/O pronto" + +#: siglist.c:151 +msgid "CPU limit" +msgstr "Limite do CPU" + +#: siglist.c:155 +msgid "File limit" +msgstr "Limite do ficheiro" + +#: siglist.c:159 +msgid "Alarm (virtual)" +msgstr "Alarme (virtual)" + +#: siglist.c:163 +msgid "Alarm (profile)" +msgstr "Alarme (perfil)" + +#: siglist.c:167 +msgid "Window changed" +msgstr "Janela alterada" + +#: siglist.c:171 +msgid "Record lock" +msgstr "Bloqueio de registo" + +#: siglist.c:175 +msgid "User signal 1" +msgstr "Sinal de utilizador 1" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Sinal de utilizador 2" + +#: siglist.c:183 +msgid "HFT input data pending" +msgstr "entrada de dados HTF pendente" + +#: siglist.c:187 +msgid "power failure imminent" +msgstr "falha de energia iminente" + +#: siglist.c:191 +msgid "system crash imminent" +msgstr "acidente do sistema iminente" + +#: siglist.c:195 +msgid "migrate process to another CPU" +msgstr "migrar processo para outro CPU" + +#: siglist.c:199 +msgid "programming error" +msgstr "erro de programação" + +#: siglist.c:203 +msgid "HFT monitor mode granted" +msgstr "concedido modo de monitor HTF" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "retirado modo de monitor HTF" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "sequência de som HTF terminou" + +#: siglist.c:215 +msgid "Information request" +msgstr "Pedido de informação" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Sinal desconhecido #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "má substituição: sem \"%s\" de fecho em %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: impossível atribuir lista a membro de matriz" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "impossível fazer pipe para substituição de processo" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "impossível fazer filho para substituição de processo" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "impossível abrir pipe chamado %s para leitura" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "impossível abrir pipe chamado %s para escrita" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "imossível duplicar pipe chamado %s como fd %d" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "substituição de comando: byte nulo ignorado na entrada" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "impossível fazer pipe para substituição de comando" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "impossível fazer filho para substituição de comando" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: impossível duplicar pipe como fd 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nome de variável inválido para referência de nome" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansão indirecta inválida" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nome de variável inválido" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parâmetro não definido" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parâmetro nulo ou não definido" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: expressão de sub-cadeia < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: má substituição" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: impossível atribuir desta forma" + +#: subst.c:10111 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"futuras versões da consola vão forçar a avaliação como uma substituição " +"aritmética" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "má substituição: sem \"\"\" de fecho em %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "sem par:%s" + +#: test.c:147 +msgid "argument expected" +msgstr "argumento esperado" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: expressão inteira esperada" + +#: test.c:265 +msgid "`)' expected" +msgstr "\")\" esperado" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "\")\" esperado, encontrado %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: operador bináro esperado" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: operador unáro esperado" + +#: test.c:896 +msgid "missing `]'" +msgstr "\"]\" em falta" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "erro de sintaxe: \"%s\" esperado" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "número de sinal inválido" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "gestor de trap: nível máximo de gestor de captura excedido (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valor errado em trap_list[%d]: %p" + +#: trap.c:416 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: gestor de sinal é SIG_DFL, a reenviar %d (%s) para mim " +"próprio" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: sinal errado %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "erro ao importar definição de função para \"%s\"" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "nível da consola (%d) muito alto, a repor para 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variável: sem contexto de função no âmbito actual" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: não pode atribuir um valor à variável" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: a atribuir inteiro à referência de nome" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: sem contexto de função no âmbito actual" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s tem exportstr nulo" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "carácter %d inválido em exportstr para %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "sem \"=\" em exportstr para %s" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: cabeça de consola_variables não é contexto de função" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: sem contexto de global_variables" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" +"pop_scope: cabeça de consola_variables não é âmbito de ambiente temporário" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: impossível abrir como FICHEIRO" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: valor inválido para descritor de ficheiro trace" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: valor de compatibilidade fora do intervalo" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Licença GPLv3+: GNU GPL versão 3 ou posterior \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versão %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Este é um programa gratuito; pode alterá-lo e distribuí-lo à vontade." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Não há QUALQUER GARANTIA, até aos limites previstos pela Lei." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: impossível alocar %lu bytes (%lu bytes alocados)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: impossível alocar %lu bytes" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: impossível alocar %lu bytes (%lu bytes alocados)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: impossível alocar %lu bytes" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [nome[=valor] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] nome [nome ...]" + +#: builtins.c:53 +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpsvPSVX] [-m mapa de teclado] [-f ficheiro] [-q nome] [-u nome] [-r " +"seqtecl] [-x seqtecl:comando-consola] [seqtecl:função-readline ou comando-" +"readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [consola-interno [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [expr]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [pst]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "comando [-pVv] comando [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [nome[=valor] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] nome[=valor] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [opção] nome[=valor] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f ficheiro] [nome ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring name [arg...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nome] [comando [argumento ...]] [redireccionamento ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e ename] [-lnr] [primeiro] [último] ou fc -s [pat=rep] [comando]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [job_spec]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [job_spec ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p caminho] [-dt] [nome ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [padrão ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d desvio] [n], history -anrw [ficheiro] ou history -ps arg " +"[arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "tarefas [-lnprs] [tarefaspec ...] ou tarefas -x comando [args]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [tarefaspec ... | pid ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s sigspec | -n signum | -sigspec] pid | tarefaspec ... ou kill -l " +"[sigspec]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +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] [-N ncars] [-p " +"prompt] [-t inacção] [-u fd] [nome ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o nome-opção] [--] [arg ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nome ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nome[=valor] ...] ou export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nome[=valor] ...] ou readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ficheiro [argumentos]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ficheiro [argumentos]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [expr]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] signal_spec ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] nome [nome ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limite]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [modo]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for NOME [in PALAVRAS ... ] ; do COMANDOS; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMANDOS; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NOME [in PALAVRAS ... ;] do COMANDOS; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] pipeline" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case PALAVRA in [PADRÃO [| PADRÃO]...) COMANDOS ;;]... esac" + +#: builtins.c:194 +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:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while COMANDOS; do COMANDOS; done" + +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until COMANDOS; do COMANDOS; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NOME] comando [redireccionamentos]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "nome de função { COMANDOS ; } ou nome () { COMANDOS ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ COMANDOS ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( expressão ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ expressão ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variáveis - nomes e significados de algumas variáveis da consola" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | pasta]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [nomeopção ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] formato [argumentos]" + +#: builtins.c:231 +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"suffix] [name ...]" +msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o opção] [-A acção] [-G " +"padrãoglobal] [-W listapalavras] [-F função] [-C comando] [-X padrãofiltro] " +"[-P prefixo] [-S sufixo] [nome ...]" + +#: builtins.c:235 +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 opção] [-A acção] [-G padrãoglobal] [-W " +"listapalavras] [-F função] [-C comando] [-X padrãofiltro] [-P prefixo] [-S " +"sufixo] [palavra]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opção] [-DEI] [nome ...]" + +#: builtins.c:242 +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-d delim] [-n total] [-O origem] [-s total] [-t] [-u fd] [-C " +"callback] [-c quantia] [matriz]" + +#: builtins.c:244 +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-d delim] [-n total] [-O origem] [-s total] [-t] [-u fd] [-C " +"callback] [-c quantum] [matriz]" + +#: builtins.c:256 +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 "" +"Definir ou mostrar aliás.\n" +" \n" +" Sem argumentos, \"alias imprime a lista de aliás na forma\n" +" reutilizável \"alias NOME=VALOR\" na saída padrão.\n" +" \n" +" Com argumetos, é definido um aliás para cada NOME cujo VALOR é dado.\n" +" Um espaço final em VALOR causa uma verificação à palavra seguinte para\n" +" substituição do aliás quando o aliás for expandido.\n" +" \n" +" Opções:\n" +" -p\timprimir todos os aliás definidos em formato reutilizável\n" +" \n" +" Estado de saída:\n" +" alias devolve verdadeiro a não ser que seja fornecido um NOME para o " +"qual\n" +"ainda não haja um aliás." + +#: builtins.c:278 +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 "" +"Remover cada NOME da lista de aliás definidos.\n" +" \n" +" Opções:\n" +" -a\tremove todas as definições de aliás\n" +" \n" +" Devolve sucesso a não ser que NOME seja um aliás inexistente." + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Definir associações de teclas e variáveis para Readline.\n" +" \n" +" Associar uma sequência de teclas a uma função ou macro Readline, ou\n" +" defina uma variável Readline. A sintaxe de argumento não-opção é " +"equivalente\n" +" à encontrada em ~/.inputrc, mas tem de ser passada como argumento " +"único:\n" +" e.g., bind \"\"\\C-x\\C-r\": re-read-init-file\".\n" +" \n" +" Opções:\n" +" -m maptecl Use MAPTECL como mapa de teclado para a " +"duração deste\n" +" comando. Nomes de mapas aceitáveis são " +"emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, " +"vi-move,\n" +" vi-command, e vi-insert.\n" +" -l Listar nomes de funções.\n" +" -P Listar nomes de funções e associações.\n" +" -p Listar funções funçãos e associações de " +"forma a que possam\n" +" ser reutilizados como entrada.\n" +" -S Listar sequências de teclas que chamem " +"macros e seus valores\n" +" -s Listar sequências de teclas que chamem " +"macros e seus valores\n" +" de forma a que possam ser reutilizados como " +"entrada.\n" +" -V Listar nomes de variáveis e seus valores\n" +" -v Listar nomes de variáveis e seus valores de " +"forma a que possam\n" +" ser reutilizados como entrada.\n" +" -q nome-função Consultar que teclas chamaram a função em " +"causa.\n" +" -u nome-função Unbind all keys which are bound to the named " +"função.\n" +" -r seqtecl Remover associação de SEQTECL.\n" +" -f nomefich Ler associações de teclas a partir de " +"NOMEFICH.\n" +" -x seqtecl:comando-consola\tCausa a execuçaõ de COMANDO-SHELL " +"quando\n" +" \t\t\t\tSEQTECL for inserido.\n" +" -X Listarsequências de teclas associadas a -x e " +"comandos ligados\n" +" de forma a que possam ser reutilizados como " +"entrada.\n" +" \n" +" Estado de saída:\n" +" bind devolve 0 a não ser que seja dada uma opção desconhecida ou ocorra " +"um erro." + +#: builtins.c:330 +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 "" +"Sair de ciclos for, while, ou until.\n" +" \n" +" Sai de um ciclo FOR, WHILE ou UNTIL. Se N for especificado, quebrar N " +"ciclos\n" +" envolventes.\n" +" \n" +" Estado de saída:\n" +" O estado de saída é 0 a não ser que N não seja maior ou igual que 1." + +#: builtins.c:342 +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 "" +"Retomar ciclos for, while, ou until.\n" +" \n" +" Retoma a iteração seguinte do ciclo FOR, WHILE ou UNTIL envolvente.\n" +" Se N for especificado, retoma o N-ésimo ciclo envolvente.\n" +" \n" +" Estado de saída:\n" +" O estado de saída é 0 a não ser que N não seja maior ou igual que 1." + +#: builtins.c:354 +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 "" +"Executa comandos internos da consola.\n" +" \n" +" Executa SHELL-INTERNO com argumentos ARGs sem realizar procura do " +"comando.\n" +" Útil quando deseja re-implementar um comando interno da consola como\n" +" função da consola, mas tem de executar o comando interno dentro da " +"função.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado de saída de SHELL-INTERNO ou falso se SHELL-INTERNO " +"não\n" +" for um comando interno da consola." + +#: builtins.c:369 +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 "" +"Devolver o contexto da actual chamada a sub-rotina.\n" +" \n" +" Sem EXPR, devolve \"$linha $nomefich\". Com EXPR, devolve\n" +" \"$linha $sub-rotina $nomefich\"; esta informação extra pode ser usada\n" +" para obter um rasto da pilha.\n" +" \n" +" O valor de EXPR indica quantas chamadas deve recuar antes da\n" +" actual; a chamada superior é a chamada 0.\n" +" \n" +" Estado de saída:\n" +" Devolve 0 a não ser que a consola não esteja a executar uma função ou " +"EXPR\n" +" seja inválida." + +#: builtins.c:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Alterar a pasta de trabalho da consola.\n" +" \n" +" Altera a pasta actual para PASTA. A PASTA predefinida é o valor da " +"variável\n" +" HOME.\n" +" \n" +" A variável CDPATH define o caminho de procura para a pasta que contém\n" +" PASTA. Nomes de pasta alternativos em CDPATH são separados por \":" +"\" (:).\n" +" Um nome de pasta nulo é equivalente à pasta actual. Se PASTA começar " +"com\n" +" uma barra (/), CDPATH não é usada.\n" +" \n" +" Se a pasta não for encontrada e a opção de consola \"cdable_vars\" " +"estiver definida,\n" +" a palavra é assumida como nome de variável. Se essa variável tiver um " +"valor,\n" +" será usado como PASTA.\n" +" \n" +" Opções:\n" +" -L\tforçar seguimento de ligações simbólicas: resolve ligações\n" +" \t\tsimbólicas em PASTA após processar instâncias de \"..\"\n" +" -P\tusa a estrutura física de pastas sem seguir ligações\n" +" \t\tsimbólicas: resolve ligações simbólicas em PASTA antes de\n" +" \t\tprocessar instâncias de \"..\"\n" +" -e\tse a opção -P for usada e a pasta de trabalho actual não puder\n" +" \t\tser determinada com sucesso, sair com\n" +" \t\testado não-zero\n" +" -@\tem sistemas que o suportam, apresentar um ficheiro com " +"atributos\n" +" \t\testendidos como uma pasta contendo os atributos do ficheiro.\n" +" \n" +" A predefinição é seguir ligações simbólicas, como se \"-L\" fosse " +"especificada.\n" +" \"..\" é processado colocando o componente de caminho imediatamente " +"anterior\n" +" como barra ou o começo de PASTA.\n" +" \n" +" Estado de saída:\n" +" Devolve 0 se a pasta for alterada e se $PWD for definida com sucesso " +"quando\n" +" -P é usada; caso contrário, não-zero." + +#: builtins.c:425 +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" +" \t\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 "" +"Imprimir o nome da actual pasta de trabalho.\n" +" \n" +" Opções:\n" +" -L\tImprimir o valor de $PWD se nomear a actual pasta de\n" +" \t\ttrabalho\n" +" -P\timprimir a pasta física, sem quaisquer ligações simbólicas\n" +" \n" +" Por predefinição, \"pwd\" comporta-se como se \"-L\" fosse " +"especificada.\n" +" \n" +" Estado de saída:\n" +" Devolve 0 a não ser que seja indicada uma opçãoinválida ou a pasta " +"actual\n" +" não possa ser lida." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Comando nulo.\n" +" \n" +" Sem efeito; o comando não faz nada.\n" +" \n" +" Estado de saída:\n" +" Sempre com sucesso." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Devolve um resultado com sucesso.\n" +" \n" +" Estado de saída:\n" +" Sempre com sucesso." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Devolve um resultado sem sucesso.\n" +" \n" +" Estado de saída:\n" +" Falha sempre." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Executar um comando simples ou mostrar informação sobre comandos.\n" +" \n" +" Executa COMANDO com ARGS suprimindo procura de funções da consola ou " +"mostra\n" +" informação acerca dos COMANDOs especificados. Pode ser usado para " +"chamar comandos\n" +" em disco quando existe uma função com o mesmo nome.\n" +" \n" +" Opções:\n" +" -p usar valor predefinido para CAMINHO que garanta que se " +"encontram\n" +" todos os utilitários padrão\n" +" -v imprimir uma descrição de COMANDO similar ao interno \"type" +"\"\n" +" -V imprimir uma descrição mais detalhada de COMANDO\n" +" \n" +" Estado de saída:\n" +" Devolve o estado de saída de COMANDO ou falha se COMANDO não for " +"encontrado." + +#: builtins.c:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Define valores e atributos de variáveis.\n" +" \n" +" Declara variáveis e dá-lhes atributos. Se não indicar NOMEs,\n" +" mostrar os atributos e valores de todas as variáveis.\n" +" \n" +" Opções:\n" +" -f\trestringe acção ou exibição a nomes e definições de função\n" +" -F\trestringe exibição só a nomes de função (mais nº de linha e\n" +" \t\tficheiro fonte ao depurar)\n" +" -g\tcria variáveis globais quando usado numa função da consola; " +"senão\n" +" \t\té ignorada\n" +" -I\tse está a criar uma variável local, herdar atributos e valor\n" +" \t\tduma variável com o mesmo nome num âmbito anterior\n" +" -p\tmostra atributos e valores de cada NOME\n" +" \n" +" Opções que definem atributos:\n" +" -a\tpara tornar NOMEs matrizes indexadas (se suportado)\n" +" -A\tpara tornar NOMEs matrizes associativas (se suportado)\n" +" -i\tpara dar a NOMEs o atributo \"integer\"\n" +" -l\tpara converter NOMEs em minúsculas ao atribuir\n" +" -n\ttornar NOME uma referência à variável chamada pelo seu valor\n" +" -r\tpara tornar NOMEs só de leitura\n" +" -t\tpara dar a NOMEs o atributo \"trace\"\n" +" -u\tpara converter NOMEs em maiúsculas ao atribuir\n" +" -x\tpara tornar NOMEs exportáveis\n" +" \n" +" Usar \"+\" em vez de \"-\" desliga o atributo indicado.\n" +" \n" +" Variáveis com o atributo integer têm avaliação aritmética (veja o\n" +" comando \"let\") realizada quando lhe é atribuído um valor.\n" +" \n" +" Quando usado numa função, \"declare\" torna NOMEs locais, como o " +"comando\n" +" \"local\". A opção \"-g\" suprime este comportamento.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que seja indicada uma opção inválida ou " +"ocorra um\n" +" erro de atribuição da variável." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Define variáveis e atributos.\n" +" \n" +" Um sinónimo para \"declare\". Veja \"help declare\"." + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Define variáveis locais.\n" +" \n" +" Cria uma variável local chamada NOME e dá-lhe VALOR. OPÇÃO pode\n" +" ser qualquer opção aceite por \"declare\".\n" +" \n" +" Variáveis locais só podem ser usadas dentro de uma função; só são " +"visíveis\n" +" para a função onde foram definidas e para os seus filhos.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que uma opção inválida seja fornecida, " +"ocorra \n" +" um erro de atribuição ou a consola não esteja a executar uma função." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Escreve argumentos para a saída padrão.\n" +" \n" +" Mostrar ARGs, separados por espaço único e seguidos de nova linha (LF)\n" +" na saída padrão.\n" +" \n" +" Opções:\n" +" -n\tnaõ acrescentar nova linha\n" +" -e\tpermitir interpretação dos escapes seguintes com barra esquerda\n" +" -E\tsuprimir explicitamente interpretação de escapes com barra " +"esquerda\n" +" \n" +" \"echo\" interpreta os seguintes caracteres de escapes com barra " +"esquerda:\n" +" \\a\talerta (bell)\n" +" \\b\tbackspace\n" +" \\c\tsuprimir mais saídas\n" +" \\e\tcarácter de escape\n" +" \\E\tcarácter de escape\n" +" \\f\tform feed\n" +" \\n\tnova linha (LF)\n" +" \\r\tcarriage return (CR)\n" +" \\t\ttabulação horizontal\n" +" \\v\ttabulação vertical\n" +" \\\\\tbarra esquerda (\"\\\")\n" +" \\0nnn\to carácter cujo código ASCII é NNN (octal). NNN pode ter\n" +" \t\tde 0 a 3 dígitos octais\n" +" \\xHH\to carácter de 8-bit cujo valor é HH (hexadecimal). HH\n" +" \t\tpode ter um ou dois dígitos hexadecimais\n" +" \\uHHHH\to carácter Unicode cujo valor é o valor hexadecimal HHHH.\n" +" \t\tHHHH pode ser de um a quatro dígitos hexadecimais.\n" +" \\UHHHHHHHH o carácter Unicode cujo valor é o valor hexadecimal\n" +" \t\tHHHHHHHH. HHHHHHHH pode ser de um a oito dígitos hexadecimais.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que ocorra um erro de escrita." + +#: builtins.c:597 +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 "" +"Escreve argumentos para a saída padrão.\n" +" \n" +" Mostrar ARGs na saída padrão seguidos de nova linha (LF).\n" +" \n" +" Opções:\n" +" -n\tnão acrescentar nova linha\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que ocorra um erro de escrita." + +#: builtins.c:612 +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 "" +"Activar e desactivar internos da consola.\n" +" \n" +" Activa e desactiva comandos internos da consola. Desativar permite\n" +" executar um comando de disco com o mesmo nome que comando interno\n" +" sem ter de usar um caminho completo.\n" +" \n" +" Opções:\n" +" -a\timprimir lista de internos mostrando se estão ou não activos\n" +" -n\tdesactivar cada NOME ou mostrar uma lista de internos " +"desactivados\n" +" -p\timprimir a lista de internos em formato reutilizável\n" +" -s\timprimir só os nomes de internos \"especiais\" Posix\n" +" \n" +" Opções que controlam o carregamento dinâmico:\n" +" -f\tCarregar interno NOME de objecto partilhado NOMEFICH\n" +" -d\tRemover um interno carregado com -f\n" +" \n" +" Sem opções, cada NOME é activado.\n" +" \n" +" Para usar o \"test\" encontado em $PATH em vez do interno da consola\n" +" insira \"enable -n test\".\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que NOME não seja um interno da consola ou " +"ocorra um erro." + +#: builtins.c:640 +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 "" +"Executa argumentos como comando da consola.\n" +" \n" +" Combina ARGs numa única cadeia, usa o resultado como entrada da " +"consola,\n" +" e executa os comandos resultantes.\n" +" \n" +" Estado de saída:\n" +" Devolve estado de saída do comando ou sucesso se o comando for nulo." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Analisa argumentos da opção.\n" +" \n" +" Getopts é usado pelos procedimentos da consola para analisar parâmetros " +"posicionais\n" +" como opções.\n" +" \n" +" CADEIAOPÇÕES contém as letras de opção a reconhecer; se uma letra\n" +" for seguida de \":\", espera-se que a opção tenha um argumento,\n" +" separado da opção por um espaço.\n" +" \n" +" Sempre que é chamado, getopts coloca a opção seguinte na variável\n" +" da consola $name, inicializa name se não existir e o índice do\n" +" argumento seguinte a processar na variável da consola OPTIND.\n" +" OPTIND é inicializado em 1 sempre que a consola ou um script da\n" +" consola é chamado. Quando uma opção requer um argumento, o\n" +" getopts coloca esse argumento na variável da consola OPTARG.\n" +" \n" +" O getopts reporta erros de duas formas. Se o primeiro carácter\n" +" de OPTCADEIA é \":\", o getopts usa um relatório de erro\n" +" silencioso. Neste modo não verá mensagens de erro. Se for vista uma\n" +" opção inválida, o getopts põe o carácter de opção em OPTARG.\n" +" Se não houver um argumento requerido, o getopts põe um \":\" no NOME e\n" +" define OPTARG como o carácter de opção encontrado. Se o getopts não\n" +" estiver em modo silêncio e for vista uma opção inválida, o getopts\n" +" põe \"?\" no NOME e limpa OPTARG. Se não houver um argumento " +"requerido,\n" +" é posto \"?\" no NOME, OPTARG é limpo e é imprimida uma mensagem de\n" +" diagnóstico.\n" +" \n" +" Se a variável da consola OPTERR tiver valor 0, o getopts desactiva a\n" +" impressão de mensagens de erro, mesmo que o 1º carácter de\n" +" CADEIAOPÇÕES não seja \":\". OPTERR tem o valor 1 predefinido.\n" +" \n" +" O getopts normalmente analisa os parâmetros posicionais, mas se\n" +" os argumentosforem dados como valores ARG, são eles que são " +"analisados.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se encontrar uma opção; falha se o fim da opção for\n" +" encontrado ou se ocorrer um erro." + +#: builtins.c:694 +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Substitui a consola com o comando indicado.\n" +" \n" +" Executar COMANDO, substituindo esta consola pelo programa " +"especificado.\n" +" ARGUMENTOS tornam-se os argumentos de COMANDO. Se COMANDO não for " +"especificado,\n" +" quaisquer redireccionamentos têm efeito na consola actual.\n" +" \n" +" Opções:\n" +" -a nome\tpassa NOME como argumento 0 a COMANDO\n" +" -c\texecuta COMANDO com um ambiente vazio\n" +" -l\tpõe uma barra no argumento 0 de COMANDO\n" +" \n" +" Se o comando não puder ser executado, uma consola não interactiva sai, " +"a não ser que\n" +" a opção de consola \"execfail\" esteja definida.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que COMANDO não seja encontrado ou ocorra um " +"erro de redireccionamento." + +#: builtins.c:715 +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 "" +"Sai da consola.\n" +" \n" +" Sai da consola com estado N. Se N for omitido, o estado de saída\n" +" é o do último comando executado." + +#: builtins.c:724 +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 "" +"Sai de uma consola com sessão.\n" +" \n" +" Sai de uma consola com sessão com estado de saída N. Devolve um erro " +"se não for\n" +" executado numa consola com sessão." + +#: builtins.c:734 +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 "" +"Mostra ou executa comandos da lista do histórico.\n" +" \n" +" fc é usado para listar ou editar e re-executar comandos da lsiat do " +"histórico.\n" +" PRIMEIRO e ÚLTIMO podem ser números especificando o intervalo, ou " +"PRIMEIRO pode ser\n" +" cadeia, que significa o comando mais recente começado por essa\n" +" cadeia.\n" +" \n" +" Opções:\n" +" -e NOMEED\tseleciona o editor a usar. A predefinição é FCEDIT, " +"depois EDITOR,\n" +" \t\tdepois vi\n" +" -l \tlistar linhas em vez de editar\n" +" -n\tomitir nºs de linha ao ouvir\n" +" -r\treverter a ordem das linhas (mais recentes primeiro)\n" +" \n" +" Com o formato \"fc -s [pat=rep ...] [comando]\", COMANDO é\n" +" re-executado após a substituição VELHO=NOVO ser realizada.\n" +" \n" +" Um aliás útil a usar aqui é r=\"fc -s\", para que inserir \"r cc\"\n" +" executa o último comando começado por \"cc\" e inserir \"r\" re-" +"executa\n" +" o último comando.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso ou estado do comando executado; não-zero se ocorrer um " +"erro." + +#: builtins.c:764 +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 a tarefa para 1º plano.\n" +" \n" +" Coloca a tarefa identificada com JOB_SPEC em 1º plano, tornando-a a\n" +" tarefa actual. Se JOB_SPEC não existir, é usada a noção da consola de\n" +" tarefa actual.\n" +" \n" +" Estado de saída:\n" +" Estado do comando colocado em 1º plano ou falha se ocorrer um erro." + +#: builtins.c:779 +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 a tarefa para 2º plano.\n" +" \n" +" Coloca a tarefa identificada com cada JOB_SPEC em 2º plano, como se " +"tivessem\n" +" sido iniciados com \"&\". Se JOB_SPEC não existir, é usada a noção da " +"consola de\n" +" tarefa actual.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que o controlo de tarefas esteja inactivo ou " +"ocorra um erro." + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Recorda ou mostra localizações de programas.\n" +" \n" +" Determina e recorda o caminho completo de cada comando NOME. Se\n" +" não tiver argumentos, é mostrada informação sobre comando recordados.\n" +" \n" +" Opções:\n" +" -d\tesquecer a localização recordada de cada NOME\n" +" -l\tmostrar num formato que possa ser usado como entrada\n" +" -p caminho\tuse CAMINHO como caminho completo para NOME\n" +" -r\tesquecer todas as localizações recordadas\n" +" -t\timprimir a localização recordada de cada NOME, precedendo-a\n" +" \t\tdo correspondente NOME se forem\n" +" \t\tindicados múltiplos NOMEs\n" +" Argumentos:\n" +" NOME\tCada NOME é procurado no $PATH e adicionado à lista\n" +" \t\tde comandos lembrados.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que NOME não seja encontrado ou indique uma " +"opção inválida." + +#: builtins.c:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Mostra informação sobre comandos internos.\n" +" \n" +" Mostra breves resumos de comandos internos. Se PADRÃO for\n" +" especificado, dá ajuda detalhada em todos os comandos que cumpram " +"PADRÃO,\n" +" senão imprime a lista de tópicos de ajuda.\n" +" \n" +" Opções:\n" +" -d\tmostra uma descrição breve de cada tópico\n" +" -m\tmostra uso em formato pseudo-manpage\n" +" -s\tmostra só uma sinopse curta para cada tópico que cumpre\n" +" \t\tPADRÃO\n" +" \n" +" Argumentos:\n" +" PADRÃO\tPadrão que especifica um tópico de ajuda\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que PADRÃO não seja encontrado ou indique uma " +"opção inválida." + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 "" +"Mostra ou manipula a lista do histórico.\n" +" \n" +" Mostra a lista do histórico com nºs de linha, prefixando cada entrada\n" +" modificada com um \"*\". Um argumento de N lista só as últimas N " +"entradas.\n" +" \n" +" Opções:\n" +" -c\tlimpa a lista eliminado todas as entradas\n" +" -d desvio\telimina a entrada do histórico na posição DESVIO.\n" +" \t\tDesvios negativos contam-se do final da lista do histórico\n" +" \n" +" -a\tacrescenta linhas de histórico desta sessão ao ficheiro de " +"histórico\n" +" -n\tlê todas as linhas de histórico ainda não lidas do ficheiro de " +"histórico\n" +" \t\te acrescenta-as à lista de histórico\n" +" -r\tlê o ficheiro de histórico e acrescenta o conteúdo à lista de\n" +" \t\thistórico\n" +" -w\tescreve o histórico actual no ficheiro de histórico\n" +" \n" +" -p\trealiza expansão do histórico em cada ARG e mostra o resultado\n" +" \t\tsem gravar na lista de histórico\n" +" -s\tacrescenta ARGs à lista de histórico como entrada única\n" +" \n" +" Se NOMEFICH for dado, é usado como ficheiro de histórico. Senão,\n" +" se FICHHIST tiver um valor, será usado, caso contrário ~/." +"bash_history.\n" +" \n" +" Se a variável HISTTIMEFORMAT estiver definida e não for nula, o valor é " +"usado\n" +" como cadeia de formato para strftime(3) para imprimir o carimbo " +"associado\n" +" a cada entrada de histórico mostrada. Senão, não são imprimidos " +"quaisquer carimbos.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro." + +#: builtins.c:879 +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\tlists only processes that have changed status since the last\n" +" \t\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 "" +"Mostra o estado das tarefas.\n" +" \n" +" Lista as tarefas activas. JOBSPEC rea cadeiae a saída a essa tarefa.\n" +" Sem opções, é mostrado o estado de todas as tarefas activas.\n" +" \n" +" Opções:\n" +" -l\tlista IDs de processo além da informação normal\n" +" -n\tlista só processos com estado alterado desde a última\n" +" \t\tnotificação\n" +" -p\tlista só IDs de processo\n" +" -r\trea cadeiae saída a tarefas em execução\n" +" -s\trea cadeiae saída a tarefas paradas\n" +" \n" +" Se -x for usado, COMANDO é executado após todas as especificações de " +"tarefas\n" +" que aparecem em ARGS terem sido substituídas pela ID de processo do " +"líder de\n" +" grupo do processo dessat tarefa.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro.\n" +" Se -x for usado, devolve o estado de saída de COMANDO." + +#: builtins.c:906 +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" +" \t\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 tarefas da consola actual.\n" +" \n" +" Remove cada argumento JOBSPEC da tabela de tarefas activas. Sem\n" +" JOBSPECs, a consola usa a sua noção de tarefa actual.\n" +" \n" +" Opções:\n" +" -a\tremove todas as tarefas se JOBSPEC não for indicado\n" +" -h\tmarcar cada JOBSPEC para que SIGHUP não seja enviado para a " +"tarefa\n" +" \t\tse a consola receber um SIGHUP\n" +" -r\tremove só tarefas em execução\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que uma opção inválida ou JOBSPEC seja " +"indicada." + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"Envia um sinal a uma tarefa.\n" +" \n" +" Envia aos processos identificados por PID ou JOBSPEC o sinal chamado\n" +" SIGSPEC ou SIGNUM. Se nem SIGSPEC nem SIGNUM estiverem presentes,\n" +" SIGTERM é presumido.\n" +" \n" +" Opções:\n" +" -s sig\tSIG é um nome de sinal\n" +" -n sig\tSIG é um número de sinal\n" +" -l\tlista nomes de sinais; se se seguirem argumentos, são\n" +" \t\tassumidos como nºs de sinal para listar os nomes\n" +" -L\tsinónimo de -l\n" +" \n" +" Mata um interno da consola por dois motivos: permite usar as IDs de " +"tarefa\n" +" em vez de IDs de processo e permite matar processos se o limite de\n" +" processos que pode criar for atingido.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro." + +#: builtins.c:949 +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 "" +"Avalia as expressões aritméticas.\n" +" \n" +" Avalia cada ARG como uma expressão aritmética. A avaliação é feita em\n" +" inteiros de largura fixa sem verificação de transporte, embora a " +"divisão\n" +" por 0 seja sinalizada como erro. A seguinte lista de operadores é " +"agrupada\n" +" em níveis de igual prioridade. Os níveis estão listados\n" +" por ordem de precedência decrescente.\n" +" \n" +" \tid++, id--\tvariável pós-incremento, pós-decremento\n" +" \t++id, --id\tvariável pré-incremento, pré-decremento\n" +" \t-, +\t\tmenos, mais unário\n" +" \t!, ~\t\tnegação lógica e bitwise\n" +" \t**\t\texponenciação\n" +" \t*, /, %\t\tmultiplicação, divisão, resto\n" +" \t+, -\t\tadição, subtracção\n" +" \t<<, >>\t\tdeslocação esquerda e direita bitwise\n" +" \t<=, >=, <, >\tcomparação\n" +" \t==, !=\t\tigualdade, não igualdade\n" +" \t&\t\tE bitwise\n" +" \t^\t\tOUEX bitwise\n" +" \t|\t\tOU bitwise\n" +" \t&&\t\tE lógico\n" +" \t||\t\tOU lógico\n" +" \texpr ? expr : expr\n" +" \t\t\toperador condicional\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tatribuição\n" +" \n" +" As variáveis de consola são permitidas como operandos. O nome da " +"variável\n" +" é substituído pelo seu valor (convertido em inteiro de largura fixa) " +"dentro\n" +" de uma expressão. A variável não tem de ter o seu atributo inteiro\n" +" activado para ser usado numa expressão.\n" +" \n" +" Os operadores são avaliados por ordem de precedência. Sub-expressões\n" +" entre parênteses são avaliadas primeiro e ignoram as regras de\n" +" precedência acima.\n" +" \n" +" Estado de saída:\n" +" Se o último ARG for avaliado como 0, let devolve 1; senão let devolve 0." + +#: builtins.c:994 +#, 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. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Lê uma linha da entrada padrão e divide-a em campos.\n" +" \n" +" Lê uma linha da entrada padrão ou do descritor de ficheiro FD\n" +" se a opção -u for usada. A linha é dividida em campos como na divisão\n" +" de palavras e a primeira palavra é atribuída ao primeiro NOME, a " +"segunda\n" +" ao segundo NOME, e assim por diante, com quaisquer palavras que " +"sobrem \n" +" atribuídas ao último NOME. Só caracteres encontrados em $IFS são " +"reconhecidos\n" +" como delimitadores de palavras.\n" +" \n" +" Se não indicar NOMEs, a linha é armazenada na variável RESPONDER.\n" +" \n" +" Opções:\n" +" -a matriz\tatribui as palavras lidas a índices sequenciais da " +"MATRIZ\n" +" \t\tcomeçando em zero\n" +" -d delim\tcontinua até que o primeiro carácter de DELIM seja lido, " +"em vez de\n" +" \t\tnewline\n" +" -e\tusa Readline para obter a linha numa consola interactiva\n" +" -i texto\tusa TEXTO como texto inicial para Readline\n" +" -n ncars\tvolta após ler NCARS caracteres em vez de esperar\n" +" \t\tpor newline, mas respeita um delimitador se estiver\n" +" \t\tantes de NCARS caracteres\n" +" -N ncars\tvolta após ler exactamente NCARS caracteres, a não ser " +"que\n" +" \t\tEOF seja encontrado ou a leitura esteja inactiva, ignorando\n" +" \t\tqualquer delimitador\n" +" -p prompt\timprime PROMPT na saída sem newline final antes de\n" +" \t\ttentar ler\n" +" -r\tnão permite que barras esquerdas escapem qualquer carácter\n" +" -s\tnão ecoa entradas vindas de um terminal\n" +" -t inacção\tesgota o tempo e devolve falha se uma linha completa\n" +" \t\tde entrada não for lida em INACÇÃO segundos. O valor da\n" +" \t\tvariável TMOUT é o predefinido de inacção. INACÇÃO pode ser\n" +" \t\tuma fracção. Se INACÇÃO for 0, read volta\n" +" \t\timediatamente, sem tentar ler quaisquer dados, devolvendo\n" +" \t\tsucesso só se a entrada estiver disponível no descritor de\n" +" \t\tficheiro especificado. O estado de saída é maior que 128\n" +" \t\tse a inacção for excedida\n" +" -u fd\tlê do descritor de ficheiro FD em vez da entrada padrão\n" +" \n" +" Estado de saída:\n" +" O código devolvido é zero, a não ser que end-of-file seja encontrado, " +"haja\n" +" inacção (caso em que é maior que 128), ocorra um erro de atribuição de " +"variável,\n" +" ou seja indicado um descritor de ficheiro inválido como argumento de -u." + +#: builtins.c:1042 +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 "" +"Volta de uma função de consola.\n" +" \n" +" Força a saída de uma função ou script baseado com o valor especificado\n" +" por N. Se N for omitido, o estado de saída é o do último comando\n" +" executado dentro da função ou script.\n" +" \n" +" Estado de saída:\n" +" Devolve N, ou falha se a consola não estiver a executar uma função ou " +"script." + +#: builtins.c:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"Define ou limpa valores de opções ou parâmetros posicionais da consola.\n" +" \n" +" Altera o valor de atributos ou parâmetros posicionais da consola, ou\n" +" mostra os nomes e valores de variáveis da consola.\n" +" \n" +" Opções:\n" +" -a Marca variáveis modificadas ou criadas para exportação.\n" +" -b Notifica o fim da tarefa imediatamente.\n" +" -e Sai imediatamente se um comando sair com estado diferente de " +"zero.\n" +" -f Desactiva geração de nome de ficheiro (globbing).\n" +" -h Recordar localização de comandos à medida que são procurados.\n" +" -k Todos os argumentos de atribuição são colocados no ambiente para " +"um\n" +" comando, não só os que precedem o nome do comando.\n" +" -m Activa o controlo de tarefas.\n" +" -n Lê comandos, mas não os executa.\n" +" -option-name\n" +" Define a variável correspondente a option-name:\n" +" allexport igual a -a\n" +" braceexpand igual a -B\n" +" emacs usa estilo emacs de edição de linhas\n" +" errexit igual a -e\n" +" errtrace igual a -E\n" +" functrace igual a -T\n" +" hashall igual a -h\n" +" histexpand igual a -H\n" +" history activa histórico de comandos\n" +" ignoreeof a consola não sai após ler EOF\n" +" interactive-comments\n" +" permite que comentários apareçam em " +"comandos interactivos\n" +" keyword igual a -k\n" +" monitor igual a -m\n" +" noclobber igual a -C\n" +" noexec igual a -n\n" +" noglob igual a -f\n" +" nolog actualmente aceite mas ignorado\n" +" notify igual a -b\n" +" nounset igual a -u\n" +" onecmd igual a -t\n" +" physical igual a -P\n" +" pipefail o valor devolvido de um pipeline é o estado " +"do\n" +" último comando a sair com estado não-" +"zero,\n" +" ou zero se nenhum saiu com estado não-" +"zero\n" +" posix altera o comportamento do bash onde a " +"operação\n" +" predefinida diferir da norma Posix para " +"cumprir\n" +" a norma\n" +" privileged igual a -p\n" +" verbose igual a -v\n" +" vi usa estilo vi de edição de linhas\n" +" xtrace igual a -x\n" +" -p Activado sempre que as ID de utilizador reais e efectivas não\n" +" coincidam. Desactiva o processamento do ficheiro $ ENV e a \n" +" importação de funções da consola. Desligar esta opção faz com\n" +" que os uid e gid efectivos sejam definidos para os uid e gid " +"reais.\n" +" -t Sair depois de ler e executar um comando.\n" +" -u Trata as variáveis ​​não definidas como erro ao substituir.\n" +" -v Imprime as linhas de entrada da consola à medida que são lidas.\n" +" -x Imprime comandos e seus argumentos à medida que são executados.\n" +" -B a consola realizará expansão de suporte\n" +" -C Se definido, não permitir que ficheiros normais existentes " +"sejam\n" +" sobrescritos pelo redireccionamento da saída.\n" +" -E se definido, ERR é herdada pelas funções de consola.\n" +" -H Activa estilo ! de substituição do histórico. Esta bandeira\n" +" está activada por predefinição, em consolas interativas.\n" +" -P Se definido, não resolve ligações simbólicas ao executar\n" +" comandos como \"cd\" que altera a pasta actual.\n" +" -T Se definido, DEBUG e RETURN são herdadas por funções de " +"consola.\n" +" -- Atribui quaisquer outros argumentos aos parâmetros posicionais.\n" +" Se não houver mais argumentos, os parâmetros posicionais\n" +" são limpos.\n" +" - Atribui quaisquer outros argumentos aos parâmetros " +"posicionais.\n" +" As opções -x e -v são desactivadas.\n" +" \n" +" Usar + em vez de - faz com que as bandeiras sejam desactivadas. As\n" +" bandeiras também podem ser usadas por chamada da consola. O actual\n" +" conjunto de bandeiras pode ser encontrado em $-. Os n restantes ARGs\n" +" são parâmetros posicionais e são atribuídos, em ordem, a $1, $2 .. $n.\n" +" Se não houver ARGs, todas as variáveis de consola são imprimidas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida." + +#: builtins.c:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Limpa valores e atributos de variáveis e funções da consola.\n" +" \n" +" Para cada NOME, remove a correspondente variável ou função.\n" +" \n" +" Opções:\n" +" -f\ttrata cada NOME como função de consola\n" +" -v\ttrata cada NOME como variável de consola\n" +" -n\ttrata cada NOME como referência de nome e limpa a própria\n" +" \t\tvariável em vez da variável que referencia\n" +" \n" +" Sem opções, unset primeiro tenta limpar uma variável e, se falhar,\n" +" tenta limpar uma função.\n" +" \n" +" Algumas variáveis não podem ser limpas; veja também \"readonly\".\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME seja " +"só de leitura." + +#: builtins.c:1162 +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 "" +"Define o atributo de exportação em variáveis de consola.\n" +" \n" +" Marca cada NOME para exportação automática para o ambiente de futuros\n" +" comandos executados. Se VALOR for fornecido, atribui VALOR antes de " +"exportar.\n" +" \n" +" Opções:\n" +" -f\trefere funções de consola\n" +" -n\tremove a propriedade de exportação de cada NOME\n" +" -p\tmostra uma lista de todas as funções e variáveis exportadas\n" +" \n" +" Um argumento \"--\" desactiva futuro processamento da opção.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME seja " +"inválido." + +#: builtins.c:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 as variáveis de consola como imutáveis.\n" +" \n" +" Marca cada NOME como só de leitura; os valores destes NOMEs não podem\n" +" ser alterados por subsequentes atribuições. Se VALOR for fornecido,\n" +" atribui VALOR antes de marcar como só de leitura.\n" +" \n" +" Opções:\n" +" -a\trefere a variáveis de matriz indexadas\n" +" -A\trefere a variáveis de matriz associativas\n" +" -f\trefere a funções de consola\n" +" -p\tmostra uma lista de todas as variáveis ou funções só de " +"leitura,\n" +" \t\tdependendo ou não se a opção -f é indicada\n" +" \n" +" Um argumento \"--\" desactiva futuro processamento da opção.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME seja " +"inválido." + +#: builtins.c:1203 +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 "" +"Deslocar parâmetros posicionais.\n" +" \n" +" Renomear os parâmetros posicionais $N+1,$N+2 ... para $1,$2 ... Se N\n" +" for omitido, presume-se como 1.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que N seja negativo ou maior que $#." + +#: builtins.c:1215 builtins.c:1230 +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 "" +"Executa comandos de um ficheiro na consola actual.\n" +" \n" +" Lê e execute comandos do NOMEFICH na consola actual. As\n" +" entradas em $PATH são usadas para encontrar a pasta contendo NOMEFICH.\n" +" Se nenhum ARGUMENTO for fornecido,tornam-se parâmetros posicionais\n" +" quando NOMEFICH é executado.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado em NOMEFICH; falha se\n" +" NOMEFICH não pode ser lido." + +#: builtins.c:1246 +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 a execução da consola.\n" +" \n" +" Suspende a execução desta consola até receber um sinal SIGCONT.\n" +" Se não forem forçadas, as consolas com sessão não podem ser suspensas.\n" +" \n" +" Opções:\n" +" -f\tforçar a suspensão, mesmo que seja uma consola com sessão\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que o controlo de tarefa esteja inactivo ou " +"ocorra um erro." + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Avalia a expressão condicional.\n" +" \n" +" Sai com estado 0 (verdadeiro) ou 1 (falso) dependendo da\n" +" avaliação de EXPR. As expressões podem ser unárias ou binárias. " +"Expressões\n" +" uinárias são frequentemente usadas para examinar o estado de um " +"ficheiro. Há\n" +" também operadores de cadeias e operadores de comparação numérica.\n" +" \n" +" O comportamento do teste depende do número de argumentos. Leia a\n" +" página do manual do bash para a especificação completa.\n" +" \n" +" Operadores de ficheiros:\n" +" \n" +" -a FICHEIRO Verdadeiro se o ficheiro existir.\n" +" -b FICHEIRO Verdadeiro se o ficheiro for bloqueio especial.\n" +" -c FICHEIRO Verdadeiro se o ficheiro for especial de " +"caracteres.\n" +" -d FICHEIRO Verdadeiro se o ficheiro for uma pasta.\n" +" -e FICHEIRO Verdadeiro se o ficheiro existir.\n" +" -f FICHEIRO Verdadeiro se o ficheiro existe e é um ficheiro " +"normal.\n" +" -g FICHEIRO Verdadeiro se o ficheiro for set-group-id.\n" +" -h FICHEIRO Verdadeiro se o ficheiro for uma ligação simbólica.\n" +" -L FICHEIRO Verdadeiro se o ficheiro for uma ligação simbólica.\n" +" -k FICHEIRO Verdadeiro se o ficheiro tiver o bit \"sticky\" " +"definido.\n" +" -p FICHEIRO Verdadeiro se o ficheiro for um pipe com nome.\n" +" -r FICHEIRO Verdadeiro se o ficheiro for legível.\n" +" -s FICHEIRO Verdadeiro se o ficheiro existe e não está vazio.\n" +" -S FICHEIRO Verdadeiro se o ficheiro for um socket.\n" +" -t FD Verdadeiro se FD for aberto num terminal.\n" +" -u FICHEIRO Verdadeiro se o ficheiro for set-user-id.\n" +" -w FICHEIRO Verdadeiro se o ficheiro for gravável por si.\n" +" -x FICHEIRO Verdadeiro se o ficheiro for executável por si.\n" +" -O FICHEIRO Verdadeiro se o ficheiro for efectivamente sua " +"propriedade.\n" +" -G FICHEIRO Verdadeiro se o ficheiro for efectivamente " +"propriedade do seu grupo.\n" +" -N FICHEIRO Verdadeiro se o ficheiro foi modificado desde a " +"última vez que foi lido.\n" +" \n" +" FICHEIRO1 -nt FICHEIRO2 Verdadeiro se o ficheiro1 for mais novo " +"que\n" +" o ficheiro2 (de acordo com a data " +"de modificação).\n" +" \n" +" FICHEIRO1 -ot FICHEIRO2 Verdadeiro se ficheiro1 for mais antigo que " +"o ficheiro2.\n" +" \n" +" FICHEIRO1 -ef FICHEIRO2 Verdadeiro se ficheiro1 for uma ligação " +"rígida a file2.\n" +" \n" +" Operadores de cadeias:\n" +" \n" +" -z CADEIA Verdadeiro se a cadeia estiver vazia.\n" +" \n" +" -n CADEIA\n" +" CADEIA Verdadeiro se a cadeia não estiver vazia.\n" +" \n" +" CADEIA1 = CADEIA2\n" +" Verdadeiro se as cadeias são iguais.\n" +" CADEIA1 != CADEIA2\n" +" Verdadeiro se as cadeias não são iguais.\n" +" CADEIA1 < CADEIA2\n" +" Verdadeiro se CADEIA1 ficar antes de CADEIA2 " +"lexicamente.\n" +" CADEIA1 > CADEIA2\n" +" Verdadeiro se CADEIA1 ficar após CADEIA2 " +"lexicamente.\n" +" \n" +" Outros operadores:\n" +" \n" +" -o OPÇÃO Verdadeiro se a opção de consola OPÇÃO está " +"activada.\n" +" -v VAR Verdadeiro se a variável de consola VAR estiver " +"definida.\n" +" -R VAR Verdadeiro se a variável de consola VAR estiver " +"definida e for um nome\n" +" referência.\n" +" ! EXPR Verdadeiro se EXPR for falso.\n" +" EXPR1 -a EXPR2 Verdadeiro se EXPR1 e EXPR2 forem verdadeiros.\n" +" EXPR1 -o EXPR2 Verdadeiro se EXPR1 OU EXPR2 forem verdadeiros.\n" +" \n" +" arg1 OP arg2 Testes aritméticos. OP é um de -eq, -ne,\n" +" -lt, -le, -gt, ou -ge.\n" +" \n" +" Operadores binários aritméticos devolvem verdadeiro se ARG1 for igual, " +"não\n" +" igual, menor que, menor ou igual que, maior que ou maior ou igual que\n" +" ARG2.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se EXPR for avaliada como verdadeiro; falha se EXPR " +"for\n" +" avaliado como falso ou for indicado um argumento inválido." + +#: builtins.c:1344 +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 "" +"Avalia uma expressão condicional.\n" +" \n" +" Este é um sinónimo para o interno \"test\", mas o último argumento tem\n" +" de ser um \"]\" literal, para fechar o \"[\" aberto." + +#: builtins.c:1353 +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 "" +"Mostrar tempos de processo.\n" +" \n" +" Imprime os tempos acumulados de utilizador e sistema para a consola e " +"todos\n" +" os seus processos-filho.\n" +" \n" +" Estado de saída:\n" +" Sempre com sucesso." + +#: builtins.c:1365 +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. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\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 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 "" +"Capturar sinais e outros eventos.\n" +" \n" +" Define e activa gestores a executar quando a consola recebe sinais ou\n" +" outras condições.\n" +" \n" +" ARG é um comando a ser lido e executado quando a consola recebe o(s)\n" +" sinal(is) SIGNAL_SPEC. Se ARG estiver ausente (e um único SIGNAL_SPEC\n" +" for fornecido) ou \"-\", cada sinal especificado é reposto no seu " +"valor\n" +" original. Se ARG for a cadeia nula, cada SIGNAL_SPEC será ignorado\n" +" pela consola e pelos comandos que chama.\n" +" \n" +" Se um SIGNAL_SPEC for EXIT (0) ARG é executado na saída da consola. Se\n" +" SIGNAL_SPEC é DEBUG, ARG é executado antes de cada comando simples. Se\n" +" SIGNAL_SPEC é RETURN, ARG é executado cada vez que uma função de " +"consola\n" +" ou um script executado pelo . ou os internos terminam a execução. " +"SIGNAL_SPEC\n" +" de ERR significa executar ARG cada vez que uma falha do comando faça " +"com\n" +" que a consola sair quando a opção -e está activa.\n" +" \n" +" Se nenhum argumento for fornecido, trap imprime a lista de comandos \n" +" associados a cada sinal.\n" +" \n" +" Opções:\n" +" -l imprime uma lista de nomes de sinais e seus números " +"correspondentes\n" +" -p mostra os comandos trap associados a cada SIGNAL_SPEC\n" +" \n" +" Cada SIGNAL_SPEC é um nome de sinal em ou um número de " +"sinal.\n" +" Os nomes dos sinais são insensíveis a maiúsculas e o prefixo SIG é " +"opcional.\n" +" Um sinal pode ser enviado para a consola com \"kill -signal $$\".\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que SIGSPEC seja inválido ou indique uma " +"opção inválida." + +#: builtins.c:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 "" +"Mostra informações sobre o tipo de comando.\n" +" \n" +" Para cada NOME, indica como seria interpretado se usado como um\n" +" nome de comando.\n" +" \n" +" Opções:\n" +" -a\tmostra todos os locais contendo um executável chamado NOME;\n" +" \t\tinclui aliás, internos e funções, se e só se a opção \"-p\"\n" +" \t\ttambém não for usada\n" +" -f\tsuprime a procura da função de consola\n" +" -P\tforça uma procura em PATH para cada NOME, mesmo que seja um\n" +" \t\taliás, interno ou função e devolve o nome do ficheiro em disco\n" +" \t\tque seria executado\n" +" -p\tdevolve o nome do ficheiro em disco que seria executado,\n" +" \t\tou nada se \"type -t NOME\" não devolver \"file\"\n" +" -t\tdevolve uma só palavra de entre \"alias\", \"keyword\", " +"\"function\"\n" +" \t\t\"builtin\", \"file\" ou \"\", se NOME for um aliás, palavra " +"reservada\n" +" \t\tda consola, função de consola, interno da consola, ficheiro em\n" +" \t\tdisco, ou não encontrados, respectivamente\n" +" \n" +" Argumentos:\n" +" Nome do comando NOME a interpretar.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se todos os NOMEs forem encontrados; falha se algum não " +"for." + +#: builtins.c:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 os limites de recursos da consola.\n" +" \n" +" Fornece controlo sobre os recursos disponíveis para consola e " +"processos\n" +" que cria, em sistemas que permitem esse controlo.\n" +" \n" +" Opções:\n" +" -S\tusa o limite de recursos \"soft\"\n" +" -H\tusa o limite de recursos \"hard\"\n" +" -a\ttodos os limites actuais são relatados\n" +" -b\to tamanho do buffer de socket\n" +" -c\to tamanho máximo dos ficheiros núcleo criados\n" +" -d\to tamanho máximo do segmento de dados de um processo\n" +" -e\ta prioridade máxima de agendamento (\"nice\")\n" +" -f\to tamanho máximo dos ficheiros escritos pela consola e seus " +"filhos\n" +" -i\to número máximo de sinais pendentes\n" +" -k\to número máximo de kqueues alocados para este processo\n" +" -l\to tamanho máximo que um processo pode bloquear na memória\n" +" -m\to tamanho máximo do conjunto residente\n" +" -n\to número máximo de descritores de ficheiros abertos\n" +" -p\to tamanho do buffer do pipe\n" +" -q\to número máximo de bytes nas filas de mensagens POSIX\n" +" -r\ta prioridade máxima de agendamento em tempo real\n" +" -s\to tamanho máximo da pilha\n" +" -t\ta quantidade máxima de tempo de CPU em segundos\n" +" -u\to número máximo de processos do utilizador\n" +" -v\to tamanho da memória virtual\n" +" -x\to número máximo de bloqueios de ficheiros\n" +" -P\to número máximo de pseudo-terminais\n" +" -R\to tempo máximo que um processo em tempo real pode executar antes " +"de bloquear\n" +" -T\to número máximo de threads\n" +" \n" +" Nem todas as opções estão disponíveis em todas as plataformas.\n" +" \n" +" Se LIMIT for indicada, é o novo valor do recurso especificado; Os\n" +" valores LIMIT especiais \"soft\", \"hard\" e \"unlimited\" representam\n" +" o limite flexível actual, o limite rígido actual e nenhum limite, " +"respectivamente.\n" +" Caso contrário, é imprimido o valor actual do recurso especificado. Se\n" +" nenhuma opção for indicada, então -f é assumido.\n" +" \n" +" Os valores estão em incrementos de 1024 bytes, exceto para -t, que é em " +"segundos,\n" +" -p, que é em incrementos de 512 bytes e -u, que é um número de " +"processos\n" +" sem escala.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que seja indicada uma opção inválida ou " +"ocorra um erro." + +#: builtins.c:1483 +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 "" +"Mostrar ou definir a máscara do modo de ficheiro.\n" +" \n" +" Define a máscara do utilizador de criação de ficheiro para MODO. Se " +"MODO\n" +" for omitido, imprime o valor actual da máscara.\n" +" \n" +" Se MODO começa com um dígito, é interpretado como um número octal;\n" +" caso contrário, é uma cadeia de modo simbólico como a aceite por " +"chmod(1).\n" +" \n" +" Opções:\n" +" -p\tse MODO for omitido, saída de forma a que possa ser reutilizado " +"como entrada\n" +" -S\ttorna a saída simbólica; caso contrário, a saída é um número " +"octal\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que MODO seja inválido ou indique uma opção " +"inválida." + +#: builtins.c:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Aguarda a conclusão da tarefa e devolve o estado de saída.\n" +" \n" +" Espera por cada processo identificado por uma ID, que pode ser uma ID " +"de\n" +" processo ou uma especificação de tarefa e relata o estado final. Se " +"não\n" +" for dada uma ID, aguarda por todos os processos-filho actualmente " +"activos e o\n" +" estado de saída é zero. Se ID for uma especificação de tarefa, espera " +"por\n" +" todos os processos no pipeline da tarefa.\n" +" \n" +" Se a opção -n for fornecida, espera por uma tarefa única da lista de " +"IDs ou\n" +" se não indicar IDs, pela conclusão da tarefa seguinte devolve\n" +" o seu estado de saída.\n" +" \n" +" Se a opção -p for indicada, o identificador de processo ou tarefa da " +"tarefa\n" +" para a qual foi devolvido o estado de saída é atribuído à variável VAR\n" +" nomeada pelo argumento da opção. A variável estará indefinida " +"inicialmente,\n" +" antes de qualquer atribuição. Útil só quando a opção -n é indicada.\n" +" \n" +" Se a opção -f for indicada e o controlo de tarefas estiver activo, " +"espera que\n" +" a ID especificada termine, em vez de esperar por uma alteração de " +"estado.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da última ID; falha se a ID for inválida ou for " +"indicada\n" +" uma opção inválida, ou se -n for indicada e a consola não tiver filhos\n" +" inesperados." + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Aguarda a conclusão do processo e devolve o estado de saída.\n" +" \n" +" Espera por cada processo especificado por uma PID e reporta o estado " +"final.\n" +" Se PID não for dada, aguarda por todos os processos-filho actualmente " +"activos,\n" +" e o estado devolvido é zero. A PID tem de ser uma ID de processo.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da última PID; falha se PID for inválido ou for " +"indicada\n" +" uma opção inválida." + +#: builtins.c:1549 +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 "" +"Executa comandos para cada membro numa lista.\n" +" \n" +" O ciclo \"for\" executa uma seqüência de comandos para cada membro " +"numa\n" +" lista de itens. Se \"in PALAVRAS ...;\" não estiver presente, \" in \"$@" +"\" \" é\n" +" assumido. Para cada elemento em PALAVRAS, NOME está definido para " +"esseelemento,\n" +" e os COMANDOS são executados.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1563 +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 "" +"Ciclo for aritmético.\n" +" \n" +" Equivalente a\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMANDOS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2 e EXP3 são expressões aritméicas. Se alguma delas for " +"omitida\n" +" comporta-se como se fosse avaliada como 1.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1581 +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 palavras de uma lista e executa comandos.\n" +" \n" +" As PALAVRAS são expandidas, gerando uma lista de palavras. O\n" +" conjunto de palavras expandidas é imprimido no erro padrão, cada\n" +" um precedido por um número. Se \"in PALAVRAS\" não estiver presente,\n" +" \" in \"$@\" \" é assumido. O prompt PS3 é então exibido e é lida uma\n" +" linha da entrada padrão. Se a linha for constituída pelo número\n" +" correspondente a uma das palavras mostradas, NOME é definido para\n" +" essa palavra. Se a linha estiver vazia, PALAVRAS e o prompt são\n" +" mostrados de novo. Se for lido EOF, o comando é concluído. Qualquer\n" +" outro valor lido faz com que NOME seja definido como nulo. A linha\n" +" lida é gravada na variável RESPOSTA. COMANDOS são executados após cada\n" +" selecção até que um comando de interrupção seja executado.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1602 +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 o tempo consumido pela execução do pipeline.\n" +" \n" +" Executa PIPELINE e imprime um resumo do tempo real, tempo de CPU do,\n" +" utilizador e tempo de CPU do sistema na execução de PIPELINE quando " +"terminar.\n" +" \n" +" Opções:\n" +" -p\timprime o resumo do tempo no formato portátil Posix\n" +" \n" +" O valor da variável FORMATOTEMPO é usado como formato de saída.\n" +" \n" +" Estado de saída:\n" +" O estado devolvido é o estado de PIPELINE." + +#: builtins.c:1619 +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 "" +"Executea comandos baseado em comparação de padrões.\n" +" \n" +" Executar selectivamente COMANDOS baseado na comparação entre PALAVRA e\n" +" PADRÃO. \"|\" é usado para separar múltiplos padrões.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1631 +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 "" +"Executa comandos com base em condicional.\n" +" \n" +" A lista \"if COMANDOS\" é executada. Se o estado de saída for zero, é\n" +" executada a lista \"then COMANDOS\". Caso contrário, cada lista \"elif " +"COMANDOS\"\n" +" é executado por sua vez e se o estado de saída for zero, a " +"correspondente\n" +" lista \"then COMANDOS\" é executada e o comando if é concluído. De " +"outra forma,\n" +" a lista \"else COMANDOS\" é executada, se presente. O estado de saída " +"da\n" +" construção inteira é o estado de saída do último comando executado, ou " +"zero\n" +" se nenhuma condição for verdadeira.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1648 +#, fuzzy +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos enquanto o teste tiver sucesso.\n" +" \n" +" Expande e executa COMANDOS enquanto o comando final no ciclo\n" +" \"while COMANDOS\" tenha um estado de saída zero.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1660 +#, fuzzy +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Executa comandos enquanto o teste não tiver sucesso.\n" +" \n" +" Expande e executa COMANDOS enquanto o comando final no ciclo\n" +" \"until COMANDOS\" tenha um estado de saída não zero.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Cria um co-processo chamado NOME.\n" +" \n" +" Executa COMANDO assincronamente, com a saída e a entrada padrão " +"ligadas\n" +" via pipe a descritores de ficheiro atribuídos a índices 0 e 1 de uma \n" +" variável de matriz NOME na consola em execução.\n" +" O NOME predefinido é \"COPROC\".\n" +" \n" +" Estado de saída:\n" +" O comando coproc devolve um estado de saída 0." + +#: builtins.c:1686 +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 uma função de consola.\n" +" \n" +" Cria uma função de consola chamada NOME. Quando chamado como comando\n" +" simples, NOME executa COMANDOs no contexto da consola. Quando NOME é\n" +" invoked, os argumentos são passados à função como $1...$n e o nome da\n" +" função está em $FUNCNAME.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que NOME seja só de leitura." + +#: builtins.c:1700 +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 comandos como uma unidade.\n" +" \n" +" Executa um conjunto de comandos num grupo. Esta é uma maneira de\n" +" redireccionar um conjunto completo de comandos.\n" +" \n" +" Estado de saída:\n" +" Devolve o estado do último comando executado." + +#: builtins.c:1712 +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 "" +"Retoma a tarefa em primeiro plano.\n" +" \n" +" Equivalente ao argumento JOB_SPEC para o comando \"fg\". Retoma uma\n" +" tarefa parada ou em 2º plano. JOB_SPEC pode especificar um nome de\n" +" tarefa ou um número de tarefa. Pôr \"&\" a seguir a JOB_SPEC coloca a\n" +" tarefa em 2º plano, como se a especificação da tarefa tivesse sido\n" +" fornecida como um argumento para \"bg\".\n" +" \n" +" Estado de saída:\n" +" Devolve o estado da tarefa retomada." + +#: builtins.c:1727 +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 "" +"Avalia uma expressão aritmética.\n" +" \n" +" A expressão EXPRESSÃO é avaliada de acordo com as regras\n" +" de avaliação aritmética. Equivalente a \"let \"EXPRESSÃO\"\"\n" +" Equivalente a \"let EXPRESSÃO\".\n" +" \n" +" Estado de saída:\n" +" Devolve 1 se EXPRESSÃO avaliar como 0; senão, devolve 0." + +#: builtins.c:1739 +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 "" +"Executa o comando condicional.\n" +" \n" +" Devolve um estado de 0 ou 1, dependendo da avaliação da expressão\n" +" condicional EXPRESSÃO. As expressões são compostas pelas mesmas " +"primárias\n" +" usadas pelo interno \"test\" e pode ser combinado com os seguintes " +"operadores:\n" +" \n" +" ( EXPRESSÃO )\tDevolve o valor de EXPRESSÃO\n" +" ! EXPRESSÃO\t\tVerdadeiro se EXPRESSÃO for falsa; senão falso\n" +" EXPR1 && EXPR2\tVerdadeiro se EXPR1 e EXPR2 forem verdadeiras; senão " +"falso\n" +" EXPR1 || EXPR2\tVerdadeiro se EXPR1 ou EXPR2 forem verdadeiras; " +"senão falso\n" +" \n" +" Quando os operadores \"==\" e \"! =\" são usados, a cadeia à direita do " +"operador\n" +" é usada como padrão e é feita a comparação de padrões. Quando o " +"operador \"= ~\"\n" +" é usado, a cadeia à direita do operador é comparada como expressão " +"regular.\n" +" \n" +" Os operadores && e || não avaliam EXPR2 se EXPR1 for suficiente para\n" +" determinar o valor da expressão." + +#: builtins.c:1765 +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 "" +"Nomes e uso comuns de variáveis de consola.\n" +" \n" +" BASH_VERSION\tInformações de versão para esta bash.\n" +" CDPATH\tUma lista de pastas separadas por \":\" para procurar\n" +" \t\tpor pastas dadas como argumentos a \"cd\".\n" +" GLOBIGNORE\tUma lista de padrões separada por \":\" que descreve nomes " +"de\n" +" ficheiro a ignorar pela expansão do nome do caminho.\n" +" HISTFILE\tNome de ficheiro onde o seu histórico de comandos é " +"armazenado.\n" +" HISTFILESIZE\tNúmero máximo de linhas que este ficheiro pode conter.\n" +" HISTSIZE\tNúmero máximo de linhas de histórico a que uma consola em \n" +" \t\texecução pode aceder.\n" +" HOME\tNome completo do caminho para a pasta de início de sessão.\n" +" HOSTNAME\tNome do anfitrião actual.\n" +" HOSTTYPE\tTipo de CPU em que esta versão do Bash está em execução.\n" +" IGNOREEOF\tControla a acção da consola ao receber um carácter EOF\n" +" \t\tcomo única entrada. Se definido, então o seu valor é o\n" +" \t\tnúmero de caracteres EOF que podem ser vistos numa linha\n" +" \t\tvazia antes que a consola saia (predefinição 10).\n" +" \t\tQuando não definido, EOF significa o fim da entrada.\n" +" MACHTYPE\tDescrição do sistema actual em que a bash está em execução.\n" +" MAILCHECK\tFrequência, em segundos, com que a bash procura novo " +"correio.\n" +" MAILPATH\tLista de ficheiros separados por \":\" onde a bash procura\n" +" \t\tnovas mensagens.\n" +" OSTYPE\tVersão Unix em que esta versão da bash está em execução.\n" +" PATH\tLista de pastas separadas por \":\" a procurar quando\n" +" \t\tprocura comandos.\n" +" PROMPT_COMMAND\tComando a executar antes da impressão de cada\n" +" \t\tprompt primário.\n" +" PS1\t\tCadeia do prompt primário.\n" +" PS2\t\tCadeia do prompt secundário\n" +" PWD\t\tCaminho completo da pasta actual.\n" +" SHELLOPTS\tLista separada por \":\" de opções da consola activadas.\n" +" TERM\tNome do tipo de terminal actual.\n" +" TIMEFORMAT\tFormato de saída para estatísticas de tempo mostradas\n" +" pela palavra reservada \"time\".\n" +" auto_resume\tNão-nulo significa que uma palavra de comando numa linha\n" +" \t\tpor si só é procurada primeiro na lista de tarefas actualmente\n" +" \t\tparadas. Se encontrado, a tarefa passa a primeiro plano. Um\n" +" \t\tvalor \"exact\" significa que a palavra de comando deve ser\n" +" \t\texactamente igual a um comando na lista de tarefas paradas.\n" +" \t\t\"substring\" significa que a palavra de comando deve ser igual\n" +" \t\ta uma sub-cadeia da tarefa. Qualquer outro valor significa que\n" +" \t\to comando deve ser um prefixo de uma tarefa interrompida.\n" +" histchars\tCaracteres que controlam a expansão do histórico e " +"substituições\n" +" \t\trápidas. O primeiro carácter é o carácter de subtituição do\n" +" \t\thistórico, normalmente \"!\". O 2º é o de substituição rápida,\n" +" \t\thabitualmente \"^\". O terceiro é o comentário do histórico,\n" +" \t\tnormalmente \"#\".\n" +" HISTIGNORE\tLista de padrões separada por \":\" usados para decidir " +"quais\n" +" \t\tos comandos que devem ser gravados na lista de histórico.\n" + +#: builtins.c:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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 "" +"Adiciona pastas à pilha.\n" +" \n" +" Adiciona uma pasta ao topo da pilha de pastas, ou roda a pilha\n" +" tornando o novo topo da pilha a actual pasta de trabalho.\n" +" Sem argumentos, troca as duas pastas de topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de pasta ao adicionar\n" +" pastas à pilha, para que só a pilha seja manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRoda a pilha de modo a que a N-ésima pasta (contando\n" +" \t\tda esquerda da lista mostrada por \"dirs\", começando por\n" +" \t\tzero) fique no topo.\n" +" \n" +" -N\tRoda a pilha de modo a que a N-ésima pasta (contando\n" +" \t\tda direita da lista mostrada por \"dirs\", começando por\n" +" \t\tzero) fique no topo.\n" +" \n" +" dir\tAdiciona DIR à pilha de pastas no topo, tornando-a a\n" +" \t\tnova pasta de trabalho actual.\n" +" \n" +" O interno \"dirs\" mostra a pilha de pastas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique um argumento inválido ou a\n" +" troca de pastas falhe." + +#: builtins.c:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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 pastas da pilha.\n" +" \n" +" Remove entradas da pilha de pastas. Sem argumentos, remove\n" +" a pasta do topo da pilha e muda para a nova pasta superior.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de pasta ao remover\n" +" \t\tpastas da pilha, para que só a pilha seja manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a N-ésima entrada contando da esquerda da lista\n" +" \t\tmostrada por \"dirs\", começando por zero. E.g.: \"popd +0\"\n" +" \t\tremove a primeira pasta, \"popd +1\" a segunda.\n" +" \n" +" -N\tRemove a N-ésima entrada contando da direita da lista\n" +" \t\tmostrada por \"dirs\", começando por zero. E.g.: \"popd -0\"\n" +" \t\tremove a última pasta, \"popd -1\" a penúltima.\n" +" \n" +" O interno \"dirs\" mostra a pilha de pastas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique um argumento inválido ou a troca\n" +" de pastas falhe." + +#: builtins.c:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Mostra a pilha de pastas.\n" +" \n" +" Mostra a lista de pastas actualmente lembradas. As pastas\n" +" entram na lista com o comando \"pushd\"; pode recuar na\n" +" lista com o comando \"popd\".\n" +" \n" +" Opções:\n" +" -c\tlimpa a pilha de pastas eliminando todos os elementos\n" +" -l\tnão imprime versões prefixadas com til de pastas relativas\n" +" \t\tà sua pasta inicial\n" +" -p\timprime a pilha de pastas com uma entrada por linha\n" +" -v\timprime a pilha de pastas com uma entrada por linha prefixada\n" +" \t\tcom a sua posição na pilha\n" +" \n" +" Argumentos:\n" +" +N\tMostra a N-ésima entrada contando da esquerda da lista\n" +" \t\tmostrada por \"dirs\" quando chamado sem opções, começando\n" +" \t\tpor zero.\n" +" \n" +" -N\tMostra a N-ésima entrada contando da direita da lista\n" +" \t\tmostrada por \"dirs\" quando chamado sem opções, começando\n" +" \t\tpor zero.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro" + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"Define e cancela opções de consola.\n" +" \n" +" Altera a definição de cada opção de consola OPTNOME. Sem qualquer\n" +" argumento, lista todas as opções de consola com indicação de definição\n" +" ou não de estado.\n" +" \n" +" Opções:\n" +" -o\trestringe OPTNOMEs para os definidos para uso com \"set -o\"\n" +" -p\timprime cada opção de consola com indicação do seu estado\n" +" -q\tsuprime a saída\n" +" -s\tactiva (define) cada OPTNOME\n" +" -u\tdesactiva (limpa) cada OPTNOME\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso se OPTNOME estiver activado; falha se indicar uma opção\n" +" inválida ou OPTNOME esteja desactivada." + +#: builtins.c:1938 +#, 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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Formata e imprime ARGUMENTOS sob controlo do FORMATO.\n" +" \n" +" Opções:\n" +" -v var\tatribui a saída à variável de consola VAR em vez de\n" +" \t\tmostrar na saída padrão\n" +" \n" +" FORMATO é uma cadeia de caracteres que contém três tipos de objectos: \n" +" caracteres simples, que são simplesmente copiados para a saída padrão;\n" +" sequências de escape, que são convertidas e copiadas para a saída " +"padrão; e\n" +" especificações de formato, cada uma das quais causa a impressão do " +"argumento\n" +" sucessivo seguinte.\n" +" \n" +" Além das especificações de formato padrão descritas em printf (1),\n" +" printf interpreta:\n" +" \n" +" %b\texpande sequências de escape para o argumento correspondente\n" +" %q\tcita o argumento de forma a ser reutilizado como entrada de " +"consola\n" +" %(fmt)T\timprime a cadeia de data-hora resultante da utilização do " +"FMT\n" +" \t\tcomo formato para strftime(3)\n" +" \n" +" O formato é reutilizado conforme necessário para consumir todos os " +"argumentos.\n" +" E se há menos argumentos do que o formato requer, especificações de " +"formato\n" +" extra comportam-se como um valor zero ou uma cadeia nula, conforme " +"apropriado,\n" +" tenha sido fornecido.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro de\n" +" escrita ou atribuição." + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Especifica como os argumentos devem ser concluídos por Readline.\n" +" \n" +" Para cada NOME, especifica como os argumentos devem ser concluídos. Se " +"não \n" +" fornecer opções, as especificações de conclusão existentes são " +"imprimidas\n" +" de forma a permitir que sejam reutilizadas como entrada.\n" +" \n" +" Opções:\n" +" -p\timprime especificações de conclusão existentes em formato " +"reutilizável\n" +" -r\tremove uma especificação de conclusão para cada NOME, ou, se não\n" +" \t\tforneceu NOMEs, todas as especificações de conclusão\n" +" -D\taplica as conclusões e acções como predefinição para comandos\n" +" \t\tsem qualquer especificação de conclusão definida\n" +" -E\taplica as conclusões e acções a comandos -- \"vazios\"\n" +" \t\tconclusão tentada numa linha em branco\n" +" -I\taplica as conclusões e acções à palavra inicial (normalmente o\n" +" \t\tcomando)\n" +" \n" +" Quando a conclusão é tentada, as acções são aplicadas na ordem em que \n" +" as opções de letras maiúsculas estão listadas acima. Se forem fornecidas " +"múltiplas\n" +" opções, a opção -D toma precedência sobre -E e ambas têm precedência " +"sobre -I.\n" +" \n" +" Estado da saída:\n" +"devolve sucesso a não ser que seja fornecida uma opção inválida ou ocorra um " +"erro." + +#: builtins.c:2004 +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 "" +"Mostrar possíveis conclusões, dependendo das opções.\n" +" \n" +" Destinado a ser usado de dentro de uma função de consola gerando\n" +" possíveis conclusões. Se o argumento PALAVRA opcional for fornecido,\n" +" são geradas comparações com PALAVRA.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou ocorra um " +"erro." + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, " +"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" +" \t-I\t\tChange options for completion on the initial word\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 ou mostra as opções de conclusão.\n" +" \n" +" Modifica as opções de conclusão para cada NOME, ou, se não fornecer " +"NOME,\n" +" a conclusão actualmente em execução. Se nenhuma OPÇÃO for fornecida, " +"imprime\n" +" as opções de conclusão para cada NOME ou a especificação de conclusão " +"actual.\n" +" \n" +" Opções:\n" +" \t-o opção\tDefine opção de conclusão OPÇÃO para cada NOME\n" +" \t-D\t\tAltera opções para a conclusão do comando \"predefinido\"\n" +" \t-E\t\tAltera opções para a conclusão do comando \"vazio\"\n" +" \t-I\t\tAltera opções para a conclusão na palavra inicial\n" +" \n" +" Usar \"+ o\" em vez de \"-o\" desliga a opção especificada.\n" +" \n" +" Argumentos:\n" +" \n" +" Cada NOME refere-se a um comando para o qual uma especificação de " +"conclusão\n" +" deve ter sido anteriormente definida usando o interno \"complete\". Se " +"não\n" +" forneceu NOMEs, compopt tem de ser chamado por uma função actualmente a\n" +" gerar conclusões e as opções para esse gerador de conclusões " +"actualmente\n" +" em execução são modificadas.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida ou NOME não " +"tenha\n" +" uma especificação de conclusão definida." + +#: builtins.c:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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ê linhas da entrada padrão para uma variável de matriz indexada.\n" +" \n" +" Lê linhas da entrada padrão para a variável de matriz indexada MATRIZ, " +"ou\n" +" do descritor de ficheiro FD se a opção -u for fornecida. A variável " +"MAPFILE\n" +" é a MATRIZ predefinida.\n" +" \n" +" Opções:\n" +" -d delim\tUsa DELIM para terminar as linhas, em vez de nova linha\n" +" -n total\tCopia no máximo TOTAL linhas. Se TOTAL for 0, copia todas\n" +" -O origem\tComeça a atribuir a MATRIZ no índice ORIGEM. A predefinição " +"é 0\n" +" -s total\tDescarta as primeiras TOTAL linhas lidas\n" +" -t\tRemove um DELIM inicial de cada linha lida (predefinição é nova " +"linha)\n" +" -u fd\tLê linhas do descritor de ficheiro FD em vez da entrada padrão\n" +" -C retorno\tAvalia RETORNO cada vez que QUANTUM linhas são lidas\n" +" -c quantum\tEspecifica o número de linhas lidas entre cada chamada a\n" +" \t\t\tRETORNO\n" +" \n" +" Argumentos:\n" +" ARRAY\tNome de variável de matriz a usar para dados de ficheiro\n" +" \n" +" Se -C for fornecido sem -c, a quantidade predefinida é 5000. Quando\n" +" RETORNO é avaliado, é fornecido o índice do elemento seguinte da\n" +" matriz a ser atribuído e a linha a ser atribuída a esse elemento\n" +" como argumentos adicionais.\n" +" \n" +" Se não for fornecido com uma origem explícita, mapfile limpa MATRIZ " +"antes\n" +" de lhe fazer atribuições.\n" +" \n" +" Estado de saída:\n" +" Devolve sucesso a não ser que indique uma opção inválida, MATRIZ seja " +"só\n" +" de leitura ou não seja uma matriz indexada." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Lê linhas de um ficheiro para uma variável de matriz.\n" +" \n" +" Um sinónimo para \"mapfile\"." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: chave de matriz associativa inválida" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Devolve o contexto da presente chamada a sub-rotina.\n" +#~ " \n" +#~ " Sem EXPR, devolve " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: processo %5ld (%s) na _pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Sinal desconhecido #" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo index 9ac9c43..6048f5c 100644 Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ diff --git a/po/pt_BR.po b/po/pt_BR.po index e7e42cf..5d0b79d 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1,478 +1,566 @@ -# bash: Translation to Brazilian Portuguese (pt_BR) -# Copyright (C) 2002 Free Software Foundation, Inc. +# Brazilian Portuguese translation for bash +# Copyright (C) 2021 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. # Halley Pacheco de Oliveira , 2002. +# Rafael Fontenelle , 2015-2021. # msgid "" msgstr "" -"Project-Id-Version: bash 2.0\n" +"Project-Id-Version: bash 5.1\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 \n" -"Language-Team: Brazilian Portuguese \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2021-01-07 10:37-0300\n" +"Last-Translator: Rafael Fontenelle \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 0.9.5\n" +"Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.38.0\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "�ndice da matriz (array) incorreto" +msgstr "subscript de array incorreto" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: removendo o atributo nameref" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%c%c: op��o incorreta" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: impossível converter array indexado para associativo" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s: imposs�vel atribuir a �ndice n�o num�rico" +msgstr "%s: impossível atribuir a índice não numérico" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: deve-se usar subscript ao atribuir um array associativo" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: impossível criar: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" msgstr "" +"bash_execute_unix_command: impossível localizar mapa de teclas para comando" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "" +msgstr "%s: primeiro caractere não-espaço em branco não é `\"'" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "" +msgstr "sem `%c' de fechamento em %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "" +msgstr "%s faltando separador dois-pontos" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': não foi desassociar no comando keymap" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansão de chaves: impossível alocar memória para %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansão de chaves: falha ao alocar memória para %u elementos" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansão de chaves: falha ao alocar memória para `%s'" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%c%c: op��o incorreta" +msgstr "`%s': nome de apelido (alias) inválido" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "edição de linha não habilitada" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "" +msgstr "`%s': nome de mapa de teclas inválido" -#: builtins/bind.def:245 -#, fuzzy, c-format +#: builtins/bind.def:252 +#, 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" +msgstr "%s: impossível ler: %s" -#: builtins/bind.def:295 builtins/bind.def:325 -#, fuzzy, c-format +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format msgid "`%s': unknown function name" -msgstr "%s: fun��o somente para leitura" +msgstr "`%s': nome de função desconhecida" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "" +msgstr "%s não está associada a qualquer tecla.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "" +msgstr "%s pode ser chamado via " -#: builtins/break.def:77 builtins/break.def:117 -#, fuzzy +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': impossível desassociar (unbind)" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "logout" +msgstr "número de loops" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "" +msgstr "significativo apenas em um loop de `for', `while' ou `until'" -#: builtins/caller.def:133 +# help caller +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Retorna o contexto da chamada de sub-rotina atual.\n" +" \n" +" Sem EXPR, retorna \"$linha $arquivo\". Com EXPR, retorna\n" +" \"$linha $sub-rotina $arquivo\"; essa informação extra pode ser usada " +"para\n" +" fornecer um rastro da pilha.\n" +" \n" +" O valor de EXPR indica quantos quadros de chamada deve voltar antes do\n" +" atual; o quadro do topo é o quadro 0." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "" +msgstr "HOME não definida" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "número excessivo de argumentos" -#: builtins/cd.def:227 +#: builtins/cd.def:342 +msgid "null directory" +msgstr "diretório nulo" + +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "" +msgstr "OLDPWD não definida" -#: builtins/common.c:101 -#, fuzzy, c-format +#: builtins/common.c:96 +#, c-format msgid "line %d: " -msgstr "encaixe (slot) %3d: " +msgstr "linha %d: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "escrevendo" +msgstr "aviso: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "" +msgstr "%s: uso: " -#: 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format msgid "%s: option requires an argument" -msgstr "a op��o requer um argumento: -" +msgstr "%s: a opção requer um argumento" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "" +msgstr "%s: requer argumento numérico" -#: builtins/common.c:205 -#, fuzzy, c-format +#: builtins/common.c:207 +#, c-format msgid "%s: not found" -msgstr "%s: comando n�o encontrado" +msgstr "%s: não encontrado" -#: builtins/common.c:214 shell.c:795 -#, fuzzy, c-format +#: builtins/common.c:216 shell.c:879 +#, c-format msgid "%s: invalid option" -msgstr "%c%c: op��o incorreta" +msgstr "%s: opção inválida" -#: builtins/common.c:221 -#, fuzzy, c-format +#: builtins/common.c:223 +#, c-format msgid "%s: invalid option name" -msgstr "%c%c: op��o incorreta" +msgstr "%s: nome de opção inválido" -#: builtins/common.c:228 general.c:231 general.c:236 -#, fuzzy, c-format +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format msgid "`%s': not a valid identifier" -msgstr "`%s' n�o � um identificador v�lido" +msgstr "`%s': não é um identificador válido" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "n�mero do sinal incorreto" +msgstr "número octal inválido" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "n�mero do sinal incorreto" +msgstr "número do hexa inválido" -#: builtins/common.c:242 expr.c:1256 -#, fuzzy +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "n�mero do sinal incorreto" +msgstr "número inválido" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "" +msgstr "%s: especificação de sinal inválida" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" msgstr "" +"`%s': não é um identificador de processo (pid) nem é uma especificação de " +"trabalho válida" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s: a vari�vel permite somente leitura" +msgstr "%s: a variável permite somente leitura" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: impossível remover definição" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" -msgstr "" +msgstr "%s: %s fora dos limites" -#: builtins/common.c:272 builtins/common.c:274 -#, fuzzy +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" -msgstr "esperado argumento" +msgstr "argumento" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" -msgstr "" +msgstr "%s fora dos limites" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "" +msgstr "%s: trabalho não existe" -#: builtins/common.c:290 -#, fuzzy, c-format +#: builtins/common.c:299 +#, c-format msgid "%s: no job control" -msgstr "nenhum controle de trabalho nesta `shell'" +msgstr "%s: nenhum controle de trabalho" -#: builtins/common.c:292 -#, fuzzy +#: builtins/common.c:301 msgid "no job control" -msgstr "nenhum controle de trabalho nesta `shell'" +msgstr "nenhum controle de trabalho" -#: builtins/common.c:302 -#, fuzzy, c-format +#: builtins/common.c:311 +#, c-format msgid "%s: restricted" -msgstr "%s: o trabalho terminou" +msgstr "%s: restrição" -#: builtins/common.c:304 -#, fuzzy +#: builtins/common.c:313 msgid "restricted" -msgstr "Terminado" +msgstr "restrição" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "" +msgstr "%s: não é um comando interno do shell" -#: builtins/common.c:321 -#, fuzzy, c-format +#: builtins/common.c:330 +#, c-format msgid "write error: %s" -msgstr "erro de `pipe': %s" +msgstr "erro de escrita: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "erro ao definir atributos do terminal: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "erro ao obter atributos do terminal: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "" +msgstr "%s: erro ao obter o diretório atual: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 -#, fuzzy, c-format +#: builtins/common.c:708 builtins/common.c:710 +#, c-format msgid "%s: ambiguous job spec" -msgstr "%s: Redirecionamento amb�guo" +msgstr "%s: especificação de trabalho ambígua" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "ajuda não disponível nesta versão" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: impossível remover definição: %s somente-leitura" -#: builtins/complete.def:276 +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: impossível remover definição" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "" +msgstr "%s: nome de ação inválido" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "" +msgstr "%s: nenhuma especificação de completação" #: builtins/complete.def:696 msgid "warning: -F option may not work as you expect" -msgstr "" +msgstr "aviso: a opção -F pode não funcionar como esperado" #: builtins/complete.def:698 msgid "warning: -C option may not work as you expect" -msgstr "" +msgstr "aviso: a opção -C pode não funcionar como esperado" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "não se está executando atualmente função de completação" -#: builtins/declare.def:122 -#, fuzzy +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "somente pode ser usado dentro de fun��es; faz com que o escopo vis�vel" +msgstr "somente pode ser usado em uma função" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "" +msgstr "impossível usar `-f' para criar funções" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s: fun��o somente para leitura" +msgstr "%s: função somente para leitura" -#: builtins/declare.def:468 -#, fuzzy, c-format +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: variável de referência não pode ser um array" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: referência a si próprio da variável nameref não é permitido" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s referência circular de nome" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": nome de variável inválido para referência de nome" + +#: builtins/declare.def:856 +#, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "$%s: imposs�vel atribuir desta maneira" +msgstr "%s: impossível destruir variáveis de array desta maneira" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: impossível converter array associativo para indexado" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: atribuição de array composto com aspas está obsoleto" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "" +msgstr "carregamento dinâmico não está disponível" -#: builtins/enable.def:312 -#, fuzzy, c-format +#: builtins/enable.def:376 +#, c-format msgid "cannot open shared object %s: %s" -msgstr "imposs�vel abrir o `named pipe' %s para %s: %s" +msgstr "impossível abrir objeto compartilhado %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "" +msgstr "impossível localizar %s no objeto compartilhado %s: %s" -#: builtins/enable.def:459 +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: comando dinâmico já foi carregado" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "função de carregamento para %s retorna falha (%d): não foi carregada" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "" +msgstr "%s: não foi carregado dinamicamente" -#: builtins/enable.def:474 -#, fuzzy, c-format +#: builtins/enable.def:577 +#, c-format msgid "%s: cannot delete: %s" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: impossível excluir: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" -msgstr "%s: � um diret�rio" +msgstr "%s: é um diretório" -#: builtins/evalfile.c:139 -#, fuzzy, c-format +#: builtins/evalfile.c:144 +#, c-format msgid "%s: not a regular file" -msgstr "%s: imposs�vel executar o arquivo bin�rio" +msgstr "%s: não é um arquivo irregular" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "" +msgstr "%s: arquivo é muito grande" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: imposs�vel executar o arquivo bin�rio" +msgstr "%s: impossível executar o arquivo binário" -#: builtins/exec.def:212 -#, fuzzy, c-format +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format msgid "%s: cannot execute: %s" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: impossível executar: %s" -#: builtins/exit.def:65 -#, fuzzy, c-format +#: builtins/exit.def:64 +#, c-format msgid "logout\n" -msgstr "logout" +msgstr "sair\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "" +msgstr "não é um shell de login: use `exit'" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "" +msgstr "Há trabalhos parados.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "" +msgstr "Há trabalhos em execução.\n" -#: builtins/fc.def:262 -#, fuzzy +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "%s: comando n�o encontrado" +msgstr "nenhum comando encontrado" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "" +msgstr "especificação do histórico" -#: builtins/fc.def:370 -#, fuzzy, c-format +#: builtins/fc.def:444 +#, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: impossível abrir arquivo temporário: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "atual" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "" +msgstr "o trabalho %d iniciou sem controle de trabalho" #: builtins/getopt.c:110 -#, fuzzy, c-format +#, c-format msgid "%s: illegal option -- %c\n" -msgstr "Op��o ilegal: -" +msgstr "%s: opção ilegal -- %c\n" #: builtins/getopt.c:111 -#, fuzzy, c-format +#, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "a op��o requer um argumento: -" +msgstr "%s: a opção requer um argumento: -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "" +msgstr "hashing está desabilitado" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "" +msgstr "%s: tabela de hash está vazia\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "`r', o �ltimo comando seja executado novamente." +msgstr "número\tcomando\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Comandos shell correspondendo à palavra-chave `" +msgstr[1] "Comandos shell correspondendo às palavras-chave `" -#: builtins/help.def:168 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." msgstr "" +"nenhum tópico de ajuda corresponde a `%s'. Tente `help help' ou `man -k %s' " +"ou `info %s'." -#: builtins/help.def:185 -#, fuzzy, c-format +#: builtins/help.def:223 +#, c-format msgid "%s: cannot open: %s" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: impossível abrir: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -483,121 +571,152 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" +"Esses comandos shell são definidos internamente. Digite `help' para ver " +"essa\n" +"lista. Digite `help NOME' para descobrir mais sobre a função `NOME'.\n" +"Use `info bash' para descobrir mais sobre o shell em geral.\n" +"Use `man -k' ou `info' para descobrir mais sobre comandos que não estão " +"nesta\n" +"lista.\n" +"\n" +"Um asterisco (*) próximo ao nome significa que o comando está desabilitado.\n" +"\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "" +msgstr "impossível usar mais de um dentre -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "" +msgstr "posição no histórico" -#: builtins/history.def:365 -#, fuzzy, c-format +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: marca de tempo inválida" + +#: builtins/history.def:449 +#, c-format msgid "%s: history expansion failed" -msgstr "%s: esperado express�o de n�mero inteiro" +msgstr "%s: expansão do histórico falhou" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: esperado express�o de n�mero inteiro" +msgstr "%s: inlib falhou" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "" +msgstr "nenhuma outra opção permitida com `-x'" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "" +msgstr "%s: argumentos devem ser IDs de trabalhos ou processo" -#: builtins/kill.def:263 -#, fuzzy +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "Erro desconhecido %d" +msgstr "Erro desconhecido" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "esperado uma express�o" +msgstr "esperava uma expressão" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: vari�vel n�o vinculada" +msgstr "%s: não é um array indexado" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "" +msgstr "%s: especificação de descritor de arquivo inválida" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "" +msgstr "%d: descritor de arquivo inválido: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%c%c: op��o incorreta" +msgstr "%s: número de linhas inválido" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%c%c: op��o incorreta" +msgstr "%s: origem do array inválido" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "n�mero do sinal incorreto" +msgstr "%s: quantidade de chamadas inválida" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: vari�vel n�o vinculada" +msgstr "nome de variável array vazio" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "requer suporte a variável de array" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "" +msgstr "`%s': faltando caractere de formato" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': especificação de formato de tempo inválida" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "" +msgstr "`%c': caractere de formato inválido" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" -msgstr "" +msgstr "aviso: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problema ao analisar formato: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "" +msgstr "faltando dígito hexa para \\x" -#: builtins/pushd.def:195 -#, fuzzy +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "faltando dígito unicode para \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" -msgstr "o novo diret�rio que ocupa o topo da pilha." +msgstr "nenhum outro diretório" -#: builtins/pushd.def:462 -#, fuzzy +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s argumento inválido" + +#: builtins/pushd.def:480 msgid "" -msgstr "\tnovo diret�rio atual de trabalho." +msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "pilha de diretórios está vazia" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "Estouro na base da pilha de recursividade" +msgstr "índice de pilha de diretórios" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -620,8 +739,26 @@ msgid "" "by\n" "\tdirs when invoked without options, starting with zero." msgstr "" +"Exibe a lista de diretórios atualmente memorizados. Diretórios são\n" +" inseridos na lista por meio do comando `pushd'; você pode obter\n" +" de volta da lista com o comando `popd'.\n" +" \n" +" Opções:\n" +" -c\tlimpa a pilha de diretórios excluindo todos os elementos\n" +" -l\tnão mostra versões de diretórios prefixadas por til,\n" +" \t\trelativos ao seu diretório HOME\n" +" -p\texibe a pilha de diretório com uma entrada por linha\n" +" -v\texibe a pilha de diretório com uma entrada por linha,\n" +" \t\tprefixada com sua posição na pilha\n" +" \n" +" Argumentos:\n" +" +N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero.\n" +" \n" +" -N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -645,8 +782,30 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Adiciona um diretório ao topo da pilha de diretórios ou movimenta\n" +" a pilha, fazendo o novo topo da pilha ser o diretório atual de\n" +" trabalho. Com nenhum argumento, efetua troca do topo entre dois\n" +" diretórios.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao adicionar\n" +" \t\tdiretórios à pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda esquerda da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" -N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda direita da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" dir\tAdiciona DIR à pilha de diretórios no topo, fazendo dele o\n" +" \t\tnovo diretório de trabalho atual.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretórios." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -666,865 +825,994 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Remove entradas da pilha de diretórios. Com nenhum argumento, remove\n" +" o diretório do topo da pilha e altera o novo diretório do topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao remover\n" +" \t\tdiretórios da pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a n-ésima entrada a contar da esquerda da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o primeiro diretório e `popd +1', o segundo.\n" +" \n" +" -N\tRemove a n-ésima entrada a contar da direita da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o último diretório e `popd -1', o penúltimo.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretório." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "" +msgstr "%s: especificação de tempo limite inválida" -#: builtins/read.def:588 -#, fuzzy, c-format +#: builtins/read.def:827 +#, c-format msgid "read error: %d: %s" -msgstr "erro de `pipe': %s" +msgstr "erro de leitura: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" msgstr "" +"possível retornar (`return') apenas de uma função ou script carregado (com " +"`source')" -#: builtins/set.def:768 -#, fuzzy +#: builtins/set.def:869 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" +msgstr "" +"impossível simultaneamente remover definição de uma função e uma variável" -#: builtins/set.def:823 -#, fuzzy, c-format +#: builtins/set.def:969 +#, c-format msgid "%s: not an array variable" -msgstr "%s: vari�vel n�o vinculada" +msgstr "%s: não é uma variável array" -#: builtins/setattr.def:186 -#, fuzzy, c-format +#: builtins/setattr.def:189 +#, c-format msgid "%s: not a function" -msgstr "%s: fun��o somente para leitura" +msgstr "%s: não é uma função" -#: builtins/shift.def:71 builtins/shift.def:77 -#, fuzzy +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: impossível exportar" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "shift [n]" +msgstr "número de shift" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" msgstr "" +"impossível simultaneamente definir e remover definição de opções do shell" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "" +msgstr "%s: nome de opção de shell inválido" #: builtins/source.def:128 msgid "filename argument required" -msgstr "" +msgstr "requer argumento arquivo" -#: builtins/source.def:153 -#, fuzzy, c-format +#: builtins/source.def:154 +#, c-format msgid "%s: file not found" -msgstr "%s: comando n�o encontrado" +msgstr "%s: arquivo não encontrado" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "impossível suspender" -#: builtins/suspend.def:111 -#, fuzzy +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "Sair de uma shell de login." +msgstr "impossível suspender um shell de login." -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s está apelidada para `%s'\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "" +msgstr "%s é uma palavra-chave do shell\n" -#: builtins/type.def:274 -#, fuzzy, c-format +#: builtins/type.def:275 +#, c-format msgid "%s is a function\n" -msgstr "%s: fun��o somente para leitura" +msgstr "%s é uma função\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s é um comando interno especial do shell\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s é um comando interno do shell\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" -msgstr "" +msgstr "%s é %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "%s está na tabela hash (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: argumento limite inválido" -#: builtins/ulimit.def:398 -#, fuzzy, c-format +#: builtins/ulimit.def:426 +#, c-format msgid "`%c': bad command" -msgstr "%c%c: op��o incorreta" +msgstr "`%c': comando incorreto" -#: builtins/ulimit.def:427 -#, fuzzy, c-format +#: builtins/ulimit.def:464 +#, c-format msgid "%s: cannot get limit: %s" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: impossível obter limite: %s" -#: builtins/ulimit.def:453 -#, fuzzy +#: builtins/ulimit.def:490 msgid "limit" -msgstr "Tempo limite de CPU excedido" +msgstr "limite" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 -#, fuzzy, c-format +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: impossível modificar limite: %s" -#: builtins/umask.def:118 -#, fuzzy +#: builtins/umask.def:115 msgid "octal number" -msgstr "n�mero do sinal incorreto" +msgstr "número octal" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "`%c': operador de modo simbólico inválido" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "`%c': caractere de modo simbólico inválido" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " linha " -#: error.c:165 -#, fuzzy, c-format +#: error.c:164 +#, c-format msgid "last command: %s\n" -msgstr "`r', o �ltimo comando seja executado novamente." +msgstr "último comando: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "" +msgstr "Abortando..." -#: error.c:406 -#, fuzzy +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORM: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "aviso: " + +#: error.c:488 msgid "unknown command error" -msgstr "Erro desconhecido %d" +msgstr "erro de comando desconhecido" -#: error.c:407 -#, fuzzy +#: error.c:489 msgid "bad command type" -msgstr "usado como nome de um comando." +msgstr "tipo de comando incorreto" -#: error.c:408 -#, fuzzy +#: error.c:490 msgid "bad connector" -msgstr "conector incorreto `%d'" +msgstr "conector incorreto" -#: error.c:409 -#, fuzzy +#: error.c:491 msgid "bad jump" -msgstr "Desvio incorreto %d" +msgstr "desvio incorreto" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "%s: vari�vel n�o vinculada" +msgstr "%s: variável não associada" -#: eval.c:181 -#, fuzzy, c-format -msgid "timed out waiting for input: auto-logout\n" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" msgstr "" -"%ctempo limite de espera excedido aguardando entrada:\n" -"fim autom�tico da sess�o\n" +"\atempo limite de espera excedido aguardando entrada: fim automático da " +"sessão\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "" +msgstr "impossível redirecionar a entrada padrão para /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "" +msgstr "TIMEFORMAT: `%c': caractere de formato inválido" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] ainda existe" + +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "erro de `pipe': %s" +msgstr "erro de `pipe'" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: excedido o nível máximo de aninhamento de `eval' (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: excedido o nível máximo de aninhamento de `function' (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: excedido o nível máximo de aninhamento de avaliação (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: restri��o: n�o � permitido especificar `/' em nomes de comandos" +msgstr "%s: restrição: não é permitido especificar `/' em nomes de comandos" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s: comando n�o encontrado" +msgstr "%s: comando não encontrado" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" -#: execute_cmd.c:4827 +#: execute_cmd.c:5975 #, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: impossível executar o arquivo binário" + +#: execute_cmd.c:6000 +#, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: � um diret�rio" +msgstr "%s: %s: interpretador incorreto" -#: execute_cmd.c:4976 -#, fuzzy, c-format +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: impossível executar o arquivo binário: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "`%s': é um comando interno especial" + +#: execute_cmd.c:6175 +#, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "imposs�vel duplicar fd (descritor de arquivo) %d para fd 0: %s" +msgstr "impossível duplicar fd (descritor de arquivo) %d para fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "excedido o n�vel de recursividade da express�o" +msgstr "excedido o nível de recursividade da expressão" -#: expr.c:265 -#, fuzzy +#: expr.c:291 msgid "recursion stack underflow" -msgstr "Estouro na base da pilha de recursividade" +msgstr "esvaziamento de pilha de recursão" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "erro de sintaxe na express�o" +msgstr "erro de sintaxe na expressão" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "tentativa de atribui��o para algo que n�o � uma vari�vel" +msgstr "tentativa de atribuição para algo que não é uma variável" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "erro de sintaxe na atribuição de variável" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "divis�o por 0" +msgstr "divisão por 0" -#: expr.c:471 -#, fuzzy +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "Erro de programa��o: `token' inv�lido `%d' passado para expassign()" +msgstr "erro de programação: token incorreto passado para expassign()" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "`:' esperado para express�o condicional" +msgstr "esperava `:' para expressão condicional" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" -msgstr "" +msgstr "exponente menor que 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" +msgstr "esperava identificador após pré-acréscimo ou pré-decréscimo" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" msgstr "faltando `)'" -#: expr.c:897 expr.c:1176 -#, fuzzy +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "erro de sintaxe: fim prematuro do arquivo" +msgstr "erro de sintaxe: esperava operando" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "" +msgstr "erro de sintaxe: operador aritmético inválido" -#: expr.c:1202 -#, fuzzy, c-format +#: expr.c:1518 +#, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s: %s: %s (erro: o `token' � \"%s\")\n" +msgstr "%s%s%s: %s (token de erro é \"%s\")" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "" +msgstr "base aritmética inválida" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "contante inteira inválida" -#: expr.c:1280 +#: expr.c:1603 msgid "value too great for base" -msgstr "valor muito grande para esta base de numera��o" +msgstr "valor muito grande para esta base de numeração" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "%s: esperado express�o de n�mero inteiro" +msgstr "%s: erro de expressão\n" -#: general.c:61 -#, fuzzy +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getwd: imposs�vel acessar os diret�rios pais (anteriores)" +msgstr "getcwd: impossível acessar os diretórios pais (anteriores)" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6208 +#, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "imposs�vel duplicar fd (descritor de arquivo) %d para fd 0: %s" +msgstr "" +"impossível redefinir modo `nodelay' para o descritor de arquivo (fd) %d" -#: input.c:258 -#, fuzzy, c-format +#: input.c:266 +#, 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" +"impossível alocar novo descritor de arquivo (fd) para a entrada do `bash' a " +"partir do fd %d" -#: input.c:266 -#, fuzzy, c-format +#: input.c:274 +#, 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" +"save_bash_input: buffer já existe para o novo descritor de arquivo (fd) %d" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: `pipe' de pgrp" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" -msgstr "" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" -msgstr "" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" +msgid "forked pid %d appears in running job %d" msgstr "" +"identificador de processo (pid) %d bifurcado (fork) aparece no trabalho em " +"execução %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "excluindo trabalho parado %d com grupo de processo %ld" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: pid %5ld (%s) marcado como ainda vivo" -#: jobs.c:1401 -#, fuzzy, c-format +#: jobs.c:1839 +#, c-format msgid "describe_pid: %ld: no such pid" -msgstr "describe_pid: o identificador do processo (pid) n�o existe (%d)!\n" +msgstr "describe_pid: %ld: o identificador do processo (pid) não existe" -#: jobs.c:1416 -#, fuzzy, c-format +#: jobs.c:1854 +#, c-format msgid "Signal %d" -msgstr "Sinal desconhecido #%d" +msgstr "Sinal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "Conclu�do" +msgstr "Concluído" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Parado" -#: jobs.c:1439 -#, fuzzy, c-format +#: jobs.c:1877 +#, c-format msgid "Stopped(%s)" -msgstr "Parado" +msgstr "Parado(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Executando" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "Conclu�do(%d)" +msgstr "Concluído(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "Fim da execu��o com status %d" +msgstr "Fim da execução com status %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Status desconhecido" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "(imagem do n�cleo gravada)" +msgstr "(imagem do núcleo gravada)" -#: jobs.c:1568 -#, fuzzy, c-format +#: jobs.c:2009 +#, c-format msgid " (wd: %s)" -msgstr "(wd agora: %s)\n" +msgstr " (wd: %s)" -#: jobs.c:1776 -#, fuzzy, c-format +#: jobs.c:2250 +#, c-format msgid "child setpgid (%ld to %ld)" -msgstr "`setpgid' filho (%d para %d) erro %d: %s\n" +msgstr "`setpgid' filho (%ld para %ld)" -#: jobs.c:2104 nojobs.c:585 -#, fuzzy, c-format +#: jobs.c:2608 nojobs.c:666 +#, c-format msgid "wait: pid %ld is not a child of this shell" -msgstr "wait: o pid %d n�o � um filho deste `shell'" +msgstr "wait: o pid %ld não é um processo filho deste shell" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "" +msgstr "wait_for: Sem registro do processo %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: trabalho %d está parado" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: nenhum trabalho atual" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: o trabalho terminou" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: o trabalho %d já está em plano de fundo" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: ativando WNOHANG para evitar bloqueio indefinido" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "encaixe (slot) %3d: " +msgstr "%s, linha %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr " (imagem do n�cleo gravada)" +msgstr " (imagem do núcleo gravada)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(wd agora: %s)\n" -#: jobs.c:3579 -#, fuzzy +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "initialize_jobs: getpgrp falhou: %s" +msgstr "initialize_job_control: getpgrp falhou" -#: jobs.c:3639 -#, fuzzy +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: nenhum controle de trabalho em plano de fundo" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "initialize_jobs: disciplina da linha: %s" +msgstr "initialize_job_control: disciplina da linha" -#: jobs.c:3649 -#, fuzzy +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "initialize_jobs: getpgrp falhou: %s" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "impossível definir grupo do processo do terminal (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "nenhum controle de trabalho nesta `shell'" +msgstr "nenhum controle de trabalho neste shell" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "" +msgstr "malloc: asserção falhou: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" +"\r\n" +"malloc: %s:%d: asserção remendada\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "" +msgstr "desconhecido" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" +msgstr "malloc: bloco socado em lista livre" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" +msgstr "free: chamado com argumento de bloco já liberado" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "" +msgstr "free: chamado com argumento de bloco não alocado" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "free: esvaziamento de pilha detectado; mh_nbytes fora do limite" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: esvaziamento de pilha detectado; magic8 corrompido" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "" +msgstr "free: tamanhos de porções do início e do fim são diferentes" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "" +msgstr "realloc: chamado com argumento de bloco não alocado" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "realloc: esvaziamento de pilha detectado; mh_nbytes fora do limite" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: esvaziamento de pilha detectado; magic8 corrompido" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" +msgstr "realloc: tamanhos de porções do início e do fim são diferentes" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" +msgstr "register_alloc: tabela de `alloc' está cheia com FIND_ALLOC?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "" +msgstr "register_alloc: %p já na tabela como alocado?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "" +msgstr "register_free: %p já na tabela como livre?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "" +msgstr "base inválida" #: lib/sh/netopen.c:168 -#, fuzzy, c-format +#, c-format msgid "%s: host unknown" -msgstr "desconhecido" +msgstr "%s: máquina desconhecida" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "" +msgstr "%s: serviço inválido" #: lib/sh/netopen.c:306 #, c-format msgid "%s: bad network path specification" -msgstr "" +msgstr "%s: especificação de caminho de rede inválida" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "" +msgstr "sem suporte a operações de rede" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: impossível alterar locale (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: impossível alterar locale (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: imposs�vel realocar %lu bytes (%lu bytes alocados)" +msgstr "setlocale: %s: impossível alterar locale (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: imposs�vel realocar %lu bytes (%lu bytes alocados)" +msgstr "setlocale: %s: impossível alterar locale (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" -msgstr "Voc� tem mensagem de correio em $_" +msgstr "Você tem mensagem de correio em $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" -msgstr "Voc� tem mensagem nova de correio em $_" +msgstr "Você tem mensagem nova de correio em $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, 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 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "erro de sintaxe na express�o" +msgstr "erro de sintaxe: requer expressão aritmética" -#: make_cmd.c:325 -#, fuzzy +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "erro de sintaxe: fim prematuro do arquivo" +msgstr "erro de sintaxe: `;' inesperado" -#: make_cmd.c:326 -#, fuzzy, c-format +#: make_cmd.c:317 +#, c-format msgid "syntax error: `((%s))'" -msgstr "erro de sintaxe" +msgstr "erro de sintaxe: `((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: o tipo da instru��o est� incorreto %d" +msgstr "make_here_document: tipo da instrução incorreto %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" msgstr "" +"here-document na linha %d delimitado pelo fim do arquivo (desejava `%s')" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: instrução de redirecionamento `%d' fora do limite" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" msgstr "" +"shell_getc: shell_input_line_size (%zu) excede SIZE_MAX (%lu): linha truncada" -#: parse.y:3133 parse.y:3369 -#, fuzzy, c-format +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "excedido o número máximo de here-document" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "encontrado EOF n�o esperado enquanto procurava por `%c'" +msgstr "encontrado EOF inesperado enquanto procurava por `%c' correspondente" -#: parse.y:3951 -#, fuzzy +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "encontrado EOF n�o esperado enquanto procurava por `%c'" +msgstr "encontrado EOF inesperado enquanto procurava por `]]'" -#: parse.y:3956 -#, fuzzy, c-format +#: parse.y:4457 +#, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "erro de sintaxe pr�ximo do `token' n�o esperado `%s'" +msgstr "erro de sintaxe na expressão condicional: token inesperado `%s'" -#: parse.y:3960 -#, fuzzy +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "erro de sintaxe na express�o" +msgstr "erro de sintaxe na expressão condicional" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "" +msgstr "token inesperado `%s', esperava`)'" -#: parse.y:4042 -#, fuzzy +#: parse.y:4543 msgid "expected `)'" -msgstr "esperado `)'" +msgstr "esperava `)'" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "" +msgstr "argumento inesperado `%s' para operador unário condicional" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" -msgstr "" +msgstr "argumento inesperado para operador unário condicional" -#: parse.y:4120 -#, fuzzy, c-format +#: parse.y:4621 +#, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "%s: esperado operador bin�rio" +msgstr "token inesperado `%s', esperava operador binário condicional" -#: parse.y:4124 -#, fuzzy +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "%s: esperado operador bin�rio" +msgstr "esperava operador binário condicional" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "" +msgstr "argumento inesperado `%s' para operador binário condicional" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" -msgstr "" +msgstr "argumento inesperado para operador binário condicional" -#: parse.y:4161 -#, fuzzy, c-format +#: parse.y:4662 +#, c-format msgid "unexpected token `%c' in conditional command" -msgstr "`:' esperado para express�o condicional" +msgstr "token inesperado `%c' em comando condicional" -#: parse.y:4164 -#, fuzzy, c-format +#: parse.y:4665 +#, c-format msgid "unexpected token `%s' in conditional command" -msgstr "`:' esperado para express�o condicional" +msgstr "token inesperado `%s' em comando condicional" -#: parse.y:4168 -#, fuzzy, c-format +#: parse.y:4669 +#, c-format msgid "unexpected token %d in conditional command" -msgstr "`:' esperado para express�o condicional" +msgstr "token inesperado %d em comando condicional" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "erro de sintaxe pr�ximo do `token' n�o esperado `%s'" +msgstr "erro de sintaxe próximo ao token inesperado `%s'" -#: parse.y:5477 -#, fuzzy, c-format +#: parse.y:6137 +#, c-format msgid "syntax error near `%s'" -msgstr "erro de sintaxe pr�ximo do `token' n�o esperado `%s'" +msgstr "erro de sintaxe próximo a `%s'" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "erro de sintaxe: fim prematuro do arquivo" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "erro de sintaxe" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Use \"%s\" para sair da `shell'.\n" +msgstr "Use \"%s\" para sair do shell.\n" -#: parse.y:5711 -#, fuzzy +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "encontrado EOF n�o esperado enquanto procurava por `%c'" +msgstr "encontrado EOF inesperado enquanto procurava por `)' correspondente" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "" +msgstr "completion: função `%s' não encontrada" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: possível loop de nova tentativa" -#: pcomplib.c:179 +# COMPSPEC é variável no código fonte, manter sem tradução para português. +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" +msgstr "progcomp_insert: %s: COMPSPEC NULO" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: conector incorreto `%d'" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "" +msgstr "xtrace_set: %d: descritor de arquivo inválido" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: ponteiro de arquivo NULO" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf: `%c': caractere de formato inválido" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "" +msgstr "descritor de arquivo fora dos limites" -#: redir.c:166 -#, fuzzy, c-format +#: redir.c:205 +#, c-format msgid "%s: ambiguous redirect" -msgstr "%s: Redirecionamento amb�guo" +msgstr "%s: redirecionamento ambíguo" -#: redir.c:170 -#, fuzzy, c-format +#: redir.c:209 +#, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: Imposs�vel sobrescrever arquivo existente" +msgstr "%s: impossível sobrescrever arquivo existente" -#: redir.c:175 -#, fuzzy, c-format +#: redir.c:214 +#, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: restri��o: n�o � permitido especificar `/' em nomes de comandos" +msgstr "%s: restrição: impossível redirecionar saída" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, c-format msgid "cannot create temp file for here-document: %s" -msgstr "imposs�vel criar `pipe' para a substitui��o do processo: %s" +msgstr "impossível criar arquivo temporário para here-document: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: imposs�vel atribuir uma lista a um membro de uma matriz (array)" +msgstr "%s: impossível atribuir fd a variável" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "" +msgstr "sem suporte a /dev/(tcp|udp)/máquina/porta sem rede" -#: redir.c:1101 -#, fuzzy +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "erro de redirecionamento" +msgstr "erro de redirecionamento: impossível duplicar fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "" +msgstr "impossível localizar /tmp, por favor crie!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "" +msgstr "/tmp deve ser um nome de diretório válido" -#: shell.c:884 -#, fuzzy, c-format +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "modo de impressão bonita ignorada em shells interativos" + +#: shell.c:972 +#, c-format msgid "%c%c: invalid option" -msgstr "%c%c: op��o incorreta" +msgstr "%c%c: opção inválida" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "impossível definir uid para %d: uid efetivo %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "impossível definir gid para %d: gid efetivo %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "possível iniciar o depurador; modo de depuração desabilitado" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: É um diretório" -#: shell.c:1651 +#: shell.c:1907 msgid "I have no name!" -msgstr "Eu n�o tenho nome!" +msgstr "Eu não tenho nome!" -#: shell.c:1793 -#, fuzzy, c-format +#: shell.c:2061 +#, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "GNU %s, vers�o %s\n" +msgstr "GNU bash, versão %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"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 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "op��es-longas-GNU:\n" +msgstr "opções-longas-GNU:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "Op��es da `shell':\n" +msgstr "Opções do 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD or -c comando ou -O opção-shopt\t\t(somente para chamada)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s ou -o op��o\n" +msgstr "\t-%s ou -o opção\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +"Digite `%s -c \"help set\"' para mais informações sobre as opções do shell.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +"Digite `%s -c help' para mais informações sobre os comandos internos do " +"shell.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "" +msgstr "Uso o comando `bashbug' para relatar erros.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "página do bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ajuda geral sobre uso de software GNU: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "" +msgstr "sigprocmask: %d: operação inválida" #: siglist.c:48 msgid "Bogus signal" @@ -1544,7 +1832,7 @@ msgstr "Sair" #: siglist.c:63 msgid "Illegal instruction" -msgstr "Instru��o ilegal" +msgstr "Instrução ilegal" #: siglist.c:67 msgid "BPT trace/trap" @@ -1552,15 +1840,15 @@ msgstr "BPT Rastreamento/Captura (BPT trace/trap)" #: siglist.c:75 msgid "ABORT instruction" -msgstr "Instru��o ABORT" +msgstr "Instrução ABORT" #: siglist.c:79 msgid "EMT instruction" -msgstr "Instru��o EMT" +msgstr "Instrução EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "Exce��o de ponto flutuante" +msgstr "Exceção de ponto flutuante" #: siglist.c:87 msgid "Killed" @@ -1572,7 +1860,7 @@ msgstr "Erro do barramento" #: siglist.c:95 msgid "Segmentation fault" -msgstr "Falha de segmenta��o" +msgstr "Falha de segmentação" #: siglist.c:99 msgid "Bad system call" @@ -1580,20 +1868,19 @@ msgstr "Chamada incorreta do sistema" #: siglist.c:103 msgid "Broken pipe" -msgstr "`Pipe' partido (Escrita sem leitura)" +msgstr "`Pipe' partido (escrita sem leitura)" #: siglist.c:107 msgid "Alarm clock" -msgstr "Rel�gio de alarme" +msgstr "Relógio de alarme" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "exibida." +msgstr "Terminado" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "Condi��o urgente de Entrada/Sa�da" +msgstr "Condição urgente de Entrada/Saída" #: siglist.c:119 msgid "Stopped (signal)" @@ -1613,11 +1900,11 @@ msgstr "Parado (entrada tty)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "Parado (sa�da tty)" +msgstr "Parado (saída tty)" #: siglist.c:147 msgid "I/O ready" -msgstr "Entrada/Sa�da pronta" +msgstr "Entrada/Saída pronta" #: siglist.c:151 msgid "CPU limit" @@ -1629,11 +1916,11 @@ msgstr "Tamanho limite do arquivo excedido" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "Alarme virtual de tempo" +msgstr "Alarme (virtual)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "Alarme (profile)" +msgstr "Alarme (perfil)" #: siglist.c:167 msgid "Window changed" @@ -1645,11 +1932,11 @@ msgstr "Registro bloqueado (lock)" #: siglist.c:175 msgid "User signal 1" -msgstr "Sinal 1 definido pelo usu�rio" +msgstr "Sinal 1 definido pelo usuário" #: siglist.c:179 msgid "User signal 2" -msgstr "Sinal 2 definido pelo usu�rio" +msgstr "Sinal 2 definido pelo usuário" #: siglist.c:183 msgid "HFT input data pending" @@ -1669,7 +1956,7 @@ msgstr "migrar o processo para outra CPU" #: siglist.c:199 msgid "programming error" -msgstr "erro de programa��o" +msgstr "erro de programação" #: siglist.c:203 msgid "HFT monitor mode granted" @@ -1681,554 +1968,557 @@ msgstr "modo monitor HFT rescindido" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "a seq��ncia de som HFT foi completada" +msgstr "a sequência de som HFT foi completada" #: siglist.c:215 msgid "Information request" -msgstr "" - -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Sinal desconhecido #" +msgstr "Requisição de informação" -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Sinal desconhecido #%d" -#: subst.c:1333 subst.c:1454 -#, fuzzy, c-format +#: subst.c:1480 subst.c:1670 +#, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "substitui��o incorreta: nenhum `%s' em %s" +msgstr "substituição incorreta: sem `%s' de fechamento em %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "%s: imposs�vel atribuir uma lista a um membro de uma matriz (array)" +msgstr "%s: impossível atribuir uma lista a um membro de um array" -#: subst.c:4754 subst.c:4770 -#, fuzzy +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "imposs�vel criar `pipe' para a substitui��o do processo: %s" +msgstr "impossível criar `pipe' para a substituição do processo" -#: subst.c:4802 -#, fuzzy +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "imposs�vel criar um processo filho para a substitui��o do processo: %s" +msgstr "impossível criar um processo filho para a substituição do processo" -#: subst.c:4847 -#, fuzzy, c-format +#: subst.c:6198 +#, c-format msgid "cannot open named pipe %s for reading" -msgstr "imposs�vel abrir o `named pipe' %s para %s: %s" +msgstr "impossível abrir `pipe' %s para leitura" -#: subst.c:4849 -#, fuzzy, c-format +#: subst.c:6200 +#, c-format msgid "cannot open named pipe %s for writing" -msgstr "imposs�vel abrir o `named pipe' %s para %s: %s" +msgstr "impossível abrir `pipe' %s para escrita" -#: subst.c:4867 -#, fuzzy, c-format +#: subst.c:6223 +#, 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" +msgstr "impossível duplicar `pipe' %s como descritor de arquivo (fd) %d" -#: subst.c:5063 -#, fuzzy +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "substituição de comando: byte nulo ignorado na entrada" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "imposs�vel construir `pipes' para substitui��o do comando: %s" +msgstr "impossível criar um `pipe' para substituição do comando" -#: subst.c:5097 -#, fuzzy +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "imposs�vel criar um processo filho para substitui��o do comando: %s" +msgstr "impossível criar um processo filho para substituição do comando" -#: subst.c:5114 -#, fuzzy +#: subst.c:6613 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" +"command_substitute: impossível duplicar o `pipe' como descritor de arquivo " +"(fd) 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nome de variável inválido para referência de nome" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: expansão indireta inválida" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nome de variável inválido" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parâmetro não inicializado" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: par�metro nulo ou n�o inicializado" +msgstr "%s: parâmetro nulo ou não inicializado" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "%s: express�o de substring < 0" +msgstr "%s: expressão de substring < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: substitui��o incorreta" +msgstr "%s: substituição incorreta" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "$%s: imposs�vel atribuir desta maneira" +msgstr "$%s: impossível atribuir desta maneira" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"versões futuras do shell vão forçar avaliação como um substituto aritmético" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "substitui��o incorreta: nenhum `%s' em %s" +msgstr "substituição incorreta: sem \"`\" de fechamento em %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "" +msgstr "sem correspondência: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "esperado argumento" +msgstr "esperava argumento" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s: esperado express�o de n�mero inteiro" +msgstr "%s: esperava expressão de número inteiro" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "esperado `)'" +msgstr "esperava `)'" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "esperado `)', encontrado %s" +msgstr "esperava `)', encontrado %s" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" -msgstr "%s: esperado operador un�rio" +msgid "%s: binary operator expected" +msgstr "%s: esperava operador binário" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" -msgstr "%s: esperado operador bin�rio" +msgid "%s: unary operator expected" +msgstr "%s: esperava operador unário" -#: test.c:811 +#: test.c:896 msgid "missing `]'" msgstr "faltando `]'" -#: trap.c:203 -#, fuzzy +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "erro de sintaxe: `%s' inesperado" + +#: trap.c:220 msgid "invalid signal number" -msgstr "n�mero do sinal incorreto" +msgstr "número de sinal inválido" -#: trap.c:327 +#: trap.c:323 #, c-format -msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgid "trap handler: maximum trap handler level exceeded (%d)" msgstr "" +"manipulador de trap: excedido o nível máximo de manipulador de captura (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: valor incorreto em trap_list[%d]: %p" -#: trap.c:331 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" msgstr "" +"run_pending_traps: manipulador de sinal é SIG_DFL, enviando novamente %d " +"(%s) para mim mesmo" -#: trap.c:380 -#, fuzzy, c-format +#: trap.c:509 +#, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler: Sinal incorreto %d" +msgstr "trap_handler: sinal incorreto %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "erro ao importar a defini��o da fun��o para `%s'" +msgstr "erro ao importar a definição da função para `%s'" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "nível do shell (%d) muito grande, redefinindo para 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: nenhum contexto de função no atual escopo" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: a variável pode não ter um valor atribuído" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" msgstr "" -#: variables.c:3159 +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: atribuindo inteiro para referência de nome" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: nenhum contexto de função no escopo atual" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: par�metro nulo ou n�o inicializado" +msgstr "%s possui a string de exportação nula" -#: variables.c:3381 variables.c:3390 +# exportstr é uma variável no código fonte do bash (arquivo variiables.c) +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "caractere inválido na %d na exportstr para %s" -#: variables.c:3396 +# exportstr é uma variável no código fonte do bash (arquivo variiables.c) +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "Sem `=' na exportstr para %s" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" +msgstr "pop_var_context: cabeça de shell_variables não é um contexto de função" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: nenhum contexto em no global_variables" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" msgstr "" +"pop_scope: cabeça de shell_variables não é um escopo de ambiente temporário" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: imposs�vel criar: %s" +msgstr "%s: %s: impossível abrir como ARQUIVO" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "" +msgstr "%s: %s: valor inválido para rastrear descritor de arquivo" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: valor de compatibilidade fora dos limites" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2020 Free Software Foundation, Inc." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" +"Licença GPLv3+: GNU GPL versão 3 ou posterior .\n" -#: 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 +#: version.c:86 version2.c:86 #, c-format -msgid "This is free software; you are free to change and redistribute it.\n" -msgstr "" +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versão %s (%s)\n" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Este é um software livre; você é livre para alterar e redistribuí-lo." -#: version2.c:86 -#, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Há NENHUMA GARANTIA, na extensão permitida pela lei." -#: version2.c:87 +#: xmalloc.c:93 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \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)" +msgstr "%s: impossível alocar %lu bytes (%lu bytes alocados)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: imposs�vel alocar %lu bytes (%lu bytes alocados)" +msgstr "%s: impossível alocar %lu bytes" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc: imposs�vel alocar %lu bytes (%lu bytes alocados)" +msgstr "%s: %s:%d: impossível alocar %lu bytes (%lu bytes alocados)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: imposs�vel alocar %lu bytes (%lu bytes alocados)" +msgstr "%s: %s:%d: impossível alocar %lu bytes" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "alias [-p] [NOME[=VALOR] ... ]" +msgstr "alias [-p] [nome[=valor] ... ]" -#: builtins.c:47 -#, fuzzy +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "unalias [-a] [NOME ...]" +msgstr "unalias [-a] nome [nome ...]" -#: builtins.c:51 -#, fuzzy +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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]" +"bind [-lpsvPSVX] [-m mapa-teclas] [-f arquivo] [-q nome] [-u nome] [-r seq-" +"teclas] [-x seq-teclas:comando-shell] [seq-teclas:função-de-readline ou " +"comando-readline]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "builtin [COMANDO-INTERNO-DA-SHELL [ARG ...]]" +msgstr "builtin [COMANDO-INTERNO-SHELL [ARG ...]]" -#: builtins.c:61 -#, fuzzy +#: builtins.c:63 msgid "caller [expr]" -msgstr "test [EXPR]" - -#: builtins.c:64 -#, fuzzy -msgid "cd [-L|-P] [dir]" -msgstr "cd [-PL] [DIR]" +msgstr "caller [EXPR]" #: builtins.c:66 -#, fuzzy -msgid "pwd [-LP]" -msgstr "pwd [-PL]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [DIR]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "" - -#: builtins.c:72 -msgid "false" -msgstr "" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [nome[=valor] ...]" #: builtins.c:80 #, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] nome[=valor] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "local NOME[=VALOR] ..." +msgstr "local [OPÇÃO] NOME[=VALOR] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [ARG ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [ARG ...]" -#: builtins.c:90 -#, fuzzy +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "enable [-pnds] [-a] [-f ARQUIVO] [NOME ...]" +msgstr "enable [-a] [-DnPs] [-f ARQUIVO] [NOME ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts optstring nome [arg ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nome] [comando [argumento ...]] [redirecionamento ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 -#, fuzzy +#: builtins.c:102 msgid "logout [n]" -msgstr "logout" +msgstr "logout [n]" -#: builtins.c:103 -#, fuzzy +#: builtins.c:105 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]" +"fc [-e EDITOR] [-lnr] [PRIMEIRO] [ÚLTIMO] ou fc -s [ANTIGO=NOVO] [COMANDO]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "fg [JOB-ESPECIFICADO]" +msgstr "fg [ESPEC-JOB]" -#: builtins.c:111 -#, fuzzy +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "bg [JOB-ESPECIFICADO]" +msgstr "bg [ESPEC-JOB ...]" -#: builtins.c:114 -#, fuzzy +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "hash [-r] [-p CAMINHO] [NOME ...]" +msgstr "hash [-lr] [-p CAMINHO] [-dt] [NOME ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [PADR�O ...]" +msgstr "help [-dms] [PADRÃO ...]" -#: builtins.c:121 -#, fuzzy +#: builtins.c:123 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...]" +"history [-c] [-d POSIÇÃO] [n] ou history -anrw [ARQUIVO] ou history -ps ARG " +"[ARG...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "jobs [-lnprs] [JOB-ESPECIFICADO ...] ou jobs -x COMANDO [ARGS]" +msgstr "jobs [-lnprs] [ESPEC-JOB ...] ou jobs -x COMANDO [ARGS]" -#: builtins.c:129 -#, fuzzy -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "disown [JOB-ESPECIFICADO ...]" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [ESPEC-JOB ... | pid ...]" -#: builtins.c:132 -#, fuzzy +#: builtins.c:134 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]" +"kill [-s SIGSPEC | -n SIGNUM | -SIGSPEC] PID | ESPEC-JOB ... ou kill -l " +"[SIGSPEC]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let ARG [ARG ...]" -#: builtins.c:136 +#: builtins.c:138 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 TEXTO] [-n NCHARS] [-N NCHARS] [-p " +"CONFIRMAR ] [-t TEMPO] [-u FD] [NOME ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [--abefhkmnptuvxBCHP] [-o NOME-OPÇÃO] [--] [ARG ...]" #: builtins.c:144 -#, fuzzy -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-nf] [NOME ...] ou export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [NOME ...]" #: builtins.c:146 -#, fuzzy -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-anf] [NOME ...] ou readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [NOME[=VALOR] ...] ou export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "exit [n]" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [NOME[=VALOR] ...] ou readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "arquivo fonte" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source arquivo [argumentos]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr ". ARQUIVO" +msgstr ". arquivo [argumentos]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 -msgid "test [expr]" -msgstr "test [EXPR]" - #: builtins.c:160 -msgid "[ arg... ]" -msgstr "[ ARG... ]" +msgid "test [expr]" +msgstr "test [expr]" #: builtins.c:162 -msgid "times" -msgstr "times" +msgid "[ arg... ]" +msgstr "[ arg... ]" -#: builtins.c:164 -#, fuzzy +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "trap [ARG] [SINAL-ESPEC] ou trap -l" +msgstr "trap [-lp] [[arg] espec-sinal ...]" -#: builtins.c:166 -#, fuzzy +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "type [-apt] NOME [NOME ...]" +msgstr "type [-apt] nome [nome ...]" -#: builtins.c:169 +#: builtins.c:171 #, fuzzy -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdfmstpnuv] [LIMITE]" +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [limite]" -#: builtins.c:172 -#, fuzzy +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "umask [-S] [MODO]" +msgstr "umask [-p] [-S] [modo]" -#: builtins.c:175 -#, fuzzy -msgid "wait [id]" -msgstr "wait [n]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:179 -#, fuzzy -msgid "wait [pid]" -msgstr "wait [n]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [PID ...]" -#: builtins.c:182 -#, fuzzy +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for NOME [in PALAVRAS ... ;] do COMANDOS; done" +msgstr "for NOME [in PALAVRAs ...] ; do COMANDOS; done" -#: builtins.c:184 -#, fuzzy +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "for NOME [in PALAVRAS ... ;] do COMANDOS; done" +msgstr "for (( exp1; exp2; exp3 )); do COMANDOS; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NOME [in PALAVRAS ... ;] do COMANDOS; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" -msgstr "" +msgstr "time [-p] linha-comandos" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "case PALAVRA in [PADR�O [| PADR�O]...) COMANDOS ;;]... esac" +msgstr "case PALAVRA in [PADRÃO [| PADRÃO]...) COMANDOS ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2236,102 +2526,106 @@ msgstr "" "if COMANDOS; then COMANDOS; [ elif COMANDOS; then COMANDOS; ]... [ else " "COMANDOS; ] fi" -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while COMANDOS; do COMANDOS; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until COMANDOS; do COMANDOS; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" -msgstr "" +msgstr "coproc [NOME] comando [redirecionamentos]" -#: builtins.c:200 -#, fuzzy +#: builtins.c:202 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]" +msgid "{ COMMANDS ; }" +msgstr "{ COMANDOS ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "esperado uma express�o" +msgid "job_spec [&]" +msgstr "escpec-job [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "esperado uma express�o" +msgid "(( expression ))" +msgstr "(( expressão ))" #: builtins.c:210 -#, fuzzy +msgid "[[ expression ]]" +msgstr "[[ expressão ]]" + +# Não traduzir "variables", esta é uma opção "builtin" do "bash" que é exibida ao executar "help" e acessível com "help variables". +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "As vari�veis da `shell' podem ser operandos. O nome da vari�vel �" +msgstr "variables - Nomes e significados de algumas variáveis do shell" -#: builtins.c:213 -#, fuzzy +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "pushd [DIR | +N | -N] [-n]" +msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 -#, fuzzy +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "popd [+N | -N] [-n]" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 -#, fuzzy +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o OP��O-LONGA] NOME-OP��O [NOME-OP��O...]" +msgstr "shopt [-pqsu] [-o] [nome-opção ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +msgstr "printf [-v var] formato [argumentos]" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o opção] [-A ação] [-G global] [-W " +"lista-palavras] [-F função] [-C comando] [-X filtro] [-P prefixo] [-S " +"sufixo] [nome ...]" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 opção] [-A ação] [-G global] [-W lista-" +"palavras] [-F função] [-C comando] [-X filtro] [-P prefixo] [-S sufixo] " +"[palavra]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "type [-apt] NOME [NOME ...]" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opção] [-DEI] [nome ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"mapfile [-d delim] [-n número] [-O origem] [-s número] [-t] [-u fd] [-C " +"chamada] [-c quantidade] [array]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"readarray [-d delim] [-n número] [-O origem] [-s número] [-t] [-u fd] [-C " +"chamada] [-c quantidade] [array]" -#: builtins.c:254 +# help alias +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2343,27 +2637,48 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 ou exibe apelidos (aliases).\n" +" \n" +" Sem argumentos, `alias' mostra a lista de apelidos no formato usável\n" +" `alias NOME=VALOR' na saída padrão.\n" +" \n" +" Do contrário, um apelido é definido para cada NOME cujo VALOR é dado.\n" +" Um espaço ao final em VALOR resulta na próxima palavra ser verificada\n" +" por substituição de apelido quando o apelido for expandido.\n" +" \n" +" Opções:\n" +" -p\tmostra todos os apelidos definidos em uma formato usável\n" +" \n" +" Status de saída:\n" +" `alias' retorna verdadeiro, a menos que seja fornecido um NOME para\n" +" o qual não se tenha definido um apelido" -#: builtins.c:276 -#, fuzzy +# help unalias +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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," +"Remove cada NOME da lista de apelidos definidos.\n" +" \n" +" Opções:\n" +" -a\tremove todas as definições de apelidos\n" +" \n" +" Retorna sucesso, a menos que NOME não seja um apelido existente." -#: builtins.c:289 +# help bind +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2397,13 +2712,63 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" - -#: builtins.c:326 -#, fuzzy +"Define variáveis e associações de teclas para Readline.\n" +" \n" +" Associa uma sequência de teclas para uma função Readline ou uma macro\n" +" ou define uma variável de Readline. A sintaxe de argumento sem opção é\n" +" equivalente àquela encontrada em ~/.inputrc, mas deve ser passada como\n" +" um argumento singular.\n" +" \n" +" Opções:\n" +" -m mapa-teclas Usa MAPA-TECLAS como mapa de teclas para a duração\n" +" deste comando. Nomes de mapa de teclas aceitáveis\n" +" são emacs, emacs-standard, emacs-meta, emacs-ctlx,\n" +" vi, vi-move, vi-command e vi-insert.\n" +" -l Lista nomes de funções.\n" +" -P Lista nomes e associações de função.\n" +" -p Lista funções e associações em uma forma que pode " +"ser\n" +" usada como entrada.\n" +" -S Lista sequências de teclas que chamam macros e " +"seus\n" +" valores\n" +" -s Lista sequências de teclas que chamam macros e " +"seus\n" +" valores em uma forma que pode ser usada como " +"entrada.\n" +" -V Lista nomes e valores de variáveis\n" +" -v Lista nomes e valores de variáveis em uma forma " +"que\n" +" pode ser usada como entrada.\n" +" -q nome-função Consulta sobre quais teclas chamam a função " +"informada.\n" +" -u nome-função Desassocia todas teclas que estão associadas à " +"função\n" +" informada.\n" +" -r seq-teclas Remove a associação para SEQ-TECLAS.\n" +" -f arquivo Lê associações de tecla de ARQUIVO.\n" +" -x seq-teclas:comando-shell\n" +" Faz com que COMANDO-SHELL seja executado ao " +"inserir\n" +" SEQ-TECLAS.\n" +" -X Lista sequência de teclas associadas com -x e " +"comandos\n" +" associados em uma forma que pode ser usada como\n" +" entrada.\n" +" \n" +" Status de saída:\n" +" `bind' retorna 0 a mesmo que uma opção desconhecida seja fornecida ou\n" +" um erro ocorrer." + +# help break +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2412,10 +2777,17 @@ msgid "" " \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." +msgstr "" +"Sai de loops de for, while ou until.\n" +" \n" +" Sai de um loop de FOR, WHILE ou UNTIL. Se N for especificado, quebra N \n" +" blocos de declaração de loops.\n" +" \n" +" Status de saída:\n" +" O status de saída é 0, a menos que N não seja maior ou igual a 1." -#: builtins.c:338 -#, fuzzy +# help continue +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2424,9 +2796,18 @@ msgid "" " \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." +msgstr "" +"Resume loops de for, while ou until.\n" +" \n" +" Resume a próxima iteração do bloco de declaração de loop de FOR, WHILE\n" +" ou UNTIL.\n" +" Se N for especificado, resume o N-ésimo bloco de declaração de loop.\n" +" \n" +" Status de saída:\n" +" O status de saída é 0, a menos que N não seja maior ou igual a 1." -#: builtins.c:350 +# help builtin +#: builtins.c:354 msgid "" "Execute shell builtins.\n" " \n" @@ -2437,10 +2818,21 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" +"Executa comandos internos (builtin) do shell.\n" +" \n" +" Executa COMANDO-INTERNO-SHELL com argumentos ARGs sem realizar procura\n" +" por comandos. Isso é útil quando você deseja reimplementar um comando\n" +" interno como uma função shell, mas precisa executar o comando interno\n" +" dentro de uma função.\n" +" \n" +" Status de saída:\n" +" Retorna o status de saída de COMANDO-INTERNO-SHELL ou falso, se\n" +" COMANDO-INTERNO-SHELL não for de fato um comando interno de shell." -#: builtins.c:365 +# help caller +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2455,8 +2847,22 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" +"Retorna o contexto da chamada de sub-rotina atual.\n" +" \n" +" Sem EXPR, retorna \"$linha $arquivo\". Com EXPR, retorna\n" +" \"$linha $sub-rotina $arquivo\"; essa informação extra pode ser usada " +"para\n" +" fornecer um rastro da pilha.\n" +" \n" +" O valor de EXPR indica quantos quadros de chamada deve voltar antes do\n" +" atual; o quadro do topo é o quadro 0.\n" +" \n" +" Status de saída:\n" +" Retorna 0, a menos que o shell não esteja executando uma função de\n" +" shell ou EXPR seja inválida." -#: builtins.c:383 +# help cd +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2479,23 +2885,75 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." -msgstr "" - -#: builtins.c:411 +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Altera o diretório de trabalho do shell.\n" +" \n" +" Altera o diretório atual para DIR, sendo o padrão de DIR o mesmo valor\n" +" da variável HOME.\n" +" \n" +" A variável CDPATH define o caminho de pesquisa para o diretório " +"contendo\n" +" DIR. Nomes de diretórios alternativos em CDPATH são separados por\n" +" dois-pontos (:). Um nome de diretório nulo é o mesmo que o diretório\n" +" atual. Se DIR inicia com uma barra (/), então CDPATH não é usada.\n" +" \n" +" Se o diretório não for encontrado e a opção `cdable_vars` estiver " +"definida\n" +" no shell, a palavra é presumida como sendo o nome de uma variável. Se\n" +" tal variável possuir um valor, este valor é usado para DIR.\n" +" \n" +" Opções:\n" +" -L\tforça links simbólicos a serem seguidos: resolver links " +"simbólicos\n" +" \t\tem DIR após processar instâncias de `..'\n" +" -P\tusa a estrutura do diretório físico sem seguir links\n" +" \t\tsimbólicos: resolve links simbólicos em DIR antes de processar\n" +" \t\tinstâncias de `..'\n" +" -e\tse a opção -P for fornecida e o diretório de trabalho atual não\n" +" \t\tpuder ser determinado com sucesso, sai com um status não-zero\n" +" -@\tem sistemas nos quais haja suporte, apresenta um arquivo com\n" +" \t\tatributos estendidos como um diretório contendo os atributos de\n" +" \t\tarquivo\n" +" \n" +" O padrão é seguir links simbólicos, como se `-L' tivesse sido " +"especificada.\n" +" `..' é processada removendo o componente de caminho imediatamente " +"anterior\n" +" de volta para uma barra ou para o início de DIR.\n" +" \n" +" Status de saída:\n" +" Retorna 0, se o diretório tiver sido alterado e se $PWD está definida " +"com\n" +" sucesso quando a opção -P for usada; do contrário, retorna não-zero." + +# help pwd +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2504,9 +2962,21 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Mostra o nome do diretório de trabalho atual.\n" +" \n" +" Opções:\n" +" -L\tmostra o valor de $PWD se ele tiver o nome do diretório de\n" +" \t\ttrabalho atual\n" +" -P\tmostra o diretório físico, sem quaisquer links simbólicos\n" +" \n" +" Por padrão, `pwd' se comporta como se a opção `-L' foi especificada.\n" +" \n" +" Status de saída:\n" +" Retorna 0, a menos que uma opção inválida seja fornecida ou o diretório\n" +" atual não possa ser lido." -#: builtins.c:428 -#, fuzzy +# help : +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2515,25 +2985,41 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" -"Nenhum efeito; o comando n�o faz nada. Retorna zero no c�digo de sa�da." +"Comando nulo.\n" +" \n" +" Nenhum efeito; o comando não faz nada.\n" +" \n" +" Status de saída:\n" +" Sempre com sucesso." -#: builtins.c:439 +# help true +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Retorna um resultado de sucesso.\n" +" \n" +" Status de saída:\n" +" Sempre sucesso." -#: builtins.c:448 +# help false +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"Retorna um resultado de insucesso.\n" +" \n" +" Status de saída:\n" +" Sempre falha." -#: builtins.c:457 +# help command +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2543,16 +3029,32 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Executa um comando simples ou exibe informação sobre comandos.\n" +" \n" +" Executa COMANDO com ARG suprimindo a procura por função do shell ou\n" +" exibe informação sobre os COMANDOs especificados. Pode ser usado para\n" +" chamar comandos no disco quando um função com o mesmo nome existe.\n" +" \n" +" Opções:\n" +" -p\tusa um valor padrão como variável PATH no qual garantidamente\n" +" \t\tse encontram todas os utilitários padrão\n" +" -v\tmostra uma descrição de COMANDO similar ao comando `type'\n" +" -V\tmostra uma descrição detalhada (verboso) para cada COMANDO\n" +" \n" +" Status de saída:\n" +" Retorna status de saída de COMANDO ou falha, se COMANDO não for \n" +" encontrado." -#: builtins.c:476 +# help declare +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2562,17 +3064,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2582,20 +3089,63 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." -msgstr "" - -#: builtins.c:512 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Define valores e atributos de variável.\n" +" \n" +" Declara variáveis e a elas fornece atributos. Se nenhum NOME for " +"fornecido,\n" +" exibe os atributos e valores de todas as variáveis.\n" +" \n" +" Opções:\n" +" -f\trestringe ação ou exibição dos nomes e definições de funções\n" +" -F\trestringe exibição a nomes de função apenas (mais número de linha\n" +" \t\te arquivo fonte, na depuração)\n" +" -g\tcria variáveis globais quando usado em uma função do shell;\n" +" \t\tdo contrário, ignorado\n" +" -p\texibe os atributos e valores de cada NOME\n" +" \n" +" Opções que definem atributos:\n" +" -a\tpara fazer NOMEs serem arrrays indexados (se houver suporte)\n" +" -A\tpara fazer NOMEs serem arrrays associativos (se houver suporte)\n" +" -i\tpara fazer NOMEs terem o atributo `integer'\n" +" -l\tpara converter o valor de cada NOME para minúsculo em sua " +"atribuição\n" +" -n\tfazer de NOME uma referência à variável chamada por seu valor\n" +" -r\tpara fazer de NOMEs somente leitura\n" +" -t\tpara fazer NOMEs terem o atributo `trace'\n" +" -u\tpara converter o valor de cada NOME para maiúsculo em sua " +"atribuição\n" +" -x\tpra fazer NOMEs exportar\n" +" \n" +" Usar `+' ao invés de `-' desliga o atributo dado.\n" +" \n" +" Variáveis com o atributo `integer' têm sua avaliação aritmética (veja o\n" +" comando `let') realizada quando é atribuído um valor à variável.\n" +" \n" +" Quando usado em uma função, `declare' torna NOMEs local, da mesma forma\n" +" que o comando `local'. A opção `-g' suprime este comportamento.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida tenha sido fornecida ou\n" +" ocorrer um erro de atribuição de variável." + +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Define valores e atributos de variável.\n" +" \n" +" Um sinônimo para `declare'. Veja `help declare'." -#: builtins.c:520 +# help local +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2606,15 +3156,32 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Define variáveis locais.\n" +" \n" +" Cria uma variável local chamada NOME e lhe dá VALOR. OPÇÃO pode ser\n" +" qualquer opção aceita pelo `declare'.\n" +" \n" +" Variáveis locais podem ser usadas apenas em uma função; elas são " +"visíveis\n" +" apenas para a função na qual elas foram definidas, bem como para seus\n" +" filhos.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida, ocorrer\n" +" um erro de atribuição de uma variável ou o shell não estiver executando\n" +" uma função." -#: builtins.c:537 +# help echo +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2626,6 +3193,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2633,15 +3201,55 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" - -#: builtins.c:571 +"Escreve argumentos para a saída padrão.\n" +" \n" +" Exibe os ARGs, separados por um único caractere de espaço e seguido\n" +" por uma nova linha, na saída padrão.\n" +" \n" +" Opções:\n" +" -n\tnão anexa uma nova linha\n" +" -e\thabilita interpretação de escapes de contrabarra a seguir\n" +" -E\texplicitação suprime interpretação de escapes de contrabarra\n" +" \n" +" `echo' interpreta os caracteres escapados por contrabarra:\n" +" \\a\talerta (bipe)\n" +" \\b\tbackspace\n" +" \\c\tsuprime futuras saídas\n" +" \\e\tcaractere de escape\n" +" \\E\tcaractere de escape\n" +" \\f\talimentação de formulário (form feed)\n" +" \\n\tnova linha\n" +" \\r\tretorno de carro (carrier return)\n" +" \\t\tTAB horizontal\n" +" \\v\tTAB vertical\n" +" \\\\\tcontrabarra\n" +" \\0nnn\to caractere cujo código ASCII é NNN (octal). NNN pode\n" +" \t\tter 0 a 3 dígitos octais\n" +" \\xHH\to caractere de 8 bits cujo valor é HH (hexadecimal). HH\n" +" \t\tpode ter um ou dois dígitos hexa\n" +" \\uHHHH\to caractere Unicode cujo valor é o valor hexadecimal HHHH.\n" +" \t\tHHHH pode ter um a quatro dígitos hexa.\n" +" \\UHHHHHHHH o caractere Unicode cujo valor é o valor hexadecimal\n" +" \t\tHHHHHHHH. HHHHHHHH pode ter um a oito dígitos hexa.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que ocorra um erro de escrita." + +# help echo +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2653,8 +3261,18 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Escreve argumentos para a saída padrão.\n" +" \n" +" Exibe os ARGs na saída padrão seguido por uma nova linha.\n" +" \n" +" Opções:\n" +" -n\tnão anexa uma nova linha\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que ocorra um erro de escrita." -#: builtins.c:586 +# help enable +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2680,8 +3298,35 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Habilita e desabilita comandos internos do shell.\n" +" \n" +" Habilita e desabilita comandos internos do shell. Desabilitar\n" +" permite que você executa um comando do disco que possui o mesmo\n" +" nome que um outro comando interno sem usar um caminho completo.\n" +" \n" +" Opções:\n" +" -a\tmostra uma lista de comandos internos mostrando se cada\n" +" \t\tum está habilitado\n" +" -n\tdesabilita cada NOME ou exibe uma lista de comandos\n" +" \t\tinternos desabilitados\n" +" -p\texibe a lista de comandos internos em um formato usável\n" +" -s\texibe apenas nomes dos comandos internos 'especial' Posix\n" +" \n" +" Opções de controle de carregamento dinâmico:\n" +" -f\tcarrega comando interno NOME do objeto compartilhado ARQUIVO\n" +" -d\tremove um comando interno carregado com -f\n" +" \n" +" Não sendo informado uma opção, cada NOME é habilitado.\n" +" \n" +" Para usar o `test' encontrado em $PATH, ao invés da versão de comando\n" +" interno do shell, digite `enable -n test'.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que NOME não seja um comando interno de shell\n" +" ou ocorrer um erro." -#: builtins.c:614 +# help eval +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2692,8 +3337,16 @@ msgid "" " Exit Status:\n" " Returns exit status of command or success if command is null." msgstr "" +"Executa argumentos como um comando de shell.\n" +" \n" +" Combina ARGs em uma única string, usa o resultado como entrada para o\n" +" shell, e executa os comandos resultantes.\n" +" \n" +" Status de saída:\n" +" Retorna status de saída do comando ou sucesso, se o comando for nulo." -#: builtins.c:626 +# help getopts +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2726,15 +3379,55 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +"Analisa argumentos de opções.\n" +" \n" +" Getopts é usado pelos procedimentos do shell para analisar parâmetros\n" +" posicionais como opções.\n" +" \n" +" OPÇÕES é uma string que contém as letras de opções a ser reconhecidas;\n" +" se uma letra é seguida por dois-pontos, é esperado que a opção tenha\n" +" um argumento, o que deveria ser separado dela por um espaço em branco.\n" +" \n" +" A cada vez que ele é chamado, getopts coloca a próxima opção\n" +" na variável shell $NOME, inicializando NOME se ela não existir,\n" +" e o índice do próximo argumento a ser processado para dentro da\n" +" variável OPTIND. OPTIND é inicializado para 1 a cada vez que o\n" +" shell ou um script shell é chamado. Quando uma opção requer\n" +" um argumento, getopts coloca aquele argumento em uma variável\n" +" shell chamada OPTARG.\n" +" \n" +" getopts relata erros em um de duas formas. Se o primeiro caractere\n" +" de OPÇÕES for caractere dois-pontos, getopts usa sistema silencioso de\n" +" relatório de erro. Neste modo, nenhuma mensagem de erro é mostrada.\n" +" Se uma opção inválida é vista, getopts coloca o caractere de opção\n" +" encontrada dentro do OPTARG. Se um argumento obrigatório não for\n" +" encontrado, getopts coloca um ':' em NOME e define OPTARG para o\n" +" caractere de opção encontrada. Se getopts não estiver no modo\n" +" silencioso, uma opção inválida é vista, getopts coloca um '?' em\n" +" NOME e remove definição de OPTARG. Se um argumento obrigatório não\n" +" for encontrado, um '?' é colocado em NOME, OPTARG tem sua definição\n" +" removida e uma mensagem de diagnóstico é mostrada.\n" +" \n" +" Se a variável shell OPTERR possuir o valor 0, getopts desabilita a\n" +" exibição de mensagens de erro, mesmo se o primeiro caractere de\n" +" OPÇÕES não for dois-pontos. OPTERR tem o valor por padrão.\n" +" \n" +" Getopts normalmente analisa os parâmetros posicionais, mas se mais\n" +" argumentos forem fornecidos, eles serão analisados.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se uma opção for encontrada; falha se o fim das opções\n" +" for encontrado ou ocorrer um erro." + +# help exec +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -2745,8 +3438,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2756,17 +3449,40 @@ msgid "" " Returns success unless COMMAND is not found or a redirection error " "occurs." msgstr "" +"Substitui o shell com o comando fornecido.\n" +" \n" +" Executa COMANDO, substituindo o shell com o programa especificado.\n" +" ARGUMENTOS se tornam os argumentos para COMANDO. Se COMANDO não for\n" +" especificado, quaisquer redirecionamentos surtem efeito no shell\n" +" atual.\n" +" \n" +" Opções:\n" +" -a nome\tpassa NOME como argumento zero para COMANDO\n" +" -c\texecuta COMANDO com um ambiente vazio\n" +" -l\tcoloca um traço no argumento zero para COMANDO\n" +" \n" +" Se o comando não puder ser executado, um shell não-interativo sai,\n" +" a menos que a opção `execfail' esteja definida.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que COMANDO não seja encontrado ou ocorrer um\n" +" erro no redirecionamento." -#: builtins.c:689 -#, fuzzy +# help exit +#: builtins.c:715 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" +msgstr "" +"Sai do shell.\n" +" \n" +" Sai do shell com status igual a N. Se N for omitido, o status\n" +" de saída é o mesmo do último comando executado." -#: builtins.c:698 +# help exit +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2774,8 +3490,13 @@ msgid "" "executed\n" " in a login shell." msgstr "" +"Sai de um shell de login.\n" +" \n" +" Sai de um shell de login com o status de saída N. Retorna um erro\n" +" se não for executada em um shell de login." -#: builtins.c:708 +# help fc +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2804,9 +3525,34 @@ msgid "" " Returns success or status of executed command; non-zero if an error " "occurs." msgstr "" +"Exibe ou executa comandos da lista do histórico.\n" +" \n" +" fc é usado para listar ou editar e re-executar comandos da lista de\n" +" histórico. PRIMEIRO e ÚLTIMO podem ser números especificando o " +"intervalo\n" +" ou PRIMEIRO pode ser uma string, o que significa o comando mais recente\n" +" iniciando com aquela string.\n" +" \n" +" Opções:\n" +" -e EDITOR\tseleciona qual editor usar. O padrão é FCEDIT,\n" +" \t\t\tentão EDITOR, então vi\n" +" -l\t\tlista linhas ao invés de editar\n" +" -n\t\tomite números de linhas ao listar\n" +" -r\t\tordem reversa de linhas (mais novos listados primeiro)\n" +" \n" +" Com o formato `fc -s [ANTIGO=NOVO ...] [COMANDO]', COMANDO é\n" +" re-executado após a substituição ANTIGO=NOVO ser realizada.\n" +" \n" +" Um apelido útil para usar isso é r='fc -s', de forma que digitar `r cc'\n" +" executa o último comando iniciando com `cc' e digitar `r' re-executa\n" +" o último comando.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso ou status do comando executado; ocorrendo um erro,\n" +" retorna não-zero." -#: builtins.c:738 -#, fuzzy +# help fg +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2817,9 +3563,18 @@ msgid "" " 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." +"Move um trabalho para o primeiro plano.\n" +" \n" +" Coloca o trabalho identificado por ESPEC-JOB em primeiro plano,\n" +" tornando o trabalho atual. Se ESPEC-JOB não estiver presente,\n" +" a noção do shell de trabalho atual é usada.\n" +" \n" +" Status de saída:\n" +" Status do comando colocado em primeiro plano ou falha, se ocorrer um " +"erro." -#: builtins.c:753 +# help bg +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2832,8 +3587,18 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Move trabalhos para o plano de fundo.\n" +"\n" +" Coloca os trabalhos identificados por ESPEC-JOB em plano de fundo,\n" +" como se eles tivessem sido iniciado com `&'. Se ESPEC-JOB não\n" +" estiver presente, a noção do shell de trabalho atual é usada.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que controle de trabalho não esteja\n" +" habilitado ou ocorra um erro." -#: builtins.c:767 +# help hash +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -2842,22 +3607,44 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +"Memoriza ou exibe localizações de programas.\n" +" \n" +" Determina e memoriza do caminho completo de cada comando NOME. Se " +"nenhum\n" +" argumento for fornecido, exibe informação sobre comandos memorizados.\n" +" \n" +" Opções:\n" +" -d\t\tesquece a localização memorizada de cada NOME\n" +" -l\t\texibe em um formato que pode ser usado como entrada\n" +" -p caminho\tusa CAMINHO como o caminho completo de NOME\n" +" -r\t\tesquece de todas as localizações memorizadas\n" +" -t\t\tmostra a localização memorizada de cada NOME, iniciando\n" +" \t\t\tcada localização com o NOME correspondente, se múltiplos\n" +" \t\t\tNOMEs forem fornecidos\n" +" Argumentos:\n" +" NOME\t\tCada NOME é pesquisado em $PATH e adicionado à lista de\n" +" \t\t\tcomandos memorizados.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que NOME não seja encontrado ou uma opção\n" +" inválida seja fornecida." + +# help help +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2869,17 +3656,35 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " "given." msgstr "" +"Exibe informação sobre comandos internos (builtin).\n" +" \n" +" Exibe resumos de comandos internos. Se PADRÃO for especificado,\n" +" fornece ajuda detalhada sobre todos os comandos correspondendo\n" +" a PADRÃO; do contrário, a lista de tópicos de ajuda é mostrada.\n" +" \n" +" Opções:\n" +" -d\texibe uma descrição breve para cada tópico\n" +" -m\texibe o uso em formato de pseudo página man\n" +" -s\texibe apenas uma breve sinopse de uso para cada tópico\n" +" \t\tcorrespondendo a PADRÃO\n" +" \n" +" Argumentos:\n" +" PADRÃO\tPadrão especificando um tópico de ajuda\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que PADRÃO não seja encontrado ou uma opção\n" +" inválida seja fornecida." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2888,23 +3693,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -2912,8 +3718,44 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Exibe ou manipula a lista de histórico.\n" +" \n" +" Exibe a lista de histórico com números de linhas, prefixando cada\n" +" entrada modificada com um `*'. Um argumento de N lista apenas as\n" +" últimas N entradas.\n" +" \n" +" Opções:\n" +" -c\t\tlimpa a lista de histórico ao excluir todas as entradas\n" +" -d posição\texclui a entrada de histórico na posição POSIÇÃO. " +"Posições\n" +" \t\t\tnegativas contam a partir do fim da lista de histórico\n" +" \n" +" -a\t\tanexa linhas de histórico desta sessão no arquivo de\n" +" \t\t\thistórico\n" +" -n\t\tlê todas as linhas de histórico ainda não lidas do\n" +" \t\t\tarquivo de histórico e anexa-os à lista de histórico\n" +" -r\t\tlê o histórico e anexa os conteúdos à lista de histórico\n" +" -w\t\tescreve o histórico atual para o arquivo de histórico\n" +" \n" +" -p\t\texecuta expansão de histórico em cada ARG e exibe o\n" +" \t\t\tresultado sem armazená-lo na lista de histórico\n" +" -s\t\tanexa os ARGs à lista de histórico como uma única entrada\n" +" \n" +" Se ARQUIVO for fornecido, ele é usado como o arquivo de histórico.\n" +" Do contrário, se a variável HISTFILE tiver um valor, este será usado;\n" +" senão, usa de ~/.bash_history.\n" +" \n" +" Se a variável HISTTIMEFORMAT for definida e não for nula, seu valor é\n" +" usado como uma string de formato para strftime(3) para mostrar a marca\n" +" de tempo associada com cada entrada de histórico exibida. Do contrário,\n" +" nenhuma marca de tempo é mostrada.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." -#: builtins.c:852 +# help jobs +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2922,8 +3764,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2936,8 +3778,30 @@ msgid "" " Returns success unless an invalid option is given or an error occurs.\n" " If -x is used, returns the exit status of COMMAND." msgstr "" +"Exibe status de trabalhos.\n" +" \n" +" Lista os trabalhos ativos. ESPEC-JOB restringe a saída àquele trabalho.\n" +" Não sendo informado qualquer opção, o status de todos os trabalhos\n" +" ativos é exibido.\n" +" \n" +" Opções:\n" +" -l\tlista IDs de processo junto com a informação normal\n" +" -n\tlista apenas processos que tiverem seu status alterado desde\n" +" \t\ta última notificação\n" +" -p\tlista apenas IDs de processo\n" +" -r\trestringe a saída apenas a trabalhos em execução\n" +" -s\trestringe a saída apenas a trabalhos parados\n" +" \n" +" Se -x for fornecido, COMANDO é executado após as demais especificações\n" +" de trabalho que aparecerem em ARGs terem sido substituídas com o ID de\n" +" processo daquele líder de grupo de processos do trabalhos.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro. Se -x for usado, retorna o status de saída do COMANDO." -#: builtins.c:879 +# help disown +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2947,14 +3811,29 @@ msgid "" " 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" +" \t\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 trabalhos do shell atual.\n" +" \n" +" Remove cada argumento ESPEC-JOB da tabela de trabalhos ativos. Sem\n" +" qualquer ESPEC-JOB, o shell usa sua noção de trabalho atual.\n" +" \n" +" Opções:\n" +" -a\tremove todos os trabalhos se ESPEC-JOB não for fornecido\n" +" -h\tmarca cada ESPEC-JOB, de forma que SIGHUP não seja fornecido\n" +" \t\tao trabalho, caso o shell receba um SIGHUP\n" +" -r\tremove apenas trabalhos em execução\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida ou ESPEC-JOB inválido\n" +" sejam fornecidos." -#: builtins.c:898 +# help kill +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2966,7 +3845,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2975,8 +3855,31 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" - -#: builtins.c:921 +"Envia um sinal para um trabalho.\n" +"\n" +" Envia aos processos identificados pelo PID ou pelo ESPEC-JOB o sinal\n" +" informado por SIGSPEC ou SIGNUM. Se SIGSPEC e SIGNUM\n" +" não estiverem presentes, então, SIGTERM é presumido.\n" +" \n" +" Opções:\n" +" -s sinal\tSINAL especifica o nome do sinal\n" +" -n sinal\tSINAL representa um número de sinal\n" +" -l\tlista os nomes dos sinais; se `-l' for acompanhado por\n" +" \t\toutros argumentos, presume-se estes sejam números de\n" +" \t\tsinais para os quais nomes deveriam ser listados\n" +" -L\tsinônimo de -l\n" +" \n" +" `Kill' é um comando interno do shell por duas razões: ele permite\n" +" IDs de trabalho serem usados ao invés de IDs de processo e permite\n" +" que processos sejam matados caso o limite de processos que você pode\n" +" criar seja atingido.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help let +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3018,10 +3921,52 @@ msgid "" " 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 +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Avalia expressões aritméticas.\n" +" \n" +" Avalia cada ARG como uma expressão aritmética. A avaliação é feita\n" +" em inteiros com largura fixa com nenhuma verificação de estouro de\n" +" pilha. A lista de operadores a seguir está agrupada em níveis de\n" +" operadores de igual precedência. Os níveis estão listados em ordem\n" +" de precedência decrescente.\n" +" \n" +" \tid++, id-- pós-acréscimo, pós-decréscimo de variável\n" +" \t++id, --id pré-acréscimo, pré-decréscimo de variável\n" +" \t-, + menos, mais unário\n" +" \t!, ~ negação lógica e bit-a-bit\n" +" \t** exponenciação\n" +" \t*, /, % multiplicação, divisão, resto de divisão\n" +" \t+, - adição, subtração\n" +" \t<<, >> deslocamento bit-a-bit para esquerda, direita\n" +" \t<=, >=, <, > comparação\n" +" \t==, != igualdade, desigualdade\n" +" \t& E (AND) bit-a-bit\n" +" \t^ OU eXclusivo (XOR) bit-a-bit\n" +" \t| OU (OR) bit-a-bit\n" +" \t&& E lógico\n" +" \t|| OU lógico\n" +" \texpr ? expr : expr operador condicional\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |= atribuição\n" +" \n" +" As variáveis de shell são permitidas como operandos. O nome da\n" +" variável é substituída pelo seu valor (coagida a um inteiro com\n" +" largura fixa) dentro de uma expressão. A variável não precisa ter\n" +" seu atributo de `inteiro' ligado para ser usada em uma expressão.\n" +" \n" +" Operadores são avaliados em ordem de precedência. Sub-expressões em\n" +" parênteses são avaliados primeiro e podem sobrescrever as regras de\n" +" precedência acima.\n" +" \n" +" Status de saída:\n" +" Se o último ARG for avaliado como 0, let retorna 1; do contrário,\n" +" let retorna 0." + +# help read +#: builtins.c:994 +#, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -3032,7 +3977,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3042,34 +3989,93 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" - -#: builtins.c:1009 +"Lê uma linha da entrada padrão e separa em campos.\n" +"\n" +" Lê uma linha da entrada padrão ou do descritor de arquivo FD, caso a\n" +" opção -u seja fornecida. A linha é separada em campos, na mesma forma " +"de\n" +" separação de palavras, e a primeira palavra é atribuída ao primeiro " +"NOME,\n" +" o segundo ao segundo NOME e por aí vai, com qualquer palavras restantes\n" +" atribuídas para o último NOME. Apenas os caracteres encontrados em $IFS\n" +" são reconhecidos como delimitadores de palavras.\n" +" \n" +" Se nenhum NOME for fornecido, a linha lida é armazenada na variável\n" +" REPLY (resposta).\n" +" \n" +" Opções:\n" +" -a array atribui as palavras lidas a índices sequenciais da\n" +" variável array ARRAY, iniciando em zero\n" +" -d delim continua até o primeiro caractere de DELIM ser lido, ao\n" +" invés de nova linha\n" +" -e usa Readline para obter a linha\n" +" -i texto usa TEXTO como o texto inicial para Readline\n" +" -n nchars retorna após ler NCHARS caracteres, ao invés de esperar\n" +" por uma nova linha, mas respeita um delimitador se " +"número\n" +" de caracteres menor que NCHARS sejam lidos antes do\n" +" delimitador\n" +" -N nchars retorna apenas após ler exatamente NCHARS caracteres, a\n" +" menos que EOF (fim do arquivo) seja encontrado ou " +"`read'\n" +" esgote o tempo limite, ignorando qualquer delimitador\n" +" -p prompt mostra a string PROMPT sem remover nova linha antes de\n" +" tentar ler\n" +" -r não mostra barra invertida para escapar quaisquer\n" +" caracteres\n" +" -s não ecoa entrada vindo de um terminal\n" +" -t tempo esgota-se o tempo limite e retorna falha, caso uma toda\n" +" uma linha não seja lida em TEMPO segundos. O valor da\n" +" variável TMOUT é o tempo limite padrão. TEMPO pode ser " +"um\n" +" número fracionado. SE TEMPO for 0, `read' retorna " +"sucesso\n" +" apenas se a entrada estiver disponível no descritor de\n" +" arquivo especificado. O status de saída é maior que " +"128,\n" +" se o tempo limite for excedido\n" +" -u fd lê do descritor de arquivo FD, ao invés da entrada " +"padrão\n" +" \n" +" Status de saída:\n" +" O código de retorno é zero, a menos que o EOF (fim do arquivo) seja\n" +" encontrado, `read' esgote o tempo limite (caso em que o código de " +"retorno\n" +" será 128), ocorra erro de atribuição de uma variável ou um descritor de\n" +" arquivo inválido seja fornecido como argumento para -u." + +# help return +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3080,8 +4086,18 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Retorna de uma função de shell.\n" +" \n" +" Causa uma função ou script carregado (source) a sair retornando o valor\n" +" especificado por N. Se N for omitido, o status de retorno é do último\n" +" comando executado dentro da função ou script.\n" +" \n" +" Status de saída:\n" +" Retorna N ou falha se o shell não estiver executando uma função ou\n" +" script." -#: builtins.c:1022 +# help set +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3147,9 +4163,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3162,8 +4182,108 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" - -#: builtins.c:1104 +"Define ou remove definição de valores das opções e dos parâmetros " +"posicionais\n" +"do shell:\n" +" \n" +" Altera o valor de opções e de parâmetros posicionais do shell ou mostra\n" +" os nomes ou valores de variáveis shell.\n" +" \n" +" Opções:\n" +" -a Marca variáveis, que foram modificadas ou criadas, para " +"exportação.\n" +" -b Notifica sobre terminação de trabalho imediatamente.\n" +" -e Sai imediatamente se um comando sai com um status não-zero.\n" +" -f Desabilita a geração de nome de arquivo (\"globbing\").\n" +" -h Memoriza a localização de comandos à medida em que são " +"procurados.\n" +" -k Todos argumentos de atribuição são colocados no ambiente para um\n" +" comando, e não apenas aqueles que precedem o nome do comando.\n" +" -m Controle de trabalho está habilitado.\n" +" -n Lê comandos, mas não os executa.\n" +" -o nome-opção\n" +" Define a variável correspondendo a nome-opção:\n" +" allexport mesmo que -a\n" +" braceexpand mesmo que -B\n" +" emacs usa interface de edição de linha estilo Emacs\n" +" errexit mesmo que -e\n" +" errtrace mesmo que -E\n" +" functrace mesmo que -T\n" +" hashall mesmo que -h\n" +" histexpand mesmo que -H\n" +" history habilita histórico de comandos\n" +" ignoreeof shell não vai sair após leitura de EOF\n" +" interactive-comments\n" +" permite mostrar comentários em comandos " +"interativos\n" +" keyword mesmo que -k\n" +" monitor mesmo que -m\n" +" noclobber mesmo que -C\n" +" noexec mesmo que -n\n" +" noglob mesmo que -f\n" +" nolog atualmente aceito, mas ignorado\n" +" notify mesmo que -b\n" +" nounset mesmo que -u\n" +" onecmd mesmo que -t\n" +" physical mesmo que -P\n" +" pipefail o valor de retorno de uma linha de comandos é o\n" +" status do último comando a sair com status não-" +"zero,\n" +" ou zero se nenhum comando saiu com status não " +"zero\n" +" posix altera o comportamento do bash, onde a operação\n" +" padrão diverge dos padrões do Posix para\n" +" corresponder a estes padrões\n" +" privileged mesmo que -p\n" +" verbose mesmo que -v\n" +" vi usa interface de edição de linha estilo vi\n" +" xtrace mesmo que -x\n" +" -p Ligado sempre que IDs de usuário real e efetivo não " +"corresponderem.\n" +" Desabilita processamento do arquivo $ENV e importação de funções " +"da\n" +" shell. Ao desligar essa opção, causa o uid e o gid efetivo serem\n" +" os uid e gid reais.\n" +" -t Sai após a leitura e execução de um comando.\n" +" -u Trata limpeza (unset) de variáveis como um erro quando " +"substituindo.\n" +" -v Mostra linhas de entrada do shell na medida em que forem lidas.\n" +" -x Mostra comandos e seus argumentos na medida em que forem " +"executados.\n" +" -B o shell vai realizar expansão de chaves\n" +" -C Se definido, não permite arquivos normais existentes serem\n" +" sobrescritos por redirecionamento da saída.\n" +" -E Se definido, a armadilha ERR é herdada por funções do shell.\n" +" -H Habilita substituição de histórico estilo \"!\". Essa sinalização " +"está\n" +" habilitada por padrão quando shell é interativa.\n" +" -P Se definida, não resolve links simbólicos ao sair de comandos, " +"tais\n" +" como `cd' (que altera o diretório atual).\n" +" -T Se definido, a armadilha DEBUG e RETURN são herdadas por funções " +"do shell.\n" +" -- Atribui quaisquer argumentos restantes aos parâmetros " +"posicionais.\n" +" Se não houver argumentos restantes, os parâmetros posicionais são\n" +" limpos (unset).\n" +" - Atribui quaisquer argumentos restantes aos parâmetros " +"posicionais.\n" +" As opções -x e -v são desligadas.\n" +" \n" +" Usar +, ao invés de -, causa essas sinalizações serem desligadas. As\n" +" sinalizações também podem ser usadas por meio de chamada do shell. As\n" +" sinalizações atualmente definidas podem ser encontradas em $-. Os n " +"ARGs\n" +" restantes são parâmetros posicionais e são atribuídos, em ordem, a $1, " +"$2,\n" +" .. $n. Se nenhuma ARG for fornecido, todas as variáveis shell são\n" +" mostradas.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida." + +# help unset +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3172,6 +4292,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3182,8 +4304,27 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Remove valores e atributos de variáveis e funções do shell.\n" +" \n" +" Para cada NOME, remove a variável ou função correspondente.\n" +" \n" +" Opções:\n" +" -f trata cada NOME como uma função de shell\n" +" -v trata cada NOME como uma variável de shell\n" +" -n trata cada NOME como um nome referência e remove o valor em si\n" +" ao invés da variável a qual ele se refere\n" +" \n" +" Se opções, `unset' primeiro tenta remover uma variável e, se falhar,\n" +" tenta remover uma função.\n" +" \n" +" Algumas variáveis não podem ser removida; veja também `readonly'.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" um NOME seja somente-leitura." -#: builtins.c:1124 +# help export +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3201,8 +4342,26 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Define atributo de exportação para variáveis shell.\n" +" \n" +" Marca cada NOME para exportação automática para o ambiente dos comandos\n" +" executados subsequentemente. Se VALOR for fornecido, atribui VALOR " +"antes\n" +" de exportar.\n" +" \n" +" Opções:\n" +" -f\tfaz referência a funções do shell\n" +" -n\tremove a propriedade de exportação para cada NOME\n" +" -p\texibe uma lista de todas as variáveis e funções exportadas\n" +" \n" +" Um argumento de `--' desabilita processamento de opções posteriores.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" NOME seja inválido." -#: builtins.c:1143 +# help readonly +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3214,15 +4373,35 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 variáveis shell como inalteráveis.\n" +" \n" +" Marca cada NOME como somente-leitura; os valores desses NOMEs pode não\n" +" ser alterados por atribuídos subsequentes. Se VALOR for fornecido,\n" +" atribui VALOR antes de marcar como somente-leitura.\n" +" \n" +" Opções:\n" +" -a\tfaz referência a variáveis array indexados\n" +" -A\tfaz referência a variáveis array associativos\n" +" -f\tfaz referência a funções de shell\n" +" -p\texibe uma lista de todas as variáveis ou funções somente-leitura,\n" +" \t\tdependendo da opção -f ser informada ou não\n" +" \n" +" Um argumento de `--' desabilita processamento de opções posteriores.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" NOME seja inválido." -#: builtins.c:1164 +# help shift +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3232,8 +4411,17 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Desloca parâmetros posicionais.\n" +" \n" +" Renomeia os parâmetros posicionais $N+1,$N+2 ... até $1,$2 ... Se N " +"não\n" +" for fornecido, presume-se que ele seja 1.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que N seja negativo ou maior que $#." -#: builtins.c:1176 builtins.c:1191 +# help source +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3246,8 +4434,19 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"Executa comandos de um arquivo no shell atual.\n" +" \n" +" Lê e executa comandos de ARQUIVO no shell atual. As entradas em\n" +" $PATH são usadas para localizar o diretório contendo ARQUIVO. Se\n" +" quaisquer ARGUMENTOS forem fornecidos, eles se tornam parâmetros\n" +" posicionais quando ARQUIVO é executado.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado em ARQUIVO; falha se\n" +" ARQUIVO não puder ser lido." -#: builtins.c:1207 +# help suspend +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3260,15 +4459,30 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Suspende execução do shell.\n" +" \n" +" Suspende a execução deste shell até que receba um sinal SIGCONT.\n" +" A menos que seja forçado, `shells` de login não podem ser suspensas.\n" +" \n" +" Opções:\n" +" -f\tforça a suspensão, ainda que o shell seja um de login\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que controle de trabalho não esteja habilitado\n" +" ou ocorra um erro." -#: builtins.c:1223 +# help test +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3322,6 +4536,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3337,17 +4554,108 @@ msgid "" " 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 +"Avalia expressão condicional.\n" +" \n" +" Sai com um status de 0 (verdadeiro) ou 1 (falso) dependendo da " +"avaliação\n" +" de EXPR. As expressões podem ser unárias ou binárias. Expressões " +"unárias\n" +" são normalmente usadas para examinar o status de um arquivo. Há\n" +" operadores de strings e também há operadores de comparação numérica.\n" +" \n" +" O comportamento do teste depende do número de argumentos. Leia a página\n" +" de manual do `bash' para a especificação completa.\n" +" \n" +" Operadores de arquivos:\n" +" \n" +" -a ARQUIVO Verdadeiro, se arquivo existir.\n" +" -b ARQUIVO Verdadeiro, se arquivo for um bloco especial.\n" +" -c ARQUIVO Verdadeiro, se arquivo for um caractere especial.\n" +" -d ARQUIVO Verdadeiro, se arquivo for um diretório.\n" +" -e ARQUIVO Verdadeiro, se arquivo existir.\n" +" -f ARQUIVO Verdadeiro, se arquivo existir e for um arquivo " +"normal.\n" +" -g ARQUIVO Verdadeiro, se arquivo for set-group-id.\n" +" -h ARQUIVO Verdadeiro, se arquivo for um link simbólico.\n" +" -L ARQUIVO Verdadeiro, se arquivo for um link simbólico.\n" +" -k ARQUIVO Verdadeiro, se arquivo tiver o bit `sticky' definido.\n" +" -p ARQUIVO Verdadeiro, se arquivo for um `pipe' dado.\n" +" -r ARQUIVO Verdadeiro, se arquivo for um legível por você.\n" +" -s ARQUIVO Verdadeiro, se arquivo existir e não estiver vazio.\n" +" -S ARQUIVO Verdadeiro, se arquivo for um socket.\n" +" -t FD Verdadeiro, se FD estiver aberto em um terminal.\n" +" -u ARQUIVO Verdadeiro, se arquivo estiver com set-user-id.\n" +" -w ARQUIVO Verdadeiro, se arquivo puder ser escrito por você.\n" +" -x ARQUIVO Verdadeiro, se arquivo puder ser executado por você.\n" +" -O ARQUIVO Verdadeiro, se arquivo efetivamente for seu (owned).\n" +" -G ARQUIVO Verdadeiro, se arquivo efetivamente for do seu grupo.\n" +" -N ARQUIVO Verdadeiro, se arquivo foi modificado desde a última\n" +" leitura.\n" +" \n" +" ARQ1 -nt ARQ2 Verdadeiro se ARQ1 for mais novo que ARQ2, conforme\n" +" última data de modificação.\n" +" \n" +" ARQ1 -ot ARQ2 Verdadeiro, se ARQ1 for mais velho que ARQ2.\n" +" \n" +" ARQ1 -ef ARQ2 Verdadeiro, se ARQ1 for um link rígido para ARQ2.\n" +" \n" +" Operadores de string:\n" +" \n" +" -z STRING Verdadeiro, se string estiver vazia.\n" +" \n" +" -n STRING\n" +" STRING Verdadeiro, se string não estiver vazia.\n" +" \n" +" STRING1 = STRING2\n" +" Verdadeiro, se strings forem iguais.\n" +" STRING1 != STRING2\n" +" Verdadeiro, se strings não forem iguais.\n" +" STRING1 < STRING2\n" +" Verdadeiro, se STRING1 estiver antes de STRING2, de\n" +" acordo com a ordem alfabética.\n" +" STRING1 > STRING2\n" +" Verdadeiro, se STRING1 estiver depois de STRING2, de\n" +" acordo com a ordem alfabética.\n" +" \n" +" Outros operadores:\n" +" \n" +" -o OPÇÃO Verdadeiro, se a opção shell OPÇÃO estiver habilitada.\n" +" -v VAR Verdadeiro, se a variável shell VAR estiver definida.\n" +" -R VAR Verdadeiro, se a variável shell VAR estiver definida\n" +" e for uma referência de nome.\n" +" ! EXPR Verdadeiro, se a expressão EXPR for falsa.\n" +" EXPR1 -a EXPR2 Verdadeiro, se ambas EXPR1 e EXPR2 forem verdadeiras.\n" +" EXPR1 -o EXPR2 Verdadeiro, se ao menos uma das expressões for " +"verdadeira.\n" +" \n" +" arg1 OP arg2 Testes aritméticos. OP é um dentre -eq, -ne, -lt, -" +"le,\n" +" -gt, or -ge.\n" +" \n" +" Operadores binários de aritmética retornam verdadeiro se ARG1 for " +"igual,\n" +" não-igual, menor-que, menor-ou-igual-a ou maior-ou-igual-a ARG2.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se EXPR for avaliada como verdadeira; falha, se EXPR " +"for\n" +" avaliada como falsa ou um argumento inválido for informado." + +# help [ +#: builtins.c:1344 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." +msgstr "" +"Avalia expressões condicionais.\n" +" \n" +" Esse é um sinônimo para o comando interno `test', mas o último\n" +" argumento deve ser um `]' literal, para corresponder ao `[' que abriu." -#: builtins.c:1308 +# help times +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3358,8 +4666,16 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" +"Exibe tempos de processos.\n" +" \n" +" Imprime os tempos de sistema e de usuário acumulados pelo shell e\n" +" todos seus processo filhos.\n" +" \n" +" Status de saída:\n" +" Sempre com sucesso." -#: builtins.c:1320 +# help trap +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3375,7 +4691,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3394,8 +4718,45 @@ msgid "" " Returns success unless a SIGSPEC is invalid or an invalid option is " "given." msgstr "" - -#: builtins.c:1352 +"Tratamento de sinais e outros eventos.\n" +" \n" +" Define e ativa manipuladores a serem executados quando o shell recebe\n" +" sinais ou outras condições.\n" +" \n" +" ARG é um comando a ser lido e executado quando o shell recebe o\n" +" ESPEC-SINAL do(s) sinal(is). Se ARG for vazio (e um único ESPEC-SINAL\n" +" for informado) ou `-', cada sinal especificado é redefinido para seu\n" +" valor original. Se ARG for uma string nula, cada ESPEC-SINAL é ignorado\n" +" pela seu shell e pelos comados chamados por ela.\n" +" \n" +" Se um ESPEC-SINAL for EXIT (0), ARG é executado na saída do shell.\n" +" Se ESPEC-SINAL for DEBUG, ARG é executado antes de todo comando.\n" +" Se ESPEC-SINAL for RETURN, ARG é executado toda vez que uma função ou\n" +" um script shell executados pelos comandos internos `.' ou `source'\n" +" finalizarem suas execuções. Um ESPEC-SINAL sendo ERR significa executar\n" +" ARG toda vez que uma falha do comando poderia causar o shell sair,\n" +" quando a opção -e está habilitada.\n" +" \n" +" Se nenhum argumento for fornecido, `trap' imprime a lista de comandos\n" +" associados a cada sinal.\n" +" \n" +" Opções:\n" +" -l\timprime uma lista de nomes de sinais e seus números\n" +" \t\tcorrespondentes\n" +" -p\texibe os comandos associados ao tratamento com cada\n" +" \t\tESPEC-SINAL\n" +" \n" +" Cada ESPEC-SINAL é um nome de sinal em ou um número\n" +" de sinal. Nomes de sinais são sensíveis a caracteres maiúsculo e\n" +" minúsculo e o prefixo SIG (sinal) é opcional. Um SINAL pode ser enviado\n" +" para o shell com \"kill -SINAL $$\".\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que um ESPEC-SINAL seja inválido ou\n" +" uma opção inválida seja fornecida." + +# help type +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3404,18 +4765,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3424,8 +4785,35 @@ msgid "" " Returns success if all of the NAMEs are found; fails if any are not " "found." msgstr "" - -#: builtins.c:1383 +"Exibe informação sobre o tipo de comando.\n" +" \n" +" Para cada NOME, indica como ele seria interpretado se fosse usado como\n" +" um nome de comando.\n" +" \n" +" Opções:\n" +" -a\texibe todas as localizações contendo um executável chamado NOME;\n" +" \t\tinclui apelidos (alias), comandos internos e funções,\n" +" \t\tse, e somente se, a opção `-p' não for usada em conjunto\n" +" -f\tsuprime a procura por função do shell\n" +" -P\tforça uma pesquisa em PATH por cada NOME, mesmo se ele for\n" +" \t\tum apelido, um comando interno ou uma função, e retorna o nome\n" +" \t\tdo arquivo de disco que seria executado\n" +" -p\tretorna o nome do arquivo de disco que seria executado ou nada,\n" +" \t\tse `type -t NOME' não retornasse `file'\n" +" -t\tmostra uma única palavra que é uma dentre `alias', `keyword',\n" +" \t\t`function', `builtin', `file' ou `', se NOME for um apelido,\n" +" \t\tpalavra reservada da shell, comando interno do shell,\n" +" \t\tarquivo de disco ou não encontrado, respectivamente\n" +" \n" +" Argumentos:\n" +" NOME\tNome de comando a ser interpretado.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se todos os NOMEs forem encontrados; falha, se algum\n" +" deles não for encontrado." + +# help ulimit +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" @@ -3443,6 +4831,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3454,6 +4843,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3468,8 +4862,56 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1428 +"Modifica limites de recursos do shell.\n" +" \n" +" Fornece controle sobre os recursos disponíveis para o shell e\n" +" os processos que ele cria, em sistemas que permitem tal controle.\n" +" \n" +" Opções:\n" +" -S\tusa um limite `soft' de recursos\n" +" -H\tusa um limite `hard' de recursos\n" +" -a\ttodos os limites atuais são relatados\n" +" -b\to tamanho do buffer do socket\n" +" -c\to tamanho máximo dos arquivos centrais criados\n" +" -d\to tamanho máximo de um segmento de dados do processo\n" +" -e\ta prioridade máxima de agendamento (`nice')\n" +" -f\to tamanho máximo de arquivos escritos pelo shell e seus filhos\n" +" -i\to número máximo de sinais pendentes\n" +" -k\to número máximo de kqueues alocadas para este processo\n" +" -l\to tamanho máximo que um processo pode alocar da memória\n" +" -m\to tamanho máximo de conjunto residente\n" +" -n\to número máximo de descritores de arquivo abertos\n" +" -p\to tamanho de buffer de `pipe'\n" +" -q\to número máximo de bytes em files de mensagem POSIX\n" +" -r\to tempo real máximo de prioridade de agendamento\n" +" -s\to tamanho máximo de pilha\n" +" -t\ta quantidade máxima de tempo de CPU em segundos\n" +" -u\to número máximo de processos de usuário\n" +" -v\to tamanho de memória virtual\n" +" -x\to número máximo de travas de arquivos\n" +" -P\to número máximo de pseudoterminais\n" +" -R\to tempo máximo que um processo de tempo real pode executar\n" +" antes de ser bloqueado\n" +" -T\to número máximo de fluxos (threads)\n" +" \n" +" Nem todas as opções estão disponíveis em todas as plataformas.\n" +" \n" +" Se LIMITE for fornecido, ele é o novo valor do recurso especificado;\n" +" os valores especiais de LIMITE `soft', `hard' e `unlimited' referem-se\n" +" ao atual limite suave, o atual limite rígido e nenhum limite,\n" +" respectivamente. Do contrário, o valor atual do recurso especificado\n" +" é impresso. Se nenhuma opção for fornecida, então -f é presumida.\n" +" \n" +" Valores estão em acréscimos de 1024 bytes, exceto para -t, que está\n" +" em segundos; -p, que é em 512 bytes; e -u, que é um número sem\n" +" escala de processos.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help umask +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3486,39 +4928,106 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Exibe ou define máscara de modo de arquivo.\n" +" \n" +" Define a máscara de criação de arquivos do usuário para MODO. Se MODO\n" +" for omitido, imprime o valor atual da máscara.\n" +" \n" +" Se MODO inicia com um dígito, ele é interpretado como um número octal;\n" +" do contrário, ele é uma string de modo simbólico como a que é aceita\n" +" pelo chmod(1).\n" +" \n" +" Opções:\n" +" -p\tse MODO for omitido, exibe em um formulário que pode ser usado\n" +" \t\tcomo entrada\n" +" -S\ttorna a saída simbólica; do contrário, um número octal é mostrado\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que MODO seja inválido ou uma opção\n" +" inválida seja fornecida." -#: builtins.c:1448 +# help wait +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Espera por conclusão de trabalho e retorna o status de saída.\n" +" \n" +" Espera por cada processo identificado por um ID, o que pode ser um ID\n" +" de processo ou uma especificação de trabalho, e relata seu status de\n" +" término. Se ID não for fornecido, espera por todos os processos filhos\n" +" ativos e o status de retorno é zero. Se ID é uma especificação de\n" +" trabalho, espera por todos os processos naquela sequência de comandos\n" +" dos trabalhos.\n" +" \n" +" Se a opção -n for fornecida, espera pelo próximo trabalho terminar e\n" +" retorna seu status de trabalho.\n" +" \n" +" Se a opção -p for fornecida, o identificador de processo ou trabalho do\n" +" trabalho, ao qual o status de saída é retornado, é atribuído à variável\n" +" VAR nomeada pelo argumento da opção.A variável terá sua definição\n" +" removida inicialmente, antes de qualquer atribuição.Isso é útil quando.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último ID; falha, se ID for inválido ou uma opção\n" +" inválida for fornecida, ou se -n é fornecida e o shell possui nenhum\n" +" filho inesperado." -#: builtins.c:1466 +# help wait +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" +"Espera por conclusão de processo e retorna o status de saída.\n" +" \n" +" Espera por cada processo especificado por um PID e relata seu status\n" +" de término. SE PID não for fornecido, espera por todos os processos\n" +" filhos atualmente ativos e o status de retorno é zero. PID deve ser\n" +" um ID de processo.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último ID; falha, se ID for inválido ou uma opção\n" +" inválida for fornecida." -#: builtins.c:1481 +# help for +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3530,8 +5039,19 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Executa comandos para cada membro em uma lista.\n" +" \n" +" O loop `for' executa uma sequência de comandos para cada membro em\n" +" uma lista de itens. Se `in PALAVRAS ...;' não estiver presente, então\n" +" `in \"$@\"' é presumido. Para cada elemento em PALAVRAS, NOME é " +"definido\n" +" com aquele elemento e os COMANDOS são executados.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." -#: builtins.c:1495 +# help for (( (?) +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3547,8 +5067,22 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Loop `for' aritmético.\n" +" \n" +" Equivalente a\n" +" \t(( EXPR1 ))\n" +" \twhile (( EXPR2 )); do\n" +" \t\tCOMANDOS\n" +" \t\t(( EXPR3 ))\n" +" \tdone\n" +" EXPR1, EXPR2 e EXPR3 são expressões aritméticas. Se alguma expressão\n" +" for omitida, ele se comporta como se a avaliação resultasse em 1.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." -#: builtins.c:1513 +# help select +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3567,8 +5101,26 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" - -#: builtins.c:1534 +"Seleciona palavras de uma lista e executa comandos.\n" +" \n" +" As PALAVRAS são expandidas, gerando uma lista de palavras.\n" +" O conjunto de palavras expandidas é exibido no erro padrão,\n" +" cada um precedido por um número. Se `in PALAVRAS' não estiver\n" +" presente, `in \"$@\"' é presumido. Então, o prompt PS3 é exibido\n" +" e uma linha é lida da entrada padrão. Se a linha consiste\n" +" do número correspondendo àquele nas palavras exibidas, então\n" +" NOME é definido para aquela palavra. Se a linha estiver vazia,\n" +" PALAVRAS e o prompt são exibidos novamente. Se EOF (fim do\n" +" arquivo) for lido, o comando conclui. Qualquer outro valor\n" +" lido causa NOME ser definido como nulo. A linha lida é salva\n" +" na variável REPLY. COMANDOS são executados após cada seleção\n" +" até um comando `break' ser executado.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." + +# help time +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3583,9 +5135,22 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"Relata o tempo consumido pela execução da linha de comandos.\n" +" \n" +" Executa LINHA-COMANDOS e imprime um resumo do tempo real,\n" +" tempo de CPU do usuário e do sistema, gastos executando\n" +" LINHA-COMANDOS, quando este terminar.\n" +" \n" +" Opções:\n" +" -p\timprime o resumo do tempo no formato portátil do Posix\n" +" \n" +" O valor da variável TIMEFORMAT é usada como formato de saída.\n" +" \n" +" Status de saída:\n" +" O status de retorno é o status retornado por LINHA-COMANDOS." -#: builtins.c:1551 -#, fuzzy +# help case +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3595,9 +5160,16 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" -"Executar seletivamente COMANDOS tomando por base a correspond�ncia entre" +"Executa comandos baseados em correspondência de padrão.\n" +" \n" +" Seletivamente executa COMANDOS baseados na PALAVRA correspondendo\n" +" a PADRÃO. O `|' é usado para separar múltiplos padrões.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." -#: builtins.c:1563 +# help if +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3617,32 +5189,64 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Executa comandos baseados em condicional.\n" +" \n" +" A lista `if COMANDOS' é executada. Se seu status de saída for zero,\n" +" então a lista `then COMANDOS' é executada. Do contrário, cada lista\n" +" `elif COMANDOS' é executada em turnos e, se seu status de saída for\n" +" zero, a lista `then COMANDOS' correspondente é executada e o comando\n" +" `if' conclui. Do contrário, a lista `else COMANDOS' é executada, se\n" +" presente. O status de saída de toda construção é o status de saída do\n" +" último comando executado, ou zero, se nenhuma condição testada\n" +" resultou em verdadeiro.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." -#: builtins.c:1580 +# help while +#: builtins.c:1648 #, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" 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" +msgstr "" +"Executa comandos desde que se obtenha sucesso nos testes.\n" +" \n" +" Expande e executa COMANDOS desde que o último comando nos\n" +" COMANDOS de `while' tenham status de saída zero.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." -#: builtins.c:1592 +# help until +#: builtins.c:1660 #, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" 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" +msgstr "" +"Executa comandos desde que não se obtenha sucesso nos testes.\n" +" \n" +" Expande e executa COMANDOS desde que o último comando nos\n" +" COMANDOS de `until' tenham status de saída zero que seja\n" +" não-zero.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3652,10 +5256,20 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Cria um coprocesso chamado NOME.\n" +" \n" +" Executa COMANDO assincronamente, com a saída padrão e entrada padrão\n" +" do comando conectados via um `pipe' (redirecionamento) para descritores\n" +" de arquivo atribuídos para índices 0 e 1 de uma variável array NOME\n" +" no shell em execução. O NOME padrão é \"COPROC\".\n" +" \n" +" Status de saída:\n" +" O comando coproc retorna um status de saída de 0." -#: builtins.c:1618 +# help function +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3668,9 +5282,18 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is readonly." msgstr "" +"Define uma função de shell.\n" +" \n" +" Cria uma função de shell chamada NOME. Quando chamado como um comando\n" +" simples, NOME executa COMANDOs no contexto de chamada shell. Quando\n" +" NOME é chamado, os argumentos são passados para a função como $1..$n\n" +" e o nome da função está em $FUNCNAME.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que NOME seja somente-leitura." -#: builtins.c:1632 -#, fuzzy +# help -m { +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3679,9 +5302,16 @@ msgid "" " \n" " Exit Status:\n" " Returns the status of the last command executed." -msgstr "Executa um conjunto de comandos agrupando-os. Esta � uma forma de" +msgstr "" +"Agrupa comandos como uma unidade.\n" +" \n" +" Executa um conjunto de comandos em um grupo. Essa é uma\n" +" forma de redirecionar um todo um conjunto de comandos.\n" +" \n" +" Status de saída:\n" +" Retorna o status do último comando executado." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3694,19 +5324,39 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" +"Resume trabalho em primeiro plano.\n" +" \n" +" Equivalente ao argumento ESPEC-JOB para comando `fg'. Resume um\n" +" trabalho parado ou enviado para plano de fundo. ESPEC-JOB pode\n" +" especificar tanto um nome de trabalho quanto um número de trabalho.\n" +" ESPEC-JOB seguido de um `&' coloca o trabalho em plano de fundo,\n" +" como se a especificação do trabalho tivesse sido fornecida como um\n" +" argumento para `bg'.\n" +" \n" +" Status de saída:\n" +" Retorna o status de um trabalho resumido." -#: builtins.c:1659 +# help '((' +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"Avalia expressões aritméticas.\n" +" \n" +" A EXPRESSÃO é avaliada de acordo com as regras de avaliação aritmética.\n" +" Equivalente a `let \"EXPRESSÃO\"'.\n" +" \n" +" Status de saída:\n" +" Retorna 1, se EXPRESSÃO for avaliada como 0; do contrário, retorna 0." -#: builtins.c:1671 +# help '[' +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3733,8 +5383,33 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" +"Executa comando condicional.\n" +" \n" +" Retorna um status de 0 ou 1 dependendo da avaliação da expressão\n" +" condicional EXPRESSÃO. Expressões são compostas dos mesmos primários\n" +" usados pelo comando interno `test' e pode ser combinado usando os\n" +" seguintes operadores:\n" +" \n" +" ( EXPRESSÃO )\tRetorna o valor de EXPRESSÃO\n" +" ! EXPRESSÃO\tVerdadeiro, se EXPRESSÃO for falsa; senão, falso\n" +" EXPR1 && EXPR2\tVerdadeiro, se ambas EXPR1 e EXPR2 forem verdadeiras;\n" +" \t\t\tsenão, falso\n" +" EXPR1 || EXPR2\tVerdadeiro, se EXPR1 ou EXPR2 for verdadeira;\n" +" \t\t\tsenão, falso\n" +" \n" +" Quando os operadores `==' e `!=' forem usados, a string à direita do\n" +" operador é usado como um padrão e uma correspondência de padrão é\n" +" realizada. Quando o operador `=~' é usado, a string à direita do\n" +" operador é correspondida como uma expressão regular.\n" +" \n" +" Os operadores && e || não avaliam EXPR2, se EXPR1 for suficiente para\n" +" determinar o valor da expressão.\n" +" \n" +" Status de saída:\n" +" 0 ou 1 dependendo do valor de EXPRESSÃO." -#: builtins.c:1697 +# help variables +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3787,8 +5462,70 @@ msgid "" " 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 +"Nomes e uso de variáveis comuns do shell.\n" +" \n" +" BASH_VERSION\tInformação da versão deste Bash.\n" +" CDPATH\t\tUma lista separada por dois-pontos de diretórios para\n" +" \t\t\tpesquisar por diretórios fornecidos como argumentos a `cd'.\n" +" GLOBIGNORE\t\tUma lista separada por dois-pontos de padrões descrevendo\n" +" \t\t\tarquivos a serem ignorados pela expansão de caminho.\n" +" HISTFILE\t\tO nome do arquivo no qual o histórico de comandos é\n" +" \t\t\tarmazenado.\n" +" HISTFILESIZE\tO número máximo de linhas que esse arquivo pode conter.\n" +" HISTSIZE\t\tO número máximo de linhas de histórico que um shell\n" +" \t\t\tpode acessar.\n" +" HOME\t\t\tO caminho completo para seu diretório de login.\n" +" HOSTNAME\t\tO nome da sua máquina.\n" +" HOSTTYPE\t\tO tipo de CPU sob a qual esta versão do Bash está\n" +" \t\t\tfuncionando.\n" +" IGNOREEOF\t\tControla a ação do shell na recepção de um caractere\n" +" \t\t\tde fim de arquivo (EOF) como uma entrada única. Se\n" +" \t\t\tdefinida, então seu valor é o número de caracteres de EOF\n" +" \t\t\tque podem ser vistos numa leva em uma linha vazia antes\n" +" \t\t\tdo shell sair (padrão 10). Do contrário, EOF significa\n" +" \t\t\to fim da entrada.\n" +" MACHTYPE\t\tUma string descrevendo o sistema no qual Bash está sendo\n" +" \t\t\texecutado.\n" +" MAILCHECK\t\tCom qual frequência, em segundos, Bash verifica por novo\n" +" \t\t\tcorreio.\n" +" MAILPATH\t\tUma lista separada por dois-pontos de arquivos que Bash\n" +" \t\t\tverifica por novo correio.\n" +" OSTYPE\t\t\tA versão do Unix no qual Bash está sendo executado.\n" +" PATH\t\t\tUma lista separada por dois-pontos de diretórios para\n" +" \t\t\tpesquisar ao se procurar por comandos.\n" +" PROMPT_COMMAND\tUm comando a ser executado antes de imprimir cada " +"prompt\n" +" \t\t\tprimário.\n" +" PS1\t\t\t\tA string de prompt primário.\n" +" PS2\t\t\t\tA string de prompt secundária.\n" +" PWD\t\t\t\tO caminho completo do diretório atual.\n" +" SHELLOPTS\t\tUma lista separada por dois-pontos de opções shell\n" +" \t\t\t\thabilitadas.\n" +" TERM\t\t\tO nome do tipo de terminal atual.\n" +" TIMEFORMAT\t\tO formato de saída para estatísticas de tempo exibidas\n" +" \t\t\t\tpela palavra reservada `time'.\n" +" auto_resume\t\tNão-nulo significa que uma palavra de comando aparecendo\n" +" \t\t\t\tem uma linha, por si só, é procurada primeiro na lista de\n" +" \t\t\t\ttrabalhos atualmente parados. Se encontrado lá, aquele\n" +" \t\t\t\ttrabalho é levado para primeiro plano. Um valor de `exact'\n" +" \t\t\t\tsignifica que a palavra de comando deve corresponder\n" +" \t\t\t\texatamente um comando na lista de trabalhos parados. Um\n" +" \t\t\t\tvalor de `substring' significa que a palavra de comando\n" +" \t\t\t\tdeve corresponder a uma substring do trabalho. Qualquer\n" +" \t\t\t\toutro valor significa que o comando deve ser um prefixo\n" +" \t\t\t\tde um trabalho parado.\n" +" histchars\t\tCaracteres controlando expansão de histórico e\n" +" \t\t\t\tsubstituição rápida. O primeiro caractere é o de\n" +" \t\t\t\tsubstituição de histórico, normalmente `!'. O segundo\n" +" \t\t\t\té o caractere `quick substitution', normalmente `^'.\n" +" \t\t\t\tO terceiro é o caractere `quick sbustitution',\n" +" \t\t\t\tnormalmente `#'\n" +" HISTIGNORE\t\tUma lista separada por dois-pontos de padrões usados para\n" +" \t\t\t\tdecidir quais comandos deveriam ser salvos na lista de\n" +" \t\t\t\thistórico.\n" + +# help pushd +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3798,19 +5535,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3818,8 +5555,37 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Adiciona diretórios a uma pilha.\n" +" \n" +" Adiciona um diretório ao topo da pilha de diretórios ou movimenta\n" +" a pilha, fazendo o novo topo da pilha ser o diretório atual de\n" +" trabalho. Com nenhum argumento, efetua troca do topo entre dois\n" +" diretórios.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao adicionar\n" +" \t\tdiretórios à pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda esquerda da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" -N\tMovimenta a pilha de forma que o n-ésimo diretório (a contar\n" +" \t\tda direita da lista mostrada por `dirs', iniciando com zero)\n" +" \t\testá no topo.\n" +" \n" +" dir\tAdiciona DIR à pilha de diretórios no topo, fazendo dele o\n" +" \t\tnovo diretório de trabalho atual.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretórios.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que um argumento inválido seja fornecido ou\n" +" a alteração de diretório falhar." -#: builtins.c:1788 +# help popd +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3828,16 +5594,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3845,8 +5611,32 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Remove diretórios de uma pilha.\n" +"\n" +" Remove entradas da pilha de diretórios. Com nenhum argumento, remove\n" +" o diretório do topo da pilha e altera o novo diretório do topo.\n" +" \n" +" Opções:\n" +" -n\tSuprime a alteração normal de diretório ao remover\n" +" \t\tdiretórios da pilha, de forma que apenas a pilha é manipulada.\n" +" \n" +" Argumentos:\n" +" +N\tRemove a n-ésima entrada a contar da esquerda da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o primeiro diretório e `popd +1', o segundo.\n" +" \n" +" -N\tRemove a n-ésima entrada a contar da direita da lista\n" +" \t\tmostrada por `dirs', iniciando com zero. Ex.: `popd +0'\n" +" \t\tremove o último diretório e `popd -1', o penúltimo.\n" +" \n" +" O comando interno `dirs' exibe a pilha de diretório.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que um argumento inválido seja fornecido ou\n" +" a alteração de diretório falhar." -#: builtins.c:1818 +# help dirs +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3857,32 +5647,56 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Exibe pilha de diretórios.\n" +" \n" +" Exibe a lista de diretórios atualmente memorizados. Diretórios são\n" +" inseridos na lista por meio do comando `pushd'; você pode obter\n" +" de volta da lista com o comando `popd'.\n" +" \n" +" Opções:\n" +" -c\tlimpa a pilha de diretórios excluindo todos os elementos\n" +" -l\tnão mostra versões de diretórios prefixadas por til,\n" +" \t\trelativos ao seu diretório HOME\n" +" -p\texibe a pilha de diretório com uma entrada por linha\n" +" -v\texibe a pilha de diretório com uma entrada por linha,\n" +" \t\tprefixada com sua posição na pilha\n" +" \n" +" Argumentos:\n" +" +N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero.\n" +" \n" +" -N\tExibe a n-ésima entrada a partir da esquerda da linha\n" +" \t\tmostrada por `dirs' chamado sem opções, iniciando com zero.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorrer um erro." -#: builtins.c:1847 +# help shopt +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3895,8 +5709,26 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Define e remove definições de opções de shell.\n" +" \n" +" Altera a configuração de cada opção shell NOME-OPÇÃO. Sem qualquer\n" +" argumento de opção, lista cada OPTNAME fornecido com uma indicação\n" +" de se cada uma está definida ou não.\n" +" \n" +" Opções:\n" +" -o\trestringe NOME-OPÇÃO àqueles definidos para usar com `set -o'\n" +" -p\timprime cada opção shell com uma indicação de seu status\n" +" -q\tsuprime a saída\n" +" -s\thabilita (set) com NOME-OPÇÃO\n" +" -u\tdesabilita (unset) com NOME-OPÇÃO\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, se NOME-OPÇÃO estiver habilitado; falha, se uma\n" +" opção inválida for fornecida ou NOME-OPÇÃO estiver desabilitado." -#: builtins.c:1868 +# help printf +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3913,20 +5745,62 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\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 +"Formata e imprime ARGUMENTOS sob controle de FORMATO.\n" +" \n" +" Options:\n" +" -v var\tatribui a saída à variável shell VAR, ao invés de exibi-la\n" +" \t\t\tna saída padrão\n" +" \n" +" FORMATO é uma string de caractere que contém três tipos de objetos;\n" +" caracteres planos, que são simplesmente copiados para a saída padrão;\n" +" sequências de escape de caracteres, que são convertidas e copiadas\n" +" para a saída padrão; e especificações de formatos, cada um que causa\n" +" impressão do próximo argumento sucessivo.\n" +" \n" +" Além das especificações de formato padrão descritas em printf(1),\n" +" printf interpreta:\n" +" \n" +" %b\texpande sequências de escape com contrabarras no argumento\n" +" \t\tcorrespondente\n" +" %q\tcita o argumento de uma forma que pode ser usado como entrada\n" +" \t\tno shell\n" +" %(fmt)T\texibe a string de data-hora resultante do uso de FMT como\n" +" \t\t\tuma string de formato para strftime(3)\n" +" \n" +" O formato é usado como necessário para consumir todos os argumentos.\n" +" Se houver menos argumentos que o formato requer, especificações de\n" +" formato extras se comportam como se uma string com valor zero ou nula,\n" +" como apropriado, tivesse sido fornecida.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro de escrita ou atribuição." + +# help complete +#: builtins.c:1974 msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -3939,21 +5813,54 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1923 +"Especifica como argumentos são completados por Readline.\n" +" \n" +" Para cada NOME, especifica como argumentos são completados. Se nenhuma\n" +" opção for fornecida, especificações existente para completar são\n" +" impressas em uma forma que permite-as serem usadas como entrada.\n" +" \n" +" Opções:\n" +" -p\timprime especificações existentes de completar em um formato " +"usável\n" +" -r\tremove uma especificação de completar para cada NOME ou, se " +"nenhum\n" +" \t\tNOME for fornecido, todas as especificações de completar\n" +" -D\taplica as completações e ações como sendo o padrão para comandos\n" +" \t\tsem qualquer especificação definida\n" +" -E\taplica as completações e ações para tentativa de completar\n" +" \t\tcomandos -- \"vazios\" em uma linha vazia\n" +" -I\taplica completações e ações para a palavra inicial (geralmente o\n" +" \t\tcomando)\n" +" \n" +" Ao tentar completar, as ações são fornecidas na ordem em que as opções\n" +" de letras de caixa alta são listadas acima. Se várias opções forem " +"fornecidas,\n" +" a opção -D tem precedência sobre -E, e ambos têm precedência sobre -I.\n" +" sobre -E.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." + +# help compgen +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -3965,14 +5872,24 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Exibe possibilidades de completação dependendo das opções.\n" +" \n" +" Tem a intenção de ser usado de dentro de uma função shell gerando\n" +" completações possíveis. Se o argumento opcional PALAVRA for fornecido,\n" +" comparações entre PALAVRA é gerada.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +" ocorra um erro." -#: builtins.c:1938 +# help compopt +#: builtins.c:2019 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -3981,6 +5898,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3996,8 +5914,36 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Modifica ou exibe opções de completação.\n" +" \n" +" Modifica as opções de completação para cada NOME ou, se nenhum NOME for\n" +" fornecido, a completação sendo executada atualmente. Se nenhuma OPÇÃO\n" +" for fornecida, imprime as opções de completação para cada NOME ou a\n" +" especificação de completação atual.\n" +" \n" +" Opções:\n" +" \t-o opção\tDefine a opção de completação OPÇÃO para cada NOME\n" +" \t-D\t\tAltera opções para a completação de comando \"padrão\"\n" +" \t-E\t\tAltera opções para a completação de comando \"vazio\"\n" +" \t-I\t\tAltera as opções para completação na palavra inicial\n" +" \n" +" Ao usar `+o', ao invés de `-o', desliga a opção especificada.\n" +" \n" +" Argumentos:\n" +" \n" +" Cada NOME se refere a um comando para o qual uma especificação de\n" +" completação deve ter sido definida anteriormente usando o comando\n" +" interno `complete'. Se nenhum NOME for fornecido, `compopt` deve\n" +" ser chamado por uma função atualmente gerando completações e as\n" +" opções para aquele gerador de completações atualmente em execução\n" +" são modificados.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválido seja fornecido ou\n" +" NOME não tem uma especificação de completação definida." -#: builtins.c:1968 +# help mapfile +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -4008,24 +5954,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -4036,212 +5984,449 @@ msgid "" "or\n" " not an indexed array." msgstr "" - -#: builtins.c:2001 +"Lê linhas da entrada padrão para uma variável array indexado.\n" +" \n" +" Lê linhas da entrada padrão para a variável array indexado ARRAY ou\n" +" do descritor de arquivo FD, se a opção -u for fornecida. A variável\n" +" MAPFILE é o ARRAY padrão.\n" +" \n" +" Opções:\n" +" -d dlim Usa DELIM para terminar linhas, ao invés de nova linha\n" +" -n número Copia no máximo NÚMERO linhas. Se NÚMERO for 0, todas " +"as\n" +" linhas são copiadas\n" +" -O origem Inicia atribuição de ARRAY no índice ORIGEM. O índice\n" +" padrão é 0\n" +" -s número Descarta as primeiras NÚMERO linhas lidas\n" +" -t Remove uma DELIM ao final para cada linha lida\n" +" (padrão: nova linha)\n" +" -u fd Lê linhas do descritor de arquivos FD, ao invés da " +"entrada\n" +" padrão\n" +" -C chamada Avalia CHAMADA a cada vez que QUANTIDADE linhas foram " +"lidas\n" +" -c quantidade Especifica o número de linhas lidas entre cada chamada " +"para\n" +" CHAMADA\n" +" \n" +" Argumentos:\n" +" ARRAY Nome da variável array para usar para arquivos de dados\n" +" \n" +" Se -C for fornecido sem -c, a quantidade padrão é 5000. Quando CHAMADA " +"é\n" +" avaliada, é fornecido o índice para o próximo elemento da array ser\n" +" atribuído e a linha para ser atribuída àquele elemento como argumentos\n" +" adicionais\n" +" \n" +" Se não for fornecido com uma origem explícita, mapfile vai limpar ARRAY\n" +" antes de lhe atribuir.\n" +" \n" +" Status de saída:\n" +" Retorna sucesso, a menos que uma opção inválida seja dada ou ARRAY for\n" +" somente leitura ou não for um array indexado." + +# help readarray +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +"Lê linhas de um arquivo para uma variável array.\n" +" \n" +" Um sinônimo para `mapfile'." -#~ 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." +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: chave de array associativo inválida" -#, 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" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " #~ 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'." +#~ "Retorna o contexto da chamada de sub-rotina atual.\n" +#~ " \n" +#~ " Sem EXPR, retorna " -#~ 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'" +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: processo %5ld (%s) em the_pipeline" -#, fuzzy -#~ msgid " removes the first directory, `popd +1' the second." -#~ msgstr "\tremove o primeiro diret�rio, `popd +1' o segundo." +#~ msgid "Unknown Signal #" +#~ msgstr "Sinal desconhecido #" -#, 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" +#~ msgid "Copyright (C) 2015 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2015 Free Software Foundation, Inc." -#, fuzzy -#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'" -#~ msgstr "\texibida por `dirs', come�ando por zero. Por exemplo: `popd -0'" +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2014 Free Software Foundation, Inc." -#, fuzzy -#~ msgid " removes the last directory, `popd -1' the next to last." -#~ msgstr "\tremove o �ltimo diret�rio, `popd -1' o pen�ltimo." +#~ msgid ":" +#~ msgstr ":" -#, 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" +# Não traduzir "true", esta é uma opção "builtin" do "bash" que é exibida ao executar "help" e acessível com "help true". +#~ msgid "true" +#~ msgstr "true" -#, fuzzy -#~ msgid " from the stack, so only the stack is manipulated." -#~ msgstr "\tda pilha, fazendo com que somente a pilha seja manipulada." +# Não traduzir "false", esta é uma opção "builtin" do "bash" que é exibida ao executar "help" e acessível com "help false". +#~ msgid "false" +#~ msgstr "false" -#, 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 "disown [-h] [-ar] [jobspec ...]" +#~ msgstr "disown [-h] [-ar] [ESPEC-JOB ...]" -#~ msgid "Obsolete. See `declare'." -#~ msgstr "Obsoleta. Veja `declare'." +# não traduzir, este é um comando +#~ msgid "times" +#~ msgstr "times" +# help typeset #~ msgid "" -#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ "Set variable values and attributes.\n" +#~ " \n" +#~ " Obsolete. See `help declare'." #~ msgstr "" -#~ "Exibe ARGS. Se -n for fornecido, o caracter final de nova linha � " -#~ "suprimido." +#~ "Define valores e atributos de variável.\n" +#~ " \n" +#~ " Obsoleto. Veja `help declare'." +# help history #~ 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 +#~ "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" +#~ " \t\tlist\n" +#~ " -w\twrite the current history to the history file\n" +#~ " \t\tand append them to the history list\n" +#~ " \n" +#~ " -p\tperform history expansion on each ARG and display the result\n" +#~ " \t\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 "" +#~ "Exibe ou manipula a lista de histórico.\n" +#~ " \n" +#~ " Exibe a lista de histórico com números de linhas, prefixando cada\n" +#~ " entrada modificada com um `*'. Um argumento de N lista apenas as\n" +#~ " últimas N entradas.\n" +#~ " \n" +#~ " Opções:\n" +#~ " -c\t\t\tlimpa a lista de histórico ao excluir todas as entradas\n" +#~ " -d POSIÇÃO\texclui a entrada de histórico na posição POSIÇÃO.\n" +#~ " -a\t\t\tanexa linhas de histórico desta sessão no arquivo de\n" +#~ " \t\t\t\thistórico\n" +#~ " -n\t\t\tlê todas as linhas de histórico ainda não lidas do\n" +#~ " \t\t\t\tarquivo de histórico\n" +#~ " -r\t\t\tlê o histórico e anexa os conteúdos à lista de histórico\n" +#~ " -w\t\t\tescreve o histórico atual para o arquivo de histórico e\n" +#~ " \t\t\t\tanexa-os à lista de histórico \n" +#~ " -p\t\t\texecuta expansão de histórico em cada ARG e exibe o\n" +#~ " \t\t\t\tresultado sem armazená-lo na lista de histórico\n" +#~ " -s\t\t\tanexa os ARGs à lista de histórico como uma única entrada\n" +#~ " \n" +#~ " Se ARQUIVO for fornecido, ele é usado como o arquivo de histórico.\n" +#~ " Do contrário, se a variável HISTFILE tiver um valor, este será " +#~ "usado;\n" +#~ " senão, usa de ~/.bash_history.\n" +#~ " \n" +#~ " Se a variável HISTTIMEFORMAT for definida e não for nula, seu valor " +#~ "é\n" +#~ " usado como uma string de formato para strftime(3) para mostrar a " +#~ "marca\n" +#~ " de tempo associada com cada entrada de histórico exibida. Do " +#~ "contrário,\n" +#~ " nenhuma marca de tempo é mostrada.\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +#~ " ocorra um erro." + +# help kill #~ 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 +#~ "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" +#~ " \t\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 "" +#~ "Envia um sinal para um trabalho.\n" +#~ "\n" +#~ " Envia aos processos identificados pelo PID ou pelo ESPEC-JOB o sinal\n" +#~ " informado por SIGSPEC ou SIGNUM. Se SIGSPEC e SIGNUM\n" +#~ " não estiverem presentes, então, SIGTERM é presumido.\n" +#~ " \n" +#~ " Opções:\n" +#~ " -s SIGSPEC\tSIGSPEC especifica o nome do sinal\n" +#~ " -n SIGNUM\t\tSIGNUM representa um número de sinal\n" +#~ " -l\t\t\tlista os nomes dos sinais; se `-l' for acompanhado por\n" +#~ " \t\t\t\toutros argumentos, presume-se estes sejam números de\n" +#~ " \t\t\t\tsinais para os quais nomes deveriam ser listados\n" +#~ " \n" +#~ " `Kill' é um comando interno do shell por duas razões: ele permite\n" +#~ " IDs de trabalho serem usados ao invés de IDs de processo e permite\n" +#~ " que processos sejam matados caso o limite de processos que você pode\n" +#~ " criar seja atingido.\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna sucesso, a menos que uma opção inválida seja fornecida ou\n" +#~ " ocorra um erro." + +# help set #~ 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 +#~ "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 resolve 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" +#~ " If there are no remaining arguments, the positional parameters\n" +#~ " are unset.\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 "" +#~ "Define ou remove definição de valores das opções e dos parâmetros " +#~ "posicionais\n" +#~ "do shell:\n" +#~ " \n" +#~ " Altera o valor de opções e de parâmetros posicionais do shell ou " +#~ "mostra\n" +#~ " os nomes ou valores de variáveis shell.\n" +#~ " \n" +#~ " Opções:\n" +#~ " -a Marca variáveis, que foram modificadas ou criadas, para " +#~ "exportação.\n" +#~ " -b Notifica sobre terminação de trabalho imediatamente.\n" +#~ " -e Sai imediatamente se um comando sai com um status não-zero.\n" +#~ " -f Desabilita a geração de nome de arquivo (\"globbing\").\n" +#~ " -h Memoriza a localização de comandos à medida em que são " +#~ "procurados.\n" +#~ " -k Todos argumentos de atribuição são colocados no ambiente para " +#~ "um\n" +#~ " comando, e não apenas aqueles que precedem o nome do comando.\n" +#~ " -m Controle de trabalho está habilitado.\n" +#~ " -n Lê comandos, mas não os executa.\n" +#~ " -o NOME-OPÇÃO\n" +#~ " Define a variável correspondendo a NOME-OPÇÃO:\n" +#~ " allexport mesmo que -a\n" +#~ " braceexpand mesmo que -B\n" +#~ " emacs usa interface de edição de linha estilo Emacs\n" +#~ " errexit mesmo que -e\n" +#~ " errtrace mesmo que -E\n" +#~ " functrace mesmo que -T\n" +#~ " hashall mesmo que -h\n" +#~ " histexpand mesmo que -H\n" +#~ " history habilita histórico de comandos\n" +#~ " ignoreeof shell não vai sair após leitura de EOF\n" +#~ " interactive-comments\n" +#~ " permite mostrar comentários em comandos " +#~ "interativos\n" +#~ " keyword mesmo que -k\n" +#~ " monitor mesmo que -m\n" +#~ " noclobber mesmo que -C\n" +#~ " noexec mesmo que -n\n" +#~ " noglob mesmo que -f\n" +#~ " nolog atualmente aceito, mas ignorado\n" +#~ " notify mesmo que -b\n" +#~ " nounset mesmo que -u\n" +#~ " onecmd mesmo que -t\n" +#~ " physical mesmo que -P\n" +#~ " pipefail o valor de retorno de uma linha de comandos é " +#~ "o\n" +#~ " status do último comando a sair com status não-" +#~ "zero,\n" +#~ " ou zero se nenhum comando saiu com status não " +#~ "zero\n" +#~ " posix altera o comportamento do bash, onde a " +#~ "operação\n" +#~ " padrão diverge dos padrões do Posix para\n" +#~ " corresponder a estes padrões\n" +#~ " privileged mesmo que -p\n" +#~ " verbose mesmo que -v\n" +#~ " vi usa interface de edição de linha estilo vi\n" +#~ " xtrace mesmo que -x\n" +#~ " -p Ligado sempre que IDs de usuário real e efetivo não " +#~ "corresponderem.\n" +#~ " Desabilita processamento do arquivo $ENV e importação de " +#~ "funções da\n" +#~ " shell. Ao desligar essa opção, causa o uid e o gid efetivo " +#~ "serem\n" +#~ " os uid e gid reais.\n" +#~ " -t Sai após a leitura e execução de um comando.\n" +#~ " -u Trata limpeza (unset) de variáveis como um erro quando " +#~ "substituindo.\n" +#~ " -v Mostra linhas de entrada do shell na medida em que forem " +#~ "lidas.\n" +#~ " -x Mostra comandos e seus argumentos na medida em que forme " +#~ "executados.\n" +#~ " -B o shell vai realizar expansão de chaves\n" +#~ " -C Se definido, não permite arquivos normais existentes serem\n" +#~ " sobrescritos por redirecionamento da saída.\n" +#~ " -E Se definido, a armadilha ERR é herdada por funções do shell.\n" +#~ " -H Habilita substituição de histórico estilo \"!\". Essa " +#~ "sinalização está\n" +#~ " habilitada por padrão quando shell é interativa.\n" +#~ " -P Se definida, não resolve links simbólicos ao sair de comandos, " +#~ "tais\n" +#~ " como `cd' (que altera o diretório atual).\n" +#~ " -T Se definido, a armadilha DEBUG é herdada por funções do shell.\n" +#~ " -- Atribui quaisquer argumentos restantes aos parâmetros " +#~ "posicionais.\n" +#~ " Se não houver argumentos restantes, os parâmetros posicionais " +#~ "são\n" +#~ " limpos (unset).\n" +#~ " - Atribui quaisquer argumentos restantes aos parâmetros " +#~ "posicionais.\n" +#~ " As opções -x e -v são desligadas.\n" +#~ " \n" +#~ " Usar +, ao invés de -, causa essas sinalizações serem desligadas. As\n" +#~ " sinalizações também podem ser usadas por meio de chamada do shell. " +#~ "As\n" +#~ " sinalizações atualmente definidas podem ser encontradas em $-. Os n " +#~ "ARGs\n" +#~ " restantes são parâmetros posicionais e são atribuídos, em ordem, a " +#~ "$1, $2,\n" +#~ " .. $n. Se nenhuma ARG for fornecido, todas as variáveis shell são\n" +#~ " mostradas.\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna sucesso, a menos que uma opção inválida seja fornecida." + +# help coproc #~ 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" +#~ "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 "" +#~ "Cria um coprocesso chamado NOME.\n" +#~ " \n" +#~ " Executa COMANDO assincronamente, com a saída padrão e entrada padrão\n" +#~ " do comando conectados via um `pipe' (redirecionamento) para " +#~ "descritores\n" +#~ " de arquivo atribuídos para índices 0 e 1 de uma variável array NOME\n" +#~ " no shell em execução. O NOME padrão é \"COPROC\".\n" +#~ " \n" +#~ " Status de saída:\n" +#~ " Retorna o status de saída de COMANDO." #~ msgid "Missing `}'" #~ msgstr "Faltando `}'" @@ -4262,13 +6447,13 @@ msgstr "" #~ msgstr "Informar %s para corrigir o ocorrido.\n" #~ msgid "execute_command: bad command type `%d'" -#~ msgstr "execute_command: `%d' � um tipo incorreto de comando " +#~ msgstr "execute_command: `%d' é um tipo incorreto de comando " #~ msgid "real\t" #~ msgstr "real\t" #~ msgid "user\t" -#~ msgstr "usu�rio\t" +#~ msgstr "usuário\t" #~ msgid "sys\t" #~ msgstr "sistema\t" @@ -4279,23 +6464,29 @@ msgstr "" #~ "sys\t0m0.00s\n" #~ msgstr "" #~ "real \t0m0.00s\n" -#~ "usu�rio\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" +#~ 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" +#~ msgstr "%s: redirecionamento da saída restringido" #~ msgid "Out of memory!" -#~ msgstr "Mem�ria esgotada!" +#~ msgstr "Memória esgotada!" #~ msgid "You have already added item `%s'\n" -#~ msgstr "Voc� j� adicionou o 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" +#~ msgstr "Entrados %d (%d) itens. A distribuição é:\n" + +#~ msgid "slot %3d: " +#~ msgstr "encaixe (slot) %3d: " + +#~ msgid "" +#~ msgstr "" #~ msgid "%s: bg background job?" #~ msgstr "%s: bg trabalho no segundo plano?" @@ -4304,17 +6495,17 @@ msgstr "" #~ "Redirection instruction from yyparse () '%d' is\n" #~ "out of range in make_redirection ()." #~ msgstr "" -#~ "A instru��o de redirecionamento do yyparse () '%d' est�\n" +#~ "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" +#~ 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'" +#~ 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'" @@ -4323,87 +6514,84 @@ msgstr "" #~ msgstr "cprintf: argumento `%%' incorreto (%c)" #~ msgid "option `%s' requires an argument" -#~ msgstr "a op��o `%s' requer um argumento" +#~ msgstr "a opção `%s' requer um argumento" #~ msgid "%s: unrecognized option" -#~ msgstr "%s: a op��o n�o � reconhecida" +#~ msgstr "%s: a opção não é reconhecida" #~ msgid "`-c' requires an argument" -#~ msgstr "A op��o `-c' requer um argumento" +#~ msgstr "A opção `-c' requer um argumento" #~ msgid "%s: cannot execute directories" -#~ msgstr "%s: imposs�vel executar diret�rios" +#~ 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" +#~ msgstr "Código incorreto em sig.c: sigprocmask" #~ msgid "can't make pipes for process substitution: %s" -#~ msgstr "imposs�vel criar `pipes' para a substitui��o do processo: %s" +#~ msgstr "impossível criar `pipes' para a substituição do processo: %s" #~ msgid "reading" #~ msgstr "lendo" +#~ msgid "writing" +#~ msgstr "escrevendo" + #~ msgid "process substitution" -#~ msgstr "substitui��o de processo" +#~ msgstr "substituição de processo" #~ msgid "command substitution" -#~ msgstr "substitui��o de comando" +#~ 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" +#~ "Impossível reabrir o `pipe' para substituição de comando (fd %d): %s" #~ msgid "$%c: unbound variable" -#~ msgstr "$%c: vari�vel n�o vinculada" +#~ msgstr "$%c: variável não associada" #~ msgid "%s: bad arithmetic substitution" -#~ msgstr "%s: substitui��o aritm�tica incorreta" +#~ msgstr "%s: substituição aritmética incorreta" #~ msgid "-%s: binary operator expected" -#~ msgstr "-%s: esperado operador bin�rio" +#~ msgstr "-%s: esperado operador binário" #~ msgid "%s[%s: bad subscript" -#~ msgstr "%s[%s: �ndice incorreto" +#~ msgstr "%s[%s: índice incorreto" #~ msgid "[%s: bad subscript" -#~ msgstr "[%s: �ndice incorreto" +#~ msgstr "[%s: índice incorreto" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: impossível realocar %lu bytes (%lu bytes alocados)" #~ msgid "digits occur in two different argv-elements.\n" -#~ msgstr "os d�gitos aparecem em dois elementos argv diferentes.\n" +#~ msgstr "os dígitos aparecem em dois elementos argv diferentes.\n" #~ msgid "option %c\n" -#~ msgstr "op��o %c\n" +#~ msgstr "opção %c\n" #~ msgid "option a\n" -#~ msgstr "op��o a\n" +#~ msgstr "opção a\n" #~ msgid "option b\n" -#~ msgstr "op��o b\n" +#~ msgstr "opção b\n" #~ msgid "option c with value `%s'\n" -#~ msgstr "op��o c com o valor `%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" +#~ 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:" +#~ msgstr "elementos de ARGV que não são opção:" #~ msgid "%s: Unknown flag %s.\n" -#~ msgstr "%s: Op��o %s desconhecida.\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" @@ -4411,64 +6599,69 @@ msgstr "" #~ msgstr "%s encontrado antes de $END" #~ msgid "%s already has a function (%s)" -#~ msgstr "%s j� possui uma fun��o (%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)" +#~ 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)" +#~ msgstr "%s já possui uma documentação curta (%s)" #~ msgid "%s already has a %s definition" -#~ msgstr "%s j� possui a defini��o %s" +#~ msgstr "%s já possui a definição %s" #~ msgid "mkbuiltins: Out of virtual memory!\n" -#~ msgstr "mkbuiltins: Mem�ria virtual esgotada!\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 ...]" +#~ msgstr "read [-r] [-p MENSAGEM] [-a ARRAY] [-e] [NOME ...]" #~ msgid "%[DIGITS | WORD] [&]" -#~ msgstr "%[D�GITOS | PALAVRA] [&]" +#~ msgstr "%[DÍGITOS | PALAVRA] [&]" #~ msgid "variables - Some variable names and meanings" -#~ msgstr "vari�veis - Alguns nomes de vari�veis e suas descri��es" +#~ 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" +#~ 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." +#~ 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." +#~ "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" +#~ 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" +#~ 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." +#~ "verdadeiro, a não ser que seja fornecido um NOME sem alias definido." + +#~ msgid "" +#~ "Remove NAMEs from the list of defined aliases. If the -a option is given," +#~ msgstr "" +#~ "Remove NOMEs da lista de aliases definidos. Se a opção -a for fornecida," #~ msgid "then remove all alias definitions." -#~ msgstr "ent�o todas as defini��es de alias s�o removidas." +#~ 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" +#~ "Víncula uma sequê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" +#~ "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'." +#~ "passada como um único argumento: bind '\"\\C-x\\C-r\": re-read-init-file'." #~ msgid "Arguments we accept:" #~ msgstr "Argumentos permitidos:" @@ -4476,10 +6669,10 @@ msgstr "" #~ 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" +#~ " -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," +#~ msgstr " deste comando. Os nomes aceitos são emacs," #~ msgid "" #~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," @@ -4490,36 +6683,36 @@ msgstr "" #~ msgstr " vi-command, and vi-insert." #~ msgid " -l List names of functions." -#~ msgstr " -l Listar os nomes das fun��es." +#~ 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." +#~ msgstr " -P Listar nomes e associaçõ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" +#~ " -p Listar nomes e associaçõ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." +#~ 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." +#~ 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." +#~ 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." +#~ 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" +#~ " -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." @@ -4528,151 +6721,157 @@ msgstr "" #~ " -S List key sequences that invoke macros and their " #~ "values" #~ msgstr "" -#~ " -S Listar as seq��ncias de teclas que chamam macros\n" +#~ " -S Listar as sequê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" +#~ msgstr " -s Listar sequê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 "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," +#~ msgstr "Sair de um laço FOR, WHILE ou UNTIL." + #~ msgid "break N levels." -#~ msgstr "Se N for especificado, sai de N n�veis." +#~ msgstr "Se N for especificado, sai de N níveis." + +#~ msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." +#~ msgstr "Prossegue no próximo ciclo do laço FOR, WHILE ou UNTIL envolvente." #~ msgid "If N is specified, resume at the N-th enclosing loop." -#~ msgstr "Se N for especificado, prossegue no N-�simo la�o envolvente." +#~ 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" +#~ "Executa um comando interno do 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" +#~ msgstr "um comando interno do 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." +#~ 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" +#~ 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" +#~ 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" +#~ "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" +#~ "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 (/)," +#~ 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" +#~ 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" +#~ "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" +#~ "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" +#~ "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" +#~ 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." +#~ 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" +#~ 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" +#~ 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." +#~ 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" +#~ "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" +#~ "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" +#~ "\"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" +#~ "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." +#~ 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." +#~ 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" +#~ 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" +#~ 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:" +#~ msgstr "As opções são:" #~ msgid " -a\tto make NAMEs arrays (if supported)" -#~ msgstr " -a\tpara tornar NOMEs matrizes (arrays), se suportado" +#~ msgstr " -a\tpara tornar NOMEs arrays, se houver suporte" #~ msgid " -f\tto select from among function names only" -#~ msgstr " -f\tpara selecionar somente entre nomes de fun��es" +#~ 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" +#~ 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" +#~ 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" +#~ 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." +#~ 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" +#~ 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" +#~ msgstr "sua definição. A opção -F restringe a exibição ao nome da função" #~ msgid "name only." #~ msgstr "somente." @@ -4682,23 +6881,26 @@ msgstr "" #~ 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'." +#~ msgstr "usado em uma função, torna NOMEs local, como no comando `local'." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Obsoleta. Veja `declare'." #~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL" -#~ msgstr "Cria uma vari�vel local chamada NOME, e atribui VALOR. 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." +#~ 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 �" +#~ 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" +#~ "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:" +#~ msgstr "caracteres após a contrabarra é ativada:" #~ msgid "\t\\a\talert (bell)" #~ msgstr "\t\\a\talerta (bell)" @@ -4713,7 +6915,7 @@ msgstr "" #~ msgstr "\t\\E\to caracter de escape" #~ msgid "\t\\f\tform feed" -#~ msgstr "\t\\f\talimenta��o de formul�rio (form feed)" +#~ msgstr "\t\\f\talimentação de formulário (form feed)" #~ msgid "\t\\n\tnew line" #~ msgstr "\t\\n\tnova linha" @@ -4722,36 +6924,42 @@ msgstr "" #~ msgstr "\t\\r\tretorno de carro (cr)" #~ msgid "\t\\t\thorizontal tab" -#~ msgstr "\t\\t\ttabula��o horizontal (ht)" +#~ msgstr "\t\\t\ttabulação horizontal (ht)" #~ msgid "\t\\v\tvertical tab" -#~ msgstr "\t\\v\ttabula��o vertical (vt)" +#~ 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)." +#~ 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" +#~ "Pode-se explicitamente desabilitar a interpretação dos caracteres acima" #~ msgid "with the -E option." -#~ msgstr "atrav�s da op��o -E." +#~ msgstr "através da opção -E." + +#~ 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 "Enable and disable builtin shell commands. This allows" #~ msgstr "" -#~ "Habilita e desabilita os comandos internos da `shell', permitindo usar" +#~ "Habilita e desabilita os comandos internos do 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'." +#~ "um comando de disco que tenha o mesmo nome do comando interno do 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" +#~ "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 "" @@ -4759,15 +6967,15 @@ msgstr "" #~ 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" +#~ "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" +#~ "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" +#~ "novos comandos internos do objeto compartilhado ARQUIVO. A opção -d" #~ msgid "option will delete a builtin previously loaded with -f. If no" #~ msgstr "" @@ -4775,301 +6983,309 @@ msgstr "" #~ 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" +#~ "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" +#~ "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" +#~ 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" +#~ "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 "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "Ler ARGs como entrada do shell e executar o(s) comando(s) resultante(s)." + #~ 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." +#~ "Getopts é utilizado pelos procedimentos do 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" +#~ 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" +#~ 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." +#~ 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" +#~ 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" +#~ msgstr "variável do 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" +#~ 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" +#~ 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'" +#~ "do 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." +#~ msgstr "coloca este argumento dentro da variável do 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" +#~ 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" +#~ 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" +#~ 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" +#~ "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" +#~ "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" +#~ "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 '?'" +#~ "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 �" +#~ "é colocada em NOME, OPTARG é desativado, e uma mensagem de diagnóstico é" + +#~ msgid "printed." +#~ msgstr "exibida." #~ 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" +#~ msgstr "Se a variável do 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" +#~ 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." +#~ 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)," +#~ "`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." +#~ 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." +#~ "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" +#~ "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" +#~ msgstr "neste 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'" +#~ 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" +#~ 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," +#~ msgstr "Se o arquivo não puder ser executado e o 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\"" +#~ "então o 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." +#~ 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" +#~ 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." +#~ 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 " +#~ " -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" +#~ " 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." +#~ 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." +#~ 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)." +#~ " -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" +#~ "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." +#~ 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'," +#~ "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" +#~ msgstr "seja executado o último comando começado por `cc' e, ao se digitar" + +#~ msgid "Place JOB_SPEC in the foreground, and make it the current job. If" +#~ msgstr "" +#~ "Colocar JOB-ESPECIFICADO no primeiro plano, e torná-lo o trabalho atual." #~ 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" +#~ "Se JOB-ESPECIFICADO não estiver presente, a noção do shell do trabalho" #~ msgid "used." -#~ msgstr "atual � utilizada." +#~ 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'" +#~ msgstr "com `&'. Se JOB-ESPECIFICADO não estiver presente, a noção do shell" #~ msgid "job is used." -#~ msgstr "do trabalho atual � utilizada." +#~ 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." +#~ "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" +#~ "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" +#~ 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" +#~ "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." +#~ 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" +#~ 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." +#~ "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" +#~ "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" +#~ 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" +#~ 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" +#~ "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" +#~ "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" +#~ "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." +#~ 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" +#~ 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" +#~ "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" +#~ 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" +#~ "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 �" +#~ "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" +#~ "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" +#~ "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." +#~ 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" +#~ "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." +#~ "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" @@ -5079,29 +7295,29 @@ msgstr "" #~ 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 " +#~ "ú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" +#~ "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" +#~ "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" +#~ "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" +#~ "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." +#~ 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 "" @@ -5114,19 +7330,19 @@ msgstr "" #~ 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'" +#~ "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" +#~ "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" +#~ "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" +#~ "é 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 "" @@ -5136,41 +7352,41 @@ msgstr "" #~ 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." +#~ "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 �" +#~ 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" +#~ "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�" +#~ 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." +#~ 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." +#~ 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" +#~ 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" +#~ 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" +#~ msgstr "\t*, /, %\t\tmultiplicação, divisão, resto" #~ msgid "\t+, -\t\taddition, subtraction" -#~ msgstr "\t+, -\t\tadi��o, subtra��o" +#~ 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" +#~ msgstr "\t<<, >>\t\tdeslocamento à esquerda e à direita bit a bit" #~ msgid "\t<=, >=, <, >\tcomparison" -#~ msgstr "\t<=, >=, <, >\tcompara��o" +#~ msgstr "\t<=, >=, <, >\tcomparação" #~ msgid "\t==, !=\t\tequality, inequality" #~ msgstr "\t==, !=\t\tigualdade, desigualdade" @@ -5185,16 +7401,16 @@ msgstr "" #~ msgstr "\t|\t\tOU Inclusivo (OR) bit a bit" #~ msgid "\t&&\t\tlogical AND" -#~ msgstr "\t&&\t\tE l�gico" +#~ msgstr "\t&&\t\tE lógico" #~ msgid "\t||\t\tlogical OR" -#~ msgstr "\t||\t\tOU l�gico" +#~ 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" +#~ msgstr "\t\t\texpressão condicional" #~ msgid "\t=, *=, /=, %=," #~ msgstr "\t=, *=, /=, %=," @@ -5203,134 +7419,138 @@ msgstr "" #~ msgstr "\t+=, -=, <<=, >>=," #~ msgid "\t&=, ^=, |=\tassignment" -#~ msgstr "\t&=, ^=, |=\tatribui��o" +#~ 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" +#~ 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" +#~ 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." +#~ 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" +#~ "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" +#~ msgstr "entre parênteses são avaliadas primeiro e podem prevalecer sobre as" #~ msgid "rules above." -#~ msgstr "regras de preced�ncia anteriores." +#~ 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" +#~ msgstr "Se o último argumento for avaliado como 0, `let' retorna 1, caso" #~ msgid "otherwise." -#~ msgstr "contr�rio, retorna 0." +#~ 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 �" +#~ 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," +#~ "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 " +#~ "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 " +#~ "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," +#~ "é 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," +#~ "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." +#~ "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 � " +#~ "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" +#~ "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" +#~ "for fornecida, as palavras lidas são atribuídas aos índices sequenciais" #~ 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" +#~ "do ARRAY, 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." +#~ msgstr "interativa, `readline' é utilizado para ler a linha." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N" +#~ msgstr "Faz a função terminar com o valor de retorno especificado por N." #~ msgid "is omitted, the return status is that of the last command." -#~ msgstr "Se N for omitido, retorna o status do �ltimo comando executado." +#~ 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 " +#~ " -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." +#~ 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)." +#~ 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." +#~ 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'" +#~ 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." +#~ 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," +#~ " -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." +#~ 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." +#~ 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." +#~ msgstr " -n Ler os comandos, mas não executá-los." #~ msgid " -o option-name" -#~ msgstr " -o NOME-DA-OP��O" +#~ 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:" +#~ msgstr " Inicializar a variável correspondente ao nome da opção:" #~ msgid " allexport same as -a" #~ msgstr " allexport o mesmo que -a" @@ -5340,7 +7560,7 @@ msgstr "" #~ msgid " emacs use an emacs-style line editing interface" #~ msgstr "" -#~ " emacs usar interface de edi��o de linha estilo emacs" +#~ " emacs usar interface de edição de linha estilo emacs" #~ msgid " errexit same as -e" #~ msgstr " errexit o mesmo que -e" @@ -5352,7 +7572,7 @@ msgstr "" #~ 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" +#~ msgstr " ignoreeof a shell não termina após ler EOF" #~ msgid " interactive-comments" #~ msgstr " interactive-comments" @@ -5360,7 +7580,7 @@ msgstr "" #~ msgid "" #~ " allow comments to appear in interactive commands" #~ msgstr "" -#~ " permite coment�rios em comandos interativos" +#~ " permite comentários em comandos interativos" #~ msgid " keyword same as -k" #~ msgstr " keyword o mesmo que -k" @@ -5392,15 +7612,15 @@ msgstr "" #~ msgid "" #~ " posix change the behavior of bash where the default" #~ msgstr "" -#~ " posix mudar o comportamento do `bash' onde o padr�o" +#~ " 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" +#~ " for diferente do padrão 1003.2, para tornar" #~ msgid " match the standard" -#~ msgstr " igual ao padr�o" +#~ msgstr " igual ao padrão" #~ msgid " privileged same as -p" #~ msgstr " privileged o mesmo que -p" @@ -5410,7 +7630,7 @@ msgstr "" #~ msgid " vi use a vi-style line editing interface" #~ msgstr "" -#~ " vi usar interface de edi��o de linha estilo vi" +#~ " vi usar interface de edição de linha estilo vi" #~ msgid " xtrace same as -x" #~ msgstr " xtrace o mesmo que -x" @@ -5418,132 +7638,132 @@ msgstr "" #~ 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." +#~ " -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" +#~ " 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'" +#~ " 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." +#~ 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." +#~ " -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." +#~ 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." +#~ 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 {}" +#~ 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." +#~ msgstr " -H Habilitar o estilo ! para substituição do histórico." #~ msgid " by default." -#~ msgstr " Esta op��o est� ativa por padr�o." +#~ 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" +#~ msgstr " -C Não permite que arquivos regulares existentes sejam" #~ msgid " by redirection of output." -#~ msgstr " sobrescritos pelo redirecionamento da sa�da." +#~ 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," +#~ 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." +#~ 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" +#~ 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" +#~ "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" +#~ "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" +#~ 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." +#~ 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" +#~ "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'" +#~ "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" +#~ 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" +#~ 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." +#~ "função. Algumas variáveis (como PATH e IFS) não podem ser removidas." #~ msgid "see readonly." -#~ msgstr "Veja tamb�m o comando `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" +#~ "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," +#~ 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'" +#~ "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' �" +#~ "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" +#~ "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" +#~ msgstr "NOMEs subsequentes. O argumento `--' desabilita o processamento de" #~ msgid "processing." -#~ msgstr "op��es posteriores." +#~ 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" +#~ "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" +#~ "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" +#~ "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" @@ -5553,30 +7773,35 @@ msgstr "" #~ msgid "" #~ "is printed. An argument of `-n' says to remove the readonly property" #~ msgstr "" -#~ "somente para leitura � exibida. O argumento `-n' remove a propriedade" +#~ "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" +#~ 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" +#~ "variável tipo array. Um argumento `--' desabilita o processamento de" + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is" +#~ msgstr "" +#~ "Os parâmetros posicionais a partir de $N+1 ... são deslocados para $1 ..." #~ msgid "not given, it is assumed to be 1." -#~ msgstr "Se N n�o for especificado, o valor 1 � assumido ($2 vira $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." +#~ 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." +#~ "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" +#~ 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 "" @@ -5588,15 +7813,15 @@ msgstr "" #~ 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" +#~ "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," +#~ "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." +#~ "operadores para cadeias de caracteres (strings) e comparações numéricas." #~ msgid "File operators:" #~ msgstr "Operadores para arquivos:" @@ -5609,7 +7834,7 @@ 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." +#~ 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." @@ -5623,10 +7848,10 @@ msgstr "" #~ 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\"." +#~ " -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." +#~ 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." @@ -5636,10 +7861,10 @@ msgstr "" #~ msgid " -r FILE True if file is readable by you." #~ msgstr "" -#~ " -r ARQUIVO Verdade se voc� tiver autoriza��o para ler o arquivo." +#~ " -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." +#~ 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." @@ -5655,16 +7880,16 @@ msgstr "" #~ msgid " -w FILE True if the file is writable by you." #~ msgstr "" -#~ " -w ARQUIVO Verdade se voc� tiver autoriza��o para escrever no " +#~ " -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." +#~ " -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." +#~ " -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." @@ -5675,15 +7900,15 @@ msgstr "" #~ msgstr " ARQ1 -nt ARQ2 Verdade se ARQ1 for mais novo (conforme a data" #~ msgid " modification date) file2." -#~ msgstr " de modifica��o) do que ARQ2." +#~ 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)" +#~ " 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):" @@ -5695,19 +7920,19 @@ msgstr "" #~ msgstr " -n STRING" #~ msgid " STRING True if string is not empty." -#~ msgstr " STRING Verdade se STRING n�o estiver vazia." +#~ 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." +#~ 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." +#~ msgstr " Verdade se STRING1 não for idêntica à STRING2." #~ msgid " STRING1 < STRING2" #~ msgstr " STRING1 < STRING2" @@ -5715,7 +7940,7 @@ msgstr "" #~ msgid "" #~ " True if STRING1 sorts before STRING2 lexicographically" #~ msgstr "" -#~ " Verdade se STRING1 tiver ordena��o anterior � STRING2." +#~ " Verdade se STRING1 tiver ordenação anterior à STRING2." #~ msgid " STRING1 > STRING2" #~ msgstr " STRING1 > STRING2" @@ -5723,13 +7948,13 @@ msgstr "" #~ msgid "" #~ " True if STRING1 sorts after STRING2 lexicographically" #~ msgstr "" -#~ " Verdade se STRING1 tiver ordena��o posterior � STRING2." +#~ " 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." +#~ 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." @@ -5738,14 +7963,14 @@ msgstr "" #~ 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," +#~ 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," +#~ "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" @@ -5755,14 +7980,21 @@ msgstr "" #~ 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" +#~ msgstr "É um sinônimo para o comando interno \"test\", mas o último" + +#~ msgid "argument must be a literal `]', to match the opening `['." +#~ msgstr "argumento deve ser o literal `]', para fechar o `[' de abertura." + +#~ msgid "Print the accumulated user and system times for processes run from" +#~ msgstr "" +#~ "Exibe os tempos acumulados do usuário e do sistema para os processos" #~ msgid "the shell." -#~ msgstr "executados por esta `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)" +#~ "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 "" @@ -5774,50 +8006,50 @@ msgstr "" #~ 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." +#~ "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" +#~ "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" +#~ "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" +#~ "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" +#~ 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" +#~ "somente `-p' for fornecido, é exibida a lista dos comandos associados" #~ msgid "" #~ "each signal number. SIGNAL_SPEC is either a signal name in " #~ msgstr "" -#~ "com cada n�mero de sinal. SINAL-ESPEC � um nome de sinal em ou" +#~ "com cada número de sinal. SINAL-ESPEC é um nome de sinal em 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" +#~ "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'" +#~ "números correspondentes. Note que o sinal pode ser enviado para a shell" #~ msgid "with \"kill -signal $$\"." -#~ msgstr "atrav�s do comando \"kill -SINAL $$\"." +#~ 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" +#~ "Se a opção -t for fornecida, `type' retorna uma única palavra dentre" #~ msgid "" #~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" @@ -5827,28 +8059,28 @@ msgstr "" #~ msgid "" #~ "alias, shell reserved word, shell function, shell builtin, disk file," #~ msgstr "" -#~ "alias, uma palavra reservada, fun��o ou comando interno da shell, um " +#~ "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." +#~ 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" +#~ 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'." +#~ 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" +#~ 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," +#~ "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." +#~ 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" @@ -5858,14 +8090,14 @@ msgstr "" #~ msgid "Ulimit provides control over the resources available to processes" #~ msgstr "" -#~ "Ulimit estabelece controle sobre os recursos dispon�veis para os processos" +#~ "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:" +#~ 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" @@ -5874,56 +8106,56 @@ msgstr "" #~ 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" +#~ 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" +#~ " -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" +#~ 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" +#~ " -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" +#~ 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" +#~ 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'" +#~ 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'" +#~ 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" +#~ 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" +#~ 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" +#~ 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." +#~ 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" +#~ "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" +#~ 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" +#~ msgstr "incrementos de 512 bytes, e -u, que é o número cardinal de" #~ msgid "processes." #~ msgstr "processos." @@ -5931,235 +8163,245 @@ msgstr "" #~ 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," +#~ "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'" +#~ "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." +#~ 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," +#~ "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)." +#~ "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" +#~ "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," +#~ "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" +#~ 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" +#~ "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." +#~ 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" +#~ "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." +#~ 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" +#~ "O laço `for' executa a sequê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 \"$@\"'" +#~ "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" +#~ "(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." +#~ 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" +#~ "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" +#~ "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 \"$@\"' �" +#~ "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" +#~ 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" +#~ "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" +#~ 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" +#~ "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" +#~ 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" +#~ 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." +#~ msgstr "até que o comando `break' ou `return' seja executado." + +#~ msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" +#~ msgstr "" +#~ "Executar seletivamente COMANDOS tomando por base a correspondência entre" #~ msgid "`|' is used to separate multiple patterns." #~ msgstr "" -#~ "PALAVRA e PADR�O. O caracter `|' � usado para separar m�ltiplos padr�es." +#~ "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" +#~ "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 " +#~ "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" +#~ "sequê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'" +#~ "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" +#~ "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." +#~ "último comando executado, ou zero, se nenhuma condição for verdadeira." + +#~ msgid "Expand and execute COMMANDS as long as the final command in the" +#~ msgstr "Expande e executa COMANDOS enquanto o comando final nos" #~ msgid "`while' COMMANDS has an exit status of zero." -#~ msgstr "COMANDOS `while' tiver um status de sa�da igual a 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." +#~ 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" +#~ 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." +#~ msgstr "para a função como $0 .. $n." + +#~ msgid "Run a set of commands in a group. This is one way to redirect an" +#~ msgstr "Executa um conjunto de comandos agrupando-os. Esta é uma forma de" #~ 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" +#~ "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 � " +#~ "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." +#~ "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." +#~ "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'." +#~ 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" +#~ 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" +#~ msgstr "\t\ta serem pesquisados quando o argumento para `cd' não for" #~ msgid "\t\tdirectory." -#~ msgstr "\t\tencontrado no diret�rio atual." +#~ 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 � " +#~ "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." +#~ "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" +#~ 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." +#~ msgstr "\t\tshell 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." +#~ "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." +#~ "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" +#~ 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" +#~ 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," +#~ 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" +#~ 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." +#~ "\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." +#~ "MAILCHECK\tFreqüência, em segundos, para a `bash' verificar novo e-mail." #~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" #~ msgstr "" @@ -6169,33 +8411,33 @@ msgstr "" #~ 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." +#~ 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" +#~ "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" +#~ 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." +#~ msgstr "\t\tmensagem de prompt primária." #~ msgid "PS1 The primary prompt string." -#~ msgstr "PS1 A mensagem prim�ria de prompt exibida." +#~ msgstr "PS1 A mensagem primária de prompt exibida." #~ msgid "PS2 The secondary prompt string." -#~ msgstr "PS2 A mensagem secund�ria de prompt exibida." +#~ 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" +#~ "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 "" @@ -6228,75 +8470,191 @@ msgstr "" #~ msgid "" #~ " Non-null means to save multiple-line commands together on" #~ msgstr "" -#~ " Se n�o for nulo significa salvar comandos com m�ltiplas" +#~ " 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." +#~ 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" +#~ "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" +#~ 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" +#~ 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" +#~ 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 `#'." +#~ 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" +#~ "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." +#~ "\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" +#~ 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" +#~ 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," +#~ 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" +#~ "\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." +#~ msgstr "\t\ttodas as linhas na lista de histórico." + +#~ 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." + +#~ msgid "+N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "" +#~ "+N\tRotaciona a pilha de tal forma que o n-ésimo diretório (contado a" + +#~ msgid "\tfrom the left of the list shown by `dirs') is at the top." +#~ msgstr "\tpartir da esquerda da lista exibida por `dirs') fique no topo." + +#~ msgid "-N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "" +#~ "-N\tRotaciona a pilha de tal forma que o n-ésimo diretório (contado a" + +#~ msgid "\tfrom the right) is at the top." +#~ msgstr "\tpartir da direita) fique no topo." + +#~ msgid "-n\tsuppress the normal change of directory when adding directories" +#~ msgstr "-n\tsuprime a troca normal de diretório ao se adicionar diretórios" + +#~ msgid "\tto the stack, so only the stack is manipulated." +#~ msgstr "\tà pilha, fazendo com que somente a pilha seja manipulada." + +#~ msgid "dir\tadds DIR to the directory stack at the top, making it the" +#~ msgstr "dir\tadiciona DIR à pilha de diretórios, no topo, tornando-o o" + +#~ 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 "+N\tremoves the Nth entry counting from the left of the list" +#~ msgstr "+N\tremove a n-ésima entrada contada a partir da esquerda da lista" + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr "\texibida por `dirs', começando por zero. Por exemplo: `popd +0'" + +#~ msgid "\tremoves the first directory, `popd +1' the second." +#~ msgstr "\tremove o primeiro diretório, `popd +1' o segundo." + +#~ msgid "-N\tremoves the Nth entry counting from the right of the list" +#~ msgstr "-N\tremove a n-ésima entrada contada a partir da direita da lista" + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr "\texibida por `dirs', começando por zero. Por exemplo: `popd -0'" + +#~ msgid "\tremoves the last directory, `popd -1' the next to last." +#~ msgstr "\tremove o último diretório, `popd -1' o penúltimo." + +#~ msgid "" +#~ "-n\tsuppress the normal change of directory when removing directories" +#~ msgstr "-n\tsuprime a troca normal de diretório ao remover-se diretórios" + +#~ msgid "\tfrom the stack, so only the stack is manipulated." +#~ msgstr "\tda pilha, fazendo com que somente a pilha seja manipulada." + +#~ 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." + +#~ msgid "" +#~ "+N\tdisplays 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" + +#~ msgid "\tdirs when invoked without options, starting with zero." +#~ msgstr "\tpor `dirs', quando este é chamado sem opções, começando por zero." + +#~ msgid "" +#~ "-N\tdisplays 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 "Toggle the values of variables controlling optional behavior." #~ msgstr "" -#~ "Alterna os valores das vari�veis controladoras de comportamentos " +#~ "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" +#~ 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" +#~ "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" +#~ 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'." +#~ 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" +#~ 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" +#~ "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." +#~ msgstr "das opções está ativa ou não." diff --git a/po/ro.gmo b/po/ro.gmo index d3c700c..f1036a7 100644 Binary files a/po/ro.gmo and b/po/ro.gmo differ diff --git a/po/ro.po b/po/ro.po index b554fb7..9c79e28 100644 --- a/po/ro.po +++ b/po/ro.po @@ -1,477 +1,665 @@ -# Mesajele �n limba rom�n� pentru pachetul bash -# Copyright (C) 2003 Free Software Foundation, Inc. +# Mesajele în limba română pentru pachetul bash. +# Copyright (C) 2003 - 2022 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# # Eugen Hoanca , 2003. +# Daniel Șerbănescu , 2019. +# Remus-Gabriel Chelu , 2022. +# +# Cronologia traducerii fișierului „bash”: +# Traducerea inițială, făcută de EH, pentru versiunea bash 3.2 (19% - tradus). +# Actualizare a traducerii pentru versiunea 4.0, făcută de EH (24% - tradus). +# Actualizare a traducerii pentru versiunea 5.0, făcută de DȘ (29% - tradus). +# Actualizare a traducerii pentru versiunea 5.1, făcută de R-GC (100% - tradus). +# Actualizare a traducerii pentru versiunea 5.2-rc1, făcută de R-GC. # msgid "" msgstr "" -"Project-Id-Version: bash 2.0\n" +"Project-Id-Version: bash 5.2-rc1\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 \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-18 01:02+0200\n" +"Last-Translator: Remus-Gabriel Chelu \n" "Language-Team: Romanian \n" +"Language: ro\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || ((n%100) > 0 && (n%100) < 20)) ? 1 : 2);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 2.3.1\n" +"X-Poedit-SourceCharset: UTF-8\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "incluziune gre�it� �n interval" +msgstr "indice de matrice greșit" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: se elimină atributul nameref" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%c%c: op�iune invalid�" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nu se poate converti matricea indexată în asociativă" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s: nu se poate atribui c�tre index ne-numeric" +msgstr "%s: nu se poate atribui la index ne-numeric" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: trebuie să fie folosit un indice atunci când se atribuie unei matrice asociative" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: nu s-a putut crea: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" +msgstr "bash_execute_unix_command: nu se poate găsi combinația de taste pentru comandă" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "" +msgstr "%s: primul caracter care nu este spațiu în alb nu este «\"» (ghilimele duble)" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "" +msgstr "nu se închide „%c” în %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "" +msgstr "%s: lipsește separatorul două puncte (:)" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s”: nu se poate înlătura combinația de taste atribuită la comandă" + +# Aici, trebuie folosit forma de plural, așa cum am făcut-o, sau cea de singular: +# extindere (de) acoladă? +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "expansiunea de acolade: nu se poate aloca memorie pentru %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "expansiunea de acolade: a eșuat alocarea memoriei pentru %u elemente" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "expansiunea de acolade: a eșuat alocarea memoriei pentru „%s”" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%c%c: op�iune invalid�" +msgstr "„%s”: nume alias nevalid" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "editarea liniilor nu este activată" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "" +msgstr "`%s': nume de combinație de taste nevalid" -#: builtins/bind.def:245 -#, fuzzy, c-format +#: builtins/bind.def:252 +#, c-format msgid "%s: cannot read: %s" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: nu s-a putut citii: %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 +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format msgid "`%s': unknown function name" -msgstr "%s: func�ie doar �n citire (readonly)" +msgstr "„%s”: nume de funcție necunoscut" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "" +msgstr "%s nu este asociat niciunei taste.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "" +msgstr "%s poate fi invocat via " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s”: atribuirea nu poate fi ștearsă" -#: builtins/break.def:77 builtins/break.def:117 -#, fuzzy +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "logout" +msgstr "contor buclă" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "" +msgstr "are sens numai într-o buclă „for”, „while” sau „until”" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Returnează contextul apelului subrutinei curente.\n" +" \n" +" Fără EXPR, returnează „$linie $nume_fișier”. Cu EXPR, returnează\n" +" „$linie $subrutină $nume_fișier”; aceste informații suplimentare pot să fie\n" +" folosite pentru a furniza o urmărire a stivei.\n" +" \n" +" Valoarea EXPR indică cîte cadre de apel trebuie să se întoarcă înaintea celui\n" +" curent; cadrul superior este cadrul 0." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "" +msgstr "variabila $HOME nu este definită" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "prea mulți parametri" -#: builtins/cd.def:227 +#: builtins/cd.def:342 +msgid "null directory" +msgstr "director nul" + +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "" +msgstr "variabila $OLDPWD nu este definită" -#: builtins/common.c:101 -#, fuzzy, c-format +#: builtins/common.c:96 +#, c-format msgid "line %d: " -msgstr "slot %3d: " +msgstr "linia %d: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "�n scriere" +msgstr "avertizare: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "" - -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "prea mul�i parametri" +msgstr "%s: utilizare: " -#: builtins/common.c:191 shell.c:499 shell.c:782 -#, fuzzy, c-format +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format msgid "%s: option requires an argument" -msgstr "op�iunea necesit� un parametru: -" +msgstr "%s: opțiunea necesită un argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "" +msgstr "%s: argument numeric necesar" -#: builtins/common.c:205 -#, fuzzy, c-format +#: builtins/common.c:207 +#, c-format msgid "%s: not found" -msgstr "%s: comand� neg�sit�" +msgstr "%s: nu s-a găsit" -#: builtins/common.c:214 shell.c:795 -#, fuzzy, c-format +#: builtins/common.c:216 shell.c:879 +#, c-format msgid "%s: invalid option" -msgstr "%c%c: op�iune invalid�" +msgstr "%s: opțiune nevalidă" -#: builtins/common.c:221 -#, fuzzy, c-format +#: builtins/common.c:223 +#, c-format msgid "%s: invalid option name" -msgstr "%c%c: op�iune invalid�" +msgstr "%s: nume de opțiune nevalid" -#: builtins/common.c:228 general.c:231 general.c:236 -#, fuzzy, c-format +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format msgid "`%s': not a valid identifier" -msgstr "`%s' nu este un identificator valid" +msgstr "„%s” nu este un identificator valid" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "num�r de semnal invalid" +msgstr "număr octal nevalid" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "num�r de semnal invalid" +msgstr "număr hexazecimal nevalid" -#: builtins/common.c:242 expr.c:1256 -#, fuzzy +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "num�r de semnal invalid" +msgstr "număr nevalid" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "" - -#: builtins/common.c:257 +msgstr "%s: specificație de semnal nevalidă" + +# spec = specificare +# sau +# spec = specificație +# ??? +# de rezolvat +# ------------------------------------ +# Opinii/Idei? +# *** +# după revizarea fișierului, DȘ, spune: +# 1. „→ și eu aș păstra specificație aici și în restul fișierului” +# === +# Ok, rămînem cu «spec, specification = specificație» +# . +# 2. → iar job spec l-aș traduce cu „specificația serviciului” (fiind vorba de un proces care rulează pe computer) +# === +# am tradus «job spec» ca specificație de lucru, +# datorită faptului că «job-urile», nu sunt +# întotdeauna niște servicii, și mai ales datorită +# faptului că adesea sunt o pleiadă de procese, +# grupate (cel mai adesea un proces părinte +# cu fii săi), alteori un grup de procese +# interacționate. +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "" +msgstr "„%s”: nu este un pid sau o specificație validă de lucru" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s: variabil� doar �n citire" +msgstr "%s: variabilă protejată la scriere" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: nu se poate atribui" -#: builtins/common.c:272 +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" -msgstr "" +msgstr "%s: %s în afara intervalului" -#: builtins/common.c:272 builtins/common.c:274 -#, fuzzy +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" -msgstr "se a�teapt� parametru" +msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" -msgstr "" - -#: builtins/common.c:282 +msgstr "%s în afara intervalului" + +# R-GC, scrie: +# după revizarea fișierului, DȘ, spune: +# «→ la fel și aici, și la următoarele apariții ale lui job, → „nu există asemenea serviciu”» +# === +# am tradus «job» ca lucrare, datorită faptului +# că «job-urile», nu sunt întotdeauna niște +# servicii, și mai ales datorită faptului că +# adesea sunt o pleiadă de procese, grupate +# (cel mai adesea un proces părinte cu fii săi), +# alteori un grup de procese interacționate. +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "" +msgstr "%s: nu există această lucrare" -#: builtins/common.c:290 -#, fuzzy, c-format +#: builtins/common.c:299 +#, c-format msgid "%s: no job control" -msgstr "nici un control de job �n acest shell" +msgstr "%s: nu există un control de lucrări" -#: builtins/common.c:292 -#, fuzzy +#: builtins/common.c:301 msgid "no job control" -msgstr "nici un control de job �n acest shell" +msgstr "nu există un control de lucrări" -#: builtins/common.c:302 -#, fuzzy, c-format +#: builtins/common.c:311 +#, c-format msgid "%s: restricted" -msgstr "%s: jobul a fost terminat" +msgstr "%s: restricționat" -#: builtins/common.c:304 -#, fuzzy +#: builtins/common.c:313 msgid "restricted" -msgstr "Terminat" - -#: builtins/common.c:312 +msgstr "restricționat" + +# R-GC, întreabă: +# Ce facem cu „Shell”? +# Cum îl traducem? +# *** +# după revizarea fișierului, DȘ, spune: +# „→ mă trem că „shell” ar trebui să rămână tot „shell”: https://ro.wikipedia.org/wiki/Shell_(informatic%C4%83)” +# === +# Mda, un răspuns la care mă așteptam; ca un +# fapt divers: nici alte echipe de traducători, +# n-au reușit să „translate” «shell» în altceva +# decît în «shell», au fost încercări (traduceri +# reale) → scoică, cochilie, carapace sau +# ambalaj; cu toate că unele dintre ele, au +# avut oarecare succes, niciuna n-a rezistat +# cu trecerea timpului. +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "" +msgstr "%s: nu este o comandă internă" -#: builtins/common.c:321 -#, fuzzy, c-format +#: builtins/common.c:330 +#, c-format msgid "write error: %s" -msgstr "eroare de leg�tur� (pipe): %s" +msgstr "eroare de scriere: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "eroare la configurarea atributelor terminalului: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" - -#: builtins/common.c:563 +msgstr "eroare la obținerea atributelor terminalului: %s" + +# - Eroare la preluarea... +# - Eroare la obținerea... +# - Eroare la recuperarea... +# Am ales prima variantă, dar este cea mai bună, +# în contextul dat? +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "" +msgstr "%s: eroare la preluarea directorului curent: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 -#, fuzzy, c-format +#: builtins/common.c:708 builtins/common.c:710 +#, c-format msgid "%s: ambiguous job spec" -msgstr "%s: Redirectare ambigu�" +msgstr "%s: specificație de lucrare, ambiguă" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "ajutorul nu este disponibil în această versiune" + +# R-GC, scrie: +# după revizarea fișierului, DȘ, spune: +# „→ ce zici de „readonly” = „protejat la scriere” (cam lung dar parcă este mai sugestiv)” +# === +# nu cred c-ar fi o problemă asta, odată ce face +# ca mesajul să fie mai clar, mai sugestiv; dar +# cred că introduce o întrebare: +# de cine/contra cui este protejat? +# *** +# cel puțin de moment, dacă nu definitiv, voi +# aplica sugestia făcută, asupra acestui mesaj +# și aaltora asemănătoare... +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nu se poate deconfigura: %s este protejat la scriere" -#: builtins/complete.def:276 +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 #, c-format -msgid "%s: invalid action name" -msgstr "" +msgid "%s: cannot unset" +msgstr "%s: nu se poate deconfigura" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: nume de acțiune nevalid" + +# Întrebare: +# nicio... +# sau +# nu există (o)... +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "" +msgstr "%s: nicio specificație de completare" #: builtins/complete.def:696 msgid "warning: -F option may not work as you expect" -msgstr "" +msgstr "avertisment: este posibil ca opțiunea „-F” să nu funcționeze așa cum vă așteptați" #: builtins/complete.def:698 msgid "warning: -C option may not work as you expect" -msgstr "" - -#: builtins/complete.def:826 +msgstr "avertisment: este posibil ca opțiunea „-C” să nu funcționeze așa cum vă așteptați" + +# Întrebare: +# - În prezent ... +# - În acest moment ... +# - În momentul actual ... +# este formula adecvată contextului? +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "în prezent funcția de completare nu rulează" -#: builtins/declare.def:122 -#, fuzzy +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "poate fi folosit doar �ntr-o func�ie, �i face ca variabila NUME" +msgstr "poate fi folosit doar într-o funcție" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "" +msgstr "nu se poate utiliza „-f” pentru a face funcții" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s: func�ie doar �n citire (readonly)" +msgstr "%s: funcție protejată la scriere" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: variabila de referință nu poate fi o matrice" -#: builtins/declare.def:468 -#, fuzzy, c-format +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nu sunt permise auto-referințele la variabile nameref" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: referință de nume circulară" + +# R-GC, scrie: +# după revizarea fișierului, DȘ, spune: +# „→ cred că s-ar putea pune ghilimele românești” +# === +# corecție aplicată +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s”: nume de variabilă nevalid pentru referință la nume" + +# Problemă: +# in this way = în acest fel +# in this way = în acest mod +# in this way = de această formă +# Mă refer la această intrare, care dintre cele +# 3 opțiuni, este cea mai bună? +#: builtins/declare.def:856 +#, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "$%s: nu se poate asigna �n acest mod" +msgstr "%s: nu se pot distruge variabilele matrice în acest fel" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: nu se poate converti o matrice asociativă într-o matrice indexată" + +# Întrebare: +# - se poate formula mai bine, de exp.: +# alocarea matricei compuse, între ghilimele; este perimată-învechită +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: alocarea de matrice compusă între ghilimele este perimată" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "" +msgstr "încărcarea dinamică nu este disponibilă" -#: builtins/enable.def:312 -#, fuzzy, c-format +#: builtins/enable.def:376 +#, c-format msgid "cannot open shared object %s: %s" -msgstr "nu pot deschide leg�tura numit� %s pentru %s: %s" +msgstr "nu poate deschide obiectul partajat %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "" +msgstr "nu se poate găsi %s în obiectul partajat %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: comanda internă dinamică a «bash», este deja încărcată" + +# De revizat... +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "funcția de încărcare pentru %s returnează eroarea (%d): încărcarea a eșuat" -#: builtins/enable.def:459 +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "" +msgstr "%s: nu este încărcat dinamic" -#: builtins/enable.def:474 -#, fuzzy, c-format +#: builtins/enable.def:577 +#, c-format msgid "%s: cannot delete: %s" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: nu se poate șterge: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" -msgstr "%s: este director" +msgstr "%s: este un director" -#: builtins/evalfile.c:139 -#, fuzzy, c-format +#: builtins/evalfile.c:144 +#, c-format msgid "%s: not a regular file" -msgstr "%s: nu se poate executa fi�ierul binar" +msgstr "%s: nu este un fișier normal" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "" +msgstr "%s: fișierul este prea mare" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: nu se poate executa fi�ierul binar" +msgstr "%s: nu se poate executa fișierul binar" -#: builtins/exec.def:212 -#, fuzzy, c-format +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format msgid "%s: cannot execute: %s" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: nu se poate executa: %s" -#: builtins/exit.def:65 -#, fuzzy, c-format +#: builtins/exit.def:64 +#, c-format msgid "logout\n" -msgstr "logout" +msgstr "deautentificare\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "" +msgstr "nu este un shell de autentificare: utilizați „exit”" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "" +msgstr "Sunt(există) lucrări oprite.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "" +msgstr "Sunt(există) lucrări în execuție.\n" -#: builtins/fc.def:262 -#, fuzzy +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "%s: comand� neg�sit�" +msgstr "nu s-a găsit nici-o comandă" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "" +msgstr "specificație de istoric" -#: builtins/fc.def:370 -#, fuzzy, c-format +#: builtins/fc.def:444 +#, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: nu se poate deschide fișierul temporal: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "actual" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "" +msgstr "lucrarea %d a început fără controlul lucrării" #: builtins/getopt.c:110 -#, fuzzy, c-format +#, c-format msgid "%s: illegal option -- %c\n" -msgstr "op�iune ilegal�: -" +msgstr "%s: opțiune ilegală -- %c\n" #: builtins/getopt.c:111 -#, fuzzy, c-format +#, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "op�iunea necesit� un parametru: -" - -#: builtins/hash.def:92 +msgstr "%s: opțiunea necesită un parametru: -- %c\n" + +# NOTĂ: +# cred că aceasta este cea mai bună traducere posibilă! +# Am frunzărit traducerile celorlalte echipe de traducere latine (nu mi-a scăpat niciuna, în afară de cea galiciană, care obligă la descărcarea fișierului pentru al vedea) +# În cea a echipei spaniole, a tradus mesajul ca: +# asociación desactivada +# ce mi s-a părut cea mai apropiată contextului în care apare mesajul: +# #: builtins/hash.def:91 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "" +msgstr "asocierea este desactivată" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "" +msgstr "%s: tabelul de asociere este gol\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "ultima comand�." +msgstr "potriviri\tcomandă\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Comenzile Shell care se potrivesc cu cuvântul cheie „" +msgstr[1] "Comenzile Shell care se potrivesc cu cuvintele cheie „" +msgstr[2] "Comenzile Shell care se potrivesc cu cuvintele cheie „" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" +"”\n" +"\n" #: builtins/help.def:185 -#, fuzzy, c-format +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "niciun subiect de ajutor nu se potrivește cu „%s”. Încercați «help help» sau «man -k %s» sau «info %s»." + +#: builtins/help.def:223 +#, c-format msgid "%s: cannot open: %s" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: nu se poate deschide: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -482,120 +670,165 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" +"Aceste comenzi shell, sunt definite intern. Tastează «help», pentru a vedea\n" +"această listă.\n" +"Tastează «help nume_funcție» pentru a afla mai multe despre funcția „nume_funcție”.\n" +"Utilizați «info bash» pentru a afla mai multe despre shell în general.\n" +"Utilizați «man -k» sau «info» pentru a afla mai multe despre comenzile care nu\n" +"sunt în această listă.\n" +"\n" +"O stea (*) în dreptul unui nume înseamnă că acea comandă este dezactivată.\n" +"\n" -#: builtins/history.def:154 +# Propunere: +# Mă gîndesc dacă n-ar suna mai bine fraza, dacă +# înlocuiesc „unul” cu „un argument”, așa: +# nu se poate folosi mai mult de un argument dintre -anrw +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "" +msgstr "nu se poate folosi mai mult de o opțiune dintre „-a, -n, -r sau -w”" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "" +msgstr "poziție în registrul istoric al comenzilor" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: marcaj de timp nevalid" -#: builtins/history.def:365 -#, fuzzy, c-format +#: builtins/history.def:449 +#, c-format msgid "%s: history expansion failed" -msgstr "%s: se a�teapt� expresie �ntreag� (integer)" +msgstr "%s: a eșuat expansiunea istoriei" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: variabil� f�r� limit�" +msgstr "%s: a eșuat inlib" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "" +msgstr "nu sunt permise alte opțiuni cu „-x”" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "" +msgstr "%s: argumentele trebuie să fie ID-uri de proces sau de lucrări" -#: builtins/kill.def:263 -#, fuzzy +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "Eroare necunoscut� %d" +msgstr "Eroare necunoscută" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "se a�teapt� expresie" +msgstr "se așteaptă expresie" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: variabil� f�r� limit�" +msgstr "%s: nu este o matrice indexată" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "" +msgstr "%s: specificație de descriptor de fișier nevalidă" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "" +msgstr "%d: descriptor de fișier nevalid: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%c%c: op�iune invalid�" +msgstr "%s: contorizare de linii nevalidă" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%c%c: op�iune invalid�" +msgstr "%s: origine matrice nevalid" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "num�r de semnal invalid" +msgstr "%s: cuantum de apel invers nevalid" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: variabil� f�r� limit�" +msgstr "nume de variabilă matrice gol" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "este necesar suport pentru variabilă matrice" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "" +msgstr "„%s”: lipsește caracterul de format" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c”: specificație a formatului de timp nevalidă" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "" +msgstr "„%c”: caracter de format nevalid" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" -msgstr "" +msgstr "avertizare: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "problemă cu analizarea formatului: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "" +msgstr "lipsește o cifră hexazecimală pentru \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "lipsește o cifră unicode pentru \\%c" -#: builtins/pushd.def:195 -#, fuzzy +#: builtins/pushd.def:199 msgid "no other directory" -msgstr "director superior." +msgstr "niciun alt director" -#: builtins/pushd.def:462 -#, fuzzy +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s argument nevalid" + +#: builtins/pushd.def:480 msgid "" -msgstr "\tnoul director de lucru curent." +msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "stiva de directoare este goală" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "" - -#: builtins/pushd.def:683 +msgstr "indexul stivei de directoare" + +# R-GC, scrie: +# după revizarea fișierului, DȘ, spune: +# «→ aș pune „directorul personal” în loc de „acasă”» +# === +# nu-mi prea place să amestec numele lucurilor, +# cu definiția lor, în acest caz: +# „directorul acasă → directorul personal al utilizatorului” +# voi face aceasă schimbare, în cazul în care, +# autorul numește home folder, în loc de +# home directory +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -610,16 +843,32 @@ msgid "" " \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" +" +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" +" -N\tDisplays the Nth entry counting from the right of the list shown by\n" "\tdirs when invoked without options, starting with zero." msgstr "" +"Afișează lista curentă a directoarelor memorate. Directoarele\n" +" sunt adăugate la această listă cu comanda «pushd» și sunt eliminate din\n" +" ea, cu comanda «popd».\n" +" \n" +" Opțiuni:\n" +" -c\tgolește stiva de directoare prin ștergerea tuturor elementelor\n" +" -l\tnu afișează versiuni scurtate (cu ~) ale directoarelor în raport cu\n" +" \tdirectorul dumneavoastră «acasă»\n" +" -p\timprimă stiva de directoare cu o intrare pe linie\n" +" -v\timprimă stiva de directoare cu o intrare pe linie, prefixată cu poziția\n" +" \tsa în stivă\n" +" \n" +" Argumente:\n" +" +N\tAfișează a N-a intrare numărând din stânga listei afișate de «dirs»,\n" +" \tatunci când este invocată fără opțiuni, începând cu zero.\n" +" \n" +" -N\tAfișează a N-a intrare numărând din dreapta listei afișate de «dirs»,\n" +"\tatunci când este invocată fără opțiuni, începând cu zero." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -643,8 +892,29 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Adaugă un director în partea de sus a stivei de directoare sau rotește\n" +" stiva, făcând din noul director din partea de sus a stivei, directorul de\n" +" lucru curent. Fără argumente, interschimbă primele două directoare.\n" +" \n" +" Opțiuni:\n" +" -n\tSuprimă schimbarea normală a directorului atunci când se\n" +" \tadaugă directoare la stivă, astfel încât numai stiva este manipulată.\n" +" \n" +" Argumente:\n" +" +N\tRotește stiva astfel încât al N-lea director (numărând din\n" +" \tstânga listei afișate de «dirs», începând cu zero) să fie în\n" +" \tpartea de sus.\n" +" \n" +" -N\tRotește stiva astfel încât al N-lea director (numărând din\n" +" \tdreapta listei afișate de «dirs», începând cu zero) să fie în\n" +" \tpartea de sus.\n" +" \n" +" dir\tAdaugă DIR la stiva de directoare din partea de sus,\n" +" \tfăcându-l noul director de lucru curent.\n" +" \n" +" Comanda internă «dirs» arată stiva curentă de directoare." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -664,859 +934,1045 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Elimină intrările din stiva de directoare. Fără argumente, elimină directorul\n" +" din partea de sus a stivei, și trece la cel cea devenit noul director de sus\n" +" a stivei.\n" +" \n" +" Opțiuni:\n" +" -n\tSuprimă schimbarea normală a directorului atunci când se elimină\n" +" \tdirectoare din stivă, astfel încât numai stiva este manipulată.\n" +" \n" +" Argumente:\n" +" +N\tElimină intrarea a N-a numărând din stânga listei afișate de «dirs»,\n" +" \tîncepând cu zero. De exemplu: «popd +0» elimină primul director,\n" +" \t«popd +1» al doilea director, șamd.\n" +" \n" +" -N\tElimină intrarea a N-a numărând din dreapta listei afișate de «dirs»,\n" +" \tîncepând cu zero. De exemplu: «popd -0» elimină ultimul director,\n" +" \t„popd -1” penultimul director, șamd.\n" +" \n" +" Comanda internă «dirs» arată stiva curentă de directoare." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "" +msgstr "%s: specificație a timpului de expirare nevalidă" -#: builtins/read.def:588 -#, fuzzy, c-format +#: builtins/read.def:827 +#, c-format msgid "read error: %d: %s" -msgstr "eroare de leg�tur� (pipe): %s" - -#: builtins/return.def:73 +msgstr "eroare de citire: %d: %s" + +# Comentariu: +# Eram un pic indecis asupra formei finale a traducerii, +# așa că am început să trag cu ochiul la traducerile +# celorlalți latini, așa am descoperit la brazilieni, +# francezi și spanioli(în ordine alfabetică), formula +# magică pentru această traducere: +# 1. +# msgstr "possível retornar (`return') apenas de uma função ou script carregado (com `source')" +# 2. +# msgstr "« return » n'est possible que depuis une fonction ou depuis un script exécuté par « source »" +# 3. +# msgstr "sólo se puede usar `return' desde una función o un script leído con `source'" +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "" - -#: builtins/set.def:768 -#, fuzzy +msgstr "„return”, se poate utiliza doar de la o funcție sau script executat(ă) de la „source”" + +# R-GC, scrie: +# după revizarea fișierului, DȘ, spune: +# „→ nu se pot anula...” +# === +# Ok, corecție aplicată +#: builtins/set.def:869 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" +msgstr "nu se pot anula simultan o funcție și o variabilă" -#: builtins/set.def:823 -#, fuzzy, c-format +#: builtins/set.def:969 +#, c-format msgid "%s: not an array variable" -msgstr "%s: variabil� f�r� limit�" +msgstr "%s: nu este o variabilă matrice" -#: builtins/setattr.def:186 -#, fuzzy, c-format +#: builtins/setattr.def:189 +#, c-format msgid "%s: not a function" -msgstr "%s: func�ie doar �n citire (readonly)" +msgstr "%s: nu este o funcție" -#: builtins/shift.def:71 builtins/shift.def:77 -#, fuzzy -msgid "shift count" -msgstr "shift [n]" +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: nu se poate exporta" -#: builtins/shopt.def:260 +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "contor deplasare(shift)" + +# R-GC, scrie: +# după revizarea fișierului, DȘ, spune: +# «→ similar și aici: „nu se pot activa ... ”» +# === +# Ok, corecție aplicată +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "" +msgstr "nu se pot activa și dezactiva simultan opțiunile de shell" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "" +msgstr "%s: nume nevalid al opțiunii shell" #: builtins/source.def:128 msgid "filename argument required" -msgstr "" +msgstr "este necesar argumentul nume_de_fișier" -#: builtins/source.def:153 -#, fuzzy, c-format +#: builtins/source.def:154 +#, c-format msgid "%s: file not found" -msgstr "%s: comand� neg�sit�" +msgstr "%s: nu s-a găsit fișierul" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "nu se poate suspenda" -#: builtins/suspend.def:111 -#, fuzzy +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "Ie�ire dintr-un login al shell-ului." +msgstr "nu se poate suspenda un shell de autentificare" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s este un alias pentru „%s”\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "" +msgstr "%s este un cuvânt cheie shell\n" -#: builtins/type.def:274 -#, fuzzy, c-format +#: builtins/type.def:275 +#, c-format msgid "%s is a function\n" -msgstr "%s: func�ie doar �n citire (readonly)" +msgstr "%s este o funcție\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s este o comandă internă specială a shell\n" -#: builtins/type.def:296 +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s este o comandă internă a shell\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" -msgstr "" +msgstr "%s este %s\n" -#: builtins/type.def:337 +# sau: este mărunțit/fragmentat ? +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "%s este asociat(hashed) (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: limită de argument nevalidă" -#: builtins/ulimit.def:398 -#, fuzzy, c-format +#: builtins/ulimit.def:426 +#, c-format msgid "`%c': bad command" -msgstr "%c%c: op�iune invalid�" +msgstr "„%c”: comandă incorectă" -#: builtins/ulimit.def:427 -#, fuzzy, c-format +#: builtins/ulimit.def:464 +#, c-format msgid "%s: cannot get limit: %s" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: nu se poate obține limita: %s" -#: builtins/ulimit.def:453 -#, fuzzy +#: builtins/ulimit.def:490 msgid "limit" -msgstr "limit� CPU" +msgstr "limită" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 -#, fuzzy, c-format +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: nu se poate modifica limita: %s" -#: builtins/umask.def:118 -#, fuzzy +#: builtins/umask.def:115 msgid "octal number" -msgstr "num�r de semnal invalid" +msgstr "număr octal" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "„%c”: operator de mod simbolic nevalid" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "„%c”: caracter de mod simbolic nevalid" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " linie " -#: error.c:165 -#, fuzzy, c-format +#: error.c:164 +#, c-format msgid "last command: %s\n" -msgstr "ultima comand�." +msgstr "ultima comandă: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "" +msgstr "Se abandonează..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "RAPORT: " -#: error.c:406 -#, fuzzy +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "Avertisment de DEPANARE: " + +#: error.c:488 msgid "unknown command error" -msgstr "Eroare necunoscut� %d" +msgstr "eroare de comandă necunoscută" -#: error.c:407 -#, fuzzy +#: error.c:489 msgid "bad command type" -msgstr "�i nume de comand�." +msgstr "tip de comandă greșit" -#: error.c:408 -#, fuzzy +#: error.c:490 msgid "bad connector" -msgstr "conector gre�it `%d'" +msgstr "conector greșit" -#: error.c:409 -#, fuzzy +#: error.c:491 msgid "bad jump" -msgstr "Salt invalid %d" +msgstr "salt eronat" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "%s: variabil� f�r� limit�" +msgstr "%s: variabilă neasociată" -#: 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atimed expirat așteptând introducerea datelor: auto-logout\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "" +msgstr "nu se poate redirecționa intrarea standard de la /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "" +msgstr "TIMEFORMAT: „%c”: caracter de format nevalid" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] încă există" + +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "eroare de leg�tur� (pipe): %s" +msgstr "eroare de linie de conectare" + +# Opinie/Motivație: +# am ales să traduc nesting = suprapunere +# și nu +# nesting = imbricare +# pentru că consider că este vorba de efectul procesului (evaluările, ce vin una după alta,suprapunîndu-se) și nu de-a numi procesul în sine +# În plus, mi se pare că sună mult mai normal la ureche +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: s-a depășit nivelul maxim de suprapunere de «eval» (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: s-a depășit nivelul maxim de suprapunere de citiri cu «source» (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: s-a depășit nivelul maxim de suprapunere de funcții (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: limitat: nu se poate specifica `/' �n numele comenzilor" +msgstr "%s: limitat: nu se poate specifica „/” în numele comenzilor" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s: comand� neg�sit�" +msgstr "%s: comandă negăsită" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: nu se poate executa: fișierul necesar nu a fost găsit" -#: execute_cmd.c:4827 -#, fuzzy, c-format +#: execute_cmd.c:6000 +#, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: este director" +msgstr "%s: %s: interpret greșit" -#: execute_cmd.c:4976 -#, fuzzy, c-format +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: nu se poate executa fișierul binar: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s”: este o comandă internă specială" + +#: execute_cmd.c:6175 +#, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "nu se poate duplica fd %d �n fd 0: %s" +msgstr "nu se poate duplica descriptorul de fișier %d în descriptorul de fișier %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "nivel de recursivitate al expresiei dep�it" +msgstr "nivel de recursivitate al expresiei depășit" -#: expr.c:265 -#, fuzzy +#: expr.c:291 msgid "recursion stack underflow" -msgstr "Stiv� recursivitate prea pu�in folosit�(underflow)" +msgstr "stivă recursivă sub nivelul de depășire" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "eroare de sintax� �n expresie " +msgstr "eroare de sintaxă în expresie" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "s-a �ncercat asignare c�tre non-variabil�" +msgstr "s-a încercat asignare către non-variabilă" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "eroare de sintaxă în atribuirea variabilei" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "�mp�r�ire la 0" +msgstr "împărțire la 0" -#: expr.c:471 -#, fuzzy +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "bug: identificator(token) expassign gre�it %d" +msgstr "eroare: simbol de atribuire al expresiei greșit" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "`:' a�teptat dup� expresie condi�ional�" +msgstr "se aștepta „:” după expresia condițională" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" -msgstr "" +msgstr "exponent mai mic de 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" +msgstr "se aștepta un identificator după pre-increment sau pre-decrement" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "`)' lips�" +msgstr "„)” lipsește" -#: expr.c:897 expr.c:1176 -#, fuzzy +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "eroare de sintax�: sf�r�it de fi�ier nea�teptat" +msgstr "eroare de sintaxă: se aștepta un operand" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "" +msgstr "eroare de sintaxă: operator aritmetic nevalid" -#: expr.c:1202 -#, fuzzy, c-format +#: expr.c:1518 +#, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s: %s: %s (identificatorul erorii este \"%s\")\n" +msgstr "%s%s%s: %s (identificatorul erorii este „%s”)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "" - -#: expr.c:1280 +msgstr "bază aritmetică nevalidă" + +# R-GC, scrie: +# cum „constantă întreagă nevalidă”, nu mă +# atrăgea prea mult, am adaptat traducerea +# la ce se vede +# *** +# după revizarea fișierului, DȘ, spune: +# «→ un mic typo la „întreg”» +# === +# Ok, corecție aplicată; graba... e de vină +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "constantă de număr întreg nevalidă" + +#: expr.c:1603 msgid "value too great for base" -msgstr "valoare prea mare pentru baz�" +msgstr "valoare prea mare pentru bază" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "eroare de redirectare" +msgstr "%s: eroare în expresie\n" -#: general.c:61 -#, fuzzy +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "getwd: nu s-au putut accesa directoarele p�rinte" +msgstr "getcwd: nu s-au putut accesa directoarele părinte" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "" +msgstr "nu se poate redefini modul „nodelay” pentru descriptorul de fișier %d" -#: input.c:258 -#, fuzzy, c-format +#: input.c:266 +#, 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" +msgstr "nu se poate aloca un nou descriptor de fișier pentru intrarea bash din fd %d" -#: input.c:266 -#, fuzzy, c-format +#: input.c:274 +#, c-format msgid "save_bash_input: buffer already exists for new fd %d" -msgstr "check_bash_input: buffer deja existent pentru fd nou %d" +msgstr "save_bash_input: memorie tampon deja existentă pentru noul descriptor de fișier %d" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: linie de conectare pgrp" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" -msgstr "" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: BUCLĂ: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" -msgstr "" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: BUCLĂ: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "" +msgid "forked pid %d appears in running job %d" +msgstr "pid-ul bifurcat %d apare în lucrarea în execuție %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "se șterge lucrarea oprită %d cu grupul de procese %ld" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: pid %5ld (%s) marcat ca încă în viață" -#: jobs.c:1401 -#, fuzzy, c-format +#: jobs.c:1839 +#, c-format msgid "describe_pid: %ld: no such pid" -msgstr "describe_pid: Nu exist� pid-ul (%d)!\n" +msgstr "describe_pid: %ld: nu există un asemenea pid" -#: jobs.c:1416 -#, fuzzy, c-format +#: jobs.c:1854 +#, c-format msgid "Signal %d" -msgstr "Semnal Necunoscut #%d" +msgstr "Semnal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Finalizat" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "Stopat" +msgstr "Oprit" -#: jobs.c:1439 -#, fuzzy, c-format +#: jobs.c:1877 +#, c-format msgid "Stopped(%s)" -msgstr "Stopat" +msgstr "Oprit(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "�n rulare" +msgstr "În rulare" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Finalizat(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "Ie�ire %d" +msgstr "Ieșire %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "Stare necunoscut�" +msgstr "Stare necunoscută" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(core dumped) " -#: jobs.c:1568 -#, fuzzy, c-format +# NOTĂ: de aflat ce înseamnă: +# wd = +# ===================================== +# NOTA_BENE: +# pe viitor „istețule” uită-te în fișierul de traducere, +# deschis ca text, și vei avea mari șanse să afli +# răspunsul; fără a «gonglear» ca bezmeticul în Internet +#: jobs.c:2009 +#, c-format msgid " (wd: %s)" -msgstr "(wd actual: %s)\n" +msgstr " (dir.lucru: %s)" -#: jobs.c:1776 -#, fuzzy, c-format +#: jobs.c:2250 +#, c-format msgid "child setpgid (%ld to %ld)" -msgstr "setpgid copil (de la %d la %d) a �nt�lnit o eroare %d: %s\n" +msgstr "setpgid proces-copil (de la %ld la %ld)" -#: jobs.c:2104 nojobs.c:585 -#, fuzzy, c-format +# NOTĂ: +# «wait», nu se traduce; aici, și în mesajele următoare, +# face parte din categoria cuvintelor ce nu se traduc. +# Datorită contextului în care se află. +#: jobs.c:2608 nojobs.c:666 +#, 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" +msgstr "wait: pid %ld nu este un proces-copil al acestui shell" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "" +msgstr "wait_for: Nu există nicio înregistrare a procesului %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: lucrarea %d este oprită" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: nu există lucrări actuale" -#: jobs.c:2829 +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "%s: jobul a fost terminat" +msgstr "%s: lucrarea a fost terminată" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: lucrarea %d se află deja în fundal" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: se activează WNOHANG pentru a evita blocarea pe termen nedefinit" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "slot %3d: " +msgstr "%s: linie %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (core dumped)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "(wd actual: %s)\n" +msgstr "(dir.lucru actual: %s)\n" -#: jobs.c:3579 -#, fuzzy +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "initialize_jobs: getpgrp e�uat: %s" +msgstr "initialize_job_control: getpgrp a eșuat" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: nu există control de lucrări în fundal" -#: jobs.c:3639 -#, fuzzy +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "initialize_jobs: disciplin� linie: %s" +msgstr "initialize_job_control: disciplină linie" -#: jobs.c:3649 -#, fuzzy +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "initialize_jobs: getpgrp e�uat: %s" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "nu se poate configura grupul de procese din terminal (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "nici un control de job �n acest shell" +msgstr "nu există niciun control de lucrări în acest shell" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "" +msgstr "malloc: a eșuat aserțiunea: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" +"\r\n" +"malloc: %s:%d: aserțiune greșită\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "necunoscut" -#: lib/malloc/malloc.c:797 +# Altă formulă de traducere al mesajului, este: +# „malloc: bloc șters din lista disponibilă ” +# Notă, pentru a decide care dintre aceste traduceri, +# rămîne, e nevoie de colaborarea(opinii, sugestii, +# comentarii, etc) ale utilizatorilor de «bash»... +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" +msgstr "malloc: bloc suprascris pe lista liberă" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" +msgstr "free: apelat cu un argument bloc deja eliberat" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "" +msgstr "free: apelat cu un argument de bloc nealocat" -#: lib/malloc/malloc.c:896 +# Am tradus inițial mesajul, ca: +# „free: depășire insuficientă detectată; mh_nbytes în afara intervalului” +# formulă actuală mi se pare mai adecvată. contextului, precum și a mesajului din engleză +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "free: s-a detectat o depășire insuficientă; mh_nbytes în afara intervalului" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: s-a detectat o depășire insuficientă; magic8 corupt" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "" +msgstr "free: dimensiunile bucăților de început și de sfârșit sunt diferite" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "" +msgstr "realloc: apelat cu un argument de bloc nealocat" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "realloc: s-a detectat o depășire insuficientă; mh_nbytes țn afara intervalului" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: s-a detectat o depășire insuficientă; magic8 corupt" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" +msgstr "realloc: dimensiunile bucăților de început și de sfârșit, diferă" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" +msgstr "register_alloc: tabelul de alocare este plin cu FIND_ALLOC?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "" +msgstr "register_alloc: %p deja în tabel ca fiind alocat?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "" +msgstr "register_alloc: %p deja în tabel ca liber?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "" +msgstr "bază nevalidă" #: lib/sh/netopen.c:168 -#, fuzzy, c-format +#, c-format msgid "%s: host unknown" -msgstr "necunoscut" +msgstr "%s: gazdă necunoscută" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "" +msgstr "%s: serviciu nevalid" #: lib/sh/netopen.c:306 #, c-format msgid "%s: bad network path specification" -msgstr "" +msgstr "%s: specificație incorectă pentru ruta rețelei" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "" +msgstr "operațiunile de rețea nu sunt acceptate" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: nu se poate schimba parametrul de limbă (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: nu se poate schimba parametrul de limbă (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: nu pot realoca %lu octe�i (%lu octe�i aloca�i)" +msgstr "setlocale: %s: nu se poate schimba parametrul de limbă (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: nu pot realoca %lu octe�i (%lu octe�i aloca�i)" +msgstr "setlocale: %s: nu se poate schimba parametrul de limbă (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" -msgstr "Ave�i mail �n $_" +msgstr "Aveți mail în $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" -msgstr "Ave�i mail nou �n $_" +msgstr "Aveți mail nou în $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Mailul din %s a fost citit\n" -#: make_cmd.c:323 -#, fuzzy +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "eroare de sintax� �n expresie " +msgstr "eroare de sintaxă: expresie aritmetică necesară" -#: make_cmd.c:325 -#, fuzzy +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "eroare de sintax�: sf�r�it de fi�ier nea�teptat" +msgstr "eroare de sintaxă: „;” neașteptat" -#: make_cmd.c:326 -#, fuzzy, c-format +#: make_cmd.c:317 +#, c-format msgid "syntax error: `((%s))'" -msgstr "eroare de sintax�" +msgstr "eroare de sintaxă: „((%s))”" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: tip de instruc�iune gre�it %d" +msgstr "make_here_document: tip de instrucțiune greșit %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "«here-document» la linia %d delimitat de sfârșitul fișierului (se aștepta „%s”)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" -msgstr "" +msgstr "make_redirection: instrucțiunea de redirecționare „%d” este în afara intervalului" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) depășește SIZE_MAX (%lu): linie trunchiată" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "numărul maxim de «here-document» a fost depășit" -#: parse.y:3133 parse.y:3369 -#, fuzzy, c-format +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "EOF brusc �n c�utare dup� `%c'" +msgstr "sfârșit neașteptat al fișierului(EOF) în timp ce se căuta coincidența pentru „%c”" -#: parse.y:3951 -#, fuzzy +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "EOF brusc �n c�utare dup� `%c'" +msgstr "sfârșit neașteptat al fișierului(EOF) în timp ce se căuta „]]”" -#: parse.y:3956 -#, fuzzy, c-format +#: parse.y:4457 +#, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "eroare de sintax� nea�teptat� l�ng� `%s'" +msgstr "eroare de sintaxă în expresia condițională: simbol neașteptat „%s”" -#: parse.y:3960 -#, fuzzy +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "eroare de sintax� �n expresie " +msgstr "eroare de sintaxă în expresia condițională" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "" +msgstr "simbol neașteptat „%s”, așteptat „)”" -#: parse.y:4042 -#, fuzzy +#: parse.y:4543 msgid "expected `)'" -msgstr "se a�teapt� `)'" +msgstr "se aștepta „)”" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "" +msgstr "argument neașteptat „%s” pentru operatorul unar condițional" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" -msgstr "" +msgstr "argument neașteptat pentru operatorul unar condițional" -#: parse.y:4120 -#, fuzzy, c-format +#: parse.y:4621 +#, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "%s: se a�teapt� operator binar" +msgstr "identificator neașteptat „%s”, se aștepta operator binar condițional" -#: parse.y:4124 -#, fuzzy +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "%s: se a�teapt� operator binar" +msgstr "se aștepta operator binar condițional" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "" +msgstr "argument neașteptat „%s” pentru operatorul binar condițional" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" -msgstr "" +msgstr "argument neașteptat pentru operatorul binar condițional" -#: parse.y:4161 -#, fuzzy, c-format +#: parse.y:4662 +#, c-format msgid "unexpected token `%c' in conditional command" -msgstr "`:' a�teptat dup� expresie condi�ional�" +msgstr "identificator neașteptat „%c” în comanda condițională" -#: parse.y:4164 -#, fuzzy, c-format +#: parse.y:4665 +#, c-format msgid "unexpected token `%s' in conditional command" -msgstr "`:' a�teptat dup� expresie condi�ional�" +msgstr "identificator neașteptat „%s” în comanda condițională" -#: parse.y:4168 -#, fuzzy, c-format +#: parse.y:4669 +#, c-format msgid "unexpected token %d in conditional command" -msgstr "`:' a�teptat dup� expresie condi�ional�" +msgstr "identificator neașteptat %d în comanda condițională" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "eroare de sintax� nea�teptat� l�ng� `%s'" +msgstr "eroare de sintaxă neașteptată lângă „%s”" -#: parse.y:5477 -#, fuzzy, c-format +#: parse.y:6137 +#, c-format msgid "syntax error near `%s'" -msgstr "eroare de sintax� nea�teptat� l�ng� `%s'" +msgstr "eroare de sintaxă neașteptată lângă „%s”" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "eroare de sintax�: sf�r�it de fi�ier nea�teptat" +msgstr "eroare de sintaxă: sfârșit de fișier neașteptat" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" -msgstr "eroare de sintax�" +msgstr "eroare de sintaxă" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Folosi�i \"%s\" pentru a p�r�si shellul.\n" +msgstr "Utilizați „%s” pentru a părăsi shell-ul.\n" -#: parse.y:5711 -#, fuzzy +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "EOF brusc �n c�utare dup� `%c'" +msgstr "sfârșit neașteptat al fișierului în timp ce se căuta după perechea lui „)”" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "" +msgstr "completare: funcția „%s” nu a fost găsită" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programable_completion: %s: posibilă buclă de reîncercare" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" +msgstr "progcomp_insert: %s: COMPSPEC null" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: conector gre�itr `%d'" +msgstr "print_command: conector greșit „%d”" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "" +msgstr "xtrace_set: %d: descriptor de fișier nevalid" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: indicatorul pentru fișier este NULL" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != nrfișier xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf: „%c”: caracter de format nevalid" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "" +msgstr "descriptor de fișier în afara intervalului" -#: redir.c:166 -#, fuzzy, c-format +#: redir.c:205 +#, c-format msgid "%s: ambiguous redirect" -msgstr "%s: Redirectare ambigu�" +msgstr "%s: redirectare ambiguă" -#: redir.c:170 -#, fuzzy, c-format +#: redir.c:209 +#, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: nu se poate accesa(clobber) fi�ierul existent" +msgstr "%s: nu se poate suprascrie fișierul existent" -#: redir.c:175 -#, fuzzy, c-format +#: redir.c:214 +#, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: limitat: nu se poate specifica `/' �n numele comenzilor" +msgstr "%s: restricționat: nu se poate redirecționa ieșirea" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:219 +#, c-format msgid "cannot create temp file for here-document: %s" -msgstr "nu pot face leg�tur� (pipe) pentru substitu�ia procesului: %s" +msgstr "nu se poate crea un fișier temporar pentru «here-document»: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: nu pot asigna list� membrului intervalului" - -#: redir.c:544 +msgstr "%s: nu se poate atribui descriptorul de fișier variabilei" + +# Întrebare: este mai bine/corect +# „..... fără o conexiune de rețea” +# sau, +# ”fără a avea o conexiune la rețea”? +# *** +# după revizarea fișierului, DȘ, spune: +# «→conexiunea trebuie să fie LA rețea în ambele cazuri, „conexiune de rețea” este doar un tip de conexiune (fizică sau virtuală), iar „conexiunea la rețea” reprezintă accesul calculatorului la o rețea anume. (aici se subînțelege o rețea de alte calulatoare fie ea LAN sau WAN)» +# === +# Ok, corecție aplicată +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "" +msgstr "nu se admite «/dev/(tcp|udp)/host/port» fără a avea o conexiune la rețea" -#: redir.c:1101 -#, fuzzy +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "eroare de redirectare" +msgstr "eroare de redirectare: nu se poate duplica descriptorul de fișier" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "" +msgstr "nu s-a putut găsi «/tmp», vă rugăm să-l creați!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "" +msgstr "«/tmp» trebuie să fie un nume de director valid" -#: shell.c:884 -#, fuzzy, c-format +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "modul de imprimare „drăguț” este ignorat în shell-urile interactive" + +#: shell.c:972 +#, c-format msgid "%c%c: invalid option" -msgstr "%c%c: op�iune invalid�" +msgstr "%c%c: opțiune nevalidă" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nu se poate stabili uid la %d: uid efectiv %d" -#: shell.c:1651 +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nu se poate stabili gid la %d: gid efectiv %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "nu se poate porni depanatorul; modul de depanare a fost dezactivat" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Este un director" + +#: shell.c:1907 msgid "I have no name!" msgstr "Nu am nici un nume!" -#: shell.c:1793 -#, fuzzy, c-format +#: shell.c:2061 +#, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "GNU %s, versiunea %s\n" +msgstr "GNU bash, versiunea %s-(%s)\n" -#: shell.c:1794 +# R-GC, scrie: +# acest mesaj, și următoarele, pot să fie +# vizualizate, rulînd comanda: +# «bash --help». +#: shell.c:2062 #, 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" +"Utilizare:\t%s [GNU opțiune lungă] [opțiune] ...\n" +"\t%s [GNU opțiune lungă] [opțiune] fișier-script ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "op�iuni lungi GNU:\n" +msgstr "Opțiuni lungi GNU:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "Op�iuni ale shell-ului:\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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD sau -c comandă sau -O shopt_option\t\t(doar invocare)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s sau -o op�iune\n" +msgstr "\t-%s sau -o opțiune\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Tastați «%s -c \"help set\"» pentru mai multe informații despre opțiunile shell-ului.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "Tastați «%s -c help» pentru mai multe informații despre comenzile interne ale shell-ului.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "" +msgstr "Utilizați comanda «bashbug» pentru a raporta erori.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Pagina principală a lui „bash”: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Ajutor general pentru utilizarea software-ului GNU: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "" +msgstr "sigprocmask: %d: operație nevalidă" #: siglist.c:48 msgid "Bogus signal" @@ -1524,59 +1980,59 @@ msgstr "Semnal fals" #: siglist.c:51 msgid "Hangup" -msgstr "Deconectare" +msgstr "Deconectare/Terminare anormală(Hangup)" #: siglist.c:55 msgid "Interrupt" -msgstr "�ntrerupere" +msgstr "Întrerupere" #: siglist.c:59 msgid "Quit" -msgstr "P�r�sire" +msgstr "Părăsire" #: siglist.c:63 msgid "Illegal instruction" -msgstr "Instruc�iune ilegal�" +msgstr "Instrucțiune ilegală" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "BPT trace/trap" +msgstr "Punct de întrerupere de urmărire/capturare" #: siglist.c:75 msgid "ABORT instruction" -msgstr "instruc�iune ABORT" +msgstr "Instrucțiune ABORT" #: siglist.c:79 msgid "EMT instruction" -msgstr "instruc�iune EMT" +msgstr "Instrucțiune EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "Excep�ie virgul� mobil�" +msgstr "Excepție de virgulă mobilă" #: siglist.c:87 msgid "Killed" -msgstr "Terminat(killed)" +msgstr "Omorât" #: siglist.c:91 msgid "Bus error" -msgstr "Eroare de bus" +msgstr "Eroare de magistrală de date(bus)" #: siglist.c:95 msgid "Segmentation fault" -msgstr "Eroare de segmentare (Segmentation fault)" +msgstr "Eroare de segmentare" #: siglist.c:99 msgid "Bad system call" -msgstr "Apelare sistem invalid�" +msgstr "Apel de sistem incorect" #: siglist.c:103 msgid "Broken pipe" -msgstr "Leg�tur�(pipe) �ntrerupt�" +msgstr "Linie de conectare întreruptă" #: siglist.c:107 msgid "Alarm clock" -msgstr "Ceas alarm�" +msgstr "Ceas cu alarmă" #: siglist.c:111 msgid "Terminated" @@ -1584,7 +2040,7 @@ msgstr "Terminat" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "Condi�ie IO urgent�" +msgstr "Condiție In/Ieș urgentă" #: siglist.c:119 msgid "Stopped (signal)" @@ -1596,7 +2052,7 @@ msgstr "Continuare" #: siglist.c:135 msgid "Child death or stop" -msgstr "Succesor mort sau oprit" +msgstr "Proces-copil mort sau oprit" #: siglist.c:139 msgid "Stopped (tty input)" @@ -1606,33 +2062,40 @@ msgstr "Oprit (tty input)" msgid "Stopped (tty output)" msgstr "Oprit (tty output)" +# Se referă la: dispozitiv(de intrare/de ieșire) #: siglist.c:147 msgid "I/O ready" -msgstr "I/O preg�tit" +msgstr "In/Ieș pregătită" #: siglist.c:151 msgid "CPU limit" -msgstr "limit� CPU" +msgstr "Limită CPU" #: siglist.c:155 msgid "File limit" -msgstr "limit� fi�ier" +msgstr "Limită fișier" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "Alarm� (virtual)" +msgstr "Alarmă (virtual)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "Alarm� (profil)" +msgstr "Alarmă (profil)" #: siglist.c:167 msgid "Window changed" -msgstr "Fereastr� schimbat�" - +msgstr "Fereastră schimbată" + +# De moment rămîne traducerea veche: +# „Reținere (lock) înregistrare” +# Dar, cred că: +# Blocare înregistrare, este formula corectă... +# *** +# l-am modificat la revizare #: siglist.c:171 msgid "Record lock" -msgstr "Re�inere (lock) �nregistrare" +msgstr "Blocare înregistrare" #: siglist.c:175 msgid "User signal 1" @@ -1644,7 +2107,7 @@ msgstr "Semnal utilizator 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "Date de intrare HFT �n curs de rezolvare(pending)" +msgstr "Date de intrare HFT în curs de rezolvare" #: siglist.c:187 msgid "power failure imminent" @@ -1652,7 +2115,7 @@ msgstr "probleme electrice iminente" #: siglist.c:191 msgid "system crash imminent" -msgstr "crash de sistem iminent" +msgstr "cădere iminentă a sistemului" #: siglist.c:195 msgid "migrate process to another CPU" @@ -1664,659 +2127,613 @@ msgstr "eroare de programare" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "mod monitor HFT acordat" +msgstr "Modul de monitor HFT a fost acordat" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "mod monitor HFT retras" +msgstr "Modul de monitor HFT a fost retras" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "secven�� de sunet HFT completat�" +msgstr "Secvența de sunet HFT a fost completată" #: siglist.c:215 msgid "Information request" -msgstr "" +msgstr "Solicitare de informație" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Semnal Necunoscut #" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "Semnal Necunoscut #%d" +msgstr "Semnal necunoscut #%d" -#: subst.c:1333 subst.c:1454 -#, fuzzy, c-format +#: subst.c:1480 subst.c:1670 +#, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "substitu�ie invalid�: nu exist� '%s' �n %s" +msgstr "înlocuire greșită: nu se închide „%s” în %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "%s: nu pot asigna list� membrului intervalului" +msgstr "%s: nu se poate atribui o listă unui membru al matricei" -#: subst.c:4754 subst.c:4770 -#, fuzzy +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "nu pot face leg�tur� (pipe) pentru substitu�ia procesului: %s" +msgstr "nu se poate crea linia de conectare pentru substituția procesului" -#: subst.c:4802 -#, fuzzy +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "nu pot crea un proces copil pentru substituirea procesului: %s" +msgstr "nu se poate crea un proces-copil pentru substituirea procesului: %s" -#: subst.c:4847 -#, fuzzy, c-format +#: subst.c:6198 +#, c-format msgid "cannot open named pipe %s for reading" -msgstr "nu pot deschide leg�tura numit� %s pentru %s: %s" +msgstr "nu se poate deschide linia de conectare numită %s pentru citire" -#: subst.c:4849 -#, fuzzy, c-format +#: subst.c:6200 +#, c-format msgid "cannot open named pipe %s for writing" -msgstr "nu pot deschide leg�tura numit� %s pentru %s: %s" +msgstr "nu se poate deschide linia de conectare numită %s pentru scriere" -#: subst.c:4867 -#, fuzzy, c-format +#: subst.c:6223 +#, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "nu se poate duplica leg�tura numit� %s ca fd %d: %s " +msgstr "nu se poate duplica linia de conectare numită %s ca fd %d" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "substituție de comandă: octetul null din intrare este ignorat" -#: subst.c:5063 -#, fuzzy +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "nu pot face leg�turi(pipes) pentru substitu�ia de comenzi: %s" +msgstr "nu se poate crea linia de conectare pentru substituția de comandă" -#: subst.c:5097 -#, fuzzy +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "nu pot crea un copil pentru substitu�ia de comenzi: %s" +msgstr "nu se poate crea un proces-copil pentru substituția de comandă" -#: subst.c:5114 -#, fuzzy +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "command_substitute: nu se poate duplica leg�tura (pipe) ca fd 1: %s" +msgstr "command_substitute: nu se poate duplica linia de conectare ca descriptor de fișier 1(fd 1)" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: nume de variabilă nevalid pentru referința numelui" -#: subst.c:5617 +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: extindere indirectă nevalidă" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: nume de variabilă nevalid" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametru nedefinit" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: parametru null sau nesetat" +msgstr "%s: parametru nul sau nedefinit" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "%s: expresie sub�ir < 0" +msgstr "%s: expresie subșir < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: substitu�ie invalid�" +msgstr "%s: substituție nevalidă" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "$%s: nu se poate asigna �n acest mod" +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:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "versiunile viitoare ale shell-ului vor forța evaluarea ca o substituție aritmetică" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "substitu�ie invalid�: nu exist� ')' de final �n %s" +msgstr "înlocuire greșită: fără „`” de închidere în %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "" +msgstr "nicio potrivire: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "se a�teapt� parametru" +msgstr "se aștepta un parametru" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s: se a�teapt� expresie �ntreag� (integer)" +msgstr "%s: se aștepta o expresie întreagă (integer)" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "se a�teapt� `)'" +msgstr "se aștepta „)'”" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "se a�teapt� `)', s-a primit %s" +msgstr "se aștepta „)”, s-a găsit %s" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" -msgstr "%s: se a�teapt� operator unar" +msgid "%s: binary operator expected" +msgstr "%s: se așteaptă operator binar" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" -msgstr "%s: se a�teapt� operator binar" +msgid "%s: unary operator expected" +msgstr "%s: se așteaptă operator unar" -#: test.c:811 +#: test.c:896 msgid "missing `]'" -msgstr "lipse�te ']'" +msgstr "lipsește „]”" -#: trap.c:203 -#, fuzzy +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "eroare de sintaxă: „%s” neașteptat" + +#: trap.c:220 msgid "invalid signal number" -msgstr "num�r de semnal invalid" +msgstr "număr de semnal nevalid" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "gestionarul de capturare: nivelul maxim de gestionări de capturare a fost depășit (%d)" -#: trap.c:327 +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" -msgstr "" +msgstr "run_pending_traps: valoare greșită în trap_list[%d]: %p" -#: trap.c:331 +#: trap.c:416 #, c-format -msgid "" -"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" -msgstr "" +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: gestionarul de semnal este SIG_DFL, se retrimite %d (%s) către mine" -#: trap.c:380 -#, fuzzy, c-format +#: trap.c:509 +#, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler: Semnal invalid %d" +msgstr "trap_handler: semnal nevalid %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "eroare �n importarea defini�iei func�iei pentru '%s'" +msgstr "eroare în importarea definiției funcției pentru „%s”" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "nivelul shell-ului (%d) prea mare, se reinițializează la 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "" +msgstr "make_local_variable: nu există context de funcție în domeniul actual" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: nu este posibil ca variabilei să i se atribuie o valoare" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: nu se poate moșteni valoarea de la un tip incompatibil" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: se atribuie un număr întreg referinței de nume" -#: variables.c:3159 +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: nu există context de funcție în domeniul actual" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: parametru null sau nesetat" +msgstr "%s are exportstr nul" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "caracter nevalid %d în exportstr pentru %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "nu există „=” în exportstr pentru %s" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" +msgstr "pop_var_context: partea de sus din shell_variables nu este un context de funcție" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: nu există un context global_variables" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" +msgstr "pop_scope: partea de sus din shell_variables nu este un domeniu de mediu temporar" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: nu s-a putut crea: %s" +msgstr "%s: %s: nu se poate deschide ca FIȘIER" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "" +msgstr "%s: %s: valoare nevalidă pentru descriptorul fișierului de urmărire" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: valoarea de compatibilitate în afara intervalului" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Drepturi de autor © 2022 Free Software Foundation, Inc." -#: version.c:86 version2.c:83 -#, fuzzy, c-format -msgid "GNU bash, version %s (%s)\n" -msgstr "GNU %s, versiunea %s\n" +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Licență GPLv3+: GNU GPL versiunea 3 sau ulterioară \n" -#: version.c:91 version2.c:88 +#: version.c:86 version2.c:86 #, c-format -msgid "This is free software; you are free to change and redistribute it.\n" -msgstr "" +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, versiunea %s (%s)\n" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Acesta este un software liber; sunteți liber să îl modificați și să îl redistribuiți." -#: version2.c:86 -#, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "NU EXISTĂ NICIO GARANȚIE, în măsura permisă de lege." -#: version2.c:87 +#: xmalloc.c:93 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \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)" +msgstr "%s: nu se pot aloca %lu octeți (%lu octeți alocați)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: nu pot aloca %lu octe�i (%lu octe�i aloca�i)" +msgstr "%s: nu se pot aloca %lu octeți" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: nu se pot aloca %lu octeți (%lu octeți alocați)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, 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 +msgstr "%s: %s:%d: nu se pot aloca %lu octeți" + +# R-GC, scrie: +# acest mesaj, și următoarele, pot să fie +# vizualizate, rulînd comanda: +# «bash -c help», dintr-un shell diferit de «bash»; +# «help», dintr-un shell «bash». +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [nume[=valoare] ... ]" -#: builtins.c:47 -#, fuzzy +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "unalias [-a] [nume ...]" +msgstr "unalias [-a] nume [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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m comb_taste] [-f nume_fișier] [-q nume] [-u nume] [-r secv_taste] [-x secv_taste:comandă_shell] [secv_taste:funcție-readline sau comandă-readline]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "builtin [shell-builtin [arg ...]]" +msgstr "builtin [comandă_internă-shell [arg ...]]" -#: builtins.c:61 -#, fuzzy +#: builtins.c:63 msgid "caller [expr]" -msgstr "test [expr]" - -#: builtins.c:64 -#, fuzzy -msgid "cd [-L|-P] [dir]" -msgstr "cd [-PL] [dir]" +msgstr "caller [expr]" #: builtins.c:66 -#, fuzzy -msgid "pwd [-LP]" -msgstr "pwd [-PL]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dir]" #: 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 ...]" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -#, fuzzy -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "declare [-afFrxi] [-p] nume[=valoare] ..." +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] comandă [arg ...]" #: builtins.c:78 -#, fuzzy -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "typeset [-afFrxi] [-p] nume[=valoare] ..." +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [nume[=valoare] ...] sau declare -p [-aAfFilnrtux] [nume ...]" #: builtins.c:80 -#, fuzzy +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] nume[=valoare] ... sau typeset -p [-aAfFilnrtux] [nume ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "local nume[=valoare] ..." +msgstr "local [opțiune] nume[=valoare] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 -#, fuzzy +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "enable [-pnds] [-a] [-f nume_fi�ier] [nume ...]" +msgstr "enable [-a] [-dnps] [-f nume_fișier]] [nume ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts șir_opțiuni nume [arg ...]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a nume] [comandă [argument ...]] [redirectare ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 -#, fuzzy +#: builtins.c:102 msgid "logout [n]" -msgstr "logout" +msgstr "logout [n]" -#: builtins.c:103 -#, fuzzy +#: builtins.c:105 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]" +msgstr "fc [-e enume] [-lnr] [prim] [ultim] sau fc -s [pat=rep] [comandă]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "fg [job_spec]" +msgstr "fg [id_lucrare]" -#: builtins.c:111 -#, fuzzy +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "bg [job_spec]" +msgstr "bg [id_lucrare ...]" -#: builtins.c:114 -#, fuzzy +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "hash [-r] [-p nume_cale] [nume ...]" +msgstr "hash [-lr] [-p nume_rută [-dt] [nume ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [tipar ...]" +msgstr "help [-dms] [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:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d decalaj] [n] sau history -anrw [nume_fișier] sau history -ps arg [arg...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "jobs [-lnprs] [jobspec ...] sau jobs -x comand� [args]" +msgstr "jobs [-lnprs] [id_lucrare ...] 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [id_lucrare ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "let arg [arg ...]" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s id_semnal | -n num_semnal | -id_semnal] pid | id_lucrare ... sau kill -l [id_semnal]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "return [n]" +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a matrice] [-d delim] [-i text] [-n nr_carac] [-N nr_carac [-p prompt] [-t timp] [-u fd] [nume ...]" #: builtins.c:140 -#, fuzzy -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "set [--abefhkmnptuvxBCHP] [-o op�iune] [arg ...]" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "unset [-f] [-v] [nume ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o nume-opțiune] [--] [-] [arg ...]" #: builtins.c:144 -#, fuzzy -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-nf] [nume ...] sau export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [nume ...]" #: builtins.c:146 -#, fuzzy -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-anf] [nume ...] sau readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [nume[=valoare] ...] sau export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [nume[=valoare] ...] sau readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 -#, fuzzy +#: builtins.c:152 msgid "source filename [arguments]" -msgstr "nume fi�ier surs�" +msgstr "source nume_fișier [argumente]" -#: builtins.c:152 -#, fuzzy +#: builtins.c:154 msgid ". filename [arguments]" -msgstr ". nume fi�ier" +msgstr ". nume_fișier [argumente]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [expr]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "ori" - -#: builtins.c:164 -#, fuzzy +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "trap [arg] [signal_spec] sau trap -l" +msgstr "trap [-lp] [[arg] id_semnal ...]" -#: builtins.c:166 -#, fuzzy +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "type [-apt] nume [nume ...]" +msgstr "type [-afptP] nume [nume ...]" -#: builtins.c:169 -#, fuzzy -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdfmstpnuv] [limit�]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limită]" -#: builtins.c:172 -#, fuzzy +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "umask [-S] [mod]" +msgstr "umask [-p] [-S] [mod]" -#: builtins.c:175 -#, fuzzy -msgid "wait [id]" -msgstr "wait [n]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id ...]" -#: builtins.c:179 -#, fuzzy -msgid "wait [pid]" -msgstr "wait [n]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" -#: builtins.c:182 -#, fuzzy +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for NUME [�n EXPRESIE ... ;] execut� COMENZI; done" +msgstr "for NUME [in CUVINTE ... ] ; do COMENZI; done" -#: builtins.c:184 -#, fuzzy +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "for NUME [�n EXPRESIE ... ;] execut� COMENZI; done" +msgstr "for (( exp1; exp2; exp3 )); do COMENZI; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "select NUME [�n EXPRESIE ... ;] execut� COMENZI; done" +msgstr "select NUME [in CUVINTE ... ;] do COMENZI; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" -msgstr "" - -#: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "case EXPRESIE �n [TIPAR[[TIPAR]..) COMENZI ;;]... esac" +msgstr "time [-p] secvența_de_comenzi(pipeline)" #: 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" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case CUVÂNT in [MODEL[[MODEL]..) COMENZI ;;]... esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "while COMENZI; do COMENZI; done" +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:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until COMENZI; do COMENZI; done" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while COMENZI; do COMENZI-2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until COMENZI; do COMENZI-2; done" #: builtins.c:200 -#, fuzzy -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "function NUME { COMENZI ; } sau NUME () { COMENZI ; }" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [NUME] comanda [redirecționări]" #: builtins.c:202 -#, fuzzy -msgid "{ COMMANDS ; }" -msgstr "{ COMENZI }" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function nume { COMENZI ; } sau nume () { COMENZI ; }" #: builtins.c:204 -#, fuzzy -msgid "job_spec [&]" -msgstr "fg [job_spec]" +msgid "{ COMMANDS ; }" +msgstr "{ COMENZI ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "se a�teapt� expresie" +msgid "job_spec [&]" +msgstr "id_lucrare [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "se a�teapt� expresie" +msgid "(( expression ))" +msgstr "(( expresie ))" #: builtins.c:210 -#, fuzzy +msgid "[[ expression ]]" +msgstr "[[ expresie ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "Variabilele shell-ului sunt admise ca operanzi. Numele variabilei" +msgstr "variables - Numele și semnificațiile unor variabile din shell" -#: builtins.c:213 -#, fuzzy +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "pushd [dir | +N | -N] [-n]" +msgstr "pushd [-n] [+N | -N | dir]" -#: builtins.c:217 -#, fuzzy +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "popd [+N | -N] [-n]" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 -#, fuzzy +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o op�iune lung�] nume_opt [nume_opt...]" +msgstr "shopt [-pqsu] [-o] [nume_opțiune ...]" -#: builtins.c:226 +#: builtins.c:228 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 "" +msgstr "printf [-v var] format [argumente]" -#: 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o opțiune] [-A acțiune] [-G tipar_glob] [-W listă_cuvinte] [-F funcție] [-C comandă] [-X tipar_filtru [- P prefix] [-S sufix] [nume ...]" -#: builtins.c:237 -#, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "type [-apt] nume [nume ...]" +#: builtins.c:235 +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 opțiune] [-A acțiune] [-G tipar_glob] [-W listă_cuvinte] [-F funcție] [-C comandă] [-X tipar_filtru] [-P prefix] [-S sufix] [cuvânt]" -#: builtins.c:240 -msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o opțiune] [-DEI] [nume ...]" #: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" - -#: builtins.c:254 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d delim] [-n cont] [-O origin] [-s cont] [-t] [-u fd] [-C apelare] [-c cantitate] [matrice]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d delim] [-n cantitate] [-O origine] [-s cantitate] [-t] [-u fd] [-C apelare] [-c sumă_de] [matrice]" + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help alias», din «bash»; +# «bash -c "help alias"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2328,25 +2745,57 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" alias returns true unless a NAME is supplied for which no alias has been\n" " defined." msgstr "" +"Definește sau afișează alias.\n" +" \n" +" Fără argumente, «alias» imprimă lista de alias în forma reutilizabilă\n" +" „alias NUME=VALOARE” la ieșirea standard (pe ecran).\n" +" \n" +" În caz contrar, un alias este definit pentru fiecare NUME a cărui VALOARE\n" +" este dată. Un spațiu final în VALOARE, face ca următorul cuvânt să fie\n" +" verificat pentru înlocuirea aliasului atunci când aliasul este extins.\n" +" \n" +" Opțiuni:\n" +" -p\timprimă toate alias definite într-un format reutilizabil\n" +" \n" +" Starea de ieșire:\n" +" «alias» returnează adevărat, cu excepția cazului în care este furnizat\n" +" un NUME pentru care nu a fost definit niciun alias." -#: builtins.c:276 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help unalias», din «bash»; +# «bash -c "help unalias"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" +"Elimină fiecare NUME din lista de aliasuri definite.\n" +" \n" +" Opțiuni:\n" +" -a\telimină toate definițiile de alias\n" +" \n" +" Returnează succes, cu excepția cazului în care un NUME nu este un alias existent." -#: builtins.c:289 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help bind», din «bash»; +# «bash -c "help bind"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2358,34 +2807,72 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" - -#: builtins.c:326 +"Configurează legăturile de taste și variabilele Readline.\n" +" \n" +" Asociază o secvență de taste cu o funcție Readline sau cu o macrocomandă\n" +" sau configurează o variabilă Readline. Sintaxa argumentului fără opțiune \n" +" este echivalentă cu cea găsită în ~/.inputrc, dar trebuie transmisă ca un\n" +" singur argument; de exp.: bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Opțiuni:\n" +" -m keymap Utilizează KEYMAP ca hartă de taste pe durata acestei\n" +" comenzi. Numele valabile pentru hărți de taste sunt emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,\n" +" vi-command, și vi-insert.\n" +" -l Enumeră numele funcțiilor.\n" +" -P Enumeră numele și asocierile funcțiilor.\n" +" -p Enumeră funcțiile și asocierile într-o formă care poate fi\n" +" reutilizată ca intrare.\n" +" -S Enumeră secvențele de chei care invocă macrocomenzi și\n" +" valorile acestora\n" +" -s Enumeră secvențele de chei care invocă macrocomenzi și\n" +" valorile acestora într-o formă care poate fi reutilizată ca intrare.\n" +" -V Enumeră numele și valorile variabilelor\n" +" -v Enumeră numele și valorile variabilelor într-o formă care\n" +" poate fi reutilizată ca intrare.\n" +" -q nume-funcție Se utilizează pentru a afla care taste invocă funcția numită.\n" +" -u nume-funcție Dezasociază toate tastele care sunt asociate cu funcția numită.\n" +" -r sec-taste Elimină asocierea pentru sec-taste numită.\n" +" -f nume-fișier Citește asocierile de taste din fișierul al cărui nume a fost dat.\n" +" -x sec-taste:comandă-shell\tDetermină executarea comandă-shell când este\n" +" \t\t\t\tintrodusă sec-taste.\n" +" -X Enumeră secvențele de taste asociate cu -x și comenzile asociate într-o\n" +" formă care poate fi reutilizată ca intrare.\n" +" \n" +" Starea de ieșire:\n" +" «bind» returnează 0, cu excepția cazului în care este dată o opțiune nerecunoscută, sau apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help break», din «bash»; +# «bash -c "help break"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2395,8 +2882,21 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"Termină buclele for, while, sau until.\n" +" \n" +" Termină o buclă FOR, WHILE sau UNTIL. Dacă se specifică N, termină\n" +" numărul de bucle specificat.\n" +" \n" +" Starea de ieșire:\n" +" Starea de ieșire este 0, cu excepția cazului în care N nu este mai mare sau egal cu 1." -#: builtins.c:338 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help continue», din «bash»; +# «bash -c "help continue"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2406,22 +2906,49 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"Reia buclele for, while, sau until.\n" +" \n" +" Reia următoarea iterație a buclei curente FOR, WHILE sau UNTIL.\n" +" Dacă se specifică N, reia bucla și continuă pentru N niveluri în continuare.\n" +" \n" +" Starea de ieșire:\n" +" Starea de ieșire este 0, cu excepția cazului în care N nu este mai mare sau egal cu 1." -#: builtins.c:350 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help builtin», din «bash»; +# «bash -c "help builtin"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" +"Execută comenzile interne de shell.\n" +" \n" +" Execută SHELL-BUILTIN cu argumentele ARG fără a efectua căutarea comenzilor.\n" +" Acest lucru este util atunci când doriți să reimplementați o comandă internă de shell\n" +" ca o funcție shell, dar trebuie să executați comanda internă în cadrul funcției.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea de ieșire a lui SHELL-BUILTIN sau false dacă SHELL-BUILTIN nu\n" +" este o comandă internă de shell." -#: builtins.c:365 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help caller», din «bash»; +# «bash -c "help caller"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2436,47 +2963,108 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" +"Returnează contextul apelului subrutinei curente.\n" +" \n" +" Fără EXPR, returnează „$line $filename”. Cu EXPR, returnează\n" +" „$line $subroutine $filename”; aceste informații suplimentare pot fi\n" +" utilizate pentru a furniza o urmărire a stivei.\n" +" \n" +" Valoarea EXPR indică câte cadre de apel trebuie să se întoarcă înaintea\n" +" celui curent; cadrul superior este cadrul 0.\n" +" \n" +" Starea de ieșire:\n" +" Returnează 0, cu excepția cazului în care shell-ul nu execută o funcție shell\n" +" sau EXPR nu este validă." -#: builtins.c:383 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help cd», din «bash»; +# «bash -c "help cd"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." -msgstr "" - -#: builtins.c:411 +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Schimbă directorul de lucru al shell-ului.\n" +" \n" +" Schimbă directorul actual cu DIR. DIR implicit este valoarea variabilei de \n" +" shell HOME.\n" +" \n" +" Variabila CDPATH definește calea de căutare pentru directorul care conține\n" +" DIR. Numele alternative ale directoarelor din CDPATH sunt separate prin\n" +" două puncte (:). Numele unui director nul este același cu directorul curent.\n" +" Dacă DIR începe cu o bară oblică (/), atunci CDPATH nu este utilizat.\n" +" \n" +" Dacă directorul nu este găsit și opțiunea de shell „cdable_vars” este setată,\n" +" cuvântul se presupune a fi un nume de variabilă. Dacă acea variabilă are o\n" +" valoare, valoarea ei este utilizată pentru DIR.\n" +" \n" +" Opțiuni:\n" +" -L\tforțează ca legăturile simbolice să fie urmate: rezolvă \n" +" \t\tlegăturile simbolice din DIR după procesarea instanțelor de „..”\n" +" -P\tutilizează structura fizică a directorului fără a urma legăturile\n" +" \t\tsimbolice: rezolvă legăturile simbolice din DIR înainte de a\n" +" \t\tprocesa instanțe de „..”\n" +" -e\tdacă este furnizată opțiunea „-P” și directorul de lucru curent\n" +" \t\tnu poate fi determinat cu succes, iese cu o stare diferită de\n" +" \t\tzero\n" +" -@\tpe sistemele care acceptă acest lucru, prezintă un fișier cu\n" +" \t\tatribute extinse, ca un director care conține atributele fișierului\n" +" \n" +" Modul implicit este să urmeze legături simbolice, ca și cum ar fi fost specificat „-L”.\n" +" „..” este procesat prin eliminarea componentei de cale imediat anterioară până\n" +" la o bară oblică sau la începutul DIR.\n" +" \n" +" Starea de ieșire:\n" +" Returnează 0 dacă directorul este schimbat și dacă $PWD este stabilit cu succes atunci\n" +" când este utilizat „-P”; diferit de zero, în caz contrar." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help pwd», din «bash»; +# «bash -c "help pwd"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2485,9 +3073,26 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Imprimă numele directorului de lucru curent.\n" +" \n" +" Opțiuni:\n" +" -L\timprimă valoarea lui $PWD dacă aceasta numește directorul de\n" +" \t\tlucru curent\n" +" -P\timprimă directorul fizic, fără nicio legătură simbolică\n" +" \n" +" În mod implicit, „pwd” se comportă ca și cum „-L” ar fi fost specificat.\n" +" \n" +" Starea de ieșire:\n" +" Returnează 0, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau directorul curent nu poate fi citit." -#: builtins.c:428 -#, fuzzy +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help :», din «bash»; +# «bash -c "help :"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2496,44 +3101,105 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" -"Nici un efect, comanda nu face nimic. Un cod de ie�ire zero este returnat." +"Comandă nulă.\n" +" \n" +" Fără efect; comanda nu face nimic.\n" +" \n" +" Starea de ieșire:\n" +" Întotdeauna reușește(0)." -#: builtins.c:439 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help true», din «bash»; +# «bash -c "help true"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Returnează un rezultat de succes(0).\n" +" \n" +" Starea de ieșire:\n" +" Întotdeauna reușește(0)." -#: builtins.c:448 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help false», din «bash»; +# «bash -c "help false"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"Returnează un rezultat nereușit(≠0).\n" +" \n" +" Starea de ieșire:\n" +" Întotdeauna eșuează(≠0)." -#: builtins.c:457 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help command», din «bash»; +# «bash -c "help command"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 +"Execută o comandă simplă sau afișează informații despre comenzi.\n" +" \n" +" Rulează COMANDA cu ARGumente care suprimă căutarea funcției shell sau afișează\n" +" informații despre COMENZILE specificate. Se poate utiliza pentru a invoca comenzi\n" +" de pe disc atunci când există o funcție cu același nume.\n" +" \n" +" Opțiuni:\n" +" -p utilizează o valoare implicită pentru PATH ce garantează că se\n" +" vor găsi toate utilitățile standard\n" +" -v imprimă o descriere a COMENZII, similară cu cea a comenzii\n" +" interne «type».\n" +" -V imprimă o descriere mai detaliată pentru fiecare COMANDĂ\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea de ieșire a COMENZII sau eșuează dacă COMANDA nu este găsită." + +# R-GC, scrie: +# am tradus: +# „-I if ... with the same name at a previous scope”, ca: +# „-I dacă ... cu același nume dintr-un scop anterior” +# *** +# Întrebare: +# dacă se traduce, ca: +# „-I dacă ... cu același nume dintr-o sferă de aplicare anterioară”, +# ar fi o traducere mai bună? +# Opinii/Idei? +# ================================== +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help declare», din «bash»; +# «bash -c "help declare"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2543,17 +3209,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2561,22 +3232,74 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." -msgstr "" - -#: builtins.c:512 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Stabilește valorile și atributele variabilelor.\n" +" \n" +" Declară variabilele și-le atribuie atribute. Dacă nu sunt date NUME,\n" +" afișează atributele și valorile tuturor variabilelor.\n" +" \n" +" Opțiuni:\n" +" -f\trestricționează acțiunea sau afișarea, la numele și definițiile funcțiilor\n" +" -F\trestricționează afișarea numai la numele funcțiilor (plus numărul de\n" +" \t\tlinie și fișierul sursă, la depanare)\n" +" -g\tcreează variabile globale atunci când sunt utilizate într-o funcție shell;\n" +" \t\taltfel sunt ignorate\n" +" -I\tdacă se creează o variabilă locală, moștenește atributele și valoarea\n" +" \t\tunei variabile cu același nume dintr-un scop anterior\n" +" -p\tafișează atributele și valoarea fiecărui NUME\n" +" \n" +" Opțiuni care stabilesc atributele:\n" +" -a\tstabilește NUME ca matrice indexată (dacă este acceptat)\n" +" -A\tstabilește NUME ca matrice asociativă (dacă este acceptat)\n" +" -i\tstabilește ca NUME să aibă atributul „integer”\n" +" -l\tpentru a converti valoarea fiecărui NUME în minuscule, la atribuire\n" +" -n\tface din NUME o referință la variabila numită după valoarea acesteia\n" +" -r\tcreează NUME ca numai-citire\n" +" -t\tstabilește ca NUME să aibă atributul „trace”\n" +" -u\tpentru a converti valoarea fiecărui NUME în majuscule, la atribuire\n" +" -x\tpentru a exporta NUME\n" +" \n" +" Utilizarea a „+” în loc de „-”, dezactivează atributul dat.\n" +" \n" +" Variabilele cu atributul întreg au o evaluare aritmetică (vezi comanda\n" +" «let») efectuată atunci când variabilei i se atribuie o valoare.\n" +" \n" +" Când este folosită într-o funcție, «declare» face ca NUME să fie local, ca\n" +" și în cazul comenzii «local». Opțiunea „-g” suprimă acest comportament.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizată o opțiune\n" +" nevalidă sau apare o eroare de atribuire a variabilelor." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help typeset», din «bash»; +# «bash -c "help typeset"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Stabilește valorile și atributele variabilelor.\n" +" \n" +" Un sinonim pentru „declare”. A se vedea „help declare”." -#: builtins.c:520 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help local», din «bash»; +# «bash -c "help local"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2587,15 +3310,35 @@ msgid "" " 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 +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Definește variabilele locale.\n" +" \n" +" Creează o variabilă locală numită NUME și îi dă această VALOARE.\n" +" OPȚIUNE poate fi orice opțiune acceptată de «declare».\n" +" \n" +" Variabilele locale pot fi utilizate numai în cadrul unei funcții; sunt\n" +" vizibile numai pentru funcția în care sunt definite și pentru copiii\n" +" acesteia.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes cu excepția cazului în care este furnizată o opțiune\n" +" nevalidă, apare o eroare de atribuire a variabilei sau shell-ul nu execută\n" +" o funcție." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help echo», din «bash»; +# «bash -c "help echo"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2607,6 +3350,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2614,15 +3358,52 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" - -#: builtins.c:571 +"Scrie argumente la ieșirea standard.\n" +" \n" +" Afișează ARGumentele, separate printr-un singur caracter de spațiu și urmate\n" +" de o nouă linie, în ieșirea standard.\n" +" \n" +" Opțiuni:\n" +" -n\tnu adaugă o nouă linie\n" +" -e\tactivează interpretarea următoarelor eludări de bară oblică inversă\n" +" -E\tsuprimă în mod explicit interpretarea eludărilor de bară oblică inversă\n" +" \n" +" «echo» interpretează următoarele caractere de eludare de bară oblică inversă:\n" +" \a\talertă (clopoțel)\n" +" \\b\tmută cursorul înapoi cu unul sau mai multe spații\n" +" \\c\tsuprimă ieșirea ulterioară\n" +" \\e\tcaracter de eludare\n" +" \\E\tcaracter de eludare\n" +" \\f\talimentare cu „hîrtie”\n" +" \\n\tlinie nouă\n" +" \\r\treturul de caret↵\n" +" \\t\ttabulator orizontal\n" +" \\v\ttabulator vertical\n" +" \\\\\tbară oblică inversă\n" +" \\0nnn\tcaracterul al cărui cod ASCII este NNN (octal). NNN poate fi\n" +" \t\tde la 0 la 3 digiți octali\n" +" \\xHH\tcaracterul de opt biți a cărui valoare este HH (hexazecimal). HH\n" +" \t\tpoate fi unu sau doi digiți hexazecimali\n" +" \\uHHHH\tcaracterul Unicode a cărui valoare este valoarea hexazecimală HHHH.\n" +" \t\tHHHH poate fi de la unu până la patru digiți hexazecimali.\n" +" \\UHHHHHHHH caracterul Unicode a cărui valoare este valoarea hexazecimală\n" +" \t\tHHHHHHHH. HHHHHHHH poate fi de la unu până la opt digiți hexazecimali.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes cu excepția cazului în care apare o eroare de scriere." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2634,8 +3415,23 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Scrie argumente la ieșirea standard.\n" +" \n" +" Afișează ARGumentele la ieșirea standard urmate de o linie nouă.\n" +" \n" +" Opțiuni:\n" +" -n\tnu adaugă o nouă linie\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes cu excepția cazului în care apare o eroare de scriere." -#: builtins.c:586 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help enable», din «bash»; +# «bash -c "help enable"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2661,20 +3457,62 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Activează și dezactivează comenzile interne ale shell-ului.\n" +" \n" +" Activează și dezactivează comenzile interne ale shell-ului. Dezactivarea\n" +" vă permite să executați o comandă de pe disc care are același nume ca\n" +" și comanda internă a shell-ului, fără a utiliza calea completă.\n" +" \n" +" Opțiuni:\n" +" -a\tafișează lista comenzilor interne indicând dacă sunt activate sau nu\n" +" -n\tdezactivează fiecare NUME sau afișează o listă de comenzi interne\n" +" \t\tdezactivate\n" +" -p\tafișează lista comenzilor interne într-un format reutilizabil\n" +" -s\tafișează numai numele comenzilor interne „speciale” Posix\n" +" \n" +" Opțiuni care controlează încărcarea dinamică:\n" +" -f\tÎncarcă comanda internă NUME de la obiectul partajat NUME_FIȘIER\n" +" -d\tElimină o comandă internă încărcată cu -f\n" +" \n" +" Fără opțiuni, fiecare NUME este activat.\n" +" \n" +" Pentru a utiliza comanda «test» găsită în $PATH în loc de comanda internă\n" +" de shell, tastați «enable -n test».\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care NUME nu este o comandă shell internă sau apare o eroare." -#: builtins.c:614 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help eval», din «bash»; +# «bash -c "help eval"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"Execută argumente ca o comandă de shell.\n" +" \n" +" Combină ARGumentele într-un singur șir, folosește rezultatul ca intrare în\n" +" shell și execută comenzile rezultate.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea de ieșire a comenzii, sau succes dacă comanda este nulă." -#: builtins.c:626 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help getopts», din «bash»; +# «bash -c "help getopts"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2707,68 +3545,147 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +"Analizează argumentele opțiunii.\n" +" \n" +" «getopts» este folosit de procedurile shell pentru a analiza parametrii\n" +" poziționali ca opțiuni.\n" +" \n" +" ȘIR_OPȚIUNI conține literele de opțiune care trebuie recunoscute; dacă\n" +" o literă este urmată de două puncte, se așteaptă ca opțiunea să aibă un\n" +" argument, care ar trebui să fie separat de aceasta prin spațiu alb.\n" +" \n" +" De fiecare dată când este invocată, «getopts» va plasa următoarea opțiune\n" +" în variabila shell $nume, inițializând nume dacă nu există, iar indexul\n" +" următorului argument va fi procesat în variabila shell OPTIND. OPTIND este\n" +" inițializată la 1 de fiecare dată când shell-ul sau un script shell este\n" +" invocat. Când o opțiune necesită un argument, «getopts» plasează acel\n" +" argument în variabila shell OPTARG.\n" +" \n" +" «getopts» raportează erorile într-unul dintre următoarele două moduri. Dacă\n" +" primul caracter al lui ȘIR_OPȚIUNI este două puncte, «getopts» utilizează \n" +" raportarea silențioasă a erorilor. În acest mod, nu este afișat niciun mesaj\n" +" de eroare. Dacă se găsește o opțiune nevalidă, «getopts» plasează caracterul\n" +" de opțiune găsit în OPTARG. Dacă nu este găsit un argument necesar, «getopts»\n" +" plasează un „:” în NUME și pune în OPTARG caracterul de opțiune găsit. Dacă\n" +" «getopts» nu este în modul silențios și se găsește o opțiune nevalidă, «getopts»\n" +" plasează „?” în NUME și dezactivează OPTARG. Dacă nu este găsit un argument\n" +" necesar, un „?” este plasat în NUME, OPTARG este dezactivată și este afișat un\n" +" mesaj de diagnosticare.\n" +" \n" +" Dacă variabila shell OPTERR are valoarea 0, «getopts» dezactivează afișarea\n" +" mesajelor de eroare, chiar dacă primul caracter al lui ȘIR_OPȚIUNI nu este \n" +" două puncte „:”. OPTERR are valoarea 1 implicit.\n" +" \n" +" «getopts» analizează în mod normal parametrii de poziție, dar dacă argumentele\n" +" sunt furnizate ca valori ARG, acestea sunt analizate în schimb.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes dacă este găsită o opțiune; eșuează dacă se întâlnește\n" +" sfârșitul opțiunilor sau apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help exec», din «bash»; +# «bash -c "help exec"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"Înlocuiește shell-ul cu comanda dată.\n" +" \n" +" Execută COMANDA, înlocuind acest shell cu programul specificat.\n" +" ARGUMENTELE devin argumente pentru COMANDA. Dacă COMANDA nu este\n" +" specificată, orice redirecționare va avea efect în shell-ul curent.\n" +" \n" +" Opțiuni:\n" +" -a nume\tpasează NUME ca argument zero la COMANDA\n" +" -c\texecută COMANDA într-un mediu gol\n" +" -l\tplasează o liniuță în argumentul zero la COMANDA\n" +" \n" +" Dacă comanda nu poate fi executată, un shell non-interactiv se va închide, \n" +" cu excepția cazului în care opțiunea shell „execfail” este setată.\n" +" \n" +" Starea de ieșire\n" +" Returnează succes, cu excepția cazului în care COMANDA nu este găsită sau\n" +" apare o eroare de redirecționare." -#: builtins.c:689 -#, fuzzy +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help exit», din «bash»; +# «bash -c "help exit"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:715 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" +msgstr "" +"Iese din shell.\n" +" \n" +" Iese din shell cu starea lui N. Dacă N este omis, starea de ieșire\n" +" este starea ultimei comenzi executate." -#: builtins.c:698 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help logout», din «bash»; +# «bash -c "help logout"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"Iese din shell-ul de autentificare.\n" +" \n" +" Iese din shell-ul de autentificare cu starea de ieșire N. Returnează o eroare\n" +" dacă nu este executată într-un shell de autentificare." -#: builtins.c:708 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help fc», din «bash»; +# «bash -c "help fc"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:734 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" +" 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" +" -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" @@ -2782,11 +3699,41 @@ msgid "" " 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 +" Returns success or status of executed command; non-zero if an error occurs." +msgstr "" +"Afișează sau execută comenzi din lista istoricului.\n" +" \n" +" «fc» se utilizează pentru a lista sau edita și re-executa comenzi din lista\n" +" istoricului.\n" +" PRIMA și ULTIMA pot fi numere care specifică intervalul sau PRIMA poate fi\n" +" un șir, ceea ce înseamnă cea mai recentă comandă care începe cu acel șir.\n" +" \n" +" Opțiuni:\n" +" -e NUME_EDIT\n" +" \t\tselectează ce editor să utilizat. Implicit este FCEDIT, apoi \n" +" \t\tEDITOR, apoi vi\n" +" -l \tlistează linii în loc să editeze\n" +" -n\tomite numerele de rând la listare\n" +" -r\tinversează ordinea liniilor (cele mai noi sunt listate primele)\n" +" \n" +" Cu formatul «fc -s [tipar=înloc ...] [comanda]», COMANDA este re-executată\n" +" după ce este efectuată înlocuirea VECHE=NOUĂ.\n" +" \n" +" Un alias util de folosit cu aceasta, este «r='fc -s'», astfel încât tastând \n" +" «r cc» se execută ultima comandă ce începe cu „cc” și tastând «r» se execută\n" +" din nou ultima comandă folosită.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succesul sau starea comenzii executate; diferit de zero dacă\n" +" apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help fg», din «bash»; +# «bash -c "help fg"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2797,46 +3744,98 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" +"Mută procesul în primul plan.\n" +" \n" +" Plasează procesul identificat de ID_PROC în primul plan, făcându-l procesul\n" +" curent. Dacă ID_PROC nu este prezent, este utilizată noțiunea shell-ului\n" +" despre procesul curent\n" +" \n" +" Starea de ieșire:\n" +" Starea comenzii plasată în prim-plan sau eșec dacă apare o eroare." -#: builtins.c:753 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help bg», din «bash»; +# «bash -c "help bg"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:779 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" +" 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 "" +"Mută procesul în fundal.\n" +" \n" +" Plasează procesele identificate de fiecare ID_PROC în fundal, ca și cum ar fi\n" +" fost pornite cu „&”. Dacă ID_PROC nu este prezent, se folosește noțiunea\n" +" shell-ului despre procesul curent.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care controlul procesului nu este\n" +" activat sau apare o eroare." -#: builtins.c:767 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help hash», din «bash»; +# «bash -c "help hash"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +"Memorizează sau afișează locațiile programelor.\n" +" \n" +" Determină și memorizează calea completă a fiecărei comenzi NUME. Dacă nu\n" +" sunt date argumente, sunt afișate informații despre comenzile memorate.\n" +" \n" +" Opțiuni:\n" +" -d\tuită locația reținută pentru fiecare NUME\n" +" -l\tafișează într-un format care poate fi reutilizat ca intrare\n" +" -p calenume\n" +" \tutilizează CALENUME drept calea completă a NUME\n" +" -r\tuită toate locațiile memorizate\n" +" -t\tafișează locația reținută a fiecărui NUME, precedând fiecare\n" +" \t\tlocație cu NUMELE corespunzător dacă sunt date mai multe NUME\n" +" Argumente:\n" +" NUME\tFiecare NUME este căutat în $PATH și adăugat la lista comenzilor\n" +" \t\tmemorate.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care NUME nu este găsit sau\n" +" este dată o opțiune nevalidă." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help help», din «bash»; +# «bash -c "help help"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2848,17 +3847,40 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying 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 +" Returns success unless PATTERN is not found or an invalid option is given." +msgstr "" +"Afișează informații despre comenzile interne.\n" +" \n" +" Afișează scurte rezumate ale comenzilor interne. Dacă TIPAR, este\n" +" specificat, oferă ajutor detaliat pentru toate comenzile care se potrivesc\n" +" cu TIPARul, în caz contrar, este afișată lista temelor de ajutor.\n" +" \n" +" Opțiuni:\n" +" -d\tafișează o scurtă descriere pentru fiecare temă\n" +" -m\tafișează utilizarea în format pseudo-pagină de manual\n" +" -s\tafișează doar un scurt rezumat de utilizare pentru\n" +" \t\tfiecare temă care se potrivește cu TIPAR\n" +" \n" +" Argumente:\n" +" TIPAR \tTIPAR care specifică o temă de ajutor\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care TIPAR nu este găsit sau este\n" +" dată o opțiune nevalidă." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help history», din «bash»; +# «bash -c "help history"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2867,32 +3889,72 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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 +"Afișează sau manipulează lista istoricului.\n" +" \n" +" Afișează lista istoricului cu numere de linie, prefixând fiecare intrare\n" +" modificată cu un „*”. Un argument de N, listează numai ultimele N intrări.\n" +" \n" +" Opțiuni:\n" +" -c\tșterge lista istoricului ștergând toate intrările\n" +" -d poziție\n" +" \t\tșterge intrarea din istoric de la poziția POZIȚIE. Pozițiile\n" +" \t\tnegative se numără înapoi de la sfârșitul listei istoricului\n" +" \n" +" -a\tadaugă linii istorice din această sesiune la fișierul istoricului\n" +" -n\tcitește toate liniile istorice care nu sunt deja citite din\n" +" \t\tfișierul istoricului și le adaugă la lista istoricului\n" +" -r\tcitește fișierul istoricului și îi adaugă conținutul la lista\n" +" \t\tistoricului\n" +" -w\tscrie istoricul curent în fișierul istoricului\n" +" \n" +" -p\tefectuează extinderea istoricului pentru fiecare ARG și afișează\n" +" \t\trezultatul fără a-l stoca în lista istoricului\n" +" -s\tadaugă ARGumentele la lista istoricului ca o singură intrare\n" +" \n" +" Dacă NUME_FIȘIER este dat, acesta este utilizat ca fișierul istoricului.\n" +" Altfel, dacă HISTFILE are o valoare, aceasta este folosită, dacă nu are,\n" +" se folosește ~/.bash_history.\n" +" \n" +" Dacă variabila HISTTIMEFORMAT este definită și nu este nulă, valoarea ei este\n" +" utilizată ca șir de format pentru strftime(3) pentru a imprima marcajul de\n" +" timp asociat cu fiecare intrare din istoric afișată. În caz contrar, nu se\n" +" imprimă marcajele de timp.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help jobs», din «bash»; +# «bash -c "help jobs"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2901,8 +3963,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2915,8 +3977,34 @@ msgid "" " 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 +"Afișează starea proceselor.\n" +" \n" +" Listează procesele active. ID_PROC, restrânge afișarea la acel proces.\n" +" Fără opțiuni, se afișează starea tuturor proceselor active.\n" +" \n" +" Opțiuni:\n" +" -l\tlistează ID-urile proceselor, pe lângă informațiile normale\n" +" -n\tlistează numai procesele care s-au schimbat de la ultima notificare\n" +" -p\tlistează numai ID-urile proceselor\n" +" -r\trestrânge afișarea, la procesele în execuție\n" +" -s\trestrânge afișarea, la procesele oprite\n" +" \n" +" Dacă este furnizată -x, COMANDA este rulată după ce toate specificațiile\n" +" procesului care apar în ARGumente au fost înlocuite cu ID-ul de proces al\n" +" liderului grupului de procese, al procesului respectiv.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau apare o eroare.\n" +" Dacă se utilizează „-x”, returnează starea de ieșire a COMENZII." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help disown», din «bash»; +# «bash -c "help disown"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2926,14 +4014,34 @@ msgid "" " 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" +" \t\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 "" +"Elimină procese din shell-ul actual.\n" +" \n" +" Elimină fiecare argument ID_PROC din tabelul de procese active. Fără\n" +" niciun ID_PROC, shell-ul folosește noțiunea sa de proces curent.\n" +" \n" +" Opțiuni:\n" +" -a\telimină toate procesele dacă ID_PROC nu este furnizat\n" +" -h\tmarchează fiecare ID_PROC astfel încât SIGHUP să nu fie trimis\n" +" \t\tla proces dacă shell-ul primește un semnal SIGHUP\n" +" -r\telimină numai procesele care rulează\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau ID_PROC." -#: builtins.c:898 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help kill», din «bash»; +# «bash -c "help kill"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2945,7 +4053,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2954,16 +4063,42 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" - -#: builtins.c:921 +"Trimite un semnal către un proces.\n" +" \n" +" Trimite proceselor identificate prin PID sau JOBSPEC semnalul numit de\n" +" SIGSPEC sau de SIGNUM. Dacă nici SIGSPEC, nici SIGNUM nu sunt\n" +" prezente, atunci se presupune SIGTERM.\n" +" \n" +" Opțiuni:\n" +" -s sig\tSIG este un nume de semnal\n" +" -n sig\tSIG este un număr de semnal\n" +" -l\tlistează numele semnalelor; dacă după „-l” urmează argumente, se\n" +" \t\tpresupune că sunt numere de semnal pentru care ar trebui listate\n" +" \t\tnume\n" +" -L\tsinonim cu -l\n" +" \n" +" Kill este o comandă internă de shell din două motive: permite utilizarea\n" +" ID-urilor de job în locul ID-urilor de proces și permite omorârea proceselor\n" +" dacă este atinsă limita de procese pe care le puteți crea.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help let», din «bash»; +# «bash -c "help let"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:949 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" +" 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" @@ -2997,58 +4132,156 @@ msgid "" " 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 +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Evaluează expresii aritmetice.\n" +" \n" +" Evaluează fiecare ARGument ca o expresie aritmetică. Evaluarea se face\n" +" în numere întregi cu lățime fixă, fără verificarea depășirii, dar împărțirea\n" +" la 0 este detectată și semnalată ca o eroare. Următoarea listă de operatori\n" +" este grupată în grupuri de operatori cu prioritate egală. Nivelurile sunt\n" +" listate în ordinea descrescătoare a priorității.\n" +" \n" +" \tid++, id--\tpost-incrementare, post-decrementare a variabilei\n" +" \t++id, --id\tpre-incrementare, pre-decrementare a variabilei\n" +" \t-, +\t\tminus unar, plus unar\n" +" \t!, ~\t\tnegații logice și binare\n" +" \t**\t\texponențial\n" +" \t*, /, %\t\tînmulțire, împărțire, rest\n" +" \t+, -\t\tadunare, scădere\n" +" \t<<, >>\t\tdeplasare binară la stânga și la dreapta\n" +" \t<=, >=, <, >\tcomparare\n" +" \t==, !=\t\tegalitate, inegalitate\n" +" \t&\t\tși (AND) binar\n" +" \t^\t\tsau exclusiv (XOR) binar\n" +" \t|\t\tsau (OR) binar\n" +" \t&&\t\tlși (AND) logic\n" +" \t||\t\tsau (OR) logic\n" +" \texpr ? expr : expr\n" +" \t\t\toperator condițional\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tasignare\n" +" \n" +" Variabilele shell sunt permise ca operanzi. Numele variabilei este\n" +" înlocuit cu valoarea acesteia (constrânsă la un număr întreg cu \n" +" lățime fixă) în cadrul unei expresii. Nu este necesar ca variabila să\n" +" aibă atributul întreg activat pentru a fi utilizată într-o expresie.\n" +" \n" +" Operatorii sunt evaluați în ordinea de prioritate. Subexpresiile din\n" +" paranteze sunt evaluate mai întâi și pot suprascrie regulile de\n" +" precedență de mai sus.\n" +" \n" +" Starea de ieșire:\n" +" Dacă ultimul ARGument este evaluat la 0, «let» returnează 1; în caz contrar,\n" +" «let» returnează 0." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help read», din «bash»; +# «bash -c "help read"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" - -#: builtins.c:1009 +"Citește o linie din intrarea standard și o împarte în câmpuri.\n" +" \n" +" Citește o singură linie din intrarea standard sau din descriptorul de fișier\n" +" FD dacă este furnizată opțiunea -u. Linia este împărțită în câmpuri ca în\n" +" cazul împărțirii cuvintelor, iar primul cuvânt este atribuit primului NUME, \n" +" al doilea cuvânt celui de-al doilea NUME și așa mai departe, ultimul NUME\n" +" preluând lista cuvintelor rămase. Doar caracterele găsite în $IFS sunt\n" +" recunoscute ca delimitatori de cuvinte. În mod implicit, caracterul bară oblică\n" +" inversă eludează caracterele delimitatoare și linia nouă.\n" +" \n" +" Dacă nu sunt furnizate NUME, linia citită este stocată în variabila REPLY.\n" +" \n" +" Opțiuni:\n" +" -a matrice\n" +" \t\tatribuie cuvintele citite indicilor secvențiali ai variabilei\n" +" \t\tmatrice MATRICE, începând de la zero\n" +" -d delim\tcontinuă până când este citit primul caracter din DELIM, în loc\n" +" \t\tde linia nouă\n" +" -e\tutilizează Readline pentru a obține linia\n" +" -i text\tutilizează TEXT ca text inițial pentru Readline\n" +" -n ncarac\treturnează după citirea a NCARAC caractere în loc să aștepte\n" +" \t\to nouă linie, dar respectă delimitatorul dacă sunt citite mai\n" +" \t\tpuțin de NCARAC caractere înainte de delimitator\n" +" -N ncarac\treturnează numai după citirea exactă a NCARAC caractere, cu\n" +" \t\texcepția cazului în care se întâlnește sfârșitul fișierului sau \n" +" \t\tdacă timpul de citire expiră, eliminând orice delimitatori\n" +" -p prompt\tafișează șirul PROMPT fără un caracter de linie nouă la final,\n" +" \t\tînainte de a încerca să citească\n" +" -r\tnu permite barelor oblice inverse să eludeze niciun caracter\n" +" -s\tnu afișează ieșirea ce vine de la un terminal\n" +" -t timeout\n" +" \t\texpiră și returnează un cod de eroare dacă o linie completă de\n" +" \t\tintrare nu este citită în TIMEOUT secunde. Valoarea variabilei\n" +" \t\tTIMEOUT este timpul de expirare implicit. TIMEOUT poate fi un\n" +" \t\tnumăr fracțional. Dacă TIMEOUT este zero, citirea se termină\n" +" \t\timediat fără a încerca să citească date, și returnează un cod de\n" +" \t\tsucces numai dacă intrarea este disponibilă pe descriptorul de\n" +" \t\tfișier specificat. Starea de ieșire este mai mare de 128 dacă\n" +" \t\ttimpul de expirare este depășit\n" +" -u fd\tcitește din descriptorul de fișier FD în loc de intrarea standard\n" +" \n" +" Starea de ieșire:\n" +" Codul de returnare este zero, cu excepția cazului în care se întâlnește\n" +" sfârșitul fișierului, expirarea timpului de citire (caz în care este mai mare\n" +" de 128), apare o eroare de atribuire a variabilei sau este furnizat un\n" +" descriptor de fișier nevalid ca argument pentru opțiunea „-u”." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help return», din «bash»; +# «bash -c "help return"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3059,8 +4292,29 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" - -#: builtins.c:1022 +"Returnează dintr-o funcție shell.\n" +" \n" +" Determină ieșirea unei funcții sau a unui script sursă cu valoarea de\n" +" returnare specificată de N. Dacă N este omis, starea de returnare\n" +" este cea a ultimei comenzi executate în funcție sau script.\n" +" \n" +" Starea de ieșire:\n" +" Returnează N sau eșec dacă shell-ul nu execută o funcție sau un script." + +# R-GC, scrie: +# unele dintre definițiile acestui(lung) mesaj, +# sunt adaptări ale muncii altor echipe din TP. +# *** +# Mulțumesc, tuturor acestor echipe: es, fr, pt_BR, pt, it, nl, pl, uk; sper să nu fi uitat +# niciuna dintre cele ce mi-au folosit ca +# inspirație, în traducerea acestui mesaj. +# ================================= +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help set», din «bash»; +# «bash -c "help set"», din «bash», sau dintr-un +# shell, diferit de «bash». +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3103,8 +4357,7 @@ msgid "" " 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" +" 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" @@ -3126,9 +4379,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3141,8 +4397,100 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" - -#: builtins.c:1104 +"Stabilește sau anulează valorile opțiunilor de shell și ale parametrilor\n" +"poziționali.\n" +" \n" +" Modifică valoarea atributelor shell și a parametrilor poziționali sau \n" +" afișează numele și valorile variabilelor shell.\n" +" \n" +" Opțiuni:\n" +" -a Marchează variabilele care sunt modificate sau create, pentru export.\n" +" -b Notifică imediat când o sarcină este finalizată.\n" +" -e Termină imediat dacă o comandă termină cu o stare diferită de zero.\n" +" -f Dezactivează folosirea metacaracterelor pentru completarea numelor\n" +" fișierelor (fără „globbing”).\n" +" -h Memorizează locația comenzilor pe măsură ce sunt căutate.\n" +" -k Toate argumentele de atribuire sunt plasate în mediul(environment)\n" +" unei comenzi, nu doar cele care preced numele comenzii.\n" +" -m Activează controlul sarcinii.\n" +" -n Citește comenzile, dar nu le execută.\n" +" -o nume-opțiune\n" +" Stabilește variabila corespunzătoare → nume-opțiune:\n" +" allexport la fel ca -a\n" +" braceexpand la fel ca -B\n" +" emacs utilizează o interfață de editare a liniilor în\n" +" stilul «emacs»\n" +" errexit la fel ca -e\n" +" errtrace la fel ca -E\n" +" functrace la fel ca -T\n" +" hashall la fel ca -h\n" +" histexpand la fel ca -H\n" +" history activează istoricul comenzilor\n" +" ignoreeof shell-ul nu va termina după citirea „EOF”\n" +" interactive-comments\n" +" permite comentariilor să apară în comenzile interactive\n" +" keyword la fel ca -k\n" +" monitor la fel ca -m\n" +" noclobber la fel ca -C\n" +" noexec la fel ca -n\n" +" noglob la fel ca -f\n" +" nolog acceptat în prezent, dar ignorat\n" +" notify la fel ca -b\n" +" nounset la fel ca -u\n" +" onecmd la fel ca -t\n" +" physical la fel ca -P\n" +" pipefail valoarea returnată a unei linii de conectare este\n" +" starea ultimei comenzi care a ieșit cu o stare diferită\n" +" de zero sau zero dacă nicio comandă nu a ieșit cu o\n" +" stare diferită de zero\n" +" posix modifică comportamentul lui «bash» în cazul în care\n" +" operația implicită diferă de standardul Posix, pentru\n" +" a se potrivi cu standardul Posix\n" +" privileged la fel ca -p\n" +" verbose la fel ca -v\n" +" vi utilizează o interfață de editare a liniilor în\n" +" stilul «vi»\n" +" xtrace la fel ca -x\n" +" -p Modul cu privilegii: Activat ori de câte ori ID-urile de utilizator\n" +" reale și efective nu se potrivesc. Dezactivează procesarea \n" +" fișierului $ENV și importul funcțiilor shell. Dezactivarea acestei\n" +" opțiuni face ca uid-ul și gid-ul efectiv să fie stabilite la uid-ul și\n" +" gid-ul real\n" +" -t Termină după citirea și executarea unei comenzi.\n" +" -u Tratează variabilele nedefinite ca pe o eroare la substituire.\n" +" -v Afișează liniile de intrare ale shell-ului pe măsură ce sunt citite.\n" +" -x Afișează comenzile și argumentele lor pe măsură ce sunt executate.\n" +" -B Shell-ul va efectua înlocuirea acoladelor (de exp.: a{b,c} → ab ac)\n" +" -C Dacă este specificată, nu permite ca fișierele obișnuite existente să\n" +" fie suprascrise prin redirecționarea ieșirii.\n" +" -E Dacă este specificată, capturarea ERR este moștenită de funcțiile shell.\n" +" -H Permite înlocuirea istoricului cu un „!”. Această opțiune este activată\n" +" în mod implicit atunci când shell-ul este interactiv.\n" +" -P Dacă este specificată, legăturile simbolice nu sunt urmate la executarea\n" +" comenzilor precum «cd» care schimbă directorul curent.\n" +" -T Dacă este specificată, capturile DEBUG și RETURN sunt moștenite de\n" +" funcțiile shell.\n" +" -- Atribuie toate argumentele rămase parametrilor de poziție.\n" +" Dacă nu există argumente rămase, parametrii de poziție sunt eliminați.\n" +" - Atribuie toate argumentele rămase parametrilor de poziție.\n" +" Opțiunile -x și -v sunt dezactivate.\n" +" \n" +" Utilizarea lui „+” în loc de „-”, face ca aceste opțiuni să fie dezactivate.\n" +" Opțiunile pot fi folosite și la invocarea shell-ului. Setul actual de \n" +" opțiuni poate fi găsit în $-. Restul de n ARG sunt parametri poziționali și\n" +" sunt alocați, în ordine, la $1, $2, .. $n. Dacă nu sunt date ARG, toate \n" +" variabilele shell sunt afișate.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes cu excepția cazului în care este dată o opțiune nevalidă." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help unset», din «bash»; +# «bash -c "help unset"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3151,9 +4499,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3161,14 +4510,37 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Anulează valorile și atributele variabilelor și funcțiilor shell.\n" +" \n" +" Pentru fiecare NUME, elimină variabila sau funcția corespunzătoare.\n" +" \n" +" Opțiuni:\n" +" -f\ttratează fiecare NUME ca pe o funcție shell\n" +" -v\ttratează fiecare NUME ca pe o variabilă shell\n" +" -n\ttratează fiecare NUME ca referință de nume și anulează variabila\n" +" \t\tîn sine, în loc de variabila la care face referire\n" +" \n" +" Fără opțiuni, „unset” încearcă mai întâi să anuleze o variabilă și, dacă\n" +" aceasta nu reușește, încearcă să anuleze o funcție.\n" +" \n" +" Unele variabile nu pot fi anulate; consultați, de asemenea, «readonly».\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau un NUME este doar pentru citire." -#: builtins.c:1124 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help export», din «bash»; +# «bash -c "help export"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3180,8 +4552,30 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Stabilește atributul de export pentru variabilele shell.\n" +" \n" +" Marchează fiecare NUME pentru export automat în mediul(environment)\n" +" comenzilor executate ulterior. Dacă este furnizată VALOAREa, atribuie\n" +" VALOAREa înainte de a exporta.\n" +" \n" +" Opțiuni:\n" +" -f\tse referă la funcțiile shell\n" +" -n\telimină proprietatea de export din fiecare NUME\n" +" -p\tafișează o listă cu toate variabilele și funcțiile exportate\n" +" \n" +" Un argument de „--” dezactivează procesarea ulterioară a opțiunilor.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau NUME nu este valid." -#: builtins.c:1143 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help readonly», din «bash»; +# «bash -c "help readonly"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3193,15 +4587,40 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Marchează variabilele shell ca neschimbabile.\n" +" \n" +" Marchează fiecare NUME ca fiind doar pentru citire; valorile acestor NUME\n" +" nu pot fi modificate prin atribuirea ulterioară. Dacă este furnizată VALOARE,\n" +" atribuie VALOARE înainte de a marca ca doar pentru citire.\n" +" \n" +" Opțiuni:\n" +" -a\tse referă la variabilele matrice indexate\n" +" -A\tse referă la variabile matrice asociative\n" +" -f\tse referă la funcțiile shell\n" +" -p\tafișează o listă cu toate variabilele sau funcțiile protejate\n" +" \t\tla scriere, în funcție de dacă este dată sau nu opțiunea „-f”\n" +" \n" +" Un argument de „--” dezactivează procesarea ulterioară a opțiunilor.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau NUME nu este valid." -#: builtins.c:1164 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help shift», din «bash»; +# «bash -c "help shift"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3211,8 +4630,22 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Schimbă parametrii poziționali.\n" +" \n" +" Redenumește parametrii de poziție $N+1,$N+2 ... la $1,$2 ... Dacă N\n" +" nu este dat, se presupune că este 1.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care N este negativ sau mai\n" +" mare decât $#." -#: builtins.c:1176 builtins.c:1191 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help source», din «bash»; +# «bash -c "help source"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3225,8 +4658,24 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"Execută comenzi dintr-un fișier în shell-ul curent.\n" +" \n" +" Citește și execută comenzi din NUME_FIȘIER în shell-ul curent. Intrările \n" +" din $PATH sunt utilizate pentru a găsi directorul care conține NUME_FIȘIER.\n" +" Dacă sunt furnizate ARGUMENTE, acestea devin parametrii de poziție atunci\n" +" când este executat NUME_FIȘIER.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate în NUME_FIȘIER; eșuează dacă\n" +" NUME_FIȘIER nu poate fi citit." -#: builtins.c:1207 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help suspend», din «bash»; +# «bash -c "help suspend"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3239,15 +4688,37 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Suspendă execuția shell-ului.\n" +" \n" +" Suspendă execuția acestui shell până când primește un semnal SIGCONT.\n" +" Cu excepția cazului în care sunt forțate, shell-urile de autentificare nu pot \n" +" fi suspendate.\n" +" \n" +" Opțiuni:\n" +" -f\tforțează suspendarea, chiar dacă shell-ul este un shell de\n" +" \tautentificare\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care controlul sarcinii nu este\n" +" activat sau apare o eroare." -#: builtins.c:1223 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help test», din «bash»; +# «bash -c "help test"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3271,8 +4742,7 @@ msgid "" " -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 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" @@ -3293,14 +4763,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3316,33 +4788,131 @@ msgid "" " Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" " false or an invalid argument is given." msgstr "" - -#: builtins.c:1299 +"Evaluează expresia condițională.\n" +" \n" +" Termină cu starea 0 (adevărat) sau 1 (fals) în funcție de evaluarea EXPR.\n" +" Expresiile pot fi unare sau binare. Expresiile unare sunt adesea folosite\n" +" pentru a examina starea unui fișier. Există de-asemeni operatori de șir și\n" +" operatori de comparație numerică.\n" +" \n" +" Comportamentul testului depinde de numărul de argumente. Citiți pagina\n" +" de manual, «bash», pentru specificația completă.\n" +" \n" +" Operatori de fișiere:\n" +" \n" +" -a FIȘIER Adevărat dacă fișierul există.\n" +" -b FIȘIER Adevărat dacă fișierul este un dispozitiv de blocuri.\n" +" -c FIȘIER Adevărat dacă fișierul este un dispozitiv de caractere.\n" +" -d FIȘIER Adevărat dacă fișierul este un director.\n" +" -e FIȘIER Adevărat dacă fișierul există.\n" +" -f FIȘIER Adevărat dacă fișierul există și este un fișier normal.\n" +" -g FIȘIER Adevărat dacă fișierul are activat bitul „set-group-id”.\n" +" -h FIȘIER Adevărat dacă fișierul este o legătură simbolică.\n" +" -L FIȘIER Adevărat dacă fișierul este o legătură simbolică..\n" +" -k FIȘIER Adevărat dacă fișierul are activat bitul „sticky” (lipicios).\n" +" -p FIȘIER Adevărat dacă fișierul este o linie de conectare numită.\n" +" -r FIȘIER Adevărat dacă fișierul poate fi citit de dumneavoastră.\n" +" -s FIȘIER Adevărat dacă fișierul există și nu este gol.\n" +" -S FIȘIER Adevărat dacă fișierul este un soclu.\n" +" -t DF Adevărat dacă DF(descriptorul de fișier) este deschis pe un terminal.\n" +" -u FIȘIER Adevărat dacă fișierul are activat bitul „set-user-id”.\n" +" -w FIȘIER Adevărat dacă fișierul poate fi scris de dumneavoastră.\n" +" -x FIȘIER Adevărat dacă fișierul poate fi executat de dumneavoastră.\n" +" -O FIȘIER Adevărat dacă fișierul este deținut efectiv de dumneavoastră.\n" +" -G FIȘIER Adevărat dacă fișierul este deținut efectiv de grupul dumneavoastră.\n" +" -N FIȘIER Adevărat dacă fișierul a fost modificat de la ultima citire.\n" +" \n" +" FIȘI1 -nt FIȘI2 Adevărat dacă fișierul 1 este mai nou decât fișierul 2 (conform\n" +" datei modificării).\n" +" \n" +" FIȘI1 -ot FIȘI2 Adevărat dacă fișierul1 este mai vechi decât fișierul2.\n" +" \n" +" FIȘI1 -ef FIȘI2 Adevărat dacă fișierul1 este o legătură dură către fișierul2.\n" +" \n" +" Operatori de șir:\n" +" \n" +" -z ȘIR Adevărat dacă șirul este gol.\n" +" \n" +" -n ȘIR Adevărat dacă șirul nu este gol.\n" +" ȘIR Adevărat dacă șirul nu este gol.\n" +" \n" +" ȘIR1 = ȘIR2 Adevărat dacă șirurile sunt egale.\n" +" ȘIR1 != ȘIR2 Adevărat dacă șirurile nu sunt egale.\n" +" ȘIR1 < ȘIR2 Adevărat dacă ȘIR1 se ordonează lexicografic înainte de ȘIR2.\n" +" ȘIR1 > ȘIR2 Adevărat dacă ȘIR1 se ordonează lexicografic după ȘIR2.n\n" +" \n" +" Alți operatori:\n" +" \n" +" -o OPȚIUNE Adevărat dacă opțiunea shell OPȚIUNE este activată.\n" +" -v VAR Adevărat dacă este definită variabila shell VAR.\n" +" -R VAR Adevărat dacă variabila shell VAR este definită și este o referință\n" +" de nume.\n" +" ! EXPR Adevărat dacă expresia EXPR este falsă.\n" +" EXPR1 -a EXPR2 Adevărat dacă amândouă expresiile EXPR1 și EXPR2 sunt adevărate.\n" +" EXPR1 -o EXPR2 Adevărat dacă fie expresia EXPR1, fie expresia EXPR2 este adevărată.\n" +" \n" +" ARG1 OP ARG2 Teste aritmetice. OP este unul dintre -eq, -ne, -lt, -le, -gt, sau -ge.\n" +" \n" +" Operatorii binari aritmetici returnează adevărat dacă ARG1 este egal, inegal, mai mic\n" +" decât, mai mic decât sau egal, mai mare decât, sau mai mare decât sau egal cu ARG2.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes dacă EXPR este evaluată ca adevărată; eșuează dacă EXPR este\n" +" evaluată ca fiind falsă sau este dat un argument nevalid." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help [», din «bash»; +# «bash -c "help ["», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1344 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 "" +"Evaluează expresia condițională.\n" +" \n" +" Acesta este un sinonim pentru comanda internă «test», dar ultimul argument\n" +" trebuie să fie un „]” literal, pentru a se potrivi cu „[” de deschidere." -#: builtins.c:1308 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help times», din «bash»; +# «bash -c "help times"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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 "" +"Afișează timpii procesului.\n" +" \n" +" Afișează timpii acumulați de utilizator și sistem pentru shell și pentru toate\n" +" procesele sale secundare.\n" +" \n" +" Starea de ieșire:\n" +" Întotdeauna reușește(0)." -#: builtins.c:1320 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help trap», din «bash»; +# «bash -c "help trap"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3351,29 +4921,70 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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 +" Returns success unless a SIGSPEC is invalid or an invalid option is given." +msgstr "" +"Capturează semnale și alte evenimente.\n" +" \n" +" Definește și activează operatorii care urmează să fie rulați atunci când\n" +" shell-ul primește semnale sau apar alte evenimente.\n" +" \n" +" ARG este o comandă care trebuie citită și executată atunci când shell-ul\n" +" primește semnalul(ele) SIGNAL_SPEC. Dacă ARG este absentă (și este\n" +" furnizat un singur SIGNAL_SPEC) sau „-”, fiecare semnal specificat este\n" +" restabilit la valoarea sa originală. Dacă ARG este un șir nul, fiecare\n" +" SIGNAL_SPEC este ignorat de către shell și de comenzile pe care le invocă.\n" +" \n" +" Dacă un SIGNAL_SPEC este EXIT (0), ARG este executat la ieșirea din shell.\n" +" Dacă un SIGNAL_SPEC este DEBUG, ARG este executat înainte de fiecare comandă\n" +" simplă. Dacă un SIGNAL_SPEC este RETURN, ARG este executat de fiecare dată \n" +" când o funcție shell sau un script rulat din . sau comanda internă «source»\n" +" se termină de executat. Un SIGNAL_SPEC de ERR face ca ARG să fie executat\n" +" de fiecare dată când eșecul unei comenzi ar determina terminarea shell-ului\n" +" atunci când opțiunea „-e” este activată. \n" +" \n" +" Dacă nu sunt furnizate argumente, «trap» afișează lista de comenzi asociate\n" +" fiecărui semnal.\n" +" \n" +" Opțiuni:\n" +" -l\tafișează o listă de nume de semnale și numerele corespunzătoare\n" +" \tale acestora\n" +" -p\tafișează comenzile de captură asociate fiecărui SIGNAL_SPEC\n" +" \n" +" Fiecare SIGNAL_SPEC este fie un nume de semnal în , fie un număr\n" +" de semnal. Numele semnalelor nu fac distincție între majuscule și minuscule,\n" +" iar prefixul SIG este opțional. Un semnal poate fi trimis către shell cu\n" +" «kill -signal $$».\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care un SIGSPEC este nevalid sau \n" +" este dată o opțiune nevalidă." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help type», din «bash»; +# «bash -c "help type"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3382,33 +4993,62 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 +" Returns success if all of the NAMEs are found; fails if any are not found." +msgstr "" +"Afișează informații despre comanda «type».\n" +" \n" +" Pentru fiecare NUME, indică cum ar fi interpretat dacă ar fi folosit ca\n" +" nume de comandă.\n" +" \n" +" Opțiuni:\n" +" -a\tafișează toate locațiile care conțin un executabil numit NUME; \n" +" \t\tinclude alias, componente integrate și funcții, dacă și numai\n" +" \t\tdacă opțiunea „-p” nu este, de asemenea, utilizată\n" +" -f\tsuprimă căutarea funcției de shell\n" +" -P\tforțează o căutare PATH pentru fiecare NUME, chiar dacă este un\n" +" \t\talias, o comandă internă sau o funcție, și returnează numele\n" +" \t\tfișierului din disc care va fi executat\n" +" -p\treturnează fie numele fișierului de pe disc care va fi executat,\n" +" \t\tfie nimic dacă «type -t NUME» nu va returna „file”\n" +" -t\tafișează un singur cuvânt care este unul dintre „alias”, „keyword”,\n" +" \t\t„function”, „builtin”, „file” sau „”, dacă NUME este un alias,\n" +" \t\tcuvânt rezervat shell, funcție shell, comandă internă shell,\n" +" \t\tfișier pe disc, sau, respectiv, negăsit\n" +" \n" +" Argumente:\n" +" NUME\tNumele comenzii de interpretat.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes dacă toate NUMEle sunt găsite; eșuează dacă nu sunt găsite." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help ulimit», din «bash»; +# «bash -c "help ulimit"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -3421,6 +5061,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3432,6 +5073,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3446,8 +5092,61 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1428 +"Modifică limitele resurselor shell.\n" +" \n" +" Oferă control asupra resurselor disponibile shell-ului și proceselor pe care\n" +" acesta le creează, pe sisteme care permit un astfel de control.\n" +" \n" +" Opțiuni:\n" +" -S\tutilizează limita de resurse „soft”\n" +" -H\tutilizează limita de resurse „hard”\n" +" -a\tsunt raportate toate limitele curente\n" +" -b\tdimensiunea memoriei tampon a soclului\n" +" -c\tdimensiunea maximă a fișierelor create cu conținutul memoriei (core)\n" +" -d\tdimensiunea maximă a segmentului de date al unui proces\n" +" -e\tprioritatea maximă de planificare („nice”)\n" +" -f\tdimensiunea maximă a fișierelor scrise de shell și subprocesele sale\n" +" -i\tnumărul maxim de semnale în așteptare\n" +" -k\tnumărul maxim de Kcozi alocate pentru acest proces\n" +" -l\tdimensiunea maximă pe care un proces o poate bloca în memorie\n" +" -m\tcantitatea maximă de memorie fizică a unui proces\n" +" -n\tnumărul maxim de descriptori de fișier deschise\n" +" -p\tdimensiunea memoriei tampon a liniei de conectare\n" +" -q\tnumărul maxim de octeți din cozile de mesaje POSIX\n" +" -r\tprioritatea maximă a procesului în timp real\n" +" -s\tdimensiunea maximă a stivei\n" +" -t\tcantitatea maximă de timp a CPU-ului în secunde\n" +" -u\tnumărul maxim de procese ale utilizatorului\n" +" -v\tdimensiunea memoriei virtuale\n" +" -x\tnumărul maxim de blocări ale fișierelor\n" +" -P\tnumărul maxim de pseudoterminale\n" +" -R\ttimpul maxim pe care îl poate rula un proces în timp real înainte\n" +" \tde blocare\n" +" -T\tnumărul maxim de fire(threads)\n" +" \n" +" Nu toate opțiunile sunt disponibile pe toate platformele.\n" +" \n" +" Dacă se dă LIMITA, aceasta este noua valoare a resursei specificate;\n" +" valorile speciale de LIMITĂ: „soft”, „hard” și „unlimited” reprezintă\n" +" limita curentă maleabilă, limita curentă dură și, respectiv, fără limită.\n" +" Altminteri, este afișată valoarea curentă a resursei specificate. Dacă\n" +" nu este dată nicio opțiune, atunci se presupune „-f”.\n" +" \n" +" Valorile sunt în incremente de 1024 de octeți, cu excepția lui „-t”, care\n" +" este în secunde, a lui „-p”, care este în incremente de 512 octeți și a lui\n" +" „-u”, care este un număr nescalat de procese.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizată o opțiune\n" +" nevalidă sau apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help umask», din «bash»; +# «bash -c "help umask"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3464,39 +5163,114 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Afișează sau modifică masca pentru accesarea fișierelor nou create.\n" +" \n" +" Stabilește masca de creare a fișierelor de utilizator la MOD. Dacă MOD\n" +" este omis, afișează valoarea curentă a măștii.\n" +" \n" +" Dacă MOD începe cu o cifră, acesta este interpretat ca un număr octal;\n" +" altminteri este interpretat ca un șir în format simbolic ca cel acceptat\n" +" de chmod(1).\n" +" \n" +" Opșiuni\n" +" -p\tdacă MOD este omis, arată ieșirea într-o formă care poate fi\n" +" \treutilizată ca intrare\n" +" -S\tafișează MODul în formatul simbolic; altminteri în formatul octal\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care MOD este nevalid sau\n" +" este dată o opțiune nevalidă." -#: builtins.c:1448 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help wait», din «bash»; +# «bash -c "help wait"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." -msgstr "" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Așteaptă finalizarea lucrării și returnează starea de ieșire.\n" +" \n" +" Așteaptă fiecare proces identificat printr-un ID, care poate fi un ID de\n" +" proces sau o specificație de lucrare și raportează starea de terminare\n" +" a acestuia. Dacă ID-ul nu este dat, așteaptă toate procesele secundare\n" +" active în prezent și starea de returnare este zero. Dacă ID-ul este o\n" +" specificație de lucrare, așteaptă toate procesele din secvența de comenzi\n" +" respectivă a lucrării.\n" +" \n" +" Dacă este furnizată opțiunea „-n”, așteaptă o singură lucrare din lista de\n" +" ID-uri sau, dacă nu sunt furnizate ID-uri, pentru finalizarea următoarei\n" +" lucrări și returnează starea de ieșire.\n" +" \n" +" Dacă este furnizată opțiunea „-p”, identificatorul de proces sau de lucrare al\n" +" lucrării pentru care este returnată starea de ieșire este atribuit variabilei\n" +" VAR numită de argumentul opțiunii. Variabila va fi anulată inițial, înainte\n" +" de orice atribuire. Acest lucru este util numai atunci când este furnizată\n" +" opțiunea „-n”.\n" +" \n" +" Dacă este furnizată opțiunea „-f” și controlul lucrării este activat, \n" +" așteaptă ca ID-ul specificat să se termine, în loc să aștepte ca acesta să\n" +" își schimbe starea.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimului ID; eșuează dacă ID-ul este nevalid sau este\n" +" dată o opțiune nevalidă sau dacă „-n” este furnizată și shell-ul nu are\n" +" niciun copil pe care să-l aștepte." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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 +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." +msgstr "" +"Așteaptă finalizarea procesului și returnează starea de ieșire.\n" +" \n" +" Așteaptă fiecare proces specificat de un PID și raportează starea de terminare a\n" +" acestuia. Dacă nu este dat PID, așteaptă toate procesele copil active în prezent,\n" +" iar starea returnată este zero. PID trebuie să fie un ID de proces.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimului PID; eșuează dacă PID este nevalid sau este dată\n" +" o opțiune nevalidă." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help for», din «bash»; +# «bash -c "help for"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3508,8 +5282,23 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Execută comenzi pentru fiecare membru dintr-o listă.\n" +" \n" +" Bucla „for” execută o secvență de comenzi pentru fiecare membru dintr-o\n" +" listă de elemente. Dacă „in CUVINTE ...;” nu este prezent, atunci se\n" +" presupune „in \"$@\"”. Pentru fiecare element din CUVINTE, se definește\n" +" NUME ca acel element, și se execută COMENZILE.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." -#: builtins.c:1495 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help 'for (('», din «bash»; +# «bash -c "help 'for (('"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3525,8 +5314,27 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" - -#: builtins.c:1513 +"Buclă aritmetică „for”.\n" +" \n" +" Echivalentă cu:\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMENZI\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, și EXP3 sunt expresii aritmetice. Dacă orice expresie este\n" +" omisă, se comportă ca și cum aceasta ar avea valoarea 1.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help select», din «bash»; +# «bash -c "help select"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3545,8 +5353,31 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" - -#: builtins.c:1534 +"Selectează cuvinte dintr-o listă și execută comenzi.\n" +" \n" +" CUVINTELE sunt expandate, generând o listă de cuvinte. Setul\n" +" de cuvinte expandate este afișat la ieșirea de eroare standard,\n" +" fiecare precedat de un număr. Dacă „în CUVINTE” nu este prezent,\n" +" se presupune „in \"$@\"”. Se afișează apoi promptul PS3 și se citește\n" +" o linie de la intrarea standard. Dacă linia constă din numărul\n" +" corespunzător unuia dintre cuvintele afișate, atunci se definește NUME\n" +" ca acest cuvânt. Dacă linia este goală, CUVINTE și promptul sunt\n" +" reafișate. Dacă este citit sfârșitul fișierului(EOF), comanda se\n" +" finalizează. Orice altă valoare citită face ca NUME să fie definit ca\n" +" null. Linia citită este salvată în variabila „REPLY”. COMENZILE sunt\n" +" executate după fiecare selecție până când este executată o comandă\n" +" de întrerupere(break).\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help time», din «bash»; +# «bash -c "help time"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3561,8 +5392,27 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"Raportează timpul consumat de execuția secvenței de comenzi.\n" +" \n" +" Execută SECVENȚA_DE_COMENZI și imprimă un rezumat al timpului real,\n" +" al timpului CPU al utilizatorului și al timpului CPU al sistemului\n" +" petrecut executând SECVENȚA_DE_COMENZI atunci când aceasta termină.\n" +" \n" +" Opțiuni:\n" +" -p\tafișează rezumatul cronometrajului în formatul Posix portabil\n" +" \n" +" Valoarea variabilei TIMEFORMAT este utilizată drept format de ieșire.\n" +" \n" +" Starea de ieșire:\n" +" Starea de returnare este starea de returnare a SECVENȚEI_DE_COMENZI." -#: builtins.c:1551 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help case», din «bash»; +# «bash -c "help case"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3572,51 +5422,104 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Execută comenzi bazate pe potrivirea modelelor.\n" +" \n" +" Execută COMENZI selectiv, pe baza potrivirilor dintre CUVÂNT și MODEL.\n" +" „|” este folosit pentru a separa mai multe modele.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." -#: builtins.c:1563 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help if», din «bash»; +# «bash -c "help if"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1631 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" +" 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" +" `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 +"Execută comenzi bazate pe condițional.\n" +" \n" +" Lista „if COMENZI” este executată. Dacă starea sa de ieșire este zero,\n" +" atunci este executată lista „then COMENZI”. În caz contrar, fiecare listă \n" +" „elif COMENZI” este executată pe rând, iar dacă starea sa de ieșire este\n" +" zero, lista corespunzătoare „then COMENZI” este executată și comanda\n" +" «if» se completează. În caz contrar, lista „else COMENZI” este executată,\n" +" dacă este prezentă. Starea de ieșire a întregii construcții este starea de\n" +" ieșire a ultimei comenzi executate sau zero dacă nicio condiție nu a fost\n" +" evaluată ca adevărată.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help while», din «bash»; +# «bash -c "help while"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Execută comenzi atâta timp cât un test reușește.\n" +" \n" +" Expandează și execută COMENZI-2 atâta timp cât comanda finală din\n" +" COMENZI are o stare de ieșire zero.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." -#: builtins.c:1592 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help until», din «bash»; +# «bash -c "help until"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Execută comenzi atâta timp cât un test nu reușește.\n" +" \n" +" Expandează și execută COMENZI-2 atâta timp cât comanda finală din\n" +" COMENZI are o stare de ieșire diferită de zero.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." -#: builtins.c:1604 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help coproc», din «bash»; +# «bash -c "help coproc"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3626,24 +5529,53 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Creează un coproces numit NUME.\n" +" \n" +" Execută COMANDA în mod asincron, cu ieșirea standard și intrarea standard a\n" +" comenzii conectate printr-o conductă la descriptorii de fișiere alocați\n" +" indicilor 0 și 1 ai unei variabile matrice NUME din shell-ul de execuție.\n" +" NUMELE implicit este „COPROC”.\n" +" \n" +" Starea de ieșire:\n" +" Comanda «coproc» returnează o stare de ieșire de 0." -#: builtins.c:1618 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help function», din «bash»; +# «bash -c "help function"», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1686 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" +" 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ște funcția shell.\n" +" \n" +" Creează o funcție de shell numită NUME. Când se invocă ca o comandă simplă,\n" +" NUME rulează COMENZI în contextul shell-ului apelant. Când NUME este \n" +" invocat, argumentele sunt transmise funcției ca $1...$n, iar numele\n" +" funcției este în $FUNCNAME.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care NUME este protejat la scriere" -#: builtins.c:1632 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help -m {», din «bash»; +# «bash -c "help -m {», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3653,8 +5585,15 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Grupează comenzile ca o unitate.\n" +" \n" +" Rulează un set de comenzi dintr-un grup. Aceasta este o modalitate\n" +" de a redirecționa un întreg set de comenzi.\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea ultimei comenzi executate." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3667,28 +5606,54 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" +"Reia lucrarea în prim-plan.\n" +" \n" +" Echivalent cu argumentul JOB_SPEC al comenzii «fg». Reia o lucrare\n" +" oprită sau în fundal. JOB_SPEC poate specifica fie un nume de lucrare,\n" +" fie un număr de lucrare. JOB_SPEC urmat de un „&” plasează lucrarea\n" +" în fundal, ca și cum specificația lucrării ar fi fost furnizată ca argument\n" +" pentru «bg».\n" +" \n" +" Starea de ieșire:\n" +" Returnează starea lucrării reluate." -#: builtins.c:1659 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help '(('», din «bash»; +# «bash -c "help '(('», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"Evaluează expresia aritmetică.\n" +" \n" +" EXPRESIA este evaluată conform regulilor de evaluare aritmetică.\n" +" Echivalent cu „let \"EXPRESIA\"”.\n" +" \n" +" Starea de ieșire:\n" +" Returnează 1 dacă EXPRESIA este evaluată la 0; în caz contrar, returnează 0." -#: builtins.c:1671 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help '[['», din «bash»; +# «bash -c "help '[['», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1739 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" +" 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" @@ -3706,8 +5671,37 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" - -#: builtins.c:1697 +"Execută comanda condițională.\n" +" \n" +" Returnează o stare de 0 sau 1, în funcție de evaluarea expresiei condiționale\n" +" EXPRESIA. Expresiile sunt compuse din aceleași elemente primare folosite de\n" +" comanda INTERNĂ «test» și pot fi combinate folosind următorii operatori:\n" +" \n" +" ( EXPRESIA )\tReturnează valoarea EXPRESIEI\n" +" ! EXPRESIA\tAdevărat dacă EXPRESIA este falsă; altfel fals\n" +" EXPR1 && EXPR2\tAdevărat dacă atât EXPR1 cât și EXPR2 sunt adevărate;\n" +" \t\t\taltfel fals\n" +" EXPR1 || EXPR2\tAdevărat dacă fie EXPR1, fie EXPR2 este adevărată;\n" +" \t\t\taltfel fals\n" +" \n" +" Când se utilizează operatorii „==” și „!=”, șirul din dreapta operatorului\n" +" este utilizat ca model și se realizează potrivirea modelului.\n" +" Când se utilizează operatorul „=~”, șirul din dreapta operatorului se\n" +" potrivește ca expresie regulată.\n" +" \n" +" Operatorii „&&” și „||” nu evaluează EXPR2 dacă EXPR1 este suficientă pentru\n" +" a determina valoarea expresiei.\n" +" \n" +" Starea de ieșire:\n" +" 0 sau 1, în funcție de valoarea EXPRESIEI." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help variables», din «bash»; +# «bash -c "help variables», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3760,8 +5754,67 @@ msgid "" " 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 +"Numele și utilizarea variabilelor shell comune.\n" +" \n" +" BASH_VERSION\n" +" \tInformații despre versiunea acestui Bash.\n" +" CDPATH\tO listă de directoare separate prin două puncte\n" +" \t\tpentru a căuta directoare date ca argumente pentru «cd».\n" +" GLOBIGNORE\tO listă de modele, separate prin două puncte, care descriu nume\n" +" \t\tde fișiere care trebuie ignorate de extinderea numelui de cale.\n" +" HISTFILE\tNumele fișierului în care este stocat istoricul comenzilor.\n" +" HISTFILESIZE\n" +" \tNumărul maxim de linii pe care acest fișier le poate conține.\n" +" HISTSIZE\tNumărul maxim de linii de istoric pe care le poate accesa un\n" +" \t\tshell care rulează.\n" +" HOME\tCalea completă către directorul dumneavoastră de conectare.\n" +" HOSTNAME\tNumele gazdei curente.\n" +" HOSTTYPE\tTipul de CPU pe care rulează această versiune de Bash.\n" +" IGNOREEOF\tControlează acțiunea shell-ului la primirea unui caracter „EOF”\n" +" \t\tca unică intrare. Dacă este definită, atunci valoarea acesteia\n" +" \t\teste numărul de caractere „EOF” care pot fi văzute într-un rând\n" +" \t\tpe o linie goală înainte ca shell-ul să iasă (implicit 10).\n" +" \t\tCând nu este definită, „EOF” înseamnă sfârșitul intrării.\n" +" MACHTYPE\tUn șir care descrie sistemul curent pe care rulează Bash.\n" +" MAILCHECK\tCât de des, în secunde, verifică Bash dacă există e-mailuri noi.\n" +" MAILPATH\tO listă de nume de fișiere, separate prin două puncte, pe care\n" +" \t\tBash le verifică pentru e-mailuri noi.\n" +" OSTYPE\tVersiunea de Unix pe care rulează această versiune de Bash.\n" +" PATH\tO listă de directoare separate prin două puncte în care se caută,\n" +" \t\tatunci când se caută comenzi.\n" +" PROMPT_COMMAND\n" +" \tO comandă care trebuie executată înainte de afișarea\n" +" \t\tfiecărui prompt primar.\n" +" PS1\t\tȘirul de prompt primar.\n" +" PS2\t\tȘirul de prompt secundar.\n" +" PWD\t\tCalea completă a directorului curent.\n" +" SHELLOPTS\tO listă separată de două puncte, de opțiuni de shell activate.\n" +" TERM\tNumele tipului actual de terminal.\n" +" TIMEFORMAT\tFormatul de ieșire pentru statisticile de timp afișat de\n" +" \t\tcuvântul rezervat „time”.\n" +" auto_resume\tNon-null înseamnă că un cuvânt de comandă care apare singur pe o\n" +" \t\tlinie este căutat mai întâi în lista de lucrări opriteîn prezent.\n" +" \t\tDacă se găsește acolo, lucrarea este în prim plan. O valoare\n" +" \t\t„exact” înseamnă că cuvântul de comandă trebuie să se potrivească\n" +" \t\texact cu o comandă din lista de lucrări oprite. O valoare „sub-\n" +" \t\tstring” înseamnă că cuvântul de comandă trebuie să se potrivească\n" +" \t\tcu un subșir al lucrării. Orice altă valoare înseamnă că\n" +" \t\tcomanda trebuie să fie un prefix al unei lucrări oprite.\n" +" histchars\tCaractere care controlează extinderea istoricului și\n" +" \t\tînlocuirea rapidă. Primul caracter este caracterul\n" +" \t\tde înlocuire a istoricului, de obicei „!”. Al doilea este\n" +" \t\tcaracterul „înlocuire rapidă”, de obicei „^”. Al treilea\n" +" \t\teste caracterul „comentare istoric”, de obicei „#”.\n" +" HISTIGNORE\tO listă de modele separate prin două puncte, utilizată pentru a\n" +" \t\tdecide ce comenzi ar trebui salvate în lista istoricului.\n" + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help pushd», din «bash»; +# «bash -c "help pushd», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3771,19 +5824,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3791,8 +5844,41 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Adaugă directoare la stivă.\n" +" \n" +" Adaugă un director în partea de sus a stivei de directoare sau \n" +" rotește stiva, făcând din partea de sus a stivei directorul de lucru\n" +" curent. Fără argumente, interschimbă primele două directoare.\n" +" \n" +" Opțiuni:\n" +" -n\tSuprimă schimbarea normală a directorului atunci când se adaugă\n" +" \t\tdirectoare la stivă, astfel încât numai stiva este manipulată.\n" +" \n" +" Argumente:\n" +" +N\tRotește stiva astfel încât al N-lea director (numărând \n" +" \t\tdin stânga listei afișate de «dirs», începând cu zero) să fie\n" +" \t\tîn partea de sus.\n" +" \n" +" -N\tRotește stiva astfel încât al N-lea director (numărând \n" +" \t\tdin dreapta listei afișate de «dirs», începând cu zero) să fie\n" +" \t\tîn partea de sus.\n" +" \n" +" dir\tAdaugă DIR la stiva de directoare din partea de sus, făcându-l\n" +" \t\tnoul director de lucru curent.\n" +" \n" +" Comanda internă «dirs» afișează stiva de directoare.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizat un argument\n" +" nevalid sau dacă schimbarea directorului eșuează." -#: builtins.c:1788 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help popd», din «bash»; +# «bash -c "help popd», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3801,16 +5887,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3818,8 +5904,37 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Elimină directoare din stivă.\n" +" \n" +" Elimină intrările din stiva de directoare. Fără argumente, elimină\n" +" directorul de sus din stivă, și trece la noul director de sus.\n" +" \n" +" Opțiuni:\n" +" -n\tSuprimă schimbarea normală a directorului atunci când se elimină\n" +" \t\tdirectoare la stivă, astfel încât numai stiva este manipulată.\n" +" \n" +" Argumente:\n" +" +N\tElimină intrarea a N-a numărând din stânga listei afișate\n" +" \t\tde «dirs», începând cu zero. De exemplu: «popd +0»\n" +" \t\telimină primul director, «popd +1» al doilea.\n" +" \n" +" -N\tElimină intrarea a N-a numărând din dreapta listei afișate\n" +" \t\tde «dirs», începând cu zero. De exemplu: «popd -0»\n" +" \t\telimină ultimul director, «popd -1» penultimul.\n" +" \n" +" Comanda internă «dirs» afișează stiva de directoare.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizat un argument\n" +" nevalid sau dacă schimbarea directorului eșuează." -#: builtins.c:1818 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help dirs», din «bash»; +# «bash -c "help dirs», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3830,32 +5945,63 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1847 +"Afișează stiva de directoare.\n" +" \n" +" Afișează lista directoarelor memorate în prezent. Directoarele\n" +" sunt adăugate la această listă cu comanda «pushd» și eliminate\n" +" cu comanda «popd».\n" +" \n" +" Opțiuni:\n" +" -c\tcurăță stiva de directoare ștergând toate elementele\n" +" -l\tnu afișează versiuni de directoare cu prefix „~” în raport \n" +" \t\tcu directorul dumneavoastră «acasă»\n" +" -p\tafișează stiva de directoare cu o intrare pe linie\n" +" -v\tafișează stiva de directoare cu o intrare pe linie, prefixată\n" +" \t\tcu poziția sa în stivă\n" +" \n" +" Argumente:\n" +" +N\tAfișează a N-a intrare numărând din stânga listei afișate\n" +" \t\tde «dirs» atunci când este invocată fără opțiuni, începând\n" +" \t\tcu zero.\n" +" \n" +" -N\tAfișează a N-a intrare numărând din dreapta listei afișate\n" +" \t\tde «dirs» atunci când este invocată fără opțiuni, începând\n" +" \t\tcu zero.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizată o opțiune\n" +" nevalidă sau apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help shopt», din «bash»; +# «bash -c "help shopt», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3868,8 +6014,32 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" - -#: builtins.c:1868 +"Activează sau dezactivează opțiunile de shell.\n" +" \n" +" Schimbă configurarea fiecărei opțiuni de shell NUME_OPȚIUNE. Fără\n" +" niciun argument de opțiune, listează fiecare NUME_OPȚIUNE furnizat, \n" +" sau toate opțiunile de shell dacă nu sunt date NUME_OPȚIUNE, cu o\n" +" indicație dacă fiecare este sau nu definită.\n" +" \n" +" Opțiuni:\n" +" -o\trestricționează NUME_OPȚIUNE la cele definite pentru a fi\n" +" \tutilizate cu «set -o»\n" +" -p\tafișează fiecare opțiune de shell cu o indicație a stării acesteia\n" +" -q\tsuprimă ieșirea\n" +" -s\tactivează (definește) fiecare NUME_OPȚIUNE\n" +" -u\tdezactivează (șterge) fiecare NUME_OPȚIUNE\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes dacă NUME_OPȚIUNE este activată; eșuează dacă\n" +" este dată o opțiune nevalidă sau NUME_OPȚIUNE este dezactivată." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help printf», din «bash»; +# «bash -c "help printf», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3877,83 +6047,169 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\n" +" Returns success unless an invalid option is given or a write or assignment\n" " error occurs." msgstr "" - -#: builtins.c:1895 +"Formatează și imprimă ARGUMENTELE sub controlul FORMATului.\n" +" \n" +" Opțiuni:\n" +" -v var\tasignează ieșirea variabilei shell VAR, în loc să o\n" +" \t\tafișeze la ieșirea standard\n" +" \n" +" FORMAT este un șir de caractere care conține trei tipuri de obiecte: \n" +" caractere simple, care sunt pur și simplu copiate la ieșirea standard; \n" +" secvențe de eludare de caractere, care sunt convertite și copiate la \n" +" ieșirea standard; și specificații de format, fiecare dintre acestea \n" +" determinând imprimarea următorului argument succesiv.\n" +" \n" +" În plus față de specificațiile de format standard descrise în printf(1),\n" +" «printf» interpretează:\n" +" \n" +" %b\texpandează secvențele de eludare de bară inversată,\n" +" \tîn argumentul corespunzător\n" +" %q\tcitează argumentul într-un mod care poate fi reutilizat\n" +" \tca intrare shell\n" +" %Q\tprecum %q, dar aplică orice precizie argumentului necitat\n" +" \t\tînainte de al cita\n" +" %(fmt)T\tafișează șirul dată-oră rezultat din utilizarea FMT,\n" +" \tca șir de format pentru strftime(3)\n" +" \n" +" Formatul este reutilizat după cum este necesar pentru a consuma toate\n" +" argumentele. Dacă există mai puține argumente decât necesită formatul,\n" +" specificațiile de format suplimentare se comportă ca și cum ar fi fost\n" +" furnizată o valoare zero sau un șir nul, după caz.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau apare o eroare de scriere sau de atribuire." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help complete», din «bash»; +# «bash -c "help complete», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1923 +"Specifică modul în care argumentele vor fi completate de Readline.\n" +" \n" +" Pentru fiecare NUME, specifică cum vor fi completate argumentele. Dacă\n" +" nu sunt furnizate opțiuni, specificațiile de completare existente sunt\n" +" imprimate într-un mod care să permită reutilizarea lor ca intrare\n" +" \n" +" Opțiuni:\n" +" -p\tafișează specificațiile de completare existente într-un format\n" +" \t\treutilizabil\n" +" -r\telimină o specificație de completare pentru fiecare NUME sau,\n" +" \t\tdacă nu sunt furnizate NUME, toate specificațiile de completare\n" +" -D\taplicați completările și acțiunile ca implicite pentru comenzi\n" +" \t\tfără nicio completare specifică definită\n" +" -E\taplică completările și acțiunile pentru comenzile „goale” --\n" +" \t\tcând se încearcă completarea într-o linie goală\n" +" -I\taplică completările și acțiunile la cuvântul inițial (de obicei\n" +" \t\tcomanda).\n" +" \n" +" Când se încearcă completarea, acțiunile sunt aplicate în ordinea în care\n" +" opțiunile cu litere mari sunt listate mai sus. Dacă sunt furnizate mai multe\n" +" opțiuni, opțiunea „-D” are prioritate față de „-E” și ambele au prioritate\n" +" față de opțiunea „-I”.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizată o opțiune\n" +" nevalidă sau apare o eroare." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help compgen», din «bash»; +# «bash -c "help compgen», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:2004 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" +" 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 "" +"Afișează posibilele completări în funcție de opțiuni.\n" +" \n" +" Aceasta este destinată să fie utilizată dintr-o funcție shell care generează\n" +" posibile completări. Dacă este furnizat argumentul opțional CUVÂNT, se\n" +" generează potriviri cu CUVÂNT.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizată o opțiune\n" +" nevalidă sau apare o eroare." -#: builtins.c:1938 +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help compopt», din «bash»; +# «bash -c "help compopt», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3969,2442 +6225,126 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" - -#: builtins.c:1968 +"Modifică sau afișează opțiunile de completare.\n" +" \n" +" Modifică opțiunile de completare pentru fiecare NUME sau, dacă nu sunt \n" +" furnizate NUME, completarea aflată în curs de executare. Dacă nu sunt \n" +" date OPȚIUNI, afișează opțiunile de completare pentru fiecare NUME sau \n" +" specificația de completare curentă.\n" +" \n" +" Opțiuni:\n" +" \t-o opțiune\n" +" \t\tStabilește opțiunea de completare OPȚIUNE pentru fiecare NUME\n" +" \t-D\tSchimbă opțiunile pentru completarea comenzii „implicite”.\n" +" \t-E\tSchimbă opțiunile pentru completarea comenzii „goale”.\n" +" \t-I\tSchimbă opțiunile de completare a cuvântului inițial\n" +" \n" +" Utilizarea lui „+o” în loc de „-o” dezactivează opțiunea specificată.\n" +" \n" +" Argumente:\n" +" \n" +" Fiecare NUME se referă la o comandă pentru care o specificație de completare\n" +" trebuie să fi fost definită anterior folosind comanda internă «complete». \n" +" Dacă nu sunt furnizate NUME, «compopt» trebuie să fie apelată de o funcție \n" +" care generează completări în acest moment și opțiunile pentru acest \n" +" generator de completare care se execută acum, sunt modificate.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este furnizată o opțiune \n" +" nevalidă sau NUME nu are o specificație de completare definită." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help mapfile», din «bash»; +# «bash -c "help mapfile», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" - -#: builtins.c:2001 +"Citește linii de la intrarea standard într-o variabilă matrice indexată.\n" +" \n" +" Citește linii de la intrarea standard în variabila matrice indexată MATRICE,\n" +" sau din descriptorul de fișier „FD” dacă este furnizată opțiunea „-u”.\n" +" Variabila MAPFILE este MATRICEA implicită.\n" +" \n" +" Opțiuni:\n" +" -d delim Utilizează DELIM pentru a termina liniile, în loc de linie nouă\n" +" -n număr Copiază cel mult NUMĂRul de rânduri. Dacă NUMĂR este 0,\n" +" toate liniile sunt copiate\n" +" -O origin Începe alocarea către MATRICE la indexul ORIGIN. Indicele\n" +" implicit este 0\n" +" -s count Renunță la primele COUNT rânduri citite\n" +" -t Elimină un DELIM final din fiecare linie citită (implicit,\n" +" linie nouă)\n" +" -u fd Citește linii din descriptorul de fișier „FD” în loc de la\n" +" intrarea standard\n" +" -C apelare\n" +" Evaluează APELARE de fiecare dată când sunt citite linii CANTITATE\n" +" -c cantitate\n" +" Specifică numărul de linii citite între fiecare apel către APELARE\n" +" \n" +" Argumente:\n" +" MATRICE\tNume variabilă matrice de utilizat pentru datele fișierului\n" +" \n" +" Dacă „-C” este furnizată fără „-c”, cantitatea implicită este 5000. Când se\n" +" evaluează APELARE, i se furnizează indexul următorului element din matrice\n" +" care urmează să fie atribuit și linia care urmează să fie atribuită\n" +" acelui element ca argumente suplimentare.\n" +" \n" +" Dacă nu este furnizat cu o origine explicită, «mapfile» va șterge MATRICE\n" +" înainte de a-o utiliza pentru asignare.\n" +" \n" +" Starea de ieșire:\n" +" Returnează succes, cu excepția cazului în care este dată o opțiune nevalidă\n" +" sau MATRICE este protejată la scriere sau nu este o matrice indexată." + +# R-GC, scrie: +# acest mesaj, poate să fie vizualizat, rulînd +# comanda: +# «help readarray», din «bash»; +# «bash -c "help array», din «bash», sau +# dintr-un shell, diferit de «bash». +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +"Citește linii dintr-un fișier într-o variabilă de tip matrice.\n" +" \n" +" Un sinonim pentru «mapfile»." -#~ 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 "" -#~ msgstr "" - -#~ 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 " -#~ msgstr "" -#~ "fiecare num�r de semnal. SIGNAL_SPEC este ori un nume de semnal din " -#~ "" - -#~ 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." +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: cheie de matrice asociativă nevalidă" diff --git a/po/ru.gmo b/po/ru.gmo index b5aeccf..ec59728 100644 Binary files a/po/ru.gmo and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po index 489635b..4cf2cbc 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1,476 +1,565 @@ -# 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. -# , 2006. +# GNU Bourne Again SHell. +# Copyright (C) 2002 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Ruslan Batdalov , 2002. +# Pavlo Marianov , 2014, 2018, 2020. # msgid "" msgstr "" -"Project-Id-Version: GNU bash 3.1-release\n" +"Project-Id-Version: bash 5.1\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 \n" -"Language-Team: Russian \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2021-02-17 11:04+0200\n" +"Last-Translator: Pavlo Marianov \n" +"Language-Team: Russian \n" +"Language: ru\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=KOI8-R\n" +"Content-Type: text/plain; charset=UTF-8\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" +"X-Bugs: Report translation errors to the Language-Team address.\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" +"X-Generator: Poedit 2.2.1\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "������������ ������ �������" +msgstr "неправильный индекс массива" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s: удаляется атрибут nameref" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s: ������������ ��� �����" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: не удаётся преобразовать индекс в ассоциативный массив" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "%s; �� ���� ��������� �� �������� ������" +msgstr "%s: не удаётся присвоить значение нечисловому индексу" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" msgstr "" +"%s: %s: необходимо использовать индекс при назначении ассоциативному массиву" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" -msgstr "%s: �� ���� �������: %s" +msgstr "%s: не удаётся создать файл: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" +msgstr "bash_execute_unix_command: не удаётся найти раскладку для команды" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "%s: ������ ������������ ������ �� `\"'" +msgstr "%s: первый непробельный символ не является «\"»" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "��� ������������ `%c' � %s" +msgstr "нет закрывающего «%c» в %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "%s: �������� ����������� ���������" +msgstr "%s: отсутствует разделитель-двоеточие" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: не удаётся отменить привязку в keymap команды" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "расширение скобки: не удаётся выделить память для %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "расширение скобки: не удалось выделить память для %u элементов" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "расширение скобки: не удалось выделить память для «%s»" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%s: ������������ ��� �����" +msgstr "«%s»: недопустимый псевдоним" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "редактирование строки не включено" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "" +msgstr "«%s»: недопустимое название раскладки" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, c-format msgid "%s: cannot read: %s" -msgstr "%s: �� ���� ���������: %s" - -#: builtins/bind.def:260 -#, c-format -msgid "`%s': cannot unbind" -msgstr "" +msgstr "%s: не удаётся прочитать файл: %s" -#: builtins/bind.def:295 builtins/bind.def:325 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "`%s': ��� ������� ����������" +msgstr "«%s»: неизвестное название функции" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "%s �� ��������� �� � ����� �� ������.\n" +msgstr "%s не привязан ни к какой клавише.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "%s ����� ���� ������ � �������" +msgstr "%s можно вызвать через " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: не удаётся отменить привязку" -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "" +msgstr "счётчик циклов" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "����� ����� ������ � ������ `for', `while', ��� `until'" +msgstr "имеет значение только для циклов «for», «while» или «until»" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Возвращает контекст вызова текущей подпрограммы.\n" +" \n" +" Если выражение не указано, возвращает «$line $filename».\n" +" Если выражение указано, возвращает «$line $subroutine $filename».\n" +" Эти дополнительные данные можно использовать для трассировки\n" +" стека.\n" +" \n" +" Значение выражения означает количество кадров, которое нужно\n" +" вызвать для возврата к текущему кадру. Первый кадр имеет номер 0.\n" +" " -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "���������� HOME �� �����������" +msgstr "Не задана переменная HOME" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "слишком много аргументов" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "нулевой каталог" + +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "���������� OLDPWD �� �����������" +msgstr "Не задана переменная OLDPWD" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "" +msgstr "строка %d: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "%s: ��������������:" +msgstr "предупреждение: " -#: builtins/common.c:153 -#, fuzzy, c-format +#: builtins/common.c:148 +#, c-format msgid "%s: usage: " -msgstr "%s: ��������������:" +msgstr "%s: использование: " -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "������� ����� ����������" - -#: builtins/common.c:191 shell.c:499 shell.c:782 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" -msgstr "%s: ����� ������� ���������" +msgstr "%s: для параметра требуется аргумент" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "%s: ��������� �������� ��������" +msgstr "%s: требуется числовой аргумент" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" -msgstr "%s: �� ������" +msgstr "%s: не найден" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" -msgstr "%s: ������������ �����" +msgstr "%s: недопустимый параметр" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" -msgstr "%s: ������������ ��� �����" +msgstr "%s: недопустимое название параметра" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "`%s': ������������ �������������" +msgstr "«%s»: это недопустимый идентификатор" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "������������ ����� �������" +msgstr "недопустимое восьмеричное число" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "������������ �����" +msgstr "недопустимое шестнадцатеричное число" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "������������ �����" +msgstr "недопустимое число" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "%s: ������������ ������������ �������" +msgstr "%s: недопустимое указание сигнала" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "`%s': �� ������������� �������� ��� ���������� ��� ������" +msgstr "«%s»: это не идентификатор процесса и не допустимый указатель задания" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s: ��������� ������ �� ������ ����������" +msgstr "%s: переменная только для чтения" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: не удаётся выполнить сброс" -#: builtins/common.c:272 +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" -msgstr "%s: %s ������� �� ������� ���������� ��������" +msgstr "%s: %s за пределами диапазона" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" -msgstr "��������" +msgstr "аргумент" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" -msgstr "%s ������� �� ������� ���������� ��������" +msgstr "%s за пределами диапазона" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "%s: �� ����� ������" +msgstr "%s: нет такого задания" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" -msgstr "" +msgstr "%s: нет управления заданиями" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" -msgstr "" +msgstr "нет управления заданиями" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" -msgstr "" +msgstr "%s: ограниченный режим" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" -msgstr "" +msgstr "ограниченный режим" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "%s: �� ��������� � ��������" +msgstr "%s: это не не встроенная команда bash" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" -msgstr "������ ������: %s" +msgstr "ошибка записи: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "ошибка назначения атрибутов терминала: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "ошибка получения атрибутов терминала: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "%s: ������ ��������� ������� ����������: %s: %s\n" +msgstr "%s: ошибка определения текущего каталога: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" -msgstr "" +msgstr "%s: неоднозначный указатель задания" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "справка отсутствует в этой версии" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не удаётся выполнить сброс: %s доступен только для чтения" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не удаётся выполнить сброс" -#: builtins/complete.def:276 +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "" +msgstr "%s: недопустимое название действия" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "" +msgstr "%s: нет определения завершения" #: builtins/complete.def:696 msgid "warning: -F option may not work as you expect" -msgstr "" +msgstr "предупреждение: параметр -F может работать не так, как ожидается" #: builtins/complete.def:698 msgid "warning: -C option may not work as you expect" -msgstr "" +msgstr "предупреждение: параметр -C может работать не так, как ожидается" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "сейчас не выполняет функцию завершения" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "����� ���� ������������ ������ � �������" +msgstr "можно использовать только внутри функции" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "" +msgstr "«-f» нельзя использовать для создания функций" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s: ��������� ������ �� ������ �������" +msgstr "%s: значение функции можно только считать" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: ссылочная переменная не может быть массивом" -#: builtins/declare.def:468 +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: переменные nameref, ссылающиеся сами на себя, не допускаются" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: круговая ссылка на имя" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: недопустимое название переменной для ссылки на имя" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "%s: �� ���� ������� ����������-������ ����� ��������" +msgstr "%s: переменные массива нельзя уничтожить таким образом" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: не удаётся преобразовать ассоциативный массив в индексированный" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: присвоение составного массива в кавычках устарело" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "" +msgstr "динамическая загрузка недоступна" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" -msgstr "" +msgstr "не удаётся открыть общий объект %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "" +msgstr "не удаётся найти %s в общем объекте %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: динамически встроенная команда уже загружена" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "загрузка функции %s завершилась ошибкой (%d): не загружена" -#: builtins/enable.def:459 +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "" +msgstr "%s: не загружается динамически" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, c-format msgid "%s: cannot delete: %s" -msgstr "%s: �� ���� �������: %s" +msgstr "%s: не удаётся удалить: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" -msgstr "%s: �������� �����������" +msgstr "%s: это каталог" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" -msgstr "%s: �� �������� ������� ������" +msgstr "%s: это не обычный файл" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "%s: ������� ������� ����" +msgstr "%s: файл слишком велик" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "%s: �� ���� ��������� �������� ����" +msgstr "%s: не удаётся запустить бинарный файл" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" -msgstr "%s: �� ���� ���������: %s" +msgstr "%s: не удаётся запустить: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" -msgstr "" +msgstr "выход\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "" -"�������� �� �������� ���������� ����� ����� � �������: ����������� `exit' " +msgstr "не командный процессор login: используйте «exit»" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "���� ���������������� ������.\n" +msgstr "Есть остановленные задания.\n" -#: builtins/exit.def:122 -#, fuzzy, c-format +#: builtins/exit.def:123 +#, c-format msgid "There are running jobs.\n" -msgstr "���� ���������������� ������.\n" +msgstr "Есть выполняемые задания.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "�� ����� ����� �������" +msgstr "команда не найдена" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "" +msgstr "указание журнала команд" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: �� ���� ������� ��������� ����: %s" +msgstr "%s: не удаётся открыть временный файл: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "текущий" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "" +msgstr "задание %d запущено без возможности управления" #: builtins/getopt.c:110 #, c-format msgid "%s: illegal option -- %c\n" -msgstr "%s: ������������ ����� -- %c\n" +msgstr "%s: недопустимый параметр — %c\n" #: builtins/getopt.c:111 #, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "" +msgstr "%s: для параметра требуется аргумент — %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "" +msgstr "хэширование отключено" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "" +msgstr "%s: таблица хэшей пустая\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "��������� �������: %s\n" +msgstr "вызовы\tкоманда\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "Команды, соответствующие ключевому слову «" +msgstr[1] "Команды, соответствующие ключевым словам «" +msgstr[2] "Команды, соответствующие ключевым словам «" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" -#: builtins/help.def:168 +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." msgstr "" +"нет разделов справки, соответствующих «%s». Попробуйте ввести «help help» " +"или «man -k %s» или «info %s»." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" -msgstr "%s: �� ���� �������: %s" +msgstr "%s: не удаётся открыть файл: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -481,117 +570,152 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" +"Показанные ниже команды определены внутри командного процессора. Чтобы " +"вывести полный список, введите «help».\n" +"Чтобы вывести справку по функции «name», введите «help name».\n" +"Чтобы вывести справку по командному процессору, введите «info bash».\n" +"Чтобы вывести справку по командам, которые отсутствуют в этом списке, " +"введите «man -k» или «info».\n" +"\n" +"Звёздочка (*) рядом с названием команды означает, что эта команда " +"отключена.\n" +"\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "" +msgstr "нельзя использовать больше одного параметра -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "" +msgstr "положение журнала команд" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: недопустимая метка времени" -#: builtins/history.def:365 +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" -msgstr "" +msgstr "%s: не удалось расширить журнал команд" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: ������������ ������" +msgstr "%s: ошибка inlib" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "" +msgstr "с параметром «-x» нельзя указывать другие параметры" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "" +msgstr "%s: аргументами должны быть идентификаторы процессов или заданий" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "����������� ������" +msgstr "Неизвестная ошибка" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "��������� ���������" +msgstr "ожидается выражение" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: �� ����������-������" +msgstr "%s: это не индексированный массив" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "%s: ������������ �������� ��������� �����������" +msgstr "%s: недопустимое указание дескриптора файла" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "%d: ������������ ���������� �����: %s" +msgstr "%d: invalid недопустимый дескриптор файла: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%s: ������������ �����" +msgstr "%s: недопустимое число строк" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%s: ������������ �����" +msgstr "%s: недопустимое начало массива" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "%s: ������������ �����" +msgstr "%s: недопустимый квант обратного вызова" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: �� ����������-������" +msgstr "пустое имя переменной массива" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "требуется поддержка переменных массива" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "`%s': �������� ������ ��������������" +msgstr "«%s»: отсутствует символ форматирования" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: недопустимое указание формата времени" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "%c': ������������ ������ ��������������" +msgstr "«%c»: недопустимый символ форматирования" -#: builtins/printf.def:578 -#, fuzzy, c-format +#: builtins/printf.def:734 +#, c-format msgid "warning: %s: %s" -msgstr "%s: ��������������:" +msgstr "предупреждение: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "ошибка анализа формата: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "" +msgstr "отсутствует шестнадцатеричная цифра для \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "отсутствует цифра Юникода для \\%c" -#: builtins/pushd.def:195 +#: builtins/pushd.def:199 msgid "no other directory" -msgstr "��� ������ ����������" +msgstr "отсутствует другой каталог" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: недопустимый аргумент" -#: builtins/pushd.def:462 +#: builtins/pushd.def:480 msgid "" -msgstr "" +msgstr "<отсутствует текущий каталог>" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "стек каталогов пуст" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "" +msgstr "индекс стека каталогов" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -614,8 +738,26 @@ msgid "" "by\n" "\tdirs when invoked without options, starting with zero." msgstr "" +"Выводит список запомненных на данный момент каталогов. Каталоги\n" +" помещаются в список командой «pushd». Для очистки\n" +" списка используется команда «popd».\n" +" \n" +" Параметры:\n" +" -c\tочистить стек каталогов, удалив из него все элементы\n" +" -l\tне выводить каталоги, начинающиеся с тильды (~),\n" +" \tкоторая означает домашний каталог\n" +" -p\tпоказать стек по одному каталогу в строке\n" +" -v\tпоказать стек по одному каталогу в строке\n" +" \tи с номером в стеке\n" +" \n" +" Аргументы:\n" +" +N\tпоказать N-ю запись слева в списке каталогов,\n" +" \tпоказанного при вызове без параметров, начиная с нуля.\n" +" \n" +" -N\tпоказать N-ю запись справа в списке каталогов,\n" +"\tпоказанного при вызове без параметров, начиная с нуля." -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -639,8 +781,30 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Добавляет каталог в начало стека каталогов или выполняет\n" +" ротацию стека, помещая в начало стека текущий рабочий\n" +" каталог. Если аргументы не указаны, меняет местами два первых " +"каталога.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при добавлении\n" +" \tкаталогов в стек, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tвыполняет ротацию стека, чтобы N-й каталог (слева\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" -N\tвыполняет ротацию стека, чтобы N-й каталог (справа\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" каталог\tдобавляет каталог в начало стека каталогов, делая его\n" +" \tновым текущим каталогом.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -660,1583 +824,1816 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"Удаляет записи из стека каталогов. Если аргументы не указаны,\n" +" удаляет первый каталог из стека и назначает новый первый каталог.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при удалении\n" +" \tкаталогов из стека, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tудаляет N-ю слева запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd +0»\n" +" \tудаляет первый каталог, а «popd +1» — второй каталог.\n" +" \n" +" -N\tудаляет N-ю справа запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd -0»\n" +" \tудаляет последний каталог, а «popd -1» — предпоследний каталог.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "" +msgstr "%s: недопустимое указание тайм-аута" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" -msgstr "������ ������: %d: %s" +msgstr "ошибка чтения: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "" +msgstr "возврат можно выполнить только из функции или исходного скрипта" -#: builtins/set.def:768 +#: builtins/set.def:869 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" +msgstr "нельзя одновременно сбросить функцию и переменную" -#: builtins/set.def:823 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" -msgstr "%s: �� ����������-������" +msgstr "%s: это не переменная массива" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" -msgstr "%s: �� �������" +msgstr "%s: это не функция" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не удаётся экспортировать" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "" +msgstr "счётчик смещений" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "" +msgstr "нельзя одновременно задать и сбросить параметры командного процессора" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "%s: ������������ ��� ����� ��������" +msgstr "%s: недопустимое название параметра командного процессора" #: builtins/source.def:128 msgid "filename argument required" -msgstr "��������� �������� ��� �����" +msgstr "требуется аргумент с именем файла" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" -msgstr "%s: ���� �� ������" +msgstr "%s: файл не найден" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "не удаётся приостановить" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "" +msgstr "не удаётся приостановить командный процессор login" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s — это псевдонимом для «%s»\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "%s �������� �������� ������ ��������\n" +msgstr "%s — это ключевое слово командного процессора\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" -msgstr "%s �������� ��������\n" +msgstr "%s — это функция\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s — это специальная встроенная команда bash\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s — это встроенная команда bash\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" -msgstr "" +msgstr "%s является %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "для %s вычислен хэш (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: недопустимый аргумент ограничения" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "`%c': ������ �������" +msgstr "«%c»: недопустимая команда" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" -msgstr "" +msgstr "%s: не удаётся получить ограничение: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" -msgstr "" +msgstr "ограничение" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" -msgstr "" +msgstr "%s: не удаётся изменить ограничение: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" -msgstr "����� � ������������ ������� ����������" +msgstr "восьмеричное число" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "«%c»: недопустимый оператор символьного режима" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "«%c»: недопустимый знак символьного режима" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " строка " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" -msgstr "��������� �������: %s\n" +msgstr "последняя команда: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "�������� ������..." +msgstr "Прерывание..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ИНФО: " + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "предупреждение: " + +#: error.c:488 msgid "unknown command error" -msgstr "����������� ������ �������" +msgstr "неизвестная ошибка команды" -#: error.c:407 +#: error.c:489 msgid "bad command type" -msgstr "" +msgstr "неверный тип команды" -#: error.c:408 +#: error.c:490 msgid "bad connector" -msgstr "" +msgstr "неверный соединитель" -#: error.c:409 +#: error.c:491 msgid "bad jump" -msgstr "" +msgstr "ошибка перехода" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "" +msgstr "%s: не заданы границы переменной" -#: eval.c:181 -#, c-format -msgid "timed out waiting for input: auto-logout\n" -msgstr "" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aпревышено время ожидания ввода: auto-logout\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "" +msgstr "не удаётся перенаправить стандартный ввод из /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "" +msgstr "TIMEFORMAT: «%c»: недопустимый символ форматирования" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] всё ещё существует" + +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "������ ������: %s" +msgstr "ошибка конвейера" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: достигнут максимальный уровень вложенности eval (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: достигнут максимальный уровень вложенности source (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: достигнут максимальный уровень вложенности функций (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" msgstr "" +"%s: ограниченный режим: в названиях команд нельзя использовать косую черту " +"«/»" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s: ������� �� �������" +msgstr "%s: команда не найдена" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: не удаётся запустить бинарный файл" -#: execute_cmd.c:4827 +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" -msgstr "%s: %s: ������ �������������" +msgstr "%s: %s: неверный интерпретатор" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: не удаётся запустить бинарный файл: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "«%s»: это специальная встроенная команда" -#: execute_cmd.c:4976 +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "�� ���� ����������� fd %d � fd %d" +msgstr "не удаётся скопировать файловый дескриптор %d в %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "" +msgstr "слишком много вложенных выражений" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" -msgstr "" +msgstr "отрицательное переполнение стека вложенных выражений" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "�������������� ������ � ���������" +msgstr "синтаксическая ошибка в выражении" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "������� ���������� ��-����������" +msgstr "значение можно присвоить только переменной" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "синтаксическая ошибка в назначении переменной" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "������� �� 0" +msgstr "деление на 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "" +msgstr "ошибка: недопустимый маркер присвоения выражения" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "" +msgstr "в условном выражении должен быть символ «:»" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" -msgstr "" +msgstr "экспонента меньше нуля" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "" +"после предварительного инкремента или декремента ожидается идентификатор " -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "�������� `)'" +msgstr "отсутствует символ «)»" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "������ ����������: ��������� �������" +msgstr "синтаксическая ошибка: ожидается операнд" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "" +msgstr "ошибка синтаксиса: недопустимый математический оператор" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "" +msgstr "%s%s%s: %s (неверный маркер «%s»)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "" +msgstr "недопустимое математическое основание" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "недопустимая целочисленная константа" + +#: expr.c:1603 msgid "value too great for base" -msgstr "" +msgstr "слишком большое значение для основания" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1652 +#, c-format msgid "%s: expression error\n" -msgstr "��������� ���������" +msgstr "%s: ошибка выражения\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "" +msgstr "getcwd: нет доступа к родительским каталогам" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6208 +#, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "�� ���� ����������� fd %d � fd %d" +msgstr "не удаётся сбросить режим nodelay для файлового дескриптора %d" -#: input.c:258 +#: input.c:266 #, c-format msgid "cannot allocate new file descriptor for bash input from fd %d" msgstr "" +"не удаётся выделить новый дескриптор для входных данных bash из файлового " +"дескриптора %d" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" -msgstr "" +msgstr "save_bash_input: у нового файлового дескриптора %d уже есть буфер" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: pgrp pipe" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" -msgstr "" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" -msgstr "" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "" +msgid "forked pid %d appears in running job %d" +msgstr "идентификатор дочернего процесса %d принадлежит запущенному заданию %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "удаление остановленного задания %d с группой процесса %ld" -#: jobs.c:1113 +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" msgstr "" +"add_process: процесс с идентификатором %5ld (%s) помечен как всё ещё активный" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" -msgstr "" +msgstr "describe_pid: %ld: нет процесса с таким идентификатором" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" -msgstr "" +msgstr "Сигнал %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "" +msgstr "Завершён" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "" +msgstr "Остановлен" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" -msgstr "" +msgstr "Остановлен (%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "" +msgstr "Запущен" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "" +msgstr "Завершён (%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "" +msgstr "Выход %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "" +msgstr "Состояние неизвестно" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "" +msgstr "(образ памяти сброшен на диск) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr "" +msgstr " (рабочий каталог: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" -msgstr "" +msgstr "дочерний setpgid (%ld к %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" msgstr "" +"wait: процесс %ld не является дочерним процессом этого командного процессора" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "" +msgstr "wait_for: нет записей процесса %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: задание %d остановлено" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: нет текущих заданий" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "" +msgstr "%s: выполнение задания прервано" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: задание %d уже выполняется в фоновом режиме" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" msgstr "" +"waitchld: включается WNOHANG, чтобы предотвратить появление неопределённого " +"блока" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "%s: ��������������:" +msgstr "%s: строка %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr "" +msgstr " (образ памяти сброшен на диск)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "" +msgstr "(рабочий каталог: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "" +msgstr "initialize_job_control: ошибка вызова getpgrp " + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: нельзя управлять заданиями в фоновом режиме" -#: jobs.c:3639 +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "" +msgstr "initialize_job_control: дисциплина строки" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "не удаётся задать группу процесса терминала (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "" +msgstr "этот командный процессор не может управлять заданиями" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "" +msgstr "malloc: ошибка утверждения: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" +"\\r\n" +"malloc: %s:%d: утверждение не удалось\\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "%s: ���� ����������" +msgstr "неизвестно" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" +msgstr "malloc: блок в списке свободных затёрт" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" +msgstr "free: вызван с аргументом уже освобождённого блока" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "" +msgstr "free: вызван с аргументом невыделенного блока" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "" +"free: обнаружено отрицательное переполнение; mh_nbytes байт за пределами " +"диапазона" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: обнаружено отрицательное переполнение; magic8 повреждён" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "" +msgstr "free: размеры начального и конечного блока отличаются" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "" +msgstr "realloc: вызван с аргументом невыделенного блока" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "" +"realloc: обнаружено отрицательное переполнение; mh_nbytes байт за пределами " +"диапазона" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: обнаружено отрицательное переполнение; magic8 повреждён" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" +msgstr "realloc: размеры начального и конечного блока отличаются" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" +msgstr "register_alloc: таблица выделения заполнена записями FIND_ALLOC?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "" +msgstr "register_alloc: %p уже есть в таблице как выделенный?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "" +msgstr "register_free: %p уже есть в таблице как свободный?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "" +msgstr "недопустимое основание" #: lib/sh/netopen.c:168 #, c-format msgid "%s: host unknown" -msgstr "%s: ���� ����������" +msgstr "%s: узел неизвестен" #: lib/sh/netopen.c:175 #, c-format msgid "%s: invalid service" -msgstr "%s: ������������ ������" +msgstr "%s: недопустимая служба" #: lib/sh/netopen.c:306 #, c-format msgid "%s: bad network path specification" -msgstr "" +msgstr "%s: недопустимое указание сетевого пути" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "" +msgstr "сетевые операции не поддерживаются" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: не удаётся изменить язык (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: не удаётся изменить язык (%s): %s" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: %s: не удаётся изменить язык (%s)" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: %s: не удаётся изменить язык (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" -msgstr "� ��� ���� ����� � $_" +msgstr "Для вас есть почта в $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" -msgstr "� ��� ���� ����� ����� � $_" +msgstr "Для вас есть почта в $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" -msgstr "����� � %s ���� ���������\n" +msgstr "Сообщения в %s были прочитаны\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "" +msgstr "синтаксическая ошибка: требуется математическое выражение" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "������ ����������: `;' �� ���������" +msgstr "синтаксическая ошибка: ожидается «;»" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "������ ����������: `((%s))'" +msgstr "синтаксическая ошибка: «((%s))»" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "" +msgstr "make_here_document: недопустимый тип инструкции %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" msgstr "" +"блок here-document в строке %d разделён знаком конца файла (ожидался «%s»)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" msgstr "" +"make_redirection: инструкция перенаправления «%d» вышла за пределы диапазона" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 #, c-format -msgid "unexpected EOF while looking for matching `%c'" +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" msgstr "" +"shell_getc: shell_input_line_size (%zu) превысил SIZE_MAX (%lu): строка " +"обрезана" -#: parse.y:3951 +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "достигнуто максимальное число переменных here-document" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "неожиданный конец файла во время поиска «%c»" + +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "" +msgstr "неожиданный конец файла во время поиска «]]»" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "" +msgstr "синтаксическая ошибка в условном выражении: неожиданный маркер «%s»" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "" +msgstr "синтаксическая ошибка в условном выражении" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "" +msgstr "неожиданный маркер «%s», ожидался «)»" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" -msgstr "�������� `)'" +msgstr "ожидается символ «)»" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "" +msgstr "неожиданный аргумент «%s» для условного унарного оператора" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" -msgstr "" +msgstr "неожиданный аргумент для условного унарного оператора" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "" +msgstr "неожиданный маркер «%s», ожидается условный бинарный оператор" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "" +msgstr "ожидается условный бинарный оператор" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "" +msgstr "неожиданный аргумент «%s» для условного бинарного оператора" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" -msgstr "" +msgstr "неожиданный аргумент для условного бинарного оператора" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" -msgstr "" +msgstr "неожиданный маркер «%c» в условной команде" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" -msgstr "" +msgstr "неожиданный маркер «%s» в условной команде" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" -msgstr "" +msgstr "неожиданный маркер %d в условной команде" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "" +msgstr "синтаксическая ошибка рядом с неожиданным маркером «%s»" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "������ ���������� ����� `%s'" +msgstr "синтаксическая ошибка рядом с «%s»" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "������ ����������: ����������� ����� �����" +msgstr "синтаксическая ошибка: неожиданный конец файла" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" -msgstr "������ ����������" +msgstr "синтаксическая ошибка" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "����������� \"%s\", ����� ����������� ������ � ���������.\n" +msgstr "Для выхода из командного процессора используйте «%s».\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "" +msgstr "неожиданный конец файла во время поиска «)»" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "" +msgstr "completion: функция «%s» не найдена" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: возможен бесконечный цикл повторов" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" +msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "" +msgstr "print_command: неверный соединитель «%d»" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: ������������ ���������� �����: %s" +msgstr "xtrace_set: %d: недопустимый идентификатор файла" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: пустой указатель на файл" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf: «%c»: недопустимый символ форматирования" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "�������� ���������� �� ��������� ����������� ���������" +msgstr "файловый дескриптор за пределами диапазона" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" -msgstr "" +msgstr "%s: неоднозначное перенаправление" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: �� ���� ���������� ��� ������������ ����" +msgstr "%s: не удаётся перезаписать существующий файл" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" -msgstr "" +msgstr "%s: ограниченный режим: не удаётся перенаправить вывод" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" -msgstr "" +msgstr "не удаётся создать временный файл для блока here-document: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: �� ����������-������" +msgstr "%s: не удаётся присвоить файловый дескриптор переменной" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "" +msgstr "/dev/(tcp|udp)/host/port не поддерживается без сети" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "������ ���������������: �� ���� ����������� fd" +msgstr "ошибка перенаправления: не удаётся создать копию файлового дескриптора" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "�� ���� ����� /tmp, ���������� ��������!" +msgstr "не удалось найти /tmp; создайте этот каталог" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "/tmp ������ ���� �������������� ������ ����������" +msgstr "/tmp должен быть допустимым названием каталога" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "режим печати игнорируется в интерактивных командных процессорах" -#: shell.c:884 +#: shell.c:972 #, c-format msgid "%c%c: invalid option" -msgstr "%c%c: ������������ �����" +msgstr "%c%c: недопустимый параметр" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "не удаётся установить UID %d: эффективный UID %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "не удаётся установить GID %d: эффективный GID %d" -#: shell.c:1651 +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "не удаётся запустить отладчик: режим отладки отключён" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: это каталог" + +#: shell.c:1907 msgid "I have no name!" -msgstr "� ���� ��� �����!" +msgstr "Не удаётся определить название" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "" +msgstr "GNU bash, версия %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"Использование:\t%s [длинные параметры GNU] [параметры] ...\n" +"\t\t%s [длинные параметры GNU] [параметры] файл_скрипта ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "������� ����� � ����� GNU:\n" +msgstr "Длинные параметры GNU:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "����� ��������:\n" +msgstr "Параметры командного процессора:\n" -#: shell.c:1801 -msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" msgstr "" +"\t-irsD или -c команда или -O короткие_параметры\t\t(только при запуске)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s ��� ����� -o\n" +msgstr "\t-%s или -o параметр\n" -#: shell.c:1822 +#: shell.c:2094 #, c-format msgid "Type `%s -c \"help set\"' for more information about shell options.\n" msgstr "" +"Для получения дополнительных сведений о параметрах командного процессора " +"введите «%s -c \"help set\"».\n" -#: shell.c:1823 +#: shell.c:2095 #, c-format msgid "Type `%s -c help' for more information about shell builtin commands.\n" msgstr "" +"Для получения дополнительных сведений о встроенных командах введите «%s -c " +"help».\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Для отправки сообщений об ошибках используйте команду «bashbug».\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Домашняя страница bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" msgstr "" +"Общая справка по использованию программ GNU: \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "" +msgstr "sigprocmask: %d: недопустимая операция" #: siglist.c:48 msgid "Bogus signal" -msgstr "" +msgstr "Фиктивный сигнал" #: siglist.c:51 msgid "Hangup" -msgstr "" +msgstr "Отбой" #: siglist.c:55 msgid "Interrupt" -msgstr "" +msgstr "Прерывание" #: siglist.c:59 msgid "Quit" -msgstr "" +msgstr "Выход" #: siglist.c:63 msgid "Illegal instruction" -msgstr "" +msgstr "Недопустимая инструкция" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "" +msgstr "Трасса/ловушка BPT" #: siglist.c:75 msgid "ABORT instruction" -msgstr "" +msgstr "Инструкция ABORT" #: siglist.c:79 msgid "EMT instruction" -msgstr "" +msgstr "Инструкция EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "" +msgstr "Исключение при обработке чисел с плавающей точкой" #: siglist.c:87 msgid "Killed" -msgstr "" +msgstr "Убит" #: siglist.c:91 -#, fuzzy msgid "Bus error" -msgstr "������ ����������" +msgstr "Ошибка шины" #: siglist.c:95 msgid "Segmentation fault" -msgstr "" +msgstr "Ошибка сегментации" #: siglist.c:99 msgid "Bad system call" -msgstr "" +msgstr "Неверный системный вызов" #: siglist.c:103 msgid "Broken pipe" -msgstr "" +msgstr "Конвейер не работает" #: siglist.c:107 msgid "Alarm clock" -msgstr "" +msgstr "Сигнал часов" #: siglist.c:111 msgid "Terminated" -msgstr "" +msgstr "Прерван" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "" +msgstr "Срочное событие ввода/вывода" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "" +msgstr "Остановлен (сигналом)" #: siglist.c:127 msgid "Continue" -msgstr "" +msgstr "Продолжение" #: siglist.c:135 msgid "Child death or stop" -msgstr "" +msgstr "Смерть или остановка дочернего процесса" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "" +msgstr "Остановлен (ввод с tty)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "" +msgstr "Остановлен (вывод на tty)" #: siglist.c:147 msgid "I/O ready" -msgstr "" +msgstr "Готов к вводу/выводу" #: siglist.c:151 msgid "CPU limit" -msgstr "" +msgstr "Ограничение ЦП" #: siglist.c:155 msgid "File limit" -msgstr "" +msgstr "Ограничение величины файла" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "" +msgstr "Сигнал часов (виртуальный)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "" +msgstr "Сигнал часов (профиль)" #: siglist.c:167 msgid "Window changed" -msgstr "" +msgstr "Окно изменено" #: siglist.c:171 msgid "Record lock" -msgstr "" +msgstr "Запись блокирована" #: siglist.c:175 msgid "User signal 1" -msgstr "" +msgstr "Сигнал пользователя 1" #: siglist.c:179 msgid "User signal 2" -msgstr "" +msgstr "Сигнал пользователя 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "" +msgstr "Ожидание входных данных HFT" #: siglist.c:187 msgid "power failure imminent" -msgstr "" +msgstr "неизбежна ошибка питания" #: siglist.c:191 msgid "system crash imminent" -msgstr "" +msgstr "неизбежно падение системы" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "" +msgstr "процесс переносится на другой ЦП" #: siglist.c:199 msgid "programming error" -msgstr "" +msgstr "программная ошибка" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "" +msgstr "Установлен режим монитора HFT" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "" +msgstr "Выход из режима монитора HFT" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "" +msgstr "Последовательность звуков HFT завершена" #: siglist.c:215 msgid "Information request" -msgstr "" - -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" +msgstr "Информационный запрос" -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "" +msgstr "Неизвестный номер сигнала %d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "" +msgstr "неверная подстановка: нет закрывающей «%s» в %s" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "" +msgstr "%s: не удаётся присвоить список элементу массива" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "" +msgstr "не удаётся создать конвейер для подстановки процесса" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "" +msgstr "не удаётся создать дочерний процесс для подстановки" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" -msgstr "�� ���� ������� ������� ����� %s ��� ������" +msgstr "не удаётся открыть именованный конвейер %s для чтения" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "�� ���� ������� ������� ����� %s ��� ������" +msgstr "не удаётся открыть именованный конвейер %s для записи" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" msgstr "" +"не удаётся скопировать именованный конвейер %s в файловый дескриптор %d" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "подстановка команды: во входных данных проигнорирован нулевой байт" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "" +msgstr "не удаётся создать конвейер для подстановки команды" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "" +msgstr "не удаётся создать дочерний процесс для подстановки команды" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "" +"command_substitute: не удаётся скопировать конвейер в файловый дескриптор 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: недопустимое название переменной для ссылки на имя" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: недопустимое непрямое раскрытие" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: недопустимое имя переменной" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: параметр не задан" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: �������� null ��� �� ����������" +msgstr "%s: параметр не задан или пустой" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "" +msgstr "%s: заданное подстрокой выражение меньше нуля" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "" +msgstr "%s: недопустимая подстановка" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "" +msgstr "$%s: такое присвоение невозможно" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"в будущих версиях командный процессор оценка будет выполняться как " +"математическая подстановка" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10795 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "��� ������������ `%c' � %s" +msgstr "неверная подстановка: нет закрывающей «`» в %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "��� ���������� �: %s" +msgstr "нет совпадений: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "�������������� ��� ����� ����������� ��������" +msgstr "ожидается аргумент" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "" +msgstr "%s: ожидается целочисленное выражение" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "��������� `)' " +msgstr "ожидается символ «)»" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "�������� `)', ������ %s" +msgstr "ожидается символ «)», обнаружено %s" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" -msgstr "%s: ��������� ������������� �������� ���������" +msgid "%s: binary operator expected" +msgstr "%s: ожидается бинарный оператор" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" -msgstr "%s: ��������� ������������� ��������� ���������" +msgid "%s: unary operator expected" +msgstr "%s: ожидается унарный оператор" -#: test.c:811 +#: test.c:896 msgid "missing `]'" -msgstr "�������� `]'" +msgstr "отсутствует символ «]»" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "синтаксическая ошибка: неожиданный «%s»" -#: trap.c:203 +#: trap.c:220 msgid "invalid signal number" -msgstr "������������ ����� �������" +msgstr "недопустимый номер сигнала" -#: trap.c:327 +#: trap.c:323 #, c-format -msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgid "trap handler: maximum trap handler level exceeded (%d)" msgstr "" +"обработка ловушек: достигнут максимальный уровень вложенности обработки " +"ловушек (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: неверное значение в trap_list[%d]: %p" -#: trap.c:331 +#: trap.c:416 #, c-format msgid "" "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" msgstr "" +"run_pending_traps: обработчик сигнала — SIG_DFL; повторная отправка %d (%s) " +"самому себе" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" -msgstr "" +msgstr "trap_handler: неверный сигнал %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "" +msgstr "ошибка импорта определения функции для «%s»" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "слишком высокий уровень командного процессора (%d); сбрасывается до 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: в текущей области отсутствует контекст функции" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: переменной не может быть присвоено значение" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" msgstr "" -#: variables.c:3159 +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: целое числе присваивается ссылке на имя" + +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: в текущей области отсутствует контекст функции" -#: variables.c:3376 -#, fuzzy, c-format +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: �������� null ��� �� ����������" +msgstr "%s имеет пустую exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "недопустимый символ %d в exportstr для %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "отсутствует «=» в exportstr для %s" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" msgstr "" +"pop_var_context: заголовок shell_variables не является контекстом функции" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: отсутствует контекст global_variables" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" msgstr "" +"pop_scope: заголовок shell_variables не является областью временного " +"окружения" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: �� ���� �������: %s" +msgstr "%s: %s: не удаётся открыть как ФАЙЛ" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: ������������ ���������� �����: %s" +msgstr "%s: %s: недопустимое значение для дескриптора файла трассировки" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "" +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: значение совместимости за пределами диапазона" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "© Free Software Foundation, Inc, 2020." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" +"Лицензия GPLv3+: GNU GPL версии 3 или более поздней \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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 "" +msgstr "GNU bash, версия %s (%s)\n" -#: 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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." msgstr "" +"Это свободное программное обеспечение. Вы можете изменять и распространять " +"его." -#: version2.c:87 -#, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "НИКАКАЯ ГАРАНТИЯ не предоставляется в пределах, допускаемых законом." -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" +msgstr "%s: не удаётся выделить %lu байт (выделено %lu байт)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "%s: �� ���� �������: %s" +msgstr "%s: не удаётся выделить %lu байт" -#: xmalloc.c:163 +#: xmalloc.c:165 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" +msgstr "%s: %s:%d: не удаётся выделить %lu байт (выделено %lu байт)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "%s: �� ���� �������: %s" +msgstr "%s: %s:%d: не удаётся выделить %lu байт" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "" +msgstr "alias [-p] [имя[=значение] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "" +msgstr "unalias [-a] имя [имя ...]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" "x keyseq:shell-command] [keyseq:readline-function or readline-command]" msgstr "" +"bind [-lpvsPSVX] [-m раскладка] [-f файл] [-q имя] [-u name] [-r " +"послед_клавиш] [-x послед_клавиш:команда_shell] [послед_клавиш:фнкц_readline " +"или команда_readline]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" -msgstr "" +msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "" +msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "" +msgstr "builtin [встр_команда [аргумент ...]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" +msgstr "caller [выражение]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [каталог]" #: 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 "" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "" +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] команда [аргумент ...]" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "" +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [имя[=значение] ...]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] имя[=значение] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "" +msgstr "local [параметр] имя[=значение] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "" +msgstr "echo [-neE] [аргумент ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" -msgstr "" +msgstr "echo [-n] [аргумент ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" +msgstr "enable [-a] [-dnps] [-f файл] [имя ...]" -#: builtins.c:92 +#: builtins.c:94 msgid "eval [arg ...]" -msgstr "" - -#: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "" +msgstr "eval [аргумент ...]" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "" +msgid "getopts optstring name [arg ...]" +msgstr "getopts строка_параметров имя [аргумент ...]" #: builtins.c:98 -msgid "exit [n]" -msgstr "" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a имя] [команда [аргумент ...]] [перенаправление ...]" #: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 msgid "logout [n]" -msgstr "" +msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" msgstr "" +"fc [-e редактор] [-lnr] [первая] [последняя] или fc -s [шаблон=замена] " +"[команда]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "" +msgstr "fg [задание]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "" +msgstr "bg [задание ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "" +msgstr "hash [-lr] [-p путь] [-dt] [имя ...]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "" +msgstr "help [-dms] [шаблон ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" msgstr "" +"history [-c] [-d смещение] [n] или history -anrw [файл] или history -ps " +"аргумент [аргумент...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "" +msgstr "jobs [-lnprs] [задание ...] или jobs -x команда [аргументы]" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [задание ... | pid ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" msgstr "" +"kill [-s назв_сигнала | -n номер_сигнала | -назв_сигнала] ид_процесса | " +"назв_задания] ... или kill -l [назв_сигнала]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" -msgstr "" +msgstr "let аргумент [аргумент ...]" -#: builtins.c:136 +#: builtins.c:138 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 "" +"read [-ers] [-a массив] [-d разделитель] [-i текст] [-n число_символов] [-N " +"число_символов] [-p приглашение] [-t тайм-аут] [-u fd] [имя ...]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o параметр] [--] [аргумент ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [имя ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [имя[=значение ...] или export -p" #: builtins.c:148 -msgid "shift [n]" -msgstr "" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [имя[=значение] ...] или readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "��������� �������� ��� �����" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source файл [аргументы]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr "��������� �������� ��� �����" +msgstr ". файл [аргументы]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" -msgstr "" - -#: builtins.c:158 -msgid "test [expr]" -msgstr "" +msgstr "suspend [-f]" #: builtins.c:160 -msgid "[ arg... ]" -msgstr "" +msgid "test [expr]" +msgstr "test [выражение]" #: builtins.c:162 -msgid "times" -msgstr "" +msgid "[ arg... ]" +msgstr "[ аргумент... ]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "" +msgstr "trap [-lp] [[аргумент] сигнал ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "" +msgstr "type [-afptP] имя [имя ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [ограничение]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "" +msgstr "umask [-p] [-S] [режим]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p переменная] [идентификатор ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [идентификатор ...]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "" +msgstr "for ИМЯ [in СЛОВА... ;] do КОМАНДЫ; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "" +msgstr "for (( выраж1; выраж2; выраж3 )); do КОМАНДЫ; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "" +msgstr "select ИМЯ [in СЛОВА ... ;] do КОМАНДЫ; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" -msgstr "" +msgstr "time [-p] конвейер" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "" +msgstr "case СЛОВО in [ШАБЛОН [| ШАБЛОН]...) КОМАНДЫ ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" msgstr "" - -#: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "" +"if КОМАНДЫ; then КОМАНДЫ; [ elif КОМАНДЫ; then КОМАНДЫ; ]... [ else " +"КОМАНДЫ; ] fi" #: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "" +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while КОМАНДЫ; do КОМАНДЫ; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until КОМАНДЫ; do КОМАНДЫ; done" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [ИМЯ] команда [перенаправления]" #: builtins.c:202 -msgid "{ COMMANDS ; }" -msgstr "" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function ИМЯ { КОМАНДЫ ; } или ИМЯ () { КОМАНДЫ ; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "" +msgid "{ COMMANDS ; }" +msgstr "{ КОМАНДЫ ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "��������� ���������" +msgid "job_spec [&]" +msgstr "задание [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "��������� ���������" +msgid "(( expression ))" +msgstr "(( выражение ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ выражение ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "" +"переменные — имена и значения некоторых переменных командного процессора" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "" +msgstr "pushd [-n] [+N | -N | каталог]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" -msgstr "" +msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "" +msgstr "shopt [-pqsu] [-o] [параметр ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +msgstr "printf [-v переменная] формат [аргументы]" -#: builtins.c:229 +#: builtins.c:231 msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-" +"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " "suffix] [name ...]" msgstr "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-o параметр] [-A действие] [-G " +"глоб_шаблон] [-W список_слов] [-F функция] [-C команда] [-X фильтр_шабл] [-P " +"префикс] [-S суффикс] [имя ...]" -#: builtins.c:233 +#: builtins.c:235 msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 параметр] [-A действие] [-G глоб_шабл] [-W " +"список_слов] [-F функция] [-C команда] [-X фильтр_шабл] [-P префикс] [-S " +"суффикс] [слово]" -#: builtins.c:237 -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o параметр] [-DEI] [имя ...]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"mapfile [-d разделитель] [-n число] [-O начало] [-s число] [-t] [-u fd] [-C " +"callback] [-c quantum] [массив]" -#: builtins.c:242 +#: builtins.c:244 msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" msgstr "" +"readarray [-d разделитель] [-n число] [-O начало] [-s число] [-t] [-u fd] [-" +"C callback] [-c quantum] [массив]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2248,25 +2645,48 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" \n" +" Если не указать аргументы, alias выводит список псевдонимов\n" +" в виде «alias имя=значение» на стандартный вывод.\n" +" \n" +" В противном случае каждому имени, для которого указано значение,\n" +" назначается псевдоним. Если значение в конце содержит пробел,\n" +" следующее слово будет проверяться на замену псевдонима при его\n" +" развёртывании.\n" +" \n" +" Параметры:\n" +" -p\tвыводит все определённые псевдонимы\n" +" \n" +" Состояние выхода:\n" +" alias возвращает истину, если для указанного имени был задан\n" +" псевдоним." -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" +"Удаляет все имена из списка определённых псевдонимов.\n" +" \n" +" Параметры:\n" +" -a\tудаляет все псевдонимы\n" +" \n" +" Возвращает успех, если имя связано с существующим псевдонимом." -#: builtins.c:289 +#: builtins.c:291 +#, fuzzy msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2300,12 +2720,57 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" - -#: builtins.c:326 +"Определение привязок клавиш и переменных readline.\n" +" \n" +" Привязывает последовательность клавиш функции readline или макросу\n" +" или задаёт переменную readline. Синтаксис аргументов без параметров " +"аналогичен\n" +" синтаксису файла ~/.inputrc, но всё должно передаваться в одном " +"аргументе,\n" +" например bind '\"\\C-x\\C-r\": перечитать-init-файл'.\n" +" \n" +" Параметры:\n" +" -m раскладка использовать указанную раскладку во время " +"выполнения\n" +" данной команды. Допустимые раскладки: emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command и vi-insert.\n" +" -l вывести названия функций\n" +" -P вывести названия функций и их привязки\n" +" -p вывести функции и их привязки в формате\n" +" для повторного использования\n" +" -S вывести список последовательностей клавиш, которые\n" +" вызывают макросы, и их значения\n" +" -s вывести список последовательностей клавиш, которые\n" +" вызывают макросы, и их значения\n" +" в формате для повторного использования\n" +" -V вывести названия переменных и их значения\n" +" -v вывести имена переменных и их значения\n" +" в формате для повторного использования\n" +" -q имя_функции\t вывести клавиши, вызывающие указанную функцию\n" +" -u имя_функции отвязать все клавиши, привязанные к указанной " +"функции\n" +" -r посл-клавиш удалить привязку для последовательности клавиш\n" +" -f файл прочитать привязки из файла\n" +" -x посл-клавиш:кмнд-shell выполнить команду bash, если введена\n" +" \t\t\t\tпоследовательность клавиш\n" +" -X\t\t вывести последовательности клавиш, привязанные с помощью -" +"x, и связанные команды\n" +" в формате для повторного использования\n" +" \n" +" Состояние выхода:\n" +" bind возвращает 0, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2315,8 +2780,16 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"Прерывание цикла for, while или until.\n" +" \n" +" Прерывает цикл for, while или until. Если указано N, прерывает N " +"вложенных\n" +" циклов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если N не больше или равно 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2326,8 +2799,16 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"Возобновление цикла for, while или until.\n" +" \n" +" Возобновляет следующую итерацию вложенного цикла for, while или until.\n" +" Если указано N, возобновляет N-й вложенный цикл.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если N не больше или равно 1." -#: builtins.c:350 +#: builtins.c:354 +#, fuzzy msgid "" "Execute shell builtins.\n" " \n" @@ -2338,10 +2819,22 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" +"Выполнение встроенных команд.\n" +" \n" +" Выполняет встроенную команду bash с аргументами\n" +" без поиска команды. Это полезно, если нужно переопределить встроенную " +"команду\n" +" как функцию командного процессора, в этой функции нужно выполнить " +"встроенную команду.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода встроенной команды или ложь, если указанная " +"команда bash\n" +" не является встроенной." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2356,8 +2849,23 @@ msgid "" " 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.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если командный процессор не выполняет функцию, или " +"выражение\n" +" является допустимым." -#: builtins.c:383 +#: builtins.c:387 +#, fuzzy msgid "" "Change the shell working directory.\n" " \n" @@ -2380,23 +2888,77 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." -msgstr "" - -#: builtins.c:411 +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Смена рабочего каталога командного процессора.\n" +" \n" +" Изменяет текущий каталог на указанный каталог. Каталог по умолчанию " +"хранится в\n" +" переменной $HOME командного процессора.\n" +" \n" +" Переменная $CDPATH определяет путь поиска каталога, содержащего\n" +" указанный каталог. Альтернативные каталоги в $CDPATH разделяются " +"двоеточием (:).\n" +" Пустое название каталога соответствует текущему каталогу. Если каталог " +"начинается\n" +" с косой черты (/), переменная $CDPATH не используется.\n" +" \n" +" Если каталог не найден и задан параметр «cdable_vars»,\n" +" слово считается названием переменной. Если эта переменная содержит " +"значение,\n" +" оно используется для каталога.\n" +" \n" +" Параметры:\n" +" -L\tпереходить по символьным ссылкам: ссылки раскрываются \n" +" \tв каталоге после обработки экземпляров «..»\n" +" -P\tиспользовать физическую структуру каталогов без перехода\n" +" \tпо символьным ссылкам: ссылки раскрываются в каталоге до\n" +" \tобработки «..»\n" +" -e\tесли указан параметр -P, и не удаётся определить текущий\n" +" \tрабочий каталог, команда завершается с ненулевым состоянием\n" +" -@ на системах, которые это поддерживают, представляет файл с " +"расширенными\n" +" атрибутами как каталог, содержащий атрибуты файла\n" +" \n" +" По умолчанию выполняется переход по символьным ссылкам (как при указании " +"параметра «-L»).\n" +" «..» обрабатывается путём удаления первого компонента пути до косой " +"черты\n" +" или из начала каталога.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если каталог был изменён, и если $PWD был успешно " +"установлен\n" +" при использовании параметра -P. В противном случае возвращается " +"ненулевое состояние." + +#: builtins.c:425 +#, fuzzy 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2405,9 +2967,20 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Вывод названия текущего рабочего каталога.\n" +" \n" +" Параметры:\n" +" -L\tпоказать значение $PWD, если переменная указывает на\n" +" \tтекущий рабочий каталог\n" +" -P\tпоказать название физического каталога без символьных ссылок\n" +" \n" +" По умолчанию pwd работает, как если бы «-L» не был указан.\n" +" \n" +" Состояние выхода:\n" +" Возвращает 0, если был указан допустимый параметр или можно прочитать\n" +" текущий каталог." -#: builtins.c:428 -#, fuzzy +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2416,27 +2989,39 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" -" ��� ������-���� �������; ������� ������ �� ������. ���� ������������ � " -"�������� ����������." +"Пустая команда.\n" +" \n" +" Команда не выполняет никаких действий и ни на что не влияет.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает успех." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Возвращает результат успешного выполнения.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает успех." -#: builtins.c:448 -#, fuzzy +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." -msgstr "���������� ���������: �������." +msgstr "" +"Возвращает результат неудачного выполнения.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает ошибку." -#: builtins.c:457 +#: builtins.c:471 +#, fuzzy msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2446,16 +3031,34 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Выполнение простой команды или вывод информации о командах.\n" +" \n" +" Выполняет команду с аргументами без поиска функции командного " +"процессора\n" +" или выводит информацию об указанных командах. Можно использовать для " +"вызова команд\n" +" с диска, когда функция с таким именем уже существует.\n" +" \n" +" Параметры:\n" +" -p\tиспользовать значение по умолчанию для $PATH, чтобы " +"гарантированно\n" +" \tнайти все стандартные команды\n" +" -v\tвывести описание команды аналогично встроенной команде «type»\n" +" -V\tвывести более подробное описание каждой команды\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода КОМАНДЫ или ошибку, если КОМАНДА не найдена." -#: builtins.c:476 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2465,17 +3068,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2485,20 +3093,65 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." -msgstr "" - -#: builtins.c:512 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Указание значений переменных и атрибутов.\n" +" \n" +" Объявление переменных и назначение им атрибутов. Если имена не " +"указаны,\n" +" выводит атрибуты и значения всех переменных.\n" +" \n" +" Параметры:\n" +" -f\tограничить действие или вывести имена функций и их определения\n" +" -F\tвывести только имена функций (а также номер строки\n" +" \tв исходном файле при отладке)\n" +" -g\tсоздать глобальные переменные при использовании в функции " +"командного процессора; в противном случае\n" +" \tигнорируется\n" +" -p\tвывести атрибуты и значения каждого имени\n" +" \n" +" Параметры, задающие атрибуты:\n" +" -a\tсделать имена индексированными массивами (если поддерживается)\n" +" -A\tсделать имена ассоциативными массивами (если поддерживается)\n" +" -i\tназначить именам атрибут «integer»\n" +" -l\tперевести имена в нижний регистр при назначении\n" +" -n\tсделать имя ссылкой на переменную с именем, соответствующим её " +"значению\n" +" -r\tотключить запись в имена\n" +" -t\tназначить именам атрибут «trace»\n" +" -l\tперевести имена в верхний регистр при назначении\n" +" -x\tэкспортировать имена\n" +" \n" +" Знак «+» вместо «-» отключает указанный атрибут.\n" +" \n" +" Переменные с атрибутом «integer» содержат математическое выражение (см.\n" +" команду «let»), которое рассчитывается при назначении значения " +"переменной.\n" +" \n" +" При использовании в функции «declare» делает имена локальными как при " +"использовании\n" +" данной команды. Параметр «-g» отключает это поведение.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла\n" +" ошибка присвоения." + +#: builtins.c:532 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Указание значений переменных и атрибутов.\n" +" \n" +" Устарел. См. «help declare»." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2509,15 +3162,32 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Определение локальных переменных.\n" +" \n" +" Создаёт локальную переменную с указанным именем и присваивает ей " +"указанное значение. Параметром может быть\n" +" любой параметр, принимаемый командой «declare».\n" +" \n" +" Локальные переменные можно использовать только внутри функции. Они " +"видны\n" +" только той функции, в которой они определены, и её дочерним функциям.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр, не возникла\n" +" ошибка присвоения переменной или командный процессор не выполняет " +"функцию." -#: builtins.c:537 +#: builtins.c:557 +#, fuzzy msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2529,6 +3199,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2536,15 +3207,56 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" - -#: builtins.c:571 +"Вывод аргументов на стандартный вывод.\n" +" \n" +" Выводит аргументы, разделённые пробелом, добавляя в конце символ новой " +"строки,\n" +" на стандартный вывод.\n" +" \n" +" Параметры:\n" +" -n\tне добавлять символ новой строки\n" +" -e\tвключить интерпретацию символов, экранированных обратной косой " +"чертой\n" +" -E\tявно отключить интерпретацию символов, экранированных обратной " +"косой чертой\n" +" \n" +" echo интерпретирует следующие символы, экранированные обратной косой " +"чертой:\n" +" \\a\tоповещение (звуковой сигнал)\n" +" \\b\tbackspace\n" +" \\c\tотключение дальнейшего вывода\n" +" \\e\tсимвол escape\n" +" \\E\tсимвол escape\n" +" \\f\tпрогон страницы\n" +" \\n\tновая строка\n" +" \\r\tвозврат каретки\n" +" \\t\tгоризонтальная табуляция\n" +" \\v\tвертикальная табуляция\n" +" \\\\\tобратная косая черта\n" +" \\0nnn\tсимвол с ASCII-кодом NNN (восьмеричным) NNN может быть " +"длиной\n" +" \tот 0 до 3 восьмеричных цифр\n" +" \\xHH\tвосьмиразрядный символ, значение которого — HH " +"(шестнадцатеричное) HH\n" +" \tможет быть одной или двумя шестнадцатеричными цифрами\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не произошла ошибка записи." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2556,8 +3268,18 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Вывод аргументов на стандартный вывод.\n" +" \n" +" Выводит аргументы на стандартный вывод, добавляя в конце символ новой " +"строки.\n" +" \n" +" Параметры:\n" +" -n\tне добавлять символ новой строки\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не произошла ошибка записи." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2583,8 +3305,35 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Включение и отключение встроенных команд командного процессора.\n" +" \n" +" Включает и отключает команды, встроенные в командный процессор. " +"Отключение позволит\n" +" выполнить команду с диска, название которой совпадает с названием " +"встроенной команды,\n" +" без указания полного пути к ней.\n" +" \n" +" Параметры:\n" +" -a\tпоказать список встроенных команд и их состояние\n" +" -n\tотключить все указанные имена или вывести список отключённых " +"команд\n" +" -p\tпоказать список встроенных команд\n" +" -s\tпоказать только названия встроенных команд «special» Posix\n" +" \n" +" Параметры, управляющие динамической загрузкой:\n" +" -f\tзагрузить встроенную указанную команду из указанного файла\n" +" -d\tудалить встроенную функцию, загруженную с параметром -f\n" +" \n" +" Без указания параметров включаются все указанные команды.\n" +" \n" +" Чтобы использовать команду «test», найденную в переменной $PATH,\n" +" а не встроенную в командный процессор, введите «enable -n test».\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если указанное имя не является встроенной командой или " +"не произошла ошибка." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2595,8 +3344,16 @@ msgid "" " Exit Status:\n" " Returns exit status of command or success if command is null." msgstr "" +"Выполнение аргументов как команды командного процессора.\n" +" \n" +" Объединяет аргументы в одну строку, результат передаётся\n" +" в командный процессор с выполнением полученных команд.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода команды или успех, если команда пустая." -#: builtins.c:626 +#: builtins.c:652 +#, fuzzy msgid "" "Parse option arguments.\n" " \n" @@ -2629,15 +3386,60 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +"Анализ аргументов параметра.\n" +" \n" +" getopts используется процедурами командного процессора для анализа\n" +" позиционных параметров.\n" +" \n" +" «строка_параметров» содержит буквы распознаваемых параметров. Если " +"после\n" +" буквы идёт двоеточие, считается, что у параметра есть аргумент,\n" +" который должен быть отделён пробелом.\n" +" \n" +" При каждом своём вызове getopts поместит следующий параметр в " +"переменную\n" +" $имя, проинициализировав это имя, если оно не существует,\n" +" и проиндексирует следующий обрабатываемый аргумент в переменной\n" +" $OPTIND. Переменная $OPTIND инициализируется при каждом вызове\n" +" командного процессора или скрипта. Когда для параметра нужен аргумент,\n" +" getopts помещает этот аргумент в переменную $OPTARG.\n" +" \n" +" getopts сообщает об ошибках двумя способами. Если первый символ\n" +" в «строке_параметров» является двоеточием, getopts включает режим " +"молчания. В этом\n" +" режиме сообщения об ошибках не выводятся. Если указан неверный\n" +" параметр, getopts помещает символ параметра в переменную $OPTARG. Если\n" +" обязательный аргумент не найден, getopts помещает «:» в «имя»\n" +" и задаёт для $OPTARG символ найденного параметра. Если getopts не в " +"режиме\n" +" молчания, и был указан неверный параметр, getopts помещает «?»\n" +" в НАЗВАНИЕ и удаляет переменную OPTARG. Если обязательный аргумент не " +"найден, в НАЗВАНИЕ\n" +" помещается «?», переменная OPTARG удаляется и выводится диагностическое\n" +" сообщение.\n" +" \n" +" Если переменная OPTERR имеет значение 0, getopts отключает\n" +" вывод сообщений об ошибках, даже если первый символ переменной\n" +" OPTSTRING не является двоеточием. По умолчанию переменная OPTERR имеет " +"значение 1.\n" +" \n" +" Getopts обычно анализирует позиционные параметры ($0–$9), но если\n" +" задано больше аргументов, анализируются последние.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если найден параметр. Возвращает ошибку, если " +"достигнут\n" +" конец параметров или возникла ошибка." + +#: builtins.c:694 +#, fuzzy msgid "" "Replace the shell with the given command.\n" " \n" @@ -2648,8 +3450,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -2659,16 +3461,39 @@ msgid "" " Returns success unless COMMAND is not found or a redirection error " "occurs." msgstr "" +"Замена командного процессора указанной командой.\n" +" \n" +" Выполняет команду, заменяя текущий командный процессор указанной " +"программой.\n" +" Указанные аргументы становятся аргументами для команды. Если команда не " +"указана,\n" +" все перенаправления будет выполняться в текущем командном процессоре.\n" +" \n" +" Параметры:\n" +" -a имя\t\tпередать имя как нулевой аргумент в команду\n" +" -c\t\tвыполнить команду с пустым окружением\n" +" -l\t\tпоместить тире в нулевой аргумент для команды\n" +" \n" +" Если команду не удаётся выполнить, неинтерактивный командный процессор\n" +" закроется (если только на задан «execfail»).\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если команда не была найдена или не возникла ошибка " +"перенаправления." -#: builtins.c:689 +#: builtins.c:715 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. Если N не указан,\n" +" состоянием выхода будет состояние последней выполненной команды." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -2676,8 +3501,12 @@ msgid "" "executed\n" " in a login shell." msgstr "" +"Выход из командного процессора login.\n" +" \n" +" Закрывает командный процессор login с состоянием выхода N. Возвращает\n" +" ошибку, если выполняется не в командном процессоре login." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -2706,8 +3535,35 @@ msgid "" " Returns success or status of executed command; non-zero if an error " "occurs." msgstr "" +"Отображение или выполнение команд из журнала.\n" +" \n" +" fc выводит список команд из журнала или позволяет изменить и повторно " +"выполнить их.\n" +" Аргументы «первая» и «последняя» могут быть числами, определяющими " +"диапазон.\n" +" Аргумент «первая» также может быть строкой, которая означает\n" +" последнюю команду, начинающуюся с этой строки.\n" +" \n" +" Параметры:\n" +" -e редактор\tуказать редактор По умолчанию используется $FCEDIT, \n" +" \t\tзатем следует $EDITOR, а затем — vi\n" +" -l \tпоказать строки вместо редактирования\n" +" -n\tне показывать номера строк в списке\n" +" -r\tинвертировать порядок строк (новые в начале)\n" +" \n" +" При запуске в формате «fc -s [шаблон=замена ...] [команда]» команда\n" +" выполняется повторно после замены старая=новая.\n" +" \n" +" Полезный псевдоним для команды — r='fc -s'. Так если ввести «r cc»,\n" +" будет выполнена последняя команда, начинающаяся с «cc», а если ввести " +"«r»,\n" +" будет выполнена последняя команда.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех или состояние выполненной команды. В случае ошибки " +"возвращает ненулевое состояние." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2718,8 +3574,17 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" +"Перевод задания в интерактивный режим.\n" +" \n" +" Переводит указанное задание в интерактивный режим, делая\n" +" его текущим заданием. Если задание не указано, используется\n" +" текущее задание.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние команды, переведённой в интерактивный режим, или " +"ошибку, если возникла ошибка." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -2732,8 +3597,18 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Перевод заданий в фоновый режим.\n" +" \n" +" Переводит указанные задания в фоновый режим, как если бы\n" +" они были запущены с «&». Если задание не указано, используются данные\n" +" текущего задания.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не включено управление заданиями или не произошла " +"ошибка." -#: builtins.c:767 +#: builtins.c:793 +#, fuzzy msgid "" "Remember or display program locations.\n" " \n" @@ -2742,22 +3617,43 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"Запоминание или отображение местоположений программ.\n" +" \n" +" Определяет и запоминает полный путь для всех указанных команд. Если\n" +" аргументы не указаны, выводит информацию о запомненных командах.\n" +" \n" +" Параметры:\n" +" -d\t\tзабыть запомненные местоположения всех указанных команд\n" +" -l\t\tотобразить данные в формате для повторного использования\n" +" -p путь\t\tиспользовать указанный путь как полный путь к команде\n" +" -r\t\tзабыть все запомненные местоположения\n" +" -t\t\tвывести запомненные местоположение всех команд,\n" +" \t\tуказав перед каждым из них соответствующее имя команды,\n" +" \t\tесли указано несколько команд.\n" +" Аргументы:\n" +" ИМЯ\t\tвсе команды ищутся в $PATH и добавляются в список\n" +" \t\tзапомненных команд.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если команда была найдена или был указан допустимый " +"параметр." -#: builtins.c:792 +#: builtins.c:818 +#, fuzzy msgid "" "Display information about builtin commands.\n" " \n" @@ -2769,17 +3665,37 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " "given." msgstr "" +"Вывод информации о встроенных командах.\n" +" \n" +" Показывает краткую справку о встроенных командах. Если указан\n" +" шаблон, выводит подробную справку по всем командам, удовлетворяющим " +"шаблону.\n" +" В противном случае выводится список разделов справки.\n" +" \n" +" Параметры:\n" +" -d\tпоказать краткое описание каждого раздела\n" +" -m\tпоказать справку по использованию в формате man\n" +" -s\tпоказать только краткую справку по использованию для каждого\n" +" \tраздела, соответствующего шаблону\n" +" \n" +" Аргументы:\n" +" ШАБЛОН\tшаблон, определяющий раздел справки\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был найден шаблон или был указан допустимый " +"параметр." -#: builtins.c:816 +#: builtins.c:842 +#, fuzzy msgid "" "Display or manipulate the history list.\n" " \n" @@ -2788,23 +3704,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -2812,8 +3729,44 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Отображение или изменение журнала команд.\n" +" \n" +" Выводит журнал команд с номерами строк и звёздочками (*) перед всеми\n" +" изменёнными записями. С аргументом N показываются только последние N " +"записей.\n" +" \n" +" Параметры:\n" +" -c\tочистить журнал, удалив из него все записи\n" +" -d смещение\tудалить запись журнала по указанному смещению\n" +" \n" +" -a\tдобавить журнал текущего сеанса в файл журнала\n" +" -n\tпрочитать все записи, которые ещё не были прочитаны из файла " +"журнала\n" +" -r\tпрочитать файл журнала и добавить его содержимое\n" +" \tв журнал\n" +" -w\tзаписать текущий журнал в файл журнала\n" +" \tи добавить записи в журнал\n" +" \n" +" -p\tдобавить в журнал указанные аргументы и показать результат,\n" +" \tне сохраняя его в журнал\n" +" -s\tдобавить аргументы в журнал как одну запись\n" +" \n" +" Если указан файл, он используется как файл журнала. В противном случае\n" +" если $HISTFILE содержит значение, используется этот файл, иначе — файл " +"~/.bash_history.\n" +" \n" +" Если переменная $HISTTIMEFORMAT задана и не является пустой, её " +"значение\n" +" используется как строка форматирования для strftime(3) для вывода метки\n" +" времени для каждой показанной записи журнала. В противном случае метки " +"времени не будут показаны.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." -#: builtins.c:852 +#: builtins.c:879 +#, fuzzy msgid "" "Display status of jobs.\n" " \n" @@ -2822,8 +3775,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2836,8 +3789,33 @@ msgid "" " 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" +" \n" +" Выводит список активных заданий. Если указан номер задания, выводится " +"только это задание.\n" +" Если не указать параметры, будет показано состояние всех активных " +"заданий.\n" +" \n" +" Параметры:\n" +" -l\tпоказать идентификаторы процессов в дополнение к обычной " +"информации\n" +" -n\tпоказать только те процессы, у которых изменилось состояние\n" +" \tс момента после последнего уведомления\n" +" -p\tпоказать только идентификаторы процессов\n" +" -r\tпоказать только запущенные задания\n" +" -s\tпоказать только остановленные задания\n" +" \n" +" Если указан параметр -x, команда выполняется после замены всех номеров\n" +" заданий, указанных в аргументах, на идентификатор процесса\n" +" лидера группы процессов задания.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка.\n" +" Если указан параметр -x, возвращает состояние выхода команды." -#: builtins.c:879 +#: builtins.c:906 +#, fuzzy msgid "" "Remove jobs from current shell.\n" " \n" @@ -2847,14 +3825,28 @@ msgid "" " 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" +" \t\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 "" +"Удаление заданий в текущем командном процессоре.\n" +" \n" +" Удаляет все указанные задания из списка активных заданий. Если\n" +" задание не указано, удаляется текущее задание.\n" +" \n" +" Параметры:\n" +" -a\tудалить все задания, если не указано конкретное задание\n" +" -h\tпометить все задания, чтобы им не отправлялся сигнал SIGHUP,\n" +" \tесли командный процессор получает сигнал SIGHUP\n" +" -r\tудалить только активные задания\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или задание." -#: builtins.c:898 +#: builtins.c:925 +#, fuzzy msgid "" "Send a signal to a job.\n" " \n" @@ -2866,7 +3858,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2875,8 +3868,30 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"Отправка сигнала заданию.\n" +" \n" +" Отправляет процессам или заданиям сигнал с указанным названием\n" +" или номером. Если номер или название сигнала\n" +" не указаны, отправляется сигнал SIGTERM.\n" +" \n" +" Параметры:\n" +" -s сигнал\tназвание сигнала\n" +" -n сигнал\tномер сигнала\n" +" -l\t\tпоказывает названия сигналов; если после аргументов указано «-" +"l»,\n" +" \tони считаются номерами сигналов, для которых необходимо показать " +"названия\n" +" \n" +" kill — это встроенная команда, предназначенная для двух задач: " +"использовать\n" +" номера заданий вместо номеров процессов и убивать процессы\n" +" при достижении предельного числа процессов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -2918,10 +3933,56 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." -msgstr "" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"Расчёт математических выражений.\n" +" \n" +" Выполняет расчёт всех аргументов в математическом выражении. Расчёт " +"выполняется\n" +" для целых чисел фиксированной ширины с без проверки на переполнение.\n" +" Однако деление на 0 перехватывается и выдаётся ошибка. Указанные ниже " +"операторы объединены\n" +" в группы с одинаковым приоритетом. Группы перечислены\n" +" в порядке уменьшения приоритета.\n" +" \n" +" \tid++, id--\tпоследующее увеличение и уменьшение переменной\n" +" \t++id, --id\tпредварительное увеличение и уменьшение переменной\n" +" \t-, +\t\tунарный минус и плюс\n" +" \t!, ~\t\tлогическое и побитовое отрицание\n" +" \t**\t\tвозведение в степень\n" +" \t*, /, %\t\tумножение, деление, остаток\n" +" \t+, -\t\tсложение, вычитание\n" +" \t<<, >>\t\tбитовые сдвиги влево или вправо\n" +" \t<=, >=, <, >\tсравнение\n" +" \t==, !=\t\tравенство, неравенство\n" +" \t&\t\tпобитовое И\n" +" \t^\t\tпобитовое исключающее ИЛИ\n" +" \t|\t\tпобитовое ИЛИ\n" +" \t&&\t\tлогическое И\n" +" \t||\t\tлогические ИЛИ\n" +" \tвыражение ? выражение : выражение\n" +" \t\t\tусловный оператор\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tприсвоение\n" +" \n" +" в качестве операндов можно использовать переменные командного " +"процессора. Название переменной\n" +" заменяется её значением (приводится к целому числу фиксированной " +"ширины)\n" +" в выражении. У переменной не должен быть включён атрибут integer,\n" +" чтобы её можно было использовать в выражении.\n" +" \n" +" Операторы вычисляются в порядке старшинства. Вложенные выражения в\n" +" скобках вычисляются первыми и могут переопределить указанные\n" +" выше правила старшинства.\n" +" \n" +" Состояние выхода:\n" +" Если последний АРГУМЕНТ имеет значение 0, let возвращает 1. В противном " +"случае let возвращает 0." -#: builtins.c:966 +#: builtins.c:994 +#, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" " \n" @@ -2932,7 +3993,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -2942,34 +4005,92 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" - -#: builtins.c:1009 +"Чтение строки со стандартного ввода и разделение её на поля.\n" +" \n" +" Читает одну строку со стандартного ввода или из файлового дескриптора,\n" +" если указан параметр -u. Строка разделяется на поля по словам.\n" +" Первое слово присваивается первому указанному имени, второе слово — " +"второму\n" +" имени и так далее.\n" +" Оставшиеся слова присваиваются последнему указанному имени. В качестве " +"разделителей слов используются только символы\n" +" из переменной $IFS.\n" +" \n" +" Если имена не указаны, прочитанная строка сохраняется в переменной " +"$REPLY.\n" +" \n" +" Параметры:\n" +" -a массив\tпоследовательно присвоить прочитанные слова указателям\n" +" \t\tмассива, начиная с нуля\n" +" -d разделитель\tпродолжить до первого разделителя,\n" +" \t\tа не до символа новой строки\n" +" -e\t\tс помощью readline получить строку в интерактивном командном " +"процессоре\n" +" -i текст\t\tиспользовать текст в качестве исходного для readline\n" +" -n число_знаков\tвыполнить возврат после прочтения числа знаков, а не " +"ждать\n" +" \t\tсимвола новой строки; учитывать разделитель, если до него было " +"прочитано\n" +" \t\tменьше указанного числа знаков\n" +" -N число_знаков\tвыполнить возврат только после прочтения указанного " +"числа знаков,\n" +" \t\tесли только не был получен конец строки или не истекло время " +"ожидания, игнорируя все разделители\n" +" -p приглашение\tпоказать приглашение без символа новой строки в конце\n" +" \t\tперед тем как читать\n" +" -r\t\tне выполнять экранирование символами косой черты\n" +" -s\t\tне показывать данные, полученные из терминала\n" +" -t тайм-аут\tпрекратить ожидание и вывести ошибку, если полная " +"входная\n" +" \t\tстрока не была прочитана за указанное число секунд В переменной " +"$TMOUT хранится\n" +" \t\tзначение тайм-аута по умолчанию. Время ожидания\n" +" \t\tможет быть дробным числом. Если тайм-аут равен 0, read немедленно " +"выполняет возврат,\n" +" \t\tне пытаясь прочитать никакие данные. Успех возвращается,\n" +" \t\tтолько если входные данные доступны по указанному файловому " +"дескриптору. \n" +" \t\tСостояние выхода больше 128, если время ожидания было превышено.\n" +" -u fd\t\tчитать из файлового дескриптора, а не со стандартного входа\n" +" \n" +" Состояние выхода:\n" +" Состояние выхода будет нулевым, если не был встречен конец файла, не " +"истекло время ожидания\n" +" (в этом случае состояние выхода будет больше 128), не возникла ошибка " +"присвоения переменной\n" +" или не был указан недопустимый файловый дескриптор как аргумент для -u." + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -2980,8 +4101,18 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Возврат из функции командного процессора.\n" +" \n" +" Выполняет выход из функции или исходного скрипта со значением возврата,\n" +" указанным как N. Если N не указан, используется состояние возврата\n" +" последней команды, выполненной в функции или скрипте.\n" +" \n" +" Состояние выхода:\n" +" Возвращает N или ошибку, если командный процессор не выполняет функцию " +"или скрипт." -#: builtins.c:1022 +#: builtins.c:1055 +#, fuzzy msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3047,9 +4178,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3062,8 +4197,107 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" - -#: builtins.c:1104 +"Присвоение или удаление значений параметров командного процессора и " +"позиционных параметров.\n" +" \n" +" Изменяет значение атрибутов командного процессора и позиционных " +"параметров или\n" +" выводит названия и значения переменных командного процессора.\n" +" \n" +" Параметры:\n" +" -a пометить переменные, которые были изменены или созданы для " +"экспорта\n" +" -b немедленно уведомить о завершении задания\n" +" -e немедленно выйти, если команда выполняет выход с ненулевым " +"состоянием\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" +" 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" +" последней команды, завершившейся с ненулевым " +"состоянием,\n" +" или нулём, если не было команды, завершившейся с " +"ненулевым состоянием\n" +" posix изменить поведение bash там, где операции\n" +" по умолчанию отличаются от стандарта Posix, " +"чтобы\n" +" соответствовать этому стандарту\n" +" privileged эквивалент -p\n" +" verbose эквивалент -v\n" +" vi использовать стиль vi для редактирования строк\n" +" xtrace эквивалент -x\n" +" -p Включён, когда реальный и эффективный идентификаторы пользователя " +"не совпадают.\n" +" Отключает обработку файла $ENV и импорт функций командного\n" +" процессора. Если отключить этот параметр, эффективные UID и GID\n" +" будут назначены реальным UID и GID.\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" +" -- Назначить все оставшиеся аргументы позиционным параметрам.\n" +" Если аргументов не осталось, позиционные параметры\n" +" удаляются.\n" +" - Назначить все оставшиеся аргументы позиционным параметрам.\n" +" Параметры -x и -v выключены.\n" +" \n" +" Если вместо - указать +, флаги будут выключены. \n" +" Флаги также можно использовать до вызова командного процессора. " +"Текущий\n" +" набор флагов можно просмотреть в $-. Оставшиеся n аргументов являются " +"позиционными\n" +" параметрами и назначаются в порядке $1, $2, .. $n. Если\n" +" аргументы не указаны, выводятся все переменные командного процессора.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр." + +#: builtins.c:1140 +#, fuzzy msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3072,6 +4306,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3082,8 +4318,28 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"Удаление значений и атрибутов переменных и функций командного процессора.\n" +" \n" +" Для каждого названия удаляет соответствующую переменную или функцию.\n" +" \n" +" Параметры:\n" +" -f\tсчитать каждое указанное имя функцией командного процессора\n" +" -v\tсчитать каждое указанное имя переменной командного процессора\n" +" -n\tсчитать каждое указанное имя ссылкой на название и удалить саму " +"переменную,\n" +" \tа не переменную, на которую указывает ссылка\n" +" \n" +" Если параметры не указаны, unset сначала пытается удалить переменную. " +"Если это не удаётся,\n" +" пытается удалить функцию.\n" +" \n" +" Некоторые переменные нельзя удалить. См. также «readonly».\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или указанное имя " +"доступно для записи." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3101,8 +4357,24 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"Установка атрибута экспорта для переменных командного процессора.\n" +" \n" +" Помечает все имена для автоматического экспорта в среду для\n" +" последующих выполняемых команд. Если указано значение, оно " +"присваивается перед экспортом.\n" +" \n" +" Параметры:\n" +" -f\tиспользовать функции командного процессора\n" +" -n\tудалить свойство экспорта изо всех имён\n" +" -p\tвывести список всех экспортированных переменных и функций\n" +" \n" +" Аргумент «--» отключает дальнейшую обработку параметров.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или имя." -#: builtins.c:1143 +#: builtins.c:1181 +#, fuzzy msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3114,15 +4386,35 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Запрет изменения переменных командного процессора.\n" +" \n" +" Делает каждое имя доступным только чтения. Значения этих имён нельзя\n" +" будет изменить в будущем. Если указано значение, присваивает это " +"значение\n" +" перед тем, как сделать его доступным только для чтения.\n" +" \n" +" Параметры:\n" +" -a\tссылаться на переменные индексированного массива\n" +" -A\tссылаться на переменные ассоциативного массива\n" +" -f\tиспользовать функции командного процессора\n" +" -p\tвывести список всех переменных или функций, доступных только для " +"чтения,\n" +" в зависимости от того, указан ли параметр -f\n" +" \n" +" Аргумент «--» отключает дальнейшую обработку параметров.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или имя." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3132,8 +4424,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"Сдвиг позиционных параметров.\n" +" \n" +" Переименовывает позиционные параметры $N+1,$N+2,.. в $1,$2,..\n" +" Если N не указан, считается, что указано 1.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если N положительный или меньше $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3146,8 +4445,20 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"Выполнение команд из файла в текущем командном процессоре.\n" +" \n" +" Читает и выполняет команды из указанного файла в текущем командном " +"процессоре. \n" +" Файла ищется в каталогах, указанных в переменной $PATH.\n" +" Если указаны аргументы, они становятся позиционными параметрами\n" +" при выполнении файла.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды из файла. Возвращает " +"ошибку,\n" +" если файл не удаётся прочитать." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3160,15 +4471,33 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"Приостановка работы командного процессора.\n" +" \n" +" Приостанавливает работу текущего командного процессора до получения " +"сигнала SIGCONT.\n" +" Работу командных процессоров login можно приостановить только в " +"принудительном режиме.\n" +" \n" +" Параметры:\n" +" -f\tпринудительно приостановить работу, даже если командный " +"процессор — login\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если не включено управление заданиями или не произошла " +"ошибка." -#: builtins.c:1223 +#: builtins.c:1262 +#, 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3222,6 +4551,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3237,16 +4569,109 @@ msgid "" " Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" " false or an invalid argument is given." msgstr "" - -#: builtins.c:1299 +"Расчёт условного выражения.\n" +" \n" +" Возвращает состояние 0 (истина) или 1 (ложь) после\n" +" расчёта выражения. Выражения могут быть унарными или бинарными. " +"Унарные\n" +" выражения часто используются для определения состояния файла. Также\n" +" доступны стоковые операторы и операторы сравнения чисел.\n" +" \n" +" Поведение команды test зависит от количества аргументов. Полное\n" +" описание см. в странице руководства bash.\n" +" \n" +" Операторы работы с файлами:\n" +" \n" +" -a ФАЙЛ Истина, если файл существует.\n" +" -b ФАЙЛ Истина, если файл представляет блочное устройство.\n" +" -c ФАЙЛ Истина, если файл представляет символьное устройство.\n" +" -d ФАЙЛ Истина, если файл является каталогом.\n" +" -e ФАЙЛ Истина, если файл существует.\n" +" -f ФАЙЛ Истина, если файл существует и является обычным " +"файлом.\n" +" -g ФАЙЛ Истина, если для файла установлен бит SGID.\n" +" -h ФАЙЛ Истина, если файл является символьной ссылкой.\n" +" -L ФАЙЛ Истина, если файл является символьной ссылкой.\n" +" -k ФАЙЛ Истина, если для файла установлен sticky-бит.\n" +" -p ФАЙЛ Истина, если файл является именованным конвейером.\n" +" -r ФАЙЛ Истина, если вы можете прочитать файл.\n" +" -s ФАЙЛ Истина, если файл существует и не является пустым.\n" +" -S ФАЙЛ Истина, если файл является сокетом.\n" +" -t ФД Истина, если файловый дескриптор ФД открыт в " +"терминале.\n" +" -u ФАЙЛ Истина, если для файла установлен бит SUID.\n" +" -w ФАЙЛ Истина, если вы можете выполнить запись в файл.\n" +" -x ФАЙЛ Истина, если вы можете выполнить файл.\n" +" -O ФАЙЛ Истина, если вы являетесь эффективным владельцем " +"файла.\n" +" -G ФАЙЛ Истина, если ваша группа является эффективным " +"владельцем файла.\n" +" -N ФАЙЛ Истина, если файл был изменён после последнего чтения.\n" +" \n" +" ФАЙЛ1 -nt ФАЙЛ2 Истина, если файл1 новее файла2 (согласно\n" +" дате изменения).\n" +" \n" +" ФАЙЛ1 -ot ФАЙЛ2 Истина, если файл1 старее файла2.\n" +" \n" +" ФАЙЛ1 -ef ФАЙЛ2 Истина, если файл1 является жёсткой ссылкой на " +"файл2.\n" +" \n" +" Строковые операторы:\n" +" \n" +" -z СТРОКА Истина, если строка является пустой.\n" +" \n" +" -n СТРОКА\n" +" СТРОКА Истина, если строка не является пустой.\n" +" \n" +" СТРОКА1 = СТРОКА2\n" +" Истина, если строки совпадают.\n" +" СТРОКА1 != СТРОКА2\n" +" Истина, если строки не совпадают.\n" +" СТРОКА1 < СТРОКА2\n" +" Истина, если СТРОКА1 сортируется до СТРОКИ2 " +"лексикографически.\n" +" СТРОКА1 > СТРОКА2\n" +" Истина, если СТРОКА1 сортируется после СТРОКИ2 " +"лексикографически.\n" +" \n" +" Остальные операторы:\n" +" \n" +" -o ПАРАМЕТР Истина, если параметр командного процессора включён.\n" +" -v ПЕР\t Истина, если переменная командного процессора задана\n" +" -R ПЕР\t Истина, если переменная командного процессора задана и " +"является именованной ссылкой.\n" +" ! ВЫРАЖ Истина, если выражение возвращает ложь.\n" +" ВЫРАЖ1 -a ВЫРАЖ2 Истина, если оба выражения возвращают истину.\n" +" ВЫРАЖ1 -o ВЫРАЖ2 Истина, если хотя бы одно из выражений возвращает " +"истину.\n" +" \n" +" арг1 ОП арг2 Математические проверки. ОП может быть одним из " +"следующих: -eq, -ne,\n" +" -lt, -le, -gt или -ge.\n" +" \n" +" Математические бинарные операторы возвращают истину, если АРГУМЕНТ1 " +"равен, не равен,\n" +" меньше, меньше или равен либо больше или равен\n" +" АРГУМЕНТУ2.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если выражение истинно, или ошибку, если выражение " +"ложно\n" +" или указан недопустимый аргумент." + +#: builtins.c:1344 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 "" +"Расчёт условного выражения.\n" +" \n" +" Это синоним встроенной команды test, но последним аргументом должна\n" +" быть скобка «]», соответствующая открывающей «[»." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -3257,8 +4682,16 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" +"Отображение времени процесса.\n" +" \n" +" Показывает объединённые значения времени пользователя и системы для " +"командного\n" +" процессора и всех его дочерних процессов.\n" +" \n" +" Состояние выхода:\n" +" Всегда возвращает успех." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -3274,7 +4707,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -3293,8 +4734,49 @@ msgid "" " Returns success unless a SIGSPEC is invalid or an invalid option is " "given." msgstr "" - -#: builtins.c:1352 +"Захват сигналов и других событий.\n" +" \n" +" Определяет и активирует обработчики, которые будут выполняться, когда\n" +" командный процессор получает сигналы или при других условиях.\n" +" \n" +" Аргумент — это команда, которая считывается и выполняется, когда\n" +" командный процессор получает указанные сигнал(ы). Если аргумент " +"отсутствует (и указан один сигнал)\n" +" или указано «-», для всех указанных сигналов восстанавливаются\n" +" исходные значения. Если аргумент — пустая строка, все указанные сигналы " +"игнорируются\n" +" командным процессором и вызываемыми им командами.\n" +" \n" +" Если сигнал — EXIT (0), аргумент выполняется при выходе из командного " +"процессора. Если\n" +" сигнал — DEBUG, аргумент выполняется перед каждой простой командой. " +"Если\n" +" сигнал — RETURN, аргумент выполняется каждый раз, когда функция\n" +" или скрипт выполняется в . или исходные встроенные команды завершают " +"свою работу. Сигнал\n" +" ERR означает выполнение аргумента каждый раз, когда ошибка команды " +"приведёт\n" +" к выходу из командного процессора, когда включён параметр -e.\n" +" \n" +" Если аргументы не указаны, trap выводит список команд, связанных\n" +" с каждом сигналом.\n" +" \n" +" Параметры:\n" +" -l\tпоказать названия сигналов и их номера\n" +" -p\tпоказать команды trap, связанные с каждым сигналом\n" +" \n" +" Идентификатор сигнала — это название сигнала в или номер " +"сигнала.\n" +" Названия сигналов не зависят от регистра, а префикс SIG не является " +"обязательным. \n" +" Сигнал можно отправить в командный процессор командой «kill -signal $" +"$».\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый сигнал или параметр." + +#: builtins.c:1401 +#, fuzzy msgid "" "Display information about command type.\n" " \n" @@ -3303,18 +4785,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -3323,8 +4805,39 @@ msgid "" " Returns success if all of the NAMEs are found; fails if any are not " "found." msgstr "" - -#: builtins.c:1383 +"Вывод информации о типе команды.\n" +" \n" +" Для каждого указанного имени показывает, как оно будет интерпретировано " +"при\n" +" использовании в качестве названия команды.\n" +" \n" +" Параметры:\n" +" -a\tпоказать все местоположения, где есть исполняемый файл с указанным " +"именем,\n" +" \tвключая псевдонимы, встроенные команды и функции, а также при условии\n" +" \tчто не используется параметр «-p»\n" +" -f\tне искать функции командного процессора\n" +" -P\tпринудительно искать в $PATH все указанные имена, даже если это " +"псевдоним,\n" +" \tвстроенная команда или функция, и возвращать название файла на диске,\n" +" \tкоторый будет запущен\n" +" -p\tвозвращает название файла на диске, который будет запущен,\n" +" \tили ничего, если «type -t имя» не возвращает «file».\n" +" -t\tвывести одно из слов «alias», «keyword»,\n" +" \t«function», «builtin», «file» или «», если указанное имя является, " +"соответственно,\n" +" \tпсевдонимом, зарезервированным словом, функцией, встроенной командой\n" +" \tкомандного процессора, файлом на диске или имя не было найдено\n" +" \n" +" Аргументы:\n" +" ИМЯ\tназвание интерпретируемой команды\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если все указанные имена были найдены, или ошибку в " +"противном случае." + +#: builtins.c:1432 +#, fuzzy msgid "" "Modify shell resource limits.\n" " \n" @@ -3342,6 +4855,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3353,6 +4867,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3367,8 +4886,56 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1428 +"Изменение ограничений ресурсов командного процессора.\n" +" \n" +" Позволяет контролировать ресурсы, доступные командному процессору и " +"создаваемым\n" +" им процессам, в системах, где возможен такой контроль.\n" +" \n" +" Параметры:\n" +" -S\tиспользовать «мягкое» ограничение ресурсов\n" +" -H\tиспользовать «жёсткое» ограничение ресурсов\n" +" -a\tпоказать все текущие ограничения\n" +" -b\tразмер буфера сокета\n" +" -c\tмаксимальный размер создаваемых core-файлов\n" +" -d\tмаксимальный размер сегмента данных процесса\n" +" -e\tмаксимальный приоритет планирования («nice»)\n" +" -f\tмаксимальный размер файлов, записываемых командным процессором и " +"его дочерними процессами\n" +" -i\tмаксимальное число ожидающих сигналов\n" +" -l\tмаксимальный объём, который процесс может заблокировать в памяти\n" +" -m\tмаксимальный объём резидентной памяти\n" +" -n\tмаксимальное число открытых файловых дескрипторов\n" +" -p\tразмер буфера конвейера\n" +" -q\tмаксимальное число байт в очередях сообщений POSIX\n" +" -r\tмаксимальный приоритет планирования в реальном времени\n" +" -s\tмаксимальный размер стека\n" +" -t\tмаксимальный объём процессорного времени в секундах\n" +" -u\tмаксимальное количество пользовательских процессов\n" +" -v\tобъём виртуальной памяти\n" +" -x\tмаксимальное число блокировок файлов\n" +" -T максимальное количество потоков\n" +" \n" +" Не все параметры доступны на всех платформах.\n" +" \n" +" Если указано ограничение, оно является новым значением для указанного " +"ресурса.\n" +" Специальные значения «soft», «hard» и «unlimited» означают,\n" +" соответственно, текущее мягкое ограничение, текущее жёсткое ограничение " +"и отсутствие ограничения.\n" +" В противном случае выводится текущее значение указанного ресурса. Если\n" +" параметр не указан, подразумевается использование параметра -f.\n" +" \n" +" Значения задаются с шагом 1024 байт, кроме параметра -t с шагом в " +"секундах,\n" +" параметра -p с шагом 512 байт и параметра -u, представляющего\n" +" количество процессов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3385,39 +4952,102 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"Отображение или указание маски режима для файлов.\n" +" \n" +" Задаёт маску РЕЖИМ для файлов, создаваемых пользователем. Если РЕЖИМ не " +"указан,\n" +" выводит текущее значение маски.\n" +" \n" +" Если РЕЖИМ начинается с цифры, он интерпретируется как восьмеричное " +"число.\n" +" В противном случае он считается символьной строкой как для команды " +"chmod(1).\n" +" \n" +" Параметры:\n" +" -p\tесли РЕЖИМ не указан, вывести маску, пригодную для повторного " +"использования\n" +" -S\tвывести маску в символьном виде, в противном случае выводится " +"восьмеричное число\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый РЕЖИМ или параметр." -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Ожидание завершения задания и возврат состояния выхода.\n" +" \n" +" Ожидает завершения всех процессов, заданных идентификаторами\n" +" (идентификатор процесса или номер задания), и возвращает их состояние " +"выхода. Если идентификатор\n" +" не указан, ожидает завершения всех активных дочерних процессов\n" +" и возвращает нулевое состояние выхода. Если идентификатор не является " +"номером задания, ожидает завершения\n" +" всех процессов в конвейере данного задания.\n" +" \n" +" Если указан параметр -n, ожидает завершения следующего задания\n" +" возвращает его состояние выхода.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последнего идентификатора. Возвращает ошибку, если\n" +" указан недопустимый идентификатор или параметр." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" +"Ожидание завершения процесса и возврат состояния выхода.\n" +" \n" +" Ожидает завершения всех процессов, заданных идентификаторами (PID), и " +"возвращает их состояние выхода.\n" +" Если идентификатор процесса не указан, ожидает завершения всех активных\n" +" дочерних процессов и возвращает нулевое состояние выхода. PID должен " +"быть идентификатором процесса.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последнего идентификатора. Возвращает ошибку, если\n" +" указан недопустимый идентификатор или параметр." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3429,8 +5059,18 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Выполнение команд для всех элементов списка.\n" +" \n" +" Цикл «for» выполняет последовательность команд для каждого элемента\n" +" списка. Если операнд «in СЛОВА ...;» отсутствует, подразумевается\n" +" операнд «in \"$@\"». Каждому элементу в списке СЛОВА присваивается ИМЯ " +"и для него\n" +" выполняются КОМАНДЫ.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3446,8 +5086,22 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Математические операции в циклах.\n" +" \n" +" Эквивалентно\n" +" \t(( ВЫРАЖ1))\n" +" \twhile (( ВЫРАЖ2 )); do\n" +" \t\tКОМАНДЫ\n" +" \t\t(( ВЫРАЖ3 ))\n" +" \tdone\n" +" ВЫРАЖ1, ВЫРАЖ2 и ВЫРАЖ3 — это математические выражения. Если любое из " +"выражений\n" +" не указано, считается, что оно возвращает 1.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3466,8 +5120,30 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" - -#: builtins.c:1534 +"Выбор слов из списка и выполнение команд.\n" +" \n" +" СЛОВА разворачиваются, формируя список слов. \n" +" Набор развёрнутых слов выводится в поток ошибок с номерами\n" +" в начале строк. Если операнд «in СЛОВА ...;» отсутствует, " +"подразумевается\n" +" операнд «in \"$@\"». Затем выводится приглашение $PS3 и со стандартного " +"ввода\n" +" считывается строка. Если строка состоит из номера,\n" +" соответствующего одному из показанных слов, этому слову\n" +" присваивается указанное имя. Если строка пустая, будут повторно " +"показаны указанные слова\n" +" и приглашение. Если прочитан символ конца файла, команда завершает свою " +"работу. Если прочитаны\n" +" любые другие значения, указанному имени присваивается пустое значение. " +"Прочитанная строка\n" +" сохраняется в переменную $REPLY. Команды выполняются после каждой " +"выборки,\n" +" пока не будет выполнена команда прерывания.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3482,8 +5158,22 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"Вывод времени, потраченного на выполнение конвейера.\n" +" \n" +" Выполняет конвейер и выводит значения реального времени, " +"пользовательского времени\n" +" и системного времени ЦП, потраченного на выполнения конвейера.\n" +" \n" +" Параметры:\n" +" -p\tпоказать значения времени в формате Posix\n" +" \n" +" Для форматирования выходных данных используется значение переменной " +"$TIMEFORMAT.\n" +" \n" +" Состояние выхода:\n" +" Возвращаемое состояние соответствует состоянию выхода конвейера." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3493,8 +5183,15 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Выполнение команд согласно шаблону.\n" +" \n" +" Выполняет команды, когда слово соответствует шаблону. \n" +" Для разделения шаблонов используется знак «|».\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -3514,30 +5211,66 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" - -#: builtins.c:1580 +"Выполнение команд в зависимости от условий.\n" +" \n" +" Сначала выполняется список «if КОМАНДЫ». Если состояние выхода " +"нулевое,\n" +" выполняется список «then КОМАНДЫ». В противном случае выполняется по " +"очереди\n" +" все списки «elif КОМАНДЫ», и если их состояние выхода будет нулевым,\n" +" выполнится список «then КОМАНДЫ», и команда if завершится. В противном " +"случае\n" +" выполнится список «else КОМАНДЫ», если он указан. Состояние выхода " +"всей\n" +" конструкции соответствует состоянию выхода последней выполненной команды " +"или будет нулевым,\n" +" если ни одна проверка условия не возвратила истину.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." + +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Выполнение команд до тех пор, пока проверка условия возвращает истину.\n" +" \n" +" Разворачивает и выполняет команды до тех пор, пока последняя команда в\n" +" командах «while» завершается с нулевым состоянием.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Выполнение команд до тех пор, пока проверка условия не возвращает истину.\n" +" \n" +" Разворачивает и выполняет команды до тех пор, пока последняя команда в\n" +" командах «until» завершается с ненулевым состоянием.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." -#: builtins.c:1604 +#: builtins.c:1672 +#, fuzzy msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3547,10 +5280,21 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"Создание дополнительного процесса с указанным именем.\n" +" \n" +" Выполняет команду асинхронно, когда стандартный вывод и стандартный\n" +" вход команды подключены через конвейер к дескрипторам файлов, которые " +"назначены\n" +" указателям 0 и 1 массива переменных ИМЯ в активном командном " +"процессоре.\n" +" Имя по умолчанию — «COPROC».\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние выхода команды." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -3563,8 +5307,19 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is readonly." msgstr "" +"Определение функции командного процессора.\n" +" \n" +" Создаёт функцию командного процессора с указанным именем. При запуске в " +"качестве простой команды\n" +" ИМЯ выполняет КОМАНДЫ в контексте вызывающего их командного процессора. " +"При вызове ИМЕНИ\n" +" аргументы передаются в функцию как $1...$n, а функция получает\n" +" название $FUNCNAME.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если переменная ИМЯ доступно для записи." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3574,8 +5329,16 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"Группировка команд.\n" +" \n" +" Выполняет набор команд, объединённых в группу. Это единственный способ " +"перенаправления\n" +" всего набора команд.\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние последней выполненной команды." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3588,19 +5351,39 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" +"Возобновление работы задания в интерактивном режиме.\n" +" \n" +" Аналогично аргументу JOB_SPEC для команды «fg». Возобновляет\n" +" работу остановленного или фонового задания. Через JOB_SPEC можно задать " +"название\n" +" или номер задания. Если после номера задания указать «&», задание будет " +"переведено\n" +" в фоновый режим, как если бы идентификатор задания был указан как\n" +" аргумент для команды «bg».\n" +" \n" +" Состояние выхода:\n" +" Возвращает состояние возобновлённого задания." -#: builtins.c:1659 +#: builtins.c:1727 +#, fuzzy msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"Расчёт арифметического выражения.\n" +" \n" +" Выражение рассчитывается по правилам для математических\n" +" выражений. Аналогично «let выражение».\n" +" \n" +" Состояние выхода:\n" +" Возвращает 1, если выражение равно 0, в противном случае возвращает 0." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -3627,8 +5410,35 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" +"Выполнение условной команды.\n" +" \n" +" Возвращает состояние 0 или 1 в зависимости от результата расчёта\n" +" условного выражения. Выражения составляются из тех же примитивов, " +"которые используются\n" +" во встроенной команде «test». Их можно объединить с помощью следующих " +"операторов:\n" +" \n" +" ( выражение )\tВозвращает значение выражения\n" +" ! выражение\tВозвращает истину, если выражение ложно, в противном " +"случае возвращает ложь\n" +" ВЫРАЖ1 && ВЫРАЖ2\tВозвращает истину, если оба выражения истинны, в " +"противном случае возвращает ложь\n" +" ВЫРАЖ1 || ВЫРАЖ2\tВозвращает истину, если хотя бы одно из выражений " +"истинно, в противном случае возвращает ложь\n" +" \n" +" Если используются операторы «==» и «!=», строка справа от\n" +" оператора используется как шаблон, и выполняется сопоставление по " +"шаблону.\n" +" Если используется оператор «=~», строка справа от оператора\n" +" оценивается как регулярное выражение.\n" +" \n" +" Операторы && и || не рассчитывают ВЫРАЖ2, если ВЫРАЖ1 достаточно для\n" +" определения значения выражения.\n" +" \n" +" Состояние выхода:\n" +" 0 или 1 в зависимости от значения выражения." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3681,8 +5491,67 @@ msgid "" " 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 +"Стандартные имена переменных командного процессора и их использование.\n" +" \n" +" BASH_VERSION\tНомер версии bash.\n" +" CDPATH\t\tСписок каталогов, разделённых двоеточиями, для поиска\n" +" \t\tв них каталогов, указанных как аргументы для «cd».\n" +" GLOBIGNORE\tСписок шаблонов, разделённых двоеточиями и описывающих имена " +"файлов,\n" +" \t\tкоторые будут игнорироваться при развёртывании пути.\n" +" HISTFILE\t\tИмя файла, в котором хранится журнал команд.\n" +" HISTFILESIZE\tЧисло строк в файле журнала.\n" +" HISTSIZE\t\tЧисло строк журнала, к которым может\n" +" \t\tполучить доступ командный процессор.\n" +" HOME\t\tПолный путь к вашему домашнему каталогу.\n" +" HOSTNAME\t\tИмя данной системы.\n" +" HOSTTYPE\t\tТип процессора, на котором работает данная версия bash.\n" +" IGNOREEOF\tУправляет действием командного процессора при получении " +"символа\n" +" \t\tсимвола конца файла в качестве единственных входных данных. Если " +"задано, тогда значение\n" +" \t\tявляется числом символов EOF, которые могут быть\n" +" \t\tпрочитаны подряд в пустой строке, после чего командный процессор " +"будет закрыт\n" +" \t\t(по умолчанию — 10). Если не задано, EOF означает конец входных " +"данных.\n" +" MACHTYPE\t\tСтрока с описанием текущей системы, в которой запущен bash.\n" +" MAILCHECK\tКак часто (в секундах) bash проверяет наличие новой почты.\n" +" MAILPATH\t\tСписок имён файлов, разделённых двоеточиями, в которых bash\n" +" \t\tищет почту.\n" +" OSTYPE\t\tВерсия Unix, в которой запущена данная версия bash.\n" +" PATH\t\tСписок каталогов, разделённых двоеточиями, для поиска\n" +" \t\tвыполняемых команд.\n" +" PROMPT_COMMAND\tКоманда, выполняемая перед выводом каждого\n" +" \t\tосновного приглашения.\n" +" PS1\t\tОсновная строка приглашения.\n" +" PS2\t\tДополнительная строка приглашения.\n" +" PWD\t\tПолный путь до текущего каталога.\n" +" SHELLOPTS\tСписок включённых параметров командного процессора, " +"разделённых двоеточиями.\n" +" TERM\t\tНазвание текущего типа терминала.\n" +" TIMEFORMAT\tФормат вывода данных о времени, показываемых\n" +" \t\tкомандой time.\n" +" auto_resume\tНепустое значение означает слово в строке запуска команды,\n" +" \t\tкоторое сначала ищется в списке\n" +" \t\tостановленных заданий. Если команда найдена, задание переводится в " +"интерактивный режим.\n" +" \t\tЗначение «exact» означает, что слово команды должно\n" +" \t\tточно совпадать с командой в списке остановленных заданий. \n" +" \t\tЗначение «substring» означает, что слово команды\n" +" \t\tдолжно быть частью строки задания. Все другие значения означают,\n" +" \t\tчто команда должна быть префиксом остановленного задания.\n" +" histchars\tСимволы, управляющие расширением журнала\n" +" \t\tи быстрой подстановкой. Первый символ означает\n" +" \t\tподстановку журнала. Обычно это «!». Второй символ\n" +" \t\tозначает «быструю подстановку». Обычно это «^». \n" +" \t\tТретий символ означает примечание журнала. Обычно это «#».\n" +" HISTIGNORE\tСписок шаблонов, разделённых двоеточиями и описывающих " +"команды,\n" +" \t\tкоторые должны быть сохранены в журнале.\n" + +#: builtins.c:1822 +#, fuzzy msgid "" "Add directories to stack.\n" " \n" @@ -3692,19 +5561,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3712,8 +5581,37 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Добавление каталогов в стек.\n" +" \n" +" Добавляет каталог в начало стека каталогов или выполняет\n" +" ротацию стека, помещая в начало стека текущий рабочий\n" +" каталог. Если аргументы не указаны, меняет местами два первых " +"каталога.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при добавлении\n" +" \tкаталогов в стек, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tвыполняет ротацию стека, чтобы N-й каталог (слева\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" -N\tвыполняет ротацию стека, чтобы N-й каталог (справа\n" +" \tв списке, показанного командой «dirs», начиная с нуля)\n" +" \tстал первым в стеке.\n" +" \n" +" каталог\tдобавляет каталог в начало стека каталогов, делая его\n" +" \tновым текущим каталогом.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или удалось\n" +" перейти в каталог." -#: builtins.c:1788 +#: builtins.c:1856 +#, fuzzy msgid "" "Remove directories from stack.\n" " \n" @@ -3722,16 +5620,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3739,8 +5637,32 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"Удаление каталогов из стека.\n" +" \n" +" Удаляет записи из стека каталогов. Если аргументы не указаны,\n" +" удаляет первый каталог из стека и назначает новый первый каталог.\n" +" \n" +" Параметры:\n" +" -n\tпредотвращает обычное изменение каталога при удалении\n" +" \tкаталогов из стека, чтобы действия выполнялись только над стеком.\n" +" \n" +" Аргументы:\n" +" +N\tудаляет N-ю слева запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd +0»\n" +" \tудаляет первый каталог, а «popd +1» — второй каталог.\n" +" \n" +" -N\tудаляет N-ю справа запись в списке каталогов,\n" +" \tпоказанного командой «dirs», начиная с нуля. Например, «popd -0»\n" +" \tудаляет последний каталог, а «popd -1» — предпоследний каталог.\n" +" \n" +" Встроенная команда dirs показывает стек каталогов.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или удалось\n" +" перейти в каталог." -#: builtins.c:1818 +#: builtins.c:1886 +#, fuzzy msgid "" "Display directory stack.\n" " \n" @@ -3751,32 +5673,56 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Отображение стека каталогов.\n" +" \n" +" Выводит список запомненных на данный момент каталогов. Каталоги\n" +" помещаются в список командой «pushd». Для очистки\n" +" списка используется команда «popd».\n" +" \n" +" Параметры:\n" +" -c\tочистить стек каталогов, удалив из него все элементы\n" +" -l\tне выводить каталоги, начинающиеся с тильды (~),\n" +" \tкоторая означает домашний каталог\n" +" -p\tпоказать стек по одному каталогу в строке\n" +" -v\tпоказать стек по одному каталогу в строке\n" +" \tи с номером в стеке\n" +" \n" +" Аргументы:\n" +" +N\tпоказать N-ю запись слева в списке каталогов,\n" +" \tпоказанного при вызове без параметров, начиная с нуля.\n" +" \n" +" -N\tпоказать N-ю справа в списке каталогов запись,\n" +" \tпоказанного при вызове без параметров, начиная с нуля.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." -#: builtins.c:1847 +#: builtins.c:1917 +#, fuzzy 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3789,8 +5735,27 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"Установка и удаление параметров командного процессора.\n" +" \n" +" Изменяет настройки указанных параметров командного процессора. Если не " +"указать\n" +" аргумент с параметром, выводит все параметры командного процессора, " +"показывая\n" +" какой из них установлен, а какой нет.\n" +" \n" +" Параметры:\n" +" -o\tограничиться до параметров, которые заданы с помощью «set -o»\n" +" -p\tпоказать все параметры командного процессора и их состояние\n" +" -q\tничего не выводить\n" +" -s\tвключить (set) все указанные параметры\n" +" -u\tотключить (unset) все указанные параметры\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если указанный параметр включён. Возвращает ошибку,\n" +" если был указан недопустимый параметр или параметр отключён." -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3807,20 +5772,67 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\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 +"Форматирует и выводит аргументы согласно указанному формату.\n" +" \n" +" Параметры:\n" +" -v перем\tвыводить в указанную переменную bash, а не\n" +" \t\tна стандартный вывод\n" +" \n" +" ФОРМАТ — это символьная строка, содержащая три типа объектов: простые\n" +" символы, которые копируются на стандартный вывод, экранирующие\n" +" последовательности, которые преобразовываются и копируются на " +"стандартный\n" +" вывод, и спецификации, которые активируют вывод следующего успешного\n" +" аргумента.\n" +" \n" +" В дополнение к стандартным спецификациям формата, описанным в " +"printf(1),\n" +" printf интерпретирует:\n" +" \n" +" %b\tразвёртывание экранирующих последовательностей с обратной косой " +"чертой в соответствующий аргумент;\n" +" %q\tзаключение аргумента в кавычки, чтобы его можно было повторно " +"использовать в качестве входных данных для командного процессора;\n" +" %(fmt)T вывод строки дата-время, полученной после использования FMT в " +"качестве\n" +" строки форматирования для strftime(3)\n" +" \n" +" Если необходимо задействовать все аргументы, формат используется " +"повторно. Если\n" +" аргументов меньше, чем требуется для форматирования, дополнительные\n" +" спецификации форматирования интерпретируются как содержащие нулевое\n" +" или пустое значение.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка\n" +" записи или присвоения." + +#: builtins.c:1974 +#, fuzzy msgid "" "Specify how arguments are to be completed by Readline.\n" " \n" @@ -3833,22 +5845,49 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"Определение количества аргументов, завершаемых функцией readline.\n" +" \n" +" Для каждого имени нужно указать количество завершаемых аргументов. Если " +"параметры\n" +" не указаны, выводятся существующие спецификации завершения формате\n" +" для повторного использования.\n" +" \n" +" Параметры:\n" +" -p\tвывести существующие спецификации завершения в формате для " +"повторного использования\n" +" -r\tудалить спецификации завершения для каждого имени или,\n" +" \tесли имена не указаны, все спецификации\n" +" -D\tприменить завершения и действия как стандартные для команд,\n" +" \tдля которых не определены завершения\n" +" -E\tприменить завершения и действия к «пустым» командам —\n" +" \tзавершение применяется к пустой строке\n" +" \n" +" Когда применяется завершение, действия выполняются в алфавитном порядке\n" +" перечисленных выше параметров. Параметр -D имеет более\n" +" высокий приоритет, чем -E.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." -#: builtins.c:1923 -#, fuzzy +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -3860,19 +5899,25 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -"���������� ��������� ���������� � ����������� �����. ��������������,\n" -" ��� ����� �������������� ������ ������� ���������� ��������������, " -"������������ ��������� ����������.\n" -" ���� �������������� �������� ����� ��� �����������, �� ����� " -"������������� ������ ���������� � �����." +"Вывод возможных завершений в зависимости от параметров.\n" +" \n" +" compgen предназначен для использования в функциях bash, генерирующих\n" +" возможные завершения. Если указан необязательный аргумент слово, " +"выполняет\n" +" сопоставление со сгенерированным словом.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или не возникла " +"ошибка." -#: builtins.c:1938 +#: builtins.c:2019 +#, 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -3881,6 +5926,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3896,8 +5942,37 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"Изменение или вывод параметров завершения.\n" +" \n" +" Изменяет параметры завершения для каждого имени или, если имена\n" +" не указаны, для текущего завершения. Если параметры не указаны, " +"выводит\n" +" параметры завершения для каждого имени или текущую спецификацию " +"завершения.\n" +" \n" +" Параметры:\n" +" \t-o параметр\tзадать параметр завершения для каждого имени\n" +" \t-D\t\tизменить параметры для завершения команды «по умолчанию»\n" +" \t-E\t\tизменить параметры для завершения «пустой» команды\n" +" \n" +" Использование «+o» вместо «-o» отключает указанный параметр.\n" +" \n" +" Аргументы:\n" +" \n" +" Каждое имя ссылается на команду, для которой уже должна быть определена\n" +" спецификация завершения с помощью встроенной команды «complete». Если " +"имена\n" +" не указаны, функция, которая сейчас генерирует завершения, должна " +"вызвать\n" +" compopt, и должны измениться параметры для текущего\n" +" генератора завершения.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или для имени\n" +" определена спецификация завершения." -#: builtins.c:1968 +#: builtins.c:2050 +#, fuzzy msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -3908,24 +5983,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -3936,38 +6013,2211 @@ msgid "" "or\n" " not an indexed array." msgstr "" - -#: builtins.c:2001 +"Чтение строк со стандартного ввода в переменную индексированного массива.\n" +" \n" +" Читает строки со стандартного ввода в переменную указанного " +"индексированного массива\n" +" или из указанного файлового дескриптора, если указан параметр -u. " +"Переменная $MAPFILE\n" +" является массивом по умолчанию.\n" +" \n" +" Параметры:\n" +" -n число\tкопировать указанное число строк Если число равно 0, " +"копируются все строки.\n" +" -O начало\tначать присвоение массиву, начиная с заданного указателя " +"По умолчанию указатель равен 0.\n" +" -s число \tотбросить указанное число первых строк\n" +" -t\t\tудалить завершающие переводы строки изо всех прочитанных строк\n" +" -u fd\t\tчитать строки из файлового дескриптора, а не со стандартного " +"входа\n" +" -C callback\tоценивать callback при чтении каждой строки quantum\n" +" -c quantum\tчисло строк, читаемых от каждого вызова до callback\n" +" \n" +" Аргументы:\n" +" МАССИВ\t\tназвание переменной массива, используемой для данных файла.\n" +" \n" +" Если параметр -C указан без -c, quantum по умолчанию равен 5000. Когда\n" +" оценивается callback, он предоставляет указатель на следующий " +"присваиваемый\n" +" элемента массива и на строку, присваиваемую этому элементу,\n" +" в качестве дополнительных аргументов.\n" +" \n" +" Если явно не указано начало, mapfile очистит массив до\n" +" операции присвоения.\n" +" \n" +" Состояние выхода:\n" +" Возвращает успех, если был указан допустимый параметр или массив " +"доступен для записи\n" +" и является индексированным." + +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +"Чтение строк из файла в переменную массива.\n" +" \n" +" Синоним команды «mapfile»." -#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," -#~ msgstr "��� ����� ���������� \"$������ $��������\". � �����," +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: недопустимый ключ ассоциативного массива" -#~ msgid "returns \"$line $subroutine $filename\"; this extra information" +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " #~ msgstr "" -#~ "���������� \"$������ $��������� $��������\"; ��� �������������� " -#~ "���������� " +#~ "Возвращает контекст вызова текущей подпрограммы.\n" +#~ " \n" +#~ " Без EXPR выполняет возврат " -#~ msgid "can be used used to provide a stack trace." -#~ msgstr "����� ���� ������������ ��� �������� `stack trace'" +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: процесс %5ld (%s) в the_pipeline" -#~ msgid "bug: unknown operation" -#~ msgstr "������: ����������� ��������" +#~ msgid "Unknown Signal #" +#~ msgstr "Неизвестный номер сигнала" -#, fuzzy -#~ msgid "Return a successful result." -#~ msgstr "���������� ���������: ��� ������." +#~ msgid "Copyright (C) 2016 Free Software Foundation, Inc." +#~ msgstr "© Free Software Foundation, Inc, 2016." -#, fuzzy -#~ msgid "Obsolete. See `declare'." -#~ msgstr " ����� �� ������������. ��. `declare'." +#~ msgid ":" +#~ msgstr ":" -#, fuzzy -#~ msgid "Logout of a login shell." +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Missing `}'" +#~ msgstr "Пропущен символ `}'" + +#~ msgid "brace_expand> " +#~ msgstr "brace_expand> " + +#~ 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 "execute_command: неверный тип команды '%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 "невозможно скопировать файловый дескриптор %d в 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 "slot %3d: " +#~ msgstr "слот %3d: " + +#~ msgid "" +#~ msgstr "<неизв>" + +#~ msgid "%s: bg background job?" +#~ msgstr "%s: задача уже фоновая" + +#~ 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 "синтаксическая ошибка около неожиданной лексемы `%c'" + +#~ msgid "print_command: bad command type `%d'" +#~ msgstr "print_command: неверный тип команды `%d'" + +#~ msgid "cprintf: bad `%%' argument (%c)" +#~ msgstr "cprintf: неверный спецификатор после `%%' (%c)" + +#~ msgid "option `%s' requires an argument" +#~ msgstr "параметр `%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 "can't make pipes for process substitution: %s" +#~ msgstr "невозможно создать каналы для подстановки: %s" + +#~ msgid "reading" +#~ msgstr "чтения" + +#~ msgid "writing" +#~ msgstr "записи" + +#~ msgid "process substitution" +#~ msgstr "подстановка процессов" + +#~ msgid "command substitution" +#~ msgstr "подстановка команд" + +#~ msgid "Can't reopen pipe to command substitution (fd %d): %s" +#~ msgstr "" +#~ "Невозможно вновь открыть канал для подстановки команд (файловый " +#~ "дексриптор %d): %s" + +#~ msgid "$%c: unbound variable" +#~ msgstr "$%c: не заданы границы" + +#~ msgid "%s: bad arithmetic substitution" +#~ msgstr "%s: неверная арифметическая подстановка" + +#~ msgid "-%s: binary operator expected" +#~ msgstr "-%s: ожидается бинарная операция" + +#~ msgid "%s[%s: bad subscript" +#~ msgstr "%s[%s: неверный индекс" + +#~ msgid "[%s: bad subscript" +#~ msgstr "[%s: неверный индекс" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "" +#~ "xmalloc: невозможно заново выделить %lu байтов (выделено %lu байтов)" + +#~ msgid "digits occur in two different argv-elements.\n" +#~ msgstr "цифры встречаются в двух разных элементах argv.\n" + +#~ 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 "параметр c со значением `%s'\n" + +#~ msgid "?? sh_getopt returned character code 0%o ??\n" +#~ msgstr "?? sh_getopt вернула код символа 0%o ??\n" + +#~ msgid "non-option ARGV-elements: " +#~ msgstr "элементы ARGV, не являющиеся параметрами: " + +#~ msgid "%s: Unknown flag %s.\n" +#~ msgstr "%s: Неизвестный флаг %s.\n" + +#~ msgid "Unknown directive `%s'" +#~ 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 уже есть название документации (%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 приглашение] [-a массив] [-e] [имя ...]" + +#~ msgid "%[DIGITS | WORD] [&]" +#~ msgstr "%[ЦИФРЫ | СЛОВО] [&]" + +#~ msgid "variables - Some variable names and meanings" +#~ msgstr "variables -- Имена и смысл некоторых переменных" + +#~ msgid "`alias' with no arguments or with the -p option prints the list" +#~ msgstr "`alias' без аргументов или с параметром -p выводит на стандартный" + +#~ 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 "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 "следующее слово проверяется на подстановку псевдокоманд. Alias" + +#~ msgid "true unless a NAME is given for which no alias has been defined." +#~ msgstr "" +#~ "возвращает true, если только не задано ИМЯ, для которого нет псевдокоманд." + +#~ msgid "" +#~ "Remove NAMEs from the list of defined aliases. If the -a option is given," +#~ msgstr "" +#~ "Удаляет ИМЕНА из списка определённых псевдокоманд. Если задан параметр -a," + +#~ msgid "then remove all alias definitions." +#~ msgstr "удаляет все определения псевдокоманд." + +#~ msgid "Bind a key sequence to a Readline function, or to a macro. The" +#~ msgstr "" +#~ "Связывает последовательность клавиш с функцией Readline или с макросом." + +#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be" +#~ msgstr "Синтаксис тот же, что и в ~/.inputrc, но должен передаваться" + +#~ msgid "" +#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'." +#~ msgstr "одним аргументом: bind '\"\\C-x\\C-r\": re-read-init-file'." + +#~ msgid "Arguments we accept:" +#~ msgstr "Принимаемые аргументы:" + +#~ msgid "" +#~ " -m keymap Use `keymap' as the keymap for the duration of this" +#~ msgstr "" +#~ " -m раскладка Использовать во время работы программы указанную" + +#~ msgid " command. Acceptable keymap names are emacs," +#~ msgstr " раскладку. Допустимые имена раскладок: 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 и vi-insert." + +#~ msgid " -l List names of functions." +#~ msgstr " -l Вывести список имён функций." + +#~ msgid " -P List function names and bindings." +#~ msgstr " -P Вывести список имён функций и связей." + +#~ msgid "" +#~ " -p List functions and bindings in a form that can be" +#~ msgstr " -p Вывести список имён функций и связей в виде," + +#~ msgid " reused as input." +#~ msgstr " который можно использовать на входе." + +#~ msgid " -r keyseq Remove the binding for KEYSEQ." +#~ msgstr " -r послед_клавиш Удалить связь для `послед_клавиш'." + +#~ msgid " -f filename Read key bindings from FILENAME." +#~ msgstr " -f имя_файла Прочесть связи из файла." + +#~ msgid "" +#~ " -q function-name Query about which keys invoke the named function." +#~ msgstr "" +#~ " -q имя_функции Запрос, какие клавиши вызовут указанную функцию." + +#~ msgid " -V List variable names and values" +#~ msgstr " -V Вывести список имён и значений переменных." + +#~ msgid "" +#~ " -v List variable names and values in a form that can" #~ msgstr "" -#~ "���������� ������ ���������� �������������� ����������� ����� ����� � " -#~ "�������." +#~ " -v Вывести список имён и значений переменных в виде," + +#~ msgid " be reused as input." +#~ msgstr " который можно использовать на входе" + +#~ msgid "" +#~ " -S List key sequences that invoke macros and their " +#~ "values" +#~ msgstr "" +#~ " -S Вывести список последовательностей клавиш, " +#~ "вызывающих макросы и их значений." + +#~ msgid "" +#~ " -s List key sequences that invoke macros and their " +#~ "values in" +#~ msgstr "" +#~ " -s Вывести список последовательностей клавиш, вызывающих " +#~ "макросы" + +#~ msgid " a form that can be reused as input." +#~ msgstr "" +#~ " и их значений в виде, который можно использовать на " +#~ "входе" + +#~ msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," +#~ msgstr "Выйти из цикла FOR, WHILE или UNTIL. Если указано N," + +#~ msgid "break N levels." +#~ msgstr "выйти из N вложенных уровней." + +#~ msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." +#~ msgstr "Перейти к следующей итерации цикла FOR, WHILE или UNTIL." + +#~ msgid "If N is specified, resume at the N-th enclosing loop." +#~ msgstr "Если задано N, перейти к N-му обрамляющему циклу." + +#~ msgid "Run a shell builtin. This is useful when you wish to rename a" +#~ msgstr "Выполнить встроенную команду оболочки. Это полезно, если вы хотите" + +#~ msgid "shell builtin to be a function, but need the functionality of the" +#~ msgstr "создать функцию с именем встроенной команды, но хотите сохранить" + +#~ msgid "builtin within the function itself." +#~ msgstr "возможность использования команды из самой функции" + +#~ msgid "Change the current directory to DIR. The variable $HOME is the" +#~ msgstr "Изменить текущий каталог на заданный. Переменная $HOME содержит" + +#~ msgid "default DIR. The variable $CDPATH defines the search path for" +#~ msgstr "" +#~ "каталог по умолчанию. Переменная $CDPATH определяет путь, в котором" + +#~ msgid "the directory containing DIR. Alternative directory names in CDPATH" +#~ msgstr "" +#~ "ищется каталог, содержащий КАТАЛОГ. Альтернативные каталоги в CDPATH" + +#~ msgid "are separated by a colon (:). A null directory name is the same as" +#~ msgstr "" +#~ "разделяются точкой с запятой (:). Пустое имя каталога -- то же самое," + +#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," +#~ msgstr "" +#~ "что текущий каталог, т.е. `.'. Если КАТАЛОГ начинается с дроби (/)," + +#~ msgid "then $CDPATH is not used. If the directory is not found, and the" +#~ msgstr "" +#~ "$CDPATh не используется. Если каталог не найден, и установлен параметр" + +#~ msgid "shell option `cdable_vars' is set, then try the word as a variable" +#~ msgstr "" +#~ "оболочки `cdable_vars', делается попытка интерпретировать это слово как " +#~ "имя" + +#~ msgid "name. If that variable has a value, then cd to the value of that" +#~ msgstr "" +#~ "переменной. Если эта переменная имеет значение, каталог меняется на это" + +#~ msgid "" +#~ "variable. The -P option says to use the physical directory structure" +#~ msgstr "" +#~ "значение. Параметр -P указывает использовать физическую структуру " +#~ "каталогов," + +#~ msgid "" +#~ "instead of following symbolic links; the -L option forces symbolic links" +#~ msgstr "" +#~ "а не следовать символчиеским ссылкам, параметр -L заставляет следовать" + +#~ msgid "to be followed." +#~ msgstr "символическим ссылкам." + +#~ msgid "Print the current working directory. With the -P option, pwd prints" +#~ msgstr "" +#~ "Вывести имя текущего рабочего каталога. С параметром -P pwd выводит" + +#~ msgid "the physical directory, without any symbolic links; the -L option" +#~ msgstr "" +#~ "физический каталог, без символических ссылок, параметр -L заставляет" + +#~ msgid "makes pwd follow symbolic links." +#~ msgstr "pwd следовать символическим ссылкам." + +#~ msgid "" +#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" +#~ msgstr "" +#~ "Выполняет КОМАНДУ с АРГУМЕНТАМИ, игнорируя функции оболочки. Если у вас " +#~ "есть" + +#~ msgid "function called `ls', and you wish to call the command `ls', you can" +#~ msgstr "" +#~ "функция оболочки `ls', а вы хотите вызвать команду `ls', можно " +#~ "использовать" + +#~ msgid "" +#~ "say \"command ls\". If the -p option is given, a default value is used" +#~ msgstr "" +#~ "\"command ls\". Если задан параметр -p, используется значение $PATH" + +#~ msgid "" +#~ "for PATH that is guaranteed to find all of the standard utilities. If" +#~ msgstr "по умолчанию, что гарантирует отыскание стандартных утилит. Если" + +#~ msgid "" +#~ "the -V or -v option is given, a string is printed describing COMMAND." +#~ msgstr "задан параметр -V или -v, выводится строка, описывающая КОМАНДУ." + +#~ msgid "The -V option produces a more verbose description." +#~ msgstr "Параметр -V создаёт более подробное описание." + +#~ msgid "Declare variables and/or give them attributes. If no NAMEs are" +#~ msgstr "" +#~ "Объявляет переменные и/или придаёт им атрибуты. Если не заданы ИМЕНА," + +#~ msgid "given, then display the values of variables instead. The -p option" +#~ msgstr "выводит вместо этого значения переменных. Параметр -p выведет" + +#~ msgid "will display the attributes and values of each NAME." +#~ msgstr "атрибуты и значения каждого ИМЕНИ." + +#~ msgid "The flags are:" +#~ msgstr "Флаги:" + +#~ msgid " -a\tto make NAMEs arrays (if supported)" +#~ msgstr " -a\tсчитать ИМЕНА массивами (если поддерживаются)" + +#~ msgid " -f\tto select from among function names only" +#~ msgstr " -f\tискать только среди имён функций" + +#~ msgid " -F\tto display function names without definitions" +#~ msgstr " -F\tпоказать имена функций без определений" + +#~ msgid " -r\tto make NAMEs readonly" +#~ msgstr " -r\tсделать ИМЕНА переменными только для чтения" + +#~ msgid " -x\tto make NAMEs export" +#~ msgstr " -x\tпозволить экспорт ИМЁН" + +#~ msgid " -i\tto make NAMEs have the `integer' attribute set" +#~ msgstr " -i\tпридать ИМЕНАМ набор атрибутов `integer' (целочисленный)" + +#~ msgid "Variables with the integer attribute have arithmetic evaluation (see" +#~ msgstr "Для переменных с атрибутом `integer' арифметические вычисления (см." + +#~ msgid "`let') done when the variable is assigned to." +#~ msgstr "`let') выполняются при присвоении переменной значения." + +#~ msgid "When displaying values of variables, -f displays a function's name" +#~ msgstr "При выводе значений переменных -f выводит имя и определение" + +#~ msgid "and definition. The -F option restricts the display to function" +#~ msgstr "функции. Параметр -F ограничивает вывод именем" + +#~ msgid "name only." +#~ msgstr "функции." + +#~ msgid "" +#~ "Using `+' instead of `-' turns off the given attribute instead. When" +#~ msgstr "Использование `+' вместо `-' выключает заданный атрибут. При" + +#~ msgid "used in a function, makes NAMEs local, as with the `local' command." +#~ msgstr "" +#~ "использовании в функции делает ИМЕНа локальными, как команда `local'." + +#~ msgid "Obsolete. See `declare'." +#~ msgstr "Устарела. См. `declare'." + +#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL" +#~ msgstr "Создать локальную переменную ИМЯ и придать ей ЗНАЧЕНИЕ. LOCAL" + +#~ msgid "have a visible scope restricted to that function and its children." +#~ msgstr "область видимости ИМЕНИ этой функцией и её потомками." + +#~ msgid "Output the ARGs. If -n is specified, the trailing newline is" +#~ msgstr "Выводит АРГУМЕНТЫ. Если задано -n, подавляется завершающий переход" + +#~ msgid "suppressed. If the -e option is given, interpretation of the" +#~ msgstr "" +#~ "на новую строку. Если задан параметр -e, интерпретируются следующие" + +#~ msgid "following backslash-escaped characters is turned on:" +#~ msgstr "экранированные символы:" + +#~ msgid "\t\\a\talert (bell)" +#~ msgstr "\t\\a\tпредупреждение (звонок)" + +#~ msgid "\t\\b\tbackspace" +#~ msgstr "\t\\b\tзабой (откат)" + +#~ msgid "\t\\c\tsuppress trailing newline" +#~ msgstr "\t\\c\tподавить завершающий переход на новую строку" + +#~ msgid "\t\\E\tescape character" +#~ msgstr "\t\\E\tэкранировать символ" + +#~ msgid "\t\\f\tform feed" +#~ msgstr "\t\\f\tсдвиг на следующую строку" + +#~ msgid "\t\\n\tnew line" +#~ msgstr "\t\\n\tновая строка" + +#~ msgid "\t\\r\tcarriage return" +#~ msgstr "\t\\r\tвозврат каретки" + +#~ msgid "\t\\t\thorizontal tab" +#~ msgstr "\t\\t\tгоризонтальная табуляция" + +#~ msgid "\t\\v\tvertical tab" +#~ msgstr "\t\\v\tвертикальная табуляция" + +#~ msgid "\t\\\\\tbackslash" +#~ msgstr "\t\\\\\tобратная косая черта" + +#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." +#~ msgstr "\t\\число\tсимвол, восьмеричный ASCII-код которого равен ЧИСЛУ" + +#~ msgid "" +#~ "You can explicitly turn off the interpretation of the above characters" +#~ msgstr "Вы можете явно выключить интерпретацию вышеприведённых символов" + +#~ msgid "with the -E option." +#~ msgstr "параметром -E." + +#~ msgid "" +#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed." +#~ msgstr "" +#~ "Выводит АРГУМЕНТЫ. Если задано -n, подавляется завершающий переход на " +#~ "новую строку." + +#~ msgid "Enable and disable builtin shell commands. This allows" +#~ msgstr "Включает и блокирует встроенные команды оболочки. Это позволяет" + +#~ msgid "you to use a disk command which has the same name as a shell" +#~ msgstr "использовать внешние команды с теми же именами, что команды" + +#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise" +#~ msgstr "" +#~ "оболочки. При использовании -n ИМЕНА блокируются, в противном случае" + +#~ msgid "NAMEs are enabled. For example, to use the `test' found on your" +#~ msgstr "" +#~ "включаются. Например, чтобы использовать файл `test', а не встроенную" + +#~ msgid "path instead of the shell builtin version, type `enable -n test'." +#~ msgstr "в оболочку версию, введите enable -n test'. На системах," + +#~ msgid "On systems supporting dynamic loading, the -f option may be used" +#~ msgstr "поддерживающих динамическую загрузку можно использовать параметр -f" + +#~ msgid "to load new builtins from the shared object FILENAME. The -d" +#~ msgstr "" +#~ "чтобы загрузить новые встроенные команды из разделяемого объекта ФАЙЛ." + +#~ msgid "option will delete a builtin previously loaded with -f. If no" +#~ msgstr "Параметр -d удаляет команды, загруженные -f. Если имена, кроме" + +#~ msgid "non-option names are given, or the -p option is supplied, a list" +#~ msgstr "как в параметрах, не заданы, или если задан параметр -p, выводится" + +#~ msgid "of builtins is printed. The -a option means to print every builtin" +#~ msgstr "" +#~ "список встроенных команд. Параметр -a требует вывести все встроенные" + +#~ msgid "with an indication of whether or not it is enabled. The -s option" +#~ msgstr "команды с информацией, блокированы ли они. Параметр -s выводит" + +#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n" +#~ msgstr "только `специальные' команды Posix.2. Параметр -n выводит список" + +#~ msgid "option displays a list of all disabled builtins." +#~ msgstr "всех блокированных встроенных команд." + +#~ msgid "" +#~ "Read ARGs as input to the shell and execute the resulting command(s)." +#~ msgstr "" +#~ "Читает АРГУМЕНТЫ как входной текст оболочки и выполняет полученные " +#~ "команды." + +#~ msgid "Getopts is used by shell procedures to parse positional parameters." +#~ msgstr "" +#~ "Getopts используется процедурами оболочки для анализа параметров командной" + +#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter" +#~ msgstr "строки. СТРОКА_ПАРАМЕТРОВ содержит буквы параметров, которые нужно" + +#~ msgid "is followed by a colon, the option is expected to have an argument," +#~ msgstr "" +#~ "распознать. Если за буквой следует двоеточие, параметр должен иметь" + +#~ msgid "which should be separated from it by white space." +#~ msgstr "аргумент, отделённый от него промежутком." + +#~ msgid "Each time it is invoked, getopts will place the next option in the" +#~ msgstr "При каждом вызове getopts помещает следующий параметр в переменную" + +#~ msgid "shell variable $name, initializing name if it does not exist, and" +#~ msgstr "оболочки $имя, инициализируя имя, если оно не существует, а индекс" + +#~ msgid "the index of the next argument to be processed into the shell" +#~ msgstr "следующего аргумента в переменную оболочки OPTIND. OPTIND" + +#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" +#~ msgstr "" +#~ "принимает значение 1 при каждом вызове оболочки или скрипта оболочки." + +#~ msgid "a shell script is invoked. When an option requires an argument," +#~ msgstr "Если параметр требует аргумента, getopts помещает этот аргумент" + +#~ msgid "getopts places that argument into the shell variable OPTARG." +#~ msgstr "в переменную оболочки OPTARG." + +#~ msgid "getopts reports errors in one of two ways. If the first character" +#~ msgstr "" +#~ "getopts сообщает об ошибках одним из двух способов. Если первый символ" + +#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" +#~ msgstr "" +#~ "OPTSTRING -- двоеточие, getopts использует бесшумный способ. В этом" + +#~ msgid "this mode, no error messages are printed. If an illegal option is" +#~ msgstr "случае сообщения об ошибках не выводятся. Если найден недопустимый" + +#~ msgid "seen, getopts places the option character found into OPTARG. If a" +#~ msgstr "" +#~ "параметр, getopts помещает найденный символ в OPTARG. Если не найден" + +#~ msgid "required argument is not found, getopts places a ':' into NAME and" +#~ msgstr "требуемый аргумент, getopts помещает в ИМЯ ':', а в OPTARG --" + +#~ msgid "sets OPTARG to the option character found. If getopts is not in" +#~ msgstr "найденный символ. Если getopts работает не в бесшумном режиме" + +#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into" +#~ msgstr "и обнаружен недопустимый параметр, getopts помещает в ИМЯ '?', и" + +#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'" +#~ msgstr "сбрасывает OPTARG. Если не найден требуемый параметр, в ИМЯ" + +#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" +#~ msgstr "помещается '?', OPTARG сбрасывается, и выводится диагностическое" + +#~ msgid "printed." +#~ msgstr "сообщение." + +#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the" +#~ msgstr "Если переменная оболочки OPTERR имеет значение 0, getopts блокирует" + +#~ msgid "printing of error messages, even if the first character of" +#~ msgstr "вывод сообщений об ошибках, даже если первый символ OPTSTRING" + +#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." +#~ msgstr "не двоеточие. По умолчанию OPTERR имеет значение 1." + +#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if" +#~ msgstr "Getopts обычно разбирает позиционные параметры ($0 - $9), но если" + +#~ msgid "more arguments are given, they are parsed instead." +#~ msgstr "заданы дополнительные аргументы, вместо этого разбираются они" + +#~ msgid "Exec FILE, replacing this shell with the specified program." +#~ msgstr "Запустить ФАЙЛ, замещая эту копию оболочки указанной программой." + +#~ msgid "If FILE is not specified, the redirections take effect in this" +#~ msgstr "Если ФАЙЛ не задан, могут быть переназначены файловые дескрипторы." + +#~ msgid "shell. If the first argument is `-l', then place a dash in the" +#~ msgstr "Если первый аргумент `-l', в начало нулевого аргумента, переданного" + +#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option" +#~ msgstr "ФАЙЛУ, добавляется `-', как при работе login. Если задан параметр" + +#~ msgid "is supplied, FILE is executed with a null environment. The `-a'" +#~ msgstr "`-c', ФАЙЛ выполняется в пустой среде. Параметр `-a' устанавливает" + +#~ msgid "option means to make set argv[0] of the executed process to NAME." +#~ msgstr "argv[0] запущенного процесса в ИМЯ." + +#~ msgid "If the file cannot be executed and the shell is not interactive," +#~ msgstr "Если файл не может быть запущен, а оболочка не интерактивна," + +#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\"" +#~ msgstr "" +#~ "производится выход из оболочки, если только не установлена переменная" + +#~ msgid "is set." +#~ msgstr "\"no_exit_on_failed_exec\"" + +#~ msgid "is that of the last command executed." +#~ msgstr "завершения будет таким же, как у последней выполненной команды." + +#~ msgid "" +#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a" +#~ msgstr "" +#~ "ПЕРВАЯ и ПОСЛЕДНЯЯ могут быть числами, ограничивающими диапазон, или" + +#~ msgid "string, which means the most recent command beginning with that" +#~ msgstr "же ПЕРВАЯ может быть строкой, означающей самую недавнюю команду," + +#~ msgid "string." +#~ msgstr "начинающуюся с этой строки." + +#~ msgid "" +#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," +#~ msgstr "" +#~ " -e ИМЯ_РЕДАКТОРА выбирает используемый редактор. По умолчанию FCEDIT," + +#~ msgid "" +#~ " then the editor which corresponds to the current readline editing" +#~ msgstr " затем EDITOR, затем редактор, соответствуюший текущему режиму" + +#~ msgid " mode, then vi." +#~ msgstr " редактирования readline, затем vi." + +#~ msgid " -l means list lines instead of editing." +#~ msgstr " -l вывести, а не редактировать строки." + +#~ msgid " -n means no line numbers listed." +#~ msgstr " -n не выводить номера строк." + +#~ msgid "" +#~ " -r means reverse the order of the lines (making it newest listed " +#~ "first)." +#~ msgstr " -r вывести строки в обратном порядке (в начале самые новые)." + +#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" +#~ msgstr "" +#~ "В формате `fc -s [шаблон=замена] [команда] команда выполняется заново" + +#~ msgid "re-executed after the substitution OLD=NEW is performed." +#~ msgstr "после того, как произведена подстановка." + +#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" +#~ msgstr "Полезная псевдокоманда -- r='fc -s', так `r cc' выполняет последнюю" + +#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes" +#~ msgstr "команду, начинающуюся с `cc', а `r' заново выполняет последнюю" + +#~ msgid "Place JOB_SPEC in the foreground, and make it the current job. If" +#~ msgstr "" +#~ "Возвращает задачу с указанным номером из фонового режима и делает её" + +#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is" +#~ msgstr "текущей задачей. Если номер не задан, используется представление" + +#~ msgid "used." +#~ msgstr "оболочки о текущей задаче." + +#~ msgid "Place JOB_SPEC in the background, as if it had been started with" +#~ msgstr "" +#~ "Переводит задачу с указанным номером в фоновый режим, как если бы она" + +#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" +#~ msgstr "" +#~ "была запущена с `&'. Если номер не задан, используется представление" + +#~ msgid "job is used." +#~ msgstr "оболочки о текущей задаче." + +#~ msgid "For each NAME, the full pathname of the command is determined and" +#~ msgstr "Для каждого ИМЕНИ определяются и запоминаются полные пути команды." + +#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the" +#~ msgstr "Если задан параметр -p, в качестве пути используется заданный, а" + +#~ msgid "full pathname of NAME, and no path search is performed. The -r" +#~ msgstr "поиск не выполняется. Параметр -r заставляет оболочку очистить" + +#~ msgid "option causes the shell to forget all remembered locations. If no" +#~ msgstr "список положений в памяти. Если аргументы не заданы, выводится" + +#~ msgid "" +#~ "arguments are given, information about remembered commands is displayed." +#~ msgstr "информация о запомненных командах." + +#~ msgid "Display helpful information about builtin commands. If PATTERN is" +#~ msgstr "" +#~ "Вывести полезную информацию о встроенных командах. Если задан ШАБЛОН," + +#~ msgid "specified, gives detailed help on all commands matching PATTERN," +#~ msgstr "" +#~ "вывести подробную справку по всем командам, соответствующим ШАБЛОНУ," + +#~ msgid "otherwise a list of the builtins is printed." +#~ msgstr "в противном случае вывести список встроенных команд." + +#~ msgid "Display the history list with line numbers. Lines listed with" +#~ msgstr "Вывести историю команд в виде списка с номерами строк. Изменённые" + +#~ msgid "with a `*' have been modified. Argument of N says to list only" +#~ msgstr "" +#~ "строки помечаются символом `*'. Аргумент N указывает выводить только" + +#~ msgid "the last N lines. The -c option causes the history list to be" +#~ msgstr "последние N строк. Параметр -c очищает историю команд, удаляя" + +#~ msgid "" +#~ "cleared by deleting all of the entries. The `-w' option writes out the" +#~ msgstr "все строки. Параметр `-w' записывает текущую историю в указанный" + +#~ msgid "" +#~ "current history to the history file; `-r' means to read the file and" +#~ msgstr "файл; `-r' читает такой файл и дополняет его содержимым историю" + +#~ msgid "append the contents to the history list instead. `-a' means" +#~ msgstr "команд. `-a' добавляет историю этой сессии к файлу истории" + +#~ msgid "to append history lines from this session to the history file." +#~ msgstr "команд. Аргумент `-n' читает из файла истории все строки, не" + +#~ msgid "Argument `-n' means to read all history lines not already read" +#~ msgstr "прочитанные ранее, и добавляет их к истории. Если задан ФАЙЛ," + +#~ msgid "from the history file and append them to the history list. If" +#~ msgstr "в качестве файла истории команд используется он, иначе, если" + +#~ msgid "FILENAME is given, then that is used as the history file else" +#~ msgstr "переменной $HISTFILE присвоено значение, используется оно, иначе" + +#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." +#~ msgstr "используется ~/.bash_history. Если задан параметр -s, АРГУМЕНТЫ," + +#~ msgid "If the -s option is supplied, the non-option ARGs are appended to" +#~ msgstr "являющиеся параметрами, добавляются к истории как один элемент." + +#~ msgid "the history list as a single entry. The -p option means to perform" +#~ msgstr "Параметр -p выполняет развёртывание каждого АРГУМЕНТА и выводит" + +#~ msgid "" +#~ "history expansion on each ARG and display the result, without storing" +#~ msgstr "результат, не сохраняя ничего в списке истории команд." + +#~ msgid "anything in the history list." +#~ msgstr " " + +#~ msgid "Lists the active jobs. The -l option lists process id's in addition" +#~ msgstr "Выводит список активных задач. Параметр -l выводит, кроме того," + +#~ msgid "to the normal information; the -p option lists process id's only." +#~ msgstr "идентификаторы процессов: параметр -p выодит только идентификаторы." + +#~ msgid "" +#~ "If -n is given, only processes that have changed status since the last" +#~ msgstr "Если задано -n, выводятся только процессы, статус которых изменился" + +#~ msgid "" +#~ "notification are printed. JOBSPEC restricts output to that job. The" +#~ msgstr "" +#~ "со времени последнего уведомления. Если задан номер задачи, выводится" + +#~ msgid "-r and -s options restrict output to running and stopped jobs only," +#~ msgstr "только она. Параметры -r и -s выводит только работающие или только" + +#~ msgid "respectively. Without options, the status of all active jobs is" +#~ msgstr "" +#~ "остановленные задачи соответственно. Без параметров выодится статус" + +#~ msgid "" +#~ "printed. If -x is given, COMMAND is run after all job specifications" +#~ msgstr "" +#~ "всех активных задач. Если задано -x, в КОМАНДЕ вместо всех АРГУМЕНТОВ" + +#~ msgid "" +#~ "that appear in ARGS have been replaced with the process ID of that job's" +#~ msgstr "(номеров задач) подставляется идентификатор лидера соответствующей" + +#~ msgid "process group leader." +#~ msgstr "группы процессов, и КОМАНДА выполняется." + +#~ msgid "Removes each JOBSPEC argument from the table of active jobs." +#~ msgstr "" +#~ "Удаляет все задачи, заданные спецификациями в аргументе, из таблицы задач." + +#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" +#~ msgstr "" +#~ "Посылает указанным процессам (заданным PID или спецификацией) сигнал" + +#~ msgid "" +#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" +#~ msgstr "SIGSPEC. Если отсутствует SIGSPEC, посылается SIGTERM. Аргументом" + +#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to" +#~ msgstr "" +#~ "параметра `-l' служит список сигналов. Если он присутствует, выводятся" + +#~ msgid "be signal numbers for which names should be listed. Kill is a shell" +#~ msgstr "" +#~ "названия сигналов с этими номерами. Kill является встроенной командой" + +#~ msgid "builtin for two reasons: it allows job IDs to be used instead of" +#~ msgstr "оболочки по двум причинам: она позволяет использовать номера задач," + +#~ msgid "process IDs, and, if you have reached the limit on processes that" +#~ msgstr "а не процессов, и если вы исчерпаете лимит созданных процессов," + +#~ msgid "" +#~ "you can create, you don't have to start a process to kill another one." +#~ msgstr "вы не сможете запустить новый процесс, уничтожающий один из старых." + +#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" +#~ msgstr "Каждый аргумент рассматривается как арифметическое выражение." + +#~ msgid "is done in long integers with no check for overflow, though division" +#~ msgstr "" +#~ "Вычисление производится над длинными целыми без контроля переполнения," + +#~ msgid "by 0 is trapped and flagged as an error. The following list of" +#~ msgstr "хотя деление на ноль отслеживается и считается ошибкой. Операции в" + +#~ msgid "operators is grouped into levels of equal-precedence operators." +#~ msgstr "следующем списке сгруппированы по уровням равного приоритета." + +#~ msgid "The levels are listed in order of decreasing precedence." +#~ msgstr "Уровни перечислены в порядке уменьшения приоритета." + +#~ msgid "\t-, +\t\tunary minus, plus" +#~ msgstr "\t-, +\t\tунарный минус, унарный плюс" + +#~ msgid "\t!, ~\t\tlogical and bitwise negation" +#~ msgstr "\t!, ~\t\tлогическое и побитовое отрицание" + +#~ msgid "\t*, /, %\t\tmultiplication, division, remainder" +#~ msgstr "\t*, /, %\t\tумножение, деление, взятие остатка" + +#~ msgid "\t+, -\t\taddition, subtraction" +#~ msgstr "\t+, -\t\tсложение, вычитание" + +#~ msgid "\t<<, >>\t\tleft and right bitwise shifts" +#~ msgstr "\t<<, >>\t\tлевый и правый побитовый сдвиг" + +#~ msgid "\t<=, >=, <, >\tcomparison" +#~ msgstr "\t<=, >=, <, >\tсравнение" + +#~ msgid "\t==, !=\t\tequality, inequality" +#~ msgstr "\t==, !=\t\tравенство, неравенство" + +#~ msgid "\t&\t\tbitwise AND" +#~ msgstr "\t&\t\tпобитовое И" + +#~ msgid "\t^\t\tbitwise XOR" +#~ msgstr "\t^\t\tпобитовое ИСКЛЮЧАЮЩЕЕ ИЛИ" + +#~ msgid "\t|\t\tbitwise OR" +#~ msgstr "\t|\t\tпобитовое ИЛИ" + +#~ msgid "\t&&\t\tlogical AND" +#~ msgstr "\t&&\t\tлогическое И" + +#~ msgid "\t||\t\tlogical OR" +#~ msgstr "\t||\t\tлогическое ИЛИ" + +#~ msgid "\texpr ? expr : expr" +#~ msgstr "\texpt ? expr : expr" + +#~ msgid "\t\t\tconditional expression" +#~ msgstr "\t\t\tусловное выражение" + +#~ msgid "\t=, *=, /=, %=," +#~ msgstr "\t=, *=, /=, %=," + +#~ msgid "\t+=, -=, <<=, >>=," +#~ msgstr "\t+=, -=, <<=, >>=," + +#~ msgid "\t&=, ^=, |=\tassignment" +#~ msgstr "\t&=, ^=, |=\tприсваивание" + +#~ msgid "is replaced by its value (coerced to a long integer) within" +#~ msgstr "переменной заменяется её значение (преобразованным в длинное" + +#~ msgid "an expression. The variable need not have its integer attribute" +#~ msgstr "целое). Для использования в выражении переменная не обязана иметь" + +#~ msgid "turned on to be used in an expression." +#~ msgstr "установленный целочисленный атрибут." + +#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in" +#~ msgstr "Операции обрабатываются в порядке приоритета. Подвыражения в" + +#~ msgid "parentheses are evaluated first and may override the precedence" +#~ msgstr "скобках вычисляются вначале, что может не соответствовать правилам" + +#~ msgid "rules above." +#~ msgstr "приоритета." + +#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" +#~ msgstr "Если вычисление последнего аргумента дало 0, let возвращает 1," + +#~ msgid "otherwise." +#~ msgstr "иначе 0." + +#~ msgid "One line is read from the standard input, and the first word is" +#~ msgstr "Со стандартного ввода считывается одна строка, первое её слово" + +#~ msgid "" +#~ "assigned to the first NAME, the second word to the second NAME, and so" +#~ msgstr "становится значением первого ИМЕНИ, второе -- второго ИМЕНИ и т.д." + +#~ msgid "" +#~ "on, with leftover words assigned to the last NAME. Only the characters" +#~ msgstr "" +#~ "Последнему ИМЕНИ присваивается весь остаток строки. Разделителями слов" + +#~ msgid "found in $IFS are recognized as word delimiters. The return code is" +#~ msgstr "считаются только символы, входящие в $IFS. Код возврата равен нулю," + +#~ msgid "" +#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the" +#~ msgstr "за исключением случая, если встретился конец файла. Если ИМЕНА не" + +#~ msgid "" +#~ "line read is stored in the REPLY variable. If the -r option is given," +#~ msgstr "" +#~ "заданы, прочитанная строка помещается в переменную REPLY. Если задан" + +#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If" +#~ msgstr "" +#~ "параметр -r, это означает `сырой' ввод, т.е. символ \\ не экранирует" + +#~ msgid "the `-p' option is supplied, the string supplied as an argument is" +#~ msgstr "" +#~ "символы. Если задано `-p', перед чтением на вывод в качестве аргумента" + +#~ msgid "" +#~ "output without a trailing newline before attempting to read. If -a is" +#~ msgstr "" +#~ "подаётся заданная строка (без завершающего символа перевода строки)." + +#~ msgid "" +#~ "supplied, the words read are assigned to sequential indices of ARRAY," +#~ msgstr "Если задано -a, прочитанные слова становятся значениями элементов" + +#~ msgid "starting at zero. If -e is supplied and the shell is interactive," +#~ msgstr "" +#~ "МАССИВА, начиная с нулевого. Если задано -c и оболочка интерактивна," + +#~ msgid "readline is used to obtain the line." +#~ msgstr "чтобы получить строку используется readline." + +#~ msgid "" +#~ "Causes a function to exit with the return value specified by N. If N" +#~ msgstr "Заставляет функцию завершить работу с кодом возврата, заданным N." + +#~ msgid "is omitted, the return status is that of the last command." +#~ msgstr "Если N опущено, им становится код возврата последней команды." + +#~ msgid " -a Mark variables which are modified or created for export." +#~ msgstr "" +#~ " -a Экспортировать переменные, которые изменялись или создавались." + +#~ msgid " -b Notify of job termination immediately." +#~ msgstr " -b Немедленно выводить сообщения о завершении задач." + +#~ msgid " -e Exit immediately if a command exits with a non-zero status." +#~ msgstr " -e Завершить работу, если команд возврата команды не равен 0." + +#~ msgid " -f Disable file name generation (globbing)." +#~ msgstr " -f Прекратить расширение имён файлов (globbing)." + +#~ msgid " -h Remember the location of commands as they are looked up." +#~ msgstr " -h Запоминать расположение обработанных команд." + +#~ msgid "" +#~ " -i Force the shell to be an \"interactive\" one. Interactive shells" +#~ msgstr " -i Сделать оболочку \"интерактивной\". Интерактивные оболочки" + +#~ msgid " always read `~/.bashrc' on startup." +#~ msgstr " читают `~/.bashrc' при каждом запуске." + +#~ msgid " -k All assignment arguments are placed in the environment for a" +#~ msgstr " -k В среду команды помещаются все аргументы присваивания," + +#~ msgid " command, not just those that precede the command name." +#~ msgstr " а не только предшествующие её имени." + +#~ msgid " -m Job control is enabled." +#~ msgstr " -m Включить управление задачами." + +#~ msgid " -n Read commands but do not execute them." +#~ msgstr " -n Считывать команды, но не выполнять их." + +#~ msgid " -o option-name" +#~ msgstr " -o имя_параметра" + +#~ msgid " Set the variable corresponding to option-name:" +#~ msgstr " Установить режим в соответствии с заданным именем:" + +#~ msgid " allexport same as -a" +#~ msgstr " allexport то же, что -a" + +#~ msgid " braceexpand same as -B" +#~ msgstr " braceexpand то же, что -B" + +#~ msgid " emacs use an emacs-style line editing interface" +#~ msgstr "" +#~ " emacs использовать стиль редактирования строк emacs" + +#~ msgid " errexit same as -e" +#~ msgstr " errexit то же, что -e" + +#~ msgid " hashall same as -h" +#~ msgstr " hashall то же, что -h" + +#~ msgid " histexpand same as -H" +#~ msgstr " histexpand то же, что -H" + +#~ msgid " ignoreeof the shell will not exit upon reading EOF" +#~ msgstr " ignoreeof при чтении EOF оболочка не завершит работу" + +#~ msgid " interactive-comments" +#~ msgstr " interactive-comments" + +#~ msgid "" +#~ " allow comments to appear in interactive commands" +#~ msgstr "" +#~ " допускает комментарии в интерактивных командах" + +#~ msgid " keyword same as -k" +#~ msgstr " keyword то же, что -k" + +#~ msgid " monitor same as -m" +#~ msgstr " monitor то же, что -m" + +#~ msgid " noclobber same as -C" +#~ msgstr " noclobber то же, что -C" + +#~ msgid " noexec same as -n" +#~ msgstr " noexec то же, что -n" + +#~ msgid " noglob same as -f" +#~ msgstr " noglob то же, что -f" + +#~ msgid " notify save as -b" +#~ msgstr " notify то же, что -b" + +#~ msgid " nounset same as -u" +#~ msgstr " nounset то же, что -u" + +#~ msgid " onecmd same as -t" +#~ msgstr " onecmd то же, что -t" + +#~ msgid " physical same as -P" +#~ msgstr " physical то же, что -P" + +#~ msgid "" +#~ " posix change the behavior of bash where the default" +#~ msgstr " posix привести поведение bash, по умолчанию не" + +#~ msgid "" +#~ " operation differs from the 1003.2 standard to" +#~ msgstr " соответствующее стандарту 1003.2, в" + +#~ msgid " match the standard" +#~ msgstr " соответствие с ним" + +#~ msgid " privileged same as -p" +#~ msgstr " privileged то же, что -p" + +#~ msgid " verbose same as -v" +#~ msgstr " verbose то же, что -v" + +#~ msgid " vi use a vi-style line editing interface" +#~ msgstr " vi использовать стиль редактирования строк vi" + +#~ msgid " xtrace same as -x" +#~ msgstr " xtrace то же, что -x" + +#~ msgid "" +#~ " -p Turned on whenever the real and effective user ids do not match." +#~ msgstr "" +#~ " -p Если реальный и эффективный uid не совпадают, включается всегда." + +#~ msgid " Disables processing of the $ENV file and importing of shell" +#~ msgstr " Отключает обработку файла $ENV и импорт функций оболочки." + +#~ msgid "" +#~ " functions. Turning this option off causes the effective uid and" +#~ msgstr "" +#~ " При выключении этого параметра эффективные uid и gid становятся" + +#~ msgid " gid to be set to the real uid and gid." +#~ msgstr " равными реальным." + +#~ msgid " -t Exit after reading and executing one command." +#~ msgstr " -t Завершить работу после чтения и выполнения одной команды." + +#~ msgid " -u Treat unset variables as an error when substituting." +#~ msgstr "" +#~ " -u При подстановке считать не установленные переменные ошибками." + +#~ msgid " -v Print shell input lines as they are read." +#~ msgstr " -v Выводить прочитанные строки входного текста оболочки." + +#~ msgid " -x Print commands and their arguments as they are executed." +#~ msgstr " -x Выводить по мере исполнения команд и их аргументы." + +#~ msgid " -B the shell will perform brace expansion" +#~ msgstr " -B оболочка будет производить подстановку скобок" + +#~ msgid " -H Enable ! style history substitution. This flag is on" +#~ msgstr " -H Включить !-стиль подстановки истории. Включено" + +#~ msgid " by default." +#~ msgstr " по умолчанию." + +#~ msgid " -C If set, disallow existing regular files to be overwritten" +#~ msgstr " -C Если установлен, запретить перезапись существующих" + +#~ msgid " by redirection of output." +#~ msgstr " обычных файлов при перенаправлении вывода." + +#~ msgid " -P If set, do not follow symbolic links when executing commands" +#~ msgstr "" +#~ " -P Не следовать символическим ссылкам при выполнении таких команд," + +#~ msgid " such as cd which change the current directory." +#~ msgstr " как cd, т.е. изменяющих текущий каталог." + +#~ msgid "Using + rather than - causes these flags to be turned off. The" +#~ msgstr "Использование + вместо - отключает флаг. Эти флаги могут также" + +#~ msgid "flags can also be used upon invocation of the shell. The current" +#~ msgstr "" +#~ "использоваться при запуске оболочки. Текущий набор флагов содержится" + +#~ msgid "" +#~ "set of flags may be found in $-. The remaining n ARGs are positional" +#~ msgstr "в $-. Остальные n аргументов -- позиционные параметры, и им, по" + +#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" +#~ msgstr "порядку, присваиваются значения $1, $2, ..., $n. Если аргументы" + +#~ msgid "ARGs are given, all shell variables are printed." +#~ msgstr "не заданы, выводятся все переменные оболочки." + +#~ msgid "For each NAME, remove the corresponding variable or function. Given" +#~ msgstr "Для каждого ИМЕНИ удаляет соответствующую переменную или функцию." + +#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag," +#~ msgstr "" +#~ "Если задано -v, unset влияет только на переменные, если -f -- только" + +#~ msgid "unset will only act on functions. With neither flag, unset first" +#~ msgstr "на функции. Без флагов unset в первую очередь пытается удалить" + +#~ msgid "tries to unset a variable, and if that fails, then tries to unset a" +#~ msgstr "переменную, если это не удаётся -- функцию. Некоторые переменные" + +#~ msgid "" +#~ "function. Some variables (such as PATH and IFS) cannot be unset; also" +#~ msgstr "(такие как PATH и IFS) не могут быть удалены. См." + +#~ msgid "see readonly." +#~ msgstr "также readonly." + +#~ msgid "NAMEs are marked for automatic export to the environment of" +#~ msgstr "ИМЕНА автоматически экспортируются в среду выполняемых" + +#~ msgid "subsequently executed commands. If the -f option is given," +#~ msgstr "впоследствии команд. Если задан параметр -f, ИМЕНА" + +#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" +#~ msgstr "обозначают функции. Если ИМЕНа не заданы, или если задано -p," + +#~ msgid "is given, a list of all names that are exported in this shell is" +#~ msgstr "выводится список всех имён, экспортированных в эту оболочку." + +#~ msgid "printed. An argument of `-n' says to remove the export property" +#~ msgstr "Аргумент -n указывает убрать заданные имена из списка" + +#~ msgid "from subsequent NAMEs. An argument of `--' disables further option" +#~ msgstr "экспортируемых. Аргумент -- отключает дальнейшую обработку" + +#~ msgid "processing." +#~ msgstr "параметров." + +#~ msgid "" +#~ "The given NAMEs are marked readonly and the values of these NAMEs may" +#~ msgstr "" +#~ "Заданные ИМЕНА помечаются только для чтения, и значения этих ИМЁН не" + +#~ msgid "not be changed by subsequent assignment. If the -f option is given," +#~ msgstr "" +#~ "могут изменяться в последующих присваиваниях. Если задан параметр -f," + +#~ msgid "then functions corresponding to the NAMEs are so marked. If no" +#~ msgstr "так помечаются функции с соответствующими ИМЕНАМИ. Если аргументы" + +#~ msgid "" +#~ "arguments are given, or if `-p' is given, a list of all readonly names" +#~ msgstr "не заданы, или если задано `-p', выводится список имён только для" + +#~ msgid "" +#~ "is printed. An argument of `-n' says to remove the readonly property" +#~ msgstr "чтения. Аргумент `-n' указывает снять свойство `только для чтения'" + +#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as" +#~ msgstr "с указанных ИМЁН. Параметр `-a' заставляет рассматривать каждое ИМЯ" + +#~ msgid "an array variable. An argument of `--' disables further option" +#~ msgstr "как массив. Аргумент `--' прекращает дальнейшую обработку" + +#~ msgid "" +#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is" +#~ msgstr "" +#~ "Позиционные параметры начиная с $N+1 переобозначаются как $1,... Если" + +#~ msgid "not given, it is assumed to be 1." +#~ msgstr "N не задано, оно предполагается равным 1." + +#~ msgid "Read and execute commands from FILENAME and return. The pathnames" +#~ msgstr "Читает и выполняет команды из файла с заданным именем и завершает" + +#~ msgid "in $PATH are used to find the directory containing FILENAME." +#~ msgstr "работу. Файл ищется в каталогах, перечисленных в $PATH." + +#~ msgid "Suspend the execution of this shell until it receives a SIGCONT" +#~ msgstr "Приостанавливает работу оболочки до получения сигнала" + +#~ msgid "signal. The `-f' if specified says not to complain about this" +#~ msgstr "SIGCONT. `-f', если задан, указывает приостановить работу, даже" + +#~ msgid "being a login shell if it is; just suspend anyway." +#~ msgstr "если это оболочка сессии" + +#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on" +#~ msgstr "Завершает работу со статусом 0 (истина) или 1 (ложь) в зависимости" + +#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" +#~ msgstr "от значения ВЫРАЖЕНИЯ. Выражения могут быть унарными или бинарными." + +#~ msgid "expressions are often used to examine the status of a file. There" +#~ msgstr "Унарные выражения часто используются для проверки состояния файла." + +#~ msgid "are string operators as well, and numeric comparison operators." +#~ msgstr "Допустимы операции как строкового, так и численного сравнения." + +#~ msgid "File operators:" +#~ msgstr "Файловые операции:" + +#~ msgid " -b FILE True if file is block special." +#~ msgstr " -b ФАЙЛ Истина, если файл -- специальный блочный файл." + +#~ msgid " -c FILE True if file is character special." +#~ msgstr "" +#~ " -c ФАЙл Истина, если файл -- специальный символьный файл." + +#~ msgid " -d FILE True if file is a directory." +#~ msgstr " -d ФАЙЛ Истина, если файл -- каталог." + +#~ msgid " -e FILE True if file exists." +#~ msgstr " -e ФАЙЛ Истина, если файл существует." + +#~ msgid " -f FILE True if file exists and is a regular file." +#~ msgstr "" +#~ " -f ФАЙЛ Истина, если файл существует и является обычным файлом." + +#~ msgid " -g FILE True if file is set-group-id." +#~ msgstr " -g ФАЙЛ Истина, если у файла установлен атрибут SGID." + +#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"." +#~ msgstr "" +#~ " -h ФАЙЛ Истина, если файл -- символическая ссылка. Используйте " +#~ "\"-L\"." + +#~ msgid " -L FILE True if file is a symbolic link." +#~ msgstr " -L ФАЙЛ Истина, если файл -- символическая ссылка." + +#~ msgid " -k FILE True if file has its \"sticky\" bit set." +#~ msgstr "" +#~ " -k ФАЙЛ Истина, если у файла устанолвен \"бит привязчивости\"." + +#~ msgid " -p FILE True if file is a named pipe." +#~ msgstr " -p ФАЙЛ Истина, если файл -- именованный канал." + +#~ msgid " -r FILE True if file is readable by you." +#~ msgstr " -r ФАЙЛ Истина, если файл доступен вам для чтения." + +#~ msgid " -s FILE True if file exists and is not empty." +#~ msgstr " -s ФАЙЛ Истина, если файл существует и не пуст." + +#~ msgid " -S FILE True if file is a socket." +#~ msgstr " -S ФАЙЛ Истина, если файл -- сокет." + +#~ msgid " -t FD True if FD is opened on a terminal." +#~ msgstr "" +#~ " -t FD Истина, если файл с дескриптором FD связан с " +#~ "терминалом." + +#~ msgid " -u FILE True if the file is set-user-id." +#~ msgstr " -u ФАЙЛ Истина, если у файла установлен атрибут SUID." + +#~ msgid " -w FILE True if the file is writable by you." +#~ msgstr " -w ФАЙЛ Истина, если файл доступен вам для записи" + +#~ msgid " -x FILE True if the file is executable by you." +#~ msgstr " -x ФАЙЛ Истина, если файл доступен вам для выполнения." + +#~ msgid " -O FILE True if the file is effectively owned by you." +#~ msgstr " -O ФАЙЛ Истина, если вы -- эффективный владелец файла." + +#~ msgid "" +#~ " -G FILE True if the file is effectively owned by your group." +#~ msgstr "" +#~ " -G ФАЙЛ Истина, если ваша группа -- эффективная группа файла." + +#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to" +#~ msgstr "" +#~ " ФАЙЛ1 -nt ФАЙЛ2 Истина, если файл1 более новый (по дате последнего" + +#~ msgid " modification date) file2." +#~ msgstr " изменения), чем файл2." + +#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2." +#~ msgstr " ФАЙЛ1 -ot ФАЙЛ2 Истина, если файл1 более старый, чем файл2." + +#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." +#~ msgstr " ФАЙЛ1 -ef ФАЙЛ2 Истина, если файл1 -- жёсткая ссылка на файл2." + +#~ msgid "String operators:" +#~ msgstr "Строковые операции:" + +#~ msgid " -z STRING True if string is empty." +#~ msgstr " -z СТРОКА Истина, если строка пуста." + +#~ msgid " -n STRING" +#~ msgstr " -n СТРОКА" + +#~ msgid " STRING True if string is not empty." +#~ msgstr " СТРОКА Истина, если стркоа не пуста." + +#~ msgid " STRING1 = STRING2" +#~ msgstr " СТРОКА1 = СТРОКА2" + +#~ msgid " True if the strings are equal." +#~ msgstr " Истина, если строки равны." + +#~ msgid " STRING1 != STRING2" +#~ msgstr " СТРОКА1 != СТРОКА2" + +#~ msgid " True if the strings are not equal." +#~ msgstr " Истина, если строки не равны." + +#~ msgid " STRING1 < STRING2" +#~ msgstr " СТРОКА1 < СТРОКА2" + +#~ msgid "" +#~ " True if STRING1 sorts before STRING2 lexicographically" +#~ msgstr "" +#~ " Истина, если СТРОКА1 лексикографически стоит раньше " +#~ "СТРОКИ2" + +#~ msgid " STRING1 > STRING2" +#~ msgstr " СТРОКА1 > СТРОКА2" + +#~ msgid "" +#~ " True if STRING1 sorts after STRING2 lexicographically" +#~ msgstr "" +#~ " Истина, если СТРОКА1 лексикографически стоит позже " +#~ "СТРОКИ2" + +#~ msgid "Other operators:" +#~ msgstr "Прочие операции:" + +#~ msgid " ! EXPR True if expr is false." +#~ msgstr " ! ВЫРАЖЕНИЕ Истина, если выражение ложно." + +#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." +#~ msgstr " ВЫР1 -a ВЫР2 Истина, если истинны оба выражения." + +#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." +#~ msgstr " ВЫР1 -o ВЫР2 Истина, если истинно хотя бы одно из выражений." + +#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," +#~ msgstr " арг1 ОП арг2 Арифметическая проверка. ОП -- один из -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 "" +#~ "Бинарные арифметические операции возвращают истину, если АРГ1 равен," + +#~ msgid "" +#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" +#~ msgstr "не равен, меньше, меньше или равен, больше или больше или равен" + +#~ msgid "than ARG2." +#~ msgstr "АРГ2." + +#~ msgid "This is a synonym for the \"test\" builtin, but the last" +#~ msgstr "Это синоним встроенной команды \"test\", но последним аргументом" + +#~ msgid "argument must be a literal `]', to match the opening `['." +#~ msgstr "должен быть литерал ']'. соответствующий открывающей `['." + +#~ msgid "Print the accumulated user and system times for processes run from" +#~ msgstr "Вывести пользовательское и системное время работы процессов," + +#~ msgid "the shell." +#~ msgstr "запущенных из оболочки." + +#~ msgid "The command ARG is to be read and executed when the shell receives" +#~ msgstr "" +#~ "Команда АРГ должна быть прочитана и выполнена при получении оболочкой" + +#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" +#~ msgstr "" +#~ "указанного(ых) сигнала(ов). Если АРГ не задан, все указанные сигналы" + +#~ msgid "reset to their original values. If ARG is the null string each" +#~ msgstr "" +#~ "обрабатываются обработчиками по умолчанию. Если АРГ -- пустая строка," + +#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." +#~ msgstr "" +#~ "все указанные сигналы будут игнорироваться оболочкой и вызываемыми ей" + +#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" +#~ msgstr "командами. Если задан сигнал EXIT (0), команда АРГ выполняется при" + +#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every" +#~ msgstr "" +#~ "выходе из оболочки, если DEBUG, АРГ выполняется при выполнении каждой" + +#~ msgid "command. If ARG is `-p' then the trap commands associated with" +#~ msgstr "команды. Если АРГ -- `-p', выводятся команды, связанные с заданными" + +#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" +#~ msgstr "сигналами. Если аргументы не заданы или если задано только `-p'," + +#~ msgid "only `-p' is given, trap prints the list of commands associated with" +#~ msgstr "trap выводит список команд, связанных со всеми сигналами. Сигнал" + +#~ msgid "" +#~ "each signal number. SIGNAL_SPEC is either a signal name in " +#~ msgstr "задаётся либо своим именем в , либо номером. `trap -l'" + +#~ msgid "" +#~ "or a signal number. `trap -l' prints a list of signal names and their" +#~ msgstr "выводит список имён сигналов и соответствующих им номеров." + +#~ msgid "corresponding numbers. Note that a signal can be sent to the shell" +#~ msgstr "Заметьте, что оболочке можно послать сигнал командой" + +#~ msgid "with \"kill -signal $$\"." +#~ msgstr "\"kill -signal $$\"." + +#~ msgid "For each NAME, indicate how it would be interpreted if used as a" +#~ msgstr "Для каждого ИМЕНИ определяет, как оно будет обрабатываться" + +#~ msgid "If the -t option is used, returns a single word which is one of" +#~ msgstr "Если задан параметр -t, возвращает слово -- `alias', `keyword'," + +#~ msgid "" +#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" +#~ msgstr "`function', `builtin', `file' или `' -- если, соответственно, ИМЯ" + +#~ msgid "" +#~ "alias, shell reserved word, shell function, shell builtin, disk file," +#~ msgstr "является псевдокомандой, зарезервированным словом, функцией, или" + +#~ msgid "or unfound, respectively." +#~ msgstr "встроенной командой оболочки, дисковым файлом или не найдено." + +#~ msgid "If the -p flag is used, either returns the name of the disk file" +#~ msgstr "" +#~ "При использовании флага -p либо возвращается имя выполняемого дискового " +#~ "файла," + +#~ msgid "that would be executed, or nothing if -t would not return `file'." +#~ msgstr "либо ничего, если -t вернуло бы значение, отличное от `file'" + +#~ msgid "If the -a flag is used, displays all of the places that contain an" +#~ msgstr "" +#~ "При использовании флага -a выводится расположение всех исполняемых файлов" + +#~ msgid "" +#~ "executable named `file'. This includes aliases and functions, if and" +#~ msgstr "" +#~ "с указанным именем. Если одновременно не используется флаг -p и только" + +#~ msgid "only if the -p flag is not also used." +#~ msgstr "тогда, выводятся также псевдокоманды и функции." + +#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t," +#~ msgstr "Вместо -a, -p и -t можно использовать, соответственно, -all," + +#~ msgid "respectively." +#~ msgstr "-path и -type." + +#~ msgid "Ulimit provides control over the resources available to processes" +#~ msgstr "ulimit позволяет управлять ресурсами, доступными запущенным" + +#~ msgid "started by the shell, on systems that allow such control. If an" +#~ msgstr "оболочкой процессам (на системах, допускающих такое управление)." + +#~ msgid "option is given, it is interpreted as follows:" +#~ msgstr "Параметры интерпретируются следующим образом:" + +#~ msgid " -S\tuse the `soft' resource limit" +#~ msgstr " -S\tиспользовать `мягкое' ограничение ресурсов" + +#~ msgid " -H\tuse the `hard' resource limit" +#~ msgstr " -H\tиспользовать `жёсткое' ограничение ресурсов" + +#~ msgid " -a\tall current limits are reported" +#~ msgstr " -a\tвывести информацию о всех текущих ограничениях" + +#~ msgid " -c\tthe maximum size of core files created" +#~ msgstr " -c\tмаксимальный размер создаваемых файлов слепков памяти" + +#~ msgid " -d\tthe maximum size of a process's data segment" +#~ msgstr " -d\tмаксимальный размер сегмента данных процесса" + +#~ msgid " -m\tthe maximum resident set size" +#~ msgstr " -m\tмаксимальный размер резидентной части процесса" + +#~ msgid " -s\tthe maximum stack size" +#~ msgstr " -s\tмаксимальный размер стека" + +#~ msgid " -t\tthe maximum amount of cpu time in seconds" +#~ msgstr " -t\tмаксимальное процессорное время (в секундах)" + +#~ msgid " -f\tthe maximum size of files created by the shell" +#~ msgstr " -f\tмаксимальный размер создаваемых оболочкой файлов" + +#~ msgid " -p\tthe pipe buffer size" +#~ msgstr " -p\tразмер буфера конвейера" + +#~ msgid " -n\tthe maximum number of open file descriptors" +#~ msgstr " -n\tмаксимальное количество открытых файловых дексрипторов" + +#~ msgid " -u\tthe maximum number of user processes" +#~ msgstr " -u\tмаксимальное число процессов одного пользователя" + +#~ msgid " -v\tthe size of virtual memory" +#~ msgstr " -v\tразмер виртуальной памяти" + +#~ msgid "If LIMIT is given, it is the new value of the specified resource." +#~ msgstr "" +#~ "Если задано ОГРАНИЧЕНИЕ, оно задёт новое значение для указанного ресурса." + +#~ msgid "Otherwise, the current value of the specified resource is printed." +#~ msgstr "" +#~ "В противном случае выводится текущее значение для указанного ресурса." + +#~ msgid "If no option is given, then -f is assumed. Values are in 1k" +#~ msgstr "Если параметры не заданы, предполагается, что задано -f. Значения" + +#~ msgid "increments, except for -t, which is in seconds, -p, which is in" +#~ msgstr "" +#~ "измеряются в КБ, кроме -t, измеряемого в секундах, -p, единица измерения" + +#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of" +#~ msgstr "которого -- 512 байтов, и -u, задающего безразмерное число" + +#~ msgid "processes." +#~ msgstr "процессов." + +#~ msgid "" +#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if" +#~ msgstr "" +#~ "Устанавливает маску создания пользователем файлов в РЕЖИМ. Если опущен" + +#~ msgid "" +#~ "`-S' is supplied, the current value of the mask is printed. The `-S'" +#~ msgstr "" +#~ "РЕЖИМ или задан параметр -S выводится текущее значение маски. Параметр" + +#~ msgid "" +#~ "option makes the output symbolic; otherwise an octal number is output." +#~ msgstr "-S делает вывод символическим, в противном случае используется" + +#~ msgid "If MODE begins with a digit, it is interpreted as an octal number," +#~ msgstr "" +#~ "восьмеричое число. Если РЕЖИм начинается с цифры, он интерпретируется" + +#~ msgid "" +#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)." +#~ msgstr "" +#~ "как восьмеричное число, в противном случае как строка, принимаемая " +#~ "chmod(1)." + +#~ msgid "" +#~ "Wait for the specified process and report its termination status. If" +#~ msgstr "" +#~ "Подождать завершения указанного процесса и сообщить код завершения. Если" + +#~ msgid "N is not given, all currently active child processes are waited for," +#~ msgstr "" +#~ "N не задано, ожидается завершение работы всех активных дочерних процессов" + +#~ msgid "and the return code is zero. N may be a process ID or a job" +#~ msgstr "и код возврата равен 0. N может быть идентификатором процесса" + +#~ msgid "specification; if a job spec is given, all processes in the job's" +#~ msgstr "" +#~ "или спецификацией задачи, если задана спецификация задачи, ожидается" + +#~ msgid "pipeline are waited for." +#~ msgstr "завершение работы всех процессов конвейера задачи." + +#~ msgid "and the return code is zero. N is a process ID; if it is not given," +#~ msgstr "" +#~ "и код возврата равен 0. N -- идентификатор процесса, если он не задан," + +#~ msgid "all child processes of the shell are waited for." +#~ msgstr "ожидается завершение работы всех дочерних процессов оболочки." + +#~ msgid "The `for' loop executes a sequence of commands for each member in a" +#~ msgstr "Цикл `for' выполняет последовательность команд для каждого члена" + +#~ msgid "" +#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" +#~ msgstr "" +#~ "списка. Если отсутствует `in СЛОВА ...;', предполагается, что задано" + +#~ msgid "" +#~ "assumed. For each element in WORDS, NAME is set to that element, and" +#~ msgstr "`in \"$@\"'. Для каждого из СЛОВ ИМЕНИ присваивается его значение" + +#~ msgid "the COMMANDS are executed." +#~ msgstr "и затем выполняются КОМАНДЫ." + +#~ msgid "The WORDS are expanded, generating a list of words. The" +#~ msgstr "СЛОВА разворачиваются и образуют список слов. Полученный список" + +#~ msgid "set of expanded words is printed on the standard error, each" +#~ msgstr "" +#~ "выводится на стандартный поток ошибок, каждому приписывается спереди" + +#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" +#~ msgstr "число. Если `in СЛОВА' отсутствует, предполагается заданным" + +#~ msgid "is assumed. The PS3 prompt is then displayed and a line read" +#~ msgstr "" +#~ "`in \"$@\"'. Затем выводится приглашение PS3 и со стандартного ввода" + +#~ msgid "from the standard input. If the line consists of the number" +#~ msgstr "считывается строка. Если строка состоит из числа, соответствующего" + +#~ msgid "corresponding to one of the displayed words, then NAME is set" +#~ msgstr "одному из выведенных слов, ИМЯ устанавливается равным этому" + +#~ msgid "to that word. If the line is empty, WORDS and the prompt are" +#~ msgstr "слову. Если строка пуста, слова и приглашение выводятся ещё раз." + +#~ msgid "redisplayed. If EOF is read, the command completes. Any other" +#~ msgstr "Если прочитан символ конца файла, выполнение команды завершается." + +#~ msgid "value read causes NAME to be set to null. The line read is saved" +#~ msgstr "любое другое значение устанавливает ИМЯ в NULL. Прочитанная строка" + +#~ msgid "in the variable REPLY. COMMANDS are executed after each selection" +#~ msgstr "сохраняется в переменной REPLY. После каждого выбора выполняются" + +#~ msgid "until a break or return command is executed." +#~ msgstr "" +#~ "КОМАНДЫ до тех пор, пока не будет выполнена команда break или return." + +#~ msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" +#~ msgstr "" +#~ "Выполняет КОМАНДЫ в зависимости от того, какому ШАБЛОНУ соответствует" + +#~ msgid "`|' is used to separate multiple patterns." +#~ msgstr "" +#~ "СЛОВО. Для разделения нескольких допустимых шаблонов используется `|'." + +#~ msgid "" +#~ "The if COMMANDS are executed. If the exit status is zero, then the then" +#~ msgstr "" +#~ "Выполняются КОМАНДЫ, заданные в if. Если код возврата нулевой, выполняются" + +#~ msgid "" +#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" +#~ msgstr "КОМАНДЫ then, иначе по очереди выполняются КОМАНДЫ elif, и если код" + +#~ msgid "" +#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS" +#~ msgstr "" +#~ "возврата нулевой, выполняются соответствующие КОМАНДЫ then и выполнение" + +#~ msgid "" +#~ "are executed and the if command completes. Otherwise, the else COMMANDS" +#~ msgstr "" +#~ "команды if завершается. В противном случае выполняются КОМАНДЫ else," + +#~ msgid "" +#~ "are executed, if present. The exit status is the exit status of the last" +#~ msgstr "если они присутствуют. Код возврата равен коду возврата последней" + +#~ msgid "command executed, or zero if no condition tested true." +#~ msgstr "" +#~ "выполненной команды, либо нулю, если ни одно условие не было истинным." + +#~ msgid "Expand and execute COMMANDS as long as the final command in the" +#~ msgstr "" +#~ "Разворачивает и выполняет КОМАНДЫ до тех пор, пока последняя команда" + +#~ msgid "`while' COMMANDS has an exit status of zero." +#~ msgstr "предложения `while' не завершит работу с нулевым кодом возврата." + +#~ msgid "`until' COMMANDS has an exit status which is not zero." +#~ msgstr "предложения `until' не завершит работу с ненулевым кодом возврата." + +#~ msgid "Create a simple command invoked by NAME which runs COMMANDS." +#~ msgstr "Создаёт простую команду, вызываемую по ИМЕНИ и выполняющую КОМАНДЫ." + +#~ msgid "Arguments on the command line along with NAME are passed to the" +#~ msgstr "Аргументы командной строки, переданные ИМЕНИ, передаются в функцию" + +#~ msgid "function as $0 .. $n." +#~ msgstr "как $0 .. $n." + +#~ msgid "Run a set of commands in a group. This is one way to redirect an" +#~ msgstr "Выполняет набор команд. Это один из способов осуществить" + +#~ msgid "entire set of commands." +#~ msgstr "перенаправление для целого набора команд." + +#~ msgid "This is similar to the `fg' command. Resume a stopped or background" +#~ msgstr "" +#~ "Похоже на команду `fg'. Продолжает выполнение остановленной или фоновой" + +#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify" +#~ msgstr "" +#~ "задачи. Если заданы ЦИФРЫ, использяется задача с этим номером, а если" + +#~ msgid "" +#~ "WORD, then the job whose name begins with WORD is used. Following the" +#~ msgstr "СЛОВО -- задача, имя которой начинается с этого слова. Завершение" + +#~ msgid "job specification with a `&' places the job in the background." +#~ msgstr "спецификации задачи символом & переводит задачу в фоновый режим." + +#~ msgid "BASH_VERSION The version numbers of this Bash." +#~ msgstr "BASH_VERSION Номер версии Bash." + +#~ msgid "CDPATH A colon separated list of directories to search" +#~ msgstr "CDPATH Разделённый запятыми список каталогов, где ищется" + +#~ msgid "\t\twhen the argument to `cd' is not found in the current" +#~ msgstr "\t\tаргумент команды `cd', если он не найден в текущем" + +#~ msgid "" +#~ "HISTFILE The name of the file where your command history is stored." +#~ msgstr "HISTFILE Имя файла, где сохраняется история команд." + +#~ msgid "HISTFILESIZE The maximum number of lines this file can contain." +#~ msgstr "HISTFILESIZE Максимальное число строк в этом файле." + +#~ msgid "HISTSIZE The maximum number of history lines that a running" +#~ msgstr "HISTSIZE Максимальное число строк истории команд, к которым" + +#~ msgid "\t\tshell can access." +#~ msgstr "\t\tимеет доступ оболочка." + +#~ msgid "HOME The complete pathname to your login directory." +#~ msgstr "HOME Полный путь к домашнему каталогу." + +#~ msgid "" +#~ "HOSTTYPE The type of CPU this version of Bash is running under." +#~ msgstr "" +#~ "HOSTTYPE Тип процессора, на котором работает эта версия Bash." + +#~ msgid "" +#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF" +#~ msgstr "" +#~ "IGNOREEOF Управляет действиями, совершаемыми оболочкой при вводе" + +#~ msgid "\t\tcharacter as the sole input. If set, then the value" +#~ msgstr "\t\tсимвола конца файла. Если установлена, её значение -- число" + +#~ msgid "\t\tof it is the number of EOF characters that can be seen" +#~ msgstr "\t\tсимволов конца файла, которые могут быть встречены подряд," + +#~ msgid "\t\tin a row on an empty line before the shell will exit" +#~ msgstr "\t\tв пустой строке, после чего оболочка завершит работу" + +#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input." +#~ msgstr "" +#~ "\t\t(по умолчанию 10). Если не установлена, EOF обозначает конец ввода." + +#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." +#~ msgstr "" +#~ "MAILCHECK\tКак часто, в секундах, Bash проверяет наличие новой почты." + +#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" +#~ msgstr "MAILPATH\tРазделённый запятыми список имён файлов, где Bash" + +#~ msgid "\t\tfor new mail." +#~ msgstr "\t\tпроверяет наличие новой почты." + +#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." +#~ msgstr "OSTYPE\t\tВерсия Unix, под которой работает эта версия Bash." + +#~ msgid "PATH A colon-separated list of directories to search when" +#~ msgstr "PATH Разделённый запятыми список каталогов, где ищутся" + +#~ msgid "\t\tlooking for commands." +#~ msgstr "\t\tкоманды." + +#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each" +#~ msgstr "PROMPT_COMMAND Команда, выполняемая перед выводом каждого" + +#~ msgid "\t\tprimary prompt." +#~ msgstr "\t\tпервичного приглашения." + +#~ msgid "PS1 The primary prompt string." +#~ msgstr "PS1 Строка первичного приглашения." + +#~ msgid "PS2 The secondary prompt string." +#~ msgstr "PS2 Строка вторичного приглашения." + +#~ msgid "TERM The name of the current terminal type." +#~ msgstr "TERM Имя типа текущего терминала." + +#~ msgid "auto_resume Non-null means a command word appearing on a line by" +#~ msgstr "" +#~ "auto_resume Ненулевые значения слов команд, встречающиеся в строке" + +#~ msgid "\t\titself is first looked for in the list of currently" +#~ msgstr "\t\tотдельно, сначала ищутся в списке остановленных" + +#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded." +#~ msgstr "\t\tв данный момент задач. Если найдено, задача активируется." + +#~ msgid "\t\tA value of `exact' means that the command word must" +#~ msgstr "\t\t`exact' значит, что команда должна в точности" + +#~ msgid "\t\texactly match a command in the list of stopped jobs. A" +#~ msgstr "\t\tсоответствовать команде в списке остановленных задач." + +#~ msgid "\t\tvalue of `substring' means that the command word must" +#~ msgstr "\t\t`substring' значит, что команда должна быть подстрокой" + +#~ msgid "\t\tmatch a substring of the job. Any other value means that" +#~ msgstr "\t\tзадачи. Любые другие значения означают, что" + +#~ msgid "\t\tthe command must be a prefix of a stopped job." +#~ msgstr "\t\tкоманда должна быть префиксом остановленной задачи." + +#~ msgid "command_oriented_history" +#~ msgstr "command_oriented_history" + +#~ msgid "" +#~ " Non-null means to save multiple-line commands together on" +#~ msgstr "" +#~ " Ненулевое значение означает, что многострочные команды" + +#~ msgid " a single history line." +#~ msgstr " будут сохраняться в одной строке истории." + +#~ msgid "histchars Characters controlling history expansion and quick" +#~ msgstr "histchars Управляющие символы расширения истории и быстрой" + +#~ msgid "\t\tsubstitution. The first character is the history" +#~ msgstr "\t\tподстановки. Первый символ -- символ подстановки" + +#~ msgid "\t\tsubstitution character, usually `!'. The second is" +#~ msgstr "\t\tистории, обычно `!'. Второй -- символ `быстрой" + +#~ msgid "\t\tthe `quick substitution' character, usually `^'. The" +#~ msgstr "\t\tподстановки', обычно `^'. Третий -- символ `комментария" + +#~ msgid "\t\tthird is the `history comment' character, usually `#'." +#~ msgstr "\t\tистории', обычно `#'." + +#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter" +#~ msgstr "HISTCONTROL\tЕсли равен `ignorespace', это означает, что строки," + +#~ msgid "\t\tlines which begin with a space or tab on the history" +#~ msgstr "\t\tначинающиеся с пробела или знака табуляции, не попадают" + +#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't" +#~ msgstr "\t\tв историю. `ignoredups' означает, что строки, сопадающие" + +#~ msgid "\t\tenter lines which match the last entered line. Set to" +#~ msgstr "\t\tс предыдущей, не попадают в историю. `ignoreboth' --" + +#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset," +#~ msgstr "\t\tодновременное действие обоих параметров. Если не" + +#~ msgid "\t\tor set to any other value than those above means to save" +#~ msgstr "\t\tустановлено, или равно другому значению, то в историю" + +#~ msgid "\t\tall lines on the history list." +#~ msgstr "\t\tкоманд попадают все строки." + +#~ 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\tRotates the stack so that the Nth directory (counting" +#~ msgstr "+N\tВращает стек так, чтобы N-й каталог (считая с левой стороны " + +#~ msgid "\tfrom the left of the list shown by `dirs') is at the top." +#~ msgstr "\tсписка, выводимого `dirs') оказался на вершине стека." + +#~ msgid "-N\tRotates the stack so that the Nth directory (counting" +#~ msgstr "-N\tВращает стек так, чтобы N-й каталог (считая с правой" + +#~ msgid "\tfrom the right) is at the top." +#~ msgstr "\tстороны) оказался на вершине стека." + +#~ msgid "-n\tsuppress the normal change of directory when adding directories" +#~ msgstr "-n\tподавляет обычную смену каталога при добавлении каталога" + +#~ msgid "\tto the stack, so only the stack is manipulated." +#~ msgstr "\tв стек, так что меняется только содержимое стека." + +#~ msgid "dir\tadds DIR to the directory stack at the top, making it the" +#~ msgstr "dir\tпомещает DIR на вершину стека и делает его новым" + +#~ 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 "+N\tremoves the Nth entry counting from the left of the list" +#~ msgstr "+N\tудаляет N-й каталог, считая с левой стороны списка," + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" +#~ msgstr "\tвыводимого `dirs', начиная с нуля. Например, `popd +0'" + +#~ msgid "\tremoves the first directory, `popd +1' the second." +#~ msgstr "\tудаляет первый каталог, `popd +1' -- второй." + +#~ msgid "-N\tremoves the Nth entry counting from the right of the list" +#~ msgstr "-N\tудаляет N-й каталог, считая с правой стороны списка," + +#~ msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" +#~ msgstr "\tвыводимого `dirs', начиная с нуля. Например, `popd -0'" + +#~ msgid "\tremoves the last directory, `popd -1' the next to last." +#~ msgstr "\tудаляет последний каталог, `popd -1' -- предпоследний." + +#~ msgid "" +#~ "-n\tsuppress the normal change of directory when removing directories" +#~ msgstr "-n\tподавляет обычную смену каталога при удалении каталогов из" + +#~ msgid "\tfrom the stack, so only the stack is manipulated." +#~ msgstr "\tстека, так что меняется только содержимое стека." + +#~ 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/bfox/bin'. Флаг -v" + +#~ msgid "causes `dirs' to print the directory stack with one entry per line," +#~ msgstr "заставляет `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\tdisplays the Nth entry counting from the left of the list shown by" +#~ msgstr "+N\tвыводит N-й каталог, считая с левой стороны списка, выводимого" + +#~ msgid "\tdirs when invoked without options, starting with zero." +#~ msgstr "\tdirs при вызове без параметров, начиная с нуля." + +#~ msgid "" +#~ "-N\tdisplays the Nth entry counting from the right of the list shown by" +#~ msgstr "-N\tвыводит N-й каталог, считая с правой стороны списка, выводимого" + +#~ msgid "Toggle the values of variables controlling optional behavior." +#~ msgstr "Меняет значение переменных, управляющих поведением оболочки." + +#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" +#~ msgstr "Флаг -s означает включить (установить) каждое ИМЯ_ПАРАМЕТРА," + +#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" +#~ msgstr "флаг -u сбрасывает. Флаг -q подавляет вывод, установлен или" + +#~ msgid "status indicates whether each OPTNAME is set or unset. The -o" +#~ msgstr "сброшен параметр определяется по коду возврата. Параметр -o" + +#~ msgid "option restricts the OPTNAMEs to those defined for use with" +#~ msgstr "ограничивает работу параметрами, определёнными с помощью" + +#~ msgid "`set -o'. With no options, or with the -p option, a list of all" +#~ msgstr "`set -o'. Без параметров или при заданном параметре -p, выводится" + +#~ msgid "settable options is displayed, with an indication of whether or" +#~ msgstr "список всех установленных параметров и информация, установлены" + +#~ msgid "not each is set." +#~ msgstr "они или нет." diff --git a/po/sk.gmo b/po/sk.gmo index 06b798f..22b4af3 100644 Binary files a/po/sk.gmo and b/po/sk.gmo differ diff --git a/po/sk.po b/po/sk.po index dba3061..663505d 100644 --- a/po/sk.po +++ b/po/sk.po @@ -1,300 +1,346 @@ # 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 , 2007, 2008, 2009. +# Ivan Masár , 2007, 2008, 2009, 2010, 2011. # msgid "" msgstr "" -"Project-Id-Version: bash 4.0\n" +"Project-Id-Version: bash 4.2\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" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2011-03-16 21:22+0100\n" "Last-Translator: Ivan Masár \n" "Language-Team: Slovak \n" +"Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "chybný index poľa" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: nie je možné previesť indexované pole na asociatívne" +msgid "%s: removing nameref attribute" +msgstr "" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: neplatný kľúč asociatívneho poľa" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: nie je možné previesť indexované pole na asociatívne" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: nie je možné priradiť nenumerickému indexu" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: nie je možné vytvoriť: %s" -#: bashline.c:3457 +#: bashline.c:4479 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 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: prvý znak (okrem bielych znakov) nie je „\"“" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" msgstr "chýba zatvárajúca „%c“ v %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: chýba oddeľovač dvojbodka" -#: builtins/alias.def:132 +#: bashline.c:4733 #, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: nie je možné zrušiť väzbu (unbind)" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "„%s“: neplatný názov klávesovej mapy" +msgstr "„%s“: neplatný názov aliasu" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "úpravy riadka nie sú zapnuté" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" msgstr "„%s“: neplatný názov klávesovej mapy" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" msgstr "„%s“: neznámy názov funkcie" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, 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 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s je možné vyvolať ako " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: nie je možné zrušiť väzbu (unbind)" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "počet cyklov" -#: builtins/break.def:137 +#: builtins/break.def:139 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 +#: builtins/caller.def:136 +#, fuzzy 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" +" 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." 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/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME nebola nastavená" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "príliš veľa argumentov" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "na nový vrchol zásobníka." + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD nebola nastavená" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "riadok %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "upozornenie: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: voľba vyžaduje argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: vyžaduje sa numerický argument" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: nenájdené" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: neplatná voľba" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: neplatný názov voľby" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" msgstr "„%s“: nie je platný identifikátor" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "neplatné osmičkové číslo" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "neplatné šestnástkové číslo" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "neplatné číslo" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: neplatné určenie signálu" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: premenná len na čítanie" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: nie je možné zrušiť" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s je mimo rozsahu" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s mimo rozsahu" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: taká úloha neexistuje" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: riadenie úloh nedostupné" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "riadenie úloh nedostupné" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: obmedzené" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "obmedzené" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: nie je vstavaný príkaz (builtin) shellu" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "chyba zapisovania: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "chyba pri nastavovaní atribútov terminálu: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "chyba pri zisťovaní atribútov terminálu: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: nejednoznačné určenie úlohy" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: nie je možné zrušiť: len na čítanie %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: nie je možné zrušiť" + +#: builtins/complete.def:287 #, 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 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: chýba špecifikácia dokončovania" @@ -307,121 +353,156 @@ msgstr "upozornenie: voľba -F nemusí fungovať tak ako očakávate" 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "momentálne sa nevykonáva funkcia doplňovania" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "je možné použiť iba vo funkcii" -#: builtins/declare.def:360 +#: builtins/declare.def:437 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 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: funkcia iba na čítanie" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "„%s“: neplatný názov aliasu" + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynamické načítavanie nie je dostupné" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "nie je možné otvoriť zdieľaný objekt %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: nie je dynamicky načítané" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: nie je dynamicky načítané" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: je adresár" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: nie je obyčajný súbor" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: nie je možné vykonať binárny súbor" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: nie je možné spustiť: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "odhlásenie\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "toto nie je login shell: použite „exit“" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Existujú zastavené úlohy.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Existujú bežiace úlohy.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "prákaz nenájdený" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "špecifikácia histórie" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "aktuálny" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "úloha %d začala bez riadenia úloh" @@ -436,29 +517,34 @@ msgstr "%s: neplatná voľba -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: voľba vyžaduje argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" msgstr "hašovanie vypnuté" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: hašovacia tabuľka je prázdna\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "použití\tpríkaz\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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 +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 #, c-format msgid "" "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." @@ -466,12 +552,12 @@ 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 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" msgstr "%s: nie je možné otvoriť: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -492,15 +578,21 @@ msgstr "" "Hviezdička (*) vedľa názvu znamená, že príkaz je vypnutý.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 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 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "poloha histórie" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: neplatný názov voľby" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: rozšírenie histórie zlyhalo" @@ -514,93 +606,113 @@ msgstr "%s: inlib zlyhalo" msgid "no other options allowed with `-x'" msgstr "iné voľby prípustné s „-x“" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" msgstr "%s: argumenty musia byť ID procesov alebo úloh" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Neznáma chyba" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "očakával sa výraz" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: nie je premenná poľa" +msgstr "%s: nie je indexované pole" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, 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 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: neplatný popisovač súboru: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: neplatný počet riadkov" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: neplatný začiatok poľa" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: neplatné kvantum spätného volania" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "názov prázdnej premennej poľa" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "vyžaduje sa podpora premennej poľa" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" msgstr "„%s“: chýba formátovací znak" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: neplatná špecifikácia formátu času" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" msgstr "„%c“: neplatný formátovací znak" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "upozornenie: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "chýba hexadecimálna číslica v \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "chýba číslica Unicode pre \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "žiadny iný adresár" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: neplatný argument limitu" + +#: builtins/pushd.def:480 msgid "" msgstr "<žiadny aktuálny adresár>" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "zásobník adresárov je prázdny" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "index zásobníka adresárov" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -642,7 +754,7 @@ msgstr "" " -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 +#: builtins/pushd.def:723 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" @@ -686,7 +798,7 @@ msgstr "" " \n" " Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -725,55 +837,50 @@ msgstr "" " \n" " Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: neplatná špecifikácia expirácie (timeout)" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "chyba pri čítaní: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: nie je premenná poľa" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: nie je funkcia" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: nie je možné zrušiť" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "posun o" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 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 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: neplatný názov voľby shellu" @@ -782,397 +889,477 @@ msgstr "%s: neplatný názov voľby shellu" msgid "filename argument required" msgstr "vyžaduje sa argument názov súboru" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: súbor sa nepodarilo nájsť" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "nie je možné suspendovať" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "nie je možné suspendovať login shell" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s má alias „%s“\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s je kľúčové slovo shellu\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s je funkcia\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je vstavaný príkaz (builtin) shellu\n" + +#: builtins/type.def:301 #, 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 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s je %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s je hašovaný (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: neplatný argument limitu" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "„%c“: chybný príkaz" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: nie je možné zistiť limit: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "obmedzenie" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: nie je možné zmeniť limit: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "osmičkové číslo" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "„%c“: neplatný operátor symbolického režimu" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " riadok " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "posledný príkaz: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Ruší sa..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "upozornenie: " + +#: error.c:488 msgid "unknown command error" msgstr "chyba neznámeho príkazu" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "chybný typ príkazu" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "chybný konektor" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "chybný skok" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\ačas vypršal pri čakaní na vstup: automatické odhlásenie\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: „%c“: neplatný formátovácí znak" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "chyba rúry" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 #, 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 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: príkaz nenájdený" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: nie je možné vykonať binárny súbor" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: chybný interpreter" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: nie je možné vykonať binárny súbor" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s je vstavaný príkaz (builtin) shellu\n" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "nie je možné duplikovať fd %d na fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "bola prekročená úroveň rekurzie výrazu" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "podtečenie zásobníka rekurzie" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "chyba syntaxe vo výraze" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" msgstr "pokus o priradenie mimo premennej" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "chyba syntaxe vo výraze" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "delenie nulou" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" msgstr "chyba: chybný expassign token" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" msgstr "pre podmienený výraz sa očakáva „:“" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "exponent menší ako 0" -#: expr.c:826 +#: expr.c:1030 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 +#: expr.c:1057 msgid "missing `)'" msgstr "chýba „)“" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "chyba syntaxe: očakáva sa operand" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "chyba syntaxe: neplatný aritmetický operátor" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" msgstr "%s%s%s: %s (chybný token je „%s”)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "neplatný aritmetický základ" -#: expr.c:1280 +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: neplatný počet riadkov" + +#: expr.c:1603 msgid "value too great for base" msgstr "hodnota je ako základ príliš veľká" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: chyba výrazu\n" -#: general.c:61 +#: general.c:70 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 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "nie j emožné resetovať nodelay režim fd %d" -#: input.c:258 +#: input.c:266 #, 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 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp rúra" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 #, 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 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: taký pid neexistuje" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signál %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Hotovo" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Zastavené" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Zastavené(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Beží" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Hotovo(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Ukončenie %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Neznámy stav" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(bol uložený výpis pamäte) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "setpgid detského procesu (%ld to %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: Neexistuje záznam o procese %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: úloha %d je zastavená" -#: jobs.c:2829 +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: taká úloha neexistuje" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: úloha skončila" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: úloha %d už je v pozadí" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: zapína sa WNOHANG aby sme sa vyhli neurčitému blokovaniu" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: riadok %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (bol uložený výpis pamäte)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(wd teraz: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: funkcia getpgrp zlyhala" -#: jobs.c:3639 +#: jobs.c:4434 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: riadkový systém" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: riadkový systém" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "nie je možné nastaviť skupinu procesu terminálu (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "v tomto shelli nie je riadenie úloh" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: zlyhal predpoklad: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1181,58 +1368,68 @@ msgstr "" "\r\n" "malloc: %s:%d: zbabraný predpoklad\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "neznámy" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: blok na zozname voľných zaprataný" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: zavolaný s argumentom už uvoľneného bloku" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: zavolaný s argumentom nealokovaného bloku" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" msgstr "free: bolo detekované podtečenie; mh_nbytes mimo rozsahu" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: bolo detekované podtečenie; mh_nbytes mimo rozsahu" + +#: lib/malloc/malloc.c:1014 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 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: zavolaný s argumentom nealokovaného bloku" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" msgstr "realloc: bolo detekované podtečenie; mh_nbytes mimo rozsahu" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: bolo detekované podtečenie; mh_nbytes mimo rozsahu" + +#: lib/malloc/malloc.c:1205 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 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "neplatný základ" @@ -1251,262 +1448,301 @@ msgstr "%s: neplatná služba" msgid "%s: bad network path specification" msgstr "%s: chybná špecifikácia sieťovej cesty" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "sieťové operácie nie sú podporované" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: nemožno zmeniť locale (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: nemožno zmeniť locale (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: nie je možné alokovať %lu bajtov" +msgstr "setlocale: %s: nie je možné zmeniť locale (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: nie je možné alokovať %lu bajtov" +msgstr "setlocale: %s: nie je možné zmeniť locale (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Máte poštu v súbore $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Máte novú poštu v súbore $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, 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 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "chyba syntaxe: vyžaduje sa aritmetický výraz" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" msgstr "chyba syntaxe: neočakávaná „;“" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" msgstr "chyba syntaxe: „((%s))“" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: chybný typ inštrukcie %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 +#: make_cmd.c:769 #, 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 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, 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 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" msgstr "neočakávaný koniec súboru počas hľadania „]]“" -#: parse.y:3956 +#: parse.y:4457 #, 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 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "chyba syntaxe v podmienečnom príkaze" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" msgstr "neočakávaný token „%s“, očakávalo sa `)'" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" msgstr "očakávalo sa `)'" -#: parse.y:4070 +#: parse.y:4571 #, 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 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "neočakávaný argument podmienečného unárneho operátora" -#: parse.y:4120 +#: parse.y:4621 #, 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 +#: parse.y:4625 msgid "conditional binary operator expected" msgstr "očakáva sa podmienečný binárny operátor" -#: parse.y:4146 +#: parse.y:4647 #, 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 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "neočakávaný argument v podmienečnom binárnom operátore" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" msgstr "neočakávaný token „%c“ v podmienečnom príkaze" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" msgstr "neočakávaný token „%s“ v podmienečnom príkaze" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "neočakávaný token %d v podmienečnom príkaze" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" msgstr "chyba syntaxe neďaleko neočakávaného tokenu „%s“" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" msgstr "chyba syntaxe neďaleko „%s“" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "chyba syntaxe: neočakávaný koniec súboru" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "chyba syntaxe" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Na opustenie shellu použite „%s“.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" msgstr "neočakávaný koniec súboru počas hľadania zodpovedajúceho „)“" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "dokončovanie: funkcia „%s“ nebola nájdená" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: chybný konektor `%d'" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: neplatný popisovač súboru: %s" +msgstr "xtrace_set: %d: neplatný popisovač súboru" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: ukazovateľ súboru je NULL" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: „%c“: neplatný formátovací znak" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "popisovač súboru mimo rozsahu" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: nejednoznačné presmerovanie" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: nie je možné prepísať existujúci súbor" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: ombedzené: nie je možné presmerovať výstup" -#: redir.c:180 +#: redir.c:219 #, 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 +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: nie je možné priradiť zoznam položke poľa" +msgstr "%s: nie je možné priradiť popisovač súboru premennej" -#: redir.c:544 +#: redir.c:650 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 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "chyba presmerovania: nie je možné duplikovať fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "nenašiel sa /tmp, vytvorte ho prosím!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp musí byť platný názov adresára" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: neplatná voľba" -#: shell.c:1651 +#: shell.c:1343 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "nie j emožné resetovať nodelay režim fd %d" + +#: shell.c:1354 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "nie j emožné resetovať nodelay režim fd %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: je adresár" + +#: shell.c:1907 msgid "I have no name!" msgstr "Nemám meno!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, verzia %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1515,42 +1751,53 @@ 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 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU dlhé voľby:\n" -#: shell.c:1800 +#: shell.c:2068 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" +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD 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 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s alebo -o voľba\n" -#: shell.c:1822 +#: shell.c:2094 #, 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 +#: shell.c:2095 #, 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 +#: shell.c:2096 #, 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 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: neplatná operácia" @@ -1715,209 +1962,263 @@ msgstr "dokončila sa zvuková sekvencia HFT" msgid "Information request" msgstr "Žiadosť o informácie" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "Neznáme číslo signálu" - -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Neznámy signál #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "chybná substitúcia: chýba „%s“ v %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "nie je možné vytvoriť rúru pre substitúciu procesov" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "nie je možné vytvoriť potomka pre substitúciu procesov" -#: subst.c:4847 +#: subst.c:6198 #, 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 +#: subst.c:6200 #, 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 +#: subst.c:6223 #, 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 +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "chybná substitúcia: : v reťazci %s chýba uzatvárajúci „`”" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "nie je možné vytvoriť rúru pre substitúciu príkazov" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "nie je možné vytvoriť potomka pre substitúciu príkazov" -#: subst.c:5114 +#: subst.c:6613 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 +#: subst.c:7082 subst.c:10252 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: neplatná hodnota popisovača trasovacieho súboru" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: neplatný počet riadkov" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "„%s“: neplatný názov aliasu" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter je null alebo nenastavený" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parameter je null alebo nenastavený" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: výraz podreťazca < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: chybná substitúcia" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" msgstr "$%s: nie je možné vykonať priradenie takýmto spôsobom" -#: subst.c:7374 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"budúce verzie shellu budú vynucovať vyhodnocovanie ako aritmetickú " +"substitúciu" -#: subst.c:7839 +#: subst.c:10795 #, 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 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "bez zhody: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "očakával sa argument" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: očakával sa celočíselný výraz" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "očakávala sa „)“" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: očakával sa binárny operátor" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: očakával sa unárny operátor" + +#: test.c:896 msgid "missing `]'" msgstr "chýba „]“" -#: trap.c:203 +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "chyba syntaxe: neočakávaná „;“" + +#: trap.c:220 msgid "invalid signal number" msgstr "neplatné číslo signálu" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: chybný signál %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" msgstr "chyba pri importe definície funkcie „%s“" -#: variables.c:748 +#: variables.c:838 #, 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 +#: variables.c:2642 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 +#: variables.c:2661 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: nie je možné priradiť popisovač súboru premennej" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 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 +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: parameter je null alebo nenastavený" +msgstr "%s má null exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "neplatný znak %d v exportstr %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" msgstr "žiadne „=“ v exportstr %s" -#: variables.c:3835 +#: variables.c:5317 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 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: chýba kontext global_variables" -#: variables.c:3922 +#: variables.c:5410 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 +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: nie je možné otvoriť: %s" +msgstr "%s: %s: nemožno otvoriť ako SÚBOR" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: neplatná hodnota popisovača trasovacieho súboru" -#: variables.c:4683 +#: variables.c:6450 #, fuzzy, c-format -msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: neplatný popisovač súboru: %s" +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s je mimo rozsahu" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright (C) 2009 Free Software Foundation, Inc." +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n" -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" @@ -1925,182 +2226,164 @@ msgstr "" "Licencia GPLv3+: GNU GPL verzie 3 alebo novšia http://gnu.org/licenses/gpl." "html\n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." 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" +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." 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 \n" -msgstr "" -"Licencia GPLv3+: GNU GPL verzie 3 alebo novšia http://gnu.org/licenses/gpl." -"html\n" - -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc: nie je možné alokovať %lu bajtov (%lu bajtov alokovaných)" +msgstr "%s: nie je možné alokovať %lu bajtov (%lu bajtov alokovaných)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: nie je možné alokovať %lu bajtov" +msgstr "%s: nie je možné alokovať %lu bajtov" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: nie je možné alokovať %lu bajtov (%lu bajtov alokovaných)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: nie je možné alokovať %lu bajtov" +msgstr "%s: %s:%d: nie je možné alokovať %lu bajtov" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [názov[=hodnota] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" msgstr "unalias [-a] názov [názov ...]" -#: builtins.c:51 +#: builtins.c:53 +#, fuzzy msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [vstavaná funcia shellu [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [adresár]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "pravda" - -#: builtins.c:72 -msgid "false" -msgstr "nepravda" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilrtux] [-p] [názov[=hodnota] ...]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilrtux] [-p] name[=value] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [voľba] názov[=hodnota] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" msgstr "enable [-a] [-dnps] [-f názov_súboru] [názov ...]" -#: builtins.c:92 +#: builtins.c:94 msgid "eval [arg ...]" msgstr "eval [arg ...]" -#: builtins.c:94 -msgid "getopts optstring name [arg]" +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" msgstr "getopts názov_reťazca_volieb [arg]" -#: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" msgstr "exec [-cl] [-a názov] [príkaz [argumenty ...]] [presmerovanie ...]" -#: builtins.c:98 +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [špec_úlohy]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [špec_úlohy ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p cesta] [-dt] [názov ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [vzor ...]" +msgstr "help [-dms] [vzor ...]" -#: builtins.c:121 +#: builtins.c:123 msgid "" "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " "[arg...]" @@ -2108,15 +2391,16 @@ msgstr "" "history [-c] [-d ofset] [n] alebo history -anrw [názov_súboru] alebo history " "-ps arg [arg...]" -#: builtins.c:125 +#: builtins.c:127 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 ...]" +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" msgstr "disown [-h] [-ar] [špec_úlohy ...]" -#: builtins.c:132 +#: builtins.c:134 msgid "" "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " "[sigspec]" @@ -2124,112 +2408,112 @@ 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 +#: builtins.c:136 msgid "let arg [arg ...]" msgstr "let arg [arg ...]" -#: builtins.c:136 -#, fuzzy +#: builtins.c:138 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 ...]" +"read [-ers] [-a pole] [-d oddeľovač] [-i text] [-n nznakov] [-N nznakov] [-p " +"výzva] [-t zdržadnie] [-u fd] [názov ...]" -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o názov_voľby] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [názov[=hodnota] ...] alebo export -p" +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [názov ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [názov[=hodnota] ...] alebo readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [názov[=hodnota] ...] alebo export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [názov[=hodnota] ...] alebo readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source názov_súboru [argumenty]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". názov_súboru [argumenty]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [výraz]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "-krát" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[arg] špec_signálu ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] názov [názov ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" msgstr "ulimit [-SHacdefilmnpqrstuvx] [obmedzenie]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [režim]" -#: builtins.c:175 -msgid "wait [id]" +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" msgstr "wait [id]" -#: builtins.c:179 -msgid "wait [pid]" +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" msgstr "wait [pid]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NAME [in SLOVÁ ... ] ; do PRÍKAZY; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( výraz1; výraz2; výraz3 )); do PRÍKAZY; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NÁZOV [in SLOVÁ ... ;] do PRÍKAZY; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] rúra" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" msgstr "case SLOVO in [VZOR [| VZOR]...) PRÍKAZY ;;]... esac" -#: builtins.c:192 +#: builtins.c:194 msgid "" "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " "COMMANDS; ] fi" @@ -2237,105 +2521,111 @@ 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" +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" msgstr "while PRÍKAZY; do PRÍKAZY; done" -#: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" msgstr "until PRÍKAZY; do PRÍKAZY; done" -#: builtins.c:198 +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NÁZOV] príkaz [presmerovania]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "" "function názov_funkcie { PRÍKAZY ; } alebo názov_funkcie () { PRÍKAZY ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ PRÍKAZY ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "špec_úlohy [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( výraz ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ výraz ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "premenné - Názvy a významy niektorých premenných shellu" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | adr]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [názov_voľby ...]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" msgstr "printf [-v var] formát [argumenty]" -#: builtins.c:229 +#: builtins.c:231 #, fuzzy msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 " +"complete [-abcdefgjksuv] [-pr] [-DE] [-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 +#: builtins.c:235 +#, fuzzy msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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 +#: builtins.c:239 #, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "compopt [-o|+o voľba] [názov ...]" +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o voľba] [-DE] [názov ...]" -#: builtins.c:240 +#: builtins.c:242 +#, fuzzy msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-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 +#: builtins.c:244 +#, fuzzy msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-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 +#: builtins.c:256 +#, fuzzy msgid "" "Define or display aliases.\n" " \n" @@ -2347,7 +2637,7 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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 " @@ -2371,12 +2661,13 @@ msgstr "" " Vráti vždy pravdu ak nebol zadaný NÁZOV, pre ktorý nie je definovaný " "alias." -#: builtins.c:276 +#: builtins.c:278 +#, fuzzy msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" @@ -2388,7 +2679,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebol zadaný NÁZOV, pre ktorý nie je definovaný alias." -#: builtins.c:289 +#: builtins.c:291 +#, fuzzy msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2422,6 +2714,9 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." @@ -2464,7 +2759,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2482,7 +2777,7 @@ msgstr "" " Návratová hodnota:\n" " Návratová hodnota je 0 ak N nie je väčšie alebo rovné 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2500,7 +2795,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak N nie je väčšie alebo rovné 1." -#: builtins.c:350 +#: builtins.c:354 +#, fuzzy msgid "" "Execute shell builtins.\n" " \n" @@ -2511,7 +2807,7 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" "Vykonať vstavenú funkciu shellu.\n" " \n" @@ -2526,7 +2822,7 @@ msgstr "" "je\n" " vstavaná funkcia shellu." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2553,7 +2849,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak shell nevykonáva funkciu shellu a EXPR nie je neplatný." -#: builtins.c:383 +#: builtins.c:387 +#, fuzzy msgid "" "Change the shell working directory.\n" " \n" @@ -2576,18 +2873,31 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." msgstr "" -"Zmeniť aktuálny adresár.\n" +"Zmeniť aktuálny adresár shellu.\n" " \n" -" Zmení aktuálny adresár na ADR. Premenná $HOME je štandardný ADR.\n" +" Zmení aktuálny adresár na ADR. Predvolený aktuálny adresár je hodnota\n" +" premennej shellu HOME.\n" " \n" " Premenná CDPATH definuje cesty, v ktorých sa hľadá adresár obsahujúci " "ADR.\n" @@ -2603,20 +2913,24 @@ msgstr "" " -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" +" -e\tak je zadaná voľba -P a aktuálny adresár nie je možné\n" +" \túspešne určiť, ukončiť s nenulovou návratovou hodnotou\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." +" Vráti 0 ak bol aktuálny adresár zmenený a ak sa pri použití voľby -P\n" +" úspešne nastaví $PWD, inak nenulovú hodnotu." -#: builtins.c:411 +#: builtins.c:425 +#, fuzzy 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2638,7 +2952,7 @@ msgstr "" " Vracia 0 ak nie je zadaná neplatná voľba alebo nie je možné\n" " prečítať aktuálny adresár." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2654,7 +2968,7 @@ msgstr "" " Návratová hodnota:\n" " Vždy vráti pravda." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2666,7 +2980,7 @@ msgstr "" " Návratová hodnota:\n" " Vždy vráti 0." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2680,7 +2994,8 @@ msgstr "" " Návratová hodnota:\n" " Vždy vráti nepravda." -#: builtins.c:457 +#: builtins.c:471 +#, fuzzy msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2690,10 +3005,10 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2713,7 +3028,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu PRÍKAZu alebo zlyhá ak nenájde PRÍKAZ." -#: builtins.c:476 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2723,17 +3039,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2743,20 +3064,23 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment 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" +" Deklaruje premenné a dáva im 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" +" -g\tvytvorí globálne premenné pri použití vo funkcii shellu; inak\n" +" \tsa ignoruje\n" " -p\tzobrazí atribúty a hodnotu každého NÁZVU\n" " \n" " Voľby, ktoré nastavujú atribúty:\n" @@ -2780,17 +3104,19 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." -#: builtins.c:512 +#: builtins.c:532 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Nastaviť hodnoty a atribúty premenných.\n" " \n" " Zastaralé. Pozri „help declare“." -#: builtins.c:520 +#: builtins.c:540 +#, fuzzy msgid "" "Define local variables.\n" " \n" @@ -2801,8 +3127,8 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" "Definovať lokálne premenné.\n" " \n" @@ -2816,11 +3142,14 @@ msgstr "" " Vráti 0 ak nebola zadaná neplatná voľba, nevyskytla sa chyba a\n" " shell práve nevykonáva funkciu." -#: builtins.c:537 +#: builtins.c:557 +#, fuzzy msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2832,6 +3161,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2839,9 +3169,15 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." @@ -2874,7 +3210,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak sa nevyskytla sa chyba pri zápise." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2896,7 +3232,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak sa nevyskytla sa chyba pri zápise." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2950,7 +3286,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak NÁZOV nie je vstavaná funkcia shellu a nevyskytla sa chyba." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2969,7 +3305,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu príkazu alebo 0 ak je príkaz prázdny." -#: builtins.c:626 +#: builtins.c:652 +#, fuzzy msgid "" "Parse option arguments.\n" " \n" @@ -3002,8 +3339,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3045,7 +3382,8 @@ msgstr "" " 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 +#: builtins.c:694 +#, fuzzy msgid "" "Replace the shell with the given command.\n" " \n" @@ -3056,8 +3394,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3085,7 +3423,7 @@ msgstr "" " Vráti 0 ak sa nestane, že PRÍKAZ nebol nájdený a nevyskytne sa chyba\n" " presmerovania." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3097,7 +3435,7 @@ msgstr "" " 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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -3110,7 +3448,7 @@ msgstr "" " Ukončí login shell s návratovou hodnotou N. Vráti chybu ak nie je\n" " spustený v login shelli." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -3166,7 +3504,7 @@ msgstr "" " Vráti 0 alebo stav vykonaného príkazu; nenulovú hodnotu ak sa vyskytne\n" " chyba." -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3186,7 +3524,7 @@ msgstr "" " Stav príkazu umiestneného do popredia; nenulovú hodnotu ak sa vyskytne\n" " chyba." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -3207,7 +3545,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nie je riadenie úloh vypnuté a nevyskytne sa chyba." -#: builtins.c:767 +#: builtins.c:793 +#, fuzzy msgid "" "Remember or display program locations.\n" " \n" @@ -3216,15 +3555,15 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3254,7 +3593,8 @@ msgstr "" " Vráti 0 ak sa nestalo, že NÁZOV nebol nájdený a nebola zadaná\n" " neplatná voľba." -#: builtins.c:792 +#: builtins.c:818 +#, fuzzy msgid "" "Display information about builtin commands.\n" " \n" @@ -3266,10 +3606,10 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" " Returns success unless PATTERN is not found or an invalid option is " @@ -3294,7 +3634,8 @@ msgstr "" " Vráti 0 ak sa nestalo, že VZOR nebol nájdený a nebola zadaná\n" " neplatná voľba." -#: builtins.c:816 +#: builtins.c:842 +#, fuzzy msgid "" "Display or manipulate the history list.\n" " \n" @@ -3303,23 +3644,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3357,7 +3699,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." -#: builtins.c:852 +#: builtins.c:879 +#, fuzzy msgid "" "Display status of jobs.\n" " \n" @@ -3366,8 +3709,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3400,7 +3743,8 @@ msgstr "" " 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 +#: builtins.c:906 +#, fuzzy msgid "" "Remove jobs from current shell.\n" " \n" @@ -3410,7 +3754,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3430,7 +3774,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná JOBSPEC." -#: builtins.c:898 +#: builtins.c:925 +#, fuzzy msgid "" "Send a signal to a job.\n" " \n" @@ -3442,7 +3787,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3470,7 +3816,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." -#: builtins.c:921 +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3512,11 +3858,11 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" 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" +" Vyhodnotí každý ARG ako aritmetický výraz. 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" @@ -3538,13 +3884,13 @@ msgstr "" " \t&&\t\tkonjunkcia\n" " \t||\t\talternatíva\n" " \tvýraz ? výraz : výraz\n" -" \t\t\tpodmienený operator\n" +" \t\t\tpodmienený operátor\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" +" v rámci výrazu nahradí jej hodotou (prevedenou na 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" @@ -3555,7 +3901,7 @@ msgstr "" " Návratová hodnota:\n" " Ak sa posledný ARG vyhodnotí na 0, let vráti 1; 0 inak sa vráti 0." -#: builtins.c:966 +#: builtins.c:994 #, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" @@ -3567,7 +3913,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3577,30 +3925,34 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\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" @@ -3616,30 +3968,37 @@ msgstr "" " 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" +" -a pole\tvšetky načítané slová sa priradia postupne indexom poľa POLE,\n" +" \t\tpočí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" +" \t\tnamiesto znaku nového riadka.\n" +" -e\t\tna načítanie riadka sa použije Readline ak je shell " +"interaktívny.\n" +" -i text\tpoužije TEXT ako prvotný text pre Readline\n" +" -n nznakov\tčítanie vstupu skončí po načítaní NZNAKOV znakov bez " +"čakania\n" +" \t\tna nový riadok, ale rešpektovať oddeľovač v prípade menej ako " +"NZNAKOV\n" +" -N nchars\tčítanie vstupu skončí presne po načítaní ZNAKOV znakov,\n" +" \t\tiba ak by sa skôr vyskytol koniec súboru alebo časový interval na\n" +" \t\tčítanie vypršal, ignorujúc oddeľovače\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" +" \t\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" +" -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" +" \tnastavená premenná TIMEOUT, jej hodnota je štandardný interval\n" +" \texpirácie. TIMEOUT môže byť zlomok. Ak je TIMEOUT 0, read sa ukončí\n" +" \túspešne iba ak je na požadovanom popisovači k dispozícii vsup.\n" +" \tNávratová hodnota je väčš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 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3660,7 +4019,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti N alebo zlyhá ak shell nevykonáva funkciu či skript." -#: builtins.c:1022 +#: builtins.c:1055 +#, fuzzy msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3726,9 +4086,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3743,7 +4107,7 @@ msgid "" 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" +" 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" @@ -3759,44 +4123,42 @@ msgstr "" " -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 " +" 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é " +" 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" +" 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" +" xtrace rovnaké ako -x\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" @@ -3814,6 +4176,9 @@ msgstr "" " -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" +" Ak nezostávajú žiadne argumenty, zruší sa nastavenie pozičných\n" +" parametrov.\n" " - Odovzdať všetky zostávajúce argumenty pozičným parametrom.\n" " Voľby -x a -v sú vypnuté.\n" " \n" @@ -3826,7 +4191,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba." -#: builtins.c:1104 +#: builtins.c:1140 +#, fuzzy msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3835,6 +4201,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3863,7 +4231,7 @@ msgstr "" " Vráti 0 ak sa nestalo, že je NÁZOV iba na čítanie a nebola zadaná\n" " neplatná voľba." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3898,7 +4266,8 @@ msgstr "" " Vráti 0 ak sa nestalo, že je NÁZOV neplatný a nebola zadaná\n" " neplatná voľba." -#: builtins.c:1143 +#: builtins.c:1181 +#, fuzzy msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3910,7 +4279,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3936,7 +4306,7 @@ msgstr "" " Vráti 0 ak sa nestalo, že je NÁZOV neplatný a nebola zadaná\n" " neplatná voľba." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3954,7 +4324,7 @@ msgstr "" " 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 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3978,7 +4348,7 @@ msgstr "" " 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 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4002,14 +4372,18 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak sa nestalo, že je vypnuté riadenie úloh a nevyskytla sa chyba." -#: builtins.c:1223 +#: builtins.c:1262 +#, 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4063,6 +4437,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4081,35 +4458,37 @@ 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" +" 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" +" Správanie príkazu test závisí na počte argumentov. Úplnú\n" +" špecifikáciu si môžete prečítať na manuálovej stránke bash.\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" +" -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" @@ -4120,30 +4499,31 @@ msgstr "" " \n" " Operátory reťazcov:\n" " \n" -" -z REŤAZEC Pravda ak je reťazec prázdny.\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Ť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 " +" 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 " +" 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" +" -o VOĽBA Pravda ak je VOĽBA shellu zapnutá.\n" +" -v PREM\t Pravda ak je premenná PREM shellu nastavená.\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" +" 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" @@ -4154,7 +4534,7 @@ msgstr "" " 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 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4166,7 +4546,7 @@ msgstr "" " Toto je synonymum vsatavanej funkcie „test“, ale posledný\n" " argument musí byť literál „]“, ktorý uzatvára otvárajúcu „[“." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -4185,7 +4565,7 @@ msgstr "" " Návratová hodnota:\n" " Vždy vráti 0." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -4201,7 +4581,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4223,7 +4611,8 @@ 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" +"signál\n" +" 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" @@ -4231,9 +4620,14 @@ msgstr "" " 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" +" Ak SIGNAL_SPEC je EXIT (0), príkaz ARG sa vykoná pri ukončení shellu.\n" +" Ak je SIGNAL_SPEC DEBUG, ARG sa vykoná po každom jednoduchom príkaze.\n" +" Ak je SIGNAL_SPEC RETURN, ARG sa vykoná po každom vykonaní funkcie " +"shellu\n" +" alebo dokončení skriptu spusteného pomocou „.“ alebo „source“.\n" +" Ak je SIGNAL_SPEC ERR, ARG sa vykoná po každom ukončení shellu " +"spôsobenom\n" +" chybou príkazu, keď je zapnutá voľba -e.\n" " \n" " Ak nie sú uvedené žiadne argumenty, trap vypíše zoznam príkazov\n" " asociovaných s každým signálom.\n" @@ -4251,7 +4645,8 @@ msgstr "" " Vráti 0 ak sa nestalo, že je SIGSPEC neplatný a nebola zadaná\n" " neplatná voľba." -#: builtins.c:1352 +#: builtins.c:1401 +#, fuzzy msgid "" "Display information about command type.\n" " \n" @@ -4260,18 +4655,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4306,7 +4701,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak boli nájdené všetky NÁZVY; zlyhá ak nie." -#: builtins.c:1383 +#: builtins.c:1432 +#, fuzzy msgid "" "Modify shell resource limits.\n" " \n" @@ -4324,6 +4720,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4335,6 +4732,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4390,7 +4792,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4424,21 +4826,37 @@ msgstr "" " Vráti 0 ak sa nestalo, že je REŽIM neplatný a nebola zadaná\n" " neplatná voľba." -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" "Čakať na dokončenie úlohy a vrátiť návratovú hodnotu.\n" " \n" @@ -4452,18 +4870,20 @@ msgstr "" " Vráti stav ID; zlyhá ak je ID neplatný alebo bola zadaná\n" " neplatná voľba." -#: builtins.c:1466 +#: builtins.c:1534 +#, 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." msgstr "" "Čakať na ukončenie zadaného procesu a vypísať jeho návratovú hodnotu.\n" " \n" @@ -4476,7 +4896,7 @@ msgstr "" " Vráti stav ID; zlyhá ak je ID neplatný alebo bola zadaná neplatná\n" " voľba." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4498,7 +4918,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4528,7 +4948,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4563,7 +4983,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4591,7 +5011,7 @@ msgstr "" " Návratová hodnota:\n" " Návratová hodnota je návratová hodnota RÚRY." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4609,7 +5029,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -4646,12 +5066,14 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1580 +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4664,12 +5086,14 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." @@ -4682,7 +5106,8 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1604 +#: builtins.c:1672 +#, fuzzy msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4692,7 +5117,7 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" "Vytvoriť koproces s názvom NÁZOV.\n" " \n" @@ -4704,7 +5129,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu PRÍKAZu." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -4729,7 +5154,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak sa nestalo, že je NÁZOV iba na čítanie." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4747,7 +5172,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu posledného vykonaného príkazu." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4771,12 +5196,13 @@ msgstr "" " Návratová hodnota:\n" " Vráti návratovú hodnotu obnovenej úlohy." -#: builtins.c:1659 +#: builtins.c:1727 +#, fuzzy msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4789,7 +5215,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 1 ak sa VÝRAZ vyhodnotí na 0; inak vráti 0." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -4837,7 +5263,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 alebo 1 v závislosti na hodnote VÝRAZu." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4941,7 +5367,8 @@ msgstr "" " 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 +#: builtins.c:1822 +#, fuzzy msgid "" "Add directories to stack.\n" " \n" @@ -4951,19 +5378,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4997,7 +5424,8 @@ msgstr "" " Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa\n" " chyba pri zmene adresára." -#: builtins.c:1788 +#: builtins.c:1856 +#, fuzzy msgid "" "Remove directories from stack.\n" " \n" @@ -5006,16 +5434,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5047,7 +5475,8 @@ msgstr "" " Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa\n" " chyba pri zmene adresára." -#: builtins.c:1818 +#: builtins.c:1886 +#, fuzzy msgid "" "Display directory stack.\n" " \n" @@ -5058,19 +5487,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5098,14 +5527,14 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa chyba." -#: builtins.c:1847 +#: builtins.c:1917 +#, fuzzy 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5136,7 +5565,8 @@ msgstr "" " Vráti 0 ak je OPTNAME zapnuté; zlyhá ak bola zadaná\n" " neplatná voľba alebo OPTNAME je vypnuté." -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5153,19 +5583,34 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\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" +"Formátuje a vypisuje ARGUMENTY podľa FORMÁTu.\n" +" \n" +" Voľby:\n" +" -v PREM\tpriradiť výstup premennej shellu PREM namiesto\n" +" \t\tzobrazenia na štandarný výstup\n" " \n" " FORMÁT je reťazec znakov, ktorý obsahuje tri typy objektov: čisté " "znaky,\n" @@ -5180,12 +5625,14 @@ msgstr "" " %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" +" %(fmt)T vyspísať reťacez dátumu a času, ktorý vznikne použitím FMT\n" +" ako formátovacieho reťazca pre strftime(3)\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 +#: builtins.c:1974 #, fuzzy msgid "" "Specify how arguments are to be completed by Readline.\n" @@ -5199,15 +5646,19 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5223,6 +5674,10 @@ msgstr "" " \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" +" -D\tpoužiť dopĺňanie a operácie ako predvolené pre príkazy\n" +" \tbez definovaného konkrétneho dopĺňania\n" +" -E\tpoužiť dopĺňanie a operácie pre príkazy „empty“ --\n" +" \tpokus o dopĺňanie na prázdnom príkazovom riadku\n" " \n" " Pri pokuse o doplnenie sa operácie použijú v poradí hore uvedených\n" " volieb veľkými písmenami.\n" @@ -5230,7 +5685,7 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." -#: builtins.c:1923 +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -5250,14 +5705,14 @@ msgstr "" " Návratová hodnota:\n" " Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba." -#: builtins.c:1938 +#: builtins.c:2019 #, 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5266,6 +5721,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5290,6 +5746,8 @@ msgstr "" " \n" " Voľby:\n" " \t-o voľba\tNastaví voľbu dopĺňania VOĽBA pre každý NÁZOV\n" +" \t-D\t\tZmení voľby dopĺňania príkazov „default“\n" +" \t-E\t\tZmení voľby dopĺňania príkazov „empty“\n" " \n" " Použitím „+o“ namiesto „-o“ vypnete určenú voľbu.\n" " \n" @@ -5305,7 +5763,7 @@ msgstr "" " Vráti 0 ak nebola zadaná neplatná voľba a NÁZOV nemá definovanú\n" " špecifikáciu dopĺňania." -#: builtins.c:1968 +#: builtins.c:2050 #, fuzzy msgid "" "Read lines from the standard input into an indexed array variable.\n" @@ -5317,24 +5775,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5345,14 +5805,14 @@ msgid "" "or\n" " not an indexed array." msgstr "" -"Načítať riadky zo súboru do premennej poľa.\n" +"Načítať riadky zo štandardného vstupu do premennej indexovaného 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 " +" -n počet\tSkopírovať najviac POČET riadkov. Ak je POČET 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" @@ -5368,16 +5828,17 @@ msgstr "" " 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" +" Pri vyhodnotení CALLBACK sa dodá index ďalšieho prvku 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." +" Vráti 0 ak nebola zadaná neplatná voľba a POLE nie je len na čítanie a\n" +" nie je to indexované pole." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -5387,6 +5848,69 @@ msgstr "" " \n" " Synonymum k „mapfile“." +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: neplatný kľúč asociatívneho poľa" + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Copyright (C) 2011 Free Software Foundation, Inc." + +#~ 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 " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: proces %5ld (%s) v the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Neznáme číslo signálu" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Licencia GPLv2+: GNU GPL verzie 2 alebo novšia http://gnu.org/licenses/" +#~ "gpl.html\n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "pravda" + +#~ msgid "false" +#~ msgstr "nepravda" + +#~ msgid "times" +#~ msgstr "-krát" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". S VÝR vracia\n" +#~ " " + +#~ 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 "" +#~ "; tieto informácie naviac možno použiť na\n" +#~ " trasovania zásobníka.\n" +#~ " \n" +#~ " Hodnota VÝR značí o koľko rámcov sa vrátiť pred súčasný\n" +#~ " Vrchný rámec je rámec 0." + #~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" #~ msgstr "" #~ "xrealloc: nie je možné realokovať %lu bajtov (%lu bajtov alokovaných)" @@ -5516,9 +6040,6 @@ msgstr "" #~ 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," diff --git a/po/sl.gmo b/po/sl.gmo new file mode 100644 index 0000000..2615432 Binary files /dev/null and b/po/sl.gmo differ diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..107fcea --- /dev/null +++ b/po/sl.po @@ -0,0 +1,5910 @@ +# Slovenian translation of bash. +# Copyright (C) 2012 - 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Damir Jerovšek , 2012 - 2013. +# Klemen Košir , 2012 - 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-4.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2013-03-09 20:21+0100\n" +"Last-Translator: Klemen Košir \n" +"Language-Team: Slovenian \n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" +"%100==4 ? 3 : 0);\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "slab podpis polja" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: ni mogoče pretvoriti zabeleženega polja v povezano polje" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: ni mogoče dodeliti v ne-številčno kazalo" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: treba je uporabiti podpis pri dodeljevanju povezanega polja" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: ni mogoče ustvariti: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" +"bash_execute_unix_command: ni mogoče najti tipkovne razvrstitve za ukaz" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: prvi znak brez presledka ni `\"'" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "brez zaključka `%c' v %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: manjka ločilnik dvopičja" + +#: bashline.c:4733 +#, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': ni mogoče odvezati" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "`%s': neveljaven vzdevek" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "urejanje vrstic ni omogočeno" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "`%s': neveljavno ime tipkovne razvrstitve" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: ni mogoče brati: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': neznano ime funkcije" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s ni vezan na nobeno tipko.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s se lahko pokliče s pomočjo " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': ni mogoče odvezati" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "števec zanke" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "smiselno samo v `for', `while', ali `until' zanki" + +#: builtins/caller.def:136 +#, fuzzy +msgid "" +"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." +msgstr "" +"Vrne vsebino trenutnega klica podprograma.\n" +" \n" +" Brez IZRAZA vrne \"$line $filename\". Z IZRAZOM vrne\n" +" \"$line $subroutine $filename\"; ta dodaten podatek se lahko uporabi\n" +" za zagotovitev sledenja sklada.\n" +" \n" +" Vrednost IZRAZA nakazuje, koliko okvirjev klicev mora nazaj\n" +" pred trenutnega; zgornji okvir je okvir 0.\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, razen če lupina ne izvršuje funkcije lupine ali pa IZRAZ\n" +" ni veljaven." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME ni nastavljen" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "preveč argumentov" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "ni druge mape" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD ni nastavljen" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "vrstica %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "opozorilo: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: uporaba: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: možnost zahteva argument" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: zahtevan je števni argument" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: ni mogoče najti" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: neveljavna možnost" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: neveljavno ime možnosti" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': neveljavno določilo" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "neveljavno osmiško število" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "neveljavno šestnajstiško število" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "neveljavno število" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: neveljavno določilo signala" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': ni določilo opravila ali neveljavno določilo posla" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: spremenljivka le za branje" + +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: ni mogoče ponastaviti" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s izven dosega" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "argument" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s izven dosega" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: ni takšnega posla" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: ni nadzora posla" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "ni nadzora posla" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: omejeno" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "omejeno" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ni vgrajena lupina" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "napaka med pisanjem: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "napaka med nastavljanjem atributov terminala: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "napaka med pridobivanjem atributov terminala: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: napaka med pridobivanjem trenutne mape: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: dvoumno določilo posla" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ni mogoče ponastaviti: samo za branje %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ni mogoče ponastaviti" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: neveljavno ime dejanja" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, c-format +msgid "%s: no completion specification" +msgstr "%s: ni določila dopolnjevanja" + +#: builtins/complete.def:696 +msgid "warning: -F option may not work as you expect" +msgstr "Opozorilo: možnost -F morda ne bo delovala po pričakovanjih" + +#: builtins/complete.def:698 +msgid "warning: -C option may not work as you expect" +msgstr "Opozorilo: možnost -C morda ne bo delovala po pričakovanjih" + +#: builtins/complete.def:846 +msgid "not currently executing completion function" +msgstr "trenutno se ne izvaja funkcija dopolnjevanja" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "se lahko uporabi samo v funkciji" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "ni mogoče uporabiti `-f' za ustvarjanje funkcij" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: funkcija samo za branje" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "`%s': neveljaven vzdevek" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: na ta način ni mogoče uničiti spremenljivk polja" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: ni mogoče pretvoriti povezanega polja v zabeleženo polje" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "dinamično nalaganje ni na voljo" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "ni mogoče odpreti predmeta v souporabi %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "ni mogoče najti %s v predmetu v souporabi %s: %s" + +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: ni dinamično naloženo" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: ni dinamično naloženo" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: ni mogoče izbrisati: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: je mapa" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ni običajna datoteka" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: datoteka je prevelika" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: ni mogoče izvesti binarne datoteke" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: ni mogoče izvesti: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "odjava\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "ni prijavna lupina: uporabite `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Obstajajo ustavljeni posli.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Obstajajo posli, ki se izvajajo.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "najdenega ni nobenega ukaza" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "določilo zgodovine" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: ni mogoče odpreti začasne datoteke: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "trenutno" + +#: builtins/fg_bg.def:161 +#, c-format +msgid "job %d started without job control" +msgstr "posel %d se je pričel brez nadzora" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: neveljavna možnost -- %c\n" + +#: builtins/getopt.c:111 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: možnost zahteva argument -- %c\n" + +#: builtins/hash.def:91 +msgid "hashing disabled" +msgstr "razpršitev je onemogočena" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: razpršitvena razpredelnica je prazna\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "zadetki\tukaz\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Ključnih besed, ki se ujemajo z ukazi lupine `" +msgstr[1] "Ključna beseda, ki se ujema z ukazi lupine `" +msgstr[2] "Ključni besedi, ki se ujemata z ukazi lupine `" +msgstr[3] "Ključne besede, ki se ujemajo z ukazi lupine `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" + +#: builtins/help.def:185 +#, c-format +msgid "" +"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" +"nobena tema pomoči se ne ujema s `%s'. Poskusite `help help' ali `man -k " +"%s' ali `info %s'." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: ni mogoče odpreti: %s" + +#: builtins/help.def:523 +#, 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 "" +"Ti ukazi lupine so določeni znotraj lupine. Vpišite `help' za prikaz tega " +"seznama.\n" +"Vpišite `help ime', če želite izvedeti več o `imenu' funkcije.\n" +"Uporabite `info bash', če želite izvedeti več o lupini na splošno.\n" +"Uporabite `man -k' ali `info', če želite izvedeti več o ukazih, ki niso na " +"tem seznamu.\n" +"\n" +"Zvezdica (*) poleg imena pomeni, da je ukaz onemogočen.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "ni mogoče uporabiti več kot eno od -anrw" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "položaj zgodovine" + +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: neveljavno ime možnosti" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: razširitev zgodovine je spodletela" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib je spodletel" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "druge možnosti niso dovoljene z `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: argumenti morajo biti določila opravila ali posla" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Neznana napaka" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "izraz je bil pričakovan" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: ni zabeleženo polje" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: neveljavno določilo opisnika datoteke" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: neveljaven opisnik datoteke: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: neveljavno štetje vrstic" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: neveljaven izvor polja" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: neveljaven del povratnega klica" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "prazno ime spremenljivke polja" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "potrebna podpora spremenljivke polja" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': manjka znak oblike" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': neveljavno določilo vrste časa" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "`%c': neveljaven znak oblike" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "opozorilo: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "manjka šestnajstiška števka za \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "manjka števka s podporo unicode za \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "ni druge mape" + +#: builtins/pushd.def:360 +#, fuzzy, c-format +msgid "%s: invalid argument" +msgstr "%s: neveljaven argument omejitve" + +#: builtins/pushd.def:480 +msgid "" +msgstr "" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "sklad mape je prazen" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "kazalo sklada mape" + +#: builtins/pushd.def:701 +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 "" +"Prikaže seznam trenutno pomnjenih map. Mape\n" +" so prikazane na seznamu z ukazom `pushd'; na vrh\n" +" seznama se lahko vrnete z ukazom `popd'.\n" +" \n" +" Možnosti:\n" +" -c\tizbriši sklad mape z brisanjem vseh elementov\n" +" -l\tne izpiši sorodnih map s predpono `~' v mojo domačo mapo\n" +" -p\tizpiši sklad mape z enim vnosom v vrstici\n" +" -v\tizpiši sklad mape z enim vnosom v vrstici z določenim\n" +" \tpoložajem v skladu\n" +" \n" +" Argumenti:\n" +" +N\tPrikaže Nti vnos s štetjem z leve strani seznama, prikazan s\n" +" \tpomočjo map, ko kličemo brez možnosti, začenši z nič.\n" +" \n" +" -N\tPrikaže Nti vnos s štetjem z desne strani seznama, prikazan s\n" +"\tpomočjo map, ko kličemo brez možnosti, začenši z nič." + +#: builtins/pushd.def:723 +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 "" +"Doda mapo na vrh sklada mape ali zavrti\n" +" sklad, kar spremeni nov vrh sklada v trenutno delovno\n" +" mapo. Če je brez argumentov, se izmenjata najvišji mapi.\n" +" \n" +" Možnosti:\n" +" -n\tPreprečuje običajno spremembo mape pri dodajanju\n" +" \tmap na sklad, tako se obdeluje le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tZavrti sklad tako, da je N-ta mapa (štetje\n" +" \tz leve strani seznama, prikazano z `dirs', začenši z\n" +" \tnič) na vrhu.\n" +" \n" +" -N\tZavrti sklad tako, da je N-ta mapa (štetje\n" +" \tz desne strani seznama, prikazano z `dirs', začenši z\n" +" \tnič) na vrhu.\n" +" \n" +" dir\tDoda DIR skladu mape na vrhu, kar jo spremeni v\n" +" \tnovo trenutno delovno mapo.\n" +" \n" +" Ukaz lupine `dirs' prikaže sklad map." + +#: builtins/pushd.def:748 +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 "" +"Odstrani vnose iz sklada map. Če je brez argumentov, odstrani\n" +" najvišjo mapo iz sklada in spremeni v novo mapo na vrhu.\n" +" \n" +" Možnosti:\n" +" -n\tPreprečuje običajno spremembo mape pri dodajanju\n" +" \tmap iz sklada, tako se obdeluje le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tOdstrani N-ti vnos s štetjem z leve strani seznama,\n" +" \tprikazano z `dirs', začenši z nič. Na primer: `popd +0'\n" +" \todstrani prvo mapo, `popd +1' odstrani drugo.\n" +" \n" +" -N\tOdstrani N-ti vnos s štetjem z desne strani seznama,\n" +" \tprikazano z `dirs', začenši z nič. Na primer: `popd +0'\n" +" \todstrani zadnjo mapo, `popd -1' odstrani predzadnjo.\n" +" \n" +" Ukaz lupine `dirs' prikaže sklad map." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: neveljavno določilo časovne omejitve" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "napaka med branjem: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "`return' lahko vrne samo iz funkcije ali skripte z izvorno kodo" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "ni mogoče ponastaviti funkcije in spremenljivke hkrati" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ni spremenljivka polja" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: ni funkcija" + +#: builtins/setattr.def:194 +#, fuzzy, c-format +msgid "%s: cannot export" +msgstr "%s: ni mogoče ponastaviti" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "štetje premika" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "ni mogoče nastaviti in ponastaviti možnosti lupine hkrati" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: neveljavno ime možnosti lupine" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "zahtevan je argument imena datoteke" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: datoteke ni mogoče najti" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "ni mogoče dati v pripravljenost" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "prijavne lupine ni mogoče dati v pripravljenost" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s je drugo ime za `%s'\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s je ključna beseda lupine\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s je funkcija\n" + +#: builtins/type.def:299 +#, fuzzy, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s je vgrajena lupina\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s je vgrajena lupina\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s je %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s je razpršeno (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: neveljaven argument omejitve" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': slab ukaz" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: ni mogoče dobiti omejitve: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "omejitev" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: ni mogoče spremeniti omejitve: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "osmiško število" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "`%c': neveljaven operator simbolnega načina" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "`%c': neveljaven znak simbolnega načina" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " vrstica " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "zadnji ukaz: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Prekinjanje ..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "opozorilo: " + +#: error.c:488 +msgid "unknown command error" +msgstr "neznana napaka ukaza" + +#: error.c:489 +msgid "bad command type" +msgstr "slaba vrsta ukaza" + +#: error.c:490 +msgid "bad connector" +msgstr "slab povezovalnik" + +#: error.c:491 +msgid "bad jump" +msgstr "slab skok" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: nedoločena spremenljivka" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\apotekla je časovna omejitev med čakanjem na vnos: samodejna odjava\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "ni mogoče preusmeriti običajnega vnosa iz /dev/null: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: `%c': neveljaven znak oblike" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "napaka cevi" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: omejeno: ni mogoče določiti `/' v imenih ukaza" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: ukaza ni mogoče najti" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: ni mogoče izvesti binarne datoteke" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: slab tolmač" + +#: execute_cmd.c:6037 +#, fuzzy, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: ni mogoče izvesti binarne datoteke" + +#: execute_cmd.c:6123 +#, fuzzy, c-format +msgid "`%s': is a special builtin" +msgstr "%s je vgrajena lupina\n" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "ni mogoče podvajati fd %d v fd %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "stopnja rekurzivnosti izraza presežena" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "prekoračitev spodnje meje sklada rekurzivnosti" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "skladenjska napaka v izrazu" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "poskus dodelitve ne-spremenljivki" + +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "skladenjska napaka v izrazu" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "delitev z 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "hrošč: slab žeton expassign" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "`:' pričakovano za pogojni izraz" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "eksponent je manjši kot 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "po predhodnem večanju ali manjšanju je pričakovano določilo" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "manjka `)'" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "skladenjska napaka: pričakovan operand" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "skladenjska napaka: neveljaven aritmetični operand" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (žeton napake je \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "neveljavna aritmetična zbirka" + +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: neveljavno štetje vrstic" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "vrednost je prevelika za zbirko" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: napaka izraza\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: ni mogoče dostopati do nadrejenih map" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "ni mogoče ponastaviti načina brez zakasnitve za fd %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "ni mogoče dodeliti opisnika novih map za vnos bash iz fd %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: medpomnilnik že obstaja za nov fd %d" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: cev pgrp" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "razvejen id opravila %d se pojavi v izvajajočem se poslu %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "brisanje ustavljenega posla %d s skupino opravila %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: id opravila %5ld (%s) je označen kot še živ" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: ni takšnega določila opravila" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Signal %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Končano" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Zaustavljeno" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Zaustavljeno(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Se izvaja" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Končano(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Končaj %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Neznano stanje" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(izpis jedra) " + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "podrejeno opravilo setpgid (%ld v %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: opravilo z id %ld ni podrejeno opravilo te lupine" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: ni zapisov o opravilu %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: posel %d je zaustavljen" + +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: ni takšnega posla" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: posel je uničen" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: posel %d se že izvaja v ozadju" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: vklop WNOHANG za preprečitev nedoločenosti bloka" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: vrstica %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (izpis jedra)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(wd zdaj: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp je spodletel" + +#: jobs.c:4434 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: vrstična disciplina" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: vrstična disciplina" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "ni mogoče nastaviti skupine opravil terminala (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "brez nadzora posla v tej lupini" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: spodletela trditev: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: trditev je bila slabo izpeljana\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "neznano" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: vsebina bloka na prostem seznamu je bila prepisana" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: poklican z že sproščenim argumentom bloka" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: klic z nedodeljenim argumentom bloka" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "" +"free: velikosti začetnih in končnih podatkovnih kosov \"chunk\" se " +"razlikujejo" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: klic z nedodeljenim argumentom bloka" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: zaznana prekoračitev spodnje meje; mh_nbytes je izven dosega" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "" +"realloc: velikosti začetnih in končnih podatkovnih kosov \"chunk\" se " +"razlikujejo" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: je dodelitvena razpredelnica polna z FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: je %p že v razpredelnici kot dodeljen?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: je %p že v razpredelnici kot prost?\n" + +#: lib/sh/fmtulong.c:102 +msgid "invalid base" +msgstr "neveljavna zbirka" + +#: lib/sh/netopen.c:168 +#, c-format +msgid "%s: host unknown" +msgstr "%s: gostitelj je neznan" + +#: lib/sh/netopen.c:175 +#, c-format +msgid "%s: invalid service" +msgstr "%s: neveljavna storitev" + +#: lib/sh/netopen.c:306 +#, c-format +msgid "%s: bad network path specification" +msgstr "%s: slabo določilo omrežne poti" + +#: lib/sh/netopen.c:347 +msgid "network operations not supported" +msgstr "omrežno opravilo ni podprto" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: ni mogoče spremeniti jezikovne oznake (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: ni mogoče spremeniti jezikovne oznake (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: ni mogoče spremeniti jezikovne oznake (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: ni mogoče spremeniti jezikovne oznake (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Imate pošto v $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Imate novo pošto v $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Pošta v %s je bila prebrana\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "skladenjska napaka: potreben je aritmetični izraz" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "skladenjska napaka: `;' nepričakovano" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "skladenjska napaka: `((%s))'" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: slaba vrsta navodila %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document v vrstici %d razmejen z end-of-file (želeno `%s')" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: navodilo preusmeritve `%d' je izven dosega" + +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "nepričakovan konec datoteke med iskanjem ujemanja z `%c'" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "nepričakovan konec datoteke med iskanjem ujemanja z `]]'" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "skladenjska napaka v pogojnem izrazu: nepričakovan žeton `%s'" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "skladenjska napaka v pogojnem izrazu" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "nepričakovan žeton `%s', pričakovan je bil `)'" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "pričakovan `)'" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "nepričakovan argument `%s' do pogojnega enoslovnega operatorja" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "nepričakovan argument do pogojnega enoslovnega operatorja" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "nepričakovan žeton `%s', pričakovan je binarni pogojni operator" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "pričakovan je binarni pogojni operator" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "nepričakovan argument `%s' do pogojnega binarnega operatorja" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "nepričakovan argument do pogojnega binarnega operatorja" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "nepričakovan žeton `%c' v pogojnem ukazu" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "nepričakovan žeton `%s' v pogojnem ukazu" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "nepričakovan žeton %d v pogojnem ukazu" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "skladenjska napaka blizu nepričakovanega žetona `%s'" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "skladenjska napaka blizu `%s'" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "skladenjska napaka: nepričakovan konec datoteke" + +#: parse.y:6151 +msgid "syntax error" +msgstr "skladenjska napaka" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Uporabite \"%s\", če želite zapustiti lupino.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "nepričakovan konec datoteke med iskanjem ujemanja z `)'" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "končano: funkcije `%s' ni mogoče najti" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: slab povezovalnik `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: neveljaven opisnik datoteke" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: prazen kazalec datoteke NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: `%c': neveljaven znak oblike" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "opisnik datoteke je izven dosega" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: dvoumna preusmeritev" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: ni mogoče prepisati obstoječe datoteke" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: omejitev: ni mogoče preusmeriti izhoda" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "ni mogoče ustvariti začasne datoteke za here-document: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: ni mogoče dodeliti fd spremenljivki" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port ni podprt brez omrežja" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "napaka preusmeritve: ni mogoče podvajati fd" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "ni mogoče najti /tmp, ustvarite ga!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp mora biti veljavno ime mape" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: neveljavna možnost" + +#: shell.c:1343 +#, fuzzy, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "ni mogoče ponastaviti načina brez zakasnitve za fd %d" + +#: shell.c:1354 +#, fuzzy, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "ni mogoče ponastaviti načina brez zakasnitve za fd %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, fuzzy, c-format +msgid "%s: Is a directory" +msgstr "%s: je mapa" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Ni imena!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, različica %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Uporaba:\t%s [dolga možnost GNU] [možnost] ...\n" +"\t%s [dolga možnost GNU] [možnost] skriptni dokument ...\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "Dolge možnosti GNU:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Možnosti lupine:\n" + +#: shell.c:2069 +#, fuzzy +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD ali ukaz -c ali -O shopt_option\t\t(samo sklicevanje)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ali možnost -o\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Vpišite `%s -c \"help set\"' za več podrobnosti o možnostih lupine.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Vpišite `%s -c help' za več podrobnosti o možnostih ukazov lupine.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Uporabite ukaz `bashbug' za poročanje hroščev.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" + +#: sig.c:765 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "sigprocmask: %d: neveljavno opravilo" + +#: siglist.c:48 +msgid "Bogus signal" +msgstr "Lažen signal" + +#: siglist.c:51 +msgid "Hangup" +msgstr "Odloži" + +#: siglist.c:55 +msgid "Interrupt" +msgstr "Prekini" + +#: siglist.c:59 +msgid "Quit" +msgstr "Končaj" + +#: siglist.c:63 +msgid "Illegal instruction" +msgstr "Neveljaven ukaz" + +#: siglist.c:67 +msgid "BPT trace/trap" +msgstr "BPT trace/trap" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "ukaz ABORT" + +#: siglist.c:79 +msgid "EMT instruction" +msgstr "ukaz EMT" + +#: siglist.c:83 +msgid "Floating point exception" +msgstr "Izjema s plavajočo vejico" + +#: siglist.c:87 +msgid "Killed" +msgstr "Uničen" + +#: siglist.c:91 +msgid "Bus error" +msgstr "Napaka vodila" + +#: siglist.c:95 +msgid "Segmentation fault" +msgstr "Napaka segmentacije" + +#: siglist.c:99 +msgid "Bad system call" +msgstr "Slab sistemski klic" + +#: siglist.c:103 +msgid "Broken pipe" +msgstr "Prekinjena cev" + +#: siglist.c:107 +msgid "Alarm clock" +msgstr "Budilka" + +#: siglist.c:111 +msgid "Terminated" +msgstr "Zaključen" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "Nujen pogoj IO" + +#: siglist.c:119 +msgid "Stopped (signal)" +msgstr "Ustavljen (signal)" + +#: siglist.c:127 +msgid "Continue" +msgstr "Nadaljuj" + +#: siglist.c:135 +msgid "Child death or stop" +msgstr "Podrejeno opravilo je uničeno ali zaustavljeno" + +#: siglist.c:139 +msgid "Stopped (tty input)" +msgstr "Ustavljen (vhod TTY)" + +#: siglist.c:143 +msgid "Stopped (tty output)" +msgstr "Ustavljen (izhod TTY)" + +#: siglist.c:147 +msgid "I/O ready" +msgstr "I/O je pripravljen" + +#: siglist.c:151 +msgid "CPU limit" +msgstr "omejitev CPE" + +#: siglist.c:155 +msgid "File limit" +msgstr "omejitev datoteke" + +#: siglist.c:159 +msgid "Alarm (virtual)" +msgstr "Budilka (navidezna)" + +#: siglist.c:163 +msgid "Alarm (profile)" +msgstr "Budilka (profil)" + +#: siglist.c:167 +msgid "Window changed" +msgstr "Okno se je spremenilo" + +#: siglist.c:171 +msgid "Record lock" +msgstr "Zaklep zapisa" + +#: siglist.c:175 +msgid "User signal 1" +msgstr "Signal uporabnika 1" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Signal uporabnika 2" + +#: siglist.c:183 +msgid "HFT input data pending" +msgstr "vnos podatkov HFT je na čakanju" + +#: siglist.c:187 +msgid "power failure imminent" +msgstr "izpad električnega toka je neizbežen" + +#: siglist.c:191 +msgid "system crash imminent" +msgstr "sesutje sistema je neizbežno" + +#: siglist.c:195 +msgid "migrate process to another CPU" +msgstr "preseli opravilo na drug CPE" + +#: siglist.c:199 +msgid "programming error" +msgstr "napaka programiranja" + +#: siglist.c:203 +msgid "HFT monitor mode granted" +msgstr "način nadzora HFT je odobren" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "način nadzora HFT je umaknjen" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "zaporedje zvoka HFT je končano" + +#: siglist.c:215 +msgid "Information request" +msgstr "zahteva po podatkih" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Neznan signal #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "slaba zamenjava: ni zaključka `%s' v %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: ni mogoče dodeliti seznama članu polja" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "ni mogoče ustvariti cevi za zamenjavo opravila" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "ni mogoče ustvariti podrejenega opravila za zamenjavo opravila" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "ni mogoče odpreti imenovane cevi %s za branje" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "ni mogoče odpreti imenovane cevi %s za pisanje" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "ni mogoče podvajati imenovane cevi %s kot fd %d" + +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "slaba zamenjava: ni zaključka \"`\" v %s" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "ni mogoče ustvariti cevi za zamenjavo ukaza" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "ni mogoče ustvariti podrejenega opravila za zamenjavo ukaza" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: ni mogoče podvajati cevi kot fd 1" + +#: subst.c:7082 subst.c:10252 +#, fuzzy, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: %s: neveljavna vrednost za opisnik sledenja datotek" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, fuzzy, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: neveljavno štetje vrstic" + +#: subst.c:7212 subst.c:7377 +#, fuzzy, c-format +msgid "%s: invalid variable name" +msgstr "`%s': neveljaven vzdevek" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: parameter je prazen ali pa ni določen" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: parameter je prazen ali pa ni določen" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: izraz podniza < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: slaba zamenjava" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: ni mogoče dodeliti na tak način" + +#: subst.c:10111 +msgid "" +"future versions of the shell will force evaluation as an arithmetic " +"substitution" +msgstr "" +"prihodnje različice lupine bodo prisilile ocenitev kot aritmetično zamenjavo" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "slaba zamenjava: ni zaključka \"`\" v %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "ni ujemanja: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "pričakovan je argument" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: pričakovan je izraz celega števila" + +#: test.c:265 +msgid "`)' expected" +msgstr "pričakovan je `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "pričakovan je `)', najden je %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: pričakuje se binarni operator" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: pričakuje se enosnoven operator" + +#: test.c:896 +msgid "missing `]'" +msgstr "manjka `]'" + +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "skladenjska napaka: `;' nepričakovano" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "neveljavna števka signala" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: slaba vrednost v trap_list[%d]: %p" + +#: trap.c:416 +#, c-format +msgid "" +"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" +"run_pending_traps: ročnik signala je SIG_DFL, ponovno pošiljanje %d (%s) sebi" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: slab signal %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "napaka med uvozom določila funkcije `%s'" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "raven lupine (%d) je previsoka, ponastavljanje na 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: v trenutnem dosegu ni vsebine funkcije" + +#: variables.c:2661 +#, fuzzy, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: ni mogoče dodeliti fd spremenljivki" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: v trenutnem dosegu ni vsebine funkcije" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s ima prazen exportstr" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "neveljaven znak %d v exportstr za %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "ni `=' v exportstr za %s" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: glava shell_variables ni vsebina funkcije" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: ni vsebine global_variables" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: glava shell_variables ni trenuten obseg okolja" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: ni mogoče odpreti kot DATOTEKO" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: neveljavna vrednost za opisnik sledenja datotek" + +#: variables.c:6450 +#, fuzzy, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s izven dosega" + +#: version.c:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Avtorske pravice (C) 2009 Free Software Foundation, Inc.\n" + +#: version.c:47 version2.c:47 +msgid "" +"License GPLv3+: GNU GPL version 3 or later \n" +msgstr "" +"Dovoljenje GPLv3+: GNU GPL različica 3 ali poznejše \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, različica %s (%s)\n" + +#: version.c:91 version2.c:91 +#, fuzzy +msgid "This is free software; you are free to change and redistribute it." +msgstr "To je prosta programska oprema; lahko jo spreminjate in razširjate.\n" + +#: version.c:92 version2.c:92 +#, fuzzy +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Je BREZ KAKRŠNEKOLI GARANCIJE, v obsegu, ki ga dovoljuje zakonodaja.\n" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: ni mogoče dodeliti %lu bajtov (%lu bajtov je dodeljenih)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: ni mogoče dodeliti %lu bajtov" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: ni mogoče dodeliti %lu bajtov (%lu bajtov dodeljenih)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: ni mogoče dodeliti %lu bajtov" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [ime[=vrednost] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] ime [ime ...]" + +#: builtins.c:53 +#, fuzzy +msgid "" +"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "" +"bind [-lpvsPVS] [-m tipk_razvrstitev] [-f ime_dat] [-q ime] [-u ime] [-r " +"tipk_zaporedje] [-x tipk_zaporedje:ukaz_lupine] [tipk_zaporedje:" +"funkcija_brane_vrstice ali ukaz_brane_vrstice]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [vgrajena_lupina [arg ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [izraz]" + +#: builtins.c:66 +#, fuzzy +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [mapa]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "ukaz [-pVv] ukaz [arg ...]" + +#: builtins.c:78 +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilrtux] [-p] [ime[=vrednost] ...]" + +#: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilrtux] [-p] ime[=vrednost] ..." + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [možnost] ime[=vrednost] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [arg ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [arg ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f ime_datoteke] [ime ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [arg ...]" + +#: builtins.c:96 +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts niz_možnosti ime[arg]" + +#: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a ime] [ukaz [argumenti ...]] [preusmeritev ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "" +"fc [-e ime_urejevalnika] [-lnr] [prvi] [zadnji] ali fc -s [vzorec=zamenjava] " +"[ukaz]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [določilo_posla]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [določilo_posla ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p ime_poti] [-dt] [ime ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [vzorec ...]" + +#: builtins.c:123 +msgid "" +"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " +"[arg...]" +msgstr "" +"history [-c] [-d odmik] [n] ali history -anrw [ime_datoteke] ali history -ps " +"arg [arg...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [določilo_posla ...] ali jobs -x ukaz [argumenti]" + +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [določilo_posla ...]" + +#: builtins.c:134 +msgid "" +"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " +"[sigspec]" +msgstr "" +"kill [-s določilo_signala | -n št_signala | -določilo_signala] pid | " +"določilo_posla ... ali kill -l [določilo_signala]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" + +#: builtins.c:138 +msgid "" +"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " +"prompt] [-t timeout] [-u fd] [name ...]" +msgstr "" +"read [-ers] [-a polje] [-d razmejilnik] [-i besedilo] [-n n-znakov] [-N n-" +"znakov] [-p poziv] [-t časovna_omejitev] [-u fd] [ime ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o ime_možnosti] [--] [arg ...]" + +#: builtins.c:144 +#, fuzzy +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [ime ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [ime[=vrednost] ...] ali export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [ime[=vrednost] ...] ali readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source ime_datoteke [argumenti]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". ime_datoteke [argumenti]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [izraz]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ arg... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[arg] določilo_signala ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] ime [ime ...]" + +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHacdefilmnpqrstuvx] [meja]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [način]" + +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [id]" + +#: builtins.c:181 +#, fuzzy +msgid "wait [pid ...]" +msgstr "wait [id_opravila]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for IME [in IMENA ... ] ; do UKAZI; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( izraz1; izraz2; izraz3 )); do UKAZI; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select IME [in IMENA ... ;] do UKAZI; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] cevovod" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case IME in [VZOREC [| VZOREC]...) UKAZI ;;]... esac" + +#: builtins.c:194 +msgid "" +"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " +"COMMANDS; ] fi" +msgstr "" +"if UKAZI; then UKAZI; [ elif UKAZI; then UKAZI; ]... [ else UKAZI; ] fi" + +#: builtins.c:196 +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while UKAZI; do UKAZI; done" + +#: builtins.c:198 +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until UKAZI; do UKAZI; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [IME] ukaz [preusmeritve]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function ime { UKAZI ; } ali ime () { UKAZI ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ UKAZI ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "določilo_posla [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( izraz ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ izraz ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "spremenljivke - Imena in pomeni nekaterih spremenljivk lupine" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | mapa]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [ime_možnosti ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v spremenljivka] oblika [argumenti]" + +#: builtins.c:231 +#, fuzzy +msgid "" +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 možnost] [-A dejanje] [-G " +"krajevni_vzorec] [-W seznam_besed] [-F funkcija] [-C ukaz] [-X " +"filtrirni_vzorec] [-P predpona] [-S pripona] [ime ...]" + +#: builtins.c:235 +#, fuzzy +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 možnost] [-A dejanje] [-G krajevni_vzorec] [-W " +"seznam_besed] [-F funkcija] [-C ukaz] [-X filtrirni_vzorec] [-P predpona] [-" +"S pripona] [beseda]" + +#: builtins.c:239 +#, fuzzy +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o možnost] [-DE] [ime ...]" + +#: builtins.c:242 +#, fuzzy +msgid "" +"mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"mapfile [-n števec] [-O izvor] [-s števec] [-t] [-u fd] [-C povratni_klic] [-" +"c del] [polje]" + +#: builtins.c:244 +#, fuzzy +msgid "" +"readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C " +"callback] [-c quantum] [array]" +msgstr "" +"readarray [-n števec] [-O izvor] [-s števec] [-t] [-u fd] [-C povratni_klic] " +"[-c del] [polje]" + +#: builtins.c:256 +#, 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 "" +"Določi ali prikaže vzdevke.\n" +" \n" +" Če je `alias' brez argumentov, izpiše seznam vzdevkov v obliki za\n" +" večkratno uporabo `alias IME=VREDNOST' na standardnem izpisu.\n" +" \n" +" V nasprotnem primeru je za vsako IME določen vzdevek, čigar\n" +" VREDNOST je podana.\n" +" Vmesni presledni znak v VREDNOSTI povzroči, da naslednjo\n" +" besedo preveri za zamenjavo vzdevka, ko je ta razširjen.\n" +" \n" +" Možnosti:\n" +" -p\tIzpiši vse določene vzdevke v obliki za večkratno uporabo\n" +" \n" +" Status končanja:\n" +" vzdevek vrne pravilno, razen če je predloženo IME, za katero ni\n" +" bil določen noben vzdevek." + +#: builtins.c:278 +#, 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 "" +"Odstrani vsako IME s seznama določenih vzdevkov.\n" +" \n" +" Možnosti:\n" +" -a\todstrani vsa določila vzdevkov.\n" +" \n" +" Vrne pravilno, razen če IME ni obstoječ vzdevek." + +#: builtins.c:291 +#, 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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Nastavi tipkovne bližnjice in spremenljivke funkcije Readline.\n" +" \n" +" Veže zaporedje tipk na funkcijo Readline ali makro ali nastavi\n" +" spremenljivko Readline. Skladnja argumenta brez možnosti\n" +" je enakovredna najdbi v ~/.inputrc, vendar mora biti podana\n" +" kot en argument:\n" +" na primer, bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Možnosti:\n" +" -m tipk_razvr Uporabi TIPK_RAZVR kot tipkovno razvrstitev za čas " +"trajanja\n" +" tega ukaza. Sprejemljiva imena tipkovnih " +"razvrstitev so emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-" +"move,\n" +" vi-command in vi-insert.\n" +" -l Prikaži imena funkcij.\n" +" -P Prikaži imena funkcij in tipkovne bližnjice.\n" +" -p Prikaži imena funkcij in tipkovne bližnjice v obliki, ki se lahko\n" +" ponovno uporabi kot vnos.\n" +" -S Prikaži tipkovna zaporedja, ki se sklicujejo na makre in njihove " +"vrednosti.\n" +" -s Prikaži tipkovna zaporedja, ki se sklicujejo na makre in njihove " +"vrednosti\n" +" v obliki, ki se lahko ponovno uporabi kot vnos.\n" +" -V Prikaži imena spremenljivk in vrednosti\n" +" -v Prikaži imena spremenljivk in vrednosti v obliki, ki se lahko\n" +" ponovno uporabi kot vnos.\n" +" -q ime_funkcije Poizvedi, katere tipke se sklicujejo na imenovano " +"funkcijo.\n" +" -u ime_funkcije Odveži vse tipke, ki se vežejo na imenovano funkcijo.\n" +" -r zaporedje_tipk Odstrani vez za ZAPOREDJE_TIPK.\n" +" -f ime_datoteke Beri tipkovne bližnjice iz IME_DATOTEKE.\n" +" -x zaporedje_tipk:ukaz_lupine\tPovzroči, da se UKAZ_LUPINE izvrši,\n" +" \t\t\t\tko je vnešeno ZAPOREDJE_TIPK.\n" +" \n" +" Status končanja:\n" +" bind vrne 0, razen, če je dana neprepoznana možnost ali se pojavi napaka." + +#: builtins.c:330 +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 "" +"Konča zanko for, while ali until.\n" +" \n" +" Končaj zanko FOR, WHILE ali UNTIL. Če je N podan, prekini N obdanih\n" +" zank.\n" +" \n" +" Stanje končanja:\n" +" Stanje končanja je 0, razen če N ni večji kot ali enak 1." + +#: builtins.c:342 +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 "" +"Nadaljuje zanko for, while ali until.\n" +" \n" +" Nadaljuje naslednjo ponovitev obdane zanke FOR, WHILE ali UNTIL.\n" +" Če je N podan, nadaljuje N-to obdano zanko.\n" +" \n" +" Stanje končanja:\n" +" Stanje končanja je 0, razen če N ni večji kot ali enak 1." + +#: builtins.c:354 +#, fuzzy +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 "" +"Izvede vgrajeno lupino.\n" +" \n" +" Izvede VGRAJENO_LUPINO z argumenti ARG brez opravljanja iskanja\n" +" ukaza. To je uporabno, ko želite ponovno izvesti vgrajeno lupino\n" +" kot funkcijo lupine, vendar bi radi izvedli vgrajeno lupino znotraj " +"funkcije.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja VGRAJENE_LUPINE ali napak, če VGRAJENA_LUPINA\n" +" ni vgrajena lupina .." + +#: builtins.c:369 +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 "" +"Vrne vsebino trenutnega klica podprograma.\n" +" \n" +" Brez IZRAZA vrne \"$line $filename\". Z IZRAZOM vrne\n" +" \"$line $subroutine $filename\"; ta dodaten podatek se lahko uporabi\n" +" za zagotovitev sledenja sklada.\n" +" \n" +" Vrednost IZRAZA nakazuje, koliko okvirjev klicev mora nazaj\n" +" pred trenutnega; zgornji okvir je okvir 0.\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, razen če lupina ne izvršuje funkcije lupine ali pa IZRAZ\n" +" ni veljaven." + +#: builtins.c:387 +#, 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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Spremeni delovno mapo lupine.\n" +" \n" +" Spremeni trenutno mapo v DIR. Privzet DIR je vrednost spremenljivke\n" +" lupine HOME.\n" +" \n" +" Spremenljivka CDPATH določa iskalno pot za mapo, ki vsebuje DIR.\n" +" Nadomestna imena map v CDPATH so ločena z dvopičjem (:).\n" +" Prazno ime mape se enači s trenutno mapo. Če se DIR začne\n" +" s poševnico (/), potem se CDPATH ne uporabi.\n" +" \n" +" Če mapa ni najdena in je možnost lupine `cdable_vars' določena,\n" +" se predvideva, da je beseda ime spremenljivke. Če spremenljivka\n" +" ima vrednost, se le-ta uporabi za DIR.\n" +" \n" +" Možnosti:\n" +" -L\tprisili sledenje simbolnim povezavam\n" +" -P\tuporabi fizično strukturo map brez sledenja simbolnim\n" +" \tpovezavam\n" +" -e\tče je možnost -P predložena in trenutne delovne mape\n" +" \tni mogoče uspešno določiti, končaj z ne-ničelnim stanjem\n" +" \n" +" Sledenje simbolnim povezavam je privzeto, kot če bi možnost `-L'\n" +" bila predložena\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, če je mapa spremenjena in če je $PWD uspešno nastavljen, kadar\n" +" je uporabljena možnost -P; drugače je ne-ničelna vrednost" + +#: builtins.c:425 +#, fuzzy +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" +" \t\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 "" +"Izpiše ime trenutne delovne mape.\n" +" \n" +" Možnosti:\n" +" -L\tprikaže vrednost $PWD, če imenuje trenutno delovno\n" +" \tmapo\n" +" -P\tprikaže fizično mapo brez vsakršnih simbolnih povezav\n" +" \n" +" Privzeto se `pwd\" obnaša, kot če bi možnost `-L ' bila določena.\n" +" \n" +" Stanje končanja:\n" +" Vrne 0, razen če je dana neveljavna možnost ali pa trenutne mape\n" +" ni mogoče prebrati." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Prazen ukaz.\n" +" \n" +" Brez učinka; ukaz ne naredi ničesar.\n" +" \n" +" Stanje končanja:\n" +" Vedno uspešno." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Vrne uspešen rezultat.\n" +" \n" +" Stanje končanja:\n" +" Vedno uspešno." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Vrne neuspešen rezultat.\n" +" \n" +" Stanje končanja:\n" +" Vedno neuspešno." + +#: builtins.c:471 +#, fuzzy +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Izvede preprost ukaz ali prikaže podrobnosti o ukazih.\n" +" \n" +" Zažene UKAZ z ARGUMENTI in zavira iskanje funkcije lupine ali prikaže\n" +" podrobnosti o določenih UKAZIH. Lahko se uporabi za klic ukazov\n" +" na disku, kadar obstaja funkcija z enakim imenom.\n" +" \n" +" Možnosti:\n" +" -p\tuporabi privzeto vrednost za POT, ki bo zagotovo našla vse\n" +" \tstandardne pripomočke\n" +" -v\tprikaži opis UKAZA, podobno kot vgrajena lupina `type'\n" +" -V\tprikaži bolj podrobni izpis vsakega UKAZA\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja UKAZA ali neuspešno, če UKAZA ni mogoče najti." + +#: builtins.c:490 +#, 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Nastavi vrednosti spremenljivk in atributov.\n" +" \n" +" Deklarira spremenljivke in jim da atribute. Če ni podanih IMEN,\n" +" prikaže atribute in vrednosti vseh spremenljivk.\n" +" \n" +" Možnosti:\n" +" -f\tomeji ukrep ali prikaži imena funkcij in določilom\n" +" -F\tomeji prikaz samo imen funkcij (ter število vrstice in\n" +" \tizvorno datoteko, kadar je dejavno razhroščevanje)\n" +" -g\tustvari splošne spremenljivke, kadar so uporabljene v funkciji\n" +" \tlupine; v nasprotnem primeru je prezrto\n" +" -p\tprikaži atribute in vrednost vsakega IMENA\n" +" \n" +" Možnosti, ki določajo atribute\n" +" -a\tda so IMENA zabeležena polja (če je podprto)\n" +" -A\tda so IMENA povezana polja (če je podprto)\n" +" -i\tda imajo IMENA atribute celih števil `integer'\n" +" -l\tda se IMENA pretvorijo v male črke pri dodelitvi\n" +" -r\tda so IMENA samo za branje\n" +" -t\tda imajo IMENA atribut sledenja `trace'\n" +" -u\tda se IMENA pretvorijo v velike črke pri dodelitvi\n" +" -x\tda se IMENA izvozijo\n" +" \n" +" Uporaba `+' namesto `-' izklopi dan atribut.\n" +" \n" +" Spremenljivkam z atributom celega števila se izvede aritmetično\n" +" vrednotenje (poglejte ukaz `let'), kadar je spremenljivki\n" +" dodeljena vrednost.\n" +" \n" +" Ko se uporabi v funkciji, `declare' naredi IMENA krajevna kot\n" +" pri ukazu `local'. Možnost `-g' zavira to obnašanje.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali pride\n" +" do napake." + +#: builtins.c:532 +#, fuzzy +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Nastavi vrednosti spremenljivk in atributov.\n" +" \n" +" Zastarelo. Oglejte si `help declare'." + +#: builtins.c:540 +#, fuzzy +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Določi krajevne spremenljivke.\n" +" \n" +" Ustvari krajevno spremenljivko z imenom IME in ji dodeli VREDNOST.\n" +" MOŽNOST je lahko katera koli, sprejeta z `declare'.\n" +" \n" +" Krajevne spremenljivke se lahko uporabijo samo znotraj funkcije;\n" +" vidne so samo funkciji, kjer so določene in njenim podprogramom.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost, pride\n" +" do napake ali pa lupina ne izvaja funkcije." + +#: builtins.c:557 +#, fuzzy +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Piše argumente na standardni izhod.\n" +" \n" +" Prikaže ARGUMENTE na standardnem izhodu, ki mu sledi nova vrstica.\n" +" \n" +" Možnosti:\n" +" -n\tne pripni nove vrstice\n" +" -e\tomogoči tolmačenje naslednjih ubežnih levih poševnic\n" +" -E\tizrecno zatri tolmačenje ubežnih levih poševnic\n" +" \n" +" `echo' tolmači naslednje znake ubežnih levih poševnic:\n" +" \\a\talarm (zvonec)\n" +" \\b\tvračalka\n" +" \\c\tzatre nadaljni izpis\n" +" \\e\tubežni znak\n" +" \\f\tnova stran\n" +" \\n\tnova vrstica\n" +" \\r\tpomik na začetek vrstice\n" +" \\t\tvodoravni tabulator\n" +" \\v\tnavpični tabulator\n" +" \\[tab]leva poševnica\n" +" \\0nnn\tznak, katerega vrednost ASCII je NNN (osmiška). NNN je lahko\n" +" \tod 0 do 3 osmiška števila\n" +" \\xHH\t8-bitni znak, katerega vrednost je HH (šestnajstiška). HH\n" +" \tje lahko ena ali dve šestnajstiški števili\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če pride do napake pri pisanju." + +#: builtins.c:597 +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 "" +"Piše argumente na standardni izhod.\n" +" \n" +" Prikaže ARGUMENTE na standardni izhod, temu sledi nova vrstica.\n" +" \n" +" Možnosti:\n" +" -n\tne pripni nove vrstice\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če pride do napake pri pisanju." + +#: builtins.c:612 +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 "" +"Omogoči in onemogoči vgrajene lupine.\n" +" \n" +" Omogoči in onemogoči ukaze vgrajene lupine. Onemogočenje dovoli\n" +" izvedbo ukaza diska, ki ima enako ime kot vgrajena lupina, brez\n" +" uporabe polnega imena poti.\n" +" \n" +" Možnosti:\n" +" -a\tprikaži seznam vgrajenih lupin, ki kaže, katera je omogočena\n" +" -n\tonemogoči vsako IME ali pa prikaži seznam onemogočenih\n" +" \tvgrajenih lupin\n" +" -p\tprikaži seznam vgrajenih lupin v obliki za večkratno uporabo\n" +" -s\tprikaži samo imena posebnih vgrajenih lupin `special'\n" +" \tpo POSIX standardu\n" +" \n" +" Možnosti, ki nadzorujejo dinamično nalaganje:\n" +" -f\tnaloži IME iz predmeta IME_DATOTEKE v souporabi\n" +" -d\todstrani vgrajeno lupino, naloženo z -f\n" +" \n" +" Brez podanih možnosti je vsako IME omogočeno.\n" +" \n" +" Za uporabo preizkusa 'test', najdenega v $PATH, in ne različice\n" +" vgrajene lupine, vpišite `enable -n test'.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če IME ni vgrajena lupina ali če pride do napake." + +#: builtins.c:640 +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 "" +"Zažene argumente kot ukaze lupine.\n" +" \n" +" Združi ARGUMENTA v en niz, uporabi rezultat kot vnos v lupino\n" +" in zaženi končne ukaze.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja ali uspešno, če je ukaz prazen." + +#: builtins.c:652 +#, 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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Razčleni argumente možnosti.\n" +" \n" +" Getopts je uporabljen s strani postopkov lupine za razčlenitev\n" +" položajnih parametrov kot možnosti.\n" +" \n" +" NIZ_MOŽNOSTI vsebuje črke možnosti za prepoznavo; če dvopičju\n" +" sledi črka, se za možnost pričakuje dodeljen argument, ki mora\n" +" biti ločen s preslednim znakom.\n" +" \n" +" Vsakič, ko je klican, bo getopts postavil naslednjo možnost v\n" +" spremenljivko lupine $name, nastavil ime, če še ne obstaja, in\n" +" kazalo naslednjega argumenta bo obdelano v spremenljivko\n" +" lupine OPTIND. OPTIND je nastavljen na 1 vsakič, ko je lupina ali\n" +" skripta lupine poklicana. Ko možnost zahteva argument, ga\n" +" getopts premakne v spremenljivko lupine OPTARG. \n" +" \n" +" getopts poroča napake na eden izmed dveh načinov. Če je prvi\n" +" znak OPTSTRING dvopičje, getopts uporabi tiho poročanje napak.\n" +" V tem načinu ni izpisanih sporočil o napakah. Če je videna neveljavna\n" +" možnost, getopts postavi najden znak možnosti v OPTARG. Če\n" +" zahtevan argument ni najden, getopts postavi ':' v IME in dodeli\n" +" OPTARG nadenemu znaku možnosti. Če getopts ni v tihem načinu\n" +" in je videnaneveljavna možnost, getopts postavi '?' v IME in\n" +" ponastavi OPTARG. Če zahtevan argument ni najden, je '?'\n" +" postavljen v IME, OPTARG je ponastavljen in prikazano je\n" +" diagnostično sporočilo.\n" +" \n" +" Če ima spremenljivka lupine OPTERR vrednost 0, getopts\n" +" onemogoči prikaz sporočil o napakah, tudi če prvi znak OPTSTRING\n" +" ni dvopičje. OPTERR ima privzeto vrednost 1.\n" +" \n" +" Getopts običajno razčleni položajne parametre ($0 - $9), toda če je\n" +" danih več argumentov, se jih razčleni.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če je možnost najdena; neuspešno, če pride\n" +" do konca možnosti ali do napake." + +#: builtins.c:694 +#, fuzzy +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Zamenja lupino z danim ukazom.\n" +" \n" +" Izvede UKAZ, ki zamenja to lupino z določenim programom.\n" +" ARGUMENTI postanejo argumenti UKAZU. Če UKAZ ni določen,\n" +" se vsaka preusmeritev uveljavi v trenutni lupini.\n" +" \n" +" Možnosti:\n" +" -a ime\tposreduj IME kot nični argument UKAZU\n" +" -c\t\tizvedi UKAZ s praznim okoljem\n" +" -l\t\tpostavi pomišljaj v nični argument UKAZU\n" +" \n" +" Če ukaza ni bilo mogoče izvesti, se ne-vzajemna lupina konča, razen\n" +" če je nastavljena možnost lupine `execfail' .\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če UKAZ ni najden ali pride do napake preusmeritve." + +#: builtins.c:715 +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 "" +"Konča lupino.\n" +" \n" +" Konča lupino s stanjem N. Če je N izpuščen, se uporabi stanje\n" +" končanja zadnjega izvršenega ukaza." + +#: builtins.c:724 +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 "" +"Konča prijavno lupino.\n" +" \n" +" Konča prijavno lupino s stanjem končanja N. Vrne napako, če se\n" +" ne izvede v prijavni lupini." + +#: builtins.c:734 +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 "" +"Prikaže ali izvede ukaze s seznama zgodovine.\n" +" \n" +" fc se uporablja za seznam ali urejanje in ponovno izvajanje ukazov\n" +" s seznama zgodovine. PRVI in ZADNJI sta lahko števili, ki določata " +"obseg\n" +" oz. PRVI je lahko niz, kar pomeni, da se nedavni ukaz začne s tem " +"nizom.\n" +" \n" +" Možnosti:\n" +" -e IME_UREJEVALNIKA\tizbere urejevalnik za uporabo. Privzet je\n" +" \t\tFCEDIT, nato EDITOR, nato vi\n" +" -l \tprikaže vrstice namesto urejanja\n" +" -n\tzanemari številke vrstic med navedbo\n" +" -r\tobrni vrstni red vrstic (najnovejše so navedene prve)\n" +" \n" +" Z obliko `fc -s [vzorec=zamenjava] [ukaz]' se UKAZ ponovno izvede \n" +" po tem, ko se opravi nadomeščanje OLD=NEW.\n" +" \n" +" Lahko se uporabi uporaben vzdevek r='fc -s' tako, da se z vnosom \n" +" `r cc' zažene zadnji ukaz, ki se začne z `cc' in vnosom `r' se ponovno \n" +" izvede zadnji ukaz.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno ali stanje izvedenega ukaza; ne-ničelno, če pride do napake." + +#: builtins.c:764 +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 "" +"Premakne posel v ospredje.\n" +" \n" +" Premakne posel, določen s strani DOLOČILA_POSLA, v ospredje,\n" +" kar ga spremeni v trenutni posel. Če DOLOČILO_POSLA ni prisotno,\n" +" se uporabi označba lupine trenutnega posla.\n" +" \n" +" Stanje končanja:\n" +" Stanje ukaza, postavljenega v ospredje, ali neuspešno, če se\n" +" pojavi napaka." + +#: builtins.c:779 +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 "" +"Premakne posle v ozadje.\n" +" \n" +" Postavi posle, določene s strani JOB_SPEC, v ozadje, kot če bi se\n" +" začeli z `&'. Če JOB_SPEC ni prisoten, se uporabi označba lupine\n" +" trenutnega posla.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če nadzor posla ni omogočen ali če pride\n" +" do napake." + +#: builtins.c:793 +#, fuzzy +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Shrani ali prikaži mesta programov.\n" +" \n" +" Določi in shrani polno ime poti vsakega IMENA ukaza. Če\n" +" ni danih argumentov, se prikažejo podrobnosti o shranjenih ukazih.\n" +" \n" +" Možnosti:\n" +" -d\t\tpozabi shranjeno mesto vsakega IMENA\n" +" -l\t\tprikaži v obliki, ki se lahko ponovno uporabi kot vnos\n" +" -p ime_poti\tuporabi IME_POTI kot polno ime poti IMENA\n" +" -r\t\tpozabi vsa shranjena mesta\n" +" -t\t\tprikaži shranjena mesta vsakega IMENA, temu sledi\n" +" \t\tvsako mesto z ustreznim IMENOM, če je danih več IMEN\n" +" ArgumentI:\n" +" IME\t\tVsako IME je iskano v $PATH in dodano na seznam\n" +" \t\tshranjenih ukazov.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če IME ni najdeno ali če je dana neveljavna možnost." + +#: builtins.c:818 +#, fuzzy +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is " +"given." +msgstr "" +"Prikaže podrobnosti o ukazih vgrajene lupine.\n" +" \n" +" Prikaže kratke povzetke ukazov vgrajene lupine. Če je VZOREC\n" +" določen, da podrobno pomoč za vse ukaze, ki se ujemajo z VZORCEM,\n" +" v nasprotnem primeru prikaže seznam tem pomoči.\n" +" \n" +" Možnosti:\n" +" -d\tizpiši kratek opis za vsako temo\n" +" -m\tprikaži uporabo v obliki psevdo-priročniške strani\n" +" -s\tprikaži samo kratek povzetek uporabe za vsako temo, ki se\n" +" \tujema z VZORCEM\n" +" \n" +" ArgumentI:\n" +" VZOREC\tVzorec, ki navaja temo pomoči\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če VZOREC ni najden ali pa je dana neveljavna\n" +" možnost." + +#: builtins.c:842 +#, 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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 "" +"Prikaže ali obdela seznam zgodovine.\n" +" \n" +" Prikaže seznam zgodovine s številkami vrstic, vsak spremenjen vnos\n" +" označi s predpono `*'. Argument N navede samo N zadnjih vnosov.\n" +" \n" +" Možnosti:\n" +" -c\tpobriši seznam zgodovine z brisanjem vseh vnosov\n" +" -d odmik\tpobriši vnos zgodovine pri odmiku ODMIK.\n" +" \n" +" -a\tpripni vrstice zgodovine iz te seje v datoteko zgodovine\n" +" -n\tpreberi vse vrstice zgodovine, ki še niso prebrane iz datoteke\n" +" \tzgodovine\n" +" -r\tpreberi datoteko zgodovine in pripni vsebino seznama\n" +" \tzgodovine\n" +" -w\tpiši trenutno zgodovino v datoteko zgodovine\n" +" \tin jo pripni na seznam zgodovine\n" +" \n" +" -p\topravi razširitev zgodovine na vsak ARG in prikaži rezultat\n" +" \tbrez shranitve na seznam zgodovine\n" +" -s\tpripni ARGUMENTE na seznam zgodovine kot edini vnos\n" +" \n" +" Če je IME_DATOTEKE podan, se uporabi kot datoteka zgodovine.\n" +" V nasprotnem primeru, če $HISTFILE ima vrednost, ki se uporabi,\n" +" pa ~/.bash_history.\n" +" \n" +" Če je spremenljivka $HISTTIMEFORMAT določena in ni prazna, se\n" +" njena vrednost uporabi kot niz oblike za strftime(3) za prikaz časovnih\n" +" žigov, ki so povezani z vsakim vnosom prikazane zgodovine.\n" +" V nasprotnem primeru časovni žigi niso prikazani.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je podana neveljavna možnost ali če pride\n" +" do napake." + +#: builtins.c:879 +#, 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\tlists only processes that have changed status since the last\n" +" \t\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 "" +"Prikaže stanje poslov.\n" +" \n" +" Navede dejavne posle. DOLOČILO_POSLA omejuje izpis v ta posel.\n" +" Brez podanih možnosti se prikaže stanje vseh dejavnih poslov.\n" +" \n" +" Možnosti:\n" +" -l\tnavedi ID-je opravil zraven običajnih podatkov\n" +" -n\tnavedi samo opravila, ki imajo od zadnjega obvestila\n" +" \tspremenjena stanja\n" +" -p\tnavedi samo ID-je opravil\n" +" -r\tomeji izhod na posle, ki se izvajajo\n" +" -s\tomeji izhod na ustavljene posle\n" +" \n" +" Če je -x naveden, se zažene UKAZ, ko se določila poslov, ki se\n" +" pojavijo v ARGUMENTIH, zamenjajo z ID-jem opravila vodje skupine\n" +" opravil tega posla.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do\n" +" napake. Če se uporabi -x, vrne stanje končanja UKAZA." + +#: builtins.c:906 +#, fuzzy +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" +" \t\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 "" +"Odstrani posle iz trenutne lupine.\n" +" \n" +" Odstrani vsak argument DOLOČILA_POSLA s seznama dejavnih poslov.\n" +" Brez danih DOLOČIL_POSLA lupina uporabi svojo označbo trenutnega\n" +" posla.\n" +" \n" +" Možnosti:\n" +" -a\todstrani vse posle, če DOLOČILO_POSLA ni navedeno\n" +" -h\toznači vsako DOLOČILO_POSLA, tako da se SIGHUP ne pošlje\n" +" \tposlu, če lupina prejme SIGHUP \n" +" -r\todstrani samo posle, ki se izvajajo\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je dano\n" +" DOLOČILO_POSLA." + +#: builtins.c:925 +#, 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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"Pošlje signal poslu.\n" +" \n" +" Pošlje opravila, določena s strani ID-ja opravila ali uporabi\n" +" DOLOČILO_POSLA za signal, ki je imenovan s strani SIGSPEC ali SIGNUM.\n" +" Če SIGSPEC in SIGNUM nista prisotna, se predvideva SIGTERM.\n" +" \n" +" Možnosti:\n" +" -s sig\tSIG je ime signala\n" +" -n sig\tSIG je številka signala\n" +" -l\tnavedi imena signalov; če `-l' sledijo argumenti, se predvideva,\n" +" \tda so številke signalov, za katere bi morala biti navedena imena\n" +" \n" +" Kill je vgrajena lupina zaradi dveh razlogov: omogoča ID-jem poslov,\n" +" da se jih uporabi namesto ID-jev opravil in omogoča uničenje opravil,\n" +" če se prekorači meja ustvarjenih opravil.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do\n" +" napake." + +#: builtins.c:949 +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 "" +"Ovrednoti aritmetične izraze.\n" +" \n" +" Ovrednoti vsak ARG kot aritmetični izraz. Vrednotenje se opravi\n" +" v celih številih z nespremenjeno širino brez preverjanja za " +"prekoračitev,\n" +" čeprav je deljenje z 0 ujeto in označeno kot napaka. Seznam " +"operatorjev,\n" +" ki sledi, je združen v stopnje operatorjev enakih prednosti. Stopnje so\n" +" razvrščene po padajoči prednosti.\n" +" \n" +" \tid++, id--\tnaknadno večanje spremenljivke, naknadno manjšanje\n" +" \t++id, --id\tpredhodno večanje spremenljivke, predhodno manjšanje\n" +" \t-, +\t\tenosloven minus, plus\n" +" \t!, ~\t\tlogična in bitna negacija\n" +" \t**\t\tpotenciranje\n" +" \t*, /, %\t\tmnoženje, deljenje, ostanek\n" +" \t+, -\t\tseštevanje, odštevanje\n" +" \t<<, >>\t\tlevi in desni bitni premiki\n" +" \t<=, >=, <, >\tprimerjava\n" +" \t==, !=\t\tenakost, neenakost\n" +" \t&\t\tbitni AND\n" +" \t^\t\tbitni XOR\n" +" \t|\t\tbitni OR\n" +" \t&&\t\tlogični AND\n" +" \t||\t\tlogični OR\n" +" \tizraz ? izraz : izraz\n" +" \t\t\tpogojni operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tdodeljevanje \n" +" \n" +" Spremenljivke lupine so dovoljene kot operandi. Ime spremenljivke\n" +" se zamenja z njeno vrednostjo (prisiljena na celo število z\n" +" nespremenljivo širino) znotraj izraza. Za uporabo spremenljivke v ni\n" +" treba vklopliti atributa celega števila.\n" +" \n" +" Operatorji so ovrednoteni v prednostnem vrstnem redu. Podizrazi\n" +" v oklepajih so ovrednoteni prvi in lahko prepišejo prednostna \n" +" pravila, omenjena zgoraj.\n" +" \n" +" Stanje končanja\n" +" Če zadnji ARG ovrednoti na 0, let vrne 1; sicer let vrne 0." + +#: builtins.c:994 +#, 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. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Prebere vrstico iz standardnega vhoda in jo razdeli v polja.\n" +" \n" +" Prebere eno vrstico iz standardnega vhoda ali iz opisnika FD, če je\n" +" navedena možnost -u. Vrstica je razdeljena na polja, kot je delitev\n" +" besed in prva beseda je dodeljena prvemu IMENU, druga beseda drugemu\n" +" IMENU itd., ostanek zadnje besede pa se dodeli zadnjemu IMENU.\n" +" Samo znaki, najdeni v $IFS, so prepoznani kot razmejilniki besed.\n" +" \n" +" Če ni navedenih IMEN, se prebrana vrstica shrani v spremenljivko REPLY.\n" +" \n" +" Možnosti:\n" +" -a polje\tdodeli prebrane besede zaporednim kazalom spremenljivke \n" +" \t\tpolja POLJE, začenši z 0\n" +" -d razmejilnik\tnadaljuj, dokler ni prvi znak RAZMEJILNIKA prebran,\n" +" \t\tnamesto v novo vrstico\n" +" -e\t\tuporabi Readline za pridobitev vrstice v vzajemni lupini\n" +" -i besedilo\tuporabi BESEDILO kot prvotno besedilo za Readline\n" +" -n n-znakov\tvrni po branju znakov N-ZNAKOV, namesto čakanja na\n" +" \t\tnovo vrstico, toda spoštuj razmejilnik, če je prebranih znakov\n" +" \t\tmanj kot N-ZNAKOV pred razmejilnikom\n" +" -N n-znakov\tvrni samo po branju N-ZNAKOV znakov, razen če naleti\n" +" \t\tna konec datoteke ali če branju poteče časovna omejitev, brez\n" +" \t\tupoštevanja katerega koli razmejilnika\n" +" -p poziv\tizpiši niz POZIV brez vmesne nove vrstice, preden se\n" +" \t\tposkuša prebrati\n" +" -r\t\tne dovoli levih poševnic za izognitev vsem znakom\n" +" -s\t\tne izpiši vnosa, ki prihaja s terminala\n" +" -t časovna_omejitev\tpreseži časovno omejitev in vrni neuspešno, če\n" +" \t\tznotraj ČASOVNE_OMEJITVE sekund ni prebrana celotna vrstica\n" +" \t\tvnosa. Vrednost spremenljivke TMOUT je privzeta časovna\n" +" \t\tomejitev. ČASOVNA_OMEJITEV je lahko decimalno število.\n" +" \t\tČe je ČASOVNA_OMEJITEV 0, branje vrne uspešno samo, če je na\n" +" \t\tdoločenem opisniku datoteke na voljo vnos. Stanje končanja je\n" +" \t\tvečje kot 128, če je časovna omejitev prekoračena\n" +" -u fd\t\tberi iz opisnika datotek FD, namesto standardnega vhoda\n" +" \n" +" Stanje končanja\n" +" Koda vrnitve je nič, razen če pride do konca datoteke, če je časovna \n" +" omejitev prekoračena ali če je dan neveljaven opisnik datotek kot\n" +" argument v -u." + +#: builtins.c:1042 +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 "" +"Vrne iz funkcije lupine.\n" +" \n" +" Povzroči, da funkcija ali skripta izvorne kode konča z vrednostjo\n" +" vrnitve, določene z N. Če je N izpuščen, se uporabi stanje vrnitve\n" +" zadnjega izvršenega ukaza znotraj funkcije ali skripta.\n" +" \n" +" Stanje končanja\n" +" Vrne N ali neuspešno, če lupina ne izvede funkcije ali skripta." + +#: builtins.c:1055 +#, 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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 ali ponastavi vrednosti možnosti lupine in položajne parametre.\n" +" \n" +" Spremeni vrednost atributov lupine in položajnih parametrov ali\n" +" prikaže imena in vrednosti spremenljivk lupine.\n" +" \n" +" Možnosti:\n" +" -a Označi vrednosti, ki so spremenjene ali ustvarjene za izvoz.\n" +" -b Takoj obvesti o uničenju posla.\n" +" -e Takoj končaj, če ukaz obstaja z ne-ničelnim stanjem.\n" +" -f Onemogoči ustvarjanje imen datotek (globbing).\n" +" -h Zapomni si mesto ukazov, ko se jih išče.\n" +" -k Vsi argumenti dodeljevanja so postavljeni v okolje za ukaz, ne\n" +" samo tisti, ki imajo predhodna imena ukazov.\n" +" -m Nadzor poslov je omogočen.\n" +" -n Preberi ukaze, toda ne izvedi jih.\n" +" -o ime_možnosti\n" +" Nastavi spremenljivke, ki ustrezajo ime_možnosti:\n" +" allexport enako kot -a\n" +" braceexpand enako kot -B\n" +" emacs uporabi vmesnik urejanja vrstic s slogom emacs\n" +" errexit enako kot -e\n" +" errtrace enako kot -E\n" +" functrace enako kot -T\n" +" hashall enako kot -h\n" +" histexpand enako kot -H\n" +" history omogoči zgodovino ukazov\n" +" ignoreeof lupina se ne bo končala po koncu branja datoteke\n" +" interactive-comments\n" +" omogoči, da se ukazi pojavijo v vzajemnih ukazih\n" +" keyword enako kot -k\n" +" monitor enako kot -m\n" +" noclobber enako kot -C\n" +" noexec enako kot -n\n" +" noglob enako kot -f\n" +" nolog trenutno sprejeto, toda neupoštevano\n" +" notify enako kot -b\n" +" nounset enako kot -u\n" +" onecmd enako kot -t\n" +" physical enako kot -P\n" +" pipefail vrnjena vrednost cevovoda je stanje zadnjega\n" +" ukaza, ki je končal z ne-ničelnim stanjem ali " +"nič,\n" +" če noben ukaz ni končal ne-ničelnim stanjem\n" +" posix spremeni obnašanje bash-a, kjer se privzeto\n" +" opravilo razlikuje od standarda POSIX pri\n" +" ujemanju standarda\n" +" privileged enako kot -p\n" +" verbose enako kot -v\n" +" vi uporabi vmesnik urejanja vrstic s slogom vi\n" +" xtrace enako kot -x\n" +" -p Vklopljeno, kadar se pravi in učinkoviti uporabniški ID-ji ne\n" +" ujamajo. Onemogoči obdelavo datoteke $ENV in uvoz funkcij\n" +" lupine. Onemogočenje te možnosti povzroči, da sta učinkovit\n" +" uporabniški id in id skupine nastavljena na resničen\n" +" uporabniški id in id skupine.\n" +" -t Končaj po branju in izvedbi enega ukaza.\n" +" -u Obravnavaj ponastavljene spremenljivke kot napako pri\n" +" zamenjavi.\n" +" -v Prikaži vrstice vnosa lupine kot so prebrane.\n" +" -x Prikaži ukaze in njihove argumente kot so izvedeni.\n" +" -B lupina bo izvedla širitev oklepaja\n" +" -C če je nastavljen, ne dovoli običajnim datotekam,\n" +" da bi bile prepisane s preusmeritvijo izhoda.\n" +" -E Če je nastavljeno, je past ERR dedovana s strani\n" +" funkcij lupine.\n" +" -H Omogoči zamenjavo zgodovine s slogom! . Ta zastavica\n" +" je privzeto omogočena, kadar je lupina vzajemna.\n" +" -P Če je nastavljeno, ne sledi simbolnim povezavam, kadar se\n" +" izvajajo ukazi, kot je cd, ki spremeni trenutno mapo.\n" +" -T Če je nastavljeno, je past DEBUG dedovana s strani\n" +" funkcij lupine.\n" +" -- Dodeli vse preostale argumente v položajne parametre.\n" +" Če ni preostalih argumentov, so položajni parametri\n" +" ponastavljeni.\n" +" - Dodeli vse preostale argumente v položajne parametre.\n" +" Možnosti -x in -v sta izključeni.\n" +" \n" +" Uporaba + namesto - povzroči, da se te zastave izklopijo.\n" +" Zastave se lahko tudi uporabijo za po klicu lupine. Trenuten\n" +" niz zastavic je mogoče najti v $-. Preostali n ARGUMENTI so\n" +" položajni parametri in so dodeljeni vrstnem redu k $1, $2, .. $n.\n" +" Če ni danih ARGUMENTOV, se izpišejo vse spremenljivke\n" +" lupine.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost." + +#: builtins.c:1140 +#, fuzzy +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Ponastavi vrednosti in atribute spremenljivk in funkcij lupine.\n" +" \n" +" Za vsako IME odstrani ustrezno spremenljivko ali funkcijo.\n" +" \n" +" Možnosti:\n" +" -f\tobravnavaj vsako IME kot funkcijo lupine\n" +" -v\tobravnavaj vsako IME kot spremenljivko lupine\n" +" \n" +" Če ni danih možnosti, poskuša unset ponastaviti spremenljivko in če\n" +" to ne uspe, poskuša ponastaviti funkcijo.\n" +" \n" +" Nekaterih spremenljivk ni mogoče ponastaviti; glejte tudi `readonly'.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je IME samo\n" +" za branje." + +#: builtins.c:1162 +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 atribut izvoza za spremenljivke lupine.\n" +" \n" +" Označi vsako IME za samodejni izvoz v okolje naknadno izvedenih\n" +" ukazov. Če je VREDNOST vnesena, dodeli VREDNOST pred izvozom.\n" +" \n" +" Možnosti:\n" +" -f\tnanašaj se na funkcije lupine\n" +" -n\todstrani lastnost izvoza iz vsakega IMENA\n" +" -p\tprikaži seznam vseh izvoženih spremenljivk in funkcij\n" +" \n" +" Argument od `--' onemogoči nadaljnjo obdelavo možnosti.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je\n" +" neveljavno IME." + +#: builtins.c:1181 +#, fuzzy +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 spremenljivke lupine kot nespremenljive.\n" +" \n" +" Označi vsako IME kot samo za branje; vrednosti teh IMEN se morda\n" +" ne bodo spremenile s strani naknadne dodelitve. Če je VREDNOST\n" +" predložena, dodeli VREDNOST pred označitvijo samo za branje.\n" +" \n" +" Možnosti:\n" +" -a\tnanašaj se na spremenljivke zabeleženih polj\n" +" -A\tnanašaj se spremenljivke povezanih polj\n" +" -f\tnanašaj se na funkcije lupine\n" +" -p\tprikaži seznam vseh spremenljivk in funkcij, ki so samo\n" +" \tza branje\n" +" \n" +" Argument od `--' onemogoči nadaljnjo obdelavo možnosti.\n" +" \n" +" Stanje končanja\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če je\n" +" neveljavno IME." + +#: builtins.c:1203 +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 "" +"Premakne položajne parametre.\n" +" \n" +" Preimenuje položajne parametre $N+1, $N+2 ... v $1,$2 ...\n" +" Če N ni dan, se predvideva, da je 1.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je N negativen ali večji kot $#." + +#: builtins.c:1215 builtins.c:1230 +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 "" +"Izvede ukaze iz datoteke v trenutni lupini.\n" +" \n" +" Prebere in izvede ukaze iz DATOTEKE v trenutni lupini. Vnosi v $PATH\n" +" so uporabljeni za iskanje mape, ki vsebuje IME_DATOTEKE. \n" +" Če so kakšni ARGUMENTI predloženi, postanejo položajni parametri,\n" +" kadar se izvede IME_DATOTEKE.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza v IMENU_DATOTEKE; vrne\n" +" neuspešno, če IMENA_DATOTEKE ni mogoče brati." + +#: builtins.c:1246 +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 "" +"Da izvedbo lupine v pripravljenost.\n" +" \n" +" Da izvedbo te lupine v pripravljenost, dokler ne prejme signala\n" +" SIGCONT. Lupine prijave ni mogoče dati v pripravljenost, razen če se\n" +" jo prisili.\n" +" \n" +" Možnosti:\n" +" -f\tprisili stanje pripravljenosti, tudi če je lupina lupina prijave\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če nadzor posla ni omogočen ali če pride do\n" +" napake." + +#: builtins.c:1262 +#, 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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Ovrednoti pogojni izraz.\n" +" \n" +" Konča s stanjem 0 (prav) ali 1 (napak), odvisno od ovrednotenja IZRAZA.\n" +" Izrazi so lahko enoslovni ali binarni. Enoslovni izrazi so pogosto\n" +" uporabljeni za preverjanje stanja datoteke. Obstajajo tudi operatorji\n" +" nizov in operatorji številskih primerjav.\n" +" \n" +" Obnašanje preizkusa je odvisno od števila argumentov. Preberite \n" +" si stran priročnika bash za popolno razčlenitev.\n" +" \n" +" Operatorji datotek:\n" +" \n" +" -a DATOTEKA Prav, če datoteka obstaja.\n" +" -b DATOTEKA Prav, če je datoteka posebnost bloka.\n" +" -c DATOTEKA Prav, če je datoteka posebnost znaka.\n" +" -d DATOTEKA Prav, če je datoteka mapa.\n" +" -e DATOTEKA Prav, če datoteka obstaja.\n" +" -f DATOTEKA Prav, če datoteka obstaja in je običajna.\n" +" -g DATOTEKA Prav, če je datoteka set-group-id.\n" +" -h DATOTEKA Prav, če je datoteka simbolna povezava.\n" +" -L DATOTEKA Prav, če je datoteka simbolna povezava.\n" +" -k DATOTEKA Prav, če ima datoteka nastavljeno zastavo `sticky' bit\n" +" -p DATOTEKA Prav, če je datoteka imenovana cev.\n" +" -r DATOTEKA Prav, če je datoteka berljiva za Vas.\n" +" -s DATOTEKA Prav, če datoteka obstaja in ni prazna.\n" +" -S DATOTEKA Prav, če datoteka ni vstavek.\n" +" -t FD Prav, če je FD odprt v terminalu.\n" +" -u DATOTEKA Prav, če je datoteka set-user-id.\n" +" -w DATOTEKA Prav, če je datoteka zapisljiva za Vas.\n" +" -x DATOTEKA Prav, če je datoteka izvedljiva za Vas.\n" +" -O DATOTEKA Prav, če datoteka v vaši lasti.\n" +" -G DATOTEKA Prav, če je datoteka v lasti vaše skupine.\n" +" -N DATOTEKA Prav, če je datoteka bila spremenjena, odkar je bila\n" +" nazadnje prebrana.\n" +" \n" +" DATOTEKA1 -nt DATOTEKA Prav, če je datoteka1 novejša kot\n" +" datoteka2 (glede na datum spremembe).\n" +" \n" +" DATOTEKA1 -ot DATOTEKA2 Prav, če je datoteka1 starejša kot\n" +" datoteka2.\n" +" \n" +" DATOTEKA1 -ef DATOTEKA2 Prav, če je datoteka1 nespremenljivo\n" +" vezana na datoteko2.\n" +" \n" +" Operatorji nizov:\n" +" \n" +" -z NIZ Prav, če je niz prazen.\n" +" \n" +" -n NIZ\n" +" NIZ Prav, če niz ni prazen.\n" +" \n" +" NIZ1 = NIZ2\n" +" Prav, če sta niza enaka.\n" +" NIZ1 != NIZ2\n" +" Prav, če niza nista enaka.\n" +" NIZ1 < NIZ2\n" +" Prav, če NIZ1 razvrsti po abecedi prej kot NIZ2.\n" +" NIZ1 > NIZ2\n" +" Prav, če NIZ1 razvrsti po abecedi kasneje kot NIZ2.\n" +" \n" +" Drugi operatorji:\n" +" \n" +" -o MOŽNOST Prav, če je možnost lupine MOŽNOST omogočena.\n" +" -v SPR\t Prav, če je spremenljivka lupine SPR nastavljena\n" +" ! IZRAZ Prav, če je izraz napak.\n" +" IZRAZ1 -a IZRAZ2 Prav, če sta izraz1 IN izraz2 prav.\n" +" IZRAZ1 -o IZRAZ2 Prav, če je izraz1 ALI izraz2 prav.\n" +" \n" +" arg1 OP arg2 Aritmetični preizkusi. OP je eden od -eq, -ne,\n" +" -lt, -le, -gt, ali -ge.\n" +" \n" +" Aritmetična binarna operatorja vrneta prav, če je ARG1 enak, neenak,\n" +" manjši-kot, manjši-kot-ali-enak, večji-kot ali večji-kot-ali-enak\n" +" kot ARG2.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če IZRAZ ovrednoti prav, neuspešno vrne, če IZRAZ \n" +" ovrednoti napak ali če je dan neveljaven argument." + +#: builtins.c:1344 +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 "" +"Ovrednoti pogojni izraz.\n" +" \n" +" To je sopomenka za vgrajeno lupino \"test\", toda zadnji argument\n" +" mora biti dobesedni `]' za ujemanje z uklepajem `['." + +#: builtins.c:1353 +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 "" +"Prikaže čase opravila.\n" +" \n" +" Prikaže zbrane čase uporabnika in sistema za lupino in vsa njena\n" +" podrejena opravila.\n" +" \n" +" Stanje končanja:\n" +" Vedno uspešno." + +#: builtins.c:1365 +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. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\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 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 "" +"Signali trap in ostali dogodki.\n" +" \n" +" Določi in omogoči ročnik, da se jih zažene, kadar lupina sprejme " +"signale\n" +" ali ostale pogoje.\n" +" \n" +" ARG je ukaz, ki se ga prebere in izvrši, kadar lupina sprejme signal(e)\n" +" SIGNAL_SPEC. Če je ARG odsoten (in predložen en SIGNAL_SPEC)\n" +" ali `-', je vsak določen signal ponastavljen na svojo prvotno vrednost.\n" +" Če je ARG prazen niz, je vsak SIGNAL_SPEC prezrt s strani lupine\n" +" in ukazov, ki jih pokliče.\n" +" \n" +" Če je SIGNAL_SPEC EXIT (0), se ARG izvrši ob izhodu iz lupine. Če je\n" +" SIGNAL_SPEC DEBUG, je ARG izvršen pred vsakim ukazom. Če je\n" +" SIGNAL_SPEC RETURN, se ARG izvrši vsakič, ko funkcija lupine ali " +"skript,\n" +" zagnan s strani . ali vgrajenih virov, konča z izvajanjem. SIGNAL_SPEC\n" +" od ERR pomeni, da se ARG izvede vsakič, ko bi napaka ukaza povzročila, " +"da\n" +" bi se lupina končala, kadar je omogočena možnost -e.\n" +" \n" +" Če ni predloženih argumentov, trap prikaže seznam ukazov, povezanih z\n" +" vsakim signalom.\n" +" \n" +" Možnosti:\n" +" -l\tPrikaži seznam imen signalov in njihove ustrezne številke\n" +" -p\tprikaži ukaze trap, povezane z vsakim SIGNAL_SPEC\n" +" \n" +" Vsak SIGNAL_SPEC je bodisi ime signala v bodisi številka " +"signala.\n" +" Imena signalov ločujejo velikost črk in predpona SIG je izbirna.\n" +" Signal je lahko poslan v lupino s \"kill -signal $$\".\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je SIGSPEC neveljaven ali je dana neveljavna " +"možnost." + +#: builtins.c:1401 +#, fuzzy +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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 "" +"Prikaže podrobnosti o vrsti ukaza.\n" +" \n" +" Za vsako IME nakaže, kako bi bilo tolmačeno, če bi bilo uporabljeno\n" +" v imenu ukaza.\n" +" \n" +" Možnosti:\n" +" -a\tprikaži vsa mesta, ki vsebujejo izvedljivo datoteko z imenom\n" +" \tIME;\n" +" \tvključuje vzdevke, vgrajene lupine in funkcije, ampak samo,\n" +" \tče možnost `-p' NI uporabljena.\n" +" -f\tzatri iskanje funkcij lupine\n" +" -P\tprisili iskanje POTI za vsako IME, tudi če je vzdevek,\n" +" \tvgrajena lupina ali funkcija, in vrni ime datoteke diska, ki bi\n" +" \tbil izvršen.\n" +" -p\tvrne ime datoteke diska, ki bi bila izvršena ali nič,\n" +" \tče `type -t NAME' ne bi vrnil datoteke `file'.\n" +" -t\tizpiši eno besedo, katera je ena izmed `vzdevkov', \n" +" \t`ključnih_besed', `funkcij', `vgrajenih_lupin', `datotek' ali `', \n" +" \tče je IME vzdevek, rezervirana beseda, funkcija lupine, vgrajena \n" +" \tlupina, datoteka diska ali ni najdeno, v tem zaporedju\n" +" \n" +" Argumenti:\n" +" IME\tIme ukaza, ki bo tolmačeno.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če so vsa IMENA najdena; vrne neuspešno, če katero\n" +" ni najdeno." + +#: builtins.c:1432 +#, 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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"Spremeni omejitve virov lupine.\n" +" \n" +" Zagotavlja nadzor nad sredstvi, ki so na voljo lupini in ustvarjenim\n" +" opravilom, na sistemih, ki omogočajo tak nadzor.\n" +" \n" +" Možnosti:\n" +" -S\tuporabi blago omejitev virov `soft'\n" +" -H\tuporabi strogo omejitev virov `hard'\n" +" -a\tvse trenutne omejitve so poročane\n" +" -b\tvelikost medpomnilnika vtiča\n" +" -c\tnajvečja velikost ustvarjenih datotek jedra\n" +" -d\tnajvečja velikost odseka podatkov opravila\n" +" -e\tnajvečja prednost razporejanja (`nice')\n" +" -f\tnajvečja velikost datotek, ki so napisane s strani lupine in " +"njenih\n" +" \tpodrejenih opravil\n" +" -i\tnajvečje število signalov na čakanju\n" +" -l\tnajvečja velikost, ki jo opravilo lahko zaklene v pomnilnik\n" +" -m\tnajvečja velikost stalnih naborov\n" +" -n\tnajvečje število odprtih opisnikov datotek\n" +" -p\tvelikost medpomnilnika cevi\n" +" -q\tnajvečje število bajtov v čakalnih vrstah sporočil POSIX\n" +" -r\tnajvečja prednost razporejanja v realnem času\n" +" -s\tnajvečja velikost sklada\n" +" -t\tnajvečja količina časa cpe v sekundah\n" +" -u\tnajvečje število uporabniških opravil\n" +" -v\tvelikost navideznega pomnilnika\n" +" -x\tnajvečje število datotečnih ključavnic\n" +" \n" +" Če je MEJA dana, je le-ta nova vrednost navedenega vira; posebne \n" +" vrednosti MEJE `soft', `hard' in `unlimited' pomenijo trenutno blago \n" +" omejitev, trenutno strogo omejitev in brez omejitev, v tem vrstem redu.\n" +" V nasprotnem primeru se izpiše trenutna vrednost navedenega vira.\n" +" Če ni danih možnosti, se predpostavlja -f.\n" +" \n" +" Vrednosti so v 1024-bajtnem povečanju, razen za -t, ki je v sekundah,\n" +" -p, ki je v povečanju za 512 bajtov, in -u, ki je nespremenjeno število\n" +" opravil.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do\n" +" napake." + +#: builtins.c:1483 +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 "" +"Prikaži ali nastavi masko načina datoteke.\n" +" \n" +" Nastavi uporabniško masko ustvarjanja datoteke v NAČIN. Če je\n" +" NAČIN izpuščen, prikaže trenutno vrednost maske.\n" +" \n" +" Če se NAČIN začne z števko, se tolmači kot osmiško število;\n" +" sicer je niz simbolnega načina kot je sprejet s strani chmod(1).\n" +" \n" +" Možnosti:\n" +" -p\tče je NAČIN izpuščen, izpiši v obliki, ki se lahko uporabi kot " +"vnos\n" +" -S\tnaredi simbolni izpis; sicer se izpiše osmiško število\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je NAČIN neveljaven ali če je dana neveljavna\n" +" možnost." + +#: builtins.c:1503 +#, fuzzy +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Čaka na dokončanje posla in vrne stanje končanja.\n" +" \n" +" Počaka na opravilo, določeno s strani ID-ja, ki je lahko ID opravila " +"ali\n" +" določilo posla in poroča svoje stanje uničenja. Če ID ni dan, počaka\n" +" vsa trenutno dejavna podrejena opravila in stanje končanja je nič.\n" +" Če je ID določilo posla, počaka vsa opravila v cevovodu\n" +" posla.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje ID-ja; vrne neuspešno, če je ID neveljaven ali če je dana\n" +" neveljavna možnost." + +#: builtins.c:1534 +#, fuzzy +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is given." +msgstr "" +"Čaka na končanje opravila in vrne stanje končanja.\n" +" \n" +" Počaka na določeno opravilo in poroča svoje stanje uničenja. Če ID\n" +" opravila ni dan, so vsa trenutno dejavna podrejena opravila na\n" +" čakanju in stanje končanja je nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje ID-ja; neuspešno, če je ID neveljaven ali če je dana\n" +" neveljavna možnost." + +#: builtins.c:1549 +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 "" +"Izvede ukaze za vsakega člana na seznamu.\n" +" \n" +" Zanka `for' izvede zaporedje ukazov za vsakega člana na seznamu\n" +" predmetov. Če `in BESEDE ...;' niso prisotna, se predvideva `in \"$@" +"\"'.\n" +" Za vsak element v BESEDAH je IME nastavljeno temu predmetu in\n" +" UKAZI so izvršeni.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1563 +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 "" +"Aritmetična zanka for.\n" +" \n" +" Enakovredna je \n" +" \t(( IZRAZ1 ))\n" +" \twhile (( IZRAZ2 )); do\n" +" \t\tUKAZI\n" +" \t\t(( IZRAZ3 ))\n" +" \tdone\n" +" IZRAZ1, IZRAZ2, in IZRAZ3 so aritmetični izrazi. Če je kateri izraz " +"izpuščen,\n" +" se obnaša, kot da so enaki 1.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1581 +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 "" +"Izbere besede s seznama in izvede ukaze.\n" +" \n" +" BESEDE so razširjene, kar ustvari seznam besed. Nabor razširjenih\n" +" besed se izpiše na standardno napako, vsaka s svojo številko.\n" +" Če `in BESEDE ...;' niso prisotne, se predvideva\n" +" `in \"$@\"'. Potem je prikazan poziv PS3 in vrstica prebrana\n" +" s standardnega vnosa. Če je vrstica sestavljena iz številke, ki ustreza\n" +" eni od prikazanih besed, potem je IME nastavljeno tej besedi.\n" +" Če je vrstica prazna, so BESEDE v pozivu prikazane \n" +" ponovno. Če se prebere konec datoteke, se ukaz zaključi. Vsaka druga \n" +" prebrana vrednost povzroči, da se IME nastavi na prazno vrednost.\n" +" Prebrana vrstica je shranjena v spremenljivki ODGOVOR. UKAZI so " +"izvršeni \n" +" po vsakem izboru, dokler se ne izvede ukaz break.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1602 +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 "" +"Poroča porabljen čas s strani izvedbe cevovoda.\n" +" \n" +" Izvede CEVOVOD in prikaže povzetek dejanskega časa, čas \n" +" uporabniške CPE in čas sistemske CPE, porabljen za izvajanje CEVOVODA,\n" +" ko se konča.\n" +" \n" +" Možnosti:\n" +" -p\tprikaži časovni povzetek v prenosni obliki POSIX\n" +" \n" +" Vrednost spremenljivke TIMEFORMAT se uporabi kot oblika izpisa.\n" +" \n" +" Stanje končanja:\n" +" Stanje končanja je stanje končanja CEVOVODA." + +#: builtins.c:1619 +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 "" +"Izvrši ukaze na podlagi ujemanja vzorcev.\n" +" \n" +" Izbirno izvrši UKAZE, ki temeljijo na VZORCU BESEDNEGA ujemanja.\n" +" `|' se uporablja za ločevanje večih vzorcev.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1631 +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 "" +"Izvaja ukaze, ki temeljijo na pogojih.\n" +" \n" +" Izvede se seznam `if UKAZI'. Če je njegovo stanje nič, se izvede seznam\n" +" `then UKAZI'. V nasprotnem primeru se izvede vsak seznam `elif UKAZI' \n" +" in če je njegovo stanje nič, se izvede ustrezen seznam `then UKAZI' \n" +" in ukaz if se zaključi. V nasprotnem primeru se izvede seznam \n" +" `else UKAZI', če je prisoten. Stanje končanja celotnega izgrajenja \n" +" je stanje končanja zadnjega izvršenega ukaza ali nič, če noben pogoj " +"ni \n" +" dal prav.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1648 +#, fuzzy +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvaja ukaze, dokler je preizkus uspešen.\n" +" \n" +" Razširja in izvaja UKAZE tako dolgo, dokler ima zadnji ukaz v UKAZIH\n" +" `while' stanje končanja, ki je nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1660 +#, fuzzy +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Izvaja ukaze, dokler je preizkus neuspešen.\n" +" \n" +" Razširja in izvaja UKAZE tako dolgo, dokler ima zadnji ukaz v UKAZIH\n" +" `until' stanje končanja, ki ni nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1672 +#, fuzzy +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Ustvari soopravilo, imenovano IME.\n" +" \n" +" Izvrši UKAZ neusklajeno, s standardnim izhodom in vnosom ukaza, ki sta \n" +" povezana preko cevi z opisniki datotek, ki so dodeljeni kazalom 0 in 1 \n" +" spremenljivke polja IME v izvršilni lupini.\n" +" Privzeto IME je \"COPROC\".\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje končanja UKAZA." + +#: builtins.c:1686 +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 "" +"Določi funkcijo lupine.\n" +" \n" +" Ustvari funkcijo lupine, imenovano IME. Kadar je poklicana kot preprost " +"ukaz,\n" +" IME zažene UKAZE v vsebini klicoče lupine. Kadar se kliče IME, so " +"argumenti\n" +" posredovani v funkcijo kot $1...$n in ime funkcije je v $FUNCNAME.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je IME samo za branje." + +#: builtins.c:1700 +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 "" +"Združi ukaze kot enoto.\n" +" \n" +" Zažene nabor ukazov v skupini. To je eden od načinov za \n" +" preusmeritev celotnega nabora ukazov.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje zadnjega izvršenega ukaza." + +#: builtins.c:1712 +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 "" +"Obnovi posel v ospredju.\n" +" \n" +" Je enakovreden argumentu DOLOČILO_POSLA v ukazu `fg'. Obnovi posel,\n" +" ki je ustavljen ali v ozadju. DOLOČILO_POSLA lahko določi bodisi ime\n" +" posla bodisi številko posla. DOLOČILU_POSLA sledi `&', ki postavi posel\n" +" v ozadje, kot če bi določilo posla bilo dobavljeno kot argument ukazu " +"`bg'.\n" +" \n" +" Stanje končanja:\n" +" Vrne stanje obnovljenega posla." + +#: builtins.c:1727 +#, 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 "" +"Ovrednoti aritmetični izraz.\n" +" \n" +" IZRAZ je ovrednoten v skladu s pravili za aritmetično ovrednotenje.\n" +" Je enakovreden ukazu \"let IZRAZ\".\n" +" \n" +" Stanje končanja:\n" +" Vrne 1, če je IZRAZ enakovreden; sicer vrne 0." + +#: builtins.c:1739 +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 "" +"Izvrši pogojni ukaz.\n" +" \n" +" Vrne stanje 0 ali 1, odvisno od vrednotenja pogojnega izraza IZRAZ.\n" +" expression EXPRESSION. Izrazi so sestavljeni iz istih osnov, ki so " +"uporabljajo\n" +" s strani vgrajene lupine `test' in se lahko spajajo s pomočjo " +"naslednjih\n" +" operatorjev:\n" +" \n" +" ( IZRAZ )\tVrne vrednost IZRAZA\n" +" ! IZRAZ\t\tPrav, če je IZRAZ napak; sicer vrne napak\n" +" IZRAZ1 && IZRAZ2\tPrav, če sta IZRAZ1 in IZRAZ2 prav; sicer vrne " +"napak\n" +" IZRAZ1 || IZRAZ2\tTPrav, če je IZRAZ1 ali IZRAZ2 prav; sicer vrne " +"napak\n" +" \n" +" Kadar se uporabita operatorja `==' in `!=', se niz desno od operatorja \n" +" uporabi kot vzorec in izvrši se ujemanje vzorcev. Kadar se uporabi \n" +" operator `=~', se niz desno od operatorja ujema kot logični izraz.\n" +" \n" +" Operatorja && in || ne vrednotita IZRAZ2, če IZRAZ1 zadošča za " +"določitev \n" +" vrednosti izraza.\n" +" \n" +" Stanje končanja:\n" +" 0 ali 1, odvisno od vrednosti IZRAZA." + +#: builtins.c:1765 +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 "" +"Pogosta imena spremenljivk lupine in uporaba.\n" +" \n" +" BASH_VERSION\tPodatki o različici Bash.\n" +" CDPATH\tZ dvopičjem ločen seznam map za iskanje map,\n" +" \t\tdanih kot argumenti ukazu `cd'.\n" +" GLOBIGNORE\tZ dvopičjem ločen seznam vzorcev z opisom imen datotek,\n" +" \t\tki se jih ne upošteva pri razširitvi imena poti.\n" +" HISTFILE\tIme datoteke, kjer je shranjena vaša zgodovina ukazov.\n" +" HISTFILESIZE\tNajvečje število vrstic, ki jih ta datoteka lahko " +"vsebuje.\n" +" HISTSIZE\tNajvečje število vrstic zgodovine, do katerih izvajajoča\n" +" \t\tlupina lahko dostopa.\n" +" HOME\tCelotno ime poti do vaše prijavne mape.\n" +" HOSTNAME\tIme trenutnega gostitelja.\n" +" HOSTTYPE\tVrsta CPE, na katerem se ta različica Bash izvaja.\n" +" IGNOREEOF\tNadzoruje delovanje lupine ob prejemu znaka za konec\n" +" \t\tdatoteke kot edini vnos. Če je nastavljen, je vrednost število\n" +" \t\tznakov za konec datoteke, ki jih je mogoče videti naenkrat\n" +" \t\tv prazni vrstici, preden se lupina konča (privzeto 10).\n" +" \t\tKo je ponastavljen, znak za konec datoteke označuje konec vnosa.\n" +" MACHTYPE\tNiz, ki opiše trenutni sistem, na katerem se izvaja Bash.\n" +" MAILCHECK\tKako pogosto, v sekundah, Bash preveri za novo pošto.\n" +" MAILPATH\tZ dvopičjem ločen seznam imen datotek, za katere Bash\n" +" \t\tpreveri za novo pošto.\n" +" OSTYPE\tRazličica sistema Unix, na katerem se ta različica Bash izvaja.\n" +" PATH\tZ dvopičjem ločen seznam iskanih map pri iskanju ukazov.\n" +" PROMPT_COMMAND\tUkaz, ki se bo izvršil pred izpisom vsakega\n" +" \t\tglavnega poziva.\n" +" PS1\t\tPrvotni niz poziva.\n" +" PS2\t\tDrugotni niz poziva.\n" +" PWD\t\tPolno ime poti trenutne mape.\n" +" SHELLOPTS\tZ dvopičjem ločen seznam omogočenih možnosti lupine.\n" +" TERM\tIme trenutne vrste terminala.\n" +" TIMEFORMAT\tOblika izpisa za časovno statistiko, ki je prikazana\n" +" \t\ts pridržanim imenom `time'.\n" +" auto_resume\tNe-prazno pomeni, da je beseda ukaza, ki se neodvisno\n" +" \t\tpojavlja na črti, iskana prva na seznamu trenutno zaustavljenih\n" +" \t\tposlov. Če je najdena tam, se ta posel postavi v ospredje.\n" +" \t\tVrednost `exact' pomeni, da se mora beseda ukaza natančno\n" +" \t\tujemati z ukazom na seznamu končanih poslov.\n" +" \t\tVrednost `substring' pomeni, da se beseda ukaza mora ujemati\n" +" \t\ts podnizom posla. Vsaka druga vrednost pomeni,\n" +" \t\tda mora ukaz biti predpona končanega posla.\n" +" histchars\tZnaki, ki nadzorujejo razširitev zgodovine in hitro\n" +" \t\tzamenjavo. Prvi znak je znak zamenjave \n" +" \t\tzgodovine, običajno `!'. Drugi znak je znak \n" +" \t\t`hitre zamenjave', običajno `^'.\n" +" \t\tTretji znak je znak `opomba zgodovine', običajno `#'.\n" +" HISTIGNORE\tZ dvopičjem ločen seznam vzorcev, ki so uporabljeni \n" +" \t\tza odločanje, kateri ukazi naj se shranijo na seznam zgodovine.\n" + +#: builtins.c:1822 +#, 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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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 "" +"Doda mape skladu.\n" +" \n" +" Doda mapo na vrh sklada map ali pa zavrti sklad, da spremeni\n" +" nov vrh sklada v trenutno delovno mapo.\n" +" Če je brez argumentov, izmenja dve vrhnji mapi.\n" +" \n" +" Možnosti:\n" +" -n\tPrepreči običajno spremembo mape pri dodajanju map skladu,\n" +" \ttako da se obdela le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tZavrti sklad, tako da je N-ta mapa (štetje z leve strani\n" +" \tseznama, prikazano z `dirs', začenši z nič) na vrhu.\n" +" \n" +" -N\tZavrti sklad, tako da je N-ta mapa (štetje z desne strani\n" +" \tseznama, prikazano z `dirs', začenši z nič) na vrhu.\n" +" \n" +" dir\tDoda DIR skladu mape na vrhu, kar jo spremeni v novo\n" +" \ttrenutno delovno mapo.\n" +" \n" +" Vgrajena lupina `dirs' prikaže sklad map.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložen neveljaven argument ali če\n" +" sprememba mape spodleti." + +#: builtins.c:1856 +#, 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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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 "" +"Odstrani mape sklada.\n" +" \n" +" Odstrani vnose sklada map. Če je brez argumentov, \n" +" odstrani vrhnjo mapo sklada in spremeni v novo vrhnjo mapo.\n" +" \n" +" Možnosti:\n" +" -n\tPrepreči običajno spremembo mape pri odstranjevanju map\n" +" \tsklada, tako da se obdela le sklad.\n" +" \n" +" Argumenti:\n" +" +N\tOdstrani N-ti vnos s štetjem z leve strani seznama,\n" +" \tprikazanega z `dirs', začenši z nič. Na primer:\n" +" \t`popd +0' odstrani prvo mapo, `popd +1' odstrani drugo.\n" +" \n" +" -N\tOdstrani N-ti vnos s štetjem z desne strani seznama,\n" +" \tprikazanega z `dirs', začenši z nič. Na primer:\n" +" \t`popd +0' odstrani zadnjo mapo, `popd +1' odstrani predzadnjo.\n" +" \n" +" Vgrajena lupina `dirs' prikaže sklad map.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložen neveljaven argument ali če\n" +" sprememba mape spodleti." + +#: builtins.c:1886 +#, 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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Prikaže sklad map.\n" +" \n" +" Prikaže seznam trenutno pomnjenih map. Mape najdejo \n" +" svojo pot na seznam z ukazom `pushd'; navzgor po seznamu\n" +" se lahko vrnete z ukazom `popd'.\n" +" \n" +" Možnosti:\n" +" -c\tpočisti sklad map z brisanjem vseh predmetov\n" +" -l\tne izpiši sorodnih map s predpono `~' v mojo domačo mapo\n" +" -p\tprikaži sklad map z enim vnosom v vrstici\n" +" -v\tizpiši sklad mape z enim vnosom v vrstici z določenim\n" +" \tpoložajem v skladu\n" +" \n" +" Argumenti:\n" +" +N\tPrikaže N-ti vnos s štetjem z leve strani seznama, prikazan\n" +" \ts pomočjo map, ko kličemo brez možnosti, začenši z nič.\n" +" \n" +" -N\tPrikaže N-ti vnos s štetjem z desne strani seznama, prikazan\n" +" \ts pomočjo map, ko kličemo brez možnosti, začenši z nič.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do napake." + +#: builtins.c:1917 +#, fuzzy +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 in ponastavi možnosti lupine.\n" +" \n" +" Spremeni nastavitev vsake možnosti lupine IME_MOŽNOSTI.\n" +" Če ni navedenih argumentov možnosti, navede vse možnosti\n" +" lupine z označbo, če so vsi nastavljeni ali ne.\n" +" \n" +" Možnosti:\n" +" -o\tomeji IMENA_MOŽNOSTI tem, ki so določeni za uporabo s `set -o'\n" +" -p\tprikaži vsako možnost lupine z navedbo stanja\n" +" -q\tprepreči izhod\n" +" -s\tomogoči (nastavi) vsako IME_MOŽNOSTI\n" +" -u\tonemogoči (ponastavi) vsako IME_MOŽNOSTI\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, če je IME_MOŽNOSTI omogočeno; neuspešno, če je\n" +" dana neveljavna možnost ali če je IME_MOŽNOSTI onemogočeno." + +#: builtins.c:1938 +#, 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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or " +"assignment\n" +" error occurs." +msgstr "" +"Oblikuje in prikaže ARGUMENTE pod nadzorom OBLIKE.\n" +" \n" +" Možnosti:\n" +" -v var\tdodeli izhod spremenljivki SPREMENLJIVKA namesto\n" +" \t\tprikaza na standardni izpis\n" +" \n" +" OBLIKA je niz znakov, ki vsebuje tri vrste predmetov: običajni znaki, \n" +" ki so preprosto kopirani na standardni izhod; zaporedja ubežnega " +"zaporedja, \n" +" ki so pretvorjena in kopirana na standardni izhod; in določila oblike, \n" +" od katerih vsako povzroči prikaz naslednjega zaporednega argumenta.\n" +" \n" +" Poleg določil standardne oblike, opisanih v printf(1) in printf(3), \n" +" printf tolmači:\n" +" \n" +" %b\trazširi ubežno zaporedje levih poševnic v ustreznem argumentu\n" +" %q\tnavedi argument na način, ki je lahko ponovno uporaben kot\n" +" \tvnos lupine\n" +" %(fmt)T izpiši niz datuma-časa, ki izhaja iz uporabe FMT-ja kot niza " +"oblike \n" +" za strftime(3)\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost ali če pride do " +"napake\n" +" branja ali dodelitve." + +#: builtins.c:1974 +#, 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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Navede, kako bodo argumenti dopolnjeni s pomočjo Readline.\n" +" \n" +" Za vsako IME navedi, kako bodo argumenti dopolnjeni. Če ni predloženih\n" +" možnosti, so obstoječe določitve dopolnjevanja prikazane na način, ki " +"jim\n" +" omogoča, da se ponovno uporabijo kot vnos.\n" +" \n" +" Možnosti:\n" +" -p\tprikaži obstoječe določitve dopolnjevanja v obliki za večkratno\n" +" \tuporabo\n" +" -r\todstrani določitev dopolnjevanja za vsako IME ali če IMENA\n" +" \tniso predložena, vse določitve dopolnjevanja\n" +" -D\tuveljavi dopolnjevanja in dejanja kot privzeta za ukaze brez\n" +" \tdoločenih dopolnjevanj\n" +" -E\tuveljavi dopolnjevanja in dejanja v \"praznih\" ukazih -- \n" +" \tposkus dopolnjevanja v prazni vrstici\n" +" \n" +" Ko se poskuša dopolnjevanje, se dejanja uveljavijo v takšnem\n" +" vrstnem redu, kot z velikimi črkami zgoraj navedene možnosti.\n" +" Možnost -D ima prednost pred -E.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali če pride\n" +" do napake." + +#: builtins.c:2004 +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 "" +"Prikaže možne dopolnitve, odvisne od možnosti.\n" +" \n" +" Namenjen je za uporabo znotraj funkcije lupine za ustvarjanje možnih\n" +" dopolnitev. Če je izbirni argument BESEDE predložen, se ustvarijo\n" +" ujemanja proti BESEDI.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali če pride\n" +" do napake." + +#: builtins.c:2019 +#, 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 being executed. If no OPTIONs are given, " +"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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"Spremeni ali prikaže možnosti dopolnjevanja.\n" +" \n" +" Spremeni možnosti dopolnjevanja za vsako IME oz. trenutno izvedeno \n" +" dopolnitev, če IMENA niso predložena. Če ni danih MOŽNOSTI,\n" +" prikaže možnosti dopolnjevanja za vsako IME ali trenutno določitev\n" +" dopolnjevanja.\n" +" \n" +" Možnosti:\n" +" \t-o možnost\tNastavi možnost dopolnitve MOŽNOST za vsako IME\n" +" \t-D\t\tSpremeni možnosti za \"privzeto\" dopolnitev ukaza\n" +" \t-E\t\tSpremeni možnosti za \"prazno\" dopolnitev ukaza\n" +" \n" +" Uporaba `+o' namesto `-o' izklopi navedeno možnost.\n" +" \n" +" Argumenti:\n" +" \n" +" Vsako IME se nanaša na ukaz, za katerega mora že predhodno biti\n" +" določeno določilo dopolnjevanja z uporabo vgrajene lupine `complete'.\n" +" Če ni predloženih IMEN, mora compopt biti klican s strani funkcije, \n" +" ki trenutno ustvarja dopolnjevanja in možnosti za tega trenutno \n" +" izvajajočega ustvarjalnika dopolnjevanj se bodo spremenile.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je predložena neveljavna možnost ali pa IME\n" +" nima določenega določila dopolnjevanja." + +#: builtins.c:2050 +#, 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"Prebere vrstice s standardnega vnosa v spremenljivko zabeleženega polja.\n" +" \n" +" Prebere vrstice iz standardnega vnosa v spremenljivko zabeleženega " +"polja \n" +" POLJE ali iz opisnika datotek FD, če je predložena možnost -u.\n" +" Spremenljivka MAPFILE je privzeto POLJE.\n" +" \n" +" Možnosti:\n" +" -n števec\tKopiraj največ vrstic ŠTEVCA. Če je ŠTEVEC 0, se kopirajo\n" +" \tvse vrstice.\n" +" -O izvor\tZačni dodeljevati POLJU pri kazalu IZVOR. Privzeto kazalo je " +"0.\n" +" -s števec \tZavrzi prve prebrane vrstice ŠTEVCA.\n" +" -t\t\tIz vsake prebrane vrstice odstrani vmesno novo vrstico.\n" +" -u fd\t\tBeri vrstice iz opisnika datotek FD namesto standardnega\n" +" \tvnosa.\n" +" -C povratni_klic\tOvrednoti POVRATNI_KLIC vsakič, ko so prebrane\n" +" \tvrstice DELOV.\n" +" -c del\tNavedi število vrstic, prebranih med vsakim klicem\n" +" \tPOVRATNEGA_KLICA.\n" +" \n" +" Argumenti:\n" +" POLJE\t\tIme spremenljivke polja za uporabo za podatke datotek\n" +" \n" +" Če je -C predložen brez -c, je privzet del 5000. Ko je POVRATNI_KLIC\n" +" ovrednoten, je predloženo kazalo naslednjega predmeta polja, ki bo\n" +" dodeljen in vrstica, ki bo dodeljena temu predmetu kot dodatni\n" +" argumenti.\n" +" \n" +" Če ni predloženo z izrecnim izvorom, bo mapfile počistil POLJE, preden\n" +" ji bo dodeljen.\n" +" \n" +" Stanje končanja:\n" +" Vrne uspešno, razen če je dana neveljavna možnost oz. je POLJE samo\n" +" za branje ali pa ni zabeleženo polje." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Prebere vrstice iz datoteke v spremenljivko polja.\n" +" \n" +" Je sopomenka za `mapfile'." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: neveljaven ključ povezanega polja" + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Avtorske pravice (C) 2011 Free Software Foundation, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Vrne vsebino trenutnega klica podprograma.\n" +#~ " \n" +#~ " Brez EXPR vrne " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: opravilo %5ld (%s) v the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Neznan signal #" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Dovoljenje GPLv2+: GNU GPL različica 2 ali kasnejše \n" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "prav" + +#~ msgid "false" +#~ msgstr "napak" + +#~ msgid "times" +#~ msgstr "krat" diff --git a/po/sr.gmo b/po/sr.gmo new file mode 100644 index 0000000..609b018 Binary files /dev/null and b/po/sr.gmo differ diff --git a/po/sr.po b/po/sr.po new file mode 100644 index 0000000..63cabb3 --- /dev/null +++ b/po/sr.po @@ -0,0 +1,5618 @@ +# Serbian translation for bash. +# Copyright © 2020 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Marko Uskokovic , 2007, 2008. +# Serbian linux distribution cp6Linux +# Copyright © 2007 Marko Uskokovic +# Мирослав Николић , 2014—2022. +# +msgid "" +msgstr "" +"Project-Id-Version: bash-5.2-rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-08-22 00:19+0200\n" +"Last-Translator: Мирослав Николић \n" +"Language-Team: Serbian <(nothing)>\n" +"Language: sr\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%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "лоша подскрипта низа" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: уклањам атрибут упуте назива" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: не могу да претворим пописани низ у придружив" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: не могу да доделим у не-бројевни попис" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: мора користити индекс приликом додељивања придруживог низа" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: не могу да направим: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "баш_изврши_јуникс_наредбу: не могу да нађем мапу кључа за наредбу" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: први не-празан знак није \"" + +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "нема затварајућег „%c“ у %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: недостаје раздвојник двотачке" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "„%s“: не могу да развежем у мапи тастера наредбе" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "ширење заграде: не могу да доделим меморију за „%s“" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "ширење заграде: нисам успео да доделим меморију за %u елемента" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "ширење заграде: нисам успео да доделим меморију за „%s“" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "„%s“: неисправан назив алијаса" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "уређивање реда није укључено" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "„%s“: неисправан назив мапе кључа" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: не могу да читам: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "„%s“: непознат назив функције" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "„%s“ није привезано ни за један кључ.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "„%s“ не може бити призвано путем" + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "„%s“: не могу да развежем" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "број петљи" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "једино има смисла у петљи „for“, „while“, или „until“" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"Даје садржај текућег позива подрутине.\n" +" \n" +" Без ИЗРАЗА, даје „$ред $назив_датотеке“. Са ИЗРАЗОМ, даје\n" +" „$ред $подрутина $назив_датотеке“; овај додатни податак може бити\n" +" коришћен за обезбеђивање праћења спремника.\n" +" \n" +" Вредност ИЗРАЗА показује колико кадрова позива да се иде уназад пре\n" +" текућег; први кадар је кадар 0." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "„HOME“ није подешено" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "превише аргумената" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "ништаван директоријум" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "„OLDPWD“ није подешено" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "%d. ред:" + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "упозорење:" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: употреба:" + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: опција захтева аргумент" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: потребан је бројевни аргумент" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: не постоји" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: неисправна опција" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: неисправан назив опције" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "„%s“: није исправан одредник" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "неисправан октални број" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "неисправан хексадецимални број" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "неисправан број" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: неисправна одредба сигнала" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "„%s“: није пиб или исправна одредба посла" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: променљива само за читање" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: не могу да доделим" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: „%s“ је ван опсега" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "аргумент" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "„%s“ је ван опсега" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: нема таквог посла" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: нема управљања послом" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "нема управљања послом" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: ограничено" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "ограничено" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: није уграђеност шкољке" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "грешка писања: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "грешка подешавања особина терминала: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "грешка добављања особина терминала: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: грешка довлачења текућег директоријума: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: нејасна одредба посла" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "помоћ није доступна у овом издању" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не могу да расподесим: „%s“ је само за читање" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не могу да расподесим" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: неисправан назив радње" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, 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:846 +msgid "not currently executing completion function" +msgstr "тренутно не обавља функцију довршавања" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "може бити коришћено једино у функцији" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "не можете користити „-f“ да направите функције" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: функција само за читање" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: променљива упуте не може бити низ" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: самоупућивање променљиве упуте назива није дозвољено" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: кружна упута назива" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "%s: неисправан назив променљиве за упуту назива" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: не могу да уништим променљиве низа на овај начин" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: не могу да претворим придруживи низ у пописани" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: додела низа цитираног споја је застарела" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "променљиво учитавање није доступно" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "не могу да отворим дељени предмет „%s“: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "не могу да нађем „%s“ у дељеном предмету „%s“: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: динамичка уградња је већ учитана" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "функција учитавања за „%s“ није успела (%d): није учитано" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: није динамички учитано" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: не могу да обришем: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: је директоријум" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: није обична датотека" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: датотека је превелика" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: не могу да извршим бинарну датотеку" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: не могу да извршим: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "одјави\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "није шкољка пријављивања: користите „exit“" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Има заустављених послова.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Има покренутих послова.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "нема такве наредбе" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "одредба историјата" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: не могу да отворим привремену датотеку: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "текуће" + +#: builtins/fg_bg.def:161 +#, 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:91 +msgid "hashing disabled" +msgstr "хеширање је искључено" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: хеш табела је празна\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "покреће\tнаредбу\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Наредбе шкољке које одговарају кључној речи „" +msgstr[1] "Наредбе шкољке које одговарају кључним речима „" +msgstr[2] "Наредбе шкољке које одговарају кључним речима „" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"“\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "нема тема помоћи које одговарају „%s“. Покушајте „help help“ или „man -k %s“ или „info %s“." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: не могу да отворим: %s" + +#: builtins/help.def:523 +#, 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 "" +"Ове наредбе шкољке су одређене изнутра. Укуцајте „help“ за овај списак.\n" +"Укуцајте „help name“ да сазнате више о функцији „name“.\n" +"Користите „info bash“ да сазнате више о шкољци уопште.\n" +"Користите „man -k“ или „info“ да сазнате више о наредбама ван списка.\n" +"\n" +"Звездица (*) поред назива значи да је наредба искључена.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "не могу користити више од једног „-anrw“" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "положај историјата" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: неисправна ознака времена" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: није успело ширење историјата" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: није успело „inlib“" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "нису допуштене друге опције уз „-x“" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: аргументи морају бити процеси или ИБ-ови посла" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Непозната грешка" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "очекиван је израз" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: није пописани низ" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: неисправна одредба описника датотеке" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: неисправан описник датотеке: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: неисправан број реда" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: неисправно порекло низа" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: неисправна количина опозива" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "празан назив променљиве низа" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "потребна је подршка променљиве низа" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "„%s“: недостаје знак записа" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "„%c“: неисправна одредба записа времена" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "„%c“: неисправан знак записа" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "упозорење: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "проблем обраде записа: %s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "недостаје хексадецимална цифра за \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "недостаје цифра уникода за \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "нема другог директоријума" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: неисправан аргумент" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<нема текућег директоријума>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "празан спремник директоријума" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "попис спремника директоријума" + +#: builtins/pushd.def:701 +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" +" Опције:\n" +" -c\tчисти спремник директоријума брисањем свих елемената\n" +" -l\tне исписује тилдом префиксована издања директоријума\n" +" \t који се односе на ваш лични директоријум\n" +" -p\tисписује спремник директоријума са једним уносом у реду\n" +" -v\tисписује спремник директоријума са једним уносом у реду\n" +" \t са префиксом његовог положаја у спремнику\n" +" \n" +" Аргументи:\n" +" +N\tПриказује н-ти унос бројећи с лева на списку приказаном\n" +" \t директоријумима када се призову опцијама, почевши од нуле.\n" +" \n" +" -N\tПриказује н-ти унос почевши с десна на списку приказаном\n" +"\t директоријумима када се призову без опција, почевши од нуле." + +#: builtins/pushd.def:723 +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\tПотискује нормалну замену директоријума приликом додавања\n" +" \t директоријума у спремник, тако да се ради само са спремником.\n" +" \n" +" Аргументи:\n" +" +N\tЗаокреће спремник тако да н-ти директоријум (бројећи\n" +" \t с лева на списку кога приказује „dirs“, почевши нулом)\n" +" \t буде на врху.\n" +" \n" +" -N\tЗаокреће спремник тако да н-ти директоријум (бројећи\n" +" \t с десна на списку кога приказује „dirs“, почевши нулом)\n" +" \t буде на врху.\n" +" \n" +" dir\tДодаје ДИРЕКТОРИЈУМ у спремник директоријума на врху,\n" +" начинивши га новим текућим радним директоријумом.\n" +" \n" +" Уграђено „dirs“ приказује спремник директоријума." + +#: builtins/pushd.def:748 +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\tПотискује нормалну замену директоријума приликом уклањања\n" +" \t директоријума из спремника, тако да се ради само са спремником.\n" +" \n" +" Аргументи:\n" +" +N\tУклања н-ти унос бројећи с лева на списку кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd +0“ уклања\n" +" \t први директоријум, „popd +1“ други.\n" +" \n" +" -N\tУклања н-ти унос бројећи с десна на списку кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd -0“ уклања\n" +" \t последњи директоријум, „popd -1“ претпоследњи.\n" +" \n" +" Уграђено „dirs“ приказује спремник директоријума." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: неисправна одредба временског истека" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "грешка читања: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "могу једино да „испишем“ из функције или изворног списа" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "не могу истовремено да расподесим функцију и променљиву" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: није променљива низа" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: није функција" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не могу да извезем" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "број помака" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "не могу истовремено да подесим и да расподесим опције шкољке" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: неисправан назив опције шкољке" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "потребан је аргумент назива датотеке" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: нисам пронашао датотеку" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "не могу да обуставим" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "не могу да обуставим шкољку пријављивања" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s је измењен у псеудоним „%s“\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "„%s“ је кључна реч шкољке\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s: је функција\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s: је нарочита уграђеност шкољке\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s: јесте уграђеност шкољке\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "„%s“ јесте „%s“\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "„%s“ је хеширано (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: неисправан аргумент ограничења" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "„%c“: лоша наредба" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: не могу да добавим ограничење: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "ограничење" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: не могу да изменим ограничење: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "октални број" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "„%c“: неисправан оператер симболичког режима" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "„%c“: неисправан знак симболичког режима" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " ред " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "последња наредба: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Прекидам..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ПОДАЦИ: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "упозорење ПРОЧИШЋАВАЊА:" + +#: error.c:488 +msgid "unknown command error" +msgstr "непозната грешка наредбе" + +#: error.c:489 +msgid "bad command type" +msgstr "лоша врста наредбе" + +#: error.c:490 +msgid "bad connector" +msgstr "лош спајач" + +#: error.c:491 +msgid "bad jump" +msgstr "лош скок" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: несвезана променљива" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aистекло је време чекајући на улаз: сам се одјављујем\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "не могу да преусмерим стандардни улаз из „/dev/null:“: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "ЗАПИСВРЕМЕНА: „%c“: неисправан знак записа" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "изврши_копроц: копроцес [%d:%s] још увек постоји" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "грешка спојке" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "процена: премашен је највећи ниво угнежђивања процене (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: премашен је највећи ниво угнежђивања извора (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: премашен је највећи ниво угнежђивања функције (%d)" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: ограничено: не могу да наведем / у називима наредби" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: нема такве наредбе" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: не могу да извршим: нисам нашао потребну датотеку" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: лош тумач" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: не могу да извршим бинарну датотеку: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "„%s“: јесте посебна уграђеност" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "не могу да удвостручим „fd %d“ у „fd %d“" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "премашен је ниво дубачења израза" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "недоток спремника дубачења" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "садржајна грешка у изразу" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "покушано је додељивање у не-променљиву" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "садржајна грешка у додели променљиве" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "дељење 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "грешка: лош симбол доделе израза" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "„:“ је очекивано за условни израз" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "изложилац је мањи од 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "одредник је очекиван након пре-увећања или пре-умањења" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "недостаје )" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "садржајна грешка: очекиван је операнд" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "садржајна грешка: неисправан аритметички оператор" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (симбол грешке је „%s“)" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "неисправна аритметичка основа" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "неисправна константа целог броја" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "вредност је превише велика за основу" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: грешка израза\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: не могу да приступим родитељском директоријуму" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "не могу да поништим режим без-кашњења за фд „%d“" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "не могу да доделим нови описник датотеке за улаз баша из фд „%d“" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: већ постоји међумеморија за нови фд „%d“" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: „pgrp“ спојка" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "исцепљени пиб „%d“ се јавља у покренутом послу „%d“" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "бришем заустављени посао „%d“ са групом процеса %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: пиб %5ld (%s) је означен да је још жив" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: нема таквог пиб-а" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Сигнал %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Урађен" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Заустављен" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Заустављен(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Покренут" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Урађен(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Изађи из „%d“" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Непознато стање" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(језгрени избачај)" + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (wd: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "сетпгиб порода (%ld у %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: пиб %ld није пород ове шкољке" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Нема записа о процесу %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: посао „%d“ је заустављен" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: нема текућих послова" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: посао је завршио" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: посао „%dд је већ у позадини" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: укључујем „WNOHANG“ да избегнем неодређени блок" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: ред %d:" + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (језгрени избачај)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(„wd“ сада: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: није успело „getpgrp“" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: нема контроле посла у позадини" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: дисциплина реда" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "не могу да подесим групу процеса терминала (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "нема управљања послом у овој шкољци" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: тврдња није успела: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: тврдња је лоше изведена\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "непознато" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: блок на слободном списку је преписан" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: позвана са већ ослобођеним аргументом блока" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: позвана са недодељеним аргументом блока" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: откривена је недовољност тока; mh_n-бајтова је ван опсега" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: откривена је недовољност тока; „magic8“ је оштећено" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: почетна и крајња величина дела се разликују" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: позвана са недодељеним аргументом блока" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: откривена је недовољност тока; mh_n-бајтова је ван опсега" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: откривена је недовољност тока; „magic8“ је оштећено" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: почетна и крајња величина дела се разликују" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: табела доделе је пуна са „FIND_ALLOC“?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: „%p“ је већ у табели као додељено?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: „%p“ је већ у табели као слободно?\n" + +#: lib/sh/fmtulong.c:102 +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:347 +msgid "network operations not supported" +msgstr "радње мреже нису подржане" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: не могу да изменим језик (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: не могу да изменим језик (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: не могу да изменим језик (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: не могу да изменим језик (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Имате пошту у $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Имате нову пошту у $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Пошта у „%s“ је прочитана\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "садржајна грешка: потребан је аритметички израз" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "садржајна грешка: није очекивано „;“" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "садржајна грешка: „((%s))“" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: лоша врста упутства „%d“" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "овде-документ у %d. реду је ограничен крајем-датотеке (тражи се „%s“)" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: упутсво преусмерења „%d“ је ван опсега" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: величина_реда_улаза_шкољке (%zu) је премашила НАЈВЕЋУ_ВЕЛИЧИНУ (%lu): ред је скраћен" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "премашен је највећи број „овде-документ“" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "неочекивани крај датотеке приликом тражења поклапања „%c“" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "неочекивани крај датотеке приликом тражења „]]“" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "садржајна грешка у условном изразу: неочекивани симбол „%s“" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "садржајна грешка у условном изразу" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "неочекивани симбол „%s“, очекивана је )" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "очекивана је )" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "неочекивани аргумент „%s“ условном једночланом оператору" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "неочекивани аргумент условном једночланом оператору" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "неочекивани симбол „%s“, очекиван је условни двочлани оператор" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "очекиван је условни двочлани оператор" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "неочекивани аргумент „%s“ условном двочланом оператору" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "неочекивани аргумент условном двочланом оператору" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "неочекивани симбол „%c“ у условној наредби" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "неочекивани симбол „%s“ у условној наредби" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "неочекивани симбол „%d“ у условној наредби" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "садржајна грешка близу неочекиваног симбола „%s“" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "садржајна грешка близу „%s“" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "садржајна грешка: неочекивани крај датотеке" + +#: parse.y:6151 +msgid "syntax error" +msgstr "садржајна грешка" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Користите „%s“ да напустите шкољку.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "неочекивани крај датотеке приликом тражења поклапајуће )" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "довршавање: нисам нашао функцију „%s“" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: могуће понављање покушаја" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: НИШТАВНА ОДРЕДБА_ДОВРШАВАЊА" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: лош спајач „%d“" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: неисправан описник датотеке" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: НИШТАВАН указивач датотеке" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: „%c“: неисправан знак записа" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "описник датотеке је ван опсега" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: нејасно преусмерење" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: не могу да препишем постојећу датотеку" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: ограничено: не могу да преусмерим излаз" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "не могу да направим привремену датотеку за документ-овде: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: не могу да доделим фд променљивој" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "„/dev/(tcp|udp)/домаћин/прикључник“ није подржано без умрежавања" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "грешка преусмерења: не могу да удвостручим фд" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "не могу да нађем „/tmp“, направите га!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "„/tmp“ мора бити исправан назив директоријума" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "режим уредног исписа је занемарен у међудејственим шкољкама" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: неисправна опција" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "не могу да подесим јиб на %d: стварни јиб %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "не могу да подесим гиб на %d: стварни гиб %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "не могу да покренем прочишћавача; режим прочишћавања је искључен" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: је директоријум" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "Немам назив!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "Гну баш, издање %s-(%s)\n" + +#: shell.c:2062 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"Употреба:\t%s [Гнуова дуга опција] [опција] ...\n" +" \t%s [Гнуова дуга опција] [опција] датотека-списа ...\n" + +#: shell.c:2064 +msgid "GNU long options:\n" +msgstr "Гнуове дуге опције:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Опције шкољке:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t„-ilrsD“ или наредба „-c“ или -O шопц_опција\t\t(призивање само)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t„-%s“ или опција „-o“\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Укуцајте „%s -c \"help set\"“ за више података о опцијама шкољке.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Укуцајте „%s -c help“ за више података о уграђеним наредбама шкољке.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Користите наредбу „bashbug“ да известите о грешкама.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Матична страница баша: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Општа помоћ коришћења Гну софтвера: \n" + +#: sig.c:765 +#, 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 "Инструкција „ABORT“" + +#: 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 +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 "Кориснички сигнал 1" + +#: siglist.c:179 +msgid "User signal 2" +msgstr "Кориснички сигнал 2" + +#: 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 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Непознат сигнал #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "лоша замена: нема затварајуће „%s“ у „%s“" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: не могу да доделим списак члану низа" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "не могу да начиним спојку за замену процеса" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "не могу да начиним пород за замену процеса" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "не могу да отворим именовану спојку „%s“ за читање" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "не могу да отворим именовану спојку „%s“ за писање" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "не могу да удвостручим именовану спојку „%s“ као фд %d" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "замена наредбе: занемарих ништавни бајт у улазу" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "не могу да начиним спојку за замену наредбе" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "не могу да начиним пород за замену наредбе" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: не могу да удвостручим спојку као фд 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: неисправан назив променљиве за упуту назива" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: неисправно посредно ширење" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: неисправан назив променљиве" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: параметар није подешен" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: параметар је ништаван или није подешен" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: израз подниске < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: лоша замена" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: не могу дадоделим на овај начин" + +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "будућа издања шкољке ће приморати процену као аритметичку замену" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "лоша замена: нема затварајућег „`“ у „%s“" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "нема поклапања: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "очекиван је аргумент" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: очекиван је израз целог броја" + +#: test.c:265 +msgid "`)' expected" +msgstr "очекивана је )" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "очекивана је ), а пронађена %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: очекиван је двочлани оператор" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: очекиван је једночлани оператор" + +#: test.c:896 +msgid "missing `]'" +msgstr "недостаје ]" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "садржајна грешка: није очекивано „%s“" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "неисправан сигнални број" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "руковалац изузетком: премашен је највећи ниво руковаоца изузецима (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: лоша вредност у „trap_list[%d]“: %p" + +#: trap.c:416 +#, c-format +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: руковалац сигналом је „SIG_DFL“, поново шаљем %d (%s) мени самом" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: лош сигнал %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "грешка увоза одреднице функције за „%s“" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "ниво шкољке (%d) је превисок, поново постављам на 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: нема садржаја функције на текућем досегу" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: вредности не може бити додељена вредност" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: не могу да наследим вредност из несагласне врсте" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: додељујем цео број упути назива" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variable: нема садржаја функције на текућем досегу" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s има ништавну ниску извоза" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "неисправан знак %d у нисци извоза за „%s“" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "нема = у нисци извоза за „%s“" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: глава променљивих шкољке није садржајност функције" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: нема садржаја општих променљивих" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: глава променљивих шкољке није привремени досег окружења" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: не могу да отворим као ДАТОТЕКУ" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: неисправна вредност за описник праћења датотеке" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: вреднсот сагласности је ван опсега" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Ауторска права © 2022. Фондација слободног софтвера, Доо." + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Дозвола ОЈЛи3+: Гнуова ОЈЛ издање 3 или касније \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "Гну баш, издање %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Ово је слободан софтвер; слободни сте да га мењате и да га расподељујете." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Нема НИКАКВЕ ГАРАНЦИЈЕ у оквирима дозвољеним законом." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: не могу да доделим %lu бајта (%lu бајта је додељено)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: не могу да доделим %lu бајта" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: не могу да доделим %lu бајта (%lu бајта је додељено)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: не могу да доделим %lu бајта" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [назив[=вредност] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] назив [назив ...]" + +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m мапа кључа] [-f датотека] [-q назив] [-u назив] [-r низ кључа] [-x низ кључа:наредба-шкољке] [низ кључа:функција-читањареда или наредба-читањареда]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [уграђеност-шкољке [аргумент ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [израз]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [дир]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [арг ...]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [назив[=вредност] ...] или declare -p [-aAfFilnrtux] [назив ...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] [-p] назив[=вредност] ... или typeset -p [-aAfFilnrtux] [назив ...]" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [опција] назив[=вредност] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [арг ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [арг ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f датотека] [назив ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [арг ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts ниска_опција назив [арг ...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a назив] [наредба [аргументи ...]] [преусмерење ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e е-назив] [-lnr] [прво] [последње] или fc -s [пут=реп] [наредба]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [одредба_посла ...]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [одредба_посла ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p путања] [-dt] [назив ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [шаблон ...]" + +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d померај] [n] или history -anrw [датотека] или history -ps arg [аргумент...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [одредба_посла ...] или jobs -x наредба [аргументи]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [одредба_посла ... | пид ...]" + +#: builtins.c:134 +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s одредба-сигнала | -n бр.сигнала | -sigspec] пиб | одредба_посла ... или kill -l [одредба_посла]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let arg [аргумент ...]" + +#: builtins.c:138 +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a низ] [-d ограничи] [-i текст] [-n н-знак] [-N н-знак] [-p упит] [-t временски рок] [-u фд] [назив ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o назив-опције] [--] [-] [арг ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [назив ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [назив[=вредност] ...] или export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [назив[=вредност] ...] или readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source датотека [аргументи]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". датотека [аргументи]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [израз]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ арг... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[арг] одредба_сигнала ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] назив [назив ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [ограничење]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [режим]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p пром] [иб ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [пиб ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for НАЗИВ [у РЕЧИМА ... ] ; do НАРЕДБЕ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( израз1; израз2; израз3 )); do НАРЕДБЕ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select НАЗИВ [у РЕЧИМА ... ;] do НАРЕДБЕ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] спојни_ред" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case РЕЧ у [ШАБЛОН [| ШАБЛОН]...) НАРЕДБЕ ;;]... esac" + +#: builtins.c:194 +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if НАРЕДБЕ; then НАРЕДБЕ; [ elif НАРЕДБЕ; then НАРЕДБЕ; ]... [ else НАРЕДБЕ; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while НАРЕДБЕ; do НАРЕДБЕ-2; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until НАРЕДБЕ; do НАРЕДБЕ-2; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [НАЗИВ] наредба [преусмерења]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function name { НАРЕДБЕ ; } или name () { НАРЕДБЕ ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ НАРЕДБЕ ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "job_spec [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( израз ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ израз ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables — Називи и значења неких променљивих шкољке" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | дир]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [називопције ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v променљива] format [аргументи]" + +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o опција] [-A радња] [-G општапутања] [-W списакречи] [-F функција] [-C наредба] [-X путањауслова] [-P префикс] [-S суфикс] [назив ...]" + +#: builtins.c:235 +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 опција] [-A радња] [-G општапутања] [-W списакречи] [-F функција] [-C наредба] [-X путањауслова] [-P префикс] [-S суфикс] [реч]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o опција] [-DEI] [назив ...]" + +#: builtins.c:242 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d раздвој] [-n број] [-O порекло] [-s број] [-t] [-u фд] [-C опозив] [-c количина] [низ]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d гранич] [-n број] [-O порекло] [-s број] [-t] [-u фд] [-C опозив] [-c количина] [низ]" + +#: builtins.c:256 +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" +" \n" +" Без аргумената, „alias“ исписује списак псеудонима у поново\n" +" употрбљивом облику „alias НАЗИВ=ВРЕДНОСТ“ на стандардном излазу.\n" +" \n" +" У супротном, псеудоним се одређује за сваки НАЗИВ чија ВРЕДНОСТ је дата.\n" +" Претходећи размак у ВРЕДНОСТИ доводи до тога да следећа реч бива\n" +" проверена за заменом псеудонима када је псеудоним раширен.\n" +" \n" +" Опције:\n" +" -p\tисписује све одређене псеудониме у поново употребљивом облику\n" +" \n" +" Излазно стање:\n" +" „alias“ даје тачност осим ако је достављен НАЗИВ за који ниједан\n" +" псеудоним није одређен." + +#: builtins.c:278 +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" +" \n" +" Опције:\n" +" -a\tуклања све одреднице псеудонима\n" +" \n" +" Резултат је успешан осим ако НАЗИВ није постојећи псеудоним." + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Подешава свезе тастера читања реда и променљиве.\n" +" \n" +" Повезује низ тастера ка функцији читања реда или макроу, или подешава\n" +" променљиву читања реда. Синтакса не-опционог аргумента је иста као и\n" +" она која се налази у „~/.inputrc“, али мора бити прослеђена као један\n" +" аргумент: нпр., bind „\"\\C-x\\C-r\": re-read-init-file“.\n" +" \n" +" Опције:\n" +" -m мапа тастера Користи МАПУ_ТАСТЕРА као мапу тастера за трајање ове\n" +" наредбе. Прихватљиви називи мапе тастера су: „emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,\n" +" vi-command, и vi-insert“.\n" +" -l Исписује називе функција.\n" +" -P Исписује називе функција и свезе.\n" +" -p Испсиује функције и свезе у облику који може бити поново\n" +" коришћен као улаз.\n" +" -S Исписује низове тастера који призивају макрое и њихове вредности\n" +" -s Исписује низове тастера који призивају макрое и њихове вредности\n" +" у облику који може бити поново коришћен као улаз.\n" +" -V Исписује називе и вредности променљивих\n" +" -v Исписује називе и вредности променљивих у облику који може бити\n" +" поново коришћен као улаз.\n" +" -q назив-функције Пропитује о томе који тастери призивају именовану функцију.\n" +" -u назив-функције Развезује све тастере који су привезани за именовану функцију.\n" +" -r низ тастера Укалања свезу за НИЗ_ТАСТЕРА.\n" +" -f назив датотеке Чита свезе тастера из НАЗИВА_ДАТОТЕКЕ.\n" +" -x низ_тастера:наредба-шкољке Доводи до извршавања НАРЕДБЕ-ШКОЉКЕ приликом уноса\n" +" \t\t\t НИЗА_ТАСТЕРА.\n" +" -X Исписује свезе низова тастера са -x и придружене наредбе у облику\n" +" који може бити поново коришћен као улаз.\n" +" \n" +" Излазно стање:\n" +" „bind“ даје 0 осим ако није дата непозната опција или ако не дође до грешке." + +#: builtins.c:330 +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" +" Излази из петље FOR, WHILE или UNTIL. Ако је наведено N, слама N затварајућих\n" +" петљи.\n" +" \n" +" Излазно стање:\n" +" Излазно стање је 0 осим ако N није веће или једнако 1." + +#: builtins.c:342 +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" +" Наставља следеће понављање затварајуће петље FOR, WHILE или UNTIL.\n" +" Ако је наведено N, наставља од N-те затварајуће петље.\n" +" \n" +" Излазно стање:\n" +" Излазно стање је 0 осим ако N није веће или једнако 1." + +#: builtins.c:354 +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 "" +"Извршава уграђености шкољке.\n" +" \n" +" Извршава УГРАЂЕНОСТ-ШКОЉКЕ са аргументима АРГ-и без обављања тражења\n" +" наредбе. Ово је корисно када желите поново да примените уграђеност\n" +" шкољке као функцију шкољке, али морате да извршите уграђеност у функцији.\n" +" \n" +" Излазно стање:\n" +" Даје излазно стање УГРАЂЕНОСТИ-ШКОЉКЕ, или нетачност ако УГРАЂЕНОСТ-ШКОЉКЕ\n" +" није уграђеност шкољке." + +#: builtins.c:369 +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" +" Без ИЗРАЗА, даје „$ред $назив_датотеке“. Са ИЗРАЗОМ, даје\n" +" „$ред $подрутина $назив_датотеке“; овај додатни податак може бити\n" +" коришћен за обезбеђивање праћења спремника.\n" +" \n" +" Вредност ИЗРАЗА показује колико кадрова позива да се иде уназад пре\n" +" текућег; први кадар је кадар 0.\n" +" \n" +" Излазно стање:\n" +" Даје 0 осим ако шкољка не извршава функцију шкољке или ИЗРАЗ\n" +" није исправан." + +#: builtins.c:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Мења радни директоријум шкољке.\n" +" \n" +" Мења текући директоријум у ДИР. Основни ДИР је вредност променљиве\n" +" шкољке „ЛИЧНО“.\n" +" \n" +" Променљива „ЦДПУТАЊА“ одређује путању претраге за директоријум који садржи\n" +" ДИР. Заменски називи директоријума у ЦДПУТАЊИ су раздвојени двотачком (:).\n" +" Назив ништавног директоријума је исти као текући директоријум. Ако ДИР почиње\n" +" косом цртом (/), тада се ЦДПУТАЊА не користи.\n" +" \n" +" Ако се не нађе директоријум, а опција шкољке „cdable_vars“ је подешена,\n" +" сматра се да је реч назив променљиве. Ако та променљива има вредност,\n" +" њена вредност се користи за ДИР.\n" +" \n" +" Опције:\n" +" -L\tприморава праћење симболичких веза: решава симболичке везе у\n" +" ДИР-у након обраде примерака „..“\n" +" -P\tкористи физичку структуру директоријума без праћења симболичких\n" +" веза: решава симболичке везе у ДИР-у пре обраде3 примерака „..“\n" +" -e\tако је достављена опција „-P“, а текући радни директоријум не\n" +" може бити успешно одређен, излази са не-нултим стањем\n" +" -@ на системима који подржавају, представља датотеку са проширеним\n" +" особинама као директоријум који садржи особине датотеке\n" +" \n" +" Основно је да прати симболичке везе, као да је наведено „-L“.\n" +" „..“ се обрађује уклањањем претходног састојка назива путање назад на\n" +" косу цтрицу или на почетак ДИР-а.\n" +" \n" +" Излазно стање:\n" +" Даје 0 ако је директоријум измењен, и ако је $PWD успешно подешено када је\n" +" коришћено „-P“; у супротном вредност различиту од нуле." + +#: builtins.c:425 +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" +" \t\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 "" +"Исписује назив текућег радног директоријума.\n" +" \n" +" Опције:\n" +" -L\tисписује вредност наредбе $PWD ако именује текући радни\n" +" директоријум\n" +" -P\tисписује физички директоријум, без симболичких веза\n" +" \n" +" По основи, „pwd“ се понаша као да је наведено „-L“.\n" +" \n" +" Излазно стање:\n" +" Даје 0 осим ако није дата неисправна опција или текући директоријум\n" +" не може бити прочитан." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Ништавна наредба.\n" +" \n" +" Нема дејства; наредба не ради ништа.\n" +" \n" +" Излазно стање:\n" +" Увек успешна." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Даје успешан резултат.\n" +" \n" +" Излазно стање:\n" +" Увек успешно." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Даје неуспешан резултат.\n" +" \n" +" Излазно стање:\n" +" Увек неуспешно." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Извршава једноставну наредбу или приказује податке о наредбама.\n" +" \n" +" Покреће НАРЕДБУ са АРГУМЕНТИМА потискујући тражење функције шкољке, или\n" +" приказује податке о наведеним НАРЕДБАМА. Може да се користи за позивање\n" +" наредби на диску када постоји функција са истим називом.\n" +" \n" +" Опције:\n" +" -p користи основну вредност за ПУТАЊУ којом се осигурава налажење\n" +" свих стандардних помагала\n" +" -v исписује опис НАРЕДБЕ слично уграђености „type“\n" +" -V исписује опширнији опис сваке НАРЕДБЕ\n" +" \n" +" Излазно стање:\n" +" Даје излазно стање НАРЕДБЕ, или неуспех ако се НАРЕДБА не пронађе." + +#: builtins.c:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Подешава вредности и особине променљиве.\n" +" \n" +" Објављује променљиве и даје им особине. Ако нису дати НАЗИВИ,\n" +" приказује особине и вредности свих променљивих.\n" +" \n" +" Опције:\n" +" -f\tограничава радњу или приказ називима и одредницама функције\n" +" -F\tограничава приказ само називима функција (плус број реда и\n" +" изворну датотеку приликом прочишћавања)\n" +" -g\tствара опште променљиве када се користи у функцији шкољке;\n" +" у супротном се занемарује\n" +" -I\tако ствара локалну променљиву, наслеђује атрибуте и вредност\n" +" променљиве са истим називом на претходном досегу\n" +" -p\tприказује особине и вредност сваког НАЗИВА\n" +" \n" +" Опције које подешавају особине:\n" +" -a\tда учини НАЗИВЕ пописаним низовима (ако је подржано)\n" +" -A\tда учини НАЗИВЕ придруживим низовима (ако је подржано)\n" +" -i\tда учини да НАЗИВИ имају особину „integer“ (целог броја)\n" +" -l\tда претвори вредност сваког НАЗИВА у мала слова при додели\n" +" -n\tчини НАЗИВ упутом ка променљивој именованој својом вредношћу\n" +" -r\tда учини НАЗИВЕ само за читање\n" +" -t\tда учини да НАЗИВИ имају особину „trace“ (прати)\n" +" -u\tда претвори вредност сваког НАЗИВА у велика слова при додели\n" +" -x\tда уради извоз НАЗИВА\n" +" \n" +" Употреба + уместо - искључује дату особину.\n" +" \n" +" Променљиве са особином целог броја имају аритметичку процену (видите\n" +" наредбу „let“) обављену када се променљивој додели вредност.\n" +" \n" +" Када се користи у функцији, „declare“ чини НАЗИВЕ месним, као наредбом\n" +" „local“. Опција „-g“ потискује ово понашање.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако\n" +" не дође до грешке доделе променљиве." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Подешава вредности и атрибуте променљиве.\n" +" \n" +" Синоним за „declare“. Погледајте „help declare“." + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Одређује месне променљиве.\n" +" \n" +" Ствара месну променљиву звану НАЗИВ, и даје јој ВРЕДНОСТ. ОПЦИЈА може\n" +" бити свака опција коју прихвати „declare“.\n" +" \n" +" Месне променљиве могу бити коришћене једино у функцији; виде их једино\n" +" функције у којима су одређене и уњиховим породима.\n" +" \n" +" Излазно стање:\n" +" Резултат је позитиван осим ако се не достави неисправна опција, ако не дође\n" +" до грешке додељивања променљиве, или ако шкољка не извршава функцију." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Пише аргументе на стандардни излаз.\n" +" \n" +" Приказује АРГ-те, раздвојене једним знаком размака и праћене\n" +" новим редом, на стандардном излазу.\n" +" \n" +" Опције:\n" +" -n\tне прикачиње нови ред\n" +" -e\tукључује тумачење пратећих контра косих црта новог реда\n" +" -E\tизричито потискује тумачење контра косих црта новог реда\n" +" \n" +" „echo“ тумачи пратеће знаке контра косе црте новог реда:\n" +" \\a\tупозорење (звонце)\n" +" \\b\tповратница\n" +" \\c\tпотискује будући излаз\n" +" \\e\tзнак новог реда\n" +" \\E\tзнак новог реда\n" +" \\f\tдовод обрасца\n" +" \\n\tнови ред\n" +" \\r\tповратак носача\n" +" \\t\tводоравни табулатор\n" +" \\v\tусправни табулатор\n" +" \\\\\tконтра коса црта\n" +" \\0nnn\tзнак чији АСКРИ код јесте „NNN“ (октално). „NNN“ може бити од\n" +" \t 0 до 3 окталне цифре\n" +" \\xHH\tосмобитни знак чија вредност јесте „HH“ (хексадецимално). „HH“\n" +" може бити једна или две хексадецималне цифре\n" +" \\uHHHH\tзнак Јуникода чија вредност јесте хексадецимална вредност „HHHH“.\n" +" \t\t„HHHH“ може имати једну до четири хексадецималне цифре.\n" +" \\UHHHHHHHH знак Јуникода чија вредност јесте хексадецимална вредност\n" +" \t\t„HHHHHHHH“. „HHHHHHHH“ може бити једна од осам хексадецималних цифара.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако не дође до грешке писања." + +#: builtins.c:597 +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 "" +"Записује аргументе на стандардни излаз.\n" +" \n" +" Приказује АРГ-те на стандардном излазу за којима следи нови ред.\n" +" \n" +" Опције:\n" +" -n\tне придодаје нови ред\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако не дође до грешке писања." + +#: builtins.c:612 +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 "" +"Укључује и искључује уграђености шкољке.\n" +" \n" +" Укључује и искључује уграђене наредбе шкољке. Искључивање вам омогућава\n" +" да извршите наредбу диска која носи исти назив као уграђеност шкољке\n" +" без коришћења пуне путање.\n" +" \n" +" Опције:\n" +" -a\tисписује списак уграђености приказујући да ли је свака укључена\n" +" -n\tискључује сваки НАЗИВ или приказује списак искључених уграђености\n" +" -p\tисписује списак уграђености у поново користивом облику\n" +" -s\tисписује само називе Посиксових „посебних“ уграђености\n" +" \n" +" Опције које управљају динамичним учитавањем:\n" +" -f\tУчитава уграђеност НАЗИВА из дељеног објекта НАЗИВ_ДАТОТЕКЕ\n" +" -d\tУклања уграђеност учитану помоћу „-f“\n" +" \n" +" Без опција, сваки НАЗИВ је укључен.\n" +" \n" +" Да користите „test“ пронађен у $ПУТАЊИ уместо издања уграђености\n" +" шкољке, укуцајте „enable -n test“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако НАЗИВ није уграђеност шкољке или ако не дође до грешке." + +#: builtins.c:640 +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 "" +"Извршава аргументе као наредбе шкољке.\n" +" \n" +" Обједињује АРГ-те у једну ниску, користи резултат као улаз шкољке,\n" +" и извршава резултирајуће наредбе.\n" +" \n" +" Излазно стање:\n" +" Даје излазно стање наредбе или успех ако је наредба ништавна." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Обрађује аргументе опције.\n" +" \n" +" „Getopts“ се користи поступцима шкољке за обраду положајних параметара\n" +" као опција.\n" +" \n" +" „OPTSTRING“ сдаржи слова опције зарад препознавања; ако након слова\n" +" долази двотачка, очекује се да опција има аргумент, који од њега треба\n" +" да буде раздвојен празнином.\n" +" \n" +" Након сваког призивања, „добави_опцију“ ће поставити следећу опцију у\n" +" $називу променљиве шкољке, покрећући назив ако не постоји, и индекс\n" +" следећег аргумента зарад обраде у променљиве шкољке ОПЦИНД. ОПЦИНД\n" +" се покреће на 1 сваки пут када се призове шкољка или спис шкољке.\n" +" Када опција захтева аргумент, „добави_опцију“ поставља тај аргумент\n" +" у променљиву шкољке ОПЦАРГ.\n" +" \n" +" „добави_опцију“ извештава о грешкама на један од два начина. Ако је\n" +" први знак ОПЦНИСКЕ двотачка, „добави_опцију користи нечујно извештавање\n" +" о грешци. У овом режиму, поруке о грешкама се не исписују. Ако је\n" +" виђена неисправна опција, поставља знак опцијепронађен у ОПЦАРГ-у. Ако\n" +" захтевани аргумент није нађен, поставља двотачку „:“ у НАЗИВ и подешава\n" +" ОПЦАРГ на нађени знак опције. Ако „добави_опцију“ није у нечујном режиму,\n" +" а виђена је неисправна опција, онда поставља знак питања „?“ у НАЗИВ и\n" +" расподешава ОПЦАРГ. Ако није пронађен захтевани аргумент, питање „?“ се\n" +" поставља у НАЗИВУ, ОПЦАРГ се расподешава, а исписује се порука о дијагнози.\n" +" \n" +" Ако променљива шкољке ОПЦГРЕШКА има вредност 0, „добави_опцију“ искључује\n" +" исписивање порука о грешкама, чак и ако први знак ОПЦНИСКЕ није двотачка.\n" +" ОПЦГРЕШКА има вредност 1 по основи.\n" +" \n" +" „Добави_опцију“ обично обрађује положајне параметре, али ако су аргументи\n" +" достављени као АРГ вредности, онда се они обрађују.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако је пронађена опција; неуспех ако се наиђе на\n" +" крај опције или ако не дође до грешке." + +#: builtins.c:694 +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Замењује шкољку датом наредбом.\n" +" \n" +" Извршава НАРЕДБУ, замењујући ову шкољку наведеним програмом. АРГУМЕНТИ\n" +" постају аргументи НАРЕДБЕ. Ако није наведена НАРЕДБА, свако преусмеравање\n" +" има дејства у текућој шкољци.\n" +" \n" +" Опције:\n" +" -a назив прослеђује НАЗИВ као нулти аргумент НАРЕДБЕ\n" +" -c\t\tизвршава НАРЕДБУ са празним окружењем\n" +" -l\t\tпоставља цртицу у нултом аргументу НАРЕДБЕ\n" +" \n" +" Ако наредба не може бити извршена, постоји не-међудејствена шкољка, осим\n" +" ако није подешена опција шкољке „execfail“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако НАРЕДБА није нађена или ако не дође до грешке преусмеравања." + +#: builtins.c:715 +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. Ако је N изостављено, излазно стање\n" +" је оно последње извршене наредбе." + +#: builtins.c:724 +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 "" +"Напушта шкољку пријављивања.\n" +" \n" +" Напушта шкољку пријављивања са излазним стањем N. Даје грешку ако није извршено\n" +" у шкољци пријављивања." + +#: builtins.c:734 +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" +" \n" +" „fc“ се користи за исписивање или уређивање и за поновно извршавање наредби\n" +" са списка историјата. ПРВИ и ПОСЛЕДЊИ могу бити бројеви који наводе опсег,\n" +" или ПРВИ може бити ниска, што значи да најсвежија наредба почиње том ниском.\n" +" \n" +" Опције:\n" +" -e ЕНАЗИВ\t бира уређивача за коришћење. Основно је „FCEDIT“, затим „EDITOR“,\n" +" \t\t затим „vi“\n" +" -l \t прави списак редова уместо да уређује\n" +" -n\t изоставља бројеве редова приликом стварања списка\n" +" -r\t преокреће редослед редова (новије поставља као прве)\n" +" \n" +" Са записом „fc -s [пат=реп ...] [наредба]“, НАРЕДБА се поново\n" +" извршава након обављене замене СТАРО=НОВО.\n" +" \n" +" Користан псеудоним за коришћење с овим је „r='fc -s'“, тако да „r cc“\n" +" покреће последњу наредбу која почиње са „cc“ а „r“ поново извршава\n" +" последњу наредбу.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат или стање извршене наредбе; не-нулу ако дође до грешке." + +#: builtins.c:764 +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" +" \n" +" Поставља посао одређен са „JOB_SPEC“ у први план, учинивши га текућим\n" +" послом. Ако „JOB_SPEC“ није присутно, користи се шкољкино поимање\n" +" текућег посла.\n" +" \n" +" Излазно стање:\n" +" Стање наредбе постављене у први план, или неуспех ако дође до грешке." + +#: builtins.c:779 +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" +" \n" +" Поставља посао одређен сваком „JOB_SPEC“ у позадину, као да су покренути\n" +" са &. Ако „JOB_SPEC“ није присутно, користи се шкољкино поимање\n" +" текућег посла.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није укључено управљање послом или ако не дође до грешке." + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Памти или приказује места програма.\n" +" \n" +" Одређује и памти пуну путању сваког НАЗИВА наредбе. Ако нису\n" +" дати аргументи, приказује се податак о упамћеним наредбама.\n" +" \n" +" Опције:\n" +" -d\tзаборавља запамћено место сваког НАЗИВА\n" +" -l\tприказује у облику који може бити поново коришћен као улаз\n" +" -p путања користи ПУТАЊУ као пуну путању НАЗИВА\n" +" -r\tзаборавља сва запамћена места\n" +" -t\tисписује запамћено место сваког НАЗИВА, постављајући\n" +" \t\tодговарајући НАЗИВ испред сваког места ако је дато\n" +" \t\tвише НАЗИВА\n" +" Аргументи:\n" +" НАЗИВ\tСваки НАЗИВ се тражи у $ПУТАЊИ и додаје на списак\n" +" \t\tзапамћених наредби.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се НАЗИВ не нађе или ако је дата неисправна опција." + +#: builtins.c:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is given." +msgstr "" +"Приказује податке о уграђеним наредбама.\n" +" \n" +" Приказује кратке сажетке уграђених наредби. Ако је наведен\n" +" ШАБЛОН, даје опширну помоћ свих наредби које одговарају ШАБЛОНУ,\n" +" у супротном исписује се списак тема помоћи.\n" +" \n" +" Опције:\n" +" -d\tисписује кратак опис за сваку тему\n" +" -m\tприказује коришћење у запису квази странице упутства\n" +" -s\tисписује само кртак сиже употребе за сваку тему која\n" +" \t одговара ШАБЛОНУ\n" +" \n" +" Аргументи:\n" +" ШАБЛОН\tШаблон који наводи тему помоћи\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако ШАБЛОН није пронађен или ако је дата неисправна опција." + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 исписује само последња N уноса.\n" +" \n" +" Опције:\n" +" -c\t чисти списак историјата бришући све уносе\n" +" -d померај брише унос историјата на померају ПОМЕРАЈ.\n" +" \n" +" -a\t додаје редове историјата из ове сесије у датотеку историјата\n" +" -n\t чита све редове историјата који нису прочитани из датотеке историјата\n" +" \t\tи додаје их на списак историјата\n" +" -r\t чита датотеку историјата и додаје садржај на списак историјата\n" +" -w\t пише текући историјат у датотеку историјата\n" +" \n" +" -p\t обавља ширење историјата на сваком АРГ-у и приказује резултат\n" +" \t без смештања на списак историјата\n" +" -s\t додаје АРГ-те на списак историјата као један унос\n" +" \n" +" Ако је дата ДАТОТЕКА, користи се као датотека историјата. У супротном,\n" +" ако ДАТОТЕКА_ИСТОРИЈАТА има вредност, она се користи, другачије „~/.bash_history“.\n" +" \n" +" Ако је променљива ЗАПИСВРЕМЕНАИСТОРИЈАТА подешена и није ништавна, користи се\n" +" њена вредност као ниска записа за „strftime(3)“ да исписше временску ознаку придружену\n" +" сваком приказаном уносу историјата. У супротном временске ознаке се не исписују.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не дође до грешке." + +#: builtins.c:879 +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\tlists only processes that have changed status since the last\n" +" \t\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" +" \n" +" Исписује радне послове. ОДРЕДБАПОСЛА ограничава излаз на тај посао.\n" +" Без опција, стање свих радних послова је приказано.\n" +" \n" +" Опције:\n" +" -l\tисписује ИБ-ове процеса као додатак обичним подацима\n" +" -n\tисписује само процесе који су променили стање од последњег\n" +" \t обавештавања\n" +" -p\tисписује само ИБ-ове процеса\n" +" -r\tограничава излаз на покренуте послове\n" +" -s\tограничава излаз на заустављене послове\n" +" \n" +" Ако је достављено „-x“, НАРЕДБА се покреће након што се све одредбе посла које\n" +" се јављају у АРГУМЕНТИМА замене ИБ-ом процеса тог вође групе процеса посла.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не дође до грешке.\n" +" Ако се користи „-x“, даје излазно стање НАРЕДБЕ." + +#: builtins.c:906 +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" +" \t\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 "" +"Уклања послове из текуће шкољке.\n" +" \n" +" Уклања сваки аргумент ОДРЕДБЕПОСЛА из табеле радних послова. Без\n" +" ОДРЕДБИПОСЛА, шкољка користи своје тумачење текућег посла.\n" +" \n" +" Опције:\n" +" -a\tуклања све послове ако није достављена ОДРЕДБАПОСЛА\n" +" -h\tозначава сваку ОДРЕДБУПОСЛА тако да СИГНАЛГОРЕ није послат послу ако\n" +" \t шкољка прими СИГНАЛГОРЕ\n" +" -r\tуклања само покренуте послове\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ОДРЕДБАПОСЛА." + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"Шаље сигнал послу.\n" +" \n" +" Шаље процесима препознатих ПИБ-ом или ОДРЕДБОМПОСЛА сигнал именован\n" +" ОДРЕДБОМСИГНАЛА или БРОЈЕМСИГНАЛА. Ако није присутно ни ОДРЕДБА_СИГНАЛА\n" +" ни БРОЈ_СИГНАЛА, подразумева се ТЕРМ_СИГНАЛА.\n" +" \n" +" Опције:\n" +" -s сиг\tСИГ је назив сигнала\n" +" -n сиг\tСИГ је број сигнала\n" +" -l\tисписује називе сигнала; ако аргументи прате „-l“ подразумева\n" +" \t се да су бројеви сигнала за које називи требају бити исписани\n" +" -L\tсиноним за „-l“\n" +" \n" +" „Kill“ је уграђеност шкољке из два разлога: омогућава да ИБ-ови послова буду\n" +" коришћени уместо ИБ-ова процеса, и омогућава убијање процеса ако је достигнуто\n" +" ограничење процеса које можете да направите.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не дође до грешке." + +#: builtins.c:949 +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" +" Процењује сваки АРГ као аритметички израз. Процењивање се ради у\n" +" целим бројевима сталне ширине без провере за прекорачењем, тако да се\n" +" дељење нулом хвата и означава као грешка. Следећи списак оператора је\n" +" груписан у нивое оператора једнаког првенства. Нивои су исписани према\n" +" поретку растућег првенства.\n" +" \n" +" \tid++, id--\tпроменљива пост-увећања, пост-умањења\n" +" \t++id, --id\tпроменљива пре-увећања, пре-умањења\n" +" \t-, +\t\tједночлани минус, плус\n" +" \t!, ~\t\tлогичка и битска негација\n" +" \t**\t\tстепеновање\n" +" \t*, /, %\t\tмножење, дељење, остатак\n" +" \t+, -\t\tсабирање, одузимање\n" +" \t<<, >>\t\tлеви и десни битски помаци\n" +" \t<=, >=, <, >\tпоређење\n" +" \t==, !=\t\tједнакост, неједнакост\n" +" \t&\t\tбитско И\n" +" \t^\t\tбитско ИСКЉУЧИВО ИЛИ\n" +" \t|\t\tбитско ИЛИ\n" +" \t&&\t\tлогичко И\n" +" \t||\t\tлогичко ИЛИ\n" +" \texpr ? expr : expr\n" +" \t\t\tусловни оператор\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tдодела\n" +" \n" +" Променљиве шкољке су дозвољене као операнди. Назив променљиве\n" +" се замењује њеном вредношћу (присиљеном на цео број сталне ширине)\n" +" у изразу. Променљива не мора да има укључен атрибут целог броја\n" +" да би била коришћена у изразу.\n" +" \n" +" Оператори се процењују према првенству. Под-изрази у заградама\n" +" се први процењују и могу да препишу горња правила првенства.\n" +" \n" +" Излазно стање:\n" +" Ако се последњи АРГ процени на 0, исписује 1; у супротном даје 0." + +#: builtins.c:994 +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. By default, the backslash character escapes delimiter characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Чита ред са стандардног улаза и дели га на поља.\n" +" \n" +" Чита један ред са стандардног улаза, или из описника датотеке ФД\n" +" ако је достављена опција „-u“. Ред је подељен на поља као при дељењу\n" +" речи, а прва реч се додељује првом НАЗИВУ, друга реч другом НАЗИВУ,\n" +" и тако редом, са сваком наредном речју додељеном последњем НАЗИВУ.\n" +" Само знаци пронађени у „$IFS“ се признају за граничнике речи. По основи,\n" +" знак контра косе црте мења значење знакова граничника и новог реда.\n" +" \n" +" Ако нису достављени НАЗИВИ, читани ред је смештен у променљивој ОДГОВОР.\n" +" \n" +" Опције:\n" +" -a низ\t додељује читање речи секвенцијалним индексима променљиве\n" +" \t\t низа НИЗ, почевши од нуле\n" +" -d гран\t наставља све док се не прочита први знак ГРАНИЧНИКА,\n" +" \t\t радије него нови ред\n" +" -e\t користи читање реда да добије ред у међудејственој шкољци\n" +" -i текст\t користи ТЕКСТ као почетни текст за читање реда\n" +" -n n-знака даје резултат након читања знакова N-ЗНАКОВА радије него да\n" +" \t\t чека на нови ред, али поштује граничника ако је прочитано\n" +" \t\t мање знакова од N-ЗНАКОВА пре граничника\n" +" -N n-знака даје резултат само након читања тачно знакова N-ЗНАКОВА, осим\n" +" \t\t ако не наиђе на крај датотеке или ако не истекне време читања,\n" +" занемарујући све граничнике\n" +" -p упит\t исписује ниску УПИТ без пратећег новог реда пре покушаја читања\n" +" -r\t не дозвољава контра косим цртама да преломе ниједан од знакова\n" +" -s\t не оглашава улаз који долази са терминала\n" +" -t истек\t неуспех временског рока и давања резултата ако читав ред улаза\n" +" \t\t није прочитан за време од ВРЕМЕ_РОК секунде. Вредност променљиве\n" +" \t\t ВИСТЕКА је основни временски рок. ВРЕМЕНСКИ_РОК може бити разломак.\n" +" \t\t Ако је ВРЕМЕНСКИ_РОК 0, читање даје резултат одмах, без покушаја\n" +" \t\t читања некох података, дајући позитиван резултат само ако је улаз\n" +" \t\t доступан на наведеном описнику датотеке. Излазно стање је веће\n" +" \t\t од 128 ако је временски рок прекорачен\n" +" -u фд\t чита из описника датотеке ФД уместо са стандардног улаза\n" +" \n" +" Излазно стање:\n" +" Резултат је нула, осим ако се не наиђе на крај датотеке, не истекне време\n" +" читања (у том случају је већи од 128), ако не дође до грешке доделе променљиве,\n" +" или ако се не достави неисправан описник датотеке као аргумент опције „-u“." + +#: builtins.c:1042 +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" +" \n" +" Доводи до тога да функција или изворни спис изађу са вредношћу\n" +" коју наводи N. Ако је N изостављено, стање резултата је оно\n" +" последње извршене наредбе унутар функције или списа.\n" +" \n" +" Излазно стање:\n" +" Даје N, или неуспех ако шкољка не извршава функцију или спис." + +#: builtins.c:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"Подешава или расподешава вредности опција шкољке и положајних параметара.\n" +" \n" +" Мења вредност особина шкољке и положајних параметара, или\n" +" приказује називе и вредности променљивих шкољке.\n" +" \n" +" Опције:\n" +" -a Означава променљиве које су измењене или направљене за извоз.\n" +" -b Одмах обавештава о окнчавању посла.\n" +" -e Одмах излази ако наредба постоји са не-нултим стањем.\n" +" -f Искључује стварање назива датотеке (уопштавање).\n" +" -h Памти место наредби као што су тражене.\n" +" -k Сви аргументи додељивања се постављају у окружењу за\n" +" наредбу, не само они који претходе називу наредбе.\n" +" -m Управљање послом је укључено.\n" +" -n Чита наредбе али их не извршава.\n" +" -o назив-опције\n" +" Подешава променљиву према називу-опције:\n" +" allexport исто као -a\n" +" braceexpand исто као -B\n" +" emacs користи сучеље уређивања реда у стилу емакса\n" +" errexit исто као -e\n" +" errtrace исто као -E\n" +" functrace исто као -T\n" +" hashall исто као -h\n" +" histexpand исто као -H\n" +" history укључује историјат наредбе\n" +" ignoreeof шкољка неће изаћи док читање међудејствених\n" +" напомена краја датотеке допушта напоменама\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" +" за прекид са не-нултим стањем, или са нулом ако ниједна\n" +" наредба није завршила са не-нултим стањем\n" +" posix мења понашање баша где се основна радња разликује\n" +" од стандарда Посикса да би одговарала стандарду\n" +" privileged исто као -p\n" +" verbose исто као -v\n" +" vi користи сучеље уређивања реда у стилу вија\n" +" xtrace исто као -x\n" +" -p Укључено кад год се ибови стварног и ефективног корисника не подударају.\n" +" Искључује обраду датотеке „$ENV“ и увоз функција шкољке. Искључивање ове\n" +" опције доводи до тога да ефективни јиб и гиб буду подешени на стварни\n" +" јиб и гиб.\n" +" -t Излази након читања и извршавања једне наредбе.\n" +" -u Сматра променљиве расподешавања за грешку приликом замењивања.\n" +" -v Исписује редове улаза шкољке како бивају читани.\n" +" -x Исписује наредбе и њихове аргументе како бивају извршени.\n" +" -B шкољка ће обавити ширење заграде\n" +" -C Ако је подешено, онемогућава преписивање постојећих редовних\n" +" датотека преусмеравањем излаза.\n" +" -E Ако је подешено, хватање ГРЕШКЕ се наслеђује функцијама шкољке.\n" +" -H Укључује замену историјата у стилу !. Ова опција је укључена\n" +" по основи када је шкољка међудејствена.\n" +" -P Ако је подешено, не решава симболичке везе приликом извршавања\n" +" наредби као што је „cd“ која мења текући директоријум.\n" +" -T Ако је подешено, хватања ПРОЧИШЋАВАЊА и РЕЗУЛТАТА се наслеђују функцијама шкољке.\n" +" -- Додељује све преостале аргументе положајним параметрима.\n" +" Ако нема преосталих аргумената, положајни параметри се\n" +" расподешавају.\n" +" - Додељује све преостале аргументе положајним параметрима.\n" +" Опције „-x“ и „-v“ су искључене.\n" +" \n" +" Коришћење + радије него - доводи до искључивања ових опција. Опције\n" +" могу такође бити коришћене над призивањем шкољке. Текући скуп опција\n" +" може бити пронађен у $-. Преосталих n АРГ-та јесу положајни параметри\n" +" и додељени су, по реду, $1, $2, .. $n. Ако нису дати АРГументи, све\n" +" променљиве шкољке се исписују.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција." + +#: builtins.c:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Расподешава вредности и особине променљивих и функција шкољке.\n" +" \n" +" За сваки НАЗИВ, уклања одговарајућу променљиву или функцију.\n" +" \n" +" Опције:\n" +" -f\tсматра сваки НАЗИВ као функцију шкољке\n" +" -v\tсматра сваки НАЗИВ као променљиву шкољке\n" +" -n\tсматра сваки НАЗИВ као упуту назива и расподешава\n" +" \t саму променљиву радије него упуте променљиве\n" +" \n" +" Без опција, „unset“ прво покушава да расподеси променљиву, а ако то не успе,\n" +" покушава да расподеси функцију.\n" +" \n" +" Неке променљиве не могу бити расподешене; видите такође „readonly“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако је НАЗИВ само за читање." + +#: builtins.c:1162 +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 "" +"Подешава особину извоза за променљиве шкољке.\n" +" \n" +" Означава сваки НАЗИВ за самосталан извоз у окружење накнадно извршених\n" +" наредби. Ако је достављена ВРЕДНОСТ, додељује ВРЕДНОСТ пре извоза.\n" +" \n" +" Опције:\n" +" -f\tупућује на функције шкољке\n" +" -n\tуклања својство извоза из сваког НАЗИВА\n" +" -p\tприказује списак свих извезених променљивих и функција\n" +" \n" +" Аргумент „--“ искључује даљу обраду опције.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако је дата неисправна опција или је НАЗИВ неисправан." + +#: builtins.c:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Означава променљиве шкољке непроменљивим.\n" +" \n" +" Означава сваки НАЗИВ као само за читање; вредности тих НАЗИВА не могу бити\n" +" измењене подсеквенционалним додељивањем. Ако је достављена ВРЕДНОСТ, додељује\n" +" ВРЕДНОСТ пре него ли јеозначи само за читање.\n" +" \n" +" Опције:\n" +" -a\tупућује на променљиве пописивог низа\n" +" -A\tупућује на променљиве придруживог низа\n" +" -f\tупућује на функције шкољке\n" +" -p\tприказује списак свих променљивих и функција само за читање, зависно\n" +" од тога да ли је опција „-f“ дата или није\n" +" \n" +" Аргумент „--“ искључује даље обрађивање опције.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако је НАЗИВ неисправан." + +#: builtins.c:1203 +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 "" +"Помера параметре положаја.\n" +" \n" +" Преименује параметре положаја $N+1,$N+2 ... у $1,$2 ... Ако N није\n" +" дато, подразумева се да је 1.\n" +" \n" +" Излазно стање:\n" +" Резултати су успешни осим ако N није негативно иливеће од $#." + +#: builtins.c:1215 builtins.c:1230 +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" +" \n" +" Чита и извршава наредбе из ДАТОТЕКЕ у текућој шкољци. Уноси у\n" +" $ПУТАЊИ се користе за налажење директоријума који садржи ДАТОТЕКУ.\n" +" Ако је достављен неки од АРГУМЕНТАТА, постају параметри положаја\n" +" приликом извршавања ДАТОТЕКЕ.\n" +" \n" +" Излазно стање:\n" +" Даје стање последње извршене наредбе у ДАТОТЕЦИ; не успева\n" +" ако назив ДАТОТЕКЕ не може бити прочитан." + +#: builtins.c:1246 +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 "" +"Обуставља извршавање шкољке.\n" +" \n" +" Обуставља извршавање ове шкољке све док не прими сигнал БРОЈ_СИГНАЛА.\n" +" Осим ако нису присиљене, шкољке пријављивања не могу бити обустављене.\n" +" \n" +" Опције:\n" +" -f\tприморава обустављање, чак и ако је шкољка пријављивања\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није укључено управљање послом или ако не дође до грешке." + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Процењује условни израз.\n" +" \n" +" Излази са стањем 0 (тачно) или 1 (нетачно) у зависности од\n" +" процене ИЗРАЗА. Изрази могу бити једночлани или двочлани. Једночлани\n" +" изрази се често користе за испитивање стања датотеке. Ту су такође и\n" +" оператори ниске и оператори поређења бројева.\n" +" \n" +" Понашање пробе зависи од броја аргумената. Прочитајте\n" +" страницу упутства баша потпуну одредбу.\n" +" \n" +" Оператори датотеке:\n" +" \n" +" -a ДАТОТЕКА Тачно ако датотека постоји.\n" +" -b ДАТОТЕКА Тачно ако је датотека посебног блока.\n" +" -c ДАТОТЕКА Тачно ако је датотека посебног знака.\n" +" -d ДАТОТЕКА Тачно ако је датотека директоријум.\n" +" -e ДАТОТЕКА Тачно ако датотека постоји.\n" +" -f ДАТОТЕКА Тачно ако датотека постоји и ако је обична датотека.\n" +" -g ДАТОТЕКА Тачно ако је датотека подеси-иб-групе.\n" +" -h ДАТОТЕКА Тачно ако је датотека симболичка веза.\n" +" -L ДАТОТЕКА Тачно ако је датотека симболичка веза.\n" +" -k ДАТОТЕКА Тачно ако датотека има свој „лепљиви“ скуп бита.\n" +" -p ДАТОТЕКА Тачно ако је датотека именована спојка.\n" +" -r ДАТОТЕКА Тачно ако датотеку само ви можете да читате.\n" +" -s ДАТОТЕКА Тачно ако датотека постоји и није празна.\n" +" -S ДАТОТЕКА Тачно ако је датотека прикључница.\n" +" -t ФД Тачно ако је ФД отворен на терминалу.\n" +" -u ДАТОТЕКА Тачно ако је датотека подеси-иб-корисника.\n" +" -w ДАТОТЕКА Тачно ако у датотеку можете ви да пишете.\n" +" -x ДАТОТЕКА Тачно ако датотеку можете ви да извршите.\n" +" -O ДАТОТЕКА Тачно ако је датотека заправо у вашем власништву.\n" +" -G ДАТОТЕКА Тачно ако је датотека заправо у власништву ваше групе.\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" +" \n" +" НИСКА1 = НИСКА2 Тачно ако су ниске једнаке.\n" +" НИСКА1 != НИСКА2 Тачно ако ниске нису једнаке.\n" +" НИСКА1 < НИСКА2 Тачно ако НИСКА1 долази пре НИСКЕ2 лексикографски.\n" +" НИСКА1 > НИСКА2 Тачно ако НИСКА1 долази после НИСКЕ2 лексикографски.\n" +" \n" +" Остали оператори:\n" +" \n" +" -o ОПЦИЈА Тачно ако је опција шкољке ОПЦИЈА укључена.\n" +" -v ПРОМ Тачно ако је променљива шкољке ПРОМ подешена\n" +" -R ПРОМ Тачно ако је променљива шкољке ПРОМ подешена и ако је упута назива.\n" +" ! ИЗРАЗ Тачно ако је израз нетачан.\n" +" ИЗРАЗ1 -a ИЗРАЗ2 Тачно ако је тачан и израз1 И израз2.\n" +" ИЗРАЗ1 -o ИЗРАЗ2 Тачно ако је тачан или израз1 ИЛИ израз2.\n" +" \n" +" арг1 ОП арг2 Аритметичка проба. ОП је једно од следећег: -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Аритметички двочлани оператори дају тачно ако је АРГ1 једнак, није-једнак,\n" +" мањи-од, мањи-од-или-једнак, већи-од, или већи-од-или-једнак са АРГ2.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако се ИЗРАЗ процени на тачно; неуспех ако се ИЗРАЗ процени\n" +" на нетачно или ако је дат неисправан аргумент." + +#: builtins.c:1344 +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 "" +"Процењује условни израз.\n" +" \n" +" Ово је синоним за уграђеност „test“, али последњи аргумент мора\n" +" бити дословна ], да поклопи отворену [." + +#: builtins.c:1353 +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" +" \n" +" Исписује нагомилана времена корисника и система за шкољку и за све\n" +" њене проистекле процесе.\n" +" \n" +" Излазно стање:\n" +" Увек успешно." + +#: builtins.c:1365 +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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\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 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" +" АРГ је наредба за читање и извршавање када шкољка прими ОДРЕДБУ_СИГНАЛА\n" +" сигнала. Ако АРГ недостаје (а достављена је једна ОДРЕДБА_СИГНАЛА) или\n" +" „-“, сваки наведени сигнал се враћа на првобитну вредност. Ако је АРГ\n" +" ништавна ниска свака ОДРЕДБА_СИГНАЛА се занемарује од стране шкољке и од\n" +" наредби које призива.\n" +" \n" +" Ако је ОДРЕДБА_СИГНАЛА ИЗАЂИ (0) АРГ се извршава при изласку из шкољке.\n" +" Ако је ОДРЕДБА_СИГНАЛА ПРОЧИСТИ, АРГ се извршава пре сваке једноставне\n" +" наредбе. Ако је ОДРЕДБА_СИГНАЛА ВРАТИ, АРГ се извршава сваки пут када се\n" +" заврши извршавање функције шкољке или списа покренутих . или уграђености\n" +" извора. ОДРЕДБА_СИГНАЛА или ГРЕШКА значи извршавање АРГ-а сваки пут када\n" +" би неуспех наредбе довео до изласка шкољке када је укључена опција „-e“.\n" +" \n" +" Ако нису достављени аргументи, „trap“ исписује списак наредби придружених\n" +" сваком сигналу.\n" +" \n" +" Опције:\n" +" -l\tисписује списак назива сигнала и њихових одговарајућих бројева\n" +" -p\tприказује наредбе хватања придружене свакој ОДРЕДБИ_СИГНАЛА\n" +" \n" +" Свака ОДРЕДБА_СИГНАЛА је или назив сигнала у или број сигнала.\n" +" Називи сигнала нису осетљиви на величину слова а префикс СИГ је опција.\n" +" Сигнал може бити послат шкољци помоћу „kill -signal $$“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим за неисправну ОДРЕДБА_СИГНАЛА или за неисправну опцију." + +#: builtins.c:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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" +" \n" +" За сваки НАЗИВ, показује како би био тумачен ако би се користио као\n" +" назив наредбе.\n" +" \n" +" Опције:\n" +" -a\tприказује сва места која садрже извршну под називом НАЗИВ;\n" +" \t укључује псеудониме, уграђености, и функције, ако и само ако\n" +" \t опција „-p“ није такође коришћена\n" +" -f\tпотискује тражење функције шкољке\n" +" -P\tприморава претрагу ПУТАЊЕ за сваким НАЗИВОМ, чак и ако је псеудоним,\n" +" \t уграђеност, или функција, и враћа назив датотеке диска која ће бити\n" +" \t извршена\n" +" -p\tдаје или назив датотеке диска која ће бити извршена, или ништа\n" +" \t ако „type -t НАЗИВ“ неће дати „датотеку“.\n" +" -t\tисписује једну реч која је једна од следећих: „alias“, „keyword“,\n" +" \t „function“, „builtin“, „file“ или „“, ако је НАЗИВ псеудоним, реч\n" +" \t резервисана шкољком, функција шкољке, уграђеност шкољке, датотека диска,\n" +" или ако није пронађена\n" +" \n" +" Аргументи:\n" +" НАЗИВ\tНазив наредбе за тумачење.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако су пронађени сви НАЗИВИ; неуспех ако ниједан није пронађен." + +#: builtins.c:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"Мења ограничења изворишта шкољке.\n" +" \n" +" Обезбеђује управљање над извориштима доступним шкољци и обрађује\n" +" његово стварање, на системима који омогућавају такво управљање.\n" +" \n" +" Опције:\n" +" -S\tкористи „меко“ ограничење изворишта\n" +" -H\tкористи „јако“ ограничење изворишта\n" +" -a\tизвештено је о свим текућим ограничењима\n" +" -b\tвеличина међумеморије прикључнице\n" +" -c\tнајвећа величина створених кључних датотека\n" +" -d\tнајвећа величина подеока податка процеса\n" +" -e\tнајвећа хитност заказивања („фино“)\n" +" -f\tнајвећа величина датотеке коју запише шкољка и њен пород\n" +" -i\tнајвећи број сигнала на чекању\n" +" -k\tнајвећи број к-чекања додељених овом процесу\n" +" -l\tнајвећа величина коју процес може да закључа у меморији\n" +" -m\tнајвећа величина боравишног скупа\n" +" -n\tнајвећи број отворених описника датотеке\n" +" -p\tвеличина међумеморије спојке\n" +" -q\tнајвећи број бајтова у редовима поруке ПОСИКС-а\n" +" -r\tнајвећа хитност заказивања у стварном времену\n" +" -s\tнајвећа величина спремника\n" +" -t\tнајвећи износ времена процесора у секундама\n" +" -u\tнајвећи број корисничких процеса\n" +" -v\tвеличина виртуелне меморије\n" +" -x\tнајвећи број закључавања датотеке\n" +" -P\tнајвећи број псеудотерминала\n" +" -R\tнајвеће време за које процес у реалном времену може да ради пре блокирања\n" +" -T\tнајвећи број нити\n" +" \n" +" Нису све опције доступне на свим платформама.\n" +" \n" +" Ако је дато ОГРАНИЧЕЊЕ, то је нова вредност наведеног изворишта;\n" +" посебне вредности ОГРАНИЧЕЊА „soft“, „hard“, и „unlimited“ стоје\n" +" за текуће меко ограничење, текуће јако ограничење, и без ограничења.\n" +" У супротном, тренутна вредност наведеног изворишта се исписује. Ако\n" +" није дата ниједна опција, онда се подразумева „-f“.\n" +" \n" +" Вредности су у 1024-битном повећавању, изузев за „-t“ која је у секундама,\n" +" „-p“ која се повећава за 512 бајта, и „-u“ која је произвољан број\n" +" процеса.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако не дође до грешке." + +#: builtins.c:1483 +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" +" \n" +" Подешава корисничку маску стварања датотеке на РЕЖИМ. Ако је РЕЖИМ\n" +" изостављен, исписује текућу вредност маске.\n" +" \n" +" Ако РЕЖИМ почиње цифром, тумачи се као октални број; у супротном то је\n" +" симболичка ниска режима као она коју прихвата „chmod(1)“.\n" +" \n" +" Опције:\n" +" -p\tако је РЕЖИМ изостављен, исписује у облику који може бити поново коришћен као улаз\n" +" -S\tчини излаз симболичким; у супротном излаз је октални број\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако је РЕЖИМ неисправан или ако је дата неисправна опција." + +#: builtins.c:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Чека на довршавање посла и даје излазно стање.\n" +" \n" +" Чека на сваки процес одређен ИБ-ом, који може бити ИБ процеса или\n" +" одредба посла, и извештава о његовом стању окончавања. Ако ИБ није\n" +" дат, чека на све тренутно радне потпроцесе, а излазно стање је нула.\n" +" Ако је ИБ одредба посла, чека на све процесе у тој спојници посла.\n" +" \n" +" Ако је достављена опција „-n“, чека на појединачни посао са списка ИБ-ова,\n" +" или, ако ИБ-ови нису достављени, на следећи посао да заврши и даје његово\n" +" излазно стање.\n" +" \n" +" Ако је достављена опција „-p, процес или одредник посла за посао\n" +" за који је дато излазно стање се додељује променљивој ПРОМ\n" +" именованој аргументом опције. Променљива ће бити на почетку непостављена,\n" +" пре неког додељивања. Ово је корисно само када је достављена опција „-n“.\n" +" \n" +" Ако је достављена опција „-f“, а контрола посла је укључена, чека на\n" +" наведени ИБ да оконча, уместо да чека на њега да промени статус.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последњег ИБ-а; неуспех ако је ИБ неисправан или ако је\n" +" дата неисправна опција, или ако је достављено „-n“ а шкољка нема „unwaited-for“\n" +" пород." + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." +msgstr "" +"Чека на довршавање процеса и даје излазно стање.\n" +" \n" +" Чека на сваки процес наведен ПИБ-ом и извештава о његовом излазном стању.\n" +" Ако ПИБ ниије дат, чека на све тренутно радне потпроцесе, а враћено стање\n" +" је нула. ПИБ мора бити ИБ процеса.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последњег ПИБ-а; неуспех ако је ПИБ неисправан или ако је дата\n" +" неисправна опција." + +#: builtins.c:1549 +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 "" +"Извршава наредбе за сваког члана на списку.\n" +" \n" +" Петља `„for“ извршава низ наредбиза сваког члана на списку ставки.\n" +" Ако „in WORDS ...;“ није присутно, тада се подразумева „in \"$@\"“.\n" +" За сваки елемент у РЕЧИМА, НАЗИВ се подешава на тај елемент, и\n" +" НАРЕДБЕ се извршавају.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1563 +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" +" \n" +" Исто што и\n" +" \t(( ИЗРАЗ1 ))\n" +" \twhile (( ИЗРАЗ2 )); do\n" +" \t\tНАРЕДБЕ\n" +" \t\t(( ИЗРАЗ3 ))\n" +" \tdone\n" +" ИЗРАЗ1, ИЗРАЗ2, и ИЗРАЗ3 јесу аритметички изрази. Ако је изостављен неки израз,\n" +" понаша се као да се процењује на 1.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1581 +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" +" РЕЧИ су раширене, стварајући списак речи. Скуп раширених\n" +" речи се исписује на стандардној грешци, где свакој претходи\n" +" број. Ако „in WORDS“ није присутно, подразумева се „in \"$@\"“.\n" +" ПС3 упит се тада приказује а ред се чита са стандардног улаза.\n" +" Ако се ред састоји од броја који одговара једној од приказаних\n" +" речи, тада се НАЗИВ подешава на ту реч. Ако је ред празан,\n" +" РЕЧИ и упит се поново приказују. Ако је прочитан крај датотеке, \n" +" наредба се довршава. Свака друга прочитана вредност доводи\n" +" до тога да НАЗИВ бива подешен на ништа. Читање реда се чува\n" +" у променљивој ОДГОВОРИ. НАРЕДБЕ се извршавају након сваког\n" +" избора све док се не изврши наредба за прекид.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1602 +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" +" времена процесора, и времена системског процесора утрошеног на\n" +" извршавање СПОЈНОГРЕДА када се оконча.\n" +" \n" +" Опције:\n" +" -p\tисписује сажетак времена у преносном запису Посикса\n" +" \n" +" Вредност променљиве ЗАПИСАВРЕМЕНА се користи као излазни запис.\n" +" \n" +" Излазно стање:\n" +" Стање резултата јесте стање резултата СПОЈНОГРЕДА." + +#: builtins.c:1619 +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" +" \n" +" Изборно извршава НАРЕДБЕ на основу РЕЧИ која поклапа ШАБЛОН.\n" +" | се користи за раздвајање више шаблона.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1631 +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 "" +"Извршава наредбе на основу условности.\n" +" \n" +" Извршава се списак „if НАРЕДБЕ“. Ако је његово излазно стање нула, тада се\n" +" извршава списак „then НАРЕДБЕ“. У супротном, сваки списак „elif НАРЕДБЕ“\n" +" се извршава на смену, и ако је његово излазно стање нула, одговарајући списак\n" +" „then НАРЕДБЕ“ се извршава и наредба „if“ се завршава. У супротном, извршава\n" +" се списак „else НАРЕДБЕ“, ако постоји. Излазно стање читаве конструкције је\n" +" излазно стање последње извршене наредбе, или нула ако нема испробаног услова.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1648 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Извршава наредбе након што се проба успешно обави.\n" +" \n" +" Шири и извршава НАРЕДБЕ-2 након што завршна наредба у НАРЕДБАМА\n" +" има излазно стање нуле.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1660 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Извршава наредбе све док проба не буде неуспела.\n" +" \n" +" Шири и извршава НАРЕДБЕ-2 након што завршна наредба у НАРЕДБАМА\n" +" има излазно стање које није нула.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Ствара копроцес под називом НАЗИВ.\n" +" \n" +" Извршава наредбу несагласно, са стандардним излазом и стандардним\n" +" улазом наредбе повезане путем спојке са описницима датотека додељених\n" +" да назначе 0 и 1 НАЗИВА променљиве низа у шкољци извршавања.\n" +" Основни НАЗИВ је „COPROC“.\n" +" \n" +" Излазно стање:\n" +" Наредба копроцеса даје излазно стање 0." + +#: builtins.c:1686 +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 "" +"Одређује функцију шкољке.\n" +" \n" +" Ствара функцију шкољке под називом НАЗИВ. Када се призове као једна наредба,\n" +" НАЗИВ покреће НАРЕДБЕ у контексту шкољке позивања. Када се призове НАЗИВ,\n" +" аргументи се прослеђују функцији као $1...$n, а назив функције се налази у\n" +" $НАЗИВУ_ФУНКЦИЈЕ.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако је НАЗИВ само за читање." + +#: builtins.c:1700 +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" +" \n" +" Покреће скуп наредби у групи. Ово је један од начина за преусмеравање\n" +" читавог скупа наредби.\n" +" \n" +" Излазно стање:\n" +" Исписује стање последње извршене наредбе." + +#: builtins.c:1712 +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 "" +"Наставља посао у првом плану.\n" +" \n" +" Исто као и аргумент ОДРЕДБА_ПОСЛА у наредби „fg“. Наставља заустављени\n" +" или посао у позадини. ОДРЕДБА_ПОСЛА може да наведе назив посла или број\n" +" посла. Пропративши ОДРЕДБУ_ПОСЛА са & поставља посао у позадину, као\n" +" да је одредба посла достављена као аргумент уз „bg“.\n" +" \n" +" Излазно стање:\n" +" Даје стање настављеног посла." + +#: builtins.c:1727 +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" +" \n" +" ИЗРАЗ се процењује у складу са правилима за аритметичко процењивање.\n" +" Исто што и „let ИЗРАЗ“.\n" +" \n" +" Излазно стање:\n" +" Даје 1 ако се ИЗРАЗ процени на 0; у супротном даје 0." + +#: builtins.c:1739 +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 "" +"Извршава условну наредбу.\n" +" \n" +" Даје стање 0 или 1 у зависности од процене условног израз ИЗРАЗ.\n" +" Изрази су састављени од истих примарних које користи уграђеност\n" +" „test“, и може бити комбиновано употребом следећих оператора:\n" +" \n" +" ( ИЗРАЗ )\t Даје вредност ИЗРАЗА\n" +" ! ИЗРАЗ\t\tТачно ако је ИЗРАЗ нетачан; у супротном нетачно\n" +" ИЗРАЗ1 && ИЗРАЗ2\tТачно ако су и ИЗРАЗ1 и ИЗРАЗ2 тачни; у супротном нетачно\n" +" ИЗРАЗ1 || ИЗРАЗ2\tТачно ако је или ИЗРАЗ1 или ИЗРАЗ2 тачан; у супротном нетачно\n" +" \n" +" КАда се користе оператори „==“ и „!=“, ниска са десне стране оператора\n" +" се користи као шаблон а поређење са шаблоном се обавља. Када се користи\n" +" оператор „=~“, ниска са десне стране оператора се поклапа као регуларни\n" +" израз.\n" +" \n" +" Оператори && и || не процењују ИЗРАЗ2 ако је ИЗРАЗ1 довољан за одређивање\n" +" вредности израза.\n" +" \n" +" Излазно стање:\n" +" 0 или 1 у зависности од вредност ИЗРАЗА." + +#: builtins.c:1765 +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" +" \n" +" ИЗДАЊЕ_БАША Подаци о издању за овај Баш.\n" +" ЦДПУТАЊА Списак директоријума раздвојен двотачком за тражење\n" +" директоријума који су дати као аргументи за „cd“.\n" +" ОПШТЕЗАНЕМАРИ Списак шаблона раздвојен двотачком који описује називе\n" +" датотека који ће бити занемарени ширењем назива путање.\n" +" ИСТОРИОТЕКА Назив датотеке у којој је смештен историјат наредби.\n" +" ВЕЛИЧИНАИСТОРИОТЕКЕ Највећи број редова које може да садржи ова датотека.\n" +" ВЕЛИЧИНАИСТОРИЈАТА Највећи број редова историјата којима покренута\n" +" шкољка може да приступи.\n" +" ЛИЧНО Потпуна путања до вашег директоријума пријављивања.\n" +" НАЗИВДОМАЋИНА Назив текућег домаћина.\n" +" ВРСТАДОМАЋИНА Врста процесора под којим ради ово издање Баша.\n" +" ЗАНЕМАРИКРД Управља радњом шкољке при пријему знака за крај датотеке\n" +" само као улаза. Ако је подешено, онда је његова вредност\n" +" број знакова КРД-а који могу бити виђени у реду празног\n" +" реда пре него ли шкољка изађе (основно је 10). Када\n" +" није подешено, КРД значи крај улаза.\n" +" ВРСТАМАШИНЕ Ниска која описује текући систем на коме је Баш покренут.\n" +" ПРОВЕРАПОШТЕ Колико често, у секундама, Баш првоерава нову пошту.\n" +" ПУТАЊАПОШТЕ Списак датотека раздвојен двотачком које Баш проверава\n" +" за новом поштом.\n" +" ВРСТАОСА Издање Јуникса на коме је покренуто ово издање Баша.\n" +" ПУТАЊА Списак директоријума раздвојен двотачком за претрагу\n" +" приликом тражења наредби.\n" +" НАРЕДБА_УПИТА Наредба која ће бити извршена пре исписивања сваког\n" +" главног упита.\n" +" НГУ1 Ниска главног упита.\n" +" НСУ2 Ниска споредног упита.\n" +" ШРД Пуна путања текућег директоријума.\n" +" ОПЦИЈЕШКОЉКЕ Списак раздвојен двотачком укључених опција шкољке.\n" +" ТЕРМИНАЛ Назив врсте текућег терминала.\n" +" ЗАПИСВРЕМЕНА Излазни запис за статистике времена које приказује\n" +" резервисана реч „time“.\n" +" сам_настави Не-ништа значи да је реч наредбе која се појављује на реду\n" +" сама по себи прва тражена на списку тренутно заустављених\n" +" послова. Ако се ту пронађе, тај посао се поставља у први\n" +" план. Вредност „exact“ значи да реч наредбе мора тачно да\n" +" одговара наредби на списку заустављених послова. Вредност\n" +" „substring“ значи да реч наредбе мора да одговара поднисци\n" +" посла. Свака друга вредност значи да наредба мора бити\n" +" префикс заустављеног посла.\n" +" знакисторијата Знаци који управљају ширењем историјата и брзом заменом.\n" +" Први знак јесте знак замене историјата, обично је то „!“.\n" +" Други јесте знак „брзе замене“, обично је то „^“. Трећи\n" +" јесте знак „напомене историјата“, обично је то „#“.\n" +" ЗАНЕМАРИИСТОРИЈАТ Списак шаблона раздвојен двотачком коришћених за одлучивање\n" +" о наредбама које требају бити сачуване на списку историјата.\n" + +#: builtins.c:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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" +" -n\tПотискује нормалну замену директоријума приликом додавања\n" +" \t директоријума у спремник, тако да се ради само са спремником.\n" +" \n" +" Аргументи:\n" +" +N\tОкреће спремник тако да је N-ти директоријум на врху (бројећи\n" +" са леве стране списка кога приказује „dirs“, почевши од нуле).\n" +" \n" +" -N\tОкреће спремник тако да је N-ти директоријум на врху (бројећи\n" +" са десне стране списка кога приказује „dirs“, почевши од нуле).\n" +" \n" +" dir\tДодајеs ДИР у спремник директоријума на врху, учинивши га новим\n" +" \t текућим радним директоријумом.\n" +" \n" +" Уграђеност „dirs“ приказује спремник директоријума.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није достављен неисправан аргумент или замена\n" +" директоријума не успе." + +#: builtins.c:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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\tПотискује уобичајену замену директоријума приликом уклањања\n" +" \t директоријума из спремника, тако да се ради само са спремником.\n" +" \n" +" Аргументи:\n" +" +N\tУклања N-ти унос почевши са леве стране списка кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd +0“ уклања први\n" +" \t директоријум, „popd +1“ други.\n" +" \n" +" -N\tУклања N-ти унос почевши са десне стране списка кога приказује\n" +" \t „dirs“, почевши од нуле. На пример: „popd -0“ уклања последњи\n" +" \t директоријум, „popd -1“ претпоследњи.\n" +" \n" +" Уграђеност „dirs“ приказује спремник директоријума.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није достављен неисправан аргумент или измена\n" +" директоријума не успе." + +#: builtins.c:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Приказује спремник директоријума.\n" +" \n" +" Приказује списак тренутно запамћених директоријума. Директоријуми\n" +" налазе свој пут до списка помоћу наредбе „pushd“; можете да се вратите\n" +" назад на списак помоћу наредбе „popd“.\n" +" \n" +" Опције:\n" +" -c\tчисти спремник директоријума брисањем свих елемената\n" +" -l\tне исписује издања директоријума са предметком тилде\n" +" \t односне на ваш лични директоријум\n" +" -p\tисписује спремник директоријума са једним уносом у реду\n" +" -v\tисписује спремник директоријума са једним уносом у реду\n" +" са предметком свог положаја у спремнику\n" +" \n" +" Аргументи:\n" +" +N\tПриказујеs N-ти унос бројећи са леве стране на списку кога\n" +" приказује „dirs“ када се призове без опција, почевши од нуле.\n" +" \n" +" -N\tПриказујеs N-ти унос бројећи са десне стране на списку кога\n" +" приказује „dirs“ када се призове без опција, почевши од нуле.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако не дође до грешке." + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"Подешава и расподешава опције шкољке.\n" +" \n" +" Мења подешавање сваке оције шкољке НАЗИВ_ОПЦИЈЕ. Без аргумената опција,\n" +" исписује сваки достављени НАЗИВ_ОПЦИЈЕ, или све опције шкољке ако није\n" +" дат ниједан НАЗИВ_ОПЦИЈЕ, са назнаком да ли је свака подешена или није.\n" +" \n" +" Опције:\n" +" -o\tограничава НАЗИВЕ_ОПЦИЈА на оне одређене за коришћење са „set -o“\n" +" -p\tисписује сваку опцију љуске са назнаком њеног стања\n" +" -q\tпотискује излаз\n" +" -s\tукључује (подешава) сваки НАЗИВ_ОПЦИЈЕ\n" +" -u\tискључује (расподешава) сваки НАЗИВ_ОПЦИЈЕ\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат ако је НАЗИВ_ОПЦИЈЕ укључен; неуспех ако је дата\n" +" неисправна опција или ако је НАЗИВ_ОПЦИЈЕ искључен." + +#: builtins.c:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or assignment\n" +" error occurs." +msgstr "" +"Обликује и исписује АРГУМЕНТЕ под управом ЗАПИСА.\n" +" \n" +" Опције:\n" +" -v пром\tдодељује излаз променљивој шкољке ПРОМ уместо да га\n" +" \t\tприкаже на стандардном излазу\n" +" \n" +" ЗАПИС јесте ниска знака која садржи три врсте објекта: обични знаци,\n" +" који се једноставно умножавају на стандардни излаз; низови прекида\n" +" знака, који се претварају и умножавају на стандардни излаз; и одредбе\n" +" записа, од којих свака доводи до исписивања следећег наредног аргумента.\n" +" \n" +" Као додатак одредбама стандардног записа описаних у „printf(1)“,\n" +" „printf“ тумачи:\n" +" \n" +" %b\tшири низове прекида контра косе црте у одговарајући аргумент\n" +" %q\tцитира аргумент на начин како би био коришћен као улаз шкољке\n" +" %Q\tкао %q, али примењује сваку тачност на нецитирани аргумент пре\n" +" \t\tцитирања\n" +" %(fmt)T исписује ниску датум-време резултирајући коришћењем ФМТ-а као\n" +" ниске записа за „strftime(3)“\n" +" \n" +" Запис се поново користи јер је потребно утрошити све аргументе. Ако\n" +" има више аргумената него што то захтева запис, излишне одредбе записа\n" +" се понашају као да је достављена вредност нуле или ништавна ниска.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако не\n" +" дође до грешке писања или доделе." + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Наводи како ће аргументе да доврши Читај ред.\n" +" \n" +" За сваки НАЗИВ, наводи како ће аргументи бити довршени. Ако опције\n" +" нису достављене, постојеће одредбе довршавања се исписују на начин\n" +" који омогућава да буду поново коришћене као улаз.\n" +" \n" +" Опције:\n" +" -p\tисписује постојеће одредбе довршавања у поново употребљивом запису\n" +" -r\tуклања одредбу довршавања за сваки НАЗИВ, или, ако НАЗИВИ нису\n" +" \t достављени, све одредбе довршавања\n" +" -D\tпримењује довршавања и радње као основне за радње\n" +" \t без одређеног посебног довршавања\n" +" -E\tпримењује довршавања и радње на „празне“ наредбе --\n" +" \t довршавање покушано на празном реду\n" +" -I\tпримењује довршавања и радње на почетну (обично наредбу) реч\n" +" \n" +" Када се покуша са довршавањем, радње се примењују по редоследу опција\n" +" великих слова наведених горе. Опција „-D“ има првенство над „-E“, и обе имају предност у односу на „-I“.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако не дође до грешке." + +#: builtins.c:2004 +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" +" Ако је достављен изборни аргумент РЕЧ, стварају се поређења са РЕЧЈУ.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или ако не дође до грешке." + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"Мења или приказује опције довршавања.\n" +" \n" +" Мења опције довршавања за сваки НАЗИВ, или, ако НАЗИВИ нису достављени,\n" +" довршавања које се тренутно извршава. Ако ОПЦИЈЕ нису дате, исписује\n" +" опције довршавања за сваки НАЗИВ или одредбу текућег довршавања.\n" +" \n" +" Опције:\n" +" \t-o опција\tПодешава опцију довршавања ОПЦИЈА за сваки НАЗИВ\n" +" \t-D\t\tМења опције за „основно“ довршавање наредбе\n" +" \t-E\t\tМења опције за „празно“ довршавање наредбе\n" +" \t-I\t\tМења опције за довршавање почетне речи\n" +" \n" +" Употреба „+o“ уместо „-o“ искључује наведену опцију.\n" +" \n" +" Аргументи:\n" +" \n" +" Сваки НАЗИВ упућује на наредбу за коју одредба довршавања мора претходно\n" +" бити одређена употребом уграђености „complete“. Ако НАЗИВИ нису дати,\n" +" „compopt“ мора бити позвано функцијом која тренутно ствара довршавања,\n" +" а опције ствараоца који тренутно извршава довршавање су измењене.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако се не достави неисправна опција или НАЗИВ\n" +" нема одређену одредбу довршавања." + +#: builtins.c:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"Чита редове са стандардног улаза у променљивој индексираног низа.\n" +" \n" +" Чита редове са стандардног улаза у променљивој индексираног низа НИЗ, или\n" +" из описника датотеке ОД ако је достављена опција „-u“. Променљива МАПОТЕКА\n" +" јесте основни НИЗ.\n" +" \n" +" Опције:\n" +" -d гранич Користи ГРАНИЧНИК да оконча редове, уместо новог реда\n" +" -n број Умножава највише БРОЈ редова. Ако је БРОЈ 0, умножавају се сви редови\n" +" -O порекло Почиње додељивање НИЗУ при индексу ПОРЕКЛО. Основни индекс је 0\n" +" -s број Одбацује првих БРОЈ прочитаних редова\n" +" -t Уклања пратећи ГРАНИЧНИК из сваког прочитаног реда (основни нови ред)\n" +" -u од Чита редове из описника датотеке ОД уместо са стандардног улаза\n" +" -C опозив Процењује ОПОЗИВ сваког пута када се прочита КОЛИЧИНА редова\n" +" -c количина Наводи број прочитаних редова између сваког позива за ОПОЗИВ\n" +" \n" +" Аргументи:\n" +" НИЗ Назив променљиве низа за податке датотеке\n" +" \n" +" Ако је „-C“ достављено без „-c“, основна количина је 5000. Када се\n" +" процени ОПОЗИВ, достављен је индекс следећег елемента низа који ће\n" +" бити додељен и ред који ће бити додељен том елементу као додатни\n" +" аргументи.\n" +" \n" +" Ако није достављено са изричитим пореклом, мапфајл ће очистити НИЗ пре\n" +" него што му додели.\n" +" \n" +" Излазно стање:\n" +" Даје позитиван резултат осим ако није дата неисправна опција или ако је НИЗ само\n" +" за читање или није индексирани низ." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Чита редове из датотеке у променљиву низа.\n" +" \n" +" Синоним за „mapfile“." + +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: неисправан кључ придруживог низа" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "%s%cИсписује контекст текућег позива подрутине.\n" +#~ "\n" +#~ " Без „EXPR“, исписује" + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: процес %5ld (%s) у спојном_реду" + +#~ msgid "Unknown Signal #" +#~ msgstr "Непознат сигнал #" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "Ауторска права © 2018 Задужбина слободног софтвера, Доо." + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Ауторска права (C) 2014 Задужбина слободног софтвера, Доо." + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" diff --git a/po/sv.gmo b/po/sv.gmo index b5bfcef..804ca8f 100644 Binary files a/po/sv.gmo and b/po/sv.gmo differ diff --git a/po/sv.po b/po/sv.po index f23f250..7a12ea0 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1,303 +1,342 @@ # Swedish translation of bash -# Copyright © 2008, 2009 Free Software Foundation, Inc. +# Copyright © 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2022 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. -# Göran Uddeborg , 2008, 2009. # -# $Revision: 1.6 $ +# Göran Uddeborg , 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2022. # +# $Revision: 1.31 $ msgid "" msgstr "" -"Project-Id-Version: bash 4.0\n" +"Project-Id-Version: bash 5.2-rc1\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" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-17 22:31+0200\n" "Last-Translator: Göran Uddeborg \n" "Language-Team: Swedish \n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" msgstr "felaktigt vektorindex" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "%s: det går inte att konvertera en indexerad vektor till associativ" +msgid "%s: removing nameref attribute" +msgstr "%s: tar bort attributet namnreferens" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: ogiltig nyckel till associativ vektor" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: det går inte att konvertera en indexerad vektor till associativ" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: det går inte att tilldela till ickenumeriska index" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" msgstr "%s: det går inte att skapa: %s" -#: bashline.c:3457 +#: bashline.c:4479 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" +msgstr "bash_execute_unix_command: det går inte att hitta en tangentbindning för kommandot" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: första ickeblanka tecknet är inte '\"'" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "ingen avslutande \"%c\" i %s" +msgstr "ingen avslutande ”%c” i %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" msgstr "%s: kolonseparator saknas" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "”%s”: det går inte att avbinda i kommandotangentbindning" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "klammerexpansion: det går inte att allokera minne för %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "klammerexpansion: misslyckades att allokera minne för %u element" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "klammerexpansion: misslyckades att allokera minne för ”%s”" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "\"%s\": ogiltigt tangentbindningsnamn" +msgstr "”%s”: ogiltigt aliasnamn" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "radredigering är inte aktiverat" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "\"%s\": ogiltigt tangentbindningsnamn" +msgstr "”%s”: ogiltigt tangentbindningsnamn" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "\"%s\": okänt funktionsnamn" +msgstr "”%s”: okänt funktionsnamn" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, 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 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s kan anropas via " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "”%s”: det går inte att avbinda" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "slingräknare" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "endast meningsfullt i en \"for\"-, \"while\"- eller \"until\"-slinga" +msgstr "endast meningsfullt i en ”for”-, ”while”- eller ”until”-slinga" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Returnerar kontexten för det aktuella subrutinsanropet.\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." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME är inte satt" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "för många argument" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "null-katalog" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD är inte satt" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " msgstr "rad %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " msgstr "varning: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" msgstr "%s: flaggan kräver ett argument" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" msgstr "%s: numeriskt argument krävs" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: finns inte" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: ogiltig flagga" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" msgstr "%s: ogiltigt flaggnamn" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "\"%s\": inte en giltig identifierare" +msgstr "”%s”: inte en giltig identifierare" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "ogiltigt oktalt tal" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "ogiltigt hexadecimalt tal" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "ogiltigt tal" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: ogiltig signalspecifikation" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "\"%s\": inte en pid eller giltig jobbspecifikation" +msgstr "”%s”: inte en pid eller giltig jobbspecifikation" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: endast läsbar variabel" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: det går inte att tilldela" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s: %s utanför giltigt intervall" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "argument" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s utanför giltigt intervall" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: inget sådant jobb" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: ingen jobbstyrning" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "ingen jobbstyrning" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: begränsat" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "begränsat" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s: inte inbyggt i skalet" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "skrivfel: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" msgstr "fel när terminalattribut ställdes in: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" msgstr "fel när terminalattribut hämtades: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: tvetydig jobbspecifikation" -#: builtins/complete.def:276 +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "hjälp är inte tillgängligt i denna version" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: det går inte att ta bort tilldelning: endast läsbar %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: det går inte att ta bort tilldelning" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s: ogiltigt åtgärdsnamn" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" msgstr "%s: ingen kompletteringsspecifikation" @@ -310,121 +349,156 @@ msgstr "varning: flaggan -F fungerar kanske inte som du väntar dig" 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 +#: builtins/complete.def:846 msgid "not currently executing completion function" msgstr "kör inte en kompletteringsfunktion" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" msgstr "kan endast användas i en funktion" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "det går inte att använda \"-f\" för att göra funktioner" +msgstr "det går inte att använda ”-f” för att göra funktioner" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: endast läsbar funktion" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: en referensvariabel kan inte vara en vektor" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: att en namnreferensvariabel självrefererar är inte tillåtet" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: cirkulär namnreferens" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "”%s”: ogiltigt variabelnamn för referens" + +#: builtins/declare.def:856 #, 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 +#: builtins/declare.def:862 builtins/read.def:887 #, 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 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: citerad sammansatt tilldelning av vektorer undanbedes" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" msgstr "dynamisk laddning är inte tillgängligt" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" msgstr "det går inte att öppna delat objekt %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "kan inte hitta %s i det delade objektet %s: %s" +msgstr "det går inte att hitta %s i det delade objektet %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: den dynamiska inbyggda är redan inläst" -#: builtins/enable.def:459 +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "inläsningsfunktionen för %s returnerar misslyckande (%d): inte inläst" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" msgstr "%s: inte dynamiskt laddad" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: är en katalog" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: inte en normal fil" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: det går inte att köra binär fil" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: kan inte köra: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "utloggning\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "inte ett inloggningsskal: använd \"exit\"" +msgstr "inte ett inloggningsskal: använd ”exit”" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Det finns stoppade jobb.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" msgstr "Det finns körande jobb.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "hittar inget kommando" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "historiespecifikation" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" msgstr "aktuell" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "jobb %d startade utan jobbstyrning" @@ -439,41 +513,45 @@ msgstr "%s: ogiltig flagga -- %c\n" msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaggan kräver ett argument -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "hasning avslaget" +msgstr "hashning avslaget" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" msgstr "%s: hashtabellen tom\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" msgstr "träffar\tkommando\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "Skalkommandon som matchar nyckelordet '" -msgstr[1] "Skalkommandon som matchar nyckelorden '" +msgstr[0] "Skalkommandon som matchar nyckelordet ”" +msgstr[1] "Skalkommandon som matchar nyckelorden ”" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" -"inget hjälpämne matchar \"%s\". Prova \"help help\" eller \"man -k %s\" " -"eller \"info %s\"." +"”\n" +"\n" #: builtins/help.def:185 #, 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:223 +#, c-format msgid "%s: cannot open: %s" msgstr "%s: det går inte att öppna: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -484,24 +562,30 @@ msgid "" "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" +"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 +#: builtins/history.def:159 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 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "historieposition" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: ogiltig tidsstämpel" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" msgstr "%s: historieexpansionen misslyckades" @@ -513,95 +597,115 @@ msgstr "%s: inlib misslyckades" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "inga andra flaggor är tillåtna med \"-x\"" +msgstr "inga andra flaggor är tillåtna med ”-x”" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "%s: argument måste vara processer eller job-id:n" +msgstr "%s: argument måste vara processer eller jobb-id:n" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Okänt fel" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" msgstr "uttryck förväntades" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: inte en vektorvariabel" +msgstr "%s: inte en indexerad vektor" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "%s: ogiltig filidentifierarspecifikation" +msgstr "%s: ogiltig filbeskrivarspecifikation" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" msgstr "%d: ogiltig filbeskrivare: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" msgstr "%s: ogiltigt radantal" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: ogiltig vektorstart" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" -msgstr "%s: ogiltigt återanropskvanta" +msgstr "%s: ogiltigt kvantum för återanrop" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" msgstr "tomt vektorvariabelnamn" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" msgstr "stöd för vektorvariabler krävs" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "\"%s\": formateringstecken saknas" +msgstr "”%s”: formateringstecken saknas" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "”%c”: ogiltig specifikation av tidsformat" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "\"%c\": ogiltigt formateringstecken" +msgstr "”%c”: ogiltigt formateringstecken" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" msgstr "varning: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "formattolkningsproblem: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" msgstr "hexadecimal siffra saknas för \\x" -#: builtins/pushd.def:195 +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "unicode-siffra saknas för \\%c" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "ingen annan katalog" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: ogiltigt argument" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" msgstr "katalogstacken är tom" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" msgstr "katalogstackindex" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -616,17 +720,15 @@ msgid "" " \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" +" +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" +" -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" +" med kommandot ”pushd”. Du kan komma tillbaka upp genom listan med\n" +" kommandot ”popd”.\n" " \n" " Flaggor:\n" " -c\tnollställ katalogstacken genom att bo bort alla elementen\n" @@ -640,10 +742,10 @@ msgstr "" " +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" +" -N\tVisa den N:e posten räknat 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 +#: builtins/pushd.def:723 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" @@ -677,19 +779,19 @@ msgstr "" " \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" +" \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" +" \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." +" Den inbyggda ”dirs” visar katalogstacken." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -718,63 +820,57 @@ msgstr "" " \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" +" \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" +" \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." +" Den inbyggda ”dirs” visar katalogstacken." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: ogiltig tidsgränsspecifikation" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "läsfel: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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" +msgstr "det går bara att göra ”return” från en funktion eller källinläst skript" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: inte en vektorvariabel" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: inte en funktion" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: det går inte att exportera" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "skiftantal" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 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 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" msgstr "%s: ogiltigt skalflaggsnamn" @@ -783,398 +879,474 @@ msgstr "%s: ogiltigt skalflaggsnamn" msgid "filename argument required" msgstr "filnamnsargument krävs" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: filen finns inte" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "det går inte att suspendera" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "det går inte att suspendera ett inloggningsskal" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "%s är ett alias för \"%s\"\n" +msgstr "%s är ett alias för ”%s”\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s är ett nyckelord i skalet\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s är en funktion\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s är en special inbyggd i skalet\n" + +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" msgstr "%s är inbyggt i skalet\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s är %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s är hashad (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: ogiltigt gränsargument" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "\"%c\": felaktigt kommando" +msgstr "”%c”: felaktigt kommando" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: kan inte avgöra gränsen: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "gräns" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: kan inte ändra gränsen: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "oktalt tal" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "\"%c\": ogiltig operator för symboliskt läge" +msgstr "”%c”: ogiltig operator för symboliskt läge" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "\"%c\": ogiltigt tecken för symboliskt läge" +msgstr "”%c”: ogiltigt tecken för symboliskt läge" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " msgstr " rad " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "senaste kommando: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Avbryter..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "INFORMATION: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "FELSÖKNINGS-varning: " + +#: error.c:488 msgid "unknown command error" msgstr "okänt kommandofel" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "felaktig kommandotyp" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "felaktig anslutning" -#: error.c:409 +#: error.c:491 msgid "bad jump" msgstr "felaktigt hopp" -#: error.c:447 +#: error.c:529 #, 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\atiden gick ut i väntan på indata: automatisk utloggning\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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" +msgstr "det går inte att omdirigera standard in från /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "TIMEFORMAT: \"%c\": ogiltigt formateringstecken" +msgstr "TIMEFORMAT: ”%c”: ogiltigt formateringstecken" -#: execute_cmd.c:2075 +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] finns fortfarande" + +#: execute_cmd.c:2524 msgid "pipe error" msgstr "rörfel" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: maximal nästning av eval överskriden (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: maximal nästning av source överskriden (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: maximal nästning av funktioner överskriden (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "%s: begränsat: det går inte att ange \"/\" i kommandonamn" +msgstr "%s: begränsat: det går inte att ange ”/” i kommandonamn" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: kommandot finns inte" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: det går inte att köra: en nödvändig fil finns inte" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: felaktig tolk" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: det går inte att köra binär fil: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "”%s”: är en speciell inbyggd" + +#: execute_cmd.c:6175 #, 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 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "rekursionsnivå i uttryck överskriden" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" msgstr "underspill i rekursionsstacken" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "syntaxfel i uttrycket" -#: expr.c:419 +#: expr.c:522 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 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "syntaxfel i variabeltilldelning" + +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "division med 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "bug: felaktig expassign-token" +msgstr "fel: felaktig expassign-symbol" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "\":\" förväntades i villkorligt uttryck" +msgstr "”:” förväntades i villkorligt uttryck" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "exponenten är mindre än 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" msgstr "en identifierare förväntades efter pre-ökning eller pre-minskning" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "\")\" saknas" +msgstr "”)” saknas" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" msgstr "syntaxfel: en operand förväntades" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" msgstr "syntaxfel: ogiltig aritmetisk operator" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s%s%s: %s (felsymbol är \"%s\")" +msgstr "%s%s%s: %s (felsymbol är ”%s”)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" msgstr "ogiltig aritmetisk bas" -#: expr.c:1280 +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "felaktig heltalskonstant" + +#: expr.c:1603 msgid "value too great for base" msgstr "värdet är för stort för basen" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: uttrycksfel\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: det går inte att komma åt föräldrakatalogen" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, 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 +#: input.c:266 #, 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" +msgstr "det går inte att allokera en ny filbeskrivare för bashindata från fb %d" -#: input.c:266 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp rör" -#: jobs.c:887 +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 #, c-format msgid "forked pid %d appears in running job %d" -msgstr "avgrenad pid %d fins i körande jobb %d" +msgstr "avgrenad pid %d finns i körande jobb %d" -#: jobs.c:1005 +#: jobs.c:1397 #, 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 +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: ingen sådan pid" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Signal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" msgstr "Klart" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "Stoppat" +msgstr "Stoppad" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" -msgstr "Stoppat(%s)" +msgstr "Stoppad(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Kör" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" msgstr "Klart(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Avslut %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Okänd status" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " msgstr "(minnesutskrift skapad) " -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (ak: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" msgstr "barns setpgid (%ld till %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, 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 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: Ingen uppgift om process %ld" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: jobb %d är stoppat" -#: jobs.c:2829 +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: inga aktuella jobb" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: jobbet har avslutat" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" msgstr "%s: jobb %d är redan i bakgrunden" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: slår på WNOHANG för att undvika oändlig blockering" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " msgstr "%s: rad %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" msgstr " (minnesutskrift skapad)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" msgstr "(ak nu: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp misslyckades" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: ingen jobbstyrning i bakgrunden" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" msgstr "initialize_job_control: linjedisciplin" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" msgstr "det går inte att sätta terminalprocessgrupp (%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" msgstr "ingen jobbstyrning i detta skal" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: försäkran misslyckades: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" @@ -1183,58 +1355,66 @@ msgstr "" "\r\n" "malloc: %s:%d: försäkran gick fel\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "okänd" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" msgstr "malloc: block på frilista överskrivet" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" msgstr "free: anropad med redan frigjort block som argument" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" msgstr "free: anropad med oallokerat block som argument" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 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 +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: underspill upptäckt: magic8 är trasig" + +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" msgstr "free: start- och slutstyckesstorlekar skiljer" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" msgstr "realloc: anropat med oallokerat block som argument" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 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 +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: underspill upptäckt: magic8 är trasig" + +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "realloc: start- och slutstycesstorlekar skiljer" +msgstr "realloc: start- och slutstyckesstorlekar skiljer" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "ogiltig bas" @@ -1253,262 +1433,298 @@ msgstr "%s: ogiltig tjänst" msgid "%s: bad network path specification" msgstr "%s: felaktig specifikation av nätverkssökväg" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "nätverksoperationer stöds inte" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: det går inte att ändra lokal (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: det går inte att ändra lokal (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s: %d: kan inte allokera %lu byte" +msgstr "setlocale: %s: det går inte att ändra lokal (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s: %d: kan inte allokera %lu byte" +msgstr "setlocale: %s: det går inte att ändra lokal (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Du har post i $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Du har ny post i $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "Posten i %s har lästs\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" msgstr "syntaxfel: aritmetiskt uttryck krävs" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "syntaxfel: oväntat \";\"" +msgstr "syntaxfel: oväntat ”;”" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "syntaxfel: \"((%s))\"" +msgstr "syntaxfel: ”((%s))”" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: felaktig instruktionstyp %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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\")" +msgstr "här-dokument på rad %d avgränsas av filslut (ville ha ”%s”)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" -msgstr "" -"make_redirection: omdirigeringsinstruktion \"%d\" utanför giltigt intervall" +msgstr "make_redirection: omdirigeringsinstruktion ”%d” utanför giltigt intervall" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) överstiger SIZE_MAX (%lu): raden avhuggen" -#: parse.y:3133 parse.y:3369 +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "maximalt antal av här-dokument överskridet" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "oväntat filslut vid sökning efter matchande \"%c\"" +msgstr "oväntat filslut vid sökning efter matchande ”%c”" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "oväntat filslut vid sökning efter \"]]\"" +msgstr "oväntat filslut vid sökning efter ”]]”" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "syntaxfel i villkorligt uttryck: oväntad symbol \"%s\"" +msgstr "syntaxfel i villkorligt uttryck: oväntad symbol ”%s”" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" msgstr "syntaxfel i villkorligt uttryck" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "oväntad symbol \"%s\", \")\" förväntades" +msgstr "oväntad symbol ”%s”, ”)” förväntades" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" -msgstr "\")\" förväntades" +msgstr "”)” förväntades" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "oväntat argument \"%s\" till villkorlig unär operator" +msgstr "oväntat argument ”%s” till villkorlig unär operator" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" msgstr "oväntat argument till villkorlig unär operator" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "oväntad symbol \"%s\", villkorlig binär operator förväntades" +msgstr "oväntad symbol ”%s”, villkorlig binär operator förväntades" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "villkorlig binär operato förväntades" +msgstr "villkorlig binär operator förväntades" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "oväntat argument \"%s\" till villkorlig binär operator" +msgstr "oväntat argument ”%s” till villkorlig binär operator" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" msgstr "oväntat argument till villkorlig binär operator" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" -msgstr "oväntad symbol \"%c\" i villkorligt kommando" +msgstr "oväntad symbol ”%c” i villkorligt kommando" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" -msgstr "oväntad symbol \"%s\" i villkorligt kommando" +msgstr "oväntad symbol ”%s” i villkorligt kommando" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" msgstr "oväntad symbol %d i villkorligt kommando" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "syntaxfel när den oväntade symbolen \"%s\"" +msgstr "syntaxfel nära den oväntade symbolen ”%s”" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "syntaxfel nära \"%s\"" +msgstr "syntaxfel nära ”%s”" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" msgstr "syntaxfel: oväntat filslut" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "syntaxfel" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Använd \"%s\" fär att lämna skalet.\n" +msgstr "Använd ”%s” för att lämna skalet.\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "oväntat filslut när matchande \")\" söktes" +msgstr "oväntat filslut när matchande ”)” söktes" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "komplettering: funktion \"%s\" finns inte" +msgstr "komplettering: funktion ”%s” finns inte" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: möjlig slinga av omförsök" -#: pcomplib.c:179 +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: felaktig anslutning \"%d\"" +msgstr "print_command: felaktig anslutning ”%d”" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: ogiltig filbeskrivare: %s" +msgstr "xtrace_set: %d: ogiltig filbeskrivare" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: NULL-filpekare" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "cprintf: \"%c\": ogiltigt formateringstecken" +msgstr "cprintf: ”%c”: ogiltigt formateringstecken" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "filbeskrivare utanför giltigt intervall" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: tvetydig omdirigering" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" -msgstr "%s: begränsad: det går inte att skriva över en existerande fil" +msgstr "%s: det går inte att skriva över en existerande fil" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" -msgstr "%s: begränsad: det går inte att omdirigera utdata" +msgstr "%s: begränsat: det går inte att omdirigera utdata" -#: redir.c:180 +#: redir.c:219 #, 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 +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: det går inte att tilldela listor till vektormedlemmar" +msgstr "%s: det går inte att tilldela fb till variabel" -#: redir.c:544 +#: redir.c:650 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 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" msgstr "omdirigeringsfel: det går inte att duplicera fb" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" msgstr "hittade inte /tmp, var god skapa!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" msgstr "/tmp måste vara ett giltigt katalognamn" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "läget för snygg utskrift ignoreras i interaktiva skal" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: ogiltig flagga" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "det går sätta uid till %d: effektiv uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "det går inte att sätta gid till %d: effektiv gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "kan inte starta felsökaren, felsökningsläge avaktiverat" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: är en katalog" + +#: shell.c:1907 msgid "I have no name!" msgstr "Jag har inget namn!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" msgstr "GNU bash, version %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1517,48 +1733,58 @@ msgstr "" "Användning:\t%s [GNU lång flagga] [flagga] ...\n" "\t\t%s [GNU lång flagga] [flagga] skriptfil ...\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU långa flaggor:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD eller -c kommando eller -O shopt_flagga\t\t(bara uppstart)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s eller -o flagga\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Skriv ”%s -c 'help set'” för mer information om skalflaggor.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "Skriv ”%s -c help” för mer information om inbyggda skalkommandon.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" msgstr "" -"Använd kommandot \"bashbug\" för att rapportera fel.\n" +"Använd kommandot ”bashbug” för att rapportera fel.\n" "Skicka synpunkter på översättningen till .\n" -#: sig.c:626 +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash hemsida: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Allmän hjälp i att använda GNU-program: \n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: ogiltig operation" #: siglist.c:48 msgid "Bogus signal" -msgstr "Felatkig signal" +msgstr "Felaktig signal" #: siglist.c:51 msgid "Hangup" @@ -1690,7 +1916,7 @@ msgstr "strömavbrott omedelbart förestående" #: siglist.c:191 msgid "system crash imminent" -msgstr "systemkrash omedelbart förestående" +msgstr "systemkrasch omedelbart förestående" #: siglist.c:195 msgid "migrate process to another CPU" @@ -1706,637 +1932,598 @@ msgstr "HFT-övervakningsläge givet" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "HFT-överakare borttagen" +msgstr "HFT-övervakare borttagen" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "HFT-ljudsekevens har avslutat" +msgstr "HFT-ljudsekvens 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 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" msgstr "Okänd signal nr %d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "felaktig substitution: ingen avslutande \"%s\" i %s" +msgstr "felaktig substitution: ingen avslutande ”%s” i %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" msgstr "det går inte att skapa rör för processubstitution" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" msgstr "det går inte att skapa barn för processubstitution" -#: subst.c:4847 +#: subst.c:6198 #, 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 +#: subst.c:6200 #, 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 +#: subst.c:6223 #, 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 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "kommandoersättning: ignorerade nollbyte i indata" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "det går inte att skapa rör för kommandosubstitution" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" msgstr "det går inte att skapa barn för kommandosubstitution" -#: subst.c:5114 +#: subst.c:6613 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 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: ogiltigt variabelnamn för referens" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: felaktig indirekt expansion" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: felaktigt variabelnamn" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametern är inte satt" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" msgstr "%s: parametern tom eller inte satt" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" msgstr "%s: delstränguttryck < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" msgstr "%s: felaktig substitution" -#: subst.c:7045 +#: subst.c:9678 #, 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:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "framtida versioner av skalet kommer att framtvinga evaluering som en aritmetisk substitution" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "felaktig ersättning: ingen avslutande \"`\" i %s" +msgstr "felaktig ersättning: ingen avslutande ”`” i %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "ingen match: %s" +msgstr "ingen matchning: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "argument förväntades" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: heltalsuttryck förväntades" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "\")\" förväntades" +msgstr "”)” förväntades" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "\")\" förväntades, fann %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 +#: test.c:469 test.c:814 #, c-format msgid "%s: binary operator expected" msgstr "%s: binär operator förväntades" -#: test.c:811 +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: unär operator förväntades" + +#: test.c:896 msgid "missing `]'" -msgstr "\"]\" saknas" +msgstr "”]” saknas" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "syntaxfel: oväntat ”%s”" + +#: trap.c:220 msgid "invalid signal number" msgstr "ogiltigt signalnummer" -#: trap.c:327 +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "fällhanterare: maximal nivå av fällhanterare överskriden (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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" +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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: felaktig signal %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "fel vid import av funktionsdefinition för \"%s\"" +msgstr "fel vid import av funktionsdefinition för ”%s”" -#: variables.c:748 +#: variables.c:838 #, 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 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" msgstr "make_local_variable: ingen funktionskontext i aktuellt sammanhang" -#: variables.c:3159 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: variabeln får inte tilldelas ett värde" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: det går inte att ärva ett värde från en inkompatibel typ" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: tilldelar ett heltal till en namnreferens" + +#: variables.c:4390 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 +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: parametern tom eller inte satt" +msgstr "%s har tom exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" msgstr "ogiltigt tecken %d i exportstr för %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "inget \"=\" i exportstr för %s" +msgstr "inget ”=” i exportstr för %s" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" -"pop_var_context: huvudet på shell_variables är inte en funktionskontext" +msgstr "pop_var_context: huvudet på shell_variables är inte en funktionskontext" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: ingen kontext global_variables" -#: variables.c:3922 +#: variables.c:5410 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" +msgstr "pop_scope: huvudet på shell_variables är inte en temporär omgivningsräckvidd" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: det går inte att öppna: %s" +msgstr "%s: %s: går inte att öppna som FILE" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: ogiltig filbeskrivare: %s" +msgstr "%s: %s: ogiltigt värde för spårningsfilbeskrivare" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: kompatibilitetsvärde utanför giltigt intervall" -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright © 2009 Free Software Foundation, Inc." +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright © 2022 Free Software Foundation, Inc." -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" -"Licens GPLv3+: GNU GPL version 3 eller senare \n" +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Licens GPLv3+: GNU GPL version 3 eller senare \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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." +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Detta är fri programvara, du får fritt ändra och vidaredistribuera den." -#: version2.c:87 -#, fuzzy, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" -"Licens GPLv3+: GNU GPL version 3 eller senare \n" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Det finns INGEN GARANTI, så långt lagen tillåter." -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "xmalloc: kan inte allokera %lu byte (%lu byte allokerade)" +msgstr "%s: det går inte att allokera %lu byte (%lu byte allokerade)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: kan inte allokera %lu byte" +msgstr "%s: det går inte att allokera %lu byte" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: det går inte att allokera %lu byte (%lu byte allokerade)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s: %d: kan inte allokera %lu byte" +msgstr "%s: %s:%d: det går inte att allokera %lu byte" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" msgstr "alias [-p] [namn[=värde] ... ]" -#: builtins.c:47 +#: builtins.c:49 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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpvsPVSX] [-m tangentkarta] [-f filnamn] [-q namn] [-u namn] [-r tangentsekv] [-x tangentsekv:skalkommando] [tangentsekv:readline-funktion eller readline-kommando]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" msgstr "builtin [skalinbyggd [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 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]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [kat]" #: builtins.c:68 -msgid ":" -msgstr ":" - -#: builtins.c:70 -msgid "true" -msgstr "true" - -#: builtins.c:72 -msgid "false" -msgstr "false" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" -#: builtins.c:74 +#: builtins.c:76 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] ..." +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [namn[=värde] …] eller declare -p [-aAfFilnrtux] [namn …]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] namn[=värde] … eller typeset -p [-aAfFilnrtux] [namn …]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." msgstr "local [flagga] namn[=värde] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" msgstr "echo [-n] [arg ...]" -#: builtins.c:90 +#: builtins.c:92 msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "enable [-a] [-dnps] [-f filenamn] [namn ...]" +msgstr "enable [-a] [-dnps] [-f filnamn] [namn ...]" -#: builtins.c:92 +#: builtins.c:94 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 ...]" +msgid "getopts optstring name [arg ...]" +msgstr "getopts flgsträng namn [arg …]" #: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a namn] [kommando [argument ...]] [omdirigering ...]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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]" +msgstr "fc [-e rnamn] [-lnr] [första] [sista] eller fc -s [mnst=ers] [kommando]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" msgstr "fg [jobbspec]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" msgstr "bg [jobbspec ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" msgstr "hash [-lr] [-p sökväg] [-dt] [namn ...]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [mönster ...]" +msgstr "help [-dms] [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:123 +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 +#: builtins.c:127 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobbspec … | pid …]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "let arg [arg ...]" +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: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 ...]" +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "return [n]" +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] [-N ntkn] [-p prompt] [-t tidgräns] [-u fb] [namn ...]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "set [--abefhkmnptuvxBCHP] [-o flaggnamn] [arg ...]" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "unset [-f] [-v] [namn ...]" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o flaggnamn] [--] [-] [arg …]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "export [-fn] [namn[=värde] ...] eller export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [namn …]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "readonly [-af] [namn[=värde] ...] eller readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [namn[=värde] ...] eller export -p" #: builtins.c:148 -msgid "shift [n]" -msgstr "skift [n]" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [namn[=värde] ...] eller readonly -p" #: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 msgid "source filename [arguments]" msgstr "source filnamn [argument]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" msgstr ". filnamn [argument]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" msgstr "suspend [-f]" -#: builtins.c:158 +#: builtins.c:160 msgid "test [expr]" msgstr "test [uttr]" -#: builtins.c:160 +#: builtins.c:162 msgid "[ arg... ]" msgstr "[ arg... ]" -#: builtins.c:162 -msgid "times" -msgstr "times" - -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" msgstr "trap [-lp] [[arg] signalspec ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" msgstr "type [-afptP] namn [namn ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [gräns]" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [gräns]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" msgstr "umask [-p] [-S] [rättigheter]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "wait [id]" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p var] [id …]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "wait [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid …]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" msgstr "for NAMN [in ORD ... ] ; do KOMMANDON; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" msgstr "for (( utr1; utr2; utr3 )); do KOMMANDON; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" msgstr "select NAMN [in ORD ... ;] do KOMMANDON; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" msgstr "time [-p] rör" -#: builtins.c:190 +#: builtins.c:192 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" +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:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until KOMMANDON; do KOMMANDON; done" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while KOMMANDON; do KOMMANDON-2; done" #: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until KOMMANDON; do KOMMANDON-2; done" + +#: builtins.c:200 msgid "coproc [NAME] command [redirections]" msgstr "coproc [NAMN] kommando [omdirigeringar]" -#: builtins.c:200 +#: builtins.c:202 msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" msgstr "function namn { KOMMANDON ; } or namn () { KOMMANDON ; }" -#: builtins.c:202 +#: builtins.c:204 msgid "{ COMMANDS ; }" msgstr "{ KOMMANDON ; }" -#: builtins.c:204 +#: builtins.c:206 msgid "job_spec [&]" msgstr "jobbspec [&]" -#: builtins.c:206 +#: builtins.c:208 msgid "(( expression ))" msgstr "(( uttryck ))" -#: builtins.c:208 +#: builtins.c:210 msgid "[[ expression ]]" msgstr "[[ uttryck ]]" -#: builtins.c:210 +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" msgstr "variabler - Namn och betydelse av några skalvariabler" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | kat]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" msgstr "shopt [-pqsu] [-o] [flgnamn ...]" -#: builtins.c:226 +#: builtins.c:228 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-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:235 +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: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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o flagga] [-DEI] [namn …]" #: 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]" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d avgränsare] [-n antal] [-O start] [-s antal] [-t] [-u fb] [-C återanrop] [-c kvanta] [vektor]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d avgränsare] [-n antal] [-O start] [-s antal] [-t] [-u fb] [-C återanrop] [-c kvanta] [vektor]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2348,47 +2535,45 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" 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" +" Utan argument 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" +" Ett avslutande 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" +" -p\tskriv alla definierade alias 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 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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" +" -a\tta bort alla aliasdefinitioner\n" " \n" " Returnerar framgång om inte ett NAMN inte är ett existerande alias." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2400,75 +2585,69 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\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" +" 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" +" 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" +" 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" +" -P Lista funktionsnamn och bindningar.\n" +" -p Lista funktioner och bindningar på ett sätt som kan\n" " återanvändas som indata.\n" -" -S Lista tangentsekvenser som anropar makron och " -"deras\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" +" -s Lista tangentsekvenser 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" +" -q funktionsnamn Fråga efter vilka tangenter som anropar 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" +" -x tangentsekv:skalkommando Gör så att SKALKOMMANDO körs när\n" " \t\t\t\t TANGENTSEKV skrivs.\n" +" -X Lista tangentsekvenser bundna med -x och tillhörande\n" +" kommandon på ett format som kan återanvändas som\n" +" indata.\n" " \n" " Slutstatus:\n" " bind returnerar 0 om inte en okänd flagga ges eller ett fel inträffar." -#: builtins.c:326 +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2486,7 +2665,7 @@ msgstr "" " Slutstatus:\n" " Returvärdet är 0 förutsatt att N är större eller lika med 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2498,40 +2677,36 @@ msgid "" msgstr "" "Återuppta for-, while eller until-slinga.\n" " \n" -" Återuppta nästa iteration i den omslutande FOR-, WHILE- eller UNTIL-" -"slingan.\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 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" "Exekvera en i skalet inbyggd funktion.\n" " \n" -" Exekvera SKALINBYGGD med argument ARG utan att utföra " -"kommandouppslagning.\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" +" Returnerar slutstatus från SKALINBYGGD, eller falskt om SKALINBYGGD inte\n" " är inbyggd i skalet." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2548,8 +2723,8 @@ msgid "" 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" +" 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" @@ -2559,37 +2734,41 @@ msgstr "" " Returnerar 0 om inte skalet inte kör en skalfunktion eller UTTR är\n" " ogiltigt." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." msgstr "" "Ändra skalets arbetskatalog.\n" " \n" @@ -2601,29 +2780,36 @@ msgstr "" " 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" +" 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" +" -L\tframtvinga att symboliska länkar följs: lös upp symboliska\n" +" \tKAT efter behandling av instanser av ”..”\n" " -P\tanvänd den fysiska katalogstrukturen utan att följa\n" -" \tsymboliska länkar\n" +" \tsymboliska länkar: lös upp symboliska länkar i KAT före behandling av\n" +" \t”..”\n" +" -e\tom flaggan -P ges, och det inte går att avgöra den aktuella\n" +" \tkatalogen, returnera då med status skild från noll\n" +" -@ på system som stödjer det, presentera en fil med utökade attribut\n" +" som en katalog som innehåller filattributen\n" " \n" -" Standardvärde är att följa symboliska längar, som om \"-L\" vore " -"angivet.\n" +" Standardvärde är att följa symboliska länkar, som om ”-L” vore angivet.\n" +" ”..” behandlas genom att ta bort den omedelbart föregående\n" +" sökvägskomponenten tillbaka till ett snedstreck eller början av KAT\n" " \n" " Slutstatus:\n" -" Returnerar 0 om katalogen är ändrad; skilt från noll annars." +" Returnerar 0 om katalogen är ändrad, och om $PWD satts korrekt om -P\n" +" angetts; skilt från noll annars." -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2636,17 +2822,16 @@ msgstr "" " \n" " Flaggor:\n" " -L\tskriv värdet på $PWD om det är namnet på den aktuella\n" -" \tarbetskatalogen\n" +" \t\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" +" 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" +" Returnerar 0 om inte en ogiltig flagga anges eller den aktuella katalogen\n" " inte kan läsas." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2662,7 +2847,7 @@ msgstr "" " Slutstatus:\n" " Lyckas alltid." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" @@ -2674,7 +2859,7 @@ msgstr "" " Slutstatus:\n" " Lyckas alltid." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2686,20 +2871,19 @@ msgstr "" " Slutstatus:\n" " Misslyckas alltid." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print a more verbose description of each COMMAND\n" " \n" " Exit Status:\n" " Returns exit status of COMMAND, or failure if COMMAND is not found." @@ -2711,17 +2895,16 @@ msgstr "" " 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" +" -p använd ett standardvärde på PATH som är garanterat att hitta\n" +" \t alla standardverktygen\n" +" -v skriv en beskrivning av KOMMANDO liknande den inbyggda ”type”\n" +" -V skriv en mer utförlig beskrivning om varje KOMMANDO\n" " \n" " Slutstatus:\n" -" Returnerar slutstatus från KOMMANDO, eller misslyckande om KOMMANDO " -"inte\n" +" Returnerar slutstatus från KOMMANDO, eller misslyckande om KOMMANDO inte\n" " finns." -#: builtins.c:476 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2731,17 +2914,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2749,12 +2937,12 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" "Sätt variabelvärden och -attribut.\n" " \n" @@ -2764,43 +2952,47 @@ msgstr "" " 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" +" \t\toch källkodsfil vid felsökning)\n" +" -g\tskapa globala variabler när använt i en skalfunktion, ignoreras\n" +" \t\ti övrigt\n" +" -I\tom en lokal variabel skapas, ärv attributen och värdet från\n" +" \t\ten variabel med samma namn i en tidigare räckvidd\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" +" -i\tför att ge NAMN attributet ”heltal”\n" +" -l\tför att konvertera värdet av varje NAMN till gemena vid tilldelning\n" +" -n\tgör NAMN till en referens till variabeln som namnges som värde\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" +" -t\tför att ge NAMN attributet ”spåra”\n" +" -u\tför att konvertera värdet av varje 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" +" 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" +" För variabler med attributet heltal utförs aritmetisk 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" +" Vid användning i en funktion gör ”declare” NAMN lokala, som med kommandot\n" +" ”local”. Flaggan ”-g” åsidosätter detta beteende.\n" " \n" " Slutstatus:\n" -" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " -"inträffar." +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel vid\n" +" variabeltilldelning inträffar." -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" "Sätt variabelvärden och -attribut.\n" " \n" -" Föråldrat. Se \"help declare\"." +" En synonym för ”declare”. Se ”help declare”." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2811,27 +3003,27 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, 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" +" vara alla flaggor som accepteras av ”declare”.\n" " \n" -" Lokala variabler kan endast användas i en funktion; de är synliga " -"endast\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." +" Returnerar framgång om inte en ogiltig flagga ges, ett fel vid\n" +" variabeltilldelning inträffar eller skalet inte exekverar en funktion." -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2843,6 +3035,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2850,27 +3043,33 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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" +" Visa ARGumenten, separerade av ensamma blanktecken och följda av en\n" +" nyrad, på standard ut.\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" +" ”echo” tolkar följande bakstrecksekvenser:\n" " \\a\talarm (klocka)\n" " \\b\tbacksteg\n" " \\c\tundertryck följande utdata\n" " \\e\tescape-tecknet\n" +" \\E\tescape-tecknet\n" " \\f\tsidmatning\n" " \\n\tnyrad\n" " \\r\tvagnretur\n" @@ -2878,14 +3077,18 @@ msgstr "" " \\v\tvertikal tabulator\n" " \\\\\tbakstreck\n" " \\0nnn\ttecknet vars ASCII-kod är NNN (oktalt). NNN kan vara\n" -" \t0 till 3 oktala siffror\n" +" \t\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" +" \t\tkan vara en eller två hexadecimala siffror\n" +" \\uHHHH\tdet Unicode-tecken vars värde är det hexadeimala värdet HHHH.\n" +" \t\tHHHH kan vara en till fyra hexadecimala siffror.\n" +" \\UHHHHHHHH det Unicode-tecken vars värde är det hexadecimala värdet\n" +" \t\tHHHHHHHH. HHHHHHHH kan vara en till åtta hexadecimala siffror.\n" " \n" " Slutstatus:\n" " Returnerar framgång om inte ett skrivfel inträffar." -#: builtins.c:571 +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2907,7 +3110,7 @@ msgstr "" " Slutstatus:\n" " Returnerar framgång om inte ett skrivfel inträffar." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2944,29 +3147,28 @@ msgstr "" " \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" +" -p\tskriv listan av inbyggda kommandon på en återanvändbar\n" " \tform\n" -" -s\tskriv endast namnen på Posix \"special\"-inbyggda\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" +" -f\tLäs in 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" +" 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 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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" @@ -2974,14 +3176,13 @@ msgid "" msgstr "" "Exekvera argument som ett skalkommando.\n" " \n" -" Kombinera ARGument till en enda sträng, och använd resultatet som " -"indata\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 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -3014,8 +3215,8 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, they are parsed instead.\n" " \n" " Exit Status:\n" " Returns success if an option is found; fails if the end of options is\n" @@ -3033,7 +3234,7 @@ msgstr "" " 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" +" initieras till 1 varje gång skalet eller ett skalskript startas. När\n" " en flagga behöver ett argument placerar getopts det argumentet i\n" " skalvariabeln OPTARG.\n" " \n" @@ -3041,49 +3242,45 @@ msgstr "" " 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" +" 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" +" 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" +" Getopts tolkar normalt positionsparametrarna, men om argument ges\n" +" som ARG-värden 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 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" 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" +" 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" @@ -3093,13 +3290,13 @@ msgstr "" " -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" +" inte skalflaggan ”execfail” är satt.\n" " \n" -" Sluttatus:\n" +" Slutstatus:\n" " Returnerar framgång om inte KOMMANDO inte finns eller ett fel vid\n" " omdirigering inträffar." -#: builtins.c:689 +#: builtins.c:715 msgid "" "Exit the shell.\n" " \n" @@ -3111,12 +3308,11 @@ msgstr "" " Avslutar skalet med statusen N. Om N utelämnas är slutstatusen den\n" " hos det sist körda kommandot." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\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" @@ -3124,19 +3320,17 @@ msgstr "" " Avslutar ett inloggningsskal med slutstatus N. Returnerar ett fel om\n" " det inte körs i ett inloggningsskal." -#: builtins.c:708 +#: builtins.c:734 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" +" 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" +" -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" @@ -3150,8 +3344,7 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" Returns success or status of executed command; non-zero if an error occurs." msgstr "" "Visa eller kör kommandon från historielistan.\n" " \n" @@ -3167,20 +3360,18 @@ msgstr "" " -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" +" 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" +" 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 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3201,14 +3392,12 @@ msgstr "" " Status på kommandot som placerades i förgrunden, eller misslyckande om\n" " ett fel inträffar." -#: builtins.c:753 +#: builtins.c:779 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" +" 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" @@ -3216,35 +3405,31 @@ msgid "" 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" +" Placera jobben som identifieras 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" +" Returnerar framgång om inte jobbstyrning inte är aktiverat eller ett fel\n" " inträffar." -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\tEach NAME is searched for in $PATH and added to the list\n" " \t\tof remembered commands.\n" " \n" " Exit Status:\n" @@ -3253,24 +3438,23 @@ 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" +" 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" +" -d\tglöm platsen i minnet för varje NAMN\n" +" -l\tvisa i ett format som kan återanvändas som indata\n" +" -p sökväg använd SÖKVÄG som den fullständiga sökvägen till NAMN\n" +" -r\tglöm alla platser i minnet\n" +" -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" +" NAMN\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 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -3282,36 +3466,33 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" 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" +" 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" +" \t\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." +" Returnerar framgång om inte MÖNSTER inte finns eller en ogiltig flagga ges." -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -3320,26 +3501,26 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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." @@ -3347,37 +3528,34 @@ 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" +" ”*”. 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" +" -d avstånd\tta bort historieposten på position AVSTÅND. Negativa\n" +" \t\tavstånd räknar baklänges från slutet av historielistan \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" +" \t\toch lägg till dem till historielistan\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" +" -w\tskriv den aktuella historien till historiefilen\n" " \n" " -p\tutför historieexpansion på varje ARG och visa resultatet utan\n" -" \tatt lagra det i historielistan\n" +" \t\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" +" Om FILNAMN 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" +" 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." +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel inträffar." -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3386,8 +3564,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3408,7 +3586,7 @@ msgstr "" " 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" +" notifiering\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" @@ -3417,11 +3595,10 @@ msgstr "" " 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" +" 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 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3431,7 +3608,7 @@ msgid "" " 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" +" \t\tshell receives a SIGHUP\n" " -r\tremove only running jobs\n" " \n" " Exit Status:\n" @@ -3445,13 +3622,13 @@ msgstr "" " 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" +" \t\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 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3463,7 +3640,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3474,36 +3652,33 @@ msgid "" msgstr "" "Skicka en signal till ett jobb.\n" " \n" -" Skicka processerna som identifieras av PID eller JOBBSPEC signalerna " -"som\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" +" -l\tlista signalnamnen. Om argument följer ”-l” antas de vara\n" +" \t\tsignalnummer som namn skall listas för\n" +" -L\tsynonym för -l\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" +" 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 +#: builtins.c:949 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" +" 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" @@ -3537,23 +3712,21 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" 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" +" 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" +" 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\texponentiering\n" " \t*, /, %\t\tmultiplikation, division, rest\n" " \t+, -\t\taddition, subtraktion\n" " \t<<, >>\t\tvänster och höger bitvisa skift\n" @@ -3564,7 +3737,7 @@ msgstr "" " \t|\t\tbitvis ELLER\n" " \t&&\t\tlogiskt OCH\n" " \t||\t\tlogiskt ELLER\n" -" \tuttf ? uttr : uttr\n" +" \tuttr ? uttr : uttr\n" " \t\t\tvillkorlig operator\n" " \t=, *=, /=, %=,\n" " \t+=, -=, <<=, >>=,\n" @@ -3575,102 +3748,102 @@ msgstr "" " 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" +" Operatorer beräknas i precedensordning. Deluttryck 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." +" Om det sista ARG beräknas till 0, returnerar let 1; let returnerar 0 annars." -#: builtins.c:966 -#, fuzzy +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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" +" 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" +" NAMNet. Endast tecknen som finns i $IFS används som ordavgränsare. Som\n" +" standard skyddar tecknet omvänt snedstreck avgränsningstecken och\n" +" nyrad.\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" +" -a vektor\ttilldela de inlästa orden till sekventiella 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" +" -e\tanvänd Readline för att få in raden\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" +" \t\tvänta på en nyrad, men ta hänsyn till en avgränsare om färre\n" +" \t\tän NTKN tecken lästs före avgränsaren\n" +" -N ntkn\treturnera endast efter att ha läst exakt NTKN tecken, om inte\n" +" \t\tfilslut påträffades eller tidsgränsen överskreds, ignorera\n" +" \t\talla avgränsare\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" +" -r\ttillåt inte bakstreck att skydda några tecken\n" +" -s\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\tdecimaltal. Om TIDSGRÄNS är 0 returnerar read direkt, utan\n" +" att försöka läsa några data, och returnerar 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" +" -u fb\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." +" (då den är större än 128), ett fel vid variabeltilldelning inträffar eller\n" +" en ogiltig filbeskrivare ges som argument till -u." -#: builtins.c:1009 +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3691,7 +3864,7 @@ msgstr "" " Returnerar N, eller misslyckande om skalet inte kör en funktion eller\n" " skript." -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3734,8 +3907,7 @@ msgid "" " 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" +" 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" @@ -3757,9 +3929,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3779,12 +3954,11 @@ msgstr "" " \n" " Flaggor:\n" " -a Markera variabler om ändras eller skapas för export.\n" -" -b Rapportera om avlutade jobb omedelbart.\n" +" -b Rapportera om avslutade 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" +" -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" @@ -3799,8 +3973,7 @@ msgstr "" " 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" +" 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" @@ -3816,7 +3989,7 @@ msgstr "" " 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" +" noll, eller noll 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" @@ -3827,8 +4000,7 @@ msgstr "" " 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" +" 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" @@ -3838,17 +4010,18 @@ msgstr "" " -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" +" -H Aktivera historiesubstitution 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" +" -P Om satt löses inte symboliska länkar upp när kommandon såsom cd\n" +" körs som ändrar aktuell katalog.\n" +" -T Om satt ärvs DEBUG och RETURN-fällorna av skalfunktioner.\n" +" -- Tilldela eventuella återstående argument till positionsparametrar.\n" +" Om det inte finns några återstående argument nollställs\n" +" positionsparametrarna.\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" +" 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" @@ -3857,7 +4030,7 @@ msgstr "" " Slutstatus:\n" " Returnerar framgång om inte en ogiltig flagga ges." -#: builtins.c:1104 +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3866,9 +4039,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3883,23 +4057,24 @@ msgstr "" " Flaggor:\n" " -f\tbehandla varje NAMN som en skalfunktion\n" " -v\tbehandla varje NAMN som en skalvariabel\n" +" -n\tbehandla varje NAMN som en namnreferens tar bort värdet på\n" +" variabeln själv istället för variabeln den refererar\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å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 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3921,12 +4096,12 @@ msgstr "" " -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" +" 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 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3938,7 +4113,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3953,16 +4129,17 @@ msgstr "" " \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" +" -A\trefererar till associativa vektorvariabler\n" +" -f\treferera till skalfunktioner\n" +" -p\tvisa en lista över alla oföränderliga variabler eller funktioner,\n" +" beroende på huruvida flaggan -f ges\n" " \n" -" Ett argument \"--\" avslutar vidare flaggbearbetning.\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 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3974,14 +4151,13 @@ msgid "" msgstr "" "Skifta positionsparametrar.\n" " \n" -" Byt namn på positionsparametrarna $N+1,$N+2 ... till $1,$2 ... Om N " -"inte\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 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3996,8 +4172,7 @@ msgid "" 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" +" 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" @@ -4005,7 +4180,7 @@ msgstr "" " Returnerar status på det sista kommandot som körs i FILNAMN, misslyckas\n" " om FILNAMN inte kan läsas." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4027,18 +4202,20 @@ msgstr "" " -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" +" Returnerar framgång om inte jobbstyrning inte är aktiverat eller ett fel\n" " inträffar." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4062,8 +4239,7 @@ msgid "" " -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 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" @@ -4084,14 +4260,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4112,7 +4290,10 @@ msgstr "" " 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" +" strängoperatorer och numeriska jämförelseoperatorer också.\n" +" \n" +" Beteendet hos test beror på antalet argument. Läs bash-manualsidan\n" +" för den fullständiga specifikationen.\n" " \n" " Filoperatorer:\n" " \n" @@ -4122,16 +4303,16 @@ msgstr "" " -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" +" -g FIL Sant om filen är sätt-grupp-id.\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" +" -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" +" -u FIL Sant om filen är sätt-användar-id.\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" @@ -4164,6 +4345,8 @@ msgstr "" " Andra operatorer:\n" " \n" " -o FLAGGA Sant om skalflaggan FLAGGA är aktiv.\n" +" -v VAR Sant om skalvariabeln VAR är satt.\n" +" -R VAR Sant om skalvariabeln VAR är satt och är en namnreferens.\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" @@ -4179,7 +4362,7 @@ msgstr "" " 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 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4188,16 +4371,14 @@ msgid "" 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 \"[\"." +" 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 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\n" +" Prints the accumulated user and system times for the shell and all of its\n" " child processes.\n" " \n" " Exit Status:\n" @@ -4205,19 +4386,17 @@ msgid "" msgstr "" "Visa processtider.\n" " \n" -" Skriver ut den sammanlagda användar- och systemtiden för skalet och " -"alla\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 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -4226,26 +4405,26 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" Returns success unless a SIGSPEC is invalid or an invalid option is given." msgstr "" "Fånga signaler och andra händelser.\n" " \n" @@ -4254,15 +4433,18 @@ msgstr "" " \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" +" eller ”-” återställs varje angiven signal till sitt originalvärde. Om\n" +" ARG är den tomma strängen ignoreras 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" +" en SIGNALSPEC är DEBUG exekveras ARG före varje enkelt kommando. Om\n" +" en SIGNALSPEC är RETURN exekveras ARG varje gång en skalfunktion eller\n" +" ett skript kört med den inbyggda . eller source avslutar körningen. En\n" +" SIGNALSPEC ERR betyder att köra ARG varje gång ett kommandos felstatus\n" +" skulle fått skalet att avsluta om flaggan -e vore satt.\n" " \n" -" Om inga argument ges skriver trap listan av kommandon som hör till " -"varje\n" +" Om inga argument ges skriver trap listan av kommandon som hör till varje\n" " signal.\n" " \n" " Flaggor:\n" @@ -4271,14 +4453,13 @@ msgstr "" " \n" " Varje SIGNALSPEC är antingen ett signalnamn i 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" +" 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" +" Returnerar framgång om inte en SIGSPEC är ogiltig eller en ogiltig flagga\n" " ges." -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4287,25 +4468,24 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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." +" Returns success if all of the NAMEs are found; fails if any are not found." msgstr "" "Visa information om kommandotyper.\n" " \n" @@ -4313,34 +4493,31 @@ msgstr "" " 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" +" -a\tvisa alla platser som innehåller ett körbart program med namnet\n" +" \t\tNAMN, inklusive alias, inbyggda och funktioner, om och endast\n" +" \t\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" +" \t\talias, inbyggt eller funktion, och returnera namnet på diskfilen\n" +" \t\tsom skulle 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" +" \t\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\t”function”, ”builtin”, ”file” eller ””, om NAMN är ett alias, ett\n" +" \t\treserverat ord i skalet, en skalfunktion, inbyggt i skalet, en\n" +" \t\tdiskfil respektive inte finns\n" " \n" " Argument:\n" -" NAMN\tKomandonamn som skall tolkas.\n" +" NAMN\tKommandonamn som skall tolkas.\n" " \n" " Slutstatus:\n" " Returnerar framgång om alla NAMNen finns, misslyckas om något inte finns." -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -4353,6 +4530,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4364,6 +4542,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4380,50 +4563,52 @@ msgid "" msgstr "" "Modifiera skalresursgränser.\n" " \n" -" Ger kontroll över resurserna som är tillgängliga till skalet och " -"processer\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" +" -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" +" -d\tden maximala storleken på en process datasegment\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" +" -k\tdet maximala antalet kqueue:r allokerade för denna process\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" +" -r\tden maximala prioriteten för realtidsschemaläggning\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" +" -P det maximala antalet pseudoterminaler\n" +" -R\tden maximala tiden en realtisprocess får köra innan den\n" +" \tblockerar\n" +" -T det maximala antalet trådar\n" +" \n" +" Alla flaggor är inte tillgängliga på alla plattformar.\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" +" 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 ingen 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" +" 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." +" Returnerar framgång om inte en ogiltig flagga anges eller ett fel inträffar." -#: builtins.c:1428 +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4445,8 +4630,7 @@ msgstr "" " 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" +" 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" @@ -4455,66 +4639,82 @@ msgstr "" " -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" +" Returnerar framgång om inte RÄTTIGHETER är ogiltig eller en ogiltig flagga\n" " ges." -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -"Vänta på att jobb blir färdiga och returnerar slutstatus.\n" +"Vänta på att jobb blir färdiga och returnera 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" +" Väntar på varje process som identifieras av ett ID, som kan vara en\n" +" process-id eller en jobbspecifikation, och rapportera dess\n" +" avslutningsstatus. Om ID inte ges, vänta på alla nu körande\n" +" barnprocesser, och returstatus är noll. Om ID är en jobbspecifikation, \n" +" vänta på alla processer i det jobbets rör.\n" +" \n" +" Om flaggan -n ges väntar på ett enda jobb från listan av ID:n, eller, om\n" +" inga ID:n ges, nästa jobb som avslutar och returnera dess slutstatus.\n" +" \n" +" Om flaggan -p ges tilldelas till variabeln VAR som ges som ges som\n" +" argument till flaggan process- eller jobbidentifieraren för jobbet\n" +" för vilket slutstatus returneras. Variabeln görs osatt initialt, före\n" +" någon tilldelning. Detta är användbart endast när flaggan -n ges.\n" +" \n" +" Om flaggan -f anges, och jobbstyrning är aktiverat, väntar på att det\n" +" angivna ID:t avslutas, istället för att vänta på att det ändrar status.\n" " \n" " Slutstatus:\n" -" Returnerar status på ID, misslyckas ifall ID är ogiltig eller en " -"ogiltig\n" -" flagga ges." +" Returnerar status på den sista ID, misslyckas ifall ID är ogiltig\n" +" eller en ogiltig flagga ges." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is 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" +" Väntar på varje process som identifieras av en PID rapporterar dess\n" +" slutstatus. Om PID inte ges, väntar på alla nu körande barnprocesser,\n" +" och returstatus är 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." +" Returnerar status på den sista PID, misslyckas ifall PID är ogiltig\n" +" eller en ogiltig flagga ges." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4528,16 +4728,15 @@ msgid "" 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" +" ”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 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4567,7 +4766,7 @@ msgstr "" " Slutstatus:\n" " Returnerar statusen från det sist exekverade kommandot." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4599,10 +4798,10 @@ msgstr "" " REPLY. KOMMANDON exekveras efter varje val tills ett\n" " break-kommando exekveras.\n" " \n" -" Sluttatus:\n" +" Slutstatus:\n" " Returnerar statusen från det sist exekverade kommandot." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4626,12 +4825,12 @@ msgstr "" " Flaggor:\n" " -p\tskriv tidssammanfattningen i det portabla Posix-formatet\n" " \n" -" Värdet på variablen TIMEFORMAT används som utmatningsformat.\n" +" Värdet på variabeln TIMEFORMAT används som utmatningsformat.\n" " \n" " Slutstatus:\n" " Returstatusen är returstatusen från RÖR." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4644,84 +4843,76 @@ 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" +" ”|” används för att separera flera mönster.\n" " \n" " Slutstatus:\n" " Returnerar statusen från det sist exekverade kommandot." -#: builtins.c:1563 +#: builtins.c:1631 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" +" 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" +" `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" +"Exekvera kommandon 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" +" Listan ”if KOMMANDON” exekveras. Om dess slutstatus är noll så exekveras\n" +" listan ”then KOMMANDON”. 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" +" lista ”then KOMMANDON” och if-kommandot avslutar. Annars exekveras listan\n" +" ”else KOMMANDON” 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 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +" Expandera och exekvera KOMMANDON-2 så länge det sista kommandot i\n" +" KOMMANDON har en slutstatus på noll.\n" " \n" " Slutstatus:\n" " Returnerar statusen från det sist exekverade kommandot." -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" 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" +" Expandera och exekvera KOMMANDON-2 så länge det sista kommandot i\n" +" KOMMANDON har en slutstatus som inte är noll.\n" " \n" " Slutstatus:\n" " Returnerar statusen från det sist exekverade kommandot." -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4731,25 +4922,24 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -"Skapa en koprocess med namnet NAMN.\n" +"Skapa en ko-process 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" +" ansluta via ett rör till filbeskrivare tilldelade indexen 0 och 1 i\n" " en vektorvariabel NAMN i skalet som kör. Standardvärde på NAMN är\n" -" \"COPROC\".\n" +" ”COPROC”.\n" " \n" " Slutstatus:\n" -" Returnerar statusen från KOMMANDO." +" Kommandot coproc returnerar slutstatusen 0." -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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" @@ -4766,7 +4956,7 @@ msgstr "" " Slutstatus:\n" " Returnerar framgång om inte NAMN endast är läsbart." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4778,13 +4968,13 @@ msgid "" msgstr "" "Gruppera kommandon som en enhet.\n" " \n" -" Kör ett antal kommandon i en grupp. Detta är ett sätt at omdirigera\n" +" Kör ett antal kommandon i en grupp. Detta är ett sätt att omdirigera\n" " en hel mängd kommandon.\n" " \n" " Slutstatus:\n" -" Returnerar stutusen från det sist exekverade kommandot." +" Returnerar statusen från det sist exekverade kommandot." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4799,21 +4989,21 @@ msgid "" msgstr "" "Återuppta jobb i förgrunden.\n" " \n" -" Likvärdigt med JOBBSPEC-argumentet till kommandot \"fg\". Återuppta\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" +" 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" +" argument till ”bg”.\n" " \n" " Slutstatus:\n" " Returnerar statusen på det återupptagna jobbet." -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." @@ -4821,21 +5011,18 @@ msgstr "" "Beräkna aritmetiskt uttryck.\n" " \n" " UTTRYCKet beräknas enligt reglerna för aritmetisk beräkning.\n" -" Likvärdigt med \"let UTTRYCK\".\n" +" Likvärdigt med ”let \"UTTRYCK\"”.\n" " \n" " Slutstatus:\n" " Returnerar 1 om UTTRYCK beräknas till 0, returnerar 0 annars." -#: builtins.c:1671 +#: builtins.c:1739 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" +" 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" @@ -4856,9 +5043,8 @@ 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" +" 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" @@ -4867,10 +5053,8 @@ msgstr "" " 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" +" 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" @@ -4879,7 +5063,7 @@ msgstr "" " Slutstatus:\n" " 0 eller 1 beroende på värdet av UTTRYCK." -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4936,11 +5120,11 @@ msgstr "" " \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" +" \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" +" HISTFILESIZE\tDet maximala antalet rader 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" @@ -4951,7 +5135,7 @@ msgstr "" " \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" +" MACHTYPE\tEn sträng som beskriver 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" @@ -4966,25 +5150,25 @@ msgstr "" " 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" +" \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\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\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" +" \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 +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -4994,19 +5178,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5022,27 +5206,27 @@ msgstr "" " \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" +" \t\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" +" \t\tvänster i listan som visas av ”dirs”, med start på noll)\n" +" \t\thamnar på 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" +" \t\thöger i listan som visas av ”dirs”, med start på noll)\n" +" \t\thamnar på toppen.\n" " \n" " kat\tLägger till KAT till toppen av katalogstacken, och gör\n" -" \tden till den nya aktuella arbetskatalogen.\n" +" \t\tden till den nya aktuella arbetskatalogen.\n" " \n" -" Den inbyggda \"dirs\" visar katalogstacken.\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 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5051,16 +5235,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5075,24 +5259,24 @@ msgstr "" " \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" +" \t\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\tTar bort den N:e katalogen räknat från vänster i listan som\n" +" \t\tvisas av ”dirs”, med start på noll. Till exempel: ”popd +0”\n" +" \t\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\tTar bort den N:e katalogen räknat från höger i listan som\n" +" \t\tvisas av ”dirs”, med start på noll. Till exempel: ”popd -0”\n" +" \t\ttar bort den sista katalogen, ”popd -1” den näst sista.\n" " \n" -" Den inbyggda \"dirs\" visar katalogstacken.\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 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5103,19 +5287,19 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5123,36 +5307,34 @@ 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" +" 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" +" \t\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" +" \t\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" +" \t\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" +" \t\tav dirs när det anropas utan flaggor, med början från noll.\n" " \n" " Slutstatus:\n" -" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " -"inträffar." +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel inträffar." -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5168,11 +5350,12 @@ 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" +" lista varje angivet FLGNAMN, eller alla skalflaggor med om inga FLGNAMN\n" +" anges, en indikation av huruvida var och en är satt eller inte.\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" +" -o\tbegränsa FLGNAMN till de som kan användas med ”set -o”\n" +" -p\tskriv varje 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" @@ -5181,7 +5364,7 @@ msgstr "" " Returnerar framgång om FLGNAMN är aktiverat, misslyckas om en ogiltig\n" " flagga ges eller FLGNAMN är avaktiverat." -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5189,25 +5372,29 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\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" @@ -5216,47 +5403,53 @@ msgstr "" " -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" +" FORMAT är en teckensträng som innehåller tre sorters objekt: vanliga\n" " tecken, som helt enkelt kopieras till standard ut, teckenstyrsekvenser\n" -" som konverteras och kopieras till standard ut och " -"formatspecifikationer,\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" +" Förutom de standardformatspecifikationer som beskrivs a printf(1),\n" +" 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" +" %Q\tsom %q, men tillämpa eventuell precision på det ociterade\n" +" \t\tciterande\n" +" %(fmt)T skriv ut datum-/tidsträngen som blir resultatet av att\n" +" använda FMT som en formatsträng till strftime(3)\n" +" \n" +" Formatet återanvänds vid behov för att konsumera alla argument. Om\n" +" det finns färre argument än formatet behöver beter sig överskjutande\n" +" formatspecifikationer som om värdet noll eller den tomma strängen,\n" +" det som passar, hade angivits.\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 +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." @@ -5269,24 +5462,27 @@ msgstr "" " \n" " Flaggor:\n" " -p\tskriv existerande kompletteringsspecifikationer på ett\n" -" \tåteranvändningsbart format\n" +" återanvändbart format\n" " -r\tta bort en kompletteringsspecifikation för varje NAMN eller\n" -" \tom inga NAMN är givna, alla kompletteringsinformationer\n" +" om inga NAMN är givna, alla kompletteringsinformationer\n" +" -D\tanvänd kompletteringarna och åtgärderna som standard för\n" +" kommandon utan någon särskild komplettering definierad\n" +" -E\tanvänd kompletteringarna och åtgärderna för ”tomma” kommandon\n" +" — kompletteringar som försöks på en tom rad\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är komplettering försöker göras används åtgärderna i den ordning de\n" +" versala flaggorna är uppräknade ovan. Om flera flaggor anges har\n" +" flaggan -D företräde framför -E, och båda har företräde framför -I.\n" " \n" " Slutstatus:\n" -" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " -"inträffar." +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel inträffar." -#: builtins.c:1923 +#: builtins.c:2004 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" +" completions. If the optional WORD argument is supplied, matches against\n" " WORD are generated.\n" " \n" " Exit Status:\n" @@ -5299,25 +5495,21 @@ msgstr "" " matchningar av ORD.\n" " \n" " Slutstatus:\n" -" Returnerar framgång om inte en ogiltig flagga ges eller ett fel " -"inträffar." +" Returnerar framgång om inte en ogiltig flagga ges eller ett fel inträffar." -#: builtins.c:1938 -#, fuzzy +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5335,104 +5527,98 @@ msgid "" msgstr "" "Modifiera eller visa kompletteringsflaggor.\n" " \n" -" Modifiera kompletteringsflaggorna för varje NAMN, eller, om inga NAMN " -"är\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" +" \t-D\t\tÄndra flaggorna för ”standard” kommandokomplettering\n" +" \t-E\t\tÄndra flaggorna för den ”tomma” kommandokompletteringen\n" +" \t-I\t\tÄndra flaggorna för komplettering av den första flaggan.\n" " \n" -" Genom att använda \"+o\" istället för \"-o\" slås den angivna flaggan " -"av.\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" +" 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." +" någon kompletteringsspecifikation definierad." -#: builtins.c:1968 -#, fuzzy +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" 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" +"Läs rader från standard in till en indexerad 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" +" Läs rader från standard in till den indexerade vektorvariabeln VEKTOR,\n" +" eller från filbeskrivaren FB om flaggan -u ges. Variabeln MAPFILE är\n" +" standard 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" +" -d avgr Använd AVGR för att avsluta rader, istället för nyrad\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\tTa bort en avslutande AVGR från varje inläst rad (nyrad som\n" +" standard)\n" +" -u fb\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" +" -c kvanta Ange antalet rader att läsa mellan varje anrop av\n" +" \t\tÅTERANROP.\n" " \n" " Argument:\n" -" VEKTOR\t\tNamn på vektorvariabel att använda för fildata.\n" +" VEKTOR\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" +" den indexet på nästa vektorelement att tilldelas och raden att tilldelas\n" +" till det elementet som extra argument.\n" " \n" -" Om det inte ges någon specificerad start kommer mapfile nollställa " -"VEKTOR\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." +" oföränderlig eller inte en indexerad vektor." -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" @@ -5440,14 +5626,4 @@ msgid "" 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)" +" En synonym till ”mapfile”." diff --git a/po/tr.gmo b/po/tr.gmo index f3b025b..ecd482e 100644 Binary files a/po/tr.gmo and b/po/tr.gmo differ diff --git a/po/tr.po b/po/tr.po index d192182..f0a7e84 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,426 +1,506 @@ -# translation of bash-3.2.po to Turkish +# translation of bash-4.2.po to Turkish # Copyright (C) 2006 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# # Nilgün Belma Bugüner , 2006. +# Volkan Gezer , 2013, 2014, 2017. +# Emir SARI , 2022 # msgid "" msgstr "" -"Project-Id-Version: bash 3.2\n" +"Project-Id-Version: bash-5.1\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 \n" -"Language-Team: Turkish \n" +"POT-Creation-Date: 2020-11-28 12:51-0500\n" +"PO-Revision-Date: 2022-04-11 23:00+0300\n" +"Last-Translator: Emir SARI \n" +"Language-Team: Turkish \n" +"Language: tr\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" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Lokalize 2.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "hatalı dizi indisi" +msgstr "hatalı dizilim indisi" + +#: arrayfunc.c:421 builtins/declare.def:638 variables.c:2274 variables.c:2300 +#: variables.c:3133 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: nameref özniteliği kaldırılıyor" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:446 builtins/declare.def:851 #, c-format msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgstr "%s: indisli dizilim, ilişkisel dizilime dönüştürülemez" -#: arrayfunc.c:480 -#, fuzzy, c-format +#: arrayfunc.c:700 +#, c-format msgid "%s: invalid associative array key" -msgstr "%s: eylem adı geçersiz" +msgstr "%s: geçersiz ilişkisel dizilim anahtarı" -#: arrayfunc.c:482 +#: arrayfunc.c:702 #, c-format msgid "%s: cannot assign to non-numeric index" msgstr "%s: sayısal olmayan indise atama yapılamaz" -#: arrayfunc.c:518 +#: arrayfunc.c:747 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: ilişkisel bir dizilim ataması yapılırken indis kullanılmalıdır" -#: bashhist.c:383 +#: bashhist.c:452 #, c-format msgid "%s: cannot create: %s" msgstr "%s: oluşturulamıyor: %s" -#: bashline.c:3457 +#: bashline.c:4310 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 +#: bashline.c:4459 #, c-format msgid "%s: first non-whitespace character is not `\"'" msgstr "%s: boşluk olmayan ilk karakter `\"' değil" -#: bashline.c:3572 +#: bashline.c:4488 #, c-format msgid "no closing `%c' in %s" msgstr "%2$s içinde kapatan `%1$c' yok" -#: bashline.c:3606 +#: bashline.c:4519 #, c-format msgid "%s: missing colon separator" -msgstr "%s: ikinokta imi eksik" +msgstr "%s: iki nokta imi eksik" + +#: bashline.c:4555 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "`%s': komut düğme eşleminde bağıntı kaldırılamıyor" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "destek genişletme: %s için bellek ayrılamıyor" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "destek genişletme: %u öge için bellek ayrılamıyor" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "destek genişletme: `%s' için bellek ayrılamıyor" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: builtins/alias.def:131 variables.c:1844 +#, c-format msgid "`%s': invalid alias name" -msgstr "`%s': kısayol ismi geçersiz" +msgstr "`%s': geçersiz takma ad" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "satır düzenleme etkin değil" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "`%s': kısayol ismi geçersiz" +msgstr "`%s': düğme eşlem adı geçersiz" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, 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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "`%s': işlev ismi bilinmiyor" +msgstr "`%s': işlev adı bilinmiyor" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" msgstr "%s için bir kısayol atanmamış.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " msgstr "%s bunun üzerinden çağrılabilir: " -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "`%s': kısayol değiştirilemiyor" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "" +msgstr "döngü sayısı" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "sadece bir `for', `while' veya `until' döngüsünde anlamlı" +msgstr "yalnızca bir `for', `while' veya `until' döngüsünde anlamlı" -#: builtins/caller.def:133 -#, fuzzy +#: builtins/caller.def:136 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" +" 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." msgstr "" +"Geçerli altrutin çağrısının bağlamını döndürür.\n" +" \n" +" İFADE olmadan, \"$satır $dosyaadı\" döndürür. İFADE ile \"$satır\n" +" $altrutin $dosyaadı\" döndürür; bu ek bilgi bir yığın izlemesi sağlamak\n" +" için kullanılabilir.\n" +" \n" +" İFADE'nin değeri, geçerli çağrı biriminden önce kaç tane geri gidilmesi\n" +" gerektiğini belirtir; en üst çerçeve, 0. çerçevedir." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" msgstr "HOME atanmamış" -#: builtins/cd.def:227 +#: builtins/cd.def:335 builtins/common.c:161 test.c:901 +msgid "too many arguments" +msgstr "pek fazla argüman" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "boş dizini" + +#: builtins/cd.def:353 msgid "OLDPWD not set" msgstr "OLDPWD boş" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "" +msgstr "%d. satır: " -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "%s: uyarı: " +msgstr "uyarı: " -#: builtins/common.c:153 -#, fuzzy, c-format +#: builtins/common.c:148 +#, c-format msgid "%s: usage: " -msgstr "%s: uyarı: " +msgstr "%s: kullanım: " -#: 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 +#: builtins/common.c:193 shell.c:516 shell.c:844 #, c-format msgid "%s: option requires an argument" -msgstr "%s: seçenek bir argüman gerektirir" +msgstr "%s: seçenek bir argüman gerektiriyor" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "%s: sayısal argüman gerekli" +msgstr "%s: sayısal argüman gerekiyor" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" -msgstr "%s:yok" +msgstr "%s: yok" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:857 #, c-format msgid "%s: invalid option" msgstr "%s: seçenek geçersiz" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" -msgstr "%s: seçenek ismi geçersiz" +msgstr "%s: seçenek adı geçersiz" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2373 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "`%s': geçerli bir belirteç değil" +msgstr "`%s': geçerli bir tanımlayıcı değil" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "geçersiz sinyal numarası" +msgstr "geçersiz sekizli sayı" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "geçersiz sayı" +msgstr "geçersiz onaltılık sayı" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1569 msgid "invalid number" msgstr "geçersiz sayı" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" msgstr "%s: sinyal belirtimi geçersiz" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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 +#: builtins/common.c:266 error.c:510 #, c-format msgid "%s: readonly variable" -msgstr "%s: salt okunur değişken" +msgstr "%s: saltokunur değişken" -#: builtins/common.c:272 +#: builtins/common.c:274 #, c-format msgid "%s: %s out of range" -msgstr "%s: %s aralık dışı" +msgstr "%s: %s erim dışı" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:274 builtins/common.c:276 msgid "argument" msgstr "argüman" -#: builtins/common.c:274 +#: builtins/common.c:276 #, c-format msgid "%s out of range" -msgstr "%s aralık dışı" +msgstr "%s erim dışı" -#: builtins/common.c:282 +#: builtins/common.c:284 #, c-format msgid "%s: no such job" msgstr "%s: böyle bir iş yok" -#: builtins/common.c:290 +#: builtins/common.c:292 #, c-format msgid "%s: no job control" msgstr "%s: iş denetimi yok" -#: builtins/common.c:292 +#: builtins/common.c:294 msgid "no job control" msgstr "iş denetimi yok" -#: builtins/common.c:302 +#: builtins/common.c:304 #, c-format msgid "%s: restricted" msgstr "%s: kısıtlı" -#: builtins/common.c:304 +#: builtins/common.c:306 msgid "restricted" msgstr "kısıtlı" -#: builtins/common.c:312 +#: builtins/common.c:314 #, c-format msgid "%s: not a shell builtin" msgstr "%s: bir kabuk yerleşiği değil" -#: builtins/common.c:321 +#: builtins/common.c:323 #, c-format msgid "write error: %s" msgstr "yazma hatası: %s" -#: builtins/common.c:329 +#: builtins/common.c:331 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "uçbirim öznitelikleri ayarlanırken hata: %s" -#: builtins/common.c:331 +#: builtins/common.c:333 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "uçbirim öznitelikleri alınırken hata: %s" -#: builtins/common.c:563 +#: builtins/common.c:635 #, 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 +#: builtins/common.c:701 builtins/common.c:703 #, c-format msgid "%s: ambiguous job spec" msgstr "%s: iş belirtimi belirsiz" -#: builtins/complete.def:276 +#: builtins/common.c:964 +msgid "help not available in this version" +msgstr "bu sürümde yardım kullanılamıyor" + +#: builtins/common.c:1008 builtins/set.def:953 variables.c:3839 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: unset yapılamaz: %s saltokunur" + +#: builtins/common.c:1013 builtins/set.def:932 variables.c:3844 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: unset yapılamaz" + +#: builtins/complete.def:287 #, 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 +#: builtins/complete.def:486 builtins/complete.def:634 +#: builtins/complete.def:865 #, c-format msgid "%s: no completion specification" msgstr "%s: tamamlama belirtimi yok" -#: builtins/complete.def:696 +#: builtins/complete.def:688 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 +#: builtins/complete.def:690 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 +#: builtins/complete.def:838 msgid "not currently executing completion function" -msgstr "" +msgstr "şuan tamamlama işlevi çalıştırılmıyor" -#: builtins/declare.def:122 +#: builtins/declare.def:134 msgid "can only be used in a function" -msgstr "sadece bir işlevde kullanılabilir" +msgstr "yalnızca bir işlevde kullanılabilir" + +#: builtins/declare.def:363 builtins/declare.def:756 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: başvuru değeri bir dizilim olamaz" + +#: builtins/declare.def:374 variables.c:3385 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: nameref değişkeninin kendine yaptığı başvurulara izin verilmiyor" + +#: builtins/declare.def:379 variables.c:2104 variables.c:3304 variables.c:3312 +#: variables.c:3382 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: çembersel ad başvurusu" + +#: builtins/declare.def:384 builtins/declare.def:762 builtins/declare.def:773 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "%s: ad başvuarusu için geçersiz değişken adı" -#: builtins/declare.def:360 +#: builtins/declare.def:514 msgid "cannot use `-f' to make functions" msgstr "işlev yapmak için `-f' kullanılamaz" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:526 execute_cmd.c:5986 #, c-format msgid "%s: readonly function" -msgstr "%s: salt okunur işlev" +msgstr "%s: saltokunur işlev" + +#: builtins/declare.def:824 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: alıntılanmış bileşik dizi ataması artık kullanılmıyor" -#: builtins/declare.def:468 +#: builtins/declare.def:838 #, 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 +#: builtins/declare.def:845 builtins/read.def:815 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: ilişkisel dizilim, indisli dizilime dönüştürülemez" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:143 builtins/enable.def:151 msgid "dynamic loading not available" -msgstr "özdevimli yükleme mümkün değil" +msgstr "devingen yükleme olanaklı değil" -#: builtins/enable.def:312 +#: builtins/enable.def:343 #, c-format msgid "cannot open shared object %s: %s" msgstr "%s paylaşımlı nesnesi açılamıyor: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:371 #, 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 +#: builtins/enable.def:388 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: devinen yerleşiği halihazırda yüklenmiş" + +#: builtins/enable.def:392 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "%s için yükleme işlevi hata döndürdü (%d): yüklenmedi" + +#: builtins/enable.def:517 #, c-format msgid "%s: not dynamically loaded" -msgstr "%s: özdevimli olarak yüklenmemiş" +msgstr "%s: devingen olarak yüklenmemiş" -#: builtins/enable.def:474 +#: builtins/enable.def:543 #, 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 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5818 #, c-format msgid "%s: is a directory" msgstr "%s: bir dizin" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" msgstr "%s: bir dosya değil" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1647 #, c-format msgid "%s: cannot execute binary file" msgstr "%s: ikili dosya çalıştırılamıyor" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" msgstr "%s: çalıştırılamıyor: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" -msgstr "" +msgstr "çıkış\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" msgstr "oturum açma kabuğu değil: `exit' kullanın" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" msgstr "Durmuş işler var.\n" -#: builtins/exit.def:122 -#, fuzzy, c-format +#: builtins/exit.def:123 +#, c-format msgid "There are running jobs.\n" -msgstr "Durmuş işler var.\n" +msgstr "Çalışan görevler mevcut.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "komut yok" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "geçmiş belirtimi" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, 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 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "geçerli" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" msgstr "%d. iş, iş denetimsiz başlamış" @@ -428,48 +508,52 @@ 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" +msgstr "%s: kural dışı 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" +msgstr "%s: seçenek bir argüman gerektiriyor -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "çitleme iptal edildi" +msgstr "sağlama iptal edildi" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "%s: çitleme tablosu boş\n" +msgstr "%s: sağlama tablosu boş\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "son komut: %s\n" +msgstr "eşleşme\tkomut\n" -#: builtins/help.def:130 -#, fuzzy, c-format +#: builtins/help.def:133 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ı: `" +msgstr[0] "Bu anahtar sözcükle eşleşen komutlar: `" +msgstr[1] "Bu anahtar sözcüklerle eşleşen komutlar: `" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" -"`%s' ile ilgili bir yardım metni yok. `help help' veya `man -k %s' ya da " -"`info %s'.yazmayı deneyebilirsiniz." +"'\n" +"\n" #: builtins/help.def:185 #, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "`%s' ile ilgili yardım konusu yok. `help help', `man -k %s', `info %s' yazmayı deneyin." + +#: builtins/help.def:224 +#, c-format msgid "%s: cannot open: %s" msgstr "%s: açılamıyor: %s" -#: builtins/help.def:337 +#: builtins/help.def:524 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -481,126 +565,149 @@ msgid "" "\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" +"`AD' gibi bir işlev hakkında bilgi almak için `help AD' yazın. Kabuk hakkında\n" +"genel bir bilgi edinmek için `info bash' yazın.\n" +"Bu listede olmayan\n" +"komutlar hakkında bilgi bulmak isterseniz `man -k' veya `info' yazın.\n" "\n" -"Bir ismin yanında bir yıldız imi (*) varsa komut iptal edilmiş demektir.\n" +"Bir adın yanında bir yıldız imi (*) varsa komut iptal edilmiş demektir.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:155 msgid "cannot use more than one of -anrw" msgstr "tek bir -anrw kullanılabilir" -#: builtins/history.def:186 +#: builtins/history.def:188 builtins/history.def:198 builtins/history.def:213 +#: builtins/history.def:230 builtins/history.def:242 builtins/history.def:249 msgid "history position" msgstr "geçmiş konumu" -#: builtins/history.def:365 +#: builtins/history.def:340 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: geçersiz zaman damgası" + +#: builtins/history.def:451 #, c-format msgid "%s: history expansion failed" msgstr "%s: geçmiş yorumlaması başarısız" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s: geçmiş yorumlaması başarısız" +msgstr "%s: inlib 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 +#: builtins/kill.def:211 #, 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 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Bilinmeyen hata" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:639 expr.c:657 msgid "expression expected" msgstr "ifade bekleniyordu" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:178 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: bir dizi değişkeni değil" +msgstr "%s: bir sıralı dizi değil" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:271 builtins/read.def:308 #, 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 +#: builtins/mapfile.def:279 builtins/read.def:315 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "%d: dosya tanıtıcı geçersiz: %s" +msgstr "%d: dosya açıklayıcısı geçersiz: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:288 builtins/mapfile.def:326 +#, c-format msgid "%s: invalid line count" -msgstr "%s: seçenek geçersiz" +msgstr "%s: geçersiz satır sayısı" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:299 +#, c-format msgid "%s: invalid array origin" -msgstr "%s: seçenek geçersiz" +msgstr "%s: geçersiz dizilim kökeni" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:316 +#, c-format msgid "%s: invalid callback quantum" -msgstr "%s: eylem adı geçersiz" +msgstr "%s: geçersiz geri çağırım niceliği" -#: builtins/mapfile.def:326 -#, fuzzy +#: builtins/mapfile.def:349 msgid "empty array variable name" -msgstr "%s: bir dizi değişkeni değil" +msgstr "boş bir dizilim değişken adı" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:370 msgid "array variable support required" -msgstr "" +msgstr "dizi değişken desteği gerekli" -#: builtins/printf.def:374 +#: builtins/printf.def:419 #, c-format msgid "`%s': missing format character" msgstr "`%s': biçim karakteri eksik" -#: builtins/printf.def:551 +#: builtins/printf.def:474 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "`%c': geçersiz zaman biçimi belirtimi" + +#: builtins/printf.def:676 #, c-format msgid "`%c': invalid format character" msgstr "`%c': biçim karakteri geçersiz" -#: builtins/printf.def:578 -#, fuzzy, c-format +#: builtins/printf.def:702 +#, c-format msgid "warning: %s: %s" -msgstr "%s: uyarı: " +msgstr "uyarı: %s: %s" + +#: builtins/printf.def:788 +#, c-format +msgid "format parsing problem: %s" +msgstr "biçim ayrıştırma sorunu: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:885 msgid "missing hex digit for \\x" msgstr "\\x için onaltılık rakam eksik" -#: builtins/pushd.def:195 +#: builtins/printf.def:900 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "\\%c için unicode rakamı eksik" + +#: builtins/pushd.def:199 msgid "no other directory" msgstr "başka dizin yok" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: geçersiz argüman" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "dizin yığını boş" -#: builtins/pushd.def:508 -#, fuzzy +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "özyineleme yığıtı alttan taştı" +msgstr "dizin yığını indisi" -#: builtins/pushd.def:683 -#, fuzzy +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -615,33 +722,32 @@ msgid "" " \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" +" +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" +" -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." +"Geçerli hatırlanan dizinlerin listesini görüntüler. Dizinler\n" +" listeye yollarını `pushd' komutu ile bulurlar; ve liste boyunca\n" +" yedeği `popd' komutu ile alabilirsiniz.\n" +" \n" +" Seçenekler:\n" +" -c\tögelerin tümünü silerek dizin yığınını temizle\n" +" -l\tev dizininize göreceli dizinlerin yaklaşık işareti\n" +" \tile başlayan sürümlerini yazdırma\n" +" -p\tdizin yığınını her satırda bir girdi ile yazdır\n" +" -v\tdizin yığınını, yığındaki konumu ile her satıra\n" +" \tön ek yapılmış bir girişi yazdır\n" +" \n" +" Argümanlar:\n" +" +N\tDizinler tarafından gösterilen listenin solundan başlayarak\n" +" \tN'inci girdiyi gösterir. Seçenek kullanılmadığında sıfırdan başlar.\n" +" \n" +" -N\tDizinler tarafından gösterilen listenin sağından başlayarak\n" +"\tN'inci girdiyi gösterir. Seçenek kullanılmadığında sıfırdan başlar." -#: builtins/pushd.def:705 -#, fuzzy +#: builtins/pushd.def:723 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" @@ -665,29 +771,28 @@ msgid "" " \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" +"Dizin yığınının en üstüne bir dizin ekler veya geçerli çalışma\n" +" dizini yığının tepesine gelecek şekilde yığını 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." +" \n" +" Seçenekler\n" +" -n\tYığına dizin eklenirken dizinin normal değişimini yok sayar\n" +" \tböylece yalnızca yığın değiştirilir.\n" +" Argümanlar:\n" +" +N\t(`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \tyığını döndürür.\n" +" \n" +" -N\t(`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \tyığını döndürür.\n" +" \n" +" dizin\tDiZiNi yeni çalışma dizini yaparak dizin yığınının\n" +" \ttepesine ekler.\n" +" \n" +" Dizin yığınını `dirs' komutuyla görebilirsiniz." -#: builtins/pushd.def:730 -#, fuzzy +#: builtins/pushd.def:748 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" @@ -707,468 +812,532 @@ msgid "" " \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 +"Dizin yığınından girdileri siler. Hiç argüman verilmemişse\n" +" yığının en üstündeki dizini yığından kaldırır ve yığının\n" +" tepesinde kalan dizine geçer.\n" +" \n" +" Seçenekler:\n" +" -n\tdizinleri yığından silerken normal dizin değişikliğini\n" +" \tengeller, böylece yalnızca yığın değiştirilmiş olur. \n" +" \n" +" Argümanlar:\n" +" +N\t`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t`popd +0' ilk dizini `popd +1' ikincisini siler. \n" +" -N\t`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t`popd -0' son dizini `popd -1' sonuncudan öncekini siler. \n" +" \n" +" Dizin yığınını `dirs' komutuyla görebilirsiniz." + +#: builtins/read.def:280 #, c-format msgid "%s: invalid timeout specification" msgstr "%s: zamanaşımı belirtimi geçersiz" -#: builtins/read.def:588 +#: builtins/read.def:755 #, c-format msgid "read error: %d: %s" msgstr "okuma hatası: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "sadece bir işlev veya betikten kaynaklı olarak `return' yapılabilir" +msgstr "yalnızca bir işlev veya betikten kaynaklı olarak `return' yapılabilir" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:966 #, c-format msgid "%s: not an array variable" msgstr "%s: bir dizi değişkeni değil" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: bir işlev değil" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: export yapılamıyor" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" msgstr "shift sayısı" -#: builtins/shopt.def:260 +#: builtins/shopt.def:310 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 +#: builtins/shopt.def:428 #, c-format msgid "%s: invalid shell option name" -msgstr "%s: kabuk seçenek ismi geçersiz" +msgstr "%s: kabuk seçenek adı geçersiz" #: builtins/source.def:128 msgid "filename argument required" -msgstr "dosya ismi argüman gerekir" +msgstr "dosya adı argüman gerekir" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: dosya yok" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "engellenemez" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" msgstr "bir oturum açma kabuğu engellenemez" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" msgstr "%s `%s' için takma addır\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" msgstr "%s bir kabuk anahtar sözcüğüdür\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" msgstr "%s bir işlevdir\n" -#: builtins/type.def:296 +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s özel bir kabuk yerleşiğidir\n" + +#: builtins/type.def:301 #, 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 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s %s'dir\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" msgstr "%s çitilmiş (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: sınırlama argümanı geçersiz" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" msgstr "`%c': hatalı komut" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:455 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: sınır alınamıyor: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:481 msgid "limit" -msgstr "" +msgstr "sınır" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:493 builtins/ulimit.def:793 #, c-format msgid "%s: cannot modify limit: %s" msgstr "%s: sınır değiştirilemiyor: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" msgstr "sekizlik sayı" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" msgstr "`%c': simgesel kip işleci geçersiz" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, 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 +#: error.c:89 error.c:347 error.c:349 error.c:351 msgid " line " -msgstr "" +msgstr " satır " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" msgstr "son komut: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." msgstr "Çıkılıyor..." -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "BİLGİLENDİR: " + +#: error.c:462 msgid "unknown command error" msgstr "bilinmeyen komut hatası" -#: error.c:407 +#: error.c:463 msgid "bad command type" msgstr "hatalı komut türü" -#: error.c:408 +#: error.c:464 msgid "bad connector" msgstr "hatalı bağlantı" -#: error.c:409 +#: error.c:465 msgid "bad jump" msgstr "hatalı sıçrama" -#: error.c:447 +#: error.c:503 #, 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" +#: eval.c:242 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\agirdi beklerken zamanaşımı: auto-logout\n" -#: execute_cmd.c:497 +#: execute_cmd.c:537 #, 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 +#: execute_cmd.c:1297 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" msgstr "TIMEFORMAT: `%c': biçim karakteri geçersiz" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2362 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] hala mevcut" + +#: execute_cmd.c:2486 msgid "pipe error" -msgstr "yazma hatası: %s" +msgstr "iletişim tüneli hatası" + +#: execute_cmd.c:4793 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: azami eval yuvalama sınırı aşıldı (%d)" + +#: execute_cmd.c:4805 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: azami kaynak yuvalama sınırı aşıldı (%d)" + +#: execute_cmd.c:4913 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: azami işlev yuvalama sınırı aşıldı (%d)" -#: execute_cmd.c:4481 +#: execute_cmd.c:5467 #, 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 +#: execute_cmd.c:5574 #, c-format msgid "%s: command not found" msgstr "%s: komut yok" -#: execute_cmd.c:4827 +#: execute_cmd.c:5816 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5854 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: hatalı yorumlayıcı" -#: execute_cmd.c:4976 +#: execute_cmd.c:5891 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: ikili dosya çalıştırılamıyor: %s" + +#: execute_cmd.c:5977 +#, c-format +msgid "`%s': is a special builtin" +msgstr "%s: bir kabuk yerleşiğidir" + +#: execute_cmd.c:6029 #, c-format msgid "cannot duplicate fd %d to fd %d" msgstr "fd %d, fd %d olarak yinelenemiyor" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" msgstr "ifade özyineleme düzeyi aşıldı" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" -msgstr "özyineleme yığıtı alttan taştı" +msgstr "özyineleme yığını alttan taştı" -#: expr.c:379 +#: expr.c:477 msgid "syntax error in expression" -msgstr "ifadede sözdizimi hatası" +msgstr "ifadede sözdizim hatası" -#: expr.c:419 +#: expr.c:521 msgid "attempted assignment to non-variable" msgstr "değişken olmayana atama yapmaya çalışıldı" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:530 +msgid "syntax error in variable assignment" +msgstr "değişken atamada sözdizim hatası" + +#: expr.c:544 expr.c:911 msgid "division by 0" msgstr "sıfırla bölme" -#: expr.c:471 +#: expr.c:592 msgid "bug: bad expassign token" msgstr "yazılım hatası: bad expassign token" -#: expr.c:513 +#: expr.c:646 msgid "`:' expected for conditional expression" msgstr "koşullu ifade için `:' bekleniyordu" -#: expr.c:781 +#: expr.c:972 msgid "exponent less than 0" msgstr "üs sıfırdan küçük" -#: expr.c:826 +#: expr.c:1029 msgid "identifier expected after pre-increment or pre-decrement" msgstr "belirteç ön-arttırım veya ön-eksiltim sonrası bekleniyordu" -#: expr.c:854 +#: expr.c:1056 msgid "missing `)'" msgstr "eksik `)'" -#: expr.c:897 expr.c:1176 +#: expr.c:1107 expr.c:1487 msgid "syntax error: operand expected" -msgstr "sözdizimi hatası: terim umuluyordu" +msgstr "sözdizim hatası: terim umuluyordu" -#: expr.c:1178 +#: expr.c:1489 msgid "syntax error: invalid arithmetic operator" -msgstr "sözdizimi hatası: geçersiz aritmetik işleci" +msgstr "sözdizim hatası: geçersiz aritmetik işleci" -#: expr.c:1202 +#: expr.c:1513 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "" +msgstr "%s%s%s: %s (hata belirtisi \"%s\")" -#: expr.c:1260 +#: expr.c:1573 msgid "invalid arithmetic base" msgstr "geçersiz sayı tabanı" -#: expr.c:1280 +#: expr.c:1582 +msgid "invalid integer constant" +msgstr "geçersiz tamsayı sabiti" + +#: expr.c:1598 msgid "value too great for base" msgstr "değer taban için fazla büyük" -#: expr.c:1329 -#, fuzzy, c-format +#: expr.c:1647 +#, c-format msgid "%s: expression error\n" -msgstr "%s: tamsayı ifadesi bekleniyordu" +msgstr "%s: ifade hatası\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" msgstr "getcwd: üst dizinlere erişilemiyor" -#: input.c:94 subst.c:4857 -#, fuzzy, c-format +#: input.c:99 subst.c:6069 +#, c-format msgid "cannot reset nodelay mode for fd %d" msgstr "fd %d için geciktirmeme kipi sıfırlanamıyor" -#: input.c:258 +#: input.c:266 #, 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" +msgstr "fd %d tanıtıcısındaki bash girdisi için yeni dosya tanıtıcısı ayrılamıyor" -#: input.c:266 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp iletişim tüneli" + +#: jobs.c:906 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" msgstr "" -#: jobs.c:887 +#: jobs.c:959 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" + +#: jobs.c:1283 #, 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 +#: jobs.c:1402 #, 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 +#: jobs.c:1511 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: %5ld (%s) program kimliği hala canlı olarak işaretli" -#: jobs.c:1401 +#: jobs.c:1850 #, c-format msgid "describe_pid: %ld: no such pid" msgstr "describe_pid: %ld: böyle bir pid yok" -#: jobs.c:1416 +#: jobs.c:1865 #, c-format msgid "Signal %d" -msgstr "" +msgstr "Sinyal %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1879 jobs.c:1905 msgid "Done" -msgstr "" +msgstr "Bitti" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1884 siglist.c:122 msgid "Stopped" -msgstr "" +msgstr "Durdu" -#: jobs.c:1439 +#: jobs.c:1888 #, c-format msgid "Stopped(%s)" -msgstr "" +msgstr "Durdu(%s)" -#: jobs.c:1443 +#: jobs.c:1892 msgid "Running" -msgstr "" +msgstr "Çalışıyor" -#: jobs.c:1457 +#: jobs.c:1909 #, c-format msgid "Done(%d)" -msgstr "" +msgstr "Bitti(%d)" -#: jobs.c:1459 +#: jobs.c:1911 #, c-format msgid "Exit %d" -msgstr "" +msgstr "Çıkış %d" -#: jobs.c:1462 +#: jobs.c:1914 msgid "Unknown status" -msgstr "" +msgstr "Bilinmeyen durum" -#: jobs.c:1549 +#: jobs.c:2001 #, c-format msgid "(core dumped) " -msgstr "" +msgstr "(çekirdek döküldü) " -#: jobs.c:1568 +#: jobs.c:2020 #, c-format msgid " (wd: %s)" -msgstr "" +msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2259 #, c-format msgid "child setpgid (%ld to %ld)" -msgstr "" +msgstr "alt setpgid (şuradan: %ld şuraya: %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2617 nojobs.c:664 #, 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 +#: jobs.c:2893 #, c-format msgid "wait_for: No record of process %ld" msgstr "wait_for: süreç %ld için kayıt yok" -#: jobs.c:2607 +#: jobs.c:3236 #, c-format msgid "wait_for_job: job %d is stopped" msgstr "wait_for_job: iş %d durdu" -#: jobs.c:2829 +#: jobs.c:3564 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: geçerli iş yok" + +#: jobs.c:3571 #, c-format msgid "%s: job has terminated" msgstr "%s: iş sonlanmış" -#: jobs.c:2838 +#: jobs.c:3580 #, c-format msgid "%s: job %d already in background" msgstr "%s: iş %d zaten artalanda" -#: jobs.c:3059 +#: jobs.c:3806 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: belirsiz blok önlenmek için WNOHANG açılıyor" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4320 +#, c-format msgid "%s: line %d: " -msgstr "%s: uyarı: " +msgstr "%s: satır %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4334 nojobs.c:919 #, c-format msgid " (core dumped)" -msgstr "" +msgstr " (çekirdek döküldü)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4346 jobs.c:4359 #, c-format msgid "(wd now: %s)\n" -msgstr "" +msgstr "(wd artık: %s)\n" -#: jobs.c:3579 +#: jobs.c:4391 msgid "initialize_job_control: getpgrp failed" -msgstr "" +msgstr "initialize_job_control: getpgrp başarısız" + +#: jobs.c:4447 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: arka planda iş denetimi yok" -#: jobs.c:3639 +#: jobs.c:4463 msgid "initialize_job_control: line discipline" -msgstr "" +msgstr "initialize_job_control: satır düzeni" -#: jobs.c:3649 +#: jobs.c:4473 msgid "initialize_job_control: setpgid" -msgstr "" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4494 jobs.c:4503 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "uçbirim süreç grunu (%d) ayarlanamaz" -#: jobs.c:3682 +#: jobs.c:4508 msgid "no job control in this shell" msgstr "bu kabukta iş denetimi yok" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:353 #, c-format msgid "malloc: failed assertion: %s\n" msgstr "malloc: kanaat doğrulaması başarısız: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:369 #, c-format msgid "" "\r\n" @@ -1177,59 +1346,66 @@ msgstr "" "\r\n" "malloc: %s:%d: kanaat doğrulaması battı\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:370 lib/malloc/malloc.c:933 msgid "unknown" -msgstr "%s: konak bilinmiyor" +msgstr "bilinmeyen" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:882 msgid "malloc: block on free list clobbered" msgstr "malloc: serbest bırakılmış liste üstünde blok üste yazdı" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:972 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 +#: lib/malloc/malloc.c:975 msgid "free: called with unallocated block argument" msgstr "free: ayrılmamış blok argümanı ile çağrıldı" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:994 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 +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: alttan taşma saptandı; magic8 hasarlı" + +#: lib/malloc/malloc.c:1009 msgid "free: start and end chunk sizes differ" msgstr "free: başlangıç ve son tomar boyutları farklı" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1119 msgid "realloc: called with unallocated block argument" msgstr "realloc: ayrılmamış blok argümanı ile çağrıldı" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1134 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 +#: lib/malloc/malloc.c:1141 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: alttan taşma saptandı; magic8 hasarlı" + +#: lib/malloc/malloc.c:1150 msgid "realloc: start and end chunk sizes differ" msgstr "realloc: başlangıç ve son tomar boyutları farklı" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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 +#: lib/malloc/table.c:253 #, 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 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "geçersiz taban" @@ -1248,261 +1424,298 @@ msgstr "%s: geçersiz hizmet" msgid "%s: bad network path specification" msgstr "%s: hatalı ağ yolu belirtimi" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "desteklenmeyen ağ işlemleri" -#: locale.c:192 +#: locale.c:217 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: (%s) diline değiştirilemedi" -#: locale.c:194 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: şu dile (%s) değiştirilemedi: %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:292 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: %lu bayt yeniden ayrılamıyor" +msgstr "setlocale: %s: yerel (%s) değiştirilemiyor" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: %lu bayt yeniden ayrılamıyor" +msgstr "setlocale: %s: yerel (%s) değiştirilemiyor: %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "$_'de postanız var" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "$_'de yeni postanız var" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "%s'deki posta okundu\n" -#: make_cmd.c:323 +#: make_cmd.c:317 msgid "syntax error: arithmetic expression required" -msgstr "sözdizimi hatası: aritmetik ifadesi gerekli" +msgstr "sözdizim hatası: aritmetik ifadesi gerekli" -#: make_cmd.c:325 +#: make_cmd.c:319 msgid "syntax error: `;' unexpected" -msgstr "sözdizimi hatası: `;' beklenmiyordu" +msgstr "sözdizim hatası: `;' beklenmiyordu" -#: make_cmd.c:326 +#: make_cmd.c:320 #, c-format msgid "syntax error: `((%s))'" -msgstr "sözdizimi hatası: `((%s))'" +msgstr "sözdizim hatası: `((%s))'" -#: make_cmd.c:575 +#: make_cmd.c:572 #, c-format msgid "make_here_document: bad instruction type %d" msgstr "make_here_document: hatalı yönerge türü %d" -#: make_cmd.c:659 +#: make_cmd.c:657 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "bu belgede %d satırında dosya sonu sonlandırılmış (istenen `%s')" #: 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 +#: parse.y:2393 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) SIZE_MAX değerini aşıyor (%lu): satır kırpıldı" + +#: parse.y:2826 +msgid "maximum here-document count exceeded" +msgstr "en fazla buraya belge sayısı aşıldı" + +#: parse.y:3581 parse.y:3957 parse.y:4556 #, 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 +#: parse.y:4696 msgid "unexpected EOF while looking for `]]'" msgstr "`]]' aranırken beklenmedik dosya sonu" -#: parse.y:3956 +#: parse.y:4701 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "koşullu ifadede sözdizimi hatası: beklenmedik dizgecik `%s'" +msgstr "koşullu ifadede sözdizim hatası: beklenmedik jeton `%s'" -#: parse.y:3960 +#: parse.y:4705 msgid "syntax error in conditional expression" -msgstr "koşullu ifadede sözdizimi hatası" +msgstr "koşullu ifadede sözdizim hatası" -#: parse.y:4038 +#: parse.y:4783 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "beklenmedik dizgecik `%s', `)' umuluyordu" +msgstr "beklenmedik jeton `%s', `)' umuluyordu" -#: parse.y:4042 +#: parse.y:4787 msgid "expected `)'" msgstr "`)' umuluyordu" -#: parse.y:4070 +#: parse.y:4815 #, c-format msgid "unexpected argument `%s' to conditional unary operator" msgstr "koşullu tek terimli işlece beklenmedik argüman `%s'" -#: parse.y:4074 +#: parse.y:4819 msgid "unexpected argument to conditional unary operator" msgstr "koşullu tek terimli işlece beklenmedik argüman" -#: parse.y:4120 +#: parse.y:4865 #, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "beklenmedik dizgecik `%s', koşullu iki terimli işleç umuluyordu" +msgstr "beklenmedik jeton `%s', koşullu iki terimli işleç umuluyordu" -#: parse.y:4124 +#: parse.y:4869 msgid "conditional binary operator expected" msgstr "koşullu iki terimli işleç umuluyordu" -#: parse.y:4146 +#: parse.y:4891 #, c-format msgid "unexpected argument `%s' to conditional binary operator" msgstr "koşullu iki terimli işlece beklenmedik argüman `%s'" -#: parse.y:4150 +#: parse.y:4895 msgid "unexpected argument to conditional binary operator" msgstr "koşullu iki terimli işlece beklenmedik argüman" -#: parse.y:4161 +#: parse.y:4906 #, c-format msgid "unexpected token `%c' in conditional command" -msgstr "koşullu komutta beklenmeyen dizgecik `%c'" +msgstr "koşullu komutta beklenmeyen jeton `%c'" -#: parse.y:4164 +#: parse.y:4909 #, c-format msgid "unexpected token `%s' in conditional command" -msgstr "koşullu komutta beklenmeyen dizgecik `%s'" +msgstr "koşullu komutta beklenmeyen jeton `%s'" -#: parse.y:4168 +#: parse.y:4913 #, c-format msgid "unexpected token %d in conditional command" -msgstr "koşullu komutta beklenmeyen dizgecik %d" +msgstr "koşullu komutta beklenmeyen jeton %d" -#: parse.y:5459 +#: parse.y:6336 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "beklenmeyen dizgecik `%s' yakınında sözdizimi hatası" +msgstr "beklenmeyen jeton `%s' yakınında sözdizim hatası" -#: parse.y:5477 +#: parse.y:6355 #, c-format msgid "syntax error near `%s'" -msgstr "`%s' yakınında sözdizimi hatası" +msgstr "`%s' yakınında sözdizim hatası" -#: parse.y:5487 +#: parse.y:6365 msgid "syntax error: unexpected end of file" -msgstr "sözdizimi hatası: beklenmeyen dosya sonu" +msgstr "sözdizim hatası: beklenmeyen dosya sonu" -#: parse.y:5487 +#: parse.y:6365 msgid "syntax error" -msgstr "sözdizimi hatası" +msgstr "sözdizim hatası" -#: parse.y:5549 +#: parse.y:6428 #, c-format msgid "Use \"%s\" to leave the shell.\n" msgstr "Kabuğu bırakmak için \"%s\" kullanın.\n" -#: parse.y:5711 +#: parse.y:6602 msgid "unexpected EOF while looking for matching `)'" msgstr "`)' için eşleşme aranırken beklenmedik dosya sonu" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" msgstr "completion: `%s' işlevi yok" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: muhtemel yeniden deneme döngüsü" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" msgstr "print_command: hatalı bağlayıcı `%d'" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: dosya tanıtıcı geçersiz: %s" +msgstr "xtrace_set: %d: geçersiz dosya tanımlayıcısı" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: BOŞ dosya işaretçisi" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1540 #, c-format msgid "cprintf: `%c': invalid format character" msgstr "cprintf: `%c': geçersiz biçim karakteri" -#: redir.c:110 +#: redir.c:149 redir.c:197 msgid "file descriptor out of range" msgstr "dosya tanıtıcı aralık dışında" -#: redir.c:166 +#: redir.c:204 #, c-format msgid "%s: ambiguous redirect" msgstr "%s: belirsiz yönlendirme" -#: redir.c:170 +#: redir.c:208 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: mevcut dosyanın üzerine yazılamıyor" -#: redir.c:175 +#: redir.c:213 #, c-format msgid "%s: restricted: cannot redirect output" msgstr "%s: kısıtlı: çıktı yönlendirilemiyor" -#: redir.c:180 -#, fuzzy, c-format +#: redir.c:218 +#, 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 +#: redir.c:222 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s: dizi üyesine liste atanamaz" +msgstr "%s: fd değişkene atanamıyor" -#: redir.c:544 +#: redir.c:649 msgid "/dev/(tcp|udp)/host/port not supported without networking" msgstr "/dev/(tcp|udp)/host/port ağ olmaksızın desteklenmiyor" -#: redir.c:1101 +#: redir.c:938 redir.c:1053 redir.c:1114 redir.c:1284 msgid "redirection error: cannot duplicate fd" msgstr "yönlendirme hatası: fd yinelenemiyor" -#: shell.c:332 +#: shell.c:347 msgid "could not find /tmp, please create!" msgstr "/tmp bulunamadı, lütfen oluşturun!" -#: shell.c:336 +#: shell.c:351 msgid "/tmp must be a valid directory name" msgstr "/tmp geçerli bir dizinin adı olmalıdır" -#: shell.c:884 +#: shell.c:804 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:948 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: geçersiz seçenek" -#: shell.c:1651 +#: shell.c:1319 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "uid %d olarak ayarlanamıyor: etkin uid %d" + +#: shell.c:1330 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "gid %d olarak ayarlanamıyor: etkin gid %d" + +#: shell.c:1518 +msgid "cannot start debugger; debugging mode disabled" +msgstr "hata ayıklayıcı başlatılamadı, hata ayıklama devre dışı" + +#: shell.c:1632 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Bir dizin" + +#: shell.c:1881 msgid "I have no name!" -msgstr "Hiç ismim yok!" +msgstr "Adsızım ben!" -#: shell.c:1793 +#: shell.c:2035 #, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "" +msgstr "GNU bash, sürüm %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2036 #, c-format msgid "" "Usage:\t%s [GNU long option] [option] ...\n" @@ -1511,805 +1724,792 @@ 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 +#: shell.c:2038 msgid "GNU long options:\n" msgstr "GNU uzun seçenekleri:\n" -#: shell.c:1800 +#: shell.c:2042 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:2043 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD veya -c KOMUT veya -O shopt_seçeneği\t\t(yalnızca çağrı için)\n" -#: shell.c:1816 +#: shell.c:2062 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s ya da -o seçeneği\n" +msgstr "\t-%s veya -o seçeneği\n" -#: shell.c:1822 +#: shell.c:2068 #, 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" +msgstr "Kabuk seçenekleriyle ilgili daha fazla bilgi için `%s -c \"help set\"' yazın.\n" -#: shell.c:1823 +#: shell.c:2069 #, 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" +msgstr "Kabuk yerleşik komutlarıyla ilgili bilgi almak için `%s -c help' yazın.\n" -#: shell.c:1824 +#: shell.c:2070 #, 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 adresine bildiriniz.\n" -#: sig.c:626 +#: shell.c:2072 #, c-format -msgid "sigprocmask: %d: invalid operation" +msgid "bash home page: \n" +msgstr "bash ana sayfası: \n" + +#: shell.c:2073 +#, c-format +msgid "General help using GNU software: \n" +msgstr "GNU yazılımı kullanımı hakkında genel yardım: \n" + +#: sig.c:757 +#, c-format +msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: geçersiz işlem" -#: siglist.c:48 +#: siglist.c:47 msgid "Bogus signal" -msgstr "" +msgstr "Bogus sinyali" -#: siglist.c:51 +#: siglist.c:50 msgid "Hangup" -msgstr "" +msgstr "Engelle" -#: siglist.c:55 +#: siglist.c:54 msgid "Interrupt" -msgstr "" +msgstr "Kes" -#: siglist.c:59 +#: siglist.c:58 msgid "Quit" -msgstr "" +msgstr "Çık" -#: siglist.c:63 +#: siglist.c:62 msgid "Illegal instruction" -msgstr "" +msgstr "Geçersiz talimat" -#: siglist.c:67 +#: siglist.c:66 msgid "BPT trace/trap" -msgstr "" +msgstr "BPT izle/tuzak" -#: siglist.c:75 +#: siglist.c:74 msgid "ABORT instruction" -msgstr "" +msgstr "Talimatı DURDUR" -#: siglist.c:79 +#: siglist.c:78 msgid "EMT instruction" -msgstr "" +msgstr "EMT talimatı" -#: siglist.c:83 +#: siglist.c:82 msgid "Floating point exception" -msgstr "" +msgstr "Kayan nokta istisnası" -#: siglist.c:87 +#: siglist.c:86 msgid "Killed" -msgstr "" +msgstr "Öldürüldü" -#: siglist.c:91 -#, fuzzy +#: siglist.c:90 msgid "Bus error" -msgstr "sözdizimi hatası" +msgstr "Veriyolu hatası" -#: siglist.c:95 +#: siglist.c:94 msgid "Segmentation fault" -msgstr "" +msgstr "Bölünme hatası" -#: siglist.c:99 +#: siglist.c:98 msgid "Bad system call" -msgstr "" +msgstr "Bozuk sistem çağırımı" -#: siglist.c:103 +#: siglist.c:102 msgid "Broken pipe" -msgstr "" +msgstr "Bozuk iletişim tüneli" -#: siglist.c:107 +#: siglist.c:106 msgid "Alarm clock" -msgstr "" +msgstr "Çalar saat" -#: siglist.c:111 -#, fuzzy +#: siglist.c:110 msgid "Terminated" -msgstr "kısıtlı" +msgstr "Sonlandırıldı" -#: siglist.c:115 +#: siglist.c:114 msgid "Urgent IO condition" -msgstr "" +msgstr "Acil GÇ koşulu" -#: siglist.c:119 +#: siglist.c:118 msgid "Stopped (signal)" -msgstr "" +msgstr "Durduruldu (sinyal)" -#: siglist.c:127 +#: siglist.c:126 msgid "Continue" -msgstr "" +msgstr "Devam et" -#: siglist.c:135 +#: siglist.c:134 msgid "Child death or stop" -msgstr "" +msgstr "Alt ölümü veya durdurulma" -#: siglist.c:139 +#: siglist.c:138 msgid "Stopped (tty input)" -msgstr "" +msgstr "Durduruldu (tty girişi)" -#: siglist.c:143 +#: siglist.c:142 msgid "Stopped (tty output)" -msgstr "" +msgstr "Durduruldu (tty çıkışı)" -#: siglist.c:147 +#: siglist.c:146 msgid "I/O ready" -msgstr "" +msgstr "G/Ç hazır" -#: siglist.c:151 +#: siglist.c:150 msgid "CPU limit" -msgstr "" +msgstr "CPU sınırı" -#: siglist.c:155 +#: siglist.c:154 msgid "File limit" -msgstr "" +msgstr "Dosya sınırı" -#: siglist.c:159 +#: siglist.c:158 msgid "Alarm (virtual)" -msgstr "" +msgstr "Alarm (sanal)" -#: siglist.c:163 +#: siglist.c:162 msgid "Alarm (profile)" -msgstr "" +msgstr "Alarm (profil)" -#: siglist.c:167 +#: siglist.c:166 msgid "Window changed" -msgstr "" +msgstr "Pencere değiştirildi" -#: siglist.c:171 +#: siglist.c:170 msgid "Record lock" -msgstr "" +msgstr "Kayıt kilidi" -#: siglist.c:175 +#: siglist.c:174 msgid "User signal 1" -msgstr "" +msgstr "Kullanıcı sinyali 1" -#: siglist.c:179 +#: siglist.c:178 msgid "User signal 2" -msgstr "" +msgstr "Kullanıcı sinyali 2" -#: siglist.c:183 +#: siglist.c:182 msgid "HFT input data pending" -msgstr "" +msgstr "HFT girdi verisi bekliyor" -#: siglist.c:187 +#: siglist.c:186 msgid "power failure imminent" -msgstr "" +msgstr "yakın güç başarısızlığı" -#: siglist.c:191 +#: siglist.c:190 msgid "system crash imminent" -msgstr "" +msgstr "yakın sistem çökmesi" -#: siglist.c:195 +#: siglist.c:194 msgid "migrate process to another CPU" -msgstr "" +msgstr "süreci başka bir işlemciye aktar" -#: siglist.c:199 +#: siglist.c:198 msgid "programming error" -msgstr "" +msgstr "programlama hatası" -#: siglist.c:203 +#: siglist.c:202 msgid "HFT monitor mode granted" -msgstr "" +msgstr "HFT izleyici kipine geçildi" -#: siglist.c:207 +#: siglist.c:206 msgid "HFT monitor mode retracted" -msgstr "" +msgstr "HFT izleyici kipi kapatıldı" -#: siglist.c:211 +#: siglist.c:210 msgid "HFT sound sequence has completed" -msgstr "" +msgstr "HFT ses sırası tamamlandı" -#: siglist.c:215 +#: siglist.c:214 msgid "Information request" -msgstr "" +msgstr "Bilgi talebi" -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" - -#: siglist.c:225 +#: siglist.c:222 siglist.c:224 #, c-format msgid "Unknown Signal #%d" -msgstr "" +msgstr "Bilinmeyen Sinyal #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1476 subst.c:1666 #, c-format msgid "bad substitution: no closing `%s' in %s" msgstr "hatalı ikame: %2$s içinde kapatan `%1$s' yok" -#: subst.c:2735 +#: subst.c:3281 #, c-format msgid "%s: cannot assign list to array member" msgstr "%s: dizi üyesine liste atanamaz" -#: subst.c:4754 subst.c:4770 +#: subst.c:5910 subst.c:5926 msgid "cannot make pipe for process substitution" msgstr "süreç ikamesi için borulama yapılamıyor" -#: subst.c:4802 +#: subst.c:5985 msgid "cannot make child for process substitution" msgstr "süreç ikamesi için alt süreç yapılamıyor" -#: subst.c:4847 +#: subst.c:6059 #, c-format msgid "cannot open named pipe %s for reading" -msgstr "isimli boru %s okumak için açılamıyor" +msgstr "adlı boru %s okumak için açılamıyor" -#: subst.c:4849 +#: subst.c:6061 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "isimli boru %s yazmak için açılamıyor" +msgstr "adlı boru %s yazmak için açılamıyor" -#: subst.c:4867 +#: subst.c:6084 #, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "isimli boru %s fd %d olarak yinelenemiyor" +msgstr "adlı boru %s fd %d olarak yinelenemiyor" -#: subst.c:5063 +#: subst.c:6213 +msgid "command substitution: ignored null byte in input" +msgstr "komut ikamesi: girdideki null bayt yok sayıldı" + +#: subst.c:6353 msgid "cannot make pipe for command substitution" msgstr "komut ikamesi için boru yapılamıyor" -#: subst.c:5097 +#: subst.c:6397 msgid "cannot make child for command substitution" msgstr "komut ikamesi için alt süreç yapılamıyor" -#: subst.c:5114 +#: subst.c:6423 msgid "command_substitute: cannot duplicate pipe as fd 1" msgstr "command_substitute: boru fd 1 olarak yinelenemiyor" -#: subst.c:5617 +#: subst.c:6883 subst.c:9952 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: dosya izleme tanımlayıcısı için geçersiz değer" + +#: subst.c:6979 subst.c:6997 subst.c:7169 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: geçersiz dolaylı yayılım" + +#: subst.c:7013 subst.c:7177 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: geçersiz değişken adı" + +#: subst.c:7256 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: parametre ayarlanmamış" + +#: subst.c:7258 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: parametre boş ya da değer atanmamış" +msgstr "%s: parametre boş veya değer atanmamış" -#: subst.c:5907 +#: subst.c:7503 subst.c:7518 #, c-format msgid "%s: substring expression < 0" -msgstr "%s: altdizge ifadesi < 0" +msgstr "%s: altdizi ifadesi < 0" -#: subst.c:6965 +#: subst.c:9281 subst.c:9302 #, c-format msgid "%s: bad substitution" msgstr "%s: hatalı ikame" -#: subst.c:7045 +#: subst.c:9390 #, 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:9814 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "kabuk gelecekteki sürümlerinde, bir aritmetik ikame olarak değerlendirmeye zorlayacak" -#: subst.c:7839 -#, fuzzy, c-format +#: subst.c:10367 +#, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "hatalı ikame: %2$s içinde kapatan `%1$s' yok" +msgstr "hatalı ikame: %s içinde kapatan \"`\" yok" -#: subst.c:8720 +#: subst.c:11434 #, c-format msgid "no match: %s" msgstr "eşleşme yok: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" msgstr "argüman bekleniyordu" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" msgstr "%s: tamsayı ifadesi bekleniyordu" -#: test.c:263 +#: test.c:265 msgid "`)' expected" msgstr "`)' bekleniyordu" -#: test.c:265 +#: test.c:267 #, 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 +#: test.c:466 test.c:799 #, c-format msgid "%s: binary operator expected" msgstr "%s: iki terimli işleci bekleniyordu" -#: test.c:811 +#: test.c:756 test.c:759 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: tek terimli işleci bekleniyordu" + +#: test.c:881 msgid "missing `]'" msgstr "eksik `]'" -#: trap.c:203 +#: test.c:899 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "sözdizim hatası: '%s' beklenmiyordu" + +#: trap.c:220 msgid "invalid signal number" msgstr "geçersiz sinyal numarası" -#: trap.c:327 +#: trap.c:325 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "tuzak işleyicisi: en yüksek tuzak işleyicisi düzeyi aşıldı (%d)" + +#: trap.c:414 #, 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 +#: trap.c:418 #, 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" +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 +#: trap.c:487 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler:hatalı sinyal %d" -#: variables.c:363 +#: variables.c:421 #, 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 +#: variables.c:833 #, 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 +#: variables.c:2674 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 +#: variables.c:2693 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: değişkene değer atanmamış olabilir" + +#: variables.c:3475 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: ad başvurusuna tamsayı ataması" + +#: variables.c:4404 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 +#: variables.c:4771 +#, c-format msgid "%s has null exportstr" -msgstr "%s: parametre boş ya da değer atanmamış" +msgstr "%s boş exportstr içeriyor" -#: variables.c:3381 variables.c:3390 +#: variables.c:4776 variables.c:4785 #, 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 +#: variables.c:4791 #, c-format msgid "no `=' in exportstr for %s" msgstr "%s için exportstr içinde `=' yok" -#: variables.c:3835 +#: variables.c:5331 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 +#: variables.c:5344 msgid "pop_var_context: no global_variables context" msgstr "pop_var_context: genel değişkenler bağlamı yok" -#: variables.c:3922 +#: variables.c:5424 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" +msgstr "pop_scope: kabuk değişkenlerinin başı bir geçici ortam etki alanı değil" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6387 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: açılamıyor: %s" +msgstr "%s: %s: DOSYA olarak açılamaz" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6392 +#, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "%d: dosya tanıtıcı geçersiz: %s" +msgstr "%s: %s: dosya izleme tanımlayıcısı için geçersiz değer" -#: version.c:46 -#, fuzzy -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "Copyright © 2006 Free Software Foundation, Inc.\n" +#: variables.c:6437 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: uyumlulukdeğeri aralık dışı" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2020 Free Software Foundation, Inc." +msgstr "Telif hakkı (C) 2020 Free Software Foundation, Inc." -#: version.c:86 version2.c:83 +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Lisans GPLv3+: GNU GPL sürüm 3 veya sonrası \n" + +#: version.c:86 version2.c:86 #, c-format msgid "GNU bash, version %s (%s)\n" -msgstr "" +msgstr "GNU bash, sürüm %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:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Bu ücretsiz bir yazılımdır; değiştirmekte ve dağıtmakta özgürsünüz." -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "İzin verilen yasalar kapsamında hiçbir GARANTİSİ BULUNMAMAKTADIR." -#: 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 +#: xmalloc.c:93 #, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \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ı)" +msgstr "%s: %lu bayt ayrılamıyor (%lu bayt ayrıldı)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: %lu bayt ayrılamıyor" +msgstr "%s: %lu bayt ayrılamıyor" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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ı)" +msgstr "%s: %s:%d: %lu bayt ayrılamıyor (%lu bayt ayrıldı)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: %lu bayt ayrılamıyor" +msgstr "%s: %s:%d: %lu bayt ayrılamıyor" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "" +msgstr "alias [-p] [ad[=değer] ... ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "" +msgstr "unalias [-a] ad [ad ...]" -#: 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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpvsPVSX] [-m anahtar eşleniği] [-f dosyaadı] [-q ad] [-u ad] [-r anahtar sırası] [-x keyseq:kabuk-komutu] [keyseq:satırokuma-işlevi veya satırokuma-komutu]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" -msgstr "" +msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "" +msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "" +msgstr "builtin [kabuk-dahili [arg ...]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" +msgstr "caller [ifade]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [dizin]" #: 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 "" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "" +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] command [arg ...]" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "" +msgid "declare [-aAfFgiIlnrtux] [-p] [name[=value] ...]" +msgstr "declare [-aAfFgiIlnrtux] [-p] [ad[=değer] ...]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] [-p] name[=value] ..." +msgstr "typeset [-aAfFgiIlnrtux] [-p] ad[=değer] ..." + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "" +msgstr "local [seçenek] ad[=değer] ..." -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "" +msgstr "echo [-neE] [arg ...]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" -msgstr "" - -#: builtins.c:90 -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" +msgstr "echo [-n] [arg ...]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f dosyaadı] [ad ...]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "" +msgid "eval [arg ...]" +msgstr "eval [arg ...]" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "" +msgid "getopts optstring name [arg ...]" +msgstr "getopts seçenekdizisi ad [arg ...]" #: builtins.c:98 -msgid "exit [n]" -msgstr "" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a ad] [komut [argüman ...]] [y. yönlendirme ...]" #: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 msgid "logout [n]" -msgstr "" +msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" -msgstr "" +msgstr "fc [-e ename] [-lnr] [ilk] [son] veya fc -s [pat=rep] [komut]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "" +msgstr "fg [görev_tan]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "" +msgstr "bg [görev_tan ...]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "" +msgstr "hash [-lr] [-p yoladı] [-dt] [ad ...]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "" +msgstr "help [-dms] [desen ...]" -#: builtins.c:121 -msgid "" -"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " -"[arg...]" -msgstr "" +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d başlangıç] [n] veya history -anrw [dosyaadı] veya history -ps arg [arg...]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "" - -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "" +msgstr "jobs [-lnprs] [görevtan ...] veya jobs -x komut [argü]" -#: builtins.c:132 -msgid "" -"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l " -"[sigspec]" -msgstr "" +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [görevtan ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s sinspec | -n signum | -sigspec] pid | görevtan ... veya kill -l [sigspec]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let arg [arg ...]" #: builtins.c:138 -msgid "return [n]" -msgstr "" +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a dizi] [-d sonlandırıcı] [-i metin] [-n nkarakter] [-N nkarakter] [-p istem] [-t zamanaşımı] [-u fd] [ad ...]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "" +msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [ad ...]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [ad[=değer] ...] veya export -p" #: builtins.c:148 -#, fuzzy -msgid "shift [n]" -msgstr "shift sayısı" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [ad[=değer] ...] veya readonly -p" #: builtins.c:150 -#, fuzzy -msgid "source filename [arguments]" -msgstr "dosya ismi argüman gerekir" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source dosyaadı [argümanlar]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr "dosya ismi argüman gerekir" +msgstr ". dosyaadı [argümanlar]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" -msgstr "" - -#: builtins.c:158 -msgid "test [expr]" -msgstr "" +msgstr "suspend [-f]" #: builtins.c:160 -msgid "[ arg... ]" -msgstr "" +msgid "test [expr]" +msgstr "test [ifade]" #: builtins.c:162 -msgid "times" -msgstr "" +msgid "[ arg... ]" +msgstr "[ arg... ]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "" +msgstr "trap [-lp] [[arg] sinyal_tan ...]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "" +msgstr "type [-afptP] ad [ad ...]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [sınır]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "" +msgstr "umask [-p] [-S] [kip]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p değişken] [kimlik ...]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "" - -#: builtins.c:182 -msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" #: builtins.c:184 -msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "" +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for AD [in SÖZCÜKLER ... ] ; do KOMUTLAR; done" #: builtins.c:186 -msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "" +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( ifade1; ifade2; ifade3 )); do KOMUTLAR; done" #: builtins.c:188 -msgid "time [-p] pipeline" -msgstr "" +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select AD [in SÖZCÜKLER ... ;] do KOMUTLAR; done" #: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "" +msgid "time [-p] pipeline" +msgstr "time [-p] zamantüneli" #: builtins.c:192 -msgid "" -"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " -"COMMANDS; ] fi" -msgstr "" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case SÖZCÜK in [DİZGİ [| DİZGİ]...) KOMUTLAR ;;]... esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "" +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if KOMUTLAR; then KOMUTLAR; [ elif KOMUTLAR; then KOMUTLAR; ]... [ else KOMUTLAR; ] fi" #: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "" +msgid "while COMMANDS; do COMMANDS; done" +msgstr "while KOMUTLAR; do KOMUTLAR; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS; done" +msgstr "until KOMUTLAR; do KOMUTLAR; done" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [ad] command [yönlendirmeler]" #: builtins.c:202 -msgid "{ COMMANDS ; }" -msgstr "" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function ad { KOMUTLAR ; } veya ad () { KOMUTLAR ; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "" +msgid "{ COMMANDS ; }" +msgstr "{ KOMUTLAR ; }" #: builtins.c:206 -#, fuzzy -msgid "(( expression ))" -msgstr "ifade bekleniyordu" +msgid "job_spec [&]" +msgstr "görev_tan [&]" #: builtins.c:208 -#, fuzzy -msgid "[[ expression ]]" -msgstr "ifade bekleniyordu" +msgid "(( expression ))" +msgstr "(( ifade ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ ifade ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "" +msgstr "variables - Bazı kabuk değişkenlerinin ad ve anlamları" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "" +msgstr "pushd [-n] [+N | -N | dizin]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" -msgstr "" +msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "" +msgstr "shopt [-pqsu] [-o] [optname ...]" -#: builtins.c:226 +#: builtins.c:228 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 "" +msgstr "printf [-v var] biçim [argümanlar]" -#: 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o seçenek] [-A eylem] [-G global kısım] [-W sözcük listesi] [-F işlev] [-C komut] [-X süzgeç] [-P önek] [-S sonek] [ad ...]" -#: builtins.c:237 -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "" +#: builtins.c:235 +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 seçenek] [-A eylem] [-G global kısım] [-W sözcük listesi] [-F işlev] [-C komut] [-X süzgeç] [-P önek] [-S sonek] [sözcük]" -#: builtins.c:240 -msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o seçenek] [-DEI] [ad ...]" #: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d sonlandrc] [-n say] [-O kaynak] [-s say] [-t] [-u fd] [-C geriçağırım] [-c parçacık] [dizi]" -#: builtins.c:254 -#, fuzzy +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d sınırlandırıcı] [-n sayım] [-O köken] [-s sayım] [-t] [-u fd] [-C geri çağırma] [-c kuantum] [dizilim]" + +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2321,38 +2521,45 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" 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 +"Rumuz tanımla veya görüntüle.\n" +" \n" +" `alias' argümansız kullanıldığında standart çıktıda kullanılabilecek tüm\n" +" rumuzları `alias AD=DEĞER' biçiminde listeler.\n" +" \n" +" Diğer durumda DEĞERi verilmiş her AD için bir rumuz tanımlanır.\n" +" DEĞERdeki boşluk, rumuz genişletildiğinde sonraki sözcüğün rumuz\n" +" ikamesi için denetlenmesine sebep olur.\n" +" \n" +" Seçenekler:\n" +" -p\tTüm rumuzları yeniden kullanılabilir biçimde listele\n" +" \n" +" Çıkış Durumu:\n" +" Hiçbir şeyin rumuzu olmayan bir AD verilmedikçe alias doğru döndürür." + +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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." +"Tanımlı rumuzlar listesinden her İSMİ kaldır.\n" +" \n" +" Seçenekler:\n" +" -a\ttüm rumuz tanımlamalarını kaldır\n" +" \n" +" AD mevcut olmayan bir rumuz olmadığı takdirde doğru\n" +" döndür." -#: builtins.c:289 -#, fuzzy +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2364,71 +2571,66 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\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" +"Readline düğme atamalarını ve değişkenlerini ayarla.\n" +" \n" +" Bir düğme dizilimini bir Readline işlevine veya makrosuna bağlar veya\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" +" \n" +" Seçenekler:\n" +" -m DÜĞMEEŞLEM Bu komut süresince kısayol olarak DÜĞMEEŞLEM\n" +" kullanılır. Olası kısayol adları: 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" +" -l İşlev adlarını listeler.\n" +" -P İşlev adlarını ve kısayolları listeler.\n" +" -p İşlev adlarını ve kısayolları, girdi olarak\n" " kullanılabilir biçimde listeler.\n" -" -S Makroları çağıran tuş dizilerini ve değerlerini\n" +" -S Makroları çağıran düğme dizilerini ve değerlerini\n" " listeler\n" -" -s Makroları çağıran tuş dizilerini ve değerlerini\n" -" girdi olarak kullanılabilir biçimde listeler." +" -s Makroları çağıran düğme dizilerini ve değerlerini\n" +" girdi olarak kullanılabilir biçimde listeler.\n" +" -V Değişken adlarını ve değerlerini listeler.\n" +" -v Değişken adlarını ve değerlerini girdi olarak\n" +" kullanılabilir biçimde listeler.\n" +" -q İŞLEV Adı belirtilen İŞLEVi çağıran düğmeler hakkında sorgu.\n" +" -u İŞLEV Adı belirtilen İŞLEVi çağıran tüm düğme kısayollarını\n" +" kaldırır.\n" +" -r DÜĞMEDİZİSİ DÜĞMEDİZİSİ için mevcut kısayolları kaldırır.\n" +" -x DÜĞMEDİZİSİ:KABUK-KOMUTU\tDÜĞMEDİZİSİnin her girilişinde KABUK-KOMUTUnun\n" +" \t\t\t\tçalıştırılmasını sağlar.\n" +" -X Düğme dizilerini -x ve ilişkili komutlarını yeniden\n" +" bir girdi olarak kullanılabilecek biçimde listeler.\n" +" \n" +" Çıkış Durumu:\n" +" tanınmayan bir seçenek girilmediği veya bir hata oluşmadığı durumda 0 döndürür." -#: builtins.c:326 -#, fuzzy +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2438,12 +2640,15 @@ msgid "" " 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." +"for, while veya until döngülerinden çık.\n" +" \n" +" Bir FOR, WHILE veya UNTIL döngüsünden çık. Eğer N belirtilmişse N ilişkili\n" +" döngüden çık.\n" +" \n" +" Çıkış Durumu:\n" +" N, 1'e eşit veya daha fazla olmadığında çıkış durumu 0'dır." -#: builtins.c:338 -#, fuzzy +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2453,26 +2658,47 @@ msgid "" " 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." +"for, while veya until döngülerine devam et.\n" +" \n" +" İlişkili FOR, WHILE veya UNTIL döngüsünün sonraki adımına devam eder.\n" +" N tanımlanmışsa N'inci ilişkili döngüye devam eder.\n" +" \n" +" Çıkış Durumu:\n" +" N, 1 veya daha büyük olmadığında çıkış durumu 0'dır." -#: builtins.c:350 +#: builtins.c:354 +#, fuzzy +#| 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.." 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" +" 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.." +" not a shell builtin." msgstr "" +"Kabuk dahillerini çalıştır.\n" +" \n" +" Komut araması yapmadan KABUK-DAHİLİ, ARGÜMANLAR argümanları ile\n" +" çalıştır. Bu, bir KABUK-DAHİLİ, bir kabuk işlevi olarak yeniden uygulamak isteyip\n" +" işlev içerisinde dahili olanı da çalıştırmanız gerektiğinizde kullanışlıdır.\n" +" \n" +" Çıkış Durumu:\n" +" KABUK-DAHİLİnin çıkış durumunu veya eğer KABUK-DAHİLİ değilse false döndürür." -#: builtins.c:365 -#, fuzzy +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2487,83 +2713,89 @@ msgid "" " 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." +"Geçerli alt yordam çağrısının bağlamını döndürür.\n" +" \n" +" İFADE olmadan, \"$satır $dosyaadı\" döndürür. İFADE ile kullanıldığında\n" +" \"$satır $altyordam $dosyaadı\" döndürür; bu ek bilgi bir yığın izi sağlamak\n" +" için kullanılabilir.\n" +" \n" +" İFADE değeri, geçerli çerçeveden önce kaç tane çerçeve çağrılacağını\n" +" belirtir. Üst çerçeve 0. çerçevedir. \n" +" Çıkış Durumu:\n" +" İFADE geçersiz olmadığı ve bir kabuk işlevi çalıştırmadığı durumda 0 döndürür." -#: builtins.c:383 -#, fuzzy +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; 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 +"Kabuk çalışma dizinini değiştir.\n" +" \n" +" Geçerli dizini DİZİN olarak değiştir. Öntanımlı dizin kabuk değişkeninin EV\n" +" dizini değeridir.\n" +" \n" +" CDPATH değişkeni, DİZİN içeren dizinler için arama yolunu tanımlar. CDPATH\n" +" için alternatif dizin adları iki nokta (:) ile ayrılır.\n" +" Boş dizin adı, geçerli dizinle aynıdır. Eğer DİZİN bölü (/) ile başlıyorsa CDPATH\n" +" kullanılmaz.\n" +" \n" +" Eğer dizin bulunamazsa ve kabuk seçeneği `cdable_vars' ayarlanmışsa sözcük\n" +" bir değişken adı olarak varsayılır. Eğer değişken bir değere sahipse değeri DİZİN\n" +" için kullanılır\n" +" \n" +" Seçenekler:\n" +" -L\tsembolik bağlantıların takip edilmesini zorla: '..' örneklerinin\n" +" \t\tişlenmesinden sonra DİZİN içindeki sembolik bağlantıları çöz\n" +" -P\tsembolik bağlantıları takip etmeden fiziksel dizini kullan: '..' örneklerinin\n" +" \t\tişlenmesinden önce DİZİN içindeki sembolik bağlantıları çöz\n" +" -e\teğer -P seçeneği belirtilmişse ve geçerli çalışma dizini başarılı şekilde\n" +" \tbelirlenemiyorsa sıfır olmayan bir durumla çık\n" +" -@\tdestekleyen sistemlerde, dosya niteliklerini içeren bir dizin olarak uzatılmış\n" +" niteliklere sahip bir dosya sun \n" +" Öntanımlı olan `-L' tanımlanmış gibi sembolik bağlantıları takip etmektir.\n" +" \n" +" Çıkış Durumu:\n" +" Eğer dizin değişmişse ve -P kullanıldığında $PWD başarılı ayarlanırsa 0; diğer durumda\n" +" sıfır olmayan bir değer döndürür." + +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2572,9 +2804,18 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"Geçerli çalışma dizininin adını yazdır.\n" +" \n" +" Seçenekler:\n" +" -L\teğer geçerli çalışma dizinini adlandırmışsa $PWD değerini yazdır\n" +" -P\thiçbir sembolik bağlantı kullanmadan fiziksel dizini yazdır\n" +" \n" +" Öntanımlı olarak `pwd', `-L' tanımlanmış şekilde davranır.\n" +" \n" +" Çıkış Durumu:\n" +" Dizin okunamadığı veya geçersiz seçenek verilmediği takdirde 0 döndürür." -#: builtins.c:428 -#, fuzzy +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2583,49 +2824,107 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" -"\r:\n" -" Etkisizdir; bu komut birşey yapmaz. Sıfır çıkış kodu döndürülür." +"Boş komut.\n" +" \n" +" Etkisizdir; bu komut birşey yapmaz.\n" +" \n" +" Çıkış Durumu:\n" +" Her zaman başarılıdır." -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"Bir başarılı sonuç dönrürür.\n" +" \n" +" Çıkış Durumu:\n" +" Her zaman başarılıdır." -#: builtins.c:448 -#, fuzzy +#: builtins.c:462 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." +"Başarısız bir sonuç döndür.\n" +" \n" +" Çıkış Durumu:\n" +" Her zaman başarısızdır." -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Basit bir komut çalıştır veya komutlar hakkında bilgi görüntüle.\n" +" \n" +" KOMUTU ARGümanları ile kabuk işlevi aramasını ihmal ederek çalıştırır veya\n" +" belirtilen KOMUTLAR hakkında bilgi görüntüler. Aynı adda bir işlev varsa\n" +" diskte komutları çalıştırmak için kullanılabilir.\n" +" \n" +" Seçenekler:\n" +" -p YOL için, tüm standart yardımcıları bulabilmek için bir öntanımlı değer\n" +" \tkullan\n" +" -v `type' dahilisine benzer bir KOMUT açıklaması göster\n" +" -V her KOMUTun fazla açıklamasını göster\n" +" \n" +" Çıkış Durumu:\n" +" KOMUTun çıkış durumunu döndürür. KOMUT bulunamazsa başarısız olur." -#: builtins.c:476 +#: builtins.c:490 #, 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" +#| " \t\tsource file when debugging)\n" +#| " -g\tcreate global variables when used in a shell function; otherwise\n" +#| " \t\tignored\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" +#| " -n\tmake NAME a reference to the variable named by its value\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. The `-g' option suppresses this behavior.\n" +#| " \n" +#| " Exit Status:\n" +#| " Returns success unless an invalid option is supplied or a variable\n" +#| " assignment error occurs." msgid "" "Set variable values and attributes.\n" " \n" @@ -2635,17 +2934,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2653,48 +2957,59 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment 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" +"Değişken değer ve niteliklerini ayarla.\n" +" \n" +" Değişkenleri ayarla ve nitelik ver. Eğer AD verilmemişse tüm değişkenlerin, niteliklerini ve değerlerini görüntüle.\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 +" -f\teylemi veya işlev adı ile tanımları gösterimini kısıtla\n" +" -F\tyalnızca işlev ad gösterimlerini kısıtla (ek olarak satır sayısı ve hata ayıklarken\n" +" \t\tkaynak dosyayı)\n" +" -g\tbir kabuk işlevinde kullanıldığında evrensel değişken oluştur,\n" +" \t\taksi takdirde yok sayılır\n" +" -p\ther AD'ın değeri ve niteliklerini görüntüle\n" +" \n" +" Nitelik ayarlayan seçenekler:\n" +" -a\tAD'ları indisli diziler yapmak için (destekleniyorsa)\n" +" -A\tAD'ları ilişkisel dizi yapmak için (destekleniyorsa)\n" +" -i\tAD'ları `integer' niteliği sahibi yapmak için\n" +" -l\tAD'ları atamada küçük harfe dönüştürmek için\n" +" -n\tAD'ı değeriyle ad bir değişkene referans yapmak için\n" +" -r\tAD'ları saltokunur yapmak için\n" +" -t\tAD'ların `trace' niteliği sahibi yapmak için\n" +" -u\tAD'ları atamada büyük harfe dönüştürmek için\n" +" -x\tAD'ları dışarı çıkarabilir yapmak için\n" +" \n" +" `-' yerine `+' kullanmak belirtilen niteliği kapatır.\n" +" \n" +" Tamsayı niteliğine sahip değişkenler, bir değere atandıklarında aritmetik değerlendirmeye tabi tutulurlar (`let' komutuna bakın).\n" +" \n" +" Bir işlevde kullanıldığında, `declare' AD'ları, `local' komutu\n" +"gibi yerel\n" +" yapar. `-g' seçeneği bu davranışı iptal eder.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir değer sağlanmadığı veya değişken atama hatası olmadığı sürece\n" +" başarılı döner." + +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"Değişken ad ve niteliklerini ayarla.\n" +" \n" +" `declare' ile eş anlamlıdır. Bkz. `help declare'." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2705,16 +3020,58 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"Yerel değişkenleri tanımla.\n" +" \n" +" AD adıyla bir yerel değişken oluştur ve DEĞER ata. SEÇENEK `declare'\n" +" tarafından kabul edilen herhangi bir seçenek olabilir.\n" +" \n" +" Yerel değişkenler yalnızca bir işlev içerisinde kullanılabilirler ve tanımlandıkları\n" +" işleve ve alt işlevlerine görünebilirler.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir seçenek verilmediğinde, bir değişken hatası oluşmadığında veya\n" +" kabuk bir işlev çalıştırmıyorsa başarılı döner." -#: builtins.c:537 +#: builtins.c:557 #, fuzzy +#| msgid "" +#| "Write arguments to the standard output.\n" +#| " \n" +#| " Display the ARGs, separated by a single space character and followed by a\n" +#| " newline, on the standard output.\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" +#| " \\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" +#| " \t\t0 to 3 octal digits\n" +#| " \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +#| " \t\tcan be one or two hex digits\n" +#| " \n" +#| " Exit Status:\n" +#| " Returns success unless a write error occurs." msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2726,6 +3083,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2733,36 +3091,48 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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 +"Argümanları standart çıktıya yaz.\n" +" \n" +" ARGümanları yeni satırla izlenen standart çıktıda bir boşluk karakteri\n" +" kullandıktan sonra göster.\n" +" \n" +" Seçenekler:\n" +" -n\tyeni satıra başvurma\n" +" -e\ttakip eden ters bölü kaçışlarının yorumlanmasını etkinleştir\n" +" -E\tters bölü kaçışlarının yorumlanmasını açıkça gizle\n" +" \n" +" `echo' aşağıdaki ters bölü kaçışlı karakterleri yorumlar:\n" +" \\a\tuyarı (zil)\n" +" \\b\tgerisilme\n" +" \\c\tsonraki çıktıları gizle\n" +" \\e\tkaçış karakteri\n" +" \\E\tkaçış karakteri\n" +" \\f\tform besleme\n" +" \\n\tyeni satır\n" +" \\r\tsatırbaşı\n" +" \\t\tyatay sekme\n" +" \\v\tdikey sekme\n" +" \\\\\tters bölü\n" +" \\0nnn\tASCII kodu NNN (sekizlik) olan karakter. NNN 0-3 arası sekizli\n" +" \t\trakamlardan oluşabilir.\n" +" \\xHH\tdeğeri HH (onaltılık) olan sekiz bit karakter. HH bir veya iki\n" +" \t\tonaltılık rakam olabilir\n" +" \n" +" Çıkış Durumu:\n" +" Yazma hatası oluşmadığı takdirde başarılı döner." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2774,8 +3144,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"Argümanları standart çıktıya yaz.\n" +" \n" +" ARGümanları yeni satır ile takip eden standart çıktıda görüntüle.\n" +" \n" +" Seçenekler:\n" +" -n\tyeni bir satıra başvurma\n" +" \n" +" Çıkış Durumu:\n" +" Bir hata oluşmadığı sürece başarılı döner." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2801,21 +3180,87 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"Kabuk yerleşiklerini etkinleştir/devre dışı bırak.\n" +" \n" +" Dahili kabuk komutlarını etkinleştirir ve devre dışı bırakır. Devre dışı\n" +" bırakmak bir kabuk yerleşiği ile aynı ada sahip bir disk komutunu tam\n" +" bir yol adı kullanmadan çalıştırmanızı sağlar. \n" +" Seçenekler:\n" +" -a\ttüm yerleşikler listesini etkin olup olmadıkları bilgisi ile yazdır\n" +" -n\ther AD'ı devre dışı bırak veya devre dışı olanları listele\n" +" -p\tyerleşik listesini yeniden kullanılabilir biçimde yazdır\n" +" -s\tyalnızca Posix `özel' yerleşiklerinin adlarını yazdır\n" +" \n" +" Hareketli yüklemeyi denetleyen seçenekler:\n" +" -f\tAD yerleşiğini paylaşılan DOSYAADI nesnesinden yükle\n" +" -d\t-f ile yüklenmiş bir yerleşiği kaldır\n" +" \n" +" Seçenek olmazsa her AD etkinleştirilir.\n" +" \n" +" Kabuk yerleşiği sürümü yerine $PATH içerisinde bulunan `test' kullanmak\n" +" için `enable -n test' yazın.\n" +" \n" +" Çıktı Durumu:\n" +" AD bir kabuk yerleşiği değilse ve hata oluşmazsa başarılı döner." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"Argümanları kabuk komutu olarak çalıştır.\n" +" \n" +" ARGümanları tek bir diziye birleştir, sonucu kabuğa girdi olarak kullan,\n" +" ve sonuçlanan komutları çalıştır.\n" +" \n" +" Çıkış Durumu:\n" +" Komutun çıkış durumunu döndürür veya komut boşsa başarılı döner." -#: builtins.c:626 +#: builtins.c:652 #, 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." msgid "" "Parse option arguments.\n" " \n" @@ -2848,122 +3293,121 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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" +"Seçenek argümanlarını ayıklar.\n" +" \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" +" \n" +" SÇNSİ 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" +" \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 veya\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" +" \n" +" getopts hataları iki yolla raporlayabilir. Eğer SÇNSİ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" +" \n" +" OPTERR değişkeninin değeri 0 ise SÇNSİ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." +" \n" +" Getopts normalde konumsal parametreleri ($0 - $9) çözümlese de başka\n" +" argümanlar verilmişse bunları çözümler.\n" +" \n" +" Çıktı Durumu:\n" +" Bir seçenek bulunduğunda başarılı, seçenek sonuna gelindiğinde veya bir hata oluştuğunda başarısız döner.\n" +" encountered or an error occurs." -#: builtins.c:668 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"Kabuğu verilen komutla değiştir.\n" +" \n" +" KOMUTU, belirtilen program ile değiştirerek çalıştır.\n" +" ARGÜMANLAR, KOMUTUN argümanları olur. Eğer KOMUT belirtilmemişse tüm\n" +" yönlendirmeler geçerli kabukta uygulanır.\n" +" \n" +" Seçenekler:\n" +" -a ad\tAD'ı, KOMUT'un sıfırıncı argümanına ata\n" +" -c\tKOMUTu boş bir ortamla çalıştır\n" +" -l\tKOMUTun sıfırıncı argümanına bir çizgi koy\n" +" \n" +" Eğer komut çalıştırılamıyorsa `execfail' ayarlanmadığı sürece etkileşimsiz kabuk\n" +" çıkış yapar.\n" +" \n" +" Çıkış Durumu:\n" +" KOMUT bulunduğu ve bir yönlendirme hatası olmadığı sürece başarılı döner." -#: builtins.c:689 -#, fuzzy +#: builtins.c:715 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" +"Exit the shell.\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 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"Oturum kabuğundan çık.\n" +" \n" +" N durumuyla bir oturum kabuğundan çıkar. Eğer çalıştırılmamışsa oturum\n" +" kabuğunda bir hata döndürür." -#: builtins.c:708 -#, fuzzy +#: builtins.c:734 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" +" 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" +" -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" @@ -2977,36 +3421,33 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" 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" +"Geçmiş listesindeki komutları görüntüle veya çalıştır\n" +" \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 dizi de olabilir, bu takdirde\n" +" bu dizi ile başlayan en son komut anlamına gelir.\n" +" \n" +" Seçenekler:\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" +" \t\tÖntanımlısı FCEDIT ardından EDITOR ve vi'dir.\n" +" -l\tile komutlar stardart çıktıya listelenir.\n" +" -n\tile listede satır numaraları bulunmaz.\n" +" -r\tile 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" +" \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." +" r' yazarak en son komut çalıştırılabilir.\n" +" \n" +" Çıktı Durumu:\n" +" Başarılı veya çalıştırılan komut durumu döndürülür; hata oluştuğunda sıfır harici değer döner." -#: builtins.c:738 -#, fuzzy +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3017,54 +3458,76 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" -"\rfg [İŞ_BELİRTİMİ]\n" +"İşi ön plana taşı.\n" +" \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." +" o an ki işi kullanır.\n" +" \n" +" Çıktı Durumu:\n" +" Ön plana yerleştirilmiş komutun durumu veya hata olduğunda başarısız." -#: builtins.c:753 -#, fuzzy +#: builtins.c:779 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" +" 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" +"İşi arka plana taşı.\n" +" \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." +" İŞ_BELİRTİMİ verilmemişse iş belirtimi olarak o an ki iş kullanılır. \n" +" Çıktı Durumu:\n" +" İş denetimi etkin olmadığı veya bir hata oluşmadığı sürece başarılı döner." -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 +#: builtins.c:818 +#, fuzzy +#| 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" +#| " \t\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." msgid "" "Display information about builtin commands.\n" " \n" @@ -3076,18 +3539,64 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" +"Dahili komutlar hakkında bilgi görüntüle.\n" +" \n" +" Dahili komutların özetlerini görüntüler. Eğer DİZGİ belirtilmişse\n" +" DİZGİ ile eşleşen tüm komutlar hakkında ayrıntılı bilgi verir, aksi\n" +" halde, yardım konuları yazdırılır.\n" +" \n" +" Seçenekler:\n" +" -d\ther konu için kısa açıklama yazdır\n" +" -m\tkullanımı pseudo-man sayfası biçiminde yazdır\n" +" -s\tyalnızca DİZGİ ile eşleşen konular için kısa kullanım\n" +" \t\tbilgisi yazdır\n" +" \n" +" Argümanlar:\n" +" DİZGİ\tBir yardım konusunu belirten desen\n" +" \n" +" Çıktı Durumu:\n" +" DİZGİ bulunmadığı veya geçersiz bir seçenek verilmediğinde başarılı döner." -#: builtins.c:816 +#: builtins.c:842 #, 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 position 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" +#| " \t\tand append them to the history list\n" +#| " -r\tread the history file and append the contents to the history\n" +#| " \t\tlist\n" +#| " -w\twrite the current history to the history file\n" +#| " \n" +#| " -p\tperform history expansion on each ARG and display the result\n" +#| " \t\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." msgid "" "Display or manipulate the history list.\n" " \n" @@ -3096,56 +3605,62 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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" +"Geçmiş listesini görüntüle veya düzenle.\n" +" \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" +" gösterir. Değişiklik yapılmış satırlarda numaralardan önce bir `*'\n" +" vardır. Argüman olarak N belirtildiğinde yalnızca son N satır listelenir.\n" +" \n" +" Seçenekler:\n" +" -c\tkomut geçmişi listesini tüm girdilerini silerek temizler.\n" +" -d\tile konumu KONUM olan geçmiş girdisi silinir.\n" +" \n" +" -a\tile oturumunun başlangıcından itibaren girilen geçmiş satırları\n" +" \tgeçmiş dosyasına eklenir.\n" +" -n\tile geçmiş dosyasından henüz okunmamış olan geçmiş satırları okur\n" +" \t\tve geçmiş listesine ekler\n" +" -r\tile dosya okunur ve içeriği geçmiş listesine eklenir.\n" +" -w\tile geçmiş listesi çıktısı geçmiş dosyasına yazılır.\n" +" \n" +" -p\ther ARGümanda geçmiş açılımı yap ve sonucu geçmiş listesinde\n" +" \tdepolamadan görüntüle\n" +" -s\tARGümanları geçmiş listesine tek bir girdi olarak ekle\n" +" \n" +" DOSYAİSMİ verilmezse HISTFILE değişkenindeki değer, o da yoksa\n" +" ~/.bash_history dosyası kullanılır.\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." +" takdirde hiç zaman damgası basılmaz. \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde başarılı döner." -#: builtins.c:852 -#, fuzzy +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3154,8 +3669,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3168,20 +3683,28 @@ msgid "" " 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 +"Görev durumlarını görüntüle.\n" +" \n" +" Etkin işleri listeler. İŞ_BELİRTİMİ bu çıktıya çıktıyı kısıtlar.\n" +" Seçenekler olmadan, tüm etkin görev durumları görüntülenir.\n" +" \n" +" Seçenekler:\n" +" -l\tile normal bilgilere ek olarak süreç kimliklerini de (PID) listele\n" +" -n\tile yalnızca kullanıcının durumları hakkında aldığı son uyarıdan\n" +" \t\tberi durumları değişen işler hakkında bilgi gösterir.\n" +" -p\tile işlerin yalnızca süreç kimliklerini listeler\n" +" -r\tile yalnızca çalışmakta olan,\n" +" -s\tile ise yalnızca durmuş olan işler listelenir.\n" +" \n" +" -x seçeneği verilmişse ARGümanlar ile belirtilen tüm iş belirtimleri,\n" +" işlerin süreç grup liderinin süreç grup kimliğine yerleştirilip KOMUT\n" +" çalıştırılır.\n" +" \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde başarılı döner.\n" +" -x kullanılmışsa KOMUTun çıkış durumu döndürülür." + +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3191,15 +3714,27 @@ msgid "" " 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" +" \t\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örevleri geçerli kabuktan kaldır.\n" +" \n" +" Her İŞTANIMı argümanını etkin görevler tablosundan kaldırır. İŞTANIMı olmadan,\n" +" kabuk geçerli görev kavramını kullanır.\n" +" \n" +" Seçenekler:\n" +" -a\tİŞTANIMı belirtilmemişse tüm görevleri kaldır\n" +" -h\ther İŞTANIMını işaretle, böylece kabul bir SIGHUP aldığında göreve SIGHUP\n" +" \t\tgönderme\n" +" -r\tyalnızca çalışan görevleri kaldırremove \n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir seçenek veya İŞTANIMı girilmedikçe başarılı döner." -#: builtins.c:898 -#, fuzzy +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -3211,7 +3746,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3220,32 +3756,35 @@ msgid "" " 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" +"Bir göreve sinyal gönder.\n" +" \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 +" SİNYAL veya SİNYALNUM verilmezse öntanımlı olarak SIGTERM kullanılır.\n" +" \n" +" Seçenekler:\n" +" -s sig\tSİNYAL bir sinyal\n" +" -n sig\tSİNYAL bir sinyal numarası\n" +" -l\t-l seçeneği ile sinyal adları listelenir.\n" +" \t\tArgümanlı -l seçeneğinde argümanların listelenecek\n" +" sinyal adlarının numaraları olduğu varsayılır. \n" +" -L\t, -l anahtarının eş anlamlısıdır\n" +" Kill iki sebepten dolayı bir kabuk yerleşiğidir: süreç kimlikleri yerine iş\n" +" kimliklerinin kullanımını mümkün kılar ve eğer oluşturabileceğiniz süreç\n" +" sayısı sınırını aşarsanız başka bir süreci öldürecek bir süreci başlatmak\n" +" zorunda kalmazsınız.\n" +" \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek belirtilmediği veya bir hata oluşmadığında başarılı döner." + +#: builtins.c:949 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" +" 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" @@ -3279,142 +3818,97 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" 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" +"Aritmetik ifadeleri değerlendir.\n" +" \n" +" Her ARG 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" +" \n" +" \tid++ id--\tsonradan-arttırım ve sonradan-eksiltim\n" +" \t++id --id\tönceden-arttırım ve önceden-eksiltim\n" +" \t- +\t\ttek terimli eksi ve artı imi\n" +" \t! ~\t\tmantıksal ve bitseviyesinde olumsuzlama\n" +" \t**\t\tüs imi\n" +" \t* / %\t\tçarpma, bölme, kalan\n" +" \t+ -\t\ttoplama, çıkarma\n" +" \t<< >> \tbit seviyesinde sola ve sağa ötelemeler\n" +" \t<= >= < >\tkarşılaştırmalar\n" +" \t== !=\t\teşitlik, eşitsizlik\n" +" \t&\t\tbit seviyesinde VE\n" +" \t^\t\tbit seviyesinde ayrıcalıklı VEYA\n" +" \t|\tbit seviyesinde VEYA\n" +" \t&&\t\tmantıksal VE\n" +" \t||\t\tmantıksal VEYA\n" +" \tifade ? ifade : ifade\n" +" \t\t\tkoşullu üç terimlisi\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tatamalar\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" +" adı 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" +" \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" +" \n" +" Çıktı Durumu:\n" " Son ifade'nin sonucu 0 ise dönüş durumu 1 dir, aksi takdirde 0 dır." -#: builtins.c:966 -#, fuzzy +#: builtins.c:994 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" +" 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" +" 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" +" 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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" The return code is zero, unless end-of-file is encountered, read times out\n" +" (in which case it's greater than 128), a variable assignment error occurs,\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 + +#: builtins.c:1041 msgid "" "Return from a shell function.\n" " \n" @@ -3425,9 +3919,16 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"Bir kabuk işlevinden dön.\n" +" \n" +" Bir işlev veya kaynak betiğinin N ile belirtilen dönüş değeri ile\n" +" çıkmasına neden olur. N girilmezse dönüş durumu işlev veya\n" +" betikte çalıştırılmış en son komutun dönüş durumudur.\n" +" \n" +" Çıkış Durumu:\n" +" N veya kabul bir işlev veya betik çalıştırmıyorsa başarısız döner." -#: builtins.c:1022 -#, fuzzy +#: builtins.c:1054 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3470,8 +3971,7 @@ msgid "" " 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" +" 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" @@ -3493,9 +3993,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3508,22 +4011,24 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" -"\rset [--abefhkmnptuvxBCHP] [-o seçenek] [arg ...]\n" +"Kabuk seçenekleri ve konumsal parametrelerin değerlerini ata veya kaldır\n" +" \n" +" Kabuk nitelikleri veya konumsal parametre değerlerini değiştir veya\n" +" kabuk değişkenlerinin ad ve değerlerini görüntüle.\n" +" \n" +" Seçenekler:\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" +" -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 adı ü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 adından ö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" +" -o seçenek-adı\n" +" seçenek-adı 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" @@ -3543,36 +4048,28 @@ msgstr "" " 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" +" nolog o an kabul edilir ama yok sayı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" +" pipefail bir boru hattı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 boru hattı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" +" -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" +" 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" @@ -3587,8 +4084,10 @@ msgstr "" " 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" +" -T Etkinse DEBUG ve RETURN üstündeki tuzaklar kabuk işlevlerince\n" " miras alınır.\n" +" -- Geri kalan argümanları konumsal parametrelere ata. Eğer kalan\n" +" argüman yoksa konumsal parametrelerin ataması kaldırılı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" @@ -3597,9 +4096,11 @@ msgstr "" " 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." +" tüm kabuk değişkenleri basılır. \n" +" Çıktı Durumu:\n" +" Geçersiz seçenek belirtilmediği sürece başarılı döner." -#: builtins.c:1104 +#: builtins.c:1139 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3608,9 +4109,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3619,13 +4121,12 @@ msgid "" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" -#: builtins.c:1124 +#: builtins.c:1161 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3638,7 +4139,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1143 +#: builtins.c:1180 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3650,7 +4151,8 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\n" " \n" " An argument of `--' disables further option processing.\n" " \n" @@ -3658,7 +4160,7 @@ msgid "" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" -#: builtins.c:1164 +#: builtins.c:1202 msgid "" "Shift positional parameters.\n" " \n" @@ -3669,8 +4171,7 @@ msgid "" " Returns success unless N is negative or greater than $#." msgstr "" -#: builtins.c:1176 builtins.c:1191 -#, fuzzy +#: builtins.c:1214 builtins.c:1229 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3683,21 +4184,20 @@ msgid "" " 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 +"Geçerli kabukta bir dosyadan komut çalıştır.\n" +" \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.\n" +" \n" +" Çıktı Durumu:\n" +" DOSYAİSMİnde çalıştırılan son komutun durumunu döndürür. DOSYAİSMİ\n" +" okunamazsa başarısız döner." + +#: builtins.c:1245 msgid "" "Suspend shell execution.\n" " \n" @@ -3711,15 +4211,17 @@ msgid "" " Returns success unless job control is not enabled or an error occurs." msgstr "" -#: builtins.c:1223 -#, fuzzy +#: builtins.c:1261 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3743,8 +4245,7 @@ msgid "" " -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 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" @@ -3765,14 +4266,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3788,114 +4291,118 @@ msgid "" " 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" +"Koşullu ifade değerlendir.\n" +" \n" +" İFADE'nin değerlendirilmesine bağlı olarak 0 (doğru) veya 1 (yanlış)\n" +" durumu ile çıkar. İfadeler tek terimli veya iki terimli olabilir.\n" +" Tek terimli ifadeler çoğunlukla bir dosyanın durumunu saptamakta\n" +" kullanılır. Dizi işleçleri ve sayısal karşılaştırma işleçleri de\n" " vardır.\n" -"\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" +" \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 adlı 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" +" DOSYA1 -nt DOSYA2 dosya1, dosya2'den değişiklik tarihine göre\n" +" daha yeni ise veya dosya1 mevcutken dosya2 yoksa\n" +" doğrudur.\n" +" \n" +" DOSYA1 -ot DOSYA2 dosya1, dosya2 den daha eski ise veya dosya2\n" +" mevcutken dosya1 yoksa doğrudur.\n" " \n" -" -n DİZGE\n" -" DİZGE dizge uzunluğu sıfırdan farklıysa doğrudur.\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" -" 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" +" Dizi işleçleri:\n" +" \n" +" -z dizi uzunluğu sıfırsa doğrudur.\n" +" \n" +" -n \n" +" dizi uzunluğu sıfırdan farklıysa doğrudur.\n" +" \n" +" 1 = DİZİ2 diziler aynıysa doğrudur.\n" +" 1 != DİZİ2 diziler aynı değilse doğrudur.\n" +" 1 < DİZİ2 dizi1 yerele göre sıralamada dizi2'den\n" " önceyse doğrudur.\n" -" DİZGE1 > DİZGE2 dizge1 yerele göre sıralamada dizge2'den\n" +" 1 > DİZİ2 dizi1 yerele göre sıralamada dizi2'den\n" " sonraysa doğrudur.\n" -"\n" +" \n" " Diğer işleçler:\n" -"\n" +" \n" " -o SEÇENEK Kabuk seçeneği SEÇENEK etkinse doğrudur.\n" +" -v DEĞŞ Kabuk DEĞŞ ayarlanmış ise true.\n" +" -R DEĞŞ Kabuk DEĞŞ ayarlanmış ve bir ad referansı ise true\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" +" \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" +" \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." +" ifadenin sonucu doğrudur. \n" +" Çıktı Durumu:\n" +" Eğer İFADE true olursa başarılı, İFADE false ile sonuçlanırsa veya geçersiz\n" +" argümanda başarısız döner." -#: builtins.c:1299 -#, fuzzy +#: builtins.c:1343 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" +"Şartlı ifadeyi değerlendir.\n" +" \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 +#: builtins.c:1352 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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 "" +"İşleme süresini görüntüle.\n" +" \n" +" Kabuk ve tüm alt süreçleri için kümülatif kullanıcı ve sistem süresini\n" +" yazdırır.\n" +" \n" +" Çıktı Durumu:\n" +" Her zaman başarılı döner." -#: builtins.c:1320 +#: builtins.c:1364 #, fuzzy msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3904,45 +4411,45 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" 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" +" çalıştırılır. ARGüman verilmezse (ve tek bir SİNYAL varsa) veya `-'\n" +" verilirse belirtilen tüm sinyallere kabuk başlatıldığındaki değerleri\n" +" yerleştirilir. ARGüman bir boş dizi ise her SİNYAL sinyali kabuk ve\n" +" onu çağıran komutlar tarafından yok sayılır. Eğer SİNYAL 0 veya 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" +" 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" +" gösterir. Hiç ARGüman verilmemişse veya yalnızca -p verilmişse trap\n" " her SİNYAL ile ilişkili komutların listesini basar. Her SİNYAL ya\n" -" 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" +" dosyasındaki bir sinyal adı veya bir sinyal numarası\n" +" olarak verilmelidir. Sinyal adları 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 adlarını\n" " numaraları ile birlikte listelemesini sağlar. Kabuğa bir sinyal\n" " göndermek isterseniz \"kill -SİGNAL $$\" sözdizimini kullanabilirsiniz." -#: builtins.c:1352 +#: builtins.c:1400 msgid "" "Display information about command type.\n" " \n" @@ -3951,34 +4458,77 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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." +" Returns success if all of the NAMEs are found; fails if any are not found." msgstr "" -#: builtins.c:1383 +#: builtins.c:1431 #, 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" +#| " -k\tthe maximum number of kqueues allocated for this process\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" +#| " -P\tthe maximum number of pseudoterminals\n" +#| " -T\tthe maximum number of threads\n" +#| " \n" +#| " Not all options are available on all platforms.\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." msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -3991,6 +4541,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4002,6 +4553,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4016,40 +4572,49 @@ msgid "" " 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" +"Kabuk kaynak sınırlarını değiştir.\n" +" \n" +" Kabuk ve oluşturduğu süreçlere, izin veren sistemlerde mevcut kaynaklar\n" +" üzerinde denetim sağlar.\n" +" \n" +" Seçenekler:\n" +" -S\tYazılımsal (`soft') sınır kullanılır.\n" +" -H\tDonanımsal (`hard') sınır kullanılır.\n" +" -a\tMevcut tüm sınırlamalar gösterilir.\n" +" -c\tOluşan core dosyalarının azami boyu\n" +" -d\tBir sürecin veri segmanının azami boyu\n" +" -e\tAzami zamanlama önceliği (`nice')\n" +" -f\tKabuk ve çocukları tarafından oluşturulan dosyaların azami boyu\n" +" -i\tAskıdaki sinyallerin azami sayısı\n" +" -k\tBu süreç için ayrılmış kqueue'lerin azami sayısı\n" +" -l\tBelleğe kilitlenebilen azami boyut\n" +" -m\tAzami bellek boyu\n" +" -n\tAçık dosya tanıtıcılarının azami sayısı\n" +" -p\tİletişim tüneli tamponunun boyu\n" +" -q\tPOSIX ileti kuyruklarındaki azami bayt miktarı\n" +" -r\tAzami anında çalıştırma zamanlaması önceliği\n" +" -s\tYığının azami boyu\n" +" -t\tİşlemci zamanının saniye cinsinden azami miktarı\n" +" -u\tTek bir kullanıcının kullanabileceği azami süreç sayısı\n" +" -v\tBir sürecin kullanabileceği sanal belleğin azami miktarı\n" +" -x\tDosya kilitlerinin azami sayısı\n" +" -T\tAzami iş parçacık sayısı\n" +" \n" +" Tüm seçenekler tüm platformlarda kullanılabilir olmayabilir.\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." +" özkaynak için mevcut değer gösterilir. Hiç seçenek verilmezse -f\n" +" seçeneği verilmiş kabul edilir.\n" +" \n" +" 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. \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde başarılı döner." -#: builtins.c:1428 +#: builtins.c:1482 msgid "" "Display or set file mode mask.\n" " \n" @@ -4067,46 +4632,84 @@ msgid "" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" -#: builtins.c:1448 +#: builtins.c:1502 +#, fuzzy +#| msgid "" +#| "Wait for job completion and return exit status.\n" +#| " \n" +#| " Waits for each process identified by an 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 that job's pipeline.\n" +#| " \n" +#| " If the -n option is supplied, waits for the next job to terminate and\n" +#| " returns its exit status.\n" +#| " \n" +#| " Exit Status:\n" +#| " Returns the status of the last ID; fails if ID is invalid or an invalid\n" +#| " option is given." 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"Sürecin tamamlanmasını bekle ve çıkış durumunu döndür.\n" +" \n" +" Belirtilen süreci bekler ve sonlandırma durumunu raporlar. Eğer ID verilmemişse\n" +" geçerli tüm alt süreçler beklenir ve dönüş kodu sıfırdır. Eğer ID bir görev tanımıysa\n" +" görevin iletişim tünelindeki tüm süreçler beklenir.\n" +" \n" +" -n seçeneği verilirse sonraki görevin sonlanması beklenir ve çıkış durumunı döndürür.\n" +" \n" +" Çıkış Durumu:\n" +" Kimlik durumunu döndürür, kimlik geçersizse veya geçersiz bir seçenek verilmişse\n" +" başarısız olur." -#: builtins.c:1466 -#, fuzzy +#: builtins.c:1533 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is 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 +"Sürecin tamamlanmasını bekle ve çıkış durumunu döndür.\n" +" \n" +" PID tarafından belirtilen her süreci bekler ve sonlandırma durumunu raporlar.\n" +" Eğer PID verilmemişse geçerli tüm alt süreçler beklenir ve dönüş kodu sıfırdır.\n" +" PID bir süreç kimliği olmalıdır.\n" +" \n" +" Çıkış Durumu:\n" +" Son PID'nin durumunu döndürür, PID geçersizse veya geçersiz bir seçenek verilmişse\n" +" başarısız olur." + +#: builtins.c:1548 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4118,14 +4721,16 @@ msgid "" " 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." +"Bir listedeki her üye için komut çalıştır.\n" +" \n" +" `for' döngüsü bir öge listesindeki her üye için komut sırasını çalıştırır.\n" +" Eğer `in SÖZCÜKLER ...;' belirtilmemişse `in \"$@\"' varsayılır. SÖZCÜKLER\n" +" içerisindeki her eleman için, AD bu elemana atanır ve KOMUTLAR çalıştırılır.\n" +" \n" +" Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1495 -#, fuzzy +#: builtins.c:1562 msgid "" "Arithmetic for loop.\n" " \n" @@ -4141,18 +4746,21 @@ msgid "" " 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" +"Döngü için aritmetik.\n" +" \n" +" Şuna eşdeğerdir:\n" " \t(( İFADE1 ))\n" " \twhile (( İFADE2 )); do\n" -" \t\tKOMUTlar\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." +" İFADE1, İFADE2 ve İFADE3 aritmetik ifadelerdir. Eğer ifadelerden biri yoksa\n" +" 1'e değerlendirilmiş şekilde davranır.\n" +" \n" +" Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1513 -#, fuzzy +#: builtins.c:1580 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4171,28 +4779,23 @@ msgid "" " 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" +"Listeden sözcükleri seç ve komutları çalıştır.\n" +" \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 yinelenir. 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." +" sonlandırılıncaya kadar komutlar çalıştırılır.\n" +" \n" +" Çıktı Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1534 -#, fuzzy +#: builtins.c:1601 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4207,16 +4810,20 @@ msgid "" " 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 +"Veriyolu çalıştırması tarafından harcanan zamanı bildir.\n" +" \n" +" VERİYOLUnu çalıştır ve sonlandığında kullanıcı işlemci zamanı ile sistem\n" +" işlemci zamanını içeren gerçek zamanın bir özetini yazdır.\n" +" \n" +" Seçenekler:\n" +" -p\ttaşınabilir Posix biçiminde zaman özetini yaz\n" +" \n" +" ZAMANBİÇİMİ değişkeninin değeri çıktı biçimi olarak kullanılır.\n" +" \n" +" Çıktı Durumu:\n" +" VERİYOLU döndürme değerini döndürür." + +#: builtins.c:1618 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4226,47 +4833,42 @@ msgid "" " 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." +"Kalıp eşleştirme tabanlı komutları çalıştır.\n" +" \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.\n" +" \n" +" Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1563 -#, fuzzy +#: builtins.c:1630 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" +" 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" +" `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" +"Komutları şartlara göre çalıştırır.\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" +" `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." +" doğru sonuç vermemişse sıfır döner. Çıkış Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1580 -#, fuzzy +#: builtins.c:1647 msgid "" "Execute commands as long as a test succeeds.\n" " \n" @@ -4276,12 +4878,15 @@ msgid "" " 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." +"Testler başarılı olduğu sürece komutları çalıştırır.\n" +" \n" +" KOMUTLARı, `while' KOMUTLARı sıfır çıktı durumuna sahip oluncaya\n" +" kadar genişlet ve çalıştır.\n" +" \n" +" Çıktı Durumu:\n" +" En son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1592 -#, fuzzy +#: builtins.c:1659 msgid "" "Execute commands as long as a test does not succeed.\n" " \n" @@ -4291,11 +4896,15 @@ msgid "" " 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." +"Bir sınama başarısız oluncaya kadar komutları çalıştır.\n" +" \n" +" `until KOMUTLAR; listesinin çıkış durumu sıfırdan farklı olduğu sürece\n" +" `do KOMUTLAR;' listesi çalıştırılır.\n" +" \n" +" Çıktı Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1604 +#: builtins.c:1671 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4305,16 +4914,15 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -#: builtins.c:1618 +#: builtins.c:1685 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" +" 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" @@ -4322,8 +4930,7 @@ msgid "" " Returns success unless NAME is readonly." msgstr "" -#: builtins.c:1632 -#, fuzzy +#: builtins.c:1699 msgid "" "Group commands as a unit.\n" " \n" @@ -4333,12 +4940,15 @@ msgid "" " 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." +"Komutları bir birim olarak grupla.\n" +" \n" +" KOMUTLAR bir grup olarak çalıştırılır. Bu, bir komut kümesini bir\n" +" yönlendirmede kullanmanın tek yoludur.\n" +" \n" +" Çıktı Durumu:\n" +" Son çalıştırılan komutun durumunu döndürür." -#: builtins.c:1644 -#, fuzzy +#: builtins.c:1711 msgid "" "Resume job in foreground.\n" " \n" @@ -4351,39 +4961,51 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" -"\r%: İŞ_BELİRTİMİ [&]\n" +"Göreve ön planda devam et.\n" +" \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İ bir iş adı 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." +" olarak kullanılmış gibi artalana yerleştirilmesine sebep olur.\n" +" \n" +" Çıktı Durumu:\n" +" Devam edilen görevin durumunu döndürür." -#: builtins.c:1659 +#: builtins.c:1726 #, 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." msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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" +"Aritmetik ifadeyi değerlendir.\n" +" \n" " Verilen aritmetik İFADE aritmetik değerlendirme kurallarına göre\n" -" değerlendirilir. \"let İFADE\" ile eşdeğerdir." +" değerlendirilir. \"let İFADE\" ile eşdeğerdir.\n" +" \n" +" Çıktı Durumu:\n" +" İFADE 0 olursa 1; aksi takdirde 0 döndürür." -#: builtins.c:1671 -#, fuzzy +#: builtins.c:1738 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" +" 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" @@ -4401,23 +5023,27 @@ msgid "" " 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" +"Koşullu komut çalıştır.\n" +" \n" +" Koşullu İFADE'nin değerine bağlı olarak 0 veya 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'nin 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 +" `==' ve `!=' işleçleri kullanıldığında, işlecin sağındaki dizi bir kalıp\n" +" olarak ele alınır ve kalıp eşleştirmesi uygulanır. `=~' kullanıldığında\n" +" işlecin sağındaki dizi düzenli ifade olarak eşleştirilir.\n" +" İFADE1, ifadenin değeri için tek başına yeterli ise && ve || İFADE2'yi\n" +" çalıştırmaz.\n" +" \n" +" Çıkış Durumu:\n" +" İFADE değerine göre 0 veya 1." + +#: builtins.c:1764 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4470,75 +5096,67 @@ msgid "" " 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 +"Bazı değişkenler ve anlamları:\n" +" \n" +" BASH_VERSION\tBu Bash'in sürüm bilgisi.\n" +" CDPATH\t`cd'ye argüman olarak verilecek dizinlerin aranacağı\n" +" \t\tdizinlerin iki nokta imi ayraçlı listesi.\n" +" GLOBIGNORE\tDosyayolu yorumlaması tarafından yok sayılacak dosya\n" +" \t\tadlarını belirten kalıpların ikinokta imi ayraçlı\n" +" \t\tlistesi.\n" +" HISTFILE\tKomut geçmişinizin saklanacağı dosyanın adı.\n" +" HISTFILESIZE\tBu dosyanın içerebileceği azami satır sayısı.\n" +" HISTSIZE\tÇalışan bir kabuğun erişebileceği geçmiş satırlarının\n" +" \t\tazami sayısı.\n" +" HOME\tKullanıcının ev dizininin tam yolu.\n" +" HOSTNAME\tMakinenizin ağdaki konak adı.\n" +" HOSTTYPE\tBash'in bu sürümünün altında çalıştığı işlemcinin türü\n" +" IGNOREEOF\tTek girdi olarak EOF karakteri alındığında kabuğun\n" +" \t\teylemini denetler. Atandığında değeri, kabuk\n" +" \t\tçıkmadan önce bir girdi satırındaki ilk karakter\n" +" \t\tolarak okunabilen ardışık EOF karakterlerinin sayısını\n" +" \t\tgösterir (öntanımlı 10). Eğer değişken mevcut değilse\n" +" \t\tEOF girdi sonunu belirtir.\n" +" MACHTYPE\tBash'in üzerinde çalıştığı sistemi açıklayan dizi.\n" +" MAILCHECK\tBash'in yeni postaya kaç saniyede bir bakacağı.\n" +" MAILPATH\tBash'in yeni posta var mı diye bakacağı dosya\n" +" \t\tad ikinokta imi ayraçlı listesi.\n" +" OSTYPE\tBash'in üzerinde çalıştığı çekirdeğin türü.\n" +" PATH\tKomutları ararken bakılacak dizinlerin ikinokta imi\n" +" \t\tayraçlı listesi.\n" +" PROMPT_COMMAND\tBirincil komut istemi ($PS1) basılmadan önce\n" +" \t\tçalıştırılacak komut\n" +" PS1\tBirincil komut istemi dizisi.\n" +" PS2\tİkincil komut istemi dizisi.\n" +" PWD\tÇalışma dizininizin tam yolu.\n" +" SHELLOPTS\tEtkin kabuk seçeneklerinin ikinokta imi ayraçlı listesi\n" +" TERM\tGeçerli uçbirim türünün adı.\n" +" TIMEFORMAT\ttime anahtar sözcüğü ile başlayan zamanlama bilgisinin\n" +" \t\tnasıl belirtileceğini gösteren biçim dizisi.\n" +" auto_resume\tDeğerin boş olmaması durmuş işin adının onu\n" +" \t\tbaşlatmakta kullanılan komut satırı olduğudur ve\n" +" \t\toradaysa iş önalana alınır. `exact' değeri, komut\n" +" \t\tsözcüğünün durmuş işler listesindeki komutla tam\n" +" \t\tolarak eşleşmesi gerektiği anlamına gelir. `substring'\n" +" \t\tdeğeri, komut sözcüğünün işin bir altdizisi ile\n" +" \t\teşleşmesi gerektiğini belirtir. Bunlar dışında bir\n" +" \t\tdeğer komutun durmuş bir işe önek olması gerektiği\n" +" \t\tanlamına gelir.\n" +" histchars\tGeçmiş yorumlaması, hızlı ikame ve sembolleştirmeyi\n" +" \t\tdenetleyen en çok üç karakter. İlk karakter geçmiş\n" +" \t\tyorumlamasının başlatılmasını sağlayan geçmiş\n" +" \t\tyorumlama karakteridir ve normalde ! işaretidir.\n" +" \t\tİkinci karakter, bir satırdaki ilk karakter olduğunda\n" +" \t\t`hızlı ikame'yi imleyen karakterdir ve normalde ^\n" +" \t\timidir. İstemlik olan üçüncü karakter ise bir\n" +" \t\tsözcüğün ilk karakteri olarak bulunduğunda satırın\n" +" \t\tkalanının açıklama olmasını sağlayan karakterdir ve\n" +" \t\tnormalde # imidir.\n" +" HISTIGNORE\tGeçmiş listesine hangi satırların kaydedilmesi\n" +" \t\tgerektiğine karar vermek için kullanılan kalıpların\n" +" \t\tikinokta imi ayraçlı listesi.\n" + +#: builtins.c:1821 msgid "" "Add directories to stack.\n" " \n" @@ -4548,19 +5166,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4568,29 +5186,35 @@ msgid "" " 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" +"Dizinleri yığına ekle.\n" +" \n" +" Dizin yığınının en üstüne bir dizin ekler veya geçerli çalışma\n" +" dizini yığının tepesine gelecek şekilde yığını 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." +" \n" +" Seçenekler:\n" +" -n\tdizinleri yığına eklerken normal dizin değişikliğini engeller,\n" +" \t\tböylece yalnızca yığın değiştirilmiş olur.\n" +" \n" +" Argümanlar:\n" +" +N\t(`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \t\tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \t\tyığını döndürür.\n" +" \n" +" -N\t(`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \t\tsıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n" +" \t\tyığını döndürür.\n" +" \n" +" dizin\tDİZİNi yeni çalışma dizini yaparak dizin yığınının\n" +" \t\ttepesine ekler.\n" +" \n" +" Dizin yığınını `dirs' komutuyla görebilirsiniz.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir argüman belirtilmediği veya dizin değişikliği başarısız\n" +" olmadıkça başarılı döner." -#: builtins.c:1788 -#, fuzzy +#: builtins.c:1855 msgid "" "Remove directories from stack.\n" " \n" @@ -4599,16 +5223,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -4616,22 +5240,31 @@ msgid "" " 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" +"Dizin yığınından girdileri sil.\n" +" \n" +" Dizin yığınından girdileri siler. Hiç argüman verilmemişse\n" +" yığının en üstündeki dizini yığından kaldırır ve yığını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 +" \n" +" Seçenekler:\n" +" -n\tdizinleri yığından silerken normal dizin değişikliğini\n" +" \t\tengeller, böylece yalnızca yığın değiştirilmiş olur. \n" +" \n" +" Argümanlar:\n" +" +N\t\t`dirs' tarafından gösterilen listenin solundan saymaya\n" +" \t\tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t\t`popd +0' ilk dizini `popd +1' ikincisini siler. \n" +" \n" +" -N\t\t`dirs' tarafından gösterilen listenin sağından saymaya\n" +" \t\tsıfırla başlandığında N'inci girdiyi siler. Örneğin,\n" +" \t\t`popd -0' son dizini `popd -1' sonuncudan öncekini siler. \n" +" \n" +" Dizin yığınını `dirs' komutuyla görebilirsiniz.\n" +" Çıkış Durumu:\n" +" Geçersiz bir argüman belirtilmediği veya dizin değişikliği başarısız\n" +" olmadıkça başarılı döner." + +#: builtins.c:1885 msgid "" "Display directory stack.\n" " \n" @@ -4642,48 +5275,55 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -"\rdirs [-clpv] [+N] [-N]\n" +"Dizin yığınını görüntüle.\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." +" \n" +" Seçenekler:\n" +" -c\ttüm girdileri silerek dizin yığınını boşaltır.\n" +" -l\t`dirs'in dizinleri ev dizininize göreli kısayollar\n" +" \t\tolarak göstermemesine yol açar.\n" +" -p\tyığıntaki konumu göstermemesi dışında aynı çıktıyı verir.\n" +" -v\t`dirs'in dizin yığınını dizin adının önüne yığın konumunu\n" +" \t\tekleyerek her satırda bir girdi göstermesini sağlar.\n" +" \n" +" Argümanlar:\n" +" +N\tdirs seçeneksiz çağrıldığında gösterdiği listenin solundan\n" +" \t\tsıfırla başlayarak sayılan N'inci girdiyi gösterir.\n" +" \n" +" \n" +" -N\tdirs seçeneksiz çağrıldığında gösterdiği listenin sağından\n" +" \t\tsıfırla başlayarak sayılan N'inci girdiyi gösterir.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz seçenek belirtilmediği veya bir hata oluşmadığı sürece başarılı döner." -#: builtins.c:1847 +#: builtins.c:1916 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -4697,8 +5337,7 @@ msgid "" " given or OPTNAME is disabled." msgstr "" -#: builtins.c:1868 -#, fuzzy +#: builtins.c:1937 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -4706,101 +5345,117 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\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 +"BİÇİM'in denetimi altında ARGÜMAN'ları biçimleyerek yazdırır\n" +" \n" +" Seçenekler:\n" +" -v değişken\tseçeneği çıktının standart çıktıya\n" +" \t\t\tbasılması yerine DEĞİŞKEN'e atanmasını sağlar.\n" +" \n" +" BİÇİM, üç tür nesne içeren bir dizidir: Salt karakterler basitçe\n" +" standart çıktıya kopyalanır, öncelenmiş karakterler dönüştürülüp\n" +" standart çıktıya kopyalanır ve biçim belirtimleri; belirtimlerin\n" +" her biri sırayla karşı düşen argümanların basılmasını sağlar.\n" +" \n" +" Standart printf(1) biçimlerine ek olarak, printf şunları da yorumlar:\n" +" \n" +" %b\ttersbölü öncelemeli karakterlerin karşı düşen argümanda yorumlar\n" +" %q\tagrgümanın kabuk girdisi olarak kullanılabilecek biçimde biçimler\n" +" \t\tiçin alıntılar.\n" +" %(fmt)T\tstrftime(3) için bir biçim dizisi olarak FMT tarafından\n" +" \t\tkullanılmak üzere tarih zaman dizisi çıktısısı verir\n" +" \n" +" Biçim argümanların tümünün kullanılabilmesi için gerektiğinde yeniden\n" +" kullanılır. Biçimin gerektirdiğinden daha az argüman varsa ek biçim\n" +" tanımlamaları uygun olduğu şekilde sıfır değeri veya BOŞ (null) dizi\n" +" değeri olarak davranırlar.\n" +" \n" +" Çıkış Durumu:\n" +" Geçersiz bir seçenek belirtilmediği veya yazılmadığı takdirde veya bir\n" +" atama hatası oluşmadığı sürece başarılı döner." + +#: builtins.c:1971 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" -#: builtins.c:1923 -#, fuzzy +#: builtins.c:2001 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" +" 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" +"Seçeneklere bağlı olarak olası tamamlamaları gösterir.\n" +" \n" +" Olası 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." +" takdirde eşleşmelerden yalnızca SÖZCÜK ile eşleşenler üretilir.\n" +" \n" +" Çıktı Durumu:\n" +" Geçersiz bir seçenek girilmediği veya bir hata oluşmadığı takdirde başarılı döner." -#: builtins.c:1938 +#: builtins.c:2016 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -4817,694 +5472,47 @@ msgid "" " have a completion specification defined." msgstr "" -#: builtins.c:1968 +#: builtins.c:2047 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" -#: builtins.c:2001 +#: builtins.c:2083 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." +"Bir dosyadaki satırları bir dizi değişkenine oku.\n" +" \n" +" `mapfile' ile eşanlamlıdır." diff --git a/po/uk.gmo b/po/uk.gmo new file mode 100644 index 0000000..eda38af Binary files /dev/null and b/po/uk.gmo differ diff --git a/po/uk.po b/po/uk.po new file mode 100644 index 0000000..0c3568d --- /dev/null +++ b/po/uk.po @@ -0,0 +1,5695 @@ +# Bash Ukrainian messages +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# +# Myhailo Danylenko , 2009. +# Maxim V. Dziumanenko , 2010. +# Yuri Chornoivan , 2011, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2022. +msgid "" +msgstr "" +"Project-Id-Version: bash 5.2-rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-17 19:34+0300\n" +"Last-Translator: Yuri Chornoivan \n" +"Language-Team: Ukrainian \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\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" +"X-Generator: Lokalize 20.12.0\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "неправильний індекс масиву" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: вилучаємо атрибут nameref" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: неможливо перетворити індексований масив на асоціативний" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: означення нечислових елементів неможливе" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: при означенні асоціативних масивів слід вказувати ключ" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: не вдалося створити: %s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: не вдалося знайти відповідне призначення для команди" + +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: перший непробільний символ не є «\"»" + +# c-format +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "нема заключної «%c» у %s" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: пропущено двокрапку-роздільник" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "«%s»: не вдалося зняти призначення у мапі ключів команди" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "розкриття дужок: не вдалося отримати пам’ять для %s" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "розкриття дужок: не вдалося отримати об’єм пам’яті для %u елементів" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "розкриття дужок: не вдалося отримати об’єм пам’яті для «%s»" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "«%s»: некоректна назва замінника" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "редагування рядку не ввімкнено" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "«%s»: неправильна назва набору призначень клавіш" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: не вдалося прочитати: %s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "«%s»: невідома назва функції" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s не призначено жодної клавіші.\n" + +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s можна запустити за допомогою " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "«%s»: не вдалося зняти призначення" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "кількість циклів" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "має сенс лише усередині циклів `for', `while' та `until'" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"Повертає контекст виконання поточної підпрограми.\n" +" \n" +" Якщо ВИРАЗ не вказано, виводить \"$line $filename\". Інакше виводить\n" +" \"$line $subroutine $filename\"; цю додаткову інформацію можна\n" +" використовувати для трасування стеку.\n" +" \n" +" Значення ВИРАЗУ визначає на скільки рівнів викликів піднятися від\n" +" поточного; поточний рівень є нульовим." + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "змінну HOME не встановлено" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "забагато аргументів" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "порожній каталог" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "змінну OLDPWD не встановлено" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "рядок %d: " + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "попередження: " + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: використовуйте: " + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: параметр потребує аргументу" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: потрібен числовий аргумент" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: не знайдено" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: неправильний параметр" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: некоректна назва параметра" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "«%s»: неправильний ідентифікатор" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "неправильне вісімкове число" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "неправильне шістнадцяткове число" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "неправильне число" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: сигнал вказано з помилками" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "«%s»: не є ідентифікатором процесу чи завдання" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: змінна призначена лише для читання" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: не вдалося встановити значення" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s виходить за встановлені межі" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "аргумент" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s виходить за встановлені межі" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: нема такого завдання" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: керування завданнями не ввімкнене" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "керування завданнями не ввімкнене" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: заборонено обмеженнями" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "заборонено обмеженнями" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: не є вбудованою командою оболонки" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "помилка запису: %s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "помилка встановлення параметрів термінала: %s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "помилка отримання параметрів термінала: %s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: помилка отримання поточного каталогу: %s: %s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: завдання вказано неоднозначно" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "у цій версії не можна скористатися довідкою" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: не вдалося знищити: %s лише для читання" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: не вдалося знищити" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: неправильна назва дії" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, 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:846 +msgid "not currently executing completion function" +msgstr "наразі функція завершення рядку не виконується" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "може використовуватися лише усередині функції" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "`-f' не використовується для створення функцій" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: незмінна функція" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: еталонна змінна не може бути масивом" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: не можна використовувати циклічне посилання у змінній посилання" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: циклічне посилання за назвою" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "«%s»: некоректна назва змінної для посилання за назвою" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: неможливо знищити масив таким чином" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: неможливо перетворити асоціативний масив на індексований" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: встановлення значень для складеного масиву у лапках вважається застарілим" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "динамічне завантаження недоступне" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "не вдалося відкрити колективний об’єкт %s: %s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "не вдалося знайти %s у колективному об’єкті %s: %s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: динамічне вбудовування вже завантажено" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "функцією завантаження для %s повернуто повідомлення щодо помилки (%d): не завантажено" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: завантажений не динамічно" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: не вдалося вилучити: %s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: це каталог" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: не є звичайним файлом" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: файл завеликий" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: не вдалося виконати бінарний файл" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: не вдалося виконати: %s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "вихід\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "це не оболонка сеансу: використовуйте `exit'" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "Залишилися призупинені завдання.\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "Фонові завдання все ще виконуються.\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "команду не знайдено" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "параметри журналу" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: не вдалося відкрити тимчасовий файл: %s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "поточне" + +#: builtins/fg_bg.def:161 +#, 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:91 +msgid "hashing disabled" +msgstr "кешування вимкнене" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: в кеші нічого немає\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "влучень\tкоманда\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "Команди оболонки, що відповідають слову `" +msgstr[1] "Команди оболонки, що відповідають словам `" +msgstr[2] "Команди оболонки, що відповідають словам `" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"'\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "«%s» не відповідає жодний розділ довідки. Спробуйте `help help' чи `man -k %s' або `info %s'." + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: не вдалося відкрити: %s" + +#: builtins/help.def:523 +#, 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 "" +"Ці команди оболонки визначені внутрішньо. Введіть `help', щоб побачити їх список.\n" +"Введіть `help name', щоб дізнатися більше про функцію `name'.\n" +"Використовуйте `info bash', щоб отримати більше інформації про оболонку в цілому.\n" +"`man -k' чи `info' можуть стати в пригоді для отримання довідки з команд, яких немає\n" +"у цьому списку.\n" +"\n" +"Зірочка (*) поряд з назвою команди означає, що команда заборонена.\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "-anrw можуть зустрічатися лише один раз" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "позиція у журналу команд" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: некоректна часова позначка" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: невдалий пошук по журналу команд" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: помилка inlib" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "не можна використовувати інші параметри разом з `-x'" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: аргументи мають бути ідентифікаторами завдань чи процесів" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "Невідома помилка" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "очікувався вираз" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: не є індексованим масивом" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: неправильно вказаний дескриптор файла" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: неправильний дескриптор файла: %s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: неправильна кількість рядків" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: неправильний початковий індекс" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: неправильний крок виклику функції" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "порожня назва змінної-масиву" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "змінні-масиви не підтримуються" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "«%s»: пропущено символ у шаблоні" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "«%c»: помилкове визначення формату часу" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "«%c»: помилковий символ у шаблоні" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "попередження: %s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "проблема з обробкою форматування: %s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "пропущено шістнадцяткову цифру у \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "пропущено цифру Unicode у \\%c" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "немає іншого каталогу" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: некоректний аргумент" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<немає поточного каталогу>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "стек каталогів порожній" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "рівень стеку каталогів" + +#: builtins/pushd.def:701 +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" +" Параметри:\n" +" -c\tочистити список каталогів, вилучивши усі його елементи\n" +" -l\tне використовувати ~ для каталогів, що перебувають усередині\n" +" \tвашого домашнього каталогу\n" +" -p\tвиводити каталоги по одному на рядок\n" +" -v\tвиводити каталоги по одному на рядок з зазначенням позиції у\n" +" \tсписку\n" +" \n" +" Аргументи:\n" +" +N\tПоказує N-ний зліва каталог у списку, що виводиться командою\n" +" \tdirs без аргументів, відлік починається з нуля.\n" +" \n" +" -N\tПоказує N-ний з кінця каталог у списку, що виводиться командою\n" +"\tdirs без аргументів, відлік починається з нуля." + +#: builtins/pushd.def:723 +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\tНе робити звичайного переходу у новий каталог при додаванні\n" +" \tкаталогів до стеку, виконувати операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \tзліва (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \tопиниться на вершині стеку.\n" +" \n" +" -N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \tз кінця (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \tопиниться на вершині стеку.\n" +" \n" +" dir\tДодає DIR на вершину стеку, й робить його поточним робочим\n" +" \tкаталогом.\n" +" \n" +" Вбудована команда `dirs' показує стек каталогів." + +#: builtins/pushd.def:748 +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\tНе робити звичайного переходу до нової каталоги при вилученні\n" +" \tкаталогів зі стеку, проводити операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tВилучає N-ний зліва каталог у списку, що показується командою `dirs'\n" +" \t(відлік починається з нуля). Наприклад: `popd +0' вилучає перший каталог,\n" +" \t`popd +1' — другий.\n" +" \n" +" -N\tВилучає N-ний з кінця каталог у списку, що показується командою\n" +" \t`dirs' (відлік починається з нуля). Наприклад: `popd -0' вилучає\n" +" \tостанній каталог, `popd -1' — передостанній.\n" +" \n" +" Вбудована команда `dirs' показує стек каталогів." + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: некоректне визначення часу очікування" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "помилка читання: %d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "`return' працює лише у функції чи скрипті, запущеному за допомогою `source'" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "не можна одночасно знищити і функцію і змінну" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: не є масивом" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: не є функцією" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: не вдалося експортувати" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "кількість зсувів" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "не можна одночасно встановлювати й скасовувати параметри оболонки" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: неправильна назва параметра оболонки" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "потрібна назва файла" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: файл не знайдено" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "не вдалося призупинити" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "не можна призупинити оболонку сеансу" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s є псевдонімом до «%s»\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s — це ключове слово оболонки\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s є функцією\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s є спеціальною вбудованою командою оболонки\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s є вбудованою командою оболонки\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s — це %s\n" + +# I know the difference between hash and cache, but here, +# I think, this is more suitable... +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s знаходиться в кеші (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: помилковий аргумент обмеження" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "«%c»: неправильна команда" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: не вдалося отримати значення обмеження: %s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "значення обмеження" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: не вдалося змінити обмеження: %s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "вісімкове число" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "«%c»: помилковий оператор у символьному режимі" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "«%c»: помилковий символ у символьному режимі" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " рядок " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "остання команда: %s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "Припинення..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "ІНФОРМАЦІЯ: " + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "Діагностичне попередження: " + +#: error.c:488 +msgid "unknown command error" +msgstr "невідома помилка команди" + +#: error.c:489 +msgid "bad command type" +msgstr "неправильний тип команди" + +#: error.c:490 +msgid "bad connector" +msgstr "неправильний з’єднувальний оператор" + +#: error.c:491 +msgid "bad jump" +msgstr "неправильний перехід" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: неозначена змінна" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aчас очікування вводу вичерпано: автоматичний вихід\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "не вдалося переспрямувати /dev/null на стандартний ввід: %s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "TIMEFORMAT: «%c»: помилковий символ шаблону" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: coproc [%d:%s] все ще існує" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "помилка каналу" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: перевищено максимальний рівень вкладеності eval (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: перевищено максимальний рівень вкладеності джерела (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: перевищено максимальний рівень вкладеності функцій (%d)" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: обмеження: не можна вказувати `/' у назві команди" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: команду не знайдено" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: не вдалося виконати: не знайдено потрібного файла" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: неправильний інтерпретатор" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: не вдалося виконати бінарний файл: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "%s є спеціальною вбудованою командою оболонки" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "не вдалося створити копію файлового дескриптору %d у %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "рівень вкладення виразів перевищено" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "нестача стеку рекурсії" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "синтаксична помилка у виразі" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "спроба призначення не-змінної" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "синтаксична помилка при спробі надати змінній значення" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "ділення на 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "вада: неправильна лексема у виразі" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "очікувалася `:' умовного виразу" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "експонента менша за 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "пре-інкремент чи пре-декремент потребують ідентифікатор" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "відсутня `)'" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "синтаксична помилка: очікувався операнд" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "синтаксична помилка: помилковий арифметичний оператор" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s (позначка помилки \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "некоректна арифметична основа" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "некоректна ціла стала" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "завелике значення основи" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: помилка у виразі\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: не вдалося отримати доступ до каталогів вищого рівня" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "не вдалося перевстановити режим без затримки файлового дескриптору %d" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "не вдалося отримати новий файловий дескриптор для вводу bash з файлового дескриптору %d" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: для нового файлового дескриптору %d вже існує буфер" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: pgrp pipe" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "ідентифікатор відгалуженого процесу %d знайдено у поточному завданні %d" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "вилучення зупиненого завдання %d, що має групу процесів %ld" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: ідентифікатор процесу %5ld (%s) вказує на його працездатність" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: ідентифікатор процесу не існує" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "Сигнал %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "Завершено" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "Зупинено" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "Зупинено(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "Працює" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "Зроблено(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "Вихід %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "Невідомий стан" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(збережено знімок оперативної пам’яті)" + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (РД: %s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "зміна групи дочірнього процесу (%ld на %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: процес %ld не є відгалуженим від цієї оболонки" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: Нема запису для процесу %ld" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: завдання %d зупинене" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: немає поточних завдань" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: завдання завершилося" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: завдання %d вже працює в фоні" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: увімкнути WNOHANG, щоб уникнути нескінченного блокування" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: рядок %d: " + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr " (збережено знімок оперативної пам’яті)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(тепер РД: %s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: помилка getpgrp" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: немає керування завданнями у тлі" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: алгоритм реалізації рядків" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "не вдалося встановити групу процесу для термінала (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "ця оболонка не може керувати завданнями" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: умова не виконується: %s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: потрібна умова не виконується\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "невідомий" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: зайнятий блок у списку вільних" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: аргумент є вже звільненим блоком" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: блок ще не виділено" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: виявлено перехід за нижню границю блоку; mh_nbytes не вкладається у рамки" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: виявлено перехід за нижню границю блоку; magic8 пошкоджено" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: розмір у записах на початку та в кінці блоку відрізняється" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: блок ще не виділено" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: виявлено перехід за нижню границю блоку; mh_nbytes не вкладається у рамки" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: виявлено перехід за нижню границю блоку; magic8 пошкоджено" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: розмір у записах на початку та в кінці блоку відрізняється" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: таблицю виділення заповнено FIND_ALLOC?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p вже позначений як виділений у таблиці?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p вже позначений як вільний у таблиці?\n" + +#: lib/sh/fmtulong.c:102 +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:347 +msgid "network operations not supported" +msgstr "мережеві операції не підтримуються" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: не вдалося змінити локаль (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: не вдалося змінити локаль (%s): %s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: не вдалося змінити локаль (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: не вдалося змінити локаль (%s): %s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "Присутня пошта у $_" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "Нова пошта у $_" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "Пошту у %s прочитано\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "синтаксична помилка: потрібен арифметичний вираз" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "синтаксична помилка: неочікувана `;'" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "синтаксична помилка: `((%s))'" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: неправильний тип інструкції %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "here-document з рядка %d закінчено кінцем файла (очікувалося «%s»)" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: інструкція переспрямування `%d' поза межами" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) перевищує обмеження SIZE_MAX (%lu): рядок обрізано" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "перевищено максимальну можливу кількість here-document" + +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "файл скінчився раніше, ніж було знайдено відповідний «%c»" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "файл скінчився раніше, ніж було знайдено `]]'" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "синтаксична помилка в умовному виразі: неочікувана лексема «%s»" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "синтаксична помилка в умовному виразі" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "неочікувана лексема «%s», очікувалася `)'" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "очікувалася `)'" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "неочікуваний аргумент унарного умовного оператора «%s»" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "неочікуваний аргумент унарного умовного оператора" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "неочікувана лексема «%s», очікувався бінарний умовний оператор" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "очікувався бінарний умовний оператор" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "неочікуваний аргумент бінарного умовного оператора «%s»" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "неочікуваний аргумент бінарного умовного оператора" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "неочікувана лексема «%c» в умовній команді" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "неочікувана лексема «%s» в умовній команді" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "неочікувана лексема %d в умовній команді" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "синтаксична помилка коло неочікуваної лексеми «%s»" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "синтаксична помилка коло «%s»" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "синтаксична помилка: раптово скінчився файл" + +#: parse.y:6151 +msgid "syntax error" +msgstr "синтаксична помилка" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "Використовуйте \"%s\", щоб вийти з оболонки.\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "файл скінчився, перш ніж було знайдено відповідну `)'" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "завершення: функцію «%s» не знайдено" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: можливий цикл повторних спроб" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: NULL COMPSPEC" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: неправильний з’єднувальний оператор `%d'" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: некоректний дескриптор файла" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: нульовий вказівник на файл" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "дескриптор файла xtrace (%d) не дорівнює номеру файла у вказівнику xtrace (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: «%c»: неправильний символ шаблону" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "дескриптор файла поза можливими межами" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: неоднозначне переспрямування" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: заборонено перезаписувати наявні файли" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: обмеження: переспрямування виводу заборонене" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "не вдалося створити тимчасовий файл для here-document: %s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: не вдалося надати змінній значення дескриптора файла" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "/dev/(tcp|udp)/host/port не підтримується" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "помилка переспрямування: не вдалося створити копію дескриптора файла" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "не вдалося знайти /tmp, будь ласка створіть його!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp має бути чинною назвою каталогу" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "режим форматованого виведення даних у інтерактивних оболонках буде проігноровано" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: помилковий параметр" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "не вдалося встановити uid %d: ефективним є uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "не вдалося встановити gid %d: ефективним є gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "не вдалося запустити засіб діагностики: режим діагностування вимкнено" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: це каталог" + +#: shell.c:1907 +msgid "I have no name!" +msgstr "У мене нема назви!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash, версія %s-(%s)\n" + +#: shell.c:2062 +#, 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:2064 +msgid "GNU long options:\n" +msgstr "Довгі параметри GNU:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Параметри оболонки:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD чи -c команда чи -O параметр_shopt\t\t(тільки на початку)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s чи -o параметр\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "Введіть `%s -c \"help set\"', щоб отримати більше інформації про параметри оболонки.\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "Введіть `%s -c help', щоб отримати більше інформації про вбудовані команди оболонки.\n" + +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "Щоб повідомити про помилку в програмі, використовуйте команду `bashbug'.\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Домашня сторінка bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "Загальна довідкова інформація щодо використання програмного забезпечення GNU: \n" + +#: sig.c:765 +#, 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 "Точка зупину trace/trap" + +#: siglist.c:75 +msgid "ABORT instruction" +msgstr "Інструкція ABORT" + +#: 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 +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 "Обмеження часу 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 "Режим монітору HFT надано" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "Режим монітору HFT відкликано" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "Завершено звукову послідовність HFT" + +#: siglist.c:215 +msgid "Information request" +msgstr "Інформаційний запит" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "Невідомий сигнал №%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "неправильна заміна: немає заключної «%s» у %s" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: неможливо означити елемент масиву списком" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "не вдалося створити канал для підставляння процесу" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "не вдалося створити дочірній процес для підставляння процесу" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "не вдалося відкрити іменований канал %s для читання" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "не вдалося відкрити іменований канал %s для запису" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "не вдалося здублювати іменований канал %s як fd %d" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "заміна команди: проігноровано порожній байт у вхідних даних" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "не вдалося створити канал для підставляння команди" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "не вдалося створити дочірній процес для підставляння команди" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: не вдалося створити копію каналу із файловим дескриптором 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: некоректна назва змінної для посилання за назвою" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: некоректне непряме розгортання" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: некоректна назва змінної" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: параметр не встановлено" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: параметр нульової довжини чи не вказаний" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: підрядок коротший за 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: неправильна заміна" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: не можна призначити таким чином" + +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "у наступних версіях оболонки буде виконуватися обчислення для заміни арифметичних виразів" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "неправильна заміна: немає заключної \"`\" у %s" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "нема відповідника: %s" + +#: test.c:147 +msgid "argument expected" +msgstr "очікувався аргумент" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: очікувався числовий вираз" + +#: test.c:265 +msgid "`)' expected" +msgstr "очікувалася `)'" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "очікувалася `)', отримано %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: очікувався бінарний оператор" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: очікувався унарний оператор" + +#: test.c:896 +msgid "missing `]'" +msgstr "відсутня `]'" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "синтаксична помилка: неочікуване `%s'" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "неправильний номер сигналу" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "обробник пасток: досягнуто максимального рівня для обробника пасток (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: неправильне значення у trap_list[%d]: %p" + +#: trap.c:416 +#, c-format +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: обробник сигналу є SIG_DFL, %d (%s) повторно надсилається собі" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: неправильний сигнал %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "помилка імпортування означення функції «%s»" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "рівень оболонки (%d) занадто високий, перевстановлено у 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: немає контексту функції у поточній області" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: змінною не може бути значення, яке приймають інші змінні" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: неможливо успадкувати значення несумісного типу" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: присвоєння цілого числа посиланню з назвою" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: немає контексту функції у поточній області" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s має нульове значення рядка експортування" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "Помилковий символ %d у рядку експорту для %s" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "немає `=' у рядку експорту для %s" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: перший елемент shell_variables не є контекстом функції" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: немає контексту global_variables" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: перший елемент shell_variables не є тимчасовим оточенням виконання" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: не вдалося відкрити ФАЙЛ" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: некоректне значення дескриптора файла трасування" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: значення сумісності не належить припустимому діапазону значень" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "© Free Software Foundation, Inc., 2022" + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "Ліцензія GPLv3+: GNU GPL версія 3 чи новіша \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash, версія %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Це вільне програмне забезпечення; ви можете його змінювати та розповсюджувати." + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Не надається НІЯКИХ ГАРАНТІЙ у межах, передбачених законом." + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: не вдалося виділити %lu байтів (виділено %lu байтів)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: не вдалося виділити %lu байтів" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: не вдалося виділити %lu байтів (виділено %lu байтів)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: не вдалося виділити %lu байтів" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-3] [назва[=значення] ...]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] назва [назва ...]" + +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpsvPSVX] [-m keymap] [-f файл] [-q назва] [-u назва] [-r послідовність-клавіш] [-x послідовність-клавіш:команда-оболонки] [послідовність-клавіш:функція-readline чи команда-readline]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [вбудована-команда [аргумент ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [вираз]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [каталог]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] команда [аргумент ...]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [назва[=значення] ...] або declare -p [-aAfFilnrtux] [назва ...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] назва[=значення] ... або typeset -p [-aAfFilnrtux] [назва ...]" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [параметр] назва[=значення] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [аргумент ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [аргумент ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f файл] [назва ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [аргумент ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts рядок-параметрів назва [аргумент ...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a назва] [команда [аргумент ...]] [переспрямування ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e редактор] [-lnr] [перший] [останній] чи fc -s [шаблон=заміна] [команда]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [завдання]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [завдання ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p шлях] [-dt] [назва ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [шаблон ...]" + +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d позиція] [n] чи history -anrw [файл] чи history -ps аргумент [аргумент ...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [завдання ...] чи jobs -x команда [аргументи]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [специфікація завдання ... | pid ...]" + +#: builtins.c:134 +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s сигнал | -n номер-сигналу | -сигнал] pid | завдання ... чи kill -l [сигнал]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let аргумент [аргумент ...]" + +#: builtins.c:138 +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a масив] [-d роздільник] [-i текст] [-n кількість-символів] [-N кількість-символів][-p запрошення] [-t ліміт-часу] [-u дескриптор-файла] [назва ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o назва-параметра] [--] [-] [аргумент ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [назва ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [назва[=значення] ...] чи export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonli [-af [назва[=значення] ...] чи readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source файл [аргументи]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". файл [аргументи]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [вираз]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ аргумент... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[аргумент] сигнал ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] назва [назва ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [обмеження]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [режим-доступу]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p змінна] [ідентифікатор]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [ідентифікатор-процесу ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for НАЗВА [in СЛОВА ... ] ; do КОМАНДИ; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( вираз1; вираз2; вираз3 )); do КОМАНДИ; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select НАЗВА [in СЛОВА ...;] do КОМАНДИ; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] канал" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case СЛОВО in [ШАБЛОН [| ШАБЛОН]...) КОМАНДИ ;;]... esac" + +#: builtins.c:194 +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if КОМАНДИ; then КОМАНДИ; [ elif КОМАНДИ; then КОМАНДИ; ]... [ else КОМАНДИ; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while КОМАНДИ; do КОМАНДИ-2; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until КОМАНДИ; do КОМАНДИ-2; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [НАЗВА] команда [переспрямування]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function НАЗВА { КОМАНДИ ; } чи НАЗВА () { КОМАНДИ ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ КОМАНДИ ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "завдання [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( вираз ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ вираз ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - назви та значення деяких змінних оболонки" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | каталог]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [назва-параметра ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v змінна] шаблон-форматування [аргументи]" + +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o параметр] [-A дія] [-G шаблон-оболонки] [-W список-слів] [-F функція] [-C команда] [-X шаблон-фільтрування] [-P префікс] [-S суфікс] [назва ...]" + +#: builtins.c:235 +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 параметр] [-A дія] [-G шаблон-оболонки] [-W список-слів] [-F функція] [-C команда] [-X шаблон-фільтрування] [-P префікс] [-S суфікс] [слово]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o параметр] [-DEI] [назва ...]" + +#: builtins.c:242 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d роздільник] [-n кількість] [-O початок-відліку] [-s кількість] [-t] [-u дескриптор] [-C обробник] [-c крок] [масив]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d роздільник] [-n кількість] [-O початок-відліку] [-s кількість] [-t] [-u дескриптор] [-C обробник] [-c крок] [масив]" + +#: builtins.c:256 +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" +" \n" +" Викликана без аргументів, команда `alias' друкує список псевдонімів у\n" +" придатній до подальшого виконання формі `alias НАЗВА=ЗНАЧЕННЯ'.\n" +" \n" +" Інакше вона додає псевдоніми для кожної вказаної НАЗВИ, для якої надане\n" +" ЗНАЧЕННЯ. Пробіли в кінці ЗНАЧЕННЯ дозволяють увімкнути подальше розкриття\n" +" псевдонімів усередині цього псевдоніму під час його підставляння.\n" +" \n" +" Параметри:\n" +" -p\tвивести усі визначені псевдоніми у придатній до виконання формі.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо було вказано НАЗВУ, для якої немає\n" +" псевдоніма." + +#: builtins.c:278 +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" +" \n" +" Параметри:\n" +" -a\tВилучити визначення усіх псевдонімів.\n" +" \n" +" Код завершення:\n" +" Завершується невдало, якщо НАЗВА не є визначеним псевдонімом." + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"Встановлює призначення клавіш та змінні readline.\n" +" \n" +" Призначає функції чи макровизначенню readline послідовність клавіш чи\n" +" встановлює змінну readline. Аргумент, що не відносяться до параметрів\n" +" має синтаксис такий же як у ~/.inputrc, але мають бути вказані як один\n" +" аргумент, наприклад, bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" \n" +" Параметри:\n" +" -m набір Використовувати НАБІР призначень клавіш на час\n" +" виконання цієї команди. Назви наявних наборів: emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,\n" +" vi-command та vi-insert.\n" +" -l Вивести назви функцій.\n" +" -P Вивести назви функцій та які послідовності клавіш їм\n" +" призначено.\n" +" -p Вивести функції та призначення у формі, придатній для\n" +" подальшого використання як ввід.\n" +" -S Вивести послідовності клавіш, які запускають\n" +" макровизначення.\n" +" -s Вивести послідовності клавіш, які запускають\n" +" макровизначення у формі, придатній для подальшого\n" +" використання як ввід.\n" +" -V Вивести назви та значення змінних.\n" +" -v Вивести назви та значення змінних у формі, що може\n" +" бути надалі використана як ввід.\n" +" -q функція Показати, які послідовності клавіш запускають цю\n" +" функцію.\n" +" -u функція Скасувати усі призначені цій функції послідовності.\n" +" -r послідовність Скасувати призначення ПОСЛІДОВНОСТІ.\n" +" -f файл Прочитати призначення клавіш з ФАЙЛУ.\n" +" -x послідовність:команда-оболонки\tПри введенні ПОСЛІДОВНОСТІ буде\n" +" \t\t\t\tзапускатися КОМАНДА-ОБОЛОНКИ.\n" +" -X Показати список послідовностей клавіш, пов'язаних з -x та відповідні\n" +" команди у форматі, яким можна скористатися як вхідними даними\n" +" для іншої програми.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри та не\n" +" виникло помилки під час виконання." + +#: builtins.c:330 +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" +" Перериває цикли FOR, WHILE чи UNTIL. Якщо вказано N, перериває\n" +" N вкладених циклів.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо N менше за 1." + +#: builtins.c:342 +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" +" Переходить до наступної ітерації циклу for, while чи until.\n" +" Якщо вказане N, перехід відбувається у N-ному зовнішньому циклі.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо N менше 1." + +#: builtins.c:354 +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 "" +"Виконує вбудовану команду оболонки.\n" +" \n" +" Запускає ВБУДОВАНУ-КОМАНДУ з вказаними АРГУМЕНТАМИ, пошук команди не\n" +" робиться. Це може стати в нагоді, якщо ви хочете замінити вбудовану\n" +" команду функцією оболонки, але вам треба запускати вбудовану команду\n" +" зсередини цієї функції.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення ВБУДОВАНОЇ-КОМАНДИ або помилку, якщо\n" +" ВБУДОВАНА-КОМАНДА не є вбудованою командою оболонки." + +#: builtins.c:369 +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" +" поточного; поточний рівень є нульовим.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо оболонка зараз не виконує функцію\n" +" або якщо ВИРАЗ є неправильним." + +#: builtins.c:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"Змінює робочий каталог оболонки.\n" +" \n" +" Змінює поточний каталог на КАТАЛОГ. Якщо КАТАЛОГ не вказано,\n" +" значення буде взято зі значення змінної середовища HOME.\n" +" \n" +" Змінна CDPATH визначає набір каталогів, в яких слід шукати КАТАЛОГ.\n" +" Каталоги у цій змінній розділяються двокрапкою (:).\n" +" Порожня назва каталогу означає поточний каталог. Якщо КАТАЛОГ\n" +" починається з похилої риски (/), CDPATH не використовується.\n" +" \n" +" Якщо каталог не буде знайдено, у разі визначеного параметра оболонки\n" +" `cdable_vars', КАТАЛОГ вважатиметься назвою змінної. Якщо змінна з\n" +" такою назвою існуватиме, її значення буде використане замість КАТАЛОГУ.\n" +" \n" +" Параметри:\n" +" -L\tПримусово переходити за символічними посиланнями: визначати\n" +" \tджерело символічних посилань як КАТАЛОГ після обробки записів `..'.\n" +" -P\tВикористовувати фізичну структуру каталогів, не переходити за\n" +" \tсимволічними посиланнями: визначати джерело символічних посилань як\n" +" \tКАТАЛОГ до обробки записів `..'.\n" +" -e\tякщо вказано параметр -P і програмі не вдасться визначити поточний\n" +" \tробочий каталог, вийти з ненульовим значенням стану.\n" +" -@ у системах, де передбачено таку підтримку, показати файл з розширеними\n" +" атрибутами як каталог, що містить атрибути файла\n" +" \n" +" Зазвичай команда переходитиме за символічними посиланнями, неначе було\n" +" вказано параметр `-L'.\n" +" `..' обробляється шляхом вилучення компонентів шляху до символу\n" +" похилої риски або за початковим компонентом каталогу КАТАЛОГ.\n" +" \n" +" Код завершення:\n" +" Повертає 0, якщо каталог було змінено і якщо було успішно встановлено значення\n" +" $PWD у разі використання -P. За інших результатів повертає ненульове значення." + +#: builtins.c:425 +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" +" \t\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 "" +"Виводить назву поточного робочого каталогу.\n" +" \n" +" Параметри:\n" +" -L\tВивести значення $PWD, якщо вона вказує поточний робочий каталог.\n" +" -P\tВивести фізичне розташування каталогу, без символічних посилань.\n" +" \n" +" Зазвичай `pwd' працює як ніби вказано `-L'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи\n" +" не вдалося отримати доступ до поточного робочого каталогу." + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Нічого не робить.\n" +" \n" +" Не має жодного ефекту; ця команда нічого не робить.\n" +" \n" +" Код завершення:\n" +" Команда завжди успішна." + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"Завершується успішно.\n" +" \n" +" Код завершення:\n" +" Команда завжди успішна." + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"Завершується помилково.\n" +" \n" +" Код завершення:\n" +" Команда завжди завершується невдало." + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"Запускає звичайну команду чи показує інформацію про команди.\n" +" \n" +" Запускає КОМАНДУ з АРГУМЕНТАМИ, не роблячи пошуку серед функцій оболонки,\n" +" чи показує інформацію про вказані КОМАНДИ. Може використовуватися для\n" +" запуску команд з диску, коли існує функція з такою ж назвою.\n" +" \n" +" Параметри:\n" +" -p Використовувати стандартне значення PATH, яке забезпечує\n" +" знаходження усіх стандартних утиліт.\n" +" -v Вивести опис КОМАНД, подібний до виводу вбудованої команди `type'.\n" +" -V Вивести більш багатослівний опис кожної з КОМАНД.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення КОМАНДИ або помилку, якщо КОМАНДУ не буде\n" +" знайдено." + +#: builtins.c:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Встановлює значення та властивості змінних.\n" +" \n" +" Описує змінні та встановлює їх властивості. Якщо НАЗВИ не вказано,\n" +" показує властивості та значення усіх змінних.\n" +" \n" +" Параметри:\n" +" -f\tОбмежити поле дії лише назвами та визначеннями функцій.\n" +" -F\tОбмежити показ лише назвами функцій (плюс номер рядку та\n" +" \t\tфайл, звідки походить функція, якщо виконується діагностика).\n" +" -g\tстворити загальні змінні, якщо використано у функції оболонки,\n" +" \t\tякщо це не функція оболонки, буде проігноровано.\n" +" -I\tпри створення локальної змінної успадкувати атрибути і значення\n" +" \t\tзмінної із тією самою назвою у попередньому просторі назв\n" +" -p\tПоказати властивості та значення кожної з НАЗВ.\n" +" \n" +" Параметри, що встановлюють властивості:\n" +" -a\tЗробити НАЗВИ індексованими масивами (якщо підтримується).\n" +" -A\tЗробити НАЗВИ асоціативними масивами (якщо підтримується).\n" +" -i\tНадати НАЗВА властивість `ціле число'.\n" +" -n\tЗробити НАЗВУ посиланням на змінну, вказану як значення\n" +" -l\tПеретворити значення кожної НАЗВИ до нижнього регістру, якщо НАЗВИ визначено.\n" +" -r\tЗробити НАЗВИ незмінними (лише для читання).\n" +" -t\tНадати НАЗВАМ властивість `trace'.\n" +" -u\tПеретворити значення кожної НАЗВИ до верхнього регістру, якщо НАЗВИ визначено.\n" +" -x\tЕкспортувати НАЗВИ.\n" +" \n" +" Замінивши `+' на `-' можна вимкнути відповідну властивість.\n" +" \n" +" При означенні змінні з властивістю цілого числа виконується арифметичне\n" +" обчислення (див. команду `let') значення.\n" +" \n" +" При використанні всередині функції `declare' робить НАЗВИ локальними\n" +" змінними, як команда `local'. Параметр `-g' вимикає таку поведінку.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри і не виникло\n" +" помилки під час виконання." + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"Встановлює значення та властивості змінних.\n" +" \n" +" Синонім `declare'. Дивіться `help declare'." + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"Описує локальні змінні.\n" +" \n" +" Створює локальну змінну НАЗВА та призначає їй ЗНАЧЕННЯ. ПАРАМЕТР може бути\n" +" будь-яким параметром, що приймається командою `declare'.\n" +" \n" +" Локальні змінні можуть використовуватися лише усередині функції; їх видно\n" +" лише у функції, де їх визначено та її нащадках.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано помилкові параметри, стається\n" +" помилка під час надання змінній значення або якщо оболонка не виконує функцію." + +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"Друкує аргументи до стандартного виводу.\n" +" \n" +" Виводить АРГУМЕНТИ, відокремлені один від одного одинарним символом пробілу, із\n" +" завершальним символом розриву рядка до стандартного виводу.\n" +" \n" +" Параметри:\n" +" -n\tНе додавати символ нового рядку в кінці.\n" +" -e\tУвімкнути інтерпретацію нижченаведених послідовностей.\n" +" -E\tЯвно заборонити інтерпретацію послідовностей.\n" +" \n" +" `echo' інтерпретує наступні послідовності, що починаються зі зворотньої\n" +" похилої риски:\n" +" \\a\tсигнал (дзвінок)\n" +" \\b\tповернення курсору\n" +" \\c\tне виводити все, що далі\n" +" \\e\tсимвол escape\n" +" \\E\tсимвол escape\n" +" \\f\tперехід на рядок нижче\n" +" \\n\tпочаток нового рядку\n" +" \\r\tповернення до початку рядку\n" +" \\t\tгоризонтальна табуляція\n" +" \\v\tвертикальна табуляція\n" +" \\\\\tзворотня похила риска\n" +" \\0nnn\tсимвол з вісімковим ASCII-кодом NNN. NNN може мати від\n" +" \t\tнуля до трьох вісімкових цифр\n" +" \\xHH\tвосьмибітовий символ із шістнадцятковим кодом HH. HH\n" +" \t\tможе бути одною чи двома шістнадцятковими цифрами\n" +" \\uHHHH\tсимвол Unicode, чиє значення є шістнадцятковим числом HHHH.\n" +" \t\tHHHH може складатися з одної, двох, трьох або чотирьох шістнадцяткових цифр.\n" +" \\UHHHHHHHH символ Unicode, чиє значення є шістнадцятковим числом\n" +" \t\tHHHHHHHH. HHHHHHHH може містити від однією до восьми шістнадцяткових цифр.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо виникне помилка запису." + +#: builtins.c:597 +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 "" +"Друкує аргументи до стандартного виводу.\n" +" \n" +" Виводить АРГУМЕНТИ до стандартного виводу з переходом на новий рядок.\n" +" \n" +" Параметри:\n" +" -n\tНе додавати символ нового рядку в кінці.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо трапиться помилка запису." + +#: builtins.c:612 +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 "" +"Вмикає та вимикає вбудовані команди оболонки.\n" +" \n" +" Вмикає та вимикає вбудовані команди оболонки. Вимкнення команди дозволяє\n" +" вам запускати команду з диску, що має таку ж назву, як і вбудована команда\n" +" оболонки, без потреби вказувати повний шлях до команди.\n" +" \n" +" Параметри:\n" +" -a\tНадрукувати список вбудованих команд, вказуючи чи вони ввімкнені.\n" +" -n\tВимкнути кожну з НАЗВ або надрукувати список вимкнених команд.\n" +" -p\tНадрукувати список вбудованих команд у придатній для подальшого\n" +" \tвиконання формі.\n" +" -s\tДрукувати лише назви `спеціальних' команд Posix.\n" +" \n" +" Параметри, що контролюють динамічне завантаження:\n" +" -f\tЗавантажити вбудовану команду НАЗВА з колективного об’єктного ФАЙЛУ.\n" +" -d\tВилучити вбудовану команду, завантажену за допомогою -f.\n" +" \n" +" Без параметрів вмикає кожну з НАЗВ.\n" +" \n" +" Щоб використовувати `test', що знаходиться десь у $PATH замість\n" +" вбудованої у оболонку версії, введіть `enable -n test'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо НАЗВА не є вбудованою командою\n" +" оболонки або якщо трапиться помилка під час виконання." + +#: builtins.c:640 +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 "" +"Виконує аргументи як команду оболонки.\n" +" \n" +" Об’єднує АРГУМЕНТИ в один рядок та виконує результат як команди, введені\n" +" до оболонки.\n" +" \n" +" Код завершення:\n" +" Команда повертає результат виконання команди. Якщо отриманий рядок команди\n" +" є порожнім рядком, команда завершується успішно." + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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 "" +"Аналізує рядок параметрів.\n" +" \n" +" Getopts використовується підпрограмами оболонки для аналізу позиційних\n" +" аргументів як параметрів командного рядку.\n" +" \n" +" РЯДОК-ПАРАМЕТРІВ містить літери параметрів, які можуть бути вказані; якщо\n" +" за літерою іде двокрапка, цей параметр очікує аргументу, відокремленого\n" +" від нього пробілом.\n" +" \n" +" Після кожного запуску getopts кладе наступний параметр до змінної оболонки\n" +" $name, створюючи її, якщо треба. Номер наступного неопрацьованого\n" +" аргументу кладеться до змінної оболонки OPTIND. OPTIND встановлюється у 1\n" +" кожного разу, як запускається оболонка чи скрипт. Якщо параметр очікує\n" +" аргументу, getopts кладе аргумент до змінної оболонки OPTARG.\n" +" \n" +" Getopts може повідомляти про помилки двома способами. Якщо першим символом\n" +" РЯДКУ-ПАРАМЕТРІВ є двокрапка, getopts використовує `тихе' повідомлення про\n" +" помилки. В такому режимі повідомлення про помилки не виводяться. Якщо буде\n" +" знайдено неправильний параметр, getopts покладе його до OPTARG. Якщо не\n" +" буде вказано очікуваний аргумент, getopts покладе ':' до НАЗВА, а символ\n" +" параметра — до OPTARG. У `гучному' режимі, при з помилками у параметрі у NAME\n" +" кладеться '?', а OPTARG скидається. Якщо потрібний аргумент не вказано, у\n" +" NAME кладеться '?', OPTARG скидається і друкується діагностичне\n" +" повідомлення.\n" +" \n" +" Якщо змінна оболонки OPTERR встановлена у 0, getopts не друкуватиме\n" +" повідомлення про помилки навіть у `гучному режимі'. Стандартне значення\n" +" OPTERR — 1.\n" +" \n" +" Зазвичай getopts обробляє позиційні параметри, але якщо надано\n" +" аргументи як значення ARG, замість цього буде оброблено аргументи.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо знайдено параметр; помилково, якщо\n" +" параметри скінчилися або трапилася помилка." + +#: builtins.c:694 +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"Заміщує оболонку вказаною командою.\n" +" \n" +" Запускає КОМАНДУ, заміщаючи поточну оболонку вказаною програмою.\n" +" АРГУМЕНТИ передаються КОМАНДІ. Якщо КОМАНДУ не вказано, будь-які\n" +" переспрямування застосовуються до поточної оболонки.\n" +" \n" +" Параметри:\n" +" -a назва\tПередати НАЗВУ як нульовий аргумент КОМАНДИ.\n" +" -c\tЗапустити КОМАНДУ з порожнім оточенням.\n" +" -l\tПокласти риску до нульового аргументу КОМАНДИ.\n" +" \n" +" Якщо команду не вдасться запустити, неінтерактивна оболонка завершується,\n" +" якщо тільки не встановлено параметр оболонки `execfail'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо команду не буде знайдено або якщо\n" +" трапиться помилка переспрямування." + +#: builtins.c:715 +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. Якщо N не вказано, береться\n" +" статус останньої запущеної команди." + +#: builtins.c:724 +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 "" +"Виходить з оболонки сеансу.\n" +" \n" +" Виходить з оболонки сеансу зі статусом N. Повертає помилку, якщо команду\n" +" запущено не у оболонці сеансу." + +#: builtins.c:734 +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" +" \n" +" Fc використовується для показу чи редагування та подальшого повторного\n" +" запуску команд з журналу. ПЕРШИЙ та ОСТАННІЙ можуть вказувати діапазон\n" +" або ПЕРШИЙ може бути рядком, тоді він означатиме останню команду, що\n" +" починалася з цього рядка.\n" +" \n" +" Параметри:\n" +" -e РЕДАКТОР\tВказує редактор. Зазвичай це FCEDIT, EDITOR чи vi,\n" +" \t\tщо перше буде знайдене.\n" +" -l\tПоказати рядки журналу, замість редагування.\n" +" -n\tНе виводити номери рядків у списку.\n" +" -r\tПоказувати у зворотньому порядку (найновіші першими).\n" +" \n" +" У форматі `fc -s [шаблон=заміна ...] [команда]', КОМАНДА запускається\n" +" після заміни ШАБЛОН=ЗАМІНА.\n" +" \n" +" При використанні цієї команди може бути зручним псевдонім r='fc -s' — тоді\n" +" `r cc' запустить останню команду, що починається з `cc', а `r' повторно\n" +" виконає останню команду.\n" +" \n" +" Код завершення:\n" +" Команда завершується зі статусом запущених команд, або помилкою, якщо\n" +" трапиться помилка." + +#: builtins.c:764 +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" +" \n" +" Переводить ЗАВДАННЯ у пріоритетний режим виконання і робить його поточним\n" +" завданням. Якщо ЗАВДАННЯ не вказане, береться завдання, яке оболонка\n" +" вважає поточним.\n" +" \n" +" Код завершення:\n" +" Команда завершується зі статусом завершення завдання, що переведене\n" +" у пріоритетний режим, або помилкою, якщо трапиться помилка." + +#: builtins.c:779 +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" +" \n" +" Переводить кожне з ЗАВДАНЬ у фоновий режим виконання, як ніби їх запущено\n" +" із `&'. Якщо ЗАВДАННЯ не вказані, береться завдання, що оболонка вважає\n" +" поточним.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо контроль завдань не ввімкнено або якщо\n" +" трапиться помилка." + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"Запам’ятовує чи показує розміщення програм.\n" +" \n" +" Визначає та запам’ятовує повний шлях до кожної з вказаних програм. Якщо\n" +" НАЗВИ не вказані, показує інформацію про збережені команди.\n" +" \n" +" Параметри:\n" +" -d\tВилучити з кешу розміщення НАЗВ.\n" +" -l\tПоказувати у форматі, що можна потім виконати.\n" +" -p шлях\tвикористовувати ШЛЯХ як повний шлях до НАЗВИ.\n" +" -r\tСпорожнити кеш.\n" +" -t\tВивести збережені розташування НАЗВ, вказуючи перед розташуванням\n" +" \t\tвідповідну НАЗВУ, якщо вказано декілька НАЗВ.\n" +" Аргументи:\n" +" НАЗВА\tКожна з НАЗВ шукається у $PATH та додається до списку збережених\n" +" \t\tкоманд.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо НАЗВУ не вдалося знайти або якщо\n" +" вказано помилковий параметр." + +#: builtins.c:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is given." +msgstr "" +"Показує інформацію про вбудовані команди.\n" +" \n" +" Показує коротку довідку з вбудованих команд. Якщо вказано ШАБЛОН, надає\n" +" детальну довідку з усіх команд, що відповідають цьому ШАБЛОНУ. Якщо його\n" +" не вказано, друкує список пунктів довідки.\n" +" \n" +" Параметри:\n" +" -d\tВивести короткий опис кожного з пунктів.\n" +" -m\tПоказати довідку у форматі, подібному до man(1).\n" +" -s\tВивести лише короткий опис синтаксису використання кожної з команд,\n" +" \tщо відповідають ШАБЛОНУ\n" +" \n" +" Аргументи:\n" +" ШАБЛОН\tШаблон, що визначає тему довідки.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало якщо ШАБЛОН не знайдено або якщо вказано\n" +" помилковий параметр." + +# WTF??? history list += history + history file ??? +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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, показує лише N останніх рядків.\n" +" \n" +" Параметри:\n" +" -c\tВилучити зі списку усі збережені команди.\n" +" -d позиція\tВилучити рядок у ПОЗИЦІЇ (відносній). Відлік від'ємних значень\n" +" \t\tпозиції ведеться від кінця списку журналу\n" +" \n" +"\n" +" \n" +" -a\tДодати записи з поточного сеансу до файла журналу.\n" +" -n\tДодати записи, яких ще немає у списку з файла журналу, і\n" +" \t\tдописати їх до файла журналу.\n" +" -r\tПрочитати файл журналу та додати його вміст до кінця списку.\n" +" -w\tЗаписати поточний журнал команд до файла журналу.\n" +" \n" +" -p\tЗробити розкриття журналу команд на кожному з АРГУМЕНТІВ та\n" +" \tпоказати результат (без збереження у списку журналу команд).\n" +" -s\tДодати АРГУМЕНТИ до списку журналу як один запис.\n" +" \n" +" Якщо вказаний ФАЙЛ, його буде використано як файл журналу команд. Інакше,\n" +" якщо визначено $HISTFILE, береться її значення, якщо ні — ~/.bash_history.\n" +" \n" +" Якщо змінна $HISTTIMEFORMAT має значення, відмінне від порожнього рядку,\n" +" її буде використано як шаблон strftime(3) для показу часових позначок.\n" +" Інакше часові позначки не виводяться.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано вірні параметри та не виникло\n" +" помилки під час виконання." + +#: builtins.c:879 +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\tlists only processes that have changed status since the last\n" +" \t\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" +" \n" +" Показує список активних завдань. ЗАВДАННЯ обмежує вивід цим завданням.\n" +" Без параметрів показує стан усіх активних завдань.\n" +" \n" +" Параметри:\n" +" -l\tДодатково виводити ідентифікатори процесів.\n" +" -n\tПоказувати лише процеси, стан яких змінився з часу останнього\n" +" \tзвідомлення.\n" +" -p\tПоказувати лише ідентифікатори процесів.\n" +" -r\tОбмежити вивід поточними завданнями.\n" +" -s\tОбмежити вивід зупиненими завданнями.\n" +" \n" +" Якщо вказано -x, КОМАНДУ буде виконано після заміни усіх згадок про\n" +" завдання у АРГУМЕНТАХ на ідентифікатори головних процесів відповідних\n" +" завдань.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та не\n" +" виникло помилки під час виконання. При використанні -x команда\n" +" завершується зі статусом завершення КОМАНДИ." + +#: builtins.c:906 +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" +" \t\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 "" +"Вилучає завдання з поточної оболонки.\n" +" \n" +" Вилучає кожне з ЗАВДАНЬ з таблиці активних завдань. Якщо ЗАВДАННЯ не\n" +" вказано, береться завдання, яке оболонка вважає поточним.\n" +" \n" +" Параметри:\n" +" -a\tВилучити усі завдання, якщо ЗАВДАННЯ не вказані.\n" +" -h\tПозначити ЗАВДАННЯ так, щоб вони не отримали SIGHUP, якщо оболонка\n" +" \t\tотримає SIGHUP.\n" +" -r\tВилучати лише поточні завдання.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи\n" +" ЗАВДАННЯ." + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"Надіслати сигнал до завдання.\n" +" \n" +" Надіслати процесу, вказаному за ідентифікатором процесу чи завдання\n" +" сигнал, вказаний за його номером чи назвою. Якщо не вказано ані першого,\n" +" ані другого, буде надіслано SIGTERM.\n" +" \n" +" Параметри:\n" +" -s сигнал\tСИГНАЛ є назвою сигналу.\n" +" -n сигнал\tСИГНАЛ є номером сигналу.\n" +" -l\tПерелічити назви сигналів; якщо за -l ідуть іще аргументи, вони\n" +" \t\tвважаються номерами сигналів, які треба показати.\n" +" -L\tсинонім до -l\n" +" \n" +" Kill є вбудованою командою з двох причин: це дозволяє вказувати\n" +" ідентифікатори завдань замість ідентифікаторів процесів та дозволяє\n" +" вбивати процеси, навіть якщо ви вичерпали ліміт процесів.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні аргументи та не\n" +" трапилося помилки під час виконання." + +#: builtins.c:949 +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" +" Обчислює кожен АРГУМЕНТ як арифметичний вираз. Обчислення виконується у\n" +" цілих числах фіксованої довжини без перевірки переповнення, але все ж\n" +" ділення на 0 визначається і вважається помилкою. Нижченаведений список\n" +" операторів згруповано за рівнями пріоритету. Їх перелічено у порядку\n" +" спадання пріоритету.\n" +" \n" +" \tid++, id--\tпост-інкремент та пост-декремент змінної\n" +" \t++id, --id\tпре-інкремент та пре-декремент змінної\n" +" \t-, +\t\tунарний мінус та плюс\n" +" \t!, ~\t\tлогічна та побітова інверсія\n" +" \t**\t\tпіднесення до степеня\n" +" \t*, /, %\t\tмноження, ділення, залишок\n" +" \t+, -\t\tдодавання, віднімання\n" +" \t<<, >>\t\tпобітовий зсув вправо та вліво\n" +" \t<=, >=, <, >\tпорівняння\n" +" \t==, !=\t\tрівність, нерівність\n" +" \t&\t\tпобітове AND\n" +" \t^\t\tпобітове XOR\n" +" \t|\t\tпобітове OR\n" +" \t&&\t\tлогічне AND\n" +" \t||\t\tлогічне OR\n" +" \tвираз ? вираз : вираз\n" +" \t\t\tумовний оператор\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tприсвоєння\n" +" \n" +" Змінні оболонки можуть виступати операндами. Назву змінної буде замінено\n" +" її значенням (приведеним до цілого числа фіксованої довжини) у виразі.\n" +" Для цього не потрібно встановлювати властивість змінної `ціле число'.\n" +" \n" +" Оператори обчислюються за пріоритетами. Вкладені вирази у дужках\n" +" обчислюються першими та можуть змінювати правила пріоритетів, наведені\n" +" вище.\n" +" \n" +" Код завершення:\n" +" Якщо результатом обчислення останнього АРГУМЕНТУ є 0, let повертає 1,\n" +" інакше — 0." + +#: builtins.c:994 +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. By default, the backslash character escapes delimiter characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"Читає рядок зі стандартного вводу та розбиває його на поля.\n" +" \n" +" Зчитує один рядок зі стандартного вводу чи з ФАЙЛОВОГО-ДЕСКРИПТОРА, якщо\n" +" вказано параметр -u. Рядок розбивається на поля по словах, перше слово\n" +" призначується першій НАЗВІ, друге слово — другій НАЗВІ тощо, якщо\n" +" залишаться непризначені слова, їх буде призначено останній НАЗВІ. Як\n" +" роздільники полів розпізнаються символи, вказані у змінній $IFS.\n" +" Типово, символ зворотної похилої риски екранує символи роздільника\n" +" та розриву рядка.\n" +" \n" +" Якщо НАЗВ не вказано, рядок цілком буде збережено у змінній REPLY.\n" +" \n" +" Параметри:\n" +" -a масив\tПризначити прочитані слова послідовним елементам МАСИВУ,\n" +" \t\tпочинаючи з нульового.\n" +" -d роздільник\tЧитати ввід доки не знайдеться символ РОЗДІЛЬНИК\n" +" \t\t(замість кінця рядка, як звичайно).\n" +" -e\t\tВикористовувати Readline для отримання рядку.\n" +" -i текст\tВказати початковий ТЕКСТ для Readline.\n" +" -n кількість\tПрипинити після зчитування КІЛЬКОСТІ символів, замість\n" +" \t\tтого, щоб чекати на кінець рядка.\n" +" -N кількість\tПрипинити, лише після читання КІЛЬКОСТІ символів, якщо\n" +" \t\tсеред них не виявиться символі кінця файла або не буде перевищено\n" +" \t\tчас очікування, ігнорувати роздільники.\n" +" -p запрошення\tВивести рядок ЗАПРОШЕННЯ (без переведення рядка в кінці)\n" +" \t\tперед читанням.\n" +" -r\t\tНе обробляти зворотню похилу риску для екранування символів.\n" +" -s\t\tНе виводити отриманий ввід на термінал.\n" +" -t ліміт-часу\tПрипинити читання та вийти з помилкою якщо за вказаний\n" +" \t\tпроміжок часу (в секундах) не було прочитано рядок цілком. Значення\n" +" \t\tзмінної TMOUT є стандартним значенням обмеження за часом. ЛІМІТ-ЧАСУ\n" +" \t\tможе бути дробовим числом. Якщо ЛІМІТ-ЧАСУ 0, read завершується\n" +" \t\tуспішно, лише якщо ввід вже наявний на вказаному файловому\n" +" \t\tдескрипторі. Якщо перевищено термін очікування, код завершення буде\n" +" \t\tбільшим за 128.\n" +" -u файловий-дескриптор\tЧитати ввід з ФАЙЛОВОГО-ДЕСКРИПТОРУ замість\n" +" \t\tстандартного вводу.\n" +" \n" +" Код завершення:\n" +" Команда повертає помилку, якщо знайдено кінець файла, якщо вичерпано час\n" +" очікування (значення, більше за 128), якщо сталася помилка під час\n" +" встановлення значення змінної, або якщо із -u вказано неправильний файловий дескриптор." + +#: builtins.c:1042 +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" +" \n" +" Виходить з функції чи сценарію, виконаного за допомогою source зі вказаним\n" +" кодом завершення N. Якщо N не вказане, return повертає статус останньої\n" +" виконаної всередині сценарію чи функції команди.\n" +" \n" +" Код завершення:\n" +" Команда повертає N, або помилку, якщо викликана не у функції чи сценарії." + +#: builtins.c:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"Встановлює та скидає параметри оболонки та позиційні параметри.\n" +" \n" +" Змінює значення властивостей оболонки та позиційних параметрів чи показує\n" +" назви та значення змінних оболонки.\n" +" \n" +" Параметри:\n" +" -a Експортувати змінні, які будуть змінюватися чи створюватися.\n" +" -b Сповіщати про припинення завдань негайно.\n" +" -e Завершити роботу, якщо одна з команд завершиться помилкою.\n" +" -f Вимкнути розкриття шаблонів назв файлів (globbing).\n" +" -h Запам’ятовувати розміщення команд по мірі використання.\n" +" -k Переносити усі аргументи-присвоєння до оточення команди, не лише ті,\n" +" що йдуть перед назвою команди.\n" +" -m Ввімкнути контроль завдань.\n" +" -n Читати команди, але не виконувати їх.\n" +" -o параметр\n" +" Встановити параметр оболонки:\n" +" allexport те саме, що й -a\n" +" braceexpand те саме, що й -B\n" +" emacs використовувати подібний до emacs інтерфейс\n" +" редагування\n" +" errexit те саме, що й -e\n" +" errtrace те саме, що й -E\n" +" functrace те саме, що й -T\n" +" hashall те саме, що й -h\n" +" histexpand те саме, що й -H\n" +" history ввімкнути збереження журналу команд\n" +" ignoreeof не виходити з оболонки після зчитування кінця файла\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" +" останньої команди, що завершилася невдало, або\n" +" нуль, якщо усі команди завершилися успішно\n" +" posix змінити поведінку bash у ситуаціях, де її поведінка\n" +" зазвичай відхиляється від стандарту Posix так, щоб\n" +" вона відповідала стандарту\n" +" privileged те саме, що й -p\n" +" verbose те саме, що й -v\n" +" vi використовувати подібний до vi інтерфейс\n" +" редагування рядку\n" +" xtrace те саме, що й -x\n" +" -p Ввімкнений, якщо дійсний та ефективний ідентифікатори користувача не\n" +" збігаються. Вимикає обробку файла $ENV та імпортування функцій\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 і RETURN будуть успадковуватися функціями\n" +" оболонки.\n" +" -- Призначити всі аргументи, які ще не призначено до позиційних параметрів.\n" +" Якщо всі аргументи вже призначено, позиційні параметри вважатимуться\n" +" невстановленими.\n" +" - Призначити аргументи, що залишилися позиційним параметрам.\n" +" Параметри -x та -v вимикаються.\n" +" \n" +" Вимкнути параметр можна вказавши + замість -. Параметри можна змінювати\n" +" й після запуску оболонки. Наразі ввімкнені параметри можна побачити у\n" +" змінній $-. Залишкові аргументи вважаються позиційними параметрами\n" +" та призначаються по порядку відповідно до $1 $2, .. $n. Якщо АРГУМЕНТИ не\n" +" вказані, виводиться список усіх змінних оболонки.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри." + +#: builtins.c:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 "" +"Скидає значення та параметри змінних та функцій оболонки.\n" +" \n" +" Вилучає змінні чи функції, вказані за НАЗВАМИ.\n" +" \n" +" Параметри:\n" +" -f\tНАЗВИ є функціями оболонки.\n" +" -v\tНАЗВИ є змінними оболонки.\n" +" -n\tНАЗВИ є посиланнями на назви, визначення самих змінних скасовується.\n" +" \n" +" Без параметрів, unset спочатку намагається скинути змінну, якщо це не\n" +" вдасться, тоді функцію.\n" +" \n" +" Деякі змінні не можуть бути скинутими; див. `readonly'.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи НАЗВА\n" +" доступна лише для читання." + +#: builtins.c:1162 +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 "" +"Вмикає властивість експортування змінних оболонки.\n" +" \n" +" Позначає кожну з НАЗВ для експорту до середовища запущених надалі команд.\n" +" Якщо вказане ЗНАЧЕННЯ, призначає ЗНАЧЕННЯ перед тим, як експортувати.\n" +" \n" +" Параметри:\n" +" -f\tПрацювати з функціями оболонки.\n" +" -n\tВимкнути властивість експортування для усіх НАЗВ.\n" +" -p\tВивести список усіх експортованих змінних та функцій.\n" +" \n" +" Аргумент `--' вимикає подальший аналіз параметрів.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та НАЗВИ." + +#: builtins.c:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 "" +"Робить змінні оболонки незмінними.\n" +" \n" +" Позначає кожну з НАЗВ як незмінну; після цього значення НАЗВИ не можуть\n" +" бути змінені призначенням. Якщо вказане ЗНАЧЕННЯ, воно призначається, перш\n" +" ніж змінну буде позначено незмінною.\n" +" \n" +" Параметри:\n" +" -a\tПрацювати з індексованими масивами.\n" +" -A\tПрацювати з асоціативними масивами.\n" +" -f\tПрацювати з функціями оболонки.\n" +" -p\tВивести список всіх незмінних змінних та функцій, залежно від\n" +" того, чи вказано параметр -f.\n" +" \n" +" Аргумент `--' вимикає подальший аналіз параметрів.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та НАЗВИ." + +#: builtins.c:1203 +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 "" +"Зсуває позиційні параметри.\n" +" \n" +" Перейменовує позиційні параметри $N+1,$N+2 ... у $1,$2 ... Якщо N не\n" +" вказане, береться 1.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо N менше за нуль чи більше за $#." + +#: builtins.c:1215 builtins.c:1230 +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" +" \n" +" Читає та виконує команди з ФАЙЛУ у поточній оболонці. Елементи $PATH\n" +" використовуються при пошуку ФАЙЛУ. Якщо вказані АРГУМЕНТИ, вони стають\n" +" позиційними параметрами при запуску ФАЙЛУ.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої команди, виконаної у ФАЙЛІ, або\n" +" помилку, якщо ФАЙЛ не вдалося прочитати." + +#: builtins.c:1246 +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 "" +"Призупиняє виконання оболонки.\n" +" \n" +" Призупиняє виконання оболонки до отримання сигналу SIGCONT. Зазвичай,\n" +" оболонки сеансу не можуть бути призупинені.\n" +" \n" +" Параметри:\n" +" -f\tПризупинити, навіть якщо це оболонка сеансу.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо не ввімкнене керування завданнями чи\n" +" якщо трапиться помилка." + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"Перевіряє умовний вираз.\n" +" \n" +" Завершується з кодом 0 (істинний) чи 1 (хибний), залежно від\n" +" результату обчислення ВИРАЗУ. Вирази можуть бути унарними чи бінарними.\n" +" Унарні вирази часто використовуються для визначення властивостей файлів.\n" +" Також є оператори для рядків та для порівняння чисел.\n" +" \n" +" Файлові оператори:\n" +" \n" +" -a файл Істинний, якщо файл існує.\n" +" -b файл Істинний, якщо файл є блоковим пристроєм.\n" +" -c файл Істинний, якщо файл є символьним пристроєм.\n" +" -d файл Істинний, якщо файл є каталогом.\n" +" -e файл Істинний, якщо файл існує.\n" +" -f файл Істинний, якщо файл існує та є звичайним файлом.\n" +" -g файл Істинний, якщо файл має встановлений біт `set-group-id'.\n" +" -h файл Істинний, якщо файл є символічним посиланням.\n" +" -L файл Істинний, якщо файл є символічним посиланням.\n" +" -k файл Істинний, якщо файл має встановленим біт `sticky'.\n" +" -p файл Істинний, якщо файл є іменованим каналом.\n" +" -r файл Істинний, якщо ви можете читати файл.\n" +" -s файл Істинний, якщо файл існує і не є порожнім.\n" +" -S файл Істинний, якщо файл є сокетом.\n" +" -t дескриптор Істинний, якщо дескриптор відкритий у терміналі.\n" +" -u файл Істинний, якщо файл має встановлений біт `set-user-id'.\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" +" \n" +" рядок1 = рядок2\n" +" Істинний, якщо рядки однакові.\n" +" рядок1 != рядок2\n" +" Істинний, якщо рядки не однакові.\n" +" рядок1 < рядок2\n" +" Істинний, якщо при лексикографічному сортуванні рядок1\n" +" буде іти перед рядком\n" +" рядок1 > рядок2\n" +" Істинний, якщо при лексикографічному сортуванні рядок1\n" +" ітиме після рядка2.\n" +" \n" +" Інші оператори:\n" +" \n" +" -o параметр Істинний, якщо параметр оболонки ввімкнено.\n" +" -v ЗМІННА\t Істинний, якщо встановлено змінну середовища ЗМІННА\n" +" -R ЗМІННА\t Істинний, якщо встановлено змінну середовища ЗМІННА і ця змінна є посиланням на назву.\n" +" ! вираз Істинний, якщо вираз хибний.\n" +" вираз1 -a вираз2 Істинний, якщо обидва вирази істинні.\n" +" вираз1 -o вираз2 Істинний, якщо хоч один з виразів істинний.\n" +" \n" +" аргумент1 ОПЕРАТОР аргумент2\n" +" Арифметичне порівняння. ОПЕРАТОР може бути: -eq, -ne,\n" +" -lt, -le, -gt, чи -ge.\n" +" \n" +" Арифметичні бінарні оператори істинні, якщо аргумент1 рівний, не рівний,\n" +" менший, менший чи рівний, більший, чи більший чи рівний аргументу2.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо ВИРАЗ істинний; невдало, якщо вказано\n" +" помилковий аргумент чи ВИРАЗ хибний." + +#: builtins.c:1344 +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 "" +"Перевіряє умовний вираз.\n" +" \n" +" Це синонім до вбудованої команди \"test\", але на відміну від неї останнім\n" +" аргументом має бути `]'." + +#: builtins.c:1353 +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" +" \n" +" Виводить збірний час виконання оболонки та всіх її нащадків на рівні\n" +" користувача та на рівні системи.\n" +" \n" +" Код завершення:\n" +" Команда завжди успішна." + +#: builtins.c:1365 +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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\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 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" +" АРГУМЕНТ є командою, яку буде запущено оболонкою при отриманні\n" +" СИГНАЛУ(ІВ). Якщо АРГУМЕНТ не вказано (а СИГНАЛ вказано) або вказано\n" +" `-' як АРГУМЕНТ, кожен вказаний СИГНАЛ встановлюється у його\n" +" початковий стан. Якщо АРГУМЕНТ є порожнім рядком, СИГНАЛ(И) буде\n" +" ігноруватися оболонкою та запущеними з неї командами.\n" +" \n" +" Якщо СИГНАЛ є EXIT (0), АРГУМЕНТ буде виконано при виході з оболонки. Якщо\n" +" СИГНАЛ є DEBUG, АРГУМЕНТ буде виконуватися перед кожною простою командою.\n" +" \n" +" Якщо аргументи взагалі не вказано, trap покаже список команд,\n" +" призначених до сигналів.\n" +" \n" +" Параметри:\n" +" -l\tВивести список сигналів та їх номерів.\n" +" -p\tПоказати команди, призначені СИГНАЛАМ.\n" +" \n" +" Кожен з СИГНАЛІВ має бути або назвою сигналу з або номером\n" +" номером сигналу. Назви сигналів нечутливі до регістру літер, префікс SIG\n" +" необов’язковий. Сигнал можна надіслати оболонці за допомогою\n" +" \"kill -signal $$\".\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказані правильні параметри та СИГНАЛИ." + +#: builtins.c:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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" +" \n" +" Для кожної НАЗВИ показує, як її буде оброблено як назву команди.\n" +" \n" +" Параметри:\n" +" -a\tПоказати усі можливі інтерпретації НАЗВИ; якщо не вказано\n" +" \tпараметр `-p', охоплює також псевдоніми, вбудовані команди, функції.\n" +" -f\tНе шукати серед функцій оболонки.\n" +" -P\tВиводити лише дискові команди, знайдені за PATH.\n" +" -p\tВивести лише назву файла на диску, або нічого.\n" +" -t\tВивести одне слово, що вказує тип — `alias', `keyword',\n" +" \t`function', `builtin', `file' чи `', якщо НАЗВА, відповідно, є\n" +" \tпсевдонімом, зарезервованим словом оболонки, функцією оболонки\n" +" \tвбудованою командою оболонки, файлом на диску чи не знайдене.\n" +" \n" +" Аргументи:\n" +" НАЗВА\tназва команди для інтерпретації.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо буде знайдено усі НАЗВИ; невдало, якщо\n" +" хоч одне з них не вдасться знайти." + +#: builtins.c:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"Змінює обмеження ресурсів оболонки.\n" +" \n" +" Дозволяє керувати доступними оболонці та створеним нею процесам ресурсами,\n" +" якщо це підтримується системою.\n" +" \n" +" Параметри:\n" +" -S\tВикористовувати `soft' обмеження.\n" +" -H\tВикористовувати `hard' обмеження.\n" +" -a\tНадати звіт про поточні обмеження.\n" +" -b\tРозмір буфера сокетів.\n" +" -c\tМаксимальний розмір файла дампу пам’яті.\n" +" -d\tМаксимальний розмір сегменту даних процесу.\n" +" -e\tМаксимальний пріоритет виконання (`nice').\n" +" -f\tМаксимальний розмір файлів, записаних оболонкою та нащадками.\n" +" -i\tМаксимальна кількість сигналів, що очікують обробки.\n" +" -k\tМаксимальна кількість k-черг, визначених для цього процесу\n" +" -l\tМаксимальний розмір, який процес може заблокувати в пам’яті.\n" +" -m\tМаксимальний розмір резидентного набору.\n" +" -n\tМаксимальна кількість відкритих файлових дескрипторів.\n" +" -p\tРозмір буфера каналу.\n" +" -q\tМаксимальний розмір повідомлення у чергах повідомлень POSIX\n" +" \t(у байтах).\n" +" -r\tМаксимальний пріоритет виконання у реальному часі.\n" +" -s\tМаксимальний розмір стеку.\n" +" -t\tМаксимальний час використання процесору (у секундах).\n" +" -u\tМаксимальна кількість процесів користувача.\n" +" -v\tРозмір віртуальної пам’яті.\n" +" -x\tМаксимальна кількість блокувань файлів.\n" +" -R\tмаксимальний період роботи процесу реального часу до блокування\n" +" -T\tмаксимальна кількість потоків обробки\n" +" \n" +" Перелік доступних параметрів залежить від програмної платформи.\n" +" \n" +" Якщо вказане ОБМЕЖЕННЯ, воно встановлюється як нове значення обмеження\n" +" використання вказаного ресурсу; спеціальні значення ОБМЕЖЕННЯ `soft',\n" +" `hard', та `unlimited' означають, відповідно, поточне м’яке обмеження,\n" +" поточне жорстке обмеження та відсутність обмежень. Якщо ОБМЕЖЕННЯ не\n" +" вказане, виводиться поточне значення вказаного ресурсу. Якщо не вказано\n" +" жодного параметра, береться -f.\n" +" \n" +" Значення можуть змінюватися із кроком у 1024 байти, за винятком -t,\n" +" що вказується в секундах, -p, яке має крок 512 байтів та -u, що є\n" +" кількістю процесів без кроку.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи\n" +" трапилася помилка під час виконання." + +#: builtins.c:1483 +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" +" \n" +" Встановлює МАСКУ дозволів для створених файлів. Якщо МАСКУ не вказано,\n" +" виводить поточне значення маски.\n" +" \n" +" Якщо МАСКА починається з цифри, вона вважається вісімковим числом;\n" +" якщо ні — вона має бути рядком символьного режиму, подібним до того, що\n" +" використовується chmod(1).\n" +" \n" +" Параметри:\n" +" -p\tЯкщо МАСКУ не вказано, вивести її у формі, придатній для виконання.\n" +" -S\tВиводити у символьному режимі; інакше виводиться вісімкове число.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильну МАСКУ та параметри." + +#: builtins.c:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"Чекає завершення виконання завдання та повертає його код завершення.\n" +" \n" +" Очікує завершення роботи процесу, вказаного за ІДЕНТИФІКАТОРОМ, що може\n" +" бути ідентифікатором процесу чи завдання, та повертає його код завершення.\n" +" Якщо ІДЕНТИФІКАТОР не вказано, очікує завершення усіх активних дочірніх\n" +" процесів та повертає код 0. Якщо ІДЕНТИФІКАТОР є завданням, очікує на\n" +" завершення усіх процесів у ланцюжку завдання.\n" +" \n" +" Якщо вказано параметр -n, очікує на завершення якогось завдання зі списку\n" +" ідентифікаторів або, якщо не вказано жодного ідентифікатора, на завершення\n" +" наступного завдання і повертає його стан завершення.\n" +" \n" +" Якщо вказано параметр -p, процес або ідентифікатор завдання, для якого\n" +" повернуто стан завершення, пов'язується із змінною VAR, назва якої\n" +" визначається аргументом параметра. Спочатку змінна лишатиметься\n" +" невизначеною. Це корисно, лише якщо вказано параметр -n.\n" +" \n" +" Якщо вказано параметр -f і увімкнено керування завданнями, очікує на\n" +" вказаний ідентифікатор для переривання, замість очікування на зміну\n" +" його стану.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення вказаного завдання; помилку, якщо вказано\n" +" неправильні параметри чи ІДЕНТИФІКАТОР або якщо вказано -n і оболонка не\n" +" має неочікуваних дочірніх процесів." + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." +msgstr "" +"Очікує на завершення роботи процесу та повертає його код завершення.\n" +" \n" +" Очікує, поки завершиться вказаний процес, та доповідає про його успішність.\n" +" Якщо ІДЕНТИФІКАТОР-ПРОЦЕСУ не вказаний, очікує завершення усіх дочірніх\n" +" процесів й завершується з кодом 0. ІДЕНТИФІКАТОР має бути ідентифікатором\n" +" процесу.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення процесу з останнім вказаним ідентифікатором.\n" +" Повертає код помилки, якщо вказано неправильний ІДЕНТИФІКАТОР чи параметр." + +#: builtins.c:1549 +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 "" +"Виконати команди для кожного з пунктів списку.\n" +" \n" +" Цикл `for' виконує послідовність команд для кожного елементу списку.\n" +" Якщо `in СЛОВА ...;' не вказано, тоді береться `in \"$@\"'. НАЗВА\n" +" послідовно встановлюється у кожне зі СЛІВ, потім виконуються КОМАНДИ.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1563 +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" +" \n" +" Те ж саме, що й\n" +" \t(( ВИРАЗ1 ))\n" +" \twhile (( ВИРАЗ2 )); do\n" +" \t\tКОМАНДИ\n" +" \t\t(( ВИРАЗ3 ))\n" +" \tdone\n" +" ВИРАЗИ мають бути арифметичними виразами. Якщо будь-який з них не\n" +" вказаний, цикл поводиться, як ніби його результатом є 1.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1581 +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" +" СЛОВА розгортаються, утворюючи список слів. Отриманий список слів\n" +" виводиться пронумерованим до стандартного виводу помилок. Якщо `in СЛОВА'\n" +" не вказано, береться `in \"$@\"'. Тоді виводиться запрошення PS3 та зі\n" +" стандартного вводу зчитується рядок. Якщо цей рядок є числом, що вказує\n" +" номер одного зі слів, НАЗВА встановлюється у це слово. Якщо рядок порожній,\n" +" СЛОВА та запрошення виводяться знов. Якщо прочитано кінець файла, команда\n" +" завершується. Якщо рядок містить щось інше, НАЗВІ призначається порожній\n" +" рядок. Прочитаний рядок зберігається у змінній REPLY. Після кожного\n" +" зчитування виконуються КОМАНДИ. Команда продовжує виконання доки не\n" +" буде викликано команду break.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1602 +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" +" витрачений користувачем, системою та сумарно на виконання ЛАНЦЮЖКА.\n" +" \n" +" Параметри:\n" +" -p\tДрукує звіт у форматі, що відповідає стандарту POSIX.\n" +" \n" +" Час виводиться у форматі, вказаному у змінній TIMEFORMAT.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення ЛАНЦЮЖКА-КОМАНД." + +#: builtins.c:1619 +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" +" \n" +" Вибірково виконує КОМАНДИ, залежно від відповідності СЛОВА ШАБЛОНУ.\n" +" Декілька шаблонів можуть бути вказані через `|'.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1631 +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 "" +"Виконує команди відповідно до умови.\n" +" \n" +" КОМАНДИ з `if КОМАНДИ' виконуються, і якщо їх код завершення нульовий,\n" +" виконуються КОМАНДИ з `then КОМАНДИ'. Інакше в свою чергу виконуються\n" +" команди з `elif КОМАНДИ', і якщо їх код завершення нульовий, виконуються\n" +" КОМАНДИ з відповідного `then КОМАНДИ'. Інакше виконуються КОМАНДИ з\n" +" `else КОМАНДИ'. Блоки elif та else не обов’язкові.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди або нуль,\n" +" якщо жодна з перевірених умов не була істинною." + +#: builtins.c:1648 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Циклічно виконує команди поки виконується умова.\n" +" \n" +" Виконуватиме КОМАНДИ-2, поки остання команда з КОМАНД\n" +" не завершиться невдало.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +#: builtins.c:1660 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"Виконує команди доки умову не буде виконано.\n" +" \n" +" Виконуватиме КОМАНДИ-2, поки остання команда з КОМАНД\n" +" не завершиться успішно.\n" +" \n" +" Код завершення:\n" +" Команда повертає код завершення останньої виконаної команди." + +# WTF? How can it return exit code of _asynchronous_ process... +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" +"Створює співпроцес з назвою НАЗВА.\n" +" \n" +" Починає асинхронне виконання КОМАНДИ, під’єднавши її стандартний ввід та\n" +" вивід через канали до файлових дескрипторів, які присвоюються елементам 0\n" +" та 1 змінної-масиву НАЗВА.\n" +" Стандартна назва змінної — \"COPROC\".\n" +" \n" +" Код завершення:\n" +" Команда coproc повертає стан виходу 0." + +#: builtins.c:1686 +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 "" +"Описує функцію оболонки.\n" +" \n" +" Створює функцію оболонки з назвою НАЗВА. Функція запускається як звичайна\n" +" команда з назвою НАЗВА та послідовно виконує КОМАНДИ. Аргументи до команди\n" +" призначаються на час виконання змінним $1...$n, а назва функції — змінній\n" +" $FUNCNAME.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо НАЗВА є незмінною." + +#: builtins.c:1700 +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" +" \n" +" Виконує згрупований набір команд. Це один з методів перенаправлення виводу\n" +" групи команд.\n" +" \n" +" Код завершення:\n" +" Конструкція повертає код завершення останньої виконаної команди." + +#: builtins.c:1712 +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 "" +"Продовжує виконання завдання на передньому плані.\n" +" \n" +" Продовжує на передньому плані виконання призупиненого чи фонового\n" +" завдання, як це робить команда `fg'. ЗАВДАННЯ може бути назвою чи номером\n" +" завдання. Якщо після ЗАВДАННЯ вказано `&', завдання продовжує виконання у\n" +" фоні, тобто команда має ефект команди `bg'.\n" +" \n" +" Код завершення:\n" +" Команда повертає статус продовженого завдання." + +#: builtins.c:1727 +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" +" \n" +" Обчислює ВИРАЗ відповідно до правил арифметичного розкриття. Те ж саме,\n" +" що й «let \"ВИРАЗ\"».\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо результат обчислення ненульовий." + +#: builtins.c:1739 +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 "" +"Виконує умовну команду.\n" +" \n" +" Повертає статус 0 чи 1, в залежності від результату обчислення умовного\n" +" ВИРАЗУ. Вирази складаються з тих самих складових, що використовуються у\n" +" вбудованій команді `test', але можуть також комбінуватися за допомогою:\n" +" \n" +" ( ВИРАЗ )\t\tПовертає значення ВИРАЗУ.\n" +" ! ВИРАЗ\t\tІстинний, якщо ВИРАЗ хибний.\n" +" ВИРАЗ1 && ВИРАЗ2\tІстинний, якщо обидва ВИРАЗИ істинні.\n" +" ВИРАЗ1 || ВИРАЗ2\tІстинний, якщо хоч один з ВИРАЗІВ істинний.\n" +" \n" +" Якщо застосовуються оператори `==' та `!=', рядок з правої сторони\n" +" вважається шаблоном, й проводиться перевірка на відповідність цьому\n" +" шаблону. При застосуванні `=~' рядок зліва вважається регулярним\n" +" виразом, відносно якого перевіряється правий рядок.\n" +" \n" +" Оператори && та || не обчислюють ВИРАЗ2, якщо ВИРАЗУ1 достатньо для\n" +" визначення результату.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо ВИРАЗ істинний." + +#: builtins.c:1765 +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" +" \n" +" BASH_VERSION\tІнформація щодо версії Bash.\n" +" CDPATH\tРозділений двокрапкою список каталогів, у яких оболонка буде\n" +" \t\tшукати каталоги, вказані команді `cd'.\n" +" GLOBIGNORE\tРозділений двокрапкою список шаблонів назв файлів, які будуть\n" +" \t\tігноруватися під час розкриття шляхів.\n" +" HISTFILE\tНазва файла, де зберігається історія команд.\n" +" HISTFILESIZE\tНайбільша дозволена кількість записів у файлі журналу.\n" +" HISTSIZE\tНайбільша кількість записів, які може використовувати\n" +" \t\tпоточна оболонка.\n" +" HOME\tПовний шлях до вашої домівки.\n" +" HOSTNAME\tНазва поточної машини.\n" +" HOSTTYPE\tТип процесора, на якому виконується оболонка.\n" +" IGNOREEOF\tВизначає реакцію оболонки на символ кінця файла на вводі.\n" +" \t\tЯкщо змінна визначена, її значення є кількістю таких символів,\n" +" \t\tщо можуть бути отримані під ряд й бути проігнорованими. Звичайне\n" +" \t\tзначення — 10. Якщо змінна не визначена, символ кінця файла\n" +" \t\tозначатиме кінець вводу.\n" +" MACHTYPE\tРядок, що описує поточну систему, на якій виконується Bash.\n" +" MAILCHECK\tВизначає частоту перевірки пошти оболонкою.\n" +" MAILPATH\tРозділений двокрапкою список файлів, які оболонка буде\n" +" \t\tперевіряти на наявність нової пошти.\n" +" OSTYPE\tВаріант Unix, на якому виконується оболонка.\n" +" PATH\tРозділений двокрапкою список каталогів, де оболонка шукатиме\n" +" \t\tвиконувані файли команд.\n" +" PROMPT_COMMAND\tКоманда, яку оболонка буде виконувати перш ніж вивести\n" +" \t\tосновне запрошення вводу.\n" +" PS1\t\tРядок основного запрошення вводу.\n" +" PS2\t\tРядок вторинного запрошення вводу.\n" +" PWD\t\tПовний шлях до поточного каталогу.\n" +" SHELLOPTS\tРозділений двокрапкою список увімкнених параметрів оболонки.\n" +" TERM\tТип поточного термінала.\n" +" TIMEFORMAT\tФормат виводу часу командою `time'.\n" +" auto_resume\tЯкщо встановлена, введені команди, що складаються з\n" +" \t\tодного слова, спочатку будуть шукатися у списку поточних\n" +" \t\tпризупинених завдань. Якщо таке завдання буде знайдене, йому буде\n" +" \t\tнадано пріоритет. Значення цієї змінної `exact' означає,\n" +" \t\tщо слово має точно відповідати команді у списку завдань. Значення\n" +" \t\t`substring' означає, що слово має міститися у команді завдання.\n" +" \t\tБудь-яке інше значення означає, що команда завдання має\n" +" \t\tпочинатися з вказаного слова.\n" +" histchars\tСимволи, що використовуються для розкриття журналу та\n" +" \t\tшвидкої заміни. Перший символ є символом підставляння журналу,\n" +" \t\tзазвичай це `!'. Другий — символ «швидкої заміни», зазичай `^'.\n" +" \t\tТретій — символ «коментаря журналу», зазвичай це `#'.\n" +" HISTIGNORE\tРозділений двокрапкою список шаблонів, що використовуються\n" +" \t\tпри визначенні, чи зберігати команду у списку журналу.\n" + +#: builtins.c:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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" +" -n\tНе робити звичайного переходу у новий каталог при додаванні\n" +" \t\tкаталогів до стеку, проводити операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \t\tзліва (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \t\tопинилася на вершині стеку.\n" +" \n" +" -N\tЦиклічно обертає стек так, щоб N-ний каталог, рахуючи\n" +" \t\tз кінця (починаючи з нуля) у списку, що виводиться командою `dirs'\n" +" \t\tопинився на вершині стеку.\n" +" \n" +" КАТАЛОГ\tДодає КАТАЛОГ на вершину стеку і робить його поточним\n" +" \t\t\tробочим каталогом.\n" +" \n" +" Вбудована команда `dirs' показує стек каталогів.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказаний неправильний аргумент чи\n" +" якщо не вдалося змінити поточну каталог." + +#: builtins.c:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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" +" -n\tНе виконувати звичайного переходу до нового каталогу при вилученні\n" +" \t\tкаталогів зі стеку, проводити операції лише над стеком.\n" +" \n" +" Аргументи:\n" +" +N\tВилучає N-ний зліва каталог у списку, що показується командою\n" +" \t\t`dirs' (відлік починається з нуля). Приклад: `popd +0' вилучає\n" +" \t\tперший каталог, `popd +1' — другий.\n" +" \n" +" -N\tВилучає N-ний з кінця каталог у списку, що показується\n" +" \t\tкомандою `dirs' (відлік починається з нуля). Приклад: `popd -0'\n" +" \t\tвилучає останній каталог, `popd -1' — передостанній.\n" +" \n" +" Вбудована команда `dirs' показує список збережених каталогів.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано помилковий аргумент чи якщо\n" +" не вдалося змінити поточний каталог." + +#: builtins.c:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Показує список збережених каталогів.\n" +" \n" +" Показує список збережених каталогів. Каталоги додаються до цього списку\n" +" командою `pushd'; ви можете повернутися назад по цьому списку за допомогою\n" +" команди `popd'.\n" +" \n" +" Параметри:\n" +" -c\tСпорожнити список каталогів, вилучивши усі його елементи.\n" +" -l\tНе використовувати ~ при виводі каталогів, що знаходяться\n" +" \t\tусередині вашої домівки.\n" +" -p\tВиводити каталоги по одній на рядок.\n" +" -v\tВиводити каталоги по одній на рядок із вказанням позиції у\n" +" \t\tсписку.\n" +" \n" +" Аргументи:\n" +" +N\tПоказує N-ний зліва каталог у списку, що виводиться командою\n" +" \t\tdirs без аргументів, відлік починається з нуля.\n" +" \n" +" -N\tПоказує N-ний з кінця каталог у списку, що виводиться\n" +" \t\tкомандою dirs без аргументів, відлік починається з нуля. \n" +" Код завершення:\n" +" Команда завершується невдало, якщо вказано неправильний параметр чи якщо\n" +" трапиться помилка." + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 "" +"Встановлює та скидає параметри оболонки.\n" +" \n" +" Змінює значення ПАРАМЕТРІВ. Якщо аргументи ПАРАМЕТРИ не вказані, виводить\n" +" список усіх вказаних параметрів оболонки. Якщо ж параметрів не вказано,\n" +" виводить список усіх параметрів, вказуючи, чи параметр ввімкнений, чи ні.\n" +" \n" +" Параметри:\n" +" -o\tПриймати лише ПАРАМЕТРИ, з якими працює `set -o'.\n" +" -p\tВивести список параметрів оболонки та їх поточний стан.\n" +" -q\tНе виводити нічого.\n" +" -s\tВвімкнути (встановити) кожен з ПАРАМЕТРІВ.\n" +" -u\tВимкнути (скинути) кожен з ПАРАМЕТРІВ.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо ПАРАМЕТР ввімкнено; невдало, якщо\n" +" вказано неправильні параметри чи ПАРАМЕТР вимкнено." + +#: builtins.c:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or assignment\n" +" error occurs." +msgstr "" +"Форматує та виводить аргументи відповідно до шаблону ФОРМАТ.\n" +" \n" +" Параметри:\n" +" -v змінна\tПризначити результат змінній оболонки, замість\n" +" \t\tвиведення його до стандартного виводу.\n" +" \n" +" ШАБЛОН складається з символів, які можуть належати до трьох типів:\n" +" звичайні символи, які просто копіюються у вивід; спеціальні\n" +" послідовності, які інтерпретуються, а потім копіюються у вивід; та\n" +" вказівки форматування, замість кожної з яких підставляється відповідний\n" +" аргумент.\n" +" \n" +" Окрім стандартних вказівок форматування, описаних у printf(1)б\n" +" printf також розуміє:\n" +" \n" +" %b\tІнтерпретувати спеціальні послідовності (що починаються зі\n" +" \t\tзворотної похилої риски) у відповідному аргументі.\n" +" %q\tВзяти аргумент в лапки так, щоб його можна було використати як\n" +" \t\tввід оболонки\n" +" %Q\tподібна до %q, але буде застосовано довільну точність до аргументу\n" +" \t\tбез лапок до застосування лапок\n" +" %(формат)T – вивести рядок дати і часу з використанням ФОРМАТУ\n" +" для форматування даних strftime(3)\n" +" \n" +" Визначене форматування використовується так, щоб було оброблено усі аргументи.\n" +" Якщо аргументів виявиться менше за кількість визначених форматів, для зайвих\n" +" специфікаторів форматів буде використано нульові значення або порожні рядки,\n" +" залежно від типу форматування.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало лише якщо вказано неправильний параметр або\n" +" якщо трапиться помилка запису чи присвоєння." + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"Вказує, як буде завершувати аргументи readline.\n" +" \n" +" Визначає як завершувати аргументи для НАЗВ. Якщо параметри не вказано,\n" +" буде виведено поточні вказівки завершення аргументів у формі,\n" +" придатній для подальшого виконання.\n" +" \n" +" Параметри:\n" +" -p\tВивести вказівки доповнення у формі, придатній до виконання.\n" +" -r\tВилучити вказівки доповнення аргументів для НАЗВ (або, якщо\n" +" \t\tНАЗВ не вказано, усі вказівки завершення).\n" +" -D\tзастосувати доповнення та дії як типові для команд\n" +" \tбез визначених вказівок щодо доповнення.\n" +" -E\tзастосувати доповнення та дії до «порожніх» команд, спроби --\n" +" \tзавершення на порожньому рядку.\n" +" -I\tзастосовувати доповнення та дій до початкового слова\n" +" \t\t(зазвичай, команди)\n" +" \n" +" Якщо виконується спроба доповнення, дії виконуються у порядку, в якому\n" +" вказані наведені вище параметри у верхньому регістрі. Якщо вказано\n" +" декілька параметрів, параметр -D має пріоритет над параметром -E,\n" +" а обидва ці параметри мають пріоритет над параметром -I.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та не\n" +" трапиться помилки під час виконання." + +#: builtins.c:2004 +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" +" можливих завершень. Якщо вказано необов’язковий аргумент СЛОВО,\n" +" генеруються завершення, що відповідають цьому слову.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри і не\n" +" трапиться помилки під час виконання." + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"Змінює чи показує параметри завершення аргументів.\n" +" \n" +" Змінює параметри завершення аргументів для НАЗВ (якщо НАЗВИ не вказано,\n" +" для завершення, що наразі виконується). Якщо ПАРАМЕТРИ не вказані,\n" +" виводить параметри завершення для кожної з НАЗВ (чи завершення, що\n" +" наразі виконується).\n" +" \n" +" Параметри:\n" +" \t-o параметр\tУвімкнути параметр завершення для всіх НАЗВ.\n" +" \t-D\t\tЗмінити параметри для доповнення \"типових\" команд\n" +" \t-E\t\tЗмінити параметри для доповнення \"порожніх\" команд\n" +" \t-I\t\tЗмінити параметри для доповнення за початковим словом\n" +" \n" +" Параметри можна вимикати, використовуючи `+o' замість `-o'.\n" +" \n" +" Аргументи:\n" +" \n" +" Кожна з НАЗВ відповідає команді, для якої попередньо має бути вказано,\n" +" як завершувати її аргументи за допомогою вбудованої команди `complete'.\n" +" Якщо НАЗВ не вказано, compopt має виконуватися усередині функції, що\n" +" генерує список завершень, тоді змінюються параметрі вказівки завершень,\n" +" що відповідає цій функції.\n" +" \n" +" Код завершення:\n" +" Команда завершується успішно, якщо вказано правильні параметри та\n" +" вказівки завершень для НАЗВ існують." + +#: builtins.c:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"Читає рядки зі стандартного вводу й заносить їх до масиву.\n" +" \n" +" Читає рядки зі стандартного вводу чи з ФАЙЛОВОГО-ДЕСКРИПТОРА, якщо вказано\n" +" параметр -u, і вставляє їх до вказаної змінної-масиву. Якщо назву змінної\n" +" не вказано, використовується змінна MAPFILE.\n" +" \n" +" Параметри:\n" +" -d роздільник\tВикористати для поділу на рядки вказаний роздільник, а не\n" +" символ розриву рядка\n" +" -n кількість\tПрочитати вказану кількість рядків. Нуль означає\n" +" \t\t\t«без обмежень».\n" +" -O початок\tПочати вставляти до масиву з вказаного\n" +" \t\t\tелемента масиву. Зазвичай відлік починається з нуля.\n" +" -s кількість\tПропустити вказану кількість рядків на початку\n" +" \t\t\tфайла.\n" +" -t\t\tПрибирати символ переведення рядку в кінці прочитаних\n" +" \t\t\tз файла рядків.\n" +" -u дескриптор\tЧитати рядки з вказаного дескриптора замість\n" +" \t\t\tстандартного вводу\n" +" -C обробник\tВиконувати вказаний обробник після прочитання рядка.\n" +" -c крок\t\tВикликати обробник лише після того, як буде прочитано\n" +" \t\t\tвказану кількість рядків.\n" +" \n" +" Аргументи:\n" +" МАСИВ\t\tНазва змінної-масиву для збереження даних з файла.\n" +" \n" +" Якщо вказано лише -C, без -c, обробник викликатиметься із кроком 5000.\n" +" Обробник викликається із параметром, що вказує наступний елемент масиву,\n" +" якому буде призначено значення.\n" +" \n" +" Якщо початковий елемент не вказано, mapfile спорожнить МАСИВ, перш ніж\n" +" починати присвоєння.\n" +" \n" +" Код завершення:\n" +" Команда завершується невдало лише якщо вказано неправильний параметр або\n" +" якщо МАСИВ є незмінним." + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"Читає рядки з файла до масиву.\n" +" \n" +" Синонім до `mapfile'." + +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: неправильний ключ асоціативного масиву" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Повертає контекст поточної підпрограми.\n" +#~ " \n" +#~ " Якщо EXPR не вказано, повертає " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: процес %5ld (%s) у the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "Невідомий сигнал №" + +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "© Free Software Foundation, Inc., 2018" + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "© Free Software Foundation, Inc., 2014" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "© Free Software Foundation, Inc., 2009\n" + +#~ msgid "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "Ліцензія GPLv2+: GNU GPL версія 2 чи новіша \n" + +#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: не вдається змінити розмір виділеного блоку до %lu байтів (виділено %lu байтів)" + +#~ msgid "xrealloc: cannot allocate %lu bytes" +#~ msgstr "xrealloc: не вдається виділити %lu байтів" + +#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgstr "xrealloc: %s:%d: не вдається змінити розмір виділеного блоку до %lu байтів (виділено %lu байтів)" diff --git a/po/vi.gmo b/po/vi.gmo index eb02d00..f97a37d 100644 Binary files a/po/vi.gmo and b/po/vi.gmo differ diff --git a/po/vi.po b/po/vi.po index beb59d8..aa9ad4b 100644 --- a/po/vi.po +++ b/po/vi.po @@ -1,432 +1,512 @@ # Vietnamese translation for BASH (Bourne Again SHell). -# Copyright © 2009 Free Software Foundation, Inc. +# Bản dịch tiếng Việt dành cho bash. +# Copyright © 2015 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. -# Clytie Siddall , 2008-2009. +# Clytie Siddall , 2008, 2009, 2010. +# Nguyễn Thái Ngọc Duy , 2012. +# Trần Ngọc Quân , 2012-2014, 2015. # msgid "" msgstr "" -"Project-Id-Version: bash 4.0\n" +"Project-Id-Version: bash 4.4-beta1\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 \n" -"Language-Team: Vietnamese \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2015-10-18 07:47+0700\n" +"Last-Translator: Trần Ngọc Quân \n" +"Language-Team: Vietnamese \n" +"Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: LocFactoryEditor 1.8\n" +"X-Generator: Gtranslator 2.91.7\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "sai mảng in thấp" +msgstr "sai chỉ số mảng" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, 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" +msgid "%s: removing nameref attribute" +msgstr "" -#: arrayfunc.c:480 +#: arrayfunc.c:496 builtins/declare.def:868 #, c-format -msgid "%s: invalid associative array key" -msgstr "%s: khoá màng kết hợp không hợp lệ" +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: không thể chuyển đổi mảng kiểu chỉ số sang mảng kết hợp" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, 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ố" +msgstr "%s: không thể gán cho chỉ số không thuộc kiểu số" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, 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" +msgstr "%s: %s: phải sử dụng chỉ số phụ khi gán mảng kết hợp" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" -msgstr "%s: không thể tạo %s" +msgstr "%s: không thể tạo: %s" -#: bashline.c:3457 +#: bashline.c:4479 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" +msgstr "" +"bash_execute_unix_command: không tìm thấy ánh xạ phím (keymap) cho câu lệnh" -#: bashline.c:3543 +#: bashline.c:4637 #, 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 « / »" +msgstr "%s: ký tự khác khoảng trắng đầu tiên không phải là “\"”" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "thiếu « %c » đóng trong %s" +msgstr "thiếu dấu đóng “%c” trong %s" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "%s: thiếu dấu hai chấm định giới" +msgstr "%s: thiếu dấu hai chấm phân cách" -#: builtins/alias.def:132 +#: bashline.c:4733 #, fuzzy, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "“%s”: không thể tháo" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "khai triển ngoặc ôm: không thể phân bổ bộ nhớ cho %s" + +#: braces.c:406 +#, fuzzy, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "khai triển ngoặc ôm: gặp lỗi khi phân bổ bộ nhớ cho “%d” phần tử" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "khai triển ngoặc ôm: gặp lỗi khi phân bổ bộ nhớ cho “%s”" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "« %s »: tên sơ đồ phím không hợp lệ" +msgstr "“%s”: tên bí danh không hợp lệ" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" msgstr "chưa bật sửa đổi dòng" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "« %s »: tên sơ đồ phím không hợp lệ" +msgstr "“%s”: tên sơ đồ phím không hợp lệ" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, c-format msgid "%s: cannot read: %s" -msgstr "%s: không thể đọc %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 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "« %s »: tên hàm không rõ" +msgstr "“%s”: không hiểu tên hàm" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "%s không được tổ hợp với phím.\n" +msgstr "%s không được ràng buộc với bất kỳ phím nào.\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, 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 +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "“%s”: không thể tháo" + +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" msgstr "đếm vòng" -#: builtins/break.def:137 +#: builtins/break.def:139 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" +msgstr "chỉ có nghĩa trong vòng lặp “for”, “while” hay “until”" -#: builtins/caller.def:133 +#: builtins/caller.def:136 +#, fuzzy 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" +" 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." msgstr "" +"Trả về ngữ cảnh của lệnh gọi hàm hiện thời.\n" +"\n" +" Không có BTHỨC thì trả lại \"$line $filename\". Có BTHỨC thì trả\n" +" lại \"$line $subroutine $filename\"; thông tin bổ sung này có thể\n" +" được dùng để cung cấp stack trace.\n" +"\n" +" Giá trị của BTHỨC thì ngụ ý bao nhiêu lần gọi cần lùi lại đằng\n" +" trước lệnh gọi hiện tại; khung gọi đầu là khung 0.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại 0 trừ khi hệ vỏ đang chạy hàm hệ vỏ, BTHỨC cũng hợp lệ." -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "Chưa đặt biến môi trường HOME (nhà)" +msgstr "Chưa đặt biến môi trường HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "quá nhiều đối số" + +#: builtins/cd.def:342 +#, fuzzy +msgid "null directory" +msgstr "không có thư mục khác" -#: builtins/cd.def:227 +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "Chưa đặt biến môi trường OLDPWD (mật khẩu cũ)" +msgstr "Chưa đặt biến môi trường OLDPWD" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "dòng %d:" +msgstr "dòng %d: " -#: builtins/common.c:139 error.c:261 +#: builtins/common.c:134 error.c:264 #, c-format msgid "warning: " -msgstr "cảnh báo :" +msgstr "cảnh báo: " -#: builtins/common.c:153 +#: builtins/common.c:148 #, c-format msgid "%s: usage: " -msgstr "%s: sử dụng:" +msgstr "%s: cách 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 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" -msgstr "%s: tùy chọn cần thiết một đối số" +msgstr "%s: tùy chọn cần một đối số" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "%s: cần thiết đối số thuộc số" +msgstr "%s: cần đối số thuộc kiểu số" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s: không tìm thấy" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s: tùy chọn không hợp lệ" -#: builtins/common.c:221 +#: builtins/common.c:223 #, 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 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "« %s »: không phải đồ nhận diện hợp lệ" +msgstr "“%s”: không phải là định danh hợp lệ" -#: builtins/common.c:238 +#: builtins/common.c:240 msgid "invalid octal number" msgstr "số bát phân không hợp lệ" -#: builtins/common.c:240 +#: builtins/common.c:242 msgid "invalid hex number" msgstr "số thập lục không hợp lệ" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" msgstr "số không hợp lệ" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "%s: sai xác định tín hiệu" +msgstr "%s: sai đặc tả tín hiệu" -#: builtins/common.c:257 +#: builtins/common.c:259 #, 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" +msgstr "“%s”: không phải một pid hoặc đặc tả công việc hợp lệ" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" msgstr "%s: biến chỉ đọc" -#: builtins/common.c:272 +#: builtins/common.c:273 +#, fuzzy, c-format +msgid "%s: cannot assign" +msgstr "%s: không thể hủy đặt" + +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" -msgstr "%s: %s ở ngoại phạm vi" +msgstr "%s: %s nằm ngoài phạm vi" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" msgstr "đối số" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" -msgstr "%s ở ngoại phạm vi" +msgstr "%s nằm ngoài phạm vi" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" msgstr "%s: không có công việc như vậy" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s: không có điều khiển công việc" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "không có điều khiển công việc" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" msgstr "%s: bị hạn chế" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" msgstr "bị hạn chế" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" -msgstr "%s: không phải dựng sẵn trình bao" +msgstr "%s: không phải là lệnh tích hợp trong hệ vỏ" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" msgstr "lỗi ghi: %s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, 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" +msgstr "lỗi đặt các thuộc tính thiết bị cuối: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, 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" +msgstr "lỗi lấy các thuộc tính thiết bị cuối: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, 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" +msgstr "%s: lỗi lấy thư mục hiện thời: %s: %s\n" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" -msgstr "%s: đặc tả công việc mơ hồ" +msgstr "%s: đặc tả công việc chưa rõ ràng" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "trợ giúp không sẵn có ở phiên bản này" -#: builtins/complete.def:276 +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: không thể hủy đặt: %s chỉ đọc" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: không thể hủy đặt" + +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" -msgstr "%s: tên hành vi không hợp lệ" +msgstr "%s: tên hành động không hợp lệ" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, c-format msgid "%s: no completion specification" -msgstr "%s: không có đặc tả điền nốt" +msgstr "%s: không có đặc tả tự hoàn thiện" #: 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" +msgstr "cảnh báo: tùy chọn “-F” có thể 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" +msgstr "cảnh báo: tùy chọn “-C” có thể không hoạt động như bạn mong đợi" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "hiện thời không thực thi chức năng điền nốt" +msgstr "hiện thời không thực thi chức năng tự hoàn thiện" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "chỉ có thể được dùng trong một hàm" +msgstr "chỉ có thể dùng trong một hàm" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "không thể dùng « -f » để tạo hàm" +msgstr "không thể dùng “-f” để tạo hàm" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" msgstr "%s: hàm chỉ đọc" -#: builtins/declare.def:468 +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: biến tham chiếu không thể là một mảng" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: biến nameref tự tham chiếu là không được phép" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: tên tham chiếu quẩn tròn" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, fuzzy, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "%s: tên biến không hợp lệ cho một tham chiếu tên" + +#: builtins/declare.def:856 #, 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" +msgstr "%s: không thể hủy biến mảng bằng cách này" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, 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ũ" +msgstr "%s: không thể chuyển đổi mảng kết hợp sang mảng chỉ số" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: gán mảng phức hợp được trích dẫn đã lạc hậu" + +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "không có sẵn chức năng nạp động" +msgstr "không có chức năng nạp động" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, 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 +#: builtins/enable.def:405 #, 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 +#: builtins/enable.def:422 +#, fuzzy, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s không được tải động" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "tải hàm cho %s trả về lỗi nghiêm trọng (%d): nên không được tải" + +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "%s không phải được nạp động" +msgstr "%s không được tải động" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, c-format msgid "%s: cannot delete: %s" -msgstr "%s: không thể xoá: %s" +msgstr "%s: không thể xóa: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" msgstr "%s: là thư mục" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" -msgstr "%s: không phải là tập tin chuẩn" +msgstr "%s: không phải là tập tin thường" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, 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 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, 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 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" -msgstr "%s: không thể thực hiện: %s" +msgstr "%s: không thể thực thi: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" msgstr "đăng xuất\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 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)" +msgstr "không phải hệ vỏ đăng nhập: hãy dùng lệnh “exit”" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "Vẫn có công việc bị dừng.\n" +msgstr "Có công việc bị dừng.\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "Vẫn có công việc đang chạy.\n" +msgstr "Có công việc đang chạy.\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" msgstr "không tìm thấy lệnh" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" msgstr "đặc tả lịch sử" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, c-format msgid "%s: cannot open temp file: %s" -msgstr "%s: không thể mở tập tin tạm thời: %s" +msgstr "%s: không thể mở tập tin tạm: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "hiện thời" +msgstr "hiện tại" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, 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" @@ -439,44 +519,47 @@ 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" +msgstr "%s: tùy chọn cần đối số -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "chức năng tạo ký hiệu lộn xộn bị tắt" +msgstr "tắt băm" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "%s: bảng ký hiệu lộn xộn còn rỗng\n" +msgstr "%s: bảng băm rỗng\n" -#: builtins/hash.def:244 +#: builtins/hash.def:267 #, c-format msgid "hits\tcommand\n" -msgstr "gọi nhớ\tlệnh\n" +msgstr "gợi ý\tlệnh\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 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á `" +msgstr[0] "Câu lệnh hệ vỏ tương ứng với từ khóa “" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" -#: builtins/help.def:168 +#: builtins/help.def:185 #, 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" +"không có trợ giúp cho “%s”. Hãy chạy lệnh “help help” hoặc “man -k %s” hay " +"“info %s”." -#: builtins/help.def:185 +#: builtins/help.def:223 #, c-format msgid "%s: cannot open: %s" -msgstr "%s: không thể mở : %s" +msgstr "%s: không thể mở: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -487,27 +570,33 @@ msgid "" "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" +"Những câu lệnh này được định nghĩa nội bộ. Gõ lệnh “help” để xem danh sách " +"này.\n" +"Gõ “help TÊN” để biết chi tiết về hàm “TÊN”.\n" +"Dùng “info bash” để tìm thông tin chung về hệ vỏ nói chung.\n" +"Dùng “man -k” hoặc “info” để tìm thông tin về lệnh ngoài danh sách này.\n" "\n" -"Dấu sao « * » bên cạnh tên thì ngụ ý nó bị tắt.\n" +"Dấu sao (*) bên cạnh tên nghĩa là lệnh bị tắt.\n" "\n" -#: builtins/history.def:154 +#: builtins/history.def:159 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 »" +msgstr "chỉ có thể dùng một của những tùy chọn -anrw" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" msgstr "vị trí lịch sử" -#: builtins/history.def:365 +#: builtins/history.def:338 +#, fuzzy, c-format +msgid "%s: invalid timestamp" +msgstr "%s: đối số không hợp lệ" + +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" -msgstr "%s: lỗi mở rộng lịch sử" +msgstr "%s: gặp lỗi khi khai triển lịch sử" #: builtins/inlib.def:71 #, c-format @@ -516,95 +605,115 @@ 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 »" +msgstr "không cho phép dùng tùy chọn thêm với “-x”" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, 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" +msgstr "%s: đối số phải là ID tiến trình hoặc công việc" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" msgstr "Lỗi không rõ" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "đợi biểu thức" +msgstr "cần biểu thức" -#: builtins/mapfile.def:165 -#, fuzzy, c-format +#: builtins/mapfile.def:180 +#, c-format msgid "%s: not an indexed array" -msgstr "%s: không phải biến mảng" +msgstr "%s: không phải là mảng chỉ số" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "%s: sai xác định bộ mô tả tập tin" +msgstr "%s: đặc tả bộ mô tả tập tin không hợp lệ" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, 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 +#: builtins/mapfile.def:293 builtins/mapfile.def:331 #, c-format msgid "%s: invalid line count" -msgstr "%s: sai đếm dòng" +msgstr "%s: sai số lượng dòng" -#: builtins/mapfile.def:277 +#: builtins/mapfile.def:304 #, c-format msgid "%s: invalid array origin" msgstr "%s: gốc mảng không hợp lệ" -#: builtins/mapfile.def:294 +#: builtins/mapfile.def:321 #, c-format msgid "%s: invalid callback quantum" msgstr "%s: lượng gọi ngược không hợp lệ" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "%s: tên biến mảng vẫn trống" +msgstr "tên biến mảng vẫn trống" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "cần thiết hỗ trợ biến mảng" +msgstr "cần hỗ trợ biến mảng" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "« %s »: thiếu ký tự định dạng" +msgstr "“%s”: thiếu ký tự định dạng" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "“%c”: đặc tả định dạng thời gian không đúng" -#: builtins/printf.def:551 +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "« %c »: ký tự định dạng không hợp lệ" +msgstr "“%c”: ký tự định dạng không hợp lệ" -#: builtins/printf.def:578 +#: builtins/printf.def:734 #, c-format msgid "warning: %s: %s" -msgstr "cảnh báo : %s: %s" +msgstr "cảnh báo: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "vấn đề phân tích cú pháp định dạng: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "thiếu chữ số thập phân cho \\x" +msgstr "thiếu chữ số thập lục phân cho \\x" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "thiếu chữ số unicode cho \\%c" -#: builtins/pushd.def:195 +#: builtins/pushd.def:199 msgid "no other directory" msgstr "không có thư mục khác" -#: builtins/pushd.def:462 +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: đối số không hợp lệ" + +#: builtins/pushd.def:480 msgid "" msgstr "" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "đống thư mục vẫn trống" +msgstr "ngăn xếp thư mục trống" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "chỉ mục đống thư mục" +msgstr "chỉ số ngăn xếp thư mục" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -627,28 +736,24 @@ msgid "" "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 +"Hiển thị danh sách các thư mục được nhớ hiện thời. Lệnh “pushd” thêm\n" +" thư mục vào danh sách này. “popd” lấy thư mục khỏi danh sách.\n" +"\n" +" Tùy chọn:\n" +" -c\txóa mọi phần tử trong ngăn xếp thư mục\n" +" -l\tkhông in phiên bản thư mục có dấu ngã nằm trước\n" +" \tmà tương ứng với thư mục chính của người dùng\n" +" -p\tin ngăn xếp thư mục mỗi dòng một mục\n" +" -v\tin ngăn xếp thư mục mỗi dòng một mục kèm vị trí trong ngăn xếp\n" +"\n" +" Đối số:\n" +" +N\thiển thị mục thứ N đếm từ bên trái khi gọi không tùy chọn,\n" +" bắt đầu từ số không.\n" +"\n" +" -N\thiển thị mục thứ N đếm từ bên phải khi gọi không tùy chọn,\n" +" bắt đầu từ số không." + +#: builtins/pushd.def:723 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" @@ -672,29 +777,27 @@ msgid "" " \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" +"Thêm thư mục vào trên ngăn xếp thư mục, hoặc xoay ngăn xếp, làm cho thư mục\n" +" hiện thời nằm ở trên đầu. Đổi vị trí hai thư mục trên cùng nếu\n" +" không có đối số.\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" +" Tùy chọn:\n" +" -n\tngăn thay đổi thư mục bình thường khi thêm, chỉ thao tác\n" +" \ttrên ngăn xếp thư mục.\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" +" Đối số:\n" +" +N\txoay ngăn xếp để thư mục thứ N (đếm từ bên trái “dirs”, bắt\n" +" \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\txoay ngăn xếp để thư mục thứ N (đếm từ bên phải “dirs”, bắt\n" +" \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" +" THƯ-MỤC\tthêm THƯ-MỤC vào đầu ngăn xếp thư mục và dùng làm thư mục\n" +" \tlàm việc hiện thời.\n" "\n" -"\tDựng sẵn « dirs » hiển thị đống thư mục." +" Lệnh “dirs” hiển thị ngăn xếp thư mục." -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -714,538 +817,619 @@ msgid "" " \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" +"Gỡ bỏ thư mục khỏi ngăn xếp thư mục. Không đưa ra đối số thì bỏ thư mục\n" +" đầu khỏi ngăn xếp và 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" +" Tùy chọn:\n" +" -n\tngăn thay đổi thư mục bình thường khi thêm, chỉ thao tác\n" +"\t\ttrên ngăn xếp thư mục.\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" +" Đối số:\n" +" +N\txoay ngăn xếp để thư mục thứ N (đếm từ bên trái “dirs”. bắt\n" +" \tđầu từ số không) nằm ở đầu. Ví dụ “popd +0” bỏ thư mục\n" +" đầu tiên, “popd +1” bỏ thư mục thứ hai.\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\txoay ngăn xếp để thư mục thứ N (đếm từ bên phải “dirs”. bắt\n" +" \tđầu từ số không) nằm ở đầu. Ví dụ “popd -0” bỏ thư mục\n" +" cuối cùng, “popd -1” bỏ thư mục kế cuối.\n" "\n" -"\tDựng sẵn « dirs » sẽ hiển thị đống thư mục." +" Lệnh “dirs” hiển thị ngăn xếp thư mục." -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "%s: sai xác định quá hạn" +msgstr "%s: sai đặc tả thời gian chờ tối đa" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" msgstr "lỗi đọc: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 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" +msgstr "chỉ có thể “return” từ một hàm hoặc văn lệnh được “source”" -#: builtins/set.def:768 +#: builtins/set.def:869 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 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" msgstr "%s: không phải biến mảng" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" msgstr "%s: không phải hàm" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: không thể xuất" + +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "đếm dời" +msgstr "số lượng dịch" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 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" +msgstr "không thể đồng thời đặt và hủy đặt các tùy chọn hệ vỏ" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "%s: tên tùy chọn trình bao không hợp lệ" +msgstr "%s: tên tùy chọn hệ vỏ 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" +msgstr "cần đối số tên tập tin" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" msgstr "%s: không tìm thấy tập tin" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" msgstr "không thể ngưng" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "không thể ngưng trình bao đăng nhập" +msgstr "không thể ngưng hệ vỏ đăng nhập" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "%s có bí danh tới « %s »\n" +msgstr "%s là bí danh của “%s”\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "%s là từ khoá trình bao\n" +msgstr "%s là từ khóa của hệ vỏ\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" -msgstr "%s là hàm\n" +msgstr "%s là một hàm\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s là lệnh tích hợp đặc biệt của hệ vỏ\n" -#: builtins/type.def:296 +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "%s là dựng sẵn trình bao\n" +msgstr "%s là lệnh tích hợp hệ vỏ\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" msgstr "%s là %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "%s có ký hiệu lộn xộn (%s)\n" +msgstr "%s được băm (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" msgstr "%s: đối số giới hạn không hợp lệ" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "« %c »: câu lệnh sai" +msgstr "“%c”: câu lệnh sai" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" msgstr "%s: không thể lấy giới hạn: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" msgstr "giới hạn" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, 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 +#: builtins/umask.def:115 msgid "octal number" msgstr "số bát phân" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "« %c »: toán từ chế độ tượng trưng không hợp lệ" +msgstr "“%c”: toán tử chế độ ký hiệu không hợp lệ" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "« %c »: ký tự chế độ tượng trưng không hợp lệ" +msgstr "“%c”: ký tự chế độ ký hiệu không hợp lệ" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "dòng" +msgstr " dòng " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" -msgstr "câu lệnh cuối cùng: %s\n" +msgstr "lệnh cuối: %s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "Hủy bỏ..." +msgstr "Hủy bỏ…" -#: error.c:406 +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "THBÁO:" + +#: error.c:310 +#, fuzzy, c-format +msgid "DEBUG warning: " +msgstr "cảnh báo: " + +#: error.c:488 msgid "unknown command error" msgstr "lỗi lệnh không rõ" -#: error.c:407 +#: error.c:489 msgid "bad command type" msgstr "kiểu lệnh sai" -#: error.c:408 +#: error.c:490 msgid "bad connector" msgstr "bộ kết nối sai" -#: error.c:409 +#: error.c:491 msgid "bad jump" -msgstr "sai nhảy" +msgstr "nhảy sai" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "%s: biến chưa tổ hợp" +msgstr "%s: biến chưa liên kết" -#: 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" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\aquá thời hạn đợi dữ liệu nhập: tự động đăng xuất\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, 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" +msgstr "không thể chuyển hướng đầu vào chuẩn từ /dev/null: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, 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ệ" +msgstr "ĐỊNH DẠNG THỜI GIAN: “%c”: ký tự định dạng không hợp lệ" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "" -#: execute_cmd.c:2075 +#: execute_cmd.c:2524 msgid "pipe error" msgstr "lỗi ống dẫn" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: vượt quá mức độ eval lồng nhau tối đa (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: vượt quá mức độ nguồn lồng nhau tối đa (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: vượt quá mức độ các hàm lồng nhau tối đa (%d)" + +#: execute_cmd.c:5598 #, 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" +msgstr "%s: bị hạn chế: không thể dùng “/” trong tên lệnh" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" msgstr "%s: không tìm thấy lệnh" -#: execute_cmd.c:4827 +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, fuzzy, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: không thể thực hiện tập tin nhị phân" + +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" msgstr "%s: %s: bộ thông dịch sai" -#: execute_cmd.c:4976 +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: không thể thực hiện tập tin nhị phân: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "“%s”: là lệnh tích hợp đặc biệt" + +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "không thể nhân đôi fd %d tới fd %d" +msgstr "không thể nhân đôi fd %d thành fd %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "vượt quá giới hạn mức độ đệ quy của biểu thức" +msgstr "vượt quá ngưỡng đệ quy của biểu thức" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" -msgstr "trán ngược đống đệ quy" +msgstr "tràn ngược ngăn xếp đệ quy" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" msgstr "lỗi cú pháp trong biểu thức" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "thử gán cho đồ không phải biến" +msgstr "thử gán cho thứ không phải biến" + +#: expr.c:531 +#, fuzzy +msgid "syntax error in variable assignment" +msgstr "lỗi cú pháp trong biểu thức" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:545 expr.c:912 msgid "division by 0" msgstr "chia cho không" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "lỗi (bug): hiệu bài ấn định biểu thức sai" +msgstr "lỗi: “token expassign” sai" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "đợi dấu hai chấm « : » cho biểu thức điều kiện" +msgstr "cần “:” cho biểu thức điều kiện" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" msgstr "số mũ nhỏ hơn 0" -#: expr.c:826 +#: expr.c:1030 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" +msgstr "cần định danh sau tăng/giảm dần trước" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "thiếu dấu ngoặc đóng « ) »" +msgstr "thiếu “)”" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "lỗi cú pháp: đợi toán hạng" +msgstr "lỗi cú pháp: cần toán hạng" -#: expr.c:1178 +#: expr.c:1494 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 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "%s%s%s: %s (hiệu bài lỗi là « %s »)" +msgstr "%s%s%s: %s (thẻ bài lỗi là \"%s\")" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "cơ số (số học) không hợp lệ" +msgstr "cơ số (toán học) không hợp lệ" -#: expr.c:1280 +#: expr.c:1587 +#, fuzzy +msgid "invalid integer constant" +msgstr "%s: sai số lượng dòng" + +#: expr.c:1603 msgid "value too great for base" msgstr "cơ số có giá trị quá lớn" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" msgstr "%s: lỗi biểu thức\n" -#: general.c:61 +#: general.c:70 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 +#: input.c:99 subst.c:6208 #, 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" +msgstr "không thể đặt lại chế độ “nodelay” cho fd %d" -#: input.c:258 +#: input.c:266 #, 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" +msgstr "không thể cấp phát bộ mô tả tập tin mới cho dữ liệu nhập bash từ fd %d" -#: input.c:266 +#: input.c:274 #, 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 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" msgstr "start_pipeline: pgrp pipe" -#: jobs.c:887 +#: jobs.c:907 #, 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" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" -#: jobs.c:1005 +#: jobs.c:960 #, 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" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "add_process: tiến trình %5ld (%s) trong the_pipeline" +msgid "forked pid %d appears in running job %d" +msgstr "pid được tánh nhánh %d có vẻ đang chạy trong công việc %d" -#: jobs.c:1113 +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "đang xóa công việc bị dừng chạy %d với nhóm tiến trình %ld" + +#: jobs.c:1502 #, 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 +#: jobs.c:1839 #, 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" +msgstr "describe_pid: %ld: không có pid như vậy" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" msgstr "Tín hiệu %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "Hoàn tất" +msgstr "Xong" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" msgstr "Bị dừng" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" msgstr "Bị dừng(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" msgstr "Đang chạy" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "Hoàn tất(%d)" +msgstr "Xong(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" msgstr "Thoát %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" msgstr "Không rõ trạng thái" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "(lõi bị đổ)" +msgstr "(xuất ra core)" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" msgstr " (wd: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, 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 +#: jobs.c:2608 nojobs.c:666 #, 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" +msgstr "wait: pid %ld không phải là tiến trình con của hệ vỏ này" -#: jobs.c:2331 +#: jobs.c:2884 #, 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 +#: jobs.c:3223 #, 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 +#: jobs.c:3551 +#, fuzzy, c-format +msgid "%s: no current jobs" +msgstr "%s: không có công việc như vậy" + +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" msgstr "%s: công việc bị chấm dứt" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "%s: công việc %d đã chạy trong nền" +msgstr "%s: công việc %d đã đang chạy nền" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: đang bật WNOHANG để tránh bị chặn vô hạn" -#: jobs.c:3508 +#: jobs.c:4307 #, c-format msgid "%s: line %d: " -msgstr "%s: dòng %d:" +msgstr "%s: dòng %d: " -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr " (lõi bị đổ)" +msgstr " (xuất ra core)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "(wd bây giờ: %s)\n" +msgstr "(wd ngay: %s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" msgstr "initialize_job_control: getpgrp bị lỗi" -#: jobs.c:3639 +#: jobs.c:4434 +#, fuzzy +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: kỷ luật dòng" + +#: jobs.c:4450 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 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, 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 +#: jobs.c:4495 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" +msgstr "không có điều khiển công việc trong hệ vỏ này" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "malloc (cấp phát bộ nhớ): lỗi khẳng định: %s\n" +msgstr "malloc: khẳng định gặp lỗi: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, 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" +"malloc: %s:%d: khẳng định bị sai\r\n" -#: lib/malloc/malloc.c:313 +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" msgstr "không rõ" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 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" +"trống bị ghi vào" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "free: đã được gọi với đối số khối đã giải phỏng" +msgstr "free: đã được gọi với đối số khối đã được giải phóng" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 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 +#: lib/malloc/malloc.c:1001 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 +#: lib/malloc/malloc.c:1007 +#, fuzzy +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: phát hiện sự tràn ngược; mh_nbytes ở ngoại phạm vi" + +#: lib/malloc/malloc.c:1014 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 +#: lib/malloc/malloc.c:1176 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 +#: lib/malloc/malloc.c:1191 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" +msgstr "realloc: phát hiện sự tràn ngược; mh_nbytes nằm ngoài phạm vi cho phép" + +#: lib/malloc/malloc.c:1197 +#, fuzzy +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: phát hiện sự tràn ngược; mh_nbytes nằm ngoài phạm vi cho phép" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1205 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 +#: lib/malloc/table.c:191 #, 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 +#: lib/malloc/table.c:200 #, 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" +msgstr "register_alloc: %p đã có trong bảng như được cấp phát?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, 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" +msgstr "register_free: %p đã có trong bảng như còn trống?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" msgstr "cơ số không hợp lệ" @@ -1264,309 +1448,355 @@ msgstr "%s: dịch vụ không hợp lệ" msgid "%s: bad network path specification" msgstr "%s: đặc tả đường dẫn mạng sai" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" msgstr "không hỗ trợ thao tác mạng" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: không thể chuyển đổi miền địa phương (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: không thể chuyển đổi miền địa phương (%s): %s" -#: locale.c:247 -#, fuzzy, c-format +#: locale.c:294 +#, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "xrealloc: %s:%d: không thể cấp phát %lu byte" +msgstr "setlocale: %s: không thể chuyển đổi miền địa phương (%s)" -#: locale.c:249 -#, fuzzy, c-format +#: locale.c:296 +#, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "xrealloc: %s:%d: không thể cấp phát %lu byte" +msgstr "setlocale: %s: không thể chuyển đổi miền địa phương (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "Bạn có thư trong $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "Bạn có thư mới trong $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" -msgstr "Thư tín trong %s đã được đọc\n" +msgstr "Đã đọc thư trong %s\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "lỗi cú pháp: cần thiết biểu thức số học" +msgstr "lỗi cú pháp: cần biểu thức số học" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "lỗi cú pháp: dấu chấm phẩy « ; » bất thường" +msgstr "lỗi cú pháp: gặp dấu chấm phẩy “;” bất thường" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "lỗi cú pháp: `((%s))'" +msgstr "lỗi cú pháp: “((%s))”" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document: kiểu chỉ dẫn sai %d" +msgstr "make_here_document: kiểu chỉ lệnh sai %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, 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 »)" +msgstr "tài liệu này ở dòng %d định giới bằng kết thúc tập tin (muốn “%s”)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, 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" +msgstr "make_redirection: chỉ dẫn chuyển hướng “%d” nằm ngoài phạm vi" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "" +"shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line " +"truncated" +msgstr "" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "vượt quá số lượng tài-liệu-đây tối đa" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, 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" +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 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "gặp kết thúc tập tin bất thường trong khi tìm « ]] »" +msgstr "gặp kết thúc tập tin bất thường trong khi tìm “]]”" -#: parse.y:3956 +#: parse.y:4457 #, 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 »" +msgstr "gặp lỗi cú pháp trong biểu thức điều kiện: thẻ bài bất thường “%s”" -#: parse.y:3960 +#: parse.y:4461 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 +#: parse.y:4539 #, 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 « ) »" +msgstr "gặp thẻ bài bất thường “%s”, cần “)”" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" -msgstr "đợi dấu đóng ngoặc « ) »" +msgstr "cần “)”" -#: parse.y:4070 +#: parse.y:4571 #, 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" +msgstr "đối số bất thường “%s” cho toán tử một ngôi điều kiện" -#: parse.y:4074 +#: parse.y:4575 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" +msgstr "đối số bất thường cho toán tử một ngôi điều kiện" -#: parse.y:4120 +#: parse.y:4621 #, 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" +msgstr "thẻ bài bất thường “%s”, cần toán tử hai ngôi điều kiện" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "đợi toán tử nhị phân điều kiện" +msgstr "cần toán tử hai ngôi điều kiện" -#: parse.y:4146 +#: parse.y:4647 #, 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" +msgstr "đối số bất thường “%s” cho toán tử hai ngôi điều kiện" -#: parse.y:4150 +#: parse.y:4651 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" +msgstr "đối số bất thường cho toán tử hai ngôi điều kiện" -#: parse.y:4161 +#: parse.y:4662 #, 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" +msgstr "gặp thẻ bài bất thường “%c” trong câu lệnh điều kiện" -#: parse.y:4164 +#: parse.y:4665 #, 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" +msgstr "gặp thẻ bài bất thường “%s” trong câu lệnh điều kiện" -#: parse.y:4168 +#: parse.y:4669 #, 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" +msgstr "gặp thẻ bài bất thường “%d” trong câu lệnh điều kiện" -#: parse.y:5459 +#: parse.y:6118 #, 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 »" +msgstr "có lỗi cú pháp ở gần thẻ bài bất thường “%s”" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "gặp lỗi cú pháp gần « %s »" +msgstr "lỗi cú pháp ở gần “%s”" -#: parse.y:5487 +#: parse.y:6151 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 +#: parse.y:6151 msgid "syntax error" msgstr "lỗi cú pháp" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "Dùng « %s » để rời trình bao.\n" +msgstr "Dùng \"%s\" để rời hệ vỏ.\n" -#: parse.y:5711 +#: parse.y:6394 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" +msgstr "gặp kết thúc tập tin bất thường trong khi tìm “)” tương ứng" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "completion: không tìm thấy hàm « %s »" +msgstr "tự hoàn thiện: không tìm thấy hàm “%s”" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" msgstr "progcomp_insert: %s: NULL COMPSPEC" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "print_command: bộ kết nối sai « %d »" +msgstr "print_command: bộ kết nối sai “%d”" -#: print_cmd.c:363 -#, fuzzy, c-format +#: print_cmd.c:375 +#, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "%d: bộ mô tả tập tin không hợp lệ: %s" +msgstr "xtrace_set: %d: sai bộ mô tả tập tin" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: con trỏ tập tin NULL" -#: print_cmd.c:372 +# Nghĩa chữ ? +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "cprintf: « %c »: ký tự định dạng không hợp lệ" +msgstr "cprintf: “%c”: ký tự định dạng không hợp lệ" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" msgstr "bộ mô tả tập tin ở ngoại phạm vi" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" -msgstr "%s: lời chuyển hướng mơ hồ" +msgstr "%s: chuyển hướng chưa rõ ràng" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" msgstr "%s: không thể ghi đè lên tập tin đã có" -#: redir.c:175 +#: redir.c:214 #, 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 +#: redir.c:219 #, 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 +#: redir.c:223 +#, 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" +msgstr "%s: không thể gán fd vào biến" -#: redir.c:544 +#: redir.c:650 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" +msgstr "/dev/(tcp|udp)/host/port không được hỗ trợ nếu không có mạng" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "gặp lỗi chuyển hướng nên không thể nhân đôi fd" +msgstr "lỗi chuyển hướng: không thể nhân đôi fd" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "không tìm thấy « /tmp », hãy tạo." +msgstr "không tìm thấy /tmp, hãy tạo mới!" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "« /tmp » phải là tên thư mục hợp lệ" +msgstr "“/tmp” phải là tên thư mục hợp lệ" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c: tùy chọn không hợp lệ" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "không thể đặt uid thành %d: uid chịu tác động %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "không thể đặt gid thành %d: gid chịu tác động %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: Là một thư mục" + +#: shell.c:1907 msgid "I have no name!" -msgstr "Không có tên." +msgstr "Không có tên!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "bash của GNU, phiên bản %s-(%s)\n" +msgstr "GNU bash, phiên bản %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"Cách dùng:\t%s [tùy chọn GNU dài] [tùy chọn] …\n" +"\t\t%s [tùy chọn GNU dài] [tùy chọn] tập-tin-văn-lệnh …\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" -msgstr "Tùy chọn GNU dài:\n" +msgstr "Tùy chọn dài:\n" -#: shell.c:1800 +#: shell.c:2068 msgid "Shell options:\n" -msgstr "Tùy chọn trình bao :\n" +msgstr "Tùy chọn:\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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD hoặc -c lệnh hay -O tùy-chọn-ngắn\t\t(chỉ gọi)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" -msgstr "\t-%s hoặc -o tùy chọn\n" +msgstr "\t-%s hoặc -o tùy-chọn\n" -#: shell.c:1822 +#: shell.c:2094 #, 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" +msgstr "Gõ “%s -c \"help set\"” để xem thông tin về các tùy chọn hệ vỏ.\n" -#: shell.c:1823 +#: shell.c:2095 #, 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" +msgstr "Gõ “%s -c help” để xem thông tin về các lệnh hệ vỏ tích hợp.\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "Dùng lệnh « bashbug » để thông báo lỗi.\n" +msgstr "" +"Dùng lệnh “bashbug” để thông báo lỗi.\n" +"Báo cáo các lỗi dịch cho: .\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "Trang chủ bash: \n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "" +"Trợ giúp chung về cách sử dụng phần mềm GNU : \n" -#: sig.c:626 +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" msgstr "sigprocmask: %d: thao tác không hợp lệ" @@ -1577,11 +1807,11 @@ msgstr "Tín hiệu giả" #: siglist.c:51 msgid "Hangup" -msgstr "Treo máy" +msgstr "Treo" #: siglist.c:55 msgid "Interrupt" -msgstr "Gián đoạn" +msgstr "Ngắt" #: siglist.c:59 msgid "Quit" @@ -1605,7 +1835,7 @@ msgstr "Câu lệnh EMT" #: siglist.c:83 msgid "Floating point exception" -msgstr "Ngoại lệ chấm động" +msgstr "Lỗi dấu chấm động" #: siglist.c:87 msgid "Killed" @@ -1613,19 +1843,19 @@ msgstr "Bị giết" #: siglist.c:91 msgid "Bus error" -msgstr "lỗi mạch nối" +msgstr "Lỗi bus" #: siglist.c:95 msgid "Segmentation fault" -msgstr "Lỗi chia ra từng đoạn" +msgstr "Lỗi phân đoạn" #: siglist.c:99 msgid "Bad system call" -msgstr "Sai gọi hệ thống" +msgstr "Lỗi lệnh gọi hệ thống" #: siglist.c:103 msgid "Broken pipe" -msgstr "Ống dẫn bị hỏng" +msgstr "Ống dẫn hỏng" #: siglist.c:107 msgid "Alarm clock" @@ -1637,7 +1867,7 @@ msgstr "Bị chấm dứt" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "Điều kiện VR gấp" +msgstr "Điều kiện IO gấp" #: siglist.c:119 msgid "Stopped (signal)" @@ -1661,7 +1891,7 @@ msgstr "Bị dừng (tty xuất)" #: siglist.c:147 msgid "I/O ready" -msgstr "V/R sẵn sàng" +msgstr "I/O sẵn sàng" #: siglist.c:151 msgid "CPU limit" @@ -1685,7 +1915,7 @@ msgstr "Cửa sổ bị thay đổi" #: siglist.c:171 msgid "Record lock" -msgstr "Mục ghi bị khoá" +msgstr "Khóa bản ghi" #: siglist.c:175 msgid "User signal 1" @@ -1701,7 +1931,7 @@ 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" +msgstr "sắp bị mất điện đột ngột" #: siglist.c:191 msgid "system crash imminent" @@ -1731,648 +1961,661 @@ msgstr "Đã hoàn thành chuỗi âm thanh HFT" 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 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "Không rõ tín hiệu #%d" +msgstr "Tín hiệu lạ #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "sai thay thế: không có « %s » đóng trong %s" +msgstr "sai chỉ số phụ: không có đóng “%s” trong %s" -#: subst.c:2735 +#: subst.c:3307 #, 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 +#: subst.c:6048 subst.c:6064 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 +#: subst.c:6124 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 +#: subst.c:6198 #, 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 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "không thể mở ống dẫn đặt tên %s để ghi" +msgstr "không thể mở ống dẫn có tên %s để ghi" -#: subst.c:4867 +#: subst.c:6223 #, 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 +#: subst.c:6370 +#, fuzzy +msgid "command substitution: ignored null byte in input" +msgstr "sai thay thế: không có \"“\" đóng trong %s" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" msgstr "không thể tạo ống dẫn để thay thế lệnh" -#: subst.c:5097 +#: subst.c:6580 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 +#: subst.c:6613 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 +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: tên biến không hợp lệ cho một tham chiếu tên" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: triển khai gián tiếp không hợp lệ" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "“%s”: tên biến không hợp lệ" + +#: subst.c:7478 +#, fuzzy, c-format +msgid "%s: parameter not set" +msgstr "%s: tham số null hoặc chưa được đặt" + +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "%s: tham số vô giá trị hoặc chưa được đặt" +msgstr "%s: tham số null hoặc chưa được đặt" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "%s: biểu thức chuỗi phụ < 0" +msgstr "%s: biểu thức chuỗi con < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "%s: sai thay thế" +msgstr "%s: thay thế sai" -#: subst.c:7045 +#: subst.c:9678 #, 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 +#: subst.c:10111 msgid "" "future versions of the shell will force evaluation as an arithmetic " "substitution" msgstr "" +"phiên bản hệ vỏ mới sẽ ép buộc ước lượng dưới dạng một hàm thay thế số học" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "sai thay thế: không có « ` » đóng trong %s" +msgstr "sai thay thế: không có \"“\" đóng trong %s" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" msgstr "không khớp: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "mong đợi đối số" +msgstr "cần đối số" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "%s: đợi biểu thức số nguyên" +msgstr "%s: cần biểu thức số nguyên" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "đợi dấu ngoặc đóng « ) »" +msgstr "cần “)”" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "đợi dấu ngoặc đóng « ) », còn tìm %s" +msgstr "cần “)” nhưng lại nhận được %s" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" -msgstr "%s: đợi toán tử nguyên phân" +msgid "%s: binary operator expected" +msgstr "%s: cần toán tử hai ngôi" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" -msgstr "%s: đợi toán tử nhị phân" +msgid "%s: unary operator expected" +msgstr "%s: cần toán tử một ngôi" -#: test.c:811 +#: test.c:896 msgid "missing `]'" -msgstr "thiếu dấu ngoặc vụ đóng « ] »" +msgstr "thiếu “]”" -#: trap.c:203 +#: test.c:914 +#, fuzzy, c-format +msgid "syntax error: `%s' unexpected" +msgstr "lỗi cú pháp: gặp dấu chấm phẩy “;” bất thường" + +#: trap.c:220 msgid "invalid signal number" msgstr "số thứ tự tín hiệu không hợp lệ" -#: trap.c:327 +#: trap.c:323 +#, fuzzy, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "eval: vượt quá mức độ eval lồng nhau tối đa (%d)" + +#: trap.c:412 #, 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 +#: trap.c:416 #, 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" +"chính mình" -#: trap.c:380 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" msgstr "trap_handler: tín hiệu sai %d" -#: variables.c:363 +#: variables.c:424 #, 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 »" +msgstr "gặp lỗi khi nhập vào định nghĩa hàm cho “%s”" -#: variables.c:748 +#: variables.c:838 #, 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" +msgstr "cấp hệ vỏ (%d) quá cao nên đặt lại thành 1" -#: variables.c:1915 +#: variables.c:2642 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 +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: không thể gán giá trị cho biến" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "" + +#: variables.c:3459 +#, fuzzy, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: tên biến không hợp lệ cho một tham chiếu tên" + +#: variables.c:4390 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 +#: variables.c:4757 +#, c-format msgid "%s has null exportstr" -msgstr "%s: tham số vô giá trị hoặc chưa được đặt" +msgstr "%s có exportstr null" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "sai ký tự %d trong chuỗi exportstr cho %s" +msgstr "sai ký tự %d trong exportstr cho %s" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "không có dấu bằng « = » trong chuỗi exportstr cho %s" +msgstr "không có “=” trong exportstr cho %s" -#: variables.c:3835 +#: variables.c:5317 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" +"pop_var_context: đầu của shell_variables (các biến hệ vỏ) không phải là ngữ " +"cảnh hàm" -#: variables.c:3848 +#: variables.c:5330 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 +#: variables.c:5410 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" +"pop_scope: đầu của shell_variables (các biến hệ vỏ) không phải là phạm vi " +"môi trường tạm thời" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s: không thể mở : %s" +msgstr "%s: %s: không thể mở như là TẬP-TIN" -#: variables.c:4683 -#, fuzzy, c-format +#: variables.c:6405 +#, 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" +msgstr "%s: %s: sai đặt giá trị cho bộ mô tả tập tin vết" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: giá trị so sánh nằm ngoài phạm vi" -#: 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:46 version2.c:46 +#, fuzzy +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Tác quyền (C) năm 2014 của Tổ chức Quỹ Phần mềm Tự do, Inc." -#: version.c:47 +#: version.c:47 version2.c:47 msgid "" "License GPLv3+: GNU GPL version 3 or later \n" msgstr "" -"Giấy phép GPLv3+: Giấy Phép Công Cộng GNU phiên bản 3 hay sau \n" +"Giấy phép GPLv3+: GNU GPL phiên bản 3 hoặc mới hơn \n" -#: version.c:86 version2.c:83 +#: version.c:86 version2.c:86 #, 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" +msgstr "GNU bash, phiên bản %s (%s)\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" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "Đây là phần mềm tự do; bạn có quyền sửa đổi và phát hành lại 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." +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "Ở đây KHÔNG BẢO HÀNH GÌ CẢ, với điều kiện được pháp luật cho phép." -#: version2.c:87 -#, fuzzy, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" -"Giấy phép GPLv3+: Giấy Phép Công Cộng GNU phiên bản 3 hay sau \n" - -#: xmalloc.c:91 -#, fuzzy, c-format +#: xmalloc.c:93 +#, 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)" +msgstr "%s: không thể cấp phát %lu byte (%lu byte được cấp phát)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "xmalloc: không thể cấp phát %lu byte" +msgstr "%s: không thể cấp phát %lu byte" -#: xmalloc.c:163 -#, fuzzy, c-format +#: xmalloc.c:165 +#, 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)" +msgstr "%s: %s:%d: không thể cấp phát %lu byte (%lu byte được cấp phát)" -#: xmalloc.c:165 -#, fuzzy, c-format +#: xmalloc.c:167 +#, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "xmalloc: %s:%d: không thể cấp phát %lu byte" +msgstr "%s: %s:%d: không thể cấp phát %lu byte" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "alias [-p] [tên[=giá-trị] ... ]" +msgstr "alias [-p] [TÊN[=GIÁ-TRỊ] … ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "unalias [-a] tên [tên ...]" +msgstr "unalias [-a] TÊN [TÊN …]" -#: builtins.c:51 +#: builtins.c:53 msgid "" -"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-" +"bind [-lpsvPSVX] [-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]" +"bind [-lpvsPVSX] [-m SƠ-ĐỒ-PHÍM] [-f TẬP-TIN] [-q TÊN] [-u TÊN] [-r DÃY-" +"PHÍM] [-x DÃY-PHÍM:LỆNH] [DÃY-PHÍM:HÀM-READLINE hay LỆNH-READLINE]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "tiếp tục [n]" +msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "builtin [shell-builtin [arg ...]]" +msgstr "builtin [SHELL-BUILTIN [ĐỐI-SỐ …]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "caller [b_thức]" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "cd [-L|-P] [tmục]" +msgstr "caller [BTHỨC]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "pwd [-LP]" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]]] [-@]] [THƯ-MỤC]" #: 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 ...]" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "declare [-aAfFilrtux] [-p] [tên[=giá_trị] ...]" +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] LỆNH [Đ.SỐ …]" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "typeset [-aAfFilrtux] [-p] tên[=giá_trị] ..." +#, fuzzy +msgid "" +"declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] " +"[name ...]" +msgstr "declare [-aAfFgilnrtux] [-p] [TÊN[=GIÁ-TRỊ] …]" #: builtins.c:80 +#, fuzzy +msgid "" +"typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] " +"[name ...]" +msgstr "typeset [-aAfFgilnrtux] [-p] TÊN[=GIÁ-TRỊ] …" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "local [tùy_chọn] tên[=giá_trị] ..." +msgstr "local [tùy_chọn] TÊN[=GIÁ-TRỊ] …" -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "echo [-neE] [đối_số ...]" +msgstr "echo [-neE] [Đ.SỐ …]" -#: builtins.c:87 +#: builtins.c:89 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 ...]" +msgstr "echo [-n] [Đ.SỐ …]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "eval [đối_số ...]" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f TẬP-TIN] [TÊN …]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "getopts chuỗi_tùy_chọn tên [đối_số]" +msgid "eval [arg ...]" +msgstr "eval [Đ.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 ...]" +#, fuzzy +msgid "getopts optstring name [arg ...]" +msgstr "getopts CHUỖI-TÙY-CHỌN TÊN [Đ.SỐ]" #: builtins.c:98 +#, fuzzy +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a TÊN] [LỆNH [ĐỐI-SỐ …]] [CHUYỂN-HƯỚNG …]" + +#: builtins.c:100 msgid "exit [n]" msgstr "exit [n]" -#: builtins.c:100 +#: builtins.c:102 msgid "logout [n]" -msgstr "đăng xuất [n]" +msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 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]" +msgstr "fc [-e ENAME] [-lnr] [ĐẦU] [CUỐI] hoặc fc -s [MẪU=LẶP_LẠI] [LỆNH]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "fg [đặc_tả_công_việc]" +msgstr "fg [ĐTCV]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "bg [đặc_tả_công_việc ...]" +msgstr "bg [ĐTCV …]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "hash [-lr] [-p đường_dẫn] [-dt] [tên ...]" +msgstr "hash [-lr] [-p ĐƯỜNG-DẪN] [-dt] [TÊN …]" -#: builtins.c:117 -#, fuzzy +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "help [-ds] [mẫu ...]" +msgstr "help [-dms] [MẪU …]" -#: builtins.c:121 +#: builtins.c:123 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ố...]" +"history [-c] [-d OFFSET] [n] hay history -anrw [T.TIN] hay history -ps Đ.SỐ " +"[Đ.SỐ…]" -#: builtins.c:125 +#: builtins.c:127 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ố]" +msgstr "jobs [-lnprs] [ĐTCV …] hoặc jobs -x LỆNH [ĐỐI-SỐ]" -#: builtins.c:129 -msgid "disown [-h] [-ar] [jobspec ...]" -msgstr "disown [-h] [-ar] [đặc_tả_công_việc ...]" +#: builtins.c:131 +#, fuzzy +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [ĐTCV …]" -#: builtins.c:132 +#: builtins.c:134 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]" +"kill [-s ĐTTH | -n số_tín_hiệu | -ĐTTH] pid | ĐTCV … hoặc kill -l [ĐTTH]" -#: builtins.c:134 +#: builtins.c:136 msgid "let arg [arg ...]" -msgstr "let đối_số [đối_số ...]" +msgstr "let ĐỐI-SỐ [ĐỐI-SỐ …]" -#: builtins.c:136 -#, fuzzy +#: builtins.c:138 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 ...]" +"read [-ers] [-a MẢNG] [-d GIỚI-HẠN] [-i VĂN-BẢN] [-n SỐ-KÝ-TỰ] [-N SỐ-KÝ-TỰ] " +"[-p NHẮC] [-t THỜI-HẠN] [-u fd] [TÊN …]" # nghĩa chữ -#: builtins.c:138 +#: builtins.c:140 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 ...]" +#, fuzzy +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCHP] [-o TÊN-TÙY-CHỌN] [--] [ĐỐI-SỐ …]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" -"export [-fn] [tên[=giá_trị] ...]\n" -"\thay\n" -"export -p" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [TÊN …]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" -"readonly [-af] [tên[=giá_trị] ...]\n" -"\thay\n" -"readonly -p" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [TÊN[=GIÁ-TRỊ] …] hoặc export -p" #: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [TÊN[=GIÁ-TRỊ] …] hay readonly -p" + +#: builtins.c:150 msgid "shift [n]" msgstr "shift [n]" -#: builtins.c:150 +#: builtins.c:152 msgid "source filename [arguments]" -msgstr "nguồn tên_tập_tin [đối_số ...]" +msgstr "source TẬP-TIN [ĐỐI-SỐ …]" -#: builtins.c:152 +#: builtins.c:154 msgid ". filename [arguments]" -msgstr ". tên_tập_tin [đối_số ...]" +msgstr ". TẬP-TIN [ĐỐI-SỐ …]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" -msgstr "ngưng [-f]" - -#: builtins.c:158 -msgid "test [expr]" -msgstr "test [b_thức]" +msgstr "suspend [-f]" #: builtins.c:160 -msgid "[ arg... ]" -msgstr "[ đối_số ... ]" +msgid "test [expr]" +msgstr "test [BTHỨC]" #: builtins.c:162 -msgid "times" -msgstr "lần" +msgid "[ arg... ]" +msgstr "[ Đ.SỐ … ]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "trap [-lp] [[đối_số] đặc_tả_tín_hiệu ...]" +msgstr "trap [-lp] [[Đ.SỐ] ĐTTH …]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "type [-afptP] tên [tên ...]" +msgstr "type [-afptP] TÊN [TÊN …]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "ulimit [-SHacdefilmnpqrstuvx] [giới_hạn]" +#: builtins.c:171 +#, fuzzy +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPT] [GIỚI-HẠN]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "umask [-p] [-S] [chế_độ]" +msgstr "umask [-p] [-S] [CHẾ-ĐỘ]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "đợi [id]" +#: builtins.c:177 +#, fuzzy +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-n] [id …]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "đợi [pid]" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid …]" -#: builtins.c:182 +#: builtins.c:184 msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "for TÊN [in CÁC-TỪ ... ;] do các_CÂU_LỆNH; done" +msgstr "for TÊN [in TỪ… ;] do CÁC;CÂU;LỆNH; done" -#: builtins.c:184 +#: builtins.c:186 msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "for (( exp1; exp2; exp3 )); do các_CÂU_LỆNH; done" +msgstr "for (( BTHỨC1; BTHỨC2; BTHỨC3 )); do CÁC;CÂU;LỆNH; done" -#: builtins.c:186 +#: builtins.c:188 msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "select TÊN [in CÁC-TỪ ... ;] do các_CÂU_LỆNH; done" +msgstr "select TÊN [in CÁC TỪ … ;] do CÁC;CÂU;LỆNH; done" -#: builtins.c:188 +#: builtins.c:190 msgid "time [-p] pipeline" -msgstr "thời hạn [-p] ống dẫn" +msgstr "time [-p] ỐNG-DẪN" -#: builtins.c:190 +#: builtins.c:192 msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "case TỪ in [MẪU [| MẪU]...) các_CÂU_LỆNH ;;]... esac" +msgstr "case TỪ in [MẪU [| MẪU]…) CÁC;CÂU;LỆNH;;]… esac" -#: builtins.c:192 +#: builtins.c:194 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" +"if 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:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "until các_CÂU_LỆNH; do các_CÂU_LỆNH; done" +#, fuzzy +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while 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]" +#, fuzzy +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until CÁC;CÂU;LỆNH; do CÁC;CÂU;LỆNH; done" #: 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 ; }" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [TÊN] LỆNH [CHUYỂN-HƯỚNG]" #: builtins.c:202 -msgid "{ COMMANDS ; }" -msgstr "{ các_CÂU_LỆNH ; }" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function TÊN { CÁC;CÂU;LỆNH; } or TÊN () { CÁC;CÂU;LỆNH; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "đặc_tả_công_việc [&]" +msgid "{ COMMANDS ; }" +msgstr "{ CÁC;CÂU;LỆNH ; }" #: builtins.c:206 -msgid "(( expression ))" -msgstr "(( biểu_thức ))" +msgid "job_spec [&]" +msgstr "ĐTCV [&]" #: builtins.c:208 -msgid "[[ expression ]]" -msgstr "[[ biểu_thức ]]" +msgid "(( expression ))" +msgstr "(( BTHỨC ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ BTHỨC ]]" + +#: builtins.c:212 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" +msgstr "biến — tên và nghĩa của một số biến hệ vỏ" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" msgstr "pushd [-n] [+N | -N | tmục]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "shopt [-pqsu] [-o] [tùy_chọn ...]" +msgstr "shopt [-pqsu] [-o] [tên-tùy-chọn …]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "printf [-v biến] định_dạng [đối_số]" +msgstr "printf [-v BIẾN] ĐỊNH-DẠNG [CÁC-ĐỐI-SỐ]" -#: builtins.c:229 +#: builtins.c:231 #, fuzzy msgid "" -"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-" -"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S " +"complete [-abcdefgjksuv] [-pr] [-DEI] [-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 ...]" +"complete [-abcdefgjksuv] [-pr] [-DE] [-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 +#: builtins.c:235 +#, fuzzy msgid "" -"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] " -"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]" +"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ừ]" +"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 +#: builtins.c:239 #, fuzzy -msgid "compopt [-o|+o option] [-DE] [name ...]" -msgstr "compopt [-o|+o tùy_chọn] [tên ...]" +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o TÙY-CHỌN] [-DE] [TÊN …]" -#: builtins.c:240 +#: builtins.c:242 msgid "" -"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"mapfile [-d delim] [-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]" +"mapfile [-d delim] [-n SỐ-LƯỢNG] [-O GỐC] [-s SỐ-LƯỢNG] [-t] [-u fd] [-C " +"GỌI-NGƯỢC] [-c LƯỢNG] [MẢNG]" -#: builtins.c:242 +#: builtins.c:244 +#, fuzzy msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" +"readarray [-d delim] [-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]" +"readarray [-n ĐẾM] [-O GỐC] [-s SỐ-LƯỢNG] [-t] [-u FD] [-C GỌI-NGƯỢC] [-c " +"LƯỢNG] [MẢNG]" -#: builtins.c:254 +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2384,47 +2627,48 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +"Định nghĩa 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" +" Không đưa ra đối số thì “alias” in danh sách các bí danh ở dạng dùng lại " +"được\n" +" “alias TÊN=GIÁ-TRỊ” trên đầu ra chuẩn.\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." +" Nếu không thì một bí danh được định nghĩa cho mỗi TÊN theo giá trị\n" +" đưa ra. Khoảng trắng ở đâu trong GIÁ-TRỊ làm kiểm tra thay thế bí\n" +" danh cho từ kế tiếp, khi phân giải bí danh.\n" +" \n" +" Tùy chọn:\n" +" -p\tin tất cả các bí danh được định nghĩa theo định dạng\n" +" \tcó thể dùng lại được\n" +" \n" +" Trạng thái thoát:\n" +" alias trả lại thành công trừ khi TÊN đã cho không phải là\n" +" một bí danh đã được định nghĩa" -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\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." +"Gỡ bỏ TÊN khỏi danh sách các bí danh.\n" +" \n" +" Tùy chọn:\n" +" -a\tbỏ tất cả các bí danh.\n" +" \n" +" Trả lại thành công trừ khi TÊN không phải là một bí danh." -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2458,46 +2702,49 @@ msgid "" " -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" +" -X List key sequences bound with -x and associated " +"commands\n" +" in a form that can be reused as input.\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 +"Đặt các tổ hợp phím và biến Readline.\n" +" \n" +" Gắn tổ hợp phím với một chức năng hay vĩ lệnh Readline, hoặc\n" +" đặt biến Readline. Cú pháp đối số không tùy chọn giống như trong\n" +" ~/.inputrc, nhưng phải được chuyển qua dưới dạng đối số đơn. Ví\n" +" dụ: bind “\"\\C-x\\C-r\": re-read-init-file”.\n" +" \n" +" Tùy chọn:\n" +" -m SƠ-ĐỒ-PHÍM dùng sơ_đồ_phím làm sơ đồ phím khi lệnh này\n" +" chạy. Giá trị hợp lệ là emacs, emacs-standard,\n" +" emacs-meta, emacs-ctlx, vi, vi-move, vi-command\n" +" và vi-insert.\n" +" -l Liệt kê tên các hàm\n" +" -P Liệt kê tên hàm và tổ hợp phím\n" +" -p Liệt kê tên hàm và tổ hợp phím theo dạng dùng\n" +" lại làm đầu vào được\n" +" -S Liệt kê chuỗi phím mà gọi vĩ lệnh và các giá-trị\n" +" của chúng\n" +" -s Liệt kê chuỗi phím mà gọi vĩ lệnh và các giá-trị\n" +" của chúng theo định dạng có thể dùng làm đầu vào\n" +" -V Liệt kê các biến và giá trị của chúng\n" +" -v Liệt kê các biến và giá trị của chúng\n" +" theo định dạng có thể tái sử dụng làm đầu vào.\n" +" -q TÊN-HÀM Hỏi phím nào gọi hàm này\n" +" -u TÊN-HÀM Gỡ bỏ tất cả phím tắt gắn với hàm này\n" +" -r DÃY-PHÍM Gỡ bỏ tổ hợp phím này\n" +" -f TẬP-TIN Đọc tổ hợp phím từ tập tin này\n" +" -x DÃY-PHÍM:LỆNH Chạy LỆNH khi nhập DÃY-PHÍM\n" +" -X Liệt kê dãy phím với tùy-chọn -x và các lệnh kết " +"hợp\n" +" theo dạng có thể dùng làm đầu vào.\n" +" \n" +" Trạng thái thoát:\n" +" lệnh bind trả về 0 trừ khi đưa ra tùy chọn không nhận ra hay gặp lỗi." + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2507,15 +2754,15 @@ msgid "" " 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" +"Thoát khỏi vòng lặp for, while hoặc until.\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" +" Thoát khỏi vòng lặp for, while hoặc until. Nếu xác định N thì\n" +" thoát N vòng lặp.\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." +" Trạng thái thoát:\n" +" Trạng thái thoát là 0 trừ khi N nhỏ hơn 1." -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2525,16 +2772,16 @@ msgid "" " 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" +"Tiếp tục lại chạy vòng lặp for, while hoặc until.\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" +" Tiếp tục lại chạy vòng lặp for, while hoặc until. Nếu xác định N\n" +" thì tiếp tục vòng lặp 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." +" Trạng thái thoát:\n" +" Trạng thái thoát là 0 trừ khi N nhỏ hơn 1." -#: builtins.c:350 +#: builtins.c:354 +#, fuzzy msgid "" "Execute shell builtins.\n" " \n" @@ -2545,22 +2792,19 @@ msgid "" " \n" " Exit Status:\n" " Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n" -" not a shell builtin.." +" not a shell builtin." msgstr "" -"Chạy dựng sẵn trình bao.\n" +"Chạy lệnh tích hợp hệ vỏ.\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" +" Chạy SHELL-BUILTIN với ĐỐI-SỐ mà không thực hiện tìm lệnh. Hữu ích\n" +" khi bạn muốn cài đặt lại lệnh hệ vỏ tích hợp dạng hàm hệ vỏ, nhưng\n" +" cần chạy lệnh tích hợp trong hàm đó.\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." +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của SHELL-BUILTIN, hoặc sai nếu\n" +" SHELL-BUILTIN không phải là một lệnh tích hợp hệ vỏ." -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2575,20 +2819,19 @@ msgid "" " 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" +"Trả về ngữ cảnh của lệnh gọi hàm 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" +" Không có BTHỨC thì trả lại \"$line $filename\". Có BTHỨC thì trả\n" +" lại \"$line $subroutine $filename\"; thông tin bổ sung này có thể\n" +" được dùng để cung cấp stack trace.\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" +" Giá trị của BTHỨC thì ngụ ý bao nhiêu lần gọi cần lùi lại đằng\n" +" trước lệnh gọi hiện tại; khung gọi đầ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ệ." +" Trạng thái thoát:\n" +" Trả lại 0 trừ khi hệ vỏ đang chạy hàm hệ vỏ, BTHỨC cũng hợp lệ." -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" @@ -2611,46 +2854,68 @@ msgid "" " 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname " +"component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully " +"when\n" +" -P is used; 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 +"Đổi thư mục làm việc của hệ vỏ.\n" +" \n" +" Chuyển đổi thư mục hiện thời sang THƯ-MỤC. Thư mục mặc định là giá\n" +" trị của biến HOME.\n" +" \n" +" Biến CDPATH định nghĩa đường dẫn tìm kiếm cho thư mục chứa\n" +" THƯ-MỤC. Tên thư mục thay thế trong CDPATH được phân cách bằng dấu hai " +"chấm\n" +" (:). Tên thư mục trống tương đương với thư mục hiện tại. Nếu\n" +" THƯ-MỤC bắt đầu với dấu gạch chéo (/) thì không dùng CDPATH.\n" +" \n" +" Nếu không tìm thấy thư mục, và biến “cdable_vars” được đặt,\n" +" thì lệnh sẽ coi là một tên biến. Nếu biến đó có giá trị,\n" +" thì giá trị này được dùng cho THƯ-MỤC.\n" +" \n" +" Tùy chọn:\n" +" -L buộc theo liên kết mềm: phân giải liên kết mềm\n" +" \tTH.MỤC sau khi xử lý “..”\n" +" -P dùng cấu trúc thư mục vật lý mà không theo liên kết mềm:\n" +" \tphân giải liên kết mềm TH.MỤC sau khi xử lý “..”\n" +" -e nếu có tùy chọn -P và không thể xác định thư mục làm việc\n" +" \thiện tại thì thoát với trạng thái khác không\n" +" -@ trên các hệ thống mà hỗ trợ nó, hiện diện một tập tin với các\n" +" thuộc tính mở rộng như là một thư mục chứa các thuộc tính tập " +"tin\n" +" \n" +" Mặc định là theo liên kết mềm, như có mặt tùy chọn “-L”.\n" +" “..” được xử lý bằng cách gỡ bỏ phần trước của đường dẫn\n" +" cho đến dấu gạch chéo hay điểm bắt đầu của TH.MỤC.\n" +" \n" +" Trạng thái thoát:\n" +" Trả về 0 nếu thay đổi thư mục, và nếu $PWD được đặt thành công khi\n" +" -P được sử dụng; không thì khác không." + +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2659,20 +2924,19 @@ msgid "" " 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." +"In tên thư mục hiện tại.\n" +" \n" +" Tùy chọn:\n" +" -L in giá trị của $PWD nếu nó chứa tên của thư mục hiện tại\n" +" -P in thư mục vật lý, không liên kết mềm\n" +" \n" +" Mặc định “pwd” chạy như có mặt “-L”.\n" +" \n" +" Trạng thái thoát:\n" +" Trả về 0 trừ khi đưa ra tùy chọn sai hoặc không đọc được thư mục hiện " +"tại." -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2682,25 +2946,25 @@ msgid "" " 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." +" \n" +" Không có tác dụng gì: câu lệnh không làm gì cả.\n" +" \n" +" Trạng thái thoát:\n" +" Lúc nào cũng thành công." -#: builtins.c:439 +#: builtins.c:453 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." +"Trả lại kết quả thành công.\n" +" \n" +" Trạng thái thoát:\n" +" Lúc nào cũng thành công." -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" @@ -2708,11 +2972,11 @@ msgid "" " 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." +" \n" +" Trạng thái thoát:\n" +" Lúc nào cũng không thành công." -#: builtins.c:457 +#: builtins.c:471 msgid "" "Execute a simple command or display information about commands.\n" " \n" @@ -2722,31 +2986,32 @@ msgid "" " 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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." +"Thực thi một lệnh đơn giản, hoặc hiển thị thông tin về lệnh.\n" +" \n" +" Chạy LỆNH với các ĐỐI-SỐ mà không thực hiện tra cứu hàm hệ vỏ,\n" +" hoặc hiển thị thông tin về LỆNH. Có thể được dùng để gọi lệnh trên\n" +" đĩa khi đã có hàm cùng tên.\n" +" \n" +" Tùy chọn:\n" +" -p dùng giá trị mặc định cho ĐƯỜNG_DẪN\n" +" mà chắc chắn sẽ tìm mọi tiện ích chuẩn\n" +" -v in mô tả về LỆNH mà tương tự như lệnh tích hợp “type”\n" +" -V in mô tả chi tiết hơn của mỗi LỆNH\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của LỆNH, hoặc thất bại nếu không tìm\n" +" thấy LỆNH." -#: builtins.c:476 +#: builtins.c:490 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" @@ -2756,17 +3021,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2776,55 +3046,59 @@ msgid "" " \n" " When used in a function, `declare' makes NAMEs local, as with the " "`local'\n" -" command.\n" +" command. The `-g' option suppresses this behavior.\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 +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"Đặt giá trị và thuộc tính biến.\n" +" \n" +" Khai báo biến và gán cho thuộc tính cho nó. Nếu không đưa TÊN thì\n" +" hiển thị thuộc tính và giá trị của mọi biến.\n" +" \n" +" Tùy chọn:\n" +" -f\thạn chế hành động hoặc hiển thị tên hàm và định nghĩa\n" +" -F\thạn chế hiển thị chỉ tên hàm mà thôi\n" +" \t(và số thứ tự dòng và tập tin nguồn khi gỡ lỗi)\n" +" -g\ttạo biến toàn cục khi sử dụng trong hàm hệ vỏ; nếu không\n" +" \tthì bị bỏ qua\n" +" -p\thiển thị thuộc tính và giá trị của mỗi TÊN\n" +" \n" +" Tùy chọn dùng để đặt thuộc tính:\n" +" -a\ttạo mảng chỉ số tên TÊN (nếu hỗ trợ)\n" +" -A\ttạo mảng kết hợp tên TÊN (nếu hỗ trợ)\n" +" -i\tđặt thuộc tính “integer” (số nguyên) cho TÊN\n" +" -l\tchuyển đổi TÊN sang chữ thường khi gán\n" +" -n\tlàm một TÊN tham chiếu đến biến có tên là giá trị của nó\n" +" -r\tlàm cho TÊN chỉ đọc\n" +" -t\tđặt thuộc tính “trace” cho TÊN\n" +" -u\tchuyển đổi TÊN sang chữ hoa khi gán\n" +" -x\txuất khẩu TÊN\n" +" \n" +" Dùng “+” thay cho “-” để tắt thuộc tính đưa ra.\n" +" \n" +" Biến có thuộc tính số nguyên thì định giá theo số học (xem lệnh\n" +" “let” khi biến được gán.\n" +" \n" +" Khi dùng trong hàm, “declare” đặt TÊN là cục bộ, như khi dùng lệnh\n" +" “local” (cục bộ). Tùy chọn -g ngăn hành vi này.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi đưa ra tùy chọn sai hoặc gặp lỗi khi gán biến." + +#: builtins.c:532 +#, fuzzy msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" -"Đặt các giá trị và thuộc tính của biến.\n" +"Đặt giá trị và thuộc tính của biến.\n" "\n" -"\tQuá cũ. Xem « help declare »." +" Lệnh này đã lạc hậu. Xem “help declare”." -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2835,27 +3109,29 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, 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." +"Định nghĩa biến cục bộ.\n" +" \n" +" Tạo biến cục bộ tên TÊN và gán GIÁ-TRỊ cho nó. TÙY_CHỌN có thể là\n" +" bất cứ tùy chọn nào “declare” chấp nhận.\n" +" \n" +" Biến cục bộ chỉ dùng được bên trong hàm, chỉ truy cập được từ hàm\n" +" mà biến được định nghĩa và các hàm con.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi đưa ra tùy chọn sai hay gặp lỗi,\n" +" hoặc nếu hệ vỏ không chạy hàm." -#: builtins.c:537 +#: builtins.c:557 +#, fuzzy msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by " +"a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2867,6 +3143,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2874,41 +3151,48 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value " +"HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal " +"value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight 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 +"Ghi đối số vào đầu ra tiêu chuẩn.\n" +" \n" +" Hiển thị các ĐỐI-SỐ, ngăn cách bằng dấu cách đơn và kèm ký tự dòng mới\n" +" ra đầu ra tiêu chuẩn .\n" +" \n" +" Tùy chọn:\n" +" -n\tđừng thêm ký tự dòng mới\n" +" -e\tbật diễn dịch ký tự thoát theo sau ký tự “\\”\n" +" -E\tchặn diễn dịch ký tự thoát\n" +" \n" +" “echo” hiểu những ký tự thoát sau:\n" +" \\a\ttiếng chuông\n" +" \\b\txóa lùi\n" +" \\c\tchặn kết xuất tiếp\n" +" \\e\tký tự thoát\n" +" \\E\tký tự thoát\n" +" \\f\ttải giấy\n" +" \\n\tdòng mới\n" +" \\r\txuống dòng\n" +" \\t\ttab đứng\n" +" \\v\ttab ngang\n" +" \\\\\tgạch ngược\n" +" \\0nnn\tký tự có mã ASCII NNN (1-3 chữ số bát phân)\n" +" \\xHH\tký tự 8-bit có giá trị HH (1-2 chữ số thập lục phân)\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không gặp lỗi khi ghi." + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2920,17 +3204,17 @@ msgid "" " 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" +"Ghi đối số vào đầu ra 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" +" Hiển thị ĐỐI-SỐ trên đầu ra chuẩn, kèm ký tự xuống hàng ở cuối.\n" "\n" -"\tTùy chọn:\n" -"\t\t-n\tđừng phụ thêm một dòng mới\n" +" Tùy chọn:\n" +" -n\tđừng thêm ký tự xuống hàng\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." +" Trạng thái thoát:\n" +" Trả lại thành công nếu không gặp lỗi ghi." -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2956,33 +3240,31 @@ msgid "" " 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" +"Bật và tắt lệnh hệ vỏ tích hợp.\n" +"\n" +" Bật và tắt các lệnh hệ vỏ tích hợp. Chức năng tắt cho phép bạn\n" +" chạy một lệnh trên đĩa cùng tên với một lệnh hệ vỏ tích hợp mà\n" +" không cần dùng tên đường dẫn đầy đủ.\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" +" Tùy chọn:\n" +" -a in danh sách các lệnh tích hợp kèm trạng thái bật/tắt\n" +" -n tắt TÊN hoặc hiển thị danh sách lệnh bị tắt\n" +" -p in danh sách lệnh tích hợp theo định dạng dùng lại được\n" +" -s chỉ in tên các lệnh tích hợp Posix “đặc biệt”\n" "\n" -"\tKhông có tùy chọn thì mỗi TÊN được bật lại.\n" +" Tùy chọn điều khiển chức năng tải động:\n" +" -f nạp lệnh tích hợp TÊN từ TẬP-TIN\n" +" -d bỏ một tích hợp được nạp bằng “-f”\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" +" Không có tùy chọn thì coi như bật TÊN.\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." +" Để sử dụng lệnh “test” trên đĩa (nếu tìm thấy trong $PATH) thay\n" +" cho phiên bản hệ vỏ tích hợp, gõ “enable -n test”.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi TÊN không phải lệnh tích hợp hoặc gặp lỗi." -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" @@ -2993,17 +3275,16 @@ msgid "" " 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" +"Dùng các đối số để chạy lệnh hệ vỏ.\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" +" Gộp các ĐỐI-SỐ thành một chuỗi đơn, dùng kết quả làm đầu vào cho\n" +" hệ vỏ và chạy lệnh đó.\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ị." +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của câu lệnh hay thành công nếu lệnh rỗng." -#: builtins.c:626 +#: builtins.c:652 +#, fuzzy msgid "" "Parse option arguments.\n" " \n" @@ -3036,60 +3317,50 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 +"Phân tích đối số tùy chọn.\n" +"\n" +" Getopts được hệ vỏ dùng để phân tích tham số thành tùy chọn.\n" +"\n" +" CHUỖI-TÙY-CHỌN chứa những chữ tùy chọn cần nhận ra; một chữ có dấu hai\n" +" chấm theo sau thì tùy chọn cần đối số, cách tùy chọn bằng khoảng\n" +" trắng.\n" +"\n" +" Mỗi lần gọi, getopts sẽ đặt tùy chọn kế tiếp vào biến hệ vỏ $TÊN,\n" +" tạo biến mới nếu tên đó chưa tồn tại, và đặt chỉ số của đối số kế\n" +" tiếp cần xử lý vào biến hệ vỏ OPTIND. OPTIND được khởi động bằng 1\n" +" mỗi lần hệ vỏ hay một văn lệnh hệ vỏ được gọi. Khi tùy chọn cần\n" +" đối số, getopts đặt đối số đó vào biến hệ vỏ OPTARG.\n" +"\n" +" getopts thông báo lỗi bằng một trong hai cách. Nếu ký tự đầu tiên\n" +" của CHUỖI-TÙY-CHỌN là dấu hai chấm, getopts thông báo lỗi im\n" +" lặng. Chế độ này không in ra thông báo nào. Nếu gặp tùy chọn sai\n" +" thì getopts lưu mã ký tự tùy chọn trong biến OPTARG. Không tìm\n" +" thấy đối số cần thiết thì getopts lưu dấu hai chấm trong biến $TÊN\n" +" và đặt lưu mã ký tự tùy chọn trong OPTARG. Nếu getopts không trong\n" +" chế độ im lặng và gặp tùy chọn sai, getopts lưu dấu hỏi “?” vào\n" +" biến $TÊN và xóa OPTARG. Không tìm thấy tùy chọn cần thiết thì “?”\n" +" được lưu vào $TÊN, OPTARG bị xlá, và in ra một thông điệp chẩn\n" +" đoán.\n" +"\n" +" Nếu biến hệ vỏ OPTERR có giá trị 0, getopts sẽ không in thông báo\n" +" kể cả khi ký tự đầu tiên của CHUỖI-TÙY-CHỌN không phải dấu hai\n" +" chấm. OPTERR có giá trị mặc định là 1.\n" +"\n" +" Getopts bình thường phân tích tham số vị trí ($0 - $9). Tuy nhiên,\n" +" các đối số bổ sung cũng được phân tích.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu tìm thấy một tùy chọn; không thành công nếu\n" +" gặp kết thúc các tùy chọn, hoặc nếu gặp lỗi." + +#: builtins.c:694 msgid "" "Replace the shell with the given command.\n" " \n" @@ -3100,8 +3371,8 @@ msgid "" " \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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" " If the command cannot be executed, a non-interactive shell exits, " "unless\n" @@ -3111,39 +3382,37 @@ msgid "" " 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." +"Thay thế hệ vỏ bằng câu lệnh đưa ra.\n" +" \n" +" Thực thi LỆNH, thay thế hệ vỏ này bằng chương trình được chạy.\n" +" ĐỐI-SỐ trở thành đối số của LỆNH. Không định nghĩa LỆNH thì bất cứ " +"chuyển\n" +" hướng nào sẽ xảy ra trong hệ vỏ đang chạy.\n" +" \n" +" Tùy chọn:\n" +" -a TÊN\ttruyền TÊN cho LỆNH dạng đối số thứ không\n" +" -c\tthực thi LỆNH với một môi trường rỗng\n" +" -l\tđặt một dấu gạch vào đối số thứ không của LỆNH\n" +" \n" +" Nếu LỆNH không thể thực thi, hệ vỏ không tương tác sẽ thoát, trừ\n" +" khi đặt tùy chọn hệ vỏ “execfail”.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi không tìm được LỆNH hoặc gặp lỗi chuyển hướng." -#: builtins.c:689 +#: builtins.c:715 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" +"Thoát hệ vỏ.\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." +" Thoát khỏi hệ vỏ với trạng thái N. Không xác định N thì trạng thái\n" +" thoát là trạng thái của lệnh cuối cùng được chạy." -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" @@ -3151,12 +3420,12 @@ msgid "" "executed\n" " in a login shell." msgstr "" -"Thoát khỏi một trình bao đăng nhập.\n" +"Thoát hệ vỏ đă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." +" Thoát khỏi hệ vỏ đăng nhập với trạng thái N. Trả về lỗi nếu không\n" +" phải hệ vỏ đăng nhập." -#: builtins.c:708 +#: builtins.c:734 msgid "" "Display or execute commands from the history list.\n" " \n" @@ -3185,33 +3454,30 @@ msgid "" " 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 +"Hiển thị hoặc thực thi lệnh từ lịch sử.\n" +"\n" +" fc được dùng để liệt kê, chỉnh sửa và thực thi lại lệnh từ danh\n" +" sách lịch sử. ĐẦU và CUỐI có thể là số xác định phạm vi, hoặc ĐẦU\n" +" có thể là chuỗi chứa phần đầu lệnh chạy gần đây nhất.\n" +"\n" +" Tùy chọn:\n" +" -e ENAME\tchọn trình soạn thảo nào cần dùng.\n" +" \tMặc định là FCEDIT, sau đó là EDITOR, rồi đến vi\n" +" -l\tliệt kê thay vì chỉnh sửa\n" +" -n\tliệt kê không in số thứ tự dòng\n" +" -r\tđảo ngược thứ tự các dòng (mới nhất trước)\n" +"\n" +" Định dạng “fc -s [mẫu=lần_lập_lại …] [lệnh]” được dùng để chạy\n" +" lại lệnh sau khi thay thế CŨ=MỚI.\n" +"\n" +" Một bí danh hữu ích là r=\".c -s\" để có thể gõ “r cc” để chạy lệnh\n" +" cuối cùng bắt đầu bằng “cc” và gõ “r” để chạy lại lệnh cuối.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công hay trạng thái của câu lệnh được thực thi; gặp\n" +" lỗi thì khác số không." + +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -3222,18 +3488,17 @@ msgid "" " 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âng công việc nền 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âng lên trước công việc được định nghĩa bởi đặc tả công việc ĐTCV\n" +" làm công việc hiện thời. Không có ĐTCV thì dùng công việc hiện\n" +" thời của hệ vỏ.\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." +" Trạng thái thoát:\n" +" Trạng thái của câu lệnh được nâng lên trước; hoặc thất bại nếu xảy\n" +" ra lỗi." -#: builtins.c:753 +#: builtins.c:779 msgid "" "Move jobs to the background.\n" " \n" @@ -3246,18 +3511,17 @@ msgid "" " 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" +"Chuyển công việc xuống chạy nền.\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" +" Chuyển công việc định nghĩa theo đặc tả công việc ĐTCV sang chạy\n" +" nền, như thể lệnh được chạy với “&”. Nếu không có ĐTCV, dùng công\n" +" việc hiện thời của hệ vỏ.\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." +" Trạng thái thoát:\n" +" Trả lại thành công nếu chức năng điều khiển công việc được bật và\n" +" không gặp lỗi." -#: builtins.c:767 +#: builtins.c:793 msgid "" "Remember or display program locations.\n" " \n" @@ -3266,42 +3530,43 @@ msgid "" "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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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" +"Nhớ hoặc hiển thị vị trí chương trình.\n" +" \n" +" Xác định và ghi nhớ tên đường dẫn đầy đủ của mỗi TÊN câu lệnh.\n" +" Nếu không đưa ra đối số, hiển thị thông tin về các câu lệnh được\n" +" ghi nhớ.\n" +" \n" +" Tùy chọn:\n" +" -d\tquên vị trí đã nhớ của TÊN\n" +" -l\thiển thị theo định dạng dùng lại làm đầu vào được\n" +" -p\tTÊN_ĐƯỜNG_DẪN\tdùng TÊN_ĐƯỜNG_DẪN là tên đường dẫn đầy đủ của TÊN\n" +" -r\tquên mọi vị trí đã nhớ\n" +" -t\tin vị trí đã nhớ của TÊN, in tên trước vị\n" +" \t\ttrí nếu TÊN tương ứng với nhiều vị trí\n" +" \n" +" Đối số:\n" +" TÊN\tmỗi TÊN được tìm trong $PATH và được thêm vào\n" +" \t\tdanh 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." +" Trạng thái thoát:\n" +" Trả 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 +#: builtins.c:818 +#, fuzzy msgid "" "Display information about builtin commands.\n" " \n" @@ -3313,36 +3578,35 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying 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." +"Hiển thị thông tin về lệnh tích hợp.\n" +" \n" +" Hiển thị bản tóm tắt ngắn về các câu lệnh tích hợp. Nếu chỉ định\n" +" MẪU thì in ra trợ giúp chi tiết về tất cả các câu lệnh tương\n" +" ứng với mẫu đó; không thì in ra danh sách các chủ đề trợ giúp.\n" +" \n" +" Tùy chọn:\n" +" -d\txuất mô tả ngắn về mỗi chủ đề\n" +" -m\thiện cách dùng theo định dạng trang hướng dẫn (man)\n" +" -s\txuất chỉ một bản tóm tắt cách dùng cho mỗi\n" +" \t\tchủ đề tương ứng với MẪU\n" +" \n" +" Đối số:\n" +" MẪU\tmẫu xác định một chủ đề trợ giúp\n" +" \n" +" Trạng thái thoát:\n" +" Trả 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 +#: builtins.c:842 +#, fuzzy msgid "" "Display or manipulate the history list.\n" " \n" @@ -3351,23 +3615,24 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" @@ -3375,41 +3640,39 @@ msgid "" " 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." +"Hiển thị hoặc thao tác danh sách lịch sử.\n" +" \n" +" Hiển thị danh sách lịch sử kèm số dòng, “*” ở đầu dòng cho các mục\n" +" nhập bị sửa đổi. Đối số N thì liệt kê chỉ N mục tin cuối cùng.\n" +" \n" +" Tùy chọn:\n" +" -c\txóa sạch danh sách lịch sử bằng cách xóa mọi mục tin\n" +" -d offset\txóa mục tin lịch sử ở vị trí tương đối này\n" +" \n" +" -a\tnối đuôi lịch sử từ phiên làm việc này vào tập tin\n" +" \tlịch sử.\n" +" -n\tđọc mọi dòng lịch sử chưa đọc từ tập tin lịch sử\n" +" -r\tđọc tập tin lịch sử và nối thêm vào danh sách lịch sử\n" +" -w\tghi lịch sử hiện thời vào tập tin lịch sử,\n" +" \tvào nối đuôi vào danh sách lịch sử\n" +" \n" +" -p\tkhai triển lịch sử với mỗi ĐỐI-SỐ và hiển thị kết quả\n" +" \tmà không lưu vào danh sách lịch sử\n" +" -s\tnối đuôi ĐỐI-SỐ vào danh sách lịch sử làm một mục đơn\n" +" \n" +" Nếu có TẬP-TIN thì nó được dùng làm tập tin lịch sử. Ngược\n" +" lại, nếu $HISTFILE có giá trị thì dùng; nếu $HISTFILE không có giá\n" +" trị thì dùng “~/.bash_history”.\n" +" \n" +" Nếu biến $HISTTIMEFORMAT đã được đặt và khác rỗng, giá trị đó được\n" +" dùng làm chuỗi định dạng cho strftime(3) để in nhãn thời gian\n" +" tương ứng với mỗi mục tin lịch sử được hiển thị. Ngược lại không\n" +" in nhãn thời gian.\n" +" \n" +" Trạng thái thoát:\n" +" Trả 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 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -3418,8 +3681,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -3433,27 +3696,26 @@ msgid "" " 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." +" \n" +" Liệt kê các công việc đang chạy. Đặc tả công việc ĐTCV hạn chế chỉ\n" +" hiện công việc đó thôi. Không có tùy chọn thì hiển thị trạng thái\n" +" của mọi công việc đang chạy.\n" +" \n" +" Tùy chọn:\n" +" -l\tliệt kê mã số tiến trình ngoài thông tin bình thường\n" +" -n\tliệt kê chỉ những tiến trình đã thay đổi trạng thái\n" +" \tkể từ lần thông báo cuối cùng\n" +" -s\tchỉ hiện những công việc đang dừng chạy\n" +" \n" +" Nếu có “-x” thì chạy LỆNH sau khi thay thế tất cả đặc tả công việc\n" +" trên đối số bằng mã tiến trình của trình dẫn đầu nhóm tiến trình\n" +" của công việc đó.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không gặp tùy chọn sai hay gặp lỗi.\n" +" Đưa ra “-x” thì trả lại trạng thái thoát của LỆNH." -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -3463,29 +3725,29 @@ msgid "" " 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" +" \t\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." +"Bỏ công việc khỏi hệ vỏ đang chạy.\n" +" \n" +" Gỡ bỏ công việc xác định bởi đặc tả công việc ĐTCV ra khỏi bảng các\n" +" công việc hoạt động. Không có ĐTCV thì dùng công việc hiện thời của hệ " +"vỏ.\n" +" \n" +" Tùy chọn:\n" +" -a\tbỏ mọi công việc nếu không có ĐTCV\n" +" -h\tđánh dấu ĐTCV để không gửi tín hiệu SIGHUP\n" +" \tcho công việc khi hệ vỏ nhận được SIGHUP\n" +" -r\tchỉ bỏ những công việc đang chạy\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn hay ĐTCV sai." -#: builtins.c:898 +#: builtins.c:925 +#, fuzzy msgid "" "Send a signal to a job.\n" " \n" @@ -3497,7 +3759,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -3506,28 +3769,26 @@ msgid "" " 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 +"Gửi tín hiệu cho công việc.\n" +" \n" +" Gửi tín hiệu xác định bởi SIGSPEC hoặc SIGNUM cho những tiến trình\n" +" xác định bởi PID hoặc JOBSPEC. Nếu SIGSPEC và SIGNUM không hiện diện\n" +" thì ngầm định SIGTERM.\n" +" \n" +" Tùy chọn:\n" +" -s TTH\tTTH là tên tín hiệu\n" +" -n STH\tSTH là mã số tín hiệu\n" +" -l\tliệt kê tên tín hiệu; đối số sau “-l” nếu có được coi\n" +" \tlà mã số tín hiệu cần hiện tên\n" +" \n" +" Kill là lệnh hệ vỏ tích hợp vì hai lý do: nó cho phép dùng mã số\n" +" công việc thay cho mã số tiến trình và cho phép giết tiến trình\n" +" đạt giới hạn số các tiến trình được phép tạo.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay gặp lỗi." + +#: builtins.c:949 msgid "" "Evaluate arithmetic expressions.\n" " \n" @@ -3569,50 +3830,49 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." +" 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 +" Định giá mỗi ĐỐI-SỐ dạng biểu thức số học. Định giá theo số nguyên\n" +" có giới hạn, không kiểm tra tràn số, mặc dù có bẫy chia cho không\n" +" và bật cờ lỗi. Danh sách toán tử bên dưới được nhóm theo nhóm độ\n" +" ưu tiên ngang hàng. Danh sách theo độ ưu tiên giảm dần.\n" +"\n" +" \tid++, id--\ttiền tiền/giảm\n" +" \t++id, --id\thậu gia/giảm\n" +" \t-, +\t\ttrừ, cộng (dấu)\n" +" \t!, ~\t\tphủ định lôgíc và trên bit\n" +" \t**\t\tsố mũ\n" +" \t*, /, %\t\tnhân, chia, số dư\n" +" \t+, -\t\tcộng, trừ\n" +" \t<<, >>\t\tdịch bit trái/phải\n" +" \t<=, >=, <, >\tso sánh\n" +" \t==, !=\t\tbằng, không bằng\n" +" \t&\t\tphép AND trên bit\n" +" \t^\t\tphép XOR trên bit\n" +" \t|\t\tphép OR trên bit\n" +" \t&&\t\tphép AND lôgíc\n" +" \t||\t\tphép OR lôgíc\n" +" \tBTHỨC ? BTHỨC : BTHỨC\n" +" \t\t\ttoán từ điều kiện\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tphép gán\n" +"\n" +" Biến hệ vỏ có thể dùng làm toán hạng. Tên biến được thay thế bằng\n" +" giá trị biến (chuyển thành số nguyên) trong biểu thức. Biến không\n" +" cần có thuộc tính số nguyên để dùng làm biểu thức.\n" +"\n" +" Các toán tử được định giá theo thứ tự ưu tiên. Các biểu thức con\n" +" nằm trong dấu ngoặc được định giá trước tiên, và có quyền cao hơn\n" +" các quy tắc đi trước bên trên.\n" +"\n" +" Trạng thái thoát:\n" +" Nếu ĐỐI-SỐ cuối cùng được định giá thành 0 thì trả về 1; không thì\n" +" trả về 0." + +#: builtins.c:994 #, fuzzy msgid "" "Read a line from the standard input and split it into fields.\n" @@ -3624,7 +3884,9 @@ msgid "" " 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" +" delimiters. By default, the backslash character escapes delimiter " +"characters\n" +" and newline.\n" " \n" " If no NAMEs are supplied, the line read is stored in the REPLY " "variable.\n" @@ -3634,73 +3896,80 @@ msgid "" " \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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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" +" \t\tEOF is encountered or read times out, ignoring any\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +"out\n" +" (in which case it's greater than 128), a variable assignment error " +"occurs,\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 +"Đọc một dòng từ đầu vào tiêu chuẩn và tách ra nhiều trường.\n" +" \n" +" Đọc một dòng từ đầu vào tiêu chuẩn, hoặc từ bộ mô tả tập tin FD nếu\n" +" dùng tùy chọn “-u”. Dòng được chia ra nhiều trường, trường đầu\n" +" tiên được gán cho biến TÊN đầu tiên, từ thứ hai cho TÊN thứ hai,\n" +" và cứ như vậy, và từ còn lại nào được gán cho TÊN cuối cùng. Chỉ những " +"ký\n" +" tự trong $IFS được coi là ký tự phân cách.\n" +" \n" +" Không có TÊN thì dòng được đọc sẽ lưu vào biến REPLY.\n" +" \n" +" Tùy chọn:\n" +" -a MẢNG\tlưu các trường vào biến mảng chỉ số MẢNG theo thứ tự,\n" +" \tbắt đầu từ không.\n" +" -d NGĂN_CÁCH\ttiếp tục đến khi đọc ký tự đầu tiên của DELIM thay\n" +" \t\tcho ký tự xuống dòng\n" +" -e \tdùng Readline để lấy dòng trong hệ vỏ tương tác\n" +" -i CHUỖI\tdùng CHUỖI làm văn bản đầu tiên cho Readline\n" +" -n nChữ\ttrả về sau khi đọc đủ số lượng ký tự này thay vì đọc hết " +"dòng\n" +" \t\tnhưng nếu gặp chuỗi phân tách khi ít hơn Nchữ\n" +" \t\tcác ký tự được đọc trước chuỗi phân tách\n" +" -N N\ttrả về chỉ sau khi đọc chính xác số lượng ký tự này,\n" +" \tnếu không gặp kết thúc tập tin (EOF) hay quá hạn đọc,\n" +" \tcũng bỏ qua dấu tách nào\n" +" -p NHẮC\txuất chuỗi NHẮC mà không có ký tự dòng mới theo sau,\n" +" \ttrước khi đọc\n" +" -r\tkhông cho phép gạch chéo ngược để thoát ký tự\n" +" -s\tkhông hiện lại dữ liệu nhập đến từ thiết bị cuối\n" +" -t\tTHỜI_GIAN_CHỜ\n" +" \tthời gian chờ tối đa và trả vềi không thành công nếu chưa đọc một\n" +" \tdòng dữ liệu nhập hoàn toàn trong số giây này. Giá trị\n" +" \tcủa biến TMOUT là thời hạn mặc định. Thời hạn này có\n" +" \tthể là một phân số. Nếu THỜI_HẠN là 0 thì việc đọc trả\n" +" \tlại thành công chỉ nếu dữ liệu nhập sẵn sàng trên bộ\n" +" \tmô tả tập tin đưa ra. Trạng thái thoát lớn hơn 128\n" +" \tnếu vượt quá thời hạn này.\n" +" -u FD\tđọc từ bộ mô tả tập tin FD thay cho đầu vào tiêu chuẩn\n" +" \n" +" Trạng thái thoát:\n" +" Mã trả lại là số không, nếu không gặp kết thúc tập tin, hay chờ quá\n" +" lâu, hoặc đưa ra bộ mô tả tập tin sai làm đối số cho “-u”." + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -3711,18 +3980,18 @@ msgid "" " 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" +"Trở về từ hàm hệ vỏ.\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" +" Thoát hàm hệ vỏ hoặc văn lệnh được “source” với mã trả về xác định\n" +" bởi N. Nếu không có N, trạng thái thoát là của lệnh thực hiện cuối\n" +" cùng trong hàm/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." +" Trạng thái thoát:\n" +" Trả lại N, hoặc bị lỗi nếu hệ vỏ không đang chạy một hàm hay văn\n" +" lệnh." -#: builtins.c:1022 +#: builtins.c:1055 +#, fuzzy msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3788,9 +4057,13 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell " +"functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3803,89 +4076,94 @@ msgid "" " 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 +"Đặt hay hủy giá trị của tùy chọn hệ vỏ và tham số vị trí.\n" +" \n" +" Sửa đổi giá trị của thuộc tính hệ vỏ và tham số vị trí,\n" +" hoặc hiển thị tên và giá trị của biến hệ vỏ.\n" +" \n" +" Tùy chọn:\n" +" -a Đánh dấu các biến được tạo hay sửa đổi để xuất ra\n" +" -b Thông báo ngay về công việc bị chấm dứt\n" +" -e Thoát ngay nếu câu lệnh thoát với trạng thái khác số không\n" +" -f Tắt chức năng tạo tên tập tin (glob)\n" +" -h Nhớ vị trí của mỗi câu lệnh khi nó được dò tìm\n" +" -k Mọi đối số gán được đặt vào môi trường cho một câu lệnh,\n" +" không phải chỉ những đối số nằm trước tên câu lệnh\n" +" -m Bật chức năng điều khiển công việc\n" +" -n Đọc câu lệnh mà không thực thi\n" +" -o TÊN_TÙY_CHỌN\n" +" Đặt biến tương ứng với TÊN_TÙY_CHỌN:\n" +" allexport giống -a\n" +" braceexpand giống -B\n" +" emacs dùng giao diện soạn thảo kiểu emacs\n" +" errexit giống -e\n" +" errtrace giống -E\n" +" functrace giống -T\n" +" hashall giống -h\n" +" histexpand giống -H\n" +" history bật lịch sử câu lệnh\n" +" ignoreeof hệ vỏ không thoát khi đọc EOF\n" +" interactive-comments\n" +" cho phép ghi chú trong lệnh tương tác\n" +" keyword giống -k\n" +" monitor giống -m\n" +" noclobber giống -C\n" +" noexec giống -n\n" +" noglob giống -f\n" +" nolog hiện thời chấp nhận nhưng bỏ qua\n" +" notify giống -b\n" +" nounset giống -u\n" +" onecmd giống -t\n" +" physical giống -P\n" +" pipefail giá trị trả lại của ống dẫn là\n" +" trạng thái của câu lệnh cuối cùng\n" +" có trạng thái khác không, hoặc số\n" +" không nếu không có câu lệnh thoát\n" +" với trạng thái khác không\n" +" posix thay đổi những thao tác khác với\n" +" Posix thành tuân theo Posix\n" +" privileged giống -p\n" +" verbose giống -v\n" +" vi dùng giao diện soạn thảo kiểu vi\n" +" xrace giống -x\n" +" -p Bật khi nào mã số thật và mã số có kết quả\n" +" không tương ứng với nhau.\n" +" Tắt tính năng xử lý tập tin $ENV\n" +" và nhập các hàm vào hệ vỏ.\n" +" Việc tắt tùy chọn này thì gây ra uid và gid có kết quả\n" +" được đặt thành uid và gid thật.\n" +" -t Thoát sau khi đọc và thực thi một câu lệnh\n" +" -u Xử lý biến chưa đặt là lỗi khi thay thế\n" +" -v In ra mỗi dòng nhập vào hệ vỏ khi nó được đọc\n" +" -x On ra mỗi câu lệnh và đối số tương ứng khi nó được thực thi\n" +" -B hệ vỏ sẽ mở rộng các dấu ngoặc móc\n" +" -C Nếu đặt thì không cho phép ghi đè lên tập tin bình thường\n" +" đã tồn tại bằng cách chuyển hướng kết xuất\n" +" -E Nếu đặt thì bẫy ERR được chức năng hệ vỏ kế thừa\n" +" -H Bật! bật chức năng thay thế kiểu. Cờ này được bật\n" +" theo mặc định khi hệ vỏ tương tác\n" +" -P Đặt thì không theo liên kết mềm\n" +" khi thực thi câu lệnh như cd mà chuyển đổi thư mục hiện tại\n" +" -T Nếu đặt thì bẫy DEBUG (gỡ lỗi) được các hàm của hệ vỏ kế " +"thừa\n" +" -- Gán bất cứ đối số còn lại nào cho những tham số thuộc vị " +"trí.\n" +" Nếu không còn thừa lại đối số nào, tham số vị trí\n" +" ìm kiếm được đặt.\n" +" - Gán bất cứ đối số còn lại nào cho những tham số thuộc vị " +"trí.\n" +" Hai tùy chọn -x và -v đều bị tắt.\n" +" \n" +" Việc dùng + thay - làm tắt cờ. Các cờ cũng có thể được dùng khi\n" +" gọi hệ vỏ. Giá trị các cờ hiện hành có thể tìm thấy trong biến\n" +" $-. Các đối số còn lại là tham số thuộc vị trí, và được gán (theo\n" +" thứ tự) cho $1, $2, .. $n. Không đưa ra đối số thì in ra mọi biến\n" +" shell.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi gặp tùy chọn sai." + +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3894,6 +4172,8 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" " Without options, unset first tries to unset a variable, and if that " "fails,\n" @@ -3904,21 +4184,25 @@ msgid "" " 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." +"Xóa giá trị và thuộc tính của biến hệ vỏ và các hàm.\n" +" \n" +" Đối với mỗi TÊN, gỡ bỏ biến hay hàm tương ứng.\n" +" \n" +" Tùy chọn:\n" +" -f\tcoi mỗi TÊN là hàm hệ vỏ\n" +" -v\tcoi mỗi TÊN là biến hệ vỏ\n" +" -n\tcoi TÊN như là tên tham chiếu và bỏ đặt biến đó thay vì\n" +" biến mà nó tham chiếu đến\n" +" \n" +" Không có tùy chọn thì sẽ thử xóa biến, và nếu không thành công,\n" +" sau đó thử xóa hàm.\n" +" \n" +" Một số biến không thể gỡ bỏ; nên xem “readonly”.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay TÊN chỉ-đọc." -#: builtins.c:1124 +#: builtins.c:1162 msgid "" "Set export attribute for shell variables.\n" " \n" @@ -3936,23 +4220,22 @@ msgid "" " 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" +"Đặt thuộc tính xuất khẩu cho biến hệ vỏ.\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" +" Đánh dấu TÊN để tự động xuất vào môi trường của các lệnh được chạy\n" +" sau đó. Có 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" +" Tùy chọn:\n" +" -f\ttham chiếu đến hàm hệ vỏ\n" +" -n\tgỡ bỏ thuộc tính xuất khẩu khỏi TÊN\n" +" -p\thiển thị danh sách các biến và hàm đượ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" +" Đối số “--” ngừng phân tích tùy chọn cho các tham số còn lạ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 hay TÊN sai," +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn hay TÊN sai," -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3964,31 +4247,33 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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." +"Đánh dấu biến hệ vỏ là không thể thay đổi.\n" +" \n" +" Đánh dấu TÊN là chỉ đọc; giá trị những TÊN này không được thay\n" +" đổi trong các phép gán sau. Nếu có GIÁ-TRỊ thì gán GIÁ-TRỊ trước\n" +" khi đánh dấu là chỉ đọc.\n" +" \n" +" Tùy chọn:\n" +" -a\ttham chiếu đến biến kiểu mảng chỉ số\n" +" -A\ttham chiếu đến biến kiểu mảng kết hợp\n" +" -f\ttham chiếu đến hàm hệ vỏ\n" +" -p\thiển thị danh sách biến và hàm chỉ đọc, tùy thuộc vào\n" +" \t\tcó tùy chọn -f hay không\n" +" \n" +" Đối số “--” ngừng phân tích tùy chọn cho các tham số còn lại.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay TÊN không hợp lệ." -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3998,15 +4283,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" -"Dời tham số thuộc vị trí.\n" +"Dịch vị trí đối số.\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" +" Thay đổi tên của đối số vị trí $N+1,$N+2 … thành $1,$2 …\n" +" N là 1 nếu không chỉ định.\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 $#." +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi N âm hay lớn hơn $#." -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -4019,21 +4304,17 @@ msgid "" " 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" +"Thực thi lệnh từ tập tin trong hệ vỏ hiện tại.\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" +" Đọc và thực thi lệnh từ TẬP-TIN trong hệ vỏ đang chạy. $PATH được\n" +" dùng để tìm thư mục chứa tập tin này. Nếu có đối số thì mỗi đối số\n" +" trở thành tham số vị trí khi 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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được thực thi trong\n" +" TẬP-TIN; không thành công nếu không thể đọc TẬP-TIN." -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -4046,26 +4327,29 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" -"Ngưng chạy trình bao.\n" +"Ngưng chạy hệ vỏ.\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" +" Ngưng chạy hệ vỏ này đến khi nhận tín hiệu SIGCONT. Nếu không ép\n" +" buộc thì không thể ngưng chạy hệ vỏ đă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" +" Tùy chọn:\n" +" \t-f\tbuộc ngưng, thậm chí với hệ vỏ đă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." +" Trạng thái thoát:\n" +" Trả lại thành công trừ khi chức năng điều khiển công việc không\n" +" được bật hoặc gặp lỗi." -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -4119,6 +4403,9 @@ msgid "" " Other operators:\n" " \n" " -o OPTION True if the shell option OPTION is enabled.\n" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -4135,85 +4422,83 @@ msgid "" " 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" +" Thoát với trạng thái 0 (đúng) hoặc 1 (sai), tùy kết quả định giá\n" +" BTHỨC. Biểu thức có thể kiểu một ngôi hoặc hai ngôi. Biểu thức\n" +" một ngôi thường dùng để kiểm tra trạng thái tập tin. Ngoài ra còn\n" +" có toán tử chuỗi và so sánh số.\n" +" \n" +" Hành vi của lệnh test phụ thuộc vào số đối số. Đọc sổ tay hướng dẫn của\n" +" bash để có mô tả đầy đủ.\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" +" -a TẬP-TIN Đúng nếu tập tin tồn tại.\n" +" -b TẬP-TIN Đúng nếu tập tin là biệt khối.\n" +" -c TẬP-TIN Đúng nếu tập tin là đặc biệt ký tự.\n" +" -d TẬP-TIN Đúng nếu tập tin là thư mục.\n" +" -e TẬP-TIN Đúng nếu tập tin tồn tại.\n" +" -f TẬP-TIN Đúng nếu tập tin tồn tại và là tập tin thường\n" +" -g TẬP-TIN Đúng nếu tập tin là set-group-id.\n" +" -h TẬP-TIN Đúng nếu tập tin là liên kết mềm.\n" +" -L TẬP-TIN Đúng nếu tập tin là liên kết mềm.\n" +" -k TẬP-TIN Đúng nếu tập tin có bit “sticky”.\n" +" -p TẬP-TIN Đúng nếu tập tin là ống dẫn có tên.\n" +" -r TẬP-TIN Đúng nếu tập tin bạn đọc được.\n" +" -s TẬP-TIN Đúng nếu tập tin tồn tại và không rỗng.\n" +" -S TẬP-TIN Đúng nếu tập tin là socket.\n" +" -t FD Đúng nếu FD được mở trên thiết bị cuối.\n" +" -u TẬP-TIN Đúng nếu tập tin là set-user-id.\n" +" -w TẬP-TIN Đúng nếu tập tin ghi được (bởi bạn).\n" +" -x TẬP-TIN Đúng nếu tập tin chạy được (bởi bạn).\n" +" -O TẬP-TIN Đúng nếu tập tin thực tế được bạn sở hữu.\n" +" -G TẬP-TIN Đúng nếu tập tin thực tế được nhóm của bạn sở hữu.\n" +" -N TẬP-TIN Đúng nếu tập tin đã bị sửa đổi từ lần đọc cuối.\n" +" \n" +" TẬP-TIN1 -nt TẬP-TIN2\n" +" Đúng nếu tập tin 1 mới hơn tập tin 2 (dựa theo\n" +" ngày sửa đổi)\n" +" \n" +" TẬP-TIN1 -ot TẬP-TIN2\n" +" Đúng nếu tập tin 1 cũ hơn tập tin 2.\n" +" \n" +" TẬP-TIN1 -ef TẬP-TIN2\n" +" Đúng nếu tập tin 1 là liên kết cứng tớ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" +" -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ỖI\n" +" CHUỖI Đúng nếu chuỗi khác 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" +" CHUỖI1 = CHUỖI2 Đúng nếu hai chuỗi bằng nhau.\n" +" CHUỖI1 != CHUỖI2 Đúng nếu hai chuỗi khác nhau.\n" +" CHUỖI1 < CHUỖI2 Đúng nếu CHUỖI1 xếp trước CHUỖI2 theo thứ tự từ " +"điển.\n" +" CHUỖI1 > CHUỖI2 Đúng nếu CHUỖI1 xếp sau CHUỖI2 theo 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" +" -o TÙY_CHỌN Đúng nếu tùy chọn hệ vỏ này được bật.\n" +" -v BIẾN Đúng nếu BIẾN hệ vỏ này được đặt\n" +" -R BIẾN Đúng nếu BIẾN hệ vỏ này được đặt là tham chiếu tên.\n" +" ! BTHỨC Đúng nếu biểu thức này không đúng.\n" +" BTHỨC1 -a BTHỨC2 Đúng nếu cả hai biểu thức là đúng.\n" +" BTHỨC1 -o BTHỨC2 Đúng nếu một hoặc hai biểu thức đú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." +" ĐỐI-SỐ1 OP ĐỐI-SỐ2\n" +" Phép thử số học. OP (toán tử) là một trong -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Phép toán số học hai ngôi trả về đúng nếu ĐỐI-SỐ1 bằng, khác, nhỏ\n" +" hơn, nhỏ hơn hoặc bằng, lớn hơn, lớn hơn hoặc bằng ĐỐI-SỐ2.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu BTHỨC định giá là Đúng; không thành công\n" +" nếu BTHỨC định giá thành Sai hay đối số được chỉ ra sai." -#: builtins.c:1299 +#: builtins.c:1344 msgid "" "Evaluate conditional expression.\n" " \n" @@ -4221,12 +4506,11 @@ msgid "" " 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ở." +" \n" +" Lệnh này cùng chức năng lệnh tích hợp \"test\", nhưng đối số cuối\n" +" cùng phải là ký tự “]” để khớp với “[” ở đầu." -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" @@ -4239,13 +4523,13 @@ msgid "" 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" +" In thời lượng chạy ở mức người dùng và hệ thống của hệ vỏ và các\n" +" tiến trình con.\n" "\n" -"\tTrạng thái thoát:\n" -"\tLúc nào cũng thành công." +" Trạng thái thoát:\n" +" Lúc nào cũng thành công." -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" @@ -4261,7 +4545,15 @@ msgid "" " \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" +" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. " +"If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or " +"a\n" +" script run by the . or source builtins finishes executing. A " +"SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause " +"the\n" +" shell to exit when the -e option is enabled.\n" " \n" " If no arguments are supplied, trap prints the list of commands " "associated\n" @@ -4280,42 +4572,41 @@ msgid "" " 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 ,\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 +"Bẫy tín hiệu và sự kiện khác.\n" +"\n" +" Định nghĩa và kích hoạt các bộ xử lý khi hệ vỏ nhận được tín hiệu\n" +" hay các điều kiện khác.\n" +"\n" +" ĐỐI-SỐ là một lệnh cần đọc và thực thi khi hệ vỏ nhận được tín\n" +" hiệu theo đặc tả tín hiệu ĐTTH. Nếu không có ĐỐI-SỐ (và chỉ cung\n" +" cấp một ĐTTH), hoặc cung cấp “-”. mỗi tín hiệu được xác định thì\n" +" được đặt lại về giá trị gốc. Nếu ĐỐI-SỐ là chuỗi rỗng thì mỗi ĐTTH\n" +" bị hệ vỏ và những lệnh bên trong bỏ qua.\n" +"\n" +" Nếu ĐTTH là EXIT (0) thì ĐỐI-SỐ được thực thi khi thoát\n" +" khỏi hệ vỏ. Nếu là DEBUG, ĐỐI-SỐ được thực thi trước mỗi lệnh đơn\n" +" giản. Nếu là RETURN, ĐỐI-SỐ được thực thi mỗi khi hàm hệ vỏ hay\n" +" một văn lệnh, được chạy bởi lệnh “.” hoặc “source”. kết thúc thực\n" +" thi. ĐTTH ERR nghĩa là thực thi ĐỐI-SỐ mỗi khi lệnh gặp\n" +" lỗi dẫn đến thoát hệ vỏ khi bật tùy chọn -e.\n" +" \n" +" Nếu không có đối số, “trap” sẽ in danh sách của các lệnh gắn với\n" +" các tín hiệu.\n" +" \n" +" Tùy chọn:\n" +" -l\tin danh sách tên tín hiệu và mã số tương ứng\n" +" -p\thiển thị lệnh bắt tương ứng với mỗi ĐTTH\n" +"\n" +" Mỗi ĐTTH hoặc là tên tín hiệu trong , hoặc mã\n" +" số tín hiệu. Tên tín hiệu không phân biệt chữ hoa/thường, và không\n" +" bắt buộc phải dùng tiền tố SIG. Có thể gửi tín hiệu cho hệ vỏ bằng\n" +" \"kill -signal $$\".\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra ĐTTH sai hay tùy chọn\n" +" sai." + +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -4324,18 +4615,18 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, respectively\n" " \n" " Arguments:\n" " NAME\tCommand name to be interpreted.\n" @@ -4345,36 +4636,35 @@ msgid "" "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 +" \n" +" Đối với mỗi TÊN, chỉ ra cách thông dịch lệnh khi được thực thi\n" +" theo tên lệnh.\n" +" \n" +" Tùy chọn:\n" +" -a\thiển thị mọi vị trí chứa tập tin thực thi được có TÊN;\n" +" \tkhông đặt tùy chọn “-p” thì bao gồm các bí danh, lệnh\n" +" \ttích hợp và hàm.\n" +" -f\tngăn tra cứu hàm hệ vỏ\n" +" -P\tbuộc tìm kiếm PATH đối với mỗi TÊN, thậm chí nếu nó là\n" +" \tbí danh, lệnh tích hợp hay hàm, và trả lại tên của tập\n" +" \ttin trên đĩa mà sẽ được thực thi\n" +" -p\ttrả về hoặc tên của tập tin trên đĩa mà sẽ được thực\n" +" \t\tthi, hoặc gì cả “type -t TÊN” sẽ không trả về “file”\n" +" \t\t(tập tin).\n" +" -t\txuất một trong những từ đơn “alias”, “keyword”, “function”,\n" +" \t“builtin”, “file” hoặc “”, nếu TÊN tương ứng là bí danh,\n" +" \ttừ khóa,hàm, lệnh hệ vỏ tích hợp, tập tin\n" +" \ttrên đĩa, hoặc không tìm thấy.\n" +" \n" +" Đối số:\n" +" TÊN\ttên câu lệnh cần giải thích.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu tìm thấy tất cả các TÊN; bị lỗi nếu không tìm " +"thấy." + +#: builtins.c:1432 +#, fuzzy msgid "" "Modify shell resource limits.\n" " \n" @@ -4392,6 +4682,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -4403,6 +4694,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -4417,52 +4713,51 @@ msgid "" " 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 +"Sửa đổi giới hạn tài nguyên hệ vỏ.\n" +" \n" +" Điều khiển tài nguyên sẵn có của hệ vỏ và các tiến trình nó tạo ra,\n" +" trên hệ thống hỗ trợ điểu khiển tài nguyên như vậy.\n" +" \n" +" Tùy chọn:\n" +" -S\tdùng giới hạn tài nguyên “soft” (mềm)\n" +" -H\tdùng giới hạn tài nguyên “hard” (cứng)\n" +" -a\tthông báo mọi giới hạn hiện thời\n" +" -b\tkích cỡ của vùng đệm socket\n" +" -c\tkích cỡ tối đa của tập tin core được tạo\n" +" -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" +" -e\tmức ưu tiên lập lịch cao nhất (“nice”)\n" +" -f\tkích cỡ tập tin tối đa được ghi bởi hệ vỏ và tiến trình con\n" +" -i\tsố tín hiệu bị hoãn tối đa\n" +" -k\tsố lượng kqueues được phân bổ tối đa cho tiến trình này\n" +" -l\tkích cỡ tối đa mà tiến trình có thể khóa vào bộ nhớ\n" +" -m\tkích cỡ tập nội trú (RSS) tối đa\n" +" -n\tsố bộ mô tả tập tin tối đa được mở\n" +" -p\tkích thước vùng đệm ống dẫn\n" +" -q\tsố byte tối đa trong hàng đợi thông điệp POSIX\n" +" -r\tmức ưu lập lịch thời gian thực cao nhất\n" +" -s\tkích thước ngăn xếp tối đa\n" +" -t\tlượng thời gian cpu tối đa theo giây\n" +" -u\tsố tiến trình người dùng tối đa\n" +" -v\tkích cỡ của bộ nhớ ảo\n" +" -x\tsố khóa tập tin tối đa\n" +" -P\tsố lượng thiết bị cuối ảo tối đa\n" +" -T\tsố lượng tuyến trình tối đa\n" +" \n" +" Không phải tất cả các tùy-chọn này đều sẵn sàng trên mọi nền tảng.\n" +" \n" +" Nếu có GIỚI_HẠN thì nó là giá trị mới của tài nguyên được ghi. Ba\n" +" giá trị GIỚI_HẠN đặc biệt “soft”, “hard” và “unlimited” tương ứng\n" +" là giới hạn mềm hiện tại, giới hạn cứng hiện tại và không giới\n" +" hạn. Không có thì in giá trị hiện thời của tài nguyên được ghi.\n" +" Ngầm định “-f” nếu không chỉ định tùy chọn.\n" +" \n" +" Giá trị tính theo khối 1024 byte, trừ -t tính theo giây, -p theo\n" +" khối 512 byte và -u theo số tiến trình.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay có lỗi phát sinh." + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -4481,79 +4776,93 @@ msgid "" 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" +" Đặt mặt nạ tạo tập tin của người dùng thành CHẾ_ĐỘ. Không tham số\n" +" thì in chế độ hiện thời.\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ếu CHẾ_ĐỘ bắt đầu bằng chữ số thì hiểu là số bát phân; không thì\n" +" nó là chuỗi chế độ ký hiệu đượ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" +" Tùy chọn:\n" +" -p\tkhông có CHẾ_ĐỘ thì xuất theo định dạng dùng lại\n" +" \tlàm dữ liệu đầu vào\n" +" -S\tin kết xuất ký hiệu thay vì 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." +" Trạng thái thoát:\n" +" Trả lại thành công nếu không có CHẾ_ĐỘ sai hay tùy chọn sai." -#: builtins.c:1448 +#: builtins.c:1503 +#, fuzzy 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of " +"IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns " +"its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, " +"before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" -"Đợi công việc chạy xong, sau đó trả lại trạng thái thoát.\n" +"Chờ công việc chạy xong và trả về 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" +" Đợi tiến trình xác định bởi ID, có thể là mã số tiến trình hay đặc\n" +" tả công việc, sau đó trả về trạng thái kết thúc của nó. Không có\n" +" ID thì đợi tất cả các tiến trình con đang chạy và trạng thái trả\n" +" về là không. Nếu ID là đặc tả công việc thì đợi tất cả các tiến\n" +" trình vẫn nằm trong ống dẫn của công việc đó.\n" +" \n" +" Nếu tùy-chọn -n được áp dùng thì đợi cho đến khi công việc kế chấm dứt " +"và\n" +" trả về trạng thái thoát của nó.\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." +" Trạng thái thoát:\n" +" Trả về trạng thái của ID cuối; không thành công nếu ID sai hoặc đưa\n" +" ra tùy chọn sai." -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination " +"status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an " +"invalid\n" +" option is 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" +"Đợi tiến trình chạy xong và trả về trạng thái thoát.\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" +" Đợi từng tiến trình đã chỉ ra theo PID và báo cáo trạng thái kết thúc\n" +" của nó. Nếu không chỉ ra PID thì đợi tất cả các tiến trình con đang\n" +" chạy, và mã về là không. PID phải là 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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của PID; không thành công nếu PID sai, hoặc nếu\n" +" đưa ra tùy chọn sai." -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -4565,19 +4874,18 @@ msgid "" " 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" +"Thực thi lệnh cho từng phần tử nằm trong 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" +" Vòng lặp “for” thực thi lệnh cho từng phần tử nằm trong danh sách. " +"Không\n" +" ghi “in TỪ …” thì ngầm định “in \"$@\"”. Đối với mỗi phần tử trong\n" +" danh sách, đặt giá trị phần tử đó cho biến TÊN rồi thực thi CÁC;CÂU;" +"LỆNH.\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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -4595,18 +4903,19 @@ msgid "" 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" +" Tương đương với:\n" +" \t(( BTHỨC1 ))\n" +" \twhile (( BTHỨC2 )); do\n" +" \t\tCÁC;CÂU;LỆNH;\n" +" \t\t(( BTHỨC3 ))\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." +" BTHỨC1, BTHỨC2 và BTHỨC3 là biểu thức số học. Ngầm định 1 cho bất\n" +" kì biểu thức bỏ trống nào.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -4625,27 +4934,22 @@ msgid "" " 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." +"Chọn từ từ một danh sách và thực thi lệnh.\n" +"\n" +" TỪ được triển khai, phát sinh danh sách từ. Tập hợp các từ kết quả được\n" +" in ra đầu ra lỗi chuẩn với một con số ở phía trước. Ngầm định “in\n" +" \"$@\"” nếu không có “in TỪ”. Dấu nhắc PS3 được hiển thị và một dòng\n" +" được đọc từ đầu vào tiêu chuẩn. Nếu dòng bao gồm số tương ứng với từ\n" +" hiển thị thì đặt từ đó vào biến TÊN. Nếu dòng rỗng thì hiển thị\n" +" lại TỪ và dấu nhắc. Nếu gặp EOF thì kết thúc. Đặt TÊN là rỗng với\n" +" các giá trị khác. Dòng đọc được lưu vào biến REPLY. LỆNH được thực\n" +" thi sau mỗi lần chọn đến khi gặp lệnh “break”.\n" +"\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -4660,23 +4964,21 @@ msgid "" " 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" +"Thông báo thời gian sử dụng để thực thi ống dẫn.\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" +" Thực thi ỐNG-DẪN và in tóm tắt thời gian thật, thời gian CPU người\n" +" dùng, và thời gian CPU hệ thống được dùng để thực thi ống dẫn đến\n" +" khi 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" +" Tùy chọn:\n" +" -p\tin bản tóm tắt thời gian theo định dạng POSIX\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" +" Giá trị biến TIMEFORMAT đượ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." +" Trạng thái thoát:\n" +" Trạng thái trả về là trạng thái trả về của ỐNG-DẪN." -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -4686,16 +4988,15 @@ msgid "" " 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" +"Thực thi lệnh chọn theo 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" +" Thực thi LỆNH một cách chọn dựa vào TỪ tương ứng với MẪU. Nhiều\n" +" mẫu cách nhau 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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." -#: builtins.c:1563 +#: builtins.c:1631 msgid "" "Execute commands based on conditional.\n" " \n" @@ -4715,62 +5016,65 @@ msgid "" " 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 +"Thực thi câu lệnh có điều kiện.\n" +"\n" +" Danh sách “if CÁC;CÂU;LỆNH” được thực thi. Nếu trạng thái thoát là " +"không,\n" +" thì thực thi danh sách “then LỆNH”. Không thì thực thi lần lượt\n" +" mỗi danh sách “elif LỆNH”. và nếu trạng thái thoát là không, thì\n" +" thực thi danh sách “then LỆNH” tương ứng và hoàn tất lệnh\n" +" “if”. Không thì thực thi danh sách “else LỆNH” nếu có. Trạng thái\n" +" thoát của toàn bộ lệnh “if” là trạng thái của lệnh cuối cùng được\n" +" chạy, hoặc không nếu không có điều kiện nào trả về kết quả là\n" +" đúng.\n" +"\n" +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." + +#: builtins.c:1648 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" 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" +"Thực thi lệnh chừng nào phép thử còn 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" +" Khai triển và thực thi CÁC;CÂU;LỆNH chừng nào lệnh cuối cùng trong " +"“while” LỆNH\n" +" có trạng thái thoát là 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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." -#: builtins.c:1592 +#: builtins.c:1660 +#, 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS " +"has\n" +" 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" +"Thực thi lệnh chừng nào phép thử vẫn 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" +" Khai triển và thực thi CÁC;CÂU;LỆNH chừng nào lệnh cuối cùng trong " +"“until” LỆNH\n" +" có trạng thái thoát là khác 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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." -#: builtins.c:1604 +#: builtins.c:1672 +#, fuzzy msgid "" "Create a coprocess named NAME.\n" " \n" @@ -4780,20 +5084,18 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" -"Tạo một tiến trình đồng chạy có tên TÊN.\n" +"Tạo tiến trình phụ 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" +" Thực hiện LỆNH không đồng bộ có đầu vào/ra chuẩn nối đến ống dẫn\n" +" của bộ mô tả tập tin chỉ số 0 và 1 trong biến mảng TÊN trong hệ vỏ\n" +" được thực thi. TÊ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." +" Trạng thái thoát:\n" +" Trả lại trạng thái thoát của câu LỆNH." -#: builtins.c:1618 +#: builtins.c:1686 msgid "" "Define shell function.\n" " \n" @@ -4806,18 +5108,17 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is readonly." msgstr "" -"Xác định chức năng trình bao.\n" +"Định nghĩa hàm hệ vỏ.\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" +" Tạo hàm hệ vỏ tên TÊN. Khi được gọi dưới dạng một câu lệnh đơn\n" +" giản, TÊN chạy LỆNH trong ngữ cảnh của hệ vỏ gọi. Khi TÊN được\n" +" gọi, các đối số được gửi cho hàm dạng $1…$n, và tên hàm nằm\n" +" 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." +" Trạng thái thoát:\n" +" Trả lại thành công nếu TÊN không phải chỉ đọc." -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -4827,16 +5128,15 @@ msgid "" " 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" +"Nhóm lệnh làm 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" +" Chạy tập hợp các lệnh trong cùng một nhóm. Đây là một cách để\n" +" chuyển hướng toàn bộ một nhóm lệnh.\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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của câu lệnh cuối cùng được chạy." -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -4851,35 +5151,34 @@ msgid "" 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" +" Tương đương với đối số đặc tả công việc ĐTCV trong lệnh “fg”.\n" +" Tiếp tục lại công việc bị dừng chạy hay chạy nền. ĐTCV có thể xác\n" +" định tên công việc hoặc mã số công việc. Đặt “&” sau ĐTCV sẽ chạy\n" +" công việc ở nền, như là đối số đặc tả công việc trong “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." +" Trạng thái thoát:\n" +" Trả lại trạng thái của công việc đã tiếp tục lại." -#: builtins.c:1659 +#: builtins.c:1727 +#, fuzzy msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\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" +"Định giá biểu 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" +" BTHỨC được tính tùy theo các quy tắc về định giá số học.\n" +" Tương đương với “let BTHỨ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." +" Trạng thái thoát:\n" +" Trả lại 1 nếu BTHỨC tính là 0; không thì trả lại 0." -#: builtins.c:1671 +#: builtins.c:1739 msgid "" "Execute conditional command.\n" " \n" @@ -4906,30 +5205,29 @@ msgid "" " 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 +"Thực thi câu lệnh có điều kiện.\n" +"\n" +" Trả về trạng thái 0 hoặc 1 tùy vào phép tính biểu thức điều kiện\n" +" BTHỨC. Biểu thức bao gồm các thành phần dùng trong lệnh tích hợp\n" +" “test” và có thể được tổ hợp bằng các toán tử sau:\n" +" \n" +" ( BTHỨC )\t\tTrả về giá trị của BTHỨC\n" +" ! BTHỨC\t\tĐúng nếu BTHỨC là không đúng. Ngược lại sai\n" +" BTHỨC1 && BTHỨC2\tĐúng nếu cả hai biểu thức đều đúng. Ngược lại sai.\n" +" BTHỨC1 || BTHỨC2\tĐúng nếu một trong hai biểu thức đúng. Ngược lại " +"sai.\n" +" \n" +" Khi dùng toán từ “==” và “!=”, chuỗi bên phải toán tử được dùng\n" +" làm mẫu, và thực hiện khớp mẫu. Khi dùng toán tử “=~”, chuỗi bên\n" +" phải toán tử được dùng làm biểu thức chính quy.\n" +"\n" +" Toán tử “&&” và “||” không tính BTHỨC2 nếu BTHỨC1 đủ để xác định\n" +" giá trị toàn biểu thức.\n" +"\n" +" Trạng thái thoát:\n" +" 0 hay 1 phụ thuộc vào giá trị của BTHỨC." + +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -4982,60 +5280,58 @@ msgid "" " 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" +"Tên và cách dùng các biến hệ vỏ thường dùng.\n" +"\n" +" BASH_VERSION\n" +" \tThông tin phiên bản của Bash đang chạy.\n" +" CDPATH\tDanh sách thư mục cách nhau bằng dấu hai chấm để tìm\n" +" \tđối số thư mục trong lệnh “cd”.\n" +" GLOBIGNORE\tDanh sách mẫu cách nhau bằng dấu hai chấm diễn tả\n" +" \ttên tập tin bị bỏ qua không bung đường dẫn.\n" +" HISTFILE\tTên tập tin chứa lịch sử câu lệnh của bạn.\n" +" HISTFILESIZE\n" +" \tSố dòng tối đa tập tin này có thể chứa.\n" +" HISTSIZE\tSố dòng tối đa mà hệ vỏ đang chạy có thể truy cập.\n" +" HOME\tTên đường dẫn đầy đủ của thư mục đăng nhập của bạn.\n" +" HOSTNAME\tTên của máy hiện thời của bạn.\n" +" HOSTTYPE\tLoại CPU phiên bản Bash này đang chạy.\n" +" IGNOREEOF\tĐiều khiển hành vi hệ vỏ khi nhận EOF là dữ liệu nhập\n" +" \tduy nhất. Đặt thì giá trị của nó là EOF có thể gặp\n" +" \tliên tục trên một dòng rỗng trước khi hệ vỏ kết thúc\n" +" \t(mặc định là 10). Không đặt thì EOF nghĩa là kết thúc\n" +" \tnhập.\n" +" MACHTYPE\tChuỗi mô tả hệ thống Bash đang chạy.\n" +" MAILCHECK\tSố giây giữa hai lần Bash kiểm tra có thư mới không.\n" +" MAILPATH\tDanh sách tên tập tin cách nhau bằng dấu hai chấm\n" +" \tđể Bash kiểm tra có thư mới không.\n" +" OSTYPE\tPhiên bản UNIX Bash đang chạy.\n" +" PATH\tDanh sách thư mục cách nhau bằng dấu hai chấm để tìm lệnh.\n" +" PROMPT_COMMAND\n" +" \tLệnh cần thực hiện trước khi in dấu nhắc chính.\n" +" PS1\t\tChuỗi dấu nhắc chính.\n" +" PS2\t\tChuỗi dấu 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 +" SHELLOPTS\tDanh sách tùy chọn hệ vỏ được bật cách nhau bằng\n" +" \tdấu hai chấm.\n" +" TERM\tTên 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ê thời gian của lệnh “time”.\n" +" auto_resume\tGiá trị khác rỗng thì trước tiên tìm một từ lệnh xuất\n" +" \thiện một mình trên một dòng, trong danh sách các công\n" +" \tviệc bị dừng chạy. Tìm ra thì đặt công việc đó vào nền\n" +" \ttrước. Giá trị “exact” có nghĩa là từ lệnh phải tương\n" +" \tứng chính xác với một câu lệnh trong danh sách các\n" +" \tcông việc bị dừng chạy. Giá trị “substring” có nghĩa\n" +" \tlà từ lệnh phải tương ứng với một chuỗi phụ của công\n" +" \tviệc đó.\n" +" histchars\tCác ký tự điều khiển bung và thay thế lịch sử. Ký tự\n" +" \tđầu tiên thường là ký tự thay thế lịch sử, thường là\n" +" \t“!”. Ký tự thứ hai là ký tự thay thế nhanh, thường là\n" +" \t“^”. Ký tự thứ ba là ký tự ghi chú về lịch sử, thường\n" +" \tlà “#”.\n" +" HISTIGNORE\tDanh sách mẫu cách bằng dấu hai chấm dùng để quyết định\n" +" \tnhững câu lệnh nào nên được lưu vào danh sách lịch sử.\n" + +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -5045,19 +5341,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5065,31 +5361,31 @@ msgid "" " 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 +"Thêm thư mục vào ngăn xếp.\n" +" \n" +" Thêm thư mục vào đỉnh của ngăn xếp thư mục, hoặc xoay ngăn xếp, làm cho\n" +" thư mục mới đầu ngăn xếp là thư mục làm việc hiện thời. Không có đối\n" +" số thì trao đổi hai thư mục đầu.\n" +" \n" +" -n\tNgăn chuyển đổi bình thường khi thêm thư mục\n" +" \tvào ngăn xếp, để thao tác chỉ ngăn xếp.\n" +" \n" +" +N\tXoay ngăn xếp để thư mục thứ N (đếm từ trái danh sách\n" +" \t“dirs” (bắt đầu từ số không) dời lên đầu.\n" +" \n" +" -N\tXoay ngăn xếp để thư mục thứ N (đếm từ phải danh sách\n" +" \t“dirs” (bắt đầu từ số không) dời lên đầu.\n" +" \n" +" dir\tThêm THMỤC vào đầu ngăn xếp thư mục, cho nó làm thư mục\n" +" \tlàm việc hiện thời mới.\n" +" \n" +" Lệnh tích hợp “dirs” hiển thị ngăn xếp thư mục.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra đối số sai, cũng không sai\n" +" chuyển đổi thư mục." + +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -5098,16 +5394,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -5115,34 +5411,29 @@ msgid "" " 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." +"Gỡ bỏ thư mục khỏi ngăn xếp.\n" +" \n" +" Gỡ bỏ thư mục khỏi ngăn xếp thư mục. Không có đối số thì gỡ bỏ thư\n" +" mục đầu khỏi ngăn xếp và “cd” sang thư mục đầu mới.\n" +" \n" +" -n\tNgăn chuyển đổi bình thường khi gỡ bỏ thư mục\n" +" \tkhỏi ngăn xếp, để thao tác chỉ ngăn xếp.\n" +" \n" +" +N\tGỡ bỏ thư mục thứ N (đếm từ trái danh sách\n" +" \t“dirs” (bắt đầu từ số không). Ví dụ: “popd +0” bỏ\n" +" \tthư mục cuối cùng, “popd +1” bỏ thư mục thứ hai.\n" +" \n" +" -N\tGỡ bỏ thư mục thứ N (đếm từ phải danh sách\n" +" \t“dirs” (bắt đầu từ số không). Ví dụ: “popd -0” bỏ\n" +" \tthư mục cuối cùng, “popd -1” bỏ thư mục giáp cuối.\n" +" \n" +" Lệnh tích hợp “dirs” hiển thị ngăn xếp thư mục.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra đối số sai, cũng không sai\n" +" chuyển đổi thư mục." -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -5153,59 +5444,56 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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 +"Hiển thị ngăn xếp thư mục.\n" +" \n" +" Hiển thị danh sách các thư mục được nhớ hiện thời. Các thư mục\n" +" tìm thấy chỗ của chúng trong danh sách với lệnh “pushd”;\n" +" bạn có thể lấy bản sao dự phòng thông qua danh sách với lệnh “popd”.\n" +" \n" +" Tùy chọn:\n" +" -c\txóa mọi phần tử trong ngăn xếp thư mục\n" +" -l\tđừng in phiên bản thư mục có dấu ngã\n" +" \t(tương đối so với thư mục chính của người dùng)\n" +" -p\tin ngăn xếp thư mục, mỗi dòng một mục\n" +" -v\tin ngăn xếp thư mục, mỗi dòng một mục kèm vị trí trong ngăn xếp\n" +" \n" +" Đối số:\n" +" +N\thiển thị mục thứ N bắt đầu từ bên trái danh sách\n" +" được hiển thị bằng “dirs” khi được gọi mà không đưa ra\n" +" tùy chọn, bắt đầu từ số không.\n" +" \n" +" -N\thiển thị mục thứ N bắt đầu từ bên phải danh sách\n" +" được hiển thị bằng “dirs” khi được gọi mà không đưa ra\n" +" tùy chọn, bắt đầu từ số không.\n" +" \n" +" Trạng thái thoát:\n" +" Trả về thành công nếu không đưa ra tùy chọn sai hay gặp lỗi." + +#: builtins.c:1917 +#, fuzzy 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -5218,24 +5506,25 @@ msgid "" " 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." +"Đặt và bỏ các tùy chọn hệ vỏ.\n" +" \n" +" Thay đổi thiết lập của mỗi tùy chọn hệ vỏ TÊN_TÙY_CHỌN. Không có\n" +" đối số tùy chọn thì liệt kê tất cả các tùy chọn hệ vỏ kèm chỉ dẫn\n" +" tùy chọn được đặt hay không.\n" +" \n" +" Tùy chọn:\n" +" -o\thạn chế TÊN_TÙY_CHỌN những tên được định nghĩa\n" +" \tđể sử dụng với “set -o”\n" +" -p\tin mỗi tùy chọn hệ vỏ kèm trạng thái\n" +" -q\tngăn kết xuất\n" +" -u\ttắt TÊN_TÙY_CHỌN\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu TÊN_TÙY_CHỌN được bật; không thành công nếu\n" +" đưa ra tùy chọn sai hay TÊN_TÙY_CHỌN bị tắt." -#: builtins.c:1868 +#: builtins.c:1938 +#, fuzzy msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -5252,41 +5541,58 @@ msgid "" "successive\n" " argument.\n" " \n" -" In addition to the standard format specifications described in printf" -"(1)\n" -" and printf(3), printf interprets:\n" +" In addition to the standard format specifications described in " +"printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a " +"format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as " +"appropriate,\n" +" had been supplied.\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." +"Định dạng và in ĐỐI-SỐ theo điều khiển của ĐỊNH_DẠNG.\n" +" \n" +" Tùy chọn:\n" +" -v BIẾN\tgán kết xuất cho biến hệ vỏ này thay vì\n" +" \thiển thị nó trên đầu ra chuẩn\n" +" \n" +" ĐỊNH_DẠNG là chuỗi ký tự mà chứa ba kiểu đối tượng: ký tự bình\n" +" thường, cái này được chép ra đầu ra chuẩn; dãy ký tự thoát, dùng để\n" +" chuyển đổi sau đó sao chép sang đầu ra chuẩn; và các ký hiệu đặc tả định " +"dạng,\n" +" mỗi đặc tả này tác động lên đối số tương ứng.\n" +" \n" +" Ngoài đặc tả định dạng chuẩn được dùng trong printf(1) và printf(3),\n" +" printf được hiểu những đặc tả sau:\n" +" \n" +" %b\tkhai triển dãy thoát gạch chéo ngược trong đối số tương ứng\n" +" %q\ttrích dẫn đối số theo cách dùng lại làm dữ liệu đầu vào hệ vỏ\n" +" %(fmt)T\txuất chuỗi ngày tháng theo định dạng FMT từ strftime(3)\n" +" \n" +" Định dạng được dùng lại để có thể dùng hết đối số. Nếu\n" +" ở đây có ít đối số hơn yêu cầu của định dạng, định dạng thừa đó được\n" +" xử lý theo cách là sẽ có giá trị bằng số không hay chuỗi rỗng,\n" +" được áp dụng.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra tùy chọn sai hay gặp lỗi khi ghi\n" +" hay gán." -#: builtins.c:1895 +#: builtins.c:1974 #, fuzzy msgid "" "Specify how arguments are to be completed by Readline.\n" @@ -5300,38 +5606,45 @@ msgid "" " 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are " +"supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -" +"I.\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 +"Chỉ định cách tự hoàn thiện đối số bằng Readline.\n" +" \n" +" Đối với mỗi TÊN, ghi rõ các đối số sẽ được tự hoàn thiện như thế nào.\n" +" Không đưa ra tùy chọn thì in ra các đặc tả tự hoàn thiện bằng một cách\n" +" cho phép dùng lại đặc tả làm dữ liệu nhập vào.\n" +" \n" +" Tùy chọn:\n" +" -p\tin đặc tả tự hoàn thiện đã tồn tại theo định dạng dùng lại được\n" +" -r\tgỡ bỏ đặc tả tự hoàn thiện cho mỗi TÊN,\n" +" \thoặc nếu có TÊN thì gỡ bỏ tất cả các đặc tả tự hoàn thiện\n" +" -D\táp dụng các sự hoàn thành và hành động làm mặc định\n" +" \tcho câu lệnh mà không xác định sự hoàn thành riêng\n" +" -E\táp dụng các sự hoàn thành và hành động cho câu lệnh “trống”\n" +" \t(empty) -- thử hoàn thành trên dòng trắng\n" +" \n" +" Khi chức năng tự hoàn thiện được thử, những hành động được làm theo thứ\n" +" tự của những tùy chọn chữ HOA bên trên. Tùy chọn -D có quyền ưu tiên\n" +" hơn -E. \n" +" Trạng thái thoát:\n" +" Trả lại thành công nếu không đưa ra tùy chọn sai hay gặp lỗi." + +#: builtins.c:2004 msgid "" "Display possible completions depending on the options.\n" " \n" @@ -5343,24 +5656,23 @@ msgid "" " 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." +"Hiển thị từ gợi ý có thể phụ thuộc vào các tùy chọn.\n" +" \n" +" Dự định dùng từ bên trong một chức năng hệ vỏ mà tạo các việc\n" +" tự hoàn thiện có thể làm. Nếu đưa ra đối số TỪ vẫn tùy chọn, thì tạo\n" +" các kết quả tương ứng với TỪ.\n" +" \n" +" Trạng thái thoát:\n" +" Trả 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 +#: builtins.c:2019 #, 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, " +" the completion currently being executed. If no OPTIONs are given, " "print\n" " the completion options for each NAME or the current completion " "specification.\n" @@ -5369,6 +5681,7 @@ msgid "" " \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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -5384,32 +5697,34 @@ msgid "" " 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" +"Sửa đổi hoặc hiển thị các tùy chọn tự hoàn thiện.\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" +" Sửa đổi các tùy chọn tự hoàn thiện đối với mỗi TÊN, hoặc nếu không đưa\n" +" ra TÊN thì chức năng tự hoàn thiện hiện tại sẽ được thi hành, nếu không\n" +" TÙY_CHỌN được chỉ ra, in ra các tùy chọn tự hoàn thiện cho mỗi TÊN hay\n" +" các đặc tính kỹ thuật hiện có\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" +" Tùy chọn:\n" +" -o tùy_chọn\tđặt TÙY_CHỌN tự hoàn thiện này đối với mỗi TÊN\n" +" -D\t\tSửa TÙY_CHỌN về tự hoàn thiện lệnh “default”\n" +" -E\t\tSửa TÙY_CHỌN về tự hoàn thiện lệnh “empty”\n" "\n" -"\tDùng « +o » thay cho « -o » thì tắt tùy chọn đưa ra.\n" +" Dùng “+o” thay cho “-o” thì tắt tùy chọn đưa ra.\n" "\n" -"\tĐối số :\n" +" Đố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" +" Mỗi TÊN tham chiếu đến một câu lệnh cho đó một đặc tả tự hoàn thiện\n" +" phải được xác định trước dùng tích hợp “complete”. Nếu không đưa\n" +" ra TÊN để áp dụng, thì “compopt” phải được gọi bởi một hàm đang\n" +" tạo việc tự hoàn thiện, và các tùy chọn về hàm tạo việc tự hoàn thiện " +"đang\n" +" 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." +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra tùy chọn sai, hoặc TÊN có một\n" +" đặc tả tự hoàn thiện được xác định." -#: builtins.c:1968 -#, fuzzy +#: builtins.c:2050 msgid "" "Read lines from the standard input into an indexed array variable.\n" " \n" @@ -5420,24 +5735,26 @@ msgid "" " is the default ARRAY.\n" " \n" " Options:\n" +" -d delim\tUse DELIM to terminate lines, instead of newline\n" " -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are " -"copied.\n" +"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" +"index is 0\n" +" -s count\tDiscard the first COUNT lines read\n" +" -t\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" " If not supplied with an explicit origin, mapfile will clear ARRAY " "before\n" @@ -5448,52 +5765,113 @@ msgid "" "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 " +"Đọc các dòng từ đầu vào tiêu chuẩn vào một biến mảng chỉ số.\n" +" \n" +" Đọc các dòng từ đầu vào tiêu chuẩn vào biến mảng MẢNG, hoặc từ bộ\n" +" mô tả tập tin FD nếu đưa ra tùy chọn -u. Biến MAPFILE là MẢNG mặc\n" +" định.\n" +" \n" +" Tùy chọn:\n" +" -d ngăn_cách\tDùng NGĂN_CÁCH chấm dứt dòng, thay cho ký tự dòng mới\n" +" -n SỐ\tsao chép nhiều nhất SỐ dòng. Nếu là 0 thì sao chép mọi dòng.\n" +" -O GỐC\tbắt đầu gán cho MẢNG ở chỉ số GỐC. Chỉ số mặc định là 0.\n" +" -s SỐ\tbỏ qua SỐ dòng đầu tiên được đọc.\n" +" -t\tgỡ bỏ một ký tự NGĂN_CÁCH theo sau khỏi mỗi dòng được đọc\n" +" \t(mặc định là ký tự dòng mới).\n" +" -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." +" -C GỌI_NGƯỢC\tđịnh giá GỌI_NGƯỢC mỗi lần đọc LƯỢNG dòng.\n" +" -c LƯỢNG\tghi rõ số các dòng được đọc giữa hai lần GỌI_NGƯỢC.\n" +" \n" +" Đối số:\n" +" MẢNG\ttên biến mảng cần dùng cho dữ liệu tập tin.\n" +" \n" +" Nếu đưa ra -C mà không có -c thì lượng mặc định là 5000. Khi ước\n" +" lượng lời GỌI_NGƯỢC thì nó nhận chỉ số của phần tử mảng kế tiếp\n" +" được gán dưới dạng một đối số bổ sung.\n" +" \n" +" Không đưa ra một GỐC rõ ràng thì mapfile (tập tin sơ đồ) sẽ xóa\n" +" sạch MẢNG trước khi gán cho nó.\n" +" \n" +" Trạng thái thoát:\n" +" Trả lại thành công trừ phi đưa ra tùy chọn sai và MẢNG không phải\n" +" chỉ đọc hay không là một mảng chỉ số." -#: builtins.c:2001 +#: builtins.c:2086 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 »." +" \n" +" Giống với “mapfile”." + +#, c-format +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: khóa mảng liên kết không hợp lệ" + +#, fuzzy +#~ msgid "Copyright (C) 2019 Free Software Foundation, Inc." +#~ msgstr "Tác quyền (C) năm 2015 của Tổ chức Quỹ Phần mềm Tự do, Inc." + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "Trả lại ngữ cảnh của cú gọi thủ tục con hiện thời.\n" +#~ "\n" +#~ " Nếu không có BTHỨC thì trả về " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: tiến trình %5ld (%s) trong the_pipeline" -#~ 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 "Unknown Signal #" +#~ msgstr "Tín hiệu lạ #" -#~ msgid "xrealloc: cannot allocate %lu bytes" -#~ msgstr "xrealloc: không thể cấp phát %lu byte" +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "Tác quyền (C) năm 2014 của Tổ chức Quỹ Phần mềm Tự do, Inc." -#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "times" +#~ msgstr "times" + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "Tác quyền (C) năm 2009 của Tổ chức Phần mềm Tự do.\n" + +#~ msgid "" +#~ "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "" +#~ "Giấy phép GPLv2+: GNU GPL phiên bản 2 hoặc mới hơn \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". Cũng dùng BTHỨC thì trả lại\n" +#~ " " + +#~ 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 "" -#~ "xrealloc: %s:%d: không thể cấp phát lại %lu byte (%lu byte đã cấp phát)" +#~ "; thông tin thêm này có thể được sử dụng\n" +#~ "\tđể cung cấp một vết ngăn xếp (stack trace).\n" +#~ "\n" +#~ "\tGiá trị của BTHỨC ngụ ý bao nhiêu khung gọi cần lùi lại\n" +#~ "\ttương đối với cái hiện thời; khung trên cùng là khung 0." diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo new file mode 100644 index 0000000..e3171ae Binary files /dev/null and b/po/zh_CN.gmo differ diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 0000000..1869a35 --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,5522 @@ +# Chinese (Simplified) translation for bash package +# Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc. +# This file is distributed under the same license as the bash package. +# Xin Ye , 2010. +# Aron Xu , 2011. +# Anthony Fok , 2013. +# Wylmer Wang , 2014. +# Mingcong Bai , 2015. +# liushuyu , 2016. +# Mingye Wang , 2015, 2016. +# Boyuan Yang <073plan@gmail.com>, 2018, 2019, 2020. +# Wenbin Lv , 2021, 2022. +# +# 本翻译目前采用的格式约定,和其他注意事项: +# +# 1. 冒号:冒号左边最近的分句含有中文字符时,使用中文冒号,否则使用英文冒号。 +# 2. 引号:永远使用 " ",除非被引用的字符是 " 或 ',此时保留原文(一般是 ` ')。 +# 3. 括号:括号内含有中文字符时,使用中文括号,否则使用英文括号。 +# 4. 命令帮助中,单行用法里的可替换词语(如“名称”)在完整帮助中应写成 <名称>, +# 尖括号两边按照英文括号的原则加空格。 +# 5. 注意统一术语,不确定的术语先搜索此文件看看。新术语强烈推荐“术语在线”网站。 +# 6. 经常查看上下文(源代码)对翻译的正确率很有帮助。 +# +msgid "" +msgstr "" +"Project-Id-Version: bash 5.2-rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-06-18 14:25+0800\n" +"Last-Translator: Wenbin Lv \n" +"Language-Team: Chinese (simplified) \n" +"Language: zh_CN\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-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.1\n" + +#: arrayfunc.c:66 +msgid "bad array subscript" +msgstr "数组下标不正确" + +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 +#, c-format +msgid "%s: removing nameref attribute" +msgstr "%s: 正在移除名称引用属性" + +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: 无法将索引数组转换为关联数组" + +#: arrayfunc.c:777 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s: 无法为非数值的索引赋值" + +#: arrayfunc.c:822 +#, c-format +msgid "%s: %s: must use subscript when assigning associative array" +msgstr "%s: %s: 为关联数组赋值时必须使用下标" + +#: bashhist.c:455 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: 无法创建:%s" + +#: bashline.c:4479 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "bash_execute_unix_command: 无法找到命令的键映射" + +# 为了可读性,不改动外层引号 +#: bashline.c:4637 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: 第一个非空白字符不是 `\"'" + +# %c == ' 或 ",为了可读性,不改动外层引号 +#: bashline.c:4666 +#, c-format +msgid "no closing `%c' in %s" +msgstr "%2$s 中没有右 `%1$c'" + +#: bashline.c:4697 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: 缺少冒号分隔符" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "\"%s\": 无法解除绑定命令键映射" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "大括号展开:无法为 %s 分配内存" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "大括号展开:为 %u 个元素分配内存失败" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "大括号展开:为 \"%s\"分配内存失败" + +#: builtins/alias.def:131 variables.c:1817 +#, c-format +msgid "`%s': invalid alias name" +msgstr "\"%s\": 无效的别名" + +#: builtins/bind.def:122 builtins/bind.def:125 +msgid "line editing not enabled" +msgstr "未启用行编辑" + +#: builtins/bind.def:212 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "\"%s\": 无效的键映射名" + +#: builtins/bind.def:252 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: 无法读取:%s" + +#: builtins/bind.def:328 builtins/bind.def:358 +#, c-format +msgid "`%s': unknown function name" +msgstr "\"%s\": 未知的函数名" + +#: builtins/bind.def:336 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s 未与任何键绑定。\n" + +# Blame the source string. +#: builtins/bind.def:340 +#, c-format +msgid "%s can be invoked via " +msgstr "%s 已被绑定到 " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "\"%s\": 无法解除绑定" + +#: builtins/break.def:77 builtins/break.def:119 +msgid "loop count" +msgstr "循环计数" + +#: builtins/break.def:139 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "仅在 \"for\"、\"while\" 或者 \"until\" 循环中有意义" + +#: builtins/caller.def:136 +msgid "" +"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." +msgstr "" +"返回当前子例程调用的上下文。\n" +" \n" +" 不带有 <表达式> 时,返回 \"$line $filename\"。带有 <表达式> 时,\n" +" 返回 \"$line $subroutine $filename\";这个额外的信息可以用来提供\n" +" 栈跟踪 (stack trace)。\n" +" \n" +" <表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。" + +#: builtins/cd.def:327 +msgid "HOME not set" +msgstr "HOME 未设定" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "参数太多" + +#: builtins/cd.def:342 +msgid "null directory" +msgstr "空值目录" + +#: builtins/cd.def:353 +msgid "OLDPWD not set" +msgstr "OLDPWD 未设定" + +#: builtins/common.c:96 +#, c-format +msgid "line %d: " +msgstr "第 %d 行:" + +#: builtins/common.c:134 error.c:264 +#, c-format +msgid "warning: " +msgstr "警告:" + +#: builtins/common.c:148 +#, c-format +msgid "%s: usage: " +msgstr "%s: 用法:" + +#: builtins/common.c:193 shell.c:524 shell.c:866 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: 选项需要一个参数" + +#: builtins/common.c:200 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: 需要数值参数" + +#: builtins/common.c:207 +#, c-format +msgid "%s: not found" +msgstr "%s: 未找到" + +#: builtins/common.c:216 shell.c:879 +#, c-format +msgid "%s: invalid option" +msgstr "%s: 无效的选项" + +#: builtins/common.c:223 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: 无效的选项名" + +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "\"%s\": 不是有效的标识符" + +#: builtins/common.c:240 +msgid "invalid octal number" +msgstr "无效的八进制数" + +#: builtins/common.c:242 +msgid "invalid hex number" +msgstr "无效的十六进制数" + +#: builtins/common.c:244 expr.c:1574 +msgid "invalid number" +msgstr "无效的数字" + +#: builtins/common.c:252 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: 无效的信号说明符" + +#: builtins/common.c:259 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "\"%s\": 不是一个 pid 或有效的任务说明符" + +#: builtins/common.c:266 error.c:536 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: 只读变量" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s: 无法赋值" + +#: builtins/common.c:281 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s超出范围" + +#: builtins/common.c:281 builtins/common.c:283 +msgid "argument" +msgstr "参数" + +#: builtins/common.c:283 +#, c-format +msgid "%s out of range" +msgstr "%s超出范围" + +#: builtins/common.c:291 +#, c-format +msgid "%s: no such job" +msgstr "%s: 无此任务" + +#: builtins/common.c:299 +#, c-format +msgid "%s: no job control" +msgstr "%s: 无任务控制" + +#: builtins/common.c:301 +msgid "no job control" +msgstr "无任务控制" + +#: builtins/common.c:311 +#, c-format +msgid "%s: restricted" +msgstr "%s: 受限" + +#: builtins/common.c:313 +msgid "restricted" +msgstr "受限" + +#: builtins/common.c:321 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: 不是 shell 内建" + +#: builtins/common.c:330 +#, c-format +msgid "write error: %s" +msgstr "写入错误:%s" + +#: builtins/common.c:338 +#, c-format +msgid "error setting terminal attributes: %s" +msgstr "设定终端属性时出错:%s" + +#: builtins/common.c:340 +#, c-format +msgid "error getting terminal attributes: %s" +msgstr "获取终端属性时出错:%s" + +#: builtins/common.c:642 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: 获取当前目录时出错:%s:%s\n" + +#: builtins/common.c:708 builtins/common.c:710 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "%s: 有歧义的任务说明符" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "帮助在当前版本中不可用" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: 无法取消设定:只读%s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: 无法取消设定" + +#: builtins/complete.def:287 +#, c-format +msgid "%s: invalid action name" +msgstr "%s: 无效的动作名" + +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 +#, 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:846 +msgid "not currently executing completion function" +msgstr "当前未在执行补全函数" + +#: builtins/declare.def:137 +msgid "can only be used in a function" +msgstr "只能在函数中使用" + +#: builtins/declare.def:437 +msgid "cannot use `-f' to make functions" +msgstr "无法用 \"-f\" 生成函数" + +#: builtins/declare.def:464 execute_cmd.c:6132 +#, c-format +msgid "%s: readonly function" +msgstr "%s: 只读函数" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: 引用变量不能为数组" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: 不允许名称引用变量引用自身" + +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: 循环的名称引用" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "\"%s\": 名称引用变量引用的变量名无效" + +#: builtins/declare.def:856 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: 无法以这种方式销毁数组变量" + +#: builtins/declare.def:862 builtins/read.def:887 +#, c-format +msgid "%s: cannot convert associative to indexed array" +msgstr "%s: 无法将关联数组转换为索引数组" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s: 带引号的复合数组赋值已被弃用" + +#: builtins/enable.def:145 builtins/enable.def:153 +msgid "dynamic loading not available" +msgstr "动态加载不可用" + +#: builtins/enable.def:376 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "无法打开共享目标 %s:%s" + +#: builtins/enable.def:405 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "无法在共享目标 %2$s 中找到 %1$s:%3$s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: 动态内建已经加载" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "%s 的加载函数返回失败 (%d):未加载" + +#: builtins/enable.def:551 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "%s: 未动态加载" + +#: builtins/enable.def:577 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: 无法删除:%s" + +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 +#, c-format +msgid "%s: is a directory" +msgstr "%s: 是一个目录" + +#: builtins/evalfile.c:144 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: 不是普通文件" + +#: builtins/evalfile.c:153 +#, c-format +msgid "%s: file is too large" +msgstr "%s: 文件太大" + +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: 无法执行二进制文件" + +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: 无法执行:%s" + +#: builtins/exit.def:64 +#, c-format +msgid "logout\n" +msgstr "注销\n" + +#: builtins/exit.def:89 +msgid "not login shell: use `exit'" +msgstr "不是登录 shell:使用 \"exit\"" + +#: builtins/exit.def:121 +#, c-format +msgid "There are stopped jobs.\n" +msgstr "有已停止的任务。\n" + +#: builtins/exit.def:123 +#, c-format +msgid "There are running jobs.\n" +msgstr "有运行中的任务。\n" + +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 +msgid "no command found" +msgstr "未找到命令" + +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 +msgid "history specification" +msgstr "历史说明符" + +#: builtins/fc.def:444 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: 无法打开临时文件:%s" + +#: builtins/fg_bg.def:152 builtins/jobs.def:284 +msgid "current" +msgstr "当前" + +#: builtins/fg_bg.def:161 +#, 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:91 +msgid "hashing disabled" +msgstr "已禁用哈希" + +#: builtins/hash.def:139 +#, c-format +msgid "%s: hash table empty\n" +msgstr "%s: 哈希表为空\n" + +#: builtins/hash.def:267 +#, c-format +msgid "hits\tcommand\n" +msgstr "命中\t命令\n" + +#: builtins/help.def:133 +msgid "Shell commands matching keyword `" +msgid_plural "Shell commands matching keywords `" +msgstr[0] "匹配关键字 \"" + +#: builtins/help.def:135 +msgid "" +"'\n" +"\n" +msgstr "" +"\" 的 shell 命令\n" +"\n" + +#: builtins/help.def:185 +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "没有与 \"%s\" 匹配的帮助主题。尝试使用 \"help help\" 或 \"man -k %s\" 或 \"info %s\"。" + +#: builtins/help.def:223 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: 无法打开:%s" + +#: builtins/help.def:523 +#, 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 "" +"这些 shell 命令是内部定义的。输入 \"help\" 以获取本列表。\n" +"输入 \"help 名称\" 以得到有关函数 \"名称\" 的更多信息。\n" +"使用 \"info bash\" 来获得关于 shell 的更多一般性信息。\n" +"使用 \"man -k\" 或 \"info\" 来获取不在本列表中的命令的更多信息。\n" +"\n" +"名称旁边的星号 (*) 表示该命令被禁用。\n" +"\n" + +#: builtins/history.def:159 +msgid "cannot use more than one of -anrw" +msgstr "最多只能使用 -anrw 选项中的一个" + +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 +msgid "history position" +msgstr "历史位置" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s: 无效的时间戳" + +#: builtins/history.def:449 +#, c-format +msgid "%s: history expansion failed" +msgstr "%s: 历史展开失败" + +#: builtins/inlib.def:71 +#, c-format +msgid "%s: inlib failed" +msgstr "%s: inlib 失败" + +#: builtins/jobs.def:109 +msgid "no other options allowed with `-x'" +msgstr "其他选项不能与 \"-x\" 同时使用" + +#: builtins/kill.def:211 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "%s: 参数必须是进程或任务 ID" + +#: builtins/kill.def:274 +msgid "Unknown error" +msgstr "未知错误" + +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 +msgid "expression expected" +msgstr "需要表达式" + +#: builtins/mapfile.def:180 +#, c-format +msgid "%s: not an indexed array" +msgstr "%s: 不是一个索引数组" + +#: builtins/mapfile.def:276 builtins/read.def:336 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: 指定的文件描述符无效" + +#: builtins/mapfile.def:284 builtins/read.def:343 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: 无效的文件描述符:%s" + +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format +msgid "%s: invalid line count" +msgstr "%s: 无效的行数" + +#: builtins/mapfile.def:304 +#, c-format +msgid "%s: invalid array origin" +msgstr "%s: 无效的数组起始" + +#: builtins/mapfile.def:321 +#, c-format +msgid "%s: invalid callback quantum" +msgstr "%s: 无效的回调间隔" + +#: builtins/mapfile.def:354 +msgid "empty array variable name" +msgstr "空的数组变量名" + +#: builtins/mapfile.def:375 +msgid "array variable support required" +msgstr "需要数组变量支持" + +#: builtins/printf.def:430 +#, c-format +msgid "`%s': missing format character" +msgstr "\"%s\": 缺少格式字符" + +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "\"%c\": 指定的时间格式无效" + +#: builtins/printf.def:708 +#, c-format +msgid "`%c': invalid format character" +msgstr "\"%c\": 无效的格式字符" + +#: builtins/printf.def:734 +#, c-format +msgid "warning: %s: %s" +msgstr "警告:%s: %s" + +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "格式解析出现问题:%s" + +#: builtins/printf.def:919 +msgid "missing hex digit for \\x" +msgstr "使用了 \\x 但缺少十六进制数" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "使用了 \\%c 但缺少 unicode 数" + +#: builtins/pushd.def:199 +msgid "no other directory" +msgstr "无其他目录" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: 无效的参数" + +#: builtins/pushd.def:480 +msgid "" +msgstr "<无当前目录>" + +#: builtins/pushd.def:524 +msgid "directory stack empty" +msgstr "目录栈为空" + +#: builtins/pushd.def:526 +msgid "directory stack index" +msgstr "目录栈索引" + +#: builtins/pushd.def:701 +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 "" +"显示当前记住的目录列表。 使用 \"pushd\" 命令将目录加入这个列表;\n" +" 使用 \"popd\" 命令逐个回到之前加入列表的目录。\n" +" \n" +" 选项:\n" +" -c\t删除所有元素以清空目录栈\n" +" -l\t打印目录时,不表示为以波浪号 (~) 为前缀的,\n" +" \t相对于您的主目录的路径\n" +" -p\t每行一个条目打印目录栈\n" +" -v\t每行一个条目打印目录栈,前面加上在栈中的位置\n" +" \n" +" 参数:\n" +" +N\t显示 dirs 不带选项启动时显示的目录列表中左起第 N 个目录,\n" +" \t从零开始。\n" +" \n" +" -N\t显示 dirs 不带选项启动时显示的目录列表中右起第 N 个目录,\n" +" \t从零开始。" + +#: builtins/pushd.def:723 +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\t阻止添加目录至栈时通常的改变目录操作,从而仅对栈\n" +" \t进行操作。\n" +" \n" +" 参数:\n" +" +N\t轮转栈,使得第 N 个目录(\"dirs\" 显示的列表中左起,\n" +" \t从零开始)移动到栈顶。\n" +" \n" +" -N\t轮转栈,使得第 N 个目录(\"dirs\" 显示的列表中右起,\n" +" \t从零开始)移动到栈顶。\n" +" \n" +" 目录\t将 <目录> 添加到栈顶,使其成为当前工作目录。\n" +" \n" +" \"dirs\" 内建可以显示目录栈。" + +#: builtins/pushd.def:748 +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\t阻止从栈中删除目录时通常的改变目录操作,从而仅对栈进行操作。\n" +" \n" +" 参数:\n" +" +N\t删除第 N 个目录(\"dirs\" 显示的列表中左起,从零开始)。\n" +" \t例如:\"popd +0\" 删除第一个目录,\"popd +1\" 删除第二个。\n" +" \n" +" -N\t删除第 N 个目录(\"dirs\" 显示的列表中右起,从零开始)。\n" +" \t例如:\"popd -0\" 删除最后一个目录,\"popd -1\" 删除倒数第二个。\n" +" \n" +" \"dirs\" 内建可以显示目录栈。" + +#: builtins/read.def:308 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "%s: 指定的超时时间无效" + +#: builtins/read.def:827 +#, c-format +msgid "read error: %d: %s" +msgstr "读取错误:%d: %s" + +#: builtins/return.def:68 +msgid "can only `return' from a function or sourced script" +msgstr "只能在函数或者被 source 的脚本中使用 \"return\"" + +#: builtins/set.def:869 +msgid "cannot simultaneously unset a function and a variable" +msgstr "无法同时取消设定一个函数和一个变量" + +#: builtins/set.def:969 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: 不是数组变量" + +#: builtins/setattr.def:189 +#, c-format +msgid "%s: not a function" +msgstr "%s: 不是函数" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s: 无法导出" + +#: builtins/shift.def:72 builtins/shift.def:79 +msgid "shift count" +msgstr "移位次数" + +#: builtins/shopt.def:323 +msgid "cannot set and unset shell options simultaneously" +msgstr "无法同时设定和取消设定 shell 选项" + +#: builtins/shopt.def:444 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: 无效的 shell 选项名" + +#: builtins/source.def:128 +msgid "filename argument required" +msgstr "需要文件名参数" + +#: builtins/source.def:154 +#, c-format +msgid "%s: file not found" +msgstr "%s: 未找到文件" + +#: builtins/suspend.def:102 +msgid "cannot suspend" +msgstr "无法挂起" + +#: builtins/suspend.def:112 +msgid "cannot suspend a login shell" +msgstr "无法挂起一个登录 shell" + +#: builtins/type.def:235 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "%s 是 \"%s\" 的别名\n" + +#: builtins/type.def:256 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s 是 shell 关键字\n" + +#: builtins/type.def:275 +#, c-format +msgid "%s is a function\n" +msgstr "%s 是函数\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s 是特殊 shell 内建\n" + +#: builtins/type.def:301 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "%s 是 shell 内建\n" + +#: builtins/type.def:323 builtins/type.def:408 +#, c-format +msgid "%s is %s\n" +msgstr "%s 是 %s\n" + +#: builtins/type.def:343 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "%s 已被录入哈希表 (%s)\n" + +#: builtins/ulimit.def:400 +#, c-format +msgid "%s: invalid limit argument" +msgstr "%s: 无效的限制参数" + +#: builtins/ulimit.def:426 +#, c-format +msgid "`%c': bad command" +msgstr "\"%c\": 错误的命令" + +#: builtins/ulimit.def:464 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "%s: 无法获取限制:%s" + +#: builtins/ulimit.def:490 +msgid "limit" +msgstr "限制" + +#: builtins/ulimit.def:502 builtins/ulimit.def:802 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "%s: 无法修改限制:%s" + +#: builtins/umask.def:115 +msgid "octal number" +msgstr "八进制数" + +#: builtins/umask.def:232 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "\"%c\": 无效的符号模式运算符" + +#: builtins/umask.def:287 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "\"%c\": 无效的符号模式字符" + +#: error.c:89 error.c:373 error.c:375 error.c:377 +msgid " line " +msgstr " 行 " + +#: error.c:164 +#, c-format +msgid "last command: %s\n" +msgstr "上一个命令:%s\n" + +#: error.c:172 +#, c-format +msgid "Aborting..." +msgstr "正在中止..." + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "信息:" + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "调试警告:" + +#: error.c:488 +msgid "unknown command error" +msgstr "未知的命令错误" + +#: error.c:489 +msgid "bad command type" +msgstr "错误的命令类型" + +#: error.c:490 +msgid "bad connector" +msgstr "错误的条件连接符" + +#: error.c:491 +msgid "bad jump" +msgstr "错误的跳转" + +#: error.c:529 +#, c-format +msgid "%s: unbound variable" +msgstr "%s: 未绑定的变量" + +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a等待输入超时:自动注销\n" + +#: execute_cmd.c:555 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "无法从 /dev/null 重定向标准输入:%s" + +#: execute_cmd.c:1317 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "时间格式:\"%c\": 无效的格式字符" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc: 副进程 [%d:%s] 仍然存在" + +#: execute_cmd.c:2524 +msgid "pipe error" +msgstr "管道错误" + +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval: 超出最大 eval 嵌套层数 (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: 超出最大 source 嵌套层数 (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: 超出最大函数嵌套层数 (%d)" + +#: execute_cmd.c:5598 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "%s: 受限:无法在命令名中使用 \"/\"" + +#: execute_cmd.c:5715 +#, c-format +msgid "%s: command not found" +msgstr "%s: 未找到命令" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s: 无法执行:找不到需要的文件" + +#: execute_cmd.c:6000 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: 错误的解释器" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: 无法执行二进制文件:%s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "\"%s\": 是特殊内建" + +#: execute_cmd.c:6175 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "无法复制文件描述符 %d 到文件描述符 %d" + +#: expr.c:263 +msgid "expression recursion level exceeded" +msgstr "超出表达式递归层数上限" + +#: expr.c:291 +msgid "recursion stack underflow" +msgstr "递归栈下溢" + +#: expr.c:478 +msgid "syntax error in expression" +msgstr "表达式中有语法错误" + +#: expr.c:522 +msgid "attempted assignment to non-variable" +msgstr "尝试给非变量赋值" + +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "变量赋值中有语法错误" + +#: expr.c:545 expr.c:912 +msgid "division by 0" +msgstr "除以 0" + +#: expr.c:593 +msgid "bug: bad expassign token" +msgstr "bug: 错误的表达式赋值记号" + +#: expr.c:647 +msgid "`:' expected for conditional expression" +msgstr "条件表达式需要 \":\"" + +#: expr.c:973 +msgid "exponent less than 0" +msgstr "指数小于 0" + +#: expr.c:1030 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "前缀自增或前缀自减运算符之后需要标识符" + +#: expr.c:1057 +msgid "missing `)'" +msgstr "缺少 \")\"" + +#: expr.c:1108 expr.c:1492 +msgid "syntax error: operand expected" +msgstr "语法错误:需要操作数" + +#: expr.c:1494 +msgid "syntax error: invalid arithmetic operator" +msgstr "语法错误:无效的算术运算符" + +#: expr.c:1518 +#, c-format +msgid "%s%s%s: %s (error token is \"%s\")" +msgstr "%s%s%s: %s(错误记号是 \"%s\")" + +#: expr.c:1578 +msgid "invalid arithmetic base" +msgstr "无效的算术底数" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "无效的整数常数" + +#: expr.c:1603 +msgid "value too great for base" +msgstr "值对于底数而言过大" + +#: expr.c:1652 +#, c-format +msgid "%s: expression error\n" +msgstr "%s: 表达式错误\n" + +#: general.c:70 +msgid "getcwd: cannot access parent directories" +msgstr "getcwd: 无法访问父目录" + +#: input.c:99 subst.c:6208 +#, c-format +msgid "cannot reset nodelay mode for fd %d" +msgstr "无法为文件描述符 %d 重置 nodelay 模式" + +#: input.c:266 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "无法从文件描述符 %d 为 bash 的输入分配一个新的文件描述符" + +#: input.c:274 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "save_bash_input: 新的文件描述符 %d 的缓冲区已存在" + +#: jobs.c:543 +msgid "start_pipeline: pgrp pipe" +msgstr "start_pipeline: 进程组管道" + +#: jobs.c:907 +#, c-format +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:960 +#, c-format +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" + +#: jobs.c:1279 +#, c-format +msgid "forked pid %d appears in running job %d" +msgstr "进程复制 (fork) 产生的 pid %d 出现在运行中的任务 %d 中" + +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "删除进程组 %2$ld 中已停止的任务 %1$d" + +#: jobs.c:1502 +#, c-format +msgid "add_process: pid %5ld (%s) marked as still alive" +msgstr "add_process: pid %5ld (%s) 标记为仍存活" + +#: jobs.c:1839 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "describe_pid: %ld: 无此 pid" + +#: jobs.c:1854 +#, c-format +msgid "Signal %d" +msgstr "信号 %d" + +#: jobs.c:1868 jobs.c:1894 +msgid "Done" +msgstr "已完成" + +#: jobs.c:1873 siglist.c:123 +msgid "Stopped" +msgstr "已停止" + +#: jobs.c:1877 +#, c-format +msgid "Stopped(%s)" +msgstr "已停止(%s)" + +#: jobs.c:1881 +msgid "Running" +msgstr "运行中" + +#: jobs.c:1898 +#, c-format +msgid "Done(%d)" +msgstr "已完成(%d)" + +#: jobs.c:1900 +#, c-format +msgid "Exit %d" +msgstr "退出 %d" + +#: jobs.c:1903 +msgid "Unknown status" +msgstr "未知状态" + +#: jobs.c:1990 +#, c-format +msgid "(core dumped) " +msgstr "(核心已转储)" + +#: jobs.c:2009 +#, c-format +msgid " (wd: %s)" +msgstr " (工作目录:%s)" + +#: jobs.c:2250 +#, c-format +msgid "child setpgid (%ld to %ld)" +msgstr "子进程 setpgid(%ld 到 %ld)" + +#: jobs.c:2608 nojobs.c:666 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "wait: pid %ld 不是当前 shell 的子进程" + +#: jobs.c:2884 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "wait_for: 没有进程 %ld 的记录" + +#: jobs.c:3223 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "wait_for_job: 任务 %d 已停止" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s: 无当前任务" + +#: jobs.c:3558 +#, c-format +msgid "%s: job has terminated" +msgstr "%s: 任务已经终止" + +#: jobs.c:3567 +#, c-format +msgid "%s: job %d already in background" +msgstr "%s: 任务 %d 已在后台" + +#: jobs.c:3793 +msgid "waitchld: turning on WNOHANG to avoid indefinite block" +msgstr "waitchld: 打开 WNOHANG 以避免无限阻塞" + +#: jobs.c:4307 +#, c-format +msgid "%s: line %d: " +msgstr "%s: 第 %d 行:" + +#: jobs.c:4321 nojobs.c:921 +#, c-format +msgid " (core dumped)" +msgstr "(核心已转储)" + +#: jobs.c:4333 jobs.c:4346 +#, c-format +msgid "(wd now: %s)\n" +msgstr "(当前工作目录:%s)\n" + +#: jobs.c:4378 +msgid "initialize_job_control: getpgrp failed" +msgstr "initialize_job_control: getpgrp 失败" + +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control: 后台无任务控制" + +#: jobs.c:4450 +msgid "initialize_job_control: line discipline" +msgstr "initialize_job_control: 行规则" + +#: jobs.c:4460 +msgid "initialize_job_control: setpgid" +msgstr "initialize_job_control: setpgid" + +#: jobs.c:4481 jobs.c:4490 +#, c-format +msgid "cannot set terminal process group (%d)" +msgstr "无法设定终端进程组 (%d)" + +#: jobs.c:4495 +msgid "no job control in this shell" +msgstr "此 shell 中无任务控制" + +#: lib/malloc/malloc.c:367 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "malloc: 断言失败:%s\n" + +#: lib/malloc/malloc.c:383 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" +"\r\n" +"malloc: %s:%d: 断言已搞砸\r\n" + +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 +msgid "unknown" +msgstr "未知" + +#: lib/malloc/malloc.c:892 +msgid "malloc: block on free list clobbered" +msgstr "malloc: 空闲列表中的块损坏" + +#: lib/malloc/malloc.c:980 +msgid "free: called with already freed block argument" +msgstr "free: 调用时用了已经释放的块作为参数" + +#: lib/malloc/malloc.c:983 +msgid "free: called with unallocated block argument" +msgstr "free: 调用时用了未分配的块作为参数" + +#: lib/malloc/malloc.c:1001 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "free: 检测到下溢;mh_nbytes 超出范围" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: 检测到下溢;magic8 损坏" + +#: lib/malloc/malloc.c:1014 +msgid "free: start and end chunk sizes differ" +msgstr "free: 起始和末尾组块大小不一致" + +#: lib/malloc/malloc.c:1176 +msgid "realloc: called with unallocated block argument" +msgstr "realloc: 调用时用了未分配的块作为参数" + +#: lib/malloc/malloc.c:1191 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "realloc: 检测到下溢;mh_nbytes 超出范围" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: 检测到下溢;magic8 损坏" + +#: lib/malloc/malloc.c:1205 +msgid "realloc: start and end chunk sizes differ" +msgstr "realloc: 起始和末尾组块大小不一致" + +#: lib/malloc/table.c:191 +#, c-format +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "register_alloc: 使用 FIND_ALLOC 时分配表已满?\n" + +#: lib/malloc/table.c:200 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "register_alloc: %p 已在表中显示为已分配?\n" + +#: lib/malloc/table.c:253 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "register_free: %p 已在表中显示为未分配?\n" + +#: lib/sh/fmtulong.c:102 +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:347 +msgid "network operations not supported" +msgstr "不支持网络操作" + +#: locale.c:219 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s)" +msgstr "setlocale: LC_ALL: 无法改变区域设置 (%s)" + +#: locale.c:221 +#, c-format +msgid "setlocale: LC_ALL: cannot change locale (%s): %s" +msgstr "setlocale: LC_ALL: 无法改变区域设置 (%s):%s" + +#: locale.c:294 +#, c-format +msgid "setlocale: %s: cannot change locale (%s)" +msgstr "setlocale: %s: 无法改变区域设置 (%s)" + +#: locale.c:296 +#, c-format +msgid "setlocale: %s: cannot change locale (%s): %s" +msgstr "setlocale: %s: 无法改变区域设置 (%s):%s" + +#: mailcheck.c:439 +msgid "You have mail in $_" +msgstr "您在 $_ 中有邮件" + +#: mailcheck.c:464 +msgid "You have new mail in $_" +msgstr "您在 $_ 中有新邮件" + +#: mailcheck.c:480 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "%s 中的邮件已被读过\n" + +#: make_cmd.c:314 +msgid "syntax error: arithmetic expression required" +msgstr "语法错误:需要算术表达式" + +#: make_cmd.c:316 +msgid "syntax error: `;' unexpected" +msgstr "语法错误:未预期的 \";\"" + +#: make_cmd.c:317 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "语法错误:\"((%s))\"" + +#: make_cmd.c:569 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "make_here_document: 错误的指令类型 %d" + +#: make_cmd.c:668 +#, c-format +msgid "here-document at line %d delimited by end-of-file (wanted `%s')" +msgstr "立即文档在第 %d 行被文件结束符分隔(需要 \"%s\")" + +#: make_cmd.c:769 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "make_redirection: 重定向指令 \"%d\" 超出范围" + +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) 超过 SIZE_MAX (%lu):行已被截断" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "超出最大立即文档计数" + +# %c 可能为引号 +#: parse.y:3684 parse.y:4244 parse.y:6148 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "寻找匹配的 `%c' 时遇到了未预期的 EOF" + +#: parse.y:4452 +msgid "unexpected EOF while looking for `]]'" +msgstr "寻找 \"]]\" 时遇到了未预期的 EOF" + +#: parse.y:4457 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "条件表达式中有语法错误:未预期的记号 \"%s\"" + +#: parse.y:4461 +msgid "syntax error in conditional expression" +msgstr "条件表达式中有语法错误" + +#: parse.y:4539 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "未预期的记号 \"%s\",需要 \")\"" + +#: parse.y:4543 +msgid "expected `)'" +msgstr "需要 \")\"" + +#: parse.y:4571 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "一元条件运算符使用了未预期的参数 \"%s\"" + +#: parse.y:4575 +msgid "unexpected argument to conditional unary operator" +msgstr "一元条件运算符使用了未预期的参数" + +#: parse.y:4621 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "未预期的记号 \"%s\",需要二元条件运算符" + +#: parse.y:4625 +msgid "conditional binary operator expected" +msgstr "需要二元条件运算符" + +#: parse.y:4647 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "二元条件运算符使用了未预期的参数 \"%s\"" + +#: parse.y:4651 +msgid "unexpected argument to conditional binary operator" +msgstr "二元条件运算符使用了未预期的参数" + +#: parse.y:4662 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "条件命令中有未预期的记号 \"%c\"" + +#: parse.y:4665 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "条件命令中有未预期的记号 \"%s\"" + +#: parse.y:4669 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "条件命令中有未预期的记号 %d" + +#: parse.y:6118 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "未预期的记号 \"%s\" 附近有语法错误" + +#: parse.y:6137 +#, c-format +msgid "syntax error near `%s'" +msgstr "\"%s\" 附近有语法错误" + +#: parse.y:6151 +msgid "syntax error: unexpected end of file" +msgstr "语法错误:未预期的文件结束符" + +#: parse.y:6151 +msgid "syntax error" +msgstr "语法错误" + +#: parse.y:6216 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "使用 \"%s\" 退出 shell 。\n" + +#: parse.y:6394 +msgid "unexpected EOF while looking for matching `)'" +msgstr "寻找匹配的 \")\" 时遇到了未预期的 EOF" + +#: pcomplete.c:1132 +#, c-format +msgid "completion: function `%s' not found" +msgstr "补全:未找到函数 \"%s\"" + +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion: %s: 可能的重试循环" + +#: pcomplib.c:182 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "progcomp_insert: %s: COMPSPEC 为 NULL" + +#: print_cmd.c:302 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "print_command: 错误的条件连接符 \"%d\"" + +#: print_cmd.c:375 +#, c-format +msgid "xtrace_set: %d: invalid file descriptor" +msgstr "xtrace_set: %d: 无效的文件描述符" + +#: print_cmd.c:380 +msgid "xtrace_set: NULL file pointer" +msgstr "xtrace_set: 文件指针为 NULL" + +#: print_cmd.c:384 +#, c-format +msgid "xtrace fd (%d) != fileno xtrace fp (%d)" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" + +#: print_cmd.c:1545 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "cprintf: \"%c\": 无效的格式字符" + +#: redir.c:150 redir.c:198 +msgid "file descriptor out of range" +msgstr "文件描述符超出范围" + +#: redir.c:205 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "%s: 有歧义的重定向" + +#: redir.c:209 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: 无法覆盖已存在的文件" + +#: redir.c:214 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "%s: 受限:无法重定向输出" + +#: redir.c:219 +#, c-format +msgid "cannot create temp file for here-document: %s" +msgstr "无法为立即文档创建临时文件:%s" + +#: redir.c:223 +#, c-format +msgid "%s: cannot assign fd to variable" +msgstr "%s: 无法将文件描述符赋值给变量" + +#: redir.c:650 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "没有网络时不支持 /dev/(tcp|udp)/host/port" + +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 +msgid "redirection error: cannot duplicate fd" +msgstr "重定向错误:无法复制文件描述符" + +#: shell.c:353 +msgid "could not find /tmp, please create!" +msgstr "无法找到 /tmp,请创建!" + +#: shell.c:357 +msgid "/tmp must be a valid directory name" +msgstr "/tmp 必须为有效的目录名" + +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "在交互式 shell 中将忽略美化输出模式" + +#: shell.c:972 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: 无效的选项" + +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "无法将 uid 设为 %d:有效 uid %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "无法将 gid 设为 %d:有效 gid %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "无法启动调试器;调试模式已禁用" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: 是一个目录" + +# 这个是查看用户的 /etc/passwd 信息得到的名字。既然是用户的名字,就叫做无名氏吧。(有点想写“红领巾”来着。) +#: shell.c:1907 +msgid "I have no name!" +msgstr "无名氏!" + +#: shell.c:2061 +#, c-format +msgid "GNU bash, version %s-(%s)\n" +msgstr "GNU bash,版本 %s-(%s)\n" + +#: shell.c:2062 +#, 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:2064 +msgid "GNU long options:\n" +msgstr "GNU 长选项:\n" + +#: shell.c:2068 +msgid "Shell options:\n" +msgstr "Shell 选项:\n" + +#: shell.c:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-ilrsD 或 -c <命令> 或 -O \t\t(仅适合调用)\n" + +#: shell.c:2088 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s 或 -o <选项>\n" + +#: shell.c:2094 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "请输入 `%s -c \"help set\"' 以获得关于 shell 选项的更多信息。\n" + +#: shell.c:2095 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "请输入 `%s -c help' 以获得关于 shell 内建命令的更多信息。\n" + +# 写如何报告程序错误的地方应该提到如何报告翻译问题。 +#: shell.c:2096 +#, c-format +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" +"请使用 \"bashbug\" 命令来报告程序错误。\n" +"请将翻译错误报告到 。\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash 主页:\n" + +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "使用 GNU 软件的通用帮助:\n" + +#: sig.c:765 +#, 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 "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 +msgid "Terminated" +msgstr "已终止" + +#: siglist.c:115 +msgid "Urgent IO condition" +msgstr "紧急 I/O 状况" + +#: 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 "闹钟(虚拟)" + +# Personally I treat this as something coming from alarm() by a profiler. +#: 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 "已授予 HFT 监视模式" + +#: siglist.c:207 +msgid "HFT monitor mode retracted" +msgstr "已撤销 HFT 监视模式" + +#: siglist.c:211 +msgid "HFT sound sequence has completed" +msgstr "已完成 HFT 声音序列" + +#: siglist.c:215 +msgid "Information request" +msgstr "信息请求" + +#: siglist.c:223 siglist.c:225 +#, c-format +msgid "Unknown Signal #%d" +msgstr "未知信号 #%d" + +#: subst.c:1480 subst.c:1670 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "错误的替换:在 %2$s 中没有右 `%1$s'" + +#: subst.c:3307 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "%s: 无法将列表赋值给数组成员" + +#: subst.c:6048 subst.c:6064 +msgid "cannot make pipe for process substitution" +msgstr "无法为进程替换创建管道" + +#: subst.c:6124 +msgid "cannot make child for process substitution" +msgstr "无法为进程替换创建子进程" + +#: subst.c:6198 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "无法打开命名管道 %s 进行读取" + +#: subst.c:6200 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "无法打开命名管道 %s 进行写入" + +#: subst.c:6223 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "无法将命名管道 %s 作为文件描述符 %d 复制" + +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "命令替换:忽略输入中的 null 字节" + +#: subst.c:6533 +msgid "cannot make pipe for command substitution" +msgstr "无法为命令替换创建管道" + +#: subst.c:6580 +msgid "cannot make child for command substitution" +msgstr "无法为命令替换创建子进程" + +#: subst.c:6613 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "command_substitute: 无法将管道复制为文件描述符 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: 名称引用变量引用的变量名无效" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: 无效的间接展开" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s: 无效的变量名" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s: 参数未设置" + +#: subst.c:7480 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: 参数为空或未设置" + +#: subst.c:7727 subst.c:7742 +#, c-format +msgid "%s: substring expression < 0" +msgstr "%s: 子串表达式 < 0" + +#: subst.c:9560 subst.c:9587 +#, c-format +msgid "%s: bad substitution" +msgstr "%s: 错误的替换" + +#: subst.c:9678 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "$%s: 无法这样赋值" + +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "未来版本的 shell 会强制求值为算术替换" + +#: subst.c:10795 +#, c-format +msgid "bad substitution: no closing \"`\" in %s" +msgstr "错误的替换:在 %s 中没有右 \"`\"" + +#: subst.c:11874 +#, c-format +msgid "no match: %s" +msgstr "无匹配:%s" + +#: test.c:147 +msgid "argument expected" +msgstr "需要参数" + +#: test.c:156 +#, c-format +msgid "%s: integer expression expected" +msgstr "%s: 需要整数表达式" + +#: test.c:265 +msgid "`)' expected" +msgstr "需要 \")\"" + +#: test.c:267 +#, c-format +msgid "`)' expected, found %s" +msgstr "需要 \")\",却找到 %s" + +#: test.c:469 test.c:814 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: 需要二元运算符" + +#: test.c:771 test.c:774 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: 需要一元运算符" + +#: test.c:896 +msgid "missing `]'" +msgstr "缺少 \"]\"" + +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "语法错误:未预期的 \"%s\"" + +#: trap.c:220 +msgid "invalid signal number" +msgstr "无效的信号编号" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "trap handler: 超出最大的 trap handler 层数 (%d)" + +#: trap.c:412 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "run_pending_traps: 错误的 trap_list[%d] 值:%p" + +#: trap.c:416 +#, c-format +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "run_pending_traps: 信号处理程序是 SIG_DFL,重新发送 %d (%s) 给自己" + +#: trap.c:509 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "trap_handler: 错误的信号 %d" + +#: variables.c:424 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "导入 \"%s\" 的函数定义时出错" + +#: variables.c:838 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "shell 层数 (%d) 太高,重置为 1" + +#: variables.c:2642 +msgid "make_local_variable: no function context at current scope" +msgstr "make_local_variable: 当前作用域中没有函数上下文" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: 变量不可赋值" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s: 无法从不兼容的类型继承值" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s: 将整数赋值给名称引用" + +#: variables.c:4390 +msgid "all_local_variables: no function context at current scope" +msgstr "all_local_variables: 当前作用域中没有函数上下文" + +#: variables.c:4757 +#, c-format +msgid "%s has null exportstr" +msgstr "%s 的 exportstr 为空" + +#: variables.c:4762 variables.c:4771 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "%2$s 的 exportstr 中有无效的字符 %1$d" + +#: variables.c:4777 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "%s 的 exportstr 中没有 \"=\"" + +#: variables.c:5317 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "pop_var_context: shell_variables 的头部不是函数上下文" + +#: variables.c:5330 +msgid "pop_var_context: no global_variables context" +msgstr "pop_var_context: 没有 global_variables 上下文" + +#: variables.c:5410 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "pop_scope: shell_variables 的头部不是临时环境作用域" + +#: variables.c:6400 +#, c-format +msgid "%s: %s: cannot open as FILE" +msgstr "%s: %s: 无法作为 FILE 打开" + +#: variables.c:6405 +#, c-format +msgid "%s: %s: invalid value for trace file descriptor" +msgstr "%s: %s: 跟踪文件描述符的值无效" + +#: variables.c:6450 +#, c-format +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: 兼容性的值超出范围" + +#: version.c:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "Copyright (C) 2022 自由软件基金会" + +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "许可证 GPLv3+:GNU GPL 许可证第三版或者更新版本 \n" + +#: version.c:86 version2.c:86 +#, c-format +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash,版本 %s (%s)\n" + +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "本软件是自由软件,您可以自由地更改和重新发布。" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "在法律许可的情况下特此明示,本软件不提供任何担保。" + +#: xmalloc.c:93 +#, c-format +msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: 无法分配 %lu 字节(已分配 %lu 字节)" + +#: xmalloc.c:95 +#, c-format +msgid "%s: cannot allocate %lu bytes" +msgstr "%s: 无法分配 %lu 字节" + +#: xmalloc.c:165 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "%s: %s:%d: 无法分配 %lu 字节(已分配 %lu 字节)" + +#: xmalloc.c:167 +#, c-format +msgid "%s: %s:%d: cannot allocate %lu bytes" +msgstr "%s: %s:%d: 无法分配 %lu 字节" + +#: builtins.c:45 +msgid "alias [-p] [name[=value] ... ]" +msgstr "alias [-p] [名称[=值] ... ]" + +#: builtins.c:49 +msgid "unalias [-a] name [name ...]" +msgstr "unalias [-a] 名称 [名称 ...]" + +#: builtins.c:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpvsPSVX] [-m 键映射] [-f 文件名] [-q 名称] [-u 名称] [-r 键序列] [-x 键序列:shell-命令] [键序列:readline-函数 或 readline-命令]" + +#: builtins.c:56 +msgid "break [n]" +msgstr "break [n]" + +#: builtins.c:58 +msgid "continue [n]" +msgstr "continue [n]" + +#: builtins.c:60 +msgid "builtin [shell-builtin [arg ...]]" +msgstr "builtin [shell-内建 [参数 ...]]" + +#: builtins.c:63 +msgid "caller [expr]" +msgstr "caller [表达式]" + +#: builtins.c:66 +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [目录]" + +#: builtins.c:68 +msgid "pwd [-LP]" +msgstr "pwd [-LP]" + +#: builtins.c:76 +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] 命令 [参数 ...]" + +#: builtins.c:78 +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [名称[=值] ...] 或 declare -p [-aAfFilnrtux] [名称 ...]" + +#: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] 名称[=值] ... 或 typeset -p [-aAfFilnrtux] [名称 ...]" + +#: builtins.c:82 +msgid "local [option] name[=value] ..." +msgstr "local [选项] 名称[=值] ..." + +#: builtins.c:85 +msgid "echo [-neE] [arg ...]" +msgstr "echo [-neE] [参数 ...]" + +#: builtins.c:89 +msgid "echo [-n] [arg ...]" +msgstr "echo [-n] [参数 ...]" + +#: builtins.c:92 +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f 文件名] [名称 ...]" + +#: builtins.c:94 +msgid "eval [arg ...]" +msgstr "eval [参数 ...]" + +#: builtins.c:96 +msgid "getopts optstring name [arg ...]" +msgstr "getopts 选项字符串 名称 [参数 ...]" + +#: builtins.c:98 +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a 名称] [命令 [参数 ...]] [重定向 ...]" + +#: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 +msgid "logout [n]" +msgstr "logout [n]" + +#: builtins.c:105 +msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" +msgstr "fc [-e 编辑器名] [-lnr] [起始] [终止] 或 fc -s [模式=替换串] [命令]" + +#: builtins.c:109 +msgid "fg [job_spec]" +msgstr "fg [任务说明符]" + +#: builtins.c:113 +msgid "bg [job_spec ...]" +msgstr "bg [任务说明符 ...]" + +#: builtins.c:116 +msgid "hash [-lr] [-p pathname] [-dt] [name ...]" +msgstr "hash [-lr] [-p 路径名] [-dt] [名称 ...]" + +#: builtins.c:119 +msgid "help [-dms] [pattern ...]" +msgstr "help [-dms] [模式 ...]" + +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d 偏移量] [n] 或 history -anrw [文件名] 或 history -ps 参数 [参数...]" + +#: builtins.c:127 +msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" +msgstr "jobs [-lnprs] [任务说明符 ...] 或 jobs -x 命令 [参数]" + +#: builtins.c:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [任务说明符 ... | pid ...]" + +#: builtins.c:134 +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s 信号说明符 | -n 信号编号 | -信号说明符] pid | 任务说明符 ... 或 kill -l [信号说明符]" + +#: builtins.c:136 +msgid "let arg [arg ...]" +msgstr "let 参数 [参数 ...]" + +#: builtins.c:138 +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a 数组] [-d 分隔符] [-i 文本] [-n 字符数] [-N 字符数] [-p 提示符] [-t 超时] [-u fd] [名称 ...]" + +#: builtins.c:140 +msgid "return [n]" +msgstr "return [n]" + +#: builtins.c:142 +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o 选项名] [--] [-] [参数 ...]" + +#: builtins.c:144 +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [名称 ...]" + +#: builtins.c:146 +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [名称[=值] ...] 或 export -p" + +#: builtins.c:148 +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [名称[=值] ...] 或 readonly -p" + +#: builtins.c:150 +msgid "shift [n]" +msgstr "shift [n]" + +#: builtins.c:152 +msgid "source filename [arguments]" +msgstr "source 文件名 [参数]" + +#: builtins.c:154 +msgid ". filename [arguments]" +msgstr ". 文件名 [参数]" + +#: builtins.c:157 +msgid "suspend [-f]" +msgstr "suspend [-f]" + +#: builtins.c:160 +msgid "test [expr]" +msgstr "test [表达式]" + +#: builtins.c:162 +msgid "[ arg... ]" +msgstr "[ 参数... ]" + +#: builtins.c:166 +msgid "trap [-lp] [[arg] signal_spec ...]" +msgstr "trap [-lp] [[参数] 信号说明符 ...]" + +#: builtins.c:168 +msgid "type [-afptP] name [name ...]" +msgstr "type [-afptP] 名称 [名称 ...]" + +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [限制]" + +#: builtins.c:174 +msgid "umask [-p] [-S] [mode]" +msgstr "umask [-p] [-S] [模式]" + +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p 变量] [id ...]" + +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [pid ...]" + +#: builtins.c:184 +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for 名称 [in 词语 ... ] ; do 命令; done" + +#: builtins.c:186 +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( 表达式1; 表达式2; 表达式3 )); do 命令; done" + +#: builtins.c:188 +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select 名称 [in 词语 ... ;] do 命令; done" + +#: builtins.c:190 +msgid "time [-p] pipeline" +msgstr "time [-p] 流水线" + +#: builtins.c:192 +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case 词语 in [模式 [| 模式]...) 命令 ;;]... esac" + +#: builtins.c:194 +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if 命令; then 命令; [ elif 命令; then 命令; ]... [ else 命令; ] fi" + +#: builtins.c:196 +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while 命令; do 命令-2; done" + +#: builtins.c:198 +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until 命令; do 命令-2; done" + +#: builtins.c:200 +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [名称] 命令 [重定向]" + +#: builtins.c:202 +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function 名称 { 命令 ; } 或 name () { 命令 ; }" + +#: builtins.c:204 +msgid "{ COMMANDS ; }" +msgstr "{ 命令 ; }" + +#: builtins.c:206 +msgid "job_spec [&]" +msgstr "任务说明符 [&]" + +#: builtins.c:208 +msgid "(( expression ))" +msgstr "(( 表达式 ))" + +#: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ 表达式 ]]" + +#: builtins.c:212 +msgid "variables - Names and meanings of some shell variables" +msgstr "variables - 一些 shell 变量的名称和含义" + +#: builtins.c:215 +msgid "pushd [-n] [+N | -N | dir]" +msgstr "pushd [-n] [+N | -N | 目录]" + +#: builtins.c:219 +msgid "popd [-n] [+N | -N]" +msgstr "popd [-n] [+N | -N]" + +#: builtins.c:223 +msgid "dirs [-clpv] [+N] [-N]" +msgstr "dirs [-clpv] [+N] [-N]" + +#: builtins.c:226 +msgid "shopt [-pqsu] [-o] [optname ...]" +msgstr "shopt [-pqsu] [-o] [选项名 ...]" + +#: builtins.c:228 +msgid "printf [-v var] format [arguments]" +msgstr "printf [-v var] 格式 [参数]" + +#: builtins.c:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o 选项] [-A 动作] [-G 全局模式] [-W 词语列表] [-F 函数] [-C 命令] [-X 过滤模式] [-P 前缀] [-S 后缀] [名称 ...]" + +#: builtins.c:235 +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 选项] [-A 动作] [-G 全局模式] [-W 词语列表] [-F 函数] [-C 命令] [-X 过滤模式] [-P 前缀] [-S 后缀] [词语]" + +#: builtins.c:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o 选项] [-DEI] [名称 ...]" + +#: builtins.c:242 +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d 分隔符] [-n 计数] [-O 起始] [-s 计数] [-t] [-u fd] [-C 回调] [-c 间隔] [数组]" + +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d 分隔符] [-n 计数] [-O 起始] [-s 计数] [-t] [-u fd] [-C 回调] [-c 间隔] [数组]" + +#: builtins.c:256 +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" +" \n" +" 不带参数时,\"alias\" 以可重用的格式 \"alias 名称=值\" 将别名列表\n" +" 打印到标准输出。\n" +" \n" +" 否则,对于每一个给出了 <值> 的 <名称> 定义一个别名。如果 <值> 的\n" +" 末尾是空格,那么在展开该别名后,还会继续检查下一个词是否可以\n" +" 进行别名替换。\n" +" \n" +" 选项:\n" +" -p\t以可重用的格式打印所有已定义的别名\n" +" \n" +" 退出状态:\n" +" alias 返回真,除非提供了一个尚未定义别名的 <名称>。" + +#: builtins.c:278 +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" +" \n" +" 选项:\n" +" -a\t删除所有的别名定义\n" +" \n" +" 返回成功,除非 <名称> 不是一个已存在的别名。" + +#: builtins.c:291 +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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" +" \n" +" Exit Status:\n" +" bind returns 0 unless an unrecognized option is given or an error occurs." +msgstr "" +"设定 Readline 键绑定和变量。\n" +" \n" +" 绑定一个键序列到一个 Readline 函数或者宏,或者设定一个\n" +" Readline 变量。非选项参数的语法和 ~/.inputrc 文件的语法相同,\n" +" 但是必须以单一参数的形式传递给 bind,\n" +" 例如,bind '\"\\C-x\\C-r\": re-read-init-file'。\n" +" \n" +" 选项:\n" +" -m 键映射 在此命令执行过程中使用指定的 <键映射>。可被接受的\n" +" 键映射名称有 emacs、emacs-standard、emacs-meta、\n" +" emacs-ctlx、vi、vi-move、vi-command 和 vi-insert。\n" +" -l 列出函数名称。\n" +" -P 列出函数名称和绑定。\n" +" -p 以可以重新用作输入的格式列出函数名称和绑定。\n" +" -S 列出可以启动宏的键序列以及它们的值。\n" +" -s 以可以重新用作输入的格式列出可以启动宏的键序列\n" +" 以及它们的值。\n" +" -V 列出变量名称以及它们的值。\n" +" -v 以可以重新用作输入的格式列出变量名称以及它们的值。\n" +" -q 函数名 查询指定的函数可以由哪些键启动。\n" +" -u 函数名 解除绑定所有绑定至指定函数的键。\n" +" -r 键序列 取消 <键序列> 的绑定。\n" +" -f 文件名 从 <文件名> 中读取键绑定。\n" +" -x 键序列:shell-命令\t当 <键序列> 被输入时,执行 。\n" +" -X 以可以重新用作输入的格式列出用 -x 绑定的键序列和命令。\n" +" \n" +" 退出状态:\n" +" bind 返回 0,除非使用了无法识别的选项,或者有错误发生。" + +#: builtins.c:330 +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" +" 退出一个 FOR、WHILE 或 UNTIL 循环。如果指定了 N,则跳出\n" +" 从里往外数共 N 重循环。\n" +" \n" +" 退出状态:\n" +" 退出状态为 0,除非 N 不大于等于 1。" + +#: builtins.c:342 +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" +" 继续进行当前 FOR、WHILE 或 UNTIL 循环的下一次迭代。\n" +" 如果指定了 N, 则继续进行从里往外数第 N 重循环的下一次迭代。\n" +" \n" +" 退出状态:\n" +" 退出状态为 0,除非 N 不大于等于 1。" + +#: builtins.c:354 +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 "" +"执行 shell 内建。\n" +" \n" +" 带 <参数> 执行 ,并且跳过命令查找流程。在希望以 shell 函数\n" +" 的形式重新实现 shell 内建,并且希望在该函数中执行该 shell 内建的情况下\n" +" 很有用。\n" +" \n" +" 退出状态:\n" +" 返回 的退出状态,或者如果 不是一个 shell 内建\n" +" 时返回假。" + +#: builtins.c:369 +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" +" 栈跟踪 (stack trace)。\n" +" \n" +" <表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。\n" +" \n" +" 退出状态:\n" +" 返回 0,除非 shell 不在执行一个 shell 函数,或者 <表达式> 无效。" + +#: builtins.c:387 +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: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" +" \n" +" The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" +" \n" +" Exit Status:\n" +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." +msgstr "" +"改变 shell 工作目录。\n" +" \n" +" 改变当前目录至 <目录>。默认的 <目录> 是 shell 变量 HOME 的值。\n" +" \n" +" 变量 CDPATH 定义了搜索含有 <目录> 的目录的搜索路径。CDPATH 中额外的\n" +" 目录名称以冒号 (:) 隔开。空的 CDPATH 表示当前目录。如果 <目录> 以\n" +" 斜杠 (/) 开头,则不会使用 CDPATH。\n" +" \n" +" 如果找不到目录,并且 shell 选项 \"cdable_vars\" 被设定,则假定参数是一个\n" +" 变量名。如果该变量有值,则它的值被当作 <目录>。\n" +" \n" +" 选项:\n" +" -L\t强制跟随符号链接: 在处理 \"..\" 之后解析 <目录> 中的符号链接\n" +" -P\t使用物理目录结构而不跟随符号链接: 在处理 \"..\" 之前\n" +" \t\t解析 <目录> 中的符号链接\n" +" -e\t如果使用了 -P 选项,但无法成功确定当前工作目录时,以非零状态退出\n" +" -@\t在支持扩展属性的系统上,将一个具有扩展属性的文件当作\n" +" \t\t含有文件属性的目录。\n" +" \n" +" 默认情况下,跟随符号链接,正如指定了 \"-L\" 一样。\n" +" \"..\" 的处理方式是,移除路径名中的上一个组成部分,以 <目录> 的开头\n" +" 或者斜杠为界限。\n" +" \n" +" 退出状态:\n" +" 如果目录改变,或在使用 -P 选项时 $PWD 修改成功,则返回 0;否则返回非零。" + +#: builtins.c:425 +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" +" \t\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 "" +"打印当前工作目录的名字。\n" +" \n" +" 选项:\n" +" -L\t打印 $PWD 变量的值,如果它包含了当前的工作目录\n" +" -P\t打印当前的物理目录,而不包含任何的符号链接\n" +" \n" +" 默认情况下,\"pwd\" 的行为和给定了 \"-L\" 时一致。\n" +" \n" +" 退出状态:\n" +" 返回 0,除非使用了无效的选项,或者无法读取当前目录。" + +#: builtins.c:442 +msgid "" +"Null command.\n" +" \n" +" No effect; the command does nothing.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"空的命令。\n" +" \n" +" 没有效果; 此命令不做任何操作。\n" +" \n" +" 退出状态:\n" +" 总是成功。" + +#: builtins.c:453 +msgid "" +"Return a successful result.\n" +" \n" +" Exit Status:\n" +" Always succeeds." +msgstr "" +"返回一个成功的结果。\n" +" \n" +" 退出状态:\n" +" 总是成功。" + +#: builtins.c:462 +msgid "" +"Return an unsuccessful result.\n" +" \n" +" Exit Status:\n" +" Always fails." +msgstr "" +"返回一个不成功的结果。\n" +" \n" +" 退出状态:\n" +" 总是失败。" + +#: builtins.c:471 +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 use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"执行一个简单命令或者显示命令的相关信息。\n" +" \n" +" 带 <参数> 运行 <命令> 且阻止 shell 函数查找流程,或显示指定的 <命令>\n" +" 的信息。可以在已存在同名函数的情况下用于启动磁盘上的命令。\n" +" \n" +" 选项:\n" +" -p 使用 PATH 变量的一个默认值,以确保所有的标准工具都能被找到\n" +" -v 打印 <命令> 的描述,和 \"type\" 内建相似\n" +" -V 打印每个 <命令> 的更详细的描述\n" +" \n" +" 退出状态:\n" +" 返回 <命令> 的退出状态,或者当找不到 <命令> 时则返回失败。" + +#: builtins.c:490 +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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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 the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -u\tto convert the value of each NAME 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. The `-g' option suppresses this behavior.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." +msgstr "" +"设定变量的值和属性。\n" +" \n" +" 声明变量并且赋予它们属性。如果没有给定 <名称>,\n" +" 则显示所有变量的属性和值。\n" +" \n" +" 选项:\n" +" -f\t限制仅操作或显示函数的名称和定义\n" +" -F\t限制仅显示函数名称(以及调试时显示行号和源文件名)\n" +" -g\t在 shell 函数内部使用时创建全局变量;否则忽略\n" +" -I\t当创建局部变量时,继承上一个作用域的同名变量的属性和值\n" +" -p\t显示每个 <名称> 的属性和值\n" +" \n" +" 设定属性的选项:\n" +" -a\t使 <名称> 成为索引数组(如果支持)\n" +" -A\t使 <名称> 成为关联数组(如果支持)\n" +" -i\t使 <名称> 带有 \"整数\" (integer) 属性\n" +" -l\t将 <名称> 的值在赋值时转换为小写\n" +" -n\t使 <名称> 成为一个对以它的值为名称的变量的引用\n" +" -r\t将 <名称> 变为只读\n" +" -t\t使 <名称> 带有 \"跟踪\" (trace) 属性\n" +" -u\t使 <名称> 的值在赋值时转换为大写\n" +" -x\t将 <名称> 导出\n" +" \n" +" 用 \"+\" 代替 \"-\" 会关闭指定的属性。\n" +" \n" +" 带有 \"整数\" 属性的变量被赋值时将使用算术求值(见 \"let\" 命令)。\n" +" \n" +" 在函数中使用时,\"declare\" 使 <名称> 成为局部变量,和 \"local\"\n" +" 命令一致。\"-g\" 选项阻止此行为。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者发生变量赋值错误。" + +#: builtins.c:532 +msgid "" +"Set variable values and attributes.\n" +" \n" +" A synonym for `declare'. See `help declare'." +msgstr "" +"设定变量的值和属性。\n" +" \n" +" 同 \"declare\"。参见 \"help declare\"。" + +#: builtins.c:540 +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, a variable\n" +" assignment error occurs, or the shell is not executing a function." +msgstr "" +"定义局部变量。\n" +" \n" +" 创建一个名为 <名称> 的变量,并且将 <值> 赋给它。<选项> 可以是任何\n" +" 能被 \"declare\" 接受的选项。\n" +" \n" +" 局部变量只能在函数内部使用,它们只对定义它们的函数及其子函数可见。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项、发生了赋值错误,或者 shell 不在\n" +" 执行一个函数。" + +# 此字符串可以很好地测试各个 po 编辑器对转义字符的支持是否有 bug(手动斜眼)。poedit(至少在 <=3.0.1 版本中)对 \a 的处理存在 bug,如果你修改了这条翻译,请用纯文本编辑器检查一下 msgstr 里的 \a 前面是否是两个反斜杠。就算你用的不是 poedit,也最好检查一下所有的转义字符,看看是不是和 msgid 里的一致,如不一致请修改。 +#: builtins.c:557 +msgid "" +"Write arguments to the standard output.\n" +" \n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\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" +" \\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" +" \t\t0 to 3 octal digits\n" +" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" +" \n" +" Exit Status:\n" +" Returns success unless a write error occurs." +msgstr "" +"将参数写到标准输出。\n" +" \n" +" 在标准输出上显示 <参数>,以空格隔开,后面跟一个换行。\n" +" \n" +" 选项:\n" +" -n\t不要追加换行\n" +" -e\t启用对下列反斜杠转义字符的解释\n" +" -E\t显式地阻止对反斜杠转义字符的解释\n" +" \n" +" \"echo\" 对下列反斜杠转义字符进行解释:\n" +" \\a\t警报(响铃)\n" +" \\b\t退格\n" +" \\c\t阻止后续的输出\n" +" \\e\t转义字符\n" +" \\E\t转义字符\n" +" \\f\t换页\n" +" \\n\t换行\n" +" \\r\t回车\n" +" \\t\t水平制表符\n" +" \\v\t垂直制表符\n" +" \\\\\t反斜杠\n" +" \\0nnn\tASCII 码为 NNN(八进制)的字符。NNN 可以是 0 至 3 位的八进制数。\n" +" \\xHH\t值为 HH(十六进制)的 8 位字符。HH 可以是一至两位的十六进制数。\n" +" \\uHHHH\t值为 HHHH(十六进制)的 Unicode 字符。HHHH 可以是一至四位的\n" +" \t\t十六进制数。\n" +" \\UHHHHHHHH 值为 HHHHHHHH(十六进制)的 Unicode 字符。\n" +" \t\tHHHHHHHH 可以是一至八位的十六进制数。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非有写入错误发生。" + +#: builtins.c:597 +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 "" +"将参数写到标准输出。\n" +" \n" +" 在标准输出上显示 <参数>,后面跟一个换行。\n" +" \n" +" 选项:\n" +" -n\t不要追加换行\n" +" \n" +" 退出状态:\n" +" 返回成功,除非有写入错误发生。" + +#: builtins.c:612 +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 "" +"启用和禁用 shell 内建。\n" +" \n" +" 启用和禁用 shell 的内建命令。禁用命令使您能够执行和内建\n" +" 命令同名的磁盘上的命令,而无须使用完整的路径名。\n" +" \n" +" 选项:\n" +" -a\t打印内建列表,并显示其中每一个是否启用\n" +" -n\t禁用每一个 <名称> 或者显示被禁用的内建的列表\n" +" -p\t以可重用的格式打印内建列表\n" +" -s\t仅打印 Posix \"特殊\" 内建的名称\n" +" \n" +" 控制动态加载的选项:\n" +" -f\t从共享对象 <文件名> 中加载 <名称> 内建\n" +" -d\t删除以 -f 选项加载的内建\n" +" \n" +" 不带选项时,启用每一个 <名称>。\n" +" \n" +" 要使用 $PATH 中找到的 \"test\" 而不是 shell 内建的版本,\n" +" 请输入 \"enable -n test\"。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非 <名称> 不是一个 shell 内建,或者有错误发生。" + +#: builtins.c:640 +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 "" +"将参数作为 shell 命令执行。\n" +" \n" +" 将 <参数> 组合成一个字符串,用结果作为 shell 的输入,并执行得到的命令。\n" +" \n" +" 退出状态:\n" +" 返回命令的退出状态,或者在命令为空的情况下返回成功。" + +#: builtins.c:652 +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, but if arguments\n" +" are supplied as ARG values, 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 "" +"解析选项参数。\n" +" \n" +" getopts 可在 shell 过程中使用,将位置参数解析为选项。\n" +" \n" +" \n" +" <选项字符串> 包含待识别的选项字母;如果一个字母后面跟着一个冒号,\n" +" 则该选项需要一个参数,参数与选项之间应当用空格隔开。\n" +" \n" +" \n" +" 每次被调用时,getopts 会将下一个选项放到 shell 变量 $<名称> 中,\n" +" 如果 <名称> 变量不存在则先将其初始化,并将下一个待处理的参数的序号\n" +" 放入 shell 变量 OPTIND 中。OPTIND 变量在每次 shell 或者 shell 脚本\n" +" 启动时都被初始化为 1。当一个选项要求有一个参数时,getopts 将该参数\n" +" 放入 shell 变量 OPTARG 中。\n" +" \n" +" getopts 有两种报告错误的方法。如果 <选项字符串> 的第一个字符是\n" +" 冒号,getopts 使用沉默错误报告。在此模式下,不会打印错误消息。\n" +" 如果遇到了一个无效的选项,getopts 将找到的选项字符放入 OPTARG\n" +" 变量中。如果没有找到必需的参数,getopts 放置一个 \":\" 到 <名称>\n" +" 变量中,并且将 OPTARG 变量设置为找到的选项字符。如果 getopts 不处于\n" +" 沉默模式,并且遇到了一个无效的选项,getopts 放置 \"?\" 到 <名称> 变量\n" +" 中并且取消设定 OPTARG 变量。如果没有找到必需的参数,一个 \"?\" 会被\n" +" 放入 <名称> 变量中,OPTARG 将被取消设定,并且会打印一个诊断信息。\n" +" \n" +" 如果 shell 变量 OPTERR 的值为 0,getopts 会禁用错误信息的打印,\n" +" 即使 <选项字符串> 的第一个字符不是冒号。OPTERR 的默认值为 1。\n" +" \n" +" getopts 通常解析位置参数,不过如果在 <参数> 中提供了参数,则转而\n" +" 解析它们。\n" +" \n" +" 退出状态:\n" +" 如果找到了一个选项,则返回成功;如果遇到了选项的末尾或者有错误发生,\n" +" 则返回失败。" + +#: builtins.c:694 +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\texecute COMMAND with an empty environment\n" +" -l\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 "" +"使用指定命令替换 shell。\n" +" \n" +" 执行 <命令>,以指定的程序替换这个 shell。以 <参数> 作为 <命令> 的参数。\n" +" 如果没有指定 <命令>,则任何的 <重定向> 都在当前 shell 中生效。\n" +" \n" +" 选项:\n" +" -a 名称\t将 <名称> 作为第 0 个参数传递给 <命令>\n" +" -c\t在一个空的环境中执行 <命令>\n" +" -l\t在 <命令> 的第 0 个参数中放置一个短横线 (-)\n" +" \n" +" 如果无法执行命令,则退出一个非交互式的 shell,除非设定了 shell 选项\n" +" \"execfail\"。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非未找到 <命令>,或者出现一个 <重定向> 错误。" + +#: builtins.c:715 +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 "" +"退出 shell。\n" +" \n" +" 退出 shell,退出状态为 N。如果 N 被省略,则退出状态为最后一个执行的\n" +" 命令的退出状态。" + +#: builtins.c:724 +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 "" +"退出一个登录 shell。\n" +" \n" +" 退出一个登录 shell,退出状态为 N。如果不在登录 shell 中执行,\n" +" 则返回一个错误。" + +#: builtins.c:734 +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" +" \n" +" fc 可用于从历史列表中列出命令,或者编辑并重新执行命令。\n" +" <起始> 和 <终止> 可以是用来指定范围的数字,或者 <起始> 可以是\n" +" 字符串,表示以这个字符串打头的最近的一个命令。\n" +" \n" +" 选项:\n" +" -e 编辑器名\t选择使用哪个编辑器。默认使用 FCEDIT,然后\n" +" \t\t\t是 EDITOR,然后是 vi\n" +" -l\t\t列出行而不编辑\n" +" -n\t\t列举时省略行号\n" +" -r\t\t反转行的顺序(新的在前)\n" +" \n" +" 使用 \"fc -s [模式=替换串 ...] [命令]\" 的格式,<命令> 会在完成\n" +" <模式>=<替换串> 的替换之后被重新执行。\n" +" \n" +" r='fc -s' 是一个有用的别名,这样的话输入 \"r cc\" 会执行最后一个以 \"cc\"\n" +" 开头的命令,输入 \"r\" 会重新执行最后一个命令。\n" +" \n" +" 退出状态:\n" +" 返回成功,或者执行的命令的状态;如果有错误发生,则返回非零。" + +#: builtins.c:764 +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" +" \n" +" 将以 <任务说明符> 指定的任务放至前台,使其成为当前任务。\n" +" 如果没有给出 <任务说明符>,shell 观念中的当前任务将会被使用。\n" +" \n" +" 退出状态:\n" +" 放至前台的命令的状态,或者当错误发生时则返回失败。" + +#: builtins.c:779 +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" +" \n" +" 将以 <任务说明符> 指定的任务放至后台,就像它们是带 \"&\" 启动的一样。\n" +" 如果没有给出 <任务说明符>,shell 观念中的当前任务将会被使用。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非任务控制没有启用,或者有错误发生。" + +#: builtins.c:793 +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\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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\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 "" +"记住或显示程序位置。\n" +" \n" +" 确定并记住每个命令 <名称> 的完整路径名。\n" +" 如果不提供参数,则显示已经记住的命令的信息。\n" +" \n" +" 选项:\n" +" -d\t忘记每一个 <名称> 的已经记住的位置\n" +" -l\t以可重新用作输入的格式显示\n" +" -p 路径名\t使用 <路径名> 作为 <命令> 的完整路径名\n" +" -r\t忘记所有已经记住的位置\n" +" -t\t打印每一个 <名称> 的已经记住的位置,如果指定了多个\n" +" \t\t<名称>,则在每个位置前面加上对应的 <名称>\n" +" \n" +" 参数:\n" +" 名称\t会在 $PATH 中搜索每个 <名称>,并且添加到已经记住的命令\n" +" \t\t列表中。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非没有找到 <名称>,或者使用了无效的选项。" + +#: builtins.c:818 +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" +" \t\tPATTERN\n" +" \n" +" Arguments:\n" +" PATTERN\tPattern specifying a help topic\n" +" \n" +" Exit Status:\n" +" Returns success unless PATTERN is not found or an invalid option is given." +msgstr "" +"显示内建命令的相关信息。\n" +" \n" +" 显示内建命令的简略信息。如果指定了 <模式>,给出所有匹配 <模式>\n" +" 的命令的详细帮助,否则打印帮助主题列表。\n" +" \n" +" 选项:\n" +" -d\t输出每个主题的简短描述\n" +" -m\t以伪 man 手册的格式显示用法\n" +" -s\t仅对每一个匹配 <模式> 的主题输出简短的用法提要\n" +" \n" +" 参数:\n" +" 模式\t用来确定帮助主题的模式\n" +" \n" +" 退出状态:\n" +" 返回成功,除非没有找到 <模式>,或者使用了无效的选项。" + +#: builtins.c:842 +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 position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" +" -r\tread the history file and append the contents to the history\n" +" \t\tlist\n" +" -w\twrite the current history to the history file\n" +" \n" +" -p\tperform history expansion on each ARG and display the result\n" +" \t\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 会仅列出最后的 N 个条目。\n" +" \n" +" 选项:\n" +" -c\t删除所有条目从而清空历史列表\n" +" -d 偏移量\t删除位于 <偏移量> 的历史条目。负的 <偏移量> 表示从\n" +" \t\t历史列表末尾开始倒数\n" +" \n" +" -a\t将当前会话的历史追加到历史文件中\n" +" -n\t从历史文件中读取所有未被读取的行,并且将它们追加到历史列表\n" +" -r\t读取历史文件并将内容追加到历史列表中\n" +" -w\t将当前历史写入到历史文件中\n" +" \n" +" -p\t对每一个 <参数> 执行历史展开并显示结果,而不存储到历史列表中\n" +" -s\t将 <参数> 作为单一条目追加到历史列表中\n" +" \n" +" 如果给定了 <文件名>,则将其用作历史文件。否则,如果 HISTFILE 变量\n" +" 有值的话,则使用它,否则使用 ~/.bash_history 文件。\n" +" \n" +" 如果 HISTTIMEFORMAT 变量被设定并且不为空,它的值会被用作 strftime(3)\n" +" 的格式字符串,以打印每个显示的历史条目的时间戳。否则,不打印时间戳。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者有错误发生。" + +#: builtins.c:879 +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\tlists only processes that have changed status since the last\n" +" \t\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" +" \n" +" 列出活动的任务。<任务说明符> 限制仅输出指定的任务。\n" +" 不带选项时,显示所有活动任务的状态。\n" +" \n" +" 选项:\n" +" -l\t在正常信息的基础上列出进程 ID\n" +" -n\t仅列出上次通知之后改变了状态的进程\n" +" -p\t仅列出进程 ID\n" +" -r\t限制仅输出运行中的任务\n" +" -s\t限制仅输出已停止的任务\n" +" \n" +" 如果使用了 -x 选项,<参数> 中的所有任务说明符会被替换为该任务\n" +" 的进程组头领的进程 ID,然后用替换后的参数执行 <命令>。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者有错误发生。\n" +" 如果使用了 -x 选项,则返回 <命令> 的退出状态。" + +#: builtins.c:906 +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" +" \t\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 "" +"从当前 shell 中删除任务。\n" +" \n" +" 从活动任务列表中删除每一个 <任务说明符> 参数。不带任何 <任务说明符>\n" +" 时,shell 使用它的观念中的当前任务。\n" +" \n" +" 选项:\n" +" -a\t如果不提供 <任务说明符>,则删除所有任务\n" +" -h\t标记每个 <任务说明符> 对应的任务,从而当 shell 接收到 SIGHUP\n" +" \t\t信号时不发送 SIGHUP 给指定任务\n" +" -r\t仅删除运行中的任务\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项或者 <任务说明符>。" + +#: builtins.c:925 +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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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 "" +"向一个任务发送一个信号。\n" +" \n" +" 向以 或者 <任务说明符> 指定的进程发送一个以 <信号说明符> 或\n" +" <信号编号> 指定的信号。如果没有指定 <信号说明符> 和 <信号编号>,\n" +" 那么假定发送 SIGTERM 信号。\n" +" \n" +" 选项:\n" +" -s 信号\t<信号> 是信号名称\n" +" -n 信号\t<信号> 是信号编号\n" +" -l\t列出所有信号名称;如果 \"-l\" 后有参数,则假定它们是信号编号,\n" +" \t\t并列出对应的信号名称\n" +" -L\t同 -l\n" +" \n" +" kill 成为 shell 内建有两个理由:它允许使用任务 ID 代替进程 ID,\n" +" 并且在您可以创建的进程数达到上限时仍可以杀死进程。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者有错误发生。" + +#: builtins.c:949 +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" +" 将每个 <参数> 作为算术表达式进行求值。求值在固定宽度的整数中完成,\n" +" 没有溢出检测,不过除以 0 的异常会被捕获,并且会报一个错误。下面的运算符\n" +" 列表中,同一行的运算符的优先级相等。列表按照优先级从高到低进行排序。\n" +" \n" +" \tid++, id--\t变量的后缀自增、后缀自减\n" +" \t++id, --id\t变量的前缀自增、前缀自减\n" +" \t-, +\t\t一元负号、正号\n" +" \t!, ~\t\t逻辑和按位取反\n" +" \t**\t\t指数\n" +" \t*, /, %\t\t乘法、除法、取余数\n" +" \t+, -\t\t加法、减法\n" +" \t<<, >>\t\t按位左移、按位右移\n" +" \t<=, >=, <, >\t比较\n" +" \t==, !=\t\t等于,不等于\n" +" \t&\t\t按位与\n" +" \t^\t\t按位异或\n" +" \t|\t\t按位或\n" +" \t&&\t\t逻辑与\n" +" \t||\t\t逻辑或\n" +" \texpr ? expr : expr\n" +" \t\t\t条件运算符\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\t赋值\n" +" \n" +" shell 变量允许作为操作数。变量的名称会被它的值替代(强制转换为固定\n" +" 宽度的整数)。变量不需要打开 \"整数\" 属性就可以在表达式中使用。\n" +" \n" +" 运算符按照优先级顺序进行求值。括号中的子表达式将最先求值,\n" +" 并可以覆盖上述优先级规则。\n" +" \n" +" 退出状态:\n" +" 如果最后一个 <参数> 求值结果为 0,则 let 返回 1; 否则 let 返回 0。" + +#: builtins.c:994 +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. By default, the backslash character escapes delimiter characters\n" +" and newline.\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\tuse Readline to obtain the line\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\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\n" +" -p prompt\toutput the string PROMPT without a trailing newline before\n" +" \t\tattempting to read\n" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error occurs,\n" +" or an invalid file descriptor is supplied as the argument to -u." +msgstr "" +"从标准输入读取一行,并将其分割为不同的字段。\n" +" \n" +" 从标准输入读取单独的一行,或者如果使用了 -u 选项,从文件描述符 中\n" +" 读取。该行会被分割成字段,如同分割词语一样,并且第一个词被赋值给第一个\n" +" <名称>,第二个词被赋值给第二个 <名称>,以此类推,剩下所有的词被赋值给\n" +" 最后一个 <名称>。只有 $IFS 中的字符会被视为词语分隔符。默认情况下,\n" +" 反斜杠字符可以转义分隔符和换行符。\n" +" \n" +" 如果没有提供 <名称>,则读取的行被存放在 REPLY 变量中。\n" +" \n" +" 选项:\n" +" -a 数组\t将词语按顺序赋值给 <数组> 变量的各个成员,索引从零开始\n" +" -d 分隔符\t继续读取,直到遇到 <分隔符> 的第一个字符,而不是换行符\n" +" -e\t使用 Readline 获取行\n" +" -i 文本\t使用 <文本> 作为 Readline 的初始文字\n" +" -n 字符数\t读取 <字符数> 个字符之后返回,而不是等到读取换行符。\n" +" \t\t但是如果读取了不到 <字符数> 个字符就遇到了分隔符,\n" +" \t\t则分隔符仍然生效\n" +" -N 字符数\t仅在恰好读取了 <字符数> 个字符之后返回,除非遇到 EOF\n" +" \t\t或者读取超时。忽略所有的分隔符\n" +" -p 提示符\t在尝试进行读取之前先输出 <提示符>(不加换行)\n" +" -r\t不允许反斜杠转义任何字符\n" +" -s\t不回显来自终端的输入\n" +" -t 超时\t如果在 <超时> 秒内没有读取一个完整的行则超时并且返回失败。\n" +" \t\t默认的超时时间是 TMOUT 变量的值。<超时> 可以是小数。\n" +" \t\t如果 <超时> 是 0,read 会立即返回而不尝试读取任何数据,\n" +" \t\t且仅当可以从指定的文件描述符获取输入时,才返回成功。\n" +" \t\t如果超过了超时时间,则退出状态大于 128\n" +" -u fd\t从文件描述符 中读取,而不是标准输入\n" +" \n" +" 退出状态:\n" +" 返回码为零,除非遇到了文件结束符、读取超时(此时返回码大于 128)、\n" +" 发生了变量赋值错误,或者 -u 选项的参数中的文件描述符无效。" + +#: builtins.c:1042 +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 "" +"从一个 shell 函数返回。\n" +" \n" +" 使一个函数或者被 source 的脚本退出,返回值为 N。如果 N 被\n" +" 省略,则返回状态为函数或脚本中最后一个被执行的命令的返回状态。\n" +" \n" +" 退出状态:\n" +" 返回 N,或者如果 shell 不在执行一个函数或脚本时,返回失败。" + +#: builtins.c:1055 +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 resolve symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\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 "" +"设定或取消设定 shell 选项和位置参数的值。\n" +" \n" +" 改变 shell 属性和位置参数的值,或者显示 shell 变量的名称和值。\n" +" \n" +" 选项:\n" +" -a 标记修改的或者创建的变量为导出变量。\n" +" -b 在任务终止时立即进行通知。\n" +" -e 如果一个命令以非零状态退出,则立即退出。\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 shell 读取到 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" +" 状态,或者如果没有命令以非零状态退出,则返回零。\n" +" posix 改变 bash 中默认操作和 Posix 标准不同的行为,\n" +" 以符合标准\n" +" privileged 与 -p 相同\n" +" verbose 与 -v 相同\n" +" vi 使用 vi 风格的行编辑界面\n" +" xtrace 与 -x 相同\n" +" -p 只要真实用户 ID 和有效用户 ID 不匹配时就会被打开。\n" +" 禁用对 $ENV 文件的处理以及 shell 函数的导入。关闭此选项\n" +" 会导致有效 uid 和 gid 被设定为真实 uid 和 gid。\n" +" -t 读取并执行一个命令之后退出。\n" +" -u 替换时将未设定的变量视为错误。\n" +" -v 读取 shell 输入行时将其打印。\n" +" -x 执行命令时打印命令及其参数。\n" +" -B shell 会执行大括号展开。\n" +" -C 设定之后,禁止以重定向输出的方式覆盖普通文件。\n" +" -E 设定之后,ERR 陷阱会被 shell 函数继承。\n" +" -H 启用 ! 风格的历史替换。当 shell 是交互式的时候这个标志默认打开。\n" +" -P 设定之后,当执行会改变当前目录的命令,例如 cd 时,不解析符号链接。\n" +" -T 设定之后,DEBUG 和 RETURN 陷阱会被 shell 函数继承。\n" +" -- 将所有剩余的参数赋值给位置参数。\n" +" 如果没有剩余的参数,则取消设定位置参数。\n" +" - 将所有剩余的参数赋值给位置参数。\n" +" 关闭 -x 和 -v 选项。\n" +" \n" +" 使用 + 而不是 - 会关闭标志。标志也可以在 shell 被启动时使用。当前已设定的\n" +" 标志可以在 $- 变量中找到。剩余的 n 个 <参数> 是位置参数,并且会被按顺序\n" +" 赋值给 $1, $2, .. $n。如果没有给定 <参数>,则打印所有的 shell 变量。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的参数。" + +#: builtins.c:1140 +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\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\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 变量和函数的值和属性。\n" +" \n" +" 对于每一个 <名称>,删除对应的变量或函数。\n" +" \n" +" 选项:\n" +" -f\t将每个 <名称> 视为 shell 函数\n" +" -v\t将每个 <名称> 视为 shell 变量\n" +" -n\t将每个 <名称> 视为名称引用,并取消设定该变量本身,而不是\n" +" \t\t其引用的变量\n" +" \n" +" 不带选项时,unset 首先尝试取消设定一个变量,如果失败,再尝试取消设定\n" +" 一个函数。\n" +" \n" +" 某些变量不可以被取消设定;参见 \"readonly\"。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者 <名称> 为只读。" + +#: builtins.c:1162 +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 "" +"为 shell 变量设定 \"导出\" 属性。\n" +" \n" +" 标记每个 <名称>,将其自动导出到后续执行的命令的环境。\n" +" 如果提供了 <值>,则导出前将其赋值为 <值>。\n" +" \n" +" 选项:\n" +" -f\t所指代的是 shell 函数\n" +" -n\t删除每个 <名称> 的 \"导出\" 属性\n" +" -p\t显示所有导出的变量和函数的列表\n" +" \n" +" 参数 \"--\" 禁用后续的选项处理。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者 <名称> 无效。" + +#: builtins.c:1181 +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 or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 变量为不可改变。\n" +" \n" +" 标记每一个 <名称> 为只读;这些 <名称> 的值将不可以被后续的赋值操作\n" +" 所改变。如果提供了 <值>,则在标记为只读之前将 <值> 赋给变量。\n" +" \n" +" 选项:\n" +" -a\t所指代的是索引数组变量\n" +" -A\t所指代的是关联数组变量\n" +" -f\t所指代的是 shell 函数\n" +" -p\t显示所有只读变量或者函数的列表,取决于是否提供了 -f 选项\n" +" \n" +" 参数 \"--\" 禁用后续的选项处理。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者 <名称> 无效。" + +#: builtins.c:1203 +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 "" +"移位位置参数。\n" +" \n" +" 将位置参数 $N+1,$N+2 ... 重命名为 $1,$2 ...。如果没有给定 N,\n" +" 则假定 N 为 1。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非 N 为负数或者大于 $#。" + +#: builtins.c:1215 builtins.c:1230 +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 "" +"在当前 shell 中执行一个文件中的命令。\n" +" \n" +" 在当前 shell 中读取并执行 <文件名> 中的命令。将使用 $PATH 变量中的\n" +" 条目寻找包含 <文件名> 的目录。如果提供了 <参数>,则它们将成为\n" +" <文件名> 执行时的位置参数。\n" +" \n" +" 退出状态:\n" +" 返回 <文件名> 中最后一个被执行的命令的状态;如果无法读取 <文件名>,\n" +" 则返回失败。" + +#: builtins.c:1246 +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 "" +"挂起 shell 的执行。\n" +" \n" +" 挂起此 shell 的执行,直到它收到 SIGCONT 信号。\n" +" 登录 shell 不可以被挂起,除非强制执行。\n" +" \n" +" 选项:\n" +" -f\t强制挂起,即使此 shell 是登录 shell。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非没有启用任务控制,或者有错误发生。" + +#: builtins.c:1262 +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 and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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 "" +"对条件表达式进行求值。\n" +" \n" +" 根据 <表达式> 的求值结果,以状态 0(真)或 1(假)退出。\n" +" 表达式可以是一元的或者二元的。一元表达式通常用于检测文件状态。\n" +" 同时还有字符串运算符和数值比较运算符。\n" +" \n" +" test 的行为取决于参数的数量。请阅读 bash 手册页以获取完整的\n" +" 说明文档。\n" +" \n" +" 文件运算符:\n" +" \n" +" -a 文件 如果 <文件> 存在则为真。\n" +" -b 文件 如果 <文件> 为块特殊文件则为真。\n" +" -c 文件 如果 <文件> 为字符特殊文件则为真。\n" +" -d 文件 如果 <文件> 为目录则为真。\n" +" -e 文件 如果 <文件> 存在则为真。\n" +" -f 文件 如果 <文件> 存在且为普通文件则为真。\n" +" -g 文件 如果 <文件> 设置了 setgid 位则为真。\n" +" -h 文件 如果 <文件> 为符号链接则为真。\n" +" -L 文件 如果 <文件> 为符号链接则为真。\n" +" -k 文件 如果 <文件> 设置了粘滞位 (sticky bit) 则为真。\n" +" -p 文件 如果 <文件> 为命名管道则为真。\n" +" -r 文件 如果 <文件> 对您是可读的则为真。\n" +" -s 文件 如果 <文件> 存在且不为空则为真。\n" +" -S 文件 如果 <文件> 是套接字则为真。\n" +" -t FD 如果文件描述符 已在一个终端上打开则为真。\n" +" -u 文件 如果 <文件> 设置了 setuid 位则为真。\n" +" -w 文件 如果 <文件> 对您是可写的则为真。\n" +" -x 文件 如果 <文件> 对您是可执行的则为真。\n" +" -O 文件 如果 <文件> 是被您(有效 uid)所有的则为真。\n" +" -G 文件 如果 <文件> 是被您的组(有效 gid)所有的则为真。\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" +" \n" +" 字符串1 = 字符串2\n" +" 如果两个字符串相等则为真。\n" +" 字符串1 != 字符串2\n" +" 如果两个字符串不相等则为真。\n" +" 字符串1 < 字符串2\n" +" 如果按字典序 <字符串1> 在 <字符串2> 之前则为真。\n" +" 字符串1 > 字符串2\n" +" 如果按字典序 <字符串1> 在 <字符串2> 之后则为真。\n" +" \n" +" 其他运算符:\n" +" \n" +" -o 选项 如果指定的 shell 选项 <选项> 启用则为真。\n" +" -v 变量 如果指定的 shell 变量 <变量> 已设定则为真。\n" +" -R 变量 如果指定的 shell 变量 <变量> 已设定且为名称引用则为真。\n" +" ! 表达式 如果 <表达式> 为假则为真。\n" +" 表达式1 -a 表达式2\n" +" 如果 <表达式1> 和 <表达式2> 都为真则为真。\n" +" 表达式1 -o 表达式2\n" +" 如果 <表达式1> 和 <表达式2> 中任何一个为真则为真。\n" +" \n" +" 参数1 运算符 参数2\n" +" 算术测试。<运算符> 可以是 -eq、-ne、\n" +" -lt、-le、-gt 或 -ge 中的一个。\n" +" \n" +" 二元算术运算符返回真,如果 <参数1> 等于、不等于、小于、小于等于、\n" +" 大于,或者大于等于 <参数2>。\n" +" \n" +" 退出状态:\n" +" 如果 <表达式> 求值结果为真则返回成功;如果 <表达式> 求值结果为假,\n" +" 或者使用了无效的参数,则返回失败。" + +#: builtins.c:1344 +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 "" +"对条件表达式进行求值。\n" +" \n" +" 同 \"test\" 内建,但是最后一个参数必须是字符 \"]\",以匹配起始的 \"[\"。" + +#: builtins.c:1353 +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" +" \n" +" 打印此 shell 及其所有子进程的累计用户和系统时间。\n" +" \n" +" 退出状态:\n" +" 总是成功。" + +# EXIT and DEBUG should be as-is. Use before you translate, please. +# The -signal is only an example; Read carefully. +#: builtins.c:1365 +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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\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 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" +" 定义并激活当 shell 接收到信号或满足其他条件时执行的处理程序。\n" +" \n" +" <参数> 是当 shell 接收到 <信号说明符> 时读取和执行的命令。如果\n" +" 没有指定 <参数>(并且只给出一个 <信号说明符>)或者 <参数> 为 \"-\",\n" +" 则每一个指定的信号会被重置为原始值。如果 <参数> 是空字符串,则每一个\n" +" <信号说明符> 会被 shell 和它启动的命令忽略。\n" +" \n" +" 如果一个 <信号说明符> 是 EXIT (0),则 <参数> 会在 shell 退出时被执行。\n" +" 如果一个 <信号说明符> 是 DEBUG,则 <参数> 会在每一个简单命令之前执行。\n" +" 如果一个 <信号说明符> 是 RETURN,则 <参数> 会在每一个 shell 函数或者\n" +" 通过 . 或 source 内建执行的脚本执行结束时被执行。如果一个 <信号说明符>\n" +" 是 ERR,则 <参数> 会在命令返回失败,并且假如启用了 -e 选项,本次失败就\n" +" 会导致 shell 退出的情况下被执行。\n" +" \n" +" 如果不提供参数,trap 打印与每一个信号相关联的命令列表。\n" +" \n" +" 选项:\n" +" -l\t打印信号名称以及和它们对应的编号的列表\n" +" -p\t打印与每个 <信号说明符> 相关联的陷阱命令\n" +" \n" +" 每一个 <信号说明符> 可以是 中的信号名称或者信号编号。信号名称\n" +" 是大小写敏感的,并且 SIG 前缀是可选的。可以使用 \"kill -信号 $$\" 给 shell\n" +" 发送信号。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的 <信号说明符>,或者无效的选项。" + +#: builtins.c:1401 +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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\tthat would be executed\n" +" -p\treturns either the name of the disk file that would be executed,\n" +" \t\tor nothing if `type -t NAME' would not return `file'\n" +" -t\toutput a single word which is one of `alias', `keyword',\n" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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" +" \n" +" 对于每一个 <名称>,指出如果作为命令名使用时,它将如何被解释。\n" +" \n" +" 选项:\n" +" -a\t当且仅当没有同时使用 \"-p\" 选项时,显示所有包含名为 <名称>\n" +" \t\t的可执行文件的位置;包括别名、内建和函数\n" +" -f\t阻止 shell 函数查找流程\n" +" -P\t强制对每个 <名称> 搜索 PATH,即使它是别名、内建或函数,\n" +" \t\t并且返回将被执行的磁盘上的文件的名称\n" +" -p\t返回将被执行的磁盘上的文件的名称,或者当 \"type -t 名称\"\n" +" \t\t不返回 \"file\" 时,不返回任何值\n" +" -t\t返回下列单词中的一个:\"alias\"、\"keyword\"、\"function\"、\n" +" \t\t\"builtin\"、\"file\" 或者 \"\",分别表示 <名称> 是一个别名、\n" +" \t\tshell 保留字、shell 函数、shell 内建、磁盘文件或者未找到\n" +" \n" +" 参数:\n" +" 名称\t需要解释的命令。\n" +" \n" +" 退出状态:\n" +" 如果所有的 <名称> 都被找到则返回成功;任何一个未找到则失败。" + +#: builtins.c:1432 +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" +" -k\tthe maximum number of kqueues allocated for this process\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" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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 "" +"修改 shell 资源限制。\n" +" \n" +" 在允许此类控制的系统上,提供对于 shell 及其创建的进程可使用的资源的\n" +" 控制。\n" +" \n" +" 选项:\n" +" -S\t使用 \"软\" (soft) 资源限制\n" +" -H\t使用 \"硬\" (hard) 资源限制\n" +" -a\t报告当前的所有限制\n" +" -b\t套接字缓冲区大小\n" +" -c\t创建的核心文件的最大大小\n" +" -d\t一个进程的数据段的最大大小\n" +" -e\t调度优先级 (nice) 的最大值\n" +" -f\tshell 及其子进程可以写的最大文件大小\n" +" -i\t可以挂起的最大信号数量\n" +" -k\t分配给此进程的最大 kqueue 数量\n" +" -l\t一个进程可以锁定的最大内存大小\n" +" -m\t驻留集的最大大小\n" +" -n\t打开的文件描述符的最大个数\n" +" -p\t管道缓冲区大小\n" +" -q\tPOSIX 消息队列的最大字节数\n" +" -r\t实时调度的最大优先级\n" +" -s\t最大栈大小\n" +" -t\t最大的 CPU 时间,以秒为单位\n" +" -u\t最大用户进程数\n" +" -v\t虚拟内存大小\n" +" -x\t文件锁的最大数量\n" +" -P\t伪终端的最大数量\n" +" -R\t实时进程阻塞前可运行的最大时间\n" +" -T\t最大线程数量\n" +" \n" +" 并非所有选项都在所有系统上可用。\n" +" \n" +" 如果提供了 <限制>,则它将成为指定的资源的新的值;特殊的 <限制> 值为\n" +" \"soft\"、\"hard\" 和 \"unlimited\",分别表示当前的软限制、当前的硬限制,\n" +" 以及无限制。否则,打印指定资源的当前限制值。如果未提供选项,则假定\n" +" 为 -f。\n" +" \n" +" 限制值的单位都是 1024 字节,除了 -t 单位是秒,-p 单位是 512 字节,\n" +" -u 为未经缩放的进程数量。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者有错误发生。" + +#: builtins.c:1483 +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" +" \n" +" 设定用户文件创建掩码为 <模式>。如果省略 <模式>,则打印当前掩码的值。\n" +" \n" +" 如果 <模式> 以数字开头,则按照八进制数进行解释;否则视为一个\n" +" chmod(1) 可接受的符号模式串。\n" +" \n" +" 选项:\n" +" -p\t如果省略 <模式>,以可重用作输入的格式输出\n" +" -S\t以符号形式输出,否则以八进制数格式输出\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的 <模式> 或者选项。" + +#: builtins.c:1503 +msgid "" +"Wait for job completion and return exit status.\n" +" \n" +" Waits for each process identified by an 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 job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." +msgstr "" +"等待任务完成并返回退出状态。\n" +" \n" +" 等待以 指定的进程,其中 可以是进程 ID 或者任务说明符,\n" +" 并报告它的终止状态。如果没有指定 ,则等待当前活跃的所有子\n" +" 进程,并且返回状态为零。如果 是任务说明符,则等待该任务的\n" +" 流水线中的所有进程。\n" +" \n" +" 若给定了 -n 选项,从 列表中等待单个任务完成,或者,\n" +" 如果没有提供 ,等待下一个任务完成并返回其退出状态。\n" +" \n" +" 若给定了 -p 选项, 被返回退出状态的任务的进程 ID 或任务 ID 将被赋值\n" +" 给选项的参数指定的 <变量>。该变量会首先被取消设定,然后才会进行赋值。\n" +" 该选项只有和 -n 选项同时使用时才有用。\n" +" \n" +" 若给定了 -f 选项,且启用了任务控制,则等待指定的 终止,\n" +" 而不是等待它改变状态。\n" +" \n" +" 退出状态:\n" +" 返回最后一个 的状态;如果使用了无效的 ,或者使用了无效的\n" +" 选项,或者给定了 -n 选项但 shell 没有尚未等待的子进程,则失败。" + +#: builtins.c:1534 +msgid "" +"Wait for process completion and return exit status.\n" +" \n" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status is zero. PID must be a process ID.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." +msgstr "" +"等待进程完成并且返回退出状态。\n" +" \n" +" 等待以 指定的进程并报告它的终止状态。如果没有提供 ,则等待当前\n" +" 所有活跃的子进程,并且返回码为零。 必须为进程 ID。\n" +" \n" +" 退出状态:\n" +" 返回最后一个 的状态;如果 无效,或者使用了无效的选项,则失败。" + +#: builtins.c:1549 +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 "" +"为列表中的每个成员执行命令。\n" +" \n" +" \"for\" 循环为列表中的每个成员执行一系列的命令。\n" +" 如果没有 \"in 词语 ...;\" ,则假定使用 `in \"$@\"'。对于 <词语> 中的\n" +" 每个元素,<名称> 被设定为该元素,然后执行 <命令>。\n" +" \n" +" 退出状态:\n" +" 返回最后执行的命令的状态。" + +#: builtins.c:1563 +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 "" +"算术 for 循环。\n" +" \n" +" 等价于\n" +" \t(( 表达式1 ))\n" +" \twhile (( 表达式2 )); do\n" +" \t\t命令\n" +" \t\t(( 表达式3 ))\n" +" \tdone\n" +" <表达式1>、<表达式2> 和 <表达式3> 都是算术表达式。如果省略任何表达式,\n" +" 则等价于使用了求值结果为 1 的表达式。\n" +" \n" +" 退出状态:\n" +" 返回最后执行的命令的状态。" + +#: builtins.c:1581 +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" +" <词语> 被展开,生成一个词语列表。展开后的词语集合被打印到\n" +" 标准错误,每个词语前面打印一个数字。如果没有 \"in 词语\" ,则假定\n" +" 使用 `in \"$@\"'。然后,会显示一个 PS3 提示符,并且从标准输入读取\n" +" 一行。如果该行是所显示的词之一所对应的数字,则 <名称> 被设定为\n" +" 相应的词。如果该行为空,则会重新显示 <词语> 和提示符。如果读到了\n" +" EOF,则命令完成。读入任何其他的值会导致 <名称> 变量被设定为空。\n" +" 读入的行被存放在变量 REPLY 中。<命令> 会在每次选择之后被执行,\n" +" 直到执行到 break 命令。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1602 +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" +" 执行 <流水线> 并且打印 <流水线> 终止时消耗的真实时间、用户 CPU 时间\n" +" 和系统 CPU 时间的总结。\n" +" \n" +" 选项:\n" +" -p\t用可移植的 POSIX 格式打印用时总结。\n" +" \n" +" 使用 TIMEFORMAT 变量的值作为输出格式。\n" +" \n" +" 退出状态:\n" +" 返回状态是 <流水线> 的返回状态。" + +#: builtins.c:1619 +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" +" \n" +" 根据和 <词语> 匹配的 <模式> ,选择性地执行 <命令>。\n" +" \"|\" 用于分隔多个模式。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1631 +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 "" +"根据条件执行命令。\n" +" \n" +" 执行 \"if 命令\" 列表。如果退出状态为零,则执行 \"then 命令\" 列表。\n" +" 否则按顺序执行每个 \"elif 命令\" 列表,如果某一个的退出状态为零,则执行\n" +" 对应的 \"then 命令\" 列表,然后 if 命令完成。否则,执行 \"else 命令\"\n" +" 列表(如果有的话)。整个结构的退出状态是最后一个执行的命令的状态,\n" +" 或者如果没有一个条件的测试结果为真,则退出状态为零。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1648 +msgid "" +"Execute commands as long as a test succeeds.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"只要测试仍然成功,就执行命令。\n" +" \n" +" 只要 <命令> 中的最后一个命令的退出状态仍然为 0,就展开并执行 <命令-2>。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1660 +msgid "" +"Execute commands as long as a test does not succeed.\n" +" \n" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" +" \n" +" Exit Status:\n" +" Returns the status of the last command executed." +msgstr "" +"只要测试仍然不成功,就执行命令。\n" +" \n" +" 只要 <命令> 中的最后一个命令的退出状态仍然不为 0,就展开并执行 <命令-2>。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1672 +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" +" The coproc command returns an exit status of 0." +msgstr "" +"创建一个名为 <名称> 的副进程。\n" +" \n" +" 异步执行 <命令>,并将命令的标准输出和标准输入通过管道连接到执行该命令\n" +" 的 shell 的文件描述符,再将两个文件描述符分别赋值给数组变量 <名称> 的\n" +" 索引为 0 和 1 的元素。\n" +" 默认的 <名称> 是 \"COPROC\"。\n" +" \n" +" 退出状态:\n" +" coproc 命令返回退出状态 0。" + +#: builtins.c:1686 +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 "" +"定义 shell 函数。\n" +" \n" +" 创建一个名为 <名称> 的 shell 函数。当作为一个简单命令被调用时,\n" +" <名称> 在调用它的 shell 的上下文中执行 <命令>。当 <名称> 被调用时,\n" +" 传递给函数的参数储存在 $1...$n 中,函数名储存在 $FUNCNAME 中。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非 <名称> 为只读。" + +#: builtins.c:1700 +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" +" \n" +" 运行一个组中的命令集合。这是对整个命令集合进行重定向的方法之一。\n" +" \n" +" 退出状态:\n" +" 返回最后一个执行的命令的状态。" + +#: builtins.c:1712 +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 "" +"在前台继续任务。\n" +" \n" +" 等价于向 \"fg\" 命令传递 <任务说明符> 参数。继续一个已停止的任务或\n" +" 后台任务。<任务说明符> 可以是任务名称或任务编号。在 <任务说明符>\n" +" 后加上一个 \"&\" 会把任务放至后台,就像该任务说明符被作为 \"bg\" 的参数\n" +" 执行一样。\n" +" \n" +" 退出状态:\n" +" 返回被继续的任务的状态。" + +#: builtins.c:1727 +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" +" \n" +" 对 <表达式> 按照算术求值的规则进行求值。等价于 \"let <表达式>\"。\n" +" \n" +" 退出状态:\n" +" 如果 <表达式> 求值结果为 0,则返回 1;否则返回 0。" + +#: builtins.c:1739 +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 "" +"执行条件命令。\n" +" \n" +" 根据条件表达式 <表达式> 的求值结果返回状态 0 或 1。表达式的基本元素\n" +" 与 \"test\" 内建相同,且可以通过下列运算符进行组合:\n" +" \n" +" ( 表达式 )\t\t返回 <表达式> 的值\n" +" ! 表达式\t\t\t如果 <表达式> 为假则为真,否则为假\n" +" 表达式1 && 表达式2\t如果 <表达式1> 和 <表达式2> 均为真则为真,\n" +" \t\t\t\t否则为假\n" +" 表达式1 || 表达式2\t如果 <表达式1> 和 <表达式2> 中任何一个为真\n" +" \t\t\t\t则为真,否则为假\n" +" \n" +" 当使用 \"==\" 和 \"!=\" 运算符时,运算符右边的字符串被视为模式,进行模式匹配。\n" +" 当使用 \"=~\" 运算符时,运算符右边的字符串被视为正则表达式来进行匹配。\n" +" \n" +" 如果 <表达式1> 足够确定整个表达式的值,运算符 && 和 || 将不会对\n" +" <表达式2> 进行求值。\n" +" \n" +" 退出状态:\n" +" 根据 <表达式> 的值返回 0 或 1。" + +#: builtins.c:1765 +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 "" +"常用 shell 变量名称和用法。\n" +" \n" +" BASH_VERSION\t当前 Bash 的版本信息。\n" +" CDPATH\t用于搜索 \"cd\" 的参数中的目录的,以冒号分隔的目录列表\n" +" GLOBIGNORE\t路径名展开时要忽略的文件名的模式列表,以冒号分隔。\n" +" HISTFILE\t存储您的命令历史的文件名称。\n" +" HISTFILESIZE\t历史文件最多可以保存的行数。\n" +" HISTSIZE\t一个运行的 shell 最多可以访问的历史命令行数。\n" +" HOME\t您的登录目录的完整路径名。\n" +" HOSTNAME\t当前主机的主机名。\n" +" HOSTTYPE\t运行当前版本 BASH 的 CPU 的类型。\n" +" IGNOREEOF\t控制 shell 收到 EOF 作为唯一输入字符后的动作。如果\n" +" \t\t该变量被设定,则它的值是 shell 退出之前在一个空行上\n" +" \t\t可以连续读取到的 EOF 数量(默认为 10)。如果未设定,\n" +" \t\tEOF 标志着输入的结束。\n" +" MACHTYPE\t描述当前运行 Bash 的系统的字符串。\n" +" MAILCHECK\tBash 检查新邮件的频率,以秒为单位。\n" +" MAILPATH\tBash 从中检查新邮件的文件列表,以冒号分隔。\n" +" OSTYPE\t运行当前版本 Bash 的 Unix 版本。\n" +" PATH\t寻找命令时搜索的目录列表,以冒号分隔。\n" +" PROMPT_COMMAND\t每次打印主提示符之前执行的命令。\n" +" PS1\t\t主提示符字符串。\n" +" PS2\t\t次提示符字符串。\n" +" PWD\t\t当前目录的完整路径名。\n" +" SHELLOPTS\t已启用的 shell 选项列表,以冒号分隔。\n" +" TERM\t当前终端类型的名称。\n" +" TIMEFORMAT\t保留字 \"time\" 显示的时间统计信息的输出格式。\n" +" auto_resume\t非空时,一个单独的命令词会首先被在当前已停止的\n" +" \t\t任务列表中搜索。如果找到,则该任务被置于前台。\n" +" \t\t如果值为 \"exact\" 则意味着命令词必须精确匹配已停止的\n" +" \t\t任务列表中的命令。如果值为 \"substring\" 则意味着命令词\n" +" \t\t必须匹配任务的一个子字符串。任何其他的值意味着命令词\n" +" \t\t必须是已停止的任务的一个前缀。\n" +" histchars\t控制历史展开和快速替换的字符。第一个字符是\n" +" \t\t历史替换字符,通常是 \"!\"。第二个字符是快速替换字符,\n" +" \t\t通常是 \"^\"。第三个字符是历史注释字符,通常是 \"#\"。\n" +" HISTIGNORE\t用于决定哪些命令被存入历史文件的模式列表,以冒号分隔。\n" + +#: builtins.c:1822 +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" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\tzero) is at the top.\n" +" \n" +" dir\tAdds DIR to the directory stack at the top, making it the\n" +" \t\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\t阻止添加目录至栈时通常的改变目录操作,从而仅对栈\n" +" \t\t进行操作。\n" +" \n" +" 参数:\n" +" +N\t轮转栈,使得第 N 个目录(\"dirs\" 显示的列表中左起,\n" +" \t\t从零开始)移动到栈顶。\n" +" \n" +" -N\t轮转栈,使得第 N 个目录(\"dirs\" 显示的列表中右起,\n" +" \t\t从零开始)移动到栈顶。\n" +" \n" +" 目录\t将 <目录> 添加到栈顶,使其成为当前工作目录。\n" +" \n" +" \"dirs\" 内建可以显示目录栈。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的参数,或者改变目录失败。" + +#: builtins.c:1856 +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" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tRemoves the Nth entry counting from the right of the list\n" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\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\t阻止从栈中删除目录时通常的改变目录操作,从而仅对栈进行操作。\n" +" \n" +" 参数:\n" +" +N\t删除第 N 个目录(\"dirs\" 显示的列表中左起,从零开始)。\n" +" \t\t例如:\"popd +0\" 删除第一个目录,\"popd +1\" 删除第二个。\n" +" \n" +" -N\t删除第 N 个目录(\"dirs\" 显示的列表中右起,从零开始)。\n" +" \t\t例如:\"popd -0\" 删除最后一个目录,\"popd -1\" 删除倒数第二个。\n" +" \n" +" \"dirs\" 内建可以显示目录栈。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的参数,或者改变目录失败。" + +#: builtins.c:1886 +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" +" \t\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" +" \t\twith its position in the stack\n" +" \n" +" Arguments:\n" +" +N\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" -N\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"显示目录栈。\n" +" \n" +" 显示当前记住的目录列表。 使用 \"pushd\" 命令将目录加入这个列表;\n" +" 使用 \"popd\" 命令逐个回到之前加入列表的目录。\n" +" \n" +" 选项:\n" +" -c\t删除所有元素以清空目录栈\n" +" -l\t打印目录时,不表示为以波浪号 (~) 为前缀的,\n" +" \t\t相对于您的主目录的路径\n" +" -p\t每行一个条目打印目录栈\n" +" -v\t每行一个条目打印目录栈,前面加上在栈中的位置\n" +" \n" +" 参数:\n" +" +N\t显示 dirs 不带选项启动时显示的目录列表中左起第 N 个目录,\n" +" \t\t从零开始。\n" +" \n" +" -N\t显示 dirs 不带选项启动时显示的目录列表中右起第 N 个目录,\n" +" \t\t从零开始。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者有错误发生。" + +#: builtins.c:1917 +msgid "" +"Set and unset shell options.\n" +" \n" +" Change the setting of each shell option OPTNAME. Without any option\n" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each 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 选项。\n" +" \n" +" 改变每个 shell 选项 <选项名> 的设定。不带选项时,列出每个提供的\n" +" <选项名>,或者如果没有提供 <选项名> 时,列出所有 shell 选项,同时\n" +" 标注每一个选项是否被设定。\n" +" \n" +" 选项:\n" +" -o\t限制 <选项名>,只使用可被 \"set -o\" 设置的选项\n" +" -p\t打印每个 shell 选项并标注它的状态。\n" +" -q\t阻止输出\n" +" -s\t启用(设定)每个 <选项名>\n" +" -u\t禁用(取消设定)每个 <选项名>\n" +" \n" +" 退出状态:\n" +" 如果 <选项名> 被启用则返回成功;如果使用了无效的选项,或者 <选项名>\n" +" 被禁用,则返回失败。" + +#: builtins.c:1938 +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" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is given or a write or assignment\n" +" error occurs." +msgstr "" +"在 <格式> 的控制下格式化并打印 <参数>。\n" +" \n" +" 选项:\n" +" -v 变量\t将输出赋值给 shell 变量 <变量>,而不是将它显示在\n" +" \t\t标准输出上\n" +" \n" +" FORMAT 是包含三种类型的对象的字符串:普通字符,会被简单地复制到标准输出;\n" +" 字符转义序列,会在转义之后复制到标准输出;格式说明符,每个都会让 shell 打印\n" +" 下一个多余的参数。\n" +" \n" +" 除了 printf(1) 中描述的标准格式说明符以外,printf 还可解析:\n" +" \n" +" %b\t展开对应参数中的反斜杠转义序列\n" +" %q\t以可以重新用作 shell 输入的格式给参数加上引号\n" +" %Q\t类似 %q,但是精度要求会在加引号之前对尚未加引号的参数生效\n" +" %(格式)T\t将 <格式> 作为 strftime(3) 的格式字符串,并输出产生的\n" +" \t 日期-时间字符串\n" +" \n" +" 有必要时,会重新使用格式串以消耗所有参数。如果参数的数量少于格式串要求\n" +" 的数量,则视为将零值或空字符串(视情况而定)提供给了多余的格式说明符。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者发生了写入或赋值错误。" + +#: builtins.c:1974 +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" +" \t\tNAMEs are supplied, all completion specifications\n" +" -D\tapply the completions and actions as the default for commands\n" +" \t\twithout any specific completion defined\n" +" -E\tapply the completions and actions to \"empty\" commands --\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\n" +" \n" +" When completion is attempted, the actions are applied in the order the\n" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" +" \n" +" Exit Status:\n" +" Returns success unless an invalid option is supplied or an error occurs." +msgstr "" +"指定 Readline 如何补全参数。\n" +" \n" +" 指定对于每一个 <名称> 如何补全参数。如果不带选项,现有的补全规约会以\n" +" 可以重新用作输入的格式打印出来。\n" +" \n" +" 选项:\n" +" -p\t以可重用的格式打印现有的补全规约\n" +" -r\t对每一个 <名称> 删除补全规约,或者,如果没有提供 <名称> ,\n" +" \t\t删除所有的补全规约\n" +" -D\t设定默认的补全和动作,给没有定义补全规约的命令使用\n" +" -E\t对于 \"空\" (empty) 命令设定补全动作 -- 对于空行的补全\n" +" -I\t将补全和动作应用在首个单词(通常是所给命令)上\n" +" \n" +" 尝试补全时,按照上述大写字母选项的顺序进行动作。如果给出了多个选项,\n" +" -D 选项优先级高于 -E 选项,且这两个选项优先级均高于 -I。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者有错误发生。" + +#: builtins.c:2004 +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" +" 设计意图是在用来生成可能的补全的 shell 函数的内部使用。\n" +" 如果提供了可选的 <词语> 参数,则依据 <词语> 产生匹配。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者有错误发生。" + +#: builtins.c:2019 +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 being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\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 "" +"修改或显示补全选项。\n" +" \n" +" 修改每个 <名称> 的补全选项,或者如果没有提供 <名称>,修改正在执行的补全的\n" +" 选项。如果没有提供 <选项>,打印每个 <名称> 的补全选项或者当前的补全规约。\n" +" \n" +" 选项:\n" +" \t-o 选项\t\t为每个 <名称> 设定补全选项 <选项>\n" +" \t-D\t\t修改 \"默认\" (default) 命令的补全选项\n" +" \t-E\t\t修改 \"空\" (empty) 命令的补全选项\n" +" \t-I\t\t修改首个单词的补全选项\n" +" \n" +" 使用 \"+o\" 代替 \"-o\" 可以关闭指定的选项。\n" +" \n" +" 参数:\n" +" \n" +" 每个 <名称> 都对应一个之前已通过 \"complete\" 内建定义了补全规约的命令。\n" +" 如果没有提供 <名称>,compopt 必须由当前正在生成补全的函数进行调用,\n" +" 并且当前正在执行的补全生成器的选项会被修改。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者 <名称> 没有定义补全规约。" + +#: builtins.c:2050 +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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" +" \n" +" Arguments:\n" +" ARRAY\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 and the line to be assigned to that element\n" +" as additional arguments.\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 "" +"从标准输入读取行到索引数组变量中。\n" +" \n" +" 从标准输入读取行到索引数组变量 <数组> 中,或者如果使用了 -u 选项,\n" +" 从文件描述符 中读取。默认的 <数组> 是 MAPFILE 变量。\n" +" \n" +" 选项:\n" +" -d 分隔符\t使用 <分隔符> 而非换行符标志一行的结束\n" +" -n 计数\t最多复制 <计数> 行。如果 <计数> 为 0,则复制所有行\n" +" -O 起始\t从索引 <起始> 开始赋值给 <数组> 变量。默认索引是 0\n" +" -s 计数\t丢弃最初读取的 <计数> 行\n" +" -t\t从读取的每行末尾删除一个 <分隔符>(默认为换行符)\n" +" -u fd\t从文件描述符 中读取行,而不是标准输入\n" +" -C 回调\t每读取 <间隔> 行之后对 <回调> 进行求值\n" +" -c 间隔\t指定每次调用 <回调> 之前读取的行数\n" +" \n" +" 参数:\n" +" 数组\t存储文件数据使用的数组变量名\n" +" \n" +" 如果使用了 -C 而没有 -c,默认的间隔是 5000。当对 <回调> 进行求值时,\n" +" 下一个将被赋值的数组元素的索引以及将被赋给那个元素的行会作为额外参数\n" +" 被传递给它。\n" +" \n" +" 如果没有显式指定起始索引,mapfile 会在赋值前清空 <数组>。\n" +" \n" +" 退出状态:\n" +" 返回成功,除非使用了无效的选项,或者 <数组> 为只读或不是索引数组。" + +#: builtins.c:2086 +msgid "" +"Read lines from a file into an array variable.\n" +" \n" +" A synonym for `mapfile'." +msgstr "" +"从一个文件中读取行到数组变量中。\n" +" \n" +" 同 \"mapfile\"。" + +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: 无效的关联数组键" + +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "返回当前子例程调用的上下文\n" +#~ " \n" +#~ " 不带 EXPR 时,返回 " + +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: 进程 %5ld(%s) 进入 the_pipeline" + +#~ msgid "Unknown Signal #" +#~ msgstr "未知信号 #" + +# Inc. 的 . 是个缩写 +#~ msgid "Copyright (C) 2018 Free Software Foundation, Inc." +#~ msgstr "版权所有 (C) 2018 自由软件基金会" + +#~ msgid "Copyright (C) 2014 Free Software Foundation, Inc." +#~ msgstr "版权所有 (C) 2014 自由软件基金会." + +#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" +#~ msgstr "版权所有 (C) 2009 自由软件基金会\n" + +#~ msgid "License GPLv2+: GNU GPL version 2 or later \n" +#~ msgstr "许可证 GPLv2+: GNU GPL 许可证第二版或者更新版本 \n" + +#~ msgid "" +#~ ". With EXPR, returns\n" +#~ " " +#~ msgstr "" +#~ ". 带有 EXPR 时, 返回\n" +#~ " " + +#~ 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 "" +#~ "; 这个额外信息可被用于\n" +#~ " 提供栈追踪.\n" +#~ " \n" +#~ " EXPR 的值显示了回到当前调用帧之前\n" +#~ " 的调用帧书目; 栈顶帧是第0帧." diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo index c3ca675..9dd7546 100644 Binary files a/po/zh_TW.gmo and b/po/zh_TW.gmo differ diff --git a/po/zh_TW.po b/po/zh_TW.po index 7a5d32b..91724f8 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -1,471 +1,558 @@ -# Chinese translations for bash package. -# Copyright (C) 2008 Free Software Foundation, Inc. +# Traditional Chinese translations for bash package. +# Copyright (C) 2020 Free Software Foundation, Inc. # This file is distributed under the same license as the bash package. -# Zi-You Dai , 2008. # +# Zi-You Dai , 2008. +# Mingye Wang (Arthur2e5) , 2015. +# Wei-Lun Chao , 2015. +# Yi-Jyun Pan , 2018, 2019, 2020, 2021. msgid "" msgstr "" -"Project-Id-Version: bash-3.2\n" +"Project-Id-Version: bash 5.2-rc1\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 \n" -"Language-Team: Chinese (traditional) \n" +"POT-Creation-Date: 2022-01-11 14:50-0500\n" +"PO-Revision-Date: 2022-07-28 01:08+0800\n" +"Last-Translator: Yi-Jyun Pan \n" +"Language-Team: Chinese (traditional) \n" +"Language: zh_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" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.1.1\n" -#: arrayfunc.c:50 +#: arrayfunc.c:66 msgid "bad array subscript" -msgstr "" +msgstr "陣列下標不正確" -#: arrayfunc.c:313 builtins/declare.def:481 +#: arrayfunc.c:471 builtins/declare.def:709 variables.c:2242 variables.c:2268 +#: variables.c:3101 #, c-format -msgid "%s: cannot convert indexed to associative array" -msgstr "" +msgid "%s: removing nameref attribute" +msgstr "%s:正在移除 nameref 屬性" -#: arrayfunc.c:480 -#, fuzzy, c-format -msgid "%s: invalid associative array key" -msgstr "%s:無效的功能名稱" +#: arrayfunc.c:496 builtins/declare.def:868 +#, c-format +msgid "%s: cannot convert indexed to associative array" +msgstr "%s: 無法將索引陣列轉化為關聯陣列" -#: arrayfunc.c:482 +#: arrayfunc.c:777 #, c-format msgid "%s: cannot assign to non-numeric index" -msgstr "" +msgstr "%s: 無法指派為非數字的索引" -#: arrayfunc.c:518 +#: arrayfunc.c:822 #, c-format msgid "%s: %s: must use subscript when assigning associative array" -msgstr "" +msgstr "%s: %s: 指派為關聯陣列時必須使用下標" -#: bashhist.c:383 +#: bashhist.c:455 #, c-format msgid "%s: cannot create: %s" -msgstr "" +msgstr "%s: 無法建立: %s" -#: bashline.c:3457 +#: bashline.c:4479 msgid "bash_execute_unix_command: cannot find keymap for command" -msgstr "" +msgstr "bash_execute_unix_command: 無法為指令找到按鍵映射" -#: bashline.c:3543 +#: bashline.c:4637 #, c-format msgid "%s: first non-whitespace character is not `\"'" -msgstr "" +msgstr "%s: 第一個非空字元不是「\"」" -#: bashline.c:3572 +#: bashline.c:4666 #, c-format msgid "no closing `%c' in %s" -msgstr "" +msgstr "%2$s 中沒有閉合的「%1$c」" -#: bashline.c:3606 +#: bashline.c:4697 #, c-format msgid "%s: missing colon separator" -msgstr "" +msgstr "%s: 缺少冒號分隔符" + +#: bashline.c:4733 +#, c-format +msgid "`%s': cannot unbind in command keymap" +msgstr "「%s」: 無法在命令按鍵映射中解除綁定" + +#: braces.c:327 +#, c-format +msgid "brace expansion: cannot allocate memory for %s" +msgstr "大括號展開:無法為 %s 分配記憶體" + +#: braces.c:406 +#, c-format +msgid "brace expansion: failed to allocate memory for %u elements" +msgstr "大括號展開:為 %u 個元素分配記憶體失敗" + +#: braces.c:451 +#, c-format +msgid "brace expansion: failed to allocate memory for `%s'" +msgstr "大括號展開:為「%s」分配記憶體失敗" -#: builtins/alias.def:132 -#, fuzzy, c-format +#: builtins/alias.def:131 variables.c:1817 +#, c-format msgid "`%s': invalid alias name" -msgstr "%s:無效的功能名稱" +msgstr "「%s」: 無效的別名" -#: builtins/bind.def:120 builtins/bind.def:123 +#: builtins/bind.def:122 builtins/bind.def:125 msgid "line editing not enabled" -msgstr "" +msgstr "未啟用列編輯" -#: builtins/bind.def:206 +#: builtins/bind.def:212 #, c-format msgid "`%s': invalid keymap name" -msgstr "" +msgstr "「%s」: 無效的按鍵映射名" -#: builtins/bind.def:245 +#: builtins/bind.def:252 #, c-format msgid "%s: cannot read: %s" -msgstr "%s:不能讀取: %s" - -#: builtins/bind.def:260 -#, c-format -msgid "`%s': cannot unbind" -msgstr "" +msgstr "%s:不能讀取:%s" -#: builtins/bind.def:295 builtins/bind.def:325 +#: builtins/bind.def:328 builtins/bind.def:358 #, c-format msgid "`%s': unknown function name" -msgstr "`%s':未知函數名稱" +msgstr "「%s」:不明函數名稱" -#: builtins/bind.def:303 +#: builtins/bind.def:336 #, c-format msgid "%s is not bound to any keys.\n" -msgstr "" +msgstr "%s 未與任何按鍵綁定。\n" -#: builtins/bind.def:307 +#: builtins/bind.def:340 #, c-format msgid "%s can be invoked via " -msgstr "" +msgstr "%s 可以被呼叫,藉由 " + +#: builtins/bind.def:378 builtins/bind.def:395 +#, c-format +msgid "`%s': cannot unbind" +msgstr "「%s」: 無法解除綁定" -#: builtins/break.def:77 builtins/break.def:117 +#: builtins/break.def:77 builtins/break.def:119 msgid "loop count" -msgstr "" +msgstr "迴圈計數" -#: builtins/break.def:137 +#: builtins/break.def:139 msgid "only meaningful in a `for', `while', or `until' loop" -msgstr "" +msgstr "僅在「for」,「while」, 或者「until」迴圈中有意義" -#: builtins/caller.def:133 +#: builtins/caller.def:136 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" +" 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." msgstr "" +"回傳目前子呼叫的語境。\n" +" \n" +" 不帶有 EXPR 時,回傳「$line $filename」。帶有 EXPR 時,回傳\n" +" 「$line $subroutine $filename」;提供堆疊追蹤時可以用到這個\n" +" 延伸資訊。\n" +" \n" +" EXPR 的值顯示了到目前呼叫框格需要回去多少個呼叫框格;頂部框格\n" +" 是第 0 框格。" -#: builtins/cd.def:215 +#: builtins/cd.def:327 msgid "HOME not set" -msgstr "HOME 沒有設置" +msgstr "未設定 HOME" + +#: builtins/cd.def:335 builtins/common.c:161 test.c:916 +msgid "too many arguments" +msgstr "太多參數" -#: builtins/cd.def:227 +#: builtins/cd.def:342 +msgid "null directory" +msgstr "空的目錄" + +#: builtins/cd.def:353 msgid "OLDPWD not set" -msgstr "OLDPWD 沒有設置" +msgstr "未設定 OLDPWD" -#: builtins/common.c:101 +#: builtins/common.c:96 #, c-format msgid "line %d: " -msgstr "" +msgstr "第 %d 列:" -#: builtins/common.c:139 error.c:261 -#, fuzzy, c-format +#: builtins/common.c:134 error.c:264 +#, c-format msgid "warning: " -msgstr "%s:警告:" +msgstr "警告:" -#: builtins/common.c:153 -#, fuzzy, c-format +#: builtins/common.c:148 +#, c-format msgid "%s: usage: " -msgstr "%s:警告:" +msgstr "%s:用法:" -#: builtins/common.c:166 test.c:827 -msgid "too many arguments" -msgstr "太多引數" - -#: builtins/common.c:191 shell.c:499 shell.c:782 +#: builtins/common.c:193 shell.c:524 shell.c:866 #, c-format msgid "%s: option requires an argument" -msgstr "%s:選項需要一個引數" +msgstr "%s:選項需要一個參數" -#: builtins/common.c:198 +#: builtins/common.c:200 #, c-format msgid "%s: numeric argument required" -msgstr "%s:數字引數必須" +msgstr "%s:需要數字參數" -#: builtins/common.c:205 +#: builtins/common.c:207 #, c-format msgid "%s: not found" msgstr "%s:沒有找到" -#: builtins/common.c:214 shell.c:795 +#: builtins/common.c:216 shell.c:879 #, c-format msgid "%s: invalid option" msgstr "%s:無效選項" -#: builtins/common.c:221 +#: builtins/common.c:223 #, c-format msgid "%s: invalid option name" -msgstr "%s:無效選項名" +msgstr "%s:無效選項名稱" -#: builtins/common.c:228 general.c:231 general.c:236 +#: builtins/common.c:230 execute_cmd.c:2402 general.c:368 general.c:373 #, c-format msgid "`%s': not a valid identifier" -msgstr "`%s':不是一個有效的識別符" +msgstr "「%s」:不是一個有效的識別符" -#: builtins/common.c:238 -#, fuzzy +#: builtins/common.c:240 msgid "invalid octal number" -msgstr "無效信號數" +msgstr "無效的八進位數字" -#: builtins/common.c:240 -#, fuzzy +#: builtins/common.c:242 msgid "invalid hex number" -msgstr "%s:無效的號碼" +msgstr "無效的十六進位數字" -#: builtins/common.c:242 expr.c:1256 +#: builtins/common.c:244 expr.c:1574 msgid "invalid number" -msgstr "" +msgstr "無效數字" -#: builtins/common.c:250 +#: builtins/common.c:252 #, c-format msgid "%s: invalid signal specification" -msgstr "%s:無效的信號規格" +msgstr "%s:無效的訊號規格" -#: builtins/common.c:257 +#: builtins/common.c:259 #, c-format msgid "`%s': not a pid or valid job spec" -msgstr "`%s':不是一個 pid 或有效的工作規格" +msgstr "「%s」:不是一個 pid 或有效的工作規格" -#: builtins/common.c:264 error.c:454 +#: builtins/common.c:266 error.c:536 #, c-format msgid "%s: readonly variable" -msgstr "%s:只讀變數" +msgstr "%s:唯讀的變數" + +#: builtins/common.c:273 +#, c-format +msgid "%s: cannot assign" +msgstr "%s:無法指定" -#: builtins/common.c:272 +#: builtins/common.c:281 #, c-format msgid "%s: %s out of range" msgstr "%s:%s 超出範圍" -#: builtins/common.c:272 builtins/common.c:274 +#: builtins/common.c:281 builtins/common.c:283 msgid "argument" -msgstr "引數" +msgstr "參數" -#: builtins/common.c:274 +#: builtins/common.c:283 #, c-format msgid "%s out of range" msgstr "%s 超出範圍" -#: builtins/common.c:282 +#: builtins/common.c:291 #, c-format msgid "%s: no such job" -msgstr "%s:沒有此類的工作" +msgstr "%s:沒有此類工作" -#: builtins/common.c:290 +#: builtins/common.c:299 #, c-format msgid "%s: no job control" msgstr "%s:沒有工作控制" -#: builtins/common.c:292 +#: builtins/common.c:301 msgid "no job control" msgstr "沒有工作控制" -#: builtins/common.c:302 +#: builtins/common.c:311 #, c-format msgid "%s: restricted" -msgstr "%s:有限的" +msgstr "%s:受限的" -#: builtins/common.c:304 +#: builtins/common.c:313 msgid "restricted" -msgstr "有限的" +msgstr "受限的" -#: builtins/common.c:312 +#: builtins/common.c:321 #, c-format msgid "%s: not a shell builtin" msgstr "%s:不是一個內建 shell" -#: builtins/common.c:321 +#: builtins/common.c:330 #, c-format msgid "write error: %s" -msgstr "寫入錯誤: %s" +msgstr "寫入時發生錯誤:%s" -#: builtins/common.c:329 +#: builtins/common.c:338 #, c-format msgid "error setting terminal attributes: %s" -msgstr "" +msgstr "設定終端屬性時發生錯誤: %s" -#: builtins/common.c:331 +#: builtins/common.c:340 #, c-format msgid "error getting terminal attributes: %s" -msgstr "" +msgstr "取得終端屬性時發生錯誤: %s" -#: builtins/common.c:563 +#: builtins/common.c:642 #, c-format msgid "%s: error retrieving current directory: %s: %s\n" -msgstr "%s:錯誤檢索當前目錄: %s: %s\n" +msgstr "%s:檢索目前目錄時發生錯誤:%s:%s\n" -#: builtins/common.c:629 builtins/common.c:631 +#: builtins/common.c:708 builtins/common.c:710 #, c-format msgid "%s: ambiguous job spec" -msgstr "%s:含糊的工作規格" +msgstr "%s:模稜兩可的工作規格" + +#: builtins/common.c:971 +msgid "help not available in this version" +msgstr "這個版本沒有可用的說明" + +#: builtins/common.c:1038 builtins/set.def:953 variables.c:3825 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: 無法取消設定: 唯讀 %s" + +#: builtins/common.c:1043 builtins/set.def:932 variables.c:3830 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: 無法取消設定" -#: builtins/complete.def:276 +#: builtins/complete.def:287 #, c-format msgid "%s: invalid action name" msgstr "%s:無效的功能名稱" -#: builtins/complete.def:449 builtins/complete.def:644 -#: builtins/complete.def:853 +#: builtins/complete.def:486 builtins/complete.def:642 +#: builtins/complete.def:873 #, 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 選項可能無法按預期工作" +msgstr "警告:-F 選項可能無法按預期工作" #: builtins/complete.def:698 msgid "warning: -C option may not work as you expect" -msgstr "警告: -C 選項可能無法按預期工作" +msgstr "警告:-C 選項可能無法按預期工作" -#: builtins/complete.def:826 +#: builtins/complete.def:846 msgid "not currently executing completion function" -msgstr "" +msgstr "目前未執行自動完成功能" -#: builtins/declare.def:122 +#: builtins/declare.def:137 msgid "can only be used in a function" -msgstr "只能用在一個函數" +msgstr "只能用在函數中" -#: builtins/declare.def:360 +#: builtins/declare.def:437 msgid "cannot use `-f' to make functions" -msgstr "" +msgstr "無法用「-f」產生函數" -#: builtins/declare.def:372 execute_cmd.c:4937 +#: builtins/declare.def:464 execute_cmd.c:6132 #, c-format msgid "%s: readonly function" -msgstr "%s:只讀函數" +msgstr "%s:唯讀函數" + +#: builtins/declare.def:521 builtins/declare.def:804 +#, c-format +msgid "%s: reference variable cannot be an array" +msgstr "%s: 引用變數不能為陣列" + +#: builtins/declare.def:532 variables.c:3359 +#, c-format +msgid "%s: nameref variable self references not allowed" +msgstr "%s: 不允許名稱引用變數引用自身" -#: builtins/declare.def:468 +#: builtins/declare.def:537 variables.c:2072 variables.c:3278 variables.c:3286 +#: variables.c:3356 +#, c-format +msgid "%s: circular name reference" +msgstr "%s: 迴圈變數名引用" + +#: builtins/declare.def:541 builtins/declare.def:811 builtins/declare.def:820 +#, c-format +msgid "`%s': invalid variable name for name reference" +msgstr "「%s」:無效的引用變數名" + +#: builtins/declare.def:856 #, c-format msgid "%s: cannot destroy array variables in this way" -msgstr "" +msgstr "%s: 無法以這種方式銷毀陣列變數" -#: builtins/declare.def:475 +#: builtins/declare.def:862 builtins/read.def:887 #, c-format msgid "%s: cannot convert associative to indexed array" -msgstr "" +msgstr "%s: 無法將關聯陣列轉化為索引陣列" + +#: builtins/declare.def:891 +#, c-format +msgid "%s: quoted compound array assignment deprecated" +msgstr "%s:不建議使用引用的複合陣列指定" -#: builtins/enable.def:137 builtins/enable.def:145 +#: builtins/enable.def:145 builtins/enable.def:153 msgid "dynamic loading not available" -msgstr "" +msgstr "動態載入不可用" -#: builtins/enable.def:312 +#: builtins/enable.def:376 #, c-format msgid "cannot open shared object %s: %s" -msgstr "" +msgstr "無法開啟共享物件 %s: %s" -#: builtins/enable.def:335 +#: builtins/enable.def:405 #, c-format msgid "cannot find %s in shared object %s: %s" -msgstr "" +msgstr "無法在共享物件 %2$s 中找到 %1$s: %3$s" + +#: builtins/enable.def:422 +#, c-format +msgid "%s: dynamic builtin already loaded" +msgstr "%s: 已經載入動態內建指令" + +#: builtins/enable.def:426 +#, c-format +msgid "load function for %s returns failure (%d): not loaded" +msgstr "為 %s 載入函式時回傳錯誤 (%d):尚未載入" -#: builtins/enable.def:459 +#: builtins/enable.def:551 #, c-format msgid "%s: not dynamically loaded" -msgstr "" +msgstr "%s: 未以動態方式載入" -#: builtins/enable.def:474 +#: builtins/enable.def:577 #, c-format msgid "%s: cannot delete: %s" -msgstr "" +msgstr "%s: 無法刪除: %s" -#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794 -#: shell.c:1452 +#: builtins/evalfile.c:138 builtins/hash.def:185 execute_cmd.c:5959 #, c-format msgid "%s: is a directory" -msgstr "" +msgstr "%s: 是一個目錄" -#: builtins/evalfile.c:139 +#: builtins/evalfile.c:144 #, c-format msgid "%s: not a regular file" -msgstr "" +msgstr "%s: 不是一般檔案" -#: builtins/evalfile.c:147 +#: builtins/evalfile.c:153 #, c-format msgid "%s: file is too large" -msgstr "" +msgstr "%s: 檔案太大" -#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864 -#: shell.c:1462 +#: builtins/evalfile.c:188 builtins/evalfile.c:206 shell.c:1673 #, c-format msgid "%s: cannot execute binary file" -msgstr "" +msgstr "%s: 無法執行二進位檔案" -#: builtins/exec.def:212 +#: builtins/exec.def:158 builtins/exec.def:160 builtins/exec.def:246 #, c-format msgid "%s: cannot execute: %s" -msgstr "" +msgstr "%s: 無法執行: %s" -#: builtins/exit.def:65 +#: builtins/exit.def:64 #, c-format msgid "logout\n" -msgstr "" +msgstr "登出\n" -#: builtins/exit.def:88 +#: builtins/exit.def:89 msgid "not login shell: use `exit'" -msgstr "" +msgstr "不是登入 shell: 使用「exit」" -#: builtins/exit.def:120 +#: builtins/exit.def:121 #, c-format msgid "There are stopped jobs.\n" -msgstr "" +msgstr "有停止的工作。\n" -#: builtins/exit.def:122 +#: builtins/exit.def:123 #, c-format msgid "There are running jobs.\n" -msgstr "" +msgstr "有執行中的工作。\n" -#: builtins/fc.def:262 +#: builtins/fc.def:275 builtins/fc.def:373 builtins/fc.def:417 msgid "no command found" -msgstr "" +msgstr "未找到指令" -#: builtins/fc.def:349 +#: builtins/fc.def:363 builtins/fc.def:368 builtins/fc.def:407 +#: builtins/fc.def:412 msgid "history specification" -msgstr "" +msgstr "歷史記錄規格" -#: builtins/fc.def:370 +#: builtins/fc.def:444 #, c-format msgid "%s: cannot open temp file: %s" -msgstr "" +msgstr "%s: 無法開啟暫存檔案: %s" -#: builtins/fg_bg.def:149 builtins/jobs.def:282 +#: builtins/fg_bg.def:152 builtins/jobs.def:284 msgid "current" -msgstr "" +msgstr "目前" -#: builtins/fg_bg.def:158 +#: builtins/fg_bg.def:161 #, c-format msgid "job %d started without job control" -msgstr "" +msgstr "在不帶工作控制的情況下啟動了工作 %d" #: builtins/getopt.c:110 #, c-format msgid "%s: illegal option -- %c\n" -msgstr "" +msgstr "%s:不合法的選項 ─ %c\n" #: builtins/getopt.c:111 #, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "" +msgstr "%s: 選項需要一個參數 -- %c\n" -#: builtins/hash.def:92 +#: builtins/hash.def:91 msgid "hashing disabled" -msgstr "" +msgstr "已停用雜湊" -#: builtins/hash.def:138 +#: builtins/hash.def:139 #, c-format msgid "%s: hash table empty\n" -msgstr "" +msgstr "%s: 雜湊表為空\n" -#: builtins/hash.def:244 -#, fuzzy, c-format +#: builtins/hash.def:267 +#, c-format msgid "hits\tcommand\n" -msgstr "最後的命令: %s\n" +msgstr "命中\t指令\n" -#: builtins/help.def:130 -#, c-format +#: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "" +msgstr[0] "Shell 指令,符合關鍵字 `" -#: builtins/help.def:168 -#, c-format +#: builtins/help.def:135 msgid "" -"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +"'\n" +"\n" msgstr "" +"'\n" +"\n" #: builtins/help.def:185 #, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "沒有與「%s」符合的說明主題。嘗試「help help」或「man -k %s」或「info %s」。" + +#: builtins/help.def:223 +#, c-format msgid "%s: cannot open: %s" -msgstr "" +msgstr "%s: 無法開啟: %s" -#: builtins/help.def:337 +#: builtins/help.def:523 #, c-format msgid "" "These shell commands are defined internally. Type `help' to see this list.\n" @@ -476,116 +563,149 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" +"這些 shell 指令是內部定義的。請輸入「help」以取得一個列表。\n" +"輸入「help 名稱」以得到有關函數「名稱」的更多資訊。\n" +"使用「info bash」來獲得關於 shell 的更多一般性資訊。\n" +"使用「man -k」或「info」來取得不在列表中指令的更多資訊。\n" +"\n" +"名稱旁邊的星號(*)表示該指令被停用。\n" +"\n" -#: builtins/history.def:154 +#: builtins/history.def:159 msgid "cannot use more than one of -anrw" -msgstr "" +msgstr "最多能使用 -anrw 選項之一" -#: builtins/history.def:186 +#: builtins/history.def:192 builtins/history.def:204 builtins/history.def:215 +#: builtins/history.def:228 builtins/history.def:240 builtins/history.def:247 msgid "history position" -msgstr "" +msgstr "歷史記錄位置" + +#: builtins/history.def:338 +#, c-format +msgid "%s: invalid timestamp" +msgstr "%s:無效時間戳" -#: builtins/history.def:365 +#: builtins/history.def:449 #, c-format msgid "%s: history expansion failed" -msgstr "" +msgstr "%s: 歷史記錄擴充套件失敗" #: builtins/inlib.def:71 -#, fuzzy, c-format +#, c-format msgid "%s: inlib failed" -msgstr "%s:無效服務" +msgstr "%s: inlib 失敗" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" -msgstr "" +msgstr "其他選項不能與「-x」同時使用" -#: builtins/kill.def:200 +#: builtins/kill.def:211 #, c-format msgid "%s: arguments must be process or job IDs" -msgstr "" +msgstr "%s: 參數必須是行程或工作 ID" -#: builtins/kill.def:263 +#: builtins/kill.def:274 msgid "Unknown error" -msgstr "" +msgstr "未知錯誤" -#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516 +#: builtins/let.def:97 builtins/let.def:122 expr.c:640 expr.c:658 msgid "expression expected" -msgstr "" +msgstr "需要表示式" -#: builtins/mapfile.def:165 +#: builtins/mapfile.def:180 #, c-format msgid "%s: not an indexed array" -msgstr "" +msgstr "%s: 不是一個索引陣列" -#: builtins/mapfile.def:249 builtins/read.def:279 +#: builtins/mapfile.def:276 builtins/read.def:336 #, c-format msgid "%s: invalid file descriptor specification" -msgstr "" +msgstr "%s: 無效的檔案描述符規格" -#: builtins/mapfile.def:257 builtins/read.def:286 +#: builtins/mapfile.def:284 builtins/read.def:343 #, c-format msgid "%d: invalid file descriptor: %s" -msgstr "" +msgstr "%d: 無效的檔案描述符: %s" -#: builtins/mapfile.def:266 builtins/mapfile.def:304 -#, fuzzy, c-format +#: builtins/mapfile.def:293 builtins/mapfile.def:331 +#, c-format msgid "%s: invalid line count" -msgstr "%s:無效選項" +msgstr "%s: 無效的列數" -#: builtins/mapfile.def:277 -#, fuzzy, c-format +#: builtins/mapfile.def:304 +#, c-format msgid "%s: invalid array origin" -msgstr "%s:無效選項" +msgstr "%s: 無效的陣列原點" -#: builtins/mapfile.def:294 -#, fuzzy, c-format +#: builtins/mapfile.def:321 +#, c-format msgid "%s: invalid callback quantum" -msgstr "%s:無效的功能名稱" +msgstr "%s: 無效的回呼定量" -#: builtins/mapfile.def:326 +#: builtins/mapfile.def:354 msgid "empty array variable name" -msgstr "" +msgstr "空陣列變數名" -#: builtins/mapfile.def:347 +#: builtins/mapfile.def:375 msgid "array variable support required" -msgstr "" +msgstr "需要陣列變數支援" -#: builtins/printf.def:374 +#: builtins/printf.def:430 #, c-format msgid "`%s': missing format character" -msgstr "" +msgstr "「%s」: 缺少格式字元" -#: builtins/printf.def:551 +#: builtins/printf.def:485 +#, c-format +msgid "`%c': invalid time format specification" +msgstr "「%c」: 無效的時間格式規格" + +#: builtins/printf.def:708 #, c-format msgid "`%c': invalid format character" -msgstr "" +msgstr "「%c」: 無效格式字元" -#: builtins/printf.def:578 -#, fuzzy, c-format +#: builtins/printf.def:734 +#, c-format msgid "warning: %s: %s" -msgstr "%s:警告:" +msgstr "警告: %s: %s" -#: builtins/printf.def:757 +#: builtins/printf.def:822 +#, c-format +msgid "format parsing problem: %s" +msgstr "格式解析問題: %s" + +#: builtins/printf.def:919 msgid "missing hex digit for \\x" -msgstr "" +msgstr "使用了 \\x 但缺少十六進位數字" + +#: builtins/printf.def:934 +#, c-format +msgid "missing unicode digit for \\%c" +msgstr "使用了 \\%c 但缺少萬國碼數字" -#: builtins/pushd.def:195 +#: builtins/pushd.def:199 msgid "no other directory" -msgstr "" +msgstr "無其他目錄" + +#: builtins/pushd.def:360 +#, c-format +msgid "%s: invalid argument" +msgstr "%s: 無效參數" -#: builtins/pushd.def:462 +#: builtins/pushd.def:480 msgid "" -msgstr "" +msgstr "<無目前目錄>" -#: builtins/pushd.def:506 +#: builtins/pushd.def:524 msgid "directory stack empty" -msgstr "" +msgstr "目錄堆疊為空" -#: builtins/pushd.def:508 +#: builtins/pushd.def:526 msgid "directory stack index" -msgstr "" +msgstr "目錄堆疊索引" -#: builtins/pushd.def:683 +#: builtins/pushd.def:701 msgid "" "Display the list of currently remembered directories. Directories\n" " find their way onto the list with the `pushd' command; you can get\n" @@ -600,16 +720,32 @@ msgid "" " \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" +" +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" +" -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" +" 選項:\n" +" -c\t刪除所有元素以清除目錄堆疊\n" +" -l\t不印出與家目錄相關的以波浪號\n" +" \t為字首的目錄\n" +" -p\t每列一個條目印出目錄堆疊\n" +" -v\t以堆疊位置為字首,每列一個條目\n" +" \t印出目錄堆疊\n" +" \n" +" 參數:\n" +" +N\t以 dirs 不帶選項輸出的順序,從左起第 N 個條目顯示列表,\n" +" \t從 0 開始。\n" +" \n" +" -N\t以 dirs 不帶選項輸出的順序,從右起第 N 個項目顯示列表,\n" +"\t從 0 開始。" -#: builtins/pushd.def:705 +#: builtins/pushd.def:723 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" @@ -633,8 +769,29 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"在目錄堆疊頂部加入一個目錄,或者論詢\n" +" 目錄堆疊,是目前工作目錄成為新的堆疊頂端\n" +" 不帶參數時,交換堆疊頂端的兩個目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制增加堆疊中目錄時通常變更目錄的操作,\n" +" \t從而只有堆疊被操作。\n" +" \n" +" 參數:\n" +" +N\t輪轉堆疊使得第 N 個目錄(「dirs」的\n" +" \t輸出列表中左起,從 0 開始)\n" +" \t升至堆疊頂端。\n" +" \n" +" -N\t輪轉堆疊使得第 N 個目錄(「dirs」的\n" +" \t輸出列表中右起,從 0 開始)\n" +" \t升至堆疊頂端\n" +" \n" +" dir\t新增目錄至堆疊頂端,並\n" +" \t使其成為新的目前工作目錄。\n" +" \n" +" 「dirs」內建指令顯示目錄堆疊。" -#: builtins/pushd.def:730 +#: builtins/pushd.def:748 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" @@ -654,520 +811,617 @@ msgid "" " \n" " The `dirs' builtin displays the directory stack." msgstr "" +"從目錄堆疊中刪除條目。不帶參數時,刪除\n" +" 堆疊頂端目錄並變更至新的堆疊頂端目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制從堆疊中刪除目錄時通常變更目錄操作,\n" +" \t從而只有堆疊被操作。\n" +" \n" +" 參數:\n" +" +N\t從「dirs」輸出的列表中,\n" +" \t刪除左起第 N 個條目,計數從 0 開始。例如:「popd +0」\n" +" \t刪除第一個目錄,「popd +1」刪除第二個。\n" +" \n" +" -N\t從「dirs」輸出的列表中,\n" +" \t刪除右起第 N 個條目,計數從 0 開始,例如:「popd -0」\n" +" \t刪除最後一個條目,「popd -1」刪除倒數第二個。\n" +" \n" +" 「dirs」內建變數顯示目錄堆疊。" -#: builtins/read.def:252 +#: builtins/read.def:308 #, c-format msgid "%s: invalid timeout specification" -msgstr "" +msgstr "%s: 無效的逾時規格" -#: builtins/read.def:588 +#: builtins/read.def:827 #, c-format msgid "read error: %d: %s" -msgstr "" +msgstr "讀取錯誤: %d: %s" -#: builtins/return.def:73 +#: builtins/return.def:68 msgid "can only `return' from a function or sourced script" -msgstr "" +msgstr "只能從函數或者原始指令稿「return」" -#: builtins/set.def:768 +#: builtins/set.def:869 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 "" +msgstr "無法同時取消設定一個函數和一個變數" -#: builtins/set.def:823 +#: builtins/set.def:969 #, c-format msgid "%s: not an array variable" -msgstr "" +msgstr "%s: 不是陣列變數" -#: builtins/setattr.def:186 +#: builtins/setattr.def:189 #, c-format msgid "%s: not a function" -msgstr "" +msgstr "%s: 不是函數" + +#: builtins/setattr.def:194 +#, c-format +msgid "%s: cannot export" +msgstr "%s:無法匯出" -#: builtins/shift.def:71 builtins/shift.def:77 +#: builtins/shift.def:72 builtins/shift.def:79 msgid "shift count" -msgstr "" +msgstr "位移計數" -#: builtins/shopt.def:260 +#: builtins/shopt.def:323 msgid "cannot set and unset shell options simultaneously" -msgstr "" +msgstr "無法同時設定和取消設定 shell 選項" -#: builtins/shopt.def:325 +#: builtins/shopt.def:444 #, c-format msgid "%s: invalid shell option name" -msgstr "" +msgstr "%s: 無效的 shell 選項名稱" #: builtins/source.def:128 msgid "filename argument required" -msgstr "" +msgstr "需要檔名參數" -#: builtins/source.def:153 +#: builtins/source.def:154 #, c-format msgid "%s: file not found" -msgstr "" +msgstr "%s: 檔案未找到" -#: builtins/suspend.def:101 +#: builtins/suspend.def:102 msgid "cannot suspend" -msgstr "" +msgstr "無法暫停" -#: builtins/suspend.def:111 +#: builtins/suspend.def:112 msgid "cannot suspend a login shell" -msgstr "" +msgstr "無法暫停登入 shell" -#: builtins/type.def:234 +#: builtins/type.def:235 #, c-format msgid "%s is aliased to `%s'\n" -msgstr "" +msgstr "%s 是「%s」的別名\n" -#: builtins/type.def:255 +#: builtins/type.def:256 #, c-format msgid "%s is a shell keyword\n" -msgstr "" +msgstr "%s 是 shell 關鍵字\n" -#: builtins/type.def:274 +#: builtins/type.def:275 #, c-format msgid "%s is a function\n" -msgstr "" +msgstr "%s 是一個函數\n" + +#: builtins/type.def:299 +#, c-format +msgid "%s is a special shell builtin\n" +msgstr "%s 是特別的 shell 內建命令\n" -#: builtins/type.def:296 +#: builtins/type.def:301 #, c-format msgid "%s is a shell builtin\n" -msgstr "" +msgstr "%s 是 shell 內建命令\n" -#: builtins/type.def:317 builtins/type.def:391 +#: builtins/type.def:323 builtins/type.def:408 #, c-format msgid "%s is %s\n" -msgstr "" +msgstr "%s 是 %s\n" -#: builtins/type.def:337 +#: builtins/type.def:343 #, c-format msgid "%s is hashed (%s)\n" -msgstr "" +msgstr "%s 已進行雜湊操作 (%s)\n" -#: builtins/ulimit.def:372 +#: builtins/ulimit.def:400 #, c-format msgid "%s: invalid limit argument" -msgstr "" +msgstr "%s: 無效的 limit 參數" -#: builtins/ulimit.def:398 +#: builtins/ulimit.def:426 #, c-format msgid "`%c': bad command" -msgstr "`%c':壞的命令" +msgstr "「%c」:不當的指令" -#: builtins/ulimit.def:427 +#: builtins/ulimit.def:464 #, c-format msgid "%s: cannot get limit: %s" -msgstr "%s:不能得到 limit: %s" +msgstr "%s:不能得到 limit: %s" -#: builtins/ulimit.def:453 +#: builtins/ulimit.def:490 msgid "limit" -msgstr "" +msgstr "limit" -#: builtins/ulimit.def:465 builtins/ulimit.def:765 +#: builtins/ulimit.def:502 builtins/ulimit.def:802 #, c-format msgid "%s: cannot modify limit: %s" -msgstr "%s:不能修改 limit: %s" +msgstr "%s:不能修改 limit: %s" -#: builtins/umask.def:118 +#: builtins/umask.def:115 msgid "octal number" -msgstr "八進制數" +msgstr "八進位數字" -#: builtins/umask.def:231 +#: builtins/umask.def:232 #, c-format msgid "`%c': invalid symbolic mode operator" -msgstr "" +msgstr "「%c」: 無效的符號狀態運算子" -#: builtins/umask.def:286 +#: builtins/umask.def:287 #, c-format msgid "`%c': invalid symbolic mode character" -msgstr "" +msgstr "「%c」: 無效的符號狀態字元" -#: error.c:90 error.c:321 error.c:323 error.c:325 +#: error.c:89 error.c:373 error.c:375 error.c:377 msgid " line " -msgstr "" +msgstr " 列 " -#: error.c:165 +#: error.c:164 #, c-format msgid "last command: %s\n" -msgstr "最後的命令: %s\n" +msgstr "最後的指令:%s\n" -#: error.c:173 +#: error.c:172 #, c-format msgid "Aborting..." -msgstr "" +msgstr "中止…" + +#. TRANSLATORS: this is a prefix for informational messages. +#: error.c:287 +#, c-format +msgid "INFORM: " +msgstr "通知:" + +#: error.c:310 +#, c-format +msgid "DEBUG warning: " +msgstr "除錯警告:" -#: error.c:406 +#: error.c:488 msgid "unknown command error" -msgstr "未知命令錯誤" +msgstr "不明指令錯誤" -#: error.c:407 +#: error.c:489 msgid "bad command type" -msgstr "壞的命令類型" +msgstr "不當的指令類型" -#: error.c:408 +#: error.c:490 msgid "bad connector" -msgstr "壞的連接器" +msgstr "不當的連接器" -#: error.c:409 +#: error.c:491 msgid "bad jump" -msgstr "" +msgstr "錯誤的跳轉" -#: error.c:447 +#: error.c:529 #, c-format msgid "%s: unbound variable" -msgstr "" +msgstr "%s: 未綁定的變數" -#: eval.c:181 -#, c-format -msgid "timed out waiting for input: auto-logout\n" -msgstr "" +#: eval.c:243 +msgid "\atimed out waiting for input: auto-logout\n" +msgstr "\a 等待輸入逾時:自動登出\n" -#: execute_cmd.c:497 +#: execute_cmd.c:555 #, c-format msgid "cannot redirect standard input from /dev/null: %s" -msgstr "" +msgstr "無法從 /dev/null 重定向標準輸入: %s" -#: execute_cmd.c:1162 +#: execute_cmd.c:1317 #, c-format msgid "TIMEFORMAT: `%c': invalid format character" -msgstr "" +msgstr "時間格式:「%c」: 無效的格式字元" + +#: execute_cmd.c:2391 +#, c-format +msgid "execute_coproc: coproc [%d:%s] still exists" +msgstr "execute_coproc:coproc [%d:%s] 仍然存在" -#: execute_cmd.c:2075 -#, fuzzy +#: execute_cmd.c:2524 msgid "pipe error" -msgstr "寫入錯誤: %s" +msgstr "管道錯誤" -#: execute_cmd.c:4481 +#: execute_cmd.c:4923 +#, c-format +msgid "eval: maximum eval nesting level exceeded (%d)" +msgstr "eval:超出最大 eval 巢狀層數 (%d)" + +#: execute_cmd.c:4935 +#, c-format +msgid "%s: maximum source nesting level exceeded (%d)" +msgstr "%s: 超出最大來源巢狀層數 (%d)" + +#: execute_cmd.c:5043 +#, c-format +msgid "%s: maximum function nesting level exceeded (%d)" +msgstr "%s: 超出最大函數巢狀層數 (%d)" + +#: execute_cmd.c:5598 #, c-format msgid "%s: restricted: cannot specify `/' in command names" -msgstr "" +msgstr "%s: 受限的: 無法在指令名稱中使用「/」" -#: execute_cmd.c:4572 +#: execute_cmd.c:5715 #, c-format msgid "%s: command not found" -msgstr "%s:命令找不到" +msgstr "%s:指令找不到" + +#: execute_cmd.c:5957 +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: execute_cmd.c:5975 +#, c-format +msgid "%s: cannot execute: required file not found" +msgstr "%s:無法執行:找不到必須檔案" -#: execute_cmd.c:4827 +#: execute_cmd.c:6000 #, c-format msgid "%s: %s: bad interpreter" -msgstr "" +msgstr "%s: %s: 不當的直譯器" + +#: execute_cmd.c:6037 +#, c-format +msgid "%s: cannot execute binary file: %s" +msgstr "%s: 無法執行二進位檔案: %s" + +#: execute_cmd.c:6123 +#, c-format +msgid "`%s': is a special builtin" +msgstr "「%s」: 特殊內建" -#: execute_cmd.c:4976 +#: execute_cmd.c:6175 #, c-format msgid "cannot duplicate fd %d to fd %d" -msgstr "" +msgstr "無法複製檔案描述符 %d 到檔案描述符 %d" -#: expr.c:241 +#: expr.c:263 msgid "expression recursion level exceeded" -msgstr "" +msgstr "表示式遞迴層次超出範圍" -#: expr.c:265 +#: expr.c:291 msgid "recursion stack underflow" -msgstr "" +msgstr "遞迴堆疊下限溢位" -#: expr.c:379 +#: expr.c:478 msgid "syntax error in expression" -msgstr "表達語法錯誤" +msgstr "表示式語法錯誤" -#: expr.c:419 +#: expr.c:522 msgid "attempted assignment to non-variable" -msgstr "" +msgstr "嘗試指派給非變數" -#: expr.c:440 expr.c:445 expr.c:756 +#: expr.c:531 +msgid "syntax error in variable assignment" +msgstr "變數定義語法錯誤" + +#: expr.c:545 expr.c:912 msgid "division by 0" -msgstr "" +msgstr "除 0" -#: expr.c:471 +#: expr.c:593 msgid "bug: bad expassign token" -msgstr "" +msgstr "錯誤:不當的表示式字組" -#: expr.c:513 +#: expr.c:647 msgid "`:' expected for conditional expression" -msgstr "" +msgstr "條件表示式需要「:」" -#: expr.c:781 +#: expr.c:973 msgid "exponent less than 0" -msgstr "" +msgstr "指數小於 0" -#: expr.c:826 +#: expr.c:1030 msgid "identifier expected after pre-increment or pre-decrement" -msgstr "" +msgstr "預增符或預減符後應跟有識別符" -#: expr.c:854 +#: expr.c:1057 msgid "missing `)'" -msgstr "" +msgstr "缺少「)」" -#: expr.c:897 expr.c:1176 +#: expr.c:1108 expr.c:1492 msgid "syntax error: operand expected" -msgstr "" +msgstr "語法錯誤: 需要運算元" -#: expr.c:1178 +#: expr.c:1494 msgid "syntax error: invalid arithmetic operator" -msgstr "" +msgstr "語法錯誤: 無效的算術運算子" -#: expr.c:1202 +#: expr.c:1518 #, c-format msgid "%s%s%s: %s (error token is \"%s\")" -msgstr "" +msgstr "%s%s%s: %s (錯誤字組是「%s」)" -#: expr.c:1260 +#: expr.c:1578 msgid "invalid arithmetic base" -msgstr "" +msgstr "無效的算術進位" + +#: expr.c:1587 +msgid "invalid integer constant" +msgstr "無效的整數常數" -#: expr.c:1280 +#: expr.c:1603 msgid "value too great for base" -msgstr "" +msgstr "數值太大不可為算術進位的基底" -#: expr.c:1329 +#: expr.c:1652 #, c-format msgid "%s: expression error\n" -msgstr "" +msgstr "%s: 表示式錯誤\n" -#: general.c:61 +#: general.c:70 msgid "getcwd: cannot access parent directories" -msgstr "" +msgstr "getcwd: 無法存取上層目錄" -#: input.c:94 subst.c:4857 +#: input.c:99 subst.c:6208 #, c-format msgid "cannot reset nodelay mode for fd %d" -msgstr "" +msgstr "無法為檔案描述符 %d 重設無延遲模式" -#: input.c:258 +#: input.c:266 #, c-format msgid "cannot allocate new file descriptor for bash input from fd %d" -msgstr "" +msgstr "無法為來自 fd %d 的 bash 輸入分配新的檔案描述符" -#: input.c:266 +#: input.c:274 #, c-format msgid "save_bash_input: buffer already exists for new fd %d" -msgstr "" +msgstr "save_bash_input: 已經存在提供給新 fd %d 的緩衝區" -#: jobs.c:466 +#: jobs.c:543 msgid "start_pipeline: pgrp pipe" -msgstr "" +msgstr "start_pipeline: 行程群組管道" -#: jobs.c:887 +#: jobs.c:907 #, c-format -msgid "forked pid %d appears in running job %d" -msgstr "" +msgid "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1005 +#: jobs.c:960 #, c-format -msgid "deleting stopped job %d with process group %ld" -msgstr "" +msgid "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" +msgstr "bgp_search: LOOP: psi (%d) == storage[psi].bucket_next" -#: jobs.c:1110 +#: jobs.c:1279 #, c-format -msgid "add_process: process %5ld (%s) in the_pipeline" -msgstr "" +msgid "forked pid %d appears in running job %d" +msgstr "產生的行程識別碼 %d 顯示為執行中的工作 %d" -#: jobs.c:1113 +#: jobs.c:1397 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "刪除行程群組 %2$ld 中已停止的工作 %1$d" + +#: jobs.c:1502 #, c-format msgid "add_process: pid %5ld (%s) marked as still alive" -msgstr "" +msgstr "add_process: 行程識別碼 %5ld(%s) 標註為仍活著" -#: jobs.c:1401 +#: jobs.c:1839 #, c-format msgid "describe_pid: %ld: no such pid" -msgstr "" +msgstr "describe_pid: %ld: 無此行程識別碼" -#: jobs.c:1416 +#: jobs.c:1854 #, c-format msgid "Signal %d" -msgstr "" +msgstr "訊號 %d" -#: jobs.c:1430 jobs.c:1455 +#: jobs.c:1868 jobs.c:1894 msgid "Done" -msgstr "" +msgstr "已完成" -#: jobs.c:1435 siglist.c:123 +#: jobs.c:1873 siglist.c:123 msgid "Stopped" -msgstr "" +msgstr "停止" -#: jobs.c:1439 +#: jobs.c:1877 #, c-format msgid "Stopped(%s)" -msgstr "" +msgstr "已停止(%s)" -#: jobs.c:1443 +#: jobs.c:1881 msgid "Running" -msgstr "" +msgstr "執行中" -#: jobs.c:1457 +#: jobs.c:1898 #, c-format msgid "Done(%d)" -msgstr "" +msgstr "已完成(%d)" -#: jobs.c:1459 +#: jobs.c:1900 #, c-format msgid "Exit %d" -msgstr "" +msgstr "結束 %d" -#: jobs.c:1462 +#: jobs.c:1903 msgid "Unknown status" -msgstr "" +msgstr "不明狀態" -#: jobs.c:1549 +#: jobs.c:1990 #, c-format msgid "(core dumped) " -msgstr "" +msgstr "(核心已傾印)" -#: jobs.c:1568 +#: jobs.c:2009 #, c-format msgid " (wd: %s)" -msgstr "" +msgstr " (工作目錄: %s)" -#: jobs.c:1776 +#: jobs.c:2250 #, c-format msgid "child setpgid (%ld to %ld)" -msgstr "" +msgstr "子行程 setpgid (%ld 到 %ld)" -#: jobs.c:2104 nojobs.c:585 +#: jobs.c:2608 nojobs.c:666 #, c-format msgid "wait: pid %ld is not a child of this shell" -msgstr "" +msgstr "wait: 行程識別碼 %ld 不是目前 shell 的子行程" -#: jobs.c:2331 +#: jobs.c:2884 #, c-format msgid "wait_for: No record of process %ld" -msgstr "" +msgstr "wiat_for: 沒有行程 %ld 的紀錄" -#: jobs.c:2607 +#: jobs.c:3223 #, c-format msgid "wait_for_job: job %d is stopped" -msgstr "" +msgstr "wait_for_job: 工作 %d 已停止" + +#: jobs.c:3551 +#, c-format +msgid "%s: no current jobs" +msgstr "%s:目前沒有工作" -#: jobs.c:2829 +#: jobs.c:3558 #, c-format msgid "%s: job has terminated" -msgstr "" +msgstr "%s: 工作已經終止" -#: jobs.c:2838 +#: jobs.c:3567 #, c-format msgid "%s: job %d already in background" -msgstr "" +msgstr "%s: 工作 %d 已在背景執行" -#: jobs.c:3059 +#: jobs.c:3793 msgid "waitchld: turning on WNOHANG to avoid indefinite block" -msgstr "" +msgstr "waitchld: 開啟 WNOHANG 以避免無限阻塞" -#: jobs.c:3508 -#, fuzzy, c-format +#: jobs.c:4307 +#, c-format msgid "%s: line %d: " -msgstr "%s:警告:" +msgstr "%s: 第 %d 列:" -#: jobs.c:3522 nojobs.c:814 +#: jobs.c:4321 nojobs.c:921 #, c-format msgid " (core dumped)" -msgstr "" +msgstr " (核心已傾印)" -#: jobs.c:3534 jobs.c:3547 +#: jobs.c:4333 jobs.c:4346 #, c-format msgid "(wd now: %s)\n" -msgstr "" +msgstr "(目前工作目錄:%s)\n" -#: jobs.c:3579 +#: jobs.c:4378 msgid "initialize_job_control: getpgrp failed" -msgstr "" +msgstr "initialize_job_control: getpgrp 失敗" -#: jobs.c:3639 +#: jobs.c:4434 +msgid "initialize_job_control: no job control in background" +msgstr "initialize_job_control:背景中沒有工作控制" + +#: jobs.c:4450 msgid "initialize_job_control: line discipline" -msgstr "" +msgstr "initialize_job_control: 列規律" -#: jobs.c:3649 +#: jobs.c:4460 msgid "initialize_job_control: setpgid" -msgstr "" +msgstr "initialize_job_control: setpgid" -#: jobs.c:3677 +#: jobs.c:4481 jobs.c:4490 #, c-format msgid "cannot set terminal process group (%d)" -msgstr "" +msgstr "無法設定終端行程群組(%d)" -#: jobs.c:3682 +#: jobs.c:4495 msgid "no job control in this shell" -msgstr "" +msgstr "此 shell 中無工作控制" -#: lib/malloc/malloc.c:296 +#: lib/malloc/malloc.c:367 #, c-format msgid "malloc: failed assertion: %s\n" -msgstr "" +msgstr "malloc: 主張失敗: %s\n" -#: lib/malloc/malloc.c:312 +#: lib/malloc/malloc.c:383 #, c-format msgid "" "\r\n" "malloc: %s:%d: assertion botched\r\n" msgstr "" +"\r\n" +"malloc: %s:%d: 主張已修補\r\n" -#: lib/malloc/malloc.c:313 -#, fuzzy +#: lib/malloc/malloc.c:384 lib/malloc/malloc.c:941 msgid "unknown" -msgstr "%s:主機未知" +msgstr "不明" -#: lib/malloc/malloc.c:797 +#: lib/malloc/malloc.c:892 msgid "malloc: block on free list clobbered" -msgstr "" +msgstr "malloc: 空閒串列中的區塊損壞" -#: lib/malloc/malloc.c:874 +#: lib/malloc/malloc.c:980 msgid "free: called with already freed block argument" -msgstr "" +msgstr "free: 用已經釋放的區塊做為呼叫參數" -#: lib/malloc/malloc.c:877 +#: lib/malloc/malloc.c:983 msgid "free: called with unallocated block argument" -msgstr "" +msgstr "free: 用未分配的區塊做為呼叫參數" -#: lib/malloc/malloc.c:896 +#: lib/malloc/malloc.c:1001 msgid "free: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "free: 檢測到下限溢位;mh_nbytes 超出範圍" + +#: lib/malloc/malloc.c:1007 +msgid "free: underflow detected; magic8 corrupted" +msgstr "free: 偵測到下限溢位;magic8 損壞" -#: lib/malloc/malloc.c:902 +#: lib/malloc/malloc.c:1014 msgid "free: start and end chunk sizes differ" -msgstr "" +msgstr "free: 啟始和末尾區塊大小不一致" -#: lib/malloc/malloc.c:1001 +#: lib/malloc/malloc.c:1176 msgid "realloc: called with unallocated block argument" -msgstr "" +msgstr "realloc: 用未分配的區塊做為呼叫參數" -#: lib/malloc/malloc.c:1016 +#: lib/malloc/malloc.c:1191 msgid "realloc: underflow detected; mh_nbytes out of range" -msgstr "" +msgstr "realloc: 檢測到下限溢位;mh_nbytes 超出範圍" + +#: lib/malloc/malloc.c:1197 +msgid "realloc: underflow detected; magic8 corrupted" +msgstr "realloc: 偵測到下限溢位;magic8 損壞" -#: lib/malloc/malloc.c:1022 +#: lib/malloc/malloc.c:1205 msgid "realloc: start and end chunk sizes differ" -msgstr "" +msgstr "realloc: 啟始和末尾區塊大小不一致" -#: lib/malloc/table.c:177 +#: lib/malloc/table.c:191 #, c-format msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" -msgstr "" +msgstr "register_alloc: 分配表已經充滿了 FIND_ALLOC?\n" -#: lib/malloc/table.c:184 +#: lib/malloc/table.c:200 #, c-format msgid "register_alloc: %p already in table as allocated?\n" -msgstr "" +msgstr "register_alloc: %p 在表中顯示為已分配?\n" -#: lib/malloc/table.c:220 +#: lib/malloc/table.c:253 #, c-format msgid "register_free: %p already in table as free?\n" -msgstr "" +msgstr "register_free: %p 在表中顯示為已釋放?\n" -#: lib/sh/fmtulong.c:101 +#: lib/sh/fmtulong.c:102 msgid "invalid base" -msgstr "" +msgstr "無效的基底" #: lib/sh/netopen.c:168 #, c-format msgid "%s: host unknown" -msgstr "%s:主機未知" +msgstr "%s:不明的主機" #: lib/sh/netopen.c:175 #, c-format @@ -1177,1058 +1431,1097 @@ msgstr "%s:無效服務" #: lib/sh/netopen.c:306 #, c-format msgid "%s: bad network path specification" -msgstr "%s:壞的網路路徑規格" +msgstr "%s:不當的網路路徑規格" -#: lib/sh/netopen.c:346 +#: lib/sh/netopen.c:347 msgid "network operations not supported" -msgstr "不支持網路操作" +msgstr "不支援網路操作" -#: locale.c:192 +#: locale.c:219 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: LC_ALL: 無法變更語區選項 (%s)" -#: locale.c:194 +#: locale.c:221 #, c-format msgid "setlocale: LC_ALL: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: LC_ALL: 無法變更語區選項 (%s): %s" -#: locale.c:247 +#: locale.c:294 #, c-format msgid "setlocale: %s: cannot change locale (%s)" -msgstr "" +msgstr "setlocale: %s: 無法變更語區選項 (%s)" -#: locale.c:249 +#: locale.c:296 #, c-format msgid "setlocale: %s: cannot change locale (%s): %s" -msgstr "" +msgstr "setlocale: %s: 無法變更語區選項 (%s): %s" -#: mailcheck.c:433 +#: mailcheck.c:439 msgid "You have mail in $_" msgstr "您有郵件在 $_" -#: mailcheck.c:458 +#: mailcheck.c:464 msgid "You have new mail in $_" msgstr "您有新郵件在 $_" -#: mailcheck.c:474 +#: mailcheck.c:480 #, c-format msgid "The mail in %s has been read\n" msgstr "郵件在 %s 已閱讀\n" -#: make_cmd.c:323 +#: make_cmd.c:314 msgid "syntax error: arithmetic expression required" -msgstr "語法錯誤:必須算術表達" +msgstr "語法錯誤:需要算式" -#: make_cmd.c:325 +#: make_cmd.c:316 msgid "syntax error: `;' unexpected" -msgstr "語法錯誤: `;' 意外" +msgstr "語法錯誤:「;」意外" -#: make_cmd.c:326 +#: make_cmd.c:317 #, c-format msgid "syntax error: `((%s))'" -msgstr "語法錯誤: `((%s))'" +msgstr "語法錯誤:「((%s))」" -#: make_cmd.c:575 +#: make_cmd.c:569 #, c-format msgid "make_here_document: bad instruction type %d" -msgstr "make_here_document:壞的指示類型 %d" +msgstr "make_here_document:不當的指示類型 %d" -#: make_cmd.c:659 +#: make_cmd.c:668 #, c-format msgid "here-document at line %d delimited by end-of-file (wanted `%s')" -msgstr "" +msgstr "立即檔案在第 %d 列被檔案結束符分隔 (需要「%s」)" -#: make_cmd.c:756 +#: make_cmd.c:769 #, c-format msgid "make_redirection: redirection instruction `%d' out of range" -msgstr "make_redirection:重新導向指示 `%d' 超出範圍" +msgstr "make_redirection:重新導向指示「%d」超出範圍" -#: parse.y:3133 parse.y:3369 +#: parse.y:2428 +#, c-format +msgid "shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncated" +msgstr "shell_getc: shell_input_line_size (%zu) 超過 SIZE_MAX (%lu):列被截斷" + +#: parse.y:2921 +msgid "maximum here-document count exceeded" +msgstr "超過此處檔案上限最大值" + +#: parse.y:3684 parse.y:4244 parse.y:6148 #, c-format msgid "unexpected EOF while looking for matching `%c'" -msgstr "" +msgstr "尋找符合的「%c」時遇到了未預期的檔案結束符" -#: parse.y:3951 +#: parse.y:4452 msgid "unexpected EOF while looking for `]]'" -msgstr "" +msgstr "尋找「]]」時遇到了未預期的檔案結束符" -#: parse.y:3956 +#: parse.y:4457 #, c-format msgid "syntax error in conditional expression: unexpected token `%s'" -msgstr "" +msgstr "條件表示式中有語法錯誤: 未預期的字組「%s」" -#: parse.y:3960 +#: parse.y:4461 msgid "syntax error in conditional expression" -msgstr "語法錯誤,在有條件的表達" +msgstr "語法錯誤,在有條件的表示式" -#: parse.y:4038 +#: parse.y:4539 #, c-format msgid "unexpected token `%s', expected `)'" -msgstr "" +msgstr "未預期的字組「%s」,需要「)」" -#: parse.y:4042 +#: parse.y:4543 msgid "expected `)'" -msgstr "預期 `)'" +msgstr "預期「)」" -#: parse.y:4070 +#: parse.y:4571 #, c-format msgid "unexpected argument `%s' to conditional unary operator" -msgstr "" +msgstr "一元條件運算子使用了未預期的參數「%s」" -#: parse.y:4074 +#: parse.y:4575 msgid "unexpected argument to conditional unary operator" -msgstr "" +msgstr "一元條件運算子使用了未預期的參數" -#: parse.y:4120 +#: parse.y:4621 #, c-format msgid "unexpected token `%s', conditional binary operator expected" -msgstr "" +msgstr "未預期的字組「%s」,需要二元條件運算子" -#: parse.y:4124 +#: parse.y:4625 msgid "conditional binary operator expected" -msgstr "" +msgstr "需要二元條件運算子" -#: parse.y:4146 +#: parse.y:4647 #, c-format msgid "unexpected argument `%s' to conditional binary operator" -msgstr "" +msgstr "二元條件運算子使用了未預期的參數「%s」" -#: parse.y:4150 +#: parse.y:4651 msgid "unexpected argument to conditional binary operator" -msgstr "" +msgstr "二元條件運算子使用了未預期的參數" -#: parse.y:4161 +#: parse.y:4662 #, c-format msgid "unexpected token `%c' in conditional command" -msgstr "" +msgstr "條件指令中有未預期的字組「%c」" -#: parse.y:4164 +#: parse.y:4665 #, c-format msgid "unexpected token `%s' in conditional command" -msgstr "" +msgstr "條件指令中有未預期的字組「%s」" -#: parse.y:4168 +#: parse.y:4669 #, c-format msgid "unexpected token %d in conditional command" -msgstr "" +msgstr "條件指令中有未預期的字組 %d" -#: parse.y:5459 +#: parse.y:6118 #, c-format msgid "syntax error near unexpected token `%s'" -msgstr "" +msgstr "未預期的字組「%s」附近有語法錯誤" -#: parse.y:5477 +#: parse.y:6137 #, c-format msgid "syntax error near `%s'" -msgstr "" +msgstr "「%s」附近有語法錯誤" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error: unexpected end of file" -msgstr "" +msgstr "語法錯誤: 未預期的檔案結尾" -#: parse.y:5487 +#: parse.y:6151 msgid "syntax error" msgstr "語法錯誤" -#: parse.y:5549 +#: parse.y:6216 #, c-format msgid "Use \"%s\" to leave the shell.\n" -msgstr "" +msgstr "使用「%s」結束 shell。\n" -#: parse.y:5711 +#: parse.y:6394 msgid "unexpected EOF while looking for matching `)'" -msgstr "" +msgstr "尋找符合的「)」時遇到了未預期的檔案結束符" -#: pcomplete.c:1030 +#: pcomplete.c:1132 #, c-format msgid "completion: function `%s' not found" -msgstr "" +msgstr "自動完成: 未找到函數「%s」" -#: pcomplib.c:179 +#: pcomplete.c:1722 +#, c-format +msgid "programmable_completion: %s: possible retry loop" +msgstr "programmable_completion:%s:可能重試迴圈" + +#: pcomplib.c:182 #, c-format msgid "progcomp_insert: %s: NULL COMPSPEC" -msgstr "" +msgstr "progcomp_insert: %s: 空的自動完成規格" -#: print_cmd.c:290 +#: print_cmd.c:302 #, c-format msgid "print_command: bad connector `%d'" -msgstr "" +msgstr "print_command: 錯誤的條件連接符「%d」" -#: print_cmd.c:363 +#: print_cmd.c:375 #, c-format msgid "xtrace_set: %d: invalid file descriptor" -msgstr "" +msgstr "xtrace_set: %d: 無效的檔案描述符" -#: print_cmd.c:368 +#: print_cmd.c:380 msgid "xtrace_set: NULL file pointer" -msgstr "" +msgstr "xtrace_set: 空的檔案指標" -#: print_cmd.c:372 +#: print_cmd.c:384 #, c-format msgid "xtrace fd (%d) != fileno xtrace fp (%d)" -msgstr "" +msgstr "xtrace fd (%d) != fileno xtrace fp (%d)" -#: print_cmd.c:1461 +#: print_cmd.c:1545 #, c-format msgid "cprintf: `%c': invalid format character" -msgstr "" +msgstr "cprintf:「%c」: 無效的格式字元" -#: redir.c:110 +#: redir.c:150 redir.c:198 msgid "file descriptor out of range" -msgstr "" +msgstr "檔案描述符超出範圍" -#: redir.c:166 +#: redir.c:205 #, c-format msgid "%s: ambiguous redirect" -msgstr "" +msgstr "%s: 模稜兩可的重定向" -#: redir.c:170 +#: redir.c:209 #, c-format msgid "%s: cannot overwrite existing file" -msgstr "" +msgstr "%s: 無法覆寫已存在的檔案" -#: redir.c:175 +#: redir.c:214 #, c-format msgid "%s: restricted: cannot redirect output" -msgstr "" +msgstr "%s: 受限的: 無法重定向輸出" -#: redir.c:180 +#: redir.c:219 #, c-format msgid "cannot create temp file for here-document: %s" -msgstr "" +msgstr "無法為立即檔案建立暫存檔案: %s" -#: redir.c:184 -#, fuzzy, c-format +#: redir.c:223 +#, c-format msgid "%s: cannot assign fd to variable" -msgstr "%s:只讀變數" +msgstr "%s: 無法將檔案描述符指派給變數" -#: redir.c:544 +#: redir.c:650 msgid "/dev/(tcp|udp)/host/port not supported without networking" -msgstr "" +msgstr "沒有網路時不支援 /dev/(tcp|udp)/host/port" -#: redir.c:1101 +#: redir.c:945 redir.c:1065 redir.c:1130 redir.c:1303 msgid "redirection error: cannot duplicate fd" -msgstr "" +msgstr "重定向錯誤: 無法複製檔案描述符" -#: shell.c:332 +#: shell.c:353 msgid "could not find /tmp, please create!" -msgstr "" +msgstr "無法找到 /tmp,請建立" -#: shell.c:336 +#: shell.c:357 msgid "/tmp must be a valid directory name" -msgstr "" +msgstr "/tmp 必須為有效的目錄名稱" -#: shell.c:884 +#: shell.c:826 +msgid "pretty-printing mode ignored in interactive shells" +msgstr "已在互動式 shell 中忽略美化輸出模式" + +#: shell.c:972 #, c-format msgid "%c%c: invalid option" msgstr "%c%c:無效選項" -#: shell.c:1651 +#: shell.c:1343 +#, c-format +msgid "cannot set uid to %d: effective uid %d" +msgstr "無法設定 UID 至 %d:有效的 UID %d" + +#: shell.c:1354 +#, c-format +msgid "cannot set gid to %d: effective gid %d" +msgstr "無法設定 GID 至 %d:有效的 GID %d" + +#: shell.c:1544 +msgid "cannot start debugger; debugging mode disabled" +msgstr "無法開啟偵錯器;偵錯模式已停用" + +#: shell.c:1658 +#, c-format +msgid "%s: Is a directory" +msgstr "%s: 是一個目錄" + +#: shell.c:1907 msgid "I have no name!" msgstr "我沒有名字!" -#: shell.c:1793 +#: shell.c:2061 #, c-format msgid "GNU bash, version %s-(%s)\n" -msgstr "" +msgstr "GNU bash,版本 %s-(%s)\n" -#: shell.c:1794 +#: shell.c:2062 #, 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" +"用法:\t%s [GNU 長選項] [選項] …\n" +"\t%s [GNU 長選項] [選項] 指令稿檔案 …\n" -#: shell.c:1796 +#: shell.c:2064 msgid "GNU long options:\n" msgstr "GNU 長選項:\n" -#: shell.c:1800 +#: shell.c:2068 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:2069 +msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "\t-irsD 或 -c <指令> 或 -O \t\t(僅適合呼叫)\n" -#: shell.c:1816 +#: shell.c:2088 #, c-format msgid "\t-%s or -o option\n" msgstr "\t-%s or -o 選項\n" -#: shell.c:1822 +#: shell.c:2094 #, c-format msgid "Type `%s -c \"help set\"' for more information about shell options.\n" -msgstr "輸入 `%s -c \"help set\"' 更多訊息關於 shell 選項。\n" +msgstr "輸入「%s -c \"help set\"」更多關於 shell 選項的訊息。\n" -#: shell.c:1823 +#: shell.c:2095 #, c-format msgid "Type `%s -c help' for more information about shell builtin commands.\n" -msgstr "輸入 `%s -c help' 更多訊息關於內建 shell 命令。\n" +msgstr "輸入「%s -c help」更多關於內建 shell 指令的訊息。\n" -#: shell.c:1824 +#: shell.c:2096 #, c-format msgid "Use the `bashbug' command to report bugs.\n" -msgstr "使用 `bashbug' 命令報告臭蟲。\n" +msgstr "使用「bashbug」指令通報程式錯誤。\n" + +#: shell.c:2098 +#, c-format +msgid "bash home page: \n" +msgstr "bash 官網:\n" -#: sig.c:626 +#: shell.c:2099 +#, c-format +msgid "General help using GNU software: \n" +msgstr "GNU 軟體的常見使用說明:\n" + +#: sig.c:765 #, c-format msgid "sigprocmask: %d: invalid operation" -msgstr "sigprocmask: %d:無效操作" +msgstr "sigprocmask:%d:無效操作" #: siglist.c:48 msgid "Bogus signal" -msgstr "" +msgstr "偽訊號" #: siglist.c:51 msgid "Hangup" -msgstr "" +msgstr "掛斷" #: siglist.c:55 msgid "Interrupt" -msgstr "" +msgstr "中止" #: siglist.c:59 msgid "Quit" -msgstr "" +msgstr "結束" #: siglist.c:63 msgid "Illegal instruction" -msgstr "" +msgstr "無效指令" #: siglist.c:67 msgid "BPT trace/trap" -msgstr "" +msgstr "斷點追蹤/陷阱" #: siglist.c:75 msgid "ABORT instruction" -msgstr "" +msgstr "放棄指令" #: siglist.c:79 msgid "EMT instruction" -msgstr "" +msgstr "模擬器陷阱指令" #: siglist.c:83 msgid "Floating point exception" -msgstr "" +msgstr "期望浮點數" #: siglist.c:87 msgid "Killed" -msgstr "" +msgstr "強制結束" #: siglist.c:91 -#, fuzzy msgid "Bus error" -msgstr "語法錯誤" +msgstr "匯流排錯誤" #: siglist.c:95 msgid "Segmentation fault" -msgstr "" +msgstr "程式記憶體區段錯誤" #: siglist.c:99 msgid "Bad system call" -msgstr "" +msgstr "無效系統呼叫" #: siglist.c:103 msgid "Broken pipe" -msgstr "" +msgstr "管線損壞" #: siglist.c:107 msgid "Alarm clock" -msgstr "" +msgstr "鬧鐘" #: siglist.c:111 -#, fuzzy msgid "Terminated" -msgstr "有限的" +msgstr "終止" #: siglist.c:115 msgid "Urgent IO condition" -msgstr "" +msgstr "緊急 I/O 狀況" #: siglist.c:119 msgid "Stopped (signal)" -msgstr "" +msgstr "停止(信號)" #: siglist.c:127 msgid "Continue" -msgstr "" +msgstr "繼續" #: siglist.c:135 msgid "Child death or stop" -msgstr "" +msgstr "子行程已死或者停止" #: siglist.c:139 msgid "Stopped (tty input)" -msgstr "" +msgstr "停止(tty 輸入)" #: siglist.c:143 msgid "Stopped (tty output)" -msgstr "" +msgstr "停止(tty 輸出)" #: siglist.c:147 msgid "I/O ready" -msgstr "" +msgstr "I/O 就緒" #: siglist.c:151 msgid "CPU limit" -msgstr "" +msgstr "CPU 限制" #: siglist.c:155 msgid "File limit" -msgstr "" +msgstr "檔案限制" #: siglist.c:159 msgid "Alarm (virtual)" -msgstr "" +msgstr "警報(虛擬)" #: siglist.c:163 msgid "Alarm (profile)" -msgstr "" +msgstr "警報(側寫)" #: siglist.c:167 msgid "Window changed" -msgstr "" +msgstr "已變更視窗" #: siglist.c:171 msgid "Record lock" -msgstr "" +msgstr "記錄鎖" #: siglist.c:175 msgid "User signal 1" -msgstr "" +msgstr "使用者訊號 1" #: siglist.c:179 msgid "User signal 2" -msgstr "" +msgstr "使用者訊號 2" #: siglist.c:183 msgid "HFT input data pending" -msgstr "" +msgstr "HFT 待輸入資料" #: siglist.c:187 msgid "power failure imminent" -msgstr "" +msgstr "即將停止電源" #: siglist.c:191 msgid "system crash imminent" -msgstr "" +msgstr "系統即將崩潰" #: siglist.c:195 msgid "migrate process to another CPU" -msgstr "" +msgstr "遷移行程至另一個 CPU" #: siglist.c:199 msgid "programming error" -msgstr "" +msgstr "程式設計錯誤" #: siglist.c:203 msgid "HFT monitor mode granted" -msgstr "" +msgstr "已授予 HFT 監視模式" #: siglist.c:207 msgid "HFT monitor mode retracted" -msgstr "" +msgstr "已復原 HFT 監視模式" #: siglist.c:211 msgid "HFT sound sequence has completed" -msgstr "" +msgstr "已完成 HFT 聲音序列" #: siglist.c:215 msgid "Information request" -msgstr "" - -#: siglist.c:223 -msgid "Unknown Signal #" -msgstr "" +msgstr "資訊請求" -#: siglist.c:225 +#: siglist.c:223 siglist.c:225 #, c-format msgid "Unknown Signal #%d" -msgstr "" +msgstr "不明訊號 #%d" -#: subst.c:1333 subst.c:1454 +#: subst.c:1480 subst.c:1670 #, c-format msgid "bad substitution: no closing `%s' in %s" -msgstr "" +msgstr "錯誤的取代: 在 %2$s 中沒有閉合的「%1$s」" -#: subst.c:2735 +#: subst.c:3307 #, c-format msgid "%s: cannot assign list to array member" -msgstr "" +msgstr "%s: 無法將串列指派給陣列成員" -#: subst.c:4754 subst.c:4770 +#: subst.c:6048 subst.c:6064 msgid "cannot make pipe for process substitution" -msgstr "" +msgstr "無法為行程取代建立管道" -#: subst.c:4802 +#: subst.c:6124 msgid "cannot make child for process substitution" -msgstr "" +msgstr "無法為行程取代建立子行程" -#: subst.c:4847 +#: subst.c:6198 #, c-format msgid "cannot open named pipe %s for reading" -msgstr "" +msgstr "無法開啟命名管道 %s 進 readline-" -#: subst.c:4849 +#: subst.c:6200 #, c-format msgid "cannot open named pipe %s for writing" -msgstr "" +msgstr "無法開啟命名管道 %s 進行寫入" -#: subst.c:4867 +#: subst.c:6223 #, c-format msgid "cannot duplicate named pipe %s as fd %d" -msgstr "" +msgstr "無法將命名管道 %s 做為檔案描述符 %d 複製" -#: subst.c:5063 +#: subst.c:6370 +msgid "command substitution: ignored null byte in input" +msgstr "指令取代:在輸入中忽略了空位元組" + +#: subst.c:6533 msgid "cannot make pipe for command substitution" -msgstr "" +msgstr "無法為指令取代建立管道" -#: subst.c:5097 +#: subst.c:6580 msgid "cannot make child for command substitution" -msgstr "" +msgstr "無法為指令取代建立子行程" -#: subst.c:5114 +#: subst.c:6613 msgid "command_substitute: cannot duplicate pipe as fd 1" -msgstr "" +msgstr "command_substitute: 無法將管道複製為檔案描述符 1" + +#: subst.c:7082 subst.c:10252 +#, c-format +msgid "%s: invalid variable name for name reference" +msgstr "%s: 無效的引用變數名" + +#: subst.c:7178 subst.c:7196 subst.c:7369 +#, c-format +msgid "%s: invalid indirect expansion" +msgstr "%s: 無效的間接擴充" + +#: subst.c:7212 subst.c:7377 +#, c-format +msgid "%s: invalid variable name" +msgstr "%s:無效的變數名稱" + +#: subst.c:7478 +#, c-format +msgid "%s: parameter not set" +msgstr "%s:參數未設定" -#: subst.c:5617 +#: subst.c:7480 #, c-format msgid "%s: parameter null or not set" -msgstr "" +msgstr "%s: 參數為空或未設定" -#: subst.c:5907 +#: subst.c:7727 subst.c:7742 #, c-format msgid "%s: substring expression < 0" -msgstr "" +msgstr "%s: 子串表示式 < 0" -#: subst.c:6965 +#: subst.c:9560 subst.c:9587 #, c-format msgid "%s: bad substitution" -msgstr "" +msgstr "%s: 錯誤的取代" -#: subst.c:7045 +#: subst.c:9678 #, c-format msgid "$%s: cannot assign in this way" -msgstr "" +msgstr "$%s: 無法如此指派" -#: subst.c:7374 -msgid "" -"future versions of the shell will force evaluation as an arithmetic " -"substitution" -msgstr "" +#: subst.c:10111 +msgid "future versions of the shell will force evaluation as an arithmetic substitution" +msgstr "未來版本的 shell 會強制以算術取代求值" -#: subst.c:7839 +#: subst.c:10795 #, c-format msgid "bad substitution: no closing \"`\" in %s" -msgstr "" +msgstr "錯誤的取代: 在 %s 中沒有閉合的「`」" -#: subst.c:8720 +#: subst.c:11874 #, c-format msgid "no match: %s" -msgstr "" +msgstr "無符合: %s" -#: test.c:146 +#: test.c:147 msgid "argument expected" -msgstr "" +msgstr "需要參數" -#: test.c:155 +#: test.c:156 #, c-format msgid "%s: integer expression expected" -msgstr "" +msgstr "%s: 需要整數表示式" -#: test.c:263 +#: test.c:265 msgid "`)' expected" -msgstr "" +msgstr "需要「)」" -#: test.c:265 +#: test.c:267 #, c-format msgid "`)' expected, found %s" -msgstr "" +msgstr "需要「)」,得到 %s" -#: test.c:280 test.c:693 test.c:696 +#: test.c:469 test.c:814 #, c-format -msgid "%s: unary operator expected" -msgstr "" +msgid "%s: binary operator expected" +msgstr "%s: 需要二元表示式" -#: test.c:449 test.c:736 +#: test.c:771 test.c:774 #, c-format -msgid "%s: binary operator expected" -msgstr "" +msgid "%s: unary operator expected" +msgstr "%s: 需要一元表示式" -#: test.c:811 +#: test.c:896 msgid "missing `]'" -msgstr "" +msgstr "缺少「]」" -#: trap.c:203 +#: test.c:914 +#, c-format +msgid "syntax error: `%s' unexpected" +msgstr "語法錯誤:非預期的「%s」" + +#: trap.c:220 msgid "invalid signal number" -msgstr "無效信號數" +msgstr "無效訊號數字" + +#: trap.c:323 +#, c-format +msgid "trap handler: maximum trap handler level exceeded (%d)" +msgstr "捕捉處理函式:達到最大捕捉處理函式等級 (%d)" -#: trap.c:327 +#: trap.c:412 #, c-format msgid "run_pending_traps: bad value in trap_list[%d]: %p" -msgstr "" +msgstr "run_pending_traps: trap_list[%d] 中的錯誤值: %p" -#: trap.c:331 +#: trap.c:416 #, 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" +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 +#: trap.c:509 #, c-format msgid "trap_handler: bad signal %d" -msgstr "trap_handler:壞的信號 %d" +msgstr "trap_handler:不當的訊號 %d" -#: variables.c:363 +#: variables.c:424 #, c-format msgid "error importing function definition for `%s'" -msgstr "錯誤,輸入的函數定義為 `%s'" +msgstr "錯誤,輸入的函數定義為「%s」" -#: variables.c:748 +#: variables.c:838 #, c-format msgid "shell level (%d) too high, resetting to 1" -msgstr "" +msgstr "shell 層次 (%d) 太高,重設為 1" -#: variables.c:1915 +#: variables.c:2642 msgid "make_local_variable: no function context at current scope" -msgstr "" +msgstr "make_local_variable: 目前作用域中沒有函數語境" + +#: variables.c:2661 +#, c-format +msgid "%s: variable may not be assigned value" +msgstr "%s: 變數不可指派值" + +#: variables.c:2818 variables.c:2874 +#, c-format +msgid "%s: cannot inherit value from incompatible type" +msgstr "%s:無法從不相容的類型繼承數值" + +#: variables.c:3459 +#, c-format +msgid "%s: assigning integer to name reference" +msgstr "%s:指定數字至名稱參考" -#: variables.c:3159 +#: variables.c:4390 msgid "all_local_variables: no function context at current scope" -msgstr "" +msgstr "all_local_variables: 目前作用域中沒有函數語境" -#: variables.c:3376 +#: variables.c:4757 #, c-format msgid "%s has null exportstr" -msgstr "" +msgstr "%s 有空的 exportstr" -#: variables.c:3381 variables.c:3390 +#: variables.c:4762 variables.c:4771 #, c-format msgid "invalid character %d in exportstr for %s" -msgstr "" +msgstr "%2$s 的 exportstr 中有無效的字元 %1$d" -#: variables.c:3396 +#: variables.c:4777 #, c-format msgid "no `=' in exportstr for %s" -msgstr "" +msgstr "%s 的 exportstr 中沒有「=」" -#: variables.c:3835 +#: variables.c:5317 msgid "pop_var_context: head of shell_variables not a function context" -msgstr "" +msgstr "pop_var_context: shell_variables 的前端不是函數語境" -#: variables.c:3848 +#: variables.c:5330 msgid "pop_var_context: no global_variables context" -msgstr "" +msgstr "pop_var_context: 沒有 global_variables 語境" -#: variables.c:3922 +#: variables.c:5410 msgid "pop_scope: head of shell_variables not a temporary environment scope" -msgstr "" +msgstr "pop_scope: shell_variables 的前端不是臨時環境作用域" -#: variables.c:4678 -#, fuzzy, c-format +#: variables.c:6400 +#, c-format msgid "%s: %s: cannot open as FILE" -msgstr "%s:不能讀取: %s" +msgstr "%s: %s: 無法做為檔案開啟" -#: variables.c:4683 +#: variables.c:6405 #, c-format msgid "%s: %s: invalid value for trace file descriptor" -msgstr "" - -#: version.c:46 -msgid "Copyright (C) 2009 Free Software Foundation, Inc." -msgstr "" +msgstr "%s: %s: 追蹤檔案描述符的值無效" -#: version.c:47 -msgid "" -"License GPLv3+: GNU GPL version 3 or later \n" -msgstr "" - -#: version.c:86 version2.c:83 +#: variables.c:6450 #, c-format -msgid "GNU bash, version %s (%s)\n" -msgstr "" +msgid "%s: %s: compatibility value out of range" +msgstr "%s: %s: 相容版本數值超出範圍" -#: 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:46 version2.c:46 +msgid "Copyright (C) 2022 Free Software Foundation, Inc." +msgstr "著作權所有 (C) 2022 自由軟體基金會" -#: version.c:92 version2.c:89 -#, c-format -msgid "There is NO WARRANTY, to the extent permitted by law.\n" -msgstr "" +#: version.c:47 version2.c:47 +msgid "License GPLv3+: GNU GPL version 3 or later \n" +msgstr "授權條款 GPLv3+: GNU GPL 授權條款第三版或者更新版本 \n" -#: version2.c:86 +#: version.c:86 version2.c:86 #, c-format -msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n" -msgstr "" +msgid "GNU bash, version %s (%s)\n" +msgstr "GNU bash,版本 %s (%s)\n" -#: version2.c:87 -#, c-format -msgid "" -"License GPLv2+: GNU GPL version 2 or later \n" -msgstr "" +#: version.c:91 version2.c:91 +msgid "This is free software; you are free to change and redistribute it." +msgstr "本軟體是自由軟體,您可以自由地變更和重新發布。" + +#: version.c:92 version2.c:92 +msgid "There is NO WARRANTY, to the extent permitted by law." +msgstr "在法律許可的情況下特此明示,本軟體不提供任何擔保。" -#: xmalloc.c:91 +#: xmalloc.c:93 #, c-format msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" +msgstr "%s: 無法分配 %lu 位元組 (已分配 %lu 位元組)" -#: xmalloc.c:93 -#, fuzzy, c-format +#: xmalloc.c:95 +#, c-format msgid "%s: cannot allocate %lu bytes" -msgstr "%s:不能讀取: %s" +msgstr "%s: 無法分配 %lu 位元組" -#: xmalloc.c:163 +#: xmalloc.c:165 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" -msgstr "" +msgstr "%s: %s:%d: 無法分配 %lu 位元組 (已分配 %lu 位元組)" -#: xmalloc.c:165 +#: xmalloc.c:167 #, c-format msgid "%s: %s:%d: cannot allocate %lu bytes" -msgstr "" +msgstr "%s: %s:%d: 無法分配 %lu 位元組" -#: builtins.c:43 +#: builtins.c:45 msgid "alias [-p] [name[=value] ... ]" -msgstr "" +msgstr "alias [-p] [名稱[=值] … ]" -#: builtins.c:47 +#: builtins.c:49 msgid "unalias [-a] name [name ...]" -msgstr "" +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:53 +msgid "bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]" +msgstr "bind [-lpvsPSVX] [-m 按鍵映射] [-f 檔名] [-q 名稱] [-u 名稱] [-r 按鍵序列] [-x 按鍵序列:shell-指令] [按鍵序列:readline-函數 或 readline-指令]" -#: builtins.c:54 +#: builtins.c:56 msgid "break [n]" -msgstr "" +msgstr "break [n]" -#: builtins.c:56 +#: builtins.c:58 msgid "continue [n]" -msgstr "" +msgstr "continue [n]" -#: builtins.c:58 +#: builtins.c:60 msgid "builtin [shell-builtin [arg ...]]" -msgstr "" +msgstr "builtin [shell 內建命令 [參數 …]]" -#: builtins.c:61 +#: builtins.c:63 msgid "caller [expr]" -msgstr "" - -#: builtins.c:64 -msgid "cd [-L|-P] [dir]" -msgstr "" +msgstr "caller [表示式]" #: builtins.c:66 -msgid "pwd [-LP]" -msgstr "" +msgid "cd [-L|[-P [-e]] [-@]] [dir]" +msgstr "cd [-L|[-P [-e]] [-@]] [目錄]" #: 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 "" +msgid "pwd [-LP]" +msgstr "pwd [-LP]" #: builtins.c:76 -msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]" -msgstr "" +msgid "command [-pVv] command [arg ...]" +msgstr "command [-pVv] 指令 [參數 …]" #: builtins.c:78 -msgid "typeset [-aAfFilrtux] [-p] name[=value] ..." -msgstr "" +msgid "declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]" +msgstr "declare [-aAfFgiIlnrtux] [name[=value] ...] 或 declare -p [-aAfFilnrtux] [name ...]" #: builtins.c:80 +msgid "typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]" +msgstr "typeset [-aAfFgiIlnrtux] name[=value] ... 或 typeset -p [-aAfFilnrtux] [name ...]" + +#: builtins.c:82 msgid "local [option] name[=value] ..." -msgstr "" +msgstr "local [option] 名稱[=值] …" -#: builtins.c:83 +#: builtins.c:85 msgid "echo [-neE] [arg ...]" -msgstr "" +msgstr "echo [-neE] [參數 …]" -#: builtins.c:87 +#: builtins.c:89 msgid "echo [-n] [arg ...]" -msgstr "" - -#: builtins.c:90 -msgid "enable [-a] [-dnps] [-f filename] [name ...]" -msgstr "" +msgstr "echo [-n] [參數 …]" #: builtins.c:92 -msgid "eval [arg ...]" -msgstr "" +msgid "enable [-a] [-dnps] [-f filename] [name ...]" +msgstr "enable [-a] [-dnps] [-f 檔名] [名稱 …]" #: builtins.c:94 -msgid "getopts optstring name [arg]" -msgstr "" +msgid "eval [arg ...]" +msgstr "eval [參數 …]" #: builtins.c:96 -msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]" -msgstr "" +msgid "getopts optstring name [arg ...]" +msgstr "getopts 選項字串 名稱 [參數 …]" #: builtins.c:98 -msgid "exit [n]" -msgstr "" +msgid "exec [-cl] [-a name] [command [argument ...]] [redirection ...]" +msgstr "exec [-cl] [-a 名稱] [指令 [參數 …]] [重定向 …]" #: builtins.c:100 +msgid "exit [n]" +msgstr "exit [n]" + +#: builtins.c:102 msgid "logout [n]" -msgstr "" +msgstr "logout [n]" -#: builtins.c:103 +#: builtins.c:105 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]" -msgstr "" +msgstr "fc [-e 編輯器名] [-lnr] [起始] [終止] 或 fc -s [模式=取代串] [指令]" -#: builtins.c:107 +#: builtins.c:109 msgid "fg [job_spec]" -msgstr "" +msgstr "fg [工作規格]" -#: builtins.c:111 +#: builtins.c:113 msgid "bg [job_spec ...]" -msgstr "" +msgstr "bg [工作規格 …]" -#: builtins.c:114 +#: builtins.c:116 msgid "hash [-lr] [-p pathname] [-dt] [name ...]" -msgstr "" +msgstr "hash [-lr] [-p 路徑名] [-dt] [名稱 …]" -#: builtins.c:117 +#: builtins.c:119 msgid "help [-dms] [pattern ...]" -msgstr "" +msgstr "help [-dms] [模式 …]" -#: builtins.c:121 -msgid "" -"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg " -"[arg...]" -msgstr "" +#: builtins.c:123 +msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]" +msgstr "history [-c] [-d 偏移量] [n] 或 history -anrw [檔名] 或 history -ps 參數 [參數…]" -#: builtins.c:125 +#: builtins.c:127 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]" -msgstr "" +msgstr "jobs [-lnprs] [工作規格 …] 或 jobs -x 指令 [參數]" -#: 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:131 +msgid "disown [-h] [-ar] [jobspec ... | pid ...]" +msgstr "disown [-h] [-ar] [jobspec ... | pid ...]" #: builtins.c:134 -msgid "let arg [arg ...]" -msgstr "" +msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]" +msgstr "kill [-s 訊號規格 | -n 訊號編號 | -訊號規格] 行程識別碼 | 工作規格 … 或 kill -l [訊號規格]" #: builtins.c:136 -msgid "" -"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p " -"prompt] [-t timeout] [-u fd] [name ...]" -msgstr "" +msgid "let arg [arg ...]" +msgstr "let 參數 [參數 …]" #: builtins.c:138 -msgid "return [n]" -msgstr "" +msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]" +msgstr "read [-ers] [-a 陣列] [-d 分隔符] [-i 緩衝區文字] [-n 讀取字元數] [-N 讀取字元數] [-p 提示符] [-t 逾時] [-u 檔案描述符] [名稱 …]" #: builtins.c:140 -msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]" -msgstr "" +msgid "return [n]" +msgstr "return [n]" #: builtins.c:142 -msgid "unset [-f] [-v] [name ...]" -msgstr "" +msgid "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" +msgstr "set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]" #: builtins.c:144 -msgid "export [-fn] [name[=value] ...] or export -p" -msgstr "" +msgid "unset [-f] [-v] [-n] [name ...]" +msgstr "unset [-f] [-v] [-n] [名稱 …]" #: builtins.c:146 -msgid "readonly [-af] [name[=value] ...] or readonly -p" -msgstr "" +msgid "export [-fn] [name[=value] ...] or export -p" +msgstr "export [-fn] [名稱[=值] …] 或 export -p" #: builtins.c:148 -msgid "shift [n]" -msgstr "" +msgid "readonly [-aAf] [name[=value] ...] or readonly -p" +msgstr "readonly [-aAf] [名稱[=值] …] 或 readonly -p" #: builtins.c:150 -msgid "source filename [arguments]" -msgstr "" +msgid "shift [n]" +msgstr "shift [n]" #: builtins.c:152 -#, fuzzy +msgid "source filename [arguments]" +msgstr "source 檔名 [參數]" + +#: builtins.c:154 msgid ". filename [arguments]" -msgstr "太多引數" +msgstr ". 檔名 [參數]" -#: builtins.c:155 +#: builtins.c:157 msgid "suspend [-f]" -msgstr "" - -#: builtins.c:158 -msgid "test [expr]" -msgstr "" +msgstr "suspend [-f]" #: builtins.c:160 -msgid "[ arg... ]" -msgstr "" +msgid "test [expr]" +msgstr "test [表示式]" #: builtins.c:162 -msgid "times" -msgstr "" +msgid "[ arg... ]" +msgstr "[ 參數… ]" -#: builtins.c:164 +#: builtins.c:166 msgid "trap [-lp] [[arg] signal_spec ...]" -msgstr "" +msgstr "trap [-lp] [[參數] 訊號規格 …]" -#: builtins.c:166 +#: builtins.c:168 msgid "type [-afptP] name [name ...]" -msgstr "" +msgstr "type [-afptP] 名稱 [名稱 …]" -#: builtins.c:169 -msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]" -msgstr "" +#: builtins.c:171 +msgid "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" +msgstr "ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]" -#: builtins.c:172 +#: builtins.c:174 msgid "umask [-p] [-S] [mode]" -msgstr "" +msgstr "umask [-p] [-S] [模式]" -#: builtins.c:175 -msgid "wait [id]" -msgstr "" +#: builtins.c:177 +msgid "wait [-fn] [-p var] [id ...]" +msgstr "wait [-fn] [-p 變數] [編號 …]" -#: builtins.c:179 -msgid "wait [pid]" -msgstr "" - -#: builtins.c:182 -msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" -msgstr "" +#: builtins.c:181 +msgid "wait [pid ...]" +msgstr "wait [行程識別碼 …]" #: builtins.c:184 -msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" -msgstr "" +msgid "for NAME [in WORDS ... ] ; do COMMANDS; done" +msgstr "for 名稱 [in 字詞 … ] ; do 指令 ; done" #: builtins.c:186 -msgid "select NAME [in WORDS ... ;] do COMMANDS; done" -msgstr "" +msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done" +msgstr "for (( 表示式1; 表示式2; 表示式3 )); do 指令 ; done" #: builtins.c:188 -msgid "time [-p] pipeline" -msgstr "" +msgid "select NAME [in WORDS ... ;] do COMMANDS; done" +msgstr "select NAME [in 字詞 … ;] do 指令 ; done" #: builtins.c:190 -msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" -msgstr "" +msgid "time [-p] pipeline" +msgstr "time [-p] 管道" #: builtins.c:192 -msgid "" -"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else " -"COMMANDS; ] fi" -msgstr "" +msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac" +msgstr "case 詞 in [模式 [| 模式]…) 指令 ;;]… esac" #: builtins.c:194 -msgid "while COMMANDS; do COMMANDS; done" -msgstr "" +msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi" +msgstr "if 指令 ; then 指令 ; [ elif 指令 ; then 指令 ; ]… [ else 指令 ; ] fi" #: builtins.c:196 -msgid "until COMMANDS; do COMMANDS; done" -msgstr "" +msgid "while COMMANDS; do COMMANDS-2; done" +msgstr "while COMMANDS; do COMMANDS-2; done" #: builtins.c:198 -msgid "coproc [NAME] command [redirections]" -msgstr "" +msgid "until COMMANDS; do COMMANDS-2; done" +msgstr "until COMMANDS; do COMMANDS-2; done" #: builtins.c:200 -msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" -msgstr "" +msgid "coproc [NAME] command [redirections]" +msgstr "coproc [名稱] 指令 [重定向]" #: builtins.c:202 -msgid "{ COMMANDS ; }" -msgstr "" +msgid "function name { COMMANDS ; } or name () { COMMANDS ; }" +msgstr "function 名稱 { 指令 ; } 或 name () { 指令 ; }" #: builtins.c:204 -msgid "job_spec [&]" -msgstr "" +msgid "{ COMMANDS ; }" +msgstr "{ 指令 ; }" #: builtins.c:206 -msgid "(( expression ))" -msgstr "" +msgid "job_spec [&]" +msgstr "job_spec [&]" #: builtins.c:208 -msgid "[[ expression ]]" -msgstr "" +msgid "(( expression ))" +msgstr "(( 表示式 ))" #: builtins.c:210 +msgid "[[ expression ]]" +msgstr "[[ 表示式 ]]" + +#: builtins.c:212 msgid "variables - Names and meanings of some shell variables" -msgstr "" +msgstr "variables - 一些 shell 變數的名稱和含義" -#: builtins.c:213 +#: builtins.c:215 msgid "pushd [-n] [+N | -N | dir]" -msgstr "" +msgstr "pushd [-n] [+N | -N | 目錄]" -#: builtins.c:217 +#: builtins.c:219 msgid "popd [-n] [+N | -N]" -msgstr "" +msgstr "popd [-n] [+N | -N]" -#: builtins.c:221 +#: builtins.c:223 msgid "dirs [-clpv] [+N] [-N]" -msgstr "" +msgstr "dirs [-clpv] [+N] [-N]" -#: builtins.c:224 +#: builtins.c:226 msgid "shopt [-pqsu] [-o] [optname ...]" -msgstr "" +msgstr "shopt [-pqsu] [-o] [選項名 …]" -#: builtins.c:226 +#: builtins.c:228 msgid "printf [-v var] format [arguments]" -msgstr "" +msgstr "printf [-v var] 格式 [參數]" -#: 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:231 +msgid "complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]" +msgstr "complete [-abcdefgjksuv] [-pr] [-DEI] [-o 選項] [-A 動作] [-G 全域模式] [-W 詞語列表] [-F 函數] [-C 指令] [-X 過濾模式] [-P 字首] [-S 字尾] [名稱 …]" -#: 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:235 +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 選項] [-A 動作] [-G 全域模式] [-W 詞語列表] [-F 函數] [-C 指令] [-X 過濾模式] [-P 字首] [-S 字尾] [詞語]" -#: 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:239 +msgid "compopt [-o|+o option] [-DEI] [name ...]" +msgstr "compopt [-o|+o 選項] [-DEI] [名稱 …]" #: builtins.c:242 -msgid "" -"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c " -"quantum] [array]" -msgstr "" +msgid "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" -#: builtins.c:254 -#, fuzzy +#: builtins.c:244 +msgid "readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]" +msgstr "readarray [-d 分割符號] [-n 計數] [-O 起始序號] [-s 計數] [-t] [-u fd] [-C 回呼] [-c 定量] [陣列]" + +#: builtins.c:256 msgid "" "Define or display aliases.\n" " \n" @@ -2240,31 +2533,45 @@ msgid "" " alias substitution when the alias is expanded.\n" " \n" " Options:\n" -" -p\tPrint all defined aliases in a reusable format\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" +" 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." +"定義或顯示別名。\n" +" \n" +" 不帶參數時,「alias」以可重用的格式\n" +" 「alias 名稱=值」在標準輸出裝置上印出別名列表。\n" +" \n" +" 否則,對於每個指定值的名稱定義一個別名。\n" +" 值末尾的空格會使下一個字詞被檢測\n" +" 做為別名取代展開。\n" +" \n" +" 選項:\n" +" -p\t以可重用的格式印出所有的已定義別名\n" +" \n" +" 結束狀態:\n" +" 除非一個沒有定義的名字被做為參數提供,否則 alias \n" +" 回傳值為真。" -#: builtins.c:276 +#: builtins.c:278 msgid "" "Remove each NAME from the list of defined aliases.\n" " \n" " Options:\n" -" -a\tremove all alias definitions.\n" +" -a\tremove all alias definitions\n" " \n" " Return success unless a NAME is not an existing alias." msgstr "" +"從別名定義列表中刪除每一個 <名稱>。\n" +" \n" +" 選項:\n" +" -a\t刪除所有的別名定義\n" +" \n" +" 回傳成功,除非 <名稱> 不是一個已存在的別名。" -#: builtins.c:289 +#: builtins.c:291 msgid "" "Set Readline key bindings and variables.\n" " \n" @@ -2276,34 +2583,59 @@ msgid "" " 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" +" 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" +" -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" +" -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" +" -X List key sequences bound with -x and associated commands\n" +" in a form that can be reused as input.\n" " \n" " Exit Status:\n" " bind returns 0 unless an unrecognized option is given or an error occurs." msgstr "" - -#: builtins.c:326 +"設定 Readline 按鍵綁定和變數。\n" +" \n" +" 綁定一個按鍵序列到一個 Readline 函數或者巨集,或者設定一個\n" +" Readline 變數。非選項參數的語法和 ~/.inputrc 檔案中的等\n" +" 同,但是必須做為一個參數被傳遞,\n" +" 例如,bind '\"\\C-x\\C-r\": re-read-init-file'。\n" +" \n" +" 選項:\n" +" -m 按鍵映射 在此指令執行過程中使用指定的按鍵映射。\n" +" 可被接受的按鍵映射名字有 emacs、emacs-standard、emacs-meta、\n" +" emacs-ctlx、vi、vi-move、vi-command、和 vi-insert。\n" +" -l 列出函數名稱。\n" +" -P 列出函數名稱和綁定。\n" +" -p 以可以重新用作輸入的格式列出函數名稱和綁定。\n" +" -S 列出可以啟動巨集的按鍵序列以及它們的值\n" +" -s 以可以重新用作輸入的格式列出可以啟動巨集的鍵以及它們的值。\n" +" -V 列出變數名稱和它們的值\n" +" -v 以可以重新用作輸入的格式列出變數的名稱和它們的值\n" +" -q 函數名 查詢指定的函數可以由哪些鍵啟動。\n" +" -u 函數名 反綁定所有綁定至指定函數的鍵。\n" +" -r 按鍵序列 取消指定按鍵序列的綁定。\n" +" -f 檔名 從指定檔案中讀取按鍵綁定。\n" +" -x 按鍵序列:shell 指令\t當指定的按鍵序列被輸入時,執行指定的 shell 指令。\n" +" -X 以可被重用的形式列出用 -x 綁定的按鍵序列和指令。\n" +" \n" +" 結束狀態:\n" +" 除非使用了無法識別的選項或者錯誤發生,否則回傳 0。" + +#: builtins.c:330 msgid "" "Exit for, while, or until loops.\n" " \n" @@ -2313,8 +2645,15 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"結束 for、while 或 until 迴圈\n" +" \n" +" 結束一個 FOR、WHILE 或 UNTIL 迴圈。如果指定了 N,則跳出 N 重\n" +" 迴圈\n" +" \n" +" 結束狀態:\n" +" 結束狀態為 0 除非 N 不大於或等於 1。" -#: builtins.c:338 +#: builtins.c:342 msgid "" "Resume for, while, or until loops.\n" " \n" @@ -2324,22 +2663,37 @@ msgid "" " Exit Status:\n" " The exit status is 0 unless N is not greater than or equal to 1." msgstr "" +"繼續 for、while 或 until 迴圈。\n" +" \n" +" 繼續目前 FOR、WHILE 或 UNTIL 迴圈的下一步。\n" +" 如果指定了 N, 則繼續目前的第 N 重迴圈。\n" +" \n" +" 結束狀態:\n" +" 結束狀態為 0 除非 N 不大於或等於 1。" -#: builtins.c:350 +#: builtins.c:354 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" +" 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.." +" not a shell builtin." msgstr "" +"執行 shell 內建命令。\n" +" \n" +" 帶 <參數> 執行 而不做指令查詢\n" +" 在希望以 shell 函數的形式來重新實現 shell 內建命令,\n" +" 但需要在函數之內執行該 shell 內建命令的情況下有用處。\n" +" \n" +" 結束狀態:\n" +" 以 的結束狀態為準,或者如果 不是一個 shell 內建命令時\n" +" 回傳 false。" -#: builtins.c:365 +#: builtins.c:369 msgid "" "Return the context of the current subroutine call.\n" " \n" @@ -2354,47 +2708,86 @@ msgid "" " Returns 0 unless the shell is not executing a shell function or EXPR\n" " is invalid." msgstr "" +"回傳目前子呼叫的語境。\n" +" \n" +" 不帶有 EXPR 時,回傳「$line $filename」。帶有 EXPR 時,回傳\n" +" 「$line $subroutine $filename」;這個額外的資訊可以被用於提供\n" +" 堆疊追蹤。\n" +" \n" +" EXPR 的值顯示了到目前呼叫框格需要回去多少個呼叫框格;頂部框格\n" +" 是第 0 框格。\n" +" \n" +" 結束狀態:\n" +" 除非 shell 不在執行一個 shell 函數或者 EXPR 無效,否則回傳結\n" +" 果為 0。" -#: builtins.c:383 +#: builtins.c:387 msgid "" "Change the shell working directory.\n" " \n" -" Change the current directory to DIR. The default DIR is the value of " -"the\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" +" 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" +" 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" +" -L\tforce symbolic links to be followed: resolve symbolic\n" +" \t\tlinks in DIR after processing instances of `..'\n" +" -P\tuse the physical directory structure without following\n" +" \t\tsymbolic links: resolve symbolic links in DIR before\n" +" \t\tprocessing instances of `..'\n" +" -e\tif the -P option is supplied, and the current working\n" +" \t\tdirectory cannot be determined successfully, exit with\n" +" \t\ta non-zero status\n" +" -@\ton systems that support it, present a file with extended\n" +" \t\tattributes as a directory containing the file attributes\n" " \n" " The default is to follow symbolic links, as if `-L' were specified.\n" +" `..' is processed by removing the immediately previous pathname component\n" +" back to a slash or the beginning of DIR.\n" " \n" " Exit Status:\n" -" Returns 0 if the directory is changed; non-zero otherwise." +" Returns 0 if the directory is changed, and if $PWD is set successfully when\n" +" -P is used; non-zero otherwise." msgstr "" +"變更 shell 工作目錄。\n" +" \n" +" 變更目前目錄至 <目錄>。預設的 <目錄> 是 shell 變數 HOME\n" +" 的值。\n" +" \n" +" 變數 CDPATH 定義了含有 <目錄> 的目錄搜尋路徑,其中不同的目錄名稱由冒號 (:)分隔。\n" +" 一個空的目錄名稱表示目前目錄。如果要切換到的 <目錄> 由斜線 (/) 開頭,則 CDPATH\n" +" 變數不會被使用。\n" +" \n" +" 如果路徑找不到,並且 shell 選項「cdable_vars」被設定,則參數詞被假定為一個\n" +" 變數名。如果該變數有值,則它的值被當做 <目錄>。\n" +" \n" +" 選項:\n" +" -L\t強制跟隨符號連結: 在處理「..」之後解析 <目錄> 中的符號連結。\n" +" -P\t使用實體目錄結構而不跟隨符號連結: 在處理「..」之前解析 <目錄> 中的符號連結。\n" +" -e\t如果使用了 -P 參數,但不能成功確定目前工作目錄時,回傳非零的回傳值。\n" +" -@\t在支援擴充屬性的系統上,將一個有這些屬性的檔案當做有檔案屬性的目錄。\n" +" \n" +" 預設情況下跟隨符號連結,如同指定「-L」。\n" +" 「..」使用移除向前相鄰目錄名成員直到 <目錄> 開始或一個斜線的方式處理。\n" +" \n" +" 結束狀態:\n" +" 如果目錄變更,或在使用 -P 選項時 $PWD 修改成功時回傳 0,否則非零。" -#: builtins.c:411 +#: builtins.c:425 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" +" \t\tdirectory\n" " -P\tprint the physical directory, without any symbolic links\n" " \n" " By default, `pwd' behaves as if `-L' were specified.\n" @@ -2403,8 +2796,18 @@ msgid "" " Returns 0 unless an invalid option is given or the current directory\n" " cannot be read." msgstr "" +"印出目前工作目錄的名字。\n" +" \n" +" 選項:\n" +" -L\t印出 $PWD 變數的值,如果它包含了目前的工作目錄\n" +" -P\t印出目前的實體路徑,不帶有任何的符號連結\n" +" \n" +" 預設情況下,「pwd」的行為和帶「-L」選項一致\n" +" \n" +" 結束狀態:\n" +" 除非使用了無效選項或者目前目錄不可讀,否則回傳狀態為 0。" -#: builtins.c:428 +#: builtins.c:442 msgid "" "Null command.\n" " \n" @@ -2413,43 +2816,69 @@ msgid "" " Exit Status:\n" " Always succeeds." msgstr "" +"空的指令。\n" +" \n" +" 沒有效果;此指令不做任何操作。\n" +" \n" +" 結束狀態:\n" +" 一律成功。" -#: builtins.c:439 +#: builtins.c:453 msgid "" "Return a successful result.\n" " \n" " Exit Status:\n" " Always succeeds." msgstr "" +"回傳一個成功結果。\n" +" \n" +" 結束狀態:\n" +" 一律成功。" -#: builtins.c:448 +#: builtins.c:462 msgid "" "Return an unsuccessful result.\n" " \n" " Exit Status:\n" " Always fails." msgstr "" +"回傳一個不成功的結果。\n" +" \n" +" 結束狀態:\n" +" 一律失敗。" -#: builtins.c:457 +#: builtins.c:471 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" +" 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" +" -p use a default value for PATH that is guaranteed to find all of\n" +" the standard utilities\n" +" -v print a description of COMMAND similar to the `type' builtin\n" +" -V print 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 "" +"執行一個簡單指令或者顯示指令的相關資訊。\n" +" \n" +" 帶 ARGS 參數執行 COMMAND 指令且抑制 shell 函數查詢,或顯示\n" +" 指定的 COMMAND 指令的資訊。可以在存在相同名稱函數定義的\n" +" 情況下被用於啟動磁碟上的指令。\n" +" \n" +" 選項:\n" +" -p\t使用 PATH 變數的一個預設值以確保所有的標準工具都能被找到。\n" +" -v\t印出 COMMAND 指令的描述,和「type」內建相似\n" +" -V\t印出每個 COMMAND 指令的詳細描述\n" +" \n" +" 結束狀態:\n" +" 回傳 COMMAND 指令的回傳狀態,或者當找不到 COMMAND 指令時失敗。" -#: builtins.c:476 +#: builtins.c:490 msgid "" "Set variable values and attributes.\n" " \n" @@ -2459,17 +2888,22 @@ msgid "" " 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" +" \t\tsource file when debugging)\n" +" -g\tcreate global variables when used in a shell function; otherwise\n" +" \t\tignored\n" +" -I\tif creating a local variable, inherit the attributes and value\n" +" \t\tof a variable with the same name at a previous scope\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" +" -l\tto convert the value of each NAME to lower case on assignment\n" +" -n\tmake NAME a reference to the variable named by its value\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" +" -u\tto convert the value of each NAME to upper case on assignment\n" " -x\tto make NAMEs export\n" " \n" " Using `+' instead of `-' turns off the given attribute.\n" @@ -2477,22 +2911,58 @@ msgid "" " 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" +" When used in a function, `declare' makes NAMEs local, as with the `local'\n" +" command. The `-g' option suppresses this behavior.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is supplied or an error occurs." +" Returns success unless an invalid option is supplied or a variable\n" +" assignment error occurs." msgstr "" +"設定變數值和屬性。\n" +" \n" +" 宣告變數並賦予其屬性。若未指定 <名稱>,\n" +" 則顯示所有變數的屬性和數值。\n" +" \n" +" 選項:\n" +" -f\t限制動作或顯示為只有函數名稱和定義\n" +" -F\t限制僅顯示函數名稱(偵錯時另包含列號和原始檔名)\n" +" -g\t用於 shell 函數時建立全域變數 ; 否則忽略\n" +" -I\t如果建立的是本地變數,則繼承上個作用域中,\n" +" \t\t同名變數的屬性及數值。\n" +" -p\t顯示每個 <名稱> 變數的屬性和值\n" +" \n" +" 設定屬性的選項:\n" +" -a\t使 <名稱> 成為索引陣列 (如果支援)\n" +" -A\t使 <名稱> 成為關聯陣列 (如果支援)\n" +" -i\t使 <名稱> 帶有「integer」(整數)屬性\n" +" -l\t將每個 <名稱> 的值在指派時轉為小寫\n" +" -n\t使 <名稱> 成為指向一個以其值為名稱的變數引用\n" +" -r\t將 <名稱> 變為唯讀\n" +" -t\t使 <名稱> 帶有「trace」(追蹤)屬性\n" +" -u\t將每個 <名稱> 的值在指派時轉為大寫\n" +" -x\t將 <名稱> 匯出\n" +" \n" +" 用「+」代替「-」會關閉指定屬性。\n" +" \n" +" 帶有整數屬性的變數,會在指派時執行算術求值(見「let」指令)\n" +" \n" +" 在函數中使用時,「declare」使 <名稱> 成為本機變數,和「local」\n" +" 指令一致。「-g」選項會壓制本行為\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效選項,或者發生錯誤。" -#: builtins.c:512 +#: builtins.c:532 msgid "" "Set variable values and attributes.\n" " \n" -" Obsolete. See `help declare'." +" A synonym for `declare'. See `help declare'." msgstr "" +"設定變數的值和屬性。\n" +" \n" +" 功能相同於「declare」。參見「help declare」。" -#: builtins.c:520 +#: builtins.c:540 msgid "" "Define local variables.\n" " \n" @@ -2503,15 +2973,26 @@ msgid "" " 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." +" Returns success unless an invalid option is supplied, a variable\n" +" assignment error occurs, or the shell is not executing a function." msgstr "" +"定義本機變數。\n" +" \n" +" 建立一個以 <名稱> 為名稱的變數,並且將 VALUE 指派給它。\n" +" OPTION 選項可以是任何能被「declare」接受的選項。\n" +" \n" +" 本機變數只能在函數內部被使用,它們只能在定義它們的函數內\n" +" 部以及子函數中可見。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項、發生了指派錯誤或者 shell 不在執行一個函數。" -#: builtins.c:537 +#: builtins.c:557 msgid "" "Write arguments to the standard output.\n" " \n" -" Display the ARGs on the standard output followed by a newline.\n" +" Display the ARGs, separated by a single space character and followed by a\n" +" newline, on the standard output.\n" " \n" " Options:\n" " -n\tdo not append a newline\n" @@ -2523,6 +3004,7 @@ msgid "" " \\b\tbackspace\n" " \\c\tsuppress further output\n" " \\e\tescape character\n" +" \\E\tescape character\n" " \\f\tform feed\n" " \\n\tnew line\n" " \\r\tcarriage return\n" @@ -2530,15 +3012,48 @@ msgid "" " \\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" +" \t\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" +" \t\tcan be one or two hex digits\n" +" \\uHHHH\tthe Unicode character whose value is the hexadecimal value HHHH.\n" +" \t\tHHHH can be one to four hex digits.\n" +" \\UHHHHHHHH the Unicode character whose value is the hexadecimal value\n" +" \t\tHHHHHHHH. HHHHHHHH can be one to eight hex digits.\n" " \n" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" - -#: builtins.c:571 +"將參數寫入標準輸出。\n" +" \n" +" 在標準輸出上,顯示用空格分割的 ARG 參數後跟一個換列。\n" +" \n" +" 選項:\n" +" -n\t不要追加換列\n" +" -e\t啟用下列反斜線逸出的解釋\n" +" -E\t顯式地抑制對於反斜線逸出的解釋\n" +" \n" +" 「echo」對下列反斜線字元進行逸出:\n" +" \\a\t警告(響鈴)\n" +" \\b\t退格\n" +" \\c\t抑制更多的輸出\n" +" \\e\t逸出字元\n" +" \\f\t換頁字元\n" +" \\n\t換列\n" +" \\r\t輸入鍵\n" +" \\t\t橫向製表符\n" +" \\v\t縱向製表符\n" +" \\\\\t反斜線\n" +" \\0nnn\t以 NNN (八進位)為 ASCII 碼的字元。 NNN 可以是 0 到 3 個八進位數字\n" +" \\xHH\t以 HH (十六進位)為值的八進位字元。HH 可以是一個或兩個十六進位數字\n" +" \\uHHHH\t以十六進位 HHHH 為值的 Unicode 字元。\n" +" \t\tHHHH 可為一個到四個十六進位數字。\n" +" \\UHHHHHHHH 以十六進位 HHHHHHHH 為值的 Unicode 字元。\n" +" \t\tHHHHHHHH 可為一個到八個十六進位數字。\n" +" \n" +" 結束狀態:\n" +" 回傳成功除非有寫入錯誤發生。" + +#: builtins.c:597 msgid "" "Write arguments to the standard output.\n" " \n" @@ -2550,8 +3065,17 @@ msgid "" " Exit Status:\n" " Returns success unless a write error occurs." msgstr "" +"寫入參數至標準輸出裝置。\n" +" \n" +" 在標準輸出裝置上顯示 <參數> 和一個換列。\n" +" \n" +" 選項:\n" +" -n\t不附加換列\n" +" \n" +" 結束狀態:\n" +" 除非寫錯誤發生,否則回傳成功。" -#: builtins.c:586 +#: builtins.c:612 msgid "" "Enable and disable shell builtins.\n" " \n" @@ -2577,20 +3101,49 @@ msgid "" " Exit Status:\n" " Returns success unless NAME is not a shell builtin or an error occurs." msgstr "" +"啟用和停用 shell 內建命令。\n" +" \n" +" 啟用和停用 shell 的內建指令。停用使您能夠執行一個和內建\n" +" 指令同名磁碟上的指令,而無須使用完整的路徑名。\n" +" \n" +" \n" +" 選項:\n" +" -a\t印出一個內建的列表,並顯示其中每一個是否啟用\n" +" -n\t停用每一個 <名稱> 內建或者顯示一個被停用的內建列表\n" +" -p\t以可重用的格式印出一個內建的列表\n" +" -s\t僅印出 Posix「special」 內建的名稱\n" +" \n" +" 控制動態載入的選項:\n" +" -f\t從共享物件 <檔名> 檔案中載入 <名稱> 內建\n" +" -d\t刪除以 -f 選項載入的內建\n" +" \n" +" 不帶選項時,每一個 <名稱> 內建都被啟用。\n" +" \n" +" 如果要使用 $PATH 中找到的「test」而不是 shell 內建命令的版本,\n" +" 輸入「enable -n test」。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非 <名稱> 不是一個 shell 內建命令或者有錯誤發生。" -#: builtins.c:614 +#: builtins.c:640 msgid "" "Execute arguments as a shell command.\n" " \n" -" Combine ARGs into a single string, use the result as input to the " -"shell,\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 "" +"將參數做為 shell 指令執行。\n" +" \n" +" 將 <參數> 合成一個字串,用結果做為 shell 的輸入,\n" +" 並且執行得到的指令。\n" +" \n" +" 結束狀態:\n" +" 以指令的狀態結束,或者在指令為空的情況下回傳成功。" -#: builtins.c:626 +#: builtins.c:652 msgid "" "Parse option arguments.\n" " \n" @@ -2623,67 +3176,118 @@ msgid "" " 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" +" Getopts normally parses the positional parameters, but if arguments\n" +" are supplied as ARG values, 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 "" +"解析選項參數。\n" +" \n" +" Getopts 被 shell 過程用來將可定位的參數解析為選項。\n" +" \n" +" <選項字串> 字串包含待識別的選項字母。如果一個字母後面跟\n" +" 著分號,則該選項需要一個參數,這個參數應利用空格與選項分開。\n" +" \n" +" 每次呼叫時,getopts 會將下一個選項放到 shell 變數 $name\n" +" 中,如果 name 變數不存在則先將其初始化,而下一個待處\n" +" 理的參數序號放入 shell 變數 OPTIND 中。OPTIND 變數在每\n" +" 次 shell 或者 shell 指令稿啟動時都被初始化為 1。當一個選項要\n" +" 求有一個參數時,getopts 將參數放入 shell 變數 OPTARG\n" +" 中。\n" +" \n" +" getopts 有兩種通報錯誤的方法。如果 <選項字串> 變數的第\n" +" 一個字元是冒號,getopts 進入靜默錯誤回報模式。在這種模式\n" +" 下,不會輸出錯誤訊息。若看到了無效選項,getopts 將找到的\n" +" 選項字元放至 OPTARG 變數中。如果找不到必要引數,getopts\n" +" 會放一個「:」到 <名稱> 變數,並將 OPTARG 設為找到的選項字元\n" +" 。如果 getopts 不在靜默模式中,並且遇到了一個無效的選項,\n" +" getopts 會放置一個「?」到 <名稱> 變數,並取消設定 OPTARG。\n" +" 如果找不到必要引數,則會在 NAME 放置「?」、取消設定 OPTARG,\n" +" 並且會輸出診斷資訊。\n" +" \n" +" 如果 shell 變數 OPTERR 的值為 0,getopts 停止輸出錯誤訊息,\n" +" 即使 <選項字串> 變數的第一個字元不是冒號。OPTERR 的預設值為 1。\n" +" \n" +" Getopts 通常解析可定位的參數($0 - $9),不過如果提供了\n" +" 更多的參數,會改解析這些引數。\n" +" \n" +" 結束狀態:\n" +" 找到選項則回傳成功;如果選項提早結束,或者有錯誤發生,\n" +" 則回傳失敗。" -#: builtins.c:668 +#: builtins.c:694 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" +" 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" +" -c\texecute COMMAND with an empty environment\n" +" -l\tplace a dash in the zeroth argument to COMMAND\n" " \n" -" If the command cannot be executed, a non-interactive shell exits, " -"unless\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." +" Returns success unless COMMAND is not found or a redirection error occurs." msgstr "" +"使用指定指令取代 shell。\n" +" \n" +" 執行 COMMAND 指令,以指定的程式取代這個 shell。\n" +" ARGUMENTS 參數成為 COMMAND 指令的參數。如果\n" +" 沒有指定 COMMAND 指令,則任何的重定向在目前 shell 中生效。\n" +" \n" +" 選項:\n" +" -a 名稱\t做為第 0 個參數傳遞給 COMMAND 指令\n" +" -c\t\t在空環境中執行 COMMAND 指令\n" +" -l\t\t在 COMMAND 指令的第 0 個參數中加一個短線\n" +" \n" +" 如果指令不能被執行,則結束一個非互動式的 shell,除非\n" +" shell 選項「execfail」已經設定。\n" +" \n" +" 結束狀態:\n" +" 回傳成功除非 COMMAND 指令沒有找到或者出現一個重定向錯誤。" -#: builtins.c:689 +#: builtins.c:715 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 "" +"結束 shell。\n" +" \n" +" 以狀態 N 結束 shell。 如果 N 被省略,則結束狀態\n" +" 為最後一個執行指令的結束狀態。" -#: builtins.c:698 +#: builtins.c:724 msgid "" "Exit a login shell.\n" " \n" -" Exits a login shell with exit status N. Returns an error if not " -"executed\n" +" Exits a login shell with exit status N. Returns an error if not executed\n" " in a login shell." msgstr "" +"結束一個登入 shell。\n" +" \n" +" 以狀態 N 結束一個登入 shell。如果不在登入 shell 中執行,則\n" +" 回傳一個錯誤。" -#: builtins.c:708 +#: builtins.c:734 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" +" 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" +" -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" @@ -2697,11 +3301,33 @@ msgid "" " the last command.\n" " \n" " Exit Status:\n" -" Returns success or status of executed command; non-zero if an error " -"occurs." +" Returns success or status of executed command; non-zero if an error occurs." msgstr "" +"從歷史記錄列表中顯示或者執行指令。\n" +" \n" +" fc 被用於從歷史記錄列表中列出或者重新編輯並執行指令。\n" +" FIRST 和 LAST 變數可以是數字用於指定範圍,或者 FIRST 可以是\n" +" 字串,意味著以這個字串開頭的最近一個指令。\n" +" \n" +" \n" +" 選項:\n" +" -e ENAME\t選擇使用哪個編輯器。預設的是 FCEDIT,然後是 EDITOR,\n" +" \t\t然後是 vi\n" +" -l \t列出列而不編輯\n" +" -n\t列舉時省略列號\n" +" -r\t反轉列的順序(最新列在前)\n" +" \n" +" 用「fc -s [模式=取代 …] [指令]」的格式,COMMAND 指令會在 OLD=NEW\n" +" 取代之後被重新執行。\n" +" \n" +" r=「fc -s」是一個有用的別名,這樣的話輸入「r cc」會執行最後一個以「cc」\n" +" 開頭的指令,輸入「r」會重新執行最後一個指令。\n" +" \n" +" \n" +" 結束狀態:\n" +" 回傳成功,或者執行指令的狀態;如果錯誤發生則回傳非零。" -#: builtins.c:738 +#: builtins.c:764 msgid "" "Move job to the foreground.\n" " \n" @@ -2712,46 +3338,78 @@ msgid "" " Exit Status:\n" " Status of command placed in foreground, or failure if an error occurs." msgstr "" +"將工作移至前臺。\n" +" \n" +" 將以 JOB_SPEC 識別的工作放至前臺,使其成為\n" +" 目前工作。如果 JOB_SPEC 不存在,shell 觀念中的目前工作 \n" +" 將被使用。\n" +" \n" +" 結束狀態:\n" +" 放至前臺的指令狀態,或者當錯誤發生時為失敗。" -#: builtins.c:753 +#: builtins.c:779 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" +" 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" +" \n" +" 將 JOB_SPEC 識別的工作放至後臺,就像它們\n" +" 是帶「&」啟動的一樣。如果 JOB_SPEC 不存在,shell 觀念中的\n" +" 目前工作將會被使用。\n" +" \n" +" 結束狀態:\n" +" 回傳成功除非工作管理沒有啟用或者錯誤發生。" -#: builtins.c:767 +#: builtins.c:793 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" +" 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" +" -d\tforget the remembered location of each NAME\n" +" -l\tdisplay in a format that may be reused as input\n" +" -p pathname\tuse PATHNAME as the full pathname of NAME\n" +" -r\tforget all remembered locations\n" +" -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" +" NAME\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 "" +"記住或顯示程式位置。\n" +" \n" +" 確定並記住每一個指定 <名稱> 指令的完整路徑。\n" +" 如果不提供參數,則顯示已經記住指令的資訊。\n" +" \n" +" 選項:\n" +" -d\t\t忘記每一個已經記住的 <名稱> 的位置\n" +" -l\t\t以可做為輸入重用的格式顯示\n" +" -p pathname\t使用 pathname 路徑做為 <名稱> 指令的全路徑\n" +" -r\t\t忘記所有記住的位置\n" +" -t\t\t印出記住的每一個 <名稱> 的位置,如果指定了多個\n" +" \t\t<名稱>,則每個位置前面會加上相應的 <名稱> \n" +" \t\t\n" +" 參數:\n" +" <名稱>\t\t每個 <名稱> 會在 $PATH 路徑變數中被搜尋,並且新增到記住的指令\n" +" 列表中。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非 <名稱> 指令沒有找到或者使用了無效的選項。" -#: builtins.c:792 +#: builtins.c:818 msgid "" "Display information about builtin commands.\n" " \n" @@ -2763,17 +3421,33 @@ msgid "" " -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" +" \t\tPATTERN\n" " \n" " Arguments:\n" -" PATTERN\tPattern specifiying a help topic\n" +" PATTERN\tPattern specifying a help topic\n" " \n" " Exit Status:\n" -" Returns success unless PATTERN is not found or an invalid option is " -"given." +" Returns success unless PATTERN is not found or an invalid option is given." msgstr "" +"顯示內建指令的相關資訊。\n" +" \n" +" 顯示內建指令的簡略資訊。如果指定了 PATTERN 模式,\n" +" 給出所有符合 PATTERN 模式指令的詳細說明,否則印出\n" +" 一個說明主題列表\n" +" \n" +" 選項:\n" +" -d\t輸出每個主題的簡短描述\n" +" -m\t以偽 man 手冊的格式顯示使用方法\n" +" -s\t為每一個符合 PATTERN 模式的主題僅顯示一個用法\n" +" \t簡介\n" +" \n" +" 參數:\n" +" PATTERN\tPattern 模式指定一個說明主題\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非 PATTERN 模式沒有找到或者使用了無效選項。" -#: builtins.c:816 +#: builtins.c:842 msgid "" "Display or manipulate the history list.\n" " \n" @@ -2782,32 +3456,59 @@ msgid "" " \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" +" -d offset\tdelete the history entry at position OFFSET. Negative\n" +" \t\toffsets count back from the end of the history list\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" +" \t\tand append them to the history list\n" " -r\tread the history file and append the contents to the history\n" -" \tlist\n" +" \t\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" +" \t\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" +" 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" +" 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" +" 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 會僅列出最後的 N 個條目。\n" +" \n" +" 選項:\n" +" -c\t刪除所有條目從而清空歷史記錄列表。\n" +" -d 偏移量\t從指定位置刪除歷史記錄列表。負數偏移量會從歷史記錄列表\n" +" \t\t的尾端數回來。\n" +" \n" +" -a\t將目前工作階段的歷史記錄列追加到歷史記錄檔案中\n" +" -n\t從歷史記錄檔案中讀取所有未被讀取的列\n" +"\t\t並且將它們追加到歷史列表 -r\t讀取歷史記錄檔案並將內容追加到歷史記錄列表中\n" +" -w\t將目前歷史記錄寫入到歷史記錄檔案中,並追加到歷史記錄列表中\n" +" \n" +" -p\t對每一個 <參數> 展開歷史記錄並顯示結果,而不儲存到歷史記錄列表中\n" +" -s\t以單條紀錄追加 <參數> 到歷史記錄列表中\n" +" \n" +" 如果指定了 <檔名>,則它將被做為歷史記錄檔案。否則\n" +" 如果 $HISTFILE 變數有值的話使用之,不然使用 ~/.bash_history 檔案。\n" +" \n" +" 如果 $HISTTIMEFORMAT 變數被設定並且不為空,它的值會被用於\n" +" strftime(3) 的格式字串來印出與每一個顯示的歷史記錄條目想關聯的時\n" +" 間戳,否則不印出時間戳。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者發生錯誤。" -#: builtins.c:852 +#: builtins.c:879 msgid "" "Display status of jobs.\n" " \n" @@ -2816,8 +3517,8 @@ msgid "" " \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" +" -n\tlists only processes that have changed status since the last\n" +" \t\tnotification\n" " -p\tlists process IDs only\n" " -r\trestrict output to running jobs\n" " -s\trestrict output to stopped jobs\n" @@ -2830,8 +3531,26 @@ msgid "" " 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" +" \n" +" 列出活動的工作。JOBSPEC 限制僅輸出指定的工作。\n" +" 不帶選項時,所有活動工作的狀態都會顯示。\n" +" \n" +" 選項:\n" +" -l\t在正常資訊基礎上列出行程識別碼\n" +" -n\t僅列出上次通告之後變更了狀態的行程\n" +" -p\t僅列出行程識別碼\n" +" -r\t限制僅輸出執行中的工作\n" +" -s\t限制僅輸出停止的工作\n" +" \n" +" 如果使用了 -x 選項,<參數> 中的所有工作規格會被取代為該工作\n" +" 的行程群組首領的行程識別碼,然後執行 COMMAND 指令。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者有錯誤發生。\n" +" 如果使用 -x 選項,則回傳 COMMAND 指令的結束狀態。" -#: builtins.c:879 +#: builtins.c:906 msgid "" "Remove jobs from current shell.\n" " \n" @@ -2841,14 +3560,27 @@ msgid "" " 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" +" \t\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 "" +"從目前 shell 中刪除工作。\n" +" \n" +" 從活動工作表中刪除每一個 JOBSPEC 參數。不帶任何\n" +" JOBSPEC 參數時,shell 使用觀念中的目前工作。\n" +" \n" +" 選項:\n" +" -a\t如果不提供 JOBSPEC 參數,則刪除所有工作\n" +" -h\t識別每個 JOBSPEC 工作,從而當 shell 接收到 SIGHUP\n" +" \t訊號時不傳送 SIGHUP 給指定工作\n" +" -r\t僅刪除執行中的工作\n" +" \n" +" 結束狀態:\n" +" 回傳成功除非使用了無效的選項或者 JOBSPEC 規格。" -#: builtins.c:898 +#: builtins.c:925 msgid "" "Send a signal to a job.\n" " \n" @@ -2860,7 +3592,8 @@ msgid "" " -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" +" \t\tassumed to be signal numbers for which names should be listed\n" +" -L\tsynonym for -l\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" @@ -2869,16 +3602,32 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or an error occurs." msgstr "" +"向一個工作傳送一個訊號。\n" +" \n" +" 向以 PID 行程識別碼或者 JOBSPEC 工作規格指定的行程傳送一個以\n" +" SIGSPEC 訊號規格或 SIGNUM 訊號編號命名的訊號。如果沒有指定\n" +" SIGSPEC 或 SIGNUM,那麼假定傳送 SIGTERM 訊號。\n" +" \n" +" 選項:\n" +" -s sig\tSIG 是訊號名稱\n" +" -n sig\tSIG 是訊號編號\n" +" -l\t列出訊號名稱;如果參數後跟「-l」則被假設為訊號編號,\n" +" \t而相應的訊號名稱會被列出\n" +" \n" +" Kill 成為 shell 內建命令有兩個理由:它允許使用工作編號而不是行程識別碼,\n" +" 並且在可以建立的行程數上限達到時允許行程被砍除。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者有錯誤發生。" -#: builtins.c:921 +#: builtins.c:949 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" +" 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" @@ -2912,58 +3661,125 @@ msgid "" " rules above.\n" " \n" " Exit Status:\n" -" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.." -msgstr "" +" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." +msgstr "" +"求值算術表示式。\n" +" \n" +" 將每個 <參數> 做為算術表示式來求值。求值的計算以定寬的整\n" +" 數完成,不帶溢位檢測,不過除 0 是被置陷阱的並且會報一個錯\n" +" 誤。下列運算子被按照相同的算術優先順序組合。列表的順序按照\n" +" 優先順序從高至低。\n" +" \n" +" \n" +" \tid++, id--\t變數後置加,後置減\n" +" \t++id, --id\t變數前置加,前置減\n" +" \t-, +\t\t一元減法,一元加法\n" +" \t!, ~\t\t邏輯和位取反\n" +" \t**\t\t指數\n" +" \t*, /, %\t\t乘法,除法,取餘數\n" +" \t+, -\t\t增加,減少\n" +" \t<<, >>\t\t向左和向右按位移位\n" +" \t<=, >=, <, >\t比較\n" +" \t==, !=\t\t等於,不等於\n" +" \t&\t\t按位與\n" +" \t^\t\t按位異或\n" +" \t|\t\t按位或\n" +" \t&&\t\t邏輯與\n" +" \t||\t\t邏輯或\n" +" \texpr ? expr : expr\n" +" \t\t\t條件運算子\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\t指派\n" +" \n" +" Shell 變數允許做為運算元。表示式中的變數名稱會以值取代\n" +" (強制轉換為定寬的整數)。表示式中的變數不需要開啟整數屬性。\n" +" \n" +" 運算子按照優先順序進行求值。括號中的子表示式將被先求值,並可取代上述表示式規則。\n" +" \n" +" 結束狀態:\n" +" 如果最後一個 <參數> 求值為 0,則 let 回傳 1;否則 let 回傳 0。" -#: builtins.c:966 +#: builtins.c:994 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" +" 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" +" the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. By default, the backslash character escapes delimiter characters\n" +" and newline.\n" " \n" -" If no NAMEs are supplied, the line read is stored in the REPLY " -"variable.\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" +" -e\tuse Readline to obtain the line\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" +" \t\tfor a newline, but honor a delimiter if fewer than\n" +" \t\tNCHARS characters 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\n" +" \t\tdelimiter\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" +" -r\tdo not allow backslashes to escape any characters\n" +" -s\tdo not echo input coming from a terminal\n" +" -t timeout\ttime out and return failure if a complete line of\n" +" \t\tinput is not read within TIMEOUT seconds. The value of the\n" +" \t\tTMOUT variable is the default timeout. TIMEOUT may be a\n" +" \t\tfractional number. If TIMEOUT is 0, read returns\n" +" \t\timmediately, without trying to read any data, returning\n" +" \t\tsuccess only if input is available on the specified\n" +" \t\tfile descriptor. The exit status is greater than 128\n" +" \t\tif the timeout is exceeded\n" +" -u fd\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" +" (in which case it's greater than 128), a variable assignment error occurs,\n" " or an invalid file descriptor is supplied as the argument to -u." msgstr "" - -#: builtins.c:1009 +"從標準輸入讀取一列,並將其分為不同的區域。\n" +" \n" +" 從標準輸入讀取單獨的一列,或者如果使用了 -u 選項,從檔案描述元 FD 中讀取。\n" +" 該列會分割成區域,如同字詞分割一樣,並且第一個字詞被指派給第一個 NAME 變數,第二\n" +" 個字詞被指派給第二個 NAME 變數,如此繼續,直到剩下所有的字詞被指派給最後一個 <名稱>\n" +" 變數。只有 $IFS 變數中的字元被認做是字詞分隔符。預設情況下,反斜線字元會跳脫分割字元和換行。\n" +" \n" +" 如果沒有提供 NAME 變數,則讀取的列會存放在 REPLY 變數中。\n" +" \n" +" 選項:\n" +" -a array\t將字詞指派給 ARRAY 陣列變數的序列索引成員,從零開始。\n" +" -d delim\t持續讀取直到讀入 DELIM 變數中的第一個字元,而不是換列符\n" +" -e\t使用 Readline 取得列\n" +" -i text\t使用 TEXT 文字做為 Readline 的初始文字\n" +" -n nchars\t讀取 NCHARS 個字元之後回傳,而不是等到讀取換列符。\n" +" \t\t但如果遇到分隔符之前讀取了不足 NCHARS 個字元,分隔符仍然有效。\n" +" -N nchars\t在準確讀取了 NCHARS 個字元之後回傳,除非遇到檔案結束符或者讀取逾時,\n" +" \t\t任何的分隔符都被忽略\n" +" -p prompt\t在嘗試讀取之前輸出 PROMPT 提示符並且不帶\n" +" \t\t換列符\n" +" -r\t不允許反斜線逸出任何字元\n" +" -s\t不顯示終端的任何輸入\n" +" -t timeout\t如果在 TIMEOUT 秒內沒有讀取一個完整的列則逾時並且回傳失敗。\n" +" \t\tTMOUT 變數的值是預設逾時時間。\n" +" \t\tTIMEOUT 可以是小數。如果 TIMEOUT 是 0,則立即回傳而不嘗試\n" +" \t\t讀取任何資料,如果指定的檔案描述符有輸入,則回傳成功\n" +" \t\t如果超過了逾時時間,則回傳狀態碼大於 128\n" +" -u fd\t從檔案描述符 FD 中讀取,而不是標準輸入\n" +" \n" +" 結束狀態:\n" +" 回傳碼為 0,除非遇到了檔案結束符、讀取逾時,或將無效的檔案\n" +" 描述符,作為參數傳向 -u 選項。" + +#: builtins.c:1042 msgid "" "Return from a shell function.\n" " \n" @@ -2974,8 +3790,16 @@ msgid "" " Exit Status:\n" " Returns N, or failure if the shell is not executing a function or script." msgstr "" +"從一個 shell 函數回傳。\n" +" \n" +" 使一個函數或者被引用的指令稿以指定的回傳值 N 結束。\n" +" 如果 N 被省略,則回傳狀態就是\n" +" 函數或指令稿中的最後一個執行指令的狀態。\n" +" \n" +" 結束狀態:\n" +" 回傳 N,或者如果 shell 不在執行一個函數或引用指令稿時,失敗。" -#: builtins.c:1022 +#: builtins.c:1055 msgid "" "Set or unset values of shell options and positional parameters.\n" " \n" @@ -3018,8 +3842,7 @@ msgid "" " 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" +" 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" @@ -3041,9 +3864,12 @@ msgid "" " -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" +" -P If set, do not resolve 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" +" -T If set, the DEBUG and RETURN traps are inherited by shell functions.\n" +" -- Assign any remaining arguments to the positional parameters.\n" +" If there are no remaining arguments, the positional parameters\n" +" are unset.\n" " - Assign any remaining arguments to the positional parameters.\n" " The -x and -v options are turned off.\n" " \n" @@ -3056,8 +3882,83 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given." msgstr "" - -#: builtins.c:1104 +"設定或取消設定 shell 選項和位置參數的值。\n" +" \n" +" 變更 shell 選項和位置參數的值,或者顯示 shell 變數的\n" +" 名稱和值。\n" +" \n" +" 選項:\n" +" -a 標記修改或者建立的變數為匯出。\n" +" -b 立即通告工作終止。\n" +" -e 如果一個指令以非零狀態結束,則立即結束。\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 shell 讀取檔案結束符時不會結束\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" +" 或者當所有指令都回傳零時也為零。\n" +" posix 變更預設時和 Posix 標準不同的 bash 行為\n" +" 以符合標準\n" +" privileged 與 -p 相同\n" +" verbose 與 -v 相同\n" +" vi 使用 vi 風格的列編輯介面\n" +" xtrace 與 -x 相同\n" +" -p 無論何時當真實的有效使用者身分不符合時開啟。\n" +" 停用對 $ENV 檔案的處理以及匯入 shell 函數。\n" +" 關閉此選項會導致有效的使用者編號和群組編號設定\n" +" 為真實的使用者編號和群組編號\n" +" -t 讀取並執行一個指令之後結束。\n" +" -u 取代時將為設定的變數當做錯誤對待。\n" +" -v 讀取 shell 輸入列時將它們印出。\n" +" -x 執行指令時印出它們以及參數。\n" +" -B shell 將執行大括號擴充套件。\n" +" -C 設定之後禁止以重定向輸出的方式覆蓋常\n" +" 規檔案。\n" +" -E 設定之後 ERR 陷阱會被 shell 函數繼承。\n" +" -H 啟用 ! 風格的歷史記錄取代。當 shell 是互動式的\n" +" 時候這個識別位預設開啟。\n" +" -P 設定之後類似 cd 的會變更目前目錄的指令嗎\n" +" 追蹤符號連結。\n" +" -T 設定之後 DEBUG 和 RETURN 陷阱會被 shell 函數繼承。\n" +" - 任何剩餘的參數會被指派給位置參數。\n" +" -x 和 -v 選項已關閉。\n" +" \n" +" 使用 + 而不是 - 會使標誌位被關閉。標誌位也可以在\n" +" shell 被啟動時使用。目前的標誌位設定可以在 $- 變\n" +" 量中找到。剩餘的 <參數> 是位置參數並且是按照\n" +" $1,$2,.。$n 的順序被指派的。如果沒有指定 <參數>\n" +" 參數,則印出所有的 shell 變數。\n" +" \n" +" 結束狀態:\n" +" 回傳成功除非使用了無效的參數。" + +#: builtins.c:1140 msgid "" "Unset values and attributes of shell variables and functions.\n" " \n" @@ -3066,9 +3967,10 @@ msgid "" " Options:\n" " -f\ttreat each NAME as a shell function\n" " -v\ttreat each NAME as a shell variable\n" +" -n\ttreat each NAME as a name reference and unset the variable itself\n" +" \t\trather than the variable it references\n" " \n" -" Without options, unset first tries to unset a variable, and if that " -"fails,\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" @@ -3076,14 +3978,28 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or a NAME is read-only." msgstr "" +"取消設定 shell 變數和函數的值和屬性。\n" +" \n" +" 對每一個 <名稱>,刪除對應的變數或函數。\n" +" \n" +" 選項:\n" +" -f\t將每個 <名稱> 視為函數\n" +" -v\t將每個 <名稱> 視為變數\n" +" -n\t將每個 <名稱> 視為名稱引用,只取消其本身而非其指向的變數\n" +" \n" +" 不帶選項時,unset 首先嘗試取消設定一個變數,如果失敗,再嘗試取消設定一個函數。\n" +" \n" +" 某些變數不可以被取消設定;參見「readonly」。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者 NAME 名稱為唯讀。" -#: builtins.c:1124 +#: builtins.c:1162 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" +" executed commands. If VALUE is supplied, assign VALUE before exporting.\n" " \n" " Options:\n" " -f\trefer to shell functions\n" @@ -3095,8 +4011,22 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is given or NAME is invalid." msgstr "" +"為 shell 變數設定匯出屬性。\n" +" \n" +" 標記每個 <名稱> 為自動匯出到後續指令執行的環境。如果提供了 VALUE\n" +" 則匯出前將 VALUE 做為指派。\n" +" \n" +" 選項:\n" +" -f\t指 shell 函數\n" +" -n\t刪除每個 <名稱> 的匯出屬性\n" +" -p\t顯示所有匯出的變數和函數的列表\n" +" \n" +" 「--」的參數停用進一步的選項處理。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者 <名稱>。" -#: builtins.c:1143 +#: builtins.c:1181 msgid "" "Mark shell variables as unchangeable.\n" " \n" @@ -3108,15 +4038,31 @@ msgid "" " -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" +" -p\tdisplay a list of all readonly variables or functions,\n" +" \t\tdepending on whether or not the -f option is given\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 變數為不可變更。\n" +" \n" +" 標記每一個 <名稱> 為唯讀;這些 <名稱> 變數的值將不可以被後續的指派\n" +" 操作所變更。如果提供了 VALUE,則在標記為唯讀之前將 VALUE 值指派給變數。\n" +" \n" +" 選項:\n" +" -a\t指索引陣列變數\n" +" -A\t指關聯陣列變數\n" +" -f\t指 shell 函數\n" +" -p\t顯示唯讀變數或函數列表,取決於是否提供了 -f 選項\n" +" \n" +" 「--」的參數停用進一步的選項處理。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者 <名稱>。" -#: builtins.c:1164 +#: builtins.c:1203 msgid "" "Shift positional parameters.\n" " \n" @@ -3126,8 +4072,15 @@ msgid "" " Exit Status:\n" " Returns success unless N is negative or greater than $#." msgstr "" +"移位位置參數。\n" +" \n" +" 重新命名位置參數 $N+1、$N+2 … 到 $1、$2 … 如果沒有指定 N,\n" +" 則假設為 1。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非 N 為負或者大於 $#。" -#: builtins.c:1176 builtins.c:1191 +#: builtins.c:1215 builtins.c:1230 msgid "" "Execute commands from a file in the current shell.\n" " \n" @@ -3140,8 +4093,16 @@ msgid "" " Returns the status of the last command executed in FILENAME; fails if\n" " FILENAME cannot be read." msgstr "" +"在目前 shell 中執行一個檔案中的指令。\n" +" \n" +" 在目前 shell 中讀取並執行 <檔名> 檔案中的指令。$PATH 變數中的\n" +" 條目被用於尋找包含 <檔名> 檔案的目錄。如果提供了任何的 <參數>\n" +" 參數,則它們將成為 <檔名> 檔案執行時的位置參數。\n" +" \n" +" 結束狀態:\n" +" 回傳 <檔名> 檔案中最後一個指令的狀態;如果 <檔名> 檔案不可讀則失敗。" -#: builtins.c:1207 +#: builtins.c:1246 msgid "" "Suspend shell execution.\n" " \n" @@ -3154,15 +4115,28 @@ msgid "" " Exit Status:\n" " Returns success unless job control is not enabled or an error occurs." msgstr "" +"暫停 shell 執行。\n" +" \n" +" 暫停 shell 的執行直到收到 SIGCONT 訊號。\n" +" 登入 shell 不可以被暫停,除非強制執行。\n" +" \n" +" 選項:\n" +" -f\t強制暫停,即使是登入 shell。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非沒有啟用工作控制或者有錯誤發生。" -#: builtins.c:1223 +#: builtins.c:1262 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" +" are string operators and numeric comparison operators as well.\n" +" \n" +" The behavior of test depends on the number of arguments. Read the\n" +" bash manual page for the complete specification.\n" " \n" " File operators:\n" " \n" @@ -3186,8 +4160,7 @@ msgid "" " -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 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" @@ -3208,14 +4181,16 @@ msgid "" " STRING1 != STRING2\n" " True if the strings are not equal.\n" " STRING1 < STRING2\n" -" True if STRING1 sorts before STRING2 " -"lexicographically.\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" +" -v VAR True if the shell variable VAR is set.\n" +" -R VAR True if the shell variable VAR is set and is a name\n" +" reference.\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" @@ -3231,33 +4206,113 @@ msgid "" " Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n" " false or an invalid argument is given." msgstr "" +"對條件表示式進行求值。\n" +" \n" +" 根據 EXPR 表示式的求值以狀態 0 (真) 或 1 (偽) 結束。\n" +" 表示式可以是一元或者二元的。一元表示式通常用於檢測\n" +" 檔案狀態。同時還有字串運算子和數字比較運算子。\n" +" \n" +" 檔案運算子:\n" +" \n" +" -a 檔案 如果檔案存在則為真。\n" +" -b 檔案 如果檔案為區塊特殊檔案則為真。\n" +" -c 檔案 如果檔案為字元特殊檔案則為真。\n" +" -d 檔案 如果檔案為目錄則為真。\n" +" -e 檔案 如果檔案存在則為真。\n" +" -f 檔案 如果檔案存在且為一般檔案則為真。\n" +" -g 檔案 如果檔案的群組屬性設定開啟則為真。\n" +" -h 檔案 如果檔案為符號連結則為真。\n" +" -L 檔案 如果檔案為符號連結則為真。\n" +" -k 檔案 如果檔案的黏著位元已設定則為真。\n" +" -p 檔案 如果檔案為命名管道則為真。\n" +" -r 檔案 如果檔案對於您是可讀的則為真。\n" +" -s 檔案 如果檔案存在且不為空則為真。\n" +" -S 檔案 如果檔案是通訊端則為真。\n" +" -t 檔案描述符 如果檔案描述符在終端上開啟則為真。\n" +" -u 檔案 如果檔案的使用者數列設定開啟則為真。\n" +" -w 檔案 如果檔案對您是可寫的則為真\n" +" -x 檔案 如果檔案對您是可執行的則為真。\n" +" -O 檔案 如果檔案是您所有的則為真。\n" +" -G 檔案 如果檔案是您的群組所有則為真。\n" +" -N 檔案 如果檔案上次被讀取之後修改過則為真。\n" +" \n" +" FILE1 -nt FILE2 如果 file1 檔案新於 file2 檔案則為真(根據\n" +" 修改日期)。\n" +" \n" +" FILE1 -ot FILE2 如果 file1 檔案舊於 file2 檔案則為真。\n" +" \n" +" FILE1 -ef FILE2 如果 file1 檔案是 file2 檔案的硬式連結則為真。\n" +" \n" +" 字串運算子\n" +" \n" +" -z 字串 如果字串為空則為真。\n" +" \n" +" -n 字串\n" +" 字串 如果字串不為空則為真。\n" +" \n" +" STRING1 = STRING2\n" +" 如果 string1 和 string2 字串相同則為真。\n" +" STRING1 != STRING2\n" +" 如果 string1 和 string2 字串不相同則為真。\n" +" STRING1 < STRING2\n" +" 如果按字典排序 string1 在 string2 串之前則為真。\n" +" STRING1 > STRING2\n" +" 如果按字典排序 string1 在 string2 串之前則為真。\n" +" \n" +" 其他運算子:\n" +" \n" +" -o 選項 如果指定 shell 選項啟用則為真。\n" +" -v VAR\t 如果指定 Shell 變數 VAR 已指派則為真。\n" +" -R VAR\t 如果指定 Shell 變數 VAR 已指派且為名稱引用則為真。\n" +" ! EXPR 如果表示式 expr 為假則為真。\n" +" EXPR1 -a EXPR2 如果 expr1 和 expr2 都為真則為真。\n" +" EXPR1 -o EXPR2 如果 expr1 和 expr2 有一個為真則為真。\n" +" \n" +" arg1 OP arg2 算術測試。OP 運算子可以是 -eq、-ne、\n" +" -lt、-le、-gt、或 -ge 之一。\n" +" \n" +" 二元算術運算回傳真,如果 ARG1 參數等於、不等於、\n" +" 小於、小於等於、大於、或者大於等於 ARG2 參數。\n" +" \n" +" 結束狀態:\n" +" 如果 EXPR 表示式求值為真則回傳成功;如果 EXPR 表示式求值\n" +" 為假或者使用了無效的參數則回傳失敗。" -#: builtins.c:1299 +#: builtins.c:1344 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 "" +"求值條件表示式。\n" +" \n" +" 是內建指令「test」的同義詞,但是最後一個參數必須是\n" +" 字元「]」,以符合起始的「[」。" -#: builtins.c:1308 +#: builtins.c:1353 msgid "" "Display process times.\n" " \n" -" Prints the accumulated user and system times for the shell and all of " -"its\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" +" \n" +" 印出 shell 及其所有子行程的累計使用者空間和\n" +" 系統空間執行時間。\n" +" \n" +" 結束狀態:\n" +" 一律成功。" -#: builtins.c:1320 +#: builtins.c:1365 msgid "" "Trap signals and other events.\n" " \n" -" Defines and activates handlers to be run when the shell receives " -"signals\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" @@ -3266,29 +4321,55 @@ msgid "" " 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" +" 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. If\n" +" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n" +" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n" +" of ERR means to execute ARG each time a command's failure would cause the\n" +" shell to exit when the -e option is enabled.\n" " \n" -" If no arguments are supplied, trap prints the list of commands " -"associated\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 or a signal " -"number.\n" +" Each SIGNAL_SPEC is either a signal name in 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." +" Returns success unless a SIGSPEC is invalid or an invalid option is given." msgstr "" +"對訊號和其他事件設陷阱。\n" +" \n" +" 定義一個處理器,在 shell 接收到訊號和其他條件下執行。\n" +" \n" +" <參數> 是當 shell 接收到 SIGNAL_SPEC 訊號時讀取和執行的指令。\n" +" 如果沒有指定 <參數> (並且只給出一個 SIGNAL_SPEC 訊號) 或者\n" +" <參數> 為\n" +" 「-」,每一個指定的參數會被重設為原始值。如果 <參數> 是一個空串,則每一個\n" +" SIGNAL_SPEC 訊號會被 shell 和它啟動的指令忽略。\n" +" \n" +" 如果一個 SIGNAL_SPEC 訊號是 EXIT (0),則 <參數> 指令會在 shell 結束時被\n" +" 執行。如果一個 SIGNAL_SPEC 訊號是 DEBUG,則 <參數> 指令會在每一個簡單命\n" +" 令之前執行。\n" +" \n" +" 如果不提供參數,trap 印出列表顯示每一個與每一個訊號相關聯的指令。\n" +" \n" +" 選項:\n" +" -l\t印出一個訊號名稱和它們對應的編號列表\n" +" -p\t印出與每個 SIGNAL_SPEC 訊號相關聯的陷阱指令\n" +" \n" +" 每一個 SIGNAL_SPEC 訊號可以是 中的訊號名稱或者訊號編號。\n" +" 訊號名稱大小寫相符且可以使用 SIG 字首。訊號可用「kill - 訊號 $$」\n" +" 傳送給 shell。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者 SIGSPEC。" -#: builtins.c:1352 +#: builtins.c:1401 msgid "" "Display information about command type.\n" " \n" @@ -3297,33 +4378,52 @@ msgid "" " \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" +" \t\tincludes aliases, builtins, and functions, if and only if\n" +" \t\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" +" \t\tbuiltin, or function, and returns the name of the disk file\n" +" \t\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\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" +" \t\t`function', `builtin', `file' or `', if NAME is an alias,\n" +" \t\tshell reserved word, shell function, shell builtin, disk file,\n" +" \t\tor not found, 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." +" Returns success if all of the NAMEs are found; fails if any are not found." msgstr "" +"顯示指令類型的資訊。\n" +" \n" +" 對於每一個 NAME,指示用作指令名稱時的解釋方式。\n" +" \n" +" 選項:\n" +" -a\t顯示所有包含名為 NAME 的可執行檔案的位置。\n" +" \t包括別名、內建和函數(若且唯若 “-p” 選項未使用時)。\n" +" -f\t抑制 shell 函數查詢\n" +" -P\t為每個 NAME 強制進行 PATH 路徑搜尋,即使它是別名、\n" +" \t內建或函數,並回傳將被執行的磁碟檔案名稱。\n" +" -p\t回傳將被執行的磁碟上檔案的名稱,或者在 “type -t NAME”\n" +" \t回傳值不是 “file” 時,不回傳任何值。\n" +" -t\t回傳 “alias”、“keyword”、“function”、“builtin”、“file”\n" +" \t或 “”,對應到 NAME 是別名、shell 保留字、shell 函數、\n" +" \t內建命令、磁碟檔案或找不到檔案。\n" +" \n" +" 引數:\n" +" NAME\t將要解析的指令。\n" +" \n" +" 結束狀態:\n" +" 若找到所有的 NAME,則回傳成功;有任何一個沒找到,則回傳失敗。" -#: builtins.c:1383 +#: builtins.c:1432 msgid "" "Modify shell resource limits.\n" " \n" -" Provides control over the resources available to the shell and " -"processes\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" @@ -3336,6 +4436,7 @@ msgid "" " -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" +" -k\tthe maximum number of kqueues allocated for this process\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" @@ -3347,6 +4448,11 @@ msgid "" " -u\tthe maximum number of user processes\n" " -v\tthe size of virtual memory\n" " -x\tthe maximum number of file locks\n" +" -P\tthe maximum number of pseudoterminals\n" +" -R\tthe maximum time a real-time process can run before blocking\n" +" -T\tthe maximum number of threads\n" +" \n" +" Not all options are available on all platforms.\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" @@ -3361,8 +4467,50 @@ msgid "" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" - -#: builtins.c:1428 +"修改 shell 資源限制。\n" +" \n" +" 在允許此類控制的系統上,提供對 shell 及其建立的行程,\n" +" 可用資源的控制。\n" +" \n" +" 選項:\n" +" -S\t使用彈性(「soft」)資源限制\n" +" -H\t使用固定(「hard」)資源限制\n" +" -a\t回報目前的所有限制\n" +" -b\t通訊端快取大小\n" +" -c\t建立之核心檔案的最大大小\n" +" -d\t一個行程資料區的最大大小\n" +" -e\t最高的排程優先順序(「nice」)\n" +" -f\tshell 及其子行程可寫入的最大檔案大小\n" +" -i\t最多可以暫停的信號數\n" +" -k\t為本行程分配之最大 kqueues 數量\n" +" -l\t一個行程可能鎖定的最大記憶體尺寸\n" +" -m\t最大的常駐記憶體大小\n" +" -n\t最多可開啟之檔案描述元個數\n" +" -p\t管道緩衝區大小\n" +" -q\tPOSIX 訊息佇列的最大位元組數\n" +" -r\t即時排程的最大優先順序\n" +" -s\t最大堆疊尺寸\n" +" -t\t最多可用的 CPU 時間,以秒為單位\n" +" -u\t最大使用者行程數\n" +" -v\t虛擬記憶體尺寸\n" +" -x\t最大的檔案鎖數量\n" +" -P\t最大可開啟的偽終端數量\n" +" -R\t一個即時執行緒在堵塞前可執行的最長時間\n" +" -T\t最大執行緒數量\n" +" \n" +" 並非所有選項在所有系統上可用。\n" +" \n" +" 如果有指定 LIMIT,則這個變數是指定資源的新數值;特殊 LIMIT 數值\n" +" 「soft」、「hard」和「unlimited」,分別表示目前的彈性限制、固定限制和\n" +" 無限制。若未指定,則輸出指定資源的目前限制值,不傳入選項則假定為 -f\n" +" \n" +" 取值都是 1024 位元組為單位,除了 -t 以秒為單位、-p 以 512 位元組遞增、\n" +" -u 為無單位的行程數量。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者錯誤發生。" + +#: builtins.c:1483 msgid "" "Display or set file mode mask.\n" " \n" @@ -3379,39 +4527,91 @@ msgid "" " Exit Status:\n" " Returns success unless MODE is invalid or an invalid option is given." msgstr "" +"顯示或設定檔案模式遮罩。\n" +" \n" +" 設定使用者檔案建立遮罩為 MODE 模式。如果省略了 MODE,則\n" +" 印出目前遮罩的值。\n" +" \n" +" 如果 MODE 模式以數字開頭,則被當做八進位數字解析;否則是一個\n" +" chmod(1) 可接收的符號模式串。\n" +" \n" +" 選項:\n" +" -p\t如果省略 MDOE 模式,以可重用為輸入的格式輸入\n" +" -S\t以符號形式輸出,否則以八進位數字格式輸出\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的 MODE 模式或者選項。" -#: builtins.c:1448 +#: builtins.c:1503 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" +" Waits for each process identified by an 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" +" status is zero. If ID is a job specification, waits for all processes\n" +" in that job's pipeline.\n" +" \n" +" If the -n option is supplied, waits for a single job from the list of IDs,\n" +" or, if no IDs are supplied, for the next job to complete and returns its\n" +" exit status.\n" +" \n" +" If the -p option is supplied, the process or job identifier of the job\n" +" for which the exit status is returned is assigned to the variable VAR\n" +" named by the option argument. The variable will be unset initially, before\n" +" any assignment. This is useful only when the -n option is supplied.\n" +" \n" +" If the -f option is supplied, and job control is enabled, waits for the\n" +" specified ID to terminate, instead of waiting for it to change status.\n" " \n" " Exit Status:\n" -" Returns the status of ID; fails if ID is invalid or an invalid option " -"is\n" -" given." +" Returns the status of the last ID; fails if ID is invalid or an invalid\n" +" option is given, or if -n is supplied and the shell has no unwaited-for\n" +" children." msgstr "" +"等待工作完成並回傳結束狀態。\n" +" \n" +" 等待以 ID 編號識別的行程-其中 ID 可以是行程編號或者工作規格—\n" +" 並回報其終止狀態。若未指定 ID,則等待所有的目前活躍子行程,\n" +" 並設定回傳狀態為 0。如果 ID 是工作規格,則等待工作管線中的\n" +" 所有行程。\n" +" \n" +" 若指定了 -n 選項,則等待 ID 清單中的單一個工作;若未指定,則\n" +" 等待下一個工作完成,並回傳其結束狀態。\n" +" \n" +" 如果指定了 -p 選項,則會將選項引數中命名的 VAR 變數,指定\n" +" 為回傳結束狀態之工作的行程或工作識別子。這個變數在指定前,\n" +" 會先進行 unset。這個僅在指定 -n 選項時有幫助。\n" +"\n" +" 如果指定了 -f 選項且有啟用工作管理,則等待指定 ID 終止,\n" +" 而非等待其變更狀態。\n" +" \n" +" 結束狀態:\n" +" 回傳最後一個 ID 行程的狀態;如果 ID 或指定之選項無效;\n" +" 或有指定 -n,shell 卻沒有要不等待 (unwaited) 的子行程,\n" +" 則回傳失敗。" -#: builtins.c:1466 +#: builtins.c:1534 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" +" Waits for each process specified by a PID and reports its termination status.\n" +" If PID is not given, waits for all currently active child processes,\n" +" and the return status 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." +" Returns the status of the last PID; fails if PID is invalid or an invalid\n" +" option is given." msgstr "" +"等待行程完成並且回傳結束狀態。\n" +" \n" +" 等待指定行程並通報它的終止狀態。如果沒有提供 PID,則目前所有的活躍\n" +" 子行程都會被等待,並且回傳碼為零。PID 必須為行程識別碼。\n" +" \n" +" 結束狀態:\n" +" 回傳行程 ID 的狀態;如果 PID 是無效的行程識別碼或者指定了無效的選項則失敗。" -#: builtins.c:1481 +#: builtins.c:1549 msgid "" "Execute commands for each member in a list.\n" " \n" @@ -3423,8 +4623,16 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"為列表中的每個成員執行指令。\n" +" \n" +" 「for」迴圈為列表中的每個成員執行一系列的指令。如果沒有\n" +" 「in WORDS ...;」則假定使用「in \"$@\"」。對於 WORDS 中的每\n" +" 個元素,<名稱> 被設定為該元素,並且執行 <指令>。\n" +" \n" +" 結束狀態:\n" +" 回傳最後執行指令的狀態。" -#: builtins.c:1495 +#: builtins.c:1563 msgid "" "Arithmetic for loop.\n" " \n" @@ -3440,8 +4648,21 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"算術 for 迴圈。\n" +" \n" +" 等價於\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\t<指令>\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1、EXP2 和 EXP3 都是算術表示式。如果省略任何表示式,\n" +" 則等同於使用了求值為 1 的表示式。\n" +" \n" +" 結束狀態:\n" +" 回傳最後執行指令的狀態。" -#: builtins.c:1513 +#: builtins.c:1581 msgid "" "Select words from a list and execute commands.\n" " \n" @@ -3460,8 +4681,21 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"從列表中選取詞並且執行指令。\n" +" \n" +" WORDS 變數被展開,產生一個字詞的列表。展開的字詞集合被印出\n" +" 在標準錯誤輸出裝置上,每個以一個數字做字首。如果沒有「in WORDS」\n" +" 則假定使用「in \"$@\"」。PS3 提示符會被顯示並且從標準輸入讀入一列\n" +" 如果該列由被顯示字詞對應的數字組成,則 <名稱> 變數被設定為相應\n" +" 的字詞。如果列為空,則 WORDS 變數和提示符被重新顯示。如果讀取了\n" +" 檔案結束符,則指令完成。讀入任何其他的值會導致 <名稱> 變數被設定\n" +" 為空。讀入的列被存放在變數 REPLY 中。<指令> 在每次選擇\n" +" 之後執行直到執行一個 break 指令。\n" +" \n" +" 結束狀態:\n" +" 回傳最後一個執行指令的狀態。" -#: builtins.c:1534 +#: builtins.c:1602 msgid "" "Report time consumed by pipeline's execution.\n" " \n" @@ -3476,8 +4710,20 @@ msgid "" " Exit Status:\n" " The return status is the return status of PIPELINE." msgstr "" +"通報管道執行的消耗時間。\n" +" \n" +" 執行 PIPELINE 並且印出 PIPELINE 終止時實際時間、使用者 CPU 時間和系統\n" +" CPU 時間的總結。\n" +" \n" +" 選項:\n" +" -p\t用可移植的 POSIX 格式印出用時總結。\n" +" \n" +" TIMEFORMAT 變數的值被做為輸出格式。\n" +" \n" +" 結束狀態:\n" +" 回傳狀態即 PIPELINE 的回傳狀態。" -#: builtins.c:1551 +#: builtins.c:1619 msgid "" "Execute commands based on pattern matching.\n" " \n" @@ -3487,51 +4733,77 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"基於模式符合來執行指令。\n" +" \n" +" 基於 PATTERN 模式符合的字詞 WORD,有選擇的執行 <指令>。\n" +" 「|」用於分隔多個模式。\n" +" \n" +" 結束狀態:\n" +" 回傳最後一個執行指令的狀態。" -#: builtins.c:1563 +#: builtins.c:1631 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" +" 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" +" `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 "" +"根據條件執行指令。\n" +" \n" +" 「if <指令>」列表被執行。如果結束狀態為零,則執行「then <指令>」\n" +" 列表。否則按順序執行每個「elif <指令>」列表,並且如果它的結束狀態為\n" +" 零,則執行對應的「then <指令>」列表並且 if 指令終止。否則如果存在的\n" +" 情況下,執行「else <指令>」列表。整個結構的結束狀態是最後一個執行\n" +" 指令的狀態,或者如果沒有條件測試為真的話,則為零。\n" +" \n" +" 結束狀態:\n" +" 回傳最後一個執行指令的狀態。" -#: builtins.c:1580 +#: builtins.c:1648 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status of zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"只要測試成功即執行指令。\n" +" \n" +" 只要 COMMANDS 中的最後一條命令回傳了結束狀態碼 0,\n" +" 便會展開並執行 COMMANDS-2。\n" +" \n" +" 結束狀態:\n" +" 回傳最後一個執行指令的狀態。" -#: builtins.c:1592 +#: builtins.c:1660 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" +" Expand and execute COMMANDS-2 as long as the final command in COMMANDS has\n" +" an exit status which is not zero.\n" " \n" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"只要測試不成功即執行指令。\n" +" \n" +" 只要 COMMANDS 中的最後一條命令回傳了不是 0 的結束狀態碼,\n" +" 便會展開並執行 COMMANDS-2。\n" +" \n" +" 結束狀態:\n" +" 回傳最後一個執行指令的狀態。" -#: builtins.c:1604 +#: builtins.c:1672 msgid "" "Create a coprocess named NAME.\n" " \n" @@ -3541,24 +4813,41 @@ msgid "" " The default NAME is \"COPROC\".\n" " \n" " Exit Status:\n" -" Returns the exit status of COMMAND." +" The coproc command returns an exit status of 0." msgstr "" +"建立一個以 <名稱> 為名的副行程。\n" +" \n" +" 非同步執行 <指令>,在執行 shell 中的陣列變數 <名稱>\n" +" 的 0 號和 1 號元素做為檔案描述符,以一個管道連接指令\n" +" 分別做為指令的標準輸出和輸入裝置。\n" +" 預設的 <名稱> 是「COPROC」。\n" +" \n" +" 結束狀態:\n" +" coprc 指令回傳離開代碼 0。" -#: builtins.c:1618 +#: builtins.c:1686 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" +" 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 "" +"定義 shell 函數。\n" +" \n" +" 建立一個以 <名稱> 為名的 shell 函數。當做為一個簡單的指令啟用時,\n" +" <名稱> 函數執行呼叫 shell 語境中的 COMMANDs 指令。當 <名稱>\n" +" 被啟用時,參數做為 $1…$n 被傳遞給函數,函數的名字儲存在變數\n" +" $FUNCNAME 中。\n" +" \n" +" 結束狀態:\n" +" 回傳成功除非 <名稱> 為唯讀。" -#: builtins.c:1632 +#: builtins.c:1700 msgid "" "Group commands as a unit.\n" " \n" @@ -3568,8 +4857,15 @@ msgid "" " Exit Status:\n" " Returns the status of the last command executed." msgstr "" +"將指令組合為一個單元。\n" +" \n" +" 執行群組中的指令集合。這是對整個指令集合\n" +" 做重定向的方法之一。\n" +" \n" +" 結束狀態:\n" +" 回傳最後一個執行指令的狀態。" -#: builtins.c:1644 +#: builtins.c:1712 msgid "" "Resume job in foreground.\n" " \n" @@ -3582,28 +4878,42 @@ msgid "" " Exit Status:\n" " Returns the status of the resumed job." msgstr "" +"在前臺繼續工作\n" +" \n" +" 對於 JOB_SPEC 參數來說和「fg」指令等同。繼續一個\n" +" 停止的或者後臺工作。JOB_SPEC 可以指定一個工作\n" +" 名字或工作號。在 JOB_SPEC 後加上一個「&」將會把\n" +" 工作放至後臺,就像工作規格被做為「bg」指令的參數\n" +" 執行一樣。\n" +" \n" +" 結束狀態:\n" +" 回傳被繼續的工作狀態。" -#: builtins.c:1659 +#: builtins.c:1727 msgid "" "Evaluate arithmetic expression.\n" " \n" " The EXPRESSION is evaluated according to the rules for arithmetic\n" -" evaluation. Equivalent to \"let EXPRESSION\".\n" +" evaluation. Equivalent to `let \"EXPRESSION\"'.\n" " \n" " Exit Status:\n" " Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise." msgstr "" +"求值算術表示式。\n" +" \n" +" <表示式> 按照算術法則進行求值。\n" +" 等價於「let 表示式」。\n" +" \n" +" 結束狀態:\n" +" 如果表示式求值為 0 則回傳 1;否則回傳 0。" -#: builtins.c:1671 +#: builtins.c:1739 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" +" 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" @@ -3621,8 +4931,27 @@ msgid "" " Exit Status:\n" " 0 or 1 depending on value of EXPRESSION." msgstr "" +"執行條件指令。\n" +" \n" +" 根據條件表示式 EXPRESSION 的求值回傳狀態 0 或 1。表示式按照\n" +" 「test」內建的相同條件組成,或者可以有下列運算子連接而成:\n" +" \n" +" ( EXPRESSION )\t回傳 EXPRESSION 表示式的值\n" +" ! EXPRESSION\t\t如果 EXPRESSION 表示式為假則為真,否則為假\n" +" EXPR1 && EXPR2\t如果 EXPR1 和 EXPR2 表示式均為真則為真,否則為假\n" +" EXPR1 || EXPR2\t如果 EXPR1 和 EXPR2 表示式中有一個為真則為真,否則為假\n" +" \n" +" 當使用「==」和「!=」運算子時,運算子右邊的字串被用作模式並且執行一個\n" +" 符合。當使用「=~」運算子時,運算子右邊的字串被當做正規表示式來進行\n" +" 符合。\n" +" \n" +" 運算子 && 和 || 將不對 EXPR2 表示式進行求值,如果 EXPR1 表示式足夠確定\n" +" 整個表示式的值。\n" +" \n" +" 結束狀態:\n" +" 根據 EXPRESSION 的值為 0 或 1。" -#: builtins.c:1697 +#: builtins.c:1765 msgid "" "Common shell variable names and usage.\n" " \n" @@ -3675,8 +5004,49 @@ msgid "" " 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 +"常用 shell 變數名稱和使用。\n" +" \n" +" BASH_VERSION\t目前 Bash 的版本資訊。\n" +" CDPATH\t用於「cd」指令參數搜尋分號分隔的目錄列表\n" +" GLOBIGNORE\t路徑擴充套件時忽略的檔名符合模式列表,\n" +" \t\t以分號分隔。\n" +" HISTFILE\t您的指令歷史記錄存放的檔案名稱。\n" +" HISTFILESIZE\t歷史記錄檔案最多可以儲存的列數。\n" +" HISTSIZE\t一個執行的 shell 最多可以訪問的歷史記錄指令列數。\n" +" HOME\t您登入目錄的完整路徑。\n" +" HOSTNAME\t目前主機的主機名稱。\n" +" HOSTTYPE\t目前版本的 BASH 在其之上執行的 CPU 類型。\n" +" IGNOREEOF\t控制 shell 收到檔案結束符做為單一輸入後的\n" +" \t\t動作。如果設定這個變數,則它的值是 shell 結束之前在\n" +" \t\t一個空列上可以連續看到的檔案結束符數量(預設為 10)。\n" +" \t\t未設定時,檔案結束符標誌著輸入的結束。\n" +" MACHTYPE\t描述目前執行 Bash 的系統字串。\n" +" MAILCHECK\tBash 檢測新郵件的頻率,以秒為單位。\n" +" MAILPATH\tBash 從中檢測新郵件的檔案列表,以分號分隔。\n" +" OSTYPE\t執行 Bash 的 Unix 版本。\n" +" PATH\t當尋找指令時搜尋的目錄列表,以冒號分隔。\n" +" PROMPT_COMMAND\t印出每一個主提示符之前執行的命\n" +" \t\t令。\n" +" PS1\t\t主提示符字串。\n" +" PS2\t\t從提示符字串。\n" +" PWD\t\t目前目錄的完整路徑。\n" +" SHELLOPTS\t已啟用的 shell 選項列表,以冒號分隔。\n" +" TERM\t目前終端類型的名稱。\n" +" TIMEFORMAT\t以關鍵則「time」顯示的時間統計資訊的輸出\n" +" \t\t格式。\n" +" auto_resume\t非空時,一個單獨的指令詞會首先被在目前\n" +" \t\t停止的工作列表中搜尋。如果找到則該工作被置於前臺。\n" +" \t\t如果值為「exact」則意味著指令詞必須精確符合停止工作\n" +" \t\t列表中的指令。如果值為「substring」則意味著指令詞必\n" +" \t\t須符合工作的一個子字串。任何其他的值意味著指令詞\n" +" \t\t必須是停止工作的一個字首。\n" +" histchars\t控制歷史記錄展開和快速取代的字元。第一個字元是\n" +" \t\t歷史記錄取代字元,通常是「!」。第二個字元是快速取代字元,\n" +" \t\t通常是「^」。第三個是歷史記錄註釋字元,通常是「#」。\n" +" HISTIGNORE\t用於決定哪些指令被存入歷史記錄檔案的模式\n" +" \t\t列表,以冒號分隔。\n" + +#: builtins.c:1822 msgid "" "Add directories to stack.\n" " \n" @@ -3686,19 +5056,19 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when adding\n" -" \tdirectories to the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tfrom the left of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tfrom the right of the list shown by `dirs', starting with\n" +" \t\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" +" \t\tnew current working directory.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3706,8 +5076,28 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"從堆疊中建立目錄。\n" +" \n" +" 從目錄堆疊中建立條目。不帶參數時,建立堆疊頂端目錄,並變更至新的堆疊\n" +" 頂端目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制從堆疊中刪除目錄時通常的目錄變換操作,從而僅對堆疊\n" +" \t進行操作。\n" +" \n" +" 參數:\n" +" +N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中左起,從零開始)。\n" +" \t例如:「popd +0」刪除第一個目錄,「popd +1」刪除第二個。\n" +" \n" +" -N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中右起,從零開始)。\n" +" \t例如:「popd -0」刪除最後一個目錄,,「popd -1」刪除倒數第二個。\n" +" \n" +" 「dirs」內建顯示目錄堆疊。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的參數或者目錄變換失敗。" -#: builtins.c:1788 +#: builtins.c:1856 msgid "" "Remove directories from stack.\n" " \n" @@ -3716,16 +5106,16 @@ msgid "" " \n" " Options:\n" " -n\tSuppresses the normal change of directory when removing\n" -" \tdirectories from the stack, so only the stack is manipulated.\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \t\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" +" \t\tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \t\tremoves the last directory, `popd -1' the next to last.\n" " \n" " The `dirs' builtin displays the directory stack.\n" " \n" @@ -3733,8 +5123,28 @@ msgid "" " Returns success unless an invalid argument is supplied or the directory\n" " change fails." msgstr "" +"從堆疊中刪除目錄。\n" +" \n" +" 從目錄堆疊中刪除條目。不帶參數時,刪除堆疊頂端目錄,並變更至新的堆疊\n" +" 頂端目錄。\n" +" \n" +" 選項:\n" +" -n\t抑制從堆疊中刪除目錄時通常的目錄變換操作,從而僅對堆疊\n" +" \t進行操作。\n" +" \n" +" 參數:\n" +" +N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中左起,從零開始)。\n" +" \t例如:「popd +0」刪除第一個目錄,「popd +1」刪除第二個。\n" +" \n" +" -N\t刪除第 N 個目錄 (「dirs」顯示的目錄列表中右起,從零開始)。\n" +" \t例如:「popd -0」刪除最後一個目錄,,「popd -1」刪除倒數第二個。\n" +" \n" +" 「dirs」內建顯示目錄堆疊。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的參數或者目錄變換失敗。" -#: builtins.c:1818 +#: builtins.c:1886 msgid "" "Display directory stack.\n" " \n" @@ -3745,32 +5155,51 @@ msgid "" " 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" +" \t\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" +" \t\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\tDisplays the Nth entry counting from the left of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\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\tDisplays the Nth entry counting from the right of the list\n" +" \t\tshown by dirs when invoked without options, starting with\n" +" \t\tzero.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"顯示目錄堆疊。\n" +" \n" +" 顯示目前記住的目錄列表。藉由「pushd」指令可以將目錄存入列表\n" +" 中;「popd」指令可用於遍歷彈出列表。\n" +" \n" +" 選項:\n" +" -c\t刪除所有元素以清空目錄堆疊\n" +" -l\t不印出與主目錄相關的波浪號字首的目錄\n" +" -p\t每列一個條目印出目錄堆疊\n" +" -v\t每列一個條目,以堆疊中位置為字首印出目錄堆疊\n" +" \n" +" 參數:\n" +" +N\t顯示 dirs 不帶選項啟動時顯示的目錄列表左起中第\n" +" \tN 個目錄,從零開始。\n" +" \n" +" -N\t顯示 dirs 不帶選項啟動時顯示的目錄列表右起中第\n" +" \tN 個目錄,從零開始。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者發生錯誤。" -#: builtins.c:1847 +#: builtins.c:1917 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" +" arguments, list each supplied OPTNAME, or all shell options if no\n" +" OPTNAMEs are given, with an indication of whether or not each is set.\n" " \n" " Options:\n" " -o\trestrict OPTNAMEs to those defined for use with `set -o'\n" @@ -3783,8 +5212,24 @@ msgid "" " Returns success if OPTNAME is enabled; fails if an invalid option is\n" " given or OPTNAME is disabled." msgstr "" +"設定和取消設定 shell 選項。\n" +" \n" +" 變更每個 shell <選項名稱> 的設定。不帶選項參數時,\n" +" 顯示每個提供的 <選項名稱> 或所有 shell 選項 (如果沒有\n" +" 傳入任何 <選項名稱>) 和是否每個都有設定到的指示。\n" +" \n" +" 選項:\n" +" -o\t限制 <選項名稱> 為定義用於「set -o」的選項\n" +" -p\t印出每個 shell 選項並標註它的狀態。\n" +" -q\t抑制輸出\n" +" -s\t啟用(設定)每個 <選項名稱> 選項\n" +" -u\t停用(取消設定)每個 <選項名稱> 選項\n" +" \n" +" 結束狀態:\n" +" 如果 <選項名稱> 選項被啟用則回傳成功;如果是\n" +" 無效的選項或 <選項名稱> 被停用則失敗。" -#: builtins.c:1868 +#: builtins.c:1938 msgid "" "Formats and prints ARGUMENTS under control of the FORMAT.\n" " \n" @@ -3792,83 +5237,130 @@ msgid "" " -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" +" 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" +" 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" +" In addition to the standard format specifications described in printf(1),\n" +" 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" +" %Q\tlike %q, but apply any precision to the unquoted argument before\n" +" \t\tquoting\n" +" %(fmt)T\toutput the date-time string resulting from using FMT as a format\n" +" \t string for strftime(3)\n" +" \n" +" The format is re-used as necessary to consume all of the arguments. If\n" +" there are fewer arguments than the format requires, extra format\n" +" specifications behave as if a zero value or null string, as appropriate,\n" +" had been supplied.\n" " \n" " Exit Status:\n" -" Returns success unless an invalid option is given or a write or " -"assignment\n" +" Returns success unless an invalid option is given or a write or assignment\n" " error occurs." msgstr "" +"在 FORMAT 的控制下格式化並印出 ARGUMENTS。\n" +" \n" +" 選項:\n" +" -v var\t將輸出指派給 shell 變數 VAR 而非顯示在標準輸出上\n" +" \n" +" FORMAT 是包含三種物件的字元:簡單複製到標準輸出的純字元;\n" +" 變換後複製到標準輸入的跳脫字元;以及每個都會影響到下個引數的格式化規格。\n" +" \n" +" 除了 printf(1) 中描述的標準格式化規格,printf 還會解析:\n" +" \n" +" %b\t對應引數中的反斜線跳脫序列\n" +" %q\t以可做為 shell 輸入的格式對引數加上引號\n" +" %Q\t類似 %q,但精度要求會在加引號之前,對未括住的引數生效\n" +" %(fmt)T\t將 FMT 用來當作 strftime(3) 的格式,輸出日期與時間字串\n" +" \n" +" 必要時會重用格式以消耗掉所有引數。如果引數少於格式所需,其他的格式規範則會\n" +" 視為 0 值或空字串(視情況而定)套用。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者發生寫入或指派錯誤。" -#: builtins.c:1895 +#: builtins.c:1974 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" +" 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" +" \t\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" +" \t\twithout any specific completion defined\n" " -E\tapply the completions and actions to \"empty\" commands --\n" -" \tcompletion attempted on a blank line\n" +" \t\tcompletion attempted on a blank line\n" +" -I\tapply the completions and actions to the initial (usually the\n" +" \t\tcommand) word\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" +" uppercase-letter options are listed above. If multiple options are supplied,\n" +" the -D option takes precedence over -E, and both take precedence over -I.\n" " \n" " Exit Status:\n" " Returns success unless an invalid option is supplied or an error occurs." msgstr "" +"指定 readline 如何完成讀取引數。\n" +" \n" +" 指定每一個 <名稱> 如何完成讀取參數。如果不指定選項,\n" +" 現有的自動完成規格會以可以重新作為輸入使用的格式輸出。\n" +" \n" +" 選項:\n" +" -p\t以可重用的格式輸出現有的自動完成規格。\n" +" -r\t移除每個 <名稱> 的自動完成規格。若未指定 <名稱>\n" +" \t則移除所有自動完成規格。\n" +" -D\t對於沒有自動完成規格定義的命令,設定預設的自動完成動作\n" +" -E\t對於「empty」指令——嘗試對空白列進行自動完成——套用自動完成和動作。\n" +" -I\t套用自動完成和動作到首個(通常是命令)單字\n" +" \n" +" 發起自動完成嘗試時,將依上述大寫字母選項的順序進行動作。若傳入了多個選項,\n" +" -D 選項優先於 -E 選項,而兩者優先於 -I 選項。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者錯誤發生。" -#: builtins.c:1923 +#: builtins.c:2004 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" +" 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" +" 意圖在能產生可能的自動完成 shell 函數內部使用。\n" +" 如果提供了可選的 WORD 參數,則產生按照 WORD\n" +" 進行的符合。\n" +" \n" +" 結束狀態:\n" +" 除非使用了無效選項或者錯誤發生,否則回傳成功。" -#: builtins.c:1938 +#: builtins.c:2019 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" +" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n" +" the completion currently being executed. If no OPTIONs are given, 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" +" \t-I\t\tChange options for completion on the initial word\n" " \n" " Using `+o' instead of `-o' turns off the specified option.\n" " \n" @@ -3884,59 +5376,112 @@ msgid "" " Returns success unless an invalid option is supplied or NAME does not\n" " have a completion specification defined." msgstr "" +"修改或顯示自動完成選項。\n" +" \n" +" 修改每個 <名稱> 的自動完成選項,或如果沒有提供 <名稱>,執行目前的自動完成。\n" +" 如果不帶選項,印出每個 <名稱> 的自動完成選項或目前的自動完成規格。\n" +" \n" +" 選項:\n" +" \t-o option\t為每個 <名稱> 設定自動完成選項 option\n" +" \t-D\t\t為「default」指令自動完成變更選項\n" +" \t-E\t\t為「empty」指令自動完成變更選項\n" +" \t-I\t\t為首單詞上的自動完成變更選項\n" +" \n" +" 使用「+o」而不是「-o」可以關閉指定的選項。\n" +" \n" +" 參數:\n" +" \n" +" 每個 <名稱> 都對應一個之前以藉由「complete」內建定義了自動完成規格的\n" +" 指令。如果不提供 <名稱>,目前產生自動完成的函數必須呼叫 compopt,\n" +" 並且目前執行的自動完成產生器選項會被修改。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項或者 <名稱> 沒有定義自動完成規格。" -#: builtins.c:1968 +#: builtins.c:2050 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" +" 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" +" -d delim\tUse DELIM to terminate lines, instead of newline\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\tRemove a trailing DELIM from each line read (default newline)\n" +" -u fd\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\n" +" \t\t\tCALLBACK\n" " \n" " Arguments:\n" -" ARRAY\t\tArray variable name to use for file data.\n" +" ARRAY\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" +" element to be assigned and the line to be assigned to that element\n" +" as additional arguments.\n" " \n" -" If not supplied with an explicit origin, mapfile will clear ARRAY " -"before\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" +" Returns success unless an invalid option is given or ARRAY is readonly or\n" " not an indexed array." msgstr "" +"從標準輸入讀取列到索引陣列變數中。\n" +" \n" +" 從標準輸入讀取列到索引陣列變數 ARRAY 中,或者如果使用了 -u 選項,\n" +" 從檔案描述符 FD 中讀取。MAPFILE 變數是預設的 ARRAY 變數。\n" +" \n" +" 選項:\n" +" -d delim\t使用 DELIM 取代換行符號來斷行\n" +" -n count\t最多複製 COUNT 列,如果 COUNT 為 0,則複製所有列。\n" +" -O origin\t從索引 ORIGIN 開始 指派給 ARRAY 變數。預設索引是 0。\n" +" -s count \t丟棄最先讀取的 COUNT 列。\n" +" -t\t\t從讀取的每列末尾刪除一個換列符。\n" +" -u fd\t\t從檔案描述符 FD 中讀取列而不是標準輸入。\n" +" -C callback\t每 QUANTUM 次讀列之後對 CALLBACK 回呼求值。\n" +" -c quantum\t定義每次呼叫 CALLBACK 回呼之間讀取的列數。\n" +" \n" +" 參數:\n" +" ARRAY\t\t儲存資料使用的陣列變數\n" +" \n" +" 如果使用了 -C 而沒有 -c,預設的定量是 5000。當對 CALLBACK 求值時,\n" +" 下一個將被指派的陣列元素索引做為額外參數被傳遞。\n" +" \n" +" 如果沒有顯式指定起始索引,mapfile 將在指派前清空 ARRAY 變數。\n" +" \n" +" 結束狀態:\n" +" 回傳成功,除非使用了無效的選項,或者 ARRAY 變數唯讀或不是索引陣列。" -#: builtins.c:2001 +#: builtins.c:2086 msgid "" "Read lines from a file into an array variable.\n" " \n" " A synonym for `mapfile'." msgstr "" +"從一個檔案中讀取列到陣列變數中\n" +" \n" +" 一個「mapfile」的同義詞。" + +#~ msgid "%s: invalid associative array key" +#~ msgstr "%s: 無效的關聯陣列鍵值" -#~ msgid "requesting resize" -#~ msgstr "要求調整" +#~ msgid "" +#~ "Returns the context of the current subroutine call.\n" +#~ " \n" +#~ " Without EXPR, returns " +#~ msgstr "" +#~ "回傳目前子例程呼叫的語境\n" +#~ " \n" +#~ " 不帶 <表示式> 時,回傳" -#~ msgid "just resized" -#~ msgstr "只是大小" +#~ msgid "add_process: process %5ld (%s) in the_pipeline" +#~ msgstr "add_process: 行程 %5ld(%s) 進入 the_pipeline" -#~ msgid "bug: unknown operation" -#~ msgstr "bug:未知操作" +#~ msgid "Unknown Signal #" +#~ msgstr "不明訊號 #" diff --git a/print_cmd.c b/print_cmd.c index 9a41dcb..a16c248 100644 --- a/print_cmd.c +++ b/print_cmd.c @@ -1,6 +1,6 @@ /* print_command -- A way to make readable commands from a command tree. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,68 +38,70 @@ #include "bashansi.h" #include "bashintl.h" +#define NEED_XTRACE_SET_DECL + #include "shell.h" #include "flags.h" #include /* use <...> so we pick it up from the build directory */ +#include "input.h" #include "shmbutil.h" #include "builtins/common.h" #if !HAVE_DECL_PRINTF -extern int printf __P((const char *, ...)); /* Yuck. Double yuck. */ +extern int printf PARAMS((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 *, ...)); +typedef void PFUNC PARAMS((const char *, ...)); -static void cprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); -static void xprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static void cprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static void xprintf PARAMS((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 *)); +static void reset_locals PARAMS((void)); +static void newline PARAMS((char *)); +static void indent PARAMS((int)); +static void semicolon PARAMS((void)); +static void the_printed_command_resize PARAMS((int)); + +static void make_command_string_internal PARAMS((COMMAND *)); +static void _print_word_list PARAMS((WORD_LIST *, char *, PFUNC *)); +static void command_print_word_list PARAMS((WORD_LIST *, char *)); +static void print_case_clauses PARAMS((PATTERN_LIST *)); +static void print_redirection_list PARAMS((REDIRECT *)); +static void print_redirection PARAMS((REDIRECT *)); +static void print_heredoc_header PARAMS((REDIRECT *)); +static void print_heredoc_body PARAMS((REDIRECT *)); +static void print_heredocs PARAMS((REDIRECT *)); +static void print_heredoc_bodies PARAMS((REDIRECT *)); +static void print_deferred_heredocs PARAMS((const char *)); + +static void print_for_command PARAMS((FOR_COM *)); #if defined (ARITH_FOR_COMMAND) -static void print_arith_for_command __P((ARITH_FOR_COM *)); +static void print_arith_for_command PARAMS((ARITH_FOR_COM *)); #endif #if defined (SELECT_COMMAND) -static void print_select_command __P((SELECT_COM *)); +static void print_select_command PARAMS((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 *)); +static void print_group_command PARAMS((GROUP_COM *)); +static void print_case_command PARAMS((CASE_COM *)); +static void print_while_command PARAMS((WHILE_COM *)); +static void print_until_command PARAMS((WHILE_COM *)); +static void print_until_or_while PARAMS((WHILE_COM *, char *)); +static void print_if_command PARAMS((IF_COM *)); #if defined (COND_COMMAND) -static void print_cond_node __P((COND_COM *)); +static void print_cond_node PARAMS((COND_COM *)); #endif -static void print_function_def __P((FUNCTION_DEF *)); +static void print_function_def PARAMS((FUNCTION_DEF *)); #define PRINTED_COMMAND_INITIAL_SIZE 64 #define PRINTED_COMMAND_GROW_SIZE 128 @@ -113,11 +115,21 @@ FILE *xtrace_fp = 0; #define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr) +/* shell expansion characters: used in print_redirection_list */ +#define EXPCHAR(c) ((c) == '{' || (c) == '~' || (c) == '$' || (c) == '`') + +#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 int printing_comsub; static REDIRECT *deferred_heredocs; /* The depth of the group commands that we are currently printing. This @@ -125,7 +137,8 @@ static REDIRECT *deferred_heredocs; static int group_command_nesting; /* A buffer to indicate the indirection level (PS4) when set -x is enabled. */ -static char indirection_string[100]; +static char *indirection_string = 0; +static int indirection_stringsiz = 0; /* Print COMMAND (a command tree) on standard output. */ void @@ -150,12 +163,27 @@ make_command_string (command) return (the_printed_command); } +/* Print a command substitution after parsing it in parse_comsub to turn it + back into an external representation without turning newlines into `;'. + Placeholder for other changes, if any are necessary. */ +char * +print_comsub (command) + COMMAND *command; +{ + char *ret; + + printing_comsub++; + ret = make_command_string (command); + printing_comsub--; + return ret; +} + /* The internal function. This is the real workhorse. */ static void make_command_string_internal (command) COMMAND *command; { - char s[3], *op; + char s[3]; if (command == 0) cprintf (""); @@ -266,25 +294,39 @@ make_command_string_internal (command) break; case ';': - if (deferred_heredocs == 0) - { - if (was_heredoc == 0) - cprintf (";"); - else - was_heredoc = 0; - } - else - print_deferred_heredocs (inside_function_def ? "" : ";"); + case '\n': /* special case this */ + { + char c = command->value.Connection->connector; + int was_newline; - if (inside_function_def) - cprintf ("\n"); - else - { - cprintf (" "); - if (command->value.Connection->second) - skip_this_indent++; - } - break; + s[0] = printing_comsub ? c : ';'; + s[1] = '\0'; + + was_newline = deferred_heredocs == 0 && was_heredoc == 0 && c == '\n'; + if (deferred_heredocs == 0) + { + if (was_heredoc == 0) + cprintf ("%s", s); /* inside_function_def? */ + else + was_heredoc = 0; + } + else + /* print_deferred_heredocs special-cases `;' */ + print_deferred_heredocs (inside_function_def ? "" : ";"); + + if (inside_function_def) + cprintf ("\n"); + else if (printing_comsub && c == '\n' && was_newline == 0) + cprintf ("\n"); /* preserve newlines in comsubs but don't double them */ + else + { + if (c == ';') + cprintf (" "); + if (command->value.Connection->second) + skip_this_indent++; + } + break; + } default: cprintf (_("print_command: bad connector `%d'"), @@ -293,8 +335,7 @@ make_command_string_internal (command) } make_command_string_internal (command->value.Connection->second); - if (deferred_heredocs) - print_deferred_heredocs (""); + PRINT_DEFERRED_HEREDOCS (""); printing_connection--; break; @@ -310,11 +351,14 @@ make_command_string_internal (command) cprintf ("( "); skip_this_indent++; make_command_string_internal (command->value.Subshell->command); + PRINT_DEFERRED_HEREDOCS (""); cprintf (" )"); break; case cm_coproc: - cprintf ("coproc %s ", command->value.Coproc->name); + cprintf ("coproc "); + if (command->value.Coproc->command->type != cm_simple) + cprintf ("%s ", command->value.Coproc->name); skip_this_indent++; make_command_string_internal (command->value.Coproc->command); break; @@ -412,25 +456,31 @@ indirection_level_string () register int i, j; char *ps4; char ps4_firstc[MB_LEN_MAX+1]; - int ps4_firstc_len, ps4_len; + int ps4_firstc_len, ps4_len, ineed, old; - indirection_string[0] = '\0'; ps4 = get_string_value ("PS4"); + if (indirection_string == 0) + indirection_string = xmalloc (indirection_stringsiz = 100); + indirection_string[0] = '\0'; if (ps4 == 0 || *ps4 == '\0') return (indirection_string); - change_flag ('x', FLAG_OFF); + old = change_flag ('x', FLAG_OFF); ps4 = decode_prompt_string (ps4); - change_flag ('x', FLAG_ON); + if (old) + change_flag ('x', FLAG_ON); if (ps4 == 0 || *ps4 == '\0') - return (indirection_string); + { + FREE (ps4); + 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)) + if (ps4_firstc_len == 1 || ps4_firstc_len == 0 || ps4_firstc_len < 0) { ps4_firstc[0] = ps4[0]; ps4_firstc[ps4_firstc_len = 1] = '\0'; @@ -441,8 +491,17 @@ indirection_level_string () 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++) + + /* Dynamically resize indirection_string so we have room for everything + and we don't have to truncate ps4 */ + ineed = (ps4_firstc_len * indirection_level) + strlen (ps4); + if (ineed > indirection_stringsiz - 1) + { + indirection_stringsiz = ineed + 1; + indirection_string = xrealloc (indirection_string, indirection_stringsiz); + } + + for (i = j = 0; ps4_firstc[0] && j < indirection_level && i < indirection_stringsiz - 1; i += ps4_firstc_len, j++) { if (ps4_firstc_len == 1) indirection_string[i] = ps4_firstc[0]; @@ -450,7 +509,7 @@ indirection_level_string () memcpy (indirection_string+i, ps4_firstc, ps4_firstc_len); } - for (j = ps4_firstc_len; *ps4 && ps4[j] && i < 99; i++, j++) + for (j = ps4_firstc_len; *ps4 && ps4[j] && i < indirection_stringsiz - 1; i++, j++) indirection_string[i] = ps4[j]; indirection_string[i] = '\0'; @@ -491,7 +550,10 @@ xtrace_print_assignment (name, value, assign_list, xflags) fflush (xtrace_fp); } -/* A function to print the words of a simple command when set -x is on. */ +/* A function to print the words of a simple command when set -x is on. Also used to + print the word list in a for or select command header; in that case, we suppress + quoting the words because they haven't been expanded yet. XTFLAGS&1 means to + print $PS4; XTFLAGS&2 means to suppress quoting the words in LIST. */ void xtrace_print_word_list (list, xtflags) WORD_LIST *list; @@ -502,7 +564,7 @@ xtrace_print_word_list (list, xtflags) CHECK_XTRACE_FP; - if (xtflags) + if (xtflags&1) fprintf (xtrace_fp, "%s", indirection_level_string ()); for (w = list; w; w = w->next) @@ -510,6 +572,8 @@ xtrace_print_word_list (list, xtflags) t = w->word->word; if (t == 0 || *t == '\0') fprintf (xtrace_fp, "''%s", w->next ? " " : ""); + else if (xtflags & 2) + fprintf (xtrace_fp, "%s%s", t, w->next ? " " : ""); else if (sh_contains_shell_metas (t)) { x = sh_single_quote (t); @@ -552,7 +616,7 @@ xtrace_print_for_command_head (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); + xtrace_print_word_list (for_command->map_list, 2); } static void @@ -560,13 +624,15 @@ 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"); } @@ -585,6 +651,7 @@ print_arith_for_command (arith_for_command) newline ("do\n"); indentation += indentation_amount; make_command_string_internal (arith_for_command->action); + PRINT_DEFERRED_HEREDOCS (""); semicolon (); indentation -= indentation_amount; newline ("done"); @@ -607,7 +674,7 @@ xtrace_print_select_command_head (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); + xtrace_print_word_list (select_command->map_list, 2); } static void @@ -620,6 +687,7 @@ print_select_command (select_command) newline ("do\n"); indentation += indentation_amount; make_command_string_internal (select_command->action); + PRINT_DEFERRED_HEREDOCS (""); semicolon (); indentation -= indentation_amount; newline ("done"); @@ -645,6 +713,7 @@ print_group_command (group_command) } make_command_string_internal (group_command->command); + PRINT_DEFERRED_HEREDOCS (""); if (inside_function_def) { @@ -703,6 +772,7 @@ print_case_clauses (clauses) indentation += indentation_amount; make_command_string_internal (clauses->action); indentation -= indentation_amount; + PRINT_DEFERRED_HEREDOCS (""); if (clauses->flags & CASEPAT_FALLTHROUGH) newline (";&"); else if (clauses->flags & CASEPAT_TESTNEXT) @@ -736,10 +806,12 @@ print_until_or_while (while_command, which) cprintf ("%s ", which); skip_this_indent++; make_command_string_internal (while_command->test); + PRINT_DEFERRED_HEREDOCS (""); semicolon (); cprintf (" do\n"); /* was newline ("do\n"); */ indentation += indentation_amount; make_command_string_internal (while_command->action); + PRINT_DEFERRED_HEREDOCS (""); indentation -= indentation_amount; semicolon (); newline ("done"); @@ -756,6 +828,7 @@ print_if_command (if_command) cprintf (" then\n"); indentation += indentation_amount; make_command_string_internal (if_command->true_case); + PRINT_DEFERRED_HEREDOCS (""); indentation -= indentation_amount; if (if_command->false_case) @@ -764,13 +837,14 @@ print_if_command (if_command) newline ("else\n"); indentation += indentation_amount; make_command_string_internal (if_command->false_case); + PRINT_DEFERRED_HEREDOCS (""); indentation -= indentation_amount; } semicolon (); newline ("fi"); } -#if defined (DPAREN_ARITHMETIC) +#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) void print_arith_command (arith_cmd_list) WORD_LIST *arith_cmd_list; @@ -837,6 +911,21 @@ print_cond_command (cond) } #ifdef DEBUG +void +debug_print_word_list (s, list, sep) + char *s; + WORD_LIST *list; + char *sep; +{ + WORD_LIST *w; + + if (s) + fprintf (stderr, "%s: ", s); + for (w = list; w; w = w->next) + fprintf (stderr, "%s%s", w->word->word, w->next ? sep : ""); + fprintf (stderr, "\n"); +} + void debug_print_cond_command (cond) COND_COM *cond; @@ -902,11 +991,13 @@ void print_simple_command (simple_command) SIMPLE_COM *simple_command; { - command_print_word_list (simple_command->words, " "); + if (simple_command->words) + command_print_word_list (simple_command->words, " "); if (simple_command->redirects) { - cprintf (" "); + if (simple_command->words) + cprintf (" "); print_redirection_list (simple_command->redirects); } } @@ -926,34 +1017,38 @@ print_heredocs (heredocs) was_heredoc = 1; } +static void +print_heredoc_bodies (heredocs) + REDIRECT *heredocs; +{ + REDIRECT *hdtail; + + cprintf ("\n"); + for (hdtail = heredocs; hdtail; hdtail = hdtail->next) + { + print_heredoc_body (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. */ + bodies. We print the here-doc delimiters in print_redirection_list + and print the connector and the bodies here. 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]) + /* We now print the heredoc headers in print_redirection_list */ + if (cstring && cstring[0] && (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) { + print_heredoc_bodies (deferred_heredocs); if (cstring && cstring[0] && (cstring[0] != ';' || cstring[1])) cprintf (" "); /* make sure there's at least one space */ dispose_redirects (deferred_heredocs); @@ -967,6 +1062,7 @@ print_redirection_list (redirects) REDIRECT *redirects; { REDIRECT *heredocs, *hdtail, *newredir; + char *rw; heredocs = (REDIRECT *)NULL; hdtail = heredocs; @@ -974,12 +1070,15 @@ print_redirection_list (redirects) was_heredoc = 0; while (redirects) { - /* Defer printing the here documents until we've printed the - rest of the redirections. */ + /* Defer printing the here document bodiess until we've printed the rest of the + redirections, but print the headers in the order they're given. */ if (redirects->instruction == r_reading_until || redirects->instruction == r_deblank_reading_until) { newredir = copy_redirect (redirects); newredir->next = (REDIRECT *)NULL; + + print_heredoc_header (newredir); + if (heredocs) { hdtail->next = newredir; @@ -988,13 +1087,19 @@ print_redirection_list (redirects) else hdtail = heredocs = newredir; } - else if (redirects->instruction == r_duplicating_output_word && redirects->redirector.dest == 1) +#if 0 + /* Remove this heuristic now that the command printing code doesn't + unconditionally put in the redirector file descriptor. */ + else if (redirects->instruction == r_duplicating_output_word && (redirects->flags & REDIR_VARASSIGN) == 0 && redirects->redirector.dest == 1) { /* Temporarily translate it as the execution code does. */ - redirects->instruction = r_err_and_out; + rw = redirects->redirectee.filename->word; + if (rw && *rw != '-' && DIGIT (*rw) == 0 && EXPCHAR (*rw) == 0) + redirects->instruction = r_err_and_out; print_redirection (redirects); redirects->instruction = r_duplicating_output_word; } +#endif else print_redirection (redirects); @@ -1004,12 +1109,13 @@ print_redirection_list (redirects) } /* Now that we've printed all the other redirections (on one line), - print the here documents. */ + print the here documents. If we're printing a connection, we wait until + we print the connector symbol, then we print the here document bodies */ if (heredocs && printing_connection) deferred_heredocs = heredocs; else if (heredocs) { - print_heredocs (heredocs); + print_heredoc_bodies (heredocs); dispose_redirects (heredocs); } } @@ -1052,10 +1158,9 @@ static void print_redirection (redirect) REDIRECT *redirect; { - int kill_leading, redirector, redir_fd; + int redirector, redir_fd; WORD_DESC *redirectee, *redir_word; - kill_leading = 0; redirectee = redirect->redirectee.filename; redir_fd = redirect->redirectee.dest; @@ -1089,7 +1194,7 @@ print_redirection (redirect) cprintf ("{%s}", redir_word->word); else if (redirector != 1) cprintf ("%d", redirector); - cprintf (">|%s", redirectee->word); + cprintf (">| %s", redirectee->word); break; case r_appending_to: @@ -1120,6 +1225,10 @@ print_redirection (redirect) cprintf ("{%s}", redir_word->word); else if (redirector != 0) cprintf ("%d", redirector); +#if 0 + /* Don't need to check whether or not to requote, since original quotes + are still intact. The only thing that has happened is that $'...' + has been replaced with 'expanded ...'. */ if (ansic_shouldquote (redirect->redirectee.filename->word)) { char *x; @@ -1128,6 +1237,7 @@ print_redirection (redirect) free (x); } else +#endif cprintf ("<<< %s", redirect->redirectee.filename->word); break; @@ -1148,6 +1258,8 @@ print_redirection (redirect) case r_duplicating_input_word: if (redirect->rflags & REDIR_VARASSIGN) cprintf ("{%s}<&%s", redir_word->word, redirectee->word); + else if (redirector == 0) + cprintf ("<&%s", redirectee->word); else cprintf ("%d<&%s", redirector, redirectee->word); break; @@ -1155,6 +1267,8 @@ print_redirection (redirect) case r_duplicating_output_word: if (redirect->rflags & REDIR_VARASSIGN) cprintf ("{%s}>&%s", redir_word->word, redirectee->word); + else if (redirector == 1) + cprintf (">&%s", redirectee->word); else cprintf ("%d>&%s", redirector, redirectee->word); break; @@ -1195,11 +1309,11 @@ print_redirection (redirect) break; case r_err_and_out: - cprintf ("&>%s", redirectee->word); + cprintf ("&> %s", redirectee->word); break; case r_append_err_and_out: - cprintf ("&>>%s", redirectee->word); + cprintf ("&>> %s", redirectee->word); break; } } @@ -1211,6 +1325,7 @@ reset_locals () indentation = 0; printing_connection = 0; deferred_heredocs = 0; + printing_comsub = 0; } static void @@ -1221,7 +1336,11 @@ print_function_def (func) REDIRECT *func_redirects; func_redirects = NULL; - cprintf ("function %s () \n", func->name->word); + /* When in posix mode, print functions as posix specifies them. */ + if (posixly_correct == 0) + cprintf ("function %s () \n", func->name->word); + else + cprintf ("%s () \n", func->name->word); add_unwind_protect (reset_locals, 0); indent (indentation); @@ -1239,6 +1358,7 @@ print_function_def (func) make_command_string_internal (cmdcopy->type == cm_group ? cmdcopy->value.Group->command : cmdcopy); + PRINT_DEFERRED_HEREDOCS (""); remove_unwind_protect (); indentation -= indentation_amount; @@ -1251,7 +1371,11 @@ print_function_def (func) cmdcopy->redirects = func_redirects; } else - newline ("}"); + { + /* { */ + newline ("}"); + was_heredoc = 0; /* not printing any here-documents now */ + } dispose_command (cmdcopy); } @@ -1277,9 +1401,14 @@ named_function_string (name, command, flags) old_amount = indentation_amount; command_string_index = was_heredoc = 0; deferred_heredocs = 0; + printing_comsub = 0; if (name && *name) - cprintf ("%s ", name); + { + if (find_reserved_word (name) >= 0) + cprintf ("function "); + cprintf ("%s ", name); + } cprintf ("() "); @@ -1310,6 +1439,7 @@ named_function_string (name, command, flags) make_command_string_internal (cmdcopy->type == cm_group ? cmdcopy->value.Group->command : cmdcopy); + PRINT_DEFERRED_HEREDOCS (""); indentation = old_indent; indentation_amount = old_amount; @@ -1322,7 +1452,10 @@ named_function_string (name, command, flags) cmdcopy->redirects = func_redirects; } else - newline ("}"); + { /* { */ + newline ("}"); + was_heredoc = 0; + } result = the_printed_command; @@ -1338,7 +1471,7 @@ named_function_string (name, command, flags) } #else if (result[2] == '\n') /* XXX -- experimental */ - strcpy (result + 2, result + 3); + memmove (result + 2, result + 3, strlen (result) - 2); #endif } @@ -1374,7 +1507,7 @@ indent (amount) for (i = 0; amount > 0; amount--) indentation_string[i++] = ' '; indentation_string[i] = '\0'; - cprintf (indentation_string); + cprintf ("%s", indentation_string); } static void @@ -1398,7 +1531,7 @@ cprintf (control, va_alist) #endif { register const char *s; - char char_arg[2], *argp, intbuf[INT_STRLEN_BOUND (int) + 1]; + char char_arg[2], *argp, intbuf[INT_STRLEN_BOUND (unsigned int) + 1]; int digit_arg, arg_len, c; va_list args; @@ -1443,7 +1576,7 @@ cprintf (control, va_alist) digit_arg = va_arg (args, int); if (digit_arg < 0) { - sprintf (intbuf, "%u", (unsigned)-1); + sprintf (intbuf, "%u", (unsigned int)-1); argp = intbuf; } else @@ -1471,6 +1604,8 @@ cprintf (control, va_alist) } } + va_end (args); + the_printed_command[command_string_index] = '\0'; } diff --git a/quit.h b/quit.h index e7bf05b..0af1d12 100644 --- a/quit.h +++ b/quit.h @@ -1,6 +1,6 @@ /* quit.h -- How to handle SIGINT gracefully. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,9 +21,11 @@ #if !defined (_QUIT_H_) #define _QUIT_H_ -/* Non-zero means SIGINT has already ocurred. */ -extern volatile int interrupt_state; -extern volatile int terminating_signal; +#include "sig.h" /* for sig_atomic_t */ + +/* Non-zero means SIGINT has already occurred. */ +extern volatile sig_atomic_t interrupt_state; +extern volatile sig_atomic_t 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 @@ -42,6 +44,8 @@ extern volatile int terminating_signal; #define ADDINTERRUPT interrupt_state++ #define DELINTERRUPT interrupt_state-- +#define ISINTERRUPT interrupt_state != 0 + /* The same sort of thing, this time just for signals that would ordinarily cause the shell to terminate. */ @@ -50,4 +54,22 @@ extern volatile int terminating_signal; if (terminating_signal) termsig_handler (terminating_signal); \ } while (0) +#define LASTSIG() \ + (terminating_signal ? terminating_signal : (interrupt_state ? SIGINT : 0)) + +#define CHECK_WAIT_INTR \ + do { \ + if (wait_intr_flag && wait_signal_received && this_shell_builtin && (this_shell_builtin == wait_builtin)) \ + sh_longjmp (wait_intr_buf, 1); \ + } while (0) + +#define RESET_SIGTERM \ + do { \ + sigterm_received = 0; \ + } while (0) + +#define CHECK_SIGTERM \ + do { \ + if (sigterm_received) termsig_handler (SIGTERM); \ + } while (0) #endif /* _QUIT_H_ */ diff --git a/redir.c b/redir.c index c7a69f7..8369adc 100644 --- a/redir.c +++ b/redir.c @@ -1,6 +1,6 @@ /* redir.c -- Functions to perform input and output redirection. */ -/* Copyright (C) 1997-2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,38 +52,66 @@ extern int errno; #include "flags.h" #include "execute_cmd.h" #include "redir.h" +#include "trap.h" #if defined (BUFFERED_INPUT) # include "input.h" #endif +#include "builtins/pipesize.h" + +/* FreeBSD 13 can reliably handle atomic writes at this capacity without + hanging. */ +#if __FreeBSD__ && !defined (HEREDOC_PIPESIZE) +# define HEREDOC_PIPESIZE 4096 +#endif + +/* Normally set by a build process command that computes pipe capacity */ +#ifndef PIPESIZE +# ifdef PIPE_BUF +# define PIPESIZE PIPE_BUF +# else +# define PIPESIZE 4096 +# endif +#endif + +#ifndef HEREDOC_PIPESIZE +# define HEREDOC_PIPESIZE PIPESIZE +#endif + +#if defined (HEREDOC_PIPEMAX) +# if HEREDOC_PIPESIZE > HEREDOC_PIPEMAX +# define HEREDOC_PIPESIZE HEREDOC_PIPEMAX +# endif +#endif + #define SHELL_FD_BASE 10 int expanding_redir; +int varassign_redir_autoclose = 0; -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 void add_exec_redirect PARAMS((REDIRECT *)); +static int add_undo_redirect PARAMS((int, enum r_instruction, int)); +static int add_undo_close_redirect PARAMS((int)); +static int expandable_redirection_filename PARAMS((REDIRECT *)); +static int stdin_redirection PARAMS((enum r_instruction, int)); +static int undoablefd PARAMS((int)); +static int do_redirection_internal PARAMS((REDIRECT *, int, char **)); -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 char *heredoc_expand PARAMS((WORD_DESC *, enum r_instruction, size_t *)); +static int heredoc_write PARAMS((int, char *, size_t)); +static int here_document_to_fd PARAMS((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_special_open PARAMS((int, char *, int, int, enum r_instruction)); +static int noclobber_open PARAMS((char *, int, int, enum r_instruction)); +static int redir_open PARAMS((char *, int, int, enum r_instruction)); -static int redir_varassign __P((REDIRECT *, int)); -static int redir_varvalue __P((REDIRECT *)); +static int redir_varassign PARAMS((REDIRECT *, int)); +static int redir_varvalue PARAMS((REDIRECT *)); /* Spare redirector used when translating [N]>&WORD[-] or [N]<&WORD[-] to a new redirection and when creating the redirection undo list. */ @@ -93,18 +121,30 @@ static REDIRECTEE rd; Used to print a reasonable error message. */ static int heredoc_errno; +#define REDIRECTION_ERROR(r, e, fd) \ +do { \ + if ((r) < 0) \ + { \ + if (fd >= 0) \ + close (fd); \ + set_exit_status (EXECUTION_FAILURE);\ + return ((e) == 0 ? EINVAL : (e));\ + } \ +} while (0) + void -redirection_error (temp, error) +redirection_error (temp, error, fn) REDIRECT *temp; int error; + char *fn; /* already-expanded filename */ { char *filename, *allocname; int oflags; allocname = 0; - if (temp->rflags & REDIR_VARASSIGN) - filename = savestring (temp->redirector.filename->word); - else if (temp->redirector.dest < 0) + if ((temp->rflags & REDIR_VARASSIGN) && error < 0) + filename = allocname = savestring (temp->redirector.filename->word); + else if ((temp->rflags & REDIR_VARASSIGN) == 0 && temp->redirector.dest < 0) /* This can happen when read_token_word encounters overflow, like in exec 4294967297>x */ filename = _("file descriptor out of range"); @@ -141,22 +181,21 @@ redirection_error (temp, error) } } #endif + else if (fn) + filename = fn; else if (expandable_redirection_filename (temp)) { -expandable_filename: + oflags = temp->redirectee.filename->flags; if (posixly_correct && interactive_shell == 0) - { - oflags = temp->redirectee.filename->flags; - temp->redirectee.filename->flags |= W_NOGLOB; - } + temp->redirectee.filename->flags |= W_NOGLOB; + temp->redirectee.filename->flags |= W_NOCOMSUB; filename = allocname = redirection_expand (temp->redirectee.filename); - if (posixly_correct && interactive_shell == 0) - temp->redirectee.filename->flags = oflags; + 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"; + filename = _("file descriptor out of range"); else filename = allocname = itos (temp->redirectee.dest); @@ -194,7 +233,7 @@ redirection_error (temp, error) /* 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 + necessary 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. */ @@ -205,6 +244,7 @@ do_redirections (list, flags) { int error; REDIRECT *temp; + char *fn; if (flags & RX_UNDOABLE) { @@ -219,12 +259,15 @@ do_redirections (list, flags) for (temp = list; temp; temp = temp->next) { - error = do_redirection_internal (temp, flags); + fn = 0; + error = do_redirection_internal (temp, flags, &fn); if (error) { - redirection_error (temp, error); + redirection_error (temp, error, fn); + FREE (fn); return (error); } + FREE (fn); } return (0); } @@ -265,6 +308,7 @@ redirection_expand (word) char *result; WORD_LIST *tlist1, *tlist2; WORD_DESC *w; + int old; w = copy_word (word); if (posixly_correct) @@ -272,11 +316,22 @@ redirection_expand (word) tlist1 = make_word_list (w, (WORD_LIST *)NULL); expanding_redir = 1; + /* Now that we've changed the variable search order to ignore the temp + environment, see if we need to change the cached IFS values. */ + sv_ifs ("IFS"); tlist2 = expand_words_no_vars (tlist1); expanding_redir = 0; + /* Now we need to change the variable search order back to include the temp + environment. We force the temp environment search by forcing + executing_builtin to 1. This is what makes `read' get the right values + for the IFS-related cached variables, for example. */ + old = executing_builtin; + executing_builtin = 1; + sv_ifs ("IFS"); + executing_builtin = old; dispose_words (tlist1); - if (!tlist2 || tlist2->next) + if (tlist2 == 0 || tlist2->next) { /* We expanded to no words, or to more than a single word. Dispose of the word list and return NULL. */ @@ -289,141 +344,182 @@ redirection_expand (word) return (result); } -static int -write_here_string (fd, redirectee) - int fd; +/* Expand a here-document or here-string (determined by RI) contained in + REDIRECTEE and return the expanded document. If LENP is non-zero, put + the length of the returned string into *LENP. + + This captures everything about expanding here-documents and here-strings: + the returned document should be written directly to whatever file + descriptor is specified. In particular, it adds a newline to the end of + a here-string to preserve previous semantics. */ +static char * +heredoc_expand (redirectee, ri, lenp) WORD_DESC *redirectee; + enum r_instruction ri; + size_t *lenp; { - char *herestr; - int herelen, n, e; + char *document; + size_t dlen; + int old; + if (redirectee->word == 0 || redirectee->word[0] == '\0') + { + if (lenp) + *lenp = 0; + return (redirectee->word); + } + + /* Quoted here documents are not expanded */ + if (ri != r_reading_string && (redirectee->flags & W_QUOTED)) + { + if (lenp) + *lenp = STRLEN (redirectee->word); + return (redirectee->word); + } + expanding_redir = 1; - herestr = expand_string_to_string (redirectee->word, 0); + /* Now that we've changed the variable search order to ignore the temp + environment, see if we need to change the cached IFS values. */ + sv_ifs ("IFS"); + document = (ri == r_reading_string) ? expand_assignment_string_to_string (redirectee->word, 0) + : expand_string_to_string (redirectee->word, Q_HERE_DOCUMENT); expanding_redir = 0; - herelen = STRLEN (herestr); - - n = write (fd, herestr, herelen); - if (n == herelen) + /* Now we need to change the variable search order back to include the temp + environment. We force the temp environment search by forcing + executing_builtin to 1. This is what makes `read' get the right values + for the IFS-related cached variables, for example. */ + old = executing_builtin; + executing_builtin = 1; + sv_ifs ("IFS"); + executing_builtin = old; + + dlen = STRLEN (document); + /* XXX - Add trailing newline to here-string */ + if (ri == r_reading_string) { - n = write (fd, "\n", 1); - herelen = 1; + document = xrealloc (document, dlen + 2); + document[dlen++] = '\n'; + document[dlen] = '\0'; } + if (lenp) + *lenp = dlen; + + return document; +} + +/* Write HEREDOC (of length HDLEN) to FD, returning 0 on success and ERRNO on + error. Don't handle interrupts. */ +static int +heredoc_write (fd, heredoc, herelen) + int fd; + char *heredoc; + size_t herelen; +{ + ssize_t nw; + int e; + + errno = 0; + nw = write (fd, heredoc, herelen); e = errno; - FREE (herestr); - if (n != herelen) + if (nw != 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. */ +/* Create a temporary file or pipe holding the text of the here document + pointed to by REDIRECTEE, and return a file descriptor open for reading + to it. Return -1 on any error, and make sure errno is set appropriately. */ static int -write_here_document (fd, redirectee) - int fd; +here_document_to_fd (redirectee, ri) WORD_DESC *redirectee; + enum r_instruction ri; { + char *filename; + int r, fd, fd2, herepipe[2]; char *document; - int document_len, fd2; - FILE *fp; - register WORD_LIST *t, *tlist; + size_t document_len; +#if HEREDOC_PARANOID + struct stat st1, st2; +#endif - /* 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. */ + /* Expand the here-document/here-string first and then decide what to do. */ + document = heredoc_expand (redirectee, ri, &document_len); - if (redirectee->flags & W_QUOTED) + /* If we have a zero-length document, don't mess with a temp file */ + if (document_len == 0) { - 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; + fd = open ("/dev/null", O_RDONLY); + r = errno; + if (document != redirectee->word) + FREE (document); + errno = r; + return fd; } - expanding_redir = 1; - tlist = expand_string (redirectee->word, Q_HERE_DOCUMENT); - expanding_redir = 0; + if (shell_compatibility_level <= 50) + goto use_tempfile; - if (tlist) +#if HEREDOC_PIPESIZE + /* Try to use a pipe internal to this process if the document is shorter + than the system's pipe capacity (computed at build time). We want to + write the entire document without write blocking. */ + if (document_len <= HEREDOC_PIPESIZE) { - /* 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) + if (pipe (herepipe) < 0) { - /* 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); - } + /* XXX - goto use_tempfile; ? */ + r = errno; + if (document != redirectee->word) + free (document); + errno = r; + return (-1); } - dispose_words (tlist); - if (fclose (fp) != 0) + +#if defined (F_GETPIPE_SZ) + if (fcntl (herepipe[1], F_GETPIPE_SZ, 0) < document_len) + goto use_tempfile; +#endif + + r = heredoc_write (herepipe[1], document, document_len); + if (document != redirectee->word) + free (document); + close (herepipe[1]); + if (r) /* write error */ { - if (errno == 0) - errno = ENOSPC; - return (errno); + close (herepipe[0]); + errno = r; + return (-1); } + return (herepipe[0]); } - return 0; -} +#endif -/* 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; +use_tempfile: 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) { + r = errno; FREE (filename); + if (document != redirectee->word) + FREE (document); + errno = r; return (fd); } + fchmod (fd, S_IRUSR | S_IWUSR); + SET_CLOSE_ON_EXEC (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); + r = heredoc_write (fd, document, document_len); + if (document != redirectee->word) + FREE (document); if (r) { @@ -437,7 +533,7 @@ here_document_to_fd (redirectee, ri) /* 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); + fd2 = open (filename, O_RDONLY|O_BINARY, 0600); if (fd2 < 0) { @@ -449,18 +545,26 @@ here_document_to_fd (redirectee, ri) return -1; } +#if HEREDOC_PARANOID + /* We can use same_file here to check whether or not fd and fd2 refer to + the same file, but we don't do that unless HEREDOC_PARANOID is defined. */ + if (fstat (fd, &st1) < 0 || S_ISREG (st1.st_mode) == 0 || + fstat (fd2, &st2) < 0 || S_ISREG (st2.st_mode) == 0 || + same_file (filename, filename, &st1, &st2) == 0) + { + unlink (filename); + free (filename); + close (fd); + close (fd2); + errno = EEXIST; + return -1; + } +#endif + 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; @@ -468,6 +572,8 @@ here_document_to_fd (redirectee, ri) } free (filename); + + fchmod (fd2, S_IRUSR); return (fd2); } @@ -538,6 +644,10 @@ redir_special_open (spec, filename, flags, mode, ri) #if defined (NETWORK_REDIRECTIONS) case RF_DEVTCP: case RF_DEVUDP: +#if defined (RESTRICTED_SHELL) + if (restricted) + return (RESTRICTED_REDIRECT); +#endif #if defined (HAVE_NETWORK) fd = netopen (filename); #else @@ -612,7 +722,7 @@ redir_open (filename, flags, mode, ri) int flags, mode; enum r_instruction ri; { - int fd, r; + int fd, r, e; r = find_string_in_alist (filename, _redir_special_filenames, 1); if (r >= 0) @@ -628,7 +738,19 @@ redir_open (filename, flags, mode, ri) } else { - fd = open (filename, flags, mode); + do + { + fd = open (filename, flags, mode); + e = errno; + if (fd < 0 && e == EINTR) + { + QUIT; + run_pending_traps (); + } + errno = e; + } + while (fd < 0 && errno == EINTR); + #if defined (AFS) if ((fd < 0) && (errno == EACCES)) { @@ -655,15 +777,17 @@ undoablefd (fd) /* 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 + If flags & RX_ACTIVE is zero, then just do whatever is necessary 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. */ + close-on-exec. FNP, if non-null is a pointer to a location where the + expanded filename is stored. The caller will free it. */ static int -do_redirection_internal (redirect, flags) +do_redirection_internal (redirect, flags, fnp) REDIRECT *redirect; int flags; + char **fnp; { WORD_DESC *redirectee; int redir_fd, fd, redirector, r, oflags; @@ -689,8 +813,14 @@ do_redirection_internal (redirect, flags) 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) + turns it into [N]<&- or [N]>&- and closes N. */ + if ((ri == r_move_input_word || ri == r_move_output_word) && redirectee_word == 0) + { + sd = redirect->redirector; + rd.dest = 0; + new_redirect = make_redirection (sd, r_close_this, rd, 0); + } + else if (redirectee_word == 0) return (AMBIGUOUS_REDIRECT); else if (redirectee_word[0] == '-' && redirectee_word[1] == '\0') { @@ -719,6 +849,8 @@ do_redirection_internal (redirect, flags) case r_move_output_word: new_redirect = make_redirection (sd, r_move_output, rd, 0); break; + default: + break; /* shut up gcc */ } } else if (ri == r_duplicating_output_word && (redirect->rflags & REDIR_VARASSIGN) == 0 && redirector == 1) @@ -796,9 +928,12 @@ do_redirection_internal (redirect, flags) #endif /* RESTRICTED_SHELL */ fd = redir_open (redirectee_word, redirect->flags, 0666, ri); - free (redirectee_word); + if (fnp) + *fnp = redirectee_word; + else + free (redirectee_word); - if (fd == NOCLOBBER_REDIRECT) + if (fd == NOCLOBBER_REDIRECT || fd == RESTRICTED_REDIRECT) return (fd); if (fd < 0) @@ -807,19 +942,33 @@ do_redirection_internal (redirect, flags) if (flags & RX_ACTIVE) { if (redirect->rflags & REDIR_VARASSIGN) - redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + { + redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + r = errno; + if (redirector < 0) + sys_error (_("redirection error: cannot duplicate fd")); + REDIRECTION_ERROR (redirector, r, fd); + } - if (flags & RX_UNDOABLE) + if ((flags & RX_UNDOABLE) && ((redirect->rflags & REDIR_VARASSIGN) == 0 || varassign_redir_autoclose)) { - /* 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); + /* Only setup to undo it if the thing to undo is active. We want + to autoclose if we are doing a varassign redirection and the + varredir_close shell option is set, and we can't test + redirector in this case since we just assigned it above. */ + if (fd != redirector && (redirect->rflags & REDIR_VARASSIGN) && varassign_redir_autoclose) + r = add_undo_close_redirect (redirector); + else if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1)) + r = add_undo_redirect (redirector, ri, -1); else - add_undo_close_redirect (redirector); + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, fd); } #if defined (BUFFERED_INPUT) - check_bash_input (redirector); + /* inhibit call to sync_buffered_stream() for async processes */ + if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0) + check_bash_input (redirector); #endif /* Make sure there is no pending output before we change the state @@ -846,7 +995,10 @@ do_redirection_internal (redirect, flags) } } else if ((fd != redirector) && (dup2 (fd, redirector) < 0)) - return (errno); + { + close (fd); /* dup2 failed? must be fd limit issue */ + return (errno); + } #if defined (BUFFERED_INPUT) /* Do not change the buffered stream for an implicit redirection @@ -910,17 +1062,28 @@ do_redirection_internal (redirect, flags) } if (redirect->rflags & REDIR_VARASSIGN) - redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + { + redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + r = errno; + if (redirector < 0) + sys_error (_("redirection error: cannot duplicate fd")); + REDIRECTION_ERROR (redirector, r, fd); + } if (flags & RX_ACTIVE) { - if (flags & RX_UNDOABLE) + if ((flags & RX_UNDOABLE) && ((redirect->rflags & REDIR_VARASSIGN) == 0 || varassign_redir_autoclose)) { - /* 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); + /* Only setup to undo it if the thing to undo is active. + Close if the right option is set and we are doing a + varassign redirection. */ + if (fd != redirector && (redirect->rflags & REDIR_VARASSIGN) && varassign_redir_autoclose) + r = add_undo_close_redirect (redirector); + else if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1)) + r = add_undo_redirect (redirector, ri, -1); else - add_undo_close_redirect (redirector); + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, fd); } #if defined (BUFFERED_INPUT) @@ -964,20 +1127,43 @@ do_redirection_internal (redirect, flags) 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 */ + { + redirector = fcntl (redir_fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */ + r = errno; + if (redirector < 0) + sys_error (_("redirection error: cannot duplicate fd")); + REDIRECTION_ERROR (redirector, r, -1); + } if ((flags & RX_ACTIVE) && (redir_fd != redirector)) { - if (flags & RX_UNDOABLE) + if ((flags & RX_UNDOABLE) && ((redirect->rflags & REDIR_VARASSIGN) == 0 || varassign_redir_autoclose)) { - /* 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); + /* Only setup to undo it if the thing to undo is active. + Close if the right option is set and we are doing a + varassign redirection. */ + if ((redirect->rflags & REDIR_VARASSIGN) && varassign_redir_autoclose) + r = add_undo_close_redirect (redirector); + else if (fcntl (redirector, F_GETFD, 0) != -1) + r = add_undo_redirect (redirector, ri, redir_fd); else - add_undo_close_redirect (redirector); + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, -1); + } + if ((flags & RX_UNDOABLE) && (ri == r_move_input || ri == r_move_output)) + { + /* r_move_input and r_move_output add an additional close() + that needs to be undone */ + if (fcntl (redirector, F_GETFD, 0) != -1) + { + r = add_undo_redirect (redir_fd, r_close_this, -1); + REDIRECTION_ERROR (r, errno, -1); + } } #if defined (BUFFERED_INPUT) - check_bash_input (redirector); + /* inhibit call to sync_buffered_stream() for async processes */ + if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0) + check_bash_input (redirector); #endif if (redirect->rflags & REDIR_VARASSIGN) { @@ -1020,7 +1206,7 @@ do_redirection_internal (redirect, flags) 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) + if ((redirect->flags & RX_INTERNAL) && (redirect->flags & RX_SAVCLEXEC) && redirector >= 3 && (redir_fd >= SHELL_FD_BASE || (redirect->flags & RX_SAVEFD))) SET_OPEN_ON_EXEC (redirector); /* dup-and-close redirection */ @@ -1046,8 +1232,15 @@ do_redirection_internal (redirect, flags) return AMBIGUOUS_REDIRECT; } - if ((flags & RX_UNDOABLE) && (fcntl (redirector, F_GETFD, 0) != -1)) - add_undo_redirect (redirector, ri, -1); + r = 0; + if (flags & RX_UNDOABLE) + { + if (fcntl (redirector, F_GETFD, 0) != -1) + r = add_undo_redirect (redirector, ri, -1); + else + r = add_undo_close_redirect (redirector); + REDIRECTION_ERROR (r, errno, redirector); + } #if defined (COPROCESS_SUPPORT) coproc_fdchk (redirector); @@ -1055,16 +1248,23 @@ do_redirection_internal (redirect, flags) xtrace_fdchk (redirector); #if defined (BUFFERED_INPUT) - check_bash_input (redirector); - close_buffered_fd (redirector); + /* inhibit call to sync_buffered_stream() for async processes */ + if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0) + check_bash_input (redirector); + r = close_buffered_fd (redirector); #else /* !BUFFERED_INPUT */ - close (redirector); + r = close (redirector); #endif /* !BUFFERED_INPUT */ + + if (r < 0 && (flags & RX_INTERNAL) && (errno == EIO || errno == ENOSPC)) + REDIRECTION_ERROR (r, errno, -1); } break; case r_duplicating_input_word: case r_duplicating_output_word: + case r_move_input_word: + case r_move_output_word: break; } return (0); @@ -1081,20 +1281,26 @@ do_redirection_internal (redirect, flags) 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. */ + again with SHELL_FD_BASE. Return 0 on success, -1 on error. */ static int add_undo_redirect (fd, ri, fdbase) int fd; enum r_instruction ri; int fdbase; { - int new_fd, clexec_flag; + int new_fd, clexec_flag, savefd_flag; REDIRECT *new_redirect, *closer, *dummy_redirect; REDIRECTEE sd; + savefd_flag = 0; 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) + { + new_fd = fcntl (fd, F_DUPFD, 0); + savefd_flag = 1; + } if (new_fd < 0) { @@ -1117,7 +1323,9 @@ add_undo_redirect (fd, ri, fdbase) 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) + if (savefd_flag) + new_redirect->flags |= RX_SAVEFD; + if (clexec_flag == 0 && fd >= 3 && (new_fd >= SHELL_FD_BASE || savefd_flag)) new_redirect->flags |= RX_SAVCLEXEC; new_redirect->next = closer; @@ -1132,7 +1340,7 @@ add_undo_redirect (fd, ri, fdbase) 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. + user redirections 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. */ @@ -1163,8 +1371,8 @@ add_undo_redirect (fd, ri, fdbase) } /* Set up to close FD when we are finished with the current command - and its redirections. */ -static void + and its redirections. Return 0 on success, -1 on error. */ +static int add_undo_close_redirect (fd) int fd; { @@ -1177,6 +1385,8 @@ add_undo_close_redirect (fd) closer->flags |= RX_INTERNAL; closer->next = redirection_undo_list; redirection_undo_list = closer; + + return 0; } static void @@ -1214,6 +1424,10 @@ stdin_redirection (ri, redirector) case r_append_err_and_out: case r_output_force: case r_duplicating_output_word: + case r_move_input: + case r_move_output: + case r_move_input_word: + case r_move_output_word: return (0); } return (0); @@ -1233,8 +1447,7 @@ stdin_redirects (redirs) n += stdin_redirection (rp->instruction, rp->redirector.dest); return n; } - -/* These don't yet handle array references */ +/* bind_var_to_int handles array references */ static int redir_varassign (redir, fd) REDIRECT *redir; @@ -1244,27 +1457,65 @@ redir_varassign (redir, fd) SHELL_VAR *v; w = redir->redirector.filename; - v = bind_var_to_int (w->word, fd); + v = bind_var_to_int (w->word, fd, 0); if (v == 0 || readonly_p (v) || noassign_p (v)) return BADVAR_REDIRECT; + stupidly_hack_special_variables (w->word); return 0; } +/* Handles {array[ind]} for redirection words */ static int redir_varvalue (redir) REDIRECT *redir; { SHELL_VAR *v; - char *val; + char *val, *w; intmax_t vmax; int i; +#if defined (ARRAY_VARS) + char *sub; + int len, vr; +#endif + w = redir->redirector.filename->word; /* shorthand */ /* XXX - handle set -u here? */ - v = find_variable (redir->redirector.filename->word); +#if defined (ARRAY_VARS) + if (vr = valid_array_reference (w, 0)) + { + v = array_variable_part (w, 0, &sub, &len); + } + else +#endif + { + v = find_variable (w); +#if defined (ARRAY_VARS) + if (v == 0) + { + v = find_variable_last_nameref (w, 0); + if (v && nameref_p (v)) + { + w = nameref_cell (v); + if (vr = valid_array_reference (w, 0)) + v = array_variable_part (w, 0, &sub, &len); + else + v = find_variable (w); + } + } +#endif + } + if (v == 0 || invisible_p (v)) return -1; +#if defined (ARRAY_VARS) + /* get_variable_value handles references to array variables without + subscripts */ + if (vr && (array_p (v) || assoc_p (v))) + val = get_array_value (w, 0, (array_eltstate_t *)NULL); + else +#endif val = get_variable_value (v); if (val == 0 || *val == 0) return -1; diff --git a/redir.h b/redir.h index 474acda..340dc1c 100644 --- a/redir.h +++ b/redir.h @@ -1,6 +1,6 @@ /* redir.h - functions from redir.c. */ -/* Copyright (C) 1997, 2001, 2005, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2005, 2008, 2009-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,10 +30,14 @@ #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 */ +#define RX_SAVEFD 0x40 /* fd used to save another even if < SHELL_FD_BASE */ -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 *)); +extern void redirection_error PARAMS((REDIRECT *, int, char *)); +extern int do_redirections PARAMS((REDIRECT *, int)); +extern char *redirection_expand PARAMS((WORD_DESC *)); +extern int stdin_redirects PARAMS((REDIRECT *)); + +/* in builtins/evalstring.c for now, could move later */ +extern int open_redir_file PARAMS((REDIRECT *, char **)); #endif /* _REDIR_H_ */ diff --git a/shell.c b/shell.c index 4dd0cb7..a6eefee 100644 --- a/shell.c +++ b/shell.c @@ -1,6 +1,6 @@ /* shell.c -- GNU's idea of the POSIX shell specification. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,7 +38,9 @@ #include #include #include "filecntl.h" -#include +#if defined (HAVE_PWD_H) +# include +#endif #if defined (HAVE_UNISTD_H) # include @@ -49,6 +51,7 @@ #define NEED_SH_SETLINEBUF_DECL /* used in externs.h */ #include "shell.h" +#include "parser.h" #include "flags.h" #include "trap.h" #include "mailcheck.h" @@ -57,6 +60,10 @@ #if defined (JOB_CONTROL) #include "jobs.h" +#else +extern int running_in_background; +extern int initialize_job_control PARAMS((int)); +extern int get_tty_state PARAMS((void)); #endif /* JOB_CONTROL */ #include "input.h" @@ -65,6 +72,8 @@ #if defined (USING_BASH_MALLOC) && defined (DEBUG) && !defined (DISABLE_MALLOC_WRAPPERS) # include +#elif defined (MALLOC_DEBUG) && defined (USING_BASH_MALLOC) +# include #endif #if defined (HISTORY) @@ -73,6 +82,7 @@ #endif #if defined (READLINE) +# include # include "bashline.h" #endif @@ -95,21 +105,12 @@ extern int errno; 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; +int bash_argv_initialized = 0; COMMAND *global_command = (COMMAND *)NULL; @@ -158,6 +159,7 @@ int autocd = 0; This is a superset of the information provided by interactive_shell. */ int startup_state = 0; +int reading_shell_script = 0; /* Special debugging helper. */ int debugging_login_shell = 0; @@ -179,6 +181,7 @@ char *shell_name = (char *)NULL; /* time in seconds when the shell was started */ time_t shell_start_time; +struct timeval shellstart; /* Are we running in an emacs shell window? */ int running_under_emacs; @@ -191,7 +194,7 @@ int have_devfd = 0; #endif /* The name of the .(shell)rc file. */ -static char *bashrc_file = "~/.bashrc"; +static char *bashrc_file = DEFAULT_BASHRC; /* Non-zero means to act more like the Bourne shell on startup. */ static int act_like_sh; @@ -214,19 +217,26 @@ 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. */ +#if defined (READLINE) +int no_line_editing = 0; /* non-zero -> don't do fancy line editing. */ +#else +int no_line_editing = 1; /* can't have line editing without readline */ +#endif +#if defined (TRANSLATABLE_STRINGS) int dump_translatable_strings; /* Dump strings in $"...", don't execute. */ int dump_po_strings; /* Dump strings in $"..." in po format */ +#endif int wordexp_only = 0; /* Do word expansion only */ int protected_mode = 0; /* No command substitution with --wordexp */ +int pretty_print_mode = 0; /* pretty-print a shell script */ + #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 @@ -240,8 +250,10 @@ static const struct { #if defined (DEBUGGER) { "debugger", Int, &debugging_mode, (char **)0x0 }, #endif +#if defined (TRANSLATABLE_STRINGS) { "dump-po-strings", Int, &dump_po_strings, (char **)0x0 }, { "dump-strings", Int, &dump_translatable_strings, (char **)0x0 }, +#endif { "help", Int, &want_initial_help, (char **)0x0 }, { "init-file", Charp, (int *)0x0, &bashrc_file }, { "login", Int, &make_login_shell, (char **)0x0 }, @@ -249,12 +261,15 @@ static const struct { { "noprofile", Int, &no_profile, (char **)0x0 }, { "norc", Int, &no_rc, (char **)0x0 }, { "posix", Int, &posixly_correct, (char **)0x0 }, + { "pretty-print", Int, &pretty_print_mode, (char **)0x0 }, +#if defined (WORDEXP_OPTION) { "protected", Int, &protected_mode, (char **)0x0 }, +#endif { "rcfile", Charp, (int *)0x0, &bashrc_file }, #if defined (RESTRICTED_SHELL) { "restricted", Int, &restricted, (char **)0x0 }, #endif - { "verbose", Int, &echo_input_at_read, (char **)0x0 }, + { "verbose", Int, &verbose_flag, (char **)0x0 }, { "version", Int, &do_version, (char **)0x0 }, #if defined (WORDEXP_OPTION) { "wordexp", Int, &wordexp_only, (char **)0x0 }, @@ -271,6 +286,8 @@ int subshell_argc; char **subshell_argv; char **subshell_envp; +char *exec_argv0; + #if defined (BUFFERED_INPUT) /* The file descriptor from which the shell is reading input. */ int default_buffered_input = -1; @@ -282,6 +299,7 @@ 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 */ +char *shell_script_filename; /* shell script */ int malloc_trace_at_exit = 0; @@ -292,35 +310,38 @@ 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 int parse_long_options PARAMS((char **, int, int)); +static int parse_shell_options PARAMS((char **, int, int)); +static int bind_args PARAMS((char **, int, int, int)); -static void start_debugger __P((void)); +static void start_debugger PARAMS((void)); -static void add_shopt_to_alist __P((char *, int)); -static void run_shopt_alist __P((void)); +static void add_shopt_to_alist PARAMS((char *, int)); +static void run_shopt_alist PARAMS((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 *)); +static void execute_env_file PARAMS((char *)); +static void run_startup_files PARAMS((void)); +static int open_shell_script PARAMS((char *)); +static void set_bash_input PARAMS((void)); +static int run_one_command PARAMS((char *)); #if defined (WORDEXP_OPTION) -static int run_wordexp __P((char *)); +static int run_wordexp PARAMS((char *)); #endif -static int uidget __P((void)); +static int uidget PARAMS((void)); -static void init_interactive __P((void)); -static void init_noninteractive __P((void)); -static void init_interactive_script __P((void)); +static void set_option_defaults PARAMS((void)); +static void reset_option_defaults PARAMS((void)); -static void set_shell_name __P((char *)); -static void shell_initialize __P((void)); -static void shell_reinitialize __P((void)); +static void init_interactive PARAMS((void)); +static void init_noninteractive PARAMS((void)); +static void init_interactive_script PARAMS((void)); -static void show_shell_usage __P((FILE *, int)); +static void set_shell_name PARAMS((char *)); +static void shell_initialize PARAMS((void)); +static void shell_reinitialize PARAMS((void)); + +static void show_shell_usage PARAMS((FILE *, int)); #ifdef __CYGWIN__ static void @@ -374,16 +395,14 @@ main (argc, argv, env) #endif /* Catch early SIGINTs. */ - code = setjmp (top_level); + code = setjmp_nosigs (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 + malloc_set_register (1); /* XXX - change to 1 for malloc debugging */ #endif check_dev_tty (); @@ -406,7 +425,7 @@ main (argc, argv, env) mcheck (programming_error, (void (*) ())0); #endif /* USE_GNU_MALLOC_LIBRARY */ - if (setjmp (subshell_top_level)) + if (setjmp_sigs (subshell_top_level)) { argc = subshell_argc; argv = subshell_argv; @@ -420,7 +439,7 @@ main (argc, argv, env) arg_index = 1; if (arg_index > argc) arg_index = argc; - command_execution_string = (char *)NULL; + command_execution_string = shell_script_filename = (char *)NULL; want_pending_command = locally_skip_execution = read_from_stdin = 0; default_input = stdin; #if defined (BUFFERED_INPUT) @@ -440,19 +459,21 @@ main (argc, argv, env) shell_name++; shell_reinitialize (); - if (setjmp (top_level)) + if (setjmp_nosigs (top_level)) exit (2); } shell_environment = env; set_shell_name (argv[0]); - shell_start_time = NOW; /* NOW now defined in general.h */ + + gettimeofday (&shellstart, 0); + shell_start_time = shellstart.tv_sec; /* 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); @@ -465,6 +486,8 @@ main (argc, argv, env) exit (EXECUTION_SUCCESS); } + echo_input_at_read = verbose_flag; /* --verbose given */ + /* 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); @@ -479,11 +502,13 @@ main (argc, argv, env) set_login_shell ("login_shell", login_shell != 0); +#if defined (TRANSLATABLE_STRINGS) if (dump_po_strings) dump_translatable_strings = 1; if (dump_translatable_strings) read_but_dont_execute = 1; +#endif if (running_setuid && privileged_mode == 0 && act_like_sh == 0) disable_priv_mode (); @@ -503,8 +528,6 @@ main (argc, argv, env) } 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: @@ -525,21 +548,20 @@ main (argc, argv, env) 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. + * means one for login, one for xterm, one for shelltool, etc. There are + * also systems that open persistent FDs to other agents or files as part + * of process startup; these need to be set to be close-on-exec. */ if (login_shell && interactive_shell) { for (i = 3; i < 20; i++) - close (i); + SET_CLOSE_ON_EXEC (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. */ @@ -561,24 +583,45 @@ main (argc, argv, env) 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) + * M-x term -> TERM=eterm-color INSIDE_EMACS='251,term:0.96' (eterm) + * M-x shell -> TERM='dumb' INSIDE_EMACS='25.1,comint' (no line editing) + * + * Older versions of Emacs may set EMACS to 't' or to something like + * '22.1 (term:0.96)' instead of (or in addition to) setting INSIDE_EMACS. + * They may set TERM to 'eterm' instead of 'eterm-color'. They may have + * a now-obsolete command that sets neither EMACS nor INSIDE_EMACS: + * M-x terminal -> TERM='emacs-em7955' (line editing) */ if (interactive_shell) { - char *term, *emacs; + char *term, *emacs, *inside_emacs; + int emacs_term, in_emacs; term = get_string_value ("TERM"); emacs = get_string_value ("EMACS"); + inside_emacs = get_string_value ("INSIDE_EMACS"); + + if (inside_emacs) + { + emacs_term = strstr (inside_emacs, ",term:") != 0; + in_emacs = 1; + } + else if (emacs) + { + /* Infer whether we are in an older Emacs. */ + emacs_term = strstr (emacs, " (term:") != 0; + in_emacs = emacs_term || STREQ (emacs, "t"); + } + else + in_emacs = emacs_term = 0; /* 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"); + no_line_editing |= STREQ (term, "emacs"); + no_line_editing |= in_emacs && 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"); + running_under_emacs = in_emacs || STREQN (term, "emacs", 5); + running_under_emacs += emacs_term && STREQN (term, "eterm", 5); if (running_under_emacs) gnu_error_format = 1; @@ -590,10 +633,10 @@ main (argc, argv, env) /* 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); + code = setjmp_sigs (top_level); if (code) { - if (code == EXITPROG || code == ERREXIT) + if (code == EXITPROG || code == ERREXIT || code == EXITBLTIN) exit_shell (last_command_exit_value); else { @@ -640,13 +683,43 @@ main (argc, argv, env) restricted = 0; #endif + /* Set positional parameters before running startup files. top_level_arg_index + holds the index of the current argument before setting the positional + parameters, so any changes performed in the startup files won't affect + later option processing. */ + if (wordexp_only) + ; /* nothing yet */ + else if (command_execution_string) + arg_index = bind_args (argv, arg_index, argc, 0); /* $0 ... $n */ + else if (arg_index != argc && read_from_stdin == 0) + { + shell_script_filename = argv[arg_index++]; + arg_index = bind_args (argv, arg_index, argc, 1); /* $1 ... $n */ + } + else + arg_index = bind_args (argv, arg_index, argc, 1); /* $1 ... $n */ + /* The startup files are run with `set -e' temporarily disabled. */ if (locally_skip_execution == 0 && running_setuid == 0) { + char *t; + old_errexit_flag = exit_immediately_on_error; exit_immediately_on_error = 0; + /* Temporarily set $0 while running startup files, then restore it so + we get better error messages when trying to open script files. */ + if (shell_script_filename) + { + t = dollar_vars[0]; + dollar_vars[0] = exec_argv0 ? savestring (exec_argv0) : savestring (shell_script_filename); + } run_startup_files (); + if (shell_script_filename) + { + free (dollar_vars[0]); + dollar_vars[0] = t; + } exit_immediately_on_error += old_errexit_flag; } @@ -670,14 +743,16 @@ main (argc, argv, env) if (wordexp_only) { startup_state = 3; - last_command_exit_value = run_wordexp (argv[arg_index]); + last_command_exit_value = run_wordexp (argv[top_level_arg_index]); exit_shell (last_command_exit_value); } #endif + cmd_init (); /* initialize the command object caches */ + uwp_init (); + if (command_execution_string) { - arg_index = bind_args (argv, arg_index, argc, 0); startup_state = 2; if (debugging_mode) @@ -695,26 +770,27 @@ main (argc, argv, env) /* 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++; - } + if (shell_script_filename) + open_shell_script (shell_script_filename); else if (interactive == 0) - /* In this mode, bash is reading a script from stdin, which is a - pipe or redirected file. */ + { + /* 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 */ + default_buffered_input = fileno (stdin); /* == 0 */ #else - setbuf (default_input, (char *)NULL); + setbuf (default_input, (char *)NULL); #endif /* !BUFFERED_INPUT */ + read_from_stdin = 1; + } + else if (top_level_arg_index == argc) /* arg index before startup files */ + /* "If there are no operands and the -c option is not specified, the -s + option shall be assumed." */ + read_from_stdin = 1; 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) + if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0 && (reading_shell_script || interactive_shell == 0)) start_debugger (); /* Do the things that should be done only for interactive shells. */ @@ -747,6 +823,14 @@ main (argc, argv, env) shell_initialized = 1; + if (pretty_print_mode && interactive_shell) + { + internal_warning (_("pretty-printing mode ignored in interactive shells")); + pretty_print_mode = 0; + } + if (pretty_print_mode) + exit_shell (pretty_print_loop ()); + /* Read commands until exit condition. */ reader_loop (); exit_shell (last_command_exit_value); @@ -853,7 +937,9 @@ parse_shell_options (argv, arg_start, arg_end) o_option = argv[next_arg]; if (o_option == 0) { + set_option_defaults (); list_minus_o_opts (-1, (on_or_off == '-') ? 0 : 1); + reset_option_defaults (); break; } if (set_minus_o_option (on_or_off, o_option) != EXECUTION_SUCCESS) @@ -877,7 +963,9 @@ parse_shell_options (argv, arg_start, arg_end) break; case 'D': +#if defined (TRANSLATABLE_STRINGS) dump_translatable_strings = 1; +#endif break; default: @@ -905,17 +993,25 @@ exit_shell (s) fflush (stdout); /* XXX */ fflush (stderr); + /* Clean up the terminal if we are in a state where it's been modified. */ +#if defined (READLINE) + if (RL_ISSTATE (RL_STATE_TERMPREPPED) && rl_deprep_term_function) + (*rl_deprep_term_function) (); +#endif + if (read_tty_modified ()) + read_tty_cleanup (); + /* 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 (); + unlink_all_fifos (); #endif /* PROCESS_SUBSTITUTION */ #if defined (HISTORY) - if (interactive_shell) + if (remember_on_history) maybe_save_shell_history (); #endif /* HISTORY */ @@ -929,10 +1025,12 @@ exit_shell (s) 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 this shell is interactive, or job control is active, 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. We want to do this even if the shell is not + interactive because we set the terminal's process group when job control + is enabled regardless of the interactive status. */ if (subshell_environment == 0) end_job_control (); #endif /* JOB_CONTROL */ @@ -948,13 +1046,40 @@ sh_exit (s) int s; { #if defined (MALLOC_DEBUG) && defined (USING_BASH_MALLOC) - if (malloc_trace_at_exit) + if (malloc_trace_at_exit && (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)) == 0) trace_malloc_stats (get_name_for_error (), (char *)NULL); + /* mlocation_write_table (); */ #endif exit (s); } +/* Exit a subshell, which includes calling the exit trap. We don't want to + do any more cleanup, since a subshell is created as an exact copy of its + parent. */ +void +subshell_exit (s) + int s; +{ + fflush (stdout); + fflush (stderr); + + /* Do trap[0] if defined. Allow it to override the exit status + passed to us. */ + last_command_exit_value = s; + if (signal_is_trapped (0)) + s = run_exit_trap (); + + sh_exit (s); +} + +void +set_exit_status (s) + int s; +{ + set_pipestatus_from_exit (last_command_exit_value = 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 @@ -1005,6 +1130,7 @@ run_startup_files () #endif int sourced_login, run_by_ssh; +#if 1 /* TAG:bash-5.3 andrew.gregory.8@gmail.com 2/21/2022 */ /* 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) @@ -1014,11 +1140,16 @@ run_startup_files () (find_variable ("SSH2_CLIENT") != (SHELL_VAR *)0); #else run_by_ssh = 0; +#endif #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 1 /* TAG:bash-5.3 */ if ((run_by_ssh || isnetconn (fileno (stdin))) && shell_level < 2) +#else + if (isnetconn (fileno (stdin) && shell_level < 2) +#endif { #ifdef SYS_BASHRC # if defined (__OPENNT) @@ -1166,10 +1297,15 @@ maybe_make_restricted (name) temp++; if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME))) { +#if defined (RBASH_STATIC_PATH_VALUE) + bind_variable ("PATH", RBASH_STATIC_PATH_VALUE, 0); + stupidly_hack_special_variables ("PATH"); /* clear hash table */ +#endif set_var_read_only ("PATH"); set_var_read_only ("SHELL"); set_var_read_only ("ENV"); set_var_read_only ("BASH_ENV"); + set_var_read_only ("HISTFILE"); restricted = 1; } return (restricted); @@ -1204,8 +1340,28 @@ uidget () void disable_priv_mode () { - setuid (current_user.uid); - setgid (current_user.gid); + int e; + +#if HAVE_SETRESUID + if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0) +#else + if (setuid (current_user.uid) < 0) +#endif + { + e = errno; + sys_error (_("cannot set uid to %d: effective uid %d"), current_user.uid, current_user.euid); +#if defined (EXIT_ON_SETUID_FAILURE) + if (e == EAGAIN) + exit (e); +#endif + } +#if HAVE_SETRESGID + if (setresgid (current_user.gid, current_user.gid, current_user.gid) < 0) +#else + if (setgid (current_user.gid) < 0) +#endif + sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, current_user.egid); + current_user.euid = current_user.uid; current_user.egid = current_user.gid; } @@ -1218,17 +1374,18 @@ run_wordexp (words) int code, nw, nb; WORD_LIST *wl, *tl, *result; - code = setjmp (top_level); + code = setjmp_nosigs (top_level); if (code != NOT_JUMPED) { switch (code) { - /* Some kind of throw to top_level has occured. */ + /* Some kind of throw to top_level has occurred. */ case FORCE_EOF: return last_command_exit_value = 127; case ERREXIT: case EXITPROG: + case EXITBLTIN: return last_command_exit_value; case DISCARD: return last_command_exit_value = 1; @@ -1293,7 +1450,7 @@ run_one_command (command) { int code; - code = setjmp (top_level); + code = setjmp_nosigs (top_level); if (code != NOT_JUMPED) { @@ -1302,11 +1459,12 @@ run_one_command (command) #endif /* PROCESS_SUBSTITUTION */ switch (code) { - /* Some kind of throw to top_level has occured. */ + /* Some kind of throw to top_level has occurred. */ case FORCE_EOF: return last_command_exit_value = 127; case ERREXIT: case EXITPROG: + case EXITBLTIN: return last_command_exit_value; case DISCARD: return last_command_exit_value = 1; @@ -1314,7 +1472,7 @@ run_one_command (command) command_error ("run_one_command", CMDERR_BADJUMP, code, 0); } } - return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST)); + return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST|SEVAL_RESETLINE)); } #endif /* ONESHOT */ @@ -1324,13 +1482,21 @@ bind_args (argv, arg_start, arg_end, start_index) int arg_start, arg_end, start_index; { register int i; - WORD_LIST *args; + WORD_LIST *args, *tl; + + for (i = arg_start, args = tl = (WORD_LIST *)NULL; i < arg_end; i++) + { + if (args == 0) + args = tl = make_word_list (make_word (argv[i]), args); + else + { + tl->next = make_word_list (make_word (argv[i]), (WORD_LIST *)NULL); + tl = tl->next; + } + } - 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 @@ -1339,12 +1505,23 @@ bind_args (argv, arg_start, arg_end, start_index) 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 */ + if (debugging_mode) + { + push_args (args->next); /* BASH_ARGV and BASH_ARGC */ + bash_argv_initialized = 1; + } } else /* bind to $1...$n for shell script */ { remember_args (args, 1); - push_args (args); /* BASH_ARGV and BASH_ARGC */ + /* We do this unconditionally so something like -O extdebug doesn't + do it first. We're setting the definitive positional params + here. */ + if (debugging_mode) + { + push_args (args); /* BASH_ARGV and BASH_ARGC */ + bash_argv_initialized = 1; + } } dispose_words (args); @@ -1365,12 +1542,21 @@ start_debugger () { #if defined (DEBUGGER) && defined (DEBUGGER_START_FILE) int old_errexit; + int r; old_errexit = exit_immediately_on_error; exit_immediately_on_error = 0; - maybe_execute_file (DEBUGGER_START_FILE, 1); - function_trace_mode = 1; + r = force_execute_file (DEBUGGER_START_FILE, 1); + if (r < 0) + { + internal_warning (_("cannot start debugger; debugging mode disabled")); + debugging_mode = 0; + } + error_trace_mode = function_trace_mode = debugging_mode; + + set_shellopts (); + set_bashopts (); exit_immediately_on_error += old_errexit; #endif @@ -1413,11 +1599,33 @@ open_shell_script (script_name) { e = errno; file_error (filename); - exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT); +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif + sh_exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT); } free (dollar_vars[0]); - dollar_vars[0] = savestring (script_name); + dollar_vars[0] = exec_argv0 ? savestring (exec_argv0) : savestring (script_name); + if (exec_argv0) + { + free (exec_argv0); + exec_argv0 = (char *)NULL; + } + + if (file_isdir (filename)) + { +#if defined (EISDIR) + errno = EISDIR; +#else + errno = EINVAL; +#endif + file_error (filename); +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif + sh_exit (EX_NOINPUT); + } #if defined (ARRAY_VARS) GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); @@ -1451,17 +1659,30 @@ open_shell_script (script_name) { e = errno; if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode)) - internal_error (_("%s: is a directory"), filename); + { +#if defined (EISDIR) + errno = EISDIR; + file_error (filename); +#else + internal_error (_("%s: Is a directory"), filename); +#endif + } else { errno = e; file_error (filename); } +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif exit (EX_NOEXEC); } else if (sample_len > 0 && (check_binary_file (sample, sample_len))) { internal_error (_("%s: cannot execute binary file"), filename); +#if defined (JOB_CONTROL) + end_job_control (); /* just in case we were run as bash -i script */ +#endif exit (EX_BINARY_FILE); } /* Now rewind the file back to the beginning. */ @@ -1473,10 +1694,6 @@ open_shell_script (script_name) 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); @@ -1515,6 +1732,8 @@ open_shell_script (script_name) init_interactive_script (); free (filename); + + reading_shell_script = 1; return (fd); } @@ -1584,7 +1803,7 @@ set_shell_name (argv0) { if (*shell_name == '-') shell_name++; - login_shell++; + login_shell = 1; } if (shell_name[0] == 's' && shell_name[1] == 'h' && shell_name[2] == '\0') @@ -1603,32 +1822,72 @@ set_shell_name (argv0) shell_name = PROGRAM; } +/* Some options are initialized to -1 so we have a way to determine whether + they were set on the command line. This is an issue when listing the option + values at invocation (`bash -o'), so we set the defaults here and reset + them after the call to list_minus_o_options (). */ +/* XXX - could also do this for histexp_flag, jobs_m_flag */ +static void +set_option_defaults () +{ +#if defined (HISTORY) + enable_history_list = 0; +#endif +} + +static void +reset_option_defaults () +{ +#if defined (HISTORY) + enable_history_list = -1; +#endif +} + static void init_interactive () { - expand_aliases = interactive_shell = startup_state = 1; - interactive = 1; + expand_aliases = expaliases_flag = 1; + interactive_shell = startup_state = interactive = 1; +#if defined (HISTORY) + if (enable_history_list == -1) + enable_history_list = 1; /* set default */ + remember_on_history = enable_history_list; +# if defined (BANG_HISTORY) + histexp_flag = history_expansion; /* XXX */ +# endif +#endif } static void init_noninteractive () { #if defined (HISTORY) + if (enable_history_list == -1) /* set default */ + enable_history_list = 0; bash_history_reinit (0); #endif /* HISTORY */ interactive_shell = startup_state = interactive = 0; - expand_aliases = posixly_correct; /* XXX - was 0 not posixly_correct */ + expand_aliases = expaliases_flag = posixly_correct; /* XXX - was 0 not posixly_correct */ no_line_editing = 1; #if defined (JOB_CONTROL) - set_job_control (0); + /* Even if the shell is not interactive, enable job control if the -i or + -m option is supplied at startup. */ + set_job_control (forced_interactive||jobs_m_flag); #endif /* JOB_CONTROL */ } static void init_interactive_script () { +#if defined (HISTORY) + if (enable_history_list == -1) + enable_history_list = 1; +#endif init_noninteractive (); - expand_aliases = interactive_shell = startup_state = 1; + expand_aliases = expaliases_flag = interactive_shell = startup_state = 1; +#if defined (HISTORY) + remember_on_history = enable_history_list; /* XXX */ +#endif } void @@ -1639,7 +1898,11 @@ get_current_user_info () /* Don't fetch this more than once. */ if (current_user.user_name == 0) { +#if defined (__TANDEM) + entry = getpwnam (getlogin ()); +#else entry = getpwuid (current_user.uid); +#endif if (entry) { current_user.user_name = savestring (entry->pw_name); @@ -1655,7 +1918,9 @@ get_current_user_info () current_user.shell = savestring ("/bin/sh"); current_user.home_dir = savestring ("/"); } +#if defined (HAVE_GETPWENT) endpwent (); +#endif } } @@ -1665,6 +1930,7 @@ static void shell_initialize () { char hostname[256]; + int should_be_restricted; /* Line buffer output for stderr and stdout. */ if (shell_initialized == 0) @@ -1703,17 +1969,21 @@ shell_initialize () /* Initialize our interface to the tilde expander. */ tilde_initialize (); +#if defined (RESTRICTED_SHELL) + should_be_restricted = shell_is_restricted (shell_name); +#endif + /* 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); + initialize_shell_variables (shell_environment, privileged_mode||restricted||should_be_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_job_control (jobs_m_flag); /* Initialize input streams to null. */ initialize_bash_input (); @@ -1721,11 +1991,12 @@ shell_initialize () 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. */ + from the environment variables $SHELLOPTS or $BASHOPTS 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); + initialize_shell_options (privileged_mode||restricted||should_be_restricted||running_setuid); + initialize_bashopts (privileged_mode||restricted||should_be_restricted||running_setuid); #else initialize_shell_options (privileged_mode||running_setuid); initialize_bashopts (privileged_mode||running_setuid); @@ -1754,11 +2025,15 @@ shell_reinitialize () /* 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; + forced_interactive = interactive_shell = 0; + subshell_environment = running_in_background = 0; + expand_aliases = expaliases_flag = 0; + bash_argv_initialized = 0; + + /* XXX - should we set jobs_m_flag to 0 here? */ #if defined (HISTORY) - bash_history_reinit (0); + bash_history_reinit (enable_history_list = 0); #endif /* HISTORY */ #if defined (RESTRICTED_SHELL) @@ -1767,7 +2042,7 @@ shell_reinitialize () /* Ensure that the default startup file is used. (Except that we don't execute this file for reinitialized shells). */ - bashrc_file = "~/.bashrc"; + bashrc_file = DEFAULT_BASHRC; /* Delete all variables and functions. They will be reinitialized when the environment is parsed. */ @@ -1800,11 +2075,15 @@ show_shell_usage (fp, extra) 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); + fputs (_("\t-ilrsD 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); + { + set_opts = savestring (shell_builtins[i].short_doc); + break; + } + if (set_opts) { s = strchr (set_opts, '['); @@ -1824,6 +2103,9 @@ show_shell_usage (fp, 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")); + fprintf (fp, "\n"); + fprintf (fp, _("bash home page: \n")); + fprintf (fp, _("General help using GNU software: \n")); } } diff --git a/shell.h b/shell.h index 5eb0caa..6e44bca 100644 --- a/shell.h +++ b/shell.h @@ -1,6 +1,6 @@ /* shell.h -- The data structures used by the shell */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -55,6 +55,8 @@ extern int EOF_Reached; /* Usage messages by builtins result in a return status of 2. */ #define EX_BADUSAGE 2 +#define EX_MISCERROR 2 + /* Special exit statuses used by the shell, internally and externally. */ #define EX_RETRYFAIL 124 #define EX_WEXPCOMSUB 125 @@ -70,6 +72,7 @@ extern int EOF_Reached; #define EX_REDIRFAIL 259 /* redirection failed */ #define EX_BADASSIGN 260 /* variable assignment error */ #define EX_EXPFAIL 261 /* word expansion failed */ +#define EX_DISKFALLBACK 262 /* fall back to disk command from builtin */ /* Flag values that control parameter pattern substitution. */ #define MATCH_ANY 0x000 @@ -80,19 +83,52 @@ extern int EOF_Reached; #define MATCH_GLOBREP 0x010 #define MATCH_QUOTED 0x020 -#define MATCH_STARSUB 0x040 +#define MATCH_ASSIGNRHS 0x040 +#define MATCH_STARSUB 0x080 +#define MATCH_EXPREP 0x100 /* for pattern substitution, expand replacement */ /* Some needed external declarations. */ extern char **shell_environment; extern WORD_LIST *rest_of_args; /* Generalized global variables. */ +extern char *command_execution_string; + extern int debugging_mode; extern int executing, login_shell; extern int interactive, interactive_shell; extern int startup_state; +extern int reading_shell_script; +extern int shell_initialized; +extern int bash_argv_initialized; extern int subshell_environment; +extern int current_command_number; +extern int indirection_level; extern int shell_compatibility_level; +extern int running_under_emacs; + +extern int posixly_correct; +extern int no_line_editing; + +extern char *shell_name; +extern char *current_host_name; + +extern int subshell_argc; +extern char **subshell_argv; +extern char **subshell_envp; + +/* variables managed using shopt */ +extern int hup_on_exit; +extern int check_jobs_at_exit; +extern int autocd; +extern int check_window_size; + +/* from version.c */ +extern int build_version, patch_level; +extern char *dist_version, *release_status; + +extern int locale_mb_cur_max; +extern int locale_utf8locale; /* Structure to pass around that holds a bitmap of file descriptors to close, and the size of that structure. Used in execute_cmd.c. */ @@ -125,23 +161,32 @@ extern struct user_info current_user; # define USE_VAR(x) #endif +#define HEREDOC_MAX 16 + /* 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 { - +typedef struct _sh_parser_state_t +{ /* parsing state */ int parser_state; int *token_state; + char *token; + size_t token_buffer_size; + int eof_token; + /* input line state -- line number saved elsewhere */ int input_line_terminator; int eof_encountered; + int eol_lookahead; #if defined (HANDLE_MULTIBYTE) /* Nothing right now for multibyte state, but might want something later. */ #endif + char **prompt_string_pointer; + /* history state affecting or modified by the parser */ int current_command_line_count; #if defined (HISTORY) @@ -159,9 +204,37 @@ typedef struct _sh_parser_state_t { /* flags state affecting the parser */ int expand_aliases; int echo_input_at_read; - + int need_here_doc; + int here_doc_first_line; + + int esacs_needed; + int expecting_in; + + /* structures affecting the parser */ + void *pushed_strings; + REDIRECT *redir_stack[HEREDOC_MAX]; } sh_parser_state_t; +typedef struct _sh_input_line_state_t +{ + char *input_line; + size_t input_line_index; + size_t input_line_size; + size_t input_line_len; +#if defined (HANDLE_MULTIBYTE) + char *input_property; + size_t input_propsize; +#endif +} sh_input_line_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 *)); +extern void shell_ungets PARAMS((char *)); +extern void rewind_input_string PARAMS((void)); + +extern char *parser_remaining_input PARAMS((void)); + +extern sh_parser_state_t *save_parser_state PARAMS((sh_parser_state_t *)); +extern void restore_parser_state PARAMS((sh_parser_state_t *)); + +extern sh_input_line_state_t *save_input_line_state PARAMS((sh_input_line_state_t *)); +extern void restore_input_line_state PARAMS((sh_input_line_state_t *)); diff --git a/sig.c b/sig.c index a217b89..78980aa 100644 --- a/sig.c +++ b/sig.c @@ -1,6 +1,6 @@ /* sig.c - interface for shell signal handlers and signal initialization. */ -/* Copyright (C) 1994-2009 Free Software Foundation, Inc. +/* Copyright (C) 1994-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,6 +35,7 @@ #include "bashintl.h" #include "shell.h" +#include "execute_cmd.h" #if defined (JOB_CONTROL) #include "jobs.h" #endif /* JOB_CONTROL */ @@ -43,31 +44,35 @@ #include "trap.h" #include "builtins/common.h" +#include "builtins/builtext.h" #if defined (READLINE) # include "bashline.h" +# include #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; +extern void initialize_siglist PARAMS((void)); +extern void set_original_signal PARAMS((int, SigHandler *)); + +#if !defined (JOB_CONTROL) +extern void initialize_job_signals PARAMS((void)); +#endif /* Non-zero after SIGINT. */ -volatile int interrupt_state = 0; +volatile sig_atomic_t interrupt_state = 0; /* Non-zero after SIGWINCH */ -volatile int sigwinch_received = 0; +volatile sig_atomic_t sigwinch_received = 0; + +/* Non-zero after SIGTERM */ +volatile sig_atomic_t sigterm_received = 0; /* Set to the value of any terminating signal received. */ -volatile int terminating_signal = 0; +volatile sig_atomic_t terminating_signal = 0; /* The environment at the top-level R-E loop. We use this in the case of error return. */ @@ -88,7 +93,8 @@ int terminate_immediately = 0; static SigHandler *old_winch = (SigHandler *)SIG_DFL; #endif -static void initialize_shell_signals __P((void)); +static void initialize_shell_signals PARAMS((void)); +static void kill_shell PARAMS((int)); void initialize_signals (reinit) @@ -109,6 +115,7 @@ struct termsig { int signum; SigHandler *orig_handler; int orig_flags; + int core_dump; }; #define NULL_HANDLER (SigHandler *)SIG_DFL @@ -126,15 +133,15 @@ static struct termsig terminating_signals[] = { #endif #ifdef SIGILL -{ SIGILL, NULL_HANDLER, 0 }, +{ SIGILL, NULL_HANDLER, 0, 1}, #endif #ifdef SIGTRAP -{ SIGTRAP, NULL_HANDLER, 0 }, +{ SIGTRAP, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGIOT -{ SIGIOT, NULL_HANDLER, 0 }, +{ SIGIOT, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGDANGER @@ -146,19 +153,19 @@ static struct termsig terminating_signals[] = { #endif #ifdef SIGFPE -{ SIGFPE, NULL_HANDLER, 0 }, +{ SIGFPE, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGBUS -{ SIGBUS, NULL_HANDLER, 0 }, +{ SIGBUS, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGSEGV -{ SIGSEGV, NULL_HANDLER, 0 }, +{ SIGSEGV, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGSYS -{ SIGSYS, NULL_HANDLER, 0 }, +{ SIGSYS, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGPIPE @@ -173,12 +180,14 @@ static struct termsig terminating_signals[] = { { SIGTERM, NULL_HANDLER, 0 }, #endif +/* These don't generate core dumps on anything but Linux, but we're doing + this just for Linux anyway. */ #ifdef SIGXCPU -{ SIGXCPU, NULL_HANDLER, 0 }, +{ SIGXCPU, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGXFSZ -{ SIGXFSZ, NULL_HANDLER, 0 }, +{ SIGXFSZ, NULL_HANDLER, 0, 1 }, #endif #ifdef SIGVTALRM @@ -209,12 +218,14 @@ static struct termsig terminating_signals[] = { #define XSIG(x) (terminating_signals[x].signum) #define XHANDLER(x) (terminating_signals[x].orig_handler) #define XSAFLAGS(x) (terminating_signals[x].orig_flags) +#define XCOREDUMP(x) (terminating_signals[x].core_dump) 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). */ + this when a trap is defined for EXIT (0) or when trap is run + to display signal dispositions. */ void initialize_terminating_signals () { @@ -246,19 +257,26 @@ initialize_terminating_signals () sigaction (XSIG (i), &act, &oact); XHANDLER(i) = oact.sa_handler; XSAFLAGS(i) = oact.sa_flags; + +#if 0 + set_original_signal (XSIG(i), XHANDLER(i)); /* optimization */ +#else + set_original_signal (XSIG(i), act.sa_handler); /* optimization */ +#endif + /* 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) + /* XXX - should we do this for interactive shells, too? */ + if (interactive_shell == 0 && XHANDLER (i) == SIG_IGN) { sigaction (XSIG (i), &oact, &act); - set_signal_ignored (XSIG (i)); + set_signal_hard_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++) @@ -271,10 +289,11 @@ initialize_terminating_signals () 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) + /* XXX - should we do this for interactive shells, too? */ + if (interactive_shell == 0 && XHANDLER (i) == SIG_IGN) { signal (XSIG (i), SIG_IGN); - set_signal_ignored (XSIG (i)); + set_signal_hard_ignored (XSIG (i)); } #ifdef SIGPROF if (XSIG (i) == SIGPROF && XHANDLER (i) != SIG_DFL && XHANDLER (i) != SIG_IGN) @@ -299,7 +318,11 @@ initialize_shell_signals () sigemptyset (&top_level_mask); sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &top_level_mask); # if defined (SIGCHLD) - sigdelset (&top_level_mask, SIGCHLD); + if (sigismember (&top_level_mask, SIGCHLD)) + { + sigdelset (&top_level_mask, SIGCHLD); + sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL); + } # endif #endif /* JOB_CONTROL || HAVE_POSIX_SIGNALS */ @@ -309,6 +332,7 @@ initialize_shell_signals () if (interactive) { set_signal_handler (SIGINT, sigint_sighandler); + get_original_signal (SIGTERM); set_signal_handler (SIGTERM, SIG_IGN); set_sigwinch_handler (); } @@ -348,8 +372,9 @@ reset_terminating_signals () signal (XSIG (i), XHANDLER (i)); } #endif /* !HAVE_POSIX_SIGNALS */ + + termsigs_initialized = 0; } -#undef XSIG #undef XHANDLER /* Run some of the cleanups that should be performed when we run @@ -360,15 +385,15 @@ top_level_cleanup () { /* Clean up string parser environment. */ while (parse_and_execute_level) - parse_and_execute_cleanup (); + parse_and_execute_cleanup (-1); #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; + loop_level = continuing = breaking = funcnest = 0; + executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; } /* What to do when we've been interrupted, and it is safe to handle it. */ @@ -379,6 +404,9 @@ throw_to_top_level () if (interrupt_state) { + if (last_command_exit_value < 128) + last_command_exit_value = 128 + SIGINT; + set_pipestatus_from_exit (last_command_exit_value); print_newline = 1; DELINTERRUPT; } @@ -389,22 +417,29 @@ throw_to_top_level () last_command_exit_signal = (last_command_exit_value > 128) ? (last_command_exit_value - 128) : 0; last_command_exit_value |= 128; + set_pipestatus_from_exit (last_command_exit_value); - /* Run any traps set on SIGINT. */ - run_interrupt_trap (); + /* Run any traps set on SIGINT, mostly for interactive shells */ + if (signal_is_trapped (SIGINT) && signal_is_pending (SIGINT)) + run_interrupt_trap (1); /* Clean up string parser environment. */ while (parse_and_execute_level) - parse_and_execute_cleanup (); + parse_and_execute_cleanup (-1); + + if (running_trap > 0) + { + run_trap_cleanup (running_trap - 1); + running_trap = 0; + } #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 + /* This needs to stay because jobs.c:make_child() uses it without resetting + the signal mask. */ + restore_sigmask (); reset_parser (); @@ -418,8 +453,8 @@ throw_to_top_level () #endif /* PROCESS_SUBSTITUTION */ run_unwind_protects (); - loop_level = continuing = breaking = 0; - executing_list = comsub_ignore_return = return_catch_flag = 0; + loop_level = continuing = breaking = funcnest = 0; + executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; if (interactive && print_newline) { @@ -441,9 +476,19 @@ void jump_to_top_level (value) int value; { - longjmp (top_level, value); + sh_longjmp (top_level, value); +} + +void +restore_sigmask () +{ +#if defined (JOB_CONTROL) || defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL); +#endif } +static int handling_termsig = 0; + sighandler termsig_sighandler (sig) int sig; @@ -490,15 +535,39 @@ termsig_sighandler (sig) sig == terminating_signal) terminate_immediately = 1; + /* If we are currently handling a terminating signal, we have a couple of + choices here. We can ignore this second terminating signal and let the + shell exit from the first one, or we can exit immediately by killing + the shell with this signal. This code implements the latter; to implement + the former, replace the kill_shell(sig) with return. */ + if (handling_termsig) + kill_shell (sig); /* just short-circuit now */ + terminating_signal = sig; - /* XXX - should this also trigger when interrupt_immediately is set? */ if (terminate_immediately) { +#if defined (HISTORY) + /* XXX - will inhibit history file being written */ +# if defined (READLINE) + if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0)) +# endif + history_lines_this_session = 0; +#endif terminate_immediately = 0; termsig_handler (sig); } +#if defined (READLINE) + /* Set the event hook so readline will call it after the signal handlers + finish executing, so if this interrupted character input we can get + quick response. If readline is active or has modified the terminal we + need to set this no matter what the signal is, though the check for + RL_STATE_TERMPREPPED is possibly redundant. */ + if (RL_ISSTATE (RL_STATE_SIGHANDLER) || RL_ISSTATE (RL_STATE_TERMPREPPED)) + bashline_set_event_hook (); +#endif + SIGRETURN (0); } @@ -506,43 +575,100 @@ 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; + + handling_termsig = terminating_signal; /* for termsig_sighandler */ 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 (); + run_interrupt_trap (0); #if defined (HISTORY) - if (interactive_shell && sig != SIGABRT) + /* If we don't do something like this, the history will not be saved when + an interactive shell is running in a terminal window that gets closed + with the `close' button. We can't test for RL_STATE_READCMD because + readline no longer handles SIGTERM synchronously. */ + if (interactive_shell && interactive && (sig == SIGHUP || sig == SIGTERM) && remember_on_history) maybe_save_shell_history (); #endif /* HISTORY */ + if (this_shell_builtin == read_builtin) + read_tty_cleanup (); + #if defined (JOB_CONTROL) if (sig == SIGHUP && (interactive || (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)))) hangup_all_jobs (); - end_job_control (); + + if ((subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)) == 0) + end_job_control (); #endif /* JOB_CONTROL */ #if defined (PROCESS_SUBSTITUTION) - unlink_fifo_list (); + unlink_all_fifos (); +# if defined (JOB_CONTROL) + procsub_clear (); +# endif #endif /* PROCESS_SUBSTITUTION */ /* Reset execution context */ - loop_level = continuing = breaking = 0; - executing_list = comsub_ignore_return = return_catch_flag = 0; + loop_level = continuing = breaking = funcnest = 0; + executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; + + run_exit_trap (); /* XXX - run exit trap possibly in signal context? */ + + kill_shell (sig); +} + +static void +kill_shell (sig) + int sig; +{ + int i, core; + sigset_t mask; + + /* We don't change the set of blocked signals. If a user starts the shell + with a terminating signal blocked, we won't get here (and if by some + magic chance we do, we'll exit below). What we do is to restore the + top-level signal mask, in case this is called from a terminating signal + handler context, in which case the signal is blocked. */ + restore_sigmask (); - run_exit_trap (); set_signal_handler (sig, SIG_DFL); + kill (getpid (), sig); + + if (dollar_dollar_pid != 1) + exit (128+sig); /* just in case the kill fails? */ + + /* We get here only under extraordinary circumstances. */ + + /* We are PID 1, and the kill above failed to kill the process. We assume + this means that we are running as an init process in a pid namespace + on Linux. In this case, we can't send ourselves a fatal signal, so we + determine whether or not we should have generated a core dump with the + kill call and attempt to trick the kernel into generating one if + necessary. */ + sigprocmask (SIG_SETMASK, (sigset_t *)NULL, &mask); + for (i = core = 0; i < TERMSIGS_LENGTH; i++) + { + set_signal_handler (XSIG (i), SIG_DFL); + sigdelset (&mask, XSIG (i)); + if (sig == XSIG (i)) + core = XCOREDUMP (i); + } + sigprocmask (SIG_SETMASK, &mask, (sigset_t *)NULL); + + if (core) + *((volatile unsigned long *) NULL) = 0xdead0000 + sig; /* SIGSEGV */ + + exit (128+sig); } +#undef XSIG /* What we really do when SIGINT occurs. */ sighandler @@ -558,12 +684,36 @@ sigint_sighandler (sig) if (interrupt_state == 0) ADDINTERRUPT; + /* We will get here in interactive shells with job control active; allow + an interactive wait to be interrupted. wait_intr_flag is only set during + the execution of the wait builtin and when wait_intr_buf is valid. */ + if (wait_intr_flag) + { + last_command_exit_value = 128 + sig; + set_pipestatus_from_exit (last_command_exit_value); + wait_signal_received = sig; + SIGRETURN (0); + } + + /* In interactive shells, we will get here instead of trap_handler() so + note that we have a trap pending. */ + if (signal_is_trapped (sig)) + set_trap_state (sig); + + /* This is no longer used, but this code block remains as a reminder. */ if (interrupt_immediately) { interrupt_immediately = 0; - last_command_exit_value = 128 + sig; + set_exit_status (128 + sig); throw_to_top_level (); } +#if defined (READLINE) + /* Set the event hook so readline will call it after the signal handlers + finish executing, so if this interrupted character input we can get + quick response. */ + else if (RL_ISSTATE (RL_STATE_SIGHANDLER)) + bashline_set_event_hook (); +#endif SIGRETURN (0); } @@ -597,10 +747,17 @@ unset_sigwinch_handler () #endif } +sighandler +sigterm_sighandler (sig) + int sig; +{ + sigterm_received = 1; /* XXX - counter? */ + SIGRETURN (0); +} + /* 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; @@ -619,7 +776,7 @@ sigprocmask (operation, newset, oldset) break; case SIG_SETMASK: - sigsetmask (new); + old = sigsetmask (new); break; default: @@ -629,7 +786,6 @@ sigprocmask (operation, newset, oldset) if (oldset) *oldset = old; } -#endif /* JOB_CONTROL */ #else @@ -650,15 +806,30 @@ set_signal_handler (sig, handler) act.sa_handler = handler; act.sa_flags = 0; -#if 0 - if (sig == SIGALRM) - act.sa_flags |= SA_INTERRUPT; /* XXX */ - else + + /* XXX - bash-4.2 */ + /* We don't want a child death to interrupt interruptible system calls, even + if we take the time to reap children */ +#if defined (SIGCHLD) + if (sig == SIGCHLD) + act.sa_flags |= SA_RESTART; /* XXX */ +#endif + /* Let's see if we can keep SIGWINCH from interrupting interruptible system + calls, like open(2)/read(2)/write(2) */ +#if defined (SIGWINCH) + if (sig == SIGWINCH) act.sa_flags |= SA_RESTART; /* XXX */ #endif + /* If we're installing a SIGTERM handler for interactive shells, we want + it to be as close to SIG_IGN as possible. */ + if (sig == SIGTERM && handler == sigterm_sighandler) + act.sa_flags |= SA_RESTART; /* XXX */ + sigemptyset (&act.sa_mask); sigemptyset (&oact.sa_mask); - sigaction (sig, &act, &oact); - return (oact.sa_handler); + if (sigaction (sig, &act, &oact) == 0) + return (oact.sa_handler); + else + return (SIG_DFL); } #endif /* HAVE_POSIX_SIGNALS */ diff --git a/sig.h b/sig.h index d67f6cc..0217be5 100644 --- a/sig.h +++ b/sig.h @@ -1,6 +1,6 @@ /* sig.h -- header file for signal handler definitions. */ -/* Copyright (C) 1994-2009 Free Software Foundation, Inc. +/* Copyright (C) 1994-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,18 +25,16 @@ #include "stdc.h" +#include /* for sig_atomic_t */ + #if !defined (SIGABRT) && defined (SIGIOT) # define SIGABRT SIGIOT #endif -#define sighandler RETSIGTYPE -typedef RETSIGTYPE SigHandler __P((int)); +#define sighandler void +typedef void SigHandler PARAMS((int)); -#if defined (VOID_SIGHANDLER) -# define SIGRETURN(n) return -#else -# define SIGRETURN(n) return(n) -#endif /* !VOID_SIGHANDLER */ +#define SIGRETURN(n) return /* 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 @@ -44,12 +42,9 @@ typedef RETSIGTYPE SigHandler __P((int)); #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 */ +extern SigHandler *set_signal_handler PARAMS((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 @@ -96,42 +91,46 @@ do { \ sigprocmask (SIG_BLOCK, &nvar, &ovar); \ } while (0) +#define UNBLOCK_SIGNAL(ovar) sigprocmask (SIG_SETMASK, &ovar, (sigset_t *) NULL) + #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) +# define BLOCK_CHILD(nvar, ovar) BLOCK_SIGNAL (SIGCHLD, nvar, ovar) +# define UNBLOCK_CHILD(ovar) UNBLOCK_SIGNAL(ovar) #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 volatile sig_atomic_t sigwinch_received; +extern volatile sig_atomic_t sigterm_received; -extern int interrupt_immediately; +extern int interrupt_immediately; /* no longer used */ 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)); +extern sighandler termsig_sighandler PARAMS((int)); +extern void termsig_handler PARAMS((int)); +extern sighandler sigint_sighandler PARAMS((int)); +extern void initialize_signals PARAMS((int)); +extern void initialize_terminating_signals PARAMS((void)); +extern void reset_terminating_signals PARAMS((void)); +extern void top_level_cleanup PARAMS((void)); +extern void throw_to_top_level PARAMS((void)); +extern void jump_to_top_level PARAMS((int)) __attribute__((__noreturn__)); +extern void restore_sigmask PARAMS((void)); + +extern sighandler sigwinch_sighandler PARAMS((int)); +extern void set_sigwinch_handler PARAMS((void)); +extern void unset_sigwinch_handler PARAMS((void)); + +extern sighandler sigterm_sighandler PARAMS((int)); /* 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)); +extern SigHandler *set_sigint_handler PARAMS((void)); +extern SigHandler *trap_to_sighandler PARAMS((int)); +extern sighandler trap_handler PARAMS((int)); +extern int block_trapped_signals PARAMS((sigset_t *, sigset_t *)); +extern int unblock_trapped_signals PARAMS((sigset_t *)); #endif /* _SIG_H_ */ diff --git a/siglist.c b/siglist.c index 0e51b83..ec706c9 100644 --- a/siglist.c +++ b/siglist.c @@ -1,6 +1,6 @@ /* siglist.c -- signal list for those machines that don't have one. */ -/* Copyright (C) 1989-2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,7 +23,8 @@ #if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_STRSIGNAL) #include -#include "bashtypes.h" +#include "command.h" +#include "general.h" #include #include "siglist.h" @@ -33,7 +34,6 @@ #endif #include "bashintl.h" -#include "xmalloc.h" char *sys_siglist[NSIG]; @@ -220,7 +220,7 @@ initialize_siglist () if (!sys_siglist[i]) { sys_siglist[i] = - (char *)xmalloc (10 + strlen (_("Unknown Signal #"))); + (char *)xmalloc (INT_STRLEN_BOUND (int) + 1 + strlen (_("Unknown Signal #%d"))); sprintf (sys_siglist[i], _("Unknown Signal #%d"), i); } diff --git a/siglist.h b/siglist.h index 4cb6530..321c20c 100644 --- a/siglist.h +++ b/siglist.h @@ -1,6 +1,6 @@ /* siglist.h -- encapsulate various definitions for sys_siglist */ -/* Copyright (C) 1993, 2001, 2005, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1993, 2001, 2005, 2008-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,7 +38,7 @@ extern char *sys_siglist[]; #endif /* !strsignal && !HAVE_STRSIGNAL */ #if !defined (strsignal) && !HAVE_DECL_STRSIGNAL -extern char *strsignal __P((int)); +extern char *strsignal PARAMS((int)); #endif #endif /* _SIGLIST_H */ diff --git a/stringlib.c b/stringlib.c index 0a612ca..7330496 100644 --- a/stringlib.c +++ b/stringlib.c @@ -133,7 +133,7 @@ substring (string, start, end) len = end - start; result = (char *)xmalloc (len + 1); - strncpy (result, string + start, len); + memcpy (result, string + start, len); result[len] = '\0'; return (result); } @@ -146,7 +146,8 @@ strsub (string, pat, rep, global) char *string, *pat, *rep; int global; { - int patlen, replen, templen, tempsize, repl, i; + size_t patlen, replen, templen, tempsize, i; + int repl; char *temp, *r; patlen = strlen (pat); @@ -158,7 +159,7 @@ strsub (string, pat, rep, global) if (replen) RESIZE_MALLOCED_BUFFER (temp, templen, replen, tempsize, (replen * 2)); - for (r = rep; *r; ) + for (r = rep; *r; ) /* can rep == "" */ temp[templen++] = *r++; i += patlen ? patlen : 1; /* avoid infinite recursion */ @@ -178,17 +179,22 @@ strsub (string, pat, rep, global) } /* 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. */ + NULL. If (FLAGS & 1) is non-zero, we quote the replacement text for + globbing. Backslash may be used to quote C. If (FLAGS & 2) we allow + backslash to escape backslash as well. */ char * -strcreplace (string, c, text, do_glob) +strcreplace (string, c, text, flags) char *string; int c; - char *text; - int do_glob; + const char *text; + int flags; { char *ret, *p, *r, *t; - int len, rlen, ind, tlen; + size_t len, rlen, ind, tlen; + int do_glob, escape_backslash; + + do_glob = flags & 1; + escape_backslash = flags & 2; len = STRLEN (text); rlen = len + strlen (string) + 2; @@ -225,6 +231,8 @@ strcreplace (string, c, text, do_glob) if (*p == '\\' && p[1] == c) p++; + else if (escape_backslash && *p == '\\' && p[1] == '\\') + p++; ind = r - ret; RESIZE_MALLOCED_BUFFER (ret, ind, 2, rlen, rlen); diff --git a/subst.c b/subst.c index 81a3256..2012e1f 100644 --- a/subst.c +++ b/subst.c @@ -4,7 +4,7 @@ /* ``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. +/* Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -37,11 +37,15 @@ # include #endif +#define NEED_FPURGE_DECL + #include "bashansi.h" #include "posixstat.h" #include "bashintl.h" #include "shell.h" +#include "parser.h" +#include "redir.h" #include "flags.h" #include "jobs.h" #include "execute_cmd.h" @@ -51,6 +55,10 @@ #include "mailcheck.h" #include "shmbutil.h" +#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR) +# include /* mbschr */ +#endif +#include "typemax.h" #include "builtins/getopt.h" #include "builtins/common.h" @@ -83,31 +91,31 @@ extern int errno; #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 ')' +#define LBRACK '[' +#define RBRACK ']' #if defined (HANDLE_MULTIBYTE) #define WLPAREN L'(' #define WRPAREN L')' #endif +#define DOLLAR_AT_STAR(c) ((c) == '@' || (c) == '*') +#define STR_DOLLAR_AT_STAR(s) (DOLLAR_AT_STAR ((s)[0]) && (s)[1] == '\0') + /* 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) == '#') + ((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) == '*') + ((posixly_correct == 0 && (c) == '#') || (posixly_correct == 0 && (c) == '?') || (c) == '@' || (c) == '*') /* Evaluates to 1 if C is one of the OP characters that follows the parameter in ${parameter[:]OPword}. */ @@ -115,14 +123,28 @@ extern int errno; /* Evaluates to 1 if this is one of the shell's special variables. */ #define SPECIAL_VAR(name, wi) \ - ((DIGIT (*name) && all_digits (name)) || \ + (*name && ((DIGIT (*name) && all_digits (name)) || \ (name[1] == '\0' && (sh_syntaxtab[(unsigned char)*name] & CSPECVAR)) || \ - (wi && name[2] == '\0' && VALID_INDIR_PARAM (name[1]))) + (wi && name[2] == '\0' && VALID_INDIR_PARAM (name[1])))) + +/* This can be used by all of the *_extract_* functions that have a similar + structure. It can't just be wrapped in a do...while(0) loop because of + the embedded `break'. The dangling else accommodates a trailing semicolon; + we could also put in a do ; while (0) */ + +#define CHECK_STRING_OVERRUN(oind, ind, len, ch) \ + if (ind >= len) \ + { \ + oind = len; \ + ch = 0; \ + break; \ + } \ + else \ /* 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)); +typedef WORD_LIST *EXPFUNC PARAMS((char *, int)); /* Process ID of the last command executed within command substitution. */ pid_t last_command_subst_pid = NO_PID; @@ -132,6 +154,7 @@ pid_t current_command_subst_pid = NO_PID; SHELL_VAR *ifs_var; char *ifs_value; unsigned char ifs_cmap[UCHAR_MAX + 1]; +int ifs_is_set, ifs_is_null; #if defined (HANDLE_MULTIBYTE) unsigned char ifs_firstc[MB_LEN_MAX]; @@ -140,6 +163,9 @@ size_t ifs_firstc_len; unsigned char ifs_firstc; #endif +/* If non-zero, command substitution inherits the value of errexit option */ +int inherit_errexit = 0; + /* 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. */ @@ -150,23 +176,9 @@ int assigning_in_environment; 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 +/* Tell the expansion functions to not longjmp back to top_level on fatal + errors. Enabled when doing completion and prompt string expansion. */ +int no_longjmp_on_fatal_error = 0; /* Non-zero means to allow unmatched globbed filenames to expand to a null file. */ @@ -175,6 +187,24 @@ int allow_null_glob_expansion; /* Non-zero means to throw an error when globbing fails to match anything. */ int fail_glob_expansion; +/* If non-zero, perform `&' substitution on the replacement string in the + pattern substitution word expansion. */ +int patsub_replacement = 1; + +/* Extern functions and variables from different files. */ +extern struct fd_bitmap *current_fds_to_close; +extern int wordexp_only; +extern int singlequote_translations; +extern int extended_quote; + +#if defined (JOB_CONTROL) && defined (PROCESS_SUBSTITUTION) +extern PROCESS *last_procsub_child; +#endif + +#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE) +extern wchar_t *wcsdup PARAMS((const wchar_t *)); +#endif + #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 @@ -184,135 +214,164 @@ char *glob_argv_flags; static int glob_argv_flags_size; #endif +static WORD_LIST *cached_quoted_dollar_at = 0; + +/* Distinguished error values to return from expansion functions */ 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 expand_param_error, expand_param_fatal, expand_param_unset; 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. */ +/* Set by expand_word_unsplit and several of the expand_string_XXX functions; + used to inhibit splitting and re-joining $* on $IFS, primarily when doing + assignment statements. The idea is that if we're in a context where this + is set, we're not going to be performing word splitting, so we use the same + rules to expand $* as we would if it appeared within double quotes. */ 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 *quoted_substring PARAMS((char *, int, int)); +static int quoted_strlen PARAMS((char *)); +static char *quoted_strchr PARAMS((char *, int, int)); + +static char *expand_string_if_necessary PARAMS((char *, int, EXPFUNC *)); +static inline char *expand_string_to_string_internal PARAMS((char *, int, EXPFUNC *)); +static WORD_LIST *call_expand_word_internal PARAMS((WORD_DESC *, int, int, int *, int *)); +static WORD_LIST *expand_string_internal PARAMS((char *, int)); +static WORD_LIST *expand_string_leave_quoted PARAMS((char *, int)); +static WORD_LIST *expand_string_for_rhs PARAMS((char *, int, int, int, int *, int *)); +static WORD_LIST *expand_string_for_pat PARAMS((char *, int, 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 char *quote_escapes_internal PARAMS((const char *, 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 WORD_LIST *list_quote_escapes PARAMS((WORD_LIST *)); +static WORD_LIST *list_dequote_escapes PARAMS((WORD_LIST *)); -static int unquoted_substring __P((char *, char *)); -static int unquoted_member __P((int, char *)); +static char *make_quoted_char PARAMS((int)); +static WORD_LIST *quote_list PARAMS((WORD_LIST *)); + +static int unquoted_substring PARAMS((char *, char *)); +static int unquoted_member PARAMS((int, char *)); #if defined (ARRAY_VARS) -static SHELL_VAR *do_compound_assignment __P((char *, char *, int)); +static SHELL_VAR *do_compound_assignment PARAMS((char *, char *, int)); #endif -static int do_assignment_internal __P((const WORD_DESC *, int)); +static int do_assignment_internal PARAMS((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 *string_extract_verbatim PARAMS((char *, size_t, int *, char *, int)); +static char *string_extract PARAMS((char *, int *, char *, int)); +static char *string_extract_double_quoted PARAMS((char *, int *, int)); +static inline char *string_extract_single_quoted PARAMS((char *, int *, int)); +static inline int skip_single_quoted PARAMS((const char *, size_t, int, int)); +static int skip_double_quoted PARAMS((char *, size_t, int, int)); +static char *extract_delimited_string PARAMS((char *, int *, char *, char *, char *, int)); +static char *extract_heredoc_dolbrace_string PARAMS((char *, int *, int, int)); +static char *extract_dollar_brace_string PARAMS((char *, int *, int, int)); +static int skip_matched_pair PARAMS((const char *, int, int, int, int)); -static char *pos_params __P((char *, int, int, int)); +static char *pos_params PARAMS((char *, int, int, int, int)); -static unsigned char *mb_getcharlens __P((char *, int)); +static unsigned char *mb_getcharlens PARAMS((char *, int)); -static char *remove_upattern __P((char *, char *, int)); +static char *remove_upattern PARAMS((char *, char *, int)); #if defined (HANDLE_MULTIBYTE) -static wchar_t *remove_wpattern __P((wchar_t *, size_t, wchar_t *, int)); +static wchar_t *remove_wpattern PARAMS((wchar_t *, size_t, wchar_t *, int)); #endif -static char *remove_pattern __P((char *, char *, int)); +static char *remove_pattern PARAMS((char *, char *, int)); -static int match_pattern_char __P((char *, char *)); -static int match_upattern __P((char *, char *, int, char **, char **)); +static int match_upattern PARAMS((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)); +static int match_wpattern PARAMS((wchar_t *, char **, size_t, wchar_t *, int, char **, char **)); +#endif +static int match_pattern PARAMS((char *, char *, int, char **, char **)); +static int getpatspec PARAMS((int, char *)); +static char *getpattern PARAMS((char *, int, int)); +static char *variable_remove_pattern PARAMS((char *, char *, int, int)); +static char *list_remove_pattern PARAMS((WORD_LIST *, char *, int, int, int)); +static char *parameter_list_remove_pattern PARAMS((int, char *, int, int)); #ifdef ARRAY_VARS -static char *array_remove_pattern __P((SHELL_VAR *, char *, int, char *, int)); +static char *array_remove_pattern PARAMS((SHELL_VAR *, char *, int, int, int)); +#endif +static char *parameter_brace_remove_pattern PARAMS((char *, char *, array_eltstate_t *, char *, int, int, int)); + +static char *string_var_assignment PARAMS((SHELL_VAR *, char *)); +#if defined (ARRAY_VARS) +static char *array_var_assignment PARAMS((SHELL_VAR *, int, int, int)); +#endif +static char *pos_params_assignment PARAMS((WORD_LIST *, int, int)); +static char *string_transform PARAMS((int, SHELL_VAR *, char *)); +static char *list_transform PARAMS((int, SHELL_VAR *, WORD_LIST *, int, int)); +static char *parameter_list_transform PARAMS((int, int, int)); +#if defined ARRAY_VARS +static char *array_transform PARAMS((int, SHELL_VAR *, int, int)); #endif -static char *parameter_brace_remove_pattern __P((char *, char *, char *, int, int)); +static char *parameter_brace_transform PARAMS((char *, char *, array_eltstate_t *, char *, int, int, int, int)); +static int valid_parameter_transform PARAMS((char *)); -static char *process_substitute __P((char *, int)); +static char *process_substitute PARAMS((char *, int)); -static char *read_comsub __P((int, int, int *)); +static char *optimize_cat_file PARAMS((REDIRECT *, int, int, int *)); +static char *read_comsub PARAMS((int, int, int, int *)); #ifdef ARRAY_VARS -static arrayind_t array_length_reference __P((char *)); +static arrayind_t array_length_reference PARAMS((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 int valid_brace_expansion_word PARAMS((char *, int)); +static int chk_atstar PARAMS((char *, int, int, int *, int *)); +static int chk_arithsub PARAMS((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 WORD_DESC *parameter_brace_expand_word PARAMS((char *, int, int, int, array_eltstate_t *)); +static char *parameter_brace_find_indir PARAMS((char *, int, int, int)); +static WORD_DESC *parameter_brace_expand_indir PARAMS((char *, int, int, int, int *, int *)); +static WORD_DESC *parameter_brace_expand_rhs PARAMS((char *, char *, int, int, int, int *, int *)); +static void parameter_brace_expand_error PARAMS((char *, char *, int)); -static int valid_length_expression __P((char *)); -static intmax_t parameter_brace_expand_length __P((char *)); +static int valid_length_expression PARAMS((char *)); +static intmax_t parameter_brace_expand_length PARAMS((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 *skiparith PARAMS((char *, int)); +static int verify_substring_values PARAMS((SHELL_VAR *, char *, char *, int, intmax_t *, intmax_t *)); +static int get_var_and_type PARAMS((char *, char *, array_eltstate_t *, int, int, SHELL_VAR **, char **)); +static char *mb_substring PARAMS((char *, int, int)); +static char *parameter_brace_substring PARAMS((char *, char *, array_eltstate_t *, char *, int, int, int)); -static char *pos_params_pat_subst __P((char *, char *, char *, int)); +static int shouldexp_replacement PARAMS((char *)); -static char *parameter_brace_patsub __P((char *, char *, char *, int)); +static char *pos_params_pat_subst PARAMS((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 char *expand_string_for_patsub PARAMS((char *, int)); +static char *parameter_brace_patsub PARAMS((char *, char *, array_eltstate_t *, char *, int, int, 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 char *pos_params_casemod PARAMS((char *, char *, int, int)); +static char *parameter_brace_casemod PARAMS((char *, char *, array_eltstate_t *, int, char *, int, int, int)); -static WORD_LIST *expand_word_internal __P((WORD_DESC *, int, int, int *, int *)); +static WORD_DESC *parameter_brace_expand PARAMS((char *, int *, int, int, int *, int *)); +static WORD_DESC *param_expand PARAMS((char *, int *, int, int *, int *, int *, int *, int)); -static WORD_LIST *word_list_split __P((WORD_LIST *)); +static WORD_LIST *expand_word_internal PARAMS((WORD_DESC *, int, int, int *, int *)); -static void exp_jump_to_top_level __P((int)); +static WORD_LIST *word_list_split PARAMS((WORD_LIST *)); -static WORD_LIST *separate_out_assignments __P((WORD_LIST *)); -static WORD_LIST *glob_expand_word_list __P((WORD_LIST *, int)); +static void exp_jump_to_top_level PARAMS((int)); + +static WORD_LIST *separate_out_assignments PARAMS((WORD_LIST *)); +static WORD_LIST *glob_expand_word_list PARAMS((WORD_LIST *, int)); #ifdef BRACE_EXPANSION -static WORD_LIST *brace_expand_word_list __P((WORD_LIST *, int)); +static WORD_LIST *brace_expand_word_list PARAMS((WORD_LIST *, int)); #endif #if defined (ARRAY_VARS) -static int make_internal_declare __P((char *, char *)); +static int make_internal_declare PARAMS((char *, char *, char *)); +static void expand_compound_assignment_word PARAMS((WORD_LIST *, int)); +static WORD_LIST *expand_declaration_argument PARAMS((WORD_LIST *, WORD_LIST *)); #endif -static WORD_LIST *shell_expand_word_list __P((WORD_LIST *, int)); -static WORD_LIST *expand_word_list_internal __P((WORD_LIST *, int)); +static WORD_LIST *shell_expand_word_list PARAMS((WORD_LIST *, int)); +static WORD_LIST *expand_word_list_internal PARAMS((WORD_LIST *, int)); + +static int do_assignment_statements PARAMS((WORD_LIST *, char *, int)); /* **************************************************************** */ /* */ @@ -329,15 +388,25 @@ dump_word_flags (flags) f = flags; fprintf (stderr, "%d -> ", f); + if (f & W_ARRAYIND) + { + f &= ~W_ARRAYIND; + fprintf (stderr, "W_ARRAYIND%s", f ? "|" : ""); + } if (f & W_ASSIGNASSOC) { f &= ~W_ASSIGNASSOC; fprintf (stderr, "W_ASSIGNASSOC%s", f ? "|" : ""); } - if (f & W_HASCTLESC) + if (f & W_ASSIGNARRAY) + { + f &= ~W_ASSIGNARRAY; + fprintf (stderr, "W_ASSIGNARRAY%s", f ? "|" : ""); + } + if (f & W_SAWQUOTEDNULL) { - f &= ~W_HASCTLESC; - fprintf (stderr, "W_HASCTLESC%s", f ? "|" : ""); + f &= ~W_SAWQUOTEDNULL; + fprintf (stderr, "W_SAWQUOTEDNULL%s", f ? "|" : ""); } if (f & W_NOPROCSUB) { @@ -364,20 +433,20 @@ dump_word_flags (flags) f &= ~W_ASSNBLTIN; fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : ""); } + if (f & W_ASSNGLOBAL) + { + f &= ~W_ASSNGLOBAL; + fprintf (stderr, "W_ASSNGLOBAL%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) + if (f & W_EXPANDRHS) { - f &= ~W_ITILDE; - fprintf (stderr, "W_ITILDE%s", f ? "|" : ""); + f &= ~W_EXPANDRHS; + fprintf (stderr, "W_EXPANDRHS%s", f ? "|" : ""); } if (f & W_NOTILDE) { @@ -389,15 +458,20 @@ dump_word_flags (flags) f &= ~W_ASSIGNRHS; fprintf (stderr, "W_ASSIGNRHS%s", f ? "|" : ""); } + if (f & W_NOASSNTILDE) + { + f &= ~W_NOASSNTILDE; + fprintf (stderr, "W_NOASSNTILDE%s", f ? "|" : ""); + } if (f & W_NOCOMSUB) { f &= ~W_NOCOMSUB; fprintf (stderr, "W_NOCOMSUB%s", f ? "|" : ""); } - if (f & W_DOLLARSTAR) + if (f & W_ARRAYREF) { - f &= ~W_DOLLARSTAR; - fprintf (stderr, "W_DOLLARSTAR%s", f ? "|" : ""); + f &= ~W_ARRAYREF; + fprintf (stderr, "W_ARRAYREF%s", f ? "|" : ""); } if (f & W_DOLLARAT) { @@ -414,20 +488,25 @@ dump_word_flags (flags) 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) + if (f & W_NOBRACE) + { + f &= ~W_NOBRACE; + fprintf (stderr, "W_NOBRACE%s", f ? "|" : ""); + } + if (f & W_NOGLOB) + { + f &= ~W_NOGLOB; + fprintf (stderr, "W_NOGLOB%s", f ? "|" : ""); + } + if (f & W_SPLITSPACE) { - f &= ~W_GLOBEXP; - fprintf (stderr, "W_GLOBEXP%s", f ? "|" : ""); + f &= ~W_SPLITSPACE; + fprintf (stderr, "W_SPLITSPACE%s", f ? "|" : ""); } if (f & W_ASSIGNMENT) { @@ -444,6 +523,22 @@ dump_word_flags (flags) f &= ~W_HASDOLLAR; fprintf (stderr, "W_HASDOLLAR%s", f ? "|" : ""); } + if (f & W_COMPLETE) + { + f &= ~W_COMPLETE; + fprintf (stderr, "W_COMPLETE%s", f ? "|" : ""); + } + if (f & W_CHKLOCAL) + { + f &= ~W_CHKLOCAL; + fprintf (stderr, "W_CHKLOCAL%s", f ? "|" : ""); + } + if (f & W_FORCELOCAL) + { + f &= ~W_FORCELOCAL; + fprintf (stderr, "W_FORCELOCAL%s", f ? "|" : ""); + } + fprintf (stderr, "\n"); fflush (stderr); } @@ -516,6 +611,7 @@ quoted_strlen (s) } #endif +#ifdef INCLUDE_UNUSED /* 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 @@ -574,11 +670,11 @@ unquoted_member (character, string) break; case '\'': - sindex = skip_single_quoted (string, slen, ++sindex); + sindex = skip_single_quoted (string, slen, ++sindex, 0); break; case '"': - sindex = skip_double_quoted (string, slen, ++sindex); + sindex = skip_double_quoted (string, slen, ++sindex, 0); break; } } @@ -608,17 +704,16 @@ unquoted_substring (substr, string) { case '\\': sindex++; - if (string[sindex]) ADVANCE_CHAR (string, slen, sindex); break; case '\'': - sindex = skip_single_quoted (string, slen, ++sindex); + sindex = skip_single_quoted (string, slen, ++sindex, 0); break; case '"': - sindex = skip_double_quoted (string, slen, ++sindex); + sindex = skip_double_quoted (string, slen, ++sindex, 0); break; default: @@ -628,6 +723,7 @@ unquoted_substring (substr, string) } return (0); } +#endif /* Most of the substitutions must be done in parallel. In order to avoid using tons of unclear goto's, I have some functions @@ -644,14 +740,15 @@ unquoted_substring (substr, string) INLINE char * sub_append_string (source, target, indx, size) char *source, *target; - int *indx, *size; + size_t *indx; + size_t *size; { if (source) { - int srclen, n; + size_t n, srclen; srclen = STRLEN (source); - if (srclen >= (int)(*size - *indx)) + if (srclen >= (*size - *indx)) { n = srclen + *indx; n = (n + DEFAULT_ARRAY_SIZE) - (n % DEFAULT_ARRAY_SIZE); @@ -674,8 +771,9 @@ sub_append_string (source, target, indx, size) char * sub_append_number (number, target, indx, size) intmax_t number; - int *indx, *size; char *target; + size_t *indx; + size_t *size; { char *temp; @@ -719,12 +817,12 @@ string_extract (string, sindex, charlist, flags) break; } #if defined (ARRAY_VARS) - else if ((flags & SX_VARNAME) && c == '[') + else if ((flags & SX_VARNAME) && c == LBRACK) { int ni; /* If this is an array subscript, skip over it and continue. */ ni = skipsubscript (string, i, 0); - if (string[ni] == ']') + if (string[ni] == RBRACK) i = ni; } #endif @@ -759,9 +857,9 @@ string_extract (string, sindex, charlist, flags) 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) +string_extract_double_quoted (string, sindex, flags) char *string; - int *sindex, stripdq; + int *sindex, flags; { size_t slen; char *send; @@ -770,11 +868,14 @@ string_extract_double_quoted (string, sindex, stripdq) char *temp, *ret; /* The new string we return. */ int pass_next, backquote, si; /* State variables for the machine. */ int dquote; + int stripdq; DECLARE_MBSTATE; slen = strlen (string + *sindex) + *sindex; send = string + slen; + stripdq = (flags & SX_STRIPDQ); + pass_next = backquote = dquote = 0; temp = (char *)xmalloc (1 + slen - *sindex); @@ -785,6 +886,7 @@ string_extract_double_quoted (string, sindex, stripdq) /* Process a character that was quoted by a backslash. */ if (pass_next) { + /* XXX - take another look at this in light of Interp 221 */ /* Posix.2 sez: ``The backslash shall retain its special meaning as an escape @@ -797,16 +899,16 @@ string_extract_double_quoted (string, sindex, stripdq) 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 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++] = '\\'; @@ -835,7 +937,7 @@ string_extract_double_quoted (string, sindex, stripdq) { if (c == '`') backquote = 0; - temp[j++] = c; + temp[j++] = c; /* COPY_CHAR_I? */ i++; continue; } @@ -856,9 +958,9 @@ string_extract_double_quoted (string, sindex, stripdq) si = i + 2; if (string[i + 1] == LPAREN) - ret = extract_command_subst (string, &si, 0); + ret = extract_command_subst (string, &si, (flags & SX_COMPLETE)); else - ret = extract_dollar_brace_string (string, &si, 1, 0); + ret = extract_dollar_brace_string (string, &si, Q_DOUBLE_QUOTES, 0); temp[j++] = '$'; temp[j++] = string[i + 1]; @@ -871,11 +973,14 @@ string_extract_double_quoted (string, sindex, stripdq) ret = string + i + 2; } + /* XXX - CHECK_STRING_OVERRUN here? */ for (t = 0; ret[t]; t++, j++) temp[j] = ret[t]; temp[j] = string[si]; - if (string[si]) + if (si < i + 2) /* we went back? */ + i += 2; + else if (string[si]) { j++; i = si + 1; @@ -915,10 +1020,11 @@ string_extract_double_quoted (string, sindex, stripdq) /* This should really be another option to string_extract_double_quoted. */ static int -skip_double_quoted (string, slen, sind) +skip_double_quoted (string, slen, sind, flags) char *string; size_t slen; int sind; + int flags; { int c, i; char *ret; @@ -958,9 +1064,12 @@ skip_double_quoted (string, slen, sind) { si = i + 2; if (string[i + 1] == LPAREN) - ret = extract_command_subst (string, &si, SX_NOALLOC); + ret = extract_command_subst (string, &si, SX_NOALLOC|(flags&SX_COMPLETE)); else - ret = extract_dollar_brace_string (string, &si, 1, SX_NOALLOC); + ret = extract_dollar_brace_string (string, &si, Q_DOUBLE_QUOTES, SX_NOALLOC); + + /* These can consume the entire string if they are unterminated */ + CHECK_STRING_OVERRUN (i, si, slen, c); i = si + 1; continue; @@ -983,22 +1092,38 @@ skip_double_quoted (string, slen, sind) /* 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. */ + the closing single quote. ALLOWESC allows the single quote to be quoted by + a backslash; it's not used yet. */ static inline char * -string_extract_single_quoted (string, sindex) +string_extract_single_quoted (string, sindex, allowesc) char *string; int *sindex; + int allowesc; { register int i; size_t slen; char *t; + int pass_next; 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); + pass_next = 0; + while (string[i]) + { + if (pass_next) + { + pass_next = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + if (allowesc && string[i] == '\\') + pass_next++; + else if (string[i] == '\'') + break; + ADVANCE_CHAR (string, slen, i); + } t = substring (string, *sindex, i); @@ -1009,18 +1134,26 @@ string_extract_single_quoted (string, sindex) return (t); } +/* Skip over a single-quoted string. We overload the SX_COMPLETE flag to mean + that we are splitting out words for completion and have encountered a $'...' + string, which allows backslash-escaped single quotes. */ static inline int -skip_single_quoted (string, slen, sind) +skip_single_quoted (string, slen, sind, flags) const char *string; size_t slen; int sind; + int flags; { register int c; DECLARE_MBSTATE; c = sind; while (string[c] && string[c] != '\'') - ADVANCE_CHAR (string, slen, c); + { + if ((flags & SX_COMPLETE) && string[c] == '\\' && string[c+1] == '\'' && string[c+2]) + ADVANCE_CHAR (string, slen, c); + ADVANCE_CHAR (string, slen, c); + } if (string[c]) c++; @@ -1039,28 +1172,33 @@ string_extract_verbatim (string, slen, sindex, charlist, 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') + if ((flags & SX_NOCTLESC) && charlist[0] == '\'' && charlist[1] == '\0') { - temp = string_extract_single_quoted (string, sindex); + temp = string_extract_single_quoted (string, sindex, 0); --*sindex; /* leave *sindex at separator character */ return temp; } + /* This can never be called with charlist == NULL. If *charlist == NULL, + we can skip the loop and just return a copy of the string, updating + *sindex */ + if (*charlist == 0) + { + temp = string + *sindex; + c = (*sindex == 0) ? slen : STRLEN (temp); + temp = savestring (temp); + *sindex += c; + 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]) @@ -1071,6 +1209,7 @@ string_extract_verbatim (string, slen, sindex, charlist, flags) if ((flags & SX_NOCTLESC) == 0 && c == CTLESC) { i += 2; + CHECK_STRING_OVERRUN (i, i, slen, c); continue; } /* Even if flags contains SX_NOCTLESC, we let CTLESC quoting CTLNUL @@ -1079,11 +1218,15 @@ string_extract_verbatim (string, slen, sindex, charlist, flags) else if ((flags & SX_NOESCCTLNUL) == 0 && c == CTLESC && string[i+1] == CTLNUL) { i += 2; + CHECK_STRING_OVERRUN (i, i, slen, c); continue; } #if defined (HANDLE_MULTIBYTE) - mblength = MBLEN (string + i, slen - i); + if (locale_utf8locale && slen > i && UTF8_SINGLEBYTE (string[i])) + mblength = (string[i] != 0) ? 1 : 0; + else + mblength = MBLEN (string + i, slen - i); if (mblength > 1) { wchar_t wc; @@ -1137,12 +1280,15 @@ extract_command_subst (string, sindex, xflags) int *sindex; int xflags; { - if (string[*sindex] == LPAREN) + char *ret; + + if (string[*sindex] == LPAREN || (xflags & SX_COMPLETE)) 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)); + ret = xparse_dolparen (string, string+*sindex, sindex, xflags); + return ret; } } @@ -1162,12 +1308,19 @@ extract_arithmetic_subst (string, sindex) 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) +extract_process_subst (string, starter, sindex, xflags) char *string; char *starter; int *sindex; + int xflags; { - return (extract_delimited_string (string, sindex, starter, "(", ")", 0)); +#if 0 + /* XXX - check xflags&SX_COMPLETE here? */ + return (extract_delimited_string (string, sindex, starter, "(", ")", SX_COMMAND)); +#else + xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0); + return (xparse_dolparen (string, string+*sindex, sindex, xflags)); +#endif } #endif /* PROCESS_SUBSTITUTION */ @@ -1183,8 +1336,8 @@ extract_array_assignment_list (string, sindex) int slen; char *ret; - slen = strlen (string); /* ( */ - if (string[slen - 1] == ')') + slen = strlen (string); + if (string[slen - 1] == RPAREN) { ret = substring (string, *sindex, slen - 1); *sindex = slen - 1; @@ -1230,6 +1383,15 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) { c = string[i]; + /* If a recursive call or a call to ADVANCE_CHAR leaves the index beyond + the end of the string, catch it and cut the loop. */ + if (i > slen) + { + i = slen; + c = string[i = slen]; + break; + } + if (c == 0) break; @@ -1264,23 +1426,23 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) continue; } -#if 0 - /* Process a nested command substitution, but only if we're parsing a - command substitution. XXX - for bash-4.2 */ + /* Process a nested command substitution, but only if we're parsing an + arithmetic substitution. */ if ((flags & SX_COMMAND) && string[i] == '$' && string[i+1] == LPAREN) { si = i + 2; - t = extract_command_subst (string, &si, flags); + t = extract_command_subst (string, &si, flags|SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); 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); + CHECK_STRING_OVERRUN (i, si, slen, c); i = si + 1; continue; } @@ -1290,6 +1452,7 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) { si = i + len_alt_opener; t = extract_delimited_string (string, &si, alt_opener, alt_opener, closer, flags|SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); i = si + 1; continue; } @@ -1309,6 +1472,7 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) { si = i + 1; t = string_extract (string, &si, "`", flags|SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); i = si + 1; continue; } @@ -1317,8 +1481,8 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) if (c == '\'' || c == '"') { si = i + 1; - i = (c == '\'') ? skip_single_quoted (string, slen, si) - : skip_double_quoted (string, slen, si); + i = (c == '\'') ? skip_single_quoted (string, slen, si, 0) + : skip_double_quoted (string, slen, si, 0); continue; } @@ -1330,8 +1494,8 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) { if (no_longjmp_on_fatal_error == 0) { - report_error (_("bad substitution: no closing `%s' in %s"), closer, string); last_command_exit_value = EXECUTION_FAILURE; + report_error (_("bad substitution: no closing `%s' in %s"), closer, string); exp_jump_to_top_level (DISCARD); } else @@ -1355,28 +1519,36 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) 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 */ +/* A simplified version of extract_dollar_brace_string that exists to handle + $'...' and $"..." quoting in here-documents, since the here-document read + path doesn't. It's separate because we don't want to mess with the fast + common path. We already know we're going to allocate and return a new + string and quoted == Q_HERE_DOCUMENT. We might be able to cut it down + some more, but extracting strings and adding them as we go adds complexity. + This needs to match the logic in parse.y:parse_matched_pair so we get + consistent behavior between here-documents and double-quoted strings. */ static char * -extract_dollar_brace_string (string, sindex, quoted, flags) +extract_heredoc_dolbrace_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; + size_t slen, tlen, result_index, result_size; + int pass_character, nesting_level, si, dolbrace_state; + char *result, *t, *send; DECLARE_MBSTATE; pass_character = 0; nesting_level = 1; slen = strlen (string + *sindex) + *sindex; + send = string + slen; + + result_size = slen; + result_index = 0; + result = xmalloc (result_size + 1); + + /* This function isn't called if this condition is not true initially. */ + dolbrace_state = DOLBRACE_QUOTE; i = *sindex; while (c = string[i]) @@ -1384,7 +1556,8 @@ extract_dollar_brace_string (string, sindex, quoted, flags) if (pass_character) { pass_character = 0; - ADVANCE_CHAR (string, slen, i); + RESIZE_MALLOCED_BUFFER (result, result_index, locale_mb_cur_max + 1, result_size, 64); + COPY_CHAR_I (result, result_index, string, send, i); continue; } @@ -1392,14 +1565,93 @@ extract_dollar_brace_string (string, sindex, quoted, flags) if (c == CTLESC || c == '\\') { pass_character++; + RESIZE_MALLOCED_BUFFER (result, result_index, 2, result_size, 64); + result[result_index++] = c; i++; continue; } - if (string[i] == '$' && string[i+1] == LBRACE) + /* The entire reason we have this separate function right here. */ + if (c == '$' && string[i+1] == '\'') + { + char *ttrans; + int ttranslen; + + if ((posixly_correct || extended_quote == 0) && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2) + { + RESIZE_MALLOCED_BUFFER (result, result_index, 3, result_size, 64); + result[result_index++] = '$'; + result[result_index++] = '\''; + i += 2; + continue; + } + + si = i + 2; + t = string_extract_single_quoted (string, &si, 1); /* XXX */ + CHECK_STRING_OVERRUN (i, si, slen, c); + + tlen = si - i - 2; /* -2 since si is one after the close quote */ + ttrans = ansiexpand (t, 0, tlen, &ttranslen); + free (t); + + /* needed to correctly quote any embedded single quotes. */ + if (dolbrace_state == DOLBRACE_QUOTE || dolbrace_state == DOLBRACE_QUOTE2) + { + t = sh_single_quote (ttrans); + tlen = strlen (t); + free (ttrans); + } + else if (extended_quote) /* dolbrace_state == DOLBRACE_PARAM */ + { + /* This matches what parse.y:parse_matched_pair() does */ + t = ttrans; + tlen = strlen (t); + } + + RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 1, result_size, 64); + strncpy (result + result_index, t, tlen); + result_index += tlen; + free (t); + i = si; + continue; + } + +#if defined (TRANSLATABLE_STRINGS) + if (c == '$' && string[i+1] == '"') + { + char *ttrans; + int ttranslen; + + si = i + 2; + t = string_extract_double_quoted (string, &si, flags); /* XXX */ + CHECK_STRING_OVERRUN (i, si, slen, c); + + tlen = si - i - 2; /* -2 since si is one after the close quote */ + ttrans = locale_expand (t, 0, tlen, line_number, &ttranslen); + free (t); + + t = singlequote_translations ? sh_single_quote (ttrans) : sh_mkdoublequoted (ttrans, ttranslen, 0); + tlen = strlen (t); + free (ttrans); + + RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 1, result_size, 64); + strncpy (result + result_index, t, tlen); + result_index += tlen; + free (t); + i = si; + continue; + } +#endif /* TRANSLATABLE_STRINGS */ + + if (c == '$' && string[i+1] == LBRACE) { nesting_level++; + RESIZE_MALLOCED_BUFFER (result, result_index, 3, result_size, 64); + result[result_index++] = c; + result[result_index++] = string[i+1]; i += 2; + if (dolbrace_state == DOLBRACE_QUOTE || dolbrace_state == DOLBRACE_QUOTE2 || dolbrace_state == DOLBRACE_WORD) + dolbrace_state = DOLBRACE_PARAM; continue; } @@ -1408,6 +1660,8 @@ extract_dollar_brace_string (string, sindex, quoted, flags) nesting_level--; if (nesting_level == 0) break; + RESIZE_MALLOCED_BUFFER (result, result_index, 2, result_size, 64); + result[result_index++] = c; i++; continue; } @@ -1417,7 +1671,16 @@ extract_dollar_brace_string (string, sindex, quoted, flags) if (c == '`') { si = i + 1; - t = string_extract (string, &si, "`", flags|SX_NOALLOC); + t = string_extract (string, &si, "`", flags); /* already know (flags & SX_NOALLOC) == 0) */ + CHECK_STRING_OVERRUN (i, si, slen, c); + + tlen = si - i - 1; + RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 3, result_size, 64); + result[result_index++] = c; + strncpy (result + result_index, t, tlen); + result_index += tlen; + result[result_index++] = string[si]; + free (t); i = si + 1; continue; } @@ -1427,32 +1690,99 @@ extract_dollar_brace_string (string, sindex, quoted, flags) if (string[i] == '$' && string[i+1] == LPAREN) { si = i + 2; - t = extract_command_subst (string, &si, flags|SX_NOALLOC); + t = extract_command_subst (string, &si, flags); + CHECK_STRING_OVERRUN (i, si, slen, c); + + tlen = si - i - 2; + RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64); + result[result_index++] = c; + result[result_index++] = LPAREN; + strncpy (result + result_index, t, tlen); + result_index += tlen; + result[result_index++] = string[si]; + free (t); i = si + 1; continue; } - /* Pass the contents of single-quoted and double-quoted strings - through verbatim. */ - if (c == '\'' || c == '"') +#if defined (PROCESS_SUBSTITUTION) + /* Technically this should only work at the start of a word */ + if ((string[i] == '<' || string[i] == '>') && string[i+1] == LPAREN) + { + si = i + 2; + t = extract_process_subst (string, (string[i] == '<' ? "<(" : ">)"), &si, flags); + CHECK_STRING_OVERRUN (i, si, slen, c); + + tlen = si - i - 2; + RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64); + result[result_index++] = c; + result[result_index++] = LPAREN; + strncpy (result + result_index, t, tlen); + result_index += tlen; + result[result_index++] = string[si]; + free (t); + i = si + 1; + continue; + } +#endif + + if (c == '\'' && posixly_correct && shell_compatibility_level > 42 && dolbrace_state != DOLBRACE_QUOTE) + { + COPY_CHAR_I (result, result_index, string, send, i); + continue; + } + + /* Pass the contents of single 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 */ + if (c == '"') + t = string_extract_double_quoted (string, &si, flags); + else + t = string_extract_single_quoted (string, &si, 0); + CHECK_STRING_OVERRUN (i, si, slen, c); + + tlen = si - i - 2; /* -2 since si is one after the close quote */ + RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 3, result_size, 64); + result[result_index++] = c; + strncpy (result + result_index, t, tlen); + result_index += tlen; + result[result_index++] = string[si - 1]; + free (t); + i = si; continue; } - /* move past this character, which was not special. */ - ADVANCE_CHAR (string, slen, i); + /* copy this character, which was not special. */ + COPY_CHAR_I (result, result_index, string, send, i); + + /* This logic must agree with parse.y:parse_matched_pair, since they + share the same defines. */ + if (dolbrace_state == DOLBRACE_PARAM && c == '%' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == '#' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == '/' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE2; /* XXX */ + else if (dolbrace_state == DOLBRACE_PARAM && c == '^' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == ',' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* This is intended to handle all of the [:]op expansions and the substring/ + length/pattern removal/pattern substitution expansions. */ + else if (dolbrace_state == DOLBRACE_PARAM && strchr ("#%^,~:-=?+/", c) != 0) + dolbrace_state = DOLBRACE_OP; + else if (dolbrace_state == DOLBRACE_OP && strchr ("#%^,~:-=?+/", c) == 0) + dolbrace_state = DOLBRACE_WORD; } if (c == 0 && nesting_level) { + free (result); if (no_longjmp_on_fatal_error == 0) { /* { */ - report_error (_("bad substitution: no closing `%s' in %s"), "}", string); last_command_exit_value = EXECUTION_FAILURE; + report_error (_("bad substitution: no closing `%s' in %s"), "}", string); exp_jump_to_top_level (DISCARD); } else @@ -1462,89 +1792,291 @@ extract_dollar_brace_string (string, sindex, quoted, flags) } } - result = (flags & SX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i); *sindex = i; + result[result_index] = '\0'; return (result); } -/* Remove backslashes which are quoting backquotes from STRING. Modifies - STRING, and returns a pointer to it. */ -char * -de_backslash (string) +#define PARAMEXPNEST_MAX 32 // for now +static int dbstate[PARAMEXPNEST_MAX]; + +/* 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 size_t slen; - register int i, j, prev_i; + register int i, c; + size_t slen; + int pass_character, nesting_level, si, dolbrace_state; + char *result, *t; 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'; + /* The handling of dolbrace_state needs to agree with the code in parse.y: + parse_matched_pair(). The different initial value is to handle the + case where this function is called to parse the word in + ${param op word} (SX_WORD). */ + dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM; + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP)) + dolbrace_state = DOLBRACE_QUOTE; - return (string); -} + if (quoted == Q_HERE_DOCUMENT && dolbrace_state == DOLBRACE_QUOTE && (flags & SX_NOALLOC) == 0) + return (extract_heredoc_dolbrace_string (string, sindex, quoted, flags)); -#if 0 -/*UNUSED*/ -/* Replace instances of \! in a string with !. */ -void -unquote_bang (string) - char *string; -{ - register int i, j; - register char *temp; + dbstate[0] = dolbrace_state; - temp = (char *)xmalloc (1 + strlen (string)); + pass_character = 0; + nesting_level = 1; + slen = strlen (string + *sindex) + *sindex; - for (i = 0, j = 0; (temp[j] = string[i]); i++, j++) + i = *sindex; + while (c = string[i]) { - if (string[i] == '\\' && string[i + 1] == '!') + if (pass_character) { - temp[j] = '!'; + pass_character = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + + /* CTLESCs and backslashes quote the next character. */ + if (c == CTLESC || c == '\\') + { + pass_character++; i++; + continue; } - } - strcpy (string, temp); - free (temp); -} -#endif -#define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0) + if (string[i] == '$' && string[i+1] == LBRACE) + { + if (nesting_level < PARAMEXPNEST_MAX) + dbstate[nesting_level] = dolbrace_state; + nesting_level++; + i += 2; + if (dolbrace_state == DOLBRACE_QUOTE || dolbrace_state == DOLBRACE_WORD) + dolbrace_state = DOLBRACE_PARAM; + continue; + } -/* 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 + if (c == RBRACE) + { + nesting_level--; + if (nesting_level == 0) + break; + dolbrace_state = (nesting_level < PARAMEXPNEST_MAX) ? dbstate[nesting_level] : dbstate[0]; /* Guess using initial state */ + 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); + + CHECK_STRING_OVERRUN (i, si, slen, c); + + 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); + + CHECK_STRING_OVERRUN (i, si, slen, c); + + i = si + 1; + continue; + } + +#if defined (PROCESS_SUBSTITUTION) + /* Technically this should only work at the start of a word */ + if ((string[i] == '<' || string[i] == '>') && string[i+1] == LPAREN) + { + si = i + 2; + t = extract_process_subst (string, (string[i] == '<' ? "<(" : ">)"), &si, flags|SX_NOALLOC); + + CHECK_STRING_OVERRUN (i, si, slen, c); + + i = si + 1; + continue; + } +#endif + + /* Pass the contents of double-quoted strings through verbatim. */ + if (c == '"') + { + si = i + 1; + i = skip_double_quoted (string, slen, si, 0); + /* skip_XXX_quoted leaves index one past close quote */ + continue; + } + + if (c == '\'') + { +/*itrace("extract_dollar_brace_string: c == single quote flags = %d quoted = %d dolbrace_state = %d", flags, quoted, dolbrace_state);*/ + if (posixly_correct && shell_compatibility_level > 42 && dolbrace_state != DOLBRACE_QUOTE && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ADVANCE_CHAR (string, slen, i); + else + { + si = i + 1; + i = skip_single_quoted (string, slen, si, 0); + } + + continue; + } + +#if defined (ARRAY_VARS) + if (c == LBRACK && dolbrace_state == DOLBRACE_PARAM) + { + si = skipsubscript (string, i, 0); + CHECK_STRING_OVERRUN (i, si, slen, c); + if (string[si] == RBRACK) + c = string[i = si]; + } +#endif + + /* move past this character, which was not special. */ + ADVANCE_CHAR (string, slen, i); + + /* This logic must agree with parse.y:parse_matched_pair, since they + share the same defines. */ + if (dolbrace_state == DOLBRACE_PARAM && c == '%' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == '#' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == '/' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE2; /* XXX */ + else if (dolbrace_state == DOLBRACE_PARAM && c == '^' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + else if (dolbrace_state == DOLBRACE_PARAM && c == ',' && (i - *sindex) > 1) + dolbrace_state = DOLBRACE_QUOTE; + /* This is intended to handle all of the [:]op expansions and the substring/ + length/pattern removal/pattern substitution expansions. */ + else if (dolbrace_state == DOLBRACE_PARAM && strchr ("#%^,~:-=?+/", c) != 0) + dolbrace_state = DOLBRACE_OP; + else if (dolbrace_state == DOLBRACE_OP && strchr ("#%^,~:-=?+/", c) == 0) + dolbrace_state = DOLBRACE_WORD; + } + + if (c == 0 && nesting_level) + { + if (no_longjmp_on_fatal_error == 0) + { /* { */ + last_command_exit_value = EXECUTION_FAILURE; + report_error (_("bad substitution: no closing `%s' in %s"), "}", string); + 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 = oldjmp; return (x); } while (0) + +/* When FLAGS & 2 == 0, this function assumes STRING[I] == OPEN; when + FLAGS & 2 != 0, it assumes STRING[I] points to one character past OPEN; + returns with STRING[RET] == close; used to parse array subscripts. + FLAGS & 1 means not to 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()) or during execution by a builtin + which has already undergone word expansion. */ +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; + int i, pass_next, backq, si, c, count, oldjmp; size_t slen; char *temp, *ss; DECLARE_MBSTATE; slen = strlen (string + start) + start; + oldjmp = no_longjmp_on_fatal_error; no_longjmp_on_fatal_error = 1; - i = start + 1; /* skip over leading bracket */ + /* Move to the first character after a leading OPEN. If FLAGS&2, we assume + that START already points to that character. If not, we need to skip over + it here. */ + i = (flags & 2) ? start : start + 1; count = 1; pass_next = backq = 0; ss = (char *)string; @@ -1558,7 +2090,7 @@ skip_matched_pair (string, start, open, close, flags) ADVANCE_CHAR (string, slen, i); continue; } - else if (c == '\\') + else if ((flags & 1) == 0 && c == '\\') { pass_next = 1; i++; @@ -1593,20 +2125,24 @@ skip_matched_pair (string, start, open, close, flags) } else if ((flags & 1) == 0 && (c == '\'' || c == '"')) { - i = (c == '\'') ? skip_single_quoted (ss, slen, ++i) - : skip_double_quoted (ss, slen, ++i); + i = (c == '\'') ? skip_single_quoted (ss, slen, ++i, 0) + : skip_double_quoted (ss, slen, ++i, 0); /* no increment, the skip functions increment past the closing quote. */ } - else if ((flags&1) == 0 && c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE)) + else if ((flags & 1) == 0 && c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE)) { si = i + 2; if (string[si] == '\0') CQ_RETURN(si); + /* XXX - extract_command_subst here? */ 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); + + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si; if (string[i] == '\0') /* don't increment i past EOS in loop */ break; @@ -1621,6 +2157,11 @@ skip_matched_pair (string, start, open, close, flags) } #if defined (ARRAY_VARS) +/* FLAGS has 1 as a reserved value, since skip_matched_pair uses it for + skipping over quoted strings and taking the first instance of the + closing character. FLAGS & 2 means that STRING[START] points one + character past the open bracket; FLAGS & 2 == 0 means that STRING[START] + points to the open bracket. skip_matched_pair knows how to deal with this. */ int skipsubscript (string, start, flags) const char *string; @@ -1643,19 +2184,27 @@ skip_to_delim (string, start, delims, flags) char *delims; int flags; { - int i, pass_next, backq, si, c, invert, skipquote, skipcmd; + int i, pass_next, backq, dquote, si, c, oldjmp; + int invert, skipquote, skipcmd, noprocsub, completeflag; + int arithexp, skipcol; size_t slen; - char *temp; + char *temp, open[3]; DECLARE_MBSTATE; slen = strlen (string + start) + start; + oldjmp = no_longjmp_on_fatal_error; if (flags & SD_NOJMP) no_longjmp_on_fatal_error = 1; invert = (flags & SD_INVERT); skipcmd = (flags & SD_NOSKIPCMD) == 0; + noprocsub = (flags & SD_NOPROCSUB); + completeflag = (flags & SD_COMPLETE) ? SX_COMPLETE : 0; + + arithexp = (flags & SD_ARITHEXP); + skipcol = 0; i = start; - pass_next = backq = 0; + pass_next = backq = dquote = 0; while (c = string[i]) { /* If this is non-zero, we should not let quote characters be delimiters @@ -1690,14 +2239,45 @@ skip_to_delim (string, start, delims, flags) i++; continue; } - else if (skipquote == 0 && invert == 0 && member (c, delims)) - break; - else if (c == '\'' || c == '"') + else if (arithexp && skipcol && 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. */ + skipcol--; + i++; + continue; } + else if (arithexp && c == '?') + { + skipcol++; + i++; + continue; + } + else if (skipquote == 0 && invert == 0 && member (c, delims)) + break; + /* the usual case is to use skip_xxx_quoted, but we don't skip over double + quoted strings when looking for the history expansion character as a + delimiter. */ + /* special case for programmable completion which takes place before + parser converts backslash-escaped single quotes between $'...' to + `regular' single-quoted strings. */ + else if (completeflag && i > 0 && string[i-1] == '$' && c == '\'') + i = skip_single_quoted (string, slen, ++i, SX_COMPLETE); + else if (c == '\'') + i = skip_single_quoted (string, slen, ++i, 0); + else if (c == '"') + i = skip_double_quoted (string, slen, ++i, completeflag); + else if (c == LPAREN && arithexp) + { + si = i + 1; + if (string[si] == '\0') + CQ_RETURN(si); + + temp = extract_delimited_string (string, &si, "(", "(", ")", SX_NOALLOC); /* ) */ + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } else if (c == '$' && ((skipcmd && string[i+1] == LPAREN) || string[i+1] == LBRACE)) { si = i + 2; @@ -1705,9 +2285,10 @@ skip_to_delim (string, start, delims, flags) CQ_RETURN(si); if (string[i+1] == LPAREN) - temp = extract_delimited_string (string, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */ + temp = extract_delimited_string (string, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND|completeflag); /* ) */ else temp = extract_dollar_brace_string (string, &si, 0, SX_NOALLOC); + CHECK_STRING_OVERRUN (i, si, slen, c); i = si; if (string[i] == '\0') /* don't increment i past EOS in loop */ break; @@ -1715,27 +2296,184 @@ skip_to_delim (string, start, delims, flags) continue; } #if defined (PROCESS_SUBSTITUTION) - else if (skipcmd && (c == '<' || c == '>') && string[i+1] == LPAREN) + else if (skipcmd && noprocsub == 0 && (c == '<' || c == '>') && string[i+1] == LPAREN) { si = i + 2; if (string[si] == '\0') CQ_RETURN(si); - temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si); + + temp = extract_delimited_string (string, &si, (c == '<') ? "<(" : ">(", "(", ")", SX_COMMAND|SX_NOALLOC); /* )) */ + CHECK_STRING_OVERRUN (i, si, slen, c); i = si; if (string[i] == '\0') break; i++; continue; } -#endif /* PROCESS_SUBSTITUTION */ - else if ((skipquote || invert) && (member (c, delims) == 0)) - break; +#endif /* PROCESS_SUBSTITUTION */ +#if defined (EXTENDED_GLOB) + else if ((flags & SD_EXTGLOB) && extended_glob && string[i+1] == LPAREN && member (c, "?*+!@")) + { + si = i + 2; + if (string[si] == '\0') + CQ_RETURN(si); + + open[0] = c; + open[1] = LPAREN; + open[2] = '\0'; + temp = extract_delimited_string (string, &si, open, "(", ")", SX_NOALLOC); /* ) */ + + CHECK_STRING_OVERRUN (i, si, slen, c); + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } +#endif + else if ((flags & SD_GLOB) && c == LBRACK) + { + si = i + 1; + if (string[si] == '\0') + CQ_RETURN(si); + + temp = extract_delimited_string (string, &si, "[", "[", "]", SX_NOALLOC); /* ] */ + + i = si; + if (string[i] == '\0') /* don't increment i past EOS in loop */ + break; + i++; + continue; + } + else if ((skipquote || invert) && (member (c, delims) == 0)) + break; + else + ADVANCE_CHAR (string, slen, i); + } + + CQ_RETURN(i); +} + +#if defined (BANG_HISTORY) +/* Skip to the history expansion character (delims[0]), paying attention to + quoted strings and command and process substitution. This is a stripped- + down version of skip_to_delims. The essential difference is that this + resets the quoting state when starting a command substitution */ +int +skip_to_histexp (string, start, delims, flags) + char *string; + int start; + char *delims; + int flags; +{ + int i, pass_next, backq, dquote, c, oldjmp; + int histexp_comsub, histexp_backq, old_dquote; + size_t slen; + DECLARE_MBSTATE; + + slen = strlen (string + start) + start; + oldjmp = no_longjmp_on_fatal_error; + if (flags & SD_NOJMP) + no_longjmp_on_fatal_error = 1; + + histexp_comsub = histexp_backq = old_dquote = 0; + + i = start; + pass_next = backq = dquote = 0; + 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 && c == '`') + { + backq = 0; + histexp_backq--; + dquote = old_dquote; + i++; + continue; + } + else if (c == '`') + { + backq = 1; + histexp_backq++; + old_dquote = dquote; /* simple - one level for now */ + dquote = 0; + i++; + continue; + } + /* When in double quotes, act as if the double quote is a member of + history_no_expand_chars, like the history library does */ + else if (dquote && c == delims[0] && string[i+1] == '"') + { + i++; + continue; + } + else if (c == delims[0]) + break; + /* the usual case is to use skip_xxx_quoted, but we don't skip over double + quoted strings when looking for the history expansion character as a + delimiter. */ + else if (dquote && c == '\'') + { + i++; + continue; + } + else if (c == '\'') + i = skip_single_quoted (string, slen, ++i, 0); + /* The posixly_correct test makes posix-mode shells allow double quotes + to quote the history expansion character */ + else if (posixly_correct == 0 && c == '"') + { + dquote = 1 - dquote; + i++; + continue; + } + else if (c == '"') + i = skip_double_quoted (string, slen, ++i, 0); +#if defined (PROCESS_SUBSTITUTION) + else if ((c == '$' || c == '<' || c == '>') && string[i+1] == LPAREN && string[i+2] != LPAREN) +#else + else if (c == '$' && string[i+1] == LPAREN && string[i+2] != LPAREN) +#endif + { + if (string[i+2] == '\0') + CQ_RETURN(i+2); + i += 2; + histexp_comsub++; + old_dquote = dquote; + dquote = 0; + } + else if (histexp_comsub && c == RPAREN) + { + histexp_comsub--; + dquote = old_dquote; + i++; + continue; + } + else if (backq) /* placeholder */ + { + ADVANCE_CHAR (string, slen, i); + continue; + } else ADVANCE_CHAR (string, slen, i); } CQ_RETURN(i); } +#endif /* BANG_HISTORY */ #if defined (READLINE) /* Return 1 if the portion of STRING ending at EINDEX is quoted (there is @@ -1751,13 +2489,29 @@ char_is_quoted (string, eindex) char *string; int eindex; { - int i, pass_next, c; + int i, pass_next, c, oldjmp; size_t slen; DECLARE_MBSTATE; slen = strlen (string); + oldjmp = no_longjmp_on_fatal_error; no_longjmp_on_fatal_error = 1; i = pass_next = 0; + + /* If we have an open quoted string from a previous line, see if it's + closed before string[eindex], so we don't interpret that close quote + as starting a new quoted string. */ + if (current_command_line_count > 0 && dstack.delimiter_depth > 0) + { + c = dstack.delimiters[dstack.delimiter_depth - 1]; + if (c == '\'') + i = skip_single_quoted (string, slen, 0, 0); + else if (c == '"') + i = skip_double_quoted (string, slen, 0, SX_COMPLETE); + if (i > eindex) + CQ_RETURN (1); + } + while (i <= eindex) { c = string[i]; @@ -1776,10 +2530,17 @@ char_is_quoted (string, eindex) i++; continue; } + else if (c == '$' && string[i+1] == '\'' && string[i+2]) + { + i += 2; + i = skip_single_quoted (string, slen, i, SX_COMPLETE); + if (i > eindex) + CQ_RETURN (i); + } else if (c == '\'' || c == '"') { - i = (c == '\'') ? skip_single_quoted (string, slen, ++i) - : skip_double_quoted (string, slen, ++i); + i = (c == '\'') ? skip_single_quoted (string, slen, ++i, 0) + : skip_double_quoted (string, slen, ++i, SX_COMPLETE); if (i > eindex) CQ_RETURN(1); /* no increment, the skip_xxx functions go one past end */ @@ -1825,10 +2586,11 @@ unclosed_pair (string, eindex, openstr) openc = 1 - openc; i += olen; } + /* XXX - may want to handle $'...' specially here */ else if (string[i] == '\'' || string[i] == '"') { - i = (string[i] == '\'') ? skip_single_quoted (string, slen, i) - : skip_double_quoted (string, slen, i); + i = (string[i] == '\'') ? skip_single_quoted (string, slen, i, 0) + : skip_double_quoted (string, slen, i, SX_COMPLETE); if (i > eindex) return 0; } @@ -1844,12 +2606,12 @@ unclosed_pair (string, eindex, openstr) 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. */ + DELIMS delimit separate fields. This is used by programmable completion. */ WORD_LIST * split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) char *string; int slen; - char *delims; + const char *delims; int sentinel, flags; int *nwp, *cwp; { @@ -1866,7 +2628,7 @@ split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) return ((WORD_LIST *)NULL); } - d = (delims == 0) ? ifs_value : delims; + d = (delims == 0) ? ifs_value : (char *)delims; ifs_split = delims == 0; /* Make d2 the non-whitespace characters in delims */ @@ -1915,7 +2677,10 @@ split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) for (i = 0; member (string[i], d) && spctabnl (string[i]); i++) ; if (string[i] == '\0') - return (ret); + { + FREE (d2); + return (ret); + } ts = i; nw = 0; @@ -1934,16 +2699,16 @@ split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) /* 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])) + while (member (string[te], d) && spctabnl (string[te]) && ((flags&SD_NOQUOTEDELIM) == 0 || (string[te] != '\'' && string[te] != '"'))) te++; else - while (member (string[te], d2)) + while (member (string[te], d2) && ((flags&SD_NOQUOTEDELIM) == 0 || (string[te] != '\'' && string[te] != '"'))) te++; } token = substring (string, ts, te); - ret = add_string_to_list (token, ret); + ret = add_string_to_list (token, ret); /* XXX */ free (token); nw++; @@ -1970,7 +2735,8 @@ split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) break; i = te; - while (member (string[i], d) && (ifs_split || spctabnl(string[i]))) + /* XXX - honor SD_NOQUOTEDELIM here */ + while (member (string[i], d) && (ifs_split || spctabnl(string[i])) && ((flags&SD_NOQUOTEDELIM) == 0 || (string[te] != '\'' && string[te] != '"'))) i++; if (string[i]) @@ -2000,6 +2766,8 @@ split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) if (cwp) *cwp = cw; + FREE (d2); + return (REVERSE_LIST (ret, WORD_LIST *)); } #endif /* READLINE */ @@ -2037,7 +2805,7 @@ string_list_internal (list, sep) { register WORD_LIST *t; char *result, *r; - int word_len, sep_len, result_size; + size_t word_len, sep_len, result_size; if (list == 0) return ((char *)NULL); @@ -2131,9 +2899,12 @@ ifs_firstchar (lenp) 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 if IFS is unset." */ +/* Posix interpretation 888 changes this when IFS is null by specifying + that when unquoted, this expands to separate arguments */ char * -string_list_dollar_star (list) +string_list_dollar_star (list, quoted, flags) WORD_LIST *list; + int quoted, flags; { char *ret; #if defined (HANDLE_MULTIBYTE) @@ -2180,11 +2951,18 @@ string_list_dollar_star (list) , 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. */ + exactly. + Valid values for the FLAGS argument are the PF_ flags in command.h, + the only one we care about is PF_ASSIGNRHS. $@ is supposed to expand + to the positional parameters separated by spaces no matter what IFS is + set to if in a context where word splitting is not performed. The only + one that we didn't handle before is assignment statement arguments to + declaration builtins like `declare'. */ char * -string_list_dollar_at (list, quoted) +string_list_dollar_at (list, quoted, flags) WORD_LIST *list; int quoted; + int flags; { char *ifs, *ret; #if defined (HANDLE_MULTIBYTE) @@ -2205,7 +2983,14 @@ string_list_dollar_at (list, quoted) # if !defined (__GNUC__) sep = (char *)xmalloc (MB_CUR_MAX + 1); # endif /* !__GNUC__ */ - if (ifs && *ifs) + /* XXX - testing PF_ASSIGNRHS to make sure positional parameters are + separated with a space even when word splitting will not occur. */ + if (flags & PF_ASSIGNRHS) + { + sep[0] = ' '; + sep[1] = '\0'; + } + else if (ifs && *ifs) { if (ifs_firstc_len == 1) { @@ -2223,18 +3008,16 @@ string_list_dollar_at (list, quoted) sep[0] = ' '; sep[1] = '\0'; } -#else - sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs; +#else /* !HANDLE_MULTIBYTE */ + /* XXX - PF_ASSIGNRHS means no word splitting, so we want positional + parameters separated by a space. */ + sep[0] = ((flags & PF_ASSIGNRHS) || ifs == 0 || *ifs == 0) ? ' ' : *ifs; sep[1] = '\0'; -#endif +#endif /* !HANDLE_MULTIBYTE */ /* 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); @@ -2245,15 +3028,17 @@ string_list_dollar_at (list, quoted) return ret; } -/* Turn the positional paramters into a string, understanding quoting and +/* Turn the positional parameters 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. */ +/* This needs to fully understand the additional contexts where word + splitting does not occur (W_ASSIGNRHS, etc.) */ char * -string_list_pos_params (pchar, list, quoted) +string_list_pos_params (pchar, list, quoted, pflags) int pchar; WORD_LIST *list; - int quoted; + int quoted, pflags; { char *ret; WORD_LIST *tlist; @@ -2262,7 +3047,7 @@ string_list_pos_params (pchar, list, quoted) { tlist = quote_list (list); word_list_remove_quoted_nulls (tlist); - ret = string_list_dollar_star (tlist); + ret = string_list_dollar_star (tlist, 0, 0); } else if (pchar == '*' && (quoted & Q_HERE_DOCUMENT)) { @@ -2270,12 +3055,16 @@ string_list_pos_params (pchar, list, quoted) word_list_remove_quoted_nulls (tlist); ret = string_list (tlist); } + else if (pchar == '*' && quoted == 0 && ifs_is_null) /* XXX */ + ret = expand_no_split_dollar_star ? string_list_dollar_star (list, quoted, 0) : string_list_dollar_at (list, quoted, 0); /* Posix interp 888 */ + else if (pchar == '*' && quoted == 0 && (pflags & PF_ASSIGNRHS)) /* XXX */ + ret = expand_no_split_dollar_star ? string_list_dollar_star (list, quoted, 0) : string_list_dollar_at (list, quoted, 0); /* Posix interp 888 */ 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); + ret = string_list_dollar_star (list, quoted, 0); } else if (pchar == '@' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) /* We use string_list_dollar_at, but only if the string is quoted, since @@ -2285,9 +3074,13 @@ string_list_pos_params (pchar, list, quoted) 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); + ret = string_list_dollar_at (list, quoted, 0); + else if (pchar == '@' && quoted == 0 && ifs_is_null) /* XXX */ + ret = string_list_dollar_at (list, quoted, 0); /* Posix interp 888 */ + else if (pchar == '@' && quoted == 0 && (pflags & PF_ASSIGNRHS)) + ret = string_list_dollar_at (list, quoted, pflags); /* Posix interp 888 */ else if (pchar == '@') - ret = string_list_dollar_star (list); + ret = string_list_dollar_star (list, quoted, 0); else ret = string_list ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? quote_list (list) : list); @@ -2326,6 +3119,13 @@ string_list_pos_params (pchar, list, quoted) : (c) == (separators)[0]) \ : 0) +/* member of the space character class in the current locale */ +#define ifs_whitespace(c) ISSPACE(c) + +/* "adjacent IFS white space" */ +#define ifs_whitesep(c) ((sh_style_split || separators == 0) ? spctabnl (c) \ + : ifs_whitespace (c)) + WORD_LIST * list_string (string, separators, quoted) register char *string, *separators; @@ -2334,7 +3134,7 @@ list_string (string, separators, quoted) WORD_LIST *result; WORD_DESC *t; char *current_word, *s; - int sindex, sh_style_split, whitesep, xflags; + int sindex, sh_style_split, whitesep, xflags, free_word; size_t slen; if (!string || !*string) @@ -2353,10 +3153,19 @@ list_string (string, separators, quoted) 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. */ + STRING is quoted or if there are no separator characters. We use the + Posix definition of whitespace as a member of the space character + class in the current locale. */ +#if 0 if (!quoted || !separators || !*separators) +#else + /* issep() requires that separators be non-null, and always returns 0 if + separator is the empty string, so don't bother if we get an empty string + for separators. We already returned NULL above if STRING is empty. */ + if (!quoted && separators && *separators) +#endif { - for (s = string; *s && spctabnl (*s) && issep (*s); s++); + for (s = string; *s && issep (*s) && ifs_whitespace (*s); s++); if (!*s) return ((WORD_LIST *)NULL); @@ -2367,17 +3176,19 @@ list_string (string, separators, quoted) /* 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 + skip sequences of whitespace characters as long as they are separators This obeys the field splitting rules in Posix.2. */ - slen = (MB_CUR_MAX > 1) ? strlen (string) : 1; + slen = STRLEN (string); 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. */ + /* Don't need string length in ADVANCE_CHAR unless multibyte chars are + possible, but need it in string_extract_verbatim for bounds checking */ current_word = string_extract_verbatim (string, slen, &sindex, separators, xflags); if (current_word == 0) break; + free_word = 1; /* If non-zero, we free current_word */ + /* 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 @@ -2394,15 +3205,27 @@ list_string (string, separators, quoted) /* 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); + + /* We don't want to set the word flags based on the string contents + here -- that's mostly for the parser -- so we just allocate a + WORD_DESC *, assign current_word (noting that we don't want to + free it), and skip all of make_word. */ + t = alloc_word_desc (); + t->word = current_word; + result = make_word_list (t, result); + free_word = 0; result->word->flags &= ~W_HASQUOTEDNULL; /* just to be sure */ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) result->word->flags |= W_QUOTED; + /* If removing quoted null characters leaves an empty word, note + that we saw this for the caller to act on. */ + if (current_word == 0 || current_word[0] == '\0') + result->word->flags |= W_SAWQUOTEDNULL; } /* 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])) + else if (!sh_style_split && !ifs_whitespace (string[sindex])) { t = alloc_word_desc (); t->word = make_quoted_char ('\0'); @@ -2410,10 +3233,11 @@ list_string (string, separators, quoted) result = make_word_list (t, result); } - free (current_word); + if (free_word) + free (current_word); /* Note whether or not the separator is IFS whitespace, used later. */ - whitesep = string[sindex] && spctabnl (string[sindex]); + whitesep = string[sindex] && ifs_whitesep (string[sindex]); /* Move past the current separator character. */ if (string[sindex]) @@ -2422,21 +3246,21 @@ list_string (string, separators, quoted) ADVANCE_CHAR (string, slen, sindex); } - /* Now skip sequences of space, tab, or newline characters if they are + /* Now skip sequences of whitespace characters if they are in the list of separators. */ - while (string[sindex] && spctabnl (string[sindex]) && issep (string[sindex])) + while (string[sindex] && ifs_whitesep (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])) + if (string[sindex] && whitesep && issep (string[sindex]) && !ifs_whitesep (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])) + while (string[sindex] && ifs_whitesep (string[sindex]) && isifs (string[sindex])) sindex++; } } @@ -2445,11 +3269,16 @@ list_string (string, separators, quoted) /* 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. + the `read' builtin. + + This is never called with SEPARATORS != $IFS, and takes advantage of that. XXX - this function is very similar to list_string; they should be combined - XXX */ + +/* character is in $IFS */ +#define islocalsep(c) (local_cmap[(unsigned char)(c)] != 0) + char * get_word_from_string (stringp, separators, endptr) char **stringp, *separators, **endptr; @@ -2457,6 +3286,7 @@ get_word_from_string (stringp, separators, endptr) register char *s; char *current_word; int sindex, sh_style_split, whitesep, xflags; + unsigned char local_cmap[UCHAR_MAX+1]; /* really only need single-byte chars here */ size_t slen; if (!stringp || !*stringp || !**stringp) @@ -2466,29 +3296,32 @@ get_word_from_string (stringp, separators, endptr) separators[1] == '\t' && separators[2] == '\n' && separators[3] == '\0'; - for (xflags = 0, s = ifs_value; s && *s; s++) + memset (local_cmap, '\0', sizeof (local_cmap)); + for (xflags = 0, s = separators; s && *s; s++) { if (*s == CTLESC) xflags |= SX_NOCTLESC; if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL; + local_cmap[(unsigned char)*s] = 1; /* local charmap of separators */ } 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++); + long as those characters appear in SEPARATORS. This happens if + SEPARATORS == $' \t\n' or if IFS is unset. */ + if (sh_style_split || separators == 0) + for (; *s && spctabnl (*s) && islocalsep (*s); s++); + else + for (; *s && ifs_whitespace (*s) && islocalsep (*s); s++); - /* If the string is nothing but whitespace, update it and return. */ - if (!*s) - { - *stringp = s; - if (endptr) - *endptr = s; - return ((char *)NULL); - } + /* 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. @@ -2498,9 +3331,9 @@ get_word_from_string (stringp, separators, endptr) 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; + /* Don't need string length in ADVANCE_CHAR unless multibyte chars are + possible, but need it in string_extract_verbatim for bounds checking */ + slen = STRLEN (s); current_word = string_extract_verbatim (s, slen, &sindex, separators, xflags); /* Set ENDPTR to the first character after the end of the word. */ @@ -2508,7 +3341,7 @@ get_word_from_string (stringp, separators, endptr) *endptr = s + sindex; /* Note whether or not the separator is IFS whitespace, used later. */ - whitesep = s[sindex] && spctabnl (s[sindex]); + whitesep = s[sindex] && ifs_whitesep (s[sindex]); /* Move past the current separator character. */ if (s[sindex]) @@ -2519,19 +3352,19 @@ get_word_from_string (stringp, separators, endptr) /* 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])) + while (s[sindex] && spctabnl (s[sindex]) && islocalsep (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])) + if (s[sindex] && whitesep && islocalsep (s[sindex]) && !ifs_whitesep (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])) + while (s[sindex] && ifs_whitesep (s[sindex]) && islocalsep(s[sindex])) sindex++; } @@ -2591,9 +3424,9 @@ list_string_with_quotes (string) i++; } else if (c == '\'') - i = skip_single_quoted (s, s_len, ++i); + i = skip_single_quoted (s, s_len, ++i, 0); else if (c == '"') - i = skip_double_quoted (s, s_len, ++i); + i = skip_double_quoted (s, s_len, ++i, 0); else if (c == 0 || spctabnl (c)) { /* We have found the end of a token. Make a word out of it and @@ -2628,24 +3461,76 @@ do_compound_assignment (name, value, flags) int flags; { SHELL_VAR *v; - int mklocal, mkassoc; + int mklocal, mkassoc, mkglobal, chklocal; WORD_LIST *list; + char *newname; /* used for local nameref references */ mklocal = flags & ASS_MKLOCAL; mkassoc = flags & ASS_MKASSOC; + mkglobal = flags & ASS_MKGLOBAL; + chklocal = flags & ASS_CHKLOCAL; if (mklocal && variable_context) { - v = find_variable (name); + v = find_variable (name); /* follows namerefs */ + newname = (v == 0) ? nameref_transform_name (name, flags) : v->name; + if (v && ((readonly_p (v) && (flags & ASS_FORCE) == 0) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (name); + return (v); /* XXX */ + } list = expand_compound_array_assignment (v, value, flags); if (mkassoc) - v = make_local_assoc_variable (name); + v = make_local_assoc_variable (newname, 0); 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); + v = make_local_array_variable (newname, 0); + if (v) + assign_compound_array_list (v, list, flags); + if (list) + dispose_words (list); + } + /* In a function but forcing assignment in global context. CHKLOCAL means to + check for an existing local variable first. */ + else if (mkglobal && variable_context) + { + v = chklocal ? find_variable (name) : 0; + if (v && (local_p (v) == 0 || v->context != variable_context)) + v = 0; + if (v == 0) + v = find_global_variable (name); + if (v && ((readonly_p (v) && (flags & ASS_FORCE) == 0) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (name); + return (v); /* XXX */ + } + /* sanity check */ + newname = (v == 0) ? nameref_transform_name (name, flags) : name; + list = expand_compound_array_assignment (v, value, flags); + if (v == 0 && mkassoc) + v = make_new_assoc_variable (newname); + else if (v && mkassoc && assoc_p (v) == 0) + v = convert_var_to_assoc (v); + else if (v == 0) + v = make_new_array_variable (newname); + else if (v && mkassoc == 0 && array_p (v) == 0) + v = convert_var_to_array (v); + if (v) + assign_compound_array_list (v, list, flags); + if (list) + dispose_words (list); } else - v = assign_array_from_string (name, value, flags); + { + v = assign_array_from_string (name, value, flags); + if (v && ((readonly_p (v) && (flags & ASS_FORCE) == 0) || noassign_p (v))) + { + if (readonly_p (v)) + err_readonly (name); + return (v); /* XXX */ + } + } return (v); } @@ -2661,8 +3546,8 @@ do_assignment_internal (word, expand) const WORD_DESC *word; int expand; { - int offset, tlen, appendop, assign_list, aflags, retval; - char *name, *value; + int offset, appendop, assign_list, aflags, retval; + char *name, *value, *temp; SHELL_VAR *entry; #if defined (ARRAY_VARS) char *t; @@ -2681,8 +3566,6 @@ do_assignment_internal (word, expand) if (name[offset] == '=') { - char *temp; - if (name[offset - 1] == '+') { appendop = 1; @@ -2691,7 +3574,6 @@ do_assignment_internal (word, expand) 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)) @@ -2728,21 +3610,26 @@ do_assignment_internal (word, expand) aflags |= ASS_APPEND; #if defined (ARRAY_VARS) - if (t = mbschr (name, '[')) /*]*/ + if (t = mbschr (name, LBRACK)) { if (assign_list) { report_error (_("%s: cannot assign list to array member"), name); ASSIGN_RETURN (0); } - entry = assign_array_element (name, value, aflags); + aflags |= ASS_ALLOWALLSUB; /* allow a[@]=value for existing associative arrays */ + entry = assign_array_element (name, value, aflags, (array_eltstate_t *)0); if (entry == 0) ASSIGN_RETURN (0); } else if (assign_list) { - if (word->flags & W_ASSIGNARG) + if ((word->flags & W_ASSIGNARG) && (word->flags & W_CHKLOCAL)) + aflags |= ASS_CHKLOCAL; + if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0) aflags |= ASS_MKLOCAL; + if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL)) + aflags |= ASS_MKGLOBAL; if (word->flags & W_ASSIGNASSOC) aflags |= ASS_MKASSOC; entry = do_compound_assignment (name, value, aflags); @@ -2751,15 +3638,17 @@ do_assignment_internal (word, expand) #endif /* ARRAY_VARS */ entry = bind_variable (name, value, aflags); - stupidly_hack_special_variables (name); + if (entry) + stupidly_hack_special_variables (entry->name); /* might be a nameref */ + else + 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; + set_exit_status (EXECUTION_FAILURE); retval = 1; /* error status, but not assignment failure */ } else @@ -2769,12 +3658,6 @@ do_assignment_internal (word, expand) 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 @@ -2792,8 +3675,9 @@ do_assignment (string) } int -do_word_assignment (word) +do_word_assignment (word, flags) WORD_DESC *word; + int flags; { return do_assignment_internal (word, 1); } @@ -2836,19 +3720,6 @@ list_rest_of_args () 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) @@ -2880,7 +3751,7 @@ string_rest_of_args (dollar_star) char *string; list = list_rest_of_args (); - string = dollar_star ? string_list_dollar_star (list) : string_list (list); + string = dollar_star ? string_list_dollar_star (list, 0, 0) : string_list (list); dispose_words (list); return (string); } @@ -2891,9 +3762,9 @@ string_rest_of_args (dollar_star) 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) +pos_params (string, start, end, quoted, pflags) char *string; - int start, end, quoted; + int start, end, quoted, pflags; { WORD_LIST *save, *params, *h, *t; char *ret; @@ -2904,7 +3775,7 @@ pos_params (string, start, end, quoted) return ((char *)NULL); save = params = list_rest_of_args (); - if (save == 0) + if (save == 0 && start > 0) return ((char *)NULL); if (start == 0) /* handle ${@:0[:x]} specially */ @@ -2916,16 +3787,18 @@ pos_params (string, start, end, quoted) for (i = start ? 1 : 0; params && i < start; i++) params = params->next; if (params == 0) - return ((char *)NULL); + { + dispose_words (save); + 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); + ret = string_list_pos_params (string[0], h, quoted, pflags); if (t != params) t->next = params; @@ -2946,6 +3819,10 @@ pos_params (string, start, end, quoted) #define EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~') #endif +/* We don't perform process substitution in arithmetic expressions, so don't + bother checking for it. */ +#define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~') + /* 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. */ @@ -3040,12 +3917,167 @@ expand_assignment_string_to_string (string, quoted) return (expand_string_to_string_internal (string, quoted, expand_string_assignment)); } +/* Kind of like a combination of dequote_string and quote_string_for_globbing; + try to remove CTLESC quoting characters and convert CTLESC escaping a `&' + or a backslash into a backslash. The output of this function must eventually + be processed by strcreplace(). */ +static char * +quote_string_for_repl (string, flags) + char *string; + int flags; +{ + size_t slen; + char *result, *t; + const char *s, *send; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + + result = (char *)xmalloc (slen * 2 + 1); + + if (string[0] == CTLESC && string[1] == 0) + { + result[0] = CTLESC; + result[1] = '\0'; + return (result); + } + + /* This is awkward. We want to translate CTLESC-\ to \\ if we will + eventually send this string through strcreplace(), which we will do + only if shouldexp_replacement() determines that there is something + to replace. We can either make sure to escape backslashes here and + have shouldexp_replacement() signal that we should send the string to + strcreplace() if it sees an escaped backslash, or we can scan the + string before copying it and turn CTLESC-\ into \\ only if we encounter + a CTLESC-& or a &. This does the former and changes shouldexp_replacement(). + If we double the backslashes here, we'll get doubled backslashes in any + result that doesn't get passed to strcreplace(). */ + + for (s = string, t = result; *s; ) + { + /* This function's result has to be processed by strcreplace() */ + if (*s == CTLESC && (s[1] == '&' || s[1] == '\\')) + { + *t++ = '\\'; + s++; + *t++ = *s++; + continue; + } + /* Dequote it */ + if (*s == CTLESC) + { + s++; + if (*s == '\0') + break; + } + COPY_CHAR_P (t, s, send); + } + + *t = '\0'; + return (result); +} + +/* This does not perform word splitting on the WORD_LIST it returns and + it treats $* as if it were quoted. It dequotes the WORD_LIST, adds + backslash escapes before CTLESC-quoted backslash and `& if + patsub_replacement is enabled. */ +static char * +expand_string_for_patsub (string, quoted) + char *string; + int quoted; +{ + WORD_LIST *value; + char *ret, *t; + + if (string == 0 || *string == '\0') + return (char *)NULL; + + value = expand_string_for_pat (string, quoted, (int *)0, (int *)0); + + if (value && value->word) + { + remove_quoted_nulls (value->word->word); /* XXX */ + value->word->flags &= ~W_HASQUOTEDNULL; + } + + if (value) + { + t = (value->next) ? string_list (value) : value->word->word; + ret = quote_string_for_repl (t, quoted); + if (t != value->word->word) + free (t); + dispose_words (value); + } + else + ret = (char *)NULL; + + return (ret); +} + char * expand_arith_string (string, quoted) char *string; int quoted; { - return (expand_string_if_necessary (string, quoted, expand_string)); + WORD_DESC td; + WORD_LIST *list, *tlist; + 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 (ARITH_EXP_CHAR (string[i])) + break; + else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"') + saw_quote = string[i]; + ADVANCE_CHAR (string, slen, i); + } + + if (string[i]) + { + /* This is expanded version of expand_string_internal as it's called by + expand_string_leave_quoted */ + td.flags = W_NOPROCSUB|W_NOTILDE; /* don't want process substitution or tilde expansion */ +#if 0 /* TAG: bash-5.2 */ + if (quoted & Q_ARRAYSUB) + td.flags |= W_NOCOMSUB; +#endif + td.word = savestring (string); + list = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL); + /* This takes care of the calls from expand_string_leave_quoted and + expand_string */ + if (list) + { + tlist = word_list_split (list); + dispose_words (list); + list = tlist; + if (list) + dequote_list (list); + } + /* This comes from expand_string_if_necessary */ + if (list) + { + ret = string_list (list); + dispose_words (list); + } + else + ret = (char *)NULL; + FREE (td.word); + } + else if (saw_quote && (quoted & Q_ARITH)) + ret = string_quote_removal (string, quoted); + else if (saw_quote && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + ret = string_quote_removal (string, quoted); + else + ret = savestring (string); + + return ret; } #if defined (COND_COMMAND) @@ -3075,8 +4107,12 @@ remove_backslashes (string) 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. */ + be quoted appropriately for regcomp/regexec. If SPECIAL is 3, this is + an array subscript and should be quoted after expansion so it's only + expanded once (Q_ARITH). The caller is responsible + for removing the backslashes if the unquoted word is needed later. In + any case, since we don't perform word splitting, we need to do quoted + null character removal. */ char * cond_expand_word (w, special) WORD_DESC *w; @@ -3089,32 +4125,192 @@ cond_expand_word (w, special) if (w->word == 0 || w->word[0] == '\0') return ((char *)NULL); + expand_no_split_dollar_star = 1; w->flags |= W_NOSPLIT2; - l = call_expand_word_internal (w, 0, 0, (int *)0, (int *)0); + qflags = (special == 3) ? Q_ARITH : 0; + l = call_expand_word_internal (w, qflags, 0, (int *)0, (int *)0); + expand_no_split_dollar_star = 0; if (l) { - if (special == 0) + if (special == 0) /* LHS */ + { + if (l->word) + word_list_remove_quoted_nulls (l); + dequote_list (l); + r = string_list (l); + } + else if (special == 3) /* arithmetic expression, Q_ARITH */ { + if (l->word) + word_list_remove_quoted_nulls (l); /* for now */ dequote_list (l); r = string_list (l); } else { - qflags = QGLOB_CVTNULL; + /* Need to figure out whether or not we should call dequote_escapes + or a new dequote_ctlnul function here, and under what + circumstances. */ + qflags = QGLOB_CVTNULL|QGLOB_CTLESC; if (special == 2) qflags |= QGLOB_REGEXP; + word_list_remove_quoted_nulls (l); p = string_list (l); r = quote_string_for_globbing (p, qflags); free (p); } - dispose_words (l); + dispose_words (l); + } + else + r = (char *)NULL; + + return r; +} +#endif + +/* Expand $'...' and $"..." in a string for code paths that don't do it. The + FLAGS argument is 1 if this function should treat CTLESC as a quote + character (e.g., for here-documents) or not (e.g., for shell_expand_line). */ +char * +expand_string_dollar_quote (string, flags) + char *string; + int flags; +{ + size_t slen, retind, retsize; + int sindex, c, translen, peekc, news; + char *ret, *trans, *send, *t; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + sindex = 0; + + retsize = slen + 1; + ret = xmalloc (retsize); + retind = 0; + + while (c = string[sindex]) + { + switch (c) + { + default: + RESIZE_MALLOCED_BUFFER (ret, retind, locale_mb_cur_max + 1, retsize, 64); + COPY_CHAR_I (ret, retind, string, send, sindex); + break; + + case '\\': + RESIZE_MALLOCED_BUFFER (ret, retind, locale_mb_cur_max + 2, retsize, 64); + ret[retind++] = string[sindex++]; + + if (string[sindex]) + COPY_CHAR_I (ret, retind, string, send, sindex); + break; + + case '\'': + case '"': + if (c == '\'') + news = skip_single_quoted (string, slen, ++sindex, SX_COMPLETE); + else + news = skip_double_quoted (string, slen, ++sindex, SX_COMPLETE); + translen = news - sindex - 1; + RESIZE_MALLOCED_BUFFER (ret, retind, translen + 3, retsize, 64); + ret[retind++] = c; + if (translen > 0) + { + strncpy (ret + retind, string + sindex, translen); + retind += translen; + } + if (news > sindex && string[news - 1] == c) + ret[retind++] = c; + sindex = news; + break; + + case CTLESC: + RESIZE_MALLOCED_BUFFER (ret, retind, locale_mb_cur_max + 2, retsize, 64); + if (flags) + ret[retind++] = string[sindex++]; + if (string[sindex]) + COPY_CHAR_I (ret, retind, string, send, sindex); + break; + + case '$': + peekc = string[++sindex]; +#if defined (TRANSLATABLE_STRINGS) + if (peekc != '\'' && peekc != '"') +#else + if (peekc != '\'') +#endif + { + RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 16); + ret[retind++] = c; + break; + } + if (string[sindex + 1] == '\0') /* don't bother */ + { + RESIZE_MALLOCED_BUFFER (ret, retind, 3, retsize, 16); + ret[retind++] = c; + ret[retind++] = peekc; + sindex++; + break; + } + if (peekc == '\'') + { + /* SX_COMPLETE is the equivalent of ALLOWESC here */ + /* We overload SX_COMPLETE below */ + news = skip_single_quoted (string, slen, ++sindex, SX_COMPLETE); + /* Check for unclosed string and don't bother if so */ + if (news > sindex && string[news] == '\0' && string[news-1] != peekc) + { + RESIZE_MALLOCED_BUFFER (ret, retind, 3, retsize, 16); + ret[retind++] = c; + ret[retind++] = peekc; + continue; + } + t = substring (string, sindex, news - 1); + trans = ansiexpand (t, 0, news-sindex-1, &translen); + free (t); + t = sh_single_quote (trans); + sindex = news; + } +#if defined (TRANSLATABLE_STRINGS) + else + { + news = ++sindex; + t = string_extract_double_quoted (string, &news, SX_COMPLETE); + /* Check for unclosed string and don't bother if so */ + if (news > sindex && string[news] == '\0' && string[news-1] != peekc) + { + RESIZE_MALLOCED_BUFFER (ret, retind, 3, retsize, 16); + ret[retind++] = c; + ret[retind++] = peekc; + free (t); + continue; + } + trans = locale_expand (t, 0, news-sindex, 0, &translen); + free (t); + if (singlequote_translations && + ((news-sindex-1) != translen || STREQN (t, trans, translen) == 0)) + t = sh_single_quote (trans); + else + t = sh_mkdoublequoted (trans, translen, 0); + sindex = news; + } +#endif /* TRANSLATABLE_STRINGS */ + free (trans); + trans = t; + translen = strlen (trans); + + RESIZE_MALLOCED_BUFFER (ret, retind, translen + 1, retsize, 128); + strcpy (ret + retind, trans); + retind += translen; + FREE (trans); + break; + } } - else - r = (char *)NULL; - return r; + ret[retind] = 0; + return ret; } -#endif /* Call expand_word_internal to expand W and handle error returns. A convenience function for functions that don't want to handle @@ -3137,13 +4333,16 @@ call_expand_word_internal (w, q, i, c, e) last_command_exit_value = EXECUTION_FAILURE; exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF); /* NOTREACHED */ + return (NULL); } else return (result); } /* Perform parameter expansion, command substitution, and arithmetic - expansion on STRING, as if it were a word. Leave the result quoted. */ + expansion on STRING, as if it were a word. Leave the result quoted. + Since this does not perform word splitting, it leaves quoted nulls + in the result. */ static WORD_LIST * expand_string_internal (string, quoted) char *string; @@ -3187,7 +4386,7 @@ expand_string_unsplit (string, quoted) { if (value->word) { - remove_quoted_nulls (value->word->word); + remove_quoted_nulls (value->word->word); /* XXX */ value->word->flags &= ~W_HASQUOTEDNULL; } dequote_list (value); @@ -3209,7 +4408,17 @@ expand_string_assignment (string, quoted) expand_no_split_dollar_star = 1; +#if 0 + /* Other shells (ksh93) do it this way, which affects how $@ is expanded + in constructs like bar=${@#0} (preserves the spaces resulting from the + expansion of $@ in a context where you don't do word splitting); Posix + interp 888 makes the expansion of $@ in contexts where word splitting + is not performed unspecified. */ + td.flags = W_ASSIGNRHS|W_NOSPLIT2; /* Posix interp 888 */ +#else td.flags = W_ASSIGNRHS; +#endif + td.flags |= (W_NOGLOB|W_TILDEEXP); td.word = savestring (string); value = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL); FREE (td.word); @@ -3220,7 +4429,7 @@ expand_string_assignment (string, quoted) { if (value->word) { - remove_quoted_nulls (value->word->word); + remove_quoted_nulls (value->word->word); /* XXX */ value->word->flags &= ~W_HASQUOTEDNULL; } dequote_list (value); @@ -3228,7 +4437,6 @@ expand_string_assignment (string, quoted) 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 @@ -3262,7 +4470,7 @@ expand_prompt_string (string, quoted, wflags) { if (value->word) { - remove_quoted_nulls (value->word->word); + remove_quoted_nulls (value->word->word); /* XXX */ value->word->flags &= ~W_HASQUOTEDNULL; } dequote_list (value); @@ -3300,19 +4508,73 @@ expand_string_leave_quoted (string, quoted) /* 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) +expand_string_for_rhs (string, quoted, op, pflags, dollar_at_p, expanded_p) char *string; - int quoted, *dollar_at_p, *has_dollar_at; + int quoted, op, pflags; + int *dollar_at_p, *expanded_p; { WORD_DESC td; WORD_LIST *tresult; + int old_nosplit; 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); + /* We want field splitting to be determined by what is going to be done with + the entire ${parameterOPword} expansion, so we don't want to split the RHS + we expand here. However, the expansion of $* is determined by whether we + are going to eventually perform word splitting, so we want to set this + depending on whether or not are are going to be splitting: if the expansion + is quoted, if the OP is `=', or if IFS is set to the empty string, we + are not going to be splitting, so we set expand_no_split_dollar_star to + note this to callees. + We pass through PF_ASSIGNRHS as W_ASSIGNRHS if this is on the RHS of an + assignment statement. */ + /* The updated treatment of $* is the result of Posix interp 888 */ + /* This was further clarified on the austin-group list in March, 2017 and + in Posix bug 1129 */ + old_nosplit = expand_no_split_dollar_star; + expand_no_split_dollar_star = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || op == '=' || ifs_is_null == 0; /* XXX - was 1 */ + td.flags = W_EXPANDRHS; /* expanding RHS of ${paramOPword} */ + td.flags |= W_NOSPLIT2; /* no splitting, remove "" and '' */ + if (pflags & PF_ASSIGNRHS) /* pass through */ + td.flags |= W_ASSIGNRHS; + if (op == '=') +#if 0 + td.flags |= W_ASSIGNRHS; /* expand b in ${a=b} like assignment */ +#else + td.flags |= W_ASSIGNRHS|W_NOASSNTILDE; /* expand b in ${a=b} like assignment */ +#endif + td.word = savestring (string); + tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, expanded_p); + expand_no_split_dollar_star = old_nosplit; + free (td.word); + + return (tresult); +} + +/* This does not perform word splitting or dequote the WORD_LIST + it returns and it treats $* as if it were quoted. */ +static WORD_LIST * +expand_string_for_pat (string, quoted, dollar_at_p, expanded_p) + char *string; + int quoted, *dollar_at_p, *expanded_p; +{ + WORD_DESC td; + WORD_LIST *tresult; + int oexp; + + if (string == 0 || *string == '\0') + return (WORD_LIST *)NULL; + + oexp = expand_no_split_dollar_star; + expand_no_split_dollar_star = 1; + td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */ + td.word = savestring (string); + tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, expanded_p); + expand_no_split_dollar_star = oexp; + free (td.word); + return (tresult); } @@ -3335,6 +4597,63 @@ expand_string (string, quoted) return (result ? dequote_list (result) : result); } +/******************************************* + * * + * 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; + + result = expand_word_leave_quoted (word, quoted); + 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 (ifs_is_null) + 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; +} + /*************************************************** * * * Functions to handle quoting chars * @@ -3355,24 +4674,32 @@ expand_string (string, quoted) 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; + document (effectively double-quoted). + FLAGS says whether or not we are going to split the result. If we are not, + and there is a CTLESC or CTLNUL in IFS, we need to quote CTLESC and CTLNUL, + respectively, to prevent them from being removed as part of dequoting. */ +static char * +quote_escapes_internal (string, flags) + const char *string; + int flags; { - register char *s, *t; + const char *s, *send; + char *t, *result; size_t slen; - char *result, *send; - int quote_spaces, skip_ctlesc, skip_ctlnul; + int quote_spaces, skip_ctlesc, skip_ctlnul, nosplit; DECLARE_MBSTATE; slen = strlen (string); send = string + slen; quote_spaces = (ifs_value && *ifs_value == 0); + nosplit = (flags & PF_NOSPLIT2); for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++) - skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL; + { + skip_ctlesc |= (nosplit == 0 && *s == CTLESC); + skip_ctlnul |= (nosplit == 0 && *s == CTLNUL); + } t = result = (char *)xmalloc ((slen * 2) + 1); s = string; @@ -3384,9 +4711,24 @@ quote_escapes (string) COPY_CHAR_P (t, s, send); } *t = '\0'; + return (result); } +char * +quote_escapes (string) + const char *string; +{ + return (quote_escapes_internal (string, 0)); +} + +char * +quote_rhs (string) + const char *string; +{ + return (quote_escapes_internal (string, PF_NOSPLIT2)); +} + static WORD_LIST * list_quote_escapes (list) WORD_LIST *list; @@ -3416,16 +4758,16 @@ list_quote_escapes (list) Also used by parts of the pattern substitution code. */ char * dequote_escapes (string) - char *string; + const char *string; { - register char *s, *t, *s1; + const char *s, *send; + char *t, *result; size_t slen; - char *result, *send; int quote_spaces; DECLARE_MBSTATE; if (string == 0) - return string; + return (char *)0; slen = strlen (string); send = string + slen; @@ -3449,9 +4791,28 @@ dequote_escapes (string) COPY_CHAR_P (t, s, send); } *t = '\0'; + return result; } +#if defined (INCLUDE_UNUSED) +static WORD_LIST * +list_dequote_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 = dequote_escapes (t); + free (t); + } + return list; +} +#endif + /* 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. */ @@ -3522,7 +4883,10 @@ dequote_string (string) char *result, *send; DECLARE_MBSTATE; - slen = strlen (string); + if (string[0] == CTLESC && string[1] == 0) + internal_debug ("dequote_string: string with bare CTLESC"); + + slen = STRLEN (string); t = result = (char *)xmalloc (slen + 1); @@ -3532,6 +4896,14 @@ dequote_string (string) return (result); } + /* A string consisting of only a single CTLESC should pass through unchanged */ + if (string[0] == CTLESC && string[1] == 0) + { + result[0] = CTLESC; + result[1] = '\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) @@ -3574,6 +4946,21 @@ quote_list (list) return list; } +WORD_DESC * +dequote_word (word) + WORD_DESC *word; +{ + register char *s; + + s = dequote_string (word->word); + if (QUOTED_NULL (word->word)) + word->flags &= ~W_HASQUOTEDNULL; + free (word->word); + word->word = s; + + return word; +} + /* De-quote quoted characters in each word in LIST. */ WORD_LIST * dequote_list (list) @@ -3611,11 +4998,43 @@ remove_quoted_escapes (string) 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. */ +/* Remove quoted $IFS characters from STRING. Quoted IFS characters are + added to protect them from word splitting, but we need to remove them + if no word splitting takes place. This returns newly-allocated memory, + so callers can use it to replace savestring(). */ +char * +remove_quoted_ifs (string) + char *string; +{ + register size_t slen; + register int i, j; + char *ret, *send; + DECLARE_MBSTATE; + + slen = strlen (string); + send = string + slen; + + i = j = 0; + ret = (char *)xmalloc (slen + 1); + + while (i < slen) + { + if (string[i] == CTLESC) + { + i++; + if (string[i] == 0 || isifs (string[i]) == 0) + ret[j++] = CTLESC; + if (i == slen) + break; + } + + COPY_CHAR_I (ret, j, string, send, i); + } + ret[j] = '\0'; + + return (ret); +} + char * remove_quoted_nulls (string) char *string; @@ -3638,15 +5057,19 @@ remove_quoted_nulls (string) 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; + i++; + string[j++] = CTLESC; if (i == slen) break; } else if (string[i] == CTLNUL) - i++; + { + i++; + continue; + } prev_i = i; - ADVANCE_CHAR (string, slen, i); + ADVANCE_CHAR (string, slen, i); /* COPY_CHAR_I? */ if (j < prev_i) { do string[j++] = string[prev_i++]; while (prev_i < i); @@ -3681,7 +5104,7 @@ word_list_remove_quoted_nulls (list) /* **************************************************************** */ #if defined (HANDLE_MULTIBYTE) -#if 0 /* Currently unused */ +# ifdef INCLUDE_UNUSED static unsigned char * mb_getcharlens (string, len) char *string; @@ -3704,7 +5127,7 @@ mb_getcharlens (string, len) } return ret; } -#endif +# endif #endif /* Remove the portion of PARAM matched by PATTERN according to OP, where OP @@ -3720,12 +5143,13 @@ mb_getcharlens (string, len) #define RP_LONG_RIGHT 3 #define RP_SHORT_RIGHT 4 +/* Returns its first argument if nothing matched; new memory otherwise */ static char * remove_upattern (param, pattern, op) char *param, *pattern; int op; { - register int len; + register size_t len; register char *end; register char *p, *ret, c; @@ -3788,10 +5212,11 @@ remove_upattern (param, pattern, op) break; } - return (savestring (param)); /* no match, return original string */ + return (param); /* no match, return original string */ } #if defined (HANDLE_MULTIBYTE) +/* Returns its first argument if nothing matched; new memory otherwise */ static wchar_t * remove_wpattern (wparam, wstrlen, wpattern, op) wchar_t *wparam; @@ -3857,7 +5282,7 @@ remove_wpattern (wparam, wstrlen, wpattern, op) break; } - return (wcsdup (wparam)); /* no match, return original string */ + return (wparam); /* no match, return original string */ } #endif /* HANDLE_MULTIBYTE */ @@ -3866,6 +5291,8 @@ remove_pattern (param, pattern, op) char *param, *pattern; int op; { + char *xret; + if (param == NULL) return (param); if (*param == '\0' || pattern == NULL || *pattern == '\0') /* minor optimization */ @@ -3878,18 +5305,33 @@ remove_pattern (param, pattern, op) size_t n; wchar_t *wparam, *wpattern; mbstate_t ps; - char *xret; + + /* XXX - could optimize here by checking param and pattern for multibyte + chars with mbsmbchar and calling remove_upattern. */ n = xdupmbstowcs (&wpattern, NULL, pattern); if (n == (size_t)-1) - return (remove_upattern (param, pattern, op)); + { + xret = remove_upattern (param, pattern, op); + return ((xret == param) ? savestring (param) : xret); + } n = xdupmbstowcs (&wparam, NULL, param); + if (n == (size_t)-1) { free (wpattern); - return (remove_upattern (param, pattern, op)); + xret = remove_upattern (param, pattern, op); + return ((xret == param) ? savestring (param) : xret); } oret = ret = remove_wpattern (wparam, n, wpattern, op); + /* Don't bother to convert wparam back to multibyte string if nothing + matched; just return copy of original string */ + if (ret == wparam) + { + free (wparam); + free (wpattern); + return (savestring (param)); + } free (wparam); free (wpattern); @@ -3904,36 +5346,9 @@ remove_pattern (param, pattern, op) } 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'); + xret = remove_upattern (param, pattern, op); + return ((xret == param) ? savestring (param) : xret); } } @@ -3949,7 +5364,8 @@ match_upattern (string, pat, mtype, sp, ep) int mtype; char **sp, **ep; { - int c, len; + int c, mlen; + size_t len; register char *p, *p1, *npat; char *end; @@ -3964,19 +5380,41 @@ match_upattern (string, pat, mtype, sp, ep) len = STRLEN (pat); if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*') { + int unescaped_backslash; + char *pp; + p = npat = (char *)xmalloc (len + 3); p1 = pat; - if (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob)) + if ((mtype != MATCH_BEG) && (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))) *p++ = '*'; while (*p1) *p++ = *p1++; - if (p1[-1] != '*' || p[-2] == '\\') +#if 1 + /* Need to also handle a pattern that ends with an unescaped backslash. + For right now, we ignore it because the pattern matching code will + fail the match anyway */ + /* If the pattern ends with a `*' we leave it alone if it's preceded by + an even number of backslashes, but if it's escaped by a backslash + we need to add another `*'. */ + if ((mtype != MATCH_END) && (p1[-1] == '*' && (unescaped_backslash = p1[-2] == '\\'))) + { + pp = p1 - 3; + while (pp >= pat && *pp-- == '\\') + unescaped_backslash = 1 - unescaped_backslash; + if (unescaped_backslash) + *p++ = '*'; + } + else if (mtype != MATCH_END && p1[-1] != '*') + *p++ = '*'; +#else + if (p1[-1] != '*' || p1[-2] == '\\') *p++ = '*'; +#endif *p = '\0'; } else npat = pat; - c = strmatch (npat, string, FNMATCH_EXTFLAG); + c = strmatch (npat, string, FNMATCH_EXTFLAG | FNMATCH_IGNCASE); if (npat != pat) free (npat); if (c == FNM_NOMATCH) @@ -3985,17 +5423,32 @@ match_upattern (string, pat, mtype, sp, ep) len = STRLEN (string); end = string + len; + mlen = umatchlen (pat, len); + if (mlen > (int)len) + return (0); + switch (mtype) { case MATCH_ANY: for (p = string; p <= end; p++) { - if (match_pattern_char (pat, p)) + if (match_pattern_char (pat, p, FNMATCH_IGNCASE)) { - for (p1 = end; p1 >= p; p1--) + p1 = (mlen == -1) ? end : p + mlen; + /* p1 - p = length of portion of string to be considered + p = current position in string + mlen = number of characters consumed by match (-1 for entire string) + end = end of string + we want to break immediately if the potential match len + is greater than the number of characters remaining in the + string + */ + if (p1 > end) + break; + for ( ; p1 >= p; p1--) { c = *p1; *p1 = '\0'; - if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0) + if (strmatch (pat, p, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) { *p1 = c; *sp = p; @@ -4003,6 +5456,11 @@ match_upattern (string, pat, mtype, sp, ep) return 1; } *p1 = c; +#if 1 + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; +#endif } } } @@ -4010,13 +5468,13 @@ match_upattern (string, pat, mtype, sp, ep) return (0); case MATCH_BEG: - if (match_pattern_char (pat, string) == 0) + if (match_pattern_char (pat, string, FNMATCH_IGNCASE) == 0) return (0); - for (p = end; p >= string; p--) + for (p = (mlen == -1) ? end : string + mlen; p >= string; p--) { c = *p; *p = '\0'; - if (strmatch (pat, string, FNMATCH_EXTFLAG) == 0) + if (strmatch (pat, string, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) { *p = c; *sp = string; @@ -4024,20 +5482,25 @@ match_upattern (string, pat, mtype, sp, ep) return 1; } *p = c; + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; } return (0); case MATCH_END: - for (p = string; p <= end; p++) + for (p = end - ((mlen == -1) ? len : mlen); p <= end; p++) { - if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0) + if (strmatch (pat, p, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) { *sp = p; *ep = end; return 1; } - + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; } return (0); @@ -4047,35 +5510,8 @@ match_upattern (string, pat, mtype, sp, ep) } #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'); - } -} +#define WFOLD(c) (match_ignore_case && iswupper (c) ? towlower (c) : (c)) /* Match WPAT anywhere in WSTRING and return the match boundaries. This returns 1 in case of a successful match, 0 otherwise. Wide @@ -4090,11 +5526,14 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) 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; + size_t len; + int mlen; + int n, n1, n2, simple; + + simple = (wpat[0] != L'\\' && wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'['); +#if defined (EXTENDED_GLOB) + if (extended_glob) + simple &= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/ #endif /* If the pattern doesn't match anywhere in the string, go ahead and @@ -4103,40 +5542,65 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) 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'*') { + int unescaped_backslash; + wchar_t *wpp; + 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 1 + /* See comments above in match_upattern. */ + if (wp1[-1] == L'*' && (unescaped_backslash = wp1[-2] == L'\\')) + { + wpp = wp1 - 3; + while (wpp >= wpat && *wpp-- == L'\\') + unescaped_backslash = 1 - unescaped_backslash; + if (unescaped_backslash) + *wp++ = L'*'; + } + else if (wp1[-1] != L'*') + *wp++ = L'*'; +#else if (wp1[-1] != L'*' || wp1[-2] == L'\\') *wp++ = L'*'; +#endif *wp = '\0'; } else nwpat = wpat; - len = wcsmatch (nwpat, wstring, FNMATCH_EXTFLAG); + len = wcsmatch (nwpat, wstring, FNMATCH_EXTFLAG | FNMATCH_IGNCASE); if (nwpat != wpat) free (nwpat); if (len == FNM_NOMATCH) return (0); + mlen = wmatchlen (wpat, wstrlen); + if (mlen > (int)wstrlen) + return (0); + +/* itrace("wmatchlen (%ls) -> %d", wpat, mlen); */ switch (mtype) { case MATCH_ANY: for (n = 0; n <= wstrlen; n++) { - if (match_pattern_wchar (wpat, wstring + n)) + n2 = simple ? (WFOLD(*wpat) == WFOLD(wstring[n])) : match_pattern_wchar (wpat, wstring + n, FNMATCH_IGNCASE); + if (n2) { - for (n1 = wstrlen; n1 >= n; n1--) + n1 = (mlen == -1) ? wstrlen : n + mlen; + if (n1 > wstrlen) + break; + + for ( ; n1 >= n; n1--) { wc = wstring[n1]; wstring[n1] = L'\0'; - if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0) + if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) { wstring[n1] = wc; *sp = indices[n]; @@ -4144,6 +5608,9 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) return 1; } wstring[n1] = wc; + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; } } } @@ -4151,13 +5618,13 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) return (0); case MATCH_BEG: - if (match_pattern_wchar (wpat, wstring) == 0) + if (match_pattern_wchar (wpat, wstring, FNMATCH_IGNCASE) == 0) return (0); - for (n = wstrlen; n >= 0; n--) + for (n = (mlen == -1) ? wstrlen : mlen; n >= 0; n--) { wc = wstring[n]; wstring[n] = L'\0'; - if (wcsmatch (wpat, wstring, FNMATCH_EXTFLAG) == 0) + if (wcsmatch (wpat, wstring, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) { wstring[n] = wc; *sp = indices[0]; @@ -4165,19 +5632,25 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) return 1; } wstring[n] = wc; + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; } return (0); case MATCH_END: - for (n = 0; n <= wstrlen; n++) + for (n = wstrlen - ((mlen == -1) ? wstrlen : mlen); n <= wstrlen; n++) { - if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0) + if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG | FNMATCH_IGNCASE) == 0) { *sp = indices[n]; *ep = indices[wstrlen]; return 1; } + /* If MLEN != -1, we have a fixed length pattern. */ + if (mlen != -1) + break; } return (0); @@ -4185,6 +5658,7 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) return (0); } +#undef WFOLD #endif /* HANDLE_MULTIBYTE */ static int @@ -4200,12 +5674,15 @@ match_pattern (string, pat, mtype, sp, ep) char **indices; #endif - if (string == 0 || *string == 0 || pat == 0 || *pat == 0) + if (string == 0 || pat == 0 || *pat == 0) return (0); #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1) { + if (mbsmbchar (string) == 0 && mbsmbchar (pat) == 0) + return (match_upattern (string, pat, mtype, sp, ep)); + n = xdupmbstowcs (&wpat, NULL, pat); if (n == (size_t)-1) return (match_upattern (string, pat, mtype, sp, ep)); @@ -4266,18 +5743,20 @@ getpattern (value, quoted, expandpat) if (expandpat && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && *tword) { i = 0; - pat = string_extract_double_quoted (tword, &i, 1); + pat = string_extract_double_quoted (tword, &i, SX_STRIPDQ); free (tword); tword = pat; } #endif - /* expand_string_for_rhs () leaves WORD quoted and does not perform + /* expand_string_for_pat () leaves WORD quoted and does not perform word splitting. */ - l = *value ? expand_string_for_rhs (value, + l = *value ? expand_string_for_pat (value, (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? Q_PATQUOTE : quoted, (int *)NULL, (int *)NULL) : (WORD_LIST *)0; + if (l) + word_list_remove_quoted_nulls (l); pat = string_list (l); dispose_words (l); if (pat) @@ -4324,7 +5803,7 @@ list_remove_pattern (list, pattern, patspec, itype, quoted) } l = REVERSE_LIST (new, WORD_LIST *); - tword = string_list_pos_params (itype, l, quoted); + tword = string_list_pos_params (itype, l, quoted, 0); dispose_words (l); return (tword); @@ -4349,11 +5828,11 @@ parameter_list_remove_pattern (itype, pattern, patspec, quoted) #if defined (ARRAY_VARS) static char * -array_remove_pattern (var, pattern, patspec, varname, quoted) +array_remove_pattern (var, pattern, patspec, starsub, quoted) SHELL_VAR *var; char *pattern; int patspec; - char *varname; /* so we can figure out how it's indexed */ + int starsub; /* so we can figure out how it's indexed */ int quoted; { ARRAY *a; @@ -4363,9 +5842,9 @@ array_remove_pattern (var, pattern, patspec, varname, quoted) WORD_LIST *list; SHELL_VAR *v; - /* compute itype from varname here */ - v = array_variable_part (varname, &ret, 0); - itype = ret[0]; + v = var; /* XXX - for now */ + + itype = starsub ? '*' : '@'; a = (v && array_p (v)) ? array_cell (v) : 0; h = (v && assoc_p (v)) ? assoc_cell (v) : 0; @@ -4381,22 +5860,28 @@ array_remove_pattern (var, pattern, patspec, varname, quoted) #endif /* ARRAY_VARS */ static char * -parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted) - char *varname, *value, *patstr; - int rtype, quoted; +parameter_brace_remove_pattern (varname, value, estatep, patstr, rtype, quoted, flags) + char *varname, *value; + array_eltstate_t *estatep; + char *patstr; + int rtype, quoted, flags; { int vtype, patspec, starsub; - char *temp1, *val, *pattern; + char *temp1, *val, *pattern, *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); + vtype = get_var_and_type (varname, value, estatep, quoted, flags, &v, &val); if (vtype == -1) - return ((char *)NULL); + { + this_command_name = oname; + return ((char *)NULL); + } starsub = vtype & VT_STARSUB; vtype &= ~VT_STARSUB; @@ -4430,7 +5915,7 @@ parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted) break; #if defined (ARRAY_VARS) case VT_ARRAYVAR: - temp1 = array_remove_pattern (v, pattern, patspec, varname, quoted); + temp1 = array_remove_pattern (v, pattern, patspec, starsub, quoted); if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) { val = quote_escapes (temp1); @@ -4441,7 +5926,11 @@ parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted) #endif case VT_POSPARMS: temp1 = parameter_list_remove_pattern (varname[0], pattern, patspec, quoted); - if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + if (temp1 && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) { val = quote_escapes (temp1); free (temp1); @@ -4450,82 +5939,16 @@ parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted) break; } + this_command_name = oname; + 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) +static void reap_some_procsubs PARAMS((int)); + /*****************************************************************/ /* */ /* Hacking Process Substitution */ @@ -4535,10 +5958,15 @@ expand_word_leave_quoted (word, quoted) #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. */ + unlink the ones that don't have a living process on the other end. + unlink_all_fifos will walk the list and unconditionally unlink them, trying + to open and close the FIFO first to release any child processes sleeping on + the FIFO. 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 +/* PROC value of -1 means the process has been reaped and the FIFO needs to + be removed. PROC value of 0 means the slot is unused. */ struct temp_fifo { char *file; pid_t proc; @@ -4548,21 +5976,66 @@ static struct temp_fifo *fifo_list = (struct temp_fifo *)NULL; static int nfifo; static int fifo_list_size; +void +clear_fifo_list () +{ + int i; + + for (i = 0; i < fifo_list_size; i++) + { + if (fifo_list[i].file) + free (fifo_list[i].file); + fifo_list[i].file = NULL; + fifo_list[i].proc = 0; + } + nfifo = 0; +} + +void * +copy_fifo_list (sizep) + int *sizep; +{ + if (sizep) + *sizep = 0; + return (void *)NULL; +} + static void add_fifo_list (pathname) char *pathname; { + int osize, i; + if (nfifo >= fifo_list_size - 1) { + osize = fifo_list_size; fifo_list_size += FIFO_INCR; fifo_list = (struct temp_fifo *)xrealloc (fifo_list, fifo_list_size * sizeof (struct temp_fifo)); + for (i = osize; i < fifo_list_size; i++) + { + fifo_list[i].file = (char *)NULL; + fifo_list[i].proc = 0; /* unused */ + } } fifo_list[nfifo].file = savestring (pathname); nfifo++; } +void +unlink_fifo (i) + int i; +{ + if ((fifo_list[i].proc == (pid_t)-1) || (fifo_list[i].proc > 0 && (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 = 0; + } +} + void unlink_fifo_list () { @@ -4573,12 +6046,12 @@ unlink_fifo_list () for (i = saved = 0; i < nfifo; i++) { - if ((fifo_list[i].proc == -1) || (kill(fifo_list[i].proc, 0) == -1)) + if ((fifo_list[i].proc == (pid_t)-1) || (fifo_list[i].proc > 0 && (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; + fifo_list[i].proc = 0; } else saved++; @@ -4590,8 +6063,13 @@ unlink_fifo_list () 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; + if (i != j) + { + fifo_list[j].file = fifo_list[i].file; + fifo_list[j].proc = fifo_list[i].proc; + fifo_list[i].file = (char *)NULL; + fifo_list[i].proc = 0; + } j++; } nfifo = j; @@ -4600,12 +6078,129 @@ unlink_fifo_list () nfifo = 0; } +void +unlink_all_fifos () +{ + int i, fd; + + if (nfifo == 0) + return; + + for (i = 0; i < nfifo; i++) + { + fifo_list[i].proc = (pid_t)-1; +#if defined (O_NONBLOCK) + fd = open (fifo_list[i].file, O_RDWR|O_NONBLOCK); +#else + fd = -1; +#endif + unlink_fifo (i); + if (fd >= 0) + close (fd); + } + + nfifo = 0; +} + +/* Take LIST, which is a bitmap denoting active FIFOs in fifo_list + from some point in the past, and close all open FIFOs in fifo_list + that are not marked as active in LIST. If LIST is NULL, close + everything in fifo_list. LSIZE is the number of elements in LIST, in + case it's larger than fifo_list_size (size of fifo_list). */ +void +close_new_fifos (list, lsize) + void *list; + int lsize; +{ + int i; + char *plist; + + if (list == 0) + { + unlink_fifo_list (); + return; + } + + for (plist = (char *)list, i = 0; i < lsize; i++) + if (plist[i] == 0 && i < fifo_list_size && fifo_list[i].proc != -1) + unlink_fifo (i); + + for (i = lsize; i < fifo_list_size; i++) + unlink_fifo (i); +} + +int +find_procsub_child (pid) + pid_t pid; +{ + int i; + + for (i = 0; i < nfifo; i++) + if (fifo_list[i].proc == pid) + return i; + return -1; +} + +void +set_procsub_status (ind, pid, status) + int ind; + pid_t pid; + int status; +{ + if (ind >= 0 && ind < nfifo) + fifo_list[ind].proc = (pid_t)-1; /* sentinel */ +} + +/* If we've marked the process for this procsub as dead, close the + associated file descriptor and delete the FIFO. */ +static void +reap_some_procsubs (max) + int max; +{ + int i; + + for (i = 0; i < max; i++) + if (fifo_list[i].proc == (pid_t)-1) /* reaped */ + unlink_fifo (i); +} + +void +reap_procsubs () +{ + reap_some_procsubs (nfifo); +} + +#if 0 +/* UNUSED */ +void +wait_procsubs () +{ + int i, r; + + for (i = 0; i < nfifo; i++) + { + if (fifo_list[i].proc != (pid_t)-1 && fifo_list[i].proc > 0) + { + r = wait_for (fifo_list[i].proc, 0); + save_proc_status (fifo_list[i].proc, r); + fifo_list[i].proc = (pid_t)-1; + } + } +} +#endif + int fifos_pending () { return nfifo; } +int +num_fifos () +{ + return nfifo; +} + static char * make_named_pipe () { @@ -4628,15 +6223,62 @@ make_named_pipe () 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; +/* dev_fd_list[I] value of -1 means the process has been reaped and file + descriptor I needs to be closed. Value of 0 means the slot is unused. */ + +static pid_t *dev_fd_list = (pid_t *)NULL; static int nfds; static int totfds; /* The highest possible number of open files. */ +void +clear_fifo (i) + int i; +{ + if (dev_fd_list[i]) + { + dev_fd_list[i] = 0; + nfds--; + } +} + +void +clear_fifo_list () +{ + register int i; + + if (nfds == 0) + return; + + for (i = 0; nfds && i < totfds; i++) + clear_fifo (i); + + nfds = 0; +} + +void * +copy_fifo_list (sizep) + int *sizep; +{ + void *ret; + + if (nfds == 0 || totfds == 0) + { + if (sizep) + *sizep = 0; + return (void *)NULL; + } + + if (sizep) + *sizep = totfds; + ret = xmalloc (totfds * sizeof (pid_t)); + return (memcpy (ret, dev_fd_list, totfds * sizeof (pid_t))); +} + static void add_fifo_list (fd) int fd; { - if (!dev_fd_list || fd >= totfds) + if (dev_fd_list == 0 || fd >= totfds) { int ofds; @@ -4647,11 +6289,12 @@ add_fifo_list (fd) 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 = (pid_t *)xrealloc (dev_fd_list, totfds * sizeof (dev_fd_list[0])); + /* XXX - might need a loop for this */ + memset (dev_fd_list + ofds, '\0', (totfds - ofds) * sizeof (pid_t)); } - dev_fd_list[fd] = 1; + dev_fd_list[fd] = 1; /* marker; updated later */ nfds++; } @@ -4661,6 +6304,24 @@ fifos_pending () return 0; /* used for cleanup; not needed with /dev/fd */ } +int +num_fifos () +{ + return nfds; +} + +void +unlink_fifo (fd) + int fd; +{ + if (dev_fd_list[fd]) + { + close (fd); + dev_fd_list[fd] = 0; + nfds--; + } +} + void unlink_fifo_list () { @@ -4669,17 +6330,109 @@ unlink_fifo_list () if (nfds == 0) return; - for (i = 0; nfds && i < totfds; i++) - if (dev_fd_list[i]) - { - close (i); - dev_fd_list[i] = 0; - nfds--; - } + for (i = totfds-1; nfds && i >= 0; i--) + unlink_fifo (i); nfds = 0; } +void +unlink_all_fifos () +{ + unlink_fifo_list (); +} + +/* Take LIST, which is a snapshot copy of dev_fd_list from some point in + the past, and close all open fds in dev_fd_list that are not marked + as open in LIST. If LIST is NULL, close everything in dev_fd_list. + LSIZE is the number of elements in LIST, in case it's larger than + totfds (size of dev_fd_list). */ +void +close_new_fifos (list, lsize) + void *list; + int lsize; +{ + int i; + pid_t *plist; + + if (list == 0) + { + unlink_fifo_list (); + return; + } + + for (plist = (pid_t *)list, i = 0; i < lsize; i++) + if (plist[i] == 0 && i < totfds && dev_fd_list[i]) + unlink_fifo (i); + + for (i = lsize; i < totfds; i++) + unlink_fifo (i); +} + +int +find_procsub_child (pid) + pid_t pid; +{ + int i; + + if (nfds == 0) + return -1; + + for (i = 0; i < totfds; i++) + if (dev_fd_list[i] == pid) + return i; + + return -1; +} + +void +set_procsub_status (ind, pid, status) + int ind; + pid_t pid; + int status; +{ + if (ind >= 0 && ind < totfds) + dev_fd_list[ind] = (pid_t)-1; /* sentinel */ +} + +/* If we've marked the process for this procsub as dead, close the + associated file descriptor. */ +static void +reap_some_procsubs (max) + int max; +{ + int i; + + for (i = 0; nfds > 0 && i < max; i++) + if (dev_fd_list[i] == (pid_t)-1) + unlink_fifo (i); +} + +void +reap_procsubs () +{ + reap_some_procsubs (totfds); +} + +#if 0 +/* UNUSED */ +void +wait_procsubs () +{ + int i, r; + + for (i = 0; nfds > 0 && i < totfds; i++) + { + if (dev_fd_list[i] != (pid_t)-1 && dev_fd_list[i] > 0) + { + r = wait_for (dev_fd_list[i], 0); + save_proc_status (dev_fd_list[i], r); + dev_fd_list[i] = (pid_t)-1; + } + } +} +#endif + #if defined (NOTDEF) print_dev_fd_list () { @@ -4733,7 +6486,7 @@ process_substitute (string, open_for_read_in_child) int open_for_read_in_child; { char *pathname; - int fd, result; + int fd, result, rc, function_value; pid_t old_pid, pid; #if defined (HAVE_DEV_FD) int parent_pipe_fd, child_pipe_fd; @@ -4751,7 +6504,7 @@ process_substitute (string, open_for_read_in_child) #else /* HAVE_DEV_FD */ if (pipe (fildes) < 0) { - sys_error (_("cannot make pipe for process substitution")); + sys_error ("%s", _("cannot make pipe for process substitution")); return ((char *)NULL); } /* If OPEN_FOR_READ_IN_CHILD == 1, we want to use the write end of @@ -4767,7 +6520,7 @@ process_substitute (string, open_for_read_in_child) if (pathname == 0) { - sys_error (_("cannot make pipe for process substitution")); + sys_error ("%s", _("cannot make pipe for process substitution")); return ((char *)NULL); } @@ -4775,19 +6528,45 @@ process_substitute (string, open_for_read_in_child) #if defined (JOB_CONTROL) old_pipeline_pgrp = pipeline_pgrp; - pipeline_pgrp = shell_pgrp; + if (pipeline_pgrp == 0 || (subshell_environment & (SUBSHELL_PIPE|SUBSHELL_FORK|SUBSHELL_ASYNC)) == 0) + pipeline_pgrp = shell_pgrp; save_pipeline (1); #endif /* JOB_CONTROL */ - pid = make_child ((char *)NULL, 1); + pid = make_child ((char *)NULL, FORK_ASYNC); if (pid == 0) { +#if 0 + int old_interactive; + + old_interactive = interactive; +#endif + /* The currently-executing shell is not interactive */ + interactive = 0; + reset_terminating_signals (); /* XXX */ free_pushed_string_input (); /* Cancel traps, in trap.c. */ - restore_original_signals (); + restore_original_signals (); /* XXX - what about special builtins? bash-4.2 */ + subshell_environment &= ~SUBSHELL_IGNTRAP; + QUIT; /* catch any interrupts we got post-fork */ setup_async_signals (); - subshell_environment |= SUBSHELL_COMSUB|SUBSHELL_PROCSUB; +#if 0 + if (open_for_read_in_child == 0 && old_interactive && (bash_input.type == st_stdin || bash_input.type == st_stream)) + async_redirect_stdin (); +#endif + + subshell_environment |= SUBSHELL_COMSUB|SUBSHELL_PROCSUB|SUBSHELL_ASYNC; + + /* We don't inherit the verbose option for command substitutions now, so + let's try it for process substitutions. */ + change_flag ('v', FLAG_OFF); + + /* if we're expanding a redirection, we shouldn't have access to the + temporary environment, but commands in the subshell should have + access to their own temporary environment. */ + if (expanding_redir) + flush_temporary_env (); } #if defined (JOB_CONTROL) @@ -4795,26 +6574,37 @@ process_substitute (string, open_for_read_in_child) stop_making_children (); /* XXX - should we only do this in the parent? (as in command subst) */ pipeline_pgrp = old_pipeline_pgrp; +#else + stop_making_children (); #endif /* JOB_CONTROL */ if (pid < 0) { - sys_error (_("cannot make child for process substitution")); + sys_error ("%s", _("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 */ +#if defined (JOB_CONTROL) + restore_pipeline (1); +#endif return ((char *)NULL); } if (pid > 0) { #if defined (JOB_CONTROL) - restore_pipeline (1); + last_procsub_child = restore_pipeline (0); + /* We assume that last_procsub_child->next == last_procsub_child because + of how jobs.c:add_process() works. */ + last_procsub_child->next = 0; + procsub_add (last_procsub_child); #endif -#if !defined (HAVE_DEV_FD) +#if defined (HAVE_DEV_FD) + dev_fd_list[parent_pipe_fd] = pid; +#else fifo_list[nfifo-1].proc = pid; #endif @@ -4834,12 +6624,32 @@ process_substitute (string, open_for_read_in_child) set_sigint_handler (); #if defined (JOB_CONTROL) + /* make sure we don't have any job control */ set_job_control (0); + + /* Clear out any existing list of process substitutions */ + procsub_clear (); + + /* The idea is that we want all the jobs we start from an async process + substitution to be in the same process group, but not the same pgrp + as our parent shell, since we don't want to affect our parent shell's + jobs if we get a SIGHUP and end up calling hangup_all_jobs, for example. + If pipeline_pgrp != shell_pgrp, we assume that there is a job control + shell somewhere in our parent process chain (since make_child initializes + pipeline_pgrp to shell_pgrp if job_control == 0). What we do in this + case is to set pipeline_pgrp to our PID, so all jobs started by this + process have that same pgrp and we are basically the process group leader. + This should not have negative effects on child processes surviving + after we exit, since we wait for the children we create, but that is + something to watch for. */ + + if (pipeline_pgrp != shell_pgrp) + pipeline_pgrp = getpid (); #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); + fd = open (pathname, open_for_read_in_child ? O_RDONLY : O_WRONLY); if (fd < 0) { /* Two separate strings for ease of translation. */ @@ -4862,6 +6672,11 @@ process_substitute (string, open_for_read_in_child) fd = child_pipe_fd; #endif /* HAVE_DEV_FD */ + /* Discard buffered stdio output before replacing the underlying file + descriptor. */ + if (open_for_read_in_child == 0) + fpurge (stdout); + if (dup2 (fd, open_for_read_in_child ? 0 : 1) < 0) { sys_error (_("cannot duplicate named pipe %s as fd %d"), pathname, @@ -4888,14 +6703,53 @@ process_substitute (string, open_for_read_in_child) dev_fd_list[parent_pipe_fd] = 0; #endif /* HAVE_DEV_FD */ - result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST)); + /* subshells shouldn't have this flag, which controls using the temporary + environment for variable lookups. We have already flushed the temporary + environment above in the case we're expanding a redirection, so processes + executed by this command need to be able to set it independently of their + parent. */ + expanding_redir = 0; + + remove_quoted_escapes (string); + + startup_state = 2; /* see if we can avoid a fork */ + parse_and_execute_level = 0; + + /* Give process substitution a place to jump back to on failure, + so we don't go back up to main (). */ + result = setjmp_nosigs (top_level); + + /* If we're running a process 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_nosigs (return_catch); + else + function_value = 0; + + if (result == ERREXIT) + rc = last_command_exit_value; + else if (result == EXITPROG || result == EXITBLTIN) + 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, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST)); + /* leave subshell level intact for any exit trap */ + } #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); + last_command_exit_value = rc; + rc = run_exit_trap (); + exit (rc); /*NOTREACHED*/ } #endif /* PROCESS_SUBSTITUTION */ @@ -4906,27 +6760,55 @@ process_substitute (string, open_for_read_in_child) /* */ /***********************************/ +#define COMSUB_PIPEBUF 4096 + +static char * +optimize_cat_file (r, quoted, flags, flagp) + REDIRECT *r; + int quoted, flags, *flagp; +{ + char *ret; + int fd; + + fd = open_redir_file (r, (char **)0); + if (fd < 0) + return &expand_param_error; + + ret = read_comsub (fd, quoted, flags, flagp); + close (fd); + + return ret; +} + static char * -read_comsub (fd, quoted, rflag) - int fd, quoted; +read_comsub (fd, quoted, flags, rflag) + int fd, quoted, flags; int *rflag; { - char *istring, buf[128], *bufp, *s; - int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul; + char *istring, buf[COMSUB_PIPEBUF], *bufp; + int c, tflag, skip_ctlesc, skip_ctlnul; + int mb_cur_max; + size_t istring_index; + size_t istring_size; ssize_t bufn; + int nullbyte; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + wchar_t wc; + size_t mblen; + int i; +#endif 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; + skip_ctlesc = ifs_cmap[CTLESC]; + skip_ctlnul = ifs_cmap[CTLNUL]; -#ifdef __CYGWIN__ - setmode (fd, O_TEXT); /* we don't want CR/LF, we want Unix-style */ -#endif + mb_cur_max = MB_CUR_MAX; + nullbyte = 0; - /* Read the output of the command through the pipe. This may need to be - changed to understand multibyte characters in the future. */ + /* Read the output of the command through the pipe. */ while (1) { if (fd < 0) @@ -4942,40 +6824,54 @@ read_comsub (fd, quoted, rflag) if (c == 0) { -#if 0 - internal_warning ("read_comsub: ignored null byte in input"); +#if 1 + if (nullbyte == 0) + { + internal_warning ("%s", _("command substitution: ignored null byte in input")); + nullbyte = 1; + } #endif continue; } /* Add the character to ISTRING, possibly after resizing it. */ - RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, DEFAULT_ARRAY_SIZE); + RESIZE_MALLOCED_BUFFER (istring, istring_index, mb_cur_max+1, istring_size, 512); /* This is essentially quote_string inline */ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) /* || c == CTLESC || c == CTLNUL */) istring[istring_index++] = CTLESC; + else if ((flags & PF_ASSIGNRHS) && skip_ctlesc && c == CTLESC) + 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; - } + 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'; +#if defined (HANDLE_MULTIBYTE) + if ((locale_utf8locale && (c & 0x80)) || + (locale_utf8locale == 0 && mb_cur_max > 1 && (unsigned char)c > 127)) + { + /* read a multibyte character from buf */ + /* punt on the hard case for now */ + memset (&ps, '\0', sizeof (mbstate_t)); + mblen = mbrtowc (&wc, bufp-1, bufn, &ps); + if (MB_INVALIDCH (mblen) || mblen == 0 || mblen == 1) + istring[istring_index++] = c; + else + { + istring[istring_index++] = c; + for (i = 0; i < mblen-1; i++) + istring[istring_index++] = *bufp++; + bufn -= mblen - 1; + } + continue; } #endif -#endif + + istring[istring_index++] = c; } if (istring) @@ -5020,22 +6916,54 @@ read_comsub (fd, quoted, rflag) /* Perform command substitution on STRING. This returns a WORD_DESC * with the contained string possibly quoted. */ WORD_DESC * -command_substitute (string, quoted) +command_substitute (string, quoted, flags) char *string; int quoted; + int flags; { pid_t pid, old_pid, old_pipeline_pgrp, old_async_pid; - char *istring; - int result, fildes[2], function_value, pflags, rc, tflag; + char *istring, *s; + int result, fildes[2], function_value, pflags, rc, tflag, fork_flags; WORD_DESC *ret; + sigset_t set, oset; 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])) + for (s = string; s && *s && (shellblank (*s) || *s == '\n'); s++) + ; + if (s == 0 || *s == 0) return ((WORD_DESC *)NULL); + if (*s == '<' && (s[1] != '<' && s[1] != '>' && s[1] != '&')) + { + COMMAND *cmd; + + cmd = parse_string_to_command (string, 0); /* XXX - flags */ + if (cmd && can_optimize_cat_file (cmd)) + { + tflag = 0; + istring = optimize_cat_file (cmd->value.Simple->redirects, quoted, flags, &tflag); + if (istring == &expand_param_error) + { + last_command_exit_value = EXECUTION_FAILURE; + istring = 0; + } + else + last_command_exit_value = EXECUTION_SUCCESS; /* compat */ + last_command_subst_pid = dollar_dollar_pid; + + dispose_command (cmd); + ret = alloc_word_desc (); + ret->word = istring; + ret->flags = tflag; + + return ret; + } + dispose_command (cmd); + } + if (wordexp_only && read_but_dont_execute) { last_command_exit_value = EX_WEXPCOMSUB; @@ -5057,30 +6985,45 @@ command_substitute (string, quoted) /* Flags to pass to parse_and_execute() */ pflags = (interactive && sourcelevel == 0) ? SEVAL_RESETLINE : 0; + old_pid = last_made_pid; + /* Pipe the output of executing STRING into the current shell. */ if (pipe (fildes) < 0) { - sys_error (_("cannot make pipe for command substitution")); + sys_error ("%s", _("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) + /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or + we've already forked to run a disk command (and are expanding redirections, + for example). */ + if ((subshell_environment & (SUBSHELL_FORK|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); + fork_flags = (subshell_environment&SUBSHELL_ASYNC) ? FORK_ASYNC : 0; + pid = make_child ((char *)NULL, fork_flags|FORK_NOTERM); 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 (); + { + /* Reset the signal handlers in the child, but don't free the + trap strings. Set a flag noting that we have to free the + trap strings if we run trap to change a signal disposition. */ + reset_signal_handlers (); + if (ISINTERRUPT) + { + kill (getpid (), SIGINT); + CLRINTERRUPT; /* if we're ignoring SIGINT somehow */ + } + QUIT; /* catch any interrupts we got post-fork */ + subshell_environment |= SUBSHELL_RESETTRAP; + subshell_environment &= ~SUBSHELL_IGNTRAP; + } #if defined (JOB_CONTROL) /* XXX DO THIS ONLY IN PARENT ? XXX */ @@ -5097,6 +7040,8 @@ command_substitute (string, quoted) sys_error (_("cannot make child for command substitution")); error_exit: + last_made_pid = old_pid; + FREE (istring); close (fildes[0]); close (fildes[1]); @@ -5105,13 +7050,27 @@ command_substitute (string, quoted) if (pid == 0) { + /* The currently executing shell is not interactive. */ + interactive = 0; + +#if defined (JOB_CONTROL) + /* Invariant: in child processes started to run command substitutions, + pipeline_pgrp == shell_pgrp. Other parts of the shell assume this. */ + if (pipeline_pgrp > 0 && pipeline_pgrp != shell_pgrp) + shell_pgrp = pipeline_pgrp; +#endif + set_sigint_handler (); /* XXX */ free_pushed_string_input (); + /* Discard buffered stdio output before replacing the underlying file + descriptor. */ + fpurge (stdout); + if (dup2 (fildes[1], 1) < 0) { - sys_error (_("command_substitute: cannot duplicate pipe as fd 1")); + sys_error ("%s", _("command_substitute: cannot duplicate pipe as fd 1")); exit (EXECUTION_FAILURE); } @@ -5131,35 +7090,69 @@ command_substitute (string, quoted) (fildes[0] != fileno (stderr))) close (fildes[0]); - /* The currently executing shell is not interactive. */ - interactive = 0; +#ifdef __CYGWIN__ + /* Let stdio know the fd may have changed from text to binary mode, and + make sure to preserve stdout line buffering. */ + freopen (NULL, "w", stdout); + sh_setlinebuf (stdout); +#endif /* __CYGWIN__ */ /* 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; + /* Many shells do not appear to inherit the -v option for command + substitutions. */ + change_flag ('v', FLAG_OFF); + + /* When inherit_errexit option is not enabled, command substitution does + not inherit the -e flag. It is enabled when Posix mode is enabled */ + if (inherit_errexit == 0) + { + builtin_ignoring_errexit = 0; + change_flag ('e', FLAG_OFF); + } + set_shellopts (); + + /* If we are expanding a redirection, we can dispose of any temporary + environment we received, since redirections are not supposed to have + access to the temporary environment. We will have to see whether this + affects temporary environments supplied to `eval', but the temporary + environment gets copied to builtin_env at some point. */ + if (expanding_redir) + { + flush_temporary_env (); + expanding_redir = 0; + } remove_quoted_escapes (string); + /* We want to expand aliases on this pass if we are not in posix mode + for backwards compatibility. parse_and_execute() takes care of + setting expand_aliases back to the global value when executing the + parsed string. We only do this for $(...) command substitution, + since that is what parse_comsub handles; `` comsubs are processed + using parse.y:parse_matched_pair(). */ + if (expand_aliases && (flags & PF_BACKQUOTE) == 0) + expand_aliases = posixly_correct == 0; + startup_state = 2; /* see if we can avoid a fork */ + parse_and_execute_level = 0; + /* Give command substitution a place to jump back to on failure, so we don't go back up to main (). */ - result = setjmp (top_level); + result = setjmp_nosigs (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); + function_value = setjmp_nosigs (return_catch); else function_value = 0; if (result == ERREXIT) rc = last_command_exit_value; - else if (result == EXITPROG) + else if (result == EXITPROG || result == EXITBLTIN) rc = last_command_exit_value; else if (result) rc = EXECUTION_FAILURE; @@ -5169,7 +7162,7 @@ command_substitute (string, quoted) { subshell_level++; rc = parse_and_execute (string, "command substitution", pflags|SEVAL_NOHIST); - subshell_level--; + /* leave subshell level intact for any exit trap */ } last_command_exit_value = rc; @@ -5181,19 +7174,31 @@ command_substitute (string, quoted) } else { + int dummyfd; + #if defined (JOB_CONTROL) && defined (PGRP_PIPE) close_pgrp_pipe (); #endif /* JOB_CONTROL && PGRP_PIPE */ close (fildes[1]); + begin_unwind_frame ("read-comsub"); + dummyfd = fildes[0]; + add_unwind_protect (close, dummyfd); + + /* Block SIGINT while we're reading from the pipe. If the child + process gets a SIGINT, it will either handle it or die, and the + read will return. */ + BLOCK_SIGNAL (SIGINT, set, oset); tflag = 0; - istring = read_comsub (fildes[0], quoted, &tflag); + istring = read_comsub (fildes[0], quoted, flags, &tflag); close (fildes[0]); + discard_unwind_frame ("read-comsub"); + UNBLOCK_SIGNAL (oset); current_command_subst_pid = pid; - last_command_exit_value = wait_for (pid); + last_command_exit_value = wait_for (pid, JWAIT_NOTERM); last_command_subst_pid = pid; last_made_pid = old_pid; @@ -5203,19 +7208,6 @@ command_substitute (string, quoted) 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 (); @@ -5243,22 +7235,23 @@ array_length_reference (s) char *akey; char *t, c; ARRAY *array; + HASH_TABLE *h; SHELL_VAR *var; - var = array_variable_part (s, &t, &len); + var = array_variable_part (s, 0, &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) + if ((var == 0 || invisible_p (var) || (assoc_p (var) == 0 && array_p (var) == 0)) && unbound_vars_is_error) { c = *--t; *t = '\0'; - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); err_unboundvar (s); *t = c; return (-1); } - else if (var == 0) + else if (var == 0 || invisible_p (var)) return 0; /* We support a couple of expansions for variables that are not arrays. @@ -5266,32 +7259,38 @@ array_length_reference (s) v[*]. Return 0 for everything else. */ array = array_p (var) ? array_cell (var) : (ARRAY *)NULL; + h = assoc_p (var) ? assoc_cell (var) : (HASH_TABLE *)NULL; - if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']') + if (ALL_ELEMENT_SUB (t[0]) && t[1] == RBRACK) { if (assoc_p (var)) - return (assoc_num_elements (assoc_cell (var))); + return (h ? assoc_num_elements (h) : 0); else if (array_p (var)) - return (array_num_elements (array)); + return (array ? array_num_elements (array) : 0); else - return 1; + return (var_isset (var) ? 1 : 0); } if (assoc_p (var)) { t[len - 1] = '\0'; - akey = expand_assignment_string_to_string (t, 0); /* [ */ - t[len - 1] = ']'; + akey = expand_subscript_string (t, 0); /* [ */ + t[len - 1] = RBRACK; if (akey == 0 || *akey == 0) { err_badarraysub (t); + FREE (akey); return (-1); } t = assoc_reference (assoc_cell (var), akey); + free (akey); } else { - ind = array_expand_index (t, len); + ind = array_expand_index (var, t, len, 0); + /* negative subscripts to indexed arrays count back from end */ + if (var && array_p (var) && ind < 0) + ind = array_max_index (array_cell (var)) + 1 + ind; if (ind < 0) { err_badarraysub (t); @@ -5318,7 +7317,7 @@ valid_brace_expansion_word (name, var_is_special) else if (var_is_special) return 1; #if defined (ARRAY_VARS) - else if (valid_array_reference (name)) + else if (valid_array_reference (name, 0)) return 1; #endif /* ARRAY_VARS */ else if (legal_identifier (name)) @@ -5328,9 +7327,9 @@ valid_brace_expansion_word (name, var_is_special) } static int -chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at) +chk_atstar (name, quoted, pflags, quoted_dollar_atp, contains_dollar_at) char *name; - int quoted; + int quoted, pflags; int *quoted_dollar_atp, *contains_dollar_at; { char *temp1; @@ -5355,27 +7354,29 @@ chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at) } else if (name[0] == '*' && name[1] == '\0' && quoted == 0) { - if (contains_dollar_at) + /* Need more checks here that parallel what string_list_pos_params and + param_expand do. Check expand_no_split_dollar_star and ??? */ + if (contains_dollar_at && expand_no_split_dollar_star == 0) *contains_dollar_at = 1; return 1; } /* Now check for ${array[@]} and ${array[*]} */ #if defined (ARRAY_VARS) - else if (valid_array_reference (name)) + else if (valid_array_reference (name, 0)) { - temp1 = mbschr (name, '['); - if (temp1 && temp1[1] == '@' && temp1[2] == ']') + temp1 = mbschr (name, LBRACK); + if (temp1 && temp1[1] == '@' && temp1[2] == RBRACK) { 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 (temp1 && temp1[1] == '*' && temp1[2] == RBRACK && quoted == 0) { if (contains_dollar_at) *contains_dollar_at = 1; @@ -5387,25 +7388,37 @@ chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at) } /* Parameter expand NAME, and return a new string which is the expansion, - or NULL if there was no expansion. + or NULL if there was no expansion. NAME is as given in ${NAMEcWORD}. 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) +parameter_brace_expand_word (name, var_is_special, quoted, pflags, estatep) char *name; int var_is_special, quoted, pflags; + array_eltstate_t *estatep; { WORD_DESC *ret; char *temp, *tt; intmax_t arg_index; SHELL_VAR *var; - int atype, rflags; + int rflags; + array_eltstate_t es; ret = 0; temp = 0; rflags = 0; +#if defined (ARRAY_VARS) + if (estatep) + es = *estatep; /* structure copy */ + else + { + init_eltstate (&es); + es.ind = INTMAX_MIN; + } +#endif + /* Handle multiple digit arguments, as in ${11}. */ if (legal_number (name, &arg_index)) { @@ -5427,18 +7440,75 @@ parameter_brace_expand_word (name, var_is_special, quoted, pflags) ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL, pflags); + + /* Make sure we note that we saw a quoted null string and pass the flag back + to the caller in addition to the value. */ + if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) && STR_DOLLAR_AT_STAR (name) && + ret && ret->word && QUOTED_NULL (ret->word)) + ret->flags |= W_HASQUOTEDNULL; + 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))) + else if (valid_array_reference (name, 0)) + { +expand_arrayref: + var = array_variable_part (name, 0, &tt, (int *)0); + /* These are the cases where word splitting will not be performed */ + if (pflags & PF_ASSIGNRHS) + { + if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == RBRACK) + { + /* Only treat as double quoted if array variable */ + if (var && (array_p (var) || assoc_p (var))) + temp = array_value (name, quoted|Q_DOUBLE_QUOTES, AV_ASSIGNRHS, &es); + else + temp = array_value (name, quoted, 0, &es); + } + else + temp = array_value (name, quoted, 0, &es); + } + /* Posix interp 888 */ + else if (pflags & PF_NOSPLIT2) + { + /* Special cases, then general case, for each of A[@], A[*], A[n] */ +#if defined (HANDLE_MULTIBYTE) + if (tt[0] == '@' && tt[1] == RBRACK && var && quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc[0] != ' ') +#else + if (tt[0] == '@' && tt[1] == RBRACK && var && quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc != ' ') +#endif + temp = array_value (name, Q_DOUBLE_QUOTES, AV_ASSIGNRHS, &es); + else if (tt[0] == '@' && tt[1] == RBRACK) + temp = array_value (name, quoted, 0, &es); + else if (tt[0] == '*' && tt[1] == RBRACK && expand_no_split_dollar_star && ifs_is_null) + temp = array_value (name, Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT, 0, &es); + else if (tt[0] == '*' && tt[1] == RBRACK) + temp = array_value (name, quoted, 0, &es); + else + temp = array_value (name, quoted, 0, &es); + } + else if (tt[0] == '*' && tt[1] == RBRACK && expand_no_split_dollar_star && ifs_is_null) + temp = array_value (name, Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT, 0, &es); + else + temp = array_value (name, quoted, 0, &es); + if (es.subtype == 0 && temp) + { + temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + ? quote_string (temp) + : quote_escapes (temp); + rflags |= W_ARRAYIND; + } + /* Note that array[*] and array[@] expanded to a quoted null string by + returning the W_HASQUOTEDNULL flag to the caller in addition to TEMP. */ + else if (es.subtype == 1 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + rflags |= W_HASQUOTEDNULL; + else if (es.subtype == 2 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) rflags |= W_HASQUOTEDNULL; + + if (estatep) + *estatep = es; /* structure copy */ + else + flush_eltstate (&es); } #endif else if (var = find_variable (name)) @@ -5446,7 +7516,15 @@ parameter_brace_expand_word (name, var_is_special, quoted, pflags) if (var_isset (var) && invisible_p (var) == 0) { #if defined (ARRAY_VARS) - if (assoc_p (var)) + /* We avoid a memory leak by saving TT as the memory allocated by + assoc_to_string or array_to_string and leaving it 0 otherwise, + then freeing TT after quoting temp. */ + tt = (char *)NULL; + if ((pflags & PF_ALLINDS) && assoc_p (var)) + tt = temp = assoc_empty (assoc_cell (var)) ? (char *)NULL : assoc_to_string (assoc_cell (var), " ", quoted); + else if ((pflags & PF_ALLINDS) && array_p (var)) + tt = temp = array_empty (array_cell (var)) ? (char *)NULL : array_to_string (array_cell (var), " ", quoted); + else if (assoc_p (var)) temp = assoc_reference (assoc_cell (var), "0"); else if (array_p (var)) temp = array_reference (array_cell (var), 0); @@ -5459,9 +7537,33 @@ parameter_brace_expand_word (name, var_is_special, quoted, pflags) if (temp) temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) ? quote_string (temp) - : quote_escapes (temp); + : ((pflags & PF_ASSIGNRHS) ? quote_rhs (temp) + : quote_escapes (temp)); + FREE (tt); + } + else + temp = (char *)NULL; + } + else if (var = find_variable_last_nameref (name, 0)) + { + temp = nameref_cell (var); +#if defined (ARRAY_VARS) + /* Handle expanding nameref whose value is x[n] */ + if (temp && *temp && valid_array_reference (temp, 0)) + { + name = temp; + goto expand_arrayref; } else +#endif + /* y=2 ; typeset -n x=y; echo ${x} is not the same as echo ${2} in ksh */ + if (temp && *temp && legal_identifier (temp) == 0) + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: invalid variable name for name reference"), temp); + temp = &expand_param_error; + } + else temp = (char *)NULL; } else @@ -5476,23 +7578,40 @@ parameter_brace_expand_word (name, var_is_special, quoted, pflags) 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) +static char * +parameter_brace_find_indir (name, var_is_special, quoted, find_nameref) char *name; - int var_is_special, quoted; - int *quoted_dollar_atp, *contains_dollar_at; + int var_is_special, quoted, find_nameref; { char *temp, *t; WORD_DESC *w; + SHELL_VAR *v; + int pflags, oldex; + + if (find_nameref && var_is_special == 0 && (v = find_variable_last_nameref (name, 0)) && + nameref_p (v) && (t = nameref_cell (v)) && *t) + return (savestring (t)); + + /* If var_is_special == 0, and name is not an array reference, this does + more expansion than necessary. It should really look up the variable's + value and not try to expand it. */ + pflags = PF_IGNUNBOUND; + /* Note that we're not going to be doing word splitting here */ + if (var_is_special) + { + pflags |= PF_ASSIGNRHS; /* suppresses word splitting */ + oldex = expand_no_split_dollar_star; + expand_no_split_dollar_star = 1; + } + w = parameter_brace_expand_word (name, var_is_special, quoted, pflags, 0); + if (var_is_special) + expand_no_split_dollar_star = oldex; - 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)) + temp = ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || var_is_special) ? dequote_string (t) : dequote_escapes (t); free (t); @@ -5500,11 +7619,86 @@ parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, c } dispose_word_desc (w); - chk_atstar (t, quoted, quoted_dollar_atp, contains_dollar_at); + return t; +} + +/* 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, pflags, quoted_dollar_atp, contains_dollar_at) + char *name; + int var_is_special, quoted, pflags; + int *quoted_dollar_atp, *contains_dollar_at; +{ + char *t; + WORD_DESC *w; + SHELL_VAR *v; + + /* See if it's a nameref first, behave in ksh93-compatible fashion. + There is at least one incompatibility: given ${!foo[0]} where foo=bar, + bash performs an indirect lookup on foo[0] and expands the result; + ksh93 expands bar[0]. We could do that here -- there are enough usable + primitives to do that -- but do not at this point. */ + if (var_is_special == 0 && (v = find_variable_last_nameref (name, 0))) + { + if (nameref_p (v) && (t = nameref_cell (v)) && *t) + { + w = alloc_word_desc (); + w->word = savestring (t); + w->flags = 0; + return w; + } + } + + /* An indirect reference to a positional parameter or a special parameter + is ok. Indirect references to array references, as explained above, are + ok (currently). Only references to unset variables are errors at this + point. */ + if (legal_identifier (name) && v == 0) + { + report_error (_("%s: invalid indirect expansion"), name); + w = alloc_word_desc (); + w->word = &expand_param_error; + w->flags = 0; + return (w); + } + + t = parameter_brace_find_indir (name, var_is_special, quoted, 0); + + chk_atstar (t, quoted, pflags, quoted_dollar_atp, contains_dollar_at); + +#if defined (ARRAY_VARS) + /* Array references to unset variables are also an error */ + if (t == 0 && valid_array_reference (name, 0)) + { + v = array_variable_part (name, 0, (char **)0, (int *)0); + if (v == 0) + { + report_error (_("%s: invalid indirect expansion"), name); + w = alloc_word_desc (); + w->word = &expand_param_error; + w->flags = 0; + return (w); + } + else + return (WORD_DESC *)NULL; + } +#endif + if (t == 0) return (WORD_DESC *)NULL; - w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0); + if (valid_brace_expansion_word (t, SPECIAL_VAR (t, 0)) == 0) + { + report_error (_("%s: invalid variable name"), t); + free (t); + w = alloc_word_desc (); + w->word = &expand_param_error; + w->flags = 0; + return (w); + } + + w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, pflags, 0); free (t); return w; @@ -5515,82 +7709,228 @@ parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, c "-", "+", 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) +parameter_brace_expand_rhs (name, value, op, quoted, pflags, qdollaratp, hasdollarat) char *name, *value; - int c, quoted, *qdollaratp, *hasdollarat; + int op, quoted, pflags, *qdollaratp, *hasdollarat; { WORD_DESC *w; - WORD_LIST *l; - char *t, *t1, *temp; - int hasdol; + WORD_LIST *l, *tl; + char *t, *t1, *temp, *vname, *newval; + int l_hasdollat, sindex, arrayref; + SHELL_VAR *v; + array_eltstate_t es; +/*itrace("parameter_brace_expand_rhs: %s:%s pflags = %d", name, value, pflags);*/ /* 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); + sindex = 0; + temp = string_extract_double_quoted (value, &sindex, SX_STRIPDQ); } 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) + l_hasdollat = 0; + l = *temp ? expand_string_for_rhs (temp, quoted, op, pflags, &l_hasdollat, (int *)NULL) : (WORD_LIST *)0; if (hasdollarat) - *hasdollarat = hasdol || (l && l->next); + *hasdollarat = l_hasdollat || (l && l->next); if (temp != value) free (temp); + + /* list_string takes multiple CTLNULs and turns them into an empty word + with W_SAWQUOTEDNULL set. Turn it back into a single CTLNUL for the + rest of this function and the caller. */ + for (tl = l; tl; tl = tl->next) + { + if (tl->word && (tl->word->word == 0 || tl->word->word[0] == 0) && + (tl->word->flags | W_SAWQUOTEDNULL)) + { + t = make_quoted_char ('\0'); + FREE (tl->word->word); + tl->word->word = t; + tl->word->flags |= W_QUOTED|W_HASQUOTEDNULL; + tl->word->flags &= ~W_SAWQUOTEDNULL; + } + } + if (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 && ((l_hasdollat && quoted) || l->next)) + { +/*itrace("parameter_brace_expand_rhs: %s:%s: l != NULL, set *qdollaratp", name, value);*/ + *qdollaratp = 1; + } + /* 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 + slightly differently if L_HASDOLLAT 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); + do the right thing. If IFS is null, we want "$@" to split into + separate arguments, not be concatenated, so we use string_list_internal + and mark the word to be split on spaces later. We use + string_list_dollar_star for "$@" otherwise. */ + if (l->next && ifs_is_null) + { + temp = string_list_internal (l, " "); + w->flags |= W_SPLITSPACE; + } + else if (l_hasdollat || l->next) + temp = string_list_dollar_star (l, quoted, 0); + else + { + temp = string_list (l); + if (temp && (QUOTED_NULL (temp) == 0) && (l->word->flags & W_SAWQUOTEDNULL)) + w->flags |= W_SAWQUOTEDNULL; /* XXX */ + } - /* 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; + /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is + a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the + flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the + expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + (which is more paranoia than anything else), we need to return the + quoted null string and set the flags to indicate it. */ + if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL (temp) && QUOTED_NULL (l->word->word) && (l->word->flags & W_HASQUOTEDNULL)) + { + w->flags |= W_HASQUOTEDNULL; +/*itrace("parameter_brace_expand_rhs (%s:%s): returning quoted null, turning off qdollaratp", name, value);*/ + /* If we return a quoted null with L_HASDOLLARAT, we either have a + construct like "${@-$@}" or "${@-${@-$@}}" with no positional + parameters or a quoted expansion of "$@" with $1 == ''. In either + case, we don't want to enable special handling of $@. */ + if (qdollaratp && l_hasdollat) + *qdollaratp = 0; + } dispose_words (l); } - else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && hasdol) + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && l_hasdollat) { + /* Posix interp 221 changed the rules on this. The idea is that + something like "$xxx$@" should expand the same as "${foo-$xxx$@}" + when foo and xxx are unset. The problem is that it's not in any + way backwards compatible and few other shells do it. We're eventually + going to try and split the difference (heh) a little bit here. */ + /* l_hasdollat == 1 means we saw a quoted dollar at. */ + /* 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. */ + a quoted empty string. Posix interp 888 */ temp = make_quoted_char ('\0'); w->flags |= W_HASQUOTEDNULL; +/*itrace("parameter_brace_expand_rhs (%s:%s): returning quoted null", name, value);*/ } else temp = (char *)NULL; - if (c == '-' || c == '+') + if (op == '-' || op == '+') { 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); + /* op == '=' */ + t1 = temp ? dequote_string (temp) : savestring (""); + free (temp); + + /* bash-4.4/5.0 */ + vname = name; + if (*name == '!' && + (legal_variable_starter ((unsigned char)name[1]) || DIGIT (name[1]) || VALID_INDIR_PARAM (name[1]))) + { + vname = parameter_brace_find_indir (name + 1, SPECIAL_VAR (name, 1), quoted, 1); + if (vname == 0 || *vname == 0) + { + report_error (_("%s: invalid indirect expansion"), name); + free (vname); + free (t1); + dispose_word (w); + return &expand_wdesc_error; + } + if (legal_identifier (vname) == 0) + { + report_error (_("%s: invalid variable name"), vname); + free (vname); + free (t1); + dispose_word (w); + return &expand_wdesc_error; + } + } + + arrayref = 0; +#if defined (ARRAY_VARS) + if (valid_array_reference (vname, 0)) + { + init_eltstate (&es); + v = assign_array_element (vname, t1, ASS_ALLOWALLSUB, &es); + arrayref = 1; + newval = es.value; + } + else +#endif /* ARRAY_VARS */ + v = bind_variable (vname, t1, 0); + + if (v == 0 || readonly_p (v) || noassign_p (v)) /* expansion error */ + { + if ((v == 0 || readonly_p (v)) && interactive_shell == 0 && posixly_correct) + { + last_command_exit_value = EXECUTION_FAILURE; + exp_jump_to_top_level (FORCE_EOF); + } + else + { + if (vname != name) + free (vname); + last_command_exit_value = EX_BADUSAGE; + exp_jump_to_top_level (DISCARD); + } + } + + stupidly_hack_special_variables (vname); + + /* "In all cases, the final value of parameter shall be substituted." */ + if (shell_compatibility_level > 51) + { + FREE (t1); +#if defined (ARRAY_VARS) + if (arrayref) + { + t1 = newval; + flush_eltstate (&es); + } + else + t1 = get_variable_value (v); +#else + t1 = value_cell (v); +#endif + } + + if (vname != name) + free (vname); + + /* From Posix group discussion Feb-March 2010. Issue 7 0000221 */ + + /* If we are double-quoted or if we are not going to be performing word + splitting, we want to quote the value we return appropriately, like + the other expansions this function handles. */ + w->word = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) ? quote_string (t1) : quote_escapes (t1); + /* If we have something that's non-null, but not a quoted null string, + and we're not going to be performing word splitting (we know we're not + because the operator is `='), we can forget we saw a quoted null. */ + if (w->word && w->word[0] && QUOTED_NULL (w->word) == 0) + w->flags &= ~W_SAWQUOTEDNULL; + + /* If we convert a null string into a quoted null, make sure the caller + knows it. */ + if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) && QUOTED_NULL (w->word)) + w->flags |= W_HASQUOTEDNULL; - w->word = temp; return w; } @@ -5599,12 +7939,14 @@ parameter_brace_expand_rhs (name, value, c, quoted, qdollaratp, hasdollarat) used as the error message to print, otherwise a standard message is printed. */ static void -parameter_brace_expand_error (name, value) +parameter_brace_expand_error (name, value, check_null) char *name, *value; + int check_null; { WORD_LIST *l; char *temp; + set_exit_status (EXECUTION_FAILURE); /* ensure it's non-zero */ if (value && *value) { l = expand_string (value, 0); @@ -5613,6 +7955,8 @@ parameter_brace_expand_error (name, value) FREE (temp); dispose_words (l); } + else if (check_null == 0) + report_error (_("%s: parameter not set"), name); else report_error (_("%s: parameter null or not set"), name); @@ -5632,39 +7976,11 @@ valid_length_expression (name) ((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]} */ + valid_array_reference (name + 1, 0) || /* ${#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 @@ -5674,13 +7990,13 @@ parameter_brace_expand_length (name) char *t, *newname; intmax_t number, arg_index; WORD_LIST *list; -#if defined (ARRAY_VARS) SHELL_VAR *var; -#endif + + var = (SHELL_VAR *)NULL; if (name[1] == '\0') /* ${#} */ number = number_of_args (); - else if ((name[1] == '@' || name[1] == '*') && name[2] == '\0') /* ${#@}, ${#*} */ + else if (DOLLAR_AT_STAR (name[1]) && name[2] == '\0') /* ${#@}, ${#*} */ number = number_of_args (); else if ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0') { @@ -5698,7 +8014,7 @@ parameter_brace_expand_length (name) break; case '!': if (last_asynchronous_pid == NO_PID) - t = (char *)NULL; + t = (char *)NULL; /* XXX - error if set -u set? */ else t = itos (last_asynchronous_pid); break; @@ -5710,7 +8026,7 @@ parameter_brace_expand_length (name) FREE (t); } #if defined (ARRAY_VARS) - else if (valid_array_reference (name + 1)) + else if (valid_array_reference (name + 1, 0)) number = array_length_reference (name + 1); #endif /* ARRAY_VARS */ else @@ -5720,6 +8036,8 @@ parameter_brace_expand_length (name) if (legal_number (name + 1, &arg_index)) /* ${#1} */ { t = get_dollar_var_value (arg_index); + if (t == 0 && unbound_vars_is_error) + return INTMAX_MIN; number = MB_STRLEN (t); FREE (t); } @@ -5730,9 +8048,20 @@ parameter_brace_expand_length (name) t = assoc_reference (assoc_cell (var), "0"); else t = array_reference (array_cell (var), 0); + if (t == 0 && unbound_vars_is_error) + return INTMAX_MIN; number = MB_STRLEN (t); } #endif + /* Fast path for the common case of taking the length of a non-dynamic + scalar variable value. */ + else if ((var || (var = find_variable (name + 1))) && + invisible_p (var) == 0 && + array_p (var) == 0 && assoc_p (var) == 0 && + var->dynamic_value == 0) + number = value_cell (var) ? MB_STRLEN (value_cell (var)) : 0; + else if (var == 0 && unbound_vars_is_error == 0) + number = 0; else /* ${#PS1} */ { newname = savestring (name); @@ -5743,7 +8072,7 @@ parameter_brace_expand_length (name) if (list) dispose_words (list); - number = MB_STRLEN (t); + number = t ? MB_STRLEN (t) : 0; FREE (t); } } @@ -5756,6 +8085,7 @@ parameter_brace_expand_length (name) 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 `?'. + The SD_ARITHEXP flag to skip_to_delim takes care of doing this. */ static char * @@ -5763,51 +8093,13 @@ 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; - } + int i; + char delims[2]; - /* 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); - } + delims[0] = delim; + delims[1] = '\0'; + i = skip_to_delim (substr, 0, delims, SD_ARITHEXP); return (substr + i); } @@ -5826,7 +8118,7 @@ verify_substring_values (v, value, substr, vtype, e1p, e2p) { char *t, *temp1, *temp2; arrayind_t len; - int expok; + int expok, eflag; #if defined (ARRAY_VARS) ARRAY *a; HASH_TABLE *h; @@ -5839,8 +8131,10 @@ verify_substring_values (v, value, substr, vtype, e1p, e2p) else t = (char *)0; - temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES); - *e1p = evalexp (temp1, &expok); + temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES|Q_ARITH); + eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED; + + *e1p = evalexp (temp1, eflag, &expok); free (temp1); if (expok == 0) return (0); @@ -5895,14 +8189,21 @@ verify_substring_values (v, value, substr, vtype, e1p, e2p) { t++; temp2 = savestring (t); - temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES); + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES|Q_ARITH); free (temp2); t[-1] = ':'; - *e2p = evalexp (temp1, &expok); + *e2p = evalexp (temp1, eflag, &expok); free (temp1); if (expok == 0) return (0); - if (*e2p < 0) + + /* Should we allow positional parameter length < 0 to count backwards + from end of positional parameters? */ +#if 1 + if ((vtype == VT_ARRAYVAR || vtype == VT_POSPARMS) && *e2p < 0) +#else /* XXX - postponed; this isn't really a valuable feature */ + if (vtype == VT_ARRAYVAR && *e2p < 0) +#endif { internal_error (_("%s: substring expression < 0"), t); return (0); @@ -5914,100 +8215,532 @@ verify_substring_values (v, value, substr, vtype, e1p, e2p) if (vtype != VT_ARRAYVAR) #endif { - *e2p += *e1p; /* want E2 chars starting at E1 */ + if (*e2p < 0) + { + *e2p += len; + if (*e2p < 0 || *e2p < *e1p) + { + internal_error (_("%s: substring expression < 0"), t); + return (0); + } + } + else + *e2p += *e1p; /* want E2 chars starting at E1 */ if (*e2p > len) *e2p = len; } } - else - *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). + QUOTED is the standard description of quoting state, using Q_* defines. + FLAGS is currently a set of flags to pass to array_value. If IND is + not INTMAX_MIN, and FLAGS includes AV_USEIND, IND is + passed to array_value so the array index is not computed again. + 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, estatep, quoted, flags, varp, valp) + char *varname, *value; + array_eltstate_t *estatep; + int quoted, flags; + SHELL_VAR **varp; + char **valp; +{ + int vtype, want_indir; + char *temp, *vname; + SHELL_VAR *v; + + want_indir = *varname == '!' && + (legal_variable_starter ((unsigned char)varname[1]) || DIGIT (varname[1]) + || VALID_INDIR_PARAM (varname[1])); + if (want_indir) + vname = parameter_brace_find_indir (varname+1, SPECIAL_VAR (varname, 1), quoted, 1); + /* XXX - what if vname == 0 || *vname == 0 ? */ + else + vname = varname; + + if (vname == 0) + { + vtype = VT_VARIABLE; + *varp = (SHELL_VAR *)NULL; + *valp = (char *)NULL; + return (vtype); + } + + /* This sets vtype to VT_VARIABLE or VT_POSPARMS */ + vtype = STR_DOLLAR_AT_STAR (vname); + if (vtype == VT_POSPARMS && vname[0] == '*') + vtype |= VT_STARSUB; + *varp = (SHELL_VAR *)NULL; + +#if defined (ARRAY_VARS) + if (valid_array_reference (vname, 0)) + { + v = array_variable_part (vname, 0, &temp, (int *)0); + /* If we want to signal array_value to use an already-computed index, + the caller will set ESTATEP->IND to that index and pass AV_USEIND in + FLAGS. */ + if (estatep && (flags & AV_USEIND) == 0) + estatep->ind = INTMAX_MIN; + + if (v && invisible_p (v)) + { + vtype = VT_ARRAYMEMBER; + *varp = (SHELL_VAR *)NULL; + *valp = (char *)NULL; + } + if (v && (array_p (v) || assoc_p (v))) + { + if (ALL_ELEMENT_SUB (temp[0]) && temp[1] == RBRACK) + { + /* Callers have to differentiate between 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 (vname, Q_DOUBLE_QUOTES, flags, estatep); + } + *varp = v; + } + else if (v && (ALL_ELEMENT_SUB (temp[0]) && temp[1] == RBRACK)) + { + vtype = VT_VARIABLE; + *varp = v; + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + *valp = value ? dequote_string (value) : (char *)NULL; + else + *valp = value ? dequote_escapes (value) : (char *)NULL; + } + else + { + vtype = VT_ARRAYMEMBER; + *varp = v; + *valp = array_value (vname, Q_DOUBLE_QUOTES, flags, estatep); + } + } + else if ((v = find_variable (vname)) && (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) + { + *varp = find_variable (vname); + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + *valp = dequote_string (value); + else + *valp = dequote_escapes (value); + } + else + *valp = value; + } + + if (want_indir) + free (vname); + + return vtype; +} + +/***********************************************************/ +/* */ +/* Functions to perform transformations on variable values */ +/* */ +/***********************************************************/ + +static char * +string_var_assignment (v, s) + SHELL_VAR *v; + char *s; +{ + char flags[MAX_ATTRIBUTES], *ret, *val; + int i; + + val = (v && (invisible_p (v) || var_isset (v) == 0)) ? (char *)NULL : sh_quote_reusable (s, 0); + i = var_attribute_string (v, 0, flags); + if (i == 0 && val == 0) + return (char *)NULL; + + ret = (char *)xmalloc (i + STRLEN (val) + strlen (v->name) + 16 + MAX_ATTRIBUTES); + if (i > 0 && val == 0) + sprintf (ret, "declare -%s %s", flags, v->name); + else if (i > 0) + sprintf (ret, "declare -%s %s=%s", flags, v->name, val); + else + sprintf (ret, "%s=%s", v->name, val); + free (val); + return ret; +} + +#if defined (ARRAY_VARS) +static char * +array_var_assignment (v, itype, quoted, atype) + SHELL_VAR *v; + int itype, quoted, atype; +{ + char *ret, *val, flags[MAX_ATTRIBUTES]; + int i; + + if (v == 0) + return (char *)NULL; + if (atype == 2) + val = array_p (v) ? array_to_kvpair (array_cell (v), 0) + : assoc_to_kvpair (assoc_cell (v), 0); + else + val = array_p (v) ? array_to_assign (array_cell (v), 0) + : assoc_to_assign (assoc_cell (v), 0); + + if (val == 0 && (invisible_p (v) || var_isset (v) == 0)) + ; /* placeholder */ + else if (val == 0) + { + val = (char *)xmalloc (3); + val[0] = LPAREN; + val[1] = RPAREN; + val[2] = 0; + } + else + { + ret = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) ? quote_string (val) : quote_escapes (val); + free (val); + val = ret; + } + + if (atype == 2) + return val; + + i = var_attribute_string (v, 0, flags); + ret = (char *)xmalloc (i + STRLEN (val) + strlen (v->name) + 16); + if (val) + sprintf (ret, "declare -%s %s=%s", flags, v->name, val); + else + sprintf (ret, "declare -%s %s", flags, v->name); + free (val); + return ret; +} +#endif + +static char * +pos_params_assignment (list, itype, quoted) + WORD_LIST *list; + int itype; + int quoted; +{ + char *temp, *ret; + + /* first, we transform the list to quote each word. */ + temp = list_transform ('Q', (SHELL_VAR *)0, list, itype, quoted); + ret = (char *)xmalloc (strlen (temp) + 8); + strcpy (ret, "set -- "); + strcpy (ret + 7, temp); + free (temp); + return ret; +} + +static char * +string_transform (xc, v, s) + int xc; + SHELL_VAR *v; + char *s; +{ + char *ret, flags[MAX_ATTRIBUTES], *t; + int i; + + if (((xc == 'A' || xc == 'a') && v == 0)) + return (char *)NULL; + else if (xc != 'a' && xc != 'A' && s == 0) + return (char *)NULL; + + switch (xc) + { + /* Transformations that interrogate the variable */ + case 'a': + i = var_attribute_string (v, 0, flags); + ret = (i > 0) ? savestring (flags) : (char *)NULL; + break; + case 'A': + ret = string_var_assignment (v, s); + break; + case 'K': + case 'k': + ret = sh_quote_reusable (s, 0); + break; + /* Transformations that modify the variable's value */ + case 'E': + t = ansiexpand (s, 0, strlen (s), (int *)0); + ret = dequote_escapes (t); + free (t); + break; + case 'P': + ret = decode_prompt_string (s); + break; + case 'Q': + ret = sh_quote_reusable (s, 0); + break; + case 'U': + ret = sh_modcase (s, 0, CASE_UPPER); + break; + case 'u': + ret = sh_modcase (s, 0, CASE_UPFIRST); /* capitalize */ + break; + case 'L': + ret = sh_modcase (s, 0, CASE_LOWER); + break; + default: + ret = (char *)NULL; + break; + } + return ret; +} + +static char * +list_transform (xc, v, list, itype, quoted) + int xc; + SHELL_VAR *v; + WORD_LIST *list; + int itype, quoted; +{ + WORD_LIST *new, *l; + WORD_DESC *w; + char *tword; + int qflags; + + for (new = (WORD_LIST *)NULL, l = list; l; l = l->next) + { + tword = string_transform (xc, v, l->word->word); + w = alloc_word_desc (); + w->word = tword ? tword : savestring (""); /* XXX */ + new = make_word_list (w, new); + } + l = REVERSE_LIST (new, WORD_LIST *); + + qflags = quoted; + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how $* will be expanded. */ + if (itype == '*' && expand_no_split_dollar_star && ifs_is_null) + qflags |= Q_DOUBLE_QUOTES; /* Posix interp 888 */ + + tword = string_list_pos_params (itype, l, qflags, 0); + dispose_words (l); + + return (tword); +} + +static char * +parameter_list_transform (xc, itype, quoted) + int xc; + int itype; + int quoted; +{ + char *ret; + WORD_LIST *list; + + list = list_rest_of_args (); + if (list == 0) + return ((char *)NULL); + if (xc == 'A') + ret = pos_params_assignment (list, itype, quoted); + else + ret = list_transform (xc, (SHELL_VAR *)0, list, itype, quoted); + dispose_words (list); + return (ret); +} + +#if defined (ARRAY_VARS) +static char * +array_transform (xc, var, starsub, quoted) + int xc; + SHELL_VAR *var; + int starsub; /* so we can figure out how it's indexed */ + int quoted; +{ + ARRAY *a; + HASH_TABLE *h; + int itype, qflags; + char *ret; + WORD_LIST *list; + SHELL_VAR *v; + + v = var; /* XXX - for now */ + + itype = starsub ? '*' : '@'; + + if (xc == 'A') + return (array_var_assignment (v, itype, quoted, 1)); + else if (xc == 'K') + return (array_var_assignment (v, itype, quoted, 2)); + + /* special case for unset arrays and attributes */ + if (xc == 'a' && (invisible_p (v) || var_isset (v) == 0)) + { + char flags[MAX_ATTRIBUTES]; + int i; + + i = var_attribute_string (v, 0, flags); + return ((i > 0) ? savestring (flags) : (char *)NULL); + } - return (1); + a = (v && array_p (v)) ? array_cell (v) : 0; + h = (v && assoc_p (v)) ? assoc_cell (v) : 0; + + /* XXX - for now */ + if (xc == 'k') + { + if (v == 0) + return ((char *)NULL); + list = array_p (v) ? array_to_kvpair_list (a) : assoc_to_kvpair_list (h); + qflags = quoted; + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how $* will be expanded. */ + if (itype == '*' && expand_no_split_dollar_star && ifs_is_null) + qflags |= Q_DOUBLE_QUOTES; /* Posix interp 888 */ + + ret = string_list_pos_params (itype, list, qflags, 0); + dispose_words (list); + return ret; + } + + list = a ? array_to_word_list (a) : (h ? assoc_to_word_list (h) : 0); + if (list == 0) + return ((char *)NULL); + ret = list_transform (xc, v, list, itype, quoted); + dispose_words (list); + + return ret; } +#endif /* ARRAY_VARS */ -/* 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) +valid_parameter_transform (xform) + char *xform; +{ + if (xform[1]) + return 0; + + /* check for valid values of xform[0] */ + switch (xform[0]) + { + case 'a': /* expand to a string with just attributes */ + case 'A': /* expand as an assignment statement with attributes */ + case 'K': /* expand assoc array to list of key/value pairs */ + case 'k': /* XXX - for now */ + case 'E': /* expand like $'...' */ + case 'P': /* expand like prompt string */ + case 'Q': /* quote reusably */ + case 'U': /* transform to uppercase */ + case 'u': /* transform by capitalizing */ + case 'L': /* transform to lowercase */ + return 1; + default: + return 0; + } +} + +static char * +parameter_brace_transform (varname, value, estatep, xform, rtype, quoted, pflags, flags) char *varname, *value; - int quoted; - SHELL_VAR **varp; - char **valp; + array_eltstate_t *estatep; + char *xform; + int rtype, quoted, pflags, flags; { - int vtype; - char *temp; -#if defined (ARRAY_VARS) + int vtype, xc, starsub; + char *temp1, *val, *oname; 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; + xc = xform[0]; + if (value == 0 && xc != 'A' && xc != 'a') + return ((char *)NULL); -#if defined (ARRAY_VARS) - if (valid_array_reference (varname)) + oname = this_command_name; + this_command_name = varname; + + vtype = get_var_and_type (varname, value, estatep, quoted, flags, &v, &val); + if (vtype == -1) { - 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; + this_command_name = oname; + return ((char *)NULL); + } + + if (xform[0] == 0 || valid_parameter_transform (xform) == 0) + { + this_command_name = oname; + if (vtype == VT_VARIABLE) + FREE (val); + return (interactive_shell ? &expand_param_error : &expand_param_fatal); + } + + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + + /* If we are asked to display the attributes of an unset variable, V will + be NULL after the call to get_var_and_type. Double-check here. */ + if ((xc == 'a' || xc == 'A') && vtype == VT_VARIABLE && varname && v == 0) + v = find_variable (varname); + + temp1 = (char *)NULL; /* shut up gcc */ + switch (vtype) + { + case VT_VARIABLE: + case VT_ARRAYMEMBER: + temp1 = string_transform (xc, v, val); + 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; } - else if (v && (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']')) + break; +#if defined (ARRAY_VARS) + case VT_ARRAYVAR: + temp1 = array_transform (xc, v, starsub, quoted); + if (temp1 && quoted == 0 && ifs_is_null) { - vtype = VT_VARIABLE; - *varp = v; - if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) - *valp = dequote_string (value); - else - *valp = dequote_escapes (value); + /* Posix interp 888 */ } - else + else if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) { - vtype = VT_ARRAYMEMBER; - *varp = v; - *valp = array_value (varname, 1, (int *)NULL); + val = quote_escapes (temp1); + free (temp1); + temp1 = val; } - } - 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 + break; #endif - { - if (value && vtype == VT_VARIABLE) + case VT_POSPARMS: + temp1 = parameter_list_transform (xc, varname[0], quoted); + if (temp1 && quoted == 0 && ifs_is_null) { - if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) - *valp = dequote_string (value); - else - *valp = dequote_escapes (value); + /* Posix interp 888 */ } - else - *valp = value; + else if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0)) + { + val = quote_escapes (temp1); + free (temp1); + temp1 = val; + } + break; } - return vtype; + this_command_name = oname; + return temp1; } /******************************************************/ @@ -6027,7 +8760,8 @@ mb_substring (string, s, e) int s, e; { char *tt; - int start, stop, i, slen; + int start, stop, i; + size_t slen; DECLARE_MBSTATE; start = 0; @@ -6051,22 +8785,24 @@ mb_substring (string, s, e) 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; +parameter_brace_substring (varname, value, estatep, substr, quoted, pflags, flags) + char *varname, *value; + array_eltstate_t *estatep; + char *substr; + int quoted, pflags, flags; { intmax_t e1, e2; int vtype, r, starsub; char *temp, *val, *tt, *oname; SHELL_VAR *v; - if (value == 0) + if (value == 0 && ((varname[0] != '@' && varname[0] != '*') || varname[1])) return ((char *)NULL); oname = this_command_name; this_command_name = varname; - vtype = get_var_and_type (varname, value, quoted, &v, &val); + vtype = get_var_and_type (varname, value, estatep, quoted, flags, &v, &val); if (vtype == -1) { this_command_name = oname; @@ -6079,7 +8815,11 @@ parameter_brace_substring (varname, value, substr, quoted) 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); + { + if (vtype == VT_VARIABLE) + FREE (val); + return ((r == 0) ? &expand_param_error : (char *)NULL); + } switch (vtype) { @@ -6101,8 +8841,34 @@ parameter_brace_substring (varname, value, substr, quoted) FREE (tt); break; case VT_POSPARMS: - tt = pos_params (varname, e1, e2, quoted); - if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0) + case VT_ARRAYVAR: + if (vtype == VT_POSPARMS) + tt = pos_params (varname, e1, e2, quoted, pflags); +#if defined (ARRAY_VARS) + /* assoc_subrange and array_subrange both call string_list_pos_params, + so we can treat this case just like VT_POSPARAMS. */ + else if (assoc_p (v)) + /* we convert to list and take first e2 elements starting at e1th + element -- officially undefined for now */ + tt = assoc_subrange (assoc_cell (v), e1, e2, starsub, quoted, pflags); + 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). */ + tt = array_subrange (array_cell (v), e1, e2, starsub, quoted, pflags); +#endif + /* We want to leave this alone in every case where pos_params/ + string_list_pos_params quotes the list members */ + if (tt && quoted == 0 && ifs_is_null) + { + temp = tt; /* Posix interp 888 */ + } + else if (tt && quoted == 0 && (pflags & PF_ASSIGNRHS)) + { + temp = tt; /* Posix interp 888 */ + } + else if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0) { temp = tt ? quote_escapes (tt) : (char *)NULL; FREE (tt); @@ -6110,21 +8876,7 @@ parameter_brace_substring (varname, value, substr, quoted) 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; } @@ -6138,51 +8890,121 @@ parameter_brace_substring (varname, value, substr, quoted) /* */ /****************************************************************/ +static int +shouldexp_replacement (s) + char *s; +{ + size_t slen; + int sindex, c; + DECLARE_MBSTATE; + + sindex = 0; + slen = STRLEN (s); + while (c = s[sindex]) + { + if (c == '\\') + { + sindex++; + if (s[sindex] == 0) + return 0; + /* We want to remove this backslash because we treat it as special + in this context. THIS ASSUMES THE STRING IS PROCESSED BY + strcreplace() OR EQUIVALENT that handles removing backslashes + preceding the special character. */ + if (s[sindex] == '&') + return 1; + if (s[sindex] == '\\') + return 1; + } + else if (c == '&') + return 1; + ADVANCE_CHAR (s, slen, sindex); + } + return 0; +} + char * pat_subst (string, pat, rep, mflags) char *string, *pat, *rep; int mflags; { - char *ret, *s, *e, *str; - int rsize, rptr, l, replen, mtype; + char *ret, *s, *e, *str, *rstr, *mstr, *send; + int rptr, mtype, rxpand, mlen; + size_t rsize, l, replen, rslen; + DECLARE_MBSTATE; + + if (string == 0) + return (savestring ("")); mtype = mflags & MATCH_TYPEMASK; + rxpand = mflags & MATCH_EXPREP; /* 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. + * 3. A null STRING with a matching pattern means to append REP to + * STRING and return the result. + * + * These process `&' in the replacement string, like `sed' does when + * presented with a BRE of `^' or `$'. */ 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) + rstr = (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : rep; + rslen = STRLEN (rstr); + l = STRLEN (string); + ret = (char *)xmalloc (rslen + l + 2); + if (rslen == 0) strcpy (ret, string); else if (mtype == MATCH_BEG) { - strcpy (ret, rep); - strcpy (ret + replen, string); + strcpy (ret, rstr); + strcpy (ret + rslen, string); } else { strcpy (ret, string); - strcpy (ret + l, rep); + strcpy (ret + l, rstr); } + if (rstr != rep) + free (rstr); return (ret); } + else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0)) + return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) + : (rep ? savestring (rep) : savestring ("")); ret = (char *)xmalloc (rsize = 64); ret[0] = '\0'; + send = string + strlen (string); - for (replen = STRLEN (rep), rptr = 0, str = string;;) + for (replen = STRLEN (rep), rptr = 0, str = string; *str;) { if (match_pattern (str, pat, mtype, &s, &e) == 0) break; l = s - str; - RESIZE_MALLOCED_BUFFER (ret, rptr, (l + replen), rsize, 64); + + if (rep && rxpand) + { + int x; + mlen = e - s; + mstr = xmalloc (mlen + 1); + for (x = 0; x < mlen; x++) + mstr[x] = s[x]; + mstr[mlen] = '\0'; + rstr = strcreplace (rep, '&', mstr, 2); + free (mstr); + rslen = strlen (rstr); + } + else + { + rstr = rep; + rslen = replen; + } + + RESIZE_MALLOCED_BUFFER (ret, rptr, (l + rslen), 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 @@ -6195,11 +9017,14 @@ pat_subst (string, pat, rep, mflags) } if (replen) { - strncpy (ret + rptr, rep, replen); - rptr += replen; + strncpy (ret + rptr, rstr, rslen); + rptr += rslen; } str = e; /* e == end of match */ + if (rstr != rep) + free (rstr); + if (((mflags & MATCH_GLOBREP) == 0) || mtype != MATCH_ANY) break; @@ -6207,16 +9032,28 @@ pat_subst (string, pat, rep, mflags) { /* 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); + char *p, *origp, *origs; + size_t clen; + + RESIZE_MALLOCED_BUFFER (ret, rptr, locale_mb_cur_max, rsize, 64); +#if defined (HANDLE_MULTIBYTE) + p = origp = ret + rptr; + origs = str; + COPY_CHAR_P (p, str, send); + rptr += p - origp; + e += str - origs; +#else ret[rptr++] = *str++; e++; /* avoid infinite recursion on zero-length match */ +#endif } } /* Now copy the unmatched portion of the input string */ - if (*str) + if (str && *str) { - RESIZE_MALLOCED_BUFFER (ret, rptr, STRLEN(str) + 1, rsize, 64); + l = send - str + 1; + RESIZE_MALLOCED_BUFFER (ret, rptr, l, rsize, 64); strcpy (ret + rptr, str); } else @@ -6234,7 +9071,7 @@ pos_params_pat_subst (string, pat, rep, mflags) WORD_LIST *save, *params; WORD_DESC *w; char *ret; - int pchar, qflags; + int pchar, qflags, pflags; save = params = list_rest_of_args (); if (save == 0) @@ -6251,20 +9088,14 @@ pos_params_pat_subst (string, pat, rep, mflags) pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 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 + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how $* will be expanded. */ + if (pchar == '*' && (mflags & MATCH_ASSIGNRHS) && expand_no_split_dollar_star && ifs_is_null) + qflags |= Q_DOUBLE_QUOTES; /* Posix interp 888 */ + ret = string_list_pos_params (pchar, save, qflags, pflags); dispose_words (save); return (ret); @@ -6275,28 +9106,35 @@ pos_params_pat_subst (string, pat, rep, mflags) 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; +parameter_brace_patsub (varname, value, estatep, patsub, quoted, pflags, flags) + char *varname, *value; + array_eltstate_t *estatep; + char *patsub; + int quoted, pflags, flags; { int vtype, mflags, starsub, delim; - char *val, *temp, *pat, *rep, *p, *lpatsub, *tt; + char *val, *temp, *pat, *rep, *p, *lpatsub, *tt, *oname; SHELL_VAR *v; if (value == 0) return ((char *)NULL); - this_command_name = varname; + oname = this_command_name; + this_command_name = varname; /* error messages */ - vtype = get_var_and_type (varname, value, quoted, &v, &val); + vtype = get_var_and_type (varname, value, estatep, quoted, flags, &v, &val); if (vtype == -1) - return ((char *)NULL); + { + this_command_name = oname; + return ((char *)NULL); + } starsub = vtype & VT_STARSUB; vtype &= ~VT_STARSUB; mflags = 0; - if (patsub && *patsub == '/') + /* PATSUB is never NULL when this is called. */ + if (*patsub == '/') { mflags |= MATCH_GLOBREP; patsub++; @@ -6312,14 +9150,11 @@ parameter_brace_patsub (varname, value, patsub, quoted) if (starsub) mflags |= MATCH_STARSUB; + if (pflags & PF_ASSIGNRHS) + mflags |= MATCH_ASSIGNRHS; + /* 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] == '/') { @@ -6328,7 +9163,6 @@ parameter_brace_patsub (varname, value, patsub, quoted) } else rep = (char *)NULL; -#endif if (rep && *rep == '\0') rep = (char *)NULL; @@ -6339,10 +9173,26 @@ parameter_brace_patsub (varname, value, patsub, quoted) if (rep) { - if ((mflags & MATCH_QUOTED) == 0) + /* We want to perform quote removal on the expanded replacement even if + the entire expansion is double-quoted because the parser and string + extraction functions treated quotes in the replacement string as + special. THIS IS NOT BACKWARDS COMPATIBLE WITH BASH-4.2. */ + if (shell_compatibility_level > 42 && patsub_replacement == 0) + rep = expand_string_if_necessary (rep, quoted & ~(Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT), expand_string_unsplit); + else if (shell_compatibility_level > 42 && patsub_replacement) + rep = expand_string_for_patsub (rep, quoted & ~(Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)); + /* This is the bash-4.2 code. */ + else 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); + + /* Check whether or not to replace `&' in the replacement string after + expanding it, since we want to treat backslashes quoting the `&' + consistently. */ + if (patsub_replacement && rep && *rep && shouldexp_replacement (rep)) + mflags |= MATCH_EXPREP; + } /* ksh93 doesn't allow the match specifier to be a part of the expanded @@ -6391,8 +9241,22 @@ parameter_brace_patsub (varname, value, patsub, quoted) } break; case VT_POSPARMS: + /* This does the right thing for the case where we are not performing + word splitting. MATCH_STARSUB restricts it to ${* /foo/bar}, and + pos_params_pat_subst/string_list_pos_params will do the right thing + in turn for the case where ifs_is_null. Posix interp 888 */ + if ((pflags & PF_NOSPLIT2) && (mflags & MATCH_STARSUB)) + mflags |= MATCH_ASSIGNRHS; temp = pos_params_pat_subst (val, p, rep, mflags); - if (temp && (mflags & MATCH_QUOTED) == 0) + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && quoted == 0 && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) { tt = quote_escapes (temp); free (temp); @@ -6401,11 +9265,28 @@ parameter_brace_patsub (varname, value, patsub, quoted) 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. */ + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how ${A[*]} will be + expanded to make it identical to $*. */ + if ((mflags & MATCH_STARSUB) && (mflags & MATCH_ASSIGNRHS) && ifs_is_null) + mflags |= MATCH_QUOTED; /* Posix interp 888 */ + + /* these eventually call string_list_pos_params */ + if (assoc_p (v)) + temp = assoc_patsub (assoc_cell (v), p, rep, mflags); + else + temp = array_patsub (array_cell (v), p, rep, mflags); + + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) + { + tt = quote_escapes (temp); + free (temp); + temp = tt; + } break; #endif } @@ -6414,6 +9295,8 @@ parameter_brace_patsub (varname, value, patsub, quoted) FREE (rep); free (lpatsub); + this_command_name = oname; + return temp; } @@ -6434,7 +9317,7 @@ pos_params_modcase (string, pat, modop, mflags) WORD_LIST *save, *params; WORD_DESC *w; char *ret; - int pchar, qflags; + int pchar, qflags, pflags; save = params = list_rest_of_args (); if (save == 0) @@ -6451,8 +9334,14 @@ pos_params_modcase (string, pat, modop, mflags) pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@'; qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0; + pflags = (mflags & MATCH_ASSIGNRHS) == MATCH_ASSIGNRHS ? PF_ASSIGNRHS : 0; + + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how $* will be expanded. */ + if (pchar == '*' && (mflags & MATCH_ASSIGNRHS) && ifs_is_null) + qflags |= Q_DOUBLE_QUOTES; /* Posix interp 888 */ - ret = string_list_pos_params (pchar, save, qflags); + ret = string_list_pos_params (pchar, save, qflags, pflags); dispose_words (save); return (ret); @@ -6463,24 +9352,29 @@ pos_params_modcase (string, pat, modop, mflags) 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) +parameter_brace_casemod (varname, value, estatep, modspec, patspec, quoted, pflags, flags) char *varname, *value; + array_eltstate_t *estatep; int modspec; char *patspec; - int quoted; + int quoted, pflags, flags; { int vtype, starsub, modop, mflags, x; - char *val, *temp, *pat, *p, *lpat, *tt; + char *val, *temp, *pat, *p, *lpat, *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); + vtype = get_var_and_type (varname, value, estatep, quoted, flags, &v, &val); if (vtype == -1) - return ((char *)NULL); + { + this_command_name = oname; + return ((char *)NULL); + } starsub = vtype & VT_STARSUB; vtype &= ~VT_STARSUB; @@ -6491,6 +9385,8 @@ parameter_brace_casemod (varname, value, modspec, patspec, quoted) mflags |= MATCH_QUOTED; if (starsub) mflags |= MATCH_STARSUB; + if (pflags & PF_ASSIGNRHS) + mflags |= MATCH_ASSIGNRHS; p = patspec; if (modspec == '^') @@ -6514,7 +9410,7 @@ parameter_brace_casemod (varname, value, modspec, patspec, quoted) lpat = p ? savestring (p) : 0; /* Perform the same expansions on the pattern as performed by the - pattern removal expansions. FOR LATER */ + pattern removal expansions. */ pat = lpat ? getpattern (lpat, quoted, 1) : 0; /* OK, now we do the case modification. */ @@ -6535,7 +9431,11 @@ parameter_brace_casemod (varname, value, modspec, patspec, quoted) case VT_POSPARMS: temp = pos_params_modcase (val, pat, modop, mflags); - if (temp && (mflags & MATCH_QUOTED) == 0) + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) { tt = quote_escapes (temp); free (temp); @@ -6545,11 +9445,26 @@ parameter_brace_casemod (varname, value, modspec, patspec, quoted) #if defined (ARRAY_VARS) case VT_ARRAYVAR: + /* If we are expanding in a context where word splitting will not be + performed, treat as quoted. This changes how ${A[*]} will be + expanded to make it identical to $*. */ + if ((mflags & MATCH_STARSUB) && (mflags & MATCH_ASSIGNRHS) && ifs_is_null) + mflags |= MATCH_QUOTED; /* Posix interp 888 */ + 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. */ + + if (temp && quoted == 0 && ifs_is_null) + { + /* Posix interp 888 */ + } + else if (temp && (mflags & MATCH_QUOTED) == 0) + { + tt = quote_escapes (temp); + free (temp); + temp = tt; + } + break; #endif } @@ -6557,6 +9472,8 @@ parameter_brace_casemod (varname, value, modspec, patspec, quoted) FREE (pat); free (lpat); + this_command_name = oname; + return temp; } @@ -6599,11 +9516,11 @@ chk_arithsub (s, len) break; case '\'': - i = skip_single_quoted (s, len, ++i); + i = skip_single_quoted (s, len, ++i, 0); break; case '"': - i = skip_double_quoted ((char *)s, len, ++i); + i = skip_double_quoted ((char *)s, len, ++i, 0); break; } } @@ -6621,18 +9538,22 @@ chk_arithsub (s, len) 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 *indexp, quoted, pflags, *quoted_dollar_atp, *contains_dollar_at; { int check_nullness, var_is_set, var_is_null, var_is_special; - int want_substring, want_indir, want_patsub, want_casemod; + int want_substring, want_indir, want_patsub, want_casemod, want_attributes; char *name, *value, *temp, *temp1; WORD_DESC *tdesc, *ret; - int t_index, sindex, c, tflag, modspec; + int t_index, sindex, c, tflag, modspec, local_pflags, all_element_arrayref; intmax_t number; + array_eltstate_t es; 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; + want_substring = want_indir = want_patsub = want_casemod = want_attributes = 0; + + local_pflags = 0; + all_element_arrayref = 0; sindex = *indexp; t_index = ++sindex; @@ -6642,36 +9563,53 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta 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); + define CASEMOD_TOGGLECASE in config-top.h */ +# if defined (CASEMOD_TOGGLECASE) + name = string_extract (string, &t_index, "#%^,~:-=?+/@}", SX_VARNAME); # else - name = string_extract (string, &t_index, "#%^,:-=?+/}", SX_VARNAME); -# endif /* CASEMOD_CAPCASE */ + name = string_extract (string, &t_index, "#%^,:-=?+/@}", SX_VARNAME); +# endif /* CASEMOD_TOGGLECASE */ #else - name = string_extract (string, &t_index, "#%:-=?+/}", SX_VARNAME); + name = string_extract (string, &t_index, "#%:-=?+/@}", SX_VARNAME); #endif /* CASEMOD_EXPANSIONS */ + /* Handle ${@[stuff]} now that @ is a word expansion operator. Not exactly + the cleanest code ever. */ + if (*name == 0 && sindex == t_index && string[sindex] == '@') + { + name = (char *)xrealloc (name, 2); + name[0] = '@'; + name[1] = '\0'; + t_index++; + } + else if (*name == '!' && t_index > sindex && string[t_index] == '@' && string[t_index+1] == RBRACE) + { + name = (char *)xrealloc (name, t_index - sindex + 2); + name[t_index - sindex] = '@'; + name[t_index - sindex + 1] = '\0'; + t_index++; + } + ret = 0; tflag = 0; +#if defined (ARRAY_VARS) + init_eltstate (&es); +#endif + es.ind = INTMAX_MIN; /* XXX */ + /* 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] == '*'))) + to special variables except `#', `?', `@' and `*'. This clause is + designed to handle ${#SPECIAL} and ${!SPECIAL}, not anything more + general. */ + if ((sindex == t_index && VALID_SPECIAL_LENGTH_PARAM (string[t_index])) || + (sindex == t_index && string[sindex] == '#' && VALID_SPECIAL_LENGTH_PARAM (string[sindex + 1])) || + (sindex == t_index - 1 && string[sindex] == '!' && VALID_INDIR_PARAM (string[t_index]))) { t_index++; - free (name); - temp1 = string_extract (string, &t_index, "#%:-=?+/}", 0); - name = (char *)xmalloc (3 + (strlen (temp1))); + temp1 = string_extract (string, &t_index, "#%:-=?+/@}", 0); + name = (char *)xrealloc (name, 3 + (strlen (temp1))); *name = string[sindex]; if (string[sindex] == '!') { @@ -6702,7 +9640,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta } else if (c == ':' && string[sindex] != RBRACE) want_substring = 1; - else if (c == '/' && string[sindex] != RBRACE) + else if (c == '/' /* && string[sindex] != RBRACE */) /* XXX */ want_patsub = 1; #if defined (CASEMOD_EXPANSIONS) else if (c == '^' || c == ',' || c == '~') @@ -6711,6 +9649,12 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta want_casemod = 1; } #endif + else if (c == '@' && (string[sindex] == 'a' || string[sindex] == 'A') && string[sindex+1] == RBRACE) + { + /* special case because we do not want to shortcut foo as foo[0] here */ + want_attributes = 1; + local_pflags |= PF_ALLINDS; + } /* Catch the valid and invalid brace expressions that made it through the tests above. */ @@ -6730,7 +9674,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta member (c, "%:=+/") && string[sindex] == RBRACE) { temp = (char *)NULL; - goto bad_substitution; + goto bad_substitution; /* XXX - substitution error */ } /* Indirect expansion begins with a `!'. A valid indirect expansion is @@ -6740,7 +9684,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta (legal_variable_starter ((unsigned char)name[1]) || DIGIT (name[1]) || VALID_INDIR_PARAM (name[1])); - /* Determine the value of this variable. */ + /* Determine the value of this variable whose name is NAME. */ /* Check for special variables, directly referenced. */ if (SPECIAL_VAR (name, want_indir)) @@ -6757,10 +9701,17 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta if (string[sindex - 1] != RBRACE || (valid_length_expression (name) == 0)) { temp = (char *)NULL; - goto bad_substitution; + goto bad_substitution; /* substitution error */ } number = parameter_brace_expand_length (name); + if (number == INTMAX_MIN && unbound_vars_is_error) + { + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (name+1); + free (name); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } free (name); *indexp = sindex; @@ -6782,6 +9733,8 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta if (contains_dollar_at) *contains_dollar_at = 1; + + tflag |= W_DOLLARAT; } /* Process ${!PREFIX*} expansion. */ @@ -6798,51 +9751,60 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta x = all_variables_matching_prefix (temp1); xlist = strvec_to_word_list (x, 0, 0); if (string[sindex - 2] == '*') - temp = string_list_dollar_star (xlist); + temp = string_list_dollar_star (xlist, quoted, 0); else { - temp = string_list_dollar_at (xlist, quoted); + temp = string_list_dollar_at (xlist, quoted, 0); if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) *quoted_dollar_atp = 1; if (contains_dollar_at) *contains_dollar_at = 1; + + tflag |= W_DOLLARAT; } free (x); dispose_words (xlist); free (temp1); *indexp = sindex; + free (name); + ret = alloc_word_desc (); ret->word = temp; + ret->flags = tflag; /* XXX */ return ret; } #if defined (ARRAY_VARS) - /* Process ${!ARRAY[@]} and ${!ARRAY[*]} expansion. */ /* [ */ + /* Process ${!ARRAY[@]} and ${!ARRAY[*]} expansion. */ if (want_indir && string[sindex - 1] == RBRACE && - string[sindex - 2] == ']' && valid_array_reference (name+1)) + string[sindex - 2] == RBRACK && valid_array_reference (name+1, 0)) { char *x, *x1; temp1 = savestring (name + 1); - x = array_variable_name (temp1, &x1, (int *)0); /* [ */ + x = array_variable_name (temp1, 0, &x1, (int *)0); FREE (x); - if (ALL_ELEMENT_SUB (x1[0]) && x1[1] == ']') + if (ALL_ELEMENT_SUB (x1[0]) && x1[1] == RBRACK) { - temp = array_keys (temp1, quoted); /* handles assoc vars too */ + temp = array_keys (temp1, quoted, pflags); /* 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; + + tflag |= W_DOLLARAT; } + free (name); free (temp1); *indexp = sindex; ret = alloc_word_desc (); ret->word = temp; + ret->flags = tflag; /* XXX */ return ret; } @@ -6855,13 +9817,39 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta var_is_special) == 0) { temp = (char *)NULL; - goto bad_substitution; + goto bad_substitution; /* substitution error */ } if (want_indir) - tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at); + { + tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, pflags|local_pflags, quoted_dollar_atp, contains_dollar_at); + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + { + temp = (char *)NULL; + goto bad_substitution; + } + + /* Turn off the W_ARRAYIND flag because there is no way for this function + to return the index we're supposed to be using. */ + if (tdesc && tdesc->flags) + tdesc->flags &= ~W_ARRAYIND; + + /* If the indir expansion contains $@/$*, extend the special treatment + of the case of no positional parameters and `set -u' to it. */ + if (contains_dollar_at && *contains_dollar_at) + all_element_arrayref = 1; + } else - tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND|(pflags&PF_NOSPLIT2)); + { + local_pflags |= PF_IGNUNBOUND|(pflags&(PF_NOSPLIT2|PF_ASSIGNRHS)); + tdesc = parameter_brace_expand_word (name, var_is_special, quoted, local_pflags, &es); + } + + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + { + tflag = 0; + tdesc = 0; + } if (tdesc) { @@ -6870,88 +9858,175 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta dispose_word_desc (tdesc); } else - temp = (char *)0; + temp = (char *)0; + + if (temp == &expand_param_error || temp == &expand_param_fatal) + { + FREE (name); + FREE (value); + return (temp == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } #if defined (ARRAY_VARS) - if (valid_array_reference (name)) - chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at); + if (valid_array_reference (name, 0)) + { + int qflags; + char *t; + + qflags = quoted; + /* If in a context where word splitting will not take place, treat as + if double-quoted. Has effects with $* and ${array[*]} */ + + if (pflags & PF_ASSIGNRHS) + qflags |= Q_DOUBLE_QUOTES; + /* We duplicate a little code here */ + t = mbschr (name, LBRACK); + if (t && ALL_ELEMENT_SUB (t[1]) && t[2] == RBRACK) + { + all_element_arrayref = 1; + if (expand_no_split_dollar_star && t[1] == '*') /* XXX */ + qflags |= Q_DOUBLE_QUOTES; + } + chk_atstar (name, qflags, pflags, quoted_dollar_atp, contains_dollar_at); + } #endif var_is_set = temp != (char *)0; var_is_null = check_nullness && (var_is_set == 0 || *temp == 0); + /* XXX - this may not need to be restricted to special variables */ + if (check_nullness) + var_is_null |= var_is_set && var_is_special && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL (temp); +#if defined (ARRAY_VARS) + if (check_nullness) + var_is_null |= var_is_set && + (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && + QUOTED_NULL (temp) && + valid_array_reference (name, 0) && + chk_atstar (name, 0, 0, (int *)0, (int *)0); +#endif /* 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); + value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD); if (string[sindex] == RBRACE) sindex++; else - goto bad_substitution; + goto bad_substitution; /* substitution error */ } else value = (char *)NULL; *indexp = sindex; + /* All the cases where an expansion can possibly generate an unbound + variable error. */ + if (want_substring || want_patsub || want_casemod || c == '@' || c == '#' || c == '%' || c == RBRACE) + { + if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]) && all_element_arrayref == 0) + { + set_exit_status (EXECUTION_FAILURE); + err_unboundvar (name); + FREE (value); + FREE (temp); + free (name); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + } + /* 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); + temp1 = parameter_brace_substring (name, temp, &es, value, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); FREE (value); FREE (temp); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif - if (temp1 == &expand_param_error) - return (&expand_wdesc_error); - else if (temp1 == &expand_param_fatal) - return (&expand_wdesc_fatal); + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) + { + FREE (name); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } ret = alloc_word_desc (); ret->word = temp1; - if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + /* We test quoted_dollar_atp because we want variants with double-quoted + "$@" to take a different code path. In fact, we make sure at the end + of expand_word_internal that we're only looking at these flags if + quoted_dollar_at == 0. */ + if (temp1 && + (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) && + QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && + (pflags & PF_ASSIGNRHS)) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + FREE (name); return ret; } else if (want_patsub) { - temp1 = parameter_brace_patsub (name, temp, value, quoted); - FREE (name); + temp1 = parameter_brace_patsub (name, temp, &es, value, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); FREE (value); FREE (temp); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif - if (temp1 == &expand_param_error) - return (&expand_wdesc_error); - else if (temp1 == &expand_param_fatal) - return (&expand_wdesc_fatal); + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) + { + FREE (name); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &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))) + if (temp1 && + (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) && + QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + FREE (name); return ret; } #if defined (CASEMOD_EXPANSIONS) else if (want_casemod) { - temp1 = parameter_brace_casemod (name, temp, modspec, value, quoted); - FREE (name); + temp1 = parameter_brace_casemod (name, temp, &es, modspec, value, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); FREE (value); FREE (temp); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif - if (temp1 == &expand_param_error) - return (&expand_wdesc_error); - else if (temp1 == &expand_param_fatal) - return (&expand_wdesc_fatal); + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) + { + FREE (name); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); + } ret = alloc_word_desc (); ret->word = temp1; - if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + if (temp1 && + (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) && + QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) ret->flags |= W_QUOTED|W_HASQUOTEDNULL; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + FREE (name); return ret; } #endif @@ -6961,24 +10036,49 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta { default: case '\0': - bad_substitution: +bad_substitution: + set_exit_status (EXECUTION_FAILURE); report_error (_("%s: bad substitution"), string ? string : "??"); FREE (value); FREE (temp); free (name); - return &expand_wdesc_error; +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif + if (shell_compatibility_level <= 43) + return &expand_wdesc_error; + else + return ((posixly_correct && interactive_shell == 0) ? &expand_wdesc_fatal : &expand_wdesc_error); case RBRACE: - if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1])) + break; + + case '@': + temp1 = parameter_brace_transform (name, temp, &es, value, c, quoted, pflags, (tflag & W_ARRAYIND) ? AV_USEIND : 0); + free (temp); + free (value); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif + + if (temp1 == &expand_param_error || temp1 == &expand_param_fatal) { - last_command_exit_value = EXECUTION_FAILURE; - err_unboundvar (name); - FREE (value); - FREE (temp); free (name); - return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: bad substitution"), string ? string : "??"); + return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal); } - break; + + 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; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + free (name); + return ret; case '#': /* ${param#[#]pattern} */ case '%': /* ${param%[%]pattern} */ @@ -6987,14 +10087,22 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta FREE (value); break; } - temp1 = parameter_brace_remove_pattern (name, temp, value, c, quoted); + temp1 = parameter_brace_remove_pattern (name, temp, &es, value, c, quoted, (tflag & W_ARRAYIND) ? AV_USEIND : 0); free (temp); free (value); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif 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; + /* Special handling for $* when unquoted and $IFS is null. Posix interp 888 */ + else if (temp1 && (name[0] == '*' && name[1] == 0) && quoted == 0 && ifs_is_null) + ret->flags |= W_SPLITSPACE; /* Posix interp 888 */ + + free (name); return ret; case '-': @@ -7005,7 +10113,6 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta { /* 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 "$@", @@ -7019,8 +10126,14 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta FREE (temp); if (value) { + /* From Posix discussion on austin-group list. Issue 221 + requires that backslashes escaping `}' inside + double-quoted ${...} be removed. */ + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + quoted |= Q_DOLBRACE; ret = parameter_brace_expand_rhs (name, value, c, quoted, + pflags, quoted_dollar_atp, contains_dollar_at); /* XXX - fix up later, esp. noting presence of @@ -7038,18 +10151,33 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta } else /* VAR not set or VAR is NULL. */ { + /* If we're freeing a quoted null here, we need to remember we saw + it so we can restore it later if needed, or the caller can note it. + The check against `+' doesn't really matter, since the other cases + don't use or return TFLAG, but it's good for clarity. */ + if (c == '+' && temp && QUOTED_NULL (temp) && + (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) + tflag |= W_HASQUOTEDNULL; + FREE (temp); temp = (char *)NULL; if (c == '=' && var_is_special) { + set_exit_status (EXECUTION_FAILURE); report_error (_("$%s: cannot assign in this way"), name); free (name); free (value); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif return &expand_wdesc_error; } else if (c == '?') { - parameter_brace_expand_error (name, value); + parameter_brace_expand_error (name, value, check_nullness); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); } else if (c != '+') @@ -7062,7 +10190,12 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta if (contains_dollar_at) *contains_dollar_at = 0; - ret = parameter_brace_expand_rhs (name, value, c, quoted, + /* From Posix discussion on austin-group list. Issue 221 requires + that backslashes escaping `}' inside double-quoted ${...} be + removed. */ + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + quoted |= Q_DOLBRACE; + ret = parameter_brace_expand_rhs (name, value, c, quoted, pflags, quoted_dollar_atp, contains_dollar_at); /* XXX - fix up later, esp. noting presence of @@ -7074,6 +10207,9 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta break; } free (name); +#if defined (ARRAY_VARS) + flush_eltstate (&es); +#endif if (ret == 0) { @@ -7095,15 +10231,16 @@ param_expand (string, sindex, quoted, expanded_something, 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; + char *temp, *temp1, uerror[3], *savecmd; + int zindex, t_index, expok, eflag; unsigned char c; intmax_t number; SHELL_VAR *var; - WORD_LIST *list; + WORD_LIST *list, *l; WORD_DESC *tdesc, *ret; - int tflag; + int tflag, nullarg; +/*itrace("param_expand: `%s' pflags = %d", string+*sindex, pflags);*/ zindex = *sindex; c = string[++zindex]; @@ -7126,12 +10263,13 @@ param_expand (string, sindex, quoted, expanded_something, case '8': case '9': temp1 = dollar_vars[TODIGIT (c)]; + /* This doesn't get called when (pflags&PF_IGNUNBOUND) != 0 */ if (unbound_vars_is_error && temp1 == (char *)NULL) { uerror[0] = '$'; uerror[1] = c; uerror[2] = '\0'; - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); err_unboundvar (uerror); return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); } @@ -7174,12 +10312,12 @@ param_expand (string, sindex, quoted, expanded_something, if (expanded_something) *expanded_something = 0; temp = (char *)NULL; - if (unbound_vars_is_error) + if (unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) { uerror[0] = '$'; uerror[1] = c; uerror[2] = '\0'; - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); err_unboundvar (uerror); return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); } @@ -7206,7 +10344,7 @@ param_expand (string, sindex, quoted, expanded_something, uerror[0] = '$'; uerror[1] = '*'; uerror[2] = '\0'; - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); err_unboundvar (uerror); return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); } @@ -7224,12 +10362,16 @@ param_expand (string, sindex, quoted, expanded_something, 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; + temp = (quoted & (Q_DOUBLE_QUOTES|Q_PATQUOTE)) ? string_list_dollar_star (list, quoted, 0) : string_list (list); + if (temp) + { + temp1 = (quoted & Q_DOUBLE_QUOTES) ? quote_string (temp) : temp; + if (*temp == 0) + tflag |= W_HASQUOTEDNULL; + if (temp != temp1) + free (temp); + temp = temp1; + } } else { @@ -7238,18 +10380,65 @@ param_expand (string, sindex, quoted, expanded_something, 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 (expand_no_split_dollar_star && quoted == 0 && ifs_is_set == 0 && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888: RHS of assignment, IFS unset: no splitting, + separate with space */ + temp1 = string_list_dollar_star (list, quoted, pflags); + temp = temp1 ? quote_string (temp1) : temp1; + /* XXX - tentative - note that we saw a quoted null here */ + if (temp1 && *temp1 == 0 && QUOTED_NULL (temp)) + tflag |= W_SAWQUOTEDNULL; + FREE (temp1); + } + else if (expand_no_split_dollar_star && quoted == 0 && ifs_is_null && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888: RHS of assignment, IFS set to '' */ + temp1 = string_list_dollar_star (list, quoted, pflags); + temp = temp1 ? quote_escapes (temp1) : temp1; + FREE (temp1); + } + else if (expand_no_split_dollar_star && quoted == 0 && ifs_is_set && ifs_is_null == 0 && (pflags & PF_ASSIGNRHS)) + { + /* Posix interp 888: RHS of assignment, IFS set to non-null value */ + temp1 = string_list_dollar_star (list, quoted, pflags); + temp = temp1 ? quote_string (temp1) : temp1; + + /* XXX - tentative - note that we saw a quoted null here */ + if (temp1 && *temp1 == 0 && QUOTED_NULL (temp)) + tflag |= W_SAWQUOTEDNULL; + FREE (temp1); + } + /* XXX - should we check ifs_is_set here as well? */ # if defined (HANDLE_MULTIBYTE) - if (expand_no_split_dollar_star && ifs_firstc[0] == 0) + else if (expand_no_split_dollar_star && ifs_firstc[0] == 0) # else - if (expand_no_split_dollar_star && ifs_firstc == 0) + else if (expand_no_split_dollar_star && ifs_firstc == 0) # endif - temp = string_list_dollar_star (list); + /* Posix interp 888: not RHS, no splitting, IFS set to '' */ + temp = string_list_dollar_star (list, quoted, 0); else - temp = string_list_dollar_at (list, quoted); -#else - temp = string_list_dollar_at (list, quoted); + { + temp = string_list_dollar_at (list, quoted, 0); + /* Set W_SPLITSPACE to make sure the individual positional + parameters are split into separate arguments */ +#if 0 + if (quoted == 0 && (ifs_is_set == 0 || ifs_is_null)) +#else /* change with bash-5.0 */ + if (quoted == 0 && ifs_is_null) #endif + tflag |= W_SPLITSPACE; + /* If we're not quoted but we still don't want word splitting, make + we quote the IFS characters to protect them from splitting (e.g., + when $@ is in the string as well). */ + else if (temp && quoted == 0 && ifs_is_set && (pflags & PF_ASSIGNRHS)) + { + temp1 = quote_string (temp); + free (temp); + temp = temp1; + } + } + if (expand_no_split_dollar_star == 0 && contains_dollar_at) *contains_dollar_at = 1; } @@ -7278,12 +10467,18 @@ param_expand (string, sindex, quoted, expanded_something, uerror[0] = '$'; uerror[1] = '@'; uerror[2] = '\0'; - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); err_unboundvar (uerror); return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); } #endif + for (nullarg = 0, l = list; l; l = l->next) + { + if (l->word && (l->word->word == 0 || l->word->word[0] == 0)) + nullarg = 1; + } + /* 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 @@ -7295,18 +10490,47 @@ param_expand (string, sindex, quoted, expanded_something, 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); + /* XXX - what to do when in a context where word splitting is not + performed? Even when IFS is not the default, posix seems to imply + that we have to expand $@ to all the positional parameters and + separate them with spaces, which are preserved because word splitting + doesn't take place. See below for how we use PF_NOSPLIT2 here. */ + + /* These are the cases where word splitting will not be performed. */ + if (pflags & PF_ASSIGNRHS) + { + temp = string_list_dollar_at (list, (quoted|Q_DOUBLE_QUOTES), pflags); + if (nullarg) + tflag |= W_HASQUOTEDNULL; /* we know quoting produces quoted nulls */ + } + + /* This needs to match what expand_word_internal does with non-quoted $@ + does with separating with spaces. Passing Q_DOUBLE_QUOTES means that + the characters in LIST will be quoted, and PF_ASSIGNRHS ensures that + they will separated by spaces. After doing this, we need the special + handling for PF_NOSPLIT2 in expand_word_internal to remove the CTLESC + quotes. */ + else if (pflags & PF_NOSPLIT2) + { +#if defined (HANDLE_MULTIBYTE) + if (quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc[0] != ' ') +#else + if (quoted == 0 && ifs_is_set && ifs_is_null == 0 && ifs_firstc != ' ') +#endif + /* Posix interp 888 */ + temp = string_list_dollar_at (list, Q_DOUBLE_QUOTES, pflags); + else + temp = string_list_dollar_at (list, quoted, pflags); + } + else + temp = string_list_dollar_at (list, quoted, pflags); + tflag |= W_DOLLARAT; dispose_words (list); break; @@ -7346,7 +10570,9 @@ param_expand (string, sindex, quoted, expanded_something, case LPAREN: /* We have to extract the contents of this paren substitution. */ t_index = zindex + 1; - temp = extract_command_subst (string, &t_index, 0); + /* XXX - might want to check for string[t_index+2] == LPAREN and parse + as arithmetic substitution immediately. */ + temp = extract_command_subst (string, &t_index, (pflags&PF_COMPLETE) ? SX_COMPLETE : 0); zindex = t_index; /* For Posix.2-style `$(( ))' arithmetic substitution, @@ -7377,20 +10603,24 @@ param_expand (string, sindex, quoted, expanded_something, } /* Expand variables found inside the expression. */ - temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES); + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES|Q_ARITH); free (temp2); arithsub: /* No error messages. */ + savecmd = this_command_name; this_command_name = (char *)NULL; - number = evalexp (temp1, &expok); + + eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED; + number = evalexp (temp1, eflag, &expok); + this_command_name = savecmd; free (temp); free (temp1); if (expok == 0) { if (interactive_shell == 0 && posixly_correct) { - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); return (&expand_wdesc_fatal); } else @@ -7406,7 +10636,7 @@ param_expand (string, sindex, quoted, expanded_something, temp1 = substring (string, *sindex, zindex+1); else { - tdesc = command_substitute (temp, quoted); + tdesc = command_substitute (temp, quoted, pflags&PF_ASSIGNRHS); temp1 = tdesc ? tdesc->word : (char *)NULL; if (tdesc) dispose_word_desc (tdesc); @@ -7417,7 +10647,7 @@ param_expand (string, sindex, quoted, expanded_something, /* Do POSIX.2d9-style arithmetic substitution. This will probably go away in a future bash release. */ - case '[': + case '[': /*]*/ /* Extract the contents of this arithmetic substitution. */ t_index = zindex + 1; temp = extract_arithmetic_subst (string, &t_index); @@ -7431,7 +10661,7 @@ param_expand (string, sindex, quoted, expanded_something, } /* Do initial variable expansion. */ - temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES); + temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES|Q_ARITH); goto arithsub; @@ -7479,20 +10709,48 @@ param_expand (string, sindex, quoted, expanded_something, temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) ? quote_string (temp) - : quote_escapes (temp); + : ((pflags & PF_ASSIGNRHS) ? quote_rhs (temp) + : quote_escapes (temp)); } free (temp1); goto return0; } + else if (var && (invisible_p (var) || var_isset (var) == 0)) + temp = (char *)NULL; + else if ((var = find_variable_last_nameref (temp1, 0)) && var_isset (var) && invisible_p (var) == 0) + { + temp = nameref_cell (var); +#if defined (ARRAY_VARS) + if (temp && *temp && valid_array_reference (temp, 0)) + { + chk_atstar (temp, quoted, pflags, quoted_dollar_at_p, contains_dollar_at); + tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, 0); + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + return (tdesc); + ret = tdesc; + goto return0; + } + else +#endif + /* y=2 ; typeset -n x=y; echo $x is not the same as echo $2 in ksh */ + if (temp && *temp && legal_identifier (temp) == 0) + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: invalid variable name for name reference"), temp); + return (&expand_wdesc_error); /* XXX */ + } + else + temp = (char *)NULL; + } temp = (char *)NULL; unbound_variable: if (unbound_vars_is_error) { - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); err_unboundvar (temp1); } else @@ -7502,7 +10760,7 @@ param_expand (string, sindex, quoted, expanded_something, } free (temp1); - last_command_exit_value = EXECUTION_FAILURE; + set_exit_status (EXECUTION_FAILURE); return ((unbound_vars_is_error && interactive_shell == 0) ? &expand_wdesc_fatal : &expand_wdesc_error); @@ -7523,6 +10781,127 @@ param_expand (string, sindex, quoted, expanded_something, return ret; } +#if defined (ARRAY_VARS) +/* Characters that need to be backslash-quoted after expanding array subscripts */ +static char abstab[256] = { '\1' }; + +/* Run an array subscript through the appropriate word expansions. */ +char * +expand_subscript_string (string, quoted) + char *string; + int quoted; +{ + WORD_DESC td; + WORD_LIST *tlist; + int oe; + char *ret; + + if (string == 0 || *string == 0) + return (char *)NULL; + + oe = expand_no_split_dollar_star; + ret = (char *)NULL; + +#if 0 + td.flags = W_NOPROCSUB|W_NOTILDE|W_NOSPLIT2; /* XXX - W_NOCOMSUB? */ +#else + td.flags = W_NOPROCSUB|W_NOSPLIT2; /* XXX - W_NOCOMSUB? */ +#endif + td.word = savestring (string); /* in case it's freed on error */ + + expand_no_split_dollar_star = 1; + tlist = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL); + expand_no_split_dollar_star = oe; + + if (tlist) + { + if (tlist->word) + { + remove_quoted_nulls (tlist->word->word); + tlist->word->flags &= ~W_HASQUOTEDNULL; + } + dequote_list (tlist); + ret = string_list (tlist); + dispose_words (tlist); + } + + free (td.word); + return (ret); +} + +/* Expand the subscript in STRING, which is an array reference. To ensure we + only expand it once, we quote the characters that would start another + expansion and the bracket characters that are special to array subscripts. */ +static char * +expand_array_subscript (string, sindex, quoted, flags) + char *string; + int *sindex; + int quoted, flags; +{ + char *ret, *exp, *t; + size_t slen; + int si, ni; + + si = *sindex; + slen = STRLEN (string); + + if (abstab[0] == '\1') + { + /* These are basically the characters that start shell expansions plus + the characters that delimit subscripts. */ + memset (abstab, '\0', sizeof (abstab)); + abstab[LBRACK] = abstab[RBRACK] = 1; + abstab['$'] = abstab['`'] = abstab['~'] = 1; + abstab['\\'] = abstab['\''] = 1; + abstab['"'] = 1; /* XXX */ + /* We don't quote `@' or `*' in the subscript at all. */ + } + + /* string[si] == LBRACK */ + ni = skipsubscript (string, si, 0); + /* These checks mirror the ones in valid_array_reference. The check for + (ni - si) == 1 checks for empty subscripts. We don't check that the + subscript is a separate word if we're parsing an arithmetic expression. */ + if (ni >= slen || string[ni] != RBRACK || (ni - si) == 1 || + (string[ni+1] != '\0' && (quoted & Q_ARITH) == 0)) + { + /* let's check and see what fails this check */ + INTERNAL_DEBUG (("expand_array_subscript: bad subscript string: `%s'", string+si)); + ret = (char *)xmalloc (2); /* badly-formed subscript */ + ret[0] = string[si]; + ret[1] = '\0'; + *sindex = si + 1; + return ret; + } + + /* STRING[ni] == RBRACK */ + exp = substring (string, si+1, ni); + t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES)); + free (exp); + exp = t ? sh_backslash_quote (t, abstab, 0) : savestring (""); + free (t); + + slen = STRLEN (exp); + ret = xmalloc (slen + 2 + 1); + ret[0] ='['; + strcpy (ret + 1, exp); + ret[slen + 1] = ']'; + ret[slen + 2] = '\0'; + + free (exp); + *sindex = ni + 1; + + return ret; +} +#endif + +void +invalidate_cached_quoted_dollar_at () +{ + dispose_words (cached_quoted_dollar_at); + cached_quoted_dollar_at = 0; +} + /* 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 @@ -7563,10 +10942,10 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin char *istring; /* The current size of the above object. */ - int istring_size; + size_t istring_size; /* Index into ISTRING. */ - int istring_index; + size_t istring_index; /* Temporary string storage. */ char *temp, *temp1; @@ -7590,9 +10969,14 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin /* State flags */ int had_quoted_null; - int has_dollar_at; + int has_quoted_ifs; /* did we add a quoted $IFS character here? */ + int has_dollar_at, temp_has_dollar_at; + int internal_tilde; + int split_on_spaces; + int local_expanded; int tflag; int pflags; /* flags passed to param_expand */ + int mb_cur_max; int assignoff; /* If assignment, offset of `=' */ @@ -7603,17 +10987,41 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin DECLARE_MBSTATE; + /* OK, let's see if we can optimize a common idiom: "$@". This needs to make sure + that all of the flags callers care about (e.g., W_HASQUOTEDNULL) are set in + list->flags. */ + if (STREQ (word->word, "\"$@\"") && + (word->flags == (W_HASDOLLAR|W_QUOTED)) && + dollar_vars[1]) /* XXX - check IFS here as well? */ + { + if (contains_dollar_at) + *contains_dollar_at = 1; + if (expanded_something) + *expanded_something = 1; + if (cached_quoted_dollar_at) + return (copy_word_list (cached_quoted_dollar_at)); + list = list_rest_of_args (); + list = quote_list (list); + cached_quoted_dollar_at = copy_word_list (list); + return (list); + } + istring = (char *)xmalloc (istring_size = DEFAULT_INITIAL_ARRAY_SIZE); istring[istring_index = 0] = '\0'; quoted_dollar_at = had_quoted_null = has_dollar_at = 0; + has_quoted_ifs = 0; + split_on_spaces = 0; + internal_tilde = 0; /* expanding =~ or :~ */ quoted_state = UNQUOTED; string = word->word; if (string == 0) goto finished_with_string; + mb_cur_max = MB_CUR_MAX; + /* 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; + multibyte characters are possible, but do need it for bounds checking. */ + string_size = (mb_cur_max > 1) ? strlen (string) : 1; if (contains_dollar_at) *contains_dollar_at = 0; @@ -7626,7 +11034,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin { c = string[sindex]; - /* Case on toplevel character. */ + /* Case on top-level character. */ switch (c) { case '\0': @@ -7635,7 +11043,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin case CTLESC: sindex++; #if HANDLE_MULTIBYTE - if (MB_CUR_MAX > 1 && string[sindex]) + if (mb_cur_max > 1 && string[sindex]) { SADD_MBQCHAR_BODY(temp, string, sindex, string_size); } @@ -7666,7 +11074,9 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin case '<': case '>': { - if (string[++sindex] != LPAREN || (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (word->flags & (W_DQUOTE|W_NOPROCSUB)) || posixly_correct) + /* XXX - technically this should only be expanded at the start + of a word */ + if (string[++sindex] != LPAREN || (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (word->flags & W_NOPROCSUB)) { sindex--; /* add_character: label increments sindex */ goto add_character; @@ -7674,7 +11084,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin else t_index = sindex + 1; /* skip past both '<' and LPAREN */ - temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index); /*))*/ + temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index, 0); /*))*/ sindex = t_index; /* If the process substitution specification is `<()', we want to @@ -7689,6 +11099,22 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin } #endif /* PROCESS_SUBSTITUTION */ +#if defined (ARRAY_VARS) + case '[': /*]*/ + if ((quoted & Q_ARITH) == 0 || shell_compatibility_level <= 51) + { + 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; + } + else + { + temp = expand_array_subscript (string, &sindex, quoted, word->flags); + goto add_string; + } +#endif + case '=': /* Posix.2 section 3.6.1 says that tildes following `=' in words which are not assignment statements are not expanded. If the @@ -7708,27 +11134,30 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin 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 `='. */ + expansion, note where the first `=' appears in the word and prepare + to do tilde expansion following the first `='. We have to keep + track of the first `=' (using assignoff) to avoid being confused + by an `=' in the rhs of the assignment statement. */ 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 + internal_tilde = 1; + + if (word->flags & W_ASSIGNARG) + word->flags |= W_ASSIGNRHS; /* affects $@ */ + if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c)) - goto add_ifs_character; + { + has_quoted_ifs++; + goto add_ifs_character; + } else goto add_character; case ':': - if (word->flags & W_NOTILDE) + if (word->flags & (W_NOTILDE|W_NOASSNTILDE)) { if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c)) goto add_ifs_character; @@ -7736,9 +11165,10 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin goto add_character; } - if ((word->flags & (W_ASSIGNMENT|W_ASSIGNRHS|W_TILDEEXP)) && + if ((word->flags & (W_ASSIGNMENT|W_ASSIGNRHS)) && + (posixly_correct == 0 || (word->flags & W_TILDEEXP)) && string[sindex+1] == '~') - word->flags |= W_ITILDE; + internal_tilde = 1; if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c)) goto add_ifs_character; @@ -7748,12 +11178,14 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin 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)) || + assignment statement, we don't do tilde expansion. We don't + do tilde expansion if quoted or in an arithmetic context. */ + + if ((word->flags & W_NOTILDE) || + (sindex > 0 && (internal_tilde == 0)) || (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) { - word->flags &= ~W_ITILDE; + internal_tilde = 0; 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 @@ -7769,7 +11201,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin temp = bash_tilde_find_word (string + sindex, tflag, &t_index); - word->flags &= ~W_ITILDE; + internal_tilde = 0; if (temp && *temp && t_index > 0) { @@ -7794,14 +11226,22 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin case '$': if (expanded_something) *expanded_something = 1; + local_expanded = 1; - has_dollar_at = 0; + temp_has_dollar_at = 0; pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0; if (word->flags & W_NOSPLIT2) pflags |= PF_NOSPLIT2; + if (word->flags & W_ASSIGNRHS) + pflags |= PF_ASSIGNRHS; + if (word->flags & W_COMPLETE) + pflags |= PF_COMPLETE; + tword = param_expand (string, &sindex, quoted, expanded_something, - &has_dollar_at, "ed_dollar_at, + &temp_has_dollar_at, "ed_dollar_at, &had_quoted_null, pflags); + has_dollar_at += temp_has_dollar_at; + split_on_spaces += (tword->flags & W_SPLITSPACE); if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal) { @@ -7814,11 +11254,21 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin *contains_dollar_at = 1; if (tword && (tword->flags & W_HASQUOTEDNULL)) - had_quoted_null = 1; + had_quoted_null = 1; /* note for later */ + if (tword && (tword->flags & W_SAWQUOTEDNULL)) + had_quoted_null = 1; /* XXX */ - temp = tword->word; + temp = tword ? tword->word : (char *)NULL; dispose_word_desc (tword); + /* Kill quoted nulls; we will add them back at the end of + expand_word_internal if nothing else in the string */ + if (had_quoted_null && temp && QUOTED_NULL (temp)) + { + FREE (temp); + temp = (char *)NULL; + } + goto add_string; break; @@ -7826,7 +11276,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin { t_index = sindex++; - temp = string_extract (string, &sindex, "`", SX_REQMATCH); + temp = string_extract (string, &sindex, "`", (word->flags & W_COMPLETE) ? SX_COMPLETE : 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) @@ -7836,6 +11286,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin sindex = t_index; goto add_character; } + set_exit_status (EXECUTION_FAILURE); report_error (_("bad substitution: no closing \"`\" in %s") , string+t_index); free (string); free (istring); @@ -7845,6 +11296,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin if (expanded_something) *expanded_something = 1; + local_expanded = 1; if (word->flags & W_NOCOMSUB) /* sindex + 1 because string[sindex] == '`' */ @@ -7852,7 +11304,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin else { de_backslash (temp); - tword = command_substitute (temp, quoted); + tword = command_substitute (temp, quoted, PF_BACKQUOTE); temp1 = tword ? tword->word : (char *)NULL; if (tword) dispose_word_desc (tword); @@ -7871,14 +11323,45 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin c = string[++sindex]; - if (quoted & Q_HERE_DOCUMENT) + /* "However, the double-quote character ( '"' ) shall not be treated + specially within a here-document, except when the double-quote + appears within "$()", "``", or "${}"." */ + if ((quoted & Q_HERE_DOCUMENT) && (quoted & Q_DOLBRACE) && c == '"') + tflag = CBSDQUOTE; /* special case */ + else 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)) + /* From Posix discussion on austin-group list: Backslash escaping + a } in ${...} is removed. Issue 0000221 */ + if ((quoted & Q_DOLBRACE) && c == RBRACE) + { + SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size); + } + /* This is the fix for " $@\ " */ + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0) && isexp == 0 && isifs (c)) + { + RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, + DEFAULT_ARRAY_SIZE); + istring[istring_index++] = CTLESC; + istring[istring_index++] = '\\'; + istring[istring_index] = '\0'; + + SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size); + } + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && c == 0) + { + RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, + DEFAULT_ARRAY_SIZE); + istring[istring_index++] = CTLESC; + istring[istring_index++] = '\\'; + istring[istring_index] = '\0'; + break; + } + else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0)) { SCOPY_CHAR_I (twochars, '\\', c, string, sindex, string_size); } @@ -7905,15 +11388,12 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin 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 + /* XXX - revisit this */ + if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) && ((quoted & Q_ARITH) == 0)) goto add_character; t_index = ++sindex; - temp = string_extract_double_quoted (string, &sindex, 0); + temp = string_extract_double_quoted (string, &sindex, (word->flags & W_COMPLETE) ? SX_COMPLETE : 0); /* If the quotes surrounded the entire string, then the whole word was quoted. */ @@ -7926,11 +11406,25 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin tword = alloc_word_desc (); tword->word = temp; + if (word->flags & W_ASSIGNARG) + tword->flags |= word->flags & (W_ASSIGNARG|W_ASSIGNRHS); /* affects $@ */ + if (word->flags & W_COMPLETE) + tword->flags |= W_COMPLETE; /* for command substitutions */ + if (word->flags & W_NOCOMSUB) + tword->flags |= W_NOCOMSUB; + if (word->flags & W_NOPROCSUB) + tword->flags |= W_NOPROCSUB; + + if (word->flags & W_ASSIGNRHS) + tword->flags |= W_ASSIGNRHS; + temp = (char *)NULL; - has_dollar_at = 0; + temp_has_dollar_at = 0; /* does this quoted (sub)string include $@? */ /* Need to get W_HASQUOTEDNULL flag through this function. */ - list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL); + /* XXX - preserve Q_ARITH here? */ + list = expand_word_internal (tword, Q_DOUBLE_QUOTES|(quoted&Q_ARITH), 0, &temp_has_dollar_at, (int *)NULL); + has_dollar_at += temp_has_dollar_at; if (list == &expand_word_error || list == &expand_word_fatal) { @@ -7947,34 +11441,44 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin /* "$@" (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) + parameters. Posix interp 888 says that other parts of the + word that expand to quoted nulls result in quoted nulls, so + we can't just throw the entire word away if we have "$@" + anywhere in it. We use had_quoted_null to keep track */ + if (list == 0 && temp_has_dollar_at) /* XXX - was has_dollar_at */ { quoted_dollar_at++; break; } + /* If this list comes back with a quoted null from expansion, + we have either "$x" or "$@" with $1 == ''. In either case, + we need to make sure we add a quoted null argument and + disable the special handling that "$@" gets. */ + if (list && list->word && list->next == 0 && (list->word->flags & W_HASQUOTEDNULL)) + { + if (had_quoted_null && temp_has_dollar_at) + quoted_dollar_at++; + had_quoted_null = 1; /* XXX */ + } + /* 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. */ + multiple words. */ if (list) dequote_list (list); - if (list && list->word && (list->word->flags & W_HASQUOTEDNULL)) - had_quoted_null = 1; - - if (has_dollar_at) + if (temp_has_dollar_at) /* XXX - was has_dollar_at */ { quoted_dollar_at++; if (contains_dollar_at) *contains_dollar_at = 1; if (expanded_something) *expanded_something = 1; + local_expanded = 1; } } else @@ -7982,6 +11486,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin /* What we have is "". This is a minor optimization. */ FREE (temp); list = (WORD_LIST *)NULL; + had_quoted_null = 1; /* note for later */ } /* The code above *might* return a list (consider the case of "$@", @@ -7996,15 +11501,10 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin { 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_dollar_at (list, Q_DOUBLE_QUOTES, 0) : string_list (quote_list (list)); dispose_words (list); goto add_string; @@ -8035,9 +11535,22 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin 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) + had_quoted_null = 1; /* note for later */ + + /* We do not want to add quoted nulls to strings that are only + partially quoted; we can throw them away. The exception to + this is when we are going to be performing word splitting, + since we have to preserve a null argument if the next character + will cause word splitting. */ + if (temp == 0 && quoted_state == PARTIALLY_QUOTED && quoted == 0 && (word->flags & (W_NOSPLIT|W_EXPANDRHS|W_ASSIGNRHS)) == W_EXPANDRHS) + { + c = CTLNUL; + sindex--; + had_quoted_null = 1; + goto add_character; + } + if (temp == 0 && quoted_state == PARTIALLY_QUOTED && (word->flags & (W_NOSPLIT|W_NOSPLIT2))) continue; add_quoted_string: @@ -8054,21 +11567,18 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin /* Add NULL arg. */ c = CTLNUL; sindex--; /* add_character: label increments sindex */ + had_quoted_null = 1; /* note for later */ 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); + temp = string_extract_single_quoted (string, &sindex, 0); /* If the entire STRING was surrounded by single quotes, then the string is wholly quoted. */ @@ -8085,9 +11595,21 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin else remove_quoted_escapes (temp); /* ??? */ + if (temp == 0 && quoted_state == PARTIALLY_QUOTED) + had_quoted_null = 1; /* note for later */ + /* 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)) + partially quoted; such nulls are discarded. See above for the + exception, which is when the string is going to be split. + Posix interp 888/1129 */ + if (temp == 0 && quoted_state == PARTIALLY_QUOTED && quoted == 0 && (word->flags & (W_NOSPLIT|W_EXPANDRHS|W_ASSIGNRHS)) == W_EXPANDRHS) + { + c = CTLNUL; + sindex--; + goto add_character; + } + + if (temp == 0 && (quoted_state == PARTIALLY_QUOTED) && (word->flags & (W_NOSPLIT|W_NOSPLIT2))) continue; /* If we have a quoted null expansion, add a quoted NULL to istring. */ @@ -8102,11 +11624,30 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin /* break; */ + case ' ': + /* If we are in a context where the word is not going to be split, but + we need to account for $@ and $* producing one word for each + positional parameter, add quoted spaces so the spaces in the + expansion of "$@", if any, behave correctly. We still may need to + split if we are expanding the rhs of a word expansion. */ + if (ifs_is_null || split_on_spaces || ((word->flags & (W_NOSPLIT|W_NOSPLIT2|W_ASSIGNRHS)) && (word->flags & W_EXPANDRHS) == 0)) + { + if (string[sindex]) + sindex++; + twochars[0] = CTLESC; + twochars[1] = c; + goto add_twochars; + } + /* FALLTHROUGH */ + default: /* This is the fix for " $@ " */ - add_ifs_character: - if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (isexp == 0 && isifs (c))) +add_ifs_character: + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (isexp == 0 && isifs (c) && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0)) { + if ((quoted&(Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0) + has_quoted_ifs++; +add_quoted_character: if (string[sindex]) /* from old goto dollar_add_string */ sindex++; if (c == 0) @@ -8117,10 +11658,12 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin else { #if HANDLE_MULTIBYTE - if (MB_CUR_MAX > 1) + /* XXX - should make sure that c is actually multibyte, + otherwise we can use the twochars branch */ + if (mb_cur_max > 1) sindex--; - if (MB_CUR_MAX > 1) + if (mb_cur_max > 1) { SADD_MBQCHAR_BODY(temp, string, sindex, string_size); } @@ -8136,7 +11679,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin SADD_MBCHAR (temp, string, sindex, string_size); - add_character: +add_character: RESIZE_MALLOCED_BUFFER (istring, istring_index, 1, istring_size, DEFAULT_ARRAY_SIZE); istring[istring_index++] = c; @@ -8176,11 +11719,17 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin if (*istring == '\0') { +#if 0 if (quoted_dollar_at == 0 && (had_quoted_null || quoted_state == PARTIALLY_QUOTED)) +#else + if (had_quoted_null || (quoted_dollar_at == 0 && quoted_state == PARTIALLY_QUOTED)) +#endif { istring[0] = CTLNUL; istring[1] = '\0'; - tword = make_bare_word (istring); + tword = alloc_word_desc (); + tword->word = istring; + istring = 0; /* avoid later free() */ tword->flags |= W_HASQUOTEDNULL; /* XXX */ list = make_word_list (tword, (WORD_LIST *)NULL); if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) @@ -8189,38 +11738,45 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin /* 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. */ + /* XXX - exception appears to be that quoted null strings result in + null arguments */ 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); + tword = alloc_word_desc (); + tword->word = istring; + if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; + istring = 0; /* avoid later free() */ 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 (word->flags & W_NOBRACE) + tword->flags |= W_NOBRACE; /* XXX */ + if (word->flags & W_ARRAYREF) + tword->flags |= W_ARRAYREF; 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 if (word->flags & W_ASSIGNRHS) + { + list = list_string (istring, "", quoted); + tword = list->word; + if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; + free (list); + free (istring); + istring = 0; /* avoid later free() */ + goto set_word_flags; + } else { char *ifs_chars; @@ -8232,12 +11788,78 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin 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) + with the first character of $IFS, so we split on $IFS. If + SPLIT_ON_SPACES is set, we expanded $* (unquoted) with IFS either + unset or null, and we want to make sure that we split on spaces + regardless of what else has happened to IFS since the expansion, + or we expanded "$@" with IFS null and we need to split the positional + parameters into separate words. */ + if (split_on_spaces) + { + /* If IFS is not set, and the word is not quoted, we want to split + the individual words on $' \t\n'. We rely on previous steps to + quote the portions of the word that should not be split */ + if (ifs_is_set == 0) + list = list_string (istring, " \t\n", 1); /* XXX quoted == 1? */ + else + list = list_string (istring, " ", 1); /* XXX quoted == 1? */ + } + + /* If we have $@ (has_dollar_at != 0) and we are in a context where we + don't want to split the result (W_NOSPLIT2), and we are not quoted, + we have already separated the arguments with the first character of + $IFS. In this case, we want to return a list with a single word + with the separator possibly replaced with a space (it's what other + shells seem to do). + quoted_dollar_at is internal to this function and is set if we are + passed an argument that is unquoted (quoted == 0) but we encounter a + double-quoted $@ while expanding it. */ + else if (has_dollar_at && quoted_dollar_at == 0 && ifs_chars && quoted == 0 && (word->flags & W_NOSPLIT2)) + { + tword = alloc_word_desc (); + /* Only split and rejoin if we have to */ + if (*ifs_chars && *ifs_chars != ' ') + { + /* list_string dequotes CTLESCs in the string it's passed, so we + need it to get the space separation right if space isn't the + first character in IFS (but is present) and to remove the + quoting we added back in param_expand(). */ + list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1); + /* This isn't exactly right in the case where we're expanding + the RHS of an expansion like ${var-$@} where IFS=: (for + example). The W_NOSPLIT2 means we do the separation with :; + the list_string removes the quotes and breaks the string into + a list, and the string_list rejoins it on spaces. When we + return, we expect to be able to split the results, but the + space separation means the right split doesn't happen. */ + tword->word = string_list (list); + } + else + tword->word = istring; + if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; /* XXX */ + if (tword->word != istring) + free (istring); + istring = 0; /* avoid later free() */ + goto set_word_flags; + } + else if (has_dollar_at && ifs_chars) list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1); else { - tword = make_bare_word (istring); + tword = alloc_word_desc (); + if (expanded_something && *expanded_something == 0 && has_quoted_ifs) + tword->word = remove_quoted_ifs (istring); + else + tword->word = istring; + if (had_quoted_null && QUOTED_NULL (istring)) /* should check for more than one */ + tword->flags |= W_HASQUOTEDNULL; /* XXX */ + else if (had_quoted_null) + tword->flags |= W_SAWQUOTEDNULL; /* XXX */ + if (tword->word != istring) + free (istring); + istring = 0; /* avoid later free() */ +set_word_flags: if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || (quoted_state == WHOLLY_QUOTED)) tword->flags |= W_QUOTED; if (word->flags & W_ASSIGNMENT) @@ -8246,10 +11868,10 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin 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 */ + if (word->flags & W_NOBRACE) + tword->flags |= W_NOBRACE; + if (word->flags & W_ARRAYREF) + tword->flags |= W_ARRAYREF; list = make_word_list (tword, (WORD_LIST *)NULL); } } @@ -8310,7 +11932,7 @@ string_quote_removal (string, quoted) break; } tindex = sindex + 1; - temp = string_extract_single_quoted (string, &tindex); + temp = string_extract_single_quoted (string, &tindex, 0); if (temp) { strcpy (r, temp); @@ -8394,6 +12016,9 @@ setifs (v) ifs_var = v; ifs_value = (v && value_cell (v)) ? value_cell (v) : " \t\n"; + ifs_is_set = ifs_var != 0; + ifs_is_null = ifs_is_set && (*ifs_value == 0); + /* Should really merge ifs_cmap with sh_syntaxtab. XXX - doesn't yet handle multibyte chars in IFS */ memset (ifs_cmap, '\0', sizeof (ifs_cmap)); @@ -8406,14 +12031,19 @@ setifs (v) #if defined (HANDLE_MULTIBYTE) if (ifs_value == 0) { - ifs_firstc[0] = '\0'; + ifs_firstc[0] = '\0'; /* XXX - ? */ 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 (locale_utf8locale && UTF8_SINGLEBYTE (*ifs_value)) + ifs_firstc_len = (*ifs_value != 0) ? 1 : 0; + 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]; @@ -8464,10 +12094,30 @@ word_list_split (list) WORD_LIST *list; { WORD_LIST *result, *t, *tresult, *e; + WORD_DESC *w; for (t = list, result = (WORD_LIST *)NULL; t; t = t->next) { tresult = word_split (t->word, ifs_value); + /* POSIX 2.6: "If the complete expansion appropriate for a word results + in an empty field, that empty field shall be deleted from the list + of fields that form the completely expanded command, unless the + original word contained single-quote or double-quote characters." + This is where we handle these words that contain quoted null strings + and other characters that expand to nothing after word splitting. */ + if (tresult == 0 && t->word && (t->word->flags & W_SAWQUOTEDNULL)) /* XXX */ + { + w = alloc_word_desc (); + w->word = (char *)xmalloc (1); + w->word[0] = '\0'; + tresult = make_word_list (w, (WORD_LIST *)NULL); + } +#if defined (ARRAY_VARS) + /* pass W_ARRAYREF through for words that are not split and are + identical to the original word. */ + if (tresult && tresult->next == 0 && t->next == 0 && (t->word->flags & W_ARRAYREF) && STREQ (t->word->word, tresult->word->word)) + tresult->word->flags |= W_ARRAYREF; +#endif if (result == 0) result = e = tresult; else @@ -8495,6 +12145,8 @@ exp_jump_to_top_level (v) /* Cleanup code goes here. */ expand_no_split_dollar_star = 0; /* XXX */ + if (expanding_redir) + undo_partial_redirects (); expanding_redir = 0; assigning_in_environment = 0; @@ -8657,6 +12309,7 @@ glob_expand_word_list (tlist, eflags) register int glob_index; WORD_LIST *glob_list, *output_list, *disposables, *next; WORD_DESC *tword; + int x; output_list = disposables = (WORD_LIST *)NULL; glob_array = (char **)NULL; @@ -8680,7 +12333,7 @@ glob_expand_word_list (tlist, eflags) if ((tlist->word->flags & W_NOGLOB) == 0 && unquoted_glob_pattern_p (tlist->word->word)) { - glob_array = shell_glob_filename (tlist->word->word); + glob_array = shell_glob_filename (tlist->word->word, QGLOB_CTLESC); /* XXX */ /* Handle error cases. I don't think we should report errors like "No such file @@ -8706,7 +12359,6 @@ glob_expand_word_list (tlist, eflags) 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); } @@ -8717,6 +12369,7 @@ glob_expand_word_list (tlist, eflags) } else if (fail_glob_expansion != 0) { + last_command_exit_value = EXECUTION_FAILURE; report_error (_("no match: %s"), tlist->word->word); exp_jump_to_top_level (DISCARD); } @@ -8771,13 +12424,20 @@ brace_expand_word_list (tlist, eflags) { next = tlist->next; + if (tlist->word->flags & W_NOBRACE) + { +/*itrace("brace_expand_word_list: %s: W_NOBRACE", tlist->word->word);*/ + PREPEND_LIST (tlist, output_list); + continue; + } + 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 @@ -8791,14 +12451,18 @@ brace_expand_word_list (tlist, eflags) for (eindex = 0; temp_string = expansions[eindex]; eindex++) { - w = make_word (temp_string); + w = alloc_word_desc (); + w->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; + else + w = make_word_flags (w, temp_string); + output_list = make_word_list (w, output_list); - free (expansions[eindex]); } free (expansions); @@ -8821,44 +12485,324 @@ brace_expand_word_list (tlist, eflags) #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. */ +/* Take WORD, a compound array assignment, and internally run (for example), + 'declare -A w', where W is the variable name portion of WORD. OPTION is + the list of options to supply to `declare'. CMD is the declaration command + we are expanding right now; it's unused currently. */ static int -make_internal_declare (word, option) +make_internal_declare (word, option, cmd) char *word; char *option; + char *cmd; { - int t; + int t, r; WORD_LIST *wl; WORD_DESC *w; w = make_word (word); t = assignment (w->word, 0); - w->word[t] = '\0'; + if (w->word[t] == '=') + { + w->word[t] = '\0'; + if (w->word[t - 1] == '+') /* cut off any append op */ + w->word[t - 1] = '\0'; + } wl = make_word_list (w, (WORD_LIST *)NULL); wl = make_word_list (make_word (option), wl); - return (declare_builtin (wl)); + r = declare_builtin (wl); + + dispose_words (wl); + return r; } + +/* Expand VALUE in NAME[+]=( VALUE ) to a list of words. FLAGS is 1 if NAME + is an associative array. + + If we are processing an indexed array, expand_compound_array_assignment + will expand all the individual words and quote_compound_array_list will + single-quote them. If we are processing an associative array, we use + parse_string_to_word_list to split VALUE into a list of words instead of + faking up a shell variable and calling expand_compound_array_assignment. + expand_and_quote_assoc_word expands and single-quotes each word in VALUE + together so we don't have problems finding the end of the subscript when + quoting it. + + Words in VALUE can be individual words, which are expanded and single-quoted, + or words of the form [IND]=VALUE, which end up as explained below, as + ['expanded-ind']='expanded-value'. */ + +static WORD_LIST * +expand_oneword (value, flags) + char *value; + int flags; +{ + WORD_LIST *l, *nl; + char *t; + int kvpair; + + if (flags == 0) + { + /* Indexed array */ + l = expand_compound_array_assignment ((SHELL_VAR *)NULL, value, flags); + /* Now we quote the results of the expansion above to prevent double + expansion. */ + quote_compound_array_list (l, flags); + return l; + } + else + { + /* Associative array */ + l = parse_string_to_word_list (value, 1, "array assign"); +#if ASSOC_KVPAIR_ASSIGNMENT + kvpair = kvpair_assignment_p (l); +#endif + + /* For associative arrays, with their arbitrary subscripts, we have to + expand and quote in one step so we don't have to search for the + closing right bracket more than once. */ + for (nl = l; nl; nl = nl->next) + { +#if ASSOC_KVPAIR_ASSIGNMENT + if (kvpair) + /* keys and values undergo the same set of expansions */ + t = expand_and_quote_kvpair_word (nl->word->word); + else #endif + if ((nl->word->flags & W_ASSIGNMENT) == 0) + t = sh_single_quote (nl->word->word ? nl->word->word : ""); + else + t = expand_and_quote_assoc_word (nl->word->word, flags); + free (nl->word->word); + nl->word->word = t; + } + return l; + } +} + +/* Expand a single compound assignment argument to a declaration builtin. + This word takes the form NAME[+]=( VALUE ). The NAME[+]= is passed through + unchanged. The VALUE is expanded and each word in the result is single- + quoted. Words of the form [key]=value end up as + ['expanded-key']='expanded-value'. Associative arrays have special + handling, see expand_oneword() above. The return value is + NAME[+]=( expanded-and-quoted-VALUE ). */ +static void +expand_compound_assignment_word (tlist, flags) + WORD_LIST *tlist; + int flags; +{ + WORD_LIST *l; + int wlen, oind, t; + char *value, *temp; + +/*itrace("expand_compound_assignment_word: original word = -%s-", tlist->word->word);*/ + t = assignment (tlist->word->word, 0); + + /* value doesn't have the open and close parens */ + oind = 1; + value = extract_array_assignment_list (tlist->word->word + t + 1, &oind); + /* This performs one round of expansion on the index/key and value and + single-quotes each word in the result. */ + l = expand_oneword (value, flags); + free (value); + + value = string_list (l); + dispose_words (l); + + wlen = STRLEN (value); + + /* Now, let's rebuild the string */ + temp = xmalloc (t + 3 + wlen + 1); /* name[+]=(value) */ + memcpy (temp, tlist->word->word, ++t); + temp[t++] = '('; + if (value) + memcpy (temp + t, value, wlen); + t += wlen; + temp[t++] = ')'; + temp[t] = '\0'; +/*itrace("expand_compound_assignment_word: reconstructed word = -%s-", temp);*/ + + free (tlist->word->word); + tlist->word->word = temp; + + free (value); +} + +/* Expand and process an argument to a declaration command. We have already + set flags in TLIST->word->flags depending on the declaration command + (declare, local, etc.) and the options supplied to it (-a, -A, etc.). + TLIST->word->word is of the form NAME[+]=( VALUE ). + + This does several things, all using pieces of other functions to get the + evaluation sequence right. It's called for compound array assignments with + the W_ASSIGNMENT flag set (basically, valid identifier names on the lhs). + It parses out which flags need to be set for declare to create the variable + correctly, then calls declare internally (make_internal_declare) to make + sure the variable exists with the correct attributes. Before the variable + is created, it calls expand_compound_assignment_word to expand VALUE to a + list of words, appropriately quoted for further evaluation. This preserves + the semantics of word-expansion-before-calling-builtins. Finally, it calls + do_word_assignment to perform the expansion and assignment with the same + expansion semantics as a standalone assignment statement (no word splitting, + etc.) even though the word is single-quoted so all that needs to happen is + quote removal. */ +static WORD_LIST * +expand_declaration_argument (tlist, wcmd) + WORD_LIST *tlist, *wcmd; +{ + char opts[16], omap[128]; + int t, opti, oind, skip, inheriting; + WORD_LIST *l; + + inheriting = localvar_inherit; + opti = 0; + if (tlist->word->flags & (W_ASSIGNASSOC|W_ASSNGLOBAL|W_CHKLOCAL|W_ASSIGNARRAY)) + opts[opti++] = '-'; + + if ((tlist->word->flags & (W_ASSIGNASSOC|W_ASSNGLOBAL)) == (W_ASSIGNASSOC|W_ASSNGLOBAL)) + { + opts[opti++] = 'g'; + opts[opti++] = 'A'; + } + else if (tlist->word->flags & W_ASSIGNASSOC) + { + opts[opti++] = 'A'; + } + else if ((tlist->word->flags & (W_ASSIGNARRAY|W_ASSNGLOBAL)) == (W_ASSIGNARRAY|W_ASSNGLOBAL)) + { + opts[opti++] = 'g'; + opts[opti++] = 'a'; + } + else if (tlist->word->flags & W_ASSIGNARRAY) + { + opts[opti++] = 'a'; + } + else if (tlist->word->flags & W_ASSNGLOBAL) + opts[opti++] = 'g'; + + if (tlist->word->flags & W_CHKLOCAL) + opts[opti++] = 'G'; + + /* If we have special handling note the integer attribute and others + that transform the value upon assignment. What we do is take all + of the option arguments and scan through them looking for options + that cause such transformations, and add them to the `opts' array. */ + + memset (omap, '\0', sizeof (omap)); + for (l = wcmd->next; l != tlist; l = l->next) + { + int optchar; + + if (l->word->word[0] != '-' && l->word->word[0] != '+') + break; /* non-option argument */ + if (l->word->word[0] == '-' && l->word->word[1] == '-' && l->word->word[2] == 0) + break; /* -- signals end of options */ + optchar = l->word->word[0]; + for (oind = 1; l->word->word[oind]; oind++) + switch (l->word->word[oind]) + { + case 'I': + inheriting = 1; + case 'i': + case 'l': + case 'u': + case 'c': + omap[l->word->word[oind]] = 1; + if (opti == 0) + opts[opti++] = optchar; + break; + default: + break; + } + } + + for (oind = 0; oind < sizeof (omap); oind++) + if (omap[oind]) + opts[opti++] = oind; + + /* If there are no -a/-A options, but we have a compound assignment, + we have a choice: we can set opts[0]='-', opts[1]='a', since the + default is to create an indexed array, and call + make_internal_declare with that, or we can just skip the -a and let + declare_builtin deal with it. Once we're here, we're better set + up for the latter, since we don't want to deal with looking up + any existing variable here -- better to let declare_builtin do it. + We need the variable created, though, especially if it's local, so + we get the scoping right before we call do_word_assignment. + To ensure that make_local_declare gets called, we add `--' if there + aren't any options. */ + if ((tlist->word->flags & (W_ASSIGNASSOC|W_ASSIGNARRAY)) == 0) + { + if (opti == 0) + { + opts[opti++] = '-'; + opts[opti++] = '-'; + } + } + opts[opti] = '\0'; + + /* This isn't perfect, but it's a start. Improvements later. We expand + tlist->word->word and single-quote the results to avoid multiple + expansions by, say, do_assignment_internal(). We have to weigh the + cost of reconstructing the compound assignment string with its single + quoting and letting the declare builtin handle it. The single quotes + will prevent any unwanted additional expansion or word splitting. */ + expand_compound_assignment_word (tlist, (tlist->word->flags & W_ASSIGNASSOC) ? 1 : 0); + + skip = 0; + if (opti > 0) + { + t = make_internal_declare (tlist->word->word, opts, wcmd ? wcmd->word->word : (char *)0); + if (t != EXECUTION_SUCCESS) + { + last_command_exit_value = t; + if (tlist->word->flags & W_FORCELOCAL) /* non-fatal error */ + skip = 1; + else + exp_jump_to_top_level (DISCARD); + } + } + + if (skip == 0) + { + t = do_word_assignment (tlist->word, 0); + 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'; + if (tlist->word->word[t - 1] == '+') + tlist->word->word[t - 1] = '\0'; /* cut off append op */ + tlist->word->flags &= ~(W_ASSIGNMENT|W_NOSPLIT|W_COMPASSIGN|W_ASSIGNARG|W_ASSIGNASSOC|W_ASSIGNARRAY); + + return (tlist); +} +#endif /* ARRAY_VARS */ static WORD_LIST * shell_expand_word_list (tlist, eflags) WORD_LIST *tlist; int eflags; { - WORD_LIST *expanded, *orig_list, *new_list, *next, *temp_list; + WORD_LIST *expanded, *orig_list, *new_list, *next, *temp_list, *wcmd; 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; + wcmd = new_list = (WORD_LIST *)NULL; + for (orig_list = tlist; tlist; tlist = next) { - temp_string = tlist->word->word; - + if (wcmd == 0 && (tlist->word->flags & W_ASSNBLTIN)) + wcmd = tlist; + next = tlist->next; #if defined (ARRAY_VARS) @@ -8869,24 +12813,7 @@ shell_expand_word_list (tlist, eflags) 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); - } + expand_declaration_argument (tlist, wcmd); #endif expanded_something = 0; @@ -8940,6 +12867,87 @@ shell_expand_word_list (tlist, eflags) return (new_list); } +/* Perform assignment statements optionally preceding a command name COMMAND. + If COMMAND == NULL, is_nullcmd usually == 1. Follow the POSIX rules for + variable assignment errors. */ +static int +do_assignment_statements (varlist, command, is_nullcmd) + WORD_LIST *varlist; + char *command; + int is_nullcmd; +{ + WORD_LIST *temp_list; + char *savecmd; + sh_wassign_func_t *assign_func; + int is_special_builtin, is_builtin_or_func, tint; + + /* If the remainder of the words expand to nothing, Posix.2 requires + that the variable and environment assignments affect the shell's + environment (do_word_assignment). */ + assign_func = is_nullcmd ? do_word_assignment : assign_in_env; + tempenv_assign_error = 0; + + is_builtin_or_func = command && (find_shell_builtin (command) || find_function (command)); + /* Posix says that special builtins exit if a variable assignment error + occurs in an assignment preceding it. (XXX - this is old -- current Posix + says that any variable assignment error causes a non-interactive shell + to exit. See the STRICT_POSIX checks below. */ + is_special_builtin = posixly_correct && command && find_special_builtin (command); + + savecmd = this_command_name; + for (temp_list = varlist; temp_list; temp_list = temp_list->next) + { + this_command_name = (char *)NULL; + assigning_in_environment = is_nullcmd == 0; + tint = (*assign_func) (temp_list->word, is_builtin_or_func); + assigning_in_environment = 0; + this_command_name = savecmd; + + /* Variable assignment errors in non-interactive shells running + in posix mode cause the shell to exit. */ + if (tint == 0) + { + if (is_nullcmd) /* assignment statement */ + { + last_command_exit_value = EXECUTION_FAILURE; +#if defined (STRICT_POSIX) + if (posixly_correct && interactive_shell == 0) +#else + if (posixly_correct && interactive_shell == 0 && executing_command_builtin == 0) +#endif + exp_jump_to_top_level (FORCE_EOF); + else + exp_jump_to_top_level (DISCARD); + } + /* In posix mode, assignment errors in the temporary environment + cause a non-interactive shell executing a special builtin to + exit and a non-interactive shell to otherwise jump back to the + top level. This is what POSIX says to do for variable assignment + errors, and POSIX says errors in assigning to the temporary + environment are treated as variable assignment errors. + (XXX - this is not what current POSIX says - look at the + STRICT_POSIX defines. */ + else if (posixly_correct) + { + last_command_exit_value = EXECUTION_FAILURE; +#if defined (STRICT_POSIX) + exp_jump_to_top_level ((interactive_shell == 0) ? FORCE_EOF : DISCARD); +#else + if (interactive_shell == 0 && is_special_builtin) + exp_jump_to_top_level (FORCE_EOF); + else if (interactive_shell == 0) + exp_jump_to_top_level (DISCARD); /* XXX - maybe change later */ + else + exp_jump_to_top_level (DISCARD); +#endif + } + else + tempenv_assign_error++; + } + } + return (tempenv_assign_error); +} + /* 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 @@ -8950,15 +12958,17 @@ shell_expand_word_list (tlist, eflags) 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. */ + Words with the W_NOGLOB bit set do not undergo pathname expansion; words + with W_NOBRACE set do not undergo brace expansion (see + brace_expand_word_list above). */ static WORD_LIST * expand_word_list_internal (list, eflags) WORD_LIST *list; int eflags; { WORD_LIST *new_list, *temp_list; - int tint; + tempenv_assign_error = 0; if (list == 0) return ((WORD_LIST *)NULL); @@ -8969,27 +12979,11 @@ expand_word_list_internal (list, eflags) 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; - } + do_assignment_statements (subst_assign_varlist, (char *)NULL, 1); + + dispose_words (subst_assign_varlist); + subst_assign_varlist = (WORD_LIST *)NULL; + return ((WORD_LIST *)NULL); } } @@ -9023,48 +13017,11 @@ expand_word_list_internal (list, eflags) 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++; - } - } + do_assignment_statements (subst_assign_varlist, (new_list && new_list->word) ? new_list->word->word : (char *)NULL, new_list == 0); 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 index 7628939..28cc920 100644 --- a/subst.h +++ b/subst.h @@ -1,6 +1,6 @@ /* subst.h -- Names of externally visible functions in subst.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,258 +30,310 @@ 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 + by double quotes. Q_DOLBRACE means we are expanding a ${...} word, so + backslashes should also escape { and } and be removed. */ +#define Q_DOUBLE_QUOTES 0x001 +#define Q_HERE_DOCUMENT 0x002 +#define Q_KEEP_BACKSLASH 0x004 +#define Q_PATQUOTE 0x008 +#define Q_QUOTED 0x010 +#define Q_ADDEDQUOTES 0x020 +#define Q_QUOTEDNULL 0x040 +#define Q_DOLBRACE 0x080 +#define Q_ARITH 0x100 /* expanding string for arithmetic evaluation */ +#define Q_ARRAYSUB 0x200 /* expanding indexed array subscript */ /* Flag values controlling how assignment statements are treated. */ -#define ASS_APPEND 0x01 -#define ASS_MKLOCAL 0x02 -#define ASS_MKASSOC 0x04 +#define ASS_APPEND 0x0001 +#define ASS_MKLOCAL 0x0002 +#define ASS_MKASSOC 0x0004 +#define ASS_MKGLOBAL 0x0008 /* force global assignment */ +#define ASS_NAMEREF 0x0010 /* assigning to nameref variable */ +#define ASS_FORCE 0x0020 /* force assignment even to readonly variable */ +#define ASS_CHKLOCAL 0x0040 /* check local variable before assignment */ +#define ASS_NOEXPAND 0x0080 /* don't expand associative array subscripts */ +#define ASS_NOEVAL 0x0100 /* don't evaluate value as expression */ +#define ASS_NOLONGJMP 0x0200 /* don't longjmp on fatal assignment error */ +#define ASS_NOINVIS 0x0400 /* don't resolve local invisible variables */ +#define ASS_ALLOWALLSUB 0x0800 /* allow * and @ as associative array keys */ +#define ASS_ONEWORD 0x1000 /* don't check array subscripts, assume higher level has done that */ /* 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) */ +#define SX_NOALLOC 0x0001 /* just skip; don't return substring */ +#define SX_VARNAME 0x0002 /* variable name; for string_extract () */ +#define SX_REQMATCH 0x0004 /* closing/matching delimiter required */ +#define SX_COMMAND 0x0008 /* extracting a shell script/command */ +#define SX_NOCTLESC 0x0010 /* don't honor CTLESC quoting */ +#define SX_NOESCCTLNUL 0x0020 /* don't let CTLESC quote CTLNUL */ +#define SX_NOLONGJMP 0x0040 /* don't longjmp on fatal error */ +#define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */ +#define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */ +#define SX_WORD 0x0200 /* extracting word in ${param op word} */ +#define SX_COMPLETE 0x0400 /* extracting word for completion */ +#define SX_STRIPDQ 0x0800 /* strip double quotes when extracting double-quoted string */ +#define SX_NOERROR 0x1000 /* don't print parser error messages */ /* Remove backslashes which are quoting backquotes from STRING. Modifies STRING, and returns a pointer to it. */ -extern char * de_backslash __P((char *)); +extern char * de_backslash PARAMS((char *)); /* Replace instances of \! in a string with !. */ -extern void unquote_bang __P((char *)); +extern void unquote_bang PARAMS((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)); +extern char *extract_command_subst PARAMS((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 *)); +extern char *extract_arithmetic_subst PARAMS((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 *)); +extern char *extract_process_subst PARAMS((char *, char *, int *, int)); #endif /* PROCESS_SUBSTITUTION */ /* Extract the name of the variable to bind to from the assignment string. */ -extern char *assignment_name __P((char *)); +extern char *assignment_name PARAMS((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 *)); +extern char *string_list_internal PARAMS((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 *)); +extern char *string_list PARAMS((WORD_LIST *)); /* Turn $* into a single string, obeying POSIX rules. */ -extern char *string_list_dollar_star __P((WORD_LIST *)); +extern char *string_list_dollar_star PARAMS((WORD_LIST *, int, int)); /* Expand $@ into a single string, obeying POSIX rules. */ -extern char *string_list_dollar_at __P((WORD_LIST *, int)); +extern char *string_list_dollar_at PARAMS((WORD_LIST *, int, int)); -/* Turn the positional paramters into a string, understanding quoting and +/* Turn the positional parameters 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)); +extern char *string_list_pos_params PARAMS((int, WORD_LIST *, int, int)); /* Perform quoted null character removal on each element of LIST. This modifies LIST. */ -extern void word_list_remove_quoted_nulls __P((WORD_LIST *)); +extern void word_list_remove_quoted_nulls PARAMS((WORD_LIST *)); /* This performs word splitting and quoted null character removal on STRING. */ -extern WORD_LIST *list_string __P((char *, char *, int)); +extern WORD_LIST *list_string PARAMS((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)); +extern char *ifs_firstchar PARAMS((int *)); +extern char *get_word_from_string PARAMS((char **, char *, char **)); +extern char *strip_trailing_ifs_whitespace PARAMS((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 *)); +extern int do_assignment PARAMS((char *)); +extern int do_assignment_no_expand PARAMS((char *)); +extern int do_word_assignment PARAMS((WORD_DESC *, int)); /* 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 *)); +extern char *sub_append_string PARAMS((char *, char *, size_t *, size_t *)); /* 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 *)); +extern char *sub_append_number PARAMS((intmax_t, char *, int *, int *)); /* Return the word list that corresponds to `$*'. */ -extern WORD_LIST *list_rest_of_args __P((void)); +extern WORD_LIST *list_rest_of_args PARAMS((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)); +extern char *string_rest_of_args PARAMS((int)); /* 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)); +extern WORD_LIST *expand_string_unsplit PARAMS((char *, int)); /* Expand the rhs of an assignment statement. */ -extern WORD_LIST *expand_string_assignment __P((char *, int)); +extern WORD_LIST *expand_string_assignment PARAMS((char *, int)); /* Expand a prompt string. */ -extern WORD_LIST *expand_prompt_string __P((char *, int, int)); +extern WORD_LIST *expand_prompt_string PARAMS((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)); +extern WORD_LIST *expand_string PARAMS((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)); +extern char *expand_string_to_string PARAMS((char *, int)); +extern char *expand_string_unsplit_to_string PARAMS((char *, int)); +extern char *expand_assignment_string_to_string PARAMS((char *, int)); +extern char *expand_subscript_string PARAMS((char *, int)); /* Expand an arithmetic expression string */ -extern char *expand_arith_string __P((char *, int)); +extern char *expand_arith_string PARAMS((char *, int)); + +/* Expand $'...' and $"..." in a string for code paths that do not. */ +extern char *expand_string_dollar_quote PARAMS((char *, int)); /* De-quote quoted characters in STRING. */ -extern char *dequote_string __P((char *)); +extern char *dequote_string PARAMS((char *)); /* De-quote CTLESC-escaped CTLESC or CTLNUL characters in STRING. */ -extern char *dequote_escapes __P((char *)); +extern char *dequote_escapes PARAMS((const char *)); + +extern WORD_DESC *dequote_word PARAMS((WORD_DESC *)); /* De-quote quoted characters in each word in LIST. */ -extern WORD_LIST *dequote_list __P((WORD_LIST *)); +extern WORD_LIST *dequote_list PARAMS((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)); +extern WORD_LIST *expand_word PARAMS((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)); +extern WORD_LIST *expand_word_unsplit PARAMS((WORD_DESC *, int)); +extern WORD_LIST *expand_word_leave_quoted PARAMS((WORD_DESC *, int)); /* Return the value of a positional parameter. This handles values > 10. */ -extern char *get_dollar_var_value __P((intmax_t)); +extern char *get_dollar_var_value PARAMS((intmax_t)); /* Quote a string to protect it from word splitting. */ -extern char *quote_string __P((char *)); +extern char *quote_string PARAMS((char *)); -/* Quote escape characters (characters special to interals of expansion) +/* Quote escape characters (characters special to internals of expansion) in a string. */ -extern char *quote_escapes __P((char *)); +extern char *quote_escapes PARAMS((const char *)); /* And remove such quoted special characters. */ -extern char *remove_quoted_escapes __P((char *)); +extern char *remove_quoted_escapes PARAMS((char *)); /* Remove CTLNUL characters from STRING unless they are quoted with CTLESC. */ -extern char *remove_quoted_nulls __P((char *)); +extern char *remove_quoted_nulls PARAMS((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)); +extern char *string_quote_removal PARAMS((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)); +extern WORD_DESC *word_quote_removal PARAMS((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)); +extern WORD_LIST *word_list_quote_removal PARAMS((WORD_LIST *, int)); /* Called when IFS is changed to maintain some private variables. */ -extern void setifs __P((SHELL_VAR *)); +extern void setifs PARAMS((SHELL_VAR *)); /* Return the value of $IFS, or " \t\n" if IFS is unset. */ -extern char *getifs __P((void)); +extern char *getifs PARAMS((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 *)); +extern WORD_LIST *word_split PARAMS((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 *)); +extern WORD_LIST *expand_words PARAMS((WORD_LIST *)); /* Same as expand_words (), but doesn't hack variable or environment variables. */ -extern WORD_LIST *expand_words_no_vars __P((WORD_LIST *)); +extern WORD_LIST *expand_words_no_vars PARAMS((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_LIST *expand_words_shellexp PARAMS((WORD_LIST *)); + +extern WORD_DESC *command_substitute PARAMS((char *, int, int)); +extern char *pat_subst PARAMS((char *, char *, char *, int)); + +#if defined (PROCESS_SUBSTITUTION) +extern int fifos_pending PARAMS((void)); +extern int num_fifos PARAMS((void)); +extern void unlink_fifo_list PARAMS((void)); +extern void unlink_all_fifos PARAMS((void)); +extern void unlink_fifo PARAMS((int)); + +extern void *copy_fifo_list PARAMS((int *)); +extern void close_new_fifos PARAMS((void *, int)); -extern WORD_DESC *command_substitute __P((char *, int)); -extern char *pat_subst __P((char *, char *, char *, int)); +extern void clear_fifo_list PARAMS((void)); -extern int fifos_pending __P((void)); -extern void unlink_fifo_list __P((void)); +extern int find_procsub_child PARAMS((pid_t)); +extern void set_procsub_status PARAMS((int, pid_t, int)); -extern WORD_LIST *list_string_with_quotes __P((char *)); +extern void wait_procsubs PARAMS((void)); +extern void reap_procsubs PARAMS((void)); +#endif + +extern WORD_LIST *list_string_with_quotes PARAMS((char *)); #if defined (ARRAY_VARS) -extern char *extract_array_assignment_list __P((char *, int *)); +extern char *extract_array_assignment_list PARAMS((char *, int *)); #endif #if defined (COND_COMMAND) -extern char *remove_backslashes __P((char *)); -extern char *cond_expand_word __P((WORD_DESC *, int)); +extern char *remove_backslashes PARAMS((char *)); +extern char *cond_expand_word PARAMS((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)); +#define SD_NOJMP 0x001 /* don't longjmp on fatal error. */ +#define SD_INVERT 0x002 /* look for chars NOT in passed set */ +#define SD_NOQUOTEDELIM 0x004 /* don't let single or double quotes act as delimiters */ +#define SD_NOSKIPCMD 0x008 /* don't skip over $(, <(, or >( command/process substitution; parse them as commands */ +#define SD_EXTGLOB 0x010 /* skip over extended globbing patterns if appropriate */ +#define SD_IGNOREQUOTE 0x020 /* single and double quotes are not special */ +#define SD_GLOB 0x040 /* skip over glob patterns like bracket expressions */ +#define SD_NOPROCSUB 0x080 /* don't parse process substitutions as commands */ +#define SD_COMPLETE 0x100 /* skip_to_delim during completion */ +#define SD_HISTEXP 0x200 /* skip_to_delim during history expansion */ +#define SD_ARITHEXP 0x400 /* skip_to_delim during arithmetic expansion */ +#define SD_NOERROR 0x800 /* don't print error messages */ + +extern int skip_to_delim PARAMS((char *, int, char *, int)); + +#if defined (BANG_HISTORY) +extern int skip_to_histexp PARAMS((char *, int, char *, int)); +#endif #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 *)); +extern int char_is_quoted PARAMS((char *, int)); +extern int unclosed_pair PARAMS((char *, int, char *)); +extern WORD_LIST *split_at_delims PARAMS((char *, int, const 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[]; +extern int ifs_is_set, ifs_is_null; #if defined (HANDLE_MULTIBYTE) extern unsigned char ifs_firstc[]; @@ -290,6 +342,12 @@ extern size_t ifs_firstc_len; extern unsigned char ifs_firstc; #endif +extern int assigning_in_environment; +extern int expanding_redir; +extern int inherit_errexit; + +extern pid_t last_command_subst_pid; + /* Evaluates to 1 if C is a character in $IFS. */ #define isifs(c) (ifs_cmap[(unsigned char)(c)] != 0) @@ -299,4 +357,6 @@ extern unsigned char ifs_firstc; /* Is the first character of STRING a quoted NULL character? */ #define QUOTED_NULL(string) ((string)[0] == CTLNUL && (string)[1] == '\0') +extern void invalidate_cached_quoted_dollar_at PARAMS((void)); + #endif /* !_SUBST_H_ */ diff --git a/support/Makefile.in b/support/Makefile.in index 1ff3f1a..f7de7ac 100644 --- a/support/Makefile.in +++ b/support/Makefile.in @@ -4,11 +4,12 @@ # documentation support: man2html # testing support: printenv recho zecho xcase # -# bashbug lives here but is created by the top-level makefile +# bashbug.sh lives here (created by configure), but bashbug is created by +# the top-level makefile # # Currently only man2html is built # -# Copyright (C) 1998-2009 Free Software Foundation, Inc. +# Copyright (C) 1998-2021 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 @@ -28,7 +29,7 @@ # topdir = @top_srcdir@ srcdir = @srcdir@ -VPATH = .:@srcdir@ +VPATH = @srcdir@ BUILD_DIR = @BUILD_DIR@ RM = rm -f @@ -45,9 +46,11 @@ PROFILE_FLAGS = @PROFILE_FLAGS@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +BASE_CFLAGS_FOR_BUILD = @BASE_CFLAGS_FOR_BUILD@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ +STYLE_CFLAGS = @STYLE_CFLAGS@ DEFS = @DEFS@ LOCAL_DEFS = @LOCAL_DEFS@ @@ -55,13 +58,13 @@ LIBS = @LIBS@ LIBS_FOR_BUILD = ${LIBS} # XXX LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ -LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) +LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) 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) + ${INCLUDES} $(STYLE_CFLAGS) $(LOCAL_CFLAGS) CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) @@ -76,12 +79,12 @@ OBJ1 = man2html.o all: man2html$(EXEEXT) man2html$(EXEEXT): $(OBJ1) - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD} + $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD} clean: - $(RM) man2html$(EXEEXT) + $(RM) man2html$(EXEEXT) $(OBJ1) distclean maintainer-clean mostlyclean: clean - $(RM) $(OBJ1) + $(RM) bash.pc bashbug.sh man2html.o: man2html.c diff --git a/support/bash.pc.in b/support/bash.pc.in new file mode 100644 index 0000000..6009659 --- /dev/null +++ b/support/bash.pc.in @@ -0,0 +1,28 @@ +# bash.pc.in + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +loadablesdir=@loadablesdir@ +headersdir=${includedir}/@PACKAGE_NAME@ + +LOCAL_CFLAGS = @LOCAL_CFLAGS@ +LOCAL_DEFS = @LOCAL_DEFS@ +CCFLAGS = ${LOCAL_DEFS} ${LOCAL_CFLAGS} + +CC = @CC@ +SHOBJ_CC = @SHOBJ_CC@ +SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ +SHOBJ_LD = @SHOBJ_LD@ +SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ +SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ +SHOBJ_LIBS = @SHOBJ_LIBS@ + +Name: @PACKAGE_NAME@ +Description: Bash headers for bash loadable builtins +Version: @PACKAGE_VERSION@ +Url: @PACKAGE_URL@ +Libs: ${SHOBJ_LIBS} +Cflags: ${SHOBJ_CFLAGS} ${CCFLAGS} -I${headersdir} -I${headersdir}/builtins -I${headersdir}/include diff --git a/support/bashbug.sh b/support/bashbug.sh index 7b36d40..940f706 100644 --- a/support/bashbug.sh +++ b/support/bashbug.sh @@ -7,7 +7,7 @@ # 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. +# Copyright (C) 1996-2021 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 @@ -43,7 +43,7 @@ export PATH #Securely create a temporary directory for the temporary files TEMPDIR=$TMPDIR/bbug.$$ -(umask 077 && mkdir $TEMPDIR) || { +(umask 077 && mkdir "$TEMPDIR") || { echo "$0: could not create temporary directory" >&2 exit 1 } @@ -62,7 +62,7 @@ while [ $# -gt 0 ]; do --version) shift ; do_version=y ;; --) shift ; break ;; -*) echo "bashbug: ${1}: invalid option" >&2 - echo "$USAGE" >& 2 + echo "$USAGE" >&2 exit 2 ;; *) break ;; esac @@ -132,6 +132,8 @@ if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then DEFEDITOR=emacs elif [ -x /usr/bin/xemacs ]; then DEFEDITOR=xemacs + elif [ -x /usr/bin/nano ]; then + DEFEDITOR=nano elif [ -x /usr/contrib/bin/jove ]; then DEFEDITOR=jove elif [ -x /usr/local/bin/jove ]; then @@ -265,7 +267,8 @@ esac ${RMAIL} $SMARGS < "$TEMPFILE1" || { cat "$TEMPFILE1" >> $HOME/dead.bashbug - echo "$0: mail failed: report saved in $HOME/dead.bashbug" >&2 + echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2 + echo "$0: please send it manually to ${BUGADDR}" >&2 } exit 0 diff --git a/support/bashbug.sh.in b/support/bashbug.sh.in new file mode 100644 index 0000000..77e14e5 --- /dev/null +++ b/support/bashbug.sh.in @@ -0,0 +1,278 @@ +#!/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.ramey@case.edu and, optionally, to bash-testers@cwru.edu. +# Other versions send mail to bug-bash@gnu.org. +# +# Copyright (C) 1996-2021 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 . + +# +# configuration section: +# these variables are filled in by the make target in Makefile +# +MACHINE="@host_cpu@" +OS="@host_os@" +CC="@CC@" +CFLAGS="@CFLAGS@" +RELEASE="@BASHVERS@" +PATCHLEVEL="!PATCHLEVEL!" +RELSTATUS="@RELSTATUS@" +MACHTYPE="@host@" + +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.ramey@case.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/bin/vim; then + DEFEDITOR=vim + elif [ -x /usr/bin/gvim; then + DEFEDITOR=gvim + elif [ -x /usr/bin/nano ]; then + DEFEDITOR=nano + 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" <> $HOME/dead.bashbug + echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2 + echo "$0: please send it manually to ${BUGADDR}" >&2 +} + +exit 0 diff --git a/support/bashversion.c b/support/bashversion.c index 59c2321..ad02d46 100644 --- a/support/bashversion.c +++ b/support/bashversion.c @@ -1,6 +1,6 @@ /* bashversion.c -- Display bash version information. */ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001-2021 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -47,8 +47,8 @@ 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)); +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((int)); char *shell_name = "bash"; char *progname; diff --git a/support/config.guess b/support/config.guess index 994d98a..7f76b62 100644 --- a/support/config.guess +++ b/support/config.guess @@ -1,14 +1,14 @@ #! /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. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2008-03-12' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' # 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 +# 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 @@ -17,26 +17,30 @@ timestamp='2008-03-12' # 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. +# along with this program; if not, see . # # 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 . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # -# 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. +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# Please send patches to . + + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -45,7 +49,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -56,8 +60,7 @@ 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. +Copyright 1992-2022 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." @@ -91,7 +94,8 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 +# Just in case it came from the environment. +GUESS= # 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 @@ -103,48 +107,93 @@ trap 'exit 1' 1 2 15 # 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= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { 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" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + 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 +} # 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 +if test -f /.attbin/uname ; 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_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case $UNAME_SYSTEM in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif + EOF + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac + # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +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*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -153,24 +202,34 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # # 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 + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; 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 ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-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 + # to ELF recently (or will in the future) and ABI. + case $UNAME_MACHINE_ARCH in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -180,7 +239,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd + ;; + esac + # Determine ABI tags. + case $UNAME_MACHINE_ARCH in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -188,42 +254,74 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 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 + case $UNAME_VERSION in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; 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 ;; + GUESS=$machine-${os}${release}${abi-} + ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; + *:MidnightBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; + *:Sortix:*:*) + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; + *:Redox:*:*) + GUESS=$UNAME_MACHINE-unknown-redox + ;; + mips:OSF1:*.*) + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 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}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -231,141 +329,158 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 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 + case $ALPHA_CPU_TYPE in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + 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 ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; 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 ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; 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 ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; + s390x:SunOS:*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; 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 ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + 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 ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; 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 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case `/bin/arch` in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # 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 @@ -375,44 +490,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 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 ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -421,95 +536,96 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + 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); + 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); + 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` && + $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 ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux${UNAME_RELEASE} + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux${UNAME_RELEASE} + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????: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 ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *: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 + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -520,115 +636,116 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; - *:AIX:*:[456]) + ;; + *:AIX:*:[4567]) 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 + 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` + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=rs6000-ibm-aix + ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + GUESS=romp-ibm-bsd4.4 + ;; 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 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 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 ;; + 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 + if test -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 + 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 - #include - - 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); - } + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + 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` + (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" ] + if test "$HP_ARCH" = hppa2.0w then - eval $set_cc_for_build + 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 @@ -639,23 +756,23 @@ EOF # $ 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 + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -680,411 +797,429 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $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 ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + 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_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; 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 ;; + 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/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 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 ;; + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case $UNAME_PROCESSOR in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; + *:MINGW64*:*) + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; + *:MSYS*:*) + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; + *:Interix*:*) + case $UNAME_MACHINE in x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; + authenticamd | genuineintel | EM64T) + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; 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 ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *: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 ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; + aarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` 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 -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) - eval $set_cc_for_build + 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 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + else + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + e2k:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + hexagon:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:Linux:*:*) + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + k1om:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 #else - CPU= + LIBCABI=${LIBC} #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 ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #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 ;; + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + openrisc*:Linux:*:*) + GUESS=or1k-unknown-linux-$LIBC + ;; + or32:Linux:*:* | or1k*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + padre:Linux:*:*) + GUESS=sparc-unknown-linux-$LIBC + ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + GUESS=hppa64-unknown-linux-$LIBC + ;; 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 ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; + ;; + ppc64:Linux:*:*) + GUESS=powerpc64-unknown-linux-$LIBC + ;; + ppc:Linux:*:*) + GUESS=powerpc-unknown-linux-$LIBC + ;; + ppc64le:Linux:*:*) + GUESS=powerpc64le-unknown-linux-$LIBC + ;; + ppcle:Linux:*:*) + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + tile*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI=${LIBC}x32 + fi + fi + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; 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 - #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; } + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; 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 ;; + GUESS=i386-sequent-sysv4 + ;; 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, + # 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 ;; + # Use sysv4.2uw... so that sysv4* matches it. + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; 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 ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; 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 ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; 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$//'` + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; + i*86:*: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} + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # 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 ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /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 @@ -1094,40 +1229,43 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo ${UNAME_MACHINE}-pc-sysv32 + GUESS=$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 ;; + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; 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 + GUESS=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 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; 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) @@ -1135,208 +1273,295 @@ EOF 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; } + && { 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; } ;; + && { 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; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + 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; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; 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 ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv${UNAME_RELEASE} + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=i586-pc-haiku + ;; + x86_64:Haiku:*:*) + GUESS=x86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; + SX-ACE:SUPER-UX:*:*) + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *: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 ;; + GUESS=i386-pc-qnx + ;; + NEO-*:NONSTOP_KERNEL:*:*) + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; + NSE-*:NONSTOP_KERNEL:*:*) + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; + NSR-*:NONSTOP_KERNEL:*:*) + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; + NSV-*:NONSTOP_KERNEL:*:*) + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; + NSX-*:NONSTOP_KERNEL:*:*) + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *: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 + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*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 ;; + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; + x86_64:VMkernel:*:*) + GUESS=$UNAME_MACHINE-unknown-esx + ;; + amd64:Isilon\ OneFS:*:*) + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi -eval $set_cc_for_build -cat >$dummy.c < "$dummy.c" < -# include +#include +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif #endif main () { @@ -1349,20 +1574,12 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" -#endif - ); exit (0); + "" #endif + ); exit (0); #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) @@ -1404,39 +1621,54 @@ main () #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); + 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 -# 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 +#if !defined (ultrix) +#include +#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 +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif #endif #if defined (alliant) && defined (i860) @@ -1447,54 +1679,46 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && +$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; } -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } +echo "$0: unable to guess system type" >&2 -# Convex versions that predate uname can use getsysinfo(1) +case $UNAME_MACHINE:$UNAME_SYSTEM in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 < in order to provide the needed -information to handle your system. +our_year=`echo $timestamp | sed 's,-.*,,'` +thisyear=`date +%Y` +# shellcheck disable=SC2003 +script_age=`expr "$thisyear" - "$our_year"` +if test "$script_age" -lt 3 ; then + cat >&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} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF +fi exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/support/config.rpath b/support/config.rpath index b6c4d8f..fc5913d 100755 --- a/support/config.rpath +++ b/support/config.rpath @@ -2,27 +2,13 @@ # 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. +# Copyright 1996-2018 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 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 . -# -# 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. +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM @@ -39,7 +25,7 @@ # 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, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so @@ -49,7 +35,19 @@ 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. +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then @@ -59,7 +57,7 @@ else aix*) wl='-Wl,' ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' @@ -67,40 +65,83 @@ else irix5* | irix6* | nonstopux*) wl='-Wl,' ;; - newsos6) - ;; - linux*) - case $CC in - icc|ecc) + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + ecc*) + wl='-Wl,' + ;; + icc* | ifort*) + wl='-Wl,' + ;; + lf95*) + wl='-Wl,' + ;; + nagfor*) + wl='-Wl,-Wl,,' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + wl='-Wl,' + ;; + ccc*) wl='-Wl,' ;; - ccc) + xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + wl= + ;; + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; esac ;; + newsos6) + ;; + *nto* | *qnx*) + ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; - sco3.2v5*) + rdos*) ;; solaris*) - wl='-Wl,' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + wl='-Qoption ld ' + ;; + *) + wl='-Wl,' + ;; + esac ;; sunos4*) wl='-Qoption ld ' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; uts4*) ;; esac fi -# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. +# Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= @@ -108,7 +149,7 @@ hardcode_direct=no hardcode_minus_L=no case "$host_os" in - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # 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++. @@ -116,6 +157,10 @@ case "$host_os" in with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -123,32 +168,37 @@ esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # 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' case "$host_os" in - aix3* | aix4* | aix5*) + aix[3-9]*) # 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 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 + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -158,32 +208,57 @@ if test "$with_gnu_ld" = yes; then ld_shlibs=no fi ;; + haiku*) + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; netbsd*) ;; - solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; sunos4*) hardcode_direct=yes ;; *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': 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' + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= fi else case "$host_os" in @@ -197,7 +272,7 @@ else hardcode_direct=unsupported fi ;; - aix4* | aix5*) + aix[4-9]*) 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. @@ -207,13 +282,14 @@ else # 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*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) 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 @@ -225,7 +301,7 @@ else strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct=yes + : else # We have old collect2 hardcode_direct=unsupported @@ -233,6 +309,7 @@ else hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. @@ -260,14 +337,18 @@ else 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 + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; - bsdi4*) + bsdi[45]*) ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -276,25 +357,21 @@ else libext=lib ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - hardcode_direct=no + hardcode_direct=no + if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then + : + else + ld_shlibs=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*) + freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; - freebsd*) + freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; @@ -306,24 +383,25 @@ else # but as the default location of the library. hardcode_minus_L=yes ;; - hpux10* | hpux11*) + hpux10*) 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_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 + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) 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. @@ -345,19 +423,25 @@ else hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; + *nto* | *qnx*) + ;; 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' + if test -f /usr/libexec/ld.so; then + 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 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 + ld_shlibs=no fi ;; os2*) @@ -377,8 +461,6 @@ else fi hardcode_libdir_separator=: ;; - sco3.2v5*) - ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; @@ -407,14 +489,11 @@ else ld_shlibs=yes fi ;; - sysv4.2uw2*) - hardcode_direct=yes - hardcode_minus_L=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - ;; - sysv5*) - hardcode_libdir_flag_spec= + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' @@ -426,35 +505,59 @@ else fi # Check dynamic linker characteristics -# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) + library_names_spec='$libname.a' ;; - aix4* | aix5*) + aix[4-9]*) + library_names_spec='$libname$shrext' ;; amigaos*) + case "$host_cpu" in + powerpc*) + library_names_spec='$libname$shrext' ;; + m68k) + library_names_spec='$libname.a' ;; + esac ;; beos*) + library_names_spec='$libname$shrext' ;; - bsdi4*) + bsdi[45]*) + library_names_spec='$libname$shrext' ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib + library_names_spec='$libname$shrext' ;; dgux*) + library_names_spec='$libname$shrext' ;; - freebsd1*) + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' ;; - freebsd*) + freebsd* | dragonfly*) + library_names_spec='$libname$shrext' ;; gnu*) + library_names_spec='$libname$shrext' + ;; + haiku*) + library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) - case "$host_cpu" in + case $host_cpu in ia64*) shrext=.so ;; @@ -465,8 +568,13 @@ case "$host_os" in shrext=.sl ;; esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= @@ -483,42 +591,65 @@ case "$host_os" in ;; linux*oldld* | linux*aout* | linux*coff*) ;; - linux*) + linux* | k*bsd*-gnu | kopensolaris*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' ;; netbsd*) + library_names_spec='$libname$shrext' ;; newsos6) + library_names_spec='$libname$shrext' ;; - nto-qnx) + *nto* | *qnx*) + library_names_spec='$libname$shrext' ;; openbsd*) + library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll + library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' ;; - sco3.2v5*) + rdos*) ;; solaris*) + library_names_spec='$libname$shrext' ;; sunos4*) + library_names_spec='$libname$shrext$versuffix' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' ;; sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + tpf*) + library_names_spec='$libname$shrext' ;; uts4*) + library_names_spec='$libname$shrext' ;; 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_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` 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=/' <. # # 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 same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Please send patches to . # # 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. +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub + # 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. @@ -54,15 +52,21 @@ timestamp='2008-03-26' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -72,8 +76,7 @@ Report bugs and patches to ." 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. +Copyright 1992-2021 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." @@ -95,12 +98,12 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -116,1100 +119,1186 @@ case $# in 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 +# Split fields of configuration type +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | 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 \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac ;; - -clix*) - basic_machine=clipper-intergraph + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # 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) + cpu=hppa1.1 + vendor=winbond ;; - -lynx*) - os=-lynxos + op50n) + cpu=hppa1.1 + vendor=oki ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + op60c) + cpu=hppa1.1 + vendor=oki ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + ibm*) + cpu=i370 + vendor=ibm ;; - -psos*) - os=-psos + orion105) + cpu=clipper + vendor=highlevel ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; -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 + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # 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 + cpu=m68000 + vendor=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 + cpu=we32k + vendor=att ;; - 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 + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + basic_os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola + cpu=m68k + vendor=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 + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; 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 + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=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 + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=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 + cpu=hppa1.0 + vendor=hp ;; - 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 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) + cpu=mips + vendor=sgi + case $basic_os in + irix*) ;; *) - os=-irix4 + basic_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 + cpu=m68000 + vendor=convergent ;; - 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 + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint ;; 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* ) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) ;; - -ns2*) - os=-nextstep2 + ns2*) + basic_os=nextstep2 ;; *) - os=-nextstep3 + basic_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 + cpu=np1 + vendor=gould ;; 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 + cpu=hppa1.1 + vendor=oki + basic_os=proelf ;; 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 + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=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/^[^-]*-//'` + cpu=m68k + vendor=tti ;; - 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/^[^-]*-//'` + pc532) + cpu=ns32k + vendor=pc532 ;; 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/^[^-]*-//'` + cpu=pn + vendor=gould ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; 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 + cpu=i386 + vendor=ibm ;; rm[46]00) - basic_machine=mips-siemens + cpu=mips + vendor=siemens ;; rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm + cpu=romp + vendor=ibm ;; - sa29200) - basic_machine=a29k-amd - os=-udi + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} ;; - sb1) - basic_machine=mipsisa64sb1-unknown + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown + tower | tower-32) + cpu=m68k + vendor=ncr ;; - sde) - basic_machine=mipsisa32-sde - os=-elf + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - sei) - basic_machine=mips-sei - os=-seiux + w65) + cpu=w65 + vendor=wdc ;; - sequent) - basic_machine=i386-sequent + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf ;; - sh) - basic_machine=sh-hitachi - os=-hms + none) + cpu=none + vendor=none ;; - sh5el) - basic_machine=sh5le-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - sh64) - basic_machine=sh64-unknown + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks + + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read cpu vendor <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb | arc32 | arc64 \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bpf | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64eb | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ + | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | thumbv7* \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1217,193 +1306,215 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if test x$basic_os != x then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1416,249 +1527,363 @@ else # 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 +kernel= +case $cpu-$vendor in + score-*) + os=elf ;; - spu-*) - os=-elf + spu-*) + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + kernel=linux + os=gnu ;; arm*-semi) - os=-aout + os=aout + ;; + c4x-* | tic4x-*) + os=coff + ;; + c8051-*) + os=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os=elf + ;; + tic54x-*) + os=coff + ;; + tic55x-*) + os=coff ;; - c4x-* | tic4x-*) - os=-coff + tic6x-*) + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; - mep-*) - os=-elf + mep-*) + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; - *-be) - os=-beos + pru-*) + os=elf ;; - *-haiku) - os=-haiku + *-be) + os=beos ;; *-ibm) - os=-aix + os=aix ;; - *-knuth) - os=-mmixware + *-knuth) + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; - *-next ) - os=-nextstep + *-next) + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac + fi +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + # 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*) +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - -sunos*) + *-sunos*) vendor=sun ;; - -aix*) + *-cnk* | *-aix*) vendor=ibm ;; - -beos*) + *-beos*) vendor=be ;; - -hpux*) + *-hpux*) vendor=hp ;; - -mpeix*) + *-mpeix*) vendor=hp ;; - -hiux*) + *-hiux*) vendor=hitachi ;; - -unos*) + *-unos*) vendor=crds ;; - -dgux*) + *-dgux*) vendor=dg ;; - -luna*) + *-luna*) vendor=omron ;; - -genix*) + *-genix*) vendor=ns ;; - -mvs* | -opened*) + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) vendor=ibm ;; - -os400*) + s390-* | s390x-*) vendor=ibm ;; - -ptx*) + *-ptx*) vendor=sequent ;; - -tpf*) + *-tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - -aux*) + *-aux*) vendor=apple ;; - -hms*) + *-hms*) vendor=hitachi ;; - -mpw* | -macos*) + *-mpw* | *-macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - -vos*) + *-vos*) vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/support/man2html.c b/support/man2html.c index 2432c13..e6f441b 100644 --- a/support/man2html.c +++ b/support/man2html.c @@ -49,8 +49,8 @@ * * 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
)
- *  * 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.
+ *  * Some pages look better if man2html works in troff mode, especially pages
+ *    with tables. You can decide at compile time which made you want to use.
  *
  *    -DNROFF=0     troff mode
  *    -DNROFF=1     nroff mode   (default)
@@ -68,6 +68,7 @@
 
 #define NROFF 0
 
+#include 
 #include 
 #include 
 #include 
@@ -168,6 +169,19 @@ stralloc(int len)
 	return new;
 }
 
+void *
+xmalloc (size_t size)
+{
+	void *ret;
+
+	ret = malloc (size);
+	if (ret == 0) {
+		fprintf(stderr, "man2html: out of memory");
+		exit(EXIT_FAILURE);
+	}
+	return ret;
+}
+
 /*
  * Some systems don't have strdup so lets use our own - which can also
  * check for out of memory.
@@ -508,6 +522,7 @@ read_man_page(char *filename)
 			man_buf[buf_size] = '\n';
 			man_buf[buf_size + 1] = man_buf[buf_size + 2] = '\0';
 		} else {
+			free(man_buf);
 			man_buf = NULL;
 		}
 		fclose(man_stream);
@@ -1251,9 +1266,9 @@ scan_format(char *c, TABLEROW ** result, int *maxcol)
 	if (*result) {
 		clear_table(*result);
 	}
-	layout = currow = (TABLEROW *) malloc(sizeof(TABLEROW));
+	layout = currow = (TABLEROW *) xmalloc(sizeof(TABLEROW));
 	currow->next = currow->prev = NULL;
-	currow->first = curfield = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+	currow->first = curfield = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
 	*curfield = emptyfield;
 	while (*c && *c != '.') {
 		switch (*c) {
@@ -1272,7 +1287,7 @@ scan_format(char *c, TABLEROW ** result, int *maxcol)
 		case '^':
 		case '_':
 			if (curfield->align) {
-				curfield->next = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+				curfield->next = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
 				curfield = curfield->next;
 				*curfield = emptyfield;
 			}
@@ -1352,11 +1367,11 @@ scan_format(char *c, TABLEROW ** result, int *maxcol)
 			break;
 		case ',':
 		case '\n':
-			currow->next = (TABLEROW *) malloc(sizeof(TABLEROW));
+			currow->next = (TABLEROW *) xmalloc(sizeof(TABLEROW));
 			currow->next->prev = currow;
 			currow = currow->next;
 			currow->next = NULL;
-			curfield = currow->first = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+			curfield = currow->first = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
 			*curfield = emptyfield;
 			c++;
 			break;
@@ -1395,20 +1410,20 @@ next_row(TABLEROW * tr)
 	} else {
 		TABLEITEM *ti, *ti2;
 
-		tr->next = (TABLEROW *) malloc(sizeof(TABLEROW));
+		tr->next = (TABLEROW *) xmalloc(sizeof(TABLEROW));
 		tr->next->prev = tr;
 		ti = tr->first;
 		tr = tr->next;
 		tr->next = NULL;
 		if (ti)
-			tr->first = ti2 = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+			tr->first = ti2 = (TABLEITEM *) xmalloc(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->next = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
 			}
 			ti2 = ti2->next;
 		}
@@ -1499,17 +1514,17 @@ scan_table(char *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 = (TABLEROW *) xmalloc(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 = layout = (TABLEROW *) xmalloc(sizeof(TABLEROW));
 					currow->prev->prev = NULL;
 					currow->prev->next = currow;
 				}
 				curfield = currow->prev->first =
-					(TABLEITEM *) malloc(sizeof(TABLEITEM));
+					(TABLEITEM *) xmalloc(sizeof(TABLEITEM));
 				*curfield = emptyfield;
 				curfield->align = *c;
 				curfield->colspan = maxcol;
@@ -1978,7 +1993,7 @@ unescape (char *c)
 	while (i < l && c[i]) {
 		if (c[i] == '\a') {
 			if (c[i+1])
-				strcpy(c + i, c + i + 1);	/* should be memmove */
+				memmove (c + i, c + i + 1, l - i);
 			else {
 				c[i] = '\0';
 				break;
@@ -2244,7 +2259,7 @@ scan_request(char *c)
 				while (de && de->nr != i)
 					de = de->next;
 				if (!de) {
-					de = (STRDEF *) malloc(sizeof(STRDEF));
+					de = (STRDEF *) xmalloc(sizeof(STRDEF));
 					de->nr = i;
 					de->slen = 0;
 					de->next = strdef;
@@ -2293,7 +2308,7 @@ scan_request(char *c)
 				if (!de) {
 					char   *h;
 
-					de = (STRDEF *) malloc(sizeof(STRDEF));
+					de = (STRDEF *) xmalloc(sizeof(STRDEF));
 					de->nr = i;
 					de->slen = 0;
 					de->next = strdef;
@@ -2548,7 +2563,6 @@ scan_request(char *c)
 					h = name;
 				if (stat(h, &stbuf) != -1)
 					l = stbuf.st_size;
-				buf = stralloc(l + 4);
 #if NOCGI
 				if (!out_length) {
 					char   *t, *s;
@@ -2986,7 +3000,7 @@ scan_request(char *c)
 				while (intd && intd->nr != i)
 					intd = intd->next;
 				if (!intd) {
-					intd = (INTDEF *) malloc(sizeof(INTDEF));
+					intd = (INTDEF *) xmalloc(sizeof(INTDEF));
 					intd->nr = i;
 					intd->val = 0;
 					intd->incr = 0;
@@ -3059,7 +3073,7 @@ scan_request(char *c)
 							free(de->st);
 						de->st = h;
 					} else {
-						de = (STRDEF *) malloc(sizeof(STRDEF));
+						de = (STRDEF *) xmalloc(sizeof(STRDEF));
 						de->nr = i;
 						de->next = defdef;
 						de->st = h;
@@ -3791,7 +3805,7 @@ scan_troff(char *c, int san, char **result)
 			   && *(h + 1) && islower(*(h + 1))
 			   && *(h + 2) && isspace(*(h + 2))) {
 			/*
-			 * BSD imbedded command eg ".It Fl Ar arg1 Fl Ar
+			 * BSD embedded command eg ".It Fl Ar arg1 Fl Ar
 			 * arg2"
 			 */
 			FLUSHIBP;
@@ -3972,6 +3986,7 @@ scan_troff_mandoc(char *c, int san, char **result)
 	return ret;
 }
 
+int
 main(int argc, char **argv)
 {
 	FILE   *f;
diff --git a/support/mkconffiles b/support/mkconffiles
index 9eb2231..59e4c0f 100755
--- a/support/mkconffiles
+++ b/support/mkconffiles
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # mkconffiles - create _distribution and _patchlevel files in preparation
-#		for recreating `configure' from `configure.in'
+#		for recreating `configure' from `configure.ac'
 #
 # options:
 #	-s srcdir	directory where `configure' resides (defaults to `.')
diff --git a/support/mksignames.c b/support/mksignames.c
index 5618879..ba87ae8 100644
--- a/support/mksignames.c
+++ b/support/mksignames.c
@@ -1,7 +1,7 @@
 /* mksignames.c -- Create and write `signames.h', which contains an array of
    signal names. */
 
-/* Copyright (C) 1992-2006 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -57,7 +57,7 @@ write_signames (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");
+  fprintf (stream, "extern void initialize_signames PARAMS((void));\n\n");
 #else
   fprintf (stream, "char *signal_names[NSIG + 4] = {\n");
 
diff --git a/support/mkversion.sh b/support/mkversion.sh
index 08a5d98..5960a42 100755
--- a/support/mkversion.sh
+++ b/support/mkversion.sh
@@ -5,7 +5,7 @@
 # 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.
+# Copyright (C) 1996-2020 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
@@ -153,8 +153,8 @@ 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));'
+#echo 'extern char *shell_version_string PARAMS((void));'
+#echo 'extern void show_shell_version PARAMS((int));'
 
 if [ -n "$inc_build" ]; then
 	# Make sure we can write to .build
diff --git a/support/printenv.c b/support/printenv.c
index b45e4c7..154e086 100644
--- a/support/printenv.c
+++ b/support/printenv.c
@@ -29,6 +29,7 @@
 #endif
 
 #include "bashansi.h"
+#include 		/* puts */
 
 extern char **environ;
 
diff --git a/support/shobj-conf b/support/shobj-conf
index 5a63e80..cd7634d 100755
--- a/support/shobj-conf
+++ b/support/shobj-conf
@@ -10,7 +10,7 @@
 # Chet Ramey
 # chet@po.cwru.edu
 
-#   Copyright (C) 1996-2009 Free Software Foundation, Inc.
+#   Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 #   This file is part of GNU Bash, the Bourne Again SHell.
 #
@@ -65,6 +65,20 @@ while [ $# -gt 0 ]; do
 done
 
 case "${host_os}-${SHOBJ_CC}-${host_vendor}" in
+nsk-cc-tandem|nsk-c99-tandem)
+	SHOBJ_CFLAGS=-Wglobalized
+	case `uname -m` in
+	NSR*)
+		SHOBJ_CFLAGS="${SHOBJ_CFLAGS} -Wcall_shared" # default on TNS/E, needed on TNS/R
+		SHOBJ_LD=/usr/bin/ld # for TNS/R
+		;;
+	NSE*|NEO*)
+		SHOBJ_LD=/usr/bin/eld
+		;;
+	esac
+	SHOBJ_LDFLAGS='-shared -bglobalized -unres_symbols ignore'
+	;;
+
 sunos4*-*gcc*)
 	SHOBJ_CFLAGS=-fpic
 	SHOBJ_LD=/usr/bin/ld
@@ -109,7 +123,7 @@ sunos5*|solaris2*)
 	;;
 
 # All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd.
-linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
+linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*)
 	SHOBJ_CFLAGS=-fPIC
 	SHOBJ_LD='${CC}'
 	SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
@@ -118,66 +132,9 @@ linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
 	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
-
+darwin*)
+	# Common definitions for all darwin/mac os x versions
 	SHOBJ_CFLAGS='-fno-common'
 
 	SHOBJ_LD='${CC}'
@@ -185,19 +142,39 @@ darwin*|macosx*)
 	SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
 	SHLIB_LIBSUFF='dylib'
 
+	# unused at this time
+	SHLIB_SONAME='$(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF)'
+
 	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'
+	# Darwin versions 1, 5, 6, 7 correspond to Mac OS X 10.0, 10.1, 10.2,
+	# and 10.3, respectively.
+	darwin[1-7].*)
+		SHOBJ_STATUS=unsupported
+		SHOBJ_LDFLAGS='-dynamic'
+		SHLIB_XLDFLAGS='-install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v'
+		;;
+	# Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4
+	*)
+		case "${host_os}" in
+		darwin[89]*|darwin1[012]*)
+			SHOBJ_ARCHFLAGS=
 			;;
-	*)		SHOBJ_LDFLAGS='-dynamic'
-			SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+		 *) 	# Mac OS X 10.9 (Mavericks) and later
+			SHOBJ_ARCHFLAGS=
+			# for 32 and 64bit universal library
+			#SHOBJ_ARCHFLAGS='-arch i386 -arch x86_64'
+			#SHOBJ_CFLAGS=${SHOBJ_CFLAGS}' -arch i386 -arch x86_64'
 			;;
+		 esac
+		 SHOBJ_LDFLAGS="-dynamiclib -dynamic -undefined dynamic_lookup ${SHOBJ_ARCHFLAGS}"
+		 SHLIB_XLDFLAGS="-dynamiclib ${SHOBJ_ARCHFLAGS}"' -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v'
+		;;
 	esac
 
 	SHLIB_LIBS='-lncurses'	# see if -lcurses works on MacOS X 10.1 
 	;;
 
-openbsd*|netbsd*)
+openbsd*|netbsd*|mirbsd*)
 	SHOBJ_CFLAGS=-fPIC
 	SHOBJ_LD='${CC}'
 	SHOBJ_LDFLAGS='-shared'
@@ -264,8 +241,8 @@ osf*)
 
 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_LD='${CC}'
+	SHOBJ_LDFLAGS='-Wl,-bdynamic -Wl,-bnoentry -Wl,-bexpall'
 	SHOBJ_XLDFLAGS='-G'
 
 	SHLIB_XLDFLAGS='-bM:SRE'
@@ -387,18 +364,15 @@ hpux11*)
 	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
-#
+	# this code from michael.osipov@siemens.com (I have not tested it)
 #	SHOBJ_CFLAGS='+z'
-#	SHOBJ_LD='ld'
-#	SHOBJ_LDFLAGS='-b +s +h $@'
+#	SHOBJ_LD='$(CC)'
+#	SHOBJ_LDFLAGS='-b -Wl,+s -Wl,+h,$@'
 #
-#	SHLIB_XLDFLAGS='+b $(libdir)'
-#	SHLIB_LIBSUFF='sl'
+#	SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
+#	SHLIB_LIBSUFF='so'
 #	SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'	
-
+#	SHLIB_LIBS='$(TERMCAP_LIB)'
 	;;
 
 sysv4*-*gcc*)
diff --git a/support/signames.c b/support/signames.c
index 137826f..84864fd 100644
--- a/support/signames.c
+++ b/support/signames.c
@@ -1,6 +1,6 @@
 /* signames.c -- Create an array of signal names. */
 
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -84,9 +84,9 @@ initialize_signames ()
      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
+     implementations. According to the standard, both SIGRTMIN and
+     SIGRTMAX must be defined, SIGRTMIN must be strictly 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, ...,
@@ -159,10 +159,18 @@ initialize_signames ()
   signal_names[SIGPRE] = "SIGPRE";
 #endif
 
+#if defined (SIGPHONE)	/* Phone interrupt */
+  signal_names[SIGPHONE] = "SIGPHONE";
+#endif
+
 #if defined (SIGVIRT)	/* AIX virtual time alarm */
   signal_names[SIGVIRT] = "SIGVIRT";
 #endif
 
+#if defined (SIGTINT)	/* Interrupt */
+  signal_names[SIGTINT] = "SIGTINT";
+#endif
+
 #if defined (SIGALRM1)	/* m:n condition variables */
   signal_names[SIGALRM1] = "SIGALRM1";
 #endif
@@ -191,27 +199,72 @@ initialize_signames ()
   signal_names[SIGSAK] = "SIGSAK";
 #endif
 
+#if defined (SIGCPUFAIL)	/* Predictive processor deconfiguration */
+  signal_names[SIGCPUFAIL] = "SIGCPUFAIL";
+#endif
+
+#if defined (SIGAIO)	/* Asynchronous I/O */
+  signal_names[SIGAIO] = "SIGAIO";
+#endif
+
+#if defined (SIGLAB)	/* Security label changed */
+  signal_names[SIGLAB] = "SIGLAB";
+#endif
+
 /* SunOS5 */
-#if defined (SIGLWP)	/* special signal used by thread library */
+#if defined (SIGLWP)	/* Solaris: special signal used by thread library */
   signal_names[SIGLWP] = "SIGLWP";
 #endif
 
-#if defined (SIGFREEZE)	/* special signal used by CPR */
+#if defined (SIGFREEZE)	/* Solaris: special signal used by CPR */
   signal_names[SIGFREEZE] = "SIGFREEZE";
 #endif
 
-#if defined (SIGTHAW)	/* special signal used by CPR */
+#if defined (SIGTHAW)	/* Solaris: special signal used by CPR */
   signal_names[SIGTHAW] = "SIGTHAW";
 #endif
 
-#if defined (SIGCANCEL)	/* thread cancellation signal used by libthread */
+#if defined (SIGCANCEL)	/* Solaris: thread cancellation signal used by libthread */
   signal_names[SIGCANCEL] = "SIGCANCEL";
 #endif
 
-#if defined (SIGXRES)	/* resource control exceeded */
+#if defined (SIGXRES)	/* Solaris: resource control exceeded */
   signal_names[SIGXRES] = "SIGXRES";
 #endif
 
+#if defined (SIGJVM1)	/* Solaris: Java Virtual Machine 1 */
+  signal_names[SIGJVM1] = "SIGJVM1";
+#endif
+
+#if defined (SIGJVM2)	/* Solaris: Java Virtual Machine 2 */
+  signal_names[SIGJVM2] = "SIGJVM2";
+#endif
+
+#if defined (SIGDGTIMER1)
+  signal_names[SIGDGTIMER1] = "SIGDGTIMER1";
+#endif
+
+#if defined (SIGDGTIMER2)
+  signal_names[SIGDGTIMER2] = "SIGDGTIMER2";
+#endif
+
+#if defined (SIGDGTIMER3)
+  signal_names[SIGDGTIMER3] = "SIGDGTIMER3";
+#endif
+
+#if defined (SIGDGTIMER4)
+  signal_names[SIGDGTIMER4] = "SIGDGTIMER4";
+#endif
+
+#if defined (SIGDGNOTIFY)
+  signal_names[SIGDGNOTIFY] = "SIGDGNOTIFY";
+#endif
+
+/* Apollo */
+#if defined (SIGAPOLLO)
+  signal_names[SIGAPOLLO] = "SIGAPOLLO";
+#endif
+
 /* HP-UX */
 #if defined (SIGDIL)	/* DIL signal (?) */
   signal_names[SIGDIL] = "SIGDIL";
diff --git a/support/texi2dvi b/support/texi2dvi
index 83c0842..17f4355 100755
--- a/support/texi2dvi
+++ b/support/texi2dvi
@@ -1,119 +1,1761 @@
 #! /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 $
+# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
-# 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1992-2019 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 free software; you can redistribute it and/or modify
+# it under the terms of the 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.
+# 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 .
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
 #
-# Original author: Noah Friedman .
+# Originally written by Noah Friedman.
 #
 # 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
+test -f /bin/ksh && test -z "$RUNNING_KSH" \
+  && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
+  && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; }
+unset RUNNING_KSH
 
-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."
+# No failure shall remain unpunished.
+set -e
 
-usage="Usage: $program [OPTION]... FILE...
+# In case the default sed doesn't suffice.
+: ${SED=sed}
 
-Run each Texinfo or LaTeX FILE through TeX in turn until all
+program=`echo $0 | $SED -e 's!.*/!!'`
+
+build_mode=${TEXI2DVI_BUILD_MODE:-local}
+build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.}
+
+orig_pwd=`pwd`
+
+# 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.
+action=compile
+debug=false
+escape="\\"
+expand=false    # true for expansion via makeinfo
+includes=
+line_error=true # pass --file-line-error to TeX
+max_iters=7     # when to quit
+oname=          # --output
+out_lang=dvi
+quiet=false     # let the tools' message be displayed
+set_language=
+src_specials=
+shell_escape=
+latex2html=hevea  # or set to tex4ht
+textra=         # Extra TeX commands to insert in the input file.
+txiprereq=19990129 # minimum texinfo.tex version with macro expansion
+verb=false      # true for verbose mode
+translate_file= # name of charset translation file
+
+# We have to initialize IFS to space tab newline since we save and
+# restore IFS and apparently POSIX allows stupid/broken behavior with
+# empty-but-set IFS.
+# http://lists.gnu.org/archive/html/automake-patches/2006-05/msg00008.html
+# We need space, tab and newline, in precisely that order.  And don't leave
+# trailing blanks.
+space=' '
+tab='	'
+newline='
+'
+IFS="$space$tab$newline"
+
+: ${EGREP=egrep}
+
+# Systems which define $COMSPEC or $ComSpec use semicolons to separate
+# directories in TEXINPUTS -- except for Cygwin and Msys, where COMSPEC
+# might be inherited, but : is used.
+
+# In the case of Msys, uname returns a value derived from MSYSTEM, as
+# MSYSTEM is user configurable, it is not so safe to use it to detect
+# Msys. It is safer to use OSTYPE, this is why we set MSYSTEM to
+# $OSTYPE before calling uname
+if test -n "$COMSPEC$ComSpec" \
+   && MSYSTEM=$OSTYPE uname | $EGREP -iv 'cygwin|msys' >/dev/null; then
+  path_sep=";"
+else
+  path_sep=":"
+fi
+
+
+# Pacify verbose cds.
+CDPATH=${ZSH_VERSION+.}$path_sep
+
+
+# Now we define numerous functions, with no other executable code.
+# The main program is at the end of the file.
+
+	
+#  Standard help and version functions.
+#
+# usage - display usage and exit successfully.
+usage ()
+{
+  cat <
+General help using GNU software: 
+EOF
+  exit 0
+}
+
+
+# version - Display version info and exit successfully.
+version ()
+{
+  cat <
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+  exit 0
+}
+
+
+#  Generic auxiliary functions.
+
+# Used to access files and directories after we have changed directory
+# (for --tidy).
+rel=
+
+# Change directory, updating some relative paths.
+cd_dir ()
+{
+  cd "$1"
+
+  # Check if argument or input file is absolute, and if so, make all the path 
+  # variables absolute.
+  use_absolute=false
+  case $1 in
+  [\\/]* | ?:[\\/]*)  # absolute path
+    use_absolute=true ;;
+  esac
+  case $in_input in
+  [\\/]* | ?:[\\/]*)
+    use_absolute=true ;;
+  esac
+
+  if $use_absolute ; then
+    for cdd_dir in work_build workdir t2ddir work_bak in_input in_dir; do
+      eval "$cdd_dir=\`absolute \$$cdd_dir\`"
+    done
+    return
+  fi
+
+  # Replace each path component with ".." and add a single trailing slash.
+  rel=`echo "$1" | \$SED -e 's/[^/\\][^/\\]*/../g' -e 's/[/\\]*$/\//'`
+}
+
+# cd_orig - Return to the original directory.
+cd_orig ()
+{
+  # In case $orig_pwd is on a different drive (for DOS).
+  cd /
+
+  # Return to the original directory so that
+  # - the next file is processed in correct conditions
+  # - the temporary file can be removed
+  cd "$orig_pwd" || exit 1
+
+  rel=
+}
+
+
+# func_dirname FILE - Return the directory part of FILE.
+func_dirname ()
+{
+  dirname "$1" 2>/dev/null \
+  || { echo "$1" | $SED 's!/[^/]*$!!;s!^$!.!'; }
+}
+
+
+# noext FILE - Return FILE with one extension removed:
+#   foo.bar.baz -> foo.bar
+noext ()
+{
+  echo "$1" | $SED -e 's/\.[^/.][^/.]*$//'
+}
+
+
+# absolute NAME - Return an absolute path to NAME.
+absolute ()
+{
+  case $1 in
+   [\\/]* | ?:[\\/]*)
+      # Absolute paths don't need to be expanded.
+      echo "$1"
+      ;;
+   *) absolute_slashes=`echo "$1" | $SED -n 's,.*[^/]\(/*\)$,\1,p'`
+      absolute_rel=$orig_pwd/`func_dirname "$1"`
+      if test -d "$absolute_rel"; then
+        (cd "$absolute_rel" 2>/dev/null \
+         && absolute_name=`pwd`/`basename "$1"`"$absolute_slashes"
+         echo "$absolute_name")
+      else
+        error 1 "not a directory: $absolute_rel"
+      fi
+      ;;
+  esac
+}
+
+
+# ensure_dir DIR1 DIR2... - Make sure given directories exist.
+ensure_dir ()
+{
+  for dir
+  do
+    # Beware that in parallel builds we may have several concurrent
+    # attempts to create the directory.  So fail only if "mkdir"
+    # failed *and* the directory still does not exist.
+    test -d "$dir" \
+      || mkdir "$dir" \
+      || test -d "$dir" \
+      || error 1 "cannot create directory: $dir"
+  done
+}
+
+
+# error EXIT_STATUS LINE1 LINE2... - Report an error and exit with
+#   failure if EXIT_STATUS is non-null.
+error ()
+{
+  error_status="$1"
+  shift
+  report "$@"
+  if test "$error_status" != 0; then
+    exit $error_status
+  fi
+}
+
+
+# findprog PROG - Return true if PROG is somewhere in PATH, else false.
+findprog ()
+{
+  saveIFS="$IFS"
+  IFS=$path_sep  # break path components at the path separator
+  for dir in $PATH; do
+    IFS=$saveIFS
+    # The basic test for an executable is `test -f $f && test -x $f'.
+    # (`test -x' is not enough, because it can also be true for directories.)
+    # We have to try this both for $1 and $1.exe.
+    #
+    # Note: On Cygwin and DJGPP, `test -x' also looks for .exe.  On Cygwin,
+    # also `test -f' has this enhancement, but not on DJGPP.  (Both are
+    # design decisions, so there is little chance to make them consistent.)
+    # Thusly, it seems to be difficult to make use of these enhancements.
+    #
+    if   { test -f "$dir/$1"     && test -x "$dir/$1"; } \
+      || { test -f "$dir/$1.exe" && test -x "$dir/$1.exe"; }; then
+      return 0
+    fi
+  done
+  return 1
+}
+
+# report LINE1 LINE2... - Echo each argument to stderr.
+report ()
+{
+  for i in "$@"
+  do
+    echo >&2 "$0: $i"
+  done
+}
+
+
+# run COMMAND-LINE - Run COMMAND-LINE verbosely, catching errors as failures.
+run ()
+{
+  verbose "Running $@"
+  "$@" 2>&5 1>&2 \
+  || error 1 "$1 failed"
+}
+
+
+# verbose WORD1 WORD2... - Echo concatenated WORDs to stderr, if $verb.
+verbose ()
+{
+  if $verb; then
+    echo >&2 "$0: $@"
+  fi
+}
+
+
+#  Handling lists.
+#
+# list_append LIST-NAME ELEM - Append ELEM to (the contents of) LIST-NAME.
+list_append ()
+{
+  list_name="$1"
+  shift
+  eval set X \$$list_name "$@"
+  shift
+  eval $list_name=\""$@"\"
+}
+
+
+# list_concat_dirs LIST-NAME DIR-LIST - Append to LIST-NAME all the
+# components (including empty ones) from the $path_sep-separated list
+# DIR-LIST.  Make the paths absolute.
+list_concat_dirs ()
+{
+  lcd_list="$1"
+  # Empty path components are meaningful to tex.  We rewrite them as
+  # `EMPTY' so they don't get lost when we split on $path_sep.
+  # Hopefully no one will have an actual directory named EMPTY.
+  lcd_replace_EMPTY="-e 's/^$path_sep/EMPTY$path_sep/g' \
+                     -e 's/$path_sep\$/${path_sep}EMPTY/g' \
+                     -e 's/$path_sep$path_sep/${path_sep}EMPTY${path_sep}/g'"
+  save_IFS=$IFS
+  IFS=$path_sep
+  set x `echo "$2" | eval $SED $lcd_replace_EMPTY`; shift
+  IFS=$save_IFS
+  for lcd_dir
+  do
+    case $lcd_dir in
+      EMPTY)
+       list_append $lcd_list ""
+       ;;
+      *)
+       if test -d $lcd_dir; then
+          dir=`absolute "$lcd_dir"`
+         list_append $lcd_list "$lcd_dir"
+       fi
+       ;;
+    esac
+  done
+}
+
+
+# list_prefix LIST-NAME SEP -> STRING - Return string with each element
+# of LIST-NAME preceded by SEP.
+list_prefix ()
+{
+  lp_separator="$2"
+  eval set X \$$1
+  shift
+  lp_result=''
+  for i
+  do
+    lp_result="$lp_result \"$lp_separator\" \"$i\""
+  done
+  echo "$lp_result"
+}
+
+# list_infix LIST-NAME SEP -> STRING - Same as list_prefix, but a separator.
+list_infix ()
+{
+  eval set X \$$1
+  shift
+  save_IFS="$IFS"
+  IFS=$path_sep
+  echo "$*"
+  IFS=$save_IFS
+}
+
+# list_dir_to_abs LIST-NAME - Convert list to using only absolute dir names.
+# Currently unused, but should replace absolute_filenames some day.
+list_dir_to_abs ()
+{
+  ldta_list="$1"
+  eval set X \$$ldta_list
+  shift
+  ldta_result=''
+  for dir
+  do
+    dir=`absolute "$dir"`
+    test -d "$dir" || continue
+    ldta_result="$ldata_result \"$dir\""
+  done
+  set X $ldta_result; shift
+  eval $ldta_list=\"$@\"
+}
+
+
+#  Language auxiliary functions. 
+#
+# out_lang_set LANG - set $out_lang to LANG (dvi, pdf, etc.), or error.
+out_lang_set ()
+{
+  case $1 in
+    dvi|dvipdf|html|info|pdf|ps|text) out_lang=$1;;
+    *) error 1 "invalid output format: $1";;
+  esac
+}
+
+# out_lang_tex - Return the tex output language (DVI or PDF) for $out_lang.
+out_lang_tex ()
+{
+  case $out_lang in
+    dvi | ps | dvipdf ) echo dvi;;
+    pdf ) echo $out_lang;;
+    html | info | text ) echo $out_lang;;
+    *)    error 1 "invalid out_lang: $1";;
+  esac
+}
+
+# out_lang_ext - Return the extension for $out_lang (pdf, dvi, etc.).
+out_lang_ext ()
+{
+  case $out_lang in
+    dvipdf ) echo pdf;;
+    dvi | html | info | pdf | ps | text ) echo $out_lang;;
+    *)    error 1 "invalid out_lang: $1";;
+  esac
+}
+
+
+#  TeX file auxiliary functions.
+#
+# absolute_filenames TEX-PATH -> TEX-PATH - Convert relative paths to
+# absolute, so we can run in another directory (e.g., in tidy build
+# mode, or during the macro-support detection).
+absolute_filenames ()
+{
+  # Empty path components are meaningful to tex.  We rewrite them as
+  # `EMPTY' so they don't get lost when we split on $path_sep.
+  # Hopefully no one will have an actual directory named EMPTY.
+  af_replace_empty="-e 's/^$path_sep/EMPTY$path_sep/g' \
+                    -e 's/$path_sep\$/${path_sep}EMPTY/g' \
+                    -e 's/$path_sep$path_sep/${path_sep}EMPTY${path_sep}/g'"
+  af_result=`echo "$1" | eval $SED $af_replace_empty`
+  save_IFS=$IFS
+  IFS=$path_sep
+  set x $af_result; shift
+  af_result=
+  af_path_sep=
+  for dir
+  do
+    case $dir in
+      EMPTY)
+        af_result=$af_result$af_path_sep
+        ;;
+      *)
+        if test -d "$dir"; then
+          af_result=$af_result$af_path_sep`absolute "$dir"`
+        else
+          # Even if $dir is not a directory, preserve it in the path.
+          # It might contain metacharacters that TeX will expand in
+          # turn, e.g., /some/path/{a,b,c}.  This will not get the
+          # implicit absolutification of the path, but we can't help that.
+          af_result=$af_result$af_path_sep$dir
+        fi
+        ;;
+    esac
+    af_path_sep=$path_sep
+  done
+  echo "$af_result"
+}
+
+
+# output_base_name FILE - Return the name of FILE, possibly renamed to
+# satisfy --output.  FILE is local, i.e., without any directory part.
+output_base_name ()
+{
+  case $oname in
+    '') echo "$1";;
+     *) obn_out_noext=`noext "$oname"`
+        obn_file_ext=`echo "$1" | $SED 's/^.*\.//'`
+        echo "$obn_out_noext.$obn_file_ext"
+      ;;
+  esac
+}
+
+
+# destdir - Return the directory where the output is expected.
+destdir ()
+{
+  case $oname in
+    '')  echo "$orig_pwd";;
+    *)   dirname "$oname";;
+  esac
+}
+
+
+# move_to_dest FILE... - Move FILE(s) to the place where the user expects.
+# Truly move it, that is, it must not remain in its build location
+# unless that is also the output location.  (Otherwise it might appear
+# as an extra file in make distcheck.)
+#
+# FILE can be the principal output (in which case -o directly applies),
+# or an auxiliary file with the same base name.
+move_to_dest ()
+{
+#  echo "move_to_dest $*, tidy=$tidy, oname=$oname"
+
+  # If we built in place and have no output name, there is nothing to
+  # do, so just return.
+  case $tidy:$oname in
+    false:) return;;
+  esac
+
+  for file
+  do
+    test -f "$file" \
+    || error 1 "no such file or directory: $file"
+    case $tidy:$oname in
+      true:)  mtd_destdir=$orig_pwd
+              mtd_destfile=$mtd_destdir/$file;;
+      true:*) mtd_destfile=`output_base_name "$file"`
+              mtd_destdir=`dirname "$mtd_destfile"`;;
+      false:*) mtd_destfile=$oname
+               mtd_destdir=`dirname "$mtd_destfile"`;;
+    esac
+ 
+    # We want to compare the source location and the output location,
+    # and if they are different, do the move.  But if they are the
+    # same, we must preserve the source.  Since we can't assume
+    # stat(1) or test -ef is available, resort to comparing the
+    # directory names, canonicalized with pwd.  We can't use cmp -s
+    # since the output file might not actually change from run to run;
+    # e.g., TeX DVI output is timestamped to only the nearest minute.
+    mtd_destdir=`cd "$mtd_destdir" && pwd`
+    mtd_destbase=`basename "$mtd_destfile"`
+
+    mtd_sourcedir=`dirname "$file"`
+    mtd_sourcedir=`cd "$mtd_sourcedir" && pwd`
+    mtd_sourcebase=`basename "$file"`
+
+    if test "$mtd_sourcedir/$mtd_sourcebase" != "$mtd_destdir/$mtd_destbase"
+    then
+      verbose "Moving $file to $mtd_destfile"
+      rm -f "$mtd_destfile"
+      mv "$file" "$mtd_destfile"
+    fi
+  done
+}
+
+
+#  Managing xref files.
+#
+# aux_file_p FILE - Echo FILE if FILE is an aux file.
+aux_file_p ()
+{
+  test -f "$1" || return 0
+  case $1 in
+    *.aux) echo "$1";;
+    *)     return 0;;
+  esac
+}
+
+# bibaux_file_p FILE - Echo FILE if FILE contains citation requests.
+bibaux_file_p ()
+{
+  test -s "$1" || return 0
+  if (grep '^\\bibstyle[{]' "$1"   \
+      && grep '^\\bibdata[{]' "$1" \
+      ## The following line is suspicious: fails when there
+      ## are citations in sub aux files.  We need to be
+      ## smarter in this case.
+      ## && grep '^\\citation[{]' "$f"
+      ) >&6 2>&1;
+  then
+    echo "$1"
+  fi
+  return 0
+}
+
+# index_file_p FILE - Echo FILE if FILE is an index file.
+index_file_p ()
+{
+  test -f "$1" || return 0
+  case $in_lang:$latex2html:`out_lang_tex`:`$SED '1q' "$1"` in
+    # When working with TeX4HT, *.idx are created by LaTeX.  They must
+    # be processed to produce *.4ix, *.4dx files.  The *.4dx file is
+    # passed to makeindex to produce the *.ind file.  This sequence is
+    # handled by run_index, so we are only interested in the *.idx
+    # files, which have each "\indexentry" preceded by a
+    # "\beforeentry".
+    latex:tex4ht:html:"\\beforeentry {"*) echo $1;;
+
+    # When index.sty is used, there is a space before the brace.
+    latex:*:*:"\\indexentry{"*|latex:*:*:"\\indexentry {"*) echo $1;;
+
+    texinfo:*:*:"\\entry{"*) echo $1;;
+    texinfo:*:*:"@entry{"*) echo $1;;
+    # @entry is output from newer versions of texinfo.tex
+  esac
+  return 0
+}
+
+########### not used currently
+# xref_file_p FILE - Return success if FILE is an xref file (indexes,
+# tables and lists).
+xref_file_p ()
+{
+  test -f "$1" || return 1
+  # If the file is not suitable to be an index or xref file, don't
+  # process it.  It's suitable if the first character is a
+  # backslash or right quote or at, as long as the first line isn't
+  # \input texinfo.
+  case `$SED '1q' "$1"` in
+    "\\input texinfo"*) return 1;;
+    [\\''@]*)           return 0;;
+           *)           return 1;;
+  esac
+}
+
+
+# Used in generated_files_get
+generated_files_get_from_log ()
+{
+  if test -f "$1.log"; then
+    # Usually the output is like: \openout1 = `foobar.tex'.
+    # (including the final period)
+    # but luatex outputs: \openout1 = foobar.tex
+    # (no quotes, no period).
+    # So we have to make the punctuation optional.
+    grep '^\\openout[0-9]' "$1.log" \
+      | $SED -e "s/\\\\openout[^=]*= *[\`']*//" \
+           -e "s/'\.$//"
+  fi
+}
+
+# Used in generated_files_get
+generated_files_get_from_fls ()
+{
+  if test -f "$1.fls"; then
+    grep '^OUTPUT ' "$1.fls" | cut -b 8- \
+      | grep -v '\.dvi$' | grep -v '\.log$' | grep -v '\.pdf$' || true
+  fi
+}
+
+# generated_files_get - Output the list of files generated by the TeX 
+#                       compilation.
+generated_files_get ()
+{
+  $generated_files_get_method "$in_noext"
+  if test $generated_files_get_method = generated_files_get_from_fls; then
+    if test -r "$in_noext.fl"; then
+      report 'WARNING!!  The fl index may typeset as garbage!' # goes to stderr
+      report 'Try upgrading your version of texinfo.tex, or else try setting'
+      report 'the environment variable TEXI2DVI_USE_RECORDER to '\''no'\''.'
+report 'Once you'\''ve done that, delete the file with an '\''fl'\'' extension.'
+    fi
+  fi
+}
+
+
+# xref_files_save - set xref_files_orig from xref_files_new, and save xref 
+#                   files in $work_bak.
+xref_files_save ()
+{
+  # Save copies of auxiliary files for later comparison.
+  xref_files_orig=$xref_files_new
+  if test -n "$xref_files_orig"; then
+    verbose "Backing up xref files: $xref_files_orig"
+    # The following line improves `cp $xref_files_orig "$work_bak"'
+    # by preserving the directory parts.  Think of
+    # cp chap1/main.aux chap2/main.aux $work_bak.
+    #
+    # Users may have, e.g., --keep-old-files.  Don't let this interfere.
+    # (Don't use unset for the sake of ancient shells.)
+    TAR_OPTIONS=; export TAR_OPTIONS
+    tar cf - $xref_files_orig | (cd "$rel$work_bak" && tar xf -)
+  fi
+
+  # Remove auxiliary files in same directory as main input file.  Otherwise,
+  # these will likely be read instead of those in the build dir.
+  if $tidy ; then
+    secondary_xref_files=`sorted_index_files`
+    for f in $xref_files_new $secondary_xref_files ; do
+      if test -f "$rel$in_dir/$f" ; then
+        remove $rel$in_dir/$f
+      fi
+    done
+  fi
+}
+
+
+# xref_files_changed - Return success if the xref files have changed
+# since the previous run.
+xref_files_changed ()
+{
+  # 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" "$in_noext.log" >&6 2>&1; then
+    return 0
+  fi
+  # Similarly, check for biblatex report of whether rerunning is needed.
+  if grep "biblatex.*(re)run" "$in_noext.log" >&6 2>&1; then
+    return 0
+  fi
+
+  # If old and new lists don't have the same file list,
+  # then something has definitely changed.
+  xref_files_new=`generated_files_get`
+  verbose "Original xref files = $xref_files_orig"
+  verbose "New xref files      = $xref_files_new"
+  if test "x$xref_files_orig" != "x$xref_files_new"; then
+    return 0
+  fi
+
+  # Compare each file until we find a difference.
+  for this_file in $xref_files_new; 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" "$rel$work_bak/$this_file"; then :; else
+      verbose "xref file `echo $this_file | $SED 's|\./||g'` differed ..."
+      if $debug; then
+        diff -u "$rel$work_bak/$this_file" "$this_file"
+      fi
+      return 0
+    fi
+  done
+
+  secondary_xref_files=`sorted_index_files`
+  verbose "Secondary xref files = $secondary_xref_files"
+  for this_file in $secondary_xref_files; do
+    if test -f $this_file; then :; else
+      verbose "$this_file missing ..."
+      return 0
+    fi
+  done
+
+  # No change.
+  return 1
+}
+
+#  Running the TeX suite.
+#
+# Set tex_cmd variable, for running TeX.
+make_tex_cmd ()
+{
+  case $in_lang:$latex2html:`out_lang_tex` in
+    latex:*:dvi|latex:tex4ht:html)
+        tex=${LATEX:-latex};;
+    latex:*:pdf)
+        tex=${PDFLATEX:-pdflatex};;
+    texinfo:*:dvi)
+        # MetaPost also uses the TEX environment variable.  If the user
+        # has set TEX=latex for that reason, don't bomb out.
+        case $TEX in
+          *latex) tex=tex;; # don't bother trying to find etex
+               *) tex=$TEX
+        esac;;
+    texinfo:*:pdf) tex=$PDFTEX;;
+    *) error 1 "$out_lang not supported for $in_lang";;
+  esac
+
+  # Beware of aux files in subdirectories that require the
+  # subdirectory to exist.
+  case $in_lang:$tidy in
+    latex:true)
+       $SED -n 's|^[ ]*\\include{\(.*\)/.*}.*|\1|p' "$in_input" |
+       sort -u |
+       while read d
+       do
+         ensure_dir "$work_build/$d"
+       done
+       ;;
+  esac
+
+  # Note that this will be used via an eval: quote properly.
+  tex_cmd="$tex"
+
+  # If possible, make TeX report error locations in GNU format.
+  if $line_error; then
+    if test "${tex_help:+set}" != set; then
+      # Go to a temporary directory to try --help, since old versions that
+      # don't accept --help will generate a texput.log.
+      tex_help_dir=$t2ddir/tex_help
+      ensure_dir "$tex_help_dir"
+      tex_help=`cd "$tex_help_dir" >&6 && $tex --help &1 || true`
+    fi
+    # The mk program and perhaps others want to parse TeX's
+    # original error messages.
+    case $tex_help in
+      *file-line-error*) tex_cmd="$tex_cmd --file-line-error";;
+    esac
+  fi
+
+  # Tell TeX about -recorder option, if specified
+  # recorder_option_maybe is in { " -recorder", "" }
+  tex_cmd="$tex_cmd$recorder_option_maybe"
+  
+  
+  # Tell TeX about TCX file, if specified.
+  test -n "$translate_file" \
+                       && tex_cmd="$tex_cmd --translate-file=$translate_file"
+
+  # Tell TeX to make source specials (for backtracking from output to
+  # source, given a sufficiently smart editor), if specified.
+  test -n "$src_specials" && tex_cmd="$tex_cmd $src_specials"
+
+  # Tell TeX to allow running external executables
+  test -n "$shell_escape" && tex_cmd="$tex_cmd $shell_escape"
+
+  # Run without interaction.
+  # \batchmode does not show terminal output at all, so we don't
+  # want that.  And even in batch mode, TeX insists on having input
+  # from the user.  Close its stdin to make it impossible.
+  tex_cmd="$tex_cmd , \ and any whitespace characters are not supported
+  # filenames.
+  in_input_funnies=`echo "$in_input" \
+    | $SED -e 's![^}#$%&^_{~]!!g' -e 's!\(.\)!\1\''
+!g' | uniq`
+
+  if test -n "$in_input_funnies" ; then
+    # Make > an end group character, as it's unlikely to appear in
+    # a filename.
+    tex_cmd="$tex_cmd '${escape}bgroup${escape}catcode62=2${escape}relax'"
+
+    # If the filename has funny characters, change the TeX category codes of 
+    # some characters within a group, and use \expandafter to input the file
+    # outside of the group.
+    for w in $in_input_funnies ; do
+      tex_cmd="$tex_cmd '${escape}catcode\`${escape}$w=12${escape}relax'"
+    done
+
+    # Set \toks0 to "\input FILENAME\relax"
+    tex_cmd="$tex_cmd '${escape}toks0${escape}bgroup${escape}input' '$rel$in_input' '${escape}relax>"
+
+    # Expand \toks0 after the end of the group
+    tex_cmd="$tex_cmd${escape}expandafter${escape}egroup"
+    tex_cmd="$tex_cmd${escape}the${escape}toks0${escape}relax'"
+  else
+    # In the case of a simple filename, just pass the filename
+    # with no funny tricks.
+    tex_cmd="$tex_cmd '${escape}input' '$rel$in_input'"
+  fi
+
+  verbose "$0: Running $tex_cmd ..."
+  if (eval "$tex_cmd" >&5); then
+    case $out_lang in
+      dvi | pdf ) move_to_dest "$in_noext.$out_lang";;
+    esac
+  else
+    tex_failed=true
+  fi
+}
+
+
+# run_bibtex - Run bibtex (or biber) on current file
+# - if its input (AUX) exists,
+# - or if some citations are missing (LOG contains `Citation'),
+# - or if the LOG complains of a missing .bbl.
+#
+# Don't try to be too smart:
+# 1. 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.
+#
+# 2. 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 of matching false messages.
+run_bibtex ()
+{
+  case $in_lang in
+    latex)   bibtex=${BIBTEX:-bibtex};;
+    texinfo) return;;
+  esac
+
+  # "Citation undefined" is for LaTeX, "Undefined citation" for btxmac.tex.
+  # The no .aux && \bibdata test is also for btxmac, in case it was the
+  # first run of a bibtex-using document.  Otherwise, it's possible that
+  # bibtex would never be run.
+  if test -r "$in_noext.aux" \
+     && test -r "$in_noext.log" \
+     && ( (grep 'Warning:.*Citation.*undefined' "$in_noext.log" \
+          || grep '.*Undefined citation' "$in_noext.log" \
+          || grep 'No file .*\.bbl\.' "$in_noext.log") \
+          || (grep 'No \.aux file' "$in_noext.log" \
+              && grep '^\\bibdata' "$in_noext.aux") ) \
+        >&6 2>&1; \
+  then
+    bibtex_aux=`filter_files bibaux_file_p`
+    for f in $bibtex_aux; do
+      run $bibtex "$f"
+    done
+  fi
+
+  # biber(+biblatex) check.
+  if test -r "$in_noext.bcf" \
+     && grep '' "$in_noext.bcf" >/dev/null; then
+    run ${BIBER:-biber} "$in_noext"
+  fi
+}
+
+
+# filter_file PREDICATE - Go through the list of files in xref_files_new
+# and use PREDICATE on each one to optionally print it or print other files 
+# based on the filename.
+filter_files ()
+{
+  test -n "$xref_files_new" || return 0
+  echo "$xref_files_new" |
+  # Filter existing files matching the criterion.
+  #
+  while read file; do
+    $1 "$file"
+  done |
+  sort |
+  # Some files are opened several times, e.g., listings.sty's *.vrb.
+  uniq
+}
+
+# run_index - Run texindex (or makeindex or texindy) 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.
+run_index ()
+{
+  index_files=`filter_files index_file_p`
+  test -n "$index_files" \
+  || return 0
+
+  : ${MAKEINDEX:=makeindex}
+  : ${TEXINDEX:=texindex}
+  : ${TEXINDY:=texindy}
+
+  case $in_lang:$latex2html:`out_lang_tex` in
+    latex:tex4ht:html)
+      for index_file in $index_files
+      do
+        index_noext=`noext "$index_file"`
+        run tex \
+            '\def\filename{{'"$index_noext"'}{idx}{4dx}{ind}}
+             \input idxmake.4ht'
+        run $MAKEINDEX -o $index_noext.ind $index_noext.4dx
+      done
+      ;;
+
+    latex:*)
+      if $TEXINDY --version >&6 2>&1; then
+        run $TEXINDY $index_files
+      else
+        run $MAKEINDEX $index_files
+      fi
+      ;;
+
+    texinfo:*)
+      run $TEXINDEX $index_files
+      ;;
+  esac
+}
+
+
+# run_tex4ht - Run the last two phases of TeX4HT: tex4ht extracts the
+# HTML from the instrumented DVI file, and t4ht converts the figures and
+# installs the files when given -d.
+#
+# Because knowing exactly which files are created is complex (in
+# addition the names are not simple to compute), which makes it
+# difficult to install the output files in a second step, we
+# tell t4ht to install the output files.
+run_tex4ht ()
+{
+  case $in_lang:$latex2html:`out_lang_tex` in
+    latex:tex4ht:html)
+      : ${TEX4HT:=tex4ht} ${T4HT:=t4ht}
+      run "$TEX4HT" "-f/$in_noext"
+      # Do not remove the / after the destdir.
+      run "$T4HT" "-d`destdir`/" "-f/$in_noext"
+      ;;
+  esac
+}
+
+
+# run_thumbpdf - Run thumbpdf.
+run_thumbpdf ()
+{
+  if test `out_lang_tex` = pdf \
+     && test -r "$in_noext.log" \
+     && grep 'thumbpdf\.sty'  "$in_noext.log" >&6 2>&1; \
+  then
+    thumbpdf=${THUMBPDF_CMD:-thumbpdf}
+    thumbcmd="$thumbpdf $in_dir/$in_noext"
+    verbose "Running $thumbcmd ..."
+    if $thumbcmd >&5; then
+      run_tex
+    else
+      report "$thumbpdf exited with bad status." \
+             "Ignoring its output."
+    fi
+  fi
+}
+
+
+# run_dvipdf FILE.dvi - Convert FILE.dvi to FILE.pdf.
+run_dvipdf ()
+{
+  # Find which dvi->pdf program is available.
+  if test -n "$DVIPDF"; then
+    dvipdf=$DVIPDF  # user envvar, use it without checking
+
+  elif test -z "$dvipdf"; then
+    for i in dvipdfmx dvipdfm dvipdf dvi2pdf dvitopdf; do
+      if findprog $i; then
+        dvipdf=$i
+      fi
+    done
+  fi
+  # These tools have varying interfaces, some 'input output', others
+  # 'input -o output'.  They all seem to accept 'input' only,
+  # outputting using the expected file name.
+  run $dvipdf "$1"
+  if test ! -f `echo "$1" | $SED -e 's/\.dvi$/.pdf/'`; then
+    error 1 "cannot find output file"
+  fi
+}
+
+# run_tex_suite - Run the TeX tools until a stable point is reached.
+run_tex_suite ()
+{
+  make_tex_cmd
+
+  # Move to the working directory.
+  if $tidy; then
+    verbose "cd $work_build"
+    cd_dir "$work_build" || exit 1
+  fi
+
+  # Count the number of cycles.
+  suite_cycle=0
+
+  # Start by checking the log files for what files were created last
+  # time.  This will mean that if they don't change, we finish in 1 cycle.
+  xref_files_new=`generated_files_get`
+  xref_files_save
+
+  while :; do
+    # check for (probably) LaTeX loop (e.g. varioref)
+    if test $suite_cycle -eq "$max_iters"; then
+      error 0 "Maximum of $max_iters cycles exceeded"
+      break
+    fi
+
+    # report progress
+    suite_cycle=`expr $suite_cycle + 1`
+    verbose "Cycle $suite_cycle for $command_line_filename"
+
+    tex_failed=false
+    run_core_conversion
+    xref_files_changed || break
+    xref_files_save
+
+    # We run bibtex first, because it's more likely for the indexes
+    # to change after bibtex is run than the reverse, though either
+    # would be rare.
+    run_bibtex
+    run_index
+  done
+
+  if $tex_failed ; then
+    # TeX failed, and the xref files did not change.
+    error 1 "$tex exited with bad status, quitting."
+  fi
+
+  # If we were using thumbpdf and producing PDF, then run thumbpdf
+  # and TeX one last time.
+  run_thumbpdf
+
+  # If we are using tex4ht, call it.
+  run_tex4ht
+
+  # Install the result if we didn't already (i.e., if the output is
+  # dvipdf or ps).
+  case $latex2html:$out_lang in
+    *:dvipdf)
+      run_dvipdf "$in_noext.`out_lang_tex`"
+      move_to_dest "$in_noext.`out_lang_ext`"
+      ;;
+    *:ps)
+      : ${DVIPS:=dvips}
+      run $DVIPS -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`"
+      move_to_dest "$in_noext.`out_lang_ext`"
+      ;;
+  esac
+
+  cd_orig
+}
+
+
+#  TeX processing auxiliary tools.
+#
+# run_makeinfo - 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.
+run_makeinfo ()
+{
+  test $in_lang = texinfo \
+    || return 0
+
+  # Unless required by the user, makeinfo expansion is wanted only
+  # if texinfo.tex is too old.
+  if $expand; 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.
+    # Run in a temporary directory to avoid leaving files.
+    version_test_dir=$t2ddir/version_test
+    ensure_dir "$version_test_dir"
+    if (
+       cd "$version_test_dir"
+       echo '\input texinfo.tex @bye' >txiversion.tex
+       # Be sure that if tex wants to fail, it is not interactive:
+       # close stdin.
+       $TEX txiversion.tex txiversion.out 2>txiversion.err
+    ); then :; else
+      report "texinfo.tex appears to be broken.
+This may be due to the environment variable TEX set to something
+other than (plain) tex, a corrupt texinfo.tex file, or 
+to tex itself simply not working."
+      cat "$version_test_dir/txiversion.out"
+      cat "$version_test_dir/txiversion.err" >&2
+      error 1 "quitting."
+    fi
+    eval `$SED -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p' "$version_test_dir/txiversion.out"`
+    verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..."
+    if test "$txiprereq" -le "$txiversion" >&6 2>&1; then
+      makeinfo=
+    else
+      makeinfo=${MAKEINFO:-makeinfo}
+    fi
+    # If TeX is preloaded, offer the user this convenience:
+    if test "$txiformat" = Texinfo; then
+      escape=@
+    fi
+  fi
+
+  if test -n "$makeinfo"; then
+    # in_src: the file with macros expanded.
+    # Use the same basename to generate the same aux file names.
+    work_src=$workdir/src
+    ensure_dir "$work_src"
+    in_src=$work_src/$in_base
+    run_mi_includes=`list_prefix includes -I`
+    verbose "Macro-expanding $command_line_filename to $in_src ..."
+    # eval $makeinfo because it might be defined as something complex
+    # (running missing) and then we end up with things like '"-I"',
+    # and "-I" (including the quotes) is not an option name.  This
+    # happens with gettext 0.14.5, at least.
+    $SED "$comment_iftex" "$command_line_filename" \
+      | eval $makeinfo --footnote-style=end -I "$in_dir" $run_mi_includes \
+        -o /dev/null --macro-expand=- \
+      | $SED "$uncomment_iftex" >"$in_src"
+    # Continue only if everything succeeded.
+    if test $? -ne 0 \
+       || test ! -r "$in_src"; then
+      verbose "Expansion failed, ignored...";
+    else
+      in_input=$in_src
+    fi
+  fi
+}
+
+# Unfortunately, makeinfo --iftex --no-ifinfo doesn't work well enough
+# in versions before 5.0, as makeinfo can't parse the TeX commands
+# inside @tex blocks, so work around with sed.
+#
+# This sed script 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.
+# Similarly, preserve the @top node to avoid makeinfo complaining about
+# it being missed.  Comment it out after preprocessing, so that it does
+# not appear in the generated document.
+#
+# We assume that `@c _texi2dvi' or `@c (_texi2dvi)' starting a line is
+# not present in the document.  Additionally, conditionally defined
+# macros inside the @top node may end up with the wrong value, although
+# this is unlikely in practice.
+#
+comment_iftex=\
+'/^@tex/,/^@end tex/{
+  s/^/@c _texi2dvi/
+}
+/^@iftex/,/^@end iftex/{
+  s/^/@c _texi2dvi/
+  /^@c _texi2dvi@macro/,/^@c _texi2dvi@end macro/{
+    s/^@c _texi2dvi//
+  }
+}
+/^@ifnottex/,/^@end ifnottex/{
+  s/^/@c (_texi2dvi)/
+  /^@c (_texi2dvi)@node Top/,/^@c (_texi2dvi)@end ifnottex/ {
+    /^@c (_texi2dvi)@end ifnottex/b
+    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/'
+
+# Uncomment @iftex blocks by removing any leading `@c texi2dvi' (repeated
+# copies can sneak in via macro invocations).  Likewise, comment out
+# the @top node inside a @ifnottex block.
+uncomment_iftex=\
+'s/^@c _texi2dvi\(@c _texi2dvi\)*//
+/^@c (_texi2dvi)@ifnottex/,/^@c (_texi2dvi)@end ifnottex/{
+  s/^/@c (_texi2dvi)/
+}'
+
+
+# insert_commands - Insert $textra commands at the beginning of the file. 
+# Recommended to be used for @finalout, @smallbook, etc.
+insert_commands ()
+{
+  if test -n "$textra"; then
+    # _xtr.  The file with the user's extra commands.
+    work_xtr=$workdir/xtr
+    in_xtr=$work_xtr/$in_base
+    ensure_dir "$work_xtr"
+    verbose "Inserting extra commands: $textra"
+    case $in_lang in
+      latex)   textra_cmd=1i;;
+      texinfo)
+        textra_cmd='/^\\input texinfo/a'
+        # insert after @setfilename line if present
+        if head -n 10 $in_input | grep '^@setfilename' ; then
+          textra_cmd='/^@setfilename/a'
+        fi
+        ;;
+      *)       error 1 "internal error, unknown language: $in_lang";;
+    esac
+    $SED "$textra_cmd\\
+$textra" "$in_input" >"$in_xtr"
+    in_input=$in_xtr
+  fi
+
+  case $in_lang:$latex2html:`out_lang_tex` in
+    latex:tex4ht:html)
+      # _tex4ht.  The file with the added \usepackage{tex4ht}.
+      work_tex4ht=$workdir/tex4ht
+      in_tex4ht=$work_tex4ht/$in_base
+      ensure_dir "$work_tex4ht"
+      verbose "Inserting \\usepackage{tex4ht}"
+      perl -pe 's<\\documentclass(?:\[.*\])?{.*}>
+                 <$&\\usepackage[xhtml]{tex4ht}>' \
+        "$in_input" >"$in_tex4ht"
+      in_input=$in_tex4ht
+      ;;
+  esac
+}
+
+
+# compute_language FILENAME - Return the short string for the language
+# in which FILENAME is written: `texinfo' or `latex'.
+compute_language ()
+{
+  # 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
+    echo $set_language
+  elif $SED 1q "$1" | grep 'input texinfo' >&6; then
+    echo texinfo
+  else
+    # 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 $1 in
+      *.ltx | *.tex | *.drv | *.dtx) echo latex;;
+      *)                             echo texinfo;;
+    esac
+  fi
+}
+
+
+# run_hevea (MODE) - Convert to HTML/INFO/TEXT.
+#
+# Don't pass `-noiso' to hevea: it's useless in HTML since anyway the
+# charset is set to latin1, and troublesome in other modes since
+# accented characters loose their accents.
+#
+# Don't pass `-o DEST' to hevea because in that case it leaves all its
+# auxiliary files there too...  Too bad, because it means we will need
+# to handle images some day.
+run_hevea ()
+{
+  run_hevea_name="${HEVEA:-hevea}"
+  run_hevea_cmd="$run_hevea_name"
+
+  case $1 in
+    html) ;;
+    text|info) run_hevea_cmd="$run_hevea_cmd -$1";;
+    *) error 1 "run_hevea_cmd: invalid argument: $1";;
+  esac
 
-Makeinfo is used to perform Texinfo macro expansion before running TeX
-when needed.
+  # Compiling to the tmp directory enables to preserve a previous
+  # successful compilation.
+  run_hevea_cmd="$run_hevea_cmd -fix -O -o '$out_base'"
+  run_hevea_cmd="$run_hevea_cmd `list_prefix includes -I` -I '$orig_pwd' "
+  run_hevea_cmd="$run_hevea_cmd '$rel$in_input'"
 
-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
+  if $debug; then
+    run_hevea_cmd="$run_hevea_cmd -v -v"
+  fi
 
-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 ,
-general questions and discussion to .
-Texinfo home page: http://www.gnu.org/software/texinfo/"
+  verbose "running $run_hevea_cmd"
+  if eval "$run_hevea_cmd" >&5; then
+    # hevea leaves trailing white spaces, this is annoying.
+    case $1 in text|info)
+      perl -pi -e 's/[ \t]+$//g' "$out_base"*;;
+    esac
+    case $1 in
+    html|text) move_to_dest "$out_base";;
+    info) # There can be foo.info-1, foo.info-2 etc.
+               move_to_dest "$out_base"*;;
+    esac
+  else
+    error 1 "$run_hevea_name exited with bad status, quitting."
+  fi
+}
 
-# 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`
+# run_core_conversion - Run TeX (or HeVeA).
+run_core_conversion ()
+{
+  case $in_lang:$latex2html:`out_lang_tex` in
+    *:dvi|*:pdf|latex:tex4ht:html)
+        run_tex;;
+    latex:*:html|latex:*:text|latex:*:info)
+        run_hevea $out_lang;;
+    *)
+        error 1 "invalid input/output combination: $in_lang/$out_lang";;
+  esac
+}
 
-# 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
+# compile - Run the full compilation chain, from pre-processing to
+# installation of the output at its expected location.
+compile ()
+{
+  # Set include path for tools:
+  #   .  Include current directory in case there are files there already, so
+  #     we don't have more TeX runs than necessary.  orig_pwd is used in case 
+  #     we are in clean build mode, where we have cd'd to a temp directory.
+  #   .  Include directory containing file, in case there are other
+  #     files @include'd.
+  #   .  Keep a final path_sep to get the default (system) TeX
+  #     directories included.
+  #   .  If we have any includes, put those at the end.
+
+  common="$orig_pwd$path_sep$in_dir$path_sep"
+  #
+  txincludes=`list_infix includes $path_sep`
+  test -n "$txincludes" && common="$common$txincludes$path_sep"
+  #
+  for var in $tex_envvars; do
+    eval val="\$common\$${var}_orig"
+    # Convert relative paths to absolute paths, so we can run in another
+    # directory (e.g., in clean build mode, or during the macro-support
+    # detection).
+    val=`absolute_filenames "$val"`
+    eval $var="\"$val\""
+    export $var
+    eval verbose \"$var=\'\$${var}\'\"
+  done
+
+  # --expand
+  run_makeinfo
+
+  # --command, --texinfo
+  insert_commands
+
+  # Run until a fixed point is reached.
+  run_tex_suite
+}
+
+# make_openout_test FLAGS EXTENSION
+# - Run TeX with an input file that performs an \openout.  Pass FLAGS to TeX.
+#
+make_openout_test ()
+{
+    recorder_option_maybe="$1"
+    make_tex_cmd
+
+    ensure_dir "$workdir"/check_recorder
+    cd_dir "$workdir"/check_recorder
+
+    cat > openout.tex </dev/null 2>&1)
+}
+
+# Check tex supports -recorder option
+check_recorder_support ()
+{
+  verbose "Checking TeX recorder support..."
+  make_openout_test " -recorder" fls
+  if test -f openout.fls && grep '^OUTPUT dum.dum$' openout.fls > /dev/null
+  then
+    cd_orig
+    verbose "Checking TeX recorder support... yes"
+    return 0
+  else
+    cd_orig
+    verbose "Checking TeX recorder support... no"
+    return 1
+  fi
+}
+
+# Check tex supports \openout traces in log
+check_openout_in_log_support ()
+{
+  verbose "Checking TeX \openout in log support..."
+  make_openout_test "" log
+  if test -f openout.log \
+     && grep '^\\openout..\? *= *`\?dum\.dum'\''\?' openout.log >/dev/null
+  then
+    cd_orig
+    verbose "Checking TeX \openout in log support... yes"
+    return 0
+  else
+    cd_orig
+    verbose "Checking TeX \openout in log support... no"
+    return 1
+  fi
+}
+
+# Set that output auxiliary files are detected with the -recorder option,
+# which creates a file JOBNAME.fls which is a machine-readable listing of
+# files read and written during the job.
+set_aux_files_from_fls ()
+{
+  recorder_option_maybe=" -recorder"
+  generated_files_get_method=generated_files_get_from_fls
+}
+
+# Set that output auxiliary files are detected with searching for \openout
+# in the log file.
+set_aux_files_from_log ()
+{
+  recorder_option_maybe=''
+  generated_files_get_method=generated_files_get_from_log
+}
+
+# Decide whether output auxiliary files are detected with the -recorder
+# option, or by searching for \openout in the log file.
+decide_aux_files_method ()
+{
+  # Select output file detection method
+  # Valid values of TEXI2DVI_USE_RECORDER are:
+  #   yes           use the -recorder option, no checks.
+  #   no            scan for \openout in the log file, no checks.
+  #   yesmaybe      check whether -recorder option is supported, and if yes
+  #                use it, otherwise check for tracing \openout in the
+  #                log file is supported, and if yes use it, else it is an 
+  #                error.
+  #   nomaybe      same as `yesmaybe', except that the \openout trace in
+  #                log file is checked first.
+  #
+  #  The default behaviour is `nomaybe'.
+
+  test -n "$TEXI2DVI_USE_RECORDER" || TEXI2DVI_USE_RECORDER=nomaybe
+
+  case $TEXI2DVI_USE_RECORDER in
+    yes) set_aux_files_from_fls;;
+
+    no)	set_aux_files_from_log;;
+
+    yesmaybe)
+      if check_recorder_support; then
+        set_aux_files_from_fls
+      elif check_openout_in_log_support; then
+        set_aux_files_from_log
+      else
+        error 1 "TeX neither supports -recorder nor outputs \\openout lines in its log file"
+      fi
+      ;;
+
+    nomaybe)
+      if check_openout_in_log_support; then
+        set_aux_files_from_log
+      elif check_recorder_support; then
+        set_aux_files_from_fls
+      else
+        error 1 "TeX neither supports -recorder nor outputs \\openout lines in its log file"
+      fi
+      ;;
+    
+    *) error 1 "Invalid value of TEXI2DVI_USE_RECORDER environment variable : $TEXI2DVI_USE_RECORDER.";;
+
+  esac
+}
+
+# remove FILE...
+remove ()
+{
+  verbose "Removing" "$@"
+  rm -rf "$@"
+}
+
+
+# all_files - Echo the names of all files generated, including those by
+#             auxiliary tools like texindex.
+all_files ()
+{
+  echo $in_noext.log
+  echo $in_noext.fls
+  echo $xref_files_new
+  echo `sorted_index_files`
+}
+
+sorted_index_files ()
+{
+  filter_files sorted_index_filter
+}
+
+# Print the name of a generated file based on FILE if there is one.
+sorted_index_filter ()
+{
+  case $in_lang in
+    texinfo)
+      # texindex: texinfo.cp -> texinfo.cps
+      if test -n "`index_file_p $1`" ; then
+        echo $1s
+      fi
+      ;;
+  esac
+}
+
+
+# Not currently used - use with filter_files to add secondary files created by 
+# bibtex
+bibtex_secondary_files ()
+{
+  case $in_lang in
+    latex)
+      if test -n "`aux_file_p $1`"; then
+        # bibtex: *.aux -> *.bbl and *.blg.
+        echo $1 | $SED 's/^\(.*\)\.aux$/\1.bbl/'
+        echo $1 | $SED 's/^\(.*\)\.aux$/\1.blg/'
+      fi
+      ;;
+  esac
+}
+
+# mostly_clean - Remove auxiliary files and directories.  Changes back to
+# the original directory.
+mostly_clean ()
+{
+  cd_orig
+  set X "$t2ddir"
+  shift
+  $tidy || {
+    set X ${1+"$@"} `all_files`
+    shift
+  }
+  remove ${1+"$@"}
+}
+
+
+# cleanup - Remove what should be removed according to options.
+# Called at the end of each compilation cycle, and at the end of
+# the script.  Changes the current directory.
+cleanup ()
+{
+  case $clean:$tidy in
+    true:true) mostly_clean ;;                # build mode is "clean"
+    false:false) cd_orig; remove "$t2ddir";;  # build mode is "local"
+  esac
+}
 
-# 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
+#  input_file_name_decode - Decode COMMAND_LINE_FILENAME, and set the
+# following shell variables:
+#
+# - COMMAND_LINE_FILENAME
+#   The filename given on the commmand line, but cleaned of TeX commands.
+# - IN_DIR
+#   The directory containing the input file.
+# - IN_BASE
+#   The input file base name (no directory part).
+# - IN_NOEXT
+#   The input file name with neither file extensions nor directory part.
+# - IN_INPUT
+#   The path to the input file for passing as a command-line argument
+#   to TeX.  Defaults to COMMAND_LINE_FILENAME, but might change if the
+#   input is preprocessed.
+input_file_name_decode ()
+{
+  case $command_line_filename in
+    *\\input{*}*)
+      # Let AUC-TeX error parser deal with line numbers.
+      line_error=false
+      command_line_filename=`\
+        expr X"$command_line_filename" : X'.*input{\([^}]*\)}'`
+      ;;
+  esac
+
+  # 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" | LC_ALL=C $EGREP '^(/|[A-Za-z]:/)' >&6 \
+  || 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.
+  test -r "$command_line_filename" \
+  || error 1 "cannot read $command_line_filename, skipping."
+
+  # Get the name of the current directory.
+  in_dir=`func_dirname "$command_line_filename"`
+
+  # Strip directory part but leave extension.
+  in_base=`basename "$command_line_filename"`
+  # Strip extension.
+  in_noext=`noext "$in_base"`
+
+  # The normalized file name to compile.  Must always point to the
+  # file to actually compile (in case of recoding, macro-expansion etc.).
+  in_input=$in_dir/$in_base
+
+
+  # Compute the output file name.
+  if test x"$oname" != x; then
+    out_name=$oname
+  else
+    out_name=$in_noext.`out_lang_ext`
+  fi
+  out_dir=`func_dirname "$out_name"`
+  out_dir_abs=`absolute "$out_dir"`
+  out_base=`basename "$out_name"`
+  out_noext=`noext "$out_base"`
+}
+
+
+# 
+#################### Main program starts ##########################
+
+# Initialize more variables.
+#
+# Save TEXINPUTS so we can construct a new TEXINPUTS path for each file.
+# Likewise for bibtex and makeindex.
+tex_envvars="BIBINPUTS BSTINPUTS DVIPSHEADERS INDEXSTYLE MFINPUTS MPINPUTS \
+TEXINPUTS TFMFONTS"
+for var in $tex_envvars; do
+  eval ${var}_orig=\$$var
+  export $var
+done
 
 # Push a token among the arguments that will be used to notice when we
 # ended options/arguments parsing.
@@ -125,48 +1767,53 @@ export TEXINPUTS INDEXSTYLE
 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/[^=]*=//'`
+      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*)
+    -~ ) verbose "Option -~ is obsolete: texi2dvi ignores it.";;
+    -b | --batch) ;; # Obsolete
+         --build)      shift; build_mode=$1;;
+         --build-dir)  shift; build_dir=$1; build_mode=tidy;;
+    -c | --clean) build_mode=clean;;
+    -D | --debug) debug=true;;
+    -e | -E | --expand) expand=true;;
+    -h | --help) usage;;
+    -I)   shift; list_concat_dirs includes "$1";;
+    -l | --lang | --language) shift; set_language=$1;;
+    --mostly-clean) action=mostly-clean;;
+    --no-line-error) line_error=false;;
+    --max-iterations) shift; max_iters=$1;;
+    -o | --out  | --output)
       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;;
+      # Make it absolute, just in case we also have --clean, or whatever.
+      oname=`absolute "$1"`;;
+
+    # Output formats.
+    -O|--output-format) shift; out_lang_set "$1";;
+       --dvi|--dvipdf|--html|--info|--pdf|--ps|--text)
+       out_lang_set `echo "x$1" | $SED 's/^x--//'`;;
+
+    -p) out_lang_set pdf;;
+    -q | -s | --quiet | --silent) quiet=true;;
+    --src-specials) src_specials=--src-specials;;
+    --shell-escape) shell_escape=--shell-escape;;  
+    --tex4ht) latex2html=tex4ht;;
+    -t | --texinfo | --command ) shift; textra="$textra\\
+"`echo "$1" | $SED 's/\\\\/\\\\\\\\/g'`;;
+    --translate-file ) shift; translate_file="$1";;
+    --tidy) build_mode=tidy;;
+    -v | --vers*) version;;
+    -V | --verb*) verb=true;;
     --) # What remains are not options.
       shift
       while test x"$1" != x"$arg_sep"; do
@@ -175,9 +1822,9 @@ $1";;
       done
       break;;
     -*)
-      echo "$0: Unknown or ambiguous option \`$1'." >&2
-      echo "$0: Try \`--help' for more information." >&2
-      exit 1;;
+      error 1 "Unknown or ambiguous option \`$1'." \
+              "Try \`--help' for more information."
+      ;;
     *) set dummy ${1+"$@"} "$1"; shift;;
    esac
    shift
@@ -185,474 +1832,165 @@ done
 # Pop the token
 shift
 
+# $tidy:  compile in a t2d directory.
+# $clean: remove all the aux files.
+case $build_mode in
+  local) clean=false; tidy=false;;
+  tidy)  clean=false; tidy=true;;
+  clean) clean=true;  tidy=true;;
+      *) error 1 "invalid build mode: $build_mode";;
+esac
+
 # 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
+  error 2 "Missing file arguments." "Try \`--help' for more information."
   ;;
  1) ;;
  *)
   if test -n "$oname"; then
-    echo "$0: Can't use option \`--output' with more than one argument." >&2
-    exit 2
+    error 2 "Can't use option \`--output' with more than one argument."
   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 <$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 <$uncomment_iftex_sed
-s/^@c texi2dvi//
-EOF
+# We can't do much without tex.
+# End up with the TEX and PDFTEX variables set to what we are going to use.
+#
+# If $TEX is set to a directory, don't use it.
+test -n "$TEX" && test -d "$TEX" && unset TEX
 
-# 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
+# But otherwise, use $TEX if it is set.
+if test -z "$TEX"; then
+  if findprog tex; then :; else cat <&2
+You don't have a working TeX binary (tex) installed anywhere in
+your PATH, and texi2dvi cannot proceed without one.  If you want to use
+this script, you'll need to install TeX (if you don't have it) or change
+your PATH or TEX environment variable (if you do).  See the --help
+output for more details.
 
-# 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"
+For information about obtaining TeX, please see http://tug.org/texlive,
+or do a web search for TeX and your operating system or distro.
+EOM
+    exit 1
   fi
-done
-echo "$xref_files"
-EOF
-chmod 500 $get_xref_files
+
+  # We want to use etex (or pdftex) if they are available, and the user
+  # didn't explicitly specify.  We don't check for elatex and pdfelatex
+  # because (as of 2003), the LaTeX team has asked that new distributions
+  # use etex by default anyway.
+  #
+  if findprog etex; then TEX=etex; else TEX=tex; fi
+fi
+
+# For many years, the pdftex binary has included the e-tex extensions,
+# but for those people with ancient TeX distributions ...
+if test -z "$PDFTEX"; then
+  if findprog pdfetex; then PDFTEX=pdfetex; else PDFTEX=pdftex; fi
+fi
+
 
 # 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)
+# 6 tracing/debugging (set -x output, etc.)
 
-# Tools' output.  If quiet, discard, else redirect to the message flow.
-if test "$quiet" = t; then
+# Main tools' output (TeX, etc.) that TeX users are used to seeing.
+#
+# If quiet, discard, else redirect to the message flow.
+if $quiet; 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"
+# Enable tracing, and auxiliary tools output.
+# 
+# This fd should be used where you'd typically use /dev/null to throw
+# output away.  But sometimes it is convenient to see that output (e.g.,
+# from a grep) to aid debugging.  Especially debugging at distance, via
+# the user.
+# 
+if $debug; then
+  exec 6>&1
+  set -vx
+else
+  exec 6>/dev/null
+fi
 
-  # 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`
+#  Main program main loop - TeXify each file in turn.
+for command_line_filename
+do
+  verbose "Processing $command_line_filename ..."
 
-  # 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
+  input_file_name_decode
 
-  # 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
-      ;;
+  # `texinfo' or `latex'?
+  in_lang=`compute_language "$command_line_filename"`
 
-    *)
-      # 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
-      ;;
+  # An auxiliary directory used for all the auxiliary tasks involved
+  # in compiling this document.
+  case $build_dir in
+      '' | . ) t2ddir=$out_noext.t2d ;;
+      *) # Avoid collisions between multiple occurrences of the same
+         # file, so depend on the output path.  Remove leading `./',
+         # at least to avoid creating a file starting with `.!', i.e.,
+         # an invisible file. The sed expression is fragile if the cwd
+         # has active characters.  Transform / into ! so that we don't
+         # need `mkdir -p'.  It might be something to reconsider.
+         t2ddir=$build_dir/`echo "$out_dir_abs/$out_noext.t2d" |
+             $SED "s,^$orig_pwd/,,;s,^\./,,;s,/,!,g"`
   esac
+  # Remove it at exit if clean mode.
+  trap "cleanup" 0 1 2 15
 
-  # 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
+  ensure_dir "$build_dir" "$t2ddir"
 
-  # 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
+  # Sometimes there are incompatibilities between auxiliary files for
+  # DVI and PDF.  The contents can also change whether we work on PDF
+  # and/or DVI.  So keep separate spaces for each.
+  workdir=$t2ddir/`out_lang_tex`
+  ensure_dir "$workdir"
 
-  # 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
+  # _build.  In a tidy build, where the auxiliary files are output.
+  if $tidy; then
+    work_build=$workdir/build
+  else
+    work_build=.
   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 o
-    # -- don't match whitespace as .
-    # 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
+  # _bak.  Copies of the previous auxiliary files (another round is
+  # run if they differ from the new ones).
+  work_bak=$workdir/bak
 
-    # 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
+  # Make those directories.
+  ensure_dir "$work_build" "$work_bak"
 
-  # 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
+  # Decide how to find auxiliary files created by TeX.
+  decide_aux_files_method
+  
+  case $action in
+    compile)
+      # Compile the document.
+      compile
+      cleanup
+      ;;
 
-  # 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
+    mostly-clean)
+      xref_files_new=`generated_files_get`
+      mostly_clean
+      ;;
+  esac
 done
 
-$verbose "$0 done."
+verbose "done."
 exit 0 # exit successfully, not however we ended the loop.
+# Local Variables:
+# sh-basic-offset: 2
+# sh-indentation: 2
+# End:
diff --git a/support/xcase.c b/support/xcase.c
index efd11be..527840d 100644
--- a/support/xcase.c
+++ b/support/xcase.c
@@ -36,9 +36,12 @@
 extern int errno;
 #endif
 
+extern int optind;
+
 #define LOWER	1
 #define UPPER	2
 
+int
 main(ac, av)
 int	ac;
 char	**av;
diff --git a/syntax.h b/syntax.h
index e01110e..34f5496 100644
--- a/syntax.h
+++ b/syntax.h
@@ -1,6 +1,6 @@
 /* syntax.h -- Syntax definitions for the shell */
 
-/* Copyright (C) 2000, 2001, 2005, 2008,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2005, 2008, 2009-2020 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -75,6 +75,8 @@ extern int sh_syntabsiz;
 
 #define shellblank(c)	(sh_syntaxtab[(unsigned char)(c)] & CBLANK)
 
+#define parserblank(c)	((c) == ' ' || (c) == '\t')
+
 #define issyntype(c, t)	((sh_syntaxtab[(unsigned char)(c)] & (t)) != 0)
 #define notsyntype(c,t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) == 0)
 
diff --git a/test.c b/test.c
index 180940c..9997df1 100644
--- a/test.c
+++ b/test.c
@@ -2,7 +2,7 @@
 
 /* Modified to run with the GNU shell Apr 25, 1988 by bfox. */
 
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -32,7 +32,7 @@
 
 #include "bashtypes.h"
 
-#if !defined (HAVE_LIMITS_H)
+#if !defined (HAVE_LIMITS_H) && defined (HAVE_SYS_PARAM_H)
 #  include 
 #endif
 
@@ -50,6 +50,7 @@ extern int errno;
 #endif /* !_POSIX_VERSION */
 #include "posixstat.h"
 #include "filecntl.h"
+#include "stat-time.h"
 
 #include "bashintl.h"
 
@@ -100,33 +101,33 @@ extern int errno;
 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)
+	do { test_error_return = val; sh_longjmp (test_exit_buf, 1); } while (0)
 
-extern int sh_stat __P((const char *, struct stat *));
+extern int sh_stat PARAMS((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 void test_syntax_error PARAMS((char *, char *)) __attribute__((__noreturn__));
+static void beyond PARAMS((void)) __attribute__((__noreturn__));
+static void integer_expected_error PARAMS((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 unary_operator PARAMS((void));
+static int binary_operator PARAMS((void));
+static int two_arguments PARAMS((void));
+static int three_arguments PARAMS((void));
+static int posixtest PARAMS((void));
 
-static int expr __P((void));
-static int term __P((void));
-static int and __P((void));
-static int or __P((void));
+static int expr PARAMS((void));
+static int term PARAMS((void));
+static int and PARAMS((void));
+static int or PARAMS((void));
 
-static int filecomp __P((char *, char *, int));
-static int arithcomp __P((char *, char *, int, int));
-static int patcomp __P((char *, char *, int));
+static int filecomp PARAMS((char *, char *, int));
+static int arithcomp PARAMS((char *, char *, int, int));
+static int patcomp PARAMS((char *, char *, int));
 
 static void
 test_syntax_error (format, arg)
@@ -156,7 +157,7 @@ integer_expected_error (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
+   past the end of the argument list.  This check is suppressed 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)
@@ -224,6 +225,7 @@ and ()
  *	'-'('G'|'L'|'O'|'S'|'N') filename
  * 	'-t' [int]
  *	'-'('z'|'n') string
+ *	'-'('v'|'R') varname
  *	'-o' option
  *	string
  *	string ('!='|'='|'==') string
@@ -271,14 +273,11 @@ term ()
   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]);
-    }
+  /* Might be a switch type argument -- make sure we have enough arguments for
+     the unary operator and argument */
+  else if ((pos + 2) <= argc && test_unop (argv[pos]))
+    value = unary_operator ();
+
   else
     {
       value = argv[pos][0] != '\0';
@@ -288,20 +287,36 @@ term ()
   return (value);
 }
 
+static int
+stat_mtime (fn, st, ts)
+     char *fn;
+     struct stat *st;
+     struct timespec *ts;
+{
+  int r;
+
+  r = sh_stat (fn, st);
+  if (r < 0)
+    return r;
+  *ts = get_stat_mtime (st);
+  return 0;
+}
+
 static int
 filecomp (s, t, op)
      char *s, *t;
      int op;
 {
   struct stat st1, st2;
+  struct timespec ts1, ts2;
   int r1, r2;
 
-  if ((r1 = sh_stat (s, &st1)) < 0)
+  if ((r1 = stat_mtime (s, &st1, &ts1)) < 0)
     {
       if (op == EF)
 	return (FALSE);
     }
-  if ((r2 = sh_stat (t, &st2)) < 0)
+  if ((r2 = stat_mtime (t, &st2, &ts2)) < 0)
     {
       if (op == EF)
 	return (FALSE);
@@ -309,8 +324,8 @@ filecomp (s, t, op)
   
   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 OT: return (r1 < r2 || (r2 == 0 && timespec_cmp (ts1, ts2) < 0));
+    case NT: return (r1 > r2 || (r1 == 0 && timespec_cmp (ts1, ts2) > 0));
     case EF: return (same_file (s, t, &st1, &st2));
     }
   return (FALSE);
@@ -324,12 +339,15 @@ arithcomp (s, t, op, flags)
   intmax_t l, r;
   int expok;
 
-  if (flags & TEST_ARITHEXP)
+  if (flags & TEST_ARITHEXP)		/* conditional command */
     {
-      l = evalexp (s, &expok);
+      int eflag;
+
+      eflag = (shell_compatibility_level > 51) ? 0 : EXP_EXPANDED;
+      l = evalexp (s, eflag, &expok);
       if (expok == 0)
 	return (FALSE);		/* should probably longjmp here */
-      r = evalexp (t, &expok);
+      r = evalexp (t, eflag, &expok);
       if (expok == 0)
 	return (FALSE);		/* ditto */
     }
@@ -378,9 +396,11 @@ binary_test (op, arg1, arg2, flags)
     return (patmatch ? patcomp (arg1, arg2, EQ) : STREQ (arg1, arg2));
   else if ((op[0] == '>' || op[0] == '<') && op[1] == '\0')
     {
+#if defined (HAVE_STRCOLL)
       if (shell_compatibility_level > 40 && flags & TEST_LOCALE)
 	return ((op[0] == '>') ? (strcoll (arg1, arg2) > 0) : (strcoll (arg1, arg2) < 0));
       else
+#endif
 	return ((op[0] == '>') ? (strcmp (arg1, arg2) > 0) : (strcmp (arg1, arg2) < 0));
     }
   else if (op[0] == '!' && op[1] == '=' && op[2] == '\0')
@@ -475,13 +495,13 @@ unary_operator ()
 	  if (legal_number (argv[pos], &r))
 	    {
 	      advance (0);
-	      return (unary_test (op, argv[pos - 1]));
+	      return (unary_test (op, argv[pos - 1], 0));
 	    }
 	  else
 	    return (FALSE);
 	}
       else
-	return (unary_test (op, "1"));
+	return (unary_test (op, "1", 0));
     }
 
   /* All of the unary operators take an argument, so we first call
@@ -489,15 +509,19 @@ unary_operator ()
      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]));
+  return (unary_test (op, argv[pos - 1], 0));
 }
 
 int
-unary_test (op, arg)
+unary_test (op, arg, flags)
      char *op, *arg;
+     int flags;
 {
   intmax_t r;
   struct stat stat_buf;
+  struct timespec mtime, atime;
+  SHELL_VAR *v;
+  int aflags;
      
   switch (op[1])
     {
@@ -523,8 +547,11 @@ unary_test (op, arg)
 	      (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);
+      if (sh_stat (arg, &stat_buf) < 0)
+	return (FALSE);
+      atime = get_stat_atime (&stat_buf);
+      mtime = get_stat_mtime (&stat_buf);
+      return (timespec_cmp (mtime, atime) > 0);
 
     case 'f':			/* File is a file? */
       if (sh_stat (arg, &stat_buf) < 0)
@@ -599,6 +626,56 @@ unary_test (op, arg)
 
     case 'o':			/* True if option `arg' is set. */
       return (minus_o_option_value (arg) == 1);
+
+    case 'v':
+#if defined (ARRAY_VARS)
+      aflags = assoc_expand_once ? AV_NOEXPAND : 0;
+      if (valid_array_reference (arg, aflags))
+	{
+	  char *t;
+	  int ret;
+	  array_eltstate_t es;
+
+	  /* Let's assume that this has already been expanded once. */
+	  /* XXX - TAG:bash-5.2 fix with corresponding fix to execute_cmd.c:
+	     execute_cond_node() that passes TEST_ARRAYEXP in FLAGS */
+
+	  if (shell_compatibility_level > 51)
+	    /* Allow associative arrays to use `test -v array[@]' to look for
+	       a key named `@'. */
+	    aflags |= AV_ATSTARKEYS;	/* XXX */
+	  init_eltstate (&es);
+	  t = get_array_value (arg, aflags|AV_ALLOWALL, &es);
+	  ret = t ? TRUE : FALSE;
+	  if (es.subtype > 0)	/* subscript is * or @ */
+	    free (t);
+	  flush_eltstate (&es);
+	  return ret;
+	}
+      else if (legal_number (arg, &r))		/* -v n == is $n set? */
+	return ((r >= 0 && r <= number_of_args()) ? TRUE : FALSE);
+      v = find_variable (arg);
+      if (v && invisible_p (v) == 0 && array_p (v))
+	{
+	  char *t;
+	  /* [[ -v foo ]] == [[ -v foo[0] ]] */
+	  t = array_reference (array_cell (v), 0);
+	  return (t ? TRUE : FALSE);
+	}
+      else if (v && invisible_p (v) == 0 && assoc_p (v))
+	{
+	  char *t;
+	  t = assoc_reference (assoc_cell (v), "0");
+	  return (t ? TRUE : FALSE);
+	}
+#else
+      v = find_variable (arg);
+#endif
+      return (v && invisible_p (v) == 0 && var_isset (v) ? TRUE : FALSE);
+
+    case 'R':
+      v = find_variable_noref (arg);
+      return ((v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v)) ? TRUE : FALSE);
     }
 
   /* We can't actually get here, but this shuts up gcc. */
@@ -620,7 +697,7 @@ test_binop (op)
   else if (op[2] == '\0' && op[1] == '~' && (op[0] == '=' || op[0] == '!'))
     return (1);
 #endif
-  else if (op[0] != '-' || op[2] == '\0' || op[3] != '\0')
+  else if (op[0] != '-' || op[1] == '\0' || op[2] == '\0' || op[3] != '\0')
     return (0);
   else
     {
@@ -664,7 +741,7 @@ int
 test_unop (op)
      char *op;
 {
-  if (op[0] != '-' || op[2] != 0)
+  if (op[0] != '-' || (op[1] && op[2] != 0))
     return (0);
 
   switch (op[1])
@@ -672,8 +749,9 @@ test_unop (op)
     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 'u': case 'v': case 'w': case 'x': case 'z':
     case 'G': case 'L': case 'O': case 'S': case 'N':
+    case 'R':
       return (1);
     }
 
@@ -685,7 +763,7 @@ 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')
+  else if (argv[pos][0] == '-' && argv[pos][1] && argv[pos][2] == '\0')
     {
       if (test_unop (argv[pos]))
 	return (unary_operator ());
@@ -698,7 +776,7 @@ two_arguments ()
   return (0);
 }
 
-#define ANDOR(s)  (s[0] == '-' && !s[2] && (s[1] == 'a' || s[1] == 'o'))
+#define ANDOR(s)  (s[0] == '-' && (s[1] == 'a' || s[1] == 'o') && s[2] == 0)
 
 /* This could be augmented to handle `-t' as equivalent to `-t 1', but
    POSIX requires that `-t' be given an argument. */
@@ -726,6 +804,7 @@ three_arguments ()
     {
       advance (1);
       value = !two_arguments ();
+      pos = argc;
     }
   else if (argv[pos][0] == '(' && argv[pos+2][0] == ')')
     {
@@ -772,6 +851,13 @@ posixtest ()
 	    value = !three_arguments ();
 	    break;
 	  }
+	else if (argv[pos][0] == '(' && argv[pos][1] == '\0' && argv[argc-1][0] == ')' && argv[argc-1][1] == '\0')
+	  {
+	    advance (1);
+	    value = two_arguments ();
+	    pos = argc;
+	    break;
+	  }
 	/* FALLTHROUGH */
       default:
 	value = expr ();
@@ -796,7 +882,7 @@ test_command (margc, margv)
 
   USE_VAR(margc);
 
-  code = setjmp (test_exit_buf);
+  code = setjmp_nosigs (test_exit_buf);
 
   if (code)
     return (test_error_return);
@@ -824,7 +910,12 @@ test_command (margc, margv)
   value = posixtest ();
 
   if (pos != argc)
-    test_syntax_error (_("too many arguments"), (char *)NULL);
+    {
+      if (pos < argc && argv[pos][0] == '-')
+	test_syntax_error (_("syntax error: `%s' unexpected"), argv[pos]);
+      else
+	test_syntax_error (_("too many arguments"), (char *)NULL);
+    }
 
   test_exit (SHELL_BOOLEAN (value));
 }
diff --git a/test.h b/test.h
index 626edc4..ffd79e5 100644
--- a/test.h
+++ b/test.h
@@ -1,6 +1,6 @@
 /* test.h -- external interface to the conditional command code. */
 
-/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -27,13 +27,14 @@
 #define TEST_PATMATCH	0x01
 #define TEST_ARITHEXP	0x02
 #define TEST_LOCALE	0x04
+#define TEST_ARRAYEXP	0x08		/* array subscript expansion */
 
-extern int test_unop __P((char *));
-extern int test_binop __P((char *));
+extern int test_unop PARAMS((char *));
+extern int test_binop PARAMS((char *));
 
-extern int unary_test __P((char *, char *));
-extern int binary_test __P((char *, char *, char *, int));
+extern int unary_test PARAMS((char *, char *, int));
+extern int binary_test PARAMS((char *, char *, char *, int));
 
-extern int test_command __P((int, char **));
+extern int test_command PARAMS((int, char **));
 
 #endif /* _TEST_H_ */
diff --git a/tests/COPYRIGHT b/tests/COPYRIGHT
index c69f297..43b39df 100644
--- a/tests/COPYRIGHT
+++ b/tests/COPYRIGHT
@@ -1,6 +1,9 @@
 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
+2004,2005,2006,2007,2008,2009,2010,2011
 Free Software Foundation, Inc.
 
+See the file COPYING in the bash distribution root directory for copying
+and usage restrictions.
+
 The file ifs-posix.tests is Copyright (C) 2005 Glen Fowler.
diff --git a/tests/alias.right b/tests/alias.right
index a37080c..76f3207 100644
--- a/tests/alias.right
+++ b/tests/alias.right
@@ -1,7 +1,8 @@
 alias: 0
 alias: 0
-./alias.tests: line 25: qfoo: command not found
+./alias.tests: line 38: qfoo: command not found
 quux
+hi
 bar
 value
 bar
@@ -10,3 +11,35 @@ OK
 OK
 OK
 OK
+one
+two
+three
+four
+one
+two
+three
+four
+Error: bar
+ok 1
+ok 2
+text
+whoops:  nullalias
+foo
+a
+a b
+a b
+a a b
+ok 3
+ok 4
+bar
+bad
+0
+<|cat>
+foo
+bar
+baz
+foo
+bar
+baz
+<áa>
+
diff --git a/tests/alias.tests b/tests/alias.tests
index a97d5ff..15eac5b 100644
--- a/tests/alias.tests
+++ b/tests/alias.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # place holder for future alias testing
 shopt -s expand_aliases
 
@@ -36,4 +49,17 @@ foo bar
 
 unalias foo bar baz
 
+# post bash-5.1 problems with compound array assignment during multiline
+# alias expansion
+alias foo='a=() b=""
+for i in 1; do echo hi; done'
+foo
+
+unalias foo
+
 ${THIS_SH} ./alias1.sub
+${THIS_SH} ./alias2.sub
+${THIS_SH} ./alias3.sub
+${THIS_SH} ./alias4.sub
+${THIS_SH} ./alias5.sub
+${THIS_SH} ./alias6.sub
diff --git a/tests/alias1.sub b/tests/alias1.sub
index ed03031..9a90b2e 100644
--- a/tests/alias1.sub
+++ b/tests/alias1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 shopt -s expand_aliases
 
 alias foo=echo
diff --git a/tests/alias2.sub b/tests/alias2.sub
new file mode 100644
index 0000000..e35fb76
--- /dev/null
+++ b/tests/alias2.sub
@@ -0,0 +1,35 @@
+#   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 .
+#
+THIS=alias2
+FN=$TMPDIR/$THIS.script
+
+cat > $FN <<'EOF'
+#
+(echo "$1")
+EOF
+chmod u+x $FN
+
+shopt -s expand_aliases
+
+alias foo1='$FN one; source $FN two; source $FN three; $FN four'
+
+alias foo2='$FN one
+source $FN two
+source $FN three
+$FN four'
+
+foo1
+foo2
+
+rm -f $FN
diff --git a/tests/alias3.sub b/tests/alias3.sub
new file mode 100644
index 0000000..304e926
--- /dev/null
+++ b/tests/alias3.sub
@@ -0,0 +1,11 @@
+shopt -s expand_aliases
+alias foo='oneword'
+foo_word='foo'
+#
+# Fails silently to match 'foo':
+#
+case "$foo_word"
+in
+	foo) ;;
+	*) echo bad 1;;
+esac
diff --git a/tests/alias4.sub b/tests/alias4.sub
new file mode 100644
index 0000000..0864a3c
--- /dev/null
+++ b/tests/alias4.sub
@@ -0,0 +1,100 @@
+#   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 .
+#
+shopt -s expand_aliases
+
+# from an austin-group report
+alias foo="echo 'Error:"
+foo bar'
+
+# from some FreeBSD sh tests
+
+v=1
+alias a='unalias -a
+v=2'
+eval a
+[ "$v" = 2 ] && echo ok 1
+v=1
+alias a='unalias a
+v=2'
+eval a
+[ "$v" = 2 ] && echo ok 2
+
+# make sure command doesn't ever reset anything even if it's made a keyword
+unalias -a
+alias command=command
+alias true='echo bad'
+eval 'command true'
+
+unalias -a
+alias alias0=command
+alias true='echo bad'
+eval 'alias0 true'
+
+# make sure null aliases are ok
+unalias -a
+alias nullalias=''
+alias foo='echo '
+foo nullalias text
+unalias foo
+
+# aliases shouldn't be expanded in quoted strings even when the previous word
+# is an alias whose expansion ends in a space
+alias foo="echo 'whoops: "
+foo nullalias'
+
+unalias -a
+
+# recursive alias definitions
+alias echo=echo
+eval echo foo
+
+alias echo='echo a'
+
+echo
+echo b
+eval echo b
+echo $(eval echo b)
+
+unalias -a
+
+# alias expansion when in a command position after redirections
+alias e=echo
+eval '&2
+
+alias a='printf "<%s>\n" \'
+a|cat
diff --git a/tests/alias5.sub b/tests/alias5.sub
new file mode 100644
index 0000000..7f8e86d
--- /dev/null
+++ b/tests/alias5.sub
@@ -0,0 +1,28 @@
+#   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 .
+#
+# -c commands ending with multi-line aliases; post-bash-5.0
+
+: ${THIS_SH:=./bash}
+
+${THIS_SH} -c "shopt -s expand_aliases &>/dev/null;
+alias myalias='/bin/echo foo
+echo bar
+echo baz'
+myalias"
+
+${THIS_SH} -c "shopt -s expand_aliases &>/dev/null;
+alias myalias='echo foo
+echo bar
+echo baz'
+myalias"
diff --git a/tests/alias6.sub b/tests/alias6.sub
new file mode 100644
index 0000000..d2d7daf
--- /dev/null
+++ b/tests/alias6.sub
@@ -0,0 +1,13 @@
+# make sure aliases that end in multibyte characters don't interfere with the
+# space sentinel alias expansion adds; problem through bash-5.1
+shopt -s expand_aliases
+
+LC_ALL=en_US.UTF-8
+
+alias a1='printf "<%s>\\n" áa'
+a1
+
+alias a2='printf "<%s>\\n" aá'
+a2
+
+unalias a1 a2
diff --git a/tests/appendop.right b/tests/appendop.right
index 1e24333..f72696b 100644
--- a/tests/appendop.right
+++ b/tests/appendop.right
@@ -1,7 +1,7 @@
 14
 1 2 3 4 5 6
 1 2 3 4 51 6
-5
+145
 14
 7
 42
@@ -15,4 +15,14 @@
 4
 9
 16
-./appendop.tests: line 83: x: readonly variable
+./appendop.tests: line 97: x: readonly variable
+declare -A foo=([two]="baz" [three]="quux" [one]="bar" )
+declare -A foo=([0]="zero" [two]="baz" [three]="quux" [one]="bar" )
+declare -A foo=([four]="four" [0]="zero" [two]="baz" [three]="quux" [one]="bar" )
+declare -ai iarr=([0]="3" [1]="2" [2]="3")
+declare -ai iarr=([0]="3" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6")
+25 25
+7 7
+14
+145
+145 145
diff --git a/tests/appendop.tests b/tests/appendop.tests
index 7b61f3f..61b38fc 100644
--- a/tests/appendop.tests
+++ b/tests/appendop.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # basic cases
 a=1
 a+=4
@@ -12,7 +25,8 @@ x[4]+=1
 echo ${x[@]}
 
 # trickier cases
-
+# post-bash-4.2: bash understands += in environment assignments preceding
+# command names
 a+=5 printenv a
 echo $a
 
@@ -81,3 +95,6 @@ readonly x+=7
 echo $x
 
 x+=5
+
+${THIS_SH} ./appendop1.sub
+${THIS_SH} ./appendop2.sub
diff --git a/tests/appendop1.sub b/tests/appendop1.sub
new file mode 100644
index 0000000..60e7014
--- /dev/null
+++ b/tests/appendop1.sub
@@ -0,0 +1,28 @@
+#   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 .
+#
+typeset -A foo=([one]=bar [two]=baz [three]=quux)
+typeset -p foo
+
+foo+=zero
+typeset -p foo
+
+foo+=([four]=four)
+typeset -p foo
+
+typeset -ia iarr=(2 2 3)
+iarr+=1
+typeset -p iarr
+
+iarr+=(4 5 6)
+typeset -p iarr
diff --git a/tests/appendop2.sub b/tests/appendop2.sub
new file mode 100644
index 0000000..e497beb
--- /dev/null
+++ b/tests/appendop2.sub
@@ -0,0 +1,31 @@
+#   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 .
+#
+POSIXLY_CORRECT=1
+x=2
+x+=5 eval printf '"$x "'
+echo "$x"
+
+unset x
+typeset -i x=2
+x+=5 eval printf '"$x "'
+echo "$x"
+
+a=1
+a+=4
+echo $a
+
+# idiotically, ksh93 makes these two cases differ (?)
+a+=5 printenv a
+a+=5 eval printf '"$a "'
+echo $a
diff --git a/tests/arith-for.right b/tests/arith-for.right
index 4494110..06127be 100644
--- a/tests/arith-for.right
+++ b/tests/arith-for.right
@@ -64,11 +64,23 @@ fx ()
 0
 1
 2
-./arith-for.tests: line 77: syntax error: arithmetic expression required
-./arith-for.tests: line 77: syntax error: `(( i=0; "i < 3" ))'
+bash: -c: line 1: syntax error: arithmetic expression required
+bash: -c: line 1: 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 ))'
+bash: -c: line 1: syntax error: `;' unexpected
+bash: -c: line 1: syntax error: `(( i=0; i < 3; i++; 7 ))'
 2
 20
 20
+12345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 
+12345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 987654321 012345678 
+4
+3
+2
+1
+0
+4
+3
+2
+1
+0
diff --git a/tests/arith-for.tests b/tests/arith-for.tests
index 585aa51..db913da 100644
--- a/tests/arith-for.tests
+++ b/tests/arith-for.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 fx()
 {
 i=0
@@ -74,17 +87,19 @@ type fx
 fx
 
 # errors 
-for (( i=0; "i < 3" ))
+{
+${THIS_SH} -c 'for (( i=0; "i < 3" ))
 do
 	echo $i
-done
-echo $?
+done' ; echo $? ;  } 2>&1 | sed 's|^.*/||'
+#echo $?
 
-for (( i=0; i < 3; i++; 7 ))
+{
+${THIS_SH} -c 'for (( i=0; i < 3; i++; 7 ))
 do
 	echo $i
-done
-echo $?
+done' ; echo $?; } 2>&1 | sed 's|^.*/||'
+#echo $?
 
 # one-liners added in post-bash-2.04
 for     ((i=0; i < 20; i++)) do : ; done
@@ -92,3 +107,22 @@ echo $i
 
 for     ((i=0; i < 20; i++)) { : ; }
 echo $i
+
+# added post-bash-4.2
+for (( i = j = k = 1; i % 9 || (j *= -1, $( ((i%9)) || printf " " >&2; echo 0), k++ <= 10); i += j ))
+do
+printf "$i"
+done
+
+echo
+
+( for (( i = j = k = 1; i % 9 || (j *= -1, $( ((i%9)) || printf " " >&2; echo 0), k++ <= 10); i += j ))
+do
+printf "$i"
+done )
+
+echo
+
+for (( i = 4; ;i--)) ; do echo $i; if (( $i == 0 )); then break; fi; done
+
+for (( i = 4;;i--)) ; do echo $i; if (( $i == 0 )); then break; fi; done
diff --git a/tests/arith.right b/tests/arith.right
index 51d740e..0268781 100644
--- a/tests/arith.right
+++ b/tests/arith.right
@@ -60,7 +60,7 @@
 1,i+=2
 30
 1,j+=2
-./arith.tests: line 114: 1 ? 20 : x+=2: attempted assignment to non-variable (error token is "+=2")
+./arith.tests: line 127: 1 ? 20 : x+=2: attempted assignment to non-variable (error token is "+=2")
 20
 6
 6,5,3
@@ -80,16 +80,16 @@
 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")
+./arith.tests: line 162: 3425#56: invalid arithmetic base (error token is "3425#56")
+./arith.tests: line 165: 2#: invalid integer constant (error token is "2#")
+./arith.tests: line 168: 7 = 43 : attempted assignment to non-variable (error token is "= 43 ")
+./arith.tests: line 169: 2#44: value too great for base (error token is "2#44")
+./arith.tests: line 170: 44 / 0 : division by 0 (error token is "0 ")
+./arith.tests: line 171: let: jv += $iv: syntax error: operand expected (error token is "$iv")
+./arith.tests: line 172: jv += $iv : syntax error: operand expected (error token is "$iv ")
+./arith.tests: line 173: let: rv = 7 + (43 * 6: missing `)' (error token is "6")
+./arith.tests: line 177: 0#4: invalid number (error token is "0#4")
+./arith.tests: line 178: 2#110#11: invalid number (error token is "2#110#11")
 abc
 def
 ghi
@@ -97,15 +97,15 @@ ok
 6
 1
 0
-./arith.tests: line 183: 4 + : syntax error: operand expected (error token is "+ ")
+./arith.tests: line 196: 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 ": ")
+./arith.tests: line 201: 4 ? : 3 + 5 : expression expected (error token is ": 3 + 5 ")
+./arith.tests: line 202: 1 ? 20 : `:' expected for conditional expression (error token is "20 ")
+./arith.tests: line 203: 4 ? 20 : : expression expected (error token is ": ")
 9
-./arith.tests: line 196: 0 && B=42 : attempted assignment to non-variable (error token is "=42 ")
+./arith.tests: line 209: 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 ")
+./arith.tests: line 212: 1 || B=88 : attempted assignment to non-variable (error token is "=88 ")
 9
 0
 9
@@ -131,20 +131,22 @@ ok
 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 ")
+./arith.tests: line 260: 7-- : syntax error: operand expected (error token is "- ")
+./arith.tests: line 262: --x=7 : attempted assignment to non-variable (error token is "=7 ")
+./arith.tests: line 263: ++x=7 : attempted assignment to non-variable (error token is "=7 ")
+./arith.tests: line 265: x++=7 : attempted assignment to non-variable (error token is "=7 ")
+./arith.tests: line 266: 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 "+ ")
+2
+2
+./arith1.sub: line 15: 4-- : syntax error: operand expected (error token is "- ")
+./arith1.sub: line 16: 4++ : syntax error: operand expected (error token is "+ ")
+./arith1.sub: line 17: 4 -- : syntax error: operand expected (error token is "- ")
+./arith1.sub: line 18: 4 ++ : syntax error: operand expected (error token is "+ ")
 1
 2
 1
@@ -159,10 +161,10 @@ ok
 2
 -2
 1
-./arith1.sub: line 35: ((: ++ : syntax error: operand expected (error token is "+ ")
+./arith1.sub: line 48: ((: ++ : syntax error: operand expected (error token is "+ ")
 7
 7
-./arith1.sub: line 38: ((: -- : syntax error: operand expected (error token is "- ")
+./arith1.sub: line 51: ((: -- : syntax error: operand expected (error token is "- ")
 7
 7
 7
@@ -181,24 +183,81 @@ ok
 1
 4
 0
-./arith2.sub: line 33: ((: -- : syntax error: operand expected (error token is "- ")
+./arith2.sub: line 46: ((: -- : syntax error: operand expected (error token is "- ")
 -7
 -7
-./arith2.sub: line 37: ((: ++ : syntax error: operand expected (error token is "+ ")
+./arith2.sub: line 50: ((: ++ : syntax error: operand expected (error token is "+ ")
 7
 7
 -7
 -7
 7
 7
+1
+1
+4
+5
+-3
+2
+4
+5000
+5000
+1
+0
+0
+1
+2147483649
+0
+0
+0
+0
+0
+0
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+-9223372036854775808
+9223372036854775805 9223372036854775806 9223372036854775807
+123 456
+123 456
+123 456
+123 456
+123 456
+123 456
+1
+1 2 3 4 5 6 7
+0 1 2 3 4 5 6 7
+0
+0, 0
+0, 1
+efg
+e
+efg
+e
+abcdefg
+efg
+0
+0
+0
+0
+0
+0
+0
 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")
+./arith.tests: line 310: ((: x=9 y=41 : syntax error in expression (error token is "y=41 ")
+./arith.tests: line 314: a b: syntax error in expression (error token is "b")
+./arith.tests: line 315: ((: 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")
+./arith.tests: line 330: 'foo' : syntax error: operand expected (error token is "'foo' ")
+./arith.tests: line 333: b[c]d: syntax error in expression (error token is "d")
diff --git a/tests/arith.tests b/tests/arith.tests
index 9e82bb1..e9ab576 100644
--- a/tests/arith.tests
+++ b/tests/arith.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 set +o posix
 declare -i iv jv
 
@@ -148,7 +161,7 @@ echo $(( 64#_ ))
 # weird bases
 echo $(( 3425#56 ))
 
-# missing number after base
+# missing number after base now generates an error
 echo $(( 2# ))
 
 # these should generate errors
@@ -260,8 +273,31 @@ echo $(( -7 ))
 echo $(( ++7 ))
 echo $(( --7 ))
 
+# combinations of expansions
+echo $(( "`echo 1+1`" ))
+echo $(( `echo 1+1` ))
+
 ${THIS_SH} ./arith1.sub
 ${THIS_SH} ./arith2.sub
+${THIS_SH} ./arith3.sub
+${THIS_SH} ./arith4.sub
+
+# make sure arithmetic expansion handles ints > 2**31 - 1 using intmax_t
+echo $(( 2147483645 + 4 ))
+
+# other tests using INTMAX_MIN and INTMAX_MAX that cause exceptions if not
+# handled correctly -- problem through bash-4.2
+${THIS_SH} ./arith5.sub
+
+# problems with suppressing evaluation present through bash-4.2
+${THIS_SH} ./arith6.sub
+
+# problems with parsing arithmetic expressions containing colons that are
+# part of word expansions such as substring extraction
+${THIS_SH} ./arith7.sub
+
+# problems with evaluation of conditional expressions
+${THIS_SH} ./arith8.sub
 
 x=4
 y=7
@@ -286,5 +322,12 @@ printf "%u\n" $n
 echo $(( 16#$(printf "%x\n" $n) ))
 echo $(( 16#$(printf "%X\n" $n) ))
 
+# allow reserved words after an arithmetic command just because
+if ((expr)) then ((expr)) fi
+
+# these are errors
+foo=1
+echo $(( 'foo' ))
+
 # causes longjmp botches through bash-2.05b
 a[b[c]d]=e
diff --git a/tests/arith1.sub b/tests/arith1.sub
index 43cae80..3168fcb 100644
--- a/tests/arith1.sub
+++ b/tests/arith1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # test of redone post-increment and post-decrement code
 echo $(( 4-- ))
 echo $(( 4++ ))
diff --git a/tests/arith2.sub b/tests/arith2.sub
index 7eac952..5475012 100644
--- a/tests/arith2.sub
+++ b/tests/arith2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 echo $(( --7 ))
 echo $(( ++7 ))
 echo $(( -- 7 ))
diff --git a/tests/arith3.sub b/tests/arith3.sub
new file mode 100644
index 0000000..b4b1825
--- /dev/null
+++ b/tests/arith3.sub
@@ -0,0 +1,60 @@
+#   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 .
+#
+# this depends on the sequence of random numbers from the internal LCRNG
+RANDOM=42
+(( dice[RANDOM%6+1 + RANDOM%6+1]++ ))
+echo ${dice[6]}
+
+(( ++dice[RANDOM%6+1 + RANDOM%6+1] ))
+echo ${dice[7]}
+
+v=4
+DIND=20
+
+(( dice[DIND%6 + 1]=v ))
+echo ${dice[3]}
+(( dice[DIND/v]+=2 ))
+
+RANDOM=42
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]+=v ))
+echo ${dice[6]}
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]-=v ))
+echo ${dice[7]}
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]+=2 ))
+echo ${dice[8]}
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]*=2 ))
+echo ${dice[5]}
+
+unset dice1 dice2
+RANDOM=42
+
+for i in {1..5000}; do ((dice1[$RANDOM%6+1 + $RANDOM%6+1]++)); done;
+unset t; for i in ${dice1[@]}; do ((t+=i)); done; echo $t
+
+foo="${dice1[@]}"
+
+RANDOM=42
+
+for i in {1..5000}; do ((dice2[RANDOM%6+1 + RANDOM%6+1]++)); done;
+unset t; for i in ${dice2[@]}; do ((t+=i)); done; echo $t
+
+bar="${dice2[@]}"
+
+if [ "$foo" != "$bar" ]; then
+	echo "random sequences differ"
+fi
diff --git a/tests/arith4.sub b/tests/arith4.sub
new file mode 100644
index 0000000..d74defa
--- /dev/null
+++ b/tests/arith4.sub
@@ -0,0 +1,10 @@
+x=$(( !!1 ))
+echo $x
+
+x=$(( -!+1 ))
+echo $x
+
+x=$(( +--+!!0 ))
+echo $x
+
+echo $(( !!+-+-~0 ))
diff --git a/tests/arith5.sub b/tests/arith5.sub
new file mode 100644
index 0000000..7d5c779
--- /dev/null
+++ b/tests/arith5.sub
@@ -0,0 +1,72 @@
+#   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 .
+#
+# a lot of this is technically undefined behavior due to signed 64-bit
+# integer overflow, but we're testing exception handling here
+
+intmax_max=$((2**63 - 1))
+intmax_min1=$((2**63))
+intmax_min2=$((-2**63))
+
+case $intmax_max in
+9223372036854775807)	;;
+*)		echo "warning: your machine does not support 64-bit arithmetic using intmax_t" 2>&1 ;;
+esac
+
+# these are actually the same
+echo $(( $intmax_min1 % -1 ))
+echo $(( $intmax_min2 % -1 ))
+
+echo $(( $intmax_max % -1 ))
+
+lvalue=$intmax_min1
+(( lvalue%= -1 ))
+echo $lvalue
+
+lvalue=$intmax_min2
+(( lvalue%= -1 ))
+echo $lvalue
+
+lvalue=$intmax_max
+(( lvalue%= -1 ))
+echo $lvalue
+
+# and these
+echo $(( $intmax_min1 / -1 ))
+echo $(( $intmax_min2 / -1 ))
+
+lvalue=$intmax_min1
+(( lvalue /= -1 ))
+echo $lvalue
+
+lvalue=$intmax_min2
+(( lvalue /= -1 ))
+echo $lvalue
+
+echo $(( $intmax_min1 * -1 ))
+echo $(( $intmax_min2 * -1 ))
+
+lvalue=$intmax_min1
+(( lvalue *= -1 ))
+echo $lvalue
+
+lvalue=$intmax_min2
+(( lvalue *= -1 ))
+echo $lvalue
+
+echo $(( -${intmax_min1} ))
+echo $(( -${intmax_min2} ))
+
+foo1=$(( $intmax_max - 2 ))
+
+eval echo \{${foo1}..${intmax_max}\}
diff --git a/tests/arith6.sub b/tests/arith6.sub
new file mode 100644
index 0000000..dec8fd0
--- /dev/null
+++ b/tests/arith6.sub
@@ -0,0 +1,65 @@
+#   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 .
+#
+function reorder
+{
+	(( x[1] < x && (x=x[1], x[1]=$x) ))
+	echo "${x[@]}"
+}
+
+x=(123 456)
+reorder
+x=(456 123)
+reorder
+
+unset x
+unset -f reorder
+
+function reorder
+{
+	(( x[1] < x[0] && (x=x[1], x[1]=$x) ))
+	echo "${x[@]}"
+}
+
+x=(123 456)
+reorder
+x=(456 123)
+reorder
+
+unset x
+unset -f reorder
+
+function reorder
+{
+	(( x[1] < x[0] && (x[0]=x[1], x[1]=$x) ))
+	echo "${x[@]}"
+}
+
+x=(123 456)
+reorder
+x=(456 123)
+reorder
+
+unset -f reorder
+
+n=0 ; (( (a[n]=++n)<7&&a[0])); echo "${a[@]:1}"
+
+n=0 a="(a[n]=++n)<7&&a[0]"; ((a[0])); echo "${a[@]:1}"
+
+n=0 a="(a[n]=n++)<7&&a"; ((a)); echo "${a[@]:1}"
+
+# bugs with lvalue caching and pointer aliasing through bash-4.2
+echo $(( a=(y[0] + y[1]) & 0xff, b=(y[2] + y[3]) & 0xff, a << 8 | b))
+echo $a, $b
+((a = y[0], b = 1 ))
+echo $a, $b
diff --git a/tests/arith7.sub b/tests/arith7.sub
new file mode 100644
index 0000000..1b73ba7
--- /dev/null
+++ b/tests/arith7.sub
@@ -0,0 +1,11 @@
+PARAM=abcdefg
+
+echo ${PARAM:1 ? 4 : 2}
+echo ${PARAM:1 ? 4 : 2:1}
+
+echo ${PARAM: 4<5 ? 4 : 2}
+echo ${PARAM: 5>4 ? 4 : 2:1}
+
+echo ${PARAM:${OFFSET:-0}}
+OFFSET=4
+echo ${PARAM:${OFFSET:-0}}
diff --git a/tests/arith8.sub b/tests/arith8.sub
new file mode 100644
index 0000000..e6f1b0d
--- /dev/null
+++ b/tests/arith8.sub
@@ -0,0 +1,50 @@
+#   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 .
+#
+# problems with evaluation of wrong terms in conditional expressions through
+# bash-4.4
+
+a=0 x="a=1"
+((0?x:0))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((1?0:x))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((0?(x):0))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((0?$x:0))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((0&&x))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((1||x))
+echo $a
+unset a x
+
+a=0
+((0?arr[a=1]:0))
+echo $a
+unset a
diff --git a/tests/array-at-star b/tests/array-at-star
old mode 100755
new mode 100644
diff --git a/tests/array.right b/tests/array.right
index fdc0793..6227885 100644
--- a/tests/array.right
+++ b/tests/array.right
@@ -1,20 +1,20 @@
 
-./array.tests: line 15: syntax error near unexpected token `&'
-./array.tests: line 15: `test=(first & second)'
+./array.tests: line 28: syntax error near unexpected token `&'
+./array.tests: line 28: `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='()'
+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
+declare -a a=([0]="abcde" [1]="" [2]="bdef")
+declare -a b
+declare -ar c
 abcde bdef
 abcde bdef
 abcde
@@ -26,66 +26,68 @@ 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='()'
+./array.tests: line 92: 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
+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
+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 116: a: readonly variable
+./array.tests: line 118: b[]: bad array subscript
+./array.tests: line 119: b[*]: bad array subscript
+this
+./array.tests: line 122: c[-2]: bad array subscript
+./array.tests: line 123: 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
+./array.tests: line 125: d[7]: cannot assign list to array member
+./array.tests: line 127: []=abcde: bad array subscript
+./array.tests: line 127: [*]=last: cannot assign to non-numeric index
+./array.tests: line 127: [-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
+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 e=()
+declare -a f=([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")
+./array.tests: line 135: unset: ps1: not an array variable
+./array.tests: line 139: 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")'
+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
+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 e=()
+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
@@ -127,11 +129,13 @@ grep [ 123 ] *
 6 7 9 5
 length = 3
 value = new1 new2 new3
-./array.tests: line 239: narray: unbound variable
+./array.tests: line 255: 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')'
+./array2.sub: line 1: declare: `[]=asdf': not a valid identifier
+./array2.sub: line 2: a[]: bad array subscript
+./array2.sub: line 4: syntax error near unexpected token `('
+./array2.sub: line 4: `declare -a ''=(a 'b c')'
 9
 9
 
@@ -152,10 +156,10 @@ 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]=! )'
+./array.tests: line 305: syntax error near unexpected token `<>'
+./array.tests: line 305: `metas=( <> < > ! )'
+./array.tests: line 306: syntax error near unexpected token `<>'
+./array.tests: line 306: `metas=( [1]=<> [2]=< [3]=> [4]=! )'
 abc 3
 case 4
 abc case if then else 5
@@ -201,15 +205,16 @@ e
 'b
 b  c
 $0
+declare -a A=([0]="X=a" [1]="b")
 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>
+argv[1] = <-iname 'a>
+argv[2] = <-iname 'b>
+argv[3] = <-iname 'c>
 'hey'
 hey
 ''hey
@@ -224,20 +229,22 @@ argv[1] = 
 argv[2] = 
 argv[1] = 
 argv[2] = 
-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 'abc>
+argv[2] = <-iname 'def>
+argv[1] = <-iname>
+argv[2] = 
+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[2] = 
 argv[1] = <-iname 'abc>
 argv[2] = <-iname 'def>
+argv[1] = <-iname 'abc>
+argv[2] = <-iname 'def>
+argv[1] = <-iname>
+argv[2] = 
 *.* OK
 1
 a1 2 3c
@@ -312,3 +319,469 @@ argv[3] = <
 argv[1] = <~>
 argv[2] = <^?>
 argv[3] = <�>
+Monday Tuesday Wednesday Thursday Friday Saturday Sunday
+Monday
+Monday
+Tuesday
+Monday
+Monday
+Tuesday
+Monday
+Tuesday
+Wednesday
+Monday
+Tuesday
+Wednesday
+monday, monday, tuesday
+wednesday, wednesday, thursday
+monday, monday, tuesday
+Wednesday, Wednesday, Thursday
+nday
+esday
+dnesday
+nday
+esday
+dnesday
+onday
+uesday
+ednesday
+onday
+uesday
+ednesday
+version[agent]
+version.agent
+version[agent]
+version.agent
+foo[bar] version[agent]
+bowl version.agent
+foobar] foo foo[bar]
+bleh bbb bleh
+ab]
+bar
+1
+1
+1
+1
+1
+1
+main main
+function function
+function function
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5")
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4")
+declare -a x=([0]="0" [1]="1" [2]="2" [4]="4")
+./array14.sub: line 24: unset: [-10]: bad array subscript
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4")
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="five")
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5")
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="foo")
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5")
+declare -a x=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4four" [5]="5")
+strlen(4four) = 5
+1 2 0 3
+1 2 0 3
+1 2 0 3
+1 2 0 3
+1 2 0 3
+declare -ai arr=([0]="2" [1]="4" [2]="6")
+declare -a arr=([0]="hello" [1]="world")
+foo index 1: ok
+foo index 2: ok
+foo: implicit reference to element 0: ok
+foo: arithmetic evaluation: ok
+bar: array with element zero unset: ok
+bar: element zero: ok
+qux: unset array: ok
+qux: unset array element 0: ok
+2
+2
+2
+2
+0
+0
+1
+./array17.sub: line 43: ~: syntax error: operand expected (error token is "~")
+0
+0
+3
+3
+0
+0
+zero
+zero
+one
+one
+one
+one
+two
+two
+./array17.sub: line 89: ~ : syntax error: operand expected (error token is "~ ")
+1
+argv[1] = <>
+argv[2] = <>
+argv[3] = <>
+argv[1] = 
+argv[1] = <->
+argv[2] = <->
+argv[1] = <  >
+argv[1] = 
+argv[1] = <->
+argv[2] = <->
+argv[1] = <  >
+argv[1] = <>
+argv[2] = <>
+argv[3] = <>
+argv[1] = 
+argv[1] = <->
+argv[2] = <->
+argv[1] = <  >
+argv[1] = 
+argv[1] = <->
+argv[2] = <->
+argv[1] = <  >
+declare -a foo=([0]="( zeroind )")
+declare -a foo=([0]="zeroind")
+declare -a foo=([0]="zeroind")
+declare -a foo=([0]="[0]=bar")
+declare -a foo=([0]="[0]=bar")
+declare -a foo=([0]="[0]=bar")
+declare -- a="(1 2 3)"
+declare -a a=([0]="1" [1]="2" [2]="3")
+declare -- a="([0]=a [1]=b)"
+declare -a a=([0]="a" [1]="b")
+declare -A a=([1]="b" [0]="a" )
+declare -a var=([0]="[\$(echo" [1]="total" [2]="0)]=1" [3]="[2]=2]")
+declare -a var=([0]="[\$(echo total 0)]=1 [2]=2]")
+declare -a var=([0]="[\$(echo" [1]="total" [2]="0)]=1" [3]="[2]=2]")
+./array19.sub: line 89: total 0: syntax error in expression (error token is "0")
+declare -a var=()
+declare -al foo=([0]="abcde" [1]="two" [2]="three")
+declare -al foo=([0]="abcde")
+declare -al ar=([0]="one" [1]="two" [2]="three")
+declare -a a=([2]="foo")
+declare -a a=([2]="foo")
+declare -a a=([1]="(var)" [2]="foo")
+./array19.sub: line 128: warning: a[1]=(var): quoted compound array assignment deprecated
+declare -a a=([1]="(var)")
+declare -a a=([0]="1" [1]="2" [2]="(1 2 3)")
+declare -a a=([0]="1" [1]="2" [2]="(1 2 3)")
+declare -a a=([0]="1" [1]="2" [2]="3")
+declare -a a=([0]="1" [1]="2" [2]="3")
+declare -a a=([0]="1" [1]="2" [2]="3")
+declare -- a="a b"
+declare -- b="/scratch/bash"
+declare -- c="(1 2)"
+declare -- d="(\$a)"
+declare -- e="(\$(echo Darwin))"
+declare -a a=([0]="a b")
+declare -a b=([0]="/scratch/bash")
+declare -a c=([0]="1" [1]="2")
+declare -a d=([0]="a" [1]="b")
+declare -a e=([0]="Darwin")
+declare -A a=([0]="a b" )
+declare -A b=([0]="/scratch/bash" )
+declare -A c=([1]="2" )
+declare -A d=(["a b"]="" )
+declare -A e=([Darwin]="" )
+a+b+c
+x+b+c
+a+b+c
+x+b+c
+argv[1] = 
+argv[1] = 
+a b c
+x b c
+a b c
+x b c
+declare -a a=([1]="2" [2]="3" [3]="4")
+abcd
+unset
+declare -a a=()
+declare -A A=([four]="4" [two]="2" [three]="3" [one]="1" )
+declare -a a=()
+declare -A A=()
+declare -a foo=([0]="1" [1]="(4 5 6)" [2]="3")
+a1
+argv[1] = <>
+argv[2] = <>
+a2
+argv[1] = 
+argv[1] = 
+a3
+argv[1] = <>
+argv[2] = 
+a4
+argv[1] = 
+p1
+argv[1] = <>
+argv[2] = <>
+p2
+argv[1] = <>
+argv[2] = 
+p3
+argv[1] = 
+   
+   
+./array23.sub: line 22: $( echo >&2 foo ) : syntax error: operand expected (error token is "$( echo >&2 foo ) ")
+./array23.sub: line 23: $( echo >&2 foo ) : syntax error: operand expected (error token is "$( echo >&2 foo ) ")
+./array23.sub: line 24: $( echo >&2 foo ) : syntax error: operand expected (error token is "$( echo >&2 foo ) ")
+./array23.sub: line 26: $( echo >&2 foo ) : syntax error: operand expected (error token is "$( echo >&2 foo ) ")
+./array23.sub: line 30: $( echo >&2 foo ): syntax error: operand expected (error token is "$( echo >&2 foo )")
+./array23.sub: line 33: $( echo >&2 foo ): syntax error: operand expected (error token is "$( echo >&2 foo )")
+./array23.sub: line 34: $index: syntax error: operand expected (error token is "$index")
+./array23.sub: line 35: $( echo >&2 foo ): syntax error: operand expected (error token is "$( echo >&2 foo )")
+0
+0
+0
+IFS=: ${var-$*}
+abc
+def ghi
+jkl
+abc
+def ghi
+jkl
+----
+IFS=: ${var=$*}
+abc
+def ghi
+jkl
+var=abc:def ghi:jkl
+abc
+def ghi
+jkl
+var=abc:def ghi:jkl
+----
+IFS=: ${var+$*}
+abc
+def ghi
+jkl
+abc
+def ghi
+jkl
+----
+IFS= ${var-$*}
+abc
+def ghi
+jkl
+abc
+def ghi
+jkl
+----
+IFS= ${var=$*}
+abcdef ghijkl
+var=abcdef ghijkl
+abcdef ghijkl
+var=abcdef ghijkl
+----
+IFS= ${var+$*}
+abc
+def ghi
+jkl
+abc
+def ghi
+jkl
+1. indexed:
+reference:
+1. 0
+./array25.sub: line 24: ' ': syntax error: operand expected (error token is "' '")
+3. 0
+4. 0
+5. 0
+6. 0
+assignment:
+1.declare -a a=([0]="10" [1]="1")
+2.declare -a a=([0]="11" [1]="1")
+3.declare -a a=([0]="12" [1]="1")
+4.declare -a a=([0]="13" [1]="1")
+arithmetic:
+1.declare -a a=([0]="10" [1]="1")
+2.declare -a a=([0]="11" [1]="1")
+3.declare -a a=([0]="12" [1]="1")
+4.declare -a a=([0]="13" [1]="1")
+5.declare -a a=([0]="10" [1]="1")
+6.declare -a a=([0]="11" [1]="1")
+7.declare -a a=([0]="12" [1]="1")
+8.declare -a a=([0]="13" [1]="1")
+2. associative:
+reference:
+1.
+2.
+3. 
+4.
+5.
+6. 
+assignment:
+1.declare -A a=([1]="1" [0]="0" [" "]="10" )
+2.declare -A a=([1]="1" [0]="0" [" "]="11" )
+3.declare -A a=([1]="1" [0]="0" [" "]="12" )
+4.declare -A a=([1]="1" [0]="0" [" "]="13" )
+arithmetic:
+1.declare -A a=([1]="1" [0]="0" [" "]="10" )
+2.declare -A a=([1]="1" [0]="0" [" "]="11" )
+3.declare -A a=([1]="1" [0]="0" [" "]="12" )
+4.declare -A a=([1]="1" [0]="0" [" "]="13" )
+5.declare -A a=([1]="1" [0]="0" [" "]="10" )
+6.declare -A a=([1]="1" [0]="0" [" "]="10" ["\" \""]="11" )
+7.declare -A a=([1]="1" [0]="0" [" "]="12" ["\" \""]="11" )
+8.declare -A a=([1]="1" [0]="0" [" "]="12" ["\" \""]="13" )
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+7
+7
+declare -A A=([$'\t']="2" [" "]="2" )
+declare -A A=([$'\t']="2" ["*"]="2" [" "]="2" ["]"]="2" ["@"]="2" )
+declare -A A=([$'\t']="2" ["*"]="2" [" "]="2" ["]"]="2" ["@"]="2" )
+./array27.sub: line 52: read: `A[]]': not a valid identifier
+declare -A A=([$'\t']="X" ["*"]="X" [" "]="X" ["@"]="X" )
+./array27.sub: line 60: printf: `A[]]': not a valid identifier
+declare -A A=([$'\t']="X" ["*"]="X" [" "]="X" ["@"]="X" )
+./array27.sub: line 68: declare: `A[]]=X': not a valid identifier
+declare -A A=(["*"]="X" ["@"]="X" )
+./array27.sub: line 76: declare: `A[]]=X': not a valid identifier
+declare -A A=(["*"]="X" ["@"]="X" )
+declare -a bug4=([0]="" [1]="5" [2]="" [3]="1" [4]="")
+declare -a bug=([0]="" [1]="5" [2]="" [3]="1" [4]="")
+declare -a bug2=([0]="")
+declare -a bug3=([0]="" [1]="5" [2]="" [3]="1" [4]="")
+declare -a not_bug=([0]="no" [1]="nulls")
+declare -a workaround=([0]="")
+declare -a var=([0]=$'\001\001\001\001')
+declare -A v2=([$'\001']=$'ab\001c' )
+declare -a foo=([0]=$'\001\001\001\001')
+declare -A foo=([$'\001']=$'ab\001c' )
+declare -a foo=([0]=$'\001\001\001\001')
+declare -a foo=([0]=$'\001\001\001\001')
+declare -A foo=([v]=$'\001\001\001\001' )
+declare -A foo=([v]=$'\001\001\001\001' )
+declare -A foo=([$'\001']=$'ab\001c' )
+declare -A foo=([$'\001']=$'ab\001c' )
+foo
+declare -a a=([42]="foo")
+foo
+declare -a a=([42]="foo")
+7
+declare -ai a=([42]="7")
+42
+declare -ai a=([42]="42")
+FOO
+declare -Au A=([Darwin]="FOO" )
+FOO
+declare -Au A=(["@"]="FOO" )
diff --git a/tests/array.tests b/tests/array.tests
index 435ac15..d0bb08b 100644
--- a/tests/array.tests
+++ b/tests/array.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # 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
@@ -21,6 +34,9 @@ unset a
 a=abcde
 declare -a a
 echo ${a[0]}
+if [ "$a" != "${a[0]}" ]; then
+	echo 'array.tests: $a and $a[0] array mismatch'
+fi
 
 unset a
 a=abcde
@@ -152,7 +168,7 @@ 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
+# Make sure that arrays can be used to save the positional parameters verbatim
 set -- a 'b c' d 'e f g' h
 
 ARGV=( [0]=$0 "$@" )
@@ -244,11 +260,11 @@ ${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
+# some compound assignment parsing problems that showed up in bash-3.1-release
 ${THIS_SH} ./array4.sub
 
 set +u
-cd /tmp
+cd ${TMPDIR:=/tmp}
 
 touch 1=bar
 foo=([10]="bar")
@@ -376,6 +392,11 @@ declare -a x=($0)
 declare -a x=(\$0)
 echo "${x[@]}"
 
+unset A Z
+Z='a b'
+A=( X=$Z )
+declare -p A
+
 # tests for bash-3.1 problems
 ${THIS_SH} ./array5.sub
 
@@ -384,5 +405,25 @@ ${THIS_SH} ./array6.sub
 ${THIS_SH} ./array7.sub
 
 ${THIS_SH} ./array8.sub
-
 ${THIS_SH} ./array9.sub
+${THIS_SH} ./array10.sub
+${THIS_SH} ./array11.sub
+${THIS_SH} ./array12.sub
+${THIS_SH} ./array13.sub
+${THIS_SH} ./array14.sub
+${THIS_SH} ./array15.sub
+${THIS_SH} ./array16.sub
+${THIS_SH} ./array17.sub
+${THIS_SH} ./array18.sub
+${THIS_SH} ./array19.sub
+${THIS_SH} ./array20.sub
+${THIS_SH} ./array21.sub
+${THIS_SH} ./array22.sub
+${THIS_SH} ./array23.sub
+${THIS_SH} ./array24.sub
+${THIS_SH} ./array25.sub
+${THIS_SH} ./array26.sub
+${THIS_SH} ./array27.sub
+${THIS_SH} ./array28.sub
+${THIS_SH} ./array29.sub
+${THIS_SH} ./array30.sub
diff --git a/tests/array10.sub b/tests/array10.sub
new file mode 100644
index 0000000..7182480
--- /dev/null
+++ b/tests/array10.sub
@@ -0,0 +1,65 @@
+#   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 .
+#
+days=({Mon,Tues,Wednes,Thurs,Fri,Satur,Sun}day)
+echo ${days[@]}
+
+typeset -i count
+
+count=0
+echo ${days[${count}]}
+echo ${days[$((count++))]}
+echo ${days[$((count++))]}
+
+count=0
+echo ${days[count]}
+echo ${days[count++]}
+echo ${days[count++]}
+
+count=0
+echo ${days[$((count++))]/foo/bar}
+echo ${days[$((count++))]/foo/bar}
+echo ${days[$((count++))]/foo/bar}
+
+count=0
+echo ${days[count++]/foo/bar}
+echo ${days[count++]/foo/bar}
+echo ${days[count++]/foo/bar}
+
+count=0
+echo "${days[${count}],,}, ${days[$((count++))],,}, ${days[$((count++))],,}"
+echo "${days[${count}],,}, ${days[$((count++))],,}, ${days[$((count++))],,}"
+
+count=0
+echo "${days[${count}],,}, ${days[$((count++))],,}, ${days[$((count++))],,}"
+echo "${days[${count}]/foo/bar}, ${days[$((count++))]/foo/bar}, ${days[$((count++))]/foo/bar}"
+
+count=0
+echo ${days[$((count++))]:2}
+echo ${days[$((count++))]:2}
+echo ${days[$((count++))]:2}
+
+count=0
+echo ${days[count++]:2}
+echo ${days[count++]:2}
+echo ${days[count++]:2}
+
+count=0
+echo ${days[$((count++))]#?}
+echo ${days[$((count++))]#?}
+echo ${days[$((count++))]#?}
+
+count=0
+echo ${days[count++]#?}
+echo ${days[count++]#?}
+echo ${days[count++]#?}
diff --git a/tests/array11.sub b/tests/array11.sub
new file mode 100644
index 0000000..5961902
--- /dev/null
+++ b/tests/array11.sub
@@ -0,0 +1,48 @@
+#   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 .
+#
+# problems with associative array keys with ] and unbalanced [ ]
+# fixed after bash-4.2
+
+declare -A foo
+
+foo=(["version[agent]"]=version.agent)
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+unset foo
+declare -A foo
+foo["version[agent]"]=version.agent
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare foo["foo[bar]"]=bowl
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -A array2["foo[bar]"]=bleh
+
+array2["foobar]"]=bleh
+array2["foo"]=bbb
+
+echo ${!array2[@]}
+echo ${array2[@]}
+
+declare -A foo
+foo=( ['ab]']=bar )
+
+echo ${!foo[@]}
+echo ${foo[@]}
diff --git a/tests/array12.sub b/tests/array12.sub
new file mode 100644
index 0000000..fbf5eeb
--- /dev/null
+++ b/tests/array12.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+# problems with fix for posix interp 217 introduced in bash-4.2
+
+declare -ax array
+array[$(( $( echo -n 1001 ) - 1001 ))]=1 
+
+echo ${array[0]}
+echo ${array[@]}
+
+unset 'array[0]'
+array[$( echo -n 1001 ) - 1001 ]=1 
+echo ${array[0]}
+
+unset 'array[0]'
+array[$(( 1001 - $( echo -n 1001 ) ))]=1 
+echo ${array[0]}
+array[$(( 1001 - $( echo -n 1001 ) ))]=1 
+echo ${array[0]}
+
+unset 'array[0]'
+array[1001 - $( echo -n 1001 )]=1 
+echo ${array[0]}
diff --git a/tests/array13.sub b/tests/array13.sub
new file mode 100644
index 0000000..635cb97
--- /dev/null
+++ b/tests/array13.sub
@@ -0,0 +1,12 @@
+
+func1(){
+declare -g variable='function'
+declare -g -a array=(function)
+echo  ${variable} ${array[@]}
+}
+
+declare -g variable='main'
+declare -g -a array=(main)
+echo  ${variable} ${array[@]}
+func1
+echo  ${variable} ${array[@]}
diff --git a/tests/array14.sub b/tests/array14.sub
new file mode 100644
index 0000000..57a455a
--- /dev/null
+++ b/tests/array14.sub
@@ -0,0 +1,43 @@
+#   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 .
+#
+# start at a test suite for negative indexed array subscripts -- post bash-4.2
+x=( 0 1 2 3 4 5)
+declare -p x
+
+unset 'x[-1]'
+declare -p x
+
+unset 'x[-2]'
+declare -p x
+
+unset 'x[-10]'
+
+x[-2]=3
+declare -p x
+
+x+=( five )
+declare -p x
+x[-1]=5
+declare -p x
+
+x+=( [-1]=foo )
+declare -p x
+
+x[-1]=5
+declare -p x
+
+x[-2]+=four
+declare -p x
+
+echo "strlen(${x[-2]})" = ${#x[-2]}
diff --git a/tests/array15.sub b/tests/array15.sub
new file mode 100644
index 0000000..12f5391
--- /dev/null
+++ b/tests/array15.sub
@@ -0,0 +1,52 @@
+#   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 .
+#
+# fixes for make_internal_declare not handling integer attribute for arrays
+declare -ai -g foo=(1 2 xx 3)
+echo "${foo[@]}"
+
+unset foo
+declare -ai -g foo='(1 2 xx 3)'
+echo "${foo[@]}"
+
+unset foo
+declare -ia -g foo=(1 2 xx 3)
+echo "${foo[@]}" 
+
+unset foo
+declare -ia -g foo='(1 2 xx 3)'
+echo "${foo[@]}" 
+
+unset foo
+func()
+{
+	declare -ai -g foo=(1 2 xx 3)
+}
+
+func
+echo "${foo[@]}" 
+
+unset foo
+
+# test options to declare that disable attributes that affect how values
+# are expanded
+#
+# we already handle options that set attributes specially, so we should
+# handle attributes that unset those attributes specially as well
+
+unset arr
+declare -i -a arr=(1+1 2+2 3+3)
+declare -p arr 
+
+declare +i arr=(hello world)
+declare -p arr
diff --git a/tests/array16.sub b/tests/array16.sub
new file mode 100644
index 0000000..b82dbca
--- /dev/null
+++ b/tests/array16.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+foo[0]=a
+foo[1]=b
+
+[[ -v foo[1] ]] && echo foo index 1: ok
+[[ -v foo[2] ]] || echo foo index 2: ok
+
+[[ -v foo ]] && echo foo: implicit reference to element 0: ok
+
+typeset -i foo
+
+[[ -v foo[1] ]] && echo foo: arithmetic evaluation: ok
+
+typeset -a bar
+bar[1]=set
+
+[[ -v bar ]] || echo bar: array with element zero unset: ok
+[[ -v bar[0] ]] || echo bar: element zero: ok
+
+typeset -a qux
+[[ -v qux ]] || echo qux: unset array: ok
+[[ -v qux[0] ]] || echo qux: unset array element 0: ok
diff --git a/tests/array17.sub b/tests/array17.sub
new file mode 100644
index 0000000..dd0c0f6
--- /dev/null
+++ b/tests/array17.sub
@@ -0,0 +1,91 @@
+#   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 .
+#
+# this shows the expansions an array subscript undergoes before being run
+# through the arithmetic evaluator
+
+b=(0 1 2 3)
+
+# array subscripts undergo variable expansion
+a=2
+echo ${b[$a]}
+
+# array subscripts undergo command substitution
+echo ${b[$(echo 2)]}
+
+c='1+1'
+d='1-+1'
+
+# array subscripts are expanded and the expanded value is treated as an
+# expression
+echo ${b[$c]}
+echo ${b[c]}
+
+echo ${b[$d]}
+echo ${b[d]}
+
+# array subscripts undergo parameter expansion
+set -- 1 2 3
+echo ${b[$1]}
+
+# array subscripts undergo tilde expansion
+HOME=2
+echo ${b[~]}
+
+# array subscripts undergo word splitting -- bug in bash versions through 4.3
+
+x='b[$d]'
+IFS=-
+echo $((x))
+IFS=$' \t\n'
+
+set -- 1 + 2
+
+x='d'
+IFS=-
+echo $((x))
+IFS=$' \t\n'
+
+# start of quoting tests; make sure that subscript is treated as double
+# quoted (inhibits word splitting) but that double quotes are silently
+# discarded through quote removal
+
+echo $(( $@ ))
+echo "$(( $@ ))"
+
+echo $(( "$x" ))
+echo $(( "x" ))
+
+unset a foo bar
+a=(zero one two three four five six seven eight nine ten)
+
+echo ${a[0]}
+echo ${a["0"]}
+
+foo=1
+echo ${a[$foo]}
+echo ${a["$foo"]}
+echo ${a[foo]}
+echo ${a["foo"]}
+
+bar=2
+echo ${a[" $bar "]}
+echo ${a[" bar "]}
+
+# tilde expansion is performed by array subscript expansion but not by posix
+# style arithmetic expansion
+
+HOME=2
+echo $(( ~ ))
+
+
diff --git a/tests/array18.sub b/tests/array18.sub
new file mode 100644
index 0000000..9503081
--- /dev/null
+++ b/tests/array18.sub
@@ -0,0 +1,47 @@
+#   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 .
+#
+# arrays referenced using @ subscript and positional parameters should behave
+# the same way
+
+foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $?
+
+recho "${foo[@]#0}"
+bar=${foo[@]#0}
+recho bar
+recho $bar
+recho -$bar-
+recho "$bar"
+
+qux="${foo[@]#0}"
+recho qux
+recho $qux
+recho -$qux-
+recho "$qux"
+
+unset foo qux bar
+
+set -- 0 0 0
+
+recho "${@#0}"
+bar=${@#0}
+recho bar
+recho $bar
+recho -$bar-
+recho "$bar"
+
+qux="${@#0}"
+recho qux
+recho $qux
+recho -$qux-
+recho "$qux"
diff --git a/tests/array19.sub b/tests/array19.sub
new file mode 100644
index 0000000..1d02f74
--- /dev/null
+++ b/tests/array19.sub
@@ -0,0 +1,175 @@
+#   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 .
+#
+# tests for changes to declare and assignment statement arguments post-bash-4.3
+
+unset foo l a b
+
+l="( zeroind )"
+
+unset foo
+declare -a foo
+foo="$l"
+declare -p foo
+
+unset foo
+declare -a foo="$l"
+declare -p foo
+
+unset foo
+declare -a foo=$l
+declare -p foo
+
+b='[0]=bar'
+
+unset foo
+declare -a foo="$b"
+declare -p foo
+
+unset foo
+declare -a foo=("$b")
+declare -p foo
+
+unset foo
+declare -a foo=($b)
+declare -p foo
+
+unset a
+
+declare a='(1 2 3)'
+declare -p a
+unset a
+
+declare -a a
+declare a='(1 2 3)'
+declare -p a
+unset a
+
+declare a='([0]=a [1]=b)'
+declare -p a
+unset a
+
+declare -a a
+declare a='([0]=a [1]=b)'
+declare -p a
+unset a
+
+declare -A a
+declare a='([0]=a [1]=b)'
+declare -p a
+unset a
+unset var value
+
+value='[$(echo total 0)]=1 [2]=2]'
+
+unset var
+declare -a var
+var=($value)
+declare -p var
+
+unset var
+declare -a var=("$value")
+declare -p var
+
+unset var
+declare -a var=($value)
+declare -p var
+
+unset var
+declare -a var="($value)"
+declare -p var
+unset foo value
+
+value="AbCdE"
+
+declare -a foo
+foo=( one two three )
+
+declare -l foo="$value"
+declare -p foo
+
+unset foo
+value='(AbCdE)'
+
+declare -a foo
+foo=( one two three )
+
+declare -l foo="$value"
+declare -p foo
+unset ar
+declare -a ar=(ONE TWO THREE)
+declare -al ar=(${ar[@]})
+declare -p ar 
+unset a
+
+declare -a a
+a[2]=foo
+declare -p a
+
+unset a
+declare -a a
+declare a[2]=foo
+declare -p a
+
+declare a[1]='(var)'
+declare -p a
+
+unset a
+declare a[1]='(var)'
+declare -p a
+unset a
+
+a=(1 2 3)
+a[2]='(1 2 3)'
+
+declare -p a
+
+unset a
+a=(1 2 3)
+declare a[2]='(1 2 3)'
+
+declare -p a
+
+unset a
+a=(1 2 3)
+declare a='(1 2 3)'
+
+declare -p a
+
+unset a
+a=(1 2 3)
+declare 'a=(1 2 3)'
+
+declare -p a
+
+unset a
+declare -a a='(1 2 3)'
+
+declare -p a
+unset a b c d e x y
+
+HOME=/scratch/bash
+x='a b'
+y='($(echo Darwin))'
+
+declare a=$x b=~ c='(1 2)' d='($a)' e=$y
+
+declare -p a b c d e
+
+unset a b c d e
+declare -a a=$x b=~ c='(1 2)' d='($a)' e=$y
+declare -p a b c d e
+
+unset a b c d e
+declare -A a=$x b=~ c='(1 2)' d='($a)' e=$y
+declare -p a b c d e
diff --git a/tests/array2.sub b/tests/array2.sub
index 0e6417d..44bb7c5 100644
--- a/tests/array2.sub
+++ b/tests/array2.sub
@@ -1 +1,4 @@
+declare -r []=asdf
+declare -r a[]=asdf
+
 declare -a ''=(a 'b c')
diff --git a/tests/array20.sub b/tests/array20.sub
new file mode 100644
index 0000000..24dff93
--- /dev/null
+++ b/tests/array20.sub
@@ -0,0 +1,47 @@
+#   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 .
+#
+# tests to make sure that $* and ${array[*]} expand consistently in `list'
+# and `scalar' contexts
+
+arr=(a b c)
+IFS=+
+
+# these two should both expand to `+' separated strings
+a=${arr[*]} ; echo "$a"
+b=${arr[*]/a/x}; echo "$b"
+
+set -- a b c
+
+# these two should both expand to `+' separated strings
+a=${*} ; echo "$a"
+b=${*/a/x}; echo "$b"
+
+# these two should both expand to `+' separated strings and it should handle
+# characters in IFS as chars in the string
+unset a b
+
+set -- 'a+b' 'c+d' 'e+f'
+a=${*} ; recho "$a"
+b=${*/a/x}; recho "$b"
+
+# now let's make sure that @ always uses space separators even in contexts
+# where we don't do word splitting
+set -- a b c
+a=${@} ; echo "$a"
+b=${@/a/x}; echo "$b"
+
+unset a b
+
+a=${arr[@]} ; echo "$a"
+b=${arr[@]/a/x}; echo "$b"
diff --git a/tests/array21.sub b/tests/array21.sub
new file mode 100644
index 0000000..97ff093
--- /dev/null
+++ b/tests/array21.sub
@@ -0,0 +1,50 @@
+#   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 .
+#
+typeset -a a
+a=(1 2 3 4)
+
+typeset -A A
+A=([one]=1 [two]=2 [three]=3 [four]=4)
+
+unset 'a[0]'
+typeset -p a
+
+scalar=abcd
+echo ${scalar[0]}
+
+unset 'scalar[0]'
+echo ${scalar-unset}
+
+unset 'a[@]'
+typeset -p a
+
+unset 'A[@]'
+typeset -p A
+
+typeset -a a
+a=(1 2 3 4)
+typeset -A A
+A=([one]=1 [two]=2 [three]=3 [four]=4)
+
+# supported, recommended way to unset all array elements
+a=()
+typeset -p a
+A=()
+typeset -p A
+
+declare -a foo
+declare foo='(1 2 3)'
+declare foo[1]='(4 5 6)'
+
+declare -p foo
diff --git a/tests/array22.sub b/tests/array22.sub
new file mode 100644
index 0000000..3374ef2
--- /dev/null
+++ b/tests/array22.sub
@@ -0,0 +1,59 @@
+#   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 .
+#
+# This isn't perfect behavior, but it establishes a baseline and will provide
+# a way to detect behavior changes
+
+echo a1
+a[0]= a[1]=; recho "${a[@]:-y}"
+unset a
+
+echo a2
+a[1]=; recho "${a[@]:-y}"
+a[1]=; recho "${a[*]:-z}"
+unset a
+
+echo a3
+a[0]= a[1]=x; recho "${a[@]:-y}"
+unset a
+
+echo a4
+a[0]= a[1]=x; recho ${a[@]:+y}
+unset a
+
+echo p1
+set '' ''
+recho "${@:-y}"
+
+shift $#
+
+echo p2
+set '' x
+recho "${@:-y}"
+
+shift $#
+
+echo p3
+set '' x
+recho ${@:+y}
+
+# problems with * and null expansions dating back to bash's earliest days
+A=(''); set -- ''
+
+echo "<${A[*]:-X}>" "<${*:-X}>" "<${A:-X}>" "<${A[0]:-X}>" 
+
+IFS=
+A=('' ''); set -- '' ''
+B=''
+
+echo "<${A[*]:-X}>" "<${*:-X}>" "<${B:-X}>" "<${B[*]:-X}>"
diff --git a/tests/array23.sub b/tests/array23.sub
new file mode 100644
index 0000000..02d271d
--- /dev/null
+++ b/tests/array23.sub
@@ -0,0 +1,41 @@
+#   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 .
+#
+# this captures how bash and ksh93 expand indexed array subscripts in
+# various contexts. if changes are ever made, or an option added to do
+# this differently, the diffs will show up here
+
+typeset -a array
+
+index='$( echo >&2 foo )' # Literal shell code should never be evaluated unless an 'eval' is involved.
+
+echo ${array[ $index ]} # [] expands $index, results in a literal that [] does not re-evaluate.
+echo $(( $index )) # (( )) expands $index, results in a literal that (( )) does not re-evaluate.
+echo $(( array[ $index ] )) # (( )) expands $index, results in a literal that  [] DOES re-evaluate.
+
+(( array[ $index ] ))
+
+typeset -a a
+
+: $(( a[$index]=5 ))
+
+#shopt -s assoc_expand_once
+echo $((1+a[$index]))
+echo $((1+a[\$index]))
+echo "1+${a[$index]}"
+
+# intermediate problems discovered while bash-5.0 was in testing
+a=0
+echo $(( a[a[0]] ))
+echo ${a[a[a[0]]]}
+echo $(( a[a[a[0]]] ))
diff --git a/tests/array24.sub b/tests/array24.sub
new file mode 100644
index 0000000..461b406
--- /dev/null
+++ b/tests/array24.sub
@@ -0,0 +1,60 @@
+#   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 .
+#
+set -- "abc" "def ghi" "jkl"
+A=("$@")
+
+IFS=':'
+
+echo 'IFS=: ${var-$*}'
+unset var; printf '%s\n' ${var-$*}
+printf '%s\n' ${var-${A[*]}}
+
+echo "----"
+echo 'IFS=: ${var=$*}'
+
+unset  var; printf '%s\n' ${var=$*}
+printf 'var=%s\n' "$var"
+
+unset var; printf '%s\n' ${var=${A[*]}}
+printf 'var=%s\n' "$var"
+
+echo "----"
+echo 'IFS=: ${var+$*}'
+
+printf '%s\n' ${var+$*}
+printf '%s\n' ${var+${A[*]}}
+
+echo "----"
+echo 'IFS= ${var-$*}'
+
+IFS=''
+unset var; printf '%s\n' ${var-$*}
+unset var; printf '%s\n' ${var-${A[*]}}
+
+echo "----"
+echo 'IFS= ${var=$*}'
+
+unset var
+printf '%s\n' ${var=$*}
+printf 'var=%s\n' "$var"
+
+unset var
+printf '%s\n' ${var=${A[*]}}
+printf 'var=%s\n' "$var"
+
+echo "----"
+echo 'IFS= ${var+$*}'
+
+printf '%s\n' ${var+$*}
+printf '%s\n' ${var+${A[*]}}
diff --git a/tests/array25.sub b/tests/array25.sub
new file mode 100644
index 0000000..fe6bb34
--- /dev/null
+++ b/tests/array25.sub
@@ -0,0 +1,83 @@
+#   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 .
+#
+# tests with blank subscripts, indexed and associative
+
+echo 1. indexed:
+a[0]=0 a[1]=1
+
+v=" "
+
+echo reference:
+
+echo 1. ${a[ ]}
+echo 2. ${a[' ']}
+echo 3. "${a[ ]}"
+echo 4. ${a[$v]}
+echo 5. ${a["$v"]}
+echo 6. "${a[$v]}"
+
+echo assignment:
+
+echo -n 1. ; a[ ]=10 ; typeset -p a ; a[0]=0
+echo -n 2. ; a[" "]=11 ; typeset -p a ; a[0]=0
+echo -n 3. ; a[$v]=12 ; typeset -p a ; a[0]=0
+echo -n 4. ; a["$v"]=13 ; typeset -p a ; a[0]=0
+
+echo arithmetic:
+
+echo -n 1. ; (( a[ ]=10 )); typeset -p a ; a[0]=0
+echo -n 2. ; (( a[" "]=11 )); typeset -p a ; a[0]=0
+echo -n 3. ; (( a[$v]=12 )); typeset -p a ; a[0]=0
+echo -n 4. ; (( a["$v"]=13 )); typeset -p a ; a[0]=0
+echo -n 5. ; let "a[ ]=10" ; typeset -p a ; a[0]=0
+echo -n 6. ; let "a[\" \"]=11" ; typeset -p a ; a[0]=0
+echo -n 7. ; let "a[$v]=12" ; typeset -p a ; a[0]=0
+echo -n 8. ; let "a[\"$v\"]=13" ; typeset -p a ; a[0]=0
+
+unset -v a v
+
+echo 2. associative:
+shopt -s assoc_expand_once
+
+typeset -A a
+a[0]=0 a[1]=1
+
+v=" "
+
+echo reference:
+
+echo 1. ${a[ ]}
+echo 2. ${a[' ']}
+echo 3. "${a[ ]}"
+echo 4. ${a[$v]}
+echo 5. ${a["$v"]}
+echo 6. "${a[$v]}"
+
+echo assignment:
+
+echo -n 1. ; a[ ]=10 ; typeset -p a ; a[0]=0
+echo -n 2. ; a[" "]=11 ; typeset -p a ; a[0]=0
+echo -n 3. ; a[$v]=12 ; typeset -p a ; a[0]=0
+echo -n 4. ; a["$v"]=13 ; typeset -p a ; a[0]=0
+
+echo arithmetic:
+
+echo -n 1. ; (( a[ ]=10 )); typeset -p a ; a[0]=0
+echo -n 2. ; (( a[" "]=11 )); typeset -p a ; a[0]=0
+echo -n 3. ; (( a[$v]=12 )); typeset -p a ; a[0]=0
+echo -n 4. ; (( a["$v"]=13 )); typeset -p a ; a[0]=0
+echo -n 5. ; let "a[ ]=10" ; typeset -p a ; a[0]=0
+echo -n 6. ; let "a[\" \"]=11" ; typeset -p a ; a[0]=0
+echo -n 7. ; let "a[$v]=12" ; typeset -p a ; a[0]=0
+echo -n 8. ; let "a[\"$v\"]=13" ; typeset -p a ; a[0]=0
diff --git a/tests/array26.sub b/tests/array26.sub
new file mode 100644
index 0000000..0f6cc8f
--- /dev/null
+++ b/tests/array26.sub
@@ -0,0 +1,131 @@
+#   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 .
+#
+# these should produce the same results
+a=(aa bb)
+set -- aa bb
+
+IFS=+
+
+recho ${a[@]} 
+recho ${a[@]:0} 
+
+recho $@
+recho ${@:1} 
+
+A=${a[*]} B=${a[*]:0}
+recho $* ${*:1}
+recho ${a[*]} ${a[*]:0}
+recho "$A" "$B"
+recho $A $B
+
+unset A B
+
+recho ${@/a/x} 
+recho ${a[@]/a/x} 
+recho "${@/a/x}"
+recho "${a[@]/a/x}"
+
+recho ${*/a/x} 
+recho ${a[*]/a/x} 
+recho "${*/a/x}"
+recho "${a[*]/a/x}"
+
+A=${*/a/x}
+B=${a[*]/a/x}
+
+recho "$A" "$B"
+
+unset A B
+declare -A A
+A[0]=aa
+A[1]=bb
+
+recho ${A[@]/a/x}
+recho "${A[@]/a/x}"
+recho ${A[*]/a/x}
+recho "${A[*]/a/x}"
+
+unset A
+IFS=
+
+recho ${@/a/x}
+recho ${a[@]/a/x}
+recho "${@/a/x}"
+recho "${a[@]/a/x}"
+
+recho ${*/a/x}
+recho ${a[*]/a/x}
+recho "${*/a/x}"
+recho "${a[*]/a/x}"
+
+A=${*/a/x}
+B=${a[*]/a/x}
+
+recho "$A" "$B"
+
+unset A B
+declare -A A
+A[0]=aa
+A[1]=bb
+
+recho ${A[@]/a/x}  
+recho "${A[@]/a/x}" 
+recho ${A[*]/a/x}   
+recho "${A[*]/a/x}"
+
+unset A
+
+IFS=+
+
+recho ${a[@]}
+recho ${a[@],,} 
+recho "${a[@]}"
+recho "${a[@],,}"
+
+A=${a[*]} B=${a[*],,}
+recho $* ${*,,}
+recho ${a[*]} ${a[*],,}
+recho "${a[*]}" "${a[*],,}"
+recho "$A" "$B"
+recho $A $B
+
+unset A B
+declare -A A
+A[0]=aa
+A[1]=bb
+
+recho ${A[@],,}
+recho "${A[@],,}"
+recho ${A[*],,}
+recho "${A[*],,}"
+
+unset A
+
+recho ${a[@]#?}
+recho ${@#?}
+
+A=${a[*]#?} B=${a[*]#?}
+recho ${*#?} ${a[*]#?}
+recho "$A" "$B"
+recho $A $B
+
+unset A B
+declare -A A
+A[0]=aa
+A[1]=bb
+
+recho ${A[@]#?}  
+recho "${A[@]#?}"   
+recho ${A[*]#?}  
+recho "${A[*]#?}" 
diff --git a/tests/array27.sub b/tests/array27.sub
new file mode 100644
index 0000000..e2a1e70
--- /dev/null
+++ b/tests/array27.sub
@@ -0,0 +1,78 @@
+#   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 .
+#
+# tests for `problem' keys when using associative arrays and assoc_expand_once
+# deal with problems for now; this is a placeholder for if and when I fix them
+
+typeset -A a
+shopt -s assoc_expand_once
+
+k='['
+echo $(( a[$k]=7 ))
+
+k=']'
+echo $(( a[$k]=7 ))
+
+unset a
+
+declare -A A
+
+for k in $'\t' ' '; do
+   (( A[$k]=2 ))
+done
+declare -p A
+
+for k in ']' '*' '@'; do
+   (( A[$k]=2 ))
+done
+
+declare -p A
+
+unset A
+declare -A A
+for k in ']' '*' '@' $'\t' ' '; do
+   A[$k]=2
+done
+declare -p A
+
+unset A
+declare -A A
+
+for k in $'\t' ' ' ']' '*' '@'; do
+   read "A[$k]" <<< X
+done
+declare -p A
+
+unset A
+declare -A A
+
+for k in $'\t' ' ' ']' '*' '@'; do
+	printf -v "A[$k]" "%s" X
+done
+declare -p A
+
+unset A
+declare -A A
+
+for k in ']' '*' '@'; do
+   declare A[$k]=X
+done
+declare -p A
+
+unset A
+declare -A A
+
+for k in ']' '*' '@'; do
+   declare "A[$k]=X"
+done
+declare -p A
diff --git a/tests/array28.sub b/tests/array28.sub
new file mode 100644
index 0000000..e11cdb6
--- /dev/null
+++ b/tests/array28.sub
@@ -0,0 +1,30 @@
+#   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 .
+#
+
+# tests for assigning empty string array elements without subscripts
+function foo()
+{
+	local bug=("" "5" "" 1 "")
+	declare -a bug2=("")
+	declare -ga bug3=("" "5" "" 1 "")
+	local not_bug=("no" "nulls")
+	local workaround; workaround=("")
+
+	declare -p bug bug2 bug3 not_bug workaround
+}
+
+declare -a bug4=("" "5" "" 1 "")
+declare -p bug4
+
+foo
diff --git a/tests/array29.sub b/tests/array29.sub
new file mode 100644
index 0000000..f73c2d1
--- /dev/null
+++ b/tests/array29.sub
@@ -0,0 +1,86 @@
+#   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 .
+#
+# Issues with CTLESC characters in array subscripts and values. Bash-5.1 and
+# earlier didn't quote them correctly and therefore halved the number of
+# CTLESCs.
+
+declare -a var
+var=( $'\x01\x01\x01\x01' )
+declare -p var
+declare -A v2
+v2=( $'\x01' ab$'\x01'c )
+declare -p v2
+
+pv()
+{
+	local -a foo
+	foo=( "${var[@]}" )
+	declare -p foo
+}
+pv
+
+unset -f pv
+pv()
+{
+        local -A foo
+        eval foo=\( "${v2[@]@k}" \)
+        declare -p foo
+}
+pv
+
+# these are wrong through bash-5.1; there is a fix tagged for bash-5.2
+# when I uncomment that fix, these results will reflect it
+
+pv1()
+{
+	local -a foo=( "${var[@]}" )
+	declare -p foo
+}
+pv1
+
+pv2()
+{
+	local -a foo=( [0]="${var[@]}" )
+	declare -p foo
+}
+pv2
+
+pv3()
+{
+	local -A foo=( v "${var[@]}" )
+	declare -p foo
+}
+pv3
+
+pv4()
+{
+	local -A foo=( [v]="${var[@]}" )
+	declare -p foo
+}
+pv4
+
+unset -f pv3 pv4
+pv3()
+{
+	local -A foo=( $'\x01' "${v2[@]}" )
+	declare -p foo
+}
+pv3
+
+pv4()
+{
+	local -A foo=( [$'\x01']="${v2[@]}" )
+	declare -p foo
+}
+pv4
diff --git a/tests/array30.sub b/tests/array30.sub
new file mode 100644
index 0000000..14f9798
--- /dev/null
+++ b/tests/array30.sub
@@ -0,0 +1,46 @@
+#   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 .
+#
+declare -a a
+a=()
+
+echo ${a[42]=foo}
+declare -p a
+
+a=()
+echo ${a[$(echo 42)]=foo}
+declare -p a
+
+unset a
+
+declare -ai a
+a=()
+echo ${a[42]=4+3}
+declare -p a
+
+a=()
+echo ${a[$(echo 42)]=42}
+declare -p a
+
+unset a
+
+declare -A A
+declare -u A
+A=()
+echo ${A[$(echo Darwin)]=foo}
+
+declare -p A
+A=()
+
+echo ${A[@]:=foo}
+declare -p A
diff --git a/tests/array4.sub b/tests/array4.sub
index 97c766d..443a0fd 100644
--- a/tests/array4.sub
+++ b/tests/array4.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # compound assignment parsing problems in bash-3.1-release
 func()
 {
diff --git a/tests/array5.sub b/tests/array5.sub
index 778a28d..0dda696 100644
--- a/tests/array5.sub
+++ b/tests/array5.sub
@@ -1,10 +1,23 @@
+#   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 .
+#
 
 : ${TMPDIR:=/tmp}
 
 mkdir $TMPDIR/bash-test-$$
 cd $TMPDIR/bash-test-$$
 
-trap "cd / ; rm -rf $TMPDIR/bash-test-$$" 0 1 2 3 6 15
+trap "cd $OLDPWD ; rm -rf $TMPDIR/bash-test-$$" 0 1 2 3 6 15
 
 touch '[3]=abcde'
 
diff --git a/tests/array6.sub b/tests/array6.sub
index 5901326..2c6c350 100644
--- a/tests/array6.sub
+++ b/tests/array6.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # test cases for array quoting and escaping fixed post bash-3.2-release
 
 oIFS="$IFS"
@@ -42,6 +55,9 @@ a=(abc def)
 a2=("${a[@]/#/"-iname '"}") 
 recho "${a2[@]}"
 
+eval a2=("${a[@]/#/\"-iname \'\"}") 
+recho "${a2[@]}"
+
 eval a2=("${a[@]/#/"-iname '"}") 
 recho "${a2[@]}"
 
@@ -56,6 +72,9 @@ set -- abc def
 a2=("${@/#/"-iname '"}") 
 recho "${a2[@]}"
 
+eval a2=("${@/#/\"-iname \'\"}") 
+recho "${a2[@]}"
+
 eval a2=("${@/#/"-iname '"}") 
 recho "${a2[@]}"
 
diff --git a/tests/array8.sub b/tests/array8.sub
index 481ccdb..6e7e2d6 100644
--- a/tests/array8.sub
+++ b/tests/array8.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 IFS=/
 declare -a i
 
diff --git a/tests/array9.sub b/tests/array9.sub
index 444247f..c3aa31d 100644
--- a/tests/array9.sub
+++ b/tests/array9.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 echo $(( 0x7e ))
 echo $(( 0x7f ))
 echo $(( 0x80 ))
diff --git a/tests/assoc.right b/tests/assoc.right
index 8615519..9a1662c 100644
--- a/tests/assoc.right
+++ b/tests/assoc.right
@@ -1,44 +1,44 @@
-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" )'
+declare -A BASH_ALIASES=()
+declare -A BASH_CMDS=()
+declare -A fluff
+declare -A BASH_ALIASES=()
+declare -A BASH_CMDS=()
+declare -A fluff=([foo]="one" [bar]="two" )
+declare -A fluff=([foo]="one" [bar]="two" )
+declare -A fluff=([bar]="two" )
+declare -A fluff=([qux]="assigned" [bar]="newval" )
+./assoc.tests: line 39: 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=([pid]="42134" [lineno]="41" [source]="./assoc.tests" [version]="4.0-devel" )
+declare -A wheat=([two]="b" [three]="c" [one]="a" [zero]="0" )
+declare -A chaff=(["hello world"]="flip" [one]="10" [zero]="5" )
+./assoc.tests: line 51: waste: readonly variable
+./assoc.tests: line 52: unset: waste: cannot unset: readonly variable
+declare -A chaff=(["*"]="12" ["hello world"]="flip" [one]="a" )
 flip
-argv[1] = 
-argv[2] = 
-argv[3] = 
-argv[4] = 
-argv[1] = 
-argv[2] = 
-argv[3] = 
-argv[1] = 
-argv[2] = 
-argv[3] = 
-argv[4] = 
-argv[1] = 
-./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] = 
+argv[2] = 
+argv[3] = <12>
+argv[4] = 
+argv[5] = 
+argv[1] = 
+argv[2] = <12>
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[3] = <12>
+argv[4] = 
+argv[5] = 
+argv[1] = 
+./assoc.tests: line 71: declare: chaff: cannot destroy array variables in this way
+declare -A wheat=([six]="6" ["foo bar"]="qux qix" )
 argv[1] = 
 argv[2] = 
 argv[1] = 
-declare -A wheat='([six]="6" ["foo bar"]="qux qix" )'
+declare -A wheat=([six]="6" ["foo bar"]="qux qix" )
 argv[1] = <2>
 argv[1] = <7>
 argv[1] = 
@@ -47,16 +47,16 @@ argv[3] = 
 argv[1] = 
 argv[1] = <16>
 argv[1] = <16>
-argv[1] = 
-argv[2] = <6>
+argv[1] = <6>
+argv[2] = 
 argv[1] = 
 argv[2] = 
 argv[3] = 
 argv[1] = 
 argv[2] = 
 8
-/usr/local/bin . /bin /sbin /usr/sbin /usr/bin /bin /usr/ucb
-bin . bin sbin sbin bin bin ucb
+/usr/local/bin /bin . /usr/bin /usr/ucb /usr/sbin /bin /sbin
+bin bin . bin ucb sbin bin sbin
 bin
 / / / / / / /
 /
@@ -65,27 +65,27 @@ argv[1] = 
 argv[1] = 
 argv[1] = 
 8
-/usr/local/bin . /bin /sbin /usr/sbin /usr/bin /bin /usr/ucb
-bin . bin sbin sbin bin bin ucb
+/usr/local/bin /bin . /usr/bin /usr/ucb /usr/sbin /bin /sbin
+bin bin . bin ucb sbin bin sbin
 / / / / / / /
 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
+^usr^local^bin ^bin . ^usr^bin ^usr^ucb ^usr^sbin ^bin ^sbin
+^usr^local^bin ^bin . ^usr^bin ^usr^ucb ^usr^sbin ^bin ^sbin
+\usr/local/bin \bin . \usr/bin \usr/ucb \usr/sbin \bin \sbin
+\usr\local\bin \bin . \usr\bin \usr\ucb \usr\sbin \bin \sbin
+\usr\local\bin \bin . \usr\bin \usr\ucb \usr\sbin \bin \sbin
 ([a]=1)
 
-qux foo
-/usr/local/bin/qux /usr/sbin/foo
+foo qux
+/usr/sbin/foo /usr/local/bin/qux
 hits	command
+   0	/usr/sbin/foo
+   0	/bin/sh
    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 sh blat qux
+/usr/sbin/foo /bin/sh /sbin/blat /usr/local/bin/qux
 
 foo qux
 argv[1] = 
@@ -95,95 +95,306 @@ 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] = 
+blat foo sh qux
+argv[1] = 
 argv[2] = 
-argv[3] = 
+argv[3] = 
 argv[4] = 
 outside: outside
-declare -A BASH_ALIASES='()'
-declare -A BASH_CMDS='()'
-declare -A afoo='([six]="six" ["foo bar"]="foo quux" )'
+declare -A BASH_ALIASES=()
+declare -A BASH_CMDS=()
+declare -A afoo=([six]="six" ["foo bar"]="foo quux" )
 argv[1] = 
 argv[2] = 
 argv[3] = 
 outside 2: outside
-argv[1] = 
-argv[1] = 
-argv[2] = <>
-argv[3] = 
-argv[4] = <>
-argv[1] = 
-argv[1] = 
-argv[2] = <>
-argv[3] = 
-argv[4] = <>
-argv[1] = 
-argv[1] = 
-argv[2] = <>
-argv[3] = 
-argv[4] = <>
-argv[1] = 
-argv[1] = 
-argv[2] = <>
-argv[3] = 
-argv[4] = <>
-argv[1] = 
-argv[1] = 
-argv[2] = <>
-argv[3] = 
-argv[4] = <>
+argv[1] = 
+argv[1] = <>
+argv[2] = 
+argv[3] = <>
+argv[4] = 
+argv[1] = 
+argv[1] = <>
+argv[2] = 
+argv[3] = <>
+argv[4] = 
+argv[1] = 
+argv[1] = <>
+argv[2] = 
+argv[3] = <>
+argv[4] = 
+argv[1] = 
+argv[1] = <>
+argv[2] = 
+argv[3] = <>
+argv[4] = 
+argv[1] = 
+argv[1] = <>
+argv[2] = 
+argv[3] = <>
+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" )
+./assoc5.sub: line 26: declare: `myarray[foo[bar]=bleh': not a valid identifier
+def bleh abc
+myarray=(["]"]="def" [foo]="bleh" ["a]a"]="abc" ["a]=test1;#a"]="123" )
 
 123
-myarray=(["a]a"]="abc" ["a]=test2;#a"]="def" ["]"]="def" ["a]=test1;#a"]="123" [foo]="bleh" )
+myarray=(["]"]="def" ["a]=test2;#a"]="def" [foo]="bleh" ["a]a"]="abc" ["a]=test1;#a"]="123" )
 bar"bie
 doll
-declare -A foo='(["bar\"bie"]="doll" )'
+declare -A foo=(["bar\"bie"]="doll" )
 bar"bie
 doll
-declare -A foo='(["bar\"bie"]="doll" )'
+declare -A foo=(["bar\"bie"]="doll" )
 bar"bie
 doll
-declare -A foo='(["bar\"bie"]="doll" )'
+declare -A foo=(["bar\"bie"]="doll" )
 bar"bie
 doll
-declare -A foo='(["bar\"bie"]="doll" )'
+declare -A foo=(["bar\"bie"]="doll" )
 bar"bie
 doll
-declare -A foo='(["bar\"bie"]="doll" )'
+declare -A foo=(["bar\"bie"]="doll" )
 bar'bie
 doll
-declare -A foo='(["bar'\''bie"]="doll" )'
+declare -A foo=(["bar'bie"]="doll" )
 bar'bie
 doll
-declare -A foo='(["bar'\''bie"]="doll" )'
+declare -A foo=(["bar'bie"]="doll" )
 bar'bie
 doll
-declare -A foo='(["bar'\''bie"]="doll" )'
+declare -A foo=(["bar'bie"]="doll" )
 bar'bie
 doll
-declare -A foo='(["bar'\''bie"]="doll" )'
+declare -A foo=(["bar'bie"]="doll" )
 bar'bie
 doll
-declare -A foo='(["bar'\''bie"]="doll" )'
+declare -A foo=(["bar'bie"]="doll" )
 bar$bie
 doll
-declare -A foo='(["bar\$bie"]="doll" )'
+declare -A foo=(["bar\$bie"]="doll" )
 bar[bie
 doll
-declare -A foo='(["bar[bie"]="doll" )'
+declare -A foo=(["bar[bie"]="doll" )
 bar`bie
 doll
-declare -A foo='(["bar\`bie"]="doll" )'
+declare -A foo=(["bar\`bie"]="doll" )
 bar\]bie
 doll
-declare -A foo='(["bar\\]bie"]="doll" )'
+declare -A foo=(["bar\\]bie"]="doll" )
 bar${foo}bie
 doll
-declare -A foo='(["bar\${foo}bie"]="doll" )'
+declare -A foo=(["bar\${foo}bie"]="doll" )
+bar
+after printf
+after use: 0
+declare -A assoc=([0]="assoc" )
+assoc
+declare -A assoc=([two]="twoless" [three]="three" [one]="onemore" )
+declare -Ar assoc=([two]="twoless" [three]="three" [one]="onemore" )
+declare -A hash=([key]="value1" )
+declare -A hash=([key]="value1 value2" )
+declare -A b=([")"]="" ["\""]="" ["]"]="" ["\\"]="" ["\`"]="" )
+declare -A b=(["]"]="" ["\`"]="" )
+declare -A dict=(["'"]="3" ["\""]="1" ["\\"]="4" ["\`"]="2" )
+declare -A dict=()
+declare -A dict=(["'"]="3" ["\""]="1" ["\\"]="4" ["\`"]="2" )
+declare -A dict=()
+4
+4
+a[$b]= 5
+declare -A a=(["80's"]="Depeche Mode" )
+./assoc9.sub: line 84: read: `a[80's]': not a valid identifier
+declare -A a
+declare -A a=(["80's"]="Depeche Mode" )
+./assoc9.sub: line 96: printf: `a[80's]': not a valid identifier
+declare -A a
+declare -A a=(["80's"]="Depeche Mode" )
+6
+1
+1+5
+declare -A a=(["\$(date >&2)"]="5" )
+declare -A myarray=([foo]="bleh" ["foo[bar"]="bleh" )
+foo
+declare -A assoc=(["\$var"]="value" )
+declare -A assoc=(["\$var"]="value" )
+declare -A assoc=(["\$var"]="value" )
+declare -A assoc=()
+./assoc9.sub: line 154: typeset: `foo[foo]bar]=bax': not a valid identifier
+foo]bar
+bip
+declare -A foo=(["foo]bar"]="bip" )
+./assoc10.sub: line 14: declare: a: cannot convert indexed to associative array
+f: declare -a a
+./assoc10.sub: line 17: declare: a: cannot convert associative to indexed array
+f: declare -A a
+
+f: declare -a a
+main: declare -- a="7"
+f: declare -A a
+main: declare -- a="42"
+declare -A a=([3]="" [1]="2" )
+declare -A foo=([d]="4" [c]="3" [b]="2" [a]="1" )
+foo=( d "4" c "3" b "2" a "1" )
+declare -A foo=(["\\"]="5" ["@"]="3" ["holy hell this works"]="4" ["a b"]="1" ["spa ces"]="2" )
+foo=( echo "\\" "5" "@" "3" "holy hell this works" "4" "a b" "1" "spa ces" "2" )
+./assoc11.sub: line 34: "": bad array subscript
+declare -A foo=([";"]="semicolon" ["]"]="def" [a=b]="assignment" ["a]a"]="abc" ["foo[bar"]="bleh" )
+foo=( ";" "semicolon" "]" "def" a=b "assignment" "a]a" "abc" "foo[bar" "bleh" )
+declare -A foo=(["'"]="squote" ["\""]="dquote" ["\\"]="bslash" ["\`"]="backquote" )
+foo=( "'" "squote" "\"" "dquote" "\\" "bslash" "\`" "backquote" )
+declare -A foo=(["bar]bie"]="doll" ["a]=test1;#a"]="123" ["bar\"bie"]="doll" )
+foo=( "bar]bie" "doll" "a]=test1;#a" "123" "bar\"bie" "doll" )
+declare -A inside=([c]="3" [b]="2" [a]="1" )
+inside=( c "3" b "2" a "1" )
+declare -A dict=(["?"]="quest" ["*"]="star" ["'"]="squote" ["\$"]="dol" ["\""]="dquote" ["\\"]="bslash" ["@"]="at" ["}"]="rbrace" ["{"]="lbrace" ["\`"]="bquote" )
+dict=( "?" "quest" "*" "star" "'" "squote" "\$" "dol" "\"" "dquote" "\\" "bslash" "@" "at" "}" "rbrace" "{" "lbrace" "\`" "bquote" )
+declare -A foo=([two]="" [one]="1" )
+foo=( two "" one "1" )
+rparen dquote rbracket bs
+declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbracket" ["\\"]="bs" )
+")" "rparen" "\"" "dquote" "]" "rbracket" "\\" "bs"
+declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbracket" ["\\"]="bs" )
+declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbracket" ["\\"]="bs" )
+declare -A a=([")"]="rparen" ["\""]="dquote" ["]"]="rbracket" ["\\"]="bs" )
+declare -Arx foo=([two]="2" [three]="3" [one]="1" )
+./assoc11.sub: line 90: foo: readonly variable
+declare -A v1=(["1 2"]="3" )
+declare -A v2=(["1 2"]="3" )
+declare -A v3=(["1 2"]="3" )
+declare -A v1=(["1 2"]="3 4 5" )
+declare -A v2=(["1 2"]="3 4 5" )
+declare -A v3=(["1 2"]="3 4 5" )
+declare -A v1=(["1 2"]="3 4 5" )
+declare -A v2=(["1 2"]="3 4 5" )
+declare -A v3=(["1 2"]="3 4 5" )
+declare -A v1=(["1 2"]="3 4 5" )
+declare -A v2=(["1 2"]="3 4 5" )
+declare -A v3=(["1 2"]="3 4 5" )
+declare -A v1=(["20 40 80"]="xtra" ["1 2"]="3 4 5" )
+declare -A v2=(["20 40 80"]="xtra" ["1 2"]="3 4 5" )
+declare -A v3=(["1 2"]="3 4 5" ["\$xtra"]="xtra" )
+declare -A v1=(["20 40 80"]="new xtra" ["1 2"]="3 4 5" )
+declare -A v2=(["20 40 80"]="new xtra" ["1 2"]="3 4 5" )
+declare -A v3=(["1 2"]="3 4 5" ["\$xtra"]="new xtra" )
+declare -A assoc=(["*"]="star" ["!"]="bang" ["@"]="at" )
+at
+star
+declare -A a=(["@"]="at" )
+./assoc13.sub: line 22: ia[@]: bad array subscript
+declare -a ia
+declare -A a=(["@"]="at2" )
+declare -A a=(["@"]="    string" )
+declare -A a=(["*"]="star2" ["@"]="at" )
+declare -A assoc=([hello]="world" ["key with spaces"]="value with spaces" [foo]="bar" [one]="1" )
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = <1>
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[5] = 
+argv[6] = 
+argv[7] = 
+argv[8] = <1>
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[5] = 
+argv[6] = <1>
+argv[7] = 
+argv[8] = 
+argv[1] = <'hello'>
+argv[2] = <'world'>
+argv[3] = <'key with spaces'>
+argv[4] = <'value with spaces'>
+argv[5] = <'one'>
+argv[6] = <'1'>
+argv[7] = <'foo'>
+argv[8] = <'bar'>
+argv[1] = <'hello'>
+argv[2] = <'world'>
+argv[3] = <'key with spaces'>
+argv[4] = <'value with spaces'>
+argv[5] = <'one'>
+argv[6] = <'1'>
+argv[7] = <'foo'>
+argv[8] = <'bar'>
+declare -A clone=([hello]="world" ["key with spaces"]="value with spaces" [foo]="bar" [one]="1" )
+declare -A posparams=([hello]="world" ["key with spaces"]="value with spaces" [foo]="bar" [one]="1" )
+declare -A var=([$'\001']=$'\001\001\001\001' )
+declare -A v2=([$'\001']=$'\001\001\001\001' )
+argv[1] = <^A>
+argv[2] = <^A^A^A^A>
+declare -A foo=([$'\001']=$'\001\001\001\001' )
+declare -A var=([$'\001']=$'\001\001\001\001' )
+argv[1] = <^A>
+argv[2] = <^A^A^A^A>
+declare -A foo=([$'\001']=$'\001\001\001\001' )
+declare -A var=([$'\001']=$'\001\001\001\001' )
+argv[1] = <^A>
+argv[2] = <^A^A^A^A>
+declare -A foo=([$'\001']=$'\001\001\001\001' )
+declare -a var=([0]=$'\001\001\001\001')
+argv[1] = <$'\001\001\001\001'>
+declare -a foo=([0]=$'\001\001\001\001')
+declare -a var=([0]=$'\001\001\001\001')
+argv[1] = <$'\001\001\001\001'>
+declare -a foo=([0]=$'\001\001\001\001')
+declare -A var=([two]=$'ab\001cd' [one]=$'\001\001\001\001' )
+declare -A foo=([two]=$'ab\001cd' [one]=$'\001\001\001\001' )
+declare -A foo=([$'\001']=$'ab\001cd' )
+declare -A foo=([$'\001']=$'\001\001\001\001' )
+declare -A A=(["\$(echo Darwin ; echo stderr>&2)"]="darjeeling" [Darwin]="darjeeling" )
+stderr
+darjsharking
+darjsharking
+stderr
+darj
+darj
+stderr
+DARJEELING
+DARJEELING
+stderr
+'darjeeling'
+'darjeeling'
+stderr
+darjeel
+darjeel
+stderr
+10
+10
+stderr
+darjeeling
+darjeeling
+stderr
+set
+set
+stderr
+set
+set
+stderr
+42
+42
+declare -A A=(["]"]="rbracket" ["["]="lbracket" )
+declare -A A=()
+declare -A A=(["]"]="rbracket" ["["]="lbracket" )
+declare -A A=()
+declare -A A=(["]"]="rbracket" ["["]="lbracket" )
+declare -A A=()
+declare -A A=(["]"]="rbracket" ["["]="lbracket" )
+declare -A A=()
+declare -A A=(["]"]="rbracket" ["["]="lbracket" )
+declare -A A=()
+declare -A A=(["]"]="rbracket" ["["]="lbracket" )
+declare -A A=()
+declare -A A=(["]"]="rbracket" ["["]="lbracket" )
+declare -A A=()
+5: ok 1
diff --git a/tests/assoc.tests b/tests/assoc.tests
index 8b6fd55..c656536 100644
--- a/tests/assoc.tests
+++ b/tests/assoc.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # TEST - basic declaration and assignment
 typeset -A fluff
 declare -A
@@ -18,7 +31,7 @@ declare -p fluff
 
 unset fluff
 
-# TEST - compount assignment and variable attributes
+# TEST - compound assignment and variable attributes
 declare -A wheat chaff
 wheat=( [zero]=0 [one]=a [two]=b [three]=c )
 
@@ -34,7 +47,8 @@ declare +i chaff
 chaff[hello world]=flip
 declare -p chaff
 
-# TEST - errors
+# TEST - no longer errors
+waste[stuff]=other
 unset waste
 chaff[*]=12
 chaff=( [one]=a [*]=12 )
@@ -106,7 +120,7 @@ unset flix wheat
 
 # TEST - index expansion: no word splitting or globbing
 typeset -A wheat
-cd /tmp
+cd ${TMPDIR:=/tmp}
 touch '[sfiri]'
 wheat=([s*]=6 [foo bar]=flix )
 
@@ -173,6 +187,13 @@ T='([a]=1)'
 echo "${T[@]}"
 unset T
 
+# peculiar ksh93 semantics for unsubscripted assoc variable reference
+declare -A T
+T[0]='zero'
+if [ "$T" != "${T[0]}" ]; then
+	echo 'assoc.tests: $T and ${T[0]} mismatch'
+fi
+
 ${THIS_SH} ./assoc1.sub
 
 ${THIS_SH} ./assoc2.sub
@@ -184,3 +205,64 @@ ${THIS_SH} ./assoc4.sub
 ${THIS_SH} ./assoc5.sub
 
 ${THIS_SH} ./assoc6.sub
+
+${THIS_SH} ./assoc7.sub
+
+# test converting between scalars and assoc arrays
+unset assoc
+assoc=assoc
+declare -A assoc
+declare -p assoc
+echo ${assoc[@]}
+
+# weird syntax required to append to multiple existing array elements using
+# compound assignment syntax
+unset assoc
+declare -A assoc 
+assoc=( [one]=one [two]=two [three]=three )
+assoc+=( [one]+=more [two]+=less )
+declare -p assoc
+
+readonly -A assoc
+declare -p assoc
+
+declare -A hash
+
+hash=(["key"]="value1")
+declare -p hash
+hash=(["key"]="${hash["key"]} value2")
+declare -p hash
+
+unset hash
+
+${THIS_SH} ./assoc8.sub
+
+# new shopt option to prevent multiple expansion of assoc array subscripts
+${THIS_SH} ./assoc9.sub
+
+${THIS_SH} ./assoc10.sub
+
+# test assigning associative arrays using compound key/value pair assignments
+${THIS_SH} ./assoc11.sub
+
+# more kvpair associative array assignment tests
+${THIS_SH} ./assoc12.sub
+
+# assignment to @ and *
+${THIS_SH} ./assoc13.sub
+
+# tests of the @k transformation on associative arrays
+${THIS_SH} ./assoc14.sub
+
+# tests with subscripts and values containing 0x01 (some indexed array tests too)
+${THIS_SH} ./assoc15.sub
+
+# tests with subscripts being expanded more than one in ${xxx} word expansions
+${THIS_SH} ./assoc16.sub
+
+# tests with `[' and `]' subscripts and `unset'
+${THIS_SH} ./assoc17.sub
+
+# tests with `[' and `]' subscripts and printf/read/wait builtins
+${THIS_SH} ./assoc18.sub
+
diff --git a/tests/assoc1.sub b/tests/assoc1.sub
index a045bde..99a6e22 100644
--- a/tests/assoc1.sub
+++ b/tests/assoc1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 hash -r
 echo ${BASH_CMDS[@]}
 
diff --git a/tests/assoc10.sub b/tests/assoc10.sub
new file mode 100644
index 0000000..5b21525
--- /dev/null
+++ b/tests/assoc10.sub
@@ -0,0 +1,30 @@
+#   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 .
+#
+f() { declare -a a; declare -A a; echo -n "$FUNCNAME: " ; declare -p a; }
+f
+
+f() { declare -A a; declare -a a; echo -n "$FUNCNAME: " ; declare -p a; }
+f
+
+echo 
+
+f() { declare -a a; echo -n "$FUNCNAME: " ; declare -p a; }
+a=7
+f
+echo -n 'main: '; declare -p a
+
+f() { declare -A a; echo -n "$FUNCNAME: " ; declare -p a; }
+a=42
+f
+echo -n 'main: '; declare -p a
diff --git a/tests/assoc11.sub b/tests/assoc11.sub
new file mode 100644
index 0000000..9d9afae
--- /dev/null
+++ b/tests/assoc11.sub
@@ -0,0 +1,90 @@
+#   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 .
+#
+# these tests were previously in array19.sub, but they are acceptable syntax now
+
+declare -A a
+declare a='(1 2 3)'
+declare -p a
+unset a
+
+declare -A foo
+
+v1='spa ces'
+v2=@
+
+foo=(a 1 b 2 c 3 d 4 )
+declare -p foo
+echo foo=\( ${foo[@]@K} \)
+
+foo=('a b' 1 "$v1" 2 "$v2" 3 'holy hell this works' 4 \\ 5)
+declare -p foo
+echo foo=\( echo ${foo[@]@K} \)
+
+foo=( "" null )
+
+foo=('a]a' abc ']' def $(echo 'foo[bar') bleh \; semicolon a=b assignment)
+declare -p foo
+echo foo=\( ${foo[@]@K} \)
+
+foo=('`' backquote '"' dquote "'" squote \\ bslash)
+declare -p foo
+echo foo=\( ${foo[@]@K} \)
+
+bar='a]=test1;#a'
+foo=( $bar 123 bar\"bie doll bar]bie doll )
+declare -p foo
+echo foo=\( ${foo[@]@K} \)
+
+func()
+{
+	declare -A inside=(a 1 b 2 c 3)
+	declare -p inside
+	echo inside=\( ${inside[@]@K} \)
+}
+func
+
+loaddict()
+{
+	dict=( '"' dquote '`' bquote "'" squote '\' bslash)
+	dict+=( '$' dol @ at * star \{ lbrace \} rbrace ? quest)
+
+	declare -p dict
+	echo dict=\( ${dict[@]@K} \)
+}
+declare -A dict
+loaddict
+
+foo=(one 1 two)
+declare -p foo
+echo foo=\( ${foo[@]@K} \)
+
+typeset -A a=( [\\]=bs [\"]=dquote [\)]=rparen [\]]=rbracket )
+echo ${a[@]}
+declare -p a
+
+echo ${a[@]@K}
+echo ${a[@]@A}
+
+eval "${a[@]@A}"
+declare -p a
+
+eval "a=( ${a[@]@K} )"
+declare -p a
+
+unset a foo
+readonly -A foo=( one 1 two 2 three 3 )
+
+export foo
+declare -p foo
+declare foo+=( seven 7 eight 8 )
diff --git a/tests/assoc12.sub b/tests/assoc12.sub
new file mode 100644
index 0000000..359dc0b
--- /dev/null
+++ b/tests/assoc12.sub
@@ -0,0 +1,74 @@
+#   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 .
+#
+foo='1 2'
+bar='3 4 5'
+xtra='20 40 80'
+
+declare -A v1=( $foo 3 )
+declare -p v1
+
+declare -A v2=( [$foo]=3 )
+declare -p v2
+
+declare -A  v3
+v3=( $foo 3 )
+declare -p v3
+
+unset v1 v2 v3
+
+declare -A v1=( $foo $bar )
+declare -p v1
+
+declare -A v2=( [$foo]=$bar )
+declare -p v2
+
+declare -A  v3
+v3=( $foo $bar )
+declare -p v3
+
+unset v1 v2 v3
+
+declare -A v1=( "$foo" $bar )
+declare -p v1
+
+declare -A v2=( ["$foo"]=$bar )
+declare -p v2
+
+declare -A  v3
+v3=( "$foo" $bar )
+declare -p v3
+
+unset v1 v2 v3
+
+declare -A v1=( "$foo" "$bar" )
+declare -p v1
+
+declare -A v2=( ["$foo"]="$bar" )
+declare -p v2
+
+declare -A  v3
+v3=( "$foo" "$bar" )
+declare -p v3
+
+v1+=( $xtra xtra )
+v2+=( "$xtra" xtra )
+v3+=( '$xtra' xtra )
+
+declare -p v1 v2 v3
+
+v1+=( [$xtra]='new xtra' )
+v2+=( ["$xtra"]='new xtra' )
+v3+=( ['$xtra']='new xtra' )
+
+declare -p v1 v2 v3
diff --git a/tests/assoc13.sub b/tests/assoc13.sub
new file mode 100644
index 0000000..7e66972
--- /dev/null
+++ b/tests/assoc13.sub
@@ -0,0 +1,44 @@
+# assignment to @ and *
+
+declare -A assoc
+key=@
+key2=*
+
+assoc[$key]=at
+assoc[$key2]=star
+assoc[!]=bang
+declare -p assoc
+
+echo ${assoc[$key]}
+echo ${assoc[$key2]}
+unset assoc
+
+declare -A a
+
+a[@]=at
+declare -p a
+
+declare -a ia
+ia[@]=garbage
+
+declare -p ia
+
+declare a[@]=at2
+declare -p a
+
+unset a ia
+
+declare -A a
+printf -v a[@] "%10s" string
+
+declare -p a
+unset a
+
+declare -A a
+declare a[$key2]=star
+declare a[@]=at
+declare a[*]=star2
+
+declare -p a
+unset a
+
diff --git a/tests/assoc14.sub b/tests/assoc14.sub
new file mode 100644
index 0000000..95df049
--- /dev/null
+++ b/tests/assoc14.sub
@@ -0,0 +1,35 @@
+#   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 .
+#
+
+declare -A assoc=(hello world "key with spaces" "value with spaces" one 1 foo bar)
+declare -p assoc
+
+recho "${assoc[@]}"
+recho "${assoc[@]@k}"
+
+recho "${assoc[*]}"
+recho "${assoc[*]@k}"
+
+set -- hello world "key with spaces" "value with spaces" one 1 foo bar
+recho "${@}"
+recho "${@@K}"
+recho "${@@k}"
+
+declare -A clone
+eval clone=\( "${assoc[@]@K}" \)
+declare -p clone
+
+declare -A posparams
+eval posparams=\( "${@@K}" \)
+declare -p posparams
diff --git a/tests/assoc15.sub b/tests/assoc15.sub
new file mode 100644
index 0000000..c47b153
--- /dev/null
+++ b/tests/assoc15.sub
@@ -0,0 +1,92 @@
+#   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 .
+#
+
+# associative arrays first
+
+v=$'\x01'
+
+declare -A var foo v2
+var=( $'\x01' $'\x01\x01\x01\x01' )
+declare -p var
+v2=( $v $v$v$v$v )
+declare -p v2
+
+recho "${var[@]@k}"
+eval foo=\( "${var[@]@k}" \)
+declare -p foo
+
+var=(   )
+declare -p var
+
+recho "${var[@]@k}"
+eval foo=\( "${var[@]@k}" \)
+declare -p foo
+
+var=( []= )
+declare -p var
+
+recho "${var[@]@k}"
+eval foo=\( "${var[@]@k}" \)
+declare -p foo
+
+# now indexed arrays
+unset -v var foo
+
+declare -a var
+var=( [0]= )
+declare -p var
+
+declare -a foo
+recho "${var[@]@Q}"
+eval foo=\( "${var[@]@Q}" \)
+declare -p foo
+
+var=(  )
+declare -p var
+
+unset foo
+
+declare -a foo
+recho "${var[@]@Q}"
+eval foo=\( "${var[@]@Q}" \)
+declare -p foo
+
+# similar to array29.sub
+unset -v var foo v2
+
+declare -A var
+var=( one $'\x01\x01\x01\x01' two ab$'\001'cd )
+declare -p var
+
+pv()
+{
+	local -A foo
+	eval foo=\( "${var[@]@k}" \)
+	declare -p foo
+}
+pv
+
+pv1()
+{
+	local -A foo=( $'\x01' "${var[two]}" )
+	declare -p foo
+}
+pv1
+
+pv2()
+{
+	local -A foo=( [$'\x01']="${var[one]}" )
+	declare -p foo
+}
+pv2
diff --git a/tests/assoc16.sub b/tests/assoc16.sub
new file mode 100644
index 0000000..ae8296b
--- /dev/null
+++ b/tests/assoc16.sub
@@ -0,0 +1,56 @@
+#   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 .
+#
+
+# bash versions up to and including bash-5.1 expanded these subscripts more
+# than once
+
+declare -A A
+
+A["Darwin"]=darjeeling
+A['$(echo Darwin ; echo stderr>&2)']=darjeeling
+
+declare -p A
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]//eel/shark}
+echo ${A['$(echo Darwin ; echo stderr>&2)']//eel/shark}
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]:0:4}
+echo ${A['$(echo Darwin ; echo stderr>&2)']:0:4}
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]^^}
+echo ${A['$(echo Darwin ; echo stderr>&2)']^^}
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]@Q}
+echo ${A['$(echo Darwin ; echo stderr>&2)']@Q}
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]%ing}
+echo ${A['$(echo Darwin ; echo stderr>&2)']%ing}
+
+echo ${#A[$(echo Darwin ; echo stderr>&2)]}
+echo ${#A['$(echo Darwin ; echo stderr>&2)']}
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]:-value}
+echo ${A['$(echo Darwin ; echo stderr>&2)']:-value}
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]:+set}
+echo ${A['$(echo Darwin ; echo stderr>&2)']:+set}
+
+echo ${A[$(echo Darwin ; echo stderr>&2)]:+set}
+echo ${A['$(echo Darwin ; echo stderr>&2)']:+set}
+
+darjeeling=7*6
+Darwin=7*4
+
+echo $(( ${A[$(echo Darwin ; echo stderr>&2)]} ))
+echo $(( ${A['$(echo Darwin ; echo stderr>&2)']} ))
diff --git a/tests/assoc17.sub b/tests/assoc17.sub
new file mode 100644
index 0000000..a98aaa1
--- /dev/null
+++ b/tests/assoc17.sub
@@ -0,0 +1,58 @@
+#   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 .
+#
+# test behavior with `unset' and `[' and ']' subscripts
+
+declare -A A
+rkey=']'
+lkey='['
+
+A[$rkey]=rbracket
+A[$lkey]=lbracket
+declare -p A
+
+unset A[$rkey]
+unset A[$lkey]
+declare -p A
+
+A["$rkey"]=rbracket
+A["$lkey"]=lbracket
+declare -p A
+
+unset A["$rkey"]
+unset A["$lkey"]
+declare -p A
+
+A[\]]=rbracket
+A[\[]=lbracket
+declare -p A
+
+unset A[\]]
+unset A[\[]
+declare -p A
+
+A[']']=rbracket
+A['[']=lbracket
+declare -p A
+
+unset A[']']
+unset A['[']
+declare -p A
+
+A["]"]=rbracket
+A["["]=lbracket
+declare -p A
+
+unset A["]"]
+unset A["["]
+declare -p A
diff --git a/tests/assoc18.sub b/tests/assoc18.sub
new file mode 100644
index 0000000..0597609
--- /dev/null
+++ b/tests/assoc18.sub
@@ -0,0 +1,59 @@
+#   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 .
+#
+
+# test behavior of builtins that can take array subscript arguments, make
+# sure they work in the presence of associative arrays and `problematic' keys
+# if assoc_expand_once is set
+#
+# affected builtins: printf, read, wait
+
+declare -A A
+rkey=']'
+lkey='['
+
+shopt -s assoc_expand_once
+
+printf -v A[$rkey] rbracket
+printf -v A[$lkey] lbracket
+declare -p A
+
+unset A[$rkey]
+unset A[$lkey]
+declare -p A
+
+unset A
+declare -A A
+
+read A[$rkey] <<.
+#
 echo ${BASH_ALIASES[@]}
 
 alias foo=/usr/sbin/foo
diff --git a/tests/assoc3.sub b/tests/assoc3.sub
index 9129ef1..a7eeb26 100644
--- a/tests/assoc3.sub
+++ b/tests/assoc3.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 foo()
 {
 	declare -A afoo=([six]="six" [foo bar]="foo quux")
diff --git a/tests/assoc4.sub b/tests/assoc4.sub
index 1516dc5..eff9d0e 100644
--- a/tests/assoc4.sub
+++ b/tests/assoc4.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 IFS=/
 declare -A i
 
diff --git a/tests/assoc5.sub b/tests/assoc5.sub
index 400f3d3..844d944 100644
--- a/tests/assoc5.sub
+++ b/tests/assoc5.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 declare -A myarray
 
 # this needs fixes to skipsubscript
diff --git a/tests/assoc6.sub b/tests/assoc6.sub
index 54112ee..88b8eaf 100644
--- a/tests/assoc6.sub
+++ b/tests/assoc6.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 declare -A foo
 
 foo=([bar\"bie]=doll)
diff --git a/tests/assoc7.sub b/tests/assoc7.sub
new file mode 100644
index 0000000..cae57c5
--- /dev/null
+++ b/tests/assoc7.sub
@@ -0,0 +1,29 @@
+#   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 .
+#
+# problem with bash versions through bash-4.2
+foo()
+{
+    declare -A hash
+    declare hash[baz]=bar #bash crashes here
+
+    echo ${hash[@]}
+}
+
+foo
+
+declare -a ary
+printf -v ary[0] "%b" ""
+echo "after printf"
+x="${ary[*]}"  # segfaults here
+echo "after use: $?" 
diff --git a/tests/assoc8.sub b/tests/assoc8.sub
new file mode 100644
index 0000000..83b43f4
--- /dev/null
+++ b/tests/assoc8.sub
@@ -0,0 +1,7 @@
+# warnings introduced beginning with bash-4.4-alpha
+
+var=foo; declare -A "arr$var=([x]=y)"
+
+key1=foo key2=bar
+
+declare -A a=([foo]='([bar]=baz)') "b=${a[$key1]}"
diff --git a/tests/assoc9.sub b/tests/assoc9.sub
new file mode 100644
index 0000000..f83ac6d
--- /dev/null
+++ b/tests/assoc9.sub
@@ -0,0 +1,159 @@
+#   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 .
+#
+typeset -A a=( [\\]= [\"]= [\)]= ) b
+for x in "${!a[@]}"; do b[$x]=; done
+b+=([\`]= [\]]=)
+typeset -p b
+for x in "${!a[@]}"; do
+  unset -v 'b[$x]'
+done
+typeset -p b
+
+unset -v a b
+
+loaddict()
+{
+    dict['"']=1
+    dict['`']=2
+    dict["'"]=3
+    dict['\']=4
+    declare -p dict
+}
+
+del()
+{
+	unset -v dict["$1"];
+}
+
+declare -A dict
+loaddict
+for k in "${!dict[@]}"; do del "$k"; done 
+declare -p dict
+
+unset 'dict[@]'
+
+shopt -s assoc_expand_once
+declare -A dict
+loaddict
+for k in "${!dict[@]}"; do del "$k"; done 
+declare -p dict
+
+unset a b dict
+
+typeset -A a
+b="80's"
+
+((++a[$b]))
+
+((++a["$b"]))
+[[ $((++a[$b])) ]]
+[[ $((++a["$b"])) ]]
+echo ${a["$b"]}
+echo ${a[$b]}
+
+let "++a[$b]"
+
+echo 'a[$b]=' "${a[$b]}"
+
+unset a b
+
+declare -A a
+b="80's"
+
+: ${a[$b]:='Depeche Mode'}
+
+declare -p a
+
+unset a b
+shopt -u assoc_expand_once
+
+typeset -A a
+b="80's"
+
+read a[$b] <<<"Depeche Mode"
+typeset -p a
+
+shopt -s assoc_expand_once
+read a[$b] <<<"Depeche Mode"
+typeset -p a
+
+unset a
+shopt -u assoc_expand_once
+
+typeset -A a
+
+printf -v a[$b] "%s" "Depeche Mode"
+typeset -p a
+
+shopt -s assoc_expand_once
+
+printf -v a[$b] "%s" "Depeche Mode"
+typeset -p a
+
+unset a
+
+declare -A a
+x='$(date >&2)'
+a[$x]=5
+
+shopt -s assoc_expand_once
+echo $((1+a[$x]))
+echo $((1+a[\$x]))
+echo "1+${a[$x]}"
+
+declare -p a
+
+shopt -s assoc_expand_once
+declare -A myarray
+
+declare myarray["foo[bar"]=bleh
+myarray["foo"]=bleh
+
+declare -p myarray
+
+key='$(date >&2)'
+declare -A aa
+aa[$key]=foo
+echo "${aa[$key]}"
+
+[[ -v aa[$key] ]] || echo bad assoc expansion
+
+shopt -u assoc_expand_once
+
+declare -A assoc
+
+var=x123
+assoc['$var']=value
+
+declare -p assoc
+
+unset "assoc[$var]"
+declare -p assoc
+
+unset 'assoc[$var]'
+declare -p assoc
+
+shopt -s assoc_expand_once
+unset 'assoc[$var]'
+declare -p assoc
+
+typeset -A foo
+
+foo["foo]bar"]=bip
+typeset foo["foo]bar"]=bax
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
diff --git a/tests/attr.right b/tests/attr.right
new file mode 100644
index 0000000..d2d28b7
--- /dev/null
+++ b/tests/attr.right
@@ -0,0 +1,37 @@
+after f1:declare -ar a=([0]="1")
+./attr.tests: line 17: a: readonly variable
+after f2:declare -ar a=([0]="1")
+./attr.tests: line 18: a: readonly variable
+after f3:declare -ar a=([0]="1")
+./attr.tests: line 19: readonly: a: readonly variable
+after f4:declare -ar a=([0]="1")
+after f2:declare -ar b=([0]="2")
+after f3:declare -ar c=([0]="(3)")
+after f4:declare -ar d=([0]="4")
+declare -r m="4"
+in func:declare -r n="4"
+declare -r n="4"
+./attr1.sub: line 26: p: readonly variable
+declare -r p="1"
+./attr1.sub: line 32: r: readonly variable
+declare -ar r=([0]="1")
+./attr1.sub: line 36: r: readonly variable
+declare -ar r=([0]="1")
+./attr1.sub: line 40: r: readonly variable
+declare -ar r=([0]="1")
+./attr1.sub: line 44: readonly: r: readonly variable
+declare -ar r=([0]="1")
+declare -ar x=([0]="4")
+in func:declare -ar y=([0]="4")
+declare -ar y=([0]="4")
+in func:declare -ar z=([0]="4")
+declare -ar z=([0]="4")
+in func:declare -ar y1=([0]="4")
+declare -ar y1=([0]="4")
+in func:declare -ar z1=([0]="4")
+declare -ar z1=([0]="4")
+declare -x p="4"
+declare -ax r=([0]="4")
+declare -ax r=([0]="(5)")
+declare -ax r=([0]="6")
+declare -ax r=([0]="7")
diff --git a/tests/attr.tests b/tests/attr.tests
new file mode 100644
index 0000000..4874d9a
--- /dev/null
+++ b/tests/attr.tests
@@ -0,0 +1,54 @@
+#   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 .
+#
+a=(outside)
+
+f1() { readonly a=(1) ; }
+f2() { readonly -a a=(2) ; }
+f3() { readonly 'a=(3)' ; }
+f4() { readonly -a 'a=(4)' ; }
+
+f1
+echo -n after f1:
+declare -p a
+f2
+echo -n after f2:
+declare -p a
+f3
+echo -n after f3:
+declare -p a
+f4
+echo -n after f4:
+declare -p a
+
+b=(outside)
+c=(outside)
+d=(outside)
+
+f2() { readonly -a b=(2) ; }
+f3() { readonly 'c=(3)' ; }
+f4() { readonly -a 'd=(4)' ; }
+
+f2
+echo -n after f2:
+declare -p b
+f3
+echo -n after f3:
+declare -p c
+f4
+echo -n after f4:
+declare -p d
+
+${THIS_SH} ./attr1.sub
+${THIS_SH} ./attr2.sub
+
diff --git a/tests/attr1.sub b/tests/attr1.sub
new file mode 100644
index 0000000..4424be9
--- /dev/null
+++ b/tests/attr1.sub
@@ -0,0 +1,68 @@
+#   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 .
+#
+m=1
+readonly m=4
+declare -p m
+
+n=1
+f() { readonly n=4; echo -n in func: ; declare -p n ; }
+f
+declare -p n
+
+p=1
+readonly p
+
+readonly p=4
+declare -p p
+
+r=(1)
+readonly r
+
+f() { readonly r=(4) ; }
+f
+declare -p r
+
+f() { readonly r='(5)' ; }
+f
+declare -p r
+
+f() { readonly -a r=(6) ; }
+f
+declare -p r
+
+f() { readonly -a r='(7)' ; }
+f
+declare -p r
+
+x=(1)
+readonly x=(4)
+declare -p x
+
+y=(1)
+f() { readonly y=(4); echo -n in func: ; declare -p y; }
+f
+declare -p y
+
+z=(1)
+f() { readonly -a z=(4); echo -n in func: ; declare -p z; }
+f
+declare -p z
+
+f() { readonly y1=(4); echo -n in func: ; declare -p y1; }
+f
+declare -p y1
+
+f() { readonly -a z1=(4); echo -n in func: ; declare -p z1; }
+f
+declare -p z1
diff --git a/tests/attr2.sub b/tests/attr2.sub
new file mode 100644
index 0000000..dadca10
--- /dev/null
+++ b/tests/attr2.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+p=1
+export p
+
+export p=4
+declare -p p
+
+r=(1)
+export r
+
+f() { export r=(4) ; }
+f
+declare -p r
+
+f() { export r='(5)' ; }
+f
+declare -p r
+
+f() { export -a r=(6) ; }
+f
+declare -p r
+
+f() { export -a r='(7)' ; }
+f
+declare -p r
diff --git a/tests/braces.right b/tests/braces.right
index a02bfc6..4017546 100644
--- a/tests/braces.right
+++ b/tests/braces.right
@@ -57,6 +57,7 @@ a-{bdef-g-c a-{bdef-i-c
 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
+2147483645 2147483646 2147483647 2147483648 2147483649
 10 8 6 4 2 0
 10 8 6 4 2 0
 -50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0
diff --git a/tests/braces.tests b/tests/braces.tests
index c2b153e..da0b624 100644
--- a/tests/braces.tests
+++ b/tests/braces.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 echo ff{c,b,a}
 echo f{d,e,f}g
 echo {l,n,m}xyz
@@ -94,6 +107,9 @@ echo {a..z}
 echo {a..z..2}
 echo {z..a..-2}
 
+# make sure brace expansion handles ints > 2**31 - 1 using intmax_t
+echo {2147483645..2147483649}
+
 # unwanted zero-padding -- fixed post-bash-4.0
 echo {10..0..2}
 echo {10..0..-2}
diff --git a/tests/builtins.right b/tests/builtins.right
index 30e10ca..4f51d43 100644
--- a/tests/builtins.right
+++ b/tests/builtins.right
@@ -1,3 +1,4 @@
+1000
 a
 end-1
 a
@@ -105,9 +106,9 @@ 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
+./source5.sub: line 23: /tmp/source-notthere: No such file or directory
 after bad source 1
-./source5.sub: line 17: /tmp/source-notthere: No such file or directory
+./source5.sub: line 30: /tmp/source-notthere: No such file or directory
 one - OK
 0
 0
@@ -117,6 +118,23 @@ three - OK
 0
 four - OK
 0
+abc
+def
+ghi
+after
+one.1 subshell
+two.1 subshell
+three.1 subshell
+four.1 subshell
+one.2 subshell
+two.2 subshell
+three.2 subshell
+four.2 subshell
+x29 - done
+abc
+def
+ghi
+ok
 AVAR
 foo
 foo
@@ -127,15 +145,137 @@ AVAR
 foo
 declare -x foo=""
 declare -x FOO="\$\$"
-./builtins.tests: line 210: declare: FOO: not found
+./builtins.tests: line 228: declare: FOO: not found
 declare -x FOO="\$\$"
 ok
 ok
-./builtins.tests: line 242: kill: 4096: invalid signal specification
+./builtins.tests: line 260: kill: 4096: invalid signal specification
 1
 a\n\n\nb
 a
 
 
 b
-./builtins.tests: line 251: exit: status: numeric argument required
+before: f = 4
+inside
+after: f = 8 bar = 4
+declare -a c
+declare -A d
+declare -a c=([0]="4")
+declare -A c=([0]="4" )
+declare -a c=([0]="1" [1]="2" [2]="3")
+declare -A c=([two]="2" [three]="3" [one]="1" )
+declare -a c=([0]="1" [1]="2" [2]="3")
+declare -a c=([0]="1" [1]="2" [2]="3")
+unset
+unset
+assoc 1 unset
+array 1 unset
+assoc 2 unset
+array 2 unset
+unset1
+unset2
+1
+1
+1
+1
+0
+0
+assoc A unset
+array a
+assoc A
+array a
+assoc B unset
+array b unset
+assoc B unset
+array b unset
+scalar 1
+scalar 2
+scalar 3 unset
+argv[1] = 
+assoc: 3
+array: 3
+scalar: 13
+scalar: 1
+scalar: 0
+scalar: 1
+scalar: 0
+scalar: 0
+all set:
+one
+two
+f1 () 
+{ 
+    echo f1
+}
+f2 () 
+{ 
+    echo f2
+}
+all unset:
+unset1
+unset2
+./builtins6.sub: line 41: declare: f1: not found
+./builtins6.sub: line 41: declare: f2: not found
+all reset:
+one-one
+two-one
+f1 () 
+{ 
+    echo f1
+}
+f2 () 
+{ 
+    echo f2
+}
+vars unset:
+unset1
+unset2
+f1 () 
+{ 
+    echo f1
+}
+f2 () 
+{ 
+    echo f2
+}
+funcs unset:
+one-two
+two-two
+bash: line 1: notthere: No such file or directory
+one
+bash: line 1: notthere: No such file or directory
+two
+bash: line 1: .: notthere: file not found
+one
+bash: line 1: .: notthere: file not found
+0
+0
+0
+0
+argv[1] = 
+0
+argv[1] = 
+0
+three
+0
+four
+0
+./builtins7.sub: line 19: : command not found
+127
+0
+./builtins7.sub: line 27: notthere: No such file or directory
+after 1
+./builtins7.sub: line 28: notthere: No such file or directory
+after 2
+type is a shell builtin
++ command -v type
+type
++ command command -v type
+type
++ command -p command -v type
+type
++ command -p -- command -v type
+type
++ set +x
+./builtins.tests: line 284: exit: status: numeric argument required
diff --git a/tests/builtins.tests b/tests/builtins.tests
index 6d20ae9..8eee43e 100644
--- a/tests/builtins.tests
+++ b/tests/builtins.tests
@@ -1,8 +1,23 @@
+#   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 .
+#
 # tests for miscellaneous builtins not tested elsewhere
 set +p
 set +o posix
 
-ulimit -c 0 2>/dev/null
+ulimit -S -c 0 2>/dev/null
+ulimit -c -S -- 1000 2>/dev/null
+ulimit -c 2>/dev/null
 
 # check that break breaks loops
 for i in a b c; do echo $i; break; echo bad-$i; done
@@ -124,7 +139,7 @@ hash -r
 hash
 
 # this had better succeed, since command -p guarantees we will find the
-# standard utilties
+# standard utilities
 command -p hash rm
 
 # check out source/.
@@ -173,12 +188,15 @@ echo "$@"
 # test out cd and $CDPATH
 ${THIS_SH} ./builtins1.sub
 
-# test behavior of `.' when given a non-existant file argument
+# test behavior of `.' when given a non-existent file argument
 ${THIS_SH} ./source5.sub
 
 # test bugs in sourcing non-regular files, fixed post-bash-3.2
 ${THIS_SH} ./source6.sub
 
+# test bugs with source called from multiline aliases and other contexts
+${THIS_SH} ./source7.sub
+
 # in posix mode, assignment statements preceding special builtins are
 # reflected in the shell environment.  `.' and `eval' need special-case
 # code.
@@ -247,6 +265,21 @@ kill -l ${sigone/SIG/}
 # test behavior of shopt xpg_echo
 ${THIS_SH} ./builtins2.sub
 
+# test behavior of declare -g
+${THIS_SH} ./builtins3.sub
+
+# test behavior of using declare to create variables without assigning values
+${THIS_SH} ./builtins4.sub
+
+# test behavior of set and unset array variables
+${THIS_SH} ./builtins5.sub
+
+# test behavior of unset builtin with -f and -v options
+${THIS_SH} ./builtins6.sub
+
+# test behavior of command builtin after changing it to a pseudo-keyword
+${THIS_SH} ./builtins7.sub
+
 # this must be last -- it is a fatal error
 exit status
 
diff --git a/tests/builtins3.sub b/tests/builtins3.sub
new file mode 100644
index 0000000..5596c56
--- /dev/null
+++ b/tests/builtins3.sub
@@ -0,0 +1,14 @@
+# declare -g added in bash-4.2
+f=4
+
+foo()
+{
+	declare -g f=8
+	declare -g bar=4
+
+	echo inside
+}
+
+echo before: f = $f
+foo
+echo after: f = $f bar = $bar
diff --git a/tests/builtins4.sub b/tests/builtins4.sub
new file mode 100644
index 0000000..058ee2c
--- /dev/null
+++ b/tests/builtins4.sub
@@ -0,0 +1,57 @@
+#   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 .
+#
+declare -a c
+declare -p c
+
+declare -A d
+declare -p d
+unset c d
+
+declare -a c
+c=4
+declare -p c
+unset c
+
+declare -A c
+c=4
+declare -p c
+unset c
+
+declare -a c
+c=(1 2 3)
+declare -p c
+unset c
+
+declare -A c
+c=([one]=1 [two]=2 [three]=3)
+declare -p c
+unset c
+
+declare -a c
+read -a c < <(echo 1 2 3)
+declare -p c
+unset c
+
+declare -a c
+mapfile -t c < <(echo 1$'\n'2$'\n'3)
+declare -p c
+unset c
+
+unset foo
+declare -A foo
+echo ${foo-unset}
+
+unset foo
+declare -a foo
+echo ${foo-unset}
diff --git a/tests/builtins5.sub b/tests/builtins5.sub
new file mode 100644
index 0000000..4fcf793
--- /dev/null
+++ b/tests/builtins5.sub
@@ -0,0 +1,83 @@
+#   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 .
+#
+# a start at a test suite for what it means for an array to be set or unset and
+# how to test that state
+typeset -A A
+A[a]=1
+typeset -a a
+a[1]=1
+
+if [ -v A ]; then echo assoc 1; else echo assoc 1 unset; fi
+if [ -v a ]; then echo array 1; else echo array 1 unset; fi
+
+if [ -v "${A[@]}" ]; then echo assoc 2; else echo assoc 2 unset; fi
+if [ -v "${a[@]}" ]; then echo array 2; else echo array 2 unset; fi
+
+echo ${A-unset1}
+echo ${a-unset2}
+
+echo ${A[@]-unset3}
+echo ${a[@]-unset4}
+
+echo ${#A[@]}
+echo ${#a[@]}
+
+typeset -A B
+typeset -a b
+
+echo ${#B[@]}
+echo ${#b[@]}
+
+scalar1=foo
+scalar2=
+
+# this now checks for A[@] treating @ as a valid key - post-bash-5.1
+if [ -v A[@] ]; then echo assoc A; else echo assoc A unset; fi
+if [ -v a[@] ]; then echo array a; else echo array a unset; fi
+
+if [ ${#A[@]} -gt 0 ]; then echo assoc A; else echo assoc A unset; fi
+if [ ${#a[@]} -gt 0 ]; then echo array a; else echo array a unset; fi
+
+if [ -v B[@] ]; then echo assoc B; else echo assoc B unset; fi
+if [ -v b[@] ]; then echo array b; else echo array b unset; fi
+
+if [ ${#B[@]} -gt 0 ]; then echo assoc B; else echo assoc B unset; fi
+if [ ${#b[@]} -gt 0 ]; then echo array b; else echo array b unset; fi
+
+if [ -v scalar1[@] ]; then echo scalar 1; else echo scalar 1 unset; fi
+if [ -v scalar2[@] ]; then echo scalar 2; else echo scalar 2 unset; fi
+if [ -v scalar3[@] ]; then echo scalar 3; else echo scalar 3 unset; fi
+
+unset a A
+declare -A assoc=([one]=one [two]=two [three]=three)
+declare -a array=(one two three)
+
+scalar="one two three"
+scalar2=
+
+recho "${scalar[@]}"
+
+echo assoc: ${#assoc[@]}
+echo array: ${#array[@]}
+
+echo scalar: ${#scalar}
+echo scalar: ${#scalar[@]}
+
+echo scalar: ${#scalar2}
+echo scalar: ${#scalar2[@]}
+
+echo scalar: ${#scalar3}
+echo scalar: ${#scalar3[@]}
+
+
diff --git a/tests/builtins6.sub b/tests/builtins6.sub
new file mode 100644
index 0000000..d4fdf4a
--- /dev/null
+++ b/tests/builtins6.sub
@@ -0,0 +1,81 @@
+#   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 .
+#
+f1()
+{
+	echo f1
+}
+
+f2()
+{
+	echo f2
+}
+
+v1=one
+v2=two
+
+echo all set:
+
+echo ${v1-unset1}
+echo ${v2-unset2}
+
+declare -f -p f1 f2
+
+unset v1 f1 v2 f2
+
+echo all unset:
+
+echo ${v1-unset1}
+echo ${v2-unset2}
+
+declare -f -p f1 f2
+
+f1()
+{
+	echo f1
+}
+
+f2()
+{
+	echo f2
+}
+
+v1=one-one
+v2=two-one
+
+echo all reset:
+echo ${v1-unset1}
+echo ${v2-unset2}
+
+declare -f -p f1 f2
+
+unset -v v1 f1 v2 f2
+
+echo vars unset:
+
+echo ${v1-unset1}
+echo ${v2-unset2}
+
+declare -f -p f1 f2
+
+v1=one-two
+v2=two-two
+
+unset -f v1 f1 v2 f2
+
+echo funcs unset:
+
+echo ${v1-unset1}
+echo ${v2-unset2}
+
+declare -f f1 f2
diff --git a/tests/builtins7.sub b/tests/builtins7.sub
new file mode 100644
index 0000000..67e5e61
--- /dev/null
+++ b/tests/builtins7.sub
@@ -0,0 +1,38 @@
+: ${THIS_SH:=./bash}
+
+${THIS_SH} -c 'command . notthere ; echo one' bash
+${THIS_SH} -c '. notthere ; echo two' bash
+
+${THIS_SH} -o posix -c 'command . notthere ; echo one' bash
+${THIS_SH} -o posix -c '. notthere ; echo two' bash
+
+command ; echo $?
+command -- ; echo $?
+command -p ; echo $?
+command -p -- ; echo $?
+
+command recho one; echo $?
+command -- recho two; echo $?
+command -p echo three; echo $?
+command -p -- echo four ; echo $?
+
+command ''
+echo $?
+
+command -p
+echo $?
+
+${THIS_SH} -c 'set -e ; command false ; echo after' bash
+
+command command command -p . notthere ; echo after 1
+command -p command command . notthere ; echo after 2
+
+command -p command -V type
+
+set -x
+command -v type
+command command -v type
+command -p command -v type
+command -p -- command -v type
+set +x
+
diff --git a/tests/case.right b/tests/case.right
index d579253..d33c8c5 100644
--- a/tests/case.right
+++ b/tests/case.right
@@ -4,3 +4,60 @@ and here
 retest
 and match
 no more clauses
+1.0
+./case.tests: line 42: xx: readonly variable
+1.1
+matches 1
+no
+no
+no
+no
+no
+ok
+esac
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+mysterious 1
+mysterious 2
+argv[1] = <\a\b\c\^A\d\e\f>
+argv[1] = <\a\b\c\^A\d\e\f>
+argv[1] = 
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+--- testing: soh
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+--- testing: stx
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+--- testing: del
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
+ok1ok2ok3ok4ok5
diff --git a/tests/case.tests b/tests/case.tests
index 7c50165..7ad4c68 100644
--- a/tests/case.tests
+++ b/tests/case.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 case foo in
 bar)	echo skip ;;
 foo)	echo fallthrough ;&
@@ -16,3 +29,45 @@ esac
 case a in
 a)	echo no more clauses;&
 esac
+
+x=0 y=1
+case 1 in
+  $((y=0)) ) ;;
+  $((x=1)) ) ;&
+  $((x=2)) ) echo $x.$y ;;
+esac
+
+unset x
+readonly xx=1
+case 1 in $((xx++)) ) echo hi1 ;; *) echo hi2; esac
+echo ${xx}.$?
+
+unset var empty
+
+var=
+case ']' in
+[$var]*[$var])	echo matches 1;;
+*)		echo no match 1 ;;
+esac
+
+case abc in ( [] ) echo yes ;; ( * ) echo no ;; esac
+empty=''
+case abc in ( ["$empty"] ) echo yes ;; ( * ) echo no ;; esac
+
+case abc in ( [] | [!a-z]* ) echo yes ;; ( * ) echo no ;; esac
+empty=''
+case abc in ( ["$empty"] | [!a-z]* ) echo yes ;; ( * ) echo no ;; esac
+
+case abc in (["$empty"]|[!a-z]*) echo yes ;; (*) echo no ;; esac
+
+case " " in ( [" "] ) echo ok;; ( * ) echo no;; esac
+
+# posix issue discovered after bash-5.1 was released
+case esac in (esac) echo esac;; esac
+case k in else|done|time|esac) for f in 1 2 3 ; do :; done esac
+
+# tests of quote removal and pattern matching
+${THIS_SH} ./case1.sub
+${THIS_SH} ./case2.sub
+${THIS_SH} ./case3.sub
+${THIS_SH} ./case4.sub
diff --git a/tests/case1.sub b/tests/case1.sub
new file mode 100644
index 0000000..8077111
--- /dev/null
+++ b/tests/case1.sub
@@ -0,0 +1,77 @@
+#   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 .
+#
+x='\x'
+
+case x in
+\x)	echo ok 1;;
+*)	echo bad 1;;
+esac
+
+case x in
+$x)	echo ok 2;;
+*)	echo bad 2;;
+esac
+
+case $x in
+\x)	echo bad 3;;
+\\x)	echo ok 3 ;;
+*)	echo bad 3.1 ;;
+esac
+
+case $x in
+\\$x)	echo ok 4 ;;
+x)	echo bad 4;;
+$x)	echo bad 4.1 ;;
+*)	echo bad 4.2;;
+esac
+
+case x in
+\\x)	echo bad 5;;
+\x)	echo ok 5;;
+*)	echo bad 5.1;;
+esac
+
+case x in
+\\x)	echo bad 6;;
+x)	echo ok 6;;
+*)	echo bad 6.1;;
+esac
+
+case x in
+$x)	echo ok 7 ;;
+\\$x)	echo bad 7 ;;
+*)	echo bad 7.1 ;;
+esac
+
+case x in
+\x)	echo ok 8 ;;
+\\x)	echo bad 8 ;;
+*)	echo bad 8.1 ;;
+esac
+
+case \x in
+\x)	echo ok 9 ;;
+\\x)	echo bad 9 ;;
+*)	echo bad 9.1 ;;
+esac
+
+case $x in
+$x)	echo oops 1 ;;
+*)	echo mysterious 1 ;;
+esac
+
+case \x in
+\x)	echo mysterious 2 ;;
+*)	echo oops 2 ;;
+esac
diff --git a/tests/case2.sub b/tests/case2.sub
new file mode 100644
index 0000000..6c3be38
--- /dev/null
+++ b/tests/case2.sub
@@ -0,0 +1,65 @@
+#   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 .
+#
+x=$'\\a\\b\\c\\\001\\d\\e\\f'
+y='\a\b\c\\d\e\f'
+z=$'abc\001def'
+
+recho "$x"
+recho "$y"
+recho "$z"
+
+case $'abc\001def' in
+$x) echo ok 1 ;;
+*) echo oops 1;;
+esac
+
+case $z in
+$x) echo ok 2 ;;
+*) echo oops 2;;
+esac
+
+case $'abc\001def' in
+$y) echo ok 3 ;;
+*) echo oops 3;;
+esac
+
+case $z in
+$y) echo ok 4 ;;
+*) echo oops 4;;
+esac
+
+# no backslash before \001
+x=$'\\a\\b\\c\001\\d\\e\\f'
+y='\a\b\c\d\e\f'
+
+case $'abc\001def' in
+$x) echo ok 5 ;;
+*) echo oops 5;;
+esac
+
+case $z in
+$x) echo ok 6 ;;
+*) echo oops 6;;
+esac
+
+case $'abc\001def' in
+$y) echo ok 7 ;;
+*) echo oops 7;;
+esac
+
+case $z in
+$y) echo ok 8 ;;
+*) echo oops 8;;
+esac
+
diff --git a/tests/case3.sub b/tests/case3.sub
new file mode 100644
index 0000000..1e8d785
--- /dev/null
+++ b/tests/case3.sub
@@ -0,0 +1,52 @@
+#   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 .
+#
+
+testmatch() {
+	case $1 in
+	( $2 ) printf ok1 ;;
+	( * ) printf fail1 ;;
+	esac
+	case $1,$2 in
+	( $2,"$2" ) printf ok2 ;;
+	( * ) printf fail2 ;;
+	esac
+	case $1, in
+	( $2, ) printf ok3 ;;
+	( * ) printf fail3 ;;
+	esac
+	case ,$2 in
+	( ,"$2" ) printf ok4 ;;
+	( * ) printf fail4 ;;
+	esac
+	case "$1,$2" in
+	( $2,"$2" ) printf ok5 ;;
+	( * ) printf fail5 ;;
+	esac
+	echo
+}
+
+for c in $'\1' $'\2' $'\177'; do
+	echo -n "--- testing: "
+	echo "$c" | od -t a | awk 'NR==1 { print $2 } '
+	testmatch "${c}" "\\${c}"
+	testmatch "${c}x" "\\${c}\\x"  # bash-git fails case 2 and 5 for $'\1'
+	testmatch "${c}x" "${c}\\x"
+	testmatch "${c}x" "${c}x"
+	testmatch "${c}x" "\\${c}x"
+	testmatch "x${c}" "\\x\\${c}"
+	testmatch "x${c}" "x\\${c}"
+done
+
+match() { case $1 in ( $2 ) ;; ( * ) return 1 ;; esac; } 
+match $'? *x\1y\177z' $'??\\*\\x\\\1\\y\\\177\\z' || echo bad 6
diff --git a/tests/case4.sub b/tests/case4.sub
new file mode 100644
index 0000000..ababeb9
--- /dev/null
+++ b/tests/case4.sub
@@ -0,0 +1,38 @@
+#   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 .
+#
+shopt -s -o posix
+two="t w  o"
+ten="t   e
+n"
+set 1 "$two" 3 4 5 6 7 8 9 "$ten"
+
+unset IFS
+expvar="$*"
+case $* in
+"$expvar") ;;
+*) echo "failed 1" ;;
+esac
+
+case $* in
+$expvar) ;;
+*) echo "failed 2" ;;
+esac
+
+alias foo='oneword'
+foo_word='foo'
+case "$foo_word"
+in
+        foo) ;;
+	*) echo failed 3;;
+esac
diff --git a/tests/casemod.right b/tests/casemod.right
index 958b28d..df12475 100644
--- a/tests/casemod.right
+++ b/tests/casemod.right
@@ -13,10 +13,10 @@ aCKNOWLEDGEMENT oENOPHILE
 aCKNoWLeDGeMeNT oeNoPHiLe
 aCKNOWLEDGEMENT oENOPHILE
 acknowledgement oenophile
-Acknowledgement Oenophile
-ACKNOWLEDGEMENT OENOPHILE
-Acknowledgement Oenophile
-AcknOwlEdgEmEnt OEnOphIlE
+Oenophile Acknowledgement
+OENOPHILE ACKNOWLEDGEMENT
+Oenophile Acknowledgement
+OEnOphIlE AcknOwlEdgEmEnt
 oENOPHILE aCKNOWLEDGEMENT
 oenophile acknowledgement
 oENOPHILE aCKNOWLEDGEMENT
@@ -43,3 +43,5 @@ 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
+abcdexyz
+ABCDEXYZ
diff --git a/tests/casemod.tests b/tests/casemod.tests
index 3c7ad23..56ab20d 100644
--- a/tests/casemod.tests
+++ b/tests/casemod.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 S1=acknowledgement
 S2=oenophile
 
@@ -97,3 +110,17 @@ echo ${TEXT^^}
 
 echo ${TEXT2^}
 echo ${TEXT2^^}
+
+M1=${S1^^[aeiou]}
+M2=${U2,,[AEIOU]}
+
+#echo ${M1} ${M1~}
+#echo ${M2} ${M2~~}
+
+declare -l lower=aBcDe
+lower+=XyZ
+echo $lower
+
+declare -u upper=aBcDe
+upper+=xYZ
+echo $upper
diff --git a/tests/complete.right b/tests/complete.right
new file mode 100644
index 0000000..c8bf1dc
--- /dev/null
+++ b/tests/complete.right
@@ -0,0 +1,63 @@
+complete -f -X '!*.+(ps|PS)' gs
+complete -e printenv
+complete -f -X '!*.texi*' texi2html
+complete -g groupmod
+complete -v -S '=' typeset
+complete -c nohup
+complete -a unalias
+complete -g groupdel
+complete -A hostname telnet
+complete -v -S '=' local
+complete -v -S '=' readonly
+complete -o bashdefault -o filenames -o nospace -F _comp_cd cd
+complete -c type
+complete -f ln
+complete -f -X '!*.+(gz|tgz)' gunzip
+complete -f -X '!*.texi*' makeinfo
+complete -j -P '%' jobs
+complete -o dirnames -o filenames -o nospace -d pushd
+complete -f -X '!*.pdf' acroread
+complete -v unset
+complete -f -X '!*.+(ps|PS)' ghostview
+complete -A hostname rsh
+complete -c exec
+complete -A signal kill
+complete -c eval
+complete -f chown
+complete -f gzip
+complete -W '"${GROUPS[@]}"' newgrp
+complete -A shopt shopt
+complete -A hostname ftp
+complete -A hostname rlogin
+complete -v getopts
+complete -c nice
+complete -c gdb
+complete -j -P '%' fg
+complete -f -X '!*.dvi' dvips
+complete -f -X '!*.texi*' texi2dvi
+complete -f .
+complete -v -S '=' declare
+complete -v -S '=' export
+complete -f -X '!*.dvi' xdvi
+complete -u su
+complete -o dirnames -o filenames -o nospace -d popd
+complete -A signal trap
+complete -j -W '$(ps -x | tail +2 | cut -c1-5)' -P '%' wait
+complete -f -X '!*.Z' zmore
+complete -j -P '%' disown
+complete -f -X '!*.+(ps|PS)' gs
+complete -f -X '!*.+(ps|PS)' gv
+complete -f source
+complete -c make
+complete -A stopped -P '%' bg
+complete -f cat
+complete -d mkdir
+complete -A helptopic help
+complete -v read
+complete -c -k time
+complete -f -X '!*.Z' zcat
+complete -f -X '!*.Z' uncompress
+complete -d rmdir
+complete -f more
+complete -f -X '!*.+(gz|tgz)' gzcat
+./complete.tests: line 123: complete: notthere: no completion specification
diff --git a/tests/complete.tests b/tests/complete.tests
new file mode 100644
index 0000000..36a3983
--- /dev/null
+++ b/tests/complete.tests
@@ -0,0 +1,126 @@
+#  Chet Ramey 
+#
+#  Copyright 2002-2020 Chester Ramey
+#
+#   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.
+#
+#   TThis 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.
+
+complete
+
+# from zsh, just for testing
+complete -A stopped -P '%' bg
+complete -j -P '%' fg jobs disown
+# this is wrong at this point
+complete -j -P '%' -W '$(ps -x | tail +2 | cut -c1-5)' wait
+complete -c type
+complete -a unalias
+complete -v getopts read unset
+complete -v -S '=' declare export local readonly typeset
+complete -f -- . source
+complete -A shopt shopt
+complete -e printenv
+
+complete -A helptopic help
+
+complete -c nohup exec nice eval
+complete -c -k time
+
+complete -A signal trap kill
+
+complete -f chown ln more cat
+complete -d mkdir rmdir
+
+complete -f -X '!*.+(gz|tgz)' gunzip gzcat zcat zmore
+complete -f -X '!*.Z' uncompress zmore zcat
+complete -f gzip
+
+complete -o dirnames -o filenames -o nospace -d pushd popd
+
+_comp_cd()
+{
+	local IFS=$' \t\n'	# normalize IFS
+	local cur _skipdot _cdpath
+	local i j k
+
+	# Tilde expansion, with side effect of expanding tilde to full pathname
+	case "$2" in
+	\~*)	eval cur="$2" ;;
+	*)	cur=$2 ;;
+	esac
+
+	# no cdpath or absolute pathname -- straight directory completion
+	if [[ -z "${CDPATH:-}" ]] || [[ "$cur" == @(./*|../*|/*) ]]; then
+		# compgen prints paths one per line; could also use while loop
+		IFS=$'\n'
+		COMPREPLY=( $(compgen -d -- "$cur") )
+		IFS=$' \t\n'
+	# CDPATH+directories in the current directory if not in CDPATH
+	else
+		IFS=$'\n'
+		_skipdot=false
+		# preprocess CDPATH to convert null directory names to .
+		_cdpath=${CDPATH/#:/.:}
+		_cdpath=${_cdpath//::/:.:}
+		_cdpath=${_cdpath/%:/:.}
+		for i in ${_cdpath//:/$'\n'}; do
+			if [[ $i -ef . ]]; then _skipdot=true; fi
+			k="${#COMPREPLY[@]}"
+			for j in $( compgen -d -- "$i/$cur" ); do
+				COMPREPLY[k++]=${j#$i/}		# cut off directory
+			done
+		done
+		$_skipdot || COMPREPLY+=( $(compgen -d -- "$cur") )
+		IFS=$' \t\n'
+	fi
+
+	# variable names if appropriate shell option set and no completions
+	if shopt -q cdable_vars && [[ ${#COMPREPLY[@]} -eq 0 ]]; then
+		COMPREPLY=( $(compgen -v -- "$cur") )
+	fi
+
+	# append slash to passed directory name that is the only completion.
+	# readline will not do this if we complete from CDPATH
+	if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
+		i=${COMPREPLY[0]}	# shorthand
+		if [[ "$cur" == "$i" ]] && [[ "$i" != "*/" ]]; then
+			COMPREPLY[0]+=/
+		fi
+	fi
+	return 0
+}
+
+complete -o filenames -o nospace -o bashdefault -F _comp_cd cd
+
+complete -A hostname rsh telnet rlogin ftp
+
+complete -u su
+complete -W '"${GROUPS[@]}"' newgrp
+complete -g groupdel groupmod
+
+complete -f -X '!*.+(ps|PS)' gs gv ghostview
+complete -f -X '!*.dvi' dvips xdvi
+complete -f -X '!*.pdf' acroread
+
+complete -f -X '!*.texi*' makeinfo texi2dvi texi2html
+
+complete -c gdb make
+
+complete -p gs
+complete -p
+
+complete -r xdvi
+complete -r notthere
+
+complete -r
+complete
diff --git a/tests/comsub-eof.right b/tests/comsub-eof.right
index 452a9c5..cd5ab69 100644
--- a/tests/comsub-eof.right
+++ b/tests/comsub-eof.right
@@ -1,13 +1,17 @@
-./comsub-eof0.sub: line 1: unexpected EOF while looking for matching `)'
-./comsub-eof0.sub: line 5: syntax error: unexpected end of file
+./comsub-eof0.sub: line 5: warning: here-document at line 3 delimited by end-of-file (wanted `EOF')
+hi
 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')
+./comsub-eof3.sub: line 4: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
+./comsub-eof3.sub: line 5: unexpected EOF while looking for matching `)'
+./comsub-eof4.sub: line 3: warning: here-document at line 1 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 `)')
+./comsub-eof5.sub: line 4: warning: here-document at line 2 delimited by end-of-file (wanted `)')
+hi
+./comsub-eof5.sub: line 9: warning: here-document at line 7 delimited by end-of-file (wanted `EOF')
 hi
-./comsub-eof5.sub: line 13: warning: here-document at line 11 delimited by end-of-file (wanted `EOF')
+./comsub-eof5.sub: line 15: warning: here-document at line 13 delimited by end-of-file (wanted `)')
 hi
+./comsub-eof6.sub: command substitution: line 3: unexpected EOF while looking for matching `)'
+
diff --git a/tests/comsub-eof.tests b/tests/comsub-eof.tests
index f96aeee..398746a 100644
--- a/tests/comsub-eof.tests
+++ b/tests/comsub-eof.tests
@@ -9,3 +9,5 @@ ${THIS_SH} ./comsub-eof3.sub
 ${THIS_SH} ./comsub-eof4.sub
 
 ${THIS_SH} ./comsub-eof5.sub
+
+${THIS_SH} ./comsub-eof6.sub
diff --git a/tests/comsub-eof0.sub b/tests/comsub-eof0.sub
index 7b0775f..7490faa 100644
--- a/tests/comsub-eof0.sub
+++ b/tests/comsub-eof0.sub
@@ -1,3 +1,5 @@
+# it's only the space before the paren that makes this an error
+# when I fix it, it will show up here
 foo=$(cat <> 24 |
+                        ($arg & 16711680) >> 8 |
+                        ($arg & 65280) << 8 |
+                        ($arg & 255) << 24
+                ));
+    done
+}
+bash: -c: line 1: syntax error near unexpected token `done'
+bash: -c: line 1: `: $(case x in x) ;; x) done esac)'
+bash: -c: line 1: syntax error near unexpected token `done'
+bash: -c: line 1: `: $(case x in x) ;; x) done ;; esac)'
+bash: -c: line 1: syntax error near unexpected token `esac'
+bash: -c: line 1: `: $(case x in x) (esac) esac)'
+bash: -c: line 1: syntax error near unexpected token `in'
+bash: -c: line 1: `: $(case x in esac|in) foo;; esac)'
+bash: -c: line 1: syntax error near unexpected token `done'
+bash: -c: line 1: `: $(case x in x) ;; x) done)'
+case: -c: line 3: syntax error near unexpected token `esac'
+case: -c: line 3: `$( esac ; bar=foo ; echo "$bar")) echo bad 2;;'
+ok 2
+inside outside
+ok 3
+syntax-error: -c: line 2: syntax error near unexpected token `done'
+syntax-error: -c: line 2: `: $(case x in x) ;; x) done ;; esac)'
+yes
+
+
+
+ab cde
diff --git a/tests/comsub-posix.tests b/tests/comsub-posix.tests
index d45cbf2..ab7cd29 100644
--- a/tests/comsub-posix.tests
+++ b/tests/comsub-posix.tests
@@ -1,3 +1,17 @@
+#   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 .
+#
+: ${HOME:=/}
 
 # works right
 echo ab$(echo mnop)yz
@@ -13,6 +27,12 @@ echo $(
 )
 echo $()
 echo ab$()cd
+echo ab$(  )cd
+echo mn$(
+)op
+echo qr$(
+
+    )st
 
 echo $(case a in (a) echo sh_352.26ax; esac )
 echo $(case a in (a) echo sh_352.26ay; esac)
@@ -27,6 +47,9 @@ echo $(
 echo abc # a comment with )
 )
 
+echo $(#a comment with )
+echo def)
+
 echo $(
 cat <.
+#
+# problem with bash-4.x versions before bash-4.2.  required posix interp
+swap32_posix()
+{
+        local funcname=swap32_posix
+        local arg
+        for arg in "$@"; do
+                echo $((
+                        ($arg & 4278190080) >> 24 |
+                        ($arg & 16711680) >> 8 |
+                        ($arg & 65280) << 8 |
+                        ($arg & 255) << 24
+                ))
+        done
+}
+
+type swap32_posix
diff --git a/tests/comsub-posix3.sub b/tests/comsub-posix3.sub
new file mode 100644
index 0000000..39262b2
--- /dev/null
+++ b/tests/comsub-posix3.sub
@@ -0,0 +1,35 @@
+#   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 .
+#
+# parsing errors before bash-4.2
+
+a=$(/bin/cat << EOF | wc -l
+a
+b
+c
+EOF
+)
+
+a=$(cat << EOF | wc -l
+a
+b
+c
+EOF
+)
+
+a=$(/bin/cat << EOF
+a
+b
+c
+EOF
+)
diff --git a/tests/comsub-posix5.sub b/tests/comsub-posix5.sub
new file mode 100644
index 0000000..f10e773
--- /dev/null
+++ b/tests/comsub-posix5.sub
@@ -0,0 +1,70 @@
+#   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 .
+#
+: ${THIS_SH:=./bash}
+
+# problems with recognzing `esac' after a right paren in a command substitution
+
+: $(case x in x) esac)
+: $(case x in x) ;; x) esac)
+# non-reserved word beginning with e
+: $(case x in x) ;; x) echo ;; esac)
+# reserved word beginning with e
+: $(case x in x) ;; x) eval esac ;; esac)
+
+: $(case x in x ) esac)
+: $(case x in x ) ;; x) esac)
+
+: $(case x in (x) esac)
+: $(case x in (x) ;; (x) esac)
+: $(case x in (x) ;; x) esac)
+: $(case x in (x) (echo a) esac)
+
+: $(case x in (x) (echo esac) esac)
+: $(case x in x) (echo esac) esac)
+
+# these errors should be caught sooner
+${THIS_SH} -c ': $(case x in x) ;; x) done esac)' bash
+${THIS_SH} -c ': $(case x in x) ;; x) done ;; esac)' bash
+${THIS_SH} -c ': $(case x in x) (esac) esac)' bash
+
+# these are not errors
+: $(case x in x) ;; x) eval done ;; esac)
+
+# these are just ridiculous
+: $(case x in (x) a() { echo a; } esac)
+: $(case x in (x) if :; then echo a; fi esac)
+: $(case x in (x) { echo a; } esac)
+: $(case x in (x) while false; do echo a; done esac)
+: $(case x in (x) case y in (y) echo a;; esac esac)
+: $(case x in (x) case y in (y) echo a;; esac ;; (y) foo ;;  esac)
+
+: $(case x in x) a() { echo a; } esac)
+: $(case x in x) if :; then echo a; fi esac)
+: $(case x in x) { echo a; } esac)
+: $(case x in x) while false; do echo a; done esac)
+: $(case x in x) case y in (y) echo a;; esac esac)
+: $(case x in x) case y in (y) echo a;; esac ;; y) foo ;;  esac)
+: $(case x in x) case y in y) echo a;; esac ;; y) foo ;;  esac)
+
+: $(case ni in esac)
+: $(case in in esac)
+
+: $(case x in in|esac) foo;; esac)
+: $(case esac in (esac) echo esac;; esac)
+: $(case k in else|done|time|esac) for f in 1 2 3 ; do :; done esac)
+
+# this is an error
+${THIS_SH} -c ': $(case x in esac|in) foo;; esac)' bash
+
+${THIS_SH} -c ': $(case x in x) ;; x) done)' bash
diff --git a/tests/comsub-posix6.sub b/tests/comsub-posix6.sub
new file mode 100644
index 0000000..212ad20
--- /dev/null
+++ b/tests/comsub-posix6.sub
@@ -0,0 +1,43 @@
+: ${THIS_SH:=./bash}
+
+# comsub should not inherit PST_COMPASSIGN
+
+C=($(echo "${A[@]}" | \
+            (while read -d ' ' i; do
+                C=(${C/ ${i%% *} / })
+            done
+            echo ${C[@]})))
+
+# comsub should not inherit PST_CASEPAT
+
+${THIS_SH} -c '
+case foo in
+$( esac ; bar=foo ; echo "$bar")) echo bad 2;;
+*)	echo ok 2;;
+esac
+
+echo we should not see this' case
+
+# comsub should not inherit PST_SUBSHELL
+
+${THIS_SH} -c '( case foo in
+  ( $(echo foo | cat )) echo ok 2;;
+  *) echo bad 2;;
+  esac
+
+  echo $( echo inside ) outside )' subshell
+
+# comsub should not inherit PST_REDIRLIST
+
+${THIS_SH} -c '
+{fd}
 argv[2] = 
 argv[1] = 
@@ -19,6 +19,7 @@ argv[1] =  argv[2] = <-e> argv[3] = 
 argv[1] = 
 argv[1] = 
 argv[1] = 
+nested
 #esac
 a
 ok 1
@@ -27,3 +28,52 @@ ok 3
 ok 4
 ok 5
 ok 6
+xyz
+ok 7
+\/tmp\/foo\/bar
+/tmp/foo/bar
+/tmp/foo/bar
+/tmp/foo/bar
+1
+2
+3
+4
+5
+6
+5
+6
+a
+b
+c
+a
+b
+c
+1
+2
+d \
+g
+d \
+g
+d \
+g
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 9
+ok 8
+ok 8 
+Mon Aug 29 20:03:02 EDT 2022
+post foo
+Mon Aug 29 20:03:02 EDT 2022
+post foo1
+Mon Aug 29 20:03:02 EDT 2022
+Mon Aug 29 20:03:02 EDT 2022 after
+7
+Mon Aug 29 20:03:02 EDT 2022
+hey after x
+./comsub6.sub: line 40: syntax error near unexpected token `)'
+./comsub6.sub: line 40: `math1)'
diff --git a/tests/comsub.tests b/tests/comsub.tests
index 493bbda..698ce30 100644
--- a/tests/comsub.tests
+++ b/tests/comsub.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # command substution parsing tests
 
 TABSIZE=`grep -v '^[ #]' $CAPS /dev/null
+
+# parsing problem based on recursively calling bison parser through bash-4.4
+for (( INDEX=0; INDEX<$((10-$(echo length $V_NAME))); INDEX++ ))
+do
+	:
+done
+
+# problem with four-character words followed by a metachar through bash-4.4
+comsub_foo_1()
+{
+  echo $(while true; do case $HOME in /*) echo abs ;; esac; done)
+}
+
+echo $(
+echo $(
+echo $(echo $( echo nested )
+)
+)
+)
+
 ${THIS_SH} ./comsub1.sub
+${THIS_SH} ./comsub2.sub
+${THIS_SH} ./comsub3.sub
+${THIS_SH} ./comsub4.sub
+${THIS_SH} ./comsub5.sub
+${THIS_SH} ./comsub6.sub
diff --git a/tests/comsub1.sub b/tests/comsub1.sub
index 86565e2..ca72243 100644
--- a/tests/comsub1.sub
+++ b/tests/comsub1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 : $(echo \;)
 
 : $(case a in a) echo ;;# comment
@@ -46,3 +59,15 @@ esac)
 echo $(case a in (a) echo ok 6 # comment
 ;;
 esac)
+
+echo $( # we just took and pasted in some
+# code from another script inside a
+# command substitution
+echo xyz
+)
+
+# problem with parse_comsub through bash-4.4
+case $(echo $$'x\nx') in
+x*)	echo bad 7;;
+*)	echo ok 7;;
+esac
diff --git a/tests/comsub2.sub b/tests/comsub2.sub
new file mode 100644
index 0000000..d60ae6a
--- /dev/null
+++ b/tests/comsub2.sub
@@ -0,0 +1,8 @@
+qpath='\/tmp\/foo\/bar'
+
+echo "$qpath"
+
+# it's crazy that all three of these produce the same result
+printf "%s\n" ${qpath//\\/}
+printf "%s\n" ${qpath//"`printf '%s' \\`"/}
+printf "%s\n" ${qpath//`printf '%s' "\\\\\\\\"`/}
diff --git a/tests/comsub3.sub b/tests/comsub3.sub
new file mode 100644
index 0000000..757fbca
--- /dev/null
+++ b/tests/comsub3.sub
@@ -0,0 +1,44 @@
+#   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 .
+#
+x=$(
+  case 1 in
+    1) echo 1
+  esac
+  case 2 in
+    2) echo 2
+  esac
+)
+echo "$x" 
+
+x=$(case 1 in 1) echo 3;; esac; case 2 in 2) echo 4;; esac;)
+echo "$x" 
+
+x=$(case 1 in 1) echo 5;; esac; case 2 in 2) echo 6;; esac)
+echo "$x" 
+
+x=$(case 1 in 1) echo 5;; esac; case 2 in 2) echo 6;; esac; for f in a b c; do echo "$f" ; done)
+echo "$x" 
+
+x=$(
+  for f in a b c; do
+	echo $f
+  done
+  case 1 in
+    1) echo 1
+  esac
+  case 2 in
+    2) echo 2
+  esac
+)
+echo "$x"
diff --git a/tests/comsub4.sub b/tests/comsub4.sub
new file mode 100644
index 0000000..e7a1c55
--- /dev/null
+++ b/tests/comsub4.sub
@@ -0,0 +1,40 @@
+#   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 .
+#
+x=$(cat <<'EOT'
+d \
+g
+EOT
+)
+
+echo "$x"
+unset x
+
+x=$( cat <<\EOT\
+4
+d \
+g
+EOT4
+)
+
+echo "$x"
+unset x
+
+x=$( cat <<\EOT
+d \
+g
+EOT
+)
+
+echo "$x"
+
diff --git a/tests/comsub5.sub b/tests/comsub5.sub
new file mode 100644
index 0000000..cc83374
--- /dev/null
+++ b/tests/comsub5.sub
@@ -0,0 +1,51 @@
+#   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 .
+#
+
+# this is a new feature: expanding aliases when initially parsing command
+# substitutions. required by posix, so enabled in posix mode. default mode
+# stays backwards compatible.
+
+shopt -s expand_aliases
+set -o posix
+
+alias switch=case
+
+switch foo in foo) echo ok 1;; esac
+
+echo $( switch foo in foo) echo ok 2;; esac )
+echo "$( switch foo in foo) echo ok 3;; esac )"
+
+echo $( switch foo in (foo) echo ok 4;; esac )
+echo "$( switch foo in (foo) echo ok 5;; esac )"
+
+alias nest='('
+
+echo $( nest echo ok 6 ) )
+echo "$( nest echo ok 7 ) )"
+
+alias short='echo ok 8 )'
+
+alias DO='{ '
+alias DONE='}'
+got=$(DO
+echo ok 9; DONE)
+echo "$got" 
+
+echo $( short
+echo "$( short "
+
+# remember that short" won't work because you start a new quoting context
+# inside $( and the token (`short') won't be delimited by the ending double
+# quote, so there's no opportunity to perform the alias expansion that would
+# terminate the command substitution
diff --git a/tests/comsub6.sub b/tests/comsub6.sub
new file mode 100644
index 0000000..d2b02bf
--- /dev/null
+++ b/tests/comsub6.sub
@@ -0,0 +1,40 @@
+#   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 .
+#
+DATE='Mon Aug 29 20:03:02 EDT 2022'
+shopt -s expand_aliases
+
+alias foo='echo $(echo $DATE)'
+alias foo1='echo $(echo $DATE)    '
+
+foo
+echo post foo
+
+foo1
+echo post foo1
+
+alias comsub0='echo $(echo $DATE'
+comsub0)
+comsub0		) after
+
+alias math0='echo $(( 4+3 )'
+math0)
+
+alias x='VAR=$(echo hey)'
+x
+foo
+
+echo $VAR after x
+
+alias math1='echo $( date )'
+math1)
diff --git a/tests/cond-regexp.sub b/tests/cond-regexp.sub
deleted file mode 100644
index 724957d..0000000
--- a/tests/cond-regexp.sub
+++ /dev/null
@@ -1,42 +0,0 @@
-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-regexp1.sub b/tests/cond-regexp1.sub
new file mode 100644
index 0000000..1ba9197
--- /dev/null
+++ b/tests/cond-regexp1.sub
@@ -0,0 +1,69 @@
+#   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 .
+#
+VAR='[[:alpha:]]'
+
+[[ $VAR =~ '[[:alpha:]]' ]] && echo match 1
+
+[[ a =~ '[[:alpha:]]' ]] || echo match 2
+
+[[ a =~ [[:alpha:]] ]] && echo match 3
+
+[[ a =~ $VAR ]] && echo match 4
+
+[[ a =~ "$VAR" ]] || echo match 5
+
+line=aab
+[[ $line =~ [[:space:]]*(a)?b ]] && echo match 6
+
+V="alphabet"
+[[ $V == alphabet ]] && echo yes 1
+[[ $V == "alphabet" ]] && echo yes 2
+[[ $V == 'alphabet' ]] && echo yes 3
+[[ $V =~ alphabet ]] && echo yes 4
+[[ $V =~ "alphabet" ]] && echo yes 5
+[[ $V =~ 'alphabet' ]] && echo yes 6
+
+DOG="Dog name - 01 - Wiggles"
+REPAT='([[:alpha:][:blank:]]*)- ([[:digit:]]*) - (.*)$'
+if [[ $DOG =~ ([[:alpha:][:blank:]]*)-\ ([[:digit:]]*)\ -\ (.*)$ ]]
+then
+   echo Dog ${BASH_REMATCH[2]} is ${BASH_REMATCH[3]}
+fi
+if [[ $DOG =~ $REPAT ]]
+then
+   echo Dog ${BASH_REMATCH[2]} is ${BASH_REMATCH[3]}
+fi
+
+[[ $REPAT =~ "$REPAT" ]] && echo rematch 1
+
+v="one two buckle my shoe"
+[[ ${v} =~ "one two" ]] && echo matches 7
+
+[[ ${v} =~ (one two) ]] && echo matches 8
+
+[[ ${v} =~ one\ two ]] && echo matches 9
+
+unset pattern string
+pattern="xxx.yyy"
+string=xxxAyyy
+
+[[ $string =~ $pattern ]] && echo unquoted matches
+[[ $string =~ "$pattern" ]] && echo quoted matches
+
+# problems in pre-patched bash-4.2
+[[ "helloworld" =~ llo ]] && echo match control-a 1
+[[ "helloworld" =~ world ]] && echo match control-a 2
+[[ "helloworld" =~ world$ ]] && echo match control-a 3
+[[ "helloworld" =~  ]] && echo match control-a 4
+[[ "helloworld" =~ oworld$ ]] && echo match control-a 5
diff --git a/tests/cond-regexp2.sub b/tests/cond-regexp2.sub
new file mode 100644
index 0000000..4da0a88
--- /dev/null
+++ b/tests/cond-regexp2.sub
@@ -0,0 +1,45 @@
+#   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 .
+#
+[[ "\\" =~ ["."] ]] && echo bad 1
+
+[[ "\\" =~ "[.]" ]] && echo bad 2
+
+[[ "\\" =~ [\. ]] && echo bad 3
+
+[[ "\\" =~ [\.] ]] && echo bad 4
+
+[[ "\\" =~ [\\] ]] || echo bad 5
+
+[[ dog =~ [[=d=]].. ]] && echo ok 1
+[[ d.. =~ [[=d=]]\.\. ]] && echo ok 2
+[[ dog =~ ['[=d=]'].. ]] && echo ok 3	# dubious
+
+[[ dog =~ [[=d=]].[[=G=][=g=]] ]] && echo ok 4
+[[ dog =~ [[=d=]].[\[=G=][=g=]] ]] && echo ok 4a
+
+[[ dog =~ "d.." ]] || echo ok 5
+
+[[ dog =~ [[.d.][.D.]]o. ]] && echo ok 6
+
+[[ dog =~ ([[.d.][.D.]])o(.) ]] && echo ok 7 -- ${BASH_REMATCH[1]}
+[[ dog =~ d([[.o.][.O.]])(.) ]] && echo ok 8 -- ${BASH_REMATCH[1]}
+[[ dog =~ .([[.o.][.O.]])(.) ]] && echo ok 9
+
+[[ dog =~ 'd''o''g' ]] && echo ok 10
+
+[[ ']' =~ [']'] ]] && echo ok 11
+
+[[ a =~ ['a]'] ]] || echo ok 12
+
+[[ "\\" =~ [^]"."] ]] || echo unexpected
diff --git a/tests/cond-regexp3.sub b/tests/cond-regexp3.sub
new file mode 100644
index 0000000..d939548
--- /dev/null
+++ b/tests/cond-regexp3.sub
@@ -0,0 +1,86 @@
+#   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 .
+#
+# simple expansion -- no problem, it's quote_string_for_globbing that was flawed
+c=$'\177'
+r="\\$c"
+
+recho $r
+
+# first, match some regular expressions containing ^A, ^G, ^?
+[[ $'\001' =~ $'\001' ]] ; echo $?
+[[ $'\001' =~ $'\\\001' ]] ; echo $?
+[[ $'\001' =~ $'\\[\001]' ]] ; echo $?
+
+[[ $'\a' =~ $'\a' ]] ; echo $?
+[[ $'\a' =~ $'\\\a' ]]  ; echo $?
+[[ $'\a' =~ $'\\[\a]' ]] ; echo $?
+
+[[ $'\177' =~ $'\177' ]] ; echo $?
+[[ $'\177' =~ $'\\\177' ]] ; echo $?
+[[ $'\177' =~ $'\\[\177]' ]] ; echo $?
+
+# Now let's try it with variables expanding to those values
+for c in $'\001' $'\a' $'\177' ; do
+	for r in "$c" "\\$c" "\\[$c]"; do
+		[[ $c =~ $r ]];
+		printf '[[ %q =~ %q ]] -> %d\n' "$c" "$r" "$?";
+	done;
+	printf %s\\n ---
+done
+
+# try again with literals
+
+[[ '' =~ $'' ]] ; echo $?
+[[ '' =~ '\' ]] ; echo $?
+[[ '' =~ '\[]' ]] ; echo $?
+
+[[ '' =~ '' ]] ; echo $?
+[[ '' =~ '\' ]]  ; echo $?
+[[ '' =~ '\[]' ]] ; echo $?
+
+[[ '' =~ $'' ]] ; echo $?
+[[ '' =~ '\' ]] ; echo $?
+[[ '' =~ '\[]' ]] ; echo $?
+
+# more expansions, but with literal non-special characters
+[[ x =~ \x ]] ; echo $?
+[[ x =~ \\x ]] ; echo $?
+
+bs='\'
+[[ x =~ ${bs}x ]] ; echo $?
+
+[[ x =~ $'\\'x ]] ; echo $?
+[[ x =~ '\'x ]] ; echo $?
+
+v='a\-b'
+[[ a-b =~ ${v} ]] ; echo $?
+[[ a-b =~ a\-b ]]; echo $?
+[[ a-b =~ a${bs}-b ]]; echo $?
+[[ a-b =~ a\\-b ]] ; echo $?
+[[ a-b =~ "a\-b" ]] ; echo $?
+
+c=$'\001'
+
+recho $c "$c"
+
+[[ $c == $c ]] && echo ok 1
+[[ $c =~ $c ]] && echo ok 2
+[[ $c =~ \\$c ]] || echo ok 3
+[[ $c =~ \\"$c" ]] || echo ok 4
+
+[[ $c =~ "\\"$c ]] || echo ok 5
+[[ $c =~ '\'$c ]] || echo ok 6
+
+[[ $c =~ "\\""$c" ]] || echo ok 7
+[[ $c =~ '\'"$c" ]] || echo ok 8
diff --git a/tests/cond.right b/tests/cond.right
index 3775230..a72a153 100644
--- a/tests/cond.right
+++ b/tests/cond.right
@@ -2,6 +2,10 @@ returns: 0
 returns: 0
 returns: 1
 returns: 0
+1
+0
+1
+0
 returns: 0
 returns: 0
 returns: 0
@@ -23,10 +27,12 @@ returns: 0
 returns: 1
 returns: 1
 returns: 0
-./cond.tests: line 101: [[: 4+: syntax error: operand expected (error token is "+")
+./cond.tests: line 122: [[: 4+: syntax error: operand expected (error token is "+")
 returns: 1
 returns: 0
 returns: 0
+returns: 0
+returns: 0
 returns: 1
 returns: 0
 returns: 0
@@ -41,6 +47,11 @@ found 2
 libc
 ok 42
 ok 43
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
 match 1
 match 2
 match 3
@@ -59,3 +70,73 @@ rematch 1
 matches 7
 matches 8
 matches 9
+unquoted matches
+match control-a 1
+match control-a 2
+match control-a 3
+match control-a 4
+match control-a 5
+ok 1
+ok 2
+ok 3
+ok 4
+ok 4a
+ok 5
+ok 6
+ok 7 -- d
+ok 8 -- o
+ok 9
+ok 10
+ok 11
+ok 12
+argv[1] = <\^?>
+0
+1
+1
+0
+1
+1
+0
+1
+1
+[[ $'\001' =~ $'\001' ]] -> 0
+[[ $'\001' =~ $'\\\001' ]] -> 0
+[[ $'\001' =~ $'\\[\001]' ]] -> 1
+---
+[[ $'\a' =~ $'\a' ]] -> 0
+[[ $'\a' =~ $'\\\a' ]] -> 0
+[[ $'\a' =~ $'\\[\a]' ]] -> 1
+---
+[[ $'\177' =~ $'\177' ]] -> 0
+[[ $'\177' =~ $'\\\177' ]] -> 0
+[[ $'\177' =~ $'\\[\177]' ]] -> 1
+---
+0
+1
+1
+0
+1
+1
+0
+1
+1
+0
+1
+0
+1
+1
+0
+0
+0
+1
+1
+argv[1] = <^A>
+argv[2] = <^A>
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
diff --git a/tests/cond.tests b/tests/cond.tests
old mode 100755
new mode 100644
index b053e48..c0747e9
--- a/tests/cond.tests
+++ b/tests/cond.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 #
 # the test/[ code is tested elsewhere, and the [[...]] just uses the same
 # code.  this tests the special features of [[...]]
@@ -20,6 +33,14 @@ echo returns: $?
 [[ ! x || x ]]
 echo returns: $?
 
+# ! toggles on and off rather than just setting an `invert result' flag
+# this differs from ksh93
+[[ ! 1 -eq 1 ]]; echo $?
+[[ ! ! 1 -eq 1 ]]; echo $?
+
+[[ ! ! ! 1 -eq 1 ]]; echo $?
+[[ ! ! ! ! 1 -eq 1 ]]; echo $?
+
 # parenthesized terms didn't work right until post-2.04
 [[ a ]]
 echo returns: $?
@@ -109,6 +130,13 @@ A=7
 [[ $IVAR -eq A ]]
 echo returns: $?
 
+[[ "$IVAR" -eq "7" ]]
+echo returns: $?
+
+A=7
+[[ "$IVAR" -eq "A" ]]
+echo returns: $?
+
 unset IVAR A
 
 # more pattern matching tests
@@ -180,4 +208,25 @@ echo ${BASH_REMATCH[@]}
 if [[ "123abc" == *?(a)bc ]]; then echo ok 42; else echo bad 42; fi
 if [[ "123abc" == *?(a)bc ]]; then echo ok 43; else echo bad 43; fi
 
-${THIS_SH} ./cond-regexp.sub
+match() { [[ $1 == $2 ]]; }
+match $'? *x\1y\177z' $'??\\*\\x\\\1\\y\\\177\\z' || echo bad 44
+
+foo=""
+[[ bar == *"${foo,,}"* ]] && echo ok 1
+[[ bar == *${foo,,}* ]] && echo ok 2
+
+shopt -s extquote
+bs='\'
+del=$'\177'
+[[ bar == *$bs"$del"* ]] || echo ok 3
+[[ "" == "$foo" ]] && echo ok 4
+[[ "$del" == "${foo,,}" ]] || echo ok 5
+
+# allow reserved words after a conditional command just because
+if [[ str ]] then [[ str ]] fi
+
+${THIS_SH} ./cond-regexp1.sub
+
+${THIS_SH} ./cond-regexp2.sub
+
+${THIS_SH} ./cond-regexp3.sub
diff --git a/tests/coproc.right b/tests/coproc.right
index 6d9deaa..94b001c 100644
--- a/tests/coproc.right
+++ b/tests/coproc.right
@@ -1,11 +1,8 @@
-84575
 63 60
 a b c
-84577
 63 60
 flop
-./coproc.tests: line 22: 84577 Terminated              coproc REFLECT { cat -; }
-84579
+coproc.tests: REFLECT: status 143
 63 60
 FOO
 63 60
diff --git a/tests/coproc.tests b/tests/coproc.tests
index 8be3563..a735932 100644
--- a/tests/coproc.tests
+++ b/tests/coproc.tests
@@ -1,6 +1,26 @@
+#   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 .
+#
+: ${TMPDIR:=/tmp}
+TMPOUT=${TMPDIR}/coproc-wait-$BASHPID
+
 coproc { echo a b c; sleep 2; }
 
-echo $COPROC_PID
+case $COPROC_PID in
+[0-9]*)	;;
+*)	echo COPROC_PID not integer ;;
+esac
+
 echo ${COPROC[@]}
 
 read LINE <&${COPROC[0]}
@@ -10,7 +30,11 @@ wait $COPROC_PID
 
 coproc REFLECT { cat - ; }
 
-echo $REFLECT_PID
+case $REFLECT_PID in
+[0-9]*)	;;
+*)	echo REFLECT_PID not integer ;;
+esac
+
 echo ${REFLECT[@]}
 
 echo flop >&${REFLECT[1]}
@@ -18,12 +42,21 @@ read LINE <&${REFLECT[0]}
 
 echo $LINE
 
-kill $REFLECT_PID
-wait $REFLECT_PID
+{ sleep 1; kill $REFLECT_PID; } &
+wait $REFLECT_PID >$TMPOUT 2>&1 || { status=$? ; echo "coproc.tests: REFLECT: status $status" ; }
+[[ $status < 128 || $status == 143 ]] || {
+	echo "coproc.tests: wait for REFLECT failed" >&2
+}
+rm -f $TMPOUT
+exec 2>&1
 
 coproc xcase -n -u
 
-echo $COPROC_PID
+case $COPROC_PID in
+[0-9]*)	;;
+*)	echo COPROC_PID not integer ;;
+esac
+
 echo ${COPROC[@]}
 
 echo foo >&${COPROC[1]}
diff --git a/tests/cprint.right b/tests/cprint.right
index 2000072..269136d 100644
--- a/tests/cprint.right
+++ b/tests/cprint.right
@@ -19,7 +19,7 @@ tf ()
         i=$(( i + 1 ));
     done;
     [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops > /dev/null;
-    for name in $( echo 1 2 3 );
+    for name in $(echo 1 2 3);
     do
         test -r /dev/fd/$name;
     done;
diff --git a/tests/cprint.tests b/tests/cprint.tests
index 08ff1eb..e598f8c 100644
--- a/tests/cprint.tests
+++ b/tests/cprint.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 #
 # a nonsense script and shell function to test out the command printing code
 #
diff --git a/tests/dbg-support.right b/tests/dbg-support.right
index c4a1609..6e2194a 100644
--- a/tests/dbg-support.right
+++ b/tests/dbg-support.right
@@ -1,357 +1,357 @@
-debug lineno: 63 main
-debug lineno: 66 main
+debug lineno: 74 main
+debug lineno: 77 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
+debug lineno: 81 main
+debug lineno: 30 fn1
+debug lineno: 31 fn1
+LINENO 31
+debug lineno: 32 fn1
+LINENO 32
+debug lineno: 33 fn1
 BASH_SOURCE[0] ./dbg-support.tests
-debug lineno: 21 fn1
+debug lineno: 34 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
+debug lineno: 35 fn1
+debug lineno: 35 fn1 81 ./dbg-support.tests
+debug lineno: 36 fn1
+debug lineno: 36 fn1 81 main ./dbg-support.tests
+debug lineno: 37 fn1
+debug lineno: 37 fn1
+debug lineno: 38 fn1
+./dbg-support.tests: line 38: 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
+debug lineno: 38 fn1
+debug lineno: 30 fn1
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 30 fn1
+debug lineno: 27 print_return_trap
+debug lineno: 82 main
+debug lineno: 41 fn2
+debug lineno: 42 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
+debug lineno: 43 fn2
+debug lineno: 30 fn1
+debug lineno: 31 fn1
+LINENO 31
+debug lineno: 32 fn1
+LINENO 32
+debug lineno: 33 fn1
 BASH_SOURCE[0] ./dbg-support.tests
-debug lineno: 21 fn1
+debug lineno: 34 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
+debug lineno: 35 fn1
+debug lineno: 35 fn1 43 ./dbg-support.tests
+debug lineno: 36 fn1
+debug lineno: 36 fn1 43 fn2 ./dbg-support.tests
+debug lineno: 37 fn1
+debug lineno: 37 fn1 82 main ./dbg-support.tests
+debug lineno: 38 fn1
+./dbg-support.tests: line 38: 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
+debug lineno: 38 fn1
+debug lineno: 30 fn1
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 30 fn1
+debug lineno: 27 print_return_trap
+debug lineno: 41 fn2
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 41 fn2
+debug lineno: 27 print_return_trap
+debug lineno: 83 main
+debug lineno: 46 fn3
+debug lineno: 47 fn3
+LINENO 47
+debug lineno: 48 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
+debug lineno: 51 fn3
+debug lineno: 52 fn3
+debug lineno: 53 fn3
+debug lineno: 53 fn3
+debug lineno: 54 fn3
+debug lineno: 55 fn3
+debug lineno: 56 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
+debug lineno: 53 fn3
+debug lineno: 53 fn3
+debug lineno: 54 fn3
+debug lineno: 55 fn3
+debug lineno: 55 fn3
+debug lineno: 56 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
+debug lineno: 53 fn3
+debug lineno: 53 fn3
+debug lineno: 59 fn3
+debug lineno: 31 source
+SOURCED LINENO 31
+debug lineno: 32 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
+debug lineno: 33 source
+debug lineno: 16 sourced_fn
+debug lineno: 17 sourced_fn
+debug lineno: 18 sourced_fn
+SOURCED FN LINENO 18
+debug lineno: 21 sourced_fn
+debug lineno: 22 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 59
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 83
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 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: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 16 sourced_fn
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 16 sourced_fn
+debug lineno: 27 print_return_trap
+debug lineno: 59 fn3
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 59 fn3
+debug lineno: 27 print_return_trap
 debug lineno: 46 fn3
-debug lineno: 12 print_return_trap
-debug lineno: 13 print_return_trap
+debug lineno: 25 print_return_trap
+debug lineno: 26 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
+debug lineno: 27 print_return_trap
+debug lineno: 84 main
+debug lineno: 31 source
+SOURCED LINENO 31
+debug lineno: 32 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
+debug lineno: 33 source
+debug lineno: 16 sourced_fn
+debug lineno: 17 sourced_fn
+debug lineno: 18 sourced_fn
+SOURCED FN LINENO 18
+debug lineno: 21 sourced_fn
+debug lineno: 22 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 84
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 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
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 16 sourced_fn
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 16 sourced_fn
+debug lineno: 27 print_return_trap
+debug lineno: 84 main
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 84 main
+debug lineno: 27 print_return_trap
+debug lineno: 87 main
+debug lineno: 90 main
+LINENO 31
+LINENO 32
 BASH_SOURCE[0] ./dbg-support.tests
 FUNCNAME[0] fn1
-79 ./dbg-support.tests
-79 main ./dbg-support.tests
+90 ./dbg-support.tests
+90 main ./dbg-support.tests
 
-./dbg-support.tests: line 25: caller: foo: invalid number
+./dbg-support.tests: line 38: caller: foo: invalid number
 caller: usage: caller [expr]
 
-debug lineno: 80 main
+debug lineno: 91 main
 fn2 here. Calling fn1...
-LINENO 18
-LINENO 19
+LINENO 31
+LINENO 32
 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
+43 ./dbg-support.tests
+43 fn2 ./dbg-support.tests
+91 main ./dbg-support.tests
+./dbg-support.tests: line 38: caller: foo: invalid number
 caller: usage: caller [expr]
 
-debug lineno: 81 main
-LINENO 34
+debug lineno: 92 main
+LINENO 47
 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 LINENO 31
 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
+SOURCED FN LINENO 18
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33
+FUNCNAME[1]: source called from ./dbg-support.tests at line 59
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 92
 FUNCNAME[3]: main called from ./dbg-support.tests at line 0
-debug lineno: 82 main
+debug lineno: 93 main
 fn4 here. Calling fn3...
-LINENO 34
+LINENO 47
 BASH_SOURCE[0] ./dbg-support.tests
-fn3 called from file  `./dbg-support.tests' at line 82
+fn3 called from file  `./dbg-support.tests' at line 93
 fn4 called from file  `./dbg-support.tests' at line 0
 main called from file  `./dbg-support.tests' at line 0
-SOURCED LINENO 18
+SOURCED LINENO 31
 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
+SOURCED FN LINENO 18
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33
+FUNCNAME[1]: source called from ./dbg-support.tests at line 59
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 64
+FUNCNAME[3]: fn4 called from ./dbg-support.tests at line 93
 FUNCNAME[4]: main called from ./dbg-support.tests at line 0
-debug lineno: 83 main
-SOURCED LINENO 18
+debug lineno: 94 main
+SOURCED LINENO 31
 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
+SOURCED FN LINENO 18
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33
+FUNCNAME[1]: source called from ./dbg-support.tests at line 94
 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
+return lineno: 94 main
+debug lineno: 97 main
+debug lineno: 100 main
+debug lineno: 31 source
+SOURCED LINENO 31
+debug lineno: 32 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
+debug lineno: 33 source
+debug lineno: 16 sourced_fn
+debug lineno: 17 sourced_fn
+debug lineno: 18 sourced_fn
+SOURCED FN LINENO 18
+debug lineno: 21 sourced_fn
+debug lineno: 22 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 33
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 100
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 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: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 16 sourced_fn
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 16 sourced_fn
+debug lineno: 27 print_return_trap
+debug lineno: 100 main
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 100 main
+debug lineno: 27 print_return_trap
+debug lineno: 101 main
+debug lineno: 104 main
+debug lineno: 104 main
+debug lineno: 105 main
+debug lineno: 108 main
+debug lineno: 104 main
+debug lineno: 104 main
+debug lineno: 105 main
+debug lineno: 108 main
+debug lineno: 104 main
 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
+Hit 2
+debug lineno: 108 main
+debug lineno: 104 main
+debug lineno: 104 main
+debug lineno: 114 main
+SOURCED FN LINENO 18 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 114 FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 115 main
+SOURCED FN LINENO 18 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 115 FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 116 main
+debug lineno: 117 main
+SOURCED FN LINENO 18
+FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 117
 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
+debug lineno: 121 main
+debug lineno: 122 main
+debug lineno: 16 sourced_fn
+debug lineno: 17 sourced_fn
+debug lineno: 18 sourced_fn
+SOURCED FN LINENO 18
+debug lineno: 21 sourced_fn
+debug lineno: 22 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 122
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 24 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 25 sourced_fn
+debug lineno: 26 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
+debug lineno: 23 sourced_fn
+debug lineno: 23 sourced_fn
+debug lineno: 16 sourced_fn
+debug lineno: 25 print_return_trap
+debug lineno: 26 print_return_trap
+return lineno: 16 sourced_fn
+debug lineno: 27 print_return_trap
+debug lineno: 125 main
+debug lineno: 130 main
+debug lineno: 134 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
+debug lineno: 142 main
+debug lineno: 143 main
+debug lineno: 144 main
+debug lineno: 143 main
+debug lineno: 144 main
+debug lineno: 142 main
+debug lineno: 143 main
+debug lineno: 144 main
+debug lineno: 143 main
+debug lineno: 144 main
+debug lineno: 148 main
 main: calling f1
 f1: calling f2
 f2: calling f3
@@ -364,7 +364,7 @@ deep 6
 4 x
 5 1
 FUNCNAME stack: f3 f2 f1 main
-26 f2 ./dbg-support3.sub
+39 f2 ./dbg-support3.sub
 f3: returning
 f2: return from f3
 f1: return from f2
diff --git a/tests/dbg-support.sub b/tests/dbg-support.sub
index f68f8d9..8c82c80 100644
--- a/tests/dbg-support.sub
+++ b/tests/dbg-support.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # This file is intended to be sourced from one of the bashdb test programs
 
 sourced_fn() {
diff --git a/tests/dbg-support.tests b/tests/dbg-support.tests
old mode 100755
new mode 100644
index ad06d01..b4a58e4
--- a/tests/dbg-support.tests
+++ b/tests/dbg-support.tests
@@ -1,4 +1,17 @@
-#!../bash
+#   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 .
+#
+
 #
 # Test correct functioning bash debug support not via the bashdb
 # debugger but merely by printing via print_trap()
@@ -51,8 +64,6 @@ fn4() {
     fn3
 }    
 
-
-#!../bash
 #
 # Test of support for debugging facilities in bash
 # 
@@ -105,7 +116,7 @@ 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.
+# Make sure we step into sourced_fn as a command when we request to do so.
 # Vanilla bash 2.0 doesn't do.
 set -o functrace
 x={ sourced_fn }
@@ -135,8 +146,3 @@ for i in 0 1 ; do
 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
index c9d884e..5727d1f 100644
--- a/tests/dbg-support2.right
+++ b/tests/dbg-support2.right
@@ -1,7 +1,7 @@
-lineno: 17 (6) main
-lineno: 18 (6) main
+lineno: 29 (18) main
+lineno: 30 (18) main
 x is 1
-lineno: 19 (6) main
-lineno: 20 (6) main
-lineno: 21 (6) main
+lineno: 31 (18) main
+lineno: 32 (18) main
+lineno: 33 (18) main
 x is 1
diff --git a/tests/dbg-support2.tests b/tests/dbg-support2.tests
old mode 100755
new mode 100644
index fdc0f31..c33251d
--- a/tests/dbg-support2.tests
+++ b/tests/dbg-support2.tests
@@ -1,4 +1,16 @@
-#!../bash
+#   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 .
+#
 #
 # Test correct trap return codes = 2 means skip execution.
 shopt -s extdebug
@@ -19,8 +31,3 @@ 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
index cc52c65..146831f 100644
--- a/tests/dbg-support3.sub
+++ b/tests/dbg-support3.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 shopt -s extdebug
 
 callstack(){
diff --git a/tests/dollar-at-star b/tests/dollar-at-star
old mode 100755
new mode 100644
index 54e499d..721eea1
--- a/tests/dollar-at-star
+++ b/tests/dollar-at-star
@@ -1,3 +1,17 @@
+#   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 .
+#
+
 # first, let's start with the basics
 
 recho "$@"
@@ -6,6 +20,23 @@ recho "$*"
 recho $@
 recho $*
 
+foo=$*
+foo=$@
+
+foo="$*"
+foo="$@"
+
+unset -v bar
+
+foo=${bar:-$*}
+foo=${bar:-$@}
+
+foo=${bar:-"$*"}
+foo=${bar:-"$@"}
+
+foo=${!*}
+foo=${!@}
+
 set a b
 
 recho "$*"
@@ -207,6 +238,33 @@ case "$@" in
 *)	echo bad 4;;
 esac
 
+# tests for the effect of quoting $* and $@ in an assignment context (plus
+# arrays) -- bugs through bash 4.2
+${THIS_SH} ./dollar-at-star1.sub
+
+# more tests for expanding $@ and $* in a context where there is no word
+# splitting
+${THIS_SH} ./dollar-at-star2.sub
+${THIS_SH} ./dollar-at-star3.sub
+${THIS_SH} ./dollar-at-star4.sub
+${THIS_SH} ./dollar-at-star5.sub
+${THIS_SH} ./dollar-at-star6.sub
+${THIS_SH} ./dollar-at-star7.sub
+
+# tests for expansions of $@ and ${a[@]} (vs. $* and ${a[*]}) on the RHS of
+# assignment statements with non-default IFS: $@ expands to args or array
+# members separated by spaces
+${THIS_SH} ./dollar-at-star8.sub
+
+# more tests of the expansions of $@ and $* (and their array equivalents)
+# with different values for IFS
+${THIS_SH} ./dollar-at-star9.sub
+
+# tests for expansions of "$*" and "$@" and their array equivalents when $1 == ''
+# and we're using the POSIX word expansions
+${THIS_SH} ./dollar-at-star10.sub
+${THIS_SH} ./dollar-at-star11.sub
+
 # tests for special expansion of "$*" and "${array[*]}" when used with other
 # expansions -- bugs through bash-2.05b
 ${THIS_SH} ./dollar-star1.sub
@@ -235,4 +293,40 @@ ${THIS_SH} ./dollar-star4.sub
 # tests for expansions of $* when IFS is null
 ${THIS_SH} ./dollar-star5.sub
 
+# tests for inappropriate word splitting through bash-4.2
+${THIS_SH} ./dollar-at4.sub
+
+# tests for problems with "$@" preceded and followed by other quoted expansions
+# through bash-4.2
+${THIS_SH} ./dollar-at5.sub
+
+# tests for problems with "${@:1}" and other expansions with null entries
+# in positional parameters
+${THIS_SH} ./dollar-at6.sub
+
+# tests for expansions of $* when $1 == ""; problem through bash-4.2
+${THIS_SH} ./dollar-star6.sub
+
+# tests for expansions of $* (unquoted) when IFS changes (e.g., ${IFS:=-})
+# problem through bash-4.2
+${THIS_SH} ./dollar-star7.sub
+
+# tests for expansions of $* (unquoted) when IFS is null and word splitting is
+# not going to be performed.
+# problem through bash-4.4 in some parameter expansion contexts
+${THIS_SH} ./dollar-star8.sub
+
+# tests for expansions of "$@" when there are no positional parameter or when
+# $1 == '' and the expansion is preceded by something that results in a quoted
+# null string
+${THIS_SH} ./dollar-at7.sub
+
+# tests for expansions of $* when in an assignment context (no splitting) and
+# IFS is null
+${THIS_SH} ./dollar-star9.sub
+
+# more tests for expansions of $* when not splitting with IFS set or unset and
+# null strings as the positional parameters
+${THIS_SH} ./dollar-star10.sub
+
 exit 0
diff --git a/tests/dollar-at-star1.sub b/tests/dollar-at-star1.sub
new file mode 100644
index 0000000..ef15efc
--- /dev/null
+++ b/tests/dollar-at-star1.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+# from dan douglas
+expassign()
+{
+	typeset -a a
+	a=("$@")
+	typeset var asn
+
+	while IFS= read -r asn; do
+		IFS=: command eval "$asn"
+		printf '%-14s... %s\n' "$asn" "$var"
+	done <<\EOF
+var=${a[*]}
+var="${a[*]}"
+var=$*
+var="$*"
+var=${a[@]}
+var="${a[@]}"
+var=$@
+var="$@"
+EOF
+}
+
+expassign one:::two three:::four
diff --git a/tests/dollar-at-star10.sub b/tests/dollar-at-star10.sub
new file mode 100644
index 0000000..6b52b01
--- /dev/null
+++ b/tests/dollar-at-star10.sub
@@ -0,0 +1,66 @@
+# checks for array variables and positional parameter expansions losing quoted
+# null string expansions -- problem through bash-5.1
+
+set -- ''
+myvar[0]=
+a="${myvar[*]}"
+
+recho "$*"
+recho "${*}"
+
+recho "${a}"
+recho "${myvar[*]}"
+
+recho "${a:+nonnull}"
+recho "${myvar[*]:+nonnull}"
+
+a="${myvar[@]}"
+
+recho "$@"
+recho "${@}"
+
+recho "${a}"
+recho "${myvar[@]}"
+
+recho "${a:+nonnull}"
+recho "${myvar[@]:+nonnull}"
+
+# check to make sure literal CTLNULs are handled correctly
+set -- $'\x7f'
+
+recho "$@"
+recho "${@}"
+recho "${@:+nonnull}"
+
+recho "$*"
+recho "${*}"
+recho "${*:+nonnull}"
+
+shift $#
+
+# these should echo nothing
+recho "${@}"
+recho "${@:+nonnull}"
+
+unset -v a
+
+# make sure that other null expansions result in null strings where appropriate
+set -- ''
+a[0]=
+
+recho "$*"$x
+recho "${*}"$x
+
+recho "$@"$x
+recho "${@}"$x
+
+recho "${a[*]}"$x
+recho "${a[@]}"$x
+
+
+recho "$@"$x
+recho "${@}"$x
+
+recho "${a[*]}"
+recho "${a[@]}"
+
diff --git a/tests/dollar-at-star11.sub b/tests/dollar-at-star11.sub
new file mode 100644
index 0000000..b7a6ec4
--- /dev/null
+++ b/tests/dollar-at-star11.sub
@@ -0,0 +1,80 @@
+a[0]='/'
+set -- /
+
+# these should all result in the empty (null) string
+
+recho "${a[0]%?}"
+recho "${a[*]%?}"
+recho "${a[@]%?}"
+
+recho "${*%?}"
+recho "${@%?}"
+
+recho "${a[0]#?}"
+recho "${a[*]#?}"
+recho "${a[@]#?}"
+
+recho "${*#?}"
+recho "${@#?}"
+
+recho "${a[0]/\//}"
+recho "${a[*]/\//}"
+recho "${a[@]/\//}"
+
+recho "${*/\//}"
+recho "${@/\//}"
+
+recho "${a[0]:1:1}"
+# these next four will all echo /
+
+# arrays are zero-based
+recho "${a[*]:0:1}"
+recho "${a[@]:0:1}"
+# but the positional parameters start at 1
+recho "${*:1:1}"
+recho "${@:1:1}"
+
+a[0]=''
+set -- ''
+
+# arrays are zero-based
+recho "${a[*]:0:1}"
+recho "${a[@]:0:1}"
+
+recho "${*:1:1}"
+recho "${@:1:1}"
+
+# these should all result in the empty (null) string, or quoted as such
+
+recho "${a[0]@Q}"
+recho "${a[*]@Q}"
+recho "${a[@]@Q}"
+
+recho "${*@Q}"
+recho "${@@Q}"
+
+recho "${a[0]@L}"
+recho "${a[*]@L}"
+recho "${a[@]@L}"
+
+recho "${*@L}"
+recho "${@@L}"
+
+# examples from the bug report
+unset -v a
+
+a[0]='/'
+for i in "${a[@]%/}"; do recho "$i"; done
+
+a[0]=''
+for i in "${a[@]}"; do recho "$i"; done
+
+a[0]='/'
+a[1]="//"
+for i in "${a[@]%/}"; do recho "$i"; done
+
+unset -v x y
+x=('/')
+y=("${x[@]%/}")
+
+echo "${#x[@]}:${#y[@]}"
diff --git a/tests/dollar-at-star2.sub b/tests/dollar-at-star2.sub
new file mode 100644
index 0000000..64ab1eb
--- /dev/null
+++ b/tests/dollar-at-star2.sub
@@ -0,0 +1,220 @@
+#   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 .
+#
+OIFS="$IFS"
+foo='   ,foo'
+set -- "$foo"
+
+if [[ $foo = ,* ]]; then echo bad 1; else echo ok 1; fi
+if [[ $@ = ,* ]]; then echo bad 2; else echo ok 2; fi
+if [[ $* = ,* ]]; then echo bad 3; else echo ok 3; fi
+if [[ ${@} = ,* ]]; then echo bad 4; else echo ok 4; fi
+if [[ ${*} = ,* ]]; then echo bad 5; else echo ok 5; fi
+if [[ $1 = ,* ]]; then echo bad 6; else echo ok 6; fi
+
+set -- '   ,foo'
+if [[ $foo = ,* ]]; then echo bad 7; else echo ok 7; fi
+if [[ $@ = ,* ]]; then echo bad 8; else echo ok 8; fi
+if [[ $* = ,* ]]; then echo bad 9; else echo ok 9; fi
+if [[ ${@} = ,* ]]; then echo bad 10; else echo ok 10; fi
+if [[ ${*} = ,* ]]; then echo bad 11; else echo ok 11; fi
+if [[ $1 = ,* ]]; then echo bad 12; else echo ok 12; fi
+
+IFS=
+if [[ $@ = ,* ]]; then echo bad 13; else echo ok 13; fi
+if [[ $* = ,* ]]; then echo bad 14; else echo ok 14; fi
+IFS="$OIFS"
+
+foo='   ,foo'
+set -- '   ' ',foo'
+
+if [[ $@ = ,* ]]; then echo bad at 1; else echo ok at 1; fi
+if [[ ${@} = ,* ]]; then echo bad at 2; else echo ok at 2; fi
+
+if [[ $* = ,* ]]; then echo bad star 1; else echo ok star 1; fi
+if [[ ${*} = ,* ]]; then echo bad star 2; else echo ok star 2; fi
+
+foo='   ,foo'
+set -- "$foo"
+
+# expand_string_for_rhs
+
+foo2=$@
+echo "$foo2"
+
+foo2=$*
+echo "$foo2"
+
+foo2="$@"
+echo "$foo2"
+
+foo2="$*"
+echo "$foo2"
+
+# expand_word_unsplit
+case $@ in
+$foo2)	echo ok at 1 ;;
+*)	echo bad at 1 ;;
+esac
+
+# also uses expand_word_leave_quoted
+case $@ in
+$@)	echo ok at 2;;
+*)	echo bad at 2;;
+esac
+
+case $@ in
+$foo)	echo ok at 3 ;;
+*)	echo bad at 3;;
+esac
+
+# expand_word_unsplit
+case $* in
+$foo2)	echo ok star 1 ;;
+*)	echo bad star 1 ;;
+esac
+
+# also uses expand_word_leave_quoted
+case $* in
+$*)	echo ok star 2;;
+*)	echo bad star 2;;
+esac
+
+case $* in
+$foo)	echo ok star 3 ;;
+*)	echo bad star 3;;
+esac
+
+case $@ in
+$*)	echo ok at-star 1;;
+*)	echo bad at-star 1;;
+esac
+
+case $* in
+$@)	echo ok at-star 2;;
+*)	echo bad at-star 2;;
+esac
+
+foo='a b c'
+set -- $foo
+
+# expand_string_for_rhs
+IFS='|'
+foo2=$@
+echo "$foo2"
+
+foo2=$*
+echo "$foo2"
+
+foo2="$@"
+echo "$foo2"
+
+foo2="$*"
+echo "$foo2"
+
+foo="a b c"
+set -- $foo
+
+if [[ $@ = $foo ]]; then echo ok at 1; else echo bad at 1; fi
+if [[ $foo = $@ ]]; then echo ok at 2; else echo bad at 2; fi
+
+case $@ in
+$@)	echo ok at 3 ;;
+*)	echo bad at 3 ;;
+esac
+
+case $@ in
+$foo)	echo ok at 4;;
+*)	echo bad at 4;;
+esac
+
+case $foo in
+$@)	echo ok at 5;;
+*)	echo bad at 5;;
+esac
+IFS="$OIFS"
+
+foo="a b c"
+set -- $foo
+
+IFS=:
+if [[ $@ = $foo ]]; then echo ok at 1; else echo bad at 1; fi
+if [[ $foo = $@ ]]; then echo ok at 2; else echo bad at 2; fi
+
+case $@ in
+$@)	echo ok at 3 ;;
+*)	echo bad at 3 ;;
+esac
+
+case $@ in
+$foo)	echo ok at 4;;
+*)	echo bad at 4;;
+esac
+
+case $foo in
+$@)	echo ok at 5;;
+*)	echo bad at 5;;
+esac
+IFS="$OIFS"
+
+foo="a b c"
+set -- $foo
+
+IFS='|'
+foo2=$@
+
+case $@ in
+$@)	echo ok at 1 ;;
+*)	echo bad at 1 ;;
+esac
+
+case $foo2 in
+$foo)	echo ok at 2;;
+*)	echo bad at 2;;
+esac
+
+case $foo in
+$foo2)	echo ok at 3;;
+*)	echo bad at 3;;
+esac
+
+case $foo in
+$foo)	echo ok at 4;;
+*)	echo bad at 4;;
+esac
+
+case $foo2 in
+$foo2)	echo ok at 5;;
+*)	echo bad at 5;;
+esac
+
+case $foo2 in
+$@)	echo ok at 6;;
+*)	echo bad at 6;;
+esac
+
+case $@ in
+$foo2)	echo ok at 7;;
+*)	echo bad at 7;;
+esac
+
+case $foo in
+$@)	echo ok at 8;;
+*)	echo bad at 8;;
+esac
+
+case $@ in
+$foo)	echo ok at 9;;
+*)	echo bad at 9;;
+esac
+IFS="$OIFS"
diff --git a/tests/dollar-at-star3.sub b/tests/dollar-at-star3.sub
new file mode 100644
index 0000000..da05444
--- /dev/null
+++ b/tests/dollar-at-star3.sub
@@ -0,0 +1,57 @@
+#   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 .
+#
+unset f ; f=abcd
+
+first_char=${f[@]:0:1}
+recho $first_char
+
+first_char=${f[0]:0:1}
+recho $first_char
+
+first_char=${f:0:1}
+recho $first_char
+
+first_char="${f[@]:0:1}"
+recho $first_char
+
+first_char="${f[@]:0:1}"
+recho $first_char
+
+first_char="${f[0]:0:1}"
+recho $first_char
+
+first_char="${f:0:1}"
+recho $first_char
+
+unset f;
+f=( one two three )
+first_word=${f[@]:0:1}
+recho $first_word
+
+first_word=${f[0]:0:1}
+recho $first_word
+
+first_word=${f:0:1}
+recho $first_word
+
+unset f;
+f=( one two three )
+first_word=${f[@]:0:1}
+recho $first_word
+
+set -- abc def ghi
+
+printf '<%s> ' "123 $@ 456"; echo
+printf '<%s> ' "123 $@\ 456"; echo
+
diff --git a/tests/dollar-at-star4.sub b/tests/dollar-at-star4.sub
new file mode 100644
index 0000000..9f7da8e
--- /dev/null
+++ b/tests/dollar-at-star4.sub
@@ -0,0 +1,112 @@
+#   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 .
+#
+# tests for quoted and unquoted, split and unsplit expansions of $@ and $*
+# Posix interpretation 221 speaks to this issue
+
+set -- a b
+IFS=
+x=abc
+
+printf "<%s>\n" ${x#$*}
+
+a="a bc"
+echo ${a#$*}
+unset x a
+
+a=$@
+echo "$a"
+
+a=$*
+echo "$a"
+
+printf '<%s>' $@ ; echo
+
+IFS=' 	
+'
+
+a=$@
+echo "$a"
+
+a=$*
+echo "$a"
+
+unset a
+
+unset IFS
+set a b "c d"
+printf '<%s>' $* ; echo
+printf '<%s>' ${q-$*} ; echo
+
+IFS=
+set a b "c d"
+printf '<%s>' $* ; echo
+printf '<%s>' ${q-$*} ; echo
+
+IFS=:
+set a b
+printf '<%s>' ${foo=$*} ; echo
+printf '<%s>' "${foo}" ; echo
+
+unset foo
+IFS=' 	
+'
+printf '<%s>' ${foo=$@} ; echo
+printf '<%s>' "$foo" ; echo
+
+IFS=?
+set a c
+foo=abcd
+
+echo ${foo#"$*"}
+echo "${foo#$*}"
+
+echo "${foo#'a?c'}"
+echo "${foo#a?c}"
+
+IFS=?
+set a c
+str=a$'\001'c
+pat=a$'\001'
+echo "${str#$pat}"
+
+set a b
+IFS=:
+
+a=$@
+recho "$a"
+
+recho ${foo=$*}
+recho "$foo"
+
+unset foo
+IFS=' 	
+'
+recho ${foo=$@}
+recho "$foo"
+
+shift $#
+unset foo x
+
+set -- a b
+x=abc
+
+IFS=
+printf "<%s>\n" ${x#$*}
+printf "<%s>\n" "${x#$*}"
+
+x=abcd
+set a c
+IFS='?'
+printf "<%s>\n" ${x#$*}
+printf "<%s>\n" "${x#$*}"
diff --git a/tests/dollar-at-star5.sub b/tests/dollar-at-star5.sub
new file mode 100644
index 0000000..d07c61a
--- /dev/null
+++ b/tests/dollar-at-star5.sub
@@ -0,0 +1,66 @@
+#   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 .
+#
+# testing various combinations of quoted and unquoted expansions of $@, and
+# whether they generate empty words after expansion
+
+n() { echo "$#"; }
+
+n "$@"
+n ${foo-"$@"}
+n "${foo-$@}"
+
+n ""$@
+n """$@"
+
+n $(true)$@
+n "$(true)$@"
+n "$(true)$@"
+n "$(true)""$@"
+
+n $xxx$@
+n "$xxx$@"
+n $xxx"$@"
+n "$xxx""$@"
+
+recho $xxx"$@"
+echo after 1
+
+recho "$xxx$@"
+echo after 2
+
+recho ${foo:-$xxx"$@"}
+echo after 3
+
+# this is where these things start to differ
+echo same as 1
+recho "${foo:-$xxx"$@"}"
+echo same as 2
+recho "${foo:-$xxx$@}"
+
+echo null fields
+recho ""$@
+recho """$@"
+
+echo null fields in rhs
+echo null string with unquoted '$@'
+recho ${foo:-""$@}
+echo null string with quoted '$@'
+recho ${foo:-"""$@"}
+
+echo assignment
+recho "${foo=$@}"
+echo variable
+recho "$foo"
+echo dollar-at
+recho "${@}"
diff --git a/tests/dollar-at-star6.sub b/tests/dollar-at-star6.sub
new file mode 100644
index 0000000..09353b8
--- /dev/null
+++ b/tests/dollar-at-star6.sub
@@ -0,0 +1,42 @@
+#   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 .
+#
+OIFS="$IFS"
+arr=(a b c)
+
+recho ${arr[@]@Q}
+recho "${arr[@]@Q}"
+
+IFS="'"
+recho ${arr[@]@Q}
+recho "${arr[@]@Q}"
+IFS="$OIFS"
+
+arr=("'a'" "'b'" "'c'")
+
+IFS="'"
+recho ${arr[@]}
+recho "${arr[@]}"
+IFS="$OIFS"
+
+IFS="'"
+a="'a'"
+recho $a
+recho "$a"
+IFS="$OIFS"
+
+set -- "'a'" "'b'" "'c'"
+
+IFS="'"
+recho "${@}"
+recho "$@"
diff --git a/tests/dollar-at-star7.sub b/tests/dollar-at-star7.sub
new file mode 100644
index 0000000..e4e63b7
--- /dev/null
+++ b/tests/dollar-at-star7.sub
@@ -0,0 +1,38 @@
+#   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 .
+#
+IFS=''			# testing with only empty IFS
+
+set -- this is a test
+
+printf '|%s|\n' ${1+"$@"}
+echo
+printf '|%s|\n' "${1+$@}"
+echo
+printf '|%s|\n' "$@"
+echo
+
+printf '|%s|\n' ${1-"$@"}
+printf '|%s|\n' "${1-$@}"
+
+echo
+: ${foo:="$@"}
+printf '|%s|\n' "$foo"
+
+unset foo
+: "${foo:=$@}"
+printf '|%s|\n' "$foo"
+
+unset foo
+printf '|%s|\n' ${foo-"$@"}
+printf '|%s|\n' "${foo-$@}"
diff --git a/tests/dollar-at-star8.sub b/tests/dollar-at-star8.sub
new file mode 100644
index 0000000..7e1b688
--- /dev/null
+++ b/tests/dollar-at-star8.sub
@@ -0,0 +1,14 @@
+function f {
+   typeset -a a
+   a=("$@")
+   typeset IFS=,
+   typeset a1="${a[@]} ${a[*]} $@ $* ${@} ${*}"
+   typeset a2=${a[@]}\ ${a[*]}\ $@\ $*\ ${@}\ ${*} a3 a4
+   a3="${a[@]} ${a[*]} $@ $* ${@} ${*}"
+   a4=${a[@]}\ ${a[*]}\ $@\ $*\ ${@}\ ${*}
+   unset -v IFS
+   printf '%s\n' "a1=$a1" "a2=$a2" "a3=$a3" "a4=$a4"
+}
+
+echo
+f a b c
diff --git a/tests/dollar-at-star9.sub b/tests/dollar-at-star9.sub
new file mode 100644
index 0000000..e5062f7
--- /dev/null
+++ b/tests/dollar-at-star9.sub
@@ -0,0 +1,278 @@
+#   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 .
+#
+IFS=$' \t\n'   # or any other IFS
+set -- ''
+recho ${v= "$*" }
+recho "$v"
+unset -v v
+
+IFS=''
+set -- '' ''
+recho ${v= "$*" }
+recho "$v"
+unset -v v
+
+IFS=$' \t\n'   # or any other IFS
+unset -v v
+
+set -- ''
+recho ${v= "$@" }
+recho "$v"
+unset v
+recho ${v= $@ }
+recho "$v"
+unset v
+recho ${v= $@"" }
+recho "$v"
+unset v
+recho ${v= ${@} }
+recho "$v"
+unset v
+recho ${v= ${@}"" }
+recho "$v"
+unset v
+
+set -- '' ''
+recho ${v= $@ }
+recho "$v"
+unset v
+recho ${v= "$@" }
+recho "$v"
+unset v
+recho "${v= $@}"
+recho "$v"
+unset v
+recho ${v= "$@"}
+recho "$v"
+unset v
+
+IFS=
+
+set -- X
+X=X
+
+recho ${0+ "$@" }
+recho ${0+ $@ }
+recho ${0+ $* }
+
+recho ${0+ "$X" }
+recho ${0+ $X }
+recho ${0+ $X }
+
+recho ${0+ "$@" }
+recho "$Y"
+unset Y
+recho ${0+ $@ }
+recho "$Y"
+unset Y
+recho ${0+ $* }
+recho "$Y"
+unset Y
+
+recho ${Y:= "$X" }
+recho "$Y"
+unset Y
+recho ${Y:= $X }
+recho "$Y"
+unset Y
+recho ${Y:= $X }
+recho "$Y"
+unset Y
+
+IFS=
+
+unset -v X Y
+
+set -- X Y
+X='X Y'
+
+recho ${0+ "$@" }
+recho ${0+ $@ }
+recho ${0+ $* }
+
+recho ${0+ "$X" }
+recho ${0+ $X }
+recho ${0+ $X }
+
+recho ${Y:= "$@" }
+recho "$Y"
+unset Y
+recho ${Y:= $@ }
+recho "$Y"
+unset Y
+recho ${Y:= $* }
+recho "$Y"
+unset Y
+
+recho ${Y:= "$X" }
+recho "$Y"
+unset Y
+recho ${Y:= $X }
+recho "$Y"
+unset Y
+recho ${Y:= $X }
+recho "$Y"
+unset Y
+
+IFS=''
+set -- ' X '
+
+unset x y
+
+x=$*
+y=${*:1}
+
+recho "$x"
+recho "$y"
+
+unset x y
+
+recho ${x=$*}
+recho ${y=${*:1}}
+
+set -- b a
+declare -A A=([b]= [a]=)
+
+x=$*
+y=${!A[*]}
+
+unset A
+
+recho "$x"
+recho "$y"
+
+unset x y
+
+recho ${x=$*}
+recho ${y=${!A[*]}}
+
+unset x y
+
+recho ${x-$*}
+recho ${y-${!A[*]}}	# this isn't right yet
+
+IFS=:
+set -- a b
+ind=*
+
+unset x y
+
+x=$*
+y=${!ind}
+
+recho "$x"
+recho "$y"
+
+unset x y
+
+recho ${x-$*}
+recho ${y-${!ind}}	# this isn't right yet
+
+unset x y
+
+recho ${x=$*}
+recho ${y=${!ind}}
+
+set -- ' X '
+IFS=$' \t\n'
+
+x=$*
+y=${!ind};
+
+recho "$x"
+recho "$y"
+
+IFS=''
+x=$*
+y=${!ind}
+
+recho "$x"
+recho "$y"
+
+IFS=:
+set -- a b
+ind=*
+
+unset x y
+
+recho ${x-$*}
+recho ${y-${!ind}}	# this isn't right yet
+
+unset x y
+
+recho ${x=$*}
+recho ${y=${!ind}}
+
+set -- ' X '
+IFS=$' \t\n'
+
+unset x y
+
+x=$*
+y=${!ind};
+
+recho "$x"
+recho "$y"
+
+IFS=''
+x=$*
+y=${!ind}
+
+recho "$x"
+recho "$y"
+
+IFS=''
+set -- $'\177'
+
+unset -v var
+
+recho "${*:1}"
+var=${*:1}
+recho "$var"
+
+unset var
+recho ${var=${*:1}}
+recho "$var"
+
+declare -a a=($'\177')
+
+unset var
+var=${a[*]:0}
+recho "$var"
+
+unset var
+recho ${var=${a[*]:0}}
+unset var
+
+set -- $'\177'
+ind='*'
+
+recho $*
+var=${!ind}
+recho "$var"
+
+unset var
+recho ${var=${!ind}}
+recho "$var"
+
+declare -A A=([0]=$'\177')
+
+unset var
+var=${A[*]:0}
+recho "$var"
+
+# this isn't really right yet
+unset var
+recho ${var=${A[*]:0}}
+recho "$var"
diff --git a/tests/dollar-at1.sub b/tests/dollar-at1.sub
index 6d40786..c5079d6 100644
--- a/tests/dollar-at1.sub
+++ b/tests/dollar-at1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 echo_argc()
 {
 	echo $#
diff --git a/tests/dollar-at2.sub b/tests/dollar-at2.sub
index c079a29..16defbd 100644
--- a/tests/dollar-at2.sub
+++ b/tests/dollar-at2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 t1()
 {
 	xxx="echo $@"
diff --git a/tests/dollar-at4.sub b/tests/dollar-at4.sub
new file mode 100644
index 0000000..c8de866
--- /dev/null
+++ b/tests/dollar-at4.sub
@@ -0,0 +1,10 @@
+set 'a  b' 'c  d'
+
+recho "$@"
+recho $@
+
+quoted="$@"
+unquoted=$@
+
+recho "$quoted"
+recho "$unquoted"
diff --git a/tests/dollar-at5.sub b/tests/dollar-at5.sub
new file mode 100644
index 0000000..9b26c39
--- /dev/null
+++ b/tests/dollar-at5.sub
@@ -0,0 +1,95 @@
+#   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 .
+#
+args() { printf '<%s> ' "$@"; echo; }
+
+set -- 1 2 3 4 5
+
+args "${@} ${1}"
+args "${1} ${@}"
+args "${1}${@}${1}"
+args "${1} ${@} ${1}"
+args ${1}"$@"${1}
+args "$@"${1}
+args ${1}"$@"
+
+args "$@""${1}"
+args "${1}""$@"
+
+args "${@}foo"
+args ${@}${1}
+args ${@}foo
+
+IFS=
+args "$@""${1}"
+args "${1}""$@"
+
+args ${@}${1}
+args ${1}${@}
+args ${@}foo
+
+echo second set:
+IFS=$' \t\n'
+set -- '1 2' 3 4 5
+
+args "${@} ${1}"
+args "${1} ${@}"
+
+args "${1}${@}${1}"
+args "${1} ${@} ${1}"
+args ${1}"$@"${1}
+args "$@"${1}
+args ${1}"$@"
+
+args "$@""${1}"
+args "${1}""$@"
+
+args "${@}foo"
+args ${@}${1}
+args ${@}foo
+
+IFS=
+
+args "$@""${1}"
+args "${1}""$@"
+
+args ${@}${1}
+args ${1}${@}
+args ${@}foo
+
+echo third set:
+IFS=$' \t\n'
+
+alias declare=typeset
+
+a(){ echo
+     echo '"${@:2}a3 a2" a$1    #works as long as $1 and 3 are swapped'
+     echo  "${@:2}a3 a2" a$1
+           "${@:2}a3 a2" a$1
+     echo   $?
+        a=("${@}");}
+b(){ echo
+     echo '"${@:2}b$1 b2" b3    #fails!  why?'
+     echo  "${@:2}b$1 b2" b3
+           "${@:2}b$1 b2" b3
+     echo   $?
+        b=("${@}");}
+c(){ echo
+     echo  '${@:2}c$1 c2 c3     #works as long as quoting omitted'
+     echo   ${@:2}c$1 c2 c3
+            ${@:2}c$1 c2 c3
+     echo   $?
+        c=("${@}");}
+a x set y z;declare -p a
+b x set y z;declare -p b
+c x set y z;declare -p c
diff --git a/tests/dollar-at6.sub b/tests/dollar-at6.sub
new file mode 100644
index 0000000..791fd89
--- /dev/null
+++ b/tests/dollar-at6.sub
@@ -0,0 +1,43 @@
+#   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 .
+#
+set -- ''; 
+
+recho "${@}" x
+recho "${@:1}" x
+
+set -- "${@:1}"
+echo "$#" 
+
+set  -- '' ''
+
+recho "${@:1}" x 
+recho "${@:1:1}" x 
+
+typeset -a A	# ksh93 needs this
+A=('' '')
+recho "${A[@]:0}" x 
+
+recho "${A[@]:0:1}" x
+
+recho "${A[@]:1}" x 
+
+set -- ''
+
+recho "${@/foo/bar}"
+recho "${@^^[abcde]}"
+
+A=( '' )
+
+recho "${A[@]/foo/bar}"
+recho "${A[@],,[abcde]}"
diff --git a/tests/dollar-at7.sub b/tests/dollar-at7.sub
new file mode 100644
index 0000000..cde1164
--- /dev/null
+++ b/tests/dollar-at7.sub
@@ -0,0 +1,59 @@
+#   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 .
+#
+set -- ''
+
+recho 1 ''"$@"
+recho 2 """$@"
+
+recho 3 "$@""$@"
+recho 4 "$x""$@"
+
+set --
+
+echo -----
+recho 1 ''"$@"
+recho 2 """$@"
+
+recho 3 "$@""$@"
+recho 4 "$x""$@"
+
+set -- X
+
+echo ------
+recho 1 ''"${@/*}"
+recho 2 """${@/*}"
+
+recho 3 "$x""${@/*}"
+
+recho 4 ''"${@#X}"
+recho 5 """${@#X}"
+
+recho 6 "$x""${@#X}"
+
+set --
+
+echo -----
+recho 1 ''"${@/*}"
+recho 2 """${@/*}"
+
+recho 3 "$x""${@/*}"
+
+recho 4 ''"${@#X}"
+recho 5 """${@#X}"
+
+recho 6 "$x""${@#X}"
+
+echo -----
+recho 1 "$novar${*}$(echo)"
+recho 2 ''"$novar${@}$(echo)"
diff --git a/tests/dollar-star1.sub b/tests/dollar-star1.sub
index 63a9ef8..3e5ec36 100644
--- a/tests/dollar-star1.sub
+++ b/tests/dollar-star1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 set -- a b c
 x=(a b c); IFS='|'
 
diff --git a/tests/dollar-star10.sub b/tests/dollar-star10.sub
new file mode 100644
index 0000000..fce9ec1
--- /dev/null
+++ b/tests/dollar-star10.sub
@@ -0,0 +1,92 @@
+#   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 .
+#
+oIFS=$IFS
+
+set -- ''
+
+unset v
+recho ${v= ''}
+recho $v
+unset v
+recho ${v=''}
+recho $v
+unset v
+recho ${v= $*}
+recho $v
+unset v
+recho ${v=$*}
+recho $v
+unset v
+recho ${v='' }
+recho $v
+unset v
+recho ${v= '' }
+recho $v
+unset v
+recho ${v=$* }
+recho $v
+unset v
+recho ${v= $* }
+recho $v
+
+unset IFS
+
+unset v
+recho ${v= ''}
+recho $v
+unset v
+recho ${v=''}
+recho $v
+unset v
+recho ${v= $*}
+recho $v
+unset v
+recho ${v=$*}
+recho $v
+unset v
+recho ${v='' }
+recho $v
+unset v
+recho ${v= '' }
+recho $v
+unset v
+recho ${v=$* }
+recho $v
+unset v
+recho ${v= $* }
+recho $v
+
+unset -v v
+IFS=$oIFS
+
+# This shouldn't output anything
+set -- '' ''
+
+unset -v v
+recho ${v=$*}
+unset -v v
+recho ${v= $*}
+unset -v v
+recho ${v=$* }
+unset -v v
+recho ${v= $* }
+
+unset -v v IFS
+recho ${v=$*}
+unset -v v
+recho ${v= $*}
+unset -v v
+recho ${v= $* }
+unset -v v
+recho ${v= $*}
diff --git a/tests/dollar-star2.sub b/tests/dollar-star2.sub
index 844a297..78e00a0 100644
--- a/tests/dollar-star2.sub
+++ b/tests/dollar-star2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 set A B
 
 IFS=
diff --git a/tests/dollar-star3.sub b/tests/dollar-star3.sub
index 8cf4bb2..a6ef09f 100644
--- a/tests/dollar-star3.sub
+++ b/tests/dollar-star3.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 IFS=/
 #file=/mnt/cdrom/RedHat/RPMS
 #recho "${file[*]:0:3}"
diff --git a/tests/dollar-star5.sub b/tests/dollar-star5.sub
index 8448bf3..abd8bcc 100644
--- a/tests/dollar-star5.sub
+++ b/tests/dollar-star5.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 set -- a b
 IFS=
 
diff --git a/tests/dollar-star6.sub b/tests/dollar-star6.sub
new file mode 100644
index 0000000..095ec04
--- /dev/null
+++ b/tests/dollar-star6.sub
@@ -0,0 +1,32 @@
+#   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 .
+#
+recho "A${*:-w}R"
+recho "A${*-w}R"
+recho "A${*}R"
+
+set -- ""
+
+recho "A${*:-w}R"
+recho "A${*-w}R"
+recho "A${*}R"
+
+set -- $'\177'
+
+recho "A${*:+w}R"
+recho "A${*+w}R"
+recho "A${*}R"
+
+recho A${*:+w}R
+recho A${*+w}R
+recho A${*}R
diff --git a/tests/dollar-star7.sub b/tests/dollar-star7.sub
new file mode 100644
index 0000000..db352bf
--- /dev/null
+++ b/tests/dollar-star7.sub
@@ -0,0 +1,43 @@
+#   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 .
+#
+# if IFS side effects in ${IFS=} assignments take place, how do you cope with
+# later changes to IFS in the same set of expansions?  You've already
+# committed to using the first character of the (old) IFS to expand $* in
+# the previous expansions, and changing it to not include ' ', for instance,
+# results in the first couple of ${*} below not being split at all
+
+set -f -- a b c
+
+unset -v IFS
+printf '<%s> ' ${*}${IFS=}${*}${IFS:=-}"${*}"
+echo
+printf "after 1: IFS "
+echo "${IFS-unset}"
+recho "$*"
+
+set -f -- a 'b c' d
+unset -v IFS
+printf '<%s> ' ${*}${IFS=}${*}${IFS:=-}"${*}"
+echo
+printf "after 2: IFS "
+echo "${IFS-unset}"
+recho "$*"
+
+unset -v IFS
+recho $*
+recho "$*"
+
+IFS=' '
+recho $*
+recho "$*"
diff --git a/tests/dollar-star8.sub b/tests/dollar-star8.sub
new file mode 100644
index 0000000..e626564
--- /dev/null
+++ b/tests/dollar-star8.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+IFS=
+set "abc" "def ghi" "jkl"
+
+set ${1+$*}
+printf '<%s>\n' "$#" "$@"
+
+set "abc" "def ghi" "jkl"
+set $*
+printf '<%s>\n' "$#" "$@"
+
+printf '<%s>\n' $* ;
+printf '<%s>\n' ${q:-$*} 
+printf '<%s>\n' "${q:-$*}"
+
+IFS=:
+printf '<%s>\n' $* ;
+printf '<%s>\n' ${q:-$*} 
+printf '<%s>\n' "${q:-$*}"
+
+unset -v IFS
+printf '<%s>\n' $* $@
diff --git a/tests/dollar-star9.sub b/tests/dollar-star9.sub
new file mode 100644
index 0000000..d46de46
--- /dev/null
+++ b/tests/dollar-star9.sub
@@ -0,0 +1,59 @@
+#   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 .
+#
+set -- 1 2
+
+IFS=
+
+a=$* b=${*}
+c=${*/} d=${*#} e=${*%} f=${*:1}
+printf '<%s>' "$a" "$b" "$c" "$d" "$e" "$f"; echo
+
+unset a b c d e f
+: ${a=$*} ${b=${*}} ${c=${*/}}
+: ${d=${*#}} ${e=${*%}} ${f=${*:1}}
+printf '<%s>' "$a" "$b" "$c" "$d" "$e" "$f" ; echo
+
+unset f g
+f=${*,,} g=${*@Q}
+printf '<%s>' "$f" "$g" ; echo
+
+unset -v a b c d e f g
+unset var
+
+# resetting IFS here
+
+IFS=$' \t\n'
+
+printf '%s\n' "${*:1}"
+var=${*:1}; printf '%s\n' "$var"
+var="${*:1}"; printf '%s\n' "$var"
+
+unset var
+recho ${var-${*}}
+recho ${var-${*:1}}
+recho "${var-${*:1}}"
+recho ${var-"${*:1}"}
+
+unset var
+recho ${var=${*}}
+printf 'var=%s\n' "$var"
+unset var
+recho ${var=${*:1}}
+printf 'var=%s\n' "$var"
+
+a=${*:1}
+recho "$a"
+
+: ${b=${*:1}}
+recho "$b"
diff --git a/tests/dollar.right b/tests/dollar.right
index 13db8e2..10c5cca 100644
--- a/tests/dollar.right
+++ b/tests/dollar.right
@@ -95,6 +95,377 @@ ok 1
 ok 2
 ok 3
 ok 4
+var=${a[*]}   ... one:::two:three:::four
+var="${a[*]}" ... one:::two:three:::four
+var=$*        ... one:::two:three:::four
+var="$*"      ... one:::two:three:::four
+var=${a[@]}   ... one:::two three:::four
+var="${a[@]}" ... one:::two three:::four
+var=$@        ... one:::two three:::four
+var="$@"      ... one:::two three:::four
+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 at 1
+ok at 2
+ok star 1
+ok star 2
+   ,foo
+   ,foo
+   ,foo
+   ,foo
+ok at 1
+ok at 2
+ok at 3
+ok star 1
+ok star 2
+ok star 3
+ok at-star 1
+ok at-star 2
+a b c
+a|b|c
+a b c
+a|b|c
+ok at 1
+ok at 2
+ok at 3
+ok at 4
+ok at 5
+ok at 1
+ok at 2
+ok at 3
+ok at 4
+ok at 5
+ok at 1
+ok at 2
+ok at 3
+ok at 4
+ok at 5
+ok at 6
+ok at 7
+ok at 8
+ok at 9
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+<123 abc>   
+<123 abc>   
+
+a bc
+a b
+ab
+
+a b
+a b
+
+
+
+
+
+
+
+
+abcd
+d
+abcd
+d
+c
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+
+
+
+
+0
+0
+1
+1
+1
+0
+0
+0
+1
+0
+0
+0
+1
+after 1
+after 2
+after 3
+same as 1
+argv[1] = <>
+same as 2
+argv[1] = <>
+null fields
+argv[1] = <>
+argv[1] = <>
+null fields in rhs
+null string with unquoted $@
+argv[1] = <>
+null string with quoted $@
+argv[1] = <>
+assignment
+argv[1] = <>
+variable
+argv[1] = <>
+dollar-at
+argv[1] = <'a'>
+argv[2] = <'b'>
+argv[3] = <'c'>
+argv[1] = <'a'>
+argv[2] = <'b'>
+argv[3] = <'c'>
+argv[1] = <>
+argv[2] = 
+argv[3] = <>
+argv[4] = <>
+argv[5] = 
+argv[6] = <>
+argv[7] = <>
+argv[8] = 
+argv[1] = <'a'>
+argv[2] = <'b'>
+argv[3] = <'c'>
+argv[1] = <>
+argv[2] = 
+argv[3] = <>
+argv[4] = <>
+argv[5] = 
+argv[6] = <>
+argv[7] = <>
+argv[8] = 
+argv[1] = <'a'>
+argv[2] = <'b'>
+argv[3] = <'c'>
+argv[1] = <>
+argv[2] = 
+argv[1] = <'a'>
+argv[1] = <'a'>
+argv[2] = <'b'>
+argv[3] = <'c'>
+argv[1] = <'a'>
+argv[2] = <'b'>
+argv[3] = <'c'>
+|this|
+|is|
+|a|
+|test|
+
+|this|
+|is|
+|a|
+|test|
+
+|this|
+|is|
+|a|
+|test|
+
+|this|
+|this|
+
+|this is a test|
+|this is a test|
+|this|
+|is|
+|a|
+|test|
+|this|
+|is|
+|a|
+|test|
+
+a1=a b c a,b,c a b c a,b,c a b c a,b,c
+a2=a b c a,b,c a b c a,b,c a b c a,b,c
+a3=a b c a,b,c a b c a,b,c a b c a,b,c
+a4=a b c a,b,c a b c a,b,c a b c a,b,c
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <   >
+argv[1] = <   >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = <  >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = <>
+argv[1] = < X >
+argv[1] = <>
+argv[1] = < X >
+argv[1] = <>
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X>
+argv[2] = 
+argv[1] = < X>
+argv[2] = 
+argv[1] = < X>
+argv[2] = 
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < XY >
+argv[1] = < XY >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X Y >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = < X >
+argv[1] = <^?>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = 
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = 
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <''>
+argv[1] = <''>
+argv[1] = <''>
+argv[1] = <''>
+argv[1] = <''>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = 
+1:1
 xa|xb|xc
 xa|xb|xc
 a|b|c
@@ -166,3 +537,208 @@ ab
 cd
 ok 1
 ok 2
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[1] = 
+<1> <2> <3> <4> <5 1> 
+<1 1> <2> <3> <4> <5> 
+<11> <2> <3> <4> <51> 
+<1 1> <2> <3> <4> <5 1> 
+<11> <2> <3> <4> <51> 
+<1> <2> <3> <4> <51> 
+<11> <2> <3> <4> <5> 
+<1> <2> <3> <4> <51> 
+<11> <2> <3> <4> <5> 
+<1> <2> <3> <4> <5foo> 
+<1> <2> <3> <4> <51> 
+<1> <2> <3> <4> <5foo> 
+<1> <2> <3> <4> <51> 
+<11> <2> <3> <4> <5> 
+<1> <2> <3> <4> <51> 
+<11> <2> <3> <4> <5> 
+<1> <2> <3> <4> <5foo> 
+second set:
+<1 2> <3> <4> <5 1 2> 
+<1 2 1 2> <3> <4> <5> 
+<1 21 2> <3> <4> <51 2> 
+<1 2 1 2> <3> <4> <5 1 2> 
+<1> <21 2> <3> <4> <51> <2> 
+<1 2> <3> <4> <51> <2> 
+<1> <21 2> <3> <4> <5> 
+<1 2> <3> <4> <51 2> 
+<1 21 2> <3> <4> <5> 
+<1 2> <3> <4> <5foo> 
+<1> <2> <3> <4> <51> <2> 
+<1> <2> <3> <4> <5foo> 
+<1 2> <3> <4> <51 2> 
+<1 21 2> <3> <4> <5> 
+<1 2> <3> <4> <51 2> 
+<1 21 2> <3> <4> <5> 
+<1 2> <3> <4> <5foo> 
+third set:
+
+"${@:2}a3 a2" a$1    #works as long as $1 and 3 are swapped
+set y za3 a2 ax
+0
+declare -a a=([0]="y" [1]="za3 a2" [2]="ax")
+
+"${@:2}b$1 b2" b3    #fails!  why?
+set y zbx b2 b3
+0
+declare -a b=([0]="y" [1]="zbx b2" [2]="b3")
+
+${@:2}c$1 c2 c3     #works as long as quoting omitted
+set y zcx c2 c3
+0
+declare -a c=([0]="y" [1]="zcx" [2]="c2" [3]="c3")
+argv[1] = <>
+argv[2] = 
+argv[1] = <>
+argv[2] = 
+1
+argv[1] = <>
+argv[2] = <>
+argv[3] = 
+argv[1] = <>
+argv[2] = 
+argv[1] = <>
+argv[2] = <>
+argv[3] = 
+argv[1] = <>
+argv[2] = 
+argv[1] = <>
+argv[2] = 
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+     
+after 1: IFS -
+argv[1] = 
+      
+after 2: IFS -
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+<3>
+
+
+
+<3>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+argv[1] = <1>
+argv[2] = <>
+argv[1] = <2>
+argv[2] = <>
+argv[1] = <3>
+argv[2] = <>
+argv[1] = <4>
+argv[2] = <>
+-----
+argv[1] = <1>
+argv[2] = <>
+argv[1] = <2>
+argv[2] = <>
+argv[1] = <3>
+argv[1] = <4>
+argv[2] = <>
+------
+argv[1] = <1>
+argv[2] = <>
+argv[1] = <2>
+argv[2] = <>
+argv[1] = <3>
+argv[2] = <>
+argv[1] = <4>
+argv[2] = <>
+argv[1] = <5>
+argv[2] = <>
+argv[1] = <6>
+argv[2] = <>
+-----
+argv[1] = <1>
+argv[2] = <>
+argv[1] = <2>
+argv[2] = <>
+argv[1] = <3>
+argv[2] = <>
+argv[1] = <4>
+argv[2] = <>
+argv[1] = <5>
+argv[2] = <>
+argv[1] = <6>
+argv[2] = <>
+-----
+argv[1] = <1>
+argv[2] = <>
+argv[1] = <2>
+argv[2] = <>
+<12><12><12><12><12><12>
+<12><12><12><12><12><12>
+<12><'1''2'>
+1 2
+1 2
+1 2
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1 2>
+argv[1] = <1 2>
+argv[1] = <1>
+argv[2] = <2>
+var=1 2
+argv[1] = <1>
+argv[2] = <2>
+var=1 2
+argv[1] = <1 2>
+argv[1] = <1 2>
diff --git a/tests/dstack.right b/tests/dstack.right
index 8f27d28..8f9d38c 100644
--- a/tests/dstack.right
+++ b/tests/dstack.right
@@ -1,13 +1,13 @@
-./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
+./dstack.tests: line 19: pushd: /tmp/xxx-notthere: No such file or directory
+./dstack.tests: line 22: pushd: no other directory
+./dstack.tests: line 23: popd: directory stack empty
+./dstack.tests: line 26: pushd: -m: invalid number
 pushd: usage: pushd [-n] [+N | -N | dir]
-./dstack.tests: line 14: popd: -m: invalid number
+./dstack.tests: line 27: popd: -m: invalid number
 popd: usage: popd [-n] [+N | -N]
-./dstack.tests: line 15: dirs: -m: invalid number
+./dstack.tests: line 28: dirs: -m: invalid number
 dirs: usage: dirs [-clpv] [+N] [-N]
-./dstack.tests: line 16: dirs: 7: invalid option
+./dstack.tests: line 29: dirs: 7: invalid option
 dirs: usage: dirs [-clpv] [+N] [-N]
 /
 ok
@@ -31,12 +31,12 @@ ok
 /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
+./dstack.tests: line 71: dirs: 9: directory stack index out of range
+./dstack.tests: line 71: dirs: 9: directory stack index out of range
+./dstack.tests: line 72: pushd: +9: directory stack index out of range
+./dstack.tests: line 72: pushd: -9: directory stack index out of range
+./dstack.tests: line 73: popd: +9: directory stack index out of range
+./dstack.tests: line 73: popd: -9: directory stack index out of range
 /tmp /etc /
 /tmp /etc /
 /tmp /etc /
diff --git a/tests/dstack.tests b/tests/dstack.tests
index 49b97d3..116e935 100644
--- a/tests/dstack.tests
+++ b/tests/dstack.tests
@@ -1,8 +1,21 @@
+#   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 .
+#
 export LC_ALL=C
 export LANG=C
 
 dirs -c
-# error -- nonexistant directory
+# error -- non-existent directory
 pushd /tmp/xxx-notthere
 
 # errors -- empty stack
diff --git a/tests/dstack2.tests b/tests/dstack2.tests
index d902bff..0873319 100644
--- a/tests/dstack2.tests
+++ b/tests/dstack2.tests
@@ -1,3 +1,17 @@
+#   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 .
+#
+wdir=$PWD
 cd /
 
 echo expect '~1'
@@ -31,3 +45,5 @@ dirs -v -1
 echo these lines should be the same
 dirs -0
 echo ~-0 ${DIRSTACK[NDIRS]}
+
+cd "$wdir"
diff --git a/tests/dynvar.right b/tests/dynvar.right
new file mode 100644
index 0000000..e1344c6
--- /dev/null
+++ b/tests/dynvar.right
@@ -0,0 +1,7 @@
+BASHPID ok
+BASH_ARGV0 ok
+BASH_ARGV0 ok
+SECONDS ok
+EPOCHSECONDS ok
+EPOCHREALTIME ok
+echo $BASH_COMMAND
diff --git a/tests/dynvar.tests b/tests/dynvar.tests
new file mode 100644
index 0000000..ddf69ed
--- /dev/null
+++ b/tests/dynvar.tests
@@ -0,0 +1,102 @@
+#   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 .
+#
+# specvar -- test some of the dynamic variables
+
+# BASHPID
+pid=$$
+bpid=$BASHPID
+subpid=$( (echo $BASHPID) )
+
+if [ "$bpid" -ne "$subpid" ]; then echo BASHPID ok; fi
+
+# BASH_ARGV0
+
+BASH_ARGV0=hello
+case $0 in
+hello)	echo BASH_ARGV0 ok ;;
+*)	echo "BASH_ARGV0 mismatch: $BASH_ARGV0 ($0)" >&2 ;;
+esac
+
+setarg0()
+{
+	BASH_ARGV0="$1"
+}
+
+setarg0 arg0
+case $0 in
+arg0)	echo BASH_ARGV0 ok ;;
+*)	echo "BASH_ARGV0 mismatch: $BASH_ARGV0 ($0)" >&2 ;;
+esac
+
+# SECONDS
+before=$SECONDS
+sleep 2
+after=$SECONDS
+
+if (( $after > $before )); then echo SECONDS ok; fi
+unset before after
+
+# EPOCHSECONDS
+
+# not exact, but should work
+# date +%s should be portable enough now
+# then try gawk, perl, python in that order
+now1=$(date +%s 2>/dev/null) D=date
+[ -z "$now1" ] &&
+{
+	now1=$(gawk 'BEGIN { print systime(); }' 2>/dev/null) D=gawk
+	[ -z "$now1" ] && now1=$(perl -e 'print time' 2>/dev/null) D=perl
+	[ -z "$now1" ] && now1=$(python -c 'import time; ts = int(time.time()); print(ts)' 2>/dev/null) D=python
+}
+now2=$EPOCHSECONDS
+
+# use a window of +-1 second
+offset=1
+if [[ -z $now1 ]]; then
+	echo "cannot get current time using date/gawk/perl/python" >&2
+elif (( $now1 - $offset <= $now2 && $now2 <= $now1 + $offset )); then
+	echo EPOCHSECONDS ok
+else
+	echo "current time via $D and EPOCHSECONDS possible mismatch|$now1|$now2|offset=$offset" >&2
+fi
+unset now1 now2 D
+
+LC_ALL=C		# force decimal point to `.'
+now1=$EPOCHREALTIME
+now2=$EPOCHREALTIME
+sec1=${now1%%.*}
+sec2=${now2%%.*}
+
+msec1=${now1##*.}
+msec2=${now2##*.}
+# cut off leading zeros
+shopt -s extglob
+msec1=${msec1##*(0)}
+msec2=${msec2##*(0)}
+
+dsec=$(( $sec2 - $sec1 ))
+dmsec=$(( $msec2 - $msec1 ))
+if (( $dmsec < 0 )); then
+	dmsec=$(( dmsec + 1000000 ))
+	dsec=$(( desc - 1 ))
+fi
+
+# not a real test, but ok for a start
+if (( $dmsec < 1000000 )); then echo EPOCHREALTIME ok; fi
+
+${THIS_SH} -c 'echo $BASH_COMMAND'
+
+# FUNCNAME tested in func.tests
+# RANDOM tested in varenv.sh
+# LINENO tested in dbg-support
diff --git a/tests/errors.right b/tests/errors.right
index ae7bf29..0bd88ef 100644
--- a/tests/errors.right
+++ b/tests/errors.right
@@ -1,101 +1,208 @@
-./errors.tests: line 17: alias: -x: invalid option
+./errors.tests: line 30: alias: -x: invalid option
 alias: usage: alias [-p] [name[=value] ... ]
-./errors.tests: line 18: unalias: -x: invalid option
+./errors.tests: line 31: 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
+./errors.tests: line 32: alias: hoowah: not found
+./errors.tests: line 33: unalias: hoowah: not found
+./errors.tests: line 36: `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
+./errors.tests: line 49: func: readonly function
+./errors.tests: line 52: unset: -x: invalid option
+unset: usage: unset [-f] [-v] [-n] [name ...]
+./errors.tests: line 55: unset: func: cannot unset: readonly function
+./errors.tests: line 58: declare: func: readonly function
+./errors.tests: line 62: declare: -a: invalid option
+./errors.tests: line 63: declare: -i: invalid option
+./errors.tests: line 67: unset: XPATH: cannot unset: readonly variable
+./errors.tests: line 73: unset: cannot simultaneously unset a function and a variable
+./errors.tests: line 76: declare: -z: invalid option
+declare: usage: declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]
+./errors.tests: line 78: declare: `-z': not a valid identifier
+./errors.tests: line 79: declare: `/bin/sh': not a valid identifier
+./errors.tests: line 83: declare: cannot use `-f' to make functions
+./errors.tests: line 86: exec: -i: invalid option
+exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...]
+./errors.tests: line 90: export: XPATH: not a function
+./errors.tests: line 93: break: only meaningful in a `for', `while', or `until' loop
+./errors.tests: line 94: continue: only meaningful in a `for', `while', or `until' loop
+./errors.tests: line 97: shift: label: numeric argument required
+./errors.tests: line 102: shift: too many arguments
+./errors.tests: line 108: let: expression expected
+./errors.tests: line 111: local: can only be used in a function
+./errors.tests: line 114: logout: not login shell: use `exit'
+./errors.tests: line 117: hash: notthere: not found
+./errors.tests: line 120: 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
+./errors.tests: line 124: hash: hashing disabled
+./errors.tests: line 127: export: `AA[4]': not a valid identifier
+./errors.tests: line 128: readonly: `AA[4]': not a valid identifier
+./errors.tests: line 131: unset: [-2]: bad array subscript
+./errors.tests: line 135: AA: readonly variable
+./errors.tests: line 139: AA: readonly variable
+./errors.tests: line 147: shift: 5: shift count out of range
+./errors.tests: line 148: shift: -2: shift count out of range
+./errors.tests: line 151: shopt: no_such_option: invalid shell option name
+./errors.tests: line 152: shopt: no_such_option: invalid shell option name
+./errors.tests: line 155: umask: 09: octal number out of range
+./errors.tests: line 156: umask: `:': invalid symbolic mode character
+./errors.tests: line 157: umask: `:': invalid symbolic mode operator
+./errors.tests: line 160: 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
+./errors.tests: line 164: umask: `u': invalid symbolic mode character
+./errors.tests: line 173: VAR: readonly variable
+./errors.tests: line 176: declare: VAR: readonly variable
+./errors.tests: line 177: declare: VAR: readonly variable
+./errors.tests: line 179: declare: unset: not found
+./errors.tests: line 182: VAR: readonly variable
+comsub: -c: line 1: syntax error near unexpected token `)'
+comsub: -c: line 1: `: $( for z in 1 2 3; do )'
+comsub: -c: line 1: syntax error near unexpected token `done'
+comsub: -c: line 1: `: $( for z in 1 2 3; done )'
+./errors.tests: line 189: cd: HOME not set
+./errors.tests: line 190: cd: /tmp/xyz.bash: No such file or directory
+./errors.tests: line 192: cd: OLDPWD not set
+./errors.tests: line 193: cd: /bin/sh: Not a directory
+./errors.tests: line 195: cd: /tmp/cd-notthere: No such file or directory
+./errors.tests: line 198: .: filename argument required
 .: usage: . filename [arguments]
-./errors.tests: line 181: source: filename argument required
+./errors.tests: line 199: source: filename argument required
 source: usage: source filename [arguments]
-./errors.tests: line 184: .: -i: invalid option
+./errors.tests: line 202: .: -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
+./errors.tests: line 205: set: -q: invalid option
+set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
+./errors.tests: line 208: enable: sh: not a shell builtin
+./errors.tests: line 208: enable: bash: not a shell builtin
+./errors.tests: line 211: shopt: cannot set and unset shell options simultaneously
+./errors.tests: line 214: read: var: invalid timeout specification
+./errors.tests: line 217: read: `/bin/sh': not a valid identifier
+./errors.tests: line 220: VAR: readonly variable
+./errors.tests: line 223: readonly: -x: invalid option
+readonly: usage: readonly [-aAf] [name[=value] ...] or readonly -p
+./errors.tests: line 226: eval: -i: invalid option
 eval: usage: eval [arg ...]
-./errors.tests: line 209: command: -i: invalid option
+./errors.tests: line 227: 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
+./errors.tests: line 230: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 231: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 234: trap: NOSIG: invalid signal specification
+./errors.tests: line 237: 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
+./errors.tests: line 243: return: can only `return' from a function or sourced script
+./errors.tests: line 247: break: 0: loop count out of range
+./errors.tests: line 251: continue: 0: loop count out of range
+./errors.tests: line 256: builtin: bash: not a shell builtin
+./errors.tests: line 260: bg: no job control
+./errors.tests: line 261: fg: no job control
+./errors.tests: line 264: kill: -s: option requires an argument
+./errors.tests: line 266: kill: S: invalid signal specification
+./errors.tests: line 268: 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
+./errors.tests: line 273: set: trackall: invalid option name
+./errors.tests: line 277: xx: readonly variable
+1
+./errors1.sub: line 14: .: -i: invalid option
+.: usage: . filename [arguments]
+./errors1.sub: line 22: shift: -4: shift count out of range
+./errors1.sub: line 27: break: -1: loop count out of range
+after f
+./errors2.sub: line 3: ${$NO_SUCH_VAR}: bad substitution
+1
+./errors3.sub: line 5: no_such_file: No such file or directory
+TEST
+./errors3.sub: line 7: no_such_file: No such file or directory
+1
+2
+./errors4.sub: line 20: var: readonly variable
+after readonly assignment
+./errors4.sub: line 26: break: x: numeric argument required
+1
+2
+./errors4.sub: line 20: var: readonly variable
+./errors5.sub: line 6: array: unbound variable
+./errors5.sub: line 7: array: unbound variable
+./errors5.sub: line 8: array[7]: unbound variable
+./errors5.sub: line 11: 7: unbound variable
+./errors5.sub: line 12: 7: unbound variable
+after 1: 1
+after 2: 1
+after 3: 1
+4
+array after 1: 0
+
+array after 2: 0
+./errors6.sub: line 1: uvar: parameter not set
+./errors6.sub: line 1: uvar: parameter null or not set
+
+./errors6.sub: line 1: uvar: parameter null or not set
+./errors6.sub: line 38: ${-3:-${-3}}: bad substitution
+./errors6.sub: line 39: ${-3}: bad substitution
+./errors6.sub: line 40: -3: invalid variable name
+after indir: 1
+./errors6.sub: line 43: -3: invalid variable name
+
+unset
+./errors6.sub: line 50: var: invalid indirect expansion
+./errors6.sub: line 51: var: invalid indirect expansion
+./errors6.sub: line 54: invalid-ident: invalid variable name
+./errors6.sub: line 55: invalid-ident: invalid variable name
+./errors6.sub: line 56: invalid-ident: invalid variable name
+4
+array after 1: 0
+
+array after 2: 0
+./errors6.sub: line 1: uvar: parameter not set
+./errors6.sub: line 1: uvar: parameter null or not set
+
+./errors6.sub: line 1: uvar: parameter null or not set
+./errors6.sub: line 38: ${-3:-${-3}}: bad substitution
+./errors6.sub: line 39: ${-3}: bad substitution
+./errors6.sub: line 40: -3: invalid variable name
+after indir: 1
+./errors6.sub: line 43: -3: invalid variable name
+
+unset
+./errors6.sub: line 50: var: invalid indirect expansion
+./errors6.sub: line 51: var: invalid indirect expansion
+./errors6.sub: line 54: invalid-ident: invalid variable name
+./errors6.sub: line 55: invalid-ident: invalid variable name
+./errors6.sub: line 56: invalid-ident: invalid variable name
+./errors7.sub: line 21: x: readonly variable
+./errors7.sub: line 21: notthere: command not found
+after no such command: 127
+./errors7.sub: line 23: x: readonly variable
+echo builtin
+after non-special builtin: 0
+./errors7.sub: line 25: x: readonly variable
+after special builtin: 0
+./errors7.sub: line 27: x: readonly variable
+./errors7.sub: line 29: x: readonly variable
+./errors7.sub: line 21: x: readonly variable
+after no such command: 1
+./errors7.sub: line 23: x: readonly variable
+after non-special builtin: 1
+./errors7.sub: line 25: x: readonly variable
+./errors7.sub: line 27: x: readonly variable
+./errors7.sub: line 29: x: readonly variable
+./errors8.sub: eval: line 7: syntax error: unexpected end of file
+ok 1
+./errors8.sub: line 8: v: readonly variable
+ok 2
+./errors8.sub: line 9: v: readonly variable
+ok 3
+./errors8.sub: line 11: shift: 12: shift count out of range
+ok 4
+./errors8.sub: line 13: return: can only `return' from a function or sourced script
+ok 5
+./errors8.sub: line 14: set: notanoption: invalid option name
+ok 6
+DEBUG
+./errors9.sub: line 6: [[: ++: syntax error: operand expected (error token is "+")
+DEBUG
+./errors9.sub: line 8: ((: -- : syntax error: operand expected (error token is "- ")
+DEBUG
+./errors9.sub: line 10: ((: -- : syntax error: operand expected (error token is "- ")
+bash: line 1: return: can only `return' from a function or sourced script
+after return
+bash: line 1: return: can only `return' from a function or sourced script
+./errors.tests: line 305: `!!': not a valid identifier
diff --git a/tests/errors.tests b/tests/errors.tests
index 4ead467..0880bb5 100644
--- a/tests/errors.tests
+++ b/tests/errors.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # These should all be safe
 LC_ALL=C
 LC_CTYPE=C
@@ -44,6 +57,11 @@ unset -f func
 declare -fr func
 declare -f +r func
 
+# cannot use declare -f in combination with other attributes
+a() { echo a; }
+declare -f -a a
+declare -f -i b c
+
 XPATH=$PATH
 declare -r XPATH
 unset -v XPATH
@@ -95,7 +113,7 @@ local
 # logout of a non-login shell is an error
 logout
 
-# try to hash a non-existant command
+# try to hash a non-existent command
 hash notthere
 
 # bad option to hash, although it may mean `verbose' at some future point
@@ -163,9 +181,9 @@ 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 )
+# parser errors; caught early so we have to run them in subshells
+${THIS_SH} -c ': $( for z in 1 2 3; do )' comsub
+${THIS_SH} -c ': $( for z in 1 2 3; done )' comsub
 
 # various `cd' errors
 ( unset HOME ; cd )
@@ -254,6 +272,31 @@ kill -INT
 # bad shell option names
 set -o trackall		# bash is not ksh
 
+# problem with versions through bash-4.2
+readonly xx=5
+echo $((xx=5))
+echo $?
+
+${THIS_SH} ./errors1.sub
+${THIS_SH} ./errors2.sub
+${THIS_SH} ./errors3.sub
+${THIS_SH} ./errors4.sub
+${THIS_SH} -o posix ./errors4.sub
+
+${THIS_SH} ./errors5.sub
+
+${THIS_SH} ./errors6.sub
+THIS_SH="${THIS_SH} -o posix" ${THIS_SH} ./errors6.sub
+
+${THIS_SH} ./errors7.sub
+${THIS_SH} -o posix ./errors7.sub
+
+${THIS_SH} ./errors8.sub
+${THIS_SH} ./errors9.sub
+
+${THIS_SH} -c 'return ; echo after return' bash
+${THIS_SH} -o posix -c 'return ; echo after return' bash
+
 # 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
diff --git a/tests/errors1.sub b/tests/errors1.sub
new file mode 100644
index 0000000..52a9e34
--- /dev/null
+++ b/tests/errors1.sub
@@ -0,0 +1,40 @@
+#   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 .
+#
+. -i /dev/tty
+
+f()
+{
+	return -1
+}
+
+set -- a b c
+shift -4
+
+f
+
+for f in 1 2 3; do
+	break -1
+done
+
+
+f()
+{
+	return -25
+}
+
+f
+echo after f
+exit -25
+
+exit -56
diff --git a/tests/errors2.sub b/tests/errors2.sub
new file mode 100644
index 0000000..79ef333
--- /dev/null
+++ b/tests/errors2.sub
@@ -0,0 +1,3 @@
+set -e
+trap 'echo $?' EXIT
+echo ${$NO_SUCH_VAR}    # Bad substitution expected here
diff --git a/tests/errors3.sub b/tests/errors3.sub
new file mode 100644
index 0000000..b2ae3d7
--- /dev/null
+++ b/tests/errors3.sub
@@ -0,0 +1,7 @@
+# redirection errors with special builtins should exit the shell when in
+# Posix mode, not otherwise; being on the LHS of || or && should not make
+# a difference
+
+exec 9.
+#
+# test effect of assigning to readonly vars on loops and non-interactive shells
+# fatal error when in posix mode
+var=foo
+readonly var
+for num in 1 2 3 4 5; do
+	if [ $num -eq 3 ]; then
+		var=bar
+	fi
+	echo $num
+done 
+echo after readonly assignment
+
+# non-numeric arguments to break are fatal errors for all non-interactive shells
+for f in 1 2 3 4 5
+do
+	break x
+done
+echo after loop
diff --git a/tests/errors5.sub b/tests/errors5.sub
new file mode 100644
index 0000000..112b2a1
--- /dev/null
+++ b/tests/errors5.sub
@@ -0,0 +1,12 @@
+array[1]=one
+array[2]=two
+
+set -u
+
+( echo ${#array} )
+( echo ${array} )
+( echo ${array[7]} )
+
+set -- 1 2 3
+( echo ${#7} )
+( echo ${7} )
diff --git a/tests/errors6.sub b/tests/errors6.sub
new file mode 100644
index 0000000..cac2c55
--- /dev/null
+++ b/tests/errors6.sub
@@ -0,0 +1,56 @@
+#   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 .
+#
+# problems with non-fatal expansion errors through bash-4.3
+: ${THIS_SH:=./bash}
+
+${THIS_SH} -c 'echo ${x!y} second
+echo after 1: $?' 2>/dev/null
+
+${THIS_SH} -c 'echo ${#+} second
+echo after 2: $?' 2>/dev/null
+
+${THIS_SH} -c 'echo ${#foo%} second
+echo after 3: $?' 2>/dev/null
+
+${THIS_SH} -c 'b[0]=4 ; echo ${b[   ]}
+echo array after 1: $?'  2>/dev/null
+${THIS_SH} -c 'typeset -A v ; v["0"]=one ; echo ${v[   ]}
+echo array after 2: $?'  2>/dev/null
+
+${THIS_SH} -c 'echo ${uvar?}' ./errors6.sub
+${THIS_SH} -c 'echo ${uvar:?}' ./errors6.sub
+export uvar=
+${THIS_SH} -c 'echo ${uvar?}' ./errors6.sub
+${THIS_SH} -c 'echo ${uvar:?}' ./errors6.sub
+unset uvar
+
+echo "${-3:-${-3}}"
+echo ${-3}
+x=-3; echo ${!x}
+echo after indir: $?
+
+function ivar() { echo -n "${!1:-${1}}"; }
+ivar -3
+
+foo=bar
+echo ${!foo}
+echo ${!foo:-unset}
+
+echo ${!var:-unset}
+echo ${!var+unset}
+
+foo=invalid-ident
+echo ${!foo}
+echo ${!foo:-unset}
+echo ${!foo+unset}
diff --git a/tests/errors7.sub b/tests/errors7.sub
new file mode 100644
index 0000000..544e3e4
--- /dev/null
+++ b/tests/errors7.sub
@@ -0,0 +1,30 @@
+#   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 .
+#
+: ${THIS_SH:=./bash}
+readonly x=4
+
+# in posix mode, these are all variable assignment errors, so strict conformance
+# implies that we exit after any of them. ksh93 doesn't do that. we more-or-less
+# emulate the ksh93 behavior
+
+x=8 notthere
+echo after no such command: $?
+x=8 echo echo builtin
+echo after non-special builtin: $?
+( x=8 : nosuchdir
+echo after special builtin: $? )
+( x=8 $nocmd 
+echo after assignment error: $? )
+( x=8
+echo after assignment statement error: $? )
diff --git a/tests/errors8.sub b/tests/errors8.sub
new file mode 100644
index 0000000..b65e1ab
--- /dev/null
+++ b/tests/errors8.sub
@@ -0,0 +1,14 @@
+# the start of a set of tests for command keeping special builtins from
+# exiting the shell on failure
+set -o posix
+readonly v
+
+command eval '( ' || echo ok 1
+
+command export v=foo || echo ok 2
+command readonly v=foo || echo ok 3
+
+command shift 12 || echo ok 4
+
+command return 16 || echo ok 5
+command set -o notanoption || echo ok 6
diff --git a/tests/errors9.sub b/tests/errors9.sub
new file mode 100644
index 0000000..3a26704
--- /dev/null
+++ b/tests/errors9.sub
@@ -0,0 +1,14 @@
+trap 'echo DEBUG' DEBUG
+
+# make sure that the right command name appears in the error messages and
+# that the DEBUG trap doesn't overwrite it
+
+[[ ++ -gt 3 ]]
+
+(( -- ))
+
+for (( -- ; ++; -- ))
+do
+	echo bogus
+done
+
diff --git a/tests/exec.right b/tests/exec.right
index 86a099c..ef02fbb 100644
--- a/tests/exec.right
+++ b/tests/exec.right
@@ -4,29 +4,38 @@ aa bb cc dd ee
 after exec1.sub with args: 0
 
 after exec1.sub without args: 0
-./execscript: line 20: notthere: command not found
+after exec1.sub: one two three
+./execscript: line 21: 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
+./execscript: line 40: /: Is a directory
 126
-/: /: is a directory
+/: /: Is a directory
 126
-./execscript: line 46: .: /: is a directory
+./execscript: line 47: .: /: 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
+trap -- 'echo EXIT' EXIT
+trap -- '' SIGTERM
+trap -- 'echo USR1' SIGUSR1
+USR1
+./exec3.sub: line 27: /tmp/bash-notthere: No such file or directory
+./exec3.sub: after failed exec: 127
+trap -- 'echo EXIT' EXIT
+trap -- '' SIGTERM
+trap -- 'echo USR1' SIGUSR1
+USR1
+EXIT
+./execscript: line 71: notthere: No such file or directory
 127
-./execscript: line 73: notthere: No such file or directory
+./execscript: line 74: notthere: No such file or directory
 127
-./execscript: line 76: notthere: command not found
+./execscript: line 77: notthere: command not found
 127
 this is sh
 this is sh
@@ -52,4 +61,112 @@ this is ohio-state
 1
 testb
 expand_aliases 	on
+1
+1
+1
+1
+0
+0
+0
+0
+/usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:.
+cannot find cat in $TMPDIR
+cannot find cat with empty $PATH
+PATH = /usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:.
+cannot find cat in $TMPDIR with hash
+cannot find cat with empty $PATH with hash
+PATH = /usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:.
+trap -- 'echo foo $BASH_SUBSHELL' EXIT
+trap -- 'echo USR1 $BASHPID' SIGUSR1
+between
+trap -- 'echo foo $BASH_SUBSHELL' EXIT
+trap -- 'echo USR1 $BASHPID' SIGUSR1
+between 2
+trap -- 'echo foo $BASH_SUBSHELL' EXIT
+trap -- 'echo USR1 $BASHPID' SIGUSR1
+in subshell: 1
+in subshell pipeline: 1
+group pipeline: 1
+EXIT-group.1
+foo 0
 after
+exit code: 1
+exit code: 1
+exit code: 1
+exit code: 1
+exit code: 1
+exit code: 1
+a
+b
+c
+A
+B
+c
+d
+c
+d
+e
+x1
+x1a
+x2
+x2a
+x2b
+x3
+x3a
+x3b
+WORKS
+done
+WORKS
+WORKS
+a
+b
+c
+d
+a
+b
+c
+d
+e
+A
+B
+c
+d
+c
+d
+e
+x
+y
+z
+WORKS
+w
+x
+y
+z
+=====
+WORKS
+done
+WORKS
+a
+b
+c
+d
+a
+b
+c
+d
+e
+A
+B
+c
+d
+c
+d
+e
+x
+y
+z
+WORKS
+w
+x
+y
+z
diff --git a/tests/exec10.sub b/tests/exec10.sub
new file mode 100644
index 0000000..db6a671
--- /dev/null
+++ b/tests/exec10.sub
@@ -0,0 +1,47 @@
+#   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 .
+#
+# post bash-4.3 changes to how command -p works (avoid modifying $PATH)
+
+: ${TMPDIR=/tmp}
+xpath=/usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:.
+
+# set a value of PATH we can test for; versions of bash up to and including
+# bash-4.3 would set $PATH while running command -p
+PATH=$xpath
+export PATH
+command -p sh -c 'echo $PATH'
+
+PATH=${TMPDIR}
+command -pv cat	>/dev/null || echo "cannot find cat using standard path"
+command -p cat < /dev/null
+#hash
+
+PATH=$xpath
+command -pv cat >/dev/null || echo "cannot find cat using xpath"
+PATH=$TMPDIR command -pv cat >/dev/null || echo "cannot find cat using standard path with PATH=\$TMPDIR"
+PATH= command -pv cat >/dev/null || echo "cannot find cat using standard path with empty \$PATH"
+PATH=$TMPDIR command -v cat >/dev/null || echo "cannot find cat in \$TMPDIR"
+PATH= command -v cat >/dev/null || echo "cannot find cat with empty \$PATH"
+
+echo PATH = $PATH
+hash cat
+
+PATH=$xpath
+
+PATH=$TMPDIR command -pv cat >/dev/null || echo "cannot find cat using stdpath with hash"
+PATH= command -pv cat >/dev/null || echo "cannot find cat using stdpath with hash"
+PATH=$TMPDIR command -v cat >/dev/null || echo "cannot find cat in \$TMPDIR with hash"
+PATH= command -v cat >/dev/null || echo "cannot find cat with empty \$PATH with hash"
+
+echo PATH = $PATH
diff --git a/tests/exec11.sub b/tests/exec11.sub
new file mode 100644
index 0000000..9631c67
--- /dev/null
+++ b/tests/exec11.sub
@@ -0,0 +1,14 @@
+trap 'echo USR1 $BASHPID' USR1
+trap 'echo foo $BASH_SUBSHELL' 0
+
+trap | cat
+echo between
+( trap )
+echo between 2
+{ trap; } | cat
+
+( echo in subshell: $BASH_SUBSHELL )
+( echo in subshell pipeline: $BASH_SUBSHELL ) | cat
+
+{ echo group pipeline: $BASH_SUBSHELL;
+  trap 'echo EXIT-group.$BASH_SUBSHELL' EXIT; } | cat
diff --git a/tests/exec12.sub b/tests/exec12.sub
new file mode 100644
index 0000000..0d7c8b8
--- /dev/null
+++ b/tests/exec12.sub
@@ -0,0 +1,32 @@
+#   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 .
+#
+: ${TMPDIR:=/var/tmp}
+TMPFILE=$TMPDIR/exitcode
+trap 'rm -f $TMPFILE' 0
+
+rm -f $TMPFILE
+set -e
+# we normalize the exit code to accommodate false returning 255 on Solaris
+exit_handler() { echo "exit code: $(( $? != 0 ))" ; touch $TMPFILE; }
+false() { ! :; }
+notfound() { nosuchcommand ; }
+syntaxerror() { !:; }
+
+main()
+{(
+    trap exit_handler 0
+    "$@" >> /dev/null 2>&1
+)}
+main "$@"
+echo "after main: should not get here"
diff --git a/tests/exec13.sub b/tests/exec13.sub
new file mode 100644
index 0000000..76e1324
--- /dev/null
+++ b/tests/exec13.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+echo x1 | ( cat & wait )
+echo x1a | ( :& cat & wait )
+
+echo x2 | for f in 1; do
+	cat & wait
+done
+echo x2a | if true; then cat & wait; fi
+echo x2b | for (( i=0; i < 1; i++ )) ; do cat & wait; done
+
+echo x3 | { cat & wait; }
+
+lambda() { cat & wait; }
+echo x3a | lambda
+
+: ${TMPDIR:=/tmp}
+SRCF=$TMPDIR/bash-src-$$
+cat > $SRCF << \EOF
+cat & wait
+EOF
+echo x3b | . $SRCF
+rm -f $SRCF
diff --git a/tests/exec14.sub b/tests/exec14.sub
new file mode 100644
index 0000000..eddd33f
--- /dev/null
+++ b/tests/exec14.sub
@@ -0,0 +1,64 @@
+#   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 .
+#
+
+# test that optimizing command lists doesn't inappropriately short-cut commands
+
+# also includes optimizing last command in a list separated by `;'
+
+if [ -x /bin/echo ] ; then
+	binecho=/bin/echo
+elif [ -x /usr/bin/echo ]; then
+	binecho=/usr/bin/echo
+else
+	enable -n echo
+	binecho=echo
+fi
+
+export binecho
+
+: ${THIS_SH:=./bash} ${TMPDIR:=/var/tmp}
+
+${THIS_SH} -c 'trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$' 
+${THIS_SH} -c 'trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ ; $binecho done' 
+
+( trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ )
+
+${THIS_SH} -c 'echo a && { $binecho b && $binecho c ; } && echo d'
+${THIS_SH} -c 'echo a && { $binecho b && $binecho c ; } && echo d ; $binecho e'
+
+${THIS_SH} -c 'echo A && $binecho B'
+${THIS_SH} -c '$binecho c && echo d'
+
+$THIS_SH -c '$binecho c && $binecho d && echo e'
+
+$THIS_SH -c 'trap "echo WORKS" EXIT ; $binecho x ; $binecho y ; $binecho z'
+
+${THIS_SH} -c 'echo w ; { echo x ; $binecho y; }; $binecho z'
+
+echo =====
+
+( trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ )
+( trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ ; $binecho done )
+
+( echo a && { $binecho b && $binecho c ; } && echo d )
+( echo a && { $binecho b && $binecho c ; } && echo d ; $binecho e )
+
+( echo A && $binecho B )
+( $binecho c && echo d )
+
+( $binecho c && $binecho d && echo e )
+
+( trap "echo WORKS" EXIT ; $binecho x ; $binecho y ; $binecho z )
+
+( echo w ; { echo x ; $binecho y; }; $binecho z )
diff --git a/tests/exec3.sub b/tests/exec3.sub
index 4f2f8e2..81b53b7 100644
--- a/tests/exec3.sub
+++ b/tests/exec3.sub
@@ -1,6 +1,37 @@
+#   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 .
+#
+# test the behavior of `execfail' not exiting an interactive shell
+# added tests for changes in 10/2021 for preserving the traps across a failed
+# exec
+
 shopt -s execfail
 
+trap 'echo EXIT' EXIT 
+trap 'echo USR1' USR1
+trap '' TERM
+trap
+
+kill -s USR1 $$		# should run the trap
+
 exec /tmp/bash-notthere
+
 # make sure we're still around
-echo $?
+echo $0: after failed exec: $?
+
+trap
+kill -s USR1 $$		# should run the trap
+kill -s TERM $$		# should still be ignored
 
+# this should run the exit trap
+exit 0
diff --git a/tests/exec6.sub b/tests/exec6.sub
index 50d0e70..dd53e74 100644
--- a/tests/exec6.sub
+++ b/tests/exec6.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # builtins with exit status inverted
 
 ( true )
diff --git a/tests/exec7.sub b/tests/exec7.sub
index ea2fd06..0c8c7ca 100644
--- a/tests/exec7.sub
+++ b/tests/exec7.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # make sure that bash really checks the right things when deciding what
 # constitutes an executable file
 
@@ -18,3 +31,6 @@ chmod 755 testb/foo
 PATH=$TMPDIR/testa:$TMPDIR/testb $THIS_SH -c foo
 
 rm -rf testa testb
+
+cd $OLDPWD
+exit 0
diff --git a/tests/exec9.sub b/tests/exec9.sub
new file mode 100644
index 0000000..a47dfd0
--- /dev/null
+++ b/tests/exec9.sub
@@ -0,0 +1,33 @@
+#   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 .
+#
+# make sure commands before the last one in the pipeline can't change $?
+false
+false | echo $?
+false
+(false) | echo $?
+
+false
+true | echo $?
+false
+(true) | echo $?
+
+true
+false | echo $?
+true
+(false) | echo $?
+
+true
+true | echo $?
+true
+(true) | echo $?
diff --git a/tests/execscript b/tests/execscript
index 3629c57..2809676 100644
--- a/tests/execscript
+++ b/tests/execscript
@@ -12,6 +12,7 @@ echo calling exec1.sub
 echo after exec1.sub with args: $?
 ./exec1.sub
 echo after exec1.sub without args: $?
+echo after exec1.sub: "$@"
 
 # set up a fixed path so we know notthere will not be found
 PATH=/usr/bin:/bin:/usr/local/bin:
@@ -58,10 +59,10 @@ echo $?
 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
+echo echo this is bashenv > $TMPDIR/bashenv
+export BASH_ENV=$TMPDIR/bashenv
 ${THIS_SH} ./exec3.sub
-rm -f /tmp/bashenv
+rm -f $TMPDIR/bashenv
 unset BASH_ENV
 
 # we're resetting the $PATH to empty, so this should be last
@@ -107,8 +108,53 @@ ${THIS_SH} ./exec6.sub
 # checks for properly deciding what constitutes an executable file
 ${THIS_SH} ./exec7.sub
 
-${THIS_SH} -i ./exec8.sub
+${THIS_SH} -i ${PWD}/exec8.sub
+
+${THIS_SH} ./exec9.sub
+
+${THIS_SH} ./exec10.sub
+${THIS_SH} ./exec11.sub
 
 true | `echo true` &
 
 echo after
+
+# Problem with bash at least back to version 3.0
+${THIS_SH} -c 'VAR=0; VAR=1 command exec; exit ${VAR}'
+
+# problem with bash through bash-4.1
+(
+        exec /var/empty/nosuch
+        echo bad
+) 2>/dev/null
+[ $? = 127 ] || echo FAIL: bad exit status $? at $LINENO
+
+unset FALSE
+if [ -x /bin/false ]; then
+	FALSE=/bin/false
+elif [ -x /usr/bin/false ]; then
+	FALSE=/usr/bin/false
+else
+	FALSE='command false'
+fi
+
+# problem with undoing redirections before running exit trap through bash-4.3
+
+${THIS_SH} ./exec12.sub false	# function
+${THIS_SH} ./exec12.sub command false
+${THIS_SH} ./exec12.sub $FALSE
+
+${THIS_SH} ./exec12.sub notfound
+${THIS_SH} ./exec12.sub syntaxerror
+${THIS_SH} ./exec12.sub nosuchcommand
+
+# problem with fork optimization in bash-4.4-alpha
+
+$THIS_SH -c 'echo a && /bin/echo b && echo c'
+$THIS_SH -c 'echo A && /bin/echo B'
+
+$THIS_SH -c '/bin/echo c && echo d'
+$THIS_SH -c '/bin/echo c && /bin/echo d && echo e'
+
+${THIS_SH} ./exec13.sub
+${THIS_SH} ./exec14.sub
diff --git a/tests/exp.right b/tests/exp.right
index d46a2a1..60241a1 100644
--- a/tests/exp.right
+++ b/tests/exp.right
@@ -1,9 +1,14 @@
 argv[1] = <^A>
 argv[1] = <^A>
-argv[1] = <^B>
-argv[1] = <^B>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^A>
+argv[1] = <^?>
+argv[1] = 
+argv[1] = <^A>
+argv[1] = <^?>
 argv[1] = <^A>
-argv[1] = <^B>
+argv[1] = <^?>
 argv[1] = 
 argv[1] = 
 argv[1] = 
@@ -25,11 +30,11 @@ argv[1] = 
 argv[1] = 
 argv[1] = 
 argv[1] = <^A>
-argv[1] = <^B>
+argv[1] = <^?>
 argv[1] = <^A>
-argv[1] = <^B>
+argv[1] = <^?>
 argv[1] = <^A>
-argv[1] = <^B>
+argv[1] = <^?>
 argv[1] = <>
 argv[1] = <>
 argv[1] = <>
@@ -42,13 +47,13 @@ argv[1] = <\\>
 argv[1] = 
 argv[2] = 
 argv[1] = <^A>
-argv[2] = <^B>
+argv[2] = <^?>
 argv[1] = <**>
 argv[1] = <\.\./*/>
-argv[1] = <^A^B^A^B>
+argv[1] = <^A^?^A^?>
 argv[1] = <^A^A>
-argv[1] = <^A^B>
-argv[1] = <^A^A^B>
+argv[1] = <^A^?>
+argv[1] = <^A^A^?>
 argv[1] = <  abc>
 argv[2] = 
 argv[3] = 
@@ -145,6 +150,9 @@ argv[4] = 
 argv[5] = 
 a?b?c
 a b c
+argv[1] = 
+argv[2] = 
+argv[3] = <>
 argv[1] = <^?>
 argv[1] = <^?>
 argv[1] = <^?>
@@ -166,3 +174,246 @@ graph
 yes
 a
 a
+ val
+val
+ val
+no arg passed
+hello
+[0;31m\]
+]
+[hello
+\[\e[0;31m\]
+
+hello
+eo
+argv[1] = 
+argv[1] = 
+argv[1] = <^?>
+argv[1] = <^?b>
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = <^A>
+argv[1] = <3>
+argv[2] = <^C>
+argv[3] = <^C>
+argv[4] = <^C>
+argv[1] = <^A>
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+declare -- var=$'x\001y\177z'
+argv[1] = 
+argv[2] = <-->
+argv[3] = 
+var=x\001y\177z$
+declare -- var="x\001y\177z"$
+argv[1] = <$'x\001y\177z'>
+argv[1] = 
+var=$'x\001y\177z'
+./exp8.sub: line 30: xyz: syntax error: invalid arithmetic operator (error token is "z")
+declare -a array=()
+declare -a array=([0]=$'x\001y\177z')
+argv[1] = 
+declare -a array=([0]=$'x\001y\177z')
+declare -A array=([$'x\001y\177z']=$'a\242b\002c' )
+abc
+def
+ghi
+jkl
+abc def ghi jkl
+xxabc
+def
+ghi
+jklyy
+xxabc def ghi jklyy
+abc
+def
+ghi
+jkl
+abc
+def ghi
+jkl
+abc
+def ghi
+jkl
+abc
+def ghi
+jkl
+xxabc
+def
+ghi
+jklyy
+xxabc
+def ghi
+jklyy
+abc
+def
+ghi
+jklabc
+def
+ghi
+jkl
+abc
+def ghi
+jklabc
+def ghi
+jkl
+abc:def ghi:jkl
+abc:def ghi:jkl
+abc:def ghi:jkl
+abc
+def ghi
+jkl
+abc:def ghi:jkl
+abc:def ghi:jkl
+abc
+def ghi
+jkl
+var=abc:def ghi:jkl
+abc:def ghi:jkl
+var=abc:def ghi:jkl
+abcdef ghijkl
+abcdef ghijkl
+abcdef ghijkl
+abc
+def ghi
+jkl
+abcdef ghijkl
+abcdef ghijkl
+abcdef ghijkl
+var=abcdef ghijkl
+abcdef ghijkl
+var=abcdef ghijkl
+abc
+def ghi
+jkl
+abc def ghi jkl
+abc def ghi jkl
+abc def ghi jkl
+abc
+def
+ghi
+jkl
+abc def ghi jkl
+abc def ghi jkl
+abc
+def
+ghi
+jkl
+var=abc def ghi jkl
+abc def ghi jkl
+var=abc def ghi jkl
+abc
+def ghi
+jkl
+[foo]
+[]
+[foo]
+[]
+[foo]
+[foo]
+[foo]
+[]
+[foo]
+[]
+[foo]
+[]
+< 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] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1 2>
+argv[1] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = < >
+argv[1] = < >
+argv[1] = < >
+argv[1] = < >
+argv[1] = < >
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <12>
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+abcdefg
+abcdefg
+abcdefg
+abcdefg
+cdefg
+abcdefg
+abcde
+abcdefg
+foo
+declare -- a="foo"
+7
+declare -i a="7"
+42
+declare -- a="42"
+FOO
+declare -u A="FOO"
diff --git a/tests/exp.tests b/tests/exp.tests
index 1f4a35b..61a39d3 100644
--- a/tests/exp.tests
+++ b/tests/exp.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 #
 # A suite of tests for bash word expansions
 #
@@ -22,14 +35,26 @@ expect "<^A>"
 recho `echo ''`
 expect "<^A>"
 recho `echo ""`
-expect "<^B>"
-recho `echo ''`
-expect "<^B>"
-recho `echo ""`
+expect "<^?>"
+recho `echo ''`
+expect "<^?>"
+recho `echo ""`
 expect "<^A>"
 recho `echo `
-expect "<^B>"
-recho `echo `
+expect "<^?>"
+recho `echo `
+
+expect "bar"
+recho ${foo:-"`echo bar`"}
+expect "<^A>"
+recho ${foo:-"`echo `"}
+expect "<^?>"
+recho ${foo:-"`echo `"}
+
+expect "<^A>"
+recho "`echo `"
+expect "<^?>"
+recho "`echo `"
 
 # Test null strings without variable expansion
 expect ""
@@ -89,16 +114,16 @@ unset xxx yyy
 # Test the unquoted special quoting characters
 expect "<^A>"
 recho 
-expect "<^B>"
-recho 
+expect "<^?>"
+recho 
 expect "<^A>"
 recho ""
-expect "<^B>"
-recho ""
+expect "<^?>"
+recho ""
 expect "<^A>"
 recho ''
-expect "<^B>"
-recho ''
+expect "<^?>"
+recho ''
 
 # Test expansion of a variable that is unset
 expect nothing
@@ -139,9 +164,9 @@ expect ' '
 FOO=`echo 'a b' | tr ' ' '\012'`
 recho $FOO
 
-# This should give argv[1] = ^A argv[2] = ^B
-expect '<^A> <^B>'
-FOO=`echo ' ' | tr ' ' '\012'`
+# This should give argv[1] = ^A argv[2] = ^?
+expect '<^A> <^?>'
+FOO=`echo ' ' | tr ' ' '\012'`
 recho $FOO
 
 # Test quoted and unquoted globbing characters
@@ -153,14 +178,14 @@ 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^A>'
 recho ''
-expect '<^A^B>'
-recho ''
-expect '<^A^A^B>'
-recho ''
+expect '<^A^?>'
+recho ''
+expect '<^A^A^?>'
+recho ''
 
 # More tests of "$@"
 set abc def ghi jkl
@@ -379,8 +404,23 @@ echo ${a//\\?/ }
 
 echo ${a//\?/ }
 
+${THIS_SH} -c 'var=a:b: ; IFS=" :" ; recho $var""' bash
+
 ${THIS_SH} ./exp1.sub
 
 ${THIS_SH} ./exp2.sub
 
 ${THIS_SH} ./exp3.sub
+
+${THIS_SH} ./exp4.sub
+
+${THIS_SH} ./exp5.sub
+
+${THIS_SH} ./exp6.sub
+${THIS_SH} ./exp7.sub
+${THIS_SH} ./exp8.sub
+${THIS_SH} ./exp9.sub
+${THIS_SH} ./exp10.sub
+${THIS_SH} ./exp11.sub
+${THIS_SH} ./exp12.sub
+${THIS_SH} ./exp13.sub
diff --git a/tests/exp1.sub b/tests/exp1.sub
index 3e40f2a..3dbe3d9 100644
--- a/tests/exp1.sub
+++ b/tests/exp1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # Test the substitution quoting characters (CTLESC and CTLNUL) in different
 # combinations
 
diff --git a/tests/exp10.sub b/tests/exp10.sub
new file mode 100644
index 0000000..42bdaf8
--- /dev/null
+++ b/tests/exp10.sub
@@ -0,0 +1,39 @@
+#   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 .
+#
+set -- ' A ' ' B '
+IFS=
+
+printf '<%s>' ${*} ${*##}
+echo
+printf '<%s>' ${*} ${*/}
+echo
+printf '<%s>' ${*} ${*,,}
+echo
+printf '<%s>' ${*} ${*:1:2}
+echo
+printf '<%s>' ${*} ${*@Q}
+echo
+
+echo -----
+
+printf '<%s>' ${@} ${@##}
+echo
+printf '<%s>' ${@} ${@/}
+echo
+printf '<%s>' ${@} ${@,,}
+echo
+printf '<%s>' ${@} ${@:1:2}
+echo
+printf '<%s>' ${@} ${@@Q}
+echo
diff --git a/tests/exp11.sub b/tests/exp11.sub
new file mode 100644
index 0000000..b3e02e0
--- /dev/null
+++ b/tests/exp11.sub
@@ -0,0 +1,105 @@
+#   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 .
+#
+set -- '1 2'
+
+unset var
+recho ${var-${*:1}}
+
+unset var
+recho ${var=$*}
+
+unset var
+recho ${var=${*:1}}
+recho "$var"
+
+# posix interp 221
+unset var
+recho ${var:-a\ b}
+
+recho ${var:=a\ b}
+recho "$var"
+
+set -- 1 2
+IFS=
+
+unset a b c
+recho $*
+recho ${a-$*}
+recho ${b-${*/}}
+recho ${c=${*/}}
+recho "$c"
+recho ${b-${*,,}}
+recho ${d-${*,,}}
+
+unset -v a b c
+IFS=$' \t\n'
+
+set -- ' '
+A=(' ')
+
+IFS=
+unset var
+var=${*@E}
+recho "$var"
+
+unset var
+var=${A[*]@E}
+recho "$var"
+
+unset var
+var=${@@E}
+recho "$var"
+
+unset var
+var=${A[@]@E}
+recho "$var"
+
+unset novar
+recho ${novar-${A[*]@E}}
+
+unset -v var novar
+IFS=$' \t\n'
+
+set -- 1 2
+A=( 1 2 )
+IFS=
+
+a=$* 
+recho "$a"
+b=${*@E}
+recho "$b"
+
+unset a b
+a=${A[*]}
+recho "$a"
+b=${A[*]@E}
+recho "$b"
+
+set -- $'\t'
+A=$1
+
+IFS=$1
+[[ ${A[@]} ]] && echo ok 1
+[[ ${A[*]} ]] && echo ok 2
+[[ ${A[0]} ]] && echo ok 3
+
+IFS=$' \t\n'
+[[ ${A[@]} ]] && echo ok 4
+[[ ${A[*]} ]] && echo ok 5
+[[ ${A[0]} ]] && echo ok 6
+
+IFS=
+[[ ${A[@]} ]] && echo ok 7
+[[ ${A[*]} ]] && echo ok 8
+[[ ${A[0]} ]] && echo ok 9
diff --git a/tests/exp12.sub b/tests/exp12.sub
new file mode 100644
index 0000000..8c5005d
--- /dev/null
+++ b/tests/exp12.sub
@@ -0,0 +1,51 @@
+#   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 .
+#
+# force single-byte versions of these functions
+
+export LANG=C
+
+# remove shortest trailing match
+x=file.c
+recho ${x%.c}.o
+
+# remove longest trailing match
+x=posix/src/std
+recho ${x%%/*}
+
+# remove shortest leading pattern
+x=$HOME/src/cmd
+recho ${x#$HOME}
+
+# remove longest leading pattern
+x=/one/two/three
+recho ${x##*/}
+
+# and no match thrown in for good measure
+recho ${x#nomatch}
+
+foo=abcdefg
+
+# fail
+echo ${foo%ab}
+echo ${foo%def}
+
+echo ${foo#fg}
+echo ${foo#def}
+
+# succeed
+echo ${foo#ab}
+echo ${foo#def}
+
+echo ${foo%fg}
+echo ${foo%def}
diff --git a/tests/exp13.sub b/tests/exp13.sub
new file mode 100644
index 0000000..80e1463
--- /dev/null
+++ b/tests/exp13.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+unset a
+
+echo ${a:=foo}
+declare -p a
+
+unset a
+
+declare -i a
+echo ${a:=4+3}
+declare -p a
+
+unset a
+echo ${a:=42}
+declare -p a
+
+unset a
+declare -u A
+A=
+echo ${A:=foo}
+
+declare -p A
diff --git a/tests/exp4.sub b/tests/exp4.sub
new file mode 100644
index 0000000..d022ceb
--- /dev/null
+++ b/tests/exp4.sub
@@ -0,0 +1,10 @@
+f=" val" e=
+echo "$e"$f
+echo $e$f
+echo "$e""$f"
+
+if [[ "$1"x == x ]] ; then
+   echo "no arg passed"
+   exit 1
+fi
+echo "$1"x | cat -v
diff --git a/tests/exp5.sub b/tests/exp5.sub
new file mode 100644
index 0000000..5cf8ed7
--- /dev/null
+++ b/tests/exp5.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+# expansions involving patterns
+var='[hello'
+echo "${var//[/}"
+
+red='\[\e[0;31m\]'
+printf "%s\n" "${red//\\[\\e/}"
+
+foo="${red//\\[\\e/}"
+
+# foo == [0;31m\]
+printf "%s\n" "${foo//[0;31m\\/}"
+
+echo "${var//[]/}"
+echo "${red//[]/}"
+
+v=hello
+foo='[:alpha:]'
+
+echo ${v//[[:alpha:]]/}
+echo ${v//[[:alpha]]/}
+echo ${v//[[:alpha]/}
diff --git a/tests/exp6.sub b/tests/exp6.sub
new file mode 100644
index 0000000..582617c
--- /dev/null
+++ b/tests/exp6.sub
@@ -0,0 +1,43 @@
+#   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 .
+#
+recho """"a
+recho a""""
+
+recho """"
+
+recho """"b
+recho b""""
+
+recho """"""c
+recho c""""""
+
+recho """"""c""""
+recho """"c""""""
+
+recho """"""""c
+recho c""""""""
+
+# BASH BUG: spurious DEL characters appear on empty variable interpolation.
+# BASH 4.2.8(1)-release
+
+a=''
+
+recho correct "$a" # correct empty output line
+recho correct "$a""$a" # correct empty output line
+recho correct "$a""$a""$a" # correct empty output line
+recho XwrongX "$a""$a""$a""$a" # spurious two DEL chars appear at line end
+recho correct a"$a" # correct single "a" on line
+recho XwrongX a"$a""$a" # spurious DEL char appears at line end
+recho correct a"$a$a" # correct single "a" on line
+recho correct a"$a$a$a$a" # correct single "a" on line
diff --git a/tests/exp7.sub b/tests/exp7.sub
new file mode 100644
index 0000000..a3993b5
--- /dev/null
+++ b/tests/exp7.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+IFS=$'\001'
+c=$'\001'
+c2=$'\003'
+
+IFS=$c		# this is the problem line, IFS should end up being \001
+recho "$IFS"
+set -- $c2$c$c2$c$c2
+recho $# "$1" "$2" "$3"
+
+x=$c
+recho "$x"
+
+unset c c2 x
+
+c=$'Y\1Y';
+
+v=X${c}X;
+recho X${c}X
+recho "$v"
+
+v=X$c
+recho X$c
+recho "$v"
diff --git a/tests/exp8.sub b/tests/exp8.sub
new file mode 100644
index 0000000..7dd5a28
--- /dev/null
+++ b/tests/exp8.sub
@@ -0,0 +1,45 @@
+#   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 .
+#
+var=$'x\001y\177z'
+
+recho "$var"
+recho $var
+
+declare -p var
+recho $(declare -p var)
+
+echo "var=$var" | sed -n l
+echo "declare -- var=\"$var\"" | sed -n l
+
+recho ${var@Q}
+recho ${var@P}
+echo -E ${var@A}
+
+unset array
+array=( [$'x\001y\177z']=foo )	# should be error
+echo -E ${array[@]@A}
+
+unset array
+declare -a array=([0]=$'x\001y\177z')
+declare -p array
+
+unset array
+array=( "$var" )
+recho ${array[@]}
+echo -E ${array[@]@A}
+
+unset array
+declare -A array
+array=( [$'x\001y\177z']=$'a\242b\002c' )
+echo -E ${array[@]@A}
diff --git a/tests/exp9.sub b/tests/exp9.sub
new file mode 100644
index 0000000..7e4a3b6
--- /dev/null
+++ b/tests/exp9.sub
@@ -0,0 +1,82 @@
+#   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 .
+#
+# expansion test cases from Posix interp 888
+
+set "abc" "def ghi" "jkl"
+unset novar
+IFS=' ' # a space
+printf '%s\n' $*
+printf '%s\n' "$*"
+printf '%s\n' xx$*yy
+printf '%s\n' "xx$*yy"
+printf '%s\n' $@
+printf '%s\n' "$@"
+printf '%s\n' ${1+"$@"}
+printf '%s\n' ${novar-"$@"}
+printf '%s\n' xx$@yy
+printf '%s\n' "xx$@yy"
+printf '%s\n' $@$@
+printf '%s\n' "$@$@"
+IFS=':'
+printf '%s\n' "$*"
+var=$*; printf '%s\n' "$var"
+var="$*"; printf '%s\n' "$var"
+unset var
+printf '%s\n' ${var-$*}
+printf '%s\n' "${var-$*}"
+printf '%s\n' ${var-"$*"}
+printf '%s\n' ${var=$*}
+printf 'var=%s\n' "$var"
+unset var
+printf '%s\n' "${var=$*}"
+printf 'var=%s\n' "$var"
+
+IFS='' # null
+printf '%s\n' "$*"
+var=$*; printf '%s\n' "$var"
+var="$*"; printf '%s\n' "$var"
+unset var
+printf '%s\n' ${var-$*}
+printf '%s\n' "${var-$*}"
+printf '%s\n' ${var-"$*"}
+printf '%s\n' ${var=$*}
+printf 'var=%s\n' "$var"
+unset var
+printf '%s\n' "${var=$*}"
+printf 'var=%s\n' "$var"
+printf '%s\n' "$@"
+
+unset IFS
+printf '%s\n' "$*"
+var=$*; printf '%s\n' "$var"
+var="$*"; printf '%s\n' "$var"
+unset var
+printf '%s\n' ${var-$*}
+printf '%s\n' "${var-$*}"
+printf '%s\n' ${var-"$*"}
+printf '%s\n' ${var=$*}
+printf 'var=%s\n' "$var"
+unset var
+printf '%s\n' "${var=$*}"
+printf 'var=%s\n' "$var"
+printf '%s\n' "$@"
+
+set --
+printf '[%s]\n' foo "$*"
+printf '[%s]\n' foo "$novar$*$(echo)"
+printf '[%s]\n' foo $@
+printf '[%s]\n' foo "$@"
+printf '[%s]\n' foo ''$@
+printf '[%s]\n' foo ''"$@"
+printf '[%s]\n' foo ''"$novar$@$(echo)"
diff --git a/tests/exportfunc.right b/tests/exportfunc.right
new file mode 100644
index 0000000..890bdfa
--- /dev/null
+++ b/tests/exportfunc.right
@@ -0,0 +1,14 @@
+exportfunc ok 1
+exportfunc ok 2
+./exportfunc.tests: line 37: cve7169-bad: No such file or directory
+./exportfunc.tests: eval: line 44: syntax error: unexpected end of file
+./exportfunc.tests: line 43: cve7169-bad2: No such file or directory
+./exportfunc1.sub: line 14: maximum here-document count exceeded
+./exportfunc.tests: line 72: HELLO_WORLD: No such file or directory
+eval ok
+./exportfunc3.sub: line 23: export: foo=bar: cannot export
+status: 1
+equals-1
+bad echo
+./exportfunc3.sub: line 36: export: /bin/echo: cannot export
+bar
diff --git a/tests/exportfunc.tests b/tests/exportfunc.tests
new file mode 100644
index 0000000..d06b1a3
--- /dev/null
+++ b/tests/exportfunc.tests
@@ -0,0 +1,92 @@
+#   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 .
+#
+# normal operation
+foo()
+{
+	echo exportfunc ok 1
+}
+export -f foo
+${THIS_SH} -c foo
+unset -f foo
+foo-a ()
+{
+	echo exportfunc ok 2
+}
+export -f foo-a
+${THIS_SH} -c 'foo-a'
+
+# CVE-2014-6271
+
+env -i BASH_FUNC_foo%%='() { echo cve6271 ok; } ; echo BAD' ${THIS_SH} -c foo 2>/dev/null
+
+# CVE-2014-7169
+
+rm -f cve7169-bad
+env -i BASH_FUNC_X%%='() { (a)=>\' ${THIS_SH} -c cve7169-bad 2>/dev/null
+: < cve7169-bad
+rm -f cve7169-bad
+
+echo cve7169-bad2 > $TMPDIR/bar
+rm -f cve7169-bad2
+eval  'X() { (a)>\' ; . ./bar 2>/dev/null
+: < cve7169-bad2
+rm -f cve7169-bad2 $TMPDIR/bar
+
+# CVE-2014-7186
+${THIS_SH} ./exportfunc1.sub
+
+# CVE-2014-7187
+${THIS_SH} ./exportfunc2.sub
+
+# CVE-2014-6277
+A100=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+A1000=${A100}
+
+for (( i = 0; i < 999; i++ ))
+do
+	A1000+=${A100}
+done
+
+env BASH_FUNC_foo%%="() { 000(){>0;}&000(){ 0;}<<0 0" ${THIS_SH} -c foo 2>/dev/null
+env BASH_FUNC_foo%%="() { 000(){>0;}&000(){ 0;}<<${A1000} 0" ${THIS_SH} -c foo 2>/dev/null
+${THIS_SH} -c "f(){ x(){ _;}; x(){ _;}</dev/null
+unset A100 A1000
+
+# CVE-2014-6278
+
+env 'BASH_FUNC_FOO%%=() { 0;}>r[0${$(}0 {>"$(id >/dev/tty)"; }' ${THIS_SH} -c : 2>/dev/null
+
+rm -f HELLO_WORLD
+env BASH_FUNC_FOO%%='() { 0;}>r[0${$(}0 {>HELLO_WORLD; }' ${THIS_SH} -c : 2>/dev/null
+: < HELLO_WORLD
+
+env BASH_FUNC_x%%='() { _;}>_[$($())] { echo vuln;}' ${THIS_SH} -c : 2>/dev/null
+
+env -i BASH_FUNC_x%%='() { _; } >_[${ $() }] { id; }' ${THIS_SH} -c : 2>/dev/null
+
+env BASH_FUNC_x%%=$'() { _;}>_[$($())]\n{ echo vuln;}' ${THIS_SH} -c : 2>/dev/null
+eval 'x() { _;}>_[$($())] { echo vuln;}' 2>/dev/null
+
+eval 'foo() { _; } >_[${ $() }] ;{ echo eval ok; }'
+
+# other tests fixed in bash43-030 concerning function name transformation
+env $'BASH_FUNC_\nfoo%%=() { echo transform-1; }' ${THIS_SH} -c foo 2>/dev/null
+env $'BASH_FUNC_foo\n%%=() { echo transform-2; }' ${THIS_SH} -c foo 2>/dev/null
+env $'BASH_FUNC_  foo  %%=() { echo transform-3; }' ${THIS_SH} -c foo 2>/dev/null
+
+unset -f foo
+env $'BASH_FUNC_#badname%%'=$'() { :; }\nfoo () { echo transform-4; }  ' ${THIS_SH} -c 'foo' 2>/dev/null
+
+# tests of exported names
+${THIS_SH} ./exportfunc3.sub
diff --git a/tests/exportfunc1.sub b/tests/exportfunc1.sub
new file mode 100644
index 0000000..53b4c1f
--- /dev/null
+++ b/tests/exportfunc1.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+cat <.
+#
+for x1 in ; do :
+for x2 in ; do :
+for x3 in ; do :
+for x4 in ; do :
+for x5 in ; do :
+for x6 in ; do :
+for x7 in ; do :
+for x8 in ; do :
+for x9 in ; do :
+for x10 in ; do :
+for x11 in ; do :
+for x12 in ; do :
+for x13 in ; do :
+for x14 in ; do :
+for x15 in ; do :
+for x16 in ; do :
+for x17 in ; do :
+for x18 in ; do :
+for x19 in ; do :
+for x20 in ; do :
+for x21 in ; do :
+for x22 in ; do :
+for x23 in ; do :
+for x24 in ; do :
+for x25 in ; do :
+for x26 in ; do :
+for x27 in ; do :
+for x28 in ; do :
+for x29 in ; do :
+for x30 in ; do :
+for x31 in ; do :
+for x32 in ; do :
+for x33 in ; do :
+for x34 in ; do :
+for x35 in ; do :
+for x36 in ; do :
+for x37 in ; do :
+for x38 in ; do :
+for x39 in ; do :
+for x40 in ; do :
+for x41 in ; do :
+for x42 in ; do :
+for x43 in ; do :
+for x44 in ; do :
+for x45 in ; do :
+for x46 in ; do :
+for x47 in ; do :
+for x48 in ; do :
+for x49 in ; do :
+for x50 in ; do :
+for x51 in ; do :
+for x52 in ; do :
+for x53 in ; do :
+for x54 in ; do :
+for x55 in ; do :
+for x56 in ; do :
+for x57 in ; do :
+for x58 in ; do :
+for x59 in ; do :
+for x60 in ; do :
+for x61 in ; do :
+for x62 in ; do :
+for x63 in ; do :
+for x64 in ; do :
+for x65 in ; do :
+for x66 in ; do :
+for x67 in ; do :
+for x68 in ; do :
+for x69 in ; do :
+for x70 in ; do :
+for x71 in ; do :
+for x72 in ; do :
+for x73 in ; do :
+for x74 in ; do :
+for x75 in ; do :
+for x76 in ; do :
+for x77 in ; do :
+for x78 in ; do :
+for x79 in ; do :
+for x80 in ; do :
+for x81 in ; do :
+for x82 in ; do :
+for x83 in ; do :
+for x84 in ; do :
+for x85 in ; do :
+for x86 in ; do :
+for x87 in ; do :
+for x88 in ; do :
+for x89 in ; do :
+for x90 in ; do :
+for x91 in ; do :
+for x92 in ; do :
+for x93 in ; do :
+for x94 in ; do :
+for x95 in ; do :
+for x96 in ; do :
+for x97 in ; do :
+for x98 in ; do :
+for x99 in ; do :
+for x100 in ; do :
+for x101 in ; do :
+for x102 in ; do :
+for x103 in ; do :
+for x104 in ; do :
+for x105 in ; do :
+for x106 in ; do :
+for x107 in ; do :
+for x108 in ; do :
+for x109 in ; do :
+for x110 in ; do :
+for x111 in ; do :
+for x112 in ; do :
+for x113 in ; do :
+for x114 in ; do :
+for x115 in ; do :
+for x116 in ; do :
+for x117 in ; do :
+for x118 in ; do :
+for x119 in ; do :
+for x120 in ; do :
+for x121 in ; do :
+for x122 in ; do :
+for x123 in ; do :
+for x124 in ; do :
+for x125 in ; do :
+for x126 in ; do :
+for x127 in ; do :
+for x128 in ; do :
+for x129 in ; do :
+for x130 in ; do :
+for x131 in ; do :
+for x132 in ; do :
+for x133 in ; do :
+for x134 in ; do :
+for x135 in ; do :
+for x136 in ; do :
+for x137 in ; do :
+for x138 in ; do :
+for x139 in ; do :
+for x140 in ; do :
+for x141 in ; do :
+for x142 in ; do :
+for x143 in ; do :
+for x144 in ; do :
+for x145 in ; do :
+for x146 in ; do :
+for x147 in ; do :
+for x148 in ; do :
+for x149 in ; do :
+for x150 in ; do :
+for x151 in ; do :
+for x152 in ; do :
+for x153 in ; do :
+for x154 in ; do :
+for x155 in ; do :
+for x156 in ; do :
+for x157 in ; do :
+for x158 in ; do :
+for x159 in ; do :
+for x160 in ; do :
+for x161 in ; do :
+for x162 in ; do :
+for x163 in ; do :
+for x164 in ; do :
+for x165 in ; do :
+for x166 in ; do :
+for x167 in ; do :
+for x168 in ; do :
+for x169 in ; do :
+for x170 in ; do :
+for x171 in ; do :
+for x172 in ; do :
+for x173 in ; do :
+for x174 in ; do :
+for x175 in ; do :
+for x176 in ; do :
+for x177 in ; do :
+for x178 in ; do :
+for x179 in ; do :
+for x180 in ; do :
+for x181 in ; do :
+for x182 in ; do :
+for x183 in ; do :
+for x184 in ; do :
+for x185 in ; do :
+for x186 in ; do :
+for x187 in ; do :
+for x188 in ; do :
+for x189 in ; do :
+for x190 in ; do :
+for x191 in ; do :
+for x192 in ; do :
+for x193 in ; do :
+for x194 in ; do :
+for x195 in ; do :
+for x196 in ; do :
+for x197 in ; do :
+for x198 in ; do :
+for x199 in ; do :
+for x200 in ; do :
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
+done
diff --git a/tests/exportfunc3.sub b/tests/exportfunc3.sub
new file mode 100644
index 0000000..af3125b
--- /dev/null
+++ b/tests/exportfunc3.sub
@@ -0,0 +1,38 @@
+#   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 .
+#
+# test function names that cannot be exported
+
+unset foo		# remove from environment if necessary
+
+function foo=bar
+{
+	echo equals-1
+}
+
+export -f 'foo=bar'
+echo status: $?
+
+foo\=bar
+printenv | grep 'foo=bar'
+${THIS_SH} -c 'foo\=bar 2>/dev/null'
+
+function /bin/echo
+{
+	echo bad echo
+}
+
+/bin/echo foo
+export -f '/bin/echo'
+
+${THIS_SH} -c '/bin/echo bar'
diff --git a/tests/extglob.right b/tests/extglob.right
index 7b9cc94..2974cec 100644
--- a/tests/extglob.right
+++ b/tests/extglob.right
@@ -88,3 +88,97 @@ a.c
 ok 1
 ok 2
 ok 3
+a ab
+a ab
+a ab
+a
+*(.)
+a.log
+*(foo)
+*(foo|bar)
+a.log
+?(foo)
+a.log
+a.log
+*(foo).*
+*(foo|bar).*
+a.log
+a.log
+.x .y .z
+a b c
+.x .y .z a b c
+a b c
+a b c
+a b c
+a b c
+.x .y .z a b c
+.x .y .z a b c
+*
+.b a
+.b a
+a .b
+.b
+.b
+.b a
+.b a
+a .b
+.b
+.b
+dotglob: .a .foo bar
+@(.foo)
+.foo
+!(.foo)
+.a bar
+@(.foo|*)
+.a .foo bar
+!(.foo|*)
+!(.foo|*)
+@(*)
+.a .foo bar
+!(*)
+!(*)
+.*
+. .. .a .foo
+@(.*)
+. .. .a .foo
+!(.*)
+bar
+no dotglob: .a .foo bar
+@(.foo)
+.foo
+!(.foo)
+bar
+@(.foo|*)
+.foo bar
+!(.foo|*)
+!(.foo|*)
+!(bar).foo
+!(bar).foo
+*(bar).foo
+.foo
+?(bar).foo
+.foo
+.?
+.. .a
+@(.?)
+.. .a
+!(.?)
+bar
+dotglob: .a .foo bar
+@(?|.?)
+.. .a
+@(?|.*)
+. .. .a .foo
+? .*
+? . .. .a .foo
+*
+.a .foo bar
+no dotglob: .a .foo bar
+@(?|.?)
+.. .a
+@(?|.*)
+. .. .a .foo
+? .*
+? . .. .a .foo
+*
+bar
diff --git a/tests/extglob.tests b/tests/extglob.tests
index f9c17c7..7a7cf91 100644
--- a/tests/extglob.tests
+++ b/tests/extglob.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # test the ksh-like extended globbing features: [!@*?+](patlist)
 
 shopt -s extglob
@@ -367,5 +380,11 @@ shopt -u globstar
 builtin cd "$MYDIR"
 
 ${THIS_SH} ./extglob1.sub
+${THIS_SH} ./extglob1a.sub
+${THIS_SH} ./extglob3.sub
+${THIS_SH} ./extglob4.sub
+${THIS_SH} ./extglob5.sub
+${THIS_SH} ./extglob6.sub
+${THIS_SH} ./extglob7.sub
 
 exit 0
diff --git a/tests/extglob1.sub b/tests/extglob1.sub
index bf65a9e..c73b1ea 100644
--- a/tests/extglob1.sub
+++ b/tests/extglob1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 MYDIR=$PWD
 
 : ${TMPDIR:=/tmp}
diff --git a/tests/extglob1a.sub b/tests/extglob1a.sub
new file mode 100644
index 0000000..1470386
--- /dev/null
+++ b/tests/extglob1a.sub
@@ -0,0 +1,29 @@
+#   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 .
+#
+shopt -s extglob
+
+TESTDIR=${TMPDIR:-/tmp}/eglob-test-$$
+mkdir $TESTDIR
+builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; }
+rm -rf *
+
+touch a ab ba
+
+echo a*!(x)
+echo a!(x)
+echo a*?(x)
+echo a?(x)
+
+builtin cd $OLDPWD
+rm -rf $TESTDIR
diff --git a/tests/extglob2.sub b/tests/extglob2.sub
new file mode 100644
index 0000000..1088111
--- /dev/null
+++ b/tests/extglob2.sub
@@ -0,0 +1,31 @@
+LANG=en_US.UTF-8
+
+shopt -s extglob
+a="aaaäöü"
+a1=${a:3:3}
+
+[[ "${a}" == "${a1}" ]] || {
+	echo cond ok 1
+}
+
+case "${a//?aa}" in
+"${a1}")	echo ok 1;;
+*)		echo bad 1;;
+esac
+
+case "${a//\aaa}" in
+"${a1}")	echo ok 2;;
+*)		echo bad 2;;
+esac
+
+case "${a//aaa}" in
+"${a1}")	echo ok 3;;
+*)		echo bad 3;;
+esac
+
+case "${a//@(?aa)}" in
+"${a1}")	echo ok 4;;
+*)		echo bad 4;;
+esac
+
+exit 0 
diff --git a/tests/extglob2.tests b/tests/extglob2.tests
old mode 100755
new mode 100644
index f35c3e8..187253b
--- a/tests/extglob2.tests
+++ b/tests/extglob2.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 #
 # More ksh-like extended globbing tests, cribbed from zsh-3.1.5
 #
diff --git a/tests/extglob3.sub b/tests/extglob3.sub
new file mode 100644
index 0000000..bf5d263
--- /dev/null
+++ b/tests/extglob3.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+shopt -s extglob
+DIR=$TMPDIR/extglob-$$
+mkdir $DIR
+cd $DIR
+
+touch a.log
+
+echo *(.)
+echo *(.)*
+echo *(foo)
+echo *(foo|bar)
+echo ?(foo)*
+echo ?(foo)
+echo *(foo)*
+echo @(|foo)*
+
+echo *(foo).*
+echo *(foo|bar).*
+
+echo !(foo)*
+echo !(foo|bar)*
+
+cd $OLDPWD
+rm -rf $DIR
diff --git a/tests/extglob3.tests b/tests/extglob3.tests
index 60454a2..56f8b39 100644
--- a/tests/extglob3.tests
+++ b/tests/extglob3.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 shopt -s extglob
 
 [[ ab/../ == @(ab|+([^/]))/..?(/) ]] && echo match 1
diff --git a/tests/extglob4.sub b/tests/extglob4.sub
new file mode 100644
index 0000000..5369cd6
--- /dev/null
+++ b/tests/extglob4.sub
@@ -0,0 +1,45 @@
+#   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 .
+#
+LANG=C
+LC_ALL=C
+
+: ${TMPDIR:=/tmp}
+GTDIR=$TMPDIR/extglob4-$$
+
+shopt -s extglob
+[ -d "${GTDIR}" ] || mkdir "${GTDIR}"
+cd "${GTDIR}" || {
+	echo "extglob4: cannot cd to ${GTDIR}"
+	exit 2
+}
+
+touch a b c .x .y .z
+echo .!(|.)                     # correct
+echo *                          # correct
+
+echo @(*|.!(|.))                # wrong, adds . and ..
+echo @(*|@(f))                  # ??
+echo @(*|@(ff))
+
+echo !(f)
+echo !(f)!(f)
+
+shopt -s dotglob
+echo @(*|@(f))
+echo @(*|@(ff))
+
+cd $OLDPWD
+rm -rf $GTDIR
+
+[[ a = a*?(/)b ]] && echo bad match 1
diff --git a/tests/extglob5.sub b/tests/extglob5.sub
new file mode 100644
index 0000000..580229b
--- /dev/null
+++ b/tests/extglob5.sub
@@ -0,0 +1,31 @@
+#   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 .
+#
+# globignore extglob patterns containing colons -- problem until bash-4.2
+
+: ${TMPDIR:=/tmp}
+TESTDIR=$TMPDIR/bash-globignore-$$
+[ -d "$TESTDIR" ] || mkdir "$TESTDIR"
+
+cd "$TESTDIR" || exit 2
+
+shopt -s extglob
+GLOBIGNORE='+([^[:alnum:]]):@([-.,:; _]):[![:alnum:]]'
+
+touch ';' '++'
+echo *
+
+rm ';' '++'
+
+cd $OLDPWD
+rmdir $TESTDIR
diff --git a/tests/extglob6.sub b/tests/extglob6.sub
new file mode 100644
index 0000000..5e2aafb
--- /dev/null
+++ b/tests/extglob6.sub
@@ -0,0 +1,43 @@
+#   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 .
+#
+# issues with ? matching "." in certain special circumstances with dotglob set
+
+shopt -s dotglob extglob
+
+DIR=$TMPDIR/extglob-$$
+mkdir $DIR
+cd $DIR
+
+touch a .b
+
+LC_COLLATE=C		# fix sort order
+
+echo @(?|.?)
+echo @(.?|?)
+echo ? .?
+
+echo .*
+echo \.*
+
+shopt -u dotglob
+
+echo @(?|.?)
+echo @(.?|?)
+echo ? .?
+
+echo .*
+echo \.*
+
+cd $OLDPWD
+rm -rf $DIR
diff --git a/tests/extglob7.sub b/tests/extglob7.sub
new file mode 100644
index 0000000..5fab9cd
--- /dev/null
+++ b/tests/extglob7.sub
@@ -0,0 +1,97 @@
+: ${TMPDIR:=/tmp}
+
+TESTDIR=$TMPDIR/glob-test-$$
+mkdir $TESTDIR || {
+	echo "$TESTDIR: cannot create" >&2
+	exit 1
+}
+cd $TESTDIR || {
+	echo "$TESTDIR: cannot cd" >&2
+	exit 1
+}
+
+LC_CTYPE=C LC_COLLATE=C
+shopt -s extglob dotglob
+shopt -u globskipdots		# XXX - backwards compatibility
+touch .foo bar .a
+
+echo dotglob: .a .foo bar
+
+echo '@(.foo)'
+echo @(.foo)
+echo '!(.foo)'
+echo !(.foo)
+
+echo '@(.foo|*)'
+echo @(.foo|*)
+echo '!(.foo|*)'
+echo !(.foo|*)
+
+echo '@(*)'
+echo @(*)
+echo '!(*)'
+echo !(*)
+
+echo '.*'
+echo .*
+echo '@(.*)'
+echo @(.*)
+echo '!(.*)'
+echo !(.*)
+
+shopt -u dotglob
+
+echo no dotglob: .a .foo bar
+
+echo '@(.foo)'
+echo @(.foo)
+echo '!(.foo)'
+echo !(.foo)
+
+echo '@(.foo|*)'
+echo @(.foo|*)
+echo '!(.foo|*)'
+echo !(.foo|*)
+
+echo '!(bar).foo'
+echo !(bar).foo
+echo '*(bar).foo'
+echo *(bar).foo
+echo '?(bar).foo'
+echo ?(bar).foo
+
+echo '.?'
+echo .?
+echo '@(.?)'
+echo @(.?)
+echo '!(.?)'
+echo !(.?)
+
+shopt -s dotglob
+echo dotglob: .a .foo bar
+
+echo '@(?|.?)'
+echo @(?|.?)
+echo '@(?|.*)'
+echo @(?|.*)
+echo '? .*'
+echo ? .*
+echo '*'
+echo *
+
+shopt -u dotglob
+echo no dotglob: .a .foo bar
+
+echo '@(?|.?)'
+echo @(?|.?)
+echo '@(?|.*)'
+echo @(?|.*)
+echo '? .*'
+echo ? .*
+echo '*'
+echo *
+
+rm -f .a bar .foo
+
+cd $OLDPWD
+rm -rf $TESTDIR
diff --git a/tests/func.right b/tests/func.right
index da8b45c..f4db4d1 100644
--- a/tests/func.right
+++ b/tests/func.right
@@ -147,10 +147,23 @@ expect 20
 20
 expect 5 20
 5 20
-expect 5 30
-5 30
+expect 5 20
+5 20
 expect 2 40
 2 40
 expect 5 20
 5 20
+./func4.sub: line 23: foo: maximum function nesting level exceeded (100)
+1
+after: f = 100
+./func4.sub: line 23: foo: maximum function nesting level exceeded (100)
+1
+after: f = 100
+7
+after FUNCNEST reset: f = 201
+7
+after FUNCNEST unset: f = 201
+./func4.sub: line 23: foo: maximum function nesting level exceeded (20)
+1
+after FUNCNEST assign: f = 38
 5
diff --git a/tests/func.tests b/tests/func.tests
index 23dff44..e35ec2b 100644
--- a/tests/func.tests
+++ b/tests/func.tests
@@ -1,3 +1,22 @@
+#   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 .
+#
+# since we look at functions below, remove all functions now 
+funcs=$(compgen -A function)
+if [ -n "$funcs" ]; then
+        unset -f $funcs
+fi
+
 a()
 {
 	x=$((x - 1))
@@ -157,6 +176,9 @@ ${THIS_SH} ./func2.sub
 # test for some posix-specific function behavior
 ${THIS_SH} ./func3.sub
 
+# FUNCNEST testing
+${THIS_SH} ./func4.sub
+
 unset -f myfunction
 myfunction() {
     echo "bad shell function redirection"
diff --git a/tests/func1.sub b/tests/func1.sub
index 345645f..f7e84f4 100644
--- a/tests/func1.sub
+++ b/tests/func1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 #
 # Test that redirections attached to shell functions are printed correctly.
 # This was a bug in all bash versions before bash-2.04.
diff --git a/tests/func2.sub b/tests/func2.sub
index 41a3844..9caabfc 100644
--- a/tests/func2.sub
+++ b/tests/func2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 funca() (
 	echo func-a
 )
diff --git a/tests/func3.sub b/tests/func3.sub
index 9d3d069..5c0eac2 100644
--- a/tests/func3.sub
+++ b/tests/func3.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 #
 # test some posix-mode-specific function behavior
 #
@@ -23,7 +36,7 @@ echo expect 5 20
 func
 echo $? $var
 
-echo expect 5 30
+echo expect 5 20
 var=30 func
 echo $? $var
 
diff --git a/tests/func4.sub b/tests/func4.sub
new file mode 100644
index 0000000..69f15e4
--- /dev/null
+++ b/tests/func4.sub
@@ -0,0 +1,52 @@
+#   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 .
+#
+# test FUNCNEST functionality -- bash-4.2
+FUNCNEST=100
+
+foo()
+{
+	(( f++ ))
+	if (( f > 200 )); then
+		return 7
+	fi
+	foo
+}
+
+f=0
+foo
+echo $?
+echo after: f = $f
+
+f=0
+foo
+echo $?
+echo after: f = $f
+
+f=0
+FUNCNEST=0
+foo
+echo $?
+echo after FUNCNEST reset: f = $f
+
+f=0
+unset FUNCNEST
+foo
+echo $?
+echo after FUNCNEST unset: f = $f
+
+FUNCNEST=20
+f=$(( FUNCNEST - 2 ))
+foo
+echo $?
+echo after FUNCNEST assign: f = $f
diff --git a/tests/getopts.right b/tests/getopts.right
index 9226103..599d830 100644
--- a/tests/getopts.right
+++ b/tests/getopts.right
@@ -1,9 +1,9 @@
-getopts: usage: getopts optstring name [arg]
+getopts: usage: getopts optstring name [arg ...]
 2
-getopts: usage: getopts optstring name [arg]
+getopts: usage: getopts optstring name [arg ...]
 2
-./getopts.tests: line 10: getopts: -a: invalid option
-getopts: usage: getopts optstring name [arg]
+./getopts.tests: line 23: getopts: -a: invalid option
+getopts: usage: getopts optstring name [arg ...]
 -a specified
 -b bval specified
 remaining args: one two three
@@ -52,5 +52,17 @@ remaining args:
 -a specified
 remaining args: 
 0
-./getopts7.sub: line 4: getopts: `opt-var': not a valid identifier
+./getopts7.sub: line 17: getopts: `opt-var': not a valid identifier
 remaining args: 
+opt: x
+opt: y
+opt: a
+opt: b
+opt: c
+opt: z
+$1 = a
+./getopts10.sub: line 16: OPTARG: readonly variable
+OPTARG = x = ?
+unset x = ?
+declare -r RO="foo"
+declare -r RO="foo"
diff --git a/tests/getopts.tests b/tests/getopts.tests
index 1814d78..06cc29a 100644
--- a/tests/getopts.tests
+++ b/tests/getopts.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # getopts tests
 # this should fail
 getopts
@@ -36,3 +49,8 @@ ${THIS_SH} ./getopts6.sub -ac
 echo $? # this should be 2
 
 ${THIS_SH} ./getopts7.sub -a
+
+${THIS_SH} ./getopts8.sub
+${THIS_SH} ./getopts9.sub
+
+${THIS_SH} ./getopts10.sub
diff --git a/tests/getopts1.sub b/tests/getopts1.sub
index df0a342..5145879 100644
--- a/tests/getopts1.sub
+++ b/tests/getopts1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 aflag=
 bflag=
 
diff --git a/tests/getopts10.sub b/tests/getopts10.sub
new file mode 100644
index 0000000..49b2bfe
--- /dev/null
+++ b/tests/getopts10.sub
@@ -0,0 +1,30 @@
+#   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 .
+#
+set -- -a bb
+readonly OPTARG
+getopts :x x
+
+echo OPTARG = $OPTARG x = "$x"
+
+getopts x x
+echo ${OPTARG-unset} x = "$x"
+
+typeset -r RO=foo
+typeset -n OPTARG=RO
+
+getopts :x x
+typeset -p RO
+
+getopts x x
+typeset -p RO
diff --git a/tests/getopts2.sub b/tests/getopts2.sub
index d91fd26..6bb8af5 100644
--- a/tests/getopts2.sub
+++ b/tests/getopts2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 aflag=
 bflag=
 
diff --git a/tests/getopts3.sub b/tests/getopts3.sub
index 2d8b316..6769c49 100644
--- a/tests/getopts3.sub
+++ b/tests/getopts3.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 aflag=
 bflag=
 
diff --git a/tests/getopts4.sub b/tests/getopts4.sub
index 9cd5aef..5fbe954 100644
--- a/tests/getopts4.sub
+++ b/tests/getopts4.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 aflag=
 bflag=
 
diff --git a/tests/getopts5.sub b/tests/getopts5.sub
index c6e3888..bf52310 100644
--- a/tests/getopts5.sub
+++ b/tests/getopts5.sub
@@ -1,9 +1,21 @@
-#!/local/bin/bash
+#   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 .
+#
 #Time-stamp: <95/06/07 07:40:40 hrue@imf.unit.no>
 
 getop () {
 
-    local OPTIND
+    local OPTIND=1
     local OPTERR=1
 
     echo getop: OPTERR=$OPTERR    
diff --git a/tests/getopts6.sub b/tests/getopts6.sub
index 75d768c..d969ece 100644
--- a/tests/getopts6.sub
+++ b/tests/getopts6.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 aflag=
 bflag=
 
diff --git a/tests/getopts7.sub b/tests/getopts7.sub
index a20a6df..de7d7a6 100644
--- a/tests/getopts7.sub
+++ b/tests/getopts7.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 aflag=
 bflag=
 
diff --git a/tests/getopts8.sub b/tests/getopts8.sub
new file mode 100644
index 0000000..6aeeca6
--- /dev/null
+++ b/tests/getopts8.sub
@@ -0,0 +1,13 @@
+f()
+{
+	typeset OPTIND=1
+	typeset opt
+
+	while getopts ":abcxyz" opt
+	do
+		echo opt: "$opt"
+		if [[ $opt = y ]]; then f -abc ; fi
+	done
+}
+
+f -xyz
diff --git a/tests/getopts9.sub b/tests/getopts9.sub
new file mode 100644
index 0000000..f7dcabc
--- /dev/null
+++ b/tests/getopts9.sub
@@ -0,0 +1,29 @@
+#   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 .
+#
+f()
+{
+	OPTIND=4
+
+	echo \$1 = $1
+}
+
+main()
+{
+while getopts abcdefg opt
+do
+	f $opt
+done
+}
+
+main -abc
diff --git a/tests/glob.right b/tests/glob.right
index 04a0fd5..723ee7b 100644
--- a/tests/glob.right
+++ b/tests/glob.right
@@ -1,4 +1,130 @@
 foo/bar foobar/bar
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+b
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+0000000 141 243 134 142
+0000004
+ok 6
+ok 7
+invalid bracket expression
+== LANG=C ==
+[[:alpha:]
+ok 1
+[a
+[[:alpha:]
+ok 2
+ok 2.1
+ok 3
+ok 4
+== LANG=en_US.UTF-8 ==
+[[:alpha:]
+ok 1
+[a
+[[:alpha:]
+ok 2
+ok 2.1
+ok 3
+ok 4
+invalid character class
+== LANG=C ==
+p
+p
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+== LANG=en_US.UTF-8 ==
+p
+p
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+invalid collating symbols
+== LANG=C ==
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+== LANG=en_US.UTF-8 ==
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+argv[1] = 
+a\?
+argv[1] = 
+a\?
+a\a
+
+./tmp/a/b/c ./tmp/a/b/c ./tmp/a/b/c
+./tmp/a/b/c ./tmp/a/b/c ./tmp/a/b/c
+./tmp/a/b/c
+./tmp/a/b/c
+./tmp\/a/b/c
+./tm[p]\/a/b/c
+./tmp/a/b/c
+argv[1] = <./tmp/a/*>
+argv[1] = <./tmp/a/*>
+argv[1] = <./tmp/a/b/c>
+argv[1] = <./tmp/a/*>
+argv[1] = <./tmp/a/b/c>
+argv[1] = <./t\mp/a/*>
+argv[1] = <./tmp/a/b/c>
+argv[1] = <./tmp/a/>
+argv[1] = <./tmp/a/b/>
+argv[1] = <./t\mp/a/>
+argv[1] = <./t\mp/a/b/>
+argv[1] = <./tmp/a/*>
+argv[1] = <./tmp/a/b/c>
+argv[1] = <./tmp/a>
+argv[1] = <./tmp/a/b*>
+argv[1] = <./tmp/a>
+argv[1] = <./tmp/a/b*>
+argv[1] = <./tmp/>
+argv[1] = <\$foo>
+argv[2] = <\$foo>
+argv[1] = 
+
+<\.>
+*abc.c
+searchable/\.
+searchable/\./.
+readable/\.
+readable/\./.
+searchable/\.
+readable/\.
+searchable/.
+searchable/.
+searchable/.
+1: [qwe/qwe]
+2: [qwe/
+3: [qwe/]
+4:
+5: [qwe/
+6:
+a\*b
+a\*b*
+é/*
+é/*
+a aa b bb
+.a .aa .b .bb a aa b bb
+.a .aa .b .bb
+. .. .a .aa .b .bb
 argv[1] = 
 argv[2] = 
 argv[3] = 
@@ -13,7 +139,7 @@ argv[2] = 
 argv[3] = 
 argv[4] = 
 tmp/l1 tmp/l2 tmp/*4 tmp/l3
-./glob.tests: line 44: no match: tmp/*4
+./glob.tests: line 66: no match: tmp/*4
 argv[1] = 
 argv[1] = <*>
 argv[1] = 
diff --git a/tests/glob.tests b/tests/glob.tests
index d32988b..02d5302 100644
--- a/tests/glob.tests
+++ b/tests/glob.tests
@@ -1,18 +1,40 @@
+#   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 .
+#
 export LC_COLLATE=C
 #
 # test the shell globbing
 #
 expect()
 {
-	echo expect "$@"
+:	# if needed, change me to echo expect "$@"
 }
 
 # First, a test that bash-2.01.1 fails
 ${THIS_SH} ./glob1.sub
+${THIS_SH} ./glob2.sub
+${THIS_SH} ./glob3.sub
+${THIS_SH} ./glob4.sub
+${THIS_SH} ./glob5.sub
+${THIS_SH} ./glob6.sub
+${THIS_SH} ./glob7.sub
+${THIS_SH} ./glob8.sub
+${THIS_SH} ./glob9.sub
+${THIS_SH} ./glob10.sub
 
 MYDIR=$PWD	# save where we are
 
-TESTDIR=/tmp/glob-test
+TESTDIR=$TMPDIR/glob-test-$$
 mkdir $TESTDIR
 builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; }
 rm -rf *
diff --git a/tests/glob1.sub b/tests/glob1.sub
index 8745cd9..27c216b 100644
--- a/tests/glob1.sub
+++ b/tests/glob1.sub
@@ -1,7 +1,23 @@
+#   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 .
+#
 # bash-2.01.1 failed this test
-FN=/tmp/bash-glob.$$
+: ${TMPDIR:=/var/tmp}
+
+FN=$TMPDIR/bash-glob.$$
 mkdir $FN
 cd $FN
+
 mkdir foo
 mkdir foobar
 touch foo/bar
@@ -10,5 +26,5 @@ chmod 311 foo foobar
 echo f*/bar
 
 chmod 777 foo foobar
-cd /
+cd $OLDPWD
 rm -rf $FN
diff --git a/tests/glob10.sub b/tests/glob10.sub
new file mode 100644
index 0000000..7c14c0d
--- /dev/null
+++ b/tests/glob10.sub
@@ -0,0 +1,32 @@
+#   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 .
+#
+
+# test basic behavior of globskipdots
+TDIR=/tmp/dotglob-$$
+
+{ mkdir $TDIR && cd $TDIR; } || exit 1
+
+touch a b aa bb .a .b .aa .bb
+
+echo *
+shopt -s dotglob
+echo *
+
+shopt -s globskipdots
+echo .*
+shopt -u globskipdots
+echo .*
+
+cd $OLDPWD
+rm -rf $TDIR
diff --git a/tests/glob2.sub b/tests/glob2.sub
new file mode 100644
index 0000000..09cb6d5
--- /dev/null
+++ b/tests/glob2.sub
@@ -0,0 +1,65 @@
+#   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 .
+#
+. ./test-glue-functions
+
+# this locale causes problems all over the place
+if locale -a | grep -i '^zh_HK\.big5hkscs' >/dev/null ; then
+        :
+else
+        echo "glob2.sub: warning: you do not have the zh_HK.big5hkscs locale installed;" >&2
+        echo "glob2.sub: warning: that will cause some of these tests to fail." >&2
+fi
+
+var='ab\'
+
+case $var in
+ab\\)	echo ok 1;;
+*)	echo bad 1;;
+esac
+
+case $var in
+$var)	echo ok 2;;
+*)	echo bad 2;;
+esac
+
+case $var in
+'ab\')	echo ok 3;;
+*)	echo bad 3;;
+esac
+
+[[ $var = $var ]] && echo ok 4
+[[ $var = $'ab\134' ]] && echo ok 5
+
+LC_ALL=zh_HK.big5hkscs
+
+read a b c <<< $'\u3b1 b c\n'
+echo $b
+unset a b c
+
+export alpha=$'\u3b1'
+
+printf -v v 'A%sB' "$alpha" 
+recho "$v"
+IFS=$alpha read a b c <<<"$v"
+recho "$a"
+recho "$b"
+unset a b v
+
+recho "a${alpha}b"
+printf "%s" "a${alpha}b" | LC_ALL=C od -b | _intl_normalize_spaces
+
+a=$'\u3b1'
+[[ $a = $a ]] && echo ok 6
+
+LC_ALL=zh_HK.big5hkscs ${THIS_SH} -c $'[[ \u3b1 = \u3b1 ]]' && echo ok 7
diff --git a/tests/glob3.sub b/tests/glob3.sub
new file mode 100644
index 0000000..662c65e
--- /dev/null
+++ b/tests/glob3.sub
@@ -0,0 +1,163 @@
+#   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 .
+#
+: ${TMPDIR:=/var/tmp}
+
+TESTDIR=${TMPDIR}/glob-test-$$
+mkdir ${TESTDIR}
+cd $TESTDIR ||  {
+        echo "$TESTDIR: cannot cd" >&2
+        exit 1
+}
+
+matchfunc()
+{
+	echo == LANG=$LANG ==
+
+	touch a p
+	echo [[:alpha:]
+	rm a p
+
+	case l in
+	[[:alpha:])	echo bad 1;;
+	*)		echo ok 1;;
+	esac
+
+	touch '[a' '[x'
+	echo [[:alpha:]
+	rm '[a'
+	echo [[:alpha:]
+	rm '[x'
+
+	case [a in
+	[[:alpha:])	echo ok 2;;
+	*)		echo bad 2;;
+	esac
+
+	case x in
+	[[:aeioux:])	echo bad 2.1 ;;
+	*)		echo ok 2.1 ;;
+	esac
+
+	case [x in
+	[[:alpha:])	echo bad 3;;
+	*)		echo ok 3;;
+	esac
+
+	# unclosed bracket char class expression just matches against ":alpha"
+	case a in
+	[[:alpha])	echo ok 4;;
+	*)		echo bad 4;;
+	esac
+}
+
+echo invalid bracket expression
+export LANG=C
+matchfunc
+
+export LANG=en_US.UTF-8
+matchfunc
+
+unset -f matchfunc
+
+matchfunc()
+{
+	echo == LANG=$LANG ==
+
+	touch p
+	# quoted character classes work as if they were unquoted now
+	echo [[:alpha:]]
+	echo [[:"alpha":]]
+	rm -f p
+
+	case a] in
+	[[:aleph:]])	echo bad 1;;
+	*)		echo ok 1;;
+	esac
+
+	case a in
+	[[:aleph:]])	echo bad 2;;
+	*)		echo ok 2;;
+	esac
+
+	case a] in
+	[[:"alpha":]])	echo bad 3;;
+	*)		echo ok 3;;
+	esac
+
+	# Posix says quoted character class names work now
+	case x in
+	[[:"alpha":]])	echo ok 4;;
+	*)		echo bad 4;;
+	esac
+
+	case a in
+	[abc[:foo:]])	echo ok 5;;
+	*)		echo bad 5 ;;
+	esac
+
+	case a in
+	[[:foo:]abc])	echo ok 6;;
+	*)		echo bad 6 ;;
+	esac
+}
+
+echo invalid character class
+export LANG=C
+matchfunc
+
+export LANG=en_US.UTF-8
+matchfunc
+
+unset -f matchfunc
+
+matchfunc()
+{
+	echo == LANG=$LANG ==
+
+	case h in
+	[[.hyphen.])	echo bad 1;;
+	*)		echo ok 1;;
+	esac
+
+	case - in
+	[[.hyphen.]])	echo ok 2;;
+	*)		echo bad 2;;
+	esac
+
+	case slash in
+	[[.slash.]])	echo bad 3;;
+	*)		echo ok 3;;
+	esac
+
+	case a in
+	[abc[.nonsense.]])	echo ok 4;;
+	*)		echo bad 4 ;;
+	esac
+
+	case a in
+	[[.nonsense.]abc])	echo ok 5;;
+	*)		echo bad 5 ;;
+	esac
+}
+
+echo invalid collating symbols
+
+export LANG=C
+matchfunc
+
+export LANG=en_US.UTF-8
+matchfunc
+
+cd $OLDPWD
+rm -rf $TESTDIR
diff --git a/tests/glob4.sub b/tests/glob4.sub
new file mode 100644
index 0000000..779c854
--- /dev/null
+++ b/tests/glob4.sub
@@ -0,0 +1,41 @@
+#   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 .
+#
+: ${TMPDIR:=/var/tmp}
+
+FN=$TMPDIR/bash-glob.$$
+mkdir $FN || { echo "glob4.sub: cannot mkdir $FN" >&2 ; exit 1; }
+builtin cd $FN || { echo "glob4.sub: cannot change directory to $FN" >&2 ; exit 1; }
+rm -f *
+
+touch 'a?' aa
+
+set -- a \?; IFS=\\; var=$*;
+recho "$var"
+unset IFS; printf "%s\n" ${var}
+
+var='a\?'
+recho "$var"
+printf "%s\n" ${var}
+
+var='a\a'
+printf "%s\n" ${var}
+
+# shell's idea of a glob pattern and libglob's idea of a glob pattern have to
+# be identical
+PRE='\/'
+printf '<%s>\n' 'define'${PRE}'\
+/'
+
+builtin cd $OLDPWD
+rm -rf $FN
diff --git a/tests/glob5.sub b/tests/glob5.sub
new file mode 100644
index 0000000..a0dd623
--- /dev/null
+++ b/tests/glob5.sub
@@ -0,0 +1,78 @@
+#   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 .
+#
+[ $UID -eq 0 ] && { echo "glob5.sub: the test suite should not be run as root" >&2 ; }
+
+ORIGD=$PWD
+: ${TMPDIR:=/var/tmp}
+
+SD=$TMPDIR/bash-glob-$$
+[ -d $SD ] || mkdir $SD
+builtin cd $SD || { echo "glob5.sub: cannot change directory to $SD" >&2 ; exit 1; }
+mkdir tmp
+
+D=./tmp/a
+D1='./t\mp/a'
+
+mkdir -m700 ./tmp/a ./tmp/a/b
+touch ./tmp/a/b/c
+
+echo ./tmp/a/b/* "./tmp/a/"b/* "./tmp/a/b"/*
+
+chmod -r ./tmp/a            
+echo ./tmp/a/b/* "./tmp/a/"b/* "./tmp/a/b"/*
+echo "./tmp/a/b"/*
+
+bs=\\
+echo ./tmp${bs}/a/b/*
+echo ./tmp${bs}/a/b/c
+echo ./tm[p]${bs}/a/b/c
+echo ./t${bs}mp/a/b/*
+
+recho "./tmp/a"/*
+recho "$D"/*
+recho "$D"/b/*
+
+recho $D/*
+recho $D/b/*
+recho $D1/*
+recho $D1/b/*
+recho $D/
+recho $D/b/
+recho $D1/
+recho $D1/b/
+
+recho ./t\mp/a/*
+recho ./t\mp/a/b/*
+
+recho ./tmp/a*
+recho ./tmp/a/b*
+recho ./t\mp/a*
+recho ./t\mp/a/b*
+
+recho ./t\mp/
+
+chmod +r ./tmp/a
+rm -rf ./tmp/a
+
+a='$foo'
+b='$bar'
+a=$(echo "$a" | sed 's/\$/\\$/g')
+
+recho $a "$a"
+recho 'mixed'$a/
+
+unset a b
+
+cd $ORIGD
+rm -rf $SD
diff --git a/tests/glob6.sub b/tests/glob6.sub
new file mode 100644
index 0000000..8842983
--- /dev/null
+++ b/tests/glob6.sub
@@ -0,0 +1,69 @@
+#   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 .
+#
+# tests of the backslash-in-glob-patterns discussion on the austin-group ML
+[ $UID -eq 0 ] && { echo "glob6.sub: the test suite should not be run as root" >&2 ; }
+
+: ${TMPDIR:=/var/tmp}
+
+ORIG=$PWD
+GLOBDIR=$TMPDIR/bash-glob-$$
+mkdir $GLOBDIR || { echo "glob6.sub: cannot make directory $GLOBDIR" >&2 ; exit 1; }
+builtin cd $GLOBDIR || { echo "glob6.sub: cannot change directory to $GLOBDIR" >&2 ; exit 1; }
+
+# does the pattern matcher allow backslashes as escape characters and remove
+# them as part of matching?
+touch abcdefg
+pat='ab\cd*'
+printf '<%s>\n' $pat
+pat='\.'
+printf '<%s>\n' $pat
+rm abcdefg
+
+# how about when escaping pattern characters?
+touch '*abc.c'
+a='\**.c'
+printf '%s\n' $a
+rm -f '*abc.c'
+
+# how about when making the distinction between readable and searchable path
+# components?
+mkdir -m a=x searchable
+mkdir -m a=r readable
+
+p='searchable/\.'
+printf "%s\n" $p
+
+p='searchable/\./.'
+printf "%s\n" $p
+
+p='readable/\.'
+printf "%s\n" $p
+
+p='readable/\./.'
+printf "%s\n" $p
+
+printf "%s\n" 'searchable/\.'
+printf "%s\n" 'readable/\.'
+
+echo */.
+
+p='*/\.'
+echo $p
+
+echo */'.'
+
+rmdir searchable readable
+
+cd $ORIG
+rmdir $GLOBDIR
diff --git a/tests/glob7.sub b/tests/glob7.sub
new file mode 100644
index 0000000..0212b8e
--- /dev/null
+++ b/tests/glob7.sub
@@ -0,0 +1,11 @@
+# according to Posix 2.13.3, a slash in a bracket expression renders that
+# bracket expression invalid
+shopt -s nullglob
+
+echo 1: [qwe/qwe]
+echo 2: [qwe/
+echo 3: [qwe/]
+
+echo 4: [qwe\/qwe]
+echo 5: [qwe\/
+echo 6: [qwe\/]
diff --git a/tests/glob8.sub b/tests/glob8.sub
new file mode 100644
index 0000000..dca54fc
--- /dev/null
+++ b/tests/glob8.sub
@@ -0,0 +1,31 @@
+#   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 .
+#
+: ${TMPDIR:=/var/tmp}
+
+TESTDIR=${TMPDIR}/glob-test-$$
+mkdir ${TESTDIR}
+cd $TESTDIR ||  {
+        echo "$TESTDIR: cannot cd" >&2
+        exit 1
+}
+
+trap 'cd $OLDPWD && rm -rf $TESTDIR' EXIT
+
+var='a\'
+touch 'a*b' 'a\*b'
+
+printf '%s\n' $var\*b*
+
+var1=a\\$'\001'
+printf '%s\n' $var1\*b*
diff --git a/tests/glob9.sub b/tests/glob9.sub
new file mode 100644
index 0000000..ef2af2b
--- /dev/null
+++ b/tests/glob9.sub
@@ -0,0 +1,13 @@
+LANG=en_US.UTF-8	# safest
+: ${TMPDIR:=/var/tmp}
+HOME=${TMPDIR}
+
+mkdir ~/ಇಳಿಕೆಗಳು
+touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
+echo ~/ಇಳಿಕೆಗಳು/*.txt >/dev/null
+
+rm -rf ${TMPDIR}/ಇಳಿಕೆಗಳು
+
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
+echo é/*
+echo 'é'/*
diff --git a/tests/globstar.right b/tests/globstar.right
index b75d80b..c8211bc 100644
--- a/tests/globstar.right
+++ b/tests/globstar.right
@@ -153,3 +153,435 @@ alias.o builtins builtins/history.o builtins/jobs.o builtins/kill.o builtins/let
 bar/foo foo
 bar/foo/ foo/
 bar/foo/e bar/foo/f foo/a foo/b
+
+
+
+
+
+
+
+
+
+== <**/a> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+==  ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/**/**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/**/**/**/**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/**/a> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+==  ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+==  ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+==  ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/a/**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/a/**/**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/a/**/**/**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+== <**/**/a/**> ==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+a a/aa a/ab b b/bb b/bc c
+a/ b/ c/
+a/ab b b/bb
diff --git a/tests/globstar.tests b/tests/globstar.tests
index 9b1f9d2..33714b4 100644
--- a/tests/globstar.tests
+++ b/tests/globstar.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 : ${TMPDIR:=/var/tmp}
 dir=$PWD
 
@@ -39,3 +52,5 @@ cd $dir
 rm -rf $GDIR
 
 ${THIS_SH} ./globstar1.sub
+${THIS_SH} ./globstar2.sub
+${THIS_SH} ./globstar3.sub
diff --git a/tests/globstar1.sub b/tests/globstar1.sub
index 8b9e36d..7097f5d 100644
--- a/tests/globstar1.sub
+++ b/tests/globstar1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 shopt -s globstar
 wdir=$PWD
 
diff --git a/tests/globstar2.sub b/tests/globstar2.sub
new file mode 100644
index 0000000..ccf413b
--- /dev/null
+++ b/tests/globstar2.sub
@@ -0,0 +1,97 @@
+#   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 .
+#
+olddir=$PWD
+: ${TMPDIR:=/var/tmp}
+EMPTY=$TMPDIR/empty
+
+shopt -s globstar
+s()
+{
+  printf '== <%s> ==\n' "$@"
+}
+p()
+{
+  printf '<%q>\n' "$@"
+}
+
+mkdir -p $EMPTY/a/a/a
+cd $EMPTY
+
+# good
+p **
+p **/**
+p **/**/**
+
+rm -rf a
+mkdir -p $EMPTY/{a,b}/{a,b}/{a,b}/{a,b}
+cd $EMPTY
+
+# good
+s '**/a'
+p **/a
+
+# good
+s 'a/**'
+p a/**
+
+# good
+s '**'
+p **
+
+# good
+s '**/**'
+p **/**
+
+# good
+s '**/**/**'
+p **/**/**
+
+# good
+s '**/**/**/**/**'
+p **/**/**/**/**
+
+# good
+s '**/**/a'
+p **/**/a
+
+# good 
+s 'a/**/**'
+p a/**/**
+
+# good
+s 'a/**/**/**'
+p a/**/**/**
+
+# good
+s 'a/**/**/**/**'
+p a/**/**/**/**
+
+# same as ksh93
+s '**/a/**'
+p **/a/**
+
+# same as ksh93
+s '**/a/**/**'
+p **/a/**/**
+
+# same as ksh93
+s '**/a/**/**/**'
+p **/a/**/**/**
+
+# good
+s '**/**/a/**'
+p **/**/a/**
+
+cd "$olddir"
+rm -rf $EMPTY
diff --git a/tests/globstar3.sub b/tests/globstar3.sub
new file mode 100644
index 0000000..771d906
--- /dev/null
+++ b/tests/globstar3.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+olddir=$PWD
+: ${TMPDIR:=/var/tmp}
+
+SCRATCH=${TMPDIR}/scratch-$$
+rm -rf $SCRATCH
+mkdir $SCRATCH || exit 1
+
+cd $SCRATCH
+
+mkdir a b
+touch a/aa a/ab
+touch b/bb b/bc
+
+ln -s a c
+
+shopt -s globstar
+
+echo **
+echo **/
+
+echo **/*b
+
+cd "$olddir"
+rm -rf $SCRATCH
diff --git a/tests/heredoc.right b/tests/heredoc.right
index b8754de..cc193f6 100644
--- a/tests/heredoc.right
+++ b/tests/heredoc.right
@@ -1,3 +1,11 @@
+a
+b
+c
+a
+$PS4
+
+
+
 there
 one - alpha
 two - beta
@@ -20,7 +28,7 @@ jkl mno
 fff is a function
 fff () 
 { 
-    ed /tmp/foo  > /dev/null < /dev/null
 /^name/d
 w
 q
@@ -31,7 +39,7 @@ ENDOFINPUT
 fff is a function
 fff () 
 { 
-    ed /tmp/foo > /dev/null  < /dev/null
 /^name/d
 w
 q
@@ -43,11 +51,11 @@ foo is a function
 foo () 
 { 
     echo;
-    cat  <\END
+./heredoc3.sub: line 98: warning: here-document at line 96 delimited by end-of-file (wanted `EOF')
+./heredoc3.sub: line 99: syntax error: unexpected end of file
+heredoc1
+EOF
+Ok:0
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+1: OK
+2: OK
+3: OK
+4: OK
+5: OK
+6: OK
+7: OK
+1: OK
+2: OK
+3: OK
+4: OK
+5: OK
+5: OK
+1: ${x#$'no\t'}
+2: O${x#$'no\t'O}
+3: ${x#n$'o\t'}
+4: ${x#'no	'}
+5: ${x#$pat}
+6: ${y#$'not'}
+7: ${y#'not'}
+./heredoc7.sub: line 17: warning: command substitution: 1 unterminated here-document
+foo bar
+./heredoc7.sub: line 21: after: command not found
+./heredoc7.sub: line 29: warning: here-document at line 29 delimited by end-of-file (wanted `EOF')
+./heredoc7.sub: line 29: foobar: command not found
+./heredoc7.sub: line 30: EOF: command not found
+grep: *.c: No such file or directory
 comsub here-string
-./heredoc.tests: line 100: warning: here-document at line 98 delimited by end-of-file (wanted `EOF')
+./heredoc.tests: line 156: warning: here-document at line 154 delimited by end-of-file (wanted `EOF')
 hi
 there
diff --git a/tests/heredoc.tests b/tests/heredoc.tests
index 79bf4ce..d10a7c1 100644
--- a/tests/heredoc.tests
+++ b/tests/heredoc.tests
@@ -1,5 +1,46 @@
-# check order and content of multiple here docs
+#   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 .
+#
+# basics
+cat < /tmp/bash-zzz << EOF
+rm -f ${TMPDIR}/bash-zzz
+cat > ${TMPDIR}/bash-zzz << EOF
 abc
 EOF
-cat >> /tmp/bash-zzz << EOF
+cat >> ${TMPDIR}/bash-zzz << EOF
 def ghi
 jkl mno
 EOF
-cat /tmp/bash-zzz
-rm -f /tmp/bash-zzz
+cat ${TMPDIR}/bash-zzz
+rm -f ${TMPDIR}/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 </dev/null
+  ed ${TMPDIR}/foo </dev/null
 /^name/d
 w
 q
@@ -88,6 +129,21 @@ ${THIS_SH} -c 'type fff'
 
 ${THIS_SH} ./heredoc1.sub
 
+# test heredocs in command substitutions
+${THIS_SH} ./heredoc2.sub
+${THIS_SH} ./heredoc3.sub
+${THIS_SH} ./heredoc4.sub
+
+# heredoc tests that use different size documents to test pipe implementation
+${THIS_SH} ./heredoc5.sub
+
+# test $'...' and $"..." quoted strings in here-documents
+${THIS_SH} ./heredoc6.sub
+
+# interaction between here-documents and command substitutions
+${THIS_SH} ./heredoc7.sub
+
+
 echo $(
 	cat <<< "comsub here-string"
 )
diff --git a/tests/heredoc1.sub b/tests/heredoc1.sub
index 3f85ead..34977c5 100644
--- a/tests/heredoc1.sub
+++ b/tests/heredoc1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 foo()
 {
 	echo
diff --git a/tests/heredoc2.sub b/tests/heredoc2.sub
new file mode 100644
index 0000000..7e97ed8
--- /dev/null
+++ b/tests/heredoc2.sub
@@ -0,0 +1,9 @@
+TEST=$(cat <.
+#
+SAVEPWD=$PWD
+: ${TMPDIR:=/tmp}
+cd $TMPDIR || echo "heredoc3.sub: cannot cd to $TMPDIR" >&2
+
+text=$(cat </dev/null & touch 'x*x'
+x star x
+x*x
+wait $!
+echo end 'x*x'
+rm 'x*x'
+
+cat <\END'
+
+# gprof
+if [ -n "$GMON_OUT_PREFIX" ]; then
+	mv ${GMON_OUT_PREFIX}.[0-9]* "$SAVEPWD" >/dev/null 2>&1
+fi
+cd "$SAVEPWD"
+
+# this has to be last -- results in a syntax error
+# doesn't currently parse because EOF is not on a line by itself -- should it?
+(cat <.
+#
+# test here documents for sizes > 65536 (max pipe capacity I've seen),
+# 4096 < size < 65536 (for smaller pipe capacities)
+# 512 < size < 4096 (PIPE_BUF)
+#
+# There are tests in other scripts for here documents shorter than 512 bytes
+#
+# This should return the same results regardless of the pipe capacity
+
+: ${TMPDIR:=/tmp}
+FILENAME=${TMPDIR}/catfile-$$
+
+catfile()
+{
+	cat <<- EOF > $FILENAME
+		$(cat $1)
+EOF
+	cmp $FILENAME $1
+	rm -f $FILENAME
+}
+
+
+if [ -f $BUILD_DIR/y.tab.c ]; then
+	catfile $BUILD_DIR/y.tab.c
+else
+	catfile ../y.tab.c
+fi
+catfile ${BUILD_DIR}/config.h
+catfile ${BUILD_DIR}/version.h
diff --git a/tests/heredoc6.sub b/tests/heredoc6.sub
new file mode 100644
index 0000000..1d5fff0
--- /dev/null
+++ b/tests/heredoc6.sub
@@ -0,0 +1,50 @@
+#   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 .
+#
+
+# test $'...' and $"..." strings in here documents (problem through bash-5.1)
+
+pat=$'no\t'
+x=$'no\tOK'
+y=notOK
+
+cat <.
+#
+
+# should characters outside a command substitution be interpreted as a delimiter
+# for a here-document started inside it?
+echo $(cat << EOF)
+foo
+bar
+EOF
+after
+
+# should characters inside a command substitution be interpreted as a delimiter
+# for a here-document started outside of it?
+
+cat <.
+#
+# since we look at functions below, remove all functions now
+funcs=$(compgen -A function)
+if [ -n "$funcs" ]; then
+	unset -f $funcs
+fi
+
+# basics
+read x <<<"alpha"
+echo "$x"
+read x << /dev/null
+a b c d
+one two three four
+echo two ; echo four  
+one two three four
+echo four ; echo two
+!
+!
+!
+!
+!
+!
+!
+!
+!
+\!
+\!
+\!
+\!
+a
+b
+c
+echo "#!/bin/bash" set -o posix
+#!/bin/bash set -o posix
+!!
+!!
+a
+echo $(echo echo a)
+echo a
+a
+echo echo a $(echo echo a)
+echo a echo a
+b
+!! $(echo !!)
+c
+echo "echo c" "$(echo echo c)"
+echo c echo c
+d
+echo "echo d" $(echo "echo d")
+echo d echo d
+e
+!! !!
+f
+!!
+f
+!!
+g
+echo "echo g"
+echo g
+g
+eval echo "echo g"
+echo g
+h
+echo \!\! `echo echo h`
+!! echo h
+i
+echo echo i `echo echo i`
+echo i echo i
+j
+echo `echo j` echo j
+j echo j
+a
+cat < <(echo echo a)
+echo a
+b
+echo echo b `echo echo b`
+echo b echo b
+c
+!
+d
+!
+e
+! !
+./histexp4.sub: line 33: !': event not found
+/tmp/Step1
+echo /$(echo tmp)/Step1
+/tmp/Step1
+echo /<(echo tmp)/Step1 > /dev/null
+/tmp/Step1
+echo $(echo /tmp)/Step1
+/tmp/Step1
+echo <(echo /tmp)/Step1 > /dev/null
+/+(one|two|three)/Step1
+echo /+(one|two|three)/Step1
+/+(one|two|three)/Step1
+/*(tmp|dev|usr)/Step1
+echo /*(tmp|dev|usr)/Step1
+/*(tmp|dev|usr)/Step1
++(/one|/two|/three)/Step1
+echo +(/one|/two|/three)/Step1
++(/one|/two|/three)/Step1
+*(/tmp|/dev|/usr)/Step1
+echo *(/tmp|/dev|/usr)/Step1
+*(/tmp|/dev|/usr)/Step1
+one
+	echo echo one
+echo one
+echo one
+echo one
+    1  set -o histexpand
+    2  echo one
+    3  for f in a b c; do 	echo echo one; done
+    4  history
+two
+	echo echo two
+echo two
+echo two
+echo two
+    1  echo two
+    2  for f in a b c; do 	echo echo two; done
+    3  history
+a
+echo !!
+--between--
+echo !!
diff --git a/tests/histexp.tests b/tests/histexp.tests
index 721208c..91a36f2 100644
--- a/tests/histexp.tests
+++ b/tests/histexp.tests
@@ -1,11 +1,24 @@
+#   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 .
+#
 LC_ALL=C
 LANG=C
-trap 'rm /tmp/newhistory' 0
+trap 'rm $TMPDIR/newhistory' 0
 
 file=bax
 histchars='!^#'	# make sure history comment char is set correctly
 
-unset HISTFILESIZE
+unset HISTFILESIZE HISTTIMEFORMAT
 
 history -c
 
@@ -25,7 +38,7 @@ history -p '!!:z'
 
 history
 
-HISTFILE=/tmp/newhistory
+HISTFILE=$TMPDIR/newhistory
 history -a
 
 history -w
@@ -120,5 +133,26 @@ var2=var1
 echo ${!var2}
 
 # Bash-2.01[.1] fails this test -- it attempts history expansion after the
-# history_expansion_char
+# history_comment_char
 echo ok 3 # !1200
+
+# bash versions through bash-4.3 fail this; they make the digit preceding the
+# > into a separate word, changing the meaning of the redirection
+shopt a b c d 2>/dev/null
+echo !shopt-1
+
+echo !shopt*
+
+# make sure a :p modifier anywhere on the line affects all history expansions
+echo one two three four
+echo !:2:p ; echo !$  
+echo one two three four
+echo !$ ; echo !:2:p
+
+${THIS_SH} ./histexp1.sub
+${THIS_SH} ./histexp2.sub
+${THIS_SH} ./histexp3.sub
+${THIS_SH} ./histexp4.sub
+${THIS_SH} ./histexp5.sub
+${THIS_SH} ./histexp6.sub
+${THIS_SH} ./histexp7.sub
diff --git a/tests/histexp1.sub b/tests/histexp1.sub
new file mode 100644
index 0000000..cc2c5d1
--- /dev/null
+++ b/tests/histexp1.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+LC_ALL=C
+LANG=C
+
+set -o history
+set -H
+
+echo '!'
+echo "!"
+echo !
+
+echo "$( echo '!' )"
+echo "$( echo "!" )"
+echo "$( echo ! )"
+
+echo $( echo '!' )
+echo $( echo "!" )
+echo $( echo ! )
+
+echo "$( echo "\!" )"
+echo "\!"
+
+echo "$( echo '\!' )"
+echo '\!'
diff --git a/tests/histexp2.sub b/tests/histexp2.sub
new file mode 100644
index 0000000..bb5bfda
--- /dev/null
+++ b/tests/histexp2.sub
@@ -0,0 +1,14 @@
+LANG=C LC_ALL=C
+
+set -o history
+echo a
+echo b
+echo c
+
+set -o histexpand
+set -o posix
+
+echo "#!/bin/bash" !!
+
+echo '!!'
+echo "!!"
diff --git a/tests/histexp3.sub b/tests/histexp3.sub
new file mode 100644
index 0000000..4962436
--- /dev/null
+++ b/tests/histexp3.sub
@@ -0,0 +1,57 @@
+#   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 .
+#
+HISTFILE=${TMPDIR}/bashhist-$$
+
+set -o history
+set -o histexpand
+
+echo a
+echo $(echo !!)
+
+echo a
+echo !! $(echo !!)
+
+echo b
+echo '!!' '$(echo !!)'
+
+echo c
+echo "!!" "$(echo !!)"
+
+echo d
+echo "!!" $(echo "!!")
+
+echo e
+echo '!!' $(echo '!!')
+
+echo f
+echo '!!'
+echo f
+eval echo '!!'
+
+echo g
+echo "!!"
+echo g
+eval echo "!!"
+
+echo h
+echo \!\! `echo !!`
+
+echo i
+echo !! `echo !!`
+
+echo j
+echo `echo j` !!
+
+set +o history
+rm -f $HISTFILE		# just in case
diff --git a/tests/histexp4.sub b/tests/histexp4.sub
new file mode 100644
index 0000000..9cae0e3
--- /dev/null
+++ b/tests/histexp4.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+HISTFILE=$TMPDIR/bashhist-$$
+
+set -o history
+set -o histexpand
+
+echo a
+cat < <(echo !!)
+
+echo b
+echo !! `echo !!`
+
+echo c
+echo "$(echo "!" )"
+
+echo d
+echo "$(echo '!' )"
+
+echo e
+echo '!' "!"
+echo "'!'"
+
+set +o history
+rm -f $HISTFILE
diff --git a/tests/histexp5.sub b/tests/histexp5.sub
new file mode 100644
index 0000000..9e6d01b
--- /dev/null
+++ b/tests/histexp5.sub
@@ -0,0 +1,41 @@
+#   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 .
+#
+set -o history
+set -o histexpand
+
+# command and process substitutions should be tokenized as a single word
+echo /$(echo tmp)/Step1
+echo !:*
+echo /<(echo tmp)/Step1 >/dev/null
+echo !:*
+
+# same tests at the beginning of a word
+echo $(echo /tmp)/Step1
+echo !:*
+echo <(echo /tmp)/Step1 >/dev/null
+echo !:*
+
+# so should shell extended glob patterns
+shopt -s extglob
+
+echo /+(one|two|three)/Step1
+echo !:*
+echo /*(tmp|dev|usr)/Step1
+echo !:*
+
+# same tests at the beginning of a word
+echo +(/one|/two|/three)/Step1
+echo !:*
+echo *(/tmp|/dev|/usr)/Step1
+echo !:*
diff --git a/tests/histexp6.sub b/tests/histexp6.sub
new file mode 100644
index 0000000..d52e5ea
--- /dev/null
+++ b/tests/histexp6.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+unset HISTIGNORE
+HISTFILE=$TMPDIR/bashhist-$$
+
+set -o history
+set -o histexpand
+
+echo one
+
+for f in a b c; do
+	echo !!
+done
+
+history
+history -c
+
+echo two
+for f in a b c; do
+	echo !-1
+done
+
+history
+
+set +o history
+rm -f $HISTFILE
diff --git a/tests/histexp7.sub b/tests/histexp7.sub
new file mode 100644
index 0000000..8822205
--- /dev/null
+++ b/tests/histexp7.sub
@@ -0,0 +1,18 @@
+# make sure history expansion doesn't take place while parsing command
+# substitutions
+
+set -o history
+set -o histexpand
+echo a
+
+echo $( cat <.
+#
+trap 'rm $TMPDIR/newhistory' 0
 
 # bad options
 history -x
@@ -20,6 +33,7 @@ HISTFILE=history.list
 HISTCONTROL=ignoreboth
 HISTIGNORE='&:history*:fc*'
 HISTSIZE=32
+export HISTIGNORE
 
 shopt -s cmdhist
 set -o history
@@ -39,7 +53,7 @@ history -p '!!'
 
 fc -nl
 
-HISTFILE=/tmp/newhistory
+HISTFILE=$TMPDIR/newhistory
 history -a
 echo displaying \$HISTFILE after history -a
 cat $HISTFILE
@@ -72,6 +86,7 @@ unset HISTFILE
 fc -l 4
 fc -l 4 8
 
+# now an out-of-range error because of the one=two not found in history
 fc -l one=two three=four 502
 
 history 4
@@ -109,5 +124,10 @@ shopt -q -o history
 echo $?
 
 ${THIS_SH} ./history1.sub
+rm -f $TMPDIR/foohist-*
 
 ${THIS_SH} ./history2.sub
+${THIS_SH} ./history3.sub
+${THIS_SH} ./history4.sub
+${THIS_SH} ./history5.sub
+${THIS_SH} ./history6.sub
diff --git a/tests/history1.sub b/tests/history1.sub
index 543a3e8..b67a0ef 100644
--- a/tests/history1.sub
+++ b/tests/history1.sub
@@ -1,4 +1,19 @@
-HISTFILE=foohist-$$
+#   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 .
+#
+trap 'rm -f $HISTFILE' 0 1 2 3 6 15
+
+HISTFILE=$TMPDIR/foohist-$$
 unset HISTIGNORE HISTCONTROL
 set -o history
 
diff --git a/tests/history3.sub b/tests/history3.sub
new file mode 100644
index 0000000..d8a2203
--- /dev/null
+++ b/tests/history3.sub
@@ -0,0 +1,49 @@
+#   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 .
+#
+: ${TMPDIR:=/tmp}
+
+set -o history
+HISTFILE=$TMPDIR/history-$$
+
+history -c
+
+echo a
+echo b
+echo c
+echo d
+echo e
+
+history ; echo 
+
+history -d 2-4
+
+history
+
+echo f
+echo g
+echo h
+echo i
+history -d 6--1
+history ; echo
+
+history -d 16-40
+history -d 1-200
+history -d -20-50
+history -d 1--50
+history -d 5-0xaf
+
+history ; echo
+
+unset HISTFILE
+exit 0
diff --git a/tests/history4.sub b/tests/history4.sub
new file mode 100644
index 0000000..651374c
--- /dev/null
+++ b/tests/history4.sub
@@ -0,0 +1,47 @@
+#   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 .
+#
+HISTFILE=$TMPDIR/newhistory-$$
+export HISTFILE
+
+trap 'rm -f $HISTFILE' EXIT
+
+HISTSIZE=32
+HISTFILESIZE=32
+echo
+set -o history
+history -c
+echo 0
+echo 1
+echo 2
+echo "(left
+mid
+right)"
+echo A
+echo B
+history -w
+set +o history
+
+echo
+printf $'HISTFILE=\n\cRleft\cO\cO\cO\cO\n' | HISTSIZE= ${THIS_SH} --norc -i 2>/dev/null
+echo
+printf $'HISTFILE=\n\cRleft\cO\cO\cO\cO\n' | HISTSIZE=8 ${THIS_SH} --norc -i 2>/dev/null
+
+input="$(cat $HISTFILE)
+"$'\cP\cP\cP\cO\cO
+'
+
+echo
+printf "$input" | HISTSIZE= HISTFILE= ${THIS_SH} --norc -i 2>/dev/null
+echo
+printf "$input" | HISTSIZE=6 HISTFILE= ${THIS_SH} --norc -i 2>/dev/null
diff --git a/tests/history5.sub b/tests/history5.sub
new file mode 100644
index 0000000..245c28d
--- /dev/null
+++ b/tests/history5.sub
@@ -0,0 +1,57 @@
+#   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 .
+#
+
+trap 'rm -f "$OUT"' 0 1 2 3 6 15
+
+HISTFILE=$TMPDIR/fchist-$$ ; OUT=$HISTFILE
+unset HISTIGNORE HISTCONTROL
+set -o history
+
+echo a
+echo b
+
+fc -0	# error
+fc -s -0	# error
+
+fc -l
+
+echo c
+fc -l 0
+fc -l -0
+
+echo d
+fc -s 0
+
+HISTSIZE=4
+history -c
+
+echo a
+echo b
+echo c
+echo d
+echo e
+echo f
+fc -l
+
+echo out of range 1
+fc -l 502 498
+echo out of range 2
+fc -l 498 502
+echo out of range 3
+fc -l 1 99
+# other out-of-range behavior for future work
+echo out of range 4
+fc -l -20 -40
+
+unset HISTFILE	# suppress writing history file
diff --git a/tests/history6.sub b/tests/history6.sub
new file mode 100644
index 0000000..a21d8d3
--- /dev/null
+++ b/tests/history6.sub
@@ -0,0 +1,55 @@
+#   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 .
+#
+: ${TMPDIR:=/tmp}
+
+HISTFILE=${TMPDIR}/history-$$
+HISTSIZE=4
+HISTIGNORE="history*"
+
+set -o history
+
+history -c
+
+echo 1
+echo 2
+echo 3
+echo 4
+echo 5
+echo 6
+
+history
+
+history -d -1
+history
+
+echo 6
+echo 7
+
+history
+history -d -1
+history
+
+echo 7
+echo 8
+history -d -2--1
+history
+
+echo 9
+echo 10
+history
+history -d 5-7
+history
+
+unset HISTFILE
+exit 0
diff --git a/tests/ifs-posix.tests b/tests/ifs-posix.tests
index cf9a898..21a9063 100644
--- a/tests/ifs-posix.tests
+++ b/tests/ifs-posix.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # Usage: $SHELL ifs.sh
 #
 # This script generates 6856 tests for the set(1) and read(1)
diff --git a/tests/ifs.right b/tests/ifs.right
index 512f6ee..465efcf 100644
--- a/tests/ifs.right
+++ b/tests/ifs.right
@@ -8,3 +8,5 @@ a:b:c:d:e
 a:b:c:d:e
 a b c d e
 a b c d e
+argv[1] = 
+argv[1] = <*>
diff --git a/tests/ifs.tests b/tests/ifs.tests
index 763e2a0..27f27dd 100644
--- a/tests/ifs.tests
+++ b/tests/ifs.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 OIFS="$IFS"
 IFS=":$IFS"
 eval foo="a:b:c"
@@ -59,3 +72,5 @@ IFS=: export x
 echo $x
 
 IFS="$DEFIFS"
+
+${THIS_SH} ./ifs1.sub
diff --git a/tests/ifs1.sub b/tests/ifs1.sub
new file mode 100644
index 0000000..6ea489a
--- /dev/null
+++ b/tests/ifs1.sub
@@ -0,0 +1,14 @@
+: ${TMPDIR:=/tmp}
+dir=bashtest-$$
+
+mkdir $TMPDIR/$dir || exit 1
+touch $TMPDIR/$dir/file || exit 2
+cd $TMPDIR/$dir || exit 3
+
+IFS='?*[]'
+recho *
+
+recho "*"
+
+cd $OLDPWD
+rm -rf $TMPDIR/$dir
diff --git a/tests/intl.right b/tests/intl.right
index 449d5b0..7da9919 100644
--- a/tests/intl.right
+++ b/tests/intl.right
@@ -6,8 +6,52 @@ B
 ok 1
 ok 2
 aéb
-0000000   141 303 251 142                                                
+0000000 141 303 251 142
 0000004
 -абвгдежзиклмноп - 16
 -абвгдежзиклмноп- 15
 -абвгд- 5
+1,0000
+1.0000
+1.0000
+1.0000
+1.0000
+1,0000
+1
+bytematch
+0000000 254 012
+0000002
+Passed all 1378 Unicode tests
+0000000 303 277 012
+0000003
+0000000 303 277 012
+0000003
+0000000 303 277 012
+0000003
+0000000 303 277 012
+0000003
+0000000 357 277 277 012
+0000004
+0000000 357 277 277 012
+0000004
+0000000 012
+0000001
+0000000 012
+0000001
+0000000 012
+0000001
+0000000 012
+0000001
+0000000 303 277 012
+0000003
+0000000 303 277 012
+0000003
+0000000 303 277 012
+0000003
+0000000 101 040 302 243 040 305 222 012
+0000010
+./unicode3.sub: line 5: $'5\247@3\231+\306S8\237\242\352\263': command not found
+./unicode3.sub: line 7: cd: $'5\247@3\231+\306S8\237\242\352\263': No such file or directory
+$'5\247@3\231+\306S8\237\242\352\263'
++ : $'5\247@3\231+\306S8\237\242\352\263'
++ set +x
diff --git a/tests/intl.tests b/tests/intl.tests
index cd919df..c4ff02c 100644
--- a/tests/intl.tests
+++ b/tests/intl.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 export LC_ALL=en_US.UTF-8
 
 a=$'\303\251'
@@ -35,7 +48,21 @@ esac
 set a b
 
 printf '%s\n' "$*"
-printf '%s' "$*" | od -b
+
+. ./test-glue-functions
+
+printf '%s' "$*" | od -b | _intl_normalize_spaces
 
 # display differences make this problematic
 ${THIS_SH} ./intl1.sub
+
+# this tests both international handling in printf and temporary environments
+${THIS_SH} ./intl2.sub
+
+# test splitting on characters instead of bytes
+${THIS_SH} ./intl3.sub
+
+${THIS_SH} ./unicode1.sub # 2>/dev/null
+${THIS_SH} ./unicode2.sub
+
+${THIS_SH} ./unicode3.sub 2>&1
diff --git a/tests/intl2.sub b/tests/intl2.sub
new file mode 100644
index 0000000..2f3236e
--- /dev/null
+++ b/tests/intl2.sub
@@ -0,0 +1,31 @@
+#   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 .
+#
+# this locale causes problems all over the place
+unset LC_ALL LC_NUMERIC
+if locale -a | grep -i '^de_DE\.UTF.*8' >/dev/null ; then
+	export LANG=de_DE.UTF-8
+else
+	echo "intl2.sub: warning: you do not have the de_DE.UTF-8 locale installed;" >&2
+	echo "intl2.sub: that will cause some of these tests to fail." >&2
+fi
+
+printf '%.4f\n' 1
+
+LANG=C printf '%.4f\n' 1
+LANG=C /usr/bin/printf '%.4f\n' 1
+
+env LANG=C printf '%.4f\n' 1
+(LANG=C; printf '%.4f\n' 1)
+
+printf '%.4f\n' 1
diff --git a/tests/intl3.sub b/tests/intl3.sub
new file mode 100644
index 0000000..56c8678
--- /dev/null
+++ b/tests/intl3.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+. ./test-glue-functions
+
+# more tests to make sure that IFS splits on characters, not bytes
+export LANG=en_US.UTF-8
+
+euro=$'\342\202\254'
+o342=$'\342'
+o202=$'\202'
+o254=$'\254'
+
+IFS=$o254
+t=+$euro+
+set -- $t
+
+echo "$#"
+
+# but matching still occurs on bytes if we don't have a valid multibyte char
+case $euro in
+*$o202*)	echo bytematch ;;
+*)		echo mbchar match ;;
+esac
+
+echo "${euro##*$o202}" | od -b | _intl_normalize_spaces
diff --git a/tests/invert.tests b/tests/invert.tests
index 8393d95..f339d41 100644
--- a/tests/invert.tests
+++ b/tests/invert.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # tests of return value inversion
 # placeholder for future expansion
 
diff --git a/tests/iquote.right b/tests/iquote.right
index d164f10..9476128 100644
--- a/tests/iquote.right
+++ b/tests/iquote.right
@@ -59,3 +59,34 @@ argv[1] = 
 argv[1] = 
 argv[1] = 
 argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <^?>
+argv[1] = <^? >
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?x>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?>
+argv[1] = < ^?x>
+argv[1] = <^?x>
+argv[1] = <^?>
+argv[1] = < ^? x>
+argv[1] = <^? x>
+argv[1] = <^? >
diff --git a/tests/iquote.tests b/tests/iquote.tests
index a2cdf4f..8411c8a 100644
--- a/tests/iquote.tests
+++ b/tests/iquote.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # bug in bash up to and including bash-3.0 (including patches)
 #
 # problem is conflict between CTLNUL used internally to denote quoted null
@@ -141,3 +154,5 @@ recho aaa$'\177'bbb
 recho ccc""ddd
 recho "eeefff"
 recho ggg"$(echo $'\177')"hhh
+
+${THIS_SH} ./iquote1.sub
diff --git a/tests/iquote1.sub b/tests/iquote1.sub
new file mode 100644
index 0000000..685a80e
--- /dev/null
+++ b/tests/iquote1.sub
@@ -0,0 +1,56 @@
+#   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 .
+#
+# Problems with variables that expand to 0x7f and quoted nulls in the same
+# expansion -- affects bash versions 4.0-post 4.2
+a=x
+b=
+del=$'\x7f'
+
+set ""
+
+recho ${undef-"x$*y"}
+recho "x$*y"
+recho x"$*"y
+recho x"$del"y
+
+recho ${undef-"$@"}
+recho "$@"
+recho "${@}"
+recho ${undef-"$*"}
+recho "$*"
+recho "${*}"
+
+recho "$del${a#x}"
+recho "$del ${a#x}"
+recho " $del${a#x}"
+
+recho " $del$b"
+recho " $del${b}"
+recho " $del${b#x}"
+recho " $del${a#x}"
+
+recho " $del${a%x}"
+recho " $del${a:0:0}"
+recho " $del"${a:0:0}
+recho " $del""${a:0:0}"
+recho " $del${a}"
+recho " $del"
+recho " ${del}${a:0:0}"
+recho " ${del:0:1}${a:0:0}"
+recho " ${del:0:1}${a}"
+recho "${del:0:1}${a#d}"
+recho "${del:0:1}${a#x}"
+recho " ${del:0:1} ${a}"
+recho "${del:0:1} ${a#d}"
+recho "${del:0:1} ${a#x}"
diff --git a/tests/jobs.right b/tests/jobs.right
index a4c8a7c..0510e04 100644
--- a/tests/jobs.right
+++ b/tests/jobs.right
@@ -16,53 +16,68 @@ 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 ) &
+[1]   Running                 sleep 2 &
+[2]   Running                 sleep 2 &
+[3]   Running                 sleep 2 &
+[4]-  Running                 sleep 2 &
+[5]+  Running                 ( sleep 2; exit 4 ) &
 4
 0
 i killed it
+12
+[1]-  Running                 sleep 20 &
+[3]+  Running                 sleep 20 &
+5: ok 1
+./jobs5.sub: line 40: wait: %8: no such job
+2: ok 2
+2: ok 3
+127
+./jobs5.sub: line 71: declare: wpid: not found
+child1 exit status 0
+[1]+ Running sleep 20 &
+./jobs7.sub: line 5: fg: no current jobs
+[1]+ Running sleep 20 &
 0
-./jobs.tests: line 19: wait: %1: no such job
-./jobs.tests: line 24: fg: no job control
+./jobs.tests: line 40: wait: %1: no such job
+./jobs.tests: line 45: 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
+./jobs.tests: line 58: wait: `1-1': not a pid or valid job spec
+./jobs.tests: line 59: 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
+posix jobs output
+[1]+  Done                    sleep 1
 wait-for-job
-./jobs.tests: line 60: wait: %2: no such job
+./jobs.tests: line 84: wait: %2: no such job
 127
 async list wait-for-job
 forked
 fg-bg 1
-sleep 5
+sleep 2
 fg-bg 2
-sleep 5
+sleep 2
 fg-bg 3
-sleep 5
+sleep 2
 fg-bg 4
-sleep 5
+sleep 2
 fg-bg 5
-./jobs.tests: line 87: fg: %2: no such job
-./jobs.tests: line 88: bg: job 1 already in background
+./jobs.tests: line 111: fg: %2: no such job
+./jobs.tests: line 112: bg: job 1 already in background
 fg-bg 6
-./jobs.tests: line 95: fg: -s: invalid option
+./jobs.tests: line 119: fg: -s: invalid option
 fg: usage: fg [job_spec]
-./jobs.tests: line 96: bg: -s: invalid option
+./jobs.tests: line 120: 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
+./jobs.tests: line 125: disown: -s: invalid option
+disown: usage: disown [-h] [-ar] [jobspec ... | pid ...]
+./jobs.tests: line 129: disown: %1: no such job
+./jobs.tests: line 132: disown: %2: no such job
 wait-for-non-child
-./jobs.tests: line 111: wait: pid 1 is not a child of this shell
+./jobs.tests: line 135: wait: pid 1 is not a child of this shell
 127
 3 -- 1 2 3 -- 1 - 2 - 3
 [1]   Running                 sleep 300 &
@@ -72,8 +87,8 @@ 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
+./jobs.tests: line 152: kill: %4: no such job
+./jobs.tests: line 154: jobs: %4: no such job
 current job:
 [3]+  Running                 sleep 400 &
 previous job:
@@ -101,5 +116,5 @@ after kill -STOP, backgrounding %3:
 killing...
 done
 after KILL -STOP, foregrounding %1
-sleep 10
+sleep 4
 done
diff --git a/tests/jobs.tests b/tests/jobs.tests
index e2acba5..dacdc15 100644
--- a/tests/jobs.tests
+++ b/tests/jobs.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # test out %+, jobs -p, and $! agreement in a subshell first
 ${THIS_SH} ./jobs1.sub
 
@@ -12,6 +25,14 @@ ${THIS_SH} ./jobs3.sub
 # active
 ${THIS_SH} ./jobs4.sub
 
+# test out wait -n framework
+${THIS_SH} ./jobs5.sub
+
+# test out wait -f framework
+${THIS_SH} ./jobs6.sub
+
+${THIS_SH} ./jobs7.sub
+
 jobs
 echo $?
 
@@ -30,7 +51,7 @@ wait    # make sure we reap the processes while stderr is still redirected
 exec 2>&5
 
 echo wait-for-pid
-sleep 10 &
+sleep 4 &
 wait $!
 
 echo wait-errors
@@ -38,52 +59,55 @@ wait 1-1
 wait -- -4
 
 echo wait-for-background-pids
-sleep 5 &
-sleep 8 &
+sleep 2 &
+sleep 4 &
 wait
 
 echo async list wait-for-background-pids
-sleep 5 & sleep 8 &
+sleep 2 & sleep 4 &
 wait
 
 echo async list wait for child
-sleep 5 & echo forked
+sleep 2 & echo forked
 wait
 
 echo wait-when-no-children
 wait
 
+echo posix jobs output
+${THIS_SH} -o posix -c 'sleep 1 & P=$! ; sleep 2; jobs; wait'
+
 set -m
 
 echo wait-for-job
-sleep 5 &
+sleep 3 &
 wait %2		# this should be a no-such-job error
 echo $?
 wait %1
 
 echo async list wait-for-job
-sleep 5 & echo forked
+sleep 2 & echo forked
 wait %1
 
 echo fg-bg 1
-sleep 5 &
+sleep 2 &
 %1
 
 echo fg-bg 2
-sleep 5 &
+sleep 2 &
 fg %%
 
 echo fg-bg 3
-sleep 5 &
+sleep 2 &
 fg %s
 
 echo fg-bg 4
-sleep 5 &
+sleep 2 &
 fg %?ee
 
 # these next two are error cases
 echo fg-bg 5
-sleep 15 &
+sleep 2 &
 fg %2		# this should be a no-such-job error
 bg %1		# this should be a `bg background job?' error
 wait
@@ -91,7 +115,7 @@ 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 &
+sleep 2 &
 fg -s %1
 bg -s %1
 wait
@@ -134,7 +158,7 @@ echo previous job:
 jobs %-
 
 kill -STOP %2
-sleep 5	# give time for the shell to get the stop notification
+sleep 3	# give time for the shell to get the stop notification
 echo after kill -STOP
 echo running jobs:
 jobs -r
@@ -158,7 +182,7 @@ echo stopped jobs:
 jobs -s
 
 kill -STOP %3
-sleep 5	# give time for the shell to get the stop notification
+sleep 3	# give time for the shell to get the stop notification
 echo after kill -STOP, backgrounding %3:
 bg %3
 
@@ -176,9 +200,9 @@ echo done
 
 exec 2>&5
 
-sleep 10 &
+sleep 4 &
 kill -STOP %1
-sleep 5	# give time for the shell to get the stop notification
+sleep 2	# give time for the shell to get the stop notification
 echo after KILL -STOP, foregrounding %1
 fg %1
 
diff --git a/tests/jobs1.sub b/tests/jobs1.sub
index aa9a372..84919d9 100644
--- a/tests/jobs1.sub
+++ b/tests/jobs1.sub
@@ -1,8 +1,21 @@
+#   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 .
+#
 # make sure that jobs -p, %+, and $! all agree
 set -m
 sleep 60 &
 
-FN=/tmp/jobs-pid.$$
+FN=$TMPDIR/jobs-pid.$$
 
 pid1=$!
 jobs -p %+ > $FN
diff --git a/tests/jobs3.sub b/tests/jobs3.sub
index 6efd58b..1337fc1 100644
--- a/tests/jobs3.sub
+++ b/tests/jobs3.sub
@@ -1,4 +1,17 @@
-#! /bin/bash
+#   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 .
+#
+
 NJOB=8
 i=0
 
diff --git a/tests/jobs4.sub b/tests/jobs4.sub
index 2eb4197..9f1cd04 100644
--- a/tests/jobs4.sub
+++ b/tests/jobs4.sub
@@ -1,12 +1,25 @@
+#   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 .
+#
 # test being able to use job control notation in jobs/kill/wait without
 # job control active, as the SUS requires
 
-sleep 5 &
+sleep 2 &
 
-sleep 5 &
-sleep 5 &
-sleep 5 &
-(sleep 5 ; exit 4) &
+sleep 2 &
+sleep 2 &
+sleep 2 &
+(sleep 2 ; exit 4) &
 
 jobs
 
@@ -21,4 +34,6 @@ wait
 # the sleep is intended to give the kill time to execute before the job
 # exits
 (sleep 1 ; cat ) &
+# suppress any message about terminated process
+exec 2>/dev/null
 kill -1 %% && echo i killed it || echo could not kill it
diff --git a/tests/jobs5.sub b/tests/jobs5.sub
new file mode 100644
index 0000000..e348f2e
--- /dev/null
+++ b/tests/jobs5.sub
@@ -0,0 +1,71 @@
+#   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 .
+#
+
+# framework to test new `wait -n' option that waits for any job to finish
+
+set -m
+
+sleep 20 &
+{ sleep 2; exit 12; } &
+sleep 20 &
+
+wait -n
+echo $?
+
+jobs
+disown -a
+
+{ sleep 1 ; exit 4; } &
+{ sleep 2 ; exit 5; } & bgpid1=$!
+{ sleep 4 ; exit 6; } &
+
+wait -p wvar -n %2 %3
+case "$wvar" in
+$bgpid1)	echo $?: ok 1;;
+*)		echo bad 1;;
+esac
+
+{ sleep 1 ; exit 2; } & bgpid2=$!
+wait -p wvar -n %8 $!
+case $wvar in
+$bgpid2)	echo $?: ok 2;;
+*)		echo bad 2;;
+esac
+
+disown -a
+
+{ sleep 3; exit 1; } & { sleep 1; exit 2; } & bgpid3=$!
+{ sleep 3; exit 3; } & { sleep 3; exit 4; } &
+
+wait -n -p wpid %1 %2 %3 %4
+
+case $wpid in
+$bgpid3)	echo $?: ok 3;;
+*)		echo bad 3 ;;
+esac
+
+disown -a
+
+unset bgpid1 bgpid2 bgpid3
+unset wpid
+
+# now that we have no jobs, make sure that wait -n -p var leaves var unset
+jobs
+wait -n -p wpid
+echo $wpid $?
+
+# make sure wait -p var does something useful without the -n option
+jobs
+wait -p wpid
+declare -p wpid
diff --git a/tests/jobs6.sub b/tests/jobs6.sub
new file mode 100644
index 0000000..9ed59ee
--- /dev/null
+++ b/tests/jobs6.sub
@@ -0,0 +1,14 @@
+# framework to test `wait -f' which forces wait until a job exits
+set -o monitor
+sleep 5 &
+child1=$!
+
+( sleep 1; kill -STOP $child1 ; sleep 1 ; kill -CONT $child1 )&
+
+child2=$!
+
+wait -f %1
+echo child1 exit status $?
+
+wait $child2
+exit 0
diff --git a/tests/jobs7.sub b/tests/jobs7.sub
new file mode 100644
index 0000000..582365f
--- /dev/null
+++ b/tests/jobs7.sub
@@ -0,0 +1,8 @@
+# make sure fg in a subshell doesn't try to start a parent's job
+set -m
+sleep 20 &
+echo $(jobs)
+echo $(fg %% ; jobs)
+# suppress any message about sleep 20 being terminated
+exec 2>/dev/null
+kill %1
diff --git a/tests/lastpipe.right b/tests/lastpipe.right
new file mode 100644
index 0000000..84e1e2e
--- /dev/null
+++ b/tests/lastpipe.right
@@ -0,0 +1,22 @@
+after 1: foo = a b c
+after 2: tot = 6
+after: 7
+last = c
+1 -- 142 1
+0 -- 0 1 0
+1 -- 0 0 1
+1 -- 0 0 1
+1 -- 0 1 0
+lastpipe1.sub returns 14
+A1
+A2
+B1
+B2
+HI
+A1
+A2
+B1
+B2
+HI -- 42 -- 0 42
+x=x
+x=x
diff --git a/tests/lastpipe.tests b/tests/lastpipe.tests
new file mode 100644
index 0000000..f9d669d
--- /dev/null
+++ b/tests/lastpipe.tests
@@ -0,0 +1,74 @@
+#   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 .
+#
+binfalse()
+{
+	$binfalse || return 1	# normalize return value
+}
+
+if [ -x /usr/bin/true ]; then
+	bintrue=/usr/bin/true
+elif [ -x /bin/true ]; then
+	bintrue=/bin/true
+else
+	bintrue=true
+fi
+if [ -x /usr/bin/false ]; then
+	binfalse=/usr/bin/false
+elif [ -x /bin/false ]; then
+	binfalse=/bin/false
+else
+	binfalse=false
+fi
+
+shopt -s lastpipe
+
+unset foo bar
+echo a b c | read foo
+echo after 1: foo = $foo
+
+unset tot
+declare -i tot
+printf "%d\n" 1 2 3 | while read foo; do tot+=$foo; done
+echo after 2: tot = $tot
+
+unset bar
+echo g h i | bar=7
+echo after: $bar
+
+unset foo last
+printf "%s\n" a b c | while read foo; do last=$foo; done
+echo last = $last
+
+exit 142 | false
+echo $? -- ${PIPESTATUS[@]}
+
+true | false | $bintrue
+echo $? -- ${PIPESTATUS[@]}
+
+true | $bintrue | false
+echo $? -- ${PIPESTATUS[@]}
+
+set -o pipefail
+true | $bintrue | false
+echo $? -- ${PIPESTATUS[@]}
+
+true | binfalse | true
+echo $? -- ${PIPESTATUS[@]}
+set +o pipefail
+
+${THIS_SH} ./lastpipe1.sub
+echo lastpipe1.sub returns $?
+
+${THIS_SH} ./lastpipe2.sub
+${THIS_SH} ./lastpipe3.sub
diff --git a/tests/lastpipe1.sub b/tests/lastpipe1.sub
new file mode 100644
index 0000000..43711e3
--- /dev/null
+++ b/tests/lastpipe1.sub
@@ -0,0 +1,5 @@
+# with lastpipe set, exit at the end of a pipeline exits
+# the calling shell
+shopt -s lastpipe
+exit 142 | exit 14
+echo after: $?
diff --git a/tests/lastpipe2.sub b/tests/lastpipe2.sub
new file mode 100644
index 0000000..a460286
--- /dev/null
+++ b/tests/lastpipe2.sub
@@ -0,0 +1,43 @@
+#   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 .
+#
+shopt -s lastpipe
+echo -e 'A\nB' | while read letter; do
+    echo -e '1\n2' | while read digit; do
+        echo $letter$digit
+    done
+done
+
+myPipefunc()
+{
+    cat | tee $TMPDIR/outfile
+}
+echo HI | myPipefunc
+
+echo -e 'A\nB' | while read letter; do
+    echo -e '1\n2' | while read digit; do
+        echo $letter$digit | myPipefunc
+    done
+done
+
+rm -f $TMPDIR/outfile
+
+unset -f myPipefunc
+myPipefunc()
+{
+    cat | read var
+    return 42
+}
+echo HI | myPipefunc
+
+echo $var -- $? -- ${PIPESTATUS[@]}
diff --git a/tests/lastpipe3.sub b/tests/lastpipe3.sub
new file mode 100644
index 0000000..b9222b8
--- /dev/null
+++ b/tests/lastpipe3.sub
@@ -0,0 +1,11 @@
+# problem in bash-5.1 running lastpipe in subshell if fd 0 is closed
+
+shopt -s lastpipe
+exec 0<&-
+
+echo x | read x
+echo x=$x
+unset x
+
+echo x | cat | read x
+echo x=$x
diff --git a/tests/mapfile.right b/tests/mapfile.right
index 1e73eb1..4452232 100644
--- a/tests/mapfile.right
+++ b/tests/mapfile.right
@@ -31,28 +31,49 @@ a[0] 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 [0] Abcdefghijklmnop
+
+1 [1] aBcdefghijklmnop
+
+2 [2] abCdefghijklmnop
+
+3 [3] abcDefghijklmnop
+
+4 [4] abcdEfghijklmnop
+
+5 [5] abcdeFghijklmnop
+
+6 [6] abcdefGhijklmnop
+
+7 [7] abcdefgHijklmnop
+
+8 [8] abcdefghIjklmnop
+
+9 [9] abcdefghiJklmnop
+
+10 [a] abcdefghijKlmnop
+
+11 [b] abcdefghijkLmnop
+
+12 [c] abcdefghijklMnop
+
+13 [d] abcdefghijklmNop
+
+14 [e] abcdefghijklmnOp
+
+15 [f] abcdefghijklmnoP
+
+16 a
+2 [2] abCdefghijklmnop
+
+5 [5] abcdeFghijklmnop
+
+8 [8] abcdefghIjklmnop
+
+11 [b] abcdefghijkLmnop
+
+14 [e] abcdefghijklmnOp
+
 [0] Abcdefghijklmnop
 [1] aBcdefghijklmnop
 [2] abCdefghijklmnop
@@ -130,9 +151,20 @@ a
 [27] aaa
 [28] aaa
 [29] aaa
+declare -a array=([0]="a" [1]="b" [2]="c" [3]=$'\n')
 1 2 3 4 5
-foo 0
-foo 1
-foo 2
-foo 3
-foo 4
+foo 0 1
+
+foo 1 2
+
+foo 2 3
+
+foo 3 4
+
+foo 4 5
+
+0 abc
+1 def
+2 ghi
+3 jkl
+abc def ghi jkl
diff --git a/tests/mapfile.tests b/tests/mapfile.tests
index a9170c1..c2ea7d2 100644
--- a/tests/mapfile.tests
+++ b/tests/mapfile.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 declare -a A
 mapfile A < mapfile.data
 for (( i = 0 ; i < ${#A[@]} ; i++ )); do
@@ -39,4 +52,11 @@ for (( i = 0 ; i < ${#E[@]} ; i++ )); do
     echo "${E[${i}]}"
 done
 
+unset -v s array
+s=$'a\xffb\xffc\xff'
+mapfile -t -d $'\xff' array <<<"$s"
+declare -p array
+unset -v s array
+
 ${THIS_SH} ./mapfile1.sub
+${THIS_SH} ./mapfile2.sub
diff --git a/tests/mapfile2.sub b/tests/mapfile2.sub
new file mode 100644
index 0000000..771a992
--- /dev/null
+++ b/tests/mapfile2.sub
@@ -0,0 +1,6 @@
+# test mapfile -d DELIM functionality added after bash-4.3
+
+printf "abc\0def\0ghi\0jkl\0" | {
+	mapfile -C echo -c 1 -d '' A
+	echo "${A[@]}"
+}
diff --git a/tests/misc/run-r2.sh b/tests/misc/run-r2.sh
old mode 100755
new mode 100644
diff --git a/tests/misc/sigint-1.sh b/tests/misc/sigint-1.sh
old mode 100755
new mode 100644
diff --git a/tests/misc/sigint-2.sh b/tests/misc/sigint-2.sh
old mode 100755
new mode 100644
diff --git a/tests/misc/sigint-3.sh b/tests/misc/sigint-3.sh
old mode 100755
new mode 100644
diff --git a/tests/misc/sigint-4.sh b/tests/misc/sigint-4.sh
old mode 100755
new mode 100644
diff --git a/tests/more-exp.right b/tests/more-exp.right
index 91a375c..f5f37c9 100644
--- a/tests/more-exp.right
+++ b/tests/more-exp.right
@@ -108,7 +108,7 @@ argv[3] = 
 argv[4] = 
 argv[5] = 
 argv[6] = 
-./more-exp.tests: line 272: abc=def: command not found
+./more-exp.tests: line 285: abc=def: command not found
 argv[1] = 
 argv[1] = 
 argv[2] = 
@@ -184,13 +184,13 @@ 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 "%")
+./more-exp.tests: line 436: ${#:}: bad substitution
+./more-exp.tests: line 438: ${#/}: bad substitution
+./more-exp.tests: line 440: ${#%}: bad substitution
+./more-exp.tests: line 442: ${#=}: bad substitution
+./more-exp.tests: line 444: ${#+}: bad substitution
+./more-exp.tests: line 446: ${#1xyz}: bad substitution
+./more-exp.tests: line 449: #: %: syntax error: operand expected (error token is "%")
 argv[1] = <0>
 argv[1] = 
 argv[1] = <+>
diff --git a/tests/more-exp.tests b/tests/more-exp.tests
index 4a3cb7f..df12b99 100644
--- a/tests/more-exp.tests
+++ b/tests/more-exp.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 expect()
 {
 	echo expect "$@"
@@ -152,7 +165,7 @@ b1()
 b2()
 {	
 	recho $*
-	recho $#
+	recho ${#}
 }
 
 expect '<1>'
@@ -414,7 +427,7 @@ recho ${#}
 expect '<5>'
 recho ${#?:-xyz}
 
-shift $#
+shift ${#}
 
 expect '<0>'
 recho ${#:-foo}
diff --git a/tests/nameref.right b/tests/nameref.right
new file mode 100644
index 0000000..83e9ee5
--- /dev/null
+++ b/tests/nameref.right
@@ -0,0 +1,560 @@
+one
+two
+three
+declare -n fee="flip"
+declare -n foo="bar"
+turning off nameref attribute on foo
+bar
+after +n foo bar = other
+one
+two
+one
+expect 
+argv[1] = 
+expect 
+argv[1] = 
+expect 
+one
+expect 
+one
+expect 
+argv[1] = 
+changevar: expect 
+argv[1] = 
+expect 
+argv[1] = 
+changevar: expect 
+argv[1] = 
+expect 
+argv[1] = 
+./nameref.tests: line 106: foo: readonly variable
+./nameref.tests: line 107: foo: readonly variable
+one
+one
+./nameref.tests: line 119: foo: readonly variable
+./nameref.tests: line 116: foo: readonly variable
+one
+abxde
+abxde
+one
+bar
+
+./nameref2.sub: line 5: foo: readonly variable
+
+expect 
+argv[1] = 
+expect 
+argv[1] = 
+expect 
+argv[1] = 
+expect 
+./nameref3.sub: line 29: foo: invalid indirect expansion
+./nameref3.sub: line 34: unset: bar: cannot unset: readonly variable
+expect 
+two
+expect 
+two
+three
+unset
+four
+0
+expect 
+a b
+expect 
+foo
+1 3 5 7 9
+9
+1 3 42 7 9
+1 3 42 7 9
+9
+1 3 44 7 9
+unset
+expect 
+argv[1] = 
+expect     
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[5] = 
+16
+expect <4>
+4
+expect <4>
+4
+expect <4>
+4
+expect 
+one
+expect 
+one
+expect 
+one
+expect 
+four
+errors = 0
+1
+2
+v1: 1
+v2: 2
+ref -> first, value: I am first
+ref -> second, value: I am in the middle
+ref -> third, value: I am last
+final state: ref -> third, value: I am last
+ref -> one, value: 1
+ref -> two, value: 2
+ref -> three, value: 3
+final state: ref -> three, value: 3
+./nameref5.sub: line 56: unset: three: cannot unset: readonly variable
+ref -> one, value: 1
+ref -> two, value: 2
+ref -> three, value: 3
+final state: ref -> three, value: 3
+./nameref6.sub: line 15: typeset: x: nameref variable self references not allowed
+./nameref6.sub: line 18: typeset: x[3]: reference variable cannot be an array
+./nameref6.sub: line 25: typeset: x: reference variable cannot be an array
+the -- 1
+42 -- 0
+y -- 0
+2 -- 0
+2 -- 0
+y -- 0
+bar
+unset
+./nameref8.sub: line 16: typeset: warning: v: circular name reference
+./nameref8.sub: line 16: warning: v: circular name reference
+./nameref8.sub: line 18: warning: v: circular name reference
+inside
+inside: two
+outside:
+./nameref8.sub: line 42: typeset: warning: x: circular name reference
+./nameref8.sub: line 42: warning: x: circular name reference
+./nameref8.sub: line 44: warning: x: circular name reference
+foo
+./nameref8.sub: line 51: typeset: warning: v: circular name reference
+./nameref8.sub: line 51: warning: v: circular name reference
+./nameref8.sub: line 51: warning: v: circular name reference
+local
+./nameref8.sub: line 60: typeset: v: nameref variable self references not allowed
+./nameref8.sub: line 67: warning: x: circular name reference
+./nameref8.sub: line 68: warning: x: circular name reference
+x =
+idx2
+idX2
+idx2
+idX2
+declare -n foo="x[\$zero]"
+42
+declare -a x=([0]="4")
+declare -n foo="x[\$(echo 0)]"
+4
+comsub
+x[i=0]
+comsub
+4
+comsub
+4
+comsub
+4
+declare -n foo="somevariable"
+./nameref10.sub: line 51: typeset: somevariable: not found
+foo =
+declare -n foo="somevariable"
+declare -A somevariable=([jug]="brown" )
+declare -n foo="somevariable"
+declare -A somevariable=([jug]="brown" )
+declare -n foo="somevariable"
+./nameref10.sub: line 62: typeset: somevariable: not found
+./nameref10.sub: line 64: typeset: foo: not found
+./nameref10.sub: line 64: typeset: somevariable: not found
+declare -n foo="bar"
+./nameref10.sub: line 68: typeset: bar: not found
+declare -n foo="bar"
+./nameref10.sub: line 70: typeset: bar: not found
+declare -n foo="bar"
+declare -i bar="8"
+8
+declare -n foo="bar"
+./nameref10.sub: line 77: typeset: bar: not found
+./nameref11.sub: line 14: declare: `/': invalid variable name for name reference
+./nameref11.sub: line 15: declare: `/': invalid variable name for name reference
+./nameref11.sub: line 16: `/': not a valid identifier
+./nameref11.sub: line 17: declare: `/': not a valid identifier
+./nameref11.sub: line 18: `/': not a valid identifier
+1) /
+#? ./nameref11.sub: line 19: `/': not a valid identifier
+x
+
+./nameref11.sub: line 20: ((: `0': not a valid identifier
+./nameref11.sub: line 21: declare: `0': invalid variable name for name reference
+./nameref11.sub: line 22: declare: `/': invalid variable name for name reference
+./nameref11.sub: line 23: declare: `/': invalid variable name for name reference
+/
+./nameref11.sub: line 25: `/': not a valid identifier
+./nameref11.sub: line 26: exec: `10': not a valid identifier
+./nameref11.sub: line 26: r: cannot assign fd to variable
+./nameref11.sub: line 27: warning: r: removing nameref attribute
+63
+./nameref11.sub: line 28: declare: RO: readonly variable
+./nameref11.sub: line 28: RO: readonly variable
+./nameref11.sub: line 29: declare: `/': invalid variable name for name reference
+/
+./nameref11.sub: line 30: declare: `/': invalid variable name for name reference
+./nameref11.sub: illegal option -- h
+./nameref11.sub: line 31: getopts: `?': not a valid identifier
+./nameref11.sub: line 32: warning: r: removing nameref attribute
+declare -a r=()
+./nameref11.sub: line 33: declare: r: reference variable cannot be an array
+./nameref11.sub: line 34: printf: `/': not a valid identifier
+./nameref11.sub: line 36: `': not a valid identifier
+./nameref11.sub: line 37: declare: `': not a valid identifier
+./nameref11.sub: line 38: `': not a valid identifier
+./nameref11.sub: line 39: printf: `': not a valid identifier
+./nameref11.sub: line 40: declare: `': invalid variable name for name reference
+declare -r ROVAR="42"
+./nameref11.sub: line 45: ROVAR: readonly variable
+./nameref11.sub: line 45: ROVAR: cannot unset: readonly variable
+declare -r ROVAR="42"
+./nameref11.sub
+./nameref11.sub: line 47: `@': not a valid identifier
+./nameref11.sub
+declare -n ref="x"
+./nameref11.sub: line 52: RO: readonly variable
+declare -r RO_PID
+./nameref11.sub: line 52: RO: cannot unset: readonly variable
+declare -r RO="x"
+./nameref11.sub: line 52: declare: RO_PID: not found
+./nameref11.sub: line 54: RO2: readonly variable
+declare -r RO2="a"
+2
+./nameref11.sub: line 65: typeset: `2': invalid variable name for name reference
+2
+./nameref11.sub: line 70: typeset: `2': invalid variable name for name reference
+2
+./nameref11.sub: line 75: foo[2]: invalid indirect expansion
+./nameref11.sub: line 76: bar: invalid indirect expansion
+./nameref12.sub: line 19: declare: `/': invalid variable name for name reference
+./nameref12.sub: line 22: declare: `%': invalid variable name for name reference
+./nameref12.sub: line 26: `^': not a valid identifier
+declare -n r
+declare -a foo
+declare -a foo=([0]="7")
+./nameref12.sub: line 39: declare: `42': not a valid identifier
+./nameref12.sub: line 40: declare: x: not found
+declare -nr RO="foo"
+/
+./nameref12.sub: line 58: declare: `7*6': not a valid identifier
+./nameref12.sub: line 58: declare: foo: not found
+./nameref12.sub: line 60: `7*6': not a valid identifier
+declare -n ref="var"
+declare -n ref="var"
+./nameref12.sub: line 87: readonly: `var[0]': not a valid identifier
+declare -- var="foo"
+declare -r var2="foo"
+declare -n ref="var"
+declare -a var=([0]="foo")
+./nameref12.sub: line 104: `': not a valid identifier
+declare -n ref
+declare -- ref="global"
+declare -a var=([0]="foo2")
+./nameref12.sub: line 113: declare: global: not found
+declare -- a
+declare -n r="a"
+declare -- a
+declare -n r="a"
+0
+declare -n r="P"
+declare -n ref="var"
+declare -- a
+declare -n r="a"
+0
+declare -n r
+declare -n r
+./nameref13.sub: line 101: typeset: `12345': invalid variable name for name reference
+declare -n foo
+./nameref13.sub: line 110: typeset: `12345': invalid variable name for name reference
+declare -n foo
+declare -nx ref="var"
+var
+var
+var
+var
+foo
+foo
+foo
+foo
+before
+declare -n ref="var"
+./nameref14.sub: line 36: typeset: var: not found
+first
+declare -n ref="var"
+declare -x var="xxx"
+invalid
+declare -n ref="var"
+declare -x var="5"
+after
+declare -n ref="var"
+./nameref14.sub: line 45: typeset: var: not found
+declare -n ref="var"
+./nameref15.sub: line 14: local: warning: a: circular name reference
+./nameref15.sub: line 14: warning: a: circular name reference
+./nameref15.sub: line 14: `a[0]': not a valid identifier
+declare -a a=([0]="0")
+./nameref15.sub: line 14: local: warning: a: circular name reference
+./nameref15.sub: line 14: warning: a: circular name reference
+./nameref15.sub: line 14: warning: a: circular name reference
+declare -a a=([0]="X")
+declare -a b=([0]="X")
+./nameref15.sub: line 14: local: warning: a: circular name reference
+./nameref15.sub: line 14: warning: a: circular name reference
+./nameref15.sub: line 14: `a[0]': not a valid identifier
+declare -a b=([0]="0")
+./nameref15.sub: line 32: typeset: warning: ref: circular name reference
+./nameref15.sub: line 32: warning: ref: circular name reference
+./nameref15.sub: line 33: warning: ref: circular name reference
+./nameref15.sub: line 34: warning: ref: circular name reference
+inside X
+outside X
+before: 7
+./nameref15.sub: line 45: typeset: warning: xxx: circular name reference
+./nameref15.sub: line 45: warning: xxx: circular name reference
+./nameref15.sub: line 46: warning: xxx: circular name reference
+declare -n xxx="xxx"
+./nameref15.sub: line 48: warning: xxx: circular name reference
+xxx_func: inside: xxx = foo
+after: foo
+./nameref15.sub: line 59: typeset: ref: nameref variable self references not allowed
+./nameref15.sub: line 61: ref: nameref variable self references not allowed
+declare -n ref="re"
+declare -n ref="re"
+declare -- re="4"
+4
+declare -n foo="var[@]"
+declare -n ref="var[@]"
+./nameref15.sub: line 78: var[@]: bad array subscript
+declare -n bar="var[@]"
+./nameref15.sub: line 83: var[@]: bad array subscript
+declare -n a="b"
+declare -n b="a[1]"
+./nameref15.sub: line 91: warning: a: removing nameref attribute
+declare -a a=([1]="foo")
+declare -n b="a[1]"
+./nameref15.sub: line 96: warning: a: removing nameref attribute
+declare -a a=([1]="foo")
+declare -n b="a[1]"
+declare -n n="v"
+declare -a v=([1]="1")
+./nameref15.sub: line 112: typeset: n: not found
+declare -a v=([0]="0" [1]="1")
+declare -n n="v[1]"
+declare -a v=([0]="0")
+./nameref15.sub: line 120: warning: xref: removing nameref attribute
+declare -a xref=([1]="one")
+./nameref15.sub: line 126: warning: xref: removing nameref attribute
+declare -a xref=([1]="one")
+declare -n r1="y"
+declare -n r2="x"
+./nameref16.sub: line 25: typeset: x: not found
+./nameref16.sub: line 25: typeset: y: not found
+declare -n r1="y"
+declare -n r2="x"
+./nameref16.sub: line 34: typeset: x: not found
+./nameref16.sub: line 34: typeset: y: not found
+declare -n r1="y"
+declare -n r2="x"
+./nameref16.sub: line 46: typeset: x: not found
+./nameref16.sub: line 46: typeset: y: not found
+declare -n r1="y"
+declare -n r2="x"
+declare -- x="one"
+declare -- y="two"
+./nameref17.sub: line 21: declare: bar: not found
+./nameref17.sub: line 22: unset: foo0: cannot unset: readonly variable
+declare -nr foo0="bar"
+declare -nr foo0="bar"
+declare -- bar
+./nameref17.sub: line 27: declare: foo0: readonly variable
+./nameref17.sub: line 28: declare: foo0: readonly variable
+declare -nr foo1
+./nameref17.sub: line 37: typeset: foo1: readonly variable
+declare -nr foo1
+declare -n foo2="bar"
+declare -r bar
+./nameref17.sub: line 48: bar: readonly variable
+./nameref17.sub: line 49: typeset: bar: readonly variable
+declare -n foo2="bar"
+declare -r bar
+declare -- bar3="three"
+./nameref17.sub: line 59: unset: foo3: cannot unset: readonly variable
+./nameref17.sub: line 62: declare: bar3: readonly variable
+declare -nr foo3="bar3"
+declare -r bar3="three"
+./nameref17.sub: line 64: declare: foo3: readonly variable
+declare -nr foo4="bar4"
+declare -- bar4="four"
+./nameref17.sub: line 76: typeset: foo4: readonly variable
+declare -nr foo4="bar4"
+declare -nr foo4="bar4"
+declare -- bar4="four"
+./nameref17.sub: line 92: typeset: foo4: readonly variable
+declare -nr foo4="bar4"
+declare -nr foo4="bar4"
+declare -- bar4="four"
+declare -nr foo5
+declare -r foo5
+declare -nr foo5
+declare -r foo5
+./nameref18.sub: line 15: mapfile: `XXX[0]': not a valid identifier
+./nameref18.sub: line 16: declare: XXX[0]: not found
+./nameref18.sub: line 22: `XXX[0]': not a valid identifier
+./nameref18.sub: line 23: declare: XXX[0]: not found
+declare -n ref="XXX[0]"
+declare -a XXX=([0]="4")
+./nameref18.sub: line 37: `XXX[0]': not a valid identifier
+declare -n ref="XXX[0]"
+./nameref18.sub: line 38: declare: XXX[0]: not found
+./nameref18.sub: line 42: read: `XXX[0]': not a valid identifier
+./nameref18.sub: line 43: declare: XXX[0]: not found
+./nameref18.sub: line 48: `XXX[0]': not a valid identifier
+declare -n ref="XXX[0]"
+./nameref18.sub: line 51: `XXX[0]': not a valid identifier
+./nameref18.sub: line 51: declare: XXX[0]: not found
+declare -n ref="var[123]"
+./nameref18.sub: line 59: declare: var[123]: not found
+declare -a var=([123]="")
+declare -n ref="var[123]"
+./nameref18.sub: line 63: declare: var[123]: not found
+declare -a var=([123]="")
+declare -n ref="var[123]"
+./nameref18.sub: line 67: declare: var[123]: not found
+declare -a var=([123]="X")
+argv[1] = <1>
+argv[2] = <2>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <2>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <2>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <2>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <2>
+argv[3] = <31>
+argv[4] = <2>
+argv[5] = <3>
+declare -n foo="bar"
+declare -- foo="bar"
+./nameref19.sub: line 22: declare: bar: not found
+declare -n foo="bar"
+declare -- foo="bar"
+declare -i bar="11"
+declare -inx foo6
+declare -ix foo6
+declare -n foo="bar"
+declare -- bar="Hello World!"
+declare -- foo="bar"
+declare -- bar="Hello World!"
+declare -n foo="bar"
+declare -- bar
+declare -- foo="bar"
+declare -- bar
+8
+declare -n ivar="foo"
+declare -a v=([0]="Y")
+r: 
+v: 
+declare -n ref="var"
+declare -a var=([0]="X")
+declare -n ref="var"
+declare -a var=([0]="X")
+declare -n ref="var"
+./nameref20.sub: line 36: declare: var: not found
+outside:
+declare -a foo=([0]="X")
+declare -n ref="var"
+declare -a var=([0]="X")
+outside:
+./nameref20.sub: line 51: declare: ref: not found
+./nameref20.sub: line 51: declare: var: not found
+declare -n ref="var"
+declare -- var="X"
+outside:
+./nameref20.sub: line 58: declare: ref: not found
+./nameref20.sub: line 58: declare: var: not found
+declare -n ref="var"
+declare -a var=([0]="Y")
+declare -- ref="Y"
+declare -- var="X"
+declare -- ref="Y"
+declare -- ref="Y"
+./nameref20.sub: line 74: declare: var: not found
+declare -- ref="Y"
+declare -n ref="var"
+declare -A var=([2]="" )
+declare -n ref="var"
+declare -A var=([2]="" )
+declare -n ref="var"
+declare -a var=([2]="")
+declare -n ref="var"
+declare -a var=([2]="")
+declare -n ref="var"
+declare -ai var=([1]="0")
+declare -n ref="var"
+declare -ai var=([1]="0")
+declare -n ref="var"
+declare -- var="1"
+a string with spaces
+many spaces
+declare -n foo="bar[0]"
+declare -a bar=([0]=" still more spaces")
+declare -n foo="bar[0]"
+declare -a bar=([0]="spaces still more spaces")
+./nameref22.sub: line 50: declare: array: reference variable cannot be an array
+./nameref22.sub: line 53: declare: array[128]: reference variable cannot be an array
+declare -a array=([0]="one" [1]="two" [2]="three")
+declare -- array="(one two three)"
+declare -a array=([0]="one" [1]="two" [2]="three")
+./nameref22.sub: line 69: declare: `(one two three)': invalid variable name for name reference
+./nameref22.sub: line 70: declare: array: reference variable cannot be an array
+declare -a array=([0]="zero")
+./nameref22.sub: line 74: declare: array: reference variable cannot be an array
+declare -a array=([0]="one" [1]="two" [2]="three")
+./nameref22.sub: line 79: declare: array: reference variable cannot be an array
+declare -a array
+declare -ai array=([0]="one")
+declare -a array=([0]="zero")
+declare -a array=([0]="one" [1]="two" [2]="three")
+declare -ai a=([0]="5")
+declare -ai a=([0]="6")
+declare -ai a=([0]="1")
+./nameref23.sub: line 15: declare: b: not found
+declare -ai a=([0]="1")
+declare -- b="1"
+declare -ai a=([0]="1")
+declare -- b="11"
+declare -ai a=([0]="1")
+declare -- b="110"
+./nameref23.sub: line 25: declare: `1': invalid variable name for name reference
+declare -ai a=([0]="1")
+./nameref23.sub: line 27: declare: b: not found
+declare -ai a=([0]="4")
+declare -in b="a[0]"
+declare -ai a=([0]="6")
+declare -in b="a[0]"
+foo
+foo bar
+declare -a a=([0]="" [1]="foo bar")
+declare -n b="a[1]"
+foo
+foo bar
+declare -a a=([0]="" [1]="foo bar")
+declare -n b="a[1]"
+12
+16
+declare -ai a=([0]="0" [1]="16")
+12
+16
+declare -ai a=([0]="0" [1]="16")
diff --git a/tests/nameref.tests b/tests/nameref.tests
new file mode 100644
index 0000000..3a6c5d9
--- /dev/null
+++ b/tests/nameref.tests
@@ -0,0 +1,133 @@
+#   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 .
+#
+# basic nameref tests
+bar=one
+flow=two
+flip=three
+
+foo=bar
+typeset -n foo
+
+typeset -n fee=flow
+
+echo ${foo}
+echo ${fee}
+
+typeset -n fee=flip
+echo ${fee}
+
+typeset -n
+
+echo turning off nameref attribute on foo
+typeset +n foo=other
+echo ${foo}
+echo after +n foo bar = $bar
+
+unset foo bar fee
+
+bar=one
+
+foo=bar
+typeset -n foo
+
+foo=two printf "%s\n" $foo
+foo=two eval 'printf "%s\n" $foo'
+
+foo=two echo $foo
+
+unset foo bar
+# other basic assignment tests
+bar=one
+
+echo "expect "
+recho ${bar}
+typeset -n foo=bar
+foo=two
+
+echo "expect "
+recho ${bar}
+
+# this appears to be a ksh93 bug; it doesn't unset foo here and messes up
+# later
+unset foo bar
+
+# initial tests of working inside shell functions
+echoval()
+{
+	typeset -n ref=$1
+	printf "%s\n" $ref
+}
+
+foo=bar
+bar=one
+echo "expect <$foo>"
+echoval foo
+echo "expect <$bar>"
+echoval bar
+
+unset foo bar
+changevar()
+{
+	typeset -n v=$1
+
+	shift
+	v="$@"
+	echo "changevar: expect <$@>"
+	recho "$v"
+}
+
+bar=one
+
+echo "expect "
+recho ${bar}
+changevar bar two
+echo "expect "
+recho $bar
+
+changevar bar three four five
+echo "expect "
+recho "$bar"
+
+unset foo bar
+unset -n foo bar
+readonly foo=one
+typeset -n bar=foo
+bar=4
+foo=4
+
+echo $foo
+echo $bar
+
+assignvar()
+{
+	typeset -n ref=$1
+	shift
+	ref="$@"
+}
+
+readonly foo=one
+
+assignvar foo two three four
+echo $foo
+
+var=abcde
+x=var
+declare -n v=var
+# these two should display the same
+echo ${!x//c/x}
+echo ${v//c/x}
+
+for testfile in ./nameref[0-9].sub ./nameref[1-9][0-9].sub ; do
+	${THIS_SH} "$testfile"
+done
diff --git a/tests/nameref1.sub b/tests/nameref1.sub
new file mode 100644
index 0000000..50bb25d
--- /dev/null
+++ b/tests/nameref1.sub
@@ -0,0 +1,13 @@
+# indirect referencing of a nameref returns the variable name it references
+unset foo bar
+
+bar=one
+foo=bar
+
+typeset -n foo
+
+echo ${foo}
+echo ${!foo}
+
+# this is a current incompatibility
+echo ${!foo[0]}
diff --git a/tests/nameref10.sub b/tests/nameref10.sub
new file mode 100644
index 0000000..742755b
--- /dev/null
+++ b/tests/nameref10.sub
@@ -0,0 +1,77 @@
+#   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 .
+#
+# testing behavior of command substitution as one of expansions performed by
+# array subscripting; should behave the same directly as when done through
+# a nameref
+
+x[0]=42
+zero=0
+f() { typeset -n foo="$1"; declare -p foo; echo "$foo"; }
+
+f 'x[$zero]'
+
+x[$(echo 0)]=4
+declare -p x
+
+f 'x[$(echo 0)]'
+
+unset -f f
+f()
+{
+	typeset -n foo="$1";
+
+	echo "x[i=0$(echo comsub >&2)]"
+	echo "${x[i=0$(echo comsub >&2)]}"
+	echo "${!1}"
+	echo "$foo"
+}
+
+f 'x[i=0$(echo comsub >&2)]'
+
+unset -f f
+unset x
+
+# problems with unset and namerefs pointing to non-existent variables pointed
+# out after bash-4.3 released
+
+typeset -n foo=somevariable
+foo=bar
+unset foo		# unsets somevariable
+typeset -p foo somevariable
+echo foo = $foo
+
+typeset -A foo		# should create array variable named somevariable
+foo["jug"]="brown"
+
+typeset -p foo somevariable
+typeset -A foo='([jug]="brown" )'
+typeset -p foo somevariable
+
+unset foo
+typeset -p foo somevariable
+unset -n foo
+typeset -p foo somevariable
+
+unset bar
+typeset -n foo=bar
+typeset -p foo bar
+unset foo
+typeset -p foo bar
+typeset -i foo
+foo=4+4
+typeset -p foo bar
+echo "$foo"
+
+unset foo
+typeset -p foo bar
diff --git a/tests/nameref11.sub b/tests/nameref11.sub
new file mode 100644
index 0000000..ea14c0d
--- /dev/null
+++ b/tests/nameref11.sub
@@ -0,0 +1,76 @@
+#   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 .
+#
+r=/; declare -n r ; unset r
+declare -n r=/ ; unset -n r
+declare -n r; r=/ ; unset -n r
+declare -n r; declare r=/ ; unset -n r
+declare -n r; for r in /; do :; done ; unset -n r
+declare -n r; select r in /; do :; done <<< 1; echo x; echo $r ; unset -n r
+declare -n r; ((r=0)) ; unset -n r
+((r=0)); declare -n r ; unset -n r
+r=/ declare -n r ; unset -n r
+f() { declare -n r; }; r=/ f ; unset r
+f() { echo $r; }; declare -n r; r=/ f ; unset -n r
+declare -n r; : ${r:=/} ; unset -n r
+declare -n r; exec {r}>/dev/null ; unset -n r
+declare -n r; coproc r { :; }; echo $r ; unset r ; wait
+declare -r RO=x; r=$RO; declare -n r; x=y; declare -n RO; RO=z; declare -p RO; echo "$RO"
+s=/; declare -n r=s; declare -n s; echo $r ; unset -n r ; unset -n s
+declare -n r=s; declare -n s; s=/ ; unset -n r; unset -n s
+declare -n r; getopts x r -h ; unset r; unset -n r
+declare -n r; mapfile r < /dev/null ; declare -p r; unset r ; unset -n r
+mapfile r < /dev/null; declare -n r ; unset r ; unset -n r
+declare -n r; printf -v r / ; unset -n r
+
+declare -n r; r="" ; unset -n r
+declare -n r="" ; unset -n r
+declare -n r; : ${r=} ; unset -n r
+declare -n r; printf -v r '' ; unset -n r
+r=""; declare -n r ; unset -n r
+export r
+
+# coproc tests, since coproc sets and unsets variables
+declare -r ROVAR=42
+declare -p ROVAR; coproc ROVAR { :; }; wait; declare -p ROVAR
+
+echo ${@:0}; coproc @ { :; }; wait ; echo ${@:0}
+
+declare -n ref=x; coproc ref { :; }; wait ; declare -p ref
+unset -n ref ; unset ref
+
+declare -r RO RO_PID; coproc RO { :; }; declare -p RO_PID; wait; declare -p RO RO_PID
+
+declare -r RO2=a; declare -n ref_PID=RO2; coproc ref { :; }; wait; declare -p RO2
+
+unset x y
+set -- one two three
+
+y=2
+typeset -n x=y
+echo ${x}
+
+unset -n x
+
+typeset -n y
+echo $y
+
+unset -n y
+
+typeset -n y
+y=2
+echo ${y}
+
+declare -n foo=bar
+echo ${!foo[2]}
+echo ${!bar}
diff --git a/tests/nameref12.sub b/tests/nameref12.sub
new file mode 100644
index 0000000..199b51c
--- /dev/null
+++ b/tests/nameref12.sub
@@ -0,0 +1,113 @@
+#   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 .
+#
+declare -n r
+declare -n r
+unset -n r
+
+r=foo
+declare -n r=/
+
+r=%
+declare -n r
+unset r
+
+declare -n r
+r=^
+declare -p r
+
+unset -n r
+
+declare -n foo
+declare -a foo
+declare -p foo
+foo[0]=7
+declare -p foo
+unset foo
+
+declare -n x
+declare x=42
+declare -p x
+
+declare -n -r RO=foo
+declare -p RO
+
+unset -n r; unset r
+
+# the details of this may change; currently we put namerefs and values into
+# the tempenv if the nameref value is an invalid variable name
+f() { echo $r; }
+
+declare -n r
+r=/ ${THIS_SH} < /dev/null
+r=/ f
+
+unset -f f
+
+# the details of this may change; this will tell me when they do
+declare -n foo ; declare -i foo=7*6 ; declare -p foo
+unset -n foo
+declare -n foo ; declare -i foo ; foo=7*6 ; declare -p foo
+
+# used to be buggy
+f()
+{
+	unset var
+	declare -n ref=var
+	declare -n ref
+	declare -p ref
+}
+f
+
+unset -f f
+f()
+{
+	local var
+	declare -n ref=var
+	declare -n ref
+	declare -p ref
+}
+f
+
+unset ref; unset -n ref
+unset var
+
+var=foo
+typeset -n ref=var[0]
+readonly ref
+typeset -p var
+
+var2=foo
+typeset -n ref2=var2
+readonly ref2
+typeset -p var2
+
+unset var
+unset -n ref ref2
+
+unset var; typeset -n ref=var
+ref[0]=foo
+typeset -p ref var
+unset -n ref
+
+unset var; typeset -n ref
+ref[0]=foo
+typeset -p ref
+unset -n ref
+
+ref=global
+f() { declare -n ref=var; ref[0]=foo1; }; f
+f() { declare -n ref=var; ref[0]=foo2; }; f
+declare -p ref var
+
+declare -p global
diff --git a/tests/nameref13.sub b/tests/nameref13.sub
new file mode 100644
index 0000000..5c56428
--- /dev/null
+++ b/tests/nameref13.sub
@@ -0,0 +1,115 @@
+#   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 .
+#
+declare -nt r=a
+
+f()
+{
+	declare a
+	declare -n r=a
+	declare -p a r
+}
+
+f
+unset -f f
+
+f()
+{
+	declare a
+	declare -n r
+	r=a
+	declare -p a r
+}
+f
+echo $?
+
+unset -f f
+
+P=12345
+function foo
+{
+	typeset -n r
+	typeset -n r=P
+	typeset -p r
+}
+
+foo
+unset P foo
+
+ref=outside
+
+f()
+{
+	unset var
+	declare -n ref=var
+	declare -n ref;
+	declare -p ref;
+}
+f
+
+unset ref foo
+
+typeset -n r=a
+
+f()
+{
+	typeset a
+	typeset -n r
+	typeset -n r
+	r=a
+
+	typeset -p a r
+}
+f
+echo $?
+unset -n r
+unset -f f
+
+function foo
+{
+	typeset -n r
+	typeset -n r
+	typeset -p r
+}
+
+foo
+unset -f foo
+
+
+function foo
+{
+	typeset r
+	typeset -n r
+	typeset -p r
+}
+foo
+unset -f foo
+
+foo()
+{
+	typeset -n foo
+	typeset foo=12345
+	typeset -p foo
+}
+foo
+unset -f foo
+
+foo()
+{
+	typeset -n foo
+	typeset -n foo=12345
+	typeset -p foo
+}
+foo
+unset -f foo
+
diff --git a/tests/nameref14.sub b/tests/nameref14.sub
new file mode 100644
index 0000000..a14c440
--- /dev/null
+++ b/tests/nameref14.sub
@@ -0,0 +1,56 @@
+#   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 .
+#
+# exporting namerefs and putting namerefs in temp env post bash-4.3
+
+typeset -nx ref=var;
+typeset -p ref
+
+var=foo; str=''
+printenv ref                 # var
+ref+=$str    printenv ref    # var
+ref+="$str"  printenv ref    # var
+ref=$ref$str printenv ref    # var
+
+export ref		# follows nameref and exports var
+
+printenv var                 # foo
+ref+=$str    printenv var    # foo
+ref+="$str"  printenv var    # foo
+ref=$ref$str printenv var    # foo
+
+# none of these should change ref; should follow the nameref and export var
+unset var; unset -n ref; typeset -n ref=var
+
+echo before
+typeset -p ref var
+
+echo first
+ref=xxx typeset -p ref var
+
+echo invalid
+var= ref=5 typeset -p ref var
+
+echo after
+typeset -p ref var
+
+# ref isn't exported, so none of the printenvs should print anything
+unset var ; unset -n ref
+typeset -n ref=var;
+typeset -p ref
+
+var=foo; str=''
+printenv ref
+ref+=$str    printenv ref
+ref+="$str"  printenv ref
+ref=$ref$str printenv ref
diff --git a/tests/nameref15.sub b/tests/nameref15.sub
new file mode 100644
index 0000000..e9a09ee
--- /dev/null
+++ b/tests/nameref15.sub
@@ -0,0 +1,127 @@
+#   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 .
+#
+f() { local -n a=$1; a=X; }
+
+a=(0); f 'a[0]'
+while [[ -v a ]]; do declare -p a; unset a; done
+
+a=(0); f 'a'
+while [[ -v a ]]; do declare -p a; unset a; done
+
+b=(0); f 'b[0]'
+while [[ -v a ]]; do typeset -p a; unset a; done
+typeset -p b
+
+b=(0); f 'a[0]'
+while [[ -v a ]]; do typeset -p a; unset a; done
+typeset -p b
+
+add_X_echo()
+{
+	typeset -n ref=$1
+	ref+=X
+	echo inside $ref
+}
+
+ref=
+add_X_echo ref
+echo outside "$ref"
+unset ref
+
+# same test, but assigning nameref variable circular reference directly
+xxx_func()
+{
+	typeset -n xxx=xxx
+	xxx=foo
+	declare -p xxx
+	echo $FUNCNAME: inside: xxx = $xxx
+}
+
+xxx=7
+echo before: $xxx
+xxx_func
+echo after: $xxx
+
+unset xxx
+unset -f xxx_func
+
+typeset -n ref=ref
+
+typeset -n ref=re ref+=f
+typeset -p ref
+ref=4
+typeset -p ref re
+
+export ref
+printenv ref
+printenv re
+
+unset ref ; unset -n ref
+unset foo; unset -n foo
+
+typeset -n foo=var[@]
+typeset -p foo
+typeset -n ref=var ref+=[@]
+typeset -p ref
+
+ref=42
+
+typeset -n bar
+bar=var[@]
+typeset -p bar
+bar=7
+
+unset a b
+unset -n a b
+
+typeset -n a=b b
+b=a[1]
+typeset -p a b
+a=foo
+typeset -p a b
+
+unset a
+typeset -n a=b
+declare a=foo
+typeset -p a b
+
+unset n v
+unset -n n v
+
+v=(0 1)
+typeset -n n=v
+unset n[0]
+typeset -p n v
+
+unset -n n
+
+v=(0 1)
+typeset -n n=v
+unset -n n
+typeset -p n v
+
+v=(0 1)
+declare -n n=v[1]
+unset n
+declare -p n v
+
+declare -n xref
+declare -a xref[1]=one
+declare -p xref
+
+unset xref
+declare -n xref
+xref=array
+declare -a xref[1]=one
+declare -p xref
diff --git a/tests/nameref16.sub b/tests/nameref16.sub
new file mode 100644
index 0000000..d07a3a0
--- /dev/null
+++ b/tests/nameref16.sub
@@ -0,0 +1,57 @@
+#   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 .
+#
+# post-bash-4.3 changes for more ksh93 compatibility when following nameref
+# chains and using typeset/declare -n to operate on nameref variables rather
+# than the variables they reference
+
+# don't follow nameref chain when using declare -n and at the global scope
+unset -n r1 r2
+
+typeset -n r1=r2
+typeset -n r2=x
+typeset -n r1=y
+
+typeset -p r1 r2 x y
+
+# same behavior when in a shell function
+foo()
+{
+	typeset -n r1=r2
+	typeset -n r2=x
+	typeset -n r1=y
+
+	typeset -p r1 r2 x y
+}
+unset -n r1 r2
+foo
+unset -f foo
+
+# same behavior when namerefs aren't chained
+unset -n r1 r2
+
+typeset -n r1=z
+typeset -n r2=x
+typeset -n r1=y
+typeset -p r1 r2 x y
+
+# same behavior when referenced variables have values
+unset -n r1 r2
+
+x=one
+y=two
+typeset -n r1=r2
+typeset -n r2=x
+typeset -n r1=y
+
+typeset -p r1 r2 x y
diff --git a/tests/nameref17.sub b/tests/nameref17.sub
new file mode 100644
index 0000000..b8c3cc7
--- /dev/null
+++ b/tests/nameref17.sub
@@ -0,0 +1,116 @@
+#   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 .
+#
+# test behavior of readonly namerefs and namerefs referencing readonly variables
+
+# readonly nameref variable referencing read-write global variable
+
+bar=one
+declare -rn foo0=bar
+unset foo0	# unsets bar
+declare -p bar
+unset -n foo0	# cannot unset
+declare -p foo0
+
+declare +r foo0		# modifies bar
+declare -p foo0 bar
+declare +r -n foo0	# error
+declare +n foo0		# error
+unset bar
+
+# readonly nameref variable without a value
+typeset -n foo1
+typeset -r foo1
+
+typeset -p foo1
+
+typeset foo1=bar		# error
+typeset +r foo1			# no-op, follows nameref chain to nothing
+typeset -p foo1
+
+# nameref pointing to read-only global variable
+foo2=bar
+typeset -n foo2
+typeset -r foo2			# changes bar
+
+typeset -p foo2 bar
+
+foo2=bar			# error?
+typeset +r foo2			# attempts to change bar, error
+typeset -p foo2 bar		# nameref unchanged
+
+# read-only nameref pointing to read-only global variable
+bar3=three
+declare -rn foo3=bar3
+unset foo3	# unsets bar3
+
+bar3=three
+declare -p bar3
+unset -n foo3	# cannot unset
+
+readonly bar3
+declare +r foo3		# error attempting to reference bar3
+declare -p foo3 bar3
+declare +r -n foo3	# error
+
+# readonly nameref pointing to read-write local -- can we remove nameref attr?
+func()
+{
+	typeset bar4=four
+
+	# readonly nameref
+	typeset -n -r foo4=bar4
+
+	typeset -p foo4 bar4
+
+	typeset +n foo4
+
+	typeset -p foo4
+}
+func
+unset -f func
+
+# readonly nameref pointing to read-write global -- can we remove nameref attr?
+bar4=four
+foo4=bar4
+# readonly nameref
+typeset -n foo4
+typeset -r -n foo4
+
+typeset -p foo4 bar4
+
+typeset +n foo4
+typeset -p foo4
+
+bar4=four
+: ${foo4=bar4}
+
+typeset -p foo4 bar4
+
+# readonly local nameref without a value -- can we remove nameref attribute?
+func()
+{
+	declare -r -n foo5
+	declare -p foo5
+	declare +n foo5
+	declare -p foo5
+}
+func
+unset -f func
+
+# readonly global nameref without a value -- can we remove nameref attribute?
+declare -n foo5
+declare -r -n foo5
+declare -p foo5
+declare +n foo5
+declare -p foo5
diff --git a/tests/nameref18.sub b/tests/nameref18.sub
new file mode 100644
index 0000000..7a32877
--- /dev/null
+++ b/tests/nameref18.sub
@@ -0,0 +1,83 @@
+#   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 .
+#
+declare -n ref=XXX[0]
+mapfile ref <<< $'1\n2'
+declare -p XXX[0]
+
+unset -n ref
+
+declare -n ref=XXX[0]
+declare -A ref
+ref[foo]=bar
+declare -p XXX[0]
+
+unset -n ref
+unset XXX
+
+typeset -n ref=XXX[0]
+typeset ref=4
+
+typeset -p ref XXX
+
+unset -n ref
+unset XXX
+
+declare -n ref=XXX[0]
+ref+=([2]=x)
+declare -p ref XXX[0]
+unset -n ref
+
+declare -n ref=XXX[0]
+read -a ref <<< "A B C"
+declare -p XXX[0]
+unset -n ref
+
+declare -n ref=XXX[0]
+unset ref
+ref=()
+declare -p ref
+
+coproc ref { :; }; declare -p ${!ref}
+wait
+
+unset -n ref
+
+declare -n ref=var[123]
+unset ref
+declare ref=
+declare -p ref ${!ref} var
+
+unset ref 
+declare ref+=
+declare -p ref ${!ref} var
+
+declare +t ref
+ref=X
+declare -p ref ${!ref} var
+
+unset -n ref
+unset var
+
+arr=(1 2 3)
+
+indir='arr[@]'
+declare -n ref='arr[@]'
+
+recho "${!indir}"
+recho ${!indir}
+
+recho "$ref"
+recho $ref
+
+recho "${!indir}$ref"
diff --git a/tests/nameref19.sub b/tests/nameref19.sub
new file mode 100644
index 0000000..d4b900e
--- /dev/null
+++ b/tests/nameref19.sub
@@ -0,0 +1,73 @@
+#   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 .
+#
+# can we unset the nameref attribute on variables with values that reference
+# unset variables?
+
+unset bar
+declare -n foo="bar"
+declare -p foo
+
+declare +n foo
+declare -p foo bar
+
+declare -n foo
+declare -p foo
+
+# let's try removing the nameref attribute -- other attributes and assignments
+# apply to the nameref target
+
+declare +n -i foo=7+4
+declare -p foo bar
+
+unset foo bar
+
+# but if the nameref variable doesn't have a value, the attributes apply to
+# the nameref variable itself. thanks ksh93
+
+declare -n foo6
+declare -xi foo6
+declare -p foo6
+
+# and when we remove the nameref attribute, the other attributes remain
+
+declare +n foo6
+declare -p foo6
+
+unset foo6
+
+# make sure these cases continue to work
+
+# nameref referencing an existing, set variable
+declare -n foo=bar
+bar='Hello World!'
+declare -p foo bar
+declare +n foo
+declare -p foo bar
+unset foo bar
+
+# nameref referencing an existing, unset variable
+declare -n foo=bar
+declare bar
+declare -p foo bar
+declare +n foo
+declare -p foo bar
+
+# but when we add the nameref attribute, we remove other attributes
+
+declare -i ivar
+ivar=4+4
+echo $ivar
+
+declare -n ivar=foo
+declare -p ivar
diff --git a/tests/nameref2.sub b/tests/nameref2.sub
new file mode 100644
index 0000000..547cc19
--- /dev/null
+++ b/tests/nameref2.sub
@@ -0,0 +1,7 @@
+# test readonly nameref variables
+# ksh93 allows this but not typeset -rn ref=foo?
+typeset -n ref=foo
+readonly ref
+foo=4
+
+echo $ref
diff --git a/tests/nameref20.sub b/tests/nameref20.sub
new file mode 100644
index 0000000..715bc4d
--- /dev/null
+++ b/tests/nameref20.sub
@@ -0,0 +1,84 @@
+#   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 .
+#
+# a collection of cases in bug reports after bash-5.0-alpha was released
+
+declare -n r=v[0]
+v=(X); r=Y
+declare -p ${!v*}
+printf "%s: <%s>\n" "r" "$r" "v" "$v"
+
+unset -n r
+unset -v v
+
+declare -n ref=var; declare -a ref
+ref=(X)
+declare -p ref var
+
+unset -n ref
+unset -v var
+
+f() { declare -n ref=var; declare ref=(X); declare -p ref var; };
+f
+
+unset -f f
+
+f() { declare -n ref=var; declare -g ref=(X); declare -p ref var; };
+
+declare -n ref=foo
+f
+echo outside:
+declare -p foo
+
+unset -n ref
+unset -v foo
+unset -f f
+
+f() { declare -n ref=var; declare -a ref; ref=(X); declare -p ref var; }
+
+f
+echo outside:
+declare -p ref var
+unset -f f
+
+f() { declare -n ref=var; declare ref; ref=X; declare -p ref var; }
+
+f
+echo outside:
+declare -p ref var
+
+unset -f f
+
+unset -n ref; unset var
+
+f()
+{
+	declare var=X; declare -n ref=var; declare ref=(Y)
+	declare -p ref var
+}
+f
+
+unset -f f
+
+declare -n ref=var
+f() { local ref=Y; declare -p ref var; local; }
+
+var=X
+f
+
+unset -v var
+f
+
+unset -n ref
+unset -f f
+
diff --git a/tests/nameref21.sub b/tests/nameref21.sub
new file mode 100644
index 0000000..08d8f56
--- /dev/null
+++ b/tests/nameref21.sub
@@ -0,0 +1,69 @@
+#   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 .
+#
+# issues with local variables and local namerefs post-bash-4.4
+
+f()
+{
+	local -n ref=var
+	local -A ref=([1]=)
+#	declare -p ref var
+	ref=([2]=)
+	declare -p ref var
+}
+
+unset ref  var
+f
+
+unset ref; var=0
+f
+
+unset var
+unset -f f
+
+f()
+{	
+	local -n ref=var
+	local -a ref=([1]=)
+	ref=([2]=)
+	declare -p ref var
+}
+
+unset ref var
+f
+
+unset ref; var=0
+f
+
+unset var
+unset -f f
+
+f() { local -n ref=var; local -i ref=([1]=); declare -p ref var; }
+
+unset var
+f
+
+var=0
+f
+
+unset var
+unset -f f
+
+f() { local -n ref=var; local ref=1; declare -p ref var; }
+
+var=0
+f
+
+unset var
+unset -f f
+
diff --git a/tests/nameref22.sub b/tests/nameref22.sub
new file mode 100644
index 0000000..4e44fbb
--- /dev/null
+++ b/tests/nameref22.sub
@@ -0,0 +1,97 @@
+#   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 .
+#
+
+declare -n foo=bar
+
+declare foo='a string with spaces'
+echo $foo
+
+unset foo
+declare foo+='many spaces'
+echo $foo
+
+unset foo	# unsets bar
+unset -n foo
+
+declare -a bar
+declare -n foo='bar[0]'
+declare foo+=' still more spaces'
+
+declare -p foo bar
+unset -n foo
+unset bar
+
+declare -a bar
+declare -n foo='bar[0]'
+declare foo=spaces
+declare foo+=' still more spaces'
+
+declare -p foo bar
+
+unset -n foo
+unset bar
+
+ray=ray
+
+declare -a array
+array[0]=zero
+
+declare -n array
+unset array
+
+declare -n array[128]
+unset array
+
+declare -a array='(one two three)'
+declare -p array
+unset array
+
+declare array='(one two three)'
+declare -p array
+unset array
+
+declare -a ar$ray='(one two three)'
+declare -p ar$ray
+unset array
+
+declare -a array=(zero)
+declare -n array='(one two three)'
+declare -n array=three
+declare -p array
+unset array
+
+declare -n array=(one two three)
+declare -p array
+unset array
+
+declare -a array
+declare -n array=one
+declare -p array
+unset array
+
+array=one
+declare -i array[64];
+declare -p array
+unset array
+
+declare -a array=zero
+declare -p array
+unset array
+
+declare -a array
+declare array='(one two three)'
+declare -p array
+unset array
+
+
diff --git a/tests/nameref23.sub b/tests/nameref23.sub
new file mode 100644
index 0000000..358c381
--- /dev/null
+++ b/tests/nameref23.sub
@@ -0,0 +1,82 @@
+declare -ai a
+a[0]=4
+declare -n b='a[0]'
+
+b+=1 ; declare -p a
+
+declare b+=1 ; declare -p a
+
+unset a b
+unset -n b
+
+######
+declare -ai a=(1)
+declare -in b="a[0]"
+declare -p a b
+
+b+=1 ; declare -p a b
+b+=1 ; declare -p a b
+b+=0 ; declare -p a b
+
+unset a b
+
+#####
+declare -ai a=(1)
+declare -n b="1"
+declare -p a
+declare -np b
+
+unset a ; unset -n b
+
+#####
+declare -ai a=('4');
+declare -n b='a[0]';
+declare -ni b;		# this should maybe not be allowed, but it is for now
+declare -p a b
+
+b+=2;
+declare -p a b 
+
+unset a ; unset -n b
+
+#####
+f()
+{
+	local -a a=('' 'foo');
+        local -n b=a[1];
+        echo $b;
+        b+=\ bar;
+        echo $b;
+        declare -p a b;
+}
+f
+
+declare -a a=('' 'foo');
+declare -n b=a[1];
+echo $b;
+b+=\ bar;
+echo $b;
+declare -p a b
+
+unset a ; unset -n b
+
+unset -f f
+f()
+{
+        local -ai a=(0 12);
+        local -n b=a[1];
+        echo $b;
+        b+=4;
+        echo $b;
+        declare -p a;
+}
+f
+
+declare -ai a=(0 12);
+declare -n b=a[1];
+echo $b;
+b+=4;
+echo $b;
+declare -p a
+
+unset a ; unset -n b
diff --git a/tests/nameref3.sub b/tests/nameref3.sub
new file mode 100644
index 0000000..67cb098
--- /dev/null
+++ b/tests/nameref3.sub
@@ -0,0 +1,50 @@
+#   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 .
+#
+# nameref requires changes to unset
+bar=one
+typeset -n foo=bar
+
+# normal unset unsets only variable nameref references
+# need unset -n to unset nameref itself
+unset foo
+echo "expect "
+recho ${bar-unset}
+echo "expect "
+recho ${foo-unset}
+echo "expect "
+recho ${!foo}
+unset -n foo
+echo "expect "
+recho "${!foo-unset}"
+
+readonly bar=two
+typeset -n foo=bar
+
+unset foo	# this should fail because bar is readonly
+
+echo "expect "
+echo ${bar-unset}
+echo "expect "
+echo ${foo-unset}
+
+# one question is what happens when you unset the underlying variable
+qux=three
+typeset -n ref
+ref=qux
+
+echo $ref
+unset qux
+echo ${ref-unset}
+qux=four
+echo ${ref-unset}
diff --git a/tests/nameref4.sub b/tests/nameref4.sub
new file mode 100644
index 0000000..6367d56
--- /dev/null
+++ b/tests/nameref4.sub
@@ -0,0 +1,234 @@
+#   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 .
+#
+# test suite cribbed from ksh93 nameref tests
+typeset -i errors=0
+ckval()
+{
+	typeset -n one=$1
+
+	if [[ $one != $2 ]]; then
+		echo "one=$one != 2=$2"
+		(( errors++ ))
+	fi
+}
+		
+ckref()
+{
+	typeset -n one=$1 two=$2
+
+	if [[ $one != $two ]]; then
+		echo "one=$one != two=$two"
+		(( errors++ ))
+	fi
+}
+
+name=first
+
+ckref name name
+
+func1()
+{
+        typeset -n color=$1
+        func2 color
+}
+
+func2()
+{
+        typeset color=$1
+        set -- ${color[@]}
+        printf "<%s>" "$@"
+	echo
+}
+
+typeset -A color
+color[apple]=red
+color[grape]=purple
+color[banana]=yellow
+
+# XXX
+#func1 color
+
+unset foo bar
+export bar=foo
+typeset -n foo=bar
+ckval foo foo
+
+# XXX - need to see if we can do checks for self-referencing at assignment
+# time
+command typeset -n xx=yy
+command typeset -n yy=xx
+echo $?
+
+unset foo bar
+unset -n foo bar
+set foo
+typeset -n bar=$1
+foo=hello
+ckval bar hello
+
+# XXX -- another self-referencing error?
+# ksh93 makes this another invalid self-reference
+unset foo
+unset -n bar
+
+bar=123
+foobar()
+{
+	typeset -n foo=bar
+	typeset -n foo=bar
+
+	ckval foo 123
+}
+
+typeset -n short=long
+short=( a b )
+echo "expect "
+echo ${long[@]}
+unset long
+unset -n short
+
+# assignment to a previously-unset variable
+typeset -n short=long
+short=foo
+echo "expect "
+echo ${long}
+unset long
+unset -n short
+
+unset foo bar
+
+# simple array references and assignments
+typeset -n foo=bar
+bar=( 1 3 5 7 9)
+echo ${foo[@]}
+echo ${foo[4]}
+foo[2]=42
+echo ${bar[@]}
+
+barfunc()
+{
+	typeset -n v=$1
+	echo ${v[@]}
+	echo ${v[4]}
+	v[2]=44
+	echo ${bar[@]}
+}
+barfunc bar
+
+unset -f foobar
+unset bar
+unset -n foo
+
+# should ref at global scope survive call to foobar()?
+unset ref x
+typeset -n ref
+x=42
+foobar()
+{
+	local xxx=3
+	ref=xxx
+	return 0
+}
+echo ${ref-unset}
+ref=x
+foobar
+ckval ref xxx
+ckval x xxx
+
+# assignment in a function to something possibly out of scope
+assignvar()
+{
+	typeset -n v=$1
+	shift
+	v="$@"
+}
+
+assignvar lex a b c d e
+echo "expect "
+recho "${lex}"
+
+unset foo bar short long
+
+typeset -n foo='x[2]'
+
+x=(zero one two three four)
+foo=seven
+
+echo "expect     "
+recho "${x[@]}"
+
+unset ref x
+unset -n ref
+
+typeset -n ref
+ref=x
+# make sure nameref to a previously-unset variable creates the variable
+ref=42
+ckval x 42
+
+# make sure they work inside arithmetic expressions
+unset foo bar ref x xxx
+unset -n ref
+
+typeset -i ivar
+typeset -n iref=ivar
+
+ivar=4+3
+ckval ivar 7
+iref+=5
+ckval ivar 12
+echo $(( iref+4 ))
+(( iref=17 ))
+ckval ivar 17
+
+typeset +n iref
+unset iref ivar
+
+typeset +n foo bar
+unset foo bar
+
+# should the reference do immediate evaluation or deferred?
+set -- one two three four
+bar=4
+# XXX - what does foo get set to here?
+typeset -n foo='bar[0]'
+echo "expect <4>"
+echo ${bar[0]}
+echo "expect <4>"
+echo ${foo}
+echo "expect <4>"
+echo $foo
+ckval foo $bar
+
+# Need to add code and tests for nameref to array subscripts
+bar=(one two three four)
+
+typeset -n foo='bar[0]'
+typeset -n qux='bar[3]'
+echo "expect "
+echo ${bar[0]}
+echo "expect "
+echo ${foo}
+echo "expect "
+echo $foo
+ckval foo $bar
+
+echo "expect "
+echo $qux
+ckval qux ${bar[3]}
+
+# Need to add code and tests for `for' loop nameref variables
+
+echo errors = $errors
+exit $errors
diff --git a/tests/nameref5.sub b/tests/nameref5.sub
new file mode 100644
index 0000000..6855e99
--- /dev/null
+++ b/tests/nameref5.sub
@@ -0,0 +1,63 @@
+#   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 .
+#
+# nameref variables as for loop index variables are special
+v1=1
+v2=2
+
+# simple for loop
+for v in v1 v2
+do
+	typeset -n ref=$v
+	echo $ref
+done
+unset v
+
+set -- first second third fourth fifth
+
+# unless you put a ${!v} in the for loop, ksh93 misbehaves
+typeset -n v=v1
+for v in v1 v2; do
+	echo "${!v}: $v"
+done
+unset v
+
+# example cribbed from ksh93 o'reilly book
+first="I am first"
+second="I am in the middle"
+third="I am last"
+
+typeset -n ref=first
+for ref in first second third ; do
+	echo "ref -> ${!ref}, value: $ref"
+done
+echo final state: "ref -> ${!ref}, value: $ref"
+
+readonly one=1
+readonly two=2
+readonly three=3
+
+typeset -n ref=one
+for ref in one two three; do
+	echo "ref -> ${!ref}, value: $ref"
+done
+echo final state: "ref -> ${!ref}, value: $ref"
+
+unset ref
+typeset -n ref=one
+readonly ref
+
+for ref in one two three; do
+	echo "ref -> ${!ref}, value: $ref"
+done
+echo final state: "ref -> ${!ref}, value: $ref"
diff --git a/tests/nameref6.sub b/tests/nameref6.sub
new file mode 100644
index 0000000..8497967
--- /dev/null
+++ b/tests/nameref6.sub
@@ -0,0 +1,57 @@
+#   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 .
+#
+# these should be errors
+typeset -n x=x
+#echo $x -- $?
+
+typeset -n x[3]=x
+#echo $x -- $?
+
+x=(the browns suck)
+y=(one two three)
+# should be an error but not disturb the current contents of x
+# maybe rethink that later
+typeset -n x=y
+echo $x -- $?
+
+typeset -n
+
+unset x y
+
+y=42
+typeset -i x=1
+
+# the integer attribute causes arithmetic eval to be done
+# we should not allow namerefs to non-identifiers
+typeset -n x=y
+echo $x -- $?
+
+typeset +n x
+echo $x -- $?
+
+# same kind of thing
+
+unset -n x
+unset y
+
+set -- first second third
+y=2
+typeset -i x=1
+
+typeset -n x=y
+echo $x -- $?
+echo ${x} -- $?
+
+typeset +n x
+echo $x -- $?
diff --git a/tests/nameref7.sub b/tests/nameref7.sub
new file mode 100644
index 0000000..5e67ac0
--- /dev/null
+++ b/tests/nameref7.sub
@@ -0,0 +1,31 @@
+#   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 .
+#
+fn ()
+{
+	declare -n var=foo; var=bar
+}
+
+unset foo
+fn
+echo ${foo:-unset}
+
+unset -f fn
+unset foo
+fn()
+{
+	declare -n var; var=foo
+}
+
+fn
+echo ${foo:-unset}
diff --git a/tests/nameref8.sub b/tests/nameref8.sub
new file mode 100644
index 0000000..465463b
--- /dev/null
+++ b/tests/nameref8.sub
@@ -0,0 +1,74 @@
+#   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 .
+#
+function f1
+{
+	typeset -n v=$1
+
+	v=inside
+}
+
+v=global
+f1 v
+echo $v
+
+unset v
+unset -f f1
+
+function foo
+{
+	typeset x=one
+
+	typeset -n y=$1
+	y=two
+	echo inside: $x
+}
+
+foo x
+echo outside: $x
+
+function foo2
+{
+	typeset -n x=$1
+
+	x=foo
+}
+
+foo2 x
+echo $x
+
+unset -f foo
+function foo { typeset -n v=$1; v=local; }
+
+v=global
+foo v
+echo $v
+
+unset v
+
+# invalid self reference at global scope
+typeset -n v=v
+
+# can we catch a circular self-reference?
+typeset -n v=w
+typeset -n w=x
+typeset -n x=v
+
+x=4
+echo x = $x
+
+unset -n v w x
+
+# can we keep local variables invisible when we add nameref attribute?
+function f { typeset x; typeset -n x; x=y; }
+f
diff --git a/tests/nameref9.sub b/tests/nameref9.sub
new file mode 100644
index 0000000..e76c21b
--- /dev/null
+++ b/tests/nameref9.sub
@@ -0,0 +1,8 @@
+arr=( idx1 idx2 )
+i='arr[1]'
+echo ${!i}
+echo ${!i/x/X}
+
+typeset -n f='arr[1]'
+echo ${f}
+echo ${f/x/X}
diff --git a/tests/new-exp.right b/tests/new-exp.right
index c86c546..e3dc40e 100644
--- a/tests/new-exp.right
+++ b/tests/new-exp.right
@@ -3,7 +3,7 @@ argv[1] = 
 argv[1] = 
 argv[1] = 
 argv[1] = 
-./new-exp.tests: line 24: HOME: }: syntax error: operand expected (error token is "}")
+./new-exp.tests: line 41: HOME: }: syntax error: operand expected (error token is "}")
 unset
 argv[1] = 
 argv[1] = 
@@ -59,8 +59,15 @@ argv[1] = <4>
 argv[1] = 
 argv[1] = 
 argv[1] = 
-./new-exp.tests: line 172: ABX: unbound variable
-./new-exp.tests: line 176: $6: cannot assign in this way
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+./new-exp.tests: line 197: ABX: unbound variable
+./new-exp.tests: line 201: $6: cannot assign in this way
 argv[1] = 
 argv[1] = 
 argv[1] = 
@@ -162,11 +169,14 @@ 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
+a
+./new-exp2.sub: line 55: /tmp/redir-notthere: No such file or directory
 1
+
+./new-exp2.sub: line 62: 1111111111111111111111: command not found
+
 argv[1] = <6>
-./new-exp.tests: line 277: ${#:}: bad substitution
+./new-exp.tests: line 302: ${#:}: bad substitution
 argv[1] = <'>
 argv[1] = <">
 argv[1] = <"hello">
@@ -233,7 +243,7 @@ argv[1] = 
 argv[1] = 
 argv[1] = 
 argv[1] = 
-./new-exp.tests: line 421: -2: substring expression < 0
+argv[1] = 
 argv[1] = 
 argv[1] = 
 argv[1] = 
@@ -244,6 +254,12 @@ argv[1] = 
 argv[1] = 
 argv[1] = 
 argv[1] = 
+x
+x
+x
+xabc
+x
+x
 argv[1] = 
 argv[2] = 
 argv[3] = 
@@ -395,13 +411,13 @@ argv[6] = 
 argv[7] = 
 argv[8] = 
 argv[9] = 
-./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
+./new-exp.tests: line 520: $9: unbound variable
+./new-exp.tests: line 521: 9: unbound variable
+./new-exp.tests: line 522: UNSET: unbound variable
+./new-exp.tests: line 523: UNSET: unbound variable
+./new-exp.tests: line 524: UNSET: unbound variable
+./new-exp.tests: line 525: UNSET: unbound variable
+./new-exp.tests: line 526: UNSET: unbound variable
 argv[1] = <5>
 argv[1] = <#>
 argv[1] = <#>
@@ -418,10 +434,28 @@ 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
+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>
+./new-exp3.sub: line 36: ${!_Q* }: bad substitution
+./new-exp3.sub: line 41: ${!1*}: bad substitution
+./new-exp3.sub: line 43: ${!@*}: bad substitution
 Case01---3---A:B:C---
 Case02---1---A B C::---
 Case03---3---A:B:C---
@@ -430,7 +464,7 @@ 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
+./new-exp.tests: line 546: ${$(($#-1))}: bad substitution
 argv[1] = 
 argv[2] = 
 argv[3] = 
@@ -447,7 +481,8 @@ argv[1] = 
 argv[1] = 
 argv[2] = 
 argv[1] = <>
-./new-exp.tests: line 525: $(($# - 2)): substring expression < 0
+./new-exp.tests: line 565: $(($# - 2)): substring expression < 0
+./new-exp.tests: line 567: -2: substring expression < 0
 argv[1] = 
 argv[2] = 
 argv[3] = 
@@ -537,6 +572,224 @@ bar ()
 { 
     echo < <(cat x1)
 }
+start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+ing999
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+art;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string9
+start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+start;ing0;ing1;ing2;ing3;ing4;ing5;ing6;ing7;ing8;ing9;ing10;ing11;ing12;ing13;ing14;ing15;ing16;ing17;ing18;ing19;ing20;ing21;ing22;ing23;ing24;ing25;ing26;ing27;ing28;ing29;ing30;ing31;ing32;ing33;ing34;ing35;ing36;ing37;ing38;ing39;ing40;ing41;ing42;ing43;ing44;ing45;ing46;ing47;ing48;ing49;ing50;ing51;ing52;ing53;ing54;ing55;ing56;ing57;ing58;ing59;ing60;ing61;ing62;ing63;ing64;ing65;ing66;ing67;ing68;ing69;ing70;ing71;ing72;ing73;ing74;ing75;ing76;ing77;ing78;ing79;ing80;ing81;ing82;ing83;ing84;ing85;ing86;ing87;ing88;ing89;ing90;ing91;ing92;ing93;ing94;ing95;ing96;ing97;ing98;ing99;ing100;ing101;ing102;ing103;ing104;ing105;ing106;ing107;ing108;ing109;ing110;ing111;ing112;ing113;ing114;ing115;ing116;ing117;ing118;ing119;ing120;ing121;ing122;ing123;ing124;ing125;ing126;ing127;ing128;ing129;ing130;ing131;ing132;ing133;ing134;ing135;ing136;ing137;ing138;ing139;ing140;ing141;ing142;ing143;ing144;ing145;ing146;ing147;ing148;ing149;ing150;ing151;ing152;ing153;ing154;ing155;ing156;ing157;ing158;ing159;ing160;ing161;ing162;ing163;ing164;ing165;ing166;ing167;ing168;ing169;ing170;ing171;ing172;ing173;ing174;ing175;ing176;ing177;ing178;ing179;ing180;ing181;ing182;ing183;ing184;ing185;ing186;ing187;ing188;ing189;ing190;ing191;ing192;ing193;ing194;ing195;ing196;ing197;ing198;ing199;ing200;ing201;ing202;ing203;ing204;ing205;ing206;ing207;ing208;ing209;ing210;ing211;ing212;ing213;ing214;ing215;ing216;ing217;ing218;ing219;ing220;ing221;ing222;ing223;ing224;ing225;ing226;ing227;ing228;ing229;ing230;ing231;ing232;ing233;ing234;ing235;ing236;ing237;ing238;ing239;ing240;ing241;ing242;ing243;ing244;ing245;ing246;ing247;ing248;ing249;ing250;ing251;ing252;ing253;ing254;ing255;ing256;ing257;ing258;ing259;ing260;ing261;ing262;ing263;ing264;ing265;ing266;ing267;ing268;ing269;ing270;ing271;ing272;ing273;ing274;ing275;ing276;ing277;ing278;ing279;ing280;ing281;ing282;ing283;ing284;ing285;ing286;ing287;ing288;ing289;ing290;ing291;ing292;ing293;ing294;ing295;ing296;ing297;ing298;ing299;ing300;ing301;ing302;ing303;ing304;ing305;ing306;ing307;ing308;ing309;ing310;ing311;ing312;ing313;ing314;ing315;ing316;ing317;ing318;ing319;ing320;ing321;ing322;ing323;ing324;ing325;ing326;ing327;ing328;ing329;ing330;ing331;ing332;ing333;ing334;ing335;ing336;ing337;ing338;ing339;ing340;ing341;ing342;ing343;ing344;ing345;ing346;ing347;ing348;ing349;ing350;ing351;ing352;ing353;ing354;ing355;ing356;ing357;ing358;ing359;ing360;ing361;ing362;ing363;ing364;ing365;ing366;ing367;ing368;ing369;ing370;ing371;ing372;ing373;ing374;ing375;ing376;ing377;ing378;ing379;ing380;ing381;ing382;ing383;ing384;ing385;ing386;ing387;ing388;ing389;ing390;ing391;ing392;ing393;ing394;ing395;ing396;ing397;ing398;ing399;ing400;ing401;ing402;ing403;ing404;ing405;ing406;ing407;ing408;ing409;ing410;ing411;ing412;ing413;ing414;ing415;ing416;ing417;ing418;ing419;ing420;ing421;ing422;ing423;ing424;ing425;ing426;ing427;ing428;ing429;ing430;ing431;ing432;ing433;ing434;ing435;ing436;ing437;ing438;ing439;ing440;ing441;ing442;ing443;ing444;ing445;ing446;ing447;ing448;ing449;ing450;ing451;ing452;ing453;ing454;ing455;ing456;ing457;ing458;ing459;ing460;ing461;ing462;ing463;ing464;ing465;ing466;ing467;ing468;ing469;ing470;ing471;ing472;ing473;ing474;ing475;ing476;ing477;ing478;ing479;ing480;ing481;ing482;ing483;ing484;ing485;ing486;ing487;ing488;ing489;ing490;ing491;ing492;ing493;ing494;ing495;ing496;ing497;ing498;ing499;ing500;ing501;ing502;ing503;ing504;ing505;ing506;ing507;ing508;ing509;ing510;ing511;ing512;ing513;ing514;ing515;ing516;ing517;ing518;ing519;ing520;ing521;ing522;ing523;ing524;ing525;ing526;ing527;ing528;ing529;ing530;ing531;ing532;ing533;ing534;ing535;ing536;ing537;ing538;ing539;ing540;ing541;ing542;ing543;ing544;ing545;ing546;ing547;ing548;ing549;ing550;ing551;ing552;ing553;ing554;ing555;ing556;ing557;ing558;ing559;ing560;ing561;ing562;ing563;ing564;ing565;ing566;ing567;ing568;ing569;ing570;ing571;ing572;ing573;ing574;ing575;ing576;ing577;ing578;ing579;ing580;ing581;ing582;ing583;ing584;ing585;ing586;ing587;ing588;ing589;ing590;ing591;ing592;ing593;ing594;ing595;ing596;ing597;ing598;ing599;ing600;ing601;ing602;ing603;ing604;ing605;ing606;ing607;ing608;ing609;ing610;ing611;ing612;ing613;ing614;ing615;ing616;ing617;ing618;ing619;ing620;ing621;ing622;ing623;ing624;ing625;ing626;ing627;ing628;ing629;ing630;ing631;ing632;ing633;ing634;ing635;ing636;ing637;ing638;ing639;ing640;ing641;ing642;ing643;ing644;ing645;ing646;ing647;ing648;ing649;ing650;ing651;ing652;ing653;ing654;ing655;ing656;ing657;ing658;ing659;ing660;ing661;ing662;ing663;ing664;ing665;ing666;ing667;ing668;ing669;ing670;ing671;ing672;ing673;ing674;ing675;ing676;ing677;ing678;ing679;ing680;ing681;ing682;ing683;ing684;ing685;ing686;ing687;ing688;ing689;ing690;ing691;ing692;ing693;ing694;ing695;ing696;ing697;ing698;ing699;ing700;ing701;ing702;ing703;ing704;ing705;ing706;ing707;ing708;ing709;ing710;ing711;ing712;ing713;ing714;ing715;ing716;ing717;ing718;ing719;ing720;ing721;ing722;ing723;ing724;ing725;ing726;ing727;ing728;ing729;ing730;ing731;ing732;ing733;ing734;ing735;ing736;ing737;ing738;ing739;ing740;ing741;ing742;ing743;ing744;ing745;ing746;ing747;ing748;ing749;ing750;ing751;ing752;ing753;ing754;ing755;ing756;ing757;ing758;ing759;ing760;ing761;ing762;ing763;ing764;ing765;ing766;ing767;ing768;ing769;ing770;ing771;ing772;ing773;ing774;ing775;ing776;ing777;ing778;ing779;ing780;ing781;ing782;ing783;ing784;ing785;ing786;ing787;ing788;ing789;ing790;ing791;ing792;ing793;ing794;ing795;ing796;ing797;ing798;ing799;ing800;ing801;ing802;ing803;ing804;ing805;ing806;ing807;ing808;ing809;ing810;ing811;ing812;ing813;ing814;ing815;ing816;ing817;ing818;ing819;ing820;ing821;ing822;ing823;ing824;ing825;ing826;ing827;ing828;ing829;ing830;ing831;ing832;ing833;ing834;ing835;ing836;ing837;ing838;ing839;ing840;ing841;ing842;ing843;ing844;ing845;ing846;ing847;ing848;ing849;ing850;ing851;ing852;ing853;ing854;ing855;ing856;ing857;ing858;ing859;ing860;ing861;ing862;ing863;ing864;ing865;ing866;ing867;ing868;ing869;ing870;ing871;ing872;ing873;ing874;ing875;ing876;ing877;ing878;ing879;ing880;ing881;ing882;ing883;ing884;ing885;ing886;ing887;ing888;ing889;ing890;ing891;ing892;ing893;ing894;ing895;ing896;ing897;ing898;ing899;ing900;ing901;ing902;ing903;ing904;ing905;ing906;ing907;ing908;ing909;ing910;ing911;ing912;ing913;ing914;ing915;ing916;ing917;ing918;ing919;ing920;ing921;ing922;ing923;ing924;ing925;ing926;ing927;ing928;ing929;ing930;ing931;ing932;ing933;ing934;ing935;ing936;ing937;ing938;ing939;ing940;ing941;ing942;ing943;ing944;ing945;ing946;ing947;ing948;ing949;ing950;ing951;ing952;ing953;ing954;ing955;ing956;ing957;ing958;ing959;ing960;ing961;ing962;ing963;ing964;ing965;ing966;ing967;ing968;ing969;ing970;ing971;ing972;ing973;ing974;ing975;ing976;ing977;ing978;ing979;ing980;ing981;ing982;ing983;ing984;ing985;ing986;ing987;ing988;ing989;ing990;ing991;ing992;ing993;ing994;ing995;ing996;ing997;ing998;ing999
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+ing999
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+art;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string999
+start;string0;string1;string2;string3;string4;string5;string6;string7;string8;string9;string10;string11;string12;string13;string14;string15;string16;string17;string18;string19;string20;string21;string22;string23;string24;string25;string26;string27;string28;string29;string30;string31;string32;string33;string34;string35;string36;string37;string38;string39;string40;string41;string42;string43;string44;string45;string46;string47;string48;string49;string50;string51;string52;string53;string54;string55;string56;string57;string58;string59;string60;string61;string62;string63;string64;string65;string66;string67;string68;string69;string70;string71;string72;string73;string74;string75;string76;string77;string78;string79;string80;string81;string82;string83;string84;string85;string86;string87;string88;string89;string90;string91;string92;string93;string94;string95;string96;string97;string98;string99;string100;string101;string102;string103;string104;string105;string106;string107;string108;string109;string110;string111;string112;string113;string114;string115;string116;string117;string118;string119;string120;string121;string122;string123;string124;string125;string126;string127;string128;string129;string130;string131;string132;string133;string134;string135;string136;string137;string138;string139;string140;string141;string142;string143;string144;string145;string146;string147;string148;string149;string150;string151;string152;string153;string154;string155;string156;string157;string158;string159;string160;string161;string162;string163;string164;string165;string166;string167;string168;string169;string170;string171;string172;string173;string174;string175;string176;string177;string178;string179;string180;string181;string182;string183;string184;string185;string186;string187;string188;string189;string190;string191;string192;string193;string194;string195;string196;string197;string198;string199;string200;string201;string202;string203;string204;string205;string206;string207;string208;string209;string210;string211;string212;string213;string214;string215;string216;string217;string218;string219;string220;string221;string222;string223;string224;string225;string226;string227;string228;string229;string230;string231;string232;string233;string234;string235;string236;string237;string238;string239;string240;string241;string242;string243;string244;string245;string246;string247;string248;string249;string250;string251;string252;string253;string254;string255;string256;string257;string258;string259;string260;string261;string262;string263;string264;string265;string266;string267;string268;string269;string270;string271;string272;string273;string274;string275;string276;string277;string278;string279;string280;string281;string282;string283;string284;string285;string286;string287;string288;string289;string290;string291;string292;string293;string294;string295;string296;string297;string298;string299;string300;string301;string302;string303;string304;string305;string306;string307;string308;string309;string310;string311;string312;string313;string314;string315;string316;string317;string318;string319;string320;string321;string322;string323;string324;string325;string326;string327;string328;string329;string330;string331;string332;string333;string334;string335;string336;string337;string338;string339;string340;string341;string342;string343;string344;string345;string346;string347;string348;string349;string350;string351;string352;string353;string354;string355;string356;string357;string358;string359;string360;string361;string362;string363;string364;string365;string366;string367;string368;string369;string370;string371;string372;string373;string374;string375;string376;string377;string378;string379;string380;string381;string382;string383;string384;string385;string386;string387;string388;string389;string390;string391;string392;string393;string394;string395;string396;string397;string398;string399;string400;string401;string402;string403;string404;string405;string406;string407;string408;string409;string410;string411;string412;string413;string414;string415;string416;string417;string418;string419;string420;string421;string422;string423;string424;string425;string426;string427;string428;string429;string430;string431;string432;string433;string434;string435;string436;string437;string438;string439;string440;string441;string442;string443;string444;string445;string446;string447;string448;string449;string450;string451;string452;string453;string454;string455;string456;string457;string458;string459;string460;string461;string462;string463;string464;string465;string466;string467;string468;string469;string470;string471;string472;string473;string474;string475;string476;string477;string478;string479;string480;string481;string482;string483;string484;string485;string486;string487;string488;string489;string490;string491;string492;string493;string494;string495;string496;string497;string498;string499;string500;string501;string502;string503;string504;string505;string506;string507;string508;string509;string510;string511;string512;string513;string514;string515;string516;string517;string518;string519;string520;string521;string522;string523;string524;string525;string526;string527;string528;string529;string530;string531;string532;string533;string534;string535;string536;string537;string538;string539;string540;string541;string542;string543;string544;string545;string546;string547;string548;string549;string550;string551;string552;string553;string554;string555;string556;string557;string558;string559;string560;string561;string562;string563;string564;string565;string566;string567;string568;string569;string570;string571;string572;string573;string574;string575;string576;string577;string578;string579;string580;string581;string582;string583;string584;string585;string586;string587;string588;string589;string590;string591;string592;string593;string594;string595;string596;string597;string598;string599;string600;string601;string602;string603;string604;string605;string606;string607;string608;string609;string610;string611;string612;string613;string614;string615;string616;string617;string618;string619;string620;string621;string622;string623;string624;string625;string626;string627;string628;string629;string630;string631;string632;string633;string634;string635;string636;string637;string638;string639;string640;string641;string642;string643;string644;string645;string646;string647;string648;string649;string650;string651;string652;string653;string654;string655;string656;string657;string658;string659;string660;string661;string662;string663;string664;string665;string666;string667;string668;string669;string670;string671;string672;string673;string674;string675;string676;string677;string678;string679;string680;string681;string682;string683;string684;string685;string686;string687;string688;string689;string690;string691;string692;string693;string694;string695;string696;string697;string698;string699;string700;string701;string702;string703;string704;string705;string706;string707;string708;string709;string710;string711;string712;string713;string714;string715;string716;string717;string718;string719;string720;string721;string722;string723;string724;string725;string726;string727;string728;string729;string730;string731;string732;string733;string734;string735;string736;string737;string738;string739;string740;string741;string742;string743;string744;string745;string746;string747;string748;string749;string750;string751;string752;string753;string754;string755;string756;string757;string758;string759;string760;string761;string762;string763;string764;string765;string766;string767;string768;string769;string770;string771;string772;string773;string774;string775;string776;string777;string778;string779;string780;string781;string782;string783;string784;string785;string786;string787;string788;string789;string790;string791;string792;string793;string794;string795;string796;string797;string798;string799;string800;string801;string802;string803;string804;string805;string806;string807;string808;string809;string810;string811;string812;string813;string814;string815;string816;string817;string818;string819;string820;string821;string822;string823;string824;string825;string826;string827;string828;string829;string830;string831;string832;string833;string834;string835;string836;string837;string838;string839;string840;string841;string842;string843;string844;string845;string846;string847;string848;string849;string850;string851;string852;string853;string854;string855;string856;string857;string858;string859;string860;string861;string862;string863;string864;string865;string866;string867;string868;string869;string870;string871;string872;string873;string874;string875;string876;string877;string878;string879;string880;string881;string882;string883;string884;string885;string886;string887;string888;string889;string890;string891;string892;string893;string894;string895;string896;string897;string898;string899;string900;string901;string902;string903;string904;string905;string906;string907;string908;string909;string910;string911;string912;string913;string914;string915;string916;string917;string918;string919;string920;string921;string922;string923;string924;string925;string926;string927;string928;string929;string930;string931;string932;string933;string934;string935;string936;string937;string938;string939;string940;string941;string942;string943;string944;string945;string946;string947;string948;string949;string950;string951;string952;string953;string954;string955;string956;string957;string958;string959;string960;string961;string962;string963;string964;string965;string966;string967;string968;string969;string970;string971;string972;string973;string974;string975;string976;string977;string978;string979;string980;string981;string982;string983;string984;string985;string986;string987;string988;string989;string990;string991;string992;string993;string994;string995;string996;string997;string998;string9
+zbcd
+axd
+axxd
+axxd
+zzzz
+zbcd
+axd
+axxd
+axxd
+zzzz
+a Value = 1 2 3 4 5
+a Sub = 0 1 2 3 4
+b Value = a b c d e
+b Sub = 0 1 2 3 4
+c Value = 10 20 40 80
+c Sub = 0 2 4 8
+<1> <2> <3> <4> <5> 
+<10> <20> <40> <80> 
+<>
+<>
+<>
+<>
+<'ab '\''cd'\'' ef'> 
+bash: line 1: ${x@C}: bad substitution
+<'ab'> <'cd ef'> <''> <'gh'> 
+<'ab' 'cd ef' '' 'gh'> 
+<'ab'> <'cd>  <''> <'gh'> 
+<'ab'> <'cd>  <''> <'gh'> 
+<'ab cd'> 
+<'4'> <'ab cd'> 
+<> 
+argv[1] = 
+< 	
+>
+<' \t\n'>
+< 	
+>
+<$' \t\n'>
+declare -r x='ab '\''cd'\'' ef'
+set -- 'ab' 'cd ef' '' 'gh' 
+declare -a A=([0]="ab" [1]="cd ef" [2]="" [3]="gh") 
+declare -a B=() 
+declare -A A=([four]="de" [two]="b c" [three]="" [one]="1" ) 
+r
+a 
+A 
+ir
+a b c d e
+5
+a5b
+i
+declare -i foo
+A
+declare -A foo
+./new-exp10.sub: line 118: ${V@}: bad substitution
+abcxxxdef
+abcådef
+ḅć
+Ã¥
+prependḅć
+Ã¥append
+prependå
+ḅćappend
+Ã¥
+ḅć
+ḅć
+ḅć
+Ã¥
+Ã¥
+Ã¥
+ḅć
+Ã¥
+Ã¥
+ḅć
+ḅć
+HELLO;1 foo;2 foo;
+PASS;1 foo;2 foo;
+after: PASS
+'zzz'
+'zzz'
+declare -rl VAR1
+declare -rl VAR1
+declare -rl VAR1
+declare -rl VAR1
+rl
+rl
+rl
+rl
+declare -arl VAR3
+declare -arl VAR3
+declare -arl VAR3
+declare -arl VAR3
+arl
+arl
+arl
+arl
+one
+one
+'aaa'
+'aaa' 'bbb'
+./new-exp13.sub: line 56: aaa bbb: invalid variable name
+aaa bbb
+0 1
+'aaa'
+'aaa' 'bbb'
+'aaa' 'bbb'
+'aaa' 'bbb'
+a bbb
+aaa bb
+'string'
+'string'
+'value with spaces'
+'value with spaces'
+'a b' 'c d' 'e f'
+'a b' 'c d' 'e f'
+0 "zero" 1 "one" 2 "two" 3 "three"
+0 "zero z" 1 "one o" 2 "two t" 3 "three t"
+argv[1] = <0>
+argv[2] = 
+argv[3] = <1>
+argv[4] = 
+argv[5] = <2>
+argv[6] = 
+argv[7] = <3>
+argv[8] = 
+declare -a foo=()
+ai
+declare -ai foo
+bash: line 1: foo: unbound variable
+ai
+declare -ai foo
+bash: line 1: !bar: unbound variable
+a
+a
+a
+a
+/homes/chetdefg
+/homes/chetdefg
+~defg
+defg
+defg
+defg
+$'&' $'&' $'&' $'&' $'&' $'&' $'&'
+$'a' $'b' $'c' $'d' $'e' $'f' $'g'
+a b c d e f g
+a b c d e f g 
+& & & & & & &
+& & & & & & & 
+& & & & & & &
+\& \& \& \& \& \& \&
+a a a a a a a 
+3 3 3 3 3 3 3 
+abc defg
+abc defg
+& defg
+& defg
+& defg
+\& defg
+\abc defg
+abcdefg
+&defg
+\abcdefg
+\&defg
+\&defg
+\abcdefg
+\\&defg
+&defg
+&defg
+\&defg
+\&defg
+\\&defg
+letx&yee
+letx&yee
+letxssyee
+letxssyee
+letx\&yee
+letx\&yee
+letx&yee
+letx&yee
+let\&ee
+let\\ssee
+let\ssee
+let\ssee
+let\&ee
+let\&ee
+let&ee
+let&ee
+twoone
+&twoone
+onetwo
+one&two
+two
+&two
+otwone
+&twone
 argv[1] = 
 argv[1] = 
-./new-exp.tests: line 576: ABXD: parameter unset
+
+./new-exp.tests: line 1: ABXD: parameter unset
diff --git a/tests/new-exp.tests b/tests/new-exp.tests
index 8c43b66..c542313 100644
--- a/tests/new-exp.tests
+++ b/tests/new-exp.tests
@@ -1,3 +1,20 @@
+#   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 .
+#
+if (( $UID == 0 )); then
+	echo "new-exp.tests: the test suite should not be run as root" >&2
+fi
+
 # 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
@@ -167,6 +184,14 @@ recho ${a-$z}
 expect nothing
 recho ${!1-$z}
 
+set -- a 'b c' d
+unset foo
+foo=@
+expect '   '
+recho ${!foo}
+expect '  '
+recho "${!foo}"
+
 set -u
 expect $0: ABX: unbound variable
 ( recho ${ABX} )
@@ -332,7 +357,7 @@ recho "${foo:-$@}"
 expect '   '
 recho "${foo:-"$@"}"
 
-shift $#
+shift ${#}
 expect nothing
 recho $xxx"$@"
 expect nothing
@@ -417,8 +442,10 @@ recho $c
 c=${var:4}
 expect nothing
 recho $c
-expect '<./new-exp.tests: -2: substring expression < 0>'
+# as of bash-4.2, negative LENGTH means offset from the end
 c=${var:0:-2}
+expect ''
+recho $c
 
 var=abcdefghi
 c=${var:3:12}
@@ -442,6 +469,19 @@ recho ${xxx//%${zzz}}
 recho ${xxx//#${zzz}/}
 recho ${xxx//#${zzz}}
 
+# make sure null strings are replaced appropriately
+unset var
+var=
+echo "${var/#/x}"
+echo "${var/*/x}"
+echo "${var//*/x}"
+
+var=abc
+echo "${var/#/x}"
+echo "${var/*/x}"
+echo "${var//*/x}"
+unset var
+
 # 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
 
@@ -475,7 +515,7 @@ recho ${*%?}
 recho ${@#?}
 recho ${*#?}
 
-shift $#
+shift ${#}
 set -u
 ( recho $9 ; echo after 1)
 ( recho ${9} ; echo after 2)
@@ -523,6 +563,8 @@ recho "${*:1:0}"
 # this is an error -- negative expression
 set a
 recho ${@:1:$(($# - 2))}
+set a b c d e
+recho ${@: -3:-2}
 
 XPATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:.:/sbin:/usr/sbin
 set $( IFS=: ; echo $XPATH ) 
@@ -565,12 +607,48 @@ ${THIS_SH} ./new-exp6.sub
 
 ${THIS_SH} ./new-exp7.sub
 
+${THIS_SH} ./new-exp8.sub
+
+# tests to check whether things like indirect expansion of a variable whose
+# value is 'anothervar[@]' stop working
+${THIS_SH} ./new-exp9.sub
+
+# new parameter transformation `@' expansion operator
+${THIS_SH} ./new-exp10.sub
+
+# parameter substring replacement and removal operators with multibyte chars
+${THIS_SH} ./new-exp11.sub
+
+# indirect expansion with arrays and local variables
+${THIS_SH} ./new-exp12.sub
+
+# more indirect expansion and parameter transformation issues
+${THIS_SH} ./new-exp13.sub
+
+# new K parameter transformation operator
+${THIS_SH} ./new-exp14.sub
+
+# ongoing work with a/A parameter transformations and `nounset'
+${THIS_SH} ./new-exp15.sub
+
+# pattern substitution with `&' (quoted and unquoted) in the replacement string
+${THIS_SH} ./new-exp16.sub
+
+
 # problems with stray CTLNUL in bash-4.0-alpha
 unset a
 a=/a
 recho "/${a%/*}"
 recho "/${a///a/}"
 
-# this must be last!
+patfunc()
+{
+	echo ${1##*"${1##*}"}
+}
+patfunc foo
+
+# caused core dumps because of bad bracket expression parsing in bash-5.0
+eval : $'${x/#[0\xef\xbf\xbd\\Z[:]]}'
+
 expect $0: 'ABXD: parameter unset'
-recho ${ABXD:?"parameter unset"}
+${THIS_SH} -c 'recho ${ABXD:?"parameter unset"}' $0
diff --git a/tests/new-exp1.sub b/tests/new-exp1.sub
index c015c22..d29b93c 100644
--- a/tests/new-exp1.sub
+++ b/tests/new-exp1.sub
@@ -1,3 +1,17 @@
+#   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 .
+#
+FN=${TMPDIR}/bashtest-$$
 expect()
 {
         echo expect "$@"
@@ -5,7 +19,11 @@ 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
+echo this is test 2 > $FN
 expect this is test 2
-cat <(cat /tmp/x)
-rm -f /tmp/x
+cat <(cat $FN)
+rm -f $FN
+
+foo=
+expect a
+cat ${foo:-<(echo a)}
diff --git a/tests/new-exp10.sub b/tests/new-exp10.sub
new file mode 100644
index 0000000..5b199d4
--- /dev/null
+++ b/tests/new-exp10.sub
@@ -0,0 +1,118 @@
+#   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 .
+#
+# new framework for parameter transformations, post bash-4.3
+
+printf "<%s>" "${x@Q}" ; echo
+printf "<%s>" "${x@E}" ; echo
+printf "<%s>" "${x@P}" ; echo
+printf "<%s>" "${x@A}" ; echo
+
+x="ab 'cd' ef"
+printf "<%s> " "${x@Q}" ; echo 
+
+# this needs to be run in a subshell because invalid transformation operators
+# are now treated as substitution errors, fatal in non-interactive shells
+${THIS_SH} -c 'x=abcdef ; printf "<%s>" "${x@C}"' bash
+
+# if unquoted, normal word splitting happens
+set -- ab 'cd ef' '' gh
+printf "<%s> " "${@@Q}" ; echo
+printf "<%s> " "${*@Q}" ; echo
+printf "<%s> " ${@@Q} ; echo
+printf "<%s> " ${*@Q} ; echo
+
+y[0]=4
+y[1]='ab cd'
+
+printf "<%s> " "${y[1]@Q}" ; echo
+printf "<%s> " "${y[@]@Q}" ; echo	# mksh doesn't like @ or * or arrays subscripted with them
+
+printf "<%s> " "${z@Q}"	; echo	# empty string?
+
+recho ${z@Q}		# this disappears
+
+#
+HOST=host
+SHELL_LEVEL=2
+NPS1='\[\]${HOST}($SHELL_LEVEL)[\v]\$ '
+
+recho "${NPS1@P}"
+
+#
+D=' \t\n'
+printf "<%s>" "${D@E}" ; echo
+printf "<%s>" "${D@Q}" ; echo
+
+E=$' \t\n'
+printf "<%s>" "${E@E}" ; echo
+printf "<%s>" "${E@Q}" ; echo
+
+declare x
+declare -r x="ab 'cd' ef"
+printf "%s" "${x@A}" ; echo 
+
+set -- ab 'cd ef' '' gh
+printf "%s " "${@@A}" ; echo
+
+A=( "$@" )
+printf "%s " "${A[@]@A}" ; echo
+B=()
+printf "%s " "${B[@]@A}" ; echo
+
+unset A
+declare -A A
+A=( [one]=1 [two]='b c' [three]='' [four]=de )
+printf "%s " "${A[@]@A}" ; echo
+
+unset X
+declare X
+declare -r X="ab 'cd' ef"
+printf "%s" "${X@a}" ; echo 
+
+set -- 1 2 3 4
+
+unset A
+A=( "$@" )
+printf "%s " "${A@a}" ; echo
+
+unset A
+declare -A A
+A=( [one]=1 [two]='b c' [three]='' [four]=de )
+printf "%s " "${A@a}" ; echo
+
+declare -ir Y=0
+printf "%s" "${Y@a}" ; echo 
+
+# make sure we still handle ${#@} and ${@} as posix requires
+set -- a b c d e
+echo ${@}
+echo ${#@}
+echo a${#@}b
+
+# new feature in bash-5.0: display attributes of even unset variables
+unset -v foo
+
+declare -i foo
+echo ${foo@a}
+
+declare -p foo
+
+unset foo
+declare -A foo
+echo ${foo@a}
+
+declare -p foo
+
+V=42
+echo ${V@}	# error
diff --git a/tests/new-exp11.sub b/tests/new-exp11.sub
new file mode 100644
index 0000000..6a9edd5
--- /dev/null
+++ b/tests/new-exp11.sub
@@ -0,0 +1,59 @@
+#   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 .
+#
+# pattern matching and replacement operators with multibyte characters
+
+LANG=en_US.UTF-8
+
+s1='abcådef'
+s2='Ã¥'
+s3='ḅć'
+
+s23=${s2}${s3}
+
+echo ${s1/$s2/xxx}
+echo ${s1/$s3/xxx}
+
+echo ${s23/#$s2/}
+echo ${s23/%$s3/}
+
+echo ${s23/#$s2/prepend}
+echo ${s23/%$s3/append}
+
+echo ${s2/#/prepend}
+echo ${s3/%/append}
+
+echo ${s2/#/}
+echo ${s3/%/}
+
+recho ${s2/$s2/}
+recho ${s3/$s3/}
+
+# posix pattern replacements
+
+echo ${s23##$s2}
+echo ${s23#$s2}
+
+echo ${s23%%$s3}
+echo ${s23%$s3}
+
+# fail
+
+echo ${s2/#ab/xx}
+echo ${s3/%ab/xx}
+
+echo ${s2#ab}
+echo ${s2##ab}
+
+echo ${s3%ab}
+echo ${s3%%ab}
diff --git a/tests/new-exp12.sub b/tests/new-exp12.sub
new file mode 100644
index 0000000..1fbd5d6
--- /dev/null
+++ b/tests/new-exp12.sub
@@ -0,0 +1,40 @@
+#   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 .
+#
+#
+# make sure indirect expansion for arrays uses the closest-scope instance
+# of the resulting variable name
+
+array_1=("PASS")
+array_2=("1 foo" "2 foo")
+
+unsafe_fn ()
+{
+    local array_1=('HELLO')
+    local a=("${!1}") b=("${!2}")
+    printf '%s;' "${a[@]}" "${b[@]}"
+    printf '\n'
+}
+
+safe_fn ()
+{
+    local a=("${!1}") b=("${!2}")
+    local array_1=('FAIL')
+    printf '%s;' "${a[@]}" "${b[@]}"
+    printf '\n'
+}
+
+unsafe_fn 'array_1[@]' 'array_2[@]'
+safe_fn 'array_1[@]' 'array_2[@]'
+
+echo after: ${array_1[@]}
diff --git a/tests/new-exp13.sub b/tests/new-exp13.sub
new file mode 100644
index 0000000..7e8ed32
--- /dev/null
+++ b/tests/new-exp13.sub
@@ -0,0 +1,72 @@
+#   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 .
+#
+
+declare -lr VAR1
+declare -lr VAR2=zzz
+declare -alr VAR3
+
+var=VAR2
+
+echo ${!var@Q}
+echo ${VAR2@Q}
+
+echo ${VAR1@A}
+echo ${VAR1[@]@A}
+echo "${VAR1@A}"
+echo "${VAR1[@]@A}"
+
+echo "${VAR1[@]@a}"
+echo ${VAR1[@]@a}
+echo "${VAR1@a}"
+echo ${VAR1@a}
+
+echo ${VAR3@A}
+echo ${VAR3[@]@A}
+echo "${VAR3@A}"
+echo "${VAR3[@]@A}"
+
+echo "${VAR3[@]@a}"
+echo ${VAR3[@]@a}
+echo "${VAR3@a}"
+echo ${VAR3@a}
+
+var=one
+
+echo ${var}
+echo ${var[@]}
+
+VAR4=(aaa bbb)
+
+varname=VAR4
+
+echo ${!varname[@]@Q}
+
+echo ${VAR4[@]@Q}
+echo ${!VAR4[@]@Q}
+
+echo ${VAR4[@]}
+echo ${!VAR4[@]}
+
+VAR5=(aaa bbb)
+varname="VAR5[@]"
+
+echo "${VAR5@Q}"
+echo "${VAR5[@]@Q}"
+
+echo "${!varname@Q}"
+echo "${!varname[@]@Q}"
+
+# caused core dumps through bash-5.0
+echo "${!varname##aa}"
+echo "${!varname[@]%b}"
diff --git a/tests/new-exp14.sub b/tests/new-exp14.sub
new file mode 100644
index 0000000..92f51ea
--- /dev/null
+++ b/tests/new-exp14.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+
+# test the other uses of the 'K' transform operator and its sibling 'k'
+# the associative array tests are performed separately, since that was the
+# original motivation for this feature
+foo=string
+bar='value with spaces'
+
+set -- 'a b' 'c d' 'e f'
+
+echo ${foo@K}
+echo ${foo@k}
+echo ${bar@K}
+echo ${bar@k}
+
+echo ${@@K}
+echo "${@@K}"
+
+foo=( zero one two three )
+echo ${foo[@]@K}
+
+foo=( 'zero z' 'one o' 'two t' 'three t' )
+echo ${foo[@]@K}
+recho "${foo[@]@k}"
diff --git a/tests/new-exp15.sub b/tests/new-exp15.sub
new file mode 100644
index 0000000..f8b9ed8
--- /dev/null
+++ b/tests/new-exp15.sub
@@ -0,0 +1,29 @@
+#   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 .
+#
+
+: ${THIS_SH:=./bash}
+
+${THIS_SH} -c 'declare -a foo=() ; declare -p foo' bash
+
+${THIS_SH} -c 'declare -ia foo=() ; echo ${foo@a} ; echo ${foo@A}' bash
+${THIS_SH} -uc 'declare -ia foo=() ; echo ${foo@a} ; echo ${foo@A}' bash
+
+${THIS_SH} -c 'declare -ia foo=() ; bar=foo; echo ${!bar@a} ; echo ${!bar@A}' bash
+${THIS_SH} -uc 'declare -ia foo=() ; bar=foo; echo ${!bar@a} ; echo ${!bar@A}' bash
+
+${THIS_SH} -c 'declare -a foo=( [1]=one ) ; echo ${foo@a}' bash
+${THIS_SH} -uc 'declare -a foo=( [1]=one ) ; echo ${foo@a}' bash
+
+${THIS_SH} -c 'declare -a foo=( [1]=one ) ; bar=foo; echo ${!bar@a}' bash
+${THIS_SH} -uc 'declare -a foo=( [1]=one ) ; bar=foo; echo ${!bar@a}' bash
diff --git a/tests/new-exp16.sub b/tests/new-exp16.sub
new file mode 100644
index 0000000..2ed751d
--- /dev/null
+++ b/tests/new-exp16.sub
@@ -0,0 +1,120 @@
+#   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 .
+#
+
+HOME=/homes/chet
+string=abcdefg
+set -- a b c
+
+shopt -u patsub_replacement
+
+# verify existing behavior
+echo ${string/abc/~}
+echo "${string/abc/~}"
+echo ${string/abc/"~"}
+
+echo ${string/abc/$notthere}
+echo "${string/abc/$notthere}"
+echo "${string/abc/"$notthere"}"
+
+echo ${string//?/\$\'&\' } 
+
+shopt -s patsub_replacement
+
+echo ${string//?/\$\'&\' } 
+
+echo ${string//?/& } 
+echo "${string//?/& }"
+
+echo ${string//?/\& } 
+echo "${string//?/\& }"
+echo ${string//?/"& "}
+echo ${string//?/"\& "}
+
+echo "${string//?/"a "}"
+echo "${string//?/"$# "}"
+
+echo ${string/abc/& }
+echo "${string/abc/& }"
+echo ${string/abc/"& "}
+
+echo ${string/abc/\& }
+echo "${string/abc/\& }"
+echo ${string/abc/"\& "}
+echo ${string/abc/\\& }
+
+rep='\\&'
+
+echo "${string/abc/&}"
+echo ${string/abc/\&}
+echo "${string/abc/\\&}"
+echo ${string/abc/"\\&"}
+echo "${string/abc/"\\&"}"
+echo ${string/abc/$rep}
+echo ${string/abc/"$rep"}
+
+shopt -u patsub_replacement
+
+echo "${string/abc/&}"
+echo ${string/abc/\&}
+echo "${string/abc/\\&}"
+echo "${string/abc/"\\&"}"
+echo ${string/abc/"$rep"}
+
+shopt -s patsub_replacement
+
+repl='x&y'
+r2='x\&y'
+var='letssee'
+
+pat=ss
+
+echo ${var//$pat/"$repl"}
+echo "${var//$pat/"$repl"}"
+echo ${var//$pat/$repl}
+echo "${var//$pat/$repl}"
+
+echo ${var//$pat/"$r2"}
+echo "${var//$pat/"$r2"}"
+echo ${var//$pat/$r2}
+echo "${var//$pat/$r2}"
+
+r2='\\&'
+r3='\&'
+
+echo ${var//$pat/\\\&}
+echo ${var//$pat/\\$r2}
+echo ${var//$pat/\\&}
+echo ${var//$pat/$r2}
+
+echo ${var//$pat/"\&"}
+echo ${var//$pat/"$r3"}
+echo ${var//$pat/"&"}
+echo ${var//$pat/$r3}
+
+# these cases provide the same functionality as sed when given a BRE like
+# `^' or `$', or when passed a null input line
+one=one
+null=
+
+echo ${one/#/&two}
+echo ${one/#/\&two}
+
+echo ${one/%/&two}
+echo ${one/%/\&two}
+
+echo ${null/#/&two}
+echo ${null/#/\&two}
+
+echo ${one/#?/&two}
+echo ${one/#?/\&two}
diff --git a/tests/new-exp2.sub b/tests/new-exp2.sub
index 5e922aa..8dfe788 100644
--- a/tests/new-exp2.sub
+++ b/tests/new-exp2.sub
@@ -1,10 +1,23 @@
+#   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 .
+#
 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$$
+FILENAME=$TMPDIR/bashtmp.x$$
 
 trap 'rm -f $FILENAME' 0
 
@@ -21,16 +34,29 @@ if [[ $LINES1 != $LINES2 ]]; then
 	echo 'whoops: $(< filename) failed'
 fi
 
-LINES2=$(< /tmp/bashtmp.x*)
+LINES2=$(< $TMPDIR/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*)
+exec 3>&2
+exec 2>/dev/null
+LINES2=$(< $TMPDIR/bashtmp.x*)
+exec 2>&3
+if [[ $LINES2 -gt 0 ]]; then
+	echo "whoops: redirection glob expansion should be disabled in posix mode" >&2
+fi
 set +o posix
 
-# now see what happens when we try it with a non-existant file
+# now see what happens when we try it with a non-existent file
+rm -f /tmp/redir-notthere
 LINES3=$(< /tmp/redir-notthere)
 echo $?
+
+# These were bugs through bash-4.2
+{ : "$({xxxxxxxxxxxxxxxxxxxx}.
+#
 :
 # Set up some dummy variables beginning with _Q
 _QUANTITY=
@@ -8,12 +21,16 @@ _QUEST=
 _QUART=
 
 recho ${!_Q*}
+recho ${!_Q@}		# compatibility
 
 IFS="-$IFS"
 
 recho ${!_Q*}
 recho "${!_Q*}"
 
+recho ${!_Q@}
+recho "${!_Q@}"
+
 recho ${!_Y*}
 
 recho "${!_Q* }"
diff --git a/tests/new-exp4.sub b/tests/new-exp4.sub
index 45439a0..e491f5c 100644
--- a/tests/new-exp4.sub
+++ b/tests/new-exp4.sub
@@ -1,4 +1,16 @@
-#!/bin/bash
+#   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 .
+#
 
 arrayA=("A" "B" "C")
 
diff --git a/tests/new-exp5.sub b/tests/new-exp5.sub
index 0ee86e9..cb203a7 100644
--- a/tests/new-exp5.sub
+++ b/tests/new-exp5.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 x=(one two)
 echo ${x[@]:1}
 echo ${x[@]:0:1}
diff --git a/tests/new-exp6.sub b/tests/new-exp6.sub
index 532ec1a..83b041a 100644
--- a/tests/new-exp6.sub
+++ b/tests/new-exp6.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # quoted null problems in versions of bash prior to 3.2
 
 str='12'
diff --git a/tests/new-exp8.sub b/tests/new-exp8.sub
new file mode 100644
index 0000000..9effec5
--- /dev/null
+++ b/tests/new-exp8.sub
@@ -0,0 +1,129 @@
+#   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 .
+#
+pat1='str'
+pat2='[^;]'
+pat3='[[:alnum:]_]'
+pat4='[[:alnum:]][[fu]b'
+pat5='?tr'
+pat6='?tr\'
+pat7='[[:alnum:]]_'
+pat8='*tr'
+
+declare z="start"
+declare NUM=1000
+
+#----------------------------------
+# create a long string with ';'
+#----------------------------------
+for ((i=0; i<$NUM; i++)); do
+    z="$z;string$i"
+done
+
+#z="$z;string;foo"
+
+#------------------------------
+# delete everything except ';'
+#------------------------------
+
+# try different patterns here
+x="${z//$pat1}"
+echo $x
+x="${z//$pat2}"
+echo $x
+x="${z//$pat3}"
+echo $x
+x="${z//$pat4}"
+echo $x
+x="${z//$pat5}"
+echo $x
+x="${z//$pat6}"
+echo $x
+x="${z//$pat7}"
+echo $x
+x="${z//$pat8}"
+echo $x
+
+
+declare z="start"
+declare NUM=1000
+
+#----------------------------------
+# create a long string with ';'
+#----------------------------------
+for ((i=0; i<$NUM; i++)); do
+    z="$z;string$i"
+done
+
+#z="$z;string;foo"
+
+#------------------------------
+# delete everything except ';'
+#------------------------------
+
+# try different patterns here
+x="${z//[^;]}"
+echo $x
+x="${z/#[^;][^;]}"
+echo $x
+x="${z/%[^;][^;]}"
+echo $x
+
+export LANG=C LC_ALL=C LC_CTYPE=C
+
+# try different patterns here
+x="${z//$pat1}"
+echo $x
+x="${z//$pat2}"
+echo $x
+x="${z//$pat3}"
+echo $x
+x="${z//$pat4}"
+echo $x
+x="${z//$pat5}"
+echo $x
+x="${z//$pat6}"
+echo $x
+x="${z//$pat7}"
+echo $x
+x="${z//$pat8}"
+echo $x
+
+# try different patterns here
+x="${z//[^;]}"
+echo $x
+x="${z/#[^;][^;]}"
+echo $x
+x="${z/%[^;][^;]}"
+echo $x
+
+# post-bash-4.3 changes to make pattern replacement honor nocasematch variable
+unset string
+string=abcd
+
+shopt -s nocasematch
+
+echo ${string//A/z}
+echo ${string//BC/x}
+echo ${string//[BC]/x}
+echo ${string//[bC]/x}
+echo ${string//?/z}
+
+LC_ALL=C
+echo ${string//A/z}
+echo ${string//BC/x}
+echo ${string//[BC]/x}
+echo ${string//[bC]/x}
+echo ${string//?/z}
+
+
diff --git a/tests/new-exp9.sub b/tests/new-exp9.sub
new file mode 100644
index 0000000..799f192
--- /dev/null
+++ b/tests/new-exp9.sub
@@ -0,0 +1,44 @@
+#   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 .
+#
+indirarray()
+{
+   local intermediary
+   local sub
+
+   intermediary="${1}[@]"
+   local -a leftValue=("${!intermediary}")
+
+   local -a leftSub
+   eval leftSub=(\"\${!${1}[@]}\")
+
+   echo "$1" Value = ${leftValue[@]}
+   echo "$1" Sub = ${leftSub[@]}
+}
+
+a=(1 2 3 4 5)
+b=(a b c d e)
+
+c=([0]=10 [2]=20 [4]=40 [8]=80)
+
+indirarray a
+indirarray b
+indirarray c
+
+ref=a
+tmp="$ref[@]"
+printf "<%s> " "${!tmp}"; echo    # Iterate whole array.
+
+ref=c
+tmp="$ref[@]"
+printf "<%s> " "${!tmp}"; echo    # Iterate whole array.
diff --git a/tests/nquote.right b/tests/nquote.right
index 267f0e7..31c35c3 100644
--- a/tests/nquote.right
+++ b/tests/nquote.right
@@ -35,6 +35,46 @@ argv[1] = 
 ;foo
 argv[1] = <^I>
 argv[1] = <'A^IB'>
+argv[1] = 
+argv[1] = <$'a\tb\tc'>
+		AD
+E
 hello' world
 hello world!
 hello' world!
+'  |  '
+'  |  '
+x  |  x
+x  |  x
+'  |  '
+'  |  '
+'  |  '
+'  |  '
+'  |  '
+'  |  '
+x  |  x
+'
+$'\''
+'
+'abcd'
+$'\'abcd\''
+'
+1
+argv[1] = <^?>
+0000000 del nl
+0000002
+0000000 esc fs gs rs us del nl
+0000007
+\q
+foo
+./nquote4.sub: line 6: quux: command not found
+argv[1] = 
+argv[1] = 
+argv[1] = <^A>
+argv[1] = <\^A>
+0000000 a $ ' \ 0 1 ' b \n a 001 b \n
+0000015
+0000000 a $ ' \ 0 1 ' b \n a 001 b \n
+0000015
+0000000 A \n A \n
+0000004
diff --git a/tests/nquote.tests b/tests/nquote.tests
index 720c3e1..e4d1a56 100644
--- a/tests/nquote.tests
+++ b/tests/nquote.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 expect()
 {
         echo expect "$@"
@@ -115,4 +128,15 @@ unset mytab
 recho "${mytab:-$'\t'}"
 recho "$( args $'A\tB' )"
 
+# tests for $'...' not being expanded when inside double quotes
+recho $'a\tb\tc'
+recho "$'a\tb\tc'"
+
+# tests for $'...' being expanded in command substitution, and when
+echo "$(echo $'\t\t\101\104\n\105')"
+
 ${THIS_SH} ./nquote1.sub
+${THIS_SH} ./nquote2.sub
+${THIS_SH} ./nquote3.sub
+${THIS_SH} ./nquote4.sub
+${THIS_SH} ./nquote5.sub
diff --git a/tests/nquote1.right b/tests/nquote1.right
index 26e16b9..45389ef 100644
--- a/tests/nquote1.right
+++ b/tests/nquote1.right
@@ -119,3 +119,13 @@ argv[3] = 
 argv[1] = <@2>
 argv[2] = 
 argv[3] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
diff --git a/tests/nquote1.tests b/tests/nquote1.tests
index 0970e77..679976c 100644
--- a/tests/nquote1.tests
+++ b/tests/nquote1.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 a=$'a\001b'
 
 set $a
@@ -95,3 +108,12 @@ recho d2 "${1:2:2}"
 
 recho @1 ${@:1:2}
 recho @2 "${@:1:2}"
+
+declare -A assoc
+assoc=( [0]=$e [1]=$e )
+
+recho aa1 ${assoc:0:4}
+recho aa2 "${assoc:0:4}"
+
+recho aa3 ${assoc[@]:0:2}
+recho aa4 "${assoc[@]:0:2}"
diff --git a/tests/nquote2.sub b/tests/nquote2.sub
new file mode 100644
index 0000000..bfe2b19
--- /dev/null
+++ b/tests/nquote2.sub
@@ -0,0 +1,42 @@
+#   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 .
+#
+t() {
+    printf '%s  |  %s\n' "$1" "$2"
+  }
+  v="'"       # v <- '
+
+  #--
+  t "${v/$'\''/$'\''}"        "'"
+  t  ${v/$'\''/$'\''}         "'"
+  t "${v/$'\''/x}"            "x"
+  t  ${v/$'\''/x}             "x"
+  t "${v/x/$'\''}"            "'"
+  t  ${v/x/$'\''}             "'"
+  t "${v/x/$'\x5c\''}"        "'" 
+  t  ${v/x/$'\x5c\''}         "'" 
+  t "${v/\'/\'}"              "'"
+  t  ${v/\'/\'}               "'"
+  t  ${v/\'/x}               "x"
+
+echo "'"
+echo "$'\''"
+
+echo $'\''
+
+echo $'\'abcd\''
+echo "$'\'abcd\''"
+
+v=1
+echo ${v/1/\'}
+echo ${v/\'/2}
diff --git a/tests/nquote2.tests b/tests/nquote2.tests
index c07bd9b..e3af99a 100644
--- a/tests/nquote2.tests
+++ b/tests/nquote2.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 a=$'a\001b'
 
 e=$'uv\001\001wx'
diff --git a/tests/nquote3.sub b/tests/nquote3.sub
new file mode 100644
index 0000000..d1480c0
--- /dev/null
+++ b/tests/nquote3.sub
@@ -0,0 +1,8 @@
+. ./test-glue-functions
+
+recho $'\c?'
+
+echo $'\c?' | od -t a | _intl_normalize_spaces
+echo $'\c[\c\\\c]\c^\c_\c?' | od -t a | _intl_normalize_spaces
+
+echo $'\q'
diff --git a/tests/nquote3.tests b/tests/nquote3.tests
index a83ff56..44b51c4 100644
--- a/tests/nquote3.tests
+++ b/tests/nquote3.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 a=$'a\001b'
 
 set $a
diff --git a/tests/nquote4.sub b/tests/nquote4.sub
new file mode 100644
index 0000000..0d4a495
--- /dev/null
+++ b/tests/nquote4.sub
@@ -0,0 +1,6 @@
+# make sure aliases containing new-style single quotes are expanded correctly
+
+shopt -s expand_aliases
+alias foo=$'echo foo\n\nquux\n'
+
+foo
diff --git a/tests/nquote4.tests b/tests/nquote4.tests
index ed73467..5c67705 100644
--- a/tests/nquote4.tests
+++ b/tests/nquote4.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 recho $'ab\x{}cd'
 recho $'ab\x{41}cd'
 recho $'ab\x41cd'
diff --git a/tests/nquote5.sub b/tests/nquote5.sub
new file mode 100644
index 0000000..97cbadc
--- /dev/null
+++ b/tests/nquote5.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+. test-glue-functions
+
+recho $( echo a$'\01)'b )
+recho $( echo ab )
+recho $( echo \ )
+recho $( echo \\ )
+
+LC_CTYPE=C
+od -c <.
+#
 a=$'ab\001cd\001ef'
 IFS=$'\001'
 
diff --git a/tests/parser.right b/tests/parser.right
new file mode 100644
index 0000000..3a01004
--- /dev/null
+++ b/tests/parser.right
@@ -0,0 +1,16 @@
+AAA
+bash5: line 1: `invalid-name': not a valid identifier
+in
+in
+in
+in
+bash5: -c: line 1: syntax error near unexpected token `)'
+bash5: -c: line 1: `case x in esac) echo done; esac'
+in
+bash5: -c: line 1: syntax error near unexpected token `do'
+bash5: -c: line 1: `case in do do) echo in; esac'
+bash5: -c: line 1: syntax error near unexpected token `('
+bash5: -c: line 1: `for()'
+in
+done
+ok 1
diff --git a/tests/parser.tests b/tests/parser.tests
new file mode 100644
index 0000000..6e020a4
--- /dev/null
+++ b/tests/parser.tests
@@ -0,0 +1,6 @@
+# catch-all for parsing problems that don't fit anywhere else
+
+# this has to be in a separate file to get desired EOF behavior
+${THIS_SH} ./parser1.sub
+
+${THIS_SH} ./posix2syntax.sub
diff --git a/tests/parser1.sub b/tests/parser1.sub
new file mode 100644
index 0000000..5031931
--- /dev/null
+++ b/tests/parser1.sub
@@ -0,0 +1 @@
+eval "array=(foo bar)" ; echo AAA\
diff --git a/tests/posix2.right b/tests/posix2.right
index df30c4f..5d3f734 100644
--- a/tests/posix2.right
+++ b/tests/posix2.right
@@ -1,2 +1,4 @@
 Testing for POSIX.2 conformance
+./posix2.tests: eval: line 199: syntax error near unexpected token `)'
+./posix2.tests: eval: line 199: `case esac in esac) ;; *) echo "case esac test 4";; esac'
 All tests passed
diff --git a/tests/posix2.tests b/tests/posix2.tests
index a186e78..0f5fce1 100644
--- a/tests/posix2.tests
+++ b/tests/posix2.tests
@@ -1,4 +1,17 @@
-#! /bin/sh
+#   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 .
+#
+
 # posix-2.sh - Simple identification tests for POSIX.2 features
 # commonly missing or incorrectly implemented.
 # Time-stamp: <96/04/10 16:43:48 gildea>
@@ -146,7 +159,7 @@ fi
 newtest
 SQUOTE="'"
 val1=$(set | sed -n 's:^SQUOTE=::p')
-if [ "$val1" != "''\\'''" ]; then
+if [ "$val1" != "\'" ]; then
         testfail "variable quoting 1"
 fi
 
@@ -171,6 +184,20 @@ if [ "$val1" != "'#abcd'" ]; then
 	testfail "variable quoting 4"
 fi
 
+# these are Posix.2 shell grammar rule 4, problems through bash-4.3
+newtest
+case esac in (foo|esac) ;; *) testfail "case esac test 1" ;; esac
+newtest
+case esac in foo|esac) ;; *) testfail "case esac test 2" ;; esac
+
+# POSIX.2 grammar rule 4 problem through bash-5.1
+newtest
+eval 'case esac in (esac) ;; *) testfail "case esac test 3" ;; esac'
+
+# these are supposed to be syntax errors
+newtest
+eval 'case esac in esac) ;; *) echo "case esac test 4";; esac' && testfail 'case esac test 4'
+
 if [ $exitval = 0 ]; then
     echo "All tests passed"
 else
diff --git a/tests/posix2syntax.sub b/tests/posix2syntax.sub
new file mode 100644
index 0000000..39af9a5
--- /dev/null
+++ b/tests/posix2syntax.sub
@@ -0,0 +1,66 @@
+#   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 .
+#
+: ${THIS_SH:=./bash}
+bashname=bash${BASH_VERSION%%.*}
+
+# tests for Posix grammar special cases
+
+# Posix grammar rule 5
+${THIS_SH} -c 'for invalid-name in a b c; do echo error; done' $bashname
+
+# Posix grammar rule 6: third word in FOR or SELECT
+for i; do echo; done; echo in
+for i; do echo in; done
+for i do echo in; done
+
+select i; do echo; done; echo in
+select i; do echo in; done; echo in
+select i do echo in; done; echo in
+
+# Posix grammar rule 4: when PATTERN == ESAC, return ESAC
+${THIS_SH} -c 'case x in esac) echo done; esac' $bashname
+
+# Posix grammar rule 6: third word in CASE
+${THIS_SH} -c 'case in in in) echo in; esac;' $bashname
+${THIS_SH} -c 'case in do do) echo in; esac' $bashname
+
+# Posix grammar rule 8: function NAME
+${THIS_SH} -o posix -c 'for()
+{
+echo function for;
+}' $bashname
+
+for for in for; do echo in; echo done; done
+
+${THIS_SH} -c 'for (( i = 0; i < 5; i++ )) do : ; done' $bashname
+${THIS_SH} -c 'for (( i = 0; i < 5; i++ )) { : ; }' $bashname
+
+# bug report: IN turning on unwanted alias expansion
+${THIS_SH} -o posix -c '
+alias foo='two words'
+foo_word='foo'
+case "$foo_word"
+in
+	foo) echo "bad 1";;
+esac' $bashname
+
+${THIS_SH} -o posix -c '
+alias foo='oneword'
+foo_word='foo'
+case "$foo_word"
+in
+	foo) echo "ok 1";;
+esac' $bashname
+
+
diff --git a/tests/posixexp.right b/tests/posixexp.right
new file mode 100644
index 0000000..7204b96
--- /dev/null
+++ b/tests/posixexp.right
@@ -0,0 +1,308 @@
+a
+b
+a b
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[5] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[2] = <}>
+argv[3] = 
+argv[1] = <'foo'>
+argv[1] = <'foo'>
+argv[1] = <$a>
+argv[1] = <'foo'>
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+<.>  <.> <> <.>  <.> 
+ <.>  <.>  <.>  <.> 
+ <.>  <.>  <.>  <.> 
+ <.>  <.>  <.>  <.> 
+<.>  <.> <> <.>  <.> 
+<.>  <.> <> <.>  <.> 
+ <.>  <.>  <.>  <.> 
+ <.>  <.>  <.>  <.> 
+ <.>  <.>  <.>  <.> 
+ <.>  <.>  <.>  <.> 
+argv[1] = <'bar>
+argv[1] = 
+argv[1] = <}z>
+argv[1] = <''z}>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1 2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1 2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1 2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1 2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1 2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <1>
+argv[2] = <2>
+argv[1] = <12>
+argv[1] = <1 2>
+argv[1] = <1 2>
+argv[1] = <1 2>
+argv[1] = <1 2>
+argv[1] = <1 2>
+argv[1] = <1 2>
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <12>
+argv[1] = <1 2>
+argv[1] = <1 2>
+argv[1] = <12>
+argv[1] = <12>
+normal IFS
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+argv[1] = 
+argv[2] = 
+argv[3] = 
+argv[4] = 
+null IFS
+argv[1] = < abc>
+argv[2] = 
+argv[3] = 
+argv[1] = < abc def ghi jkl >
+argv[1] = < abc>
+argv[2] = 
+argv[3] = 
+non-standard IFS
+argv[1] = < abc>
+argv[2] = 
+argv[3] = 
+argv[1] = < abc def ghi jkl >
+argv[1] = < abc def ghi jkl >
+unset IFS
+argv[1] = < abc>
+argv[2] = 
+argv[3] = 
+argv[1] = < abc def ghi jkl >
+argv[1] = < abc def ghi jkl >
+
+001: IFS = (unset): unset -v foo; set -- ${foo=$*}
+soh stx etx del   / soh stx etx del
+
+002: IFS = (unset): unset -v foo; set -- ${foo="$*"}
+soh stx etx del   / soh stx etx del
+
+003: IFS = (unset): unset -v foo; set -- "${foo=$*}"
+soh stx etx del   / soh stx etx del
+
+004: IFS = (unset): foo=; set -- ${foo:=$*}
+soh stx etx del   / soh stx etx del
+
+005: IFS = (unset): foo=; set -- ${foo:="$*"}
+soh stx etx del   / soh stx etx del
+
+006: IFS = (unset): foo=; set -- "${foo:=$*}"
+soh stx etx del   / soh stx etx del
+
+007: IFS = (unset): unset -v foo; set -- ${foo=$@}
+soh stx etx del   / soh stx etx del
+
+008: IFS = (unset): unset -v foo; set -- ${foo="$@"}
+soh stx etx del   / soh stx etx del
+
+009: IFS = (unset): unset -v foo; set -- "${foo=$@}"
+soh stx etx del   / soh stx etx del
+
+010: IFS = (unset): foo=; set -- ${foo:=$@}
+soh stx etx del   / soh stx etx del
+
+011: IFS = (unset): foo=; set -- ${foo:="$@"}
+soh stx etx del   / soh stx etx del
+
+012: IFS = (unset): foo=; set -- "${foo:=$@}"
+soh stx etx del   / soh stx etx del
+
+013: IFS = (null): unset -v foo; set -- ${foo=$*}
+soh stx etx del   / soh stx etx del
+
+014: IFS = (null): unset -v foo; set -- ${foo="$*"}
+soh stx etx del   / soh stx etx del
+
+015: IFS = (null): unset -v foo; set -- "${foo=$*}"
+soh stx etx del   / soh stx etx del
+
+016: IFS = (null): foo=; set -- ${foo:=$*}
+soh stx etx del   / soh stx etx del
+
+017: IFS = (null): foo=; set -- ${foo:="$*"}
+soh stx etx del   / soh stx etx del
+
+018: IFS = (null): foo=; set -- "${foo:=$*}"
+soh stx etx del   / soh stx etx del
+
+019: IFS = (null): unset -v foo; set -- ${foo=$@}
+soh stx etx del   / soh stx etx del
+
+020: IFS = (null): unset -v foo; set -- ${foo="$@"}
+soh stx etx del   / soh stx etx del
+
+021: IFS = (null): unset -v foo; set -- "${foo=$@}"
+soh stx etx del   / soh stx etx del
+
+022: IFS = (null): foo=; set -- ${foo:=$@}
+soh stx etx del   / soh stx etx del
+
+023: IFS = (null): foo=; set -- ${foo:="$@"}
+soh stx etx del   / soh stx etx del
+
+024: IFS = (null): foo=; set -- "${foo:=$@}"
+soh stx etx del   / soh stx etx del
+
+025: IFS = x: unset -v foo; set -- ${foo=$*}
+soh stx etx del   / soh stx etx del
+
+026: IFS = x: unset -v foo; set -- ${foo="$*"}
+soh stx etx del   / soh stx etx del
+
+027: IFS = x: unset -v foo; set -- "${foo=$*}"
+soh stx etx del   / soh stx etx del
+
+028: IFS = x: foo=; set -- ${foo:=$*}
+soh stx etx del   / soh stx etx del
+
+029: IFS = x: foo=; set -- ${foo:="$*"}
+soh stx etx del   / soh stx etx del
+
+030: IFS = x: foo=; set -- "${foo:=$*}"
+soh stx etx del   / soh stx etx del
+
+031: IFS = x: unset -v foo; set -- ${foo=$@}
+soh stx etx del   / soh stx etx del
+
+032: IFS = x: unset -v foo; set -- ${foo="$@"}
+soh stx etx del   / soh stx etx del
+
+033: IFS = x: unset -v foo; set -- "${foo=$@}"
+soh stx etx del   / soh stx etx del
+
+034: IFS = x: foo=; set -- ${foo:=$@}
+soh stx etx del   / soh stx etx del
+
+035: IFS = x: foo=; set -- ${foo:="$@"}
+soh stx etx del   / soh stx etx del
+
+036: IFS = x: foo=; set -- "${foo:=$@}"
+soh stx etx del   / soh stx etx del
+
+037: IFS = sp  ht  nl: unset -v foo; set -- ${foo=$*}
+soh stx etx del   / soh stx etx del
+
+038: IFS = sp  ht  nl: unset -v foo; set -- ${foo="$*"}
+soh stx etx del   / soh stx etx del
+
+039: IFS = sp  ht  nl: unset -v foo; set -- "${foo=$*}"
+soh stx etx del   / soh stx etx del
+
+040: IFS = sp  ht  nl: foo=; set -- ${foo:=$*}
+soh stx etx del   / soh stx etx del
+
+041: IFS = sp  ht  nl: foo=; set -- ${foo:="$*"}
+soh stx etx del   / soh stx etx del
+
+042: IFS = sp  ht  nl: foo=; set -- "${foo:=$*}"
+soh stx etx del   / soh stx etx del
+
+043: IFS = sp  ht  nl: unset -v foo; set -- ${foo=$@}
+soh stx etx del   / soh stx etx del
+
+044: IFS = sp  ht  nl: unset -v foo; set -- ${foo="$@"}
+soh stx etx del   / soh stx etx del
+
+045: IFS = sp  ht  nl: unset -v foo; set -- "${foo=$@}"
+soh stx etx del   / soh stx etx del
+
+046: IFS = sp  ht  nl: foo=; set -- ${foo:=$@}
+soh stx etx del   / soh stx etx del
+
+047: IFS = sp  ht  nl: foo=; set -- ${foo:="$@"}
+soh stx etx del   / soh stx etx del
+
+048: IFS = sp  ht  nl: foo=; set -- "${foo:=$@}"
+soh stx etx del   / soh stx etx del
+argv[1] = <^A^B^C^?>
+argv[1] = <^A^B^C^?>
+argv[1] = <^A^B^C^?>
+argv[1] = <^A^B^C^?>
+argv[1] = <^A^B^C^?>
+argv[1] = <^A^B^C^?>
+argv[1] = <^A^B^C^?>
+argv[1] = <^A^B^C^?>
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+argv[1] = 
+argv[2] = 
+[  abc    def  ghi  jkl /  abc    def  ghi  jkl ]
+[  abc    def  ghi  jkl ]
+[  abc    def  ghi  jkl /  abc    def  ghi  jkl /  abc    def  ghi  jkl ]
+1: OK
+2: $'not'
+3: OK
+4: OK
+5: tOK
+OK
+OK
+$'not'
+OK
+tOK
+6: $'not\ttoo\nbad'
+OKa	'	b
+OKa	'	b
+7: OK
+8: OKa	'	b
+9: OKa	"	b
+10: OKa	"	b
+tOK
+tOK
+tOK
+tOK
+./posixexp7.sub: line 69: ${'x1'%'t'}: bad substitution
+./posixexp7.sub: line 70: ${'x1'%'t'}: bad substitution
+./posixexp7.sub: line 73: ${'x1'%'t'}: bad substitution
+./posixexp7.sub: line 74: ${'x1'%'t'}: bad substitution
+"A"
+A
+argv[1] = <"A">
+argv[1] = 
+argv[1] = 
+./posixexp.tests: line 97: unexpected EOF while looking for matching `}'
diff --git a/tests/posixexp.tests b/tests/posixexp.tests
new file mode 100644
index 0000000..d8f6644
--- /dev/null
+++ b/tests/posixexp.tests
@@ -0,0 +1,97 @@
+#   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 .
+#
+unset a
+printf "%s\n" ${a:=a\ b}
+echo "$a"
+
+unset v
+recho ${v=a\ b} x ${v=c\ d}
+
+unset v
+recho "${v=a\ b}" x "${v=c\ d}"
+
+unset a v
+
+recho "foo ${IFS+'bar'} baz"
+recho "a ${IFS+b  c} d"
+
+recho "a ${IFS+"b  c"} d"
+
+u=x
+recho "foo ${IFS+a$u{{{\}b} c ${IFS+d{}} bar" ${IFS-e{}} baz
+
+a=foo
+recho "${IFS+'$a'}"
+recho "${IFS+"'$a'"}"
+
+recho ${IFS+'$a'}
+recho ${IFS+"'$a'"}
+
+unset a u
+x='foo*bar'
+
+recho "${x##"}"}"
+recho "${x##'}'}"
+recho "${x##'}"
+
+recho "${x:-'}'}"
+
+foo="x'a'y"
+recho "${foo%*'a'*}"
+unset x
+
+unset u
+v=w
+printf '<%s> ' ${u+x} . ${v+x} . "${u+x}" . "${v+x}" .; echo
+printf '<%s> ' ${u-x} . ${v-x} . "${u-x}" . "${v-x}" .; echo
+printf '<%s> ' ${u=x} . ${v=x} . "${u=x}" . "${v=x}" .; echo
+printf '<%s> ' ${u?x} . ${v?x} . "${u?x}" . "${v?x}" .; echo
+printf '<%s> ' ${u#x} . ${v#x} . "${u#x}" . "${v#x}" .; echo
+printf '<%s> ' ${u%x} . ${v%x} . "${u%x}" . "${v%x}" .; echo
+printf '<%s> ' ${u:+x} . ${v:+x} . "${u:+x}" . "${v:+x}" .; echo
+printf '<%s> ' ${u:-x} . ${v:-x} . "${u:-x}" . "${v:-x}" .; echo
+printf '<%s> ' ${u:=x} . ${v:=x} . "${u:=x}" . "${v:=x}" .; echo
+printf '<%s> ' ${u:?x} . ${v:?x} . "${u:?x}" . "${v:?x}" .; echo
+# these are invalid substitution operators
+#printf '<%s> ' ${u:#x} . ${v:#x} . "${u:#x}" . "${v:#x}" .; echo
+#printf '<%s> ' ${u:%x} . ${v:%x} . "${u:%x}" . "${v:%x}" .; echo
+
+unset foo
+set -o posix
+
+recho "${IFS+'bar}"
+recho "foo ${IFS+'bar} baz"
+
+recho ${IFS+'}'z}
+recho "${IFS+'}'z}"
+
+: ${TMPDIR:=/var/tmp}
+rm -f $TMPDIR/sh
+cp ${THIS_SH} $TMPDIR/sh
+THIS_SH=$TMPDIR/sh ${THIS_SH} ./posixexp1.sub || echo "sh posixexp1.sub: test $? failed"
+${THIS_SH} ./posixexp1.sub || echo "bash posixexp1.sub: test $? failed"
+
+THIS_SH=$TMPDIR/sh ${THIS_SH} ./posixexp2.sub || echo "sh posixexp2.sub: test $? failed"
+rm -f $TMPDIR/sh
+
+${THIS_SH} ./posixexp3.sub
+${THIS_SH} ./posixexp4.sub
+${THIS_SH} ./posixexp5.sub
+${THIS_SH} ./posixexp6.sub
+${THIS_SH} ./posixexp7.sub
+${THIS_SH} ./posixexp8.sub
+
+# this will be an error
+foo=bar
+echo "${foo:-"a}"
diff --git a/tests/posixexp1.sub b/tests/posixexp1.sub
new file mode 100644
index 0000000..c0d6861
--- /dev/null
+++ b/tests/posixexp1.sub
@@ -0,0 +1,51 @@
+#   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 .
+#
+# $FreeBSD: src/tools/regression/bin/sh/expansion/set-u1.0,v 1.2 2010/10/12 18:20:38 obrien Exp $
+
+${THIS_SH} -uc 'unset foo; echo ${foo}' 2>/dev/null && exit 1
+${THIS_SH} -uc 'unset foo; echo $foo' 2>/dev/null && exit 1
+${THIS_SH} -uc 'foo=; echo $foo' >/dev/null || exit 2
+${THIS_SH} -uc 'foo=1; echo $foo' >/dev/null || exit 3
+# -/+/= are unaffected by set -u
+${THIS_SH} -uc 'unset foo; echo ${foo-}' >/dev/null || exit 4
+${THIS_SH} -uc 'unset foo; echo ${foo+}' >/dev/null || exit 5
+${THIS_SH} -uc 'unset foo; echo ${foo=}' >/dev/null || exit 6
+# length/trimming are affected
+${THIS_SH} -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 7
+${THIS_SH} -uc 'foo=; echo ${#foo}' >/dev/null || exit 8
+${THIS_SH} -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 9
+${THIS_SH} -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 10
+${THIS_SH} -uc 'unset foo; echo ${foo##?}' 2>/dev/null && exit 11
+${THIS_SH} -uc 'foo=1; echo ${foo##?}' >/dev/null || exit 12
+${THIS_SH} -uc 'unset foo; echo ${foo%?}' 2>/dev/null && exit 13
+${THIS_SH} -uc 'foo=1; echo ${foo%?}' >/dev/null || exit 14
+${THIS_SH} -uc 'unset foo; echo ${foo%%?}' 2>/dev/null && exit 15
+${THIS_SH} -uc 'foo=1; echo ${foo%%?}' >/dev/null || exit 16
+
+${THIS_SH} -uc 'echo $!' 2>/dev/null && exit 17
+${THIS_SH} -uc ':& echo $!' >/dev/null || exit 18
+${THIS_SH} -uc 'echo $#' >/dev/null || exit 19
+${THIS_SH} -uc 'echo $1' 2>/dev/null && exit 20
+${THIS_SH} -uc 'echo $1' ${THIS_SH} xnotthere >/dev/null || exit 21
+${THIS_SH} -uc 'echo $2' ${THIS_SH} xnotthere 2>/dev/null && exit 22
+${THIS_SH} -uc 'echo $2' ${THIS_SH} xnotthere ynotthere >/dev/null || exit 23
+
+${THIS_SH} -uc 'echo $! ; exit 24' 2>/dev/null
+${THIS_SH} -uc 'echo ${!} ; exit 25' 2>/dev/null
+${THIS_SH} -uc 'echo ${!,} ; exit 26' 2>/dev/null
+
+${THIS_SH} -uc 'echo ${!-ok 27} >/dev/null || exit 27'
+${THIS_SH} -uc 'echo ${2-ok 28} >/dev/null || exit 28'
+
+exit 0
diff --git a/tests/posixexp2.right b/tests/posixexp2.right
new file mode 100644
index 0000000..08d3901
--- /dev/null
+++ b/tests/posixexp2.right
@@ -0,0 +1,40 @@
+1 }z
+2 ''z}
+3 foo 'bar baz
+4 foo b   c baz
+5 foo b   c baz
+6 }z
+7 }z
+8 ""z}
+9 "}"z
+10 foo bar} baz
+11 ''z}
+12 }z
+13 }z
+14 }z
+15  <}>  .
+16 hi there
+17 hi there
+18 hi there
+19 hi there
+20 hi there
+21 hi there
+22 hi there
+23 hi there
+24 'value'
+25 'value'
+26 $key
+27 'value'
+28 'x ~ x''x}"x}" #
+29   <{}b>    <}>  .
+30    .
+32    .
+33  .
+34  .
+35      .
+36    .
+37    .
+38 xay / x'a'y .
+39 x' / x' .
+40 < b c> .
diff --git a/tests/posixexp2.sub b/tests/posixexp2.sub
new file mode 100644
index 0000000..5c46192
--- /dev/null
+++ b/tests/posixexp2.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+
+x=a\ b
+[ "$x" = "${x?}" ] || exit 1
+set -- ${x?}
+{ [ "$#" = 2 ] && [ "$1" = a ] && [ "$2" = b ]; } || exit 1
+unset x
+(echo ${x?abcdefg}) 2>&1 | grep abcdefg >/dev/null || exit 1
+${THIS_SH} -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 2
+${THIS_SH} -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 3
+${THIS_SH} -c 'foo=; echo ${foo?}' >/dev/null || exit 4
+${THIS_SH} -c 'foo=1; echo ${foo:?}' >/dev/null || exit 5
+${THIS_SH} -c 'echo ${!?}' 2>/dev/null && exit 6
+${THIS_SH} -c ':& echo ${!?}' >/dev/null || exit 7
+${THIS_SH} -c 'echo ${#?}' >/dev/null || exit 8
+${THIS_SH} -c 'echo ${*?}' 2>/dev/null && exit 9
+${THIS_SH} -c 'echo ${*?}' ${THIS_SH} x >/dev/null || exit 10
+${THIS_SH} -c 'echo ${1?}' 2>/dev/null && exit 11
+${THIS_SH} -c 'echo ${1?}' ${THIS_SH} x >/dev/null || exit 12
+${THIS_SH} -c 'echo ${2?}' ${THIS_SH} x 2>/dev/null && exit 13
+${THIS_SH} -c 'echo ${2?}' ${THIS_SH} x y >/dev/null || exit 14
+
+${THIS_SH} -c $'echo $(( x+ )) \n exit 0' ${THIS_SH} 2>/dev/null && exit 15
+
+exit 0
diff --git a/tests/posixexp2.tests b/tests/posixexp2.tests
new file mode 100644
index 0000000..5f2392b
--- /dev/null
+++ b/tests/posixexp2.tests
@@ -0,0 +1,60 @@
+#   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 .
+#
+# From mksh
+
+set -o posix ; shopt -u xpg_echo
+
+(echo 1 ${IFS+'}'z}) 2>&- || echo failed in 1
+(echo 2 "${IFS+'}'z}") 2>&- || echo failed in 2
+(echo 3 "foo ${IFS+'bar} baz") 2>&- || echo failed in 3
+(echo -n '4 '; printf '%s\n' "foo ${IFS+"b   c"} baz") 2>&- || echo failed in 4
+(echo -n '5 '; printf '%s\n' "foo ${IFS+b   c} baz") 2>&- || echo failed in 5
+(echo 6 ${IFS+"}"z}) 2>&- || echo failed in 6
+(echo 7 "${IFS+"}"z}") 2>&- || echo failed in 7
+(echo 8 "${IFS+\"}\"z}") 2>&- || echo failed in 8
+(echo 9 "${IFS+\"\}\"z}") 2>&- || echo failed in 9
+(echo 10 foo ${IFS+'bar} baz'}) 2>&- || echo failed in 10
+(echo 11 "$(echo "${IFS+'}'z}")") 2>&- || echo failed in 11
+(echo 12 "$(echo ${IFS+'}'z})") 2>&- || echo failed in 12
+(echo 13 ${IFS+\}z}) 2>&- || echo failed in 13
+(echo 14 "${IFS+\}z}") 2>&- || echo failed in 14
+u=x; (echo -n '15 '; printf '<%s> ' "foo ${IFS+a"b$u{ {"{{\}b} c ${IFS+d{}} bar" ${IFS-e{}} baz; echo .) 2>&- || echo failed in 15
+l=t; (echo 16 ${IFS+h`echo -n i ${IFS+$l}h`ere}) 2>&- || echo failed in 16
+l=t; (echo 17 ${IFS+h$(echo -n i ${IFS+$l}h)ere}) 2>&- || echo failed in 17
+l=t; (echo 18 "${IFS+h`echo -n i ${IFS+$l}h`ere}") 2>&- || echo failed in 18
+l=t; (echo 19 "${IFS+h$(echo -n i ${IFS+$l}h)ere}") 2>&- || echo failed in 19
+l=t; (echo 20 ${IFS+h`echo -n i "${IFS+$l}"h`ere}) 2>&- || echo failed in 20
+l=t; (echo 21 ${IFS+h$(echo -n i "${IFS+$l}"h)ere}) 2>&- || echo failed in 21
+l=t; (echo 22 "${IFS+h`echo -n i "${IFS+$l}"h`ere}") 2>&- || echo failed in 22
+l=t; (echo 23 "${IFS+h$(echo -n i "${IFS+$l}"h)ere}") 2>&- || echo failed in 23
+key=value; (echo -n '24 '; printf '%s\n' "${IFS+'$key'}") 2>&- || echo failed in 24
+key=value; (echo -n '25 '; printf '%s\n' "${IFS+"'$key'"}") 2>&- || echo failed in 25	# ksh93: “'$key'”
+key=value; (echo -n '26 '; printf '%s\n' ${IFS+'$key'}) 2>&- || echo failed in 26
+key=value; (echo -n '27 '; printf '%s\n' ${IFS+"'$key'"}) 2>&- || echo failed in 27
+(echo -n '28 '; printf '%s\n' "${IFS+"'"x ~ x'}'x"'}"x}" #') 2>&- || echo failed in 28
+u=x; (echo -n '29 '; printf '<%s> ' foo ${IFS+a"b$u{ {"{ {\}b} c ${IFS+d{}} bar ${IFS-e{}} baz; echo .) 2>&- || echo failed in 29
+(echo -n '30 '; printf '<%s> ' ${IFS+foo 'b\
+ar' baz}; echo .) 2>&- || (echo failed in 30; echo failed in 31)
+(echo -n '32 '; printf '<%s> ' ${IFS+foo "b\
+ar" baz}; echo .) 2>&- || echo failed in 32
+(echo -n '33 '; printf '<%s> ' "${IFS+foo 'b\
+ar' baz}"; echo .) 2>&- || echo failed in 33
+(echo -n '34 '; printf '<%s> ' "${IFS+foo "b\
+ar" baz}"; echo .) 2>&- || echo failed in 34
+(echo -n '35 '; printf '<%s> ' ${v=a\ b} x ${v=c\ d}; echo .) 2>&- || echo failed in 35
+(echo -n '36 '; printf '<%s> ' "${v=a\ b}" x "${v=c\ d}"; echo .) 2>&- || echo failed in 36
+(echo -n '37 '; printf '<%s> ' ${v-a\ b} x ${v-c\ d}; echo .) 2>&- || echo failed in 37
+(echo 38 ${IFS+x'a'y} / "${IFS+x'a'y}" .) 2>&- || echo failed in 38
+foo="x'a'y"; (echo 39 ${foo%*'a'*} / "${foo%*'a'*}" .) 2>&- || echo failed in 39
+foo="a b c"; (echo -n '40 '; printf '<%s> ' "${foo#a}"; echo .) 2>&- || echo failed in 40
diff --git a/tests/posixexp3.sub b/tests/posixexp3.sub
new file mode 100644
index 0000000..343adfe
--- /dev/null
+++ b/tests/posixexp3.sub
@@ -0,0 +1,65 @@
+#   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 .
+#
+set -- 1 2
+
+unset var
+recho ${var-$@}
+recho ${var-"$@"}
+recho ${var-$*}
+recho ${var-"$*"}
+
+unset -v a b c d
+recho ${a=$@}
+recho "$a"
+recho ${b="$@"}
+recho "$b"
+recho ${c=$*}
+recho "$c"
+recho ${d="$*"}
+recho "$d"
+
+IFS=
+unset var
+recho ${var-$@}
+recho ${var-"$@"}
+recho ${var-$*}
+recho ${var-"$*"}
+
+unset -v a b c d
+# Posix interp 221
+# there should never be any word splitting because IFS is null
+recho ${a=$@}
+recho "$a"
+recho $a
+recho ${b="$@"}
+recho "$b"
+recho $b
+recho ${c=$*}
+recho "$c"
+recho $c
+recho ${d="$*"}
+recho "$d"
+recho $d
+
+unset -v a b c d
+a=$@
+recho $a
+b="$@"
+recho $b
+c=$*
+recho $c
+d="$*"
+recho $d
+
+unset -v parameter a b c d
diff --git a/tests/posixexp4.sub b/tests/posixexp4.sub
new file mode 100644
index 0000000..9d48b2f
--- /dev/null
+++ b/tests/posixexp4.sub
@@ -0,0 +1,44 @@
+#   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 .
+#
+set -- ' abc' 'def ghi' 'jkl '
+
+echo normal IFS
+recho $@
+: ${var=$@}
+recho $var
+unset -v var
+recho ${var-$@}
+
+echo null IFS
+IFS=
+recho $@
+: ${var=$@}
+recho $var
+unset -v var
+recho ${var-$@}
+
+echo non-standard IFS
+IFS=:
+recho $@
+: ${var=$@}
+recho $var
+unset -v var
+recho ${var-$@}	# this is inconsistent
+
+echo unset IFS
+recho $@
+: ${var=$@}
+recho $var
+unset -v var
+recho ${var-$@}
diff --git a/tests/posixexp5.sub b/tests/posixexp5.sub
new file mode 100644
index 0000000..b0e1c03
--- /dev/null
+++ b/tests/posixexp5.sub
@@ -0,0 +1,64 @@
+#   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 .
+#
+# test suite contribution from Martijn Dekker
+
+defaultIFS=$IFS
+set -o errexit -o noglob
+(set -o pipefail) 2>/dev/null && set -o pipefail
+teststring=$(printf '\1\2\3\177')
+n=0
+
+trim_od() {
+	od -t a | sed -n '1 { s/^0*[[:blank:]]*//; s/[[:blank:]]*$//; p; }'
+}
+
+doTest() {
+	set -- "$teststring"
+	eval "$testcmd"
+	case ${IFS+s}${IFS:+n} in
+	( sn )	i=$(printf %s "$IFS" | trim_od) ;;
+	( s )	i='(null)' ;;
+	( '' )	i='(unset)' ;;
+	( * )	echo 'internal error!' >&2; exit 125 ;;
+	esac
+	printf '\n%03d: IFS = %s: %s\n' "$((n+=1))" "$i" "$testcmd"
+	printf %s "$*${foo+/}${foo-}" | trim_od
+}
+
+doAllTests() {
+	for testcmd in \
+		'unset -v foo; set -- ${foo=$*}' \
+		'unset -v foo; set -- ${foo="$*"}' \
+		'unset -v foo; set -- "${foo=$*}"' \
+		\
+		'foo=; set -- ${foo:=$*}' \
+		'foo=; set -- ${foo:="$*"}' \
+		'foo=; set -- "${foo:=$*}"' \
+		\
+		'unset -v foo; set -- ${foo=$@}' \
+		'unset -v foo; set -- ${foo="$@"}' \
+		'unset -v foo; set -- "${foo=$@}"' \
+		\
+		'foo=; set -- ${foo:=$@}' \
+		'foo=; set -- ${foo:="$@"}' \
+		'foo=; set -- "${foo:=$@}"'
+	do
+		doTest "$testcmd"
+	done
+}
+
+unset -v IFS; doAllTests
+IFS=''; doAllTests
+IFS='x'; doAllTests
+IFS=$defaultIFS; doAllTests
diff --git a/tests/posixexp6.sub b/tests/posixexp6.sub
new file mode 100644
index 0000000..b89b87f
--- /dev/null
+++ b/tests/posixexp6.sub
@@ -0,0 +1,70 @@
+#   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 .
+#
+var=$'\01\02\03\177'
+
+bar=${unset:-$var}
+recho "$bar"
+unset -v bar
+bar=${unset:-"$var"}
+recho "$bar"
+
+foo=${parameter:=$var}
+
+recho "$foo"
+recho "$parameter"
+
+unset -v foo parameter
+
+foo=${parameter:="$var"}
+
+recho "$foo"
+recho "$parameter"
+
+unset -v foo parameter
+
+foo="${parameter:=$var}"
+
+recho "$foo"
+recho "$parameter"
+
+unset -v foo parameter
+
+recho ${parameter:=a\ b}
+unset -v parameter
+
+recho ${parameter:="a b"}
+unset -v parameter
+
+v='a b'
+
+recho ${parameter:=$v}
+unset -v parameter
+
+recho ${parameter:="$v"}
+unset -v parameter
+
+# unsetting IFS here
+
+set "  abc  " " def  ghi " "jkl "
+unset -v IFS var
+var=${var-$*}/${var-$*}
+printf '[%s]\n' "$var"
+
+unset -v var
+: ${var=$*}
+printf '[%s]\n' "$var"
+
+unset -v var
+: ${var:=$*/$*/${var-$*}}
+printf '[%s]\n' "$var"
diff --git a/tests/posixexp7.sub b/tests/posixexp7.sub
new file mode 100644
index 0000000..4e3fa00
--- /dev/null
+++ b/tests/posixexp7.sub
@@ -0,0 +1,76 @@
+#   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 .
+#
+# test the effect of quotes on the WORD in the posix pattern removal operators
+#
+x=notOK
+x1=not
+
+cat <.
+#
 # A test suite for the POSIX.2 (BRE) pattern matching code
 LC_ALL=C
 LANG=C
@@ -20,13 +33,15 @@ 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
 
+# invalid character class expressions are no longer just characters to be
+# matched
 case a in
-[[:al:])	echo ok 6;;
+[[:al:])	echo bad 6;;
+*)		echo ok 6;;
 esac
 
 case '!' in
@@ -230,4 +245,3 @@ case a in
 [[=b=])		echo oops;;	# an incomplete equiv class is just a string
 *)		echo ok 3;;
 esac
-
diff --git a/tests/posixpipe.right b/tests/posixpipe.right
new file mode 100644
index 0000000..8f6c9cb
--- /dev/null
+++ b/tests/posixpipe.right
@@ -0,0 +1,41 @@
+1
+0
+a
+real 0.00
+user 0.00
+sys 0.00
+1
+a
+real 0.00
+user 0.00
+sys 0.00
+1
+tfunc is a function
+tfunc () 
+{ 
+    time 
+}
+1
+0
+1
+a
+real 0.00
+user 0.00
+sys 0.00
+0
+a
+real 0.00
+user 0.00
+sys 0.00
+0
+a
+real 0.00
+user 0.00
+sys 0.00
+0
+1
+0
+a
+real 0.00
+user 0.00
+sys 0.00
diff --git a/tests/posixpipe.tests b/tests/posixpipe.tests
new file mode 100644
index 0000000..fa8febe
--- /dev/null
+++ b/tests/posixpipe.tests
@@ -0,0 +1,56 @@
+#   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 .
+#
+# Test timed and negated pipelines in bash-4.2 and later
+export TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S'
+
+!
+echo $?
+
+! !
+echo $?
+
+time ! echo a
+echo $?
+
+! time echo a
+echo $?
+
+tfunc()
+{
+	time
+}
+
+type tfunc
+
+! true
+echo $?
+! ! true
+echo $?
+! ! ! true
+echo $?
+
+time time echo a
+echo $?
+
+time time -p echo a
+echo $?
+time -p time echo a
+echo $?
+
+!
+echo $?
+! !
+echo $?
+
+time -p -- echo a
diff --git a/tests/precedence b/tests/precedence.tests
old mode 100755
new mode 100644
similarity index 64%
rename from tests/precedence
rename to tests/precedence.tests
index 9bbdb97..111bd23
--- a/tests/precedence
+++ b/tests/precedence.tests
@@ -1,4 +1,19 @@
 # @(#)precedence_test 1.0 91/07/24 Maarten Litmaath
+
+#   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 .
+#
+
 # test of relative precedences for `&&' and `||' operators
 
 echo "\`Say' echos its argument. Its return value is of no interest."
diff --git a/tests/printf.right b/tests/printf.right
index a6bb04d..b032dcb 100644
Binary files a/tests/printf.right and b/tests/printf.right differ
diff --git a/tests/printf.tests b/tests/printf.tests
index 3dd5248..df37e47 100644
--- a/tests/printf.tests
+++ b/tests/printf.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 LC_ALL=C
 LC_NUMERIC=C
 
@@ -308,4 +321,14 @@ shopt -s nullglob extglob
 echo "x$(printf "%b" @(hugo))x"
 printf -v var "%b" @(hugo); echo "x${var}x"
 
+# make sure that missing arguments are always handled like the empty string
+printf "<%3s><%3b>\n"
+
+# tests variable assignment with -v
+${THIS_SH} ./printf1.sub
+
 ${THIS_SH} ./printf2.sub
+
+${THIS_SH} ./printf3.sub
+
+${THIS_SH} ./printf4.sub
diff --git a/tests/printf1.sub b/tests/printf1.sub
new file mode 100644
index 0000000..2cbbc6a
--- /dev/null
+++ b/tests/printf1.sub
@@ -0,0 +1,348 @@
+#   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 .
+#
+LC_ALL=C
+LC_NUMERIC=C
+
+unset vv
+
+# this should expand escape sequences in the format string, nothing else
+printf -v vv "\tone\n"
+printf "%s"  "$vv"
+
+# this should not cut off output after the \c
+printf -v vv "one\ctwo\n"
+printf "%s"  "$vv"
+
+# and unrecognized backslash escapes should have the backslash preserved
+printf -v vv "4\.2\n"
+printf "%s"  "$vv"
+
+printf -v vv "no newline " ; printf "%s" "$vv" ; printf -v vv "now newline\n"
+printf "%s"  "$vv"
+
+# %% -> %
+printf -v vv "%%\n"
+printf "%s"  "$vv"
+
+# 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 -v vv "\045"
+printf "%s"  "$vv"
+echo
+printf -v vv "\045d\n"
+printf "%s"  "$vv"
+
+# simple character output
+printf -v vv "%c\n" ABCD
+printf "%s"  "$vv"
+
+# test simple string output
+printf -v vv "%s\n" unquoted
+printf "%s"  "$vv"
+
+# test quoted string output
+printf -v vv "%s %q\n" unquoted quoted
+printf "%s"  "$vv"
+printf -v vv "%s%10q\n" unquoted quoted
+printf "%s"  "$vv"
+
+printf -v vv "%q\n" 'this&that'
+printf "%s"  "$vv"
+
+# make sure the format string is reused to use up arguments
+printf -v vv "%d " 1 2 3 4 5
+printf "%s"  "$vv"
+echo
+
+# make sure that extra format characters get null arguments
+printf -v vv "%s %d %d %d\n" onestring
+printf "%s"  "$vv"
+
+printf -v vv "%s %d %u %4.2f\n" onestring
+printf "%s"  "$vv"
+
+printf -v vv -- "--%s %s--\n" 4.2 ''
+printf "%s"  "$vv"
+printf -v vv -- "--%s %s--\n" 4.2
+printf "%s"  "$vv"
+
+# test %b escapes
+
+# 8 is a non-octal digit, so the `81' should be output
+#printf -v vv -- "--%b--\n" '\n\081'
+#printf "%s"  "$vv"
+
+printf -v vv -- "--%b--\n" '\t\0101'
+printf "%s"  "$vv"
+printf -v vv -- "--%b--\n" '\t\101'
+printf "%s"  "$vv"
+
+# these should all display `A7'
+printf -v vv "%b\n" '\01017'
+printf "%s"  "$vv"
+printf -v vv "%b\n" '\1017'
+printf "%s"  "$vv"
+printf -v vv "%b\n" '\x417'
+printf "%s"  "$vv"
+
+printf -v vv -- "--%b--\n" '\"abcd\"'
+printf "%s"  "$vv"
+printf -v vv -- "--%b--\n" "\'abcd\'"
+printf "%s"  "$vv"
+
+printf -v vv -- "--%b--\n" 'a\\x'
+printf "%s"  "$vv"
+
+printf -v vv -- "--%b--\n" '\x'
+printf "%s"  "$vv"
+
+Z1=$(printf -- "%b\n" '\a\b\e\f\r\v')
+Z2=$'\a\b\e\f\r\v'
+
+if [ "$Z1" != "$Z2" ]; then
+	printf "%s"  "whoops: printf -v vv %b and $'' differ" >&2
+fi
+unset Z1 Z2
+
+printf -v vv -- "--%b--\n" ''
+printf "%s"  "$vv"
+printf -v vv -- "--%b--\n"
+printf "%s"  "$vv"
+
+# the stuff following the \c should be ignored, as well as the rest
+# of the format string
+printf -v vv -- "--%b--\n" '4.2\c5.4\n'
+printf "%s"  "$vv"
+echo
+
+# unrecognized escape sequences should by displayed unchanged
+printf -v vv -- "--%b--\n" '4\.2'
+printf "%s"  "$vv"
+
+# a bare \ should not be processed as an escape sequence
+printf -v vv -- "--%b--\n" '\'
+printf "%s"  "$vv"
+
+# make sure extra arguments are ignored if the format string doesn't
+# actually use them
+printf -v vv "\n" 4.4 BSD
+printf "%s"  "$vv"
+printf -v vv " " 4.4 BSD
+printf "%s"  "$vv"
+echo
+
+# make sure that a fieldwidth and precision of `*' are handled right
+printf -v vv "%10.8s\n" 4.4BSD
+printf "%s"  "$vv"
+printf -v vv "%*.*s\n" 10 8 4.4BSD
+printf "%s"  "$vv"
+
+printf -v vv "%10.8q\n" 4.4BSD
+printf "%s"  "$vv"
+printf -v vv "%*.*q\n" 10 8 4.4BSD
+printf "%s"  "$vv"
+
+printf -v vv "%6b\n" 4.4BSD
+printf "%s"  "$vv"
+printf -v vv "%*b\n" 6 4.4BSD
+printf "%s"  "$vv"
+
+# we handle this crap with homemade code in printf -v vv.def
+printf -v vv "%10b\n" 4.4BSD
+printf "%s"  "$vv"
+printf -v vv -- "--%-10b--\n" 4.4BSD
+printf "%s"  "$vv"
+printf -v vv "%4.2b\n" 4.4BSD
+printf "%s"  "$vv"
+printf -v vv "%.3b\n" 4.4BSD
+printf "%s"  "$vv"
+printf -v vv -- "--%-8b--\n" 4.4BSD
+printf "%s"  "$vv"
+
+# test numeric conversions -- these four lines should printf "%s"  identically
+printf -v vv "%d %u %i 0%o 0x%x 0x%X\n" 255 255 255 255 255 255
+printf "%s"  "$vv"
+printf -v vv "%d %u %i %#o %#x %#X\n" 255 255 255 255 255 255
+printf "%s"  "$vv"
+
+printf -v vv "%ld %lu %li 0%o 0x%x 0x%X\n" 255 255 255 255 255 255
+printf "%s"  "$vv"
+printf -v vv "%ld %lu %li %#o %#x %#X\n" 255 255 255 255 255 255
+printf "%s"  "$vv"
+
+printf -v vv "%10d\n" 42
+printf "%s"  "$vv"
+printf -v vv "%10d\n" -42
+printf "%s"  "$vv"
+
+printf -v vv "%*d\n" 10 42
+printf "%s"  "$vv"
+printf -v vv "%*d\n" 10 -42
+printf "%s"  "$vv"
+
+# test some simple floating point formats
+printf -v vv "%4.2f\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%#4.2f\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%#4.1f\n" 4.2
+printf "%s"  "$vv"
+
+printf -v vv "%*.*f\n" 4 2 4.2
+printf "%s"  "$vv"
+printf -v vv "%#*.*f\n" 4 2 4.2
+printf "%s"  "$vv"
+printf -v vv "%#*.*f\n" 4 1 4.2
+printf "%s"  "$vv"
+
+printf -v vv "%E\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%e\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%6.1E\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%6.1e\n" 4.2
+printf "%s"  "$vv"
+
+printf -v vv "%G\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%g\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%6.2G\n" 4.2
+printf "%s"  "$vv"
+printf -v vv "%6.2g\n" 4.2
+printf "%s"  "$vv"
+
+# test some of the more esoteric features of POSIX.1 printf -v vv
+printf -v vv "%d\n" "'string'"
+printf "%s"  "$vv"
+printf -v vv "%d\n" '"string"'
+printf "%s"  "$vv"
+
+printf -v vv "%#o\n" "'string'"
+printf "%s"  "$vv"
+printf -v vv "%#o\n" '"string"'
+printf "%s"  "$vv"
+
+printf -v vv "%#x\n" "'string'"
+printf "%s"  "$vv"
+printf -v vv "%#X\n" '"string"'
+printf "%s"  "$vv"
+
+printf -v vv "%6.2f\n" "'string'"
+printf "%s"  "$vv"
+printf -v vv "%6.2f\n" '"string"'
+printf "%s"  "$vv"
+
+# output from these two lines had better be the same
+printf -v vv -- "--%6.4s--\n" abcdefghijklmnopqrstuvwxyz
+printf "%s"  "$vv"
+printf -v vv -- "--%6.4b--\n" abcdefghijklmnopqrstuvwxyz
+printf "%s"  "$vv"
+
+# and these two also
+printf -v vv -- "--%12.10s--\n" abcdefghijklmnopqrstuvwxyz
+printf "%s"  "$vv"
+printf -v vv -- "--%12.10b--\n" abcdefghijklmnopqrstuvwxyz
+printf "%s"  "$vv"
+
+# tests for translating \' to ' and \\ to \
+# printf -v vv translates \' to ' in the format string...
+printf -v vv "\'abcd\'\n"
+printf "%s"  "$vv"
+
+# but not when the %b format specification is used
+printf -v vv "%b\n" \\\'abcd\\\'
+printf "%s"  "$vv"
+
+# but both translate \\ to \
+printf -v vv '\\abcd\\\n'
+printf "%s"  "$vv"
+printf -v vv "%b\n" '\\abcd\\'
+printf "%s"  "$vv"
+
+# this was reported as a bug in bash-2.03
+# these three lines should all printf "%s"  `26'
+printf -v vv "%d\n" 0x1a
+printf "%s"  "$vv"
+printf -v vv "%d\n" 032
+printf "%s"  "$vv"
+printf -v vv "%d\n" 26
+printf "%s"  "$vv"
+
+# error messages
+
+# this should be an overflow, but error messages vary between systems
+# printf -v vv "%lu\n" 4294967296
+
+# ...but we cannot use this because some systems (SunOS4, for example),
+# happily ignore overflow conditions in strtol(3)
+#printf -v vv "%ld\n" 4294967296
+
+printf -v vv "%10"
+printf -v vv "ab%Mcd\n"
+
+# this caused an infinite loop in older versions of printf -v vv
+printf -v vv "%y" 0
+
+# these should print a warning and `0', according to POSIX.2
+printf -v vv "%d\n" GNU
+printf "%s"  "$vv"
+printf -v vv "%o\n" GNU
+printf "%s"  "$vv"
+
+# failures in all bash versions through bash-2.05
+printf -v vv "%.0s" foo
+printf "%s"  "$vv"
+printf -v vv "%.*s" 0 foo
+printf "%s"  "$vv"
+
+printf -v vv '%.0b-%.0s\n' foo bar
+printf "%s"  "$vv"
+printf -v vv '(%*b)(%*s)\n' -4 foo -4 bar
+printf "%s"  "$vv"
+
+format='%'`printf '%0100384d' 0`'d\n' 
+printf -v vv $format 0
+printf "%s"  "$vv"
+
+# failures in all bash versions through bash-3.0 - undercounted characters
+unset vv
+printf -v vv "  %s %s %s  \n%n" ab cd ef vvv
+printf "%s" "$vv"
+echo $vvv
+
+# this doesn't work with printf -v vv(3) on all systems
+#printf -v vv "%'s\n" foo
+
+# test cases from an austin-group list discussion
+# prints ^G as an extension
+printf -v vv '%b\n' '\7'
+printf "%s"  "$vv"
+
+# prints ^G
+printf -v vv '%b\n' '\0007'
+printf "%s"  "$vv"
+
+# prints NUL then 7
+#printf -v vv '\0007\n'
+#printf "%s"  "$vv"
+
+# prints no more than two hex digits
+printf -v vv '\x07e\n'
+printf "%s"  "$vv"
+
+# additional backslash escapes
+printf -v vv '\"\?\n'
+printf "%s"  "$vv"
diff --git a/tests/printf2.sub b/tests/printf2.sub
index 4cff30d..94a2bb1 100644
--- a/tests/printf2.sub
+++ b/tests/printf2.sub
@@ -1,5 +1,12 @@
-export LANG=en_US.UTF-8
+unset LC_ALL LC_CTYPE
+
+export LANG=C
+case $(printf %d\\n \'A) in
+65)	;;
+*)	echo "printf2.sub: character conversion failed" >&2  ;;
+esac
 
+export LANG=en_US.UTF-8
 case $(printf %d\\n \'À) in
 192)	exit 0;;
 *)	echo "printf2.sub: multibyte character conversion failed" >&2 ; exit 2 ;;
diff --git a/tests/printf3.sub b/tests/printf3.sub
new file mode 100644
index 0000000..4c54aa1
--- /dev/null
+++ b/tests/printf3.sub
@@ -0,0 +1,75 @@
+#   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 .
+#
+LC_ALL=C
+LANG=C
+
+SHELLSTART=$(date +%s)
+SECS=1275250155
+export TZ=EST5EDT
+
+case $SHELLSTART in
+*s*)	SHELLSTART=$EPOCHSECONDS ; DATESECS=false ;;	# take a shot
+*)	DATESECS=true ;;
+esac
+
+printf "%()T\n" $SECS
+printf "%(abde)Z\n" -1
+
+printf "%(%e-%b-%Y %T)T\n" $SECS
+
+printf -v v1 "%(%e-%b-%Y %T)T\n" $( $DATESECS && date +%s || echo $EPOCHSECONDS )
+printf -v v2 "%(%e-%b-%Y %T)T\n" -1
+
+case $v1 in
+$v2)	;;
+*)	echo "current time and -1 possible mismatch|$v1|$v2|" >&2 ;;
+esac
+unset v1 v2
+
+v1=$(date +%s)
+printf -v v2 "%(%s)T" -1
+
+case $v1 in
+$v2)	;;
+*)	echo "current time mismatch:$v1|$v2|" >&2 ;;
+esac
+unset v1 v2
+
+printf "%(%x %X)T\n" $(( $SECS - 3600 ))
+
+printf -v v1 "%(%F %r)T\n" $SHELLSTART
+printf -v v2 "%(%F %r)T\n" -2
+
+case $v1 in
+$v2)	;;
+*)	echo "shell start time and -2 possible mismatch|$v1|$v2|" >&2 ;;
+esac
+unset v1 v2
+
+printf "current time: %(%F %r)T\n" $SECS
+
+printf "epoch time: %(%F %r %z)T\n" 0
+printf "random time: %(%F %r %z)T\n"  $SECS
+
+printf "local time: %(%a %b %e %H:%M:%S %Z %Y)T\n" $SECS
+
+# test fieldwidth, justification, precision
+printf "%-40.50(%a %b %e %H:%M:%S %Z %Y)T date-style time\n" $SECS
+
+# test fieldwidth, justification, precision, embedded parens
+printf "%-40.50(%x (foo) %X)T date-style time\n" $SECS
+
+# problem introduced in bash-4.2 patch 5
+unset TZ
+printf '%(%Y-%m-%d %H:%M:%S %Z)T\n' >/dev/null
diff --git a/tests/printf4.sub b/tests/printf4.sub
new file mode 100644
index 0000000..ed4c538
--- /dev/null
+++ b/tests/printf4.sub
@@ -0,0 +1,82 @@
+#   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 .
+#
+# Problems with padding, field widths, and `+' through bash-4.2
+
+printf "x%10.0fx\n" 123
+printf -v foo "x%10.0fx" 123
+echo "$foo"
+
+printf "x%10.0fx\n" 123
+printf -v foo "x%10.0fx" 123
+echo "$foo"
+
+printf "x%10.fx\n" 123
+printf -v foo "x%10.fx" 123
+echo "$foo"
+
+printf "x%10.2fx\n" 123
+printf -v foo "x%10.2fx" 123
+echo "$foo"
+
+printf "x%10.02fx\n" 123
+printf -v foo "x%10.02fx" 123
+echo "$foo"
+
+printf "x%-010.0fx\n" 123
+printf -v foo "x%-010.0fx" 123
+echo "$foo"
+
+printf "x%+010.0ex\n" 123
+printf -v foo "x%+010.0ex" 123
+echo "$foo"
+
+printf "x%+010.0fx\n" 123
+printf -v foo "x%+010.0fx" 123
+echo "$foo"
+
+printf "x%+010.0gx\n" 123
+printf -v foo "x%+010.0gx" 123
+echo "$foo"
+
+printf "x%+010.0dx\n" 123
+printf -v foo "x%+010.0dx" 123
+echo "$foo"
+
+printf "x%+010.0ldx\n" 123
+printf -v foo "x%+010.0ldx" 123
+echo "$foo"
+
+printf "x%+010.0xx\n" 123
+printf -v foo "x%+010.0xx" 123
+echo "$foo"
+
+printf "x%-+10.0fx\n" 123
+printf -v foo "x%-+10.0fx" 123
+echo "$foo"
+
+printf "x%-+10.0dx\n" 123
+printf -v foo "x%-+10.0dx" 123
+echo "$foo"
+
+printf "%f\n" -123
+printf -v foo "%f" -123
+echo "$foo"
+
+printf "x%+10.0fx\n" 123
+printf -v foo "x%+10.0fx" 123
+echo "$foo"
+
+printf "x%+10.0dx\n" 123
+printf -v foo "x%+10.0dx" 123
+echo "$foo"
diff --git a/tests/procsub.right b/tests/procsub.right
new file mode 100644
index 0000000..c6471c5
--- /dev/null
+++ b/tests/procsub.right
@@ -0,0 +1,33 @@
+test1
+foo
+test2
+test4
+8
+test5
+test6
+test7
+test8
+test8a
+test9
+hi
+bye
+l8r
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+intern
+1
+0
+0
+0
+0
+extern
+1
+0
+0
+0
+0
+123
+bar1
+ouch
+bar2
+foo
+subshell
diff --git a/tests/procsub.tests b/tests/procsub.tests
new file mode 100644
index 0000000..946d2c2
--- /dev/null
+++ b/tests/procsub.tests
@@ -0,0 +1,121 @@
+#   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 .
+#
+# process substitution constructs that have caused problems in the past
+. ./test-glue-functions
+
+eval cat <(echo test1)
+eval "echo foo;cat" <(echo test2)
+
+# this doesn't work, and it never should have
+#unset f
+#f=<(echo test3); cat "$f"
+
+unset f
+eval f=<(echo test4) "; cat \$f"
+
+unset f
+
+FN=$TMPDIR/bashtest-procsub-$$
+cat >"$FN" </dev/null
+}
+f2(){
+  date >/dev/null
+  cat $1
+}
+cat <(echo hi)
+f1 <(echo bye)
+f2 <(echo l8r)
+
+unset -f f1 f2
+
+# set up conditions for test
+ulimit -n 256
+
+bug()
+{
+c=$(ulimit -n)
+let c+=100
+while let c--
+do
+	while read -ru3 x
+	do
+		echo -n :
+	done 3< <(echo x)
+done
+echo
+}
+
+bug
+unset -f bug
+
+count_lines()
+{
+    wc -l < $1
+
+    case "$1" in
+    *sh-np*)	[ -e "$1" ] || { echo 0; echo 0; echo 0; echo 0; return; } ;;
+    *) ;;
+    esac
+
+    wc -l < $1
+    wc -l < $1
+    true | wc -l < $1
+    wc -l < $1
+}
+
+echo intern
+count_lines <(date) | _cut_leading_spaces
+unset -f count_lines
+
+echo extern
+FN=$TMPDIR/bashtest-$$
+cat >$FN << \EOF
+wc -l < $1
+case $1 in *sh-np*) [ -e $1 ] || { echo 0; echo 0; echo 0; echo 0; return; } ;; esac
+wc -l < $1
+wc -l < $1
+true | wc -l < $1
+wc -l < $1
+EOF
+
+${THIS_SH} -c "source $FN <(date)" | _cut_leading_spaces
+rm -f $FN
+
+moo() { ls -l "$1" >/dev/null; ls -l "$1" >/dev/null; }; moo >(true)
+moo() { ls -al "$1" >/dev/null; (true); ls -al "$1" >/dev/null; }; moo >(true)
+
+unset -f moo
+
+${THIS_SH} ./procsub1.sub
+${THIS_SH} ./procsub2.sub
diff --git a/tests/procsub1.sub b/tests/procsub1.sub
new file mode 100644
index 0000000..0e68f3b
--- /dev/null
+++ b/tests/procsub1.sub
@@ -0,0 +1,5 @@
+# make sure we can wait for the last process substitution, since it sets $!
+cat <(exit 123) >/dev/null
+
+wait "$!"
+echo $?
diff --git a/tests/procsub2.sub b/tests/procsub2.sub
new file mode 100644
index 0000000..75ad2d0
--- /dev/null
+++ b/tests/procsub2.sub
@@ -0,0 +1,36 @@
+#   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 .
+#
+
+# test whether or not we remove FIFOs and close pipe file descriptors too
+# aggressively
+
+ouch()
+{
+    while read foo; do echo "$foo"; done < <(echo bar1)
+    cat "$1"
+}
+
+ouch <(echo ouch )
+
+ouch2()
+{
+    { cat; } < <(echo bar2)
+    cat "$1"
+}
+
+exec 4< <(echo subshell)
+ouch2 <(echo foo )
+
+read var <&4
+echo $var
diff --git a/tests/quote.right b/tests/quote.right
index 424d1a0..303e685 100644
--- a/tests/quote.right
+++ b/tests/quote.right
@@ -66,3 +66,117 @@ argv[2] = 
 ${
 argv[1] = <(")>
 argv[1] = <(")>
+string \
+string \
+string \
+string \
+string \
+string \}
+'weferfds'\''dsfsdf' 
+'weferfdsdsfsdf'
+'weferfds'\''dsfsdf'
+'weferfds'\\dsfsdf'
+testdd ddtest
+testdd '\''ddtest
+testdddding
+testdddding
+test'ing
+test'ing
+test'string
+a'b'c
+foo b   c baz
+foo 'bar baz
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[2] = <>
+argv[1] = <>
+argv[2] = <>
+argv[1] = <>
+=====
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[2] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[2] = <>
+=====
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[2] = <>
+argv[1] = <>
+argv[2] = <>
+argv[1] = <>
+=====
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[2] = <>
+argv[1] = <>
+argv[2] = <>
+argv[1] = <>
+argv[1] = <4>
+argv[2] = <>
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[2] = <>
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+0
+1
+1
+1
+1
+1
+1
+1
+2
+2
+2
+2
+0
+1
+1
+1
+1
+1
+1
+1
+2
+2
+2
+2
+0
+0
+0
+2
+2
+4
+4
+3
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
diff --git a/tests/quote.tests b/tests/quote.tests
index 46edea7..0a0b4af 100644
--- a/tests/quote.tests
+++ b/tests/quote.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 echo "Single Quote"
 echo 'foo
 bar'
@@ -109,3 +122,18 @@ recho `echo "(\\")"`
 # ultimate workaround
 recho `echo "(\")"`
 
+# various strings ending in backslashes
+
+echo 'string \'
+echo "string \\"
+
+echo string\ \\
+
+echo ${foo:-'string \'}
+echo "${foo:-string \\}"
+echo ${foo:-string \\\}}
+
+${THIS_SH} ./quote1.sub
+${THIS_SH} ./quote2.sub
+${THIS_SH} ./quote3.sub
+${THIS_SH} ./quote4.sub
diff --git a/tests/quote1.sub b/tests/quote1.sub
new file mode 100644
index 0000000..86f9786
--- /dev/null
+++ b/tests/quote1.sub
@@ -0,0 +1,62 @@
+#   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 .
+#
+# inconsistency with quoted pattern substitution patterns through bash-4.2
+# fixed in a ksh93-compatible (and Posix-compatible, in general) way
+# NOT backwards compatible
+
+test="weferfds'dsfsdf"
+
+# why does this work, this list was born of frustration, I tried
+# everything I could think of.
+echo \'${test//"'"/\'\\\'\'}\'" "
+
+#but none of the following
+
+echo "'${test//"'"/}'"
+
+echo "'${test//"'"/"'\\''"}'"
+
+printf "%s\n" "'${test//"'"/\'\\'\'}'"
+
+#echo "'${test//'/}'"   # hangs waiting for '
+#echo "'${test//"'"/'\\''}'" # hangs waiting for '
+
+unset test
+test=teststrtest
+echo "${test//str/"dd dd"}"
+echo ${test//str/"dd '\''dd"}
+
+unset test
+test=teststring
+
+echo "${test//str/"dddd"}"
+
+echo ${test//str/"dddd"}
+
+echo ${test//str/"'"}
+
+echo "${test//str/"'"}"
+
+#echo "${test//str/'}"   # hangs
+
+test=test\'string
+echo "${test//"'"/"'"}"
+
+x="a'b'c"; echo "${x//\'/\'}"
+
+printf '%s\n' "foo ${IFS+"b   c"} baz"
+
+# this is where the default behavior differs from posix
+set -o posix
+echo "foo ${IFS+'bar} baz"
diff --git a/tests/quote2.sub b/tests/quote2.sub
new file mode 100644
index 0000000..1012b8f
--- /dev/null
+++ b/tests/quote2.sub
@@ -0,0 +1,55 @@
+#   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 .
+#
+x=x
+e=
+
+recho ${x:+""}
+recho ${x:+ ""}
+recho ${x:+"" }
+recho ${x:+"$e"}
+recho ${x:+ "$e"}
+recho ${x:+"$e""$e"""}
+recho ${x:+"$e""$e"""}
+recho ${x:+"$e" "$e"""}
+recho ${x:+"$e""$e" ""}
+recho ${x:+ "$e""$e"""}
+
+echo =====
+recho ${x:+''}
+recho ${x:+ ''}
+recho ${x:+'' }
+recho ${x:+'' ''}
+
+recho ${x:+$e''}
+recho ${x:+''$e}
+
+recho ${x:+''$e $e''}
+
+echo =====
+recho ${x:+"$(:)"}
+recho ${x:+ "$(:)"}
+recho ${x:+"$(:)""$(:)"""}
+recho ${x:+"$(:)""$(:)"""}
+recho ${x:+"$(:)" "$(:)"""}
+recho ${x:+"$(:)""$(:)" ""}
+recho ${x:+ "$(:)""$(:)"""}
+
+echo =====
+recho ${x:+"`:`"}
+recho ${x:+ "`:`"}
+recho ${x:+"`:`""`:`"""}
+recho ${x:+"`:`""`:`"""}
+recho ${x:+"`:`" "`:`"""}
+recho ${x:+"`:`""`:`" ""}
+recho ${x:+ "`:`""`:`"""}
diff --git a/tests/quote3.sub b/tests/quote3.sub
new file mode 100644
index 0000000..54bc5ed
--- /dev/null
+++ b/tests/quote3.sub
@@ -0,0 +1,31 @@
+#   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 .
+#
+# new tests
+x=4
+sp=' '
+
+# word
+recho ${x}${sp}''
+
+# unquoted
+recho ${x+ab "$y"}
+recho ${x+ab ''}
+recho ${x+ab "$( : )"}
+recho ${x+ab "${yy}"}
+
+# quoted
+recho "${x+ab ''}"
+recho "${x+ab ""}"
+recho "${x+ab '${yy}'}"
+recho "${x+ab "${yy}"}"
diff --git a/tests/quote4.sub b/tests/quote4.sub
new file mode 100644
index 0000000..ab534c8
--- /dev/null
+++ b/tests/quote4.sub
@@ -0,0 +1,101 @@
+#   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 .
+#
+n() { echo $#; }
+
+set --
+
+n "$@"
+
+# should be 1
+n "$@"''
+n ''"$@"
+n ''"$@"''
+
+set -- ''
+
+n "$@"
+# should be 1
+n "$@"''
+n ''"$@"
+n ''"$@"''
+
+set -- '' ''
+
+n "$@"
+# should be 2
+n ''"$@"
+# should be 2
+n "$@"''
+# should be 2
+n ''"$@"''
+
+x=x
+
+set --
+
+n ${x+"$@"}
+
+# should be 1
+n ${x+"$@"''}
+n ${x+''"$@"}
+n ${x+''"$@"''}
+
+set -- ''
+
+n ${x+"$@"}
+# should be 1
+n ${x+"$@"''}
+n ${x+''"$@"}
+n ${x+''"$@"''}
+
+set -- '' ''
+
+n ${x+"$@"}
+# should be 2
+n ${x+''"$@"}
+# should be 2
+n ${x+"$@"''}
+# should be 2
+n ${x+''"$@"''}
+
+
+set --
+
+n "$@" "$@"
+n "$@""$@"
+
+n ${x+"$@" "$@"}
+
+set -- ''
+
+n ${x+"$@" "$@"}
+n "$@" "$@"
+
+set -- '' ''
+
+n ${x+"$@" "$@"}
+n "$@" "$@"
+n "$@""$@"
+
+# new tests
+unset -v x
+v=$'\177'
+
+recho ''$'\177'''
+recho $'\177'''
+recho ''$'\177'
+
+recho ''$v''
+recho ''$v
+recho $v''
diff --git a/tests/quotearray.right b/tests/quotearray.right
new file mode 100644
index 0000000..e689365
--- /dev/null
+++ b/tests/quotearray.right
@@ -0,0 +1,152 @@
+declare -A assoc=(["x],b[\$(echo uname >&2)"]="1" )
+declare -A assoc=(["\$key"]="1" ["x],b[\$(echo uname >&2)"]="1" )
+declare -A assoc=(["\$key"]="1" ["x],b[\$(echo uname >&2)"]="2" )
+./quotearray.tests: line 31: ((: 'assoc[x\],b\[\$(echo uname >&2)]++' : syntax error: operand expected (error token is "'assoc[x\],b\[\$(echo uname >&2)]++' ")
+declare -A assoc=(["\$key"]="1" ["x],b[\$(echo uname >&2)"]="2" )
+./quotearray.tests: line 34: ((: 'assoc[x\],b\[\$(echo uname >&2)]'++ : syntax error: operand expected (error token is "'assoc[x\],b\[\$(echo uname >&2)]'++ ")
+declare -A assoc=(["\$key"]="1" ["x],b[\$(echo uname >&2)"]="2" )
+declare -A assoc=(["\$key"]="1" ["x],b[\$(echo uname >&2)"]="3" )
+4
+klmnopqrst
+klmnopqrst
+klmno
+klmnopqrst
+declare -A A=(["\$(echo %)"]="5" [%]="10" ["]"]="10" )
+declare -A A=(["~"]="42" )
+42
+declare -A A=(["~"]="43" )
+42
+declare -A A=(["~"]="43" ["~0"]="43" )
+12
+declare -a a=([0]="12" [1]="42")
+2
+2
+declare -Ai assoc=(["']"]="3" ["\$var"]="1" )
+105
+declare -A assoc=(["\` echo >&2 foo\`"]="42" ["\$( echo >&2 bar)"]="63" )
+./quotearray.tests: line 140: x],b[$(echo uname >&2): syntax error: invalid arithmetic operator (error token is "],b[$(echo uname >&2)")
+./quotearray.tests: line 144: x],b[$(echo uname >&2): syntax error: invalid arithmetic operator (error token is "],b[$(echo uname >&2)")
+1
+./quotearray.tests: line 147: x],b[$(echo uname >&2): syntax error: invalid arithmetic operator (error token is "],b[$(echo uname >&2)")
+1
+./quotearray.tests: line 150: x],b[$(echo uname >&2): syntax error: invalid arithmetic operator (error token is "],b[$(echo uname >&2)")
+1
+./quotearray.tests: line 153: x],b[$(echo uname >&2): syntax error: invalid arithmetic operator (error token is "],b[$(echo uname >&2)")
+1
+declare -A assoc
+0
+0
+1
+0
+0
+0
+declare -A assoc=(["\` echo >&2 foo\`"]="128" [0]="0" ["]"]="12" ["x],b[\$(echo uname >&2)"]="42" ["~"]="42" ["\$( echo 2>& date)"]="foo" )
+foo
+0
+0
+./quotearray1.sub: line 68: 0\],b\[1: syntax error: invalid arithmetic operator (error token is "\],b\[1")
+declare -a array
+0
+0
+0
+0
+1
+1
+declare -A aa=(["\$( echo 2>& date)"]="foo" )
+foo
+0
+1
+1
+./quotearray1.sub: line 113: test: aa[$(echo: binary operator expected
+2
+[[ -v assoc[a] ]]; $?=0
+[[ -v assoc["] ]]; $?=0
+declare -A assoc=(["\""]="123" [a]="123" )
+declare -A a=([1]="1" [0]="0" [" "]="11" )
+7
+7
+declare -A A=([$'\t']="2" [" "]="2" )
+declare -A A=([$'\t']="2" ["*"]="2" [" "]="2" ["]"]="2" ["@"]="2" )
+./quotearray2.sub: line 54: read: `A[]]': not a valid identifier
+declare -A A=([$'\t']="X" ["*"]="X" [" "]="X" ["@"]="X" )
+./quotearray2.sub: line 62: printf: `A[]]': not a valid identifier
+declare -A A=([$'\t']="X" ["*"]="X" [" "]="X" ["@"]="X" )
+./quotearray2.sub: line 70: declare: `A[]]=X': not a valid identifier
+declare -A A=(["*"]="X" ["@"]="X" )
+./quotearray2.sub: line 78: declare: `A[]]=X': not a valid identifier
+declare -A A=(["*"]="X" ["@"]="X" )
+./quotearray2.sub: line 89: let: assoc[x],b[$(echo: bad array subscript (error token is "b[$(echo")
+declare -A assoc
+declare -A assoc=(["\$(echo foo)"]="1" )
+0
+declare -A assoc=(["\$var"]="value" )
+declare -A assoc=(["\$var"]="value" )
+declare -A assoc=(["\$var"]="value" )
+declare -A assoc=()
+declare -A a=(["\$(echo foo)"]="1" )
+declare -A a=()
+declare -A a=(["\$(echo foo)"]="1" )
+declare -A a=(["\$(echo foo)"]="1" )
+declare -A assoc=(["!"]="bang" )
+1
+1
+declare -A assoc=(["!"]="bang" ["@"]="at" )
+declare -A assoc=(["!"]="bang" )
+declare -a array=([0]="1" [1]="2" [2]="3")
+declare -a array=()
+./quotearray3.sub: line 98: declare: array: not found
+declare -A map=(["foo\$(uname >/dev/tty)bar"]="1" )
+1
+declare -A map=()
+$(DOESNOTEXIST)
+declare -A blah=()
+declare -A assoc=(["*"]="star" ["!"]="bang" ["@"]="at" )
+declare -A assoc=(["*"]="star" ["!"]="bang" )
+declare -A assoc=(["!"]="bang" )
+./quotearray4.sub: line 41: declare: assoc: not found
+declare -A assoc=(["*"]="star" ["!"]="bang" ["@"]="at" )
+declare -A assoc=(["*"]="star" ["!"]="bang" )
+declare -A assoc=(["!"]="bang" )
+declare -A assoc=(["*"]="star" ["!"]="bang" )
+declare -A assoc=(["!"]="bang" )
+star bang at
+star bang at
+0
+0
+0
+1
+1
+declare -A assoc=(["*"]="star" ["!"]="bang" ["@"]="       key" )
+===
+1
+1
+declare -a array=([0]="1" [1]="2" [2]="3")
+1 2 3
+1 2 3
+0
+0
+./quotearray4.sub: line 115: array[@]: bad array subscript
+declare -a array=([0]="1" [1]="2" [2]="3")
+./quotearray5.sub: line 27: unset: `a[$(echo': not a valid identifier
+./quotearray5.sub: line 27: unset: `foo)]': not a valid identifier
+declare -A a=()
+declare -A a=()
+declare -A a=()
+-----
+declare -A a=(["\$(echo foo)"]="1" )
+declare -A a=()
+declare -A a=()
+declare -A a=()
+-----
+declare -A a=()
+declare -A a=()
+declare -A a=()
+----------
+declare -A a=([.]="v1" )
+declare -A a=([.]="v1" )
+-----
+declare -A a=([.]="v1" )
+declare -A a=([.]="v1" )
+-----
+declare -A a=([.]="v1" )
+declare -A a=([.]="v1" )
diff --git a/tests/quotearray.tests b/tests/quotearray.tests
new file mode 100644
index 0000000..e1ed83b
--- /dev/null
+++ b/tests/quotearray.tests
@@ -0,0 +1,164 @@
+#   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 .
+#
+
+# a set of tests for associative arrays in arithmetic contexts
+
+declare -A assoc
+key='x],b[$(echo uname >&2)'
+
+(( assoc[$key]++ ))
+declare -p assoc
+
+(( assoc['$key']++ ))
+declare -p assoc
+
+(( assoc["$key"]++ ))
+declare -p assoc
+
+declare -A assoc
+
+(( 'assoc[$key]++' ))
+declare -p assoc
+
+(( 'assoc[$key]'++ ))
+declare -p assoc
+
+(( "assoc[$key]++" ))
+declare -p assoc
+
+unset assoc
+
+typeset -A a
+b="80's"
+
+((++a[$b]))
+
+((++a["$b"]))
+[[ $((++a[$b])) ]]
+[[ $((++a["$b"])) ]]
+
+echo ${a[$b]}
+unset a
+
+declare -A A
+
+string=abcdefghijklmnopqrstuvwxyz
+
+echo ${string:10:10}
+k1='%'
+k2='$(echo %)'
+
+A[%]=10
+A[']']=10
+A[$k2]=5
+
+k3=']'
+
+echo ${string:A[%]:A[$k1]}
+echo ${string:A[%]:A[$k2]}
+echo ${string:A[%]:A[$k3]}
+
+declare -p A
+
+unset A string key
+
+key='~'
+
+declare -A A
+A[$key]=42
+
+declare -p A
+
+echo $(( A[$key]++ ))
+declare -p A
+
+key='~0'
+A[$key]=42
+echo $(( A[$key]++ ))
+declare -p A
+
+declare -a a
+key='~-2'
+a[0]=12
+a[$key]=42
+echo $(( a[7<(4+2)] ))
+
+declare -p a
+
+unset A a key
+
+declare -A A
+declare -a a
+
+sString="devel packager's guide"
+i=2
+
+A["$sString"]=$i
+a[$i]=$sString
+
+echo "${A[${a[i]}]}"
+echo ${A["${a[i]}"]}
+
+unset A a
+
+#LANG=C
+unset var assoc
+var=\'\]
+declare -Ai assoc
+assoc[$var]=1
+assoc[$var]+=1
+((assoc['$var']++))
+((assoc[$var]++))
+typeset -p assoc
+
+unset assoc
+
+declare -A assoc
+key1='` echo >&2 foo`'
+key2='$( echo >&2 bar)'
+
+assoc[$key1]=42
+assoc[$key2]=63
+
+echo $(( assoc[$key1] + assoc[$key2] ))
+declare -p assoc
+unset assoc
+
+declare -a a
+key='x],b[$(echo uname >&2)'
+a[$key]=42
+
+expr='a[$key]'
+
+(( $expr ))
+echo $?
+
+echo $(( $expr ))
+echo $?
+
+echo $(( expr ))
+echo $?
+
+(( expr ))
+echo $?
+
+${THIS_SH} ./quotearray1.sub
+${THIS_SH} ./quotearray2.sub
+${THIS_SH} ./quotearray3.sub
+
+# behavior of builtins with array subscripts @ and *
+${THIS_SH} ./quotearray4.sub
+
+# behavior of unset with quoted and unquoted array arguments
+${THIS_SH} ./quotearray5.sub
diff --git a/tests/quotearray1.sub b/tests/quotearray1.sub
new file mode 100644
index 0000000..19741b1
--- /dev/null
+++ b/tests/quotearray1.sub
@@ -0,0 +1,131 @@
+#   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 .
+#
+
+# arithmetic operators for conditional commands and arithmetic commands
+
+declare -A assoc
+declare -a index
+
+key='x],b[$(echo uname >&2)'
+key1=']'
+key2='` echo >&2 foo`'
+key3='~'
+key4='7<(4+2)'
+key5='$( echo 2>& date)'
+key6='$(echo foo)'
+
+[[ -n assoc[$key] ]]
+declare -p assoc
+
+assoc[$key]=42
+assoc[$key1]=12
+assoc[$key2]=128
+assoc[$key3]=42
+assoc[0]=0
+
+[[ assoc[$key] -eq assoc[$key] ]]
+echo $?
+
+[[ assoc[$key] -gt assoc[$key1] ]]
+echo $?
+
+[[ assoc[$key2] -lt assoc[$key] ]]
+echo $?
+
+[[ assoc[$key] -eq assoc[$key3] ]]
+echo $?
+
+[[ index[7<(4+2)] -le assoc[0] ]]
+echo $?
+[[ index[$key4] -le assoc[0] ]]
+echo $?
+
+assoc[$key5]=foo
+declare -p assoc
+
+echo "${assoc[$key5]}"
+
+[[ -v assoc[$key5] ]]
+echo $?
+[[ -v assoc[$key] ]]
+echo $?
+
+unset assoc
+
+declare -a array
+index='0],b[1';
+((array[$index]++))
+
+declare -p array
+
+unset array
+
+declare -A assoc
+
+assoc[$key]=42
+assoc[$key4]=42
+
+[[ -v assoc[$key] ]]
+echo $?
+[[ -v assoc["$key"] ]]
+echo $?
+
+[[ -v assoc[$key4] ]]
+echo $?
+[[ -v assoc["$key4"] ]]
+echo $?
+
+[[ -v assoc['$key'] ]]
+echo $?
+[[ -v assoc['$key4'] ]]
+echo $?
+
+unset -v assoc
+
+declare -A aa
+aa[$key5]=foo
+
+declare -p aa
+echo "${aa[$key5]}"
+
+[[ -v aa[$key5] ]]
+echo $?
+
+[[ -v aa[$key] ]]
+echo $?
+
+aa[$key6]=42
+# this still performs expansion
+test -v aa["$key6"]
+echo $?
+# should be an error
+test -v aa[$key6]
+echo $?
+
+unset aa key
+
+declare -A assoc
+    
+mytest ()
+{
+        assoc["$1"]=123
+        [[ -v assoc["$1"] ]]
+        printf '[[ -v assoc[%s] ]]; $?=%s\n' "$1" "$?"
+}
+    
+mytest 'a' 
+mytest '"' 
+declare -p assoc
+unset -v assoc
+unset -f mytest
diff --git a/tests/quotearray2.sub b/tests/quotearray2.sub
new file mode 100644
index 0000000..056f8ca
--- /dev/null
+++ b/tests/quotearray2.sub
@@ -0,0 +1,107 @@
+#   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 .
+#
+
+# assoc_expand_once for builtins
+
+typeset -A a
+a[0]=0 a[1]=1
+
+let "a[\" \"]=11" ; typeset -p a ; a[0]=0
+
+unset a
+
+# tests for `problem' keys when using associative arrays and assoc_expand_once
+# deal with problems for now; this is a placeholder for if and when I fix them
+
+typeset -A a
+
+k='['
+echo $(( a[$k]=7 ))
+
+k=']'
+echo $(( a[$k]=7 ))
+
+unset a
+
+declare -A A
+
+for k in $'\t' ' '; do
+   (( A[$k]=2 ))
+done
+declare -p A
+
+for k in ']' '*' '@'; do
+   (( A[$k]=2 ))
+done
+
+declare -p A
+
+unset A
+declare -A A
+
+for k in $'\t' ' ' ']' '*' '@'; do
+   read "A[$k]" <<< X
+done
+declare -p A
+
+unset A
+declare -A A
+
+for k in $'\t' ' ' ']' '*' '@'; do
+	printf -v "A[$k]" "%s" X
+done
+declare -p A
+
+unset A
+declare -A A
+
+for k in ']' '*' '@'; do
+   declare A[$k]=X
+done
+declare -p A
+
+unset A
+declare -A A
+
+for k in ']' '*' '@'; do
+   declare "A[$k]=X"
+done
+declare -p A
+
+unset A
+
+# this isn't right yet, but changes will show up here
+shopt -s assoc_expand_once
+declare -A assoc
+key='x],b[$(echo uname >&2)'
+
+let assoc[$key]++
+declare -p assoc
+
+unset assoc
+
+typeset -A assoc
+at=@
+
+key='$(echo foo)'
+
+assoc[$key]=1
+declare -p assoc
+
+shopt -s assoc_expand_once
+test -v assoc["$key"] ; echo $?
+
+unset assoc
+shopt -u assoc_expand_once
+
diff --git a/tests/quotearray3.sub b/tests/quotearray3.sub
new file mode 100644
index 0000000..65f950d
--- /dev/null
+++ b/tests/quotearray3.sub
@@ -0,0 +1,117 @@
+#   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 .
+#
+
+# assoc_expand_once and unset builtin, which is treated specially
+
+declare -A assoc
+
+var=x123
+assoc['$var']=value
+declare -p assoc 
+
+shopt -u assoc_expand_once
+unset "assoc[$var]"
+declare -p assoc
+
+unset 'assoc[$var]'
+declare -p assoc
+
+assoc['$var']=value
+shopt -s assoc_expand_once
+unset 'assoc[$var]'
+declare -p assoc
+
+unset assoc
+shopt -u assoc_expand_once
+
+declare -A a
+a['$(echo foo)']=1
+
+unset 'a[$(echo foo)]'
+declare -p a
+
+key='$(echo foo)'
+a[$key]=1
+
+unset 'a[$key]'
+declare -p a
+
+a[$key]=1
+unset "a[$key]"
+declare -p a
+
+a[$key]=1
+unset a[$key]
+declare -p a
+
+unset a
+
+typeset -A assoc
+key=@
+
+assoc[@]=at
+assoc[!]=bang
+
+# this should only unset the element with key `@'
+unset -v assoc[$key]
+typeset -p assoc
+
+# this should check for assoc[@] and return 1
+test -v assoc[$key]
+echo $?
+
+# this should too
+[[ -v assoc[$key] ]]
+echo $?
+
+unset assoc array
+
+declare -A assoc
+declare -a array
+
+assoc=([@]=at [!]=bang)
+declare -p assoc
+
+unset assoc[@]
+declare -p assoc
+
+array=(1 2 3)
+declare -p array
+
+# right now, this still unsets the entire array
+unset array[@]
+declare -p array
+
+BASH_COMPAT=51
+unset array[@]
+declare -p array
+
+declare -A map; key='foo$(uname >/dev/tty)bar'; map[$key]=1
+declare -p map
+echo ${map["$key"]}
+
+unset map["$key"]
+declare -p map
+unset map
+
+declare -A blah
+blah['$(DOESNOTEXIST)']=broken
+for i in "${!blah[@]}"; do echo "$i"; done
+
+for i in "${!blah[@]}"; do unset blah["$i"]; done
+declare -p blah
+unset blah
+
+
+
diff --git a/tests/quotearray4.sub b/tests/quotearray4.sub
new file mode 100644
index 0000000..964aac7
--- /dev/null
+++ b/tests/quotearray4.sub
@@ -0,0 +1,116 @@
+#   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 .
+#
+
+# tests for builtins handling associative array keys `*' and `@', with some
+# indexed array tests as well (backwards compatible)
+
+# derived from test cases posted to bug-bash by myoga.murase@gmail.com
+
+declare -A assoc
+declare -a array
+
+assoc[@]=at
+assoc[*]=star
+assoc[!]=bang
+
+key=@
+
+iref='array[@]'
+aref='assoc[@]'
+
+declare -p assoc
+
+unset assoc[@]
+declare -p assoc
+
+unset assoc[*]
+declare -p assoc
+
+unset assoc
+declare -p assoc
+
+declare -A assoc
+assoc[@]=at
+assoc[*]=star
+assoc[!]=bang
+
+declare -p assoc
+
+unset assoc["$key"]
+declare -p assoc
+
+unset assoc["*"]
+declare -p assoc
+
+assoc[@]=at assoc[*]=star
+
+unset assoc['@']
+declare -p assoc
+
+unset assoc['*']
+
+declare -p assoc
+
+assoc[@]=at assoc[*]=star
+echo ${!aref}
+
+declare -n nref=$aref
+echo ${nref}
+unset -n nref
+
+# for associative arrays, test -v treats @ and * as keys
+
+test -v 'assoc[@]'
+echo $?
+test -v assoc[$key]
+echo $?
+[[ -v assoc[$key] ]]
+echo $?
+
+unset -v 'assoc[@]'
+
+test -v 'assoc[@]'
+echo $?
+[[ -v assoc[@] ]]
+echo $?
+
+assoc[@]=at
+
+printf -v assoc[@] "%10s" key
+declare -p assoc
+
+echo ===
+array=()
+test -v array[@]
+echo $?
+[[ -v array[@] ]]
+echo $?
+
+array=(1 2 3)
+declare -p array
+
+echo ${!iref}
+declare -n nref=$iref
+
+echo $nref
+unset -n nref
+
+# but for indexed arrays, test -v treats @ and * as standing for the entire array
+test -v 'array[@]'
+echo $?
+[[ -v array[@] ]]
+echo $?
+
+printf -v array[@] "%-10s" key
+declare -p array
diff --git a/tests/quotearray5.sub b/tests/quotearray5.sub
new file mode 100644
index 0000000..5366a99
--- /dev/null
+++ b/tests/quotearray5.sub
@@ -0,0 +1,124 @@
+#   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 .
+#
+
+# a set of tests for unset to try to ensure that subscripts are only expanded
+# once. Derived from tests submitted by konsolebox@gmail.com
+
+declare -A a
+key='$(echo foo)'
+
+# Here the tokens are valid array references and pass that fact to unset
+# post-expansion
+
+# This solves the surprise expansion issues.
+
+a[$key]=1
+unset -v a[$key]		# this performs normal word splitting
+unset -v a["$key"]		# prevent word splitting
+declare -p a # Displays no element
+
+a['$key']=2
+unset -v a['$key']
+declare -p a # Displays no element
+
+a["foo"]=3
+unset -v a["foo"]
+declare -p a # Displays no element
+
+echo -----
+
+# Here the tokens are "strings".  They expand and keep the
+# original behavior and allows existing scripts to not break.
+# It also allows nref or iref references to be transparently
+# referenced in it.
+
+# the quotes prevent the arguments from being recognized as valid array
+# references before word expansion. since unset doesn't know to treat
+# them specially, they're treated as in previous versions and expansion
+# is performed as part of evaluating the subscript
+
+a[$key]=1
+declare -p a
+unset 'a[$key]' # Transforms to a[$key] after expansion
+declare -p a # Displays no element
+
+a['$key']=2
+unset "a['\$key']" # Transforms to a['$key'] after expansion
+declare -p a # Displays no element
+
+a["foo"]=3
+unset 'a["foo"]' # Transforms to a["foo"] after expansion
+declare -p a # Displays no element
+
+echo -----
+
+# The update also keeps compatibility with already existing behavior of
+# unset when assoc_expand_once is enabled, but only for quoted tokens.
+
+a=()
+shopt -s assoc_expand_once
+
+a[$key]=1
+unset "a[$key]"
+declare -p a # Displays no element
+
+a['$key']=2
+unset "a[\$key]"
+declare -p a # Displays no element
+
+a["foo"]=3
+unset "a[foo]"
+declare -p a # Displays no element
+
+echo ----------
+
+# For unsetting '@' and all elements:
+
+key=@
+
+declare -A a=(@ v0 . v1)
+unset a[$key]
+declare -p a # Displays 'declare -A a=([.]="v1" )'
+
+declare -A a=(@ v0 . v1)
+unset a[@]
+declare -p a # same behavior
+
+echo -----
+
+# these are quoted strings and unset doesn't treat them specially
+
+unset a
+shopt -u assoc_expand_once
+
+declare -A a=(@ v0 . v1)
+unset 'a[$key]'
+declare -p a # Displays 'declare -A a=([.]="v1" )'
+
+declare -A a=(@ v0 . v1)
+unset 'a[@]'
+declare -p a # same behavior
+
+echo -----
+
+unset a
+shopt -s assoc_expand_once
+
+declare -A a=(@ v0 . v1)
+unset "a[$key]"			# $key is expanded
+declare -p a # Displays 'declare -A a=([.]="v1" )'
+
+declare -A a=(@ v0 . v1)
+unset 'a[@]'
+declare -p a # same behavior
diff --git a/tests/read.right b/tests/read.right
index b463825..e21fcb5 100644
--- a/tests/read.right
+++ b/tests/read.right
@@ -30,20 +30,26 @@ argv[1] = 
 argv[1] = 
 argv[1] = < foo>
 a = abcdefg
+xyz
 a = xyz
 a = -xyz 123-
 a = abc
 timeout 1: ok
-
+unset or null 1
 timeout 2: ok
-
-./read2.sub: line 23: read: -3: invalid timeout specification
+unset or null 2
+timeout 3: ok
+unset or null 3
+./read2.sub: line 45: read: -3: invalid timeout specification
 1
 
 abcde
-./read3.sub: line 4: read: -1: invalid number
+abcde
+./read3.sub: line 17: read: -1: invalid number
 abc
+defg
 ab
+abc
 #
 while read -u 3 var
 do
@@ -59,7 +65,21 @@ argv[1] = <>
 argv[2] = <>
 argv[3] = <>
 FOO
-       0       0       0
+0 0 0
 0
 0
 1
+timeout 1: ok
+unset or null 1
+timeout 2: ok
+unset or null 2
+timeout 3: ok
+unset or null 3
+timeout 4: ok
+abcde
+abcde
+
+one
+two three four
+one
+two three four
diff --git a/tests/read.tests b/tests/read.tests
index fe27dae..6132b6f 100644
--- a/tests/read.tests
+++ b/tests/read.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 echo " a " | (read x; echo "$x.")
 
 echo " a  b  " | ( read x y ; echo -"$x"-"$y"- )
@@ -25,43 +38,43 @@ echo $'\177' | ( read ; recho "$REPLY" )
 # the input stream
 echo $'ab\\\ncd' | ( read ; recho "$REPLY" )
 
-echo "A B " > /tmp/IN
+echo "A B " > $TMPDIR/IN
 unset x y z
-read x y z < /tmp/IN
+read x y z < $TMPDIR/IN
 echo 1: "x[$x] y[$y] z[$z]"
 echo 1a: ${z-z not set}
-read x < /tmp/IN
+read x < $TMPDIR/IN
 echo 2: "x[$x]"
-rm /tmp/IN
+rm $TMPDIR/IN
 
 # this is where the bash `read' behavior with respect to $REPLY differs
 # from ksh93
-echo "A B " > /tmp/IN
+echo "A B " > $TMPDIR/IN
 
-read < /tmp/IN
+read < $TMPDIR/IN
 echo "[$REPLY]"
 
-rm /tmp/IN
+rm $TMPDIR/IN
 
-echo " A B " > /tmp/IN
+echo " A B " > $TMPDIR/IN
 
-read < /tmp/IN
+read < $TMPDIR/IN
 echo "[$REPLY]"
 
-rm /tmp/IN
+rm $TMPDIR/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 aa > $TMPDIR/IN
+read avar bvar cvar < $TMPDIR/IN
 echo =="$avar"==
 echo =="$bvar"==
 echo =="$cvar"==
 
-rm /tmp/IN
+rm $TMPDIR/IN
 
 # test behavior of read with various settings of IFS
 
@@ -96,3 +109,9 @@ ${THIS_SH} ./read5.sub
 
 # test behavior of read -t 0
 ${THIS_SH} ./read6.sub
+
+# test behavior of readline timeouts
+${THIS_SH} ./read7.sub
+
+# test behavior of read -n and read -d on regular files
+${THIS_SH} ./read8.sub
diff --git a/tests/read1.sub b/tests/read1.sub
index 2a36449..cf00398 100644
--- a/tests/read1.sub
+++ b/tests/read1.sub
@@ -1,7 +1,21 @@
+#   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 .
+#
 a=7
 echo 'abcdefg|xyz' | {
 	read -d '|' a 
 	echo a = "${a-unset}"
+	cat -	# make sure we don't read too much
 }
 
 echo xyz 123 | {
diff --git a/tests/read2.sub b/tests/read2.sub
index c4a1f77..d353011 100644
--- a/tests/read2.sub
+++ b/tests/read2.sub
@@ -1,24 +1,46 @@
+#   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 .
+#
+: ${TMPDIR:=/var/tmp}
+
 a=4
 
-read -t 2 a < /dev/tty
+read -t 1 a < /dev/tty
 estat=$?
 if [ $estat -gt 128 ]; then
 	echo timeout 1: ok
 else
 	echo $estat
 fi
+echo ${a:-unset or null 1}
 
-echo $a
-
-sleep 5 | read -t 1 a
+read -t 0.000001 a < /dev/tty
 estat=$?
 if [ $estat -gt 128 ]; then
 	echo timeout 2: ok
 else
 	echo $estat
 fi
+echo ${a:-unset or null 2}
 
-echo $a
+sleep 1 | read -t 0.25 a
+estat=$?
+if [ $estat -gt 128 ]; then
+	echo timeout 3: ok
+else
+	echo $estat
+fi
+echo ${a:-unset or null 3}
 
 read -t -3 a < /dev/tty
 echo $?
@@ -27,6 +49,24 @@ echo $a
 
 # the above should all time out
 echo abcde | {
-	read -t 2 a
+	read -t 0.5 a
 	echo $a
 }
+
+read -t .0001 a << a.pipe
+rm -f a.pipe
+
+for c in {0..2000}; do
+  (eval "echo {0..$c}" & read -u 9 -t 0.0001) >/dev/null
+  printf $'ok %d' "$c" >/dev/null
+done
+
+cd $OLDPWD
+rm -f $TMPDIR/a.pipe		# paranoia
diff --git a/tests/read3.sub b/tests/read3.sub
index 22088cb..8a24040 100644
--- a/tests/read3.sub
+++ b/tests/read3.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # non-interactive
 
 # error
@@ -7,6 +20,7 @@ read -n -1
 echo abcdefg | {
 	read -n 3 xyz
 	echo $xyz
+	cat -	# make sure we don't read too much
 }
 
 # fewer chars than specified
@@ -15,5 +29,10 @@ echo ab | {
 	echo $xyz
 }
 
+echo abc | {
+	read -N 4 -d$'\n' foo
+	echo $foo
+}
+
 read -n 1 < $0
 echo "$REPLY"
diff --git a/tests/read5.sub b/tests/read5.sub
index 58b992d..e42a5be 100644
--- a/tests/read5.sub
+++ b/tests/read5.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 IFS=: read x y z << EOF
 :::
 EOF
@@ -32,5 +45,4 @@ else
 fi
 
 echo -n ${A[0]} | cat -vet
-echo -n ${A[0]} | wc
-
+echo -n ${A[0]} | wc | ( IFS=$' \t\n' ;  while read line; do echo $line; done; )
diff --git a/tests/read7.sub b/tests/read7.sub
new file mode 100644
index 0000000..553070f
--- /dev/null
+++ b/tests/read7.sub
@@ -0,0 +1,66 @@
+#   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 .
+#
+# test behavior of native readline timeouts
+
+# turn off bracketed paste to avoid spurious output
+bind 'set enable-bracketed-paste off' 2>/dev/null
+
+read -t 0.00001 -e var
+estat=$?
+if [ $estat -gt 128 ]; then
+	echo timeout 1: ok
+else
+	echo $estat
+fi
+echo ${var:-unset or null 1}
+
+read -e -t 0.1 var
+estat=$?
+if [ $estat -gt 128 ]; then
+	echo timeout 2: ok
+else
+	echo $estat
+fi
+echo ${var:-unset or null 2}
+
+read -e -t 1 var < /dev/tty
+estat=$?
+if [ $estat -gt 128 ]; then
+	echo timeout 3: ok
+else
+	echo $estat
+fi
+echo ${var:-unset or null 3}
+
+sleep 1 | read -t 0.25 -e a
+estat=$?
+if [ $estat -gt 128 ]; then
+	echo timeout 4: ok
+else
+	echo $estat
+fi
+
+# the above should all time out
+echo abcde | {
+	read -e -t 0.5 a
+	echo $a
+}
+
+read -e -t .0001 a << $tmpf
+
+# make sure we rewind the input properly when reading a specific number of
+# characters or using a non-standard delimiter from a regular file
+
+exec <$tmpf
+read -n 4 input && echo "$input"
+cat -
+
+exec <$tmpf
+read -d ' ' input && echo "$input"
+cat -
+
+rm -f $tmpf
diff --git a/tests/redir.right b/tests/redir.right
index f816c63..8db1041 100644
--- a/tests/redir.right
+++ b/tests/redir.right
@@ -1,9 +1,9 @@
 abc
-./redir.tests: line 15: /tmp/redir-test: cannot overwrite existing file
+./redir.tests: line 28: /tmp/redir-test: cannot overwrite existing file
 abc
 def
 def
-./redir.tests: line 31: $z: ambiguous redirect
+./redir.tests: line 44: $z: ambiguous redirect
 Point 1
 Point 2
 to a
@@ -24,12 +24,12 @@ 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:
+./redir4.sub: line 45: $fd: ambiguous redirect
+./redir4.sub: line 46: $fd: ambiguous redirect
+err-and-out:
 to stdout
 to stderr
-/tmp/err-and-out:
+err-and-out:
 to stdout
 to stderr
 0 -- 3 0
@@ -44,7 +44,20 @@ kl
 ab
 cd
 cd
-./redir.tests: line 154: redir1.*: No such file or directory
+./redir.tests: line 170: redir1.*: No such file or directory
+#   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 .
+#
 # tests of ksh93-like dup-and-close redirection operators
 exec 9<$0
 
@@ -64,14 +77,14 @@ f
 typeset -f f
 
 # make sure it was closed
-read -u 5 foo
+read -u 5 foo 2>&1 | grep -q 'invalid file descriptor'
 echo after read
 
 exec 5<&0
 
 exec <&-
 
-read abcde
+read abcde 2>&1 | grep -q 'read error'
 
 exec 0<&9-
 read line
@@ -84,10 +97,8 @@ f ()
         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
+# This program is free software: you can redistribute it and/or modify
 /
 /
 /
@@ -130,7 +141,7 @@ to stdout
 logfunc is a function
 logfunc () 
 { 
-    echo "$@" &>>$TMPDIR/log
+    echo "$@" &>> $TMPDIR/log
 }
 foo
 bix is a function
@@ -139,3 +150,14 @@ bix ()
     echo foo 2>&1 | cat
 }
 foo
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+1
+7
+after: 42
+./redir11.sub: line 53: $(ss= declare -i ss): ambiguous redirect
+after: 42
+a+=3
+foo
+foo
+./redir11.sub: line 75: 42: No such file or directory
+42
diff --git a/tests/redir.tests b/tests/redir.tests
index 37759b5..63bd4d3 100644
--- a/tests/redir.tests
+++ b/tests/redir.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 : ${TMPDIR:=/tmp}
 
 export LC_ALL=C
@@ -57,6 +70,9 @@ echo to c 1>&6
 cat $TMPDIR/bash-c
 echo "Point 5"
 
+# clean up before running scripts
+exec 4>&- 5>&- 6<&-
+
 rm -f $TMPDIR/bash-a $TMPDIR/bash-b $TMPDIR/bash-c
 
 #
@@ -187,3 +203,7 @@ exec 2>&9
 exec 9>&-
 
 ${THIS_SH} ./redir9.sub
+
+${THIS_SH} ./redir10.sub
+
+${THIS_SH} ./redir11.sub
diff --git a/tests/redir10.sub b/tests/redir10.sub
new file mode 100644
index 0000000..7b1d682
--- /dev/null
+++ b/tests/redir10.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+#
+# Out of file descriptors, because it forgets to close redirection.  Only
+# happens in a shell function.  Problem through bash-4.2.
+
+ulimit -n 128
+
+bug()
+{
+c=`ulimit -n`
+let c+=100
+while let c--
+do
+	while read -ru3 x
+	do
+		echo -n :
+	done 3< <(echo x)
+
+done
+}
+
+bug
+echo
+
+exit 0
diff --git a/tests/redir11.sub b/tests/redir11.sub
new file mode 100644
index 0000000..d417cdb
--- /dev/null
+++ b/tests/redir11.sub
@@ -0,0 +1,76 @@
+#   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 .
+#
+# make sure redirections do not have access to the temporary environment, even
+# in subshells and command substitutions
+
+a=1
+a=4 b=7 ss=4 echo $a
+
+# use grep to avoid differences due to different system error messages
+a=42
+a=2 echo foo 2>&1 >&$a | { grep -q '\$a: Bad file' || echo 'redir11 bad 1'; }
+a=2 echo foo 2>&1 >&$(echo $a) | { grep -q 'Bad file' || echo 'redir11 bad 2'; }
+
+foo()
+{
+	local -i a
+	local v=0 x=1
+	a+=3
+	echo $a
+}
+
+a=4 b=7 ss=4 declare -i ss
+a=4 b=7 foo
+echo after: $a
+
+unset a
+a=4 echo foo 2>&1 >&$(foo) | { grep -q 'Bad file' || echo 'redir11 bad 3'; }
+a=1 echo foo 2>&1 >&$(foo) | { grep -q 'Bad file' || echo 'redir11 bad 4'; }
+a=1 echo foo 2>&1 >&$(a=4 foo) | { grep -q 'Bad file' || echo 'redir11 bad 5'; }
+echo foo 2>&1 >&$(a=4 foo) | { grep -q 'Bad file' || echo 'redir11 bad 6'; }
+
+a=42
+a=2 echo foo 2>&1 >&$a | { grep -q 'Bad file' || echo 'redir11 bad 7'; }
+a=2 echo foo 2>&1 >&$(echo $a) | { grep -q 'Bad file' || echo 'redir11 bad 8'; }
+
+unset -f foo
+foo()
+{
+	local -i a
+	local v=0 x=1
+	a+=3
+	echo $a >&$(ss= declare -i ss)
+}
+
+a=4 b=7 foo
+echo after: $a
+
+unset a
+typeset -i a
+a=4 eval echo $(echo a+=3)
+a=2
+a=9 echo foo >&$(echo $a)
+a=2
+a=9 eval echo foo >&$(echo $a)
+a=2
+a=9 eval echo foo '2>&1 >&$(echo $a)' | { grep -q 'Bad file' || echo 'redir11 bad 9'; }
+
+# double expansion of filenames when used in redirection error messages
+# present in bash versions back to at least bash-1.13
+# this is executed in the tests subdirectory of the source directory, so there
+# definitely should not be a file named `42'
+
+unset foo
+: <$((foo+=42))
+echo $foo
diff --git a/tests/redir3.sub b/tests/redir3.sub
index c486253..b9fd0fd 100644
--- a/tests/redir3.sub
+++ b/tests/redir3.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 read line1
 
 echo read line1 \"$line1\"
diff --git a/tests/redir4.sub b/tests/redir4.sub
index 4734455..a482985 100644
--- a/tests/redir4.sub
+++ b/tests/redir4.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 minus=-
 
 # standard input
@@ -34,23 +47,23 @@ exec 4>&$fd
 
 exec 3>&1 4>&2
 
-exec >&/tmp/err-and-out
+exec >&${TMPDIR}/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
+echo err-and-out:
+cat ${TMPDIR}/err-and-out
 
-rm /tmp/err-and-out
+rm ${TMPDIR}/err-and-out
 
-fd=/tmp/err-and-out
+fd=${TMPDIR}/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
+echo err-and-out:
+cat ${TMPDIR}/err-and-out
 
-rm /tmp/err-and-out
+rm ${TMPDIR}/err-and-out
diff --git a/tests/redir5.sub b/tests/redir5.sub
index 5d59d39..fa0f0c0 100644
--- a/tests/redir5.sub
+++ b/tests/redir5.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # tests of ksh93-like dup-and-close redirection operators
 exec 9<$0
 
@@ -17,14 +30,14 @@ f
 typeset -f f
 
 # make sure it was closed
-read -u 5 foo
+read -u 5 foo 2>&1 | grep -q 'invalid file descriptor' 
 echo after read
 
 exec 5<&0
 
 exec <&-
 
-read abcde
+read abcde 2>&1 | grep -q 'read error'
 
 exec 0<&9-
 read line
diff --git a/tests/redir6.sub b/tests/redir6.sub
index 60cc68b..c735e52 100644
--- a/tests/redir6.sub
+++ b/tests/redir6.sub
@@ -6,3 +6,5 @@ pwd
 echo $?
 echo $?
 echo $?
+
+cd $OLDPWD
diff --git a/tests/redir7.sub b/tests/redir7.sub
index 3fd371c..65ca473 100644
--- a/tests/redir7.sub
+++ b/tests/redir7.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # weird redirections that caused trouble and were fixed in post-3.0 bash
 stuff()
 {
diff --git a/tests/redir8.sub b/tests/redir8.sub
index 5f972a1..d2d700c 100644
--- a/tests/redir8.sub
+++ b/tests/redir8.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 cd ${TMPDIR:=/var/tmp}
 rm -f u
 
@@ -56,4 +69,6 @@ exec 0<&7
 exec 7<&-
 
 rm -f infile
+
+cd $OLDPWD
 exit 0
diff --git a/tests/redir9.sub b/tests/redir9.sub
index 386ae56..9050a94 100644
--- a/tests/redir9.sub
+++ b/tests/redir9.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 : ${TMPDIR:=/tmp}
 
 func()
diff --git a/tests/rhs-exp.right b/tests/rhs-exp.right
index c5dca42..4ce6743 100644
--- a/tests/rhs-exp.right
+++ b/tests/rhs-exp.right
@@ -72,3 +72,34 @@ a?b
 ab
 a/b
 ab
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = 
+argv[1] = <>
+argv[1] = 
+argv[1] = <''>
+argv[1] = <>
+good 1
+good 2
+good 3
+good 4
+good 5
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
diff --git a/tests/rhs-exp.tests b/tests/rhs-exp.tests
index d457198..6abdd2a 100644
--- a/tests/rhs-exp.tests
+++ b/tests/rhs-exp.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 selvecs='&m68kcoff_vec'
 recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'}"
 recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'$selvecs\'}"
@@ -47,3 +60,5 @@ var="a?b" ; echo "${var//\?/}"
 
 var="a/b" ; echo "${var//\\//}"
 var="a/b" ; echo "${var//\//}"
+
+${THIS_SH} ./rhs-exp1.sub
diff --git a/tests/rhs-exp1.sub b/tests/rhs-exp1.sub
new file mode 100644
index 0000000..b194bf0
--- /dev/null
+++ b/tests/rhs-exp1.sub
@@ -0,0 +1,116 @@
+#   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 .
+#
+# fixes for bugs in bash-4.2 regarding empty strings in expand_string_for_rhs
+
+f=abc
+recho ${f##""a}
+recho ${f##"$v"a}
+
+recho ${f%%""c}
+recho ${f%%"$v"c}
+
+recho ${f//""a}
+recho ${f//"$v"a}
+
+recho ${f/""a""b/}
+recho ${f/""c/}
+recho ${f/"$v"c/}
+
+unset foo empty
+foo=aabbcc
+
+recho ${foo/bb/}
+recho ${foo/bb/$empty}
+
+recho ${foo/}
+recho ${empty/}
+
+recho ${foo/ }
+recho ${empty/ }
+unset foo empty
+
+S2=oenophile
+
+recho ${S2^"$v"[aeiou]}
+recho ${S2^^"$v"[aeiou]}
+
+recho ${foo:-""}
+recho ${foo:-""abc}
+
+recho "${foo:-''}"
+recho "${foo:-}"
+
+if [[ $var == "" ]]; then
+	echo good 1
+fi
+
+if [[ "$var"X == ""X ]]; then
+	echo good 2
+fi
+
+if [ "$var"X == ""X"" ]; then
+	echo good 3
+fi
+
+if [ X"" == X ]; then
+	echo good 4
+fi
+
+if [[ X"" == X ]]; then
+	echo good 5
+fi
+
+case x"" in
+  x) echo 'ok 1'
+     ;;
+  x??) echo 'this would be really odd'
+     ;;
+  x?) echo 'does this prove anything?'
+      echo x""x
+     ;;
+  *) echo 'no match'
+     ;;
+esac
+
+if [[ x"" == x ]]; then
+	echo ok 2
+fi
+
+if [[ x"" == x"" ]]; then
+	echo ok 3
+else
+	echo bad 3
+fi
+
+case x"" in
+x"")	echo ok 4 ;;
+*)	echo bad 4;;
+esac
+
+if [[ x"" == x"" ]]; then
+	echo ok 5
+else
+	echo bad 5
+fi
+
+case x"" in
+"x")	echo ok 6 ;;
+*)	echo bad 6;;
+esac
+
+case x"" in
+"x")	echo CTLNUL 7 ;;
+x)	echo ok 7 ;;
+*)	echo bad 7 ;;
+esac
diff --git a/tests/rsh.right b/tests/rsh.right
index 04c6971..5f64049 100644
--- a/tests/rsh.right
+++ b/tests/rsh.right
@@ -1,13 +1,19 @@
-./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
+./rsh1.sub: line 22: /bin/sh: restricted
+./rsh1.sub: line 24: sh: not found
+./rsh1.sub: line 25: a: command not found
+./rsh2.sub: line 23: hash: /bin/sh: restricted
+./rsh2.sub: line 25: hash: sh: not found
+./rsh2.sub: line 26: a: command not found
+./rsh.tests: line 25: cd: restricted
+./rsh.tests: line 26: PATH: readonly variable
+./rsh.tests: line 27: SHELL: readonly variable
+./rsh.tests: line 28: /bin/sh: restricted: cannot specify `/' in command names
+./rsh.tests: line 30: .: ./source.sub3: restricted
+./rsh.tests: line 33: /tmp/restricted: restricted: cannot redirect output
+./rsh.tests: line 37: /tmp/restricted: restricted: cannot redirect output
+./rsh.tests: line 42: command: -p: restricted
+./rsh.tests: line 44: set: +r: invalid option
+set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
+./rsh.tests: line 45: set: restricted: invalid option name
+./rsh.tests: line 47: exec: restricted
 ./rsh.tests: after exec
diff --git a/tests/rsh.tests b/tests/rsh.tests
index ffdf6e5..0d06fa1 100644
--- a/tests/rsh.tests
+++ b/tests/rsh.tests
@@ -1,9 +1,25 @@
+#   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 .
+#
 # test restricted shell mode -- these should all be errors
 #
 # things not tested for:
 #	adding builtins dynamically with enable -f
 #	importing function definitions from environment
 
+${THIS_SH} ./rsh1.sub
+${THIS_SH} ./rsh2.sub
+
 set -r
 
 cd /
diff --git a/tests/rsh1.sub b/tests/rsh1.sub
new file mode 100644
index 0000000..1539d74
--- /dev/null
+++ b/tests/rsh1.sub
@@ -0,0 +1,29 @@
+#   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 .
+#
+cd ${TMPDIR:-/tmp}
+cp /bin/sh .
+
+PATH=/rbin:/usr/local/rbin
+hash -p /bin/rm rm
+
+set -r
+
+BASH_CMDS[x]=/bin/sh
+
+BASH_CMDS[a]="sh"
+a -c 'echo hello'
+
+rm -f sh a
+
+exit 0
diff --git a/tests/rsh2.sub b/tests/rsh2.sub
new file mode 100644
index 0000000..7259dfb
--- /dev/null
+++ b/tests/rsh2.sub
@@ -0,0 +1,30 @@
+#   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 .
+#
+cd ${TMPDIR:-/tmp}
+cp /bin/sh .
+ln sh a
+
+PATH=/rbin:/usr/local/rbin
+hash -p /bin/rm rm
+
+set -r
+
+hash -p /bin/sh sh
+
+hash -p sh a
+a -c 'echo hello'
+
+rm -f sh a
+
+exit 0
diff --git a/tests/run-alias b/tests/run-alias
index 6a20b06..3b4f4dc 100644
--- a/tests/run-alias
+++ b/tests/run-alias
@@ -1,2 +1,2 @@
-${THIS_SH} ./alias.tests > /tmp/xx 2>&1
-diff /tmp/xx alias.right && rm -f /tmp/xx
+${THIS_SH} ./alias.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} alias.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-all b/tests/run-all
index d3f3a0e..1f74923 100644
--- a/tests/run-all
+++ b/tests/run-all
@@ -1,19 +1,54 @@
 #! /bin/sh
+#
+#   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 .
+#
+
+: ${TMPDIR:=/tmp}
+export TMPDIR
+
+# basic /bin/sh syntax
+SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'`
+
+BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX	# for now
+export BASH_TSTOUT
+
+trap 'rm -f $BASH_TSTOUT ; exit' 1 2 3 15
+trap 'rm -f $BASH_TSTOUT' 0
 
 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
+# can't reliably do it for SHELLOPTS; SHELLOPTS is readonly in bash
+if [ "${BASH_VERSION+set}" = "set" ]; then
+	export -n SHELLOPTS	# just make sure its not exported
+	set +o posix
+	typeset -p SHELLOPTS
+else
+	[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS 2>/dev/null
+fi
 
 : ${THIS_SH:=../bash}
 export THIS_SH
 
+: ${BUILD_DIR:=..}
+export BUILD_DIR
+
 ${THIS_SH} ./version
 
-rm -f /tmp/xx
+rm -f ${BASH_TSTOUT}
 
 echo Any output from any test, unless otherwise noted, indicates a possible anomaly
 
@@ -22,7 +57,7 @@ do
 	case $x in
 	$0|run-minimal|run-gprof)	;;
 	*.orig|*~) ;;
-	*)	echo $x ; sh $x ;;
+	*)	echo $x ; sh $x ; rm -f ${BASH_TSTOUT} ;;
 	esac
 done
 
diff --git a/tests/run-appendop b/tests/run-appendop
index c5bffbc..2d756f8 100644
--- a/tests/run-appendop
+++ b/tests/run-appendop
@@ -1,2 +1,2 @@
-${THIS_SH} ./appendop.tests > /tmp/xx 2>&1
-diff /tmp/xx appendop.right && rm -f /tmp/xx
+${THIS_SH} ./appendop.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} appendop.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-arith b/tests/run-arith
index f9f573c..0786b4f 100644
--- a/tests/run-arith
+++ b/tests/run-arith
@@ -1,2 +1,2 @@
-${THIS_SH} ./arith.tests > /tmp/xx 2>&1
-diff /tmp/xx arith.right && rm -f /tmp/xx
+${THIS_SH} ./arith.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} arith.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-arith-for b/tests/run-arith-for
index 1d13075..085715e 100644
--- a/tests/run-arith-for
+++ b/tests/run-arith-for
@@ -1,2 +1,2 @@
-${THIS_SH} ./arith-for.tests > /tmp/xx 2>&1
-diff /tmp/xx arith-for.right && rm -f /tmp/xx
+${THIS_SH} ./arith-for.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} arith-for.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-array b/tests/run-array
index 6fdbae4..6c5ec27 100644
--- a/tests/run-array
+++ b/tests/run-array
@@ -2,5 +2,5 @@ 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
+${THIS_SH} ./array.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} array.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-array2 b/tests/run-array2
index dd94ec8..54852ec 100644
--- a/tests/run-array2
+++ b/tests/run-array2
@@ -1,4 +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
+${THIS_SH} ./array-at-star > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} array2.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-assoc b/tests/run-assoc
index 18c3a9c..7fef234 100644
--- a/tests/run-assoc
+++ b/tests/run-assoc
@@ -1,4 +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
+${THIS_SH} ./assoc.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} assoc.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-attr b/tests/run-attr
new file mode 100644
index 0000000..948b9e1
--- /dev/null
+++ b/tests/run-attr
@@ -0,0 +1,2 @@
+${THIS_SH} ./attr.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} attr.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-braces b/tests/run-braces
index 53d4f1b..554e218 100644
--- a/tests/run-braces
+++ b/tests/run-braces
@@ -1,2 +1,2 @@
-${THIS_SH} ./braces.tests > /tmp/xx
-diff /tmp/xx braces.right && rm -f /tmp/xx
+${THIS_SH} ./braces.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} braces.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-builtins b/tests/run-builtins
index db88c8c..69644f2 100644
--- a/tests/run-builtins
+++ b/tests/run-builtins
@@ -2,5 +2,5 @@ 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
+${THIS_SH} ./builtins.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} builtins.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-case b/tests/run-case
index 71d9b83..1560ee2 100644
--- a/tests/run-case
+++ b/tests/run-case
@@ -1,2 +1,2 @@
-${THIS_SH} ./case.tests > /tmp/xx 2>&1
-diff /tmp/xx case.right && rm -f /tmp/xx
+${THIS_SH} ./case.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} case.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-casemod b/tests/run-casemod
index 83c1b5a..9b58764 100644
--- a/tests/run-casemod
+++ b/tests/run-casemod
@@ -1,2 +1,2 @@
-${THIS_SH} ./casemod.tests > /tmp/xx 2>&1
-diff /tmp/xx casemod.right && rm -f /tmp/xx
+${THIS_SH} ./casemod.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} casemod.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-complete b/tests/run-complete
new file mode 100644
index 0000000..f1cef84
--- /dev/null
+++ b/tests/run-complete
@@ -0,0 +1,2 @@
+${THIS_SH} ./complete.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} complete.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-comsub b/tests/run-comsub
index 0bbcad5..4c3d1cf 100644
--- a/tests/run-comsub
+++ b/tests/run-comsub
@@ -1,2 +1,2 @@
-${THIS_SH} ./comsub.tests > /tmp/xx 2>&1
-diff /tmp/xx comsub.right && rm -f /tmp/xx
+${THIS_SH} ./comsub.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} comsub.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-comsub-eof b/tests/run-comsub-eof
index 5c006be..0733b2d 100644
--- a/tests/run-comsub-eof
+++ b/tests/run-comsub-eof
@@ -1,2 +1,2 @@
-${THIS_SH} ./comsub-eof.tests > /tmp/xx 2>&1
-diff /tmp/xx comsub-eof.right && rm -f /tmp/xx
+${THIS_SH} ./comsub-eof.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} comsub-eof.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-comsub-posix b/tests/run-comsub-posix
index 38bf8ee..520cb44 100644
--- a/tests/run-comsub-posix
+++ b/tests/run-comsub-posix
@@ -1,2 +1,2 @@
-${THIS_SH} ./comsub-posix.tests > /tmp/xx 2>&1
-diff /tmp/xx comsub-posix.right && rm -f /tmp/xx
+${THIS_SH} ./comsub-posix.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} comsub-posix.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-cond b/tests/run-cond
index 6b119a6..603e739 100644
--- a/tests/run-cond
+++ b/tests/run-cond
@@ -3,5 +3,5 @@ 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
+${THIS_SH} ./cond.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} cond.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-coproc b/tests/run-coproc
index ce62474..02c5c92 100644
--- a/tests/run-coproc
+++ b/tests/run-coproc
@@ -1,4 +1,2 @@
-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
+${THIS_SH} ./coproc.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} coproc.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-cprint b/tests/run-cprint
index 5f202e4..82d2c2a 100644
--- a/tests/run-cprint
+++ b/tests/run-cprint
@@ -1,2 +1,2 @@
-${THIS_SH} ./cprint.tests > /tmp/xx 2>&1
-diff /tmp/xx cprint.right && rm -f /tmp/xx
+${THIS_SH} ./cprint.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} cprint.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-dbg-support b/tests/run-dbg-support
old mode 100755
new mode 100644
index 9e9c649..af64517
--- a/tests/run-dbg-support
+++ b/tests/run-dbg-support
@@ -1,5 +1,3 @@
-#!../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"
diff --git a/tests/run-dbg-support2 b/tests/run-dbg-support2
old mode 100755
new mode 100644
index f62583f..375c32f
--- a/tests/run-dbg-support2
+++ b/tests/run-dbg-support2
@@ -1,5 +1,3 @@
-#!../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"
@@ -9,8 +7,3 @@ 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
index 6390d1b..e6b42d4 100644
--- a/tests/run-dirstack
+++ b/tests/run-dirstack
@@ -1,5 +1,5 @@
-${THIS_SH} ./dstack.tests > /tmp/xx 2>&1
-diff /tmp/xx dstack.right && rm -f /tmp/xx
+${THIS_SH} ./dstack.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} dstack.right && rm -f ${BASH_TSTOUT}
 
-${THIS_SH} ./dstack2.tests > /tmp/xx 2>&1
-diff /tmp/xx dstack2.right && rm -f /tmp/xx
+${THIS_SH} ./dstack2.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} dstack2.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-dollars b/tests/run-dollars
index 0ced414..dc5d623 100644
--- a/tests/run-dollars
+++ b/tests/run-dollars
@@ -1,2 +1,2 @@
-${THIS_SH} ./dollar-at-star > /tmp/xx 2>&1
-diff /tmp/xx dollar.right && rm -f /tmp/xx
+${THIS_SH} ./dollar-at-star > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} dollar.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-dynvar b/tests/run-dynvar
new file mode 100644
index 0000000..26c5434
--- /dev/null
+++ b/tests/run-dynvar
@@ -0,0 +1,2 @@
+${THIS_SH} ./dynvar.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} dynvar.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-errors b/tests/run-errors
index 6be4e0c..29417cd 100644
--- a/tests/run-errors
+++ b/tests/run-errors
@@ -1,2 +1,3 @@
-${THIS_SH} ./errors.tests > /tmp/xx 2>&1
-diff /tmp/xx errors.right && rm -f /tmp/xx
+unset OLDPWD	# make sure shell doesn't inherit OLDPWD
+${THIS_SH} ./errors.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} errors.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-execscript b/tests/run-execscript
index f97ab21..c3ed53e 100644
--- a/tests/run-execscript
+++ b/tests/run-execscript
@@ -1,9 +1,26 @@
+#   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 .
+#
+
 echo "warning: the text of a system error message may vary between systems and" >&2
 echo "warning: produce diff output." >&2
+echo "warning: UNIX versions number signals 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
 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
+${THIS_SH} ./execscript > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} exec.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-exp-tests b/tests/run-exp-tests
index cbabace..78cf754 100644
--- a/tests/run-exp-tests
+++ b/tests/run-exp-tests
@@ -1,2 +1,2 @@
-${THIS_SH} ./exp.tests | grep -v '^expect' > /tmp/xx
-diff /tmp/xx exp.right && rm -f /tmp/xx
+${THIS_SH} ./exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} exp.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-exportfunc b/tests/run-exportfunc
new file mode 100644
index 0000000..7b207fa
--- /dev/null
+++ b/tests/run-exportfunc
@@ -0,0 +1,2 @@
+${THIS_SH} ./exportfunc.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} exportfunc.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-extglob b/tests/run-extglob
index 06316ad..149e34a 100644
--- a/tests/run-extglob
+++ b/tests/run-extglob
@@ -1,4 +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
+${THIS_SH} ./extglob.tests | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} extglob.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-extglob2 b/tests/run-extglob2
index 0a6f728..71d3d80 100644
--- a/tests/run-extglob2
+++ b/tests/run-extglob2
@@ -1,4 +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
+${THIS_SH} ./extglob2.tests | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} extglob2.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-extglob3 b/tests/run-extglob3
index 2675196..6ebd674 100644
--- a/tests/run-extglob3
+++ b/tests/run-extglob3
@@ -1,4 +1,4 @@
 PATH=$PATH:`pwd`
 export PATH
-${THIS_SH} ./extglob3.tests > /tmp/xx
-diff /tmp/xx extglob3.right && rm -f /tmp/xx
+${THIS_SH} ./extglob3.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} extglob3.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-func b/tests/run-func
index f449eb8..a804364 100644
--- a/tests/run-func
+++ b/tests/run-func
@@ -1,5 +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
+${THIS_SH} ./func.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} func.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-getopts b/tests/run-getopts
index 1e8b5fb..4cfc592 100644
--- a/tests/run-getopts
+++ b/tests/run-getopts
@@ -1,2 +1,2 @@
-${THIS_SH} ./getopts.tests > /tmp/xx 2>&1
-diff /tmp/xx getopts.right && rm -f /tmp/xx
+${THIS_SH} ./getopts.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} getopts.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-glob-test b/tests/run-glob-test
index 7a12343..246501c 100644
--- a/tests/run-glob-test
+++ b/tests/run-glob-test
@@ -1,4 +1,7 @@
 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 -a glob.right glob.right >/dev/null 2>&1 ) && AFLAG=-a
+
+${THIS_SH} ./glob.tests > ${BASH_TSTOUT} 2>&1
+diff ${AFLAG} ${BASH_TSTOUT} glob.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-globstar b/tests/run-globstar
index d12cce9..3aa01ed 100644
--- a/tests/run-globstar
+++ b/tests/run-globstar
@@ -1,4 +1,4 @@
 PATH=$PATH:`pwd`
 export PATH
-${THIS_SH} ./globstar.tests  > /tmp/xx 2>&1
-diff /tmp/xx globstar.right && rm -f /tmp/xx
+${THIS_SH} ./globstar.tests  > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} globstar.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-heredoc b/tests/run-heredoc
index c4e3168..b655c4f 100644
--- a/tests/run-heredoc
+++ b/tests/run-heredoc
@@ -1,2 +1,6 @@
-${THIS_SH} ./heredoc.tests > /tmp/xx 2>&1
-diff /tmp/xx heredoc.right && rm -f /tmp/xx
+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} ./heredoc.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} heredoc.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-herestr b/tests/run-herestr
index 8c5b36d..d6def9c 100644
--- a/tests/run-herestr
+++ b/tests/run-herestr
@@ -1,2 +1,2 @@
-${THIS_SH} ./herestr.tests > /tmp/xx 2>&1
-diff /tmp/xx herestr.right && rm -f /tmp/xx
+${THIS_SH} ./herestr.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} herestr.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-histexpand b/tests/run-histexpand
index 06a415b..a0fc331 100644
--- a/tests/run-histexpand
+++ b/tests/run-histexpand
@@ -1,4 +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
+${THIS_SH} ./histexp.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} histexp.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-history b/tests/run-history
index ea356b1..f4fa466 100644
--- a/tests/run-history
+++ b/tests/run-history
@@ -1,4 +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
+${THIS_SH} ./history.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} history.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-ifs b/tests/run-ifs
index 3f9d820..394d998 100644
--- a/tests/run-ifs
+++ b/tests/run-ifs
@@ -1,2 +1,2 @@
-${THIS_SH} ./ifs.tests > /tmp/xx 2>&1
-diff /tmp/xx ifs.right && rm -f /tmp/xx
+${THIS_SH} ./ifs.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} ifs.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-ifs-posix b/tests/run-ifs-posix
index e578e8d..895c2e2 100644
--- a/tests/run-ifs-posix
+++ b/tests/run-ifs-posix
@@ -1,2 +1,2 @@
-${THIS_SH} ./ifs-posix.tests > /tmp/xx 2>&1
-diff /tmp/xx ifs-posix.right && rm -f /tmp/xx
+${THIS_SH} ./ifs-posix.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} ifs-posix.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-input-test b/tests/run-input-test
index aaa5d35..412587c 100644
--- a/tests/run-input-test
+++ b/tests/run-input-test
@@ -1,2 +1,2 @@
-${THIS_SH} < ./input-line.sh > /tmp/xx
-diff /tmp/xx input.right && rm -f /tmp/xx
+${THIS_SH} < ./input-line.sh > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} input.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-intl b/tests/run-intl
index 6a9234a..8234f28 100644
--- a/tests/run-intl
+++ b/tests/run-intl
@@ -1,8 +1,5 @@
 # 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
+${THIS_SH} ./intl.tests > ${BASH_TSTOUT}
+diff $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-invert b/tests/run-invert
index 4949307..b2bd06e 100644
--- a/tests/run-invert
+++ b/tests/run-invert
@@ -1,2 +1,2 @@
-${THIS_SH} ./invert.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx invert.right && rm -f /tmp/xx
+${THIS_SH} ./invert.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} invert.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-iquote b/tests/run-iquote
index 61a8aa7..4fca94a 100644
--- a/tests/run-iquote
+++ b/tests/run-iquote
@@ -1,2 +1,2 @@
-${THIS_SH} ./iquote.tests >/tmp/xx 2>&1
-diff /tmp/xx iquote.right && rm -f /tmp/xx
+${THIS_SH} ./iquote.tests >${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} iquote.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-jobs b/tests/run-jobs
index bfd4fa0..8429b0d 100644
--- a/tests/run-jobs
+++ b/tests/run-jobs
@@ -3,5 +3,5 @@ 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
+${THIS_SH} ./jobs.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} jobs.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-lastpipe b/tests/run-lastpipe
new file mode 100644
index 0000000..2edf5c4
--- /dev/null
+++ b/tests/run-lastpipe
@@ -0,0 +1,2 @@
+${THIS_SH} ./lastpipe.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} lastpipe.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-mapfile b/tests/run-mapfile
index a207f09..e5d1b38 100644
--- a/tests/run-mapfile
+++ b/tests/run-mapfile
@@ -1,2 +1,2 @@
-${THIS_SH} ./mapfile.tests > /tmp/xx 2>&1
-diff /tmp/xx mapfile.right && rm -f /tmp/xx
+${THIS_SH} ./mapfile.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} mapfile.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-minimal b/tests/run-minimal
index 0054cda..0c3a2e5 100644
--- a/tests/run-minimal
+++ b/tests/run-minimal
@@ -1,8 +1,34 @@
 #! /bin/sh
 #
+#   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 .
+#
+#
 # run-minimal - a version of run-all for shells configured with
 #		--enable-minimal-config
 #
+
+: ${TMPDIR:=/tmp}
+export TMPDIR
+
+# basic /bin/sh syntax
+SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'`
+
+BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX	# for now
+export BASH_TSTOUT
+
+trap 'rm -f $BASH_TSTOUT' 0
+
 PATH=.:$PATH	# just to get the right version of printenv
 export PATH
 
@@ -14,9 +40,12 @@ export PATH
 : ${THIS_SH:=../bash}
 export THIS_SH
 
+: ${BUILD_DIR:=..}
+export BUILD_DIR
+
 ${THIS_SH} ./version.mini
 
-rm -f /tmp/xx
+rm -f "$BASH_TSTOUT"
 
 echo Testing ${THIS_SH}
 echo Any output from any test, unless otherwise noted, indicates a possible anomaly
@@ -27,10 +56,13 @@ do
 	*.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-ifs-posix|run-posix2|run-posixpat|run-posixpipe) echo $x ; sh $x ;;
 	run-precedence|run-quote|run-read|run-rhs-exp|run-strip|run-tilde) echo $x ; sh $x ;;
+	run-dynvar|run-iquote) echo $x ; sh $x ;;
+	run-type|run-comsub-eof|run-comsub-posix) echo $x ; sh $x ;;
 	*)	;;
 	esac
+	rm -f "$BASH_TSTOUT"
 done
 
 exit 0
diff --git a/tests/run-more-exp b/tests/run-more-exp
index 60f55cb..0424a2f 100644
--- a/tests/run-more-exp
+++ b/tests/run-more-exp
@@ -1,2 +1,2 @@
-${THIS_SH} ./more-exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx more-exp.right && rm -f /tmp/xx
+${THIS_SH} ./more-exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} more-exp.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-nameref b/tests/run-nameref
new file mode 100644
index 0000000..b73e1b8
--- /dev/null
+++ b/tests/run-nameref
@@ -0,0 +1,4 @@
+echo "warning: some of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell" >&2
+${THIS_SH} ./nameref.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} nameref.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-new-exp b/tests/run-new-exp
index 2e3d7c9..8777c7b 100644
--- a/tests/run-new-exp
+++ b/tests/run-new-exp
@@ -6,5 +6,5 @@ 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
+${THIS_SH} ./new-exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} new-exp.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-nquote b/tests/run-nquote
index 006872c..03954b8 100644
--- a/tests/run-nquote
+++ b/tests/run-nquote
@@ -1,2 +1,2 @@
-${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote.right && rm -f /tmp/xx
+${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} nquote.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-nquote1 b/tests/run-nquote1
index a71740f..bd9e939 100644
--- a/tests/run-nquote1
+++ b/tests/run-nquote1
@@ -1,4 +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
+${THIS_SH} ./nquote1.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} nquote1.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-nquote2 b/tests/run-nquote2
index 80d1a8d..4648d3e 100644
--- a/tests/run-nquote2
+++ b/tests/run-nquote2
@@ -1,4 +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
+${THIS_SH} ./nquote2.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} nquote2.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-nquote3 b/tests/run-nquote3
index 45ba5f7..4a3e32a 100644
--- a/tests/run-nquote3
+++ b/tests/run-nquote3
@@ -1,4 +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
+${THIS_SH} ./nquote3.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} nquote3.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-nquote4 b/tests/run-nquote4
index 493f4aa..985c311 100644
--- a/tests/run-nquote4
+++ b/tests/run-nquote4
@@ -1,4 +1,8 @@
+# See whether or not we can use `diff -a'
+( diff -a ./nquote4.right ./nquote4.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
-${THIS_SH} ./nquote4.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote4.right && rm -f /tmp/xx
+
+${THIS_SH} ./nquote4.tests > ${BASH_TSTOUT} 2>&1
+diff ${AFLAG} ${BASH_TSTOUT} nquote4.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-nquote5 b/tests/run-nquote5
index 14cef64..1d4c4aa 100644
--- a/tests/run-nquote5
+++ b/tests/run-nquote5
@@ -1,2 +1,2 @@
-${THIS_SH} ./nquote5.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx nquote5.right && rm -f /tmp/xx
+${THIS_SH} ./nquote5.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} nquote5.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-parser b/tests/run-parser
new file mode 100644
index 0000000..ea1ec49
--- /dev/null
+++ b/tests/run-parser
@@ -0,0 +1,2 @@
+${THIS_SH} ./parser.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} parser.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-posix2 b/tests/run-posix2
index 52eea2f..cfa9571 100644
--- a/tests/run-posix2
+++ b/tests/run-posix2
@@ -1,2 +1,2 @@
-${THIS_SH} ./posix2.tests 2>&1 | grep -v '^expect' > /tmp/xx
-diff /tmp/xx posix2.right && rm -f /tmp/xx
+${THIS_SH} ./posix2.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} posix2.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-posixexp b/tests/run-posixexp
new file mode 100644
index 0000000..827b0e4
--- /dev/null
+++ b/tests/run-posixexp
@@ -0,0 +1,2 @@
+${THIS_SH} ./posixexp.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} posixexp.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-posixexp2 b/tests/run-posixexp2
new file mode 100644
index 0000000..1e6b2d9
--- /dev/null
+++ b/tests/run-posixexp2
@@ -0,0 +1,2 @@
+${THIS_SH} ./posixexp2.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} posixexp2.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-posixpat b/tests/run-posixpat
index ef2b140..8937948 100644
--- a/tests/run-posixpat
+++ b/tests/run-posixpat
@@ -1,2 +1,2 @@
-${THIS_SH} ./posixpat.tests > /tmp/xx
-diff /tmp/xx posixpat.right && rm -f /tmp/xx
+${THIS_SH} ./posixpat.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} posixpat.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-posixpipe b/tests/run-posixpipe
new file mode 100644
index 0000000..5f099e2
--- /dev/null
+++ b/tests/run-posixpipe
@@ -0,0 +1,2 @@
+${THIS_SH} ./posixpipe.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} posixpipe.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-precedence b/tests/run-precedence
index d81a868..06ac343 100644
--- a/tests/run-precedence
+++ b/tests/run-precedence
@@ -1,2 +1,2 @@
-${THIS_SH} ./precedence > /tmp/xx
-diff /tmp/xx prec.right && rm -f /tmp/xx
+${THIS_SH} ./precedence.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} prec.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-printf b/tests/run-printf
index 4555c62..e242787 100644
--- a/tests/run-printf
+++ b/tests/run-printf
@@ -1,5 +1,7 @@
 # See whether or not we can use `diff -a'
-( diff -a ./printf.tests ./printf.tests >/dev/null 2>&1 ) && AFLAG=-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
+# use cat -v (and assume it's there) to make control chars visible
+${THIS_SH} ./printf.tests 2>&1 | cat -v > ${BASH_TSTOUT} 
+#diff $AFLAG ${BASH_TSTOUT} printf.right && rm -f ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} printf.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-procsub b/tests/run-procsub
new file mode 100644
index 0000000..796faaa
--- /dev/null
+++ b/tests/run-procsub
@@ -0,0 +1,7 @@
+echo "warning: all of these tests will fail if process substitution has not" >&2
+echo "warning: been compiled into the shell or if the OS does not provide" >&2
+echo "warning: FIFOs or /dev/fd. Some tests may fail if the OS does not" >&2
+echo "warning: provide FIFOs." >&2
+
+${THIS_SH} ./procsub.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} procsub.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-quote b/tests/run-quote
index 6905042..2543666 100644
--- a/tests/run-quote
+++ b/tests/run-quote
@@ -1,2 +1,2 @@
-${THIS_SH} ./quote.tests >/tmp/xx 2>&1
-diff /tmp/xx quote.right && rm -f /tmp/xx
+${THIS_SH} ./quote.tests >${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} quote.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-quotearray b/tests/run-quotearray
new file mode 100644
index 0000000..06e5e6e
--- /dev/null
+++ b/tests/run-quotearray
@@ -0,0 +1,2 @@
+${THIS_SH} ./quotearray.tests >${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} quotearray.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-read b/tests/run-read
index 47e4188..5ec07e2 100644
--- a/tests/run-read
+++ b/tests/run-read
@@ -1,4 +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
+${THIS_SH} ./read.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-redir b/tests/run-redir
index 2be45dd..071af6e 100644
--- a/tests/run-redir
+++ b/tests/run-redir
@@ -3,5 +3,5 @@ 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
+${THIS_SH} ./redir.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} redir.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-rhs-exp b/tests/run-rhs-exp
index 1f89d0b..de8ae0e 100644
--- a/tests/run-rhs-exp
+++ b/tests/run-rhs-exp
@@ -1,2 +1,2 @@
-${THIS_SH} ./rhs-exp.tests 2>&1 > /tmp/xx
-diff /tmp/xx rhs-exp.right && rm -f /tmp/xx
+${THIS_SH} ./rhs-exp.tests 2>&1 > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} rhs-exp.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-rsh b/tests/run-rsh
index ef23583..6770699 100644
--- a/tests/run-rsh
+++ b/tests/run-rsh
@@ -1,2 +1,2 @@
-${THIS_SH} ./rsh.tests > /tmp/xx 2>&1
-diff /tmp/xx rsh.right && rm -f /tmp/xx
+${THIS_SH} ./rsh.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} rsh.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-set-e b/tests/run-set-e
index 3389f11..eed17fa 100644
--- a/tests/run-set-e
+++ b/tests/run-set-e
@@ -1,2 +1,2 @@
-${THIS_SH} ./set-e.tests > /tmp/xx
-diff /tmp/xx set-e.right && rm -f /tmp/xx
+${THIS_SH} ./set-e.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} set-e.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-set-x b/tests/run-set-x
old mode 100755
new mode 100644
diff --git a/tests/run-shopt b/tests/run-shopt
index 100a3de..02c43e7 100644
--- a/tests/run-shopt
+++ b/tests/run-shopt
@@ -1,2 +1,2 @@
-${THIS_SH} ./shopt.tests > /tmp/xx 2>&1
-diff /tmp/xx shopt.right && rm -f /tmp/xx
+${THIS_SH} ./shopt.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} shopt.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-strip b/tests/run-strip
index 0d32115..46a9da9 100644
--- a/tests/run-strip
+++ b/tests/run-strip
@@ -1,2 +1,2 @@
-${THIS_SH} ./strip.tests > /tmp/xx
-diff /tmp/xx strip.right && rm -f /tmp/xx
+${THIS_SH} ./strip.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} strip.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-test b/tests/run-test
index b2482c3..d68791c 100644
--- a/tests/run-test
+++ b/tests/run-test
@@ -1,4 +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
+${THIS_SH} ./test.tests >${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} test.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-tilde b/tests/run-tilde
index b8569c1..9460225 100644
--- a/tests/run-tilde
+++ b/tests/run-tilde
@@ -1,2 +1,2 @@
-${THIS_SH} ./tilde.tests > /tmp/xx
-diff /tmp/xx tilde.right && rm -f /tmp/xx
+${THIS_SH} ./tilde.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} tilde.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-tilde2 b/tests/run-tilde2
index 4446989..fa7e7d6 100644
--- a/tests/run-tilde2
+++ b/tests/run-tilde2
@@ -1,2 +1,2 @@
-${THIS_SH} ./tilde2.tests > /tmp/xx
-diff /tmp/xx tilde2.right && rm -f /tmp/xx
+${THIS_SH} ./tilde2.tests > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} tilde2.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-trap b/tests/run-trap
index 14f6874..e3331ed 100644
--- a/tests/run-trap
+++ b/tests/run-trap
@@ -2,5 +2,5 @@ echo "warning: UNIX versions number signals and schedule processes differently."
 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
+${THIS_SH} ./trap.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} trap.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-type b/tests/run-type
index 4d195b0..499cb4e 100644
--- a/tests/run-type
+++ b/tests/run-type
@@ -1,2 +1,2 @@
-${THIS_SH} ./type.tests > /tmp/xx 2>&1
-diff /tmp/xx type.right && rm -f /tmp/xx
+${THIS_SH} ./type.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} type.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-varenv b/tests/run-varenv
index f0ce195..be394cc 100644
--- a/tests/run-varenv
+++ b/tests/run-varenv
@@ -1,2 +1,4 @@
-${THIS_SH} ./varenv.sh | grep -v '^expect' > /tmp/xx
-diff /tmp/xx varenv.right && rm -f /tmp/xx
+echo "warning: some of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell" >&2
+${THIS_SH} ./varenv.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
+diff ${BASH_TSTOUT} varenv.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/run-vredir b/tests/run-vredir
index 9a96377..2bdc1b8 100644
--- a/tests/run-vredir
+++ b/tests/run-vredir
@@ -1,2 +1,4 @@
-${THIS_SH} ./vredir.tests > /tmp/xx 2>&1
-diff /tmp/xx vredir.right && rm -f /tmp/xx
+echo "warning: the text of a system error message may vary between systems and" >&2
+echo "warning: produce diff output." >&2
+${THIS_SH} ./vredir.tests > ${BASH_TSTOUT} 2>&1
+diff ${BASH_TSTOUT} vredir.right && rm -f ${BASH_TSTOUT}
diff --git a/tests/set-e.right b/tests/set-e.right
index 85a5986..e2a9f2c 100644
--- a/tests/set-e.right
+++ b/tests/set-e.right
@@ -65,3 +65,8 @@ after failure 3
 true || false no exit
 false || true no exit
 false && false no exit
+A:
+B:
+ehB
+C:
+D:
diff --git a/tests/set-e.tests b/tests/set-e.tests
index 8c0cfcf..3e0d669 100644
--- a/tests/set-e.tests
+++ b/tests/set-e.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 if : ; then
 	set -e
 	N=95
@@ -108,3 +121,4 @@ set +e
 
 ${THIS_SH} ./set-e1.sub
 ${THIS_SH} ./set-e2.sub
+${THIS_SH} ./set-e3.sub
diff --git a/tests/set-e1.sub b/tests/set-e1.sub
index a800560..cdd4d63 100644
--- a/tests/set-e1.sub
+++ b/tests/set-e1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # subshell failure should cause the shell to exit silently
 ${THIS_SH} -ce '(exit 17) ; echo "after (exit 17): $?"'
 
diff --git a/tests/set-e3.sub b/tests/set-e3.sub
new file mode 100644
index 0000000..db176b1
--- /dev/null
+++ b/tests/set-e3.sub
@@ -0,0 +1,10 @@
+foo()
+{
+	echo A:
+	. ./set-e3a.sub
+	echo D:
+}
+
+# should run all the way through; foo being called in a context where set -e
+# is ignored means that that condition persists through sourcing the file
+foo && true
diff --git a/tests/set-e3a.sub b/tests/set-e3a.sub
new file mode 100644
index 0000000..5d008e7
--- /dev/null
+++ b/tests/set-e3a.sub
@@ -0,0 +1,7 @@
+echo B:
+
+set -e
+echo $-
+false
+
+echo C:
diff --git a/tests/set-x.right b/tests/set-x.right
index a41a382..259602e 100644
--- a/tests/set-x.right
+++ b/tests/set-x.right
@@ -26,6 +26,10 @@
 + x=i
 + case x in
 + x=i
++ foo=one
++ foo+=two
++ echo onetwo
+onetwo
 + set +x
 1
 2
diff --git a/tests/set-x.tests b/tests/set-x.tests
old mode 100755
new mode 100644
index 648f0a9..3723552
--- a/tests/set-x.tests
+++ b/tests/set-x.tests
@@ -1,4 +1,17 @@
-#!../bash
+#   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 .
+#
+
 # $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.
@@ -14,6 +27,11 @@ case x in
  0) x=i ;;
  *) x=i ;;
 esac
+
+foo=one
+foo+=two
+echo $foo
+
 set +x
 
 # test BASH_XTRACEFD
diff --git a/tests/set-x1.sub b/tests/set-x1.sub
index b2aa216..cb7fa82 100644
--- a/tests/set-x1.sub
+++ b/tests/set-x1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 : ${TMPDIR:=/var/tmp}
 TRACEFILE=$TMPDIR/bash-trace-$$
 trap 'rm -f $TRACEFILE' 0 1 2 3 6 15
diff --git a/tests/shopt.right b/tests/shopt.right
index 7bacc0e..d617c1d 100644
--- a/tests/shopt.right
+++ b/tests/shopt.right
@@ -1,7 +1,8 @@
-./shopt.tests: line 2: shopt: -z: invalid option
+./shopt.tests: line 15: shopt: -z: invalid option
 shopt: usage: shopt [-pqsu] [-o] [optname ...]
 --
 shopt -u autocd
+shopt -u assoc_expand_once
 shopt -u cdable_vars
 shopt -s cdspell
 shopt -u checkhash
@@ -11,6 +12,12 @@ shopt -s cmdhist
 shopt -u compat31
 shopt -u compat32
 shopt -u compat40
+shopt -u compat41
+shopt -u compat42
+shopt -u compat43
+shopt -u compat44
+shopt -s complete_fullquote
+shopt -u direxpand
 shopt -u dirspell
 shopt -u dotglob
 shopt -u execfail
@@ -20,6 +27,8 @@ shopt -u extglob
 shopt -s extquote
 shopt -u failglob
 shopt -s force_fignore
+shopt -s globasciiranges
+shopt -s globskipdots
 shopt -u globstar
 shopt -u gnu_errfmt
 shopt -u histappend
@@ -27,19 +36,27 @@ shopt -u histreedit
 shopt -u histverify
 shopt -s hostcomplete
 shopt -u huponexit
+shopt -u inherit_errexit
 shopt -s interactive_comments
+shopt -u lastpipe
 shopt -u lithist
+shopt -u localvar_inherit
+shopt -u localvar_unset
 shopt -u login_shell
 shopt -u mailwarn
 shopt -u no_empty_cmd_completion
 shopt -u nocaseglob
 shopt -u nocasematch
+shopt -u noexpand_translation
 shopt -u nullglob
+shopt -s patsub_replacement
 shopt -s progcomp
+shopt -u progcomp_alias
 shopt -s promptvars
 shopt -u restricted_shell
 shopt -u shift_verbose
 shopt -s sourcepath
+shopt -u varredir_close
 shopt -u xpg_echo
 --
 shopt -u huponexit
@@ -48,16 +65,21 @@ shopt -s sourcepath
 --
 shopt -s cdspell
 shopt -s cmdhist
+shopt -s complete_fullquote
 shopt -s expand_aliases
 shopt -s extquote
 shopt -s force_fignore
+shopt -s globasciiranges
+shopt -s globskipdots
 shopt -s hostcomplete
 shopt -s interactive_comments
+shopt -s patsub_replacement
 shopt -s progcomp
 shopt -s promptvars
 shopt -s sourcepath
 --
 shopt -u autocd
+shopt -u assoc_expand_once
 shopt -u cdable_vars
 shopt -u checkhash
 shopt -u checkjobs
@@ -65,6 +87,11 @@ shopt -u checkwinsize
 shopt -u compat31
 shopt -u compat32
 shopt -u compat40
+shopt -u compat41
+shopt -u compat42
+shopt -u compat43
+shopt -u compat44
+shopt -u direxpand
 shopt -u dirspell
 shopt -u dotglob
 shopt -u execfail
@@ -77,18 +104,26 @@ shopt -u histappend
 shopt -u histreedit
 shopt -u histverify
 shopt -u huponexit
+shopt -u inherit_errexit
+shopt -u lastpipe
 shopt -u lithist
+shopt -u localvar_inherit
+shopt -u localvar_unset
 shopt -u login_shell
 shopt -u mailwarn
 shopt -u no_empty_cmd_completion
 shopt -u nocaseglob
 shopt -u nocasematch
+shopt -u noexpand_translation
 shopt -u nullglob
+shopt -u progcomp_alias
 shopt -u restricted_shell
 shopt -u shift_verbose
+shopt -u varredir_close
 shopt -u xpg_echo
 --
 autocd         	off
+assoc_expand_once	off
 cdable_vars    	off
 checkhash      	off
 checkjobs      	off
@@ -96,6 +131,11 @@ checkwinsize   	off
 compat31       	off
 compat32       	off
 compat40       	off
+compat41       	off
+compat42       	off
+compat43       	off
+compat44       	off
+direxpand      	off
 dirspell       	off
 dotglob        	off
 execfail       	off
@@ -108,15 +148,22 @@ histappend     	off
 histreedit     	off
 histverify     	off
 huponexit      	off
+inherit_errexit	off
+lastpipe       	off
 lithist        	off
+localvar_inherit	off
+localvar_unset 	off
 login_shell    	off
 mailwarn       	off
 no_empty_cmd_completion	off
 nocaseglob     	off
 nocasematch    	off
+noexpand_translation	off
 nullglob       	off
+progcomp_alias 	off
 restricted_shell	off
 shift_verbose  	off
+varredir_close 	off
 xpg_echo       	off
 --
 set +o allexport
@@ -255,5 +302,11 @@ 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
+./shopt.tests: line 106: shopt: xyz1: invalid shell option name
+./shopt.tests: line 107: shopt: xyz1: invalid option name
+28c28
+< globskipdots   	off
+---
+> globskipdots   	on
+expand_aliases 	on
+expand_aliases 	on
diff --git a/tests/shopt.tests b/tests/shopt.tests
index d4f2a8b..c31870c 100644
--- a/tests/shopt.tests
+++ b/tests/shopt.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # let's try an error message first
 shopt -z
 
@@ -92,3 +105,9 @@ shopt -u -o
 builtin printf -- "--\n"
 shopt -p xyz1
 shopt -o -p xyz1
+
+${THIS_SH} ./shopt1.sub
+
+# test whether or not temporary variable assignments that manipulate posix
+# mode restore the previous state or the default non-posix state
+${THIS_SH} -c 'shopt -s expand_aliases ; shopt expand_aliases ; POSIXLY_CORRECT=y true ; shopt expand_aliases'
diff --git a/tests/shopt1.sub b/tests/shopt1.sub
new file mode 100644
index 0000000..8c1150f
--- /dev/null
+++ b/tests/shopt1.sub
@@ -0,0 +1,52 @@
+#   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 .
+#
+
+# verify all shopt options are reset properly when the shell is reinitialized
+
+: ${TMPDIR:=/var/tmp} ${THIS_SH:=$PWD/bash}
+
+t1=$(mktemp)
+t2=$(mktemp)
+
+if [ ! -e "$t1" ] ; then
+	S1=$RANDOM
+	S2=$RANDOM
+	t1=$TMPDIR/s-$S1
+	t2=$TMPDIR/s-$S2
+	touch "$t1" "$t2"
+fi
+
+chmod +x "$t1" "$t2"
+
+echo "shopt" > "$t1"
+
+echo "#!${THIS_SH}" > "$t2"
+echo "shopt" >> "$t2"
+
+for o in $(compgen -A shopt)
+do
+	case $o in
+	extdebug)	;;
+	*)		shopt -s $o ;;
+	esac
+done
+diff <("$t1") <("$t2")
+
+for o in $(compgen -A shopt)
+do
+	shopt -u $o;
+done
+diff <("$t1") <("$t2")
+
+rm "$t1" "$t2"
diff --git a/tests/source5.sub b/tests/source5.sub
index e618809..4149c11 100644
--- a/tests/source5.sub
+++ b/tests/source5.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 LC_ALL=en_US.UTF-8
 unset LC_ALL
 unset LANG
@@ -6,7 +19,7 @@ export LANG=C
 
 set +o posix
 
-# attempting to source a non-existant file is not an error...
+# attempting to source a non-existent file is not an error...
 . /tmp/source-notthere
 
 echo after bad source 1
diff --git a/tests/source6.sub b/tests/source6.sub
index 9e1cb64..2437292 100644
--- a/tests/source6.sub
+++ b/tests/source6.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # tests sourcing non-regular files, fixed post-3.2
 
 : ${TMPDIR:=/tmp}
@@ -19,8 +32,13 @@ echo $?
 echo $?
 
 # pipe
+if [ -e /dev/stdin ]; then
 echo "echo three - OK" | . /dev/stdin
 echo $?
+else
+# no /dev/stdin, just fake it
+echo "three - OK" ; echo 0
+fi
 
 # FIFO
 mkfifo $TMPDIR/fifo-$$
diff --git a/tests/source7.sub b/tests/source7.sub
new file mode 100644
index 0000000..474a66f
--- /dev/null
+++ b/tests/source7.sub
@@ -0,0 +1,53 @@
+#   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 .
+#
+shopt -s expand_aliases
+
+: ${TMPDIR:=/var/tmp}
+
+echo '((echo abc; echo def;); echo ghi)' > $TMPDIR/x28-$$
+. $TMPDIR/x28-$$
+rm -f $TMPDIR/x28-$$
+
+echo after
+
+TMPFILE=$TMPDIR/x29-$$
+
+echo "#! ${THIS_SH}" >$TMPFILE
+cat >> $TMPFILE << \EOF
+
+(echo -n "$1 "; echo subshell)
+EOF
+chmod 755 $TMPFILE
+
+alias foo1='$TMPFILE one.1; source $TMPFILE two.1; source $TMPFILE three.1; $TMPFILE four.1'
+alias foo2='$TMPFILE one.2;
+source $TMPFILE two.2;
+source $TMPFILE three.2;
+$TMPFILE four.2;
+'
+
+foo1
+foo2
+
+echo x29 - done
+rm -f $TMPFILE
+
+# this is also treated similarly to an alias expansion internally
+((echo abc; echo def;); echo ghi)
+
+if (((4+4) + (4 + 7))); then
+	echo ok
+fi
+
+(())	# make sure the null expression works OK
diff --git a/tests/strip.tests b/tests/strip.tests
index b669b52..b16705f 100644
--- a/tests/strip.tests
+++ b/tests/strip.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 v=`echo "" ; echo "" ; echo ""`
 echo "'$v'"
 v=`echo -n " ab "`
diff --git a/tests/test-glue-functions b/tests/test-glue-functions
new file mode 100644
index 0000000..07ad821
--- /dev/null
+++ b/tests/test-glue-functions
@@ -0,0 +1,13 @@
+# shell functions to include in multiple test files
+
+# squeeze out blanks to avoid white space differences in od implementations
+_intl_normalize_spaces()
+{
+	sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/[[:space:]]*$//'
+}
+
+# avoid whitespace differences in wc implementations
+_cut_leading_spaces()
+{
+	sed -e 's/^[ 	]*//g'
+}
diff --git a/tests/test.right b/tests/test.right
index c5d7c90..4be22f4 100644
--- a/tests/test.right
+++ b/tests/test.right
@@ -180,6 +180,12 @@ t -o allexport
 1
 t ! -o allexport
 0
+t -v unset
+1
+t -v set
+0
+t -v set
+0
 t xx -a yy
 0
 t xx -o ""
@@ -214,6 +220,8 @@ t ! -z "$z"
 0
 t ! -n "$z"
 1
+t ! ! "$z"
+0
 t "$zero"
 1
 t ! "$zero"
@@ -227,48 +235,48 @@ t -G /tmp/test.group
 t -h /tmp/test.symlink
 0
 t 4+3 -eq 7
-./test.tests: line 13: test: 4+3: integer expression expected
+./test.tests: line 26: test: 4+3: integer expression expected
 2
 b 4-5 -eq 7
-./test.tests: line 7: [: 4+3: integer expression expected
+./test.tests: line 20: [: 4+3: integer expression expected
 2
 t 9 -eq 4+5
-./test.tests: line 13: test: 4+5: integer expression expected
+./test.tests: line 26: test: 4+5: integer expression expected
 2
 b 9 -eq 4+5
-./test.tests: line 7: [: 4+5: integer expression expected
+./test.tests: line 20: [: 4+5: integer expression expected
 2
 t A -eq 7
-./test.tests: line 13: test: A: integer expression expected
+./test.tests: line 26: test: A: integer expression expected
 2
 b A -eq 7
-./test.tests: line 7: [: A: integer expression expected
+./test.tests: line 20: [: A: integer expression expected
 2
 t 9 -eq B
-./test.tests: line 13: test: B: integer expression expected
+./test.tests: line 26: test: B: integer expression expected
 2
 b 9 -eq B
-./test.tests: line 7: [: B: integer expression expected
+./test.tests: line 20: [: B: integer expression expected
 2
 t ( 1 = 2
-./test.tests: line 13: test: `)' expected
+./test.tests: line 26: test: `)' expected
 2
 b ( 1 = 2
-./test.tests: line 7: [: `)' expected, found ]
+./test.tests: line 20: [: `)' expected, found ]
 2
-./test.tests: line 13: test: a: unary operator expected
+./test.tests: line 26: test: a: unary operator expected
 2
-./test.tests: line 13: test: b: binary operator expected
+./test.tests: line 26: test: b: binary operator expected
 2
-./test.tests: line 13: test: -A: unary operator expected
+./test.tests: line 26: test: -A: unary operator expected
 2
-./test.tests: line 13: test: too many arguments
+./test.tests: line 26: test: syntax error: `-ne' unexpected
 2
-./test.tests: line 13: test: too many arguments
+./test.tests: line 26: test: too many arguments
 2
-./test.tests: line 406: [: missing `]'
+./test.tests: line 434: [: missing `]'
 2
-./test.tests: line 13: test: (: unary operator expected
+./test.tests: line 26: test: (: unary operator expected
 2
 t -t a
 1
@@ -283,3 +291,7 @@ t -t /dev/tty4
 t -t /dev/tty4444444...
 1
 1
+t -p /dev/fd/6
+1
+t -p /dev/fd/6
+0
diff --git a/tests/test.tests b/tests/test.tests
index 47ad9bb..df4b850 100644
--- a/tests/test.tests
+++ b/tests/test.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 if (( $UID == 0 )); then
 	echo "test-tests: the test suite should not be run as root" >&2
 fi
@@ -166,7 +179,7 @@ echo 't -S /tmp/test.socket'
 t -S /tmp/test.socket	# false
 rm -f /tmp/test.socket
 
-touch /tmp/test.newer
+touch /tmp/test.newer ; sleep 1; echo "hello" > /tmp/test.newer
 echo 't -N /tmp/test.newer'
 t -N /tmp/test.newer
 rm -f /tmp/test.newer
@@ -286,12 +299,24 @@ t -n abcd -a aaa
 echo 't -n abcd -a -z aaa'
 t -n abcd -a -z aaa
 
+# test set or unset shell options
 set +o allexport
 echo 't -o allexport'
 t -o allexport
 echo 't ! -o allexport'
 t ! -o allexport
 
+#test set or unset shell variables
+unset unset
+echo 't -v unset'
+t -v unset
+set=
+echo 't -v set'
+t -v set
+set=set
+echo 't -v set'
+t -v set
+
 echo 't xx -a yy'
 t xx -a yy
 echo 't xx -o ""'
@@ -333,6 +358,9 @@ t ! -z "$z"
 echo 't ! -n "$z"'
 t ! -n "$z"
 
+echo 't ! ! "$z"'
+t ! ! "$z"
+
 zero=
 echo 't "$zero"'
 t "$zero"
@@ -424,3 +452,5 @@ t -t /dev/tty4444444...
 
 # fixed in bash-4.0-beta
 t -t ' '
+
+${THIS_SH} ./test1.sub
diff --git a/tests/test1.sub b/tests/test1.sub
new file mode 100644
index 0000000..d25e0dc
--- /dev/null
+++ b/tests/test1.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+# some systems, like old SunOS, have stat on /dev/fd/N and fstat(N, ...)
+# return different results
+: ${TMPDIR:=/tmp}
+
+trap 'rm -f ${TMPDIR}/pipe' 0 1 2 3 6 15
+
+exec 6>&-
+echo "t -p /dev/fd/6"
+test -p /dev/fd/6
+echo $?
+
+rm -f ${TMPDIR}/pipe 2>/dev/null
+mkfifo ${TMPDIR}/pipe
+cat < ${TMPDIR}/pipe &
+exec 6>&-
+exec 6>${TMPDIR}/pipe
+echo "t -p /dev/fd/6"
+test -p /dev/fd/6
+echo $?
+exec 2>/dev/null	# disable process termination message
+kill $! 2>/dev/null 
diff --git a/tests/tilde.right b/tests/tilde.right
index fe58ae3..1301c0b 100644
--- a/tests/tilde.right
+++ b/tests/tilde.right
@@ -19,7 +19,10 @@ abcd:~chet
 /bin:/usr/bin:.:/usr/xyz/bin
 /bin:/usr/bin:.:~/bin
 /bin:/usr/bin:.:~/bin
+\~
 ok 1
 ok 2
 ok 3
 ~root
+foo=bar:/usr/xyz
+foo=bar:~
diff --git a/tests/tilde.tests b/tests/tilde.tests
index 8b2bdb8..20268a7 100644
--- a/tests/tilde.tests
+++ b/tests/tilde.tests
@@ -1,3 +1,17 @@
+#   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 .
+#
+wdir=$PWD
 # 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,
@@ -48,6 +62,8 @@ echo "$PPATH"
 declare -x PPATH="$XPATH:~/bin"
 echo "$PPATH"
 
+printf "%q\n" '~'
+
 # more tests of tilde expansion when executing case commands
 case ~ in
 $HOME)	echo ok 1;;
@@ -67,3 +83,12 @@ esac
 
 USER=root		# should exist just about everywhere
 echo ~$USER
+
+cd "$wdir"
+
+# this test is incomplete; should also test assignment statements (tilde3.sub)
+echo foo=bar:~
+set -o posix
+echo foo=bar:~
+
+exit 0
diff --git a/tests/tilde2.right b/tests/tilde2.right
index fce0468..f383e3a 100644
--- a/tests/tilde2.right
+++ b/tests/tilde2.right
@@ -22,3 +22,7 @@ HOME=~
 /usr/$x/abc
 HOME=/usr/$x/abc
 /usr/$x/abc
+foo=/home/xyz:/home/xyz
+/home/xyz:/home/xyz
+foo=~:~
+/home/xyz:/home/xyz
diff --git a/tests/tilde2.tests b/tests/tilde2.tests
index ff6c76f..d2415cb 100644
--- a/tests/tilde2.tests
+++ b/tests/tilde2.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 HOME=/usr/xyz
 XPATH=/bin:/usr/bin:.
 
@@ -68,3 +81,5 @@ set +o posix
 eval echo $h
 eval $h
 echo $HOME
+
+$THIS_SH ./tilde3.sub
diff --git a/tests/tilde3.sub b/tests/tilde3.sub
new file mode 100644
index 0000000..c35ea50
--- /dev/null
+++ b/tests/tilde3.sub
@@ -0,0 +1,26 @@
+#   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 .
+#
+# regression test for tilde expansion following unquoted colons in posix mode
+
+HOME=/home/xyz
+
+echo foo=~:~
+foo=~:~
+printf "%s\n" $foo
+
+set -o posix
+
+echo foo=~:~
+foo=~:~
+printf "%s\n" $foo
diff --git a/tests/trap.right b/tests/trap.right
index c8417ac..4338ff4 100644
--- a/tests/trap.right
+++ b/tests/trap.right
@@ -5,9 +5,9 @@ trap -- 'echo aborting' SIGINT
 trap -- 'echo aborting' SIGQUIT
 trap -- 'echo aborting' SIGABRT
 trap -- 'echo aborting' SIGTERM
-[20] debug
+[33] debug
 debug line
-[22] debug
+[35] debug
 trap -- 'echo exiting' EXIT
 trap -- 'echo aborting' SIGHUP
 trap -- 'echo aborting' SIGINT
@@ -15,25 +15,25 @@ trap -- 'echo aborting' SIGQUIT
 trap -- 'echo aborting' SIGABRT
 trap -- 'echo aborting' SIGTERM
 trap -- 'echo [$LINENO] debug' DEBUG
-[24] debug
-func[16] funcdebug
+[37] debug
+func[29] funcdebug
 funcdebug line
-[26] debug
+./trap.tests[39] funcdebug
 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
+trap -- 'echo ${FUNCNAME:-$0}[$LINENO] funcdebug' DEBUG
+./trap.tests[41] funcdebug
+./trap.tests[46] debug
+./trap.tests[47] debug
+func2[43] debug
+func2[44] debug
 func2debug line
-./trap.tests[36] debug
-./trap.tests[38] debug
+./trap.tests[49] debug
+./trap.tests[51] debug
 trap -- 'echo exiting' EXIT
 trap -- 'echo aborting' SIGHUP
 trap -- 'echo aborting' SIGINT
@@ -53,6 +53,7 @@ trap -- 'echo aborting' SIGQUIT
 trap -- 'echo aborting' SIGABRT
 trap -- 'echo aborting' SIGTERM
 0
+trap -- '' SIGUSR2
 ERRTRAP
 ERRTRAP
 ERRTRAP
@@ -63,17 +64,47 @@ after while
 before false in trap2a.sub
 after false in trap2a.sub
 command substitution
+ERRTRAP
+ERRTRAP
+bar
+ERRTRAP
+ERRTRAP
+ERRTRAP
+ERRTRAP
+ERRTRAP
 +[6] echo 1
 1
 +[7] echo 2
 2
-+[8] echo 3
-+[8] cat
++[8] false
++[8] false
 +[8] false
 ++[8] echo trap: 8
 trap: 8
 +[9] echo 4
 4
+exit subshell 1
+current shell
+exit subshell 2
+current shell
+current shell
+current shell
+outside 1
+outside 2
+outside 3
+outside 4
+sleep 2
+wait $!
+exit
+in trap EXIT
+sleep 2
+wait $!
+exit
+in trap EXIT
+fn
+after 1
+fn
+after 2
 caught a child death
 caught a child death
 caught a child death
@@ -81,5 +112,4 @@ 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
index ded1d70..4f808be 100644
--- a/tests/trap.tests
+++ b/tests/trap.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 # test the trap code
 
 trap 'echo exiting' 0
@@ -62,12 +75,21 @@ echo $?
 # hmmm...should this set the handling to SIG_IGN for children, too?
 trap '' USR2
 ./trap1.sub
+trap - USR2
 
 # test ERR trap
 ./trap2.sub
 
 ${THIS_SH} ./trap3.sub
 
+${THIS_SH} ./trap4.sub
+
+# This doesn't work right on all Unix versions
+#${THIS_SH} ./trap5.sub
+
+# Return trap issues
+${THIS_SH} ./trap6.sub
+
 #
 # show that setting a trap on SIGCHLD is not disastrous.
 #
@@ -90,4 +112,3 @@ trap
 
 trap - SIGCHLD
 wait
-
diff --git a/tests/trap2.sub b/tests/trap2.sub
index 73357df..bd9a76b 100755
--- a/tests/trap2.sub
+++ b/tests/trap2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 set +e
 trap 'echo ERRTRAP' ERR
 
@@ -23,3 +36,27 @@ echo after while
 ./trap2a.sub
 
 echo $(false ; echo command substitution)
+
+# test behavior of failed commands following `command' builtin
+command false
+
+(command false)
+command false | echo bar
+
+(false)
+
+exit 42 | command false
+
+command command command false
+
+unset FALSE
+if [ -x /bin/false ]; then
+        FALSE=/bin/false
+elif [ -x /usr/bin/false ]; then
+        FALSE=/usr/bin/false
+else
+        FALSE='command false'
+fi
+
+command $FALSE
+command command command $FALSE
diff --git a/tests/trap3.sub b/tests/trap3.sub
index 0df4455..1490a76 100644
--- a/tests/trap3.sub
+++ b/tests/trap3.sub
@@ -5,5 +5,5 @@ set -x
 
 echo 1
 echo 2
-echo 3 | cat | false
+false | false | false
 echo 4
diff --git a/tests/trap4.sub b/tests/trap4.sub
new file mode 100644
index 0000000..c84b54e
--- /dev/null
+++ b/tests/trap4.sub
@@ -0,0 +1,55 @@
+#   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 .
+#
+# make sure subshells at the end of pipelines run any exit traps they set
+
+: | { trap 'echo exit subshell 1' EXIT; exit; }; echo current shell
+
+: | { trap 'echo exit subshell 2' EXIT; exit; }; echo current shell
+
+: | { trap 'echo exit subshell 3' EXIT; exit; } | : ; echo current shell
+
+: | { trap 'echo exit subshell 4' EXIT; exit; } | : ; echo current shell
+
+trap 'echo inherited exit trap' EXIT
+: | { exit; } ; echo outside 1
+: | ( exit; ) ; echo outside 2
+: | { exit; } | : ; echo outside 3
+: | ( exit; ) | : ; echo outside 4
+
+trap - EXIT
+
+# make sure group commands that are not at the beginning or end of pipelines
+# run an EXIT trap, with and without the exit builtin
+echo ignored |
+{
+    trap 'echo "in trap EXIT">&2' EXIT
+    sleep 4 &
+    echo 'sleep 2'>&2
+    sleep 2
+    echo 'wait $!'>&2
+    wait $!
+    echo 'exit'>&2
+    exit
+} | cat
+
+echo ignored |
+{
+    trap 'echo "in trap EXIT">&2' EXIT
+    sleep 4 &
+    echo 'sleep 2'>&2
+    sleep 2
+    echo 'wait $!'>&2
+    wait $!
+    echo 'exit'>&2
+} | cat
diff --git a/tests/trap5.sub b/tests/trap5.sub
new file mode 100644
index 0000000..826b794
--- /dev/null
+++ b/tests/trap5.sub
@@ -0,0 +1,31 @@
+#   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 .
+#
+# make sure process substitution runs the exit trap
+[[ -n $(< <(trap "cat /dev/fd/0" EXIT)) ]] <<.
+#
+set -o functrace
+fn() { return; }
+
+trap "echo fn ; fn" RETURN
+
+fn
+echo after 1
+
+unset -f fn
+
+fn() { eval return; }
+fn
+echo after 2
+
+unset -f fn
diff --git a/tests/type.right b/tests/type.right
index a628231..bbc228e 100644
--- a/tests/type.right
+++ b/tests/type.right
@@ -1,6 +1,6 @@
-./type.tests: line 9: type: -r: invalid option
+./type.tests: line 22: type: -r: invalid option
 type: usage: type [-afptP] name [name ...]
-./type.tests: line 12: type: notthere: not found
+./type.tests: line 25: type: notthere: not found
 function
 keyword
 builtin
@@ -24,7 +24,7 @@ func ()
 }
 while
 while is a shell keyword
-./type.tests: line 43: type: m: not found
+./type.tests: line 56: type: m: not found
 alias m='more'
 alias m='more'
 m is aliased to `more'
@@ -37,15 +37,15 @@ 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
+./type.tests: line 78: type: func: not found
+./type.tests: line 80: type: m: not found
 /bin/sh
 /tmp/bash
 bash is hashed (/tmp/bash)
 file
 hits	command
-   3	/tmp/bash
    1	/bin/sh
+   3	/tmp/bash
 f is a function
 f () 
 { 
@@ -54,22 +54,22 @@ f ()
 foo is a function
 foo () 
 { 
-    echo $(> ${f}
+file
+EOF
+
+    done
+    grep . a b c
+}
+a:file
+b:file
+c:file
+bb is a function
+bb () 
+{ 
+    ( cat <.
+#
 set +o posix
 
 hash -r
@@ -91,3 +104,7 @@ type f | cat -v
 ${THIS_SH} type1.sub
 
 ${THIS_SH} type2.sub
+
+${THIS_SH} type3.sub
+
+${THIS_SH} type4.sub
diff --git a/tests/type2.sub b/tests/type2.sub
index 3f85ead..34977c5 100644
--- a/tests/type2.sub
+++ b/tests/type2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 foo()
 {
 	echo
diff --git a/tests/type3.sub b/tests/type3.sub
new file mode 100644
index 0000000..1a95de3
--- /dev/null
+++ b/tests/type3.sub
@@ -0,0 +1,34 @@
+#   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 .
+#
+cd ${TMPDIR:-/tmp}
+
+foo() {
+	rm -f a b c
+	for f in a b c; do
+		cat <<-EOF >> ${f}
+		file
+		EOF
+	done
+	grep . a b c
+}
+
+type foo
+
+eval "$(type foo | sed 1d)"
+foo
+
+rm -f a b c
+
+cd $OLDPWD
+exit 0
diff --git a/tests/type4.sub b/tests/type4.sub
new file mode 100644
index 0000000..937f998
--- /dev/null
+++ b/tests/type4.sub
@@ -0,0 +1,56 @@
+#   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 .
+#
+bb()
+{
+	(
+	cat << EOF
+foo
+bar
+EOF
+	)
+	echo after subshell
+}
+
+type bb
+
+
+mkcoprocs()
+{
+	coproc a { cat <.
+#
+unset LC_ALL
+
+ErrorCnt=0
+TestCnt=0
+
+  function check_valid_var_name {
+    case "${1:?Missing Variable Name}" in
+      [!a-zA-Z_]* | *[!a-zA-Z_0-9]* ) return 3;;
+    esac
+  }
+  # get_array_element VariableName ArrayName ArrayElement
+  function get_array_element {
+    check_valid_var_name "${1:?Missing Variable Name}" || return $?
+    check_valid_var_name "${2:?Missing Array Name}" || return $?
+    eval "${1}"'="${'"${2}"'["${3:?Missing Array Index}"]}"'
+  }
+  # unset_array_element VarName ArrayName
+  function get_array_element_cnt {
+    check_valid_var_name "${1:?Missing Variable Name}" || return $?
+    check_valid_var_name "${2:?Missing Array Name}" || return $?
+    eval "${1}"'="${#'"${2}"'[@]}"'
+  }
+
+
+function TestCodePage {
+    local TargetCharset="${1:?Missing Test charset}"
+    local EChar RChar TCnt
+    get_array_element_cnt TCnt "${2:?Missing Array Name}"
+    for (( x=1 ; x<${TCnt} ; x++ )); do
+      get_array_element EChar "${2}"  ${x}
+      if [ -n "${EChar}" ]; then
+	let TestCnt+=1
+	printf -v UVal '\\U%08x' "${x}"
+	LC_CTYPE=${TargetCharset} printf -v RChar "${UVal}" 2>/dev/null
+	if [ "${EChar}" != "${RChar}" ]; then
+	  let ErrorCnt+=1
+	  printf "${TargetCharset}: Error Encoding U+%08X to ${TL} [ \"%q\" != \"%q\" ]\n" "${x}" "${EChar}" "${RChar}"
+	fi
+      fi
+    done
+}
+
+
+#for ((x=1;x<255;x++)); do printf ' [0x%04x]=$'\''\%03o'\' $x $x ; [ $(($x%5)) = 0 ] && echo; done
+fr_FR_ISO_8859_1=(
+ [0x0001]=$'\001' [0x0002]=$'\002' [0x0003]=$'\003' [0x0004]=$'\004' [0x0005]=$'\005'
+ [0x0006]=$'\006' [0x0007]=$'\007' [0x0008]=$'\010' [0x0009]=$'\011' [0x000a]=$'\012'
+ [0x000b]=$'\013' [0x000c]=$'\014' [0x000d]=$'\015' [0x000e]=$'\016' [0x000f]=$'\017'
+ [0x0010]=$'\020' [0x0011]=$'\021' [0x0012]=$'\022' [0x0013]=$'\023' [0x0014]=$'\024'
+ [0x0015]=$'\025' [0x0016]=$'\026' [0x0017]=$'\027' [0x0018]=$'\030' [0x0019]=$'\031'
+ [0x001a]=$'\032' [0x001b]=$'\033' [0x001c]=$'\034' [0x001d]=$'\035' [0x001e]=$'\036'
+ [0x001f]=$'\037' [0x0020]=$'\040' [0x0021]=$'\041' [0x0022]=$'\042' [0x0023]=$'\043'
+ [0x0024]=$'\044' [0x0025]=$'\045' [0x0026]=$'\046' [0x0027]=$'\047' [0x0028]=$'\050'
+ [0x0029]=$'\051' [0x002a]=$'\052' [0x002b]=$'\053' [0x002c]=$'\054' [0x002d]=$'\055'
+ [0x002e]=$'\056' [0x002f]=$'\057' [0x0030]=$'\060' [0x0031]=$'\061' [0x0032]=$'\062'
+ [0x0033]=$'\063' [0x0034]=$'\064' [0x0035]=$'\065' [0x0036]=$'\066' [0x0037]=$'\067'
+ [0x0038]=$'\070' [0x0039]=$'\071' [0x003a]=$'\072' [0x003b]=$'\073' [0x003c]=$'\074'
+ [0x003d]=$'\075' [0x003e]=$'\076' [0x003f]=$'\077' [0x0040]=$'\100' [0x0041]=$'\101'
+ [0x0042]=$'\102' [0x0043]=$'\103' [0x0044]=$'\104' [0x0045]=$'\105' [0x0046]=$'\106'
+ [0x0047]=$'\107' [0x0048]=$'\110' [0x0049]=$'\111' [0x004a]=$'\112' [0x004b]=$'\113'
+ [0x004c]=$'\114' [0x004d]=$'\115' [0x004e]=$'\116' [0x004f]=$'\117' [0x0050]=$'\120'
+ [0x0051]=$'\121' [0x0052]=$'\122' [0x0053]=$'\123' [0x0054]=$'\124' [0x0055]=$'\125'
+ [0x0056]=$'\126' [0x0057]=$'\127' [0x0058]=$'\130' [0x0059]=$'\131' [0x005a]=$'\132'
+ [0x005b]=$'\133' [0x005c]=$'\134' [0x005d]=$'\135' [0x005e]=$'\136' [0x005f]=$'\137'
+ [0x0060]=$'\140' [0x0061]=$'\141' [0x0062]=$'\142' [0x0063]=$'\143' [0x0064]=$'\144'
+ [0x0065]=$'\145' [0x0066]=$'\146' [0x0067]=$'\147' [0x0068]=$'\150' [0x0069]=$'\151'
+ [0x006a]=$'\152' [0x006b]=$'\153' [0x006c]=$'\154' [0x006d]=$'\155' [0x006e]=$'\156'
+ [0x006f]=$'\157' [0x0070]=$'\160' [0x0071]=$'\161' [0x0072]=$'\162' [0x0073]=$'\163'
+ [0x0074]=$'\164' [0x0075]=$'\165' [0x0076]=$'\166' [0x0077]=$'\167' [0x0078]=$'\170'
+ [0x0079]=$'\171' [0x007a]=$'\172' [0x007b]=$'\173' [0x007c]=$'\174' [0x007d]=$'\175'
+ [0x007e]=$'\176' [0x007f]=$'\177' [0x0080]=$'\200' [0x0081]=$'\201' [0x0082]=$'\202'
+ [0x0083]=$'\203' [0x0084]=$'\204' [0x0085]=$'\205' [0x0086]=$'\206' [0x0087]=$'\207'
+ [0x0088]=$'\210' [0x0089]=$'\211' [0x008a]=$'\212' [0x008b]=$'\213' [0x008c]=$'\214'
+ [0x008d]=$'\215' [0x008e]=$'\216' [0x008f]=$'\217' [0x0090]=$'\220' [0x0091]=$'\221'
+ [0x0092]=$'\222' [0x0093]=$'\223' [0x0094]=$'\224' [0x0095]=$'\225' [0x0096]=$'\226'
+ [0x0097]=$'\227' [0x0098]=$'\230' [0x0099]=$'\231' [0x009a]=$'\232' [0x009b]=$'\233'
+ [0x009c]=$'\234' [0x009d]=$'\235' [0x009e]=$'\236' [0x009f]=$'\237' [0x00a0]=$'\240'
+ [0x00a1]=$'\241' [0x00a2]=$'\242' [0x00a3]=$'\243' [0x00a4]=$'\244' [0x00a5]=$'\245'
+ [0x00a6]=$'\246' [0x00a7]=$'\247' [0x00a8]=$'\250' [0x00a9]=$'\251' [0x00aa]=$'\252'
+ [0x00ab]=$'\253' [0x00ac]=$'\254' [0x00ad]=$'\255' [0x00ae]=$'\256' [0x00af]=$'\257'
+ [0x00b0]=$'\260' [0x00b1]=$'\261' [0x00b2]=$'\262' [0x00b3]=$'\263' [0x00b4]=$'\264'
+ [0x00b5]=$'\265' [0x00b6]=$'\266' [0x00b7]=$'\267' [0x00b8]=$'\270' [0x00b9]=$'\271'
+ [0x00ba]=$'\272' [0x00bb]=$'\273' [0x00bc]=$'\274' [0x00bd]=$'\275' [0x00be]=$'\276'
+ [0x00bf]=$'\277' [0x00c0]=$'\300' [0x00c1]=$'\301' [0x00c2]=$'\302' [0x00c3]=$'\303'
+ [0x00c4]=$'\304' [0x00c5]=$'\305' [0x00c6]=$'\306' [0x00c7]=$'\307' [0x00c8]=$'\310'
+ [0x00c9]=$'\311' [0x00ca]=$'\312' [0x00cb]=$'\313' [0x00cc]=$'\314' [0x00cd]=$'\315'
+ [0x00ce]=$'\316' [0x00cf]=$'\317' [0x00d0]=$'\320' [0x00d1]=$'\321' [0x00d2]=$'\322'
+ [0x00d3]=$'\323' [0x00d4]=$'\324' [0x00d5]=$'\325' [0x00d6]=$'\326' [0x00d7]=$'\327'
+ [0x00d8]=$'\330' [0x00d9]=$'\331' [0x00da]=$'\332' [0x00db]=$'\333' [0x00dc]=$'\334'
+ [0x00dd]=$'\335' [0x00de]=$'\336' [0x00df]=$'\337' [0x00e0]=$'\340' [0x00e1]=$'\341'
+ [0x00e2]=$'\342' [0x00e3]=$'\343' [0x00e4]=$'\344' [0x00e5]=$'\345' [0x00e6]=$'\346'
+ [0x00e7]=$'\347' [0x00e8]=$'\350' [0x00e9]=$'\351' [0x00ea]=$'\352' [0x00eb]=$'\353'
+ [0x00ec]=$'\354' [0x00ed]=$'\355' [0x00ee]=$'\356' [0x00ef]=$'\357' [0x00f0]=$'\360'
+ [0x00f1]=$'\361' [0x00f2]=$'\362' [0x00f3]=$'\363' [0x00f4]=$'\364' [0x00f5]=$'\365'
+ [0x00f6]=$'\366' [0x00f7]=$'\367' [0x00f8]=$'\370' [0x00f9]=$'\371' [0x00fa]=$'\372'
+ [0x00fb]=$'\373' [0x00fc]=$'\374' [0x00fd]=$'\375' [0x00fe]=$'\376'	
+)
+
+# this locale causes problems all over the place
+if locale -a | grep -i '^fr_FR\.ISO8859.*1$' >/dev/null ; then
+	TestCodePage fr_FR.ISO8859-1 fr_FR_ISO_8859_1
+else
+	echo "unicode1.sub: warning: you do not have the fr_FR.ISO8859-1 locale installed;" >&2
+	echo "unicode1.sub: that will cause some of these tests to be skipped." >&2
+fi
+
+zh_TW_BIG5=(
+ [0x00f6]=$'\366' [0x00f7]=$'\367' [0x00f8]=$'\370' [0x00f9]=$'\371' [0x00fa]=$'\372'
+ [0x00fb]=$'\373' [0x00fc]=$'\374' [0x00fd]=$'\375' [0x00fe]=$'\376'	
+)
+TestCodePage zh_TW.BIG5 zh_TW_BIG5
+
+jp_JP_SHIFT_JIS=(
+  [0x0001]=$'\x01' #  START OF HEADING
+  [0x0002]=$'\x02' #  START OF TEXT
+  [0x0003]=$'\x03' #  END OF TEXT
+  [0x0004]=$'\x04' #  END OF TRANSMISSION
+  [0x0005]=$'\x05' #  ENQUIRY
+  [0x0006]=$'\x06' #  ACKNOWLEDGE
+  [0x0007]=$'\x07' #  BELL
+  [0x0008]=$'\x08' #  BACKSPACE
+  [0x0009]=$'\x09' #  HORIZONTAL TABULATION
+  [0x000A]=$'\x0A' #  LINE FEED
+  [0x000B]=$'\x0B' #  VERTICAL TABULATION
+  [0x000C]=$'\x0C' #  FORM FEED
+  [0x000D]=$'\x0D' #  CARRIAGE RETURN
+  [0x000E]=$'\x0E' #  SHIFT OUT
+  [0x000F]=$'\x0F' #  SHIFT IN
+  [0x0010]=$'\x10' #  DATA LINK ESCAPE
+  [0x0011]=$'\x11' #  DEVICE CONTROL ONE
+  [0x0012]=$'\x12' #  DEVICE CONTROL TWO
+  [0x0013]=$'\x13' #  DEVICE CONTROL THREE
+  [0x0014]=$'\x14' #  DEVICE CONTROL FOUR
+  [0x0015]=$'\x15' #  NEGATIVE ACKNOWLEDGE
+  [0x0016]=$'\x16' #  SYNCHRONOUS IDLE
+  [0x0017]=$'\x17' #  END OF TRANSMISSION BLOCK
+  [0x0018]=$'\x18' #  CANCEL
+  [0x0019]=$'\x19' #  END OF MEDIUM
+  [0x001A]=$'\x1A' #  SUBSTITUTE
+  [0x001B]=$'\x1B' #  ESCAPE
+  [0x001C]=$'\x1C' #  FILE SEPARATOR
+  [0x001D]=$'\x1D' #  GROUP SEPARATOR
+  [0x001E]=$'\x1E' #  RECORD SEPARATOR
+  [0x001F]=$'\x1F' #  UNIT SEPARATOR
+  [0x0020]=$'\x20' #  SPACE
+  [0x0021]=$'\x21' #  EXCLAMATION MARK
+  [0x0022]=$'\x22' #  QUOTATION MARK
+  [0x0023]=$'\x23' #  NUMBER SIGN
+  [0x0024]=$'\x24' #  DOLLAR SIGN
+  [0x0025]=$'\x25' #  PERCENT SIGN
+  [0x0026]=$'\x26' #  AMPERSAND
+  [0x0027]=$'\x27' #  APOSTROPHE
+  [0x0028]=$'\x28' #  LEFT PARENTHESIS
+  [0x0029]=$'\x29' #  RIGHT PARENTHESIS
+  [0x002A]=$'\x2A' #  ASTERISK
+  [0x002B]=$'\x2B' #  PLUS SIGN
+  [0x002C]=$'\x2C' #  COMMA
+  [0x002D]=$'\x2D' #  HYPHEN-MINUS
+  [0x002E]=$'\x2E' #  FULL STOP
+  [0x002F]=$'\x2F' #  SOLIDUS
+  [0x0030]=$'\x30' #  DIGIT ZERO
+  [0x0031]=$'\x31' #  DIGIT ONE
+  [0x0032]=$'\x32' #  DIGIT TWO
+  [0x0033]=$'\x33' #  DIGIT THREE
+  [0x0034]=$'\x34' #  DIGIT FOUR
+  [0x0035]=$'\x35' #  DIGIT FIVE
+  [0x0036]=$'\x36' #  DIGIT SIX
+  [0x0037]=$'\x37' #  DIGIT SEVEN
+  [0x0038]=$'\x38' #  DIGIT EIGHT
+  [0x0039]=$'\x39' #  DIGIT NINE
+  [0x003A]=$'\x3A' #  COLON
+  [0x003B]=$'\x3B' #  SEMICOLON
+  [0x003C]=$'\x3C' #  LESS-THAN SIGN
+  [0x003D]=$'\x3D' #  EQUALS SIGN
+  [0x003E]=$'\x3E' #  GREATER-THAN SIGN
+  [0x003F]=$'\x3F' #  QUESTION MARK
+  [0x0040]=$'\x40' #  COMMERCIAL AT
+  [0x0041]=$'\x41' #  LATIN CAPITAL LETTER A
+  [0x0042]=$'\x42' #  LATIN CAPITAL LETTER B
+  [0x0043]=$'\x43' #  LATIN CAPITAL LETTER C
+  [0x0044]=$'\x44' #  LATIN CAPITAL LETTER D
+  [0x0045]=$'\x45' #  LATIN CAPITAL LETTER E
+  [0x0046]=$'\x46' #  LATIN CAPITAL LETTER F
+  [0x0047]=$'\x47' #  LATIN CAPITAL LETTER G
+  [0x0048]=$'\x48' #  LATIN CAPITAL LETTER H
+  [0x0049]=$'\x49' #  LATIN CAPITAL LETTER I
+  [0x004A]=$'\x4A' #  LATIN CAPITAL LETTER J
+  [0x004B]=$'\x4B' #  LATIN CAPITAL LETTER K
+  [0x004C]=$'\x4C' #  LATIN CAPITAL LETTER L
+  [0x004D]=$'\x4D' #  LATIN CAPITAL LETTER M
+  [0x004E]=$'\x4E' #  LATIN CAPITAL LETTER N
+  [0x004F]=$'\x4F' #  LATIN CAPITAL LETTER O
+  [0x0050]=$'\x50' #  LATIN CAPITAL LETTER P
+  [0x0051]=$'\x51' #  LATIN CAPITAL LETTER Q
+  [0x0052]=$'\x52' #  LATIN CAPITAL LETTER R
+  [0x0053]=$'\x53' #  LATIN CAPITAL LETTER S
+  [0x0054]=$'\x54' #  LATIN CAPITAL LETTER T
+  [0x0055]=$'\x55' #  LATIN CAPITAL LETTER U
+  [0x0056]=$'\x56' #  LATIN CAPITAL LETTER V
+  [0x0057]=$'\x57' #  LATIN CAPITAL LETTER W
+  [0x0058]=$'\x58' #  LATIN CAPITAL LETTER X
+  [0x0059]=$'\x59' #  LATIN CAPITAL LETTER Y
+  [0x005A]=$'\x5A' #  LATIN CAPITAL LETTER Z
+  [0x005B]=$'\x5B' #  LEFT SQUARE BRACKET
+  [0x005C]=$'\x5C' #  REVERSE SOLIDUS (YEN SIGN)
+  [0x005D]=$'\x5D' #  RIGHT SQUARE BRACKET
+  [0x005E]=$'\x5E' #  CIRCUMFLEX ACCENT
+  [0x005F]=$'\x5F' #  LOW LINE
+  [0x0060]=$'\x60' #  GRAVE ACCENT
+  [0x0061]=$'\x61' #  LATIN SMALL LETTER A
+  [0x0062]=$'\x62' #  LATIN SMALL LETTER B
+  [0x0063]=$'\x63' #  LATIN SMALL LETTER C
+  [0x0064]=$'\x64' #  LATIN SMALL LETTER D
+  [0x0065]=$'\x65' #  LATIN SMALL LETTER E
+  [0x0066]=$'\x66' #  LATIN SMALL LETTER F
+  [0x0067]=$'\x67' #  LATIN SMALL LETTER G
+  [0x0068]=$'\x68' #  LATIN SMALL LETTER H
+  [0x0069]=$'\x69' #  LATIN SMALL LETTER I
+  [0x006A]=$'\x6A' #  LATIN SMALL LETTER J
+  [0x006B]=$'\x6B' #  LATIN SMALL LETTER K
+  [0x006C]=$'\x6C' #  LATIN SMALL LETTER L
+  [0x006D]=$'\x6D' #  LATIN SMALL LETTER M
+  [0x006E]=$'\x6E' #  LATIN SMALL LETTER N
+  [0x006F]=$'\x6F' #  LATIN SMALL LETTER O
+  [0x0070]=$'\x70' #  LATIN SMALL LETTER P
+  [0x0071]=$'\x71' #  LATIN SMALL LETTER Q
+  [0x0072]=$'\x72' #  LATIN SMALL LETTER R
+  [0x0073]=$'\x73' #  LATIN SMALL LETTER S
+  [0x0074]=$'\x74' #  LATIN SMALL LETTER T
+  [0x0075]=$'\x75' #  LATIN SMALL LETTER U
+  [0x0076]=$'\x76' #  LATIN SMALL LETTER V
+  [0x0077]=$'\x77' #  LATIN SMALL LETTER W
+  [0x0078]=$'\x78' #  LATIN SMALL LETTER X
+  [0x0079]=$'\x79' #  LATIN SMALL LETTER Y
+  [0x007A]=$'\x7A' #  LATIN SMALL LETTER Z
+  [0x007B]=$'\x7B' #  LEFT CURLY BRACKET
+  [0x007C]=$'\x7C' #  VERTICAL LINE
+  [0x007D]=$'\x7D' #  RIGHT CURLY BRACKET
+  [0x007E]=$'\x7E' #  TILDE
+  [0x007F]=$'\x7F' #  DELETE
+  [0xFF61]=$'\xA1' #  HALFWIDTH IDEOGRAPHIC FULL STOP
+  [0xFF62]=$'\xA2' #  HALFWIDTH LEFT CORNER BRACKET
+  [0xFF63]=$'\xA3' #  HALFWIDTH RIGHT CORNER BRACKET
+  [0xFF64]=$'\xA4' #  HALFWIDTH IDEOGRAPHIC COMMA
+  [0xFF65]=$'\xA5' #  HALFWIDTH KATAKANA MIDDLE DOT
+  [0xFF66]=$'\xA6' #  HALFWIDTH KATAKANA LETTER WO
+  [0xFF67]=$'\xA7' #  HALFWIDTH KATAKANA LETTER SMALL A
+  [0xFF68]=$'\xA8' #  HALFWIDTH KATAKANA LETTER SMALL I
+  [0xFF69]=$'\xA9' #  HALFWIDTH KATAKANA LETTER SMALL U
+  [0xFF6A]=$'\xAA' #  HALFWIDTH KATAKANA LETTER SMALL E
+  [0xFF6B]=$'\xAB' #  HALFWIDTH KATAKANA LETTER SMALL O
+  [0xFF6C]=$'\xAC' #  HALFWIDTH KATAKANA LETTER SMALL YA
+  [0xFF6D]=$'\xAD' #  HALFWIDTH KATAKANA LETTER SMALL YU
+  [0xFF6E]=$'\xAE' #  HALFWIDTH KATAKANA LETTER SMALL YO
+  [0xFF6F]=$'\xAF' #  HALFWIDTH KATAKANA LETTER SMALL TU
+  [0xFF70]=$'\xB0' #  HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+  [0xFF71]=$'\xB1' #  HALFWIDTH KATAKANA LETTER A
+  [0xFF72]=$'\xB2' #  HALFWIDTH KATAKANA LETTER I
+  [0xFF73]=$'\xB3' #  HALFWIDTH KATAKANA LETTER U
+  [0xFF74]=$'\xB4' #  HALFWIDTH KATAKANA LETTER E
+  [0xFF75]=$'\xB5' #  HALFWIDTH KATAKANA LETTER O
+  [0xFF76]=$'\xB6' #  HALFWIDTH KATAKANA LETTER KA
+  [0xFF77]=$'\xB7' #  HALFWIDTH KATAKANA LETTER KI
+  [0xFF78]=$'\xB8' #  HALFWIDTH KATAKANA LETTER KU
+  [0xFF79]=$'\xB9' #  HALFWIDTH KATAKANA LETTER KE
+  [0xFF7A]=$'\xBA' #  HALFWIDTH KATAKANA LETTER KO
+  [0xFF7B]=$'\xBB' #  HALFWIDTH KATAKANA LETTER SA
+  [0xFF7C]=$'\xBC' #  HALFWIDTH KATAKANA LETTER SI
+  [0xFF7D]=$'\xBD' #  HALFWIDTH KATAKANA LETTER SU
+  [0xFF7E]=$'\xBE' #  HALFWIDTH KATAKANA LETTER SE
+  [0xFF7F]=$'\xBF' #  HALFWIDTH KATAKANA LETTER SO
+  [0xFF80]=$'\xC0' #  HALFWIDTH KATAKANA LETTER TA
+  [0xFF81]=$'\xC1' #  HALFWIDTH KATAKANA LETTER TI
+  [0xFF82]=$'\xC2' #  HALFWIDTH KATAKANA LETTER TU
+  [0xFF83]=$'\xC3' #  HALFWIDTH KATAKANA LETTER TE
+  [0xFF84]=$'\xC4' #  HALFWIDTH KATAKANA LETTER TO
+  [0xFF85]=$'\xC5' #  HALFWIDTH KATAKANA LETTER NA
+  [0xFF86]=$'\xC6' #  HALFWIDTH KATAKANA LETTER NI
+  [0xFF87]=$'\xC7' #  HALFWIDTH KATAKANA LETTER NU
+  [0xFF88]=$'\xC8' #  HALFWIDTH KATAKANA LETTER NE
+  [0xFF89]=$'\xC9' #  HALFWIDTH KATAKANA LETTER NO
+  [0xFF8A]=$'\xCA' #  HALFWIDTH KATAKANA LETTER HA
+  [0xFF8B]=$'\xCB' #  HALFWIDTH KATAKANA LETTER HI
+  [0xFF8C]=$'\xCC' #  HALFWIDTH KATAKANA LETTER HU
+  [0xFF8D]=$'\xCD' #  HALFWIDTH KATAKANA LETTER HE
+  [0xFF8E]=$'\xCE' #  HALFWIDTH KATAKANA LETTER HO
+  [0xFF8F]=$'\xCF' #  HALFWIDTH KATAKANA LETTER MA
+  [0xFF90]=$'\xD0' #  HALFWIDTH KATAKANA LETTER MI
+  [0xFF91]=$'\xD1' #  HALFWIDTH KATAKANA LETTER MU
+  [0xFF92]=$'\xD2' #  HALFWIDTH KATAKANA LETTER ME
+  [0xFF93]=$'\xD3' #  HALFWIDTH KATAKANA LETTER MO
+  [0xFF94]=$'\xD4' #  HALFWIDTH KATAKANA LETTER YA
+  [0xFF95]=$'\xD5' #  HALFWIDTH KATAKANA LETTER YU
+  [0xFF96]=$'\xD6' #  HALFWIDTH KATAKANA LETTER YO
+  [0xFF97]=$'\xD7' #  HALFWIDTH KATAKANA LETTER RA
+  [0xFF98]=$'\xD8' #  HALFWIDTH KATAKANA LETTER RI
+  [0xFF99]=$'\xD9' #  HALFWIDTH KATAKANA LETTER RU
+  [0xFF9A]=$'\xDA' #  HALFWIDTH KATAKANA LETTER RE
+  [0xFF9B]=$'\xDB' #  HALFWIDTH KATAKANA LETTER RO
+  [0xFF9C]=$'\xDC' #  HALFWIDTH KATAKANA LETTER WA
+  [0xFF9D]=$'\xDD' #  HALFWIDTH KATAKANA LETTER N
+  [0xFF9E]=$'\xDE' #  HALFWIDTH KATAKANA VOICED SOUND MARK
+  [0xFF9F]=$'\xDF' #  HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+)
+
+#TestCodePage ja_JP.SHIFT_JIS jp_JP_SHIFT_JIS
+if locale -a | grep -i '^ja_JP.SJIS' >/dev/null ; then
+	TestCodePage ja_JP.SJIS jp_JP_SHIFT_JIS
+else
+	echo "unicode1.sub: warning: you do not have the ja_JP.SJIS locale installed;" >&2
+	echo "unicode1.sub: that will cause some of these tests to be skipped." >&2
+fi
+
+#for ((x=1;x<1000;x++)); do printf ' [0x%04x]=%-11q' "$x" "$(printf "$(printf '\\U%08x' $x)")" ; [ $(($x%5)) = 0 ] && echo; done
+C_UTF_8=(
+ [0x0001]=$'\001'     [0x0002]=$'\002'     [0x0003]=$'\003'     [0x0004]=$'\004'     [0x0005]=$'\005'    
+ [0x0006]=$'\006'     [0x0007]=$'\a'       [0x0008]=$'\b'       [0x0009]=$'\t'       [0x000a]=''         
+ [0x000b]=$'\v'       [0x000c]=$'\f'       [0x000d]=$'\r'       [0x000e]=$'\016'     [0x000f]=$'\017'    
+ [0x0010]=$'\020'     [0x0011]=$'\021'     [0x0012]=$'\022'     [0x0013]=$'\023'     [0x0014]=$'\024'    
+ [0x0015]=$'\025'     [0x0016]=$'\026'     [0x0017]=$'\027'     [0x0018]=$'\030'     [0x0019]=$'\031'    
+ [0x001a]=$'\032'     [0x001b]=$'\E'       [0x001c]=$'\034'     [0x001d]=$'\035'     [0x001e]=$'\036'    
+ [0x001f]=$'\037'     [0x0020]=\           [0x0021]=\!          [0x0022]=\"          [0x0023]=\#         
+ [0x0024]=\$          [0x0025]=%           [0x0026]=\&          [0x0027]=\'          [0x0028]=\(         
+ [0x0029]=\)          [0x002a]=\*          [0x002b]=+           [0x002c]=\,          [0x002d]=-          
+ [0x002e]=.           [0x002f]=/           [0x0030]=0           [0x0031]=1           [0x0032]=2          
+ [0x0033]=3           [0x0034]=4           [0x0035]=5           [0x0036]=6           [0x0037]=7          
+ [0x0038]=8           [0x0039]=9           [0x003a]=:           [0x003b]=\;          [0x003c]=\<         
+ [0x003d]==           [0x003e]=\>          [0x003f]=\?          [0x0040]=@           [0x0041]=A          
+ [0x0042]=B           [0x0043]=C           [0x0044]=D           [0x0045]=E           [0x0046]=F          
+ [0x0047]=G           [0x0048]=H           [0x0049]=I           [0x004a]=J           [0x004b]=K          
+ [0x004c]=L           [0x004d]=M           [0x004e]=N           [0x004f]=O           [0x0050]=P          
+ [0x0051]=Q           [0x0052]=R           [0x0053]=S           [0x0054]=T           [0x0055]=U          
+ [0x0056]=V           [0x0057]=W           [0x0058]=X           [0x0059]=Y           [0x005a]=Z          
+ [0x005b]=\[          [0x005c]=\\          [0x005d]=\]          [0x005e]=\^          [0x005f]=_          
+ [0x0060]=\`          [0x0061]=a           [0x0062]=b           [0x0063]=c           [0x0064]=d          
+ [0x0065]=e           [0x0066]=f           [0x0067]=g           [0x0068]=h           [0x0069]=i          
+ [0x006a]=j           [0x006b]=k           [0x006c]=l           [0x006d]=m           [0x006e]=n          
+ [0x006f]=o           [0x0070]=p           [0x0071]=q           [0x0072]=r           [0x0073]=s          
+ [0x0074]=t           [0x0075]=u           [0x0076]=v           [0x0077]=w           [0x0078]=x          
+ [0x0079]=y           [0x007a]=z           [0x007b]=\{          [0x007c]=\|          [0x007d]=\}         
+ [0x007e]="~"         [0x007f]=$'\177'     [0x0080]=$'\302\200' [0x0081]=$'\302\201' [0x0082]=$'\302\202'
+ [0x0083]=$'\302\203' [0x0084]=$'\302\204' [0x0085]=$'\302\205' [0x0086]=$'\302\206' [0x0087]=$'\302\207'
+ [0x0088]=$'\302\210' [0x0089]=$'\302\211' [0x008a]=$'\302\212' [0x008b]=$'\302\213' [0x008c]=$'\302\214'
+ [0x008d]=$'\302\215' [0x008e]=$'\302\216' [0x008f]=$'\302\217' [0x0090]=$'\302\220' [0x0091]=$'\302\221'
+ [0x0092]=$'\302\222' [0x0093]=$'\302\223' [0x0094]=$'\302\224' [0x0095]=$'\302\225' [0x0096]=$'\302\226'
+ [0x0097]=$'\302\227' [0x0098]=$'\302\230' [0x0099]=$'\302\231' [0x009a]=$'\302\232' [0x009b]=$'\302\233'
+ [0x009c]=$'\302\234' [0x009d]=$'\302\235' [0x009e]=$'\302\236' [0x009f]=$'\302\237' [0x00a0]=$'\302\240'
+ [0x00a1]=$'\302\241' [0x00a2]=$'\302\242' [0x00a3]=$'\302\243' [0x00a4]=$'\302\244' [0x00a5]=$'\302\245'
+ [0x00a6]=$'\302\246' [0x00a7]=$'\302\247' [0x00a8]=$'\302\250' [0x00a9]=$'\302\251' [0x00aa]=$'\302\252'
+ [0x00ab]=$'\302\253' [0x00ac]=$'\302\254' [0x00ad]=$'\302\255' [0x00ae]=$'\302\256' [0x00af]=$'\302\257'
+ [0x00b0]=$'\302\260' [0x00b1]=$'\302\261' [0x00b2]=$'\302\262' [0x00b3]=$'\302\263' [0x00b4]=$'\302\264'
+ [0x00b5]=$'\302\265' [0x00b6]=$'\302\266' [0x00b7]=$'\302\267' [0x00b8]=$'\302\270' [0x00b9]=$'\302\271'
+ [0x00ba]=$'\302\272' [0x00bb]=$'\302\273' [0x00bc]=$'\302\274' [0x00bd]=$'\302\275' [0x00be]=$'\302\276'
+ [0x00bf]=$'\302\277' [0x00c0]=$'\303\200' [0x00c1]=$'\303\201' [0x00c2]=$'\303\202' [0x00c3]=$'\303\203'
+ [0x00c4]=$'\303\204' [0x00c5]=$'\303\205' [0x00c6]=$'\303\206' [0x00c7]=$'\303\207' [0x00c8]=$'\303\210'
+ [0x00c9]=$'\303\211' [0x00ca]=$'\303\212' [0x00cb]=$'\303\213' [0x00cc]=$'\303\214' [0x00cd]=$'\303\215'
+ [0x00ce]=$'\303\216' [0x00cf]=$'\303\217' [0x00d0]=$'\303\220' [0x00d1]=$'\303\221' [0x00d2]=$'\303\222'
+ [0x00d3]=$'\303\223' [0x00d4]=$'\303\224' [0x00d5]=$'\303\225' [0x00d6]=$'\303\226' [0x00d7]=$'\303\227'
+ [0x00d8]=$'\303\230' [0x00d9]=$'\303\231' [0x00da]=$'\303\232' [0x00db]=$'\303\233' [0x00dc]=$'\303\234'
+ [0x00dd]=$'\303\235' [0x00de]=$'\303\236' [0x00df]=$'\303\237' [0x00e0]=$'\303\240' [0x00e1]=$'\303\241'
+ [0x00e2]=$'\303\242' [0x00e3]=$'\303\243' [0x00e4]=$'\303\244' [0x00e5]=$'\303\245' [0x00e6]=$'\303\246'
+ [0x00e7]=$'\303\247' [0x00e8]=$'\303\250' [0x00e9]=$'\303\251' [0x00ea]=$'\303\252' [0x00eb]=$'\303\253'
+ [0x00ec]=$'\303\254' [0x00ed]=$'\303\255' [0x00ee]=$'\303\256' [0x00ef]=$'\303\257' [0x00f0]=$'\303\260'
+ [0x00f1]=$'\303\261' [0x00f2]=$'\303\262' [0x00f3]=$'\303\263' [0x00f4]=$'\303\264' [0x00f5]=$'\303\265'
+ [0x00f6]=$'\303\266' [0x00f7]=$'\303\267' [0x00f8]=$'\303\270' [0x00f9]=$'\303\271' [0x00fa]=$'\303\272'
+ [0x00fb]=$'\303\273' [0x00fc]=$'\303\274' [0x00fd]=$'\303\275' [0x00fe]=$'\303\276' [0x00ff]=$'\303\277'
+ [0x0100]=$'\304\200' [0x0101]=$'\304\201' [0x0102]=$'\304\202' [0x0103]=$'\304\203' [0x0104]=$'\304\204'
+ [0x0105]=$'\304\205' [0x0106]=$'\304\206' [0x0107]=$'\304\207' [0x0108]=$'\304\210' [0x0109]=$'\304\211'
+ [0x010a]=$'\304\212' [0x010b]=$'\304\213' [0x010c]=$'\304\214' [0x010d]=$'\304\215' [0x010e]=$'\304\216'
+ [0x010f]=$'\304\217' [0x0110]=$'\304\220' [0x0111]=$'\304\221' [0x0112]=$'\304\222' [0x0113]=$'\304\223'
+ [0x0114]=$'\304\224' [0x0115]=$'\304\225' [0x0116]=$'\304\226' [0x0117]=$'\304\227' [0x0118]=$'\304\230'
+ [0x0119]=$'\304\231' [0x011a]=$'\304\232' [0x011b]=$'\304\233' [0x011c]=$'\304\234' [0x011d]=$'\304\235'
+ [0x011e]=$'\304\236' [0x011f]=$'\304\237' [0x0120]=$'\304\240' [0x0121]=$'\304\241' [0x0122]=$'\304\242'
+ [0x0123]=$'\304\243' [0x0124]=$'\304\244' [0x0125]=$'\304\245' [0x0126]=$'\304\246' [0x0127]=$'\304\247'
+ [0x0128]=$'\304\250' [0x0129]=$'\304\251' [0x012a]=$'\304\252' [0x012b]=$'\304\253' [0x012c]=$'\304\254'
+ [0x012d]=$'\304\255' [0x012e]=$'\304\256' [0x012f]=$'\304\257' [0x0130]=$'\304\260' [0x0131]=$'\304\261'
+ [0x0132]=$'\304\262' [0x0133]=$'\304\263' [0x0134]=$'\304\264' [0x0135]=$'\304\265' [0x0136]=$'\304\266'
+ [0x0137]=$'\304\267' [0x0138]=$'\304\270' [0x0139]=$'\304\271' [0x013a]=$'\304\272' [0x013b]=$'\304\273'
+ [0x013c]=$'\304\274' [0x013d]=$'\304\275' [0x013e]=$'\304\276' [0x013f]=$'\304\277' [0x0140]=$'\305\200'
+ [0x0141]=$'\305\201' [0x0142]=$'\305\202' [0x0143]=$'\305\203' [0x0144]=$'\305\204' [0x0145]=$'\305\205'
+ [0x0146]=$'\305\206' [0x0147]=$'\305\207' [0x0148]=$'\305\210' [0x0149]=$'\305\211' [0x014a]=$'\305\212'
+ [0x014b]=$'\305\213' [0x014c]=$'\305\214' [0x014d]=$'\305\215' [0x014e]=$'\305\216' [0x014f]=$'\305\217'
+ [0x0150]=$'\305\220' [0x0151]=$'\305\221' [0x0152]=$'\305\222' [0x0153]=$'\305\223' [0x0154]=$'\305\224'
+ [0x0155]=$'\305\225' [0x0156]=$'\305\226' [0x0157]=$'\305\227' [0x0158]=$'\305\230' [0x0159]=$'\305\231'
+ [0x015a]=$'\305\232' [0x015b]=$'\305\233' [0x015c]=$'\305\234' [0x015d]=$'\305\235' [0x015e]=$'\305\236'
+ [0x015f]=$'\305\237' [0x0160]=$'\305\240' [0x0161]=$'\305\241' [0x0162]=$'\305\242' [0x0163]=$'\305\243'
+ [0x0164]=$'\305\244' [0x0165]=$'\305\245' [0x0166]=$'\305\246' [0x0167]=$'\305\247' [0x0168]=$'\305\250'
+ [0x0169]=$'\305\251' [0x016a]=$'\305\252' [0x016b]=$'\305\253' [0x016c]=$'\305\254' [0x016d]=$'\305\255'
+ [0x016e]=$'\305\256' [0x016f]=$'\305\257' [0x0170]=$'\305\260' [0x0171]=$'\305\261' [0x0172]=$'\305\262'
+ [0x0173]=$'\305\263' [0x0174]=$'\305\264' [0x0175]=$'\305\265' [0x0176]=$'\305\266' [0x0177]=$'\305\267'
+ [0x0178]=$'\305\270' [0x0179]=$'\305\271' [0x017a]=$'\305\272' [0x017b]=$'\305\273' [0x017c]=$'\305\274'
+ [0x017d]=$'\305\275' [0x017e]=$'\305\276' [0x017f]=$'\305\277' [0x0180]=$'\306\200' [0x0181]=$'\306\201'
+ [0x0182]=$'\306\202' [0x0183]=$'\306\203' [0x0184]=$'\306\204' [0x0185]=$'\306\205' [0x0186]=$'\306\206'
+ [0x0187]=$'\306\207' [0x0188]=$'\306\210' [0x0189]=$'\306\211' [0x018a]=$'\306\212' [0x018b]=$'\306\213'
+ [0x018c]=$'\306\214' [0x018d]=$'\306\215' [0x018e]=$'\306\216' [0x018f]=$'\306\217' [0x0190]=$'\306\220'
+ [0x0191]=$'\306\221' [0x0192]=$'\306\222' [0x0193]=$'\306\223' [0x0194]=$'\306\224' [0x0195]=$'\306\225'
+ [0x0196]=$'\306\226' [0x0197]=$'\306\227' [0x0198]=$'\306\230' [0x0199]=$'\306\231' [0x019a]=$'\306\232'
+ [0x019b]=$'\306\233' [0x019c]=$'\306\234' [0x019d]=$'\306\235' [0x019e]=$'\306\236' [0x019f]=$'\306\237'
+ [0x01a0]=$'\306\240' [0x01a1]=$'\306\241' [0x01a2]=$'\306\242' [0x01a3]=$'\306\243' [0x01a4]=$'\306\244'
+ [0x01a5]=$'\306\245' [0x01a6]=$'\306\246' [0x01a7]=$'\306\247' [0x01a8]=$'\306\250' [0x01a9]=$'\306\251'
+ [0x01aa]=$'\306\252' [0x01ab]=$'\306\253' [0x01ac]=$'\306\254' [0x01ad]=$'\306\255' [0x01ae]=$'\306\256'
+ [0x01af]=$'\306\257' [0x01b0]=$'\306\260' [0x01b1]=$'\306\261' [0x01b2]=$'\306\262' [0x01b3]=$'\306\263'
+ [0x01b4]=$'\306\264' [0x01b5]=$'\306\265' [0x01b6]=$'\306\266' [0x01b7]=$'\306\267' [0x01b8]=$'\306\270'
+ [0x01b9]=$'\306\271' [0x01ba]=$'\306\272' [0x01bb]=$'\306\273' [0x01bc]=$'\306\274' [0x01bd]=$'\306\275'
+ [0x01be]=$'\306\276' [0x01bf]=$'\306\277' [0x01c0]=$'\307\200' [0x01c1]=$'\307\201' [0x01c2]=$'\307\202'
+ [0x01c3]=$'\307\203' [0x01c4]=$'\307\204' [0x01c5]=$'\307\205' [0x01c6]=$'\307\206' [0x01c7]=$'\307\207'
+ [0x01c8]=$'\307\210' [0x01c9]=$'\307\211' [0x01ca]=$'\307\212' [0x01cb]=$'\307\213' [0x01cc]=$'\307\214'
+ [0x01cd]=$'\307\215' [0x01ce]=$'\307\216' [0x01cf]=$'\307\217' [0x01d0]=$'\307\220' [0x01d1]=$'\307\221'
+ [0x01d2]=$'\307\222' [0x01d3]=$'\307\223' [0x01d4]=$'\307\224' [0x01d5]=$'\307\225' [0x01d6]=$'\307\226'
+ [0x01d7]=$'\307\227' [0x01d8]=$'\307\230' [0x01d9]=$'\307\231' [0x01da]=$'\307\232' [0x01db]=$'\307\233'
+ [0x01dc]=$'\307\234' [0x01dd]=$'\307\235' [0x01de]=$'\307\236' [0x01df]=$'\307\237' [0x01e0]=$'\307\240'
+ [0x01e1]=$'\307\241' [0x01e2]=$'\307\242' [0x01e3]=$'\307\243' [0x01e4]=$'\307\244' [0x01e5]=$'\307\245'
+ [0x01e6]=$'\307\246' [0x01e7]=$'\307\247' [0x01e8]=$'\307\250' [0x01e9]=$'\307\251' [0x01ea]=$'\307\252'
+ [0x01eb]=$'\307\253' [0x01ec]=$'\307\254' [0x01ed]=$'\307\255' [0x01ee]=$'\307\256' [0x01ef]=$'\307\257'
+ [0x01f0]=$'\307\260' [0x01f1]=$'\307\261' [0x01f2]=$'\307\262' [0x01f3]=$'\307\263' [0x01f4]=$'\307\264'
+ [0x01f5]=$'\307\265' [0x01f6]=$'\307\266' [0x01f7]=$'\307\267' [0x01f8]=$'\307\270' [0x01f9]=$'\307\271'
+ [0x01fa]=$'\307\272' [0x01fb]=$'\307\273' [0x01fc]=$'\307\274' [0x01fd]=$'\307\275' [0x01fe]=$'\307\276'
+ [0x01ff]=$'\307\277' [0x0200]=$'\310\200' [0x0201]=$'\310\201' [0x0202]=$'\310\202' [0x0203]=$'\310\203'
+ [0x0204]=$'\310\204' [0x0205]=$'\310\205' [0x0206]=$'\310\206' [0x0207]=$'\310\207' [0x0208]=$'\310\210'
+ [0x0209]=$'\310\211' [0x020a]=$'\310\212' [0x020b]=$'\310\213' [0x020c]=$'\310\214' [0x020d]=$'\310\215'
+ [0x020e]=$'\310\216' [0x020f]=$'\310\217' [0x0210]=$'\310\220' [0x0211]=$'\310\221' [0x0212]=$'\310\222'
+ [0x0213]=$'\310\223' [0x0214]=$'\310\224' [0x0215]=$'\310\225' [0x0216]=$'\310\226' [0x0217]=$'\310\227'
+ [0x0218]=$'\310\230' [0x0219]=$'\310\231' [0x021a]=$'\310\232' [0x021b]=$'\310\233' [0x021c]=$'\310\234'
+ [0x021d]=$'\310\235' [0x021e]=$'\310\236' [0x021f]=$'\310\237' [0x0220]=$'\310\240' [0x0221]=$'\310\241'
+ [0x0222]=$'\310\242' [0x0223]=$'\310\243' [0x0224]=$'\310\244' [0x0225]=$'\310\245' [0x0226]=$'\310\246'
+ [0x0227]=$'\310\247' [0x0228]=$'\310\250' [0x0229]=$'\310\251' [0x022a]=$'\310\252' [0x022b]=$'\310\253'
+ [0x022c]=$'\310\254' [0x022d]=$'\310\255' [0x022e]=$'\310\256' [0x022f]=$'\310\257' [0x0230]=$'\310\260'
+ [0x0231]=$'\310\261' [0x0232]=$'\310\262' [0x0233]=$'\310\263' [0x0234]=$'\310\264' [0x0235]=$'\310\265'
+ [0x0236]=$'\310\266' [0x0237]=$'\310\267' [0x0238]=$'\310\270' [0x0239]=$'\310\271' [0x023a]=$'\310\272'
+ [0x023b]=$'\310\273' [0x023c]=$'\310\274' [0x023d]=$'\310\275' [0x023e]=$'\310\276' [0x023f]=$'\310\277'
+ [0x0240]=$'\311\200' [0x0241]=$'\311\201' [0x0242]=$'\311\202' [0x0243]=$'\311\203' [0x0244]=$'\311\204'
+ [0x0245]=$'\311\205' [0x0246]=$'\311\206' [0x0247]=$'\311\207' [0x0248]=$'\311\210' [0x0249]=$'\311\211'
+ [0x024a]=$'\311\212' [0x024b]=$'\311\213' [0x024c]=$'\311\214' [0x024d]=$'\311\215' [0x024e]=$'\311\216'
+ [0x024f]=$'\311\217' [0x0250]=$'\311\220' [0x0251]=$'\311\221' [0x0252]=$'\311\222' [0x0253]=$'\311\223'
+ [0x0254]=$'\311\224' [0x0255]=$'\311\225' [0x0256]=$'\311\226' [0x0257]=$'\311\227' [0x0258]=$'\311\230'
+ [0x0259]=$'\311\231' [0x025a]=$'\311\232' [0x025b]=$'\311\233' [0x025c]=$'\311\234' [0x025d]=$'\311\235'
+ [0x025e]=$'\311\236' [0x025f]=$'\311\237' [0x0260]=$'\311\240' [0x0261]=$'\311\241' [0x0262]=$'\311\242'
+ [0x0263]=$'\311\243' [0x0264]=$'\311\244' [0x0265]=$'\311\245' [0x0266]=$'\311\246' [0x0267]=$'\311\247'
+ [0x0268]=$'\311\250' [0x0269]=$'\311\251' [0x026a]=$'\311\252' [0x026b]=$'\311\253' [0x026c]=$'\311\254'
+ [0x026d]=$'\311\255' [0x026e]=$'\311\256' [0x026f]=$'\311\257' [0x0270]=$'\311\260' [0x0271]=$'\311\261'
+ [0x0272]=$'\311\262' [0x0273]=$'\311\263' [0x0274]=$'\311\264' [0x0275]=$'\311\265' [0x0276]=$'\311\266'
+ [0x0277]=$'\311\267' [0x0278]=$'\311\270' [0x0279]=$'\311\271' [0x027a]=$'\311\272' [0x027b]=$'\311\273'
+ [0x027c]=$'\311\274' [0x027d]=$'\311\275' [0x027e]=$'\311\276' [0x027f]=$'\311\277' [0x0280]=$'\312\200'
+ [0x0281]=$'\312\201' [0x0282]=$'\312\202' [0x0283]=$'\312\203' [0x0284]=$'\312\204' [0x0285]=$'\312\205'
+ [0x0286]=$'\312\206' [0x0287]=$'\312\207' [0x0288]=$'\312\210' [0x0289]=$'\312\211' [0x028a]=$'\312\212'
+ [0x028b]=$'\312\213' [0x028c]=$'\312\214' [0x028d]=$'\312\215' [0x028e]=$'\312\216' [0x028f]=$'\312\217'
+ [0x0290]=$'\312\220' [0x0291]=$'\312\221' [0x0292]=$'\312\222' [0x0293]=$'\312\223' [0x0294]=$'\312\224'
+ [0x0295]=$'\312\225' [0x0296]=$'\312\226' [0x0297]=$'\312\227' [0x0298]=$'\312\230' [0x0299]=$'\312\231'
+ [0x029a]=$'\312\232' [0x029b]=$'\312\233' [0x029c]=$'\312\234' [0x029d]=$'\312\235' [0x029e]=$'\312\236'
+ [0x029f]=$'\312\237' [0x02a0]=$'\312\240' [0x02a1]=$'\312\241' [0x02a2]=$'\312\242' [0x02a3]=$'\312\243'
+ [0x02a4]=$'\312\244' [0x02a5]=$'\312\245' [0x02a6]=$'\312\246' [0x02a7]=$'\312\247' [0x02a8]=$'\312\250'
+ [0x02a9]=$'\312\251' [0x02aa]=$'\312\252' [0x02ab]=$'\312\253' [0x02ac]=$'\312\254' [0x02ad]=$'\312\255'
+ [0x02ae]=$'\312\256' [0x02af]=$'\312\257' [0x02b0]=$'\312\260' [0x02b1]=$'\312\261' [0x02b2]=$'\312\262'
+ [0x02b3]=$'\312\263' [0x02b4]=$'\312\264' [0x02b5]=$'\312\265' [0x02b6]=$'\312\266' [0x02b7]=$'\312\267'
+ [0x02b8]=$'\312\270' [0x02b9]=$'\312\271' [0x02ba]=$'\312\272' [0x02bb]=$'\312\273' [0x02bc]=$'\312\274'
+ [0x02bd]=$'\312\275' [0x02be]=$'\312\276' [0x02bf]=$'\312\277' [0x02c0]=$'\313\200' [0x02c1]=$'\313\201'
+ [0x02c2]=$'\313\202' [0x02c3]=$'\313\203' [0x02c4]=$'\313\204' [0x02c5]=$'\313\205' [0x02c6]=$'\313\206'
+ [0x02c7]=$'\313\207' [0x02c8]=$'\313\210' [0x02c9]=$'\313\211' [0x02ca]=$'\313\212' [0x02cb]=$'\313\213'
+ [0x02cc]=$'\313\214' [0x02cd]=$'\313\215' [0x02ce]=$'\313\216' [0x02cf]=$'\313\217' [0x02d0]=$'\313\220'
+ [0x02d1]=$'\313\221' [0x02d2]=$'\313\222' [0x02d3]=$'\313\223' [0x02d4]=$'\313\224' [0x02d5]=$'\313\225'
+ [0x02d6]=$'\313\226' [0x02d7]=$'\313\227' [0x02d8]=$'\313\230' [0x02d9]=$'\313\231' [0x02da]=$'\313\232'
+ [0x02db]=$'\313\233' [0x02dc]=$'\313\234' [0x02dd]=$'\313\235' [0x02de]=$'\313\236' [0x02df]=$'\313\237'
+ [0x02e0]=$'\313\240' [0x02e1]=$'\313\241' [0x02e2]=$'\313\242' [0x02e3]=$'\313\243' [0x02e4]=$'\313\244'
+ [0x02e5]=$'\313\245' [0x02e6]=$'\313\246' [0x02e7]=$'\313\247' [0x02e8]=$'\313\250' [0x02e9]=$'\313\251'
+ [0x02ea]=$'\313\252' [0x02eb]=$'\313\253' [0x02ec]=$'\313\254' [0x02ed]=$'\313\255' [0x02ee]=$'\313\256'
+ [0x02ef]=$'\313\257' [0x02f0]=$'\313\260' [0x02f1]=$'\313\261' [0x02f2]=$'\313\262' [0x02f3]=$'\313\263'
+ [0x02f4]=$'\313\264' [0x02f5]=$'\313\265' [0x02f6]=$'\313\266' [0x02f7]=$'\313\267' [0x02f8]=$'\313\270'
+ [0x02f9]=$'\313\271' [0x02fa]=$'\313\272' [0x02fb]=$'\313\273' [0x02fc]=$'\313\274' [0x02fd]=$'\313\275'
+ [0x02fe]=$'\313\276' [0x02ff]=$'\313\277' [0x0300]=$'\314\200' [0x0301]=$'\314\201' [0x0302]=$'\314\202'
+ [0x0303]=$'\314\203' [0x0304]=$'\314\204' [0x0305]=$'\314\205' [0x0306]=$'\314\206' [0x0307]=$'\314\207'
+ [0x0308]=$'\314\210' [0x0309]=$'\314\211' [0x030a]=$'\314\212' [0x030b]=$'\314\213' [0x030c]=$'\314\214'
+ [0x030d]=$'\314\215' [0x030e]=$'\314\216' [0x030f]=$'\314\217' [0x0310]=$'\314\220' [0x0311]=$'\314\221'
+ [0x0312]=$'\314\222' [0x0313]=$'\314\223' [0x0314]=$'\314\224' [0x0315]=$'\314\225' [0x0316]=$'\314\226'
+ [0x0317]=$'\314\227' [0x0318]=$'\314\230' [0x0319]=$'\314\231' [0x031a]=$'\314\232' [0x031b]=$'\314\233'
+ [0x031c]=$'\314\234' [0x031d]=$'\314\235' [0x031e]=$'\314\236' [0x031f]=$'\314\237' [0x0320]=$'\314\240'
+ [0x0321]=$'\314\241' [0x0322]=$'\314\242' [0x0323]=$'\314\243' [0x0324]=$'\314\244' [0x0325]=$'\314\245'
+ [0x0326]=$'\314\246' [0x0327]=$'\314\247' [0x0328]=$'\314\250' [0x0329]=$'\314\251' [0x032a]=$'\314\252'
+ [0x032b]=$'\314\253' [0x032c]=$'\314\254' [0x032d]=$'\314\255' [0x032e]=$'\314\256' [0x032f]=$'\314\257'
+ [0x0330]=$'\314\260' [0x0331]=$'\314\261' [0x0332]=$'\314\262' [0x0333]=$'\314\263' [0x0334]=$'\314\264'
+ [0x0335]=$'\314\265' [0x0336]=$'\314\266' [0x0337]=$'\314\267' [0x0338]=$'\314\270' [0x0339]=$'\314\271'
+ [0x033a]=$'\314\272' [0x033b]=$'\314\273' [0x033c]=$'\314\274' [0x033d]=$'\314\275' [0x033e]=$'\314\276'
+ [0x033f]=$'\314\277' [0x0340]=$'\315\200' [0x0341]=$'\315\201' [0x0342]=$'\315\202' [0x0343]=$'\315\203'
+ [0x0344]=$'\315\204' [0x0345]=$'\315\205' [0x0346]=$'\315\206' [0x0347]=$'\315\207' [0x0348]=$'\315\210'
+ [0x0349]=$'\315\211' [0x034a]=$'\315\212' [0x034b]=$'\315\213' [0x034c]=$'\315\214' [0x034d]=$'\315\215'
+ [0x034e]=$'\315\216' [0x034f]=$'\315\217' [0x0350]=$'\315\220' [0x0351]=$'\315\221' [0x0352]=$'\315\222'
+ [0x0353]=$'\315\223' [0x0354]=$'\315\224' [0x0355]=$'\315\225' [0x0356]=$'\315\226' [0x0357]=$'\315\227'
+ [0x0358]=$'\315\230' [0x0359]=$'\315\231' [0x035a]=$'\315\232' [0x035b]=$'\315\233' [0x035c]=$'\315\234'
+ [0x035d]=$'\315\235' [0x035e]=$'\315\236' [0x035f]=$'\315\237' [0x0360]=$'\315\240' [0x0361]=$'\315\241'
+ [0x0362]=$'\315\242' [0x0363]=$'\315\243' [0x0364]=$'\315\244' [0x0365]=$'\315\245' [0x0366]=$'\315\246'
+ [0x0367]=$'\315\247' [0x0368]=$'\315\250' [0x0369]=$'\315\251' [0x036a]=$'\315\252' [0x036b]=$'\315\253'
+ [0x036c]=$'\315\254' [0x036d]=$'\315\255' [0x036e]=$'\315\256' [0x036f]=$'\315\257' [0x0370]=$'\315\260'
+ [0x0371]=$'\315\261' [0x0372]=$'\315\262' [0x0373]=$'\315\263' [0x0374]=$'\315\264' [0x0375]=$'\315\265'
+ [0x0376]=$'\315\266' [0x0377]=$'\315\267' [0x0378]=$'\315\270' [0x0379]=$'\315\271' [0x037a]=$'\315\272'
+ [0x037b]=$'\315\273' [0x037c]=$'\315\274' [0x037d]=$'\315\275' [0x037e]=$'\315\276' [0x037f]=$'\315\277'
+ [0x0380]=$'\316\200' [0x0381]=$'\316\201' [0x0382]=$'\316\202' [0x0383]=$'\316\203' [0x0384]=$'\316\204'
+ [0x0385]=$'\316\205' [0x0386]=$'\316\206' [0x0387]=$'\316\207' [0x0388]=$'\316\210' [0x0389]=$'\316\211'
+ [0x038a]=$'\316\212' [0x038b]=$'\316\213' [0x038c]=$'\316\214' [0x038d]=$'\316\215' [0x038e]=$'\316\216'
+ [0x038f]=$'\316\217' [0x0390]=$'\316\220' [0x0391]=$'\316\221' [0x0392]=$'\316\222' [0x0393]=$'\316\223'
+ [0x0394]=$'\316\224' [0x0395]=$'\316\225' [0x0396]=$'\316\226' [0x0397]=$'\316\227' [0x0398]=$'\316\230'
+ [0x0399]=$'\316\231' [0x039a]=$'\316\232' [0x039b]=$'\316\233' [0x039c]=$'\316\234' [0x039d]=$'\316\235'
+ [0x039e]=$'\316\236' [0x039f]=$'\316\237' [0x03a0]=$'\316\240' [0x03a1]=$'\316\241' [0x03a2]=$'\316\242'
+ [0x03a3]=$'\316\243' [0x03a4]=$'\316\244' [0x03a5]=$'\316\245' [0x03a6]=$'\316\246' [0x03a7]=$'\316\247'
+ [0x03a8]=$'\316\250' [0x03a9]=$'\316\251' [0x03aa]=$'\316\252' [0x03ab]=$'\316\253' [0x03ac]=$'\316\254'
+ [0x03ad]=$'\316\255' [0x03ae]=$'\316\256' [0x03af]=$'\316\257' [0x03b0]=$'\316\260' [0x03b1]=$'\316\261'
+ [0x03b2]=$'\316\262' [0x03b3]=$'\316\263' [0x03b4]=$'\316\264' [0x03b5]=$'\316\265' [0x03b6]=$'\316\266'
+ [0x03b7]=$'\316\267' [0x03b8]=$'\316\270' [0x03b9]=$'\316\271' [0x03ba]=$'\316\272' [0x03bb]=$'\316\273'
+ [0x03bc]=$'\316\274' [0x03bd]=$'\316\275' [0x03be]=$'\316\276' [0x03bf]=$'\316\277' [0x03c0]=$'\317\200'
+ [0x03c1]=$'\317\201' [0x03c2]=$'\317\202' [0x03c3]=$'\317\203' [0x03c4]=$'\317\204' [0x03c5]=$'\317\205'
+ [0x03c6]=$'\317\206' [0x03c7]=$'\317\207' [0x03c8]=$'\317\210' [0x03c9]=$'\317\211' [0x03ca]=$'\317\212'
+ [0x03cb]=$'\317\213' [0x03cc]=$'\317\214' [0x03cd]=$'\317\215' [0x03ce]=$'\317\216' [0x03cf]=$'\317\217'
+ [0x03d0]=$'\317\220' [0x03d1]=$'\317\221' [0x03d2]=$'\317\222' [0x03d3]=$'\317\223' [0x03d4]=$'\317\224'
+ [0x03d5]=$'\317\225' [0x03d6]=$'\317\226' [0x03d7]=$'\317\227' [0x03d8]=$'\317\230' [0x03d9]=$'\317\231'
+ [0x03da]=$'\317\232' [0x03db]=$'\317\233' [0x03dc]=$'\317\234' [0x03dd]=$'\317\235' [0x03de]=$'\317\236'
+ [0x03df]=$'\317\237' [0x03e0]=$'\317\240' [0x03e1]=$'\317\241' [0x03e2]=$'\317\242' [0x03e3]=$'\317\243'
+ [0x03e4]=$'\317\244' [0x03e5]=$'\317\245' [0x03e6]=$'\317\246' [0x03e7]=$'\317\247'
+
+
+ [0x1000]=$'\341\200\200' [0x1001]=$'\341\200\201' [0x1002]=$'\341\200\202' [0x1003]=$'\341\200\203' [0x1004]=$'\341\200\204'
+ [0x1005]=$'\341\200\205' [0x1006]=$'\341\200\206' [0x1007]=$'\341\200\207' [0x1008]=$'\341\200\210' [0x1009]=$'\341\200\211'
+ [0x100a]=$'\341\200\212' [0x100b]=$'\341\200\213' [0x100c]=$'\341\200\214' [0x100d]=$'\341\200\215' [0x100e]=$'\341\200\216'
+ [0x100f]=$'\341\200\217' [0x1010]=$'\341\200\220' [0x1011]=$'\341\200\221' [0x1012]=$'\341\200\222' [0x1013]=$'\341\200\223'
+ [0x1014]=$'\341\200\224' [0x1015]=$'\341\200\225' [0x1016]=$'\341\200\226' [0x1017]=$'\341\200\227' [0x1018]=$'\341\200\230'
+ [0x1019]=$'\341\200\231' [0x101a]=$'\341\200\232' [0x101b]=$'\341\200\233' [0x101c]=$'\341\200\234' [0x101d]=$'\341\200\235'
+ [0x101e]=$'\341\200\236' [0x101f]=$'\341\200\237' [0x1020]=$'\341\200\240' [0x1021]=$'\341\200\241' [0x1022]=$'\341\200\242'
+ [0x1023]=$'\341\200\243' [0x1024]=$'\341\200\244' [0x1025]=$'\341\200\245' [0x1026]=$'\341\200\246' [0x1027]=$'\341\200\247'
+ [0x1028]=$'\341\200\250' [0x1029]=$'\341\200\251' [0x102a]=$'\341\200\252' [0x102b]=$'\341\200\253' [0x102c]=$'\341\200\254'
+ [0x102d]=$'\341\200\255' [0x102e]=$'\341\200\256' [0x102f]=$'\341\200\257' [0x1030]=$'\341\200\260' [0x1031]=$'\341\200\261'
+ [0x1032]=$'\341\200\262' [0x1033]=$'\341\200\263' [0x1034]=$'\341\200\264' [0x1035]=$'\341\200\265' [0x1036]=$'\341\200\266'
+ [0x1037]=$'\341\200\267' [0x1038]=$'\341\200\270' [0x1039]=$'\341\200\271' [0x103a]=$'\341\200\272' [0x103b]=$'\341\200\273'
+ [0x103c]=$'\341\200\274' [0x103d]=$'\341\200\275' [0x103e]=$'\341\200\276' [0x103f]=$'\341\200\277' [0x1040]=$'\341\201\200'
+ [0x1041]=$'\341\201\201' [0x1042]=$'\341\201\202' [0x1043]=$'\341\201\203' [0x1044]=$'\341\201\204' [0x1045]=$'\341\201\205'
+ [0x1046]=$'\341\201\206' [0x1047]=$'\341\201\207' [0x1048]=$'\341\201\210' [0x1049]=$'\341\201\211' [0x104a]=$'\341\201\212'
+ [0x104b]=$'\341\201\213' [0x104c]=$'\341\201\214' [0x104d]=$'\341\201\215' [0x104e]=$'\341\201\216' [0x104f]=$'\341\201\217'
+
+ [0x10000]=$'\360\220\200\200' [0x10001]=$'\360\220\200\201' [0x10002]=$'\360\220\200\202' [0x10003]=$'\360\220\200\203' [0x10004]=$'\360\220\200\204'
+ [0x10005]=$'\360\220\200\205' [0x10006]=$'\360\220\200\206' [0x10007]=$'\360\220\200\207' [0x10008]=$'\360\220\200\210' [0x10009]=$'\360\220\200\211'
+ [0x1000a]=$'\360\220\200\212' [0x1000b]=$'\360\220\200\213' [0x1000c]=$'\360\220\200\214' [0x1000d]=$'\360\220\200\215' [0x1000e]=$'\360\220\200\216'
+ [0x1000f]=$'\360\220\200\217' [0x10010]=$'\360\220\200\220' [0x10011]=$'\360\220\200\221' [0x10012]=$'\360\220\200\222' [0x10013]=$'\360\220\200\223'
+ [0x10014]=$'\360\220\200\224' [0x10015]=$'\360\220\200\225' [0x10016]=$'\360\220\200\226' [0x10017]=$'\360\220\200\227' [0x10018]=$'\360\220\200\230'
+ [0x10019]=$'\360\220\200\231' [0x1001a]=$'\360\220\200\232' [0x1001b]=$'\360\220\200\233' [0x1001c]=$'\360\220\200\234' [0x1001d]=$'\360\220\200\235'
+ [0x1001e]=$'\360\220\200\236' [0x1001f]=$'\360\220\200\237' [0x10020]=$'\360\220\200\240' [0x10021]=$'\360\220\200\241' [0x10022]=$'\360\220\200\242'
+ [0x10023]=$'\360\220\200\243' [0x10024]=$'\360\220\200\244' [0x10025]=$'\360\220\200\245' [0x10026]=$'\360\220\200\246' [0x10027]=$'\360\220\200\247'
+ [0x10028]=$'\360\220\200\250' [0x10029]=$'\360\220\200\251' [0x1002a]=$'\360\220\200\252' [0x1002b]=$'\360\220\200\253' [0x1002c]=$'\360\220\200\254'
+ [0x1002d]=$'\360\220\200\255' [0x1002e]=$'\360\220\200\256' [0x1002f]=$'\360\220\200\257' [0x10030]=$'\360\220\200\260' [0x10031]=$'\360\220\200\261'
+ [0x10032]=$'\360\220\200\262' [0x10033]=$'\360\220\200\263' [0x10034]=$'\360\220\200\264' [0x10035]=$'\360\220\200\265' [0x10036]=$'\360\220\200\266'
+ [0x10037]=$'\360\220\200\267' [0x10038]=$'\360\220\200\270' [0x10039]=$'\360\220\200\271' [0x1003a]=$'\360\220\200\272' [0x1003b]=$'\360\220\200\273'
+ [0x1003c]=$'\360\220\200\274' [0x1003d]=$'\360\220\200\275' [0x1003e]=$'\360\220\200\276' [0x1003f]=$'\360\220\200\277' [0x10040]=$'\360\220\201\200'
+ [0x10041]=$'\360\220\201\201' [0x10042]=$'\360\220\201\202' [0x10043]=$'\360\220\201\203' [0x10044]=$'\360\220\201\204' [0x10045]=$'\360\220\201\205'
+ [0x10046]=$'\360\220\201\206' [0x10047]=$'\360\220\201\207' [0x10048]=$'\360\220\201\210' [0x10049]=$'\360\220\201\211' [0x1004a]=$'\360\220\201\212'
+ [0x1004b]=$'\360\220\201\213' [0x1004c]=$'\360\220\201\214' [0x1004d]=$'\360\220\201\215' [0x1004e]=$'\360\220\201\216' [0x1004f]=$'\360\220\201\217'
+
+ [0x1000000]=$'\371\200\200\200\200' [0x1000001]=$'\371\200\200\200\201' [0x1000002]=$'\371\200\200\200\202' [0x1000003]=$'\371\200\200\200\203' [0x1000004]=$'\371\200\200\200\204'
+ [0x1000005]=$'\371\200\200\200\205' [0x1000006]=$'\371\200\200\200\206' [0x1000007]=$'\371\200\200\200\207' [0x1000008]=$'\371\200\200\200\210' [0x1000009]=$'\371\200\200\200\211'
+ [0x100000a]=$'\371\200\200\200\212' [0x100000b]=$'\371\200\200\200\213' [0x100000c]=$'\371\200\200\200\214' [0x100000d]=$'\371\200\200\200\215' [0x100000e]=$'\371\200\200\200\216'
+ [0x100000f]=$'\371\200\200\200\217' [0x1000010]=$'\371\200\200\200\220' [0x1000011]=$'\371\200\200\200\221' [0x1000012]=$'\371\200\200\200\222' [0x1000013]=$'\371\200\200\200\223'
+ [0x1000014]=$'\371\200\200\200\224' [0x1000015]=$'\371\200\200\200\225' [0x1000016]=$'\371\200\200\200\226' [0x1000017]=$'\371\200\200\200\227' [0x1000018]=$'\371\200\200\200\230'
+ [0x1000019]=$'\371\200\200\200\231' [0x100001a]=$'\371\200\200\200\232' [0x100001b]=$'\371\200\200\200\233' [0x100001c]=$'\371\200\200\200\234' [0x100001d]=$'\371\200\200\200\235'
+ [0x100001e]=$'\371\200\200\200\236' [0x100001f]=$'\371\200\200\200\237' [0x1000020]=$'\371\200\200\200\240' [0x1000021]=$'\371\200\200\200\241' [0x1000022]=$'\371\200\200\200\242'
+ [0x1000023]=$'\371\200\200\200\243' [0x1000024]=$'\371\200\200\200\244' [0x1000025]=$'\371\200\200\200\245' [0x1000026]=$'\371\200\200\200\246' [0x1000027]=$'\371\200\200\200\247'
+ [0x1000028]=$'\371\200\200\200\250' [0x1000029]=$'\371\200\200\200\251' [0x100002a]=$'\371\200\200\200\252' [0x100002b]=$'\371\200\200\200\253' [0x100002c]=$'\371\200\200\200\254'
+ [0x100002d]=$'\371\200\200\200\255' [0x100002e]=$'\371\200\200\200\256' [0x100002f]=$'\371\200\200\200\257' [0x1000030]=$'\371\200\200\200\260' [0x1000031]=$'\371\200\200\200\261'
+ [0x1000032]=$'\371\200\200\200\262' [0x1000033]=$'\371\200\200\200\263' [0x1000034]=$'\371\200\200\200\264' [0x1000035]=$'\371\200\200\200\265' [0x1000036]=$'\371\200\200\200\266'
+ [0x1000037]=$'\371\200\200\200\267' [0x1000038]=$'\371\200\200\200\270' [0x1000039]=$'\371\200\200\200\271' [0x100003a]=$'\371\200\200\200\272' [0x100003b]=$'\371\200\200\200\273'
+ [0x100003c]=$'\371\200\200\200\274' [0x100003d]=$'\371\200\200\200\275' [0x100003e]=$'\371\200\200\200\276' [0x100003f]=$'\371\200\200\200\277' [0x1000040]=$'\371\200\200\201\200'
+ [0x1000041]=$'\371\200\200\201\201' [0x1000042]=$'\371\200\200\201\202' [0x1000043]=$'\371\200\200\201\203' [0x1000044]=$'\371\200\200\201\204' [0x1000045]=$'\371\200\200\201\205'
+ [0x1000046]=$'\371\200\200\201\206' [0x1000047]=$'\371\200\200\201\207' [0x1000048]=$'\371\200\200\201\210' [0x1000049]=$'\371\200\200\201\211' [0x100004a]=$'\371\200\200\201\212'
+ [0x100004b]=$'\371\200\200\201\213' [0x100004c]=$'\371\200\200\201\214' [0x100004d]=$'\371\200\200\201\215' [0x100004e]=$'\371\200\200\201\216' [0x100004f]=$'\371\200\200\201\217'
+
+ [0x70000000]=$'\375\260\200\200\200\200' [0x70000001]=$'\375\260\200\200\200\201' [0x70000002]=$'\375\260\200\200\200\202' [0x70000003]=$'\375\260\200\200\200\203'
+ [0x70000004]=$'\375\260\200\200\200\204' [0x70000005]=$'\375\260\200\200\200\205' [0x70000006]=$'\375\260\200\200\200\206' [0x70000007]=$'\375\260\200\200\200\207' [0x70000008]=$'\375\260\200\200\200\210'
+ [0x70000009]=$'\375\260\200\200\200\211' [0x7000000a]=$'\375\260\200\200\200\212' [0x7000000b]=$'\375\260\200\200\200\213' [0x7000000c]=$'\375\260\200\200\200\214' [0x7000000d]=$'\375\260\200\200\200\215'
+ [0x7000000e]=$'\375\260\200\200\200\216' [0x7000000f]=$'\375\260\200\200\200\217' [0x70000010]=$'\375\260\200\200\200\220' [0x70000011]=$'\375\260\200\200\200\221' [0x70000012]=$'\375\260\200\200\200\222'
+ [0x70000013]=$'\375\260\200\200\200\223' [0x70000014]=$'\375\260\200\200\200\224' [0x70000015]=$'\375\260\200\200\200\225' [0x70000016]=$'\375\260\200\200\200\226' [0x70000017]=$'\375\260\200\200\200\227'
+ [0x70000018]=$'\375\260\200\200\200\230' [0x70000019]=$'\375\260\200\200\200\231' [0x7000001a]=$'\375\260\200\200\200\232' [0x7000001b]=$'\375\260\200\200\200\233' [0x7000001c]=$'\375\260\200\200\200\234'
+ [0x7000001d]=$'\375\260\200\200\200\235' [0x7000001e]=$'\375\260\200\200\200\236' [0x7000001f]=$'\375\260\200\200\200\237' [0x70000020]=$'\375\260\200\200\200\240' [0x70000021]=$'\375\260\200\200\200\241'
+ [0x70000022]=$'\375\260\200\200\200\242' [0x70000023]=$'\375\260\200\200\200\243' [0x70000024]=$'\375\260\200\200\200\244' [0x70000025]=$'\375\260\200\200\200\245' [0x70000026]=$'\375\260\200\200\200\246'
+ [0x70000027]=$'\375\260\200\200\200\247' [0x70000028]=$'\375\260\200\200\200\250' [0x70000029]=$'\375\260\200\200\200\251' [0x7000002a]=$'\375\260\200\200\200\252' [0x7000002b]=$'\375\260\200\200\200\253'
+ [0x7000002c]=$'\375\260\200\200\200\254' [0x7000002d]=$'\375\260\200\200\200\255' [0x7000002e]=$'\375\260\200\200\200\256' [0x7000002f]=$'\375\260\200\200\200\257' [0x70000030]=$'\375\260\200\200\200\260'
+ [0x70000031]=$'\375\260\200\200\200\261' [0x70000032]=$'\375\260\200\200\200\262' [0x70000033]=$'\375\260\200\200\200\263' [0x70000034]=$'\375\260\200\200\200\264' [0x70000035]=$'\375\260\200\200\200\265'
+ [0x70000036]=$'\375\260\200\200\200\266' [0x70000037]=$'\375\260\200\200\200\267' [0x70000038]=$'\375\260\200\200\200\270' [0x70000039]=$'\375\260\200\200\200\271' [0x7000003a]=$'\375\260\200\200\200\272'
+ [0x7000003b]=$'\375\260\200\200\200\273' [0x7000003c]=$'\375\260\200\200\200\274' [0x7000003d]=$'\375\260\200\200\200\275' [0x7000003e]=$'\375\260\200\200\200\276' [0x7000003f]=$'\375\260\200\200\200\277'
+ [0x70000040]=$'\375\260\200\200\201\200' [0x70000041]=$'\375\260\200\200\201\201' [0x70000042]=$'\375\260\200\200\201\202' [0x70000043]=$'\375\260\200\200\201\203' [0x70000044]=$'\375\260\200\200\201\204'
+ [0x70000045]=$'\375\260\200\200\201\205' [0x70000046]=$'\375\260\200\200\201\206' [0x70000047]=$'\375\260\200\200\201\207' [0x70000048]=$'\375\260\200\200\201\210' [0x70000049]=$'\375\260\200\200\201\211'
+ [0x7000004a]=$'\375\260\200\200\201\212' [0x7000004b]=$'\375\260\200\200\201\213' [0x7000004c]=$'\375\260\200\200\201\214' [0x7000004d]=$'\375\260\200\200\201\215' [0x7000004e]=$'\375\260\200\200\201\216'
+
+
+
+ )
+TestCodePage en_US.UTF-8 C_UTF_8
+
+if [ ${ErrorCnt} -gt 0 ]; then
+  echo "Failed ${ErrorCnt} of ${TestCnt} Unicode tests"
+else
+  echo "Passed all ${TestCnt} Unicode tests"
+fi
diff --git a/tests/unicode2.sub b/tests/unicode2.sub
new file mode 100644
index 0000000..16dd604
--- /dev/null
+++ b/tests/unicode2.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+. ./test-glue-functions
+
+export LANG=en_US.UTF-8
+
+printf '%s\n' "$(printf '\uff')" | od -b | _intl_normalize_spaces
+printf '%s\n' $'\uff' | od -b | _intl_normalize_spaces
+
+printf '\uff'\\n | od -b | _intl_normalize_spaces
+echo $'\uff' | od -b | _intl_normalize_spaces
+
+printf '\uffff'\\n | od -b | _intl_normalize_spaces
+echo $'\uffff' | od -b | _intl_normalize_spaces
+
+printf '\Ufffffffe'\\n | od -b | _intl_normalize_spaces
+echo $'\Ufffffffe' | od -b | _intl_normalize_spaces
+
+printf '\Uffffffff'\\n | od -b | _intl_normalize_spaces
+echo $'\Uffffffff' | od -b | _intl_normalize_spaces
+
+LC_CTYPE=C printf '\uff'\\n | od -b | _intl_normalize_spaces
+LC_CTYPE=ru_RU.CP1251 printf '\uff'\\n | od -b | _intl_normalize_spaces
+LC_CTYPE=en_US.UTF-8 printf '\uff'\\n | od -b | _intl_normalize_spaces
+
+echo -e '\u0041 \u00a3 \u0152' | od -b | _intl_normalize_spaces
diff --git a/tests/unicode3.sub b/tests/unicode3.sub
new file mode 100644
index 0000000..cb1b873
--- /dev/null
+++ b/tests/unicode3.sub
@@ -0,0 +1,12 @@
+export LANG=en_US.UTF-8	# make sure
+
+cd $TMPDIR	# try to avoid NFS artifacts
+payload=$'\065\247\100\063\231\053\306\123\070\237\242\352\263'
+"$payload"
+
+cd "$payload"
+printf %q "$payload"
+echo
+
+set -x ; : "$payload" ; set +x
+cd $OLDPWD
diff --git a/tests/varenv.right b/tests/varenv.right
index df8086d..f6bd1b5 100644
--- a/tests/varenv.right
+++ b/tests/varenv.right
@@ -22,8 +22,8 @@ AVAR
 AVAR
 42
 /bin:/usr/bin:/usr/local/bin:.
-avar=([0]="/bin:/usr/bin:/usr/local/bin:.")
-z=yy
+declare -a avar=([0]="/bin:/usr/bin:/usr/local/bin:.")
+declare -- z="yy"
 42
 declare -i ivar="10"
 unset
@@ -51,6 +51,227 @@ after fff3: x=4
 |0|12|
 |y|
 |y|
+a:b:c:d
+a-b-c-d
+a:b:c:d
+g: , 
+f: , 
+FIN: asdf fdsa, asdf fdsa
+g: v = , w =
+f: v = , w =
+FIN: v = two, w = one
+./varenv4.sub: line 67: bbb: unique: cannot convert indexed to associative array
+./varenv4.sub: line 67: declare: unique: cannot convert indexed to associative array
+after bbb: 1
+declare -Ar FOOBAR=([foo]="bar" )
+declare -Ar FOOBAR=([foo]="bar" )
+declare -ar FOOBAR2=([0]="bar")
+declare -ar FOOBAR2=([0]="bar")
+F OUTSIDE
+F OUTSIDE
+declare -ar outside=()
+declare -ir outside1="1"
+tempenv = foo
+0
+declare -ar myvar=([0]="0")
+1
+declare -ir myvar="1"
+declare -rx tempvar1='foo'
+declare -rx tempvar2='qux'
+./varenv7.sub: line 57: local: var: readonly variable
+inside: outside
+outside: outside
+local: unset1 unset2
+abc
+abc
+:1
+:2
+after: ----
+global:1
+global:2
+after: --global--
+after: ----
+x = :1:2
+in o1 (readonly modifying local scalars):
+declare -r i1="a b c"
+declare -r j1="1 2 3"
+after o1:
+./varenv9.sub: line 28: declare: i1: not found
+./varenv9.sub: line 28: declare: j1: not found
+in o2 (readonly setting global scalars):
+declare -r i2="a b c"
+declare -r j2="1 2 3"
+after o2:
+declare -r i2="a b c"
+declare -r j2="1 2 3"
+./varenv9.sub: line 46: unset: i2: cannot unset: readonly variable
+./varenv9.sub: line 46: unset: j2: cannot unset: readonly variable
+in o3 (readonly modifying locals, converting to arrays):
+declare -ar i3=([0]="a" [1]="b" [2]="c")
+declare -ar j3=([0]="1" [1]="2" [2]="3")
+after o3:
+./varenv9.sub: line 61: declare: i3: not found
+./varenv9.sub: line 61: declare: j3: not found
+in o4 (readonly setting global array variables):
+declare -ar i4=([0]="a" [1]="b" [2]="c")
+declare -ar j4=([0]="1" [1]="2" [2]="3")
+after o4:
+declare -ar i4=([0]="a" [1]="b" [2]="c")
+declare -ar j4=([0]="1" [1]="2" [2]="3")
+./varenv9.sub: line 79: unset: i4: cannot unset: readonly variable
+./varenv9.sub: line 79: unset: j4: cannot unset: readonly variable
+main: unset
+inner: res unset
+outer: res: X Y
+main: after first call: X
+inner: X
+outer: res: X Y
+main: after second call: X
+func: null or unset
+after func: x = outside
+./varenv11.sub: line 17: local: qux: readonly variable
+./varenv11.sub: line 18: qux: readonly variable
+./varenv11.sub: line 18: local: qux: readonly variable
+declare -A foo=([zero]="zero" [one]="one" )
+declare -a bar=([0]="zero" [1]="one")
+declare -A foo=([one]="one" [zero]="zero" )
+declare -a bar=([0]="zero" [1]="one")
+./varenv11.sub: line 42: a: readonly variable
+foo=abc
+func1: var =
+
+func1: var =
+
+inside: declare -- foo
+outside:
+declare -x foo="abc"
+inside: declare -x var="value"
+outside: declare -- var="one"
+inside: declare -x var="value"
+outside: declare -- var="outside"
+inside: declare -x var="inside"
+outside: declare -- var="outside"
+outside 1.0: var=one
+outside 1.1: var=one
+inside func: var=two
+outside 2.0: var=
+inside func: var=two
+outside 2.1: var=global
+inside func1: var=value
+outside 3.0: var=value
+inside func2: var=global
+outside 4.0: var=outside
+foo: hello world
+after foo: var=global
+bar: hello world
+after bar: var=global
+./varenv13.sub: line 16: `var[0]': not a valid identifier
+./varenv13.sub: line 16: `var[@]': not a valid identifier
+./varenv13.sub: line 14: declare: var: not found
+declare -A var=([0]="X" ["@"]="Y" )
+help
+./varenv13.sub: line 35: `var[0]': not a valid identifier
+1
+declare -A var=([0]="X" )
+declare -A var=([Y]="Y" )
+declare -A var=([Y]="Y" )
+declare -A var=()
+declare -A var=()
+./varenv14.sub: line 31: f: var: cannot convert indexed to associative array
+./varenv14.sub: line 31: declare: var: cannot convert indexed to associative array
+declare -a var=([0]="12")
+declare -a a=([0]="X")
+declare -a s=([0]="X")
+declare -a a=([0]="X" [1]="Y")
+declare -a s=([0]="X" [1]="Y")
+declare -a a=([0]="XY")
+declare -a s=([0]="XY")
+f: 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 48 49 50
+f1: after: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+done: 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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
+f3:1
+f3:2
+f3:3
+f3:4
+f3:5
+f3:6
+f3:7
+f3:8
+f3:9
+f3:10
+f3:11
+f3:12
+f3:13
+f3:14
+f3:15
+f3:16
+f3:17
+f3:18
+f3:19
+f3:20
+before source: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+varenv15.in: before set: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+varenv15.in: after set: 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
+after source 1: 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
+varenv15.in: before set: one two three four five six seven eight nine ten
+varenv15.in: after set: 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
+after source 2: 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
+foo=showfoo environment foo=showfoo
+foo=showfoo environment foo=showfoo
+foo=showfoo environment foo=showfoo
+outside: foo=
+
+posix mode
+foo=showfoo environment foo=showfoo
+outside 1.0: foo=
+foo=showfoo environment foo=showfoo
+foo=showfoo environment foo=showfoo
+outside 1.1: foo=
+foo= environment foo=
+outside 2.0: foo=
+foo=foo environment foo=foo
+foo= environment foo=
+outside 2.1: foo=
+declare -- var="global"
+declare -- var
+declare -- var="local"
+declare -- var="global"
+declare -- var="local"
+declare -- var
+declare -- var="local"
+declare -- var
+declare -- var="local"
+declare -- var
+declare -- var="local"
+declare -- var="f1"
+declare -- var="local"
+declare -a arr=([0]="zero" [1]="one" [2]="two" [3]="three" [4]="four" [5]="five")
+declare -a arr=([0]="zero" [1]="one" [2]="two")
+declare -a arr=([0]="three" [1]="four" [2]="five")
+declare -a arr=([0]="zero" [1]="one" [2]="two")
+ddd 0
+aaa 1 2 3
+bbb 4 5 6
+ccc 7 8 9
+declare -a x=([0]="one" [1]="two" [2]="three")
+./varenv19.sub: line 51: declare: x: not found
+declare -x v="x"
+declare -x v="t"
+declare -- v
+declare -x v
+ignoreeof      	on
+ignoreeof      	off
+ignoreeof      	on
+10
+match 1
+trap -- 'echo trap:$FUNCNAME' EXIT
+trap:f
+trap -- 'echo trap:$FUNCNAME' EXIT
+trap:f
+trap -- 'echo trap:$FUNCNAME' EXIT
+trap:f
+trap -- 'echo trap:$FUNCNAME' EXIT
+trap:f
 a=z
 a=b
 a=z
diff --git a/tests/varenv.sh b/tests/varenv.tests
similarity index 65%
rename from tests/varenv.sh
rename to tests/varenv.tests
index 77776f9..68c619e 100644
--- a/tests/varenv.sh
+++ b/tests/varenv.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 #
 # varenv.sh
 #
@@ -202,5 +215,51 @@ $THIS_SH ./varenv1.sub
 # more tests; bugs in bash up to version 2.05a
 $THIS_SH ./varenv2.sub
 
+# more tests; bugs in bash IFS scoping up through version 4.2
+$THIS_SH ./varenv3.sub
+
+# scoping problems with declare -g through bash-4.2
+${THIS_SH} ./varenv4.sub
+
+# more scoping and declaration problems with -g and arrays through bash-4.2
+${THIS_SH} ./varenv5.sub
+
+# variable scoping in the presence of nameref
+${THIS_SH} ./varenv6.sub
+
+# variable declaration problems with arrays and readonly local variables
+${THIS_SH} ./varenv7.sub
+
+# variable visibility problems with process substitution subshells in
+# redirections
+${THIS_SH} ./varenv8.sub
+
+# make sure that builtins like readonly and export modify local array variables
+# if executed in shell functions, like they modify local scalar variables
+${THIS_SH} ./varenv9.sub
+
+# more tests of unset and local variables with dynamic scoping
+${THIS_SH} ./varenv10.sub
+
+# tests of compound assignments in function scope
+${THIS_SH} ./varenv11.sub
+
+# temporary environment variable propagation and scoping in posix mode
+${THIS_SH} ./varenv12.sub
+
+# temporary environment and invalid shell identifier names
+${THIS_SH} ./varenv13.sub
+
+# localvar_inherit
+${THIS_SH} ./varenv14.sub
+${THIS_SH} ./varenv15.sub
+${THIS_SH} ./varenv16.sub
+${THIS_SH} ./varenv17.sub
+${THIS_SH} ./varenv18.sub
+${THIS_SH} ./varenv19.sub
+${THIS_SH} ./varenv20.sub
+${THIS_SH} ./varenv21.sub
+${THIS_SH} ./varenv22.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
index 168f87b..8def153 100644
--- a/tests/varenv1.sub
+++ b/tests/varenv1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 # test out the export behavior of variable assignments preceding `eval', `.'
 # and shell functions
 
diff --git a/tests/varenv10.sub b/tests/varenv10.sub
new file mode 100644
index 0000000..aa0175a
--- /dev/null
+++ b/tests/varenv10.sub
@@ -0,0 +1,59 @@
+#   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 .
+#
+#
+# various tests of unset when applied to variables at different local scopes
+#
+# function unsetting variable at previous local scope, uncovering global
+
+inner()
+{
+    unset res
+    echo ${FUNCNAME}: ${res-res unset}
+    if [[ $1 == "set" ]]; then
+        res[0]="X"
+        res[1]="Y"
+    fi
+}
+
+outer()
+{
+    local res=
+    inner "$1"
+    echo ${FUNCNAME}: "res: ${res[@]}"
+}
+
+echo main: ${res-unset}
+outer set
+echo main: after first call: ${res-unset}
+outer dontset 
+echo main: after second call: ${res-unset}
+
+unset -f outer inner
+unset res
+
+# local scope, unset variable at the same scope as local declaration
+func()
+{
+	typeset x=4
+
+	unset x
+	echo ${FUNCNAME}: ${x:-null or unset}
+}
+
+x=outside
+func
+echo after func: x = $x
+
+unset -f func
+unset x
diff --git a/tests/varenv11.sub b/tests/varenv11.sub
new file mode 100644
index 0000000..638aa2c
--- /dev/null
+++ b/tests/varenv11.sub
@@ -0,0 +1,43 @@
+#   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 .
+#
+# couple of errors here
+func()
+{
+	local qux=7
+	local qux=(one two)
+	local what=(zero one two)
+}
+
+readonly qux=42
+func
+
+func2()
+{
+	declare -gA foo=([zero]=zero [one]=one)
+	declare -ga bar=(zero one)
+}
+
+foo=help
+bar=me
+
+func2
+
+declare -p foo bar
+unset foo bar
+func2
+declare -p foo bar
+
+readonly a=7
+a=(1 2 3)
+
diff --git a/tests/varenv12.sub b/tests/varenv12.sub
new file mode 100644
index 0000000..92b3692
--- /dev/null
+++ b/tests/varenv12.sub
@@ -0,0 +1,171 @@
+#   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 .
+#
+set -o posix
+
+fn() { foo=abc : ; typeset +x foo; printenv|grep ^foo=; }
+
+fn
+unset -v foo
+unset -f fn
+
+func1() {
+  var=1
+  var=2 :       # or 'var=2 return', or another special builtin
+  unset -v var
+  echo $FUNCNAME: var = $var
+}
+func2() {
+  func1
+  unset -v var  # bug: fails silently
+}
+func1
+echo ${var+"BUG: still set 1"}
+
+unset var
+func2
+echo ${var+"BUG: still set 2"}
+
+unset -v var
+unset -f func1 func2
+
+fn() { foo=abc : ; typeset +x foo; echo -n 'inside: ' ; declare -p foo; }
+fn
+echo outside:
+declare -p foo
+
+unset -v foo
+unset -f fn
+
+func()
+{
+	var=value declare -x var
+	echo -n 'inside: ' ; declare -p var
+}
+
+var=one
+func
+echo -n 'outside: ' ; declare -p var
+
+unset -v var
+unset -f func
+
+# this will probably change behavior; export shouldn't behave like this when
+# not in posix mode and the sequencing is probably wrong in posix mode. since
+# export is a special builtin, the variable assignment should modify the
+# local variable, as if a standalone assignment statement had been executed
+# (posix modifying "the current execution environment") leaving the global
+# variable unchanged. all shells, including bash, modify the local variable;
+# bash was the only one that propagates the value out to the calling
+# environment, but no longer does so.
+
+func()
+{
+	local var=inside
+	var=value export var
+	echo -n 'inside: ' ; declare -p var
+}
+
+var=outside
+func
+echo -n 'outside: ' ; declare -p var
+
+unset -v var
+unset -f func
+
+func()
+{
+	local var=local
+	var=inside :
+	echo -n 'inside: ' ; declare -p var
+}
+
+var=outside
+func
+echo -n 'outside: ' ; declare -p var
+
+unset -v var
+unset -f func
+
+func()
+{
+	echo -n 'inside func: ' ; echo "var=${var-}"
+}
+
+unset -v var
+var=one :
+echo -n 'outside 1.0: ' ; echo "var=${var-}"
+
+unset -v var
+var=one eval ':'
+echo -n 'outside 1.1: ' ; echo "var=${var-}"
+
+unset -v var
+
+var=two func
+echo -n 'outside 2.0: ' ; echo "var=${var-}"
+var=global
+var=two func
+echo -n 'outside 2.1: ' ; echo "var=${var-}"
+
+unset -v var
+unset -f func
+
+func1()
+{
+	var=value export var
+	echo -n 'inside func1: ' ; echo "var=${var-}"
+}
+
+var=outside
+func1
+echo -n 'outside 3.0: ' ; echo "var=${var-}"
+
+unset -v var
+unset -f func1
+
+func2()
+{
+	local var=local
+	var=global :
+	echo -n 'inside func2: ' ; echo "var=${var-}"
+}
+
+var=outside
+func2
+echo -n 'outside 4.0: ' ; echo "var=${var-}"
+
+unset -v var
+unset -f fecho foo bar
+
+fecho() {
+    echo $var
+}
+
+foo() {
+    local var="foo: bye bye"
+    var="foo: hello world" fecho
+}
+
+bar() {
+    var="bar: hello world" fecho
+}
+
+var=global
+var=outside foo
+echo after foo: var=$var
+var=global
+var=outside bar
+echo after bar: var=$var
+
+unset -v var
diff --git a/tests/varenv13.sub b/tests/varenv13.sub
new file mode 100644
index 0000000..1fa7d5b
--- /dev/null
+++ b/tests/varenv13.sub
@@ -0,0 +1,37 @@
+#   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 .
+#
+f() { declare -p ${!var*} | grep ^var; declare -p var ; }
+
+var[0]=X var[@]=Y f
+
+unset -f f
+unset -v var
+
+typeset -A var
+
+f() { declare -p ${!var*}; }
+
+# this is no longer an error
+var[0]=X var[@]=Y
+f
+
+: ${THIS_SH:=./bash}
+env 'v[0]=help' ${THIS_SH} -c 'printenv "v[0]"'
+
+unset -v var
+
+f() { test -v 'var[0]'; echo $?; }
+var[0]=X f
+
+unset -v var
diff --git a/tests/varenv14.sub b/tests/varenv14.sub
new file mode 100644
index 0000000..091c470
--- /dev/null
+++ b/tests/varenv14.sub
@@ -0,0 +1,46 @@
+#   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 .
+#
+# testing framework for local variable inheritance
+
+shopt -s localvar_inherit
+declare -A var
+
+f() { declare var+=([0]=X); declare -p var; }
+f
+
+f() { declare var=([Y]=Y); declare -p var; }; f
+f() { declare var+=([Y]=Y); declare -p var; }; f
+f() { declare var+=(); declare -p var; }; f
+f() { declare var=(); declare -p var; }; f
+
+unset -f f
+unset -v var
+
+declare -a var=( [0]=12 )
+f() { declare -A var+=([0]=X); declare -p var; }
+f
+
+unset -f f
+unset a s
+
+a=(X) s=X
+
+f() { local -a a s; declare -p a s; }
+f
+
+f() { local a+=(Y) s+=(Y); declare -p a s; }
+f
+
+f() { local -a a+=Y s+=Y; declare -p a s; }
+f
diff --git a/tests/varenv15.in b/tests/varenv15.in
new file mode 100644
index 0000000..e635b12
--- /dev/null
+++ b/tests/varenv15.in
@@ -0,0 +1,3 @@
+echo varenv15.in: before set: "$@"
+set -- 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
+echo varenv15.in: after set: "$@"
diff --git a/tests/varenv15.sub b/tests/varenv15.sub
new file mode 100644
index 0000000..4c9ef0e
--- /dev/null
+++ b/tests/varenv15.sub
@@ -0,0 +1,51 @@
+#   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 .
+#
+# check saving and restoring positional parameters around function calls
+
+f()
+{
+	echo $FUNCNAME: "$@"
+}
+
+f1()
+{
+	f {1..50}
+	echo $FUNCNAME: after: $@
+}
+
+set -- {1..100}
+
+f1 {1..20}
+echo done: $@
+
+f3()
+{
+	echo $FUNCNAME:$1
+	shift
+	if [ $# -le 0 ]; then
+		return
+	fi
+	f3 "$@"
+}
+
+f3 {1..20}
+
+# now let's try source with and without positional parameters
+
+set -- {1..20}
+echo before source: "$@"
+. ./varenv15.in
+echo after source 1: "$@"
+. ./varenv15.in one two three four five six seven eight nine ten
+echo after source 2: "$@"
diff --git a/tests/varenv16.sub b/tests/varenv16.sub
new file mode 100644
index 0000000..847926c
--- /dev/null
+++ b/tests/varenv16.sub
@@ -0,0 +1,51 @@
+#   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 .
+#
+# test whether or not temporary environment assignments are exported
+# in posix mode. works now, posix says it will not work in the future
+
+show2()
+{
+        printf %s "foo=${foo-}"
+        echo -n ' environment foo='
+        printenv foo || echo
+}
+
+showfoo()
+{
+	local foo
+
+	foo=showfoo show2
+}
+
+unset foo
+showfoo
+foo=foo showfoo
+showfoo
+echo outside: "foo=${foo-}"
+
+echo ; echo 'posix mode'
+set -o posix
+unset foo
+showfoo
+echo outside 1.0: "foo=${foo-}"
+foo=foo showfoo
+showfoo
+echo outside 1.1: "foo=${foo-}"
+
+unset foo
+show2
+echo outside 2.0: "foo=${foo-}"
+foo=foo show2
+show2
+echo outside 2.1: "foo=${foo-}"
diff --git a/tests/varenv17.sub b/tests/varenv17.sub
new file mode 100644
index 0000000..1f9278c
--- /dev/null
+++ b/tests/varenv17.sub
@@ -0,0 +1,44 @@
+#   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 .
+#
+
+# testing -I and local variable inheritance
+var=global
+
+f()
+{
+	local $1 var
+	declare -p var
+
+	var=local
+	declare -p var
+}
+
+declare -I var
+declare -p var
+
+f
+f -I
+unset var
+f
+f -I
+
+f1()
+{
+	var=$FUNCNAME
+
+	f
+	f -I
+}
+
+f1
diff --git a/tests/varenv18.sub b/tests/varenv18.sub
new file mode 100644
index 0000000..4ad7f1a
--- /dev/null
+++ b/tests/varenv18.sub
@@ -0,0 +1,41 @@
+#   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 .
+#
+
+arr=(zero one two)
+four=four
+
+f()
+{
+	local -a arr=( "${arr[@]}" )
+	arr+=(three four five)
+	declare -p arr
+}
+f
+declare -p arr
+
+f1()
+{
+	local -a arr=(three $four five)
+	declare -p arr
+}
+f1
+
+set -u
+name='arr[@]'
+f2()
+{
+	local -a arr=("${!name}")
+	declare -p arr
+}
+f2
diff --git a/tests/varenv19.sub b/tests/varenv19.sub
new file mode 100644
index 0000000..753f508
--- /dev/null
+++ b/tests/varenv19.sub
@@ -0,0 +1,51 @@
+#   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 .
+#
+
+# variable attribute inheritance problems without specifying -a or -A
+
+function aaa() {
+        local x='1 2 3'
+        echo "aaa ${x}"
+}
+
+function bbb {
+        local x
+        x=(4 5 6)
+        echo "bbb ${x[*]}"
+}
+
+ccc()
+{
+        local x=(7 8 9)
+        echo "ccc ${x[*]}"
+}
+
+function ddd
+{
+        local -r x='0'
+        echo "ddd ${x}"
+        aaa
+        bbb
+        ccc
+}
+
+ddd
+
+f()
+{
+	local x=(one two three)
+	declare -p x
+}
+f
+declare -p x
diff --git a/tests/varenv2.sub b/tests/varenv2.sub
index b293572..0fde5b2 100644
--- a/tests/varenv2.sub
+++ b/tests/varenv2.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 fff()
 {
 	typeset i=0 x=10
diff --git a/tests/varenv20.sub b/tests/varenv20.sub
new file mode 100644
index 0000000..5fba8c4
--- /dev/null
+++ b/tests/varenv20.sub
@@ -0,0 +1,13 @@
+# tests of local variables with the same name as variables passed in the
+# temporary environment
+
+f() { local v=x; local -p; }
+v=t f
+
+f() { local v; declare -p v; }
+v=t f
+
+f() { local v=x; unset v; declare -p v; }
+v=g
+f
+v=t f
diff --git a/tests/varenv21.sub b/tests/varenv21.sub
new file mode 100644
index 0000000..613e475
--- /dev/null
+++ b/tests/varenv21.sub
@@ -0,0 +1,48 @@
+#   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 .
+#
+# test behavior of `local -' inside shell functions
+
+IGNOREEOF=0
+shopt -o ignoreeof
+
+f()
+{
+	local -
+	set +o ignoreeof
+	shopt -o ignoreeof
+}
+
+f
+shopt -o ignoreeof
+echo $IGNOREEOF
+
+unset -f f
+
+f()
+{
+	local -
+	set -m -H +B
+	set -u
+}
+
+before="$-|$SHELLOPTS"
+f
+after="$-|$SHELLOPTS"
+
+case "$after" in
+$before)	echo match 1 ;;
+*)		echo bad 1 ;;
+esac
+
+unset -f f
diff --git a/tests/varenv22.sub b/tests/varenv22.sub
new file mode 100644
index 0000000..6d42bb5
--- /dev/null
+++ b/tests/varenv22.sub
@@ -0,0 +1,17 @@
+# test behavior of FUNCNAME in and out of parse_and_execute scenarios
+
+# in parse_and_execute
+${THIS_SH} -c 'trap "echo trap:\$FUNCNAME" EXIT ; trap ; f() { exit; } ; f' bash
+
+${THIS_SH} << \EOF
+eval "trap 'echo trap:\$FUNCNAME' EXIT ; trap; f() { exit; } ; f"
+EOF
+
+# not in parse_and_execute
+${THIS_SH} << \EOF
+trap 'echo trap:$FUNCNAME' EXIT ; trap; f() { exit; } ; f
+EOF
+
+# this has to be last
+trap 'echo trap:$FUNCNAME' EXIT ; trap; f() { exit; } ; f
+
diff --git a/tests/varenv3.sub b/tests/varenv3.sub
new file mode 100644
index 0000000..854e483
--- /dev/null
+++ b/tests/varenv3.sub
@@ -0,0 +1,44 @@
+#   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 .
+#
+
+oifs=$IFS
+
+inner () {
+#recho inner: "$IFS" >&2
+	echo a/b/c/d
+	exit 0
+}
+
+outer() {
+#recho outer: "$IFS" >&2
+for i in 1; do
+	IFS=/ read m v k a < <(IFS=$oifs inner)
+
+echo $m:$v:$k:$a
+done
+}
+
+outer
+unset m k v a b c d
+
+for j in 1; do
+	IFS=: read a b c d
+done < <(outer)
+
+echo $a-$b-$c-$d
+unset m k v a b c d
+
+IFS=: read a b c d < <(outer)
+
+echo $a:$b:$c:$d
diff --git a/tests/varenv4.sub b/tests/varenv4.sub
new file mode 100644
index 0000000..9735b61
--- /dev/null
+++ b/tests/varenv4.sub
@@ -0,0 +1,71 @@
+#   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 .
+#
+f()
+{
+	local -a v
+	local -a w
+
+	g
+	echo "f: ${v[@]}, ${w[@]}"
+}
+
+g()
+{
+	aux=v
+	declare -ga "$aux=( asdf fdsa )"
+	declare -ga w=( asdf fdsa )
+
+	echo "g: ${v[@]}, ${w[@]}"
+}
+
+f
+echo "FIN: ${v[@]}, ${w[@]}"
+
+unset v w
+unset -f f g
+
+f()
+{
+	local  v
+	local  w
+
+	g
+	echo f: v = $v, w = $w
+}
+
+g()
+{
+	aux=v
+	declare -g w=one
+	declare -g "$aux=two"
+
+	echo g: v = $v, w = $w
+}
+
+f
+echo FIN: v = $v, w = $w
+
+# problem with error return propagation through bash-4.3
+unset -f aaa bbb
+unset unique
+
+aaa() {
+    declare -g -a unique=()
+}
+bbb() {
+    declare -g -A unique=()
+}
+aaa
+bbb
+echo after bbb: $?
diff --git a/tests/varenv5.sub b/tests/varenv5.sub
new file mode 100644
index 0000000..b6eb70c
--- /dev/null
+++ b/tests/varenv5.sub
@@ -0,0 +1,29 @@
+#   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 .
+#
+function foobar {
+   declare -rgA FOOBAR=([foo]=bar)
+   declare -p FOOBAR
+}
+foobar
+declare -p FOOBAR
+
+unset -f foobar
+
+foobar() {
+   declare -rga FOOBAR2=([foo]=bar)
+   declare -p FOOBAR2
+}
+
+foobar
+declare -p FOOBAR2
diff --git a/tests/varenv6.sub b/tests/varenv6.sub
new file mode 100644
index 0000000..8cf21f7
--- /dev/null
+++ b/tests/varenv6.sub
@@ -0,0 +1,41 @@
+#   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 .
+#
+f()
+{
+	local str=F
+	g str
+}
+
+g()
+{
+	local -n ref=$1
+	printf "%s " "$ref"
+	ref=G
+}
+
+str=OUTSIDE;
+f
+
+printf "%s\n" "$str"
+
+unset -f f g
+unset str
+
+f() { local -a arr=(F); g arr; };
+
+g() { local -n ref=$1; printf "%s " "${ref[0]}"; ref=(G); };
+
+arr=(OUTSIDE);
+f;
+printf "%s\n" "${arr[0]}"
diff --git a/tests/varenv7.sub b/tests/varenv7.sub
new file mode 100644
index 0000000..4b25960
--- /dev/null
+++ b/tests/varenv7.sub
@@ -0,0 +1,75 @@
+#   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 .
+#
+foo()
+{
+	local -a myvar=()
+	local -r myvar=0
+
+	echo "${myvar[@]}"
+	declare -p myvar
+}
+
+foo2()
+{
+	local -i myvar=0
+	local -r myvar=1
+
+	echo "${myvar}"
+	declare -p myvar
+}
+
+declare -a outside=()
+declare -r outside
+declare -p outside
+
+outside1=1
+declare -ir outside1
+declare -p outside1
+
+tempenv=foo declare -r tempenv
+echo tempenv = $tempenv
+
+foo
+foo2
+
+tempvar1=foo declare -r tempvar1
+echo ${tempvar1@A}
+
+tempvar2=bar declare -r tempvar2=qux
+echo ${tempvar2@A}
+
+unset foo
+readonly var=outside
+
+func()
+{
+	local var=inside
+	echo "inside: $var"
+}
+
+func
+echo outside: $var
+
+unset -f f
+unset VAR1 VAR2
+export VAR1=abc VAR2=abc
+
+f()
+{
+	local VAR1; local VAR2
+	echo local: ${VAR1-unset1} ${VAR2-unset2}
+	printenv VAR1 ; printenv VAR2
+}
+
+f
diff --git a/tests/varenv8.sub b/tests/varenv8.sub
new file mode 100644
index 0000000..cad2c6e
--- /dev/null
+++ b/tests/varenv8.sub
@@ -0,0 +1,14 @@
+FOO=bar cat  < <(echo $FOO:1; echo $FOO:2)
+echo after: --${FOO}--
+
+unset FOO
+FOO=global
+
+FOO=bar cat  < <(echo $FOO:1; echo $FOO:2)
+echo after: --${FOO}--
+
+unset FOO
+FOO=bar read x  < <(echo -n $FOO:1; echo $FOO:2)
+echo after: --${FOO}--
+echo x = $x
+
diff --git a/tests/varenv9.sub b/tests/varenv9.sub
new file mode 100644
index 0000000..5837aa5
--- /dev/null
+++ b/tests/varenv9.sub
@@ -0,0 +1,79 @@
+#   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 .
+#
+# case 1: readonly modifying local scalar variables
+o1() {
+    local i1 j1
+    readonly i1=$1
+    readonly j1="1 2 3"
+
+    echo "in o1 (readonly modifying local scalars):"
+    declare -p i1
+    declare -p j1
+}
+
+o1 "a b c"
+
+echo after o1:
+declare -p i1 j1
+
+unset i1 j1
+
+# case 2: readonly setting global scalar variables
+o2() {
+    readonly i2=$1
+    readonly j2="1 2 3"
+
+    echo "in o2 (readonly setting global scalars):"
+    declare -p i2
+    declare -p j2
+}
+
+o2 "a b c"
+echo after o2:
+declare -p i2 j2
+
+unset i2 j2
+
+# case 3: readonly modifying local variables, converting to arrays
+o3() {
+    local i3 j3
+    readonly i3=($1)
+    readonly j3=(1 2 3)
+
+    echo "in o3 (readonly modifying locals, converting to arrays):"
+    declare -p i3
+    declare -p j3
+}
+
+o3 "a b c"
+echo after o3:
+declare -p i3 j3
+
+unset i3 j3
+
+# case 4: readonly setting global array variables
+o4() {
+    readonly i4=($1)
+    readonly j4=(1 2 3)
+
+    echo "in o4 (readonly setting global array variables):"
+    declare -p i4
+    declare -p j4
+}
+
+o4 "a b c"
+echo after o4:
+declare -p i4 j4
+
+unset i4 j4
diff --git a/tests/version b/tests/version
index bd74020..9ad08f7 100644
--- a/tests/version
+++ b/tests/version
@@ -1,3 +1,8 @@
+if (( $UID == 0 )); then
+        echo "${THIS_SH}: the test suite should not be run as root" >&2
+	echo
+fi
+
 echo Testing ${THIS_SH}
 
 echo version: $BASH_VERSION
diff --git a/tests/version.mini b/tests/version.mini
index 72e4bf9..637565e 100644
--- a/tests/version.mini
+++ b/tests/version.mini
@@ -1,3 +1,8 @@
+if (( $UID == 0 )); then
+        echo "${THIS_SH}: the test suite should not be run as root" >&2
+	echo
+fi
+
 echo Testing ${THIS_SH}
 
 echo version: $BASH_VERSION
diff --git a/tests/vredir.right b/tests/vredir.right
index 0e3b24b..6465595 100644
--- a/tests/vredir.right
+++ b/tests/vredir.right
@@ -8,26 +8,23 @@ bar ()
     exec {v}> $TMPFILE;
     echo $v
 }
-./vredir.tests: line 6: v: readonly variable
-./vredir.tests: line 6: v: cannot assign fd to variable
+./vredir.tests: line 19: v: readonly variable
+./vredir.tests: line 19: 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
+10
 line 1
 line 2
 line 3
 bar is a function
 bar () 
 { 
-    exec  {v}<&$fd1
 }
-13 11
+12 10
 a
 a
 swizzle is a function
@@ -86,3 +83,19 @@ swizzle ()
     exec {stdin}<&$fd0-;
     exec {stdout}>&$fd1-
 }
+ok 1
+./vredir6.sub: redirection error: cannot duplicate fd: Invalid argument
+./vredir6.sub: line 13: /dev/null: Invalid argument
+unset
+12 10
+a
+a
+swizzle is a function
+swizzle () 
+{ 
+    exec {fd[0]}<&0;
+    exec {fd[1]}>&1;
+    exec {stdin}<&${fd[0]}-;
+    exec {stdout}>&${fd[1]}-
+}
+./vredir8.sub: line 12: $fd: Bad file descriptor
diff --git a/tests/vredir.tests b/tests/vredir.tests
index df4fd8f..bd4cb77 100644
--- a/tests/vredir.tests
+++ b/tests/vredir.tests
@@ -1,3 +1,16 @@
+#   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 .
+#
 : ${TMPDIR:=/var/tmp}
 TMPFILE=$TMPDIR/foo
 
@@ -22,9 +35,9 @@ exec {v}>&-
 readonly v=42
 bar
 
-echo foo 1 >&$v
-echo foo 2 >&$v
-echo foo 3 >&$v
+echo foo 1 2>&1 >&$v | { grep -q '\$v: Bad' || echo 'bad foo 1'; }
+echo foo 2 2>&1 >&$v | { grep -q '\$v: Bad' || echo 'bad foo 2'; }
+echo foo 3 2>&1 >&$v | { grep -q '\$v: Bad' || echo 'bad foo 3'; }
 
 cat $TMPFILE
 rm -f $TMPFILE
@@ -41,4 +54,9 @@ ${THIS_SH} ./vredir4.sub
 
 ${THIS_SH} ./vredir5.sub
 
+${THIS_SH} ./vredir6.sub
+
+${THIS_SH} ./vredir7.sub
+${THIS_SH} ./vredir8.sub
+
 exit 0
diff --git a/tests/vredir1.sub b/tests/vredir1.sub
index 403734c..484f313 100644
--- a/tests/vredir1.sub
+++ b/tests/vredir1.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 bar()
 {
 exec {v}<.
+#
 : ${TMPDIR:=/var/tmp}
 SHELLSFILE=$TMPDIR/shells-$$
 
diff --git a/tests/vredir4.sub b/tests/vredir4.sub
index e1cef05..f861bcf 100644
--- a/tests/vredir4.sub
+++ b/tests/vredir4.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 swizzle()
 {
 fd0=0
diff --git a/tests/vredir5.sub b/tests/vredir5.sub
index d1531e9..beb45ac 100644
--- a/tests/vredir5.sub
+++ b/tests/vredir5.sub
@@ -1,3 +1,16 @@
+#   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 .
+#
 swizzle()
 {
 exec {fd0}<&0
diff --git a/tests/vredir6.sub b/tests/vredir6.sub
new file mode 100644
index 0000000..224b96a
--- /dev/null
+++ b/tests/vredir6.sub
@@ -0,0 +1,14 @@
+unset v
+exec {v}= 10 )); then echo ok 1; else echo bad 1; fi
+
+exec {v}<&-
+
+ulimit -n 6
+
+exec .
+#
+swizzle()
+{
+exec {fd[0]}<&0
+exec {fd[1]}>&1
+
+exec {stdin}<&${fd[0]}-
+exec {stdout}>&${fd[1]}-
+}
+
+swizzle
+
+echo $stdin $stdout
+
+read line <&$stdin <&$stdout
+
+type swizzle
+
+exit 0
diff --git a/tests/vredir8.sub b/tests/vredir8.sub
new file mode 100644
index 0000000..e87b45b
--- /dev/null
+++ b/tests/vredir8.sub
@@ -0,0 +1,13 @@
+# test varredir_close
+
+: {fd}<>/dev/null
+
+echo redir 1 >&$fd
+exec {fd}>&-
+
+shopt -s varredir_close
+
+: {fd}<>/dev/tty
+
+echo redir 2 >&$fd
+exec {fd}>&-
diff --git a/trap.c b/trap.c
index 27a8aca..465c336 100644
--- a/trap.c
+++ b/trap.c
@@ -1,7 +1,7 @@
 /* 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.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -33,10 +33,14 @@
 
 #include "bashintl.h"
 
+#include 
+
 #include "trap.h"
 
 #include "shell.h"
+#include "execute_cmd.h"
 #include "flags.h"
+#include "parser.h"
 #include "input.h"	/* for save_token_state, restore_token_state */
 #include "jobs.h"
 #include "signames.h"
@@ -44,6 +48,11 @@
 #include "builtins/common.h"
 #include "builtins/builtext.h"
 
+#if defined (READLINE)
+#  include 
+#  include "bashline.h"
+#endif
+
 #ifndef errno
 extern int errno;
 #endif
@@ -65,34 +74,31 @@ extern int errno;
    assumes this. */
 static int sigmodes[BASH_NSIG];
 
-static void free_trap_command __P((int));
-static void change_signal __P((int, char *));
+static void free_trap_command (int);
+static void change_signal (int, char *);
 
-static void get_original_signal __P((int));
+static int _run_trap_internal (int, char *);
 
-static int _run_trap_internal __P((int, char *));
+static void free_trap_string (int);
+static void reset_signal (int);
+static void restore_signal (int);
+static void reset_or_restore_signal_handlers (sh_resetsig_func_t *);
+static void reinit_trap (int);
 
-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 *));
+static void trap_if_untrapped (int, char *);
 
 /* 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 volatile int from_return_trap;
+extern int waiting_for_child;
+
 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
+   executed when that signal is received.  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. */
@@ -113,8 +119,10 @@ 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
+int trapped_signal_received;
+
+/* Set to 1 to suppress the effect of `set v' in the DEBUG trap. */
+int suppress_debug_trap_verbose = 0;
 
 #define GETORIGSIG(sig) \
   do { \
@@ -124,6 +132,13 @@ int wait_signal_received;
       sigmodes[sig] |= SIG_HARD_IGNORE; \
   } while (0)
 
+#define SETORIGSIG(sig,handler) \
+  do { \
+    original_signals[sig] = handler; \
+    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)
@@ -143,7 +158,7 @@ initialize_traps ()
     {
       pending_traps[i] = 0;
       trap_list[i] = (char *)DEFAULT_SIG;
-      sigmodes[i] = SIG_INHERITED;
+      sigmodes[i] = SIG_INHERITED;	/* XXX - only set, not used */
       original_signals[i] = IMPOSSIBLE_TRAP_HANDLER;
     }
 
@@ -170,9 +185,11 @@ initialize_traps ()
       GETORIGSIG (SIGTERM);
       sigmodes[SIGTERM] |= SIG_SPECIAL;
     }
+
+  get_original_tty_job_signals ();
 }
 
-#ifdef INCLUDE_UNUSED
+#ifdef DEBUG
 /* Return a printable representation of the trap handler for SIG. */
 static char *
 trap_handler_string (sig)
@@ -221,6 +238,23 @@ decode_signal (string, flags)
   if (legal_number (string, &sig))
     return ((sig >= 0 && sig < NSIG) ? (int)sig : NO_SIG);
 
+#if defined (SIGRTMIN) && defined (SIGRTMAX)
+  if (STREQN (string, "SIGRTMIN+", 9) || ((flags & DSIG_NOCASE) && strncasecmp (string, "SIGRTMIN+", 9) == 0))
+    {
+      if (legal_number (string+9, &sig) && sig >= 0 && sig <= SIGRTMAX - SIGRTMIN)
+	return (SIGRTMIN + sig);
+      else
+	return NO_SIG;
+    }
+  else if (STREQN (string, "RTMIN+", 6) || ((flags & DSIG_NOCASE) && strncasecmp (string, "RTMIN+", 6) == 0))
+    {
+      if (legal_number (string+6, &sig) && sig >= 0 && sig <= SIGRTMAX - SIGRTMIN)
+	return (SIGRTMIN + sig);
+      else
+	return NO_SIG;
+    }
+#endif /* SIGRTMIN && SIGRTMAX */
+
   /* A leading `SIG' may be omitted. */
   for (sig = 0; sig < BASH_NSIG; sig++)
     {
@@ -228,7 +262,7 @@ decode_signal (string, flags)
       if (name == 0 || name[0] == '\0')
 	continue;
 
-      /* Check name without the SIG prefix first case sensitivly or
+      /* Check name without the SIG prefix first case sensitively or
 	 insensitively depending on whether flags includes DSIG_NOCASE */
       if (STREQN (name, "SIG", 3))
 	{
@@ -263,16 +297,46 @@ void
 run_pending_traps ()
 {
   register int sig;
-  int old_exit_value, *token_state;
+  int x;
+  volatile int old_exit_value, old_running;
   WORD_LIST *save_subst_varlist;
+  HASH_TABLE *save_tempenv;
+  sh_parser_state_t pstate;
+  volatile int save_return_catch_flag, function_code;
+  procenv_t save_return_catch;
+  char *trap_command, *old_trap;
+#if defined (ARRAY_VARS)
+  ARRAY *ps;
+#endif
 
   if (catch_flag == 0)		/* simple optimization */
     return;
 
-  catch_flag = 0;
+  if (running_trap > 0)
+    {
+      internal_debug ("run_pending_traps: recursive invocation while running trap for signal %d", running_trap-1);
+#if defined (SIGWINCH)
+      if (running_trap == SIGWINCH+1 && pending_traps[SIGWINCH])
+	return;			/* no recursive SIGWINCH trap invocations */
+#endif
+      /* could check for running the trap handler for the same signal here
+	 (running_trap == sig+1) */
+      if (evalnest_max > 0 && evalnest > evalnest_max)
+	{
+	  internal_error (_("trap handler: maximum trap handler level exceeded (%d)"), evalnest_max);
+	  evalnest = 0;
+	  jump_to_top_level (DISCARD);
+	}
+    }
+
+  catch_flag = trapped_signal_received = 0;
 
   /* Preserve $? when running trap. */
-  old_exit_value = last_command_exit_value;
+  trap_saved_exit_value = old_exit_value = last_command_exit_value;
+#if defined (ARRAY_VARS)
+  ps = save_pipestatus_array ();
+#endif
+  old_running = running_trap;
 
   for (sig = 1; sig < NSIG; sig++)
     {
@@ -280,31 +344,53 @@ run_pending_traps ()
 	 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 */
+	  /* XXX - set last_command_exit_value = trap_saved_exit_value here? */
+	  running_trap = sig + 1;
 
 	  if (sig == SIGINT)
 	    {
-	      run_interrupt_trap ();
-	      CLRINTERRUPT;
+	      pending_traps[sig] = 0;	/* XXX */
+	      /* We don't modify evalnest here, since run_interrupt_trap() calls
+		 _run_trap_internal, which does. */
+	      run_interrupt_trap (0);
+	      CLRINTERRUPT;	/* interrupts don't stack */
 	    }
 #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 */
+	      sigmodes[SIGCHLD] |= SIG_INPROGRESS;
+	      /* We modify evalnest here even though run_sigchld_trap can run
+		 the trap action more than once */
+	      evalnest++;
+	      x = pending_traps[sig];
+	      pending_traps[sig] = 0;
+	      run_sigchld_trap (x);	/* use as counter */
+	      running_trap = 0;
+	      evalnest--;
+	      sigmodes[SIGCHLD] &= ~SIG_INPROGRESS;
+	      /* continue here rather than reset pending_traps[SIGCHLD] below in
+		 case there are recursive calls to run_pending_traps and children
+		 have been reaped while run_sigchld_trap was running. */
+	      continue;
+	    }
+	  else if (sig == SIGCHLD &&
+		   trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER &&
+		   (sigmodes[SIGCHLD] & SIG_INPROGRESS) != 0)
+	    {
+	      /* This can happen when run_pending_traps is called while
+		 running a SIGCHLD trap handler. */
+	      running_trap = 0;
+	      /* want to leave pending_traps[SIGCHLD] alone here */
+	      continue;					/* XXX */
+	    }
+	  else if (sig == SIGCHLD && (sigmodes[SIGCHLD] & SIG_INPROGRESS))
+	    {
+	      /* whoops -- print warning? */
+	      running_trap = 0;		/* XXX */
+	      /* want to leave pending_traps[SIGCHLD] alone here */
+	      continue;
 	    }
 #endif
 	  else if (trap_list[sig] == (char *)DEFAULT_SIG ||
@@ -334,32 +420,84 @@ run_pending_traps ()
 	    }
 	  else
 	    {
-	      token_state = save_token_state ();
+	      old_trap = trap_list[sig];
+	      trap_command = savestring (old_trap);
+
+	      save_parser_state (&pstate);
 	      save_subst_varlist = subst_assign_varlist;
 	      subst_assign_varlist = 0;
+	      save_tempenv = temporary_env;
+	      temporary_env = 0;	/* traps should not run with temporary env */
+
+#if defined (JOB_CONTROL)
+	      save_pipeline (1);	/* XXX only provides one save level */
+#endif
+	      /* XXX - set pending_traps[sig] = 0 here? */
+	      pending_traps[sig] = 0;
+	      evalnest++;
+
+	      function_code = 0;
+	      save_return_catch_flag = return_catch_flag;
+	      if (return_catch_flag)
+		{
+		  COPY_PROCENV (return_catch, save_return_catch);
+		  function_code = setjmp_nosigs (return_catch);
+		}
+
+	      if (function_code == 0)
+	        /* XXX is x always last_command_exit_value? */
+		x = parse_and_execute (trap_command, "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
+	      else
+		{
+		  parse_and_execute_cleanup (sig + 1);	/* XXX - could use -1 */
+		  x = return_catch_value;
+		}
 
-	      parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
-	      restore_token_state (token_state);
-	      free (token_state);
+	      evalnest--;
+#if defined (JOB_CONTROL)
+	      restore_pipeline (1);
+#endif
 
 	      subst_assign_varlist = save_subst_varlist;
-	    }
+	      restore_parser_state (&pstate);
+	      temporary_env = save_tempenv;
 
-	  pending_traps[sig] = 0;
+	      if (save_return_catch_flag)
+		{
+		  return_catch_flag = save_return_catch_flag;
+		  return_catch_value = x;
+		  COPY_PROCENV (save_return_catch, return_catch);
+		  if (function_code)
+		    {
+		      running_trap = old_running;		/* XXX */
+		      /* caller will set last_command_exit_value */
+		      sh_longjmp (return_catch, 1);
+		    }
+		}
+	    }
 
-#if defined (HAVE_POSIX_SIGNALS)
-	  sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
-#else
-#  if defined (HAVE_BSD_SIGNALS)
-	  sigsetmask (oldmask);
-#  endif
-#endif /* POSIX_VERSION */
+	  pending_traps[sig] = 0;	/* XXX - move before evalstring? */
+	  running_trap = old_running;
 	}
     }
 
+#if defined (ARRAY_VARS)
+  restore_pipestatus_array (ps);
+#endif
   last_command_exit_value = old_exit_value;
 }
 
+/* Set the private state variables noting that we received a signal SIG
+   for which we have a trap set. */
+void
+set_trap_state (sig)
+     int sig;
+{
+  catch_flag = 1;
+  pending_traps[sig]++;
+  trapped_signal_received = sig;
+}
+    
 sighandler
 trap_handler (sig)
      int sig;
@@ -368,9 +506,33 @@ trap_handler (sig)
 
   if ((sigmodes[sig] & SIG_TRAPPED) == 0)
     {
-#if defined (DEBUG)
-      internal_warning ("trap_handler: signal %d: signal not trapped", sig);
-#endif
+      internal_debug ("trap_handler: signal %d: signal not trapped", sig);
+      SIGRETURN (0);
+    }
+
+  /* This means we're in a subshell, but have not yet reset the handler for
+     trapped signals. We're not supposed to execute the trap in this situation;
+     we should restore the original signal and resend the signal to ourselves
+     to preserve the Posix "signal traps that are not being ignored shall be
+     set to the default action" semantics. */
+  if ((subshell_environment & SUBSHELL_IGNTRAP) && trap_list[sig] != (char *)IGNORE_SIG)
+    {
+      sigset_t mask;
+
+      /* Paranoia */
+      if (original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER)
+	original_signals[sig] = SIG_DFL;
+
+      restore_signal (sig);
+
+      /* Make sure we let the signal we just caught through */
+      sigemptyset (&mask);
+      sigprocmask (SIG_SETMASK, (sigset_t *)NULL, &mask);
+      sigdelset (&mask, sig);
+      sigprocmask (SIG_SETMASK, &mask, (sigset_t *)NULL);
+
+      kill (getpid (), sig);
+
       SIGRETURN (0);
     }
 
@@ -388,24 +550,86 @@ trap_handler (sig)
       set_signal_handler (sig, trap_handler);
 #endif /* MUST_REINSTALL_SIGHANDLERS */
 
-      catch_flag = 1;
-      pending_traps[sig]++;
+      set_trap_state (sig);
 
-      if (interrupt_immediately && this_shell_builtin && (this_shell_builtin == wait_builtin))
+      if (this_shell_builtin && (this_shell_builtin == wait_builtin))
 	{
 	  wait_signal_received = sig;
-	  longjmp (wait_intr_buf, 1);
+	  if (waiting_for_child && wait_intr_flag)
+	    sh_longjmp (wait_intr_buf, 1);
 	}
 
-      if (interrupt_immediately)
-	run_pending_traps ();
+#if defined (READLINE)
+      /* Set the event hook so readline will call it after the signal handlers
+	 finish executing, so if this interrupted character input we can get
+	 quick response. */
+      if (RL_ISSTATE (RL_STATE_SIGHANDLER))
+        bashline_set_event_hook ();
+#endif
 
       errno = oerrno;
     }
-
+  
   SIGRETURN (0);
 }
 
+int
+next_pending_trap (start)
+     int start;
+{
+  register int i;
+
+  for (i = start; i < NSIG; i++)
+    if (pending_traps[i])
+      return i;
+  return -1;
+}
+
+int
+first_pending_trap ()
+{
+  return (next_pending_trap (1));
+}
+
+/* Return > 0 if any of the "real" signals (not fake signals like EXIT) are
+   trapped. */
+int
+any_signals_trapped ()
+{
+  register int i;
+
+  for (i = 1; i < NSIG; i++)
+    if ((sigmodes[i] & SIG_TRAPPED) && (sigmodes[i] & SIG_IGNORED) == 0)
+      return i;
+  return -1;
+}
+
+void
+clear_pending_traps ()
+{
+  register int i;
+
+  for (i = 1; i < NSIG; i++)
+    pending_traps[i] = 0;
+}
+
+void
+check_signals ()
+{
+  /* Add any other shell timeouts here */
+  check_read_timeout ();	/* set by the read builtin */
+  QUIT;
+}
+
+/* Convenience functions the rest of the shell can use */
+void
+check_signals_and_traps ()
+{
+  check_signals ();
+
+  run_pending_traps ();
+}
+
 #if defined (JOB_CONTROL) && defined (SIGCHLD)
 
 #ifdef INCLUDE_UNUSED
@@ -441,8 +665,33 @@ set_impossible_sigchld_trap ()
   change_signal (SIGCHLD, (char *)IMPOSSIBLE_TRAP_HANDLER);
   sigmodes[SIGCHLD] &= ~SIG_TRAPPED;	/* maybe_set_sigchld_trap checks this */
 }
+
+/* Act as if we received SIGCHLD NCHILD times and increment
+   pending_traps[SIGCHLD] by that amount.  This allows us to still run the
+   SIGCHLD trap once for each exited child. */
+void
+queue_sigchld_trap (nchild)
+     int nchild;
+{
+  if (nchild > 0)
+    {
+      catch_flag = 1;
+      pending_traps[SIGCHLD] += nchild;
+      trapped_signal_received = SIGCHLD;
+    }
+}
 #endif /* JOB_CONTROL && SIGCHLD */
 
+/* Set a trap for SIG only if SIG is not already trapped. */
+static inline void
+trap_if_untrapped (sig, command)
+     int sig;
+     char *command;
+{
+  if ((sigmodes[sig] & SIG_TRAPPED) == 0)
+    set_signal (sig, command);
+}
+
 void
 set_debug_trap (command)
      char *command;
@@ -450,6 +699,19 @@ set_debug_trap (command)
   set_signal (DEBUG_TRAP, command);
 }
 
+/* Separate function to call when functions and sourced files want to restore
+   the original version of the DEBUG trap before returning.  Unless the -T
+   option is set, source and shell function execution save the old debug trap
+   and unset the trap.  If the function or sourced file changes the DEBUG trap,
+   SIG_TRAPPED will be set and we don't bother restoring the original trap string.
+   This is used by both functions and the source builtin. */
+void
+maybe_set_debug_trap (command)
+     char *command;
+{
+  trap_if_untrapped (DEBUG_TRAP, command);
+}
+
 void
 set_error_trap (command)
      char *command;
@@ -457,6 +719,13 @@ set_error_trap (command)
   set_signal (ERROR_TRAP, command);
 }
 
+void
+maybe_set_error_trap (command)
+     char *command;
+{
+  trap_if_untrapped (ERROR_TRAP, command);
+}
+
 void
 set_return_trap (command)
      char *command;
@@ -464,6 +733,13 @@ set_return_trap (command)
   set_signal (RETURN_TRAP, command);
 }
 
+void
+maybe_set_return_trap (command)
+     char *command;
+{
+  trap_if_untrapped (RETURN_TRAP, command);
+}
+
 #ifdef INCLUDE_UNUSED
 void
 set_sigint_trap (command)
@@ -516,6 +792,8 @@ set_signal (sig, string)
      int sig;
      char *string;
 {
+  sigset_t set, oset;
+
   if (SPECIAL_TRAP (sig))
     {
       change_signal (sig, savestring (string));
@@ -546,9 +824,10 @@ set_signal (sig, string)
      environment in which it is safe to do so. */
   if ((sigmodes[sig] & SIG_NO_TRAP) == 0)
     {
-      set_signal_handler (sig, SIG_IGN);
+      BLOCK_SIGNAL (sig, set, oset);
       change_signal (sig, savestring (string));
       set_signal_handler (sig, trap_handler);
+      UNBLOCK_SIGNAL (oset);
     }
   else
     change_signal (sig, savestring (string));
@@ -585,7 +864,7 @@ change_signal (sig, value)
     sigmodes[sig] |= SIG_CHANGED;
 }
 
-static void
+void
 get_original_signal (sig)
      int sig;
 {
@@ -594,6 +873,24 @@ get_original_signal (sig)
     GETORIGSIG (sig);
 }
 
+void
+get_all_original_signals ()
+{
+  register int i;
+
+  for (i = 1; i < NSIG; i++)
+    GET_ORIGINAL_SIGNAL (i);
+}
+
+void
+set_original_signal (sig, handler)
+     int sig;
+     SigHandler *handler;
+{
+  if (sig > 0 && sig < NSIG && original_signals[sig] == (SigHandler *)IMPOSSIBLE_TRAP_HANDLER)
+    SETORIGSIG (sig, handler);
+}
+
 /* 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
@@ -622,7 +919,11 @@ restore_default_signal (sig)
     return;
 
   /* If we aren't trapping this signal, don't bother doing anything else. */
-  if ((sigmodes[sig] & SIG_TRAPPED) == 0)
+  /* We special-case SIGCHLD and IMPOSSIBLE_TRAP_HANDLER (see above) as a
+     sentinel to determine whether or not disposition is reset to the default
+     while the trap handler is executing. */
+  if (((sigmodes[sig] & SIG_TRAPPED) == 0) &&
+      (sig != SIGCHLD || (sigmodes[sig] & SIG_INPROGRESS) == 0 || trap_list[sig] != (char *)IMPOSSIBLE_TRAP_HANDLER))
     return;
 
   /* Only change the signal handler for SIG if it allows it. */
@@ -674,8 +975,14 @@ run_exit_trap ()
 {
   char *trap_command;
   int code, function_code, retval;
+#if defined (ARRAY_VARS)
+  ARRAY *ps;
+#endif
 
   trap_saved_exit_value = last_command_exit_value;
+#if defined (ARRAY_VARS)
+  ps = save_pipestatus_array ();
+#endif
   function_code = 0;
 
   /* Run the trap only if signal 0 is trapped and not ignored, and we are not
@@ -691,20 +998,20 @@ run_exit_trap ()
       retval = trap_saved_exit_value;
       running_trap = 1;
 
-      code = setjmp (top_level);
+      code = setjmp_nosigs (top_level);
 
       /* If we're in a function, make sure return longjmps come here, too. */
       if (return_catch_flag)
-	function_code = setjmp (return_catch);
+	function_code = setjmp_nosigs (return_catch);
 
       if (code == 0 && function_code == 0)
 	{
 	  reset_parser ();
-	  parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+	  parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
 	}
       else if (code == ERREXIT)
 	retval = last_command_exit_value;
-      else if (code == EXITPROG)
+      else if (code == EXITPROG || code == EXITBLTIN)
 	retval = last_command_exit_value;
       else if (function_code != 0)
         retval = return_catch_value;
@@ -712,9 +1019,16 @@ run_exit_trap ()
 	retval = trap_saved_exit_value;
 
       running_trap = 0;
+#if defined (ARRAY_VARS)
+      array_dispose (ps);
+#endif
+
       return retval;
     }
 
+#if defined (ARRAY_VARS)
+  restore_pipestatus_array (ps);
+#endif
   return (trap_saved_exit_value);
 }
 
@@ -722,9 +1036,12 @@ void
 run_trap_cleanup (sig)
      int sig;
 {
+  /* XXX - should we clean up trap_list[sig] == IMPOSSIBLE_TRAP_HANDLER? */
   sigmodes[sig] &= ~(SIG_INPROGRESS|SIG_CHANGED);
 }
 
+#define RECURSIVE_SIG(s) (SPECIAL_TRAP(s) == 0)
+
 /* 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
@@ -733,54 +1050,102 @@ _run_trap_internal (sig, tag)
      char *tag;
 {
   char *trap_command, *old_trap;
-  int trap_exit_value, *token_state;
-  int save_return_catch_flag, function_code, flags;
+  int trap_exit_value;
+  volatile int save_return_catch_flag, function_code;
+  int old_modes, old_running, old_int;
+  int flags;
   procenv_t save_return_catch;
   WORD_LIST *save_subst_varlist;
+  HASH_TABLE *save_tempenv;
+  sh_parser_state_t pstate;
+#if defined (ARRAY_VARS)
+  ARRAY *ps;
+#endif
+
+  old_modes = old_running = -1;
 
   trap_exit_value = function_code = 0;
+  trap_saved_exit_value = last_command_exit_value;
   /* 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) &&
+#if 1
+      /* Uncomment this to allow some special signals to recursively execute
+	 trap handlers. */
+      (RECURSIVE_SIG (sig) || (sigmodes[sig] & SIG_INPROGRESS) == 0))
+#else
       ((sigmodes[sig] & SIG_INPROGRESS) == 0))
+#endif
     {
       old_trap = trap_list[sig];
+      old_modes = sigmodes[sig];
+      old_running = running_trap;
+
       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 ();
+      old_int = interrupt_state;	/* temporarily suppress pending interrupts */
+      CLRINTERRUPT;
+
+#if defined (ARRAY_VARS)
+      ps = save_pipestatus_array ();
+#endif
+
+      save_parser_state (&pstate);
       save_subst_varlist = subst_assign_varlist;
       subst_assign_varlist = 0;
+      save_tempenv = temporary_env;
+      temporary_env = 0;	/* traps should not run with temporary env */
+
+#if defined (JOB_CONTROL)
+      if (sig != DEBUG_TRAP)	/* run_debug_trap does this */
+	save_pipeline (1);	/* XXX only provides one save level */
+#endif
 
       /* 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);
+	  function_code = setjmp_nosigs (return_catch);
 	}
 
-      flags = SEVAL_NONINT|SEVAL_NOHIST;
+      flags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE;
       if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
 	flags |= SEVAL_RESETLINE;
+      evalnest++;
       if (function_code == 0)
-	parse_and_execute (trap_command, tag, flags);
+        {
+	  parse_and_execute (trap_command, tag, flags);
+	  trap_exit_value = last_command_exit_value;
+        }
+      else
+        trap_exit_value = return_catch_value;
+      evalnest--;
 
-      restore_token_state (token_state);
-      free (token_state);
+#if defined (JOB_CONTROL)
+      if (sig != DEBUG_TRAP)	/* run_debug_trap does this */
+	restore_pipeline (1);
+#endif
 
       subst_assign_varlist = save_subst_varlist;
+      restore_parser_state (&pstate);
 
-      trap_exit_value = last_command_exit_value;
-      last_command_exit_value = trap_saved_exit_value;
-      running_trap = 0;
+#if defined (ARRAY_VARS)
+      restore_pipestatus_array (ps);
+#endif
+
+      temporary_env = save_tempenv;
+
+      if ((old_modes & SIG_INPROGRESS) == 0)
+	sigmodes[sig] &= ~SIG_INPROGRESS;
 
-      sigmodes[sig] &= ~SIG_INPROGRESS;
+      running_trap = old_running;
+      interrupt_state = old_int;
 
       if (sigmodes[sig] & SIG_CHANGED)
 	{
@@ -792,6 +1157,8 @@ _run_trap_internal (sig, tag)
 #endif
 	    free (old_trap);
 	  sigmodes[sig] &= ~SIG_CHANGED;
+
+	  CHECK_TERMSIG;	/* some pathological conditions lead here */
 	}
 
       if (save_return_catch_flag)
@@ -800,7 +1167,12 @@ _run_trap_internal (sig, tag)
 	  return_catch_value = trap_exit_value;
 	  COPY_PROCENV (save_return_catch, return_catch);
 	  if (function_code)
-	    longjmp (return_catch, 1);
+	    {
+#if 0
+	      from_return_trap = sig == RETURN_TRAP;
+#endif
+	      sh_longjmp (return_catch, 1);
+	    }
 	}
     }
 
@@ -810,9 +1182,11 @@ _run_trap_internal (sig, tag)
 int
 run_debug_trap ()
 {
-  int trap_exit_value;
+  int trap_exit_value, old_verbose;
   pid_t save_pgrp;
+#if defined (PGRP_PIPE)
   int save_pipe[2];
+#endif
 
   /* XXX - question:  should the DEBUG trap inherit the RETURN trap? */
   trap_exit_value = 0;
@@ -828,8 +1202,13 @@ run_debug_trap ()
       stop_making_children ();
 #endif
 
+      old_verbose = echo_input_at_read;
+      echo_input_at_read = suppress_debug_trap_verbose ? 0 : echo_input_at_read;
+
       trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap");
 
+      echo_input_at_read = old_verbose;
+
 #if defined (JOB_CONTROL)
       pipeline_pgrp = save_pgrp;
       restore_pipeline (1);
@@ -837,8 +1216,11 @@ run_debug_trap ()
       close_pgrp_pipe ();
       restore_pgrp_pipe (save_pipe);
 #  endif
-      if (pipeline_pgrp > 0)
+      /* If the trap command gave the terminal to another process group,
+	 restore it. XXX - check running_in_background? */
+      if (job_control && pipeline_pgrp > 0 && ((subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0))
 	give_terminal_to (pipeline_pgrp, 1);
+
       notify_and_cleanup ();
 #endif
       
@@ -848,7 +1230,7 @@ run_debug_trap ()
       if (debugging_mode && trap_exit_value == 2 && return_catch_flag)
 	{
 	  return_catch_value = trap_exit_value;
-	  longjmp (return_catch, 1);
+	  sh_longjmp (return_catch, 1);
 	}
 #endif
     }
@@ -883,24 +1265,42 @@ run_return_trap ()
 /* 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_interrupt_trap (will_throw)
+     int will_throw;	/* from throw_to_top_level? */
 {
+  if (will_throw && running_trap > 0)
+    run_trap_cleanup (running_trap - 1);
+  pending_traps[SIGINT] = 0;	/* run_pending_traps does this */
+  catch_flag = 0;
   _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. */
+   subsequent `trap' command that changes a signal's disposition.  We need
+   to make sure that we duplicate the behavior of
+   reset_or_restore_signal_handlers and not change the disposition of signals
+   that are set to be ignored. */
 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;
+  for (i = 0; i < NSIG; i++)
+    {
+      if (trap_list[i] != (char *)IGNORE_SIG)
+	free_trap_string (i);
+    }
+  for (i = NSIG; i < BASH_NSIG; i++)
+    {
+      /* Don't free the trap string if the subshell inherited the trap */
+      if ((sigmodes[i] & SIG_TRAPPED) == 0)
+	{
+	  free_trap_string (i);
+	  trap_list[i] = (char *)NULL;
+	}
+    }
 }
 
 /* Free a trap command string associated with SIG without changing signal
@@ -910,17 +1310,17 @@ free_trap_string (sig)
      int sig;
 {
   change_signal (sig, (char *)DEFAULT_SIG);
-  sigmodes[sig] &= ~SIG_TRAPPED;
+  sigmodes[sig] &= ~SIG_TRAPPED;		/* XXX - SIG_INPROGRESS? */
 }
-#endif
 
-/* Reset the handler for SIG to the original value. */
+/* Reset the handler for SIG to the original value but leave the trap string
+   in place. */
 static void
 reset_signal (sig)
      int sig;
 {
   set_signal_handler (sig, original_signals[sig]);
-  sigmodes[sig] &= ~SIG_TRAPPED;
+  sigmodes[sig] &= ~SIG_TRAPPED;		/* XXX - SIG_INPROGRESS? */
 }
 
 /* Set the handler signal SIG to the original and free any trap
@@ -943,7 +1343,7 @@ reset_or_restore_signal_handlers (reset)
   /* Take care of the exit trap first */
   if (sigmodes[EXIT_TRAP] & SIG_TRAPPED)
     {
-      sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED;
+      sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED;	/* XXX - SIG_INPROGRESS? */
       if (reset != reset_signal)
 	{
 	  free_trap_command (EXIT_TRAP);
@@ -962,6 +1362,7 @@ reset_or_restore_signal_handlers (reset)
 	}
       else if (sigmodes[i] & SIG_SPECIAL)
 	(*reset) (i);
+      pending_traps[i] = 0;	/* XXX */
     }
 
   /* Command substitution and other child processes don't inherit the
@@ -979,7 +1380,8 @@ reset_or_restore_signal_handlers (reset)
 }
 
 /* Reset trapped signals to their original values, but don't free the
-   trap strings.  Called by the command substitution code. */
+   trap strings.  Called by the command substitution code and other places
+   that create a "subshell environment". */
 void
 reset_signal_handlers ()
 {
@@ -995,8 +1397,79 @@ restore_original_signals ()
   reset_or_restore_signal_handlers (restore_signal);
 }
 
+/* Change the flags associated with signal SIG without changing the trap
+   string. The string is TRAP_LIST[SIG] if we need it. */
+static void
+reinit_trap (sig)
+     int sig;
+{
+  sigmodes[sig] |= SIG_TRAPPED;
+  if (trap_list[sig] == (char *)IGNORE_SIG)
+    sigmodes[sig] |= SIG_IGNORED;
+  else
+    sigmodes[sig] &= ~SIG_IGNORED;
+  if (sigmodes[sig] & SIG_INPROGRESS)
+    sigmodes[sig] |= SIG_CHANGED;
+}
+
+/* Undo the effects of reset_signal_handlers(), which unsets the traps but
+   leaves the trap strings in place. This understands how reset_signal_handlers
+   works. */
+void
+restore_traps ()
+{
+  char *trapstr;
+  int i;
+
+  /* Take care of the exit trap first. If TRAP_LIST[0] is non-null, the trap
+     has been set. */
+  trapstr = trap_list[EXIT_TRAP];
+  if (trapstr)
+    reinit_trap (EXIT_TRAP);
+
+  /* Then DEBUG, RETURN, and ERROR. TRAP_LIST[N] == 0 if these signals are
+     not trapped. This knows what reset_signal_handlers does for these traps */
+  trapstr = trap_list[DEBUG_TRAP];
+  if (trapstr && function_trace_mode == 0)
+    reinit_trap (DEBUG_TRAP);
+  trapstr = trap_list[RETURN_TRAP];
+  if (trapstr && function_trace_mode == 0)
+    reinit_trap (RETURN_TRAP);
+  trapstr = trap_list[ERROR_TRAP];
+  if (trapstr && error_trace_mode == 0)
+    reinit_trap (ERROR_TRAP);
+
+  /* And finally all the `real' signals. reset_signal_handlers just changes the
+     signal handler for these signals, leaving the trap value in place. We
+     intuit what to do based on that value. We assume that signals marked as
+     SIG_SPECIAL are reinitialized by initialize_signals (), so we don't
+     change the signal handler unless the signal is supposed to be ignored. */
+  for (i = 1; i < NSIG; i++)
+    {
+      trapstr = trap_list[i];
+      if (sigmodes[i] & SIG_SPECIAL)
+	{
+	  if (trapstr && trapstr != (char *)DEFAULT_SIG)
+	    reinit_trap (i);
+	  if (trapstr == (char *)IGNORE_SIG && (sigmodes[i] & SIG_NO_TRAP) == 0)
+	    set_signal_handler (i, SIG_IGN);
+	}
+      else if (trapstr == (char *)IGNORE_SIG)
+	{
+	  reinit_trap (i);
+	  if ((sigmodes[i] & SIG_NO_TRAP) == 0)
+	    set_signal_handler (i, SIG_IGN);
+	}
+      else if (trapstr != (char *)DEFAULT_SIG)
+        /* set_signal duplicates the string argument before freeing it. */
+	set_signal (i, trapstr);
+
+      pending_traps[i] = 0;	/* XXX */
+    }
+}
+
 /* If a trap handler exists for signal SIG, then call it; otherwise just
-   return failure. */
+   return failure.  Returns 1 if it called the trap handler. */
 int
 maybe_call_trap_handler (sig)
      int sig;
@@ -1007,7 +1480,7 @@ maybe_call_trap_handler (sig)
       switch (sig)
 	{
 	case SIGINT:
-	  run_interrupt_trap ();
+	  run_interrupt_trap (0);
 	  break;
 	case EXIT_TRAP:
 	  run_exit_trap ();
@@ -1035,6 +1508,13 @@ signal_is_trapped (sig)
   return (sigmodes[sig] & SIG_TRAPPED);
 }
 
+int
+signal_is_pending (sig)
+     int sig;
+{
+  return (pending_traps[sig]);
+}
+
 int
 signal_is_special (sig)
      int sig;
@@ -1049,17 +1529,54 @@ signal_is_ignored (sig)
   return (sigmodes[sig] & SIG_IGNORED);
 }
 
+int
+signal_is_hard_ignored (sig)
+     int sig;
+{
+  return (sigmodes[sig] & SIG_HARD_IGNORE);
+}
+
 void
-set_signal_ignored (sig)
+set_signal_hard_ignored (sig)
      int sig;
 {
   sigmodes[sig] |= SIG_HARD_IGNORE;
   original_signals[sig] = SIG_IGN;
 }
 
+void
+set_signal_ignored (sig)
+     int sig;
+{
+  original_signals[sig] = SIG_IGN;
+}
+
 int
 signal_in_progress (sig)
      int sig;
 {
   return (sigmodes[sig] & SIG_INPROGRESS);
 }
+
+#if 0 /* unused */
+int
+block_trapped_signals (maskp, omaskp)
+     sigset_t *maskp;
+     sigset_t *omaskp;
+{
+  int i;
+
+  sigemptyset (maskp);
+  for (i = 1; i < NSIG; i++)
+    if (sigmodes[i] & SIG_TRAPPED)
+      sigaddset (maskp, i);
+  return (sigprocmask (SIG_BLOCK, maskp, omaskp));
+}
+
+int
+unblock_trapped_signals (maskp)
+     sigset_t *maskp;
+{
+  return (sigprocmask (SIG_SETMASK, maskp, 0));
+}
+#endif
diff --git a/trap.h b/trap.h
index c34b7eb..89402a1 100644
--- a/trap.h
+++ b/trap.h
@@ -1,6 +1,6 @@
 /* trap.h -- data structures used in the trap mechanism. */
 
-/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -46,9 +46,12 @@
 #define BASH_NSIG	NSIG+3
 
 /* Flags values for decode_signal() */
-#define DSIG_SIGPREFIX	0x01		/* don't alllow `SIG' PREFIX */
+#define DSIG_SIGPREFIX	0x01		/* don't allow `SIG' PREFIX */
 #define DSIG_NOCASE	0x02		/* case-insensitive comparison */
 
+/* A value which can never be the target of a trap handler. */
+#define IMPOSSIBLE_TRAP_HANDLER (SigHandler *)initialize_traps
+
 #define signal_object_p(x,f) (decode_signal (x,f) != NO_SIG)
 
 #define TRAP_STRING(s) \
@@ -57,43 +60,70 @@
 
 extern char *trap_list[];
 
+extern int trapped_signal_received;
+extern int wait_signal_received;
+extern int running_trap;
+extern int trap_saved_exit_value;
+extern int suppress_debug_trap_verbose;
+
 /* 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));
+extern void initialize_traps PARAMS((void));
+
+extern void run_pending_traps PARAMS((void));
+
+extern void queue_sigchld_trap PARAMS((int));
+extern void maybe_set_sigchld_trap PARAMS((char *));
+extern void set_impossible_sigchld_trap PARAMS((void));
+extern void set_sigchld_trap PARAMS((char *));
+
+extern void set_debug_trap PARAMS((char *));
+extern void set_error_trap PARAMS((char *));
+extern void set_return_trap PARAMS((char *));
+
+extern void maybe_set_debug_trap PARAMS((char *));
+extern void maybe_set_error_trap PARAMS((char *));
+extern void maybe_set_return_trap PARAMS((char *));
+
+extern void set_sigint_trap PARAMS((char *));
+extern void set_signal PARAMS((int, char *));
+
+extern void restore_default_signal PARAMS((int));
+extern void ignore_signal PARAMS((int));
+extern int run_exit_trap PARAMS((void));
+extern void run_trap_cleanup PARAMS((int));
+extern int run_debug_trap PARAMS((void));
+extern void run_error_trap PARAMS((void));
+extern void run_return_trap PARAMS((void));
+
+extern void free_trap_strings PARAMS((void));
+extern void reset_signal_handlers PARAMS((void));
+extern void restore_original_signals PARAMS((void));
+extern void restore_traps PARAMS((void));
+
+extern void get_original_signal PARAMS((int));
+extern void get_all_original_signals PARAMS((void));
+
+extern char *signal_name PARAMS((int));
+
+extern int decode_signal PARAMS((char *, int));
+extern void run_interrupt_trap PARAMS((int));
+extern int maybe_call_trap_handler PARAMS((int));
+extern int signal_is_special PARAMS((int));
+extern int signal_is_trapped PARAMS((int));
+extern int signal_is_pending PARAMS((int));
+extern int signal_is_ignored PARAMS((int));
+extern int signal_is_hard_ignored PARAMS((int));
+extern void set_signal_hard_ignored PARAMS((int));
+extern void set_signal_ignored PARAMS((int));
+extern int signal_in_progress PARAMS((int));
+
+extern void set_trap_state PARAMS((int));
+
+extern int next_pending_trap PARAMS((int));
+extern int first_pending_trap PARAMS((void));
+extern void clear_pending_traps PARAMS((void));
+extern int any_signals_trapped PARAMS((void));
+extern void check_signals PARAMS((void));
+extern void check_signals_and_traps PARAMS((void));
 
 #endif /* _TRAP_H_ */
diff --git a/unwind_prot.c b/unwind_prot.c
index 9e150a6..ec82393 100644
--- a/unwind_prot.c
+++ b/unwind_prot.c
@@ -3,7 +3,7 @@
 /* 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.
+/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -35,7 +35,7 @@
 #  include 
 #endif
 
-#if STDC_HEADERS
+#if defined (HAVE_STDDEF_H)
 #  include 
 #endif
 
@@ -46,8 +46,11 @@
 #include "command.h"
 #include "general.h"
 #include "unwind_prot.h"
-#include "quit.h"
 #include "sig.h"
+#include "quit.h"
+#include "bashintl.h"	/* for _() */
+#include "error.h"	/* for internal_warning */
+#include "ocache.h"
 
 /* Structure describing a saved variable and the value to restore it to.  */
 typedef struct {
@@ -74,38 +77,45 @@ typedef union uwp {
   } 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 void without_interrupts PARAMS((VFunction *, char *, char *));
+static void unwind_frame_discard_internal PARAMS((char *, char *));
+static void unwind_frame_run_internal PARAMS((char *, char *));
+static void add_unwind_protect_internal PARAMS((Function *, char *));
+static void remove_unwind_protect_internal PARAMS((char *, char *));
+static void run_unwind_protects_internal PARAMS((char *, char *));
+static void clear_unwind_protects_internal PARAMS((char *, char *));
+static inline void restore_variable PARAMS((SAVED_VAR *));
+static void unwind_protect_mem_internal PARAMS((char *, char *));
 
 static UNWIND_ELT *unwind_protect_list = (UNWIND_ELT *)NULL;
 
+/* Allocating from a cache of unwind-protect elements */
+#define UWCACHESIZE	128
+
+sh_obj_cache_t uwcache = {0, 0, 0};
+
+#if 0
 #define uwpalloc(elt)	(elt) = (UNWIND_ELT *)xmalloc (sizeof (UNWIND_ELT))
 #define uwpfree(elt)	free(elt)
+#else
+#define uwpalloc(elt)	ocache_alloc (uwcache, UNWIND_ELT, elt)
+#define uwpfree(elt)	ocache_free (uwcache, UNWIND_ELT, elt)
+#endif
+
+void
+uwp_init ()
+{
+  ocache_create (uwcache, UNWIND_ELT, UWCACHESIZE);
+}
 
 /* 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 (). */
+   FUNCTION cannot 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. */
@@ -182,6 +192,22 @@ have_unwind_protects ()
   return (unwind_protect_list != 0);
 }
 
+int
+unwind_protect_tag_on_stack (tag)
+     const char *tag;
+{
+  UNWIND_ELT *elt;
+
+  elt = unwind_protect_list;
+  while (elt)
+    {
+      if (elt->head.cleanup == 0 && STREQ (elt->arg.v, tag))
+	return 1;
+      elt = elt->head.next;
+    }
+  return 0;
+}
+
 /* **************************************************************** */
 /*								    */
 /*			The Actual Functions		 	    */
@@ -240,18 +266,24 @@ unwind_frame_discard_internal (tag, ignore)
      char *tag, *ignore;
 {
   UNWIND_ELT *elt;
+  int found;
 
+  found = 0;
   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);
+	  found = 1;
 	  break;
 	}
       else
 	uwpfree (elt);
     }
+
+  if (found == 0)
+    internal_warning (_("unwind_frame_discard: %s: frame not found"), tag);
 }
 
 /* Restore the value of a variable, based on the contents of SV.
@@ -269,17 +301,20 @@ unwind_frame_run_internal (tag, ignore)
      char *tag, *ignore;
 {
   UNWIND_ELT *elt;
+  int found;
 
+  found = 0;
   while (elt = unwind_protect_list)
     {
       unwind_protect_list = elt->head.next;
 
       /* If tag, then compare. */
-      if (!elt->head.cleanup)
+      if (elt->head.cleanup == 0)
 	{
 	  if (tag && STREQ (elt->arg.v, tag))
 	    {
 	      uwpfree (elt);
+	      found = 1;
 	      break;
 	    }
 	}
@@ -293,6 +328,8 @@ unwind_frame_run_internal (tag, ignore)
 
       uwpfree (elt);
     }
+  if (tag && found == 0)
+    internal_warning (_("unwind_frame_run: %s: frame not found"), tag);
 }
 
 static void
@@ -305,6 +342,8 @@ unwind_protect_mem_internal (var, psize)
 
   size = *(int *) psize;
   allocated = size + offsetof (UNWIND_ELT, sv.v.desired_setting[0]);
+  if (allocated < sizeof (UNWIND_ELT))
+    allocated = sizeof (UNWIND_ELT);
   elt = (UNWIND_ELT *)xmalloc (allocated);
   elt->head.next = unwind_protect_list;
   elt->head.cleanup = (Function *) restore_variable;
@@ -324,3 +363,21 @@ unwind_protect_mem (var, size)
 {
   without_interrupts (unwind_protect_mem_internal, var, (char *) &size);
 }
+
+#if defined (DEBUG)
+#include 
+
+void
+print_unwind_protect_tags ()
+{
+  UNWIND_ELT *elt;
+
+  elt = unwind_protect_list;
+  while (elt)
+    {
+      if (elt->head.cleanup == 0)
+        fprintf(stderr, "tag: %s\n", elt->arg.v);
+      elt = elt->head.next;
+    }
+}
+#endif
diff --git a/unwind_prot.h b/unwind_prot.h
index cc556f7..97b3af9 100644
--- a/unwind_prot.h
+++ b/unwind_prot.h
@@ -1,6 +1,6 @@
 /* unwind_prot.h - Macros and functions for hacking unwind protection. */
 
-/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -21,23 +21,26 @@
 #if !defined (_UNWIND_PROT_H)
 #define _UNWIND_PROT_H
 
+extern void uwp_init PARAMS((void));
+
 /* 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 begin_unwind_frame PARAMS((char *));
+extern void discard_unwind_frame PARAMS((char *));
+extern void run_unwind_frame PARAMS((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));
+extern void remove_unwind_protect PARAMS((void));
+extern void run_unwind_protects PARAMS((void));
+extern void clear_unwind_protect_list PARAMS((int));
+extern int have_unwind_protects PARAMS((void));
+extern int unwind_protect_tag_on_stack PARAMS((const char *));
+extern void uwp_init PARAMS((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));
+extern void unwind_protect_mem PARAMS((char *, int));
 
 /* Backwards compatibility */
 #define unwind_protect_int	unwind_protect_var
diff --git a/variables.c b/variables.c
index 0964016..1a0c2c4 100644
--- a/variables.c
+++ b/variables.c
@@ -1,6 +1,6 @@
 /* variables.c -- Functions for hacking shell variables. */
 
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2022 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -43,10 +43,12 @@
 #endif
 #include "bashansi.h"
 #include "bashintl.h"
+#include "filecntl.h"
 
 #define NEED_XTRACE_SET_DECL
 
 #include "shell.h"
+#include "parser.h"
 #include "flags.h"
 #include "execute_cmd.h"
 #include "findcmd.h"
@@ -55,9 +57,13 @@
 #include "hashcmd.h"
 #include "pathexp.h"
 #include "alias.h"
+#include "jobs.h"
+
+#include "version.h"
 
 #include "builtins/getopt.h"
 #include "builtins/common.h"
+#include "builtins/builtext.h"
 
 #if defined (READLINE)
 #  include "bashline.h"
@@ -75,35 +81,38 @@
 #  include "pcomplete.h"
 #endif
 
+#define VARIABLES_HASH_BUCKETS	1024	/* must be power of two */
+#define FUNCTIONS_HASH_BUCKETS	512
 #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')
+#define BASHFUNC_PREFIX		"BASH_FUNC_"
+#define BASHFUNC_PREFLEN	10	/* == strlen(BASHFUNC_PREFIX */
+#define BASHFUNC_SUFFIX		"%%"
+#define BASHFUNC_SUFFLEN	2	/* == strlen(BASHFUNC_SUFFIX) */
+
+#if ARRAY_EXPORT
+#define BASHARRAY_PREFIX	"BASH_ARRAY_"
+#define BASHARRAY_PREFLEN	11
+#define BASHARRAY_SUFFIX	"%%"
+#define BASHARRAY_SUFFLEN	2
+
+#define BASHASSOC_PREFIX	"BASH_ASSOC_"
+#define BASHASSOC_PREFLEN	11
+#define BASHASSOC_SUFFIX	"%%"	/* needs to be the same as BASHARRAY_SUFFIX */
+#define BASHASSOC_SUFFLEN	2
+#endif
+
+/* flags for find_variable_internal */
+
+#define FV_FORCETEMPENV		0x01
+#define FV_SKIPINVISIBLE	0x02
+#define FV_NODYNAMIC		0x04
 
 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
+extern struct timeval shellstart;
 
 /* The list of shell variables that the user has created at the global
    scope, or that came from the environment. */
@@ -116,6 +125,8 @@ VAR_CONTEXT *shell_variables = (VAR_CONTEXT *)NULL;
    the environment. */
 HASH_TABLE *shell_functions = (HASH_TABLE *)NULL;
 
+HASH_TABLE *invalid_env = (HASH_TABLE *)NULL;
+
 #if defined (DEBUGGER)
 /* The table of shell function definitions that the user defined or that
    came from the environment. */
@@ -126,6 +137,15 @@ HASH_TABLE *shell_function_defs = (HASH_TABLE *)NULL;
    executing functions we are. */
 int variable_context = 0;
 
+/* If non-zero, local variables inherit values and attributes from a variable
+   with the same name at a previous scope. */
+int localvar_inherit = 0;
+
+/* If non-zero, calling `unset' on local variables in previous scopes marks
+   them as invisible so lookups find them unset. This is the same behavior
+   as local variables in the current local scope. */
+int localvar_unset = 0;
+
 /* The set of shell assignments which are made only in the environment
    for a single command. */
 HASH_TABLE *temporary_env = (HASH_TABLE *)NULL;
@@ -138,6 +158,7 @@ int tempenv_assign_error;
    "$*", "$1", and all the cruft is kept. */
 char *dollar_vars[10];
 WORD_LIST *rest_of_args = (WORD_LIST *)NULL;
+int posparam_count = 0;
 
 /* The value of $$. */
 pid_t dollar_dollar_pid;
@@ -158,129 +179,163 @@ 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
 
+SHELL_VAR nameref_invalid_value;
+static SHELL_VAR nameref_maxloop_value;
+
+static HASH_TABLE *last_table_searched;	/* hash_lookup sets this */
+static VAR_CONTEXT *last_context_searched;
+
 /* 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));
+static void create_variable_tables PARAMS((void));
+
+static void set_machine_vars PARAMS((void));
+static void set_home_var PARAMS((void));
+static void set_shell_var PARAMS((void));
+static char *get_bash_name PARAMS((void));
+static void initialize_shell_level PARAMS((void));
+static void uidset PARAMS((void));
 #if defined (ARRAY_VARS)
-static void make_vers_array __P((void));
+static void make_vers_array PARAMS((void));
 #endif
 
-static SHELL_VAR *null_assign __P((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *null_assign PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
 #if defined (ARRAY_VARS)
-static SHELL_VAR *null_array_assign __P((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *null_array_assign PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
 #endif
-static SHELL_VAR *get_self __P((SHELL_VAR *));
+static SHELL_VAR *get_self PARAMS((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));
+static SHELL_VAR *init_dynamic_array_var PARAMS((char *, sh_var_value_func_t *, sh_var_assign_func_t *, int));
+static SHELL_VAR *init_dynamic_assoc_var PARAMS((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 inline SHELL_VAR *set_int_value (SHELL_VAR *, intmax_t, int);
+static inline SHELL_VAR *set_string_value (SHELL_VAR *, const char *, int);
+
+static SHELL_VAR *assign_seconds PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_seconds PARAMS((SHELL_VAR *));
+static SHELL_VAR *init_seconds_var PARAMS((void));
+
+static SHELL_VAR *assign_random PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_random PARAMS((SHELL_VAR *));
+
+static SHELL_VAR *get_urandom PARAMS((SHELL_VAR *));
+
+static SHELL_VAR *assign_lineno PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_lineno PARAMS((SHELL_VAR *));
 
-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_subshell PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_subshell PARAMS((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 *get_epochseconds PARAMS((SHELL_VAR *));
+static SHELL_VAR *get_epochrealtime PARAMS((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 PARAMS((SHELL_VAR *));
 
-static SHELL_VAR *get_bashpid __P((SHELL_VAR *));
+static SHELL_VAR *get_bash_argv0 PARAMS((SHELL_VAR *));
+static SHELL_VAR *assign_bash_argv0 PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
+static void set_argv0 PARAMS((void));
 
 #if defined (HISTORY)
-static SHELL_VAR *get_histcmd __P((SHELL_VAR *));
+static SHELL_VAR *get_histcmd PARAMS((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 *));
+static SHELL_VAR *get_comp_wordbreaks PARAMS((SHELL_VAR *));
+static SHELL_VAR *assign_comp_wordbreaks PARAMS((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 *));
+static SHELL_VAR *assign_dirstack PARAMS((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_dirstack PARAMS((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 *));
+static SHELL_VAR *get_groupset PARAMS((SHELL_VAR *));
+#  if defined (DEBUGGER)
+static SHELL_VAR *get_bashargcv PARAMS((SHELL_VAR *));
+#  endif
+static SHELL_VAR *build_hashcmd PARAMS((SHELL_VAR *));
+static SHELL_VAR *get_hashcmd PARAMS((SHELL_VAR *));
+static SHELL_VAR *assign_hashcmd PARAMS((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 *));
+static SHELL_VAR *build_aliasvar PARAMS((SHELL_VAR *));
+static SHELL_VAR *get_aliasvar PARAMS((SHELL_VAR *));
+static SHELL_VAR *assign_aliasvar PARAMS((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 SHELL_VAR *get_funcname PARAMS((SHELL_VAR *));
+static SHELL_VAR *init_funcname_var PARAMS((void));
+
+static void initialize_dynamic_variables PARAMS((void));
 
-static void initialize_dynamic_variables __P((void));
+static SHELL_VAR *bind_invalid_envvar PARAMS((const char *, char *, int));
 
-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 int var_sametype PARAMS((SHELL_VAR *, SHELL_VAR *));
 
-static void dispose_variable_value __P((SHELL_VAR *));
-static void free_variable_hash_data __P((PTR_T));
+static SHELL_VAR *hash_lookup PARAMS((const char *, HASH_TABLE *));
+static SHELL_VAR *new_shell_variable PARAMS((const char *));
+static SHELL_VAR *make_new_variable PARAMS((const char *, HASH_TABLE *));
+static SHELL_VAR *bind_variable_internal PARAMS((const char *, char *, HASH_TABLE *, int, int));
 
-static VARLIST *vlist_alloc __P((int));
-static VARLIST *vlist_realloc __P((VARLIST *, int));
-static void vlist_add __P((VARLIST *, SHELL_VAR *, int));
+static void dispose_variable_value PARAMS((SHELL_VAR *));
+static void free_variable_hash_data PARAMS((PTR_T));
 
-static void flatten __P((HASH_TABLE *, sh_var_map_func_t *, VARLIST *, int));
+static VARLIST *vlist_alloc PARAMS((int));
+static VARLIST *vlist_realloc PARAMS((VARLIST *, int));
+static void vlist_add PARAMS((VARLIST *, SHELL_VAR *, int));
 
-static int qsort_var_comp __P((SHELL_VAR **, SHELL_VAR **));
+static void flatten PARAMS((HASH_TABLE *, sh_var_map_func_t *, VARLIST *, int));
 
-static SHELL_VAR **vapply __P((sh_var_map_func_t *));
-static SHELL_VAR **fapply __P((sh_var_map_func_t *));
+static int qsort_var_comp PARAMS((SHELL_VAR **, SHELL_VAR **));
 
-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 *));
+static SHELL_VAR **vapply PARAMS((sh_var_map_func_t *));
+static SHELL_VAR **fapply PARAMS((sh_var_map_func_t *));
+
+static int visible_var PARAMS((SHELL_VAR *));
+static int visible_and_exported PARAMS((SHELL_VAR *));
+static int export_environment_candidate PARAMS((SHELL_VAR *));
+static int local_and_exported PARAMS((SHELL_VAR *));
+static int visible_variable_in_context PARAMS((SHELL_VAR *));
+static int variable_in_context PARAMS((SHELL_VAR *));
 #if defined (ARRAY_VARS)
-static int visible_array_vars __P((SHELL_VAR *));
+static int visible_array_vars PARAMS((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 SHELL_VAR *find_variable_internal PARAMS((const char *, int));
+
+static SHELL_VAR *find_nameref_at_context PARAMS((SHELL_VAR *, VAR_CONTEXT *));
+static SHELL_VAR *find_variable_nameref_context PARAMS((SHELL_VAR *, VAR_CONTEXT *, VAR_CONTEXT **));
+static SHELL_VAR *find_variable_last_nameref_context PARAMS((SHELL_VAR *, VAR_CONTEXT *, VAR_CONTEXT **));
+
+static SHELL_VAR *bind_tempenv_variable PARAMS((const char *, char *));
+static void push_posix_temp_var PARAMS((PTR_T));
+static void push_temp_var PARAMS((PTR_T));
+static void propagate_temp_var PARAMS((PTR_T));
+static void dispose_temporary_env PARAMS((sh_free_func_t *));     
+
+static inline char *mk_env_string PARAMS((const char *, const char *, int));
+static char **make_env_array_from_var_list PARAMS((SHELL_VAR **));
+static char **make_var_export_array PARAMS((VAR_CONTEXT *));
+static char **make_func_export_array PARAMS((void));
+static void add_temp_array_to_env PARAMS((char **, int, int));
 
-static inline char *mk_env_string __P((const char *, const char *, int));
-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 PARAMS((void));
+static int set_context PARAMS((SHELL_VAR *));
 
-static int n_shell_variables __P((void));
-static int set_context __P((SHELL_VAR *));
+static void push_func_var PARAMS((PTR_T));
+static void push_builtin_var PARAMS((PTR_T));
+static void push_exported_var PARAMS((PTR_T));
 
-static void push_func_var __P((PTR_T));
-static void push_exported_var __P((PTR_T));
+static void delete_local_contexts PARAMS((VAR_CONTEXT *));
 
-static inline int find_special_var __P((const char *));
+/* This needs to be looked at again. */
+static inline void push_posix_tempvar_internal PARAMS((SHELL_VAR *, int));
+
+static inline int find_special_var PARAMS((const char *));
 
 static void
 create_variable_tables ()
@@ -289,25 +344,18 @@ create_variable_tables ()
     {
       shell_variables = global_variables = new_var_context ((char *)NULL, 0);
       shell_variables->scope = 0;
-      shell_variables->table = hash_create (0);
+      shell_variables->table = hash_create (VARIABLES_HASH_BUCKETS);
     }
 
   if (shell_functions == 0)
-    shell_functions = hash_create (0);
+    shell_functions = hash_create (FUNCTIONS_HASH_BUCKETS);
 
 #if defined (DEBUGGER)
   if (shell_function_defs == 0)
-    shell_function_defs = hash_create (0);
+    shell_function_defs = hash_create (FUNCTIONS_HASH_BUCKETS);
 #endif
 }
 
-/* Prefix and suffix for environment variable names which contain
- shell functions. */
-#define FUNCDEF_PREFIX "BASH_FUNC_"
-#define FUNCDEF_PREFIX_LEN (strlen (FUNCDEF_PREFIX))
-#define FUNCDEF_SUFFIX "()"
-#define FUNCDEF_SUFFIX_LEN (strlen (FUNCDEF_SUFFIX))
-
 /* Initialize the shell variables from the current environment.
    If PRIVMODE is nonzero, don't import functions from ENV or
    parse $SHELLOPTS. */
@@ -317,12 +365,12 @@ initialize_shell_variables (env, privmode)
      int privmode;
 {
   char *name, *string, *temp_string;
-  int c, char_index, string_index, string_length;
+  int c, char_index, string_index, string_length, ro;
   SHELL_VAR *temp_var;
 
   create_variable_tables ();
 
-  for (string_index = 0; string = env[string_index++]; )
+  for (string_index = 0; env && (string = env[string_index++]); )
     {
       char_index = 0;
       name = string;
@@ -343,66 +391,143 @@ initialize_shell_variables (env, privmode)
 
       temp_var = (SHELL_VAR *)NULL;
 
+#if defined (FUNCTION_IMPORT)
       /* 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 (FUNCDEF_PREFIX, name, FUNCDEF_PREFIX_LEN)
-	&& STREQ (name + char_index - FUNCDEF_SUFFIX_LEN, FUNCDEF_SUFFIX)
-	&& STREQN ("() {", string, 4))
-      {
-	size_t name_length = char_index - (FUNCDEF_PREFIX_LEN + FUNCDEF_SUFFIX_LEN);
-	char *temp_name = name + FUNCDEF_PREFIX_LEN;
-	/* Temporarily remove the suffix. */
-	temp_name[name_length] = '\0';
-
-	string_length = strlen (string);
-	temp_string = (char *)xmalloc (name_length + 1 + string_length + 1);
-	memcpy (temp_string, temp_name, name_length);
-	temp_string[name_length] = ' ';
-	memcpy (temp_string + name_length + 1, string, string_length + 1);
-
-	/* Don't import function names that are invalid identifiers from the
-	   environment. */
-	if (legal_identifier (temp_name))
-	  parse_and_execute (temp_string, temp_name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
-
-	if (temp_var = find_function (temp_name))
-	  {
-	    VSETATTR (temp_var, (att_exported|att_imported));
-	    array_needs_making = 1;
-	  }
-	else
-	  report_error (_("error importing function definition for `%s'"), name);
+      if (privmode == 0 && read_but_dont_execute == 0 && 
+          STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) &&
+          STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) &&
+	  STREQN ("() {", string, 4))
+	{
+	  size_t namelen;
+	  char *tname;		/* desired imported function name */
+
+	  namelen = char_index - BASHFUNC_PREFLEN - BASHFUNC_SUFFLEN;
+
+	  tname = name + BASHFUNC_PREFLEN;	/* start of func name */
+	  tname[namelen] = '\0';		/* now tname == func name */
+
+	  string_length = strlen (string);
+	  temp_string = (char *)xmalloc (namelen + string_length + 2);
+
+	  memcpy (temp_string, tname, namelen);
+	  temp_string[namelen] = ' ';
+	  memcpy (temp_string + namelen + 1, string, string_length + 1);
 
-	/* Restore the original suffix. */
-	temp_name[name_length] = FUNCDEF_SUFFIX[0];
-      }
+	  /* Don't import function names that are invalid identifiers from the
+	     environment in posix mode, though we still allow them to be defined as
+	     shell variables. */
+	  if (absolute_program (tname) == 0 && (posixly_correct == 0 || legal_identifier (tname)))
+	    parse_and_execute (temp_string, tname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+	  else
+	    free (temp_string);		/* parse_and_execute does this */
+
+	  if (temp_var = find_function (tname))
+	    {
+	      VSETATTR (temp_var, (att_exported|att_imported));
+	      array_needs_making = 1;
+	    }
+	  else
+	    {
+	      if (temp_var = bind_invalid_envvar (name, string, 0))
+		{
+		  VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
+		  array_needs_making = 1;
+		}
+	      last_command_exit_value = EXECUTION_FAILURE;
+	      report_error (_("error importing function definition for `%s'"), tname);
+	    }
+
+	  /* Restore original suffix */
+	  tname[namelen] = BASHFUNC_SUFFIX[0];
+	}
+      else
+#endif /* FUNCTION_IMPORT */
 #if defined (ARRAY_VARS)
-#  if 0
+#  if ARRAY_EXPORT
       /* Array variables may not yet be exported. */
-      else if (*string == '(' && string[1] == '[' && string[strlen (string) - 1] == ')')
+      if (STREQN (BASHARRAY_PREFIX, name, BASHARRAY_PREFLEN) &&
+	  STREQN (BASHARRAY_SUFFIX, name + char_index - BASHARRAY_SUFFLEN, BASHARRAY_SUFFLEN) &&
+	  *string == '(' && string[1] == '[' && string[strlen (string) - 1] == ')')
 	{
+	  size_t namelen;
+	  char *tname;		/* desired imported array variable name */
+
+	  namelen = char_index - BASHARRAY_PREFLEN - BASHARRAY_SUFFLEN;
+
+	  tname = name + BASHARRAY_PREFLEN;	/* start of variable name */
+	  tname[namelen] = '\0';		/* now tname == varname */
+	  
 	  string_length = 1;
 	  temp_string = extract_array_assignment_list (string, &string_length);
-	  temp_var = assign_array_from_string (name, temp_string);
+	  temp_var = assign_array_from_string (tname, temp_string, 0);
+	  FREE (temp_string);
+	  if (temp_var)
+	    {
+	      VSETATTR (temp_var, (att_exported | att_imported));
+	      array_needs_making = 1;
+	    }
+	}
+      else if (STREQN (BASHASSOC_PREFIX, name, BASHASSOC_PREFLEN) &&
+	  STREQN (BASHASSOC_SUFFIX, name + char_index - BASHASSOC_SUFFLEN, BASHASSOC_SUFFLEN) &&
+	  *string == '(' && string[1] == '[' && string[strlen (string) - 1] == ')')
+	{
+	  size_t namelen;
+	  char *tname;		/* desired imported assoc variable name */
+
+	  namelen = char_index - BASHASSOC_PREFLEN - BASHASSOC_SUFFLEN;
+
+	  tname = name + BASHASSOC_PREFLEN;	/* start of variable name */
+	  tname[namelen] = '\0';		/* now tname == varname */
+
+	  /* need to make sure it exists as an associative array first */
+	  temp_var = find_or_make_array_variable (tname, 2);
+	  if (temp_var)
+	    {
+	      string_length = 1;
+	      temp_string = extract_array_assignment_list (string, &string_length);
+	      temp_var = assign_array_var_from_string (temp_var, temp_string, 0);
+	    }
 	  FREE (temp_string);
-	  VSETATTR (temp_var, (att_exported | att_imported));
-	  array_needs_making = 1;
+	  if (temp_var)
+	    {
+	      VSETATTR (temp_var, (att_exported | att_imported));
+	      array_needs_making = 1;
+	    }
 	}
-#  endif
-#endif
-#if 0
-      else if (legal_identifier (name))
-#else
       else
+#  endif /* ARRAY_EXPORT */
 #endif
 	{
-	  temp_var = bind_variable (name, string, 0);
+	  ro = 0;
+	  /* If we processed a command-line option that caused SHELLOPTS to be
+	     set, it may already be set (and read-only) by the time we process
+	     the shell's environment. */
+	  if (/* posixly_correct &&*/ STREQ (name, "SHELLOPTS"))
+	    {
+	      temp_var = find_variable ("SHELLOPTS");
+	      ro = temp_var && readonly_p (temp_var);
+	      if (temp_var)
+		VUNSETATTR (temp_var, att_readonly);
+	    }
 	  if (legal_identifier (name))
-	    VSETATTR (temp_var, (att_exported | att_imported));
+	    {
+	      temp_var = bind_variable (name, string, 0);
+	      if (temp_var)
+		{
+		  VSETATTR (temp_var, (att_exported | att_imported));
+		  if (ro)
+		    VSETATTR (temp_var, att_readonly);
+		}
+	    }
 	  else
-	    VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
-	  array_needs_making = 1;
+	    {
+	      temp_var = bind_invalid_envvar (name, string, 0);
+	      if (temp_var)
+		VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
+	    }
+	  if (temp_var)
+	    array_needs_making = 1;
 	}
 
       name[char_index] = '=';
@@ -425,14 +550,7 @@ initialize_shell_variables (env, privmode)
   /* 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 */
@@ -444,7 +562,8 @@ initialize_shell_variables (env, privmode)
     qnx_nidtostr (getnid (), node_name, sizeof (node_name));
 #  endif
     temp_var = bind_variable ("NODE", node_name, 0);
-    set_auto_export (temp_var);
+    if (temp_var)
+      set_auto_export (temp_var);
   }
 #endif
 
@@ -460,7 +579,11 @@ initialize_shell_variables (env, privmode)
 #endif
       set_if_not ("PS2", secondary_prompt);
     }
-  set_if_not ("PS4", "+ ");
+
+  if (current_user.euid == 0)
+    bind_variable ("PS4", "+ ", 0);
+  else
+    set_if_not ("PS4", "+ ");
 
   /* Don't allow IFS to be imported from the environment. */
   temp_var = bind_variable ("IFS", " \t\n", 0);
@@ -484,6 +607,8 @@ initialize_shell_variables (env, privmode)
 
   set_ppid ();
 
+  set_argv0 ();
+
   /* Initialize the `getopts' stuff. */
   temp_var = bind_variable ("OPTIND", "1", 0);
   VSETATTR (temp_var, att_integer);
@@ -533,16 +658,12 @@ initialize_shell_variables (env, privmode)
 
       set_if_not ("HISTFILE", name);
       free (name);
-
-#if 0
-      set_if_not ("HISTSIZE", "500");
-      sv_histsize ("HISTSIZE");
-#endif
     }
 #endif /* HISTORY */
 
-  /* Seed the random number generator. */
+  /* Seed the random number generators. */
   seedrand ();
+  seedrand32 ();
 
   /* Handle some "special" variables that we may have inherited from a
      parent shell. */
@@ -565,40 +686,27 @@ initialize_shell_variables (env, privmode)
 #endif /* HISTORY */
 
 #if defined (READLINE) && defined (STRICT_POSIX)
-  /* POSIXLY_CORRECT will only be 1 here if the shell was compiled
-     -DSTRICT_POSIX */
+  /* POSIXLY_CORRECT will be 1 here if the shell was compiled
+     -DSTRICT_POSIX or if POSIXLY_CORRECT was supplied in the shell's
+     environment */
   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 ();
 
+  temp_var = set_if_not ("BASH_LOADABLES_PATH", DEFAULT_LOADABLE_BUILTINS_PATH);
+
+  temp_var = find_variable ("BASH_XTRACEFD");
+  if (temp_var && imported_p (temp_var))
+    sv_xtracefd (temp_var->name);
+
+  sv_shcompat ("BASH_COMPAT");
+
+  /* Allow FUNCNEST to be inherited from the environment. */
+  sv_funcnest ("FUNCNEST");
+
   /* Initialize the dynamic variables, and seed their values. */
   initialize_dynamic_variables ();
 }
@@ -754,7 +862,7 @@ adjust_shell_level (change)
   shell_level = old_level + change;
   if (shell_level < 0)
     shell_level = 0;
-  else if (shell_level > 1000)
+  else if (shell_level >= 1000)
     {
       internal_warning (_("shell level (%d) too high, resetting to 1"), shell_level);
       shell_level = 1;
@@ -802,16 +910,30 @@ void
 set_pwd ()
 {
   SHELL_VAR *temp_var, *home_var;
-  char *temp_string, *home_string;
+  char *temp_string, *home_string, *current_dir;
 
   home_var = find_variable ("HOME");
   home_string = home_var ? value_cell (home_var) : (char *)NULL;
 
   temp_var = find_variable ("PWD");
+  /* Follow posix rules for importing PWD */
   if (temp_var && imported_p (temp_var) &&
       (temp_string = value_cell (temp_var)) &&
+      temp_string[0] == '/' &&
       same_file (temp_string, ".", (struct stat *)NULL, (struct stat *)NULL))
-    set_working_directory (temp_string);
+    {
+      current_dir = sh_canonpath (temp_string, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
+      if (current_dir == 0)
+	current_dir = get_working_directory ("shell_init");
+      else
+	set_working_directory (current_dir);
+      if (posixly_correct && current_dir)
+	{
+	  temp_var = bind_variable ("PWD", current_dir, 0);
+	  set_auto_export (temp_var);
+	}  
+      free (current_dir);
+    }
   else if (home_string && interactive_shell && login_shell &&
 	   same_file (home_string, ".", (struct stat *)NULL, (struct stat *)NULL))
     {
@@ -831,10 +953,19 @@ set_pwd ()
     }
 
   /* 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));
+     `environment variable' and therefore should be auto-exported.  If we
+     don't find OLDPWD in the environment, or it doesn't name a directory,
+     make a dummy invisible variable for OLDPWD, and mark it as exported. */
+  temp_var = find_variable ("OLDPWD");
+#if defined (OLDPWD_CHECK_DIRECTORY)
+  if (temp_var == 0 || value_cell (temp_var) == 0 || file_isdir (value_cell (temp_var)) == 0)
+#else
+  if (temp_var == 0 || value_cell (temp_var) == 0)
+#endif
+    {
+      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.  */
@@ -885,7 +1016,7 @@ make_vers_array ()
   ARRAY *av;
   char *s, d[32], b[INT_STRLEN_BOUND(int) + 1];
 
-  unbind_variable ("BASH_VERSINFO");
+  unbind_variable_noref ("BASH_VERSINFO");
 
   vv = make_new_array_variable ("BASH_VERSINFO");
   av = array_cell (vv);
@@ -1062,7 +1193,7 @@ print_var_function (var)
    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,
+   value for the specified dynamic variable.  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);
@@ -1137,7 +1268,7 @@ get_self (self)
 }
 
 #if defined (ARRAY_VARS)
-/* A generic dynamic array variable initializer.  Intialize array variable
+/* A generic dynamic array variable initializer.  Initialize array variable
    NAME with dynamic value function GETFUNC and assignment function SETFUNC. */
 static SHELL_VAR *
 init_dynamic_array_var (name, getfunc, setfunc, attrs)
@@ -1176,6 +1307,39 @@ init_dynamic_assoc_var (name, getfunc, setfunc, attrs)
 }
 #endif
 
+/* Set the string value of VAR to the string representation of VALUE.
+   Right now this takes an INTMAX_T because that's what itos needs. If
+   FLAGS&1, we force the integer attribute on. */
+static inline SHELL_VAR *
+set_int_value (SHELL_VAR *var, intmax_t value, int flags)
+{
+  char *p;
+
+  p = itos (value);
+  FREE (value_cell (var));
+  var_setvalue (var, p);
+  if (flags & 1)
+    VSETATTR (var, att_integer);
+  return (var);
+}
+
+static inline SHELL_VAR *
+set_string_value (SHELL_VAR *var, const char *value, int flags)
+{
+  char *p;
+
+  if (value && *value)
+    p = savestring (value);
+  else
+    {
+      p = (char *)xmalloc (1);
+      p[0] = '\0';
+    }
+  FREE (value_cell (var));
+  var_setvalue (var, p);
+  return (var);
+}
+
 /* 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. */
@@ -1188,10 +1352,17 @@ assign_seconds (self, value, unused, key)
      arrayind_t unused;
      char *key;
 {
-  if (legal_number (value, &seconds_value_assigned) == 0)
-    seconds_value_assigned = 0;
-  shell_start_time = NOW;
-  return (self);
+  intmax_t nval;
+  int expok;
+
+  if (integer_p (self))
+    nval = evalexp (value, 0, &expok);
+  else
+    expok = legal_number (value, &nval);
+  seconds_value_assigned = expok ? nval : 0;
+  gettimeofday (&shellstart, NULL);
+  shell_start_time = shellstart.tv_sec;
+  return (set_int_value (self, nval, integer_p (self) != 0));
 }
 
 static SHELL_VAR *
@@ -1199,16 +1370,11 @@ 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));
+  struct timeval tv;
 
-  VSETATTR (var, att_integer);
-  var_setvalue (var, p);
-  return (var);
+  gettimeofday(&tv, NULL);
+  time_since_start = tv.tv_sec - shell_start_time;
+  return (set_int_value (var, seconds_value_assigned + time_since_start, 1));
 }
 
 static SHELL_VAR *
@@ -1225,59 +1391,11 @@ init_seconds_var ()
   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;
+/* Functions for $RANDOM and $SRANDOM */
 
-  gettimeofday (&tv, NULL);
-  sbrand (tv.tv_sec ^ tv.tv_usec ^ getpid ());
-}
+int last_random_value;
+static int seeded_subshell = 0;
 
 static SHELL_VAR *
 assign_random (self, value, unused, key)
@@ -1286,10 +1404,19 @@ assign_random (self, value, unused, key)
      arrayind_t unused;
      char *key;
 {
-  sbrand (strtoul (value, (char **)NULL, 10));
+  intmax_t seedval;
+  int expok;
+
+  if (integer_p (self))
+    seedval = evalexp (value, 0, &expok);
+  else
+    expok = legal_number (value, &seedval);
+  if (expok == 0)
+    return (self);
+  sbrand (seedval);
   if (subshell_environment)
     seeded_subshell = getpid ();
-  return (self);
+  return (set_int_value (self, seedval, integer_p (self) != 0));
 }
 
 int
@@ -1308,7 +1435,8 @@ get_random_number ()
   do
     rv = brand ();
   while (rv == last_random_value);
-  return rv;
+
+  return (last_random_value = rv);
 }
 
 static SHELL_VAR *
@@ -1316,17 +1444,19 @@ get_random (var)
      SHELL_VAR *var;
 {
   int rv;
-  char *p;
 
   rv = get_random_number ();
-  last_random_value = rv;
-  p = itos (rv);
+  return (set_int_value (var, rv, 1));
+}
 
-  FREE (value_cell (var));
+static SHELL_VAR *
+get_urandom (var)
+     SHELL_VAR *var;
+{
+  u_bits32_t rv;
 
-  VSETATTR (var, att_integer);
-  var_setvalue (var, p);
-  return (var);
+  rv = get_urandom32 ();
+  return (set_int_value (var, rv, 1));
 }
 
 static SHELL_VAR *
@@ -1340,8 +1470,8 @@ assign_lineno (var, value, unused, key)
 
   if (value == 0 || *value == '\0' || legal_number (value, &new_value) == 0)
     new_value = 0;
-  line_number = new_value;
-  return var;
+  line_number = line_number_base = new_value;
+  return (set_int_value (var, line_number, integer_p (var) != 0));
 }
 
 /* Function which returns the current line number. */
@@ -1349,14 +1479,10 @@ 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);
+  return (set_int_value (var, ln, 0));
 }
 
 static SHELL_VAR *
@@ -1378,12 +1504,32 @@ static SHELL_VAR *
 get_subshell (var)
      SHELL_VAR *var;
 {
-  char *p;
+  return (set_int_value (var, subshell_level, 0));
+}
 
-  p = itos (subshell_level);
-  FREE (value_cell (var));
-  var_setvalue (var, p);
-  return (var);
+static SHELL_VAR *
+get_epochseconds (var)
+     SHELL_VAR *var;
+{
+  intmax_t now;
+
+  now = NOW;
+  return (set_int_value (var, now, 0));
+}
+
+static SHELL_VAR *
+get_epochrealtime (var)
+     SHELL_VAR *var;
+{
+  char buf[32];
+  struct timeval tv;
+
+  gettimeofday (&tv, NULL);
+  snprintf (buf, sizeof (buf), "%u%c%06u", (unsigned)tv.tv_sec,
+					   locale_decpoint (),
+					   (unsigned)tv.tv_usec);
+
+  return (set_string_value (var, buf, 0));
 }
 
 static SHELL_VAR *
@@ -1391,33 +1537,62 @@ get_bashpid (var)
      SHELL_VAR *var;
 {
   int pid;
-  char *p;
 
   pid = getpid ();
-  p = itos (pid);
+  return (set_int_value (var, pid, 1));
+}
 
-  FREE (value_cell (var));
-  VSETATTR (var, att_integer|att_readonly);
-  var_setvalue (var, p);
-  return (var);
+static SHELL_VAR *
+get_bash_argv0 (var)
+     SHELL_VAR *var;
+{
+  return (set_string_value (var, dollar_vars[0], 0));
+}
+
+static char *static_shell_name = 0;
+
+static SHELL_VAR *
+assign_bash_argv0 (var, value, unused, key)
+     SHELL_VAR *var;
+     char *value;
+     arrayind_t unused;
+     char *key;
+{
+  size_t vlen;
+
+  if (value == 0)
+    return var;
+
+  FREE (dollar_vars[0]);
+  dollar_vars[0] = savestring (value);
+
+  /* Need these gyrations because shell_name isn't dynamically allocated */
+  vlen = STRLEN (value);
+  static_shell_name = xrealloc (static_shell_name, vlen + 1);
+  strcpy (static_shell_name, value);
+  
+  shell_name = static_shell_name;
+  return var;
 }
 
+static void
+set_argv0 ()
+{
+  SHELL_VAR *v;
+
+  v = find_variable ("BASH_ARGV0");
+  if (v && imported_p (v))
+    assign_bash_argv0 (v, value_cell (v), 0, 0);
+}
+  
 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);
+  p = the_printed_command_except_trap ? the_printed_command_except_trap : "";
+  return (set_string_value (var, p, 0));
 }
 
 #if defined (HISTORY)
@@ -1425,12 +1600,17 @@ static SHELL_VAR *
 get_histcmd (var)
      SHELL_VAR *var;
 {
-  char *p;
+  int n;
 
-  p = itos (history_number ());
-  FREE (value_cell (var));
-  var_setvalue (var, p);
-  return (var);
+  /* Do the same adjustment here we do in parse.y:prompt_history_number,
+     assuming that we are in one of two states: decoding this as part of
+     the prompt string, in which case we do not want to assume that the
+     command has been saved to the history and the history number incremented,
+     or the expansion is part of the current command being executed and has
+     already been saved to history and the history number incremented.
+     Right now we use EXECUTING as the determinant. */
+  n = history_number () - executing;
+  return (set_int_value (var, n, 0));
 }
 #endif
 
@@ -1444,10 +1624,7 @@ get_comp_wordbreaks (var)
   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);
+  return (set_string_value (var, rl_completer_word_break_characters, 0));
 }
 
 /* When this function returns, rl_completer_word_break_characters points to
@@ -1461,7 +1638,7 @@ assign_comp_wordbreaks (self, value, unused, key)
 {
   if (rl_completer_word_break_characters &&
       rl_completer_word_break_characters != rl_basic_word_break_characters)
-    free (rl_completer_word_break_characters);
+    free ((void *)rl_completer_word_break_characters);
 
   rl_completer_word_break_characters = savestring (value);
   return self;
@@ -1518,6 +1695,27 @@ get_groupset (self)
   return (self);
 }
 
+#  if defined (DEBUGGER)
+static SHELL_VAR *
+get_bashargcv (self)
+     SHELL_VAR *self;
+{
+  static int self_semaphore = 0;
+
+  /* Backwards compatibility: if we refer to BASH_ARGV or BASH_ARGC at the
+     top level without enabling debug mode, and we don't have an instance
+     of the variable set, initialize the arg arrays.
+     This will already have been done if debugging_mode != 0. */
+  if (self_semaphore == 0 && variable_context == 0 && debugging_mode == 0)	/* don't do it for shell functions */
+    {
+      self_semaphore = 1;
+      init_bash_argv ();
+      self_semaphore = 0;
+    }
+  return self;
+}
+#  endif
+
 static SHELL_VAR *
 build_hashcmd (self)
      SHELL_VAR *self;
@@ -1567,9 +1765,31 @@ assign_hashcmd (self, value, ind, key)
      arrayind_t ind;
      char *key;
 {
-  phash_insert (key, value, 0, 0);
-  return (build_hashcmd (self));
-}
+#if defined (RESTRICTED_SHELL)
+  char *full_path;
+
+  if (restricted)
+    {
+      if (strchr (value, '/'))
+	{
+	  sh_restricted (value);
+	  return (SHELL_VAR *)NULL;
+	}
+      /* If we are changing the hash table in a restricted shell, make sure the
+	 target pathname can be found using a $PATH search. */
+      full_path = find_user_command (value);
+      if (full_path == 0 || *full_path == 0 || executable_file (full_path) == 0)
+	{
+	  sh_notfound (value);
+	  free (full_path);
+	  return ((SHELL_VAR *)NULL);
+	}
+      free (full_path);
+    }
+#endif
+  phash_insert (key, value, 0, 0);
+  return (build_hashcmd (self));
+}
 
 #if defined (ALIAS)
 static SHELL_VAR *
@@ -1621,6 +1841,11 @@ assign_aliasvar (self, value, ind, key)
      arrayind_t ind;
      char *key;
 {
+  if (legal_alias_name (key, 0) == 0)
+    {
+       report_error (_("`%s': invalid alias name"), key);
+       return (self);
+    }
   add_alias (key, value);
   return (build_aliasvar (self));
 }
@@ -1635,13 +1860,8 @@ 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);
-    }
+    return (set_string_value (self, this_shell_function->name, 0));
 #endif
   return (self);
 }
@@ -1686,16 +1906,25 @@ initialize_dynamic_variables ()
 
   v = init_seconds_var ();
 
+  INIT_DYNAMIC_VAR ("BASH_ARGV0", (char *)NULL, get_bash_argv0, assign_bash_argv0);
+
   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 ("SRANDOM", (char *)NULL, get_urandom, (sh_var_assign_func_t *)NULL);
+  VSETATTR (v, att_integer);  
   INIT_DYNAMIC_VAR ("LINENO", (char *)NULL, get_lineno, assign_lineno);
-  VSETATTR (v, att_integer);
+  VSETATTR (v, att_regenerate);
 
   INIT_DYNAMIC_VAR ("BASHPID", (char *)NULL, get_bashpid, null_assign);
-  VSETATTR (v, att_integer|att_readonly);
+  VSETATTR (v, att_integer);
+
+  INIT_DYNAMIC_VAR ("EPOCHSECONDS", (char *)NULL, get_epochseconds, null_assign);
+  VSETATTR (v, att_regenerate);
+  INIT_DYNAMIC_VAR ("EPOCHREALTIME", (char *)NULL, get_epochrealtime, null_assign);
+  VSETATTR (v, att_regenerate);
 
 #if defined (HISTORY)
   INIT_DYNAMIC_VAR ("HISTCMD", (char *)NULL, get_histcmd, (sh_var_assign_func_t *)NULL);
@@ -1714,8 +1943,8 @@ initialize_dynamic_variables ()
   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);
+  v = init_dynamic_array_var ("BASH_ARGC", get_bashargcv, null_array_assign, att_noassign|att_nounset);
+  v = init_dynamic_array_var ("BASH_ARGV", get_bashargcv, 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);
@@ -1735,6 +1964,22 @@ initialize_dynamic_variables ()
 /*								    */
 /* **************************************************************** */
 
+#if 0	/* not yet */
+int
+var_isset (var)
+     SHELL_VAR *var;
+{
+  return (var->value != 0);
+}
+
+int
+var_isunset (var)
+     SHELL_VAR *var;
+{
+  return (var->value == 0);
+}
+#endif
+
 /* 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). */
@@ -1747,6 +1992,10 @@ hash_lookup (name, hashed_vars)
   BUCKET_CONTENTS *bucket;
 
   bucket = hash_search (name, hashed_vars, 0);
+  /* If we find the name in HASHED_VARS, set LAST_TABLE_SEARCHED to that
+     table. */
+  if (bucket)
+    last_table_searched = hashed_vars;
   return (bucket ? (SHELL_VAR *)bucket->data : (SHELL_VAR *)NULL);
 }
 
@@ -1774,15 +2023,18 @@ var_lookup (name, vcontext)
 */
 
 SHELL_VAR *
-find_variable_internal (name, force_tempenv)
+find_variable_internal (name, flags)
      const char *name;
-     int force_tempenv;
+     int flags;
 {
   SHELL_VAR *var;
-  int search_tempenv;
+  int search_tempenv, force_tempenv;
+  VAR_CONTEXT *vc;
 
   var = (SHELL_VAR *)NULL;
 
+  force_tempenv = (flags & FV_FORCETEMPENV);
+
   /* 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
@@ -1794,7 +2046,363 @@ find_variable_internal (name, force_tempenv)
     var = hash_lookup (name, temporary_env);
 
   if (var == 0)
-    var = var_lookup (name, shell_variables);
+    {
+      if ((flags & FV_SKIPINVISIBLE) == 0)
+	var = var_lookup (name, shell_variables);
+      else
+	{
+	  /* essentially var_lookup expanded inline so we can check for
+	     att_invisible */
+	  for (vc = shell_variables; vc; vc = vc->down)
+	    {
+	      var = hash_lookup (name, vc->table);
+	      if (var && invisible_p (var))
+		var = 0;
+	      if (var)
+		break;
+	    }
+	}
+    }
+
+  if (var == 0)
+    return ((SHELL_VAR *)NULL);
+
+  return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var);
+}
+
+/* Look up and resolve the chain of nameref variables starting at V all the
+   way to NULL or non-nameref. */
+SHELL_VAR *
+find_variable_nameref (v)
+     SHELL_VAR *v;
+{
+  int level, flags;
+  char *newname;
+  SHELL_VAR *orig, *oldv;
+
+  level = 0;
+  orig = v;
+  while (v && nameref_p (v))
+    {
+      level++;
+      if (level > NAMEREF_MAX)
+	return ((SHELL_VAR *)0);	/* error message here? */
+      newname = nameref_cell (v);
+      if (newname == 0 || *newname == '\0')
+	return ((SHELL_VAR *)0);
+      oldv = v;
+      flags = 0;
+      if (expanding_redir == 0 && (assigning_in_environment || executing_builtin))
+	flags |= FV_FORCETEMPENV;
+      /* We don't handle array subscripts here. */
+      v = find_variable_internal (newname, flags);
+      if (v == orig || v == oldv)
+	{
+	  internal_warning (_("%s: circular name reference"), orig->name);
+#if 1
+	  /* XXX - provisional change - circular refs go to
+	     global scope for resolution, without namerefs. */
+	  if (variable_context && v->context)
+	    return (find_global_variable_noref (v->name));
+	  else
+#endif
+	  return ((SHELL_VAR *)0);
+	}
+    }
+  return v;
+}
+
+/* Resolve the chain of nameref variables for NAME.  XXX - could change later */
+SHELL_VAR *
+find_variable_last_nameref (name, vflags)
+     const char *name;
+     int vflags;
+{
+  SHELL_VAR *v, *nv;
+  char *newname;
+  int level, flags;
+
+  nv = v = find_variable_noref (name);
+  level = 0;
+  while (v && nameref_p (v))
+    {
+      level++;
+      if (level > NAMEREF_MAX)
+        return ((SHELL_VAR *)0);	/* error message here? */
+      newname = nameref_cell (v);
+      if (newname == 0 || *newname == '\0')
+	return ((vflags && invisible_p (v)) ? v : (SHELL_VAR *)0);
+      nv = v;
+      flags = 0;
+      if (expanding_redir == 0 && (assigning_in_environment || executing_builtin))
+	flags |= FV_FORCETEMPENV;
+      /* We don't accommodate array subscripts here. */
+      v = find_variable_internal (newname, flags);
+    }
+  return nv;
+}
+
+/* Resolve the chain of nameref variables for NAME.  XXX - could change later */
+SHELL_VAR *
+find_global_variable_last_nameref (name, vflags)
+     const char *name;
+     int vflags;
+{
+  SHELL_VAR *v, *nv;
+  char *newname;
+  int level;
+
+  nv = v = find_global_variable_noref (name);
+  level = 0;
+  while (v && nameref_p (v))
+    {
+      level++;
+      if (level > NAMEREF_MAX)
+        return ((SHELL_VAR *)0);	/* error message here? */
+      newname = nameref_cell (v);
+      if (newname == 0 || *newname == '\0')
+	return ((vflags && invisible_p (v)) ? v : (SHELL_VAR *)0);
+      nv = v;
+      /* We don't accommodate array subscripts here. */
+      v = find_global_variable_noref (newname);
+    }
+  return nv;
+}
+
+static SHELL_VAR *
+find_nameref_at_context (v, vc)
+     SHELL_VAR *v;
+     VAR_CONTEXT *vc;
+{
+  SHELL_VAR *nv, *nv2;
+  char *newname;
+  int level;
+
+  nv = v;
+  level = 1;
+  while (nv && nameref_p (nv))
+    {
+      level++;
+      if (level > NAMEREF_MAX)
+        return (&nameref_maxloop_value);
+      newname = nameref_cell (nv);
+      if (newname == 0 || *newname == '\0')
+        return ((SHELL_VAR *)NULL);      
+      nv2 = hash_lookup (newname, vc->table);
+      if (nv2 == 0)
+        break;
+      nv = nv2;
+    }
+  return nv;
+}
+
+/* Do nameref resolution from the VC, which is the local context for some
+   function or builtin, `up' the chain to the global variables context.  If
+   NVCP is not NULL, return the variable context where we finally ended the
+   nameref resolution (so the bind_variable_internal can use the correct
+   variable context and hash table). */
+static SHELL_VAR *
+find_variable_nameref_context (v, vc, nvcp)
+     SHELL_VAR *v;
+     VAR_CONTEXT *vc;
+     VAR_CONTEXT **nvcp;
+{
+  SHELL_VAR *nv, *nv2;
+  VAR_CONTEXT *nvc;
+
+  /* Look starting at the current context all the way `up' */
+  for (nv = v, nvc = vc; nvc; nvc = nvc->down)
+    {
+      nv2 = find_nameref_at_context (nv, nvc);
+      if (nv2 == &nameref_maxloop_value)
+	return (nv2);			/* XXX */
+      if (nv2 == 0)
+        continue;
+      nv = nv2;
+      if (*nvcp)
+        *nvcp = nvc;
+      if (nameref_p (nv) == 0)
+        break;
+    }
+  return (nameref_p (nv) ? (SHELL_VAR *)NULL : nv);
+}
+
+/* Do nameref resolution from the VC, which is the local context for some
+   function or builtin, `up' the chain to the global variables context.  If
+   NVCP is not NULL, return the variable context where we finally ended the
+   nameref resolution (so the bind_variable_internal can use the correct
+   variable context and hash table). */
+static SHELL_VAR *
+find_variable_last_nameref_context (v, vc, nvcp)
+     SHELL_VAR *v;
+     VAR_CONTEXT *vc;
+     VAR_CONTEXT **nvcp;
+{
+  SHELL_VAR *nv, *nv2;
+  VAR_CONTEXT *nvc;
+
+  /* Look starting at the current context all the way `up' */
+  for (nv = v, nvc = vc; nvc; nvc = nvc->down)
+    {
+      nv2 = find_nameref_at_context (nv, nvc);
+      if (nv2 == &nameref_maxloop_value)
+	return (nv2);			/* XXX */
+      if (nv2 == 0)
+	continue;
+      nv = nv2;
+      if (*nvcp)
+        *nvcp = nvc;
+    }
+  return (nameref_p (nv) ? nv : (SHELL_VAR *)NULL);
+}
+
+SHELL_VAR *
+find_variable_nameref_for_create (name, flags)
+     const char *name;
+     int flags;
+{
+  SHELL_VAR *var;
+
+  /* See if we have a nameref pointing to a variable that hasn't been
+     created yet. */
+  var = find_variable_last_nameref (name, 1);
+  if ((flags&1) && var && nameref_p (var) && invisible_p (var))
+    {
+      internal_warning (_("%s: removing nameref attribute"), name);
+      VUNSETATTR (var, att_nameref);
+    }
+  if (var && nameref_p (var))
+    {
+      if (legal_identifier (nameref_cell (var)) == 0)
+	{
+	  sh_invalidid (nameref_cell (var) ? nameref_cell (var) : "");
+	  return ((SHELL_VAR *)INVALID_NAMEREF_VALUE);
+	}
+    }
+  return (var);
+}
+
+SHELL_VAR *
+find_variable_nameref_for_assignment (name, flags)
+     const char *name;
+     int flags;
+{
+  SHELL_VAR *var;
+
+  /* See if we have a nameref pointing to a variable that hasn't been
+     created yet. */
+  var = find_variable_last_nameref (name, 1);
+  if (var && nameref_p (var) && invisible_p (var))	/* XXX - flags */
+    {
+      internal_warning (_("%s: removing nameref attribute"), name);
+      VUNSETATTR (var, att_nameref);
+    }
+  if (var && nameref_p (var))
+    {
+      if (valid_nameref_value (nameref_cell (var), 1) == 0)
+	{
+	  sh_invalidid (nameref_cell (var) ? nameref_cell (var) : "");
+	  return ((SHELL_VAR *)INVALID_NAMEREF_VALUE);
+	}
+    }
+  return (var);
+}
+
+/* If find_variable (name) returns NULL, check that it's not a nameref
+   referencing a variable that doesn't exist. If it is, return the new
+   name. If not, return the original name. Kind of like the previous
+   function, but dealing strictly with names. This takes assignment flags
+   so it can deal with the various assignment modes used by `declare'. */
+char *
+nameref_transform_name (name, flags)
+     char *name;
+     int flags;
+{
+  SHELL_VAR *v;
+  char *newname;
+
+  v = 0;
+  if (flags & ASS_MKLOCAL)
+    {
+      v = find_variable_last_nameref (name, 1);
+      /* If we're making local variables, only follow namerefs that point to
+	 non-existent variables at the same variable context. */
+      if (v && v->context != variable_context)
+	v = 0;
+    }
+  else if (flags & ASS_MKGLOBAL)
+    v = (flags & ASS_CHKLOCAL) ? find_variable_last_nameref (name, 1)
+			       : find_global_variable_last_nameref (name, 1);
+  if (v && nameref_p (v) && valid_nameref_value (nameref_cell (v), 1))
+    return nameref_cell (v);
+  return name;
+}
+
+/* Find a variable, forcing a search of the temporary environment first */
+SHELL_VAR *
+find_variable_tempenv (name)
+     const char *name;
+{
+  SHELL_VAR *var;
+
+  var = find_variable_internal (name, FV_FORCETEMPENV);
+  if (var && nameref_p (var))
+    var = find_variable_nameref (var);
+  return (var);
+}
+
+/* Find a variable, not forcing a search of the temporary environment first */
+SHELL_VAR *
+find_variable_notempenv (name)
+     const char *name;
+{
+  SHELL_VAR *var;
+
+  var = find_variable_internal (name, 0);
+  if (var && nameref_p (var))
+    var = find_variable_nameref (var);
+  return (var);
+}
+
+SHELL_VAR *
+find_global_variable (name)
+     const char *name;
+{
+  SHELL_VAR *var;
+
+  var = var_lookup (name, global_variables);
+  if (var && nameref_p (var))
+    var = find_variable_nameref (var);	/* XXX - find_global_variable_noref? */
+
+  if (var == 0)
+    return ((SHELL_VAR *)NULL);
+
+  return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var);
+}
+
+SHELL_VAR *
+find_global_variable_noref (name)
+     const char *name;
+{
+  SHELL_VAR *var;
+
+  var = var_lookup (name, global_variables);
+
+  if (var == 0)
+    return ((SHELL_VAR *)NULL);
+
+  return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var);
+}
+
+SHELL_VAR *
+find_shell_variable (name)
+     const char *name;
+{
+  SHELL_VAR *var;
+
+  var = var_lookup (name, shell_variables);
+  if (var && nameref_p (var))
+    var = find_variable_nameref (var);
 
   if (var == 0)
     return ((SHELL_VAR *)NULL);
@@ -1807,7 +2415,70 @@ SHELL_VAR *
 find_variable (name)
      const char *name;
 {
-  return (find_variable_internal (name, (expanding_redir == 0 && (assigning_in_environment || executing_builtin))));
+  SHELL_VAR *v;
+  int flags;
+
+  last_table_searched = 0;
+  flags = 0;
+  if (expanding_redir == 0 && (assigning_in_environment || executing_builtin))
+    flags |= FV_FORCETEMPENV;
+  v = find_variable_internal (name, flags);
+  if (v && nameref_p (v))
+    v = find_variable_nameref (v);
+  return v;
+}
+
+/* Find the first instance of NAME in the variable context chain; return first
+   one found without att_invisible set; return 0 if no non-invisible instances
+   found. */
+SHELL_VAR *
+find_variable_no_invisible (name)
+     const char *name;
+{
+  SHELL_VAR *v;
+  int flags;
+
+  last_table_searched = 0;
+  flags = FV_SKIPINVISIBLE;
+  if (expanding_redir == 0 && (assigning_in_environment || executing_builtin))
+    flags |= FV_FORCETEMPENV;
+  v = find_variable_internal (name, flags);
+  if (v && nameref_p (v))
+    v = find_variable_nameref (v);
+  return v;
+}
+
+/* Find the first instance of NAME in the variable context chain; return first
+   one found even if att_invisible set. */
+SHELL_VAR *
+find_variable_for_assignment (name)
+     const char *name;
+{
+  SHELL_VAR *v;
+  int flags;
+
+  last_table_searched = 0;
+  flags = 0;
+  if (expanding_redir == 0 && (assigning_in_environment || executing_builtin))
+    flags |= FV_FORCETEMPENV;
+  v = find_variable_internal (name, flags);
+  if (v && nameref_p (v))
+    v = find_variable_nameref (v);
+  return v;
+}
+
+SHELL_VAR *
+find_variable_noref (name)
+     const char *name;
+{
+  SHELL_VAR *v;
+  int flags;
+
+  flags = 0;
+  if (expanding_redir == 0 && (assigning_in_environment || executing_builtin))
+    flags |= FV_FORCETEMPENV;
+  v = find_variable_internal (name, flags);
+  return v;
 }
 
 /* Look up the function entry whose name matches STRING.
@@ -1852,9 +2523,9 @@ get_variable_value (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. */
+   leak if the variable is found in the temporary environment, but doesn't
+   leak in practice.  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;
@@ -1879,6 +2550,42 @@ sh_get_env_value (v)
 /*								    */
 /* **************************************************************** */
 
+static int
+var_sametype (v1, v2)
+     SHELL_VAR *v1;
+     SHELL_VAR *v2;
+{
+  if (v1 == 0 || v2 == 0)
+    return 0;
+#if defined (ARRAY_VARS)
+  else if (assoc_p (v1) && assoc_p (v2))
+    return 1;
+  else if (array_p (v1) && array_p (v2))
+    return 1;
+  else if (array_p (v1) || array_p (v2))
+    return 0;
+  else if (assoc_p (v1) || assoc_p (v2))
+    return 0;
+#endif
+  else
+    return 1;
+}
+
+int
+validate_inherited_value (var, type)
+     SHELL_VAR *var;
+     int type;
+{
+#if defined (ARRAY_VARS)
+  if (type == att_array && assoc_p (var))
+    return 0;
+  else if (type == att_assoc && array_p (var))
+    return 0;
+  else
+#endif
+  return 1;	/* should we run convert_var_to_array here or let the caller? */
+}
+
 /* Set NAME to VALUE if NAME has no value. */
 SHELL_VAR *
 set_if_not (name, value)
@@ -1897,25 +2604,63 @@ set_if_not (name, value)
 
 /* Create a local variable referenced by NAME. */
 SHELL_VAR *
-make_local_variable (name)
+make_local_variable (name, flags)
      const char *name;
+     int flags;
 {
-  SHELL_VAR *new_var, *old_var;
+  SHELL_VAR *new_var, *old_var, *old_ref;
   VAR_CONTEXT *vc;
   int was_tmpvar;
-  char *tmp_value;
+  char *old_value;
 
+  /* We don't want to follow the nameref chain when making local variables; we
+     just want to create them. */
+  old_ref = find_variable_noref (name);
+  if (old_ref && nameref_p (old_ref) == 0)
+    old_ref = 0;
   /* 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)
+  if (old_ref == 0 && old_var && local_p (old_var) && old_var->context == variable_context)
+    return (old_var);
+
+  /* local -n foo; local -n foo;  is a no-op. */
+  if (old_ref && local_p (old_ref) && old_ref->context == variable_context)
+    return (old_ref);
+
+  /* From here on, we want to use the refvar, not the variable it references */
+  if (old_ref)
+    old_var = old_ref;
+
+  was_tmpvar = old_var && tempvar_p (old_var);
+  /* If we're making a local variable in a shell function, the temporary env
+     has already been merged into the function's variable context stack.  We
+     can assume that a temporary var in the same context appears in the same
+     VAR_CONTEXT and can safely be returned without creating a new variable
+     (which results in duplicate names in the same VAR_CONTEXT->table */
+  /* We can't just test tmpvar_p because variables in the temporary env given
+     to a shell function appear in the function's local variable VAR_CONTEXT
+     but retain their tempvar attribute.  We want temporary variables that are
+     found in temporary_env, hence the test for last_table_searched, which is
+     set in hash_lookup and only (so far) checked here. */
+  if (was_tmpvar && old_var->context == variable_context && last_table_searched != temporary_env)
     {
-      VUNSETATTR (old_var, att_invisible);
+      VUNSETATTR (old_var, att_invisible);	/* XXX */
+      /* We still want to flag this variable as local, though, and set things
+         up so that it gets treated as a local variable. */
+      new_var = old_var;
+      /* Since we found the variable in a temporary environment, this will
+	 succeed. */
+      for (vc = shell_variables; vc; vc = vc->down)
+	if (vc_isfuncenv (vc) && vc->scope == variable_context)
+	  break;
+      goto set_local_var_flags;
+
       return (old_var);
     }
 
-  was_tmpvar = old_var && tempvar_p (old_var);
-  if (was_tmpvar)
-    tmp_value = value_cell (old_var);
+  /* If we want to change to "inherit the old variable's value" semantics,
+     here is where to save the old value. */
+  old_value = was_tmpvar ? value_cell (old_var) : (char *)NULL;
 
   for (vc = shell_variables; vc; vc = vc->down)
     if (vc_isfuncenv (vc) && vc->scope == variable_context)
@@ -1941,7 +2686,13 @@ make_local_variable (name)
     {
       if (readonly_p (old_var))
 	sh_readonly (name);
-      return ((SHELL_VAR *)NULL);
+      else if (noassign_p (old_var))
+	builtin_error (_("%s: variable may not be assigned value"), name);
+#if 0
+      /* Let noassign variables through with a warning */
+      if (readonly_p (old_var))
+#endif
+	return ((SHELL_VAR *)NULL);
     }
 
   if (old_var == 0)
@@ -1952,13 +2703,46 @@ make_local_variable (name)
 
       /* 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'. */
+	 things like `x=4 local x'. XXX - see above for temporary env
+	 variables with the same context level as variable_context */
+      /* XXX - we should only do this if the variable is not an array. */
+      /* If we want to change the local variable semantics to "inherit
+	 the old variable's value" here is where to set it.  And we would
+	 need to use copy_variable (currently unused) to do it for all
+	 possible variable values. */
       if (was_tmpvar)
-	var_setvalue (new_var, savestring (tmp_value));
+	var_setvalue (new_var, savestring (old_value));
+      else if (localvar_inherit || (flags & MKLOC_INHERIT))
+	{
+	  /* This may not make sense for nameref variables that are shadowing
+	     variables with the same name, but we don't know that yet. */
+#if defined (ARRAY_VARS)
+	  if (assoc_p (old_var))
+	    var_setassoc (new_var, assoc_copy (assoc_cell (old_var)));
+	  else if (array_p (old_var))
+	    var_setarray (new_var, array_copy (array_cell (old_var)));
+	  else if (value_cell (old_var))
+#else
+	  if (value_cell (old_var))
+#endif
+	    var_setvalue (new_var, savestring (value_cell (old_var)));
+	  else
+	    var_setvalue (new_var, (char *)NULL);
+	}
 
-      new_var->attributes = exported_p (old_var) ? att_exported : 0;
+      if (localvar_inherit || (flags & MKLOC_INHERIT))
+	{
+	  /* It doesn't make sense to inherit the nameref attribute */
+	  new_var->attributes = old_var->attributes & ~att_nameref;
+	  new_var->dynamic_value = old_var->dynamic_value;
+	  new_var->assign_func = old_var->assign_func;
+	}
+      else
+	/* We inherit the export attribute, but no others. */
+	new_var->attributes = exported_p (old_var) ? att_exported : 0;
     }
 
+set_local_var_flags:
   vc->flags |= VC_HASLOCAL;
 
   new_var->context = variable_context;
@@ -1967,6 +2751,10 @@ make_local_variable (name)
   if (ifsname (name))
     setifs (new_var);
 
+  /* value_cell will be 0 if localvar_inherit == 0 or there was no old variable
+     with the same name or the old variable was invisible */
+  if (was_tmpvar == 0 && value_cell (new_var) == 0)
+    VSETATTR (new_var, att_invisible);	/* XXX */
   return (new_var);
 }
 
@@ -1989,7 +2777,7 @@ new_shell_variable (name)
   entry->attributes = 0;
 
   /* Always assume variables are to be made at toplevel!
-     make_local_variable has the responsibilty of changing the
+     make_local_variable has the responsibility of changing the
      variable context. */
   entry->context = 0;
 
@@ -2035,20 +2823,42 @@ make_new_array_variable (name)
 }
 
 SHELL_VAR *
-make_local_array_variable (name)
+make_local_array_variable (name, flags)
      char *name;
+     int flags;
 {
   SHELL_VAR *var;
   ARRAY *array;
+  int assoc_ok;
+
+  assoc_ok = flags & MKLOC_ASSOCOK;
 
-  var = make_local_variable (name);
-  if (var == 0 || array_p (var))
+  var = make_local_variable (name, flags & MKLOC_INHERIT);	/* XXX for now */
+  /* If ASSOC_OK is non-zero, assume that we are ok with letting an assoc
+     variable return to the caller without converting it. The caller will
+     either flag an error or do the conversion itself. */
+  if (var == 0 || array_p (var) || (assoc_ok && assoc_p (var)))
     return var;
 
-  array = array_create ();
+  /* Validate any value we inherited from a variable instance at a previous
+     scope and discard anything that's invalid. */
+  if (localvar_inherit && assoc_p (var))
+    {
+      internal_warning (_("%s: cannot inherit value from incompatible type"), name);
+      VUNSETATTR (var, att_assoc);
+      dispose_variable_value (var);
+      array = array_create ();
+      var_setarray (var, array);
+    }
+  else if (localvar_inherit)
+    var = convert_var_to_array (var);		/* XXX */
+  else
+    {
+      dispose_variable_value (var);
+      array = array_create ();
+      var_setarray (var, array);
+    }
 
-  dispose_variable_value (var);
-  var_setarray (var, array);
   VSETATTR (var, att_array);
   return var;
 }
@@ -2061,7 +2871,7 @@ make_new_assoc_variable (name)
   HASH_TABLE *hash;
 
   entry = make_new_variable (name, global_variables->table);
-  hash = assoc_create (0);
+  hash = assoc_create (ASSOC_HASH_BUCKETS);
 
   var_setassoc (entry, hash);
   VSETATTR (entry, att_assoc);
@@ -2069,20 +2879,42 @@ make_new_assoc_variable (name)
 }
 
 SHELL_VAR *
-make_local_assoc_variable (name)
+make_local_assoc_variable (name, flags)
      char *name;
+     int flags;
 {
   SHELL_VAR *var;
   HASH_TABLE *hash;
+  int array_ok;
 
-  var = make_local_variable (name);
-  if (var == 0 || assoc_p (var))
+  array_ok = flags & MKLOC_ARRAYOK;
+
+  var = make_local_variable (name, flags & MKLOC_INHERIT);	/* XXX for now */
+  /* If ARRAY_OK is non-zero, assume that we are ok with letting an array
+     variable return to the caller without converting it. The caller will
+     either flag an error or do the conversion itself. */
+  if (var == 0 || assoc_p (var) || (array_ok && array_p (var)))
     return var;
 
-  dispose_variable_value (var);
-  hash = assoc_create (0);
+  /* Validate any value we inherited from a variable instance at a previous
+     scope and discard anything that's invalid. */
+  if (localvar_inherit && array_p (var))
+    {
+      internal_warning (_("%s: cannot inherit value from incompatible type"), name);
+      VUNSETATTR (var, att_array);
+      dispose_variable_value (var);
+      hash = assoc_create (ASSOC_HASH_BUCKETS);
+      var_setassoc (var, hash);
+    }
+  else if (localvar_inherit)
+    var = convert_var_to_assoc (var);		/* XXX */
+  else
+    {
+      dispose_variable_value (var);
+      hash = assoc_create (ASSOC_HASH_BUCKETS);
+      var_setassoc (var, hash);
+    }
 
-  var_setassoc (var, hash);
   VSETATTR (var, att_assoc);
   return var;
 }
@@ -2102,31 +2934,46 @@ make_variable_value (var, value, flags)
      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))
+     evaluation done.  Callers that find it inconvenient to do this can set
+     the ASS_NOEVAL flag.  For the special case of arithmetic expression
+     evaluation, the caller can set ASS_NOLONGJMP to avoid jumping out to
+     top_level. */
+  if ((flags & ASS_NOEVAL) == 0 && integer_p (var))
     {
       if (flags & ASS_APPEND)
 	{
 	  oval = value_cell (var);
-	  lval = evalexp (oval, &expok);	/* ksh93 seems to do this */
+	  lval = evalexp (oval, 0, &expok);	/* ksh93 seems to do this */
 	  if (expok == 0)
 	    {
-	      top_level_cleanup ();
-	      jump_to_top_level (DISCARD);
+	      if (flags & ASS_NOLONGJMP)
+		goto make_value;
+	      else
+		{
+		  top_level_cleanup ();
+		  jump_to_top_level (DISCARD);
+		}
 	    }
 	}
-      rval = evalexp (value, &expok);
+      rval = evalexp (value, 0, &expok);
       if (expok == 0)
 	{
-	  top_level_cleanup ();
-	  jump_to_top_level (DISCARD);
+	  if (flags & ASS_NOLONGJMP)
+	    goto make_value;
+	  else
+	    {
+	      top_level_cleanup ();
+	      jump_to_top_level (DISCARD);
+	    }
 	}
+      /* This can be fooled if the variable's value changes while evaluating
+	 `rval'.  We can change it if we move the evaluation of lval to here. */
       if (flags & ASS_APPEND)
 	rval += lval;
       retval = itos (rval);
     }
 #if defined (CASEMOD_ATTRS)
-  else if (capcase_p (var) || uppercase_p (var) || lowercase_p (var))
+  else if ((flags & ASS_NOEVAL) == 0 && (capcase_p (var) || uppercase_p (var) || lowercase_p (var)))
     {
       if (flags & ASS_APPEND)
 	{
@@ -2155,6 +3002,7 @@ make_variable_value (var, value, flags)
 #endif /* CASEMOD_ATTRS */
   else if (value)
     {
+make_value:
       if (flags & ASS_APPEND)
 	{
 	  oval = get_variable_value (var);
@@ -2180,8 +3028,55 @@ make_variable_value (var, value, flags)
   return retval;
 }
 
+/* If we can optimize appending to string variables, say so */
+static int
+can_optimize_assignment (entry, value, aflags)
+     SHELL_VAR *entry;
+     char *value;
+     int aflags;
+{
+  if ((aflags & ASS_APPEND) == 0)
+    return 0;
+#if defined (ARRAY_VARS)
+  if (array_p (entry) || assoc_p (entry))
+    return 0;
+#endif
+  if (integer_p (entry) || uppercase_p (entry) || lowercase_p (entry) || capcase_p (entry))
+    return 0;
+  if (readonly_p (entry) || noassign_p (entry))
+    return 0;
+  return 1;
+}
+
+/* right now we optimize appends to string variables */
+static SHELL_VAR *
+optimized_assignment (entry, value, aflags)
+     SHELL_VAR *entry;
+     char *value;
+     int aflags;
+{
+  size_t len, vlen;
+  char *v, *new;
+
+  v = value_cell (entry);
+  len = STRLEN (v);
+  vlen = STRLEN (value);
+
+  new = (char *)xrealloc (v, len + vlen + 8);	/* for now */
+  if (vlen == 1)
+    {
+      new[len] = *value;
+      new[len+1] = '\0';
+    }
+  else
+    strcpy (new + len, value);
+  var_setvalue (entry, new);
+  return entry;
+}
+
 /* Bind a variable NAME to VALUE in the HASH_TABLE TABLE, which may be the
-   temporary environment (but usually is not). */
+   temporary environment (but usually is not).  HFLAGS controls how NAME
+   is looked up in TABLE; AFLAGS controls how VALUE is assigned */
 static SHELL_VAR *
 bind_variable_internal (name, value, table, hflags, aflags)
      const char *name;
@@ -2189,18 +3084,87 @@ bind_variable_internal (name, value, table, hflags, aflags)
      HASH_TABLE *table;
      int hflags, aflags;
 {
-  char *newval;
-  SHELL_VAR *entry;
+  char *newval, *tname;
+  SHELL_VAR *entry, *tentry;
 
   entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table);
+  /* Follow the nameref chain here if this is the global variables table */
+  if (entry && nameref_p (entry) && (invisible_p (entry) == 0) && table == global_variables->table)
+    {
+      entry = find_global_variable (entry->name);
+      /* Let's see if we have a nameref referencing a variable that hasn't yet
+	 been created. */
+      if (entry == 0)
+	entry = find_variable_last_nameref (name, 0);	/* XXX */
+      if (entry == 0)					/* just in case */
+        return (entry);
+    }
 
-  if (entry == 0)
+  /* The first clause handles `declare -n ref; ref=x;' or `declare -n ref;
+     declare -n ref' */
+  if (entry && invisible_p (entry) && nameref_p (entry))
+    {
+      if ((aflags & ASS_FORCE) == 0 && value && valid_nameref_value (value, 0) == 0)
+	{
+	  sh_invalidid (value);
+	  return ((SHELL_VAR *)NULL);
+	}
+      goto assign_value;
+    }
+  else if (entry && nameref_p (entry))
+    {
+      newval = nameref_cell (entry);	/* XXX - newval can't be NULL here */
+      if (valid_nameref_value (newval, 0) == 0)
+	{
+	  sh_invalidid (newval);
+	  return ((SHELL_VAR *)NULL);
+	}
+#if defined (ARRAY_VARS)
+      /* declare -n foo=x[2] ; foo=bar */
+      if (valid_array_reference (newval, 0))
+	{
+	  tname = array_variable_name (newval, 0, (char **)0, (int *)0);
+	  if (tname && (tentry = find_variable_noref (tname)) && nameref_p (tentry))
+	    {
+	      /* nameref variables can't be arrays */
+	      internal_warning (_("%s: removing nameref attribute"), name_cell (tentry));
+	      FREE (value_cell (tentry));		/* XXX - bash-4.3 compat */
+	      var_setvalue (tentry, (char *)NULL);
+	      VUNSETATTR (tentry, att_nameref);
+	    }
+	  free (tname);
+
+	  /* entry == nameref variable; tentry == array variable;
+	     newval == x[2]; value = bar
+	     We don't need to call make_variable_value here, since
+	     assign_array_element will eventually do it itself based on
+	     newval and aflags. */
+
+	  entry = assign_array_element (newval, value, aflags|ASS_NAMEREF, (array_eltstate_t *)0);
+	  if (entry == 0)
+	    return entry;
+	}
+      else
+#endif
+	{
+	  entry = make_new_variable (newval, table);
+	  var_setvalue (entry, make_variable_value (entry, value, aflags));
+	}
+    }
+  else if (entry == 0)
     {
       entry = make_new_variable (name, table);
-      var_setvalue (entry, make_variable_value (entry, value, 0)); /* XXX */
+      var_setvalue (entry, make_variable_value (entry, value, aflags)); /* XXX */
     }
   else if (entry->assign_func)	/* array vars have assign functions now */
     {
+      if ((readonly_p (entry) && (aflags & ASS_FORCE) == 0) || noassign_p (entry))
+	{
+	  if (readonly_p (entry))
+	    err_readonly (name_cell (entry));
+	  return (entry);
+	}
+
       INVALIDATE_EXPORTSTR (entry);
       newval = (aflags & ASS_APPEND) ? make_variable_value (entry, value, aflags) : value;
       if (assoc_p (entry))
@@ -2215,16 +3179,38 @@ bind_variable_internal (name, value, table, hflags, aflags)
     }
   else
     {
-      if (readonly_p (entry) || noassign_p (entry))
+assign_value:
+      if ((readonly_p (entry) && (aflags & ASS_FORCE) == 0) || noassign_p (entry))
 	{
 	  if (readonly_p (entry))
-	    err_readonly (name);
+	    err_readonly (name_cell (entry));
 	  return (entry);
 	}
 
       /* Variables which are bound are visible. */
       VUNSETATTR (entry, att_invisible);
 
+      /* If we can optimize the assignment, do so and return.  Right now, we
+	 optimize appends to string variables. */
+      if (can_optimize_assignment (entry, value, aflags))
+	{
+	  INVALIDATE_EXPORTSTR (entry);
+	  optimized_assignment (entry, value, aflags);
+
+	  if (mark_modified_vars)
+	    VSETATTR (entry, att_exported);
+
+	  if (exported_p (entry))
+	    array_needs_making = 1;
+
+	  return (entry);
+	}
+
+#if defined (ARRAY_VARS)
+      if (assoc_p (entry) || array_p (entry))
+        newval = make_array_variable_value (entry, 0, "0", value, aflags);
+      else
+#endif
       newval = make_variable_value (entry, value, aflags);	/* XXX */
 
       /* Invalidate any cached export string */
@@ -2235,14 +3221,14 @@ bind_variable_internal (name, value, table, hflags, aflags)
       /* 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))
+      if (assoc_p (entry))
 	{
-	  array_insert (array_cell (entry), 0, newval);
+	  assoc_insert (assoc_cell (entry), savestring ("0"), newval);
 	  free (newval);
 	}
-      else if (assoc_p (entry))
+      else if (array_p (entry))
 	{
-	  assoc_insert (assoc_cell (entry), savestring ("0"), newval);
+	  array_insert (array_cell (entry), 0, newval);
 	  free (newval);
 	}
       else
@@ -2272,8 +3258,8 @@ bind_variable (name, value, flags)
      char *value;
      int flags;
 {
-  SHELL_VAR *v;
-  VAR_CONTEXT *vc;
+  SHELL_VAR *v, *nv;
+  VAR_CONTEXT *vc, *nvc;
 
   if (shell_variables == 0)
     create_variable_tables ();
@@ -2283,7 +3269,7 @@ bind_variable (name, value, flags)
      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)
+  if (temporary_env && value)		/* XXX - can value be null here? */
     bind_tempenv_variable (name, value);
 
   /* XXX -- handle local variables here. */
@@ -2292,13 +3278,78 @@ bind_variable (name, value, flags)
       if (vc_isfuncenv (vc) || vc_isbltnenv (vc))
 	{
 	  v = hash_lookup (name, vc->table);
+	  nvc = vc;
+	  if (v && nameref_p (v))
+	    {
+	      /* This starts at the context where we found the nameref. If we
+		 want to start the name resolution over again at the original
+		 context, this is where we need to change it */
+	      nv = find_variable_nameref_context (v, vc, &nvc);
+	      if (nv == 0)
+		{
+		  nv = find_variable_last_nameref_context (v, vc, &nvc);
+		  if (nv && nameref_p (nv))
+		    {
+		      /* If this nameref variable doesn't have a value yet,
+			 set the value.  Otherwise, assign using the value as
+			 normal. */
+		      if (nameref_cell (nv) == 0)
+			return (bind_variable_internal (nv->name, value, nvc->table, 0, flags));
+#if defined (ARRAY_VARS)
+		      else if (valid_array_reference (nameref_cell (nv), 0))
+			return (assign_array_element (nameref_cell (nv), value, flags, (array_eltstate_t *)0));
+		      else
+#endif
+		      return (bind_variable_internal (nameref_cell (nv), value, nvc->table, 0, flags));
+		    }
+		  else if (nv == &nameref_maxloop_value)
+		    {
+		      internal_warning (_("%s: circular name reference"), v->name);
+		      return (bind_global_variable (v->name, value, flags));
+		    }
+		  else
+		    v = nv;
+		}
+	      else if (nv == &nameref_maxloop_value)
+		{
+		  internal_warning (_("%s: circular name reference"), v->name);
+		  return (bind_global_variable (v->name, value, flags));
+		}
+	      else
+	        v = nv;
+	    }
 	  if (v)
-	    return (bind_variable_internal (name, value, vc->table, 0, flags));
+	    return (bind_variable_internal (v->name, value, nvc->table, 0, flags));
 	}
     }
+  /* bind_variable_internal will handle nameref resolution in this case */
+  return (bind_variable_internal (name, value, global_variables->table, 0, flags));
+}
+
+SHELL_VAR *
+bind_global_variable (name, value, flags)
+     const char *name;
+     char *value;
+     int flags;
+{
+  if (shell_variables == 0)
+    create_variable_tables ();
+
+  /* bind_variable_internal will handle nameref resolution in this case */
   return (bind_variable_internal (name, value, global_variables->table, 0, flags));
 }
 
+static SHELL_VAR *
+bind_invalid_envvar (name, value, flags)
+     const char *name;
+     char *value;
+     int flags;
+{
+  if (invalid_env == 0)
+    invalid_env = hash_create (64);	/* XXX */
+  return (bind_variable_internal (name, value, invalid_env, HASH_NOSRCH, 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
@@ -2311,7 +3362,9 @@ bind_variable_value (var, value, aflags)
      int aflags;
 {
   char *t;
+  int invis;
 
+  invis = invisible_p (var);
   VUNSETATTR (var, att_invisible);
 
   if (var->assign_func)
@@ -2326,6 +3379,26 @@ bind_variable_value (var, value, aflags)
   else
     {
       t = make_variable_value (var, value, aflags);
+      if ((aflags & (ASS_NAMEREF|ASS_FORCE)) == ASS_NAMEREF && check_selfref (name_cell (var), t, 0))
+	{
+	  if (variable_context)
+	    internal_warning (_("%s: circular name reference"), name_cell (var));
+	  else
+	    {
+	      internal_error (_("%s: nameref variable self references not allowed"), name_cell (var));
+	      free (t);
+	      if (invis)
+		VSETATTR (var, att_invisible);	/* XXX */
+	      return ((SHELL_VAR *)NULL);
+	    }
+	}
+      if ((aflags & ASS_NAMEREF) && (valid_nameref_value (t, 0) == 0))
+	{
+	  free (t);
+	  if (invis)
+	    VSETATTR (var, att_invisible);	/* XXX */
+	  return ((SHELL_VAR *)NULL);
+	}
       FREE (value_cell (var));
       var_setvalue (var, t);
     }
@@ -2352,18 +3425,34 @@ bind_variable_value (var, value, aflags)
    variable we set here, then turn it back on after binding as necessary. */
 
 SHELL_VAR *
-bind_int_variable (lhs, rhs)
+bind_int_variable (lhs, rhs, flags)
      char *lhs, *rhs;
+     int flags;
 {
   register SHELL_VAR *v;
-  int isint, isarr;
+  int isint, isarr, implicitarray, vflags, avflags;
 
-  isint = isarr = 0;
+  isint = isarr = implicitarray = 0;
 #if defined (ARRAY_VARS)
-  if (valid_array_reference (lhs))
+  /* Don't rely on VA_NOEXPAND being 1, set it explicitly */
+  vflags = (flags & ASS_NOEXPAND) ? VA_NOEXPAND : 0;
+  if (flags & ASS_ONEWORD)
+    vflags |= VA_ONEWORD;
+  if (valid_array_reference (lhs, vflags))
     {
       isarr = 1;
-      v = array_variable_part (lhs, (char **)0, (int *)0);
+      avflags = 0;
+      /* Common code to translate between assignment and reference flags. */
+      if (flags & ASS_NOEXPAND)
+	avflags |= AV_NOEXPAND;
+      if (flags & ASS_ONEWORD)
+	avflags |= AV_ONEWORD;
+      v = array_variable_part (lhs, avflags, (char **)0, (int *)0);
+    }
+  else if (legal_identifier (lhs) == 0)
+    {
+      sh_invalidid (lhs);
+      return ((SHELL_VAR *)NULL);      
     }
   else
 #endif
@@ -2373,30 +3462,44 @@ bind_int_variable (lhs, rhs)
     {
       isint = integer_p (v);
       VUNSETATTR (v, att_integer);
+#if defined (ARRAY_VARS)
+      if (array_p (v) && isarr == 0)
+	implicitarray = 1;
+#endif
     }
 
 #if defined (ARRAY_VARS)
   if (isarr)
-    v = assign_array_element (lhs, rhs, 0);
+    v = assign_array_element (lhs, rhs, flags, (array_eltstate_t *)0);
+  else if (implicitarray)
+    v = bind_array_variable (lhs, 0, rhs, 0);	/* XXX - check on flags */
   else
 #endif
-    v = bind_variable (lhs, rhs, 0);
+    v = bind_variable (lhs, rhs, 0);	/* why not use bind_variable_value? */
 
-  if (isint)
-    VSETATTR (v, att_integer);
+  if (v)
+    {
+      if (isint)
+	VSETATTR (v, att_integer);
+      VUNSETATTR (v, att_invisible);
+    }
 
+  if (v && nameref_p (v))
+    internal_warning (_("%s: assigning integer to name reference"), lhs);
+     
   return (v);
 }
 
 SHELL_VAR *
-bind_var_to_int (var, val)
+bind_var_to_int (var, val, flags)
      char *var;
      intmax_t val;
+     int flags;
 {
   char ibuf[INT_STRLEN_BOUND (intmax_t) + 1], *p;
 
   p = fmtulong (val, 10, ibuf, sizeof (ibuf), 0);
-  return (bind_int_variable (var, p));
+  return (bind_int_variable (var, p, flags));
 }
 
 /* Do a function binding to a variable.  You pass the name and
@@ -2447,22 +3550,27 @@ bind_function (name, value)
 
 #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.*/
+   information in addition to the command, into the FUNCTION_DEF hash table.
+   If (FLAGS & 1), overwrite any existing definition. If FLAGS == 0, leave
+   any existing definition alone. */
 void
-bind_function_def (name, value)
+bind_function_def (name, value, flags)
      const char *name;
      FUNCTION_DEF *value;
+     int flags;
 {
   FUNCTION_DEF *entry;
   BUCKET_CONTENTS *elt;
   COMMAND *cmd;
 
   entry = find_function_def (name);
-  if (entry)
+  if (entry && (flags & 1))
     {
       dispose_function_def_contents (entry);
       entry = copy_function_def_contents (value, entry);
     }
+  else if (entry)
+    return;
   else
     {
       cmd = value->command;
@@ -2481,29 +3589,61 @@ bind_function_def (name, value)
    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)
+assign_in_env (word, flags)
      WORD_DESC *word;
+     int flags;
 {
-  int offset;
-  char *name, *temp, *value;
+  int offset, aflags;
+  char *name, *temp, *value, *newname;
   SHELL_VAR *var;
   const char *string;
 
   string = word->word;
 
+  aflags = 0;
   offset = assignment (string, 0);
-  name = savestring (string);
+  newname = name = savestring (string);
   value = (char *)NULL;
 
   if (name[offset] == '=')
     {
       name[offset] = 0;
 
-      /* ignore the `+' when assigning temporary environment */
+      /* don't ignore the `+' when assigning temporary environment */
       if (name[offset - 1] == '+')
-	name[offset - 1] = '\0';
+	{
+	  name[offset - 1] = '\0';
+	  aflags |= ASS_APPEND;
+	}
 
+      if (legal_identifier (name) == 0)
+	{
+	  sh_invalidid (name);
+	  free (name);
+	  return (0);
+	}
+  
       var = find_variable (name);
+      if (var == 0)
+	{
+	  var = find_variable_last_nameref (name, 1);
+	  /* If we're assigning a value to a nameref variable in the temp
+	     environment, and the value of the nameref is valid for assignment,
+	     but the variable does not already exist, assign to the nameref
+	     target and add the target to the temporary environment.  This is
+	     what ksh93 does */
+	  /* We use 2 in the call to valid_nameref_value because we don't want
+	     to allow array references here at all (newname will be used to
+	     create a variable directly below) */
+	  if (var && nameref_p (var) && valid_nameref_value (nameref_cell (var), 2))
+	    {
+	      newname = nameref_cell (var);
+	      var = 0;		/* don't use it for append */
+	    }
+	}
+      else
+        newname = name_cell (var);	/* no-op if not nameref */
+	  
       if (var && (readonly_p (var) || noassign_p (var)))
 	{
 	  if (readonly_p (var))
@@ -2511,23 +3651,35 @@ assign_in_env (word)
 	  free (name);
   	  return (0);
 	}
-
       temp = name + offset + 1;
+
       value = expand_assignment_string_to_string (temp, 0);
+
+      if (var && (aflags & ASS_APPEND))
+	{
+	  if (value == 0)
+	    {
+	      value = (char *)xmalloc (1);	/* like do_assignment_internal */
+	      value[0] = '\0';
+	    }
+	  temp = make_variable_value (var, value, aflags);
+	  FREE (value);
+	  value = temp;
+	}
     }
 
   if (temporary_env == 0)
     temporary_env = hash_create (TEMPENV_HASH_BUCKETS);
 
-  var = hash_lookup (name, temporary_env);
+  var = hash_lookup (newname, temporary_env);
   if (var == 0)
-    var = make_new_variable (name, temporary_env);
+    var = make_new_variable (newname, temporary_env);
   else
     FREE (value_cell (var));
 
   if (value == 0)
     {
-      value = (char *)xmalloc (1);	/* like do_assignment_internal */
+      value = (char *)xmalloc (1);	/* see above */
       value[0] = '\0';
     }
 
@@ -2536,12 +3688,16 @@ assign_in_env (word)
   var->context = variable_context;	/* XXX */
 
   INVALIDATE_EXPORTSTR (var);
-  var->exportstr = mk_env_string (name, value, 0);
+  var->exportstr = mk_env_string (newname, value, 0);
 
   array_needs_making = 1;
 
-  if (ifsname (name))
-    setifs (var);
+  if (flags)
+    {
+      if (STREQ (newname, "POSIXLY_CORRECT") || STREQ (newname, "POSIX_PEDANDTIC"))
+	save_posix_options ();		/* XXX one level of saving right now */
+      stupidly_hack_special_variables (newname);
+    }
 
   if (echo_command_at_execute)
     /* The Korn shell prints the `+ ' in front of assignment statements,
@@ -2581,7 +3737,9 @@ copy_variable (var)
       else if (assoc_p (var))
 	var_setassoc (copy, assoc_copy (assoc_cell (var)));
 #endif
-      else if (value_cell (var))
+      else if (nameref_cell (var))	/* XXX - nameref */
+	var_setref (copy, savestring (nameref_cell (var)));
+      else if (value_cell (var))	/* XXX - nameref */
 	var_setvalue (copy, savestring (value_cell (var)));
       else
 	var_setvalue (copy, (char *)NULL);
@@ -2616,6 +3774,8 @@ dispose_variable_value (var)
   else if (assoc_p (var))
     assoc_dispose (assoc_cell (var));
 #endif
+  else if (nameref_p (var))
+    FREE (nameref_cell (var));
   else
     FREE (value_cell (var));
 }
@@ -2640,12 +3800,94 @@ dispose_variable (var)
   free (var);
 }
 
-/* Unset the shell variable referenced by NAME. */
+/* Unset the shell variable referenced by NAME.  Unsetting a nameref variable
+   unsets the variable it resolves to but leaves the nameref alone. */
 int
 unbind_variable (name)
      const char *name;
 {
-  return makunbound (name, shell_variables);
+  SHELL_VAR *v, *nv;
+  int r;
+
+  v = var_lookup (name, shell_variables);
+  nv = (v && nameref_p (v)) ? find_variable_nameref (v) : (SHELL_VAR *)NULL;
+
+  r = nv ? makunbound (nv->name, shell_variables) : makunbound (name, shell_variables);
+  return r;
+}
+
+/* Unbind NAME, where NAME is assumed to be a nameref variable */
+int
+unbind_nameref (name)
+     const char *name;
+{
+  SHELL_VAR *v;
+
+  v = var_lookup (name, shell_variables);
+  if (v && nameref_p (v))
+    return makunbound (name, shell_variables);
+  return 0;
+}
+
+/* Unbind the first instance of NAME, whether it's a nameref or not */
+int
+unbind_variable_noref (name)
+     const char *name;
+{
+  SHELL_VAR *v;
+
+  v = var_lookup (name, shell_variables);
+  if (v)
+    return makunbound (name, shell_variables);
+  return 0;
+}
+
+int
+unbind_global_variable (name)
+     const char *name;
+{
+  SHELL_VAR *v, *nv;
+  int r;
+
+  v = var_lookup (name, global_variables);
+  /* This starts at the current scope, just like find_global_variable; should we
+     use find_global_variable_nameref here? */
+  nv = (v && nameref_p (v)) ? find_variable_nameref (v) : (SHELL_VAR *)NULL;
+
+  r = nv ? makunbound (nv->name, shell_variables) : makunbound (name, global_variables);
+  return r;
+}
+
+int
+unbind_global_variable_noref (name)
+     const char *name;
+{
+  SHELL_VAR *v;
+
+  v = var_lookup (name, global_variables);
+  if (v)
+    return makunbound (name, global_variables);
+  return 0;
+}
+ 
+int
+check_unbind_variable (name)
+     const char *name;
+{
+  SHELL_VAR *v;
+
+  v = find_variable (name);
+  if (v && readonly_p (v))
+    {
+      internal_error (_("%s: cannot unset: readonly %s"), name, "variable");
+      return -2;
+    }
+  else if (v && non_unsettable_p (v))
+    {
+      internal_error (_("%s: cannot unset"), name);
+      return -2;
+    }
+  return (unbind_variable (name));
 }
 
 /* Unset the shell function named NAME. */
@@ -2703,6 +3945,30 @@ unbind_function_def (name)
 }
 #endif /* DEBUGGER */
 
+int
+delete_var (name, vc)
+     const char *name;
+     VAR_CONTEXT *vc;
+{
+  BUCKET_CONTENTS *elt;
+  SHELL_VAR *old_var;
+  VAR_CONTEXT *v;
+
+  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;
+  free (elt->key);
+  free (elt);
+
+  dispose_variable (old_var);
+  return (0);
+}
+
 /* 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).
@@ -2735,7 +4001,8 @@ makunbound (name, vc)
      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 (old_var && local_p (old_var) &&
+	(old_var->context == variable_context || (localvar_unset && old_var->context < variable_context)))
     {
       if (nofree_p (old_var))
 	var_setvalue (old_var, (char *)NULL);
@@ -2745,6 +4012,8 @@ makunbound (name, vc)
       else if (assoc_p (old_var))
 	assoc_dispose (assoc_cell (old_var));
 #endif
+      else if (nameref_p (old_var))
+	FREE (nameref_cell (old_var));
       else
 	FREE (value_cell (old_var));
       /* Reset the attributes.  Preserve the export attribute if the variable
@@ -2831,7 +4100,7 @@ delete_all_variables (hashed_vars)
       if (!entry) \
 	{ \
 	  entry = bind_variable (name, "", 0); \
-	  if (!no_invisible_vars) entry->attributes |= att_invisible; \
+	  if (entry) entry->attributes |= att_invisible; \
 	} \
     } \
   while (0)
@@ -3149,12 +4418,20 @@ local_exported_variables ()
 static int
 variable_in_context (var)
      SHELL_VAR *var;
+{
+  return (local_p (var) && var->context == variable_context);
+}
+
+static int
+visible_variable_in_context (var)
+     SHELL_VAR *var;
 {
   return (invisible_p (var) == 0 && local_p (var) && var->context == variable_context);
 }
 
 SHELL_VAR **
-all_local_variables ()
+all_local_variables (visible_only)
+     int visible_only;
 {
   VARLIST *vlist;
   SHELL_VAR **ret;
@@ -3175,7 +4452,10 @@ all_local_variables ()
     
   vlist = vlist_alloc (HASH_ENTRIES (vc->table));
 
-  flatten (vc->table, variable_in_context, vlist, 0);
+  if (visible_only)
+    flatten (vc->table, visible_variable_in_context, vlist, 0);
+  else
+    flatten (vc->table, variable_in_context, vlist, 0);
 
   ret = vlist->list;
   free (vlist);
@@ -3190,7 +4470,7 @@ static int
 visible_array_vars (var)
      SHELL_VAR *var;
 {
-  return (invisible_p (var) == 0 && array_p (var));
+  return (invisible_p (var) == 0 && (array_p (var) || assoc_p (var)));
 }
 
 SHELL_VAR **
@@ -3261,8 +4541,68 @@ find_tempenv_variable (name)
   return (temporary_env ? hash_lookup (name, temporary_env) : (SHELL_VAR *)NULL);
 }
 
+char **tempvar_list;
+int tvlist_ind;
+
+/* Take a variable from an assignment statement preceding a posix special
+   builtin (including `return') and create a global variable from it. This
+   is called from merge_temporary_env, which is only called when in posix
+   mode. */
+static void
+push_posix_temp_var (data)
+     PTR_T data;
+{
+  SHELL_VAR *var, *v;
+  HASH_TABLE *binding_table;
+
+  var = (SHELL_VAR *)data;
+
+  /* Just like do_assignment_internal(). This makes assignments preceding
+     special builtins act like standalone assignment statements when in
+     posix mode, satisfying the posix requirement that this affect the
+     "current execution environment." */
+  v = bind_variable (var->name, value_cell (var), ASS_FORCE|ASS_NOLONGJMP);
+
+  /* XXX - do we need to worry about array variables here? */
+
+  /* If this modifies an existing local variable, v->context will be non-zero.
+     If it comes back with v->context == 0, we bound at the global context.
+     Set binding_table appropriately. It doesn't matter whether it's correct
+     if the variable is local, only that it's not global_variables->table */
+  binding_table = v->context ? shell_variables->table : global_variables->table;
+
+  /* global variables are no longer temporary and don't need propagating. */
+  if (v->context == 0)
+    var->attributes &= ~(att_tempvar|att_propagate);
+
+  if (v)
+    {
+      v->attributes |= var->attributes;		/* preserve tempvar attribute if appropriate */
+      /* If we don't bind a local variable, propagate the value. If we bind a
+	 local variable (the "current execution environment"), keep it as local
+	 and don't propagate it to the calling environment. */
+      if (v->context > 0 && local_p (v) == 0)
+	v->attributes |= att_propagate;
+      else
+	v->attributes &= ~att_propagate;
+    }
+
+  if (find_special_var (var->name) >= 0)
+    tempvar_list[tvlist_ind++] = savestring (var->name);
+
+  dispose_variable (var);
+}
+
 /* Push the variable described by (SHELL_VAR *)DATA down to the next
-   variable context from the temporary environment. */
+   variable context from the temporary environment. This can be called
+   from one context:
+      1. propagate_temp_var: which is called to propagate variables in
+	 assignments like `var=value declare -x var' to the surrounding
+	 scope.
+
+  In this case, the variable should have the att_propagate flag set and
+  we can create variables in the current scope.
+*/
 static void
 push_temp_var (data)
      PTR_T data;
@@ -3277,28 +4617,39 @@ push_temp_var (data)
     {
       if (shell_variables == global_variables)
 	/* shouldn't happen */
-	binding_table = shell_variables->table = global_variables->table = hash_create (0);
+	binding_table = shell_variables->table = global_variables->table = hash_create (VARIABLES_HASH_BUCKETS);
       else
 	binding_table = shell_variables->table = hash_create (TEMPENV_HASH_BUCKETS);
     }
 
-  v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, 0);
+  v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, ASS_FORCE|ASS_NOLONGJMP);
 
   /* XXX - should we set the context here?  It shouldn't matter because of how
-     assign_in_env works, but might want to check. */
+     assign_in_env works, but we do it anyway. */
+  if (v)
+    v->context = shell_variables->scope;
+
   if (binding_table == global_variables->table)		/* XXX */
     var->attributes &= ~(att_tempvar|att_propagate);
   else
     {
-      var->attributes |= att_propagate;
+      var->attributes |= att_propagate;			/* XXX - propagate more than once? */
       if  (binding_table == shell_variables->table)
 	shell_variables->flags |= VC_HASTMPVAR;
     }
-  v->attributes |= var->attributes;
+  if (v)
+    v->attributes |= var->attributes;
+
+  if (find_special_var (var->name) >= 0)
+    tempvar_list[tvlist_ind++] = savestring (var->name);
 
   dispose_variable (var);
 }
 
+/* Take a variable described by DATA and push it to the surrounding scope if
+   the PROPAGATE attribute is set. That gets set by push_temp_var if we are
+   taking a variable like `var=value declare -x var' and propagating it to
+   the enclosing scope. */
 static void
 propagate_temp_var (data)
      PTR_T data;
@@ -3309,24 +4660,46 @@ propagate_temp_var (data)
   if (tempvar_p (var) && (var->attributes & att_propagate))
     push_temp_var (data);
   else
-    dispose_variable (var);
+    {
+      if (find_special_var (var->name) >= 0)
+	tempvar_list[tvlist_ind++] = savestring (var->name);
+      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. */
+   to previous scopes if appropriate.  PUSHF stores names of variables
+   that require special handling (e.g., IFS) on tempvar_list, so this
+   function can call stupidly_hack_special_variables on all the
+   variables in the list when the temporary hash table is destroyed. */
 static void
 dispose_temporary_env (pushf)
      sh_free_func_t *pushf;
 {
-  hash_flush (temporary_env, pushf);
-  hash_dispose (temporary_env);
+  int i;
+  HASH_TABLE *disposer;
+
+  tempvar_list = strvec_create (HASH_ENTRIES (temporary_env) + 1);
+  tempvar_list[tvlist_ind = 0] = 0;
+
+  disposer = temporary_env;
   temporary_env = (HASH_TABLE *)NULL;
 
+  hash_flush (disposer, pushf);
+  hash_dispose (disposer);
+
+  tempvar_list[tvlist_ind] = 0;
+
   array_needs_making = 1;
 
-  sv_ifs ("IFS");		/* XXX here for now */
+  for (i = 0; i < tvlist_ind; i++)
+    stupidly_hack_special_variables (tempvar_list[i]);
+
+  strvec_dispose (tempvar_list);
+  tempvar_list = 0;
+  tvlist_ind = 0;
 }
 
 void
@@ -3340,57 +4713,129 @@ dispose_used_env_vars ()
 }
 
 /* Take all of the shell variables in the temporary environment HASH_TABLE
-   and make shell variables from them at the current variable context. */
+   and make shell variables from them at the current variable context.
+   Right now, this is only called in Posix mode to implement the historical
+   accident of creating global variables from assignment statements preceding
+   special builtins, but we check in case this acquires another caller later. */
 void
 merge_temporary_env ()
+{
+  if (temporary_env)
+    dispose_temporary_env (posixly_correct ? push_posix_temp_var : push_temp_var);
+}
+
+/* Temporary function to use if we want to separate function and special
+   builtin behavior. */
+void
+merge_function_temporary_env ()
 {
   if (temporary_env)
     dispose_temporary_env (push_temp_var);
 }
 
+void
+flush_temporary_env ()
+{
+  if (temporary_env)
+    {
+      hash_flush (temporary_env, free_variable_hash_data);
+      hash_dispose (temporary_env);
+      temporary_env = (HASH_TABLE *)NULL;
+    }
+}
+
 /* **************************************************************** */
 /*								    */
 /*	     Creating and manipulating the environment		    */
 /*								    */
 /* **************************************************************** */
 
-/* Returns the string NAME=VALUE if !FUNCTIONP or if VALUE == NULL (in
-   which case it is treated as empty). Otherwise, decorate NAME with
-   FUNCDEF_PREFIX and FUNCDEF_SUFFIX, and return a string of the form
-   FUNCDEF_PREFIX NAME FUNCDEF_SUFFIX = VALUE (without spaces). */
-
 static inline char *
-mk_env_string (name, value, functionp)
+mk_env_string (name, value, attributes)
      const char *name, *value;
-     int functionp;
+     int attributes;
 {
   size_t name_len, value_len;
-  char *p, *q;
+  char	*p, *q, *t;
+  int isfunc, isarray;
 
   name_len = strlen (name);
   value_len = STRLEN (value);
-  if (functionp && value != NULL)
+
+  isfunc = attributes & att_function;
+#if defined (ARRAY_VARS) && defined (ARRAY_EXPORT)
+  isarray = attributes & (att_array|att_assoc);
+#endif
+
+  /* If we are exporting a shell function, construct the encoded function
+     name. */
+  if (isfunc && value)
+    {
+      p = (char *)xmalloc (BASHFUNC_PREFLEN + name_len + BASHFUNC_SUFFLEN + value_len + 2);
+      q = p;
+      memcpy (q, BASHFUNC_PREFIX, BASHFUNC_PREFLEN);
+      q += BASHFUNC_PREFLEN;
+      memcpy (q, name, name_len);
+      q += name_len;
+      memcpy (q, BASHFUNC_SUFFIX, BASHFUNC_SUFFLEN);
+      q += BASHFUNC_SUFFLEN;
+    }
+#if defined (ARRAY_VARS) && defined (ARRAY_EXPORT)
+  else if (isarray && value)
     {
-      p = (char *)xmalloc (FUNCDEF_PREFIX_LEN + name_len + FUNCDEF_SUFFIX_LEN + 1 + value_len + 1);
+      if (attributes & att_assoc)
+	p = (char *)xmalloc (BASHASSOC_PREFLEN + name_len + BASHASSOC_SUFFLEN + value_len + 2);
+      else
+	p = (char *)xmalloc (BASHARRAY_PREFLEN + name_len + BASHARRAY_SUFFLEN + value_len + 2);
       q = p;
-      memcpy (q, FUNCDEF_PREFIX, FUNCDEF_PREFIX_LEN);
-      q += FUNCDEF_PREFIX_LEN;
+      if (attributes & att_assoc)
+	{
+	  memcpy (q, BASHASSOC_PREFIX, BASHASSOC_PREFLEN);
+	  q += BASHASSOC_PREFLEN;
+	}
+      else
+	{
+	  memcpy (q, BASHARRAY_PREFIX, BASHARRAY_PREFLEN);
+	  q += BASHARRAY_PREFLEN;
+	}
       memcpy (q, name, name_len);
       q += name_len;
-      memcpy (q, FUNCDEF_SUFFIX, FUNCDEF_SUFFIX_LEN);
-      q += FUNCDEF_SUFFIX_LEN;
+      /* These are actually the same currently */
+      if (attributes & att_assoc)
+        {
+	  memcpy (q, BASHASSOC_SUFFIX, BASHASSOC_SUFFLEN);
+	  q += BASHARRAY_SUFFLEN;
+        }
+      else
+        {
+	  memcpy (q, BASHARRAY_SUFFIX, BASHARRAY_SUFFLEN);
+	  q += BASHARRAY_SUFFLEN;
+        }
     }
-    else
+#endif  
+  else
     {
-      p = (char *)xmalloc (name_len + 1 + value_len + 1);
+      p = (char *)xmalloc (2 + name_len + value_len);
       memcpy (p, name, name_len);
       q = p + name_len;
     }
+
   q[0] = '=';
   if (value && *value)
-    memcpy (q + 1, value, value_len + 1);
+    {
+      if (isfunc)
+	{
+	  t = dequote_escapes (value);
+	  value_len = STRLEN (t);
+	  memcpy (q + 1, t, value_len + 1);
+	  free (t);
+	}
+      else
+	memcpy (q + 1, value, value_len + 1);
+    }
   else
     q[1] = '\0';
+
   return (p);
 }
 
@@ -3432,6 +4877,12 @@ valid_exportstr (v)
 }
 #endif
 
+#if defined (ARRAY_VARS)
+#  define USE_EXPORTSTR (value == var->exportstr && array_p (var) == 0 && assoc_p (var) == 0)
+#else
+#  define USE_EXPORTSTR (value == var->exportstr)
+#endif
+
 static char **
 make_env_array_from_var_list (vars)
      SHELL_VAR **vars;
@@ -3442,31 +4893,37 @@ make_env_array_from_var_list (vars)
 
   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 the value is generated dynamically, generate it here. */
+      if (regen_p (var) && var->dynamic_value)
+	{
+	  var = (*(var->dynamic_value)) (var);
+	  INVALIDATE_EXPORTSTR (var);
+	}
+
       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));
+#  if ARRAY_EXPORT
+	value = array_to_assign (array_cell (var), 0);
 #  else
 	continue;	/* XXX array vars cannot yet be exported */
-#  endif
+#  endif /* ARRAY_EXPORT */
       else if (assoc_p (var))
-#  if 0
-	value = assoc_to_assignment_string (assoc_cell (var));
+#  if ARRAY_EXPORT
+	value = assoc_to_assign (assoc_cell (var), 0);
 #  else
 	continue;	/* XXX associative array vars cannot yet be exported */
-#  endif
+#  endif /* ARRAY_EXPORT */
 #endif
       else
 	value = value_cell (var);
@@ -3475,7 +4932,8 @@ make_env_array_from_var_list (vars)
 	{
 	  /* 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, function_p (var));
+	  list[list_index] = USE_EXPORTSTR ? savestring (value)
+					   : mk_env_string (var->name, value, var->attributes);
 
 	  if (USE_EXPORTSTR == 0)
 	    SAVE_EXPORTSTR (var, list[list_index]);
@@ -3483,11 +4941,9 @@ make_env_array_from_var_list (vars)
 	  list_index++;
 #undef USE_EXPORTSTR
 
-#if 0	/* not yet */
-#if defined (ARRAY_VARS)
+#if defined (ARRAY_VARS) && defined (ARRAY_EXPORT)
 	  if (array_p (var) || assoc_p (var))
 	    free (value);
-#endif
 #endif
 	}
     }
@@ -3551,7 +5007,7 @@ do \
     export_env[export_env_index] = (char *)NULL; \
   } while (0)
 
-/* Add ASSIGN to EXPORT_ENV, or supercede a previous assignment in the
+/* Add ASSIGN to EXPORT_ENV, or supersede 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)
@@ -3633,12 +5089,28 @@ n_shell_variables ()
   return n;
 }
 
+int
+chkexport (name)
+     char *name;
+{
+  SHELL_VAR *v;
+
+  v = find_variable (name);
+  if (v && exported_p (v))
+    {
+      array_needs_making = 1;
+      maybe_make_export_env ();
+      return 1;
+    }
+  return 0;
+}
+
 void
 maybe_make_export_env ()
 {
   register char **temp_array;
   int new_size;
-  VAR_CONTEXT *tcxt;
+  VAR_CONTEXT *tcxt, *icxt;
 
   if (array_needs_making)
     {
@@ -3650,7 +5122,7 @@ maybe_make_export_env ()
 	 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);
+		 HASH_ENTRIES (temporary_env) + HASH_ENTRIES (invalid_env);
       if (new_size > export_env_size)
 	{
 	  export_env_size = new_size;
@@ -3671,11 +5143,23 @@ maybe_make_export_env ()
 	}
       else
 	tcxt = shell_variables;
+
+      if (invalid_env)
+	{
+	  icxt = new_var_context ((char *)NULL, 0);
+	  icxt->table = invalid_env;
+	  icxt->down = tcxt;
+	}
+      else
+	icxt = tcxt;
       
-      temp_array = make_var_export_array (tcxt);
+      temp_array = make_var_export_array (icxt);
       if (temp_array)
 	add_temp_array_to_env (temp_array, 0, 0);
 
+      if (icxt != tcxt)
+	free (icxt);
+
       if (tcxt != shell_variables)
 	free (tcxt);
 
@@ -3724,33 +5208,6 @@ put_command_name_into_env (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		    */
@@ -3813,13 +5270,25 @@ push_var_context (name, flags, tempvars)
      HASH_TABLE *tempvars;
 {
   VAR_CONTEXT *vc;
+  int posix_func_behavior;
+
+  /* As of IEEE Std 1003.1-2017, assignment statements preceding shell
+     functions no longer behave like assignment statements preceding
+     special builtins, and do not persist in the current shell environment.
+     This is austin group interp #654, though nobody implements it yet. */
+  posix_func_behavior = 0;
 
   vc = new_var_context (name, flags);
-  vc->table = tempvars;
-  if (tempvars)
+  /* Posix interp 1009, temporary assignments preceding function calls modify
+     the current environment *before* the command is executed. */
+  if (posix_func_behavior && (flags & VC_FUNCENV) && tempvars == temporary_env)
+    merge_temporary_env ();
+  else if (tempvars)
     {
+      vc->table = tempvars;
       /* Have to do this because the temp environment was created before
 	 variable_context was incremented. */
+      /* XXX - only need to do it if flags&VC_FUNCENV */
       flatten (tempvars, set_context, (VARLIST *)NULL, 0);
       vc->flags |= VC_HASTMPVAR;
     }
@@ -3829,30 +5298,111 @@ push_var_context (name, flags, tempvars)
   return (shell_variables = vc);
 }
 
-static void
-push_func_var (data)
-     PTR_T data;
+/* This can be called from one of two code paths:
+	1. pop_scope, which implements the posix rules for propagating variable
+	   assignments preceding special builtins to the surrounding scope
+	   (push_builtin_var -- isbltin == 1);
+	2. pop_var_context, which is called from pop_context and implements the
+	   posix rules for propagating variable assignments preceding function
+	   calls to the surrounding scope (push_func_var -- isbltin == 0)
+
+  It takes variables out of a temporary environment hash table. We take the
+  variable in data.
+*/
+
+static inline void
+push_posix_tempvar_internal (var, isbltin)
+     SHELL_VAR *var;
+     int isbltin;
 {
-  SHELL_VAR *var, *v;
+  SHELL_VAR *v;
+  int posix_var_behavior;
 
-  var = (SHELL_VAR *)data;
+  /* As of IEEE Std 1003.1-2017, assignment statements preceding shell
+     functions no longer behave like assignment statements preceding
+     special builtins, and do not persist in the current shell environment.
+     This is austin group interp #654, though nobody implements it yet. */
+  posix_var_behavior = posixly_correct && isbltin;
+  v = 0;
 
-  if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate)))
+  if (local_p (var) && STREQ (var->name, "-"))
     {
-      /* XXX - should we set v->context here? */
+      set_current_options (value_cell (var));
+      set_shellopts ();
+    }
+  /* This takes variable assignments preceding special builtins that can execute
+     multiple commands (source, eval, etc.) and performs the equivalent of
+     an assignment statement to modify the closest enclosing variable (the
+     posix "current execution environment"). This makes the behavior the same
+     as push_posix_temp_var; but the circumstances of calling are slightly
+     different. */
+  else if (tempvar_p (var) && posix_var_behavior)
+    {
+      /* similar to push_posix_temp_var */
+      v = bind_variable (var->name, value_cell (var), ASS_FORCE|ASS_NOLONGJMP);
+      if (v)
+	{
+	  v->attributes |= var->attributes;
+	  if (v->context == 0)
+	    v->attributes &= ~(att_tempvar|att_propagate);
+	  /* XXX - set att_propagate here if v->context > 0? */
+	}
+    }
+  else if (tempvar_p (var) && propagate_p (var))
+    {
+      /* 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 (VARIABLES_HASH_BUCKETS);
       v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
+      /* XXX - should we set v->context here? */
+      if (v)
+	v->context = shell_variables->scope;
       if (shell_variables == global_variables)
 	var->attributes &= ~(att_tempvar|att_propagate);
       else
 	shell_variables->flags |= VC_HASTMPVAR;
-      v->attributes |= var->attributes;
+      if (v)
+	v->attributes |= var->attributes;
     }
   else
     stupidly_hack_special_variables (var->name);	/* XXX */
 
+#if defined (ARRAY_VARS)
+  if (v && (array_p (var) || assoc_p (var)))
+    {
+      FREE (value_cell (v));
+      if (array_p (var))
+	var_setarray (v, array_copy (array_cell (var)));
+      else
+	var_setassoc (v, assoc_copy (assoc_cell (var)));
+    }
+#endif	  
+
   dispose_variable (var);
 }
 
+static void
+push_func_var (data)
+     PTR_T data;
+{
+  SHELL_VAR *var;
+
+  var = (SHELL_VAR *)data;
+  push_posix_tempvar_internal (var, 0);
+}
+
+static void
+push_builtin_var (data)
+     PTR_T data;
+{
+  SHELL_VAR *var;
+
+  var = (SHELL_VAR *)data;
+  push_posix_tempvar_internal (var, 1);
+}
+
 /* Pop the top context off of VCXT and dispose of it, returning the rest of
    the stack. */
 void
@@ -3879,10 +5429,8 @@ pop_var_context ()
     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)
+static void
+delete_local_contexts (vcxt)
      VAR_CONTEXT *vcxt;
 {
   VAR_CONTEXT *v, *t;
@@ -3891,12 +5439,30 @@ delete_all_contexts (vcxt)
     {
       t = v->down;
       dispose_var_context (v);
-    }    
+    }
+}
 
+/* 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;
+{
+  delete_local_contexts (vcxt);
   delete_all_variables (global_variables->table);
   shell_variables = global_variables;
 }
 
+/* Reset the context so we are not executing in a shell function. Only call
+   this if you are getting ready to exit the shell. */
+void
+reset_local_contexts ()
+{
+  delete_local_contexts (shell_variables);
+  shell_variables = global_variables;
+  variable_context = 0;
+}
+
 /* **************************************************************** */
 /*								    */
 /*	   Pushing and Popping temporary variable scopes	    */
@@ -3923,17 +5489,17 @@ push_exported_var (data)
      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;
+      if (v)
+	{
+	  v->attributes |= var->attributes;
+	  v->context = shell_variables->scope;
+	}
     }
   else
     stupidly_hack_special_variables (var->name);	/* XXX */
@@ -3941,11 +5507,17 @@ push_exported_var (data)
   dispose_variable (var);
 }
 
+/* This is called to propagate variables in the temporary environment of a
+   special builtin (if IS_SPECIAL != 0) or exported variables that are the
+   result of a builtin like `source' or `command' that can operate on the
+   variables in its temporary environment. In the first case, we call
+   push_builtin_var, which does the right thing. */
 void
 pop_scope (is_special)
      int is_special;
 {
   VAR_CONTEXT *vcxt, *ret;
+  int is_bltinenv;
 
   vcxt = shell_variables;
   if (vc_istempscope (vcxt) == 0)
@@ -3953,6 +5525,7 @@ pop_scope (is_special)
       internal_error (_("pop_scope: head of shell_variables not a temporary environment scope"));
       return;
     }
+  is_bltinenv = vc_isbltnenv (vcxt);	/* XXX - for later */
 
   ret = vcxt->down;
   if (ret)
@@ -3966,7 +5539,7 @@ pop_scope (is_special)
   if (vcxt->table)
     {
       if (is_special)
-	hash_flush (vcxt->table, push_func_var);
+	hash_flush (vcxt->table, push_builtin_var);
       else
 	hash_flush (vcxt->table, push_exported_var);
       hash_dispose (vcxt->table);
@@ -3982,12 +5555,77 @@ pop_scope (is_special)
 /*								    */
 /* **************************************************************** */
 
-static WORD_LIST **dollar_arg_stack = (WORD_LIST **)NULL;
+struct saved_dollar_vars {
+  char **first_ten;
+  WORD_LIST *rest;
+  int count;
+};
+
+static struct saved_dollar_vars *dollar_arg_stack = (struct saved_dollar_vars *)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. */
+/* Functions to manipulate dollar_vars array. Need to keep these in sync with
+   whatever remember_args() does. */
+static char **
+save_dollar_vars ()
+{
+  char **ret;
+  int i;
+
+  ret = strvec_create (10);
+  for (i = 1; i < 10; i++)
+    {
+      ret[i] = dollar_vars[i];
+      dollar_vars[i] = (char *)NULL;
+    }
+  return ret;
+}
+
+static void
+restore_dollar_vars (args)
+     char **args;
+{
+  int i;
+
+  for (i = 1; i < 10; i++)
+    dollar_vars[i] = args[i];
+}
+
+static void
+free_dollar_vars ()
+{
+  int i;
+
+  for (i = 1; i < 10; i++)
+    {
+      FREE (dollar_vars[i]);
+      dollar_vars[i] = (char *)NULL;
+    }
+}
+
+static void
+free_saved_dollar_vars (args)
+     char **args;
+{
+  int i;
+
+  for (i = 1; i < 10; i++)
+    FREE (args[i]);
+}
+
+/* Do what remember_args (xxx, 1) would have done. */
+void
+clear_dollar_vars ()
+{
+  free_dollar_vars ();
+  dispose_words (rest_of_args);
+
+  rest_of_args = (WORD_LIST *)NULL;
+  posparam_count = 0;
+}
+
+/* XXX - should always be followed by remember_args () */
 void
 push_context (name, is_subshell, tempvars)
      char *name;	/* function name */
@@ -4018,35 +5656,79 @@ push_dollar_vars ()
 {
   if (dollar_arg_stack_index + 2 > dollar_arg_stack_slots)
     {
-      dollar_arg_stack = (WORD_LIST **)
+      dollar_arg_stack = (struct saved_dollar_vars *)
 	xrealloc (dollar_arg_stack, (dollar_arg_stack_slots += 10)
-		  * sizeof (WORD_LIST **));
+		  * sizeof (struct saved_dollar_vars));
     }
-  dollar_arg_stack[dollar_arg_stack_index++] = list_rest_of_args ();
-  dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL;
+
+  dollar_arg_stack[dollar_arg_stack_index].count = posparam_count;
+  dollar_arg_stack[dollar_arg_stack_index].first_ten = save_dollar_vars ();
+  dollar_arg_stack[dollar_arg_stack_index++].rest = rest_of_args;
+  rest_of_args = (WORD_LIST *)NULL;
+  posparam_count = 0;
+  
+  dollar_arg_stack[dollar_arg_stack_index].first_ten = (char **)NULL;
+  dollar_arg_stack[dollar_arg_stack_index].rest = (WORD_LIST *)NULL;  
 }
 
 /* Restore the positional parameters from our stack. */
 void
 pop_dollar_vars ()
 {
-  if (!dollar_arg_stack || dollar_arg_stack_index == 0)
+  if (dollar_arg_stack == 0 || 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;
+  /* Wipe out current values */
+  clear_dollar_vars ();
+
+  rest_of_args = dollar_arg_stack[--dollar_arg_stack_index].rest;
+  restore_dollar_vars (dollar_arg_stack[dollar_arg_stack_index].first_ten);
+  free (dollar_arg_stack[dollar_arg_stack_index].first_ten);
+  posparam_count = dollar_arg_stack[dollar_arg_stack_index].count;
+
+  dollar_arg_stack[dollar_arg_stack_index].first_ten = (char **)NULL;
+  dollar_arg_stack[dollar_arg_stack_index].rest = (WORD_LIST *)NULL;
+  dollar_arg_stack[dollar_arg_stack_index].count = 0;
+
   set_dollar_vars_unchanged ();
+  invalidate_cached_quoted_dollar_at ();
 }
 
 void
 dispose_saved_dollar_vars ()
 {
-  if (!dollar_arg_stack || dollar_arg_stack_index == 0)
+  if (dollar_arg_stack == 0 || 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;
+  dispose_words (dollar_arg_stack[--dollar_arg_stack_index].rest);    
+  free_saved_dollar_vars (dollar_arg_stack[dollar_arg_stack_index].first_ten);	
+  free (dollar_arg_stack[dollar_arg_stack_index].first_ten);
+
+  dollar_arg_stack[dollar_arg_stack_index].first_ten = (char **)NULL;  
+  dollar_arg_stack[dollar_arg_stack_index].rest = (WORD_LIST *)NULL;
+  dollar_arg_stack[dollar_arg_stack_index].count = 0;
+}
+
+/* Initialize BASH_ARGV and BASH_ARGC after turning on extdebug after the
+   shell is initialized */
+void
+init_bash_argv ()
+{
+  if (bash_argv_initialized == 0)
+    {
+      save_bash_argv ();
+      bash_argv_initialized = 1;
+    }
+}
+
+void
+save_bash_argv ()
+{
+  WORD_LIST *list;
+
+  list = list_rest_of_args ();
+  push_args (list);
+  dispose_words (list);
 }
 
 /* Manipulate the special BASH_ARGV and BASH_ARGC variables. */
@@ -4089,7 +5771,7 @@ pop_args ()
   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);
+  ce = array_unshift_element (bash_argc_a);
   if (ce == 0 || legal_number (element_value (ce), &i) == 0)
     i = 0;
 
@@ -4106,11 +5788,6 @@ pop_args ()
  *************************************************/
 
 /* 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
@@ -4126,8 +5803,13 @@ struct name_and_function {
 };
 
 static struct name_and_function special_vars[] = {
+  { "BASH_COMPAT", sv_shcompat },
   { "BASH_XTRACEFD", sv_xtracefd },
 
+#if defined (JOB_CONTROL)
+  { "CHILD_MAX", sv_childmax },
+#endif
+
 #if defined (READLINE)
 #  if defined (STRICT_POSIX)
   { "COLUMNS", sv_winsize },
@@ -4135,6 +5817,10 @@ static struct name_and_function special_vars[] = {
   { "COMP_WORDBREAKS", sv_comp_wordbreaks },
 #endif
 
+  { "EXECIGNORE", sv_execignore },
+
+  { "FUNCNEST", sv_funcnest },
+
   { "GLOBIGNORE", sv_globignore },
 
 #if defined (HISTORY)
@@ -4187,7 +5873,7 @@ static struct name_and_function special_vars[] = {
   { "TEXTDOMAIN", sv_locale },
   { "TEXTDOMAINDIR", sv_locale },
 
-#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+#if defined (HAVE_TZSET)
   { "TZ", sv_tz },
 #endif
 
@@ -4306,6 +5992,30 @@ sv_mail (name)
     }
 }
 
+void
+sv_funcnest (name)
+     char *name;
+{
+  SHELL_VAR *v;
+  intmax_t num;
+
+  v = find_variable (name);
+  if (v == 0)
+    funcnest_max = 0;
+  else if (legal_number (value_cell (v), &num) == 0)
+    funcnest_max = 0;
+  else
+    funcnest_max = num;
+}
+
+/* What to do when EXECIGNORE changes. */
+void
+sv_execignore (name)
+     char *name;
+{
+  setup_exec_ignore (name);
+}
+
 /* What to do when GLOBIGNORE changes. */
 void
 sv_globignore (name)
@@ -4367,13 +6077,13 @@ sv_winsize (name)
     return;
 
   v = find_variable (name);
-  if (v == 0 || var_isnull (v))
+  if (v == 0 || var_isset (v) == 0)
     rl_reset_screen_size ();
   else
     {
       if (legal_number (value_cell (v), &xd) == 0)
 	return;
-      winsize_assignment = winsize_assigned = 1;
+      winsize_assignment = 1;
       d = xd;			/* truncate */
       if (name[0] == 'L')	/* LINES */
 	rl_set_screen_size (d, -1);
@@ -4418,17 +6128,22 @@ sv_histsize (name)
       if (legal_number (temp, &num))
 	{
 	  hmax = num;
-	  if (name[4] == 'S')
+	  if (hmax < 0 && name[4] == 'S')
+	    unstifle_history ();	/* unstifle history if HISTSIZE < 0 */
+	  else if (name[4] == 'S')
 	    {
 	      stifle_history (hmax);
 	      hmax = where_history ();
 	      if (history_lines_this_session > hmax)
 		history_lines_this_session = hmax;
 	    }
-	  else
+	  else if (hmax >= 0)	/* truncate HISTFILE if HISTFILESIZE >= 0 */
 	    {
 	      history_truncate_file (get_string_value ("HISTFILE"), hmax);
-	      if (hmax <= history_lines_in_file)
+	      /* If we just shrank the history file to fewer lines than we've
+		 already read, make sure we adjust our idea of how many lines
+		 we have read from the file. */
+	      if (hmax < history_lines_in_file)
 		history_lines_in_file = hmax;
 	    }
 	}
@@ -4510,17 +6225,33 @@ sv_histtimefmt (name)
 {
   SHELL_VAR *v;
 
-  v = find_variable (name);
+  if (v = find_variable (name))
+    {
+      if (history_comment_char == 0)
+	history_comment_char = '#';
+    }
   history_write_timestamps = (v != 0);
 }
 #endif /* HISTORY */
 
-#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+#if defined (HAVE_TZSET)
 void
 sv_tz (name)
      char *name;
 {
-  tzset ();
+  SHELL_VAR *v;
+
+  v = find_variable (name);
+  if (v && exported_p (v))
+    array_needs_making = 1;
+  else if (v == 0)
+    array_needs_making = 1;
+
+  if (array_needs_making)
+    {
+      maybe_make_export_env ();  
+      tzset ();
+    }
 }
 #endif
 
@@ -4537,7 +6268,7 @@ sv_ignoreeof (name)
   eof_encountered = 0;
 
   tmp_var = find_variable (name);
-  ignoreeof = tmp_var != 0;
+  ignoreeof = tmp_var && var_isset (tmp_var);
   temp = tmp_var ? value_cell (tmp_var) : (char *)NULL;
   if (temp)
     eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10;
@@ -4548,10 +6279,16 @@ void
 sv_optind (name)
      char *name;
 {
+  SHELL_VAR *var;
   char *tt;
   int s;
 
-  tt = get_string_value ("OPTIND");
+  var = find_variable ("OPTIND");
+  tt = var ? get_variable_value (var) : (char *)NULL;
+
+  /* Assume that if var->context < variable_context and variable_context > 0
+     then we are restoring the variables's previous state while returning
+     from a function. */
   if (tt && *tt)
     {
       s = atoi (tt);
@@ -4580,7 +6317,10 @@ void
 sv_strict_posix (name)
      char *name;
 {
-  SET_INT_VAR (name, posixly_correct);
+  SHELL_VAR *var;
+
+  var = find_variable (name);
+  posixly_correct = var && var_isset (var);
   posix_initialize (posixly_correct);
 #if defined (READLINE)
   if (interactive_shell)
@@ -4594,12 +6334,18 @@ sv_locale (name)
      char *name;
 {
   char *v;
+  int r;
 
   v = get_string_value (name);
   if (name[0] == 'L' && name[1] == 'A')	/* LANG */
-    set_lang (name, v);
+    r = set_lang (name, v);
   else
-    set_locale_var (name, v);		/* LC_*, TEXTDOMAIN* */
+    r = set_locale_var (name, v);		/* LC_*, TEXTDOMAIN* */
+
+#if 1
+  if (r == 0 && posixly_correct)
+    set_exit_status (EXECUTION_FAILURE);
+#endif
 }
 
 #if defined (ARRAY_VARS)
@@ -4634,19 +6380,27 @@ set_pipestatus_array (ps, nproc)
   /* Fast case */
   if (array_num_elements (a) == nproc && nproc == 1)
     {
+#ifndef ALT_ARRAY_IMPLEMENTATION
       ae = element_forw (a->head);
-      free (element_value (ae));
-      ae->value = itos (ps[0]);
+#else
+      ae = a->elements[0];
+#endif
+      ARRAY_ELEMENT_REPLACE (ae, itos (ps[0]));
     }
   else if (array_num_elements (a) <= nproc)
     {
       /* modify in array_num_elements members in place, then add */
+#ifndef ALT_ARRAY_IMPLEMENTATION
       ae = a->head;
+#endif
       for (i = 0; i < array_num_elements (a); i++)
 	{
+#ifndef ALT_ARRAY_IMPLEMENTATION
 	  ae = element_forw (ae);
-	  free (element_value (ae));
-	  ae->value = itos (ps[i]);
+#else
+	  ae = a->elements[i];
+#endif
+	  ARRAY_ELEMENT_REPLACE (ae, itos (ps[i]));
 	}
       /* add any more */
       for ( ; i < nproc; i++)
@@ -4657,15 +6411,67 @@ set_pipestatus_array (ps, nproc)
     }
   else
     {
+#ifndef ALT_ARRAY_IMPLEMENTATION
       /* deleting elements.  it's faster to rebuild the array. */	  
       array_flush (a);
-      for (i = 0; ps[i] != -1; i++)
+      for (i = 0; i < nproc; i++)
 	{
 	  t = inttostr (ps[i], tbuf, sizeof (tbuf));
 	  array_insert (a, i, t);
 	}
+#else
+      /* deleting elements. replace the first NPROC, free the rest */
+      for (i = 0; i < nproc; i++)
+	{
+	  ae = a->elements[i];
+	  ARRAY_ELEMENT_REPLACE (ae, itos (ps[i]));
+	}
+      for ( ; i <= array_max_index (a); i++)
+	{
+	  array_dispose_element (a->elements[i]);
+	  a->elements[i] = (ARRAY_ELEMENT *)NULL;
+	}
+
+      /* bookkeeping usually taken care of by array_insert */
+      set_max_index (a, nproc - 1);
+      set_first_index (a, 0);
+      set_num_elements (a, nproc);
+#endif /* ALT_ARRAY_IMPLEMENTATION */
     }
 }
+
+ARRAY *
+save_pipestatus_array ()
+{
+  SHELL_VAR *v;
+  ARRAY *a;
+
+  v = find_variable ("PIPESTATUS");
+  if (v == 0 || array_p (v) == 0 || array_cell (v) == 0)
+    return ((ARRAY *)NULL);
+    
+  a = array_copy (array_cell (v));
+
+  return a;
+}
+
+void
+restore_pipestatus_array (a)
+     ARRAY *a;
+{
+  SHELL_VAR *v;
+  ARRAY *a2;
+
+  v = find_variable ("PIPESTATUS");
+  /* XXX - should we still assign even if existing value is NULL? */
+  if (v == 0 || array_p (v) == 0 || array_cell (v) == 0)
+    return;
+
+  a2 = array_cell (v);
+  var_setarray (v, a); 
+
+  array_dispose (a2);
+}
 #endif
 
 void
@@ -4714,3 +6520,71 @@ sv_xtracefd (name)
 	internal_error (_("%s: %s: invalid value for trace file descriptor"), name, value_cell (v));
     }
 }
+
+#define MIN_COMPAT_LEVEL 31
+
+void
+sv_shcompat (name)
+     char *name;
+{
+  SHELL_VAR *v;
+  char *val;
+  int tens, ones, compatval;
+
+  v = find_variable (name);
+  if (v == 0)
+    {
+      shell_compatibility_level = DEFAULT_COMPAT_LEVEL;
+      set_compatibility_opts ();
+      return;
+    }
+  val = value_cell (v);
+  if (val == 0 || *val == '\0')
+    {
+      shell_compatibility_level = DEFAULT_COMPAT_LEVEL;
+      set_compatibility_opts ();
+      return;
+    }
+  /* Handle decimal-like compatibility version specifications: 4.2 */
+  if (ISDIGIT (val[0]) && val[1] == '.' && ISDIGIT (val[2]) && val[3] == 0)
+    {
+      tens = val[0] - '0';
+      ones = val[2] - '0';
+      compatval = tens*10 + ones;
+    }
+  /* Handle integer-like compatibility version specifications: 42 */
+  else if (ISDIGIT (val[0]) && ISDIGIT (val[1]) && val[2] == 0)
+    {
+      tens = val[0] - '0';
+      ones = val[1] - '0';
+      compatval = tens*10 + ones;
+    }
+  else
+    {
+compat_error:
+      internal_error (_("%s: %s: compatibility value out of range"), name, val);
+      shell_compatibility_level = DEFAULT_COMPAT_LEVEL;
+      set_compatibility_opts ();
+      return;
+    }
+
+  if (compatval < MIN_COMPAT_LEVEL || compatval > DEFAULT_COMPAT_LEVEL)
+    goto compat_error;
+
+  shell_compatibility_level = compatval;
+  set_compatibility_opts ();
+}
+
+#if defined (JOB_CONTROL)
+void
+sv_childmax (name)
+     char *name;
+{
+  char *tt;
+  int s;
+
+  tt = get_string_value (name);
+  s = (tt && *tt) ? atoi (tt) : 0;
+  set_maxchild (s);
+}
+#endif
diff --git a/variables.h b/variables.h
index ec1bfdc..55f497d 100644
--- a/variables.h
+++ b/variables.h
@@ -1,6 +1,6 @@
 /* variables.h -- data structures for shell variables. */
 
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2022 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -61,8 +61,8 @@ typedef struct var_context {
 
 /* 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 *));
+typedef struct variable *sh_var_value_func_t PARAMS((struct variable *));
+typedef struct variable *sh_var_assign_func_t PARAMS((struct variable *, char *, arrayind_t, char *));
 
 /* For the future */
 union _value {
@@ -112,8 +112,9 @@ typedef struct _vlist {
 #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 att_nameref	0x0000800	/* word is a name reference */
 
-#define user_attrs	(att_exported|att_readonly|att_integer|att_local|att_trace|att_uppercase|att_lowercase|att_capcase)
+#define user_attrs	(att_exported|att_readonly|att_integer|att_local|att_trace|att_uppercase|att_lowercase|att_capcase|att_nameref)
 
 #define attmask_user	0x0000fff
 
@@ -124,6 +125,7 @@ typedef struct _vlist {
 #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 att_regenerate	0x0040000	/* regenerate when exported */
 
 #define	attmask_int	0x00ff000
 
@@ -144,6 +146,7 @@ typedef struct _vlist {
 #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 nameref_p(var)		((((var)->attributes) & (att_nameref)))
 
 #define invisible_p(var)	((((var)->attributes) & (att_invisible)))
 #define non_unsettable_p(var)	((((var)->attributes) & (att_nounset)))
@@ -151,23 +154,33 @@ typedef struct _vlist {
 #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 regen_p(var)		((((var)->attributes) & (att_regenerate)))
 
 #define tempvar_p(var)		((((var)->attributes) & (att_tempvar)))
+#define propagate_p(var)	((((var)->attributes) & (att_propagate)))
 
-/* Acessing variable values: rvalues */
+/* Variable names: lvalues */
+#define name_cell(var)		((var)->name)
+
+/* Accessing 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 nameref_cell(var)	((var)->value)		/* so it can change later */
+
+#define NAMEREF_MAX	8	/* only 8 levels of nameref indirection */
 
-#define var_isnull(var)		((var)->value == 0)
 #define var_isset(var)		((var)->value != 0)
+#define var_isunset(var)	((var)->value == 0)
+#define var_isnull(var)		((var)->value && *(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))
+#define var_setref(var, str)	((var)->value = (str))
 
 /* Make VAR be auto-exported. */
 #define set_auto_export(var) \
@@ -205,9 +218,20 @@ typedef struct _vlist {
 	      (var)->exportstr = (char *)NULL; \
 	    } \
 	} while (0)
+
+#define ifsname(s)	((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
+
+/* Flag values for make_local_variable and its array counterparts */
+#define MKLOC_ASSOCOK		0x01
+#define MKLOC_ARRAYOK		0x02
+#define MKLOC_INHERIT		0x04
+
+/* Special value for nameref with invalid value for creation or assignment */
+extern SHELL_VAR nameref_invalid_value;
+#define INVALID_NAMEREF_VALUE	(void *)&nameref_invalid_value
 	
 /* Stuff for hacking variables. */
-typedef int sh_var_map_func_t __P((SHELL_VAR *));
+typedef int sh_var_map_func_t PARAMS((SHELL_VAR *));
 
 /* Where we keep the variables and functions */
 extern VAR_CONTEXT *global_variables;
@@ -220,167 +244,219 @@ 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 int tempenv_assign_error;
+extern int array_needs_making;
+extern int shell_level;
+
+/* XXX */
+extern WORD_LIST *rest_of_args;
+extern int posparam_count;
+extern pid_t dollar_dollar_pid;
+
+extern int localvar_inherit;		/* declared in variables.c */
+
+extern void initialize_shell_variables PARAMS((char **, int));
+
+extern int validate_inherited_value PARAMS((SHELL_VAR *, int));
+
+extern SHELL_VAR *set_if_not PARAMS((char *, char *));
+
+extern void sh_set_lines_and_columns PARAMS((int, int));
+extern void set_pwd PARAMS((void));
+extern void set_ppid PARAMS((void));
+extern void make_funcname_visible PARAMS((int));
+
+extern SHELL_VAR *var_lookup PARAMS((const char *, VAR_CONTEXT *));
+
+extern SHELL_VAR *find_function PARAMS((const char *));
+extern FUNCTION_DEF *find_function_def PARAMS((const char *));
+extern SHELL_VAR *find_variable PARAMS((const char *));
+extern SHELL_VAR *find_variable_noref PARAMS((const char *));
+extern SHELL_VAR *find_variable_last_nameref PARAMS((const char *, int));
+extern SHELL_VAR *find_global_variable_last_nameref PARAMS((const char *, int));
+extern SHELL_VAR *find_variable_nameref PARAMS((SHELL_VAR *));
+extern SHELL_VAR *find_variable_nameref_for_create PARAMS((const char *, int));
+extern SHELL_VAR *find_variable_nameref_for_assignment PARAMS((const char *, int));
+/*extern SHELL_VAR *find_variable_internal PARAMS((const char *, int));*/
+extern SHELL_VAR *find_variable_tempenv PARAMS((const char *));
+extern SHELL_VAR *find_variable_notempenv PARAMS((const char *));
+extern SHELL_VAR *find_global_variable PARAMS((const char *));
+extern SHELL_VAR *find_global_variable_noref PARAMS((const char *));
+extern SHELL_VAR *find_shell_variable PARAMS((const char *));
+extern SHELL_VAR *find_tempenv_variable PARAMS((const char *));
+extern SHELL_VAR *find_variable_no_invisible PARAMS((const char *));
+extern SHELL_VAR *find_variable_for_assignment PARAMS((const char *));
+extern char *nameref_transform_name PARAMS((char *, int));
+extern SHELL_VAR *copy_variable PARAMS((SHELL_VAR *));
+extern SHELL_VAR *make_local_variable PARAMS((const char *, int));
+extern SHELL_VAR *bind_variable PARAMS((const char *, char *, int));
+extern SHELL_VAR *bind_global_variable PARAMS((const char *, char *, int));
+extern SHELL_VAR *bind_function PARAMS((const char *, COMMAND *));
+
+extern void bind_function_def PARAMS((const char *, FUNCTION_DEF *, int));
+
+extern SHELL_VAR **map_over PARAMS((sh_var_map_func_t *, VAR_CONTEXT *));
+SHELL_VAR **map_over_funcs PARAMS((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));
+extern SHELL_VAR **all_shell_variables PARAMS((void));
+extern SHELL_VAR **all_shell_functions PARAMS((void));
+extern SHELL_VAR **all_visible_variables PARAMS((void));
+extern SHELL_VAR **all_visible_functions PARAMS((void));
+extern SHELL_VAR **all_exported_variables PARAMS((void));
+extern SHELL_VAR **local_exported_variables PARAMS((void));
+extern SHELL_VAR **all_local_variables PARAMS((int));
 #if defined (ARRAY_VARS)
-extern SHELL_VAR **all_array_variables __P((void));
+extern SHELL_VAR **all_array_variables PARAMS((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 *));
+extern char **all_variables_matching_prefix PARAMS((const char *));
+
+extern char **make_var_array PARAMS((HASH_TABLE *));
+extern char **add_or_supercede_exported_var PARAMS((char *, int));
+
+extern char *get_variable_value PARAMS((SHELL_VAR *));
+extern char *get_string_value PARAMS((const char *));
+extern char *sh_get_env_value PARAMS((const char *));
+extern char *make_variable_value PARAMS((SHELL_VAR *, char *, int));
+
+extern SHELL_VAR *bind_variable_value PARAMS((SHELL_VAR *, char *, int));
+extern SHELL_VAR *bind_int_variable PARAMS((char *, char *, int));
+extern SHELL_VAR *bind_var_to_int PARAMS((char *, intmax_t, int));
+
+extern int assign_in_env PARAMS((WORD_DESC *, int));
+
+extern int unbind_variable PARAMS((const char *));
+extern int check_unbind_variable PARAMS((const char *));
+extern int unbind_nameref PARAMS((const char *));
+extern int unbind_variable_noref PARAMS((const char *));
+extern int unbind_global_variable PARAMS((const char *));
+extern int unbind_global_variable_noref PARAMS((const char *));
+extern int unbind_func PARAMS((const char *));
+extern int unbind_function_def PARAMS((const char *));
+extern int delete_var PARAMS((const char *, VAR_CONTEXT *));
+extern int makunbound PARAMS((const char *, VAR_CONTEXT *));
+extern int kill_local_variable PARAMS((const char *));
+
+extern void delete_all_variables PARAMS((HASH_TABLE *));
+extern void delete_all_contexts PARAMS((VAR_CONTEXT *));
+extern void reset_local_contexts PARAMS((void));
+
+extern VAR_CONTEXT *new_var_context PARAMS((char *, int));
+extern void dispose_var_context PARAMS((VAR_CONTEXT *));
+extern VAR_CONTEXT *push_var_context PARAMS((char *, int, HASH_TABLE *));
+extern void pop_var_context PARAMS((void));
+extern VAR_CONTEXT *push_scope PARAMS((int, HASH_TABLE *));
+extern void pop_scope PARAMS((int));
+
+extern void clear_dollar_vars PARAMS((void));
+
+extern void push_context PARAMS((char *, int, HASH_TABLE *));
+extern void pop_context PARAMS((void));
+extern void push_dollar_vars PARAMS((void));
+extern void pop_dollar_vars PARAMS((void));
+extern void dispose_saved_dollar_vars PARAMS((void));
+
+extern void init_bash_argv PARAMS((void));
+extern void save_bash_argv PARAMS((void));
+extern void push_args PARAMS((WORD_LIST *));
+extern void pop_args PARAMS((void));
+
+extern void adjust_shell_level PARAMS((int));
+extern void non_unsettable PARAMS((char *));
+extern void dispose_variable PARAMS((SHELL_VAR *));
+extern void dispose_used_env_vars PARAMS((void));
+extern void dispose_function_env PARAMS((void));
+extern void dispose_builtin_env PARAMS((void));
+extern void merge_temporary_env PARAMS((void));
+extern void flush_temporary_env PARAMS((void));
+extern void merge_builtin_env PARAMS((void));
+extern void kill_all_local_variables PARAMS((void));
+
+extern void set_var_read_only PARAMS((char *));
+extern void set_func_read_only PARAMS((const char *));
+extern void set_var_auto_export PARAMS((char *));
+extern void set_func_auto_export PARAMS((const char *));
+
+extern void sort_variables PARAMS((SHELL_VAR **));
+
+extern int chkexport PARAMS((char *));
+extern void maybe_make_export_env PARAMS((void));
+extern void update_export_env_inplace PARAMS((char *, int, char *));
+extern void put_command_name_into_env PARAMS((char *));
+extern void put_gnu_argv_flags_into_env PARAMS((intmax_t, char *));
+
+extern void print_var_list PARAMS((SHELL_VAR **));
+extern void print_func_list PARAMS((SHELL_VAR **));
+extern void print_assignment PARAMS((SHELL_VAR *));
+extern void print_var_value PARAMS((SHELL_VAR *, int));
+extern void print_var_function PARAMS((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_array_variable PARAMS((char *));
+extern SHELL_VAR *make_local_array_variable PARAMS((char *, int));
 
-extern SHELL_VAR *make_new_assoc_variable __P((char *));
-extern SHELL_VAR *make_local_assoc_variable __P((char *));
+extern SHELL_VAR *make_new_assoc_variable PARAMS((char *));
+extern SHELL_VAR *make_local_assoc_variable PARAMS((char *, int));
 
-extern void set_pipestatus_array __P((int *, int));
+extern void set_pipestatus_array PARAMS((int *, int));
+extern ARRAY *save_pipestatus_array PARAMS((void));
+extern void restore_pipestatus_array PARAMS((ARRAY *));
 #endif
 
-extern void set_pipestatus_from_exit __P((int));
+extern void set_pipestatus_from_exit PARAMS((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 *));
+extern void stupidly_hack_special_variables PARAMS((char *));
 
 /* Reinitialize some special variables that have external effects upon unset
    when the shell reinitializes itself. */
-extern void reinit_special_variables __P((void));
+extern void reinit_special_variables PARAMS((void));
 
-extern int get_random_number __P((void));
+extern int get_random_number PARAMS((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 *));
+extern void sv_ifs PARAMS((char *));
+extern void sv_path PARAMS((char *));
+extern void sv_mail PARAMS((char *));
+extern void sv_funcnest PARAMS((char *));
+extern void sv_execignore PARAMS((char *));
+extern void sv_globignore PARAMS((char *));
+extern void sv_ignoreeof PARAMS((char *));
+extern void sv_strict_posix PARAMS((char *));
+extern void sv_optind PARAMS((char *));
+extern void sv_opterr PARAMS((char *));
+extern void sv_locale PARAMS((char *));
+extern void sv_xtracefd PARAMS((char *));
+extern void sv_shcompat PARAMS((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 *));
+extern void sv_comp_wordbreaks PARAMS((char *));
+extern void sv_terminal PARAMS((char *));
+extern void sv_hostfile PARAMS((char *));
+extern void sv_winsize PARAMS((char *));
 #endif
 
 #if defined (__CYGWIN__)
-extern void sv_home __P((char *));
+extern void sv_home PARAMS((char *));
 #endif
 
 #if defined (HISTORY)
-extern void sv_histsize __P((char *));
-extern void sv_histignore __P((char *));
-extern void sv_history_control __P((char *));
+extern void sv_histsize PARAMS((char *));
+extern void sv_histignore PARAMS((char *));
+extern void sv_history_control PARAMS((char *));
 #  if defined (BANG_HISTORY)
-extern void sv_histchars __P((char *));
+extern void sv_histchars PARAMS((char *));
 #  endif
-extern void sv_histtimefmt __P((char *));
+extern void sv_histtimefmt PARAMS((char *));
 #endif /* HISTORY */
 
-#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
-extern void sv_tz __P((char *));
+#if defined (HAVE_TZSET)
+extern void sv_tz PARAMS((char *));
+#endif
+
+#if defined (JOB_CONTROL)
+extern void sv_childmax PARAMS((char *));
 #endif
 
 #endif /* !_VARIABLES_H_ */
diff --git a/version.c b/version.c
index b97fa06..94c85bd 100644
--- a/version.c
+++ b/version.c
@@ -1,6 +1,6 @@
 /* version.c -- distribution and version numbers. */
 
-/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2022 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -43,7 +43,7 @@ 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_copyright = N_("Copyright (C) 2022 Free Software Foundation, Inc.");
 const char * const bash_license = N_("License GPLv3+: GNU GPL version 3 or later \n");
 
 /* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */
@@ -52,8 +52,8 @@ 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));
+extern char *shell_version_string PARAMS((void));
+extern void show_shell_version PARAMS((int));
 
 /* Give version information about this shell. */
 char *
@@ -64,13 +64,13 @@ shell_version_string ()
   if (tt[0] == '\0')
     {
       if (release_status)
-#if defined (HAVE_SNPRINTF)
+#if 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)
+#if 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);
@@ -88,7 +88,7 @@ show_shell_version (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"));
+      printf ("%s\n", _("This is free software; you are free to change and redistribute it."));
+      printf ("%s\n", _("There is NO WARRANTY, to the extent permitted by law."));
     }
 }
diff --git a/xmalloc.c b/xmalloc.c
index 2344d2d..1b3b408 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,6 +1,6 @@
 /* xmalloc.c -- safe versions of malloc and realloc */
 
-/* Copyright (C) 1991-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the GNU Bourne Again SHell.
 
@@ -47,13 +47,15 @@
 #  endif /* !__STDC__ */
 #endif /* !PTR_T */
 
-#if defined (HAVE_SBRK) && !HAVE_DECL_SBRK
+#if HAVE_SBRK && !HAVE_DECL_SBRK
 extern char *sbrk();
 #endif
 
+#if HAVE_SBRK && defined (USING_BASH_MALLOC)
 static PTR_T lbreak;
 static int brkfound;
 static size_t allocated;
+#endif
 
 /* **************************************************************** */
 /*								    */
@@ -61,7 +63,7 @@ static size_t allocated;
 /*								    */
 /* **************************************************************** */
 
-#if defined (HAVE_SBRK)
+#if HAVE_SBRK && defined (USING_BASH_MALLOC)
 #define FINDBRK() \
 do { \
   if (brkfound == 0) \
@@ -86,7 +88,7 @@ allocerr (func, bytes)
      const char *func;
      size_t bytes;
 {
-#if defined (HAVE_SBRK)
+#if HAVE_SBRK && defined (USING_BASH_MALLOC)
       allocated = findbrk ();
       fatal_error (_("%s: cannot allocate %lu bytes (%lu bytes allocated)"), func, (unsigned long)bytes, (unsigned long)allocated);
 #else
@@ -158,7 +160,7 @@ sh_allocerr (func, bytes, file, line)
      char *file;
      int line;
 {
-#if defined (HAVE_SBRK)
+#if 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
diff --git a/xmalloc.h b/xmalloc.h
index bea71fd..55d2e3d 100644
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -1,6 +1,6 @@
 /* xmalloc.h -- defines for the `x' memory allocation functions */
 
-/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
@@ -36,14 +36,14 @@
 #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 *));
+extern PTR_T xmalloc PARAMS((size_t));
+extern PTR_T xrealloc PARAMS((void *, size_t));
+extern void xfree PARAMS((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));
+extern PTR_T sh_xmalloc PARAMS((size_t, const char *, int));
+extern PTR_T sh_xrealloc PARAMS((void *, size_t, const char *, int));
+extern void sh_xfree PARAMS((void *, const char *, int));
 
 #define xmalloc(x)	sh_xmalloc((x), __FILE__, __LINE__)
 #define xrealloc(x, n)	sh_xrealloc((x), (n), __FILE__, __LINE__)
@@ -53,6 +53,14 @@ extern void sh_xfree __P((void *, const char *, int));
 #undef free
 #endif
 #define free(x)		sh_xfree((x), __FILE__, __LINE__)
+
+extern PTR_T sh_malloc PARAMS((size_t, const char *, int));
+
+#ifdef malloc
+#undef malloc
+#endif
+#define malloc(x)	sh_malloc((x), __FILE__, __LINE__)
+
 #endif	/* USING_BASH_MALLOC */
 
 #endif	/* _XMALLOC_H_ */